diff --git a/.github/ISSUE_TEMPLATE/ar_bug_report.md b/.github/ISSUE_TEMPLATE/ar_bug_report.md index 0d4aee9397..93b6e70b03 100644 --- a/.github/ISSUE_TEMPLATE/ar_bug_report.md +++ b/.github/ISSUE_TEMPLATE/ar_bug_report.md @@ -1,5 +1,5 @@ --- -name: ar_bug_report.md +name: Automated Review bug report about: Create a bug for a an issue found in the Automated Review title: 'AR Bug Report' labels: 'needs-triage,kind/bug,kind/automation' diff --git a/.gitignore b/.gitignore index 3a9b8f6f8e..2820d1e1c1 100644 --- a/.gitignore +++ b/.gitignore @@ -2,17 +2,14 @@ .vs/ .vscode/ __pycache__ -AssetProcessorTemp/** -[Bb]uild/** +[Bb]uild/ [Oo]ut/** CMakeUserPresets.json [Cc]ache/ /[Ii]nstall/ -Editor/EditorEventLog.xml -Editor/EditorLayout.xml **/*egg-info/** **/*egg-link -UserSettings.xml +**/[Rr]estricted [Uu]ser/ FrameCapture/** .DS_Store @@ -21,9 +18,6 @@ client*.cfg server*.cfg .mayaSwatches/ _savebackup/ -#Output folder for test results when running Automated Tests -TestResults/** *.swatches /imgui.ini -/scripts/project_manager/logs/ -/AutomatedTesting/Gem/PythonTests/scripting/TestResults + diff --git a/Assets/Editor/Scripts/export_all_project_levels.py b/Assets/Editor/Scripts/export_all_project_levels.py deleted file mode 100755 index ba900b37a8..0000000000 --- a/Assets/Editor/Scripts/export_all_project_levels.py +++ /dev/null @@ -1,78 +0,0 @@ -# -# Copyright (c) Contributors to the Open 3D Engine Project. -# For complete copyright and license terms please see the LICENSE at the root of this distribution. -# -# SPDX-License-Identifier: Apache-2.0 OR MIT -# -# -""" -This script loads every level in a game project and exports them. You will be prompted with the standard -Check-Out/Overwrite/Cancel dialog for each level. -This is useful when there is a version update to a file that requires re-exporting. -""" -import sys, os -import azlmbr.legacy.general as general -import azlmbr.legacy.checkout_dialog as checkout_dialog - - -class CheckOutDialogEnableAll: - """ - Helper class to wrap enabling the "Apply to all" checkbox in the CheckOutDialog. - Guarantees that the old setting will be restored. - To use, do: - - with CheckOutDialogEnableAll(): - # your code here - """ - - def __init__(self): - self.old_setting = False - - def __enter__(self): - self.old_setting = checkout_dialog.enable_for_all(True) - print(self.old_setting) - - def __exit__(self, type, value, traceback): - checkout_dialog.enable_for_all(self.old_setting) - - -level_list = [] - - -def is_in_special_folder(file_full_path): - if file_full_path.find("_savebackup") >= 0: - return True - if file_full_path.find("_autobackup") >= 0: - return True - if file_full_path.find("_hold") >= 0: - return True - if file_full_path.find("_tmpresize") >= 0: - return True - - return False - - -game_folder = general.get_game_folder() - - -# Recursively search every directory in the game project for files ending with .cry and .ly -for root, dirs, files in os.walk(game_folder): - for file in files: - if file.endswith(".cry") or file.endswith(".ly"): - # The engine expects the full path of the .cry file - file_full_path = os.path.abspath(os.path.join(root, file)) - # Exclude files in special directories - if not is_in_special_folder(file_full_path): - level_list.append(file_full_path) - -# make the checkout dialog enable the 'Apply to all' checkbox -with CheckOutDialogEnableAll(): - - # For each valid .cry file found, open it in the editor and export it - for level in level_list: - if not isinstance(level, str): - # general.open_level_no_prompt expects the file path in utf8 format - level = level.encode("utf-8") - - general.open_level_no_prompt(level) - general.export_to_engine() diff --git a/Assets/Editor/Scripts/generatelod.py b/Assets/Editor/Scripts/generatelod.py deleted file mode 100755 index 618827c5b4..0000000000 --- a/Assets/Editor/Scripts/generatelod.py +++ /dev/null @@ -1,40 +0,0 @@ -# -# Copyright (c) Contributors to the Open 3D Engine Project. -# For complete copyright and license terms please see the LICENSE at the root of this distribution. -# -# SPDX-License-Identifier: Apache-2.0 OR MIT -# -# -''' -Generates a 50% lod for the selected model - -@argument name="Lod Percentage", type="string", default="50.0f" -''' - -import sys -import time - -percentage = float(sys.argv[1]) - -selectedcgf = lodtools.getselected() -selectedmaterial = lodtools.getselectedmaterial() - -loadedmodel = lodtools.loadcgf(selectedcgf) -loadedmaterial = lodtools.loadmaterial(selectedmaterial) - -if loadedmodel == True and loadedmaterial == True: - lodtools.generatelodchain() - finished = 0.0 - while finished >= 0.0: - finished = lodtools.generatetick() - print 'Lod Chain Generation progress: ' + str(finished) - time.sleep(1) - if finished == 1.0: - break - - lodtools.createlod(1,percentage) - lodtools.generatematerials(1,512,512) - lodtools.savetextures(1) - lodtools.savesettings() - lodtools.reloadmodel() - diff --git a/Assets/Editor/Scripts/lua_symbols.py b/Assets/Editor/Scripts/lua_symbols.py deleted file mode 100644 index b21edb41d0..0000000000 --- a/Assets/Editor/Scripts/lua_symbols.py +++ /dev/null @@ -1,116 +0,0 @@ -# -# Copyright (c) Contributors to the Open 3D Engine Project. -# For complete copyright and license terms please see the LICENSE at the root of this distribution. -# -# SPDX-License-Identifier: Apache-2.0 OR MIT -# -# - - -# This script shows basic usage of LuaSymbolsReporterBus, -# Which can be used to report all symbols available for -# game scripting with Lua. - -import sys -import os - -import azlmbr.bus as azbus -import azlmbr.script as azscript -import azlmbr.legacy.general as azgeneral - - -def _dump_class_symbol(class_symbol: azlmbr.script.LuaClassSymbol): - print(f"** {class_symbol}") - print("Properties:") - for property_symbol in class_symbol.properties: - print(f" - {property_symbol}") - print("Methods:") - for method_symbol in class_symbol.methods: - print(f" - {method_symbol}") - - -def _dump_lua_classes(): - class_symbols = azscript.LuaSymbolsReporterBus(azbus.Broadcast, - "GetListOfClasses") - print("======== Classes ==========") - sorted_classes_by_named = sorted(class_symbols, key=lambda class_symbol: class_symbol.name) - for class_symbol in sorted_classes_by_named: - _dump_class_symbol(class_symbol) - print("\n\n") - - -def _dump_lua_globals(): - global_properties = azscript.LuaSymbolsReporterBus(azbus.Broadcast, - "GetListOfGlobalProperties") - print("======== Global Properties ==========") - sorted_properties_by_name = sorted(global_properties, key=lambda symbol: symbol.name) - for property_symbol in sorted_properties_by_name: - print(f"- {property_symbol}") - print("\n\n") - global_functions = azscript.LuaSymbolsReporterBus(azbus.Broadcast, - "GetListOfGlobalFunctions") - print("======== Global Functions ==========") - sorted_functions_by_name = sorted(global_functions, key=lambda symbol: symbol.name) - for function_symbol in sorted_functions_by_name: - print(f"- {function_symbol}") - print("\n\n") - - -def _dump_lua_ebus(ebus_symbol: azlmbr.script.LuaEBusSymbol): - print(f">> {ebus_symbol}") - sorted_senders = sorted(ebus_symbol.senders, key=lambda symbol: symbol.name) - for sender in sorted_senders: - print(f" - {sender}") - print("\n") - - -def _dump_lua_ebuses(): - ebuses = azscript.LuaSymbolsReporterBus(azbus.Broadcast, - "GetListOfEBuses") - print("======== Ebus List ==========") - sorted_ebuses_by_name = sorted(ebuses, key=lambda symbol: symbol.name) - for ebus_symbol in sorted_ebuses_by_name: - _dump_lua_ebus(ebus_symbol) - print("\n\n") - - -class WhatToDo: - DumpClasses = "c" - DumpGlobals = "g" - DumpEBuses = "e" - -if __name__ == "__main__": - redirecting_stdout = False - orig_stdout = sys.stdout - if len(sys.argv) > 1: - output_file_name = sys.argv[1] - if not os.path.isabs(output_file_name): - game_root_path = os.path.normpath(azgeneral.get_game_folder()) - output_file_name = os.path.join(game_root_path, output_file_name) - try: - file_obj = open(output_file_name, 'wt') - sys.stdout = file_obj - redirecting_stdout = True - except Exception as e: - print(f"Failed to open {output_file_name}: {e}") - sys.exit(-1) - - what_to_do = [action.lower() for action in sys.argv[2:]] - - # If the user did not specify what to do, then let's dump - # all the symbols. - if len(what_to_do) < 1: - what_to_do = [WhatToDo.DumpClasses, WhatToDo.DumpGlobals, WhatToDo.DumpEBuses] - - for action in what_to_do: - if action == WhatToDo.DumpClasses: - _dump_lua_classes() - elif action == WhatToDo.DumpGlobals: - _dump_lua_globals() - elif action == WhatToDo.DumpEBuses: - _dump_lua_ebuses() - - if redirecting_stdout: - sys.stdout.close() - sys.stdout = orig_stdout - print(f" Lua Symbols Are available in: {output_file_name}") diff --git a/Assets/Editor/Scripts/rename_cgf.py b/Assets/Editor/Scripts/rename_cgf.py deleted file mode 100755 index 1196c4c6a2..0000000000 --- a/Assets/Editor/Scripts/rename_cgf.py +++ /dev/null @@ -1,14 +0,0 @@ -# -# Copyright (c) Contributors to the Open 3D Engine Project. -# For complete copyright and license terms please see the LICENSE at the root of this distribution. -# -# SPDX-License-Identifier: Apache-2.0 OR MIT -# -# -objects = general.get_all_objects("", "") # Get the name list of all objects in the level. -# If there is any object with the geometry file of "objects\\default\\primitive_box.cgf", -# change it to "objects\\default\\primitive_cube.cgf". -for obj in objects: - geometry_file = general.get_entity_geometry_file(obj) - if geometry_file == "objects\\default\\primitive_box.cgf": - general.set_entity_geometry_file(obj, "objects\\default\\primitive_cube.cgf") diff --git a/Assets/Editor/Scripts/select_story_anim_objects.py b/Assets/Editor/Scripts/select_story_anim_objects.py deleted file mode 100755 index 93021baac4..0000000000 --- a/Assets/Editor/Scripts/select_story_anim_objects.py +++ /dev/null @@ -1,14 +0,0 @@ -# -# Copyright (c) Contributors to the Open 3D Engine Project. -# For complete copyright and license terms please see the LICENSE at the root of this distribution. -# -# SPDX-License-Identifier: Apache-2.0 OR MIT -# -# -objects = general.get_all_objects("AnimObject", "") # Get the name list of all anim objects in the level. -general.clear_selection() -# If there is any object with the geometry file whose name contains "\\story\\", select it -for obj in objects: - geometry_file = general.get_entity_geometry_file(obj) - if geometry_file.find("\\story\\") != -1: - general.select_object(obj) diff --git a/Assets/Editor/Scripts/tools_shelf_actions.py b/Assets/Editor/Scripts/tools_shelf_actions.py deleted file mode 100755 index 8b99d76e1f..0000000000 --- a/Assets/Editor/Scripts/tools_shelf_actions.py +++ /dev/null @@ -1,508 +0,0 @@ -# -# Copyright (c) Contributors to the Open 3D Engine Project. -# For complete copyright and license terms please see the LICENSE at the root of this distribution. -# -# SPDX-License-Identifier: Apache-2.0 OR MIT -# -# -import __future__ -import time, re, os, sys, itertools, ast -import azlmbr.legacy.general as general - -global ctrlFile -ctrlFile = 'setState.txt' -global logfile -logfile = 'Editor.log' - -global HIDDEN_MASK_PREFIX -HIDDEN_MASK_PREFIX= 'hidden_mask_for_' -global HIDDEN_MASK_PREFIX_LENGTH -HIDDEN_MASK_PREFIX_LENGTH = len(HIDDEN_MASK_PREFIX) - -def getLogList(logfile): - logList = [x for x in open(logfile, 'r')] - return logList - -def getCheckList(ctrlFile): - try: - with open(ctrlFile): - stateList = open(ctrlFile, 'r') - - except: - open(ctrlFile, 'w').close() - stateList = open(ctrlFile, 'r') - - checkList = [x for x in stateList] - return checkList - -#Store/Restore CVars default values -----------------------------------------------------------------# -if 'CVARS' not in globals(): - CVARS = {} - -def saveDefaultValue(cVars, value): - if cVars not in CVARS: - CVARS[cVars] = value - -def restoreDefaultValue(cVars): - if cVars not in CVARS: - return - - defaultValue = CVARS[cVars] - del CVARS[cVars] - if cVars.startswith(HIDDEN_MASK_PREFIX): - type = cVars[HIDDEN_MASK_PREFIX_LENGTH:] - general.set_hidemask(type, defaultValue) - else: - general.set_cvar(cVars, defaultValue) - -#toggle CVars--------------------------------------------------------------------# - -def updateCvars(cVars, value): - saveDefaultValue(cVars, value) - general.set_cvar(cVars, value) - -def toggleCvarsRestartCheck(log, state, mode, cVars, onValue, offValue, ctrlFile): - if log in state: - toggleCvarsV(mode, cVars, onValue, offValue, ctrlFile) - else: - stateList = open(ctrlFile, 'w') - stateList.write(log) - stateList = open(ctrlFile, 'r') - toggleCvarsV(mode, cVars, onValue, offValue, ctrlFile) - -def toggleCvarsV(mode, cVars, onValue, offValue, ctrlFile): - stateList = open(ctrlFile, 'r') - setState = [x for x in enumerate(stateList)] - blankCheck = [x for x in setState] - getList = [x for x in stateList] - - if blankCheck == []: - stateList = open(ctrlFile, 'w') - stateList.write(''.join(str("%s,{'%s': %s}" % (mode, cVars, offValue))+'\n')) - general.set_cvar(cVars, offValue) - else: - stateList = open(ctrlFile, 'r') - checkFor = str([x for x in stateList]) - - if mode not in str(checkFor): - stateList = open(ctrlFile, 'r') - getList = [x for x in stateList] - getList.insert(1, str("%s,{'%s': %s}\n" % (mode, cVars , offValue))) - print (str("{'%s': %s}\n" % (cVars , offValue))) - stateList = open(ctrlFile, 'w') - stateList.write(''.join(getList)) - general.set_cvar(cVars, offValue) - - else: - stateList = open(ctrlFile, 'r') - for d in enumerate(stateList): - values = d[1].split(',') - stateList = open(ctrlFile, 'r') - getList = [x for x in stateList] - - if mode in values[0]: - getDict = ast.literal_eval(values[1]) - getState = getDict.get(cVars) - - if getState == offValue: - getDict[cVars] = onValue - joinStr = [mode,",",str(getDict), '\n'] - newLine = ''.join(joinStr) - print (getDict) - getList[d[0]] = newLine - stateList = open(ctrlFile, 'w') - stateList.write(''.join(str(''.join(getList)))) - general.set_cvar(cVars, onValue) - else: - getDict[cVars] = offValue - joinStr = [mode,",",str(getDict), '\n'] - newLine = ''.join(joinStr) - print (getDict) - getList[d[0]] = newLine - stateList = open(ctrlFile, 'w') - stateList.write(''.join(str(''.join(getList)))) - general.set_cvar(cVars, offValue) - -def toggleCvarsValue(mode, cVars, onValue, offValue): - currentValue = general.get_cvar(cVars) - - if type(onValue) is str: - saveDefaultValue(cVars, currentValue) - elif type(onValue) is int: - saveDefaultValue(cVars, int(currentValue)) - elif type(onValue) is float: - saveDefaultValue(cVars, float(currentValue)) - else: - general.log('Failed to store default value for {0}'.format(cVars)) - - if currentValue == str(onValue): - general.set_cvar(cVars, offValue) - else: - general.set_cvar(cVars, onValue) - -#toggleConsol--------------------------------------------------------------------# - -def toggleConsolRestartCheck(log,state, mode, onValue, offValue, ctrlFile): - if log in state: - toggleConsolV(mode, onValue, offValue, ctrlFile) - else: - stateList = open(ctrlFile, 'w') - stateList.write(log) - stateList = open(ctrlFile, 'r') - toggleConsolV(mode, onValue, offValue, ctrlFile) - -def toggleConsolV(mode, onValue, offValue): - stateList = open(ctrlFile, 'r') - setState = [x for x in enumerate(stateList)] - blankCheck = [x for x in setState] - getList = [x for x in stateList] - onOffList = [onValue, offValue] - - if blankCheck == []: - stateList = open(ctrlFile, 'w') - stateList.write(''.join(str("%s,'%s'" % (mode, offValue))+'\n')) - general.run_console(offValue) - else: - stateList = open(ctrlFile, 'r') - checkFor = str([x for x in stateList]) - - if mode not in str(checkFor): - stateList = open(ctrlFile, 'r') - getList = [x for x in stateList] - getList.insert(1, str("%s,'%s'\n" % (mode, offValue))) - print (str("{'%s': %s}\n" % (cVars , offValue))) - stateList = open(ctrlFile, 'w') - stateList.write(''.join(getList)) - general.run_console(onValue) - - else: - stateList = open(ctrlFile, 'r') - for d in enumerate(stateList): - - values = d[1].split(',') - - stateList = open(ctrlFile, 'r') - getList = [x for x in stateList] - - if mode in values[0]: - getDict = values[1] - off = ["'",str(offValue),"'", '\n'] - joinoff = ''.join(off) - - if values[1] == joinoff: - getDict = onValue - joinStr = [mode,",","'",getDict,"'", '\n'] - newLine = ''.join(joinStr) - print (getDict) - getList[d[0]] = str(newLine) - stateList = open(ctrlFile, 'w') - stateList.write(''.join(str(''.join(getList)))) - general.run_console(onValue) - else: - getDict = offValue - joinStr = [mode,",","'",getDict,"'", '\n'] - newLine = ''.join(joinStr) - print (getDict) - getList[d[0]] = str(newLine) - stateList = open(ctrlFile, 'w') - stateList.write(''.join(str(''.join(getList)))) - general.run_console(offValue) - -def toggleConsolValue(log, state, mode, onValue, offValue): - logList = getLogList(logfile) - checkList = getCheckList(ctrlFile) - toggleConsolRestartCheck(logList[1],checkList, mode, onValue, offValue, ctrlFile) - -#cycleCvars----------------------------------------------------------------------# - -def cycleCvarsRestartCheck(log, state, mode, cVars, cycleList, ctrlFile): - if log in state: - cycleCvarsV(mode, cVars, cycleList, ctrlFile) - else: - stateList = open(ctrlFile, 'w') - stateList.write(log) - stateList = open(ctrlFile, 'r') - cycleCvarsV(mode, cVars, cycleList, ctrlFile) - -def cycleCvarsV(mode, cVars, cycleList, ctrlFile): - stateList = open(ctrlFile, 'r') - setState = [x for x in enumerate(stateList)] - blankCheck = [x for x in setState] - getList = [x for x in stateList] - - if blankCheck == []: - stateList = open(ctrlFile, 'w') - stateList.write(''.join(str("%s,{'%s': %s}" % (mode, cVars, cycleList[1]))+'\n')) - general.set_cvar(cVars, cycleList[1]) - else: - stateList = open(ctrlFile, 'r') - checkFor = str([x for x in stateList]) - - if mode not in str(checkFor): - stateList = open(ctrlFile, 'r') - getList = [x for x in stateList] - getList.insert(1, str("%s,{'%s': %s}\n" % (mode, cVars , cycleList[1]))) - stateList = open(ctrlFile, 'w') - stateList.write(''.join(getList)) - general.set_cvar(cVars, cycleList[1]) - - else: - stateList = open(ctrlFile, 'r') - - for d in enumerate(stateList): - stateList = open(ctrlFile, 'r') - getList = [x for x in stateList] - values = d[1].split(',') - - if mode in values[0]: - getDict = ast.literal_eval(values[1]) - getState = getDict.get(cVars) - - cycleL = [x for x in enumerate(cycleList)] - - for x in cycleL: - if getState == x[1]: - number = [n[1] for n in cycleL] - getMax = max(number) - nextNum = x[0]+1 - - if nextNum > getMax: - getDict[cVars] = cycleList[0] - joinStr = [mode,",",str(getDict), '\n'] - newLine = ''.join(joinStr) - getList[d[0]] = newLine - print (getDict) - stateList = open(ctrlFile, 'w') - stateList.write(''.join(str(''.join(getList)))) - general.set_cvar(cVars, cycleList[0]) - else: - getDict[cVars] = cycleList[x[0]+1] - joinStr = [mode,",",str(getDict), '\n'] - newLine = ''.join(joinStr) - getList[d[0]] = newLine - print (getDict) - stateList = open(ctrlFile, 'w') - stateList.write(''.join(str(''.join(getList)))) - general.set_cvar(cVars, cycleList[x[0]+1]) - -def cycleCvarsValue(log, state, mode, cVars, cycleList): - logList = getLogList(logfile) - checkList = getCheckList(ctrlFile) - cycleCvarsRestartCheck(logList[1],checkList, mode, cVars, cycleList, ctrlFile) - -def cycleCvarsFloatValue(cVars, cycleList): - currentValueAsString = general.get_cvar(cVars) - try: - currentValue = float(currentValueAsString) - except: - currentValue = -1.0 - - saveDefaultValue(cVars, currentValue) - - # make sure we sort the list in ascending fashion - cycleList = sorted(cycleList) - - # find out what the next closest index is - newIndex = 0 - for x in cycleList: - if (currentValue < x): - break - newIndex = newIndex + 1 - - # loop around, if we need to - if newIndex >= len(cycleList): - newIndex = 0 - - general.set_cvar(cVars, cycleList[newIndex]) - - -def cycleCvarsIntValue(cVars, cycleList): - currentValueAsString = general.get_cvar(cVars) - try: - currentValue = int(currentValueAsString) - except: - currentValue = 0 - - saveDefaultValue(cVars, currentValue) - - # find out what index we're on already - # default to -1 so that when we increment to the next, we'll be at 0 - newIndex = -1 - for x in cycleList: - if (currentValue == x): - break - newIndex = newIndex + 1 - - # move to the next item - newIndex = newIndex + 1 - - # validate - if newIndex >= len(cycleList): - newIndex = 0 - - general.set_cvar(cVars, cycleList[newIndex]) - -#cycleConsol----------------------------------------------------------------------# - -def cycleConsolRestartCheck(log, state, mode, cycleList, ctrlFile): - if log in state: - cycleConsolV(mode, cycleList, ctrlFile) - else: - stateList = open(ctrlFile, 'w') - stateList.write(log) - stateList = open(ctrlFile, 'r') - cycleConsolV(mode, cycleList, ctrlFile) - -def cycleConsolV(mode, cycleList, ctrlFile): - stateList = open(ctrlFile, 'r') - setState = [x for x in enumerate(stateList)] - blankCheck = [x for x in setState] - getList = [x for x in stateList] - - if blankCheck == []: - stateList = open(ctrlFile, 'w') - stateList.write(''.join(str("%s,'%s'" % (mode, cycleList[0]))+'\n')) - general.run_console(cycleList[0]) - else: - stateList = open(ctrlFile, 'r') - checkFor = str([x for x in stateList]) - - if mode not in str(checkFor): - stateList = open(ctrlFile, 'r') - getList = [x for x in stateList] - getList.insert(1, str("%s,'%s'\n" % (mode, cycleList[0]))) - stateList = open(ctrlFile, 'w') - stateList.write(''.join(getList)) - general.run_console(cycleList[0]) - - else: - stateList = open(ctrlFile, 'r') - for d in enumerate(stateList): - stateList = open(ctrlFile, 'r') - getList = [x for x in stateList] - values = d[1].split(',') - - if mode in values[0]: - newValue = ''.join(values[1].split('\n')) - cycleL = [e for e in enumerate(cycleList)] - getDict = ''.join(values[1].split('\n')) - - for x in cycleL: - - if newValue in "'%s'" % x[1]: - number = [n[0] for n in cycleL] - getMax = max(number) - nextNum = x[0]+1 - - if nextNum > getMax: - getDict = '%s' % cycleList[0] - joinStr = [mode,",","'",getDict,"'", '\n'] - newLine = ''.join(joinStr) - getList[d[0]] = newLine - print (getDict) - stateList = open(ctrlFile, 'w') - stateList.write(''.join(str(''.join(getList)))) - general.run_console(getDict) - else: - getDict = '%s' % cycleList[x[0]+1] - joinStr = [mode,",","'",getDict,"'", '\n'] - newLine = ''.join(joinStr) - getList[d[0]] = newLine - print (getDict) - stateList = open(ctrlFile, 'w') - stateList.write(''.join(str(''.join(getList)))) - general.run_console(getDict) - -def cycleConsolValue(mode, cycleList): - logList = getLogList(logfile) - checkList = getCheckList(ctrlFile) - cycleConsolRestartCheck(logList[1],checkList, mode, cycleList, ctrlFile) - -def toggleHideMaskValues(type): - cVars = "%s%s" % (HIDDEN_MASK_PREFIX, type) - currentValue = general.get_hidemask(type) - saveDefaultValue(cVars, int(currentValue)) - if (currentValue): - general.set_hidemask(type, 0) - else: - general.set_hidemask(type, 1) - -#toggleHide------------------------------------------------------------------------# - -def toggleHideRestartCheck(log, state, mode, type, onValue, offValue, ctrlFile): - if log in state: - toggleHideByT(mode, type, onValue, offValue, ctrlFile) - else: - stateList = open(ctrlFile, 'w') - stateList.write(log) - stateList = open(ctrlFile, 'r') - toggleHideByT(mode, type, onValue, offValue, ctrlFile) - -def toggleHideByType(mode, type, onValue, offValue): - logList = getLogList(logfile) - checkList = getCheckList(ctrlFile) - toggleHideRestartCheck(logList[1],checkList, mode, type, onValue, offValue, ctrlFile) - -def toggleHideByT(mode, type, onValue, offValue, ctrlFile): - stateList = open(ctrlFile, 'r') - setState = [x for x in enumerate(stateList)] - blankCheck = [x for x in setState] - getList = [x for x in stateList] - - if blankCheck == []: - stateList = open(ctrlFile, 'w') - stateList.write(''.join(str("%s,{'%s': %s}" % (mode, type, offValue))+'\n')) - - hideByType(type) - else: - stateList = open(ctrlFile, 'r') - checkFor = str([x for x in stateList]) - - if mode not in str(checkFor): - stateList = open(ctrlFile, 'r') - getList = [x for x in stateList] - getList.insert(1, str("%s,{'%s': %s}\n" % (mode, type , offValue))) - print (str("{'%s': %s}\n" % (type , offValue))) - stateList = open(ctrlFile, 'w') - stateList.write(''.join(getList)) - hideByType(type) - - else: - stateList = open(ctrlFile, 'r') - for d in enumerate(stateList): - values = d[1].split(',') - stateList = open(ctrlFile, 'r') - getList = [x for x in stateList] - - if mode in values[0]: - getDict = ast.literal_eval(values[1]) - getState = getDict.get(type) - - if getState == offValue: - getDict[type] = onValue - joinStr = [mode,",",str(getDict), '\n'] - newLine = ''.join(joinStr) - print (getDict) - getList[d[0]] = newLine - stateList = open(ctrlFile, 'w') - stateList.write(''.join(str(''.join(getList)))) - unHideByType(type) - else: - getDict[type] = offValue - joinStr = [mode,",",str(getDict), '\n'] - newLine = ''.join(joinStr) - print (getDict) - getList[d[0]] = newLine - stateList = open(ctrlFile, 'w') - stateList.write(''.join(str(''.join(getList)))) - hideByType(type) - -def hideByType(type): - typeList = general.get_all_objects(str(type), "") - for x in typeList: - general.hide_object(x) - -def unHideByType(type): - typeList = general.get_all_objects(str(type), "") - for x in typeList: - general.unhide_object(x) diff --git a/Assets/Editor/Translation/scriptcanvas_en_us.ts b/Assets/Editor/Translation/scriptcanvas_en_us.ts index 7b8361c879..6d436b7caf 100644 --- a/Assets/Editor/Translation/scriptcanvas_en_us.ts +++ b/Assets/Editor/Translation/scriptcanvas_en_us.ts @@ -62164,7 +62164,7 @@ An Entity can be selected by using the pick button, or by dragging an Entity fro HANDLER_TAGGLOBALNOTIFICATIONBUS_ONENTITYTAGADDED_OUTPUT0_NAME Simple Type: EntityID C++ Type: const EntityId& - Entity + EntityID HANDLER_TAGGLOBALNOTIFICATIONBUS_ONENTITYTAGADDED_OUTPUT0_TOOLTIP @@ -62202,7 +62202,7 @@ An Entity can be selected by using the pick button, or by dragging an Entity fro HANDLER_TAGGLOBALNOTIFICATIONBUS_ONENTITYTAGREMOVED_OUTPUT0_NAME Simple Type: EntityID C++ Type: const EntityId& - Entity + EntityId HANDLER_TAGGLOBALNOTIFICATIONBUS_ONENTITYTAGREMOVED_OUTPUT0_TOOLTIP @@ -81852,7 +81852,7 @@ The element is removed from its current parent and added as a child of the new p HANDLER_SPAWNERCOMPONENTNOTIFICATIONBUS_ONENTITYSPAWNED_OUTPUT1_NAME Simple Type: EntityID C++ Type: const EntityId& - Entity + EntityID HANDLER_SPAWNERCOMPONENTNOTIFICATIONBUS_ONENTITYSPAWNED_OUTPUT1_TOOLTIP @@ -89198,7 +89198,7 @@ The element is removed from its current parent and added as a child of the new p HANDLER_ENTITYBUS_ONENTITYACTIVATED_OUTPUT0_NAME Simple Type: EntityID C++ Type: const EntityId& - Entity + EntityID HANDLER_ENTITYBUS_ONENTITYACTIVATED_OUTPUT0_TOOLTIP @@ -89236,7 +89236,7 @@ The element is removed from its current parent and added as a child of the new p HANDLER_ENTITYBUS_ONENTITYDEACTIVATED_OUTPUT0_NAME Simple Type: EntityID C++ Type: const EntityId& - Entity + EntityID HANDLER_ENTITYBUS_ONENTITYDEACTIVATED_OUTPUT0_TOOLTIP diff --git a/Assets/Engine/EngineAssets/Slices/DefaultLevelSetup.slice b/Assets/Engine/EngineAssets/Slices/DefaultLevelSetup.slice index 1b7dfdf40d..b82c482c4f 100644 --- a/Assets/Engine/EngineAssets/Slices/DefaultLevelSetup.slice +++ b/Assets/Engine/EngineAssets/Slices/DefaultLevelSetup.slice @@ -145,7 +145,7 @@ - + diff --git a/Assets/Engine/Entities/GeomCache.ent b/Assets/Engine/Entities/GeomCache.ent deleted file mode 100644 index e7a63190c3..0000000000 --- a/Assets/Engine/Entities/GeomCache.ent +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:cf441215a769562f88aa20711aee68dadcbf02597d1e2270547055e8e6aec6a3 -size 77 diff --git a/Assets/Engine/Scripts/Entities/Render/GeomCache.lua b/Assets/Engine/Scripts/Entities/Render/GeomCache.lua deleted file mode 100644 index b496aecd8d..0000000000 --- a/Assets/Engine/Scripts/Entities/Render/GeomCache.lua +++ /dev/null @@ -1,178 +0,0 @@ ----------------------------------------------------------------------------------------------------- --- --- Copyright (c) Contributors to the Open 3D Engine Project. --- For complete copyright and license terms please see the LICENSE at the root of this distribution. --- --- SPDX-License-Identifier: Apache-2.0 OR MIT --- --- --- ----------------------------------------------------------------------------------------------------- -Script.ReloadScript("scripts/Utils/EntityUtils.lua") - -GeomCache = -{ - Properties = { - geomcacheFile = "EngineAssets/GeomCaches/defaultGeomCache.cax", - bPlaying = 0, - fStartTime = 0, - bLooping = 0, - objectStandIn = "", - materialStandInMaterial = "", - objectFirstFrameStandIn = "", - materialFirstFrameStandInMaterial = "", - objectLastFrameStandIn = "", - materialLastFrameStandInMaterial = "", - fStandInDistance = 0, - fStreamInDistance = 0, - Physics = { - bPhysicalize = 0, - } - }, - - Editor={ - Icon = "animobject.bmp", - IconOnTop = 1, - }, - - bPlaying = 0, - currentTime = 0, - precacheTime = 0, - bPrecachedOutputTriggered = false, -} - -function GeomCache:OnLoad(table) - self.currentTime = table.currentTime; -end - -function GeomCache:OnSave(table) - table.currentTime = self.currentTime; -end - -function GeomCache:OnSpawn() - self.currentTime = self.Properties.fStartTime; - self:SetFromProperties(); -end - -function GeomCache:OnReset() - self.currentTime = self.Properties.fStartTime; - self.bPrecachedOutputTriggered = true; - self:SetFromProperties(); -end - -function GeomCache:SetFromProperties() - local Properties = self.Properties; - - if (Properties.geomcacheFile == "") then - do return end; - end - - self:LoadGeomCache(0, Properties.geomcacheFile); - - self.bPlaying = Properties.bPlaying; - if (self.bPlaying == 0) then - self.currentTime = Properties.fStartTime; - end - - self:SetGeomCachePlaybackTime(self.currentTime); - self:SetGeomCacheParams(Properties.bLooping, Properties.objectStandIn, Properties.materialStandInMaterial, Properties.objectFirstFrameStandIn, - Properties.materialFirstFrameStandInMaterial, Properties.objectLastFrameStandIn, Properties.materialLastFrameStandInMaterial, - Properties.fStandInDistance, Properties.fStreamInDistance); - self:SetGeomCacheStreaming(false, 0); - - if (Properties.Physics.bPhysicalize == 1) then - local tempPhysParams = EntityCommon.TempPhysParams; - self:Physicalize(0, PE_ARTICULATED, tempPhysParams); - end - - self:Activate(1); -end - -function GeomCache:PhysicalizeThis() - local Physics = self.Properties.Physics; - EntityCommon.PhysicalizeRigid(self, 0, Physics, false); -end - -function GeomCache:OnUpdate(dt) - if (self.bPlaying == 1) then - self:SetGeomCachePlaybackTime(self.currentTime); - end - - if (self:IsGeomCacheStreaming() and not self.bPrecachedOutputTriggered) then - local precachedTime = self:GetGeomCachePrecachedTime(); - if (precachedTime >= self.precacheTime) then - self:ActivateOutput("Precached", true); - self.bPrecachedOutputTriggered = true; - end - end - - if (self.bPlaying == 1) then - self.currentTime = self.currentTime + dt; - end -end - -function GeomCache:OnPropertyChange() - self:SetFromProperties(); -end - -function GeomCache:Event_Start(sender, val) - self.bPlaying = 1; -end - -function GeomCache:Event_Stop(sender, value) - self.bPlaying = 0; -end - -function GeomCache:Event_SetTime(sender, value) - self.currentTime = value; -end - -function GeomCache:Event_StartStreaming(sender, value) - self.bPrecachedOutputTriggered = false; - self:SetGeomCacheStreaming(true, self.currentTime); -end - -function GeomCache:Event_StopStreaming(sender, value) - self:SetGeomCacheStreaming(false, 0); -end - -function GeomCache:Event_PrecacheTime(sender, value) - self.precacheTime = value; -end - -function GeomCache:Event_Hide(sender, value) - self:Hide(1); -end - -function GeomCache:Event_Unhide(sender, value) - self:Hide(0); -end - -function GeomCache:Event_StopDrawing(sender, value) - self:SetGeomCacheDrawing(false); -end - -function GeomCache:Event_StartDrawing(sender, value) - self:SetGeomCacheDrawing(true); -end - -GeomCache.FlowEvents = -{ - Inputs = - { - Start = { GeomCache.Event_Start, "any" }, - Stop = { GeomCache.Event_Stop, "any" }, - SetTime = { GeomCache.Event_SetTime, "float" }, - StartStreaming = { GeomCache.Event_StartStreaming, "any" }, - StopStreaming = { GeomCache.Event_StopStreaming, "any" }, - PrecacheTime = { GeomCache.Event_PrecacheTime, "float" }, - Hide = { GeomCache.Event_Hide, "any" }, - Unhide = { GeomCache.Event_Unhide, "any" }, - StopDrawing = { GeomCache.Event_StopDrawing, "any" }, - StartDrawing = { GeomCache.Event_StartDrawing, "any" }, - }, - Outputs = - { - Precached = "bool", - }, -} diff --git a/AutomatedTesting/Assets/Physics/Collider_PxMeshAutoAssigned/SphereBot/r0-b_body.fbx.assetinfo b/AutomatedTesting/Assets/Physics/Collider_PxMeshAutoAssigned/SphereBot/R0-B_Body.fbx.assetinfo similarity index 100% rename from AutomatedTesting/Assets/Physics/Collider_PxMeshAutoAssigned/SphereBot/r0-b_body.fbx.assetinfo rename to AutomatedTesting/Assets/Physics/Collider_PxMeshAutoAssigned/SphereBot/R0-B_Body.fbx.assetinfo diff --git a/AutomatedTesting/Assets/Physics/Collider_PxMeshConvexMeshCollides/SphereBot/r0-b_body.fbx.assetinfo b/AutomatedTesting/Assets/Physics/Collider_PxMeshConvexMeshCollides/SphereBot/R0-B_Body.fbx.assetinfo similarity index 100% rename from AutomatedTesting/Assets/Physics/Collider_PxMeshConvexMeshCollides/SphereBot/r0-b_body.fbx.assetinfo rename to AutomatedTesting/Assets/Physics/Collider_PxMeshConvexMeshCollides/SphereBot/R0-B_Body.fbx.assetinfo diff --git a/AutomatedTesting/Assets/Prefabs/PinkFlower.prefab b/AutomatedTesting/Assets/Prefabs/PinkFlower.prefab new file mode 100644 index 0000000000..47dd6bc8d3 --- /dev/null +++ b/AutomatedTesting/Assets/Prefabs/PinkFlower.prefab @@ -0,0 +1,131 @@ +{ + "ContainerEntity": { + "Id": "ContainerEntity", + "Name": "PinkFlower", + "Components": { + "Component_[10444337162843472597]": { + "$type": "EditorLockComponent", + "Id": 10444337162843472597 + }, + "Component_[14431042590323756177]": { + "$type": "EditorEntitySortComponent", + "Id": 14431042590323756177, + "ChildEntityOrderEntryArray": [ + { + "EntityId": "Entity_[491002114939]" + } + ] + }, + "Component_[14577735453176806353]": { + "$type": "EditorDisabledCompositionComponent", + "Id": 14577735453176806353 + }, + "Component_[15674021346798629563]": { + "$type": "EditorInspectorComponent", + "Id": 15674021346798629563 + }, + "Component_[16784074985702513600]": { + "$type": "{27F1E1A1-8D9D-4C3B-BD3A-AFB9762449C0} TransformComponent", + "Id": 16784074985702513600, + "Parent Entity": "" + }, + "Component_[3351614541100572773]": { + "$type": "EditorOnlyEntityComponent", + "Id": 3351614541100572773 + }, + "Component_[3600658560328167663]": { + "$type": "EditorPrefabComponent", + "Id": 3600658560328167663 + }, + "Component_[6155673728651558934]": { + "$type": "EditorEntityIconComponent", + "Id": 6155673728651558934 + }, + "Component_[8458684662170321289]": { + "$type": "EditorVisibilityComponent", + "Id": 8458684662170321289 + }, + "Component_[8705192117416252351]": { + "$type": "SelectionComponent", + "Id": 8705192117416252351 + }, + "Component_[8801280051488695852]": { + "$type": "EditorPendingCompositionComponent", + "Id": 8801280051488695852 + } + } + }, + "Entities": { + "Entity_[491002114939]": { + "Id": "Entity_[491002114939]", + "Name": "PinkFlower", + "Components": { + "Component_[11083205340162142682]": { + "$type": "EditorLockComponent", + "Id": 11083205340162142682 + }, + "Component_[11327363779873517]": { + "$type": "EditorOnlyEntityComponent", + "Id": 11327363779873517 + }, + "Component_[12717389211269537921]": { + "$type": "EditorEntitySortComponent", + "Id": 12717389211269537921 + }, + "Component_[12826285685970138542]": { + "$type": "AZ::Render::EditorMeshComponent", + "Id": 12826285685970138542, + "Controller": { + "Configuration": { + "ModelAsset": { + "assetId": { + "guid": "{549F4C4D-A7D9-5F2A-A6BD-F24C8BC43BBF}", + "subId": 280086017 + }, + "assetHint": "assets/objects/foliage/grass_flower_pink.azmodel" + } + } + } + }, + "Component_[14101419970865342875]": { + "$type": "EditorPendingCompositionComponent", + "Id": 14101419970865342875 + }, + "Component_[14770464075286403207]": { + "$type": "EditorVisibilityComponent", + "Id": 14770464075286403207 + }, + "Component_[15205142653091190082]": { + "$type": "{27F1E1A1-8D9D-4C3B-BD3A-AFB9762449C0} TransformComponent", + "Id": 15205142653091190082, + "Parent Entity": "ContainerEntity" + }, + "Component_[15510898811147803772]": { + "$type": "EditorInspectorComponent", + "Id": 15510898811147803772, + "ComponentOrderEntryArray": [ + { + "ComponentId": 15205142653091190082 + }, + { + "ComponentId": 12826285685970138542, + "SortIndex": 1 + } + ] + }, + "Component_[15988401742428977134]": { + "$type": "EditorDisabledCompositionComponent", + "Id": 15988401742428977134 + }, + "Component_[4300550837037679336]": { + "$type": "EditorEntityIconComponent", + "Id": 4300550837037679336 + }, + "Component_[996914988793716659]": { + "$type": "SelectionComponent", + "Id": 996914988793716659 + } + } + } + } +} \ No newline at end of file diff --git a/AutomatedTesting/Assets/TestAnim/Test_Jack_Death_Fall_Back_ZUp.fbx b/AutomatedTesting/Assets/TestAnim/Test_Jack_Death_Fall_Back_ZUp.fbx new file mode 100644 index 0000000000..c9df6bfcc1 --- /dev/null +++ b/AutomatedTesting/Assets/TestAnim/Test_Jack_Death_Fall_Back_ZUp.fbx @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:4c1d04d687bdce69965965c290c907b3f9a730a7ea73874b734e1c7ff41426d9 +size 3832768 diff --git a/AutomatedTesting/Assets/TestAnim/rin_skeleton.fbx b/AutomatedTesting/Assets/TestAnim/rin_skeleton.fbx new file mode 100644 index 0000000000..f727c26ad2 --- /dev/null +++ b/AutomatedTesting/Assets/TestAnim/rin_skeleton.fbx @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:27f87510ae07771dbad3e430e31502b1d1d13dee868f143b7f1de2a7febc8eb9 +size 7046400 diff --git a/AutomatedTesting/Assets/TestAnim/rin_skeleton.fbx.assetinfo b/AutomatedTesting/Assets/TestAnim/rin_skeleton.fbx.assetinfo new file mode 100644 index 0000000000..2d5502f42f --- /dev/null +++ b/AutomatedTesting/Assets/TestAnim/rin_skeleton.fbx.assetinfo @@ -0,0 +1,8 @@ +{ + "values": [ + { + "$type": "ScriptProcessorRule", + "scriptFilename": "Assets/TestAnim/scene_export_actor.py" + } + ] +} \ No newline at end of file diff --git a/AutomatedTesting/Assets/TestAnim/scene_export_actor.py b/AutomatedTesting/Assets/TestAnim/scene_export_actor.py new file mode 100644 index 0000000000..9dddc056a2 --- /dev/null +++ b/AutomatedTesting/Assets/TestAnim/scene_export_actor.py @@ -0,0 +1,221 @@ +# +# Copyright (c) Contributors to the Open 3D Engine Project. +# For complete copyright and license terms please see the LICENSE at the root of this distribution. +# +# SPDX-License-Identifier: Apache-2.0 OR MIT +# +# +import traceback, sys, uuid, os, json + +# +# Example for exporting ActorGroup scene rules +# + +def log_exception_traceback(): + exc_type, exc_value, exc_tb = sys.exc_info() + data = traceback.format_exception(exc_type, exc_value, exc_tb) + print(str(data)) + +def get_node_names(sceneGraph, nodeTypeName, testEndPoint = False, validList = None): + import azlmbr.scene.graph + import scene_api.scene_data + + node = sceneGraph.get_root() + nodeList = [] + children = [] + paths = [] + + while node.IsValid(): + # store children to process after siblings + if sceneGraph.has_node_child(node): + children.append(sceneGraph.get_node_child(node)) + + nodeName = scene_api.scene_data.SceneGraphName(sceneGraph.get_node_name(node)) + paths.append(nodeName.get_path()) + + include = True + + if (validList is not None): + include = False # if a valid list filter provided, assume to not include node name + name_parts = nodeName.get_path().split('.') + for valid in validList: + if (valid in name_parts[-1]): + include = True + break + + # store any node that has provides specifc data content + nodeContent = sceneGraph.get_node_content(node) + if include and nodeContent.CastWithTypeName(nodeTypeName): + if testEndPoint is not None: + include = sceneGraph.is_node_end_point(node) is testEndPoint + if include: + if (len(nodeName.get_path())): + nodeList.append(scene_api.scene_data.SceneGraphName(sceneGraph.get_node_name(node))) + + # advance to next node + if sceneGraph.has_node_sibling(node): + node = sceneGraph.get_node_sibling(node) + elif children: + node = children.pop() + else: + node = azlmbr.scene.graph.NodeIndex() + + return nodeList, paths + +def generate_mesh_group(scene, sceneManifest, meshDataList, paths): + # Compute the name of the scene file + clean_filename = scene.sourceFilename.replace('.', '_') + mesh_group_name = os.path.basename(clean_filename) + + # make the mesh group + mesh_group = sceneManifest.add_mesh_group(mesh_group_name) + mesh_group['id'] = '{' + str(uuid.uuid5(uuid.NAMESPACE_DNS, clean_filename)) + '}' + + # add all nodes to this mesh group + for activeMeshIndex in range(len(meshDataList)): + mesh_name = meshDataList[activeMeshIndex] + mesh_path = mesh_name.get_path() + sceneManifest.mesh_group_select_node(mesh_group, mesh_path) + +def create_shape_configuration(nodeName): + import scene_api.physics_data + + if(nodeName in ['_foot_','_wrist_']): + shapeConfiguration = scene_api.physics_data.BoxShapeConfiguration() + shapeConfiguration.scale = [1.1, 1.1, 1.1] + shapeConfiguration.dimensions = [2.1, 3.1, 4.1] + return shapeConfiguration + else: + shapeConfiguration = scene_api.physics_data.CapsuleShapeConfiguration() + shapeConfiguration.scale = [1.0, 1.0, 1.0] + shapeConfiguration.height = 1.0 + shapeConfiguration.radius = 1.0 + return shapeConfiguration + +def create_collider_configuration(nodeName): + import scene_api.physics_data + + colliderConfiguration = scene_api.physics_data.ColliderConfiguration() + colliderConfiguration.Position = [0.1, 0.1, 0.2] + colliderConfiguration.Rotation = [45.0, 35.0, 25.0] + return colliderConfiguration + +def generate_physics_nodes(actorPhysicsSetupRule, nodeNameList): + import scene_api.physics_data + + hitDetectionConfig = scene_api.physics_data.CharacterColliderConfiguration() + simulatedObjectColliderConfig = scene_api.physics_data.CharacterColliderConfiguration() + clothConfig = scene_api.physics_data.CharacterColliderConfiguration() + ragdollConfig = scene_api.physics_data.RagdollConfiguration() + + for nodeName in nodeNameList: + shapeConfiguration = create_shape_configuration(nodeName) + colliderConfiguration = create_collider_configuration(nodeName) + hitDetectionConfig.add_character_collider_node_configuration_node(nodeName, colliderConfiguration, shapeConfiguration) + simulatedObjectColliderConfig.add_character_collider_node_configuration_node(nodeName, colliderConfiguration, shapeConfiguration) + clothConfig.add_character_collider_node_configuration_node(nodeName, colliderConfiguration, shapeConfiguration) + # + ragdollNode = scene_api.physics_data.RagdollNodeConfiguration() + ragdollNode.JointConfig.Name = nodeName + ragdollConfig.add_ragdoll_node_configuration(ragdollNode) + ragdollConfig.colliders.add_character_collider_node_configuration_node(nodeName, colliderConfiguration, shapeConfiguration) + + actorPhysicsSetupRule.set_simulated_object_collider_config(simulatedObjectColliderConfig) + actorPhysicsSetupRule.set_hit_detection_config(hitDetectionConfig) + actorPhysicsSetupRule.set_cloth_config(clothConfig) + actorPhysicsSetupRule.set_ragdoll_config(ragdollConfig) + +def generate_actor_group(scene, sceneManifest, meshDataList, paths): + import scene_api.scene_data + import scene_api.physics_data + import scene_api.actor_group + + # fetch bone data + validNames = ['_neck_','_pelvis_','_leg_','_knee_','_spine_','_arm_','_clavicle_','_head_','_elbow_','_wrist_'] + graph = scene_api.scene_data.SceneGraph(scene.graph) + nodeList, allNodePaths = get_node_names(graph, 'BoneData', validList = validNames) + + nodeNameList = [] + for activeMeshIndex, nodeName in enumerate(nodeList): + nodeNameList.append(nodeName.get_name()) + + # add comment + commentRule = scene_api.actor_group.CommentRule() + commentRule.text = str(nodeNameList) + + # ActorPhysicsSetupRule + actorPhysicsSetupRule = scene_api.actor_group.ActorPhysicsSetupRule() + generate_physics_nodes(actorPhysicsSetupRule, nodeNameList) + + # add scale of the Actor rule + actorScaleRule = scene_api.actor_group.ActorScaleRule() + actorScaleRule.scaleFactor = 2.0 + + # add coordinate system rule + coordinateSystemRule = scene_api.actor_group.CoordinateSystemRule() + coordinateSystemRule.useAdvancedData = False + + # add morph target rule + morphTargetRule = scene_api.actor_group.MorphTargetRule() + morphTargetRule.targets.select_targets([nodeNameList[0]], nodeNameList) + + # add skeleton optimization rule + skeletonOptimizationRule = scene_api.actor_group.SkeletonOptimizationRule() + skeletonOptimizationRule.autoSkeletonLOD = True + skeletonOptimizationRule.criticalBonesList.select_targets([nodeNameList[0:2]], nodeNameList) + + # add LOD rule + lodRule = scene_api.actor_group.LodRule() + lodRule0 = lodRule.add_lod_level(0) + lodRule0.select_targets([nodeNameList[1:4]], nodeNameList) + + actorGroup = scene_api.actor_group.ActorGroup() + actorGroup.name = os.path.basename(scene.sourceFilename) + actorGroup.add_rule(actorScaleRule) + actorGroup.add_rule(coordinateSystemRule) + actorGroup.add_rule(skeletonOptimizationRule) + actorGroup.add_rule(morphTargetRule) + actorGroup.add_rule(lodRule) + actorGroup.add_rule(actorPhysicsSetupRule) + actorGroup.add_rule(commentRule) + sceneManifest.manifest['values'].append(actorGroup.to_dict()) + +def update_manifest(scene): + import json, uuid, os + import azlmbr.scene.graph + import scene_api.scene_data + + graph = scene_api.scene_data.SceneGraph(scene.graph) + mesh_name_list, all_node_paths = get_node_names(graph, 'MeshData') + scene_manifest = scene_api.scene_data.SceneManifest() + generate_actor_group(scene, scene_manifest, mesh_name_list, all_node_paths) + generate_mesh_group(scene, scene_manifest, mesh_name_list, all_node_paths) + + # Convert the manifest to a JSON string and return it + return scene_manifest.export() + +sceneJobHandler = None + +def on_update_manifest(args): + try: + scene = args[0] + return update_manifest(scene) + except RuntimeError as err: + print (f'ERROR - {err}') + log_exception_traceback() + except: + log_exception_traceback() + + global sceneJobHandler + sceneJobHandler.disconnect() + sceneJobHandler = None + +# try to create SceneAPI handler for processing +try: + import azlmbr.scene + + sceneJobHandler = azlmbr.scene.ScriptBuildingNotificationBusHandler() + sceneJobHandler.connect() + sceneJobHandler.add_callback('OnUpdateManifest', on_update_manifest) +except: + sceneJobHandler = None diff --git a/AutomatedTesting/Assets/TestAnim/scene_export_motion.py b/AutomatedTesting/Assets/TestAnim/scene_export_motion.py new file mode 100644 index 0000000000..0591d5b7b4 --- /dev/null +++ b/AutomatedTesting/Assets/TestAnim/scene_export_motion.py @@ -0,0 +1,66 @@ +# +# Copyright (c) Contributors to the Open 3D Engine Project. +# For complete copyright and license terms please see the LICENSE at the root of this distribution. +# +# SPDX-License-Identifier: Apache-2.0 OR MIT +# +# +import traceback, sys, uuid, os, json + +import scene_export_utils +import scene_api.motion_group + +# +# Example for exporting MotionGroup scene rules +# + +def update_manifest(scene): + import azlmbr.scene.graph + import scene_api.scene_data + + # create a SceneManifest + sceneManifest = scene_api.scene_data.SceneManifest() + + # create a MotionGroup + motionGroup = scene_api.motion_group.MotionGroup() + motionGroup.name = os.path.basename(scene.sourceFilename.replace('.', '_')) + + motionAdditiveRule = scene_api.motion_group.MotionAdditiveRule() + motionAdditiveRule.sampleFrame = 2 + motionGroup.add_rule(motionAdditiveRule) + + motionScaleRule = motionGroup.create_rule(scene_api.motion_group.MotionScaleRule()) + motionScaleRule.scaleFactor = 1.1 + motionGroup.add_rule(motionScaleRule) + + # add motion group to scene manifest + sceneManifest.add_motion_group(motionGroup) + + # Convert the manifest to a JSON string and return it + return sceneManifest.export() + +sceneJobHandler = None + +def on_update_manifest(args): + try: + scene = args[0] + return update_manifest(scene) + except RuntimeError as err: + print (f'ERROR - {err}') + scene_export_utils.log_exception_traceback() + except: + scene_export_utils.log_exception_traceback() + + global sceneJobHandler + sceneJobHandler.disconnect() + sceneJobHandler = None + +# try to create SceneAPI handler for processing +try: + import azlmbr.scene + + sceneJobHandler = azlmbr.scene.ScriptBuildingNotificationBusHandler() + sceneJobHandler.connect() + sceneJobHandler.add_callback('OnUpdateManifest', on_update_manifest) +except: + sceneJobHandler = None diff --git a/AutomatedTesting/Assets/TestAnim/test_jack_death_fall_back_zup.fbx.assetinfo b/AutomatedTesting/Assets/TestAnim/test_jack_death_fall_back_zup.fbx.assetinfo new file mode 100644 index 0000000000..73b42c1e73 --- /dev/null +++ b/AutomatedTesting/Assets/TestAnim/test_jack_death_fall_back_zup.fbx.assetinfo @@ -0,0 +1,8 @@ +{ + "values": [ + { + "$type": "ScriptProcessorRule", + "scriptFilename": "Assets/TestAnim/scene_export_motion.py" + } + ] +} \ No newline at end of file diff --git a/AutomatedTesting/Assets/Textures/image.png b/AutomatedTesting/Assets/Textures/image.png new file mode 100644 index 0000000000..2f558c634e --- /dev/null +++ b/AutomatedTesting/Assets/Textures/image.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:011454252e40c927343cce16296412f02f45d1f345c75c036651bdcca473bda5 +size 2672 diff --git a/AutomatedTesting/Assets/Textures/normal.png b/AutomatedTesting/Assets/Textures/normal.png new file mode 100644 index 0000000000..d3355e6699 --- /dev/null +++ b/AutomatedTesting/Assets/Textures/normal.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:7bafcc4aefab827e1414e64bcdde235500b51392e52c9ccd588b2d7a24b865a0 +size 20214 diff --git a/AutomatedTesting/CMakeLists.txt b/AutomatedTesting/CMakeLists.txt index dee9d73aea..1c5382ba4b 100644 --- a/AutomatedTesting/CMakeLists.txt +++ b/AutomatedTesting/CMakeLists.txt @@ -8,11 +8,12 @@ if(NOT PROJECT_NAME) cmake_minimum_required(VERSION 3.20) + include(cmake/CompilerSettings.cmake) project(AutomatedTesting LANGUAGES C CXX VERSION 1.0.0.0 ) - include(EngineFinder.cmake OPTIONAL) + include(cmake/EngineFinder.cmake OPTIONAL) find_package(o3de REQUIRED) o3de_initialize() else() diff --git a/AutomatedTesting/DiffuseProbeGrids/DiffuseGI_01_1B66C428-1D7C-4A53-BC9B-6F23E420FEC0_Irradiance_lutrgba16.dds b/AutomatedTesting/DiffuseProbeGrids/DiffuseGI_01_1B66C428-1D7C-4A53-BC9B-6F23E420FEC0_Irradiance_lutrgba16.dds new file mode 100644 index 0000000000..e208940f0d --- /dev/null +++ b/AutomatedTesting/DiffuseProbeGrids/DiffuseGI_01_1B66C428-1D7C-4A53-BC9B-6F23E420FEC0_Irradiance_lutrgba16.dds @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:ac841c02e81c9ae23476522b7e517889d746d4ff32b3251ac4360168f39b30a3 +size 450708 diff --git a/AutomatedTesting/DiffuseProbeGrids/DiffuseGI_01_52D75B1C-90BE-40A8-A874-3376F6B39299_Relocation_lutrgba16f.dds b/AutomatedTesting/DiffuseProbeGrids/DiffuseGI_01_52D75B1C-90BE-40A8-A874-3376F6B39299_Relocation_lutrgba16f.dds new file mode 100644 index 0000000000..32f2ee1b17 --- /dev/null +++ b/AutomatedTesting/DiffuseProbeGrids/DiffuseGI_01_52D75B1C-90BE-40A8-A874-3376F6B39299_Relocation_lutrgba16f.dds @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:3653ca7fb42c7e5991815c17fc9ebeab14a1aa861bfb1d37e233ada66a835f00 +size 7188 diff --git a/AutomatedTesting/DiffuseProbeGrids/DiffuseGI_01_5A2C9A6B-F914-4D9E-8098-2AD411B69F87_Distance_lutrg32f.dds b/AutomatedTesting/DiffuseProbeGrids/DiffuseGI_01_5A2C9A6B-F914-4D9E-8098-2AD411B69F87_Distance_lutrg32f.dds new file mode 100644 index 0000000000..12c1d8d112 --- /dev/null +++ b/AutomatedTesting/DiffuseProbeGrids/DiffuseGI_01_5A2C9A6B-F914-4D9E-8098-2AD411B69F87_Distance_lutrg32f.dds @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:a30b85428202c548e77cdcc0a595f9f26e82d29622be26891d569f4779a75830 +size 1802388 diff --git a/AutomatedTesting/DiffuseProbeGrids/DiffuseGI_01_A483018F-78ED-4814-986F-F925B0AA5EF8_Classification_lutr32f.dds b/AutomatedTesting/DiffuseProbeGrids/DiffuseGI_01_A483018F-78ED-4814-986F-F925B0AA5EF8_Classification_lutr32f.dds new file mode 100644 index 0000000000..df2c69bfe9 --- /dev/null +++ b/AutomatedTesting/DiffuseProbeGrids/DiffuseGI_01_A483018F-78ED-4814-986F-F925B0AA5EF8_Classification_lutr32f.dds @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:a3d76b7c93f8873ca7c4013dcc4eff887c25552c9c5847290481306656b22069 +size 3668 diff --git a/AutomatedTesting/DiffuseProbeGrids/DiffuseGI_02_222F1F65-BF31-4E0D-9957-14AE73194A37_Classification_lutr32f.dds b/AutomatedTesting/DiffuseProbeGrids/DiffuseGI_02_222F1F65-BF31-4E0D-9957-14AE73194A37_Classification_lutr32f.dds new file mode 100644 index 0000000000..5c990de348 --- /dev/null +++ b/AutomatedTesting/DiffuseProbeGrids/DiffuseGI_02_222F1F65-BF31-4E0D-9957-14AE73194A37_Classification_lutr32f.dds @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:219f57137c5bd44093762ea9d0fc24308679956b980f26bf194edd3a1798fcda +size 3668 diff --git a/AutomatedTesting/DiffuseProbeGrids/DiffuseGI_02_84D0F8A4-AD4F-4FD1-BA26-4803EAD88FE2_Distance_lutrg32f.dds b/AutomatedTesting/DiffuseProbeGrids/DiffuseGI_02_84D0F8A4-AD4F-4FD1-BA26-4803EAD88FE2_Distance_lutrg32f.dds new file mode 100644 index 0000000000..367da91f13 --- /dev/null +++ b/AutomatedTesting/DiffuseProbeGrids/DiffuseGI_02_84D0F8A4-AD4F-4FD1-BA26-4803EAD88FE2_Distance_lutrg32f.dds @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:96ed61c66d1d1f71e940ab75899ee253007e704004e1157c900c6308151a8bf1 +size 1802388 diff --git a/AutomatedTesting/DiffuseProbeGrids/DiffuseGI_02_9DC8C208-5327-4F0F-B1DF-C98F7F81F07D_Relocation_lutrgba16f.dds b/AutomatedTesting/DiffuseProbeGrids/DiffuseGI_02_9DC8C208-5327-4F0F-B1DF-C98F7F81F07D_Relocation_lutrgba16f.dds new file mode 100644 index 0000000000..b6d735cf50 --- /dev/null +++ b/AutomatedTesting/DiffuseProbeGrids/DiffuseGI_02_9DC8C208-5327-4F0F-B1DF-C98F7F81F07D_Relocation_lutrgba16f.dds @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:70a7dc4e2455624067e842b059954f6c4bb9b0debc3cb1ffa783b14bffc61786 +size 7188 diff --git a/AutomatedTesting/DiffuseProbeGrids/DiffuseGI_02_A78EEAF4-7CB2-4635-AA6F-2ED677328706_Irradiance_lutrgba16.dds b/AutomatedTesting/DiffuseProbeGrids/DiffuseGI_02_A78EEAF4-7CB2-4635-AA6F-2ED677328706_Irradiance_lutrgba16.dds new file mode 100644 index 0000000000..e46f54586a --- /dev/null +++ b/AutomatedTesting/DiffuseProbeGrids/DiffuseGI_02_A78EEAF4-7CB2-4635-AA6F-2ED677328706_Irradiance_lutrgba16.dds @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:7f5a945c61f92f3da77dfd9fdd2c95aa257f4df6bcb82483c608ab660bb72e5f +size 450708 diff --git a/AutomatedTesting/Editor/Scripts/auto_lod.py b/AutomatedTesting/Editor/Scripts/auto_lod.py new file mode 100644 index 0000000000..058303242a --- /dev/null +++ b/AutomatedTesting/Editor/Scripts/auto_lod.py @@ -0,0 +1,124 @@ +# +# Copyright (c) Contributors to the Open 3D Engine Project. +# For complete copyright and license terms please see the LICENSE at the root of this distribution. +# +# SPDX-License-Identifier: Apache-2.0 OR MIT +# +# +import os, traceback, binascii, sys, json, pathlib, logging +import azlmbr.math +import azlmbr.bus +from scene_helpers import * + +# +# SceneAPI Processor +# + +def update_manifest(scene): + import uuid + import azlmbr.scene as sceneApi + import azlmbr.scene.graph + from scene_api import scene_data as sceneData + + graph = sceneData.SceneGraph(scene.graph) + # Get a list of all the mesh nodes, as well as all the nodes + mesh_name_list, all_node_paths = get_mesh_node_names(graph) + mesh_name_list.sort(key=lambda node: str.casefold(node.get_path())) + scene_manifest = sceneData.SceneManifest() + + clean_filename = scene.sourceFilename.replace('.', '_') + + # Compute the filename of the scene file + source_basepath = scene.watchFolder + source_relative_path = os.path.dirname(os.path.relpath(clean_filename, source_basepath)) + source_filename_only = os.path.basename(clean_filename) + + created_entities = [] + previous_entity_id = azlmbr.entity.InvalidEntityId + first_mesh = True + + # Make a list of mesh node paths + mesh_path_list = list(map(lambda node: node.get_path(), mesh_name_list)) + + # Assume the first mesh is the main mesh + main_mesh = mesh_name_list[0] + mesh_path = main_mesh.get_path() + + # Create a unique mesh group name using the filename + node name + mesh_group_name = '{}_{}'.format(source_filename_only, main_mesh.get_name()) + # Remove forbidden filename characters from the name since this will become a file on disk later + mesh_group_name = "".join(char for char in mesh_group_name if char not in "|<>:\"/?*\\") + # Add the MeshGroup to the manifest and give it a unique ID + mesh_group = scene_manifest.add_mesh_group(mesh_group_name) + mesh_group['id'] = '{' + str(uuid.uuid5(uuid.NAMESPACE_DNS, source_filename_only + mesh_path)) + '}' + # Set our current node as the only node that is included in this MeshGroup + scene_manifest.mesh_group_select_node(mesh_group, mesh_path) + + # Explicitly remove all other nodes to prevent implicit inclusions + for node in mesh_path_list: + if node != mesh_path: + scene_manifest.mesh_group_unselect_node(mesh_group, node) + + # Create a LOD rule + lod_rule = scene_manifest.mesh_group_add_lod_rule(mesh_group) + + # Loop all the mesh nodes after the first + for x in mesh_path_list[1:]: + # Add a new LOD level + lod = scene_manifest.lod_rule_add_lod(lod_rule) + # Select the current mesh for this LOD level + scene_manifest.lod_select_node(lod, x) + + # Unselect every other mesh for this LOD level + for y in mesh_path_list: + if y != x: + scene_manifest.lod_unselect_node(lod, y) + + # Create an editor entity + entity_id = azlmbr.entity.EntityUtilityBus(azlmbr.bus.Broadcast, "CreateEditorReadyEntity", mesh_group_name) + # Add an EditorMeshComponent to the entity + editor_mesh_component = azlmbr.entity.EntityUtilityBus(azlmbr.bus.Broadcast, "GetOrAddComponentByTypeName", entity_id, "AZ::Render::EditorMeshComponent") + # Set the ModelAsset assetHint to the relative path of the input asset + the name of the MeshGroup we just created + the azmodel extension + # The MeshGroup we created will be output as a product in the asset's path named mesh_group_name.azmodel + # The assetHint will be converted to an AssetId later during prefab loading + json_update = json.dumps({ + "Controller": { "Configuration": { "ModelAsset": { + "assetHint": os.path.join(source_relative_path, mesh_group_name) + ".azmodel" }}} + }); + # Apply the JSON above to the component we created + result = azlmbr.entity.EntityUtilityBus(azlmbr.bus.Broadcast, "UpdateComponentForEntity", entity_id, editor_mesh_component, json_update) + + if not result: + raise RuntimeError("UpdateComponentForEntity failed for Mesh component") + + create_prefab(scene_manifest, source_filename_only, [entity_id]) + + # Convert the manifest to a JSON string and return it + new_manifest = scene_manifest.export() + + return new_manifest + +sceneJobHandler = None + +def on_update_manifest(args): + try: + scene = args[0] + return update_manifest(scene) + except RuntimeError as err: + print (f'ERROR - {err}') + log_exception_traceback() + except: + log_exception_traceback() + + global sceneJobHandler + sceneJobHandler = None + +# try to create SceneAPI handler for processing +try: + import azlmbr.scene as sceneApi + if (sceneJobHandler == None): + sceneJobHandler = sceneApi.ScriptBuildingNotificationBusHandler() + sceneJobHandler.connect() + sceneJobHandler.add_callback('OnUpdateManifest', on_update_manifest) +except: + sceneJobHandler = None diff --git a/AutomatedTesting/Editor/Scripts/scene_export_utils.py b/AutomatedTesting/Editor/Scripts/scene_export_utils.py new file mode 100644 index 0000000000..577bcc9f3e --- /dev/null +++ b/AutomatedTesting/Editor/Scripts/scene_export_utils.py @@ -0,0 +1,63 @@ +# +# Copyright (c) Contributors to the Open 3D Engine Project. +# For complete copyright and license terms please see the LICENSE at the root of this distribution. +# +# SPDX-License-Identifier: Apache-2.0 OR MIT +# +# +import traceback, sys, uuid, os, json + +# +# Utility methods for processing scenes +# + +def log_exception_traceback(): + exc_type, exc_value, exc_tb = sys.exc_info() + data = traceback.format_exception(exc_type, exc_value, exc_tb) + print(str(data)) + +def get_node_names(sceneGraph, nodeTypeName, testEndPoint = False, validList = None): + import azlmbr.scene.graph + import scene_api.scene_data + + node = sceneGraph.get_root() + nodeList = [] + children = [] + paths = [] + + while node.IsValid(): + # store children to process after siblings + if sceneGraph.has_node_child(node): + children.append(sceneGraph.get_node_child(node)) + + nodeName = scene_api.scene_data.SceneGraphName(sceneGraph.get_node_name(node)) + paths.append(nodeName.get_path()) + + include = True + + if (validList is not None): + include = False # if a valid list filter provided, assume to not include node name + name_parts = nodeName.get_path().split('.') + for valid in validList: + if (valid in name_parts[-1]): + include = True + break + + # store any node that has provides specifc data content + nodeContent = sceneGraph.get_node_content(node) + if include and nodeContent.CastWithTypeName(nodeTypeName): + if testEndPoint is not None: + include = sceneGraph.is_node_end_point(node) is testEndPoint + if include: + if (len(nodeName.get_path())): + nodeList.append(scene_api.scene_data.SceneGraphName(sceneGraph.get_node_name(node))) + + # advance to next node + if sceneGraph.has_node_sibling(node): + node = sceneGraph.get_node_sibling(node) + elif children: + node = children.pop() + else: + node = azlmbr.scene.graph.NodeIndex() + + return nodeList, paths diff --git a/AutomatedTesting/Editor/Scripts/scene_helpers.py b/AutomatedTesting/Editor/Scripts/scene_helpers.py new file mode 100644 index 0000000000..e90e7e706a --- /dev/null +++ b/AutomatedTesting/Editor/Scripts/scene_helpers.py @@ -0,0 +1,109 @@ +# +# Copyright (c) Contributors to the Open 3D Engine Project. +# For complete copyright and license terms please see the LICENSE at the root of this distribution. +# +# SPDX-License-Identifier: Apache-2.0 OR MIT +# +# +import traceback, logging, json +from typing import Tuple, List + +import azlmbr.bus +from scene_api import scene_data as sceneData +from scene_api.scene_data import SceneGraphName + + +def log_exception_traceback(): + """Outputs an exception stacktrace.""" + data = traceback.format_exc() + logger = logging.getLogger('python') + logger.error(data) + + +def sanitize_name_for_disk(name: str) -> str: + """Removes illegal filename characters from a string. + + Parameters + ---------- + name : + String to clean. + + + Returns + ------- + str + Name with illegal characters removed. + + """ + return "".join(char for char in name if char not in "|<>:\"/?*\\") + + +def get_mesh_node_names(scene_graph: sceneData.SceneGraph) -> Tuple[List[SceneGraphName], List[str]]: + """Returns a tuple of all the mesh nodes as well as all the node paths + + Parameters + ---------- + scene_graph : + Scene graph to search + + + Returns + ------- + Tuple[List[SceneGraphName], List[str]] + Tuple of [Mesh Nodes, All Node Paths] + + """ + import azlmbr.scene as sceneApi + import azlmbr.scene.graph + + mesh_data_list = [] + node = scene_graph.get_root() + children = [] + paths = [] + + while node.IsValid(): + # store children to process after siblings + if scene_graph.has_node_child(node): + children.append(scene_graph.get_node_child(node)) + + node_name = sceneData.SceneGraphName(scene_graph.get_node_name(node)) + paths.append(node_name.get_path()) + + # store any node that has mesh data content + node_content = scene_graph.get_node_content(node) + if node_content.CastWithTypeName('MeshData'): + if scene_graph.is_node_end_point(node) is False: + if len(node_name.get_path()): + mesh_data_list.append(sceneData.SceneGraphName(scene_graph.get_node_name(node))) + + # advance to next node + if scene_graph.has_node_sibling(node): + node = scene_graph.get_node_sibling(node) + elif children: + node = children.pop() + else: + node = azlmbr.scene.graph.NodeIndex() + + return mesh_data_list, paths + + +def create_prefab(scene_manifest: sceneData.SceneManifest, prefab_name: str, entities: list) -> None: + prefab_filename = prefab_name + ".prefab" + created_template_id = azlmbr.prefab.PrefabSystemScriptingBus(azlmbr.bus.Broadcast, "CreatePrefab", entities, + prefab_filename) + + if created_template_id is None or created_template_id == azlmbr.prefab.InvalidTemplateId: + raise RuntimeError("CreatePrefab {} failed".format(prefab_filename)) + + # Convert the prefab to a JSON string + output = azlmbr.prefab.PrefabLoaderScriptingBus(azlmbr.bus.Broadcast, "SaveTemplateToString", created_template_id) + + if output is not None and output.IsSuccess(): + json_string = output.GetValue() + uuid = azlmbr.math.Uuid_CreateRandom().ToString() + json_result = json.loads(json_string) + # Add a PrefabGroup to the manifest and store the JSON on it + scene_manifest.add_prefab_group(prefab_name, uuid, json_result) + else: + raise RuntimeError( + "SaveTemplateToString failed for template id {}, prefab {}".format(created_template_id, prefab_filename)) diff --git a/AutomatedTesting/Editor/Scripts/scene_mesh_to_prefab.py b/AutomatedTesting/Editor/Scripts/scene_mesh_to_prefab.py index e832b1f82b..f9c1e08558 100644 --- a/AutomatedTesting/Editor/Scripts/scene_mesh_to_prefab.py +++ b/AutomatedTesting/Editor/Scripts/scene_mesh_to_prefab.py @@ -5,55 +5,17 @@ # SPDX-License-Identifier: Apache-2.0 OR MIT # # -import os, traceback, binascii, sys, json, pathlib -import azlmbr.math import azlmbr.bus +import azlmbr.math + +from scene_api.scene_data import PrimitiveShape, DecompositionMode, ColorChannel, TangentSpaceSource, TangentSpaceMethod +from scene_helpers import * + # # SceneAPI Processor # - -def log_exception_traceback(): - exc_type, exc_value, exc_tb = sys.exc_info() - data = traceback.format_exception(exc_type, exc_value, exc_tb) - print(str(data)) - -def get_mesh_node_names(sceneGraph): - import azlmbr.scene as sceneApi - import azlmbr.scene.graph - from scene_api import scene_data as sceneData - - meshDataList = [] - node = sceneGraph.get_root() - children = [] - paths = [] - - while node.IsValid(): - # store children to process after siblings - if sceneGraph.has_node_child(node): - children.append(sceneGraph.get_node_child(node)) - - nodeName = sceneData.SceneGraphName(sceneGraph.get_node_name(node)) - paths.append(nodeName.get_path()) - - # store any node that has mesh data content - nodeContent = sceneGraph.get_node_content(node) - if nodeContent.CastWithTypeName('MeshData'): - if sceneGraph.is_node_end_point(node) is False: - if (len(nodeName.get_path())): - meshDataList.append(sceneData.SceneGraphName(sceneGraph.get_node_name(node))) - - # advance to next node - if sceneGraph.has_node_sibling(node): - node = sceneGraph.get_node_sibling(node) - elif children: - node = children.pop() - else: - node = azlmbr.scene.graph.NodeIndex() - - return meshDataList, paths - def add_material_component(entity_id): # Create an override AZ::Render::EditorMaterialComponent editor_material_component = azlmbr.entity.EntityUtilityBus( @@ -64,24 +26,54 @@ def add_material_component(entity_id): # this fills out the material asset to a known product AZMaterial asset relative path json_update = json.dumps({ - "Controller": { "Configuration": { "materials": [ - { - "Key": {}, - "Value": { "MaterialAsset":{ - "assetHint": "materials/basic_grey.azmaterial" - }} - }] - }} - }); - result = azlmbr.entity.EntityUtilityBus(azlmbr.bus.Broadcast, "UpdateComponentForEntity", entity_id, editor_material_component, json_update) + "Controller": {"Configuration": {"materials": [ + { + "Key": {}, + "Value": {"MaterialAsset": { + "assetHint": "materials/basic_grey.azmaterial" + }} + }] + }} + }) + result = azlmbr.entity.EntityUtilityBus(azlmbr.bus.Broadcast, "UpdateComponentForEntity", entity_id, + editor_material_component, json_update) if not result: raise RuntimeError("UpdateComponentForEntity for editor_material_component failed") + +def add_physx_meshes(scene_manifest: sceneData.SceneManifest, source_file_name: str, mesh_name_list: List, all_node_paths: List[str]): + first_mesh = mesh_name_list[0].get_path() + + # Add a Box Primitive PhysX mesh with a comment + physx_box = scene_manifest.add_physx_primitive_mesh_group(source_file_name + "_box", PrimitiveShape.BOX, 0.0, None) + scene_manifest.physx_mesh_group_add_comment(physx_box, "This is a box primitive") + # Select the first mesh, unselect every other node + scene_manifest.physx_mesh_group_add_selected_node(physx_box, first_mesh) + + for node in all_node_paths: + if node != first_mesh: + scene_manifest.physx_mesh_group_add_unselected_node(physx_box, node) + + # Add a Convex Mesh PhysX mesh with a comment + convex_mesh = scene_manifest.add_physx_convex_mesh_group(source_file_name + "_convex", 0.08, .0004, + True, True, True, True, True, 24, True, "Glass") + scene_manifest.physx_mesh_group_add_comment(convex_mesh, "This is a convex mesh") + # Select/Unselect nodes using lists + all_except_first_mesh = [x for x in all_node_paths if x != first_mesh] + scene_manifest.physx_mesh_group_add_selected_unselected_nodes(convex_mesh, [first_mesh], all_except_first_mesh) + + # Configure mesh decomposition for this mesh + scene_manifest.physx_mesh_group_decompose_meshes(convex_mesh, 512, 32, .002, 100100, DecompositionMode.TETRAHEDRON, + 0.06, 0.055, 0.00015, 3, 3, True, False) + + # Add a Triangle mesh + triangle = scene_manifest.add_physx_triangle_mesh_group(source_file_name + "_triangle", False, True, True, True, True, True) + scene_manifest.physx_mesh_group_add_selected_unselected_nodes(triangle, [first_mesh], all_except_first_mesh) + + def update_manifest(scene): - import json import uuid, os - import azlmbr.scene as sceneApi import azlmbr.scene.graph from scene_api import scene_data as sceneData @@ -89,9 +81,9 @@ def update_manifest(scene): # Get a list of all the mesh nodes, as well as all the nodes mesh_name_list, all_node_paths = get_mesh_node_names(graph) scene_manifest = sceneData.SceneManifest() - + clean_filename = scene.sourceFilename.replace('.', '_') - + # Compute the filename of the scene file source_basepath = scene.watchFolder source_relative_path = os.path.dirname(os.path.relpath(clean_filename, source_basepath)) @@ -101,6 +93,8 @@ def update_manifest(scene): previous_entity_id = azlmbr.entity.InvalidEntityId first_mesh = True + add_physx_meshes(scene_manifest, source_filename_only, mesh_name_list, all_node_paths) + # Loop every mesh node in the scene for activeMeshIndex in range(len(mesh_name_list)): mesh_name = mesh_name_list[activeMeshIndex] @@ -108,52 +102,83 @@ def update_manifest(scene): # Create a unique mesh group name using the filename + node name mesh_group_name = '{}_{}'.format(source_filename_only, mesh_name.get_name()) # Remove forbidden filename characters from the name since this will become a file on disk later - mesh_group_name = "".join(char for char in mesh_group_name if char not in "|<>:\"/?*\\") + mesh_group_name = sanitize_name_for_disk(mesh_group_name) # Add the MeshGroup to the manifest and give it a unique ID mesh_group = scene_manifest.add_mesh_group(mesh_group_name) mesh_group['id'] = '{' + str(uuid.uuid5(uuid.NAMESPACE_DNS, source_filename_only + mesh_path)) + '}' # Set our current node as the only node that is included in this MeshGroup scene_manifest.mesh_group_select_node(mesh_group, mesh_path) + scene_manifest.mesh_group_add_comment(mesh_group, "Hello World") # Explicitly remove all other nodes to prevent implicit inclusions for node in all_node_paths: if node != mesh_path: scene_manifest.mesh_group_unselect_node(mesh_group, node) + scene_manifest.mesh_group_add_cloth_rule(mesh_group, mesh_path, "Col0", ColorChannel.GREEN, "Col0", + ColorChannel.BLUE, "Col0", ColorChannel.BLUE, ColorChannel.ALPHA) + scene_manifest.mesh_group_add_advanced_mesh_rule(mesh_group, True, False, True, "Col0") + scene_manifest.mesh_group_add_skin_rule(mesh_group, 3, 0.002) + scene_manifest.mesh_group_add_tangent_rule(mesh_group, TangentSpaceSource.MIKKT_GENERATION, TangentSpaceMethod.TSPACE_BASIC) + # Create an editor entity entity_id = azlmbr.entity.EntityUtilityBus(azlmbr.bus.Broadcast, "CreateEditorReadyEntity", mesh_group_name) # Add an EditorMeshComponent to the entity - editor_mesh_component = azlmbr.entity.EntityUtilityBus(azlmbr.bus.Broadcast, "GetOrAddComponentByTypeName", entity_id, "AZ::Render::EditorMeshComponent") - # Set the ModelAsset assetHint to the relative path of the input asset + the name of the MeshGroup we just created + the azmodel extension - # The MeshGroup we created will be output as a product in the asset's path named mesh_group_name.azmodel - # The assetHint will be converted to an AssetId later during prefab loading + editor_mesh_component = azlmbr.entity.EntityUtilityBus(azlmbr.bus.Broadcast, "GetOrAddComponentByTypeName", + entity_id, "AZ::Render::EditorMeshComponent") + # Set the ModelAsset assetHint to the relative path of the input asset + the name of the MeshGroup we just + # created + the azmodel extension The MeshGroup we created will be output as a product in the asset's path + # named mesh_group_name.azmodel The assetHint will be converted to an AssetId later during prefab loading json_update = json.dumps({ - "Controller": { "Configuration": { "ModelAsset": { - "assetHint": os.path.join(source_relative_path, mesh_group_name) + ".azmodel" }}} - }); + "Controller": {"Configuration": {"ModelAsset": { + "assetHint": os.path.join(source_relative_path, mesh_group_name) + ".azmodel"}}} + }) # Apply the JSON above to the component we created - result = azlmbr.entity.EntityUtilityBus(azlmbr.bus.Broadcast, "UpdateComponentForEntity", entity_id, editor_mesh_component, json_update) + result = azlmbr.entity.EntityUtilityBus(azlmbr.bus.Broadcast, "UpdateComponentForEntity", entity_id, + editor_mesh_component, json_update) if not result: raise RuntimeError("UpdateComponentForEntity failed for Mesh component") + # Add a physics component referencing the triangle mesh we made for the first node + if previous_entity_id is None: + physx_mesh_component = azlmbr.entity.EntityUtilityBus(azlmbr.bus.Broadcast, "GetOrAddComponentByTypeName", + entity_id, "{FD429282-A075-4966-857F-D0BBF186CFE6} EditorColliderComponent") + + json_update = json.dumps({ + "ShapeConfiguration": { + "PhysicsAsset": { + "Asset": { + "assetHint": os.path.join(source_relative_path, source_filename_only + "_triangle.pxmesh") + } + } + } + }) + + result = azlmbr.entity.EntityUtilityBus(azlmbr.bus.Broadcast, "UpdateComponentForEntity", entity_id, physx_mesh_component, json_update) + + if not result: + raise RuntimeError("UpdateComponentForEntity failed for PhysX mesh component") + # an example of adding a material component to override the default material if previous_entity_id is not None and first_mesh: first_mesh = False add_material_component(entity_id) # Get the transform component - transform_component = azlmbr.entity.EntityUtilityBus(azlmbr.bus.Broadcast, "GetOrAddComponentByTypeName", entity_id, "27F1E1A1-8D9D-4C3B-BD3A-AFB9762449C0") + transform_component = azlmbr.entity.EntityUtilityBus(azlmbr.bus.Broadcast, "GetOrAddComponentByTypeName", + entity_id, "27F1E1A1-8D9D-4C3B-BD3A-AFB9762449C0") # Set this entity to be a child of the last entity we created # This is just an example of how to do parenting and isn't necessarily useful to parent everything like this if previous_entity_id is not None: transform_json = json.dumps({ - "Parent Entity" : previous_entity_id.to_json() - }); + "Parent Entity": previous_entity_id.to_json() + }) # Apply the JSON update - result = azlmbr.entity.EntityUtilityBus(azlmbr.bus.Broadcast, "UpdateComponentForEntity", entity_id, transform_component, transform_json) + result = azlmbr.entity.EntityUtilityBus(azlmbr.bus.Broadcast, "UpdateComponentForEntity", entity_id, + transform_component, transform_json) if not result: raise RuntimeError("UpdateComponentForEntity failed for Transform component") @@ -165,37 +190,23 @@ def update_manifest(scene): created_entities.append(entity_id) # Create a prefab with all our entities - prefab_filename = source_filename_only + ".prefab" - created_template_id = azlmbr.prefab.PrefabSystemScriptingBus(azlmbr.bus.Broadcast, "CreatePrefab", created_entities, prefab_filename) - - if created_template_id == azlmbr.prefab.InvalidTemplateId: - raise RuntimeError("CreatePrefab {} failed".format(prefab_filename)) - - # Convert the prefab to a JSON string - output = azlmbr.prefab.PrefabLoaderScriptingBus(azlmbr.bus.Broadcast, "SaveTemplateToString", created_template_id) - - if output.IsSuccess(): - jsonString = output.GetValue() - uuid = azlmbr.math.Uuid_CreateRandom().ToString() - jsonResult = json.loads(jsonString) - # Add a PrefabGroup to the manifest and store the JSON on it - scene_manifest.add_prefab_group(source_filename_only, uuid, jsonResult) - else: - raise RuntimeError("SaveTemplateToString failed for template id {}, prefab {}".format(created_template_id, prefab_filename)) + create_prefab(scene_manifest, source_filename_only, created_entities) # Convert the manifest to a JSON string and return it new_manifest = scene_manifest.export() return new_manifest + sceneJobHandler = None + def on_update_manifest(args): try: scene = args[0] return update_manifest(scene) except RuntimeError as err: - print (f'ERROR - {err}') + print(f'ERROR - {err}') log_exception_traceback() except: log_exception_traceback() @@ -203,10 +214,12 @@ def on_update_manifest(args): global sceneJobHandler sceneJobHandler = None + # try to create SceneAPI handler for processing try: import azlmbr.scene as sceneApi - if (sceneJobHandler == None): + + if sceneJobHandler is None: sceneJobHandler = sceneApi.ScriptBuildingNotificationBusHandler() sceneJobHandler.connect() sceneJobHandler.add_callback('OnUpdateManifest', on_update_manifest) diff --git a/AutomatedTesting/EngineFinder.cmake b/AutomatedTesting/EngineFinder.cmake deleted file mode 100644 index 0a34a43b77..0000000000 --- a/AutomatedTesting/EngineFinder.cmake +++ /dev/null @@ -1,68 +0,0 @@ -# -# Copyright (c) Contributors to the Open 3D Engine Project. -# For complete copyright and license terms please see the LICENSE at the root of this distribution. -# -# SPDX-License-Identifier: Apache-2.0 OR MIT -# -# -# This file is copied during engine registration. Edits to this file will be lost next -# time a registration happens. - -include_guard() - -# Read the engine name from the project_json file -file(READ ${CMAKE_CURRENT_LIST_DIR}/project.json project_json) -set_property(DIRECTORY APPEND PROPERTY CMAKE_CONFIGURE_DEPENDS ${CMAKE_CURRENT_LIST_DIR}/project.json) - -string(JSON LY_ENGINE_NAME_TO_USE ERROR_VARIABLE json_error GET ${project_json} engine) -if(json_error) - message(FATAL_ERROR "Unable to read key 'engine' from 'project.json', error: ${json_error}") -endif() - -if(DEFINED ENV{USERPROFILE} AND EXISTS $ENV{USERPROFILE}) - set(manifest_path $ENV{USERPROFILE}/.o3de/o3de_manifest.json) # Windows -else() - set(manifest_path $ENV{HOME}/.o3de/o3de_manifest.json) # Unix -endif() - -# Read the ~/.o3de/o3de_manifest.json file and look through the 'engines_path' object. -# Find a key that matches LY_ENGINE_NAME_TO_USE and use that as the engine path. -if(EXISTS ${manifest_path}) - file(READ ${manifest_path} manifest_json) - set_property(DIRECTORY APPEND PROPERTY CMAKE_CONFIGURE_DEPENDS ${manifest_path}) - - string(JSON engines_path_count ERROR_VARIABLE json_error LENGTH ${manifest_json} engines_path) - if(json_error) - message(FATAL_ERROR "Unable to read key 'engines_path' from '${manifest_path}', error: ${json_error}") - endif() - - string(JSON engines_path_type ERROR_VARIABLE json_error TYPE ${manifest_json} engines_path) - if(json_error OR NOT ${engines_path_type} STREQUAL "OBJECT") - message(FATAL_ERROR "Type of 'engines_path' in '${manifest_path}' is not a JSON Object, error: ${json_error}") - endif() - - math(EXPR engines_path_count "${engines_path_count}-1") - foreach(engine_path_index RANGE ${engines_path_count}) - string(JSON engine_name ERROR_VARIABLE json_error MEMBER ${manifest_json} engines_path ${engine_path_index}) - if(json_error) - message(FATAL_ERROR "Unable to read 'engines_path/${engine_path_index}' from '${manifest_path}', error: ${json_error}") - endif() - - if(LY_ENGINE_NAME_TO_USE STREQUAL engine_name) - string(JSON engine_path ERROR_VARIABLE json_error GET ${manifest_json} engines_path ${engine_name}) - if(json_error) - message(FATAL_ERROR "Unable to read value from 'engines_path/${engine_name}', error: ${json_error}") - endif() - - if(engine_path) - list(APPEND CMAKE_MODULE_PATH "${engine_path}/cmake") - break() - endif() - endif() - endforeach() -else() - # If the user is passing CMAKE_MODULE_PATH we assume thats where we will find the engine - if(NOT CMAKE_MODULE_PATH) - message(FATAL_ERROR "Engine registration is required before configuring a project. Please register an engine by running 'scripts/o3de register --this-engine'") - endif() -endif() diff --git a/AutomatedTesting/Gem/Code/Source/AutoGen/NetworkTestPlayerComponent.AutoComponent.xml b/AutomatedTesting/Gem/Code/Source/AutoGen/NetworkTestPlayerComponent.AutoComponent.xml index 12c222add6..251d2b25af 100644 --- a/AutomatedTesting/Gem/Code/Source/AutoGen/NetworkTestPlayerComponent.AutoComponent.xml +++ b/AutomatedTesting/Gem/Code/Source/AutoGen/NetworkTestPlayerComponent.AutoComponent.xml @@ -13,4 +13,29 @@ + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/AutomatedTesting/Gem/Code/Source/AutomatedTestingSystemComponent.cpp b/AutomatedTesting/Gem/Code/Source/AutomatedTestingSystemComponent.cpp index a77f62caf2..06a0775d70 100644 --- a/AutomatedTesting/Gem/Code/Source/AutomatedTestingSystemComponent.cpp +++ b/AutomatedTesting/Gem/Code/Source/AutomatedTestingSystemComponent.cpp @@ -46,7 +46,7 @@ namespace AutomatedTesting void AutomatedTestingSystemComponent::GetRequiredServices(AZ::ComponentDescriptor::DependencyArrayType& required) { - AZ_UNUSED(required); + required.push_back(AZ_CRC_CE("MultiplayerService")); } void AutomatedTestingSystemComponent::GetDependentServices(AZ::ComponentDescriptor::DependencyArrayType& dependent) diff --git a/AutomatedTesting/Gem/Code/enabled_gems.cmake b/AutomatedTesting/Gem/Code/enabled_gems.cmake index e6a4d6ca37..3915fd36da 100644 --- a/AutomatedTesting/Gem/Code/enabled_gems.cmake +++ b/AutomatedTesting/Gem/Code/enabled_gems.cmake @@ -54,6 +54,7 @@ set(ENABLED_GEMS AWSMetrics PrefabBuilder AudioSystem + Terrain Profiler Multiplayer ) diff --git a/AutomatedTesting/Gem/PythonCoverage/gem.json b/AutomatedTesting/Gem/PythonCoverage/gem.json index 39e327b5e3..b99ce0daad 100644 --- a/AutomatedTesting/Gem/PythonCoverage/gem.json +++ b/AutomatedTesting/Gem/PythonCoverage/gem.json @@ -2,6 +2,7 @@ "gem_name": "PythonCoverage", "display_name": "PythonCoverage", "license": "Apache-2.0 Or MIT", + "license_url": "https://github.com/o3de/o3de/blob/development/LICENSE.txt", "origin": "Open 3D Engine - o3de.org", "type": "Tool", "summary": "A tool for generating gem coverage for Python tests.", diff --git a/AutomatedTesting/Gem/PythonTests/AWS/CMakeLists.txt b/AutomatedTesting/Gem/PythonTests/AWS/CMakeLists.txt index 2a5e1d7cab..c8629bbe8b 100644 --- a/AutomatedTesting/Gem/PythonTests/AWS/CMakeLists.txt +++ b/AutomatedTesting/Gem/PythonTests/AWS/CMakeLists.txt @@ -13,7 +13,8 @@ if(PAL_TRAIT_BUILD_TESTS_SUPPORTED AND PAL_TRAIT_BUILD_HOST_TOOLS) # Only enable AWS automated tests on Windows - if(NOT "${PAL_PLATFORM_NAME}" STREQUAL "Windows") + set(SUPPORTED_PLATFORMS "Windows" "Linux") + if (NOT "${PAL_PLATFORM_NAME}" IN_LIST SUPPORTED_PLATFORMS) return() endif() @@ -21,9 +22,8 @@ if(PAL_TRAIT_BUILD_TESTS_SUPPORTED AND PAL_TRAIT_BUILD_HOST_TOOLS) NAME AutomatedTesting::AWSTests TEST_SUITE awsi TEST_SERIAL - PATH ${CMAKE_CURRENT_LIST_DIR}/${PAL_PLATFORM_NAME}/ + PATH ${CMAKE_CURRENT_LIST_DIR}/ RUNTIME_DEPENDENCIES - Legacy::Editor AZ::AssetProcessor AutomatedTesting.GameLauncher AutomatedTesting.Assets diff --git a/AutomatedTesting/Gem/PythonTests/AWS/README.md b/AutomatedTesting/Gem/PythonTests/AWS/README.md index 0d046cbe4c..a25f39d9c2 100644 --- a/AutomatedTesting/Gem/PythonTests/AWS/README.md +++ b/AutomatedTesting/Gem/PythonTests/AWS/README.md @@ -2,30 +2,61 @@ ## Prerequisites 1. Build the O3DE Editor and AutomatedTesting.GameLauncher in Profile. -2. AWS CLI is installed and configured following [Configuration and Credential File Settings](https://docs.aws.amazon.com/cli/latest/userguide/cli-configure-files.html). -3. [AWS Cloud Development Kit (CDK)](https://docs.aws.amazon.com/cdk/latest/guide/getting_started.html#getting_started_install) is installed. +2. Install the latest version of NodeJs. +3. AWS CLI is installed and configured following [Configuration and Credential File Settings](https://docs.aws.amazon.com/cli/latest/userguide/cli-configure-files.html). +4. [AWS Cloud Development Kit (CDK)](https://docs.aws.amazon.com/cdk/latest/guide/getting_started.html#getting_started_install) is installed. ## Deploy CDK Applications 1. Go to the AWS IAM console and create an IAM role called o3de-automation-tests which adds your own account as as a trusted entity and uses the "AdministratorAccess" permissions policy. -2. Copy {engine_root}\scripts\build\Platform\Windows\deploy_cdk_applications.cmd to your engine root folder. -3. Open a new Command Prompt window at the engine root and set the following environment variables: -``` - Set O3DE_AWS_PROJECT_NAME=AWSAUTO - Set O3DE_AWS_DEPLOY_REGION=us-east-1 - Set O3DE_AWS_DEPLOY_ACCOUNT={your_aws_account_id} - Set ASSUME_ROLE_ARN=arn:aws:iam::{your_aws_account_id}:role/o3de-automation-tests - Set COMMIT_ID=HEAD -``` -4. In the same Command Prompt window, Deploy the CDK applications for AWS gems by running deploy_cdk_applications.cmd. +2. Copy the following deployment script to your engine root folder: + * Windows (Command Prompt) + ``` + {engine_root}\scripts\build\Platform\Windows\deploy_cdk_applications.cmd + ``` + * Linux + ``` + {engine_root}/scripts/build/Platform/Linux/deploy_cdk_applications.sh + ``` +3. Open a new CLI window at the engine root and set the following environment variables: + * Windows + ``` + Set O3DE_AWS_PROJECT_NAME=AWSAUTO + Set O3DE_AWS_DEPLOY_REGION=us-east-1 + Set ASSUME_ROLE_ARN=arn:aws:iam::{your_aws_account_id}:role/o3de-automation-tests + Set COMMIT_ID=HEAD + ``` + * Linux + ``` + export O3DE_AWS_PROJECT_NAME=AWSAUTO + export O3DE_AWS_DEPLOY_REGION=us-east-1 + export ASSUME_ROLE_ARN=arn:aws:iam::{your_aws_account_id}:role/o3de-automation-tests + export COMMIT_ID=HEAD + ``` +4. In the same CLI window, Deploy the CDK applications for AWS gems by running deploy_cdk_applications.cmd. ## Run Automation Tests ### CLI -In the same Command Prompt window, run the following CLI command: -python\python.cmd -m pytest {path_to_the_test_file} --build-directory {directory_to_the_profile_build} +1. In the same CLI window, run the following CLI command: + * Windows + ``` + python\python.cmd -m pytest {path_to_the_test_file} --build-directory {directory_to_the_profile_build} + ``` + * Linux + ``` + python/python.sh -m pytest {path_to_the_test_file} --build-directory {directory_to_the_profile_build} + ``` ### Pycharm You can also run any specific automation test directly from Pycharm by providing the "--build-directory" argument in the Run Configuration. ## Destroy CDK Applications -1. Copy {engine_root}\scripts\build\Platform\Windows\destroy_cdk_applications.cmd to your engine root folder. -2. In the same Command Prompt window, destroy the CDK applications for AWS gems by running destroy_cdk_applications.cmd. \ No newline at end of file +1. Copy the following destruction script to your engine root folder: + * Windows + ``` + {engine_root}\scripts\build\Platform\Windows\destroy_cdk_applications.cmd + ``` + * Linux + ``` + {engine_root}/scripts/build/Platform/Linux/destroy_cdk_applications.sh + ``` +2. In the same CLI window, destroy the CDK applications for AWS gems by running destroy_cdk_applications.cmd. diff --git a/AutomatedTesting/Gem/PythonTests/AWS/Windows/aws_metrics/__init__.py b/AutomatedTesting/Gem/PythonTests/AWS/Windows/aws_metrics/__init__.py deleted file mode 100644 index 50cbb262dd..0000000000 --- a/AutomatedTesting/Gem/PythonTests/AWS/Windows/aws_metrics/__init__.py +++ /dev/null @@ -1,6 +0,0 @@ -""" -Copyright (c) Contributors to the Open 3D Engine Project. -For complete copyright and license terms please see the LICENSE at the root of this distribution. - -SPDX-License-Identifier: Apache-2.0 OR MIT -""" diff --git a/AutomatedTesting/Gem/PythonTests/AWS/Windows/client_auth/__init__.py b/AutomatedTesting/Gem/PythonTests/AWS/Windows/client_auth/__init__.py deleted file mode 100644 index bbcbcf1807..0000000000 --- a/AutomatedTesting/Gem/PythonTests/AWS/Windows/client_auth/__init__.py +++ /dev/null @@ -1,7 +0,0 @@ -""" -Copyright (c) Contributors to the Open 3D Engine Project. -For complete copyright and license terms please see the LICENSE at the root of this distribution. - -SPDX-License-Identifier: Apache-2.0 OR MIT -""" - diff --git a/AutomatedTesting/Gem/PythonTests/AWS/Windows/client_auth/aws_client_auth_automation_test.py b/AutomatedTesting/Gem/PythonTests/AWS/Windows/client_auth/aws_client_auth_automation_test.py deleted file mode 100644 index 198fb934d9..0000000000 --- a/AutomatedTesting/Gem/PythonTests/AWS/Windows/client_auth/aws_client_auth_automation_test.py +++ /dev/null @@ -1,134 +0,0 @@ -""" -Copyright (c) Contributors to the Open 3D Engine Project. -For complete copyright and license terms please see the LICENSE at the root of this distribution. - -SPDX-License-Identifier: Apache-2.0 OR MIT -""" - -import logging -import os -import pytest - -import ly_test_tools.log.log_monitor - -from AWS.common import constants - -# fixture imports -from assetpipeline.ap_fixtures.asset_processor_fixture import asset_processor - -AWS_CLIENT_AUTH_FEATURE_NAME = 'AWSClientAuth' - -logger = logging.getLogger(__name__) - - -@pytest.mark.SUITE_awsi -@pytest.mark.usefixtures('asset_processor') -@pytest.mark.usefixtures('automatic_process_killer') -@pytest.mark.usefixtures('aws_utils') -@pytest.mark.usefixtures('workspace') -@pytest.mark.parametrize('assume_role_arn', [constants.ASSUME_ROLE_ARN]) -@pytest.mark.parametrize('feature_name', [AWS_CLIENT_AUTH_FEATURE_NAME]) -@pytest.mark.parametrize('project', ['AutomatedTesting']) -@pytest.mark.usefixtures('resource_mappings') -@pytest.mark.parametrize('resource_mappings_filename', [constants.AWS_RESOURCE_MAPPING_FILE_NAME]) -@pytest.mark.parametrize('region_name', [constants.AWS_REGION]) -@pytest.mark.parametrize('session_name', [constants.SESSION_NAME]) -@pytest.mark.parametrize('stacks', [[f'{constants.AWS_PROJECT_NAME}-{AWS_CLIENT_AUTH_FEATURE_NAME}-Stack-{constants.AWS_REGION}']]) -class TestAWSClientAuthWindows(object): - """ - Test class to verify AWS Client Auth gem features on Windows. - """ - - @pytest.mark.parametrize('level', ['AWS/ClientAuth']) - def test_anonymous_credentials(self, - level: str, - launcher: pytest.fixture, - resource_mappings: pytest.fixture, - workspace: pytest.fixture, - asset_processor: pytest.fixture - ): - """ - Test to verify AWS Cognito Identity pool anonymous authorization. - - Setup: Updates resource mapping file using existing CloudFormation stacks. - Tests: Getting credentials when no credentials are configured - Verification: Log monitor looks for success credentials log. - """ - asset_processor.start() - asset_processor.wait_for_idle() - - file_to_monitor = os.path.join(launcher.workspace.paths.project_log(), constants.GAME_LOG_NAME) - log_monitor = ly_test_tools.log.log_monitor.LogMonitor(launcher=launcher, log_file_path=file_to_monitor) - - launcher.args = ['+LoadLevel', level] - launcher.args.extend(['-rhi=null']) - - with launcher.start(launch_ap=False): - result = log_monitor.monitor_log_for_lines( - expected_lines=['(Script) - Success anonymous credentials'], - unexpected_lines=['(Script) - Fail anonymous credentials'], - halt_on_unexpected=True, - ) - assert result, 'Anonymous credentials fetched successfully.' - - def test_password_signin_credentials(self, - launcher: pytest.fixture, - resource_mappings: pytest.fixture, - workspace: pytest.fixture, - asset_processor: pytest.fixture, - aws_utils: pytest.fixture - ): - """ - Test to verify AWS Cognito IDP Password sign in and Cognito Identity pool authenticated authorization. - - Setup: Updates resource mapping file using existing CloudFormation stacks. - Tests: Sign up new test user, admin confirm the user, sign in and get aws credentials. - Verification: Log monitor looks for success credentials log. - """ - asset_processor.start() - asset_processor.wait_for_idle() - - file_to_monitor = os.path.join(launcher.workspace.paths.project_log(), constants.GAME_LOG_NAME) - log_monitor = ly_test_tools.log.log_monitor.LogMonitor(launcher=launcher, log_file_path=file_to_monitor) - - cognito_idp = aws_utils.client('cognito-idp') - user_pool_id = resource_mappings.get_resource_name_id(f'{AWS_CLIENT_AUTH_FEATURE_NAME}.CognitoUserPoolId') - logger.info(f'UserPoolId:{user_pool_id}') - - # Remove the user if already exists - try: - cognito_idp.admin_delete_user( - UserPoolId=user_pool_id, - Username='test1' - ) - except cognito_idp.exceptions.UserNotFoundException: - pass - - launcher.args = ['+LoadLevel', 'AWS/ClientAuthPasswordSignUp'] - launcher.args.extend(['-rhi=null']) - - with launcher.start(launch_ap=False): - result = log_monitor.monitor_log_for_lines( - expected_lines=['(Script) - Signup Success'], - unexpected_lines=['(Script) - Signup Fail'], - halt_on_unexpected=True, - ) - assert result, 'Sign Up Success.' - - launcher.stop() - - cognito_idp.admin_confirm_sign_up( - UserPoolId=user_pool_id, - Username='test1' - ) - - launcher.args = ['+LoadLevel', 'AWS/ClientAuthPasswordSignIn'] - launcher.args.extend(['-rhi=null']) - - with launcher.start(launch_ap=False): - result = log_monitor.monitor_log_for_lines( - expected_lines=['(Script) - SignIn Success', '(Script) - Success credentials'], - unexpected_lines=['(Script) - SignIn Fail', '(Script) - Fail credentials'], - halt_on_unexpected=True, - ) - assert result, 'Sign in Success, fetched authenticated AWS temp credentials.' diff --git a/AutomatedTesting/Gem/PythonTests/AWS/Windows/core/test_aws_resource_interaction.py b/AutomatedTesting/Gem/PythonTests/AWS/Windows/core/test_aws_resource_interaction.py deleted file mode 100644 index 949186ad50..0000000000 --- a/AutomatedTesting/Gem/PythonTests/AWS/Windows/core/test_aws_resource_interaction.py +++ /dev/null @@ -1,143 +0,0 @@ -""" -Copyright (c) Contributors to the Open 3D Engine Project. -For complete copyright and license terms please see the LICENSE at the root of this distribution. - -SPDX-License-Identifier: Apache-2.0 OR MIT -""" - -import logging -import os -import shutil -import typing -from botocore.exceptions import ClientError - -import pytest -import ly_test_tools -import ly_test_tools.log.log_monitor -import ly_test_tools.environment.process_utils as process_utils -import ly_test_tools.o3de.asset_processor_utils as asset_processor_utils - -from AWS.common import constants - -# fixture imports -from assetpipeline.ap_fixtures.asset_processor_fixture import asset_processor - -AWS_CORE_FEATURE_NAME = 'AWSCore' - -process_utils.kill_processes_named("o3de", ignore_extensions=True) # Kill ProjectManager windows - -logger = logging.getLogger(__name__) - - -def setup(launcher: pytest.fixture, asset_processor: pytest.fixture) -> typing.Tuple[pytest.fixture, str]: - """ - Set up the resource mapping configuration and start the log monitor. - :param launcher: Client launcher for running the test level. - :param asset_processor: asset_processor fixture. - :return log monitor object, metrics file path and the metrics stack name. - """ - # Create the temporary directory for downloading test file from S3. - user_dir = os.path.join(launcher.workspace.paths.project(), 'user') - s3_download_dir = os.path.join(user_dir, 's3_download') - if not os.path.exists(s3_download_dir): - os.makedirs(s3_download_dir) - - asset_processor_utils.kill_asset_processor() - asset_processor.start() - asset_processor.wait_for_idle() - - file_to_monitor = os.path.join(launcher.workspace.paths.project_log(), constants.GAME_LOG_NAME) - log_monitor = ly_test_tools.log.log_monitor.LogMonitor(launcher=launcher, log_file_path=file_to_monitor) - - return log_monitor, s3_download_dir - - -def write_test_data_to_dynamodb_table(resource_mappings: pytest.fixture, aws_utils: pytest.fixture) -> None: - """ - Write test data to the DynamoDB table created by the CDK application. - :param resource_mappings: resource_mappings fixture. - :param aws_utils: aws_utils fixture. - """ - table_name = resource_mappings.get_resource_name_id(f'{AWS_CORE_FEATURE_NAME}.ExampleDynamoTableOutput') - try: - aws_utils.client('dynamodb').put_item( - TableName=table_name, - Item={ - 'id': { - 'S': 'Item1' - } - } - ) - logger.info(f'Loaded data into table {table_name}') - except ClientError: - logger.exception(f'Failed to load data into table {table_name}') - raise - - -@pytest.mark.SUITE_awsi -@pytest.mark.usefixtures('automatic_process_killer') -@pytest.mark.usefixtures('asset_processor') -@pytest.mark.parametrize('feature_name', [AWS_CORE_FEATURE_NAME]) -@pytest.mark.parametrize('region_name', [constants.AWS_REGION]) -@pytest.mark.parametrize('assume_role_arn', [constants.ASSUME_ROLE_ARN]) -@pytest.mark.parametrize('session_name', [constants.SESSION_NAME]) -@pytest.mark.usefixtures('workspace') -@pytest.mark.parametrize('project', ['AutomatedTesting']) -@pytest.mark.parametrize('level', ['AWS/Core']) -@pytest.mark.usefixtures('resource_mappings') -@pytest.mark.parametrize('resource_mappings_filename', [constants.AWS_RESOURCE_MAPPING_FILE_NAME]) -@pytest.mark.parametrize('stacks', [[f'{constants.AWS_PROJECT_NAME}-{AWS_CORE_FEATURE_NAME}', - f'{constants.AWS_PROJECT_NAME}-{AWS_CORE_FEATURE_NAME}-Example-{constants.AWS_REGION}']]) -@pytest.mark.usefixtures('aws_credentials') -@pytest.mark.parametrize('profile_name', ['AWSAutomationTest']) -class TestAWSCoreAWSResourceInteraction(object): - """ - Test class to verify the scripting behavior for the AWSCore gem. - """ - - @pytest.mark.parametrize('expected_lines', [ - ['(Script) - [S3] Head object request is done', - '(Script) - [S3] Head object success: Object example.txt is found.', - '(Script) - [S3] Get object success: Object example.txt is downloaded.', - '(Script) - [Lambda] Completed Invoke', - '(Script) - [Lambda] Invoke success: {"statusCode": 200, "body": {}}', - '(Script) - [DynamoDB] Results finished']]) - @pytest.mark.parametrize('unexpected_lines', [ - ['(Script) - [S3] Head object error: No response body.', - '(Script) - [S3] Get object error: Request validation failed, output file directory doesn\'t exist.', - '(Script) - Request validation failed, output file miss full path.', - '(Script) - ']]) - def test_scripting_behavior(self, - level: str, - launcher: pytest.fixture, - workspace: pytest.fixture, - asset_processor: pytest.fixture, - resource_mappings: pytest.fixture, - aws_utils: pytest.fixture, - expected_lines: typing.List[str], - unexpected_lines: typing.List[str]): - """ - Setup: Updates resource mapping file using existing CloudFormation stacks. - Tests: Interact with AWS S3, DynamoDB and Lambda services. - Verification: Script canvas nodes can communicate with AWS services successfully. - """ - - log_monitor, s3_download_dir = setup(launcher, asset_processor) - write_test_data_to_dynamodb_table(resource_mappings, aws_utils) - - launcher.args = ['+LoadLevel', level] - launcher.args.extend(['-rhi=null']) - - with launcher.start(launch_ap=False): - result = log_monitor.monitor_log_for_lines( - expected_lines=expected_lines, - unexpected_lines=unexpected_lines, - halt_on_unexpected=True - ) - - assert result, "Expected lines weren't found." - - assert os.path.exists(os.path.join(s3_download_dir, 'output.txt')), \ - 'The expected file wasn\'t successfully downloaded.' - # clean up the file directories. - shutil.rmtree(s3_download_dir) diff --git a/AutomatedTesting/Gem/PythonTests/AWS/Windows/core/__init__.py b/AutomatedTesting/Gem/PythonTests/AWS/aws_metrics/__init__.py similarity index 100% rename from AutomatedTesting/Gem/PythonTests/AWS/Windows/core/__init__.py rename to AutomatedTesting/Gem/PythonTests/AWS/aws_metrics/__init__.py diff --git a/AutomatedTesting/Gem/PythonTests/AWS/Windows/aws_metrics/aws_metrics_automation_test.py b/AutomatedTesting/Gem/PythonTests/AWS/aws_metrics/aws_metrics_automation_test.py similarity index 76% rename from AutomatedTesting/Gem/PythonTests/AWS/Windows/aws_metrics/aws_metrics_automation_test.py rename to AutomatedTesting/Gem/PythonTests/AWS/aws_metrics/aws_metrics_automation_test.py index 34b2217916..77d71df370 100644 --- a/AutomatedTesting/Gem/PythonTests/AWS/Windows/aws_metrics/aws_metrics_automation_test.py +++ b/AutomatedTesting/Gem/PythonTests/AWS/aws_metrics/aws_metrics_automation_test.py @@ -1,235 +1,289 @@ -""" -Copyright (c) Contributors to the Open 3D Engine Project. -For complete copyright and license terms please see the LICENSE at the root of this distribution. - -SPDX-License-Identifier: Apache-2.0 OR MIT -""" - -import logging -import os -import pytest -import typing -from datetime import datetime - -import ly_test_tools.log.log_monitor - -from AWS.common import constants -from .aws_metrics_custom_thread import AWSMetricsThread - -# fixture imports -from assetpipeline.ap_fixtures.asset_processor_fixture import asset_processor -from .aws_metrics_utils import aws_metrics_utils - -AWS_METRICS_FEATURE_NAME = 'AWSMetrics' - -logger = logging.getLogger(__name__) - - -def setup(launcher: pytest.fixture, - asset_processor: pytest.fixture) -> pytest.fixture: - """ - Set up the resource mapping configuration and start the log monitor. - :param launcher: Client launcher for running the test level. - :param asset_processor: asset_processor fixture. - :return log monitor object. - """ - asset_processor.start() - asset_processor.wait_for_idle() - - file_to_monitor = os.path.join(launcher.workspace.paths.project_log(), constants.GAME_LOG_NAME) - - # Initialize the log monitor. - log_monitor = ly_test_tools.log.log_monitor.LogMonitor(launcher=launcher, log_file_path=file_to_monitor) - - return log_monitor - - -def monitor_metrics_submission(log_monitor: pytest.fixture) -> None: - """ - Monitor the messages and notifications for submitting metrics. - :param log_monitor: Log monitor to check the log messages. - """ - expected_lines = [ - '(Script) - Submitted metrics without buffer.', - '(Script) - Submitted metrics with buffer.', - '(Script) - Flushed the buffered metrics.', - '(Script) - Metrics is sent successfully.' - ] - - unexpected_lines = [ - '(Script) - Failed to submit metrics without buffer.', - '(Script) - Failed to submit metrics with buffer.', - '(Script) - Failed to send metrics.' - ] - - result = log_monitor.monitor_log_for_lines( - expected_lines=expected_lines, - unexpected_lines=unexpected_lines, - halt_on_unexpected=True) - - # Assert the log monitor detected expected lines and did not detect any unexpected lines. - assert result, ( - f'Log monitoring failed. Used expected_lines values: {expected_lines} & ' - f'unexpected_lines values: {unexpected_lines}') - - -def query_metrics_from_s3(aws_metrics_utils: pytest.fixture, resource_mappings: pytest.fixture) -> None: - """ - Verify that the metrics events are delivered to the S3 bucket and can be queried. - :param aws_metrics_utils: aws_metrics_utils fixture. - :param resource_mappings: resource_mappings fixture. - """ - aws_metrics_utils.verify_s3_delivery( - resource_mappings.get_resource_name_id('AWSMetrics.AnalyticsBucketName') - ) - logger.info('Metrics are sent to S3.') - - aws_metrics_utils.run_glue_crawler( - resource_mappings.get_resource_name_id('AWSMetrics.EventsCrawlerName')) - - # Remove the events_json table if exists so that the sample query can create a table with the same name. - aws_metrics_utils.delete_table(resource_mappings.get_resource_name_id('AWSMetrics.EventDatabaseName'), 'events_json') - aws_metrics_utils.run_named_queries(resource_mappings.get_resource_name_id('AWSMetrics.AthenaWorkGroupName')) - logger.info('Query metrics from S3 successfully.') - - -def verify_operational_metrics(aws_metrics_utils: pytest.fixture, - resource_mappings: pytest.fixture, start_time: datetime) -> None: - """ - Verify that operational health metrics are delivered to CloudWatch. - :param aws_metrics_utils: aws_metrics_utils fixture. - :param resource_mappings: resource_mappings fixture. - :param start_time: Time when the game launcher starts. - """ - aws_metrics_utils.verify_cloud_watch_delivery( - 'AWS/Lambda', - 'Invocations', - [{'Name': 'FunctionName', - 'Value': resource_mappings.get_resource_name_id('AWSMetrics.AnalyticsProcessingLambdaName')}], - start_time) - logger.info('AnalyticsProcessingLambda metrics are sent to CloudWatch.') - - aws_metrics_utils.verify_cloud_watch_delivery( - 'AWS/Lambda', - 'Invocations', - [{'Name': 'FunctionName', - 'Value': resource_mappings.get_resource_name_id('AWSMetrics.EventProcessingLambdaName')}], - start_time) - logger.info('EventsProcessingLambda metrics are sent to CloudWatch.') - - -def update_kinesis_analytics_application_status(aws_metrics_utils: pytest.fixture, - resource_mappings: pytest.fixture, start_application: bool) -> None: - """ - Update the Kinesis analytics application to start or stop it. - :param aws_metrics_utils: aws_metrics_utils fixture. - :param resource_mappings: resource_mappings fixture. - :param start_application: whether to start or stop the application. - """ - if start_application: - aws_metrics_utils.start_kinesis_data_analytics_application( - resource_mappings.get_resource_name_id('AWSMetrics.AnalyticsApplicationName')) - else: - aws_metrics_utils.stop_kinesis_data_analytics_application( - resource_mappings.get_resource_name_id('AWSMetrics.AnalyticsApplicationName')) - -@pytest.mark.SUITE_awsi -@pytest.mark.usefixtures('automatic_process_killer') -@pytest.mark.usefixtures('aws_credentials') -@pytest.mark.usefixtures('resource_mappings') -@pytest.mark.parametrize('assume_role_arn', [constants.ASSUME_ROLE_ARN]) -@pytest.mark.parametrize('feature_name', [AWS_METRICS_FEATURE_NAME]) -@pytest.mark.parametrize('profile_name', ['AWSAutomationTest']) -@pytest.mark.parametrize('project', ['AutomatedTesting']) -@pytest.mark.parametrize('region_name', [constants.AWS_REGION]) -@pytest.mark.parametrize('resource_mappings_filename', [constants.AWS_RESOURCE_MAPPING_FILE_NAME]) -@pytest.mark.parametrize('session_name', [constants.SESSION_NAME]) -@pytest.mark.parametrize('stacks', [[f'{constants.AWS_PROJECT_NAME}-{AWS_METRICS_FEATURE_NAME}-{constants.AWS_REGION}']]) -class TestAWSMetricsWindows(object): - """ - Test class to verify the real-time and batch analytics for metrics. - """ - @pytest.mark.parametrize('level', ['AWS/Metrics']) - def test_realtime_and_batch_analytics(self, - level: str, - launcher: pytest.fixture, - asset_processor: pytest.fixture, - workspace: pytest.fixture, - aws_utils: pytest.fixture, - resource_mappings: pytest.fixture, - aws_metrics_utils: pytest.fixture): - """ - Verify that the metrics events are sent to CloudWatch and S3 for analytics. - """ - # Start Kinesis analytics application on a separate thread to avoid blocking the test. - kinesis_analytics_application_thread = AWSMetricsThread(target=update_kinesis_analytics_application_status, - args=(aws_metrics_utils, resource_mappings, True)) - kinesis_analytics_application_thread.start() - - log_monitor = setup(launcher, asset_processor) - - # Kinesis analytics application needs to be in the running state before we start the game launcher. - kinesis_analytics_application_thread.join() - launcher.args = ['+LoadLevel', level] - launcher.args.extend(['-rhi=null']) - start_time = datetime.utcnow() - with launcher.start(launch_ap=False): - monitor_metrics_submission(log_monitor) - - # Verify that real-time analytics metrics are delivered to CloudWatch. - aws_metrics_utils.verify_cloud_watch_delivery( - AWS_METRICS_FEATURE_NAME, - 'TotalLogins', - [], - start_time) - logger.info('Real-time metrics are sent to CloudWatch.') - - # Run time-consuming operations on separate threads to avoid blocking the test. - operational_threads = list() - operational_threads.append( - AWSMetricsThread(target=query_metrics_from_s3, - args=(aws_metrics_utils, resource_mappings))) - operational_threads.append( - AWSMetricsThread(target=verify_operational_metrics, - args=(aws_metrics_utils, resource_mappings, start_time))) - operational_threads.append( - AWSMetricsThread(target=update_kinesis_analytics_application_status, - args=(aws_metrics_utils, resource_mappings, False))) - for thread in operational_threads: - thread.start() - for thread in operational_threads: - thread.join() - - @pytest.mark.parametrize('level', ['AWS/Metrics']) - def test_unauthorized_user_request_rejected(self, - level: str, - launcher: pytest.fixture, - asset_processor: pytest.fixture, - workspace: pytest.fixture): - """ - Verify that unauthorized users cannot send metrics events to the AWS backed backend. - """ - log_monitor = setup(launcher, asset_processor) - - # Set invalid AWS credentials. - launcher.args = ['+LoadLevel', level, '+cl_awsAccessKey', 'AKIAIOSFODNN7EXAMPLE', - '+cl_awsSecretKey', 'wJalrXUtnFEMI/K7MDENG/bPxRfiCYEXAMPLEKEY'] - launcher.args.extend(['-rhi=null']) - - with launcher.start(launch_ap=False): - result = log_monitor.monitor_log_for_lines( - expected_lines=['(Script) - Failed to send metrics.'], - unexpected_lines=['(Script) - Metrics is sent successfully.'], - halt_on_unexpected=True) - assert result, 'Metrics events are sent successfully by unauthorized user' - logger.info('Unauthorized user is rejected to send metrics.') - - def test_clean_up_s3_bucket(self, - aws_utils: pytest.fixture, - resource_mappings: pytest.fixture, - aws_metrics_utils: pytest.fixture): - """ - Clear the analytics bucket objects so that the S3 bucket can be destroyed during tear down. - """ - aws_metrics_utils.empty_bucket( - resource_mappings.get_resource_name_id('AWSMetrics.AnalyticsBucketName')) +""" +Copyright (c) Contributors to the Open 3D Engine Project. +For complete copyright and license terms please see the LICENSE at the root of this distribution. + +SPDX-License-Identifier: Apache-2.0 OR MIT +""" + +import logging +import os +import pytest +import typing +from datetime import datetime + +import ly_test_tools.log.log_monitor + +from AWS.common import constants +from AWS.common.resource_mappings import AWS_RESOURCE_MAPPINGS_ACCOUNT_ID_KEY +from .aws_metrics_custom_thread import AWSMetricsThread + +# fixture imports +from assetpipeline.ap_fixtures.asset_processor_fixture import asset_processor +from .aws_metrics_utils import aws_metrics_utils + +AWS_METRICS_FEATURE_NAME = 'AWSMetrics' + +logger = logging.getLogger(__name__) + + +def setup(launcher: pytest.fixture, + asset_processor: pytest.fixture) -> pytest.fixture: + """ + Set up the resource mapping configuration and start the log monitor. + :param launcher: Client launcher for running the test level. + :param asset_processor: asset_processor fixture. + :return log monitor object. + """ + asset_processor.start() + asset_processor.wait_for_idle() + + file_to_monitor = os.path.join(launcher.workspace.paths.project_log(), constants.GAME_LOG_NAME) + + # Initialize the log monitor. + log_monitor = ly_test_tools.log.log_monitor.LogMonitor(launcher=launcher, log_file_path=file_to_monitor) + + return log_monitor + + +def monitor_metrics_submission(log_monitor: pytest.fixture) -> None: + """ + Monitor the messages and notifications for submitting metrics. + :param log_monitor: Log monitor to check the log messages. + """ + expected_lines = [ + '(Script) - Submitted metrics without buffer.', + '(Script) - Submitted metrics with buffer.', + '(Script) - Flushed the buffered metrics.', + '(Script) - Metrics is sent successfully.' + ] + + unexpected_lines = [ + '(Script) - Failed to submit metrics without buffer.', + '(Script) - Failed to submit metrics with buffer.', + '(Script) - Failed to send metrics.' + ] + + result = log_monitor.monitor_log_for_lines( + expected_lines=expected_lines, + unexpected_lines=unexpected_lines, + halt_on_unexpected=True) + + # Assert the log monitor detected expected lines and did not detect any unexpected lines. + assert result, ( + f'Log monitoring failed. Used expected_lines values: {expected_lines} & ' + f'unexpected_lines values: {unexpected_lines}') + + +def query_metrics_from_s3(aws_metrics_utils: pytest.fixture, resource_mappings: pytest.fixture) -> None: + """ + Verify that the metrics events are delivered to the S3 bucket and can be queried. + :param aws_metrics_utils: aws_metrics_utils fixture. + :param resource_mappings: resource_mappings fixture. + """ + aws_metrics_utils.verify_s3_delivery( + resource_mappings.get_resource_name_id('AWSMetrics.AnalyticsBucketName') + ) + logger.info('Metrics are sent to S3.') + + aws_metrics_utils.run_glue_crawler( + resource_mappings.get_resource_name_id('AWSMetrics.EventsCrawlerName')) + + # Remove the events_json table if exists so that the sample query can create a table with the same name. + aws_metrics_utils.delete_table(resource_mappings.get_resource_name_id('AWSMetrics.EventDatabaseName'), 'events_json') + aws_metrics_utils.run_named_queries(resource_mappings.get_resource_name_id('AWSMetrics.AthenaWorkGroupName')) + logger.info('Query metrics from S3 successfully.') + + +def verify_operational_metrics(aws_metrics_utils: pytest.fixture, + resource_mappings: pytest.fixture, start_time: datetime) -> None: + """ + Verify that operational health metrics are delivered to CloudWatch. + :param aws_metrics_utils: aws_metrics_utils fixture. + :param resource_mappings: resource_mappings fixture. + :param start_time: Time when the game launcher starts. + """ + aws_metrics_utils.verify_cloud_watch_delivery( + 'AWS/Lambda', + 'Invocations', + [{'Name': 'FunctionName', + 'Value': resource_mappings.get_resource_name_id('AWSMetrics.AnalyticsProcessingLambdaName')}], + start_time) + logger.info('AnalyticsProcessingLambda metrics are sent to CloudWatch.') + + aws_metrics_utils.verify_cloud_watch_delivery( + 'AWS/Lambda', + 'Invocations', + [{'Name': 'FunctionName', + 'Value': resource_mappings.get_resource_name_id('AWSMetrics.EventProcessingLambdaName')}], + start_time) + logger.info('EventsProcessingLambda metrics are sent to CloudWatch.') + + +def update_kinesis_analytics_application_status(aws_metrics_utils: pytest.fixture, + resource_mappings: pytest.fixture, start_application: bool) -> None: + """ + Update the Kinesis analytics application to start or stop it. + :param aws_metrics_utils: aws_metrics_utils fixture. + :param resource_mappings: resource_mappings fixture. + :param start_application: whether to start or stop the application. + """ + if start_application: + aws_metrics_utils.start_kinesis_data_analytics_application( + resource_mappings.get_resource_name_id('AWSMetrics.AnalyticsApplicationName')) + else: + aws_metrics_utils.stop_kinesis_data_analytics_application( + resource_mappings.get_resource_name_id('AWSMetrics.AnalyticsApplicationName')) + +@pytest.mark.SUITE_awsi +@pytest.mark.usefixtures('automatic_process_killer') +@pytest.mark.usefixtures('aws_credentials') +@pytest.mark.usefixtures('resource_mappings') +@pytest.mark.parametrize('assume_role_arn', [constants.ASSUME_ROLE_ARN]) +@pytest.mark.parametrize('feature_name', [AWS_METRICS_FEATURE_NAME]) +@pytest.mark.parametrize('profile_name', ['AWSAutomationTest']) +@pytest.mark.parametrize('project', ['AutomatedTesting']) +@pytest.mark.parametrize('region_name', [constants.AWS_REGION]) +@pytest.mark.parametrize('resource_mappings_filename', [constants.AWS_RESOURCE_MAPPING_FILE_NAME]) +@pytest.mark.parametrize('session_name', [constants.SESSION_NAME]) +@pytest.mark.parametrize('stacks', [[f'{constants.AWS_PROJECT_NAME}-{AWS_METRICS_FEATURE_NAME}-{constants.AWS_REGION}']]) +class TestAWSMetricsWindows(object): + """ + Test class to verify the real-time and batch analytics for metrics. + """ + @pytest.mark.parametrize('level', ['levels/aws/metrics/metrics.spawnable']) + def test_realtime_and_batch_analytics(self, + level: str, + launcher: pytest.fixture, + asset_processor: pytest.fixture, + workspace: pytest.fixture, + aws_utils: pytest.fixture, + resource_mappings: pytest.fixture, + aws_metrics_utils: pytest.fixture): + """ + Verify that the metrics events are sent to CloudWatch and S3 for analytics. + """ + # Start Kinesis analytics application on a separate thread to avoid blocking the test. + kinesis_analytics_application_thread = AWSMetricsThread(target=update_kinesis_analytics_application_status, + args=(aws_metrics_utils, resource_mappings, True)) + kinesis_analytics_application_thread.start() + + log_monitor = setup(launcher, asset_processor) + + # Kinesis analytics application needs to be in the running state before we start the game launcher. + kinesis_analytics_application_thread.join() + launcher.args = ['+LoadLevel', level] + launcher.args.extend(['-rhi=null']) + start_time = datetime.utcnow() + with launcher.start(launch_ap=False): + monitor_metrics_submission(log_monitor) + + # Verify that real-time analytics metrics are delivered to CloudWatch. + aws_metrics_utils.verify_cloud_watch_delivery( + AWS_METRICS_FEATURE_NAME, + 'TotalLogins', + [], + start_time) + logger.info('Real-time metrics are sent to CloudWatch.') + + # Run time-consuming operations on separate threads to avoid blocking the test. + operational_threads = list() + operational_threads.append( + AWSMetricsThread(target=query_metrics_from_s3, + args=(aws_metrics_utils, resource_mappings))) + operational_threads.append( + AWSMetricsThread(target=verify_operational_metrics, + args=(aws_metrics_utils, resource_mappings, start_time))) + operational_threads.append( + AWSMetricsThread(target=update_kinesis_analytics_application_status, + args=(aws_metrics_utils, resource_mappings, False))) + for thread in operational_threads: + thread.start() + for thread in operational_threads: + thread.join() + + @pytest.mark.parametrize('level', ['levels/aws/metrics/metrics.spawnable']) + def test_realtime_and_batch_analytics_no_global_accountid(self, + level: str, + launcher: pytest.fixture, + asset_processor: pytest.fixture, + workspace: pytest.fixture, + aws_utils: pytest.fixture, + resource_mappings: pytest.fixture, + aws_metrics_utils: pytest.fixture): + """ + Verify that the metrics events are sent to CloudWatch and S3 for analytics. + """ + # Remove top-level account ID from resource mappings + resource_mappings.clear_select_keys([AWS_RESOURCE_MAPPINGS_ACCOUNT_ID_KEY]) + # Start Kinesis analytics application on a separate thread to avoid blocking the test. + kinesis_analytics_application_thread = AWSMetricsThread(target=update_kinesis_analytics_application_status, + args=(aws_metrics_utils, resource_mappings, True)) + kinesis_analytics_application_thread.start() + + log_monitor = setup(launcher, asset_processor) + + # Kinesis analytics application needs to be in the running state before we start the game launcher. + kinesis_analytics_application_thread.join() + launcher.args = ['+LoadLevel', level] + launcher.args.extend(['-rhi=null']) + start_time = datetime.utcnow() + with launcher.start(launch_ap=False): + monitor_metrics_submission(log_monitor) + + # Verify that real-time analytics metrics are delivered to CloudWatch. + aws_metrics_utils.verify_cloud_watch_delivery( + AWS_METRICS_FEATURE_NAME, + 'TotalLogins', + [], + start_time) + logger.info('Real-time metrics are sent to CloudWatch.') + + # Run time-consuming operations on separate threads to avoid blocking the test. + operational_threads = list() + operational_threads.append( + AWSMetricsThread(target=query_metrics_from_s3, + args=(aws_metrics_utils, resource_mappings))) + operational_threads.append( + AWSMetricsThread(target=verify_operational_metrics, + args=(aws_metrics_utils, resource_mappings, start_time))) + operational_threads.append( + AWSMetricsThread(target=update_kinesis_analytics_application_status, + args=(aws_metrics_utils, resource_mappings, False))) + for thread in operational_threads: + thread.start() + for thread in operational_threads: + thread.join() + + @pytest.mark.parametrize('level', ['levels/aws/metrics/metrics.spawnable']) + def test_unauthorized_user_request_rejected(self, + level: str, + launcher: pytest.fixture, + asset_processor: pytest.fixture, + workspace: pytest.fixture): + """ + Verify that unauthorized users cannot send metrics events to the AWS backed backend. + """ + log_monitor = setup(launcher, asset_processor) + + # Set invalid AWS credentials. + launcher.args = ['+LoadLevel', level, '+cl_awsAccessKey', 'AKIAIOSFODNN7EXAMPLE', + '+cl_awsSecretKey', 'wJalrXUtnFEMI/K7MDENG/bPxRfiCYEXAMPLEKEY'] + launcher.args.extend(['-rhi=null']) + + with launcher.start(launch_ap=False): + result = log_monitor.monitor_log_for_lines( + expected_lines=['(Script) - Failed to send metrics.'], + unexpected_lines=['(Script) - Metrics is sent successfully.'], + halt_on_unexpected=True) + assert result, 'Metrics events are sent successfully by unauthorized user' + logger.info('Unauthorized user is rejected to send metrics.') + + def test_clean_up_s3_bucket(self, + aws_utils: pytest.fixture, + resource_mappings: pytest.fixture, + aws_metrics_utils: pytest.fixture): + """ + Clear the analytics bucket objects so that the S3 bucket can be destroyed during tear down. + """ + aws_metrics_utils.empty_bucket( + resource_mappings.get_resource_name_id('AWSMetrics.AnalyticsBucketName')) diff --git a/AutomatedTesting/Gem/PythonTests/AWS/Windows/aws_metrics/aws_metrics_custom_thread.py b/AutomatedTesting/Gem/PythonTests/AWS/aws_metrics/aws_metrics_custom_thread.py similarity index 96% rename from AutomatedTesting/Gem/PythonTests/AWS/Windows/aws_metrics/aws_metrics_custom_thread.py rename to AutomatedTesting/Gem/PythonTests/AWS/aws_metrics/aws_metrics_custom_thread.py index 1bba9c3e39..99f9072c4b 100644 --- a/AutomatedTesting/Gem/PythonTests/AWS/Windows/aws_metrics/aws_metrics_custom_thread.py +++ b/AutomatedTesting/Gem/PythonTests/AWS/aws_metrics/aws_metrics_custom_thread.py @@ -1,29 +1,29 @@ -""" -Copyright (c) Contributors to the Open 3D Engine Project. -For complete copyright and license terms please see the LICENSE at the root of this distribution. - -SPDX-License-Identifier: Apache-2.0 OR MIT -""" - -from threading import Thread - - -class AWSMetricsThread(Thread): - """ - Custom thread for raising assertion errors on the main thread. - """ - def __init__(self, **kwargs): - super().__init__(**kwargs) - self._error = None - - def run(self) -> None: - try: - super().run() - except AssertionError as e: - self._error = e - - def join(self, **kwargs) -> None: - super().join(**kwargs) - - if self._error: - raise AssertionError(self._error) +""" +Copyright (c) Contributors to the Open 3D Engine Project. +For complete copyright and license terms please see the LICENSE at the root of this distribution. + +SPDX-License-Identifier: Apache-2.0 OR MIT +""" + +from threading import Thread + + +class AWSMetricsThread(Thread): + """ + Custom thread for raising assertion errors on the main thread. + """ + def __init__(self, **kwargs): + super().__init__(**kwargs) + self._error = None + + def run(self) -> None: + try: + super().run() + except AssertionError as e: + self._error = e + + def join(self, **kwargs) -> None: + super().join(**kwargs) + + if self._error: + raise AssertionError(self._error) diff --git a/AutomatedTesting/Gem/PythonTests/AWS/Windows/aws_metrics/aws_metrics_utils.py b/AutomatedTesting/Gem/PythonTests/AWS/aws_metrics/aws_metrics_utils.py similarity index 97% rename from AutomatedTesting/Gem/PythonTests/AWS/Windows/aws_metrics/aws_metrics_utils.py rename to AutomatedTesting/Gem/PythonTests/AWS/aws_metrics/aws_metrics_utils.py index e7eb486d02..64ee224f4e 100644 --- a/AutomatedTesting/Gem/PythonTests/AWS/Windows/aws_metrics/aws_metrics_utils.py +++ b/AutomatedTesting/Gem/PythonTests/AWS/aws_metrics/aws_metrics_utils.py @@ -1,239 +1,239 @@ -""" -Copyright (c) Contributors to the Open 3D Engine Project. -For complete copyright and license terms please see the LICENSE at the root of this distribution. - -SPDX-License-Identifier: Apache-2.0 OR MIT -""" - -import logging -import pathlib -import pytest -import typing - -from datetime import datetime -from botocore.exceptions import WaiterError - -from .aws_metrics_waiters import KinesisAnalyticsApplicationUpdatedWaiter, \ - CloudWatchMetricsDeliveredWaiter, DataLakeMetricsDeliveredWaiter, GlueCrawlerReadyWaiter - -logging.getLogger('boto').setLevel(logging.CRITICAL) - -# Expected directory and file extension for the S3 objects. -EXPECTED_S3_DIRECTORY = 'firehose_events/' -EXPECTED_S3_OBJECT_EXTENSION = '.parquet' - - -class AWSMetricsUtils: - """ - Provide utils functions for the AWSMetrics gem to interact with the deployed resources. - """ - - def __init__(self, aws_utils: pytest.fixture): - self._aws_util = aws_utils - - def start_kinesis_data_analytics_application(self, application_name: str) -> None: - """ - Start the Kenisis Data Analytics application for real-time analytics. - :param application_name: Name of the Kenisis Data Analytics application. - """ - input_id = self.get_kinesis_analytics_application_input_id(application_name) - assert input_id, 'invalid Kinesis Data Analytics application input.' - - client = self._aws_util.client('kinesisanalytics') - try: - client.start_application( - ApplicationName=application_name, - InputConfigurations=[ - { - 'Id': input_id, - 'InputStartingPositionConfiguration': { - 'InputStartingPosition': 'NOW' - } - }, - ] - ) - except client.exceptions.ResourceInUseException: - # The application has been started. - return - - try: - KinesisAnalyticsApplicationUpdatedWaiter(client, 'RUNNING').wait(application_name=application_name) - except WaiterError as e: - assert False, f'Failed to start the Kinesis Data Analytics application: {str(e)}.' - - def get_kinesis_analytics_application_input_id(self, application_name: str) -> str: - """ - Get the input ID for the Kenisis Data Analytics application. - :param application_name: Name of the Kenisis Data Analytics application. - :return: Input ID for the Kenisis Data Analytics application. - """ - client = self._aws_util.client('kinesisanalytics') - response = client.describe_application( - ApplicationName=application_name - ) - if not response: - return '' - input_descriptions = response.get('ApplicationDetail', {}).get('InputDescriptions', []) - if len(input_descriptions) != 1: - return '' - - return input_descriptions[0].get('InputId', '') - - def stop_kinesis_data_analytics_application(self, application_name: str) -> None: - """ - Stop the Kenisis Data Analytics application. - :param application_name: Name of the Kenisis Data Analytics application. - """ - client = self._aws_util.client('kinesisanalytics') - client.stop_application( - ApplicationName=application_name - ) - - try: - KinesisAnalyticsApplicationUpdatedWaiter(client, 'READY').wait(application_name=application_name) - except WaiterError as e: - assert False, f'Failed to stop the Kinesis Data Analytics application: {str(e)}.' - - def verify_cloud_watch_delivery(self, namespace: str, metrics_name: str, - dimensions: typing.List[dict], start_time: datetime) -> None: - """ - Verify that the expected metrics is delivered to CloudWatch. - :param namespace: Namespace of the metrics. - :param metrics_name: Name of the metrics. - :param dimensions: Dimensions of the metrics. - :param start_time: Start time for generating the metrics. - """ - client = self._aws_util.client('cloudwatch') - - try: - CloudWatchMetricsDeliveredWaiter(client).wait( - namespace=namespace, - metrics_name=metrics_name, - dimensions=dimensions, - start_time=start_time - ) - except WaiterError as e: - assert False, f'Failed to deliver metrics to CloudWatch: {str(e)}.' - - def verify_s3_delivery(self, analytics_bucket_name: str) -> None: - """ - Verify that metrics are delivered to S3 for batch analytics successfully. - :param analytics_bucket_name: Name of the deployed S3 bucket. - """ - client = self._aws_util.client('s3') - bucket_name = analytics_bucket_name - - try: - DataLakeMetricsDeliveredWaiter(client).wait(bucket_name=bucket_name, prefix=EXPECTED_S3_DIRECTORY) - except WaiterError as e: - assert False, f'Failed to find the S3 directory for storing metrics data: {str(e)}.' - - # Check whether the data is converted to the expected data format. - response = client.list_objects_v2( - Bucket=bucket_name, - Prefix=EXPECTED_S3_DIRECTORY - ) - assert response.get('KeyCount', 0) != 0, f'Failed to deliver metrics to the S3 bucket {bucket_name}.' - - s3_objects = response.get('Contents', []) - for s3_object in s3_objects: - key = s3_object.get('Key', '') - assert pathlib.Path(key).suffix == EXPECTED_S3_OBJECT_EXTENSION, \ - f'Invalid data format is found in the S3 bucket {bucket_name}' - - def run_glue_crawler(self, crawler_name: str) -> None: - """ - Run the Glue crawler and wait for it to finish. - :param crawler_name: Name of the Glue crawler - """ - client = self._aws_util.client('glue') - try: - client.start_crawler( - Name=crawler_name - ) - except client.exceptions.CrawlerRunningException: - # The crawler has already been started. - return - - try: - GlueCrawlerReadyWaiter(client).wait(crawler_name=crawler_name) - except WaiterError as e: - assert False, f'Failed to run the Glue crawler: {str(e)}.' - - def run_named_queries(self, work_group: str) -> None: - """ - Run the named queries under the specific Athena work group. - :param work_group: Name of the Athena work group. - """ - client = self._aws_util.client('athena') - # List all the named queries. - response = client.list_named_queries( - WorkGroup=work_group - ) - named_query_ids = response.get('NamedQueryIds', []) - - # Run each of the queries. - for named_query_id in named_query_ids: - get_named_query_response = client.get_named_query( - NamedQueryId=named_query_id - ) - named_query = get_named_query_response.get('NamedQuery', {}) - - start_query_execution_response = client.start_query_execution( - QueryString=named_query.get('QueryString', ''), - QueryExecutionContext={ - 'Database': named_query.get('Database', '') - }, - WorkGroup=work_group - ) - - # Wait for the query to finish. - state = 'RUNNING' - while state == 'QUEUED' or state == 'RUNNING': - get_query_execution_response = client.get_query_execution( - QueryExecutionId=start_query_execution_response.get('QueryExecutionId', '') - ) - - state = get_query_execution_response.get('QueryExecution', {}).get('Status', {}).get('State', '') - - assert state == 'SUCCEEDED', f'Failed to run the named query {named_query.get("Name", {})}' - - def empty_bucket(self, bucket_name: str) -> None: - """ - Empty the S3 bucket following: - https://boto3.amazonaws.com/v1/documentation/api/latest/guide/migrations3.html - - :param bucket_name: Name of the S3 bucket. - """ - s3 = self._aws_util.resource('s3') - bucket = s3.Bucket(bucket_name) - - for key in bucket.objects.all(): - key.delete() - - def delete_table(self, database_name: str, table_name: str) -> None: - """ - Delete an existing Glue table. - - :param database_name: Name of the Glue database. - :param table_name: Name of the table to delete. - """ - client = self._aws_util.client('glue') - client.delete_table( - DatabaseName=database_name, - Name=table_name - ) - - -@pytest.fixture(scope='function') -def aws_metrics_utils( - request: pytest.fixture, - aws_utils: pytest.fixture): - """ - Fixture for the AWS metrics util functions. - :param request: _pytest.fixtures.SubRequest class that handles getting - a pytest fixture from a pytest function/fixture. - :param aws_utils: aws_utils fixture. - """ - aws_utils_obj = AWSMetricsUtils(aws_utils) - return aws_utils_obj +""" +Copyright (c) Contributors to the Open 3D Engine Project. +For complete copyright and license terms please see the LICENSE at the root of this distribution. + +SPDX-License-Identifier: Apache-2.0 OR MIT +""" + +import logging +import pathlib +import pytest +import typing + +from datetime import datetime +from botocore.exceptions import WaiterError + +from .aws_metrics_waiters import KinesisAnalyticsApplicationUpdatedWaiter, \ + CloudWatchMetricsDeliveredWaiter, DataLakeMetricsDeliveredWaiter, GlueCrawlerReadyWaiter + +logging.getLogger('boto').setLevel(logging.CRITICAL) + +# Expected directory and file extension for the S3 objects. +EXPECTED_S3_DIRECTORY = 'firehose_events/' +EXPECTED_S3_OBJECT_EXTENSION = '.parquet' + + +class AWSMetricsUtils: + """ + Provide utils functions for the AWSMetrics gem to interact with the deployed resources. + """ + + def __init__(self, aws_utils: pytest.fixture): + self._aws_util = aws_utils + + def start_kinesis_data_analytics_application(self, application_name: str) -> None: + """ + Start the Kenisis Data Analytics application for real-time analytics. + :param application_name: Name of the Kenisis Data Analytics application. + """ + input_id = self.get_kinesis_analytics_application_input_id(application_name) + assert input_id, 'invalid Kinesis Data Analytics application input.' + + client = self._aws_util.client('kinesisanalytics') + try: + client.start_application( + ApplicationName=application_name, + InputConfigurations=[ + { + 'Id': input_id, + 'InputStartingPositionConfiguration': { + 'InputStartingPosition': 'NOW' + } + }, + ] + ) + except client.exceptions.ResourceInUseException: + # The application has been started. + return + + try: + KinesisAnalyticsApplicationUpdatedWaiter(client, 'RUNNING').wait(application_name=application_name) + except WaiterError as e: + assert False, f'Failed to start the Kinesis Data Analytics application: {str(e)}.' + + def get_kinesis_analytics_application_input_id(self, application_name: str) -> str: + """ + Get the input ID for the Kenisis Data Analytics application. + :param application_name: Name of the Kenisis Data Analytics application. + :return: Input ID for the Kenisis Data Analytics application. + """ + client = self._aws_util.client('kinesisanalytics') + response = client.describe_application( + ApplicationName=application_name + ) + if not response: + return '' + input_descriptions = response.get('ApplicationDetail', {}).get('InputDescriptions', []) + if len(input_descriptions) != 1: + return '' + + return input_descriptions[0].get('InputId', '') + + def stop_kinesis_data_analytics_application(self, application_name: str) -> None: + """ + Stop the Kenisis Data Analytics application. + :param application_name: Name of the Kenisis Data Analytics application. + """ + client = self._aws_util.client('kinesisanalytics') + client.stop_application( + ApplicationName=application_name + ) + + try: + KinesisAnalyticsApplicationUpdatedWaiter(client, 'READY').wait(application_name=application_name) + except WaiterError as e: + assert False, f'Failed to stop the Kinesis Data Analytics application: {str(e)}.' + + def verify_cloud_watch_delivery(self, namespace: str, metrics_name: str, + dimensions: typing.List[dict], start_time: datetime) -> None: + """ + Verify that the expected metrics is delivered to CloudWatch. + :param namespace: Namespace of the metrics. + :param metrics_name: Name of the metrics. + :param dimensions: Dimensions of the metrics. + :param start_time: Start time for generating the metrics. + """ + client = self._aws_util.client('cloudwatch') + + try: + CloudWatchMetricsDeliveredWaiter(client).wait( + namespace=namespace, + metrics_name=metrics_name, + dimensions=dimensions, + start_time=start_time + ) + except WaiterError as e: + assert False, f'Failed to deliver metrics to CloudWatch: {str(e)}.' + + def verify_s3_delivery(self, analytics_bucket_name: str) -> None: + """ + Verify that metrics are delivered to S3 for batch analytics successfully. + :param analytics_bucket_name: Name of the deployed S3 bucket. + """ + client = self._aws_util.client('s3') + bucket_name = analytics_bucket_name + + try: + DataLakeMetricsDeliveredWaiter(client).wait(bucket_name=bucket_name, prefix=EXPECTED_S3_DIRECTORY) + except WaiterError as e: + assert False, f'Failed to find the S3 directory for storing metrics data: {str(e)}.' + + # Check whether the data is converted to the expected data format. + response = client.list_objects_v2( + Bucket=bucket_name, + Prefix=EXPECTED_S3_DIRECTORY + ) + assert response.get('KeyCount', 0) != 0, f'Failed to deliver metrics to the S3 bucket {bucket_name}.' + + s3_objects = response.get('Contents', []) + for s3_object in s3_objects: + key = s3_object.get('Key', '') + assert pathlib.Path(key).suffix == EXPECTED_S3_OBJECT_EXTENSION, \ + f'Invalid data format is found in the S3 bucket {bucket_name}' + + def run_glue_crawler(self, crawler_name: str) -> None: + """ + Run the Glue crawler and wait for it to finish. + :param crawler_name: Name of the Glue crawler + """ + client = self._aws_util.client('glue') + try: + client.start_crawler( + Name=crawler_name + ) + except client.exceptions.CrawlerRunningException: + # The crawler has already been started. + return + + try: + GlueCrawlerReadyWaiter(client).wait(crawler_name=crawler_name) + except WaiterError as e: + assert False, f'Failed to run the Glue crawler: {str(e)}.' + + def run_named_queries(self, work_group: str) -> None: + """ + Run the named queries under the specific Athena work group. + :param work_group: Name of the Athena work group. + """ + client = self._aws_util.client('athena') + # List all the named queries. + response = client.list_named_queries( + WorkGroup=work_group + ) + named_query_ids = response.get('NamedQueryIds', []) + + # Run each of the queries. + for named_query_id in named_query_ids: + get_named_query_response = client.get_named_query( + NamedQueryId=named_query_id + ) + named_query = get_named_query_response.get('NamedQuery', {}) + + start_query_execution_response = client.start_query_execution( + QueryString=named_query.get('QueryString', ''), + QueryExecutionContext={ + 'Database': named_query.get('Database', '') + }, + WorkGroup=work_group + ) + + # Wait for the query to finish. + state = 'RUNNING' + while state == 'QUEUED' or state == 'RUNNING': + get_query_execution_response = client.get_query_execution( + QueryExecutionId=start_query_execution_response.get('QueryExecutionId', '') + ) + + state = get_query_execution_response.get('QueryExecution', {}).get('Status', {}).get('State', '') + + assert state == 'SUCCEEDED', f'Failed to run the named query {named_query.get("Name", {})}' + + def empty_bucket(self, bucket_name: str) -> None: + """ + Empty the S3 bucket following: + https://boto3.amazonaws.com/v1/documentation/api/latest/guide/migrations3.html + + :param bucket_name: Name of the S3 bucket. + """ + s3 = self._aws_util.resource('s3') + bucket = s3.Bucket(bucket_name) + + for key in bucket.objects.all(): + key.delete() + + def delete_table(self, database_name: str, table_name: str) -> None: + """ + Delete an existing Glue table. + + :param database_name: Name of the Glue database. + :param table_name: Name of the table to delete. + """ + client = self._aws_util.client('glue') + client.delete_table( + DatabaseName=database_name, + Name=table_name + ) + + +@pytest.fixture(scope='function') +def aws_metrics_utils( + request: pytest.fixture, + aws_utils: pytest.fixture): + """ + Fixture for the AWS metrics util functions. + :param request: _pytest.fixtures.SubRequest class that handles getting + a pytest fixture from a pytest function/fixture. + :param aws_utils: aws_utils fixture. + """ + aws_utils_obj = AWSMetricsUtils(aws_utils) + return aws_utils_obj diff --git a/AutomatedTesting/Gem/PythonTests/AWS/Windows/aws_metrics/aws_metrics_waiters.py b/AutomatedTesting/Gem/PythonTests/AWS/aws_metrics/aws_metrics_waiters.py similarity index 96% rename from AutomatedTesting/Gem/PythonTests/AWS/Windows/aws_metrics/aws_metrics_waiters.py rename to AutomatedTesting/Gem/PythonTests/AWS/aws_metrics/aws_metrics_waiters.py index 46070a3a64..7b09557c79 100644 --- a/AutomatedTesting/Gem/PythonTests/AWS/Windows/aws_metrics/aws_metrics_waiters.py +++ b/AutomatedTesting/Gem/PythonTests/AWS/aws_metrics/aws_metrics_waiters.py @@ -1,139 +1,139 @@ -""" -Copyright (c) Contributors to the Open 3D Engine Project. -For complete copyright and license terms please see the LICENSE at the root of this distribution. - -SPDX-License-Identifier: Apache-2.0 OR MIT -""" - -import botocore.client -import logging - -from datetime import timedelta -from AWS.common.custom_waiter import CustomWaiter, WaitState - -logging.getLogger('boto').setLevel(logging.CRITICAL) - - -class KinesisAnalyticsApplicationUpdatedWaiter(CustomWaiter): - """ - Subclass of the base custom waiter class. - Wait for the Kinesis analytics application being updated to a specific status. - """ - def __init__(self, client: botocore.client, status: str): - """ - Initialize the waiter. - - :param client: Boto3 client to use. - :param status: Expected status. - """ - super().__init__( - 'KinesisAnalyticsApplicationUpdated', - 'DescribeApplication', - 'ApplicationDetail.ApplicationStatus', - {status: WaitState.SUCCESS}, - client) - - def wait(self, application_name: str): - """ - Wait for the expected status. - - :param application_name: Name of the Kinesis analytics application. - """ - self._wait(ApplicationName=application_name) - - -class GlueCrawlerReadyWaiter(CustomWaiter): - """ - Subclass of the base custom waiter class. - Wait for the Glue crawler to finish its processing. Return when the crawler is in the "Stopping" status - to avoid wasting too much time in the automation tests on its shutdown process. - """ - def __init__(self, client: botocore.client): - """ - Initialize the waiter. - - :param client: Boto3 client to use. - """ - super().__init__( - 'GlueCrawlerReady', - 'GetCrawler', - 'Crawler.State', - {'STOPPING': WaitState.SUCCESS}, - client) - - def wait(self, crawler_name): - """ - Wait for the expected status. - - :param crawler_name: Name of the Glue crawler. - """ - self._wait(Name=crawler_name) - - -class DataLakeMetricsDeliveredWaiter(CustomWaiter): - """ - Subclass of the base custom waiter class. - Wait for the expected directory being created in the S3 bucket. - """ - def __init__(self, client: botocore.client): - """ - Initialize the waiter. - - :param client: Boto3 client to use. - """ - super().__init__( - 'DataLakeMetricsDelivered', - 'ListObjectsV2', - 'KeyCount > `0`', - {True: WaitState.SUCCESS}, - client) - - def wait(self, bucket_name, prefix): - """ - Wait for the expected directory being created. - - :param bucket_name: Name of the S3 bucket. - :param prefix: Name of the expected directory prefix. - """ - self._wait(Bucket=bucket_name, Prefix=prefix) - - -class CloudWatchMetricsDeliveredWaiter(CustomWaiter): - """ - Subclass of the base custom waiter class. - Wait for the expected metrics being delivered to CloudWatch. - """ - def __init__(self, client: botocore.client): - """ - Initialize the waiter. - - :param client: Boto3 client to use. - """ - super().__init__( - 'CloudWatchMetricsDelivered', - 'GetMetricStatistics', - 'length(Datapoints) > `0`', - {True: WaitState.SUCCESS}, - client) - - def wait(self, namespace, metrics_name, dimensions, start_time): - """ - Wait for the expected metrics being delivered. - - :param namespace: Namespace of the metrics. - :param metrics_name: Name of the metrics. - :param dimensions: Dimensions of the metrics. - :param start_time: Start time for generating the metrics. - """ - self._wait( - Namespace=namespace, - MetricName=metrics_name, - Dimensions=dimensions, - StartTime=start_time, - EndTime=start_time + timedelta(0, self.timeout), - Period=60, - Statistics=[ - 'SampleCount' - ], - Unit='Count' - ) +""" +Copyright (c) Contributors to the Open 3D Engine Project. +For complete copyright and license terms please see the LICENSE at the root of this distribution. + +SPDX-License-Identifier: Apache-2.0 OR MIT +""" + +import botocore.client +import logging + +from datetime import timedelta +from AWS.common.custom_waiter import CustomWaiter, WaitState + +logging.getLogger('boto').setLevel(logging.CRITICAL) + + +class KinesisAnalyticsApplicationUpdatedWaiter(CustomWaiter): + """ + Subclass of the base custom waiter class. + Wait for the Kinesis analytics application being updated to a specific status. + """ + def __init__(self, client: botocore.client, status: str): + """ + Initialize the waiter. + + :param client: Boto3 client to use. + :param status: Expected status. + """ + super().__init__( + 'KinesisAnalyticsApplicationUpdated', + 'DescribeApplication', + 'ApplicationDetail.ApplicationStatus', + {status: WaitState.SUCCESS}, + client) + + def wait(self, application_name: str): + """ + Wait for the expected status. + + :param application_name: Name of the Kinesis analytics application. + """ + self._wait(ApplicationName=application_name) + + +class GlueCrawlerReadyWaiter(CustomWaiter): + """ + Subclass of the base custom waiter class. + Wait for the Glue crawler to finish its processing. Return when the crawler is in the "Stopping" status + to avoid wasting too much time in the automation tests on its shutdown process. + """ + def __init__(self, client: botocore.client): + """ + Initialize the waiter. + + :param client: Boto3 client to use. + """ + super().__init__( + 'GlueCrawlerReady', + 'GetCrawler', + 'Crawler.State', + {'STOPPING': WaitState.SUCCESS}, + client) + + def wait(self, crawler_name): + """ + Wait for the expected status. + + :param crawler_name: Name of the Glue crawler. + """ + self._wait(Name=crawler_name) + + +class DataLakeMetricsDeliveredWaiter(CustomWaiter): + """ + Subclass of the base custom waiter class. + Wait for the expected directory being created in the S3 bucket. + """ + def __init__(self, client: botocore.client): + """ + Initialize the waiter. + + :param client: Boto3 client to use. + """ + super().__init__( + 'DataLakeMetricsDelivered', + 'ListObjectsV2', + 'KeyCount > `0`', + {True: WaitState.SUCCESS}, + client) + + def wait(self, bucket_name, prefix): + """ + Wait for the expected directory being created. + + :param bucket_name: Name of the S3 bucket. + :param prefix: Name of the expected directory prefix. + """ + self._wait(Bucket=bucket_name, Prefix=prefix) + + +class CloudWatchMetricsDeliveredWaiter(CustomWaiter): + """ + Subclass of the base custom waiter class. + Wait for the expected metrics being delivered to CloudWatch. + """ + def __init__(self, client: botocore.client): + """ + Initialize the waiter. + + :param client: Boto3 client to use. + """ + super().__init__( + 'CloudWatchMetricsDelivered', + 'GetMetricStatistics', + 'length(Datapoints) > `0`', + {True: WaitState.SUCCESS}, + client) + + def wait(self, namespace, metrics_name, dimensions, start_time): + """ + Wait for the expected metrics being delivered. + + :param namespace: Namespace of the metrics. + :param metrics_name: Name of the metrics. + :param dimensions: Dimensions of the metrics. + :param start_time: Start time for generating the metrics. + """ + self._wait( + Namespace=namespace, + MetricName=metrics_name, + Dimensions=dimensions, + StartTime=start_time, + EndTime=start_time + timedelta(0, self.timeout), + Period=60, + Statistics=[ + 'SampleCount' + ], + Unit='Count' + ) diff --git a/AutomatedTesting/Gem/PythonTests/AWS/Windows/__init__.py b/AutomatedTesting/Gem/PythonTests/AWS/client_auth/__init__.py similarity index 100% rename from AutomatedTesting/Gem/PythonTests/AWS/Windows/__init__.py rename to AutomatedTesting/Gem/PythonTests/AWS/client_auth/__init__.py diff --git a/AutomatedTesting/Gem/PythonTests/AWS/client_auth/aws_client_auth_automation_test.py b/AutomatedTesting/Gem/PythonTests/AWS/client_auth/aws_client_auth_automation_test.py new file mode 100644 index 0000000000..b185a155ed --- /dev/null +++ b/AutomatedTesting/Gem/PythonTests/AWS/client_auth/aws_client_auth_automation_test.py @@ -0,0 +1,170 @@ +""" +Copyright (c) Contributors to the Open 3D Engine Project. +For complete copyright and license terms please see the LICENSE at the root of this distribution. + +SPDX-License-Identifier: Apache-2.0 OR MIT +""" + +import logging +import os +import pytest + +import ly_test_tools.log.log_monitor + +from AWS.common import constants +from AWS.common.resource_mappings import AWS_RESOURCE_MAPPINGS_ACCOUNT_ID_KEY + +# fixture imports +from assetpipeline.ap_fixtures.asset_processor_fixture import asset_processor + +AWS_CLIENT_AUTH_FEATURE_NAME = 'AWSClientAuth' + +logger = logging.getLogger(__name__) + + +@pytest.mark.SUITE_awsi +@pytest.mark.usefixtures('asset_processor') +@pytest.mark.usefixtures('automatic_process_killer') +@pytest.mark.usefixtures('aws_utils') +@pytest.mark.usefixtures('workspace') +@pytest.mark.parametrize('assume_role_arn', [constants.ASSUME_ROLE_ARN]) +@pytest.mark.parametrize('feature_name', [AWS_CLIENT_AUTH_FEATURE_NAME]) +@pytest.mark.parametrize('project', ['AutomatedTesting']) +@pytest.mark.usefixtures('resource_mappings') +@pytest.mark.parametrize('resource_mappings_filename', [constants.AWS_RESOURCE_MAPPING_FILE_NAME]) +@pytest.mark.parametrize('region_name', [constants.AWS_REGION]) +@pytest.mark.parametrize('session_name', [constants.SESSION_NAME]) +@pytest.mark.parametrize('stacks', [[f'{constants.AWS_PROJECT_NAME}-{AWS_CLIENT_AUTH_FEATURE_NAME}-Stack-{constants.AWS_REGION}']]) +class TestAWSClientAuthWindows(object): + """ + Test class to verify AWS Client Auth gem features on Windows. + """ + + @pytest.mark.parametrize('level', ['levels/aws/clientauth/clientauth.spawnable']) + def test_anonymous_credentials(self, + level: str, + launcher: pytest.fixture, + resource_mappings: pytest.fixture, + workspace: pytest.fixture, + asset_processor: pytest.fixture + ): + """ + Test to verify AWS Cognito Identity pool anonymous authorization. + + Setup: Updates resource mapping file using existing CloudFormation stacks. + Tests: Getting credentials when no credentials are configured + Verification: Log monitor looks for success credentials log. + """ + asset_processor.start() + asset_processor.wait_for_idle() + + file_to_monitor = os.path.join(launcher.workspace.paths.project_log(), constants.GAME_LOG_NAME) + log_monitor = ly_test_tools.log.log_monitor.LogMonitor(launcher=launcher, log_file_path=file_to_monitor) + + launcher.args = ['+LoadLevel', level] + launcher.args.extend(['-rhi=null']) + + with launcher.start(launch_ap=False): + result = log_monitor.monitor_log_for_lines( + expected_lines=['(Script) - Success anonymous credentials'], + unexpected_lines=['(Script) - Fail anonymous credentials'], + halt_on_unexpected=True, + ) + assert result, 'Anonymous credentials fetched successfully.' + + @pytest.mark.parametrize('level', ['levels/aws/clientauth/clientauth.spawnable']) + def test_anonymous_credentials_no_global_accountid(self, + level: str, + launcher: pytest.fixture, + resource_mappings: pytest.fixture, + workspace: pytest.fixture, + asset_processor: pytest.fixture + ): + """ + Test to verify AWS Cognito Identity pool anonymous authorization. + + Setup: Updates resource mapping file using existing CloudFormation stacks. + Tests: Getting credentials when no credentials are configured + Verification: Log monitor looks for success credentials log. + """ + # Remove top-level account ID from resource mappings + resource_mappings.clear_select_keys([AWS_RESOURCE_MAPPINGS_ACCOUNT_ID_KEY]) + + asset_processor.start() + asset_processor.wait_for_idle() + + file_to_monitor = os.path.join(launcher.workspace.paths.project_log(), constants.GAME_LOG_NAME) + log_monitor = ly_test_tools.log.log_monitor.LogMonitor(launcher=launcher, log_file_path=file_to_monitor) + + launcher.args = ['+LoadLevel', level] + launcher.args.extend(['-rhi=null']) + + with launcher.start(launch_ap=False): + result = log_monitor.monitor_log_for_lines( + expected_lines=['(Script) - Success anonymous credentials'], + unexpected_lines=['(Script) - Fail anonymous credentials'], + halt_on_unexpected=True, + ) + assert result, 'Anonymous credentials fetched successfully.' + + def test_password_signin_credentials(self, + launcher: pytest.fixture, + resource_mappings: pytest.fixture, + workspace: pytest.fixture, + asset_processor: pytest.fixture, + aws_utils: pytest.fixture + ): + """ + Test to verify AWS Cognito IDP Password sign in and Cognito Identity pool authenticated authorization. + + Setup: Updates resource mapping file using existing CloudFormation stacks. + Tests: Sign up new test user, admin confirm the user, sign in and get aws credentials. + Verification: Log monitor looks for success credentials log. + """ + asset_processor.start() + asset_processor.wait_for_idle() + + file_to_monitor = os.path.join(launcher.workspace.paths.project_log(), constants.GAME_LOG_NAME) + log_monitor = ly_test_tools.log.log_monitor.LogMonitor(launcher=launcher, log_file_path=file_to_monitor) + + cognito_idp = aws_utils.client('cognito-idp') + user_pool_id = resource_mappings.get_resource_name_id(f'{AWS_CLIENT_AUTH_FEATURE_NAME}.CognitoUserPoolId') + logger.info(f'UserPoolId:{user_pool_id}') + + # Remove the user if already exists + try: + cognito_idp.admin_delete_user( + UserPoolId=user_pool_id, + Username='test1' + ) + except cognito_idp.exceptions.UserNotFoundException: + pass + + launcher.args = ['+LoadLevel', 'levels/aws/clientauthpasswordsignup/clientauthpasswordsignup.spawnable'] + launcher.args.extend(['-rhi=null']) + + with launcher.start(launch_ap=False): + result = log_monitor.monitor_log_for_lines( + expected_lines=['(Script) - Signup Success'], + unexpected_lines=['(Script) - Signup Fail'], + halt_on_unexpected=True, + ) + assert result, 'Sign Up Success.' + + launcher.stop() + + cognito_idp.admin_confirm_sign_up( + UserPoolId=user_pool_id, + Username='test1' + ) + + launcher.args = ['+LoadLevel', 'levels/aws/clientauthpasswordsignin/clientauthpasswordsignin.spawnable'] + launcher.args.extend(['-rhi=null']) + + with launcher.start(launch_ap=False): + result = log_monitor.monitor_log_for_lines( + expected_lines=['(Script) - SignIn Success', '(Script) - Success credentials'], + unexpected_lines=['(Script) - SignIn Fail', '(Script) - Fail credentials'], + halt_on_unexpected=True, + ) + assert result, 'Sign in Success, fetched authenticated AWS temp credentials.' diff --git a/AutomatedTesting/Gem/PythonTests/AWS/common/resource_mappings.py b/AutomatedTesting/Gem/PythonTests/AWS/common/resource_mappings.py index 5f01ecdbf8..988d5bf1fc 100644 --- a/AutomatedTesting/Gem/PythonTests/AWS/common/resource_mappings.py +++ b/AutomatedTesting/Gem/PythonTests/AWS/common/resource_mappings.py @@ -102,3 +102,17 @@ class ResourceMappings: def get_resource_name_id(self, resource_key: str): return self._resource_mappings[AWS_RESOURCE_MAPPINGS_KEY][resource_key]['Name/ID'] + + def clear_select_keys(self, resource_keys=None) -> None: + """ + Clears values from select resource mapping keys. + :param resource_keys: list of keys to clear out + """ + with open(self._resource_mapping_file_path) as file_content: + resource_mappings = json.load(file_content) + + for key in resource_keys: + resource_mappings[key] = '' + + with open(self._resource_mapping_file_path, 'w') as file_content: + json.dump(resource_mappings, file_content, indent=4) \ No newline at end of file diff --git a/AutomatedTesting/Gem/PythonTests/AWS/core/__init__.py b/AutomatedTesting/Gem/PythonTests/AWS/core/__init__.py new file mode 100644 index 0000000000..f5193b300e --- /dev/null +++ b/AutomatedTesting/Gem/PythonTests/AWS/core/__init__.py @@ -0,0 +1,6 @@ +""" +Copyright (c) Contributors to the Open 3D Engine Project. +For complete copyright and license terms please see the LICENSE at the root of this distribution. + +SPDX-License-Identifier: Apache-2.0 OR MIT +""" diff --git a/AutomatedTesting/Gem/PythonTests/AWS/core/test_aws_resource_interaction.py b/AutomatedTesting/Gem/PythonTests/AWS/core/test_aws_resource_interaction.py new file mode 100644 index 0000000000..367f02cac3 --- /dev/null +++ b/AutomatedTesting/Gem/PythonTests/AWS/core/test_aws_resource_interaction.py @@ -0,0 +1,192 @@ +""" +Copyright (c) Contributors to the Open 3D Engine Project. +For complete copyright and license terms please see the LICENSE at the root of this distribution. + +SPDX-License-Identifier: Apache-2.0 OR MIT +""" + +import logging +import os +import shutil +import typing +from botocore.exceptions import ClientError + +import pytest +import ly_test_tools +import ly_test_tools.log.log_monitor +import ly_test_tools.environment.process_utils as process_utils +import ly_test_tools.o3de.asset_processor_utils as asset_processor_utils + +from AWS.common import constants +from AWS.common.resource_mappings import AWS_RESOURCE_MAPPINGS_ACCOUNT_ID_KEY + +# fixture imports +from assetpipeline.ap_fixtures.asset_processor_fixture import asset_processor + +AWS_CORE_FEATURE_NAME = 'AWSCore' + +process_utils.kill_processes_named("o3de", ignore_extensions=True) # Kill ProjectManager windows + +logger = logging.getLogger(__name__) + + +def setup(launcher: pytest.fixture, asset_processor: pytest.fixture) -> typing.Tuple[pytest.fixture, str]: + """ + Set up the resource mapping configuration and start the log monitor. + :param launcher: Client launcher for running the test level. + :param asset_processor: asset_processor fixture. + :return log monitor object, metrics file path and the metrics stack name. + """ + # Create the temporary directory for downloading test file from S3. + user_dir = os.path.join(launcher.workspace.paths.project(), 'user') + s3_download_dir = os.path.join(user_dir, 's3_download') + if not os.path.exists(s3_download_dir): + os.makedirs(s3_download_dir) + + asset_processor_utils.kill_asset_processor() + asset_processor.start() + asset_processor.wait_for_idle() + + file_to_monitor = os.path.join(launcher.workspace.paths.project_log(), constants.GAME_LOG_NAME) + log_monitor = ly_test_tools.log.log_monitor.LogMonitor(launcher=launcher, log_file_path=file_to_monitor) + + return log_monitor, s3_download_dir + + +def write_test_data_to_dynamodb_table(resource_mappings: pytest.fixture, aws_utils: pytest.fixture) -> None: + """ + Write test data to the DynamoDB table created by the CDK application. + :param resource_mappings: resource_mappings fixture. + :param aws_utils: aws_utils fixture. + """ + table_name = resource_mappings.get_resource_name_id(f'{AWS_CORE_FEATURE_NAME}.ExampleDynamoTableOutput') + try: + aws_utils.client('dynamodb').put_item( + TableName=table_name, + Item={ + 'id': { + 'S': 'Item1' + } + } + ) + logger.info(f'Loaded data into table {table_name}') + except ClientError: + logger.exception(f'Failed to load data into table {table_name}') + raise + + +@pytest.mark.SUITE_awsi +@pytest.mark.usefixtures('automatic_process_killer') +@pytest.mark.usefixtures('asset_processor') +@pytest.mark.parametrize('feature_name', [AWS_CORE_FEATURE_NAME]) +@pytest.mark.parametrize('region_name', [constants.AWS_REGION]) +@pytest.mark.parametrize('assume_role_arn', [constants.ASSUME_ROLE_ARN]) +@pytest.mark.parametrize('session_name', [constants.SESSION_NAME]) +@pytest.mark.usefixtures('workspace') +@pytest.mark.parametrize('project', ['AutomatedTesting']) +@pytest.mark.parametrize('level', ['levels/aws/core/core.spawnable']) +@pytest.mark.usefixtures('resource_mappings') +@pytest.mark.parametrize('resource_mappings_filename', [constants.AWS_RESOURCE_MAPPING_FILE_NAME]) +@pytest.mark.parametrize('stacks', [[f'{constants.AWS_PROJECT_NAME}-{AWS_CORE_FEATURE_NAME}', + f'{constants.AWS_PROJECT_NAME}-{AWS_CORE_FEATURE_NAME}-Example-{constants.AWS_REGION}']]) +@pytest.mark.usefixtures('aws_credentials') +@pytest.mark.parametrize('profile_name', ['AWSAutomationTest']) +class TestAWSCoreAWSResourceInteraction(object): + """ + Test class to verify the scripting behavior for the AWSCore gem. + """ + + @pytest.mark.parametrize('expected_lines', [ + ['(Script) - [S3] Head object request is done', + '(Script) - [S3] Head object success: Object example.txt is found.', + '(Script) - [S3] Get object success: Object example.txt is downloaded.', + '(Script) - [Lambda] Completed Invoke', + '(Script) - [Lambda] Invoke success: {"statusCode": 200, "body": {}}', + '(Script) - [DynamoDB] Results finished']]) + @pytest.mark.parametrize('unexpected_lines', [ + ['(Script) - [S3] Head object error: No response body.', + '(Script) - [S3] Get object error: Request validation failed, output file directory doesn\'t exist.', + '(Script) - Request validation failed, output file miss full path.', + '(Script) - ']]) + def test_scripting_behavior(self, + level: str, + launcher: pytest.fixture, + workspace: pytest.fixture, + asset_processor: pytest.fixture, + resource_mappings: pytest.fixture, + aws_utils: pytest.fixture, + expected_lines: typing.List[str], + unexpected_lines: typing.List[str]): + """ + Setup: Updates resource mapping file using existing CloudFormation stacks. + Tests: Interact with AWS S3, DynamoDB and Lambda services. + Verification: Script canvas nodes can communicate with AWS services successfully. + """ + + log_monitor, s3_download_dir = setup(launcher, asset_processor) + write_test_data_to_dynamodb_table(resource_mappings, aws_utils) + + launcher.args = ['+LoadLevel', level] + launcher.args.extend(['-rhi=null']) + + with launcher.start(launch_ap=False): + result = log_monitor.monitor_log_for_lines( + expected_lines=expected_lines, + unexpected_lines=unexpected_lines, + halt_on_unexpected=True + ) + + assert result, "Expected lines weren't found." + + assert os.path.exists(os.path.join(s3_download_dir, 'output.txt')), \ + 'The expected file wasn\'t successfully downloaded.' + # clean up the file directories. + shutil.rmtree(s3_download_dir) + + @pytest.mark.parametrize('expected_lines', [ + ['(Script) - [S3] Head object request is done', + '(Script) - [S3] Head object success: Object example.txt is found.', + '(Script) - [S3] Get object success: Object example.txt is downloaded.', + '(Script) - [Lambda] Completed Invoke', + '(Script) - [Lambda] Invoke success: {"statusCode": 200, "body": {}}', + '(Script) - [DynamoDB] Results finished']]) + @pytest.mark.parametrize('unexpected_lines', [ + ['(Script) - [S3] Head object error: No response body.', + '(Script) - [S3] Get object error: Request validation failed, output file directory doesn\'t exist.', + '(Script) - Request validation failed, output file miss full path.', + '(Script) - ']]) + def test_scripting_behavior_no_global_accountid(self, + level: str, + launcher: pytest.fixture, + workspace: pytest.fixture, + asset_processor: pytest.fixture, + resource_mappings: pytest.fixture, + aws_utils: pytest.fixture, + expected_lines: typing.List[str], + unexpected_lines: typing.List[str]): + """ + Setup: Updates resource mapping file using existing CloudFormation stacks. + Tests: Interact with AWS S3, DynamoDB and Lambda services. + Verification: Script canvas nodes can communicate with AWS services successfully. + """ + + resource_mappings.clear_select_keys([AWS_RESOURCE_MAPPINGS_ACCOUNT_ID_KEY]) + log_monitor, s3_download_dir = setup(launcher, asset_processor) + write_test_data_to_dynamodb_table(resource_mappings, aws_utils) + + launcher.args = ['+LoadLevel', level] + launcher.args.extend(['-rhi=null']) + + with launcher.start(launch_ap=False): + result = log_monitor.monitor_log_for_lines( + expected_lines=expected_lines, + unexpected_lines=unexpected_lines, + halt_on_unexpected=True + ) + + assert result, "Expected lines weren't found." + + assert os.path.exists(os.path.join(s3_download_dir, 'output.txt')), \ + 'The expected file wasn\'t successfully downloaded.' + # clean up the file directories. + shutil.rmtree(s3_download_dir) diff --git a/AutomatedTesting/Gem/PythonTests/Atom/CMakeLists.txt b/AutomatedTesting/Gem/PythonTests/Atom/CMakeLists.txt index ff3cd5c465..26eb96e7ec 100644 --- a/AutomatedTesting/Gem/PythonTests/Atom/CMakeLists.txt +++ b/AutomatedTesting/Gem/PythonTests/Atom/CMakeLists.txt @@ -20,19 +20,6 @@ if(PAL_TRAIT_BUILD_HOST_TOOLS AND PAL_TRAIT_BUILD_TESTS_SUPPORTED) COMPONENT Atom ) - ly_add_pytest( - NAME AutomatedTesting::Atom_TestSuite_Main_Optimized - TEST_SUITE main - PATH ${CMAKE_CURRENT_LIST_DIR}/TestSuite_Main_Optimized.py - TEST_SERIAL - TIMEOUT 600 - RUNTIME_DEPENDENCIES - AssetProcessor - AutomatedTesting.Assets - Editor - COMPONENT - Atom - ) ly_add_pytest( NAME AutomatedTesting::Atom_TestSuite_Sandbox TEST_SUITE sandbox @@ -60,18 +47,4 @@ if(PAL_TRAIT_BUILD_HOST_TOOLS AND PAL_TRAIT_BUILD_TESTS_SUPPORTED) COMPONENT Atom ) - ly_add_pytest( - NAME AutomatedTesting::Atom_TestSuite_Main_GPU_Optimized - TEST_SUITE main - TEST_REQUIRES gpu - TEST_SERIAL - TIMEOUT 1200 - PATH ${CMAKE_CURRENT_LIST_DIR}/TestSuite_Main_GPU_Optimized.py - RUNTIME_DEPENDENCIES - AssetProcessor - AutomatedTesting.Assets - Editor - COMPONENT - Atom - ) endif() diff --git a/AutomatedTesting/Gem/PythonTests/Atom/TestSuite_Main.py b/AutomatedTesting/Gem/PythonTests/Atom/TestSuite_Main.py index 6cc48984ab..7051b9983c 100644 --- a/AutomatedTesting/Gem/PythonTests/Atom/TestSuite_Main.py +++ b/AutomatedTesting/Gem/PythonTests/Atom/TestSuite_Main.py @@ -6,12 +6,12 @@ SPDX-License-Identifier: Apache-2.0 OR MIT """ import logging import os - import pytest import ly_test_tools.environment.file_system as file_system import editor_python_test_tools.hydra_test_utils as hydra -from Atom.atom_utils.atom_constants import LIGHT_TYPES + +from ly_test_tools.o3de.editor_test import EditorSharedTest, EditorTestSuite logger = logging.getLogger(__name__) TEST_DIRECTORY = os.path.join(os.path.dirname(__file__), "tests") @@ -19,237 +19,176 @@ TEST_DIRECTORY = os.path.join(os.path.dirname(__file__), "tests") @pytest.mark.parametrize("project", ["AutomatedTesting"]) @pytest.mark.parametrize("launcher_platform", ['windows_editor']) -@pytest.mark.parametrize("level", ["auto_test"]) -class TestAtomEditorComponentsMain(object): - """Holds tests for Atom components.""" +class TestAutomation(EditorTestSuite): - @pytest.mark.test_case_id("C32078118") # Decal - @pytest.mark.test_case_id("C32078119") # DepthOfField - @pytest.mark.test_case_id("C32078120") # Directional Light - @pytest.mark.test_case_id("C32078121") # Exposure Control - @pytest.mark.test_case_id("C32078115") # Global Skylight (IBL) - @pytest.mark.test_case_id("C32078125") # Physical Sky - @pytest.mark.test_case_id("C32078127") # PostFX Layer - @pytest.mark.test_case_id("C32078131") # PostFX Radius Weight Modifier - @pytest.mark.test_case_id("C32078117") # Light - @pytest.mark.test_case_id("C36525660") # Display Mapper - def test_AtomEditorComponents_AddedToEntity(self, request, editor, level, workspace, project, launcher_platform): - """ - Please review the hydra script run by this test for more specific test info. - Tests the Atom components & verifies all "expected_lines" appear in Editor.log - """ - cfg_args = [level] + enable_prefab_system = False + + @pytest.mark.test_case_id("C36525657") + class AtomEditorComponents_BloomAdded(EditorSharedTest): + from Atom.tests import hydra_AtomEditorComponents_BloomAdded as test_module + + @pytest.mark.test_case_id("C32078118") + class AtomEditorComponents_DecalAdded(EditorSharedTest): + from Atom.tests import hydra_AtomEditorComponents_DecalAdded as test_module + + @pytest.mark.test_case_id("C36525658") + class AtomEditorComponents_DeferredFogAdded(EditorSharedTest): + from Atom.tests import hydra_AtomEditorComponents_DeferredFogAdded as test_module + + @pytest.mark.test_case_id("C32078119") + class AtomEditorComponents_DepthOfFieldAdded(EditorSharedTest): + from Atom.tests import hydra_AtomEditorComponents_DepthOfFieldAdded as test_module + + @pytest.mark.test_case_id("C36525659") + class AtomEditorComponents_DiffuseProbeGridAdded(EditorSharedTest): + from Atom.tests import hydra_AtomEditorComponents_DiffuseProbeGridAdded as test_module + + @pytest.mark.test_case_id("C32078120") + class AtomEditorComponents_DirectionalLightAdded(EditorSharedTest): + from Atom.tests import hydra_AtomEditorComponents_DirectionalLightAdded as test_module + + @pytest.mark.test_case_id("C36525661") + class AtomEditorComponents_EntityReferenceAdded(EditorSharedTest): + from Atom.tests import hydra_AtomEditorComponents_EntityReferenceAdded as test_module + + @pytest.mark.test_case_id("C32078121") + class AtomEditorComponents_ExposureControlAdded(EditorSharedTest): + from Atom.tests import hydra_AtomEditorComponents_ExposureControlAdded as test_module + + @pytest.mark.test_case_id("C32078115") + class AtomEditorComponents_GlobalSkylightIBLAdded(EditorSharedTest): + from Atom.tests import hydra_AtomEditorComponents_GlobalSkylightIBLAdded as test_module + + @pytest.mark.test_case_id("C32078122") + class AtomEditorComponents_GridAdded(EditorSharedTest): + from Atom.tests import hydra_AtomEditorComponents_GridAdded as test_module + + @pytest.mark.test_case_id("C36525671") + class AtomEditorComponents_HDRColorGradingAdded(EditorSharedTest): + from Atom.tests import hydra_AtomEditorComponents_HDRColorGradingAdded as test_module + + @pytest.mark.test_case_id("C32078116") + class AtomEditorComponents_HDRiSkyboxAdded(EditorSharedTest): + from Atom.tests import hydra_AtomEditorComponents_HDRiSkyboxAdded as test_module + + @pytest.mark.test_case_id("C32078117") + class AtomEditorComponents_LightAdded(EditorSharedTest): + from Atom.tests import hydra_AtomEditorComponents_LightAdded as test_module + + @pytest.mark.test_case_id("C36525662") + class AtomEditorComponents_LookModificationAdded(EditorSharedTest): + from Atom.tests import hydra_AtomEditorComponents_LookModificationAdded as test_module + + @pytest.mark.test_case_id("C32078123") + class AtomEditorComponents_MaterialAdded(EditorSharedTest): + from Atom.tests import hydra_AtomEditorComponents_MaterialAdded as test_module + + @pytest.mark.test_case_id("C32078124") + class AtomEditorComponents_MeshAdded(EditorSharedTest): + from Atom.tests import hydra_AtomEditorComponents_MeshAdded as test_module + + @pytest.mark.test_case_id("C36525663") + class AtomEditorComponents_OcclusionCullingPlaneAdded(EditorSharedTest): + from Atom.tests import hydra_AtomEditorComponents_OcclusionCullingPlaneAdded as test_module + + @pytest.mark.test_case_id("C32078125") + class AtomEditorComponents_PhysicalSkyAdded(EditorSharedTest): + from Atom.tests import hydra_AtomEditorComponents_PhysicalSkyAdded as test_module + + @pytest.mark.test_case_id("C36525664") + class AtomEditorComponents_PostFXGradientWeightModifierAdded(EditorSharedTest): + from Atom.tests import hydra_AtomEditorComponents_PostFXGradientWeightModifierAdded as test_module + + @pytest.mark.test_case_id("C32078127") + class AtomEditorComponents_PostFXLayerAdded(EditorSharedTest): + from Atom.tests import hydra_AtomEditorComponents_PostFXLayerAdded as test_module + + @pytest.mark.test_case_id("C32078131") + class AtomEditorComponents_PostFXRadiusWeightModifierAdded(EditorSharedTest): + from Atom.tests import ( + hydra_AtomEditorComponents_PostFXRadiusWeightModifierAdded as test_module) + + @pytest.mark.test_case_id("C36525665") + class AtomEditorComponents_PostFXShapeWeightModifierAdded(EditorSharedTest): + from Atom.tests import hydra_AtomEditorComponents_PostFxShapeWeightModifierAdded as test_module + + @pytest.mark.test_case_id("C32078128") + class AtomEditorComponents_ReflectionProbeAdded(EditorSharedTest): + from Atom.tests import hydra_AtomEditorComponents_ReflectionProbeAdded as test_module + + @pytest.mark.test_case_id("C36525666") + class AtomEditorComponents_SSAOAdded(EditorSharedTest): + from Atom.tests import hydra_AtomEditorComponents_SSAOAdded as test_module + + class ShaderAssetBuilder_RecompilesShaderAsChainOfDependenciesChanges(EditorSharedTest): + from Atom.tests import hydra_ShaderAssetBuilder_RecompilesShaderAsChainOfDependenciesChanges as test_module + + +@pytest.mark.parametrize("project", ["AutomatedTesting"]) +@pytest.mark.parametrize("launcher_platform", ['windows_generic']) +class TestMaterialEditorBasicTests(object): + @pytest.fixture(autouse=True) + def setup_teardown(self, request, workspace, project): + def delete_files(): + file_system.delete( + [ + os.path.join(workspace.paths.project(), "Materials", "test_material.material"), + os.path.join(workspace.paths.project(), "Materials", "test_material_1.material"), + os.path.join(workspace.paths.project(), "Materials", "test_material_2.material"), + ], + True, + True, + ) + # Cleanup our newly created materials + delete_files() + + def teardown(): + # Cleanup our newly created materials + delete_files() + + request.addfinalizer(teardown) + + @pytest.mark.parametrize("exe_file_name", ["MaterialEditor"]) + @pytest.mark.test_case_id("C34448113") # Creating a New Asset. + @pytest.mark.test_case_id("C34448114") # Opening an Existing Asset. + @pytest.mark.test_case_id("C34448115") # Closing Selected Material. + @pytest.mark.test_case_id("C34448116") # Closing All Materials. + @pytest.mark.test_case_id("C34448117") # Closing all but Selected Material. + @pytest.mark.test_case_id("C34448118") # Saving Material. + @pytest.mark.test_case_id("C34448119") # Saving as a New Material. + @pytest.mark.test_case_id("C34448120") # Saving as a Child Material. + @pytest.mark.test_case_id("C34448121") # Saving all Open Materials. + def test_MaterialEditorBasicTests( + self, request, workspace, project, launcher_platform, generic_launcher, exe_file_name): expected_lines = [ - # Decal Component - "Decal Entity successfully created", - "Decal_test: Component added to the entity: True", - "Decal_test: Component removed after UNDO: True", - "Decal_test: Component added after REDO: True", - "Decal_test: Entered game mode: True", - "Decal_test: Exit game mode: True", - "Decal Controller|Configuration|Material: SUCCESS", - "Decal_test: Entity is hidden: True", - "Decal_test: Entity is shown: True", - "Decal_test: Entity deleted: True", - "Decal_test: UNDO entity deletion works: True", - "Decal_test: REDO entity deletion works: True", - # DepthOfField Component - "DepthOfField Entity successfully created", - "DepthOfField_test: Component added to the entity: True", - "DepthOfField_test: Component removed after UNDO: True", - "DepthOfField_test: Component added after REDO: True", - "DepthOfField_test: Entered game mode: True", - "DepthOfField_test: Exit game mode: True", - "DepthOfField_test: Entity disabled initially: True", - "DepthOfField_test: Entity enabled after adding required components: True", - "DepthOfField Controller|Configuration|Camera Entity: SUCCESS", - "DepthOfField_test: Entity is hidden: True", - "DepthOfField_test: Entity is shown: True", - "DepthOfField_test: Entity deleted: True", - "DepthOfField_test: UNDO entity deletion works: True", - "DepthOfField_test: REDO entity deletion works: True", - # Directional Light Component - "Directional Light Entity successfully created", - "Directional Light_test: Component added to the entity: True", - "Directional Light_test: Component removed after UNDO: True", - "Directional Light_test: Component added after REDO: True", - "Directional Light_test: Entered game mode: True", - "Directional Light_test: Exit game mode: True", - "Directional Light_test: Entity is hidden: True", - "Directional Light_test: Entity is shown: True", - "Directional Light_test: Entity deleted: True", - "Directional Light_test: UNDO entity deletion works: True", - "Directional Light_test: REDO entity deletion works: True", - # Exposure Control Component - "Exposure Control Entity successfully created", - "Exposure Control_test: Component added to the entity: True", - "Exposure Control_test: Component removed after UNDO: True", - "Exposure Control_test: Component added after REDO: True", - "Exposure Control_test: Entered game mode: True", - "Exposure Control_test: Exit game mode: True", - "Exposure Control_test: Entity disabled initially: True", - "Exposure Control_test: Entity enabled after adding required components: True", - "Exposure Control_test: Entity is hidden: True", - "Exposure Control_test: Entity is shown: True", - "Exposure Control_test: Entity deleted: True", - "Exposure Control_test: UNDO entity deletion works: True", - "Exposure Control_test: REDO entity deletion works: True", - # Global Skylight (IBL) Component - "Global Skylight (IBL) Entity successfully created", - "Global Skylight (IBL)_test: Component added to the entity: True", - "Global Skylight (IBL)_test: Component removed after UNDO: True", - "Global Skylight (IBL)_test: Component added after REDO: True", - "Global Skylight (IBL)_test: Entered game mode: True", - "Global Skylight (IBL)_test: Exit game mode: True", - "Global Skylight (IBL) Controller|Configuration|Diffuse Image: SUCCESS", - "Global Skylight (IBL) Controller|Configuration|Specular Image: SUCCESS", - "Global Skylight (IBL)_test: Entity is hidden: True", - "Global Skylight (IBL)_test: Entity is shown: True", - "Global Skylight (IBL)_test: Entity deleted: True", - "Global Skylight (IBL)_test: UNDO entity deletion works: True", - "Global Skylight (IBL)_test: REDO entity deletion works: True", - # Physical Sky Component - "Physical Sky Entity successfully created", - "Physical Sky component was added to entity", - "Entity has a Physical Sky component", - "Physical Sky_test: Component added to the entity: True", - "Physical Sky_test: Component removed after UNDO: True", - "Physical Sky_test: Component added after REDO: True", - "Physical Sky_test: Entered game mode: True", - "Physical Sky_test: Exit game mode: True", - "Physical Sky_test: Entity is hidden: True", - "Physical Sky_test: Entity is shown: True", - "Physical Sky_test: Entity deleted: True", - "Physical Sky_test: UNDO entity deletion works: True", - "Physical Sky_test: REDO entity deletion works: True", - # PostFX Layer Component - "PostFX Layer Entity successfully created", - "PostFX Layer_test: Component added to the entity: True", - "PostFX Layer_test: Component removed after UNDO: True", - "PostFX Layer_test: Component added after REDO: True", - "PostFX Layer_test: Entered game mode: True", - "PostFX Layer_test: Exit game mode: True", - "PostFX Layer_test: Entity is hidden: True", - "PostFX Layer_test: Entity is shown: True", - "PostFX Layer_test: Entity deleted: True", - "PostFX Layer_test: UNDO entity deletion works: True", - "PostFX Layer_test: REDO entity deletion works: True", - # PostFX Radius Weight Modifier Component - "PostFX Radius Weight Modifier Entity successfully created", - "PostFX Radius Weight Modifier_test: Component added to the entity: True", - "PostFX Radius Weight Modifier_test: Component removed after UNDO: True", - "PostFX Radius Weight Modifier_test: Component added after REDO: True", - "PostFX Radius Weight Modifier_test: Entered game mode: True", - "PostFX Radius Weight Modifier_test: Exit game mode: True", - "PostFX Radius Weight Modifier_test: Entity is hidden: True", - "PostFX Radius Weight Modifier_test: Entity is shown: True", - "PostFX Radius Weight Modifier_test: Entity deleted: True", - "PostFX Radius Weight Modifier_test: UNDO entity deletion works: True", - "PostFX Radius Weight Modifier_test: REDO entity deletion works: True", - # Light Component - "Light Entity successfully created", - "Light_test: Component added to the entity: True", - "Light_test: Component removed after UNDO: True", - "Light_test: Component added after REDO: True", - "Light_test: Entered game mode: True", - "Light_test: Exit game mode: True", - "Light_test: Entity is hidden: True", - "Light_test: Entity is shown: True", - "Light_test: Entity deleted: True", - "Light_test: UNDO entity deletion works: True", - "Light_test: REDO entity deletion works: True", - # Display Mapper Component - "Display Mapper Entity successfully created", - "Display Mapper_test: Component added to the entity: True", - "Display Mapper_test: Component removed after UNDO: True", - "Display Mapper_test: Component added after REDO: True", - "Display Mapper_test: Entered game mode: True", - "Display Mapper_test: Exit game mode: True", - "Display Mapper_test: Entity is hidden: True", - "Display Mapper_test: Entity is shown: True", - "Display Mapper_test: Entity deleted: True", - "Display Mapper_test: UNDO entity deletion works: True", - "Display Mapper_test: REDO entity deletion works: True", + "Material opened: True", + "Test asset doesn't exist initially: True", + "New asset created: True", + "New Material opened: True", + "Material closed: True", + "All documents closed: True", + "Close All Except Selected worked as expected: True", + "Actual Document saved with changes: True", + "Document saved as copy is saved with changes: True", + "Document saved as child is saved with changes: True", + "Save All worked as expected: True", ] - unexpected_lines = [ - "Trace::Assert", - "Trace::Error", - "Traceback (most recent call last):", + "Traceback (most recent call last):" ] hydra.launch_and_validate_results( request, TEST_DIRECTORY, - editor, - "hydra_AtomEditorComponents_AddedToEntity.py", - timeout=120, + generic_launcher, + "hydra_AtomMaterialEditor_BasicTests.py", + run_python="--runpython", + timeout=43, expected_lines=expected_lines, unexpected_lines=unexpected_lines, halt_on_unexpected=True, null_renderer=True, - cfg_args=cfg_args, + log_file_name="MaterialEditor.log", + enable_prefab_system=False, ) - - @pytest.mark.test_case_id("C34525095") - def test_AtomEditorComponents_LightComponent( - self, request, editor, workspace, project, launcher_platform, level): - """ - Please review the hydra script run by this test for more specific test info. - Tests that the Light component has the expected property options available to it. - """ - cfg_args = [level] - - expected_lines = [ - "light_entity Entity successfully created", - "Entity has a Light component", - "light_entity_test: Component added to the entity: True", - f"light_entity_test: Property value is {LIGHT_TYPES['sphere']} which matches {LIGHT_TYPES['sphere']}", - "Controller|Configuration|Shadows|Enable shadow set to True", - "light_entity Controller|Configuration|Shadows|Shadowmap size: SUCCESS", - "Controller|Configuration|Shadows|Shadow filter method set to 1", # PCF - "Controller|Configuration|Shadows|Filtering sample count set to 4", - "Controller|Configuration|Shadows|Filtering sample count set to 64", - "Controller|Configuration|Shadows|Shadow filter method set to 2", # ESM - "Controller|Configuration|Shadows|ESM exponent set to 50.0", - "Controller|Configuration|Shadows|ESM exponent set to 5000.0", - "Controller|Configuration|Shadows|Shadow filter method set to 3", # ESM+PCF - f"light_entity_test: Property value is {LIGHT_TYPES['spot_disk']} which matches {LIGHT_TYPES['spot_disk']}", - f"light_entity_test: Property value is {LIGHT_TYPES['capsule']} which matches {LIGHT_TYPES['capsule']}", - f"light_entity_test: Property value is {LIGHT_TYPES['quad']} which matches {LIGHT_TYPES['quad']}", - "light_entity Controller|Configuration|Fast approximation: SUCCESS", - "light_entity Controller|Configuration|Both directions: SUCCESS", - f"light_entity_test: Property value is {LIGHT_TYPES['polygon']} which matches {LIGHT_TYPES['polygon']}", - f"light_entity_test: Property value is {LIGHT_TYPES['simple_point']} " - f"which matches {LIGHT_TYPES['simple_point']}", - "Controller|Configuration|Attenuation radius|Mode set to 0", - "Controller|Configuration|Attenuation radius|Radius set to 100.0", - f"light_entity_test: Property value is {LIGHT_TYPES['simple_spot']} " - f"which matches {LIGHT_TYPES['simple_spot']}", - "Controller|Configuration|Shutters|Outer angle set to 45.0", - "Controller|Configuration|Shutters|Outer angle set to 90.0", - "light_entity_test: Component added to the entity: True", - "Light component test (non-GPU) completed.", - ] - - unexpected_lines = [ - "Trace::Assert", - "Trace::Error", - "Traceback (most recent call last):", - ] - - hydra.launch_and_validate_results( - request, - TEST_DIRECTORY, - editor, - "hydra_AtomEditorComponents_LightComponent.py", - timeout=120, - expected_lines=expected_lines, - unexpected_lines=unexpected_lines, - halt_on_unexpected=True, - null_renderer=True, - cfg_args=cfg_args, - ) - - diff --git a/AutomatedTesting/Gem/PythonTests/Atom/TestSuite_Main_GPU.py b/AutomatedTesting/Gem/PythonTests/Atom/TestSuite_Main_GPU.py index 23fb249761..14d850245c 100644 --- a/AutomatedTesting/Gem/PythonTests/Atom/TestSuite_Main_GPU.py +++ b/AutomatedTesting/Gem/PythonTests/Atom/TestSuite_Main_GPU.py @@ -4,131 +4,82 @@ For complete copyright and license terms please see the LICENSE at the root of t SPDX-License-Identifier: Apache-2.0 OR MIT """ - -import datetime import logging import os -import zipfile import pytest -import ly_test_tools.environment.file_system as file_system -from ly_test_tools.image.screenshot_compare_qssim import qssim as compare_screenshots -from ly_test_tools.benchmark.data_aggregator import BenchmarkDataAggregator - import editor_python_test_tools.hydra_test_utils as hydra +import ly_test_tools.environment.file_system as file_system +from ly_test_tools.benchmark.data_aggregator import BenchmarkDataAggregator +from ly_test_tools.o3de.editor_test import EditorSharedTest, EditorTestSuite +from Atom.atom_utils.atom_component_helper import compare_screenshot_to_golden_image, golden_images_directory -logger = logging.getLogger(__name__) DEFAULT_SUBFOLDER_PATH = 'user/PythonTests/Automated/Screenshots' -TEST_DIRECTORY = os.path.join(os.path.dirname(__file__), "tests") - - -def golden_images_directory(): - """ - Uses this file location to return the valid location for golden image files. - :return: The path to the golden_images directory, but raises an IOError if the golden_images directory is missing. - """ - current_file_directory = os.path.join(os.path.dirname(__file__)) - golden_images_dir = os.path.join(current_file_directory, 'golden_images') - - if not os.path.exists(golden_images_dir): - raise IOError( - f'golden_images" directory was not found at path "{golden_images_dir}"' - f'Please add a "golden_images" directory inside: "{current_file_directory}"' - ) - - return golden_images_dir - - -def create_screenshots_archive(screenshot_path): - """ - Creates a new zip file archive at archive_path containing all files listed within archive_path. - :param screenshot_path: location containing the files to archive, the zip archive file will also be saved here. - :return: None, but creates a new zip file archive inside path containing all of the files inside archive_path. - """ - files_to_archive = [] - - # Search for .png and .ppm files to add to the zip archive file. - for (folder_name, sub_folders, file_names) in os.walk(screenshot_path): - for file_name in file_names: - if file_name.endswith(".png") or file_name.endswith(".ppm"): - file_path = os.path.join(folder_name, file_name) - files_to_archive.append(file_path) - - # Setup variables for naming the zip archive file. - timestamp = datetime.datetime.now().timestamp() - formatted_timestamp = datetime.datetime.utcfromtimestamp(timestamp).strftime("%Y-%m-%d_%H-%M-%S") - screenshots_file = os.path.join(screenshot_path, f'zip_archive_{formatted_timestamp}.zip') - - # Write all of the valid .png and .ppm files to the archive file. - with zipfile.ZipFile(screenshots_file, 'w', compression=zipfile.ZIP_DEFLATED, allowZip64=True) as zip_archive: - for file_path in files_to_archive: - file_name = os.path.basename(file_path) - zip_archive.write(file_path, file_name) +logger = logging.getLogger(__name__) @pytest.mark.parametrize("project", ["AutomatedTesting"]) -@pytest.mark.parametrize("launcher_platform", ["windows_editor"]) -@pytest.mark.parametrize("level", ["auto_test"]) -class TestAllComponentsIndepthTests(object): +@pytest.mark.parametrize("launcher_platform", ['windows_editor']) +class TestAutomation(EditorTestSuite): + # Remove -autotest_mode from global_extra_cmdline_args since we need rendering for these tests. + global_extra_cmdline_args = ["-BatchMode"] # Default is ["-BatchMode", "-autotest_mode"] + + enable_prefab_system = False - @pytest.mark.parametrize("screenshot_name", ["AtomBasicLevelSetup.ppm"]) @pytest.mark.test_case_id("C34603773") - def test_BasicLevelSetup_SetsUpLevel( - self, request, editor, workspace, project, launcher_platform, level, screenshot_name): - """ - Please review the hydra script run by this test for more specific test info. - Tests that a basic rendering level setup can be created (lighting, meshes, materials, etc.). - """ + class AtomGPU_BasicLevelSetup_SetsUpLevel(EditorSharedTest): + use_null_renderer = False # Default is True + screenshot_name = "AtomBasicLevelSetup.ppm" + test_screenshots = [] # Gets set by setup() + screenshot_directory = "" # Gets set by setup() + # Clear existing test screenshots before starting test. - screenshot_directory = os.path.join(workspace.paths.project(), DEFAULT_SUBFOLDER_PATH) - test_screenshots = [os.path.join(screenshot_directory, screenshot_name)] - file_system.delete(test_screenshots, True, True) + def setup(self, workspace): + screenshot_directory = os.path.join(workspace.paths.project(), DEFAULT_SUBFOLDER_PATH) + test_screenshots = [os.path.join(screenshot_directory, self.screenshot_name)] + file_system.delete(test_screenshots, True, True) golden_images = [os.path.join(golden_images_directory(), screenshot_name)] - level_creation_expected_lines = [ - "Viewport is set to the expected size: True", - "Exited game mode" - ] - unexpected_lines = [ - "Trace::Assert", - "Trace::Error", - "Traceback (most recent call last):", - "Screenshot failed" - ] + from Atom.tests import hydra_AtomGPU_BasicLevelSetup as test_module - hydra.launch_and_validate_results( - request, - TEST_DIRECTORY, - editor, - "hydra_GPUTest_BasicLevelSetup.py", - timeout=180, - expected_lines=level_creation_expected_lines, - unexpected_lines=unexpected_lines, - halt_on_unexpected=True, - cfg_args=[level], - null_renderer=False, - ) - - for test_screenshot, golden_screenshot in zip(test_screenshots, golden_images): - compare_screenshots(test_screenshot, golden_screenshot) - - create_screenshots_archive(screenshot_directory) + assert compare_screenshot_to_golden_image(screenshot_directory, test_screenshots, golden_images, 0.99) is True @pytest.mark.test_case_id("C34525095") - def test_LightComponent_ScreenshotMatchesGoldenImage( - self, request, editor, workspace, project, launcher_platform, level): - """ - Please review the hydra script run by this test for more specific test info. - Tests that the Light component screenshots in a rendered level appear the same as the golden images. - """ + class AtomGPU_LightComponent_AreaLightScreenshotsMatchGoldenImages(EditorSharedTest): + use_null_renderer = False # Default is True screenshot_names = [ "AreaLight_1.ppm", "AreaLight_2.ppm", "AreaLight_3.ppm", "AreaLight_4.ppm", "AreaLight_5.ppm", + ] + test_screenshots = [] # Gets set by setup() + screenshot_directory = "" # Gets set by setup() + + # Clear existing test screenshots before starting test. + def setup(self, workspace): + screenshot_directory = os.path.join(workspace.paths.project(), DEFAULT_SUBFOLDER_PATH) + for screenshot in self.screenshot_names: + screenshot_path = os.path.join(screenshot_directory, screenshot) + self.test_screenshots.append(screenshot_path) + file_system.delete(self.test_screenshots, True, True) + + golden_images = [] + for golden_image in screenshot_names: + golden_image_path = os.path.join(golden_images_directory(), golden_image) + golden_images.append(golden_image_path) + + from Atom.tests import hydra_AtomGPU_AreaLightScreenshotTest as test_module + + assert compare_screenshot_to_golden_image(screenshot_directory, test_screenshots, golden_images, 0.99) is True + + @pytest.mark.test_case_id("C34525110") + class AtomGPU_LightComponent_SpotLightScreenshotsMatchGoldenImages(EditorSharedTest): + use_null_renderer = False # Default is True + screenshot_names = [ "SpotLight_1.ppm", "SpotLight_2.ppm", "SpotLight_3.ppm", @@ -136,42 +87,25 @@ class TestAllComponentsIndepthTests(object): "SpotLight_5.ppm", "SpotLight_6.ppm", ] - screenshot_directory = os.path.join(workspace.paths.project(), DEFAULT_SUBFOLDER_PATH) - test_screenshots = [] - for screenshot in screenshot_names: - screenshot_path = os.path.join(screenshot_directory, screenshot) - test_screenshots.append(screenshot_path) - file_system.delete(test_screenshots, True, True) + test_screenshots = [] # Gets set by setup() + screenshot_directory = "" # Gets set by setup() + + # Clear existing test screenshots before starting test. + def setup(self, workspace): + screenshot_directory = os.path.join(workspace.paths.project(), DEFAULT_SUBFOLDER_PATH) + for screenshot in self.screenshot_names: + screenshot_path = os.path.join(screenshot_directory, screenshot) + self.test_screenshots.append(screenshot_path) + file_system.delete(self.test_screenshots, True, True) golden_images = [] for golden_image in screenshot_names: golden_image_path = os.path.join(golden_images_directory(), golden_image) golden_images.append(golden_image_path) - expected_lines = ["spot_light Controller|Configuration|Shadows|Shadowmap size: SUCCESS"] - unexpected_lines = [ - "Trace::Assert", - "Trace::Error", - "Traceback (most recent call last):", - "Screenshot failed", - ] - hydra.launch_and_validate_results( - request, - TEST_DIRECTORY, - editor, - "hydra_GPUTest_LightComponent.py", - timeout=180, - expected_lines=expected_lines, - unexpected_lines=unexpected_lines, - halt_on_unexpected=True, - cfg_args=[level], - null_renderer=False, - ) + from Atom.tests import hydra_AtomGPU_SpotLightScreenshotTest as test_module - for test_screenshot, golden_screenshot in zip(test_screenshots, golden_images): - compare_screenshots(test_screenshot, golden_screenshot) - - create_screenshots_archive(screenshot_directory) + assert compare_screenshot_to_golden_image(screenshot_directory, test_screenshots, golden_images, 0.99) is True @pytest.mark.parametrize('rhi', ['dx12', 'vulkan']) @@ -202,7 +136,7 @@ class TestPerformanceBenchmarkSuite(object): hydra.launch_and_validate_results( request, - TEST_DIRECTORY, + os.path.join(os.path.dirname(__file__), "tests"), editor, "hydra_GPUTest_AtomFeatureIntegrationBenchmark.py", timeout=600, @@ -211,6 +145,7 @@ class TestPerformanceBenchmarkSuite(object): halt_on_unexpected=True, cfg_args=[level], null_renderer=False, + enable_prefab_system=False, ) aggregator = BenchmarkDataAggregator(workspace, logger, 'periodic') @@ -219,7 +154,6 @@ class TestPerformanceBenchmarkSuite(object): @pytest.mark.parametrize("project", ["AutomatedTesting"]) @pytest.mark.parametrize("launcher_platform", ['windows_generic']) -@pytest.mark.system class TestMaterialEditor(object): @pytest.mark.parametrize("cfg_args,expected_lines", [ @@ -239,7 +173,7 @@ class TestMaterialEditor(object): hydra.launch_and_validate_results( request, - TEST_DIRECTORY, + os.path.join(os.path.dirname(__file__), "tests"), generic_launcher, editor_script="", run_python="--runpython", @@ -249,5 +183,6 @@ class TestMaterialEditor(object): halt_on_unexpected=False, null_renderer=False, cfg_args=[cfg_args], - log_file_name="MaterialEditor.log" + log_file_name="MaterialEditor.log", + enable_prefab_system=False, ) diff --git a/AutomatedTesting/Gem/PythonTests/Atom/TestSuite_Main_GPU_Optimized.py b/AutomatedTesting/Gem/PythonTests/Atom/TestSuite_Main_GPU_Optimized.py deleted file mode 100644 index 568768e12e..0000000000 --- a/AutomatedTesting/Gem/PythonTests/Atom/TestSuite_Main_GPU_Optimized.py +++ /dev/null @@ -1,44 +0,0 @@ -""" -Copyright (c) Contributors to the Open 3D Engine Project. -For complete copyright and license terms please see the LICENSE at the root of this distribution. - -SPDX-License-Identifier: Apache-2.0 OR MIT -""" -import os - -import pytest - -import ly_test_tools.environment.file_system as file_system -from ly_test_tools.o3de.editor_test import EditorSharedTest, EditorTestSuite -from ly_test_tools.image.screenshot_compare_qssim import qssim as compare_screenshots -from .atom_utils.atom_component_helper import create_screenshots_archive, golden_images_directory - -DEFAULT_SUBFOLDER_PATH = 'user/PythonTests/Automated/Screenshots' - - -@pytest.mark.xfail(reason="Optimized tests are experimental, we will enable xfail and monitor them temporarily.") -@pytest.mark.parametrize("project", ["AutomatedTesting"]) -@pytest.mark.parametrize("launcher_platform", ['windows_editor']) -class TestAutomation(EditorTestSuite): - # Remove -autotest_mode from global_extra_cmdline_args since we need rendering for these tests. - global_extra_cmdline_args = ["-BatchMode"] # Default is ["-BatchMode", "-autotest_mode"] - - @pytest.mark.test_case_id("C34603773") - class AtomGPU_BasicLevelSetup_SetsUpLevel(EditorSharedTest): - use_null_renderer = False # Default is True - screenshot_name = "AtomBasicLevelSetup.ppm" - test_screenshots = [] # Gets set by setup() - screenshot_directory = "" # Gets set by setup() - - # Clear existing test screenshots before starting test. - def setup(self, workspace): - screenshot_directory = os.path.join(workspace.paths.project(), DEFAULT_SUBFOLDER_PATH) - test_screenshots = [os.path.join(screenshot_directory, self.screenshot_name)] - file_system.delete(test_screenshots, True, True) - - from Atom.tests import hydra_AtomGPU_BasicLevelSetup as test_module - - golden_images = [os.path.join(golden_images_directory(), screenshot_name)] - for test_screenshot, golden_screenshot in zip(test_screenshots, golden_images): - compare_screenshots(test_screenshot, golden_screenshot) - create_screenshots_archive(screenshot_directory) diff --git a/AutomatedTesting/Gem/PythonTests/Atom/TestSuite_Main_Optimized.py b/AutomatedTesting/Gem/PythonTests/Atom/TestSuite_Main_Optimized.py deleted file mode 100644 index 45298ed563..0000000000 --- a/AutomatedTesting/Gem/PythonTests/Atom/TestSuite_Main_Optimized.py +++ /dev/null @@ -1,83 +0,0 @@ -""" -Copyright (c) Contributors to the Open 3D Engine Project. -For complete copyright and license terms please see the LICENSE at the root of this distribution. - -SPDX-License-Identifier: Apache-2.0 OR MIT -""" -import pytest - -from ly_test_tools.o3de.editor_test import EditorSharedTest, EditorTestSuite - - -@pytest.mark.xfail(reason="Optimized tests are experimental, we will enable xfail and monitor them temporarily.") -@pytest.mark.parametrize("project", ["AutomatedTesting"]) -@pytest.mark.parametrize("launcher_platform", ['windows_editor']) -class TestAutomation(EditorTestSuite): - - @pytest.mark.test_case_id("C32078118") - class AtomEditorComponents_DecalAdded(EditorSharedTest): - from Atom.tests import hydra_AtomEditorComponents_DecalAdded as test_module - - @pytest.mark.test_case_id("C32078119") - class AtomEditorComponents_DepthOfFieldAdded(EditorSharedTest): - from Atom.tests import hydra_AtomEditorComponents_DepthOfFieldAdded as test_module - - @pytest.mark.test_case_id("C32078120") - class AtomEditorComponents_DirectionalLightAdded(EditorSharedTest): - from Atom.tests import hydra_AtomEditorComponents_DirectionalLightAdded as test_module - - @pytest.mark.test_case_id("C36525660") - class AtomEditorComponents_DisplayMapperAdded(EditorSharedTest): - from Atom.tests import hydra_AtomEditorComponents_DisplayMapperAdded as test_module - - @pytest.mark.test_case_id("C32078121") - class AtomEditorComponents_ExposureControlAdded(EditorSharedTest): - from Atom.tests import hydra_AtomEditorComponents_ExposureControlAdded as test_module - - @pytest.mark.test_case_id("C32078115") - class AtomEditorComponents_GlobalSkylightIBLAdded(EditorSharedTest): - from Atom.tests import hydra_AtomEditorComponents_GlobalSkylightIBLAdded as test_module - - @pytest.mark.test_case_id("C32078122") - class AtomEditorComponents_GridAdded(EditorSharedTest): - from Atom.tests import hydra_AtomEditorComponents_GridAdded as test_module - - @pytest.mark.test_case_id("C32078117") - class AtomEditorComponents_LightAdded(EditorSharedTest): - from Atom.tests import hydra_AtomEditorComponents_LightAdded as test_module - - @pytest.mark.test_case_id("C32078123") - class AtomEditorComponents_MaterialAdded(EditorSharedTest): - from Atom.tests import hydra_AtomEditorComponents_MaterialAdded as test_module - - @pytest.mark.test_case_id("C32078124") - class AtomEditorComponents_MeshAdded(EditorSharedTest): - from Atom.tests import hydra_AtomEditorComponents_MeshAdded as test_module - - @pytest.mark.test_case_id("C32078125") - class AtomEditorComponents_PhysicalSkyAdded(EditorSharedTest): - from Atom.tests import hydra_AtomEditorComponents_PhysicalSkyAdded as test_module - - @pytest.mark.test_case_id("C36525664") - class AtomEditorComponents_PostFXGradientWeightModifierAdded(EditorSharedTest): - from Atom.tests import hydra_AtomEditorComponents_PostFXGradientWeightModifierAdded as test_module - - @pytest.mark.test_case_id("C32078127") - class AtomEditorComponents_PostFXLayerAdded(EditorSharedTest): - from Atom.tests import hydra_AtomEditorComponents_PostFXLayerAdded as test_module - - @pytest.mark.test_case_id("C32078131") - class AtomEditorComponents_PostFXRadiusWeightModifierAdded(EditorSharedTest): - from Atom.tests import ( - hydra_AtomEditorComponents_PostFXRadiusWeightModifierAdded as test_module) - - @pytest.mark.test_case_id("C36525665") - class AtomEditorComponents_PostFXShapeWeightModifierAdded(EditorSharedTest): - from Atom.tests import hydra_AtomEditorComponents_PostFxShapeWeightModifierAdded as test_module - - @pytest.mark.test_case_id("C32078128") - class AtomEditorComponents_ReflectionProbeAdded(EditorSharedTest): - from Atom.tests import hydra_AtomEditorComponents_ReflectionProbeAdded as test_module - - class ShaderAssetBuilder_RecompilesShaderAsChainOfDependenciesChanges(EditorSharedTest): - from Atom.tests import hydra_ShaderAssetBuilder_RecompilesShaderAsChainOfDependenciesChanges as test_module diff --git a/AutomatedTesting/Gem/PythonTests/Atom/TestSuite_Sandbox.py b/AutomatedTesting/Gem/PythonTests/Atom/TestSuite_Sandbox.py index ad45e51080..c9182070f6 100644 --- a/AutomatedTesting/Gem/PythonTests/Atom/TestSuite_Sandbox.py +++ b/AutomatedTesting/Gem/PythonTests/Atom/TestSuite_Sandbox.py @@ -9,132 +9,97 @@ import os import pytest +import ly_test_tools.environment.file_system as file_system import editor_python_test_tools.hydra_test_utils as hydra +from ly_test_tools.o3de.editor_test import EditorSharedTest, EditorTestSuite +from Atom.atom_utils.atom_constants import LIGHT_TYPES + logger = logging.getLogger(__name__) TEST_DIRECTORY = os.path.join(os.path.dirname(__file__), "tests") -class TestAtomEditorComponentsSandbox(object): - - # It requires at least one test - def test_Dummy(self, request, editor, level, workspace, project, launcher_platform): - pass - - @pytest.mark.parametrize("project", ["AutomatedTesting"]) - @pytest.mark.parametrize("launcher_platform", ['windows_editor']) - @pytest.mark.parametrize("level", ["auto_test"]) - class TestAtomEditorComponentsMain(object): - """Holds tests for Atom components.""" - - @pytest.mark.test_case_id("C32078128") - def test_AtomEditorComponents_ReflectionProbeAddedToEntity( - self, request, editor, level, workspace, project, launcher_platform): - """ - Please review the hydra script run by this test for more specific test info. - Tests the following Atom components and verifies all "expected_lines" appear in Editor.log: - 1. Reflection Probe - """ - cfg_args = [level] - - expected_lines = [ - # Reflection Probe Component - "Reflection Probe Entity successfully created", - "Reflection Probe_test: Component added to the entity: True", - "Reflection Probe_test: Component removed after UNDO: True", - "Reflection Probe_test: Component added after REDO: True", - "Reflection Probe_test: Entered game mode: True", - "Reflection Probe_test: Exit game mode: True", - "Reflection Probe_test: Entity disabled initially: True", - "Reflection Probe_test: Entity enabled after adding required components: True", - "Reflection Probe_test: Cubemap is generated: True", - "Reflection Probe_test: Entity is hidden: True", - "Reflection Probe_test: Entity is shown: True", - "Reflection Probe_test: Entity deleted: True", - "Reflection Probe_test: UNDO entity deletion works: True", - "Reflection Probe_test: REDO entity deletion works: True", - ] - - hydra.launch_and_validate_results( - request, - TEST_DIRECTORY, - editor, - "hydra_AtomEditorComponents_AddedToEntity.py", - timeout=120, - expected_lines=expected_lines, - unexpected_lines=[], - halt_on_unexpected=True, - null_renderer=True, - cfg_args=cfg_args, - ) @pytest.mark.parametrize("project", ["AutomatedTesting"]) -@pytest.mark.parametrize("launcher_platform", ['windows_generic']) -@pytest.mark.system -class TestMaterialEditorBasicTests(object): - @pytest.fixture(autouse=True) - def setup_teardown(self, request, workspace, project): - def delete_files(): - file_system.delete( - [ - os.path.join(workspace.paths.project(), "Materials", "test_material.material"), - os.path.join(workspace.paths.project(), "Materials", "test_material_1.material"), - os.path.join(workspace.paths.project(), "Materials", "test_material_2.material"), - ], - True, - True, - ) - # Cleanup our newly created materials - delete_files() +@pytest.mark.parametrize("launcher_platform", ['windows_editor']) +@pytest.mark.parametrize("level", ["auto_test"]) +class TestAtomEditorComponentsMain(object): + """Holds tests for Atom components.""" - def teardown(): - # Cleanup our newly created materials - delete_files() - - request.addfinalizer(teardown) - - @pytest.mark.parametrize("exe_file_name", ["MaterialEditor"]) - @pytest.mark.test_case_id("C34448113") # Creating a New Asset. - @pytest.mark.test_case_id("C34448114") # Opening an Existing Asset. - @pytest.mark.test_case_id("C34448115") # Closing Selected Material. - @pytest.mark.test_case_id("C34448116") # Closing All Materials. - @pytest.mark.test_case_id("C34448117") # Closing all but Selected Material. - @pytest.mark.test_case_id("C34448118") # Saving Material. - @pytest.mark.test_case_id("C34448119") # Saving as a New Material. - @pytest.mark.test_case_id("C34448120") # Saving as a Child Material. - @pytest.mark.test_case_id("C34448121") # Saving all Open Materials. - def test_MaterialEditorBasicTests( - self, request, workspace, project, launcher_platform, generic_launcher, exe_file_name): + @pytest.mark.test_case_id("C34525095") + def test_AtomEditorComponents_LightComponent( + self, request, editor, workspace, project, launcher_platform, level): + """ + Please review the hydra script run by this test for more specific test info. + Tests that the Light component has the expected property options available to it. + """ + cfg_args = [level] expected_lines = [ - "Material opened: True", - "Test asset doesn't exist initially: True", - "New asset created: True", - "New Material opened: True", - "Material closed: True", - "All documents closed: True", - "Close All Except Selected worked as expected: True", - "Actual Document saved with changes: True", - "Document saved as copy is saved with changes: True", - "Document saved as child is saved with changes: True", - "Save All worked as expected: True", - ] - unexpected_lines = [ - # "Trace::Assert", - # "Trace::Error", - "Traceback (most recent call last):" + "light_entity Entity successfully created", + "Entity has a Light component", + "light_entity_test: Component added to the entity: True", + f"light_entity_test: Property value is {LIGHT_TYPES['sphere']} which matches {LIGHT_TYPES['sphere']}", + "Controller|Configuration|Shadows|Enable shadow set to True", + "light_entity Controller|Configuration|Shadows|Shadowmap size: SUCCESS", + "Controller|Configuration|Shadows|Shadow filter method set to 1", # PCF + "Controller|Configuration|Shadows|Filtering sample count set to 4", + "Controller|Configuration|Shadows|Filtering sample count set to 64", + "Controller|Configuration|Shadows|Shadow filter method set to 2", # ESM + "Controller|Configuration|Shadows|ESM exponent set to 50.0", + "Controller|Configuration|Shadows|ESM exponent set to 5000.0", + "Controller|Configuration|Shadows|Shadow filter method set to 3", # ESM+PCF + f"light_entity_test: Property value is {LIGHT_TYPES['spot_disk']} which matches {LIGHT_TYPES['spot_disk']}", + f"light_entity_test: Property value is {LIGHT_TYPES['capsule']} which matches {LIGHT_TYPES['capsule']}", + f"light_entity_test: Property value is {LIGHT_TYPES['quad']} which matches {LIGHT_TYPES['quad']}", + "light_entity Controller|Configuration|Fast approximation: SUCCESS", + "light_entity Controller|Configuration|Both directions: SUCCESS", + f"light_entity_test: Property value is {LIGHT_TYPES['polygon']} which matches {LIGHT_TYPES['polygon']}", + f"light_entity_test: Property value is {LIGHT_TYPES['simple_point']} " + f"which matches {LIGHT_TYPES['simple_point']}", + "Controller|Configuration|Attenuation radius|Mode set to 0", + "Controller|Configuration|Attenuation radius|Radius set to 100.0", + f"light_entity_test: Property value is {LIGHT_TYPES['simple_spot']} " + f"which matches {LIGHT_TYPES['simple_spot']}", + "Controller|Configuration|Shutters|Outer angle set to 45.0", + "Controller|Configuration|Shutters|Outer angle set to 90.0", + "light_entity_test: Component added to the entity: True", + "Light component test (non-GPU) completed.", ] + unexpected_lines = ["Traceback (most recent call last):"] + hydra.launch_and_validate_results( request, TEST_DIRECTORY, - generic_launcher, - "hydra_AtomMaterialEditor_BasicTests.py", - run_python="--runpython", + editor, + "hydra_AtomEditorComponents_LightComponent.py", timeout=120, expected_lines=expected_lines, unexpected_lines=unexpected_lines, halt_on_unexpected=True, null_renderer=True, - log_file_name="MaterialEditor.log", + cfg_args=cfg_args, + enable_prefab_system=False, ) + +@pytest.mark.parametrize("project", ["AutomatedTesting"]) +@pytest.mark.parametrize("launcher_platform", ['windows_editor']) +class TestAutomation(EditorTestSuite): + + enable_prefab_system = False + + #this test is intermittently timing out without ever having executed. sandboxing while we investigate cause. + @pytest.mark.test_case_id("C36525660") + class AtomEditorComponents_DisplayMapperAdded(EditorSharedTest): + from Atom.tests import hydra_AtomEditorComponents_DisplayMapperAdded as test_module + + # this test causes editor to crash when using slices. once automation transitions to prefabs it should pass + @pytest.mark.test_case_id("C36529666") + class AtomEditorComponentsLevel_DiffuseGlobalIlluminationAdded(EditorSharedTest): + from Atom.tests import hydra_AtomEditorComponentsLevel_DiffuseGlobalIlluminationAdded as test_module + + # this test causes editor to crash when using slices. once automation transitions to prefabs it should pass + @pytest.mark.test_case_id("C36525660") + class AtomEditorComponentsLevel_DisplayMapperAdded(EditorSharedTest): + from Atom.tests import hydra_AtomEditorComponentsLevel_DisplayMapperAdded as test_module diff --git a/AutomatedTesting/Gem/PythonTests/Atom/atom_utils/atom_component_helper.py b/AutomatedTesting/Gem/PythonTests/Atom/atom_utils/atom_component_helper.py index 11832f8846..5fdd4c810d 100644 --- a/AutomatedTesting/Gem/PythonTests/Atom/atom_utils/atom_component_helper.py +++ b/AutomatedTesting/Gem/PythonTests/Atom/atom_utils/atom_component_helper.py @@ -1,5 +1,6 @@ """ -Copyright (c) Contributors to the Open 3D Engine Project. For complete copyright and license terms please see the LICENSE at the root of this distribution. +Copyright (c) Contributors to the Open 3D Engine Project. +For complete copyright and license terms please see the LICENSE at the root of this distribution. SPDX-License-Identifier: Apache-2.0 OR MIT @@ -8,12 +9,19 @@ import datetime import os import zipfile +from ly_test_tools.image.screenshot_compare_qssim import qssim as compare_screenshots + + +class ImageComparisonTestFailure(Exception): + """Custom test failure for failed image comparisons.""" + pass + def create_screenshots_archive(screenshot_path): """ Creates a new zip file archive at archive_path containing all files listed within archive_path. :param screenshot_path: location containing the files to archive, the zip archive file will also be saved here. - :return: None, but creates a new zip file archive inside path containing all of the files inside archive_path. + :return: path to the created .zip file archive. """ files_to_archive = [] @@ -27,14 +35,16 @@ def create_screenshots_archive(screenshot_path): # Setup variables for naming the zip archive file. timestamp = datetime.datetime.now().timestamp() formatted_timestamp = datetime.datetime.utcfromtimestamp(timestamp).strftime("%Y-%m-%d_%H-%M-%S") - screenshots_file = os.path.join(screenshot_path, f'screenshots_{formatted_timestamp}.zip') + screenshots_zip_file = os.path.join(screenshot_path, f'screenshots_{formatted_timestamp}.zip') # Write all of the valid .png and .ppm files to the archive file. - with zipfile.ZipFile(screenshots_file, 'w', compression=zipfile.ZIP_DEFLATED, allowZip64=True) as zip_archive: + with zipfile.ZipFile(screenshots_zip_file, 'w', compression=zipfile.ZIP_DEFLATED, allowZip64=True) as zip_archive: for file_path in files_to_archive: file_name = os.path.basename(file_path) zip_archive.write(file_path, file_name) + return screenshots_zip_file + def golden_images_directory(): """ @@ -53,177 +63,195 @@ def golden_images_directory(): return golden_images_dir -def create_basic_atom_level(level_name): +def compare_screenshot_similarity( + test_screenshot, golden_image, similarity_threshold, create_zip_archive=False, screenshot_directory=""): """ - Creates a new level inside the Editor matching level_name & adds the following: - 1. "default_level" entity to hold all other entities. - 2. Adds Grid, Global Skylight (IBL), ground Mesh, Directional Light, Sphere w/ material+mesh, & Camera components. - 3. Each of these components has its settings tweaked slightly to match the ideal scene to test Atom rendering. - :param level_name: name of the level to create and apply this basic setup to. + Compares the similarity between a test screenshot and a golden image. + It returns a "Screenshots match" string if the comparison mean value is higher than the similarity threshold. + Otherwise, it returns an error string. + :param test_screenshot: path to the test screenshot to compare. + :param golden_image: path to the golden image to compare. + :param similarity_threshold: value for the comparison mean value to be asserted against. + :param create_zip_archive: toggle to create a zip archive containing the screenshots if the assert check fails. + :param screenshot_directory: directory containing screenshots to create zip archive from. + :return: Error string if compared mean value < similarity threshold or screenshot_directory is missing for .zip, + otherwise it returns a "Screenshots match" string. + """ + result = "Screenshots match" + if create_zip_archive and not screenshot_directory: + result = 'You must specify a screenshot_directory in order to create a zip archive.\n' + + mean_similarity = compare_screenshots(test_screenshot, golden_image) + if not mean_similarity > similarity_threshold: + if create_zip_archive: + create_screenshots_archive(screenshot_directory) + result = ( + f"When comparing the test_screenshot: '{test_screenshot}' " + f"to golden_image: '{golden_image}' the mean similarity of '{mean_similarity}' " + f"was lower than the similarity threshold of '{similarity_threshold}'. ") + + return result + + +def compare_screenshot_to_golden_image( + screenshot_directory, test_screenshots, golden_images, similarity_threshold=0.99): + """ + Compares a list of test_screenshots to a list of golden_images and return True if they match within the + similarity threshold set. Otherwise, it will raise ImageComparisonTestFailure with a failure message. + :param screenshot_directory: path to the directory containing screenshots for creating .zip archives. + :param test_screenshots: list of test screenshot path strings. + :param golden_images: list of golden image path strings. + :param similarity_threshold: float threshold tolerance to set when comparing screenshots to golden images. + """ + for test_screenshot, golden_image in zip(test_screenshots, golden_images): + screenshot_comparison_result = compare_screenshot_similarity( + test_screenshot, golden_image, similarity_threshold, True, screenshot_directory) + if screenshot_comparison_result != "Screenshots match": + raise ImageComparisonTestFailure(f"Screenshot test failed: {screenshot_comparison_result}") + + return True + + +def initial_viewport_setup(screen_width=1280, screen_height=720): + """ + For setting up the initial viewport resolution to expected default values before running a screenshot test. + Defaults to 1280 x 720 resolution (in pixels). + :param screen_width: Width in pixels to set the viewport width size to. + :param screen_height: Height in pixels to set the viewport height size to. :return: None """ - import azlmbr.asset as asset - import azlmbr.bus as bus - import azlmbr.camera as camera - import azlmbr.editor as editor - import azlmbr.entity as entity import azlmbr.legacy.general as general - import azlmbr.math as math - import azlmbr.object - import editor_python_test_tools.hydra_editor_utils as hydra - from editor_python_test_tools.editor_test_helper import EditorTestHelper - - helper = EditorTestHelper(log_prefix="Atom_EditorTestHelper") - - # Create a new level. - new_level_name = level_name - heightmap_resolution = 512 - heightmap_meters_per_pixel = 1 - terrain_texture_resolution = 412 - use_terrain = False - - # Return codes are ECreateLevelResult defined in CryEdit.h - return_code = general.create_level_no_prompt( - new_level_name, heightmap_resolution, heightmap_meters_per_pixel, terrain_texture_resolution, use_terrain) - if return_code == 1: - general.log(f"{new_level_name} level already exists") - elif return_code == 2: - general.log("Failed to create directory") - elif return_code == 3: - general.log("Directory length is too long") - elif return_code != 0: - general.log("Unknown error, failed to create level") - else: - general.log(f"{new_level_name} level created successfully") - - # Enable idle and update viewport. - general.idle_enable(True) - general.idle_wait(1.0) - general.update_viewport() - general.idle_wait(0.5) # half a second is more than enough for updating the viewport. - - # Close out problematic windows, FPS meters, and anti-aliasing. - if general.is_helpers_shown(): # Turn off the helper gizmos if visible - general.toggle_helpers() - general.idle_wait(1.0) - if general.is_pane_visible("Error Report"): # Close Error Report windows that block focus. - general.close_pane("Error Report") - if general.is_pane_visible("Error Log"): # Close Error Log windows that block focus. - general.close_pane("Error Log") - general.idle_wait(1.0) - general.run_console("r_displayInfo=0") - general.idle_wait(1.0) - - # Delete all existing entities & create default_level entity - search_filter = azlmbr.entity.SearchFilter() - all_entities = entity.SearchBus(azlmbr.bus.Broadcast, "SearchEntities", search_filter) - editor.ToolsApplicationRequestBus(bus.Broadcast, "DeleteEntities", all_entities) - default_level = hydra.Entity("default_level") - default_position = math.Vector3(0.0, 0.0, 0.0) - default_level.create_entity(default_position, ["Grid"]) - default_level.get_set_test(0, "Controller|Configuration|Secondary Grid Spacing", 1.0) - - # Set the viewport up correctly after adding the parent default_level entity. - screen_width = 1280 - screen_height = 720 - degree_radian_factor = 0.0174533 # Used by "Rotation" property for the Transform component. general.set_viewport_size(screen_width, screen_height) general.update_viewport() - helper.wait_for_condition( - function=lambda: helper.isclose(a=general.get_viewport_size().x, b=screen_width, rel_tol=0.1) - and helper.isclose(a=general.get_viewport_size().y, b=screen_height, rel_tol=0.1), - timeout_in_seconds=4.0 - ) - result = helper.isclose(a=general.get_viewport_size().x, b=screen_width, rel_tol=0.1) and helper.isclose( - a=general.get_viewport_size().y, b=screen_height, rel_tol=0.1) - general.log(general.get_viewport_size().x) - general.log(general.get_viewport_size().y) - general.log(general.get_viewport_size().z) - general.log(f"Viewport is set to the expected size: {result}") - general.log("Basic level created") - general.run_console("r_DisplayInfo = 0") - # Create global_skylight entity and set the properties - global_skylight = hydra.Entity("global_skylight") - global_skylight.create_entity( - entity_position=default_position, - components=["HDRi Skybox", "Global Skylight (IBL)"], - parent_id=default_level.id) - global_skylight_asset_path = os.path.join( - "LightingPresets", "greenwich_park_02_4k_iblskyboxcm_iblspecular.exr.streamingimage") - global_skylight_asset_value = asset.AssetCatalogRequestBus( - bus.Broadcast, "GetAssetIdByPath", global_skylight_asset_path, math.Uuid(), False) - global_skylight.get_set_test(0, "Controller|Configuration|Cubemap Texture", global_skylight_asset_value) - global_skylight.get_set_test(1, "Controller|Configuration|Diffuse Image", global_skylight_asset_value) - global_skylight.get_set_test(1, "Controller|Configuration|Specular Image", global_skylight_asset_value) - # Create ground_plane entity and set the properties - ground_plane = hydra.Entity("ground_plane") - ground_plane.create_entity( - entity_position=default_position, - components=["Material"], - parent_id=default_level.id) - azlmbr.components.TransformBus(azlmbr.bus.Event, "SetLocalUniformScale", ground_plane.id, 32.0) - ground_plane_material_asset_path = os.path.join( - "Materials", "Presets", "PBR", "metal_chrome.azmaterial") - ground_plane_material_asset_value = asset.AssetCatalogRequestBus( - bus.Broadcast, "GetAssetIdByPath", ground_plane_material_asset_path, math.Uuid(), False) - ground_plane.get_set_test(0, "Default Material|Material Asset", ground_plane_material_asset_value) +def enter_exit_game_mode_take_screenshot(screenshot_name, enter_game_tuple, exit_game_tuple, timeout_in_seconds=4): + """ + Enters game mode, takes a screenshot named screenshot_name (must include file extension), and exits game mode. + :param screenshot_name: string representing the name of the screenshot file, including file extension. + :param enter_game_tuple: tuple where the 1st string is success & 2nd string is failure for entering the game. + :param exit_game_tuple: tuple where the 1st string is success & 2nd string is failure for exiting the game. + :param timeout_in_seconds: int or float seconds to wait for entering/exiting game mode. + :return: None + """ + import azlmbr.legacy.general as general - # Work around to add the correct Atom Mesh component - mesh_type_id = azlmbr.globals.property.EditorMeshComponentTypeId - ground_plane.components.append( - editor.EditorComponentAPIBus( - bus.Broadcast, "AddComponentsOfType", ground_plane.id, [mesh_type_id] - ).GetValue()[0] - ) - ground_plane_mesh_asset_path = os.path.join("Models", "plane.azmodel") - ground_plane_mesh_asset_value = asset.AssetCatalogRequestBus( - bus.Broadcast, "GetAssetIdByPath", ground_plane_mesh_asset_path, math.Uuid(), False) - ground_plane.get_set_test(1, "Controller|Configuration|Mesh Asset", ground_plane_mesh_asset_value) + from editor_python_test_tools.utils import TestHelper - # Create directional_light entity and set the properties - directional_light = hydra.Entity("directional_light") - directional_light.create_entity( - entity_position=math.Vector3(0.0, 0.0, 10.0), - components=["Directional Light"], - parent_id=default_level.id) - directional_light_rotation = math.Vector3(degree_radian_factor * -90.0, 0.0, 0.0) - azlmbr.components.TransformBus( - azlmbr.bus.Event, "SetLocalRotation", directional_light.id, directional_light_rotation) + from Atom.atom_utils.screenshot_utils import ScreenshotHelper - # Create sphere entity and set the properties - sphere_entity = hydra.Entity("sphere") - sphere_entity.create_entity( - entity_position=math.Vector3(0.0, 0.0, 1.0), - components=["Material"], - parent_id=default_level.id) - sphere_material_asset_path = os.path.join("Materials", "Presets", "PBR", "metal_brass_polished.azmaterial") - sphere_material_asset_value = asset.AssetCatalogRequestBus( - bus.Broadcast, "GetAssetIdByPath", sphere_material_asset_path, math.Uuid(), False) - sphere_entity.get_set_test(0, "Default Material|Material Asset", sphere_material_asset_value) + TestHelper.enter_game_mode(enter_game_tuple) + TestHelper.wait_for_condition(function=lambda: general.is_in_game_mode(), timeout_in_seconds=timeout_in_seconds) + ScreenshotHelper(general.idle_wait_frames).capture_screenshot_blocking(screenshot_name) + TestHelper.exit_game_mode(exit_game_tuple) + TestHelper.wait_for_condition(function=lambda: not general.is_in_game_mode(), timeout_in_seconds=timeout_in_seconds) - # Work around to add the correct Atom Mesh component - sphere_entity.components.append( - editor.EditorComponentAPIBus( - bus.Broadcast, "AddComponentsOfType", sphere_entity.id, [mesh_type_id] - ).GetValue()[0] - ) + +def create_basic_atom_rendering_scene(): + """ + Sets up a new scene inside the Editor for testing Atom rendering GPU output. + Setup: Deletes all existing entities before creating the scene. + The created scene includes: + 1. "Default Level" entity that holds all of the other entities. + 2. "Grid" entity: Contains a Grid component. + 3. "Global Skylight (IBL)" entity: Contains HDRI Skybox & Global Skylight (IBL) components. + 4. "Ground Plane" entity: Contains Material & Mesh components. + 5. "Directional Light" entity: Contains Directional Light component. + 6. "Sphere" entity: Contains Material & Mesh components. + 7. "Camera" entity: Contains Camera component. + :return: None + """ + import azlmbr.math as math + import azlmbr.paths + + from editor_python_test_tools.asset_utils import Asset + from editor_python_test_tools.editor_entity_utils import EditorEntity + + from Atom.atom_utils.atom_constants import AtomComponentProperties + + DEGREE_RADIAN_FACTOR = 0.0174533 + + # Setup: Deletes all existing entities before creating the scene. + search_filter = azlmbr.entity.SearchFilter() + all_entities = azlmbr.entity.SearchBus(azlmbr.bus.Broadcast, "SearchEntities", search_filter) + azlmbr.editor.ToolsApplicationRequestBus(azlmbr.bus.Broadcast, "DeleteEntities", all_entities) + + # 1. "Default Level" entity that holds all of the other entities. + default_level_entity_name = "Default Level" + default_level_entity = EditorEntity.create_editor_entity_at(math.Vector3(0.0, 0.0, 0.0), default_level_entity_name) + + # 2. "Grid" entity: Contains a Grid component. + grid_entity = EditorEntity.create_editor_entity(AtomComponentProperties.grid(), default_level_entity.id) + grid_component = grid_entity.add_component(AtomComponentProperties.grid()) + secondary_grid_spacing_value = 1.0 + grid_component.set_component_property_value( + AtomComponentProperties.grid('Secondary Grid Spacing'), secondary_grid_spacing_value) + + # 3. "Global Skylight (IBL)" entity: Contains HDRI Skybox & Global Skylight (IBL) components. + global_skylight_entity = EditorEntity.create_editor_entity( + AtomComponentProperties.global_skylight(), default_level_entity.id) + hdri_skybox_component = global_skylight_entity.add_component(AtomComponentProperties.hdri_skybox()) + global_skylight_component = global_skylight_entity.add_component(AtomComponentProperties.global_skylight()) + global_skylight_image_asset_path = os.path.join("LightingPresets", "default_iblskyboxcm.exr.streamingimage") + global_skylight_image_asset = Asset.find_asset_by_path(global_skylight_image_asset_path, False) + hdri_skybox_component.set_component_property_value( + AtomComponentProperties.hdri_skybox('Cubemap Texture'), global_skylight_image_asset.id) + global_skylight_diffuse_image_asset_path = os.path.join( + "LightingPresets", "default_iblskyboxcm_ibldiffuse.exr.streamingimage") + global_skylight_diffuse_image_asset = Asset.find_asset_by_path(global_skylight_diffuse_image_asset_path, False) + global_skylight_component.set_component_property_value( + AtomComponentProperties.global_skylight('Diffuse Image'), global_skylight_diffuse_image_asset.id) + global_skylight_specular_image_asset_path = os.path.join( + "LightingPresets", "default_iblskyboxcm_iblspecular.exr.streamingimage") + global_skylight_specular_image_asset = Asset.find_asset_by_path( + global_skylight_specular_image_asset_path, False) + global_skylight_component.set_component_property_value( + AtomComponentProperties.global_skylight('Specular Image'), global_skylight_specular_image_asset.id) + + # 4. "Ground Plane" entity: Contains Material & Mesh components. + ground_plane_name = "Ground Plane" + ground_plane_entity = EditorEntity.create_editor_entity(ground_plane_name, default_level_entity.id) + ground_plane_material_component = ground_plane_entity.add_component(AtomComponentProperties.material()) + ground_plane_entity.set_local_uniform_scale(32.0) + ground_plane_mesh_component = ground_plane_entity.add_component(AtomComponentProperties.mesh()) + ground_plane_mesh_asset_path = os.path.join("TestData", "Objects", "plane.azmodel") + ground_plane_mesh_asset = Asset.find_asset_by_path(ground_plane_mesh_asset_path, False) + ground_plane_mesh_component.set_component_property_value( + AtomComponentProperties.mesh('Mesh Asset'), ground_plane_mesh_asset.id) + ground_plane_material_asset_path = os.path.join("Materials", "Presets", "PBR", "metal_chrome.azmaterial") + ground_plane_material_asset = Asset.find_asset_by_path(ground_plane_material_asset_path, False) + ground_plane_material_component.set_component_property_value( + AtomComponentProperties.material('Material Asset'), ground_plane_material_asset.id) + + # 5. "Directional Light" entity: Contains Directional Light component. + directional_light_entity = EditorEntity.create_editor_entity_at( + math.Vector3(0.0, 0.0, 10.0), AtomComponentProperties.directional_light(), default_level_entity.id) + directional_light_entity.add_component(AtomComponentProperties.directional_light()) + directional_light_entity_rotation = math.Vector3(DEGREE_RADIAN_FACTOR * -90.0, 0.0, 0.0) + directional_light_entity.set_local_rotation(directional_light_entity_rotation) + + # 6. "Sphere" entity: Contains Material & Mesh components. + sphere_entity = EditorEntity.create_editor_entity_at( + math.Vector3(0.0, 0.0, 1.0), "Sphere", default_level_entity.id) + sphere_mesh_component = sphere_entity.add_component(AtomComponentProperties.mesh()) sphere_mesh_asset_path = os.path.join("Models", "sphere.azmodel") - sphere_mesh_asset_value = asset.AssetCatalogRequestBus( - bus.Broadcast, "GetAssetIdByPath", sphere_mesh_asset_path, math.Uuid(), False) - sphere_entity.get_set_test(1, "Controller|Configuration|Mesh Asset", sphere_mesh_asset_value) + sphere_mesh_asset = Asset.find_asset_by_path(sphere_mesh_asset_path, False) + sphere_mesh_component.set_component_property_value( + AtomComponentProperties.mesh('Mesh Asset'), sphere_mesh_asset.id) + sphere_material_component = sphere_entity.add_component(AtomComponentProperties.material()) + sphere_material_asset_path = os.path.join("Materials", "Presets", "PBR", "metal_brass_polished.azmaterial") + sphere_material_asset = Asset.find_asset_by_path(sphere_material_asset_path, False) + sphere_material_component.set_component_property_value( + AtomComponentProperties.material('Material Asset'), sphere_material_asset.id) - # Create camera component and set the properties - camera_entity = hydra.Entity("camera") - camera_entity.create_entity( - entity_position=math.Vector3(5.5, -12.0, 9.0), - components=["Camera"], - parent_id=default_level.id) - rotation = math.Vector3( - degree_radian_factor * -27.0, degree_radian_factor * -12.0, degree_radian_factor * 25.0 - ) - azlmbr.components.TransformBus(azlmbr.bus.Event, "SetLocalRotation", camera_entity.id, rotation) - camera_entity.get_set_test(0, "Controller|Configuration|Field of view", 60.0) - camera.EditorCameraViewRequestBus(azlmbr.bus.Event, "ToggleCameraAsActiveView", camera_entity.id) + # 7. "Camera" entity: Contains Camera component. + camera_entity = EditorEntity.create_editor_entity_at( + math.Vector3(5.5, -12.0, 9.0), AtomComponentProperties.camera(), default_level_entity.id) + camera_component = camera_entity.add_component(AtomComponentProperties.camera()) + camera_entity_rotation = math.Vector3( + DEGREE_RADIAN_FACTOR * -27.0, DEGREE_RADIAN_FACTOR * -12.0, DEGREE_RADIAN_FACTOR * 25.0) + camera_entity.set_local_rotation(camera_entity_rotation) + camera_fov_value = 60.0 + camera_component.set_component_property_value(AtomComponentProperties.camera('Field of view'), camera_fov_value) + azlmbr.camera.EditorCameraViewRequestBus(azlmbr.bus.Event, "ToggleCameraAsActiveView", camera_entity.id) diff --git a/AutomatedTesting/Gem/PythonTests/Atom/atom_utils/atom_constants.py b/AutomatedTesting/Gem/PythonTests/Atom/atom_utils/atom_constants.py index 344a0dbd29..e6d6ac7fb1 100644 --- a/AutomatedTesting/Gem/PythonTests/Atom/atom_utils/atom_constants.py +++ b/AutomatedTesting/Gem/PythonTests/Atom/atom_utils/atom_constants.py @@ -19,6 +19,20 @@ LIGHT_TYPES = { } +# Attenuation Radius Mode options for the Light component. +ATTENUATION_RADIUS_MODE = { + 'automatic': 1, + 'explicit': 0, +} + +# Qualiity Level settings for Diffuse Global Illumination level component +GLOBAL_ILLUMINATION_QUALITY = { + 'Low': 0, + 'Medium': 1, + 'High': 2, +} + + class AtomComponentProperties: """ Holds Atom component related constants @@ -42,12 +56,14 @@ class AtomComponentProperties: Bloom component properties. Requires PostFX Layer component. - 'requires' a list of component names as strings required by this component. Use editor_entity_utils EditorEntity.add_components(list) to add this list of requirements.\n + - 'Enable Bloom' Toggle active state of the component True/False :param property: From the last element of the property tree path. Default 'name' for component name string. :return: Full property path OR component name if no property specified. """ properties = { 'name': 'Bloom', 'requires': [AtomComponentProperties.postfx_layer()], + 'Enable Bloom': 'Controller|Configuration|Enable Bloom', } return properties[property] @@ -55,11 +71,13 @@ class AtomComponentProperties: def camera(property: str = 'name') -> str: """ Camera component properties. + - 'Field of view': Sets the value for the camera's FOV (Field of View) in degrees, i.e. 60.0 :param property: From the last element of the property tree path. Default 'name' for component name string. :return: Full property path OR component name if no property specified. """ properties = { 'name': 'Camera', + 'Field of view': 'Controller|Configuration|Field of view' } return properties[property] @@ -83,12 +101,14 @@ class AtomComponentProperties: Deferred Fog component properties. Requires PostFX Layer component. - 'requires' a list of component names as strings required by this component. Use editor_entity_utils EditorEntity.add_components(list) to add this list of requirements.\n + - 'Enable Deferred Fog' Toggle active state of the component True/False :param property: From the last element of the property tree path. Default 'name' for component name string. :return: Full property path OR component name if no property specified. """ properties = { 'name': 'Deferred Fog', 'requires': [AtomComponentProperties.postfx_layer()], + 'Enable Deferred Fog': 'Controller|Configuration|Enable Deferred Fog', } return properties[property] @@ -111,7 +131,22 @@ class AtomComponentProperties: return properties[property] @staticmethod - def diffuse_probe(property: str = 'name') -> str: + def diffuse_global_illumination(property: str = 'name') -> str: + """ + Diffuse Global Illumination level component properties. + Controls global settings for Diffuse Probe Grid components. + - 'Quality Level' from atom_constants.py GLOBAL_ILLUMINATION_QUALITY + :param property: From the last element of the property tree path. Default 'name' for component name string. + :return: Full property path OR component name if no property specified. + """ + properties = { + 'name': 'Diffuse Global Illumination', + 'Quality Level': 'Controller|Configuration|Quality Level' + } + return properties[property] + + @staticmethod + def diffuse_probe_grid(property: str = 'name') -> str: """ Diffuse Probe Grid component properties. Requires one of 'shapes'. - 'shapes' a list of supported shapes as component names. @@ -142,12 +177,17 @@ class AtomComponentProperties: @staticmethod def display_mapper(property: str = 'name') -> str: """ - Display Mapper component properties. + Display Mapper level component properties. + - 'Enable LDR color grading LUT' toggles the use of LDR color grading LUT + - 'LDR color Grading LUT' is the Low Definition Range (LDR) color grading for Look-up Textures (LUT) which is + an Asset.id value corresponding to a lighting asset file. :param property: From the last element of the property tree path. Default 'name' for component name string. :return: Full property path OR component name if no property specified. """ properties = { 'name': 'Display Mapper', + 'Enable LDR color grading LUT': 'Controller|Configuration|Enable LDR color grading LUT', + 'LDR color Grading LUT': 'Controller|Configuration|LDR color Grading LUT', } return properties[property] @@ -198,11 +238,13 @@ class AtomComponentProperties: def grid(property: str = 'name') -> str: """ Grid component properties. + - 'Secondary Grid Spacing': The spacing value for the secondary grid, i.e. 1.0 :param property: From the last element of the property tree path. Default 'name' for component name string. :return: Full property path OR component name if no property specified. """ properties = { 'name': 'Grid', + 'Secondary Grid Spacing': 'Controller|Configuration|Secondary Grid Spacing', } return properties[property] @@ -212,12 +254,14 @@ class AtomComponentProperties: HDR Color Grading component properties. Requires PostFX Layer component. - 'requires' a list of component names as strings required by this component. Use editor_entity_utils EditorEntity.add_components(list) to add this list of requirements.\n + - 'Enable HDR color grading' Toggle active state of the component True/False :param property: From the last element of the property tree path. Default 'name' for component name string. :return: Full property path OR component name if no property specified. """ properties = { 'name': 'HDR Color Grading', 'requires': [AtomComponentProperties.postfx_layer()], + 'Enable HDR color grading': 'Controller|Configuration|Enable HDR color grading', } return properties[property] @@ -225,11 +269,13 @@ class AtomComponentProperties: def hdri_skybox(property: str = 'name') -> str: """ HDRi Skybox component properties. + - 'Cubemap Texture': Asset.id for the cubemap texture to set. :param property: From the last element of the property tree path. Default 'name' for component name string. :return: Full property path OR component name if no property specified. """ properties = { 'name': 'HDRi Skybox', + 'Cubemap Texture': 'Controller|Configuration|Cubemap Texture', } return properties[property] @@ -237,13 +283,27 @@ class AtomComponentProperties: def light(property: str = 'name') -> str: """ Light component properties. + - 'Attenuation Radius Mode' controls whether the attenuation radius is calculated automatically or explicitly. + - 'Color' the RGB value to set for the color of the light. + - 'Enable shadow' toggle for enabling shadows for the light. + - 'Enable shutters' toggle for enabling shutters for the light. + - 'Inner angle' inner angle value for the shutters (in degrees) + - 'Intensity' the intensity of the light in the set photometric unit (float with no ceiling). - 'Light type' from atom_constants.py LIGHT_TYPES + - 'Outer angle' outer angle value for the shutters (in degrees) :param property: From the last element of the property tree path. Default 'name' for component name string. :return: Full property path OR component name if no property specified. """ properties = { 'name': 'Light', + 'Attenuation Radius Mode': 'Controller|Configuration|Attenuation radius|Mode', + 'Color': 'Controller|Configuration|Color', + 'Enable shadow': 'Controller|Configuration|Shadows|Enable shadow', + 'Enable shutters': 'Controller|Configuration|Shutters|Enable shutters', + 'Inner angle': 'Controller|Configuration|Shutters|Inner angle', + 'Intensity': 'Controller|Configuration|Intensity', 'Light type': 'Controller|Configuration|Light type', + 'Outer angle': 'Controller|Configuration|Shutters|Outer angle', } return properties[property] @@ -253,12 +313,16 @@ class AtomComponentProperties: Look Modification component properties. Requires PostFX Layer component. - 'requires' a list of component names as strings required by this component. Use editor_entity_utils EditorEntity.add_components(list) to add this list of requirements.\n + - 'Enable look modification' Toggle active state of the component True/False + - 'Color Grading LUT' Asset.id for the LUT used for affecting level look. :param property: From the last element of the property tree path. Default 'name' for component name string. :return: Full property path OR component name if no property specified. """ properties = { 'name': 'Look Modification', 'requires': [AtomComponentProperties.postfx_layer()], + 'Enable look modification': 'Controller|Configuration|Enable look modification', + 'Color Grading LUT': 'Controller|Configuration|Color Grading LUT', } return properties[property] @@ -268,12 +332,14 @@ class AtomComponentProperties: Material component properties. Requires one of Actor OR Mesh component. - 'requires' a list of component names as strings required by this component. Only one of these is required at a time for this component.\n + - 'Material Asset': the material Asset.id of the material. :param property: From the last element of the property tree path. Default 'name' for component name string. :return: Full property path OR component name if no property specified. """ properties = { 'name': 'Material', 'requires': [AtomComponentProperties.actor(), AtomComponentProperties.mesh()], + 'Material Asset': 'Default Material|Material Asset', } return properties[property] @@ -372,7 +438,7 @@ class AtomComponentProperties: 'name': 'PostFX Shape Weight Modifier', 'requires': [AtomComponentProperties.postfx_layer()], 'shapes': ['Axis Aligned Box Shape', 'Box Shape', 'Capsule Shape', 'Compound Shape', 'Cylinder Shape', - 'Disk Shape', 'Polygon Prism Shape', 'Quad Shape', 'Sphere Shape', 'Vegetation Reference Shape'], + 'Disk Shape', 'Polygon Prism Shape', 'Quad Shape', 'Sphere Shape', 'Shape Reference'], } return properties[property] diff --git a/AutomatedTesting/Gem/PythonTests/Atom/atom_utils/material_editor_utils.py b/AutomatedTesting/Gem/PythonTests/Atom/atom_utils/material_editor_utils.py index b21c74de19..f7ff970541 100644 --- a/AutomatedTesting/Gem/PythonTests/Atom/atom_utils/material_editor_utils.py +++ b/AutomatedTesting/Gem/PythonTests/Atom/atom_utils/material_editor_utils.py @@ -162,6 +162,13 @@ def select_model_config(configname): azlmbr.materialeditor.MaterialViewportRequestBus(azlmbr.bus.Broadcast, "SelectModelPresetByName", configname) +def destroy_main_window(): + """ + Closes the Material Editor window + """ + azlmbr.atomtools.AtomToolsMainWindowFactoryRequestBus(azlmbr.bus.Broadcast, "DestroyMainWindow") + + def wait_for_condition(function, timeout_in_seconds=1.0): # type: (function, float) -> bool """ diff --git a/AutomatedTesting/Gem/PythonTests/Atom/golden_images/AreaLight_1.ppm b/AutomatedTesting/Gem/PythonTests/Atom/golden_images/AreaLight_1.ppm index 0725999dcf..8695f6bb93 100644 --- a/AutomatedTesting/Gem/PythonTests/Atom/golden_images/AreaLight_1.ppm +++ b/AutomatedTesting/Gem/PythonTests/Atom/golden_images/AreaLight_1.ppm @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:954d7d0df47c840a24e313893800eb3126d0c0d47c3380926776b51833778db7 +oid sha256:aee1fd4d5264e5ef1676b507409ce70af6358cf1ff368d9aeb17f7b2597dfbca size 6220817 diff --git a/AutomatedTesting/Gem/PythonTests/Atom/golden_images/AreaLight_2.ppm b/AutomatedTesting/Gem/PythonTests/Atom/golden_images/AreaLight_2.ppm index 3a45bd31e3..d45d3f1581 100644 --- a/AutomatedTesting/Gem/PythonTests/Atom/golden_images/AreaLight_2.ppm +++ b/AutomatedTesting/Gem/PythonTests/Atom/golden_images/AreaLight_2.ppm @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:e81c19128f42ba362a2d5f3ccf159dfbc942d67ceeb1ac8c21f295a6fd9d2ce5 +oid sha256:d4787cdafbcc2fe71c1cb3f1da53a249db839a9df539a9e88be43ccd6d8e4d6a size 6220817 diff --git a/AutomatedTesting/Gem/PythonTests/Atom/golden_images/AreaLight_3.ppm b/AutomatedTesting/Gem/PythonTests/Atom/golden_images/AreaLight_3.ppm index 15d679b784..0661ead69f 100644 --- a/AutomatedTesting/Gem/PythonTests/Atom/golden_images/AreaLight_3.ppm +++ b/AutomatedTesting/Gem/PythonTests/Atom/golden_images/AreaLight_3.ppm @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:5e20801213e065b6ea8c95ede81c23faa9b6dc70a2002dc5bced293e1bed989f +oid sha256:5fac5bf41c9b16b6fbd762868e5cf514376af92d6ef7ebb9e819f024f1a3e1a7 size 6220817 diff --git a/AutomatedTesting/Gem/PythonTests/Atom/golden_images/AreaLight_4.ppm b/AutomatedTesting/Gem/PythonTests/Atom/golden_images/AreaLight_4.ppm index 85c083a386..a7fc77f0ec 100644 --- a/AutomatedTesting/Gem/PythonTests/Atom/golden_images/AreaLight_4.ppm +++ b/AutomatedTesting/Gem/PythonTests/Atom/golden_images/AreaLight_4.ppm @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:e250f812e594e5152bf2d6f23caa8b53b78276bfdf344d7a8d355dd96cb995c0 +oid sha256:7a23969670499524725535e8be7428b55b6f3e887cc24e2e903f7ea821a6d1a5 size 6220817 diff --git a/AutomatedTesting/Gem/PythonTests/Atom/golden_images/AreaLight_5.ppm b/AutomatedTesting/Gem/PythonTests/Atom/golden_images/AreaLight_5.ppm index d575de761e..7404ab3ccc 100644 --- a/AutomatedTesting/Gem/PythonTests/Atom/golden_images/AreaLight_5.ppm +++ b/AutomatedTesting/Gem/PythonTests/Atom/golden_images/AreaLight_5.ppm @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:95be359041f8291c74b335297a4dfe9902a180510f24a181b15e1a5ba4d3b024 +oid sha256:2f1f4d8865c56ed7f96f339c39e5feb4e0dbc6c6a8b4a7843b4166381b06b00d size 6220817 diff --git a/AutomatedTesting/Gem/PythonTests/Atom/golden_images/AtomBasicLevelSetup.ppm b/AutomatedTesting/Gem/PythonTests/Atom/golden_images/AtomBasicLevelSetup.ppm index ef41b6cf77..acfbe57900 100644 --- a/AutomatedTesting/Gem/PythonTests/Atom/golden_images/AtomBasicLevelSetup.ppm +++ b/AutomatedTesting/Gem/PythonTests/Atom/golden_images/AtomBasicLevelSetup.ppm @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:07e09d3eb5bf0cee3d9b3752aaad40f3ead1dcc5ddd837a6226fadde55d57274 +oid sha256:5d4ee5641e19eef08dd6b93d2f4054a1aae2165325416ed2cbf0b8243f2c0b06 size 6220817 diff --git a/AutomatedTesting/Gem/PythonTests/Atom/golden_images/SpotLight_1.ppm b/AutomatedTesting/Gem/PythonTests/Atom/golden_images/SpotLight_1.ppm index bbbd127929..3104088689 100644 --- a/AutomatedTesting/Gem/PythonTests/Atom/golden_images/SpotLight_1.ppm +++ b/AutomatedTesting/Gem/PythonTests/Atom/golden_images/SpotLight_1.ppm @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:118e43e4b915e262726183467cc4b82f244565213fea5b6bfe02be07f0851ab1 +oid sha256:55c8f0d1790bb12660b7557630efca297b2a1b59e6c93167a2563da79e0a8255 size 6220817 diff --git a/AutomatedTesting/Gem/PythonTests/Atom/golden_images/SpotLight_2.ppm b/AutomatedTesting/Gem/PythonTests/Atom/golden_images/SpotLight_2.ppm index 8e716fabcc..287ec406e1 100644 --- a/AutomatedTesting/Gem/PythonTests/Atom/golden_images/SpotLight_2.ppm +++ b/AutomatedTesting/Gem/PythonTests/Atom/golden_images/SpotLight_2.ppm @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:dc2ce3256a6552975962c9e113c52c1a22bf3817d417151f6f60640dd568e0fa +oid sha256:082ff368b621e12b083d96562a0889b11a1d683767a74296cbe6d8732830e9e8 size 6220817 diff --git a/AutomatedTesting/Gem/PythonTests/Atom/golden_images/SpotLight_3.ppm b/AutomatedTesting/Gem/PythonTests/Atom/golden_images/SpotLight_3.ppm index 6b6a5a5d6e..9de8785f65 100644 --- a/AutomatedTesting/Gem/PythonTests/Atom/golden_images/SpotLight_3.ppm +++ b/AutomatedTesting/Gem/PythonTests/Atom/golden_images/SpotLight_3.ppm @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:287d98890b35427688999760f9d066bcbff1a3bc9001534241dc212b32edabd8 +oid sha256:78cc62d89782899747875b41abee57c2efdfacf4c8af6511c88f82d76eaae4ca size 6220817 diff --git a/AutomatedTesting/Gem/PythonTests/Atom/golden_images/SpotLight_4.ppm b/AutomatedTesting/Gem/PythonTests/Atom/golden_images/SpotLight_4.ppm index eb05228cc2..93acc14dbc 100644 --- a/AutomatedTesting/Gem/PythonTests/Atom/golden_images/SpotLight_4.ppm +++ b/AutomatedTesting/Gem/PythonTests/Atom/golden_images/SpotLight_4.ppm @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:66e91c92c868167c850078cd91714db47e10a96e23cc30191994486bd79c353f +oid sha256:3d6719326f4dacae278d1723090ce1182193b793f250963af8be4b2c298e8841 size 6220817 diff --git a/AutomatedTesting/Gem/PythonTests/Atom/golden_images/SpotLight_5.ppm b/AutomatedTesting/Gem/PythonTests/Atom/golden_images/SpotLight_5.ppm index 5e12edc46d..9cd58caae5 100644 --- a/AutomatedTesting/Gem/PythonTests/Atom/golden_images/SpotLight_5.ppm +++ b/AutomatedTesting/Gem/PythonTests/Atom/golden_images/SpotLight_5.ppm @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:d950d173f5101820c5e18205401ca08ce5feeff2302ac2920b292750d86a8fa4 +oid sha256:9e492bb394fb18fb117f8a5b61cd2789922f9d6e88fc83189b5b6d59ffb1c3ef size 6220817 diff --git a/AutomatedTesting/Gem/PythonTests/Atom/golden_images/SpotLight_6.ppm b/AutomatedTesting/Gem/PythonTests/Atom/golden_images/SpotLight_6.ppm index d442d90287..136eecbaaf 100644 --- a/AutomatedTesting/Gem/PythonTests/Atom/golden_images/SpotLight_6.ppm +++ b/AutomatedTesting/Gem/PythonTests/Atom/golden_images/SpotLight_6.ppm @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:72eddb7126eae0c839b933886e0fb69d78229f72d49ef13199de28df2b7879db +oid sha256:caca85f7728f660daae36afc81d681ba2de2377c516eb3c637599de5c94012aa size 6220817 diff --git a/AutomatedTesting/Gem/PythonTests/Atom/tests/hydra_AtomEditorComponentsLevel_DiffuseGlobalIlluminationAdded.py b/AutomatedTesting/Gem/PythonTests/Atom/tests/hydra_AtomEditorComponentsLevel_DiffuseGlobalIlluminationAdded.py new file mode 100644 index 0000000000..ddcd5c3c46 --- /dev/null +++ b/AutomatedTesting/Gem/PythonTests/Atom/tests/hydra_AtomEditorComponentsLevel_DiffuseGlobalIlluminationAdded.py @@ -0,0 +1,109 @@ +""" +Copyright (c) Contributors to the Open 3D Engine Project. +For complete copyright and license terms please see the LICENSE at the root of this distribution. + +SPDX-License-Identifier: Apache-2.0 OR MIT +""" + +class Tests: + creation_undo = ( + "UNDO Level component addition success", + "UNDO Level component addition failed") + creation_redo = ( + "REDO Level component addition success", + "REDO Level component addition failed") + diffuse_global_illumination_component = ( + "Level has a Diffuse Global Illumination component", + "Level failed to find Diffuse Global Illumination component") + diffuse_global_illumination_quality = ( + "Quality Level set", + "Quality Level could not be set") + enter_game_mode = ( + "Entered game mode", + "Failed to enter game mode") + exit_game_mode = ( + "Exited game mode", + "Couldn't exit game mode") + + +def AtomEditorComponentsLevel_DiffuseGlobalIllumination_AddedToEntity(): + """ + Summary: + Tests the Diffuse Global Illumination level component can be added to the level entity and is stable. + + Test setup: + - Wait for Editor idle loop. + - Open the "Base" level. + + Expected Behavior: + The component can be added, used in game mode, and has accurate required components. + Creation and deletion undo/redo should also work. + + Test Steps: + 1) Add Diffuse Global Illumination level component to the level entity. + 2) UNDO the level component addition. + 3) REDO the level component addition. + 4) Set Quality Level property to Low + 5) Enter/Exit game mode. + 6) Look for errors and asserts. + + :return: None + """ + + import azlmbr.legacy.general as general + + from editor_python_test_tools.editor_entity_utils import EditorLevelEntity + from editor_python_test_tools.utils import Report, Tracer, TestHelper + from Atom.atom_utils.atom_constants import AtomComponentProperties, GLOBAL_ILLUMINATION_QUALITY + + with Tracer() as error_tracer: + # Test setup begins. + # Setup: Wait for Editor idle loop before executing Python hydra scripts then open "Base" level. + TestHelper.init_idle() + TestHelper.open_level("", "Base") + + # Test steps begin. + # 1. Add Diffuse Global Illumination level component to the level entity. + diffuse_global_illumination_component = EditorLevelEntity.add_component( + AtomComponentProperties.diffuse_global_illumination()) + Report.critical_result( + Tests.diffuse_global_illumination_component, + EditorLevelEntity.has_component(AtomComponentProperties.diffuse_global_illumination())) + + # 2. UNDO the level component addition. + # -> UNDO component addition. + general.undo() + general.idle_wait_frames(1) + Report.result(Tests.creation_undo, + not EditorLevelEntity.has_component(AtomComponentProperties.diffuse_global_illumination())) + + # 3. REDO the level component addition. + # -> REDO component addition. + general.redo() + general.idle_wait_frames(1) + Report.result(Tests.creation_redo, + EditorLevelEntity.has_component(AtomComponentProperties.diffuse_global_illumination())) + + # 4. Set Quality Level property to Low + diffuse_global_illumination_component.set_component_property_value( + AtomComponentProperties.diffuse_global_illumination('Quality Level', GLOBAL_ILLUMINATION_QUALITY['Low'])) + quality = diffuse_global_illumination_component.get_component_property_value( + AtomComponentProperties.diffuse_global_illumination('Quality Level')) + Report.result(diffuse_global_illumination_quality, quality == GLOBAL_ILLUMINATION_QUALITY['Low']) + + # 5. Enter/Exit game mode. + TestHelper.enter_game_mode(Tests.enter_game_mode) + general.idle_wait_frames(1) + TestHelper.exit_game_mode(Tests.exit_game_mode) + + # 6. Look for errors and asserts. + TestHelper.wait_for_condition(lambda: error_tracer.has_errors or error_tracer.has_asserts, 1.0) + for error_info in error_tracer.errors: + Report.info(f"Error: {error_info.filename} {error_info.function} | {error_info.message}") + for assert_info in error_tracer.asserts: + Report.info(f"Assert: {assert_info.filename} {assert_info.function} | {assert_info.message}") + + +if __name__ == "__main__": + from editor_python_test_tools.utils import Report + Report.start_test(AtomEditorComponentsLevel_DiffuseGlobalIllumination_AddedToEntity) diff --git a/AutomatedTesting/Gem/PythonTests/Atom/tests/hydra_AtomEditorComponentsLevel_DisplayMapperAdded.py b/AutomatedTesting/Gem/PythonTests/Atom/tests/hydra_AtomEditorComponentsLevel_DisplayMapperAdded.py new file mode 100644 index 0000000000..c050dd76d4 --- /dev/null +++ b/AutomatedTesting/Gem/PythonTests/Atom/tests/hydra_AtomEditorComponentsLevel_DisplayMapperAdded.py @@ -0,0 +1,124 @@ +""" +Copyright (c) Contributors to the Open 3D Engine Project. +For complete copyright and license terms please see the LICENSE at the root of this distribution. + +SPDX-License-Identifier: Apache-2.0 OR MIT +""" + + +class Tests: + creation_undo = ( + "UNDO level component addition success", + "UNDO level component addition failed") + creation_redo = ( + "REDO Level component addition success", + "REDO Level component addition failed") + display_mapper_component = ( + "Level has a Display Mapper component", + "Level failed to find Display Mapper component") + ldr_color_grading_lut = ( + "LDR color Grading LUT asset set", + "LDR color Grading LUT asset could not be set") + enable_ldr_color_grading_lut = ( + "Enable LDR color grading LUT set", + "Enable LDR color grading LUT could not be set") + enter_game_mode = ( + "Entered game mode", + "Failed to enter game mode") + exit_game_mode = ( + "Exited game mode", + "Couldn't exit game mode") + + +def AtomEditorComponentsLevel_DisplayMapper_AddedToEntity(): + """ + Summary: + Tests the Display Mapper level component can be added to the level entity and has the expected functionality. + + Test setup: + - Wait for Editor idle loop. + - Open the "Base" level. + + Expected Behavior: + The component can be added, used in game mode, and has accurate required components. + Creation and deletion undo/redo should also work. + + Test Steps: + 1) Add Display Mapper level component to the level entity. + 2) UNDO the level component addition. + 3) REDO the level component addition. + 4) Set LDR color Grading LUT asset. + 5) Set Enable LDR color grading LUT property True + 6) Enter/Exit game mode. + 7) Look for errors and asserts. + + :return: None + """ + import os + + import azlmbr.legacy.general as general + + from editor_python_test_tools.asset_utils import Asset + from editor_python_test_tools.editor_entity_utils import EditorLevelEntity + from editor_python_test_tools.utils import Report, Tracer, TestHelper + from Atom.atom_utils.atom_constants import AtomComponentProperties + + with Tracer() as error_tracer: + # Test setup begins. + # Setup: Wait for Editor idle loop before executing Python hydra scripts then open "Base" level. + TestHelper.init_idle() + TestHelper.open_level("", "Base") + + # Test steps begin. + # 1. Add Display Mapper level component to the level entity. + display_mapper_component = EditorLevelEntity.add_component(AtomComponentProperties.display_mapper()) + Report.critical_result( + Tests.display_mapper_component, + EditorLevelEntity.has_component(AtomComponentProperties.display_mapper())) + + # 2. UNDO the level component addition. + # -> UNDO component addition. + general.undo() + general.idle_wait_frames(1) + Report.result(Tests.creation_undo, not EditorLevelEntity.has_component(AtomComponentProperties.display_mapper())) + + # 3. REDO the level component addition. + # -> REDO component addition. + general.redo() + general.idle_wait_frames(1) + Report.result(Tests.creation_redo, EditorLevelEntity.has_component(AtomComponentProperties.display_mapper())) + + # 4. Set LDR color Grading LUT asset. + display_mapper_asset_path = os.path.join("TestData", "test.lightingpreset.azasset") + display_mapper_asset = Asset.find_asset_by_path(display_mapper_asset_path, False) + display_mapper_component.set_component_property_value( + AtomComponentProperties.display_mapper('LDR color Grading LUT'), display_mapper_asset.id) + Report.result( + Tests.ldr_color_grading_lut, + display_mapper_component.get_component_property_value( + AtomComponentProperties.display_mapper('LDR color Grading LUT')) == display_mapper_asset.id) + + # 5. Set Enable LDR color grading LUT property True + display_mapper_component.set_component_property_value( + AtomComponentProperties.display_mapper('Enable LDR color grading LUT'), True) + Report.result( + Test.enable_ldr_color_grading_lut, + display_mapper_component.get_component_property_value( + AtomComponentProperties.display_mapper('Enable LDR color grading LUT')) is True) + + # 6. Enter/Exit game mode. + TestHelper.enter_game_mode(Tests.enter_game_mode) + general.idle_wait_frames(1) + TestHelper.exit_game_mode(Tests.exit_game_mode) + + # 7. Look for errors and asserts. + TestHelper.wait_for_condition(lambda: error_tracer.has_errors or error_tracer.has_asserts, 1.0) + for error_info in error_tracer.errors: + Report.info(f"Error: {error_info.filename} {error_info.function} | {error_info.message}") + for assert_info in error_tracer.asserts: + Report.info(f"Assert: {assert_info.filename} {assert_info.function} | {assert_info.message}") + + +if __name__ == "__main__": + from editor_python_test_tools.utils import Report + Report.start_test(AtomEditorComponentsLevel_DisplayMapper_AddedToEntity) diff --git a/AutomatedTesting/Gem/PythonTests/Atom/tests/hydra_AtomEditorComponents_AddedToEntity.py b/AutomatedTesting/Gem/PythonTests/Atom/tests/hydra_AtomEditorComponents_AddedToEntity.py deleted file mode 100644 index bbc8463152..0000000000 --- a/AutomatedTesting/Gem/PythonTests/Atom/tests/hydra_AtomEditorComponents_AddedToEntity.py +++ /dev/null @@ -1,238 +0,0 @@ -""" -Copyright (c) Contributors to the Open 3D Engine Project. -For complete copyright and license terms please see the LICENSE at the root of this distribution. - -SPDX-License-Identifier: Apache-2.0 OR MIT -""" - -import os -import sys - -import azlmbr.math as math -import azlmbr.bus as bus -import azlmbr.paths -import azlmbr.asset as asset -import azlmbr.entity as entity -import azlmbr.legacy.general as general -import azlmbr.editor as editor -import azlmbr.render as render - -sys.path.append(os.path.join(azlmbr.paths.projectroot, "Gem", "PythonTests")) - -import editor_python_test_tools.hydra_editor_utils as hydra -from editor_python_test_tools.utils import TestHelper - - -def run(): - """ - Summary: - The below common tests are done for each of the components. - 1) Addition of component to the entity - 2) UNDO/REDO of addition of component - 3) Enter/Exit game mode - 4) Hide/Show entity containing component - 5) Deletion of component - 6) UNDO/REDO of deletion of component - Some additional tests for specific components include - 1) Assigning value to some properties of each component - 2) Verifying if the component is activated only when the required components are added - - Expected Result: - 1) Component can be added to an entity. - 2) The addition of component can be undone and redone. - 3) Game mode can be entered/exited without issue. - 4) Entity with component can be hidden/shown. - 5) Component can be deleted. - 6) The deletion of component can be undone and redone. - 7) Component is activated only when the required components are added - 8) Values can be assigned to the properties of the component - - :return: None - """ - - def create_entity_undo_redo_component_addition(component_name): - new_entity = hydra.Entity(f"{component_name}") - new_entity.create_entity(math.Vector3(512.0, 512.0, 34.0), [component_name]) - general.log(f"{component_name}_test: Component added to the entity: " - f"{hydra.has_components(new_entity.id, [component_name])}") - - # undo component addition - general.undo() - TestHelper.wait_for_condition(lambda: not hydra.has_components(new_entity.id, [component_name]), 2.0) - general.log(f"{component_name}_test: Component removed after UNDO: " - f"{not hydra.has_components(new_entity.id, [component_name])}") - - # redo component addition - general.redo() - TestHelper.wait_for_condition(lambda: hydra.has_components(new_entity.id, [component_name]), 2.0) - general.log(f"{component_name}_test: Component added after REDO: " - f"{hydra.has_components(new_entity.id, [component_name])}") - - return new_entity - - def verify_enter_exit_game_mode(component_name): - general.enter_game_mode() - TestHelper.wait_for_condition(lambda: general.is_in_game_mode(), 2.0) - general.log(f"{component_name}_test: Entered game mode: {general.is_in_game_mode()}") - general.exit_game_mode() - TestHelper.wait_for_condition(lambda: not general.is_in_game_mode(), 2.0) - general.log(f"{component_name}_test: Exit game mode: {not general.is_in_game_mode()}") - - def verify_hide_unhide_entity(component_name, entity_obj): - - def is_entity_hidden(entity_id): - return editor.EditorEntityInfoRequestBus(bus.Event, "IsHidden", entity_id) - - editor.EditorEntityAPIBus(bus.Event, "SetVisibilityState", entity_obj.id, False) - general.idle_wait_frames(1) - general.log(f"{component_name}_test: Entity is hidden: {is_entity_hidden(entity_obj.id)}") - editor.EditorEntityAPIBus(bus.Event, "SetVisibilityState", entity_obj.id, True) - general.idle_wait_frames(1) - general.log(f"{component_name}_test: Entity is shown: {not is_entity_hidden(entity_obj.id)}") - - def verify_deletion_undo_redo(component_name, entity_obj): - editor.ToolsApplicationRequestBus(bus.Broadcast, "DeleteEntityById", entity_obj.id) - TestHelper.wait_for_condition(lambda: not hydra.find_entity_by_name(entity_obj.name), 2.0) - general.log(f"{component_name}_test: Entity deleted: {not hydra.find_entity_by_name(entity_obj.name)}") - - general.undo() - TestHelper.wait_for_condition(lambda: hydra.find_entity_by_name(entity_obj.name) is not None, 2.0) - general.log(f"{component_name}_test: UNDO entity deletion works: " - f"{hydra.find_entity_by_name(entity_obj.name) is not None}") - - general.redo() - TestHelper.wait_for_condition(lambda: not hydra.find_entity_by_name(entity_obj.name), 2.0) - general.log(f"{component_name}_test: REDO entity deletion works: " - f"{not hydra.find_entity_by_name(entity_obj.name)}") - - def verify_required_component_addition(entity_obj, components_to_add, component_name): - - def is_component_enabled(entity_componentid_pair): - return editor.EditorComponentAPIBus(bus.Broadcast, "IsComponentEnabled", entity_componentid_pair) - - general.log( - f"{component_name}_test: Entity disabled initially: " - f"{not is_component_enabled(entity_obj.components[0])}") - for component in components_to_add: - entity_obj.add_component(component) - TestHelper.wait_for_condition(lambda: is_component_enabled(entity_obj.components[0]), 2.0) - general.log( - f"{component_name}_test: Entity enabled after adding " - f"required components: {is_component_enabled(entity_obj.components[0])}" - ) - - def verify_set_property(entity_obj, path, value): - entity_obj.get_set_test(0, path, value) - - # Verify cubemap generation - def verify_cubemap_generation(component_name, entity_obj): - # Initially Check if the component has Reflection Probe component - if not hydra.has_components(entity_obj.id, ["Reflection Probe"]): - raise ValueError(f"Given entity {entity_obj.name} has no Reflection Probe component") - render.EditorReflectionProbeBus(azlmbr.bus.Event, "BakeReflectionProbe", entity_obj.id) - - def get_value(): - hydra.get_component_property_value(entity_obj.components[0], "Cubemap|Baked Cubemap Path") - - TestHelper.wait_for_condition(lambda: get_value() != "", 20.0) - general.log(f"{component_name}_test: Cubemap is generated: {get_value() != ''}") - - # Wait for Editor idle loop before executing Python hydra scripts. - TestHelper.init_idle() - - # Delete all existing entities initially - search_filter = azlmbr.entity.SearchFilter() - all_entities = entity.SearchBus(azlmbr.bus.Broadcast, "SearchEntities", search_filter) - editor.ToolsApplicationRequestBus(bus.Broadcast, "DeleteEntities", all_entities) - - class ComponentTests: - """Test launcher for each component.""" - def __init__(self, component_name, *additional_tests): - self.component_name = component_name - self.additional_tests = additional_tests - self.run_component_tests() - - def run_component_tests(self): - # Run common and additional tests - entity_obj = create_entity_undo_redo_component_addition(self.component_name) - - # Enter/Exit game mode test - verify_enter_exit_game_mode(self.component_name) - - # Any additional tests are executed here - for test in self.additional_tests: - test(entity_obj) - - # Hide/Unhide entity test - verify_hide_unhide_entity(self.component_name, entity_obj) - - # Deletion/Undo/Redo test - verify_deletion_undo_redo(self.component_name, entity_obj) - - # DepthOfField Component - camera_entity = hydra.Entity("camera_entity") - camera_entity.create_entity(math.Vector3(512.0, 512.0, 34.0), ["Camera"]) - depth_of_field = "DepthOfField" - ComponentTests( - depth_of_field, - lambda entity_obj: verify_required_component_addition(entity_obj, ["PostFX Layer"], depth_of_field), - lambda entity_obj: verify_set_property( - entity_obj, "Controller|Configuration|Camera Entity", camera_entity.id)) - - # Decal Component - material_asset_path = os.path.join("AutomatedTesting", "Materials", "basic_grey.material") - material_asset = asset.AssetCatalogRequestBus( - bus.Broadcast, "GetAssetIdByPath", material_asset_path, math.Uuid(), False) - ComponentTests( - "Decal", lambda entity_obj: verify_set_property( - entity_obj, "Controller|Configuration|Material", material_asset)) - - # Directional Light Component - ComponentTests( - "Directional Light", - lambda entity_obj: verify_set_property( - entity_obj, "Controller|Configuration|Shadow|Camera", camera_entity.id)) - - # Exposure Control Component - ComponentTests( - "Exposure Control", lambda entity_obj: verify_required_component_addition( - entity_obj, ["PostFX Layer"], "Exposure Control")) - - # Global Skylight (IBL) Component - diffuse_image_path = os.path.join("LightingPresets", "greenwich_park_02_4k_iblskyboxcm.exr.streamingimage") - diffuse_image_asset = asset.AssetCatalogRequestBus( - bus.Broadcast, "GetAssetIdByPath", diffuse_image_path, math.Uuid(), False) - specular_image_path = os.path.join("LightingPresets", "greenwich_park_02_4k_iblskyboxcm.exr.streamingimage") - specular_image_asset = asset.AssetCatalogRequestBus( - bus.Broadcast, "GetAssetIdByPath", specular_image_path, math.Uuid(), False) - ComponentTests( - "Global Skylight (IBL)", - lambda entity_obj: verify_set_property( - entity_obj, "Controller|Configuration|Diffuse Image", diffuse_image_asset), - lambda entity_obj: verify_set_property( - entity_obj, "Controller|Configuration|Specular Image", specular_image_asset)) - - # Physical Sky Component - ComponentTests("Physical Sky") - - # PostFX Layer Component - ComponentTests("PostFX Layer") - - # PostFX Radius Weight Modifier Component - ComponentTests("PostFX Radius Weight Modifier") - - # Light Component - ComponentTests("Light") - - # Display Mapper Component - ComponentTests("Display Mapper") - - # Reflection Probe Component - reflection_probe = "Reflection Probe" - ComponentTests( - reflection_probe, - lambda entity_obj: verify_required_component_addition(entity_obj, ["Box Shape"], reflection_probe), - lambda entity_obj: verify_cubemap_generation(reflection_probe, entity_obj),) - -if __name__ == "__main__": - run() diff --git a/AutomatedTesting/Gem/PythonTests/Atom/tests/hydra_AtomEditorComponents_BloomAdded.py b/AutomatedTesting/Gem/PythonTests/Atom/tests/hydra_AtomEditorComponents_BloomAdded.py new file mode 100644 index 0000000000..56b22eb20d --- /dev/null +++ b/AutomatedTesting/Gem/PythonTests/Atom/tests/hydra_AtomEditorComponents_BloomAdded.py @@ -0,0 +1,189 @@ +""" +Copyright (c) Contributors to the Open 3D Engine Project. +For complete copyright and license terms please see the LICENSE at the root of this distribution. + +SPDX-License-Identifier: Apache-2.0 OR MIT +""" + + +class Tests: + creation_undo = ( + "UNDO Entity creation success", + "UNDO Entity creation failed") + creation_redo = ( + "REDO Entity creation success", + "REDO Entity creation failed") + bloom_creation = ( + "Bloom Entity successfully created", + "Bloom Entity failed to be created") + bloom_component = ( + "Entity has a Bloom component", + "Entity failed to find Bloom component") + bloom_disabled = ( + "Bloom component disabled", + "Bloom component was not disabled") + postfx_layer_component = ( + "Entity has a PostFX Layer component", + "Entity did not have an PostFX Layer component") + bloom_enabled = ( + "Bloom component enabled", + "Bloom component was not enabled") + enable_bloom_parameter_enabled = ( + "Enable Bloom parameter enabled", + "Enable Bloom parameter was not enabled") + enter_game_mode = ( + "Entered game mode", + "Failed to enter game mode") + exit_game_mode = ( + "Exited game mode", + "Couldn't exit game mode") + is_visible = ( + "Entity is visible", + "Entity was not visible") + is_hidden = ( + "Entity is hidden", + "Entity was not hidden") + entity_deleted = ( + "Entity deleted", + "Entity was not deleted") + deletion_undo = ( + "UNDO deletion success", + "UNDO deletion failed") + deletion_redo = ( + "REDO deletion success", + "REDO deletion failed") + + +def AtomEditorComponents_Bloom_AddedToEntity(): + """ + Summary: + Tests the Bloom component can be added to an entity and has the expected functionality. + + Test setup: + - Wait for Editor idle loop. + - Open the "Base" level. + + Expected Behavior: + The component can be added, used in game mode, hidden/shown, deleted, and has accurate required components. + Creation and deletion undo/redo should also work. + + Test Steps: + 1) Create an Bloom entity with no components. + 2) Add Bloom component to Bloom entity. + 3) UNDO the entity creation and component addition. + 4) REDO the entity creation and component addition. + 5) Verify Bloom component not enabled. + 6) Add PostFX Layer component since it is required by the Bloom component. + 7) Verify Bloom component is enabled. + 8) Enable the "Enable Bloom" parameter. + 9) Enter/Exit game mode. + 10) Test IsHidden. + 11) Test IsVisible. + 12) Delete Bloom entity. + 13) UNDO deletion. + 14) REDO deletion. + 15) Look for errors. + + :return: None + """ + + import azlmbr.legacy.general as general + + from editor_python_test_tools.editor_entity_utils import EditorEntity + from editor_python_test_tools.utils import Report, Tracer, TestHelper + from Atom.atom_utils.atom_constants import AtomComponentProperties + + with Tracer() as error_tracer: + # Test setup begins. + # Setup: Wait for Editor idle loop before executing Python hydra scripts then open "Base" level. + TestHelper.init_idle() + TestHelper.open_level("", "Base") + + # Test steps begin. + # 1. Create an Bloom entity with no components. + bloom_entity = EditorEntity.create_editor_entity(AtomComponentProperties.bloom()) + Report.critical_result(Tests.bloom_creation, bloom_entity.exists()) + + # 2. Add Bloom component to Bloom entity. + bloom_component = bloom_entity.add_component(AtomComponentProperties.bloom()) + Report.critical_result(Tests.bloom_component, bloom_entity.has_component(AtomComponentProperties.bloom())) + + # 3. UNDO the entity creation and component addition. + # -> UNDO component addition. + general.undo() + # -> UNDO naming entity. + general.undo() + # -> UNDO selecting entity. + general.undo() + # -> UNDO entity creation. + general.undo() + general.idle_wait_frames(1) + Report.result(Tests.creation_undo, not bloom_entity.exists()) + + # 4. REDO the entity creation and component addition. + # -> REDO entity creation. + general.redo() + # -> REDO selecting entity. + general.redo() + # -> REDO naming entity. + general.redo() + # -> REDO component addition. + general.redo() + general.idle_wait_frames(1) + Report.result(Tests.creation_redo, bloom_entity.exists()) + + # 5. Verify Bloom component not enabled. + Report.result(Tests.bloom_disabled, not bloom_component.is_enabled()) + + # 6. Add PostFX Layer component since it is required by the Bloom component. + bloom_entity.add_component(AtomComponentProperties.postfx_layer()) + Report.result( + Tests.postfx_layer_component, + bloom_entity.has_component(AtomComponentProperties.postfx_layer())) + + # 7. Verify Bloom component is enabled. + Report.result(Tests.bloom_enabled, bloom_component.is_enabled()) + + # 8. Enable the "Enable Bloom" parameter. + bloom_component.set_component_property_value(AtomComponentProperties.bloom('Enable Bloom'), True) + Report.result( + Tests.enable_bloom_parameter_enabled, + bloom_component.get_component_property_value(AtomComponentProperties.bloom('Enable Bloom')) is True) + + # 9. Enter/Exit game mode. + TestHelper.enter_game_mode(Tests.enter_game_mode) + general.idle_wait_frames(1) + TestHelper.exit_game_mode(Tests.exit_game_mode) + + # 10. Test IsHidden. + bloom_entity.set_visibility_state(False) + Report.result(Tests.is_hidden, bloom_entity.is_hidden() is True) + + # 11. Test IsVisible. + bloom_entity.set_visibility_state(True) + general.idle_wait_frames(1) + Report.result(Tests.is_visible, bloom_entity.is_visible() is True) + + # 12. Delete Bloom entity. + bloom_entity.delete() + Report.result(Tests.entity_deleted, not bloom_entity.exists()) + + # 13. UNDO deletion. + general.undo() + Report.result(Tests.deletion_undo, bloom_entity.exists()) + + # 14. REDO deletion. + general.redo() + Report.result(Tests.deletion_redo, not bloom_entity.exists()) + + # 15. Look for errors and asserts. + TestHelper.wait_for_condition(lambda: error_tracer.has_errors or error_tracer.has_asserts, 1.0) + for error_info in error_tracer.errors: + Report.info(f"Error: {error_info.filename} {error_info.function} | {error_info.message}") + for assert_info in error_tracer.asserts: + Report.info(f"Assert: {assert_info.filename} {assert_info.function} | {assert_info.message}") + + +if __name__ == "__main__": + from editor_python_test_tools.utils import Report + Report.start_test(AtomEditorComponents_Bloom_AddedToEntity) diff --git a/AutomatedTesting/Gem/PythonTests/Atom/tests/hydra_AtomEditorComponents_DeferredFogAdded.py b/AutomatedTesting/Gem/PythonTests/Atom/tests/hydra_AtomEditorComponents_DeferredFogAdded.py new file mode 100644 index 0000000000..71163ece94 --- /dev/null +++ b/AutomatedTesting/Gem/PythonTests/Atom/tests/hydra_AtomEditorComponents_DeferredFogAdded.py @@ -0,0 +1,193 @@ +""" +Copyright (c) Contributors to the Open 3D Engine Project. +For complete copyright and license terms please see the LICENSE at the root of this distribution. + +SPDX-License-Identifier: Apache-2.0 OR MIT +""" + + +class Tests: + creation_undo = ( + "UNDO Entity creation success", + "UNDO Entity creation failed") + creation_redo = ( + "REDO Entity creation success", + "REDO Entity creation failed") + deferred_fog_creation = ( + "Deferred Fog Entity successfully created", + "Deferred Fog Entity failed to be created") + deferred_fog_component = ( + "Entity has a Deferred Fog component", + "Entity failed to find Deferred Fog component") + deferred_fog_disabled = ( + "Deferred Fog component disabled", + "Deferred Fog component was not disabled") + postfx_layer_component = ( + "Entity has a PostFX Layer component", + "Entity did not have an PostFX Layer component") + deferred_fog_enabled = ( + "Deferred Fog component enabled", + "Deferred Fog component was not enabled") + enable_deferred_fog_parameter_enabled = ( + "Enable Deferred Fog parameter enabled", + "Enable Deferred Fog parameter was not enabled") + enter_game_mode = ( + "Entered game mode", + "Failed to enter game mode") + exit_game_mode = ( + "Exited game mode", + "Couldn't exit game mode") + is_visible = ( + "Entity is visible", + "Entity was not visible") + is_hidden = ( + "Entity is hidden", + "Entity was not hidden") + entity_deleted = ( + "Entity deleted", + "Entity was not deleted") + deletion_undo = ( + "UNDO deletion success", + "UNDO deletion failed") + deletion_redo = ( + "REDO deletion success", + "REDO deletion failed") + + +def AtomEditorComponents_DeferredFog_AddedToEntity(): + """ + Summary: + Tests the Deferred Fog component can be added to an entity and has the expected functionality. + + Test setup: + - Wait for Editor idle loop. + - Open the "Base" level. + + Expected Behavior: + The component can be added, used in game mode, hidden/shown, deleted, and has accurate required components. + Creation and deletion undo/redo should also work. + + Test Steps: + 1) Create an Deferred Fog entity with no components. + 2) Add Deferred Fog component to Deferred Fog entity. + 3) UNDO the entity creation and component addition. + 4) REDO the entity creation and component addition. + 5) Verify Deferred Fog component not enabled. + 6) Add PostFX Layer component since it is required by the Deferred Fog component. + 7) Verify Deferred Fog component is enabled. + 8) Enable the "Enable Deferred Fog" parameter. + 9) Enter/Exit game mode. + 10) Test IsHidden. + 11) Test IsVisible. + 12) Delete Deferred Fog entity. + 13) UNDO deletion. + 14) REDO deletion. + 15) Look for errors. + + :return: None + """ + + import azlmbr.legacy.general as general + + from editor_python_test_tools.editor_entity_utils import EditorEntity + from editor_python_test_tools.utils import Report, Tracer, TestHelper + from Atom.atom_utils.atom_constants import AtomComponentProperties + + with Tracer() as error_tracer: + # Test setup begins. + # Setup: Wait for Editor idle loop before executing Python hydra scripts then open "Base" level. + TestHelper.init_idle() + TestHelper.open_level("", "Base") + + # Test steps begin. + # 1. Create an Deferred Fog entity with no components. + deferred_fog_entity = EditorEntity.create_editor_entity(AtomComponentProperties.deferred_fog()) + Report.critical_result(Tests.deferred_fog_creation, deferred_fog_entity.exists()) + + # 2. Add Deferred Fog component to Deferred Fog entity. + deferred_fog_component = deferred_fog_entity.add_component( + AtomComponentProperties.deferred_fog()) + Report.critical_result( + Tests.deferred_fog_component, + deferred_fog_entity.has_component(AtomComponentProperties.deferred_fog())) + + # 3. UNDO the entity creation and component addition. + # -> UNDO component addition. + general.undo() + # -> UNDO naming entity. + general.undo() + # -> UNDO selecting entity. + general.undo() + # -> UNDO entity creation. + general.undo() + general.idle_wait_frames(1) + Report.result(Tests.creation_undo, not deferred_fog_entity.exists()) + + # 4. REDO the entity creation and component addition. + # -> REDO entity creation. + general.redo() + # -> REDO selecting entity. + general.redo() + # -> REDO naming entity. + general.redo() + # -> REDO component addition. + general.redo() + general.idle_wait_frames(1) + Report.result(Tests.creation_redo, deferred_fog_entity.exists()) + + # 5. Verify Deferred Fog component not enabled. + Report.result(Tests.deferred_fog_disabled, not deferred_fog_component.is_enabled()) + + # 6. Add PostFX Layer component since it is required by the Deferred Fog component. + deferred_fog_entity.add_component(AtomComponentProperties.postfx_layer()) + Report.result( + Tests.postfx_layer_component, + deferred_fog_entity.has_component(AtomComponentProperties.postfx_layer())) + + # 7. Verify Deferred Fog component is enabled. + Report.result(Tests.deferred_fog_enabled, deferred_fog_component.is_enabled()) + + # 8. Enable the "Enable Deferred Fog" parameter. + deferred_fog_component.set_component_property_value( + AtomComponentProperties.deferred_fog('Enable Deferred Fog'), True) + Report.result(Tests.enable_deferred_fog_parameter_enabled, + deferred_fog_component.get_component_property_value( + AtomComponentProperties.deferred_fog('Enable Deferred Fog')) is True) + + # 9. Enter/Exit game mode. + TestHelper.enter_game_mode(Tests.enter_game_mode) + general.idle_wait_frames(1) + TestHelper.exit_game_mode(Tests.exit_game_mode) + + # 10. Test IsHidden. + deferred_fog_entity.set_visibility_state(False) + Report.result(Tests.is_hidden, deferred_fog_entity.is_hidden() is True) + + # 11. Test IsVisible. + deferred_fog_entity.set_visibility_state(True) + general.idle_wait_frames(1) + Report.result(Tests.is_visible, deferred_fog_entity.is_visible() is True) + + # 12. Delete Deferred Fog entity. + deferred_fog_entity.delete() + Report.result(Tests.entity_deleted, not deferred_fog_entity.exists()) + + # 13. UNDO deletion. + general.undo() + Report.result(Tests.deletion_undo, deferred_fog_entity.exists()) + + # 14. REDO deletion. + general.redo() + Report.result(Tests.deletion_redo, not deferred_fog_entity.exists()) + + # 15. Look for errors and asserts. + TestHelper.wait_for_condition(lambda: error_tracer.has_errors or error_tracer.has_asserts, 1.0) + for error_info in error_tracer.errors: + Report.info(f"Error: {error_info.filename} {error_info.function} | {error_info.message}") + for assert_info in error_tracer.asserts: + Report.info(f"Assert: {assert_info.filename} {assert_info.function} | {assert_info.message}") + + +if __name__ == "__main__": + from editor_python_test_tools.utils import Report + Report.start_test(AtomEditorComponents_DeferredFog_AddedToEntity) diff --git a/AutomatedTesting/Gem/PythonTests/Atom/tests/hydra_AtomEditorComponents_DiffuseProbeGridAdded.py b/AutomatedTesting/Gem/PythonTests/Atom/tests/hydra_AtomEditorComponents_DiffuseProbeGridAdded.py new file mode 100644 index 0000000000..f42c091057 --- /dev/null +++ b/AutomatedTesting/Gem/PythonTests/Atom/tests/hydra_AtomEditorComponents_DiffuseProbeGridAdded.py @@ -0,0 +1,187 @@ +""" +Copyright (c) Contributors to the Open 3D Engine Project. +For complete copyright and license terms please see the LICENSE at the root of this distribution. + +SPDX-License-Identifier: Apache-2.0 OR MIT +""" + + +class Tests: + creation_undo = ( + "UNDO Entity creation success", + "UNDO Entity creation failed") + creation_redo = ( + "REDO Entity creation success", + "REDO Entity creation failed") + diffuse_probe_grid_creation = ( + "Diffuse Probe Grid Entity successfully created", + "Diffuse Probe Grid Entity failed to be created") + diffuse_probe_grid_component = ( + "Entity has a Diffuse Probe Grid component", + "Entity failed to find Diffuse Probe Grid component") + diffuse_probe_grid_disabled = ( + "Diffuse Probe Grid component disabled", + "Diffuse Probe Grid component was not disabled") + diffuse_probe_grid_enabled = ( + "Diffuse Probe Grid component enabled", + "Diffuse Probe Grid component was not enabled") + enter_game_mode = ( + "Entered game mode", + "Failed to enter game mode") + exit_game_mode = ( + "Exited game mode", + "Couldn't exit game mode") + is_visible = ( + "Entity is visible", + "Entity was not visible") + is_hidden = ( + "Entity is hidden", + "Entity was not hidden") + entity_deleted = ( + "Entity deleted", + "Entity was not deleted") + deletion_undo = ( + "UNDO deletion success", + "UNDO deletion failed") + deletion_redo = ( + "REDO deletion success", + "REDO deletion failed") + + +def AtomEditorComponents_DiffuseProbeGrid_AddedToEntity(): + """ + Summary: + Tests the Diffuse Probe Grid component can be added to an entity and has the expected functionality. + + Test setup: + - Wait for Editor idle loop. + - Open the "Base" level. + + Expected Behavior: + The component can be added, used in game mode, hidden/shown, deleted, and has accurate required components. + Creation and deletion undo/redo should also work. + + Test Steps: + 1) Create a Diffuse Probe Grid entity with no components. + 2) Add a Diffuse Probe Grid component to Diffuse Probe Grid entity. + 3) UNDO the entity creation and component addition. + 4) REDO the entity creation and component addition. + 5) Verify Diffuse Probe Grid component not enabled. + 6) Add Shape component since it is required by the Diffuse Probe Grid component. + 7) Verify Diffuse Probe Grid component is enabled. + 8) Enter/Exit game mode. + 9) Test IsHidden. + 10) Test IsVisible. + 11) Delete Diffuse Probe Grid entity. + 12) UNDO deletion. + 13) REDO deletion. + 14) Look for errors. + + :return: None + """ + + import azlmbr.legacy.general as general + + from editor_python_test_tools.editor_entity_utils import EditorEntity + from editor_python_test_tools.utils import Report, Tracer, TestHelper + from Atom.atom_utils.atom_constants import AtomComponentProperties + + with Tracer() as error_tracer: + # Test setup begins. + # Setup: Wait for Editor idle loop before executing Python hydra scripts then open "Base" level. + TestHelper.init_idle() + TestHelper.open_level("", "Base") + + # Test steps begin. + # 1. Create a Diffuse Probe Grid entity with no components. + diffuse_probe_grid_entity = EditorEntity.create_editor_entity(AtomComponentProperties.diffuse_probe_grid()) + Report.critical_result(Tests.diffuse_probe_grid_creation, diffuse_probe_grid_entity.exists()) + + # 2. Add a Diffuse Probe Grid component to Diffuse Probe Grid entity. + diffuse_probe_grid_component = diffuse_probe_grid_entity.add_component( + AtomComponentProperties.diffuse_probe_grid()) + Report.critical_result( + Tests.diffuse_probe_grid_component, + diffuse_probe_grid_entity.has_component(AtomComponentProperties.diffuse_probe_grid())) + + # 3. UNDO the entity creation and component addition. + # -> UNDO component addition. + general.undo() + # -> UNDO naming entity. + general.undo() + # -> UNDO selecting entity. + general.undo() + # -> UNDO entity creation. + general.undo() + general.idle_wait_frames(1) + Report.result(Tests.creation_undo, not diffuse_probe_grid_entity.exists()) + + # 4. REDO the entity creation and component addition. + # -> REDO entity creation. + general.redo() + # -> REDO selecting entity. + general.redo() + # -> REDO naming entity. + general.redo() + # -> REDO component addition. + general.redo() + general.idle_wait_frames(1) + Report.result(Tests.creation_redo, diffuse_probe_grid_entity.exists()) + + # 5. Verify Diffuse Probe Grid component not enabled. + Report.result(Tests.diffuse_probe_grid_disabled, not diffuse_probe_grid_component.is_enabled()) + + # 6. Add Shape component since it is required by the Diffuse Probe Grid component. + for shape in AtomComponentProperties.diffuse_probe_grid('shapes'): + diffuse_probe_grid_entity.add_component(shape) + test_shape = ( + f"Entity has a {shape} component", + f"Entity did not have a {shape} component") + Report.result(test_shape, diffuse_probe_grid_entity.has_component(shape)) + + # 7. Check if required shape allows Diffuse Probe Grid to be enabled + Report.result(Tests.diffuse_probe_grid_enabled, diffuse_probe_grid_component.is_enabled()) + + # Undo to remove each added shape except the last one and verify Diffuse Probe Grid is not enabled. + if not (shape == AtomComponentProperties.diffuse_probe_grid('shapes')[-1]): + general.undo() + TestHelper.wait_for_condition(lambda: not diffuse_probe_grid_entity.has_component(shape), 1.0) + Report.result(Tests.diffuse_probe_grid_disabled, not diffuse_probe_grid_component.is_enabled()) + + # 8. Enter/Exit game mode. + TestHelper.enter_game_mode(Tests.enter_game_mode) + general.idle_wait_frames(1) + TestHelper.exit_game_mode(Tests.exit_game_mode) + + # 9. Test IsHidden. + diffuse_probe_grid_entity.set_visibility_state(False) + Report.result(Tests.is_hidden, diffuse_probe_grid_entity.is_hidden() is True) + + # 10. Test IsVisible. + diffuse_probe_grid_entity.set_visibility_state(True) + general.idle_wait_frames(1) + Report.result(Tests.is_visible, diffuse_probe_grid_entity.is_visible() is True) + + # 11. Delete Diffuse Probe Grid entity. + diffuse_probe_grid_entity.delete() + Report.result(Tests.entity_deleted, not diffuse_probe_grid_entity.exists()) + + # 12. UNDO deletion. + general.undo() + Report.result(Tests.deletion_undo, diffuse_probe_grid_entity.exists()) + + # 13. REDO deletion. + general.redo() + Report.result(Tests.deletion_redo, not diffuse_probe_grid_entity.exists()) + + # 14. Look for errors or asserts. + TestHelper.wait_for_condition(lambda: error_tracer.has_errors or error_tracer.has_asserts, 1.0) + for error_info in error_tracer.errors: + Report.info(f"Error: {error_info.filename} {error_info.function} | {error_info.message}") + for assert_info in error_tracer.asserts: + Report.info(f"Assert: {assert_info.filename} {assert_info.function} | {assert_info.message}") + + +if __name__ == "__main__": + from editor_python_test_tools.utils import Report + Report.start_test(AtomEditorComponents_DiffuseProbeGrid_AddedToEntity) diff --git a/AutomatedTesting/Gem/PythonTests/Atom/tests/hydra_AtomEditorComponents_DisplayMapperAdded.py b/AutomatedTesting/Gem/PythonTests/Atom/tests/hydra_AtomEditorComponents_DisplayMapperAdded.py index f8881bfa2a..558d69046e 100644 --- a/AutomatedTesting/Gem/PythonTests/Atom/tests/hydra_AtomEditorComponents_DisplayMapperAdded.py +++ b/AutomatedTesting/Gem/PythonTests/Atom/tests/hydra_AtomEditorComponents_DisplayMapperAdded.py @@ -5,16 +5,8 @@ For complete copyright and license terms please see the LICENSE at the root of t SPDX-License-Identifier: Apache-2.0 OR MIT """ + class Tests: - camera_creation = ( - "Camera Entity successfully created", - "Camera Entity failed to be created") - camera_component_added = ( - "Camera component was added to entity", - "Camera component failed to be added to entity") - camera_component_check = ( - "Entity has a Camera component", - "Entity failed to find Camera component") creation_undo = ( "UNDO Entity creation success", "UNDO Entity creation failed") @@ -39,6 +31,12 @@ class Tests: is_hidden = ( "Entity is hidden", "Entity was not hidden") + ldr_color_grading_lut = ( + "LDR color Grading LUT asset set", + "LDR color Grading LUT asset could not be set") + enable_ldr_color_grading_lut = ( + "Enable LDR color grading LUT set", + "Enable LDR color grading LUT could not be set") entity_deleted = ( "Entity deleted", "Entity was not deleted") @@ -68,19 +66,23 @@ def AtomEditorComponents_DisplayMapper_AddedToEntity(): 2) Add Display Mapper component to Display Mapper entity. 3) UNDO the entity creation and component addition. 4) REDO the entity creation and component addition. - 5) Enter/Exit game mode. - 6) Test IsHidden. - 7) Test IsVisible. - 8) Delete Display Mapper entity. - 9) UNDO deletion. - 10) REDO deletion. - 11) Look for errors and asserts. + 5) Set LDR color Grading LUT asset. + 6) Set Enable LDR color grading LUT property True + 7) Enter/Exit game mode. + 8) Test IsHidden. + 9) Test IsVisible. + 10) Delete Display Mapper entity. + 11) UNDO deletion. + 12) REDO deletion. + 13) Look for errors and asserts. :return: None """ + import os import azlmbr.legacy.general as general + from editor_python_test_tools.asset_utils import Asset from editor_python_test_tools.editor_entity_utils import EditorEntity from editor_python_test_tools.utils import Report, Tracer, TestHelper from Atom.atom_utils.atom_constants import AtomComponentProperties @@ -97,7 +99,7 @@ def AtomEditorComponents_DisplayMapper_AddedToEntity(): Report.critical_result(Tests.display_mapper_creation, display_mapper_entity.exists()) # 2. Add Display Mapper component to Display Mapper entity. - display_mapper_entity.add_component(AtomComponentProperties.display_mapper()) + display_mapper_component = display_mapper_entity.add_component(AtomComponentProperties.display_mapper()) Report.critical_result( Tests.display_mapper_component, display_mapper_entity.has_component(AtomComponentProperties.display_mapper())) @@ -126,33 +128,51 @@ def AtomEditorComponents_DisplayMapper_AddedToEntity(): general.idle_wait_frames(1) Report.result(Tests.creation_redo, display_mapper_entity.exists()) - # 5. Enter/Exit game mode. + # 5. Set LDR color Grading LUT asset. + display_mapper_asset_path = os.path.join("TestData", "test.lightingpreset.azasset") + display_mapper_asset = Asset.find_asset_by_path(display_mapper_asset_path, False) + display_mapper_component.set_component_property_value( + AtomComponentProperties.display_mapper("LDR color Grading LUT"), display_mapper_asset.id) + Report.result( + Tests.ldr_color_grading_lut, + display_mapper_component.get_component_property_value( + AtomComponentProperties.display_mapper("LDR color Grading LUT")) == display_mapper_asset.id) + + # 6. Set Enable LDR color grading LUT property True + display_mapper_component.set_component_property_value( + AtomComponentProperties.display_mapper('Enable LDR color grading LUT'), True) + Report.result( + Tests.enable_ldr_color_grading_lut, + display_mapper_component.get_component_property_value( + AtomComponentProperties.display_mapper('Enable LDR color grading LUT')) is True) + + # 7. Enter/Exit game mode. TestHelper.enter_game_mode(Tests.enter_game_mode) general.idle_wait_frames(1) TestHelper.exit_game_mode(Tests.exit_game_mode) - # 6. Test IsHidden. + # 8. Test IsHidden. display_mapper_entity.set_visibility_state(False) Report.result(Tests.is_hidden, display_mapper_entity.is_hidden() is True) - # 7. Test IsVisible. + # 9. Test IsVisible. display_mapper_entity.set_visibility_state(True) general.idle_wait_frames(1) Report.result(Tests.is_visible, display_mapper_entity.is_visible() is True) - # 8. Delete Display Mapper entity. + # 10. Delete Display Mapper entity. display_mapper_entity.delete() Report.result(Tests.entity_deleted, not display_mapper_entity.exists()) - # 9. UNDO deletion. + # 11. UNDO deletion. general.undo() Report.result(Tests.deletion_undo, display_mapper_entity.exists()) - # 10. REDO deletion. + # 12. REDO deletion. general.redo() Report.result(Tests.deletion_redo, not display_mapper_entity.exists()) - # 11. Look for errors and asserts. + # 13. Look for errors and asserts. TestHelper.wait_for_condition(lambda: error_tracer.has_errors or error_tracer.has_asserts, 1.0) for error_info in error_tracer.errors: Report.info(f"Error: {error_info.filename} {error_info.function} | {error_info.message}") diff --git a/AutomatedTesting/Gem/PythonTests/Atom/tests/hydra_AtomEditorComponents_EntityReferenceAdded.py b/AutomatedTesting/Gem/PythonTests/Atom/tests/hydra_AtomEditorComponents_EntityReferenceAdded.py new file mode 100644 index 0000000000..dddcca64fa --- /dev/null +++ b/AutomatedTesting/Gem/PythonTests/Atom/tests/hydra_AtomEditorComponents_EntityReferenceAdded.py @@ -0,0 +1,158 @@ +""" +Copyright (c) Contributors to the Open 3D Engine Project. +For complete copyright and license terms please see the LICENSE at the root of this distribution. + +SPDX-License-Identifier: Apache-2.0 OR MIT +""" + + +class Tests: + creation_undo = ( + "UNDO Entity creation success", + "UNDO Entity creation failed") + creation_redo = ( + "REDO Entity creation success", + "REDO Entity creation failed") + entity_reference_creation = ( + "Entity Reference Entity successfully created", + "Entity Reference Entity failed to be created") + entity_reference_component = ( + "Entity has an Entity Reference component", + "Entity failed to find Entity Reference component") + enter_game_mode = ( + "Entered game mode", + "Failed to enter game mode") + exit_game_mode = ( + "Exited game mode", + "Couldn't exit game mode") + is_visible = ( + "Entity is visible", + "Entity was not visible") + is_hidden = ( + "Entity is hidden", + "Entity was not hidden") + entity_deleted = ( + "Entity deleted", + "Entity was not deleted") + deletion_undo = ( + "UNDO deletion success", + "UNDO deletion failed") + deletion_redo = ( + "REDO deletion success", + "REDO deletion failed") + + +def AtomEditorComponents_EntityReference_AddedToEntity(): + """ + Summary: + Tests the Entity Reference component can be added to an entity and has the expected functionality. + + Test setup: + - Wait for Editor idle loop. + - Open the "Base" level. + + Expected Behavior: + The component can be added, used in game mode, hidden/shown, deleted, and has accurate required components. + Creation and deletion undo/redo should also work. + + Test Steps: + 1) Create an Entity Reference entity with no components. + 2) Add Entity Reference component to Entity Reference entity. + 3) UNDO the entity creation and component addition. + 4) REDO the entity creation and component addition. + 5) Enter/Exit game mode. + 6) Test IsHidden. + 7) Test IsVisible. + 8) Delete Entity Reference entity. + 9) UNDO deletion. + 10) REDO deletion. + 11) Look for errors. + + :return: None + """ + + import azlmbr.legacy.general as general + + from editor_python_test_tools.editor_entity_utils import EditorEntity + from editor_python_test_tools.utils import Report, Tracer, TestHelper + from Atom.atom_utils.atom_constants import AtomComponentProperties + + with Tracer() as error_tracer: + # Test setup begins. + # Setup: Wait for Editor idle loop before executing Python hydra scripts then open "Base" level. + TestHelper.init_idle() + TestHelper.open_level("", "Base") + + # Test steps begin. + # 1. Create an Entity Reference entity with no components. + entity_reference_entity = EditorEntity.create_editor_entity(AtomComponentProperties.entity_reference()) + Report.critical_result(Tests.entity_reference_creation, entity_reference_entity.exists()) + + # 2. Add Entity Reference component to Entity Reference entity. + entity_reference_component = entity_reference_entity.add_component( + AtomComponentProperties.entity_reference()) + Report.critical_result( + Tests.entity_reference_component, + entity_reference_entity.has_component(AtomComponentProperties.entity_reference())) + + # 3. UNDO the entity creation and component addition. + # -> UNDO component addition. + general.undo() + # -> UNDO naming entity. + general.undo() + # -> UNDO selecting entity. + general.undo() + # -> UNDO entity creation. + general.undo() + general.idle_wait_frames(1) + Report.result(Tests.creation_undo, not entity_reference_entity.exists()) + + # 4. REDO the entity creation and component addition. + # -> REDO entity creation. + general.redo() + # -> REDO selecting entity. + general.redo() + # -> REDO naming entity. + general.redo() + # -> REDO component addition. + general.redo() + general.idle_wait_frames(1) + Report.result(Tests.creation_redo, entity_reference_entity.exists()) + + # 5. Enter/Exit game mode. + TestHelper.enter_game_mode(Tests.enter_game_mode) + general.idle_wait_frames(1) + TestHelper.exit_game_mode(Tests.exit_game_mode) + + # 6. Test IsHidden. + entity_reference_entity.set_visibility_state(False) + Report.result(Tests.is_hidden, entity_reference_entity.is_hidden() is True) + + # 7. Test IsVisible. + entity_reference_entity.set_visibility_state(True) + general.idle_wait_frames(1) + Report.result(Tests.is_visible, entity_reference_entity.is_visible() is True) + + # 8. Delete Entity Reference entity. + entity_reference_entity.delete() + Report.result(Tests.entity_deleted, not entity_reference_entity.exists()) + + # 9. UNDO deletion. + general.undo() + Report.result(Tests.deletion_undo, entity_reference_entity.exists()) + + # 10. REDO deletion. + general.redo() + Report.result(Tests.deletion_redo, not entity_reference_entity.exists()) + + # 11. Look for errors and asserts. + TestHelper.wait_for_condition(lambda: error_tracer.has_errors or error_tracer.has_asserts, 1.0) + for error_info in error_tracer.errors: + Report.info(f"Error: {error_info.filename} {error_info.function} | {error_info.message}") + for assert_info in error_tracer.asserts: + Report.info(f"Assert: {assert_info.filename} {assert_info.function} | {assert_info.message}") + + +if __name__ == "__main__": + from editor_python_test_tools.utils import Report + Report.start_test(AtomEditorComponents_EntityReference_AddedToEntity) diff --git a/AutomatedTesting/Gem/PythonTests/Atom/tests/hydra_AtomEditorComponents_GlobalSkylightIBLAdded.py b/AutomatedTesting/Gem/PythonTests/Atom/tests/hydra_AtomEditorComponents_GlobalSkylightIBLAdded.py index db8f2daaee..7f0c38e289 100644 --- a/AutomatedTesting/Gem/PythonTests/Atom/tests/hydra_AtomEditorComponents_GlobalSkylightIBLAdded.py +++ b/AutomatedTesting/Gem/PythonTests/Atom/tests/hydra_AtomEditorComponents_GlobalSkylightIBLAdded.py @@ -151,7 +151,7 @@ def AtomEditorComponents_GlobalSkylightIBL_AddedToEntity(): Report.result(Tests.is_visible, global_skylight_entity.is_visible() is True) # 8. Set the Diffuse Image asset on the Global Skylight (IBL) entity. - diffuse_image_path = os.path.join("LightingPresets", "greenwich_park_02_4k_iblskyboxcm.exr.streamingimage") + diffuse_image_path = os.path.join("LightingPresets", "default_iblskyboxcm.exr.streamingimage") diffuse_image_asset = Asset.find_asset_by_path(diffuse_image_path, False) global_skylight_component.set_component_property_value( AtomComponentProperties.global_skylight('Diffuse Image'), diffuse_image_asset.id) @@ -161,7 +161,7 @@ def AtomEditorComponents_GlobalSkylightIBL_AddedToEntity(): AtomComponentProperties.global_skylight('Diffuse Image'))) # 9. Set the Specular Image asset on the Global Light (IBL) entity. - specular_image_path = os.path.join("LightingPresets", "greenwich_park_02_4k_iblskyboxcm.exr.streamingimage") + specular_image_path = os.path.join("LightingPresets", "default_iblskyboxcm.exr.streamingimage") specular_image_asset = Asset.find_asset_by_path(specular_image_path, False) global_skylight_component.set_component_property_value( AtomComponentProperties.global_skylight('Specular Image'), specular_image_asset.id) diff --git a/AutomatedTesting/Gem/PythonTests/Atom/tests/hydra_AtomEditorComponents_HDRColorGradingAdded.py b/AutomatedTesting/Gem/PythonTests/Atom/tests/hydra_AtomEditorComponents_HDRColorGradingAdded.py new file mode 100644 index 0000000000..4972079fcd --- /dev/null +++ b/AutomatedTesting/Gem/PythonTests/Atom/tests/hydra_AtomEditorComponents_HDRColorGradingAdded.py @@ -0,0 +1,192 @@ +""" +Copyright (c) Contributors to the Open 3D Engine Project. +For complete copyright and license terms please see the LICENSE at the root of this distribution. + +SPDX-License-Identifier: Apache-2.0 OR MIT +""" + +class Tests: + creation_undo = ( + "UNDO Entity creation success", + "UNDO Entity creation failed") + creation_redo = ( + "REDO Entity creation success", + "REDO Entity creation failed") + hdr_color_grading_creation = ( + "HDR Color Grading Entity successfully created", + "HDR Color Grading Entity failed to be created") + hdr_color_grading_component = ( + "Entity has an HDR Color Grading component", + "Entity failed to find HDR Color Grading component") + hdr_color_grading_disabled = ( + "HDR Color Grading component disabled", + "HDR Color Grading component was not disabled") + postfx_layer_component = ( + "Entity has a PostFX Layer component", + "Entity did not have an PostFX Layer component") + hdr_color_grading_enabled = ( + "HDR Color Grading component enabled", + "HDR Color Grading component was not enabled") + enable_hdr_color_grading_parameter_enabled = ( + "Enable HDR Color Grading parameter enabled", + "Enable HDR Color Grading parameter was not enabled") + enter_game_mode = ( + "Entered game mode", + "Failed to enter game mode") + exit_game_mode = ( + "Exited game mode", + "Couldn't exit game mode") + is_visible = ( + "Entity is visible", + "Entity was not visible") + is_hidden = ( + "Entity is hidden", + "Entity was not hidden") + entity_deleted = ( + "Entity deleted", + "Entity was not deleted") + deletion_undo = ( + "UNDO deletion success", + "UNDO deletion failed") + deletion_redo = ( + "REDO deletion success", + "REDO deletion failed") + + +def AtomEditorComponents_HDRColorGrading_AddedToEntity(): + """ + Summary: + Tests the HDR Color Grading component can be added to an entity and has the expected functionality. + + Test setup: + - Wait for Editor idle loop. + - Open the "Base" level. + + Expected Behavior: + The component can be added, used in game mode, hidden/shown, deleted, and has accurate required components. + Creation and deletion undo/redo should also work. + + Test Steps: + 1) Create an HDR Color Grading entity with no components. + 2) Add HDR Color Grading component to HDR Color Grading entity. + 3) UNDO the entity creation and component addition. + 4) REDO the entity creation and component addition. + 5) Verify HDR Color Grading component not enabled. + 6) Add PostFX Layer component since it is required by the HDR Color Grading component. + 7) Verify HDR Color Grading component is enabled. + 8) Enable the "Enable HDR Color Grading" parameter. + 9) Enter/Exit game mode. + 10) Test IsHidden. + 11) Test IsVisible. + 12) Delete HDR Color Grading entity. + 13) UNDO deletion. + 14) REDO deletion. + 15) Look for errors. + + :return: None + """ + + import azlmbr.legacy.general as general + + from editor_python_test_tools.editor_entity_utils import EditorEntity + from editor_python_test_tools.utils import Report, Tracer, TestHelper + from Atom.atom_utils.atom_constants import AtomComponentProperties + + with Tracer() as error_tracer: + # Test setup begins. + # Setup: Wait for Editor idle loop before executing Python hydra scripts then open "Base" level. + TestHelper.init_idle() + TestHelper.open_level("", "Base") + + # Test steps begin. + # 1. Create an HDR Color Grading entity with no components. + hdr_color_grading_entity = EditorEntity.create_editor_entity(AtomComponentProperties.hdr_color_grading()) + Report.critical_result(Tests.hdr_color_grading_creation, hdr_color_grading_entity.exists()) + + # 2. Add HDR Color Grading component to HDR Color Grading entity. + hdr_color_grading_component = hdr_color_grading_entity.add_component( + AtomComponentProperties.hdr_color_grading()) + Report.critical_result( + Tests.hdr_color_grading_component, + hdr_color_grading_entity.has_component(AtomComponentProperties.hdr_color_grading())) + + # 3. UNDO the entity creation and component addition. + # -> UNDO component addition. + general.undo() + # -> UNDO naming entity. + general.undo() + # -> UNDO selecting entity. + general.undo() + # -> UNDO entity creation. + general.undo() + general.idle_wait_frames(1) + Report.result(Tests.creation_undo, not hdr_color_grading_entity.exists()) + + # 4. REDO the entity creation and component addition. + # -> REDO entity creation. + general.redo() + # -> REDO selecting entity. + general.redo() + # -> REDO naming entity. + general.redo() + # -> REDO component addition. + general.redo() + general.idle_wait_frames(1) + Report.result(Tests.creation_redo, hdr_color_grading_entity.exists()) + + # 5. Verify HDR Color Grading component not enabled. + Report.result(Tests.hdr_color_grading_disabled, not hdr_color_grading_component.is_enabled()) + + # 6. Add PostFX Layer component since it is required by the HDR Color Grading component. + hdr_color_grading_entity.add_component(AtomComponentProperties.postfx_layer()) + Report.result( + Tests.postfx_layer_component, + hdr_color_grading_entity.has_component(AtomComponentProperties.postfx_layer())) + + # 7. Verify HDR Color Grading component is enabled. + Report.result(Tests.hdr_color_grading_enabled, hdr_color_grading_component.is_enabled()) + + # 8. Enable the "Enable HDR Color Grading" parameter. + hdr_color_grading_component.set_component_property_value( + AtomComponentProperties.hdr_color_grading('Enable HDR color grading'), True) + Report.result(Tests.enable_hdr_color_grading_parameter_enabled, + hdr_color_grading_component.get_component_property_value( + AtomComponentProperties.hdr_color_grading('Enable HDR color grading')) is True) + + # 9. Enter/Exit game mode. + TestHelper.enter_game_mode(Tests.enter_game_mode) + general.idle_wait_frames(1) + TestHelper.exit_game_mode(Tests.exit_game_mode) + + # 10. Test IsHidden. + hdr_color_grading_entity.set_visibility_state(False) + Report.result(Tests.is_hidden, hdr_color_grading_entity.is_hidden() is True) + + # 11. Test IsVisible. + hdr_color_grading_entity.set_visibility_state(True) + general.idle_wait_frames(1) + Report.result(Tests.is_visible, hdr_color_grading_entity.is_visible() is True) + + # 12. Delete HDR Color Grading entity. + hdr_color_grading_entity.delete() + Report.result(Tests.entity_deleted, not hdr_color_grading_entity.exists()) + + # 13. UNDO deletion. + general.undo() + Report.result(Tests.deletion_undo, hdr_color_grading_entity.exists()) + + # 14. REDO deletion. + general.redo() + Report.result(Tests.deletion_redo, not hdr_color_grading_entity.exists()) + + # 15. Look for errors and asserts. + TestHelper.wait_for_condition(lambda: error_tracer.has_errors or error_tracer.has_asserts, 1.0) + for error_info in error_tracer.errors: + Report.info(f"Error: {error_info.filename} {error_info.function} | {error_info.message}") + for assert_info in error_tracer.asserts: + Report.info(f"Assert: {assert_info.filename} {assert_info.function} | {assert_info.message}") + + +if __name__ == "__main__": + from editor_python_test_tools.utils import Report + Report.start_test(AtomEditorComponents_HDRColorGrading_AddedToEntity) diff --git a/AutomatedTesting/Gem/PythonTests/Atom/tests/hydra_AtomEditorComponents_HDRiSkyboxAdded.py b/AutomatedTesting/Gem/PythonTests/Atom/tests/hydra_AtomEditorComponents_HDRiSkyboxAdded.py new file mode 100644 index 0000000000..0f96bc5424 --- /dev/null +++ b/AutomatedTesting/Gem/PythonTests/Atom/tests/hydra_AtomEditorComponents_HDRiSkyboxAdded.py @@ -0,0 +1,177 @@ +""" +Copyright (c) Contributors to the Open 3D Engine Project. +For complete copyright and license terms please see the LICENSE at the root of this distribution. + +SPDX-License-Identifier: Apache-2.0 OR MIT +""" + + +class Tests: + creation_undo = ( + "UNDO Entity creation success", + "UNDO Entity creation failed") + creation_redo = ( + "REDO Entity creation success", + "REDO Entity creation failed") + hdri_skybox_entity_creation = ( + "HDRi Skybox successfully created", + "HDRi Skybox failed to be created") + hdri_skybox_component = ( + "Entity has an HDRi Skybox component", + "Entity failed to find HDRi Skybox component") + cubemap_property_set = ( + "Cubemap property set on HDRi Skybox component", + "Couldn't set Cubemap property on HDRi Skybox component") + enter_game_mode = ( + "Entered game mode", + "Failed to enter game mode") + exit_game_mode = ( + "Exited game mode", + "Couldn't exit game mode") + is_visible = ( + "Entity is visible", + "Entity was not visible") + is_hidden = ( + "Entity is hidden", + "Entity was not hidden") + entity_deleted = ( + "Entity deleted", + "Entity was not deleted") + deletion_undo = ( + "UNDO deletion success", + "UNDO deletion failed") + deletion_redo = ( + "REDO deletion success", + "REDO deletion failed") + + +def AtomEditorComponents_HDRiSkybox_AddedToEntity(): + """ + Summary: + Tests the HDRi Skybox component can be added to an entity and has the expected functionality. + + Test setup: + - Wait for Editor idle loop. + - Open the "Base" level. + + Expected Behavior: + The component can be added, used in game mode, hidden/shown, deleted, and has accurate required components. + Creation and deletion undo/redo should also work. + + Test Steps: + 1) Create an HDRi Skybox with no components. + 2) Add an HDRi Skybox component to HDRi Skybox. + 3) UNDO the entity creation and component addition. + 4) REDO the entity creation and component addition. + 5) Enter/Exit game mode. + 6) Test IsHidden. + 7) Test IsVisible. + 8) Delete HDRi Skybox. + 9) UNDO deletion. + 10) REDO deletion. + 11) Look for errors. + + :return: None + """ + + import os + + import azlmbr.legacy.general as general + + from editor_python_test_tools.asset_utils import Asset + from editor_python_test_tools.editor_entity_utils import EditorEntity + from editor_python_test_tools.utils import Report, Tracer, TestHelper + from Atom.atom_utils.atom_constants import AtomComponentProperties + + with Tracer() as error_tracer: + # Test setup begins. + # Setup: Wait for Editor idle loop before executing Python hydra scripts then open "Base" level. + TestHelper.init_idle() + TestHelper.open_level("", "Base") + + # Test steps begin. + # 1. Create an HDRi Skybox with no components. + hdri_skybox_entity = EditorEntity.create_editor_entity( + AtomComponentProperties.hdri_skybox()) + Report.critical_result(Tests.hdri_skybox_entity_creation, + hdri_skybox_entity.exists()) + + # 2. Add an HDRi Skybox component to HDRi Skybox. + hdri_skybox_component = hdri_skybox_entity.add_component( + AtomComponentProperties.hdri_skybox()) + Report.critical_result( + Tests.hdri_skybox_component, + hdri_skybox_entity.has_component(AtomComponentProperties.hdri_skybox())) + + # 3. UNDO the entity creation and component addition. + # -> UNDO component addition. + general.undo() + # -> UNDO naming entity. + general.undo() + # -> UNDO selecting entity. + general.undo() + # -> UNDO entity creation. + general.undo() + general.idle_wait_frames(1) + Report.result(Tests.creation_undo, not hdri_skybox_entity.exists()) + + # 4. REDO the entity creation and component addition. + # -> REDO entity creation. + general.redo() + # -> REDO selecting entity. + general.redo() + # -> REDO naming entity. + general.redo() + # -> REDO component addition. + general.redo() + general.idle_wait_frames(1) + Report.result(Tests.creation_redo, hdri_skybox_entity.exists()) + + + # 5. Set Cubemap Texture on HDRi Skybox component. + skybox_cubemap_asset_path = os.path.join("LightingPresets", "default_iblskyboxcm.exr.streamingimage") + skybox_cubemap_material_asset = Asset.find_asset_by_path(skybox_cubemap_asset_path, False) + hdri_skybox_component.set_component_property_value( + AtomComponentProperties.hdri_skybox('Cubemap Texture'), skybox_cubemap_material_asset.id) + get_cubemap_property = hdri_skybox_component.get_component_property_value( + AtomComponentProperties.hdri_skybox('Cubemap Texture')) + Report.result(Tests.cubemap_property_set, get_cubemap_property == skybox_cubemap_material_asset.id) + + + # 6. Enter/Exit game mode. + TestHelper.enter_game_mode(Tests.enter_game_mode) + general.idle_wait_frames(1) + TestHelper.exit_game_mode(Tests.exit_game_mode) + + # 7. Test IsHidden. + hdri_skybox_entity.set_visibility_state(False) + Report.result(Tests.is_hidden, hdri_skybox_entity.is_hidden() is True) + + # 8. Test IsVisible. + hdri_skybox_entity.set_visibility_state(True) + general.idle_wait_frames(1) + Report.result(Tests.is_visible, hdri_skybox_entity.is_visible() is True) + + # 9. Delete hdri_skybox entity. + hdri_skybox_entity.delete() + Report.result(Tests.entity_deleted, not hdri_skybox_entity.exists()) + + # 10. UNDO deletion. + general.undo() + Report.result(Tests.deletion_undo, hdri_skybox_entity.exists()) + + # 11. REDO deletion. + general.redo() + Report.result(Tests.deletion_redo, not hdri_skybox_entity.exists()) + + # 12. Look for errors or asserts. + TestHelper.wait_for_condition(lambda: error_tracer.has_errors or error_tracer.has_asserts, 1.0) + for error_info in error_tracer.errors: + Report.info(f"Error: {error_info.filename} {error_info.function} | {error_info.message}") + for assert_info in error_tracer.asserts: + Report.info(f"Assert: {assert_info.filename} {assert_info.function} | {assert_info.message}") + + +if __name__ == "__main__": + from editor_python_test_tools.utils import Report + Report.start_test(AtomEditorComponents_HDRiSkybox_AddedToEntity) diff --git a/AutomatedTesting/Gem/PythonTests/Atom/tests/hydra_AtomEditorComponents_LookModificationAdded.py b/AutomatedTesting/Gem/PythonTests/Atom/tests/hydra_AtomEditorComponents_LookModificationAdded.py new file mode 100644 index 0000000000..afb8033426 --- /dev/null +++ b/AutomatedTesting/Gem/PythonTests/Atom/tests/hydra_AtomEditorComponents_LookModificationAdded.py @@ -0,0 +1,211 @@ +""" +Copyright (c) Contributors to the Open 3D Engine Project. +For complete copyright and license terms please see the LICENSE at the root of this distribution. + +SPDX-License-Identifier: Apache-2.0 OR MIT +""" + + +class Tests: + creation_undo = ( + "UNDO Entity creation success", + "UNDO Entity creation failed") + creation_redo = ( + "REDO Entity creation success", + "REDO Entity creation failed") + look_modification_creation = ( + "Look Modification Entity successfully created", + "Look Modification Entity failed to be created") + look_modification_component = ( + "Entity has a Look Modification component", + "Entity failed to find Look Modification component") + look_modification_disabled = ( + "Look Modification component disabled", + "Look Modification component was not disabled") + postfx_layer_component = ( + "Entity has a PostFX Layer component", + "Entity did not have an PostFX Layer component") + look_modification_enabled = ( + "Look Modification component enabled", + "Look Modification component was not enabled") + enable_look_modification_parameter_enabled = ( + "Enable look modification parameter enabled", + "Enable look modification parameter was not enabled") + color_grading_lut_set = ( + "Entity has the Color Grading LUT set", + "Entity did not the Color Grading LUT set") + enter_game_mode = ( + "Entered game mode", + "Failed to enter game mode") + exit_game_mode = ( + "Exited game mode", + "Couldn't exit game mode") + is_visible = ( + "Entity is visible", + "Entity was not visible") + is_hidden = ( + "Entity is hidden", + "Entity was not hidden") + entity_deleted = ( + "Entity deleted", + "Entity was not deleted") + deletion_undo = ( + "UNDO deletion success", + "UNDO deletion failed") + deletion_redo = ( + "REDO deletion success", + "REDO deletion failed") + + +def AtomEditorComponents_LookModification_AddedToEntity(): + """ + Summary: + Tests the Look Modification component can be added to an entity and has the expected functionality. + + Test setup: + - Wait for Editor idle loop. + - Open the "Base" level. + + Expected Behavior: + The component can be added, used in game mode, hidden/shown, deleted, and has accurate required components. + Creation and deletion undo/redo should also work. + + Test Steps: + 1) Create an Look Modification entity with no components. + 2) Add Look Modification component to Look Modification entity. + 3) UNDO the entity creation and component addition. + 4) REDO the entity creation and component addition. + 5) Verify Look Modification component not enabled. + 6) Add PostFX Layer component since it is required by the Look Modification component. + 7) Verify Look Modification component is enabled. + 8) Enable the "Enable Look Modification" parameter. + 9) Add LUT asset to the Color Grading LUT parameter. + 9) Enter/Exit game mode. + 10) Test IsHidden. + 11) Test IsVisible. + 12) Delete Look Modification entity. + 13) UNDO deletion. + 14) REDO deletion. + 15) Look for errors. + + :return: None + """ + + import os + + import azlmbr.legacy.general as general + + from editor_python_test_tools.asset_utils import Asset + from editor_python_test_tools.editor_entity_utils import EditorEntity + from editor_python_test_tools.utils import Report, Tracer, TestHelper + from Atom.atom_utils.atom_constants import AtomComponentProperties + + with Tracer() as error_tracer: + # Test setup begins. + # Setup: Wait for Editor idle loop before executing Python hydra scripts then open "Base" level. + TestHelper.init_idle() + TestHelper.open_level("", "Base") + + # Test steps begin. + # 1. Create an Look Modification entity with no components. + look_modification_entity = EditorEntity.create_editor_entity(AtomComponentProperties.look_modification()) + Report.critical_result(Tests.look_modification_creation, look_modification_entity.exists()) + + # 2. Add Look Modification component to Look Modification entity. + look_modification_component = look_modification_entity.add_component( + AtomComponentProperties.look_modification()) + Report.critical_result( + Tests.look_modification_component, + look_modification_entity.has_component(AtomComponentProperties.look_modification())) + + # 3. UNDO the entity creation and component addition. + # -> UNDO component addition. + general.undo() + # -> UNDO naming entity. + general.undo() + # -> UNDO selecting entity. + general.undo() + # -> UNDO entity creation. + general.undo() + general.idle_wait_frames(1) + Report.result(Tests.creation_undo, not look_modification_entity.exists()) + + # 4. REDO the entity creation and component addition. + # -> REDO entity creation. + general.redo() + # -> REDO selecting entity. + general.redo() + # -> REDO naming entity. + general.redo() + # -> REDO component addition. + general.redo() + general.idle_wait_frames(1) + Report.result(Tests.creation_redo, look_modification_entity.exists()) + + # 5. Verify Look Modification component not enabled. + Report.result(Tests.look_modification_disabled, not look_modification_component.is_enabled()) + + # 6. Add PostFX Layer component since it is required by the Look Modification component. + look_modification_entity.add_component(AtomComponentProperties.postfx_layer()) + Report.result( + Tests.postfx_layer_component, + look_modification_entity.has_component(AtomComponentProperties.postfx_layer())) + + # 7. Verify Look Modification component is enabled. + Report.result(Tests.look_modification_enabled, look_modification_component.is_enabled()) + + # 8. Enable the "Enable look modification" parameter. + look_modification_component.set_component_property_value( + AtomComponentProperties.look_modification('Enable look modification'), True) + Report.result(Tests.enable_look_modification_parameter_enabled, + look_modification_component.get_component_property_value( + AtomComponentProperties.look_modification('Enable look modification')) is True) + + # 9. Set the Color Grading LUT asset on the Look Modification entity. + color_grading_lut_path = os.path.join("ColorGrading", "TestData", "Photoshop", "inv-Log2-48nits", + "test_3dl_32_lut.azasset") + color_grading_lut_asset = Asset.find_asset_by_path(color_grading_lut_path, False) + look_modification_component.set_component_property_value( + AtomComponentProperties.look_modification('Color Grading LUT'), color_grading_lut_asset.id) + Report.result( + Tests.color_grading_lut_set, + color_grading_lut_asset.id == look_modification_component.get_component_property_value( + AtomComponentProperties.look_modification('Color Grading LUT'))) + + # 10. Enter/Exit game mode. + TestHelper.enter_game_mode(Tests.enter_game_mode) + general.idle_wait_frames(1) + TestHelper.exit_game_mode(Tests.exit_game_mode) + + # 11. Test IsHidden. + look_modification_entity.set_visibility_state(False) + Report.result(Tests.is_hidden, look_modification_entity.is_hidden() is True) + + # 12. Test IsVisible. + look_modification_entity.set_visibility_state(True) + general.idle_wait_frames(1) + Report.result(Tests.is_visible, look_modification_entity.is_visible() is True) + + # 13. Delete Look Modification entity. + look_modification_entity.delete() + Report.result(Tests.entity_deleted, not look_modification_entity.exists()) + + # 14. UNDO deletion. + general.undo() + Report.result(Tests.deletion_undo, look_modification_entity.exists()) + + # 15. REDO deletion. + general.redo() + Report.result(Tests.deletion_redo, not look_modification_entity.exists()) + + # 16. Look for errors and asserts. + TestHelper.wait_for_condition(lambda: error_tracer.has_errors or error_tracer.has_asserts, 1.0) + for error_info in error_tracer.errors: + Report.info(f"Error: {error_info.filename} {error_info.function} | {error_info.message}") + for assert_info in error_tracer.asserts: + Report.info(f"Assert: {assert_info.filename} {assert_info.function} | {assert_info.message}") + + +if __name__ == "__main__": + from editor_python_test_tools.utils import Report + Report.start_test(AtomEditorComponents_LookModification_AddedToEntity) diff --git a/AutomatedTesting/Gem/PythonTests/Atom/tests/hydra_AtomEditorComponents_OcclusionCullingPlaneAdded.py b/AutomatedTesting/Gem/PythonTests/Atom/tests/hydra_AtomEditorComponents_OcclusionCullingPlaneAdded.py new file mode 100644 index 0000000000..4226ae3dfe --- /dev/null +++ b/AutomatedTesting/Gem/PythonTests/Atom/tests/hydra_AtomEditorComponents_OcclusionCullingPlaneAdded.py @@ -0,0 +1,159 @@ +""" +Copyright (c) Contributors to the Open 3D Engine Project. +For complete copyright and license terms please see the LICENSE at the root of this distribution. + +SPDX-License-Identifier: Apache-2.0 OR MIT +""" + +class Tests: + creation_undo = ( + "UNDO Entity creation success", + "UNDO Entity creation failed") + creation_redo = ( + "REDO Entity creation success", + "REDO Entity creation failed") + occlusion_culling_plane_entity_creation = ( + "Occlusion Culling Plane Entity successfully created", + "Occlusion Culling Plane Entity failed to be created") + occlusion_culling_plane_component_added = ( + "Entity has a Occlusion Culling Plane component", + "Entity failed to find Occlusion Culling Plane component") + enter_game_mode = ( + "Entered game mode", + "Failed to enter game mode") + exit_game_mode = ( + "Exited game mode", + "Couldn't exit game mode") + is_visible = ( + "Entity is visible", + "Entity was not visible") + is_hidden = ( + "Entity is hidden", + "Entity was not hidden") + entity_deleted = ( + "Entity deleted", + "Entity was not deleted") + deletion_undo = ( + "UNDO deletion success", + "UNDO deletion failed") + deletion_redo = ( + "REDO deletion success", + "REDO deletion failed") + + +def AtomEditorComponents_OcclusionCullingPlane_AddedToEntity(): + """ + Summary: + Tests the occlusion culling plane component can be added to an entity and has the expected functionality. + + Test setup: + - Wait for Editor idle loop. + - Open the "Base" level. + + Expected Behavior: + The component can be added, used in game mode, hidden/shown, deleted, and has accurate required components. + Creation and deletion undo/redo should also work. + + Test Steps: + 1) Create a Occlusion Culling Plane entity with no components. + 2) Add a Occlusion Culling Plane component to Occlusion Culling Plane entity. + 3) UNDO the entity creation and component addition. + 4) REDO the entity creation and component addition. + 5) Enter/Exit game mode. + 6) Test IsHidden. + 7) Test IsVisible. + 8) Delete Occlusion Culling Plane entity. + 9) UNDO deletion. + 10) REDO deletion. + 11) Look for errors. + + :return: None + """ + + import azlmbr.legacy.general as general + + from editor_python_test_tools.editor_entity_utils import EditorEntity + from editor_python_test_tools.utils import Report, Tracer, TestHelper + from Atom.atom_utils.atom_constants import AtomComponentProperties + + with Tracer() as error_tracer: + # Test setup begins. + # Setup: Wait for Editor idle loop before executing Python hydra scripts then open "Base" level. + TestHelper.init_idle() + TestHelper.open_level("", "Base") + + # Test steps begin. + # 1. Create a occlusion culling plane entity with no components. + occlusion_culling_plane_entity = EditorEntity.create_editor_entity( + AtomComponentProperties.occlusion_culling_plane()) + Report.critical_result(Tests.occlusion_culling_plane_entity_creation, + occlusion_culling_plane_entity.exists()) + + # 2. Add a occlusion culling plane component to occlusion culling plane entity. + occlusion_culling_plane_component = occlusion_culling_plane_entity.add_component( + AtomComponentProperties.occlusion_culling_plane()) + Report.critical_result( + Tests.occlusion_culling_plane_component_added, + occlusion_culling_plane_entity.has_component(AtomComponentProperties.occlusion_culling_plane())) + + # 3. UNDO the entity creation and component addition. + # -> UNDO component addition. + general.undo() + # -> UNDO naming entity. + general.undo() + # -> UNDO selecting entity. + general.undo() + # -> UNDO entity creation. + general.undo() + general.idle_wait_frames(1) + Report.result(Tests.creation_undo, not occlusion_culling_plane_entity.exists()) + + # 4. REDO the entity creation and component addition. + # -> REDO entity creation. + general.redo() + # -> REDO selecting entity. + general.redo() + # -> REDO naming entity. + general.redo() + # -> REDO component addition. + general.redo() + general.idle_wait_frames(1) + Report.result(Tests.creation_redo, occlusion_culling_plane_entity.exists()) + + # 5. Enter/Exit game mode. + TestHelper.enter_game_mode(Tests.enter_game_mode) + general.idle_wait_frames(1) + TestHelper.exit_game_mode(Tests.exit_game_mode) + + # 6. Test IsHidden. + occlusion_culling_plane_entity.set_visibility_state(False) + Report.result(Tests.is_hidden, occlusion_culling_plane_entity.is_hidden() is True) + + # 7. Test IsVisible. + occlusion_culling_plane_entity.set_visibility_state(True) + general.idle_wait_frames(1) + Report.result(Tests.is_visible, occlusion_culling_plane_entity.is_visible() is True) + + # 8. Delete occlusion_culling_plane entity. + occlusion_culling_plane_entity.delete() + Report.result(Tests.entity_deleted, not occlusion_culling_plane_entity.exists()) + + # 9. UNDO deletion. + general.undo() + Report.result(Tests.deletion_undo, occlusion_culling_plane_entity.exists()) + + # 10. REDO deletion. + general.redo() + Report.result(Tests.deletion_redo, not occlusion_culling_plane_entity.exists()) + + # 11. Look for errors or asserts. + TestHelper.wait_for_condition(lambda: error_tracer.has_errors or error_tracer.has_asserts, 1.0) + for error_info in error_tracer.errors: + Report.info(f"Error: {error_info.filename} {error_info.function} | {error_info.message}") + for assert_info in error_tracer.asserts: + Report.info(f"Assert: {assert_info.filename} {assert_info.function} | {assert_info.message}") + + +if __name__ == "__main__": + from editor_python_test_tools.utils import Report + Report.start_test(AtomEditorComponents_OcclusionCullingPlane_AddedToEntity) diff --git a/AutomatedTesting/Gem/PythonTests/Atom/tests/hydra_AtomEditorComponents_SSAOAdded.py b/AutomatedTesting/Gem/PythonTests/Atom/tests/hydra_AtomEditorComponents_SSAOAdded.py new file mode 100644 index 0000000000..15f40f8b70 --- /dev/null +++ b/AutomatedTesting/Gem/PythonTests/Atom/tests/hydra_AtomEditorComponents_SSAOAdded.py @@ -0,0 +1,182 @@ +""" +Copyright (c) Contributors to the Open 3D Engine Project. +For complete copyright and license terms please see the LICENSE at the root of this distribution. + +SPDX-License-Identifier: Apache-2.0 OR MIT +""" + + +class Tests: + creation_undo = ( + "UNDO Entity creation success", + "UNDO Entity creation failed") + creation_redo = ( + "REDO Entity creation success", + "REDO Entity creation failed") + ssao_creation = ( + "SSAO Entity successfully created", + "SSAO Entity failed to be created") + ssao_component = ( + "Entity has a SSAO component", + "Entity failed to find SSAO component") + ssao_disabled = ( + "SSAO component disabled", + "SSAO component was not disabled.") + postfx_layer_component = ( + "Entity has a PostFX Layer component", + "Entity did not have an PostFX Layer component") + ssao_enabled = ( + "SSAO component enabled", + "SSAO component was not enabled.") + enter_game_mode = ( + "Entered game mode", + "Failed to enter game mode") + exit_game_mode = ( + "Exited game mode", + "Couldn't exit game mode") + is_visible = ( + "Entity is visible", + "Entity was not visible") + is_hidden = ( + "Entity is hidden", + "Entity was not hidden") + entity_deleted = ( + "Entity deleted", + "Entity was not deleted") + deletion_undo = ( + "UNDO deletion success", + "UNDO deletion failed") + deletion_redo = ( + "REDO deletion success", + "REDO deletion failed") + + +def AtomEditorComponents_SSAO_AddedToEntity(): + """ + Summary: + Tests the SSAO component can be added to an entity and has the expected functionality. + Screen Space Ambient Occlusion (SSAO) is a PostFX shadow lighting effect. + + Test setup: + - Wait for Editor idle loop. + - Open the "Base" level. + + Expected Behavior: + The component can be added, used in game mode, hidden/shown, deleted, and has accurate required components. + Creation and deletion undo/redo should also work. + + Test Steps: + 1) Create a SSAO entity with no components. + 2) Add SSAO component to SSAO entity. + 3) UNDO the entity creation and component addition. + 4) REDO the entity creation and component addition. + 5) Verify SSAO component not enabled. + 6) Add PostFX Layer component since it is required by the SSAO component. + 7) Verify SSAO component is enabled. + 8) Enter/Exit game mode. + 9) Test IsHidden. + 10) Test IsVisible. + 11) Delete SSAO entity. + 12) UNDO deletion. + 13) REDO deletion. + 14) Look for errors. + + :return: None + """ + + import azlmbr.legacy.general as general + + from editor_python_test_tools.editor_entity_utils import EditorEntity + from editor_python_test_tools.utils import Report, Tracer, TestHelper + from Atom.atom_utils.atom_constants import AtomComponentProperties + + with Tracer() as error_tracer: + # Test setup begins. + # Setup: Wait for Editor idle loop before executing Python hydra scripts then open "Base" level. + TestHelper.init_idle() + TestHelper.open_level("", "Base") + + # Test steps begin. + # 1. Create a SSAO entity with no components. + ssao_entity = EditorEntity.create_editor_entity(AtomComponentProperties.ssao()) + Report.critical_result(Tests.ssao_creation, ssao_entity.exists()) + + # 2. Add SSAO component to SSAO entity. + ssao_component = ssao_entity.add_component(AtomComponentProperties.ssao()) + Report.critical_result( + Tests.ssao_component, + ssao_entity.has_component(AtomComponentProperties.ssao())) + ssao_component.get_property_tree() + # 3. UNDO the entity creation and component addition. + # -> UNDO component addition. + general.undo() + # -> UNDO naming entity. + general.undo() + # -> UNDO selecting entity. + general.undo() + # -> UNDO entity creation. + general.undo() + general.idle_wait_frames(1) + Report.result(Tests.creation_undo, not ssao_entity.exists()) + + # 4. REDO the entity creation and component addition. + # -> REDO entity creation. + general.redo() + # -> REDO selecting entity. + general.redo() + # -> REDO naming entity. + general.redo() + # -> REDO component addition. + general.redo() + general.idle_wait_frames(1) + Report.result(Tests.creation_redo, ssao_entity.exists()) + + # 5. Verify SSAO component not enabled. + Report.result(Tests.ssao_disabled, not ssao_component.is_enabled()) + + # 6. Add PostFX Layer component since it is required by the SSAO component. + ssao_entity.add_component(AtomComponentProperties.postfx_layer()) + Report.result( + Tests.postfx_layer_component, + ssao_entity.has_component(AtomComponentProperties.postfx_layer())) + + # 7. Verify SSAO component is enabled. + Report.result(Tests.ssao_enabled, ssao_component.is_enabled()) + + # 8. Enter/Exit game mode. + TestHelper.enter_game_mode(Tests.enter_game_mode) + general.idle_wait_frames(1) + TestHelper.exit_game_mode(Tests.exit_game_mode) + + # 9. Test IsHidden. + ssao_entity.set_visibility_state(False) + Report.result(Tests.is_hidden, ssao_entity.is_hidden() is True) + + # 10. Test IsVisible. + ssao_entity.set_visibility_state(True) + general.idle_wait_frames(1) + Report.result(Tests.is_visible, ssao_entity.is_visible() is True) + + # 11. Delete SSAO entity. + ssao_entity.delete() + Report.result(Tests.entity_deleted, not ssao_entity.exists()) + + # 12. UNDO deletion. + general.undo() + Report.result(Tests.deletion_undo, ssao_entity.exists()) + + # 13. REDO deletion. + general.redo() + Report.result(Tests.deletion_redo, not ssao_entity.exists()) + + # 14. Look for errors and asserts. + TestHelper.wait_for_condition(lambda: error_tracer.has_errors or error_tracer.has_asserts, 1.0) + for error_info in error_tracer.errors: + Report.info(f"Error: {error_info.filename} {error_info.function} | {error_info.message}") + for assert_info in error_tracer.asserts: + Report.info(f"Assert: {assert_info.filename} {assert_info.function} | {assert_info.message}") + + +if __name__ == "__main__": + from editor_python_test_tools.utils import Report + Report.start_test(AtomEditorComponents_SSAO_AddedToEntity) diff --git a/AutomatedTesting/Gem/PythonTests/Atom/tests/hydra_AtomGPU_AreaLightScreenshotTest.py b/AutomatedTesting/Gem/PythonTests/Atom/tests/hydra_AtomGPU_AreaLightScreenshotTest.py new file mode 100644 index 0000000000..a56c72e46c --- /dev/null +++ b/AutomatedTesting/Gem/PythonTests/Atom/tests/hydra_AtomGPU_AreaLightScreenshotTest.py @@ -0,0 +1,199 @@ +""" +Copyright (c) Contributors to the Open 3D Engine Project. +For complete copyright and license terms please see the LICENSE at the root of this distribution. + +SPDX-License-Identifier: Apache-2.0 OR MIT +""" + + +class Tests: + area_light_entity_created = ( + "Area Light entity successfully created", + "Area Light entity failed to be created") + area_light_entity_deleted = ( + "Area Light entity was deleted", + "Area Light entity was not deleted") + enter_game_mode = ( + "Entered game mode", + "Failed to enter game mode") + exit_game_mode = ( + "Exited game mode", + "Couldn't exit game mode") + light_component_added = ( + "Light component was added", + "Light component wasn't added") + light_component_attenuation_radius_property_set = ( + "Light component Attenuation Radius Property was set", + "Light component Attenuation Radius Property was not set") + light_component_color_property_set = ( + "Light component Color property was set", + "Light component Color property was not set") + light_component_intensity_property_set = ( + "Light component Intensity property was set", + "Light component Intensity property was not set") + light_component_light_type_property_set = ( + "Light type property was set", + "Light type property was not set") + + +def AtomGPU_LightComponent_AreaLightScreenshotsMatchGoldenImages(): + """ + Summary: + Light component test using the Capsule, Spot (disk), and Point (sphere) Light type property options. + Sets each scene up and then takes a screenshot of each scene for test comparison. + + Test setup: + - Wait for Editor idle loop. + - Open the "Base" level. + - Close error windows and display helpers then update the viewport size. + - Runs the create_basic_atom_rendering_scene() function to setup the test scene. + + Expected Behavior: + The test scripts sets up the scenes correctly and takes accurate screenshots. + + Test Steps: + 1. Create Area Light entity with no components. + 2. Add a Light component to the Area Light entity. + 3. Set the Light type property to Capsule for the Light component. + 4. Set the Light component's Color property to 255, 0, 0. + 5. Enter game mode and take a screenshot then exit game mode. + 6. Set the Intensity property of the Light component to 0.0. + 7. Set the Attenuation Radius Mode property of the Light component to 1 (automatic). + 8. Enter game mode and take a screenshot then exit game mode. + 9. Set the Intensity property of the Light component to 1000.0 + 10. Enter game mode and take a screenshot then exit game mode. + 11. Set the Light type property to Spot (disk) for the Light component & rotate DEGREE_RADIAN_FACTOR * 90 degrees. + 12. Enter game mode and take a screenshot then exit game mode. + 13. Set the Light type property to Point (sphere) instead of Spot (disk) for the Light component. + 14. Enter game mode and take a screenshot then exit game mode. + 15. Delete the Area Light entity. + 16. Look for errors. + + :return: None + """ + + import azlmbr.legacy.general as general + import azlmbr.paths + + from editor_python_test_tools.editor_entity_utils import EditorEntity + from editor_python_test_tools.utils import Report, Tracer, TestHelper + + from Atom.atom_utils.atom_constants import AtomComponentProperties, ATTENUATION_RADIUS_MODE, LIGHT_TYPES + from Atom.atom_utils.atom_component_helper import ( + initial_viewport_setup, create_basic_atom_rendering_scene, enter_exit_game_mode_take_screenshot) + + DEGREE_RADIAN_FACTOR = 0.0174533 + + with Tracer() as error_tracer: + # Test setup begins. + # Setup: Wait for Editor idle loop before executing Python hydra scripts then open "Base" level. + TestHelper.init_idle() + TestHelper.open_level("", "Base") + + # Setup: Close error windows and display helpers then update the viewport size. + TestHelper.close_error_windows() + TestHelper.close_display_helpers() + initial_viewport_setup() + general.update_viewport() + + # Setup: Runs the create_basic_atom_rendering_scene() function to setup the test scene. + create_basic_atom_rendering_scene() + + # Test steps begin. + # 1. Create Area Light entity with no components. + area_light_entity_name = "Area Light" + area_light_entity = EditorEntity.create_editor_entity_at( + azlmbr.math.Vector3(0.0, 0.0, 0.0), area_light_entity_name) + Report.critical_result(Tests.area_light_entity_created, area_light_entity.exists()) + + # 2. Add a Light component to the Area Light entity. + light_component = area_light_entity.add_component(AtomComponentProperties.light()) + Report.critical_result( + Tests.light_component_added, area_light_entity.has_component(AtomComponentProperties.light())) + + # 3. Set the Light type property to Capsule for the Light component. + light_component.set_component_property_value( + AtomComponentProperties.light('Light type'), LIGHT_TYPES['capsule']) + Report.result( + Tests.light_component_light_type_property_set, + light_component.get_component_property_value( + AtomComponentProperties.light('Light type')) == LIGHT_TYPES['capsule']) + + # 4. Set the Light component's Color property to 255, 0, 0. + light_component_color_value = azlmbr.math.Color(255.0, 0.0, 0.0, 0.0) + light_component.set_component_property_value( + AtomComponentProperties.light('Color'), light_component_color_value) + Report.result( + Tests.light_component_color_property_set, + light_component.get_component_property_value( + AtomComponentProperties.light('Color')) == light_component_color_value) + + # 5. Enter game mode and take a screenshot then exit game mode. + enter_exit_game_mode_take_screenshot("AreaLight_1.ppm", Tests.enter_game_mode, Tests.exit_game_mode) + + # 6. Set the Intensity property of the Light component to 0.0. + light_component.set_component_property_value(AtomComponentProperties.light('Intensity'), 0.0) + Report.result( + Tests.light_component_intensity_property_set, + light_component.get_component_property_value(AtomComponentProperties.light('Intensity')) == 0.0) + + # 7. Set the Attenuation Radius Mode property of the Light component to 1 (automatic). + light_component.set_component_property_value( + AtomComponentProperties.light('Attenuation Radius Mode'), ATTENUATION_RADIUS_MODE['automatic']) + Report.result( + Tests.light_component_attenuation_radius_property_set, + light_component.get_component_property_value( + AtomComponentProperties.light('Attenuation Radius Mode')) == ATTENUATION_RADIUS_MODE['automatic']) + + # 8. Enter game mode and take a screenshot then exit game mode. + enter_exit_game_mode_take_screenshot("AreaLight_2.ppm", Tests.enter_game_mode, Tests.exit_game_mode) + + # 9. Set the Intensity property of the Light component to 1000.0 + light_component.set_component_property_value(AtomComponentProperties.light('Intensity'), 1000.0) + Report.result( + Tests.light_component_intensity_property_set, + light_component.get_component_property_value(AtomComponentProperties.light('Intensity')) == 1000.0) + + # 10. Enter game mode and take a screenshot then exit game mode. + enter_exit_game_mode_take_screenshot("AreaLight_3.ppm", Tests.enter_game_mode, Tests.exit_game_mode) + + # 11. Set the Light type property to Spot (disk) for the Light component & + # rotate DEGREE_RADIAN_FACTOR * 90 degrees. + light_component.set_component_property_value( + AtomComponentProperties.light('Light type'), LIGHT_TYPES['spot_disk']) + area_light_rotation = azlmbr.math.Vector3(DEGREE_RADIAN_FACTOR * 90.0, 0.0, 0.0) + azlmbr.components.TransformBus(azlmbr.bus.Event, "SetLocalRotation", area_light_entity.id, area_light_rotation) + Report.result( + Tests.light_component_light_type_property_set, + light_component.get_component_property_value( + AtomComponentProperties.light('Light type')) == LIGHT_TYPES['spot_disk']) + + # 12. Enter game mode and take a screenshot then exit game mode. + enter_exit_game_mode_take_screenshot("AreaLight_4.ppm", Tests.enter_game_mode, Tests.exit_game_mode) + + # 13. Set the Light type property to Point (sphere) instead of Spot (disk) for the Light component. + light_component.set_component_property_value( + AtomComponentProperties.light('Light type'), LIGHT_TYPES['sphere']) + Report.result( + Tests.light_component_light_type_property_set, + light_component.get_component_property_value( + AtomComponentProperties.light('Light type')) == LIGHT_TYPES['sphere']) + + # 14. Enter game mode and take a screenshot then exit game mode. + enter_exit_game_mode_take_screenshot("AreaLight_5.ppm", Tests.enter_game_mode, Tests.exit_game_mode) + + # 15. Delete the Area Light entity. + area_light_entity.delete() + Report.result(Tests.area_light_entity_deleted, not area_light_entity.exists()) + + # 16. Look for errors. + TestHelper.wait_for_condition(lambda: error_tracer.has_errors or error_tracer.has_asserts, 1.0) + for error_info in error_tracer.errors: + Report.info(f"Error: {error_info.filename} {error_info.function} | {error_info.message}") + for assert_info in error_tracer.asserts: + Report.info(f"Assert: {assert_info.filename} {assert_info.function} | {assert_info.message}") + + +if __name__ == "__main__": + from editor_python_test_tools.utils import Report + Report.start_test(AtomGPU_LightComponent_AreaLightScreenshotsMatchGoldenImages) diff --git a/AutomatedTesting/Gem/PythonTests/Atom/tests/hydra_AtomGPU_BasicLevelSetup.py b/AutomatedTesting/Gem/PythonTests/Atom/tests/hydra_AtomGPU_BasicLevelSetup.py index 92c555127a..b15e5b2131 100644 --- a/AutomatedTesting/Gem/PythonTests/Atom/tests/hydra_AtomGPU_BasicLevelSetup.py +++ b/AutomatedTesting/Gem/PythonTests/Atom/tests/hydra_AtomGPU_BasicLevelSetup.py @@ -6,30 +6,70 @@ SPDX-License-Identifier: Apache-2.0 OR MIT """ -# fmt: off -class Tests : - camera_component_added = ("Camera component was added", "Camera component wasn't added") - camera_fov_set = ("Camera component FOV property set", "Camera component FOV property wasn't set") - directional_light_component_added = ("Directional Light component added", "Directional Light component wasn't added") - enter_game_mode = ("Entered game mode", "Failed to enter game mode") - exit_game_mode = ("Exited game mode", "Couldn't exit game mode") - global_skylight_component_added = ("Global Skylight (IBL) component added", "Global Skylight (IBL) component wasn't added") - global_skylight_diffuse_image_set = ("Global Skylight Diffuse Image property set", "Global Skylight Diffuse Image property wasn't set") - global_skylight_specular_image_set = ("Global Skylight Specular Image property set", "Global Skylight Specular Image property wasn't set") - ground_plane_material_asset_set = ("Ground Plane Material Asset was set", "Ground Plane Material Asset wasn't set") - ground_plane_material_component_added = ("Ground Plane Material component added", "Ground Plane Material component wasn't added") - ground_plane_mesh_asset_set = ("Ground Plane Mesh Asset property was set", "Ground Plane Mesh Asset property wasn't set") - hdri_skybox_component_added = ("HDRi Skybox component added", "HDRi Skybox component wasn't added") - hdri_skybox_cubemap_texture_set = ("HDRi Skybox Cubemap Texture property set", "HDRi Skybox Cubemap Texture property wasn't set") - mesh_component_added = ("Mesh component added", "Mesh component wasn't added") - no_assert_occurred = ("No asserts detected", "Asserts were detected") - no_error_occurred = ("No errors detected", "Errors were detected") - secondary_grid_spacing = ("Secondary Grid Spacing set", "Secondary Grid Spacing not set") - sphere_material_component_added = ("Sphere Material component added", "Sphere Material component wasn't added") - sphere_material_set = ("Sphere Material Asset was set", "Sphere Material Asset wasn't set") - sphere_mesh_asset_set = ("Sphere Mesh Asset was set", "Sphere Mesh Asset wasn't set") - viewport_set = ("Viewport set to correct size", "Viewport not set to correct size") -# fmt: on +class Tests: + camera_component_added = ( + "Camera component was added", + "Camera component wasn't added") + camera_fov_set = ( + "Camera component FOV property set", + "Camera component FOV property wasn't set") + directional_light_component_added = ( + "Directional Light component added", + "Directional Light component wasn't added") + enter_game_mode = ( + "Entered game mode", + "Failed to enter game mode") + exit_game_mode = ( + "Exited game mode", + "Couldn't exit game mode") + global_skylight_component_added = ( + "Global Skylight (IBL) component added", + "Global Skylight (IBL) component wasn't added") + global_skylight_diffuse_image_set = ( + "Global Skylight Diffuse Image property set", + "Global Skylight Diffuse Image property wasn't set") + global_skylight_specular_image_set = ( + "Global Skylight Specular Image property set", + "Global Skylight Specular Image property wasn't set") + ground_plane_material_asset_set = ( + "Ground Plane Material Asset was set", + "Ground Plane Material Asset wasn't set") + ground_plane_material_component_added = ( + "Ground Plane Material component added", + "Ground Plane Material component wasn't added") + ground_plane_mesh_asset_set = ( + "Ground Plane Mesh Asset property was set", + "Ground Plane Mesh Asset property wasn't set") + hdri_skybox_component_added = ( + "HDRi Skybox component added", + "HDRi Skybox component wasn't added") + hdri_skybox_cubemap_texture_set = ( + "HDRi Skybox Cubemap Texture property set", + "HDRi Skybox Cubemap Texture property wasn't set") + mesh_component_added = ( + "Mesh component added", + "Mesh component wasn't added") + no_assert_occurred = ( + "No asserts detected", + "Asserts were detected") + no_error_occurred = ( + "No errors detected", + "Errors were detected") + secondary_grid_spacing = ( + "Secondary Grid Spacing set", + "Secondary Grid Spacing not set") + sphere_material_component_added = ( + "Sphere Material component added", + "Sphere Material component wasn't added") + sphere_material_set = ( + "Sphere Material Asset was set", + "Sphere Material Asset wasn't set") + sphere_mesh_asset_set = ( + "Sphere Mesh Asset was set", + "Sphere Mesh Asset wasn't set") + viewport_set = ( + "Viewport set to correct size", + "Viewport not set to correct size") def AtomGPU_BasicLevelSetup_SetsUpLevel(): @@ -40,6 +80,7 @@ def AtomGPU_BasicLevelSetup_SetsUpLevel(): Test setup: - Wait for Editor idle loop. - Open the "Base" level. + - Deletes all existing entities before creating the scene. Expected Behavior: The scene can be setup for a basic level. @@ -75,47 +116,39 @@ def AtomGPU_BasicLevelSetup_SetsUpLevel(): """ import os - from math import isclose - import azlmbr.asset as asset - import azlmbr.bus as bus import azlmbr.legacy.general as general import azlmbr.math as math import azlmbr.paths + from editor_python_test_tools.asset_utils import Asset from editor_python_test_tools.editor_entity_utils import EditorEntity - from editor_python_test_tools.utils import Report, Tracer, TestHelper as helper + from editor_python_test_tools.utils import Report, Tracer, TestHelper + from Atom.atom_utils.atom_constants import AtomComponentProperties + from Atom.atom_utils.atom_component_helper import initial_viewport_setup from Atom.atom_utils.screenshot_utils import ScreenshotHelper - MATERIAL_COMPONENT_NAME = "Material" - MESH_COMPONENT_NAME = "Mesh" - SCREENSHOT_NAME = "AtomBasicLevelSetup" - SCREEN_WIDTH = 1280 - SCREEN_HEIGHT = 720 DEGREE_RADIAN_FACTOR = 0.0174533 - - def initial_viewport_setup(screen_width, screen_height): - general.set_viewport_size(screen_width, screen_height) - general.update_viewport() - result = isclose( - a=general.get_viewport_size().x, b=SCREEN_WIDTH, rel_tol=0.1) and isclose( - a=general.get_viewport_size().y, b=SCREEN_HEIGHT, rel_tol=0.1) - - return result + SCREENSHOT_NAME = "AtomBasicLevelSetup" with Tracer() as error_tracer: # Test setup begins. # Setup: Wait for Editor idle loop before executing Python hydra scripts then open "Base" level. - helper.init_idle() - helper.open_level("", "Base") + TestHelper.init_idle() + TestHelper.open_level("", "Base") + + # Setup: Deletes all existing entities before creating the scene. + search_filter = azlmbr.entity.SearchFilter() + all_entities = azlmbr.entity.SearchBus(azlmbr.bus.Broadcast, "SearchEntities", search_filter) + azlmbr.editor.ToolsApplicationRequestBus(azlmbr.bus.Broadcast, "DeleteEntities", all_entities) # Test steps begin. # 1. Close error windows and display helpers then update the viewport size. - helper.close_error_windows() - helper.close_display_helpers() + TestHelper.close_error_windows() + TestHelper.close_display_helpers() + initial_viewport_setup() general.update_viewport() - Report.critical_result(Tests.viewport_set, initial_viewport_setup(SCREEN_WIDTH, SCREEN_HEIGHT)) # 2. Create Default Level Entity. default_level_entity_name = "Default Level" @@ -123,168 +156,167 @@ def AtomGPU_BasicLevelSetup_SetsUpLevel(): math.Vector3(0.0, 0.0, 0.0), default_level_entity_name) # 3. Create Grid Entity as a child entity of the Default Level Entity. - grid_name = "Grid" - grid_entity = EditorEntity.create_editor_entity(grid_name, default_level_entity.id) + grid_entity = EditorEntity.create_editor_entity(AtomComponentProperties.grid(), default_level_entity.id) # 4. Add Grid component to Grid Entity and set Secondary Grid Spacing. - grid_component = grid_entity.add_component(grid_name) - secondary_grid_spacing_property = "Controller|Configuration|Secondary Grid Spacing" + grid_component = grid_entity.add_component(AtomComponentProperties.grid()) secondary_grid_spacing_value = 1.0 - grid_component.set_component_property_value(secondary_grid_spacing_property, secondary_grid_spacing_value) + grid_component.set_component_property_value( + AtomComponentProperties.grid('Secondary Grid Spacing'), secondary_grid_spacing_value) secondary_grid_spacing_set = grid_component.get_component_property_value( - secondary_grid_spacing_property) == secondary_grid_spacing_value + AtomComponentProperties.grid('Secondary Grid Spacing')) == secondary_grid_spacing_value Report.result(Tests.secondary_grid_spacing, secondary_grid_spacing_set) # 5. Create Global Skylight (IBL) Entity as a child entity of the Default Level Entity. - global_skylight_name = "Global Skylight (IBL)" - global_skylight_entity = EditorEntity.create_editor_entity(global_skylight_name, default_level_entity.id) + global_skylight_entity = EditorEntity.create_editor_entity( + AtomComponentProperties.global_skylight(), default_level_entity.id) # 6. Add HDRi Skybox component to the Global Skylight (IBL) Entity. - hdri_skybox_name = "HDRi Skybox" - hdri_skybox_component = global_skylight_entity.add_component(hdri_skybox_name) - Report.result(Tests.hdri_skybox_component_added, global_skylight_entity.has_component(hdri_skybox_name)) + hdri_skybox_component = global_skylight_entity.add_component(AtomComponentProperties.hdri_skybox()) + Report.result(Tests.hdri_skybox_component_added, global_skylight_entity.has_component( + AtomComponentProperties.hdri_skybox())) # 7. Add Global Skylight (IBL) component to the Global Skylight (IBL) Entity. - global_skylight_component = global_skylight_entity.add_component(global_skylight_name) - Report.result(Tests.global_skylight_component_added, global_skylight_entity.has_component(global_skylight_name)) + global_skylight_component = global_skylight_entity.add_component(AtomComponentProperties.global_skylight()) + Report.result(Tests.global_skylight_component_added, global_skylight_entity.has_component( + AtomComponentProperties.global_skylight())) # 8. Set the Cubemap Texture property of the HDRi Skybox component. - global_skylight_image_asset_path = os.path.join( - "LightingPresets", "greenwich_park_02_4k_iblskyboxcm_iblspecular.exr.streamingimage") - global_skylight_image_asset = asset.AssetCatalogRequestBus( - bus.Broadcast, "GetAssetIdByPath", global_skylight_image_asset_path, math.Uuid(), False) - hdri_skybox_cubemap_texture_property = "Controller|Configuration|Cubemap Texture" + global_skylight_image_asset_path = os.path.join("LightingPresets", "default_iblskyboxcm.exr.streamingimage") + global_skylight_image_asset = Asset.find_asset_by_path(global_skylight_image_asset_path, False) hdri_skybox_component.set_component_property_value( - hdri_skybox_cubemap_texture_property, global_skylight_image_asset) + AtomComponentProperties.hdri_skybox('Cubemap Texture'), global_skylight_image_asset.id) Report.result( Tests.hdri_skybox_cubemap_texture_set, hdri_skybox_component.get_component_property_value( - hdri_skybox_cubemap_texture_property) == global_skylight_image_asset) + AtomComponentProperties.hdri_skybox('Cubemap Texture')) == global_skylight_image_asset.id) # 9. Set the Diffuse Image property of the Global Skylight (IBL) component. # Re-use the same image that was used in the previous test step. - global_skylight_diffuse_image_property = "Controller|Configuration|Diffuse Image" + global_skylight_diffuse_image_asset_path = os.path.join( + "LightingPresets", "default_iblskyboxcm_ibldiffuse.exr.streamingimage") + global_skylight_diffuse_image_asset = Asset.find_asset_by_path(global_skylight_diffuse_image_asset_path, False) global_skylight_component.set_component_property_value( - global_skylight_diffuse_image_property, global_skylight_image_asset) + AtomComponentProperties.global_skylight('Diffuse Image'), global_skylight_diffuse_image_asset.id) Report.result( Tests.global_skylight_diffuse_image_set, global_skylight_component.get_component_property_value( - global_skylight_diffuse_image_property) == global_skylight_image_asset) + AtomComponentProperties.global_skylight('Diffuse Image')) == global_skylight_diffuse_image_asset.id) # 10. Set the Specular Image property of the Global Skylight (IBL) component. # Re-use the same image that was used in the previous test step. - global_skylight_specular_image_property = "Controller|Configuration|Specular Image" + global_skylight_specular_image_asset_path = os.path.join( + "LightingPresets", "default_iblskyboxcm_iblspecular.exr.streamingimage") + global_skylight_specular_image_asset = Asset.find_asset_by_path( + global_skylight_specular_image_asset_path, False) global_skylight_component.set_component_property_value( - global_skylight_specular_image_property, global_skylight_image_asset) + AtomComponentProperties.global_skylight('Specular Image'), global_skylight_specular_image_asset.id) global_skylight_specular_image_set = global_skylight_component.get_component_property_value( - global_skylight_specular_image_property) + AtomComponentProperties.global_skylight('Specular Image')) Report.result( - Tests.global_skylight_specular_image_set, global_skylight_specular_image_set == global_skylight_image_asset) + Tests.global_skylight_specular_image_set, + global_skylight_specular_image_set == global_skylight_specular_image_asset.id) # 11. Create a Ground Plane Entity with a Material component that is a child entity of the Default Level Entity. ground_plane_name = "Ground Plane" ground_plane_entity = EditorEntity.create_editor_entity(ground_plane_name, default_level_entity.id) - ground_plane_material_component = ground_plane_entity.add_component(MATERIAL_COMPONENT_NAME) + ground_plane_material_component = ground_plane_entity.add_component(AtomComponentProperties.material()) Report.result( - Tests.ground_plane_material_component_added, ground_plane_entity.has_component(MATERIAL_COMPONENT_NAME)) + Tests.ground_plane_material_component_added, + ground_plane_entity.has_component(AtomComponentProperties.material())) # 12. Set the Material Asset property of the Material component for the Ground Plane Entity. ground_plane_entity.set_local_uniform_scale(32.0) ground_plane_material_asset_path = os.path.join("Materials", "Presets", "PBR", "metal_chrome.azmaterial") - ground_plane_material_asset = asset.AssetCatalogRequestBus( - bus.Broadcast, "GetAssetIdByPath", ground_plane_material_asset_path, math.Uuid(), False) - ground_plane_material_asset_property = "Default Material|Material Asset" + ground_plane_material_asset = Asset.find_asset_by_path(ground_plane_material_asset_path, False) ground_plane_material_component.set_component_property_value( - ground_plane_material_asset_property, ground_plane_material_asset) + AtomComponentProperties.material('Material Asset'), ground_plane_material_asset.id) Report.result( Tests.ground_plane_material_asset_set, ground_plane_material_component.get_component_property_value( - ground_plane_material_asset_property) == ground_plane_material_asset) + AtomComponentProperties.material('Material Asset')) == ground_plane_material_asset.id) # 13. Add the Mesh component to the Ground Plane Entity and set the Mesh component Mesh Asset property. - ground_plane_mesh_component = ground_plane_entity.add_component(MESH_COMPONENT_NAME) - Report.result(Tests.mesh_component_added, ground_plane_entity.has_component(MESH_COMPONENT_NAME)) - ground_plane_mesh_asset_path = os.path.join("Objects", "plane.azmodel") - ground_plane_mesh_asset = asset.AssetCatalogRequestBus( - bus.Broadcast, "GetAssetIdByPath", ground_plane_mesh_asset_path, math.Uuid(), False) - ground_plane_mesh_asset_property = "Controller|Configuration|Mesh Asset" + ground_plane_mesh_component = ground_plane_entity.add_component(AtomComponentProperties.mesh()) + Report.result(Tests.mesh_component_added, ground_plane_entity.has_component(AtomComponentProperties.mesh())) + ground_plane_mesh_asset_path = os.path.join("TestData", "Objects", "plane.azmodel") + ground_plane_mesh_asset = Asset.find_asset_by_path(ground_plane_mesh_asset_path, False) ground_plane_mesh_component.set_component_property_value( - ground_plane_mesh_asset_property, ground_plane_mesh_asset) + AtomComponentProperties.mesh('Mesh Asset'), ground_plane_mesh_asset.id) Report.result( Tests.ground_plane_mesh_asset_set, ground_plane_mesh_component.get_component_property_value( - ground_plane_mesh_asset_property) == ground_plane_mesh_asset) + AtomComponentProperties.mesh('Mesh Asset')) == ground_plane_mesh_asset.id) # 14. Create a Directional Light Entity as a child entity of the Default Level Entity. - directional_light_name = "Directional Light" directional_light_entity = EditorEntity.create_editor_entity_at( - math.Vector3(0.0, 0.0, 10.0), directional_light_name, default_level_entity.id) + math.Vector3(0.0, 0.0, 10.0), AtomComponentProperties.directional_light(), default_level_entity.id) # 15. Add Directional Light component to Directional Light Entity and set entity rotation. - directional_light_entity.add_component(directional_light_name) + directional_light_entity.add_component(AtomComponentProperties.directional_light()) directional_light_entity_rotation = math.Vector3(DEGREE_RADIAN_FACTOR * -90.0, 0.0, 0.0) directional_light_entity.set_local_rotation(directional_light_entity_rotation) Report.result( - Tests.directional_light_component_added, directional_light_entity.has_component(directional_light_name)) + Tests.directional_light_component_added, directional_light_entity.has_component( + AtomComponentProperties.directional_light())) # 16. Create a Sphere Entity as a child entity of the Default Level Entity then add a Material component. sphere_entity = EditorEntity.create_editor_entity_at( math.Vector3(0.0, 0.0, 1.0), "Sphere", default_level_entity.id) - sphere_material_component = sphere_entity.add_component(MATERIAL_COMPONENT_NAME) - Report.result(Tests.sphere_material_component_added, sphere_entity.has_component(MATERIAL_COMPONENT_NAME)) + sphere_material_component = sphere_entity.add_component(AtomComponentProperties.material()) + Report.result(Tests.sphere_material_component_added, sphere_entity.has_component( + AtomComponentProperties.material())) # 17. Set the Material Asset property of the Material component for the Sphere Entity. sphere_material_asset_path = os.path.join("Materials", "Presets", "PBR", "metal_brass_polished.azmaterial") - sphere_material_asset = asset.AssetCatalogRequestBus( - bus.Broadcast, "GetAssetIdByPath", sphere_material_asset_path, math.Uuid(), False) - sphere_material_asset_property = "Default Material|Material Asset" - sphere_material_component.set_component_property_value(sphere_material_asset_property, sphere_material_asset) + sphere_material_asset = Asset.find_asset_by_path(sphere_material_asset_path, False) + sphere_material_component.set_component_property_value( + AtomComponentProperties.material('Material Asset'), sphere_material_asset.id) Report.result(Tests.sphere_material_set, sphere_material_component.get_component_property_value( - sphere_material_asset_property) == sphere_material_asset) + AtomComponentProperties.material('Material Asset')) == sphere_material_asset.id) # 18. Add Mesh component to Sphere Entity and set the Mesh Asset property for the Mesh component. - sphere_mesh_component = sphere_entity.add_component(MESH_COMPONENT_NAME) + sphere_mesh_component = sphere_entity.add_component(AtomComponentProperties.mesh()) sphere_mesh_asset_path = os.path.join("Models", "sphere.azmodel") - sphere_mesh_asset = asset.AssetCatalogRequestBus( - bus.Broadcast, "GetAssetIdByPath", sphere_mesh_asset_path, math.Uuid(), False) - sphere_mesh_asset_property = "Controller|Configuration|Mesh Asset" - sphere_mesh_component.set_component_property_value(sphere_mesh_asset_property, sphere_mesh_asset) + sphere_mesh_asset = Asset.find_asset_by_path(sphere_mesh_asset_path, False) + sphere_mesh_component.set_component_property_value( + AtomComponentProperties.mesh('Mesh Asset'), sphere_mesh_asset.id) Report.result(Tests.sphere_mesh_asset_set, sphere_mesh_component.get_component_property_value( - sphere_mesh_asset_property) == sphere_mesh_asset) + AtomComponentProperties.mesh('Mesh Asset')) == sphere_mesh_asset.id) # 19. Create a Camera Entity as a child entity of the Default Level Entity then add a Camera component. - camera_name = "Camera" camera_entity = EditorEntity.create_editor_entity_at( - math.Vector3(5.5, -12.0, 9.0), camera_name, default_level_entity.id) - camera_component = camera_entity.add_component(camera_name) - Report.result(Tests.camera_component_added, camera_entity.has_component(camera_name)) + math.Vector3(5.5, -12.0, 9.0), AtomComponentProperties.camera(), default_level_entity.id) + camera_component = camera_entity.add_component(AtomComponentProperties.camera()) + Report.result(Tests.camera_component_added, camera_entity.has_component(AtomComponentProperties.camera())) # 20. Set the Camera Entity rotation value and set the Camera component Field of View value. camera_entity_rotation = math.Vector3( DEGREE_RADIAN_FACTOR * -27.0, DEGREE_RADIAN_FACTOR * -12.0, DEGREE_RADIAN_FACTOR * 25.0) camera_entity.set_local_rotation(camera_entity_rotation) - camera_fov_property = "Controller|Configuration|Field of view" camera_fov_value = 60.0 - camera_component.set_component_property_value(camera_fov_property, camera_fov_value) + camera_component.set_component_property_value(AtomComponentProperties.camera('Field of view'), camera_fov_value) azlmbr.camera.EditorCameraViewRequestBus(azlmbr.bus.Event, "ToggleCameraAsActiveView", camera_entity.id) Report.result(Tests.camera_fov_set, camera_component.get_component_property_value( - camera_fov_property) == camera_fov_value) + AtomComponentProperties.camera('Field of view')) == camera_fov_value) # 21. Enter game mode. - helper.enter_game_mode(Tests.enter_game_mode) - helper.wait_for_condition(function=lambda: general.is_in_game_mode(), timeout_in_seconds=4.0) + TestHelper.enter_game_mode(Tests.enter_game_mode) + TestHelper.wait_for_condition(function=lambda: general.is_in_game_mode(), timeout_in_seconds=4.0) # 22. Take screenshot. ScreenshotHelper(general.idle_wait_frames).capture_screenshot_blocking(f"{SCREENSHOT_NAME}.ppm") # 23. Exit game mode. - helper.exit_game_mode(Tests.exit_game_mode) - helper.wait_for_condition(function=lambda: not general.is_in_game_mode(), timeout_in_seconds=4.0) + TestHelper.exit_game_mode(Tests.exit_game_mode) + TestHelper.wait_for_condition(function=lambda: not general.is_in_game_mode(), timeout_in_seconds=4.0) # 24. Look for errors. - helper.wait_for_condition(lambda: error_tracer.has_errors or error_tracer.has_asserts, 1.0) - Report.result(Tests.no_assert_occurred, not error_tracer.has_asserts) - Report.result(Tests.no_error_occurred, not error_tracer.has_errors) + TestHelper.wait_for_condition(lambda: error_tracer.has_errors or error_tracer.has_asserts, 1.0) + for error_info in error_tracer.errors: + Report.info(f"Error: {error_info.filename} {error_info.function} | {error_info.message}") + for assert_info in error_tracer.asserts: + Report.info(f"Assert: {assert_info.filename} {assert_info.function} | {assert_info.message}") if __name__ == "__main__": diff --git a/AutomatedTesting/Gem/PythonTests/Atom/tests/hydra_AtomGPU_SpotLightScreenshotTest.py b/AutomatedTesting/Gem/PythonTests/Atom/tests/hydra_AtomGPU_SpotLightScreenshotTest.py new file mode 100644 index 0000000000..fbfb6e3468 --- /dev/null +++ b/AutomatedTesting/Gem/PythonTests/Atom/tests/hydra_AtomGPU_SpotLightScreenshotTest.py @@ -0,0 +1,248 @@ +""" +Copyright (c) Contributors to the Open 3D Engine Project. +For complete copyright and license terms please see the LICENSE at the root of this distribution. + +SPDX-License-Identifier: Apache-2.0 OR MIT +""" + + +class Tests: + directional_light_component_disabled = ( + "Disabled Directional Light component", + "Couldn't disable Directional Light component") + enter_game_mode = ( + "Entered game mode", + "Failed to enter game mode") + exit_game_mode = ( + "Exited game mode", + "Couldn't exit game mode") + global_skylight_component_disabled = ( + "Disabled Global Skylight (IBL) component", + "Couldn't disable Global Skylight (IBL) component") + hdri_skybox_component_disabled = ( + "Disabled HDRi Skybox component", + "Couldn't disable HDRi Skybox component") + light_component_added = ( + "Light component added", + "Couldn't add Light component") + light_component_color_property_set = ( + "Color property was set", + "Color property was not set") + light_component_enable_shadow_property_set = ( + "Enable shadow property was set", + "Enable shadow property was not set") + light_component_enable_shutters_property_set = ( + "Enable shutters property was set", + "Enable shutters property was not set") + light_component_inner_angle_property_set = ( + "Inner angle property was set", + "Inner angle property was not set") + light_component_intensity_property_set = ( + "Intensity property was set", + "Intensity property was not set") + light_component_light_type_property_set = ( + "Light type property was set", + "Light type property was not set") + light_component_outer_angle_property_set = ( + "Outer angle property was set", + "Outer angle property was not set") + material_component_material_asset_property_set = ( + "Material Asset property was set", + "Material Asset property was not set") + spot_light_entity_created = ( + "Spot Light entity created", + "Couldn't create Spot Light entity") + + +def AtomGPU_LightComponent_SpotLightScreenshotsMatchGoldenImages(): + """ + Summary: + Light component test using the Spot (disk) Light type property option and modifying the shadows and colors. + Sets each scene up and then takes a screenshot of each scene for test comparison. + + Test setup: + - Wait for Editor idle loop. + - Open the "Base" level. + - Close error windows and display helpers then update the viewport size. + - Runs the create_basic_atom_rendering_scene() function to setup the test scene. + + Expected Behavior: + The test scripts sets up the scenes correctly and takes accurate screenshots. + + Test Steps: + 1. Find the Directional Light entity then disable its Directional Light component. + 2. Disable Global Skylight (IBL) component on the Global Skylight (IBL) entity. + 3. Disable HDRi Skybox component on the Global Skylight (IBL) entity. + 4. Create a Spot Light entity and rotate it. + 5. Attach a Light component to the Spot Light entity. + 6. Set the Light component Light Type to Spot (disk). + 7. Enter game mode and take a screenshot then exit game mode. + 8. Change the default material asset for the Ground Plane entity. + 9. Enter game mode and take a screenshot then exit game mode. + 10. Increase the Intensity value of the Light component. + 11. Enter game mode and take a screenshot then exit game mode. + 12. Change the Light component Color property value. + 13. Enter game mode and take a screenshot then exit game mode. + 14. Change the Light component Enable shutters, Inner angle, and Outer angle property values. + 15. Enter game mode and take a screenshot then exit game mode. + 16. Change the Light component Enable shadow and Shadowmap size property values then move Spot Light entity. + 17. Enter game mode and take a screenshot then exit game mode. + 18. Look for errors. + + :return: None + """ + import os + + import azlmbr.legacy.general as general + import azlmbr.paths + + from editor_python_test_tools.asset_utils import Asset + from editor_python_test_tools.editor_entity_utils import EditorEntity + from editor_python_test_tools.utils import Report, Tracer, TestHelper + + from Atom.atom_utils.atom_constants import AtomComponentProperties, LIGHT_TYPES + from Atom.atom_utils.atom_component_helper import ( + initial_viewport_setup, create_basic_atom_rendering_scene, enter_exit_game_mode_take_screenshot) + + DEGREE_RADIAN_FACTOR = 0.0174533 + + with Tracer() as error_tracer: + # Test setup begins. + # Setup: Wait for Editor idle loop before executing Python hydra scripts then open "Base" level. + TestHelper.init_idle() + TestHelper.open_level("", "Base") + + # Setup: Close error windows and display helpers then update the viewport size. + TestHelper.close_error_windows() + TestHelper.close_display_helpers() + initial_viewport_setup() + general.update_viewport() + + # Setup: Runs the create_basic_atom_rendering_scene() function to setup the test scene. + create_basic_atom_rendering_scene() + + # Test steps begin. + # 1. Find the Directional Light entity then disable its Directional Light component. + directional_light_entity = EditorEntity.find_editor_entity(AtomComponentProperties.directional_light()) + directional_light_component = directional_light_entity.get_components_of_type( + [AtomComponentProperties.directional_light()])[0] + directional_light_component.disable_component() + Report.critical_result(Tests.directional_light_component_disabled, not directional_light_component.is_enabled()) + + # 2. Disable Global Skylight (IBL) component on the Global Skylight (IBL) entity. + global_skylight_entity = EditorEntity.find_editor_entity(AtomComponentProperties.global_skylight()) + global_skylight_component = global_skylight_entity.get_components_of_type( + [AtomComponentProperties.global_skylight()])[0] + global_skylight_component.disable_component() + Report.critical_result(Tests.global_skylight_component_disabled, not global_skylight_component.is_enabled()) + + # 3. Disable HDRi Skybox component on the Global Skylight (IBL) entity. + hdri_skybox_component = global_skylight_entity.get_components_of_type( + [AtomComponentProperties.hdri_skybox()])[0] + hdri_skybox_component.disable_component() + Report.critical_result(Tests.hdri_skybox_component_disabled, not hdri_skybox_component.is_enabled()) + + # 4. Create a Spot Light entity and rotate it. + spot_light_name = "Spot Light" + spot_light_entity = EditorEntity.create_editor_entity_at( + azlmbr.math.Vector3(0.7, -2.0, 1.0), spot_light_name) + rotation = azlmbr.math.Vector3(DEGREE_RADIAN_FACTOR * 300.0, 0.0, 0.0) + spot_light_entity.set_local_rotation(rotation) + Report.critical_result(Tests.spot_light_entity_created, spot_light_entity.exists()) + + # 5. Attach a Light component to the Spot Light entity. + light_component = spot_light_entity.add_component(AtomComponentProperties.light()) + Report.critical_result(Tests.light_component_added, light_component.is_enabled()) + + # 6. Set the Light component Light Type to Spot (disk). + light_component.set_component_property_value( + AtomComponentProperties.light('Light type'), LIGHT_TYPES['spot_disk']) + Report.result( + Tests.light_component_light_type_property_set, + light_component.get_component_property_value( + AtomComponentProperties.light('Light type')) == LIGHT_TYPES['spot_disk']) + + # 7. Enter game mode and take a screenshot then exit game mode. + enter_exit_game_mode_take_screenshot("SpotLight_1.ppm", Tests.enter_game_mode, Tests.exit_game_mode) + + # 8. Change the default material asset for the Ground Plane entity. + ground_plane_name = "Ground Plane" + ground_plane_entity = EditorEntity.find_editor_entity(ground_plane_name) + ground_plane_material_component_name = AtomComponentProperties.material() + ground_plane_material_component = ground_plane_entity.get_components_of_type( + [ground_plane_material_component_name])[0] + ground_plane_material_asset_path = os.path.join( + "Materials", "Presets", "Macbeth", "22_neutral_5-0_0-70d.azmaterial") + ground_plane_material_asset = Asset.find_asset_by_path(ground_plane_material_asset_path, False) + ground_plane_material_component.set_component_property_value( + AtomComponentProperties.material('Material Asset'), ground_plane_material_asset.id) + Report.result( + Tests.material_component_material_asset_property_set, + ground_plane_material_component.get_component_property_value( + AtomComponentProperties.material('Material Asset')) == ground_plane_material_asset.id) + + # 9. Enter game mode and take a screenshot then exit game mode. + enter_exit_game_mode_take_screenshot("SpotLight_2.ppm", Tests.enter_game_mode, Tests.exit_game_mode) + + # 10. Increase the Intensity value of the Light component. + light_component.set_component_property_value(AtomComponentProperties.light('Intensity'), 800.0) + Report.result( + Tests.light_component_intensity_property_set, + light_component.get_component_property_value( + AtomComponentProperties.light('Intensity')) == 800.0) + + # 11. Enter game mode and take a screenshot then exit game mode. + enter_exit_game_mode_take_screenshot("SpotLight_3.ppm", Tests.enter_game_mode, Tests.exit_game_mode) + + # 12. Change the Light component Color property value. + color_value = azlmbr.math.Color(47.0 / 255.0, 75.0 / 255.0, 37.0 / 255.0, 255.0 / 255.0) + light_component.set_component_property_value(AtomComponentProperties.light('Color'), color_value) + Report.result( + Tests.light_component_color_property_set, + light_component.get_component_property_value(AtomComponentProperties.light('Color')) == color_value) + + # 13. Enter game mode and take a screenshot then exit game mode. + enter_exit_game_mode_take_screenshot("SpotLight_4.ppm", Tests.enter_game_mode, Tests.exit_game_mode) + + # 14. Change the Light component Enable shutters, Inner angle, and Outer angle property values. + enable_shutters = True + inner_angle = 60.0 + outer_angle = 75.0 + light_component.set_component_property_value(AtomComponentProperties.light('Enable shutters'), enable_shutters) + light_component.set_component_property_value(AtomComponentProperties.light('Inner angle'), inner_angle) + light_component.set_component_property_value(AtomComponentProperties.light('Outer angle'), outer_angle) + Report.result( + Tests.light_component_enable_shutters_property_set, + light_component.get_component_property_value( + AtomComponentProperties.light('Enable shutters')) == enable_shutters) + Report.result( + Tests.light_component_inner_angle_property_set, + light_component.get_component_property_value(AtomComponentProperties.light('Inner angle')) == inner_angle) + Report.result( + Tests.light_component_outer_angle_property_set, + light_component.get_component_property_value(AtomComponentProperties.light('Outer angle')) == outer_angle) + + # 15. Enter game mode and take a screenshot then exit game mode. + enter_exit_game_mode_take_screenshot("SpotLight_5.ppm", Tests.enter_game_mode, Tests.exit_game_mode) + + # 16. Change the Light component Enable shadow and slightly move Spot Light entity. + light_component.set_component_property_value(AtomComponentProperties.light('Enable shadow'), True) + Report.result( + Tests.light_component_enable_shadow_property_set, + light_component.get_component_property_value(AtomComponentProperties.light('Enable shadow')) is True) + spot_light_entity.set_world_rotation(azlmbr.math.Vector3(0.7, -2.0, 1.9)) + + # 17. Enter game mode and take a screenshot then exit game mode. + enter_exit_game_mode_take_screenshot("SpotLight_6.ppm", Tests.enter_game_mode, Tests.exit_game_mode) + + # 18. Look for errors. + TestHelper.wait_for_condition(lambda: error_tracer.has_errors or error_tracer.has_asserts, 1.0) + for error_info in error_tracer.errors: + Report.info(f"Error: {error_info.filename} {error_info.function} | {error_info.message}") + for assert_info in error_tracer.asserts: + Report.info(f"Assert: {assert_info.filename} {assert_info.function} | {assert_info.message}") + + +if __name__ == "__main__": + from editor_python_test_tools.utils import Report + Report.start_test(AtomGPU_LightComponent_SpotLightScreenshotsMatchGoldenImages) diff --git a/AutomatedTesting/Gem/PythonTests/Atom/tests/hydra_AtomMaterialEditor_BasicTests.py b/AutomatedTesting/Gem/PythonTests/Atom/tests/hydra_AtomMaterialEditor_BasicTests.py index 9f8f6c44b2..baad02318d 100644 --- a/AutomatedTesting/Gem/PythonTests/Atom/tests/hydra_AtomMaterialEditor_BasicTests.py +++ b/AutomatedTesting/Gem/PythonTests/Atom/tests/hydra_AtomMaterialEditor_BasicTests.py @@ -186,6 +186,11 @@ def run(): material_editor.set_property(document2_id, property2_name, initial_color) material_editor.save_all() material_editor.close_all_documents() + material_editor.wait_for_condition(lambda: + (not material_editor.is_open(document1_id)) and + (not material_editor.is_open(document2_id)) and + (not material_editor.is_open(document3_id)), 2.0) + material_editor.destroy_main_window() if __name__ == "__main__": diff --git a/AutomatedTesting/Gem/PythonTests/Atom/tests/hydra_GPUTest_BasicLevelSetup.py b/AutomatedTesting/Gem/PythonTests/Atom/tests/hydra_GPUTest_BasicLevelSetup.py deleted file mode 100644 index 9515712583..0000000000 --- a/AutomatedTesting/Gem/PythonTests/Atom/tests/hydra_GPUTest_BasicLevelSetup.py +++ /dev/null @@ -1,221 +0,0 @@ -""" -Copyright (c) Contributors to the Open 3D Engine Project. -For complete copyright and license terms please see the LICENSE at the root of this distribution. - -SPDX-License-Identifier: Apache-2.0 OR MIT -""" - -import os -import sys - -import azlmbr.asset as asset -import azlmbr.bus as bus -import azlmbr.camera -import azlmbr.entity as entity -import azlmbr.legacy.general as general -import azlmbr.math as math -import azlmbr.paths -import azlmbr.editor as editor - -sys.path.append(os.path.join(azlmbr.paths.projectroot, "Gem", "PythonTests")) - -import editor_python_test_tools.hydra_editor_utils as hydra -from editor_python_test_tools.editor_test_helper import EditorTestHelper -from Atom.atom_utils.screenshot_utils import ScreenshotHelper - -SCREEN_WIDTH = 1280 -SCREEN_HEIGHT = 720 -DEGREE_RADIAN_FACTOR = 0.0174533 - -helper = EditorTestHelper(log_prefix="Test_Atom_BasicLevelSetup") - - -def run(): - """ - 1. View -> Layouts -> Restore Default Layout, sets the viewport to ratio 16:9 @ 1280 x 720 - 2. Runs console command r_DisplayInfo = 0 - 3. Deletes all entities currently present in the level. - 4. Creates a "default_level" entity to hold all other entities, setting the translate values to x:0, y:0, z:0 - 5. Adds a Grid component to the "default_level" & updates its Grid Spacing to 1.0m - 6. Adds a "global_skylight" entity to "default_level", attaching an HDRi Skybox w/ a Cubemap Texture. - 7. Adds a Global Skylight (IBL) component w/ diffuse image and specular image to "global_skylight" entity. - 8. Adds a "ground_plane" entity to "default_level", attaching a Mesh component & Material component. - 9. Adds a "directional_light" entity to "default_level" & adds a Directional Light component. - 10. Adds a "sphere" entity to "default_level" & adds a Mesh component with a Material component to it. - 11. Adds a "camera" entity to "default_level" & adds a Camera component with 80 degree FOV and Transform values: - Translate - x:5.5m, y:-12.0m, z:9.0m - Rotate - x:-27.0, y:-12.0, z:25.0 - 12. Finally enters game mode, takes a screenshot, exits game mode, & saves the level. - :return: None - """ - def initial_viewport_setup(screen_width, screen_height): - general.set_viewport_size(screen_width, screen_height) - general.update_viewport() - helper.wait_for_condition( - function=lambda: helper.isclose(a=general.get_viewport_size().x, b=SCREEN_WIDTH, rel_tol=0.1) - and helper.isclose(a=general.get_viewport_size().y, b=SCREEN_HEIGHT, rel_tol=0.1), - timeout_in_seconds=4.0 - ) - result = helper.isclose(a=general.get_viewport_size().x, b=SCREEN_WIDTH, rel_tol=0.1) and helper.isclose( - a=general.get_viewport_size().y, b=SCREEN_HEIGHT, rel_tol=0.1) - general.log(general.get_viewport_size().x) - general.log(general.get_viewport_size().y) - general.log(general.get_viewport_size().z) - general.log(f"Viewport is set to the expected size: {result}") - general.run_console("r_DisplayInfo = 0") - - def after_level_load(): - """Function to call after creating/opening a level to ensure it loads.""" - # Give everything a second to initialize. - general.idle_enable(True) - general.idle_wait(1.0) - general.update_viewport() - general.idle_wait(0.5) # half a second is more than enough for updating the viewport. - - # Close out problematic windows, FPS meters, and anti-aliasing. - if general.is_helpers_shown(): # Turn off the helper gizmos if visible - general.toggle_helpers() - general.idle_wait(1.0) - if general.is_pane_visible("Error Report"): # Close Error Report windows that block focus. - general.close_pane("Error Report") - if general.is_pane_visible("Error Log"): # Close Error Log windows that block focus. - general.close_pane("Error Log") - general.idle_wait(1.0) - general.run_console("r_displayInfo=0") - general.idle_wait(1.0) - - return True - - # Wait for Editor idle loop before executing Python hydra scripts. - general.idle_enable(True) - - # Open the auto_test level. - new_level_name = "auto_test" # Specified in class TestAllComponentsIndepthTests() - heightmap_resolution = 512 - heightmap_meters_per_pixel = 1 - terrain_texture_resolution = 412 - use_terrain = False - - # Return codes are ECreateLevelResult defined in CryEdit.h - return_code = general.create_level_no_prompt( - new_level_name, heightmap_resolution, heightmap_meters_per_pixel, terrain_texture_resolution, use_terrain) - if return_code == 1: - general.log(f"{new_level_name} level already exists") - elif return_code == 2: - general.log("Failed to create directory") - elif return_code == 3: - general.log("Directory length is too long") - elif return_code != 0: - general.log("Unknown error, failed to create level") - else: - general.log(f"{new_level_name} level created successfully") - - # Basic setup for newly created level. - after_level_load() - initial_viewport_setup(SCREEN_WIDTH, SCREEN_HEIGHT) - - # Create default_level entity - search_filter = azlmbr.entity.SearchFilter() - all_entities = entity.SearchBus(azlmbr.bus.Broadcast, "SearchEntities", search_filter) - editor.ToolsApplicationRequestBus(bus.Broadcast, "DeleteEntities", all_entities) - - default_level = hydra.Entity("default_level") - position = math.Vector3(0.0, 0.0, 0.0) - default_level.create_entity(position, ["Grid"]) - default_level.get_set_test(0, "Controller|Configuration|Secondary Grid Spacing", 1.0) - - # Create global_skylight entity and set the properties - global_skylight = hydra.Entity("global_skylight") - global_skylight.create_entity( - entity_position=math.Vector3(0.0, 0.0, 0.0), - components=["HDRi Skybox", "Global Skylight (IBL)"], - parent_id=default_level.id - ) - global_skylight_image_asset_path = os.path.join( - "LightingPresets", "greenwich_park_02_4k_iblskyboxcm_iblspecular.exr.streamingimage") - global_skylight_image_asset = asset.AssetCatalogRequestBus( - bus.Broadcast, "GetAssetIdByPath", global_skylight_image_asset_path, math.Uuid(), False) - global_skylight.get_set_test(0, "Controller|Configuration|Cubemap Texture", global_skylight_image_asset) - hydra.get_set_test(global_skylight, 1, "Controller|Configuration|Diffuse Image", global_skylight_image_asset) - hydra.get_set_test(global_skylight, 1, "Controller|Configuration|Specular Image", global_skylight_image_asset) - - # Create ground_plane entity and set the properties - ground_plane = hydra.Entity("ground_plane") - ground_plane.create_entity( - entity_position=math.Vector3(0.0, 0.0, 0.0), - components=["Material"], - parent_id=default_level.id - ) - azlmbr.components.TransformBus(azlmbr.bus.Event, "SetLocalUniformScale", ground_plane.id, 32.0) - ground_plane_material_asset_path = os.path.join("Materials", "Presets", "PBR", "metal_chrome.azmaterial") - ground_plane_material_asset = asset.AssetCatalogRequestBus( - bus.Broadcast, "GetAssetIdByPath", ground_plane_material_asset_path, math.Uuid(), False) - ground_plane.get_set_test(0, "Default Material|Material Asset", ground_plane_material_asset) - # Work around to add the correct Atom Mesh component - mesh_type_id = azlmbr.globals.property.EditorMeshComponentTypeId - ground_plane.components.append( - editor.EditorComponentAPIBus( - bus.Broadcast, "AddComponentsOfType", ground_plane.id, [mesh_type_id] - ).GetValue()[0] - ) - ground_plane_mesh_asset_path = os.path.join("Objects", "plane.azmodel") - ground_plane_mesh_asset = asset.AssetCatalogRequestBus( - bus.Broadcast, "GetAssetIdByPath", ground_plane_mesh_asset_path, math.Uuid(), False) - hydra.get_set_test(ground_plane, 1, "Controller|Configuration|Mesh Asset", ground_plane_mesh_asset) - - # Create directional_light entity and set the properties - directional_light = hydra.Entity("directional_light") - directional_light.create_entity( - entity_position=math.Vector3(0.0, 0.0, 10.0), - components=["Directional Light"], - parent_id=default_level.id - ) - rotation = math.Vector3(DEGREE_RADIAN_FACTOR * -90.0, 0.0, 0.0) - azlmbr.components.TransformBus(azlmbr.bus.Event, "SetLocalRotation", directional_light.id, rotation) - - # Create sphere entity and set the properties - sphere = hydra.Entity("sphere") - sphere.create_entity( - entity_position=math.Vector3(0.0, 0.0, 1.0), - components=["Material"], - parent_id=default_level.id - ) - sphere_material_asset_path = os.path.join("Materials", "Presets", "PBR", "metal_brass_polished.azmaterial") - sphere_material_asset = asset.AssetCatalogRequestBus( - bus.Broadcast, "GetAssetIdByPath", sphere_material_asset_path, math.Uuid(), False) - sphere.get_set_test(0, "Default Material|Material Asset", sphere_material_asset) - # Work around to add the correct Atom Mesh component - sphere.components.append( - editor.EditorComponentAPIBus( - bus.Broadcast, "AddComponentsOfType", sphere.id, [mesh_type_id] - ).GetValue()[0] - ) - sphere_mesh_asset_path = os.path.join("Models", "sphere.azmodel") - sphere_mesh_asset = asset.AssetCatalogRequestBus( - bus.Broadcast, "GetAssetIdByPath", sphere_mesh_asset_path, math.Uuid(), False) - hydra.get_set_test(sphere, 1, "Controller|Configuration|Mesh Asset", sphere_mesh_asset) - - # Create camera component and set the properties - camera_entity = hydra.Entity("camera") - position = math.Vector3(5.5, -12.0, 9.0) - camera_entity.create_entity(components=["Camera"], entity_position=position, parent_id=default_level.id) - rotation = math.Vector3( - DEGREE_RADIAN_FACTOR * -27.0, DEGREE_RADIAN_FACTOR * -12.0, DEGREE_RADIAN_FACTOR * 25.0 - ) - azlmbr.components.TransformBus(azlmbr.bus.Event, "SetLocalRotation", camera_entity.id, rotation) - camera_entity.get_set_test(0, "Controller|Configuration|Field of view", 60.0) - azlmbr.camera.EditorCameraViewRequestBus(azlmbr.bus.Event, "ToggleCameraAsActiveView", camera_entity.id) - - # Save level, enter game mode, take screenshot, & exit game mode. - general.save_level() - general.idle_wait(0.5) - general.enter_game_mode() - general.idle_wait(1.0) - helper.wait_for_condition(function=lambda: general.is_in_game_mode(), timeout_in_seconds=2.0) - ScreenshotHelper(general.idle_wait_frames).capture_screenshot_blocking(f"{'AtomBasicLevelSetup'}.ppm") - general.exit_game_mode() - helper.wait_for_condition(function=lambda: not general.is_in_game_mode(), timeout_in_seconds=2.0) - - -if __name__ == "__main__": - run() diff --git a/AutomatedTesting/Gem/PythonTests/Atom/tests/hydra_GPUTest_LightComponent.py b/AutomatedTesting/Gem/PythonTests/Atom/tests/hydra_GPUTest_LightComponent.py deleted file mode 100644 index 1c3e6226c1..0000000000 --- a/AutomatedTesting/Gem/PythonTests/Atom/tests/hydra_GPUTest_LightComponent.py +++ /dev/null @@ -1,261 +0,0 @@ -""" -Copyright (c) Contributors to the Open 3D Engine Project. -For complete copyright and license terms please see the LICENSE at the root of this distribution. - -SPDX-License-Identifier: Apache-2.0 OR MIT -""" -import os -import sys - -import azlmbr.asset as asset -import azlmbr.bus as bus -import azlmbr.editor as editor -import azlmbr.math as math -import azlmbr.paths -import azlmbr.legacy.general as general - -sys.path.append(os.path.join(azlmbr.paths.projectroot, "Gem", "PythonTests")) - -import editor_python_test_tools.hydra_editor_utils as hydra -from Atom.atom_utils import atom_component_helper, atom_constants, screenshot_utils -from editor_python_test_tools.editor_test_helper import EditorTestHelper - -helper = EditorTestHelper(log_prefix="Atom_EditorTestHelper") - -LEVEL_NAME = "auto_test" -LIGHT_COMPONENT = "Light" -LIGHT_TYPE_PROPERTY = 'Controller|Configuration|Light type' -DEGREE_RADIAN_FACTOR = 0.0174533 - - -def run(): - """ - Sets up the tests by making sure the required level is created & setup correctly. - It then executes 2 test cases - see each associated test function's docstring for more info. - - Finally prints the string "Light component tests completed" after completion - - Tests will fail immediately if any of these log lines are found: - 1. Trace::Assert - 2. Trace::Error - 3. Traceback (most recent call last): - - :return: None - """ - atom_component_helper.create_basic_atom_level(level_name=LEVEL_NAME) - - # Run tests. - area_light_test() - spot_light_test() - general.log("Light component tests completed.") - - -def area_light_test(): - """ - Basic test for the "Light" component attached to an "area_light" entity. - - Test Case - Light Component: Capsule, Spot (disk), and Point (sphere): - 1. Creates "area_light" entity w/ a Light component that has a Capsule Light type w/ the color set to 255, 0, 0 - 2. Enters game mode to take a screenshot for comparison, then exits game mode. - 3. Sets the Light component Intensity Mode to Lumens (default). - 4. Ensures the Light component Mode is Automatic (default). - 5. Sets the Intensity value of the Light component to 0.0 - 6. Enters game mode again, takes another screenshot for comparison, then exits game mode. - 7. Updates the Intensity value of the Light component to 1000.0 - 8. Enters game mode again, takes another screenshot for comparison, then exits game mode. - 9. Swaps the Capsule light type option to Spot (disk) light type on the Light component - 10. Updates "area_light" entity Transform rotate value to x: 90.0, y:0.0, z:0.0 - 11. Enters game mode again, takes another screenshot for comparison, then exits game mode. - 12. Swaps the Spot (disk) light type for the Point (sphere) light type in the Light component. - 13. Enters game mode again, takes another screenshot for comparison, then exits game mode. - 14. Deletes the Light component from the "area_light" entity and verifies its successful. - """ - # Create an "area_light" entity with "Light" component using Light type of "Capsule" - area_light_entity_name = "area_light" - area_light = hydra.Entity(area_light_entity_name) - area_light.create_entity(math.Vector3(-1.0, -2.0, 3.0), [LIGHT_COMPONENT]) - general.log( - f"{area_light_entity_name}_test: Component added to the entity: " - f"{hydra.has_components(area_light.id, [LIGHT_COMPONENT])}") - light_component_id_pair = hydra.attach_component_to_entity(area_light.id, LIGHT_COMPONENT) - - # Select the "Capsule" light type option. - azlmbr.editor.EditorComponentAPIBus( - azlmbr.bus.Broadcast, - 'SetComponentProperty', - light_component_id_pair, - LIGHT_TYPE_PROPERTY, - atom_constants.LIGHT_TYPES['capsule'] - ) - - # Update color and take screenshot in game mode - color = math.Color(255.0, 0.0, 0.0, 0.0) - area_light.get_set_test(0, "Controller|Configuration|Color", color) - general.idle_wait(1.0) - screenshot_utils.take_screenshot_game_mode("AreaLight_1", area_light_entity_name) - - # Update intensity value to 0.0 and take screenshot in game mode - area_light.get_set_test(0, "Controller|Configuration|Attenuation Radius|Mode", 1) - area_light.get_set_test(0, "Controller|Configuration|Intensity", 0.0) - general.idle_wait(1.0) - screenshot_utils.take_screenshot_game_mode("AreaLight_2", area_light_entity_name) - - # Update intensity value to 1000.0 and take screenshot in game mode - area_light.get_set_test(0, "Controller|Configuration|Intensity", 1000.0) - general.idle_wait(1.0) - screenshot_utils.take_screenshot_game_mode("AreaLight_3", area_light_entity_name) - - # Swap the "Capsule" light type option to "Spot (disk)" light type - azlmbr.editor.EditorComponentAPIBus( - azlmbr.bus.Broadcast, - 'SetComponentProperty', - light_component_id_pair, - LIGHT_TYPE_PROPERTY, - atom_constants.LIGHT_TYPES['spot_disk'] - ) - area_light_rotation = math.Vector3(DEGREE_RADIAN_FACTOR * 90.0, 0.0, 0.0) - azlmbr.components.TransformBus(azlmbr.bus.Event, "SetLocalRotation", area_light.id, area_light_rotation) - general.idle_wait(1.0) - screenshot_utils.take_screenshot_game_mode("AreaLight_4", area_light_entity_name) - - # Swap the "Spot (disk)" light type to the "Point (sphere)" light type and take screenshot. - azlmbr.editor.EditorComponentAPIBus( - azlmbr.bus.Broadcast, - 'SetComponentProperty', - light_component_id_pair, - LIGHT_TYPE_PROPERTY, - atom_constants.LIGHT_TYPES['sphere'] - ) - general.idle_wait(1.0) - screenshot_utils.take_screenshot_game_mode("AreaLight_5", area_light_entity_name) - - editor.ToolsApplicationRequestBus(bus.Broadcast, "DeleteEntityById", area_light.id) - - -def spot_light_test(): - """ - Basic test for the Light component attached to a "spot_light" entity. - - Test Case - Light Component: Spot (disk) with shadows & colors: - 1. Creates "spot_light" entity w/ a Light component attached to it. - 2. Selects the "directional_light" entity already present in the level and disables it. - 3. Selects the "global_skylight" entity already present in the level and disables the HDRi Skybox component, - as well as the Global Skylight (IBL) component. - 4. Enters game mode to take a screenshot for comparison, then exits game mode. - 5. Selects the "ground_plane" entity and changes updates the material to a new material. - 6. Enters game mode to take a screenshot for comparison, then exits game mode. - 7. Selects the "spot_light" entity and increases the Light component Intensity to 800 lm - 8. Enters game mode to take a screenshot for comparison, then exits game mode. - 9. Selects the "spot_light" entity and sets the Light component Color to 47, 75, 37 - 10. Enters game mode to take a screenshot for comparison, then exits game mode. - 11. Selects the "spot_light" entity and modifies the Shutter controls to the following values: - - Enable shutters: True - - Inner Angle: 60.0 - - Outer Angle: 75.0 - 12. Enters game mode to take a screenshot for comparison, then exits game mode. - 13. Selects the "spot_light" entity and modifies the Shadow controls to the following values: - - Enable Shadow: True - - ShadowmapSize: 256 - 14. Modifies the world translate position of the "spot_light" entity to 0.7, -2.0, 1.9 (for casting shadows better) - 15. Enters game mode to take a screenshot for comparison, then exits game mode. - """ - # Disable "Directional Light" component for the "directional_light" entity - # "directional_light" entity is created by the create_basic_atom_level() function by default. - directional_light_entity_id = hydra.find_entity_by_name("directional_light") - directional_light = hydra.Entity(name='directional_light', id=directional_light_entity_id) - directional_light_component_type = azlmbr.editor.EditorComponentAPIBus( - azlmbr.bus.Broadcast, 'FindComponentTypeIdsByEntityType', ["Directional Light"], 0)[0] - directional_light_component = azlmbr.editor.EditorComponentAPIBus( - azlmbr.bus.Broadcast, 'GetComponentOfType', directional_light.id, directional_light_component_type - ).GetValue() - editor.EditorComponentAPIBus(bus.Broadcast, "DisableComponents", [directional_light_component]) - general.idle_wait(0.5) - - # Disable "Global Skylight (IBL)" and "HDRi Skybox" components for the "global_skylight" entity - global_skylight_entity_id = hydra.find_entity_by_name("global_skylight") - global_skylight = hydra.Entity(name='global_skylight', id=global_skylight_entity_id) - global_skylight_component_type = azlmbr.editor.EditorComponentAPIBus( - azlmbr.bus.Broadcast, 'FindComponentTypeIdsByEntityType', ["Global Skylight (IBL)"], 0)[0] - global_skylight_component = azlmbr.editor.EditorComponentAPIBus( - azlmbr.bus.Broadcast, 'GetComponentOfType', global_skylight.id, global_skylight_component_type - ).GetValue() - editor.EditorComponentAPIBus(bus.Broadcast, "DisableComponents", [global_skylight_component]) - hdri_skybox_component_type = azlmbr.editor.EditorComponentAPIBus( - azlmbr.bus.Broadcast, 'FindComponentTypeIdsByEntityType', ["HDRi Skybox"], 0)[0] - hdri_skybox_component = azlmbr.editor.EditorComponentAPIBus( - azlmbr.bus.Broadcast, 'GetComponentOfType', global_skylight.id, hdri_skybox_component_type - ).GetValue() - editor.EditorComponentAPIBus(bus.Broadcast, "DisableComponents", [hdri_skybox_component]) - general.idle_wait(0.5) - - # Create a "spot_light" entity with "Light" component using Light Type of "Spot (disk)" - spot_light_entity_name = "spot_light" - spot_light = hydra.Entity(spot_light_entity_name) - spot_light.create_entity(math.Vector3(0.7, -2.0, 1.0), [LIGHT_COMPONENT]) - general.log( - f"{spot_light_entity_name}_test: Component added to the entity: " - f"{hydra.has_components(spot_light.id, [LIGHT_COMPONENT])}") - rotation = math.Vector3(DEGREE_RADIAN_FACTOR * 300.0, 0.0, 0.0) - azlmbr.components.TransformBus(azlmbr.bus.Event, "SetLocalRotation", spot_light.id, rotation) - light_component_type = hydra.attach_component_to_entity(spot_light.id, LIGHT_COMPONENT) - editor.EditorComponentAPIBus( - azlmbr.bus.Broadcast, - 'SetComponentProperty', - light_component_type, - LIGHT_TYPE_PROPERTY, - atom_constants.LIGHT_TYPES['spot_disk'] - ) - - general.idle_wait(1.0) - screenshot_utils.take_screenshot_game_mode("SpotLight_1", spot_light_entity_name) - - # Change default material of ground plane entity and take screenshot - ground_plane_entity_id = hydra.find_entity_by_name("ground_plane") - ground_plane = hydra.Entity(name='ground_plane', id=ground_plane_entity_id) - ground_plane_asset_path = os.path.join("Materials", "Presets", "MacBeth", "22_neutral_5-0_0-70d.azmaterial") - ground_plane_asset_value = asset.AssetCatalogRequestBus( - bus.Broadcast, "GetAssetIdByPath", ground_plane_asset_path, math.Uuid(), False) - material_property_path = "Default Material|Material Asset" - material_component_type = azlmbr.editor.EditorComponentAPIBus( - azlmbr.bus.Broadcast, 'FindComponentTypeIdsByEntityType', ["Material"], 0)[0] - material_component = azlmbr.editor.EditorComponentAPIBus( - azlmbr.bus.Broadcast, 'GetComponentOfType', ground_plane.id, material_component_type).GetValue() - editor.EditorComponentAPIBus( - azlmbr.bus.Broadcast, - 'SetComponentProperty', - material_component, - material_property_path, - ground_plane_asset_value - ) - general.idle_wait(1.0) - screenshot_utils.take_screenshot_game_mode("SpotLight_2", spot_light_entity_name) - - # Increase intensity value of the Spot light and take screenshot in game mode - spot_light.get_set_test(0, "Controller|Configuration|Intensity", 800.0) - general.idle_wait(1.0) - screenshot_utils.take_screenshot_game_mode("SpotLight_3", spot_light_entity_name) - - # Update the Spot light color and take screenshot in game mode - color_value = math.Color(47.0 / 255.0, 75.0 / 255.0, 37.0 / 255.0, 255.0 / 255.0) - spot_light.get_set_test(0, "Controller|Configuration|Color", color_value) - general.idle_wait(1.0) - screenshot_utils.take_screenshot_game_mode("SpotLight_4", spot_light_entity_name) - - # Update the Shutter controls of the Light component and take screenshot - spot_light.get_set_test(0, "Controller|Configuration|Shutters|Enable shutters", True) - spot_light.get_set_test(0, "Controller|Configuration|Shutters|Inner angle", 60.0) - spot_light.get_set_test(0, "Controller|Configuration|Shutters|Outer angle", 75.0) - general.idle_wait(1.0) - screenshot_utils.take_screenshot_game_mode("SpotLight_5", spot_light_entity_name) - - # Update the Shadow controls, move the spot_light entity world translate position and take screenshot - spot_light.get_set_test(0, "Controller|Configuration|Shadows|Enable shadow", True) - spot_light.get_set_test(0, "Controller|Configuration|Shadows|Shadowmap size", 256.0) - azlmbr.components.TransformBus( - azlmbr.bus.Event, "SetWorldTranslation", spot_light.id, math.Vector3(0.7, -2.0, 1.9)) - general.idle_wait(1.0) - screenshot_utils.take_screenshot_game_mode("SpotLight_6", spot_light_entity_name) - - -if __name__ == "__main__": - run() diff --git a/AutomatedTesting/Gem/PythonTests/Blast/TestSuite_Main.py b/AutomatedTesting/Gem/PythonTests/Blast/TestSuite_Main.py index dbc4a1a456..a047d09d29 100644 --- a/AutomatedTesting/Gem/PythonTests/Blast/TestSuite_Main.py +++ b/AutomatedTesting/Gem/PythonTests/Blast/TestSuite_Main.py @@ -23,28 +23,28 @@ from base import TestAutomationBase class TestAutomation(TestAutomationBase): def test_ActorSplitsAfterCollision(self, request, workspace, editor, launcher_platform): from .tests import Blast_ActorSplitsAfterCollision as test_module - self._run_test(request, workspace, editor, test_module) + self._run_test(request, workspace, editor, test_module, enable_prefab_system=False) def test_ActorSplitsAfterRadialDamage(self, request, workspace, editor, launcher_platform): from .tests import Blast_ActorSplitsAfterRadialDamage as test_module - self._run_test(request, workspace, editor, test_module) + self._run_test(request, workspace, editor, test_module, enable_prefab_system=False) def test_ActorSplitsAfterCapsuleDamage(self, request, workspace, editor, launcher_platform): from .tests import Blast_ActorSplitsAfterCapsuleDamage as test_module - self._run_test(request, workspace, editor, test_module) + self._run_test(request, workspace, editor, test_module, enable_prefab_system=False) def test_ActorSplitsAfterImpactSpreadDamage(self, request, workspace, editor, launcher_platform): from .tests import Blast_ActorSplitsAfterImpactSpreadDamage as test_module - self._run_test(request, workspace, editor, test_module) + self._run_test(request, workspace, editor, test_module, enable_prefab_system=False) def test_ActorSplitsAfterShearDamage(self, request, workspace, editor, launcher_platform): from .tests import Blast_ActorSplitsAfterShearDamage as test_module - self._run_test(request, workspace, editor, test_module) + self._run_test(request, workspace, editor, test_module, enable_prefab_system=False) def test_ActorSplitsAfterTriangleDamage(self, request, workspace, editor, launcher_platform): from .tests import Blast_ActorSplitsAfterTriangleDamage as test_module - self._run_test(request, workspace, editor, test_module) + self._run_test(request, workspace, editor, test_module, enable_prefab_system=False) def test_ActorSplitsAfterStressDamage(self, request, workspace, editor, launcher_platform): from .tests import Blast_ActorSplitsAfterStressDamage as test_module - self._run_test(request, workspace, editor, test_module) + self._run_test(request, workspace, editor, test_module, enable_prefab_system=False) diff --git a/AutomatedTesting/Gem/PythonTests/CMakeLists.txt b/AutomatedTesting/Gem/PythonTests/CMakeLists.txt index bec49185bd..800f347359 100644 --- a/AutomatedTesting/Gem/PythonTests/CMakeLists.txt +++ b/AutomatedTesting/Gem/PythonTests/CMakeLists.txt @@ -56,6 +56,9 @@ add_subdirectory(streaming) ## Smoke ## add_subdirectory(smoke) +## Terrain ## +add_subdirectory(Terrain) + ## AWS ## add_subdirectory(AWS) diff --git a/AutomatedTesting/Gem/PythonTests/EditorPythonBindings/ComponentUpdateListProperty_test.py b/AutomatedTesting/Gem/PythonTests/EditorPythonBindings/ComponentUpdateListProperty_test.py index ed677ea185..a8ca721cca 100755 --- a/AutomatedTesting/Gem/PythonTests/EditorPythonBindings/ComponentUpdateListProperty_test.py +++ b/AutomatedTesting/Gem/PythonTests/EditorPythonBindings/ComponentUpdateListProperty_test.py @@ -51,5 +51,6 @@ class TestComponentAssetListAutomation(object): editor, "ComponentUpdateListProperty_test_case.py", expected_lines=expected_lines, - cfg_args=[level] + cfg_args=[level], + enable_prefab_system=False, ) diff --git a/AutomatedTesting/Gem/PythonTests/EditorPythonBindings/ObjectManagerCommands_test_case.py b/AutomatedTesting/Gem/PythonTests/EditorPythonBindings/ObjectManagerCommands_test_case.py index 9a308ab9c1..28b49bb4cb 100755 --- a/AutomatedTesting/Gem/PythonTests/EditorPythonBindings/ObjectManagerCommands_test_case.py +++ b/AutomatedTesting/Gem/PythonTests/EditorPythonBindings/ObjectManagerCommands_test_case.py @@ -67,30 +67,6 @@ if (editor.EditorToolsApplicationRequestBus(bus.Broadcast, 'GetCurrentLevelName' if(general.get_num_selected() == 0): print("clear_selection works") - general.hide_all_objects() - - if(general.is_object_hidden(objs_list[1])): - print("hide_all_objects works") - - general.unhide_object(objs_list[1]) - - if not(general.is_object_hidden(objs_list[1])): - print("unhide_object works") - - general.hide_object(objs_list[1]) - - if(general.is_object_hidden(objs_list[1])): - print("hide_object works") - - general.unhide_all_objects() - - general.freeze_object(objs_list[1]) - - if(general.is_object_frozen(objs_list[1])): - print("freeze_object works") - - general.unfreeze_object(objs_list[1]) - position = general.get_position(objs_list[1]) px1, py1, pz1 = fetch_vector3_parts(position) general.set_position(objs_list[1], px1 + 10, py1 - 4, pz1 + 3) diff --git a/AutomatedTesting/Gem/PythonTests/EditorPythonTestTools/README.txt b/AutomatedTesting/Gem/PythonTests/EditorPythonTestTools/README.txt index 90afee39bc..bd9740f60f 100644 --- a/AutomatedTesting/Gem/PythonTests/EditorPythonTestTools/README.txt +++ b/AutomatedTesting/Gem/PythonTests/EditorPythonTestTools/README.txt @@ -26,9 +26,9 @@ INSTALL It is recommended to set up these these tools with O3DE's CMake build commands. Assuming CMake is already setup on your operating system, below are some sample build commands: cd /path/to/od3e/ - mkdir windows_vs2019 - cd windows_vs2019 - cmake .. -G "Visual Studio 16 2019" -A x64 -T host=x64 -DLY_3RDPARTY_PATH="%3RDPARTYPATH%" -DLY_PROJECTS=AutomatedTesting + mkdir windows + cd windows + cmake .. -G "Visual Studio 16 2019" -DLY_PROJECTS=AutomatedTesting To manually install the project in development mode using your own installed Python interpreter: cd /path/to/od3e/AutomatedTesting/Gem/PythonTests/EditorPythonTestTools diff --git a/AutomatedTesting/Gem/PythonTests/EditorPythonTestTools/editor_python_test_tools/editor_entity_utils.py b/AutomatedTesting/Gem/PythonTests/EditorPythonTestTools/editor_python_test_tools/editor_entity_utils.py index 9e857ed8bc..72530325e0 100644 --- a/AutomatedTesting/Gem/PythonTests/EditorPythonTestTools/editor_python_test_tools/editor_entity_utils.py +++ b/AutomatedTesting/Gem/PythonTests/EditorPythonTestTools/editor_python_test_tools/editor_entity_utils.py @@ -25,7 +25,7 @@ class EditorComponent: """ EditorComponent class used to set and get the component property value using path EditorComponent object is returned from either of - EditorEntity.add_component() or Entity.add_components() or EditorEntity.get_component_objects() + EditorEntity.add_component() or Entity.add_components() or EditorEntity.get_components_of_type() which also assigns self.id and self.type_id to the EditorComponent object. """ @@ -94,6 +94,13 @@ class EditorComponent: """ return editor.EditorComponentAPIBus(bus.Broadcast, "IsComponentEnabled", self.id) + def disable_component(self): + """ + Used to disable the component using its id value. + :return: None + """ + editor.EditorComponentAPIBus(bus.Broadcast, "DisableComponents", [self.id]) + @staticmethod def get_type_ids(component_names: list) -> list: """ @@ -107,7 +114,6 @@ class EditorComponent: return type_ids - def convert_to_azvector3(xyz) -> azlmbr.math.Vector3: """ Converts a vector3-like element into a azlmbr.math.Vector3 @@ -120,6 +126,7 @@ def convert_to_azvector3(xyz) -> azlmbr.math.Vector3: else: raise ValueError("vector must be a 3 element list/tuple or azlmbr.math.Vector3") + class EditorEntity: """ Entity class is used to create and interact with Editor Entities. @@ -132,13 +139,15 @@ class EditorEntity: def __init__(self, id: azlmbr.entity.EntityId): self.id: azlmbr.entity.EntityId = id + self.components: List[EditorComponent] = [] # Creation functions @classmethod - def find_editor_entity(cls, entity_name: str, must_be_unique : bool = False) -> EditorEntity: + def find_editor_entity(cls, entity_name: str, must_be_unique: bool = False) -> EditorEntity: """ Given Entity name, outputs entity object :param entity_name: Name of entity to find + :param must_be_unique: bool that asserts the entity_name specified is unique when set to True :return: EditorEntity class object """ entities = cls.find_editor_entities([entity_name]) @@ -146,14 +155,14 @@ class EditorEntity: if must_be_unique: assert len(entities) == 1, f"Failure: Multiple entities with name: '{entity_name}' when expected only one" - entity = cls(entities[0]) + entity = entities[0] return entity @classmethod - def find_editor_entities(cls, entity_names: List[str]) -> EditorEntity: + def find_editor_entities(cls, entity_names: List[str]) -> List[EditorEntity]: """ Given Entities names, returns a list of EditorEntity - :param entity_name: Name of entity to find + :param entity_names: List of entity names to find :return: List[EditorEntity] class object """ searchFilter = azlmbr.entity.SearchFilter() @@ -279,7 +288,7 @@ class EditorEntity: ), f"Failure: Could not add component: '{new_comp.get_component_name()}' to entity: '{self.get_name()}'" new_comp.id = add_component_outcome.GetValue()[0] components.append(new_comp) - + self.components.append(new_comp) return components def get_components_of_type(self, component_names: list) -> List[EditorComponent]: @@ -437,7 +446,7 @@ class EditorEntity: def set_local_rotation(self, new_rotation) -> None: """ Sets the set the local rotation(relative to the parent) of the current entity. - :param vector3_rotation: The math.Vector3 value to use for rotation on the entity (uses radians). + :param new_rotation: The math.Vector3 value to use for rotation on the entity (uses radians). :return: None """ new_rotation = convert_to_azvector3(new_rotation) @@ -453,8 +462,115 @@ class EditorEntity: def set_local_translation(self, new_translation) -> None: """ Sets the local translation(relative to the parent) of the current entity. - :param vector3_translation: The math.Vector3 value to use for translation on the entity. + :param new_translation: The math.Vector3 value to use for translation on the entity. :return: None """ new_translation = convert_to_azvector3(new_translation) azlmbr.components.TransformBus(azlmbr.bus.Event, "SetLocalTranslation", self.id, new_translation) + + # Use this only when prefab system is enabled as it will fail otherwise. + def focus_on_owning_prefab(self) -> None: + """ + Focuses on the owning prefab instance of the given entity. + :param entity: The entity used to fetch the owning prefab to focus on. + """ + + assert self.id.isValid(), "A valid entity id is required to focus on its owning prefab." + focus_prefab_result = azlmbr.prefab.PrefabFocusPublicRequestBus(bus.Broadcast, "FocusOnOwningPrefab", self.id) + assert focus_prefab_result.IsSuccess(), f"Prefab operation 'FocusOnOwningPrefab' failed. Error: {focus_prefab_result.GetError()}" + + +class EditorLevelEntity: + """ + EditorLevel class used to add and fetch level components. + Level entity is a special entity that you do not create/destroy independently of larger systems of level creation. + This collects a number of staticmethods that do not rely on entityId since Level entity is found internally by + EditorLevelComponentAPIBus requests. + """ + + @staticmethod + def get_type_ids(component_names: list) -> list: + """ + Used to get type ids of given components list for EntityType Level + :param: component_names: List of components to get type ids + :return: List of type ids of given components. + """ + type_ids = editor.EditorComponentAPIBus( + bus.Broadcast, "FindComponentTypeIdsByEntityType", component_names, azlmbr.entity.EntityType().Level + ) + return type_ids + + @staticmethod + def add_component(component_name: str) -> EditorComponent: + """ + Used to add new component to Level. + :param component_name: String of component name to add. + :return: Component object of newly added component. + """ + component = EditorLevelEntity.add_components([component_name])[0] + return component + + @staticmethod + def add_components(component_names: list) -> List[EditorComponent]: + """ + Used to add multiple components + :param: component_names: List of components to add to level + :return: List of newly added components to the level + """ + components = [] + type_ids = EditorLevelEntity.get_type_ids(component_names) + for type_id in type_ids: + new_comp = EditorComponent() + new_comp.type_id = type_id + add_component_outcome = editor.EditorLevelComponentAPIBus( + bus.Broadcast, "AddComponentsOfType", [type_id] + ) + assert ( + add_component_outcome.IsSuccess() + ), f"Failure: Could not add component: '{new_comp.get_component_name()}' to level" + new_comp.id = add_component_outcome.GetValue()[0] + components.append(new_comp) + return components + + @staticmethod + def get_components_of_type(component_names: list) -> List[EditorComponent]: + """ + Used to get components of type component_name that already exists on the level + :param component_names: List of names of components to check + :return: List of Level Component objects of given component name + """ + component_list = [] + type_ids = EditorLevelEntity.get_type_ids(component_names) + for type_id in type_ids: + component = EditorComponent() + component.type_id = type_id + get_component_of_type_outcome = editor.EditorLevelComponentAPIBus( + bus.Broadcast, "GetComponentOfType", type_id + ) + assert ( + get_component_of_type_outcome.IsSuccess() + ), f"Failure: Level does not have component:'{component.get_component_name()}'" + component.id = get_component_of_type_outcome.GetValue() + component_list.append(component) + + return component_list + + @staticmethod + def has_component(component_name: str) -> bool: + """ + Used to verify if the level has the specified component + :param component_name: Name of component to check for + :return: True, if level has specified component. Else, False + """ + type_ids = EditorLevelEntity.get_type_ids([component_name]) + return editor.EditorLevelComponentAPIBus(bus.Broadcast, "HasComponentOfType", type_ids[0]) + + @staticmethod + def count_components_of_type(component_name: str) -> int: + """ + Used to get a count of the specified level component attached to the level + :param component_name: Name of component to check for + :return: integer count of occurences of level component attached to level or zero if none are present + """ + type_ids = EditorLevelEntity.get_type_ids([component_name]) + return editor.EditorLevelComponentAPIBus(bus.Broadcast, "CountComponentsOfType", type_ids[0]) diff --git a/AutomatedTesting/Gem/PythonTests/EditorPythonTestTools/editor_python_test_tools/hydra_editor_utils.py b/AutomatedTesting/Gem/PythonTests/EditorPythonTestTools/editor_python_test_tools/hydra_editor_utils.py index 985e32ede5..36fc6003f7 100644 --- a/AutomatedTesting/Gem/PythonTests/EditorPythonTestTools/editor_python_test_tools/hydra_editor_utils.py +++ b/AutomatedTesting/Gem/PythonTests/EditorPythonTestTools/editor_python_test_tools/hydra_editor_utils.py @@ -5,15 +5,22 @@ For complete copyright and license terms please see the LICENSE at the root of t SPDX-License-Identifier: Apache-2.0 OR MIT """ +from typing import List +from math import isclose +import collections.abc + import azlmbr.bus as bus import azlmbr.editor as editor import azlmbr.entity as entity import azlmbr.legacy.general as general import azlmbr.object -from typing import List -from math import isclose -import collections.abc +from editor_python_test_tools.utils import TestHelper as helper + + +def open_base_level(): + helper.init_idle() + helper.open_level("Prefab", "Base") def find_entity_by_name(entity_name): @@ -46,6 +53,18 @@ def get_component_type_id(component_name): return component_type_id +def get_level_component_type_id(component_name): + """ + Gets the component_type_id from a given component name + :param component_name: String of component name to search for + :return component type ID + """ + type_ids_list = editor.EditorComponentAPIBus(bus.Broadcast, 'FindComponentTypeIdsByEntityType', [component_name], + entity.EntityType().Level) + component_type_id = type_ids_list[0] + return component_type_id + + def add_level_component(component_name): """ Adds the specified component to the Level Inspector @@ -57,6 +76,10 @@ def add_level_component(component_name): level_component_list, entity.EntityType().Level) level_component_outcome = editor.EditorLevelComponentAPIBus(bus.Broadcast, 'AddComponentsOfType', [level_component_type_ids_list[0]]) + if not level_component_outcome.IsSuccess(): + print('Failed to add {} level component'.format(component_name)) + return None + level_component = level_component_outcome.GetValue()[0] return level_component @@ -141,6 +164,20 @@ def get_component_property_value(component, component_propertyPath): print(f'FAILURE: Could not get value from {component_propertyPath}') return None +def set_component_property_value(component, component_propertyPath, value): + """ + Given a component name and component property path, set component property value + :param component: Component object to act on. + :param componentPropertyPath: String of component property. (e.g. 'Settings|Visible') + :param value: new value for the variable being changed in the component + """ + componentPropertyObj = editor.EditorComponentAPIBus(bus.Broadcast, 'SetComponentProperty', component, + component_propertyPath, value) + if componentPropertyObj.IsSuccess(): + print(f'{component_propertyPath} set to {value}') + else: + print(f'FAILURE: Could not set value in {component_propertyPath}') + def get_property_tree(component): """ diff --git a/AutomatedTesting/Gem/PythonTests/EditorPythonTestTools/editor_python_test_tools/hydra_test_utils.py b/AutomatedTesting/Gem/PythonTests/EditorPythonTestTools/editor_python_test_tools/hydra_test_utils.py index 510d1b1149..5580499526 100644 --- a/AutomatedTesting/Gem/PythonTests/EditorPythonTestTools/editor_python_test_tools/hydra_test_utils.py +++ b/AutomatedTesting/Gem/PythonTests/EditorPythonTestTools/editor_python_test_tools/hydra_test_utils.py @@ -29,7 +29,7 @@ def teardown_editor(editor): def launch_and_validate_results(request, test_directory, editor, editor_script, expected_lines, unexpected_lines=[], halt_on_unexpected=False, run_python="--runpythontest", auto_test_mode=True, null_renderer=True, cfg_args=[], - timeout=300, log_file_name="Editor.log"): + timeout=300, log_file_name="Editor.log", enable_prefab_system=True): """ Runs the Editor with the specified script, and monitors for expected log lines. :param request: Special fixture providing information of the requesting test function. @@ -45,17 +45,25 @@ def launch_and_validate_results(request, test_directory, editor, editor_script, :param cfg_args: Additional arguments for CFG, such as LevelName. :param timeout: Length of time for test to run. Default is 60. :param log_file_name: Name of the log file created by the editor. Defaults to 'Editor.log' + :param enable_prefab_system: Flag to determine whether to use new prefab system or use deprecated slice system. Defaults to True. """ test_case = os.path.join(test_directory, editor_script) request.addfinalizer(lambda: teardown_editor(editor)) logger.debug("Running automated test: {}".format(editor_script)) editor.args.extend(["--skipWelcomeScreenDialog", "--regset=/Amazon/Settings/EnableSourceControl=false", - "--regset=/Amazon/Preferences/EnablePrefabSystem=false", run_python, test_case, + run_python, test_case, f"--pythontestcase={request.node.name}", "--runpythonargs", " ".join(cfg_args)]) if auto_test_mode: editor.args.extend(["--autotest_mode"]) if null_renderer: editor.args.extend(["-rhi=Null"]) + if enable_prefab_system: + from os import path + editor.args.extend([ + "--regset=/Amazon/Preferences/EnablePrefabSystem=true", + f"--regset-file={os.path.join(workspace.paths.engine_root(), 'Registry', 'prefab.test.setreg')}"]) + else: + editor.args.extend(["--regset=/Amazon/Preferences/EnablePrefabSystem=false"]) with editor.start(): diff --git a/AutomatedTesting/Gem/PythonTests/EditorPythonTestTools/editor_python_test_tools/prefab_utils.py b/AutomatedTesting/Gem/PythonTests/EditorPythonTestTools/editor_python_test_tools/prefab_utils.py index 76c2a42c0a..016e01bc95 100644 --- a/AutomatedTesting/Gem/PythonTests/EditorPythonTestTools/editor_python_test_tools/prefab_utils.py +++ b/AutomatedTesting/Gem/PythonTests/EditorPythonTestTools/editor_python_test_tools/prefab_utils.py @@ -39,7 +39,6 @@ def get_prefab_file_path(prefab_path): prefab_path = name + ".prefab" return prefab_path - def get_all_entity_ids(): return entity.SearchBus(bus.Broadcast, 'SearchEntities', entity.SearchFilter()) diff --git a/AutomatedTesting/Gem/PythonTests/EditorPythonTestTools/editor_python_test_tools/utils.py b/AutomatedTesting/Gem/PythonTests/EditorPythonTestTools/editor_python_test_tools/utils.py index 481d73274f..35a50b6090 100644 --- a/AutomatedTesting/Gem/PythonTests/EditorPythonTestTools/editor_python_test_tools/utils.py +++ b/AutomatedTesting/Gem/PythonTests/EditorPythonTestTools/editor_python_test_tools/utils.py @@ -34,6 +34,38 @@ class TestHelper: # JIRA: SPEC-2880 # general.idle_wait_frames(1) + @staticmethod + def create_level(level_name: str) -> bool: + """ + :param level_name: The name of the level to be created + :return: True if ECreateLevelResult returns 0, False otherwise with logging to report reason + """ + Report.info(f"Creating level {level_name}") + + # Use these hardcoded values to pass expected values for old terrain system until new create_level API is + # available + heightmap_resolution = 1024 + heightmap_meters_per_pixel = 1 + terrain_texture_resolution = 4096 + use_terrain = False + + result = general.create_level_no_prompt(level_name, heightmap_resolution, heightmap_meters_per_pixel, + terrain_texture_resolution, use_terrain) + + # Result codes are ECreateLevelResult defined in CryEdit.h + if result == 1: + Report.info(f"{level_name} level already exists") + elif result == 2: + Report.info("Failed to create directory") + elif result == 3: + Report.info("Directory length is too long") + elif result != 0: + Report.info("Unknown error, failed to create level") + else: + Report.info(f"{level_name} level created successfully") + + return result == 0 + @staticmethod def open_level(directory : str, level : str): # type: (str, str) -> None @@ -56,8 +88,7 @@ class TestHelper: general.idle_wait_frames(200) @staticmethod - def enter_game_mode(msgtuple_success_fail : Tuple[str, str]): - # type: (tuple) -> None + def enter_game_mode(msgtuple_success_fail: Tuple[str, str]) -> None: """ :param msgtuple_success_fail: The tuple with the expected/unexpected messages for entering game mode. @@ -70,31 +101,56 @@ class TestHelper: Report.critical_result(msgtuple_success_fail, general.is_in_game_mode()) @staticmethod - def multiplayer_enter_game_mode(msgtuple_success_fail : Tuple[str, str], sv_default_player_spawn_asset : str): - # type: (tuple) -> None + def find_line(window, line, print_infos): + """ + Looks for an expected line in a list of tracer log lines + :param window: The log's window name. For example, logs printed via script-canvas use the "Script" window. + :param line: The log message to search for. + :param print_infos: A list of PrintInfos collected by Tracer to search. Example options: your_tracer.warnings, your_tracer.errors, your_tracer.asserts, or your_tracer.prints + + :return: True if the line is found, otherwise false. + """ + for printInfo in print_infos: + if printInfo.window == window.strip() and printInfo.message.strip() == line: + return True + return False + + @staticmethod + def succeed_if_log_line_found(window, line, print_infos, time_out): + """ + Looks for a line in a list of tracer log lines and reports success if found. + :param window: The log's window name. For example, logs printed via script-canvas use the "Script" window. + :param line: The log message we're hoping to find. + :param print_infos: A list of PrintInfos collected by Tracer to search. Example options: your_tracer.warnings, your_tracer.errors, your_tracer.asserts, or your_tracer.prints + :param time_out: The total amount of time to wait before giving up looking for the expected line. + + :return: No return value, but if the message is found, a successful critical result is reported; otherwise failure. + """ + TestHelper.wait_for_condition(lambda : TestHelper.find_line(window, line, print_infos), time_out) + Report.critical_result(("Found expected line: " + line, "Failed to find expected line: " + line), TestHelper.find_line(window, line, print_infos)) + + @staticmethod + def fail_if_log_line_found(window, line, print_infos, time_out): + """ + Reports a failure if a log line in a list of tracer log lines is found. + :param window: The log's window name. For example, logs printed via script-canvas use the "Script" window. + :param line: The log message we're hoping to not find. + :param print_infos: A list of PrintInfos collected by Tracer to search. Example options: your_tracer.warnings, your_tracer.errors, your_tracer.asserts, or your_tracer.prints + :param time_out: The total amount of time to wait before giving up looking for the unexpected line. If time runs out and we don't see the unexpected line then report a success. + + :return: No return value, but if the line is found, a failed critical result is reported; otherwise success. + """ + TestHelper.wait_for_condition(lambda : TestHelper.find_line(window, line, print_infos), time_out) + Report.critical_result(("Unexpected line not found: " + line, "Unexpected line found: " + line), not TestHelper.find_line(window, line, print_infos)) + + @staticmethod + def multiplayer_enter_game_mode(msgtuple_success_fail: Tuple[str, str], sv_default_player_spawn_asset: str) -> None: """ :param msgtuple_success_fail: The tuple with the expected/unexpected messages for entering game mode. :param sv_default_player_spawn_asset: The path to the network player prefab that will be automatically spawned upon entering gamemode. The engine default is "prefabs/player.network.spawnable" :return: None """ - - # looks for an expected line in a list of tracers lines - # lines: the tracer list of lines to search. options are section_tracer.warnings, section_tracer.errors, section_tracer.asserts, section_tracer.prints - # return: true if the line is found, otherwise false - def find_expected_line(expected_line, lines): - found_lines = [printInfo.message.strip() for printInfo in lines] - return expected_line in found_lines - - def wait_for_critical_expected_line(expected_line, lines, time_out): - TestHelper.wait_for_condition(lambda : find_expected_line(expected_line, lines), time_out) - Report.critical_result(("Found expected line: " + expected_line, "Failed to find expected line: " + expected_line), find_expected_line(expected_line, lines)) - - def wait_for_critical_unexpected_line(unexpected_line, lines, time_out): - TestHelper.wait_for_condition(lambda : find_expected_line(unexpected_line, lines), time_out) - Report.critical_result(("Unexpected line not found: " + unexpected_line, "Unexpected line found: " + unexpected_line), not find_expected_line(unexpected_line, lines)) - - Report.info("Entering game mode") if sv_default_player_spawn_asset : general.set_cvar("sv_defaultPlayerSpawnAsset", sv_default_player_spawn_asset) @@ -105,16 +161,20 @@ class TestHelper: multiplayer.PythonEditorFuncs_enter_game_mode() # make sure the server launcher binary exists - wait_for_critical_unexpected_line("LaunchEditorServer failed! The ServerLauncher binary is missing!", section_tracer.errors, 0.5) + TestHelper.fail_if_log_line_found("MultiplayerEditor", "LaunchEditorServer failed! The ServerLauncher binary is missing!", section_tracer.errors, 0.5) # make sure the server launcher is running waiter.wait_for(lambda: process_utils.process_exists("AutomatedTesting.ServerLauncher", ignore_extensions=True), timeout=5.0, exc=AssertionError("AutomatedTesting.ServerLauncher has NOT launched!"), interval=1.0) - # make sure the editor connects to the editor-server and sends the level data packet - wait_for_critical_expected_line("Editor is sending the editor-server the level data packet.", section_tracer.prints, 5.0) + TestHelper.succeed_if_log_line_found("EditorServer", "MultiplayerEditorConnection: Editor-server activation has found and connected to the editor.", section_tracer.prints, 15.0) - # make sure the editor finally connects to the editor-server network simulation - wait_for_critical_expected_line("Editor-server ready. Editor has successfully connected to the editor-server's network simulation.", section_tracer.prints, 5.0) + TestHelper.succeed_if_log_line_found("MultiplayerEditor", "Editor is sending the editor-server the level data packet.", section_tracer.prints, 5.0) + + TestHelper.succeed_if_log_line_found("EditorServer", "Logger: Editor Server completed receiving the editor's level assets, responding to Editor...", section_tracer.prints, 5.0) + + TestHelper.succeed_if_log_line_found("MultiplayerEditorConnection", "Editor-server ready. Editor has successfully connected to the editor-server's network simulation.", section_tracer.prints, 5.0) + + TestHelper.fail_if_log_line_found("EditorServer", f"MultiplayerSystemComponent: SpawnDefaultPlayerPrefab failed. Missing sv_defaultPlayerSpawnAsset at path '{sv_default_player_spawn_asset.lower()}'.", section_tracer.prints, 0.5) TestHelper.wait_for_condition(lambda : multiplayer.PythonEditorFuncs_is_in_game_mode(), 5.0) Report.critical_result(msgtuple_success_fail, multiplayer.PythonEditorFuncs_is_in_game_mode()) diff --git a/AutomatedTesting/Gem/PythonTests/Multiplayer/CMakeLists.txt b/AutomatedTesting/Gem/PythonTests/Multiplayer/CMakeLists.txt index 5e74d1e93b..367de4da9a 100644 --- a/AutomatedTesting/Gem/PythonTests/Multiplayer/CMakeLists.txt +++ b/AutomatedTesting/Gem/PythonTests/Multiplayer/CMakeLists.txt @@ -8,10 +8,10 @@ if(PAL_TRAIT_BUILD_TESTS_SUPPORTED AND PAL_TRAIT_BUILD_HOST_TOOLS) ly_add_pytest( - NAME AutomatedTesting::MultiplayerTests_Main - TEST_SUITE main + NAME AutomatedTesting::MultiplayerTests_Sandbox + TEST_SUITE sandbox TEST_SERIAL - PATH ${CMAKE_CURRENT_LIST_DIR}/TestSuite_Main.py + PATH ${CMAKE_CURRENT_LIST_DIR}/TestSuite_Sandbox.py RUNTIME_DEPENDENCIES Legacy::Editor AZ::AssetProcessor diff --git a/AutomatedTesting/Gem/PythonTests/Multiplayer/TestSuite_Main.py b/AutomatedTesting/Gem/PythonTests/Multiplayer/TestSuite_Main.py index 9cecaa7fe8..450c760786 100644 --- a/AutomatedTesting/Gem/PythonTests/Multiplayer/TestSuite_Main.py +++ b/AutomatedTesting/Gem/PythonTests/Multiplayer/TestSuite_Main.py @@ -23,11 +23,6 @@ from base import TestAutomationBase class TestAutomation(TestAutomationBase): def _run_prefab_test(self, request, workspace, editor, test_module, batch_mode=True, autotest_mode=True): self._run_test(request, workspace, editor, test_module, - extra_cmdline_args=["--regset=/Amazon/Preferences/EnablePrefabSystem=true"], batch_mode=batch_mode, autotest_mode=autotest_mode) - def test_Multiplayer_AutoComponent_NetworkInput(self, request, workspace, editor, launcher_platform): - from .tests import Multiplayer_AutoComponent_NetworkInput as test_module - self._run_prefab_test(request, workspace, editor, test_module) - diff --git a/AutomatedTesting/Gem/PythonTests/Multiplayer/TestSuite_Sandbox.py b/AutomatedTesting/Gem/PythonTests/Multiplayer/TestSuite_Sandbox.py new file mode 100644 index 0000000000..8c5f33993d --- /dev/null +++ b/AutomatedTesting/Gem/PythonTests/Multiplayer/TestSuite_Sandbox.py @@ -0,0 +1,37 @@ +""" +Copyright (c) Contributors to the Open 3D Engine Project. +For complete copyright and license terms please see the LICENSE at the root of this distribution. + +SPDX-License-Identifier: Apache-2.0 OR MIT + +""" + +# This suite consists of all test cases that are under development and have not been verified yet. +# Once they are verified, please move them to TestSuite_Active.py + +import pytest +import os +import sys + + +sys.path.append(os.path.dirname(os.path.abspath(__file__)) + '/../automatedtesting_shared') + +from base import TestAutomationBase + +@pytest.mark.SUITE_sandbox +@pytest.mark.parametrize("project", ["AutomatedTesting"]) +@pytest.mark.parametrize("launcher_platform", ['windows_editor']) +class TestAutomation(TestAutomationBase): + def _run_prefab_test(self, request, workspace, editor, test_module, batch_mode=True, autotest_mode=True): + self._run_test(request, workspace, editor, test_module, + batch_mode=batch_mode, + autotest_mode=autotest_mode) + + ## Seems to be flaky, need to investigate + def test_Multiplayer_AutoComponent_NetworkInput(self, request, workspace, editor, launcher_platform): + from .tests import Multiplayer_AutoComponent_NetworkInput as test_module + self._run_prefab_test(request, workspace, editor, test_module) + + def test_Multiplayer_AutoComponent_RPC(self, request, workspace, editor, launcher_platform): + from .tests import Multiplayer_AutoComponent_RPC as test_module + self._run_prefab_test(request, workspace, editor, test_module) diff --git a/AutomatedTesting/Gem/PythonTests/Multiplayer/tests/Multiplayer_AutoComponent_RPC.py b/AutomatedTesting/Gem/PythonTests/Multiplayer/tests/Multiplayer_AutoComponent_RPC.py new file mode 100644 index 0000000000..827826cbcc --- /dev/null +++ b/AutomatedTesting/Gem/PythonTests/Multiplayer/tests/Multiplayer_AutoComponent_RPC.py @@ -0,0 +1,83 @@ +""" +Copyright (c) Contributors to the Open 3D Engine Project. +For complete copyright and license terms please see the LICENSE at the root of this distribution. + +SPDX-License-Identifier: Apache-2.0 OR MIT +""" + + +# Test Case Title : Check that the four network RPCs can be sent and received + + +# fmt: off +class TestSuccessFailTuples(): + enter_game_mode = ("Entered game mode", "Failed to enter game mode") + exit_game_mode = ("Exited game mode", "Couldn't exit game mode") + find_network_player = ("Found network player", "Couldn't find network player") +# fmt: on + + +def Multiplayer_AutoComponent_RPC(): + r""" + Summary: + Runs a test to make sure that RPCs can be sent and received via script canvas + + Level Description: + - Dynamic + 1. Although the level is nearly empty, when the server and editor connect the server will spawn and replicate the player network prefab. + a. The player network prefab has a NetworkTestPlayerComponent.AutoComponent and a script canvas attached which sends and receives various RPCs. + Print logs occur upon sending and receiving the RPCs; we are testing to make sure the expected events and values are received. + - Static + 1. NetLevelEntity. This is a networked entity which has a script attached. Used for cross-entity communication. The net-player prefab will send this level entity Server->Authority RPCs + + + Expected Outcome: + We should see editor logs stating that RPCs have been sent and received. + However, if the script receives unexpected values for the Process event we will see print logs for bad data as well. + + :return: + """ + import azlmbr.legacy.general as general + from editor_python_test_tools.utils import Report + from editor_python_test_tools.utils import Tracer + + from editor_python_test_tools.utils import TestHelper as helper + from ly_remote_console.remote_console_commands import RemoteConsole as RemoteConsole + + level_name = "AutoComponent_RPC" + player_prefab_name = "Player" + player_prefab_path = f"levels/multiplayer/{level_name}/{player_prefab_name}.network.spawnable" + + helper.init_idle() + + # 1) Open Level + helper.open_level("Multiplayer", level_name) + + with Tracer() as section_tracer: + # 2) Enter game mode + helper.multiplayer_enter_game_mode(TestSuccessFailTuples.enter_game_mode, player_prefab_path.lower()) + + # 3) Make sure the network player was spawned + player_id = general.find_game_entity(player_prefab_name) + Report.critical_result(TestSuccessFailTuples.find_network_player, player_id.IsValid()) + + # 4) Check the editor logs for expected and unexpected log output + PLAYERID_RPC_WAIT_TIME_SECONDS = 1.0 # The player id is sent from the server as soon as the player script is spawned. 1 second should be more than enough time to send/receive that RPC. + helper.succeed_if_log_line_found('EditorServer', 'Script: AutoComponent_RPC: Sending client PlayerNumber 1', section_tracer.prints, PLAYERID_RPC_WAIT_TIME_SECONDS) + helper.succeed_if_log_line_found('Script', "AutoComponent_RPC: I'm Player #1", section_tracer.prints, PLAYERID_RPC_WAIT_TIME_SECONDS) + + # Uncomment once editor game-play mode supports level entities with net-binding + #PLAYFX_RPC_WAIT_TIME_SECONDS = 1.1 # The server will send an RPC to play an fx on the client every second. + #helper.succeed_if_log_line_found('EditorServer', "Script: AutoComponent_RPC_NetLevelEntity Activated on entity: NetLevelEntity", section_tracer.prints, PLAYFX_RPC_WAIT_TIME_SECONDS) + #helper.succeed_if_log_line_found('EditorServer', "Script: AutoComponent_RPC_NetLevelEntity: Authority sending RPC to play some fx.", section_tracer.prints, PLAYFX_RPC_WAIT_TIME_SECONDS) + #helper.succeed_if_log_line_found('Script', "AutoComponent_RPC_NetLevelEntity: I'm a client playing some superficial fx.", section_tracer.prints, PLAYFX_RPC_WAIT_TIME_SECONDS) + + + # Exit game mode + helper.exit_game_mode(TestSuccessFailTuples.exit_game_mode) + + + +if __name__ == "__main__": + from editor_python_test_tools.utils import Report + Report.start_test(Multiplayer_AutoComponent_RPC) diff --git a/AutomatedTesting/Gem/PythonTests/NvCloth/tests/NvCloth_AddClothSimulationToActor.py b/AutomatedTesting/Gem/PythonTests/NvCloth/tests/NvCloth_AddClothSimulationToActor.py index 357067b176..e4150f7af8 100644 --- a/AutomatedTesting/Gem/PythonTests/NvCloth/tests/NvCloth_AddClothSimulationToActor.py +++ b/AutomatedTesting/Gem/PythonTests/NvCloth/tests/NvCloth_AddClothSimulationToActor.py @@ -50,6 +50,7 @@ def NvCloth_AddClothSimulationToActor(): # Constants FRAMES_IN_GAME_MODE = 200 + CLOTH_GEM_ERROR_WARNING_LIST = ["Cloth", "NvCloth", "ClothComponentMesh", "ActorClothSkinning", "ActorClothSkinning", "TangentSpaceHelper", "MeshAssetHelper", "ActorAssetHelper", "ClothDebugDisplay"] helper.init_idle() # 1) Load the level @@ -64,14 +65,16 @@ def NvCloth_AddClothSimulationToActor(): general.idle_wait_frames(FRAMES_IN_GAME_MODE) # 5) Verify there are no errors and warnings in the logs - success_condition = not (section_tracer.has_errors or section_tracer.has_warnings) - Report.result(Tests.no_errors_and_warnings_found, success_condition) - if not success_condition: - if section_tracer.has_warnings: - Report.info(f"Warnings found: {section_tracer.warnings}") - if section_tracer.has_errors: - Report.info(f"Errors found: {section_tracer.errors}") - Report.failure(Tests.no_errors_and_warnings_found) + has_errors_or_warnings = False + for error_msg in section_tracer.errors: + if error_msg.window in CLOTH_GEM_ERROR_WARNING_LIST: + has_errors_or_warnings = True + Report.info(f"Cloth error found: {error_msg}") + for warning_msg in section_tracer.warnings: + if warning_msg.window in CLOTH_GEM_ERROR_WARNING_LIST: + has_errors_or_warnings = True + Report.info(f"Cloth warning found: {warning_msg}") + Report.result(Tests.no_errors_and_warnings_found, not has_errors_or_warnings) # 6) Exit game mode helper.exit_game_mode(Tests.exit_game_mode) diff --git a/AutomatedTesting/Gem/PythonTests/NvCloth/tests/NvCloth_AddClothSimulationToMesh.py b/AutomatedTesting/Gem/PythonTests/NvCloth/tests/NvCloth_AddClothSimulationToMesh.py index 0f9d8448f7..707f745cea 100644 --- a/AutomatedTesting/Gem/PythonTests/NvCloth/tests/NvCloth_AddClothSimulationToMesh.py +++ b/AutomatedTesting/Gem/PythonTests/NvCloth/tests/NvCloth_AddClothSimulationToMesh.py @@ -50,6 +50,7 @@ def NvCloth_AddClothSimulationToMesh(): # Constants FRAMES_IN_GAME_MODE = 200 + CLOTH_GEM_ERROR_WARNING_LIST = ["Cloth", "NvCloth", "ClothComponentMesh", "ActorClothSkinning", "ActorClothSkinning", "TangentSpaceHelper", "MeshAssetHelper", "ActorAssetHelper", "ClothDebugDisplay"] helper.init_idle() # 1) Load the level @@ -64,14 +65,16 @@ def NvCloth_AddClothSimulationToMesh(): general.idle_wait_frames(FRAMES_IN_GAME_MODE) # 5) Verify there are no errors and warnings in the logs - success_condition = not (section_tracer.has_errors or section_tracer.has_warnings) - Report.result(Tests.no_errors_and_warnings_found, success_condition) - if not success_condition: - if section_tracer.has_warnings: - Report.info(f"Warnings found: {section_tracer.warnings}") - if section_tracer.has_errors: - Report.info(f"Errors found: {section_tracer.errors}") - Report.failure(Tests.no_errors_and_warnings_found) + has_errors_or_warnings = False + for error_msg in section_tracer.errors: + if error_msg.window in CLOTH_GEM_ERROR_WARNING_LIST: + has_errors_or_warnings = True + Report.info(f"Cloth error found: {error_msg}") + for warning_msg in section_tracer.warnings: + if warning_msg.window in CLOTH_GEM_ERROR_WARNING_LIST: + has_errors_or_warnings = True + Report.info(f"Cloth warning found: {warning_msg}") + Report.result(Tests.no_errors_and_warnings_found, not has_errors_or_warnings) # 6) Exit game mode helper.exit_game_mode(Tests.exit_game_mode) diff --git a/AutomatedTesting/Gem/PythonTests/Physics/TestSuite_InDevelopment.py b/AutomatedTesting/Gem/PythonTests/Physics/TestSuite_InDevelopment.py index 9e3a9cb4ff..09d8f5635f 100755 --- a/AutomatedTesting/Gem/PythonTests/Physics/TestSuite_InDevelopment.py +++ b/AutomatedTesting/Gem/PythonTests/Physics/TestSuite_InDevelopment.py @@ -26,158 +26,158 @@ class TestAutomation(TestAutomationBase): r"AutomatedTesting\Levels\Physics\Material_LibraryCrudOperationsReflectOnRagdollBones") def test_Material_LibraryCrudOperationsReflectOnRagdollBones(self, request, workspace, editor, launcher_platform): from .tests.material import Material_LibraryCrudOperationsReflectOnRagdollBones as test_module - self._run_test(request, workspace, editor, test_module) + self._run_test(request, workspace, editor, test_module, enable_prefab_system=False) def test_Material_RagdollBones(self, request, workspace, editor, launcher_platform): from .tests.material import Material_RagdollBones as test_module - self._run_test(request, workspace, editor, test_module) + self._run_test(request, workspace, editor, test_module, enable_prefab_system=False) @fm.file_revert("c15308221_material_componentsinsyncwithlibrary.physmaterial", r"AutomatedTesting\Levels\Physics\Material_ComponentsInSyncWithLibrary") def test_Material_ComponentsInSyncWithLibrary(self, request, workspace, editor, launcher_platform): from .tests.material import Material_ComponentsInSyncWithLibrary as test_module - self._run_test(request, workspace, editor, test_module) + self._run_test(request, workspace, editor, test_module, enable_prefab_system=False) # BUG: LY-107723") def test_ScriptCanvas_SetKinematicTargetTransform(self, request, workspace, editor, launcher_platform): from .tests.script_canvas import ScriptCanvas_SetKinematicTargetTransform as test_module - self._run_test(request, workspace, editor, test_module) + self._run_test(request, workspace, editor, test_module, enable_prefab_system=False) # Failing, PhysXTerrain @fm.file_revert("c4925579_material_addmodifydeleteonterrain.physmaterial", r"AutomatedTesting\Levels\Physics\Material_LibraryCrudOperationsReflectOnTerrain") def test_Material_LibraryCrudOperationsReflectOnTerrain(self, request, workspace, editor, launcher_platform): from .tests.material import Material_LibraryCrudOperationsReflectOnTerrain as test_module - self._run_test(request, workspace, editor, test_module) + self._run_test(request, workspace, editor, test_module, enable_prefab_system=False) # Failing, PhysXTerrain def test_Terrain_TerrainTexturePainterWorks(self, request, workspace, editor, launcher_platform): from .tests.terrain import Terrain_TerrainTexturePainterWorks as test_module - self._run_test(request, workspace, editor, test_module) + self._run_test(request, workspace, editor, test_module, enable_prefab_system=False) # Failing, PhysXTerrain def test_Material_CanBeAssignedToTerrain(self, request, workspace, editor, launcher_platform): from .tests.material import Material_CanBeAssignedToTerrain as test_module - self._run_test(request, workspace, editor, test_module) + self._run_test(request, workspace, editor, test_module, enable_prefab_system=False) # Failing, PhysXTerrain def test_Material_DefaultLibraryConsistentOnAllFeatures(self, request, workspace, editor, launcher_platform): from .tests.material import Material_DefaultLibraryConsistentOnAllFeatures as test_module - self._run_test(request, workspace, editor, test_module) + self._run_test(request, workspace, editor, test_module, enable_prefab_system=False) # Failing, PhysXTerrain @fm.file_revert("all_ones_1.physmaterial", r"AutomatedTesting\Levels\Physics\Material_DefaultMaterialLibraryChangesWork") @fm.file_override("default.physxconfiguration", "Material_DefaultMaterialLibraryChangesWork.physxconfiguration", "AutomatedTesting") def test_Material_DefaultMaterialLibraryChangesWork(self, request, workspace, editor, launcher_platform): from .tests.material import Material_DefaultMaterialLibraryChangesWork as test_module - self._run_test(request, workspace, editor, test_module) + self._run_test(request, workspace, editor, test_module, enable_prefab_system=False) def test_Collider_SameCollisionGroupSameLayerCollide(self, request, workspace, editor, launcher_platform): from .tests.collider import Collider_SameCollisionGroupSameLayerCollide as test_module - self._run_test(request, workspace, editor, test_module) + self._run_test(request, workspace, editor, test_module, enable_prefab_system=False) def test_Ragdoll_OldRagdollSerializationNoErrors(self, request, workspace, editor, launcher_platform): from .tests.ragdoll import Ragdoll_OldRagdollSerializationNoErrors as test_module - self._run_test(request, workspace, editor, test_module) + self._run_test(request, workspace, editor, test_module, enable_prefab_system=False) @fm.file_override("default.physxconfiguration", "ScriptCanvas_OverlapNode.physxconfiguration") def test_ScriptCanvas_OverlapNode(self, request, workspace, editor, launcher_platform): from .tests.script_canvas import ScriptCanvas_OverlapNode as test_module - self._run_test(request, workspace, editor, test_module) + self._run_test(request, workspace, editor, test_module, enable_prefab_system=False) def test_Material_StaticFriction(self, request, workspace, editor, launcher_platform): from .tests.material import Material_StaticFriction as test_module - self._run_test(request, workspace, editor, test_module) + self._run_test(request, workspace, editor, test_module, enable_prefab_system=False) @fm.file_revert("c4888315_material_addmodifydeleteoncollider.physmaterial", r"AutomatedTesting\Levels\Physics\Material_LibraryCrudOperationsReflectOnCollider") def test_Material_LibraryCrudOperationsReflectOnCollider(self, request, workspace, editor, launcher_platform): from .tests.material import Material_LibraryCrudOperationsReflectOnCollider as test_module - self._run_test(request, workspace, editor, test_module) + self._run_test(request, workspace, editor, test_module, enable_prefab_system=False) @fm.file_revert("c15563573_material_addmodifydeleteoncharactercontroller.physmaterial", r"AutomatedTesting\Levels\Physics\Material_LibraryCrudOperationsReflectOnCharacterController") def test_Material_LibraryCrudOperationsReflectOnCharacterController(self, request, workspace, editor, launcher_platform): from .tests.material import Material_LibraryCrudOperationsReflectOnCharacterController as test_module - self._run_test(request, workspace, editor, test_module) + self._run_test(request, workspace, editor, test_module, enable_prefab_system=False) @fm.file_revert("c4888315_material_addmodifydeleteoncollider.physmaterial", r"AutomatedTesting\Levels\Physics\Material_LibraryCrudOperationsReflectOnCollider") def test_Material_LibraryCrudOperationsReflectOnCollider(self, request, workspace, editor, launcher_platform): from .tests.material import Material_LibraryCrudOperationsReflectOnCollider as test_module - self._run_test(request, workspace, editor, test_module) + self._run_test(request, workspace, editor, test_module, enable_prefab_system=False) @fm.file_revert("c15563573_material_addmodifydeleteoncharactercontroller.physmaterial", r"AutomatedTesting\Levels\Physics\Material_LibraryCrudOperationsReflectOnCharacterController") def test_Material_LibraryCrudOperationsReflectOnCharacterController(self, request, workspace, editor, launcher_platform): from .tests.material import Material_LibraryCrudOperationsReflectOnCharacterController as test_module - self._run_test(request, workspace, editor, test_module) + self._run_test(request, workspace, editor, test_module, enable_prefab_system=False) @fm.file_revert("c4044455_material_librarychangesinstantly.physmaterial", r"AutomatedTesting\Levels\Physics\C4044455_Material_LibraryChangesInstantly") def test_Material_LibraryChangesReflectInstantly(self, request, workspace, editor, launcher_platform): from .tests.material import Material_LibraryChangesReflectInstantly as test_module - self._run_test(request, workspace, editor, test_module) + self._run_test(request, workspace, editor, test_module, enable_prefab_system=False) @fm.file_revert("Material_LibraryUpdatedAcrossLevels.physmaterial", r"AutomatedTesting\Levels\Physics\Material_LibraryUpdatedAcrossLevels") def test_Material_LibraryUpdatedAcrossLevels(self, request, workspace, editor, launcher_platform): from .tests.material import Material_LibraryUpdatedAcrossLevels as test_module - self._run_test(request, workspace, editor, test_module) + self._run_test(request, workspace, editor, test_module, enable_prefab_system=False) def test_RigidBody_LinearDampingAffectsMotion(self, request, workspace, editor, launcher_platform): from .tests.rigid_body import RigidBody_LinearDampingAffectsMotion as test_module - self._run_test(request, workspace, editor, test_module) + self._run_test(request, workspace, editor, test_module, enable_prefab_system=False) def test_Terrain_CollisionAgainstRigidBody(self, request, workspace, editor, launcher_platform): from .tests.terrain import Terrain_CollisionAgainstRigidBody as test_module - self._run_test(request, workspace, editor, test_module) + self._run_test(request, workspace, editor, test_module, enable_prefab_system=False) def test_ShapeCollider_CylinderShapeCollides(self, request, workspace, editor, launcher_platform): from .tests.collider import ShapeCollider_CylinderShapeCollides as test_module - self._run_test(request, workspace, editor, test_module) + self._run_test(request, workspace, editor, test_module, enable_prefab_system=False) def test_Physics_WorldBodyBusWorksOnEditorComponents(self, request, workspace, editor, launcher_platform): from .tests import Physics_WorldBodyBusWorksOnEditorComponents as test_module - self._run_test(request, workspace, editor, test_module) + self._run_test(request, workspace, editor, test_module, enable_prefab_system=False) def test_Collider_PxMeshErrorIfNoMesh(self, request, workspace, editor, launcher_platform): from .tests.collider import Collider_PxMeshErrorIfNoMesh as test_module - self._run_test(request, workspace, editor, test_module) + self._run_test(request, workspace, editor, test_module, enable_prefab_system=False) def test_ForceRegion_ImpulsesBoxShapedRigidBody(self, request, workspace, editor, launcher_platform): from .tests.force_region import ForceRegion_ImpulsesBoxShapedRigidBody as test_module - self._run_test(request, workspace, editor, test_module) + self._run_test(request, workspace, editor, test_module, enable_prefab_system=False) def test_Terrain_SpawnSecondTerrainComponentWarning(self, request, workspace, editor, launcher_platform): from .tests.terrain import Terrain_SpawnSecondTerrainComponentWarning as test_module - self._run_test(request, workspace, editor, test_module) + self._run_test(request, workspace, editor, test_module, enable_prefab_system=False) def test_Terrain_AddPhysTerrainComponent(self, request, workspace, editor, launcher_platform): from .tests.terrain import Terrain_AddPhysTerrainComponent as test_module - self._run_test(request, workspace, editor, test_module) + self._run_test(request, workspace, editor, test_module, enable_prefab_system=False) def test_Terrain_CanAddMultipleTerrainComponents(self, request, workspace, editor, launcher_platform): from .tests.terrain import Terrain_CanAddMultipleTerrainComponents as test_module - self._run_test(request, workspace, editor, test_module) + self._run_test(request, workspace, editor, test_module, enable_prefab_system=False) def test_Terrain_MultipleTerrainComponentsWarning(self, request, workspace, editor, launcher_platform): from .tests.terrain import Terrain_MultipleTerrainComponentsWarning as test_module - self._run_test(request, workspace, editor, test_module) + self._run_test(request, workspace, editor, test_module, enable_prefab_system=False) def test_Terrain_MultipleTerrainComponentsWarning(self, request, workspace, editor, launcher_platform): from .tests.terrain import Terrain_MultipleTerrainComponentsWarning as test_module - self._run_test(request, workspace, editor, test_module) + self._run_test(request, workspace, editor, test_module, enable_prefab_system=False) def test_ForceRegion_HighValuesDirectionAxesWorkWithNoError(self, request, workspace, editor, launcher_platform): from .tests.force_region import ForceRegion_HighValuesDirectionAxesWorkWithNoError as test_module - self._run_test(request, workspace, editor, test_module) + self._run_test(request, workspace, editor, test_module, enable_prefab_system=False) def test_Terrain_MultipleResolutionsValid(self, request, workspace, editor, launcher_platform): from .tests.terrain import Terrain_MultipleResolutionsValid as test_module - self._run_test(request, workspace, editor, test_module) + self._run_test(request, workspace, editor, test_module, enable_prefab_system=False) def test_ForceRegion_SmallMagnitudeDeviationOnLargeForces(self, request, workspace, editor, launcher_platform): from .tests.force_region import ForceRegion_SmallMagnitudeDeviationOnLargeForces as test_module - self._run_test(request, workspace, editor, test_module) + self._run_test(request, workspace, editor, test_module, enable_prefab_system=False) diff --git a/AutomatedTesting/Gem/PythonTests/Physics/TestSuite_Main.py b/AutomatedTesting/Gem/PythonTests/Physics/TestSuite_Main.py index b64fbb5656..07ae5f6ca0 100644 --- a/AutomatedTesting/Gem/PythonTests/Physics/TestSuite_Main.py +++ b/AutomatedTesting/Gem/PythonTests/Physics/TestSuite_Main.py @@ -30,33 +30,33 @@ class TestAutomation(TestAutomationBase): def test_RigidBody_EnablingGravityWorksUsingNotificationsPoC(self, request, workspace, editor, launcher_platform): from .tests.rigid_body import RigidBody_EnablingGravityWorksUsingNotificationsPoC as test_module - self._run_test(request, workspace, editor, test_module) + self._run_test(request, workspace, editor, test_module, enable_prefab_system=False) @revert_physics_config def test_ForceRegion_LocalSpaceForceOnRigidBodies(self, request, workspace, editor, launcher_platform): from .tests.force_region import ForceRegion_LocalSpaceForceOnRigidBodies as test_module - self._run_test(request, workspace, editor, test_module) + self._run_test(request, workspace, editor, test_module, enable_prefab_system=False) @revert_physics_config @fm.file_override('physxsystemconfiguration.setreg','Material_DynamicFriction.setreg_override', 'AutomatedTesting/Registry', search_subdirs=True) def test_Material_DynamicFriction(self, request, workspace, editor, launcher_platform): from .tests.material import Material_DynamicFriction as test_module - self._run_test(request, workspace, editor, test_module) + self._run_test(request, workspace, editor, test_module, enable_prefab_system=False) @revert_physics_config def test_Collider_SameCollisionGroupDiffLayersCollide(self, request, workspace, editor, launcher_platform): from .tests.collider import Collider_SameCollisionGroupDiffLayersCollide as test_module - self._run_test(request, workspace, editor, test_module) + self._run_test(request, workspace, editor, test_module, enable_prefab_system=False) @revert_physics_config def test_CharacterController_SwitchLevels(self, request, workspace, editor, launcher_platform): from .tests.character_controller import CharacterController_SwitchLevels as test_module - self._run_test(request, workspace, editor, test_module) + self._run_test(request, workspace, editor, test_module, enable_prefab_system=False) def test_Ragdoll_AddPhysxRagdollComponentWorks(self, request, workspace, editor, launcher_platform): from .tests.ragdoll import Ragdoll_AddPhysxRagdollComponentWorks as test_module - self._run_test(request, workspace, editor, test_module) + self._run_test(request, workspace, editor, test_module, enable_prefab_system=False) @revert_physics_config def test_ScriptCanvas_MultipleRaycastNode(self, request, workspace, editor, launcher_platform): @@ -64,31 +64,43 @@ class TestAutomation(TestAutomationBase): # Fixme: This test previously relied on unexpected lines log reading with is now not supported. # Now the log reading must be done inside the test, preferably with the Tracer() utility # unexpected_lines = ["Assert"] + test_module.Lines.unexpected - self._run_test(request, workspace, editor, test_module) + self._run_test(request, workspace, editor, test_module, enable_prefab_system=False) @revert_physics_config @fm.file_override('physxsystemconfiguration.setreg','Collider_DiffCollisionGroupDiffCollidingLayersNotCollide.setreg_override', 'AutomatedTesting/Registry', search_subdirs=True) def test_Collider_DiffCollisionGroupDiffCollidingLayersNotCollide(self, request, workspace, editor, launcher_platform): from .tests.collider import Collider_DiffCollisionGroupDiffCollidingLayersNotCollide as test_module - self._run_test(request, workspace, editor, test_module) + self._run_test(request, workspace, editor, test_module, enable_prefab_system=False) @revert_physics_config def test_Joints_HingeLeadFollowerCollide(self, request, workspace, editor, launcher_platform): from .tests.joints import Joints_HingeLeadFollowerCollide as test_module - self._run_test(request, workspace, editor, test_module) + self._run_test(request, workspace, editor, test_module, enable_prefab_system=False) @revert_physics_config def test_Collider_PxMeshConvexMeshCollides(self, request, workspace, editor, launcher_platform): from .tests.collider import Collider_PxMeshConvexMeshCollides as test_module - self._run_test(request, workspace, editor, test_module) + self._run_test(request, workspace, editor, test_module, enable_prefab_system=False) @revert_physics_config def test_ShapeCollider_CylinderShapeCollides(self, request, workspace, editor, launcher_platform): from .tests.shape_collider import ShapeCollider_CylinderShapeCollides as test_module - self._run_test(request, workspace, editor, test_module) + self._run_test(request, workspace, editor, test_module, enable_prefab_system=False) @revert_physics_config def test_C15425929_Undo_Redo(self, request, workspace, editor, launcher_platform): from .tests import Physics_UndoRedoWorksOnEntityWithPhysComponents as test_module - self._run_test(request, workspace, editor, test_module) \ No newline at end of file + self._run_test(request, workspace, editor, test_module, enable_prefab_system=False) + + @pytest.mark.GROUP_tick + @pytest.mark.xfail(reason="Test still under development.") + def test_Tick_InterpolatedRigidBodyMotionIsSmooth(self, request, workspace, editor, launcher_platform): + from .tests.tick import Tick_InterpolatedRigidBodyMotionIsSmooth as test_module + self._run_test(request, workspace, editor, test_module, enable_prefab_system=False) + + @pytest.mark.GROUP_tick + @pytest.mark.xfail(reason="Test still under development.") + def test_Tick_CharacterGameplayComponentMotionIsSmooth(self, request, workspace, editor, launcher_platform): + from .tests.tick import Tick_CharacterGameplayComponentMotionIsSmooth as test_module + self._run_test(request, workspace, editor, test_module, enable_prefab_system=False) diff --git a/AutomatedTesting/Gem/PythonTests/Physics/TestSuite_Main_Optimized.py b/AutomatedTesting/Gem/PythonTests/Physics/TestSuite_Main_Optimized.py index 3d668a2085..b25b4340e8 100644 --- a/AutomatedTesting/Gem/PythonTests/Physics/TestSuite_Main_Optimized.py +++ b/AutomatedTesting/Gem/PythonTests/Physics/TestSuite_Main_Optimized.py @@ -59,9 +59,6 @@ class EditorSingleTest_WithFileOverrides(EditorSingleTest): @pytest.mark.parametrize("project", ["AutomatedTesting"]) class TestAutomationWithPrefabSystemEnabled(EditorTestSuite): - global_extra_cmdline_args = ['-BatchMode', '-autotest_mode', - 'extra_cmdline_args=["--regset=/Amazon/Preferences/EnablePrefabSystem=true"]'] - @staticmethod def get_number_parallel_editors(): return 16 @@ -81,6 +78,8 @@ class TestAutomationWithPrefabSystemEnabled(EditorTestSuite): @pytest.mark.parametrize("project", ["AutomatedTesting"]) class TestAutomation(EditorTestSuite): + enable_prefab_system = False + @staticmethod def get_number_parallel_editors(): return 16 diff --git a/AutomatedTesting/Gem/PythonTests/Physics/TestSuite_Periodic.py b/AutomatedTesting/Gem/PythonTests/Physics/TestSuite_Periodic.py index 55e51dd2f8..6daf852708 100755 --- a/AutomatedTesting/Gem/PythonTests/Physics/TestSuite_Periodic.py +++ b/AutomatedTesting/Gem/PythonTests/Physics/TestSuite_Periodic.py @@ -31,223 +31,223 @@ class TestAutomation(TestAutomationBase): @revert_physics_config def test_Terrain_NoPhysTerrainComponentNoCollision(self, request, workspace, editor, launcher_platform): from .tests.terrain import Terrain_NoPhysTerrainComponentNoCollision as test_module - self._run_test(request, workspace, editor, test_module) + self._run_test(request, workspace, editor, test_module, enable_prefab_system=False) @revert_physics_config def test_RigidBody_InitialLinearVelocity(self, request, workspace, editor, launcher_platform): from .tests.rigid_body import RigidBody_InitialLinearVelocity as test_module - self._run_test(request, workspace, editor, test_module) + self._run_test(request, workspace, editor, test_module, enable_prefab_system=False) @revert_physics_config def test_RigidBody_StartGravityEnabledWorks(self, request, workspace, editor, launcher_platform): from .tests.rigid_body import RigidBody_StartGravityEnabledWorks as test_module - self._run_test(request, workspace, editor, test_module) + self._run_test(request, workspace, editor, test_module, enable_prefab_system=False) @revert_physics_config def test_RigidBody_KinematicModeWorks(self, request, workspace, editor, launcher_platform): from .tests.rigid_body import RigidBody_KinematicModeWorks as test_module - self._run_test(request, workspace, editor, test_module) + self._run_test(request, workspace, editor, test_module, enable_prefab_system=False) @revert_physics_config def test_ForceRegion_LinearDampingForceOnRigidBodies(self, request, workspace, editor, launcher_platform): from .tests.force_region import ForceRegion_LinearDampingForceOnRigidBodies as test_module - self._run_test(request, workspace, editor, test_module) + self._run_test(request, workspace, editor, test_module, enable_prefab_system=False) @revert_physics_config def test_ForceRegion_SimpleDragForceOnRigidBodies(self, request, workspace, editor, launcher_platform): from .tests.force_region import ForceRegion_SimpleDragForceOnRigidBodies as test_module - self._run_test(request, workspace, editor, test_module) + self._run_test(request, workspace, editor, test_module, enable_prefab_system=False) @revert_physics_config def test_ForceRegion_CapsuleShapedForce(self, request, workspace, editor, launcher_platform): from .tests.force_region import ForceRegion_CapsuleShapedForce as test_module - self._run_test(request, workspace, editor, test_module) + self._run_test(request, workspace, editor, test_module, enable_prefab_system=False) @revert_physics_config def test_ForceRegion_ImpulsesCapsuleShapedRigidBody(self, request, workspace, editor, launcher_platform): from .tests.force_region import ForceRegion_ImpulsesCapsuleShapedRigidBody as test_module - self._run_test(request, workspace, editor, test_module) + self._run_test(request, workspace, editor, test_module, enable_prefab_system=False) @revert_physics_config def test_RigidBody_MomentOfInertiaManualSetting(self, request, workspace, editor, launcher_platform): from .tests.rigid_body import RigidBody_MomentOfInertiaManualSetting as test_module - self._run_test(request, workspace, editor, test_module) + self._run_test(request, workspace, editor, test_module, enable_prefab_system=False) @revert_physics_config def test_RigidBody_COM_ManualSettingWorks(self, request, workspace, editor, launcher_platform): from .tests.rigid_body import RigidBody_COM_ManualSettingWorks as test_module - self._run_test(request, workspace, editor, test_module) + self._run_test(request, workspace, editor, test_module, enable_prefab_system=False) @revert_physics_config def test_RigidBody_AddRigidBodyComponent(self, request, workspace, editor, launcher_platform): from .tests.rigid_body import RigidBody_AddRigidBodyComponent as test_module - self._run_test(request, workspace, editor, test_module) + self._run_test(request, workspace, editor, test_module, enable_prefab_system=False) @revert_physics_config def test_ForceRegion_SplineForceOnRigidBodies(self, request, workspace, editor, launcher_platform): from .tests.force_region import ForceRegion_SplineForceOnRigidBodies as test_module - self._run_test(request, workspace, editor, test_module) + self._run_test(request, workspace, editor, test_module, enable_prefab_system=False) @revert_physics_config @fm.file_override('physxsystemconfiguration.setreg','Material_RestitutionCombine.setreg_override', 'AutomatedTesting/Registry', search_subdirs=True) def test_Material_RestitutionCombine(self, request, workspace, editor, launcher_platform): from .tests.material import Material_RestitutionCombine as test_module - self._run_test(request, workspace, editor, test_module) + self._run_test(request, workspace, editor, test_module, enable_prefab_system=False) @revert_physics_config @fm.file_override('physxsystemconfiguration.setreg','Material_FrictionCombine.setreg_override', 'AutomatedTesting/Registry', search_subdirs=True) def test_Material_FrictionCombine(self, request, workspace, editor, launcher_platform): from .tests.material import Material_FrictionCombine as test_module - self._run_test(request, workspace, editor, test_module) + self._run_test(request, workspace, editor, test_module, enable_prefab_system=False) @revert_physics_config def test_Collider_ColliderPositionOffset(self, request, workspace, editor, launcher_platform): from .tests.collider import Collider_ColliderPositionOffset as test_module - self._run_test(request, workspace, editor, test_module) + self._run_test(request, workspace, editor, test_module, enable_prefab_system=False) @revert_physics_config def test_RigidBody_AngularDampingAffectsRotation(self, request, workspace, editor, launcher_platform): from .tests.rigid_body import RigidBody_AngularDampingAffectsRotation as test_module - self._run_test(request, workspace, editor, test_module) + self._run_test(request, workspace, editor, test_module, enable_prefab_system=False) @revert_physics_config def test_Physics_VerifyColliderRigidBodyMeshAndTerrainWorkTogether(self, request, workspace, editor, launcher_platform): from .tests import Physics_VerifyColliderRigidBodyMeshAndTerrainWorkTogether as test_module - self._run_test(request, workspace, editor, test_module) + self._run_test(request, workspace, editor, test_module, enable_prefab_system=False) @revert_physics_config def test_ForceRegion_MultipleForcesInSameComponentCombineForces(self, request, workspace, editor, launcher_platform): from .tests.force_region import ForceRegion_MultipleForcesInSameComponentCombineForces as test_module - self._run_test(request, workspace, editor, test_module) + self._run_test(request, workspace, editor, test_module, enable_prefab_system=False) @revert_physics_config def test_ForceRegion_ImpulsesPxMeshShapedRigidBody(self, request, workspace, editor, launcher_platform): from .tests.force_region import ForceRegion_ImpulsesPxMeshShapedRigidBody as test_module - self._run_test(request, workspace, editor, test_module) + self._run_test(request, workspace, editor, test_module, enable_prefab_system=False) @revert_physics_config def test_ScriptCanvas_TriggerEvents(self, request, workspace, editor, launcher_platform): from .tests.script_canvas import ScriptCanvas_TriggerEvents as test_module # FIXME: expected_lines = test_module.LogLines.expected_lines - self._run_test(request, workspace, editor, test_module) + self._run_test(request, workspace, editor, test_module, enable_prefab_system=False) @revert_physics_config def test_ForceRegion_ZeroPointForceDoesNothing(self, request, workspace, editor, launcher_platform): from .tests.force_region import ForceRegion_ZeroPointForceDoesNothing as test_module - self._run_test(request, workspace, editor, test_module) + self._run_test(request, workspace, editor, test_module, enable_prefab_system=False) @revert_physics_config def test_ForceRegion_ZeroWorldSpaceForceDoesNothing(self, request, workspace, editor, launcher_platform): from .tests.force_region import ForceRegion_ZeroWorldSpaceForceDoesNothing as test_module - self._run_test(request, workspace, editor, test_module) + self._run_test(request, workspace, editor, test_module, enable_prefab_system=False) @revert_physics_config def test_ForceRegion_ZeroLinearDampingDoesNothing(self, request, workspace, editor, launcher_platform): from .tests.force_region import ForceRegion_ZeroLinearDampingDoesNothing as test_module - self._run_test(request, workspace, editor, test_module) + self._run_test(request, workspace, editor, test_module, enable_prefab_system=False) @revert_physics_config def test_ForceRegion_MovingForceRegionChangesNetForce(self, request, workspace, editor, launcher_platform): from .tests.force_region import ForceRegion_MovingForceRegionChangesNetForce as test_module - self._run_test(request, workspace, editor, test_module) + self._run_test(request, workspace, editor, test_module, enable_prefab_system=False) @revert_physics_config def test_ScriptCanvas_CollisionEvents(self, request, workspace, editor, launcher_platform): from .tests.script_canvas import ScriptCanvas_CollisionEvents as test_module - self._run_test(request, workspace, editor, test_module) + self._run_test(request, workspace, editor, test_module, enable_prefab_system=False) @revert_physics_config def test_ForceRegion_DirectionHasNoAffectOnTotalForce(self, request, workspace, editor, launcher_platform): from .tests.force_region import ForceRegion_DirectionHasNoAffectOnTotalForce as test_module - self._run_test(request, workspace, editor, test_module) + self._run_test(request, workspace, editor, test_module, enable_prefab_system=False) @revert_physics_config def test_RigidBody_StartAsleepWorks(self, request, workspace, editor, launcher_platform): from .tests.rigid_body import RigidBody_StartAsleepWorks as test_module - self._run_test(request, workspace, editor, test_module) + self._run_test(request, workspace, editor, test_module, enable_prefab_system=False) @revert_physics_config def test_ForceRegion_SliceFileInstantiates(self, request, workspace, editor, launcher_platform): from .tests.force_region import ForceRegion_SliceFileInstantiates as test_module - self._run_test(request, workspace, editor, test_module) + self._run_test(request, workspace, editor, test_module, enable_prefab_system=False) @revert_physics_config def test_ForceRegion_ZeroLocalSpaceForceDoesNothing(self, request, workspace, editor, launcher_platform): from .tests.force_region import ForceRegion_ZeroLocalSpaceForceDoesNothing as test_module - self._run_test(request, workspace, editor, test_module) + self._run_test(request, workspace, editor, test_module, enable_prefab_system=False) @revert_physics_config def test_ForceRegion_ZeroSimpleDragForceDoesNothing(self, request, workspace, editor, launcher_platform): from .tests.force_region import ForceRegion_ZeroSimpleDragForceDoesNothing as test_module - self._run_test(request, workspace, editor, test_module) + self._run_test(request, workspace, editor, test_module, enable_prefab_system=False) @revert_physics_config def test_RigidBody_COM_ComputingWorks(self, request, workspace, editor, launcher_platform): from .tests.rigid_body import RigidBody_COM_ComputingWorks as test_module - self._run_test(request, workspace, editor, test_module) + self._run_test(request, workspace, editor, test_module, enable_prefab_system=False) @revert_physics_config def test_RigidBody_MassDifferentValuesWorks(self, request, workspace, editor, launcher_platform): from .tests.rigid_body import RigidBody_MassDifferentValuesWorks as test_module - self._run_test(request, workspace, editor, test_module) + self._run_test(request, workspace, editor, test_module, enable_prefab_system=False) @revert_physics_config @fm.file_override('physxsystemconfiguration.setreg','Material_RestitutionCombinePriorityOrder.setreg_override', 'AutomatedTesting/Registry', search_subdirs=True) def test_Material_RestitutionCombinePriorityOrder(self, request, workspace, editor, launcher_platform): from .tests.material import Material_RestitutionCombinePriorityOrder as test_module - self._run_test(request, workspace, editor, test_module) + self._run_test(request, workspace, editor, test_module, enable_prefab_system=False) @revert_physics_config def test_ForceRegion_SplineRegionWithModifiedTransform(self, request, workspace, editor, launcher_platform): from .tests.force_region import ForceRegion_SplineRegionWithModifiedTransform as test_module - self._run_test(request, workspace, editor, test_module) + self._run_test(request, workspace, editor, test_module, enable_prefab_system=False) @revert_physics_config def test_ScriptCanvas_ShapeCast(self, request, workspace, editor, launcher_platform): from .tests.script_canvas import ScriptCanvas_ShapeCast as test_module - self._run_test(request, workspace, editor, test_module) + self._run_test(request, workspace, editor, test_module, enable_prefab_system=False) @revert_physics_config def test_RigidBody_InitialAngularVelocity(self, request, workspace, editor, launcher_platform): from .tests.rigid_body import RigidBody_InitialAngularVelocity as test_module - self._run_test(request, workspace, editor, test_module) + self._run_test(request, workspace, editor, test_module, enable_prefab_system=False) @revert_physics_config def test_ForceRegion_ZeroSplineForceDoesNothing(self, request, workspace, editor, launcher_platform): from .tests.force_region import ForceRegion_ZeroSplineForceDoesNothing as test_module - self._run_test(request, workspace, editor, test_module) + self._run_test(request, workspace, editor, test_module, enable_prefab_system=False) @revert_physics_config def test_Physics_DynamicSliceWithPhysNotSpawnsStaticSlice(self, request, workspace, editor, launcher_platform): from .tests import Physics_DynamicSliceWithPhysNotSpawnsStaticSlice as test_module - self._run_test(request, workspace, editor, test_module) + self._run_test(request, workspace, editor, test_module, enable_prefab_system=False) @revert_physics_config def test_ForceRegion_PositionOffset(self, request, workspace, editor, launcher_platform): from .tests.force_region import ForceRegion_PositionOffset as test_module - self._run_test(request, workspace, editor, test_module) + self._run_test(request, workspace, editor, test_module, enable_prefab_system=False) @revert_physics_config @fm.file_override('physxsystemconfiguration.setreg','Material_FrictionCombinePriorityOrder.setreg_override', 'AutomatedTesting/Registry', search_subdirs=True) def test_Material_FrictionCombinePriorityOrder(self, request, workspace, editor, launcher_platform): from .tests.material import Material_FrictionCombinePriorityOrder as test_module - self._run_test(request, workspace, editor, test_module) + self._run_test(request, workspace, editor, test_module, enable_prefab_system=False) @pytest.mark.xfail( reason="Something with the CryRenderer disabling is causing this test to fail now.") @revert_physics_config def test_Ragdoll_LevelSwitchDoesNotCrash(self, request, workspace, editor, launcher_platform): from .tests.ragdoll import Ragdoll_LevelSwitchDoesNotCrash as test_module - self._run_test(request, workspace, editor, test_module) + self._run_test(request, workspace, editor, test_module, enable_prefab_system=False) @revert_physics_config def test_ForceRegion_MultipleComponentsCombineForces(self, request, workspace, editor, launcher_platform): from .tests.force_region import ForceRegion_MultipleComponentsCombineForces as test_module - self._run_test(request, workspace, editor, test_module) + self._run_test(request, workspace, editor, test_module, enable_prefab_system=False) # Marking the test as an expected failure due to sporadic failure on Automated Review: LYN-2580 # The test still runs, but a failure of the test doesn't result in the test run failing @@ -258,102 +258,102 @@ class TestAutomation(TestAutomationBase): 'AutomatedTesting/Registry', search_subdirs=True) def test_Material_PerFaceMaterialGetsCorrectMaterial(self, request, workspace, editor, launcher_platform): from .tests.material import Material_PerFaceMaterialGetsCorrectMaterial as test_module - self._run_test(request, workspace, editor, test_module) + self._run_test(request, workspace, editor, test_module, enable_prefab_system=False) @pytest.mark.xfail( reason="This test will sometimes fail as the ball will continue to roll before the timeout is reached.") @revert_physics_config def test_RigidBody_SleepWhenBelowKineticThreshold(self, request, workspace, editor, launcher_platform): from .tests.rigid_body import RigidBody_SleepWhenBelowKineticThreshold as test_module - self._run_test(request, workspace, editor, test_module) + self._run_test(request, workspace, editor, test_module, enable_prefab_system=False) @revert_physics_config def test_RigidBody_COM_NotIncludesTriggerShapes(self, request, workspace, editor, launcher_platform): from .tests.rigid_body import RigidBody_COM_NotIncludesTriggerShapes as test_module - self._run_test(request, workspace, editor, test_module) + self._run_test(request, workspace, editor, test_module, enable_prefab_system=False) @revert_physics_config def test_Material_NoEffectIfNoColliderShape(self, request, workspace, editor, launcher_platform): from .tests.material import Material_NoEffectIfNoColliderShape as test_module - self._run_test(request, workspace, editor, test_module) + self._run_test(request, workspace, editor, test_module, enable_prefab_system=False) @revert_physics_config def test_Collider_TriggerPassThrough(self, request, workspace, editor, launcher_platform): from .tests.collider import Collider_TriggerPassThrough as test_module - self._run_test(request, workspace, editor, test_module) + self._run_test(request, workspace, editor, test_module, enable_prefab_system=False) @revert_physics_config def test_RigidBody_SetGravityWorks(self, request, workspace, editor, launcher_platform): from .tests.rigid_body import RigidBody_SetGravityWorks as test_module - self._run_test(request, workspace, editor, test_module) + self._run_test(request, workspace, editor, test_module, enable_prefab_system=False) @revert_physics_config @fm.file_override('physxsystemconfiguration.setreg','Material_CharacterController.setreg_override', 'AutomatedTesting/Registry', search_subdirs=True) def test_Material_CharacterController(self, request, workspace, editor, launcher_platform): from .tests.material import Material_CharacterController as test_module - self._run_test(request, workspace, editor, test_module) + self._run_test(request, workspace, editor, test_module, enable_prefab_system=False) @revert_physics_config def test_Material_EmptyLibraryUsesDefault(self, request, workspace, editor, launcher_platform): from .tests.material import Material_EmptyLibraryUsesDefault as test_module - self._run_test(request, workspace, editor, test_module) + self._run_test(request, workspace, editor, test_module, enable_prefab_system=False) @revert_physics_config def test_ForceRegion_NoQuiverOnHighLinearDampingForce(self, request, workspace, editor, launcher_platform): from .tests.force_region import ForceRegion_NoQuiverOnHighLinearDampingForce as test_module - self._run_test(request, workspace, editor, test_module) + self._run_test(request, workspace, editor, test_module, enable_prefab_system=False) @revert_physics_config def test_RigidBody_ComputeInertiaWorks(self, request, workspace, editor, launcher_platform): from .tests.rigid_body import RigidBody_ComputeInertiaWorks as test_module - self._run_test(request, workspace, editor, test_module) + self._run_test(request, workspace, editor, test_module, enable_prefab_system=False) @revert_physics_config def test_ScriptCanvas_PostPhysicsUpdate(self, request, workspace, editor, launcher_platform): from .tests.script_canvas import ScriptCanvas_PostPhysicsUpdate as test_module # Fixme: unexpected_lines = ["Assert"] + test_module.Lines.unexpected - self._run_test(request, workspace, editor, test_module) + self._run_test(request, workspace, editor, test_module, enable_prefab_system=False) @revert_physics_config @fm.file_override('physxsystemconfiguration.setreg','Collider_NoneCollisionGroupSameLayerNotCollide.setreg_override', 'AutomatedTesting/Registry', search_subdirs=True) def test_Collider_NoneCollisionGroupSameLayerNotCollide(self, request, workspace, editor, launcher_platform): from .tests.collider import Collider_NoneCollisionGroupSameLayerNotCollide as test_module - self._run_test(request, workspace, editor, test_module) + self._run_test(request, workspace, editor, test_module, enable_prefab_system=False) @revert_physics_config @fm.file_override('physxsystemconfiguration.setreg','Collider_SameCollisionGroupSameCustomLayerCollide.setreg_override', 'AutomatedTesting/Registry', search_subdirs=True) def test_Collider_SameCollisionGroupSameCustomLayerCollide(self, request, workspace, editor, launcher_platform): from .tests.collider import Collider_SameCollisionGroupSameCustomLayerCollide as test_module - self._run_test(request, workspace, editor, test_module) + self._run_test(request, workspace, editor, test_module, enable_prefab_system=False) @revert_physics_config @fm.file_override('physxdefaultsceneconfiguration.setreg','ScriptCanvas_PostUpdateEvent.setreg_override', 'AutomatedTesting/Registry', search_subdirs=True) def test_ScriptCanvas_PostUpdateEvent(self, request, workspace, editor, launcher_platform): from .tests.script_canvas import ScriptCanvas_PostUpdateEvent as test_module - self._run_test(request, workspace, editor, test_module) + self._run_test(request, workspace, editor, test_module, enable_prefab_system=False) @revert_physics_config @fm.file_override('physxsystemconfiguration.setreg','Material_Restitution.setreg_override', 'AutomatedTesting/Registry', search_subdirs=True) def test_Material_Restitution(self, request, workspace, editor, launcher_platform): from .tests.material import Material_Restitution as test_module - self._run_test(request, workspace, editor, test_module) + self._run_test(request, workspace, editor, test_module, enable_prefab_system=False) @revert_physics_config @fm.file_override('physxdefaultsceneconfiguration.setreg', 'ScriptCanvas_PreUpdateEvent.setreg_override', 'AutomatedTesting/Registry', search_subdirs=True) def test_ScriptCanvas_PreUpdateEvent(self, request, workspace, editor, launcher_platform): from .tests.script_canvas import ScriptCanvas_PreUpdateEvent as test_module - self._run_test(request, workspace, editor, test_module) + self._run_test(request, workspace, editor, test_module, enable_prefab_system=False) @revert_physics_config def test_ForceRegion_PxMeshShapedForce(self, request, workspace, editor, launcher_platform): from .tests.force_region import ForceRegion_PxMeshShapedForce as test_module - self._run_test(request, workspace, editor, test_module) + self._run_test(request, workspace, editor, test_module, enable_prefab_system=False) # Marking the Test as expected to fail using the xfail decorator due to sporadic failure on Automated Review: SPEC-3146 # The test still runs, but a failure of the test doesn't result in the test run failing @@ -361,176 +361,173 @@ class TestAutomation(TestAutomationBase): @revert_physics_config def test_RigidBody_MaxAngularVelocityWorks(self, request, workspace, editor, launcher_platform): from .tests.rigid_body import RigidBody_MaxAngularVelocityWorks as test_module - self._run_test(request, workspace, editor, test_module) + self._run_test(request, workspace, editor, test_module, enable_prefab_system=False) @revert_physics_config def test_Joints_HingeSoftLimitsConstrained(self, request, workspace, editor, launcher_platform): from .tests.joints import Joints_HingeSoftLimitsConstrained as test_module - self._run_test(request, workspace, editor, test_module) + self._run_test(request, workspace, editor, test_module, enable_prefab_system=False) @revert_physics_config def test_Joints_BallSoftLimitsConstrained(self, request, workspace, editor, launcher_platform): from .tests.joints import Joints_BallSoftLimitsConstrained as test_module - self._run_test(request, workspace, editor, test_module) + self._run_test(request, workspace, editor, test_module, enable_prefab_system=False) @revert_physics_config def test_Joints_BallLeadFollowerCollide(self, request, workspace, editor, launcher_platform): from .tests.joints import Joints_BallLeadFollowerCollide as test_module - self._run_test(request, workspace, editor, test_module) + self._run_test(request, workspace, editor, test_module, enable_prefab_system=False) @revert_physics_config @fm.file_override('physxsystemconfiguration.setreg','Collider_AddingNewGroupWorks.setreg_override', 'AutomatedTesting/Registry', search_subdirs=True) def test_Collider_AddingNewGroupWorks(self, request, workspace, editor, launcher_platform): from .tests.collider import Collider_AddingNewGroupWorks as test_module - self._run_test(request, workspace, editor, test_module) + self._run_test(request, workspace, editor, test_module, enable_prefab_system=False) @revert_physics_config def test_ShapeCollider_InactiveWhenNoShapeComponent(self, request, workspace, editor, launcher_platform): from .tests.shape_collider import ShapeCollider_InactiveWhenNoShapeComponent as test_module - self._run_test(request, workspace, editor, test_module) + self._run_test(request, workspace, editor, test_module, enable_prefab_system=False) @revert_physics_config def test_Collider_CheckDefaultShapeSettingIsPxMesh(self, request, workspace, editor, launcher_platform): from .tests.collider import Collider_CheckDefaultShapeSettingIsPxMesh as test_module - self._run_test(request, workspace, editor, test_module) + self._run_test(request, workspace, editor, test_module, enable_prefab_system=False) @revert_physics_config def test_ShapeCollider_LargeNumberOfShapeCollidersWontCrashEditor(self, request, workspace, editor, launcher_platform): from .tests.shape_collider import ShapeCollider_LargeNumberOfShapeCollidersWontCrashEditor as test_module - self._run_test(request, workspace, editor, test_module) + self._run_test(request, workspace, editor, test_module, enable_prefab_system=False) @revert_physics_config def test_Collider_SphereShapeEditing(self, request, workspace, editor, launcher_platform): from .tests.collider import Collider_SphereShapeEditing as test_module - self._run_test(request, workspace, editor, test_module, - extra_cmdline_args=["--regset=/Amazon/Preferences/EnablePrefabSystem=true"]) + self._run_test(request, workspace, editor, test_module) @revert_physics_config def test_Collider_BoxShapeEditing(self, request, workspace, editor, launcher_platform): from .tests.collider import Collider_BoxShapeEditing as test_module - self._run_test(request, workspace, editor, test_module, - extra_cmdline_args=["--regset=/Amazon/Preferences/EnablePrefabSystem=true"]) + self._run_test(request, workspace, editor, test_module) @revert_physics_config def test_Collider_CapsuleShapeEditing(self, request, workspace, editor, launcher_platform): from .tests.collider import Collider_CapsuleShapeEditing as test_module - self._run_test(request, workspace, editor, test_module, - extra_cmdline_args=["--regset=/Amazon/Preferences/EnablePrefabSystem=true"]) + self._run_test(request, workspace, editor, test_module) def test_ForceRegion_WithNonTriggerColliderWarning(self, request, workspace, editor, launcher_platform): from .tests.force_region import ForceRegion_WithNonTriggerColliderWarning as test_module # Fixme: expected_lines = ["[Warning] (PhysX Force Region) - Please ensure collider component marked as trigger exists in entity"] - self._run_test(request, workspace, editor, test_module) + self._run_test(request, workspace, editor, test_module, enable_prefab_system=False) def test_ForceRegion_WorldSpaceForceOnRigidBodies(self, request, workspace, editor, launcher_platform): from .tests.force_region import ForceRegion_WorldSpaceForceOnRigidBodies as test_module - self._run_test(request, workspace, editor, test_module) + self._run_test(request, workspace, editor, test_module, enable_prefab_system=False) def test_ForceRegion_PointForceOnRigidBodies(self, request, workspace, editor, launcher_platform): from .tests.force_region import ForceRegion_PointForceOnRigidBodies as test_module - self._run_test(request, workspace, editor, test_module) + self._run_test(request, workspace, editor, test_module, enable_prefab_system=False) def test_ForceRegion_SphereShapedForce(self, request, workspace, editor, launcher_platform): from .tests.force_region import ForceRegion_SphereShapedForce as test_module - self._run_test(request, workspace, editor, test_module) + self._run_test(request, workspace, editor, test_module, enable_prefab_system=False) def test_ForceRegion_RotationalOffset(self, request, workspace, editor, launcher_platform): from .tests.force_region import ForceRegion_RotationalOffset as test_module - self._run_test(request, workspace, editor, test_module) + self._run_test(request, workspace, editor, test_module, enable_prefab_system=False) def test_Material_LibraryClearingAssignsDefault(self, request, workspace, editor, launcher_platform): from .tests.material import Material_LibraryClearingAssignsDefault as test_module - self._run_test(request, workspace, editor, test_module) + self._run_test(request, workspace, editor, test_module, enable_prefab_system=False) def test_Collider_AddColliderComponent(self, request, workspace, editor, launcher_platform): from .tests.collider import Collider_AddColliderComponent as test_module - self._run_test(request, workspace, editor, test_module) + self._run_test(request, workspace, editor, test_module, enable_prefab_system=False) @pytest.mark.xfail( reason="This will fail due to this issue ATOM-15487.") def test_Collider_PxMeshAutoAssignedWhenModifyingRenderMeshComponent(self, request, workspace, editor, launcher_platform): from .tests.collider import Collider_PxMeshAutoAssignedWhenModifyingRenderMeshComponent as test_module - self._run_test(request, workspace, editor, test_module) + self._run_test(request, workspace, editor, test_module, enable_prefab_system=False) def test_Collider_PxMeshAutoAssignedWhenAddingRenderMeshComponent(self, request, workspace, editor, launcher_platform): from .tests.collider import Collider_PxMeshAutoAssignedWhenAddingRenderMeshComponent as test_module - self._run_test(request, workspace, editor, test_module) + self._run_test(request, workspace, editor, test_module, enable_prefab_system=False) def test_Collider_MultipleSurfaceSlots(self, request, workspace, editor, launcher_platform): from .tests.collider import Collider_MultipleSurfaceSlots as test_module - self._run_test(request, workspace, editor, test_module) + self._run_test(request, workspace, editor, test_module, enable_prefab_system=False) def test_Collider_PxMeshNotAutoAssignedWhenNoPhysicsFbx(self, request, workspace, editor, launcher_platform): from .tests.collider import Collider_PxMeshNotAutoAssignedWhenNoPhysicsFbx as test_module - self._run_test(request, workspace, editor, test_module) + self._run_test(request, workspace, editor, test_module, enable_prefab_system=False) def test_RigidBody_EnablingGravityWorksPoC(self, request, workspace, editor, launcher_platform): from .tests.rigid_body import RigidBody_EnablingGravityWorksPoC as test_module - self._run_test(request, workspace, editor, test_module) + self._run_test(request, workspace, editor, test_module, enable_prefab_system=False) @revert_physics_config @fm.file_override('physxsystemconfiguration.setreg','Collider_CollisionGroupsWorkflow.setreg_override', 'AutomatedTesting/Registry', search_subdirs=True) def test_Collider_CollisionGroupsWorkflow(self, request, workspace, editor, launcher_platform): from .tests.collider import Collider_CollisionGroupsWorkflow as test_module - self._run_test(request, workspace, editor, test_module) + self._run_test(request, workspace, editor, test_module, enable_prefab_system=False) @revert_physics_config def test_Collider_ColliderRotationOffset(self, request, workspace, editor, launcher_platform): from .tests.collider import Collider_ColliderRotationOffset as test_module - self._run_test(request, workspace, editor, test_module) + self._run_test(request, workspace, editor, test_module, enable_prefab_system=False) @revert_physics_config def test_ForceRegion_ParentChildForcesCombineForces(self, request, workspace, editor, launcher_platform): from .tests.force_region import ForceRegion_ParentChildForcesCombineForces as test_module - self._run_test(request, workspace, editor, test_module) + self._run_test(request, workspace, editor, test_module, enable_prefab_system=False) @revert_physics_config def test_ShapeCollider_CanBeAddedWitNoWarnings(self, request, workspace, editor, launcher_platform): from .tests.shape_collider import ShapeCollider_CanBeAddedWitNoWarnings as test_module - self._run_test(request, workspace, editor, test_module) + self._run_test(request, workspace, editor, test_module, enable_prefab_system=False) @revert_physics_config def test_Physics_UndoRedoWorksOnEntityWithPhysComponents(self, request, workspace, editor, launcher_platform): from .tests import Physics_UndoRedoWorksOnEntityWithPhysComponents as test_module - self._run_test(request, workspace, editor, test_module) + self._run_test(request, workspace, editor, test_module, enable_prefab_system=False) def test_Joints_Fixed2BodiesConstrained(self, request, workspace, editor, launcher_platform): from .tests.joints import Joints_Fixed2BodiesConstrained as test_module - self._run_test(request, workspace, editor, test_module) + self._run_test(request, workspace, editor, test_module, enable_prefab_system=False) def test_Joints_Hinge2BodiesConstrained(self, request, workspace, editor, launcher_platform): from .tests.joints import Joints_Hinge2BodiesConstrained as test_module - self._run_test(request, workspace, editor, test_module) + self._run_test(request, workspace, editor, test_module, enable_prefab_system=False) def test_Joints_Ball2BodiesConstrained(self, request, workspace, editor, launcher_platform): from .tests.joints import Joints_Ball2BodiesConstrained as test_module - self._run_test(request, workspace, editor, test_module) + self._run_test(request, workspace, editor, test_module, enable_prefab_system=False) def test_Joints_FixedBreakable(self, request, workspace, editor, launcher_platform): from .tests.joints import Joints_FixedBreakable as test_module - self._run_test(request, workspace, editor, test_module) + self._run_test(request, workspace, editor, test_module, enable_prefab_system=False) def test_Joints_HingeBreakable(self, request, workspace, editor, launcher_platform): from .tests.joints import Joints_HingeBreakable as test_module - self._run_test(request, workspace, editor, test_module) + self._run_test(request, workspace, editor, test_module, enable_prefab_system=False) def test_Joints_BallBreakable(self, request, workspace, editor, launcher_platform): from .tests.joints import Joints_BallBreakable as test_module - self._run_test(request, workspace, editor, test_module) + self._run_test(request, workspace, editor, test_module, enable_prefab_system=False) def test_Joints_HingeNoLimitsConstrained(self, request, workspace, editor, launcher_platform): from .tests.joints import Joints_HingeNoLimitsConstrained as test_module - self._run_test(request, workspace, editor, test_module) + self._run_test(request, workspace, editor, test_module, enable_prefab_system=False) def test_Joints_BallNoLimitsConstrained(self, request, workspace, editor, launcher_platform): from .tests.joints import Joints_BallNoLimitsConstrained as test_module - self._run_test(request, workspace, editor, test_module) + self._run_test(request, workspace, editor, test_module, enable_prefab_system=False) def test_Joints_GlobalFrameConstrained(self, request, workspace, editor, launcher_platform): from .tests.joints import Joints_GlobalFrameConstrained as test_module - self._run_test(request, workspace, editor, test_module) + self._run_test(request, workspace, editor, test_module, enable_prefab_system=False) @revert_physics_config def test_Material_DefaultLibraryUpdatedAcrossLevels(self, request, workspace, editor, launcher_platform): @@ -540,7 +537,7 @@ class TestAutomation(TestAutomationBase): search_subdirs=True) def levels_before(self, request, workspace, editor, launcher_platform): from .tests.material import Material_DefaultLibraryUpdatedAcrossLevels_before as test_module_0 - self._run_test(request, workspace, editor, test_module_0) + self._run_test(request, workspace, editor, test_module_0, enable_prefab_system=False) # File override replaces the previous physxconfiguration file with another where the only difference is the default material library @fm.file_override("physxsystemconfiguration.setreg", @@ -549,7 +546,7 @@ class TestAutomation(TestAutomationBase): search_subdirs=True) def levels_after(self, request, workspace, editor, launcher_platform): from .tests.material import Material_DefaultLibraryUpdatedAcrossLevels_after as test_module_1 - self._run_test(request, workspace, editor, test_module_1) + self._run_test(request, workspace, editor, test_module_1, enable_prefab_system=False) levels_before(self, request, workspace, editor, launcher_platform) levels_after(self, request, workspace, editor, launcher_platform) \ No newline at end of file diff --git a/AutomatedTesting/Gem/PythonTests/Physics/TestSuite_Sandbox.py b/AutomatedTesting/Gem/PythonTests/Physics/TestSuite_Sandbox.py index 81fdc747d5..9b104ccfcf 100644 --- a/AutomatedTesting/Gem/PythonTests/Physics/TestSuite_Sandbox.py +++ b/AutomatedTesting/Gem/PythonTests/Physics/TestSuite_Sandbox.py @@ -32,7 +32,7 @@ class TestAutomation(TestAutomationBase): def test_ScriptCanvas_GetCollisionNameReturnsName(self, request, workspace, editor, launcher_platform): from .tests.script_canvas import ScriptCanvas_GetCollisionNameReturnsName as test_module # Fixme: expected_lines=["Layer Name: Right"] - self._run_test(request, workspace, editor, test_module) + self._run_test(request, workspace, editor, test_module, enable_prefab_system=False) ## Seems to be flaky, need to investigate def test_ScriptCanvas_GetCollisionNameReturnsNothingWhenHasToggledLayer(self, request, workspace, editor, launcher_platform): @@ -42,4 +42,4 @@ class TestAutomation(TestAutomationBase): # Fixme: for group in collision_groups: # Fixme: unexpected_lines.append(f"GroupName: {group}") # Fixme: expected_lines=["GroupName: "] - self._run_test(request, workspace, editor, test_module) + self._run_test(request, workspace, editor, test_module, enable_prefab_system=False) diff --git a/AutomatedTesting/Gem/PythonTests/Physics/TestSuite_Utils.py b/AutomatedTesting/Gem/PythonTests/Physics/TestSuite_Utils.py index 61c2816f50..3e00b684c0 100755 --- a/AutomatedTesting/Gem/PythonTests/Physics/TestSuite_Utils.py +++ b/AutomatedTesting/Gem/PythonTests/Physics/TestSuite_Utils.py @@ -30,11 +30,11 @@ class TestUtils(TestAutomationBase): expected_lines = [] unexpected_lines = ["Assert"] - self._run_test(request, workspace, editor, physmaterial_editor_test_module, expected_lines, unexpected_lines) + self._run_test(request, workspace, editor, physmaterial_editor_test_module, expected_lines, unexpected_lines, enable_prefab_system=False) def test_UtilTest_Tracer_PicksErrorsAndWarnings(self, request, workspace, launcher_platform, editor): from .utils import UtilTest_Tracer_PicksErrorsAndWarnings as testcase_module - self._run_test(request, workspace, editor, testcase_module, [], []) + self._run_test(request, workspace, editor, testcase_module, [], [], enable_prefab_system=False) def test_FileManagement_FindingFiles(self, workspace, launcher_platform): """ @@ -263,4 +263,4 @@ class TestUtils(TestAutomationBase): expected_lines = [] unexpected_lines = ["Assert"] - self._run_test(request, workspace, editor, test_module, expected_lines, unexpected_lines) + self._run_test(request, workspace, editor, test_module, expected_lines, unexpected_lines, enable_prefab_system=False) diff --git a/AutomatedTesting/Gem/PythonTests/Physics/tests/tick/Tick_CharacterGameplayComponentMotionIsSmooth.py b/AutomatedTesting/Gem/PythonTests/Physics/tests/tick/Tick_CharacterGameplayComponentMotionIsSmooth.py new file mode 100644 index 0000000000..fe718d7247 --- /dev/null +++ b/AutomatedTesting/Gem/PythonTests/Physics/tests/tick/Tick_CharacterGameplayComponentMotionIsSmooth.py @@ -0,0 +1,99 @@ +""" +Copyright (c) Contributors to the Open 3D Engine Project. +For complete copyright and license terms please see the LICENSE at the root of this distribution. + +SPDX-License-Identifier: Apache-2.0 OR MIT + +Test Case Title : Verify that an entity with a character gameplay component moves smoothly. +""" + + +# fmt: off +class Tests(): + create_entity = ("Created test entity", "Failed to create test entity") + character_controller_added = ("Added PhysX Character Controller component", "Failed to add PhysX Character Controller component") + character_gameplay_added = ("Added PhysX Character Gameplay component", "Failed to add PhysX Character Gameplay component") + enter_game_mode = ("Entered game mode", "Failed to enter game mode") + exit_game_mode = ("Exited game mode", "Failed to exit game mode") + character_motion_smooth = ("Character motion passed smoothness threshold", "Failed to meet smoothness threshold for character motion") +# fmt: on + + +def Tick_CharacterGameplayComponentMotionIsSmooth(): + """ + Summary: + Create entity with PhysX Character Controller and PhysX Character Gameplay components. + Verify that the motion of the character controller under gravity is smooth. + + Expected Behavior: + 1) The motion of the character controller under gravity is a smooth curve, rather than an erratic/jittery movement. + + Test Steps: + 1) Load the empty level + 2) Create an entity + 3) Add a PhysX Character Controller Component and PhysX Character Gameplay component + 4) Enter game mode and collect data for the character controller's z co-ordinate and the time values for a series of frames + 5) Check if the motion of the character controller was sufficiently smooth + + :return: None + """ + # imports + import os + import azlmbr.legacy.general as general + import azlmbr.math as math + from editor_python_test_tools.editor_entity_utils import EditorEntity as Entity + from editor_python_test_tools.utils import Report + from editor_python_test_tools.utils import TestHelper as helper + from editor_python_test_tools.asset_utils import Asset + import numpy as np + + # constants + COEFFICIENT_OF_DETERMINATION_THRESHOLD = 1 - 1e-4 # curves with values below this are not considered sufficiently smooth + + helper.init_idle() + # 1) Load the empty level + helper.open_level("", "Base") + + # 2) Create an entity + test_entity = Entity.create_editor_entity("test_entity") + Report.result(Tests.create_entity, test_entity.id.IsValid()) + + azlmbr.components.TransformBus( + azlmbr.bus.Event, "SetWorldTranslation", test_entity.id, math.Vector3(0.0, 0.0, 0.0)) + + # 3) Add character controller and character gameplay components + character_controller_component = test_entity.add_component("PhysX Character Controller") + Report.result(Tests.character_controller_added, test_entity.has_component("PhysX Character Controller")) + character_gameplay_component = test_entity.add_component("PhysX Character Gameplay") + Report.result(Tests.character_gameplay_added, test_entity.has_component("PhysX Character Gameplay")) + + # 4) Enter game mode and collect data for the rigid body's z co-ordinate and the time values for a series of frames + t = [] + z = [] + helper.enter_game_mode(Tests.enter_game_mode) + general.idle_wait_frames(1) + game_entity_id = general.find_game_entity("test_entity") + for frame in range(100): + t.append(azlmbr.components.TickRequestBus(azlmbr.bus.Broadcast, "GetTimeAtCurrentTick").GetSeconds()) + z.append(azlmbr.components.TransformBus(azlmbr.bus.Event, "GetWorldZ", game_entity_id)) + general.idle_wait_frames(1) + helper.exit_game_mode(Tests.exit_game_mode) + + # 5) Test that the z vs t curve is sufficiently smooth (if the interpolation is not working well, the curve will be less smooth) + # normalize the t and z data + t = np.array(t) - np.mean(t) + z = np.array(z) - np.mean(z) + # fit a polynomial to the z vs t curve + fit = np.poly1d(np.polyfit(t, z, 4)) + residual = fit(t) - z + # calculate the coefficient of determination (a measure of how closely the polynomial curve fits the data) + # if the coefficient is very close to 1, then the curve fits the data very well, suggesting that the rigid body motion is smooth + # if the coefficient is significantly less than 1, then the z values vary more erratically relative to the smooth curve, + # indicating that the motion of the rigid body is not smooth + coefficient_of_determination = (1 - np.sum(residual * residual) / np.sum(z * z)) + Report.result(Tests.character_motion_smooth, bool(coefficient_of_determination > COEFFICIENT_OF_DETERMINATION_THRESHOLD)) + + +if __name__ == "__main__": + from editor_python_test_tools.utils import Report + Report.start_test(Tick_CharacterGameplayComponentMotionIsSmooth) diff --git a/AutomatedTesting/Gem/PythonTests/Physics/tests/tick/Tick_InterpolatedRigidBodyMotionIsSmooth.py b/AutomatedTesting/Gem/PythonTests/Physics/tests/tick/Tick_InterpolatedRigidBodyMotionIsSmooth.py new file mode 100644 index 0000000000..19e79355d9 --- /dev/null +++ b/AutomatedTesting/Gem/PythonTests/Physics/tests/tick/Tick_InterpolatedRigidBodyMotionIsSmooth.py @@ -0,0 +1,98 @@ +""" +Copyright (c) Contributors to the Open 3D Engine Project. +For complete copyright and license terms please see the LICENSE at the root of this distribution. + +SPDX-License-Identifier: Apache-2.0 OR MIT + +Test Case Title : Verify that a rigid body with "Interpolate motion" option selected moves smoothly. +""" + + +# fmt: off +class Tests(): + create_entity = ("Created test entity", "Failed to create test entity") + rigid_body_added = ("Added PhysX Rigid Body component", "Failed to add PhysX Rigid Body component") + enter_game_mode = ("Entered game mode", "Failed to enter game mode") + exit_game_mode = ("Exited game mode", "Failed to exit game mode") + rigid_body_smooth = ("Rigid body motion passed smoothness threshold", "Failed to meet smoothness threshold for rigid body motion") +# fmt: on + + +def Tick_InterpolatedRigidBodyMotionIsSmooth(): + """ + Summary: + Create entity with PhysX Rigid Body component and turn on the Interpolate motion setting. + Verify that the position of the rigid body varies smoothly with time. + + Expected Behavior: + 1) The motion of the rigid body under gravity is a smooth curve, rather than an erratic/jittery movement. + + Test Steps: + 1) Load the empty level + 2) Create an entity + 3) Add rigid body component + 4) Enter game mode and collect data for the rigid body's z co-ordinate and the time values for a series of frames + 5) Check if the motion of the rigid body was sufficiently smooth + + :return: None + """ + # imports + import os + import azlmbr.legacy.general as general + import azlmbr.math as math + from editor_python_test_tools.editor_entity_utils import EditorEntity as Entity + from editor_python_test_tools.utils import Report + from editor_python_test_tools.utils import TestHelper as helper + from editor_python_test_tools.asset_utils import Asset + import numpy as np + + # constants + COEFFICIENT_OF_DETERMINATION_THRESHOLD = 1 - 1e-4 # curves with values below this are not considered sufficiently smooth + + helper.init_idle() + # 1) Load the empty level + helper.open_level("", "Base") + + # 2) Create an entity + test_entity = Entity.create_editor_entity("test_entity") + Report.result(Tests.create_entity, test_entity.id.IsValid()) + + azlmbr.components.TransformBus( + azlmbr.bus.Event, "SetWorldTranslation", test_entity.id, math.Vector3(0.0, 0.0, 0.0)) + + # 3) Add rigid body component + rigid_body_component = test_entity.add_component("PhysX Rigid Body") + rigid_body_component.set_component_property_value("Configuration|Interpolate motion", True) + azlmbr.physics.RigidBodyRequestBus(azlmbr.bus.Event, "SetLinearDamping", test_entity.id, 0.0) + Report.result(Tests.rigid_body_added, test_entity.has_component("PhysX Rigid Body")) + + # 4) Enter game mode and collect data for the rigid body's z co-ordinate and the time values for a series of frames + t = [] + z = [] + helper.enter_game_mode(Tests.enter_game_mode) + general.idle_wait_frames(1) + game_entity_id = general.find_game_entity("test_entity") + for frame in range(100): + t.append(azlmbr.components.TickRequestBus(azlmbr.bus.Broadcast, "GetTimeAtCurrentTick").GetSeconds()) + z.append(azlmbr.components.TransformBus(azlmbr.bus.Event, "GetWorldZ", game_entity_id)) + general.idle_wait_frames(1) + helper.exit_game_mode(Tests.exit_game_mode) + + # 5) Test that the z vs t curve is sufficiently smooth (if the interpolation is not working well, the curve will be less smooth) + # normalize the t and z data + t = np.array(t) - np.mean(t) + z = np.array(z) - np.mean(z) + # fit a polynomial to the z vs t curve + fit = np.poly1d(np.polyfit(t, z, 4)) + residual = fit(t) - z + # calculate the coefficient of determination (a measure of how closely the polynomial curve fits the data) + # if the coefficient is very close to 1, then the curve fits the data very well, suggesting that the rigid body motion is smooth + # if the coefficient is significantly less than 1, then the z values vary more erratically relative to the smooth curve, + # indicating that the motion of the rigid body is not smooth + coefficient_of_determination = (1 - np.sum(residual * residual) / np.sum(z * z)) + Report.result(Tests.rigid_body_smooth, bool(coefficient_of_determination > COEFFICIENT_OF_DETERMINATION_THRESHOLD)) + + +if __name__ == "__main__": + from editor_python_test_tools.utils import Report + Report.start_test(Tick_InterpolatedRigidBodyMotionIsSmooth) diff --git a/AutomatedTesting/Gem/PythonTests/Physics/utils/FileManagement.py b/AutomatedTesting/Gem/PythonTests/Physics/utils/FileManagement.py index 22a41de4ea..03287d0542 100644 --- a/AutomatedTesting/Gem/PythonTests/Physics/utils/FileManagement.py +++ b/AutomatedTesting/Gem/PythonTests/Physics/utils/FileManagement.py @@ -98,38 +98,32 @@ class FileManagement: """ file_map = FileManagement._load_file_map() backup_path = FileManagement.backup_folder_path - backup_file_name = "{}.bak".format(file_name) - backup_file = os.path.join(backup_path, backup_file_name) # If backup directory DNE, make one if not os.path.exists(backup_path): os.mkdir(backup_path) - # If "traditional" backup file exists, delete it (myFile.txt.bak) - if os.path.exists(backup_file): - fs.delete([backup_file], True, False) - # Find my next storage name (myFile_1.txt.bak) - backup_storage_file_name = FileManagement._next_available_name(backup_file_name, file_map) - if backup_storage_file_name is None: + + # Find my next storage name (myFile_1.txt) + backup_file_name = FileManagement._next_available_name(file_name, file_map) + if backup_file_name is None: # If _next_available_name returns None, we have backed up MAX_BACKUPS of files name [file_name] raise Exception( "FileManagement class ran out of backups per name. Max: {}".format(FileManagement.MAX_BACKUPS) ) - backup_storage_file = os.path.join(backup_path, backup_storage_file_name) + + # If this backup file already exists, delete it. + backup_storage_file = "{}.bak".format(os.path.normpath(os.path.join(backup_path, backup_file_name))) if os.path.exists(backup_storage_file): - # This file should not exists, but if it does it's about to get clobbered! - fs.unlock_file(backup_storage_file) - # Create "traditional" backup file (myFile.txt.bak) - fs.create_backup(os.path.join(file_path, file_name), backup_path) - # Copy "traditional" backup file into storage backup (myFile_1.txt.bak) - FileManagement._copy_file(backup_file_name, backup_path, backup_storage_file_name, backup_path) - fs.lock_file(backup_storage_file) - # Delete "traditional" back up file - fs.unlock_file(backup_file) - fs.delete([backup_file], True, False) + fs.delete([backup_storage_file], True, False) + + # Create backup file (myFile_1.txt.bak) + original_file = os.path.normpath(os.path.join(file_path, file_name)) + fs.create_backup(original_file, backup_path, backup_file_name) + # Update file map with new file - file_map[os.path.join(file_path, file_name)] = backup_storage_file_name + file_map[original_file] = backup_file_name FileManagement._save_file_map(file_map) # Unlock original file to get it ready to be edited by the test - fs.unlock_file(os.path.join(file_path, file_name)) + fs.unlock_file(original_file) @staticmethod def _restore_file(file_name, file_path): @@ -143,20 +137,15 @@ class FileManagement: """ file_map = FileManagement._load_file_map() backup_path = FileManagement.backup_folder_path - src_file = os.path.join(file_path, file_name) + src_file = os.path.normpath(os.path.join(file_path, file_name)) if src_file in file_map: - backup_file = os.path.join(backup_path, file_map[src_file]) - if os.path.exists(backup_file): - fs.unlock_file(backup_file) - fs.unlock_file(src_file) - # Make temporary copy of backed up file to restore from - temp_file = "{}.bak".format(file_name) - FileManagement._copy_file(file_map[src_file], backup_path, temp_file, backup_path) - fs.restore_backup(src_file, backup_path) - fs.lock_file(src_file) - # Delete backup file - fs.delete([os.path.join(backup_path, temp_file)], True, False) + backup_file_name = file_map[src_file] + backup_file = "{}.bak".format(os.path.join(backup_path, backup_file_name)) + + fs.unlock_file(src_file) + if fs.restore_backup(src_file, backup_path, backup_file_name): fs.delete([backup_file], True, False) + # Remove from file map del file_map[src_file] FileManagement._save_file_map(file_map) @@ -218,6 +207,7 @@ class FileManagement: src_file_path = os.path.join(src_path, src_file) if os.path.exists(target_file_path): fs.unlock_file(target_file_path) + os.makedirs(target_path, exist_ok=True) shutil.copyfile(src_file_path, target_file_path) @staticmethod diff --git a/AutomatedTesting/Gem/PythonTests/Prefab/CMakeLists.txt b/AutomatedTesting/Gem/PythonTests/Prefab/CMakeLists.txt index 48c24d1ebf..629db72dc7 100644 --- a/AutomatedTesting/Gem/PythonTests/Prefab/CMakeLists.txt +++ b/AutomatedTesting/Gem/PythonTests/Prefab/CMakeLists.txt @@ -12,7 +12,7 @@ if(PAL_TRAIT_BUILD_TESTS_SUPPORTED AND PAL_TRAIT_BUILD_HOST_TOOLS) NAME AutomatedTesting::PrefabTests TEST_SUITE main TEST_SERIAL - PATH ${CMAKE_CURRENT_LIST_DIR}/TestSuite_Main.py + PATH ${CMAKE_CURRENT_LIST_DIR}/TestSuite_Main_Optimized.py RUNTIME_DEPENDENCIES Legacy::Editor AZ::AssetProcessor diff --git a/AutomatedTesting/Gem/PythonTests/Prefab/TestSuite_Main.py b/AutomatedTesting/Gem/PythonTests/Prefab/TestSuite_Main.py index 479915752f..6e1f94d358 100644 --- a/AutomatedTesting/Gem/PythonTests/Prefab/TestSuite_Main.py +++ b/AutomatedTesting/Gem/PythonTests/Prefab/TestSuite_Main.py @@ -12,7 +12,6 @@ import pytest import os import sys -from ly_test_tools import LAUNCHERS sys.path.append(os.path.dirname(os.path.abspath(__file__)) + '/../automatedtesting_shared') from base import TestAutomationBase @@ -24,42 +23,49 @@ class TestAutomation(TestAutomationBase): def _run_prefab_test(self, request, workspace, editor, test_module, batch_mode=True, autotest_mode=True): self._run_test(request, workspace, editor, test_module, - extra_cmdline_args=["--regset=/Amazon/Preferences/EnablePrefabSystem=true"], batch_mode=batch_mode, autotest_mode=autotest_mode) - def test_PrefabLevel_OpensLevelWithEntities(self, request, workspace, editor, launcher_platform): - from .tests import PrefabLevel_OpensLevelWithEntities as test_module + def test_OpenLevel_ContainingTwoEntities(self, request, workspace, editor, launcher_platform): + from Prefab.tests.open_level import OpenLevel_ContainingTwoEntities as test_module self._run_prefab_test(request, workspace, editor, test_module) - def test_PrefabBasicWorkflow_CreatePrefab(self, request, workspace, editor, launcher_platform): - from .tests import PrefabBasicWorkflow_CreatePrefab as test_module + def test_CreatePrefab_WithSingleEntity(self, request, workspace, editor, launcher_platform): + from Prefab.tests.create_prefab import CreatePrefab_WithSingleEntity as test_module self._run_prefab_test(request, workspace, editor, test_module) - def test_PrefabBasicWorkflow_InstantiatePrefab(self, request, workspace, editor, launcher_platform): - from .tests import PrefabBasicWorkflow_InstantiatePrefab as test_module + def test_InstantiatePrefab_ContainingASingleEntity(self, request, workspace, editor, launcher_platform): + from Prefab.tests.instantiate_prefab import InstantiatePrefab_ContainingASingleEntity as test_module self._run_prefab_test(request, workspace, editor, test_module) - def test_PrefabBasicWorkflow_CreateAndDeletePrefab(self, request, workspace, editor, launcher_platform): - from .tests import PrefabBasicWorkflow_CreateAndDeletePrefab as test_module + def test_DeletePrefab_ContainingASingleEntity(self, request, workspace, editor, launcher_platform): + from Prefab.tests.delete_prefab import DeletePrefab_ContainingASingleEntity as test_module self._run_prefab_test(request, workspace, editor, test_module) - def test_PrefabBasicWorkflow_CreateAndReparentPrefab(self, request, workspace, editor, launcher_platform): - from .tests import PrefabBasicWorkflow_CreateAndReparentPrefab as test_module + def test_ReparentPrefab_UnderAnotherPrefab(self, request, workspace, editor, launcher_platform): + from Prefab.tests.reparent_prefab import ReparentPrefab_UnderAnotherPrefab as test_module self._run_prefab_test(request, workspace, editor, test_module, autotest_mode=False) - def test_PrefabBasicWorkflow_CreateReparentAndDetachPrefab(self, request, workspace, editor, launcher_platform): - from .tests import PrefabBasicWorkflow_CreateReparentAndDetachPrefab as test_module + def test_DetachPrefab_UnderAnotherPrefab(self, request, workspace, editor, launcher_platform): + from Prefab.tests.detach_prefab import DetachPrefab_UnderAnotherPrefab as test_module self._run_prefab_test(request, workspace, editor, test_module, autotest_mode=False) - def test_PrefabBasicWorkflow_CreateAndDuplicatePrefab(self, request, workspace, editor, launcher_platform): - from .tests import PrefabBasicWorkflow_CreateAndDuplicatePrefab as test_module + def test_DuplicatePrefab_ContainingASingleEntity(self, request, workspace, editor, launcher_platform): + from Prefab.tests.duplicate_prefab import DuplicatePrefab_ContainingASingleEntity as test_module self._run_prefab_test(request, workspace, editor, test_module) - def test_PrefabComplexWorflow_CreatePrefabOfChildEntity(self, request, workspace, editor, launcher_platform): - from .tests import PrefabComplexWorflow_CreatePrefabOfChildEntity as test_module + def test_CreatePrefab_UnderAnEntity(self, request, workspace, editor, launcher_platform): + from Prefab.tests.create_prefab import CreatePrefab_UnderAnEntity as test_module self._run_prefab_test(request, workspace, editor, test_module, autotest_mode=False) - def test_PrefabComplexWorflow_CreatePrefabInsidePrefab(self, request, workspace, editor, launcher_platform): - from .tests import PrefabComplexWorflow_CreatePrefabInsidePrefab as test_module + def test_CreatePrefab_UnderAnotherPrefab(self, request, workspace, editor, launcher_platform): + from Prefab.tests.create_prefab import CreatePrefab_UnderAnotherPrefab as test_module + self._run_prefab_test(request, workspace, editor, test_module, autotest_mode=False) + + def test_DeleteEntity_UnderAnotherPrefab(self, request, workspace, editor, launcher_platform): + from Prefab.tests.delete_entity import DeleteEntity_UnderAnotherPrefab as test_module + self._run_prefab_test(request, workspace, editor, test_module, autotest_mode=False) + + def test_DeleteEntity_UnderLevelPrefab(self, request, workspace, editor, launcher_platform): + from Prefab.tests.delete_entity import DeleteEntity_UnderLevelPrefab as test_module self._run_prefab_test(request, workspace, editor, test_module, autotest_mode=False) diff --git a/AutomatedTesting/Gem/PythonTests/Prefab/TestSuite_Main_Optimized.py b/AutomatedTesting/Gem/PythonTests/Prefab/TestSuite_Main_Optimized.py new file mode 100644 index 0000000000..bf67b2c661 --- /dev/null +++ b/AutomatedTesting/Gem/PythonTests/Prefab/TestSuite_Main_Optimized.py @@ -0,0 +1,52 @@ +""" +Copyright (c) Contributors to the Open 3D Engine Project. +For complete copyright and license terms please see the LICENSE at the root of this distribution. + +SPDX-License-Identifier: Apache-2.0 OR MIT +""" + +import pytest + +from ly_test_tools.o3de.editor_test import EditorSingleTest, EditorSharedTest, EditorParallelTest, EditorTestSuite + + +@pytest.mark.SUITE_main +@pytest.mark.parametrize("launcher_platform", ['windows_editor']) +@pytest.mark.parametrize("project", ["AutomatedTesting"]) +class TestAutomationNoAutoTestMode(EditorTestSuite): + + # Enable only -BatchMode for these tests. Some tests cannot run in -autotest_mode due to UI interactions + global_extra_cmdline_args = ["-BatchMode"] + + class test_CreatePrefab_UnderAnEntity(EditorSharedTest): + from .tests.create_prefab import CreatePrefab_UnderAnEntity as test_module + + class test_CreatePrefab_UnderAnotherPrefab(EditorSharedTest): + from .tests.create_prefab import CreatePrefab_UnderAnotherPrefab as test_module + + class test_DeleteEntity_UnderAnotherPrefab(EditorSharedTest): + from .tests.delete_entity import DeleteEntity_UnderAnotherPrefab as test_module + + class test_DeleteEntity_UnderLevelPrefab(EditorSharedTest): + from .tests.delete_entity import DeleteEntity_UnderLevelPrefab as test_module + + class test_ReparentPrefab_UnderAnotherPrefab(EditorSharedTest): + from .tests.reparent_prefab import ReparentPrefab_UnderAnotherPrefab as test_module + + class test_DetachPrefab_UnderAnotherPrefab(EditorSharedTest): + from .tests.detach_prefab import DetachPrefab_UnderAnotherPrefab as test_module + + class test_OpenLevel_ContainingTwoEntities(EditorSharedTest): + from .tests.open_level import OpenLevel_ContainingTwoEntities as test_module + + class test_CreatePrefab_WithSingleEntity(EditorSharedTest): + from .tests.create_prefab import CreatePrefab_WithSingleEntity as test_module + + class test_InstantiatePrefab_ContainingASingleEntity(EditorSharedTest): + from .tests.instantiate_prefab import InstantiatePrefab_ContainingASingleEntity as test_module + + class test_DeletePrefab_ContainingASingleEntity(EditorSharedTest): + from .tests.delete_prefab import DeletePrefab_ContainingASingleEntity as test_module + + class test_DuplicatePrefab_ContainingASingleEntity(EditorSharedTest): + from .tests.duplicate_prefab import DuplicatePrefab_ContainingASingleEntity as test_module \ No newline at end of file diff --git a/AutomatedTesting/Gem/PythonTests/Prefab/tests/PrefabBasicWorkflow_CreateAndDeletePrefab.py b/AutomatedTesting/Gem/PythonTests/Prefab/tests/PrefabBasicWorkflow_CreateAndDeletePrefab.py deleted file mode 100644 index bbebd70e04..0000000000 --- a/AutomatedTesting/Gem/PythonTests/Prefab/tests/PrefabBasicWorkflow_CreateAndDeletePrefab.py +++ /dev/null @@ -1,32 +0,0 @@ -""" -Copyright (c) Contributors to the Open 3D Engine Project. -For complete copyright and license terms please see the LICENSE at the root of this distribution. - -SPDX-License-Identifier: Apache-2.0 OR MIT -""" - -def PrefabBasicWorkflow_CreateAndDeletePrefab(): - - CAR_PREFAB_FILE_NAME = 'car_prefab' - - from editor_python_test_tools.editor_entity_utils import EditorEntity - from editor_python_test_tools.prefab_utils import Prefab - - import PrefabTestUtils as prefab_test_utils - - prefab_test_utils.open_base_tests_level() - - # Creates a new entity at the root level - car_entity = EditorEntity.create_editor_entity() - car_prefab_entities = [car_entity] - - # Creates a prefab from the new entity - _, car = Prefab.create_prefab( - car_prefab_entities, CAR_PREFAB_FILE_NAME) - - # Deletes the prefab instance - Prefab.remove_prefabs([car]) - -if __name__ == "__main__": - from editor_python_test_tools.utils import Report - Report.start_test(PrefabBasicWorkflow_CreateAndDeletePrefab) diff --git a/AutomatedTesting/Gem/PythonTests/Prefab/tests/PrefabBasicWorkflow_CreateAndDuplicatePrefab.py b/AutomatedTesting/Gem/PythonTests/Prefab/tests/PrefabBasicWorkflow_CreateAndDuplicatePrefab.py deleted file mode 100644 index 2479ae549e..0000000000 --- a/AutomatedTesting/Gem/PythonTests/Prefab/tests/PrefabBasicWorkflow_CreateAndDuplicatePrefab.py +++ /dev/null @@ -1,32 +0,0 @@ -""" -Copyright (c) Contributors to the Open 3D Engine Project. -For complete copyright and license terms please see the LICENSE at the root of this distribution. - -SPDX-License-Identifier: Apache-2.0 OR MIT -""" - -def PrefabBasicWorkflow_CreateAndDuplicatePrefab(): - - CAR_PREFAB_FILE_NAME = 'car_prefab' - - from editor_python_test_tools.editor_entity_utils import EditorEntity - from editor_python_test_tools.prefab_utils import Prefab - - import PrefabTestUtils as prefab_test_utils - - prefab_test_utils.open_base_tests_level() - - # Creates a new entity at the root level - car_entity = EditorEntity.create_editor_entity() - car_prefab_entities = [car_entity] - - # Creates a prefab from the new entity - _, car = Prefab.create_prefab( - car_prefab_entities, CAR_PREFAB_FILE_NAME) - - # Duplicates the prefab instance - Prefab.duplicate_prefabs([car]) - -if __name__ == "__main__": - from editor_python_test_tools.utils import Report - Report.start_test(PrefabBasicWorkflow_CreateAndDuplicatePrefab) diff --git a/AutomatedTesting/Gem/PythonTests/Prefab/tests/PrefabBasicWorkflow_CreateAndReparentPrefab.py b/AutomatedTesting/Gem/PythonTests/Prefab/tests/PrefabBasicWorkflow_CreateAndReparentPrefab.py deleted file mode 100644 index 1cbc591c29..0000000000 --- a/AutomatedTesting/Gem/PythonTests/Prefab/tests/PrefabBasicWorkflow_CreateAndReparentPrefab.py +++ /dev/null @@ -1,48 +0,0 @@ -""" -Copyright (c) Contributors to the Open 3D Engine Project. -For complete copyright and license terms please see the LICENSE at the root of this distribution. - -SPDX-License-Identifier: Apache-2.0 OR MIT -""" - -def PrefabBasicWorkflow_CreateAndReparentPrefab(): - - CAR_PREFAB_FILE_NAME = 'car_prefab' - WHEEL_PREFAB_FILE_NAME = 'wheel_prefab' - - import editor_python_test_tools.pyside_utils as pyside_utils - - @pyside_utils.wrap_async - async def run_test(): - - from editor_python_test_tools.editor_entity_utils import EditorEntity - from editor_python_test_tools.prefab_utils import Prefab - - import PrefabTestUtils as prefab_test_utils - - prefab_test_utils.open_base_tests_level() - - # Creates a new car entity at the root level - car_entity = EditorEntity.create_editor_entity() - car_prefab_entities = [car_entity] - - # Creates a prefab from the car entity - _, car = Prefab.create_prefab( - car_prefab_entities, CAR_PREFAB_FILE_NAME) - - # Creates another new wheel entity at the root level - wheel_entity = EditorEntity.create_editor_entity() - wheel_prefab_entities = [wheel_entity] - - # Creates another prefab from the wheel entity - _, wheel = Prefab.create_prefab( - wheel_prefab_entities, WHEEL_PREFAB_FILE_NAME) - - # Reparents the wheel prefab instance to the container entity of the car prefab instance - await wheel.ui_reparent_prefab_instance(car.container_entity.id) - - run_test() - -if __name__ == "__main__": - from editor_python_test_tools.utils import Report - Report.start_test(PrefabBasicWorkflow_CreateAndReparentPrefab) diff --git a/AutomatedTesting/Gem/PythonTests/Prefab/tests/PrefabBasicWorkflow_CreatePrefab.py b/AutomatedTesting/Gem/PythonTests/Prefab/tests/PrefabBasicWorkflow_CreatePrefab.py deleted file mode 100644 index cae105a9a9..0000000000 --- a/AutomatedTesting/Gem/PythonTests/Prefab/tests/PrefabBasicWorkflow_CreatePrefab.py +++ /dev/null @@ -1,29 +0,0 @@ -""" -Copyright (c) Contributors to the Open 3D Engine Project. -For complete copyright and license terms please see the LICENSE at the root of this distribution. - -SPDX-License-Identifier: Apache-2.0 OR MIT -""" - -def PrefabBasicWorkflow_CreatePrefab(): - - CAR_PREFAB_FILE_NAME = 'car_prefab' - - from editor_python_test_tools.editor_entity_utils import EditorEntity - from editor_python_test_tools.utils import Report - from editor_python_test_tools.prefab_utils import Prefab - - import PrefabTestUtils as prefab_test_utils - - prefab_test_utils.open_base_tests_level() - - # Creates a new entity at the root level - car_entity = EditorEntity.create_editor_entity() - car_prefab_entities = [car_entity] - - # Creates a prefab from the new entity - Prefab.create_prefab(car_prefab_entities, CAR_PREFAB_FILE_NAME) - -if __name__ == "__main__": - from editor_python_test_tools.utils import Report - Report.start_test(PrefabBasicWorkflow_CreatePrefab) diff --git a/AutomatedTesting/Gem/PythonTests/Prefab/tests/PrefabBasicWorkflow_CreateReparentAndDetachPrefab.py b/AutomatedTesting/Gem/PythonTests/Prefab/tests/PrefabBasicWorkflow_CreateReparentAndDetachPrefab.py deleted file mode 100644 index bdf77c4bf3..0000000000 --- a/AutomatedTesting/Gem/PythonTests/Prefab/tests/PrefabBasicWorkflow_CreateReparentAndDetachPrefab.py +++ /dev/null @@ -1,51 +0,0 @@ -""" -Copyright (c) Contributors to the Open 3D Engine Project. -For complete copyright and license terms please see the LICENSE at the root of this distribution. - -SPDX-License-Identifier: Apache-2.0 OR MIT -""" - -def PrefabBasicWorkflow_CreateReparentAndDetachPrefab(): - - CAR_PREFAB_FILE_NAME = 'car_prefab' - WHEEL_PREFAB_FILE_NAME = 'wheel_prefab' - - import editor_python_test_tools.pyside_utils as pyside_utils - - @pyside_utils.wrap_async - async def run_test(): - - from editor_python_test_tools.editor_entity_utils import EditorEntity - from editor_python_test_tools.prefab_utils import Prefab - - import PrefabTestUtils as prefab_test_utils - - prefab_test_utils.open_base_tests_level() - - # Creates a new car entity at the root level - car_entity = EditorEntity.create_editor_entity() - car_prefab_entities = [car_entity] - - # Creates a prefab from the car entity - _, car = Prefab.create_prefab( - car_prefab_entities, CAR_PREFAB_FILE_NAME) - - # Creates another new wheel entity at the root level - wheel_entity = EditorEntity.create_editor_entity() - wheel_prefab_entities = [wheel_entity] - - # Creates another prefab from the wheel entity - _, wheel = Prefab.create_prefab( - wheel_prefab_entities, WHEEL_PREFAB_FILE_NAME) - - # Reparents the wheel prefab instance to the container entity of the car prefab instance - await wheel.ui_reparent_prefab_instance(car.container_entity.id) - - # Detaches the wheel prefab instance - Prefab.detach_prefab(wheel) - - run_test() - -if __name__ == "__main__": - from editor_python_test_tools.utils import Report - Report.start_test(PrefabBasicWorkflow_CreateReparentAndDetachPrefab) diff --git a/AutomatedTesting/Gem/PythonTests/Prefab/tests/PrefabBasicWorkflow_InstantiatePrefab.py b/AutomatedTesting/Gem/PythonTests/Prefab/tests/PrefabBasicWorkflow_InstantiatePrefab.py deleted file mode 100644 index a701802cd4..0000000000 --- a/AutomatedTesting/Gem/PythonTests/Prefab/tests/PrefabBasicWorkflow_InstantiatePrefab.py +++ /dev/null @@ -1,33 +0,0 @@ -""" -Copyright (c) Contributors to the Open 3D Engine Project. -For complete copyright and license terms please see the LICENSE at the root of this distribution. - -SPDX-License-Identifier: Apache-2.0 OR MIT -""" - -def PrefabBasicWorkflow_InstantiatePrefab(): - - from azlmbr.math import Vector3 - - EXISTING_TEST_PREFAB_FILE_NAME = "Gem/PythonTests/Prefab/data/Test.prefab" - INSTANTIATED_TEST_PREFAB_POSITION = Vector3(10.00, 20.0, 30.0) - EXPECTED_TEST_PREFAB_CHILDREN_COUNT = 1 - - from editor_python_test_tools.prefab_utils import Prefab - - import PrefabTestUtils as prefab_test_utils - - prefab_test_utils.open_base_tests_level() - - # Instantiates a new car prefab instance - test_prefab = Prefab.get_prefab(EXISTING_TEST_PREFAB_FILE_NAME) - test_instance = test_prefab.instantiate( - prefab_position=INSTANTIATED_TEST_PREFAB_POSITION) - - prefab_test_utils.check_entity_children_count( - test_instance.container_entity.id, - EXPECTED_TEST_PREFAB_CHILDREN_COUNT) - -if __name__ == "__main__": - from editor_python_test_tools.utils import Report - Report.start_test(PrefabBasicWorkflow_InstantiatePrefab) diff --git a/AutomatedTesting/Gem/PythonTests/Prefab/tests/PrefabComplexWorflow_CreatePrefabInsidePrefab.py b/AutomatedTesting/Gem/PythonTests/Prefab/tests/PrefabComplexWorflow_CreatePrefabInsidePrefab.py deleted file mode 100644 index e14fc96449..0000000000 --- a/AutomatedTesting/Gem/PythonTests/Prefab/tests/PrefabComplexWorflow_CreatePrefabInsidePrefab.py +++ /dev/null @@ -1,57 +0,0 @@ -""" -Copyright (c) Contributors to the Open 3D Engine Project. -For complete copyright and license terms please see the LICENSE at the root of this distribution. - -SPDX-License-Identifier: Apache-2.0 OR MIT -""" - -def PrefabComplexWorflow_CreatePrefabInsidePrefab(): - """ - Test description: - - Creates an entity with a physx collider - - Creates a prefab "Outer_prefab" and an instance based of that entity - - Creates a prefab "Inner_prefab" inside "Outer_prefab" based the entity contained inside of it - Checks that the entity is correctly handlded by the prefab system checking the name and that it contains the physx collider - """ - - from editor_python_test_tools.editor_entity_utils import EditorEntity - from editor_python_test_tools.prefab_utils import Prefab - - import PrefabTestUtils as prefab_test_utils - - prefab_test_utils.open_base_tests_level() - - # Creates a new Entity at the root level - # Asserts if creation didn't succeed - entity = EditorEntity.create_editor_entity_at((100.0, 100.0, 100.0), name = "TestEntity") - assert entity.id.IsValid(), "Couldn't create entity" - entity.add_component("PhysX Collider") - assert entity.has_component("PhysX Collider"), "Attempted to add a PhysX Collider but no physx collider collider was found afterwards" - - # Create a prefab based on that entity - outer_prefab, outer_instance = Prefab.create_prefab([entity], "Outer_prefab") - # The test should be now inside the outer prefab instance. - entity = outer_instance.get_direct_child_entities()[0] - # We track if that is the same entity by checking the name and if it still contains the component that we created before - assert entity.get_name() == "TestEntity", f"Entity name inside outer_prefab doesn't match the original name, original:'TestEntity' current:'{entity.get_name()}'" - assert entity.has_component("PhysX Collider"), "Entity name inside outer_prefab doesn't have the collider component it should" - - # Now, create another prefab, based on the entity that is inside outer_prefab - inner_prefab, inner_instance = Prefab.create_prefab([entity], "Inner_prefab") - # The test entity should now be inside the inner prefab instance - entity = inner_instance.get_direct_child_entities()[0] - # We track if that is the same entity by checking the name and if it still contains the component that we created before - assert entity.get_name() == "TestEntity", f"Entity name inside inner_prefab doesn't match the original name, original:'TestEntity' current:'{entity.get_name()}'" - assert entity.has_component("PhysX Collider"), "Entity name inside inner_prefab doesn't have the collider component it should" - - # Verify hierarchy of entities: - # Outer_prefab - # |- Inner_prefab - # | |- TestEntity - assert entity.get_parent_id() == inner_instance.container_entity.id - assert inner_instance.container_entity.get_parent_id() == outer_instance.container_entity.id - - -if __name__ == "__main__": - from editor_python_test_tools.utils import Report - Report.start_test(PrefabComplexWorflow_CreatePrefabInsidePrefab) diff --git a/AutomatedTesting/Gem/PythonTests/Prefab/tests/PrefabComplexWorflow_CreatePrefabOfChildEntity.py b/AutomatedTesting/Gem/PythonTests/Prefab/tests/PrefabComplexWorflow_CreatePrefabOfChildEntity.py deleted file mode 100644 index dec44d52be..0000000000 --- a/AutomatedTesting/Gem/PythonTests/Prefab/tests/PrefabComplexWorflow_CreatePrefabOfChildEntity.py +++ /dev/null @@ -1,52 +0,0 @@ -""" -Copyright (c) Contributors to the Open 3D Engine Project. -For complete copyright and license terms please see the LICENSE at the root of this distribution. - -SPDX-License-Identifier: Apache-2.0 OR MIT -""" - -def PrefabComplexWorflow_CreatePrefabOfChildEntity(): - """ - Test description: - - Creates two entities, parent and child. Child entity has Parent entity as its parent. - - Creates a prefab of the child entity. - Test is successful if the new instanced prefab of the child has the parent entity id - """ - - CAR_PREFAB_FILE_NAME = 'car_prefab' - - from editor_python_test_tools.editor_entity_utils import EditorEntity - from editor_python_test_tools.prefab_utils import Prefab - - import PrefabTestUtils as prefab_test_utils - - prefab_test_utils.open_base_tests_level() - - # Creates a new Entity at the root level - # Asserts if creation didn't succeed - parent_entity = EditorEntity.create_editor_entity_at((100.0, 100.0, 100.0)) - assert parent_entity.id.IsValid(), "Couldn't create parent entity" - - child_entity = EditorEntity.create_editor_entity(parent_id=parent_entity.id) - assert child_entity.id.IsValid(), "Couldn't create child entity" - assert child_entity.get_world_translation().IsClose(parent_entity.get_world_translation()), f"Child entity position{child_entity.get_world_translation().ToString()}" \ - f" is not located at the same position as the parent{parent_entity.get_world_translation().ToString()}" - - # Asserts if prefab creation doesn't succeed - child_prefab, child_instance = Prefab.create_prefab([child_entity], CAR_PREFAB_FILE_NAME) - child_entity_on_child_instance = child_instance.get_direct_child_entities()[0] - assert child_instance.container_entity.get_parent_id().IsValid(), "Newly instanced entity has no parent" - assert child_instance.container_entity.get_parent_id() == parent_entity.id, "Newly instanced entity parent does not match the expected parent" - assert child_instance.container_entity.get_world_translation().IsClose(parent_entity.get_world_translation()), "Newly instanced entity position is not located at the same position as the parent" - # Move the parent position, it should update the child position - parent_entity.set_world_translation((200.0, 200.0, 200.0)) - child_instance_translation = child_instance.container_entity.get_world_translation() - assert child_instance_translation.IsClose(azlmbr.math.Vector3(200.0, 200.0, 200.0)), f"Instance position position{child_instance_translation.ToString()} didn't get updated" \ - f" to the same position as the parent{parent_entity.get_world_translation().ToString()}" - child_translation = child_entity_on_child_instance.get_world_translation() - assert child_translation.IsClose(azlmbr.math.Vector3(200.0, 200.0, 200.0)), f"Entity position{child_translation.ToString()} of the instance didn't get updated" \ - f" to the same position as the parent{parent_entity.get_world_translation().ToString()}" - -if __name__ == "__main__": - from editor_python_test_tools.utils import Report - Report.start_test(PrefabComplexWorflow_CreatePrefabOfChildEntity) diff --git a/AutomatedTesting/Gem/PythonTests/Prefab/tests/PrefabLevel_OpensLevelWithEntities.py b/AutomatedTesting/Gem/PythonTests/Prefab/tests/PrefabLevel_OpensLevelWithEntities.py deleted file mode 100644 index 0eb7e86a9e..0000000000 --- a/AutomatedTesting/Gem/PythonTests/Prefab/tests/PrefabLevel_OpensLevelWithEntities.py +++ /dev/null @@ -1,73 +0,0 @@ -""" -Copyright (c) Contributors to the Open 3D Engine Project. -For complete copyright and license terms please see the LICENSE at the root of this distribution. - -SPDX-License-Identifier: Apache-2.0 OR MIT -""" - -# fmt:off -class Tests(): - find_empty_entity = ("Entity: 'EmptyEntity' found", "Entity: 'EmptyEntity' *not* found in level") - empty_entity_pos = ("'EmptyEntity' position is at the expected position", "'EmptyEntity' position is *not* at the expected position") - find_pxentity = ("Entity: 'EntityWithPxCollider' found", "Entity: 'EntityWithPxCollider' *not* found in level") - pxentity_component = ("Entity: 'EntityWithPxCollider' has a Physx Collider", "Entity: 'EntityWithPxCollider' does *not* have a Physx Collider") - -# fmt:on - -def PrefabLevel_OpensLevelWithEntities(): - """ - Opens the level that contains 2 entities, "EmptyEntity" and "EntityWithPxCollider". - This test makes sure that both entities exist after opening the level and that: - - EmptyEntity is at Position: (10, 20, 30) - - EntityWithPxCollider has a PhysXCollider component - """ - - import os - import sys - - from editor_python_test_tools.utils import Report - from editor_python_test_tools.utils import TestHelper as helper - - import editor_python_test_tools.hydra_editor_utils as hydra - - import azlmbr.entity as entity - import azlmbr.bus as bus - from azlmbr.math import Vector3 - - EXPECTED_EMPTY_ENTITY_POS = Vector3(10.00, 20.0, 30.0) - - helper.init_idle() - helper.open_level("Prefab", "PrefabLevel_OpensLevelWithEntities") - - def find_entity(entity_name): - searchFilter = entity.SearchFilter() - searchFilter.names = [entity_name] - entityIds = entity.SearchBus(bus.Broadcast, 'SearchEntities', searchFilter) - if entityIds[0].IsValid(): - return entityIds[0] - return None - - # Checks for an entity called "EmptyEntity" - helper.wait_for_condition(lambda: find_entity("EmptyEntity").IsValid(), 5.0) - empty_entity_id = find_entity("EmptyEntity") - Report.result(Tests.find_empty_entity, empty_entity_id.IsValid()) - - # Checks if the EmptyEntity is in the correct position and if it fails, it will provide the expected postion and the actual postion of the entity in the Editor log - empty_entity_pos = azlmbr.components.TransformBus(azlmbr.bus.Event, "GetWorldTranslation", empty_entity_id) - is_at_position = empty_entity_pos.IsClose(EXPECTED_EMPTY_ENTITY_POS) - Report.result(Tests.empty_entity_pos, is_at_position) - if not is_at_position: - Report.info(f'Expected position: {EXPECTED_EMPTY_ENTITY_POS.ToString()}, actual position: {empty_entity_pos.ToString()}') - - # Checks for an entity called "EntityWithPxCollider" and if it has the PhysX Collider component - pxentity = find_entity("EntityWithPxCollider") - Report.result(Tests.find_pxentity, pxentity.IsValid()) - - pxcollider_id = hydra.get_component_type_id("PhysX Collider") - hasComponent = azlmbr.editor.EditorComponentAPIBus(azlmbr.bus.Broadcast, 'HasComponentOfType', pxentity, pxcollider_id) - Report.result(Tests.pxentity_component, hasComponent) - -if __name__ == "__main__": - - from editor_python_test_tools.utils import Report - Report.start_test(PrefabLevel_OpensLevelWithEntities) diff --git a/AutomatedTesting/Gem/PythonTests/Prefab/tests/create_prefab/CreatePrefab_UnderAnEntity.py b/AutomatedTesting/Gem/PythonTests/Prefab/tests/create_prefab/CreatePrefab_UnderAnEntity.py new file mode 100644 index 0000000000..5033c1da9c --- /dev/null +++ b/AutomatedTesting/Gem/PythonTests/Prefab/tests/create_prefab/CreatePrefab_UnderAnEntity.py @@ -0,0 +1,52 @@ +""" +Copyright (c) Contributors to the Open 3D Engine Project. +For complete copyright and license terms please see the LICENSE at the root of this distribution. + +SPDX-License-Identifier: Apache-2.0 OR MIT +""" + +def CreatePrefab_UnderAnEntity(): + """ + Test description: + - Creates two entities, parent and child. Child entity has Parent entity as its parent. + - Creates a prefab of the child entity. + Test is successful if the new instanced prefab of the child has the parent entity id + """ + + CAR_PREFAB_FILE_NAME = 'car_prefab' + + from editor_python_test_tools.editor_entity_utils import EditorEntity + from editor_python_test_tools.prefab_utils import Prefab + + import Prefab.tests.PrefabTestUtils as prefab_test_utils + + prefab_test_utils.open_base_tests_level() + + # Creates a new Entity at the root level + # Asserts if creation didn't succeed + parent_entity = EditorEntity.create_editor_entity_at((100.0, 100.0, 100.0)) + assert parent_entity.id.IsValid(), "Couldn't create parent entity" + + child_entity = EditorEntity.create_editor_entity(parent_id=parent_entity.id) + assert child_entity.id.IsValid(), "Couldn't create child entity" + assert child_entity.get_world_translation().IsClose(parent_entity.get_world_translation()), f"Child entity position{child_entity.get_world_translation().ToString()}" \ + f" is not located at the same position as the parent{parent_entity.get_world_translation().ToString()}" + + # Asserts if prefab creation doesn't succeed + child_prefab, child_instance = Prefab.create_prefab([child_entity], CAR_PREFAB_FILE_NAME) + child_entity_on_child_instance = child_instance.get_direct_child_entities()[0] + assert child_instance.container_entity.get_parent_id().IsValid(), "Newly instanced entity has no parent" + assert child_instance.container_entity.get_parent_id() == parent_entity.id, "Newly instanced entity parent does not match the expected parent" + assert child_instance.container_entity.get_world_translation().IsClose(parent_entity.get_world_translation()), "Newly instanced entity position is not located at the same position as the parent" + # Move the parent position, it should update the child position + parent_entity.set_world_translation((200.0, 200.0, 200.0)) + child_instance_translation = child_instance.container_entity.get_world_translation() + assert child_instance_translation.IsClose(azlmbr.math.Vector3(200.0, 200.0, 200.0)), f"Instance position position{child_instance_translation.ToString()} didn't get updated" \ + f" to the same position as the parent{parent_entity.get_world_translation().ToString()}" + child_translation = child_entity_on_child_instance.get_world_translation() + assert child_translation.IsClose(azlmbr.math.Vector3(200.0, 200.0, 200.0)), f"Entity position{child_translation.ToString()} of the instance didn't get updated" \ + f" to the same position as the parent{parent_entity.get_world_translation().ToString()}" + +if __name__ == "__main__": + from editor_python_test_tools.utils import Report + Report.start_test(CreatePrefab_UnderAnEntity) diff --git a/AutomatedTesting/Gem/PythonTests/Prefab/tests/create_prefab/CreatePrefab_UnderAnotherPrefab.py b/AutomatedTesting/Gem/PythonTests/Prefab/tests/create_prefab/CreatePrefab_UnderAnotherPrefab.py new file mode 100644 index 0000000000..429da49434 --- /dev/null +++ b/AutomatedTesting/Gem/PythonTests/Prefab/tests/create_prefab/CreatePrefab_UnderAnotherPrefab.py @@ -0,0 +1,57 @@ +""" +Copyright (c) Contributors to the Open 3D Engine Project. +For complete copyright and license terms please see the LICENSE at the root of this distribution. + +SPDX-License-Identifier: Apache-2.0 OR MIT +""" + +def CreatePrefab_UnderAnotherPrefab(): + """ + Test description: + - Creates an entity with a physx collider + - Creates a prefab "Outer_prefab" and an instance based of that entity + - Creates a prefab "Inner_prefab" inside "Outer_prefab" based the entity contained inside of it + Checks that the entity is correctly handlded by the prefab system checking the name and that it contains the physx collider + """ + + from editor_python_test_tools.editor_entity_utils import EditorEntity + from editor_python_test_tools.prefab_utils import Prefab + + import Prefab.tests.PrefabTestUtils as prefab_test_utils + + prefab_test_utils.open_base_tests_level() + + # Creates a new Entity at the root level + # Asserts if creation didn't succeed + entity = EditorEntity.create_editor_entity_at((100.0, 100.0, 100.0), name = "TestEntity") + assert entity.id.IsValid(), "Couldn't create entity" + entity.add_component("PhysX Collider") + assert entity.has_component("PhysX Collider"), "Attempted to add a PhysX Collider but no physx collider collider was found afterwards" + + # Create a prefab based on that entity + outer_prefab, outer_instance = Prefab.create_prefab([entity], "Outer_prefab") + # The test should be now inside the outer prefab instance. + entity = outer_instance.get_direct_child_entities()[0] + # We track if that is the same entity by checking the name and if it still contains the component that we created before + assert entity.get_name() == "TestEntity", f"Entity name inside outer_prefab doesn't match the original name, original:'TestEntity' current:'{entity.get_name()}'" + assert entity.has_component("PhysX Collider"), "Entity name inside outer_prefab doesn't have the collider component it should" + + # Now, create another prefab, based on the entity that is inside outer_prefab + inner_prefab, inner_instance = Prefab.create_prefab([entity], "Inner_prefab") + # The test entity should now be inside the inner prefab instance + entity = inner_instance.get_direct_child_entities()[0] + # We track if that is the same entity by checking the name and if it still contains the component that we created before + assert entity.get_name() == "TestEntity", f"Entity name inside inner_prefab doesn't match the original name, original:'TestEntity' current:'{entity.get_name()}'" + assert entity.has_component("PhysX Collider"), "Entity name inside inner_prefab doesn't have the collider component it should" + + # Verify hierarchy of entities: + # Outer_prefab + # |- Inner_prefab + # | |- TestEntity + assert entity.get_parent_id() == inner_instance.container_entity.id + assert inner_instance.container_entity.get_parent_id() == outer_instance.container_entity.id + + +if __name__ == "__main__": + from editor_python_test_tools.utils import Report + Report.start_test(CreatePrefab_UnderAnotherPrefab) diff --git a/AutomatedTesting/Gem/PythonTests/Prefab/tests/create_prefab/CreatePrefab_WithSingleEntity.py b/AutomatedTesting/Gem/PythonTests/Prefab/tests/create_prefab/CreatePrefab_WithSingleEntity.py new file mode 100644 index 0000000000..eb8a262a69 --- /dev/null +++ b/AutomatedTesting/Gem/PythonTests/Prefab/tests/create_prefab/CreatePrefab_WithSingleEntity.py @@ -0,0 +1,30 @@ +""" +Copyright (c) Contributors to the Open 3D Engine Project. +For complete copyright and license terms please see the LICENSE at the root of this distribution. + +SPDX-License-Identifier: Apache-2.0 OR MIT +""" + +def CreatePrefab_WithSingleEntity(): + + CAR_PREFAB_FILE_NAME = 'car_prefab' + + from editor_python_test_tools.editor_entity_utils import EditorEntity + from editor_python_test_tools.utils import Report + from editor_python_test_tools.prefab_utils import Prefab + + import Prefab.tests.PrefabTestUtils as prefab_test_utils + + prefab_test_utils.open_base_tests_level() + + # Creates a new entity at the root level + car_entity = EditorEntity.create_editor_entity() + car_prefab_entities = [car_entity] + + # Creates a prefab from the new entity + Prefab.create_prefab(car_prefab_entities, CAR_PREFAB_FILE_NAME) + + +if __name__ == "__main__": + from editor_python_test_tools.utils import Report + Report.start_test(CreatePrefab_WithSingleEntity) diff --git a/AutomatedTesting/Gem/PythonTests/Prefab/tests/delete_entity/DeleteEntity_UnderAnotherPrefab.py b/AutomatedTesting/Gem/PythonTests/Prefab/tests/delete_entity/DeleteEntity_UnderAnotherPrefab.py new file mode 100644 index 0000000000..deaaaedf30 --- /dev/null +++ b/AutomatedTesting/Gem/PythonTests/Prefab/tests/delete_entity/DeleteEntity_UnderAnotherPrefab.py @@ -0,0 +1,52 @@ +""" +Copyright (c) Contributors to the Open 3D Engine Project. +For complete copyright and license terms please see the LICENSE at the root of this distribution. + +SPDX-License-Identifier: Apache-2.0 OR MIT +""" + +def DeleteEntity_UnderAnotherPrefab(): + """ + Test description: + - Creates an entity. + - Creates a prefab out of the above entity. + - Focuses on the created prefab and destroys the entity within. + Checks that the entity is correctly destroyed. + """ + + from editor_python_test_tools.editor_entity_utils import EditorEntity + from editor_python_test_tools.prefab_utils import Prefab + + import Prefab.tests.PrefabTestUtils as prefab_test_utils + + prefab_test_utils.open_base_tests_level() + + PREFAB_FILE_NAME = 'some_prefab' + + # Creates a new entity at the root level + entity = EditorEntity.create_editor_entity() + assert entity.id.IsValid(), "Couldn't create entity." + + # Asserts if prefab creation doesn't succeed + child_prefab, child_instance = Prefab.create_prefab([entity], PREFAB_FILE_NAME) + child_entity_ids_inside_prefab = child_instance.get_direct_child_entities() + assert len( + child_entity_ids_inside_prefab) == 1, f"{len(child_entity_ids_inside_prefab)} entities found inside prefab" \ + f" when there should have been just 1 entity" + + child_entity_inside_prefab = child_entity_ids_inside_prefab[0] + child_entity_inside_prefab.focus_on_owning_prefab() + + child_entity_inside_prefab.delete() + + # Wait till prefab propagation finishes before validating entity deletion. + azlmbr.legacy.general.idle_wait_frames(1) + + child_entity_ids_inside_prefab = child_instance.get_direct_child_entities() + assert len( + child_entity_ids_inside_prefab) == 0, f"{len(child_entity_ids_inside_prefab)} entities found inside prefab" \ + f" when there should have been 0 entities" + +if __name__ == "__main__": + from editor_python_test_tools.utils import Report + Report.start_test(DeleteEntity_UnderAnotherPrefab) diff --git a/AutomatedTesting/Gem/PythonTests/Prefab/tests/delete_entity/DeleteEntity_UnderLevelPrefab.py b/AutomatedTesting/Gem/PythonTests/Prefab/tests/delete_entity/DeleteEntity_UnderLevelPrefab.py new file mode 100644 index 0000000000..807427718c --- /dev/null +++ b/AutomatedTesting/Gem/PythonTests/Prefab/tests/delete_entity/DeleteEntity_UnderLevelPrefab.py @@ -0,0 +1,37 @@ +""" +Copyright (c) Contributors to the Open 3D Engine Project. +For complete copyright and license terms please see the LICENSE at the root of this distribution. + +SPDX-License-Identifier: Apache-2.0 OR MIT +""" + +def DeleteEntity_UnderLevelPrefab(): + """ + Test description: + - Creates an entity. + - Destroys the created entity. + Checks that the entity is correctly destroyed. + """ + + from editor_python_test_tools.editor_entity_utils import EditorEntity + import Prefab.tests.PrefabTestUtils as prefab_test_utils + + prefab_test_utils.open_base_tests_level() + + # Creates a new Entity at the root level + # Asserts if creation didn't succeed + entity = EditorEntity.create_editor_entity_at((100.0, 100.0, 100.0), name = "TestEntity") + assert entity.id.IsValid(), "Couldn't create entity" + + level_container_entity = EditorEntity(entity.get_parent_id()) + entity.delete() + + # Wait till prefab propagation finishes before validating entity deletion. + azlmbr.legacy.general.idle_wait_frames(1) + level_container_child_entities_count = len(level_container_entity.get_children_ids()) + assert level_container_child_entities_count == 0, f"The level still has {level_container_child_entities_count}" \ + f" children when it should have 0." + +if __name__ == "__main__": + from editor_python_test_tools.utils import Report + Report.start_test(DeleteEntity_UnderLevelPrefab) diff --git a/AutomatedTesting/Gem/PythonTests/Prefab/tests/delete_prefab/DeletePrefab_ContainingASingleEntity.py b/AutomatedTesting/Gem/PythonTests/Prefab/tests/delete_prefab/DeletePrefab_ContainingASingleEntity.py new file mode 100644 index 0000000000..919168019e --- /dev/null +++ b/AutomatedTesting/Gem/PythonTests/Prefab/tests/delete_prefab/DeletePrefab_ContainingASingleEntity.py @@ -0,0 +1,32 @@ +""" +Copyright (c) Contributors to the Open 3D Engine Project. +For complete copyright and license terms please see the LICENSE at the root of this distribution. + +SPDX-License-Identifier: Apache-2.0 OR MIT +""" + +def DeletePrefab_ContainingASingleEntity(): + + CAR_PREFAB_FILE_NAME = 'car_prefab' + + from editor_python_test_tools.editor_entity_utils import EditorEntity + from editor_python_test_tools.prefab_utils import Prefab + + import Prefab.tests.PrefabTestUtils as prefab_test_utils + + prefab_test_utils.open_base_tests_level() + + # Creates a new entity at the root level + car_entity = EditorEntity.create_editor_entity() + car_prefab_entities = [car_entity] + + # Creates a prefab from the new entity + _, car = Prefab.create_prefab( + car_prefab_entities, CAR_PREFAB_FILE_NAME) + + # Deletes the prefab instance + Prefab.remove_prefabs([car]) + +if __name__ == "__main__": + from editor_python_test_tools.utils import Report + Report.start_test(DeletePrefab_ContainingASingleEntity) diff --git a/AutomatedTesting/Gem/PythonTests/Prefab/tests/detach_prefab/DetachPrefab_UnderAnotherPrefab.py b/AutomatedTesting/Gem/PythonTests/Prefab/tests/detach_prefab/DetachPrefab_UnderAnotherPrefab.py new file mode 100644 index 0000000000..69dbcfc89c --- /dev/null +++ b/AutomatedTesting/Gem/PythonTests/Prefab/tests/detach_prefab/DetachPrefab_UnderAnotherPrefab.py @@ -0,0 +1,51 @@ +""" +Copyright (c) Contributors to the Open 3D Engine Project. +For complete copyright and license terms please see the LICENSE at the root of this distribution. + +SPDX-License-Identifier: Apache-2.0 OR MIT +""" + +def DetachPrefab_UnderAnotherPrefab(): + + CAR_PREFAB_FILE_NAME = 'car_prefab2' + WHEEL_PREFAB_FILE_NAME = 'wheel_prefab2' + + import editor_python_test_tools.pyside_utils as pyside_utils + + @pyside_utils.wrap_async + async def run_test(): + + from editor_python_test_tools.editor_entity_utils import EditorEntity + from editor_python_test_tools.prefab_utils import Prefab + + import Prefab.tests.PrefabTestUtils as prefab_test_utils + + prefab_test_utils.open_base_tests_level() + + # Creates a new car entity at the root level + car_entity = EditorEntity.create_editor_entity() + car_prefab_entities = [car_entity] + + # Creates a prefab from the car entity + _, car = Prefab.create_prefab( + car_prefab_entities, CAR_PREFAB_FILE_NAME) + + # Creates another new wheel entity at the root level + wheel_entity = EditorEntity.create_editor_entity() + wheel_prefab_entities = [wheel_entity] + + # Creates another prefab from the wheel entity + _, wheel = Prefab.create_prefab( + wheel_prefab_entities, WHEEL_PREFAB_FILE_NAME) + + # Reparents the wheel prefab instance to the container entity of the car prefab instance + await wheel.ui_reparent_prefab_instance(car.container_entity.id) + + # Detaches the wheel prefab instance + Prefab.detach_prefab(wheel) + + run_test() + +if __name__ == "__main__": + from editor_python_test_tools.utils import Report + Report.start_test(DetachPrefab_UnderAnotherPrefab) diff --git a/AutomatedTesting/Gem/PythonTests/Prefab/tests/duplicate_prefab/DuplicatePrefab_ContainingASingleEntity.py b/AutomatedTesting/Gem/PythonTests/Prefab/tests/duplicate_prefab/DuplicatePrefab_ContainingASingleEntity.py new file mode 100644 index 0000000000..e611303fbb --- /dev/null +++ b/AutomatedTesting/Gem/PythonTests/Prefab/tests/duplicate_prefab/DuplicatePrefab_ContainingASingleEntity.py @@ -0,0 +1,32 @@ +""" +Copyright (c) Contributors to the Open 3D Engine Project. +For complete copyright and license terms please see the LICENSE at the root of this distribution. + +SPDX-License-Identifier: Apache-2.0 OR MIT +""" + +def DuplicatePrefab_ContainingASingleEntity(): + + CAR_PREFAB_FILE_NAME = 'car_prefab' + + from editor_python_test_tools.editor_entity_utils import EditorEntity + from editor_python_test_tools.prefab_utils import Prefab + + import Prefab.tests.PrefabTestUtils as prefab_test_utils + + prefab_test_utils.open_base_tests_level() + + # Creates a new entity at the root level + car_entity = EditorEntity.create_editor_entity() + car_prefab_entities = [car_entity] + + # Creates a prefab from the new entity + _, car = Prefab.create_prefab( + car_prefab_entities, CAR_PREFAB_FILE_NAME) + + # Duplicates the prefab instance + Prefab.duplicate_prefabs([car]) + +if __name__ == "__main__": + from editor_python_test_tools.utils import Report + Report.start_test(DuplicatePrefab_ContainingASingleEntity) diff --git a/AutomatedTesting/Gem/PythonTests/Prefab/tests/instantiate_prefab/InstantiatePrefab_ContainingASingleEntity.py b/AutomatedTesting/Gem/PythonTests/Prefab/tests/instantiate_prefab/InstantiatePrefab_ContainingASingleEntity.py new file mode 100644 index 0000000000..a81608ee8a --- /dev/null +++ b/AutomatedTesting/Gem/PythonTests/Prefab/tests/instantiate_prefab/InstantiatePrefab_ContainingASingleEntity.py @@ -0,0 +1,33 @@ +""" +Copyright (c) Contributors to the Open 3D Engine Project. +For complete copyright and license terms please see the LICENSE at the root of this distribution. + +SPDX-License-Identifier: Apache-2.0 OR MIT +""" + +def InstantiatePrefab_ContainingASingleEntity(): + + from azlmbr.math import Vector3 + + EXISTING_TEST_PREFAB_FILE_NAME = "Gem/PythonTests/Prefab/data/Test.prefab" + INSTANTIATED_TEST_PREFAB_POSITION = Vector3(10.00, 20.0, 30.0) + EXPECTED_TEST_PREFAB_CHILDREN_COUNT = 1 + + from editor_python_test_tools.prefab_utils import Prefab + + import Prefab.tests.PrefabTestUtils as prefab_test_utils + + prefab_test_utils.open_base_tests_level() + + # Instantiates a new car prefab instance + test_prefab = Prefab.get_prefab(EXISTING_TEST_PREFAB_FILE_NAME) + test_instance = test_prefab.instantiate( + prefab_position=INSTANTIATED_TEST_PREFAB_POSITION) + + prefab_test_utils.check_entity_children_count( + test_instance.container_entity.id, + EXPECTED_TEST_PREFAB_CHILDREN_COUNT) + +if __name__ == "__main__": + from editor_python_test_tools.utils import Report + Report.start_test(InstantiatePrefab_ContainingASingleEntity) diff --git a/AutomatedTesting/Gem/PythonTests/Prefab/tests/open_level/OpenLevel_ContainingTwoEntities.py b/AutomatedTesting/Gem/PythonTests/Prefab/tests/open_level/OpenLevel_ContainingTwoEntities.py new file mode 100644 index 0000000000..787d7000d2 --- /dev/null +++ b/AutomatedTesting/Gem/PythonTests/Prefab/tests/open_level/OpenLevel_ContainingTwoEntities.py @@ -0,0 +1,73 @@ +""" +Copyright (c) Contributors to the Open 3D Engine Project. +For complete copyright and license terms please see the LICENSE at the root of this distribution. + +SPDX-License-Identifier: Apache-2.0 OR MIT +""" + +# fmt:off +class Tests(): + find_empty_entity = ("Entity: 'EmptyEntity' found", "Entity: 'EmptyEntity' *not* found in level") + empty_entity_pos = ("'EmptyEntity' position is at the expected position", "'EmptyEntity' position is *not* at the expected position") + find_pxentity = ("Entity: 'EntityWithPxCollider' found", "Entity: 'EntityWithPxCollider' *not* found in level") + pxentity_component = ("Entity: 'EntityWithPxCollider' has a Physx Collider", "Entity: 'EntityWithPxCollider' does *not* have a Physx Collider") + +# fmt:on + +def OpenLevel_ContainingTwoEntities(): + """ + Opens the level that contains 2 entities, "EmptyEntity" and "EntityWithPxCollider". + This test makes sure that both entities exist after opening the level and that: + - EmptyEntity is at Position: (10, 20, 30) + - EntityWithPxCollider has a PhysXCollider component + """ + + import os + import sys + + from editor_python_test_tools.utils import Report + from editor_python_test_tools.utils import TestHelper as helper + + import editor_python_test_tools.hydra_editor_utils as hydra + + import azlmbr.entity as entity + import azlmbr.bus as bus + from azlmbr.math import Vector3 + + EXPECTED_EMPTY_ENTITY_POS = Vector3(10.00, 20.0, 30.0) + + helper.init_idle() + helper.open_level("Prefab", "PrefabLevel_OpensLevelWithEntities") + + def find_entity(entity_name): + searchFilter = entity.SearchFilter() + searchFilter.names = [entity_name] + entityIds = entity.SearchBus(bus.Broadcast, 'SearchEntities', searchFilter) + if entityIds[0].IsValid(): + return entityIds[0] + return None + + # Checks for an entity called "EmptyEntity" + helper.wait_for_condition(lambda: find_entity("EmptyEntity").IsValid(), 5.0) + empty_entity_id = find_entity("EmptyEntity") + Report.result(Tests.find_empty_entity, empty_entity_id.IsValid()) + + # Checks if the EmptyEntity is in the correct position and if it fails, it will provide the expected postion and the actual postion of the entity in the Editor log + empty_entity_pos = azlmbr.components.TransformBus(azlmbr.bus.Event, "GetWorldTranslation", empty_entity_id) + is_at_position = empty_entity_pos.IsClose(EXPECTED_EMPTY_ENTITY_POS) + Report.result(Tests.empty_entity_pos, is_at_position) + if not is_at_position: + Report.info(f'Expected position: {EXPECTED_EMPTY_ENTITY_POS.ToString()}, actual position: {empty_entity_pos.ToString()}') + + # Checks for an entity called "EntityWithPxCollider" and if it has the PhysX Collider component + pxentity = find_entity("EntityWithPxCollider") + Report.result(Tests.find_pxentity, pxentity.IsValid()) + + pxcollider_id = hydra.get_component_type_id("PhysX Collider") + hasComponent = azlmbr.editor.EditorComponentAPIBus(azlmbr.bus.Broadcast, 'HasComponentOfType', pxentity, pxcollider_id) + Report.result(Tests.pxentity_component, hasComponent) + +if __name__ == "__main__": + + from editor_python_test_tools.utils import Report + Report.start_test(OpenLevel_ContainingTwoEntities) diff --git a/AutomatedTesting/Gem/PythonTests/Prefab/tests/reparent_prefab/ReparentPrefab_UnderAnotherPrefab.py b/AutomatedTesting/Gem/PythonTests/Prefab/tests/reparent_prefab/ReparentPrefab_UnderAnotherPrefab.py new file mode 100644 index 0000000000..2c460a3298 --- /dev/null +++ b/AutomatedTesting/Gem/PythonTests/Prefab/tests/reparent_prefab/ReparentPrefab_UnderAnotherPrefab.py @@ -0,0 +1,48 @@ +""" +Copyright (c) Contributors to the Open 3D Engine Project. +For complete copyright and license terms please see the LICENSE at the root of this distribution. + +SPDX-License-Identifier: Apache-2.0 OR MIT +""" + +def ReparentPrefab_UnderAnotherPrefab(): + + CAR_PREFAB_FILE_NAME = 'car_prefab' + WHEEL_PREFAB_FILE_NAME = 'wheel_prefab' + + import editor_python_test_tools.pyside_utils as pyside_utils + + @pyside_utils.wrap_async + async def run_test(): + + from editor_python_test_tools.editor_entity_utils import EditorEntity + from editor_python_test_tools.prefab_utils import Prefab + + import Prefab.tests.PrefabTestUtils as prefab_test_utils + + prefab_test_utils.open_base_tests_level() + + # Creates a new car entity at the root level + car_entity = EditorEntity.create_editor_entity() + car_prefab_entities = [car_entity] + + # Creates a prefab from the car entity + _, car = Prefab.create_prefab( + car_prefab_entities, CAR_PREFAB_FILE_NAME) + + # Creates another new wheel entity at the root level + wheel_entity = EditorEntity.create_editor_entity() + wheel_prefab_entities = [wheel_entity] + + # Creates another prefab from the wheel entity + _, wheel = Prefab.create_prefab( + wheel_prefab_entities, WHEEL_PREFAB_FILE_NAME) + + # Reparents the wheel prefab instance to the container entity of the car prefab instance + await wheel.ui_reparent_prefab_instance(car.container_entity.id) + + run_test() + +if __name__ == "__main__": + from editor_python_test_tools.utils import Report + Report.start_test(ReparentPrefab_UnderAnotherPrefab) diff --git a/AutomatedTesting/Gem/PythonTests/PythonAssetBuilder/AssetBuilder_test.py b/AutomatedTesting/Gem/PythonTests/PythonAssetBuilder/AssetBuilder_test.py index 45e633a979..cb2c445246 100644 --- a/AutomatedTesting/Gem/PythonTests/PythonAssetBuilder/AssetBuilder_test.py +++ b/AutomatedTesting/Gem/PythonTests/PythonAssetBuilder/AssetBuilder_test.py @@ -12,12 +12,36 @@ import sys import os import pytest import logging +import sqlite3 pytest.importorskip('ly_test_tools') import ly_test_tools.environment.file_system as file_system import ly_test_tools.log.log_monitor import ly_test_tools.environment.waiter as waiter +def detect_product(sql_connection, platform, target): + cur = sql_connection.cursor() + product_target = f'{platform}/{target}' + print(f'Detecting {product_target} in assetdb.sqlite') + hits = 0 + for row in cur.execute(f'select ProductID from Products where ProductName is "{product_target}"'): + hits = hits + 1 + assert hits == 1 + + +def find_products(cache_folder, platform): + con = sqlite3.connect(os.path.join(cache_folder, 'assetdb.sqlite')) + detect_product(con, platform, 'gem/pythontests/pythonassetbuilder/test_asset.mock_asset') + detect_product(con, platform, 'gem/pythontests/pythonassetbuilder/geom_group_fbx_cube_100cm_z_positive_1.azmodel') + detect_product(con, platform, 'gem/pythontests/pythonassetbuilder/geom_group_fbx_cube_100cm_z_negative_1.azmodel') + detect_product(con, platform, 'gem/pythontests/pythonassetbuilder/geom_group_fbx_cube_100cm_y_positive_1.azmodel') + detect_product(con, platform, 'gem/pythontests/pythonassetbuilder/geom_group_fbx_cube_100cm_y_negative_1.azmodel') + detect_product(con, platform, 'gem/pythontests/pythonassetbuilder/geom_group_fbx_cube_100cm_x_positive_1.azmodel') + detect_product(con, platform, 'gem/pythontests/pythonassetbuilder/geom_group_fbx_cube_100cm_x_negative_1.azmodel') + detect_product(con, platform, 'gem/pythontests/pythonassetbuilder/geom_group_fbx_cube_100cm_center_1.azmodel') + con.close() + + @pytest.mark.SUITE_periodic @pytest.mark.parametrize('launcher_platform', ['windows_editor']) @pytest.mark.parametrize('project', ['AutomatedTesting']) @@ -25,16 +49,7 @@ import ly_test_tools.environment.waiter as waiter class TestPythonAssetProcessing(object): def test_DetectPythonCreatedAsset(self, request, editor, level, launcher_platform): unexpected_lines = [] - expected_lines = [ - 'Mock asset exists', - 'AssetId found for asset (gem/pythontests/pythonassetbuilder/geom_group_fbx_cube_100cm_z_positive_1.azmodel) found', - 'AssetId found for asset (gem/pythontests/pythonassetbuilder/geom_group_fbx_cube_100cm_z_negative_1.azmodel) found', - 'AssetId found for asset (gem/pythontests/pythonassetbuilder/geom_group_fbx_cube_100cm_y_positive_1.azmodel) found', - 'AssetId found for asset (gem/pythontests/pythonassetbuilder/geom_group_fbx_cube_100cm_y_negative_1.azmodel) found', - 'AssetId found for asset (gem/pythontests/pythonassetbuilder/geom_group_fbx_cube_100cm_x_positive_1.azmodel) found', - 'AssetId found for asset (gem/pythontests/pythonassetbuilder/geom_group_fbx_cube_100cm_x_negative_1.azmodel) found', - 'AssetId found for asset (gem/pythontests/pythonassetbuilder/geom_group_fbx_cube_100cm_center_1.azmodel) found' - ] + expected_lines = [] timeout = 180 halt_on_unexpected = False test_directory = os.path.join(os.path.dirname(__file__)) @@ -50,3 +65,9 @@ class TestPythonAssetProcessing(object): exc=("Log file '{}' was never opened by another process.".format(editorlog_file)), interval=1) log_monitor.monitor_log_for_lines(expected_lines, unexpected_lines, halt_on_unexpected, timeout) + + cache_folder = editor.workspace.paths.cache() + platform = editor.workspace.asset_processor_platform + if platform == 'windows': + platform = 'pc' + find_products(cache_folder, platform) diff --git a/AutomatedTesting/Gem/PythonTests/PythonAssetBuilder/AssetBuilder_test_case.py b/AutomatedTesting/Gem/PythonTests/PythonAssetBuilder/AssetBuilder_test_case.py index 8d418222ce..112fd013bf 100644 --- a/AutomatedTesting/Gem/PythonTests/PythonAssetBuilder/AssetBuilder_test_case.py +++ b/AutomatedTesting/Gem/PythonTests/PythonAssetBuilder/AssetBuilder_test_case.py @@ -8,42 +8,54 @@ import azlmbr.bus import azlmbr.asset import azlmbr.editor import azlmbr.math -import azlmbr.legacy.general -def raise_and_stop(msg): - print (msg) +print('Starting mock asset tests') +handler = azlmbr.editor.EditorEventBusHandler() + +def on_notify_editor_initialized(args): + # These tests are meant to check that the test_asset.mock source asset turned into + # a test_asset.mock_asset product asset via the Python asset builder system + mockAssetType = azlmbr.math.Uuid_CreateString('{9274AD17-3212-4651-9F3B-7DCCB080E467}', 0) + mockAssetPath = 'gem/pythontests/pythonassetbuilder/test_asset.mock_asset' + assetId = azlmbr.asset.AssetCatalogRequestBus(azlmbr.bus.Broadcast, 'GetAssetIdByPath', mockAssetPath, mockAssetType, False) + if (assetId.is_valid() is False): + print(f'Mock AssetId is not valid! Got {assetId.to_string()} instead') + else: + print(f'Mock AssetId is valid!') + + assetIdString = assetId.to_string() + if (assetIdString.endswith(':528cca58') is False): + print(f'Mock AssetId {assetIdString} has unexpected sub-id for {mockAssetPath}!') + else: + print(f'Mock AssetId has expected sub-id for {mockAssetPath}!') + + print ('Mock asset exists') + + # These tests detect if the geom_group.fbx file turns into a number of azmodel product assets + def test_azmodel_product(generatedModelAssetPath): + azModelAssetType = azlmbr.math.Uuid_CreateString('{2C7477B6-69C5-45BE-8163-BCD6A275B6D8}', 0) + assetId = azlmbr.asset.AssetCatalogRequestBus(azlmbr.bus.Broadcast, 'GetAssetIdByPath', generatedModelAssetPath, azModelAssetType, False) + assetIdString = assetId.to_string() + if (assetId.is_valid()): + print(f'AssetId found for asset ({generatedModelAssetPath}) found') + else: + print(f'Asset at path {generatedModelAssetPath} has unexpected asset ID ({assetIdString})!') + + test_azmodel_product('gem/pythontests/pythonassetbuilder/geom_group_fbx_cube_100cm_z_positive_1.azmodel') + test_azmodel_product('gem/pythontests/pythonassetbuilder/geom_group_fbx_cube_100cm_z_negative_1.azmodel') + test_azmodel_product('gem/pythontests/pythonassetbuilder/geom_group_fbx_cube_100cm_y_positive_1.azmodel') + test_azmodel_product('gem/pythontests/pythonassetbuilder/geom_group_fbx_cube_100cm_y_negative_1.azmodel') + test_azmodel_product('gem/pythontests/pythonassetbuilder/geom_group_fbx_cube_100cm_x_positive_1.azmodel') + test_azmodel_product('gem/pythontests/pythonassetbuilder/geom_group_fbx_cube_100cm_x_negative_1.azmodel') + test_azmodel_product('gem/pythontests/pythonassetbuilder/geom_group_fbx_cube_100cm_center_1.azmodel') + + # clear up notification handler + global handler + handler.disconnect() + handler = None + + print('Finished mock asset tests') azlmbr.editor.EditorToolsApplicationRequestBus(azlmbr.bus.Broadcast, 'ExitNoPrompt') -# These tests are meant to check that the test_asset.mock source asset turned into -# a test_asset.mock_asset product asset via the Python asset builder system -mockAssetType = azlmbr.math.Uuid_CreateString('{9274AD17-3212-4651-9F3B-7DCCB080E467}', 0) -mockAssetPath = 'gem/pythontests/pythonassetbuilder/test_asset.mock_asset' -assetId = azlmbr.asset.AssetCatalogRequestBus(azlmbr.bus.Broadcast, 'GetAssetIdByPath', mockAssetPath, mockAssetType, False) -if (assetId.is_valid() is False): - raise_and_stop(f'Mock AssetId is not valid! Got {assetId.to_string()} instead') - -assetIdString = assetId.to_string() -if (assetIdString.endswith(':528cca58') is False): - raise_and_stop(f'Mock AssetId {assetIdString} has unexpected sub-id for {mockAssetPath}!') - -print ('Mock asset exists') - -# These tests detect if the geom_group.fbx file turns into a number of azmodel product assets -def test_azmodel_product(generatedModelAssetPath): - azModelAssetType = azlmbr.math.Uuid_CreateString('{2C7477B6-69C5-45BE-8163-BCD6A275B6D8}', 0) - assetId = azlmbr.asset.AssetCatalogRequestBus(azlmbr.bus.Broadcast, 'GetAssetIdByPath', generatedModelAssetPath, azModelAssetType, False) - assetIdString = assetId.to_string() - if (assetId.is_valid()): - print(f'AssetId found for asset ({generatedModelAssetPath}) found') - else: - raise_and_stop(f'Asset at path {generatedModelAssetPath} has unexpected asset ID ({assetIdString})!') - -test_azmodel_product('gem/pythontests/pythonassetbuilder/geom_group_fbx_cube_100cm_z_positive_1.azmodel') -test_azmodel_product('gem/pythontests/pythonassetbuilder/geom_group_fbx_cube_100cm_z_negative_1.azmodel') -test_azmodel_product('gem/pythontests/pythonassetbuilder/geom_group_fbx_cube_100cm_y_positive_1.azmodel') -test_azmodel_product('gem/pythontests/pythonassetbuilder/geom_group_fbx_cube_100cm_y_negative_1.azmodel') -test_azmodel_product('gem/pythontests/pythonassetbuilder/geom_group_fbx_cube_100cm_x_positive_1.azmodel') -test_azmodel_product('gem/pythontests/pythonassetbuilder/geom_group_fbx_cube_100cm_x_negative_1.azmodel') -test_azmodel_product('gem/pythontests/pythonassetbuilder/geom_group_fbx_cube_100cm_center_1.azmodel') - -azlmbr.editor.EditorToolsApplicationRequestBus(azlmbr.bus.Broadcast, 'ExitNoPrompt') +handler.connect() +handler.add_callback('NotifyEditorInitialized', on_notify_editor_initialized) diff --git a/AutomatedTesting/Gem/PythonTests/Terrain/CMakeLists.txt b/AutomatedTesting/Gem/PythonTests/Terrain/CMakeLists.txt new file mode 100644 index 0000000000..9f8ba06829 --- /dev/null +++ b/AutomatedTesting/Gem/PythonTests/Terrain/CMakeLists.txt @@ -0,0 +1,24 @@ +# +# Copyright (c) Contributors to the Open 3D Engine Project. +# For complete copyright and license terms please see the LICENSE at the root of this distribution. +# +# SPDX-License-Identifier: Apache-2.0 OR MIT +# +# + +if(PAL_TRAIT_BUILD_TESTS_SUPPORTED AND PAL_TRAIT_BUILD_HOST_TOOLS) + + ly_add_pytest( + NAME AutomatedTesting::TerrainTests_Main + TEST_SUITE main + TEST_SERIAL + PATH ${CMAKE_CURRENT_LIST_DIR}/TestSuite_Main.py + RUNTIME_DEPENDENCIES + Legacy::Editor + AZ::AssetProcessor + AutomatedTesting.Assets + COMPONENT + Terrain + ) + +endif() diff --git a/AutomatedTesting/Gem/PythonTests/Terrain/EditorScripts/TerrainHeightGradientList_AddRemoveGradientWorks.py b/AutomatedTesting/Gem/PythonTests/Terrain/EditorScripts/TerrainHeightGradientList_AddRemoveGradientWorks.py new file mode 100644 index 0000000000..0be1f1ca10 --- /dev/null +++ b/AutomatedTesting/Gem/PythonTests/Terrain/EditorScripts/TerrainHeightGradientList_AddRemoveGradientWorks.py @@ -0,0 +1,144 @@ +""" +Copyright (c) Contributors to the Open 3D Engine Project. +For complete copyright and license terms please see the LICENSE at the root of this distribution. +SPDX-License-Identifier: Apache-2.0 OR MIT +""" + +class HeightTests: + single_gradient_height_correct = ( + "Successfully retrieved height for gradient1.", + "Failed to retrieve height for gradient1." + ) + double_gradient_height_correct = ( + "Successfully retrieved height when two gradients exist.", + "Failed to retrieve height when two gradients exist." + ) + triple_gradient_height_correct = ( + "Successfully retrieved height when three gradients exist.", + "Failed to retrieve height when three gradients exist." + ) + terrain_data_changed_call_count_correct = ( + "OnTerrainDataChanged called expected number of times.", + "OnTerrainDataChanged call count incorrect." + ) + +def TerrainHeightGradientList_AddRemoveGradientWorks(): + """ + Summary: + Test aspects of the TerrainHeightGradientList through the BehaviorContext and the Property Tree. + :return: None + """ + + import os + import math as sys_math + + import azlmbr.legacy.general as general + import azlmbr.bus as bus + import azlmbr.math as math + import azlmbr.terrain as terrain + import azlmbr.editor as editor + import azlmbr.vegetation as vegetation + import azlmbr.entity as EntityId + + import editor_python_test_tools.hydra_editor_utils as hydra + from editor_python_test_tools.utils import Report + from editor_python_test_tools.utils import TestHelper as helper + import editor_python_test_tools.pyside_utils as pyside_utils + from editor_python_test_tools.editor_entity_utils import EditorEntity + + terrain_changed_call_count = 0 + expected_terrain_changed_calls = 0 + + aabb_component_name = "Axis Aligned Box Shape" + gradientlist_component_name = "Terrain Height Gradient List" + layerspawner_component_name = "Terrain Layer Spawner" + + gradient_value_path = "Configuration|Value" + + def create_entity_at(entity_name, components_to_add, x, y, z): + entity = hydra.Entity(entity_name) + entity.create_entity(math.Vector3(x, y, z), components_to_add) + + return entity + + def on_terrain_changed(args): + nonlocal terrain_changed_call_count + + terrain_changed_call_count += 1 + + def set_component_path_val(entity, component, path, value): + entity.get_set_test(component, path, value) + + def set_gradients_check_height(main_entity, gradient_list, expected_height, test_results): + nonlocal expected_terrain_changed_calls + + test_tolerance = 0.01 + gradient_list_path = "Configuration|Gradient Entities" + + set_component_path_val(main_entity, 1, gradient_list_path, gradient_list) + + expected_terrain_changed_calls += 1 + + # Wait until the terrain data has been updated. + helper.wait_for_condition(lambda: terrain_changed_call_count == expected_terrain_changed_calls, 2.0) + + # Get the height at the origin. + height = terrain.TerrainDataRequestBus(bus.Broadcast, "GetHeightFromFloats", 0.0, 0.0, 0) + + Report.result(test_results, sys_math.isclose(height, expected_height, abs_tol=test_tolerance)) + + helper.init_idle() + + # Open a level. + helper.open_level("Physics", "Base") + helper.wait_for_condition(lambda: general.get_current_level_name() == "Base", 2.0) + + general.idle_wait_frames(1) + + # Add a terrain world component + world_component = hydra.add_level_component("Terrain World") + + aabb_height = 1024.0 + box_dimensions = math.Vector3(1.0, 1.0, aabb_height); + + # Create a main entity with a LayerSpawner, AAbb and HeightGradientList. + main_entity = create_entity_at("entity2", [layerspawner_component_name, gradientlist_component_name, aabb_component_name], 0.0, 0.0, aabb_height/2.0) + + # Create three gradient entities. + gradient_entity1 = create_entity_at("Constant Gradient1", ["Constant Gradient"], 0.0, 0.0, 0.0); + gradient_entity2 = create_entity_at("Constant Gradient2", ["Constant Gradient"], 0.0, 0.0, 0.0); + gradient_entity3 = create_entity_at("Constant Gradient3", ["Constant Gradient"], 0.0, 0.0, 0.0); + + # Give everything a chance to finish initializing. + general.idle_wait_frames(1) + + # Set the gradients to different values. + gradient_values = [0.5, 0.8, 0.3] + set_component_path_val(gradient_entity1, 0, gradient_value_path, gradient_values[0]) + set_component_path_val(gradient_entity2, 0, gradient_value_path, gradient_values[1]) + set_component_path_val(gradient_entity3, 0, gradient_value_path, gradient_values[2]) + + # Give the TerrainSystem time to tick. + general.idle_wait_frames(1) + + # Set the dimensions of the Aabb. + set_component_path_val(main_entity, 2, "Axis Aligned Box Shape|Box Configuration|Dimensions", box_dimensions) + + # Set up a handler to wait for notifications from the TerrainSystem. + handler = azlmbr.terrain.TerrainDataNotificationBusHandler() + handler.connect() + handler.add_callback("OnTerrainDataChanged", on_terrain_changed) + + # Add a gradient to GradientList, then check the height returned from the TerrainSystem is correct. + set_gradients_check_height(main_entity, [gradient_entity1.id], aabb_height * gradient_values[0], HeightTests.single_gradient_height_correct) + + # Add gradient2 and check height at the origin, this should have changed to match the second gradient value. + set_gradients_check_height(main_entity, [gradient_entity1.id, gradient_entity2.id], aabb_height * gradient_values[1], HeightTests.double_gradient_height_correct) + + # Add gradient3, the height should still be the second value, as that was the highest. + set_gradients_check_height(main_entity, [gradient_entity1.id, gradient_entity2.id, gradient_entity3.id], aabb_height * gradient_values[1], HeightTests.triple_gradient_height_correct) + +if __name__ == "__main__": + + from editor_python_test_tools.utils import Report + Report.start_test(TerrainHeightGradientList_AddRemoveGradientWorks) \ No newline at end of file diff --git a/AutomatedTesting/Gem/PythonTests/Terrain/EditorScripts/TerrainMacroMaterialComponent_MacroMaterialActivates.py b/AutomatedTesting/Gem/PythonTests/Terrain/EditorScripts/TerrainMacroMaterialComponent_MacroMaterialActivates.py new file mode 100644 index 0000000000..71ff02739a --- /dev/null +++ b/AutomatedTesting/Gem/PythonTests/Terrain/EditorScripts/TerrainMacroMaterialComponent_MacroMaterialActivates.py @@ -0,0 +1,166 @@ +""" +Copyright (c) Contributors to the Open 3D Engine Project. +For complete copyright and license terms please see the LICENSE at the root of this distribution. +SPDX-License-Identifier: Apache-2.0 OR MIT +""" + +class MacroMaterialTests: + setup_test = ( + "Setup successful", + "Setup failed" + ) + material_changed_not_called_when_inactive = ( + "OnTerrainMacroMaterialRegionChanged not called successfully", + "OnTerrainMacroMaterialRegionChanged called when component inactive." + ) + material_created = ( + "MaterialCreated called successfully", + "MaterialCreated failed" + ) + material_destroyed = ( + "MaterialDestroyed called successfully", + "MaterialDestroyed failed" + ) + material_recreated = ( + "MaterialCreated called successfully on second test", + "MaterialCreated failed on second test" + ) + material_changed_call_on_aabb_change = ( + "OnTerrainMacroMaterialRegionChanged called successfully", + "Timed out waiting for OnTerrainMacroMaterialRegionChanged" + ) + +def TerrainMacroMaterialComponent_MacroMaterialActivates(): + """ + Summary: + Load an empty level, create a MacroMaterialComponent and check assigning textures results in the correct callbacks. + :return: None + """ + + import os + import math as sys_math + + import azlmbr.legacy.general as general + import azlmbr.asset as asset + import azlmbr.bus as bus + import azlmbr.math as math + import azlmbr.terrain as terrain + import azlmbr.editor as editor + import azlmbr.vegetation as vegetation + import azlmbr.entity as EntityId + + import editor_python_test_tools.hydra_editor_utils as hydra + from editor_python_test_tools.utils import Report + from editor_python_test_tools.utils import TestHelper as helper + import editor_python_test_tools.pyside_utils as pyside_utils + from editor_python_test_tools.editor_entity_utils import EditorEntity + from editor_python_test_tools.asset_utils import Asset + + material_created_called = False + material_changed_called = False + material_region_changed_called = False + material_destroyed_called = False + + def create_entity_at(entity_name, components_to_add, x, y, z): + entity = EditorEntity.create_editor_entity_at([x, y, z], entity_name) + for component in components_to_add: + entity.add_component(component) + + return entity + + def on_macro_material_created(args): + nonlocal material_created_called + material_created_called = True + + def on_macro_material_changed(args): + nonlocal material_changed_called + material_changed_called = True + + def on_macro_material_region_changed(args): + nonlocal material_region_changed_called + material_region_changed_called = True + + def on_macro_material_destroyed(args): + nonlocal material_destroyed_called + material_destroyed_called = True + + helper.init_idle() + + # Open a level. + helper.open_level("Physics", "Base") + helper.wait_for_condition(lambda: general.get_current_level_name() == "Base", 2.0) + + general.idle_wait_frames(1) + + # Set up a handler to wait for notifications from the TerrainSystem. + handler = terrain.TerrainMacroMaterialAutomationBusHandler() + handler.connect() + handler.add_callback("OnTerrainMacroMaterialCreated", on_macro_material_created) + handler.add_callback("OnTerrainMacroMaterialChanged", on_macro_material_changed) + handler.add_callback("OnTerrainMacroMaterialRegionChanged", on_macro_material_region_changed) + handler.add_callback("OnTerrainMacroMaterialDestroyed", on_macro_material_destroyed) + + macro_material_entity = create_entity_at("macro", ["Terrain Macro Material", "Axis Aligned Box Shape"], 0.0, 0.0, 0.0) + + # Check that no macro material callbacks happened. It should be "inactive" as it has no assets assigned. + setup_success = not material_created_called and not material_changed_called and not material_region_changed_called and not material_destroyed_called + Report.result(MacroMaterialTests.setup_test, setup_success) + + # Find the aabb component. + aabb_component_type_id_type = azlmbr.editor.EditorComponentAPIBus(azlmbr.bus.Broadcast, 'FindComponentTypeIdsByEntityType', ["Axis Aligned Box Shape"], 0)[0] + aabb_component_id = azlmbr.editor.EditorComponentAPIBus(azlmbr.bus.Broadcast, 'GetComponentOfType', macro_material_entity.id, aabb_component_type_id_type).GetValue() + + # Change the aabb dimensions + material_region_changed_called = False + box_dimensions_path = "Axis Aligned Box Shape|Box Configuration|Dimensions" + editor.EditorComponentAPIBus(bus.Broadcast, "SetComponentProperty", aabb_component_id, box_dimensions_path, math.Vector3(1.0, 1.0, 1.0)) + + # Check we don't receive a callback. The macro material component should be inactive as it has no images assigned. + general.idle_wait_frames(1) + Report.result(MacroMaterialTests.material_changed_not_called_when_inactive, material_region_changed_called == False) + + # Find the macro material component. + macro_material_id_type = azlmbr.editor.EditorComponentAPIBus(azlmbr.bus.Broadcast, 'FindComponentTypeIdsByEntityType', ["Terrain Macro Material"], 0)[0] + macro_material_component_id = azlmbr.editor.EditorComponentAPIBus(azlmbr.bus.Broadcast, 'GetComponentOfType', macro_material_entity.id, macro_material_id_type).GetValue() + + # Find a color image asset. + color_image_path = os.path.join("assets", "textures", "image.png.streamingimage") + color_image_asset = asset.AssetCatalogRequestBus(bus.Broadcast, "GetAssetIdByPath", color_image_path, math.Uuid(), False) + + # Assign the image to the MacroMaterial component, which should result in a created message. + material_created_called = False + color_texture_path = "Configuration|Color Texture" + editor.EditorComponentAPIBus(bus.Broadcast, "SetComponentProperty", macro_material_component_id, color_texture_path, color_image_asset) + + call_result = helper.wait_for_condition(lambda: material_created_called == True, 2.0) + Report.result(MacroMaterialTests.material_created, call_result) + + # Find a normal image asset. + normal_image_path = os.path.join("assets", "textures", "normal.png.streamingimage") + normal_image_asset = asset.AssetCatalogRequestBus(bus.Broadcast, "GetAssetIdByPath", normal_image_path, math.Uuid(), False) + + # Assign the normal image to the MacroMaterial component, which should result in a created message. + material_created_called = False + material_destroyed_called = False + normal_texture_path = "Configuration|Normal Texture" + editor.EditorComponentAPIBus(bus.Broadcast, "SetComponentProperty", macro_material_component_id, normal_texture_path, normal_image_asset) + + # Check the MacroMaterial was destroyed and recreated. + destroyed_call_result = helper.wait_for_condition(lambda: material_destroyed_called == True, 2.0) + Report.result(MacroMaterialTests.material_destroyed, destroyed_call_result) + + recreated_call_result = helper.wait_for_condition(lambda: material_created_called == True, 2.0) + Report.result(MacroMaterialTests.material_recreated, recreated_call_result) + + # Change the aabb dimensions. + box_dimensions_path = "Axis Aligned Box Shape|Box Configuration|Dimensions" + editor.EditorComponentAPIBus(bus.Broadcast, "SetComponentProperty", aabb_component_id, box_dimensions_path, math.Vector3(1.0, 1.0, 1.0)) + + # Check that a callback is received. + region_changed_call_result = helper.wait_for_condition(lambda: material_region_changed_called == True, 2.0) + Report.result(MacroMaterialTests.material_changed_call_on_aabb_change, region_changed_call_result) + +if __name__ == "__main__": + + from editor_python_test_tools.utils import Report + Report.start_test(TerrainMacroMaterialComponent_MacroMaterialActivates) \ No newline at end of file diff --git a/AutomatedTesting/Gem/PythonTests/Terrain/EditorScripts/TerrainPhysicsCollider_ChangesSizeWithAxisAlignedBoxShapeChanges.py b/AutomatedTesting/Gem/PythonTests/Terrain/EditorScripts/TerrainPhysicsCollider_ChangesSizeWithAxisAlignedBoxShapeChanges.py new file mode 100644 index 0000000000..f4c2a19884 --- /dev/null +++ b/AutomatedTesting/Gem/PythonTests/Terrain/EditorScripts/TerrainPhysicsCollider_ChangesSizeWithAxisAlignedBoxShapeChanges.py @@ -0,0 +1,89 @@ +""" +Copyright (c) Contributors to the Open 3D Engine Project. +For complete copyright and license terms please see the LICENSE at the root of this distribution. + +SPDX-License-Identifier: Apache-2.0 OR MIT +""" + +#fmt: off +class Tests(): + create_test_entity = ("Entity created successfully", "Failed to create Entity") + add_axis_aligned_box_shape = ("Axis Aligned Box Shape component added", "Failed to add Axis Aligned Box Shape component") + add_terrain_collider = ("Terrain Physics Heightfield Collider component added", "Failed to add a Terrain Physics Heightfield Collider component") + box_dimensions_changed = ("Aabb dimensions changed successfully", "Failed change Aabb dimensions") + configuration_changed = ("Terrain size changed successfully", "Failed terrain size change") +#fmt: on + +def TerrainPhysicsCollider_ChangesSizeWithAxisAlignedBoxShapeChanges(): + """ + Summary: + Test aspects of the Terrain Physics Heightfield Collider through the BehaviorContext and the Property Tree. + + Test Steps: + Expected Behavior: + The Editor is stable there are no warnings or errors. + + Test Steps: + 1) Load the base level + 2) Create test entity + 3) Start the Tracer to catch any errors and warnings + 4) Add the Axis Aligned Box Shape and Terrain Physics Heightfield Collider components + 5) Change the Axis Aligned Box Shape dimensions + 6) Check the Heightfield provider is returning the correct size + 7) Verify there are no errors and warnings in the logs + + + :return: None + """ + + from editor_python_test_tools.editor_entity_utils import EditorEntity + from editor_python_test_tools.utils import TestHelper as helper + from editor_python_test_tools.utils import Report, Tracer + import azlmbr.legacy.general as general + import azlmbr.physics as physics + import azlmbr.math as azmath + import azlmbr.bus as bus + import sys + import math + + SET_BOX_X_SIZE = 5.0 + SET_BOX_Y_SIZE = 6.0 + EXPECTED_COLUMN_SIZE = SET_BOX_X_SIZE + 1 + EXPECTED_ROW_SIZE = SET_BOX_Y_SIZE + 1 + helper.init_idle() + + # 1) Load the level + helper.open_level("", "Base") + + # 2) Create test entity + test_entity = EditorEntity.create_editor_entity("TestEntity") + Report.result(Tests.create_test_entity, test_entity.id.IsValid()) + + # 3) Start the Tracer to catch any errors and warnings + with Tracer() as section_tracer: + # 4) Add the Axis Aligned Box Shape and Terrain Physics Heightfield Collider components + aaBoxShape_component = test_entity.add_component("Axis Aligned Box Shape") + Report.result(Tests.add_axis_aligned_box_shape, test_entity.has_component("Axis Aligned Box Shape")) + terrainPhysics_component = test_entity.add_component("Terrain Physics Heightfield Collider") + Report.result(Tests.add_terrain_collider, test_entity.has_component("Terrain Physics Heightfield Collider")) + + # 5) Change the Axis Aligned Box Shape dimensions + aaBoxShape_component.set_component_property_value("Axis Aligned Box Shape|Box Configuration|Dimensions", azmath.Vector3(SET_BOX_X_SIZE, SET_BOX_Y_SIZE, 1.0)) + add_check = aaBoxShape_component.get_component_property_value("Axis Aligned Box Shape|Box Configuration|Dimensions") == azmath.Vector3(SET_BOX_X_SIZE, SET_BOX_Y_SIZE, 1.0) + Report.result(Tests.box_dimensions_changed, add_check) + + # 6) Check the Heightfield provider is returning the correct size + columns = physics.HeightfieldProviderRequestsBus(bus.Broadcast, "GetHeightfieldGridColumns") + rows = physics.HeightfieldProviderRequestsBus(bus.Broadcast, "GetHeightfieldGridRows") + Report.result(Tests.configuration_changed, math.isclose(columns, EXPECTED_COLUMN_SIZE) and math.isclose(rows, EXPECTED_ROW_SIZE)) + + helper.wait_for_condition(lambda: section_tracer.has_errors or section_tracer.has_asserts, 1.0) + for error_info in section_tracer.errors: + Report.info(f"Error: {error_info.filename} {error_info.function} | {error_info.message}") + for assert_info in section_tracer.asserts: + Report.info(f"Assert: {assert_info.filename} {assert_info.function} | {assert_info.message}") + +if __name__ == "__main__": + + from editor_python_test_tools.utils import Report + Report.start_test(TerrainPhysicsCollider_ChangesSizeWithAxisAlignedBoxShapeChanges) diff --git a/AutomatedTesting/Gem/PythonTests/Terrain/EditorScripts/TerrainSystem_VegetationSpawnsOnTerrainSurfaces.py b/AutomatedTesting/Gem/PythonTests/Terrain/EditorScripts/TerrainSystem_VegetationSpawnsOnTerrainSurfaces.py new file mode 100644 index 0000000000..f1769ae3d9 --- /dev/null +++ b/AutomatedTesting/Gem/PythonTests/Terrain/EditorScripts/TerrainSystem_VegetationSpawnsOnTerrainSurfaces.py @@ -0,0 +1,214 @@ +""" +Copyright (c) Contributors to the Open 3D Engine Project. +For complete copyright and license terms please see the LICENSE at the root of this distribution. +SPDX-License-Identifier: Apache-2.0 OR MIT +""" + +class VegetationTests: + vegetation_on_gradient_1 = ( + "Vegetation detected at correct position on Gradient1", + "Vegetation not detected at correct position on Gradient1" + ) + vegetation_on_gradient_2 = ( + "Vegetation detected at correct position on Gradient2", + "Vegetation not detected at correct position on Gradient2" + ) + unfiltered_vegetation_count_correct = ( + "Unfiltered vegetation spawn count correct", + "Unfiltered vegetation spawn count incorrect" + ) + + testTag2_excluded_vegetation_count_correct = ( + "TestTag2 filtered vegetation count correct", + "TestTag2 filtered vegetation count incorrect" + ) + testTag2_excluded_vegetation_z_correct = ( + "TestTag2 filtered vegetation spawned in correct position", + "TestTag2 filtered vegetation failed to spawn in correct position" + ) + + testTag3_excluded_vegetation_count_correct = ( + "TestTag3 filtered vegetation count correct", + "TestTag3 filtered vegetation count incorrect" + ) + testTag3_excluded_vegetation_z_correct = ( + "TestTag3 filtered vegetation spawned in correct position", + "TestTag3 filtered vegetation failed to spawn in correct position" + ) + + cleared_exclusion_vegetation_count_correct = ( + "Cleared filter vegetation count correct", + "Cleared filter vegetation count incorrect" + ) + +def TerrainSystem_VegetationSpawnsOnTerrainSurfaces(): + """ + Summary: + Load an empty level, + Create two entities with constant gradient components with different values. + Create two entities with TerrainLayerSpawners + Create an entity to spawn vegetation + Ensure that vegetation spawns at the correct heights + Add a VegetationSurfaceMaskFilter and ensure it responds correctly to surface changes. + :return: None + """ + + import os + import sys + import math as sys_math + + import azlmbr.legacy.general as general + import azlmbr.bus as bus + import azlmbr.math as math + + import azlmbr.areasystem as areasystem + import azlmbr.editor as editor + import azlmbr.vegetation as vegetation + import azlmbr.terrain as terrain + import azlmbr.entity as EntityId + import azlmbr.surface_data as surface_data + + import editor_python_test_tools.hydra_editor_utils as hydra + from editor_python_test_tools.utils import Report + from editor_python_test_tools.utils import TestHelper as helper + + def create_entity_at(entity_name, components_to_add, x, y, z): + entity = hydra.Entity(entity_name) + entity.create_entity(math.Vector3(x, y, z), components_to_add) + + return entity + + def FindHighestAndLowestZValuesInArea(aabb): + vegetation_items = areasystem.AreaSystemRequestBus(bus.Broadcast, 'GetInstancesInAabb', aabb) + + lowest_z = min([item.position.z for item in vegetation_items]) + highest_z = max([item.position.z for item in vegetation_items]) + + return highest_z, lowest_z + + helper.init_idle() + + # Open an empty level. + helper.open_level("Physics", "Base") + helper.wait_for_condition(lambda: general.get_current_level_name() == "Base", 2.0) + + general.idle_wait_frames(1) + + box_height = 20.0 + box_y_position = 10.0 + box_dimensions = math.Vector3(20.0, 20.0, box_height) + + # Add Terrain Rendering + hydra.add_level_component("Terrain World") + hydra.add_level_component("Terrain World Renderer") + + # Create two terrain entities at adjoining positions + terrain_entity_1 = create_entity_at("Terrain1", ["Terrain Layer Spawner", "Axis Aligned Box Shape", "Terrain Height Gradient List", "Terrain Surface Gradient List"], 0.0, box_y_position, box_height/2.0) + terrain_entity_1.get_set_test(1, "Axis Aligned Box Shape|Box Configuration|Dimensions", box_dimensions) + + terrain_entity_2 = create_entity_at("Terrain2", ["Terrain Layer Spawner", "Axis Aligned Box Shape", "Terrain Height Gradient List", "Terrain Surface Gradient List"], 20.0, box_y_position, box_height/2.0) + terrain_entity_2.get_set_test(1, "Axis Aligned Box Shape|Box Configuration|Dimensions", box_dimensions) + + # Create two gradient entities. + gradient_value_1 = 0.25 + gradient_value_2 = 0.5 + + gradient_entity_1 = create_entity_at("Gradient1", ["Constant Gradient"], 0.0, 0.0, 0.0) + gradient_entity_1.get_set_test(0, "Configuration|Value", gradient_value_1) + + gradient_entity_2 = create_entity_at("Gradient2", ["Constant Gradient"], 0.0, 0.0, 0.0) + gradient_entity_2.get_set_test(0, "Configuration|Value", gradient_value_2) + + mapping = terrain.TerrainSurfaceGradientMapping() + mapping.gradientEntityId = gradient_entity_1.id + pte = hydra.get_property_tree(terrain_entity_1.components[3]) + pte.add_container_item("Configuration|Gradient to Surface Mappings", 0, mapping) + + mapping = terrain.TerrainSurfaceGradientMapping() + mapping.gradientEntityId = gradient_entity_2.id + pte = hydra.get_property_tree(terrain_entity_2.components[3]) + pte.add_container_item("Configuration|Gradient to Surface Mappings", 0, mapping) + + # create a vegetation entity that overlaps both terrain entities. + vegetation_entity = create_entity_at("Vegetation", ["Vegetation Layer Spawner", "Axis Aligned Box Shape", "Vegetation Asset List", "Vegetation Surface Mask Filter"], 10.0, box_y_position, box_height/2.0) + vegetation_entity.get_set_test(1, "Axis Aligned Box Shape|Box Configuration|Dimensions", box_dimensions) + + # Set the vegetation area to a PrefabInstanceSpawner with a specific prefab asset selected. + prefab_spawner = vegetation.PrefabInstanceSpawner() + prefab_spawner.SetPrefabAssetPath(os.path.join("Prefabs", "PinkFlower.spawnable")) + descriptor = hydra.get_component_property_value(vegetation_entity.components[2], 'Configuration|Embedded Assets|[0]') + descriptor.spawner = prefab_spawner + vegetation_entity.get_set_test(2, "Configuration|Embedded Assets|[0]", descriptor) + + # Assign gradients to layer spawners. + terrain_entity_1.get_set_test(2, "Configuration|Gradient Entities", [gradient_entity_1.id]) + terrain_entity_2.get_set_test(2, "Configuration|Gradient Entities", [gradient_entity_2.id]) + + # Move view so that the entities are visible. + general.set_current_view_position(17.0, -66.0, 41.0) + general.set_current_view_rotation(-15, 0, 0) + + # Expected item counts under conditions to be tested. + # By default, vegetation spawns at a density of 20 items per 16 meters, + # so in a 20m square, there should be around 25 ^ 2 items depending on whether area edges are included. + # In this case there are 26 ^ 2 items. + expected_surface_tag_excluded_item_count = 338 + expected_no_exclusions_item_count = 676 + + # Wait for the vegetation to spawn + helper.wait_for_condition(lambda: vegetation.VegetationSpawnerRequestBus(bus.Event, "GetAreaProductCount", vegetation_entity.id) == expected_no_exclusions_item_count, 5.0) + + # Check the spawn count is correct. + item_count = vegetation.VegetationSpawnerRequestBus(bus.Event, "GetAreaProductCount", vegetation_entity.id) + Report.result(VegetationTests.unfiltered_vegetation_count_correct, item_count == expected_no_exclusions_item_count) + + test_aabb = math.Aabb_CreateFromMinMax(math.Vector3(-10.0, -10.0, 0.0), math.Vector3(30.0, 10.0, box_height)) + + # Find the z positions of the items with the lowest and highest x values, this will avoid the overlap area where z values are blended between the surface heights. + highest_z, lowest_z = FindHighestAndLowestZValuesInArea(test_aabb) + + # Check that the z values are as expected. + Report.result(VegetationTests.vegetation_on_gradient_1, sys_math.isclose(lowest_z, box_height * gradient_value_1, abs_tol=0.01)) + Report.result(VegetationTests.vegetation_on_gradient_2, sys_math.isclose(highest_z, box_height * gradient_value_2, abs_tol=0.01)) + + # Assign SurfaceTags to the SurfaceGradientLists + terrain_entity_1.get_set_test(3, "Configuration|Gradient to Surface Mappings|[0]|Surface Tag", surface_data.SurfaceTag("test_tag2")) + terrain_entity_2.get_set_test(3, "Configuration|Gradient to Surface Mappings|[0]|Surface Tag", surface_data.SurfaceTag("test_tag3")) + + # Give the VegetationSurfaceFilter an exclusion list, set it to exclude test_tag2 which should remove all the lower items which are in terrain_entity_1. + vegetation_entity.get_set_test(3, "Configuration|Exclusion|Surface Tags", [surface_data.SurfaceTag()]) + vegetation_entity.get_set_test(3, "Configuration|Exclusion|Surface Tags|[0]", surface_data.SurfaceTag("test_tag2")) + + # Wait for the vegetation to respawn and check z values. + helper.wait_for_condition(lambda: vegetation.VegetationSpawnerRequestBus(bus.Event, "GetAreaProductCount", vegetation_entity.id) == expected_surface_tag_excluded_item_count, 5.0) + + item_count = vegetation.VegetationSpawnerRequestBus(bus.Event, "GetAreaProductCount", vegetation_entity.id) + Report.result(VegetationTests.testTag2_excluded_vegetation_count_correct, item_count == expected_surface_tag_excluded_item_count) + + highest_z, lowest_z = FindHighestAndLowestZValuesInArea(test_aabb) + + Report.result(VegetationTests.testTag2_excluded_vegetation_z_correct, lowest_z > box_height * gradient_value_1) + + # Clear the filter and ensure vegetation respawns. + vegetation_entity.get_set_test(3, "Configuration|Exclusion|Surface Tags|[0]", surface_data.SurfaceTag("invalid")) + helper.wait_for_condition(lambda: vegetation.VegetationSpawnerRequestBus(bus.Event, "GetAreaProductCount", vegetation_entity.id) == expected_no_exclusions_item_count, 5.0) + + item_count = vegetation.VegetationSpawnerRequestBus(bus.Event, "GetAreaProductCount", vegetation_entity.id) + Report.result(VegetationTests.cleared_exclusion_vegetation_count_correct, item_count == expected_no_exclusions_item_count) + + # Exclude test_tag3 to exclude the higher items in terrain_entity_2 and recheck. + vegetation_entity.get_set_test(3, "Configuration|Exclusion|Surface Tags|[0]", surface_data.SurfaceTag("test_tag3")) + + helper.wait_for_condition(lambda: vegetation.VegetationSpawnerRequestBus(bus.Event, "GetAreaProductCount", vegetation_entity.id) == expected_surface_tag_excluded_item_count, 5.0) + + item_count = vegetation.VegetationSpawnerRequestBus(bus.Event, "GetAreaProductCount", vegetation_entity.id) + Report.result(VegetationTests.testTag3_excluded_vegetation_count_correct, item_count == expected_surface_tag_excluded_item_count) + + highest_z, lowest_z = FindHighestAndLowestZValuesInArea(test_aabb) + + Report.result(VegetationTests.testTag3_excluded_vegetation_z_correct, highest_z < box_height * gradient_value_2) + +if __name__ == "__main__": + + from editor_python_test_tools.utils import Report + Report.start_test(TerrainSystem_VegetationSpawnsOnTerrainSurfaces) \ No newline at end of file diff --git a/AutomatedTesting/Gem/PythonTests/Terrain/EditorScripts/Terrain_SupportsPhysics.py b/AutomatedTesting/Gem/PythonTests/Terrain/EditorScripts/Terrain_SupportsPhysics.py new file mode 100644 index 0000000000..390ec6a6b0 --- /dev/null +++ b/AutomatedTesting/Gem/PythonTests/Terrain/EditorScripts/Terrain_SupportsPhysics.py @@ -0,0 +1,164 @@ +""" +Copyright (c) Contributors to the Open 3D Engine Project. +For complete copyright and license terms please see the LICENSE at the root of this distribution. + +SPDX-License-Identifier: Apache-2.0 OR MIT +""" + +#fmt: off +class Tests(): + create_terrain_spawner_entity = ("Terrain_spawner_entity created successfully", "Failed to create terrain_spawner_entity") + create_height_provider_entity = ("Height_provider_entity created successfully", "Failed to create height_provider_entity") + create_test_ball = ("Ball created successfully", "Failed to create Ball") + box_dimensions_changed = ("Aabb dimensions changed successfully", "Failed change Aabb dimensions") + shape_changed = ("Shape changed successfully", "Failed Shape change") + entity_added = ("Entity added successfully", "Failed Entity add") + frequency_changed = ("Frequency changed successfully", "Failed Frequency change") + shape_set = ("Shape set to Sphere successfully", "Failed to set Sphere shape") + test_collision = ("Ball collided with terrain", "Ball failed to collide with terrain") + no_errors_and_warnings_found = ("No errors and warnings found", "Found errors and warnings") +#fmt: on + +def Terrain_SupportsPhysics(): + """ + Summary: + Test aspects of the TerrainHeightGradientList through the BehaviorContext and the Property Tree. + + Test Steps: + Expected Behavior: + The Editor is stable there are no warnings or errors. + + Test Steps: + 1) Load the base level + 2) Create 2 test entities, one parent at 512.0, 512.0, 50.0 and one child at the default position and add the required components + 2a) Create a ball at 600.0, 600.0, 46.0 - This position is not too high over the heightfield so will collide in a reasonable time + 3) Start the Tracer to catch any errors and warnings + 4) Change the Axis Aligned Box Shape dimensions + 5) Set the Vegetation Shape reference to TestEntity1 + 6) Set the FastNoise gradient frequency to 0.01 + 7) Set the Gradient List to TestEntity2 + 8) Set the PhysX Collider to Sphere mode + 9) Disable and Enable the Terrain Gradient List so that it is recognised + 10) Enter game mode and test if the ball hits the heightfield within 3 seconds + 11) Verify there are no errors and warnings in the logs + + + :return: None + """ + + from editor_python_test_tools.editor_entity_utils import EditorEntity + from editor_python_test_tools.utils import TestHelper as helper, Report + from editor_python_test_tools.utils import Report, Tracer + import editor_python_test_tools.hydra_editor_utils as hydra + import azlmbr.math as azmath + import azlmbr.legacy.general as general + import azlmbr.bus as bus + import azlmbr.editor as editor + import math + + SET_BOX_X_SIZE = 1024.0 + SET_BOX_Y_SIZE = 1024.0 + SET_BOX_Z_SIZE = 100.0 + + helper.init_idle() + + # 1) Load the level + helper.open_level("", "Base") + helper.wait_for_condition(lambda: general.get_current_level_name() == "Base", 2.0) + + #1a) Load the level components + hydra.add_level_component("Terrain World") + hydra.add_level_component("Terrain World Renderer") + + # 2) Create 2 test entities, one parent at 512.0, 512.0, 50.0 and one child at the default position and add the required components + entity1_components_to_add = ["Axis Aligned Box Shape", "Terrain Layer Spawner", "Terrain Height Gradient List", "Terrain Physics Heightfield Collider", "PhysX Heightfield Collider"] + entity2_components_to_add = ["Shape Reference", "Gradient Transform Modifier", "FastNoise Gradient"] + ball_components_to_add = ["Sphere Shape", "PhysX Collider", "PhysX Rigid Body"] + terrain_spawner_entity = hydra.Entity("TestEntity1") + terrain_spawner_entity.create_entity(azmath.Vector3(512.0, 512.0, 50.0), entity1_components_to_add) + Report.result(Tests.create_terrain_spawner_entity, terrain_spawner_entity.id.IsValid()) + height_provider_entity = hydra.Entity("TestEntity2") + height_provider_entity.create_entity(azmath.Vector3(0.0, 0.0, 0.0), entity2_components_to_add,terrain_spawner_entity.id) + Report.result(Tests.create_height_provider_entity, height_provider_entity.id.IsValid()) + # 2a) Create a ball at 600.0, 600.0, 46.0 - This position is not too high over the heightfield so will collide in a reasonable time + ball = hydra.Entity("Ball") + ball.create_entity(azmath.Vector3(600.0, 600.0, 46.0), ball_components_to_add) + Report.result(Tests.create_test_ball, ball.id.IsValid()) + # Give everything a chance to finish initializing. + general.idle_wait_frames(1) + + # 3) Start the Tracer to catch any errors and warnings + with Tracer() as section_tracer: + # 4) Change the Axis Aligned Box Shape dimensions + box_dimensions = azmath.Vector3(SET_BOX_X_SIZE, SET_BOX_Y_SIZE, SET_BOX_Z_SIZE) + terrain_spawner_entity.get_set_test(0, "Axis Aligned Box Shape|Box Configuration|Dimensions", box_dimensions) + box_shape_dimensions = hydra.get_component_property_value(terrain_spawner_entity.components[0], "Axis Aligned Box Shape|Box Configuration|Dimensions") + Report.result(Tests.box_dimensions_changed, box_dimensions == box_shape_dimensions) + + # 5) Set the Vegetaion Shape reference to TestEntity1 + height_provider_entity.get_set_test(0, "Configuration|Shape Entity Id", terrain_spawner_entity.id) + entityId = hydra.get_component_property_value(height_provider_entity.components[0], "Configuration|Shape Entity Id") + Report.result(Tests.shape_changed, entityId == terrain_spawner_entity.id) + + # 6) Set the FastNoise Gradient frequency to 0.01 + Frequency = 0.01 + height_provider_entity.get_set_test(2, "Configuration|Frequency", Frequency) + FrequencyVal = hydra.get_component_property_value(height_provider_entity.components[2], "Configuration|Frequency") + Report.result(Tests.frequency_changed, math.isclose(Frequency, FrequencyVal, abs_tol = 0.00001)) + + # 7) Set the Gradient List to TestEntity2 + propertyTree = hydra.get_property_tree(terrain_spawner_entity.components[2]) + propertyTree.add_container_item("Configuration|Gradient Entities", 0, height_provider_entity.id) + checkID = propertyTree.get_container_item("Configuration|Gradient Entities", 0) + Report.result(Tests.entity_added, checkID.GetValue() == height_provider_entity.id) + + # 8) Set the PhysX Collider to Sphere mode + shape = 0 + hydra.get_set_test(ball, 1, "Shape Configuration|Shape", shape) + setShape = hydra.get_component_property_value(ball.components[1], "Shape Configuration|Shape") + Report.result(Tests.shape_set, shape == setShape) + + # 9) Disable and Enable the Terrain Gradient List so that it is recognised + editor.EditorComponentAPIBus(bus.Broadcast, 'EnableComponents', [terrain_spawner_entity.components[2]]) + + general.enter_game_mode() + + general.idle_wait_frames(1) + + # 10) Enter game mode and test if the ball hits the heightfield within 3 seconds + TIMEOUT = 3.0 + + class Collider: + id = general.find_game_entity("Ball") + touched_ground = False + + terrain_id = general.find_game_entity("TestEntity1") + + def on_collision_begin(args): + other_id = args[0] + if other_id.Equal(terrain_id): + Report.info("Touched ground") + Collider.touched_ground = True + + handler = azlmbr.physics.CollisionNotificationBusHandler() + handler.connect(Collider.id) + handler.add_callback("OnCollisionBegin", on_collision_begin) + + helper.wait_for_condition(lambda: Collider.touched_ground, TIMEOUT) + Report.result(Tests.test_collision, Collider.touched_ground) + + general.exit_game_mode() + + # 11) Verify there are no errors and warnings in the logs + helper.wait_for_condition(lambda: section_tracer.has_errors or section_tracer.has_asserts, 1.0) + for error_info in section_tracer.errors: + Report.info(f"Error: {error_info.filename} {error_info.function} | {error_info.message}") + for assert_info in section_tracer.asserts: + Report.info(f"Assert: {assert_info.filename} {assert_info.function} | {assert_info.message}") + + +if __name__ == "__main__": + + from editor_python_test_tools.utils import Report + Report.start_test(Terrain_SupportsPhysics) + diff --git a/AutomatedTesting/Gem/PythonTests/Terrain/EditorScripts/Terrain_World_ConfigurationWorks.py b/AutomatedTesting/Gem/PythonTests/Terrain/EditorScripts/Terrain_World_ConfigurationWorks.py new file mode 100644 index 0000000000..bb5dcb3bea --- /dev/null +++ b/AutomatedTesting/Gem/PythonTests/Terrain/EditorScripts/Terrain_World_ConfigurationWorks.py @@ -0,0 +1,168 @@ +""" +Copyright (c) Contributors to the Open 3D Engine Project. +For complete copyright and license terms please see the LICENSE at the root of this distribution. + +SPDX-License-Identifier: Apache-2.0 OR MIT +""" + +#fmt: off +class Tests(): + level_components_added = ("Level components added correctly", "Failed to create level components") + create_terrain_spawner_entity = ("Terrain_spawner_entity created successfully", "Failed to create terrain_spawner_entity") + create_height_provider_entity = ("Height_provider_entity created successfully", "Failed to create height_provider_entity") + bounds_max_changed = ("Terrain World Bounds Max changed successfully", "Failed to change Terrain World Bounds Max") + bounds_min_changed = ("Terrain World Bounds Min changed successfully", "Failed to change Terrain World Bounds Min") + height_query_changed = ("Terrain World Height Query Resolution changed successfully", "Failed to change Height Query Resolution") + box_dimensions_changed = ("Aabb dimensions changed successfully", "Failed to change Aabb dimensions") + shape_changed = ("Shape changed successfully", "Failed Shape change") + frequency_changed = ("Frequency changed successfully", "Failed Frequency change") + entity_added = ("Entity added successfully", "Failed Entity add") + terrain_exists = ("Terrain exists at the provided point", "Terrain does not exist at the provided point") + terrain_does_not_exist = ("Terrain does not exist at the provided point", "Terrain exists at the provided point") + values_not_the_same = ("The tested values are not the same", "The tested values are the same") + no_errors_and_warnings_found = ("No errors and warnings found", "Found errors and warnings") +#fmt: on + +def Terrain_World_ConfigurationWorks(): + """ + Summary: + Test the Terrain World configuration changes when parameters are changed in the component + + Test Steps: + Expected Behavior: + The Editor is stable there are no warnings or errors. + + Test Steps: + 1) Start the Tracer to catch any errors and warnings + 2) Load the base level + 3) Load the level components + 4) Create 2 test entities, one parent at 512.0, 512.0, 50.0 and one child at the default position and add the required components + 5) Set the base Terrain World values + 6) Change the Axis Aligned Box Shape dimensions + 7) Set the Shape Reference to terrain_spawner_entity + 8) Set the FastNoise Gradient frequency to 0.01 + 9) Set the Gradient List to height_provider_entity + 10) Disable and Enable the Terrain Gradient List so that it is recognised + 11) Check terrain exists at a known position in the world + 12) Check terrain does not exist at a known position outside the world + 13) Check height value is the expected one when query resolution is changed + """ + from editor_python_test_tools.editor_entity_utils import EditorEntity + from editor_python_test_tools.utils import TestHelper as helper, Report + from editor_python_test_tools.utils import Report, Tracer + import editor_python_test_tools.hydra_editor_utils as hydra + import azlmbr.math as azmath + import azlmbr.legacy.general as general + import azlmbr.bus as bus + import azlmbr.editor as editor + import azlmbr.terrain as terrain + import math + + SET_BOX_X_SIZE = 2048.0 + SET_BOX_Y_SIZE = 2048.0 + SET_BOX_Z_SIZE = 100.0 + CLAMP = 1 + + helper.init_idle() + + # 1) Start the Tracer to catch any errors and warnings + with Tracer() as section_tracer: + # 2) Load the level + helper.open_level("", "Base") + helper.wait_for_condition(lambda: general.get_current_level_name() == "Base", 2.0) + + # 3) Load the level components + terrain_world_component = hydra.add_level_component("Terrain World") + terrain_world_renderer = hydra.add_level_component("Terrain World Renderer") + Report.critical_result(Tests.level_components_added, + terrain_world_component is not None and terrain_world_renderer is not None) + + # 4) Create 2 test entities, one parent at 512.0, 512.0, 50.0 and one child at the default position and add the required components + entity1_components_to_add = ["Axis Aligned Box Shape", "Terrain Layer Spawner", "Terrain Height Gradient List", "Terrain Physics Heightfield Collider"] + entity2_components_to_add = ["Shape Reference", "Gradient Transform Modifier", "FastNoise Gradient"] + terrain_spawner_entity = hydra.Entity("TerrainEntity") + terrain_spawner_entity.create_entity(azmath.Vector3(512.0, 512.0, 50.0), entity1_components_to_add) + Report.result(Tests.create_terrain_spawner_entity, terrain_spawner_entity.id.IsValid()) + height_provider_entity = hydra.Entity("HeightProviderEntity") + height_provider_entity.create_entity(azmath.Vector3(0.0, 0.0, 0.0), entity2_components_to_add,terrain_spawner_entity.id) + Report.result(Tests.create_height_provider_entity, height_provider_entity.id.IsValid()) + + # Give everything a chance to finish initializing. + general.idle_wait_frames(1) + + # 5) Set the base Terrain World values + world_bounds_max = azmath.Vector3(1100.0, 1100.0, 1100.0) + world_bounds_min = azmath.Vector3(10.0, 10.0, 10.0) + height_query_resolution = azmath.Vector2(1.0, 1.0) + hydra.set_component_property_value(terrain_world_component, "Configuration|World Bounds (Max)", world_bounds_max) + hydra.set_component_property_value(terrain_world_component, "Configuration|World Bounds (Min)", world_bounds_min) + hydra.set_component_property_value(terrain_world_component, "Configuration|Height Query Resolution (m)", height_query_resolution) + world_max = hydra.get_component_property_value(terrain_world_component, "Configuration|World Bounds (Max)") + world_min = hydra.get_component_property_value(terrain_world_component, "Configuration|World Bounds (Min)") + world_query = hydra.get_component_property_value(terrain_world_component, "Configuration|Height Query Resolution (m)") + Report.result(Tests.bounds_max_changed, world_max == world_bounds_max) + Report.result(Tests.bounds_min_changed, world_min == world_bounds_min) + Report.result(Tests.height_query_changed, world_query == height_query_resolution) + + # 6) Change the Axis Aligned Box Shape dimensions + box_dimensions = azmath.Vector3(SET_BOX_X_SIZE, SET_BOX_Y_SIZE, SET_BOX_Z_SIZE) + terrain_spawner_entity.get_set_test(0, "Axis Aligned Box Shape|Box Configuration|Dimensions", box_dimensions) + box_shape_dimensions = hydra.get_component_property_value(terrain_spawner_entity.components[0], "Axis Aligned Box Shape|Box Configuration|Dimensions") + Report.result(Tests.box_dimensions_changed, box_dimensions == box_shape_dimensions) + + # 7) Set the Shape Reference to terrain_spawner_entity + height_provider_entity.get_set_test(0, "Configuration|Shape Entity Id", terrain_spawner_entity.id) + entityId = hydra.get_component_property_value(height_provider_entity.components[0], "Configuration|Shape Entity Id") + Report.result(Tests.shape_changed, entityId == terrain_spawner_entity.id) + + # 8) Set the FastNoise Gradient frequency to 0.01 + frequency = 0.01 + height_provider_entity.get_set_test(2, "Configuration|Frequency", frequency) + frequencyVal = hydra.get_component_property_value(height_provider_entity.components[2], "Configuration|Frequency") + Report.result(Tests.frequency_changed, math.isclose(frequency, frequencyVal, abs_tol = 0.00001)) + + # 9) Set the Gradient List to height_provider_entity + propertyTree = hydra.get_property_tree(terrain_spawner_entity.components[2]) + propertyTree.add_container_item("Configuration|Gradient Entities", 0, height_provider_entity.id) + checkID = propertyTree.get_container_item("Configuration|Gradient Entities", 0) + Report.result(Tests.entity_added, checkID.GetValue() == height_provider_entity.id) + + general.idle_wait_frames(1) + + # 10) Disable and Enable the Terrain Gradient List so that it is recognised, EnableComponents performs both actions. + editor.EditorComponentAPIBus(bus.Broadcast, 'EnableComponents', [terrain_spawner_entity.components[2]]) + + # 11) Check terrain exists at a known position in the world + terrainExists = not terrain.TerrainDataRequestBus(bus.Broadcast, 'GetIsHoleFromFloats', 10.0, 10.0, CLAMP) + Report.result(Tests.terrain_exists, terrainExists) + + terrainExists = not terrain.TerrainDataRequestBus(bus.Broadcast, 'GetIsHoleFromFloats', 1100.0, 1100.0, CLAMP) + Report.result(Tests.terrain_exists, terrainExists) + + # 12) Check terrain does not exist at a known position outside the world + terrainDoesNotExist = terrain.TerrainDataRequestBus(bus.Broadcast, 'GetIsHoleFromFloats', 1101.0, 1101.0, CLAMP) + Report.result(Tests.terrain_does_not_exist, terrainDoesNotExist) + + terrainDoesNotExist = terrain.TerrainDataRequestBus(bus.Broadcast, 'GetIsHoleFromFloats', 9.0, 9.0, CLAMP) + Report.result(Tests.terrain_does_not_exist, terrainDoesNotExist) + + # 13) Check height value is the expected one when query resolution is changed + testpoint = terrain.TerrainDataRequestBus(bus.Broadcast, 'GetHeightFromFloats', 10.5, 10.5, CLAMP) + height_query_resolution = azmath.Vector2(0.5, 0.5) + hydra.set_component_property_value(terrain_world_component, "Configuration|Height Query Resolution (m)", height_query_resolution) + general.idle_wait_frames(1) + testpoint2 = terrain.TerrainDataRequestBus(bus.Broadcast, 'GetHeightFromFloats', 10.5, 10.5, CLAMP) + Report.result(Tests.values_not_the_same, not math.isclose(testpoint, testpoint2, abs_tol = 0.000000001)) + + helper.wait_for_condition(lambda: section_tracer.has_errors or section_tracer.has_asserts, 1.0) + for error_info in section_tracer.errors: + Report.info(f"Error: {error_info.filename} {error_info.function} | {error_info.message}") + for assert_info in section_tracer.asserts: + Report.info(f"Assert: {assert_info.filename} {assert_info.function} | {assert_info.message}") + + +if __name__ == "__main__": + + from editor_python_test_tools.utils import Report + Report.start_test(Terrain_World_ConfigurationWorks) + diff --git a/AutomatedTesting/Gem/PythonTests/Terrain/TestSuite_Main.py b/AutomatedTesting/Gem/PythonTests/Terrain/TestSuite_Main.py new file mode 100644 index 0000000000..98c4f8a660 --- /dev/null +++ b/AutomatedTesting/Gem/PythonTests/Terrain/TestSuite_Main.py @@ -0,0 +1,41 @@ +""" +Copyright (c) Contributors to the Open 3D Engine Project. +For complete copyright and license terms please see the LICENSE at the root of this distribution. + +SPDX-License-Identifier: Apache-2.0 OR MIT + +""" + +# This suite consists of all test cases that are passing and have been verified. + +import pytest +import os +import sys + +from ly_test_tools import LAUNCHERS +from ly_test_tools.o3de.editor_test import EditorTestSuite, EditorSharedTest + +@pytest.mark.SUITE_main +@pytest.mark.parametrize("launcher_platform", ['windows_editor']) +@pytest.mark.parametrize("project", ["AutomatedTesting"]) +class TestAutomation(EditorTestSuite): + + enable_prefab_system = False + + class test_AxisAlignedBoxShape_ConfigurationWorks(EditorSharedTest): + from .EditorScripts import TerrainPhysicsCollider_ChangesSizeWithAxisAlignedBoxShapeChanges as test_module + + class test_Terrain_SupportsPhysics(EditorSharedTest): + from .EditorScripts import Terrain_SupportsPhysics as test_module + + class test_TerrainHeightGradientList_AddRemoveGradientWorks(EditorSharedTest): + from .EditorScripts import TerrainHeightGradientList_AddRemoveGradientWorks as test_module + + class test_TerrainSystem_VegetationSpawnsOnTerrainSurfaces(EditorSharedTest): + from .EditorScripts import TerrainSystem_VegetationSpawnsOnTerrainSurfaces as test_module + + class test_TerrainMacroMaterialComponent_MacroMaterialActivates(EditorSharedTest): + from .EditorScripts import TerrainMacroMaterialComponent_MacroMaterialActivates as test_module + + class test_TerrainWorld_ConfigurationWorks(EditorSharedTest): + from .EditorScripts import Terrain_World_ConfigurationWorks as test_module diff --git a/AutomatedTesting/Gem/PythonTests/Terrain/__init__.py b/AutomatedTesting/Gem/PythonTests/Terrain/__init__.py new file mode 100644 index 0000000000..f5193b300e --- /dev/null +++ b/AutomatedTesting/Gem/PythonTests/Terrain/__init__.py @@ -0,0 +1,6 @@ +""" +Copyright (c) Contributors to the Open 3D Engine Project. +For complete copyright and license terms please see the LICENSE at the root of this distribution. + +SPDX-License-Identifier: Apache-2.0 OR MIT +""" diff --git a/AutomatedTesting/Gem/PythonTests/WhiteBox/TestSuite_Main.py b/AutomatedTesting/Gem/PythonTests/WhiteBox/TestSuite_Main.py index fa6c81c98a..2fc717e256 100644 --- a/AutomatedTesting/Gem/PythonTests/WhiteBox/TestSuite_Main.py +++ b/AutomatedTesting/Gem/PythonTests/WhiteBox/TestSuite_Main.py @@ -24,12 +24,12 @@ from base import TestAutomationBase class TestAutomation(TestAutomationBase): def test_WhiteBox_AddComponentToEntity(self, request, workspace, editor, launcher_platform): from .tests import WhiteBox_AddComponentToEntity as test_module - self._run_test(request, workspace, editor, test_module) + self._run_test(request, workspace, editor, test_module, enable_prefab_system=False) def test_WhiteBox_SetDefaultShape(self, request, workspace, editor, launcher_platform): from .tests import WhiteBox_SetDefaultShape as test_module - self._run_test(request, workspace, editor, test_module) + self._run_test(request, workspace, editor, test_module, enable_prefab_system=False) def test_WhiteBox_SetInvisible(self, request, workspace, editor, launcher_platform): from .tests import WhiteBox_SetInvisible as test_module - self._run_test(request, workspace, editor, test_module) + self._run_test(request, workspace, editor, test_module, enable_prefab_system=False) diff --git a/AutomatedTesting/Gem/PythonTests/assetpipeline/ap_fixtures/ap_missing_dependency_fixture.py b/AutomatedTesting/Gem/PythonTests/assetpipeline/ap_fixtures/ap_missing_dependency_fixture.py index 857d91bb12..7f7f420fd0 100755 --- a/AutomatedTesting/Gem/PythonTests/assetpipeline/ap_fixtures/ap_missing_dependency_fixture.py +++ b/AutomatedTesting/Gem/PythonTests/assetpipeline/ap_fixtures/ap_missing_dependency_fixture.py @@ -183,23 +183,26 @@ def ap_missing_dependency_fixture(request, workspace, ap_setup_fixture) -> Any: :return: None """ logger.info(f"Searching output for expected dependencies for product {product}") + sorted_expected = sorted(expected_dependencies) # Check dependencies found either in the log or console output for product_name, missing_deps in self.extract_missing_dependencies_from_output(log_output).items(): if product in product_name: + sorted_missing = sorted(missing_deps) # fmt:off - assert sorted(missing_deps) == sorted(expected_dependencies), \ + assert sorted_expected == sorted_missing, \ f"Missing dependencies for '{product_name}' did not match expected. Expected: " \ - f"{expected_dependencies}, Actual: {missing_deps}" + f"{sorted_expected}, Actual: {sorted_missing}" # fmt:on # Check dependencies found in Database for product_name, missing_deps in self.extract_missing_dependencies_from_database(product, platforms).items(): if product.replace("\\", "/") in product_name: + sorted_missing = sorted(missing_deps) # fmt:off - assert sorted(expected_dependencies) == sorted(missing_deps), \ - f"Product '{product_name}' expected missing dependencies: {expected_dependencies}; " \ - f"actual missing dependencies {missing_deps}" + assert sorted_expected == sorted_missing, \ + f"Product '{product_name}' expected missing dependencies: {sorted_expected}; " \ + f"actual missing dependencies {sorted_missing}" # fmt:on def __getitem__(self, item: str) -> object: diff --git a/AutomatedTesting/Gem/PythonTests/assetpipeline/ap_fixtures/ap_setup_fixture.py b/AutomatedTesting/Gem/PythonTests/assetpipeline/ap_fixtures/ap_setup_fixture.py index 244ecfb516..c5b02e4f28 100755 --- a/AutomatedTesting/Gem/PythonTests/assetpipeline/ap_fixtures/ap_setup_fixture.py +++ b/AutomatedTesting/Gem/PythonTests/assetpipeline/ap_fixtures/ap_setup_fixture.py @@ -4,7 +4,7 @@ For complete copyright and license terms please see the LICENSE at the root of t SPDX-License-Identifier: Apache-2.0 OR MIT -A fixture for Setting Up Asset Processor Batch workspace for tests in lmbr_test +A fixture for Setting Up Asset Processor Batch workspace for tests """ # Import builtin libraries diff --git a/AutomatedTesting/Gem/PythonTests/assetpipeline/ap_fixtures/asset_processor_fixture.py b/AutomatedTesting/Gem/PythonTests/assetpipeline/ap_fixtures/asset_processor_fixture.py index eea6cb9224..885b4c2959 100755 --- a/AutomatedTesting/Gem/PythonTests/assetpipeline/ap_fixtures/asset_processor_fixture.py +++ b/AutomatedTesting/Gem/PythonTests/assetpipeline/ap_fixtures/asset_processor_fixture.py @@ -4,7 +4,7 @@ For complete copyright and license terms please see the LICENSE at the root of t SPDX-License-Identifier: Apache-2.0 OR MIT -A fixture for using the Asset Processor in lmbr_test, this will stop the asset processor after every test via +A fixture for using the Asset Processor, this will stop the asset processor after every test via the teardown. Using the fixture at class level will stop the asset processor after the suite completes. Using the fixture at test level will stop asset processor after the test completes. Calling this fixture as a test argument will still run the teardown to stop the Asset Processor. """ @@ -15,6 +15,7 @@ import logging # Import LyTestTools import ly_test_tools.o3de.asset_processor as asset_processor_commands +import ly_test_tools.o3de.asset_processor_utils logger = logging.getLogger(__name__) @@ -36,5 +37,8 @@ def asset_processor(request: pytest.fixture, workspace: pytest.fixture) -> asset ap.stop() request.addfinalizer(teardown) + for n in ly_test_tools.o3de.asset_processor_utils.processList: + assert not ly_test_tools.o3de.asset_processor_utils.check_ap_running(n), f"{n} process did not shutdown correctly." + return ap diff --git a/AutomatedTesting/Gem/PythonTests/assetpipeline/ap_fixtures/bundler_batch_setup_fixture.py b/AutomatedTesting/Gem/PythonTests/assetpipeline/ap_fixtures/bundler_batch_setup_fixture.py index ff362c732c..9281d5947e 100755 --- a/AutomatedTesting/Gem/PythonTests/assetpipeline/ap_fixtures/bundler_batch_setup_fixture.py +++ b/AutomatedTesting/Gem/PythonTests/assetpipeline/ap_fixtures/bundler_batch_setup_fixture.py @@ -158,7 +158,7 @@ def bundler_batch_setup_fixture(request, workspace, asset_processor, timeout) -> else: cmd.append(f"--{key}") if append_defaults: - cmd.append(f"--project-path={workspace.project}") + cmd.append(f"--project-path={workspace.paths.project()}") return cmd # ****** diff --git a/AutomatedTesting/Gem/PythonTests/assetpipeline/ap_fixtures/clear_moveoutput_fixture.py b/AutomatedTesting/Gem/PythonTests/assetpipeline/ap_fixtures/clear_moveoutput_fixture.py index 30ecac9a65..4b23f52006 100755 --- a/AutomatedTesting/Gem/PythonTests/assetpipeline/ap_fixtures/clear_moveoutput_fixture.py +++ b/AutomatedTesting/Gem/PythonTests/assetpipeline/ap_fixtures/clear_moveoutput_fixture.py @@ -3,8 +3,6 @@ Copyright (c) Contributors to the Open 3D Engine Project. For complete copyright and license terms please see the LICENSE at the root of this distribution. SPDX-License-Identifier: Apache-2.0 OR MIT - -Fixture for clearing out 'MoveOutput' folders from \dev and \dev\PROJECT """ # Import builtin libraries diff --git a/AutomatedTesting/Gem/PythonTests/assetpipeline/asset_processor_tests/CMakeLists.txt b/AutomatedTesting/Gem/PythonTests/assetpipeline/asset_processor_tests/CMakeLists.txt index 5a5809595e..e37a5ed99b 100644 --- a/AutomatedTesting/Gem/PythonTests/assetpipeline/asset_processor_tests/CMakeLists.txt +++ b/AutomatedTesting/Gem/PythonTests/assetpipeline/asset_processor_tests/CMakeLists.txt @@ -103,6 +103,19 @@ if(PAL_TRAIT_BUILD_TESTS_SUPPORTED AND PAL_TRAIT_BUILD_HOST_TOOLS) AZ::AssetBundlerBatch ) + ly_add_pytest( + NAME AssetPipelineTests.BundleMode + PATH ${CMAKE_CURRENT_LIST_DIR}/bundle_mode_tests.py + EXCLUDE_TEST_RUN_TARGET_FROM_IDE + TEST_SERIAL + TEST_SUITE periodic + RUNTIME_DEPENDENCIES + AZ::AssetProcessor + AZ::AssetBundlerBatch + Legacy::Editor + AutomatedTesting.Assets + ) + ly_add_pytest( NAME AssetPipelineTests.AssetBuilder PATH ${CMAKE_CURRENT_LIST_DIR}/asset_builder_tests.py diff --git a/AutomatedTesting/Gem/PythonTests/assetpipeline/asset_processor_tests/asset_bundler_batch_tests.py b/AutomatedTesting/Gem/PythonTests/assetpipeline/asset_processor_tests/asset_bundler_batch_tests.py index 7f85e5e317..f64427f6df 100755 --- a/AutomatedTesting/Gem/PythonTests/assetpipeline/asset_processor_tests/asset_bundler_batch_tests.py +++ b/AutomatedTesting/Gem/PythonTests/assetpipeline/asset_processor_tests/asset_bundler_batch_tests.py @@ -88,214 +88,6 @@ class TestsAssetBundlerBatch_WindowsAndMac(object): bundler_batch_helper.call_bundles(help="") bundler_batch_helper.call_bundleSeed(help="") - @pytest.mark.BAT - @pytest.mark.assetpipeline - @pytest.mark.test_case_id("C16877175") - @pytest.mark.skip("'animations/animationeditorfiles/sample1.animgraph' missing, needs investigation") - def test_WindowsAndMac_CreateAssetList_DependenciesCorrect(self, workspace, bundler_batch_helper): - r""" - Tests that an asset list created maps dependencies correctly. - testdependencieslevel\level.pak and lists of known dependencies are used for validation - - Test Steps: - 1. Create an asset list from the level.pak - 2. Create Lists of expected assets in the level.pak - 3. Add lists of expected assets to a single list - 4. Compare list of expected assets to actual assets - """ - helper = bundler_batch_helper - - # Create the asset list file - helper.call_assetLists( - addSeed=r"levels\testdependencieslevel\level.pak", - assetListFile=helper['asset_info_file_request'] - ) - - assert os.path.isfile(helper["asset_info_file_result"]) - - # Lists of known relative locations of assets - default_level_assets = [ - "engineassets/texturemsg/defaultnouvs.dds", - "engineassets/texturemsg/defaultnouvs.dds.1", - "engineassets/texturemsg/defaultnouvs.dds.2", - "engineassets/texturemsg/defaultnouvs.dds.3", - "engineassets/texturemsg/defaultnouvs.dds.4", - "engineassets/texturemsg/defaultnouvs.dds.5", - "engineassets/texturemsg/defaultnouvs.dds.6", - "engineassets/texturemsg/defaultnouvs.dds.7", - "engineassets/texturemsg/defaultnouvs_ddn.dds", - "engineassets/texturemsg/defaultnouvs_ddn.dds.1", - "engineassets/texturemsg/defaultnouvs_ddn.dds.2", - "engineassets/texturemsg/defaultnouvs_ddn.dds.3", - "engineassets/texturemsg/defaultnouvs_ddn.dds.4", - "engineassets/texturemsg/defaultnouvs_ddn.dds.5", - "engineassets/texturemsg/defaultnouvs_spec.dds", - "engineassets/texturemsg/defaultnouvs_spec.dds.1", - "engineassets/texturemsg/defaultnouvs_spec.dds.2", - "engineassets/texturemsg/defaultnouvs_spec.dds.3", - "engineassets/texturemsg/defaultnouvs_spec.dds.4", - "engineassets/texturemsg/defaultnouvs_spec.dds.5", - "engineassets/textures/defaults/16_grey.dds", - "engineassets/textures/cubemap/default_level_cubemap.dds", - "engineassets/textures/cubemap/default_level_cubemap.dds.1", - "engineassets/textures/cubemap/default_level_cubemap.dds.2", - "engineassets/textures/cubemap/default_level_cubemap.dds.3", - "engineassets/textures/cubemap/default_level_cubemap.dds.4", - "engineassets/textures/cubemap/default_level_cubemap_diff.dds", - "engineassets/materials/water/ocean_default.mtl", - "engineassets/textures/defaults/spot_default.dds", - "engineassets/textures/defaults/spot_default.dds.1", - "engineassets/textures/defaults/spot_default.dds.2", - "engineassets/textures/defaults/spot_default.dds.3", - "engineassets/textures/defaults/spot_default.dds.4", - "engineassets/textures/defaults/spot_default.dds.5", - "materials/material_terrain_default.mtl", - "textures/skys/night/half_moon.dds", - "textures/skys/night/half_moon.dds.1", - "textures/skys/night/half_moon.dds.2", - "textures/skys/night/half_moon.dds.3", - "textures/skys/night/half_moon.dds.4", - "textures/skys/night/half_moon.dds.5", - "textures/skys/night/half_moon.dds.6", - "engineassets/materials/sky/sky.mtl", - "levels/testdependencieslevel/level.pak", - "levels/testdependencieslevel/terrain/cover.ctc", - "levels/testdependencieslevel/terraintexture.pak", - ] - - sequence_material_cube_assets = [ - "textures/test_texture_sequence/test_texture_sequence000.dds", - "textures/test_texture_sequence/test_texture_sequence001.dds", - "textures/test_texture_sequence/test_texture_sequence002.dds", - "textures/test_texture_sequence/test_texture_sequence003.dds", - "textures/test_texture_sequence/test_texture_sequence004.dds", - "textures/test_texture_sequence/test_texture_sequence005.dds", - "objects/_primitives/_box_1x1.cgf", - "materials/test_texture_sequence.mtl", - "objects/_primitives/_box_1x1.mtl", - "textures/_primitives/middle_gray_checker.dds", - "textures/_primitives/middle_gray_checker.dds.1", - "textures/_primitives/middle_gray_checker.dds.2", - "textures/_primitives/middle_gray_checker.dds.3", - "textures/_primitives/middle_gray_checker.dds.4", - "textures/_primitives/middle_gray_checker.dds.5", - "textures/_primitives/middle_gray_checker_ddn.dds", - "textures/_primitives/middle_gray_checker_ddn.dds.1", - "textures/_primitives/middle_gray_checker_ddn.dds.2", - "textures/_primitives/middle_gray_checker_ddn.dds.3", - "textures/_primitives/middle_gray_checker_ddn.dds.4", - "textures/_primitives/middle_gray_checker_ddn.dds.5", - "textures/_primitives/middle_gray_checker_spec.dds", - "textures/_primitives/middle_gray_checker_spec.dds.1", - "textures/_primitives/middle_gray_checker_spec.dds.2", - "textures/_primitives/middle_gray_checker_spec.dds.3", - "textures/_primitives/middle_gray_checker_spec.dds.4", - "textures/_primitives/middle_gray_checker_spec.dds.5", - ] - - character_with_simplified_material_assets = [ - "objects/characters/jack/jack.actor", - "objects/characters/jack/jack.mtl", - "objects/characters/jack/textures/jack_diff.dds", - "objects/characters/jack/textures/jack_diff.dds.1", - "objects/characters/jack/textures/jack_diff.dds.2", - "objects/characters/jack/textures/jack_diff.dds.3", - "objects/characters/jack/textures/jack_diff.dds.4", - "objects/characters/jack/textures/jack_diff.dds.5", - "objects/characters/jack/textures/jack_diff.dds.6", - "objects/characters/jack/textures/jack_diff.dds.7", - "objects/characters/jack/textures/jack_spec.dds", - "objects/characters/jack/textures/jack_spec.dds.1", - "objects/characters/jack/textures/jack_spec.dds.2", - "objects/characters/jack/textures/jack_spec.dds.3", - "objects/characters/jack/textures/jack_spec.dds.4", - "objects/characters/jack/textures/jack_spec.dds.5", - "objects/characters/jack/textures/jack_spec.dds.6", - "objects/characters/jack/textures/jack_spec.dds.7", - "objects/default/editorprimitive.mtl", - "engineassets/textures/grey.dds", - "animations/animationeditorfiles/sample0.animgraph", - "animations/motions/jack_death_fall_back_zup.motion", - "animations/animationeditorfiles/sample1.animgraph", - "animations/animationeditorfiles/sample0.motionset", - "animations/motions/rin_jump.motion", - "animations/animationeditorfiles/sample1.motionset", - "animations/motions/rin_idle.motion", - "animations/motions/jack_idle_aim_zup.motion", - ] - - spawner_assets = [ - "slices/sphere.dynamicslice", - "objects/default/primitive_sphere.cgf", - "test1.luac", - "test2.luac", - ] - - ui_canvas_assets = [ - "fonts/vera.ttf", - "fonts/vera.font", - "scriptcanvas/mainmenu.scriptcanvas_compiled", - "fonts/vera.fontfamily", - "ui/canvas/start.uicanvas", - "fonts/vera-italic.font", - "ui/textureatlas/sample.texatlasidx", - "fonts/vera-bold-italic.ttf", - "fonts/vera-bold.font", - "ui/textures/prefab/button_normal.dds", - "ui/textures/prefab/button_normal.sprite", - "fonts/vera-italic.ttf", - "ui/textureatlas/sample.dds", - "fonts/vera-bold-italic.font", - "fonts/vera-bold.ttf", - "ui/textures/prefab/button_disabled.dds", - "ui/textures/prefab/button_disabled.sprite", - ] - - wwise_and_atl_assets = [ - "libs/gameaudio/wwise/levels/testdependencieslevel/test_dependencies_level.xml", - "sounds/wwise/test_bank3.bnk", - "sounds/wwise/test_bank4.bnk", - "sounds/wwise/test_bank5.bnk", - "sounds/wwise/test_bank1.bnk", - "sounds/wwise/init.bnk", - "sounds/wwise/499820003.wem", - "sounds/wwise/196049145.wem", - ] - - particle_library_assets = [ - "libs/particles/milestone2particles.xml", - "textures/milestone2/particles/fx_launchermuzzlering_01.dds", - "textures/milestone2/particles/fx_launchermuzzlering_01.dds.1", - "textures/milestone2/particles/fx_launchermuzzlering_01.dds.2", - "textures/milestone2/particles/fx_launchermuzzlering_01.dds.3", - "textures/milestone2/particles/fx_launchermuzzlering_01.dds.4", - "textures/milestone2/particles/fx_launchermuzzlering_01.dds.5", - "textures/milestone2/particles/fx_sparkstreak_01.dds", - "textures/milestone2/particles/fx_launchermuzzlefront_01.dds", - "textures/milestone2/particles/fx_launchermuzzlefront_01.dds.1", - "textures/milestone2/particles/fx_launchermuzzlefront_01.dds.2", - "textures/milestone2/particles/fx_launchermuzzlefront_01.dds.3", - "textures/milestone2/particles/fx_launchermuzzlefront_01.dds.4", - "textures/milestone2/particles/fx_launchermuzzlefront_01.dds.5", - ] - - lens_flares_library_assets = ["libs/flares/flares.xml", "textures/lights/flare01.dds"] - - expected_assets_list = default_level_assets - expected_assets_list.extend(sequence_material_cube_assets) - expected_assets_list.extend(character_with_simplified_material_assets) - expected_assets_list.extend(spawner_assets) - expected_assets_list.extend(ui_canvas_assets) - expected_assets_list.extend(wwise_and_atl_assets) - expected_assets_list.extend(particle_library_assets) - expected_assets_list.extend(lens_flares_library_assets) # All expected assets - - # Get actual calculated dependencies from the asset list created - actual_assets_list = [] - for rel_path in helper.get_asset_relative_paths(helper["asset_info_file_result"]): - actual_assets_list.append(rel_path) - - assert sorted(actual_assets_list) == sorted(expected_assets_list) @pytest.mark.BAT @pytest.mark.assetpipeline @@ -310,13 +102,13 @@ class TestsAssetBundlerBatch_WindowsAndMac(object): 3. Read and store contents of asset list into memory 4. Attempt to create a new asset list in without using --allowOverwrites 5. Verify that Asset Bundler returns false - 6. Verify that file contents of the orignally created asset list did not change from what was stored in memory + 6. Verify that file contents of the originally created asset list did not change from what was stored in memory 7. Attempt to create a new asset list without debug while allowing overwrites - 8. Verify that file contents of the orignally created asset list changed from what was stored in memory + 8. Verify that file contents of the originally created asset list changed from what was stored in memory """ helper = bundler_batch_helper seed_list = os.path.join(workspace.paths.engine_root(), "Assets", "Engine", "SeedAssetList.seed") # Engine seed list - asset = r"levels\testdependencieslevel\level.pak" + asset = r"levels\testdependencieslevel\testdependencieslevel.spawnable" # Create Asset list helper.call_assetLists( @@ -399,7 +191,7 @@ class TestsAssetBundlerBatch_WindowsAndMac(object): """ helper = bundler_batch_helper seed_list = os.path.join(workspace.paths.engine_root(), "Assets", "Engine", "SeedAssetList.seed") # Engine seed list - asset = r"levels\testdependencieslevel\level.pak" + asset = r"levels\testdependencieslevel\testdependencieslevel.spawnable" # Useful bundle locations / names (2 for comparing contents) # fmt:off @@ -919,7 +711,7 @@ class TestsAssetBundlerBatch_WindowsAndMac(object): # Extra arguments for pattern comparison cmd.extend([f"--filePatternType={pattern_type}", f"--filePattern={pattern}"]) if workspace.project: - cmd.append(f'--project-path={project_name}') + cmd.append(f'--project-path={workspace.paths.project()}') return cmd # End generate_compare_command() @@ -960,7 +752,7 @@ class TestsAssetBundlerBatch_WindowsAndMac(object): output_mac_asset_list = helper.platform_file_name(last_output_arg, platform) # Build execution command - cmd = generate_compare_command(platform_arg, workspace.project) + cmd = generate_compare_command(platform_arg, workspace.paths.project()) # Execute command subprocess.check_call(cmd) @@ -995,7 +787,7 @@ class TestsAssetBundlerBatch_WindowsAndMac(object): f"--comparisonRulesFile={rule_file}", f"--comparisonType={args[1]}", r"--addComparison", - f"--project-path={workspace.project}", + f"--project-path={workspace.paths.project()}", ] if args[1] == "4": # If pattern comparison, append a few extra arguments @@ -1117,7 +909,7 @@ class TestsAssetBundlerBatch_WindowsAndMac(object): "--addDefaultSeedListFiles", "--platform=pc", "--print", - f"--project-path={workspace.project}" + f"--project-path={workspace.paths.project()}" ], universal_newlines=True, ) @@ -1132,7 +924,7 @@ class TestsAssetBundlerBatch_WindowsAndMac(object): # Create a seed file helper.call_seeds( seedListFile=helper["seed_list_file"], - addSeed=r"levels\testdependencieslevel\level.pak", + addSeed=r"levels\testdependencieslevel\testdependencieslevel.spawnable", platform="pc", ) @@ -1155,9 +947,9 @@ class TestsAssetBundlerBatch_WindowsAndMac(object): # Specifying platform but not "add" or "remove" should fail result, _ = helper.call_assetLists( assetListFile=helper["asset_info_file_request"], + allowOverwrites="", seedListFile=helper["seed_list_file"], platform="pc", - allowOverwrites="", ) assert result, "Overwriting with override threw an error" @@ -1189,8 +981,8 @@ class TestsAssetBundlerBatch_WindowsAndMac(object): # Make sure file gets deleted on teardown request.addfinalizer(lambda: fs.delete([bundle_result_path], True, False)) - bundles_folder = os.path.join(workspace.paths.engine_root(), workspace.project, "Bundles") - level_pak = r"levels\testdependencieslevel\level.pak" + bundles_folder = os.path.join(workspace.paths.project(), "Bundles") + level_pak = r"levels\testdependencieslevel\testdependencieslevel.spawnable" bundle_request_path = os.path.join(bundles_folder, "bundle.pak") bundle_result_path = os.path.join(bundles_folder, helper.platform_file_name("bundle.pak", workspace.asset_processor_platform)) @@ -1243,23 +1035,64 @@ class TestsAssetBundlerBatch_WindowsAndMac(object): 2. Verify file was created 3. Verify that only the expected assets are present in the created asset list """ - expected_assets = [ + expected_assets = sorted([ "ui/canvases/lyshineexamples/animation/multiplesequences.uicanvas", - "ui/textures/prefab/button_normal.sprite" - ] + "ui/textures/prefab/button_disabled.tif.streamingimage", + "ui/textures/prefab/tooltip_sliced.tif.streamingimage", + "ui/textures/prefab/button_normal.tif.streamingimage" + ]) + # Printing these lists out can save a step in debugging if this test fails on Jenkins. + logger.info(f"expected_assets: {expected_assets}") + + skip_assets = sorted([ + "ui/scripts/lyshineexamples/animation/multiplesequences.luac", + "ui/scripts/lyshineexamples/unloadthiscanvasbutton.luac", + "fonts/vera.fontfamily", + "fonts/vera-italic.font", + "fonts/vera.font", + "fonts/vera-bold.font", + "fonts/vera-bold-italic.font", + "fonts/vera-italic.ttf", + "fonts/vera.ttf", + "fonts/vera-bold.ttf", + "fonts/vera-bold-italic.ttf" + ]) + logger.info(f"skip_assets: {skip_assets}") + + expected_and_skip_assets = sorted(expected_assets + skip_assets) + # Printing both together to make it quick to compare the results in the logs for a test failure on Jenkins + logger.info(f"expected_and_skip_assets: {expected_and_skip_assets}") + + # First, generate an asset info file without skipping, to get a list that can be used as a baseline to verify + # the files were actually skipped, and not just missing. + bundler_batch_helper.call_assetLists( + assetListFile=bundler_batch_helper['asset_info_file_request'], + addSeed="ui/canvases/lyshineexamples/animation/multiplesequences.uicanvas" + ) + assert os.path.isfile(bundler_batch_helper["asset_info_file_result"]) + assets_in_no_skip_list = [] + for rel_path in bundler_batch_helper.get_asset_relative_paths(bundler_batch_helper["asset_info_file_result"]): + assets_in_no_skip_list.append(rel_path) + assets_in_no_skip_list = sorted(assets_in_no_skip_list) + logger.info(f"assets_in_no_skip_list: {assets_in_no_skip_list}") + assert assets_in_no_skip_list == expected_and_skip_assets + + # Now generate an asset info file using the skip command, and verify the skip files are not in the list. bundler_batch_helper.call_assetLists( assetListFile=bundler_batch_helper['asset_info_file_request'], addSeed="ui/canvases/lyshineexamples/animation/multiplesequences.uicanvas", - skip="ui/textures/prefab/button_disabled.sprite,ui/scripts/lyshineexamples/animation/multiplesequences.luac," - "ui/textures/prefab/tooltip_sliced.sprite,ui/scripts/lyshineexamples/unloadthiscanvasbutton.luac,fonts/vera.fontfamily,fonts/vera-italic.font," - "fonts/vera.font,fonts/vera-bold.font,fonts/vera-bold-italic.font,fonts/vera-italic.ttf,fonts/vera.ttf,fonts/vera-bold.ttf,fonts/vera-bold-italic.ttf" + allowOverwrites="", + skip=','.join(skip_assets) ) + assert os.path.isfile(bundler_batch_helper["asset_info_file_result"]) assets_in_list = [] for rel_path in bundler_batch_helper.get_asset_relative_paths(bundler_batch_helper["asset_info_file_result"]): assets_in_list.append(rel_path) + assets_in_list = sorted(assets_in_list) + logger.info(f"assets_in_list: {assets_in_list}") + assert assets_in_list == expected_assets - assert sorted(assets_in_list) == sorted(expected_assets) @pytest.mark.BAT @pytest.mark.assetpipeline diff --git a/AutomatedTesting/Gem/PythonTests/assetpipeline/asset_processor_tests/asset_processor_batch_tests.py b/AutomatedTesting/Gem/PythonTests/assetpipeline/asset_processor_tests/asset_processor_batch_tests.py index f3483d9c1f..cc79ed7c27 100755 --- a/AutomatedTesting/Gem/PythonTests/assetpipeline/asset_processor_tests/asset_processor_batch_tests.py +++ b/AutomatedTesting/Gem/PythonTests/assetpipeline/asset_processor_tests/asset_processor_batch_tests.py @@ -8,6 +8,8 @@ General Asset Processor Batch Tests """ # Import builtin libraries +from os import listdir + import pytest import logging import os @@ -329,7 +331,7 @@ class TestsAssetProcessorBatch_AllPlatforms(object): # or an expected behavior has changed. Processing bootstrap.cfg sometimes but not other times should not # cause a failure in this test. num_processed_assets = asset_processor_utils.get_num_processed_assets(output) - assert num_processed_assets >= 8, f'Wrong number of successfully processed assets found in output: '\ + assert num_processed_assets >= 6, f'Wrong number of successfully processed assets found in output: '\ '{num_processed_assets}' missing_assets, _ = asset_processor.compare_assets_with_cache() @@ -585,20 +587,18 @@ class TestsAssetProcessorBatch_AllPlatforms(object): 3. Verify that logs exist for both AP Batch & AP GUI """ asset_processor.create_temp_asset_root() + asset_processor.create_temp_log_root() LOG_PATH = { "batch_log": workspace.paths.ap_batch_log(), - "gui_log": workspace.paths.ap_gui_log(), - "job_logs": workspace.paths.ap_job_logs(), + "gui_log": workspace.paths.ap_gui_log() } class LogTimes: batch_log_start_time = 0 gui_log_start_time = 0 - job_logs_start_time = 0 batch_log_final_time = 0 gui_log_final_time = 0 - job_logs_final_time = 0 @staticmethod def Report(): @@ -607,12 +607,10 @@ class TestsAssetProcessorBatch_AllPlatforms(object): Original Times: Batch: {LogTimes.batch_log_start_time} GUI: {LogTimes.gui_log_start_time} - JobLogs:{LogTimes.job_logs_start_time} Post-Run Times: Batch: {LogTimes.batch_log_final_time} GUI: {LogTimes.gui_log_final_time} - JobLogs:{LogTimes.job_logs_final_time} """ ) @@ -629,23 +627,19 @@ class TestsAssetProcessorBatch_AllPlatforms(object): LogTimes.Report() def check_existence(name, path): - assert os.path.exists(path), f"{name} could not be located after running the AP." + assert os.path.exists(path), f"{name} could not be located {path} after running the AP." # Check if log files previously exist and grab their modification times update_times("_start_time") # Run the Batch process - assert asset_processor.batch_process(), "Batch process failed to successfully terminate" + assert asset_processor.batch_process(create_temp_log=False), "Batch process failed to successfully terminate" - asset_processor.gui_process(quitonidle=True) + asset_processor.gui_process(quitonidle=True, create_temp_log=False) # Check that the Logs directory exists (C1564055) check_existence("Logs Directory", workspace.paths.ap_log_dir()) - # Check that the logs and JobLogs directory have updated modified times (C1564056) - for key in LOG_PATH.keys(): - check_existence(key, LOG_PATH[key]) - update_times("_final_time") for key in LOG_PATH.keys(): @@ -708,6 +702,7 @@ class TestsAssetProcessorBatch_AllPlatforms(object): @pytest.mark.BAT @pytest.mark.assetpipeline + @pytest.mark.skip(reason="need to change assets from .slice files to an asset type that can have nested dependencies") def test_validateNestedPreloadDependency_Found(self, asset_processor, ap_setup_fixture, workspace): """ Tests processing of a nested circular dependency and verifies that Asset Processor will return an error @@ -731,3 +726,11 @@ class TestsAssetProcessorBatch_AllPlatforms(object): assert error_line_found, "The error could not be found in the newest run of the AP Batch log." + @pytest.mark.assetpipeline + def test_AssetProcessor_Log_On_Failure(self, asset_processor, ap_setup_fixture, workspace): + asset_processor.prepare_test_environment(ap_setup_fixture["tests_dir"], "test_AP_Logs") + result, output = asset_processor.batch_process(expect_failure=True, capture_output=True) + assert result == False, f'AssetProcessorBatch should have failed because there is a bad asset, output was {output}' + + jobLogs = listdir(workspace.paths.ap_job_logs() + "/test_AP_Logs") + assert not len(jobLogs) == 0, 'No job logs where output during failure.' diff --git a/AutomatedTesting/Gem/PythonTests/assetpipeline/asset_processor_tests/asset_relocator_tests.py b/AutomatedTesting/Gem/PythonTests/assetpipeline/asset_processor_tests/asset_relocator_tests.py index 744720323e..42c83c7c25 100755 --- a/AutomatedTesting/Gem/PythonTests/assetpipeline/asset_processor_tests/asset_relocator_tests.py +++ b/AutomatedTesting/Gem/PythonTests/assetpipeline/asset_processor_tests/asset_relocator_tests.py @@ -169,17 +169,17 @@ class TestsAssetRelocator_WindowsAndMac(object): @pytest.mark.test_case_id("C21968388") @pytest.mark.assetpipeline - def test_WindowsMacPlatforms_MoveCorruptedSliceFile_MoveSuccess(self, request, workspace, ap_setup_fixture, + def test_WindowsMacPlatforms_MoveCorruptedPrefabFile_MoveSuccess(self, request, workspace, ap_setup_fixture, asset_processor): """ Asset with UUID/AssetId reference in non-standard format is successfully scanned and relocated to the MoveOutput folder. - This test uses a pre-corrupted .slice file. + This test uses a pre-corrupted .prefab file. Test Steps: - 1. Create temporary testing environment with a corrupted slice - 2. Attempt to move the corrupted slice - 3. Verify that corrupted slice was moved successfully + 1. Create temporary testing environment with a corrupted prefab + 2. Attempt to move the corrupted prefab + 3. Verify that corrupted prefab was moved successfully """ env = ap_setup_fixture @@ -187,7 +187,7 @@ class TestsAssetRelocator_WindowsAndMac(object): asset_folder = "C21968388" source_dir, _ = asset_processor.prepare_test_environment(env["tests_dir"], asset_folder) - filename = "DependencyScannerAsset.slice" + filename = "DependencyScannerAsset.prefab" file_path = os.path.join(source_dir, filename) dst_rel_path = os.path.join("MoveOutput", filename) dst_full_path = os.path.join(source_dir, dst_rel_path) diff --git a/AutomatedTesting/Gem/PythonTests/assetpipeline/asset_processor_tests/assets/C1568831/cgf_to_delete.cgf b/AutomatedTesting/Gem/PythonTests/assetpipeline/asset_processor_tests/assets/C1568831/cgf_to_delete.cgf deleted file mode 100644 index 47571e39a9..0000000000 --- a/AutomatedTesting/Gem/PythonTests/assetpipeline/asset_processor_tests/assets/C1568831/cgf_to_delete.cgf +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:7932fada1523fad4eb6ad5c13111bb4c00d6b0584ec8641060bf25f306b17e69 -size 84632 diff --git a/AutomatedTesting/Gem/PythonTests/assetpipeline/asset_processor_tests/assets/C1568831/fbx_to_delete.fbx b/AutomatedTesting/Gem/PythonTests/assetpipeline/asset_processor_tests/assets/C1568831/fbx_to_delete.fbx deleted file mode 100644 index 165bc01a54..0000000000 --- a/AutomatedTesting/Gem/PythonTests/assetpipeline/asset_processor_tests/assets/C1568831/fbx_to_delete.fbx +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:bf94b548eccb78432db65077124cadf20de975919b181d712fde081f59edd353 -size 38848 diff --git a/AutomatedTesting/Gem/PythonTests/assetpipeline/asset_processor_tests/assets/C1568831/file_to_delete.prefab b/AutomatedTesting/Gem/PythonTests/assetpipeline/asset_processor_tests/assets/C1568831/file_to_delete.prefab new file mode 100644 index 0000000000..9e26dfeeb6 --- /dev/null +++ b/AutomatedTesting/Gem/PythonTests/assetpipeline/asset_processor_tests/assets/C1568831/file_to_delete.prefab @@ -0,0 +1 @@ +{} \ No newline at end of file diff --git a/AutomatedTesting/Gem/PythonTests/assetpipeline/asset_processor_tests/assets/C1568831/file_to_delete.txt b/AutomatedTesting/Gem/PythonTests/assetpipeline/asset_processor_tests/assets/C1568831/file_to_delete.txt new file mode 100644 index 0000000000..3d789f8b83 --- /dev/null +++ b/AutomatedTesting/Gem/PythonTests/assetpipeline/asset_processor_tests/assets/C1568831/file_to_delete.txt @@ -0,0 +1 @@ +to be deleted \ No newline at end of file diff --git a/AutomatedTesting/Gem/PythonTests/assetpipeline/asset_processor_tests/assets/C1571774/test_mesh_robot.cgf b/AutomatedTesting/Gem/PythonTests/assetpipeline/asset_processor_tests/assets/C1571774/test_mesh_robot.cgf deleted file mode 100644 index fcb3513ed0..0000000000 --- a/AutomatedTesting/Gem/PythonTests/assetpipeline/asset_processor_tests/assets/C1571774/test_mesh_robot.cgf +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:1675471085483e0bd252a5bdd4db1b365c66f16ac32a6e6dd70bb1c23df83fa5 -size 24160 diff --git a/AutomatedTesting/Gem/PythonTests/assetpipeline/asset_processor_tests/assets/C1591338/test_mesh_robot.cgf b/AutomatedTesting/Gem/PythonTests/assetpipeline/asset_processor_tests/assets/C1591338/test_mesh_robot.cgf deleted file mode 100644 index fcb3513ed0..0000000000 --- a/AutomatedTesting/Gem/PythonTests/assetpipeline/asset_processor_tests/assets/C1591338/test_mesh_robot.cgf +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:1675471085483e0bd252a5bdd4db1b365c66f16ac32a6e6dd70bb1c23df83fa5 -size 24160 diff --git a/AutomatedTesting/Gem/PythonTests/assetpipeline/asset_processor_tests/assets/C1591338/test_mesh_robot.prefab b/AutomatedTesting/Gem/PythonTests/assetpipeline/asset_processor_tests/assets/C1591338/test_mesh_robot.prefab new file mode 100644 index 0000000000..9e26dfeeb6 --- /dev/null +++ b/AutomatedTesting/Gem/PythonTests/assetpipeline/asset_processor_tests/assets/C1591338/test_mesh_robot.prefab @@ -0,0 +1 @@ +{} \ No newline at end of file diff --git a/AutomatedTesting/Gem/PythonTests/assetpipeline/asset_processor_tests/assets/C21968388/DependencyScannerAsset.prefab b/AutomatedTesting/Gem/PythonTests/assetpipeline/asset_processor_tests/assets/C21968388/DependencyScannerAsset.prefab new file mode 100644 index 0000000000..1ba25b4463 --- /dev/null +++ b/AutomatedTesting/Gem/PythonTests/assetpipeline/asset_processor_tests/assets/C21968388/DependencyScannerAsset.prefab @@ -0,0 +1,908 @@ +{ + "ContainerEntity": { + "Id": "ContainerEntity", + "Name": "DependencyScannerAsset", + "Components": { + "Component_[10182366347512475253]": { + "$type": "EditorPrefabComponent", + "Id": 10182366347512475253 + }, + "Component_[12917798267488243668]": { + "$type": "EditorPendingCompositionComponent", + "Id": 12917798267488243668 + }, + "Component_[3261249813163778338]": { + "$type": "EditorOnlyEntityComponent", + "Id": 3261249813163778338 + }, + "Component_[3837204912784440039]": { + "$type": "EditorDisabledCompositionComponent", + "Id": 3837204912784440039 + }, + "Component_[4272963378099646759]": { + "$type": "{27F1E1A1-8D9D-4C3B-BD3A-AFB9762449C0} TransformComponent", + "Id": 4272963378099646759, + "Parent Entity": "" + }, + "Component_[4848458548047175816]": { + "$type": "EditorVisibilityComponent", + "Id": 4848458548047175816 + }, + "Component_[5787060997243919943]": { + "$type": "EditorInspectorComponent", + "Id": 5787060997243919943 + }, + "Component_[7804170251266531779]": { + "$type": "EditorLockComponent", + "Id": 7804170251266531779 + }, + "Component_[7874177159288365422]": { + "$type": "EditorEntitySortComponent", + "Id": 7874177159288365422 + }, + "Component_[8018146290632383969]": { + "$type": "EditorEntityIconComponent", + "Id": 8018146290632383969 + }, + "Component_[8452360690590857075]": { + "$type": "SelectionComponent", + "Id": 8452360690590857075 + } + } + }, + "Entities": { + "Entity_[274004659287]": { + "Id": "Entity_[274004659287]", + "Name": "DependencyScannerAsset", + "Components": { + "Component_[10849460799799271301]": { + "$type": "EditorPendingCompositionComponent", + "Id": 10849460799799271301 + }, + "Component_[11098142762746045658]": { + "$type": "SelectionComponent", + "Id": 11098142762746045658 + }, + "Component_[11154538629717040387]": { + "$type": "EditorEntitySortComponent", + "Id": 11154538629717040387, + "Child Entity Order": [ + "Entity_[305822185575]", + "Entity_[278299626583]", + "Entity_[282594593879]", + "Entity_[286889561175]", + "Entity_[291184528471]" + ] + }, + "Component_[1365196255752273753]": { + "$type": "EditorOnlyEntityComponent", + "Id": 1365196255752273753 + }, + "Component_[280906579560376421]": { + "$type": "EditorLockComponent", + "Id": 280906579560376421 + }, + "Component_[4629965429001113748]": { + "$type": "EditorDisabledCompositionComponent", + "Id": 4629965429001113748 + }, + "Component_[4876910656129741263]": { + "$type": "EditorEntityIconComponent", + "Id": 4876910656129741263 + }, + "Component_[5763306492614623496]": { + "$type": "EditorInspectorComponent", + "Id": 5763306492614623496, + "ComponentOrderEntryArray": [ + { + "ComponentId": 7514977506847036117 + } + ] + }, + "Component_[7327709568605458460]": { + "$type": "EditorVisibilityComponent", + "Id": 7327709568605458460 + }, + "Component_[7514977506847036117]": { + "$type": "{27F1E1A1-8D9D-4C3B-BD3A-AFB9762449C0} TransformComponent", + "Id": 7514977506847036117, + "Parent Entity": "ContainerEntity" + } + } + }, + "Entity_[278299626583]": { + "Id": "Entity_[278299626583]", + "Name": "AssetIDMatch", + "Components": { + "Component_[10285740519857855186]": { + "$type": "EditorDisabledCompositionComponent", + "Id": 10285740519857855186 + }, + "Component_[11273731016303624898]": { + "$type": "{27F1E1A1-8D9D-4C3B-BD3A-AFB9762449C0} TransformComponent", + "Id": 11273731016303624898, + "Parent Entity": "Entity_[274004659287]" + }, + "Component_[1136790983026972010]": { + "$type": "EditorVisibilityComponent", + "Id": 1136790983026972010 + }, + "Component_[12777313618328131055]": { + "$type": "EditorPendingCompositionComponent", + "Id": 12777313618328131055 + }, + "Component_[13256044902558773795]": { + "$type": "EditorLockComponent", + "Id": 13256044902558773795 + }, + "Component_[15834551022302435776]": { + "$type": "EditorInspectorComponent", + "Id": 15834551022302435776, + "ComponentOrderEntryArray": [ + { + "ComponentId": 11273731016303624898 + }, + { + "ComponentId": 9671522714018290727, + "SortIndex": 1 + } + ] + }, + "Component_[16345420368214930095]": { + "$type": "SelectionComponent", + "Id": 16345420368214930095 + }, + "Component_[5309075942188429052]": { + "$type": "EditorEntitySortComponent", + "Id": 5309075942188429052 + }, + "Component_[8639731896786645938]": { + "$type": "EditorEntityIconComponent", + "Id": 8639731896786645938 + }, + "Component_[9844585173698551415]": { + "$type": "EditorOnlyEntityComponent", + "Id": 9844585173698551415 + } + } + }, + "Entity_[282594593879]": { + "Id": "Entity_[282594593879]", + "Name": "UUIDMatch", + "Components": { + "Component_[10379494986254888760]": { + "$type": "EditorDisabledCompositionComponent", + "Id": 10379494986254888760 + }, + "Component_[10932830014545295552]": { + "$type": "SelectionComponent", + "Id": 10932830014545295552 + }, + "Component_[16077882919902242532]": { + "$type": "EditorEntitySortComponent", + "Id": 16077882919902242532 + }, + "Component_[2150375322459274584]": { + "$type": "EditorPendingCompositionComponent", + "Id": 2150375322459274584 + }, + "Component_[2645455411436465820]": { + "$type": "EditorEntityIconComponent", + "Id": 2645455411436465820 + }, + "Component_[5422214869037468733]": { + "$type": "EditorOnlyEntityComponent", + "Id": 5422214869037468733 + }, + "Component_[7238126895911071330]": { + "$type": "EditorInspectorComponent", + "Id": 7238126895911071330, + "ComponentOrderEntryArray": [ + { + "ComponentId": 8407607000804893064 + }, + { + "ComponentId": 12952323341649885242, + "SortIndex": 1 + } + ] + }, + "Component_[7981670269715131988]": { + "$type": "EditorVisibilityComponent", + "Id": 7981670269715131988 + }, + "Component_[8407607000804893064]": { + "$type": "{27F1E1A1-8D9D-4C3B-BD3A-AFB9762449C0} TransformComponent", + "Id": 8407607000804893064, + "Parent Entity": "Entity_[274004659287]" + }, + "Component_[8567641786004090803]": { + "$type": "EditorLockComponent", + "Id": 8567641786004090803 + } + } + }, + "Entity_[286889561175]": { + "Id": "Entity_[286889561175]", + "Name": "RelativeProductMatch", + "Components": { + "Component_[10180645282669228972]": { + "$type": "{27F1E1A1-8D9D-4C3B-BD3A-AFB9762449C0} TransformComponent", + "Id": 10180645282669228972, + "Parent Entity": "Entity_[274004659287]" + }, + "Component_[10200807690182688147]": { + "$type": "EditorDisabledCompositionComponent", + "Id": 10200807690182688147 + }, + "Component_[11014661873645081316]": { + "$type": "EditorInspectorComponent", + "Id": 11014661873645081316, + "ComponentOrderEntryArray": [ + { + "ComponentId": 10180645282669228972 + }, + { + "ComponentId": 12869852248016369650, + "SortIndex": 1 + } + ] + }, + "Component_[12869852248016369650]": { + "$type": "{77CDE991-EC1A-B7C1-B112-7456ABAC81A1} EditorSpawnerComponent", + "Id": 12869852248016369650, + "Slice": { + "assetId": { + "guid": "{29F14025-3BD2-5CA9-A9DE-B8B349268C2F}", + "subId": 2 + }, + "assetHint": "slices/bullet.dynamicslice" + } + }, + "Component_[15136448544716183259]": { + "$type": "EditorOnlyEntityComponent", + "Id": 15136448544716183259 + }, + "Component_[15966001894874626764]": { + "$type": "SelectionComponent", + "Id": 15966001894874626764 + }, + "Component_[16167982631516160155]": { + "$type": "EditorEntityIconComponent", + "Id": 16167982631516160155 + }, + "Component_[16672905198052847867]": { + "$type": "EditorEntitySortComponent", + "Id": 16672905198052847867 + }, + "Component_[4506946122562404190]": { + "$type": "EditorPendingCompositionComponent", + "Id": 4506946122562404190 + }, + "Component_[6836304267269231429]": { + "$type": "EditorLockComponent", + "Id": 6836304267269231429 + }, + "Component_[8756593519140349183]": { + "$type": "EditorVisibilityComponent", + "Id": 8756593519140349183 + } + } + }, + "Entity_[291184528471]": { + "Id": "Entity_[291184528471]", + "Name": "RelativeSourceMatch", + "Components": { + "Component_[11694027325905361034]": { + "$type": "EditorEntitySortComponent", + "Id": 11694027325905361034 + }, + "Component_[13891029613307790064]": { + "$type": "EditorEntityIconComponent", + "Id": 13891029613307790064 + }, + "Component_[15933511034411930900]": { + "$type": "{27F1E1A1-8D9D-4C3B-BD3A-AFB9762449C0} TransformComponent", + "Id": 15933511034411930900, + "Parent Entity": "Entity_[274004659287]" + }, + "Component_[17540827492846961803]": { + "$type": "EditorLockComponent", + "Id": 17540827492846961803 + }, + "Component_[2850297705939373458]": { + "$type": "SelectionComponent", + "Id": 2850297705939373458 + }, + "Component_[4809103331004345812]": { + "$type": "EditorPendingCompositionComponent", + "Id": 4809103331004345812 + }, + "Component_[5654779331777839943]": { + "$type": "EditorInspectorComponent", + "Id": 5654779331777839943, + "ComponentOrderEntryArray": [ + { + "ComponentId": 15933511034411930900 + }, + { + "ComponentId": 10284025539900054207, + "SortIndex": 1 + } + ] + }, + "Component_[6097019179005900386]": { + "$type": "EditorVisibilityComponent", + "Id": 6097019179005900386 + }, + "Component_[7748387730313625157]": { + "$type": "EditorDisabledCompositionComponent", + "Id": 7748387730313625157 + }, + "Component_[9822265453841229082]": { + "$type": "EditorOnlyEntityComponent", + "Id": 9822265453841229082 + } + } + }, + "Entity_[297232250983]": { + "Id": "Entity_[297232250983]", + "Name": "1151F14D38A65579888ABE3139882E68:[0]", + "Components": { + "Component_[11936148741777754959]": { + "$type": "EditorDisabledCompositionComponent", + "Id": 11936148741777754959 + }, + "Component_[12610073699988743015]": { + "$type": "{27F1E1A1-8D9D-4C3B-BD3A-AFB9762449C0} TransformComponent", + "Id": 12610073699988743015, + "Parent Entity": "Entity_[305822185575]" + }, + "Component_[1603205169722765279]": { + "$type": "EditorLockComponent", + "Id": 1603205169722765279 + }, + "Component_[17691206348057560715]": { + "$type": "EditorPendingCompositionComponent", + "Id": 17691206348057560715 + }, + "Component_[2711821203680330048]": { + "$type": "SelectionComponent", + "Id": 2711821203680330048 + }, + "Component_[3887480309311474860]": { + "$type": "EditorVisibilityComponent", + "Id": 3887480309311474860 + }, + "Component_[5853968883842282450]": { + "$type": "EditorEntityIconComponent", + "Id": 5853968883842282450 + }, + "Component_[7679080692843343453]": { + "$type": "EditorCommentComponent", + "Id": 7679080692843343453, + "Configuration": "Asset ID that matches an existing dependency of this asset (am_grass1.mtl)" + }, + "Component_[8024752235278898687]": { + "$type": "EditorOnlyEntityComponent", + "Id": 8024752235278898687 + }, + "Component_[8373296084678231042]": { + "$type": "EditorEntitySortComponent", + "Id": 8373296084678231042 + }, + "Component_[9782967158965587831]": { + "$type": "EditorInspectorComponent", + "Id": 9782967158965587831, + "ComponentOrderEntryArray": [ + { + "ComponentId": 12610073699988743015 + }, + { + "ComponentId": 7679080692843343453, + "SortIndex": 1 + } + ] + } + } + }, + "Entity_[301527218279]": { + "Id": "Entity_[301527218279]", + "Name": "Slices/bullet.dynamicslice", + "Components": { + "Component_[15613078542630153866]": { + "$type": "EditorInspectorComponent", + "Id": 15613078542630153866, + "ComponentOrderEntryArray": [ + { + "ComponentId": 2483032678718995164 + }, + { + "ComponentId": 9734604379060902193, + "SortIndex": 1 + } + ] + }, + "Component_[16098942854900817264]": { + "$type": "SelectionComponent", + "Id": 16098942854900817264 + }, + "Component_[16720139961856477500]": { + "$type": "EditorEntitySortComponent", + "Id": 16720139961856477500 + }, + "Component_[2483032678718995164]": { + "$type": "{27F1E1A1-8D9D-4C3B-BD3A-AFB9762449C0} TransformComponent", + "Id": 2483032678718995164, + "Parent Entity": "Entity_[305822185575]" + }, + "Component_[2502984783426127018]": { + "$type": "EditorLockComponent", + "Id": 2502984783426127018 + }, + "Component_[46714013890147210]": { + "$type": "EditorOnlyEntityComponent", + "Id": 46714013890147210 + }, + "Component_[4907474530744780429]": { + "$type": "EditorDisabledCompositionComponent", + "Id": 4907474530744780429 + }, + "Component_[5420332829198300813]": { + "$type": "EditorPendingCompositionComponent", + "Id": 5420332829198300813 + }, + "Component_[7683578164681693579]": { + "$type": "EditorEntityIconComponent", + "Id": 7683578164681693579 + }, + "Component_[8312115250363172310]": { + "$type": "EditorVisibilityComponent", + "Id": 8312115250363172310 + }, + "Component_[9734604379060902193]": { + "$type": "EditorCommentComponent", + "Id": 9734604379060902193, + "Configuration": "Relative product path that matches an existing dependency of this asset" + } + } + }, + "Entity_[305822185575]": { + "Id": "Entity_[305822185575]", + "Name": "AssetReferences", + "Components": { + "Component_[13422135993444528172]": { + "$type": "EditorPendingCompositionComponent", + "Id": 13422135993444528172 + }, + "Component_[13988015667379021413]": { + "$type": "EditorLockComponent", + "Id": 13988015667379021413 + }, + "Component_[14885956487876614434]": { + "$type": "EditorVisibilityComponent", + "Id": 14885956487876614434 + }, + "Component_[15550715415947731915]": { + "$type": "EditorDisabledCompositionComponent", + "Id": 15550715415947731915 + }, + "Component_[2576266145980379805]": { + "$type": "EditorInspectorComponent", + "Id": 2576266145980379805, + "ComponentOrderEntryArray": [ + { + "ComponentId": 3176911836967955668 + }, + { + "ComponentId": 836721549453007197, + "SortIndex": 1 + } + ] + }, + "Component_[3176911836967955668]": { + "$type": "{27F1E1A1-8D9D-4C3B-BD3A-AFB9762449C0} TransformComponent", + "Id": 3176911836967955668, + "Parent Entity": "Entity_[274004659287]" + }, + "Component_[5613459137294642234]": { + "$type": "SelectionComponent", + "Id": 5613459137294642234 + }, + "Component_[6400873582148097152]": { + "$type": "EditorEntityIconComponent", + "Id": 6400873582148097152 + }, + "Component_[684670817803453913]": { + "$type": "EditorEntitySortComponent", + "Id": 684670817803453913, + "Child Entity Order": [ + "Entity_[323002054759]", + "Entity_[327297022055]", + "Entity_[301527218279]", + "Entity_[318707087463]", + "Entity_[297232250983]", + "Entity_[314412120167]", + "Entity_[331591989351]", + "Entity_[310117152871]" + ] + }, + "Component_[8118206464926826097]": { + "$type": "EditorOnlyEntityComponent", + "Id": 8118206464926826097 + }, + "Component_[836721549453007197]": { + "$type": "EditorCommentComponent", + "Id": 836721549453007197, + "Configuration": "Entity names are used to trigger the missing dependency scanner. Comments are stripped from dynamic slices." + } + } + }, + "Entity_[310117152871]": { + "Id": "Entity_[310117152871]", + "Name": "Materials/FakeMaterial.mtl", + "Components": { + "Component_[10593857511582714674]": { + "$type": "EditorInspectorComponent", + "Id": 10593857511582714674, + "ComponentOrderEntryArray": [ + { + "ComponentId": 11797216659359478300 + }, + { + "ComponentId": 13816702107134233983, + "SortIndex": 1 + } + ] + }, + "Component_[11797216659359478300]": { + "$type": "{27F1E1A1-8D9D-4C3B-BD3A-AFB9762449C0} TransformComponent", + "Id": 11797216659359478300, + "Parent Entity": "Entity_[305822185575]" + }, + "Component_[13816702107134233983]": { + "$type": "EditorCommentComponent", + "Id": 13816702107134233983, + "Configuration": "Invalid path that does not match an existing dependency of this asset" + }, + "Component_[14868583012186337705]": { + "$type": "EditorOnlyEntityComponent", + "Id": 14868583012186337705 + }, + "Component_[14965348027145283648]": { + "$type": "EditorEntitySortComponent", + "Id": 14965348027145283648 + }, + "Component_[15075774238648121688]": { + "$type": "EditorEntityIconComponent", + "Id": 15075774238648121688 + }, + "Component_[16157883709857447266]": { + "$type": "EditorLockComponent", + "Id": 16157883709857447266 + }, + "Component_[17712080510249108208]": { + "$type": "EditorVisibilityComponent", + "Id": 17712080510249108208 + }, + "Component_[2247408514677946398]": { + "$type": "SelectionComponent", + "Id": 2247408514677946398 + }, + "Component_[5565369976544134481]": { + "$type": "EditorPendingCompositionComponent", + "Id": 5565369976544134481 + }, + "Component_[6044814215558788086]": { + "$type": "EditorDisabledCompositionComponent", + "Id": 6044814215558788086 + } + } + }, + "Entity_[314412120167]": { + "Id": "Entity_[314412120167]", + "Name": "88888888-4444-4444-4444-CCCCCCCCCCCC", + "Components": { + "Component_[10072177500579430176]": { + "$type": "EditorLockComponent", + "Id": 10072177500579430176 + }, + "Component_[10853215476279564671]": { + "$type": "EditorCommentComponent", + "Id": 10853215476279564671, + "Configuration": "UUID that does not exist" + }, + "Component_[13413154971272749631]": { + "$type": "SelectionComponent", + "Id": 13413154971272749631 + }, + "Component_[15316173756367163440]": { + "$type": "EditorInspectorComponent", + "Id": 15316173756367163440, + "ComponentOrderEntryArray": [ + { + "ComponentId": 3266728630359207653 + }, + { + "ComponentId": 10853215476279564671, + "SortIndex": 1 + } + ] + }, + "Component_[15809307959802829291]": { + "$type": "EditorEntitySortComponent", + "Id": 15809307959802829291 + }, + "Component_[17649652752752487081]": { + "$type": "EditorEntityIconComponent", + "Id": 17649652752752487081 + }, + "Component_[2130036493438440377]": { + "$type": "EditorPendingCompositionComponent", + "Id": 2130036493438440377 + }, + "Component_[3266728630359207653]": { + "$type": "{27F1E1A1-8D9D-4C3B-BD3A-AFB9762449C0} TransformComponent", + "Id": 3266728630359207653, + "Parent Entity": "Entity_[305822185575]" + }, + "Component_[5892125564582966187]": { + "$type": "EditorVisibilityComponent", + "Id": 5892125564582966187 + }, + "Component_[597602776660257245]": { + "$type": "EditorOnlyEntityComponent", + "Id": 597602776660257245 + }, + "Component_[8238652007701465495]": { + "$type": "EditorDisabledCompositionComponent", + "Id": 8238652007701465495 + } + } + }, + "Entity_[318707087463]": { + "Id": "Entity_[318707087463]", + "Name": "BBA1A5494C73578894BF0692CDA5FC33", + "Components": { + "Component_[10222455787643359341]": { + "$type": "EditorPendingCompositionComponent", + "Id": 10222455787643359341 + }, + "Component_[11487845392038268864]": { + "$type": "SelectionComponent", + "Id": 11487845392038268864 + }, + "Component_[12135534290310046764]": { + "$type": "EditorVisibilityComponent", + "Id": 12135534290310046764 + }, + "Component_[14412623226519978498]": { + "$type": "EditorOnlyEntityComponent", + "Id": 14412623226519978498 + }, + "Component_[14516371382857751872]": { + "$type": "EditorEntityIconComponent", + "Id": 14516371382857751872 + }, + "Component_[16011611743122468576]": { + "$type": "EditorInspectorComponent", + "Id": 16011611743122468576, + "ComponentOrderEntryArray": [ + { + "ComponentId": 4157328932578509254 + }, + { + "ComponentId": 8524796860605854850, + "SortIndex": 1 + } + ] + }, + "Component_[3813931698067937301]": { + "$type": "EditorEntitySortComponent", + "Id": 3813931698067937301 + }, + "Component_[4157328932578509254]": { + "$type": "{27F1E1A1-8D9D-4C3B-BD3A-AFB9762449C0} TransformComponent", + "Id": 4157328932578509254, + "Parent Entity": "Entity_[305822185575]" + }, + "Component_[8524796860605854850]": { + "$type": "EditorCommentComponent", + "Id": 8524796860605854850, + "Configuration": "UUID that matches an existing dependency of this asset (lumbertank_body.cgf)" + }, + "Component_[8660819596448699427]": { + "$type": "EditorLockComponent", + "Id": 8660819596448699427 + }, + "Component_[8768262795169819026]": { + "$type": "EditorDisabledCompositionComponent", + "Id": 8768262795169819026 + } + } + }, + "Entity_[323002054759]": { + "Id": "Entity_[323002054759]", + "Name": "Materials/am_rockground.mtl", + "Components": { + "Component_[13459503224133892836]": { + "$type": "EditorEntityIconComponent", + "Id": 13459503224133892836 + }, + "Component_[1346698328271204385]": { + "$type": "EditorVisibilityComponent", + "Id": 1346698328271204385 + }, + "Component_[13662830241397426219]": { + "$type": "SelectionComponent", + "Id": 13662830241397426219 + }, + "Component_[14169735046939083706]": { + "$type": "EditorInspectorComponent", + "Id": 14169735046939083706, + "ComponentOrderEntryArray": [ + { + "ComponentId": 833157791612452820 + }, + { + "ComponentId": 3573928838741352115, + "SortIndex": 1 + } + ] + }, + "Component_[16049700338512950477]": { + "$type": "EditorDisabledCompositionComponent", + "Id": 16049700338512950477 + }, + "Component_[16191253524853449302]": { + "$type": "EditorOnlyEntityComponent", + "Id": 16191253524853449302 + }, + "Component_[1737139665005484521]": { + "$type": "EditorPendingCompositionComponent", + "Id": 1737139665005484521 + }, + "Component_[17562284119637289685]": { + "$type": "EditorEntitySortComponent", + "Id": 17562284119637289685 + }, + "Component_[3573928838741352115]": { + "$type": "EditorCommentComponent", + "Id": 3573928838741352115, + "Configuration": "Relative source path that matches an existing dependency of this asset" + }, + "Component_[485401015869338526]": { + "$type": "EditorLockComponent", + "Id": 485401015869338526 + }, + "Component_[833157791612452820]": { + "$type": "{27F1E1A1-8D9D-4C3B-BD3A-AFB9762449C0} TransformComponent", + "Id": 833157791612452820, + "Parent Entity": "Entity_[305822185575]" + } + } + }, + "Entity_[327297022055]": { + "Id": "Entity_[327297022055]", + "Name": "Config/Game.xml", + "Components": { + "Component_[11848260632907964142]": { + "$type": "EditorInspectorComponent", + "Id": 11848260632907964142, + "ComponentOrderEntryArray": [ + { + "ComponentId": 497869813123895830 + }, + { + "ComponentId": 5248857300320701553, + "SortIndex": 1 + } + ] + }, + "Component_[12842864953492512672]": { + "$type": "EditorEntitySortComponent", + "Id": 12842864953492512672 + }, + "Component_[16656501539883791157]": { + "$type": "EditorLockComponent", + "Id": 16656501539883791157 + }, + "Component_[17365661125603122123]": { + "$type": "EditorEntityIconComponent", + "Id": 17365661125603122123 + }, + "Component_[2967487135389707052]": { + "$type": "EditorDisabledCompositionComponent", + "Id": 2967487135389707052 + }, + "Component_[3356294263684362888]": { + "$type": "EditorOnlyEntityComponent", + "Id": 3356294263684362888 + }, + "Component_[497869813123895830]": { + "$type": "{27F1E1A1-8D9D-4C3B-BD3A-AFB9762449C0} TransformComponent", + "Id": 497869813123895830, + "Parent Entity": "Entity_[305822185575]" + }, + "Component_[5248857300320701553]": { + "$type": "EditorCommentComponent", + "Id": 5248857300320701553, + "Configuration": "Valid path that does not match an existing dependency of this asset. Should report as a missing dependency" + }, + "Component_[746309483212393367]": { + "$type": "SelectionComponent", + "Id": 746309483212393367 + }, + "Component_[8319831469290771470]": { + "$type": "EditorPendingCompositionComponent", + "Id": 8319831469290771470 + }, + "Component_[9369067377618608622]": { + "$type": "EditorVisibilityComponent", + "Id": 9369067377618608622 + } + } + }, + "Entity_[331591989351]": { + "Id": "Entity_[331591989351]", + "Name": "1151F14D38A65579888ABE3139882E68:[333]", + "Components": { + "Component_[104857639379046106]": { + "$type": "{27F1E1A1-8D9D-4C3B-BD3A-AFB9762449C0} TransformComponent", + "Id": 104857639379046106, + "Parent Entity": "Entity_[305822185575]" + }, + "Component_[1061601983221247493]": { + "$type": "EditorLockComponent", + "Id": 1061601983221247493 + }, + "Component_[11028443253330664986]": { + "$type": "EditorVisibilityComponent", + "Id": 11028443253330664986 + }, + "Component_[13806275118632081006]": { + "$type": "EditorEntitySortComponent", + "Id": 13806275118632081006 + }, + "Component_[13922573109551604801]": { + "$type": "EditorEntityIconComponent", + "Id": 13922573109551604801 + }, + "Component_[17027032709917108335]": { + "$type": "EditorDisabledCompositionComponent", + "Id": 17027032709917108335 + }, + "Component_[17030988165269698825]": { + "$type": "EditorOnlyEntityComponent", + "Id": 17030988165269698825 + }, + "Component_[2294579021665535860]": { + "$type": "EditorPendingCompositionComponent", + "Id": 2294579021665535860 + }, + "Component_[5863078697041048226]": { + "$type": "EditorInspectorComponent", + "Id": 5863078697041048226, + "ComponentOrderEntryArray": [ + { + "ComponentId": 104857639379046106 + }, + { + "ComponentId": 9466290982672370664, + "SortIndex": 1 + } + ] + }, + "Component_[7608263859116142496]": { + "$type": "SelectionComponent", + "Id": 7608263859116142496 + }, + "Component_[9466290982672370664]": { + "$type": "EditorCommentComponent", + "Id": 9466290982672370664, + "Configuration": "Asset ID that does not exist (am_grass1.mtl UUID, no matching product ID)" + } + } + } + } +} \ No newline at end of file diff --git a/AutomatedTesting/Gem/PythonTests/assetpipeline/asset_processor_tests/assets/test_AP_Logs/BadAsset.fbx b/AutomatedTesting/Gem/PythonTests/assetpipeline/asset_processor_tests/assets/test_AP_Logs/BadAsset.fbx new file mode 100644 index 0000000000..cf1bbaac8a --- /dev/null +++ b/AutomatedTesting/Gem/PythonTests/assetpipeline/asset_processor_tests/assets/test_AP_Logs/BadAsset.fbx @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:7c6b33c6137d6bd8c696f180c30a23089c95c1af398a630b4b13e080bec3254d +size 18220 diff --git a/AutomatedTesting/Gem/PythonTests/assetpipeline/asset_processor_tests/assets/test_AddSameAssetsDifferentNames_ShouldProcess/Energy_Background_One.png b/AutomatedTesting/Gem/PythonTests/assetpipeline/asset_processor_tests/assets/test_AddSameAssetsDifferentNames_ShouldProcess/Energy_Background_One.png deleted file mode 100644 index e012e887e7..0000000000 --- a/AutomatedTesting/Gem/PythonTests/assetpipeline/asset_processor_tests/assets/test_AddSameAssetsDifferentNames_ShouldProcess/Energy_Background_One.png +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:21df6ab62f2572daa6d0710ad6819a728ee751a62170903a6773563d614aa51f -size 15191 diff --git a/AutomatedTesting/Gem/PythonTests/assetpipeline/asset_processor_tests/assets/test_AddSameAssetsDifferentNames_ShouldProcess/Energy_Background_Two.png b/AutomatedTesting/Gem/PythonTests/assetpipeline/asset_processor_tests/assets/test_AddSameAssetsDifferentNames_ShouldProcess/Energy_Background_Two.png deleted file mode 100644 index e012e887e7..0000000000 --- a/AutomatedTesting/Gem/PythonTests/assetpipeline/asset_processor_tests/assets/test_AddSameAssetsDifferentNames_ShouldProcess/Energy_Background_Two.png +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:21df6ab62f2572daa6d0710ad6819a728ee751a62170903a6773563d614aa51f -size 15191 diff --git a/AutomatedTesting/Gem/PythonTests/assetpipeline/asset_processor_tests/assets/test_ProcessAndDeleteCache_APBatchShouldReprocess/Init.bnk b/AutomatedTesting/Gem/PythonTests/assetpipeline/asset_processor_tests/assets/test_ProcessAndDeleteCache_APBatchShouldReprocess/Init.bnk deleted file mode 100644 index f525a402af..0000000000 --- a/AutomatedTesting/Gem/PythonTests/assetpipeline/asset_processor_tests/assets/test_ProcessAndDeleteCache_APBatchShouldReprocess/Init.bnk +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:f0b4750147acbcc6229a1043ed47ee48e7703a5241f27fc72976e95741144369 -size 2372 diff --git a/AutomatedTesting/Gem/PythonTests/assetpipeline/asset_processor_tests/assets/test_ProcessAndDeleteCache_APBatchShouldReprocess/entity_icon_example_2.png b/AutomatedTesting/Gem/PythonTests/assetpipeline/asset_processor_tests/assets/test_ProcessAndDeleteCache_APBatchShouldReprocess/entity_icon_example_2.png deleted file mode 100644 index 47e2d35331..0000000000 --- a/AutomatedTesting/Gem/PythonTests/assetpipeline/asset_processor_tests/assets/test_ProcessAndDeleteCache_APBatchShouldReprocess/entity_icon_example_2.png +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:a036c3763b96079dde8505ad6995f8b717a777c78d7a434ac8de6f1ccb5d8dd1 -size 4327 diff --git a/AutomatedTesting/Gem/PythonTests/assetpipeline/asset_processor_tests/assets/test_ProcessByBothApAndBatch_Md5ShouldMatch/SoundWave_1.png b/AutomatedTesting/Gem/PythonTests/assetpipeline/asset_processor_tests/assets/test_ProcessByBothApAndBatch_Md5ShouldMatch/SoundWave_1.png deleted file mode 100644 index b3b8fba4a1..0000000000 --- a/AutomatedTesting/Gem/PythonTests/assetpipeline/asset_processor_tests/assets/test_ProcessByBothApAndBatch_Md5ShouldMatch/SoundWave_1.png +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:cf55a4372d82d70d8cdcc95468367cd4fad7649d3fb99c4d85049977b506885c -size 13429 diff --git a/AutomatedTesting/Gem/PythonTests/assetpipeline/asset_processor_tests/assets/test_ProcessByBothApAndBatch_Md5ShouldMatch/extra_file.prefab b/AutomatedTesting/Gem/PythonTests/assetpipeline/asset_processor_tests/assets/test_ProcessByBothApAndBatch_Md5ShouldMatch/extra_file.prefab new file mode 100644 index 0000000000..9e26dfeeb6 --- /dev/null +++ b/AutomatedTesting/Gem/PythonTests/assetpipeline/asset_processor_tests/assets/test_ProcessByBothApAndBatch_Md5ShouldMatch/extra_file.prefab @@ -0,0 +1 @@ +{} \ No newline at end of file diff --git a/AutomatedTesting/Gem/PythonTests/assetpipeline/asset_processor_tests/assets/test_ProcessByBothApAndBatch_Md5ShouldMatch/test_cube.fbx b/AutomatedTesting/Gem/PythonTests/assetpipeline/asset_processor_tests/assets/test_ProcessByBothApAndBatch_Md5ShouldMatch/test_cube.fbx deleted file mode 100644 index 57fa7b327c..0000000000 --- a/AutomatedTesting/Gem/PythonTests/assetpipeline/asset_processor_tests/assets/test_ProcessByBothApAndBatch_Md5ShouldMatch/test_cube.fbx +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:1821d000b583821fd36ec73f91073d51ae90762225a34a81a74771c36236b5e1 -size 12963 diff --git a/AutomatedTesting/Gem/PythonTests/assetpipeline/asset_processor_tests/bundle_mode_in_editor_tests.py b/AutomatedTesting/Gem/PythonTests/assetpipeline/asset_processor_tests/bundle_mode_in_editor_tests.py new file mode 100644 index 0000000000..33a55d6601 --- /dev/null +++ b/AutomatedTesting/Gem/PythonTests/assetpipeline/asset_processor_tests/bundle_mode_in_editor_tests.py @@ -0,0 +1,20 @@ +""" +Copyright (c) Contributors to the Open 3D Engine Project. +For complete copyright and license terms please see the LICENSE at the root of this distribution. + +SPDX-License-Identifier: Apache-2.0 OR MIT +""" +import azlmbr.bus +import azlmbr.editor +import azlmbr.legacy.general +import sys + +# Print out the passed in bundle_path, so the outer test can verify this was sent in correctly +bundle_path = sys.argv[1] +print('Bundle mode test running with path {}'.format(sys.argv[1])) + +# Turn on bundle mode. This will trigger some printouts that the outer test logic will validate. +azlmbr.legacy.general.set_cvar_integer("sys_report_files_not_found_in_paks", 1) +azlmbr.legacy.general.run_console(f"loadbundles {bundle_path}") + +azlmbr.editor.EditorToolsApplicationRequestBus(azlmbr.bus.Broadcast, 'ExitNoPrompt') diff --git a/AutomatedTesting/Gem/PythonTests/assetpipeline/asset_processor_tests/bundle_mode_tests.py b/AutomatedTesting/Gem/PythonTests/assetpipeline/asset_processor_tests/bundle_mode_tests.py new file mode 100644 index 0000000000..b2252567b6 --- /dev/null +++ b/AutomatedTesting/Gem/PythonTests/assetpipeline/asset_processor_tests/bundle_mode_tests.py @@ -0,0 +1,92 @@ +""" +Copyright (c) Contributors to the Open 3D Engine Project. +For complete copyright and license terms please see the LICENSE at the root of this distribution. + +SPDX-License-Identifier: Apache-2.0 OR MIT +""" + +import os +import pytest +import logging +import sys +import time +pytest.importorskip('ly_test_tools') + +import ly_test_tools.environment.file_system as fs +import ly_test_tools.environment.waiter as waiter +import ly_test_tools.log.log_monitor + +from ..ap_fixtures.asset_processor_fixture import asset_processor as asset_processor +from ..ap_fixtures.bundler_batch_setup_fixture import bundler_batch_setup_fixture as bundler_batch_helper +from ..ap_fixtures.timeout_option_fixture import timeout_option_fixture as timeout + +@pytest.mark.SUITE_periodic +@pytest.mark.parametrize('launcher_platform', ['windows_editor']) +@pytest.mark.parametrize('project', ['AutomatedTesting']) +@pytest.mark.parametrize('level', ['TestDependenciesLevel']) +class TestBundleMode(object): + def test_bundle_mode_with_levels_mounts_bundles_correctly(self, request, editor, level, launcher_platform, + asset_processor, workspace, bundler_batch_helper): + level_pak = os.path.join("levels", level, "TestDependenciesLevel.spawnable") + bundles_folder = os.path.join(workspace.paths.project(), "Bundles") + bundle_request_path = os.path.join(bundles_folder, "bundle.pak") + bundle_result_path = os.path.join(bundles_folder, + bundler_batch_helper.platform_file_name( + "bundle.pak", workspace.asset_processor_platform)) + + # Create target 'Bundles' folder if it doesn't exist + if not os.path.exists(bundles_folder): + os.mkdir(bundles_folder) + # Delete target bundle file if it already exists + if os.path.exists(bundle_result_path): + fs.delete([bundle_result_path], True, False) + + # Make asset list file to use in the bundle + bundler_batch_helper.call_assetLists( + addSeed=level_pak, + assetListFile=bundler_batch_helper["asset_info_file_request"], + ) + + # Make bundle in /Bundles + bundler_batch_helper.call_bundles( + assetListFile=bundler_batch_helper["asset_info_file_result"], + outputBundlePath=bundle_request_path, + maxSize="2048", + ) + + # Ensure the bundle was created + assert os.path.exists(bundle_result_path), f"Bundle was not created at location: {bundle_result_path}" + + # The editor flips the slash direction in some of the printouts + bundle_result_path_editor_separator = bundle_result_path.replace('\\', '/') + + expected_lines = [ + # A beginning of test printout can help debug where failures occur, if this line is missing + # then the Editor didn't launch, didn't run the Python test, or didn't pass in the right parameter + f'Bundle mode test running with path {bundles_folder}', + # These printouts happen in response to the loadbundles call, and verify this bundle is actually loaded + f"[CONSOLE] Executing console command 'loadbundles {bundles_folder}'", + f'(BundlingSystem) - Loading bundles from {bundles_folder} of type .pak', + f'(Archive) - Opening archive file {bundle_result_path_editor_separator}', + ] + unexpected_lines = [] + + timeout = 180 + halt_on_unexpected = False + test_directory = os.path.join(os.path.dirname(__file__)) + test_file = os.path.join(test_directory, 'bundle_mode_in_editor_tests.py') + editor.args.extend(['-NullRenderer', '-rhi=Null', "--skipWelcomeScreenDialog", + "--autotest_mode", "--runpythontest", test_file, "--runpythonargs", bundles_folder]) + + with editor.start(launch_ap=True): + editor_log_file = os.path.join(editor.workspace.paths.project_log(), 'Editor.log') + log_monitor = ly_test_tools.log.log_monitor.LogMonitor(editor, editor_log_file) + waiter.wait_for( + lambda: editor.is_alive(), + timeout, + exc=("Log file '{}' was never opened by another process.".format(editor_log_file)), + interval=1) + log_monitor.monitor_log_for_lines(expected_lines, unexpected_lines, halt_on_unexpected, timeout) + + # Delete the bundle created and used in this test + fs.delete([bundle_result_path], True, False) diff --git a/AutomatedTesting/Gem/PythonTests/assetpipeline/asset_processor_tests/missing_dependency_tests.py b/AutomatedTesting/Gem/PythonTests/assetpipeline/asset_processor_tests/missing_dependency_tests.py index 7159b2e83f..52321fceea 100755 --- a/AutomatedTesting/Gem/PythonTests/assetpipeline/asset_processor_tests/missing_dependency_tests.py +++ b/AutomatedTesting/Gem/PythonTests/assetpipeline/asset_processor_tests/missing_dependency_tests.py @@ -120,31 +120,29 @@ class TestsMissingDependencies_WindowsAndMac(object): # Relative path to the txt file with missing dependencies expected_product = f"testassets\\validuuidsnotdependency.txt" - self._asset_processor.add_source_folder_assets(f"{self._workspace.project}\\Objects\\LumberTank") - self._asset_processor.add_source_folder_assets(f"{self._workspace.project}\\Objects\\Characters\\Jack") # Expected missing dependencies expected_dependencies = [ # String Asset # - ('1CB10C43F3245B93A294C602ADEF95F9:[0', '{1CB10C43-F324-5B93-A294-C602ADEF95F9}:0'), + # InvalidAssetIdNoReport.txt + ('E68A85B0-131D-5A82-B2D5-BC58EE4062AE', '{E68A85B0-131D-5A82-B2D5-BC58EE4062AE}:0'), + # InvalidRelativePathsNoReport.txt + ('B3EF12DD306C520EB0A8A6B0D031A195', '{B3EF12DD-306C-520E-B0A8-A6B0D031A195}:0'), + # SelfReferenceUUID.txt ('33bcee02F3225688ABEE534F6058593F', '{33BCEE02-F322-5688-ABEE-534F6058593F}:0'), - ('345E5C660D6254FF8D0F7C8EE66A2249', '{345E5C66-0D62-54FF-8D0F-7C8EE66A2249}:3e8'), - ('345E5C660D6254FF8D0F7C8EE66A2249', '{345E5C66-0D62-54FF-8D0F-7C8EE66A2249}:3ea'), - ('345E5C660D6254FF8D0F7C8EE66A2249', '{345E5C66-0D62-54FF-8D0F-7C8EE66A2249}:3eb'), - ('37108522F50459499CD6C8D47A960CF1', '{37108522-F504-5949-9CD6-C8D47A960CF1}:3e8'), - ('37108522F50459499CD6C8D47A960CF1', '{37108522-F504-5949-9CD6-C8D47A960CF1}:3ea'), - ('37108522F50459499CD6C8D47A960CF1', '{37108522-F504-5949-9CD6-C8D47A960CF1}:3eb'), - ('6BDE282B49C957F7B0714B26579BCA9A', '{6BDE282B-49C9-57F7-B071-4B26579BCA9A}:0'), - ('747D31D71E62553592226173C49CF97E', '{747D31D7-1E62-5535-9222-6173C49CF97E}:1'), - ('747D31D71E62553592226173C49CF97E', '{747D31D7-1E62-5535-9222-6173C49CF97E}:2'), - ('A26C73D1837E5AE59E68F916FA7C3699', '{A26C73D1-837E-5AE5-9E68-F916FA7C3699}:3e8'), - ('A26C73D1837E5AE59E68F916FA7C3699', '{A26C73D1-837E-5AE5-9E68-F916FA7C3699}:3ea'), - ('A26C73D1837E5AE59E68F916FA7C3699', '{A26C73D1-837E-5AE5-9E68-F916FA7C3699}:3eb'), - ('B076CDDC-14DF-50F4-A5E9-7518ABB3E851', '{B076CDDC-14DF-50F4-A5E9-7518ABB3E851}:0'), - ('C67BEA9F-09FF-59AA-A7F0-A52B8F987508', '{C67BEA9F-09FF-59AA-A7F0-A52B8F987508}:3e8'), - ('C67BEA9F-09FF-59AA-A7F0-A52B8F987508', '{C67BEA9F-09FF-59AA-A7F0-A52B8F987508}:3ea'), - ('C67BEA9F-09FF-59AA-A7F0-A52B8F987508', '{C67BEA9F-09FF-59AA-A7F0-A52B8F987508}:3eb'), - ('C67BEA9F-09FF-59AA-A7F0-A52B8F987508', '{C67BEA9F-09FF-59AA-A7F0-A52B8F987508}:3ec'), - ('D92C4661C8985E19BD3597CB2318CFA6:[0', '{D92C4661-C898-5E19-BD35-97CB2318CFA6}:0'), + # SelfReferencePath.txt + ('DD587FBE-16C8-5B98-AE3C-A9F8750B2692', '{DD587FBE-16C8-5B98-AE3C-A9F8750B2692}:0'), + # InvalidUUIDNoReport.txt + ('837412DF-D05F-576D-81AA-ACF360463749', '{837412DF-D05F-576D-81AA-ACF360463749}:0'), + # MaxIteration31Deep.txt + ('3F642A0FDC825696A70A1DA5709744DF', '{3F642A0F-DC82-5696-A70A-1DA5709744DF}:0'), + # OnlyMatchesCorrectLengthUUIDs.txt + ('2545AD8B-1B9B-5F93-859D-D8DC1DC2B480', '{2545AD8B-1B9B-5F93-859D-D8DC1DC2B480}:0'), + # WildcardScanTest1.txt + ('1CB10C43F3245B93A294C602ADEF95F9:[0', '{1CB10C43-F324-5B93-A294-C602ADEF95F9}:0'), + # RelativeProductPathsNotDependencies.txt + ('B772953CA08A5D209491530E87D11504:[0', '{B772953C-A08A-5D20-9491-530E87D11504}:0'), + # WildcardScanTest2.txt + ('D92C4661C8985E19BD3597CB2318CFA6', '{D92C4661-C898-5E19-BD35-97CB2318CFA6}:0'), ] self.do_missing_dependency_test(expected_product, expected_dependencies, "%ValidUUIDsNotDependency.txt") @@ -187,8 +185,11 @@ class TestsMissingDependencies_WindowsAndMac(object): # Expected missing dependencies expected_dependencies = [ # String Asset # - ('2ef92b8D044E5C278E2BB1AC0374A4E7:1003', '{2EF92B8D-044E-5C27-8E2B-B1AC0374A4E7}:3eb'), + # _dev_Red.tif + ('2ef92b8D044E5C278E2BB1AC0374A4E7:1000', '{2EF92B8D-044E-5C27-8E2B-B1AC0374A4E7}:3e8'), + # _dev_Purple.tif ('A2482826-053D-5634-A27B-084B1326AAE5}:[1002', '{A2482826-053D-5634-A27B-084B1326AAE5}:3ea'), + # _dev_White.tif ('D83B36F1-61A6-5001-B191-4D0CE282E236}-1002', '{D83B36F1-61A6-5001-B191-4D0CE282E236}:3ea'), ] @@ -237,11 +238,10 @@ class TestsMissingDependencies_WindowsAndMac(object): expected_dependencies = [ # String Asset # ('TestAssets\\WildcardScanTest1.txt', '{1CB10C43-F324-5B93-A294-C602ADEF95F9}:0'), - ('libs/particles/milestone2PARTICLES.XML', '{6BDE282B-49C9-57F7-B071-4B26579BCA9A}:0'), + ('TESTASSETS/ReportONEmISSINGdEPENDENCY.tXT', '{BE5E2373-245E-59E4-B4C6-7370EEAA2EFD}:0'), ('textures/_dev_Purple.tif', '{A2482826-053D-5634-A27B-084B1326AAE5}:3e8'), ('textures/_dev_Purple.tif', '{A2482826-053D-5634-A27B-084B1326AAE5}:3ea'), - ('textures/_dev_Purple.tif', '{A2482826-053D-5634-A27B-084B1326AAE5}:3eb'), - ('project.json', '{B076CDDC-14DF-50F4-A5E9-7518ABB3E851}:0'), + ('TestAssets/InvalidAssetIdNoReport.txt', '{E68A85B0-131D-5A82-B2D5-BC58EE4062AE}:0'), ('TestAssets/RelativeProductPathsNotDependencies.txt', '{B772953C-A08A-5D20-9491-530E87D11504}:0'), ] @@ -282,29 +282,31 @@ class TestsMissingDependencies_WindowsAndMac(object): 2. Set the expected missing dependencies 3. Execute test """ - - self._asset_processor.add_source_folder_assets(f"Gems\\LyShineExamples\\Assets\\UI\\Fonts\\LyShineExamples") - self._asset_processor.add_scan_folder(f"Gems\\LyShineExamples\\Assets") # Relative path to the txt file with missing dependencies as product paths expected_product = f"testassets\\relativeproductpathsnotdependencies.txt" expected_dependencies = [ # String Asset # - ('materials/floor_tile.mtl', '{0EFF5E4A-F544-5D87-8696-6DDFA62D6063}:0'), - ('materials/am_grass1.mtl', '{1151F14D-38A6-5579-888A-BE3139882E68}:0'), - ('2ef92b8D044E5C278E2BB1AC0374A4E7:1002', '{2EF92B8D-044E-5C27-8E2B-B1AC0374A4E7}:3ea'), - ('textures/milestone2/ama_grey_02.tif.streamingimage', '{3EE80AAD-EB9C-56BD-9E9C-65410578998C}:3e8'), - ('ui/milestone2menu.uicanvas', '{445D9AF3-6CA5-5281-82A9-5C570BCD1DB8}:0'), - ('libs/particles/milestone2particles.xml', '{6BDE282B-49C9-57F7-B071-4B26579BCA9A}:0'), - ('textures/_dev_yellow_light.tif.1002.imagemipchain', '{6C40868F-3FC1-5115-96EA-DD0A9E33DEE4}:3ea'), - ('textures\\\\_dev_tan.tif.streamingimage', '{8F2BCEF5-C8CE-5B80-8103-8C1D694D012C}:3e8'), - ('materials/am_rockground.mtl', '{A1DA3D05-A020-5BB5-A608-C4812B7BD733}:0'), ('textures/_dev_purple.tif.streamingimage', '{A2482826-053D-5634-A27B-084B1326AAE5}:3e8'), - ('A2482826-053D-5634-A27B-084B1326AAE5}:[1002', '{A2482826-053D-5634-A27B-084B1326AAE5}:3ea'), - ('project.json', '{B076CDDC-14DF-50F4-A5E9-7518ABB3E851}:0'), - ('CEAA362B4E505BCEB827CB92EF40A50E', '{CEAA362B-4E50-5BCE-B827-CB92EF40A50E}:1'), - ('CEAA362B4E505BCEB827CB92EF40A50E', '{CEAA362B-4E50-5BCE-B827-CB92EF40A50E}:2'), + ('textures\\_dev_stucco.tif.streamingimage', '{70114D85-D712-5AEB-A816-8FE3A37087AF}:3e8'), + ('textures\\\\_dev_tan.tif.streamingimage', '{8F2BCEF5-C8CE-5B80-8103-8C1D694D012C}:3e8'), ('TEXTURES/_DEV_WHITE.tif.streamingimage', '{D83B36F1-61A6-5001-B191-4D0CE282E236}:3e8'), + ('textures/_dev_yellow_light.tif.1002.imagemipchain', '{6C40868F-3FC1-5115-96EA-DD0A9E33DEE4}:3ea'), + ('textures/_dev_woodland.tif.1002.imagemipchain', '{F3DD193C-5845-569C-A974-AA338B30CF86}:3ea'), ('textures/_dev_woodland.tif.streamingimage', '{F3DD193C-5845-569C-A974-AA338B30CF86}:3e8'), + ('textures/_dev_yellow_light.tif.streamingimage', '{6C40868F-3FC1-5115-96EA-DD0A9E33DEE4}:3e8'), + ('textures/_dev_yellow_med.tif.1002.imagemipchain', '{BB4DFF57-52BD-525B-9628-68232E31802C}:3ea'), + ('textures/lights/flare01.tif.streamingimage', '{D8E49CC4-C743-5F31-A1EC-4AA89163B8F5}:3e8'), + # SelfReferenceUUID.txt + ('33BCEE02-F322-5688-ABEE-534F6058593F', '{33BCEE02-F322-5688-ABEE-534F6058593F}:0'), + ('textures/test_texture_sequence/test_texture_sequence000.png.streamingimage', '{6CC90BEE-0A9F-57A8-9013-7C1D643C0E8E}:3e8'), + # _dev_red.tif.streamingimage + ('2ef92b8D044E5C278E2BB1AC0374A4E7:1002', '{2EF92B8D-044E-5C27-8E2B-B1AC0374A4E7}:3ea'), + # SelfReferenceAssetID.txt + ('785A05D2-483E-5B43-A2B9-92ACDAE6E938', '{785A05D2-483E-5B43-A2B9-92ACDAE6E938}:0'), + ('textures/test_texture_sequence/test_texture_sequence001.png.streamingimage', '{8A8A37DD-01B9-5D70-92E4-925E2C0FE826}:3e8'), + # _dev_purple.tif.1002.imagemipchain + ('A2482826-053D-5634-A27B-084B1326AAE5}:[1002', '{A2482826-053D-5634-A27B-084B1326AAE5}:3ea'), + ('textures/_dev_purple_glass.tif.1002.imagemipchain', '{2FCDD831-77D1-5BE1-A4C8-CA47E4F89F19}:3ea'), ] self.do_missing_dependency_test(expected_product, expected_dependencies, diff --git a/AutomatedTesting/Gem/PythonTests/assetpipeline/fbx_tests/assets/TwoSceneFiles_OneWithPythonOneWithout_PythonOnlyRunsOnFirstScene/python_builder.py b/AutomatedTesting/Gem/PythonTests/assetpipeline/fbx_tests/assets/TwoSceneFiles_OneWithPythonOneWithout_PythonOnlyRunsOnFirstScene/python_builder.py index 7ad5894a86..a9759e3d33 100644 --- a/AutomatedTesting/Gem/PythonTests/assetpipeline/fbx_tests/assets/TwoSceneFiles_OneWithPythonOneWithout_PythonOnlyRunsOnFirstScene/python_builder.py +++ b/AutomatedTesting/Gem/PythonTests/assetpipeline/fbx_tests/assets/TwoSceneFiles_OneWithPythonOneWithout_PythonOnlyRunsOnFirstScene/python_builder.py @@ -23,7 +23,7 @@ def output_test_data(scene): # Just write something to the file, but the filename is the main information # used for the test. f.write(f"scene.sourceFilename: {scene.sourceFilename}\n") - return True + return '' mySceneJobHandler = None diff --git a/AutomatedTesting/Gem/PythonTests/automatedtesting_shared/base.py b/AutomatedTesting/Gem/PythonTests/automatedtesting_shared/base.py index cbb6102a44..4db959b23e 100755 --- a/AutomatedTesting/Gem/PythonTests/automatedtesting_shared/base.py +++ b/AutomatedTesting/Gem/PythonTests/automatedtesting_shared/base.py @@ -8,10 +8,12 @@ SPDX-License-Identifier: Apache-2.0 OR MIT import os import logging -import subprocess +import sys import pytest import time +from os import path + import ly_test_tools.environment.file_system as file_system import ly_test_tools.environment.process_utils as process_utils import ly_test_tools.environment.waiter as waiter @@ -52,7 +54,7 @@ class TestAutomationBase: cls._kill_ly_processes() def _run_test(self, request, workspace, editor, testcase_module, extra_cmdline_args=[], batch_mode=True, - autotest_mode=True, use_null_renderer=True): + autotest_mode=True, use_null_renderer=True, enable_prefab_system=True): test_starttime = time.time() self.logger = logging.getLogger(__name__) errors = [] @@ -97,6 +99,13 @@ class TestAutomationBase: pycmd += ["-BatchMode"] if autotest_mode: pycmd += ["-autotest_mode"] + if enable_prefab_system: + pycmd += [ + "--regset=/Amazon/Preferences/EnablePrefabSystem=true", + f"--regset-file={path.join(workspace.paths.engine_root(), 'Registry', 'prefab.test.setreg')}"] + else: + pycmd += ["--regset=/Amazon/Preferences/EnablePrefabSystem=false"] + pycmd += extra_cmdline_args editor.args.extend(pycmd) # args are added to the WinLauncher start command editor.start(backupFiles = False, launch_ap = False) @@ -123,7 +132,8 @@ class TestAutomationBase: errors.append(TestRunError("FAILED TEST", error_str)) if return_code and return_code != TestAutomationBase.TEST_FAIL_RETCODE: # Crashed crash_info = "-- No crash log available --" - crash_log = os.path.join(workspace.paths.project_log(), 'error.log') + crash_log = workspace.paths.crash_log() + try: waiter.wait_for(lambda: os.path.exists(crash_log), timeout=TestAutomationBase.WAIT_FOR_CRASH_LOG) except AssertionError: @@ -165,14 +175,14 @@ class TestAutomationBase: for line in f.readlines(): error_str += f"|{log_basename}| {line}" except Exception as ex: - error_str += "-- No log available --" + error_str += f"-- No log available ({ex})--" pytest.fail(error_str) @staticmethod def _kill_ly_processes(include_asset_processor=True): LY_PROCESSES = [ - 'Editor', 'Profiler', 'RemoteConsole', + 'Editor', 'Profiler', 'RemoteConsole', 'AutomatedTesting.ServerLauncher', 'o3de' ] AP_PROCESSES = [ 'AssetProcessor', 'AssetProcessorBatch', 'AssetBuilder', 'CrySCompileServer', diff --git a/AutomatedTesting/Gem/PythonTests/editor/CMakeLists.txt b/AutomatedTesting/Gem/PythonTests/editor/CMakeLists.txt index bf42579970..b3f0d2da8e 100644 --- a/AutomatedTesting/Gem/PythonTests/editor/CMakeLists.txt +++ b/AutomatedTesting/Gem/PythonTests/editor/CMakeLists.txt @@ -7,6 +7,7 @@ # if(PAL_TRAIT_BUILD_TESTS_SUPPORTED AND PAL_TRAIT_BUILD_HOST_TOOLS AND PAL_TRAIT_FOUNDATION_TEST_SUPPORTED) + ly_add_pytest( NAME AutomatedTesting::EditorTests_Main TEST_SUITE main @@ -22,7 +23,7 @@ if(PAL_TRAIT_BUILD_TESTS_SUPPORTED AND PAL_TRAIT_BUILD_HOST_TOOLS AND PAL_TRAIT_ ) ly_add_pytest( - NAME AutomatedTesting::EditorTests_Main_GPU + NAME AutomatedTesting::EditorTests_Main_GPU_Optimized TEST_SUITE main TEST_SERIAL TEST_REQUIRES gpu @@ -36,72 +37,4 @@ if(PAL_TRAIT_BUILD_TESTS_SUPPORTED AND PAL_TRAIT_BUILD_HOST_TOOLS AND PAL_TRAIT_ Editor ) - ly_add_pytest( - NAME AutomatedTesting::EditorTests_Periodic - TEST_SUITE periodic - TEST_SERIAL - PATH ${CMAKE_CURRENT_LIST_DIR}/TestSuite_Periodic.py - RUNTIME_DEPENDENCIES - Legacy::Editor - AZ::AssetProcessor - AutomatedTesting.Assets - COMPONENT - Editor - ) - - ly_add_pytest( - NAME AutomatedTesting::EditorTests_Sandbox - TEST_SUITE sandbox - TEST_SERIAL - PATH ${CMAKE_CURRENT_LIST_DIR}/TestSuite_Sandbox.py - RUNTIME_DEPENDENCIES - Legacy::Editor - AZ::AssetProcessor - AutomatedTesting.Assets - COMPONENT - Editor - ) - - ly_add_pytest( - NAME AutomatedTesting::EditorTests_Main_Optimized - TEST_SUITE main - TEST_SERIAL - PATH ${CMAKE_CURRENT_LIST_DIR}/TestSuite_Main_Optimized.py - PYTEST_MARKS "not REQUIRES_gpu" - RUNTIME_DEPENDENCIES - Legacy::Editor - AZ::AssetProcessor - AutomatedTesting.Assets - COMPONENT - Editor - ) - - ly_add_pytest( - NAME AutomatedTesting::EditorTests_Main_GPU_Optimized - TEST_SUITE main - TEST_SERIAL - TEST_REQUIRES gpu - PATH ${CMAKE_CURRENT_LIST_DIR}/TestSuite_Main_Optimized.py - PYTEST_MARKS "REQUIRES_gpu" - RUNTIME_DEPENDENCIES - Legacy::Editor - AZ::AssetProcessor - AutomatedTesting.Assets - COMPONENT - Editor - ) - - ly_add_pytest( - NAME AutomatedTesting::EditorTests_Sandbox_Optimized - TEST_SUITE sandbox - TEST_SERIAL - PATH ${CMAKE_CURRENT_LIST_DIR}/TestSuite_Sandbox_Optimized.py - RUNTIME_DEPENDENCIES - Legacy::Editor - AZ::AssetProcessor - AutomatedTesting.Assets - COMPONENT - Editor - ) - endif() diff --git a/AutomatedTesting/Gem/PythonTests/editor/EditorScripts/AssetBrowser_SearchFiltering.py b/AutomatedTesting/Gem/PythonTests/editor/EditorScripts/AssetBrowser_SearchFiltering.py index 33c48c7a77..4265dd6fc9 100644 --- a/AutomatedTesting/Gem/PythonTests/editor/EditorScripts/AssetBrowser_SearchFiltering.py +++ b/AutomatedTesting/Gem/PythonTests/editor/EditorScripts/AssetBrowser_SearchFiltering.py @@ -59,10 +59,10 @@ def AssetBrowser_SearchFiltering(): import azlmbr.legacy.general as general + import editor_python_test_tools.hydra_editor_utils as hydra from editor_python_test_tools.utils import Report - from editor_python_test_tools.utils import TestHelper as helper - def verify_files_appeared(model, allowed_asset_extentions, parent_index=QtCore.QModelIndex()): + def verify_files_appeared(model, allowed_asset_extensions, parent_index=QtCore.QModelIndex()): indexes = [parent_index] while len(indexes) > 0: parent_index = indexes.pop(0) @@ -71,7 +71,7 @@ def AssetBrowser_SearchFiltering(): cur_data = cur_index.data(Qt.DisplayRole) if ( "." in cur_data - and (cur_data.lower().split(".")[-1] not in allowed_asset_extentions) + and (cur_data.lower().split(".")[-1] not in allowed_asset_extensions) and not cur_data[-1] == ")" ): Report.info(f"Incorrect file found: {cur_data}") @@ -80,8 +80,7 @@ def AssetBrowser_SearchFiltering(): return True # 1) Open an existing simple level - helper.init_idle() - helper.open_level("Physics", "Base") + hydra.open_base_level() # 2) Open Asset Browser (if not opened already) editor_window = pyside_utils.get_editor_main_window() @@ -94,16 +93,27 @@ def AssetBrowser_SearchFiltering(): Report.info("Asset Browser is already open") editor_window = pyside_utils.get_editor_main_window() app = QtWidgets.QApplication.instance() - - # 3) Type the name of an asset in the search bar and make sure only one asset is filtered in Asset browser + + # 3) Type the name of an asset in the search bar and make sure it is filtered to and selectable asset_browser = editor_window.findChild(QtWidgets.QDockWidget, "Asset Browser") search_bar = asset_browser.findChild(QtWidgets.QLineEdit, "textSearch") - search_bar.setText("cedar.fbx") + + # Add a small pause when typing in the search bar in order to check that the entries are updated properly + search_bar.setText("Cedar.f") + general.idle_wait(0.5) + search_bar.setText("Cedar.fbx") + general.idle_wait(0.5) + asset_browser_tree = asset_browser.findChild(QtWidgets.QTreeView, "m_assetBrowserTreeViewWidget") - model_index = pyside_utils.find_child_by_pattern(asset_browser_tree, "cedar.fbx") - pyside_utils.item_view_index_mouse_click(asset_browser_tree, model_index) + asset_browser_table = asset_browser.findChild(QtWidgets.QTreeView, "m_assetBrowserTableViewWidget") + found = await pyside_utils.wait_for_condition(lambda: pyside_utils.find_child_by_pattern(asset_browser_table, "cedar.fbx"), 5.0) + if found: + model_index = pyside_utils.find_child_by_pattern(asset_browser_table, "cedar.fbx") + else: + Report.result(Tests.asset_filtered, found) + pyside_utils.item_view_index_mouse_click(asset_browser_table, model_index) is_filtered = await pyside_utils.wait_for_condition( - lambda: asset_browser_tree.indexBelow(asset_browser_tree.currentIndex()) == QtCore.QModelIndex(), 5.0) + lambda: asset_browser_table.currentIndex() == model_index, 5.0) Report.result(Tests.asset_filtered, is_filtered) # 4) Click the "X" in the search bar. diff --git a/AutomatedTesting/Gem/PythonTests/editor/EditorScripts/AssetBrowser_TreeNavigation.py b/AutomatedTesting/Gem/PythonTests/editor/EditorScripts/AssetBrowser_TreeNavigation.py index b4f0dc7f6c..52072205b5 100644 --- a/AutomatedTesting/Gem/PythonTests/editor/EditorScripts/AssetBrowser_TreeNavigation.py +++ b/AutomatedTesting/Gem/PythonTests/editor/EditorScripts/AssetBrowser_TreeNavigation.py @@ -53,6 +53,7 @@ def AssetBrowser_TreeNavigation(): import azlmbr.legacy.general as general import editor_python_test_tools.pyside_utils as pyside_utils + import editor_python_test_tools.hydra_editor_utils as hydra from editor_python_test_tools.utils import Report from editor_python_test_tools.utils import TestHelper as helper @@ -69,8 +70,7 @@ def AssetBrowser_TreeNavigation(): file_path = ("AutomatedTesting", "Assets", "ImageGradients", "image_grad_test_gsi.png") # 1) Open an existing simple level - helper.init_idle() - helper.open_level("Physics", "Base") + hydra.open_base_level() # 2) Open Asset Browser (if not opened already) editor_window = pyside_utils.get_editor_main_window() @@ -84,8 +84,8 @@ def AssetBrowser_TreeNavigation(): # 3) Collapse all files initially main_window = editor_window.findChild(QtWidgets.QMainWindow) - asset_browser = pyside_utils.find_child_by_hierarchy(main_window, ..., "Asset Browser") - tree = pyside_utils.find_child_by_hierarchy(asset_browser, ..., "m_assetBrowserTreeViewWidget") + asset_browser = pyside_utils.find_child_by_pattern(main_window, text="Asset Browser", type=QtWidgets.QDockWidget) + tree = pyside_utils.find_child_by_pattern(asset_browser, "m_assetBrowserTreeViewWidget") scroll_area = tree.findChild(QtWidgets.QWidget, "qt_scrollarea_vcontainer") scroll_bar = scroll_area.findChild(QtWidgets.QScrollBar) tree.collapseAll() diff --git a/AutomatedTesting/Gem/PythonTests/editor/EditorScripts/AssetPicker_UI_UX.py b/AutomatedTesting/Gem/PythonTests/editor/EditorScripts/AssetPicker_UI_UX.py index 59a78c9e5d..047d6edf41 100644 --- a/AutomatedTesting/Gem/PythonTests/editor/EditorScripts/AssetPicker_UI_UX.py +++ b/AutomatedTesting/Gem/PythonTests/editor/EditorScripts/AssetPicker_UI_UX.py @@ -215,8 +215,7 @@ def AssetPicker_UI_UX(): QtTest.QTest.keyClick(tree, Qt.Key_Enter, Qt.NoModifier) # 1) Open an existing simple level - helper.init_idle() - helper.open_level("Physics", "Base") + hydra.open_base_level() # 2) Create entity and add Mesh component entity_position = math.Vector3(125.0, 136.0, 32.0) diff --git a/AutomatedTesting/Gem/PythonTests/editor/EditorScripts/BasicEditorWorkflows_ExistingLevel_EntityComponentCRUD.py b/AutomatedTesting/Gem/PythonTests/editor/EditorScripts/BasicEditorWorkflows_ExistingLevel_EntityComponentCRUD.py index 39cacf9af5..48b7d2b176 100644 --- a/AutomatedTesting/Gem/PythonTests/editor/EditorScripts/BasicEditorWorkflows_ExistingLevel_EntityComponentCRUD.py +++ b/AutomatedTesting/Gem/PythonTests/editor/EditorScripts/BasicEditorWorkflows_ExistingLevel_EntityComponentCRUD.py @@ -56,19 +56,17 @@ def BasicEditorWorkflows_ExistingLevel_EntityComponentCRUD(): 06. delete parent entity """ + import editor_python_test_tools.hydra_editor_utils as hydra from editor_python_test_tools.utils import Report from editor_python_test_tools.editor_entity_utils import EditorEntity import azlmbr.bus as bus import azlmbr.editor as editor import azlmbr.entity as entity - import azlmbr.legacy.general as general import azlmbr.object # 01. load an existing level - test_level = 'Simple' - general.open_level_no_prompt(test_level) - Report.result(Tests.load_level, general.get_current_level_name() == test_level) + hydra.open_base_level() # 02. create parent entity and set name # Delete any exiting entity and Create a new Entity at the root level diff --git a/AutomatedTesting/Gem/PythonTests/editor/EditorScripts/BasicEditorWorkflows_LevelEntityComponentCRUD.py b/AutomatedTesting/Gem/PythonTests/editor/EditorScripts/BasicEditorWorkflows_LevelEntityComponentCRUD.py index 9c5880ab1e..f13b924e30 100644 --- a/AutomatedTesting/Gem/PythonTests/editor/EditorScripts/BasicEditorWorkflows_LevelEntityComponentCRUD.py +++ b/AutomatedTesting/Gem/PythonTests/editor/EditorScripts/BasicEditorWorkflows_LevelEntityComponentCRUD.py @@ -31,7 +31,7 @@ class Tests: "Component removed from entity successfully", "Failed to remove component from entity" ) - level_saved_and_exported = ( + saved_and_exported = ( "Level saved and exported successfully", "Failed to save/export level" ) @@ -52,8 +52,7 @@ def BasicEditorWorkflows_LevelEntityComponentCRUD(): - A new entity can be created - Entity hierarchy can be adjusted - Components can be added/removed/updated - - Level can be saved - - Level can be exported + - Level can be saved/exported Note: - This test file must be called from the O3DE Editor command terminal @@ -70,7 +69,7 @@ def BasicEditorWorkflows_LevelEntityComponentCRUD(): import azlmbr.editor as editor import azlmbr.entity as entity import azlmbr.math as math - import azlmbr.paths + import azlmbr.paths as paths import editor_python_test_tools.hydra_editor_utils as hydra from editor_python_test_tools.utils import Report @@ -84,7 +83,7 @@ def BasicEditorWorkflows_LevelEntityComponentCRUD(): return None # 1) Create a new level - level = "tmp_level" + lvl_name = "tmp_level" editor_window = pyside_utils.get_editor_main_window() new_level_action = pyside_utils.get_action_for_menu_path(editor_window, "File", "New Level") pyside_utils.trigger_action_async(new_level_action) @@ -95,23 +94,24 @@ def BasicEditorWorkflows_LevelEntityComponentCRUD(): Report.info("New Level dialog opened") grp_box = new_level_dlg.findChild(QtWidgets.QGroupBox, "STATIC_GROUP1") level_name = grp_box.findChild(QtWidgets.QLineEdit, "LEVEL") - level_name.setText(level) + level_name.setText(lvl_name) button_box = new_level_dlg.findChild(QtWidgets.QDialogButtonBox, "buttonBox") button_box.button(QtWidgets.QDialogButtonBox.Ok).click() # Verify new level was created successfully level_create_success = await pyside_utils.wait_for_condition(lambda: editor.EditorToolsApplicationRequestBus( - bus.Broadcast, "GetCurrentLevelName") == level, 5.0) + bus.Broadcast, "GetCurrentLevelName") == lvl_name, 5.0) Report.critical_result(Tests.level_created, level_create_success) # 2) Delete existing entities, and create and manipulate new entities via Entity Inspector search_filter = azlmbr.entity.SearchFilter() all_entities = entity.SearchBus(azlmbr.bus.Broadcast, "SearchEntities", search_filter) editor.ToolsApplicationRequestBus(bus.Broadcast, "DeleteEntities", all_entities) - entity_outliner_widget = editor_window.findChild(QtWidgets.QWidget, "OutlinerWidgetUI") + entity_outliner_widget = editor_window.findChild(QtWidgets.QWidget, "EntityOutlinerWidgetUI") outliner_object_list = entity_outliner_widget.findChild(QtWidgets.QWidget, "m_objectList_Contents") outliner_tree = outliner_object_list.findChild(QtWidgets.QWidget, "m_objectTree") - await pyside_utils.trigger_context_menu_entry(outliner_tree, "Create entity") + outliner_viewport = outliner_tree.findChild(QtWidgets.QWidget, "qt_scrollarea_viewport") + await pyside_utils.trigger_context_menu_entry(outliner_viewport, "Create entity") # Find the new entity parent_entity_id = find_entity_by_name("Entity1") @@ -153,14 +153,10 @@ def BasicEditorWorkflows_LevelEntityComponentCRUD(): save_level_action = pyside_utils.get_action_for_menu_path(editor_window, "File", "Save") pyside_utils.trigger_action_async(save_level_action) - # 5) Export the level - export_action = pyside_utils.get_action_for_menu_path(editor_window, "Game", "Export to Engine") - pyside_utils.trigger_action_async(export_action) - level_pak_file = os.path.join( - "AutomatedTesting", "Levels", level, "level.pak" - ) - export_success = await pyside_utils.wait_for_condition(lambda: os.path.exists(level_pak_file), 5.0) - Report.result(Tests.level_saved_and_exported, export_success) + # 5) Verify the save/export of the level + level_prefab_path = os.path.join(paths.products, "levels", lvl_name, f"{lvl_name}.spawnable") + success = await pyside_utils.wait_for_condition(lambda: os.path.exists(level_prefab_path), 5.0) + Report.result(Tests.saved_and_exported, success) run_test() diff --git a/AutomatedTesting/Gem/PythonTests/editor/EditorScripts/ComponentCRUD_Add_Delete_Components.py b/AutomatedTesting/Gem/PythonTests/editor/EditorScripts/ComponentCRUD_Add_Delete_Components.py index 779f1ef953..6772450405 100755 --- a/AutomatedTesting/Gem/PythonTests/editor/EditorScripts/ComponentCRUD_Add_Delete_Components.py +++ b/AutomatedTesting/Gem/PythonTests/editor/EditorScripts/ComponentCRUD_Add_Delete_Components.py @@ -63,7 +63,7 @@ def ComponentCRUD_Add_Delete_Components(): :return: None """ - from PySide2 import QtWidgets, QtTest, QtCore + from PySide2 import QtWidgets, QtTest from PySide2.QtCore import Qt import azlmbr.legacy.general as general @@ -74,7 +74,6 @@ def ComponentCRUD_Add_Delete_Components(): import editor_python_test_tools.hydra_editor_utils as hydra from editor_python_test_tools.utils import Report - from editor_python_test_tools.utils import TestHelper as helper async def add_component(component_name): pyside_utils.click_button_async(add_comp_btn) @@ -88,8 +87,7 @@ def ComponentCRUD_Add_Delete_Components(): QtTest.QTest.keyClick(tree, Qt.Key_Enter, Qt.NoModifier) # 1) Open an existing simple level - helper.init_idle() - helper.open_level("Physics", "Base") + hydra.open_base_level() # 2) Create entity entity_position = math.Vector3(125.0, 136.0, 32.0) diff --git a/AutomatedTesting/Gem/PythonTests/editor/EditorScripts/Docking_BasicDockedTools.py b/AutomatedTesting/Gem/PythonTests/editor/EditorScripts/Docking_BasicDockedTools.py index 2a91e7a374..a5a94f06a5 100644 --- a/AutomatedTesting/Gem/PythonTests/editor/EditorScripts/Docking_BasicDockedTools.py +++ b/AutomatedTesting/Gem/PythonTests/editor/EditorScripts/Docking_BasicDockedTools.py @@ -62,12 +62,11 @@ def Docking_BasicDockedTools(): import azlmbr.editor as editor import azlmbr.entity as entity + import editor_python_test_tools.hydra_editor_utils as hydra from editor_python_test_tools.utils import Report - from editor_python_test_tools.utils import TestHelper as helper # Open an existing simple level - helper.init_idle() - helper.open_level("Physics", "Base") + hydra.open_base_level() # Make sure the Entity Outliner, Entity Inspector and Console tools are open general.open_pane("Entity Outliner (PREVIEW)") @@ -80,7 +79,7 @@ def Docking_BasicDockedTools(): editor.EditorEntityAPIBus(bus.Event, 'SetName', entity_id, entity_original_name) editor_window = pyside_utils.get_editor_main_window() - entity_outliner = editor_window.findChild(QtWidgets.QDockWidget, "Entity Outliner (PREVIEW)") + entity_outliner = editor_window.findChild(QtWidgets.QDockWidget, "Entity Outliner") # 1) Open the tools and dock them together in a floating tabbed widget. # We drag/drop it over the viewport since it doesn't allow docking, so this will undock it @@ -88,15 +87,15 @@ def Docking_BasicDockedTools(): pyside_utils.drag_and_drop(entity_outliner, render_overlay) # We need to grab a new reference to the Entity Outliner QDockWidget because when it gets moved - # to the floating window, its parent changes so the wrapped intance we had becomes invalid - entity_outliner = editor_window.findChild(QtWidgets.QDockWidget, "Entity Outliner (PREVIEW)") + # to the floating window, its parent changes so the wrapped instance we had becomes invalid + entity_outliner = editor_window.findChild(QtWidgets.QDockWidget, "Entity Outliner") # Dock the Entity Inspector tabbed with the floating Entity Outliner entity_inspector = editor_window.findChild(QtWidgets.QDockWidget, "Entity Inspector") pyside_utils.drag_and_drop(entity_inspector, entity_outliner) # We need to grab a new reference to the Entity Inspector QDockWidget because when it gets moved - # to the floating window, its parent changes so the wrapped intance we had becomes invalid + # to the floating window, its parent changes so the wrapped instance we had becomes invalid entity_inspector = editor_window.findChild(QtWidgets.QDockWidget, "Entity Inspector") # Dock the Console tabbed with the floating Entity Inspector @@ -106,7 +105,7 @@ def Docking_BasicDockedTools(): # Check to ensure all the tools are parented to the same QStackedWidget def check_all_panes_tabbed(): entity_inspector = editor_window.findChild(QtWidgets.QDockWidget, "Entity Inspector") - entity_outliner = editor_window.findChild(QtWidgets.QDockWidget, "Entity Outliner (PREVIEW)") + entity_outliner = editor_window.findChild(QtWidgets.QDockWidget, "Entity Outliner") console = editor_window.findChild(QtWidgets.QDockWidget, "Console") entity_inspector_parent = entity_inspector.parentWidget() entity_outliner_parent = entity_outliner.parentWidget() @@ -122,7 +121,7 @@ def Docking_BasicDockedTools(): # 2.1,2) Select an Entity in the Entity Outliner. entity_inspector = editor_window.findChild(QtWidgets.QDockWidget, "Entity Inspector") - entity_outliner = editor_window.findChild(QtWidgets.QDockWidget, "Entity Outliner (PREVIEW)") + entity_outliner = editor_window.findChild(QtWidgets.QDockWidget, "Entity Outliner") console = editor_window.findChild(QtWidgets.QDockWidget, "Console") object_tree = entity_outliner.findChild(QtWidgets.QTreeView, "m_objectTree") test_entity_index = pyside_utils.find_child_by_pattern(object_tree, entity_original_name) @@ -140,13 +139,13 @@ def Docking_BasicDockedTools(): # 2.5,6) Send a console command. console_line_edit = console.findChild(QtWidgets.QLineEdit, "lineEdit") - console_line_edit.setText("t_Scale 2") + console_line_edit.setText("t_simulationTickScale 2") QtTest.QTest.keyClick(console_line_edit, QtCore.Qt.Key_Enter) - general.get_cvar("t_Scale") - Report.result(Tests.docked_console_works, general.get_cvar("t_Scale") == "2") + general.get_cvar("t_simulationTickScale") + Report.result(Tests.docked_console_works, general.get_cvar("t_simulationTickScale") == "2") # Reset the altered cvar - console_line_edit.setText("t_Scale 1") + console_line_edit.setText("t_simulationTickScale 1") QtTest.QTest.keyClick(console_line_edit, QtCore.Qt.Key_Enter) run_test() diff --git a/AutomatedTesting/Gem/PythonTests/editor/EditorScripts/EntityOutliner_EntityOrdering.py b/AutomatedTesting/Gem/PythonTests/editor/EditorScripts/EntityOutliner_EntityOrdering.py new file mode 100644 index 0000000000..fab7984df9 --- /dev/null +++ b/AutomatedTesting/Gem/PythonTests/editor/EditorScripts/EntityOutliner_EntityOrdering.py @@ -0,0 +1,148 @@ +""" +Copyright (c) Contributors to the Open 3D Engine Project. +For complete copyright and license terms please see the LICENSE at the root of this distribution. + +SPDX-License-Identifier: Apache-2.0 OR MIT +""" + + +class Tests: + entities_sorted = ( + "Entities sorted in the expected order", + "Entities sorted in an incorrect order", + ) + + +def EntityOutliner_EntityOrdering(): + """ + Summary: + Verify that manual entity ordering in the entity outliner works and is stable. + + Expected Behavior: + Several entities are created, some are manually ordered, and their order + is maintained, even when new entities are added. + + Test Steps: + 1) Open the empty Prefab Base level + 2) Add 5 entities to the outliner + 3) Move "Entity1" to the top of the order + 4) Move "Entity4" to the bottom of the order + 5) Add another new entity, ensure the rest of the order is unchanged + """ + + from PySide2 import QtCore + + import azlmbr.legacy.general as general + + import editor_python_test_tools.hydra_editor_utils as hydra + import editor_python_test_tools.pyside_utils as pyside_utils + from editor_python_test_tools.utils import Report + + # Grab the Editor, Entity Outliner, and Outliner Model + editor_window = pyside_utils.get_editor_main_window() + entity_outliner = pyside_utils.find_child_by_hierarchy( + editor_window, ..., "EntityOutlinerWidgetUI", ..., "m_objectTree" + ) + entity_outliner_model = entity_outliner.model() + + # Get the outliner index for the root prefab container entity + def get_root_prefab_container_index(): + return entity_outliner_model.index(0, 0) + + # Get the outliner index for the top level entity of a given name + def index_for_name(name): + root_index = get_root_prefab_container_index() + for row in range(entity_outliner_model.rowCount(root_index)): + row_index = entity_outliner_model.index(row, 0, root_index) + if row_index.data() == name: + return row_index + return None + + # Validate that the outliner top level entity order matches the expected order + def verify_entities_sorted(expected_order): + actual_order = [] + root_index = get_root_prefab_container_index() + for row in range(entity_outliner_model.rowCount(root_index)): + row_index = entity_outliner_model.index(row, 0, root_index) + actual_order.append(row_index.data()) + + sorted_correctly = actual_order == expected_order + Report.result(Tests.entities_sorted, sorted_correctly) + if not sorted_correctly: + print(f"Expected entity order: {expected_order}") + print(f"Actual entity order: {actual_order}") + + # Creates an entity from the outliner context menu + def create_entity(): + pyside_utils.trigger_context_menu_entry( + entity_outliner, "Create entity", index=get_root_prefab_container_index() + ) + # Wait a tick after entity creation to let events process + general.idle_wait(0.0) + + # Moves an entity (wrapped by move_entity_before and move_entity_after) + def _move_entity(source_name, target_name, move_after=False): + source_index = index_for_name(source_name) + target_index = index_for_name(target_name) + + target_row = target_index.row() + if move_after: + target_row += 1 + + # Generate MIME data and directly inject it into the model instead of + # generating mouse click operations, as it's more reliable and we're + # testing the underlying drag & drop logic as opposed to Qt's mouse + # handling here + mime_data = entity_outliner_model.mimeData([source_index]) + entity_outliner_model.dropMimeData( + mime_data, QtCore.Qt.MoveAction, target_row, 0, target_index.parent() + ) + # Wait after move to let events (i.e. prefab propagation) process + general.idle_wait(1.0) + + # Move an entity before another entity in the order by dragging the source above the target + move_entity_before = lambda source_name, target_name: _move_entity( + source_name, target_name, move_after=False + ) + # Move an entity after another entity in the order by dragging the source beloew the target + move_entity_after = lambda source_name, target_name: _move_entity( + source_name, target_name, move_after=True + ) + + expected_order = [] + + # 1) Open the empty Prefab Base level + hydra.open_base_level() + + # 2) Add 5 entities to the outliner + ENTITIES_TO_ADD = 5 + for i in range(ENTITIES_TO_ADD): + create_entity() + + # Our new entity should be given a name with a number automatically + new_entity = f"Entity{i+1}" + # The new entity should be added to the bottom of its parent entity + expected_order = expected_order + [new_entity] + + verify_entities_sorted(expected_order) + + # 3) Move "Entity5" to the top of the order + move_entity_before("Entity5", "Entity1") + expected_order = ["Entity5", "Entity1", "Entity2", "Entity3", "Entity4"] + verify_entities_sorted(expected_order) + + # 4) Move "Entity2" to the bottom of the order + move_entity_after("Entity2", "Entity4") + expected_order = ["Entity5", "Entity1", "Entity3", "Entity4", "Entity2"] + verify_entities_sorted(expected_order) + + # 5) Add another new entity, ensure the rest of the order is unchanged + create_entity() + expected_order = ["Entity5", "Entity1", "Entity3", "Entity4", "Entity2", "Entity6"] + verify_entities_sorted(expected_order) + + +if __name__ == "__main__": + from editor_python_test_tools.utils import Report + + Report.start_test(EntityOutliner_EntityOrdering) diff --git a/AutomatedTesting/Gem/PythonTests/editor/EditorScripts/InputBindings_Add_Remove_Input_Events.py b/AutomatedTesting/Gem/PythonTests/editor/EditorScripts/InputBindings_Add_Remove_Input_Events.py index f4769dab4d..07c89ff110 100755 --- a/AutomatedTesting/Gem/PythonTests/editor/EditorScripts/InputBindings_Add_Remove_Input_Events.py +++ b/AutomatedTesting/Gem/PythonTests/editor/EditorScripts/InputBindings_Add_Remove_Input_Events.py @@ -69,8 +69,8 @@ def InputBindings_Add_Remove_Input_Events(): import azlmbr.legacy.general as general + import editor_python_test_tools.hydra_editor_utils as hydra from editor_python_test_tools.utils import Report - from editor_python_test_tools.utils import TestHelper as helper def open_asset_editor(): general.open_pane("Asset Editor") @@ -81,8 +81,7 @@ def InputBindings_Add_Remove_Input_Events(): return not general.is_pane_visible("Asset Editor") # 1) Open an existing simple level - helper.init_idle() - helper.open_level("Physics", "Base") + hydra.open_base_level() # 2) Open Asset Editor Report.result(Tests.asset_editor_opened, open_asset_editor()) diff --git a/AutomatedTesting/Gem/PythonTests/editor/EditorScripts/Menus_EditMenuOptions.py b/AutomatedTesting/Gem/PythonTests/editor/EditorScripts/Menus_EditMenuOptions.py index c7088a54c5..ce85cf223f 100644 --- a/AutomatedTesting/Gem/PythonTests/editor/EditorScripts/Menus_EditMenuOptions.py +++ b/AutomatedTesting/Gem/PythonTests/editor/EditorScripts/Menus_EditMenuOptions.py @@ -26,9 +26,9 @@ def Menus_EditMenuOptions_Work(): :return: None """ + import editor_python_test_tools.hydra_editor_utils as hydra import editor_python_test_tools.pyside_utils as pyside_utils from editor_python_test_tools.utils import Report - from editor_python_test_tools.utils import TestHelper as helper edit_menu_options = [ ("Undo",), @@ -40,30 +40,32 @@ def Menus_EditMenuOptions_Work(): ("Toggle Pivot Location",), ("Reset Entity Transform",), ("Reset Manipulator",), - ("Reset Transform (Local)",), - ("Reset Transform (World)",), ("Hide Selection",), ("Show All",), - ("Modify", "Snap", "Snap angle"), + ("Lock Selection",), + ("Unlock All Entities",), + ("Modify", "Snap", "Angle snapping"), + ("Modify", "Snap", "Grid snapping"), ("Modify", "Transform Mode", "Move"), ("Modify", "Transform Mode", "Rotate"), ("Modify", "Transform Mode", "Scale"), ("Editor Settings", "Global Preferences"), ("Editor Settings", "Editor Settings Manager"), ("Editor Settings", "Keyboard Customization", "Customize Keyboard"), - ("Editor Settings", "Keyboard Customization", "Export Keyboard Settings"), - ("Editor Settings", "Keyboard Customization", "Import Keyboard Settings"), + # The following menu options are temporarily disabled due to https://github.com/o3de/o3de/issues/6746 + #("Editor Settings", "Keyboard Customization", "Export Keyboard Settings"), + #("Editor Settings", "Keyboard Customization", "Import Keyboard Settings"), ] # 1) Open an existing simple level - helper.init_idle() - helper.open_level("Physics", "Base") + hydra.open_base_level() # 2) Interact with Edit Menu options editor_window = pyside_utils.get_editor_main_window() for option in edit_menu_options: try: action = pyside_utils.get_action_for_menu_path(editor_window, "Edit", *option) + Report.info(f"Triggering {action.iconText()}") action.trigger() action_triggered = True except Exception as e: diff --git a/AutomatedTesting/Gem/PythonTests/editor/EditorScripts/Menus_FileMenuOptions.py b/AutomatedTesting/Gem/PythonTests/editor/EditorScripts/Menus_FileMenuOptions.py index a3e7611b5e..4fcdc371e7 100644 --- a/AutomatedTesting/Gem/PythonTests/editor/EditorScripts/Menus_FileMenuOptions.py +++ b/AutomatedTesting/Gem/PythonTests/editor/EditorScripts/Menus_FileMenuOptions.py @@ -26,35 +26,34 @@ def Menus_FileMenuOptions_Work(): :return: None """ + import editor_python_test_tools.hydra_editor_utils as hydra import editor_python_test_tools.pyside_utils as pyside_utils from editor_python_test_tools.utils import Report - from editor_python_test_tools.utils import TestHelper as helper file_menu_options = [ ("New Level",), - ("Open Level",), - ("Import",), + #("Open Level",), Temporarily disabled due to https://github.com/o3de/o3de/issues/6605 + #("Import",), Temporarily disabled due to https://github.com/o3de/o3de/issues/6746 ("Save",), - ("Save As",), + #("Save As",), Temporarily disabled due to https://github.com/o3de/o3de/issues/6605 ("Save Level Statistics",), ("Edit Project Settings",), - ("Edit Platform Settings",), + #("Edit Platform Settings",), Temporarily disabled due to https://github.com/o3de/o3de/issues/6604 ("New Project",), ("Open Project",), ("Show Log File",), - ("Resave All Slices",), ("Exit",), ] # 1) Open an existing simple level - helper.init_idle() - helper.open_level("Physics", "Base") + hydra.open_base_level() # 2) Interact with File Menu options editor_window = pyside_utils.get_editor_main_window() for option in file_menu_options: try: action = pyside_utils.get_action_for_menu_path(editor_window, "File", *option) + Report.info(f"Triggering {action.iconText()}") action.trigger() action_triggered = True except Exception as e: diff --git a/AutomatedTesting/Gem/PythonTests/editor/EditorScripts/Menus_ViewMenuOptions.py b/AutomatedTesting/Gem/PythonTests/editor/EditorScripts/Menus_ViewMenuOptions.py index f1b9e5d4d8..bb9ff15082 100644 --- a/AutomatedTesting/Gem/PythonTests/editor/EditorScripts/Menus_ViewMenuOptions.py +++ b/AutomatedTesting/Gem/PythonTests/editor/EditorScripts/Menus_ViewMenuOptions.py @@ -26,32 +26,35 @@ def Menus_ViewMenuOptions_Work(): :return: None """ + import editor_python_test_tools.hydra_editor_utils as hydra import editor_python_test_tools.pyside_utils as pyside_utils from editor_python_test_tools.utils import Report - from editor_python_test_tools.utils import TestHelper as helper view_menu_options = [ ("Center on Selection",), ("Show Quick Access Bar",), + ("Layouts", "Component Entity Layout",), + ("Layouts", "Save Layout",), ("Viewport", "Configure Layout"), ("Viewport", "Go to Position"), ("Viewport", "Center on Selection"), ("Viewport", "Go to Location"), ("Viewport", "Remember Location"), ("Viewport", "Switch Camera"), - ("Viewport", "Show/Hide Helpers"), + ("Viewport", "Show Helpers"), + ("Viewport", "Show Icons"), ("Refresh Style",), ] # 1) Open an existing simple level - helper.init_idle() - helper.open_level("Physics", "Base") + hydra.open_base_level() # 2) Interact with View Menu options editor_window = pyside_utils.get_editor_main_window() for option in view_menu_options: try: action = pyside_utils.get_action_for_menu_path(editor_window, "View", *option) + Report.info(f"Triggering {action.iconText()}") action.trigger() action_triggered = True except Exception as e: diff --git a/AutomatedTesting/Gem/PythonTests/editor/TestSuite_Main.py b/AutomatedTesting/Gem/PythonTests/editor/TestSuite_Main.py index 26b254ae71..3805ef15dd 100644 --- a/AutomatedTesting/Gem/PythonTests/editor/TestSuite_Main.py +++ b/AutomatedTesting/Gem/PythonTests/editor/TestSuite_Main.py @@ -7,37 +7,77 @@ SPDX-License-Identifier: Apache-2.0 OR MIT import os import pytest -import sys import ly_test_tools.environment.file_system as file_system - -sys.path.append(os.path.dirname(os.path.abspath(__file__)) + '/../automatedtesting_shared') -from base import TestAutomationBase - - -@pytest.fixture -def remove_test_level(request, workspace, project): - file_system.delete([os.path.join(workspace.paths.engine_root(), project, "Levels", "tmp_level")], True, True) - - def teardown(): - file_system.delete([os.path.join(workspace.paths.engine_root(), project, "Levels", "tmp_level")], True, True) - - request.addfinalizer(teardown) +from ly_test_tools.o3de.editor_test import EditorSingleTest, EditorSharedTest, EditorParallelTest, EditorTestSuite @pytest.mark.SUITE_main @pytest.mark.parametrize("launcher_platform", ['windows_editor']) @pytest.mark.parametrize("project", ["AutomatedTesting"]) -class TestAutomation(TestAutomationBase): +class TestAutomationNoAutoTestMode(EditorTestSuite): - def test_BasicEditorWorkflows_LevelEntityComponentCRUD(self, request, workspace, editor, launcher_platform, - remove_test_level): + # Disable -autotest_mode and -BatchMode. Tests cannot run in -BatchMode due to UI interactions, and these tests + # interact with modal dialogs + global_extra_cmdline_args = [] + + class test_AssetPicker_UI_UX(EditorSharedTest): + from .EditorScripts import AssetPicker_UI_UX as test_module + + class test_BasicEditorWorkflows_ExistingLevel_EntityComponentCRUD(EditorSharedTest): + from .EditorScripts import BasicEditorWorkflows_ExistingLevel_EntityComponentCRUD as test_module + + class test_BasicEditorWorkflows_LevelEntityComponentCRUD(EditorSingleTest): + # Custom teardown to remove level created during test + def teardown(self, request, workspace, editor, editor_test_results, launcher_platform): + file_system.delete([os.path.join(workspace.paths.engine_root(), "AutomatedTesting", "Levels", "tmp_level")], + True, True) from .EditorScripts import BasicEditorWorkflows_LevelEntityComponentCRUD as test_module - self._run_test(request, workspace, editor, test_module, batch_mode=False, autotest_mode=False) @pytest.mark.REQUIRES_gpu - def test_BasicEditorWorkflows_GPU_LevelEntityComponentCRUD(self, request, workspace, editor, launcher_platform, - remove_test_level): + class test_BasicEditorWorkflows_GPU_LevelEntityComponentCRUD(EditorSingleTest): + # Disable null renderer + use_null_renderer = False + + # Custom teardown to remove level created during test + def teardown(self, request, workspace, editor, editor_test_results, launcher_platform): + file_system.delete([os.path.join(workspace.paths.engine_root(), "AutomatedTesting", "Levels", "tmp_level")], + True, True) from .EditorScripts import BasicEditorWorkflows_LevelEntityComponentCRUD as test_module - self._run_test(request, workspace, editor, test_module, batch_mode=False, autotest_mode=False, - use_null_renderer=False) + + class test_InputBindings_Add_Remove_Input_Events(EditorSharedTest): + from .EditorScripts import InputBindings_Add_Remove_Input_Events as test_module + + +@pytest.mark.SUITE_main +@pytest.mark.parametrize("launcher_platform", ['windows_editor']) +@pytest.mark.parametrize("project", ["AutomatedTesting"]) +class TestAutomationAutoTestMode(EditorTestSuite): + + # Enable only -autotest_mode for these tests. Tests cannot run in -BatchMode due to UI interactions + global_extra_cmdline_args = ["-autotest_mode"] + + class test_AssetBrowser_SearchFiltering(EditorSharedTest): + from .EditorScripts import AssetBrowser_SearchFiltering as test_module + + class test_AssetBrowser_TreeNavigation(EditorSharedTest): + from .EditorScripts import AssetBrowser_TreeNavigation as test_module + + class test_ComponentCRUD_Add_Delete_Components(EditorSharedTest): + from .EditorScripts import ComponentCRUD_Add_Delete_Components as test_module + + @pytest.mark.skip("Passes locally/fails on Jenkins. https://github.com/o3de/o3de/issues/6747") + class test_Docking_BasicDockedTools(EditorSharedTest): + from .EditorScripts import Docking_BasicDockedTools as test_module + + class test_EntityOutliner_EntityOrdering(EditorSharedTest): + from .EditorScripts import EntityOutliner_EntityOrdering as test_module + + class test_Menus_EditMenuOptions_Work(EditorSharedTest): + from .EditorScripts import Menus_EditMenuOptions as test_module + + class test_Menus_FileMenuOptions_Work(EditorSharedTest): + from .EditorScripts import Menus_FileMenuOptions as test_module + + class test_Menus_ViewMenuOptions_Work(EditorSharedTest): + from .EditorScripts import Menus_ViewMenuOptions as test_module diff --git a/AutomatedTesting/Gem/PythonTests/editor/TestSuite_Main_Optimized.py b/AutomatedTesting/Gem/PythonTests/editor/TestSuite_Main_Optimized.py deleted file mode 100644 index afc52f962d..0000000000 --- a/AutomatedTesting/Gem/PythonTests/editor/TestSuite_Main_Optimized.py +++ /dev/null @@ -1,79 +0,0 @@ -""" -Copyright (c) Contributors to the Open 3D Engine Project. -For complete copyright and license terms please see the LICENSE at the root of this distribution. - -SPDX-License-Identifier: Apache-2.0 OR MIT -""" - -import os -import pytest - -import ly_test_tools.environment.file_system as file_system -from ly_test_tools.o3de.editor_test import EditorSingleTest, EditorSharedTest, EditorParallelTest, EditorTestSuite - - -@pytest.mark.xfail(reason="Optimized tests are experimental, we will enable xfail and monitor them temporarily.") -@pytest.mark.SUITE_main -@pytest.mark.parametrize("launcher_platform", ['windows_editor']) -@pytest.mark.parametrize("project", ["AutomatedTesting"]) -class TestAutomationNoAutoTestMode(EditorTestSuite): - - # Disable -autotest_mode and -BatchMode. Tests cannot run in -BatchMode due to UI interactions, and these tests - # interact with modal dialogs - global_extra_cmdline_args = [] - - class test_BasicEditorWorkflows_LevelEntityComponentCRUD(EditorSingleTest): - # Custom teardown to remove slice asset created during test - def teardown(self, request, workspace, editor, editor_test_results, launcher_platform): - file_system.delete([os.path.join(workspace.paths.engine_root(), "AutomatedTesting", "Levels", "tmp_level")], - True, True) - from .EditorScripts import BasicEditorWorkflows_LevelEntityComponentCRUD as test_module - - @pytest.mark.REQUIRES_gpu - class test_BasicEditorWorkflows_GPU_LevelEntityComponentCRUD(EditorSingleTest): - # Disable null renderer - use_null_renderer = False - - # Custom teardown to remove slice asset created during test - def teardown(self, request, workspace, editor, editor_test_results, launcher_platform): - file_system.delete([os.path.join(workspace.paths.engine_root(), "AutomatedTesting", "Levels", "tmp_level")], - True, True) - from .EditorScripts import BasicEditorWorkflows_LevelEntityComponentCRUD as test_module - - class test_InputBindings_Add_Remove_Input_Events(EditorSharedTest): - from .EditorScripts import InputBindings_Add_Remove_Input_Events as test_module - - @pytest.mark.skip(reason="Crashes Editor: ATOM-15493") - class test_AssetPicker_UI_UX(EditorSharedTest): - from .EditorScripts import AssetPicker_UI_UX as test_module - - -@pytest.mark.xfail(reason="Optimized tests are experimental, we will enable xfail and monitor them temporarily.") -@pytest.mark.SUITE_main -@pytest.mark.parametrize("launcher_platform", ['windows_editor']) -@pytest.mark.parametrize("project", ["AutomatedTesting"]) -class TestAutomationAutoTestMode(EditorTestSuite): - - # Enable only -autotest_mode for these tests. Tests cannot run in -BatchMode due to UI interactions - global_extra_cmdline_args = ["-autotest_mode"] - - class test_AssetBrowser_TreeNavigation(EditorSharedTest): - from .EditorScripts import AssetBrowser_TreeNavigation as test_module - - @pytest.mark.skip(reason="Crashes Editor: ATOM-15493") - class test_AssetBrowser_SearchFiltering(EditorSharedTest): - from .EditorScripts import AssetBrowser_SearchFiltering as test_module - - class test_ComponentCRUD_Add_Delete_Components(EditorSharedTest): - from .EditorScripts import ComponentCRUD_Add_Delete_Components as test_module - - class test_Menus_ViewMenuOptions_Work(EditorSharedTest): - from .EditorScripts import Menus_ViewMenuOptions as test_module - - @pytest.mark.skip(reason="Times out due to dialogs failing to dismiss: LYN-4208") - class test_Menus_FileMenuOptions_Work(EditorSharedTest): - from .EditorScripts import Menus_FileMenuOptions as test_module - - - class test_BasicEditorWorkflows_ExistingLevel_EntityComponentCRUD(EditorSharedTest): - from .EditorScripts import BasicEditorWorkflows_ExistingLevel_EntityComponentCRUD as test_module diff --git a/AutomatedTesting/Gem/PythonTests/editor/TestSuite_Periodic.py b/AutomatedTesting/Gem/PythonTests/editor/TestSuite_Periodic.py deleted file mode 100644 index 398b64bc87..0000000000 --- a/AutomatedTesting/Gem/PythonTests/editor/TestSuite_Periodic.py +++ /dev/null @@ -1,62 +0,0 @@ -""" -Copyright (c) Contributors to the Open 3D Engine Project. -For complete copyright and license terms please see the LICENSE at the root of this distribution. - -SPDX-License-Identifier: Apache-2.0 OR MIT -""" - -import os -import pytest -import sys - -import ly_test_tools.environment.file_system as file_system - -sys.path.append(os.path.dirname(os.path.abspath(__file__)) + '/../automatedtesting_shared') -from base import TestAutomationBase - - -@pytest.fixture -def remove_test_level(request, workspace, project): - file_system.delete([os.path.join(workspace.paths.engine_root(), project, "Levels", "tmp_level")], True, True) - - def teardown(): - file_system.delete([os.path.join(workspace.paths.engine_root(), project, "Levels", "tmp_level")], True, True) - - request.addfinalizer(teardown) - - -@pytest.mark.SUITE_periodic -@pytest.mark.parametrize("launcher_platform", ['windows_editor']) -@pytest.mark.parametrize("project", ["AutomatedTesting"]) -class TestAutomation(TestAutomationBase): - - def test_AssetBrowser_TreeNavigation(self, request, workspace, editor, launcher_platform): - from .EditorScripts import AssetBrowser_TreeNavigation as test_module - self._run_test(request, workspace, editor, test_module, batch_mode=False) - - @pytest.mark.skip(reason="Crashes Editor: ATOM-15493") - def test_AssetBrowser_SearchFiltering(self, request, workspace, editor, launcher_platform): - from .EditorScripts import AssetBrowser_SearchFiltering as test_module - self._run_test(request, workspace, editor, test_module, batch_mode=False) - - @pytest.mark.skip(reason="Crashes Editor: ATOM-15493") - def test_AssetPicker_UI_UX(self, request, workspace, editor, launcher_platform): - from .EditorScripts import AssetPicker_UI_UX as test_module - self._run_test(request, workspace, editor, test_module, autotest_mode=False, batch_mode=False) - - def test_ComponentCRUD_Add_Delete_Components(self, request, workspace, editor, launcher_platform): - from .EditorScripts import ComponentCRUD_Add_Delete_Components as test_module - self._run_test(request, workspace, editor, test_module, batch_mode=False) - - def test_InputBindings_Add_Remove_Input_Events(self, request, workspace, editor, launcher_platform): - from .EditorScripts import InputBindings_Add_Remove_Input_Events as test_module - self._run_test(request, workspace, editor, test_module, batch_mode=False, autotest_mode=False) - - def test_Menus_ViewMenuOptions_Work(self, request, workspace, editor, launcher_platform): - from .EditorScripts import Menus_ViewMenuOptions as test_module - self._run_test(request, workspace, editor, test_module, batch_mode=False) - - @pytest.mark.skip(reason="Times out due to dialogs failing to dismiss: LYN-4208") - def test_Menus_FileMenuOptions_Work(self, request, workspace, editor, launcher_platform): - from .EditorScripts import Menus_FileMenuOptions as test_module - self._run_test(request, workspace, editor, test_module, batch_mode=False) diff --git a/AutomatedTesting/Gem/PythonTests/editor/TestSuite_Sandbox.py b/AutomatedTesting/Gem/PythonTests/editor/TestSuite_Sandbox.py deleted file mode 100644 index 98a6620d9c..0000000000 --- a/AutomatedTesting/Gem/PythonTests/editor/TestSuite_Sandbox.py +++ /dev/null @@ -1,27 +0,0 @@ -""" -Copyright (c) Contributors to the Open 3D Engine Project. -For complete copyright and license terms please see the LICENSE at the root of this distribution. - -SPDX-License-Identifier: Apache-2.0 OR MIT -""" - -import os -import pytest -import sys - -sys.path.append(os.path.dirname(os.path.abspath(__file__)) + '/../automatedtesting_shared') -from base import TestAutomationBase - - -@pytest.mark.SUITE_sandbox -@pytest.mark.parametrize("launcher_platform", ['windows_editor']) -@pytest.mark.parametrize("project", ["AutomatedTesting"]) -class TestAutomation(TestAutomationBase): - - def test_Menus_EditMenuOptions_Work(self, request, workspace, editor, launcher_platform): - from .EditorScripts import Menus_EditMenuOptions as test_module - self._run_test(request, workspace, editor, test_module, batch_mode=False) - - def test_Docking_BasicDockedTools(self, request, workspace, editor, launcher_platform): - from .EditorScripts import Docking_BasicDockedTools as test_module - self._run_test(request, workspace, editor, test_module, batch_mode=False) diff --git a/AutomatedTesting/Gem/PythonTests/editor/TestSuite_Sandbox_Optimized.py b/AutomatedTesting/Gem/PythonTests/editor/TestSuite_Sandbox_Optimized.py deleted file mode 100644 index 4a472095ae..0000000000 --- a/AutomatedTesting/Gem/PythonTests/editor/TestSuite_Sandbox_Optimized.py +++ /dev/null @@ -1,26 +0,0 @@ -""" -Copyright (c) Contributors to the Open 3D Engine Project. -For complete copyright and license terms please see the LICENSE at the root of this distribution. - -SPDX-License-Identifier: Apache-2.0 OR MIT -""" - -import os -import pytest - -from ly_test_tools.o3de.editor_test import EditorSingleTest, EditorSharedTest, EditorParallelTest, EditorTestSuite - - -@pytest.mark.SUITE_sandbox -@pytest.mark.parametrize("launcher_platform", ['windows_editor']) -@pytest.mark.parametrize("project", ["AutomatedTesting"]) -class TestAutomationAutoTestMode(EditorTestSuite): - - # Enable only -autotest_mode for these tests. Tests cannot run in -BatchMode due to UI interactions - global_extra_cmdline_args = ["-autotest_mode"] - - class test_Docking_BasicDockedTools(EditorSharedTest): - from .EditorScripts import Docking_BasicDockedTools as test_module - - class test_Menus_EditMenuOptions_Work(EditorSharedTest): - from .EditorScripts import Menus_EditMenuOptions as test_module diff --git a/AutomatedTesting/Gem/PythonTests/largeworlds/CMakeLists.txt b/AutomatedTesting/Gem/PythonTests/largeworlds/CMakeLists.txt index c2123d683c..ba607ede32 100644 --- a/AutomatedTesting/Gem/PythonTests/largeworlds/CMakeLists.txt +++ b/AutomatedTesting/Gem/PythonTests/largeworlds/CMakeLists.txt @@ -10,45 +10,29 @@ if(PAL_TRAIT_BUILD_TESTS_SUPPORTED AND PAL_TRAIT_BUILD_HOST_TOOLS AND PAL_TRAIT_ ## DynVeg ## - ly_add_pytest( - NAME AutomatedTesting::DynamicVegetationTests_Main - TEST_SERIAL - TEST_SUITE main - PATH ${CMAKE_CURRENT_LIST_DIR}/dyn_veg/TestSuite_Main.py - RUNTIME_DEPENDENCIES - AZ::AssetProcessor - Legacy::Editor - AutomatedTesting.GameLauncher - AutomatedTesting.Assets - COMPONENT - LargeWorlds - ) - - - ly_add_pytest( - NAME AutomatedTesting::DynamicVegetationTests_Periodic - TEST_SERIAL - TEST_SUITE periodic - PATH ${CMAKE_CURRENT_LIST_DIR}/dyn_veg/TestSuite_Periodic.py - RUNTIME_DEPENDENCIES - AZ::AssetProcessor - Legacy::Editor - AutomatedTesting.Assets - AutomatedTesting.GameLauncher - COMPONENT - LargeWorlds - ) - ly_add_pytest( NAME AutomatedTesting::DynamicVegetationTests_Main_Optimized TEST_SERIAL TEST_SUITE main PATH ${CMAKE_CURRENT_LIST_DIR}/dyn_veg/TestSuite_Main_Optimized.py RUNTIME_DEPENDENCIES - AZ::AssetProcessor - Legacy::Editor - AutomatedTesting.Assets - AutomatedTesting.GameLauncher + AZ::AssetProcessor + Legacy::Editor + AutomatedTesting.Assets + AutomatedTesting.GameLauncher + COMPONENT + LargeWorlds + ) + ly_add_pytest( + NAME AutomatedTesting::DynamicVegetationTests_Periodic_Optimized + TEST_SERIAL + TEST_SUITE periodic + PATH ${CMAKE_CURRENT_LIST_DIR}/dyn_veg/TestSuite_Periodic_Optimized.py + RUNTIME_DEPENDENCIES + AZ::AssetProcessor + Legacy::Editor + AutomatedTesting.Assets + AutomatedTesting.GameLauncher COMPONENT LargeWorlds ) diff --git a/AutomatedTesting/Gem/PythonTests/largeworlds/dyn_veg/EditorScripts/AltitudeFilter_ComponentAndOverrides_InstancesPlantAtSpecifiedAltitude.py b/AutomatedTesting/Gem/PythonTests/largeworlds/dyn_veg/EditorScripts/AltitudeFilter_ComponentAndOverrides_InstancesPlantAtSpecifiedAltitude.py index e404624c93..66aa6d27ad 100755 --- a/AutomatedTesting/Gem/PythonTests/largeworlds/dyn_veg/EditorScripts/AltitudeFilter_ComponentAndOverrides_InstancesPlantAtSpecifiedAltitude.py +++ b/AutomatedTesting/Gem/PythonTests/largeworlds/dyn_veg/EditorScripts/AltitudeFilter_ComponentAndOverrides_InstancesPlantAtSpecifiedAltitude.py @@ -51,19 +51,22 @@ def AltitudeFilter_ComponentAndOverrides_InstancesPlantAtSpecifiedAltitude(): import os + import azlmbr.asset as asset import azlmbr.editor as editor import azlmbr.legacy.general as general import azlmbr.bus as bus import azlmbr.math as math + import azlmbr.prefab as prefab import editor_python_test_tools.hydra_editor_utils as hydra + from editor_python_test_tools.prefab_utils import Prefab from largeworlds.large_worlds_utils import editor_dynveg_test_helper as dynveg from editor_python_test_tools.utils import Report from editor_python_test_tools.utils import TestHelper as helper # 1) Open an existing simple level helper.init_idle() - helper.open_level("Physics", "Base") + helper.open_level("", "Base") # Set view of planting area for visual debugging general.set_current_view_position(512.0, 500.0, 38.0) @@ -71,8 +74,11 @@ def AltitudeFilter_ComponentAndOverrides_InstancesPlantAtSpecifiedAltitude(): # 2) Create a new entity with required vegetation area components center_point = math.Vector3(512.0, 512.0, 32.0) - asset_path = os.path.join("Slices", "PinkFlower.dynamicslice") - spawner_entity = dynveg.create_vegetation_area("Instance Spawner", center_point, 32.0, 32.0, 32.0, asset_path) + + flower_asset_path = os.path.join("assets", "objects", "foliage", "grass_flower_pink.azmodel") + flower_prefab = dynveg.create_temp_mesh_prefab(flower_asset_path, "PinkFlower")[0] + + spawner_entity = dynveg.create_prefab_vegetation_area("Instance Spawner", center_point, 32.0, 32.0, 32.0, flower_prefab) # Add a Vegetation Altitude Filter spawner_entity.add_component("Vegetation Altitude Filter") diff --git a/AutomatedTesting/Gem/PythonTests/largeworlds/dyn_veg/EditorScripts/AltitudeFilter_FilterStageToggle.py b/AutomatedTesting/Gem/PythonTests/largeworlds/dyn_veg/EditorScripts/AltitudeFilter_FilterStageToggle.py index 3fc6a0afde..06f6c2a7b4 100755 --- a/AutomatedTesting/Gem/PythonTests/largeworlds/dyn_veg/EditorScripts/AltitudeFilter_FilterStageToggle.py +++ b/AutomatedTesting/Gem/PythonTests/largeworlds/dyn_veg/EditorScripts/AltitudeFilter_FilterStageToggle.py @@ -32,7 +32,9 @@ def AltitudeFilter_FilterStageToggle(): import os import azlmbr.legacy.general as general + import azlmbr.bus as bus import azlmbr.math as math + import azlmbr.prefab as prefab import editor_python_test_tools.hydra_editor_utils as hydra from largeworlds.large_worlds_utils import editor_dynveg_test_helper as dynveg @@ -44,13 +46,16 @@ def AltitudeFilter_FilterStageToggle(): # Open an existing simple level helper.init_idle() - helper.open_level("Physics", "Base") + helper.open_level("", "Base") general.set_current_view_position(512.0, 480.0, 38.0) # Create basic vegetation entity position = math.Vector3(512.0, 512.0, 32.0) - asset_path = os.path.join("Slices", "PinkFlower.dynamicslice") - vegetation = dynveg.create_vegetation_area("vegetation", position, 16.0, 16.0, 16.0, asset_path) + + flower_asset_path = os.path.join("assets", "objects", "foliage", "grass_flower_pink.azmodel") + flower_prefab = dynveg.create_temp_mesh_prefab(flower_asset_path, "PinkFlower")[0] + + vegetation = dynveg.create_prefab_vegetation_area("vegetation", position, 16.0, 16.0, 16.0, flower_prefab) # Add a Vegetation Altitude Filter to the vegetation area entity vegetation.add_component("Vegetation Altitude Filter") diff --git a/AutomatedTesting/Gem/PythonTests/largeworlds/dyn_veg/EditorScripts/AltitudeFilter_ShapeSample_InstancesPlantAtSpecifiedAltitude.py b/AutomatedTesting/Gem/PythonTests/largeworlds/dyn_veg/EditorScripts/AltitudeFilter_ShapeSample_InstancesPlantAtSpecifiedAltitude.py index bcd42b7fbb..544a58e242 100755 --- a/AutomatedTesting/Gem/PythonTests/largeworlds/dyn_veg/EditorScripts/AltitudeFilter_ShapeSample_InstancesPlantAtSpecifiedAltitude.py +++ b/AutomatedTesting/Gem/PythonTests/largeworlds/dyn_veg/EditorScripts/AltitudeFilter_ShapeSample_InstancesPlantAtSpecifiedAltitude.py @@ -57,7 +57,7 @@ def AltitudeFilter_ShapeSample_InstancesPlantAtSpecifiedAltitude(): # 1) Open an existing simple level helper.init_idle() - helper.open_level("Physics", "Base") + helper.open_level("", "Base") # Set view of planting area for visual debugging general.set_current_view_position(512.0, 500.0, 38.0) @@ -65,8 +65,11 @@ def AltitudeFilter_ShapeSample_InstancesPlantAtSpecifiedAltitude(): # 2) Create a new entity with required vegetation area components center_point = math.Vector3(512.0, 512.0, 32.0) - asset_path = os.path.join("Slices", "PinkFlower.dynamicslice") - spawner_entity = dynveg.create_vegetation_area("Instance Spawner", center_point, 16.0, 16.0, 16.0, asset_path) + + flower_asset_path = os.path.join("assets", "objects", "foliage", "grass_flower_pink.azmodel") + flower_prefab = dynveg.create_temp_mesh_prefab(flower_asset_path, "PinkFlower")[0] + + spawner_entity = dynveg.create_prefab_vegetation_area("Instance Spawner", center_point, 16.0, 16.0, 16.0, flower_prefab) # Add a Vegetation Altitude Filter spawner_entity.add_component("Vegetation Altitude Filter") diff --git a/AutomatedTesting/Gem/PythonTests/largeworlds/dyn_veg/EditorScripts/AssetListCombiner_CombinedDescriptorsExpressInConfiguredArea.py b/AutomatedTesting/Gem/PythonTests/largeworlds/dyn_veg/EditorScripts/AssetListCombiner_CombinedDescriptorsExpressInConfiguredArea.py index 7f6ce87110..a856256929 100755 --- a/AutomatedTesting/Gem/PythonTests/largeworlds/dyn_veg/EditorScripts/AssetListCombiner_CombinedDescriptorsExpressInConfiguredArea.py +++ b/AutomatedTesting/Gem/PythonTests/largeworlds/dyn_veg/EditorScripts/AssetListCombiner_CombinedDescriptorsExpressInConfiguredArea.py @@ -111,7 +111,7 @@ def AssetListCombiner_CombinedDescriptorsExpressInConfiguredArea(): # 4) Create a spawner using a Vegetation Asset List Combiner component and a Weight Selector, and disallow # spawning empty assets - spawner_entity = dynveg.create_vegetation_area("Spawner Entity", center_point, 16.0, 16.0, 16.0, None) + spawner_entity = dynveg.create_dynamic_slice_vegetation_area("Spawner Entity", center_point, 16.0, 16.0, 16.0, None) spawner_entity.remove_component("Vegetation Asset List") spawner_entity.add_component("Vegetation Asset List Combiner") spawner_entity.add_component("Vegetation Asset Weight Selector") diff --git a/AutomatedTesting/Gem/PythonTests/largeworlds/dyn_veg/EditorScripts/AssetWeightSelector_InstancesExpressBasedOnWeight.py b/AutomatedTesting/Gem/PythonTests/largeworlds/dyn_veg/EditorScripts/AssetWeightSelector_InstancesExpressBasedOnWeight.py index 53b45e8470..b8b50f8110 100755 --- a/AutomatedTesting/Gem/PythonTests/largeworlds/dyn_veg/EditorScripts/AssetWeightSelector_InstancesExpressBasedOnWeight.py +++ b/AutomatedTesting/Gem/PythonTests/largeworlds/dyn_veg/EditorScripts/AssetWeightSelector_InstancesExpressBasedOnWeight.py @@ -67,8 +67,8 @@ def AssetWeightSelector_InstancesExpressBasedOnWeight(): # valid slice entity, and one set to None spawner_center_point = math.Vector3(512.0, 512.0, 32.0) asset_path = os.path.join("Slices", "PinkFlower.dynamicslice") - spawner_entity = dynveg.create_vegetation_area("Instance Spawner", spawner_center_point, 16.0, 16.0, 16.0, - asset_path) + spawner_entity = dynveg.create_dynamic_slice_vegetation_area("Instance Spawner", spawner_center_point, 16.0, 16.0, 16.0, + asset_path) desc_asset = hydra.get_component_property_value(spawner_entity.components[2], "Configuration|Embedded Assets")[0] desc_list = [desc_asset, desc_asset] diff --git a/AutomatedTesting/Gem/PythonTests/largeworlds/dyn_veg/EditorScripts/DistanceBetweenFilterOverrides_InstancesPlantAtSpecifiedRadius.py b/AutomatedTesting/Gem/PythonTests/largeworlds/dyn_veg/EditorScripts/DistanceBetweenFilterOverrides_InstancesPlantAtSpecifiedRadius.py index c2adffc6ca..ed5501d719 100755 --- a/AutomatedTesting/Gem/PythonTests/largeworlds/dyn_veg/EditorScripts/DistanceBetweenFilterOverrides_InstancesPlantAtSpecifiedRadius.py +++ b/AutomatedTesting/Gem/PythonTests/largeworlds/dyn_veg/EditorScripts/DistanceBetweenFilterOverrides_InstancesPlantAtSpecifiedRadius.py @@ -72,8 +72,8 @@ def DistanceBetweenFilterOverrides_InstancesPlantAtSpecifiedRadius(): # 2) Create a new entity with required vegetation area components spawner_center_point = math.Vector3(520.0, 520.0, 32.0) asset_path = os.path.join("Slices", "1m_cube.dynamicslice") - spawner_entity = dynveg.create_vegetation_area("Instance Spawner", spawner_center_point, 16.0, 16.0, 16.0, - asset_path) + spawner_entity = dynveg.create_dynamic_slice_vegetation_area("Instance Spawner", spawner_center_point, 16.0, 16.0, 16.0, + asset_path) # 3) Create a surface to plant on surface_center_point = math.Vector3(512.0, 512.0, 32.0) diff --git a/AutomatedTesting/Gem/PythonTests/largeworlds/dyn_veg/EditorScripts/DistanceBetweenFilter_InstancesPlantAtSpecifiedRadius.py b/AutomatedTesting/Gem/PythonTests/largeworlds/dyn_veg/EditorScripts/DistanceBetweenFilter_InstancesPlantAtSpecifiedRadius.py index de0d9a14fe..c24ec3c314 100755 --- a/AutomatedTesting/Gem/PythonTests/largeworlds/dyn_veg/EditorScripts/DistanceBetweenFilter_InstancesPlantAtSpecifiedRadius.py +++ b/AutomatedTesting/Gem/PythonTests/largeworlds/dyn_veg/EditorScripts/DistanceBetweenFilter_InstancesPlantAtSpecifiedRadius.py @@ -70,8 +70,8 @@ def DistanceBetweenFilter_InstancesPlantAtSpecifiedRadius(): # 2) Create a new entity with required vegetation area components spawner_center_point = math.Vector3(520.0, 520.0, 32.0) asset_path = os.path.join("Slices", "1m_cube.dynamicslice") - spawner_entity = dynveg.create_vegetation_area("Instance Spawner", spawner_center_point, 16.0, 16.0, 16.0, - asset_path) + spawner_entity = dynveg.create_dynamic_slice_vegetation_area("Instance Spawner", spawner_center_point, 16.0, 16.0, 16.0, + asset_path) # 3) Create a surface to plant on surface_center_point = math.Vector3(512.0, 512.0, 32.0) diff --git a/AutomatedTesting/Gem/PythonTests/largeworlds/dyn_veg/EditorScripts/DynVegUtils_TempPrefabCreationWorks.py b/AutomatedTesting/Gem/PythonTests/largeworlds/dyn_veg/EditorScripts/DynVegUtils_TempPrefabCreationWorks.py new file mode 100644 index 0000000000..d016473d5e --- /dev/null +++ b/AutomatedTesting/Gem/PythonTests/largeworlds/dyn_veg/EditorScripts/DynVegUtils_TempPrefabCreationWorks.py @@ -0,0 +1,85 @@ +""" +Copyright (c) Contributors to the Open 3D Engine Project. +For complete copyright and license terms please see the LICENSE at the root of this distribution. + +SPDX-License-Identifier: Apache-2.0 OR MIT +""" + + +def DynVegUtils_TempPrefabCreationWorks(): + """ + Summary: + An existing level is opened. Each Prefab setup to be spawned by Dynamic Vegetation tests is created in memory and + validated against existing test slice components/mesh assignments. + + Expected Behavior: + Temporary prefabs contain the expected components/assets. + + Test Steps: + 1) Open an existing level + 2) Create each of the necessary temporary Mesh prefabs, and validate the component/mesh setups + 3) Create the necessary temporary PhysX Collider, and validate the component setup + 4) Report errors/asserts + + :return: None + """ + + import os + + import azlmbr.asset as asset + import azlmbr.bus as bus + import azlmbr.math as math + + from Prefab.tests import PrefabTestUtils as prefab_test_utils + from largeworlds.large_worlds_utils import editor_dynveg_test_helper as dynveg + from editor_python_test_tools.utils import Report, Tracer + from editor_python_test_tools.utils import TestHelper as helper + from editor_python_test_tools.prefab_utils import PrefabInstance + + with Tracer() as error_tracer: + # Create dictionary for prefab filenames and paths to create using helper function + mesh_prefabs = { + "PinkFlower": os.path.join("assets", "objects", "foliage", "grass_flower_pink.azmodel"), + "PurpleFlower": os.path.join("assets", "objects", "foliage", "grass_flower_purple.azmodel"), + "1m_Cube": os.path.join("objects", "_primitives", "_box_1x1.azmodel"), + "CedarTree": os.path.join("assets", "objects", "foliage", "cedar.azmodel"), + "Bush": os.path.join("assets", "objects", "foliage", "bush_privet_01.azmodel"), + } + + # 1) Open an existing simple level + prefab_test_utils.open_base_tests_level() + + # 2) Create each of the Mesh asset prefabs and validate that the prefab created successfully + for prefab_filename, asset_path in mesh_prefabs.items(): + mesh_prefab_created = ( + f"Temporary mesh prefab: {prefab_filename} created successfully", + f"Failed to create temporary mesh prefab: {prefab_filename}" + ) + prefab = dynveg.create_temp_mesh_prefab(asset_path, prefab_filename) + Report.result(mesh_prefab_created, helper.wait_for_condition(lambda: + PrefabInstance.is_valid(prefab[1]), 3.0)) + + # 3) Create temp PhysX Collider prefab and validate that the prefab created successfully + physx_prefab_filename = "CedarTree_Collision" + physx_collider_prefab_created = ( + f"Temporary mesh prefab: {physx_prefab_filename} created successfully", + f"Failed to create temporary mesh prefab: {physx_prefab_filename}" + ) + test_physx_mesh_asset_id = asset.AssetCatalogRequestBus(bus.Broadcast, "GetAssetIdByPath", os.path.join( + "assets", "objects", "foliage", "cedar.pxmesh"), math.Uuid(), False) + dynveg.create_temp_physx_mesh_collider(test_physx_mesh_asset_id, physx_prefab_filename) + Report.result(physx_collider_prefab_created, helper.wait_for_condition(lambda: + PrefabInstance.is_valid(prefab[1]), 3.0)) + + # 4) Report errors/asserts + helper.wait_for_condition(lambda: error_tracer.has_errors or error_tracer.has_asserts, 1.0) + for error_info in error_tracer.errors: + Report.info(f"Error: {error_info.filename} {error_info.function} | {error_info.message}") + for assert_info in error_tracer.asserts: + Report.info(f"Assert: {assert_info.filename} {assert_info.function} | {assert_info.message}") + + +if __name__ == "__main__": + + from editor_python_test_tools.utils import Report + Report.start_test(DynVegUtils_TempPrefabCreationWorks) diff --git a/AutomatedTesting/Gem/PythonTests/largeworlds/dyn_veg/EditorScripts/DynamicSliceInstanceSpawner_Embedded_E2E.py b/AutomatedTesting/Gem/PythonTests/largeworlds/dyn_veg/EditorScripts/DynamicSliceInstanceSpawner_Embedded_E2E.py index 84c661873c..b4650c782e 100755 --- a/AutomatedTesting/Gem/PythonTests/largeworlds/dyn_veg/EditorScripts/DynamicSliceInstanceSpawner_Embedded_E2E.py +++ b/AutomatedTesting/Gem/PythonTests/largeworlds/dyn_veg/EditorScripts/DynamicSliceInstanceSpawner_Embedded_E2E.py @@ -72,15 +72,15 @@ def DynamicSliceInstanceSpawner_Embedded_E2E(): # 1) Create a new, temporary level lvl_name = "tmp_level" helper.init_idle() - level_created = general.create_level_no_prompt(lvl_name, 1024, 1, 4096, False) + level_created = helper.create_level(lvl_name) general.idle_wait(1.0) - Report.critical_result(Tests.level_created, level_created == 0) + Report.critical_result(Tests.level_created, level_created) general.set_current_view_position(512.0, 480.0, 38.0) # 2) Create a new entity with required vegetation area components and Script Canvas component for launcher test center_point = math.Vector3(512.0, 512.0, 32.0) asset_path = os.path.join("Slices", "PinkFlower.dynamicslice") - spawner_entity = dynveg.create_vegetation_area("Instance Spawner", center_point, 16.0, 16.0, 1.0, asset_path) + spawner_entity = dynveg.create_dynamic_slice_vegetation_area("Instance Spawner", center_point, 16.0, 16.0, 1.0, asset_path) spawner_entity.add_component("Script Canvas") instance_counter_path = os.path.join("scriptcanvas", "instance_counter.scriptcanvas") instance_counter_script = asset.AssetCatalogRequestBus(bus.Broadcast, "GetAssetIdByPath", instance_counter_path, @@ -110,7 +110,8 @@ def DynamicSliceInstanceSpawner_Embedded_E2E(): general.save_level() general.export_to_engine() pak_path = os.path.join(paths.products, "levels", lvl_name, "level.pak") - Report.result(Tests.saved_and_exported, os.path.exists(pak_path)) + success = helper.wait_for_condition(lambda: os.path.exists(pak_path), 10.0) + Report.result(Tests.saved_and_exported, success) if __name__ == "__main__": diff --git a/AutomatedTesting/Gem/PythonTests/largeworlds/dyn_veg/EditorScripts/DynamicSliceInstanceSpawner_External_E2E.py b/AutomatedTesting/Gem/PythonTests/largeworlds/dyn_veg/EditorScripts/DynamicSliceInstanceSpawner_External_E2E.py index de2554034f..a5e7e90ce2 100755 --- a/AutomatedTesting/Gem/PythonTests/largeworlds/dyn_veg/EditorScripts/DynamicSliceInstanceSpawner_External_E2E.py +++ b/AutomatedTesting/Gem/PythonTests/largeworlds/dyn_veg/EditorScripts/DynamicSliceInstanceSpawner_External_E2E.py @@ -73,9 +73,9 @@ def DynamicSliceInstanceSpawner_External_E2E(): # 1) Create a new, temporary level lvl_name = "tmp_level" helper.init_idle() - level_created = general.create_level_no_prompt(lvl_name, 1024, 1, 4096, False) + level_created = helper.create_level(lvl_name) general.idle_wait(1.0) - Report.critical_result(Tests.level_created, level_created == 0) + Report.critical_result(Tests.level_created, level_created) general.set_current_view_position(512.0, 480.0, 38.0) # 2) Create a new entity with required vegetation area components and switch the Vegetation Asset List Source @@ -132,7 +132,8 @@ def DynamicSliceInstanceSpawner_External_E2E(): general.save_level() general.export_to_engine() pak_path = os.path.join(paths.products, "levels", lvl_name, "level.pak") - Report.result(Tests.saved_and_exported, os.path.exists(pak_path)) + success = helper.wait_for_condition(lambda: os.path.exists(pak_path), 10.0) + Report.result(Tests.saved_and_exported, success) if __name__ == "__main__": diff --git a/AutomatedTesting/Gem/PythonTests/largeworlds/dyn_veg/EditorScripts/InstanceSpawnerPriority_LayerAndSubPriority.py b/AutomatedTesting/Gem/PythonTests/largeworlds/dyn_veg/EditorScripts/InstanceSpawnerPriority_LayerAndSubPriority.py index 98418c2432..471c8862fd 100755 --- a/AutomatedTesting/Gem/PythonTests/largeworlds/dyn_veg/EditorScripts/InstanceSpawnerPriority_LayerAndSubPriority.py +++ b/AutomatedTesting/Gem/PythonTests/largeworlds/dyn_veg/EditorScripts/InstanceSpawnerPriority_LayerAndSubPriority.py @@ -70,8 +70,8 @@ def InstanceSpawnerPriority_LayerAndSubPriority(): # 2) Create overlapping areas: 1 instance spawner area, and 1 blocker area spawner_center_point = math.Vector3(508.0, 508.0, 32.0) asset_path = os.path.join("Slices", "PinkFlower.dynamicslice") - spawner_entity = dynveg.create_vegetation_area("Instance Spawner", spawner_center_point, 16.0, 16.0, 1.0, - asset_path) + spawner_entity = dynveg.create_dynamic_slice_vegetation_area("Instance Spawner", spawner_center_point, 16.0, 16.0, 1.0, + asset_path) blocker_center_point = math.Vector3(516.0, 516.0, 32.0) blocker_entity = dynveg.create_blocker_area("Instance Blocker", blocker_center_point, 16.0, 16.0, 1.0) diff --git a/AutomatedTesting/Gem/PythonTests/largeworlds/dyn_veg/EditorScripts/LayerBlender_E2E_Editor.py b/AutomatedTesting/Gem/PythonTests/largeworlds/dyn_veg/EditorScripts/LayerBlender_E2E_Editor.py index bf6501f469..6b5a80ee8e 100755 --- a/AutomatedTesting/Gem/PythonTests/largeworlds/dyn_veg/EditorScripts/LayerBlender_E2E_Editor.py +++ b/AutomatedTesting/Gem/PythonTests/largeworlds/dyn_veg/EditorScripts/LayerBlender_E2E_Editor.py @@ -76,9 +76,9 @@ def LayerBlender_E2E_Editor(): # 1) Create a new, temporary level lvl_name = "tmp_level" helper.init_idle() - level_created = general.create_level_no_prompt(lvl_name, 1024, 1, 4096, False) + level_created = helper.create_level(lvl_name) general.idle_wait(1.0) - Report.critical_result(Tests.level_created, level_created == 0) + Report.critical_result(Tests.level_created, level_created) general.set_current_view_position(500.49, 498.69, 46.66) general.set_current_view_rotation(-42.05, 0.00, -36.33) @@ -86,17 +86,17 @@ def LayerBlender_E2E_Editor(): # 2) Create 2 vegetation areas with different meshes purple_position = math.Vector3(504.0, 512.0, 32.0) purple_asset_path = os.path.join("Slices", "PurpleFlower.dynamicslice") - spawner_entity_1 = dynveg.create_vegetation_area("Purple Spawner", - purple_position, - 16.0, 16.0, 1.0, - purple_asset_path) + spawner_entity_1 = dynveg.create_dynamic_slice_vegetation_area("Purple Spawner", + purple_position, + 16.0, 16.0, 1.0, + purple_asset_path) pink_position = math.Vector3(520.0, 512.0, 32.0) pink_asset_path = os.path.join("Slices", "PinkFlower.dynamicslice") - spawner_entity_2 = dynveg.create_vegetation_area("Pink Spawner", - pink_position, - 16.0, 16.0, 1.0, - pink_asset_path) + spawner_entity_2 = dynveg.create_dynamic_slice_vegetation_area("Pink Spawner", + pink_position, + 16.0, 16.0, 1.0, + pink_asset_path) base_position = math.Vector3(512.0, 512.0, 32.0) dynveg.create_surface_entity("Surface Entity", @@ -156,7 +156,8 @@ def LayerBlender_E2E_Editor(): general.save_level() general.export_to_engine() pak_path = os.path.join(paths.products, "levels", lvl_name, "level.pak") - Report.result(Tests.saved_and_exported, os.path.exists(pak_path)) + success = helper.wait_for_condition(lambda: os.path.exists(pak_path), 10.0) + Report.result(Tests.saved_and_exported, success) if __name__ == "__main__": diff --git a/AutomatedTesting/Gem/PythonTests/largeworlds/dyn_veg/EditorScripts/LayerBlocker_InstancesBlockedInConfiguredArea.py b/AutomatedTesting/Gem/PythonTests/largeworlds/dyn_veg/EditorScripts/LayerBlocker_InstancesBlockedInConfiguredArea.py index 625b7d2265..b89edcdeb7 100755 --- a/AutomatedTesting/Gem/PythonTests/largeworlds/dyn_veg/EditorScripts/LayerBlocker_InstancesBlockedInConfiguredArea.py +++ b/AutomatedTesting/Gem/PythonTests/largeworlds/dyn_veg/EditorScripts/LayerBlocker_InstancesBlockedInConfiguredArea.py @@ -68,8 +68,8 @@ def LayerBlocker_InstancesBlockedInConfiguredArea(): # 2) Create a new instance spawner entity spawner_center_point = math.Vector3(512.0, 512.0, 32.0) asset_path = os.path.join("Slices", "PinkFlower.dynamicslice") - spawner_entity = dynveg.create_vegetation_area("Instance Spawner", spawner_center_point, 16.0, 16.0, 16.0, - asset_path) + spawner_entity = dynveg.create_dynamic_slice_vegetation_area("Instance Spawner", spawner_center_point, 16.0, 16.0, 16.0, + asset_path) # 3) Create surface for planting on dynveg.create_surface_entity("Surface Entity", spawner_center_point, 32.0, 32.0, 1.0) diff --git a/AutomatedTesting/Gem/PythonTests/largeworlds/dyn_veg/EditorScripts/LayerSpawner_FilterStageToggle.py b/AutomatedTesting/Gem/PythonTests/largeworlds/dyn_veg/EditorScripts/LayerSpawner_FilterStageToggle.py index 8592692c4b..6796f56b11 100755 --- a/AutomatedTesting/Gem/PythonTests/largeworlds/dyn_veg/EditorScripts/LayerSpawner_FilterStageToggle.py +++ b/AutomatedTesting/Gem/PythonTests/largeworlds/dyn_veg/EditorScripts/LayerSpawner_FilterStageToggle.py @@ -51,7 +51,7 @@ def LayerSpawner_FilterStageToggle(): # Create a vegetation area with all needed components position = math.Vector3(512.0, 512.0, 32.0) asset_path = os.path.join("Slices", "PinkFlower.dynamicslice") - vegetation_entity = dynveg.create_vegetation_area("vegetation", position, 16.0, 16.0, 16.0, asset_path) + vegetation_entity = dynveg.create_dynamic_slice_vegetation_area("vegetation", position, 16.0, 16.0, 16.0, asset_path) vegetation_entity.add_component("Vegetation Altitude Filter") vegetation_entity.add_component("Vegetation Position Modifier") diff --git a/AutomatedTesting/Gem/PythonTests/largeworlds/dyn_veg/EditorScripts/LayerSpawner_InheritBehaviorFlag.py b/AutomatedTesting/Gem/PythonTests/largeworlds/dyn_veg/EditorScripts/LayerSpawner_InheritBehaviorFlag.py index 649c7d0776..1153ae2657 100755 --- a/AutomatedTesting/Gem/PythonTests/largeworlds/dyn_veg/EditorScripts/LayerSpawner_InheritBehaviorFlag.py +++ b/AutomatedTesting/Gem/PythonTests/largeworlds/dyn_veg/EditorScripts/LayerSpawner_InheritBehaviorFlag.py @@ -78,7 +78,7 @@ def LayerSpawner_InheritBehaviorFlag(): # Create Vegetation area and assign a valid asset veg_1 = hydra.Entity("veg_1") veg_1.create_entity( - position, ["Vegetation Layer Spawner", "Vegetation Reference Shape", "Vegetation Asset List"] + position, ["Vegetation Layer Spawner", "Shape Reference", "Vegetation Asset List"] ) set_dynamic_slice_asset(veg_1, 2, os.path.join("Slices", "PinkFlower.dynamicslice")) veg_1.get_set_test(1, "Configuration|Shape Entity Id", blender_entity.id) @@ -86,7 +86,7 @@ def LayerSpawner_InheritBehaviorFlag(): # Create second vegetation area and assign a valid asset veg_2 = hydra.Entity("veg_2") veg_2.create_entity( - position, ["Vegetation Layer Spawner", "Vegetation Reference Shape", "Vegetation Asset List"] + position, ["Vegetation Layer Spawner", "Shape Reference", "Vegetation Asset List"] ) set_dynamic_slice_asset(veg_2, 2, os.path.join("Slices", "PurpleFlower.dynamicslice")) veg_2.get_set_test(1, "Configuration|Shape Entity Id", blender_entity.id) diff --git a/AutomatedTesting/Gem/PythonTests/largeworlds/dyn_veg/EditorScripts/LayerSpawner_InstancesPlantInAllSupportedShapes.py b/AutomatedTesting/Gem/PythonTests/largeworlds/dyn_veg/EditorScripts/LayerSpawner_InstancesPlantInAllSupportedShapes.py index 0da200d87a..beec54b4eb 100755 --- a/AutomatedTesting/Gem/PythonTests/largeworlds/dyn_veg/EditorScripts/LayerSpawner_InstancesPlantInAllSupportedShapes.py +++ b/AutomatedTesting/Gem/PythonTests/largeworlds/dyn_veg/EditorScripts/LayerSpawner_InstancesPlantInAllSupportedShapes.py @@ -9,7 +9,7 @@ SPDX-License-Identifier: Apache-2.0 OR MIT def LayerSpawner_InstancesPlantInAllSupportedShapes(): """ Summary: - The level is loaded and vegetation area is created. Then the Vegetation Reference Shape + The level is loaded and vegetation area is created. Then the Shape Reference component of vegetation area is pinned with entities of different shape components to check if the vegetation plants in different shaped areas. @@ -62,12 +62,12 @@ def LayerSpawner_InstancesPlantInAllSupportedShapes(): # 2) Create basic vegetation area entity and set the properties entity_position = math.Vector3(125.0, 136.0, 32.0) asset_path = os.path.join("Slices", "PurpleFlower.dynamicslice") - vegetation = dynveg.create_vegetation_area("Instance Spawner", - entity_position, - 10.0, 10.0, 10.0, - asset_path) + vegetation = dynveg.create_dynamic_slice_vegetation_area("Instance Spawner", + entity_position, + 10.0, 10.0, 10.0, + asset_path) vegetation.remove_component("Box Shape") - vegetation.add_component("Vegetation Reference Shape") + vegetation.add_component("Shape Reference") # Create surface for planting on dynveg.create_surface_entity("Surface Entity", entity_position, 60.0, 60.0, 1.0) diff --git a/AutomatedTesting/Gem/PythonTests/largeworlds/dyn_veg/EditorScripts/LayerSpawner_InstancesRefreshUsingCorrectViewportCamera.py b/AutomatedTesting/Gem/PythonTests/largeworlds/dyn_veg/EditorScripts/LayerSpawner_InstancesRefreshUsingCorrectViewportCamera.py index 02d30fb0f3..fe8863c625 100755 --- a/AutomatedTesting/Gem/PythonTests/largeworlds/dyn_veg/EditorScripts/LayerSpawner_InstancesRefreshUsingCorrectViewportCamera.py +++ b/AutomatedTesting/Gem/PythonTests/largeworlds/dyn_veg/EditorScripts/LayerSpawner_InstancesRefreshUsingCorrectViewportCamera.py @@ -101,10 +101,10 @@ def LayerSpawner_InstancesRefreshUsingCorrectViewportCamera(): # Create the two vegetation areas test_slice_asset_path = os.path.join("Slices", "PurpleFlower.dynamicslice") - first_veg_entity = dynveg.create_vegetation_area("Veg Area 1", first_entity_center_point, box_size, box_size, - box_size, test_slice_asset_path) - second_veg_entity = dynveg.create_vegetation_area("Veg Area 2", second_entity_center_point, box_size, box_size, - box_size, test_slice_asset_path) + first_veg_entity = dynveg.create_dynamic_slice_vegetation_area("Veg Area 1", first_entity_center_point, box_size, box_size, + box_size, test_slice_asset_path) + second_veg_entity = dynveg.create_dynamic_slice_vegetation_area("Veg Area 2", second_entity_center_point, box_size, box_size, + box_size, test_slice_asset_path) # When the first viewport is active, the first area should be full of instances, and the second should be empty general.set_active_viewport(0) diff --git a/AutomatedTesting/Gem/PythonTests/largeworlds/dyn_veg/EditorScripts/MeshBlocker_InstancesBlockedByMesh.py b/AutomatedTesting/Gem/PythonTests/largeworlds/dyn_veg/EditorScripts/MeshBlocker_InstancesBlockedByMesh.py index 415673c215..9777a52c82 100755 --- a/AutomatedTesting/Gem/PythonTests/largeworlds/dyn_veg/EditorScripts/MeshBlocker_InstancesBlockedByMesh.py +++ b/AutomatedTesting/Gem/PythonTests/largeworlds/dyn_veg/EditorScripts/MeshBlocker_InstancesBlockedByMesh.py @@ -59,10 +59,10 @@ def MeshBlocker_InstancesBlockedByMesh(): # Create entity with components "Vegetation Layer Spawner", "Vegetation Asset List", "Box Shape" entity_position = math.Vector3(512.0, 512.0, 32.0) asset_path = os.path.join("Slices", "PurpleFlower.dynamicslice") - spawner_entity = dynveg.create_vegetation_area("Instance Spawner", - entity_position, - 10.0, 10.0, 10.0, - asset_path) + spawner_entity = dynveg.create_dynamic_slice_vegetation_area("Instance Spawner", + entity_position, + 10.0, 10.0, 10.0, + asset_path) # Create surface entity to plant on dynveg.create_surface_entity("Surface Entity", entity_position, 10.0, 10.0, 1.0) diff --git a/AutomatedTesting/Gem/PythonTests/largeworlds/dyn_veg/EditorScripts/MeshBlocker_InstancesBlockedByMeshHeightTuning.py b/AutomatedTesting/Gem/PythonTests/largeworlds/dyn_veg/EditorScripts/MeshBlocker_InstancesBlockedByMeshHeightTuning.py index be15c9967c..3c47edeb91 100755 --- a/AutomatedTesting/Gem/PythonTests/largeworlds/dyn_veg/EditorScripts/MeshBlocker_InstancesBlockedByMeshHeightTuning.py +++ b/AutomatedTesting/Gem/PythonTests/largeworlds/dyn_veg/EditorScripts/MeshBlocker_InstancesBlockedByMeshHeightTuning.py @@ -62,10 +62,10 @@ def MeshBlocker_InstancesBlockedByMeshHeightTuning(): # 2) Create entity with components "Vegetation Layer Spawner", "Vegetation Asset List", "Box Shape" entity_position = math.Vector3(512.0, 512.0, 32.0) asset_path = os.path.join("Slices", "PurpleFlower.dynamicslice") - spawner_entity = dynveg.create_vegetation_area("Instance Spawner", - entity_position, - 10.0, 10.0, 10.0, - asset_path) + spawner_entity = dynveg.create_dynamic_slice_vegetation_area("Instance Spawner", + entity_position, + 10.0, 10.0, 10.0, + asset_path) # 3) Create surface entity to plant on dynveg.create_surface_entity("Surface Entity", entity_position, 10.0, 10.0, 1.0) diff --git a/AutomatedTesting/Gem/PythonTests/largeworlds/dyn_veg/EditorScripts/PhysXColliderSurfaceTagEmitter_E2E_Editor.py b/AutomatedTesting/Gem/PythonTests/largeworlds/dyn_veg/EditorScripts/PhysXColliderSurfaceTagEmitter_E2E_Editor.py index b5739c2386..6232cd374d 100755 --- a/AutomatedTesting/Gem/PythonTests/largeworlds/dyn_veg/EditorScripts/PhysXColliderSurfaceTagEmitter_E2E_Editor.py +++ b/AutomatedTesting/Gem/PythonTests/largeworlds/dyn_veg/EditorScripts/PhysXColliderSurfaceTagEmitter_E2E_Editor.py @@ -91,7 +91,7 @@ def PhysXColliderSurfaceTagEmitter_E2E_Editor(): # Create a new entity with required vegetation area components asset_path = os.path.join("Slices", "PinkFlower.dynamicslice") - spawner_entity = dynveg.create_vegetation_area("Veg Area", entity_center_point, 32.0, 32.0, 32.0, asset_path) + spawner_entity = dynveg.create_dynamic_slice_vegetation_area("Veg Area", entity_center_point, 32.0, 32.0, 32.0, asset_path) # Add a Vegetation Surface Mask Filter component to the spawner entity and set it to include the "test" tag spawner_entity.add_component("Vegetation Surface Mask Filter") diff --git a/AutomatedTesting/Gem/PythonTests/largeworlds/dyn_veg/EditorScripts/PositionModifier_AutoSnapToSurfaceWorks.py b/AutomatedTesting/Gem/PythonTests/largeworlds/dyn_veg/EditorScripts/PositionModifier_AutoSnapToSurfaceWorks.py index 5a3ee70d22..be7e8ad754 100755 --- a/AutomatedTesting/Gem/PythonTests/largeworlds/dyn_veg/EditorScripts/PositionModifier_AutoSnapToSurfaceWorks.py +++ b/AutomatedTesting/Gem/PythonTests/largeworlds/dyn_veg/EditorScripts/PositionModifier_AutoSnapToSurfaceWorks.py @@ -74,8 +74,8 @@ def PositionModifier_AutoSnapToSurfaceWorks(): # 2) Create a new entity with required vegetation area components and a Position Modifier spawner_center_point = math.Vector3(512.0, 512.0, 32.0) asset_path = os.path.join("Slices", "PinkFlower.dynamicslice") - spawner_entity = dynveg.create_vegetation_area("Instance Spawner", spawner_center_point, 16.0, 16.0, 16.0, - asset_path) + spawner_entity = dynveg.create_dynamic_slice_vegetation_area("Instance Spawner", spawner_center_point, 16.0, 16.0, 16.0, + asset_path) # Add a Vegetation Position Modifier and set offset values to 0 spawner_entity.add_component("Vegetation Position Modifier") diff --git a/AutomatedTesting/Gem/PythonTests/largeworlds/dyn_veg/EditorScripts/PositionModifier_ComponentAndOverrides_InstancesPlantAtSpecifiedOffsets.py b/AutomatedTesting/Gem/PythonTests/largeworlds/dyn_veg/EditorScripts/PositionModifier_ComponentAndOverrides_InstancesPlantAtSpecifiedOffsets.py index c4fa91f886..07d4fbd067 100755 --- a/AutomatedTesting/Gem/PythonTests/largeworlds/dyn_veg/EditorScripts/PositionModifier_ComponentAndOverrides_InstancesPlantAtSpecifiedOffsets.py +++ b/AutomatedTesting/Gem/PythonTests/largeworlds/dyn_veg/EditorScripts/PositionModifier_ComponentAndOverrides_InstancesPlantAtSpecifiedOffsets.py @@ -111,7 +111,7 @@ def PositionModifier_ComponentAndOverrides_InstancesPlantAtSpecifiedOffsets(): # 2) Create a new entity with required vegetation area components spawner_center_point = math.Vector3(16.0, 16.0, 32.0) asset_path = os.path.join("Slices", "PinkFlower.dynamicslice") - spawner_entity = dynveg.create_vegetation_area("Instance Spawner", spawner_center_point, 1.0, 1.0, 1.0, asset_path) + spawner_entity = dynveg.create_dynamic_slice_vegetation_area("Instance Spawner", spawner_center_point, 1.0, 1.0, 1.0, asset_path) # Add a Vegetation Position Modifier and set offset values to 0 spawner_entity.add_component("Vegetation Position Modifier") diff --git a/AutomatedTesting/Gem/PythonTests/largeworlds/dyn_veg/EditorScripts/RotationModifierOverrides_InstancesRotateWithinRange.py b/AutomatedTesting/Gem/PythonTests/largeworlds/dyn_veg/EditorScripts/RotationModifierOverrides_InstancesRotateWithinRange.py index 4d8019bb33..c1ea8e03d1 100755 --- a/AutomatedTesting/Gem/PythonTests/largeworlds/dyn_veg/EditorScripts/RotationModifierOverrides_InstancesRotateWithinRange.py +++ b/AutomatedTesting/Gem/PythonTests/largeworlds/dyn_veg/EditorScripts/RotationModifierOverrides_InstancesRotateWithinRange.py @@ -88,7 +88,7 @@ def RotationModifierOverrides_InstancesRotateWithinRange(): # 2) Create vegetation entity and add components entity_position = math.Vector3(512.0, 512.0, 32.0) asset_path = os.path.join("Slices", "PurpleFlower.dynamicslice") - spawner_entity = dynveg.create_vegetation_area("Spawner Entity", entity_position, 16.0, 16.0, 16.0, asset_path) + spawner_entity = dynveg.create_dynamic_slice_vegetation_area("Spawner Entity", entity_position, 16.0, 16.0, 16.0, asset_path) spawner_entity.add_component("Vegetation Rotation Modifier") # Our default vegetation settings places 20 instances per 16 meters, so we expect 20 * 20 total instances. num_expected = 20 * 20 diff --git a/AutomatedTesting/Gem/PythonTests/largeworlds/dyn_veg/EditorScripts/RotationModifier_InstancesRotateWithinRange.py b/AutomatedTesting/Gem/PythonTests/largeworlds/dyn_veg/EditorScripts/RotationModifier_InstancesRotateWithinRange.py index c261415958..518c11a0cf 100755 --- a/AutomatedTesting/Gem/PythonTests/largeworlds/dyn_veg/EditorScripts/RotationModifier_InstancesRotateWithinRange.py +++ b/AutomatedTesting/Gem/PythonTests/largeworlds/dyn_veg/EditorScripts/RotationModifier_InstancesRotateWithinRange.py @@ -126,7 +126,7 @@ def RotationModifier_InstancesRotateWithinRange(): # 2) Set up vegetation entities asset_path = os.path.join("Slices", "PurpleFlower.dynamicslice") - spawner_entity = dynveg.create_vegetation_area("Spawner Entity", LEVEL_CENTER, 2.0, 2.0, 2.0, asset_path) + spawner_entity = dynveg.create_dynamic_slice_vegetation_area("Spawner Entity", LEVEL_CENTER, 2.0, 2.0, 2.0, asset_path) additional_components = [ "Vegetation Rotation Modifier" diff --git a/AutomatedTesting/Gem/PythonTests/largeworlds/dyn_veg/EditorScripts/ScaleModifierOverrides_InstancesProperlyScale.py b/AutomatedTesting/Gem/PythonTests/largeworlds/dyn_veg/EditorScripts/ScaleModifierOverrides_InstancesProperlyScale.py index 9f2359ebe2..b2ce6d8afa 100755 --- a/AutomatedTesting/Gem/PythonTests/largeworlds/dyn_veg/EditorScripts/ScaleModifierOverrides_InstancesProperlyScale.py +++ b/AutomatedTesting/Gem/PythonTests/largeworlds/dyn_veg/EditorScripts/ScaleModifierOverrides_InstancesProperlyScale.py @@ -100,7 +100,7 @@ def ScaleModifierOverrides_InstancesProperlyScale(): # 2) Create a new entity with components "Vegetation Layer Spawner", "Vegetation Asset List", "Box Shape" entity_position = math.Vector3(512.0, 512.0, 32.0) asset_path = os.path.join("Slices", "PurpleFlower.dynamicslice") - spawner_entity = dynveg.create_vegetation_area("Spawner Entity", entity_position, 16.0, 16.0, 10.0, asset_path) + spawner_entity = dynveg.create_dynamic_slice_vegetation_area("Spawner Entity", entity_position, 16.0, 16.0, 10.0, asset_path) # Create a surface to plant on and add a Vegetation Debugger Level component to allow refreshes dynveg.create_surface_entity("Surface Entity", entity_position, 20.0, 20.0, 1.0) diff --git a/AutomatedTesting/Gem/PythonTests/largeworlds/dyn_veg/EditorScripts/ScaleModifier_InstancesProperlyScale.py b/AutomatedTesting/Gem/PythonTests/largeworlds/dyn_veg/EditorScripts/ScaleModifier_InstancesProperlyScale.py index b2fadaa703..fd0df1c83d 100755 --- a/AutomatedTesting/Gem/PythonTests/largeworlds/dyn_veg/EditorScripts/ScaleModifier_InstancesProperlyScale.py +++ b/AutomatedTesting/Gem/PythonTests/largeworlds/dyn_veg/EditorScripts/ScaleModifier_InstancesProperlyScale.py @@ -94,8 +94,8 @@ def ScaleModifier_InstancesProperlyScale(): # Vegetation Scale Modifier entity_position = math.Vector3(512.0, 512.0, 32.0) asset_path = os.path.join("Slices", "PurpleFlower.dynamicslice") - spawner_entity = dynveg.create_vegetation_area("Spawner Entity", entity_position, 16.0, 16.0, 16.0, - asset_path) + spawner_entity = dynveg.create_dynamic_slice_vegetation_area("Spawner Entity", entity_position, 16.0, 16.0, 16.0, + asset_path) spawner_entity.add_component("Vegetation Scale Modifier") # Create a surface to plant on and add a Vegetation Debugger Level component to allow refreshes diff --git a/AutomatedTesting/Gem/PythonTests/largeworlds/dyn_veg/EditorScripts/ShapeIntersectionFilter_FilterStageToggle.py b/AutomatedTesting/Gem/PythonTests/largeworlds/dyn_veg/EditorScripts/ShapeIntersectionFilter_FilterStageToggle.py index 1b9c6aa5ea..8f179f7f50 100644 --- a/AutomatedTesting/Gem/PythonTests/largeworlds/dyn_veg/EditorScripts/ShapeIntersectionFilter_FilterStageToggle.py +++ b/AutomatedTesting/Gem/PythonTests/largeworlds/dyn_veg/EditorScripts/ShapeIntersectionFilter_FilterStageToggle.py @@ -57,7 +57,7 @@ def ShapeIntersectionFilter_FilterStageToggle(): # Create basic vegetation entity position = math.Vector3(512.0, 512.0, 32.0) asset_path = os.path.join("Slices", "PinkFlower.dynamicslice") - vegetation = dynveg.create_vegetation_area("vegetation", position, 16.0, 16.0, 16.0, asset_path) + vegetation = dynveg.create_dynamic_slice_vegetation_area("vegetation", position, 16.0, 16.0, 16.0, asset_path) # Create Surface for instances to plant on dynveg.create_surface_entity("Surface_Entity_Parent", position, 16.0, 16.0, 1.0) diff --git a/AutomatedTesting/Gem/PythonTests/largeworlds/dyn_veg/EditorScripts/ShapeIntersectionFilter_InstancesPlantInAssignedShape.py b/AutomatedTesting/Gem/PythonTests/largeworlds/dyn_veg/EditorScripts/ShapeIntersectionFilter_InstancesPlantInAssignedShape.py index e872b23054..6678a620af 100755 --- a/AutomatedTesting/Gem/PythonTests/largeworlds/dyn_veg/EditorScripts/ShapeIntersectionFilter_InstancesPlantInAssignedShape.py +++ b/AutomatedTesting/Gem/PythonTests/largeworlds/dyn_veg/EditorScripts/ShapeIntersectionFilter_InstancesPlantInAssignedShape.py @@ -70,8 +70,8 @@ def ShapeIntersectionFilter_InstancesPlantInAssignedShape(): # 2) Create a new entity with required vegetation area components and Vegetation Shape Intersection Filter center_point = math.Vector3(512.0, 512.0, 32.0) asset_path = os.path.join("Slices", "PinkFlower.dynamicslice") - spawner_entity = dynveg.create_vegetation_area("Instance Spawner", center_point, 16.0, 16.0, 1.0, - asset_path) + spawner_entity = dynveg.create_dynamic_slice_vegetation_area("Instance Spawner", center_point, 16.0, 16.0, 1.0, + asset_path) spawner_entity.add_component("Vegetation Shape Intersection Filter") # Create a planting surface diff --git a/AutomatedTesting/Gem/PythonTests/largeworlds/dyn_veg/EditorScripts/SlopeAlignmentModifierOverrides_InstanceSurfaceAlignment.py b/AutomatedTesting/Gem/PythonTests/largeworlds/dyn_veg/EditorScripts/SlopeAlignmentModifierOverrides_InstanceSurfaceAlignment.py index 5855972f0c..c9233d15ea 100755 --- a/AutomatedTesting/Gem/PythonTests/largeworlds/dyn_veg/EditorScripts/SlopeAlignmentModifierOverrides_InstanceSurfaceAlignment.py +++ b/AutomatedTesting/Gem/PythonTests/largeworlds/dyn_veg/EditorScripts/SlopeAlignmentModifierOverrides_InstanceSurfaceAlignment.py @@ -66,7 +66,7 @@ def SlopeAlignmentModifierOverrides_InstanceSurfaceAlignment(): # Create a spawner entity setup with all needed components center_point = math.Vector3(512.0, 512.0, 32.0) asset_path = os.path.join("Slices", "PinkFlower.dynamicslice") - spawner_entity = dynveg.create_vegetation_area("Instance Spawner", center_point, 16.0, 16.0, 32.0, asset_path) + spawner_entity = dynveg.create_dynamic_slice_vegetation_area("Instance Spawner", center_point, 16.0, 16.0, 32.0, asset_path) # Create a sloped mesh surface for the instances to plant on center_point = math.Vector3(502.0, 512.0, 24.0) diff --git a/AutomatedTesting/Gem/PythonTests/largeworlds/dyn_veg/EditorScripts/SlopeAlignmentModifier_InstanceSurfaceAlignment.py b/AutomatedTesting/Gem/PythonTests/largeworlds/dyn_veg/EditorScripts/SlopeAlignmentModifier_InstanceSurfaceAlignment.py index 11427b9b0e..d92babffa4 100755 --- a/AutomatedTesting/Gem/PythonTests/largeworlds/dyn_veg/EditorScripts/SlopeAlignmentModifier_InstanceSurfaceAlignment.py +++ b/AutomatedTesting/Gem/PythonTests/largeworlds/dyn_veg/EditorScripts/SlopeAlignmentModifier_InstanceSurfaceAlignment.py @@ -67,7 +67,7 @@ def SlopeAlignmentModifier_InstanceSurfaceAlignment(): # Create a spawner entity setup with all needed components center_point = math.Vector3(512.0, 512.0, 32.0) asset_path = os.path.join("Slices", "PinkFlower.dynamicslice") - spawner_entity = dynveg.create_vegetation_area("Instance Spawner", center_point, 16.0, 16.0, 32.0, asset_path) + spawner_entity = dynveg.create_dynamic_slice_vegetation_area("Instance Spawner", center_point, 16.0, 16.0, 32.0, asset_path) # Create a sloped mesh surface for the instances to plant on center_point = math.Vector3(502.0, 512.0, 24.0) diff --git a/AutomatedTesting/Gem/PythonTests/largeworlds/dyn_veg/EditorScripts/SlopeFilter_ComponentAndOverrides_InstancesPlantOnValidSlope.py b/AutomatedTesting/Gem/PythonTests/largeworlds/dyn_veg/EditorScripts/SlopeFilter_ComponentAndOverrides_InstancesPlantOnValidSlope.py index ee0851d552..0f95853156 100755 --- a/AutomatedTesting/Gem/PythonTests/largeworlds/dyn_veg/EditorScripts/SlopeFilter_ComponentAndOverrides_InstancesPlantOnValidSlope.py +++ b/AutomatedTesting/Gem/PythonTests/largeworlds/dyn_veg/EditorScripts/SlopeFilter_ComponentAndOverrides_InstancesPlantOnValidSlope.py @@ -72,7 +72,7 @@ def SlopeFilter_ComponentAndOverrides_InstancesPlantOnValidSlopes(): # 2) Create a new entity with required vegetation area components center_point = math.Vector3(512.0, 512.0, 32.0) asset_path = os.path.join("Slices", "PinkFlower.dynamicslice") - spawner_entity = dynveg.create_vegetation_area("Instance Spawner", center_point, 32.0, 32.0, 32.0, asset_path) + spawner_entity = dynveg.create_dynamic_slice_vegetation_area("Instance Spawner", center_point, 32.0, 32.0, 32.0, asset_path) # Add a Vegetation Slope Filter spawner_entity.add_component("Vegetation Slope Filter") diff --git a/AutomatedTesting/Gem/PythonTests/largeworlds/dyn_veg/EditorScripts/SpawnerSlices_SliceCreationAndVisibilityToggleWorks.py b/AutomatedTesting/Gem/PythonTests/largeworlds/dyn_veg/EditorScripts/SpawnerSlices_SliceCreationAndVisibilityToggleWorks.py index 1658ffc532..fc55080cec 100644 --- a/AutomatedTesting/Gem/PythonTests/largeworlds/dyn_veg/EditorScripts/SpawnerSlices_SliceCreationAndVisibilityToggleWorks.py +++ b/AutomatedTesting/Gem/PythonTests/largeworlds/dyn_veg/EditorScripts/SpawnerSlices_SliceCreationAndVisibilityToggleWorks.py @@ -66,14 +66,14 @@ def SpawnerSlices_SliceCreationAndVisibilityToggleWorks(): # 2.1) Create basic vegetation entity position = math.Vector3(512.0, 512.0, 32.0) asset_path = os.path.join("Slices", "PinkFlower.dynamicslice") - veg_1 = dynveg.create_vegetation_area("vegetation_1", position, 16.0, 16.0, 16.0, asset_path) + veg_1 = dynveg.create_dynamic_slice_vegetation_area("vegetation_1", position, 16.0, 16.0, 16.0, asset_path) # 2.2) Create slice from the entity slice_path = os.path.join("slices", "TestSlice_1.slice") slice.SliceRequestBus(bus.Broadcast, "CreateNewSlice", veg_1.id, slice_path) # 2.3) Verify if the slice has been created successfully - spawner_slice_success = helper.wait_for_condition(lambda: path_is_valid_asset(slice_path), 5.0) + spawner_slice_success = helper.wait_for_condition(lambda: path_is_valid_asset(slice_path), 10.0) Report.result(Tests.spawner_slice_created, spawner_slice_success) # 3) C2627904: Hiding a slice containing the component clears any visuals from the Viewport @@ -94,7 +94,7 @@ def SpawnerSlices_SliceCreationAndVisibilityToggleWorks(): # 4) C2627905 A slice containing the Vegetation Layer Blender component can be created. # 4.1) Create another vegetation entity to add to blender component - veg_2 = dynveg.create_vegetation_area("vegetation_2", position, 1.0, 1.0, 1.0, "") + veg_2 = dynveg.create_dynamic_slice_vegetation_area("vegetation_2", position, 1.0, 1.0, 1.0, "") # 4.2) Create entity with Vegetation Layer Blender components_to_add = ["Box Shape", "Vegetation Layer Blender"] diff --git a/AutomatedTesting/Gem/PythonTests/largeworlds/dyn_veg/EditorScripts/SurfaceMaskFilterOverrides_MultipleDescriptorOverridesPlantAsExpected.py b/AutomatedTesting/Gem/PythonTests/largeworlds/dyn_veg/EditorScripts/SurfaceMaskFilterOverrides_MultipleDescriptorOverridesPlantAsExpected.py index ba0f3e05e3..3e76a03c53 100755 --- a/AutomatedTesting/Gem/PythonTests/largeworlds/dyn_veg/EditorScripts/SurfaceMaskFilterOverrides_MultipleDescriptorOverridesPlantAsExpected.py +++ b/AutomatedTesting/Gem/PythonTests/largeworlds/dyn_veg/EditorScripts/SurfaceMaskFilterOverrides_MultipleDescriptorOverridesPlantAsExpected.py @@ -77,8 +77,8 @@ def SurfaceMaskFilterOverrides_MultipleDescriptorOverridesPlantAsExpected(): # 2) Create a new instance spawner entity with multiple Dynamic Slice Instance Spawner descriptors spawner_center_point = math.Vector3(512.0, 512.0, 32.0) asset_path = os.path.join("Slices", "PinkFlower.dynamicslice") - spawner_entity = dynveg.create_vegetation_area("Instance Spawner", spawner_center_point, 16.0, 16.0, 16.0, - asset_path) + spawner_entity = dynveg.create_dynamic_slice_vegetation_area("Instance Spawner", spawner_center_point, 16.0, 16.0, 16.0, + asset_path) asset_list_component = spawner_entity.components[2] desc_asset = hydra.get_component_property_value(asset_list_component, "Configuration|Embedded Assets")[0] diff --git a/AutomatedTesting/Gem/PythonTests/largeworlds/dyn_veg/EditorScripts/SurfaceMaskFilter_ExclusionList.py b/AutomatedTesting/Gem/PythonTests/largeworlds/dyn_veg/EditorScripts/SurfaceMaskFilter_ExclusionList.py index 6438124698..3f298e793e 100755 --- a/AutomatedTesting/Gem/PythonTests/largeworlds/dyn_veg/EditorScripts/SurfaceMaskFilter_ExclusionList.py +++ b/AutomatedTesting/Gem/PythonTests/largeworlds/dyn_veg/EditorScripts/SurfaceMaskFilter_ExclusionList.py @@ -99,10 +99,10 @@ def SurfaceMaskFilter_ExclusionList(): # 2) Create entity with components "Vegetation Layer Spawner", "Vegetation Asset List", "Box Shape" entity_position = math.Vector3(512.0, 512.0, 32.0) asset_path = os.path.join("Slices", "PurpleFlower.dynamicslice") - spawner_entity = dynveg.create_vegetation_area("Instance Spawner", - entity_position, - 10.0, 10.0, 10.0, - asset_path) + spawner_entity = dynveg.create_dynamic_slice_vegetation_area("Instance Spawner", + entity_position, + 10.0, 10.0, 10.0, + asset_path) # 3) Add a Vegetation Surface Mask Filter component to the entity. spawner_entity.add_component("Vegetation Surface Mask Filter") diff --git a/AutomatedTesting/Gem/PythonTests/largeworlds/dyn_veg/EditorScripts/SurfaceMaskFilter_InclusionList.py b/AutomatedTesting/Gem/PythonTests/largeworlds/dyn_veg/EditorScripts/SurfaceMaskFilter_InclusionList.py index bbd1235abc..39b72ff4a9 100755 --- a/AutomatedTesting/Gem/PythonTests/largeworlds/dyn_veg/EditorScripts/SurfaceMaskFilter_InclusionList.py +++ b/AutomatedTesting/Gem/PythonTests/largeworlds/dyn_veg/EditorScripts/SurfaceMaskFilter_InclusionList.py @@ -100,10 +100,10 @@ def SurfaceMaskFilter_InclusionList(): # 2) Create entity with components "Vegetation Layer Spawner", "Vegetation Asset List", "Box Shape" entity_position = math.Vector3(512.0, 512.0, 32.0) asset_path = os.path.join("Slices", "PurpleFlower.dynamicslice") - spawner_entity = dynveg.create_vegetation_area("Instance Spawner", - entity_position, - 10.0, 10.0, 10.0, - asset_path) + spawner_entity = dynveg.create_dynamic_slice_vegetation_area("Instance Spawner", + entity_position, + 10.0, 10.0, 10.0, + asset_path) # 3) Add a Vegetation Surface Mask Filter component to the entity. spawner_entity.add_component("Vegetation Surface Mask Filter") diff --git a/AutomatedTesting/Gem/PythonTests/largeworlds/dyn_veg/EditorScripts/SystemSettings_SectorPointDensity.py b/AutomatedTesting/Gem/PythonTests/largeworlds/dyn_veg/EditorScripts/SystemSettings_SectorPointDensity.py index d808d3f20b..167fb8901c 100755 --- a/AutomatedTesting/Gem/PythonTests/largeworlds/dyn_veg/EditorScripts/SystemSettings_SectorPointDensity.py +++ b/AutomatedTesting/Gem/PythonTests/largeworlds/dyn_veg/EditorScripts/SystemSettings_SectorPointDensity.py @@ -55,7 +55,7 @@ def SystemSettings_SectorPointDensity(): # Create basic vegetation entity position = math.Vector3(512.0, 512.0, 32.0) asset_path = os.path.join("Slices", "PinkFlower.dynamicslice") - dynveg.create_vegetation_area("vegetation", position, 16.0, 16.0, 1.0, asset_path) + dynveg.create_dynamic_slice_vegetation_area("vegetation", position, 16.0, 16.0, 1.0, asset_path) dynveg.create_surface_entity("Surface_Entity", position, 16.0, 16.0, 1.0) # Count the number of vegetation instances in the vegetation area diff --git a/AutomatedTesting/Gem/PythonTests/largeworlds/dyn_veg/EditorScripts/SystemSettings_SectorSize.py b/AutomatedTesting/Gem/PythonTests/largeworlds/dyn_veg/EditorScripts/SystemSettings_SectorSize.py index fb660c964a..7bb78ac3e0 100755 --- a/AutomatedTesting/Gem/PythonTests/largeworlds/dyn_veg/EditorScripts/SystemSettings_SectorSize.py +++ b/AutomatedTesting/Gem/PythonTests/largeworlds/dyn_veg/EditorScripts/SystemSettings_SectorSize.py @@ -51,7 +51,7 @@ def SystemSettings_SectorSize(): # Create basic vegetation entity position = math.Vector3(512.0, 512.0, 32.0) asset_path = os.path.join("Slices", "PinkFlower.dynamicslice") - vegetation = dynveg.create_vegetation_area("vegetation", position, 16.0, 16.0, 1.0, asset_path) + vegetation = dynveg.create_dynamic_slice_vegetation_area("vegetation", position, 16.0, 16.0, 1.0, asset_path) dynveg.create_surface_entity("Surface_Entity", position, 16.0, 16.0, 1.0) # Add the Vegetation Debugger component to the Level Inspector diff --git a/AutomatedTesting/Gem/PythonTests/largeworlds/dyn_veg/EditorScripts/VegetationInstances_DespawnWhenOutOfRange.py b/AutomatedTesting/Gem/PythonTests/largeworlds/dyn_veg/EditorScripts/VegetationInstances_DespawnWhenOutOfRange.py index a0657f3949..8a6c4d9a17 100755 --- a/AutomatedTesting/Gem/PythonTests/largeworlds/dyn_veg/EditorScripts/VegetationInstances_DespawnWhenOutOfRange.py +++ b/AutomatedTesting/Gem/PythonTests/largeworlds/dyn_veg/EditorScripts/VegetationInstances_DespawnWhenOutOfRange.py @@ -54,7 +54,7 @@ def VegetationInstances_DespawnWhenOutOfRange(): # Create vegetation layer spawner world_center = math.Vector3(512.0, 512.0, 32.0) asset_path = os.path.join("Slices", "PurpleFlower.dynamicslice") - spawner_entity = dynveg.create_vegetation_area("Spawner Instance", world_center, 16.0, 16.0, 16.0, asset_path) + spawner_entity = dynveg.create_dynamic_slice_vegetation_area("Spawner Instance", world_center, 16.0, 16.0, 16.0, asset_path) # Create a surface to spawn on dynveg.create_surface_entity("Spawner Entity", world_center, 16.0, 16.0, 1.0) diff --git a/AutomatedTesting/Gem/PythonTests/largeworlds/dyn_veg/TestSuite_Main.py b/AutomatedTesting/Gem/PythonTests/largeworlds/dyn_veg/TestSuite_Main.py index 4c02c887ef..06c9c5f615 100644 --- a/AutomatedTesting/Gem/PythonTests/largeworlds/dyn_veg/TestSuite_Main.py +++ b/AutomatedTesting/Gem/PythonTests/largeworlds/dyn_veg/TestSuite_Main.py @@ -20,8 +20,8 @@ class TestAutomation(TestAutomationBase): def test_DynamicSliceInstanceSpawner_DynamicSliceSpawnerWorks(self, request, workspace, editor, launcher_platform): from .EditorScripts import DynamicSliceInstanceSpawner_DynamicSliceSpawnerWorks as test_module - self._run_test(request, workspace, editor, test_module) + self._run_test(request, workspace, editor, test_module, enable_prefab_system=False) def test_EmptyInstanceSpawner_EmptySpawnerWorks(self, request, workspace, editor, launcher_platform): from .EditorScripts import EmptyInstanceSpawner_EmptySpawnerWorks as test_module - self._run_test(request, workspace, editor, test_module) + self._run_test(request, workspace, editor, test_module, enable_prefab_system=False) diff --git a/AutomatedTesting/Gem/PythonTests/largeworlds/dyn_veg/TestSuite_Main_Optimized.py b/AutomatedTesting/Gem/PythonTests/largeworlds/dyn_veg/TestSuite_Main_Optimized.py index ded2dda4e9..5b1e504442 100644 --- a/AutomatedTesting/Gem/PythonTests/largeworlds/dyn_veg/TestSuite_Main_Optimized.py +++ b/AutomatedTesting/Gem/PythonTests/largeworlds/dyn_veg/TestSuite_Main_Optimized.py @@ -12,34 +12,48 @@ import ly_test_tools.environment.file_system as file_system from ly_test_tools.o3de.editor_test import EditorSingleTest, EditorSharedTest, EditorParallelTest, EditorTestSuite -@pytest.mark.xfail(reason="Optimized tests are experimental, we will enable xfail and monitor them temporarily.") @pytest.mark.SUITE_main @pytest.mark.parametrize("launcher_platform", ['windows_editor']) @pytest.mark.parametrize("project", ["AutomatedTesting"]) class TestAutomation(EditorTestSuite): + class test_AltitudeFilter_ComponentAndOverrides_InstancesPlantAtSpecifiedAltitude(EditorParallelTest): + from .EditorScripts import AltitudeFilter_ComponentAndOverrides_InstancesPlantAtSpecifiedAltitude as test_module + + class test_AltitudeFilter_FilterStageToggle(EditorParallelTest): + from .EditorScripts import AltitudeFilter_FilterStageToggle as test_module + class test_AltitudeFilter_ShapeSample_InstancesPlantAtSpecifiedAltitude(EditorParallelTest): + from .EditorScripts import AltitudeFilter_ShapeSample_InstancesPlantAtSpecifiedAltitude as test_module + + +@pytest.mark.SUITE_main +@pytest.mark.parametrize("launcher_platform", ['windows_editor']) +@pytest.mark.parametrize("project", ["AutomatedTesting"]) +class TestAutomation_PrefabNotEnabled(EditorTestSuite): + + enable_prefab_system = False + + # Helpers for test asset cleanup + def cleanup_test_level(self, workspace): + file_system.delete([os.path.join(workspace.paths.engine_root(), "AutomatedTesting", "Levels", "tmp_level")], + True, True) + + def cleanup_test_slices(self, workspace): + file_system.delete([os.path.join(workspace.paths.engine_root(), "AutomatedTesting", "slices", + "TestSlice_1.slice")], True, True) + file_system.delete([os.path.join(workspace.paths.engine_root(), "AutomatedTesting", "slices", + "TestSlice_2.slice")], True, True) + class test_DynamicSliceInstanceSpawner_DynamicSliceSpawnerWorks(EditorParallelTest): from .EditorScripts import DynamicSliceInstanceSpawner_DynamicSliceSpawnerWorks as test_module class test_EmptyInstanceSpawner_EmptySpawnerWorks(EditorParallelTest): from .EditorScripts import EmptyInstanceSpawner_EmptySpawnerWorks as test_module - class test_AltitudeFilter_ComponentAndOverrides_InstancesPlantAtSpecifiedAltitude(EditorParallelTest): - from .EditorScripts import AltitudeFilter_ComponentAndOverrides_InstancesPlantAtSpecifiedAltitude as test_module - - class test_AltitudeFilter_ShapeSample_InstancesPlantAtSpecifiedAltitude(EditorParallelTest): - from .EditorScripts import AltitudeFilter_ShapeSample_InstancesPlantAtSpecifiedAltitude as test_module - - class test_AltitudeFilter_FilterStageToggle(EditorParallelTest): - from .EditorScripts import AltitudeFilter_FilterStageToggle as test_module - class test_SpawnerSlices_SliceCreationAndVisibilityToggleWorks(EditorSingleTest): # Custom teardown to remove slice asset created during test def teardown(self, request, workspace, editor, editor_test_results, launcher_platform): - file_system.delete([os.path.join(workspace.paths.engine_root(), "AutomatedTesting", "slices", - "TestSlice_1.slice")], True, True) - file_system.delete([os.path.join(workspace.paths.engine_root(), "AutomatedTesting", "slices", - "TestSlice_2.slice")], True, True) + TestAutomation_PrefabNotEnabled.cleanup_test_slices(self, workspace) from .EditorScripts import SpawnerSlices_SliceCreationAndVisibilityToggleWorks as test_module class test_AssetListCombiner_CombinedDescriptorsExpressInConfiguredArea(EditorParallelTest): @@ -150,23 +164,29 @@ class TestAutomation(EditorTestSuite): class test_DynamicSliceInstanceSpawner_Embedded_E2E_Editor(EditorSingleTest): from .EditorScripts import DynamicSliceInstanceSpawner_Embedded_E2E as test_module - # Custom teardown to remove test level created during test + # Custom setup/teardown to remove test level created during test + def setup(self, request, workspace, editor, editor_test_results, launcher_platform): + TestAutomation_PrefabNotEnabled.cleanup_test_level(self, workspace) + def teardown(self, request, workspace, editor, editor_test_results, launcher_platform): - file_system.delete([os.path.join(workspace.paths.engine_root(), "AutomatedTesting", "Levels", "tmp_level")], - True, True) + TestAutomation_PrefabNotEnabled.cleanup_test_level(self, workspace) class test_DynamicSliceInstanceSpawner_External_E2E_Editor(EditorSingleTest): from .EditorScripts import DynamicSliceInstanceSpawner_External_E2E as test_module - # Custom teardown to remove test level created during test + # Custom setup/teardown to remove test level created during test + def setup(self, request, workspace, editor, editor_test_results, launcher_platform): + TestAutomation_PrefabNotEnabled.cleanup_test_level(self, workspace) + def teardown(self, request, workspace, editor, editor_test_results, launcher_platform): - file_system.delete([os.path.join(workspace.paths.engine_root(), "AutomatedTesting", "Levels", "tmp_level")], - True, True) - + TestAutomation_PrefabNotEnabled.cleanup_test_level(self, workspace) + class test_LayerBlender_E2E_Editor(EditorSingleTest): from .EditorScripts import LayerBlender_E2E_Editor as test_module - # Custom teardown to remove test level created during test + # Custom setup/teardown to remove test level created during test + def setup(self, request, workspace, editor, editor_test_results, launcher_platform): + TestAutomation_PrefabNotEnabled.cleanup_test_level(self, workspace) + def teardown(self, request, workspace, editor, editor_test_results, launcher_platform): - file_system.delete([os.path.join(workspace.paths.engine_root(), "AutomatedTesting", "Levels", "tmp_level")], - True, True) + TestAutomation_PrefabNotEnabled.cleanup_test_level(self, workspace) diff --git a/AutomatedTesting/Gem/PythonTests/largeworlds/dyn_veg/TestSuite_Periodic.py b/AutomatedTesting/Gem/PythonTests/largeworlds/dyn_veg/TestSuite_Periodic.py index 2780c0f471..64f6cfdf30 100644 --- a/AutomatedTesting/Gem/PythonTests/largeworlds/dyn_veg/TestSuite_Periodic.py +++ b/AutomatedTesting/Gem/PythonTests/largeworlds/dyn_veg/TestSuite_Periodic.py @@ -64,146 +64,146 @@ class TestAutomation(TestAutomationBase): def test_SpawnerSlices_SliceCreationAndVisibilityToggleWorks(self, request, workspace, editor, remove_test_slice, launcher_platform): from .EditorScripts import SpawnerSlices_SliceCreationAndVisibilityToggleWorks as test_module - self._run_test(request, workspace, editor, test_module) + self._run_test(request, workspace, editor, test_module, enable_prefab_system=False) def test_AssetListCombiner_CombinedDescriptorsExpressInConfiguredArea(self, request, workspace, editor, launcher_platform): from .EditorScripts import AssetListCombiner_CombinedDescriptorsExpressInConfiguredArea as test_module - self._run_test(request, workspace, editor, test_module) + self._run_test(request, workspace, editor, test_module, enable_prefab_system=False) def test_AssetWeightSelector_InstancesExpressBasedOnWeight(self, request, workspace, editor, launcher_platform): from .EditorScripts import AssetWeightSelector_InstancesExpressBasedOnWeight as test_module - self._run_test(request, workspace, editor, test_module) + self._run_test(request, workspace, editor, test_module, enable_prefab_system=False) @pytest.mark.xfail(reason="https://github.com/o3de/o3de/issues/4155") def test_DistanceBetweenFilter_InstancesPlantAtSpecifiedRadius(self, request, workspace, editor, launcher_platform): from .EditorScripts import DistanceBetweenFilter_InstancesPlantAtSpecifiedRadius as test_module - self._run_test(request, workspace, editor, test_module) + self._run_test(request, workspace, editor, test_module, enable_prefab_system=False) @pytest.mark.xfail(reason="https://github.com/o3de/o3de/issues/4155") def test_DistanceBetweenFilterOverrides_InstancesPlantAtSpecifiedRadius(self, request, workspace, editor, launcher_platform): from .EditorScripts import DistanceBetweenFilterOverrides_InstancesPlantAtSpecifiedRadius as test_module - self._run_test(request, workspace, editor, test_module) + self._run_test(request, workspace, editor, test_module, enable_prefab_system=False) def test_SurfaceDataRefreshes_RemainsStable(self, request, workspace, editor, launcher_platform): from .EditorScripts import SurfaceDataRefreshes_RemainsStable as test_module - self._run_test(request, workspace, editor, test_module) + self._run_test(request, workspace, editor, test_module, enable_prefab_system=False) def test_VegetationInstances_DespawnWhenOutOfRange(self, request, workspace, editor, launcher_platform): from .EditorScripts import VegetationInstances_DespawnWhenOutOfRange as test_module - self._run_test(request, workspace, editor, test_module) + self._run_test(request, workspace, editor, test_module, enable_prefab_system=False) def test_InstanceSpawnerPriority_LayerAndSubPriority_HigherValuesPlantOverLower(self, request, workspace, editor, launcher_platform): from .EditorScripts import InstanceSpawnerPriority_LayerAndSubPriority as test_module - self._run_test(request, workspace, editor, test_module) + self._run_test(request, workspace, editor, test_module, enable_prefab_system=False) def test_LayerBlocker_InstancesBlockedInConfiguredArea(self, request, workspace, editor, launcher_platform): from .EditorScripts import LayerBlocker_InstancesBlockedInConfiguredArea as test_module - self._run_test(request, workspace, editor, test_module) + self._run_test(request, workspace, editor, test_module, enable_prefab_system=False) def test_LayerSpawner_InheritBehaviorFlag(self, request, workspace, editor, launcher_platform): from .EditorScripts import LayerSpawner_InheritBehaviorFlag as test_module - self._run_test(request, workspace, editor, test_module) + self._run_test(request, workspace, editor, test_module, enable_prefab_system=False) def test_LayerSpawner_InstancesPlantInAllSupportedShapes(self, request, workspace, editor, launcher_platform): from .EditorScripts import LayerSpawner_InstancesPlantInAllSupportedShapes as test_module - self._run_test(request, workspace, editor, test_module) + self._run_test(request, workspace, editor, test_module, enable_prefab_system=False) def test_LayerSpawner_FilterStageToggle(self, request, workspace, editor, launcher_platform): from .EditorScripts import LayerSpawner_FilterStageToggle as test_module - self._run_test(request, workspace, editor, test_module) + self._run_test(request, workspace, editor, test_module, enable_prefab_system=False) @pytest.mark.xfail(reason="https://github.com/o3de/o3de/issues/2038") def test_LayerSpawner_InstancesRefreshUsingCorrectViewportCamera(self, request, workspace, editor, launcher_platform): from .EditorScripts import LayerSpawner_InstancesRefreshUsingCorrectViewportCamera as test_module - self._run_test(request, workspace, editor, test_module) + self._run_test(request, workspace, editor, test_module, enable_prefab_system=False) def test_MeshBlocker_InstancesBlockedByMesh(self, request, workspace, editor, launcher_platform): from .EditorScripts import MeshBlocker_InstancesBlockedByMesh as test_module - self._run_test(request, workspace, editor, test_module) + self._run_test(request, workspace, editor, test_module, enable_prefab_system=False) def test_MeshBlocker_InstancesBlockedByMeshHeightTuning(self, request, workspace, editor, launcher_platform): from .EditorScripts import MeshBlocker_InstancesBlockedByMeshHeightTuning as test_module - self._run_test(request, workspace, editor, test_module) + self._run_test(request, workspace, editor, test_module, enable_prefab_system=False) def test_MeshSurfaceTagEmitter_DependentOnMeshComponent(self, request, workspace, editor, launcher_platform): from .EditorScripts import MeshSurfaceTagEmitter_DependentOnMeshComponent as test_module - self._run_test(request, workspace, editor, test_module) + self._run_test(request, workspace, editor, test_module, enable_prefab_system=False) def test_MeshSurfaceTagEmitter_SurfaceTagsAddRemoveSuccessfully(self, request, workspace, editor, launcher_platform): from .EditorScripts import MeshSurfaceTagEmitter_SurfaceTagsAddRemoveSuccessfully as test_module - self._run_test(request, workspace, editor, test_module) + self._run_test(request, workspace, editor, test_module, enable_prefab_system=False) def test_PhysXColliderSurfaceTagEmitter_E2E_Editor(self, request, workspace, editor, launcher_platform): from .EditorScripts import PhysXColliderSurfaceTagEmitter_E2E_Editor as test_module - self._run_test(request, workspace, editor, test_module) + self._run_test(request, workspace, editor, test_module, enable_prefab_system=False) def test_PositionModifier_ComponentAndOverrides_InstancesPlantAtSpecifiedOffsets(self, request, workspace, editor, launcher_platform): from .EditorScripts import PositionModifier_ComponentAndOverrides_InstancesPlantAtSpecifiedOffsets as test_module - self._run_test(request, workspace, editor, test_module) + self._run_test(request, workspace, editor, test_module, enable_prefab_system=False) def test_PositionModifier_AutoSnapToSurfaceWorks(self, request, workspace, editor, launcher_platform): from .EditorScripts import PositionModifier_AutoSnapToSurfaceWorks as test_module - self._run_test(request, workspace, editor, test_module) + self._run_test(request, workspace, editor, test_module, enable_prefab_system=False) def test_RotationModifier_InstancesRotateWithinRange(self, request, workspace, editor, launcher_platform): from .EditorScripts import RotationModifier_InstancesRotateWithinRange as test_module - self._run_test(request, workspace, editor, test_module) + self._run_test(request, workspace, editor, test_module, enable_prefab_system=False) def test_RotationModifierOverrides_InstancesRotateWithinRange(self, request, workspace, editor, launcher_platform): from .EditorScripts import RotationModifierOverrides_InstancesRotateWithinRange as test_module - self._run_test(request, workspace, editor, test_module) + self._run_test(request, workspace, editor, test_module, enable_prefab_system=False) def test_ScaleModifier_InstancesProperlyScale(self, request, workspace, editor, launcher_platform): from .EditorScripts import ScaleModifier_InstancesProperlyScale as test_module - self._run_test(request, workspace, editor, test_module) + self._run_test(request, workspace, editor, test_module, enable_prefab_system=False) def test_ScaleModifierOverrides_InstancesProperlyScale(self, request, workspace, editor, launcher_platform): from .EditorScripts import ScaleModifierOverrides_InstancesProperlyScale as test_module - self._run_test(request, workspace, editor, test_module) + self._run_test(request, workspace, editor, test_module, enable_prefab_system=False) def test_ShapeIntersectionFilter_InstancesPlantInAssignedShape(self, request, workspace, editor, launcher_platform): from .EditorScripts import ShapeIntersectionFilter_InstancesPlantInAssignedShape as test_module - self._run_test(request, workspace, editor, test_module) + self._run_test(request, workspace, editor, test_module, enable_prefab_system=False) def test_ShapeIntersectionFilter_FilterStageToggle(self, request, workspace, editor, launcher_platform): from .EditorScripts import ShapeIntersectionFilter_FilterStageToggle as test_module - self._run_test(request, workspace, editor, test_module) + self._run_test(request, workspace, editor, test_module, enable_prefab_system=False) def test_SlopeAlignmentModifier_InstanceSurfaceAlignment(self, request, workspace, editor, launcher_platform): from .EditorScripts import SlopeAlignmentModifier_InstanceSurfaceAlignment as test_module - self._run_test(request, workspace, editor, test_module) + self._run_test(request, workspace, editor, test_module, enable_prefab_system=False) def test_SlopeAlignmentModifierOverrides_InstanceSurfaceAlignment(self, request, workspace, editor, launcher_platform): from .EditorScripts import SlopeAlignmentModifierOverrides_InstanceSurfaceAlignment as test_module - self._run_test(request, workspace, editor, test_module) + self._run_test(request, workspace, editor, test_module, enable_prefab_system=False) def test_SurfaceMaskFilter_BasicSurfaceTagCreation(self, request, workspace, editor, launcher_platform): from .EditorScripts import SurfaceMaskFilter_BasicSurfaceTagCreation as test_module - self._run_test(request, workspace, editor, test_module) + self._run_test(request, workspace, editor, test_module, enable_prefab_system=False) def test_SurfaceMaskFilter_ExclusiveSurfaceTags_Function(self, request, workspace, editor, launcher_platform): from .EditorScripts import SurfaceMaskFilter_ExclusionList as test_module - self._run_test(request, workspace, editor, test_module) + self._run_test(request, workspace, editor, test_module, enable_prefab_system=False) def test_SurfaceMaskFilter_InclusiveSurfaceTags_Function(self, request, workspace, editor, launcher_platform): from .EditorScripts import SurfaceMaskFilter_InclusionList as test_module - self._run_test(request, workspace, editor, test_module) + self._run_test(request, workspace, editor, test_module, enable_prefab_system=False) def test_SurfaceMaskFilterOverrides_MultipleDescriptorOverridesPlantAsExpected(self, request, workspace, editor, launcher_platform): from .EditorScripts import SurfaceMaskFilterOverrides_MultipleDescriptorOverridesPlantAsExpected as test_module - self._run_test(request, workspace, editor, test_module) + self._run_test(request, workspace, editor, test_module, enable_prefab_system=False) def test_SystemSettings_SectorPointDensity(self, request, workspace, editor, launcher_platform): from .EditorScripts import SystemSettings_SectorPointDensity as test_module - self._run_test(request, workspace, editor, test_module) + self._run_test(request, workspace, editor, test_module, enable_prefab_system=False) def test_SystemSettings_SectorSize(self, request, workspace, editor, launcher_platform): from .EditorScripts import SystemSettings_SectorSize as test_module - self._run_test(request, workspace, editor, test_module) + self._run_test(request, workspace, editor, test_module, enable_prefab_system=False) def test_SlopeFilter_ComponentAndOverrides_InstancesPlantOnValidSlopes(self, request, workspace, editor, launcher_platform): from .EditorScripts import SlopeFilter_ComponentAndOverrides_InstancesPlantOnValidSlope as test_module - self._run_test(request, workspace, editor, test_module) + self._run_test(request, workspace, editor, test_module, enable_prefab_system=False) @pytest.mark.SUITE_periodic @@ -219,7 +219,7 @@ class TestAutomationE2E(TestAutomationBase): file_system.delete([os.path.join(workspace.paths.engine_root(), project, "Levels", level)], True, True) from .EditorScripts import DynamicSliceInstanceSpawner_Embedded_E2E as test_module - self._run_test(request, workspace, editor, test_module) + self._run_test(request, workspace, editor, test_module, enable_prefab_system=False) @pytest.mark.parametrize("launcher_platform", ['windows']) def test_DynamicSliceInstanceSpawner_Embedded_E2E_Launcher(self, workspace, launcher, level, @@ -240,7 +240,7 @@ class TestAutomationE2E(TestAutomationBase): file_system.delete([os.path.join(workspace.paths.engine_root(), project, "Levels", level)], True, True) from .EditorScripts import DynamicSliceInstanceSpawner_External_E2E as test_module - self._run_test(request, workspace, editor, test_module) + self._run_test(request, workspace, editor, test_module, enable_prefab_system=False) @pytest.mark.parametrize("launcher_platform", ['windows']) def test_DynamicSliceInstanceSpawner_External_E2E_Launcher(self, workspace, launcher, level, @@ -261,7 +261,7 @@ class TestAutomationE2E(TestAutomationBase): file_system.delete([os.path.join(workspace.paths.engine_root(), project, "Levels", level)], True, True) from .EditorScripts import LayerBlender_E2E_Editor as test_module - self._run_test(request, workspace, editor, test_module) + self._run_test(request, workspace, editor, test_module, enable_prefab_system=False) @pytest.mark.parametrize("launcher_platform", ['windows']) @pytest.mark.xfail(reason="https://github.com/o3de/o3de/issues/4170") diff --git a/AutomatedTesting/Gem/PythonTests/largeworlds/dyn_veg/TestSuite_Periodic_Optimized.py b/AutomatedTesting/Gem/PythonTests/largeworlds/dyn_veg/TestSuite_Periodic_Optimized.py new file mode 100644 index 0000000000..f87d6567ef --- /dev/null +++ b/AutomatedTesting/Gem/PythonTests/largeworlds/dyn_veg/TestSuite_Periodic_Optimized.py @@ -0,0 +1,23 @@ +""" +Copyright (c) Contributors to the Open 3D Engine Project. +For complete copyright and license terms please see the LICENSE at the root of this distribution. + +SPDX-License-Identifier: Apache-2.0 OR MIT +""" + +import os +import pytest + +import ly_test_tools.environment.file_system as file_system +from ly_test_tools.o3de.editor_test import EditorSingleTest, EditorSharedTest, EditorParallelTest, EditorTestSuite + + +@pytest.mark.SUITE_main +@pytest.mark.parametrize("launcher_platform", ['windows_editor']) +@pytest.mark.parametrize("project", ["AutomatedTesting"]) +class TestAutomation(EditorTestSuite): + + global_extra_cmdline_args = ["-BatchMode", "-autotest_mode"] + + class test_DynVegUtils_TempPrefabCreationWorks(EditorSharedTest): + from .EditorScripts import DynVegUtils_TempPrefabCreationWorks as test_module diff --git a/AutomatedTesting/Gem/PythonTests/largeworlds/gradient_signal/TestSuite_Periodic.py b/AutomatedTesting/Gem/PythonTests/largeworlds/gradient_signal/TestSuite_Periodic.py index 21eecf642c..3ad27eb973 100644 --- a/AutomatedTesting/Gem/PythonTests/largeworlds/gradient_signal/TestSuite_Periodic.py +++ b/AutomatedTesting/Gem/PythonTests/largeworlds/gradient_signal/TestSuite_Periodic.py @@ -20,52 +20,52 @@ class TestAutomation(TestAutomationBase): def test_GradientGenerators_Incompatibilities(self, request, workspace, editor, launcher_platform): from .EditorScripts import GradientGenerators_Incompatibilities as test_module - self._run_test(request, workspace, editor, test_module) + self._run_test(request, workspace, editor, test_module, enable_prefab_system=False) def test_GradientModifiers_Incompatibilities(self, request, workspace, editor, launcher_platform): from .EditorScripts import GradientModifiers_Incompatibilities as test_module - self._run_test(request, workspace, editor, test_module) + self._run_test(request, workspace, editor, test_module, enable_prefab_system=False) def test_GradientPreviewSettings_DefaultPinnedEntityIsSelf(self, request, workspace, editor, launcher_platform): from .EditorScripts import GradientPreviewSettings_DefaultPinnedEntityIsSelf as test_module - self._run_test(request, workspace, editor, test_module) + self._run_test(request, workspace, editor, test_module, enable_prefab_system=False) def test_GradientPreviewSettings_ClearingPinnedEntitySetsPreviewToOrigin(self, request, workspace, editor, launcher_platform): from .EditorScripts import GradientPreviewSettings_ClearingPinnedEntitySetsPreviewToOrigin as test_module - self._run_test(request, workspace, editor, test_module) + self._run_test(request, workspace, editor, test_module, enable_prefab_system=False) def test_GradientSampling_GradientReferencesAddRemoveSuccessfully(self, request, workspace, editor, launcher_platform): from .EditorScripts import GradientSampling_GradientReferencesAddRemoveSuccessfully as test_module - self._run_test(request, workspace, editor, test_module) + self._run_test(request, workspace, editor, test_module, enable_prefab_system=False) def test_GradientSurfaceTagEmitter_ComponentDependencies(self, request, workspace, editor, launcher_platform): from .EditorScripts import GradientSurfaceTagEmitter_ComponentDependencies as test_module - self._run_test(request, workspace, editor, test_module) + self._run_test(request, workspace, editor, test_module, enable_prefab_system=False) def test_GradientSurfaceTagEmitter_SurfaceTagsAddRemoveSuccessfully(self, request, workspace, editor, launcher_platform): from .EditorScripts import GradientSurfaceTagEmitter_SurfaceTagsAddRemoveSuccessfully as test_module - self._run_test(request, workspace, editor, test_module) + self._run_test(request, workspace, editor, test_module, enable_prefab_system=False) def test_GradientTransform_RequiresShape(self, request, workspace, editor, launcher_platform): from .EditorScripts import GradientTransform_RequiresShape as test_module - self._run_test(request, workspace, editor, test_module) + self._run_test(request, workspace, editor, test_module, enable_prefab_system=False) def test_GradientTransform_FrequencyZoomCanBeSetBeyondSliderRange(self, request, workspace, editor, launcher_platform): from .EditorScripts import GradientTransform_FrequencyZoomCanBeSetBeyondSliderRange as test_module - self._run_test(request, workspace, editor, test_module) + self._run_test(request, workspace, editor, test_module, enable_prefab_system=False) def test_GradientTransform_ComponentIncompatibleWithSpawners(self, request, workspace, editor, launcher_platform): from .EditorScripts import GradientTransform_ComponentIncompatibleWithSpawners as test_module - self._run_test(request, workspace, editor, test_module) + self._run_test(request, workspace, editor, test_module, enable_prefab_system=False) def test_GradientTransform_ComponentIncompatibleWithExpectedGradients(self, request, workspace, editor, launcher_platform): from .EditorScripts import GradientTransform_ComponentIncompatibleWithExpectedGradients as test_module - self._run_test(request, workspace, editor, test_module) + self._run_test(request, workspace, editor, test_module, enable_prefab_system=False) def test_ImageGradient_RequiresShape(self, request, workspace, editor, launcher_platform): from .EditorScripts import ImageGradient_RequiresShape as test_module - self._run_test(request, workspace, editor, test_module) + self._run_test(request, workspace, editor, test_module, enable_prefab_system=False) def test_ImageGradient_ProcessedImageAssignedSuccessfully(self, request, workspace, editor, launcher_platform): from .EditorScripts import ImageGradient_ProcessedImageAssignedSuccessfully as test_module - self._run_test(request, workspace, editor, test_module) + self._run_test(request, workspace, editor, test_module, enable_prefab_system=False) diff --git a/AutomatedTesting/Gem/PythonTests/largeworlds/gradient_signal/TestSuite_Periodic_Optimized.py b/AutomatedTesting/Gem/PythonTests/largeworlds/gradient_signal/TestSuite_Periodic_Optimized.py index 514504d324..6ac0658b4d 100644 --- a/AutomatedTesting/Gem/PythonTests/largeworlds/gradient_signal/TestSuite_Periodic_Optimized.py +++ b/AutomatedTesting/Gem/PythonTests/largeworlds/gradient_signal/TestSuite_Periodic_Optimized.py @@ -15,6 +15,8 @@ from ly_test_tools.o3de.editor_test import EditorSingleTest, EditorSharedTest, E @pytest.mark.parametrize("project", ["AutomatedTesting"]) class TestAutomation(EditorTestSuite): + enable_prefab_system = False + class test_GradientGenerators_Incompatibilities(EditorSharedTest): from .EditorScripts import GradientGenerators_Incompatibilities as test_module diff --git a/AutomatedTesting/Gem/PythonTests/largeworlds/landscape_canvas/EditorScripts/AreaNodes_DependentComponentsAdded.py b/AutomatedTesting/Gem/PythonTests/largeworlds/landscape_canvas/EditorScripts/AreaNodes_DependentComponentsAdded.py index 9703423901..c69ce77041 100755 --- a/AutomatedTesting/Gem/PythonTests/largeworlds/landscape_canvas/EditorScripts/AreaNodes_DependentComponentsAdded.py +++ b/AutomatedTesting/Gem/PythonTests/largeworlds/landscape_canvas/EditorScripts/AreaNodes_DependentComponentsAdded.py @@ -96,7 +96,7 @@ def AreaNodes_DependentComponentsAdded(): 'SpawnerAreaNode': [ 'Vegetation Layer Spawner', 'Vegetation Asset List', - 'Vegetation Reference Shape' + 'Shape Reference' ], 'MeshBlockerAreaNode': [ 'Vegetation Layer Blocker (Mesh)', @@ -104,7 +104,7 @@ def AreaNodes_DependentComponentsAdded(): ], 'BlockerAreaNode': [ 'Vegetation Layer Blocker', - 'Vegetation Reference Shape' + 'Shape Reference' ] } diff --git a/AutomatedTesting/Gem/PythonTests/largeworlds/landscape_canvas/EditorScripts/Edit_DisabledNodeDuplication.py b/AutomatedTesting/Gem/PythonTests/largeworlds/landscape_canvas/EditorScripts/Edit_DisabledNodeDuplication.py index 417e093567..4dfc227c53 100755 --- a/AutomatedTesting/Gem/PythonTests/largeworlds/landscape_canvas/EditorScripts/Edit_DisabledNodeDuplication.py +++ b/AutomatedTesting/Gem/PythonTests/largeworlds/landscape_canvas/EditorScripts/Edit_DisabledNodeDuplication.py @@ -82,7 +82,7 @@ def Edit_DisabledNodeDuplication(): nodes = { 'SpawnerAreaNode': 'Vegetation Asset List', 'MeshBlockerAreaNode': 'Mesh', - 'BlockerAreaNode': 'Vegetation Reference Shape', + 'BlockerAreaNode': 'Shape Reference', 'FastNoiseGradientNode': 'Gradient Transform Modifier', 'ImageGradientNode': 'Gradient Transform Modifier', 'PerlinNoiseGradientNode': 'Gradient Transform Modifier', diff --git a/AutomatedTesting/Gem/PythonTests/largeworlds/landscape_canvas/EditorScripts/GradientNodes_DependentComponentsAdded.py b/AutomatedTesting/Gem/PythonTests/largeworlds/landscape_canvas/EditorScripts/GradientNodes_DependentComponentsAdded.py index c04f9f05f6..63df9a6fcb 100755 --- a/AutomatedTesting/Gem/PythonTests/largeworlds/landscape_canvas/EditorScripts/GradientNodes_DependentComponentsAdded.py +++ b/AutomatedTesting/Gem/PythonTests/largeworlds/landscape_canvas/EditorScripts/GradientNodes_DependentComponentsAdded.py @@ -104,7 +104,7 @@ def GradientNodes_DependentComponentsAdded(): # we will be checking for commonComponents = [ 'Gradient Transform Modifier', - 'Vegetation Reference Shape' + 'Shape Reference' ] componentNames = [] for name in gradients: @@ -114,7 +114,7 @@ def GradientNodes_DependentComponentsAdded(): # Create nodes for the gradients that have additional required dependencies and check if # the Entity created by adding the node has the appropriate Component and required - # Gradient Transform Modifier and Vegetation Reference Shape components added automatically to it + # Gradient Transform Modifier and Shape Reference components added automatically to it newGraph = graph.GraphManagerRequestBus(bus.Broadcast, 'GetGraph', newGraphId) x = 10.0 y = 10.0 diff --git a/AutomatedTesting/Gem/PythonTests/largeworlds/landscape_canvas/TestSuite_Main.py b/AutomatedTesting/Gem/PythonTests/largeworlds/landscape_canvas/TestSuite_Main.py index af4855a546..dedc9c70c0 100644 --- a/AutomatedTesting/Gem/PythonTests/largeworlds/landscape_canvas/TestSuite_Main.py +++ b/AutomatedTesting/Gem/PythonTests/largeworlds/landscape_canvas/TestSuite_Main.py @@ -22,8 +22,8 @@ class TestAutomation(TestAutomationBase): def test_LandscapeCanvas_SlotConnections_UpdateComponentReferences(self, request, workspace, editor, launcher_platform): from .EditorScripts import SlotConnections_UpdateComponentReferences as test_module - self._run_test(request, workspace, editor, test_module) + self._run_test(request, workspace, editor, test_module, enable_prefab_system=False) def test_LandscapeCanvas_GradientMixer_NodeConstruction(self, request, workspace, editor, launcher_platform): from .EditorScripts import GradientMixer_NodeConstruction as test_module - self._run_test(request, workspace, editor, test_module) + self._run_test(request, workspace, editor, test_module, enable_prefab_system=False) diff --git a/AutomatedTesting/Gem/PythonTests/largeworlds/landscape_canvas/TestSuite_Main_Optimized.py b/AutomatedTesting/Gem/PythonTests/largeworlds/landscape_canvas/TestSuite_Main_Optimized.py index 1c3652cae9..402df133cb 100644 --- a/AutomatedTesting/Gem/PythonTests/largeworlds/landscape_canvas/TestSuite_Main_Optimized.py +++ b/AutomatedTesting/Gem/PythonTests/largeworlds/landscape_canvas/TestSuite_Main_Optimized.py @@ -18,6 +18,8 @@ from ly_test_tools.o3de.editor_test import EditorSingleTest, EditorSharedTest, E @pytest.mark.parametrize("project", ["AutomatedTesting"]) class TestAutomation(EditorTestSuite): + enable_prefab_system = False + class test_LandscapeCanvas_SlotConnections_UpdateComponentReferences(EditorSharedTest): from .EditorScripts import SlotConnections_UpdateComponentReferences as test_module diff --git a/AutomatedTesting/Gem/PythonTests/largeworlds/landscape_canvas/TestSuite_Periodic.py b/AutomatedTesting/Gem/PythonTests/largeworlds/landscape_canvas/TestSuite_Periodic.py index ef8b3e492b..a719b1a7c0 100644 --- a/AutomatedTesting/Gem/PythonTests/largeworlds/landscape_canvas/TestSuite_Periodic.py +++ b/AutomatedTesting/Gem/PythonTests/largeworlds/landscape_canvas/TestSuite_Periodic.py @@ -33,89 +33,89 @@ class TestAutomation(TestAutomationBase): def test_LandscapeCanvas_AreaNodes_DependentComponentsAdded(self, request, workspace, editor, launcher_platform): from .EditorScripts import AreaNodes_DependentComponentsAdded as test_module - self._run_test(request, workspace, editor, test_module) + self._run_test(request, workspace, editor, test_module, enable_prefab_system=False) def test_LandscapeCanvas_AreaNodes_EntityCreatedOnNodeAdd(self, request, workspace, editor, launcher_platform): from .EditorScripts import AreaNodes_EntityCreatedOnNodeAdd as test_module - self._run_test(request, workspace, editor, test_module) + self._run_test(request, workspace, editor, test_module, enable_prefab_system=False) def test_LandscapeCanvas_AreaNodes_EntityRemovedOnNodeDelete(self, request, workspace, editor, launcher_platform): from .EditorScripts import AreaNodes_EntityRemovedOnNodeDelete as test_module - self._run_test(request, workspace, editor, test_module) + self._run_test(request, workspace, editor, test_module, enable_prefab_system=False) def test_LandscapeCanvas_LayerExtenderNodes_ComponentEntitySync(self, request, workspace, editor, launcher_platform): from .EditorScripts import LayerExtenderNodes_ComponentEntitySync as test_module - self._run_test(request, workspace, editor, test_module) + self._run_test(request, workspace, editor, test_module, enable_prefab_system=False) def test_LandscapeCanvas_Edit_DisabledNodeDuplication(self, request, workspace, editor, launcher_platform): from .EditorScripts import Edit_DisabledNodeDuplication as test_module - self._run_test(request, workspace, editor, test_module) + self._run_test(request, workspace, editor, test_module, enable_prefab_system=False) def test_LandscapeCanvas_Edit_UndoNodeDelete_SliceEntity(self, request, workspace, editor, launcher_platform): from .EditorScripts import Edit_UndoNodeDelete_SliceEntity as test_module - self._run_test(request, workspace, editor, test_module) + self._run_test(request, workspace, editor, test_module, enable_prefab_system=False) def test_LandscapeCanvas_NewGraph_CreatedSuccessfully(self, request, workspace, editor, launcher_platform): from .EditorScripts import NewGraph_CreatedSuccessfully as test_module - self._run_test(request, workspace, editor, test_module) + self._run_test(request, workspace, editor, test_module, enable_prefab_system=False) def test_LandscapeCanvas_Component_AddedRemoved(self, request, workspace, editor, launcher_platform): from .EditorScripts import Component_AddedRemoved as test_module - self._run_test(request, workspace, editor, test_module) + self._run_test(request, workspace, editor, test_module, enable_prefab_system=False) def test_LandscapeCanvas_GraphClosed_OnLevelChange(self, request, workspace, editor, launcher_platform): from .EditorScripts import GraphClosed_OnLevelChange as test_module - self._run_test(request, workspace, editor, test_module) + self._run_test(request, workspace, editor, test_module, enable_prefab_system=False) @pytest.mark.xfail(reason="https://github.com/o3de/o3de/issues/2201") def test_LandscapeCanvas_GraphClosed_OnEntityDelete(self, request, workspace, editor, launcher_platform): from .EditorScripts import GraphClosed_OnEntityDelete as test_module - self._run_test(request, workspace, editor, test_module) + self._run_test(request, workspace, editor, test_module, enable_prefab_system=False) def test_LandscapeCanvas_GraphClosed_TabbedGraphClosesIndependently(self, request, workspace, editor, launcher_platform): from .EditorScripts import GraphClosed_TabbedGraph as test_module - self._run_test(request, workspace, editor, test_module) + self._run_test(request, workspace, editor, test_module, enable_prefab_system=False) def test_LandscapeCanvas_Slice_CreateInstantiate(self, request, workspace, editor, remove_test_slice, launcher_platform): from .EditorScripts import Slice_CreateInstantiate as test_module - self._run_test(request, workspace, editor, test_module) + self._run_test(request, workspace, editor, test_module, enable_prefab_system=False) def test_LandscapeCanvas_GradientModifierNodes_EntityCreatedOnNodeAdd(self, request, workspace, editor, launcher_platform): from .EditorScripts import GradientModifierNodes_EntityCreatedOnNodeAdd as test_module - self._run_test(request, workspace, editor, test_module) + self._run_test(request, workspace, editor, test_module, enable_prefab_system=False) def test_LandscapeCanvas_GradientModifierNodes_EntityRemovedOnNodeDelete(self, request, workspace, editor, launcher_platform): from .EditorScripts import GradientModifierNodes_EntityRemovedOnNodeDelete as test_module - self._run_test(request, workspace, editor, test_module) + self._run_test(request, workspace, editor, test_module, enable_prefab_system=False) def test_LandscapeCanvas_GradientNodes_DependentComponentsAdded(self, request, workspace, editor, launcher_platform): from .EditorScripts import GradientNodes_DependentComponentsAdded as test_module - self._run_test(request, workspace, editor, test_module) + self._run_test(request, workspace, editor, test_module, enable_prefab_system=False) def test_LandscapeCanvas_GradientNodes_EntityCreatedOnNodeAdd(self, request, workspace, editor, launcher_platform): from .EditorScripts import GradientNodes_EntityCreatedOnNodeAdd as test_module - self._run_test(request, workspace, editor, test_module) + self._run_test(request, workspace, editor, test_module, enable_prefab_system=False) def test_LandscapeCanvas_GradientNodes_EntityRemovedOnNodeDelete(self, request, workspace, editor, launcher_platform): from .EditorScripts import GradientNodes_EntityRemovedOnNodeDelete as test_module - self._run_test(request, workspace, editor, test_module) + self._run_test(request, workspace, editor, test_module, enable_prefab_system=False) def test_LandscapeCanvas_GraphUpdates_UpdateComponents(self, request, workspace, editor, launcher_platform): from .EditorScripts import GraphUpdates_UpdateComponents as test_module - self._run_test(request, workspace, editor, test_module) + self._run_test(request, workspace, editor, test_module, enable_prefab_system=False) def test_LandscapeCanvas_ComponentUpdates_UpdateGraph(self, request, workspace, editor, launcher_platform): from .EditorScripts import ComponentUpdates_UpdateGraph as test_module - self._run_test(request, workspace, editor, test_module) + self._run_test(request, workspace, editor, test_module, enable_prefab_system=False) def test_LandscapeCanvas_LayerBlender_NodeConstruction(self, request, workspace, editor, launcher_platform): from .EditorScripts import LayerBlender_NodeConstruction as test_module - self._run_test(request, workspace, editor, test_module) + self._run_test(request, workspace, editor, test_module, enable_prefab_system=False) def test_LandscapeCanvas_ShapeNodes_EntityCreatedOnNodeAdd(self, request, workspace, editor, launcher_platform): from .EditorScripts import ShapeNodes_EntityCreatedOnNodeAdd as test_module - self._run_test(request, workspace, editor, test_module) + self._run_test(request, workspace, editor, test_module, enable_prefab_system=False) def test_LandscapeCanvas_ShapeNodes_EntityRemovedOnNodeDelete(self, request, workspace, editor, launcher_platform): from .EditorScripts import ShapeNodes_EntityRemovedOnNodeDelete as test_module - self._run_test(request, workspace, editor, test_module) + self._run_test(request, workspace, editor, test_module, enable_prefab_system=False) diff --git a/AutomatedTesting/Gem/PythonTests/largeworlds/large_worlds_utils/editor_dynveg_test_helper.py b/AutomatedTesting/Gem/PythonTests/largeworlds/large_worlds_utils/editor_dynveg_test_helper.py index 957536fffb..37afeff8c0 100755 --- a/AutomatedTesting/Gem/PythonTests/largeworlds/large_worlds_utils/editor_dynveg_test_helper.py +++ b/AutomatedTesting/Gem/PythonTests/largeworlds/large_worlds_utils/editor_dynveg_test_helper.py @@ -8,17 +8,58 @@ import os import sys +from pathlib import Path +import azlmbr.areasystem as areasystem import azlmbr.asset as asset import azlmbr.bus as bus import azlmbr.components as components import azlmbr.math as math -import azlmbr.vegetation as vegetation -import azlmbr.areasystem as areasystem import azlmbr.paths +import azlmbr.prefab as prefab +import azlmbr.vegetation as vegetation sys.path.append(os.path.join(azlmbr.paths.projectroot, 'Gem', 'PythonTests')) import editor_python_test_tools.hydra_editor_utils as hydra +from editor_python_test_tools.editor_entity_utils import EditorEntity +from editor_python_test_tools.prefab_utils import Prefab + + +def create_temp_mesh_prefab(mesh_asset_path, prefab_filename): + # Create initial entity + root = EditorEntity.create_editor_entity(name=prefab_filename) + assert root.exists(), "Failed to create entity" + # Add mesh component + mesh_component = root.add_component("Mesh") + assert root.has_component("Mesh") and mesh_component.is_enabled(), "Failed to add/activate Mesh component" + # Assign the specified mesh asset + mesh_asset = asset.AssetCatalogRequestBus(bus.Broadcast, "GetAssetIdByPath", mesh_asset_path, math.Uuid(), False) + mesh_component.set_component_property_value("Controller|Configuration|Mesh Asset", mesh_asset) + assert mesh_component.get_component_property_value("Controller|Configuration|Mesh Asset") == mesh_asset, \ + "Failed to set Mesh asset" + # Create and return the temporary/in-memory prefab + temp_prefab = Prefab.create_prefab([root], prefab_filename) + return temp_prefab + + +def create_temp_physx_mesh_collider(physx_mesh_id, prefab_filename): + # Create initial entity + root = EditorEntity.create_editor_entity(name=prefab_filename) + assert root.exists(), "Failed to create entity" + # Add PhysX Collider component + collider_component = root.add_component("PhysX Collider") + assert root.has_component("PhysX Collider") and collider_component.is_enabled(), \ + "Failed to add/activate PhysX Collider component" + # Set the Collider's Shape Configuration field to PhysicsAsset, and assign the specified PhysX Mesh asset + collider_component.set_component_property_value("Shape Configuration|Shape", 7) + assert collider_component.get_component_property_value("Shape Configuration|Shape") == 7, \ + "Failed to set Collider Shape to PhysicsAsset" + collider_component.set_component_property_value("Shape Configuration|Asset|PhysX Mesh", physx_mesh_id) + assert collider_component.get_component_property_value("Shape Configuration|Asset|PhysX Mesh") == physx_mesh_id, \ + "Failed to assign PhysX Mesh asset" + # Create and return the temporary/in-memory prefab + temp_prefab = Prefab.create_prefab([root], prefab_filename) + return temp_prefab def create_surface_entity(name, center_point, box_size_x, box_size_y, box_size_z): @@ -52,7 +93,7 @@ def create_mesh_surface_entity_with_slopes(name, center_point, uniform_scale): return surface_entity -def create_vegetation_area(name, center_point, box_size_x, box_size_y, box_size_z, dynamic_slice_asset_path): +def create_dynamic_slice_vegetation_area(name, center_point, box_size_x, box_size_y, box_size_z, dynamic_slice_asset_path): # Create a vegetation area entity to use as our test vegetation spawner spawner_entity = hydra.Entity(name) spawner_entity.create_entity( @@ -65,14 +106,48 @@ def create_vegetation_area(name, center_point, box_size_x, box_size_y, box_size_ box_size_z)) # Set the vegetation area to a Dynamic Slice spawner with a specific slice asset selected + descriptor = hydra.get_component_property_value(spawner_entity.components[2], 'Configuration|Embedded Assets|[0]') dynamic_slice_spawner = vegetation.DynamicSliceInstanceSpawner() dynamic_slice_spawner.SetSliceAssetPath(dynamic_slice_asset_path) - descriptor = hydra.get_component_property_value(spawner_entity.components[2], 'Configuration|Embedded Assets|[0]') descriptor.spawner = dynamic_slice_spawner spawner_entity.get_set_test(2, "Configuration|Embedded Assets|[0]", descriptor) return spawner_entity +def create_prefab_vegetation_area(name, center_point, box_size_x, box_size_y, box_size_z, target_prefab): + # Create a vegetation area entity to use as our test vegetation spawner + spawner_entity = hydra.Entity(name) + spawner_entity.create_entity( + center_point, + ["Vegetation Layer Spawner", "Box Shape", "Vegetation Asset List"] + ) + if spawner_entity.id.IsValid(): + print(f"'{spawner_entity.name}' created") + spawner_entity.get_set_test(1, "Box Shape|Box Configuration|Dimensions", math.Vector3(box_size_x, box_size_y, + box_size_z)) + # Get the in-memory spawnable asset id if exists + spawnable_name = Path(target_prefab.file_path).stem + spawnable_asset_id = prefab.PrefabPublicRequestBus(bus.Broadcast, 'GetInMemorySpawnableAssetId', + spawnable_name) + + # Create the in-memory spawnable asset from given prefab if the spawnable does not exist + if not spawnable_asset_id.is_valid(): + create_spawnable_result = prefab.PrefabPublicRequestBus(bus.Broadcast, 'CreateInMemorySpawnableAsset', + target_prefab.file_path, + spawnable_name) + assert create_spawnable_result.IsSuccess(), \ + f"Prefab operation 'CreateInMemorySpawnableAssets' failed. Error: {create_spawnable_result.GetError()}" + spawnable_asset_id = create_spawnable_result.GetValue() + + # Set the vegetation area to a prefab instance spawner with a specific prefab asset selected + descriptor = hydra.get_component_property_value(spawner_entity.components[2], 'Configuration|Embedded Assets|[0]') + prefab_spawner = vegetation.PrefabInstanceSpawner() + prefab_spawner.SetPrefabAssetId(spawnable_asset_id) + descriptor.spawner = prefab_spawner + spawner_entity.get_set_test(2, "Configuration|Embedded Assets|[0]", descriptor) + return spawner_entity + + def create_blocker_area(name, center_point, box_size_x, box_size_y, box_size_z): # Create a Vegetation Layer Blocker area blocker_entity = hydra.Entity(name) diff --git a/AutomatedTesting/Gem/PythonTests/scripting/TestSuite_Periodic.py b/AutomatedTesting/Gem/PythonTests/scripting/TestSuite_Periodic.py index b2001e6825..27af63ddbc 100755 --- a/AutomatedTesting/Gem/PythonTests/scripting/TestSuite_Periodic.py +++ b/AutomatedTesting/Gem/PythonTests/scripting/TestSuite_Periodic.py @@ -27,15 +27,15 @@ TEST_DIRECTORY = os.path.dirname(__file__) class TestAutomation(TestAutomationBase): def test_Pane_HappyPath_OpenCloseSuccessfully(self, request, workspace, editor, launcher_platform): from . import Pane_HappyPath_OpenCloseSuccessfully as test_module - self._run_test(request, workspace, editor, test_module) + self._run_test(request, workspace, editor, test_module, enable_prefab_system=False) def test_Pane_HappyPath_DocksProperly(self, request, workspace, editor, launcher_platform): from . import Pane_HappyPath_DocksProperly as test_module - self._run_test(request, workspace, editor, test_module) + self._run_test(request, workspace, editor, test_module, enable_prefab_system=False) def test_Pane_HappyPath_ResizesProperly(self, request, workspace, editor, launcher_platform): from . import Pane_HappyPath_ResizesProperly as test_module - self._run_test(request, workspace, editor, test_module) + self._run_test(request, workspace, editor, test_module, enable_prefab_system=False) @pytest.mark.xfail(reason="Test fails to find expected lines, it needs to be fixed.") @pytest.mark.parametrize("level", ["tmp_level"]) @@ -45,7 +45,7 @@ class TestAutomation(TestAutomationBase): request.addfinalizer(teardown) file_system.delete([os.path.join(workspace.paths.project(), "Levels", level)], True, True) from . import ScriptCanvas_TwoComponents_InteractSuccessfully as test_module - self._run_test(request, workspace, editor, test_module) + self._run_test(request, workspace, editor, test_module, enable_prefab_system=False) @pytest.mark.xfail(reason="Test fails to find expected lines, it needs to be fixed.") @pytest.mark.parametrize("level", ["tmp_level"]) @@ -55,15 +55,15 @@ class TestAutomation(TestAutomationBase): request.addfinalizer(teardown) file_system.delete([os.path.join(workspace.paths.project(), "Levels", level)], True, True) from . import ScriptCanvas_ChangingAssets_ComponentStable as test_module - self._run_test(request, workspace, editor, test_module) + self._run_test(request, workspace, editor, test_module, enable_prefab_system=False) def test_Graph_HappyPath_ZoomInZoomOut(self, request, workspace, editor, launcher_platform): from . import Graph_HappyPath_ZoomInZoomOut as test_module - self._run_test(request, workspace, editor, test_module) + self._run_test(request, workspace, editor, test_module, enable_prefab_system=False) def test_NodePalette_HappyPath_CanSelectNode(self, request, workspace, editor, launcher_platform): from . import NodePalette_HappyPath_CanSelectNode as test_module - self._run_test(request, workspace, editor, test_module) + self._run_test(request, workspace, editor, test_module, enable_prefab_system=False) @pytest.mark.xfail(reason="Test fails to find expected lines, it needs to be fixed.") @pytest.mark.parametrize("level", ["tmp_level"]) @@ -73,11 +73,11 @@ class TestAutomation(TestAutomationBase): request.addfinalizer(teardown) file_system.delete([os.path.join(workspace.paths.project(), "Levels", level)], True, True) from . import ScriptCanvasComponent_OnEntityActivatedDeactivated_PrintMessage as test_module - self._run_test(request, workspace, editor, test_module) + self._run_test(request, workspace, editor, test_module, enable_prefab_system=False) def test_NodePalette_HappyPath_ClearSelection(self, request, workspace, editor, launcher_platform, project): from . import NodePalette_HappyPath_ClearSelection as test_module - self._run_test(request, workspace, editor, test_module) + self._run_test(request, workspace, editor, test_module, enable_prefab_system=False) @pytest.mark.xfail(reason="Test fails to find expected lines, it needs to be fixed.") @pytest.mark.parametrize("level", ["tmp_level"]) @@ -87,7 +87,7 @@ class TestAutomation(TestAutomationBase): request.addfinalizer(teardown) file_system.delete([os.path.join(workspace.paths.project(), "Levels", level)], True, True) from . import ScriptCanvas_TwoEntities_UseSimultaneously as test_module - self._run_test(request, workspace, editor, test_module) + self._run_test(request, workspace, editor, test_module, enable_prefab_system=False) def test_ScriptEvent_HappyPath_CreatedWithoutError(self, request, workspace, editor, launcher_platform, project): def teardown(): @@ -99,19 +99,19 @@ class TestAutomation(TestAutomationBase): [os.path.join(workspace.paths.project(), "ScriptCanvas", "test_file.scriptevent")], True, True ) from . import ScriptEvent_HappyPath_CreatedWithoutError as test_module - self._run_test(request, workspace, editor, test_module) + self._run_test(request, workspace, editor, test_module, enable_prefab_system=False) def test_ScriptCanvasTools_Toggle_OpenCloseSuccess(self, request, workspace, editor, launcher_platform): from . import ScriptCanvasTools_Toggle_OpenCloseSuccess as test_module - self._run_test(request, workspace, editor, test_module) + self._run_test(request, workspace, editor, test_module, enable_prefab_system=False) def test_NodeInspector_HappyPath_VariableRenames(self, request, workspace, editor, launcher_platform, project): from . import NodeInspector_HappyPath_VariableRenames as test_module - self._run_test(request, workspace, editor, test_module) + self._run_test(request, workspace, editor, test_module, enable_prefab_system=False) def test_Debugger_HappyPath_TargetMultipleGraphs(self, request, workspace, editor, launcher_platform, project): from . import Debugger_HappyPath_TargetMultipleGraphs as test_module - self._run_test(request, workspace, editor, test_module) + self._run_test(request, workspace, editor, test_module, enable_prefab_system=False) @pytest.mark.parametrize("level", ["tmp_level"]) def test_Debugger_HappyPath_TargetMultipleEntities(self, request, workspace, editor, launcher_platform, project, level): @@ -120,16 +120,16 @@ class TestAutomation(TestAutomationBase): request.addfinalizer(teardown) file_system.delete([os.path.join(workspace.paths.project(), "Levels", level)], True, True) from . import Debugger_HappyPath_TargetMultipleEntities as test_module - self._run_test(request, workspace, editor, test_module) + self._run_test(request, workspace, editor, test_module, enable_prefab_system=False) @pytest.mark.xfail(reason="Test fails to find expected lines, it needs to be fixed.") def test_EditMenu_Default_UndoRedo(self, request, workspace, editor, launcher_platform, project): from . import EditMenu_Default_UndoRedo as test_module - self._run_test(request, workspace, editor, test_module) + self._run_test(request, workspace, editor, test_module, enable_prefab_system=False) def test_Pane_Undocked_ClosesSuccessfully(self, request, workspace, editor, launcher_platform): from . import Pane_Undocked_ClosesSuccessfully as test_module - self._run_test(request, workspace, editor, test_module) + self._run_test(request, workspace, editor, test_module, enable_prefab_system=False) @pytest.mark.parametrize("level", ["tmp_level"]) def test_Entity_HappyPath_AddScriptCanvasComponent(self, request, workspace, editor, launcher_platform, project, level): @@ -138,11 +138,11 @@ class TestAutomation(TestAutomationBase): request.addfinalizer(teardown) file_system.delete([os.path.join(workspace.paths.project(), "Levels", level)], True, True) from . import Entity_HappyPath_AddScriptCanvasComponent as test_module - self._run_test(request, workspace, editor, test_module) + self._run_test(request, workspace, editor, test_module, enable_prefab_system=False) def test_Pane_Default_RetainOnSCRestart(self, request, workspace, editor, launcher_platform): from . import Pane_Default_RetainOnSCRestart as test_module - self._run_test(request, workspace, editor, test_module) + self._run_test(request, workspace, editor, test_module, enable_prefab_system=False) @pytest.mark.xfail(reason="Test fails to find expected lines, it needs to be fixed.") @pytest.mark.parametrize("level", ["tmp_level"]) @@ -152,7 +152,7 @@ class TestAutomation(TestAutomationBase): request.addfinalizer(teardown) file_system.delete([os.path.join(workspace.paths.project(), "Levels", level)], True, True) from . import ScriptEvents_HappyPath_SendReceiveAcrossMultiple as test_module - self._run_test(request, workspace, editor, test_module) + self._run_test(request, workspace, editor, test_module, enable_prefab_system=False) @pytest.mark.xfail(reason="Test fails to find expected lines, it needs to be fixed.") @pytest.mark.parametrize("level", ["tmp_level"]) @@ -162,7 +162,7 @@ class TestAutomation(TestAutomationBase): request.addfinalizer(teardown) file_system.delete([os.path.join(workspace.paths.project(), "Levels", level)], True, True) from . import ScriptEvents_Default_SendReceiveSuccessfully as test_module - self._run_test(request, workspace, editor, test_module) + self._run_test(request, workspace, editor, test_module, enable_prefab_system=False) @pytest.mark.xfail(reason="Test fails to find expected lines, it needs to be fixed.") @pytest.mark.parametrize("level", ["tmp_level"]) @@ -172,24 +172,24 @@ class TestAutomation(TestAutomationBase): request.addfinalizer(teardown) file_system.delete([os.path.join(workspace.paths.project(), "Levels", level)], True, True) from . import ScriptEvents_ReturnSetType_Successfully as test_module - self._run_test(request, workspace, editor, test_module) + self._run_test(request, workspace, editor, test_module, enable_prefab_system=False) def test_NodeCategory_ExpandOnClick(self, request, workspace, editor, launcher_platform): from . import NodeCategory_ExpandOnClick as test_module - self._run_test(request, workspace, editor, test_module) + self._run_test(request, workspace, editor, test_module, enable_prefab_system=False) def test_NodePalette_SearchText_Deletion(self, request, workspace, editor, launcher_platform): from . import NodePalette_SearchText_Deletion as test_module - self._run_test(request, workspace, editor, test_module) + self._run_test(request, workspace, editor, test_module, enable_prefab_system=False) @pytest.mark.xfail(reason="Test fails to find expected lines, it needs to be fixed.") def test_VariableManager_UnpinVariableType_Works(self, request, workspace, editor, launcher_platform): from . import VariableManager_UnpinVariableType_Works as test_module - self._run_test(request, workspace, editor, test_module) + self._run_test(request, workspace, editor, test_module, enable_prefab_system=False) def test_Node_HappyPath_DuplicateNode(self, request, workspace, editor, launcher_platform): from . import Node_HappyPath_DuplicateNode as test_module - self._run_test(request, workspace, editor, test_module) + self._run_test(request, workspace, editor, test_module, enable_prefab_system=False) def test_ScriptEvent_AddRemoveParameter_ActionsSuccessful(self, request, workspace, editor, launcher_platform): def teardown(): @@ -201,7 +201,7 @@ class TestAutomation(TestAutomationBase): [os.path.join(workspace.paths.project(), "ScriptCanvas", "test_file.scriptevent")], True, True ) from . import ScriptEvent_AddRemoveParameter_ActionsSuccessful as test_module - self._run_test(request, workspace, editor, test_module) + self._run_test(request, workspace, editor, test_module, enable_prefab_system=False) # NOTE: We had to use hydra_test_utils.py, as TestAutomationBase run_test method # fails because of pyside_utils import @@ -220,7 +220,14 @@ class TestScriptCanvasTests(object): "File->Open action working as expected: True", ] hydra.launch_and_validate_results( - request, TEST_DIRECTORY, editor, "FileMenu_Default_NewAndOpen.py", expected_lines, auto_test_mode=False, timeout=60, + request, + TEST_DIRECTORY, + editor, + "FileMenu_Default_NewAndOpen.py", + expected_lines, + auto_test_mode=False, + timeout=60, + enable_prefab_system=False, ) @pytest.mark.xfail(reason="Test fails to find expected lines, it needs to be fixed.") @@ -239,6 +246,7 @@ class TestScriptCanvasTests(object): expected_lines, auto_test_mode=False, timeout=60, + enable_prefab_system=False, ) def test_GraphClose_Default_SavePrompt(self, request, editor, launcher_platform): @@ -255,6 +263,7 @@ class TestScriptCanvasTests(object): expected_lines, auto_test_mode=False, timeout=60, + enable_prefab_system=False, ) def test_VariableManager_Default_CreateDeleteVars(self, request, editor, launcher_platform): @@ -269,6 +278,7 @@ class TestScriptCanvasTests(object): expected_lines, auto_test_mode=False, timeout=60, + enable_prefab_system=False, ) @pytest.mark.parametrize( @@ -304,6 +314,7 @@ class TestScriptCanvasTests(object): cfg_args=[config.get('cfg_args')], auto_test_mode=False, timeout=60, + enable_prefab_system=False, ) @pytest.mark.xfail(reason="Test fails to find expected lines, it needs to be fixed.") @@ -332,6 +343,7 @@ class TestScriptCanvasTests(object): expected_lines, auto_test_mode=False, timeout=60, + enable_prefab_system=False, ) @pytest.mark.xfail(reason="Test fails to find expected lines, it needs to be fixed.") @@ -359,5 +371,6 @@ class TestScriptCanvasTests(object): expected_lines, auto_test_mode=False, timeout=60, + enable_prefab_system=False, ) \ No newline at end of file diff --git a/AutomatedTesting/Gem/PythonTests/scripting/TestSuite_Sandbox.py b/AutomatedTesting/Gem/PythonTests/scripting/TestSuite_Sandbox.py index 91b01d8d08..071ae2286c 100644 --- a/AutomatedTesting/Gem/PythonTests/scripting/TestSuite_Sandbox.py +++ b/AutomatedTesting/Gem/PythonTests/scripting/TestSuite_Sandbox.py @@ -23,4 +23,4 @@ class TestAutomation(TestAutomationBase): def test_Opening_Closing_Pane(self, request, workspace, editor, launcher_platform): from . import Opening_Closing_Pane as test_module - self._run_test(request, workspace, editor, test_module) + self._run_test(request, workspace, editor, test_module, enable_prefab_system=False) diff --git a/AutomatedTesting/Gem/PythonTests/smoke/CMakeLists.txt b/AutomatedTesting/Gem/PythonTests/smoke/CMakeLists.txt index 3fc4f3db0e..69d411536f 100644 --- a/AutomatedTesting/Gem/PythonTests/smoke/CMakeLists.txt +++ b/AutomatedTesting/Gem/PythonTests/smoke/CMakeLists.txt @@ -31,35 +31,6 @@ if(PAL_TRAIT_BUILD_TESTS_SUPPORTED AND PAL_TRAIT_BUILD_HOST_TOOLS) Smoke ) - ly_add_pytest( - NAME AutomatedTesting::LoadLevelGPU - TEST_SUITE smoke - TEST_SERIAL - TEST_REQUIRES gpu - PATH ${CMAKE_CURRENT_LIST_DIR}/test_RemoteConsole_GPULoadLevel_Works.py - TIMEOUT 100 - RUNTIME_DEPENDENCIES - AZ::AssetProcessor - AZ::PythonBindingsExample - AutomatedTesting.GameLauncher - AutomatedTesting.Assets - COMPONENT - Smoke - ) - - ly_add_pytest( - NAME AutomatedTesting::EditorTestWithGPU - TEST_REQUIRES gpu - PATH ${CMAKE_CURRENT_LIST_DIR}/test_Editor_NewExistingLevels_Works.py - TIMEOUT 100 - RUNTIME_DEPENDENCIES - AZ::AssetProcessor - AZ::PythonBindingsExample - Legacy::Editor - AutomatedTesting.GameLauncher - AutomatedTesting.Assets - ) - ly_add_pytest( NAME AutomatedTesting::GameLauncherWithGPU TEST_SUITE sandbox diff --git a/AutomatedTesting/Gem/PythonTests/smoke/Editor_NewExistingLevels_Works.py b/AutomatedTesting/Gem/PythonTests/smoke/Editor_NewExistingLevels_Works.py deleted file mode 100644 index 71956488fc..0000000000 --- a/AutomatedTesting/Gem/PythonTests/smoke/Editor_NewExistingLevels_Works.py +++ /dev/null @@ -1,143 +0,0 @@ -""" -Copyright (c) Contributors to the Open 3D Engine Project. -For complete copyright and license terms please see the LICENSE at the root of this distribution. - -SPDX-License-Identifier: Apache-2.0 OR MIT - - -Test Case Title: Create Test for UI apps- Editor -""" - - -class Tests(): - level_created = ("Level created", "Failed to create level") - entity_found = ("New Entity created in level", "Failed to create New Entity in level") - mesh_added = ("Mesh Component added", "Failed to add Mesh Component") - enter_game_mode = ("Game Mode successfully entered", "Failed to enter in Game Mode") - exit_game_mode = ("Game Mode successfully exited", "Failed to exit in Game Mode") - level_opened = ("Level opened successfully", "Failed to open level") - level_exported = ("Level exported successfully", "Failed to export level") - mesh_removed = ("Mesh Component removed", "Failed to remove Mesh Component") - entity_deleted = ("Entity deleted", "Failed to delete Entity") - level_edits_present = ("Level edits persist after saving", "Failed to save level edits after saving") - - -def Editor_NewExistingLevels_Works(): - """ - Summary: Perform the below operations on Editor - - 1) Launch & Close editor - 2) Create new level - 3) Saving and loading levels - 4) Level edits persist after saving - 5) Export Level - 6) Can switch to play mode (ctrl+g) and exit that - 7) Run editor python bindings test - 8) Create an Entity - 9) Delete an Entity - 10) Add a component to an Entity - - Expected Behavior: - All operations succeed and do not cause a crash - - Test Steps: - 1) Launch editor and Create a new level - 2) Create a new entity - 3) Add Mesh component - 4) Verify enter/exit game mode - 5) Save, Load and Export level - 6) Remove Mesh component - 7) Delete entity - 8) Open an existing level - 9) Create a new entity in an existing level - 10) Save, Load and Export an existing level and close editor - - Note: - - This test file must be called from the O3DE Editor command terminal - - Any passed and failed tests are written to the Editor.log file. - Parsing the file or running a log_monitor are required to observe the test results. - - :return: None - """ - - import os - import editor_python_test_tools.hydra_editor_utils as hydra - from editor_python_test_tools.utils import TestHelper as helper - from editor_python_test_tools.utils import Report - import azlmbr.bus as bus - import azlmbr.editor as editor - import azlmbr.legacy.general as general - import azlmbr.math as math - - # 1) Launch editor and Create a new level - helper.init_idle() - test_level_name = "temp_level" - general.create_level_no_prompt(test_level_name, 128, 1, 128, False) - helper.wait_for_condition(lambda: general.get_current_level_name() == test_level_name, 2.0) - Report.result(Tests.level_created, general.get_current_level_name() == test_level_name) - - # 2) Create a new entity - entity_position = math.Vector3(200.0, 200.0, 38.0) - new_entity = hydra.Entity("Entity1") - new_entity.create_entity(entity_position, []) - test_entity = hydra.find_entity_by_name("Entity1") - Report.result(Tests.entity_found, test_entity.IsValid()) - - # 3) Add Mesh component - new_entity.add_component("Mesh") - Report.result(Tests.mesh_added, hydra.has_components(new_entity.id, ["Mesh"])) - - # 4) Verify enter/exit game mode - helper.enter_game_mode(Tests.enter_game_mode) - helper.exit_game_mode(Tests.exit_game_mode) - - # 5) Save, Load and Export level - # Save Level - general.save_level() - # Open Level - general.open_level(test_level_name) - Report.result(Tests.level_opened, general.get_current_level_name() == test_level_name) - # Export Level - general.export_to_engine() - level_pak_file = os.path.join("AutomatedTesting", "Levels", test_level_name, "level.pak") - Report.result(Tests.level_exported, os.path.exists(level_pak_file)) - - # 6) Remove Mesh component - new_entity.remove_component("Mesh") - Report.result(Tests.mesh_removed, not hydra.has_components(new_entity.id, ["Mesh"])) - - # 7) Delete entity - editor.ToolsApplicationRequestBus(bus.Broadcast, "DeleteEntityById", new_entity.id) - test_entity = hydra.find_entity_by_name("Entity1") - Report.result(Tests.entity_deleted, len(test_entity) == 0) - - # 8) Open an existing level - general.open_level(test_level_name) - Report.result(Tests.level_opened, general.get_current_level_name() == test_level_name) - - # 9) Create a new entity in an existing level - entity_position = math.Vector3(200.0, 200.0, 38.0) - new_entity_2 = hydra.Entity("Entity2") - new_entity_2.create_entity(entity_position, []) - test_entity = hydra.find_entity_by_name("Entity2") - Report.result(Tests.entity_found, test_entity.IsValid()) - - # 10) Save, Load and Export an existing level - # Save Level - general.save_level() - # Open Level - general.open_level(test_level_name) - Report.result(Tests.level_opened, general.get_current_level_name() == test_level_name) - entity_id = hydra.find_entity_by_name(new_entity_2.name) - Report.result(Tests.level_edits_present, entity_id == new_entity_2.id) - # Export Level - general.export_to_engine() - level_pak_file = os.path.join("AutomatedTesting", "Levels", test_level_name, "level.pak") - Report.result(Tests.level_exported, os.path.exists(level_pak_file)) - - -if __name__ == "__main__": - - from editor_python_test_tools.utils import Report - - Report.start_test(Editor_NewExistingLevels_Works) diff --git a/AutomatedTesting/Gem/PythonTests/smoke/test_CLITool_SerializeContextTools_Works.py b/AutomatedTesting/Gem/PythonTests/smoke/test_CLITool_SerializeContextTools_Works.py index a3f6b8b09f..917ff17f82 100644 --- a/AutomatedTesting/Gem/PythonTests/smoke/test_CLITool_SerializeContextTools_Works.py +++ b/AutomatedTesting/Gem/PythonTests/smoke/test_CLITool_SerializeContextTools_Works.py @@ -13,7 +13,10 @@ import os import pytest import subprocess +import ly_test_tools + +@pytest.mark.skipif(not ly_test_tools.WINDOWS, reason="Only succeeds on windows https://github.com/o3de/o3de/issues/5539") @pytest.mark.SUITE_smoke class TestCLIToolSerializeContextToolsWorks(object): def test_CLITool_SerializeContextTools_Works(self, build_directory): diff --git a/AutomatedTesting/Gem/PythonTests/smoke/test_Editor_NewExistingLevels_Works.py b/AutomatedTesting/Gem/PythonTests/smoke/test_Editor_NewExistingLevels_Works.py deleted file mode 100644 index 6f654b9107..0000000000 --- a/AutomatedTesting/Gem/PythonTests/smoke/test_Editor_NewExistingLevels_Works.py +++ /dev/null @@ -1,31 +0,0 @@ -""" -Copyright (c) Contributors to the Open 3D Engine Project. -For complete copyright and license terms please see the LICENSE at the root of this distribution. - -SPDX-License-Identifier: Apache-2.0 OR MIT - - -Test should run in both gpu and non gpu -""" - -import pytest -import os -from automatedtesting_shared.base import TestAutomationBase -import ly_test_tools.environment.file_system as file_system - - -@pytest.mark.SUITE_smoke -@pytest.mark.parametrize("launcher_platform", ["windows_editor"]) -@pytest.mark.parametrize("project", ["AutomatedTesting"]) -@pytest.mark.parametrize("level", ["temp_level"]) -class TestAutomation(TestAutomationBase): - def test_Editor_NewExistingLevels_Works(self, request, workspace, editor, level, project, launcher_platform): - def teardown(): - file_system.delete([os.path.join(workspace.paths.engine_root(), project, "Levels", level)], True, True) - - request.addfinalizer(teardown) - file_system.delete([os.path.join(workspace.paths.engine_root(), project, "Levels", level)], True, True) - - from . import Editor_NewExistingLevels_Works as test_module - - self._run_test(request, workspace, editor, test_module) diff --git a/AutomatedTesting/Gem/PythonTests/smoke/test_RemoteConsole_GPULoadLevel_Works.py b/AutomatedTesting/Gem/PythonTests/smoke/test_RemoteConsole_GPULoadLevel_Works.py deleted file mode 100644 index 7debcab938..0000000000 --- a/AutomatedTesting/Gem/PythonTests/smoke/test_RemoteConsole_GPULoadLevel_Works.py +++ /dev/null @@ -1,43 +0,0 @@ -""" -Copyright (c) Contributors to the Open 3D Engine Project. -For complete copyright and license terms please see the LICENSE at the root of this distribution. - -SPDX-License-Identifier: Apache-2.0 OR MIT - - -UI Apps: AutomatedTesting.GameLauncher -Launch AutomatedTesting.GameLauncher with Simple level -Test should run in both gpu and non gpu -""" - -import pytest -import psutil - -import ly_test_tools.environment.waiter as waiter -import editor_python_test_tools.hydra_test_utils as editor_test_utils -from ly_remote_console.remote_console_commands import RemoteConsole as RemoteConsole -from ly_remote_console.remote_console_commands import ( - send_command_and_expect_response as send_command_and_expect_response, -) - - -@pytest.mark.parametrize("launcher_platform", ["windows"]) -@pytest.mark.parametrize("project", ["AutomatedTesting"]) -@pytest.mark.parametrize("level", ["Simple"]) -class TestRemoteConsoleLoadLevelWorks(object): - @pytest.fixture - def remote_console_instance(self, request): - console = RemoteConsole() - - def teardown(): - if console.connected: - console.stop() - - request.addfinalizer(teardown) - - return console - - def test_RemoteConsole_LoadLevel_Works(self, launcher, level, remote_console_instance, launcher_platform): - expected_lines = ['Level system is loading "Simple"'] - - editor_test_utils.launch_and_validate_results_launcher(launcher, level, remote_console_instance, expected_lines, null_renderer=False) diff --git a/AutomatedTesting/Gem/Sponza/.gitignore b/AutomatedTesting/Gem/Sponza/.gitignore new file mode 100644 index 0000000000..8bbb0be455 --- /dev/null +++ b/AutomatedTesting/Gem/Sponza/.gitignore @@ -0,0 +1,4 @@ +/.maya_data/* +/.mayaSwatches/* +*.swatch +[Uu]ser_env.bat \ No newline at end of file diff --git a/AutomatedTesting/Gem/Sponza/.src/objects/sponza.ma b/AutomatedTesting/Gem/Sponza/.src/objects/sponza.ma new file mode 100644 index 0000000000..1c137a50b7 --- /dev/null +++ b/AutomatedTesting/Gem/Sponza/.src/objects/sponza.ma @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:57848334af0220b7348a8f2583080acf1d9c139a78c9fb1a93a7d2bce61f3c40 +size 41335413 diff --git a/AutomatedTesting/Gem/Sponza/Assets/Prefabs/test_sponza_material_conversion.prefab b/AutomatedTesting/Gem/Sponza/Assets/Prefabs/test_sponza_material_conversion.prefab new file mode 100644 index 0000000000..92874574e4 --- /dev/null +++ b/AutomatedTesting/Gem/Sponza/Assets/Prefabs/test_sponza_material_conversion.prefab @@ -0,0 +1,1240 @@ +{ + "Source": "Prefabs/test_sponza_material_conversion.prefab", + "ContainerEntity": { + "Id": "ContainerEntity", + "Name": "test_sponza_material_conversion", + "Components": { + "Component_[11355906858588942318]": { + "$type": "EditorEntitySortComponent", + "Id": 11355906858588942318 + }, + "Component_[12303631836799763574]": { + "$type": "EditorEntityIconComponent", + "Id": 12303631836799763574 + }, + "Component_[13884330903538620487]": { + "$type": "SelectionComponent", + "Id": 13884330903538620487 + }, + "Component_[14017626015546393905]": { + "$type": "EditorInspectorComponent", + "Id": 14017626015546393905 + }, + "Component_[15706249274315432595]": { + "$type": "EditorLockComponent", + "Id": 15706249274315432595 + }, + "Component_[17662098699702294917]": { + "$type": "EditorPendingCompositionComponent", + "Id": 17662098699702294917 + }, + "Component_[1984406083399463185]": { + "$type": "EditorOnlyEntityComponent", + "Id": 1984406083399463185 + }, + "Component_[3645983967515381372]": { + "$type": "EditorPrefabComponent", + "Id": 3645983967515381372 + }, + "Component_[7000715958539023355]": { + "$type": "EditorVisibilityComponent", + "Id": 7000715958539023355 + }, + "Component_[7182760741886065388]": { + "$type": "{27F1E1A1-8D9D-4C3B-BD3A-AFB9762449C0} TransformComponent", + "Id": 7182760741886065388, + "Parent Entity": "", + "Cached World Transform Parent": "" + }, + "Component_[7314978375961307600]": { + "$type": "EditorDisabledCompositionComponent", + "Id": 7314978375961307600 + } + }, + "IsDependencyReady": true + }, + "Entities": { + "Entity_[1220355829629]": { + "Id": "Entity_[1220355829629]", + "Name": "GiTestProbe", + "Components": { + "Component_[12581383605035992405]": { + "$type": "SelectionComponent", + "Id": 12581383605035992405 + }, + "Component_[14182862666898786767]": { + "$type": "AZ::Render::EditorReflectionProbeComponent", + "Id": 14182862666898786767, + "Controller": { + "Configuration": { + "OuterHeight": 8.0, + "OuterLength": 8.0, + "OuterWidth": 8.0, + "InnerHeight": 8.0, + "InnerLength": 8.0, + "InnerWidth": 8.0, + "BakedCubeMapRelativePath": "ReflectionProbes/GiTestProbe__0564394E-2435-488E-A30C-E999F79FB049__iblspecularcm256.dds", + "BakedCubeMapAsset": { + "assetId": { + "guid": "{B05482A4-7D4D-5C6D-96DD-54CB9A227307}", + "subId": 2000 + }, + "loadBehavior": "PreLoad", + "assetHint": "reflectionprobes/gitestprobe__0564394e-2435-488e-a30c-e999f79fb049__iblspecularcm256.dds.streamingimage" + }, + "EntityId": 12080580926711778904 + } + }, + "bakedCubeMapRelativePath": "ReflectionProbes/GiTestProbe__0564394E-2435-488E-A30C-E999F79FB049__iblspecularcm256.dds" + }, + "Component_[16557111097824744403]": { + "$type": "EditorBoxShapeComponent", + "Id": 16557111097824744403, + "BoxShape": { + "Configuration": { + "Dimensions": [ + 8.0, + 8.0, + 8.0 + ] + } + } + }, + "Component_[16623349159368925155]": { + "$type": "EditorPendingCompositionComponent", + "Id": 16623349159368925155 + }, + "Component_[17588593493138070858]": { + "$type": "EditorVisibilityComponent", + "Id": 17588593493138070858 + }, + "Component_[18332655128892032441]": { + "$type": "EditorOnlyEntityComponent", + "Id": 18332655128892032441 + }, + "Component_[344586797989012598]": { + "$type": "{27F1E1A1-8D9D-4C3B-BD3A-AFB9762449C0} TransformComponent", + "Id": 344586797989012598, + "Parent Entity": "Entity_[1250420600701]", + "Transform Data": { + "Translate": [ + 0.0, + 0.0, + 4.0 + ] + }, + "Cached World Transform": { + "Translation": [ + 0.0, + 0.0, + 4.099999904632568 + ] + }, + "Cached World Transform Parent": "Entity_[1250420600701]" + }, + "Component_[5703653759245493769]": { + "$type": "EditorLockComponent", + "Id": 5703653759245493769 + }, + "Component_[7030857297912025340]": { + "$type": "EditorDisabledCompositionComponent", + "Id": 7030857297912025340, + "DisabledComponents": [ + { + "$type": "AZ::Render::EditorDiffuseProbeGridComponent", + "Id": 1614505811629141904, + "Controller": { + "Configuration": { + "ProbeSpacing": [ + 0.5, + 0.5, + 0.5 + ], + "Extents": [ + 8.0, + 8.0, + 8.0 + ] + } + }, + "probeSpacingX": 0.5, + "probeSpacingY": 0.5, + "probeSpacingZ": 0.5 + } + ] + }, + "Component_[7984183259827618750]": { + "$type": "EditorEntitySortComponent", + "Id": 7984183259827618750 + }, + "Component_[827806435204448771]": { + "$type": "EditorEntityIconComponent", + "Id": 827806435204448771 + }, + "Component_[8673278437899912468]": { + "$type": "EditorInspectorComponent", + "Id": 8673278437899912468 + } + }, + "IsDependencyReady": true + }, + "Entity_[1224650796925]": { + "Id": "Entity_[1224650796925]", + "Name": "Camera", + "Components": { + "Component_[10395754987446042279]": { + "$type": "AZ::Render::EditorPostFxLayerComponent", + "Id": 10395754987446042279 + }, + "Component_[11895140916889160460]": { + "$type": "EditorEntityIconComponent", + "Id": 11895140916889160460 + }, + "Component_[16880285896855930892]": { + "$type": "{CA11DA46-29FF-4083-B5F6-E02C3A8C3A3D} EditorCameraComponent", + "Id": 16880285896855930892, + "Controller": { + "Configuration": { + "Field of View": 55.0, + "EditorEntityId": 8929576024571800510 + } + } + }, + "Component_[17187464423780271193]": { + "$type": "EditorLockComponent", + "Id": 17187464423780271193 + }, + "Component_[17495696818315413311]": { + "$type": "EditorEntitySortComponent", + "Id": 17495696818315413311 + }, + "Component_[1798550073623453489]": { + "$type": "AZ::Render::EditorExposureControlComponent", + "Id": 1798550073623453489, + "Controller": { + "Configuration": { + "ExposureControlType": 1 + } + } + }, + "Component_[18086214374043522055]": { + "$type": "{27F1E1A1-8D9D-4C3B-BD3A-AFB9762449C0} TransformComponent", + "Id": 18086214374043522055, + "Parent Entity": "Entity_[1250420600701]", + "Transform Data": { + "Translate": [ + 1.7387686967849732, + 1.752368450164795, + 5.225453853607178 + ], + "Rotate": [ + 34.95081329345703, + -29.21880340576172, + 145.06878662109376 + ] + }, + "Cached World Transform": { + "Translation": [ + 1.7387685775756837, + 1.7523683309555054, + 5.325453281402588 + ], + "Rotation": [ + -0.14265206456184388, + -0.3503122329711914, + 0.8573471903800964, + 0.3491239547729492 + ] + }, + "Cached World Transform Parent": "Entity_[1250420600701]" + }, + "Component_[18387556550380114975]": { + "$type": "SelectionComponent", + "Id": 18387556550380114975 + }, + "Component_[2654521436129313160]": { + "$type": "EditorVisibilityComponent", + "Id": 2654521436129313160 + }, + "Component_[5265045084611556958]": { + "$type": "EditorDisabledCompositionComponent", + "Id": 5265045084611556958 + }, + "Component_[7169798125182238623]": { + "$type": "EditorPendingCompositionComponent", + "Id": 7169798125182238623 + }, + "Component_[8866210352157164042]": { + "$type": "EditorInspectorComponent", + "Id": 8866210352157164042 + }, + "Component_[9129253381063760879]": { + "$type": "EditorOnlyEntityComponent", + "Id": 9129253381063760879 + } + }, + "IsDependencyReady": true + }, + "Entity_[1228945764221]": { + "Id": "Entity_[1228945764221]", + "Name": "Global Sky", + "Components": { + "Component_[11231930600558681245]": { + "$type": "AZ::Render::EditorHDRiSkyboxComponent", + "Id": 11231930600558681245, + "Controller": { + "Configuration": { + "CubemapAsset": { + "assetId": { + "guid": "{874DA395-146F-5198-90AD-532F18954407}", + "subId": 1000 + }, + "assetHint": "testdata/white_latlong_iblskyboxcm.exr.streamingimage" + } + } + } + }, + "Component_[11980494120202836095]": { + "$type": "SelectionComponent", + "Id": 11980494120202836095 + }, + "Component_[1428633914413949476]": { + "$type": "EditorLockComponent", + "Id": 1428633914413949476 + }, + "Component_[14936200426671614999]": { + "$type": "AZ::Render::EditorImageBasedLightComponent", + "Id": 14936200426671614999, + "Controller": { + "Configuration": { + "diffuseImageAsset": { + "assetId": { + "guid": "{874DA395-146F-5198-90AD-532F18954407}", + "subId": 3000 + }, + "assetHint": "testdata/white_latlong_iblskyboxcm_ibldiffuse.exr.streamingimage" + }, + "specularImageAsset": { + "assetId": { + "guid": "{874DA395-146F-5198-90AD-532F18954407}", + "subId": 2000 + }, + "assetHint": "testdata/white_latlong_iblskyboxcm_iblspecular.exr.streamingimage" + } + } + } + }, + "Component_[14994774102579326069]": { + "$type": "EditorDisabledCompositionComponent", + "Id": 14994774102579326069 + }, + "Component_[15417479889044493340]": { + "$type": "EditorPendingCompositionComponent", + "Id": 15417479889044493340 + }, + "Component_[15826613364991382688]": { + "$type": "EditorEntitySortComponent", + "Id": 15826613364991382688 + }, + "Component_[1665003113283562343]": { + "$type": "EditorOnlyEntityComponent", + "Id": 1665003113283562343 + }, + "Component_[3704934735944502280]": { + "$type": "EditorEntityIconComponent", + "Id": 3704934735944502280 + }, + "Component_[5698542331457326479]": { + "$type": "EditorVisibilityComponent", + "Id": 5698542331457326479 + }, + "Component_[6644513399057217122]": { + "$type": "{27F1E1A1-8D9D-4C3B-BD3A-AFB9762449C0} TransformComponent", + "Id": 6644513399057217122, + "Parent Entity": "Entity_[1250420600701]", + "Transform Data": { + "Translate": [ + 0.0, + 0.0, + -0.10000000149011612 + ] + }, + "Cached World Transform Parent": "Entity_[1250420600701]" + }, + "Component_[931091830724002070]": { + "$type": "EditorInspectorComponent", + "Id": 931091830724002070 + } + }, + "IsDependencyReady": true + }, + "Entity_[1233240731517]": { + "Id": "Entity_[1233240731517]", + "Name": "Shader Ball", + "Components": { + "Component_[10789351944715265527]": { + "$type": "EditorOnlyEntityComponent", + "Id": 10789351944715265527 + }, + "Component_[12037033284781049225]": { + "$type": "EditorEntitySortComponent", + "Id": 12037033284781049225 + }, + "Component_[13759153306105970079]": { + "$type": "EditorPendingCompositionComponent", + "Id": 13759153306105970079 + }, + "Component_[14135560884830586279]": { + "$type": "EditorInspectorComponent", + "Id": 14135560884830586279 + }, + "Component_[16247165675903986673]": { + "$type": "EditorVisibilityComponent", + "Id": 16247165675903986673 + }, + "Component_[18082433625958885247]": { + "$type": "EditorDisabledCompositionComponent", + "Id": 18082433625958885247 + }, + "Component_[6472623349872972660]": { + "$type": "{27F1E1A1-8D9D-4C3B-BD3A-AFB9762449C0} TransformComponent", + "Id": 6472623349872972660, + "Parent Entity": "Entity_[1250420600701]", + "Transform Data": { + "Rotate": [ + 0.0, + 0.10000000149011612, + 180.0 + ] + }, + "Cached World Transform": { + "Translation": [ + 0.0, + 0.0, + 0.10000000149011612 + ], + "Rotation": [ + 0.0008726645028218627, + 0.0, + 0.9999996423721314, + 0.0 + ] + }, + "Cached World Transform Parent": "Entity_[1250420600701]" + }, + "Component_[6495255223970673916]": { + "$type": "AZ::Render::EditorMeshComponent", + "Id": 6495255223970673916, + "Controller": { + "Configuration": { + "ModelAsset": { + "assetId": { + "guid": "{FD340C30-755C-5911-92A3-19A3F7A77931}", + "subId": 281415304 + }, + "assetHint": "objects/shaderball/shaderball_default_1m.azmodel" + } + } + } + }, + "Component_[8056625192494070973]": { + "$type": "SelectionComponent", + "Id": 8056625192494070973 + }, + "Component_[8550141614185782969]": { + "$type": "EditorEntityIconComponent", + "Id": 8550141614185782969 + }, + "Component_[9439770997198325425]": { + "$type": "EditorLockComponent", + "Id": 9439770997198325425 + } + }, + "IsDependencyReady": true + }, + "Entity_[1237535698813]": { + "Id": "Entity_[1237535698813]", + "Name": "Sun", + "Components": { + "Component_[10440557478882592717]": { + "$type": "SelectionComponent", + "Id": 10440557478882592717 + }, + "Component_[13620450453324765907]": { + "$type": "EditorLockComponent", + "Id": 13620450453324765907 + }, + "Component_[2134313378593666258]": { + "$type": "EditorInspectorComponent", + "Id": 2134313378593666258 + }, + "Component_[234010807770404186]": { + "$type": "EditorVisibilityComponent", + "Id": 234010807770404186 + }, + "Component_[2970359110423865725]": { + "$type": "EditorEntityIconComponent", + "Id": 2970359110423865725 + }, + "Component_[3722854130373041803]": { + "$type": "EditorOnlyEntityComponent", + "Id": 3722854130373041803 + }, + "Component_[5992533738676323195]": { + "$type": "EditorDisabledCompositionComponent", + "Id": 5992533738676323195 + }, + "Component_[7378860763541895402]": { + "$type": "AZ::Render::EditorDirectionalLightComponent", + "Id": 7378860763541895402, + "Controller": { + "Configuration": { + "Intensity": 0.0, + "CameraEntityId": "", + "ShadowFilterMethod": 1 + } + } + }, + "Component_[7892834440890947578]": { + "$type": "{27F1E1A1-8D9D-4C3B-BD3A-AFB9762449C0} TransformComponent", + "Id": 7892834440890947578, + "Parent Entity": "Entity_[1250420600701]", + "Transform Data": { + "Translate": [ + 0.0, + 0.0, + 13.38704299926758 + ], + "Rotate": [ + -76.1310043334961, + -0.8469989895820618, + -15.8100004196167 + ] + }, + "Cached World Transform": { + "Translation": [ + 0.0, + 0.0, + 13.487043380737305 + ], + "Rotation": [ + -0.609886109828949, + -0.09055805951356888, + -0.10376212745904924, + 0.7804304361343384 + ] + }, + "Cached World Transform Parent": "Entity_[1250420600701]" + }, + "Component_[8599729549570828259]": { + "$type": "EditorEntitySortComponent", + "Id": 8599729549570828259 + }, + "Component_[952797371922080273]": { + "$type": "EditorPendingCompositionComponent", + "Id": 952797371922080273 + } + }, + "IsDependencyReady": true + }, + "Entity_[1241830666109]": { + "Id": "Entity_[1241830666109]", + "Name": "Ground", + "Components": { + "Component_[11701138785793981042]": { + "$type": "SelectionComponent", + "Id": 11701138785793981042 + }, + "Component_[12260880513256986252]": { + "$type": "EditorEntityIconComponent", + "Id": 12260880513256986252 + }, + "Component_[13711420870643673468]": { + "$type": "EditorDisabledCompositionComponent", + "Id": 13711420870643673468 + }, + "Component_[138002849734991713]": { + "$type": "EditorOnlyEntityComponent", + "Id": 138002849734991713 + }, + "Component_[16578565737331764849]": { + "$type": "{27F1E1A1-8D9D-4C3B-BD3A-AFB9762449C0} TransformComponent", + "Id": 16578565737331764849, + "Parent Entity": "Entity_[1250420600701]", + "Transform Data": { + "Translate": [ + 0.0, + 0.0, + -0.10000000149011612 + ] + }, + "Cached World Transform Parent": "Entity_[1250420600701]" + }, + "Component_[16919232076966545697]": { + "$type": "EditorInspectorComponent", + "Id": 16919232076966545697 + }, + "Component_[5182430712893438093]": { + "$type": "EditorMaterialComponent", + "Id": 5182430712893438093, + "materialSlots": [ + { + "id": { + "materialAssetId": { + "guid": "{0CD745C0-6AA8-569A-A68A-73A3270986C4}", + "subId": 803645540 + } + } + } + ], + "materialSlotsByLod": [ + [ + { + "id": { + "lodIndex": 0, + "materialAssetId": { + "guid": "{0CD745C0-6AA8-569A-A68A-73A3270986C4}", + "subId": 803645540 + } + } + } + ] + ] + }, + "Component_[5675108321710651991]": { + "$type": "AZ::Render::EditorMeshComponent", + "Id": 5675108321710651991, + "Controller": { + "Configuration": { + "ModelAsset": { + "assetId": { + "guid": "{0CD745C0-6AA8-569A-A68A-73A3270986C4}", + "subId": 277889906 + }, + "assetHint": "objects/groudplane/groundplane_512x512m.azmodel" + } + } + } + }, + "Component_[5681893399601237518]": { + "$type": "EditorEntitySortComponent", + "Id": 5681893399601237518 + }, + "Component_[592692962543397545]": { + "$type": "EditorPendingCompositionComponent", + "Id": 592692962543397545 + }, + "Component_[7090012899106946164]": { + "$type": "EditorLockComponent", + "Id": 7090012899106946164 + }, + "Component_[9410832619875640998]": { + "$type": "EditorVisibilityComponent", + "Id": 9410832619875640998 + } + }, + "IsDependencyReady": true + }, + "Entity_[1246125633405]": { + "Id": "Entity_[1246125633405]", + "Name": "Grid", + "Components": { + "Component_[11443347433215807130]": { + "$type": "EditorEntityIconComponent", + "Id": 11443347433215807130 + }, + "Component_[11779275529534764488]": { + "$type": "SelectionComponent", + "Id": 11779275529534764488 + }, + "Component_[14249419413039427459]": { + "$type": "EditorInspectorComponent", + "Id": 14249419413039427459 + }, + "Component_[15448581635946161318]": { + "$type": "AZ::Render::EditorGridComponent", + "Id": 15448581635946161318, + "Controller": { + "Configuration": { + "primarySpacing": 4.0, + "primaryColor": [ + 0.501960813999176, + 0.501960813999176, + 0.501960813999176 + ], + "secondarySpacing": 0.5, + "secondaryColor": [ + 0.250980406999588, + 0.250980406999588, + 0.250980406999588 + ] + } + } + }, + "Component_[1843303322527297409]": { + "$type": "EditorDisabledCompositionComponent", + "Id": 1843303322527297409 + }, + "Component_[380249072065273654]": { + "$type": "{27F1E1A1-8D9D-4C3B-BD3A-AFB9762449C0} TransformComponent", + "Id": 380249072065273654, + "Parent Entity": "Entity_[1250420600701]", + "Transform Data": { + "Translate": [ + 0.0, + 0.0, + -0.10000000149011612 + ] + }, + "Cached World Transform Parent": "Entity_[1250420600701]" + }, + "Component_[7476660583684339787]": { + "$type": "EditorPendingCompositionComponent", + "Id": 7476660583684339787 + }, + "Component_[7557626501215118375]": { + "$type": "EditorEntitySortComponent", + "Id": 7557626501215118375 + }, + "Component_[7984048488947365511]": { + "$type": "EditorVisibilityComponent", + "Id": 7984048488947365511 + }, + "Component_[8118181039276487398]": { + "$type": "EditorOnlyEntityComponent", + "Id": 8118181039276487398 + }, + "Component_[9189909764215270515]": { + "$type": "EditorLockComponent", + "Id": 9189909764215270515 + } + }, + "IsDependencyReady": true + }, + "Entity_[1250420600701]": { + "Id": "Entity_[1250420600701]", + "Name": "test_sponza_material_conversion", + "Components": { + "Component_[11342679732910125733]": { + "$type": "AZ::Render::EditorMeshComponent", + "Id": 11342679732910125733, + "Controller": { + "Configuration": { + "ModelAsset": { + "assetId": { + "guid": "{7D2F89D6-2634-5EE6-A122-638377C0CB21}", + "subId": 273579101 + }, + "assetHint": "testdata/test_sponza_material_conversion.azmodel" + } + } + } + }, + "Component_[11482250315251448254]": { + "$type": "EditorEntityIconComponent", + "Id": 11482250315251448254 + }, + "Component_[12520362418832404237]": { + "$type": "EditorVisibilityComponent", + "Id": 12520362418832404237 + }, + "Component_[13922696236864086628]": { + "$type": "EditorInspectorComponent", + "Id": 13922696236864086628, + "ComponentOrderEntryArray": [ + { + "ComponentId": 9795135998007712828 + }, + { + "ComponentId": 11342679732910125733, + "SortIndex": 1 + }, + { + "ComponentId": 14504829236779989058, + "SortIndex": 2 + } + ] + }, + "Component_[14504829236779989058]": { + "$type": "EditorMaterialComponent", + "Id": 14504829236779989058, + "Controller": { + "Configuration": { + "materials": [ + { + "Key": { + "materialAssetId": { + "guid": "{7D2F89D6-2634-5EE6-A122-638377C0CB21}", + "subId": 40852248 + } + }, + "Value": { + "MaterialAsset": { + "assetId": { + "guid": "{1D8B391C-DEB3-549E-9A30-14A6989B1B50}" + }, + "assetHint": "testdata/test_sponza_material_conversion_mat_floor.azmaterial" + } + } + }, + { + "Key": { + "materialAssetId": { + "guid": "{7D2F89D6-2634-5EE6-A122-638377C0CB21}", + "subId": 842740826 + } + }, + "Value": { + "MaterialAsset": { + "assetId": { + "guid": "{F3C97FF0-8FC7-5207-9E97-21D680962068}" + } + } + } + }, + { + "Key": { + "materialAssetId": { + "guid": "{7D2F89D6-2634-5EE6-A122-638377C0CB21}", + "subId": 1262202891 + } + }, + "Value": { + "MaterialAsset": { + "assetId": { + "guid": "{AF16DFCF-E1E9-57B9-8F01-A49AAC1962AE}" + } + } + } + }, + { + "Key": { + "materialAssetId": { + "guid": "{7D2F89D6-2634-5EE6-A122-638377C0CB21}", + "subId": 2438226774 + } + }, + "Value": { + "MaterialAsset": { + "assetId": { + "guid": "{4310E0FE-532D-5436-A946-49B2E14B0375}" + } + } + } + }, + { + "Key": { + "materialAssetId": { + "guid": "{7D2F89D6-2634-5EE6-A122-638377C0CB21}", + "subId": 2816279700 + } + }, + "Value": { + "MaterialAsset": { + "assetId": { + "guid": "{6339FEBB-4293-5CEF-809A-2BE072AC94D6}" + }, + "assetHint": "testdata/test_sponza_material_conversion_mat_bricks.azmaterial" + } + } + }, + { + "Key": { + "materialAssetId": { + "guid": "{7D2F89D6-2634-5EE6-A122-638377C0CB21}", + "subId": 3157644117 + } + }, + "Value": { + "MaterialAsset": { + "assetId": { + "guid": "{3EF8BEDB-8DE0-5550-A994-D542086622B7}" + }, + "assetHint": "testdata/test_sponza_material_conversion_mat_arch.azmaterial" + }, + "PropertyOverrides": { + "general.applySpecularAA": { + "$type": "bool", + "Value": true + } + } + } + }, + { + "Key": { + "materialAssetId": { + "guid": "{7D2F89D6-2634-5EE6-A122-638377C0CB21}", + "subId": 3208782114 + } + }, + "Value": { + "MaterialAsset": { + "assetId": { + "guid": "{CCA05CBE-2606-59A3-91A9-E46F97980A38}" + } + } + } + }, + { + "Key": { + "materialAssetId": { + "guid": "{7D2F89D6-2634-5EE6-A122-638377C0CB21}", + "subId": 3591631827 + } + }, + "Value": { + "MaterialAsset": { + "assetId": { + "guid": "{B45DCFD4-6B12-5212-AB92-B64E064155CE}" + } + } + } + }, + { + "Key": { + "materialAssetId": { + "guid": "{7D2F89D6-2634-5EE6-A122-638377C0CB21}", + "subId": 3888291602 + } + }, + "Value": { + "MaterialAsset": { + "assetId": { + "guid": "{E6A159AA-989D-5534-8550-1E002148AC84}" + }, + "assetHint": "testdata/test_sponza_material_conversion_mat_roof.azmaterial" + } + } + } + ] + } + }, + "materialSlots": [ + { + "id": { + "materialAssetId": { + "guid": "{7D2F89D6-2634-5EE6-A122-638377C0CB21}", + "subId": 842740826 + } + }, + "materialAsset": { + "assetId": { + "guid": "{F3C97FF0-8FC7-5207-9E97-21D680962068}" + } + } + }, + { + "id": { + "materialAssetId": { + "guid": "{7D2F89D6-2634-5EE6-A122-638377C0CB21}", + "subId": 3208782114 + } + }, + "materialAsset": { + "assetId": { + "guid": "{CCA05CBE-2606-59A3-91A9-E46F97980A38}" + } + } + }, + { + "id": { + "materialAssetId": { + "guid": "{7D2F89D6-2634-5EE6-A122-638377C0CB21}", + "subId": 3157644117 + } + }, + "materialAsset": { + "assetId": { + "guid": "{3EF8BEDB-8DE0-5550-A994-D542086622B7}" + }, + "assetHint": "testdata/test_sponza_material_conversion_mat_arch.azmaterial" + } + }, + { + "id": { + "materialAssetId": { + "guid": "{7D2F89D6-2634-5EE6-A122-638377C0CB21}", + "subId": 2816279700 + } + }, + "materialAsset": { + "assetId": { + "guid": "{6339FEBB-4293-5CEF-809A-2BE072AC94D6}" + }, + "assetHint": "testdata/test_sponza_material_conversion_mat_bricks.azmaterial" + } + }, + { + "id": { + "materialAssetId": { + "guid": "{7D2F89D6-2634-5EE6-A122-638377C0CB21}", + "subId": 40852248 + } + }, + "materialAsset": { + "assetId": { + "guid": "{1D8B391C-DEB3-549E-9A30-14A6989B1B50}" + }, + "assetHint": "testdata/test_sponza_material_conversion_mat_floor.azmaterial" + } + }, + { + "id": { + "materialAssetId": { + "guid": "{7D2F89D6-2634-5EE6-A122-638377C0CB21}", + "subId": 3888291602 + } + }, + "materialAsset": { + "assetId": { + "guid": "{E6A159AA-989D-5534-8550-1E002148AC84}" + }, + "assetHint": "testdata/test_sponza_material_conversion_mat_roof.azmaterial" + } + }, + { + "id": { + "materialAssetId": { + "guid": "{7D2F89D6-2634-5EE6-A122-638377C0CB21}", + "subId": 2438226774 + } + }, + "materialAsset": { + "assetId": { + "guid": "{4310E0FE-532D-5436-A946-49B2E14B0375}" + } + } + }, + { + "id": { + "materialAssetId": { + "guid": "{7D2F89D6-2634-5EE6-A122-638377C0CB21}", + "subId": 1262202891 + } + }, + "materialAsset": { + "assetId": { + "guid": "{AF16DFCF-E1E9-57B9-8F01-A49AAC1962AE}" + } + } + }, + { + "id": { + "materialAssetId": { + "guid": "{7D2F89D6-2634-5EE6-A122-638377C0CB21}", + "subId": 3591631827 + } + }, + "materialAsset": { + "assetId": { + "guid": "{B45DCFD4-6B12-5212-AB92-B64E064155CE}" + } + } + } + ], + "materialSlotsByLod": [ + [ + { + "id": { + "lodIndex": 0, + "materialAssetId": { + "guid": "{7D2F89D6-2634-5EE6-A122-638377C0CB21}", + "subId": 842740826 + } + }, + "materialAsset": { + "assetId": { + "guid": "{F3C97FF0-8FC7-5207-9E97-21D680962068}" + } + } + }, + { + "id": { + "lodIndex": 0, + "materialAssetId": { + "guid": "{7D2F89D6-2634-5EE6-A122-638377C0CB21}", + "subId": 3208782114 + } + }, + "materialAsset": { + "assetId": { + "guid": "{CCA05CBE-2606-59A3-91A9-E46F97980A38}" + } + } + }, + { + "id": { + "lodIndex": 0, + "materialAssetId": { + "guid": "{7D2F89D6-2634-5EE6-A122-638377C0CB21}", + "subId": 3157644117 + } + }, + "materialAsset": { + "assetId": { + "guid": "{3EF8BEDB-8DE0-5550-A994-D542086622B7}" + }, + "assetHint": "testdata/test_sponza_material_conversion_mat_arch.azmaterial" + } + }, + { + "id": { + "lodIndex": 0, + "materialAssetId": { + "guid": "{7D2F89D6-2634-5EE6-A122-638377C0CB21}", + "subId": 2816279700 + } + }, + "materialAsset": { + "assetId": { + "guid": "{6339FEBB-4293-5CEF-809A-2BE072AC94D6}" + }, + "assetHint": "testdata/test_sponza_material_conversion_mat_bricks.azmaterial" + } + }, + { + "id": { + "lodIndex": 0, + "materialAssetId": { + "guid": "{7D2F89D6-2634-5EE6-A122-638377C0CB21}", + "subId": 40852248 + } + }, + "materialAsset": { + "assetId": { + "guid": "{1D8B391C-DEB3-549E-9A30-14A6989B1B50}" + }, + "assetHint": "testdata/test_sponza_material_conversion_mat_floor.azmaterial" + } + }, + { + "id": { + "lodIndex": 0, + "materialAssetId": { + "guid": "{7D2F89D6-2634-5EE6-A122-638377C0CB21}", + "subId": 3888291602 + } + }, + "materialAsset": { + "assetId": { + "guid": "{E6A159AA-989D-5534-8550-1E002148AC84}" + }, + "assetHint": "testdata/test_sponza_material_conversion_mat_roof.azmaterial" + } + }, + { + "id": { + "lodIndex": 0, + "materialAssetId": { + "guid": "{7D2F89D6-2634-5EE6-A122-638377C0CB21}", + "subId": 2438226774 + } + }, + "materialAsset": { + "assetId": { + "guid": "{4310E0FE-532D-5436-A946-49B2E14B0375}" + } + } + }, + { + "id": { + "lodIndex": 0, + "materialAssetId": { + "guid": "{7D2F89D6-2634-5EE6-A122-638377C0CB21}", + "subId": 1262202891 + } + }, + "materialAsset": { + "assetId": { + "guid": "{AF16DFCF-E1E9-57B9-8F01-A49AAC1962AE}" + } + } + }, + { + "id": { + "lodIndex": 0, + "materialAssetId": { + "guid": "{7D2F89D6-2634-5EE6-A122-638377C0CB21}", + "subId": 3591631827 + } + }, + "materialAsset": { + "assetId": { + "guid": "{B45DCFD4-6B12-5212-AB92-B64E064155CE}" + } + } + } + ] + ] + }, + "Component_[16137637180608547307]": { + "$type": "EditorPendingCompositionComponent", + "Id": 16137637180608547307 + }, + "Component_[17072211258387308642]": { + "$type": "EditorOnlyEntityComponent", + "Id": 17072211258387308642 + }, + "Component_[2587501640342227295]": { + "$type": "EditorDisabledCompositionComponent", + "Id": 2587501640342227295 + }, + "Component_[4820742733748380832]": { + "$type": "SelectionComponent", + "Id": 4820742733748380832 + }, + "Component_[5027382790057670521]": { + "$type": "EditorLockComponent", + "Id": 5027382790057670521 + }, + "Component_[7651519254420083868]": { + "$type": "EditorEntitySortComponent", + "Id": 7651519254420083868, + "ChildEntityOrderEntryArray": [ + { + "EntityId": "Entity_[1246125633405]" + }, + { + "EntityId": "Entity_[1228945764221]", + "SortIndex": 1 + }, + { + "EntityId": "Entity_[1220355829629]", + "SortIndex": 2 + }, + { + "EntityId": "Entity_[1224650796925]", + "SortIndex": 3 + }, + { + "EntityId": "Entity_[1233240731517]", + "SortIndex": 4 + }, + { + "EntityId": "Entity_[1237535698813]", + "SortIndex": 5 + }, + { + "EntityId": "Entity_[1241830666109]", + "SortIndex": 6 + } + ] + }, + "Component_[9795135998007712828]": { + "$type": "{27F1E1A1-8D9D-4C3B-BD3A-AFB9762449C0} TransformComponent", + "Id": 9795135998007712828, + "Parent Entity": "ContainerEntity", + "Cached World Transform": { + "Translation": [ + 0.0, + 0.0, + 0.10000000149011612 + ] + }, + "Cached World Transform Parent": "ContainerEntity" + } + }, + "IsDependencyReady": true + } + } +} \ No newline at end of file diff --git a/AutomatedTesting/Gem/Sponza/Assets/TestData/Test_Sponza_Material_Conversion.fbx b/AutomatedTesting/Gem/Sponza/Assets/TestData/Test_Sponza_Material_Conversion.fbx new file mode 100644 index 0000000000..638828984a --- /dev/null +++ b/AutomatedTesting/Gem/Sponza/Assets/TestData/Test_Sponza_Material_Conversion.fbx @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:9b936b72b5b45b52c188bf9f930d6066af65f0d79ff8abf5dc08927d97ac465e +size 55264 diff --git a/AutomatedTesting/Gem/Sponza/Assets/TestData/Test_Sponza_Material_Conversion_black.material b/AutomatedTesting/Gem/Sponza/Assets/TestData/Test_Sponza_Material_Conversion_black.material new file mode 100644 index 0000000000..cc2c9e785b --- /dev/null +++ b/AutomatedTesting/Gem/Sponza/Assets/TestData/Test_Sponza_Material_Conversion_black.material @@ -0,0 +1,35 @@ +{ + "description": "", + "materialType": "Materials/Types/StandardPBR.materialtype", + "parentMaterial": "", + "propertyLayoutVersion": 3, + "properties": { + "baseColor": { + "color": [ + 0.0, + 0.0, + 0.0, + 1.0 + ] + }, + "emissive": { + "color": [ + 0.0, + 0.0, + 0.0, + 1.0 + ] + }, + "irradiance": { + "color": [ + 0.0, + 0.0, + 0.0, + 1.0 + ] + }, + "opacity": { + "factor": 1.0 + } + } +} \ No newline at end of file diff --git a/AutomatedTesting/Gem/Sponza/Assets/TestData/Test_Sponza_Material_Conversion_green.material b/AutomatedTesting/Gem/Sponza/Assets/TestData/Test_Sponza_Material_Conversion_green.material new file mode 100644 index 0000000000..a4bfb73d12 --- /dev/null +++ b/AutomatedTesting/Gem/Sponza/Assets/TestData/Test_Sponza_Material_Conversion_green.material @@ -0,0 +1,35 @@ +{ + "description": "", + "materialType": "Materials/Types/StandardPBR.materialtype", + "parentMaterial": "", + "propertyLayoutVersion": 3, + "properties": { + "baseColor": { + "color": [ + 0.0, + 1.0, + 0.0, + 1.0 + ] + }, + "emissive": { + "color": [ + 0.0, + 0.0, + 0.0, + 1.0 + ] + }, + "irradiance": { + "color": [ + 0.0, + 1.0, + 0.0, + 1.0 + ] + }, + "opacity": { + "factor": 1.0 + } + } +} \ No newline at end of file diff --git a/AutomatedTesting/Gem/Sponza/Assets/TestData/Test_Sponza_Material_Conversion_mat_arch.material b/AutomatedTesting/Gem/Sponza/Assets/TestData/Test_Sponza_Material_Conversion_mat_arch.material new file mode 100644 index 0000000000..fe9c54bc02 --- /dev/null +++ b/AutomatedTesting/Gem/Sponza/Assets/TestData/Test_Sponza_Material_Conversion_mat_arch.material @@ -0,0 +1,49 @@ +{ + "description": "", + "materialType": "Materials/Types/StandardPBR.materialtype", + "parentMaterial": "", + "propertyLayoutVersion": 3, + "properties": { + "baseColor": { + "color": [ + 0.800000011920929, + 0.800000011920929, + 0.800000011920929, + 1.0 + ], + "textureMap": "Textures/arch_1k_basecolor.png" + }, + "general": { + "applySpecularAA": true + }, + "irradiance": { + "color": [ + 1.0, + 0.885053813457489, + 0.801281750202179, + 1.0 + ] + }, + "metallic": { + "textureMap": "Textures/arch_1k_metallic.png" + }, + "normal": { + "textureMap": "Textures/arch_1k_normal.jpg" + }, + "occlusion": { + "diffuseTextureMap": "Textures/arch_1k_ao.png" + }, + "opacity": { + "factor": 1.0 + }, + "parallax": { + "factor": 0.050999999046325687, + "pdo": true, + "quality": "High", + "useTexture": false + }, + "roughness": { + "textureMap": "Textures/arch_1k_roughness.png" + } + } +} \ No newline at end of file diff --git a/AutomatedTesting/Gem/Sponza/Assets/TestData/Test_Sponza_Material_Conversion_mat_bricks.material b/AutomatedTesting/Gem/Sponza/Assets/TestData/Test_Sponza_Material_Conversion_mat_bricks.material new file mode 100644 index 0000000000..a19afa33e2 --- /dev/null +++ b/AutomatedTesting/Gem/Sponza/Assets/TestData/Test_Sponza_Material_Conversion_mat_bricks.material @@ -0,0 +1,54 @@ +{ + "description": "", + "materialType": "Materials/Types/StandardPBR.materialtype", + "parentMaterial": "", + "propertyLayoutVersion": 3, + "properties": { + "baseColor": { + "color": [ + 0.800000011920929, + 0.800000011920929, + 0.800000011920929, + 1.0 + ], + "textureMap": "Textures/bricks_1k_basecolor.png" + }, + "clearCoat": { + "factor": 0.5, + "normalMap": "Textures/bricks_1k_normal.jpg", + "roughness": 0.5 + }, + "general": { + "applySpecularAA": true + }, + "irradiance": { + "color": [ + 1.0, + 0.9703211784362793, + 0.9703211784362793, + 1.0 + ] + }, + "metallic": { + "textureMap": "Textures/bricks_1k_metallic.png" + }, + "normal": { + "textureMap": "Textures/bricks_1k_normal.jpg" + }, + "occlusion": { + "diffuseTextureMap": "Textures/bricks_1k_ao.png" + }, + "opacity": { + "factor": 1.0 + }, + "parallax": { + "algorithm": "ContactRefinement", + "factor": 0.03500000014901161, + "quality": "Medium", + "useTexture": false + }, + "roughness": { + "textureMap": "Textures/bricks_1k_roughness.png" + } + } +} \ No newline at end of file diff --git a/AutomatedTesting/Gem/Sponza/Assets/TestData/Test_Sponza_Material_Conversion_mat_floor.material b/AutomatedTesting/Gem/Sponza/Assets/TestData/Test_Sponza_Material_Conversion_mat_floor.material new file mode 100644 index 0000000000..0c1208d8fb --- /dev/null +++ b/AutomatedTesting/Gem/Sponza/Assets/TestData/Test_Sponza_Material_Conversion_mat_floor.material @@ -0,0 +1,51 @@ +{ + "description": "", + "materialType": "Materials/Types/StandardPBR.materialtype", + "parentMaterial": "", + "propertyLayoutVersion": 3, + "properties": { + "baseColor": { + "color": [ + 0.800000011920929, + 0.800000011920929, + 0.800000011920929, + 1.0 + ], + "textureMap": "Textures/floor_1k_basecolor.png" + }, + "clearCoat": { + "enable": true, + "influenceMap": "Textures/floor_1k_ao.png", + "normalMap": "Textures/floor_1k_normal.png", + "roughness": 0.25 + }, + "general": { + "applySpecularAA": true + }, + "irradiance": { + "color": [ + 1.0, + 0.9404135346412659, + 0.8688944578170776, + 1.0 + ] + }, + "normal": { + "textureMap": "Textures/floor_1k_normal.png" + }, + "occlusion": { + "diffuseTextureMap": "Textures/floor_1k_ao.png" + }, + "opacity": { + "factor": 1.0 + }, + "parallax": { + "factor": 0.012000000104308129, + "pdo": true, + "useTexture": false + }, + "roughness": { + "textureMap": "Textures/floor_1k_roughness.png" + } + } +} \ No newline at end of file diff --git a/AutomatedTesting/Gem/Sponza/Assets/TestData/Test_Sponza_Material_Conversion_mat_roof.material b/AutomatedTesting/Gem/Sponza/Assets/TestData/Test_Sponza_Material_Conversion_mat_roof.material new file mode 100644 index 0000000000..6aad4d644a --- /dev/null +++ b/AutomatedTesting/Gem/Sponza/Assets/TestData/Test_Sponza_Material_Conversion_mat_roof.material @@ -0,0 +1,44 @@ +{ + "description": "", + "materialType": "Materials/Types/StandardPBR.materialtype", + "parentMaterial": "", + "propertyLayoutVersion": 3, + "properties": { + "baseColor": { + "color": [ + 0.800000011920929, + 0.800000011920929, + 0.800000011920929, + 1.0 + ], + "textureBlendMode": "Lerp", + "textureMap": "Textures/roof_1k_basecolor.png" + }, + "general": { + "applySpecularAA": true + }, + "metallic": { + "useTexture": false + }, + "normal": { + "factor": 0.5, + "flipY": true, + "textureMap": "Textures/roof_1k_normal.jpg" + }, + "occlusion": { + "diffuseTextureMap": "Textures/roof_1k_ao.png" + }, + "opacity": { + "factor": 1.0 + }, + "parallax": { + "algorithm": "ContactRefinement", + "factor": 0.019999999552965165, + "quality": "Medium", + "useTexture": false + }, + "roughness": { + "textureMap": "Textures/roof_1k_roughness.png" + } + } +} \ No newline at end of file diff --git a/AutomatedTesting/Gem/Sponza/Assets/TestData/Test_Sponza_Material_Conversion_phong5.material b/AutomatedTesting/Gem/Sponza/Assets/TestData/Test_Sponza_Material_Conversion_phong5.material new file mode 100644 index 0000000000..302589dc85 --- /dev/null +++ b/AutomatedTesting/Gem/Sponza/Assets/TestData/Test_Sponza_Material_Conversion_phong5.material @@ -0,0 +1,35 @@ +{ + "description": "", + "materialType": "Materials/Types/StandardPBR.materialtype", + "parentMaterial": "", + "propertyLayoutVersion": 3, + "properties": { + "baseColor": { + "color": [ + 0.0, + 0.0, + 1.0, + 1.0 + ] + }, + "emissive": { + "color": [ + 0.0, + 0.0, + 0.0, + 1.0 + ] + }, + "irradiance": { + "color": [ + 0.0, + 0.0, + 1.0, + 1.0 + ] + }, + "opacity": { + "factor": 1.0 + } + } +} \ No newline at end of file diff --git a/AutomatedTesting/Gem/Sponza/Assets/TestData/Test_Sponza_Material_Conversion_red.material b/AutomatedTesting/Gem/Sponza/Assets/TestData/Test_Sponza_Material_Conversion_red.material new file mode 100644 index 0000000000..5217a4e4be --- /dev/null +++ b/AutomatedTesting/Gem/Sponza/Assets/TestData/Test_Sponza_Material_Conversion_red.material @@ -0,0 +1,35 @@ +{ + "description": "", + "materialType": "Materials/Types/StandardPBR.materialtype", + "parentMaterial": "", + "propertyLayoutVersion": 3, + "properties": { + "baseColor": { + "color": [ + 0.800000011920929, + 0.0, + 0.0, + 1.0 + ] + }, + "emissive": { + "color": [ + 0.0, + 0.0, + 0.0, + 1.0 + ] + }, + "irradiance": { + "color": [ + 1.0, + 0.0, + 0.0, + 1.0 + ] + }, + "opacity": { + "factor": 1.0 + } + } +} \ No newline at end of file diff --git a/AutomatedTesting/Gem/Sponza/Assets/TestData/Test_Sponza_Material_Conversion_white.material b/AutomatedTesting/Gem/Sponza/Assets/TestData/Test_Sponza_Material_Conversion_white.material new file mode 100644 index 0000000000..dba44f7b49 --- /dev/null +++ b/AutomatedTesting/Gem/Sponza/Assets/TestData/Test_Sponza_Material_Conversion_white.material @@ -0,0 +1,19 @@ +{ + "description": "", + "materialType": "Materials/Types/StandardPBR.materialtype", + "parentMaterial": "", + "propertyLayoutVersion": 3, + "properties": { + "emissive": { + "color": [ + 0.0, + 0.0, + 0.0, + 1.0 + ] + }, + "opacity": { + "factor": 1.0 + } + } +} \ No newline at end of file diff --git a/AutomatedTesting/Gem/Sponza/Assets/TestData/white_latlong_iblskyboxcm.exr b/AutomatedTesting/Gem/Sponza/Assets/TestData/white_latlong_iblskyboxcm.exr new file mode 100644 index 0000000000..56d66de7fc --- /dev/null +++ b/AutomatedTesting/Gem/Sponza/Assets/TestData/white_latlong_iblskyboxcm.exr @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:d9c14dc81887be7647d9afa9e5481634eded0b1d0285b59bb76bb2a91326ca8a +size 3369 diff --git a/AutomatedTesting/Gem/Sponza/Assets/Textures/arch_1k_ao.png b/AutomatedTesting/Gem/Sponza/Assets/Textures/arch_1k_ao.png new file mode 100644 index 0000000000..8bc54f1e55 --- /dev/null +++ b/AutomatedTesting/Gem/Sponza/Assets/Textures/arch_1k_ao.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:9f21e251c50a657956ba8b401f102b8a3237a0c9c78eab0427332eb3ad8f5952 +size 281259 diff --git a/AutomatedTesting/Gem/Sponza/Assets/Textures/arch_1k_basecolor.png b/AutomatedTesting/Gem/Sponza/Assets/Textures/arch_1k_basecolor.png new file mode 100644 index 0000000000..c8c21bbfea --- /dev/null +++ b/AutomatedTesting/Gem/Sponza/Assets/Textures/arch_1k_basecolor.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:1b37ec99d6f8d26b8313315d801b9c378456ed9ec31cc2e0566c17ea3287b4fa +size 1643629 diff --git a/AutomatedTesting/Gem/Sponza/Assets/Textures/arch_1k_height.png b/AutomatedTesting/Gem/Sponza/Assets/Textures/arch_1k_height.png new file mode 100644 index 0000000000..425f2f4a74 --- /dev/null +++ b/AutomatedTesting/Gem/Sponza/Assets/Textures/arch_1k_height.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:57657925d24ceb83881e614b3056b82dfc7197a3eebbb707a47f6721249d47c3 +size 108869 diff --git a/AutomatedTesting/Gem/Sponza/Assets/Textures/arch_1k_normal.jpg b/AutomatedTesting/Gem/Sponza/Assets/Textures/arch_1k_normal.jpg new file mode 100644 index 0000000000..511d4412f8 --- /dev/null +++ b/AutomatedTesting/Gem/Sponza/Assets/Textures/arch_1k_normal.jpg @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:fc5a747fef8c4d830b72e250645925f41125ea75c18b6fb094cafe7b19850ca5 +size 70950 diff --git a/AutomatedTesting/Gem/Sponza/Assets/Textures/arch_1k_roughness.png b/AutomatedTesting/Gem/Sponza/Assets/Textures/arch_1k_roughness.png new file mode 100644 index 0000000000..eb9ddee5f2 --- /dev/null +++ b/AutomatedTesting/Gem/Sponza/Assets/Textures/arch_1k_roughness.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:8438ee2f06842f54e493fe1eda34b6ca39e6db19d2e0f21342f0f4e52fc3f1e3 +size 689118 diff --git a/AutomatedTesting/Gem/Sponza/Assets/Textures/background_1k_ao.png b/AutomatedTesting/Gem/Sponza/Assets/Textures/background_1k_ao.png new file mode 100644 index 0000000000..6ca9f441b1 --- /dev/null +++ b/AutomatedTesting/Gem/Sponza/Assets/Textures/background_1k_ao.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:0e59f003d7c8d26e7ec8460acec442f31cf7a06eb76008989c1ae6fccd8e2f15 +size 537441 diff --git a/AutomatedTesting/Gem/Sponza/Assets/Textures/background_1k_basecolor.png b/AutomatedTesting/Gem/Sponza/Assets/Textures/background_1k_basecolor.png new file mode 100644 index 0000000000..a1684d404f --- /dev/null +++ b/AutomatedTesting/Gem/Sponza/Assets/Textures/background_1k_basecolor.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:b1c69c97ffc402d63130b680af75128b431504c4dedcbd15a5fbb41c142317fe +size 1305835 diff --git a/AutomatedTesting/Gem/Sponza/Assets/Textures/background_1k_height.png b/AutomatedTesting/Gem/Sponza/Assets/Textures/background_1k_height.png new file mode 100644 index 0000000000..e03e062c98 --- /dev/null +++ b/AutomatedTesting/Gem/Sponza/Assets/Textures/background_1k_height.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:6650f449128dee04f513961b9d65d81105f2bd4fa580f4dbd9d6fb7b0af932bc +size 275302 diff --git a/AutomatedTesting/Gem/Sponza/Assets/Textures/background_1k_metallic.png b/AutomatedTesting/Gem/Sponza/Assets/Textures/background_1k_metallic.png new file mode 100644 index 0000000000..c7bceabff2 --- /dev/null +++ b/AutomatedTesting/Gem/Sponza/Assets/Textures/background_1k_metallic.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:f482b7b57d180c6df76b750d05547151731fc6c61d2b9674f3b9daa5ab0ac225 +size 440844 diff --git a/AutomatedTesting/Gem/Sponza/Assets/Textures/background_1k_normal.jpg b/AutomatedTesting/Gem/Sponza/Assets/Textures/background_1k_normal.jpg new file mode 100644 index 0000000000..29f27d2bd5 --- /dev/null +++ b/AutomatedTesting/Gem/Sponza/Assets/Textures/background_1k_normal.jpg @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:955f60ebbe10948e9d47cb90e0e0359c4ee26bd8e76d95292a673a2adb68f410 +size 82102 diff --git a/AutomatedTesting/Gem/Sponza/Assets/Textures/background_1k_roughness.png b/AutomatedTesting/Gem/Sponza/Assets/Textures/background_1k_roughness.png new file mode 100644 index 0000000000..689da83af7 --- /dev/null +++ b/AutomatedTesting/Gem/Sponza/Assets/Textures/background_1k_roughness.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:d5d0f40ab7b5153a44b87ee0c83c65ddc69cf845d16c8c9c3c2c043f85c1f04f +size 542782 diff --git a/AutomatedTesting/Gem/Sponza/Assets/Textures/bricks_1k_ao.png b/AutomatedTesting/Gem/Sponza/Assets/Textures/bricks_1k_ao.png new file mode 100644 index 0000000000..4b608a456f --- /dev/null +++ b/AutomatedTesting/Gem/Sponza/Assets/Textures/bricks_1k_ao.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:e3d169b73a2852e404eaa113e91d32b66e0d45a1b55598cc58f64e16c9565bf9 +size 729137 diff --git a/AutomatedTesting/Gem/Sponza/Assets/Textures/bricks_1k_basecolor.png b/AutomatedTesting/Gem/Sponza/Assets/Textures/bricks_1k_basecolor.png new file mode 100644 index 0000000000..cf78cde324 --- /dev/null +++ b/AutomatedTesting/Gem/Sponza/Assets/Textures/bricks_1k_basecolor.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:f34b38f6e205b6bffec72ddfd1305a66d0146d61bcc2ef901fd146a0ec2708de +size 1934899 diff --git a/AutomatedTesting/Gem/Sponza/Assets/Textures/bricks_1k_height.png b/AutomatedTesting/Gem/Sponza/Assets/Textures/bricks_1k_height.png new file mode 100644 index 0000000000..b4f639e01d --- /dev/null +++ b/AutomatedTesting/Gem/Sponza/Assets/Textures/bricks_1k_height.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:9745b60c53a4b9fa33a6a3713b9b06ec7679883524533de44628cfe0d26ae038 +size 377230 diff --git a/AutomatedTesting/Gem/Sponza/Assets/Textures/bricks_1k_normal.jpg b/AutomatedTesting/Gem/Sponza/Assets/Textures/bricks_1k_normal.jpg new file mode 100644 index 0000000000..e097988246 --- /dev/null +++ b/AutomatedTesting/Gem/Sponza/Assets/Textures/bricks_1k_normal.jpg @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:03eba2d92ed70e04d5278152e945cf3a170750b71a04fd0f835fd6030b731720 +size 166767 diff --git a/AutomatedTesting/Gem/Sponza/Assets/Textures/bricks_1k_roughness.png b/AutomatedTesting/Gem/Sponza/Assets/Textures/bricks_1k_roughness.png new file mode 100644 index 0000000000..9573d6ca3e --- /dev/null +++ b/AutomatedTesting/Gem/Sponza/Assets/Textures/bricks_1k_roughness.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:e35858a269d42405702102e7f7972a6330c3eaacfe637148c676e14d5c901c29 +size 784675 diff --git a/AutomatedTesting/Gem/Sponza/Assets/Textures/ceiling_1k_ao.png b/AutomatedTesting/Gem/Sponza/Assets/Textures/ceiling_1k_ao.png new file mode 100644 index 0000000000..fd87eefdbd --- /dev/null +++ b/AutomatedTesting/Gem/Sponza/Assets/Textures/ceiling_1k_ao.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:22b80bfc1226fb587b230c51e9dac7fce6e295a4f0674326e96dc1232f40548b +size 901463 diff --git a/AutomatedTesting/Gem/Sponza/Assets/Textures/ceiling_1k_basecolor.png b/AutomatedTesting/Gem/Sponza/Assets/Textures/ceiling_1k_basecolor.png new file mode 100644 index 0000000000..161272e604 --- /dev/null +++ b/AutomatedTesting/Gem/Sponza/Assets/Textures/ceiling_1k_basecolor.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:b6743770a3428721a42a25a331fdb1e9895f71848c8215377e690b7cf9b7397f +size 1756093 diff --git a/AutomatedTesting/Gem/Sponza/Assets/Textures/ceiling_1k_height.png b/AutomatedTesting/Gem/Sponza/Assets/Textures/ceiling_1k_height.png new file mode 100644 index 0000000000..36b0f61834 --- /dev/null +++ b/AutomatedTesting/Gem/Sponza/Assets/Textures/ceiling_1k_height.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:756105faa27e722d6cc5915f33f8bcf9fd7afc022c41276a8c0e3b1f122303a3 +size 501917 diff --git a/AutomatedTesting/Gem/Sponza/Assets/Textures/ceiling_1k_normal.png b/AutomatedTesting/Gem/Sponza/Assets/Textures/ceiling_1k_normal.png new file mode 100644 index 0000000000..870d38abe9 --- /dev/null +++ b/AutomatedTesting/Gem/Sponza/Assets/Textures/ceiling_1k_normal.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:08fa78ce8e7840189d22442ed46863b4eaf5a4a99c0655690a2c47b1b0ebd9ce +size 1399902 diff --git a/AutomatedTesting/Gem/Sponza/Assets/Textures/ceiling_1k_roughness.png b/AutomatedTesting/Gem/Sponza/Assets/Textures/ceiling_1k_roughness.png new file mode 100644 index 0000000000..c5ce447017 --- /dev/null +++ b/AutomatedTesting/Gem/Sponza/Assets/Textures/ceiling_1k_roughness.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:4c24b269cd413b86da8cdd44bb639f3b95cfd1a8c53a3a941cb5a22a1042f85d +size 689214 diff --git a/AutomatedTesting/Gem/Sponza/Assets/Textures/chain_alpha.png b/AutomatedTesting/Gem/Sponza/Assets/Textures/chain_alpha.png new file mode 100644 index 0000000000..13f145b733 --- /dev/null +++ b/AutomatedTesting/Gem/Sponza/Assets/Textures/chain_alpha.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:30a1308326a5b0288147d0fb92230ebd1cef107180e38f7d5795bdc13a62e368 +size 3389 diff --git a/AutomatedTesting/Gem/Sponza/Assets/Textures/chain_basecolor.png b/AutomatedTesting/Gem/Sponza/Assets/Textures/chain_basecolor.png new file mode 100644 index 0000000000..8c6384ed12 --- /dev/null +++ b/AutomatedTesting/Gem/Sponza/Assets/Textures/chain_basecolor.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:51c661aa2ee3fb4b4735005a71e734eb25e433ef73ded5131b110e4df2e94acf +size 384316 diff --git a/AutomatedTesting/Gem/Sponza/Assets/Textures/chain_normal.jpg b/AutomatedTesting/Gem/Sponza/Assets/Textures/chain_normal.jpg new file mode 100644 index 0000000000..4a5575731f --- /dev/null +++ b/AutomatedTesting/Gem/Sponza/Assets/Textures/chain_normal.jpg @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:4619ec32e2de143db42639e0a4e0dfb174eb85057eb20f9e0d0af59e40977d9a +size 11229 diff --git a/AutomatedTesting/Gem/Sponza/Assets/Textures/columnA_1k_ao.png b/AutomatedTesting/Gem/Sponza/Assets/Textures/columnA_1k_ao.png new file mode 100644 index 0000000000..ec340ea1a0 --- /dev/null +++ b/AutomatedTesting/Gem/Sponza/Assets/Textures/columnA_1k_ao.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:a505d441c79f3ab674fd5a6b879a430970400fb9f56b379dde00900da296a47e +size 599094 diff --git a/AutomatedTesting/Gem/Sponza/Assets/Textures/columnA_1k_basecolor.png b/AutomatedTesting/Gem/Sponza/Assets/Textures/columnA_1k_basecolor.png new file mode 100644 index 0000000000..b6f499c922 --- /dev/null +++ b/AutomatedTesting/Gem/Sponza/Assets/Textures/columnA_1k_basecolor.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:552608851205bde18e2bc2f7cbf475ccefbb182c7bfcb9430fa931da22363c80 +size 1836310 diff --git a/AutomatedTesting/Gem/Sponza/Assets/Textures/columnA_1k_height.png b/AutomatedTesting/Gem/Sponza/Assets/Textures/columnA_1k_height.png new file mode 100644 index 0000000000..704638918a --- /dev/null +++ b/AutomatedTesting/Gem/Sponza/Assets/Textures/columnA_1k_height.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:79f1c3430a193ee78c72b84a461612ffd79aa23374949af13a200ec9a301ba2d +size 274678 diff --git a/AutomatedTesting/Gem/Sponza/Assets/Textures/columnA_1k_normal.jpg b/AutomatedTesting/Gem/Sponza/Assets/Textures/columnA_1k_normal.jpg new file mode 100644 index 0000000000..dc90933767 --- /dev/null +++ b/AutomatedTesting/Gem/Sponza/Assets/Textures/columnA_1k_normal.jpg @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:d280d5676ccfd6e4b6efdc53e828cc6823f44339a87ec9cee8a79d989ad46175 +size 127305 diff --git a/AutomatedTesting/Gem/Sponza/Assets/Textures/columnA_1k_roughness.png b/AutomatedTesting/Gem/Sponza/Assets/Textures/columnA_1k_roughness.png new file mode 100644 index 0000000000..a7221fc001 --- /dev/null +++ b/AutomatedTesting/Gem/Sponza/Assets/Textures/columnA_1k_roughness.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:5c4fb7c8012891c7af4ff371c8e6a8ef85ef1160a5b93012b964158ab48b8e4a +size 760602 diff --git a/AutomatedTesting/Gem/Sponza/Assets/Textures/columnB_1k_ao.png b/AutomatedTesting/Gem/Sponza/Assets/Textures/columnB_1k_ao.png new file mode 100644 index 0000000000..9cf3966fba --- /dev/null +++ b/AutomatedTesting/Gem/Sponza/Assets/Textures/columnB_1k_ao.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:a9fe904a58b248937adde2b48ba320da5139700d03e3183fbadfaaa0ac8bb6f5 +size 651508 diff --git a/AutomatedTesting/Gem/Sponza/Assets/Textures/columnB_1k_basecolor.png b/AutomatedTesting/Gem/Sponza/Assets/Textures/columnB_1k_basecolor.png new file mode 100644 index 0000000000..8315166b41 --- /dev/null +++ b/AutomatedTesting/Gem/Sponza/Assets/Textures/columnB_1k_basecolor.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:37d461594dca7eb3da8f6f135511d38efc7c1f333afb98d286fb36a0034f3100 +size 2158620 diff --git a/AutomatedTesting/Gem/Sponza/Assets/Textures/columnB_1k_height.png b/AutomatedTesting/Gem/Sponza/Assets/Textures/columnB_1k_height.png new file mode 100644 index 0000000000..30bd2b0585 --- /dev/null +++ b/AutomatedTesting/Gem/Sponza/Assets/Textures/columnB_1k_height.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:8e95e08eed20fb4d44a6461f38f27f21fd3ae3f024550afed95ecf3bc30929b1 +size 297329 diff --git a/AutomatedTesting/Gem/Sponza/Assets/Textures/columnB_1k_normal.jpg b/AutomatedTesting/Gem/Sponza/Assets/Textures/columnB_1k_normal.jpg new file mode 100644 index 0000000000..9299417a78 --- /dev/null +++ b/AutomatedTesting/Gem/Sponza/Assets/Textures/columnB_1k_normal.jpg @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:1b00b684b53854ec24e86441e59220e6c49948429bd6fb7edab7058a11e8f92e +size 139998 diff --git a/AutomatedTesting/Gem/Sponza/Assets/Textures/columnB_1k_roughness.png b/AutomatedTesting/Gem/Sponza/Assets/Textures/columnB_1k_roughness.png new file mode 100644 index 0000000000..4f4c674c6e --- /dev/null +++ b/AutomatedTesting/Gem/Sponza/Assets/Textures/columnB_1k_roughness.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:5a6d428bf17ecee32d47c3feab27567a882b97dfa733dcf6ca8bf1b0bd0a025a +size 908698 diff --git a/AutomatedTesting/Gem/Sponza/Assets/Textures/columnC_1k_ao.png b/AutomatedTesting/Gem/Sponza/Assets/Textures/columnC_1k_ao.png new file mode 100644 index 0000000000..763aaedc50 --- /dev/null +++ b/AutomatedTesting/Gem/Sponza/Assets/Textures/columnC_1k_ao.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:ab2c93badd7b72f45990c3859d6ddc7f2436a4aa5e93c0de65a139ea99120a97 +size 628789 diff --git a/AutomatedTesting/Gem/Sponza/Assets/Textures/columnC_1k_basecolor.png b/AutomatedTesting/Gem/Sponza/Assets/Textures/columnC_1k_basecolor.png new file mode 100644 index 0000000000..f8f34d9232 --- /dev/null +++ b/AutomatedTesting/Gem/Sponza/Assets/Textures/columnC_1k_basecolor.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:97ec8bd597b0805a8a36bcd90ccdba2ae9430ed3a8631b0f7f87796fb2ceefc5 +size 2128105 diff --git a/AutomatedTesting/Gem/Sponza/Assets/Textures/columnC_1k_height.png b/AutomatedTesting/Gem/Sponza/Assets/Textures/columnC_1k_height.png new file mode 100644 index 0000000000..46a96abc24 --- /dev/null +++ b/AutomatedTesting/Gem/Sponza/Assets/Textures/columnC_1k_height.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:f8bbbc46f0f1ccfefec202b1e26ecbd418d3283037746bd63a892d1a930fb36d +size 282637 diff --git a/AutomatedTesting/Gem/Sponza/Assets/Textures/columnC_1k_normal.jpg b/AutomatedTesting/Gem/Sponza/Assets/Textures/columnC_1k_normal.jpg new file mode 100644 index 0000000000..270b9d12d1 --- /dev/null +++ b/AutomatedTesting/Gem/Sponza/Assets/Textures/columnC_1k_normal.jpg @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:44db84371fb81e1712b5f6aa9777fcfe76728dc25a51f0423e07c294b062c724 +size 137528 diff --git a/AutomatedTesting/Gem/Sponza/Assets/Textures/columnC_1k_roughness.png b/AutomatedTesting/Gem/Sponza/Assets/Textures/columnC_1k_roughness.png new file mode 100644 index 0000000000..8682bae62c --- /dev/null +++ b/AutomatedTesting/Gem/Sponza/Assets/Textures/columnC_1k_roughness.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:c07d4a1af570a6b3817e97c92daa17f2593ea2b88e0e167ed43f7869b77971ab +size 881064 diff --git a/AutomatedTesting/Gem/Sponza/Assets/Textures/curtainBlue_1k_basecolor.png b/AutomatedTesting/Gem/Sponza/Assets/Textures/curtainBlue_1k_basecolor.png new file mode 100644 index 0000000000..b6b394e860 --- /dev/null +++ b/AutomatedTesting/Gem/Sponza/Assets/Textures/curtainBlue_1k_basecolor.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:4310237ce83738635b3880ccd896f78ea2c70bebadd620cb6ffaaccc78ba7cbf +size 9231896 diff --git a/AutomatedTesting/Gem/Sponza/Assets/Textures/curtainGreen_1k_basecolor.png b/AutomatedTesting/Gem/Sponza/Assets/Textures/curtainGreen_1k_basecolor.png new file mode 100644 index 0000000000..59e47b4e75 --- /dev/null +++ b/AutomatedTesting/Gem/Sponza/Assets/Textures/curtainGreen_1k_basecolor.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:e093cf9538bb40615d32bec6fa9c60d4308bc017c5ab02a7c388310159bc87fe +size 8342440 diff --git a/AutomatedTesting/Gem/Sponza/Assets/Textures/curtainRed_1k_basecolor.png b/AutomatedTesting/Gem/Sponza/Assets/Textures/curtainRed_1k_basecolor.png new file mode 100644 index 0000000000..dc708deba0 --- /dev/null +++ b/AutomatedTesting/Gem/Sponza/Assets/Textures/curtainRed_1k_basecolor.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:465efab4da8d2b6698c83844d2fbe662e38a92f278aa27d356bbc1bca1e23f8b +size 8879938 diff --git a/AutomatedTesting/Gem/Sponza/Assets/Textures/curtain_ao.png b/AutomatedTesting/Gem/Sponza/Assets/Textures/curtain_ao.png new file mode 100644 index 0000000000..fcce123429 --- /dev/null +++ b/AutomatedTesting/Gem/Sponza/Assets/Textures/curtain_ao.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:b4faebdc849479a6b5d10db4cac8b6e9823bf447aeb4b45945f6acd43333def8 +size 4557863 diff --git a/AutomatedTesting/Gem/Sponza/Assets/Textures/curtain_height.png b/AutomatedTesting/Gem/Sponza/Assets/Textures/curtain_height.png new file mode 100644 index 0000000000..c983ec6ca8 --- /dev/null +++ b/AutomatedTesting/Gem/Sponza/Assets/Textures/curtain_height.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:064fbdba14e1ca04e438f4ec85d3f9a0fe3203620ee2a014113ec99454fbee65 +size 2709058 diff --git a/AutomatedTesting/Gem/Sponza/Assets/Textures/curtain_metallic.png b/AutomatedTesting/Gem/Sponza/Assets/Textures/curtain_metallic.png new file mode 100644 index 0000000000..cf63b48d04 --- /dev/null +++ b/AutomatedTesting/Gem/Sponza/Assets/Textures/curtain_metallic.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:2c8159b1ad888143ec3cbf5e2535f87abbe238a1474619696355d11bc4e4bb49 +size 812014 diff --git a/AutomatedTesting/Gem/Sponza/Assets/Textures/curtain_normal.jpg b/AutomatedTesting/Gem/Sponza/Assets/Textures/curtain_normal.jpg new file mode 100644 index 0000000000..d677f3650b --- /dev/null +++ b/AutomatedTesting/Gem/Sponza/Assets/Textures/curtain_normal.jpg @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:0da92f21f46502a7c58c1a7ce7280354b4b41e553a5bf181d9962cacf8ed2191 +size 2327816 diff --git a/AutomatedTesting/Gem/Sponza/Assets/Textures/curtain_roughness.png b/AutomatedTesting/Gem/Sponza/Assets/Textures/curtain_roughness.png new file mode 100644 index 0000000000..60e2328213 --- /dev/null +++ b/AutomatedTesting/Gem/Sponza/Assets/Textures/curtain_roughness.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:2a701afeb01e19efdff72393370c86ee148f6d81c1551bcbd211937df503be9b +size 3694284 diff --git a/AutomatedTesting/Gem/Sponza/Assets/Textures/details_1k_ao.png b/AutomatedTesting/Gem/Sponza/Assets/Textures/details_1k_ao.png new file mode 100644 index 0000000000..ed4d761fdb --- /dev/null +++ b/AutomatedTesting/Gem/Sponza/Assets/Textures/details_1k_ao.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:368262bb832ab61b4649aadffe4158b64d46b70985e99106300fa0c7a7989c35 +size 666377 diff --git a/AutomatedTesting/Gem/Sponza/Assets/Textures/details_1k_basecolor.png b/AutomatedTesting/Gem/Sponza/Assets/Textures/details_1k_basecolor.png new file mode 100644 index 0000000000..090f5eaef8 --- /dev/null +++ b/AutomatedTesting/Gem/Sponza/Assets/Textures/details_1k_basecolor.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:2021b64706bc328959d521f056dcb9b9acf3062a5f9ad35da9e93b2351dcab97 +size 1371185 diff --git a/AutomatedTesting/Gem/Sponza/Assets/Textures/details_1k_height.png b/AutomatedTesting/Gem/Sponza/Assets/Textures/details_1k_height.png new file mode 100644 index 0000000000..8cfe37da45 --- /dev/null +++ b/AutomatedTesting/Gem/Sponza/Assets/Textures/details_1k_height.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:fdbb251cf483ffccc6cb1b344eba1b3262fa8087c37a36aa843f0c0e9d222f8f +size 403018 diff --git a/AutomatedTesting/Gem/Sponza/Assets/Textures/details_1k_metallic.png b/AutomatedTesting/Gem/Sponza/Assets/Textures/details_1k_metallic.png new file mode 100644 index 0000000000..fe1ced8718 --- /dev/null +++ b/AutomatedTesting/Gem/Sponza/Assets/Textures/details_1k_metallic.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:8b67d6bea4c9fbc8412944b261a0c0f2dc1dc2e4103a6742bfb57d3c2d36429c +size 499028 diff --git a/AutomatedTesting/Gem/Sponza/Assets/Textures/details_1k_normal.png b/AutomatedTesting/Gem/Sponza/Assets/Textures/details_1k_normal.png new file mode 100644 index 0000000000..be8a9932e9 --- /dev/null +++ b/AutomatedTesting/Gem/Sponza/Assets/Textures/details_1k_normal.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:ae4c4d95bb92dfe25f5fba8564780c10ee663268360fccf1aa707b6c7c6a079c +size 1121073 diff --git a/AutomatedTesting/Gem/Sponza/Assets/Textures/details_1k_roughness.png b/AutomatedTesting/Gem/Sponza/Assets/Textures/details_1k_roughness.png new file mode 100644 index 0000000000..dc633ad668 --- /dev/null +++ b/AutomatedTesting/Gem/Sponza/Assets/Textures/details_1k_roughness.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:5429087af4e8c33d19b2f13bd194c983bcdbe0c43165bea3dc0711874c2e50b9 +size 523398 diff --git a/AutomatedTesting/Gem/Sponza/Assets/Textures/fabricBlue_1k_basecolor.png b/AutomatedTesting/Gem/Sponza/Assets/Textures/fabricBlue_1k_basecolor.png new file mode 100644 index 0000000000..54373a9f98 --- /dev/null +++ b/AutomatedTesting/Gem/Sponza/Assets/Textures/fabricBlue_1k_basecolor.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:a1b6588cfdaa69b671ba879aa56712e88d6fcd74c160a751440441c9f18c727b +size 2102967 diff --git a/AutomatedTesting/Gem/Sponza/Assets/Textures/fabricGreen_1k_basecolor.png b/AutomatedTesting/Gem/Sponza/Assets/Textures/fabricGreen_1k_basecolor.png new file mode 100644 index 0000000000..c77a44eca9 --- /dev/null +++ b/AutomatedTesting/Gem/Sponza/Assets/Textures/fabricGreen_1k_basecolor.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:09c5ff45b66e5a65746c9bef6cbad8a897f58552b896ca6692e5498d91da71ab +size 2166239 diff --git a/AutomatedTesting/Gem/Sponza/Assets/Textures/fabricPurple_2k_basecolor.png b/AutomatedTesting/Gem/Sponza/Assets/Textures/fabricPurple_2k_basecolor.png new file mode 100644 index 0000000000..c6ef949040 --- /dev/null +++ b/AutomatedTesting/Gem/Sponza/Assets/Textures/fabricPurple_2k_basecolor.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:abd3b68e5c2982ef558593017bd4c7a6e3f23681827aa8b8e19dbe21564493e2 +size 1158454 diff --git a/AutomatedTesting/Gem/Sponza/Assets/Textures/fabricRed_1k_basecolor.png b/AutomatedTesting/Gem/Sponza/Assets/Textures/fabricRed_1k_basecolor.png new file mode 100644 index 0000000000..ab603245df --- /dev/null +++ b/AutomatedTesting/Gem/Sponza/Assets/Textures/fabricRed_1k_basecolor.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:27ee68e81cb549f65e437debaf97f8eaa57a0f6975a15adee7f395a8bb6f0028 +size 2211896 diff --git a/AutomatedTesting/Gem/Sponza/Assets/Textures/fabric_ao.png b/AutomatedTesting/Gem/Sponza/Assets/Textures/fabric_ao.png new file mode 100644 index 0000000000..f4ae398a33 --- /dev/null +++ b/AutomatedTesting/Gem/Sponza/Assets/Textures/fabric_ao.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:d3ddbc3833531aba81f9e16fcc1e9c88af1c8b329a8e8a4dfb6a9df08913085a +size 977058 diff --git a/AutomatedTesting/Gem/Sponza/Assets/Textures/fabric_height.png b/AutomatedTesting/Gem/Sponza/Assets/Textures/fabric_height.png new file mode 100644 index 0000000000..f891a127a4 --- /dev/null +++ b/AutomatedTesting/Gem/Sponza/Assets/Textures/fabric_height.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:f44f224b5a162f56ad0e8b931f781eed5fdbfd5a8b9b143aedb5ab69f5c3ca29 +size 564113 diff --git a/AutomatedTesting/Gem/Sponza/Assets/Textures/fabric_metallic.png b/AutomatedTesting/Gem/Sponza/Assets/Textures/fabric_metallic.png new file mode 100644 index 0000000000..7de5d2d8ce --- /dev/null +++ b/AutomatedTesting/Gem/Sponza/Assets/Textures/fabric_metallic.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:c456fec0df8f7c72680b855a2c8dd183014429e93bce68a4b2c38059a765c5b6 +size 126769 diff --git a/AutomatedTesting/Gem/Sponza/Assets/Textures/fabric_normal.jpg b/AutomatedTesting/Gem/Sponza/Assets/Textures/fabric_normal.jpg new file mode 100644 index 0000000000..928bd38b87 --- /dev/null +++ b/AutomatedTesting/Gem/Sponza/Assets/Textures/fabric_normal.jpg @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:ee04cb3dc6a718510f662ae06e04fe8fe52230472f4a504a4a513ab3ab344790 +size 479191 diff --git a/AutomatedTesting/Gem/Sponza/Assets/Textures/fabric_roughness.png b/AutomatedTesting/Gem/Sponza/Assets/Textures/fabric_roughness.png new file mode 100644 index 0000000000..63fe4a8b2f --- /dev/null +++ b/AutomatedTesting/Gem/Sponza/Assets/Textures/fabric_roughness.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:4097ae87d2d55653c44efa6c607da9513f35057a2556f2f41cd412e1ef447dc4 +size 755476 diff --git a/AutomatedTesting/Gem/Sponza/Assets/Textures/flagpole_1k_ao.png b/AutomatedTesting/Gem/Sponza/Assets/Textures/flagpole_1k_ao.png new file mode 100644 index 0000000000..ee5613ebcb --- /dev/null +++ b/AutomatedTesting/Gem/Sponza/Assets/Textures/flagpole_1k_ao.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:9ce7d28833be640b1b4809040580b25bc5ed0caa10f9fcb8b7f28c5b952102d5 +size 689711 diff --git a/AutomatedTesting/Gem/Sponza/Assets/Textures/flagpole_1k_basecolor.png b/AutomatedTesting/Gem/Sponza/Assets/Textures/flagpole_1k_basecolor.png new file mode 100644 index 0000000000..431210e5ee --- /dev/null +++ b/AutomatedTesting/Gem/Sponza/Assets/Textures/flagpole_1k_basecolor.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:cd515352a030a1a8cf766dfbf9ff78ce27608349e7b661e48d5ec0b59c6d5a93 +size 1376341 diff --git a/AutomatedTesting/Gem/Sponza/Assets/Textures/flagpole_1k_height.png b/AutomatedTesting/Gem/Sponza/Assets/Textures/flagpole_1k_height.png new file mode 100644 index 0000000000..2dd9284a27 --- /dev/null +++ b/AutomatedTesting/Gem/Sponza/Assets/Textures/flagpole_1k_height.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:883499e06b12d8f25d3381954d56c34aefc9346a972c3a6a21ec5bb34029160c +size 427516 diff --git a/AutomatedTesting/Gem/Sponza/Assets/Textures/flagpole_1k_metallic.png b/AutomatedTesting/Gem/Sponza/Assets/Textures/flagpole_1k_metallic.png new file mode 100644 index 0000000000..4ed2320ab8 --- /dev/null +++ b/AutomatedTesting/Gem/Sponza/Assets/Textures/flagpole_1k_metallic.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:5291109e90b65a1581ea05046d01c6918c10c87805790af915d62e57acd2d29a +size 1148004 diff --git a/AutomatedTesting/Gem/Sponza/Assets/Textures/flagpole_1k_normal.png b/AutomatedTesting/Gem/Sponza/Assets/Textures/flagpole_1k_normal.png new file mode 100644 index 0000000000..4913bf9352 --- /dev/null +++ b/AutomatedTesting/Gem/Sponza/Assets/Textures/flagpole_1k_normal.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:40b175859bf806237bee5ea72efc935b2dd28e3f6198d0604d5e474aea3725c7 +size 1215323 diff --git a/AutomatedTesting/Gem/Sponza/Assets/Textures/flagpole_1k_roughness.png b/AutomatedTesting/Gem/Sponza/Assets/Textures/flagpole_1k_roughness.png new file mode 100644 index 0000000000..f7ea0b06f0 --- /dev/null +++ b/AutomatedTesting/Gem/Sponza/Assets/Textures/flagpole_1k_roughness.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:24fdf0849349745e7abdd0c42baa82ec2cc2d5b5a9c1a683bbf677a156251316 +size 1316334 diff --git a/AutomatedTesting/Gem/Sponza/Assets/Textures/floor_1k_ao.png b/AutomatedTesting/Gem/Sponza/Assets/Textures/floor_1k_ao.png new file mode 100644 index 0000000000..2a3e9ac3db --- /dev/null +++ b/AutomatedTesting/Gem/Sponza/Assets/Textures/floor_1k_ao.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:04fba251cdae222d9f82b6cf6d1e8135ee1e066911967489f8c07ba20d076b14 +size 436348 diff --git a/AutomatedTesting/Gem/Sponza/Assets/Textures/floor_1k_basecolor.png b/AutomatedTesting/Gem/Sponza/Assets/Textures/floor_1k_basecolor.png new file mode 100644 index 0000000000..3a79998f5b --- /dev/null +++ b/AutomatedTesting/Gem/Sponza/Assets/Textures/floor_1k_basecolor.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:80d91120f7213e835e342c150386e468865c5b68994915e9febf54c5cc83cf5a +size 1883340 diff --git a/AutomatedTesting/Gem/Sponza/Assets/Textures/floor_1k_height.png b/AutomatedTesting/Gem/Sponza/Assets/Textures/floor_1k_height.png new file mode 100644 index 0000000000..f4fa9f2604 --- /dev/null +++ b/AutomatedTesting/Gem/Sponza/Assets/Textures/floor_1k_height.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:bf6fd8259710d106daab4c459172ed3e98f29640d655b238a462cd36039be40a +size 543386 diff --git a/AutomatedTesting/Gem/Sponza/Assets/Textures/floor_1k_metallic.png b/AutomatedTesting/Gem/Sponza/Assets/Textures/floor_1k_metallic.png new file mode 100644 index 0000000000..fdb6071b7c --- /dev/null +++ b/AutomatedTesting/Gem/Sponza/Assets/Textures/floor_1k_metallic.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:89ef6e57efdf8c232b771a4ff988799f9f4ae5aefe2149578c9fa661b8f66cd9 +size 1062809 diff --git a/AutomatedTesting/Gem/Sponza/Assets/Textures/floor_1k_normal.png b/AutomatedTesting/Gem/Sponza/Assets/Textures/floor_1k_normal.png new file mode 100644 index 0000000000..2e24080b5c --- /dev/null +++ b/AutomatedTesting/Gem/Sponza/Assets/Textures/floor_1k_normal.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:9d1dd751aaed6dce2085e1a886be1d72845dd68df34d33cc8401618b03aed991 +size 1509938 diff --git a/AutomatedTesting/Gem/Sponza/Assets/Textures/floor_1k_roughness.png b/AutomatedTesting/Gem/Sponza/Assets/Textures/floor_1k_roughness.png new file mode 100644 index 0000000000..083cda1634 --- /dev/null +++ b/AutomatedTesting/Gem/Sponza/Assets/Textures/floor_1k_roughness.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:fb0a952c7976e646a5c14b222e23a8fde2510425567e12c73c6f6dc957108d0b +size 1326209 diff --git a/AutomatedTesting/Gem/Sponza/Assets/Textures/lion_1k_ao.png b/AutomatedTesting/Gem/Sponza/Assets/Textures/lion_1k_ao.png new file mode 100644 index 0000000000..9cc32ad4b4 --- /dev/null +++ b/AutomatedTesting/Gem/Sponza/Assets/Textures/lion_1k_ao.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:686bb3c1274e5f48f9b390a67a6ce1e28b127546e1ae7a0d5d01152a2a7c537b +size 519499 diff --git a/AutomatedTesting/Gem/Sponza/Assets/Textures/lion_1k_basecolor.png b/AutomatedTesting/Gem/Sponza/Assets/Textures/lion_1k_basecolor.png new file mode 100644 index 0000000000..64092a39d1 --- /dev/null +++ b/AutomatedTesting/Gem/Sponza/Assets/Textures/lion_1k_basecolor.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:4c919b25301c084a2f4f03e5e80142d1ff72747bfb9cacb5332cdf80c4f62109 +size 1691028 diff --git a/AutomatedTesting/Gem/Sponza/Assets/Textures/lion_1k_height.png b/AutomatedTesting/Gem/Sponza/Assets/Textures/lion_1k_height.png new file mode 100644 index 0000000000..ad711b9144 --- /dev/null +++ b/AutomatedTesting/Gem/Sponza/Assets/Textures/lion_1k_height.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:aedb902b3256c3741fc4fe176608b8b033a22b52c689bc87fe4796f1720d9d54 +size 605847 diff --git a/AutomatedTesting/Gem/Sponza/Assets/Textures/lion_1k_metallic.png b/AutomatedTesting/Gem/Sponza/Assets/Textures/lion_1k_metallic.png new file mode 100644 index 0000000000..7617fd3cae --- /dev/null +++ b/AutomatedTesting/Gem/Sponza/Assets/Textures/lion_1k_metallic.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:7f2564801b00ffa0ef05ca18ae2222abc257c2b940720b0a73c1c95bccf61c73 +size 1008929 diff --git a/AutomatedTesting/Gem/Sponza/Assets/Textures/lion_1k_normal.jpg b/AutomatedTesting/Gem/Sponza/Assets/Textures/lion_1k_normal.jpg new file mode 100644 index 0000000000..648c37d670 --- /dev/null +++ b/AutomatedTesting/Gem/Sponza/Assets/Textures/lion_1k_normal.jpg @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:3ac327e8140639b4ef77a22f0ab1ecbc9738f84d6f0513b85a0fa2c18991ce5a +size 117602 diff --git a/AutomatedTesting/Gem/Sponza/Assets/Textures/lion_1k_roughness.png b/AutomatedTesting/Gem/Sponza/Assets/Textures/lion_1k_roughness.png new file mode 100644 index 0000000000..faafa83d28 --- /dev/null +++ b/AutomatedTesting/Gem/Sponza/Assets/Textures/lion_1k_roughness.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:dee59798e56c34d7c014c6e608ba0090dea0a160c44a57b4c61ca587c69950d0 +size 1336005 diff --git a/AutomatedTesting/Gem/Sponza/Assets/Textures/roof_1k_ao.png b/AutomatedTesting/Gem/Sponza/Assets/Textures/roof_1k_ao.png new file mode 100644 index 0000000000..58ec3d1bae --- /dev/null +++ b/AutomatedTesting/Gem/Sponza/Assets/Textures/roof_1k_ao.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:112bf756fab862ecf71c47dabbf601330e406ed9486500566a5fb012774af7a1 +size 845332 diff --git a/AutomatedTesting/Gem/Sponza/Assets/Textures/roof_1k_basecolor.png b/AutomatedTesting/Gem/Sponza/Assets/Textures/roof_1k_basecolor.png new file mode 100644 index 0000000000..dd93a2c546 --- /dev/null +++ b/AutomatedTesting/Gem/Sponza/Assets/Textures/roof_1k_basecolor.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:31c065bfd67e0b0ea459d81f134e9c1545f7601764c84544099d8c8f800f583c +size 2403959 diff --git a/AutomatedTesting/Gem/Sponza/Assets/Textures/roof_1k_height.png b/AutomatedTesting/Gem/Sponza/Assets/Textures/roof_1k_height.png new file mode 100644 index 0000000000..b9b65fc1d2 --- /dev/null +++ b/AutomatedTesting/Gem/Sponza/Assets/Textures/roof_1k_height.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:77830ec6672f68124d974657537abce461519f9a0ae705bd79d60ebcf18f4f99 +size 765576 diff --git a/AutomatedTesting/Gem/Sponza/Assets/Textures/roof_1k_metallic.png b/AutomatedTesting/Gem/Sponza/Assets/Textures/roof_1k_metallic.png new file mode 100644 index 0000000000..a82a51c778 --- /dev/null +++ b/AutomatedTesting/Gem/Sponza/Assets/Textures/roof_1k_metallic.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:bc4d854ae199fe8285c51b115005de50f35ddd5553c72867ff6a29e65454fc57 +size 1451908 diff --git a/AutomatedTesting/Gem/Sponza/Assets/Textures/roof_1k_normal.jpg b/AutomatedTesting/Gem/Sponza/Assets/Textures/roof_1k_normal.jpg new file mode 100644 index 0000000000..ead40b8bd9 --- /dev/null +++ b/AutomatedTesting/Gem/Sponza/Assets/Textures/roof_1k_normal.jpg @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:68b7477af3006f68f882ff0160f85b4e4b880737281b80f82de36a317c177f58 +size 557594 diff --git a/AutomatedTesting/Gem/Sponza/Assets/Textures/roof_1k_roughness.png b/AutomatedTesting/Gem/Sponza/Assets/Textures/roof_1k_roughness.png new file mode 100644 index 0000000000..b666c149ed --- /dev/null +++ b/AutomatedTesting/Gem/Sponza/Assets/Textures/roof_1k_roughness.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:7b8af2651ce3a8a57244e174231b8ae954dff3bf7a70c024a8acfa9371768eac +size 1820103 diff --git a/AutomatedTesting/Gem/Sponza/Assets/Textures/thorn_alpha.png b/AutomatedTesting/Gem/Sponza/Assets/Textures/thorn_alpha.png new file mode 100644 index 0000000000..c6c678849f --- /dev/null +++ b/AutomatedTesting/Gem/Sponza/Assets/Textures/thorn_alpha.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:1128834ae704583af703df8c63d1671f846d4a89927f90033573b9d8cd495bbd +size 76001 diff --git a/AutomatedTesting/Gem/Sponza/Assets/Textures/thorn_basecolor.png b/AutomatedTesting/Gem/Sponza/Assets/Textures/thorn_basecolor.png new file mode 100644 index 0000000000..dad1c18f0c --- /dev/null +++ b/AutomatedTesting/Gem/Sponza/Assets/Textures/thorn_basecolor.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:ae57e9e7fc478ee9ad28821af35c3266174795eb10293eb598353efe72c85cc7 +size 430161 diff --git a/AutomatedTesting/Gem/Sponza/Assets/Textures/thorn_height.png b/AutomatedTesting/Gem/Sponza/Assets/Textures/thorn_height.png new file mode 100644 index 0000000000..156e5e6d44 --- /dev/null +++ b/AutomatedTesting/Gem/Sponza/Assets/Textures/thorn_height.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:3f6727b858621faaa5930a974e7d60aa66cf3f694234ccfec4e80aeed033b2f1 +size 149055 diff --git a/AutomatedTesting/Gem/Sponza/Assets/Textures/thorn_metallic.png b/AutomatedTesting/Gem/Sponza/Assets/Textures/thorn_metallic.png new file mode 100644 index 0000000000..8b6340bcdd --- /dev/null +++ b/AutomatedTesting/Gem/Sponza/Assets/Textures/thorn_metallic.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:c67dadbce8c39c43e12137a48b662e2f71def0a1bcdc197a6ba87ecc391c0334 +size 244023 diff --git a/AutomatedTesting/Gem/Sponza/Assets/Textures/thorn_normal.jpg b/AutomatedTesting/Gem/Sponza/Assets/Textures/thorn_normal.jpg new file mode 100644 index 0000000000..e928f2bb36 --- /dev/null +++ b/AutomatedTesting/Gem/Sponza/Assets/Textures/thorn_normal.jpg @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:f3e0f3396a78712d283247a9c0fc539a671fc8ec01c60f98d48d9a129cfad58f +size 10762 diff --git a/AutomatedTesting/Gem/Sponza/Assets/Textures/thorn_roughness.png b/AutomatedTesting/Gem/Sponza/Assets/Textures/thorn_roughness.png new file mode 100644 index 0000000000..8f319021a4 --- /dev/null +++ b/AutomatedTesting/Gem/Sponza/Assets/Textures/thorn_roughness.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:00295c69a981a7b0af074267062693ae9c5f698d295b96f884729fb9af109385 +size 295295 diff --git a/AutomatedTesting/Gem/Sponza/Assets/Textures/vaseHanging_1k_ao.png b/AutomatedTesting/Gem/Sponza/Assets/Textures/vaseHanging_1k_ao.png new file mode 100644 index 0000000000..42330f43fc --- /dev/null +++ b/AutomatedTesting/Gem/Sponza/Assets/Textures/vaseHanging_1k_ao.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:342c4b0811833ae0826b7c10e4987f43ff10df38ee7df1719e540f35d2d3499e +size 345240 diff --git a/AutomatedTesting/Gem/Sponza/Assets/Textures/vaseHanging_1k_basecolor.png b/AutomatedTesting/Gem/Sponza/Assets/Textures/vaseHanging_1k_basecolor.png new file mode 100644 index 0000000000..d6fbff7d0e --- /dev/null +++ b/AutomatedTesting/Gem/Sponza/Assets/Textures/vaseHanging_1k_basecolor.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:6b5fb7c0472b9643cfd619d9e6c5527899492e7746147a2d975406d25374be78 +size 1314027 diff --git a/AutomatedTesting/Gem/Sponza/Assets/Textures/vaseHanging_1k_height.png b/AutomatedTesting/Gem/Sponza/Assets/Textures/vaseHanging_1k_height.png new file mode 100644 index 0000000000..ac9285bca7 --- /dev/null +++ b/AutomatedTesting/Gem/Sponza/Assets/Textures/vaseHanging_1k_height.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:caaa5ec46d6059ae3b245e9f7eadf886c4290c89958a13583dc4bc9293495cb0 +size 398025 diff --git a/AutomatedTesting/Gem/Sponza/Assets/Textures/vaseHanging_1k_metallic.png b/AutomatedTesting/Gem/Sponza/Assets/Textures/vaseHanging_1k_metallic.png new file mode 100644 index 0000000000..ede79d9158 --- /dev/null +++ b/AutomatedTesting/Gem/Sponza/Assets/Textures/vaseHanging_1k_metallic.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:62832e5e067086c97c46fee31baab1cb6dd2c807af685574a90c0afa8088ee43 +size 1401314 diff --git a/AutomatedTesting/Gem/Sponza/Assets/Textures/vaseHanging_1k_normal.png b/AutomatedTesting/Gem/Sponza/Assets/Textures/vaseHanging_1k_normal.png new file mode 100644 index 0000000000..4645b54d64 --- /dev/null +++ b/AutomatedTesting/Gem/Sponza/Assets/Textures/vaseHanging_1k_normal.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:f5d23737cc43a2e445dffd4221f8236e61dc553184c2a63b9d5c71d066d84573 +size 1147257 diff --git a/AutomatedTesting/Gem/Sponza/Assets/Textures/vaseHanging_1k_roughness.png b/AutomatedTesting/Gem/Sponza/Assets/Textures/vaseHanging_1k_roughness.png new file mode 100644 index 0000000000..235780d752 --- /dev/null +++ b/AutomatedTesting/Gem/Sponza/Assets/Textures/vaseHanging_1k_roughness.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:72ff5ec3b6a469d86f34e93d9fb143fe4846588e44f0e851e509be88745a25aa +size 1365617 diff --git a/AutomatedTesting/Gem/Sponza/Assets/Textures/vasePlant_1k_alpha.png b/AutomatedTesting/Gem/Sponza/Assets/Textures/vasePlant_1k_alpha.png new file mode 100644 index 0000000000..8556f67471 --- /dev/null +++ b/AutomatedTesting/Gem/Sponza/Assets/Textures/vasePlant_1k_alpha.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:85ee26dcfdf8cb3ddcd378e92fd52e313ee23a58f7cc5a37556d96556986ba0b +size 62658 diff --git a/AutomatedTesting/Gem/Sponza/Assets/Textures/vasePlant_1k_basecolor.png b/AutomatedTesting/Gem/Sponza/Assets/Textures/vasePlant_1k_basecolor.png new file mode 100644 index 0000000000..5f6cd0377f --- /dev/null +++ b/AutomatedTesting/Gem/Sponza/Assets/Textures/vasePlant_1k_basecolor.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:05d7a544ccf6b04dcfb37411927a79e8f4b2e6224b09651f92885604d825dc9c +size 860074 diff --git a/AutomatedTesting/Gem/Sponza/Assets/Textures/vaseRound_1k_ao.png b/AutomatedTesting/Gem/Sponza/Assets/Textures/vaseRound_1k_ao.png new file mode 100644 index 0000000000..c865df4c29 --- /dev/null +++ b/AutomatedTesting/Gem/Sponza/Assets/Textures/vaseRound_1k_ao.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:a63c38ed593010cd495256c1b2b5f2d39659e0d4e9c699dd97a2d0a5582a65d7 +size 255623 diff --git a/AutomatedTesting/Gem/Sponza/Assets/Textures/vaseRound_1k_basecolor.png b/AutomatedTesting/Gem/Sponza/Assets/Textures/vaseRound_1k_basecolor.png new file mode 100644 index 0000000000..942b1a859a --- /dev/null +++ b/AutomatedTesting/Gem/Sponza/Assets/Textures/vaseRound_1k_basecolor.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:f438726b2dd4107d85b2542476243bc6977362a4865a5c21916d186fdf0eb5f4 +size 1846782 diff --git a/AutomatedTesting/Gem/Sponza/Assets/Textures/vaseRound_1k_height.png b/AutomatedTesting/Gem/Sponza/Assets/Textures/vaseRound_1k_height.png new file mode 100644 index 0000000000..d0aaaa46c1 --- /dev/null +++ b/AutomatedTesting/Gem/Sponza/Assets/Textures/vaseRound_1k_height.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:6ddea2c560e2c86d58722b3728e0018c41b20fb64d543bd5241bc7de482bfcae +size 584961 diff --git a/AutomatedTesting/Gem/Sponza/Assets/Textures/vaseRound_1k_metallic.png b/AutomatedTesting/Gem/Sponza/Assets/Textures/vaseRound_1k_metallic.png new file mode 100644 index 0000000000..b040d20cd6 --- /dev/null +++ b/AutomatedTesting/Gem/Sponza/Assets/Textures/vaseRound_1k_metallic.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:12e3d690707f3fad9c26c402329ba1c1c7e751b6c38e11d965a1cfd8f67f61c3 +size 1143341 diff --git a/AutomatedTesting/Gem/Sponza/Assets/Textures/vaseRound_1k_normal.jpg b/AutomatedTesting/Gem/Sponza/Assets/Textures/vaseRound_1k_normal.jpg new file mode 100644 index 0000000000..866c9e0907 --- /dev/null +++ b/AutomatedTesting/Gem/Sponza/Assets/Textures/vaseRound_1k_normal.jpg @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:3cd9f31741ebd52c9ddcc65b3d33b875b39af16379fcaed35fcb662a12c382cf +size 81207 diff --git a/AutomatedTesting/Gem/Sponza/Assets/Textures/vaseRound_1k_roughness.png b/AutomatedTesting/Gem/Sponza/Assets/Textures/vaseRound_1k_roughness.png new file mode 100644 index 0000000000..05e201d968 --- /dev/null +++ b/AutomatedTesting/Gem/Sponza/Assets/Textures/vaseRound_1k_roughness.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:f7a398b8c249c20d199d53f203df79826a63d1f56d62c28403ce9e52065fb49f +size 1397051 diff --git a/AutomatedTesting/Gem/Sponza/Assets/Textures/vase_1k_ao.png b/AutomatedTesting/Gem/Sponza/Assets/Textures/vase_1k_ao.png new file mode 100644 index 0000000000..53e7968cbf --- /dev/null +++ b/AutomatedTesting/Gem/Sponza/Assets/Textures/vase_1k_ao.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:3740f6f1cac7251ee455c24498e0026da033d0c4994960a99cad4c78f0edcccb +size 639510 diff --git a/AutomatedTesting/Gem/Sponza/Assets/Textures/vase_1k_basecolor.png b/AutomatedTesting/Gem/Sponza/Assets/Textures/vase_1k_basecolor.png new file mode 100644 index 0000000000..76c61bfe2e --- /dev/null +++ b/AutomatedTesting/Gem/Sponza/Assets/Textures/vase_1k_basecolor.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:3b6b3d8fe5c470adbff0f9d9063c7efa1921491693a34b1fb383a9a60d7d7a9c +size 1838562 diff --git a/AutomatedTesting/Gem/Sponza/Assets/Textures/vase_1k_height.png b/AutomatedTesting/Gem/Sponza/Assets/Textures/vase_1k_height.png new file mode 100644 index 0000000000..50a9cab822 --- /dev/null +++ b/AutomatedTesting/Gem/Sponza/Assets/Textures/vase_1k_height.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:bc63680f8772effdad47e0a04def2bd8b6ec1dae8e8e7bfce2a11409a0c767a8 +size 572074 diff --git a/AutomatedTesting/Gem/Sponza/Assets/Textures/vase_1k_metallic.png b/AutomatedTesting/Gem/Sponza/Assets/Textures/vase_1k_metallic.png new file mode 100644 index 0000000000..d847f3d4a3 --- /dev/null +++ b/AutomatedTesting/Gem/Sponza/Assets/Textures/vase_1k_metallic.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:4d90cac110f7f129df7bd37d9c5e735be8f253be9e3798c3e2932ba351b8d7b5 +size 1044158 diff --git a/AutomatedTesting/Gem/Sponza/Assets/Textures/vase_1k_normal.jpg b/AutomatedTesting/Gem/Sponza/Assets/Textures/vase_1k_normal.jpg new file mode 100644 index 0000000000..559222c38c --- /dev/null +++ b/AutomatedTesting/Gem/Sponza/Assets/Textures/vase_1k_normal.jpg @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:387a9873c1ec3ebda366c19b94ca0c553f8015f7b48dd4adf8a53d3d83f3ad3d +size 217939 diff --git a/AutomatedTesting/Gem/Sponza/Assets/Textures/vase_1k_roughness.png b/AutomatedTesting/Gem/Sponza/Assets/Textures/vase_1k_roughness.png new file mode 100644 index 0000000000..999fdab25e --- /dev/null +++ b/AutomatedTesting/Gem/Sponza/Assets/Textures/vase_1k_roughness.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:5e5b7e0a1b62aa2b3f270e2fd4be4acb6a9b5c1c45f6eb83fa177c777e9f14b8 +size 1317066 diff --git a/AutomatedTesting/Gem/Sponza/Assets/license.txt b/AutomatedTesting/Gem/Sponza/Assets/license.txt new file mode 100644 index 0000000000..e303d8c767 --- /dev/null +++ b/AutomatedTesting/Gem/Sponza/Assets/license.txt @@ -0,0 +1,8 @@ +The content in this gem "O3DE\Gems\AtomContent\Sponza" is ported +from the original source, and modified for the O3DE Engine and Atom Renderer. + +The original "Crytek Sponza" scene data can be downloaded from the +"McGuire Computer Graphics Archive": https://casual-effects.com/data/ + +The original content is under the "CC BY 3.0" License: +https://creativecommons.org/licenses/by/3.0/ \ No newline at end of file diff --git a/AutomatedTesting/Gem/Sponza/Assets/objects/lightBlocker.fbx b/AutomatedTesting/Gem/Sponza/Assets/objects/lightBlocker.fbx new file mode 100644 index 0000000000..8064e80546 --- /dev/null +++ b/AutomatedTesting/Gem/Sponza/Assets/objects/lightBlocker.fbx @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:4284aa2655fefad45723d899824b99a732f8b1d5b231bb8b26734cae251e15d0 +size 23216 diff --git a/AutomatedTesting/Gem/Sponza/Assets/objects/lightBlocker_lambert1.material b/AutomatedTesting/Gem/Sponza/Assets/objects/lightBlocker_lambert1.material new file mode 100644 index 0000000000..c8e9f1f8f7 --- /dev/null +++ b/AutomatedTesting/Gem/Sponza/Assets/objects/lightBlocker_lambert1.material @@ -0,0 +1,19 @@ +{ + "description": "", + "materialType": "Materials/Types/StandardPBR.materialtype", + "parentMaterial": "", + "propertyLayoutVersion": 3, + "properties": { + "emissive": { + "color": [ + 0.0, + 0.0, + 0.0, + 1.0 + ] + }, + "opacity": { + "factor": 1.0 + } + } +} diff --git a/AutomatedTesting/Gem/Sponza/Assets/objects/sphere.fbx b/AutomatedTesting/Gem/Sponza/Assets/objects/sphere.fbx new file mode 100644 index 0000000000..734dbb2843 --- /dev/null +++ b/AutomatedTesting/Gem/Sponza/Assets/objects/sphere.fbx @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:67a3f676de88eb967df30d526a810e1c569a611904ff1a85628b66e75c4181f0 +size 47168 diff --git a/AutomatedTesting/Gem/Sponza/Assets/objects/sphereTwo.fbx b/AutomatedTesting/Gem/Sponza/Assets/objects/sphereTwo.fbx new file mode 100644 index 0000000000..99c96e832a --- /dev/null +++ b/AutomatedTesting/Gem/Sponza/Assets/objects/sphereTwo.fbx @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:a3abce1aadb4f505bf2eebbf8256598f9dab4cd5e9239e9a1523a70b4302912d +size 47184 diff --git a/AutomatedTesting/Gem/Sponza/Assets/objects/sponza.fbx b/AutomatedTesting/Gem/Sponza/Assets/objects/sponza.fbx new file mode 100644 index 0000000000..a38f51750a --- /dev/null +++ b/AutomatedTesting/Gem/Sponza/Assets/objects/sponza.fbx @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:6a8e686bd64cda37e8b27adcb691a846e62bcea6491547d53334ef4ed5424493 +size 21247456 diff --git a/AutomatedTesting/Gem/Sponza/Assets/objects/sponza_mat_arch.material b/AutomatedTesting/Gem/Sponza/Assets/objects/sponza_mat_arch.material new file mode 100644 index 0000000000..6518091265 --- /dev/null +++ b/AutomatedTesting/Gem/Sponza/Assets/objects/sponza_mat_arch.material @@ -0,0 +1,40 @@ +{ + "description": "", + "parentMaterial": "", + "materialType": "Materials/Types/StandardPBR.materialtype", + "materialTypeVersion": 4, + "properties": { + "baseColor": { + "textureMap": "../Textures/arch_1k_basecolor.png" + }, + "general": { + "applySpecularAA": true + }, + "irradiance": { + "color": [ + 0.2663614749908447, + 0.2383916974067688, + 0.18117037415504456, + 1.0 + ] + }, + "normal": { + "textureMap": "../Textures/arch_1k_normal.jpg" + }, + "occlusion": { + "diffuseTextureMap": "../Textures/arch_1k_ao.png" + }, + "opacity": { + "factor": 1.0 + }, + "parallax": { + "factor": 0.050999999046325684, + "pdo": true, + "quality": "High", + "useTexture": false + }, + "roughness": { + "textureMap": "../Textures/arch_1k_roughness.png" + } + } +} \ No newline at end of file diff --git a/AutomatedTesting/Gem/Sponza/Assets/objects/sponza_mat_background.material b/AutomatedTesting/Gem/Sponza/Assets/objects/sponza_mat_background.material new file mode 100644 index 0000000000..2fd7ed39cc --- /dev/null +++ b/AutomatedTesting/Gem/Sponza/Assets/objects/sponza_mat_background.material @@ -0,0 +1,45 @@ +{ + "description": "", + "parentMaterial": "", + "materialType": "Materials/Types/StandardPBR.materialtype", + "materialTypeVersion": 4, + "properties": { + "baseColor": { + "textureMap": "../Textures/background_1k_basecolor.png" + }, + "clearCoat": { + "factor": 0.5, + "normalMap": "../Textures/background_1k_normal.jpg", + "roughness": 0.4000000059604645 + }, + "general": { + "applySpecularAA": true + }, + "irradiance": { + "color": [ + 0.19806210696697235, + 0.1746547669172287, + 0.16513313353061676, + 1.0 + ] + }, + "normal": { + "textureMap": "../Textures/background_1k_normal.jpg" + }, + "occlusion": { + "diffuseTextureMap": "../Textures/background_1k_ao.png" + }, + "opacity": { + "factor": 1.0 + }, + "parallax": { + "factor": 0.03099999949336052, + "pdo": true, + "quality": "High", + "useTexture": false + }, + "roughness": { + "textureMap": "../Textures/background_1k_roughness.png" + } + } +} \ No newline at end of file diff --git a/AutomatedTesting/Gem/Sponza/Assets/objects/sponza_mat_bricks.material b/AutomatedTesting/Gem/Sponza/Assets/objects/sponza_mat_bricks.material new file mode 100644 index 0000000000..52fdf9e3a2 --- /dev/null +++ b/AutomatedTesting/Gem/Sponza/Assets/objects/sponza_mat_bricks.material @@ -0,0 +1,45 @@ +{ + "description": "", + "parentMaterial": "", + "materialType": "Materials/Types/StandardPBR.materialtype", + "materialTypeVersion": 4, + "properties": { + "baseColor": { + "textureMap": "../Textures/bricks_1k_basecolor.png" + }, + "clearCoat": { + "factor": 0.5, + "normalMap": "../Textures/bricks_1k_normal.jpg", + "roughness": 0.5 + }, + "general": { + "applySpecularAA": true + }, + "irradiance": { + "color": [ + 0.27467766404151917, + 0.27467766404151917, + 0.270496666431427, + 1.0 + ] + }, + "normal": { + "textureMap": "../Textures/bricks_1k_normal.jpg" + }, + "occlusion": { + "diffuseTextureMap": "../Textures/bricks_1k_ao.png" + }, + "opacity": { + "factor": 1.0 + }, + "parallax": { + "algorithm": "ContactRefinement", + "factor": 0.03500000014901161, + "quality": "Medium", + "useTexture": false + }, + "roughness": { + "textureMap": "../Textures/bricks_1k_roughness.png" + } + } +} \ No newline at end of file diff --git a/AutomatedTesting/Gem/Sponza/Assets/objects/sponza_mat_ceiling.material b/AutomatedTesting/Gem/Sponza/Assets/objects/sponza_mat_ceiling.material new file mode 100644 index 0000000000..10f5a01a8e --- /dev/null +++ b/AutomatedTesting/Gem/Sponza/Assets/objects/sponza_mat_ceiling.material @@ -0,0 +1,36 @@ +{ + "description": "", + "parentMaterial": "", + "materialType": "Materials/Types/StandardPBR.materialtype", + "materialTypeVersion": 4, + "properties": { + "baseColor": { + "textureMap": "../Textures/ceiling_1k_basecolor.png" + }, + "emissive": { + "color": [ + 0.0, + 0.0, + 0.0, + 1.0 + ] + }, + "irradiance": { + "color": [ + 0.29176774621009827, + 0.27888914942741394, + 0.2501564025878906, + 1.0 + ] + }, + "normal": { + "textureMap": "../Textures/ceiling_1k_normal.png" + }, + "opacity": { + "factor": 1.0 + }, + "roughness": { + "textureMap": "../Textures/ceiling_1k_roughness.png" + } + } +} \ No newline at end of file diff --git a/AutomatedTesting/Gem/Sponza/Assets/objects/sponza_mat_chain.material b/AutomatedTesting/Gem/Sponza/Assets/objects/sponza_mat_chain.material new file mode 100644 index 0000000000..caf03bd3ce --- /dev/null +++ b/AutomatedTesting/Gem/Sponza/Assets/objects/sponza_mat_chain.material @@ -0,0 +1,35 @@ +{ + "description": "", + "parentMaterial": "", + "materialType": "Materials/Types/StandardPBR.materialtype", + "materialTypeVersion": 4, + "properties": { + "baseColor": { + "textureBlendMode": "Lerp", + "textureMap": "../Textures/chain_basecolor.png" + }, + "emissive": { + "color": [ + 0.0, + 0.0, + 0.0, + 1.0 + ] + }, + "general": { + "doubleSided": true + }, + "metallic": { + "factor": 0.8899999856948853 + }, + "normal": { + "textureMap": "../Textures/chain_normal.jpg" + }, + "opacity": { + "alphaSource": "Split", + "factor": 1.0, + "mode": "Cutout", + "textureMap": "../Textures/chain_alpha.png" + } + } +} \ No newline at end of file diff --git a/AutomatedTesting/Gem/Sponza/Assets/objects/sponza_mat_columna.material b/AutomatedTesting/Gem/Sponza/Assets/objects/sponza_mat_columna.material new file mode 100644 index 0000000000..15c3fec349 --- /dev/null +++ b/AutomatedTesting/Gem/Sponza/Assets/objects/sponza_mat_columna.material @@ -0,0 +1,45 @@ +{ + "description": "", + "parentMaterial": "", + "materialType": "Materials/Types/StandardPBR.materialtype", + "materialTypeVersion": 4, + "properties": { + "baseColor": { + "textureMap": "../Textures/columnA_1k_basecolor.png" + }, + "clearCoat": { + "factor": 0.5, + "normalMap": "../Textures/columnA_1k_normal.jpg", + "roughness": 0.30000001192092896 + }, + "general": { + "applySpecularAA": true + }, + "irradiance": { + "color": [ + 1.0, + 0.8964369893074036, + 0.8264744281768799, + 1.0 + ] + }, + "normal": { + "textureMap": "../Textures/columnA_1k_normal.jpg" + }, + "occlusion": { + "diffuseTextureMap": "../Textures/columnA_1k_ao.png" + }, + "opacity": { + "factor": 1.0 + }, + "parallax": { + "factor": 0.017000000923871994, + "pdo": true, + "quality": "High", + "useTexture": false + }, + "roughness": { + "textureMap": "../Textures/columnA_1k_roughness.png" + } + } +} \ No newline at end of file diff --git a/AutomatedTesting/Gem/Sponza/Assets/objects/sponza_mat_columnb.material b/AutomatedTesting/Gem/Sponza/Assets/objects/sponza_mat_columnb.material new file mode 100644 index 0000000000..e13f96b2bb --- /dev/null +++ b/AutomatedTesting/Gem/Sponza/Assets/objects/sponza_mat_columnb.material @@ -0,0 +1,45 @@ +{ + "description": "", + "parentMaterial": "", + "materialType": "Materials/Types/StandardPBR.materialtype", + "materialTypeVersion": 4, + "properties": { + "baseColor": { + "textureMap": "../Textures/columnB_1k_basecolor.png" + }, + "clearCoat": { + "factor": 0.5, + "normalMap": "../Textures/columnB_1k_normal.jpg", + "roughness": 0.30000001192092896 + }, + "general": { + "applySpecularAA": true + }, + "irradiance": { + "color": [ + 0.41788357496261597, + 0.40723279118537903, + 0.4286869466304779, + 1.0 + ] + }, + "normal": { + "textureMap": "../Textures/columnB_1k_normal.jpg" + }, + "occlusion": { + "diffuseTextureMap": "../Textures/columnB_1k_ao.png" + }, + "opacity": { + "factor": 1.0 + }, + "parallax": { + "factor": 0.020999999716877937, + "pdo": true, + "quality": "High", + "useTexture": false + }, + "roughness": { + "textureMap": "../Textures/columnB_1k_roughness.png" + } + } +} \ No newline at end of file diff --git a/AutomatedTesting/Gem/Sponza/Assets/objects/sponza_mat_columnc.material b/AutomatedTesting/Gem/Sponza/Assets/objects/sponza_mat_columnc.material new file mode 100644 index 0000000000..479692848a --- /dev/null +++ b/AutomatedTesting/Gem/Sponza/Assets/objects/sponza_mat_columnc.material @@ -0,0 +1,45 @@ +{ + "description": "", + "parentMaterial": "", + "materialType": "Materials/Types/StandardPBR.materialtype", + "materialTypeVersion": 4, + "properties": { + "baseColor": { + "textureMap": "../Textures/columnC_1k_basecolor.png" + }, + "clearCoat": { + "factor": 0.5, + "normalMap": "../Textures/columnC_1k_normal.jpg", + "roughness": 0.30000001192092896 + }, + "general": { + "applySpecularAA": true + }, + "irradiance": { + "color": [ + 0.32314029335975647, + 0.29176774621009827, + 0.24228274822235107, + 1.0 + ] + }, + "normal": { + "textureMap": "../Textures/columnC_1k_normal.jpg" + }, + "occlusion": { + "diffuseTextureMap": "../Textures/columnC_1k_ao.png" + }, + "opacity": { + "factor": 1.0 + }, + "parallax": { + "factor": 0.014000000432133675, + "pdo": true, + "quality": "High", + "useTexture": false + }, + "roughness": { + "textureMap": "../Textures/columnC_1k_roughness.png" + } + } +} \ No newline at end of file diff --git a/AutomatedTesting/Gem/Sponza/Assets/objects/sponza_mat_curtainblue.material b/AutomatedTesting/Gem/Sponza/Assets/objects/sponza_mat_curtainblue.material new file mode 100644 index 0000000000..50fd968956 --- /dev/null +++ b/AutomatedTesting/Gem/Sponza/Assets/objects/sponza_mat_curtainblue.material @@ -0,0 +1,52 @@ +{ + "description": "", + "parentMaterial": "", + "materialType": "Materials/Types/StandardPBR.materialtype", + "materialTypeVersion": 4, + "properties": { + "baseColor": { + "color": [ + 1.0, + 1.0, + 1.0, + 1.0 + ], + "textureMap": "../Textures/curtainBlue_1k_basecolor.png" + }, + "emissive": { + "color": [ + 1.0, + 1.0, + 1.0, + 1.0 + ] + }, + "general": { + "applySpecularAA": true + }, + "irradiance": { + "color": [ + 0.0, + 0.14901961386203766, + 1.0, + 1.0 + ] + }, + "metallic": { + "textureMap": "../Textures/curtain_metallic.png" + }, + "normal": { + "factor": 0.5, + "textureMap": "../Textures/curtain_normal.jpg" + }, + "occlusion": { + "diffuseTextureMap": "../Textures/curtain_ao.png" + }, + "roughness": { + "textureMap": "../Textures/curtain_roughness.png" + }, + "specularF0": { + "enableMultiScatterCompensation": true + } + } +} \ No newline at end of file diff --git a/AutomatedTesting/Gem/Sponza/Assets/objects/sponza_mat_curtaingreen.material b/AutomatedTesting/Gem/Sponza/Assets/objects/sponza_mat_curtaingreen.material new file mode 100644 index 0000000000..6e70a42d24 --- /dev/null +++ b/AutomatedTesting/Gem/Sponza/Assets/objects/sponza_mat_curtaingreen.material @@ -0,0 +1,38 @@ +{ + "description": "", + "parentMaterial": "", + "materialType": "Materials/Types/StandardPBR.materialtype", + "materialTypeVersion": 4, + "properties": { + "baseColor": { + "textureMap": "../Textures/curtainGreen_1k_basecolor.png" + }, + "general": { + "applySpecularAA": true + }, + "irradiance": { + "color": [ + 0.0, + 0.15294118225574493, + 0.0, + 1.0 + ] + }, + "metallic": { + "textureMap": "../Textures/curtain_metallic.png" + }, + "normal": { + "factor": 0.5, + "textureMap": "../Textures/curtain_normal.jpg" + }, + "occlusion": { + "diffuseTextureMap": "../Textures/curtain_ao.png" + }, + "opacity": { + "factor": 1.0 + }, + "roughness": { + "textureMap": "../Textures/curtain_roughness.png" + } + } +} \ No newline at end of file diff --git a/AutomatedTesting/Gem/Sponza/Assets/objects/sponza_mat_curtainred.material b/AutomatedTesting/Gem/Sponza/Assets/objects/sponza_mat_curtainred.material new file mode 100644 index 0000000000..8233633310 --- /dev/null +++ b/AutomatedTesting/Gem/Sponza/Assets/objects/sponza_mat_curtainred.material @@ -0,0 +1,43 @@ +{ + "description": "", + "parentMaterial": "", + "materialType": "Materials/Types/StandardPBR.materialtype", + "materialTypeVersion": 4, + "properties": { + "baseColor": { + "textureMap": "../Textures/curtainRed_1k_basecolor.png" + }, + "general": { + "applySpecularAA": true + }, + "irradiance": { + "color": [ + 0.41960784792900085, + 0.003921568859368563, + 0.003921568859368563, + 1.0 + ] + }, + "metallic": { + "textureMap": "../Textures/curtain_metallic.png" + }, + "normal": { + "textureMap": "../Textures/curtain_normal.jpg" + }, + "occlusion": { + "diffuseTextureMap": "../Textures/curtain_ao.png" + }, + "opacity": { + "factor": 1.0 + }, + "roughness": { + "textureMap": "../Textures/curtain_roughness.png" + }, + "uv": { + "center": [ + 16.0, + 0.0 + ] + } + } +} \ No newline at end of file diff --git a/AutomatedTesting/Gem/Sponza/Assets/objects/sponza_mat_details.material b/AutomatedTesting/Gem/Sponza/Assets/objects/sponza_mat_details.material new file mode 100644 index 0000000000..b66d8fa679 --- /dev/null +++ b/AutomatedTesting/Gem/Sponza/Assets/objects/sponza_mat_details.material @@ -0,0 +1,39 @@ +{ + "description": "", + "parentMaterial": "", + "materialType": "Materials/Types/StandardPBR.materialtype", + "materialTypeVersion": 4, + "properties": { + "baseColor": { + "textureMap": "../Textures/details_1k_basecolor.png" + }, + "clearCoat": { + "factor": 0.5, + "normalMap": "../Textures/details_1k_normal.png", + "roughness": 0.25 + }, + "general": { + "applySpecularAA": true + }, + "metallic": { + "textureMap": "../Textures/details_1k_metallic.png" + }, + "normal": { + "textureMap": "../Textures/details_1k_normal.png" + }, + "occlusion": { + "diffuseTextureMap": "../Textures/details_1k_ao.png" + }, + "opacity": { + "factor": 1.0 + }, + "parallax": { + "factor": 0.02500000037252903, + "pdo": true, + "useTexture": false + }, + "roughness": { + "textureMap": "../Textures/details_1k_roughness.png" + } + } +} \ No newline at end of file diff --git a/AutomatedTesting/Gem/Sponza/Assets/objects/sponza_mat_fabricblue.material b/AutomatedTesting/Gem/Sponza/Assets/objects/sponza_mat_fabricblue.material new file mode 100644 index 0000000000..19ce3a6839 --- /dev/null +++ b/AutomatedTesting/Gem/Sponza/Assets/objects/sponza_mat_fabricblue.material @@ -0,0 +1,39 @@ +{ + "description": "", + "parentMaterial": "", + "materialType": "Materials/Types/StandardPBR.materialtype", + "materialTypeVersion": 4, + "properties": { + "baseColor": { + "textureMap": "../Textures/fabricBlue_1k_basecolor.png" + }, + "general": { + "applySpecularAA": true + }, + "irradiance": { + "color": [ + 0.0, + 0.15049973130226135, + 1.0, + 1.0 + ], + "factor": 0.30000001192092896 + }, + "metallic": { + "textureMap": "../Textures/fabric_metallic.png" + }, + "normal": { + "factor": 0.5, + "textureMap": "../Textures/fabric_normal.jpg" + }, + "occlusion": { + "diffuseTextureMap": "../Textures/fabric_ao.png" + }, + "opacity": { + "factor": 1.0 + }, + "roughness": { + "textureMap": "../Textures/fabric_roughness.png" + } + } +} \ No newline at end of file diff --git a/AutomatedTesting/Gem/Sponza/Assets/objects/sponza_mat_fabricgreen.material b/AutomatedTesting/Gem/Sponza/Assets/objects/sponza_mat_fabricgreen.material new file mode 100644 index 0000000000..94b8270fef --- /dev/null +++ b/AutomatedTesting/Gem/Sponza/Assets/objects/sponza_mat_fabricgreen.material @@ -0,0 +1,39 @@ +{ + "description": "", + "parentMaterial": "", + "materialType": "Materials/Types/StandardPBR.materialtype", + "materialTypeVersion": 4, + "properties": { + "baseColor": { + "textureMap": "../Textures/fabricGreen_1k_basecolor.png" + }, + "general": { + "applySpecularAA": true + }, + "irradiance": { + "color": [ + 0.0, + 0.15292592346668243, + 0.0012207217514514923, + 1.0 + ], + "factor": 0.30000001192092896 + }, + "metallic": { + "textureMap": "../Textures/fabric_metallic.png" + }, + "normal": { + "factor": 0.5, + "textureMap": "../Textures/fabric_normal.jpg" + }, + "occlusion": { + "diffuseTextureMap": "../Textures/fabric_ao.png" + }, + "opacity": { + "factor": 1.0 + }, + "roughness": { + "textureMap": "../Textures/fabric_roughness.png" + } + } +} \ No newline at end of file diff --git a/AutomatedTesting/Gem/Sponza/Assets/objects/sponza_mat_fabricred.material b/AutomatedTesting/Gem/Sponza/Assets/objects/sponza_mat_fabricred.material new file mode 100644 index 0000000000..7bd2ecddd0 --- /dev/null +++ b/AutomatedTesting/Gem/Sponza/Assets/objects/sponza_mat_fabricred.material @@ -0,0 +1,39 @@ +{ + "description": "", + "parentMaterial": "", + "materialType": "Materials/Types/StandardPBR.materialtype", + "materialTypeVersion": 4, + "properties": { + "baseColor": { + "textureMap": "../Textures/fabricRed_1k_basecolor.png" + }, + "general": { + "applySpecularAA": true + }, + "irradiance": { + "color": [ + 0.42040130496025085, + 0.004654001910239458, + 0.0037232013419270515, + 1.0 + ], + "factor": 0.30000001192092896 + }, + "metallic": { + "textureMap": "../Textures/fabric_metallic.png" + }, + "normal": { + "factor": 0.5, + "textureMap": "../Textures/fabric_normal.jpg" + }, + "occlusion": { + "diffuseTextureMap": "../Textures/fabric_ao.png" + }, + "opacity": { + "factor": 1.0 + }, + "roughness": { + "textureMap": "../Textures/fabric_roughness.png" + } + } +} \ No newline at end of file diff --git a/AutomatedTesting/Gem/Sponza/Assets/objects/sponza_mat_flagpole.material b/AutomatedTesting/Gem/Sponza/Assets/objects/sponza_mat_flagpole.material new file mode 100644 index 0000000000..aca6c05d29 --- /dev/null +++ b/AutomatedTesting/Gem/Sponza/Assets/objects/sponza_mat_flagpole.material @@ -0,0 +1,46 @@ +{ + "description": "", + "parentMaterial": "", + "materialType": "Materials/Types/StandardPBR.materialtype", + "materialTypeVersion": 4, + "properties": { + "baseColor": { + "textureMap": "../Textures/flagpole_1k_basecolor.png" + }, + "general": { + "applySpecularAA": true + }, + "irradiance": { + "color": [ + 1.0, + 0.6520485281944275, + 0.7122911214828491, + 1.0 + ] + }, + "metallic": { + "textureMap": "../Textures/flagpole_1k_metallic.png" + }, + "normal": { + "textureMap": "../Textures/flagpole_1k_normal.png" + }, + "occlusion": { + "diffuseTextureMap": "../Textures/flagpole_1k_ao.png" + }, + "opacity": { + "factor": 1.0 + }, + "parallax": { + "factor": 0.014000000432133675, + "pdo": true, + "quality": "High", + "useTexture": false + }, + "roughness": { + "textureMap": "../Textures/flagpole_1k_roughness.png" + }, + "specularF0": { + "enableMultiScatterCompensation": true + } + } +} \ No newline at end of file diff --git a/AutomatedTesting/Gem/Sponza/Assets/objects/sponza_mat_floor.material b/AutomatedTesting/Gem/Sponza/Assets/objects/sponza_mat_floor.material new file mode 100644 index 0000000000..b75143326d --- /dev/null +++ b/AutomatedTesting/Gem/Sponza/Assets/objects/sponza_mat_floor.material @@ -0,0 +1,44 @@ +{ + "description": "", + "parentMaterial": "", + "materialType": "Materials/Types/StandardPBR.materialtype", + "materialTypeVersion": 4, + "properties": { + "baseColor": { + "textureMap": "../Textures/floor_1k_basecolor.png" + }, + "clearCoat": { + "influenceMap": "../Textures/floor_1k_ao.png", + "normalMap": "../Textures/floor_1k_normal.png", + "roughness": 0.25 + }, + "general": { + "applySpecularAA": true + }, + "irradiance": { + "color": [ + 1.0, + 0.9404135346412659, + 0.8688944578170776, + 1.0 + ] + }, + "normal": { + "textureMap": "../Textures/floor_1k_normal.png" + }, + "occlusion": { + "diffuseTextureMap": "../Textures/floor_1k_ao.png" + }, + "opacity": { + "factor": 1.0 + }, + "parallax": { + "factor": 0.012000000104308128, + "pdo": true, + "useTexture": false + }, + "roughness": { + "textureMap": "../Textures/floor_1k_roughness.png" + } + } +} \ No newline at end of file diff --git a/AutomatedTesting/Gem/Sponza/Assets/objects/sponza_mat_leaf.material b/AutomatedTesting/Gem/Sponza/Assets/objects/sponza_mat_leaf.material new file mode 100644 index 0000000000..51638d6d94 --- /dev/null +++ b/AutomatedTesting/Gem/Sponza/Assets/objects/sponza_mat_leaf.material @@ -0,0 +1,43 @@ +{ + "description": "", + "parentMaterial": "", + "materialType": "Materials/Types/StandardPBR.materialtype", + "materialTypeVersion": 4, + "properties": { + "baseColor": { + "textureMap": "../Textures/thorn_basecolor.png" + }, + "clearCoat": { + "factor": 0.05000000074505806, + "normalMap": "../Textures/thorn_normal.jpg", + "roughness": 0.10000000149011612 + }, + "general": { + "applySpecularAA": true, + "doubleSided": true + }, + "irradiance": { + "color": [ + 0.46506446599960327, + 1.0, + 0.3944609761238098, + 1.0 + ] + }, + "normal": { + "textureMap": "../Textures/thorn_normal.jpg" + }, + "opacity": { + "alphaSource": "Split", + "factor": 0.20000000298023224, + "mode": "Cutout", + "textureMap": "../Textures/thorn_alpha.png" + }, + "parallax": { + "useTexture": false + }, + "roughness": { + "textureMap": "../Textures/thorn_roughness.png" + } + } +} \ No newline at end of file diff --git a/AutomatedTesting/Gem/Sponza/Assets/objects/sponza_mat_lion.material b/AutomatedTesting/Gem/Sponza/Assets/objects/sponza_mat_lion.material new file mode 100644 index 0000000000..eee41e9c13 --- /dev/null +++ b/AutomatedTesting/Gem/Sponza/Assets/objects/sponza_mat_lion.material @@ -0,0 +1,36 @@ +{ + "description": "", + "parentMaterial": "", + "materialType": "Materials/Types/StandardPBR.materialtype", + "materialTypeVersion": 4, + "properties": { + "baseColor": { + "textureMap": "../Textures/lion_1k_basecolor.png" + }, + "emissive": { + "color": [ + 0.0, + 0.0, + 0.0, + 1.0 + ] + }, + "irradiance": { + "color": [ + 0.5583428740501404, + 0.496940553188324, + 0.4125429093837738, + 1.0 + ] + }, + "normal": { + "textureMap": "../Textures/lion_1k_normal.jpg" + }, + "opacity": { + "factor": 1.0 + }, + "roughness": { + "textureMap": "../Textures/lion_1k_roughness.png" + } + } +} \ No newline at end of file diff --git a/AutomatedTesting/Gem/Sponza/Assets/objects/sponza_mat_roof.material b/AutomatedTesting/Gem/Sponza/Assets/objects/sponza_mat_roof.material new file mode 100644 index 0000000000..fec7bb1e34 --- /dev/null +++ b/AutomatedTesting/Gem/Sponza/Assets/objects/sponza_mat_roof.material @@ -0,0 +1,47 @@ +{ + "description": "", + "parentMaterial": "", + "materialType": "Materials/Types/StandardPBR.materialtype", + "materialTypeVersion": 4, + "properties": { + "baseColor": { + "textureBlendMode": "Lerp", + "textureMap": "../Textures/roof_1k_basecolor.png" + }, + "general": { + "applySpecularAA": true + }, + "irradiance": { + "color": [ + 0.29613184928894043, + 0.3324483036994934, + 0.45078203082084656, + 1.0 + ] + }, + "metallic": { + "textureMap": "../Textures/roof_1k_metallic.png", + "useTexture": false + }, + "normal": { + "factor": 0.5, + "flipY": true, + "textureMap": "../Textures/roof_1k_normal.jpg" + }, + "occlusion": { + "diffuseTextureMap": "../Textures/roof_1k_ao.png" + }, + "opacity": { + "factor": 1.0 + }, + "parallax": { + "algorithm": "ContactRefinement", + "factor": 0.019999999552965164, + "quality": "Medium", + "useTexture": false + }, + "roughness": { + "textureMap": "../Textures/roof_1k_roughness.png" + } + } +} \ No newline at end of file diff --git a/AutomatedTesting/Gem/Sponza/Assets/objects/sponza_mat_vase.material b/AutomatedTesting/Gem/Sponza/Assets/objects/sponza_mat_vase.material new file mode 100644 index 0000000000..da7a9de3a8 --- /dev/null +++ b/AutomatedTesting/Gem/Sponza/Assets/objects/sponza_mat_vase.material @@ -0,0 +1,46 @@ +{ + "description": "", + "parentMaterial": "", + "materialType": "Materials/Types/StandardPBR.materialtype", + "materialTypeVersion": 4, + "properties": { + "baseColor": { + "textureMap": "../Textures/vase_1k_basecolor.png" + }, + "general": { + "applySpecularAA": true + }, + "irradiance": { + "color": [ + 1.0, + 0.8713664412498474, + 0.6021667718887329, + 1.0 + ] + }, + "metallic": { + "textureMap": "../Textures/vase_1k_metallic.png" + }, + "normal": { + "textureMap": "../Textures/vase_1k_normal.jpg" + }, + "occlusion": { + "diffuseTextureMap": "../Textures/vase_1k_ao.png" + }, + "opacity": { + "factor": 1.0 + }, + "parallax": { + "factor": 0.027000000700354576, + "pdo": true, + "quality": "High", + "useTexture": false + }, + "roughness": { + "textureMap": "../Textures/vase_1k_roughness.png" + }, + "specularF0": { + "enableMultiScatterCompensation": true + } + } +} \ No newline at end of file diff --git a/AutomatedTesting/Gem/Sponza/Assets/objects/sponza_mat_vasehanging.material b/AutomatedTesting/Gem/Sponza/Assets/objects/sponza_mat_vasehanging.material new file mode 100644 index 0000000000..bda7aad38c --- /dev/null +++ b/AutomatedTesting/Gem/Sponza/Assets/objects/sponza_mat_vasehanging.material @@ -0,0 +1,43 @@ +{ + "description": "", + "parentMaterial": "", + "materialType": "Materials/Types/StandardPBR.materialtype", + "materialTypeVersion": 4, + "properties": { + "baseColor": { + "textureMap": "../Textures/vaseHanging_1k_basecolor.png" + }, + "general": { + "applySpecularAA": true + }, + "irradiance": { + "color": [ + 0.765606164932251, + 1.0, + 0.7052567601203918, + 1.0 + ] + }, + "metallic": { + "textureMap": "../Textures/vaseHanging_1k_metallic.png" + }, + "normal": { + "textureMap": "../Textures/vaseHanging_1k_normal.png" + }, + "occlusion": { + "diffuseTextureMap": "../Textures/vaseHanging_1k_ao.png" + }, + "opacity": { + "factor": 1.0 + }, + "parallax": { + "factor": 0.04600000008940697, + "pdo": true, + "quality": "High", + "useTexture": false + }, + "roughness": { + "textureMap": "../Textures/vaseHanging_1k_roughness.png" + } + } +} \ No newline at end of file diff --git a/AutomatedTesting/Gem/Sponza/Assets/objects/sponza_mat_vaseplant.material b/AutomatedTesting/Gem/Sponza/Assets/objects/sponza_mat_vaseplant.material new file mode 100644 index 0000000000..5546daa0e0 --- /dev/null +++ b/AutomatedTesting/Gem/Sponza/Assets/objects/sponza_mat_vaseplant.material @@ -0,0 +1,36 @@ +{ + "description": "", + "parentMaterial": "", + "materialType": "Materials/Types/StandardPBR.materialtype", + "materialTypeVersion": 4, + "properties": { + "baseColor": { + "color": [ + 0.800000011920929, + 0.800000011920929, + 0.800000011920929, + 1.0 + ], + "textureBlendMode": "Lerp", + "textureMap": "../Textures/vasePlant_1k_basecolor.png" + }, + "general": { + "applySpecularAA": true, + "doubleSided": true + }, + "irradiance": { + "color": [ + 0.09086747467517853, + 0.4111391007900238, + 0.0474097803235054, + 1.0 + ] + }, + "opacity": { + "alphaSource": "Split", + "factor": 0.23999999463558197, + "mode": "Cutout", + "textureMap": "../Textures/vasePlant_1k_alpha.png" + } + } +} \ No newline at end of file diff --git a/AutomatedTesting/Gem/Sponza/Assets/objects/sponza_mat_vaseround.material b/AutomatedTesting/Gem/Sponza/Assets/objects/sponza_mat_vaseround.material new file mode 100644 index 0000000000..268e3ab613 --- /dev/null +++ b/AutomatedTesting/Gem/Sponza/Assets/objects/sponza_mat_vaseround.material @@ -0,0 +1,49 @@ +{ + "description": "", + "parentMaterial": "", + "materialType": "Materials/Types/StandardPBR.materialtype", + "materialTypeVersion": 4, + "properties": { + "baseColor": { + "textureMap": "../Textures/vaseRound_1k_basecolor.png" + }, + "clearCoat": { + "factor": 0.5, + "influenceMap": "../Textures/vaseRound_1k_ao.png", + "normalMap": "../Textures/vaseRound_1k_normal.jpg", + "roughness": 0.25 + }, + "general": { + "applySpecularAA": true + }, + "irradiance": { + "color": [ + 0.46933698654174805, + 0.3824063539505005, + 0.47861447930336, + 1.0 + ] + }, + "normal": { + "textureMap": "../Textures/vaseRound_1k_normal.jpg" + }, + "occlusion": { + "diffuseTextureMap": "../Textures/vaseRound_1k_ao.png" + }, + "opacity": { + "factor": 1.0 + }, + "parallax": { + "factor": 0.019999999552965164, + "pdo": true, + "quality": "High", + "useTexture": false + }, + "roughness": { + "textureMap": "../Textures/vaseRound_1k_roughness.png" + }, + "specularF0": { + "enableMultiScatterCompensation": true + } + } +} \ No newline at end of file diff --git a/AutomatedTesting/Gem/Sponza/Assets/slices/lightingGRP.slice b/AutomatedTesting/Gem/Sponza/Assets/slices/lightingGRP.slice new file mode 100644 index 0000000000..97f3b3bb55 --- /dev/null +++ b/AutomatedTesting/Gem/Sponza/Assets/slices/lightingGRP.slice @@ -0,0 +1,962 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/AutomatedTesting/Gem/Sponza/CMakeLists.txt b/AutomatedTesting/Gem/Sponza/CMakeLists.txt new file mode 100644 index 0000000000..2d625a71b6 --- /dev/null +++ b/AutomatedTesting/Gem/Sponza/CMakeLists.txt @@ -0,0 +1,11 @@ +# +# Copyright (c) Contributors to the Open 3D Engine Project. +# For complete copyright and license terms please see the LICENSE at the root of this distribution. +# +# SPDX-License-Identifier: Apache-2.0 OR MIT +# +# +# This will export its "SourcePaths" to the generated "cmake_dependencies..assetbuilder.setreg" +if(PAL_TRAIT_BUILD_HOST_TOOLS) + ly_create_alias(NAME AtomContent_Sponza.Builders NAMESPACE Gem) +endif() \ No newline at end of file diff --git a/AutomatedTesting/Gem/Sponza/Registry/AssetProcessorPlatformConfig.setreg b/AutomatedTesting/Gem/Sponza/Registry/AssetProcessorPlatformConfig.setreg new file mode 100644 index 0000000000..206a0a2a87 --- /dev/null +++ b/AutomatedTesting/Gem/Sponza/Registry/AssetProcessorPlatformConfig.setreg @@ -0,0 +1,14 @@ +{ + "Amazon": { + "AssetProcessor": { + "Settings": { + // ------------------------------------------------------------------------------ + // Sample Gems, Block source folders + // ------------------------------------------------------------------------------ + "Exclude Work In Progress Folders": { + "pattern": "(^|.+/).[Ss]rc(/.*)?$" + } + } + } + } +} diff --git a/AutomatedTesting/Gem/Sponza/Tools/Launch_Cmd.bat b/AutomatedTesting/Gem/Sponza/Tools/Launch_Cmd.bat new file mode 100644 index 0000000000..0b94be5bea --- /dev/null +++ b/AutomatedTesting/Gem/Sponza/Tools/Launch_Cmd.bat @@ -0,0 +1,43 @@ +@echo off +:: Keep changes local +SETLOCAL enableDelayedExpansion + +REM +REM Copyright (c) Contributors to the Open 3D Engine Project +REM +REM SPDX-License-Identifier: Apache-2.0 OR MIT +REM For complete copyright and license terms please see the LICENSE at the root of this distribution. +REM +REM + +:: Set up and start a O3DE CMD prompt +:: Sets up the current (DCC) Project_Env, +:: Puts you in the CMD within the dev environment + +:: Set up window +TITLE O3DE DCC Scripting Interface Cmd +:: Use obvious color to prevent confusion (Grey with Yellow Text) +COLOR 8E + +%~d0 +cd %~dp0 +PUSHD %~dp0 + +CALL %~dp0\Project_Env.bat + +echo. +echo _____________________________________________________________________ +echo. +echo ~ O3DE %O3DE_PROJECT% Asset Gem CMD ... +echo _____________________________________________________________________ +echo. + +:: Create command prompt with environment +CALL %windir%\system32\cmd.exe + +ENDLOCAL + +:: Return to starting directory +POPD + +:END_OF_FILE \ No newline at end of file diff --git a/AutomatedTesting/Gem/Sponza/Tools/Launch_Maya.bat b/AutomatedTesting/Gem/Sponza/Tools/Launch_Maya.bat new file mode 100644 index 0000000000..0af25905a0 --- /dev/null +++ b/AutomatedTesting/Gem/Sponza/Tools/Launch_Maya.bat @@ -0,0 +1,66 @@ +@echo off + +REM +REM Copyright (c) Contributors to the Open 3D Engine Project. +REM For complete copyright and license terms please see the LICENSE at the root of this distribution. +REM +REM SPDX-License-Identifier: Apache-2.0 OR MIT +REM +REM + +%~d0 +cd %~dp0 +PUSHD %~dp0 + +echo ________________________________ +echo ~ calling PROJ_Env.bat + +:: Keep changes local +SETLOCAL enableDelayedExpansion + +:: PY version Major +IF "%DCCSI_PY_VERSION_MAJOR%"=="" (set DCCSI_PY_VERSION_MAJOR=2) +echo DCCSI_PY_VERSION_MAJOR = %DCCSI_PY_VERSION_MAJOR% + +:: PY version Major +IF "%DCCSI_PY_VERSION_MINOR%"=="" (set DCCSI_PY_VERSION_MINOR=7) +echo DCCSI_PY_VERSION_MINOR = %DCCSI_PY_VERSION_MINOR% + +:: Maya Version +IF "%DCCSI_MAYA_VERSION%"=="" (set DCCSI_MAYA_VERSION=2020) +echo DCCSI_MAYA_VERSION = %DCCSI_MAYA_VERSION% + +:: if a local customEnv.bat exists, run it +IF EXIST "%~dp0Project_Env.bat" CALL %~dp0Project_Env.bat + +echo ________________________________ +echo Launching Maya %DCCSI_MAYA_VERSION% for O3DE: %O3DE_PROJECT%... + +:::: Set Maya native project acess to this project +::set MAYA_PROJECT=%LY_PROJECT% +::echo MAYA_PROJECT = %MAYA_PROJECT% + +:: DX11 Viewport +Set MAYA_VP2_DEVICE_OVERRIDE = VirtualDeviceDx11 + +:: Default to the right version of Maya if we can detect it... and launch +echo MAYA_BIN_PATH = %MAYA_BIN_PATH% + +IF EXIST "%MAYA_BIN_PATH%\Maya.exe" ( + start "" "%MAYA_BIN_PATH%\Maya.exe" %* +) ELSE ( + Where maya.exe 2> NUL + IF ERRORLEVEL 1 ( + echo Maya.exe could not be found + pause + ) ELSE ( + start "" Maya.exe %* + ) +) + +:: Return to starting directory +POPD + +:END_OF_FILE + +exit /b 0 diff --git a/AutomatedTesting/Gem/Sponza/Tools/Project_Env.bat b/AutomatedTesting/Gem/Sponza/Tools/Project_Env.bat new file mode 100644 index 0000000000..ddf934d206 --- /dev/null +++ b/AutomatedTesting/Gem/Sponza/Tools/Project_Env.bat @@ -0,0 +1,107 @@ +@echo off + +REM +REM Copyright (c) Contributors to the Open 3D Engine Project +REM +REM SPDX-License-Identifier: Apache-2.0 OR MIT +REM For complete copyright and license terms please see the LICENSE at the root of this distribution. +REM +REM + +:: Sets up environment for O3DE DCC tools and code access + +:: Set up window +TITLE O3DE Asset Gem +:: Use obvious color to prevent confusion (Grey with Yellow Text) +COLOR 8E + +:: Skip initialization if already completed +IF "%O3DE_PROJ_ENV_INIT%"=="1" GOTO :END_OF_FILE + +:: Store current dir +%~d0 +cd %~dp0 +PUSHD %~dp0 + +:: Put you project env vars and overrides in this file + +:: chanhe the relative path up to dev +set ABS_PATH=%~dp0 + +:: project name as a str tag +IF "%O3DE_PROJECT%"=="" ( + for %%I in ("%~dp0.") do for %%J in ("%%~dpI.") do set O3DE_PROJECT=%%~nxJ + ) + +echo. +echo _____________________________________________________________________ +echo. +echo ~ Setting up O3DE %O3DE_PROJECT% Environment ... +echo _____________________________________________________________________ +echo. +echo O3DE_PROJECT = %O3DE_PROJECT% + +:: if the user has set up a custom env call it +:: this should allow the user to locally +:: set env hooks like O3DE_DEV or O3DE_PROJECT_PATH +IF EXIST "%~dp0User_Env.bat" CALL %~dp0User_Env.bat +echo O3DE_DEV = %O3DE_DEV% + +:: Constant Vars (Global) +:: global debug flag (propogates) +:: The intent here is to set and globally enter a debug mode +IF "%DCCSI_GDEBUG%"=="" (set DCCSI_GDEBUG=false) +echo DCCSI_GDEBUG = %DCCSI_GDEBUG% +:: initiates earliest debugger connection +:: we support attaching to WingIDE... PyCharm and VScode in the future +IF "%DCCSI_DEV_MODE%"=="" (set DCCSI_DEV_MODE=false) +echo DCCSI_DEV_MODE = %DCCSI_DEV_MODE% +:: sets debugger, options: WING, PYCHARM +IF "%DCCSI_GDEBUGGER%"=="" (set DCCSI_GDEBUGGER=WING) +echo DCCSI_GDEBUGGER = %DCCSI_GDEBUGGER% +:: Default level logger will handle +:: Override this to control the setting +:: CRITICAL:50 +:: ERROR:40 +:: WARNING:30 +:: INFO:20 +:: DEBUG:10 +:: NOTSET:0 +IF "%DCCSI_LOGLEVEL%"=="" (set DCCSI_LOGLEVEL=20) +echo DCCSI_LOGLEVEL = %DCCSI_LOGLEVEL% + +:: Override the default maya version +IF "%DCCSI_MAYA_VERSION%"=="" (set DCCSI_MAYA_VERSION=2020) +echo DCCSI_MAYA_VERSION = %DCCSI_MAYA_VERSION% + +:: O3DE_PROJECT_PATH is ideally treated as a full path in the env launchers +:: do to changes in o3de, external engine/project/gem folder structures, etc. +IF "%O3DE_PROJECT_PATH%"=="" ( + for %%i in ("%~dp0..") do set "O3DE_PROJECT_PATH=%%~fi" + ) +echo O3DE_PROJECT_PATH = %O3DE_PROJECT_PATH% + +:: Change to root O3DE dev dir +IF "%O3DE_DEV%"=="" echo ~ You must set O3DE_DEV in a User_Env.bat to match your local engine repo! +IF "%O3DE_DEV%"=="" echo ~ Using default O3DE_DEV=C:\Depot\o3de-engine +IF "%O3DE_DEV%"=="" (set O3DE_DEV=C:\Depot\o3de-engine) +echo O3DE_DEV = %O3DE_DEV% + +CALL %O3DE_DEV%\Gems\AtomLyIntegration\TechnicalArt\DccScriptingInterface\Tools\Dev\Windows\Env_Maya.bat + +:: Restore original directory +popd + +:: Change to root dir +CD /D %ABS_PATH% + +::ENDLOCAL + +:: Set flag so we don't initialize dccsi environment twice +SET O3DE_PROJ_ENV_INIT=1 +GOTO END_OF_FILE + +:: Return to starting directory +POPD + +:END_OF_FILE diff --git a/AutomatedTesting/Gem/Sponza/Tools/User_Env.bat.template b/AutomatedTesting/Gem/Sponza/Tools/User_Env.bat.template new file mode 100644 index 0000000000..d108f30a5b --- /dev/null +++ b/AutomatedTesting/Gem/Sponza/Tools/User_Env.bat.template @@ -0,0 +1,42 @@ +@echo off + +REM +REM Copyright (c) Contributors to the Open 3D Engine Project +REM +REM SPDX-License-Identifier: Apache-2.0 OR MIT +REM For complete copyright and license terms please see the LICENSE at the root of this distribution. +REM +REM + +:: copy this file, rename to User_Env.bat (remove .template) +:: use this file to override any local properties that differ from base + +:: Skip initialization if already completed +IF "%O3DE_USER_ENV_INIT%"=="1" GOTO :END_OF_FILE + +:: Store current dir +%~d0 +cd %~dp0 +PUSHD %~dp0 + +SET O3DE_DEV=C:\Depot\o3de-engine +::SET OCIO_APPS=C:\Depot\o3de-engine\Tools\ColorGrading\ocio\build\src\apps +SET TAG_LY_BUILD_PATH=build +SET DCCSI_GDEBUG=True +SET DCCSI_DEV_MODE=True + +set DCCSI_MAYA_VERSION=2020 + +:: set the your user name here for windows path +SET TAG_USERNAME=NOT_SET +SET DCCSI_PY_REV=rev1 +SET DCCSI_PY_PLATFORM=windows + +:: Set flag so we don't initialize dccsi environment twice +SET O3DE_USER_ENV_INIT=1 +GOTO END_OF_FILE + +:: Return to starting directory +POPD + +:END_OF_FILE \ No newline at end of file diff --git a/AutomatedTesting/Gem/Sponza/gem.json b/AutomatedTesting/Gem/Sponza/gem.json new file mode 100644 index 0000000000..68749cd5f4 --- /dev/null +++ b/AutomatedTesting/Gem/Sponza/gem.json @@ -0,0 +1,17 @@ +{ + "gem_name": "Sponza", + "display_name": "Sponza", + "license": "Apache-2.0 Or MIT", + "license_url": "https://github.com/o3de/o3de/blob/development/LICENSE.txt", + "origin": "Open 3D Engine - o3de.org", + "type": "Asset", + "summary": "A standard test scene for Global Illumination (forked from crytek sponza scene)", + "canonical_tags": [ + "Gem" + ], + "user_tags": [ + "Assets" + ], + "requirements": "", + "dependencies": [] +} diff --git a/AutomatedTesting/Gem/Sponza/workspace.mel b/AutomatedTesting/Gem/Sponza/workspace.mel new file mode 100644 index 0000000000..b082b73ef7 --- /dev/null +++ b/AutomatedTesting/Gem/Sponza/workspace.mel @@ -0,0 +1,89 @@ +//Maya 2020 Project Definition + +workspace -fr "fluidCache" ""; +workspace -fr "JT_ATF" ""; +workspace -fr "images" ".maya_data/Images"; +workspace -fr "offlineEdit" ".maya_data/scenes/edits"; +workspace -fr "STEP_ATF Export" ""; +workspace -fr "furShadowMap" ""; +workspace -fr "SVG" ""; +workspace -fr "scripts" "ArtSource/Maya/Scripts"; +workspace -fr "DAE_FBX" ""; +workspace -fr "shaders" "ArtSource/Maya/Shaders"; +workspace -fr "NX_ATF" ""; +workspace -fr "CATIAV5_ATF Export" ""; +workspace -fr "furFiles" ""; +workspace -fr "OBJ" ".maya_data/obj"; +workspace -fr "PARASOLID_ATF Export" ""; +workspace -fr "FBX export" "Assets/Objects"; +workspace -fr "furEqualMap" ""; +workspace -fr "textures" "Assets/textures"; +workspace -fr "BIF" ""; +workspace -fr "lights" ".maya_data/renderData/shaders"; +workspace -fr "DAE_FBX export" ""; +workspace -fr "aliasWire" ".maya_data/data"; +workspace -fr "CATIAV5_ATF" ""; +workspace -fr "SAT_ATF Export" ""; +workspace -fr "movie" ".maya_data/movies"; +workspace -fr "ASS Export" ""; +workspace -fr "mayaAscii" ""; +workspace -fr "move" ".maya_data"; +workspace -fr "autoSave" ".maya_data/autoSave"; +workspace -fr "NX_ATF Export" ""; +workspace -fr "sound" ".maya_data/sound"; +workspace -fr "mayaBinary" ""; +workspace -fr "timeEditor" ""; +workspace -fr "RIBexport" ".maya_data/data"; +workspace -fr "DWG_ATF" ""; +workspace -fr "mentalray" ".maya_data/renderData/mentalray"; +workspace -fr "Arnold-USD" ""; +workspace -fr "JT_ATF Export" ""; +workspace -fr "iprImages" ".maya_data/renderData/iprImages"; +workspace -fr "FBX" "Assets/Objects"; +workspace -fr "renderData" ".maya_data/renderData"; +workspace -fr "CATIAV4_ATF" ""; +workspace -fr "fileCache" ""; +workspace -fr "Fbx" "Assets/Objects"; +workspace -fr "eps" ""; +workspace -fr "IGESexport" ".maya_data/data"; +workspace -fr "3dPaintTextures" ".maya_data/3dPaintTextures"; +workspace -fr "DXF_ATF Export" ""; +workspace -fr "mel" ".maya_data/mel"; +workspace -fr "translatorData" ""; +workspace -fr "IGES" ".maya_data/data"; +workspace -fr "particles" ".maya_data/particles"; +workspace -fr "DXFexport" ".maya_data/data"; +workspace -fr "DXF_ATF" ""; +workspace -fr "scene" "Assets/Objects"; +workspace -fr "renderScenes" ".maya_data/renderScenes"; +workspace -fr "SAT_ATF" ""; +workspace -fr "PROE_ATF" ""; +workspace -fr "WIRE_ATF Export" ""; +workspace -fr "sourceImages" "ArtSource/Images"; +workspace -fr "RIB" ".maya_data/data"; +workspace -fr "furImages" ""; +workspace -fr "clips" ".maya_data/clips"; +workspace -fr "Adobe(R) Illustrator(R)" ".maya_data/data"; +workspace -fr "animExport" ".maya_data/data"; +workspace -fr "mentalRay" ".maya_data/mentalRay"; +workspace -fr "STEP_ATF" ""; +workspace -fr "DWG_ATF Export" ""; +workspace -fr "depth" ".maya_data/renderData/depth"; +workspace -fr "sceneAssembly" ""; +workspace -fr "IGES_ATF Export" ""; +workspace -fr "teClipExports" ""; +workspace -fr "IGES_ATF" ""; +workspace -fr "PARASOLID_ATF" ""; +workspace -fr "ASS" ""; +workspace -fr "Substance" ".maya_data/data"; +workspace -fr "audio" ".maya_data/sound"; +workspace -fr "EPS" ".maya_data/data"; +workspace -fr "Alembic" "Assets/Objects"; +workspace -fr "diskCache" ".maya_data/cache"; +workspace -fr "illustrator" ""; +workspace -fr "WIRE_ATF" ""; +workspace -fr "templates" "ArtSource/SceneTemplates"; +workspace -fr "animImport" ".maya_data/data"; +workspace -fr "OBJexport" "Assets/Objects"; +workspace -fr "furAttrMap" ""; +workspace -fr "DXF" ".maya_data/data"; diff --git a/AutomatedTesting/Gem/gem.json b/AutomatedTesting/Gem/gem.json index 6c8c7829ce..df197df09d 100644 --- a/AutomatedTesting/Gem/gem.json +++ b/AutomatedTesting/Gem/gem.json @@ -2,10 +2,13 @@ "gem_name": "AutomatedTesting", "display_name": "AutomatedTesting", "license": "Apache-2.0 Or MIT", + "license_url": "https://github.com/o3de/o3de/blob/development/LICENSE.txt", "origin": "Amazon Web Services, Inc.", "type": "Code", "summary": "Project Gem for customizing the AutomatedTesting project functionality.", - "canonical_tags": ["Gem"], + "canonical_tags": [ + "Gem" + ], "user_tags": [], "icon_path": "preview.png", "requirements": "" diff --git a/AutomatedTesting/Levels/AWS/ClientAuth/ClientAuth.ly b/AutomatedTesting/Levels/AWS/ClientAuth/ClientAuth.ly deleted file mode 100644 index b4a2d6cb3a..0000000000 --- a/AutomatedTesting/Levels/AWS/ClientAuth/ClientAuth.ly +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:19f2c4454bb395cdc0a36d1e45e6a384bbd23037af1a2fb93e088ecfa0f10e5b -size 9343 diff --git a/AutomatedTesting/Levels/AWS/ClientAuth/ClientAuth.prefab b/AutomatedTesting/Levels/AWS/ClientAuth/ClientAuth.prefab new file mode 100644 index 0000000000..8f2fb61c71 --- /dev/null +++ b/AutomatedTesting/Levels/AWS/ClientAuth/ClientAuth.prefab @@ -0,0 +1,620 @@ +{ + "ContainerEntity": { + "Id": "Entity_[1146574390643]", + "Name": "Level", + "Components": { + "Component_[10641544592923449938]": { + "$type": "EditorInspectorComponent", + "Id": 10641544592923449938 + }, + "Component_[12039882709170782873]": { + "$type": "EditorOnlyEntityComponent", + "Id": 12039882709170782873 + }, + "Component_[12265484671603697631]": { + "$type": "EditorPendingCompositionComponent", + "Id": 12265484671603697631 + }, + "Component_[14126657869720434043]": { + "$type": "EditorEntitySortComponent", + "Id": 14126657869720434043, + "Child Entity Order": [ + "Entity_[1176639161715]", + "Entity_[2670735447885]", + "Entity_[2670735447885]" + ] + }, + "Component_[15230859088967841193]": { + "$type": "{27F1E1A1-8D9D-4C3B-BD3A-AFB9762449C0} TransformComponent", + "Id": 15230859088967841193, + "Parent Entity": "" + }, + "Component_[16239496886950819870]": { + "$type": "EditorDisabledCompositionComponent", + "Id": 16239496886950819870 + }, + "Component_[5688118765544765547]": { + "$type": "EditorEntityIconComponent", + "Id": 5688118765544765547 + }, + "Component_[6545738857812235305]": { + "$type": "SelectionComponent", + "Id": 6545738857812235305 + }, + "Component_[7247035804068349658]": { + "$type": "EditorPrefabComponent", + "Id": 7247035804068349658 + }, + "Component_[9307224322037797205]": { + "$type": "EditorLockComponent", + "Id": 9307224322037797205 + }, + "Component_[9562516168917670048]": { + "$type": "EditorVisibilityComponent", + "Id": 9562516168917670048 + } + } + }, + "Entities": { + "Entity_[1155164325235]": { + "Id": "Entity_[1155164325235]", + "Name": "Sun", + "Components": { + "Component_[10440557478882592717]": { + "$type": "SelectionComponent", + "Id": 10440557478882592717 + }, + "Component_[13620450453324765907]": { + "$type": "EditorLockComponent", + "Id": 13620450453324765907 + }, + "Component_[2134313378593666258]": { + "$type": "EditorInspectorComponent", + "Id": 2134313378593666258 + }, + "Component_[234010807770404186]": { + "$type": "EditorVisibilityComponent", + "Id": 234010807770404186 + }, + "Component_[2970359110423865725]": { + "$type": "EditorEntityIconComponent", + "Id": 2970359110423865725 + }, + "Component_[3722854130373041803]": { + "$type": "EditorOnlyEntityComponent", + "Id": 3722854130373041803 + }, + "Component_[5992533738676323195]": { + "$type": "EditorDisabledCompositionComponent", + "Id": 5992533738676323195 + }, + "Component_[7378860763541895402]": { + "$type": "AZ::Render::EditorDirectionalLightComponent", + "Id": 7378860763541895402, + "Controller": { + "Configuration": { + "Intensity": 1.0, + "CameraEntityId": "", + "ShadowFilterMethod": 1 + } + } + }, + "Component_[7892834440890947578]": { + "$type": "{27F1E1A1-8D9D-4C3B-BD3A-AFB9762449C0} TransformComponent", + "Id": 7892834440890947578, + "Parent Entity": "Entity_[1176639161715]", + "Transform Data": { + "Translate": [ + 0.0, + 0.0, + 13.487043380737305 + ], + "Rotate": [ + -76.13099670410156, + -0.847000002861023, + -15.8100004196167 + ] + } + }, + "Component_[8599729549570828259]": { + "$type": "EditorEntitySortComponent", + "Id": 8599729549570828259 + }, + "Component_[952797371922080273]": { + "$type": "EditorPendingCompositionComponent", + "Id": 952797371922080273 + } + } + }, + "Entity_[1159459292531]": { + "Id": "Entity_[1159459292531]", + "Name": "Ground", + "Components": { + "Component_[11701138785793981042]": { + "$type": "SelectionComponent", + "Id": 11701138785793981042 + }, + "Component_[12260880513256986252]": { + "$type": "EditorEntityIconComponent", + "Id": 12260880513256986252 + }, + "Component_[13711420870643673468]": { + "$type": "EditorDisabledCompositionComponent", + "Id": 13711420870643673468 + }, + "Component_[138002849734991713]": { + "$type": "EditorOnlyEntityComponent", + "Id": 138002849734991713 + }, + "Component_[16578565737331764849]": { + "$type": "{27F1E1A1-8D9D-4C3B-BD3A-AFB9762449C0} TransformComponent", + "Id": 16578565737331764849, + "Parent Entity": "Entity_[1176639161715]" + }, + "Component_[16919232076966545697]": { + "$type": "EditorInspectorComponent", + "Id": 16919232076966545697 + }, + "Component_[5182430712893438093]": { + "$type": "EditorMaterialComponent", + "Id": 5182430712893438093 + }, + "Component_[5675108321710651991]": { + "$type": "AZ::Render::EditorMeshComponent", + "Id": 5675108321710651991, + "Controller": { + "Configuration": { + "ModelAsset": { + "assetId": { + "guid": "{0CD745C0-6AA8-569A-A68A-73A3270986C4}", + "subId": 277889906 + }, + "assetHint": "objects/groudplane/groundplane_512x512m.azmodel" + } + } + } + }, + "Component_[5681893399601237518]": { + "$type": "EditorEntitySortComponent", + "Id": 5681893399601237518 + }, + "Component_[592692962543397545]": { + "$type": "EditorPendingCompositionComponent", + "Id": 592692962543397545 + }, + "Component_[7090012899106946164]": { + "$type": "EditorLockComponent", + "Id": 7090012899106946164 + }, + "Component_[9410832619875640998]": { + "$type": "EditorVisibilityComponent", + "Id": 9410832619875640998 + } + } + }, + "Entity_[1163754259827]": { + "Id": "Entity_[1163754259827]", + "Name": "Camera", + "Components": { + "Component_[11895140916889160460]": { + "$type": "EditorEntityIconComponent", + "Id": 11895140916889160460 + }, + "Component_[16880285896855930892]": { + "$type": "{CA11DA46-29FF-4083-B5F6-E02C3A8C3A3D} EditorCameraComponent", + "Id": 16880285896855930892, + "Controller": { + "Configuration": { + "Field of View": 55.0, + "EditorEntityId": 6861302815203973165 + } + } + }, + "Component_[17187464423780271193]": { + "$type": "EditorLockComponent", + "Id": 17187464423780271193 + }, + "Component_[17495696818315413311]": { + "$type": "EditorEntitySortComponent", + "Id": 17495696818315413311 + }, + "Component_[18086214374043522055]": { + "$type": "{27F1E1A1-8D9D-4C3B-BD3A-AFB9762449C0} TransformComponent", + "Id": 18086214374043522055, + "Parent Entity": "Entity_[1176639161715]", + "Transform Data": { + "Translate": [ + -2.3000001907348633, + -3.9368600845336914, + 1.0 + ], + "Rotate": [ + -2.050307512283325, + 1.9552897214889526, + -43.623355865478516 + ] + } + }, + "Component_[18387556550380114975]": { + "$type": "SelectionComponent", + "Id": 18387556550380114975 + }, + "Component_[2654521436129313160]": { + "$type": "EditorVisibilityComponent", + "Id": 2654521436129313160 + }, + "Component_[5265045084611556958]": { + "$type": "EditorDisabledCompositionComponent", + "Id": 5265045084611556958 + }, + "Component_[7169798125182238623]": { + "$type": "EditorPendingCompositionComponent", + "Id": 7169798125182238623 + }, + "Component_[7255796294953281766]": { + "$type": "GenericComponentWrapper", + "Id": 7255796294953281766, + "m_template": { + "$type": "FlyCameraInputComponent" + } + }, + "Component_[8866210352157164042]": { + "$type": "EditorInspectorComponent", + "Id": 8866210352157164042 + }, + "Component_[9129253381063760879]": { + "$type": "EditorOnlyEntityComponent", + "Id": 9129253381063760879 + } + } + }, + "Entity_[1168049227123]": { + "Id": "Entity_[1168049227123]", + "Name": "Grid", + "Components": { + "Component_[11443347433215807130]": { + "$type": "EditorEntityIconComponent", + "Id": 11443347433215807130 + }, + "Component_[11779275529534764488]": { + "$type": "SelectionComponent", + "Id": 11779275529534764488 + }, + "Component_[14249419413039427459]": { + "$type": "EditorInspectorComponent", + "Id": 14249419413039427459 + }, + "Component_[15448581635946161318]": { + "$type": "AZ::Render::EditorGridComponent", + "Id": 15448581635946161318, + "Controller": { + "Configuration": { + "primarySpacing": 4.0, + "primaryColor": [ + 0.501960813999176, + 0.501960813999176, + 0.501960813999176 + ], + "secondarySpacing": 0.5, + "secondaryColor": [ + 0.250980406999588, + 0.250980406999588, + 0.250980406999588 + ] + } + } + }, + "Component_[1843303322527297409]": { + "$type": "EditorDisabledCompositionComponent", + "Id": 1843303322527297409 + }, + "Component_[380249072065273654]": { + "$type": "{27F1E1A1-8D9D-4C3B-BD3A-AFB9762449C0} TransformComponent", + "Id": 380249072065273654, + "Parent Entity": "Entity_[1176639161715]" + }, + "Component_[7476660583684339787]": { + "$type": "EditorPendingCompositionComponent", + "Id": 7476660583684339787 + }, + "Component_[7557626501215118375]": { + "$type": "EditorEntitySortComponent", + "Id": 7557626501215118375 + }, + "Component_[7984048488947365511]": { + "$type": "EditorVisibilityComponent", + "Id": 7984048488947365511 + }, + "Component_[8118181039276487398]": { + "$type": "EditorOnlyEntityComponent", + "Id": 8118181039276487398 + }, + "Component_[9189909764215270515]": { + "$type": "EditorLockComponent", + "Id": 9189909764215270515 + } + } + }, + "Entity_[1172344194419]": { + "Id": "Entity_[1172344194419]", + "Name": "Shader Ball", + "Components": { + "Component_[10789351944715265527]": { + "$type": "EditorOnlyEntityComponent", + "Id": 10789351944715265527 + }, + "Component_[12037033284781049225]": { + "$type": "EditorEntitySortComponent", + "Id": 12037033284781049225 + }, + "Component_[13759153306105970079]": { + "$type": "EditorPendingCompositionComponent", + "Id": 13759153306105970079 + }, + "Component_[14135560884830586279]": { + "$type": "EditorInspectorComponent", + "Id": 14135560884830586279 + }, + "Component_[16247165675903986673]": { + "$type": "EditorVisibilityComponent", + "Id": 16247165675903986673 + }, + "Component_[18082433625958885247]": { + "$type": "EditorDisabledCompositionComponent", + "Id": 18082433625958885247 + }, + "Component_[6472623349872972660]": { + "$type": "{27F1E1A1-8D9D-4C3B-BD3A-AFB9762449C0} TransformComponent", + "Id": 6472623349872972660, + "Parent Entity": "Entity_[1176639161715]", + "Transform Data": { + "Rotate": [ + 0.0, + 0.10000000149011612, + 180.0 + ] + } + }, + "Component_[6495255223970673916]": { + "$type": "AZ::Render::EditorMeshComponent", + "Id": 6495255223970673916, + "Controller": { + "Configuration": { + "ModelAsset": { + "assetId": { + "guid": "{FD340C30-755C-5911-92A3-19A3F7A77931}", + "subId": 281415304 + }, + "assetHint": "objects/shaderball/shaderball_default_1m.azmodel" + } + } + } + }, + "Component_[8056625192494070973]": { + "$type": "SelectionComponent", + "Id": 8056625192494070973 + }, + "Component_[8550141614185782969]": { + "$type": "EditorEntityIconComponent", + "Id": 8550141614185782969 + }, + "Component_[9439770997198325425]": { + "$type": "EditorLockComponent", + "Id": 9439770997198325425 + } + } + }, + "Entity_[1176639161715]": { + "Id": "Entity_[1176639161715]", + "Name": "Atom Default Environment", + "Components": { + "Component_[10757302973393310045]": { + "$type": "{27F1E1A1-8D9D-4C3B-BD3A-AFB9762449C0} TransformComponent", + "Id": 10757302973393310045, + "Parent Entity": "Entity_[1146574390643]" + }, + "Component_[14505817420424255464]": { + "$type": "EditorInspectorComponent", + "Id": 14505817420424255464, + "ComponentOrderEntryArray": [ + { + "ComponentId": 10757302973393310045 + } + ] + }, + "Component_[14988041764659020032]": { + "$type": "EditorLockComponent", + "Id": 14988041764659020032 + }, + "Component_[15808690248755038124]": { + "$type": "SelectionComponent", + "Id": 15808690248755038124 + }, + "Component_[15900837685796817138]": { + "$type": "EditorVisibilityComponent", + "Id": 15900837685796817138 + }, + "Component_[3298767348226484884]": { + "$type": "EditorOnlyEntityComponent", + "Id": 3298767348226484884 + }, + "Component_[4076975109609220594]": { + "$type": "EditorPendingCompositionComponent", + "Id": 4076975109609220594 + }, + "Component_[5679760548946028854]": { + "$type": "EditorDisabledCompositionComponent", + "Id": 5679760548946028854 + }, + "Component_[5855590796136709437]": { + "$type": "EditorEntitySortComponent", + "Id": 5855590796136709437, + "Child Entity Order": [ + "Entity_[1155164325235]", + "Entity_[1180934129011]", + "Entity_[1172344194419]", + "Entity_[1168049227123]", + "Entity_[1163754259827]", + "Entity_[1159459292531]" + ] + }, + "Component_[9277695270015777859]": { + "$type": "EditorEntityIconComponent", + "Id": 9277695270015777859 + } + } + }, + "Entity_[1180934129011]": { + "Id": "Entity_[1180934129011]", + "Name": "Global Sky", + "Components": { + "Component_[11231930600558681245]": { + "$type": "AZ::Render::EditorHDRiSkyboxComponent", + "Id": 11231930600558681245, + "Controller": { + "Configuration": { + "CubemapAsset": { + "assetId": { + "guid": "{215E47FD-D181-5832-B1AB-91673ABF6399}", + "subId": 1000 + }, + "assetHint": "lightingpresets/highcontrast/goegap_4k_skyboxcm.exr.streamingimage" + } + } + } + }, + "Component_[11980494120202836095]": { + "$type": "SelectionComponent", + "Id": 11980494120202836095 + }, + "Component_[1428633914413949476]": { + "$type": "EditorLockComponent", + "Id": 1428633914413949476 + }, + "Component_[14936200426671614999]": { + "$type": "AZ::Render::EditorImageBasedLightComponent", + "Id": 14936200426671614999, + "Controller": { + "Configuration": { + "diffuseImageAsset": { + "assetId": { + "guid": "{3FD09945-D0F2-55C8-B9AF-B2FD421FE3BE}", + "subId": 3000 + }, + "assetHint": "lightingpresets/highcontrast/goegap_4k_iblglobalcm_ibldiffuse.exr.streamingimage" + }, + "specularImageAsset": { + "assetId": { + "guid": "{3FD09945-D0F2-55C8-B9AF-B2FD421FE3BE}", + "subId": 2000 + }, + "assetHint": "lightingpresets/highcontrast/goegap_4k_iblglobalcm_iblspecular.exr.streamingimage" + } + } + } + }, + "Component_[14994774102579326069]": { + "$type": "EditorDisabledCompositionComponent", + "Id": 14994774102579326069 + }, + "Component_[15417479889044493340]": { + "$type": "EditorPendingCompositionComponent", + "Id": 15417479889044493340 + }, + "Component_[15826613364991382688]": { + "$type": "EditorEntitySortComponent", + "Id": 15826613364991382688 + }, + "Component_[1665003113283562343]": { + "$type": "EditorOnlyEntityComponent", + "Id": 1665003113283562343 + }, + "Component_[3704934735944502280]": { + "$type": "EditorEntityIconComponent", + "Id": 3704934735944502280 + }, + "Component_[5698542331457326479]": { + "$type": "EditorVisibilityComponent", + "Id": 5698542331457326479 + }, + "Component_[6644513399057217122]": { + "$type": "{27F1E1A1-8D9D-4C3B-BD3A-AFB9762449C0} TransformComponent", + "Id": 6644513399057217122, + "Parent Entity": "Entity_[1176639161715]" + }, + "Component_[931091830724002070]": { + "$type": "EditorInspectorComponent", + "Id": 931091830724002070 + } + } + }, + "Entity_[2670735447885]": { + "Id": "Entity_[2670735447885]", + "Name": "AnonymousAuthorization", + "Components": { + "Component_[11400228652398928245]": { + "$type": "EditorOnlyEntityComponent", + "Id": 11400228652398928245 + }, + "Component_[15542812360906781451]": { + "$type": "{27F1E1A1-8D9D-4C3B-BD3A-AFB9762449C0} TransformComponent", + "Id": 15542812360906781451, + "Parent Entity": "Entity_[1146574390643]", + "Transform Data": { + "Translate": [ + 0.0, + 0.10000038146972656, + 4.005923748016357 + ] + } + }, + "Component_[16858205397479531670]": { + "$type": "EditorLockComponent", + "Id": 16858205397479531670 + }, + "Component_[1921474395300693283]": { + "$type": "EditorScriptCanvasComponent", + "Id": 1921474395300693283, + "m_name": "ConitoAnonymousAuthorization.scriptcanvas", + "runtimeDataIsValid": true, + "runtimeDataOverrides": { + "source": { + "id": "{C0B0CEBA-064E-580F-AD81-CFE8CE0D61B1}" + } + }, + "sourceHandle": { + "id": "{C0B0CEBA-064E-580F-AD81-CFE8CE0D61B1}" + } + }, + "Component_[2312432053711106201]": { + "$type": "EditorEntityIconComponent", + "Id": 2312432053711106201 + }, + "Component_[4066858233846929269]": { + "$type": "EditorEntitySortComponent", + "Id": 4066858233846929269 + }, + "Component_[6542133807409587028]": { + "$type": "EditorPendingCompositionComponent", + "Id": 6542133807409587028 + }, + "Component_[7002965736546436267]": { + "$type": "SelectionComponent", + "Id": 7002965736546436267 + }, + "Component_[7455250879152263787]": { + "$type": "EditorVisibilityComponent", + "Id": 7455250879152263787 + }, + "Component_[8081535907930415421]": { + "$type": "EditorInspectorComponent", + "Id": 8081535907930415421 + }, + "Component_[9630473919092479415]": { + "$type": "EditorDisabledCompositionComponent", + "Id": 9630473919092479415 + } + } + } + } +} \ No newline at end of file diff --git a/AutomatedTesting/Levels/AWS/ClientAuth/filelist.xml b/AutomatedTesting/Levels/AWS/ClientAuth/filelist.xml deleted file mode 100644 index 6b5b5a8727..0000000000 --- a/AutomatedTesting/Levels/AWS/ClientAuth/filelist.xml +++ /dev/null @@ -1,6 +0,0 @@ - - - - - - diff --git a/AutomatedTesting/Levels/AWS/ClientAuth/level.pak b/AutomatedTesting/Levels/AWS/ClientAuth/level.pak deleted file mode 100644 index bd791070e9..0000000000 --- a/AutomatedTesting/Levels/AWS/ClientAuth/level.pak +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:8a674e05824e5ceec13a0487b318923568710bc8269e5be84adad59c495a7ceb -size 3610 diff --git a/AutomatedTesting/Levels/AWS/ClientAuthPasswordSignIn/ClientAuthPasswordSignIn.ly b/AutomatedTesting/Levels/AWS/ClientAuthPasswordSignIn/ClientAuthPasswordSignIn.ly deleted file mode 100644 index 40d9ad619c..0000000000 --- a/AutomatedTesting/Levels/AWS/ClientAuthPasswordSignIn/ClientAuthPasswordSignIn.ly +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:a1c0b621525b8e88c3775ea4c60c2197d1e1b060ace9bad9d6efcb0532817e44 -size 9356 diff --git a/AutomatedTesting/Levels/AWS/ClientAuthPasswordSignIn/ClientAuthPasswordSignIn.prefab b/AutomatedTesting/Levels/AWS/ClientAuthPasswordSignIn/ClientAuthPasswordSignIn.prefab new file mode 100644 index 0000000000..46c01bbb0f --- /dev/null +++ b/AutomatedTesting/Levels/AWS/ClientAuthPasswordSignIn/ClientAuthPasswordSignIn.prefab @@ -0,0 +1,620 @@ +{ + "ContainerEntity": { + "Id": "Entity_[1146574390643]", + "Name": "Level", + "Components": { + "Component_[10641544592923449938]": { + "$type": "EditorInspectorComponent", + "Id": 10641544592923449938 + }, + "Component_[12039882709170782873]": { + "$type": "EditorOnlyEntityComponent", + "Id": 12039882709170782873 + }, + "Component_[12265484671603697631]": { + "$type": "EditorPendingCompositionComponent", + "Id": 12265484671603697631 + }, + "Component_[14126657869720434043]": { + "$type": "EditorEntitySortComponent", + "Id": 14126657869720434043, + "Child Entity Order": [ + "Entity_[1176639161715]", + "Entity_[3263440934733]", + "Entity_[3263440934733]" + ] + }, + "Component_[15230859088967841193]": { + "$type": "{27F1E1A1-8D9D-4C3B-BD3A-AFB9762449C0} TransformComponent", + "Id": 15230859088967841193, + "Parent Entity": "" + }, + "Component_[16239496886950819870]": { + "$type": "EditorDisabledCompositionComponent", + "Id": 16239496886950819870 + }, + "Component_[5688118765544765547]": { + "$type": "EditorEntityIconComponent", + "Id": 5688118765544765547 + }, + "Component_[6545738857812235305]": { + "$type": "SelectionComponent", + "Id": 6545738857812235305 + }, + "Component_[7247035804068349658]": { + "$type": "EditorPrefabComponent", + "Id": 7247035804068349658 + }, + "Component_[9307224322037797205]": { + "$type": "EditorLockComponent", + "Id": 9307224322037797205 + }, + "Component_[9562516168917670048]": { + "$type": "EditorVisibilityComponent", + "Id": 9562516168917670048 + } + } + }, + "Entities": { + "Entity_[1155164325235]": { + "Id": "Entity_[1155164325235]", + "Name": "Sun", + "Components": { + "Component_[10440557478882592717]": { + "$type": "SelectionComponent", + "Id": 10440557478882592717 + }, + "Component_[13620450453324765907]": { + "$type": "EditorLockComponent", + "Id": 13620450453324765907 + }, + "Component_[2134313378593666258]": { + "$type": "EditorInspectorComponent", + "Id": 2134313378593666258 + }, + "Component_[234010807770404186]": { + "$type": "EditorVisibilityComponent", + "Id": 234010807770404186 + }, + "Component_[2970359110423865725]": { + "$type": "EditorEntityIconComponent", + "Id": 2970359110423865725 + }, + "Component_[3722854130373041803]": { + "$type": "EditorOnlyEntityComponent", + "Id": 3722854130373041803 + }, + "Component_[5992533738676323195]": { + "$type": "EditorDisabledCompositionComponent", + "Id": 5992533738676323195 + }, + "Component_[7378860763541895402]": { + "$type": "AZ::Render::EditorDirectionalLightComponent", + "Id": 7378860763541895402, + "Controller": { + "Configuration": { + "Intensity": 1.0, + "CameraEntityId": "", + "ShadowFilterMethod": 1 + } + } + }, + "Component_[7892834440890947578]": { + "$type": "{27F1E1A1-8D9D-4C3B-BD3A-AFB9762449C0} TransformComponent", + "Id": 7892834440890947578, + "Parent Entity": "Entity_[1176639161715]", + "Transform Data": { + "Translate": [ + 0.0, + 0.0, + 13.487043380737305 + ], + "Rotate": [ + -76.13099670410156, + -0.847000002861023, + -15.8100004196167 + ] + } + }, + "Component_[8599729549570828259]": { + "$type": "EditorEntitySortComponent", + "Id": 8599729549570828259 + }, + "Component_[952797371922080273]": { + "$type": "EditorPendingCompositionComponent", + "Id": 952797371922080273 + } + } + }, + "Entity_[1159459292531]": { + "Id": "Entity_[1159459292531]", + "Name": "Ground", + "Components": { + "Component_[11701138785793981042]": { + "$type": "SelectionComponent", + "Id": 11701138785793981042 + }, + "Component_[12260880513256986252]": { + "$type": "EditorEntityIconComponent", + "Id": 12260880513256986252 + }, + "Component_[13711420870643673468]": { + "$type": "EditorDisabledCompositionComponent", + "Id": 13711420870643673468 + }, + "Component_[138002849734991713]": { + "$type": "EditorOnlyEntityComponent", + "Id": 138002849734991713 + }, + "Component_[16578565737331764849]": { + "$type": "{27F1E1A1-8D9D-4C3B-BD3A-AFB9762449C0} TransformComponent", + "Id": 16578565737331764849, + "Parent Entity": "Entity_[1176639161715]" + }, + "Component_[16919232076966545697]": { + "$type": "EditorInspectorComponent", + "Id": 16919232076966545697 + }, + "Component_[5182430712893438093]": { + "$type": "EditorMaterialComponent", + "Id": 5182430712893438093 + }, + "Component_[5675108321710651991]": { + "$type": "AZ::Render::EditorMeshComponent", + "Id": 5675108321710651991, + "Controller": { + "Configuration": { + "ModelAsset": { + "assetId": { + "guid": "{0CD745C0-6AA8-569A-A68A-73A3270986C4}", + "subId": 277889906 + }, + "assetHint": "objects/groudplane/groundplane_512x512m.azmodel" + } + } + } + }, + "Component_[5681893399601237518]": { + "$type": "EditorEntitySortComponent", + "Id": 5681893399601237518 + }, + "Component_[592692962543397545]": { + "$type": "EditorPendingCompositionComponent", + "Id": 592692962543397545 + }, + "Component_[7090012899106946164]": { + "$type": "EditorLockComponent", + "Id": 7090012899106946164 + }, + "Component_[9410832619875640998]": { + "$type": "EditorVisibilityComponent", + "Id": 9410832619875640998 + } + } + }, + "Entity_[1163754259827]": { + "Id": "Entity_[1163754259827]", + "Name": "Camera", + "Components": { + "Component_[11895140916889160460]": { + "$type": "EditorEntityIconComponent", + "Id": 11895140916889160460 + }, + "Component_[16880285896855930892]": { + "$type": "{CA11DA46-29FF-4083-B5F6-E02C3A8C3A3D} EditorCameraComponent", + "Id": 16880285896855930892, + "Controller": { + "Configuration": { + "Field of View": 55.0, + "EditorEntityId": 6861302815203973165 + } + } + }, + "Component_[17187464423780271193]": { + "$type": "EditorLockComponent", + "Id": 17187464423780271193 + }, + "Component_[17495696818315413311]": { + "$type": "EditorEntitySortComponent", + "Id": 17495696818315413311 + }, + "Component_[18086214374043522055]": { + "$type": "{27F1E1A1-8D9D-4C3B-BD3A-AFB9762449C0} TransformComponent", + "Id": 18086214374043522055, + "Parent Entity": "Entity_[1176639161715]", + "Transform Data": { + "Translate": [ + -2.3000001907348633, + -3.9368600845336914, + 1.0 + ], + "Rotate": [ + -2.050307512283325, + 1.9552897214889526, + -43.623355865478516 + ] + } + }, + "Component_[18387556550380114975]": { + "$type": "SelectionComponent", + "Id": 18387556550380114975 + }, + "Component_[2654521436129313160]": { + "$type": "EditorVisibilityComponent", + "Id": 2654521436129313160 + }, + "Component_[5265045084611556958]": { + "$type": "EditorDisabledCompositionComponent", + "Id": 5265045084611556958 + }, + "Component_[7169798125182238623]": { + "$type": "EditorPendingCompositionComponent", + "Id": 7169798125182238623 + }, + "Component_[7255796294953281766]": { + "$type": "GenericComponentWrapper", + "Id": 7255796294953281766, + "m_template": { + "$type": "FlyCameraInputComponent" + } + }, + "Component_[8866210352157164042]": { + "$type": "EditorInspectorComponent", + "Id": 8866210352157164042 + }, + "Component_[9129253381063760879]": { + "$type": "EditorOnlyEntityComponent", + "Id": 9129253381063760879 + } + } + }, + "Entity_[1168049227123]": { + "Id": "Entity_[1168049227123]", + "Name": "Grid", + "Components": { + "Component_[11443347433215807130]": { + "$type": "EditorEntityIconComponent", + "Id": 11443347433215807130 + }, + "Component_[11779275529534764488]": { + "$type": "SelectionComponent", + "Id": 11779275529534764488 + }, + "Component_[14249419413039427459]": { + "$type": "EditorInspectorComponent", + "Id": 14249419413039427459 + }, + "Component_[15448581635946161318]": { + "$type": "AZ::Render::EditorGridComponent", + "Id": 15448581635946161318, + "Controller": { + "Configuration": { + "primarySpacing": 4.0, + "primaryColor": [ + 0.501960813999176, + 0.501960813999176, + 0.501960813999176 + ], + "secondarySpacing": 0.5, + "secondaryColor": [ + 0.250980406999588, + 0.250980406999588, + 0.250980406999588 + ] + } + } + }, + "Component_[1843303322527297409]": { + "$type": "EditorDisabledCompositionComponent", + "Id": 1843303322527297409 + }, + "Component_[380249072065273654]": { + "$type": "{27F1E1A1-8D9D-4C3B-BD3A-AFB9762449C0} TransformComponent", + "Id": 380249072065273654, + "Parent Entity": "Entity_[1176639161715]" + }, + "Component_[7476660583684339787]": { + "$type": "EditorPendingCompositionComponent", + "Id": 7476660583684339787 + }, + "Component_[7557626501215118375]": { + "$type": "EditorEntitySortComponent", + "Id": 7557626501215118375 + }, + "Component_[7984048488947365511]": { + "$type": "EditorVisibilityComponent", + "Id": 7984048488947365511 + }, + "Component_[8118181039276487398]": { + "$type": "EditorOnlyEntityComponent", + "Id": 8118181039276487398 + }, + "Component_[9189909764215270515]": { + "$type": "EditorLockComponent", + "Id": 9189909764215270515 + } + } + }, + "Entity_[1172344194419]": { + "Id": "Entity_[1172344194419]", + "Name": "Shader Ball", + "Components": { + "Component_[10789351944715265527]": { + "$type": "EditorOnlyEntityComponent", + "Id": 10789351944715265527 + }, + "Component_[12037033284781049225]": { + "$type": "EditorEntitySortComponent", + "Id": 12037033284781049225 + }, + "Component_[13759153306105970079]": { + "$type": "EditorPendingCompositionComponent", + "Id": 13759153306105970079 + }, + "Component_[14135560884830586279]": { + "$type": "EditorInspectorComponent", + "Id": 14135560884830586279 + }, + "Component_[16247165675903986673]": { + "$type": "EditorVisibilityComponent", + "Id": 16247165675903986673 + }, + "Component_[18082433625958885247]": { + "$type": "EditorDisabledCompositionComponent", + "Id": 18082433625958885247 + }, + "Component_[6472623349872972660]": { + "$type": "{27F1E1A1-8D9D-4C3B-BD3A-AFB9762449C0} TransformComponent", + "Id": 6472623349872972660, + "Parent Entity": "Entity_[1176639161715]", + "Transform Data": { + "Rotate": [ + 0.0, + 0.10000000149011612, + 180.0 + ] + } + }, + "Component_[6495255223970673916]": { + "$type": "AZ::Render::EditorMeshComponent", + "Id": 6495255223970673916, + "Controller": { + "Configuration": { + "ModelAsset": { + "assetId": { + "guid": "{FD340C30-755C-5911-92A3-19A3F7A77931}", + "subId": 281415304 + }, + "assetHint": "objects/shaderball/shaderball_default_1m.azmodel" + } + } + } + }, + "Component_[8056625192494070973]": { + "$type": "SelectionComponent", + "Id": 8056625192494070973 + }, + "Component_[8550141614185782969]": { + "$type": "EditorEntityIconComponent", + "Id": 8550141614185782969 + }, + "Component_[9439770997198325425]": { + "$type": "EditorLockComponent", + "Id": 9439770997198325425 + } + } + }, + "Entity_[1176639161715]": { + "Id": "Entity_[1176639161715]", + "Name": "Atom Default Environment", + "Components": { + "Component_[10757302973393310045]": { + "$type": "{27F1E1A1-8D9D-4C3B-BD3A-AFB9762449C0} TransformComponent", + "Id": 10757302973393310045, + "Parent Entity": "Entity_[1146574390643]" + }, + "Component_[14505817420424255464]": { + "$type": "EditorInspectorComponent", + "Id": 14505817420424255464, + "ComponentOrderEntryArray": [ + { + "ComponentId": 10757302973393310045 + } + ] + }, + "Component_[14988041764659020032]": { + "$type": "EditorLockComponent", + "Id": 14988041764659020032 + }, + "Component_[15808690248755038124]": { + "$type": "SelectionComponent", + "Id": 15808690248755038124 + }, + "Component_[15900837685796817138]": { + "$type": "EditorVisibilityComponent", + "Id": 15900837685796817138 + }, + "Component_[3298767348226484884]": { + "$type": "EditorOnlyEntityComponent", + "Id": 3298767348226484884 + }, + "Component_[4076975109609220594]": { + "$type": "EditorPendingCompositionComponent", + "Id": 4076975109609220594 + }, + "Component_[5679760548946028854]": { + "$type": "EditorDisabledCompositionComponent", + "Id": 5679760548946028854 + }, + "Component_[5855590796136709437]": { + "$type": "EditorEntitySortComponent", + "Id": 5855590796136709437, + "Child Entity Order": [ + "Entity_[1155164325235]", + "Entity_[1180934129011]", + "Entity_[1172344194419]", + "Entity_[1168049227123]", + "Entity_[1163754259827]", + "Entity_[1159459292531]" + ] + }, + "Component_[9277695270015777859]": { + "$type": "EditorEntityIconComponent", + "Id": 9277695270015777859 + } + } + }, + "Entity_[1180934129011]": { + "Id": "Entity_[1180934129011]", + "Name": "Global Sky", + "Components": { + "Component_[11231930600558681245]": { + "$type": "AZ::Render::EditorHDRiSkyboxComponent", + "Id": 11231930600558681245, + "Controller": { + "Configuration": { + "CubemapAsset": { + "assetId": { + "guid": "{215E47FD-D181-5832-B1AB-91673ABF6399}", + "subId": 1000 + }, + "assetHint": "lightingpresets/highcontrast/goegap_4k_skyboxcm.exr.streamingimage" + } + } + } + }, + "Component_[11980494120202836095]": { + "$type": "SelectionComponent", + "Id": 11980494120202836095 + }, + "Component_[1428633914413949476]": { + "$type": "EditorLockComponent", + "Id": 1428633914413949476 + }, + "Component_[14936200426671614999]": { + "$type": "AZ::Render::EditorImageBasedLightComponent", + "Id": 14936200426671614999, + "Controller": { + "Configuration": { + "diffuseImageAsset": { + "assetId": { + "guid": "{3FD09945-D0F2-55C8-B9AF-B2FD421FE3BE}", + "subId": 3000 + }, + "assetHint": "lightingpresets/highcontrast/goegap_4k_iblglobalcm_ibldiffuse.exr.streamingimage" + }, + "specularImageAsset": { + "assetId": { + "guid": "{3FD09945-D0F2-55C8-B9AF-B2FD421FE3BE}", + "subId": 2000 + }, + "assetHint": "lightingpresets/highcontrast/goegap_4k_iblglobalcm_iblspecular.exr.streamingimage" + } + } + } + }, + "Component_[14994774102579326069]": { + "$type": "EditorDisabledCompositionComponent", + "Id": 14994774102579326069 + }, + "Component_[15417479889044493340]": { + "$type": "EditorPendingCompositionComponent", + "Id": 15417479889044493340 + }, + "Component_[15826613364991382688]": { + "$type": "EditorEntitySortComponent", + "Id": 15826613364991382688 + }, + "Component_[1665003113283562343]": { + "$type": "EditorOnlyEntityComponent", + "Id": 1665003113283562343 + }, + "Component_[3704934735944502280]": { + "$type": "EditorEntityIconComponent", + "Id": 3704934735944502280 + }, + "Component_[5698542331457326479]": { + "$type": "EditorVisibilityComponent", + "Id": 5698542331457326479 + }, + "Component_[6644513399057217122]": { + "$type": "{27F1E1A1-8D9D-4C3B-BD3A-AFB9762449C0} TransformComponent", + "Id": 6644513399057217122, + "Parent Entity": "Entity_[1176639161715]" + }, + "Component_[931091830724002070]": { + "$type": "EditorInspectorComponent", + "Id": 931091830724002070 + } + } + }, + "Entity_[3263440934733]": { + "Id": "Entity_[3263440934733]", + "Name": "Auth", + "Components": { + "Component_[10677660472305013611]": { + "$type": "EditorPendingCompositionComponent", + "Id": 10677660472305013611 + }, + "Component_[12020966173483420539]": { + "$type": "EditorInspectorComponent", + "Id": 12020966173483420539 + }, + "Component_[1395011275436594572]": { + "$type": "EditorLockComponent", + "Id": 1395011275436594572 + }, + "Component_[14204408480276164321]": { + "$type": "EditorScriptCanvasComponent", + "Id": 14204408480276164321, + "m_name": "PasswordSignIn.scriptcanvas", + "runtimeDataIsValid": true, + "runtimeDataOverrides": { + "source": { + "id": "{DA0FCA2B-66E4-575B-802E-BA93F35690C1}" + } + }, + "sourceHandle": { + "id": "{DA0FCA2B-66E4-575B-802E-BA93F35690C1}" + } + }, + "Component_[15510129631063791276]": { + "$type": "EditorDisabledCompositionComponent", + "Id": 15510129631063791276 + }, + "Component_[2829815269827202953]": { + "$type": "EditorEntitySortComponent", + "Id": 2829815269827202953 + }, + "Component_[4152540778425032559]": { + "$type": "{27F1E1A1-8D9D-4C3B-BD3A-AFB9762449C0} TransformComponent", + "Id": 4152540778425032559, + "Parent Entity": "Entity_[1146574390643]", + "Transform Data": { + "Translate": [ + 0.0, + 0.10000038146972656, + 4.005923748016357 + ] + } + }, + "Component_[4562090268412258507]": { + "$type": "EditorEntityIconComponent", + "Id": 4562090268412258507 + }, + "Component_[4826060551136971267]": { + "$type": "SelectionComponent", + "Id": 4826060551136971267 + }, + "Component_[8974703175361704047]": { + "$type": "EditorVisibilityComponent", + "Id": 8974703175361704047 + }, + "Component_[9513341577149946975]": { + "$type": "EditorOnlyEntityComponent", + "Id": 9513341577149946975 + } + } + } + } +} \ No newline at end of file diff --git a/AutomatedTesting/Levels/AWS/ClientAuthPasswordSignIn/filelist.xml b/AutomatedTesting/Levels/AWS/ClientAuthPasswordSignIn/filelist.xml deleted file mode 100644 index ce3f3f3407..0000000000 --- a/AutomatedTesting/Levels/AWS/ClientAuthPasswordSignIn/filelist.xml +++ /dev/null @@ -1,6 +0,0 @@ - - - - - - diff --git a/AutomatedTesting/Levels/AWS/ClientAuthPasswordSignIn/level.pak b/AutomatedTesting/Levels/AWS/ClientAuthPasswordSignIn/level.pak deleted file mode 100644 index 1af55520b6..0000000000 --- a/AutomatedTesting/Levels/AWS/ClientAuthPasswordSignIn/level.pak +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:f318a1787069385de291660f79e350cea2ca2c3ef3b5e0576686066bd9c49395 -size 3667 diff --git a/AutomatedTesting/Levels/AWS/ClientAuthPasswordSignUp/ClientAuthPasswordSignUp.ly b/AutomatedTesting/Levels/AWS/ClientAuthPasswordSignUp/ClientAuthPasswordSignUp.ly deleted file mode 100644 index b3f66ff34a..0000000000 --- a/AutomatedTesting/Levels/AWS/ClientAuthPasswordSignUp/ClientAuthPasswordSignUp.ly +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:afc5d665128738e6bea09e78a16ee38acc923a8ecefff90d987858ce72c395fa -size 9360 diff --git a/AutomatedTesting/Levels/AWS/ClientAuthPasswordSignUp/ClientAuthPasswordSignUp.prefab b/AutomatedTesting/Levels/AWS/ClientAuthPasswordSignUp/ClientAuthPasswordSignUp.prefab new file mode 100644 index 0000000000..3d85ec02a5 --- /dev/null +++ b/AutomatedTesting/Levels/AWS/ClientAuthPasswordSignUp/ClientAuthPasswordSignUp.prefab @@ -0,0 +1,620 @@ +{ + "ContainerEntity": { + "Id": "Entity_[1146574390643]", + "Name": "Level", + "Components": { + "Component_[10641544592923449938]": { + "$type": "EditorInspectorComponent", + "Id": 10641544592923449938 + }, + "Component_[12039882709170782873]": { + "$type": "EditorOnlyEntityComponent", + "Id": 12039882709170782873 + }, + "Component_[12265484671603697631]": { + "$type": "EditorPendingCompositionComponent", + "Id": 12265484671603697631 + }, + "Component_[14126657869720434043]": { + "$type": "EditorEntitySortComponent", + "Id": 14126657869720434043, + "Child Entity Order": [ + "Entity_[1176639161715]", + "Entity_[3851851454285]", + "Entity_[3851851454285]" + ] + }, + "Component_[15230859088967841193]": { + "$type": "{27F1E1A1-8D9D-4C3B-BD3A-AFB9762449C0} TransformComponent", + "Id": 15230859088967841193, + "Parent Entity": "" + }, + "Component_[16239496886950819870]": { + "$type": "EditorDisabledCompositionComponent", + "Id": 16239496886950819870 + }, + "Component_[5688118765544765547]": { + "$type": "EditorEntityIconComponent", + "Id": 5688118765544765547 + }, + "Component_[6545738857812235305]": { + "$type": "SelectionComponent", + "Id": 6545738857812235305 + }, + "Component_[7247035804068349658]": { + "$type": "EditorPrefabComponent", + "Id": 7247035804068349658 + }, + "Component_[9307224322037797205]": { + "$type": "EditorLockComponent", + "Id": 9307224322037797205 + }, + "Component_[9562516168917670048]": { + "$type": "EditorVisibilityComponent", + "Id": 9562516168917670048 + } + } + }, + "Entities": { + "Entity_[1155164325235]": { + "Id": "Entity_[1155164325235]", + "Name": "Sun", + "Components": { + "Component_[10440557478882592717]": { + "$type": "SelectionComponent", + "Id": 10440557478882592717 + }, + "Component_[13620450453324765907]": { + "$type": "EditorLockComponent", + "Id": 13620450453324765907 + }, + "Component_[2134313378593666258]": { + "$type": "EditorInspectorComponent", + "Id": 2134313378593666258 + }, + "Component_[234010807770404186]": { + "$type": "EditorVisibilityComponent", + "Id": 234010807770404186 + }, + "Component_[2970359110423865725]": { + "$type": "EditorEntityIconComponent", + "Id": 2970359110423865725 + }, + "Component_[3722854130373041803]": { + "$type": "EditorOnlyEntityComponent", + "Id": 3722854130373041803 + }, + "Component_[5992533738676323195]": { + "$type": "EditorDisabledCompositionComponent", + "Id": 5992533738676323195 + }, + "Component_[7378860763541895402]": { + "$type": "AZ::Render::EditorDirectionalLightComponent", + "Id": 7378860763541895402, + "Controller": { + "Configuration": { + "Intensity": 1.0, + "CameraEntityId": "", + "ShadowFilterMethod": 1 + } + } + }, + "Component_[7892834440890947578]": { + "$type": "{27F1E1A1-8D9D-4C3B-BD3A-AFB9762449C0} TransformComponent", + "Id": 7892834440890947578, + "Parent Entity": "Entity_[1176639161715]", + "Transform Data": { + "Translate": [ + 0.0, + 0.0, + 13.487043380737305 + ], + "Rotate": [ + -76.13099670410156, + -0.847000002861023, + -15.8100004196167 + ] + } + }, + "Component_[8599729549570828259]": { + "$type": "EditorEntitySortComponent", + "Id": 8599729549570828259 + }, + "Component_[952797371922080273]": { + "$type": "EditorPendingCompositionComponent", + "Id": 952797371922080273 + } + } + }, + "Entity_[1159459292531]": { + "Id": "Entity_[1159459292531]", + "Name": "Ground", + "Components": { + "Component_[11701138785793981042]": { + "$type": "SelectionComponent", + "Id": 11701138785793981042 + }, + "Component_[12260880513256986252]": { + "$type": "EditorEntityIconComponent", + "Id": 12260880513256986252 + }, + "Component_[13711420870643673468]": { + "$type": "EditorDisabledCompositionComponent", + "Id": 13711420870643673468 + }, + "Component_[138002849734991713]": { + "$type": "EditorOnlyEntityComponent", + "Id": 138002849734991713 + }, + "Component_[16578565737331764849]": { + "$type": "{27F1E1A1-8D9D-4C3B-BD3A-AFB9762449C0} TransformComponent", + "Id": 16578565737331764849, + "Parent Entity": "Entity_[1176639161715]" + }, + "Component_[16919232076966545697]": { + "$type": "EditorInspectorComponent", + "Id": 16919232076966545697 + }, + "Component_[5182430712893438093]": { + "$type": "EditorMaterialComponent", + "Id": 5182430712893438093 + }, + "Component_[5675108321710651991]": { + "$type": "AZ::Render::EditorMeshComponent", + "Id": 5675108321710651991, + "Controller": { + "Configuration": { + "ModelAsset": { + "assetId": { + "guid": "{0CD745C0-6AA8-569A-A68A-73A3270986C4}", + "subId": 277889906 + }, + "assetHint": "objects/groudplane/groundplane_512x512m.azmodel" + } + } + } + }, + "Component_[5681893399601237518]": { + "$type": "EditorEntitySortComponent", + "Id": 5681893399601237518 + }, + "Component_[592692962543397545]": { + "$type": "EditorPendingCompositionComponent", + "Id": 592692962543397545 + }, + "Component_[7090012899106946164]": { + "$type": "EditorLockComponent", + "Id": 7090012899106946164 + }, + "Component_[9410832619875640998]": { + "$type": "EditorVisibilityComponent", + "Id": 9410832619875640998 + } + } + }, + "Entity_[1163754259827]": { + "Id": "Entity_[1163754259827]", + "Name": "Camera", + "Components": { + "Component_[11895140916889160460]": { + "$type": "EditorEntityIconComponent", + "Id": 11895140916889160460 + }, + "Component_[16880285896855930892]": { + "$type": "{CA11DA46-29FF-4083-B5F6-E02C3A8C3A3D} EditorCameraComponent", + "Id": 16880285896855930892, + "Controller": { + "Configuration": { + "Field of View": 55.0, + "EditorEntityId": 6861302815203973165 + } + } + }, + "Component_[17187464423780271193]": { + "$type": "EditorLockComponent", + "Id": 17187464423780271193 + }, + "Component_[17495696818315413311]": { + "$type": "EditorEntitySortComponent", + "Id": 17495696818315413311 + }, + "Component_[18086214374043522055]": { + "$type": "{27F1E1A1-8D9D-4C3B-BD3A-AFB9762449C0} TransformComponent", + "Id": 18086214374043522055, + "Parent Entity": "Entity_[1176639161715]", + "Transform Data": { + "Translate": [ + -2.3000001907348633, + -3.9368600845336914, + 1.0 + ], + "Rotate": [ + -2.050307512283325, + 1.9552897214889526, + -43.623355865478516 + ] + } + }, + "Component_[18387556550380114975]": { + "$type": "SelectionComponent", + "Id": 18387556550380114975 + }, + "Component_[2654521436129313160]": { + "$type": "EditorVisibilityComponent", + "Id": 2654521436129313160 + }, + "Component_[5265045084611556958]": { + "$type": "EditorDisabledCompositionComponent", + "Id": 5265045084611556958 + }, + "Component_[7169798125182238623]": { + "$type": "EditorPendingCompositionComponent", + "Id": 7169798125182238623 + }, + "Component_[7255796294953281766]": { + "$type": "GenericComponentWrapper", + "Id": 7255796294953281766, + "m_template": { + "$type": "FlyCameraInputComponent" + } + }, + "Component_[8866210352157164042]": { + "$type": "EditorInspectorComponent", + "Id": 8866210352157164042 + }, + "Component_[9129253381063760879]": { + "$type": "EditorOnlyEntityComponent", + "Id": 9129253381063760879 + } + } + }, + "Entity_[1168049227123]": { + "Id": "Entity_[1168049227123]", + "Name": "Grid", + "Components": { + "Component_[11443347433215807130]": { + "$type": "EditorEntityIconComponent", + "Id": 11443347433215807130 + }, + "Component_[11779275529534764488]": { + "$type": "SelectionComponent", + "Id": 11779275529534764488 + }, + "Component_[14249419413039427459]": { + "$type": "EditorInspectorComponent", + "Id": 14249419413039427459 + }, + "Component_[15448581635946161318]": { + "$type": "AZ::Render::EditorGridComponent", + "Id": 15448581635946161318, + "Controller": { + "Configuration": { + "primarySpacing": 4.0, + "primaryColor": [ + 0.501960813999176, + 0.501960813999176, + 0.501960813999176 + ], + "secondarySpacing": 0.5, + "secondaryColor": [ + 0.250980406999588, + 0.250980406999588, + 0.250980406999588 + ] + } + } + }, + "Component_[1843303322527297409]": { + "$type": "EditorDisabledCompositionComponent", + "Id": 1843303322527297409 + }, + "Component_[380249072065273654]": { + "$type": "{27F1E1A1-8D9D-4C3B-BD3A-AFB9762449C0} TransformComponent", + "Id": 380249072065273654, + "Parent Entity": "Entity_[1176639161715]" + }, + "Component_[7476660583684339787]": { + "$type": "EditorPendingCompositionComponent", + "Id": 7476660583684339787 + }, + "Component_[7557626501215118375]": { + "$type": "EditorEntitySortComponent", + "Id": 7557626501215118375 + }, + "Component_[7984048488947365511]": { + "$type": "EditorVisibilityComponent", + "Id": 7984048488947365511 + }, + "Component_[8118181039276487398]": { + "$type": "EditorOnlyEntityComponent", + "Id": 8118181039276487398 + }, + "Component_[9189909764215270515]": { + "$type": "EditorLockComponent", + "Id": 9189909764215270515 + } + } + }, + "Entity_[1172344194419]": { + "Id": "Entity_[1172344194419]", + "Name": "Shader Ball", + "Components": { + "Component_[10789351944715265527]": { + "$type": "EditorOnlyEntityComponent", + "Id": 10789351944715265527 + }, + "Component_[12037033284781049225]": { + "$type": "EditorEntitySortComponent", + "Id": 12037033284781049225 + }, + "Component_[13759153306105970079]": { + "$type": "EditorPendingCompositionComponent", + "Id": 13759153306105970079 + }, + "Component_[14135560884830586279]": { + "$type": "EditorInspectorComponent", + "Id": 14135560884830586279 + }, + "Component_[16247165675903986673]": { + "$type": "EditorVisibilityComponent", + "Id": 16247165675903986673 + }, + "Component_[18082433625958885247]": { + "$type": "EditorDisabledCompositionComponent", + "Id": 18082433625958885247 + }, + "Component_[6472623349872972660]": { + "$type": "{27F1E1A1-8D9D-4C3B-BD3A-AFB9762449C0} TransformComponent", + "Id": 6472623349872972660, + "Parent Entity": "Entity_[1176639161715]", + "Transform Data": { + "Rotate": [ + 0.0, + 0.10000000149011612, + 180.0 + ] + } + }, + "Component_[6495255223970673916]": { + "$type": "AZ::Render::EditorMeshComponent", + "Id": 6495255223970673916, + "Controller": { + "Configuration": { + "ModelAsset": { + "assetId": { + "guid": "{FD340C30-755C-5911-92A3-19A3F7A77931}", + "subId": 281415304 + }, + "assetHint": "objects/shaderball/shaderball_default_1m.azmodel" + } + } + } + }, + "Component_[8056625192494070973]": { + "$type": "SelectionComponent", + "Id": 8056625192494070973 + }, + "Component_[8550141614185782969]": { + "$type": "EditorEntityIconComponent", + "Id": 8550141614185782969 + }, + "Component_[9439770997198325425]": { + "$type": "EditorLockComponent", + "Id": 9439770997198325425 + } + } + }, + "Entity_[1176639161715]": { + "Id": "Entity_[1176639161715]", + "Name": "Atom Default Environment", + "Components": { + "Component_[10757302973393310045]": { + "$type": "{27F1E1A1-8D9D-4C3B-BD3A-AFB9762449C0} TransformComponent", + "Id": 10757302973393310045, + "Parent Entity": "Entity_[1146574390643]" + }, + "Component_[14505817420424255464]": { + "$type": "EditorInspectorComponent", + "Id": 14505817420424255464, + "ComponentOrderEntryArray": [ + { + "ComponentId": 10757302973393310045 + } + ] + }, + "Component_[14988041764659020032]": { + "$type": "EditorLockComponent", + "Id": 14988041764659020032 + }, + "Component_[15808690248755038124]": { + "$type": "SelectionComponent", + "Id": 15808690248755038124 + }, + "Component_[15900837685796817138]": { + "$type": "EditorVisibilityComponent", + "Id": 15900837685796817138 + }, + "Component_[3298767348226484884]": { + "$type": "EditorOnlyEntityComponent", + "Id": 3298767348226484884 + }, + "Component_[4076975109609220594]": { + "$type": "EditorPendingCompositionComponent", + "Id": 4076975109609220594 + }, + "Component_[5679760548946028854]": { + "$type": "EditorDisabledCompositionComponent", + "Id": 5679760548946028854 + }, + "Component_[5855590796136709437]": { + "$type": "EditorEntitySortComponent", + "Id": 5855590796136709437, + "Child Entity Order": [ + "Entity_[1155164325235]", + "Entity_[1180934129011]", + "Entity_[1172344194419]", + "Entity_[1168049227123]", + "Entity_[1163754259827]", + "Entity_[1159459292531]" + ] + }, + "Component_[9277695270015777859]": { + "$type": "EditorEntityIconComponent", + "Id": 9277695270015777859 + } + } + }, + "Entity_[1180934129011]": { + "Id": "Entity_[1180934129011]", + "Name": "Global Sky", + "Components": { + "Component_[11231930600558681245]": { + "$type": "AZ::Render::EditorHDRiSkyboxComponent", + "Id": 11231930600558681245, + "Controller": { + "Configuration": { + "CubemapAsset": { + "assetId": { + "guid": "{215E47FD-D181-5832-B1AB-91673ABF6399}", + "subId": 1000 + }, + "assetHint": "lightingpresets/highcontrast/goegap_4k_skyboxcm.exr.streamingimage" + } + } + } + }, + "Component_[11980494120202836095]": { + "$type": "SelectionComponent", + "Id": 11980494120202836095 + }, + "Component_[1428633914413949476]": { + "$type": "EditorLockComponent", + "Id": 1428633914413949476 + }, + "Component_[14936200426671614999]": { + "$type": "AZ::Render::EditorImageBasedLightComponent", + "Id": 14936200426671614999, + "Controller": { + "Configuration": { + "diffuseImageAsset": { + "assetId": { + "guid": "{3FD09945-D0F2-55C8-B9AF-B2FD421FE3BE}", + "subId": 3000 + }, + "assetHint": "lightingpresets/highcontrast/goegap_4k_iblglobalcm_ibldiffuse.exr.streamingimage" + }, + "specularImageAsset": { + "assetId": { + "guid": "{3FD09945-D0F2-55C8-B9AF-B2FD421FE3BE}", + "subId": 2000 + }, + "assetHint": "lightingpresets/highcontrast/goegap_4k_iblglobalcm_iblspecular.exr.streamingimage" + } + } + } + }, + "Component_[14994774102579326069]": { + "$type": "EditorDisabledCompositionComponent", + "Id": 14994774102579326069 + }, + "Component_[15417479889044493340]": { + "$type": "EditorPendingCompositionComponent", + "Id": 15417479889044493340 + }, + "Component_[15826613364991382688]": { + "$type": "EditorEntitySortComponent", + "Id": 15826613364991382688 + }, + "Component_[1665003113283562343]": { + "$type": "EditorOnlyEntityComponent", + "Id": 1665003113283562343 + }, + "Component_[3704934735944502280]": { + "$type": "EditorEntityIconComponent", + "Id": 3704934735944502280 + }, + "Component_[5698542331457326479]": { + "$type": "EditorVisibilityComponent", + "Id": 5698542331457326479 + }, + "Component_[6644513399057217122]": { + "$type": "{27F1E1A1-8D9D-4C3B-BD3A-AFB9762449C0} TransformComponent", + "Id": 6644513399057217122, + "Parent Entity": "Entity_[1176639161715]" + }, + "Component_[931091830724002070]": { + "$type": "EditorInspectorComponent", + "Id": 931091830724002070 + } + } + }, + "Entity_[3851851454285]": { + "Id": "Entity_[3851851454285]", + "Name": "Auth", + "Components": { + "Component_[10199578265902796701]": { + "$type": "EditorScriptCanvasComponent", + "Id": 10199578265902796701, + "m_name": "PasswordSignUp.scriptcanvas", + "runtimeDataIsValid": true, + "runtimeDataOverrides": { + "source": { + "id": "{367CEE66-3A7D-549E-BD69-C63612B3F12D}" + } + }, + "sourceHandle": { + "id": "{367CEE66-3A7D-549E-BD69-C63612B3F12D}" + } + }, + "Component_[10665743855533689275]": { + "$type": "EditorDisabledCompositionComponent", + "Id": 10665743855533689275 + }, + "Component_[15982638153420818774]": { + "$type": "{27F1E1A1-8D9D-4C3B-BD3A-AFB9762449C0} TransformComponent", + "Id": 15982638153420818774, + "Parent Entity": "Entity_[1146574390643]", + "Transform Data": { + "Translate": [ + 0.0, + 0.10000038146972656, + 4.005923748016357 + ] + } + }, + "Component_[17743308263820862394]": { + "$type": "EditorOnlyEntityComponent", + "Id": 17743308263820862394 + }, + "Component_[18074634570765223479]": { + "$type": "SelectionComponent", + "Id": 18074634570765223479 + }, + "Component_[3471158028107369345]": { + "$type": "EditorEntityIconComponent", + "Id": 3471158028107369345 + }, + "Component_[376079292001997684]": { + "$type": "EditorInspectorComponent", + "Id": 376079292001997684 + }, + "Component_[4387781728620577034]": { + "$type": "EditorLockComponent", + "Id": 4387781728620577034 + }, + "Component_[8591645353763910598]": { + "$type": "EditorEntitySortComponent", + "Id": 8591645353763910598 + }, + "Component_[9373910525775599099]": { + "$type": "EditorVisibilityComponent", + "Id": 9373910525775599099 + }, + "Component_[9394316863271268125]": { + "$type": "EditorPendingCompositionComponent", + "Id": 9394316863271268125 + } + } + } + } +} \ No newline at end of file diff --git a/AutomatedTesting/Levels/AWS/ClientAuthPasswordSignUp/filelist.xml b/AutomatedTesting/Levels/AWS/ClientAuthPasswordSignUp/filelist.xml deleted file mode 100644 index 6565342dd4..0000000000 --- a/AutomatedTesting/Levels/AWS/ClientAuthPasswordSignUp/filelist.xml +++ /dev/null @@ -1,6 +0,0 @@ - - - - - - diff --git a/AutomatedTesting/Levels/AWS/ClientAuthPasswordSignUp/level.pak b/AutomatedTesting/Levels/AWS/ClientAuthPasswordSignUp/level.pak deleted file mode 100644 index 781de219f7..0000000000 --- a/AutomatedTesting/Levels/AWS/ClientAuthPasswordSignUp/level.pak +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:87882b64688a77815d93c6973929fa21b89dc6c13d4866c710124ce2cd0f411e -size 3652 diff --git a/AutomatedTesting/Levels/AWS/Core/Core.ly b/AutomatedTesting/Levels/AWS/Core/Core.ly deleted file mode 100644 index 8b01ee7abe..0000000000 --- a/AutomatedTesting/Levels/AWS/Core/Core.ly +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:5242a9b598bc329ef2af2b114092e4e50c7c398cdde4605a0717b0b3ce66d797 -size 10030 diff --git a/AutomatedTesting/Levels/AWS/Core/Core.prefab b/AutomatedTesting/Levels/AWS/Core/Core.prefab new file mode 100644 index 0000000000..3d2749849b --- /dev/null +++ b/AutomatedTesting/Levels/AWS/Core/Core.prefab @@ -0,0 +1,758 @@ +{ + "ContainerEntity": { + "Id": "Entity_[1146574390643]", + "Name": "Level", + "Components": { + "Component_[10641544592923449938]": { + "$type": "EditorInspectorComponent", + "Id": 10641544592923449938 + }, + "Component_[12039882709170782873]": { + "$type": "EditorOnlyEntityComponent", + "Id": 12039882709170782873 + }, + "Component_[12265484671603697631]": { + "$type": "EditorPendingCompositionComponent", + "Id": 12265484671603697631 + }, + "Component_[14126657869720434043]": { + "$type": "EditorEntitySortComponent", + "Id": 14126657869720434043, + "Child Entity Order": [ + "Entity_[1176639161715]", + "Entity_[1386540226381]", + "Entity_[1390835193677]", + "Entity_[1395130160973]", + "Entity_[1395130160973]" + ] + }, + "Component_[15230859088967841193]": { + "$type": "{27F1E1A1-8D9D-4C3B-BD3A-AFB9762449C0} TransformComponent", + "Id": 15230859088967841193, + "Parent Entity": "" + }, + "Component_[16239496886950819870]": { + "$type": "EditorDisabledCompositionComponent", + "Id": 16239496886950819870 + }, + "Component_[5688118765544765547]": { + "$type": "EditorEntityIconComponent", + "Id": 5688118765544765547 + }, + "Component_[6545738857812235305]": { + "$type": "SelectionComponent", + "Id": 6545738857812235305 + }, + "Component_[7247035804068349658]": { + "$type": "EditorPrefabComponent", + "Id": 7247035804068349658 + }, + "Component_[9307224322037797205]": { + "$type": "EditorLockComponent", + "Id": 9307224322037797205 + }, + "Component_[9562516168917670048]": { + "$type": "EditorVisibilityComponent", + "Id": 9562516168917670048 + } + } + }, + "Entities": { + "Entity_[1155164325235]": { + "Id": "Entity_[1155164325235]", + "Name": "Sun", + "Components": { + "Component_[10440557478882592717]": { + "$type": "SelectionComponent", + "Id": 10440557478882592717 + }, + "Component_[13620450453324765907]": { + "$type": "EditorLockComponent", + "Id": 13620450453324765907 + }, + "Component_[2134313378593666258]": { + "$type": "EditorInspectorComponent", + "Id": 2134313378593666258 + }, + "Component_[234010807770404186]": { + "$type": "EditorVisibilityComponent", + "Id": 234010807770404186 + }, + "Component_[2970359110423865725]": { + "$type": "EditorEntityIconComponent", + "Id": 2970359110423865725 + }, + "Component_[3722854130373041803]": { + "$type": "EditorOnlyEntityComponent", + "Id": 3722854130373041803 + }, + "Component_[5992533738676323195]": { + "$type": "EditorDisabledCompositionComponent", + "Id": 5992533738676323195 + }, + "Component_[7378860763541895402]": { + "$type": "AZ::Render::EditorDirectionalLightComponent", + "Id": 7378860763541895402, + "Controller": { + "Configuration": { + "Intensity": 1.0, + "CameraEntityId": "", + "ShadowFilterMethod": 1 + } + } + }, + "Component_[7892834440890947578]": { + "$type": "{27F1E1A1-8D9D-4C3B-BD3A-AFB9762449C0} TransformComponent", + "Id": 7892834440890947578, + "Parent Entity": "Entity_[1176639161715]", + "Transform Data": { + "Translate": [ + 0.0, + 0.0, + 13.487043380737305 + ], + "Rotate": [ + -76.13099670410156, + -0.847000002861023, + -15.8100004196167 + ] + } + }, + "Component_[8599729549570828259]": { + "$type": "EditorEntitySortComponent", + "Id": 8599729549570828259 + }, + "Component_[952797371922080273]": { + "$type": "EditorPendingCompositionComponent", + "Id": 952797371922080273 + } + } + }, + "Entity_[1159459292531]": { + "Id": "Entity_[1159459292531]", + "Name": "Ground", + "Components": { + "Component_[11701138785793981042]": { + "$type": "SelectionComponent", + "Id": 11701138785793981042 + }, + "Component_[12260880513256986252]": { + "$type": "EditorEntityIconComponent", + "Id": 12260880513256986252 + }, + "Component_[13711420870643673468]": { + "$type": "EditorDisabledCompositionComponent", + "Id": 13711420870643673468 + }, + "Component_[138002849734991713]": { + "$type": "EditorOnlyEntityComponent", + "Id": 138002849734991713 + }, + "Component_[16578565737331764849]": { + "$type": "{27F1E1A1-8D9D-4C3B-BD3A-AFB9762449C0} TransformComponent", + "Id": 16578565737331764849, + "Parent Entity": "Entity_[1176639161715]" + }, + "Component_[16919232076966545697]": { + "$type": "EditorInspectorComponent", + "Id": 16919232076966545697 + }, + "Component_[5182430712893438093]": { + "$type": "EditorMaterialComponent", + "Id": 5182430712893438093 + }, + "Component_[5675108321710651991]": { + "$type": "AZ::Render::EditorMeshComponent", + "Id": 5675108321710651991, + "Controller": { + "Configuration": { + "ModelAsset": { + "assetId": { + "guid": "{0CD745C0-6AA8-569A-A68A-73A3270986C4}", + "subId": 277889906 + }, + "assetHint": "objects/groudplane/groundplane_512x512m.azmodel" + } + } + } + }, + "Component_[5681893399601237518]": { + "$type": "EditorEntitySortComponent", + "Id": 5681893399601237518 + }, + "Component_[592692962543397545]": { + "$type": "EditorPendingCompositionComponent", + "Id": 592692962543397545 + }, + "Component_[7090012899106946164]": { + "$type": "EditorLockComponent", + "Id": 7090012899106946164 + }, + "Component_[9410832619875640998]": { + "$type": "EditorVisibilityComponent", + "Id": 9410832619875640998 + } + } + }, + "Entity_[1163754259827]": { + "Id": "Entity_[1163754259827]", + "Name": "Camera", + "Components": { + "Component_[11895140916889160460]": { + "$type": "EditorEntityIconComponent", + "Id": 11895140916889160460 + }, + "Component_[16880285896855930892]": { + "$type": "{CA11DA46-29FF-4083-B5F6-E02C3A8C3A3D} EditorCameraComponent", + "Id": 16880285896855930892, + "Controller": { + "Configuration": { + "Field of View": 55.0, + "EditorEntityId": 6861302815203973165 + } + } + }, + "Component_[17187464423780271193]": { + "$type": "EditorLockComponent", + "Id": 17187464423780271193 + }, + "Component_[17495696818315413311]": { + "$type": "EditorEntitySortComponent", + "Id": 17495696818315413311 + }, + "Component_[18086214374043522055]": { + "$type": "{27F1E1A1-8D9D-4C3B-BD3A-AFB9762449C0} TransformComponent", + "Id": 18086214374043522055, + "Parent Entity": "Entity_[1176639161715]", + "Transform Data": { + "Translate": [ + -2.3000001907348633, + -3.9368600845336914, + 1.0 + ], + "Rotate": [ + -2.050307512283325, + 1.9552897214889526, + -43.623355865478516 + ] + } + }, + "Component_[18387556550380114975]": { + "$type": "SelectionComponent", + "Id": 18387556550380114975 + }, + "Component_[2654521436129313160]": { + "$type": "EditorVisibilityComponent", + "Id": 2654521436129313160 + }, + "Component_[5265045084611556958]": { + "$type": "EditorDisabledCompositionComponent", + "Id": 5265045084611556958 + }, + "Component_[7169798125182238623]": { + "$type": "EditorPendingCompositionComponent", + "Id": 7169798125182238623 + }, + "Component_[7255796294953281766]": { + "$type": "GenericComponentWrapper", + "Id": 7255796294953281766, + "m_template": { + "$type": "FlyCameraInputComponent" + } + }, + "Component_[8866210352157164042]": { + "$type": "EditorInspectorComponent", + "Id": 8866210352157164042 + }, + "Component_[9129253381063760879]": { + "$type": "EditorOnlyEntityComponent", + "Id": 9129253381063760879 + } + } + }, + "Entity_[1168049227123]": { + "Id": "Entity_[1168049227123]", + "Name": "Grid", + "Components": { + "Component_[11443347433215807130]": { + "$type": "EditorEntityIconComponent", + "Id": 11443347433215807130 + }, + "Component_[11779275529534764488]": { + "$type": "SelectionComponent", + "Id": 11779275529534764488 + }, + "Component_[14249419413039427459]": { + "$type": "EditorInspectorComponent", + "Id": 14249419413039427459 + }, + "Component_[15448581635946161318]": { + "$type": "AZ::Render::EditorGridComponent", + "Id": 15448581635946161318, + "Controller": { + "Configuration": { + "primarySpacing": 4.0, + "primaryColor": [ + 0.501960813999176, + 0.501960813999176, + 0.501960813999176 + ], + "secondarySpacing": 0.5, + "secondaryColor": [ + 0.250980406999588, + 0.250980406999588, + 0.250980406999588 + ] + } + } + }, + "Component_[1843303322527297409]": { + "$type": "EditorDisabledCompositionComponent", + "Id": 1843303322527297409 + }, + "Component_[380249072065273654]": { + "$type": "{27F1E1A1-8D9D-4C3B-BD3A-AFB9762449C0} TransformComponent", + "Id": 380249072065273654, + "Parent Entity": "Entity_[1176639161715]" + }, + "Component_[7476660583684339787]": { + "$type": "EditorPendingCompositionComponent", + "Id": 7476660583684339787 + }, + "Component_[7557626501215118375]": { + "$type": "EditorEntitySortComponent", + "Id": 7557626501215118375 + }, + "Component_[7984048488947365511]": { + "$type": "EditorVisibilityComponent", + "Id": 7984048488947365511 + }, + "Component_[8118181039276487398]": { + "$type": "EditorOnlyEntityComponent", + "Id": 8118181039276487398 + }, + "Component_[9189909764215270515]": { + "$type": "EditorLockComponent", + "Id": 9189909764215270515 + } + } + }, + "Entity_[1172344194419]": { + "Id": "Entity_[1172344194419]", + "Name": "Shader Ball", + "Components": { + "Component_[10789351944715265527]": { + "$type": "EditorOnlyEntityComponent", + "Id": 10789351944715265527 + }, + "Component_[12037033284781049225]": { + "$type": "EditorEntitySortComponent", + "Id": 12037033284781049225 + }, + "Component_[13759153306105970079]": { + "$type": "EditorPendingCompositionComponent", + "Id": 13759153306105970079 + }, + "Component_[14135560884830586279]": { + "$type": "EditorInspectorComponent", + "Id": 14135560884830586279 + }, + "Component_[16247165675903986673]": { + "$type": "EditorVisibilityComponent", + "Id": 16247165675903986673 + }, + "Component_[18082433625958885247]": { + "$type": "EditorDisabledCompositionComponent", + "Id": 18082433625958885247 + }, + "Component_[6472623349872972660]": { + "$type": "{27F1E1A1-8D9D-4C3B-BD3A-AFB9762449C0} TransformComponent", + "Id": 6472623349872972660, + "Parent Entity": "Entity_[1176639161715]", + "Transform Data": { + "Rotate": [ + 0.0, + 0.10000000149011612, + 180.0 + ] + } + }, + "Component_[6495255223970673916]": { + "$type": "AZ::Render::EditorMeshComponent", + "Id": 6495255223970673916, + "Controller": { + "Configuration": { + "ModelAsset": { + "assetId": { + "guid": "{FD340C30-755C-5911-92A3-19A3F7A77931}", + "subId": 281415304 + }, + "assetHint": "objects/shaderball/shaderball_default_1m.azmodel" + } + } + } + }, + "Component_[8056625192494070973]": { + "$type": "SelectionComponent", + "Id": 8056625192494070973 + }, + "Component_[8550141614185782969]": { + "$type": "EditorEntityIconComponent", + "Id": 8550141614185782969 + }, + "Component_[9439770997198325425]": { + "$type": "EditorLockComponent", + "Id": 9439770997198325425 + } + } + }, + "Entity_[1176639161715]": { + "Id": "Entity_[1176639161715]", + "Name": "Atom Default Environment", + "Components": { + "Component_[10757302973393310045]": { + "$type": "{27F1E1A1-8D9D-4C3B-BD3A-AFB9762449C0} TransformComponent", + "Id": 10757302973393310045, + "Parent Entity": "Entity_[1146574390643]" + }, + "Component_[14505817420424255464]": { + "$type": "EditorInspectorComponent", + "Id": 14505817420424255464, + "ComponentOrderEntryArray": [ + { + "ComponentId": 10757302973393310045 + } + ] + }, + "Component_[14988041764659020032]": { + "$type": "EditorLockComponent", + "Id": 14988041764659020032 + }, + "Component_[15808690248755038124]": { + "$type": "SelectionComponent", + "Id": 15808690248755038124 + }, + "Component_[15900837685796817138]": { + "$type": "EditorVisibilityComponent", + "Id": 15900837685796817138 + }, + "Component_[3298767348226484884]": { + "$type": "EditorOnlyEntityComponent", + "Id": 3298767348226484884 + }, + "Component_[4076975109609220594]": { + "$type": "EditorPendingCompositionComponent", + "Id": 4076975109609220594 + }, + "Component_[5679760548946028854]": { + "$type": "EditorDisabledCompositionComponent", + "Id": 5679760548946028854 + }, + "Component_[5855590796136709437]": { + "$type": "EditorEntitySortComponent", + "Id": 5855590796136709437, + "Child Entity Order": [ + "Entity_[1155164325235]", + "Entity_[1180934129011]", + "Entity_[1172344194419]", + "Entity_[1168049227123]", + "Entity_[1163754259827]", + "Entity_[1159459292531]" + ] + }, + "Component_[9277695270015777859]": { + "$type": "EditorEntityIconComponent", + "Id": 9277695270015777859 + } + } + }, + "Entity_[1180934129011]": { + "Id": "Entity_[1180934129011]", + "Name": "Global Sky", + "Components": { + "Component_[11231930600558681245]": { + "$type": "AZ::Render::EditorHDRiSkyboxComponent", + "Id": 11231930600558681245, + "Controller": { + "Configuration": { + "CubemapAsset": { + "assetId": { + "guid": "{215E47FD-D181-5832-B1AB-91673ABF6399}", + "subId": 1000 + }, + "assetHint": "lightingpresets/highcontrast/goegap_4k_skyboxcm.exr.streamingimage" + } + } + } + }, + "Component_[11980494120202836095]": { + "$type": "SelectionComponent", + "Id": 11980494120202836095 + }, + "Component_[1428633914413949476]": { + "$type": "EditorLockComponent", + "Id": 1428633914413949476 + }, + "Component_[14936200426671614999]": { + "$type": "AZ::Render::EditorImageBasedLightComponent", + "Id": 14936200426671614999, + "Controller": { + "Configuration": { + "diffuseImageAsset": { + "assetId": { + "guid": "{3FD09945-D0F2-55C8-B9AF-B2FD421FE3BE}", + "subId": 3000 + }, + "assetHint": "lightingpresets/highcontrast/goegap_4k_iblglobalcm_ibldiffuse.exr.streamingimage" + }, + "specularImageAsset": { + "assetId": { + "guid": "{3FD09945-D0F2-55C8-B9AF-B2FD421FE3BE}", + "subId": 2000 + }, + "assetHint": "lightingpresets/highcontrast/goegap_4k_iblglobalcm_iblspecular.exr.streamingimage" + } + } + } + }, + "Component_[14994774102579326069]": { + "$type": "EditorDisabledCompositionComponent", + "Id": 14994774102579326069 + }, + "Component_[15417479889044493340]": { + "$type": "EditorPendingCompositionComponent", + "Id": 15417479889044493340 + }, + "Component_[15826613364991382688]": { + "$type": "EditorEntitySortComponent", + "Id": 15826613364991382688 + }, + "Component_[1665003113283562343]": { + "$type": "EditorOnlyEntityComponent", + "Id": 1665003113283562343 + }, + "Component_[3704934735944502280]": { + "$type": "EditorEntityIconComponent", + "Id": 3704934735944502280 + }, + "Component_[5698542331457326479]": { + "$type": "EditorVisibilityComponent", + "Id": 5698542331457326479 + }, + "Component_[6644513399057217122]": { + "$type": "{27F1E1A1-8D9D-4C3B-BD3A-AFB9762449C0} TransformComponent", + "Id": 6644513399057217122, + "Parent Entity": "Entity_[1176639161715]" + }, + "Component_[931091830724002070]": { + "$type": "EditorInspectorComponent", + "Id": 931091830724002070 + } + } + }, + "Entity_[1386540226381]": { + "Id": "Entity_[1386540226381]", + "Name": "s3", + "Components": { + "Component_[11158492000035348927]": { + "$type": "EditorDisabledCompositionComponent", + "Id": 11158492000035348927 + }, + "Component_[13101294672800983417]": { + "$type": "EditorPendingCompositionComponent", + "Id": 13101294672800983417 + }, + "Component_[13312594438559441372]": { + "$type": "EditorEntitySortComponent", + "Id": 13312594438559441372 + }, + "Component_[14532086496432860950]": { + "$type": "EditorVisibilityComponent", + "Id": 14532086496432860950 + }, + "Component_[15284288439796123368]": { + "$type": "EditorOnlyEntityComponent", + "Id": 15284288439796123368 + }, + "Component_[17553238493971510581]": { + "$type": "EditorScriptCanvasComponent", + "Id": 17553238493971510581, + "m_name": "s3demo.scriptcanvas", + "runtimeDataIsValid": true, + "runtimeDataOverrides": { + "source": { + "id": "{D72821C5-1C31-5AE5-891D-30371C49B9E0}" + } + }, + "sourceHandle": { + "id": "{D72821C5-1C31-5AE5-891D-30371C49B9E0}" + } + }, + "Component_[17621265899133139471]": { + "$type": "EditorLockComponent", + "Id": 17621265899133139471 + }, + "Component_[2763569637558196086]": { + "$type": "{27F1E1A1-8D9D-4C3B-BD3A-AFB9762449C0} TransformComponent", + "Id": 2763569637558196086, + "Parent Entity": "Entity_[1146574390643]", + "Transform Data": { + "Translate": [ + 0.0, + 0.10000038146972656, + 4.005923748016357 + ] + } + }, + "Component_[3946146016045577093]": { + "$type": "SelectionComponent", + "Id": 3946146016045577093 + }, + "Component_[4521094551057628689]": { + "$type": "EditorInspectorComponent", + "Id": 4521094551057628689 + }, + "Component_[5378520857609165944]": { + "$type": "EditorEntityIconComponent", + "Id": 5378520857609165944 + } + } + }, + "Entity_[1390835193677]": { + "Id": "Entity_[1390835193677]", + "Name": "dynamodb", + "Components": { + "Component_[13579073750136791325]": { + "$type": "EditorVisibilityComponent", + "Id": 13579073750136791325 + }, + "Component_[14581079376974874313]": { + "$type": "EditorEntitySortComponent", + "Id": 14581079376974874313 + }, + "Component_[15354545119837386836]": { + "$type": "SelectionComponent", + "Id": 15354545119837386836 + }, + "Component_[15913971829919706180]": { + "$type": "EditorEntityIconComponent", + "Id": 15913971829919706180 + }, + "Component_[17308449372189366987]": { + "$type": "EditorPendingCompositionComponent", + "Id": 17308449372189366987 + }, + "Component_[17741852956994822371]": { + "$type": "EditorOnlyEntityComponent", + "Id": 17741852956994822371 + }, + "Component_[4363122368868820254]": { + "$type": "EditorDisabledCompositionComponent", + "Id": 4363122368868820254 + }, + "Component_[4890242568951925088]": { + "$type": "EditorScriptCanvasComponent", + "Id": 4890242568951925088, + "m_name": "dynamodbdemo.scriptcanvas", + "runtimeDataIsValid": true, + "runtimeDataOverrides": { + "source": { + "id": "{004B97C6-75F3-5B95-ADA4-EBF751EEF697}" + } + }, + "sourceHandle": { + "id": "{004B97C6-75F3-5B95-ADA4-EBF751EEF697}" + } + }, + "Component_[7140725680315799866]": { + "$type": "EditorLockComponent", + "Id": 7140725680315799866 + }, + "Component_[8431133659360426398]": { + "$type": "{27F1E1A1-8D9D-4C3B-BD3A-AFB9762449C0} TransformComponent", + "Id": 8431133659360426398, + "Parent Entity": "Entity_[1146574390643]", + "Transform Data": { + "Translate": [ + 0.0, + 0.10000038146972656, + 4.005923748016357 + ] + } + }, + "Component_[9486500593077263666]": { + "$type": "EditorInspectorComponent", + "Id": 9486500593077263666 + } + } + }, + "Entity_[1395130160973]": { + "Id": "Entity_[1395130160973]", + "Name": "lambda", + "Components": { + "Component_[14224781635611846065]": { + "$type": "SelectionComponent", + "Id": 14224781635611846065 + }, + "Component_[14532864313352417822]": { + "$type": "EditorInspectorComponent", + "Id": 14532864313352417822 + }, + "Component_[14621438229914413040]": { + "$type": "EditorEntitySortComponent", + "Id": 14621438229914413040 + }, + "Component_[15642112885025274607]": { + "$type": "EditorLockComponent", + "Id": 15642112885025274607 + }, + "Component_[16340039184260739086]": { + "$type": "EditorVisibilityComponent", + "Id": 16340039184260739086 + }, + "Component_[17170806711467412600]": { + "$type": "{27F1E1A1-8D9D-4C3B-BD3A-AFB9762449C0} TransformComponent", + "Id": 17170806711467412600, + "Parent Entity": "Entity_[1146574390643]", + "Transform Data": { + "Translate": [ + 0.0, + 0.10000038146972656, + 4.005923748016357 + ] + } + }, + "Component_[18080677632538463069]": { + "$type": "EditorDisabledCompositionComponent", + "Id": 18080677632538463069 + }, + "Component_[2663457305102263144]": { + "$type": "EditorEntityIconComponent", + "Id": 2663457305102263144 + }, + "Component_[4954526281430171003]": { + "$type": "EditorOnlyEntityComponent", + "Id": 4954526281430171003 + }, + "Component_[6251151424244415885]": { + "$type": "EditorScriptCanvasComponent", + "Id": 6251151424244415885, + "m_name": "lambdademo.scriptcanvas", + "runtimeDataIsValid": true, + "runtimeDataOverrides": { + "source": { + "id": "{3DCA213D-534E-5C86-9308-2F7675A08029}" + } + }, + "sourceHandle": { + "id": "{3DCA213D-534E-5C86-9308-2F7675A08029}" + } + }, + "Component_[6526999075003995619]": { + "$type": "EditorPendingCompositionComponent", + "Id": 6526999075003995619 + } + } + } + } +} \ No newline at end of file diff --git a/AutomatedTesting/Levels/AWS/Core/filelist.xml b/AutomatedTesting/Levels/AWS/Core/filelist.xml deleted file mode 100644 index 9d1fcd2e83..0000000000 --- a/AutomatedTesting/Levels/AWS/Core/filelist.xml +++ /dev/null @@ -1,6 +0,0 @@ - - - - - - diff --git a/AutomatedTesting/Levels/AWS/Core/level.pak b/AutomatedTesting/Levels/AWS/Core/level.pak deleted file mode 100644 index 01b79da84e..0000000000 --- a/AutomatedTesting/Levels/AWS/Core/level.pak +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:4ba2f409fc974c72b8ee8b660d200ed1d013ee8408419b0e91d6d487e71e4997 -size 3774 diff --git a/AutomatedTesting/Levels/AWS/Metrics/Metrics.ly b/AutomatedTesting/Levels/AWS/Metrics/Metrics.ly deleted file mode 100644 index 12998e89be..0000000000 --- a/AutomatedTesting/Levels/AWS/Metrics/Metrics.ly +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:023992998ab5a1d64b38dacd1d5e1a9dc930ff704289c0656ed6eaba6951d660 -size 9066 diff --git a/AutomatedTesting/Levels/AWS/Metrics/Metrics.prefab b/AutomatedTesting/Levels/AWS/Metrics/Metrics.prefab new file mode 100644 index 0000000000..7f4144d734 --- /dev/null +++ b/AutomatedTesting/Levels/AWS/Metrics/Metrics.prefab @@ -0,0 +1,627 @@ +{ + "ContainerEntity": { + "Id": "Entity_[1146574390643]", + "Name": "Level", + "Components": { + "Component_[10641544592923449938]": { + "$type": "EditorInspectorComponent", + "Id": 10641544592923449938 + }, + "Component_[12039882709170782873]": { + "$type": "EditorOnlyEntityComponent", + "Id": 12039882709170782873 + }, + "Component_[12265484671603697631]": { + "$type": "EditorPendingCompositionComponent", + "Id": 12265484671603697631 + }, + "Component_[14126657869720434043]": { + "$type": "EditorEntitySortComponent", + "Id": 14126657869720434043, + "Child Entity Order": [ + "Entity_[1176639161715]", + "Entity_[2086619895629]", + "Entity_[2086619895629]" + ] + }, + "Component_[15230859088967841193]": { + "$type": "{27F1E1A1-8D9D-4C3B-BD3A-AFB9762449C0} TransformComponent", + "Id": 15230859088967841193, + "Parent Entity": "" + }, + "Component_[16239496886950819870]": { + "$type": "EditorDisabledCompositionComponent", + "Id": 16239496886950819870 + }, + "Component_[5688118765544765547]": { + "$type": "EditorEntityIconComponent", + "Id": 5688118765544765547 + }, + "Component_[6545738857812235305]": { + "$type": "SelectionComponent", + "Id": 6545738857812235305 + }, + "Component_[7247035804068349658]": { + "$type": "EditorPrefabComponent", + "Id": 7247035804068349658 + }, + "Component_[9307224322037797205]": { + "$type": "EditorLockComponent", + "Id": 9307224322037797205 + }, + "Component_[9562516168917670048]": { + "$type": "EditorVisibilityComponent", + "Id": 9562516168917670048 + } + } + }, + "Entities": { + "Entity_[1155164325235]": { + "Id": "Entity_[1155164325235]", + "Name": "Sun", + "Components": { + "Component_[10440557478882592717]": { + "$type": "SelectionComponent", + "Id": 10440557478882592717 + }, + "Component_[13620450453324765907]": { + "$type": "EditorLockComponent", + "Id": 13620450453324765907 + }, + "Component_[2134313378593666258]": { + "$type": "EditorInspectorComponent", + "Id": 2134313378593666258 + }, + "Component_[234010807770404186]": { + "$type": "EditorVisibilityComponent", + "Id": 234010807770404186 + }, + "Component_[2970359110423865725]": { + "$type": "EditorEntityIconComponent", + "Id": 2970359110423865725 + }, + "Component_[3722854130373041803]": { + "$type": "EditorOnlyEntityComponent", + "Id": 3722854130373041803 + }, + "Component_[5992533738676323195]": { + "$type": "EditorDisabledCompositionComponent", + "Id": 5992533738676323195 + }, + "Component_[7378860763541895402]": { + "$type": "AZ::Render::EditorDirectionalLightComponent", + "Id": 7378860763541895402, + "Controller": { + "Configuration": { + "Intensity": 1.0, + "CameraEntityId": "", + "ShadowFilterMethod": 1 + } + } + }, + "Component_[7892834440890947578]": { + "$type": "{27F1E1A1-8D9D-4C3B-BD3A-AFB9762449C0} TransformComponent", + "Id": 7892834440890947578, + "Parent Entity": "Entity_[1176639161715]", + "Transform Data": { + "Translate": [ + 0.0, + 0.0, + 13.487043380737305 + ], + "Rotate": [ + -76.13099670410156, + -0.847000002861023, + -15.8100004196167 + ] + } + }, + "Component_[8599729549570828259]": { + "$type": "EditorEntitySortComponent", + "Id": 8599729549570828259 + }, + "Component_[952797371922080273]": { + "$type": "EditorPendingCompositionComponent", + "Id": 952797371922080273 + } + } + }, + "Entity_[1159459292531]": { + "Id": "Entity_[1159459292531]", + "Name": "Ground", + "Components": { + "Component_[11701138785793981042]": { + "$type": "SelectionComponent", + "Id": 11701138785793981042 + }, + "Component_[12260880513256986252]": { + "$type": "EditorEntityIconComponent", + "Id": 12260880513256986252 + }, + "Component_[13711420870643673468]": { + "$type": "EditorDisabledCompositionComponent", + "Id": 13711420870643673468 + }, + "Component_[138002849734991713]": { + "$type": "EditorOnlyEntityComponent", + "Id": 138002849734991713 + }, + "Component_[16578565737331764849]": { + "$type": "{27F1E1A1-8D9D-4C3B-BD3A-AFB9762449C0} TransformComponent", + "Id": 16578565737331764849, + "Parent Entity": "Entity_[1176639161715]" + }, + "Component_[16919232076966545697]": { + "$type": "EditorInspectorComponent", + "Id": 16919232076966545697 + }, + "Component_[5182430712893438093]": { + "$type": "EditorMaterialComponent", + "Id": 5182430712893438093 + }, + "Component_[5675108321710651991]": { + "$type": "AZ::Render::EditorMeshComponent", + "Id": 5675108321710651991, + "Controller": { + "Configuration": { + "ModelAsset": { + "assetId": { + "guid": "{0CD745C0-6AA8-569A-A68A-73A3270986C4}", + "subId": 277889906 + }, + "assetHint": "objects/groudplane/groundplane_512x512m.azmodel" + } + } + } + }, + "Component_[5681893399601237518]": { + "$type": "EditorEntitySortComponent", + "Id": 5681893399601237518 + }, + "Component_[592692962543397545]": { + "$type": "EditorPendingCompositionComponent", + "Id": 592692962543397545 + }, + "Component_[7090012899106946164]": { + "$type": "EditorLockComponent", + "Id": 7090012899106946164 + }, + "Component_[9410832619875640998]": { + "$type": "EditorVisibilityComponent", + "Id": 9410832619875640998 + } + } + }, + "Entity_[1163754259827]": { + "Id": "Entity_[1163754259827]", + "Name": "Camera", + "Components": { + "Component_[11895140916889160460]": { + "$type": "EditorEntityIconComponent", + "Id": 11895140916889160460 + }, + "Component_[16880285896855930892]": { + "$type": "{CA11DA46-29FF-4083-B5F6-E02C3A8C3A3D} EditorCameraComponent", + "Id": 16880285896855930892, + "Controller": { + "Configuration": { + "Field of View": 55.0, + "EditorEntityId": 6861302815203973165 + } + } + }, + "Component_[17187464423780271193]": { + "$type": "EditorLockComponent", + "Id": 17187464423780271193 + }, + "Component_[17495696818315413311]": { + "$type": "EditorEntitySortComponent", + "Id": 17495696818315413311 + }, + "Component_[18086214374043522055]": { + "$type": "{27F1E1A1-8D9D-4C3B-BD3A-AFB9762449C0} TransformComponent", + "Id": 18086214374043522055, + "Parent Entity": "Entity_[1176639161715]", + "Transform Data": { + "Translate": [ + -2.3000001907348633, + -3.9368600845336914, + 1.0 + ], + "Rotate": [ + -2.050307512283325, + 1.9552897214889526, + -43.623355865478516 + ] + } + }, + "Component_[18387556550380114975]": { + "$type": "SelectionComponent", + "Id": 18387556550380114975 + }, + "Component_[2654521436129313160]": { + "$type": "EditorVisibilityComponent", + "Id": 2654521436129313160 + }, + "Component_[5265045084611556958]": { + "$type": "EditorDisabledCompositionComponent", + "Id": 5265045084611556958 + }, + "Component_[7169798125182238623]": { + "$type": "EditorPendingCompositionComponent", + "Id": 7169798125182238623 + }, + "Component_[7255796294953281766]": { + "$type": "GenericComponentWrapper", + "Id": 7255796294953281766, + "m_template": { + "$type": "FlyCameraInputComponent" + } + }, + "Component_[8866210352157164042]": { + "$type": "EditorInspectorComponent", + "Id": 8866210352157164042 + }, + "Component_[9129253381063760879]": { + "$type": "EditorOnlyEntityComponent", + "Id": 9129253381063760879 + } + } + }, + "Entity_[1168049227123]": { + "Id": "Entity_[1168049227123]", + "Name": "Grid", + "Components": { + "Component_[11443347433215807130]": { + "$type": "EditorEntityIconComponent", + "Id": 11443347433215807130 + }, + "Component_[11779275529534764488]": { + "$type": "SelectionComponent", + "Id": 11779275529534764488 + }, + "Component_[14249419413039427459]": { + "$type": "EditorInspectorComponent", + "Id": 14249419413039427459 + }, + "Component_[15448581635946161318]": { + "$type": "AZ::Render::EditorGridComponent", + "Id": 15448581635946161318, + "Controller": { + "Configuration": { + "primarySpacing": 4.0, + "primaryColor": [ + 0.501960813999176, + 0.501960813999176, + 0.501960813999176 + ], + "secondarySpacing": 0.5, + "secondaryColor": [ + 0.250980406999588, + 0.250980406999588, + 0.250980406999588 + ] + } + } + }, + "Component_[1843303322527297409]": { + "$type": "EditorDisabledCompositionComponent", + "Id": 1843303322527297409 + }, + "Component_[380249072065273654]": { + "$type": "{27F1E1A1-8D9D-4C3B-BD3A-AFB9762449C0} TransformComponent", + "Id": 380249072065273654, + "Parent Entity": "Entity_[1176639161715]" + }, + "Component_[7476660583684339787]": { + "$type": "EditorPendingCompositionComponent", + "Id": 7476660583684339787 + }, + "Component_[7557626501215118375]": { + "$type": "EditorEntitySortComponent", + "Id": 7557626501215118375 + }, + "Component_[7984048488947365511]": { + "$type": "EditorVisibilityComponent", + "Id": 7984048488947365511 + }, + "Component_[8118181039276487398]": { + "$type": "EditorOnlyEntityComponent", + "Id": 8118181039276487398 + }, + "Component_[9189909764215270515]": { + "$type": "EditorLockComponent", + "Id": 9189909764215270515 + } + } + }, + "Entity_[1172344194419]": { + "Id": "Entity_[1172344194419]", + "Name": "Shader Ball", + "Components": { + "Component_[10789351944715265527]": { + "$type": "EditorOnlyEntityComponent", + "Id": 10789351944715265527 + }, + "Component_[12037033284781049225]": { + "$type": "EditorEntitySortComponent", + "Id": 12037033284781049225 + }, + "Component_[13759153306105970079]": { + "$type": "EditorPendingCompositionComponent", + "Id": 13759153306105970079 + }, + "Component_[14135560884830586279]": { + "$type": "EditorInspectorComponent", + "Id": 14135560884830586279 + }, + "Component_[16247165675903986673]": { + "$type": "EditorVisibilityComponent", + "Id": 16247165675903986673 + }, + "Component_[18082433625958885247]": { + "$type": "EditorDisabledCompositionComponent", + "Id": 18082433625958885247 + }, + "Component_[6472623349872972660]": { + "$type": "{27F1E1A1-8D9D-4C3B-BD3A-AFB9762449C0} TransformComponent", + "Id": 6472623349872972660, + "Parent Entity": "Entity_[1176639161715]", + "Transform Data": { + "Rotate": [ + 0.0, + 0.10000000149011612, + 180.0 + ] + } + }, + "Component_[6495255223970673916]": { + "$type": "AZ::Render::EditorMeshComponent", + "Id": 6495255223970673916, + "Controller": { + "Configuration": { + "ModelAsset": { + "assetId": { + "guid": "{FD340C30-755C-5911-92A3-19A3F7A77931}", + "subId": 281415304 + }, + "assetHint": "objects/shaderball/shaderball_default_1m.azmodel" + } + } + } + }, + "Component_[8056625192494070973]": { + "$type": "SelectionComponent", + "Id": 8056625192494070973 + }, + "Component_[8550141614185782969]": { + "$type": "EditorEntityIconComponent", + "Id": 8550141614185782969 + }, + "Component_[9439770997198325425]": { + "$type": "EditorLockComponent", + "Id": 9439770997198325425 + } + } + }, + "Entity_[1176639161715]": { + "Id": "Entity_[1176639161715]", + "Name": "Atom Default Environment", + "Components": { + "Component_[10757302973393310045]": { + "$type": "{27F1E1A1-8D9D-4C3B-BD3A-AFB9762449C0} TransformComponent", + "Id": 10757302973393310045, + "Parent Entity": "Entity_[1146574390643]" + }, + "Component_[14505817420424255464]": { + "$type": "EditorInspectorComponent", + "Id": 14505817420424255464, + "ComponentOrderEntryArray": [ + { + "ComponentId": 10757302973393310045 + } + ] + }, + "Component_[14988041764659020032]": { + "$type": "EditorLockComponent", + "Id": 14988041764659020032 + }, + "Component_[15808690248755038124]": { + "$type": "SelectionComponent", + "Id": 15808690248755038124 + }, + "Component_[15900837685796817138]": { + "$type": "EditorVisibilityComponent", + "Id": 15900837685796817138 + }, + "Component_[3298767348226484884]": { + "$type": "EditorOnlyEntityComponent", + "Id": 3298767348226484884 + }, + "Component_[4076975109609220594]": { + "$type": "EditorPendingCompositionComponent", + "Id": 4076975109609220594 + }, + "Component_[5679760548946028854]": { + "$type": "EditorDisabledCompositionComponent", + "Id": 5679760548946028854 + }, + "Component_[5855590796136709437]": { + "$type": "EditorEntitySortComponent", + "Id": 5855590796136709437, + "Child Entity Order": [ + "Entity_[1155164325235]", + "Entity_[1180934129011]", + "Entity_[1172344194419]", + "Entity_[1168049227123]", + "Entity_[1163754259827]", + "Entity_[1159459292531]" + ] + }, + "Component_[9277695270015777859]": { + "$type": "EditorEntityIconComponent", + "Id": 9277695270015777859 + } + } + }, + "Entity_[1180934129011]": { + "Id": "Entity_[1180934129011]", + "Name": "Global Sky", + "Components": { + "Component_[11231930600558681245]": { + "$type": "AZ::Render::EditorHDRiSkyboxComponent", + "Id": 11231930600558681245, + "Controller": { + "Configuration": { + "CubemapAsset": { + "assetId": { + "guid": "{215E47FD-D181-5832-B1AB-91673ABF6399}", + "subId": 1000 + }, + "assetHint": "lightingpresets/highcontrast/goegap_4k_skyboxcm.exr.streamingimage" + } + } + } + }, + "Component_[11980494120202836095]": { + "$type": "SelectionComponent", + "Id": 11980494120202836095 + }, + "Component_[1428633914413949476]": { + "$type": "EditorLockComponent", + "Id": 1428633914413949476 + }, + "Component_[14936200426671614999]": { + "$type": "AZ::Render::EditorImageBasedLightComponent", + "Id": 14936200426671614999, + "Controller": { + "Configuration": { + "diffuseImageAsset": { + "assetId": { + "guid": "{3FD09945-D0F2-55C8-B9AF-B2FD421FE3BE}", + "subId": 3000 + }, + "assetHint": "lightingpresets/highcontrast/goegap_4k_iblglobalcm_ibldiffuse.exr.streamingimage" + }, + "specularImageAsset": { + "assetId": { + "guid": "{3FD09945-D0F2-55C8-B9AF-B2FD421FE3BE}", + "subId": 2000 + }, + "assetHint": "lightingpresets/highcontrast/goegap_4k_iblglobalcm_iblspecular.exr.streamingimage" + } + } + } + }, + "Component_[14994774102579326069]": { + "$type": "EditorDisabledCompositionComponent", + "Id": 14994774102579326069 + }, + "Component_[15417479889044493340]": { + "$type": "EditorPendingCompositionComponent", + "Id": 15417479889044493340 + }, + "Component_[15826613364991382688]": { + "$type": "EditorEntitySortComponent", + "Id": 15826613364991382688 + }, + "Component_[1665003113283562343]": { + "$type": "EditorOnlyEntityComponent", + "Id": 1665003113283562343 + }, + "Component_[3704934735944502280]": { + "$type": "EditorEntityIconComponent", + "Id": 3704934735944502280 + }, + "Component_[5698542331457326479]": { + "$type": "EditorVisibilityComponent", + "Id": 5698542331457326479 + }, + "Component_[6644513399057217122]": { + "$type": "{27F1E1A1-8D9D-4C3B-BD3A-AFB9762449C0} TransformComponent", + "Id": 6644513399057217122, + "Parent Entity": "Entity_[1176639161715]" + }, + "Component_[931091830724002070]": { + "$type": "EditorInspectorComponent", + "Id": 931091830724002070 + } + } + }, + "Entity_[2086619895629]": { + "Id": "Entity_[2086619895629]", + "Name": "metrics", + "Components": { + "Component_[10664937239001700943]": { + "$type": "SelectionComponent", + "Id": 10664937239001700943 + }, + "Component_[12411100785613400502]": { + "$type": "EditorVisibilityComponent", + "Id": 12411100785613400502 + }, + "Component_[13461617945403887462]": { + "$type": "EditorEntityIconComponent", + "Id": 13461617945403887462 + }, + "Component_[1398528805938487915]": { + "$type": "EditorInspectorComponent", + "Id": 1398528805938487915 + }, + "Component_[15586634767575159325]": { + "$type": "EditorEntitySortComponent", + "Id": 15586634767575159325 + }, + "Component_[1737734807882912852]": { + "$type": "EditorDisabledCompositionComponent", + "Id": 1737734807882912852 + }, + "Component_[2398400563175352537]": { + "$type": "EditorOnlyEntityComponent", + "Id": 2398400563175352537 + }, + "Component_[3845542252660517302]": { + "$type": "EditorPendingCompositionComponent", + "Id": 3845542252660517302 + }, + "Component_[3873433240186817282]": { + "$type": "EditorLockComponent", + "Id": 3873433240186817282 + }, + "Component_[4474288881478318615]": { + "$type": "{27F1E1A1-8D9D-4C3B-BD3A-AFB9762449C0} TransformComponent", + "Id": 4474288881478318615, + "Parent Entity": "Entity_[1146574390643]", + "Transform Data": { + "Translate": [ + 0.0, + 0.10000038146972656, + 4.005923748016357 + ] + } + }, + "Component_[5865591669658426602]": { + "$type": "ScriptEditorComponent", + "Id": 5865591669658426602, + "ScriptComponent": { + "Script": { + "assetId": { + "guid": "{50D66834-9277-5469-892E-DAD087FF4C0E}", + "subId": 1 + }, + "loadBehavior": "QueueLoad", + "assetHint": "levels/aws/metrics/script/metrics.luac" + } + }, + "ScriptAsset": { + "assetId": { + "guid": "{50D66834-9277-5469-892E-DAD087FF4C0E}", + "subId": 1 + }, + "assetHint": "levels/aws/metrics/script/metrics.luac" + } + } + } + } + } +} \ No newline at end of file diff --git a/AutomatedTesting/Levels/AWS/Metrics/filelist.xml b/AutomatedTesting/Levels/AWS/Metrics/filelist.xml deleted file mode 100644 index 3539102346..0000000000 --- a/AutomatedTesting/Levels/AWS/Metrics/filelist.xml +++ /dev/null @@ -1,6 +0,0 @@ - - - - - - diff --git a/AutomatedTesting/Levels/AWS/Metrics/level.pak b/AutomatedTesting/Levels/AWS/Metrics/level.pak deleted file mode 100644 index fd1f5ac6ad..0000000000 --- a/AutomatedTesting/Levels/AWS/Metrics/level.pak +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:e7c0c07b13bb64db344b94d5712e1e802e607a9dee506768b34481f4a76d8505 -size 3593 diff --git a/AutomatedTesting/Levels/Base/Base.prefab b/AutomatedTesting/Levels/Base/Base.prefab index 98495663b7..7765fe488e 100644 --- a/AutomatedTesting/Levels/Base/Base.prefab +++ b/AutomatedTesting/Levels/Base/Base.prefab @@ -1,52 +1,61 @@ { "ContainerEntity": { - "Id": "ContainerEntity", - "Name": "Base", + "Id": "Entity_[1146574390643]", + "Name": "Level", "Components": { - "Component_[10182366347512475253]": { - "$type": "EditorPrefabComponent", - "Id": 10182366347512475253 + "Component_[10641544592923449938]": { + "$type": "EditorInspectorComponent", + "Id": 10641544592923449938 }, - "Component_[12917798267488243668]": { - "$type": "EditorPendingCompositionComponent", - "Id": 12917798267488243668 - }, - "Component_[3261249813163778338]": { + "Component_[12039882709170782873]": { "$type": "EditorOnlyEntityComponent", - "Id": 3261249813163778338 + "Id": 12039882709170782873 }, - "Component_[3837204912784440039]": { - "$type": "EditorDisabledCompositionComponent", - "Id": 3837204912784440039 + "Component_[12265484671603697631]": { + "$type": "EditorPendingCompositionComponent", + "Id": 12265484671603697631 }, - "Component_[4272963378099646759]": { + "Component_[14126657869720434043]": { + "$type": "EditorEntitySortComponent", + "Id": 14126657869720434043, + "ChildEntityOrderEntryArray": [ + { + "EntityId": "" + }, + { + "EntityId": "", + "SortIndex": 1 + } + ] + }, + "Component_[15230859088967841193]": { "$type": "{27F1E1A1-8D9D-4C3B-BD3A-AFB9762449C0} TransformComponent", - "Id": 4272963378099646759, + "Id": 15230859088967841193, "Parent Entity": "" }, - "Component_[4848458548047175816]": { - "$type": "EditorVisibilityComponent", - "Id": 4848458548047175816 + "Component_[16239496886950819870]": { + "$type": "EditorDisabledCompositionComponent", + "Id": 16239496886950819870 }, - "Component_[5787060997243919943]": { - "$type": "EditorInspectorComponent", - "Id": 5787060997243919943 - }, - "Component_[7804170251266531779]": { - "$type": "EditorLockComponent", - "Id": 7804170251266531779 - }, - "Component_[7874177159288365422]": { - "$type": "EditorEntitySortComponent", - "Id": 7874177159288365422 - }, - "Component_[8018146290632383969]": { + "Component_[5688118765544765547]": { "$type": "EditorEntityIconComponent", - "Id": 8018146290632383969 + "Id": 5688118765544765547 }, - "Component_[8452360690590857075]": { + "Component_[6545738857812235305]": { "$type": "SelectionComponent", - "Id": 8452360690590857075 + "Id": 6545738857812235305 + }, + "Component_[7247035804068349658]": { + "$type": "EditorPrefabComponent", + "Id": 7247035804068349658 + }, + "Component_[9307224322037797205]": { + "$type": "EditorLockComponent", + "Id": 9307224322037797205 + }, + "Component_[9562516168917670048]": { + "$type": "EditorVisibilityComponent", + "Id": 9562516168917670048 } } } diff --git a/AutomatedTesting/Levels/Graphics/PbrMaterialChart/PbrMaterialChart.prefab b/AutomatedTesting/Levels/Graphics/PbrMaterialChart/PbrMaterialChart.prefab new file mode 100644 index 0000000000..2c0ee5cb1a --- /dev/null +++ b/AutomatedTesting/Levels/Graphics/PbrMaterialChart/PbrMaterialChart.prefab @@ -0,0 +1,5361 @@ +{ + "ContainerEntity": { + "Id": "ContainerEntity", + "Name": "PbrMaterialChart", + "Components": { + "Component_[10182366347512475253]": { + "$type": "EditorPrefabComponent", + "Id": 10182366347512475253 + }, + "Component_[12917798267488243668]": { + "$type": "EditorPendingCompositionComponent", + "Id": 12917798267488243668 + }, + "Component_[3261249813163778338]": { + "$type": "EditorOnlyEntityComponent", + "Id": 3261249813163778338 + }, + "Component_[3837204912784440039]": { + "$type": "EditorDisabledCompositionComponent", + "Id": 3837204912784440039 + }, + "Component_[4272963378099646759]": { + "$type": "{27F1E1A1-8D9D-4C3B-BD3A-AFB9762449C0} TransformComponent", + "Id": 4272963378099646759, + "Parent Entity": "" + }, + "Component_[4848458548047175816]": { + "$type": "EditorVisibilityComponent", + "Id": 4848458548047175816 + }, + "Component_[5787060997243919943]": { + "$type": "EditorInspectorComponent", + "Id": 5787060997243919943 + }, + "Component_[7804170251266531779]": { + "$type": "EditorLockComponent", + "Id": 7804170251266531779 + }, + "Component_[7874177159288365422]": { + "$type": "EditorEntitySortComponent", + "Id": 7874177159288365422 + }, + "Component_[8018146290632383969]": { + "$type": "EditorEntityIconComponent", + "Id": 8018146290632383969 + }, + "Component_[8452360690590857075]": { + "$type": "SelectionComponent", + "Id": 8452360690590857075 + } + } + }, + "Entities": { + "Entity_[1579029125278]": { + "Id": "Entity_[1579029125278]", + "Name": "PointLights", + "Components": { + "Component_[12510478104502833762]": { + "$type": "EditorDisabledCompositionComponent", + "Id": 12510478104502833762 + }, + "Component_[13423580362045259926]": { + "$type": "EditorOnlyEntityComponent", + "Id": 13423580362045259926 + }, + "Component_[13763004328692227859]": { + "$type": "EditorEntityIconComponent", + "Id": 13763004328692227859 + }, + "Component_[2520589158620366474]": { + "$type": "EditorInspectorComponent", + "Id": 2520589158620366474, + "ComponentOrderEntryArray": [ + { + "ComponentId": 534931914642899990 + } + ] + }, + "Component_[534931914642899990]": { + "$type": "{27F1E1A1-8D9D-4C3B-BD3A-AFB9762449C0} TransformComponent", + "Id": 534931914642899990, + "Parent Entity": "Entity_[311518247264]", + "Transform Data": { + "Translate": [ + -0.02220340073108673, + 0.013456299901008606, + -0.00310519989579916 + ] + } + }, + "Component_[5737862213737495371]": { + "$type": "EditorEntitySortComponent", + "Id": 5737862213737495371, + "Child Entity Order": [ + "Entity_[1656338536606]", + "Entity_[1660633503902]", + "Entity_[1664928471198]", + "Entity_[1669223438494]", + "Entity_[1673518405790]", + "Entity_[1677813373086]", + "Entity_[1686403307678]", + "Entity_[1690698274974]", + "Entity_[1694993242270]", + "Entity_[1699288209566]", + "Entity_[1703583176862]", + "Entity_[1707878144158]", + "Entity_[1712173111454]", + "Entity_[1716468078750]", + "Entity_[464906102212]", + "Entity_[494970873284]", + "Entity_[460611134916]", + "Entity_[490675905988]", + "Entity_[456316167620]", + "Entity_[486380938692]", + "Entity_[452021200324]", + "Entity_[482085971396]", + "Entity_[447726233028]", + "Entity_[477791004100]", + "Entity_[443431265732]", + "Entity_[473496036804]", + "Entity_[439136298436]", + "Entity_[469201069508]" + ] + }, + "Component_[5835050117930709038]": { + "$type": "EditorLockComponent", + "Id": 5835050117930709038 + }, + "Component_[6088690331735476148]": { + "$type": "EditorVisibilityComponent", + "Id": 6088690331735476148 + }, + "Component_[749445421357843144]": { + "$type": "EditorPendingCompositionComponent", + "Id": 749445421357843144 + }, + "Component_[7514335123333124112]": { + "$type": "SelectionComponent", + "Id": 7514335123333124112 + } + } + }, + "Entity_[1656338536606]": { + "Id": "Entity_[1656338536606]", + "Name": "Light", + "Components": { + "Component_[12284008075844705430]": { + "$type": "{27F1E1A1-8D9D-4C3B-BD3A-AFB9762449C0} TransformComponent", + "Id": 12284008075844705430, + "Parent Entity": "Entity_[1579029125278]", + "Transform Data": { + "Translate": [ + 7.999998569488525, + 0.0, + 6.0 + ] + } + }, + "Component_[13457184847449496840]": { + "$type": "EditorDisabledCompositionComponent", + "Id": 13457184847449496840 + }, + "Component_[14431842353830635996]": { + "$type": "EditorLockComponent", + "Id": 14431842353830635996 + }, + "Component_[1473579476469110229]": { + "$type": "EditorPendingCompositionComponent", + "Id": 1473579476469110229 + }, + "Component_[17008596888127953988]": { + "$type": "EditorEntitySortComponent", + "Id": 17008596888127953988 + }, + "Component_[17246196475221723560]": { + "$type": "EditorInspectorComponent", + "Id": 17246196475221723560, + "ComponentOrderEntryArray": [ + { + "ComponentId": 12284008075844705430 + }, + { + "ComponentId": 7864910209001174169, + "SortIndex": 1 + } + ] + }, + "Component_[18388752482036682870]": { + "$type": "EditorOnlyEntityComponent", + "Id": 18388752482036682870 + }, + "Component_[3917765902796274739]": { + "$type": "EditorEntityIconComponent", + "Id": 3917765902796274739 + }, + "Component_[4143676462074671972]": { + "$type": "AZ::Render::EditorAreaLightComponent", + "Id": 4143676462074671972, + "Controller": { + "Configuration": { + "LightType": 1, + "IntensityMode": 1, + "Intensity": 50.0, + "AttenuationRadius": 79.26654815673828 + } + } + }, + "Component_[4863305662794796025]": { + "$type": "EditorVisibilityComponent", + "Id": 4863305662794796025 + }, + "Component_[5730069629780503964]": { + "$type": "EditorSphereShapeComponent", + "Id": 5730069629780503964, + "ShapeColor": [ + 1.0, + 1.0, + 1.0, + 1.0 + ], + "SphereShape": { + "Configuration": { + "Radius": 0.05000000074505806 + } + } + }, + "Component_[5902189275159544426]": { + "$type": "SelectionComponent", + "Id": 5902189275159544426 + } + } + }, + "Entity_[1660633503902]": { + "Id": "Entity_[1660633503902]", + "Name": "Light", + "Components": { + "Component_[12284008075844705430]": { + "$type": "{27F1E1A1-8D9D-4C3B-BD3A-AFB9762449C0} TransformComponent", + "Id": 12284008075844705430, + "Parent Entity": "Entity_[1579029125278]", + "Transform Data": { + "Translate": [ + 7.999998569488525, + 12.0, + 6.0 + ] + } + }, + "Component_[12938187889472820644]": { + "$type": "EditorSphereShapeComponent", + "Id": 12938187889472820644, + "ShapeColor": [ + 1.0, + 1.0, + 1.0, + 1.0 + ], + "SphereShape": { + "Configuration": { + "Radius": 0.05000000074505806 + } + } + }, + "Component_[13457184847449496840]": { + "$type": "EditorDisabledCompositionComponent", + "Id": 13457184847449496840 + }, + "Component_[14431842353830635996]": { + "$type": "EditorLockComponent", + "Id": 14431842353830635996 + }, + "Component_[1473579476469110229]": { + "$type": "EditorPendingCompositionComponent", + "Id": 1473579476469110229 + }, + "Component_[17008596888127953988]": { + "$type": "EditorEntitySortComponent", + "Id": 17008596888127953988 + }, + "Component_[17246196475221723560]": { + "$type": "EditorInspectorComponent", + "Id": 17246196475221723560, + "ComponentOrderEntryArray": [ + { + "ComponentId": 12284008075844705430 + }, + { + "ComponentId": 7864910209001174169, + "SortIndex": 1 + } + ] + }, + "Component_[18388752482036682870]": { + "$type": "EditorOnlyEntityComponent", + "Id": 18388752482036682870 + }, + "Component_[3917765902796274739]": { + "$type": "EditorEntityIconComponent", + "Id": 3917765902796274739 + }, + "Component_[4143676462074671972]": { + "$type": "AZ::Render::EditorAreaLightComponent", + "Id": 4143676462074671972, + "Controller": { + "Configuration": { + "LightType": 1, + "IntensityMode": 1, + "Intensity": 50.0, + "AttenuationRadius": 79.26654815673828 + } + } + }, + "Component_[4863305662794796025]": { + "$type": "EditorVisibilityComponent", + "Id": 4863305662794796025 + }, + "Component_[5902189275159544426]": { + "$type": "SelectionComponent", + "Id": 5902189275159544426 + } + } + }, + "Entity_[1664928471198]": { + "Id": "Entity_[1664928471198]", + "Name": "Light", + "Components": { + "Component_[12284008075844705430]": { + "$type": "{27F1E1A1-8D9D-4C3B-BD3A-AFB9762449C0} TransformComponent", + "Id": 12284008075844705430, + "Parent Entity": "Entity_[1579029125278]", + "Transform Data": { + "Translate": [ + 7.999998569488525, + -10.0, + 6.0 + ] + } + }, + "Component_[13457184847449496840]": { + "$type": "EditorDisabledCompositionComponent", + "Id": 13457184847449496840 + }, + "Component_[14431842353830635996]": { + "$type": "EditorLockComponent", + "Id": 14431842353830635996 + }, + "Component_[1473579476469110229]": { + "$type": "EditorPendingCompositionComponent", + "Id": 1473579476469110229 + }, + "Component_[15916755507523201463]": { + "$type": "EditorSphereShapeComponent", + "Id": 15916755507523201463, + "ShapeColor": [ + 1.0, + 1.0, + 1.0, + 1.0 + ], + "SphereShape": { + "Configuration": { + "Radius": 0.05000000074505806 + } + } + }, + "Component_[17008596888127953988]": { + "$type": "EditorEntitySortComponent", + "Id": 17008596888127953988 + }, + "Component_[17246196475221723560]": { + "$type": "EditorInspectorComponent", + "Id": 17246196475221723560, + "ComponentOrderEntryArray": [ + { + "ComponentId": 12284008075844705430 + }, + { + "ComponentId": 7864910209001174169, + "SortIndex": 1 + } + ] + }, + "Component_[18388752482036682870]": { + "$type": "EditorOnlyEntityComponent", + "Id": 18388752482036682870 + }, + "Component_[3917765902796274739]": { + "$type": "EditorEntityIconComponent", + "Id": 3917765902796274739 + }, + "Component_[4143676462074671972]": { + "$type": "AZ::Render::EditorAreaLightComponent", + "Id": 4143676462074671972, + "Controller": { + "Configuration": { + "LightType": 1, + "IntensityMode": 1, + "Intensity": 50.0, + "AttenuationRadius": 79.26654815673828 + } + } + }, + "Component_[4863305662794796025]": { + "$type": "EditorVisibilityComponent", + "Id": 4863305662794796025 + }, + "Component_[5902189275159544426]": { + "$type": "SelectionComponent", + "Id": 5902189275159544426 + } + } + }, + "Entity_[1669223438494]": { + "Id": "Entity_[1669223438494]", + "Name": "Light", + "Components": { + "Component_[11441320324927657842]": { + "$type": "EditorSphereShapeComponent", + "Id": 11441320324927657842, + "ShapeColor": [ + 1.0, + 1.0, + 1.0, + 1.0 + ], + "SphereShape": { + "Configuration": { + "Radius": 0.05000000074505806 + } + } + }, + "Component_[12284008075844705430]": { + "$type": "{27F1E1A1-8D9D-4C3B-BD3A-AFB9762449C0} TransformComponent", + "Id": 12284008075844705430, + "Parent Entity": "Entity_[1579029125278]", + "Transform Data": { + "Translate": [ + 7.999998092651367, + 0.0, + -6.0 + ] + } + }, + "Component_[13457184847449496840]": { + "$type": "EditorDisabledCompositionComponent", + "Id": 13457184847449496840 + }, + "Component_[14431842353830635996]": { + "$type": "EditorLockComponent", + "Id": 14431842353830635996 + }, + "Component_[1473579476469110229]": { + "$type": "EditorPendingCompositionComponent", + "Id": 1473579476469110229 + }, + "Component_[17008596888127953988]": { + "$type": "EditorEntitySortComponent", + "Id": 17008596888127953988 + }, + "Component_[17246196475221723560]": { + "$type": "EditorInspectorComponent", + "Id": 17246196475221723560, + "ComponentOrderEntryArray": [ + { + "ComponentId": 12284008075844705430 + }, + { + "ComponentId": 7864910209001174169, + "SortIndex": 1 + } + ] + }, + "Component_[18388752482036682870]": { + "$type": "EditorOnlyEntityComponent", + "Id": 18388752482036682870 + }, + "Component_[3917765902796274739]": { + "$type": "EditorEntityIconComponent", + "Id": 3917765902796274739 + }, + "Component_[4143676462074671972]": { + "$type": "AZ::Render::EditorAreaLightComponent", + "Id": 4143676462074671972, + "Controller": { + "Configuration": { + "LightType": 1, + "IntensityMode": 1, + "Intensity": 50.0, + "AttenuationRadius": 79.26654815673828 + } + } + }, + "Component_[4863305662794796025]": { + "$type": "EditorVisibilityComponent", + "Id": 4863305662794796025 + }, + "Component_[5902189275159544426]": { + "$type": "SelectionComponent", + "Id": 5902189275159544426 + } + } + }, + "Entity_[1673518405790]": { + "Id": "Entity_[1673518405790]", + "Name": "Light", + "Components": { + "Component_[12284008075844705430]": { + "$type": "{27F1E1A1-8D9D-4C3B-BD3A-AFB9762449C0} TransformComponent", + "Id": 12284008075844705430, + "Parent Entity": "Entity_[1579029125278]", + "Transform Data": { + "Translate": [ + 7.999998092651367, + 12.0, + -6.0 + ] + } + }, + "Component_[13457184847449496840]": { + "$type": "EditorDisabledCompositionComponent", + "Id": 13457184847449496840 + }, + "Component_[14431842353830635996]": { + "$type": "EditorLockComponent", + "Id": 14431842353830635996 + }, + "Component_[1473579476469110229]": { + "$type": "EditorPendingCompositionComponent", + "Id": 1473579476469110229 + }, + "Component_[17008596888127953988]": { + "$type": "EditorEntitySortComponent", + "Id": 17008596888127953988 + }, + "Component_[17246196475221723560]": { + "$type": "EditorInspectorComponent", + "Id": 17246196475221723560, + "ComponentOrderEntryArray": [ + { + "ComponentId": 12284008075844705430 + }, + { + "ComponentId": 7864910209001174169, + "SortIndex": 1 + } + ] + }, + "Component_[18388752482036682870]": { + "$type": "EditorOnlyEntityComponent", + "Id": 18388752482036682870 + }, + "Component_[3917765902796274739]": { + "$type": "EditorEntityIconComponent", + "Id": 3917765902796274739 + }, + "Component_[4143676462074671972]": { + "$type": "AZ::Render::EditorAreaLightComponent", + "Id": 4143676462074671972, + "Controller": { + "Configuration": { + "LightType": 1, + "IntensityMode": 1, + "Intensity": 50.0, + "AttenuationRadius": 79.26654815673828 + } + } + }, + "Component_[4863305662794796025]": { + "$type": "EditorVisibilityComponent", + "Id": 4863305662794796025 + }, + "Component_[5078442133583813661]": { + "$type": "EditorSphereShapeComponent", + "Id": 5078442133583813661, + "ShapeColor": [ + 1.0, + 1.0, + 1.0, + 1.0 + ], + "SphereShape": { + "Configuration": { + "Radius": 0.05000000074505806 + } + } + }, + "Component_[5902189275159544426]": { + "$type": "SelectionComponent", + "Id": 5902189275159544426 + } + } + }, + "Entity_[1677813373086]": { + "Id": "Entity_[1677813373086]", + "Name": "Light", + "Components": { + "Component_[12284008075844705430]": { + "$type": "{27F1E1A1-8D9D-4C3B-BD3A-AFB9762449C0} TransformComponent", + "Id": 12284008075844705430, + "Parent Entity": "Entity_[1579029125278]", + "Transform Data": { + "Translate": [ + 7.999998092651367, + -10.0, + -6.0 + ] + } + }, + "Component_[13457184847449496840]": { + "$type": "EditorDisabledCompositionComponent", + "Id": 13457184847449496840 + }, + "Component_[14431842353830635996]": { + "$type": "EditorLockComponent", + "Id": 14431842353830635996 + }, + "Component_[1473579476469110229]": { + "$type": "EditorPendingCompositionComponent", + "Id": 1473579476469110229 + }, + "Component_[17008596888127953988]": { + "$type": "EditorEntitySortComponent", + "Id": 17008596888127953988 + }, + "Component_[17246196475221723560]": { + "$type": "EditorInspectorComponent", + "Id": 17246196475221723560, + "ComponentOrderEntryArray": [ + { + "ComponentId": 12284008075844705430 + }, + { + "ComponentId": 7864910209001174169, + "SortIndex": 1 + } + ] + }, + "Component_[18388752482036682870]": { + "$type": "EditorOnlyEntityComponent", + "Id": 18388752482036682870 + }, + "Component_[3917765902796274739]": { + "$type": "EditorEntityIconComponent", + "Id": 3917765902796274739 + }, + "Component_[4143676462074671972]": { + "$type": "AZ::Render::EditorAreaLightComponent", + "Id": 4143676462074671972, + "Controller": { + "Configuration": { + "LightType": 1, + "IntensityMode": 1, + "Intensity": 50.0, + "AttenuationRadius": 79.26654815673828 + } + } + }, + "Component_[4863305662794796025]": { + "$type": "EditorVisibilityComponent", + "Id": 4863305662794796025 + }, + "Component_[5902189275159544426]": { + "$type": "SelectionComponent", + "Id": 5902189275159544426 + }, + "Component_[9989753495273560981]": { + "$type": "EditorSphereShapeComponent", + "Id": 9989753495273560981, + "ShapeColor": [ + 1.0, + 1.0, + 1.0, + 1.0 + ], + "SphereShape": { + "Configuration": { + "Radius": 0.05000000074505806 + } + } + } + } + }, + "Entity_[1686403307678]": { + "Id": "Entity_[1686403307678]", + "Name": "Light", + "Components": { + "Component_[12284008075844705430]": { + "$type": "{27F1E1A1-8D9D-4C3B-BD3A-AFB9762449C0} TransformComponent", + "Id": 12284008075844705430, + "Parent Entity": "Entity_[1579029125278]", + "Transform Data": { + "Translate": [ + 7.999998569488525, + -5.0, + 6.0 + ] + } + }, + "Component_[13457184847449496840]": { + "$type": "EditorDisabledCompositionComponent", + "Id": 13457184847449496840 + }, + "Component_[14431842353830635996]": { + "$type": "EditorLockComponent", + "Id": 14431842353830635996 + }, + "Component_[1473579476469110229]": { + "$type": "EditorPendingCompositionComponent", + "Id": 1473579476469110229 + }, + "Component_[16566594251448483688]": { + "$type": "EditorSphereShapeComponent", + "Id": 16566594251448483688, + "ShapeColor": [ + 1.0, + 1.0, + 1.0, + 1.0 + ], + "SphereShape": { + "Configuration": { + "Radius": 0.05000000074505806 + } + } + }, + "Component_[17008596888127953988]": { + "$type": "EditorEntitySortComponent", + "Id": 17008596888127953988 + }, + "Component_[17246196475221723560]": { + "$type": "EditorInspectorComponent", + "Id": 17246196475221723560, + "ComponentOrderEntryArray": [ + { + "ComponentId": 12284008075844705430 + }, + { + "ComponentId": 7864910209001174169, + "SortIndex": 1 + } + ] + }, + "Component_[18388752482036682870]": { + "$type": "EditorOnlyEntityComponent", + "Id": 18388752482036682870 + }, + "Component_[3917765902796274739]": { + "$type": "EditorEntityIconComponent", + "Id": 3917765902796274739 + }, + "Component_[4143676462074671972]": { + "$type": "AZ::Render::EditorAreaLightComponent", + "Id": 4143676462074671972, + "Controller": { + "Configuration": { + "LightType": 1, + "IntensityMode": 1, + "Intensity": 50.0, + "AttenuationRadius": 79.26654815673828 + } + } + }, + "Component_[4863305662794796025]": { + "$type": "EditorVisibilityComponent", + "Id": 4863305662794796025 + }, + "Component_[5902189275159544426]": { + "$type": "SelectionComponent", + "Id": 5902189275159544426 + } + } + }, + "Entity_[1690698274974]": { + "Id": "Entity_[1690698274974]", + "Name": "Light", + "Components": { + "Component_[12284008075844705430]": { + "$type": "{27F1E1A1-8D9D-4C3B-BD3A-AFB9762449C0} TransformComponent", + "Id": 12284008075844705430, + "Parent Entity": "Entity_[1579029125278]", + "Transform Data": { + "Translate": [ + 7.999998092651367, + -5.0, + -6.0 + ] + } + }, + "Component_[13457184847449496840]": { + "$type": "EditorDisabledCompositionComponent", + "Id": 13457184847449496840 + }, + "Component_[14431842353830635996]": { + "$type": "EditorLockComponent", + "Id": 14431842353830635996 + }, + "Component_[1473579476469110229]": { + "$type": "EditorPendingCompositionComponent", + "Id": 1473579476469110229 + }, + "Component_[17008596888127953988]": { + "$type": "EditorEntitySortComponent", + "Id": 17008596888127953988 + }, + "Component_[17246196475221723560]": { + "$type": "EditorInspectorComponent", + "Id": 17246196475221723560, + "ComponentOrderEntryArray": [ + { + "ComponentId": 12284008075844705430 + }, + { + "ComponentId": 7864910209001174169, + "SortIndex": 1 + } + ] + }, + "Component_[18388752482036682870]": { + "$type": "EditorOnlyEntityComponent", + "Id": 18388752482036682870 + }, + "Component_[3917765902796274739]": { + "$type": "EditorEntityIconComponent", + "Id": 3917765902796274739 + }, + "Component_[4143676462074671972]": { + "$type": "AZ::Render::EditorAreaLightComponent", + "Id": 4143676462074671972, + "Controller": { + "Configuration": { + "LightType": 1, + "IntensityMode": 1, + "Intensity": 50.0, + "AttenuationRadius": 79.26654815673828 + } + } + }, + "Component_[4863305662794796025]": { + "$type": "EditorVisibilityComponent", + "Id": 4863305662794796025 + }, + "Component_[5902189275159544426]": { + "$type": "SelectionComponent", + "Id": 5902189275159544426 + }, + "Component_[7725312483818004226]": { + "$type": "EditorSphereShapeComponent", + "Id": 7725312483818004226, + "ShapeColor": [ + 1.0, + 1.0, + 1.0, + 1.0 + ], + "SphereShape": { + "Configuration": { + "Radius": 0.05000000074505806 + } + } + } + } + }, + "Entity_[1694993242270]": { + "Id": "Entity_[1694993242270]", + "Name": "Light", + "Components": { + "Component_[11871171122135615232]": { + "$type": "EditorSphereShapeComponent", + "Id": 11871171122135615232, + "ShapeColor": [ + 1.0, + 1.0, + 1.0, + 1.0 + ], + "SphereShape": { + "Configuration": { + "Radius": 0.05000000074505806 + } + } + }, + "Component_[12284008075844705430]": { + "$type": "{27F1E1A1-8D9D-4C3B-BD3A-AFB9762449C0} TransformComponent", + "Id": 12284008075844705430, + "Parent Entity": "Entity_[1579029125278]", + "Transform Data": { + "Translate": [ + 7.999998569488525, + 5.0, + 6.0 + ] + } + }, + "Component_[13457184847449496840]": { + "$type": "EditorDisabledCompositionComponent", + "Id": 13457184847449496840 + }, + "Component_[14431842353830635996]": { + "$type": "EditorLockComponent", + "Id": 14431842353830635996 + }, + "Component_[1473579476469110229]": { + "$type": "EditorPendingCompositionComponent", + "Id": 1473579476469110229 + }, + "Component_[17008596888127953988]": { + "$type": "EditorEntitySortComponent", + "Id": 17008596888127953988 + }, + "Component_[17246196475221723560]": { + "$type": "EditorInspectorComponent", + "Id": 17246196475221723560, + "ComponentOrderEntryArray": [ + { + "ComponentId": 12284008075844705430 + }, + { + "ComponentId": 7864910209001174169, + "SortIndex": 1 + } + ] + }, + "Component_[18388752482036682870]": { + "$type": "EditorOnlyEntityComponent", + "Id": 18388752482036682870 + }, + "Component_[3917765902796274739]": { + "$type": "EditorEntityIconComponent", + "Id": 3917765902796274739 + }, + "Component_[4143676462074671972]": { + "$type": "AZ::Render::EditorAreaLightComponent", + "Id": 4143676462074671972, + "Controller": { + "Configuration": { + "LightType": 1, + "IntensityMode": 1, + "Intensity": 50.0, + "AttenuationRadius": 79.26654815673828 + } + } + }, + "Component_[4863305662794796025]": { + "$type": "EditorVisibilityComponent", + "Id": 4863305662794796025 + }, + "Component_[5902189275159544426]": { + "$type": "SelectionComponent", + "Id": 5902189275159544426 + } + } + }, + "Entity_[1699288209566]": { + "Id": "Entity_[1699288209566]", + "Name": "Light", + "Components": { + "Component_[12284008075844705430]": { + "$type": "{27F1E1A1-8D9D-4C3B-BD3A-AFB9762449C0} TransformComponent", + "Id": 12284008075844705430, + "Parent Entity": "Entity_[1579029125278]", + "Transform Data": { + "Translate": [ + 7.999998092651367, + 5.0, + -6.0 + ] + } + }, + "Component_[13457184847449496840]": { + "$type": "EditorDisabledCompositionComponent", + "Id": 13457184847449496840 + }, + "Component_[14431842353830635996]": { + "$type": "EditorLockComponent", + "Id": 14431842353830635996 + }, + "Component_[1473579476469110229]": { + "$type": "EditorPendingCompositionComponent", + "Id": 1473579476469110229 + }, + "Component_[17008596888127953988]": { + "$type": "EditorEntitySortComponent", + "Id": 17008596888127953988 + }, + "Component_[17246196475221723560]": { + "$type": "EditorInspectorComponent", + "Id": 17246196475221723560, + "ComponentOrderEntryArray": [ + { + "ComponentId": 12284008075844705430 + }, + { + "ComponentId": 7864910209001174169, + "SortIndex": 1 + } + ] + }, + "Component_[18388752482036682870]": { + "$type": "EditorOnlyEntityComponent", + "Id": 18388752482036682870 + }, + "Component_[3917765902796274739]": { + "$type": "EditorEntityIconComponent", + "Id": 3917765902796274739 + }, + "Component_[4143676462074671972]": { + "$type": "AZ::Render::EditorAreaLightComponent", + "Id": 4143676462074671972, + "Controller": { + "Configuration": { + "LightType": 1, + "IntensityMode": 1, + "Intensity": 50.0, + "AttenuationRadius": 79.26654815673828 + } + } + }, + "Component_[4863305662794796025]": { + "$type": "EditorVisibilityComponent", + "Id": 4863305662794796025 + }, + "Component_[5902189275159544426]": { + "$type": "SelectionComponent", + "Id": 5902189275159544426 + }, + "Component_[946758060659896190]": { + "$type": "EditorSphereShapeComponent", + "Id": 946758060659896190, + "ShapeColor": [ + 1.0, + 1.0, + 1.0, + 1.0 + ], + "SphereShape": { + "Configuration": { + "Radius": 0.05000000074505806 + } + } + } + } + }, + "Entity_[1703583176862]": { + "Id": "Entity_[1703583176862]", + "Name": "Light", + "Components": { + "Component_[12284008075844705430]": { + "$type": "{27F1E1A1-8D9D-4C3B-BD3A-AFB9762449C0} TransformComponent", + "Id": 12284008075844705430, + "Parent Entity": "Entity_[1579029125278]", + "Transform Data": { + "Translate": [ + 7.999998092651367, + -15.0, + -6.0 + ] + } + }, + "Component_[13457184847449496840]": { + "$type": "EditorDisabledCompositionComponent", + "Id": 13457184847449496840 + }, + "Component_[14431842353830635996]": { + "$type": "EditorLockComponent", + "Id": 14431842353830635996 + }, + "Component_[1473579476469110229]": { + "$type": "EditorPendingCompositionComponent", + "Id": 1473579476469110229 + }, + "Component_[17008596888127953988]": { + "$type": "EditorEntitySortComponent", + "Id": 17008596888127953988 + }, + "Component_[17246196475221723560]": { + "$type": "EditorInspectorComponent", + "Id": 17246196475221723560, + "ComponentOrderEntryArray": [ + { + "ComponentId": 12284008075844705430 + }, + { + "ComponentId": 7864910209001174169, + "SortIndex": 1 + } + ] + }, + "Component_[18375465984866315036]": { + "$type": "EditorSphereShapeComponent", + "Id": 18375465984866315036, + "ShapeColor": [ + 1.0, + 1.0, + 1.0, + 1.0 + ], + "SphereShape": { + "Configuration": { + "Radius": 0.05000000074505806 + } + } + }, + "Component_[18388752482036682870]": { + "$type": "EditorOnlyEntityComponent", + "Id": 18388752482036682870 + }, + "Component_[3917765902796274739]": { + "$type": "EditorEntityIconComponent", + "Id": 3917765902796274739 + }, + "Component_[4143676462074671972]": { + "$type": "AZ::Render::EditorAreaLightComponent", + "Id": 4143676462074671972, + "Controller": { + "Configuration": { + "LightType": 1, + "IntensityMode": 1, + "Intensity": 50.0, + "AttenuationRadius": 79.26654815673828 + } + } + }, + "Component_[4863305662794796025]": { + "$type": "EditorVisibilityComponent", + "Id": 4863305662794796025 + }, + "Component_[5902189275159544426]": { + "$type": "SelectionComponent", + "Id": 5902189275159544426 + } + } + }, + "Entity_[1707878144158]": { + "Id": "Entity_[1707878144158]", + "Name": "Light", + "Components": { + "Component_[10544885903241229342]": { + "$type": "EditorSphereShapeComponent", + "Id": 10544885903241229342, + "ShapeColor": [ + 1.0, + 1.0, + 1.0, + 1.0 + ], + "SphereShape": { + "Configuration": { + "Radius": 0.05000000074505806 + } + } + }, + "Component_[12284008075844705430]": { + "$type": "{27F1E1A1-8D9D-4C3B-BD3A-AFB9762449C0} TransformComponent", + "Id": 12284008075844705430, + "Parent Entity": "Entity_[1579029125278]", + "Transform Data": { + "Translate": [ + 7.999998569488525, + -15.0, + 6.0 + ] + } + }, + "Component_[13457184847449496840]": { + "$type": "EditorDisabledCompositionComponent", + "Id": 13457184847449496840 + }, + "Component_[14431842353830635996]": { + "$type": "EditorLockComponent", + "Id": 14431842353830635996 + }, + "Component_[1473579476469110229]": { + "$type": "EditorPendingCompositionComponent", + "Id": 1473579476469110229 + }, + "Component_[17008596888127953988]": { + "$type": "EditorEntitySortComponent", + "Id": 17008596888127953988 + }, + "Component_[17246196475221723560]": { + "$type": "EditorInspectorComponent", + "Id": 17246196475221723560, + "ComponentOrderEntryArray": [ + { + "ComponentId": 12284008075844705430 + }, + { + "ComponentId": 7864910209001174169, + "SortIndex": 1 + } + ] + }, + "Component_[18388752482036682870]": { + "$type": "EditorOnlyEntityComponent", + "Id": 18388752482036682870 + }, + "Component_[3917765902796274739]": { + "$type": "EditorEntityIconComponent", + "Id": 3917765902796274739 + }, + "Component_[4143676462074671972]": { + "$type": "AZ::Render::EditorAreaLightComponent", + "Id": 4143676462074671972, + "Controller": { + "Configuration": { + "LightType": 1, + "IntensityMode": 1, + "Intensity": 50.0, + "AttenuationRadius": 79.26654815673828 + } + } + }, + "Component_[4863305662794796025]": { + "$type": "EditorVisibilityComponent", + "Id": 4863305662794796025 + }, + "Component_[5902189275159544426]": { + "$type": "SelectionComponent", + "Id": 5902189275159544426 + } + } + }, + "Entity_[1712173111454]": { + "Id": "Entity_[1712173111454]", + "Name": "Light", + "Components": { + "Component_[12284008075844705430]": { + "$type": "{27F1E1A1-8D9D-4C3B-BD3A-AFB9762449C0} TransformComponent", + "Id": 12284008075844705430, + "Parent Entity": "Entity_[1579029125278]", + "Transform Data": { + "Translate": [ + 7.999998569488525, + 15.0, + 6.0 + ] + } + }, + "Component_[13457184847449496840]": { + "$type": "EditorDisabledCompositionComponent", + "Id": 13457184847449496840 + }, + "Component_[14431842353830635996]": { + "$type": "EditorLockComponent", + "Id": 14431842353830635996 + }, + "Component_[1473579476469110229]": { + "$type": "EditorPendingCompositionComponent", + "Id": 1473579476469110229 + }, + "Component_[17008596888127953988]": { + "$type": "EditorEntitySortComponent", + "Id": 17008596888127953988 + }, + "Component_[17246196475221723560]": { + "$type": "EditorInspectorComponent", + "Id": 17246196475221723560, + "ComponentOrderEntryArray": [ + { + "ComponentId": 12284008075844705430 + }, + { + "ComponentId": 7864910209001174169, + "SortIndex": 1 + } + ] + }, + "Component_[18388752482036682870]": { + "$type": "EditorOnlyEntityComponent", + "Id": 18388752482036682870 + }, + "Component_[2820371548226138928]": { + "$type": "EditorSphereShapeComponent", + "Id": 2820371548226138928, + "ShapeColor": [ + 1.0, + 1.0, + 1.0, + 1.0 + ], + "SphereShape": { + "Configuration": { + "Radius": 0.05000000074505806 + } + } + }, + "Component_[3917765902796274739]": { + "$type": "EditorEntityIconComponent", + "Id": 3917765902796274739 + }, + "Component_[4143676462074671972]": { + "$type": "AZ::Render::EditorAreaLightComponent", + "Id": 4143676462074671972, + "Controller": { + "Configuration": { + "LightType": 1, + "IntensityMode": 1, + "Intensity": 50.0, + "AttenuationRadius": 79.26654815673828 + } + } + }, + "Component_[4863305662794796025]": { + "$type": "EditorVisibilityComponent", + "Id": 4863305662794796025 + }, + "Component_[5902189275159544426]": { + "$type": "SelectionComponent", + "Id": 5902189275159544426 + } + } + }, + "Entity_[1716468078750]": { + "Id": "Entity_[1716468078750]", + "Name": "Light", + "Components": { + "Component_[12284008075844705430]": { + "$type": "{27F1E1A1-8D9D-4C3B-BD3A-AFB9762449C0} TransformComponent", + "Id": 12284008075844705430, + "Parent Entity": "Entity_[1579029125278]", + "Transform Data": { + "Translate": [ + 7.999998092651367, + 15.0, + -6.0 + ] + } + }, + "Component_[13457184847449496840]": { + "$type": "EditorDisabledCompositionComponent", + "Id": 13457184847449496840 + }, + "Component_[14431842353830635996]": { + "$type": "EditorLockComponent", + "Id": 14431842353830635996 + }, + "Component_[1473579476469110229]": { + "$type": "EditorPendingCompositionComponent", + "Id": 1473579476469110229 + }, + "Component_[17008596888127953988]": { + "$type": "EditorEntitySortComponent", + "Id": 17008596888127953988 + }, + "Component_[17202118748985219545]": { + "$type": "EditorSphereShapeComponent", + "Id": 17202118748985219545, + "ShapeColor": [ + 1.0, + 1.0, + 1.0, + 1.0 + ], + "SphereShape": { + "Configuration": { + "Radius": 0.05000000074505806 + } + } + }, + "Component_[17246196475221723560]": { + "$type": "EditorInspectorComponent", + "Id": 17246196475221723560, + "ComponentOrderEntryArray": [ + { + "ComponentId": 12284008075844705430 + }, + { + "ComponentId": 7864910209001174169, + "SortIndex": 1 + } + ] + }, + "Component_[18388752482036682870]": { + "$type": "EditorOnlyEntityComponent", + "Id": 18388752482036682870 + }, + "Component_[3917765902796274739]": { + "$type": "EditorEntityIconComponent", + "Id": 3917765902796274739 + }, + "Component_[4143676462074671972]": { + "$type": "AZ::Render::EditorAreaLightComponent", + "Id": 4143676462074671972, + "Controller": { + "Configuration": { + "LightType": 1, + "IntensityMode": 1, + "Intensity": 50.0, + "AttenuationRadius": 79.26654815673828 + } + } + }, + "Component_[4863305662794796025]": { + "$type": "EditorVisibilityComponent", + "Id": 4863305662794796025 + }, + "Component_[5902189275159544426]": { + "$type": "SelectionComponent", + "Id": 5902189275159544426 + } + } + }, + "Entity_[220034968733]": { + "Id": "Entity_[220034968733]", + "Name": "Ball00", + "Components": { + "Component_[11750162722213114821]": { + "$type": "SelectionComponent", + "Id": 11750162722213114821 + }, + "Component_[12608893098077724053]": { + "$type": "EditorEntitySortComponent", + "Id": 12608893098077724053 + }, + "Component_[13797422028724928908]": { + "$type": "AZ::Render::EditorMeshComponent", + "Id": 13797422028724928908, + "Controller": { + "Configuration": { + "ModelAsset": { + "assetId": { + "guid": "{61D16161-9F39-5A29-B927-ADF58E7E573B}", + "subId": 284780167 + }, + "assetHint": "objects/sphere.azmodel" + }, + "LodOverride": 255 + } + } + }, + "Component_[1492865274047869171]": { + "$type": "EditorDisabledCompositionComponent", + "Id": 1492865274047869171 + }, + "Component_[15252998008739701164]": { + "$type": "EditorVisibilityComponent", + "Id": 15252998008739701164 + }, + "Component_[15365333384879292339]": { + "$type": "EditorInspectorComponent", + "Id": 15365333384879292339, + "ComponentOrderEntryArray": [ + { + "ComponentId": 5985506260224649992 + }, + { + "ComponentId": 13797422028724928908, + "SortIndex": 1 + }, + { + "ComponentId": 5200514760734239788, + "SortIndex": 2 + } + ] + }, + "Component_[18296307565715962470]": { + "$type": "EditorPendingCompositionComponent", + "Id": 18296307565715962470 + }, + "Component_[1940145586700385602]": { + "$type": "EditorOnlyEntityComponent", + "Id": 1940145586700385602 + }, + "Component_[4820397163316962417]": { + "$type": "EditorEntityIconComponent", + "Id": 4820397163316962417 + }, + "Component_[5200514760734239788]": { + "$type": "EditorMaterialComponent", + "Id": 5200514760734239788, + "Controller": { + "Configuration": { + "materials": { + "{}": { + "MaterialAsset": { + "assetId": { + "guid": "{12B5A321-3D64-5DF6-9E15-D8F447229EC1}" + }, + "assetHint": "levels/graphics/pbrmaterialchart/materials/basic_m00_r00.azmaterial" + } + } + } + } + }, + "materialSlotsByLodEnabled": true + }, + "Component_[5985506260224649992]": { + "$type": "{27F1E1A1-8D9D-4C3B-BD3A-AFB9762449C0} TransformComponent", + "Id": 5985506260224649992, + "Parent Entity": "Entity_[267279608989]" + }, + "Component_[7650403257628455609]": { + "$type": "EditorLockComponent", + "Id": 7650403257628455609 + } + } + }, + "Entity_[224329936029]": { + "Id": "Entity_[224329936029]", + "Name": "Ball01", + "Components": { + "Component_[11750162722213114821]": { + "$type": "SelectionComponent", + "Id": 11750162722213114821 + }, + "Component_[12608893098077724053]": { + "$type": "EditorEntitySortComponent", + "Id": 12608893098077724053 + }, + "Component_[13797422028724928908]": { + "$type": "AZ::Render::EditorMeshComponent", + "Id": 13797422028724928908, + "Controller": { + "Configuration": { + "ModelAsset": { + "assetId": { + "guid": "{61D16161-9F39-5A29-B927-ADF58E7E573B}", + "subId": 284780167 + }, + "assetHint": "objects/sphere.azmodel" + }, + "LodOverride": 255 + } + } + }, + "Component_[1492865274047869171]": { + "$type": "EditorDisabledCompositionComponent", + "Id": 1492865274047869171 + }, + "Component_[15252998008739701164]": { + "$type": "EditorVisibilityComponent", + "Id": 15252998008739701164 + }, + "Component_[15365333384879292339]": { + "$type": "EditorInspectorComponent", + "Id": 15365333384879292339, + "ComponentOrderEntryArray": [ + { + "ComponentId": 5985506260224649992 + }, + { + "ComponentId": 13797422028724928908, + "SortIndex": 1 + }, + { + "ComponentId": 5200514760734239788, + "SortIndex": 2 + } + ] + }, + "Component_[18296307565715962470]": { + "$type": "EditorPendingCompositionComponent", + "Id": 18296307565715962470 + }, + "Component_[1940145586700385602]": { + "$type": "EditorOnlyEntityComponent", + "Id": 1940145586700385602 + }, + "Component_[4820397163316962417]": { + "$type": "EditorEntityIconComponent", + "Id": 4820397163316962417 + }, + "Component_[5200514760734239788]": { + "$type": "EditorMaterialComponent", + "Id": 5200514760734239788, + "Controller": { + "Configuration": { + "materials": { + "{}": { + "MaterialAsset": { + "assetId": { + "guid": "{EB8B9C49-D6F4-5098-AC97-543381E2554A}" + }, + "assetHint": "levels/graphics/pbrmaterialchart/materials/basic_m00_r01.azmaterial" + } + } + } + } + }, + "materialSlotsByLodEnabled": true + }, + "Component_[5985506260224649992]": { + "$type": "{27F1E1A1-8D9D-4C3B-BD3A-AFB9762449C0} TransformComponent", + "Id": 5985506260224649992, + "Parent Entity": "Entity_[267279608989]", + "Transform Data": { + "Translate": [ + 1.9999995231628418, + 0.0, + 0.0 + ] + } + }, + "Component_[7650403257628455609]": { + "$type": "EditorLockComponent", + "Id": 7650403257628455609 + } + } + }, + "Entity_[224935554679]": { + "Id": "Entity_[224935554679]", + "Name": "Readme", + "Components": { + "Component_[10181355386221924165]": { + "$type": "EditorEntitySortComponent", + "Id": 10181355386221924165 + }, + "Component_[13072143045335196472]": { + "$type": "EditorVisibilityComponent", + "Id": 13072143045335196472 + }, + "Component_[16296166970503880418]": { + "$type": "EditorLockComponent", + "Id": 16296166970503880418 + }, + "Component_[18321120872779505013]": { + "$type": "SelectionComponent", + "Id": 18321120872779505013 + }, + "Component_[1837311764425750149]": { + "$type": "EditorDisabledCompositionComponent", + "Id": 1837311764425750149 + }, + "Component_[1974029438267401978]": { + "$type": "EditorPendingCompositionComponent", + "Id": 1974029438267401978 + }, + "Component_[6189137928773010292]": { + "$type": "EditorCommentComponent", + "Id": 6189137928773010292, + "Configuration": "This level shows StandardPBR materials on a metallic/roughness grid. We only use metallic=0 and metallic=1 for now because we don't have material scripting yet and we don't have 121 separate material files." + }, + "Component_[6233037103326923418]": { + "$type": "{27F1E1A1-8D9D-4C3B-BD3A-AFB9762449C0} TransformComponent", + "Id": 6233037103326923418, + "Parent Entity": "Entity_[311518247264]", + "Transform Data": { + "Translate": [ + 1014.3161010742188, + 1031.1007080078125, + -12.083206176757813 + ] + } + }, + "Component_[8021470524138221046]": { + "$type": "EditorOnlyEntityComponent", + "Id": 8021470524138221046 + }, + "Component_[869896445061711038]": { + "$type": "EditorInspectorComponent", + "Id": 869896445061711038, + "ComponentOrderEntryArray": [ + { + "ComponentId": 6233037103326923418 + }, + { + "ComponentId": 6189137928773010292, + "SortIndex": 1 + } + ] + }, + "Component_[8844687677689032541]": { + "$type": "EditorEntityIconComponent", + "Id": 8844687677689032541 + } + } + }, + "Entity_[227116497304]": { + "Id": "Entity_[227116497304]", + "Name": "IBL", + "Components": { + "Component_[10348929778265892995]": { + "$type": "EditorEntityIconComponent", + "Id": 10348929778265892995 + }, + "Component_[10541730177588140472]": { + "$type": "{27F1E1A1-8D9D-4C3B-BD3A-AFB9762449C0} TransformComponent", + "Id": 10541730177588140472, + "Parent Entity": "Entity_[311518247264]", + "Transform Data": { + "Translate": [ + -3.0222034454345703, + 6.013456344604492, + -51.00310516357422 + ] + } + }, + "Component_[11641917065646729270]": { + "$type": "SelectionComponent", + "Id": 11641917065646729270 + }, + "Component_[11941991254095032209]": { + "$type": "EditorDisabledCompositionComponent", + "Id": 11941991254095032209 + }, + "Component_[16341934394936873930]": { + "$type": "EditorPendingCompositionComponent", + "Id": 16341934394936873930 + }, + "Component_[17356140692640757864]": { + "$type": "AZ::Render::EditorImageBasedLightComponent", + "Id": 17356140692640757864, + "Controller": { + "Configuration": { + "diffuseImageAsset": { + "assetId": { + "guid": "{AA144B9D-68F6-5191-9DD1-211B8D72802C}", + "subId": 3000 + }, + "assetHint": "materialeditor/lightingpresets/konzerthaus_latlong_iblskyboxcm_ibldiffuse.exr.streamingimage" + }, + "specularImageAsset": { + "assetId": { + "guid": "{AA144B9D-68F6-5191-9DD1-211B8D72802C}", + "subId": 2000 + }, + "assetHint": "materialeditor/lightingpresets/konzerthaus_latlong_iblskyboxcm_iblspecular.exr.streamingimage" + } + } + } + }, + "Component_[1774390999207442542]": { + "$type": "EditorEntitySortComponent", + "Id": 1774390999207442542 + }, + "Component_[18079152973233625329]": { + "$type": "EditorLockComponent", + "Id": 18079152973233625329 + }, + "Component_[5784619194218092681]": { + "$type": "EditorVisibilityComponent", + "Id": 5784619194218092681 + }, + "Component_[948613077222456118]": { + "$type": "EditorOnlyEntityComponent", + "Id": 948613077222456118 + }, + "Component_[9509912405166426602]": { + "$type": "EditorInspectorComponent", + "Id": 9509912405166426602, + "ComponentOrderEntryArray": [ + { + "ComponentId": 10541730177588140472 + }, + { + "ComponentId": 17356140692640757864, + "SortIndex": 1 + } + ] + } + } + }, + "Entity_[228624903325]": { + "Id": "Entity_[228624903325]", + "Name": "Ball02", + "Components": { + "Component_[11750162722213114821]": { + "$type": "SelectionComponent", + "Id": 11750162722213114821 + }, + "Component_[12608893098077724053]": { + "$type": "EditorEntitySortComponent", + "Id": 12608893098077724053 + }, + "Component_[13797422028724928908]": { + "$type": "AZ::Render::EditorMeshComponent", + "Id": 13797422028724928908, + "Controller": { + "Configuration": { + "ModelAsset": { + "assetId": { + "guid": "{61D16161-9F39-5A29-B927-ADF58E7E573B}", + "subId": 284780167 + }, + "assetHint": "objects/sphere.azmodel" + }, + "LodOverride": 255 + } + } + }, + "Component_[1492865274047869171]": { + "$type": "EditorDisabledCompositionComponent", + "Id": 1492865274047869171 + }, + "Component_[15252998008739701164]": { + "$type": "EditorVisibilityComponent", + "Id": 15252998008739701164 + }, + "Component_[15365333384879292339]": { + "$type": "EditorInspectorComponent", + "Id": 15365333384879292339, + "ComponentOrderEntryArray": [ + { + "ComponentId": 5985506260224649992 + }, + { + "ComponentId": 13797422028724928908, + "SortIndex": 1 + }, + { + "ComponentId": 5200514760734239788, + "SortIndex": 2 + } + ] + }, + "Component_[18296307565715962470]": { + "$type": "EditorPendingCompositionComponent", + "Id": 18296307565715962470 + }, + "Component_[1940145586700385602]": { + "$type": "EditorOnlyEntityComponent", + "Id": 1940145586700385602 + }, + "Component_[4820397163316962417]": { + "$type": "EditorEntityIconComponent", + "Id": 4820397163316962417 + }, + "Component_[5200514760734239788]": { + "$type": "EditorMaterialComponent", + "Id": 5200514760734239788, + "Controller": { + "Configuration": { + "materials": { + "{}": { + "MaterialAsset": { + "assetId": { + "guid": "{CAA9CAFC-8A48-5406-BE26-448E5AA1A5B0}" + }, + "assetHint": "levels/graphics/pbrmaterialchart/materials/basic_m00_r02.azmaterial" + } + } + } + } + }, + "materialSlotsByLodEnabled": true + }, + "Component_[5985506260224649992]": { + "$type": "{27F1E1A1-8D9D-4C3B-BD3A-AFB9762449C0} TransformComponent", + "Id": 5985506260224649992, + "Parent Entity": "Entity_[267279608989]", + "Transform Data": { + "Translate": [ + 3.9999992847442627, + 0.0, + 0.0 + ] + } + }, + "Component_[7650403257628455609]": { + "$type": "EditorLockComponent", + "Id": 7650403257628455609 + } + } + }, + "Entity_[232919870621]": { + "Id": "Entity_[232919870621]", + "Name": "Ball03", + "Components": { + "Component_[11750162722213114821]": { + "$type": "SelectionComponent", + "Id": 11750162722213114821 + }, + "Component_[12608893098077724053]": { + "$type": "EditorEntitySortComponent", + "Id": 12608893098077724053 + }, + "Component_[13797422028724928908]": { + "$type": "AZ::Render::EditorMeshComponent", + "Id": 13797422028724928908, + "Controller": { + "Configuration": { + "ModelAsset": { + "assetId": { + "guid": "{61D16161-9F39-5A29-B927-ADF58E7E573B}", + "subId": 284780167 + }, + "assetHint": "objects/sphere.azmodel" + }, + "LodOverride": 255 + } + } + }, + "Component_[1492865274047869171]": { + "$type": "EditorDisabledCompositionComponent", + "Id": 1492865274047869171 + }, + "Component_[15252998008739701164]": { + "$type": "EditorVisibilityComponent", + "Id": 15252998008739701164 + }, + "Component_[15365333384879292339]": { + "$type": "EditorInspectorComponent", + "Id": 15365333384879292339, + "ComponentOrderEntryArray": [ + { + "ComponentId": 5985506260224649992 + }, + { + "ComponentId": 13797422028724928908, + "SortIndex": 1 + }, + { + "ComponentId": 5200514760734239788, + "SortIndex": 2 + } + ] + }, + "Component_[18296307565715962470]": { + "$type": "EditorPendingCompositionComponent", + "Id": 18296307565715962470 + }, + "Component_[1940145586700385602]": { + "$type": "EditorOnlyEntityComponent", + "Id": 1940145586700385602 + }, + "Component_[4820397163316962417]": { + "$type": "EditorEntityIconComponent", + "Id": 4820397163316962417 + }, + "Component_[5200514760734239788]": { + "$type": "EditorMaterialComponent", + "Id": 5200514760734239788, + "Controller": { + "Configuration": { + "materials": { + "{}": { + "MaterialAsset": { + "assetId": { + "guid": "{2F338C0B-EF86-5AC4-AEE6-28A26BB9E97E}" + }, + "assetHint": "levels/graphics/pbrmaterialchart/materials/basic_m00_r03.azmaterial" + } + } + } + } + }, + "materialSlotsByLodEnabled": true + }, + "Component_[5985506260224649992]": { + "$type": "{27F1E1A1-8D9D-4C3B-BD3A-AFB9762449C0} TransformComponent", + "Id": 5985506260224649992, + "Parent Entity": "Entity_[267279608989]", + "Transform Data": { + "Translate": [ + 5.999998569488525, + 0.0, + 0.0 + ] + } + }, + "Component_[7650403257628455609]": { + "$type": "EditorLockComponent", + "Id": 7650403257628455609 + } + } + }, + "Entity_[237214837917]": { + "Id": "Entity_[237214837917]", + "Name": "Ball04", + "Components": { + "Component_[11750162722213114821]": { + "$type": "SelectionComponent", + "Id": 11750162722213114821 + }, + "Component_[12608893098077724053]": { + "$type": "EditorEntitySortComponent", + "Id": 12608893098077724053 + }, + "Component_[13797422028724928908]": { + "$type": "AZ::Render::EditorMeshComponent", + "Id": 13797422028724928908, + "Controller": { + "Configuration": { + "ModelAsset": { + "assetId": { + "guid": "{61D16161-9F39-5A29-B927-ADF58E7E573B}", + "subId": 284780167 + }, + "assetHint": "objects/sphere.azmodel" + }, + "LodOverride": 255 + } + } + }, + "Component_[1492865274047869171]": { + "$type": "EditorDisabledCompositionComponent", + "Id": 1492865274047869171 + }, + "Component_[15252998008739701164]": { + "$type": "EditorVisibilityComponent", + "Id": 15252998008739701164 + }, + "Component_[15365333384879292339]": { + "$type": "EditorInspectorComponent", + "Id": 15365333384879292339, + "ComponentOrderEntryArray": [ + { + "ComponentId": 5985506260224649992 + }, + { + "ComponentId": 13797422028724928908, + "SortIndex": 1 + }, + { + "ComponentId": 5200514760734239788, + "SortIndex": 2 + } + ] + }, + "Component_[18296307565715962470]": { + "$type": "EditorPendingCompositionComponent", + "Id": 18296307565715962470 + }, + "Component_[1940145586700385602]": { + "$type": "EditorOnlyEntityComponent", + "Id": 1940145586700385602 + }, + "Component_[4820397163316962417]": { + "$type": "EditorEntityIconComponent", + "Id": 4820397163316962417 + }, + "Component_[5200514760734239788]": { + "$type": "EditorMaterialComponent", + "Id": 5200514760734239788, + "Controller": { + "Configuration": { + "materials": { + "{}": { + "MaterialAsset": { + "assetId": { + "guid": "{9BF4E656-0D4F-5746-A256-32740742712B}" + }, + "assetHint": "levels/graphics/pbrmaterialchart/materials/basic_m00_r04.azmaterial" + } + } + } + } + }, + "materialSlotsByLodEnabled": true + }, + "Component_[5985506260224649992]": { + "$type": "{27F1E1A1-8D9D-4C3B-BD3A-AFB9762449C0} TransformComponent", + "Id": 5985506260224649992, + "Parent Entity": "Entity_[267279608989]", + "Transform Data": { + "Translate": [ + 7.999998092651367, + 0.0, + 0.0 + ] + } + }, + "Component_[7650403257628455609]": { + "$type": "EditorLockComponent", + "Id": 7650403257628455609 + } + } + }, + "Entity_[241509805213]": { + "Id": "Entity_[241509805213]", + "Name": "Ball05", + "Components": { + "Component_[11750162722213114821]": { + "$type": "SelectionComponent", + "Id": 11750162722213114821 + }, + "Component_[12608893098077724053]": { + "$type": "EditorEntitySortComponent", + "Id": 12608893098077724053 + }, + "Component_[13797422028724928908]": { + "$type": "AZ::Render::EditorMeshComponent", + "Id": 13797422028724928908, + "Controller": { + "Configuration": { + "ModelAsset": { + "assetId": { + "guid": "{61D16161-9F39-5A29-B927-ADF58E7E573B}", + "subId": 284780167 + }, + "assetHint": "objects/sphere.azmodel" + }, + "LodOverride": 255 + } + } + }, + "Component_[1492865274047869171]": { + "$type": "EditorDisabledCompositionComponent", + "Id": 1492865274047869171 + }, + "Component_[15252998008739701164]": { + "$type": "EditorVisibilityComponent", + "Id": 15252998008739701164 + }, + "Component_[15365333384879292339]": { + "$type": "EditorInspectorComponent", + "Id": 15365333384879292339, + "ComponentOrderEntryArray": [ + { + "ComponentId": 5985506260224649992 + }, + { + "ComponentId": 13797422028724928908, + "SortIndex": 1 + }, + { + "ComponentId": 5200514760734239788, + "SortIndex": 2 + } + ] + }, + "Component_[18296307565715962470]": { + "$type": "EditorPendingCompositionComponent", + "Id": 18296307565715962470 + }, + "Component_[1940145586700385602]": { + "$type": "EditorOnlyEntityComponent", + "Id": 1940145586700385602 + }, + "Component_[4820397163316962417]": { + "$type": "EditorEntityIconComponent", + "Id": 4820397163316962417 + }, + "Component_[5200514760734239788]": { + "$type": "EditorMaterialComponent", + "Id": 5200514760734239788, + "Controller": { + "Configuration": { + "materials": { + "{}": { + "MaterialAsset": { + "assetId": { + "guid": "{850398D7-386A-56C6-AEB2-95E4F64368B1}" + }, + "assetHint": "levels/graphics/pbrmaterialchart/materials/basic_m00_r05.azmaterial" + } + } + } + } + }, + "materialSlotsByLodEnabled": true + }, + "Component_[5985506260224649992]": { + "$type": "{27F1E1A1-8D9D-4C3B-BD3A-AFB9762449C0} TransformComponent", + "Id": 5985506260224649992, + "Parent Entity": "Entity_[267279608989]", + "Transform Data": { + "Translate": [ + 9.999998092651367, + 0.0, + 0.0 + ] + } + }, + "Component_[7650403257628455609]": { + "$type": "EditorLockComponent", + "Id": 7650403257628455609 + } + } + }, + "Entity_[245804772509]": { + "Id": "Entity_[245804772509]", + "Name": "Ball06", + "Components": { + "Component_[11750162722213114821]": { + "$type": "SelectionComponent", + "Id": 11750162722213114821 + }, + "Component_[12608893098077724053]": { + "$type": "EditorEntitySortComponent", + "Id": 12608893098077724053 + }, + "Component_[13797422028724928908]": { + "$type": "AZ::Render::EditorMeshComponent", + "Id": 13797422028724928908, + "Controller": { + "Configuration": { + "ModelAsset": { + "assetId": { + "guid": "{61D16161-9F39-5A29-B927-ADF58E7E573B}", + "subId": 284780167 + }, + "assetHint": "objects/sphere.azmodel" + }, + "LodOverride": 255 + } + } + }, + "Component_[1492865274047869171]": { + "$type": "EditorDisabledCompositionComponent", + "Id": 1492865274047869171 + }, + "Component_[15252998008739701164]": { + "$type": "EditorVisibilityComponent", + "Id": 15252998008739701164 + }, + "Component_[15365333384879292339]": { + "$type": "EditorInspectorComponent", + "Id": 15365333384879292339, + "ComponentOrderEntryArray": [ + { + "ComponentId": 5985506260224649992 + }, + { + "ComponentId": 13797422028724928908, + "SortIndex": 1 + }, + { + "ComponentId": 5200514760734239788, + "SortIndex": 2 + } + ] + }, + "Component_[18296307565715962470]": { + "$type": "EditorPendingCompositionComponent", + "Id": 18296307565715962470 + }, + "Component_[1940145586700385602]": { + "$type": "EditorOnlyEntityComponent", + "Id": 1940145586700385602 + }, + "Component_[4820397163316962417]": { + "$type": "EditorEntityIconComponent", + "Id": 4820397163316962417 + }, + "Component_[5200514760734239788]": { + "$type": "EditorMaterialComponent", + "Id": 5200514760734239788, + "Controller": { + "Configuration": { + "materials": { + "{}": { + "MaterialAsset": { + "assetId": { + "guid": "{74784C2A-A713-5C6A-8B3D-B66CAE3DD055}" + }, + "assetHint": "levels/graphics/pbrmaterialchart/materials/basic_m00_r06.azmaterial" + } + } + } + } + }, + "materialSlotsByLodEnabled": true + }, + "Component_[5985506260224649992]": { + "$type": "{27F1E1A1-8D9D-4C3B-BD3A-AFB9762449C0} TransformComponent", + "Id": 5985506260224649992, + "Parent Entity": "Entity_[267279608989]", + "Transform Data": { + "Translate": [ + 11.999998092651367, + 0.0, + 0.0 + ] + } + }, + "Component_[7650403257628455609]": { + "$type": "EditorLockComponent", + "Id": 7650403257628455609 + } + } + }, + "Entity_[250099739805]": { + "Id": "Entity_[250099739805]", + "Name": "Ball07", + "Components": { + "Component_[11750162722213114821]": { + "$type": "SelectionComponent", + "Id": 11750162722213114821 + }, + "Component_[12608893098077724053]": { + "$type": "EditorEntitySortComponent", + "Id": 12608893098077724053 + }, + "Component_[13797422028724928908]": { + "$type": "AZ::Render::EditorMeshComponent", + "Id": 13797422028724928908, + "Controller": { + "Configuration": { + "ModelAsset": { + "assetId": { + "guid": "{61D16161-9F39-5A29-B927-ADF58E7E573B}", + "subId": 284780167 + }, + "assetHint": "objects/sphere.azmodel" + }, + "LodOverride": 255 + } + } + }, + "Component_[1492865274047869171]": { + "$type": "EditorDisabledCompositionComponent", + "Id": 1492865274047869171 + }, + "Component_[15252998008739701164]": { + "$type": "EditorVisibilityComponent", + "Id": 15252998008739701164 + }, + "Component_[15365333384879292339]": { + "$type": "EditorInspectorComponent", + "Id": 15365333384879292339, + "ComponentOrderEntryArray": [ + { + "ComponentId": 5985506260224649992 + }, + { + "ComponentId": 13797422028724928908, + "SortIndex": 1 + }, + { + "ComponentId": 5200514760734239788, + "SortIndex": 2 + } + ] + }, + "Component_[18296307565715962470]": { + "$type": "EditorPendingCompositionComponent", + "Id": 18296307565715962470 + }, + "Component_[1940145586700385602]": { + "$type": "EditorOnlyEntityComponent", + "Id": 1940145586700385602 + }, + "Component_[4820397163316962417]": { + "$type": "EditorEntityIconComponent", + "Id": 4820397163316962417 + }, + "Component_[5200514760734239788]": { + "$type": "EditorMaterialComponent", + "Id": 5200514760734239788, + "Controller": { + "Configuration": { + "materials": { + "{}": { + "MaterialAsset": { + "assetId": { + "guid": "{4F9F91F7-7E22-5A14-856D-194CC258E70D}" + }, + "assetHint": "levels/graphics/pbrmaterialchart/materials/basic_m00_r07.azmaterial" + } + } + } + } + }, + "materialSlotsByLodEnabled": true + }, + "Component_[5985506260224649992]": { + "$type": "{27F1E1A1-8D9D-4C3B-BD3A-AFB9762449C0} TransformComponent", + "Id": 5985506260224649992, + "Parent Entity": "Entity_[267279608989]", + "Transform Data": { + "Translate": [ + 13.99999713897705, + 0.0, + 0.0 + ] + } + }, + "Component_[7650403257628455609]": { + "$type": "EditorLockComponent", + "Id": 7650403257628455609 + } + } + }, + "Entity_[254394707101]": { + "Id": "Entity_[254394707101]", + "Name": "Ball08", + "Components": { + "Component_[11750162722213114821]": { + "$type": "SelectionComponent", + "Id": 11750162722213114821 + }, + "Component_[12608893098077724053]": { + "$type": "EditorEntitySortComponent", + "Id": 12608893098077724053 + }, + "Component_[13797422028724928908]": { + "$type": "AZ::Render::EditorMeshComponent", + "Id": 13797422028724928908, + "Controller": { + "Configuration": { + "ModelAsset": { + "assetId": { + "guid": "{61D16161-9F39-5A29-B927-ADF58E7E573B}", + "subId": 284780167 + }, + "assetHint": "objects/sphere.azmodel" + }, + "LodOverride": 255 + } + } + }, + "Component_[1492865274047869171]": { + "$type": "EditorDisabledCompositionComponent", + "Id": 1492865274047869171 + }, + "Component_[15252998008739701164]": { + "$type": "EditorVisibilityComponent", + "Id": 15252998008739701164 + }, + "Component_[15365333384879292339]": { + "$type": "EditorInspectorComponent", + "Id": 15365333384879292339, + "ComponentOrderEntryArray": [ + { + "ComponentId": 5985506260224649992 + }, + { + "ComponentId": 13797422028724928908, + "SortIndex": 1 + }, + { + "ComponentId": 5200514760734239788, + "SortIndex": 2 + } + ] + }, + "Component_[18296307565715962470]": { + "$type": "EditorPendingCompositionComponent", + "Id": 18296307565715962470 + }, + "Component_[1940145586700385602]": { + "$type": "EditorOnlyEntityComponent", + "Id": 1940145586700385602 + }, + "Component_[4820397163316962417]": { + "$type": "EditorEntityIconComponent", + "Id": 4820397163316962417 + }, + "Component_[5200514760734239788]": { + "$type": "EditorMaterialComponent", + "Id": 5200514760734239788, + "Controller": { + "Configuration": { + "materials": { + "{}": { + "MaterialAsset": { + "assetId": { + "guid": "{842AE870-802B-5934-997F-0965F960ECB9}" + }, + "assetHint": "levels/graphics/pbrmaterialchart/materials/basic_m00_r08.azmaterial" + } + } + } + } + }, + "materialSlotsByLodEnabled": true + }, + "Component_[5985506260224649992]": { + "$type": "{27F1E1A1-8D9D-4C3B-BD3A-AFB9762449C0} TransformComponent", + "Id": 5985506260224649992, + "Parent Entity": "Entity_[267279608989]", + "Transform Data": { + "Translate": [ + 15.99999713897705, + 0.0, + 0.0 + ] + } + }, + "Component_[7650403257628455609]": { + "$type": "EditorLockComponent", + "Id": 7650403257628455609 + } + } + }, + "Entity_[258689674397]": { + "Id": "Entity_[258689674397]", + "Name": "Ball09", + "Components": { + "Component_[11750162722213114821]": { + "$type": "SelectionComponent", + "Id": 11750162722213114821 + }, + "Component_[12608893098077724053]": { + "$type": "EditorEntitySortComponent", + "Id": 12608893098077724053 + }, + "Component_[13797422028724928908]": { + "$type": "AZ::Render::EditorMeshComponent", + "Id": 13797422028724928908, + "Controller": { + "Configuration": { + "ModelAsset": { + "assetId": { + "guid": "{61D16161-9F39-5A29-B927-ADF58E7E573B}", + "subId": 284780167 + }, + "assetHint": "objects/sphere.azmodel" + }, + "LodOverride": 255 + } + } + }, + "Component_[1492865274047869171]": { + "$type": "EditorDisabledCompositionComponent", + "Id": 1492865274047869171 + }, + "Component_[15252998008739701164]": { + "$type": "EditorVisibilityComponent", + "Id": 15252998008739701164 + }, + "Component_[15365333384879292339]": { + "$type": "EditorInspectorComponent", + "Id": 15365333384879292339, + "ComponentOrderEntryArray": [ + { + "ComponentId": 5985506260224649992 + }, + { + "ComponentId": 13797422028724928908, + "SortIndex": 1 + }, + { + "ComponentId": 5200514760734239788, + "SortIndex": 2 + } + ] + }, + "Component_[18296307565715962470]": { + "$type": "EditorPendingCompositionComponent", + "Id": 18296307565715962470 + }, + "Component_[1940145586700385602]": { + "$type": "EditorOnlyEntityComponent", + "Id": 1940145586700385602 + }, + "Component_[4820397163316962417]": { + "$type": "EditorEntityIconComponent", + "Id": 4820397163316962417 + }, + "Component_[5200514760734239788]": { + "$type": "EditorMaterialComponent", + "Id": 5200514760734239788, + "Controller": { + "Configuration": { + "materials": { + "{}": { + "MaterialAsset": { + "assetId": { + "guid": "{0184CF10-E675-5C33-B1B9-009C383AB463}" + }, + "assetHint": "levels/graphics/pbrmaterialchart/materials/basic_m00_r09.azmaterial" + } + } + } + } + }, + "materialSlotsByLodEnabled": true + }, + "Component_[5985506260224649992]": { + "$type": "{27F1E1A1-8D9D-4C3B-BD3A-AFB9762449C0} TransformComponent", + "Id": 5985506260224649992, + "Parent Entity": "Entity_[267279608989]", + "Transform Data": { + "Translate": [ + 17.999996185302734, + 0.0, + 0.0 + ] + } + }, + "Component_[7650403257628455609]": { + "$type": "EditorLockComponent", + "Id": 7650403257628455609 + } + } + }, + "Entity_[262984641693]": { + "Id": "Entity_[262984641693]", + "Name": "Ball10", + "Components": { + "Component_[11750162722213114821]": { + "$type": "SelectionComponent", + "Id": 11750162722213114821 + }, + "Component_[12608893098077724053]": { + "$type": "EditorEntitySortComponent", + "Id": 12608893098077724053 + }, + "Component_[13797422028724928908]": { + "$type": "AZ::Render::EditorMeshComponent", + "Id": 13797422028724928908, + "Controller": { + "Configuration": { + "ModelAsset": { + "assetId": { + "guid": "{61D16161-9F39-5A29-B927-ADF58E7E573B}", + "subId": 284780167 + }, + "assetHint": "objects/sphere.azmodel" + }, + "LodOverride": 255 + } + } + }, + "Component_[1492865274047869171]": { + "$type": "EditorDisabledCompositionComponent", + "Id": 1492865274047869171 + }, + "Component_[15252998008739701164]": { + "$type": "EditorVisibilityComponent", + "Id": 15252998008739701164 + }, + "Component_[15365333384879292339]": { + "$type": "EditorInspectorComponent", + "Id": 15365333384879292339, + "ComponentOrderEntryArray": [ + { + "ComponentId": 5985506260224649992 + }, + { + "ComponentId": 13797422028724928908, + "SortIndex": 1 + }, + { + "ComponentId": 5200514760734239788, + "SortIndex": 2 + } + ] + }, + "Component_[18296307565715962470]": { + "$type": "EditorPendingCompositionComponent", + "Id": 18296307565715962470 + }, + "Component_[1940145586700385602]": { + "$type": "EditorOnlyEntityComponent", + "Id": 1940145586700385602 + }, + "Component_[4820397163316962417]": { + "$type": "EditorEntityIconComponent", + "Id": 4820397163316962417 + }, + "Component_[5200514760734239788]": { + "$type": "EditorMaterialComponent", + "Id": 5200514760734239788, + "Controller": { + "Configuration": { + "materials": { + "{}": { + "MaterialAsset": { + "assetId": { + "guid": "{6DDA0761-C165-58CC-B45E-03C29F0CF598}" + }, + "assetHint": "levels/graphics/pbrmaterialchart/materials/basic_m00_r10.azmaterial" + } + } + } + } + }, + "materialSlotsByLodEnabled": true + }, + "Component_[5985506260224649992]": { + "$type": "{27F1E1A1-8D9D-4C3B-BD3A-AFB9762449C0} TransformComponent", + "Id": 5985506260224649992, + "Parent Entity": "Entity_[267279608989]", + "Transform Data": { + "Translate": [ + 19.999996185302734, + 0.0, + 0.0 + ] + } + }, + "Component_[7650403257628455609]": { + "$type": "EditorLockComponent", + "Id": 7650403257628455609 + } + } + }, + "Entity_[267279608989]": { + "Id": "Entity_[267279608989]", + "Name": "Row", + "Components": { + "Component_[10431128421533587390]": { + "$type": "EditorDisabledCompositionComponent", + "Id": 10431128421533587390 + }, + "Component_[12384319735386528488]": { + "$type": "EditorInspectorComponent", + "Id": 12384319735386528488, + "ComponentOrderEntryArray": [ + { + "ComponentId": 2138630967603263484 + } + ] + }, + "Component_[12698663999690413529]": { + "$type": "EditorVisibilityComponent", + "Id": 12698663999690413529 + }, + "Component_[13267882596040987058]": { + "$type": "EditorOnlyEntityComponent", + "Id": 13267882596040987058 + }, + "Component_[15031093406648363268]": { + "$type": "EditorLockComponent", + "Id": 15031093406648363268 + }, + "Component_[15177069797419761403]": { + "$type": "EditorEntitySortComponent", + "Id": 15177069797419761403, + "Child Entity Order": [ + "Entity_[220034968733]", + "Entity_[224329936029]", + "Entity_[228624903325]", + "Entity_[232919870621]", + "Entity_[237214837917]", + "Entity_[241509805213]", + "Entity_[245804772509]", + "Entity_[250099739805]", + "Entity_[254394707101]", + "Entity_[258689674397]", + "Entity_[262984641693]" + ] + }, + "Component_[17955329409582714617]": { + "$type": "SelectionComponent", + "Id": 17955329409582714617 + }, + "Component_[2138630967603263484]": { + "$type": "{27F1E1A1-8D9D-4C3B-BD3A-AFB9762449C0} TransformComponent", + "Id": 2138630967603263484, + "Parent Entity": "Entity_[311518247264]", + "Transform Data": { + "Translate": [ + -0.02220340073108673, + -9.986543655395508, + -1.0031051635742188 + ], + "Rotate": [ + 0.0, + 0.0, + 90.00000762939453 + ] + } + }, + "Component_[3786501212457578744]": { + "$type": "EditorEntityIconComponent", + "Id": 3786501212457578744 + }, + "Component_[6440613696530771175]": { + "$type": "EditorPendingCompositionComponent", + "Id": 6440613696530771175 + } + } + }, + "Entity_[271574576285]": { + "Id": "Entity_[271574576285]", + "Name": "Row", + "Components": { + "Component_[10431128421533587390]": { + "$type": "EditorDisabledCompositionComponent", + "Id": 10431128421533587390 + }, + "Component_[12384319735386528488]": { + "$type": "EditorInspectorComponent", + "Id": 12384319735386528488, + "ComponentOrderEntryArray": [ + { + "ComponentId": 2138630967603263484 + } + ] + }, + "Component_[12698663999690413529]": { + "$type": "EditorVisibilityComponent", + "Id": 12698663999690413529 + }, + "Component_[13267882596040987058]": { + "$type": "EditorOnlyEntityComponent", + "Id": 13267882596040987058 + }, + "Component_[15031093406648363268]": { + "$type": "EditorLockComponent", + "Id": 15031093406648363268 + }, + "Component_[15177069797419761403]": { + "$type": "EditorEntitySortComponent", + "Id": 15177069797419761403, + "Child Entity Order": [ + "Entity_[293049412765]", + "Entity_[301639347357]", + "Entity_[310229281949]", + "Entity_[318819216541]", + "Entity_[275869543581]", + "Entity_[280164510877]", + "Entity_[284459478173]", + "Entity_[288754445469]", + "Entity_[297344380061]", + "Entity_[305934314653]", + "Entity_[314524249245]" + ] + }, + "Component_[17955329409582714617]": { + "$type": "SelectionComponent", + "Id": 17955329409582714617 + }, + "Component_[2138630967603263484]": { + "$type": "{27F1E1A1-8D9D-4C3B-BD3A-AFB9762449C0} TransformComponent", + "Id": 2138630967603263484, + "Parent Entity": "Entity_[311518247264]", + "Transform Data": { + "Translate": [ + -0.02220340073108673, + -9.986543655395508, + 0.9968947768211365 + ], + "Rotate": [ + 0.0, + 0.0, + 90.00000762939453 + ] + } + }, + "Component_[3786501212457578744]": { + "$type": "EditorEntityIconComponent", + "Id": 3786501212457578744 + }, + "Component_[6440613696530771175]": { + "$type": "EditorPendingCompositionComponent", + "Id": 6440613696530771175 + } + } + }, + "Entity_[275869543581]": { + "Id": "Entity_[275869543581]", + "Name": "Ball04", + "Components": { + "Component_[11750162722213114821]": { + "$type": "SelectionComponent", + "Id": 11750162722213114821 + }, + "Component_[12608893098077724053]": { + "$type": "EditorEntitySortComponent", + "Id": 12608893098077724053 + }, + "Component_[13797422028724928908]": { + "$type": "AZ::Render::EditorMeshComponent", + "Id": 13797422028724928908, + "Controller": { + "Configuration": { + "ModelAsset": { + "assetId": { + "guid": "{61D16161-9F39-5A29-B927-ADF58E7E573B}", + "subId": 284780167 + }, + "assetHint": "objects/sphere.azmodel" + }, + "LodOverride": 255 + } + } + }, + "Component_[1492865274047869171]": { + "$type": "EditorDisabledCompositionComponent", + "Id": 1492865274047869171 + }, + "Component_[15252998008739701164]": { + "$type": "EditorVisibilityComponent", + "Id": 15252998008739701164 + }, + "Component_[15365333384879292339]": { + "$type": "EditorInspectorComponent", + "Id": 15365333384879292339, + "ComponentOrderEntryArray": [ + { + "ComponentId": 5985506260224649992 + }, + { + "ComponentId": 13797422028724928908, + "SortIndex": 1 + }, + { + "ComponentId": 5200514760734239788, + "SortIndex": 2 + } + ] + }, + "Component_[18296307565715962470]": { + "$type": "EditorPendingCompositionComponent", + "Id": 18296307565715962470 + }, + "Component_[1940145586700385602]": { + "$type": "EditorOnlyEntityComponent", + "Id": 1940145586700385602 + }, + "Component_[4820397163316962417]": { + "$type": "EditorEntityIconComponent", + "Id": 4820397163316962417 + }, + "Component_[5200514760734239788]": { + "$type": "EditorMaterialComponent", + "Id": 5200514760734239788, + "Controller": { + "Configuration": { + "materials": { + "{}": { + "MaterialAsset": { + "assetId": { + "guid": "{101AB53A-3B3E-5ACF-841C-65DB2BFBF305}" + }, + "assetHint": "levels/graphics/pbrmaterialchart/materials/basic_m10_r04.azmaterial" + } + } + } + } + }, + "materialSlotsByLodEnabled": true + }, + "Component_[5985506260224649992]": { + "$type": "{27F1E1A1-8D9D-4C3B-BD3A-AFB9762449C0} TransformComponent", + "Id": 5985506260224649992, + "Parent Entity": "Entity_[271574576285]", + "Transform Data": { + "Translate": [ + 7.999998092651367, + 0.0, + 0.0 + ] + } + }, + "Component_[7650403257628455609]": { + "$type": "EditorLockComponent", + "Id": 7650403257628455609 + } + } + }, + "Entity_[280164510877]": { + "Id": "Entity_[280164510877]", + "Name": "Ball05", + "Components": { + "Component_[11750162722213114821]": { + "$type": "SelectionComponent", + "Id": 11750162722213114821 + }, + "Component_[12608893098077724053]": { + "$type": "EditorEntitySortComponent", + "Id": 12608893098077724053 + }, + "Component_[13797422028724928908]": { + "$type": "AZ::Render::EditorMeshComponent", + "Id": 13797422028724928908, + "Controller": { + "Configuration": { + "ModelAsset": { + "assetId": { + "guid": "{61D16161-9F39-5A29-B927-ADF58E7E573B}", + "subId": 284780167 + }, + "assetHint": "objects/sphere.azmodel" + }, + "LodOverride": 255 + } + } + }, + "Component_[1492865274047869171]": { + "$type": "EditorDisabledCompositionComponent", + "Id": 1492865274047869171 + }, + "Component_[15252998008739701164]": { + "$type": "EditorVisibilityComponent", + "Id": 15252998008739701164 + }, + "Component_[15365333384879292339]": { + "$type": "EditorInspectorComponent", + "Id": 15365333384879292339, + "ComponentOrderEntryArray": [ + { + "ComponentId": 5985506260224649992 + }, + { + "ComponentId": 13797422028724928908, + "SortIndex": 1 + }, + { + "ComponentId": 5200514760734239788, + "SortIndex": 2 + } + ] + }, + "Component_[18296307565715962470]": { + "$type": "EditorPendingCompositionComponent", + "Id": 18296307565715962470 + }, + "Component_[1940145586700385602]": { + "$type": "EditorOnlyEntityComponent", + "Id": 1940145586700385602 + }, + "Component_[4820397163316962417]": { + "$type": "EditorEntityIconComponent", + "Id": 4820397163316962417 + }, + "Component_[5200514760734239788]": { + "$type": "EditorMaterialComponent", + "Id": 5200514760734239788, + "Controller": { + "Configuration": { + "materials": { + "{}": { + "MaterialAsset": { + "assetId": { + "guid": "{B82B96D6-7511-5E22-A36E-FFF682B3236B}" + }, + "assetHint": "levels/graphics/pbrmaterialchart/materials/basic_m10_r05.azmaterial" + } + } + } + } + }, + "materialSlotsByLodEnabled": true + }, + "Component_[5985506260224649992]": { + "$type": "{27F1E1A1-8D9D-4C3B-BD3A-AFB9762449C0} TransformComponent", + "Id": 5985506260224649992, + "Parent Entity": "Entity_[271574576285]", + "Transform Data": { + "Translate": [ + 9.999998092651367, + 0.0, + 0.0 + ] + } + }, + "Component_[7650403257628455609]": { + "$type": "EditorLockComponent", + "Id": 7650403257628455609 + } + } + }, + "Entity_[284459478173]": { + "Id": "Entity_[284459478173]", + "Name": "Ball06", + "Components": { + "Component_[11750162722213114821]": { + "$type": "SelectionComponent", + "Id": 11750162722213114821 + }, + "Component_[12608893098077724053]": { + "$type": "EditorEntitySortComponent", + "Id": 12608893098077724053 + }, + "Component_[13797422028724928908]": { + "$type": "AZ::Render::EditorMeshComponent", + "Id": 13797422028724928908, + "Controller": { + "Configuration": { + "ModelAsset": { + "assetId": { + "guid": "{61D16161-9F39-5A29-B927-ADF58E7E573B}", + "subId": 284780167 + }, + "assetHint": "objects/sphere.azmodel" + }, + "LodOverride": 255 + } + } + }, + "Component_[1492865274047869171]": { + "$type": "EditorDisabledCompositionComponent", + "Id": 1492865274047869171 + }, + "Component_[15252998008739701164]": { + "$type": "EditorVisibilityComponent", + "Id": 15252998008739701164 + }, + "Component_[15365333384879292339]": { + "$type": "EditorInspectorComponent", + "Id": 15365333384879292339, + "ComponentOrderEntryArray": [ + { + "ComponentId": 5985506260224649992 + }, + { + "ComponentId": 13797422028724928908, + "SortIndex": 1 + }, + { + "ComponentId": 5200514760734239788, + "SortIndex": 2 + } + ] + }, + "Component_[18296307565715962470]": { + "$type": "EditorPendingCompositionComponent", + "Id": 18296307565715962470 + }, + "Component_[1940145586700385602]": { + "$type": "EditorOnlyEntityComponent", + "Id": 1940145586700385602 + }, + "Component_[4820397163316962417]": { + "$type": "EditorEntityIconComponent", + "Id": 4820397163316962417 + }, + "Component_[5200514760734239788]": { + "$type": "EditorMaterialComponent", + "Id": 5200514760734239788, + "Controller": { + "Configuration": { + "materials": { + "{}": { + "MaterialAsset": { + "assetId": { + "guid": "{DBED5292-3E17-5038-9974-80A8BB1F79E8}" + }, + "assetHint": "levels/graphics/pbrmaterialchart/materials/basic_m10_r06.azmaterial" + } + } + } + } + }, + "materialSlotsByLodEnabled": true + }, + "Component_[5985506260224649992]": { + "$type": "{27F1E1A1-8D9D-4C3B-BD3A-AFB9762449C0} TransformComponent", + "Id": 5985506260224649992, + "Parent Entity": "Entity_[271574576285]", + "Transform Data": { + "Translate": [ + 11.999998092651367, + 0.0, + 0.0 + ] + } + }, + "Component_[7650403257628455609]": { + "$type": "EditorLockComponent", + "Id": 7650403257628455609 + } + } + }, + "Entity_[288754445469]": { + "Id": "Entity_[288754445469]", + "Name": "Ball07", + "Components": { + "Component_[11750162722213114821]": { + "$type": "SelectionComponent", + "Id": 11750162722213114821 + }, + "Component_[12608893098077724053]": { + "$type": "EditorEntitySortComponent", + "Id": 12608893098077724053 + }, + "Component_[13797422028724928908]": { + "$type": "AZ::Render::EditorMeshComponent", + "Id": 13797422028724928908, + "Controller": { + "Configuration": { + "ModelAsset": { + "assetId": { + "guid": "{61D16161-9F39-5A29-B927-ADF58E7E573B}", + "subId": 284780167 + }, + "assetHint": "objects/sphere.azmodel" + }, + "LodOverride": 255 + } + } + }, + "Component_[1492865274047869171]": { + "$type": "EditorDisabledCompositionComponent", + "Id": 1492865274047869171 + }, + "Component_[15252998008739701164]": { + "$type": "EditorVisibilityComponent", + "Id": 15252998008739701164 + }, + "Component_[15365333384879292339]": { + "$type": "EditorInspectorComponent", + "Id": 15365333384879292339, + "ComponentOrderEntryArray": [ + { + "ComponentId": 5985506260224649992 + }, + { + "ComponentId": 13797422028724928908, + "SortIndex": 1 + }, + { + "ComponentId": 5200514760734239788, + "SortIndex": 2 + } + ] + }, + "Component_[18296307565715962470]": { + "$type": "EditorPendingCompositionComponent", + "Id": 18296307565715962470 + }, + "Component_[1940145586700385602]": { + "$type": "EditorOnlyEntityComponent", + "Id": 1940145586700385602 + }, + "Component_[4820397163316962417]": { + "$type": "EditorEntityIconComponent", + "Id": 4820397163316962417 + }, + "Component_[5200514760734239788]": { + "$type": "EditorMaterialComponent", + "Id": 5200514760734239788, + "Controller": { + "Configuration": { + "materials": { + "{}": { + "MaterialAsset": { + "assetId": { + "guid": "{25F07733-365C-5826-AEE3-E92FBE807555}" + }, + "assetHint": "levels/graphics/pbrmaterialchart/materials/basic_m10_r07.azmaterial" + } + } + } + } + }, + "materialSlotsByLodEnabled": true + }, + "Component_[5985506260224649992]": { + "$type": "{27F1E1A1-8D9D-4C3B-BD3A-AFB9762449C0} TransformComponent", + "Id": 5985506260224649992, + "Parent Entity": "Entity_[271574576285]", + "Transform Data": { + "Translate": [ + 13.99999713897705, + 0.0, + 0.0 + ] + } + }, + "Component_[7650403257628455609]": { + "$type": "EditorLockComponent", + "Id": 7650403257628455609 + } + } + }, + "Entity_[293049412765]": { + "Id": "Entity_[293049412765]", + "Name": "Ball00", + "Components": { + "Component_[11750162722213114821]": { + "$type": "SelectionComponent", + "Id": 11750162722213114821 + }, + "Component_[12608893098077724053]": { + "$type": "EditorEntitySortComponent", + "Id": 12608893098077724053 + }, + "Component_[13797422028724928908]": { + "$type": "AZ::Render::EditorMeshComponent", + "Id": 13797422028724928908, + "Controller": { + "Configuration": { + "ModelAsset": { + "assetId": { + "guid": "{61D16161-9F39-5A29-B927-ADF58E7E573B}", + "subId": 284780167 + }, + "assetHint": "objects/sphere.azmodel" + }, + "LodOverride": 255 + } + } + }, + "Component_[1492865274047869171]": { + "$type": "EditorDisabledCompositionComponent", + "Id": 1492865274047869171 + }, + "Component_[15252998008739701164]": { + "$type": "EditorVisibilityComponent", + "Id": 15252998008739701164 + }, + "Component_[15365333384879292339]": { + "$type": "EditorInspectorComponent", + "Id": 15365333384879292339, + "ComponentOrderEntryArray": [ + { + "ComponentId": 5985506260224649992 + }, + { + "ComponentId": 13797422028724928908, + "SortIndex": 1 + }, + { + "ComponentId": 5200514760734239788, + "SortIndex": 2 + } + ] + }, + "Component_[18296307565715962470]": { + "$type": "EditorPendingCompositionComponent", + "Id": 18296307565715962470 + }, + "Component_[1940145586700385602]": { + "$type": "EditorOnlyEntityComponent", + "Id": 1940145586700385602 + }, + "Component_[4820397163316962417]": { + "$type": "EditorEntityIconComponent", + "Id": 4820397163316962417 + }, + "Component_[5200514760734239788]": { + "$type": "EditorMaterialComponent", + "Id": 5200514760734239788, + "Controller": { + "Configuration": { + "materials": { + "{}": { + "MaterialAsset": { + "assetId": { + "guid": "{C9A7B916-CF71-5A34-B9B9-54FE8CB058DC}" + }, + "assetHint": "levels/graphics/pbrmaterialchart/materials/basic_m10_r00.azmaterial" + } + } + } + } + }, + "materialSlotsByLodEnabled": true + }, + "Component_[5985506260224649992]": { + "$type": "{27F1E1A1-8D9D-4C3B-BD3A-AFB9762449C0} TransformComponent", + "Id": 5985506260224649992, + "Parent Entity": "Entity_[271574576285]" + }, + "Component_[7650403257628455609]": { + "$type": "EditorLockComponent", + "Id": 7650403257628455609 + } + } + }, + "Entity_[297344380061]": { + "Id": "Entity_[297344380061]", + "Name": "Ball08", + "Components": { + "Component_[11750162722213114821]": { + "$type": "SelectionComponent", + "Id": 11750162722213114821 + }, + "Component_[12608893098077724053]": { + "$type": "EditorEntitySortComponent", + "Id": 12608893098077724053 + }, + "Component_[13797422028724928908]": { + "$type": "AZ::Render::EditorMeshComponent", + "Id": 13797422028724928908, + "Controller": { + "Configuration": { + "ModelAsset": { + "assetId": { + "guid": "{61D16161-9F39-5A29-B927-ADF58E7E573B}", + "subId": 284780167 + }, + "assetHint": "objects/sphere.azmodel" + }, + "LodOverride": 255 + } + } + }, + "Component_[1492865274047869171]": { + "$type": "EditorDisabledCompositionComponent", + "Id": 1492865274047869171 + }, + "Component_[15252998008739701164]": { + "$type": "EditorVisibilityComponent", + "Id": 15252998008739701164 + }, + "Component_[15365333384879292339]": { + "$type": "EditorInspectorComponent", + "Id": 15365333384879292339, + "ComponentOrderEntryArray": [ + { + "ComponentId": 5985506260224649992 + }, + { + "ComponentId": 13797422028724928908, + "SortIndex": 1 + }, + { + "ComponentId": 5200514760734239788, + "SortIndex": 2 + } + ] + }, + "Component_[18296307565715962470]": { + "$type": "EditorPendingCompositionComponent", + "Id": 18296307565715962470 + }, + "Component_[1940145586700385602]": { + "$type": "EditorOnlyEntityComponent", + "Id": 1940145586700385602 + }, + "Component_[4820397163316962417]": { + "$type": "EditorEntityIconComponent", + "Id": 4820397163316962417 + }, + "Component_[5200514760734239788]": { + "$type": "EditorMaterialComponent", + "Id": 5200514760734239788, + "Controller": { + "Configuration": { + "materials": { + "{}": { + "MaterialAsset": { + "assetId": { + "guid": "{85C8DFC5-358D-579D-B922-14FA1B401571}" + }, + "assetHint": "levels/graphics/pbrmaterialchart/materials/basic_m10_r08.azmaterial" + } + } + } + } + }, + "materialSlotsByLodEnabled": true + }, + "Component_[5985506260224649992]": { + "$type": "{27F1E1A1-8D9D-4C3B-BD3A-AFB9762449C0} TransformComponent", + "Id": 5985506260224649992, + "Parent Entity": "Entity_[271574576285]", + "Transform Data": { + "Translate": [ + 15.99999713897705, + 0.0, + 0.0 + ] + } + }, + "Component_[7650403257628455609]": { + "$type": "EditorLockComponent", + "Id": 7650403257628455609 + } + } + }, + "Entity_[301639347357]": { + "Id": "Entity_[301639347357]", + "Name": "Ball01", + "Components": { + "Component_[11750162722213114821]": { + "$type": "SelectionComponent", + "Id": 11750162722213114821 + }, + "Component_[12608893098077724053]": { + "$type": "EditorEntitySortComponent", + "Id": 12608893098077724053 + }, + "Component_[13797422028724928908]": { + "$type": "AZ::Render::EditorMeshComponent", + "Id": 13797422028724928908, + "Controller": { + "Configuration": { + "ModelAsset": { + "assetId": { + "guid": "{61D16161-9F39-5A29-B927-ADF58E7E573B}", + "subId": 284780167 + }, + "assetHint": "objects/sphere.azmodel" + }, + "LodOverride": 255 + } + } + }, + "Component_[1492865274047869171]": { + "$type": "EditorDisabledCompositionComponent", + "Id": 1492865274047869171 + }, + "Component_[15252998008739701164]": { + "$type": "EditorVisibilityComponent", + "Id": 15252998008739701164 + }, + "Component_[15365333384879292339]": { + "$type": "EditorInspectorComponent", + "Id": 15365333384879292339, + "ComponentOrderEntryArray": [ + { + "ComponentId": 5985506260224649992 + }, + { + "ComponentId": 13797422028724928908, + "SortIndex": 1 + }, + { + "ComponentId": 5200514760734239788, + "SortIndex": 2 + } + ] + }, + "Component_[18296307565715962470]": { + "$type": "EditorPendingCompositionComponent", + "Id": 18296307565715962470 + }, + "Component_[1940145586700385602]": { + "$type": "EditorOnlyEntityComponent", + "Id": 1940145586700385602 + }, + "Component_[4820397163316962417]": { + "$type": "EditorEntityIconComponent", + "Id": 4820397163316962417 + }, + "Component_[5200514760734239788]": { + "$type": "EditorMaterialComponent", + "Id": 5200514760734239788, + "Controller": { + "Configuration": { + "materials": { + "{}": { + "MaterialAsset": { + "assetId": { + "guid": "{51924281-7A06-5654-B783-A4F5759063ED}" + }, + "assetHint": "levels/graphics/pbrmaterialchart/materials/basic_m10_r01.azmaterial" + } + } + } + } + }, + "materialSlotsByLodEnabled": true + }, + "Component_[5985506260224649992]": { + "$type": "{27F1E1A1-8D9D-4C3B-BD3A-AFB9762449C0} TransformComponent", + "Id": 5985506260224649992, + "Parent Entity": "Entity_[271574576285]", + "Transform Data": { + "Translate": [ + 1.9999995231628418, + 0.0, + 0.0 + ] + } + }, + "Component_[7650403257628455609]": { + "$type": "EditorLockComponent", + "Id": 7650403257628455609 + } + } + }, + "Entity_[305934314653]": { + "Id": "Entity_[305934314653]", + "Name": "Ball09", + "Components": { + "Component_[11750162722213114821]": { + "$type": "SelectionComponent", + "Id": 11750162722213114821 + }, + "Component_[12608893098077724053]": { + "$type": "EditorEntitySortComponent", + "Id": 12608893098077724053 + }, + "Component_[13797422028724928908]": { + "$type": "AZ::Render::EditorMeshComponent", + "Id": 13797422028724928908, + "Controller": { + "Configuration": { + "ModelAsset": { + "assetId": { + "guid": "{61D16161-9F39-5A29-B927-ADF58E7E573B}", + "subId": 284780167 + }, + "assetHint": "objects/sphere.azmodel" + }, + "LodOverride": 255 + } + } + }, + "Component_[1492865274047869171]": { + "$type": "EditorDisabledCompositionComponent", + "Id": 1492865274047869171 + }, + "Component_[15252998008739701164]": { + "$type": "EditorVisibilityComponent", + "Id": 15252998008739701164 + }, + "Component_[15365333384879292339]": { + "$type": "EditorInspectorComponent", + "Id": 15365333384879292339, + "ComponentOrderEntryArray": [ + { + "ComponentId": 5985506260224649992 + }, + { + "ComponentId": 13797422028724928908, + "SortIndex": 1 + }, + { + "ComponentId": 5200514760734239788, + "SortIndex": 2 + } + ] + }, + "Component_[18296307565715962470]": { + "$type": "EditorPendingCompositionComponent", + "Id": 18296307565715962470 + }, + "Component_[1940145586700385602]": { + "$type": "EditorOnlyEntityComponent", + "Id": 1940145586700385602 + }, + "Component_[4820397163316962417]": { + "$type": "EditorEntityIconComponent", + "Id": 4820397163316962417 + }, + "Component_[5200514760734239788]": { + "$type": "EditorMaterialComponent", + "Id": 5200514760734239788, + "Controller": { + "Configuration": { + "materials": { + "{}": { + "MaterialAsset": { + "assetId": { + "guid": "{7877F64E-26E3-558C-B6D9-B609ED6E43BF}" + }, + "assetHint": "levels/graphics/pbrmaterialchart/materials/basic_m10_r09.azmaterial" + } + } + } + } + }, + "materialSlotsByLodEnabled": true + }, + "Component_[5985506260224649992]": { + "$type": "{27F1E1A1-8D9D-4C3B-BD3A-AFB9762449C0} TransformComponent", + "Id": 5985506260224649992, + "Parent Entity": "Entity_[271574576285]", + "Transform Data": { + "Translate": [ + 17.999996185302734, + 0.0, + 0.0 + ] + } + }, + "Component_[7650403257628455609]": { + "$type": "EditorLockComponent", + "Id": 7650403257628455609 + } + } + }, + "Entity_[310229281949]": { + "Id": "Entity_[310229281949]", + "Name": "Ball02", + "Components": { + "Component_[11750162722213114821]": { + "$type": "SelectionComponent", + "Id": 11750162722213114821 + }, + "Component_[12608893098077724053]": { + "$type": "EditorEntitySortComponent", + "Id": 12608893098077724053 + }, + "Component_[13797422028724928908]": { + "$type": "AZ::Render::EditorMeshComponent", + "Id": 13797422028724928908, + "Controller": { + "Configuration": { + "ModelAsset": { + "assetId": { + "guid": "{61D16161-9F39-5A29-B927-ADF58E7E573B}", + "subId": 284780167 + }, + "assetHint": "objects/sphere.azmodel" + }, + "LodOverride": 255 + } + } + }, + "Component_[1492865274047869171]": { + "$type": "EditorDisabledCompositionComponent", + "Id": 1492865274047869171 + }, + "Component_[15252998008739701164]": { + "$type": "EditorVisibilityComponent", + "Id": 15252998008739701164 + }, + "Component_[15365333384879292339]": { + "$type": "EditorInspectorComponent", + "Id": 15365333384879292339, + "ComponentOrderEntryArray": [ + { + "ComponentId": 5985506260224649992 + }, + { + "ComponentId": 13797422028724928908, + "SortIndex": 1 + }, + { + "ComponentId": 5200514760734239788, + "SortIndex": 2 + } + ] + }, + "Component_[18296307565715962470]": { + "$type": "EditorPendingCompositionComponent", + "Id": 18296307565715962470 + }, + "Component_[1940145586700385602]": { + "$type": "EditorOnlyEntityComponent", + "Id": 1940145586700385602 + }, + "Component_[4820397163316962417]": { + "$type": "EditorEntityIconComponent", + "Id": 4820397163316962417 + }, + "Component_[5200514760734239788]": { + "$type": "EditorMaterialComponent", + "Id": 5200514760734239788, + "Controller": { + "Configuration": { + "materials": { + "{}": { + "MaterialAsset": { + "assetId": { + "guid": "{6CC3C6B9-EE05-5A77-A12D-7085D93D89DB}" + }, + "assetHint": "levels/graphics/pbrmaterialchart/materials/basic_m10_r02.azmaterial" + } + } + } + } + }, + "materialSlotsByLodEnabled": true + }, + "Component_[5985506260224649992]": { + "$type": "{27F1E1A1-8D9D-4C3B-BD3A-AFB9762449C0} TransformComponent", + "Id": 5985506260224649992, + "Parent Entity": "Entity_[271574576285]", + "Transform Data": { + "Translate": [ + 3.9999992847442627, + 0.0, + 0.0 + ] + } + }, + "Component_[7650403257628455609]": { + "$type": "EditorLockComponent", + "Id": 7650403257628455609 + } + } + }, + "Entity_[311518247264]": { + "Id": "Entity_[311518247264]", + "Name": "PbrMaterialChart_Assets", + "Components": { + "Component_[10482364804718329021]": { + "$type": "EditorPendingCompositionComponent", + "Id": 10482364804718329021 + }, + "Component_[10942888141582930027]": { + "$type": "EditorLockComponent", + "Id": 10942888141582930027 + }, + "Component_[13540203629041536166]": { + "$type": "{27F1E1A1-8D9D-4C3B-BD3A-AFB9762449C0} TransformComponent", + "Id": 13540203629041536166, + "Parent Entity": "ContainerEntity", + "Transform Data": { + "Rotate": [ + 0.0, + 0.0, + -90.0 + ] + } + }, + "Component_[13907911826554124970]": { + "$type": "EditorEntityIconComponent", + "Id": 13907911826554124970 + }, + "Component_[14302898759905097452]": { + "$type": "EditorEntitySortComponent", + "Id": 14302898759905097452, + "Child Entity Order": [ + "Entity_[224935554679]", + "Entity_[323114183837]", + "Entity_[267279608989]", + "Entity_[271574576285]", + "Entity_[227116497304]", + "Entity_[1579029125278]" + ] + }, + "Component_[6734926751345496430]": { + "$type": "EditorOnlyEntityComponent", + "Id": 6734926751345496430 + }, + "Component_[7859927512474268451]": { + "$type": "EditorInspectorComponent", + "Id": 7859927512474268451, + "ComponentOrderEntryArray": [ + { + "ComponentId": 13540203629041536166 + } + ] + }, + "Component_[8550690899908144218]": { + "$type": "SelectionComponent", + "Id": 8550690899908144218 + }, + "Component_[9251711315131563801]": { + "$type": "EditorVisibilityComponent", + "Id": 9251711315131563801 + }, + "Component_[9755014032434689168]": { + "$type": "EditorDisabledCompositionComponent", + "Id": 9755014032434689168 + } + } + }, + "Entity_[314524249245]": { + "Id": "Entity_[314524249245]", + "Name": "Ball10", + "Components": { + "Component_[11750162722213114821]": { + "$type": "SelectionComponent", + "Id": 11750162722213114821 + }, + "Component_[12608893098077724053]": { + "$type": "EditorEntitySortComponent", + "Id": 12608893098077724053 + }, + "Component_[13797422028724928908]": { + "$type": "AZ::Render::EditorMeshComponent", + "Id": 13797422028724928908, + "Controller": { + "Configuration": { + "ModelAsset": { + "assetId": { + "guid": "{61D16161-9F39-5A29-B927-ADF58E7E573B}", + "subId": 284780167 + }, + "assetHint": "objects/sphere.azmodel" + }, + "LodOverride": 255 + } + } + }, + "Component_[1492865274047869171]": { + "$type": "EditorDisabledCompositionComponent", + "Id": 1492865274047869171 + }, + "Component_[15252998008739701164]": { + "$type": "EditorVisibilityComponent", + "Id": 15252998008739701164 + }, + "Component_[15365333384879292339]": { + "$type": "EditorInspectorComponent", + "Id": 15365333384879292339, + "ComponentOrderEntryArray": [ + { + "ComponentId": 5985506260224649992 + }, + { + "ComponentId": 13797422028724928908, + "SortIndex": 1 + }, + { + "ComponentId": 5200514760734239788, + "SortIndex": 2 + } + ] + }, + "Component_[18296307565715962470]": { + "$type": "EditorPendingCompositionComponent", + "Id": 18296307565715962470 + }, + "Component_[1940145586700385602]": { + "$type": "EditorOnlyEntityComponent", + "Id": 1940145586700385602 + }, + "Component_[4820397163316962417]": { + "$type": "EditorEntityIconComponent", + "Id": 4820397163316962417 + }, + "Component_[5200514760734239788]": { + "$type": "EditorMaterialComponent", + "Id": 5200514760734239788, + "Controller": { + "Configuration": { + "materials": { + "{}": { + "MaterialAsset": { + "assetId": { + "guid": "{E6E15876-EEF3-555D-BD80-1B9D5A7ECC7D}" + }, + "assetHint": "levels/graphics/pbrmaterialchart/materials/basic_m10_r10.azmaterial" + } + } + } + } + }, + "materialSlotsByLodEnabled": true + }, + "Component_[5985506260224649992]": { + "$type": "{27F1E1A1-8D9D-4C3B-BD3A-AFB9762449C0} TransformComponent", + "Id": 5985506260224649992, + "Parent Entity": "Entity_[271574576285]", + "Transform Data": { + "Translate": [ + 19.999996185302734, + 0.0, + 0.0 + ] + } + }, + "Component_[7650403257628455609]": { + "$type": "EditorLockComponent", + "Id": 7650403257628455609 + } + } + }, + "Entity_[318819216541]": { + "Id": "Entity_[318819216541]", + "Name": "Ball03", + "Components": { + "Component_[11750162722213114821]": { + "$type": "SelectionComponent", + "Id": 11750162722213114821 + }, + "Component_[12608893098077724053]": { + "$type": "EditorEntitySortComponent", + "Id": 12608893098077724053 + }, + "Component_[13797422028724928908]": { + "$type": "AZ::Render::EditorMeshComponent", + "Id": 13797422028724928908, + "Controller": { + "Configuration": { + "ModelAsset": { + "assetId": { + "guid": "{61D16161-9F39-5A29-B927-ADF58E7E573B}", + "subId": 284780167 + }, + "assetHint": "objects/sphere.azmodel" + }, + "LodOverride": 255 + } + } + }, + "Component_[1492865274047869171]": { + "$type": "EditorDisabledCompositionComponent", + "Id": 1492865274047869171 + }, + "Component_[15252998008739701164]": { + "$type": "EditorVisibilityComponent", + "Id": 15252998008739701164 + }, + "Component_[15365333384879292339]": { + "$type": "EditorInspectorComponent", + "Id": 15365333384879292339, + "ComponentOrderEntryArray": [ + { + "ComponentId": 5985506260224649992 + }, + { + "ComponentId": 13797422028724928908, + "SortIndex": 1 + }, + { + "ComponentId": 5200514760734239788, + "SortIndex": 2 + } + ] + }, + "Component_[18296307565715962470]": { + "$type": "EditorPendingCompositionComponent", + "Id": 18296307565715962470 + }, + "Component_[1940145586700385602]": { + "$type": "EditorOnlyEntityComponent", + "Id": 1940145586700385602 + }, + "Component_[4820397163316962417]": { + "$type": "EditorEntityIconComponent", + "Id": 4820397163316962417 + }, + "Component_[5200514760734239788]": { + "$type": "EditorMaterialComponent", + "Id": 5200514760734239788, + "Controller": { + "Configuration": { + "materials": { + "{}": { + "MaterialAsset": { + "assetId": { + "guid": "{83179EEC-BAC7-5D39-9788-37D33E9584B1}" + }, + "assetHint": "levels/graphics/pbrmaterialchart/materials/basic_m10_r03.azmaterial" + } + } + } + } + }, + "materialSlotsByLodEnabled": true + }, + "Component_[5985506260224649992]": { + "$type": "{27F1E1A1-8D9D-4C3B-BD3A-AFB9762449C0} TransformComponent", + "Id": 5985506260224649992, + "Parent Entity": "Entity_[271574576285]", + "Transform Data": { + "Translate": [ + 5.999998569488525, + 0.0, + 0.0 + ] + } + }, + "Component_[7650403257628455609]": { + "$type": "EditorLockComponent", + "Id": 7650403257628455609 + } + } + }, + "Entity_[323114183837]": { + "Id": "Entity_[323114183837]", + "Name": "Camera1", + "Components": { + "Component_[10006292826835803540]": { + "$type": "EditorDisabledCompositionComponent", + "Id": 10006292826835803540 + }, + "Component_[10455519191869797]": { + "$type": "EditorVisibilityComponent", + "Id": 10455519191869797 + }, + "Component_[11437375554946967375]": { + "$type": "EditorEntitySortComponent", + "Id": 11437375554946967375 + }, + "Component_[12353408053920436955]": { + "$type": "SelectionComponent", + "Id": 12353408053920436955 + }, + "Component_[13096751172875321905]": { + "$type": "EditorEntityIconComponent", + "Id": 13096751172875321905 + }, + "Component_[14346079281461734018]": { + "$type": "EditorLockComponent", + "Id": 14346079281461734018 + }, + "Component_[14601767610059792758]": { + "$type": "EditorPendingCompositionComponent", + "Id": 14601767610059792758 + }, + "Component_[1752468310352442380]": { + "$type": "GenericComponentWrapper", + "Id": 1752468310352442380, + "m_template": { + "$type": "FlyCameraInputComponent" + } + }, + "Component_[18443771986481731838]": { + "$type": "{27F1E1A1-8D9D-4C3B-BD3A-AFB9762449C0} TransformComponent", + "Id": 18443771986481731838, + "Parent Entity": "Entity_[311518247264]", + "Transform Data": { + "Translate": [ + 49.97779846191406, + 0.013456299901008606, + -0.00310519989579916 + ], + "Rotate": [ + 0.0, + 0.0, + 90.00000762939453 + ], + "Scale": [ + 1.0, + 1.0, + 0.9999998807907104 + ] + } + }, + "Component_[646706054417436776]": { + "$type": "{CA11DA46-29FF-4083-B5F6-E02C3A8C3A3D} EditorCameraComponent", + "Id": 646706054417436776, + "Controller": { + "Configuration": { + "EditorEntityId": 323114183837 + } + } + }, + "Component_[8037556047509300929]": { + "$type": "EditorOnlyEntityComponent", + "Id": 8037556047509300929 + }, + "Component_[9357115853003317593]": { + "$type": "EditorInspectorComponent", + "Id": 9357115853003317593, + "ComponentOrderEntryArray": [ + { + "ComponentId": 18443771986481731838 + }, + { + "ComponentId": 646706054417436776, + "SortIndex": 1 + }, + { + "ComponentId": 1752468310352442380, + "SortIndex": 2 + } + ] + } + } + }, + "Entity_[439136298436]": { + "Id": "Entity_[439136298436]", + "Name": "Light", + "Components": { + "Component_[11029917022661117076]": { + "$type": "EditorSphereShapeComponent", + "Id": 11029917022661117076, + "ShapeColor": [ + 1.0, + 1.0, + 1.0, + 1.0 + ], + "SphereShape": { + "Configuration": { + "Radius": 0.05000000074505806 + } + } + }, + "Component_[12284008075844705430]": { + "$type": "{27F1E1A1-8D9D-4C3B-BD3A-AFB9762449C0} TransformComponent", + "Id": 12284008075844705430, + "Parent Entity": "Entity_[1579029125278]", + "Transform Data": { + "Translate": [ + -7.999996662139893, + 15.0, + 6.0 + ] + } + }, + "Component_[13457184847449496840]": { + "$type": "EditorDisabledCompositionComponent", + "Id": 13457184847449496840 + }, + "Component_[14431842353830635996]": { + "$type": "EditorLockComponent", + "Id": 14431842353830635996 + }, + "Component_[1473579476469110229]": { + "$type": "EditorPendingCompositionComponent", + "Id": 1473579476469110229 + }, + "Component_[17008596888127953988]": { + "$type": "EditorEntitySortComponent", + "Id": 17008596888127953988 + }, + "Component_[17246196475221723560]": { + "$type": "EditorInspectorComponent", + "Id": 17246196475221723560, + "ComponentOrderEntryArray": [ + { + "ComponentId": 12284008075844705430 + }, + { + "ComponentId": 7864910209001174169, + "SortIndex": 1 + } + ] + }, + "Component_[18388752482036682870]": { + "$type": "EditorOnlyEntityComponent", + "Id": 18388752482036682870 + }, + "Component_[3917765902796274739]": { + "$type": "EditorEntityIconComponent", + "Id": 3917765902796274739 + }, + "Component_[4143676462074671972]": { + "$type": "AZ::Render::EditorAreaLightComponent", + "Id": 4143676462074671972, + "Controller": { + "Configuration": { + "LightType": 1, + "IntensityMode": 1, + "Intensity": 50.0, + "AttenuationRadius": 79.26654815673828 + } + } + }, + "Component_[4863305662794796025]": { + "$type": "EditorVisibilityComponent", + "Id": 4863305662794796025 + }, + "Component_[5902189275159544426]": { + "$type": "SelectionComponent", + "Id": 5902189275159544426 + } + } + }, + "Entity_[443431265732]": { + "Id": "Entity_[443431265732]", + "Name": "Light", + "Components": { + "Component_[12284008075844705430]": { + "$type": "{27F1E1A1-8D9D-4C3B-BD3A-AFB9762449C0} TransformComponent", + "Id": 12284008075844705430, + "Parent Entity": "Entity_[1579029125278]", + "Transform Data": { + "Translate": [ + -7.999996662139893, + -10.0, + -6.0 + ] + } + }, + "Component_[13457184847449496840]": { + "$type": "EditorDisabledCompositionComponent", + "Id": 13457184847449496840 + }, + "Component_[14431842353830635996]": { + "$type": "EditorLockComponent", + "Id": 14431842353830635996 + }, + "Component_[1473579476469110229]": { + "$type": "EditorPendingCompositionComponent", + "Id": 1473579476469110229 + }, + "Component_[17008596888127953988]": { + "$type": "EditorEntitySortComponent", + "Id": 17008596888127953988 + }, + "Component_[17246196475221723560]": { + "$type": "EditorInspectorComponent", + "Id": 17246196475221723560, + "ComponentOrderEntryArray": [ + { + "ComponentId": 12284008075844705430 + }, + { + "ComponentId": 7864910209001174169, + "SortIndex": 1 + } + ] + }, + "Component_[18059889152590511471]": { + "$type": "EditorSphereShapeComponent", + "Id": 18059889152590511471, + "ShapeColor": [ + 1.0, + 1.0, + 1.0, + 1.0 + ], + "SphereShape": { + "Configuration": { + "Radius": 0.05000000074505806 + } + } + }, + "Component_[18388752482036682870]": { + "$type": "EditorOnlyEntityComponent", + "Id": 18388752482036682870 + }, + "Component_[3917765902796274739]": { + "$type": "EditorEntityIconComponent", + "Id": 3917765902796274739 + }, + "Component_[4143676462074671972]": { + "$type": "AZ::Render::EditorAreaLightComponent", + "Id": 4143676462074671972, + "Controller": { + "Configuration": { + "LightType": 1, + "IntensityMode": 1, + "Intensity": 50.0, + "AttenuationRadius": 79.26654815673828 + } + } + }, + "Component_[4863305662794796025]": { + "$type": "EditorVisibilityComponent", + "Id": 4863305662794796025 + }, + "Component_[5902189275159544426]": { + "$type": "SelectionComponent", + "Id": 5902189275159544426 + } + } + }, + "Entity_[447726233028]": { + "Id": "Entity_[447726233028]", + "Name": "Light", + "Components": { + "Component_[12284008075844705430]": { + "$type": "{27F1E1A1-8D9D-4C3B-BD3A-AFB9762449C0} TransformComponent", + "Id": 12284008075844705430, + "Parent Entity": "Entity_[1579029125278]", + "Transform Data": { + "Translate": [ + -7.999996662139893, + -15.0, + 6.0 + ] + } + }, + "Component_[13457184847449496840]": { + "$type": "EditorDisabledCompositionComponent", + "Id": 13457184847449496840 + }, + "Component_[14431842353830635996]": { + "$type": "EditorLockComponent", + "Id": 14431842353830635996 + }, + "Component_[1473579476469110229]": { + "$type": "EditorPendingCompositionComponent", + "Id": 1473579476469110229 + }, + "Component_[17008596888127953988]": { + "$type": "EditorEntitySortComponent", + "Id": 17008596888127953988 + }, + "Component_[17246196475221723560]": { + "$type": "EditorInspectorComponent", + "Id": 17246196475221723560, + "ComponentOrderEntryArray": [ + { + "ComponentId": 12284008075844705430 + }, + { + "ComponentId": 7864910209001174169, + "SortIndex": 1 + } + ] + }, + "Component_[18388752482036682870]": { + "$type": "EditorOnlyEntityComponent", + "Id": 18388752482036682870 + }, + "Component_[3116905989016577951]": { + "$type": "EditorSphereShapeComponent", + "Id": 3116905989016577951, + "ShapeColor": [ + 1.0, + 1.0, + 1.0, + 1.0 + ], + "SphereShape": { + "Configuration": { + "Radius": 0.05000000074505806 + } + } + }, + "Component_[3917765902796274739]": { + "$type": "EditorEntityIconComponent", + "Id": 3917765902796274739 + }, + "Component_[4143676462074671972]": { + "$type": "AZ::Render::EditorAreaLightComponent", + "Id": 4143676462074671972, + "Controller": { + "Configuration": { + "LightType": 1, + "IntensityMode": 1, + "Intensity": 50.0, + "AttenuationRadius": 79.26654815673828 + } + } + }, + "Component_[4863305662794796025]": { + "$type": "EditorVisibilityComponent", + "Id": 4863305662794796025 + }, + "Component_[5902189275159544426]": { + "$type": "SelectionComponent", + "Id": 5902189275159544426 + } + } + }, + "Entity_[452021200324]": { + "Id": "Entity_[452021200324]", + "Name": "Light", + "Components": { + "Component_[11880996669921269387]": { + "$type": "EditorSphereShapeComponent", + "Id": 11880996669921269387, + "ShapeColor": [ + 1.0, + 1.0, + 1.0, + 1.0 + ], + "SphereShape": { + "Configuration": { + "Radius": 0.05000000074505806 + } + } + }, + "Component_[12284008075844705430]": { + "$type": "{27F1E1A1-8D9D-4C3B-BD3A-AFB9762449C0} TransformComponent", + "Id": 12284008075844705430, + "Parent Entity": "Entity_[1579029125278]", + "Transform Data": { + "Translate": [ + -7.999996662139893, + 12.0, + -6.0 + ] + } + }, + "Component_[13457184847449496840]": { + "$type": "EditorDisabledCompositionComponent", + "Id": 13457184847449496840 + }, + "Component_[14431842353830635996]": { + "$type": "EditorLockComponent", + "Id": 14431842353830635996 + }, + "Component_[1473579476469110229]": { + "$type": "EditorPendingCompositionComponent", + "Id": 1473579476469110229 + }, + "Component_[17008596888127953988]": { + "$type": "EditorEntitySortComponent", + "Id": 17008596888127953988 + }, + "Component_[17246196475221723560]": { + "$type": "EditorInspectorComponent", + "Id": 17246196475221723560, + "ComponentOrderEntryArray": [ + { + "ComponentId": 12284008075844705430 + }, + { + "ComponentId": 7864910209001174169, + "SortIndex": 1 + } + ] + }, + "Component_[18388752482036682870]": { + "$type": "EditorOnlyEntityComponent", + "Id": 18388752482036682870 + }, + "Component_[3917765902796274739]": { + "$type": "EditorEntityIconComponent", + "Id": 3917765902796274739 + }, + "Component_[4143676462074671972]": { + "$type": "AZ::Render::EditorAreaLightComponent", + "Id": 4143676462074671972, + "Controller": { + "Configuration": { + "LightType": 1, + "IntensityMode": 1, + "Intensity": 50.0, + "AttenuationRadius": 79.26654815673828 + } + } + }, + "Component_[4863305662794796025]": { + "$type": "EditorVisibilityComponent", + "Id": 4863305662794796025 + }, + "Component_[5902189275159544426]": { + "$type": "SelectionComponent", + "Id": 5902189275159544426 + } + } + }, + "Entity_[456316167620]": { + "Id": "Entity_[456316167620]", + "Name": "Light", + "Components": { + "Component_[12284008075844705430]": { + "$type": "{27F1E1A1-8D9D-4C3B-BD3A-AFB9762449C0} TransformComponent", + "Id": 12284008075844705430, + "Parent Entity": "Entity_[1579029125278]", + "Transform Data": { + "Translate": [ + -7.999996662139893, + -15.0, + -6.0 + ] + } + }, + "Component_[13457184847449496840]": { + "$type": "EditorDisabledCompositionComponent", + "Id": 13457184847449496840 + }, + "Component_[14431842353830635996]": { + "$type": "EditorLockComponent", + "Id": 14431842353830635996 + }, + "Component_[1473579476469110229]": { + "$type": "EditorPendingCompositionComponent", + "Id": 1473579476469110229 + }, + "Component_[15861630875009954708]": { + "$type": "EditorSphereShapeComponent", + "Id": 15861630875009954708, + "ShapeColor": [ + 1.0, + 1.0, + 1.0, + 1.0 + ], + "SphereShape": { + "Configuration": { + "Radius": 0.05000000074505806 + } + } + }, + "Component_[17008596888127953988]": { + "$type": "EditorEntitySortComponent", + "Id": 17008596888127953988 + }, + "Component_[17246196475221723560]": { + "$type": "EditorInspectorComponent", + "Id": 17246196475221723560, + "ComponentOrderEntryArray": [ + { + "ComponentId": 12284008075844705430 + }, + { + "ComponentId": 7864910209001174169, + "SortIndex": 1 + } + ] + }, + "Component_[18388752482036682870]": { + "$type": "EditorOnlyEntityComponent", + "Id": 18388752482036682870 + }, + "Component_[3917765902796274739]": { + "$type": "EditorEntityIconComponent", + "Id": 3917765902796274739 + }, + "Component_[4143676462074671972]": { + "$type": "AZ::Render::EditorAreaLightComponent", + "Id": 4143676462074671972, + "Controller": { + "Configuration": { + "LightType": 1, + "IntensityMode": 1, + "Intensity": 50.0, + "AttenuationRadius": 79.26654815673828 + } + } + }, + "Component_[4863305662794796025]": { + "$type": "EditorVisibilityComponent", + "Id": 4863305662794796025 + }, + "Component_[5902189275159544426]": { + "$type": "SelectionComponent", + "Id": 5902189275159544426 + } + } + }, + "Entity_[460611134916]": { + "Id": "Entity_[460611134916]", + "Name": "Light", + "Components": { + "Component_[12284008075844705430]": { + "$type": "{27F1E1A1-8D9D-4C3B-BD3A-AFB9762449C0} TransformComponent", + "Id": 12284008075844705430, + "Parent Entity": "Entity_[1579029125278]", + "Transform Data": { + "Translate": [ + -7.999996662139893, + 0.0, + -6.0 + ] + } + }, + "Component_[13457184847449496840]": { + "$type": "EditorDisabledCompositionComponent", + "Id": 13457184847449496840 + }, + "Component_[14431842353830635996]": { + "$type": "EditorLockComponent", + "Id": 14431842353830635996 + }, + "Component_[1473579476469110229]": { + "$type": "EditorPendingCompositionComponent", + "Id": 1473579476469110229 + }, + "Component_[17008596888127953988]": { + "$type": "EditorEntitySortComponent", + "Id": 17008596888127953988 + }, + "Component_[17246196475221723560]": { + "$type": "EditorInspectorComponent", + "Id": 17246196475221723560, + "ComponentOrderEntryArray": [ + { + "ComponentId": 12284008075844705430 + }, + { + "ComponentId": 7864910209001174169, + "SortIndex": 1 + } + ] + }, + "Component_[18388752482036682870]": { + "$type": "EditorOnlyEntityComponent", + "Id": 18388752482036682870 + }, + "Component_[2667740107500775267]": { + "$type": "EditorSphereShapeComponent", + "Id": 2667740107500775267, + "ShapeColor": [ + 1.0, + 1.0, + 1.0, + 1.0 + ], + "SphereShape": { + "Configuration": { + "Radius": 0.05000000074505806 + } + } + }, + "Component_[3917765902796274739]": { + "$type": "EditorEntityIconComponent", + "Id": 3917765902796274739 + }, + "Component_[4143676462074671972]": { + "$type": "AZ::Render::EditorAreaLightComponent", + "Id": 4143676462074671972, + "Controller": { + "Configuration": { + "LightType": 1, + "IntensityMode": 1, + "Intensity": 50.0, + "AttenuationRadius": 79.26654815673828 + } + } + }, + "Component_[4863305662794796025]": { + "$type": "EditorVisibilityComponent", + "Id": 4863305662794796025 + }, + "Component_[5902189275159544426]": { + "$type": "SelectionComponent", + "Id": 5902189275159544426 + } + } + }, + "Entity_[464906102212]": { + "Id": "Entity_[464906102212]", + "Name": "Light", + "Components": { + "Component_[12284008075844705430]": { + "$type": "{27F1E1A1-8D9D-4C3B-BD3A-AFB9762449C0} TransformComponent", + "Id": 12284008075844705430, + "Parent Entity": "Entity_[1579029125278]", + "Transform Data": { + "Translate": [ + -7.999996662139893, + 5.0, + -6.0 + ] + } + }, + "Component_[13457184847449496840]": { + "$type": "EditorDisabledCompositionComponent", + "Id": 13457184847449496840 + }, + "Component_[14431842353830635996]": { + "$type": "EditorLockComponent", + "Id": 14431842353830635996 + }, + "Component_[1473579476469110229]": { + "$type": "EditorPendingCompositionComponent", + "Id": 1473579476469110229 + }, + "Component_[17008596888127953988]": { + "$type": "EditorEntitySortComponent", + "Id": 17008596888127953988 + }, + "Component_[17246196475221723560]": { + "$type": "EditorInspectorComponent", + "Id": 17246196475221723560, + "ComponentOrderEntryArray": [ + { + "ComponentId": 12284008075844705430 + }, + { + "ComponentId": 7864910209001174169, + "SortIndex": 1 + } + ] + }, + "Component_[18388752482036682870]": { + "$type": "EditorOnlyEntityComponent", + "Id": 18388752482036682870 + }, + "Component_[3917765902796274739]": { + "$type": "EditorEntityIconComponent", + "Id": 3917765902796274739 + }, + "Component_[4143676462074671972]": { + "$type": "AZ::Render::EditorAreaLightComponent", + "Id": 4143676462074671972, + "Controller": { + "Configuration": { + "LightType": 1, + "IntensityMode": 1, + "Intensity": 50.0, + "AttenuationRadius": 79.26654815673828 + } + } + }, + "Component_[4863305662794796025]": { + "$type": "EditorVisibilityComponent", + "Id": 4863305662794796025 + }, + "Component_[5902189275159544426]": { + "$type": "SelectionComponent", + "Id": 5902189275159544426 + }, + "Component_[9077284412210882947]": { + "$type": "EditorSphereShapeComponent", + "Id": 9077284412210882947, + "ShapeColor": [ + 1.0, + 1.0, + 1.0, + 1.0 + ], + "SphereShape": { + "Configuration": { + "Radius": 0.05000000074505806 + } + } + } + } + }, + "Entity_[469201069508]": { + "Id": "Entity_[469201069508]", + "Name": "Light", + "Components": { + "Component_[12284008075844705430]": { + "$type": "{27F1E1A1-8D9D-4C3B-BD3A-AFB9762449C0} TransformComponent", + "Id": 12284008075844705430, + "Parent Entity": "Entity_[1579029125278]", + "Transform Data": { + "Translate": [ + -7.999996662139893, + -10.0, + 6.0 + ] + } + }, + "Component_[13457184847449496840]": { + "$type": "EditorDisabledCompositionComponent", + "Id": 13457184847449496840 + }, + "Component_[14431842353830635996]": { + "$type": "EditorLockComponent", + "Id": 14431842353830635996 + }, + "Component_[1473579476469110229]": { + "$type": "EditorPendingCompositionComponent", + "Id": 1473579476469110229 + }, + "Component_[17008596888127953988]": { + "$type": "EditorEntitySortComponent", + "Id": 17008596888127953988 + }, + "Component_[17246196475221723560]": { + "$type": "EditorInspectorComponent", + "Id": 17246196475221723560, + "ComponentOrderEntryArray": [ + { + "ComponentId": 12284008075844705430 + }, + { + "ComponentId": 7864910209001174169, + "SortIndex": 1 + } + ] + }, + "Component_[18388752482036682870]": { + "$type": "EditorOnlyEntityComponent", + "Id": 18388752482036682870 + }, + "Component_[2210433037075578051]": { + "$type": "EditorSphereShapeComponent", + "Id": 2210433037075578051, + "ShapeColor": [ + 1.0, + 1.0, + 1.0, + 1.0 + ], + "SphereShape": { + "Configuration": { + "Radius": 0.05000000074505806 + } + } + }, + "Component_[3917765902796274739]": { + "$type": "EditorEntityIconComponent", + "Id": 3917765902796274739 + }, + "Component_[4143676462074671972]": { + "$type": "AZ::Render::EditorAreaLightComponent", + "Id": 4143676462074671972, + "Controller": { + "Configuration": { + "LightType": 1, + "IntensityMode": 1, + "Intensity": 50.0, + "AttenuationRadius": 79.26654815673828 + } + } + }, + "Component_[4863305662794796025]": { + "$type": "EditorVisibilityComponent", + "Id": 4863305662794796025 + }, + "Component_[5902189275159544426]": { + "$type": "SelectionComponent", + "Id": 5902189275159544426 + } + } + }, + "Entity_[473496036804]": { + "Id": "Entity_[473496036804]", + "Name": "Light", + "Components": { + "Component_[12284008075844705430]": { + "$type": "{27F1E1A1-8D9D-4C3B-BD3A-AFB9762449C0} TransformComponent", + "Id": 12284008075844705430, + "Parent Entity": "Entity_[1579029125278]", + "Transform Data": { + "Translate": [ + -7.999996662139893, + 5.0, + 6.0 + ] + } + }, + "Component_[12980894623939584115]": { + "$type": "EditorSphereShapeComponent", + "Id": 12980894623939584115, + "ShapeColor": [ + 1.0, + 1.0, + 1.0, + 1.0 + ], + "SphereShape": { + "Configuration": { + "Radius": 0.05000000074505806 + } + } + }, + "Component_[13457184847449496840]": { + "$type": "EditorDisabledCompositionComponent", + "Id": 13457184847449496840 + }, + "Component_[14431842353830635996]": { + "$type": "EditorLockComponent", + "Id": 14431842353830635996 + }, + "Component_[1473579476469110229]": { + "$type": "EditorPendingCompositionComponent", + "Id": 1473579476469110229 + }, + "Component_[17008596888127953988]": { + "$type": "EditorEntitySortComponent", + "Id": 17008596888127953988 + }, + "Component_[17246196475221723560]": { + "$type": "EditorInspectorComponent", + "Id": 17246196475221723560, + "ComponentOrderEntryArray": [ + { + "ComponentId": 12284008075844705430 + }, + { + "ComponentId": 7864910209001174169, + "SortIndex": 1 + } + ] + }, + "Component_[18388752482036682870]": { + "$type": "EditorOnlyEntityComponent", + "Id": 18388752482036682870 + }, + "Component_[3917765902796274739]": { + "$type": "EditorEntityIconComponent", + "Id": 3917765902796274739 + }, + "Component_[4143676462074671972]": { + "$type": "AZ::Render::EditorAreaLightComponent", + "Id": 4143676462074671972, + "Controller": { + "Configuration": { + "LightType": 1, + "IntensityMode": 1, + "Intensity": 50.0, + "AttenuationRadius": 79.26654815673828 + } + } + }, + "Component_[4863305662794796025]": { + "$type": "EditorVisibilityComponent", + "Id": 4863305662794796025 + }, + "Component_[5902189275159544426]": { + "$type": "SelectionComponent", + "Id": 5902189275159544426 + } + } + }, + "Entity_[477791004100]": { + "Id": "Entity_[477791004100]", + "Name": "Light", + "Components": { + "Component_[12284008075844705430]": { + "$type": "{27F1E1A1-8D9D-4C3B-BD3A-AFB9762449C0} TransformComponent", + "Id": 12284008075844705430, + "Parent Entity": "Entity_[1579029125278]", + "Transform Data": { + "Translate": [ + -7.999996662139893, + 12.0, + 6.0 + ] + } + }, + "Component_[13457184847449496840]": { + "$type": "EditorDisabledCompositionComponent", + "Id": 13457184847449496840 + }, + "Component_[14431842353830635996]": { + "$type": "EditorLockComponent", + "Id": 14431842353830635996 + }, + "Component_[1473579476469110229]": { + "$type": "EditorPendingCompositionComponent", + "Id": 1473579476469110229 + }, + "Component_[17008596888127953988]": { + "$type": "EditorEntitySortComponent", + "Id": 17008596888127953988 + }, + "Component_[17246196475221723560]": { + "$type": "EditorInspectorComponent", + "Id": 17246196475221723560, + "ComponentOrderEntryArray": [ + { + "ComponentId": 12284008075844705430 + }, + { + "ComponentId": 7864910209001174169, + "SortIndex": 1 + } + ] + }, + "Component_[18236955021241851736]": { + "$type": "EditorSphereShapeComponent", + "Id": 18236955021241851736, + "ShapeColor": [ + 1.0, + 1.0, + 1.0, + 1.0 + ], + "SphereShape": { + "Configuration": { + "Radius": 0.05000000074505806 + } + } + }, + "Component_[18388752482036682870]": { + "$type": "EditorOnlyEntityComponent", + "Id": 18388752482036682870 + }, + "Component_[3917765902796274739]": { + "$type": "EditorEntityIconComponent", + "Id": 3917765902796274739 + }, + "Component_[4143676462074671972]": { + "$type": "AZ::Render::EditorAreaLightComponent", + "Id": 4143676462074671972, + "Controller": { + "Configuration": { + "LightType": 1, + "IntensityMode": 1, + "Intensity": 50.0, + "AttenuationRadius": 79.26654815673828 + } + } + }, + "Component_[4863305662794796025]": { + "$type": "EditorVisibilityComponent", + "Id": 4863305662794796025 + }, + "Component_[5902189275159544426]": { + "$type": "SelectionComponent", + "Id": 5902189275159544426 + } + } + }, + "Entity_[482085971396]": { + "Id": "Entity_[482085971396]", + "Name": "Light", + "Components": { + "Component_[12284008075844705430]": { + "$type": "{27F1E1A1-8D9D-4C3B-BD3A-AFB9762449C0} TransformComponent", + "Id": 12284008075844705430, + "Parent Entity": "Entity_[1579029125278]", + "Transform Data": { + "Translate": [ + -7.999996662139893, + -5.0, + -6.0 + ] + } + }, + "Component_[13457184847449496840]": { + "$type": "EditorDisabledCompositionComponent", + "Id": 13457184847449496840 + }, + "Component_[14431842353830635996]": { + "$type": "EditorLockComponent", + "Id": 14431842353830635996 + }, + "Component_[1473579476469110229]": { + "$type": "EditorPendingCompositionComponent", + "Id": 1473579476469110229 + }, + "Component_[17008596888127953988]": { + "$type": "EditorEntitySortComponent", + "Id": 17008596888127953988 + }, + "Component_[17246196475221723560]": { + "$type": "EditorInspectorComponent", + "Id": 17246196475221723560, + "ComponentOrderEntryArray": [ + { + "ComponentId": 12284008075844705430 + }, + { + "ComponentId": 7864910209001174169, + "SortIndex": 1 + } + ] + }, + "Component_[18388752482036682870]": { + "$type": "EditorOnlyEntityComponent", + "Id": 18388752482036682870 + }, + "Component_[3917765902796274739]": { + "$type": "EditorEntityIconComponent", + "Id": 3917765902796274739 + }, + "Component_[4143676462074671972]": { + "$type": "AZ::Render::EditorAreaLightComponent", + "Id": 4143676462074671972, + "Controller": { + "Configuration": { + "LightType": 1, + "IntensityMode": 1, + "Intensity": 50.0, + "AttenuationRadius": 79.26654815673828 + } + } + }, + "Component_[4863305662794796025]": { + "$type": "EditorVisibilityComponent", + "Id": 4863305662794796025 + }, + "Component_[5902189275159544426]": { + "$type": "SelectionComponent", + "Id": 5902189275159544426 + }, + "Component_[868225960524074909]": { + "$type": "EditorSphereShapeComponent", + "Id": 868225960524074909, + "ShapeColor": [ + 1.0, + 1.0, + 1.0, + 1.0 + ], + "SphereShape": { + "Configuration": { + "Radius": 0.05000000074505806 + } + } + } + } + }, + "Entity_[486380938692]": { + "Id": "Entity_[486380938692]", + "Name": "Light", + "Components": { + "Component_[12284008075844705430]": { + "$type": "{27F1E1A1-8D9D-4C3B-BD3A-AFB9762449C0} TransformComponent", + "Id": 12284008075844705430, + "Parent Entity": "Entity_[1579029125278]", + "Transform Data": { + "Translate": [ + -7.999996662139893, + 0.0, + 6.0 + ] + } + }, + "Component_[13457184847449496840]": { + "$type": "EditorDisabledCompositionComponent", + "Id": 13457184847449496840 + }, + "Component_[14431842353830635996]": { + "$type": "EditorLockComponent", + "Id": 14431842353830635996 + }, + "Component_[1473579476469110229]": { + "$type": "EditorPendingCompositionComponent", + "Id": 1473579476469110229 + }, + "Component_[17008596888127953988]": { + "$type": "EditorEntitySortComponent", + "Id": 17008596888127953988 + }, + "Component_[17246196475221723560]": { + "$type": "EditorInspectorComponent", + "Id": 17246196475221723560, + "ComponentOrderEntryArray": [ + { + "ComponentId": 12284008075844705430 + }, + { + "ComponentId": 7864910209001174169, + "SortIndex": 1 + } + ] + }, + "Component_[18388752482036682870]": { + "$type": "EditorOnlyEntityComponent", + "Id": 18388752482036682870 + }, + "Component_[232169833717435589]": { + "$type": "EditorSphereShapeComponent", + "Id": 232169833717435589, + "ShapeColor": [ + 1.0, + 1.0, + 1.0, + 1.0 + ], + "SphereShape": { + "Configuration": { + "Radius": 0.05000000074505806 + } + } + }, + "Component_[3917765902796274739]": { + "$type": "EditorEntityIconComponent", + "Id": 3917765902796274739 + }, + "Component_[4143676462074671972]": { + "$type": "AZ::Render::EditorAreaLightComponent", + "Id": 4143676462074671972, + "Controller": { + "Configuration": { + "LightType": 1, + "IntensityMode": 1, + "Intensity": 50.0, + "AttenuationRadius": 79.26654815673828 + } + } + }, + "Component_[4863305662794796025]": { + "$type": "EditorVisibilityComponent", + "Id": 4863305662794796025 + }, + "Component_[5902189275159544426]": { + "$type": "SelectionComponent", + "Id": 5902189275159544426 + } + } + }, + "Entity_[490675905988]": { + "Id": "Entity_[490675905988]", + "Name": "Light", + "Components": { + "Component_[12284008075844705430]": { + "$type": "{27F1E1A1-8D9D-4C3B-BD3A-AFB9762449C0} TransformComponent", + "Id": 12284008075844705430, + "Parent Entity": "Entity_[1579029125278]", + "Transform Data": { + "Translate": [ + -7.999996662139893, + -5.0, + 6.0 + ] + } + }, + "Component_[13457184847449496840]": { + "$type": "EditorDisabledCompositionComponent", + "Id": 13457184847449496840 + }, + "Component_[14431842353830635996]": { + "$type": "EditorLockComponent", + "Id": 14431842353830635996 + }, + "Component_[1473579476469110229]": { + "$type": "EditorPendingCompositionComponent", + "Id": 1473579476469110229 + }, + "Component_[17008596888127953988]": { + "$type": "EditorEntitySortComponent", + "Id": 17008596888127953988 + }, + "Component_[17246196475221723560]": { + "$type": "EditorInspectorComponent", + "Id": 17246196475221723560, + "ComponentOrderEntryArray": [ + { + "ComponentId": 12284008075844705430 + }, + { + "ComponentId": 7864910209001174169, + "SortIndex": 1 + } + ] + }, + "Component_[18055528880793132775]": { + "$type": "EditorSphereShapeComponent", + "Id": 18055528880793132775, + "ShapeColor": [ + 1.0, + 1.0, + 1.0, + 1.0 + ], + "SphereShape": { + "Configuration": { + "Radius": 0.05000000074505806 + } + } + }, + "Component_[18388752482036682870]": { + "$type": "EditorOnlyEntityComponent", + "Id": 18388752482036682870 + }, + "Component_[3917765902796274739]": { + "$type": "EditorEntityIconComponent", + "Id": 3917765902796274739 + }, + "Component_[4143676462074671972]": { + "$type": "AZ::Render::EditorAreaLightComponent", + "Id": 4143676462074671972, + "Controller": { + "Configuration": { + "LightType": 1, + "IntensityMode": 1, + "Intensity": 50.0, + "AttenuationRadius": 79.26654815673828 + } + } + }, + "Component_[4863305662794796025]": { + "$type": "EditorVisibilityComponent", + "Id": 4863305662794796025 + }, + "Component_[5902189275159544426]": { + "$type": "SelectionComponent", + "Id": 5902189275159544426 + } + } + }, + "Entity_[494970873284]": { + "Id": "Entity_[494970873284]", + "Name": "Light", + "Components": { + "Component_[12284008075844705430]": { + "$type": "{27F1E1A1-8D9D-4C3B-BD3A-AFB9762449C0} TransformComponent", + "Id": 12284008075844705430, + "Parent Entity": "Entity_[1579029125278]", + "Transform Data": { + "Translate": [ + -7.999996662139893, + 15.0, + -6.0 + ] + } + }, + "Component_[13457184847449496840]": { + "$type": "EditorDisabledCompositionComponent", + "Id": 13457184847449496840 + }, + "Component_[14431842353830635996]": { + "$type": "EditorLockComponent", + "Id": 14431842353830635996 + }, + "Component_[1473579476469110229]": { + "$type": "EditorPendingCompositionComponent", + "Id": 1473579476469110229 + }, + "Component_[17008596888127953988]": { + "$type": "EditorEntitySortComponent", + "Id": 17008596888127953988 + }, + "Component_[17246196475221723560]": { + "$type": "EditorInspectorComponent", + "Id": 17246196475221723560, + "ComponentOrderEntryArray": [ + { + "ComponentId": 12284008075844705430 + }, + { + "ComponentId": 7864910209001174169, + "SortIndex": 1 + } + ] + }, + "Component_[18388752482036682870]": { + "$type": "EditorOnlyEntityComponent", + "Id": 18388752482036682870 + }, + "Component_[3917765902796274739]": { + "$type": "EditorEntityIconComponent", + "Id": 3917765902796274739 + }, + "Component_[4143676462074671972]": { + "$type": "AZ::Render::EditorAreaLightComponent", + "Id": 4143676462074671972, + "Controller": { + "Configuration": { + "LightType": 1, + "IntensityMode": 1, + "Intensity": 50.0, + "AttenuationRadius": 79.26654815673828 + } + } + }, + "Component_[4863305662794796025]": { + "$type": "EditorVisibilityComponent", + "Id": 4863305662794796025 + }, + "Component_[565296772593396698]": { + "$type": "EditorSphereShapeComponent", + "Id": 565296772593396698, + "ShapeColor": [ + 1.0, + 1.0, + 1.0, + 1.0 + ], + "SphereShape": { + "Configuration": { + "Radius": 0.05000000074505806 + } + } + }, + "Component_[5902189275159544426]": { + "$type": "SelectionComponent", + "Id": 5902189275159544426 + } + } + } + } +} \ No newline at end of file diff --git a/AutomatedTesting/Levels/Graphics/PbrMaterialChart/materials/basic.material b/AutomatedTesting/Levels/Graphics/PbrMaterialChart/materials/basic.material new file mode 100644 index 0000000000..32ac8dfd10 --- /dev/null +++ b/AutomatedTesting/Levels/Graphics/PbrMaterialChart/materials/basic.material @@ -0,0 +1,32 @@ +{ + "materialType": "Materials/Types/StandardPBR.materialtype", + "propertyLayoutVersion": 1, + "properties": { + "baseColor": { + "color": [ 1.0, 1.0, 1.0 ], + "factor": 0.75, + "useTexture": false, + "textureMap": "" + }, + "metallic": { + "factor": 0.0, + "useTexture": false, + "textureMap": "" + }, + "roughness": { + "factor": 0.0, + "useTexture": false, + "textureMap": "" + }, + "specularF0": { + "factor": 0.5, + "useTexture": false, + "textureMap": "" + }, + "normal": { + "factor": 1.0, + "useTexture": false, + "textureMap": "" + } + } +} diff --git a/AutomatedTesting/Levels/Graphics/PbrMaterialChart/materials/basic_m00_r00.material b/AutomatedTesting/Levels/Graphics/PbrMaterialChart/materials/basic_m00_r00.material new file mode 100644 index 0000000000..1c1096bf12 --- /dev/null +++ b/AutomatedTesting/Levels/Graphics/PbrMaterialChart/materials/basic_m00_r00.material @@ -0,0 +1,13 @@ +{ + "parentMaterial": "./basic.material", + "materialType": "Materials/Types/StandardPBR.materialtype", + "propertyLayoutVersion": 1, + "properties": { + "metallic": { + "factor": 0.0 + }, + "roughness": { + "factor": 0.0 + } + } +} diff --git a/AutomatedTesting/Levels/Graphics/PbrMaterialChart/materials/basic_m00_r01.material b/AutomatedTesting/Levels/Graphics/PbrMaterialChart/materials/basic_m00_r01.material new file mode 100644 index 0000000000..33148f3f73 --- /dev/null +++ b/AutomatedTesting/Levels/Graphics/PbrMaterialChart/materials/basic_m00_r01.material @@ -0,0 +1,13 @@ +{ + "parentMaterial": "./basic.material", + "materialType": "Materials/Types/StandardPBR.materialtype", + "propertyLayoutVersion": 1, + "properties": { + "metallic": { + "factor": 0.0 + }, + "roughness": { + "factor": 0.1 + } + } +} diff --git a/AutomatedTesting/Levels/Graphics/PbrMaterialChart/materials/basic_m00_r02.material b/AutomatedTesting/Levels/Graphics/PbrMaterialChart/materials/basic_m00_r02.material new file mode 100644 index 0000000000..38339454cb --- /dev/null +++ b/AutomatedTesting/Levels/Graphics/PbrMaterialChart/materials/basic_m00_r02.material @@ -0,0 +1,13 @@ +{ + "parentMaterial": "./basic.material", + "materialType": "Materials/Types/StandardPBR.materialtype", + "propertyLayoutVersion": 1, + "properties": { + "metallic": { + "factor": 0.0 + }, + "roughness": { + "factor": 0.2 + } + } +} diff --git a/AutomatedTesting/Levels/Graphics/PbrMaterialChart/materials/basic_m00_r03.material b/AutomatedTesting/Levels/Graphics/PbrMaterialChart/materials/basic_m00_r03.material new file mode 100644 index 0000000000..e21ab5775a --- /dev/null +++ b/AutomatedTesting/Levels/Graphics/PbrMaterialChart/materials/basic_m00_r03.material @@ -0,0 +1,13 @@ +{ + "parentMaterial": "./basic.material", + "materialType": "Materials/Types/StandardPBR.materialtype", + "propertyLayoutVersion": 1, + "properties": { + "metallic": { + "factor": 0.0 + }, + "roughness": { + "factor": 0.3 + } + } +} diff --git a/AutomatedTesting/Levels/Graphics/PbrMaterialChart/materials/basic_m00_r04.material b/AutomatedTesting/Levels/Graphics/PbrMaterialChart/materials/basic_m00_r04.material new file mode 100644 index 0000000000..0272e66081 --- /dev/null +++ b/AutomatedTesting/Levels/Graphics/PbrMaterialChart/materials/basic_m00_r04.material @@ -0,0 +1,13 @@ +{ + "parentMaterial": "./basic.material", + "materialType": "Materials/Types/StandardPBR.materialtype", + "propertyLayoutVersion": 1, + "properties": { + "metallic": { + "factor": 0.0 + }, + "roughness": { + "factor": 0.4 + } + } +} diff --git a/AutomatedTesting/Levels/Graphics/PbrMaterialChart/materials/basic_m00_r05.material b/AutomatedTesting/Levels/Graphics/PbrMaterialChart/materials/basic_m00_r05.material new file mode 100644 index 0000000000..67d51777a4 --- /dev/null +++ b/AutomatedTesting/Levels/Graphics/PbrMaterialChart/materials/basic_m00_r05.material @@ -0,0 +1,13 @@ +{ + "parentMaterial": "./basic.material", + "materialType": "Materials/Types/StandardPBR.materialtype", + "propertyLayoutVersion": 1, + "properties": { + "metallic": { + "factor": 0.0 + }, + "roughness": { + "factor": 0.5 + } + } +} diff --git a/AutomatedTesting/Levels/Graphics/PbrMaterialChart/materials/basic_m00_r06.material b/AutomatedTesting/Levels/Graphics/PbrMaterialChart/materials/basic_m00_r06.material new file mode 100644 index 0000000000..3136f654e6 --- /dev/null +++ b/AutomatedTesting/Levels/Graphics/PbrMaterialChart/materials/basic_m00_r06.material @@ -0,0 +1,13 @@ +{ + "parentMaterial": "./basic.material", + "materialType": "Materials/Types/StandardPBR.materialtype", + "propertyLayoutVersion": 1, + "properties": { + "metallic": { + "factor": 0.0 + }, + "roughness": { + "factor": 0.6 + } + } +} diff --git a/AutomatedTesting/Levels/Graphics/PbrMaterialChart/materials/basic_m00_r07.material b/AutomatedTesting/Levels/Graphics/PbrMaterialChart/materials/basic_m00_r07.material new file mode 100644 index 0000000000..a79744ea11 --- /dev/null +++ b/AutomatedTesting/Levels/Graphics/PbrMaterialChart/materials/basic_m00_r07.material @@ -0,0 +1,13 @@ +{ + "parentMaterial": "./basic.material", + "materialType": "Materials/Types/StandardPBR.materialtype", + "propertyLayoutVersion": 1, + "properties": { + "metallic": { + "factor": 0.0 + }, + "roughness": { + "factor": 0.7 + } + } +} diff --git a/AutomatedTesting/Levels/Graphics/PbrMaterialChart/materials/basic_m00_r08.material b/AutomatedTesting/Levels/Graphics/PbrMaterialChart/materials/basic_m00_r08.material new file mode 100644 index 0000000000..1372283500 --- /dev/null +++ b/AutomatedTesting/Levels/Graphics/PbrMaterialChart/materials/basic_m00_r08.material @@ -0,0 +1,13 @@ +{ + "parentMaterial": "./basic.material", + "materialType": "Materials/Types/StandardPBR.materialtype", + "propertyLayoutVersion": 1, + "properties": { + "metallic": { + "factor": 0.0 + }, + "roughness": { + "factor": 0.8 + } + } +} diff --git a/AutomatedTesting/Levels/Graphics/PbrMaterialChart/materials/basic_m00_r09.material b/AutomatedTesting/Levels/Graphics/PbrMaterialChart/materials/basic_m00_r09.material new file mode 100644 index 0000000000..d1c951e53c --- /dev/null +++ b/AutomatedTesting/Levels/Graphics/PbrMaterialChart/materials/basic_m00_r09.material @@ -0,0 +1,13 @@ +{ + "parentMaterial": "./basic.material", + "materialType": "Materials/Types/StandardPBR.materialtype", + "propertyLayoutVersion": 1, + "properties": { + "metallic": { + "factor": 0.0 + }, + "roughness": { + "factor": 0.9 + } + } +} diff --git a/AutomatedTesting/Levels/Graphics/PbrMaterialChart/materials/basic_m00_r10.material b/AutomatedTesting/Levels/Graphics/PbrMaterialChart/materials/basic_m00_r10.material new file mode 100644 index 0000000000..d34fc46530 --- /dev/null +++ b/AutomatedTesting/Levels/Graphics/PbrMaterialChart/materials/basic_m00_r10.material @@ -0,0 +1,13 @@ +{ + "parentMaterial": "./basic.material", + "materialType": "Materials/Types/StandardPBR.materialtype", + "propertyLayoutVersion": 1, + "properties": { + "metallic": { + "factor": 0.0 + }, + "roughness": { + "factor": 1.0 + } + } +} diff --git a/AutomatedTesting/Levels/Graphics/PbrMaterialChart/materials/basic_m10_r00.material b/AutomatedTesting/Levels/Graphics/PbrMaterialChart/materials/basic_m10_r00.material new file mode 100644 index 0000000000..92ddfec7c4 --- /dev/null +++ b/AutomatedTesting/Levels/Graphics/PbrMaterialChart/materials/basic_m10_r00.material @@ -0,0 +1,13 @@ +{ + "parentMaterial": "./basic.material", + "materialType": "Materials/Types/StandardPBR.materialtype", + "propertyLayoutVersion": 1, + "properties": { + "metallic": { + "factor": 1.0 + }, + "roughness": { + "factor": 0.0 + } + } +} diff --git a/AutomatedTesting/Levels/Graphics/PbrMaterialChart/materials/basic_m10_r01.material b/AutomatedTesting/Levels/Graphics/PbrMaterialChart/materials/basic_m10_r01.material new file mode 100644 index 0000000000..874422384a --- /dev/null +++ b/AutomatedTesting/Levels/Graphics/PbrMaterialChart/materials/basic_m10_r01.material @@ -0,0 +1,13 @@ +{ + "parentMaterial": "./basic.material", + "materialType": "Materials/Types/StandardPBR.materialtype", + "propertyLayoutVersion": 1, + "properties": { + "metallic": { + "factor": 1.0 + }, + "roughness": { + "factor": 0.1 + } + } +} diff --git a/AutomatedTesting/Levels/Graphics/PbrMaterialChart/materials/basic_m10_r02.material b/AutomatedTesting/Levels/Graphics/PbrMaterialChart/materials/basic_m10_r02.material new file mode 100644 index 0000000000..b017add10b --- /dev/null +++ b/AutomatedTesting/Levels/Graphics/PbrMaterialChart/materials/basic_m10_r02.material @@ -0,0 +1,13 @@ +{ + "parentMaterial": "./basic.material", + "materialType": "Materials/Types/StandardPBR.materialtype", + "propertyLayoutVersion": 1, + "properties": { + "metallic": { + "factor": 1.0 + }, + "roughness": { + "factor": 0.2 + } + } +} diff --git a/AutomatedTesting/Levels/Graphics/PbrMaterialChart/materials/basic_m10_r03.material b/AutomatedTesting/Levels/Graphics/PbrMaterialChart/materials/basic_m10_r03.material new file mode 100644 index 0000000000..5353d651c8 --- /dev/null +++ b/AutomatedTesting/Levels/Graphics/PbrMaterialChart/materials/basic_m10_r03.material @@ -0,0 +1,13 @@ +{ + "parentMaterial": "./basic.material", + "materialType": "Materials/Types/StandardPBR.materialtype", + "propertyLayoutVersion": 1, + "properties": { + "metallic": { + "factor": 1.0 + }, + "roughness": { + "factor": 0.3 + } + } +} diff --git a/AutomatedTesting/Levels/Graphics/PbrMaterialChart/materials/basic_m10_r04.material b/AutomatedTesting/Levels/Graphics/PbrMaterialChart/materials/basic_m10_r04.material new file mode 100644 index 0000000000..6dd47e4e3b --- /dev/null +++ b/AutomatedTesting/Levels/Graphics/PbrMaterialChart/materials/basic_m10_r04.material @@ -0,0 +1,13 @@ +{ + "parentMaterial": "./basic.material", + "materialType": "Materials/Types/StandardPBR.materialtype", + "propertyLayoutVersion": 1, + "properties": { + "metallic": { + "factor": 1.0 + }, + "roughness": { + "factor": 0.4 + } + } +} diff --git a/AutomatedTesting/Levels/Graphics/PbrMaterialChart/materials/basic_m10_r05.material b/AutomatedTesting/Levels/Graphics/PbrMaterialChart/materials/basic_m10_r05.material new file mode 100644 index 0000000000..04912cbfd4 --- /dev/null +++ b/AutomatedTesting/Levels/Graphics/PbrMaterialChart/materials/basic_m10_r05.material @@ -0,0 +1,13 @@ +{ + "parentMaterial": "./basic.material", + "materialType": "Materials/Types/StandardPBR.materialtype", + "propertyLayoutVersion": 1, + "properties": { + "metallic": { + "factor": 1.0 + }, + "roughness": { + "factor": 0.5 + } + } +} diff --git a/AutomatedTesting/Levels/Graphics/PbrMaterialChart/materials/basic_m10_r06.material b/AutomatedTesting/Levels/Graphics/PbrMaterialChart/materials/basic_m10_r06.material new file mode 100644 index 0000000000..27f7f6ff42 --- /dev/null +++ b/AutomatedTesting/Levels/Graphics/PbrMaterialChart/materials/basic_m10_r06.material @@ -0,0 +1,13 @@ +{ + "parentMaterial": "./basic.material", + "materialType": "Materials/Types/StandardPBR.materialtype", + "propertyLayoutVersion": 1, + "properties": { + "metallic": { + "factor": 1.0 + }, + "roughness": { + "factor": 0.6 + } + } +} diff --git a/AutomatedTesting/Levels/Graphics/PbrMaterialChart/materials/basic_m10_r07.material b/AutomatedTesting/Levels/Graphics/PbrMaterialChart/materials/basic_m10_r07.material new file mode 100644 index 0000000000..e2b5df681c --- /dev/null +++ b/AutomatedTesting/Levels/Graphics/PbrMaterialChart/materials/basic_m10_r07.material @@ -0,0 +1,13 @@ +{ + "parentMaterial": "./basic.material", + "materialType": "Materials/Types/StandardPBR.materialtype", + "propertyLayoutVersion": 1, + "properties": { + "metallic": { + "factor": 1.0 + }, + "roughness": { + "factor": 0.7 + } + } +} diff --git a/AutomatedTesting/Levels/Graphics/PbrMaterialChart/materials/basic_m10_r08.material b/AutomatedTesting/Levels/Graphics/PbrMaterialChart/materials/basic_m10_r08.material new file mode 100644 index 0000000000..5418f9c855 --- /dev/null +++ b/AutomatedTesting/Levels/Graphics/PbrMaterialChart/materials/basic_m10_r08.material @@ -0,0 +1,13 @@ +{ + "parentMaterial": "./basic.material", + "materialType": "Materials/Types/StandardPBR.materialtype", + "propertyLayoutVersion": 1, + "properties": { + "metallic": { + "factor": 1.0 + }, + "roughness": { + "factor": 0.8 + } + } +} diff --git a/AutomatedTesting/Levels/Graphics/PbrMaterialChart/materials/basic_m10_r09.material b/AutomatedTesting/Levels/Graphics/PbrMaterialChart/materials/basic_m10_r09.material new file mode 100644 index 0000000000..dd1ec3489a --- /dev/null +++ b/AutomatedTesting/Levels/Graphics/PbrMaterialChart/materials/basic_m10_r09.material @@ -0,0 +1,13 @@ +{ + "parentMaterial": "./basic.material", + "materialType": "Materials/Types/StandardPBR.materialtype", + "propertyLayoutVersion": 1, + "properties": { + "metallic": { + "factor": 1.0 + }, + "roughness": { + "factor": 0.9 + } + } +} diff --git a/AutomatedTesting/Levels/Graphics/PbrMaterialChart/materials/basic_m10_r10.material b/AutomatedTesting/Levels/Graphics/PbrMaterialChart/materials/basic_m10_r10.material new file mode 100644 index 0000000000..5f9317d2cc --- /dev/null +++ b/AutomatedTesting/Levels/Graphics/PbrMaterialChart/materials/basic_m10_r10.material @@ -0,0 +1,13 @@ +{ + "parentMaterial": "./basic.material", + "materialType": "Materials/Types/StandardPBR.materialtype", + "propertyLayoutVersion": 1, + "properties": { + "metallic": { + "factor": 1.0 + }, + "roughness": { + "factor": 1.0 + } + } +} diff --git a/AutomatedTesting/Levels/Graphics/PbrMaterialChart/tags.txt b/AutomatedTesting/Levels/Graphics/PbrMaterialChart/tags.txt new file mode 100644 index 0000000000..0d6c1880e7 --- /dev/null +++ b/AutomatedTesting/Levels/Graphics/PbrMaterialChart/tags.txt @@ -0,0 +1,12 @@ +0,0,0,0,0,0 +0,0,0,0,0,0 +0,0,0,0,0,0 +0,0,0,0,0,0 +0,0,0,0,0,0 +0,0,0,0,0,0 +0,0,0,0,0,0 +0,0,0,0,0,0 +0,0,0,0,0,0 +0,0,0,0,0,0 +0,0,0,0,0,0 +0,0,0,0,0,0 diff --git a/AutomatedTesting/Levels/Graphics/ShadowTest/ShadowTest.prefab b/AutomatedTesting/Levels/Graphics/ShadowTest/ShadowTest.prefab new file mode 100644 index 0000000000..86d16328e9 --- /dev/null +++ b/AutomatedTesting/Levels/Graphics/ShadowTest/ShadowTest.prefab @@ -0,0 +1,566 @@ +{ + "ContainerEntity": { + "Id": "ContainerEntity", + "Name": "ShadowTest", + "Components": { + "Component_[10182366347512475253]": { + "$type": "EditorPrefabComponent", + "Id": 10182366347512475253 + }, + "Component_[12917798267488243668]": { + "$type": "EditorPendingCompositionComponent", + "Id": 12917798267488243668 + }, + "Component_[3261249813163778338]": { + "$type": "EditorOnlyEntityComponent", + "Id": 3261249813163778338 + }, + "Component_[3837204912784440039]": { + "$type": "EditorDisabledCompositionComponent", + "Id": 3837204912784440039 + }, + "Component_[4272963378099646759]": { + "$type": "{27F1E1A1-8D9D-4C3B-BD3A-AFB9762449C0} TransformComponent", + "Id": 4272963378099646759, + "Parent Entity": "" + }, + "Component_[4848458548047175816]": { + "$type": "EditorVisibilityComponent", + "Id": 4848458548047175816 + }, + "Component_[5787060997243919943]": { + "$type": "EditorInspectorComponent", + "Id": 5787060997243919943 + }, + "Component_[7804170251266531779]": { + "$type": "EditorLockComponent", + "Id": 7804170251266531779 + }, + "Component_[7874177159288365422]": { + "$type": "EditorEntitySortComponent", + "Id": 7874177159288365422 + }, + "Component_[8018146290632383969]": { + "$type": "EditorEntityIconComponent", + "Id": 8018146290632383969 + }, + "Component_[8452360690590857075]": { + "$type": "SelectionComponent", + "Id": 8452360690590857075 + } + } + }, + "Entities": { + "Entity_[232650527119]": { + "Id": "Entity_[232650527119]", + "Name": "DirectionalLight", + "Components": { + "Component_[10660156197505313227]": { + "$type": "EditorLockComponent", + "Id": 10660156197505313227 + }, + "Component_[14184823757717157844]": { + "$type": "EditorInspectorComponent", + "Id": 14184823757717157844, + "ComponentOrderEntryArray": [ + { + "ComponentId": 9854879901259791898 + }, + { + "ComponentId": 3968519938187714949, + "SortIndex": 1 + } + ] + }, + "Component_[1495573908681275492]": { + "$type": "EditorEntitySortComponent", + "Id": 1495573908681275492 + }, + "Component_[15580233403487968826]": { + "$type": "EditorDisabledCompositionComponent", + "Id": 15580233403487968826 + }, + "Component_[3968519938187714949]": { + "$type": "AZ::Render::EditorDirectionalLightComponent", + "Id": 3968519938187714949, + "Controller": { + "Configuration": { + "Intensity": 0.0, + "CameraEntityId": "", + "ShadowmapSize": "Size2048" + } + } + }, + "Component_[4961040003466069196]": { + "$type": "EditorEntityIconComponent", + "Id": 4961040003466069196 + }, + "Component_[7824884165323036147]": { + "$type": "EditorVisibilityComponent", + "Id": 7824884165323036147 + }, + "Component_[8741866916946672319]": { + "$type": "EditorPendingCompositionComponent", + "Id": 8741866916946672319 + }, + "Component_[9288966876314965560]": { + "$type": "EditorOnlyEntityComponent", + "Id": 9288966876314965560 + }, + "Component_[9313163355156975968]": { + "$type": "SelectionComponent", + "Id": 9313163355156975968 + }, + "Component_[9854879901259791898]": { + "$type": "{27F1E1A1-8D9D-4C3B-BD3A-AFB9762449C0} TransformComponent", + "Id": 9854879901259791898, + "Parent Entity": "ContainerEntity", + "Transform Data": { + "Translate": [ + 0.0, + 0.0, + 2.0 + ], + "Rotate": [ + -32.05662536621094, + -26.103206634521484, + 47.54806137084961 + ] + } + } + } + }, + "Entity_[260824893221]": { + "Id": "Entity_[260824893221]", + "Name": "SpotLight", + "Components": { + "Component_[16098295228434057928]": { + "$type": "EditorDiskShapeComponent", + "Id": 16098295228434057928, + "ShapeColor": [ + 1.0, + 1.0, + 1.0, + 1.0 + ], + "DiskShape": { + "Configuration": { + "Radius": 0.0 + } + } + }, + "Component_[16175995808158769171]": { + "$type": "{27F1E1A1-8D9D-4C3B-BD3A-AFB9762449C0} TransformComponent", + "Id": 16175995808158769171, + "Parent Entity": "ContainerEntity", + "Transform Data": { + "Translate": [ + 0.6417449712753296, + 1.3211734294891357, + 3.022759199142456 + ], + "Rotate": [ + 243.31329345703125, + 0.0, + 0.0 + ] + } + }, + "Component_[17136787899581093377]": { + "$type": "EditorEntitySortComponent", + "Id": 17136787899581093377 + }, + "Component_[17938027566627202610]": { + "$type": "EditorPendingCompositionComponent", + "Id": 17938027566627202610 + }, + "Component_[190081405128299223]": { + "$type": "SelectionComponent", + "Id": 190081405128299223 + }, + "Component_[2181418147135573579]": { + "$type": "EditorEntityIconComponent", + "Id": 2181418147135573579 + }, + "Component_[2564149706319215342]": { + "$type": "EditorOnlyEntityComponent", + "Id": 2564149706319215342 + }, + "Component_[3716169383940064541]": { + "$type": "EditorInspectorComponent", + "Id": 3716169383940064541, + "ComponentOrderEntryArray": [ + { + "ComponentId": 16175995808158769171 + }, + { + "ComponentId": 16665800442781289114, + "SortIndex": 1 + } + ] + }, + "Component_[4143676462074671972]": { + "$type": "AZ::Render::EditorAreaLightComponent", + "Id": 4143676462074671972, + "Controller": { + "Configuration": { + "LightType": 2, + "AttenuationRadius": 31.62277603149414, + "EnableShutters": true, + "InnerShutterAngleDegrees": 22.5, + "OuterShutterAngleDegrees": 27.5, + "Enable Shadow": true, + "Shadowmap Max Size": "Size2048", + "Filtering Sample Count": 32 + } + } + }, + "Component_[6706371214647538019]": { + "$type": "EditorVisibilityComponent", + "Id": 6706371214647538019 + }, + "Component_[7493944209625718550]": { + "$type": "EditorLockComponent", + "Id": 7493944209625718550 + }, + "Component_[7614113482082939165]": { + "$type": "EditorDisabledCompositionComponent", + "Id": 7614113482082939165 + } + } + }, + "Entity_[269117486973]": { + "Id": "Entity_[269117486973]", + "Name": "Floor", + "Components": { + "Component_[10562678944594915756]": { + "$type": "EditorEntitySortComponent", + "Id": 10562678944594915756 + }, + "Component_[1175452962278157526]": { + "$type": "EditorEntityIconComponent", + "Id": 1175452962278157526 + }, + "Component_[13598353801231166887]": { + "$type": "EditorPendingCompositionComponent", + "Id": 13598353801231166887 + }, + "Component_[13735087293504923475]": { + "$type": "SelectionComponent", + "Id": 13735087293504923475 + }, + "Component_[13888244442459268363]": { + "$type": "AZ::Render::EditorMeshComponent", + "Id": 13888244442459268363, + "Controller": { + "Configuration": { + "ModelAsset": { + "assetId": { + "guid": "{E65E9ED3-3E38-5ABA-9E22-95E34DA4C3AE}", + "subId": 280178048 + }, + "assetHint": "objects/plane.azmodel" + }, + "LodOverride": 255 + } + } + }, + "Component_[1525720357937234014]": { + "$type": "EditorMaterialComponent", + "Id": 1525720357937234014, + "materialSlotsByLodEnabled": true + }, + "Component_[16568998871680422442]": { + "$type": "EditorDisabledCompositionComponent", + "Id": 16568998871680422442 + }, + "Component_[2147751093058990131]": { + "$type": "EditorInspectorComponent", + "Id": 2147751093058990131, + "ComponentOrderEntryArray": [ + { + "ComponentId": 3266761149114817871 + }, + { + "ComponentId": 13888244442459268363, + "SortIndex": 1 + }, + { + "ComponentId": 1525720357937234014, + "SortIndex": 2 + } + ] + }, + "Component_[3266761149114817871]": { + "$type": "{27F1E1A1-8D9D-4C3B-BD3A-AFB9762449C0} TransformComponent", + "Id": 3266761149114817871, + "Parent Entity": "ContainerEntity", + "Transform Data": { + "Scale": [ + 100.0, + 100.0, + 100.0 + ], + "UniformScale": 100.0 + } + }, + "Component_[4625895382416898670]": { + "$type": "EditorVisibilityComponent", + "Id": 4625895382416898670 + }, + "Component_[4856699190357614535]": { + "$type": "EditorLockComponent", + "Id": 4856699190357614535 + }, + "Component_[6466465153982575739]": { + "$type": "EditorOnlyEntityComponent", + "Id": 6466465153982575739 + } + } + }, + "Entity_[282757803856]": { + "Id": "Entity_[282757803856]", + "Name": "Cube", + "Components": { + "Component_[11189870094752260272]": { + "$type": "EditorEntitySortComponent", + "Id": 11189870094752260272 + }, + "Component_[11909086967677513257]": { + "$type": "AZ::Render::EditorMeshComponent", + "Id": 11909086967677513257, + "Controller": { + "Configuration": { + "ModelAsset": { + "assetId": { + "guid": "{593006BE-FE73-5A4B-A0A6-06C02EFFE458}", + "subId": 285127096 + }, + "loadBehavior": "PreLoad", + "assetHint": "objects/cube.azmodel" + }, + "LodOverride": 255 + } + } + }, + "Component_[1443341568598731610]": { + "$type": "EditorVisibilityComponent", + "Id": 1443341568598731610 + }, + "Component_[18339772707807258951]": { + "$type": "{27F1E1A1-8D9D-4C3B-BD3A-AFB9762449C0} TransformComponent", + "Id": 18339772707807258951, + "Parent Entity": "ContainerEntity", + "Transform Data": { + "Translate": [ + 0.6083869934082031, + 3.137901782989502, + 0.5876787900924683 + ] + } + }, + "Component_[2447207272572065708]": { + "$type": "EditorEntityIconComponent", + "Id": 2447207272572065708 + }, + "Component_[3281906807632213471]": { + "$type": "SelectionComponent", + "Id": 3281906807632213471 + }, + "Component_[3412442673858204671]": { + "$type": "EditorPendingCompositionComponent", + "Id": 3412442673858204671 + }, + "Component_[5382641380294287889]": { + "$type": "EditorDisabledCompositionComponent", + "Id": 5382641380294287889 + }, + "Component_[7221534636342494619]": { + "$type": "EditorInspectorComponent", + "Id": 7221534636342494619, + "ComponentOrderEntryArray": [ + { + "ComponentId": 18339772707807258951 + }, + { + "ComponentId": 11909086967677513257, + "SortIndex": 1 + } + ] + }, + "Component_[7701217952253676487]": { + "$type": "EditorLockComponent", + "Id": 7701217952253676487 + }, + "Component_[7758436981023123121]": { + "$type": "EditorOnlyEntityComponent", + "Id": 7758436981023123121 + } + } + }, + "Entity_[372196702077]": { + "Id": "Entity_[372196702077]", + "Name": "Bunny", + "Components": { + "Component_[11345914745205508221]": { + "$type": "EditorEntityIconComponent", + "Id": 11345914745205508221 + }, + "Component_[11507863983962969790]": { + "$type": "EditorMaterialComponent", + "Id": 11507863983962969790, + "materialSlotsByLodEnabled": true + }, + "Component_[1342998773562921470]": { + "$type": "EditorPendingCompositionComponent", + "Id": 1342998773562921470 + }, + "Component_[14975835087235718844]": { + "$type": "EditorInspectorComponent", + "Id": 14975835087235718844, + "ComponentOrderEntryArray": [ + { + "ComponentId": 5012565883129470759 + }, + { + "ComponentId": 7975043234993822905, + "SortIndex": 1 + }, + { + "ComponentId": 11507863983962969790, + "SortIndex": 2 + } + ] + }, + "Component_[16460806723667032929]": { + "$type": "EditorOnlyEntityComponent", + "Id": 16460806723667032929 + }, + "Component_[18225690044585951363]": { + "$type": "EditorLockComponent", + "Id": 18225690044585951363 + }, + "Component_[18314752491697618927]": { + "$type": "EditorEntitySortComponent", + "Id": 18314752491697618927 + }, + "Component_[2431610550789583502]": { + "$type": "EditorVisibilityComponent", + "Id": 2431610550789583502 + }, + "Component_[5012565883129470759]": { + "$type": "{27F1E1A1-8D9D-4C3B-BD3A-AFB9762449C0} TransformComponent", + "Id": 5012565883129470759, + "Parent Entity": "ContainerEntity", + "Transform Data": { + "Translate": [ + 0.0, + 0.0, + 0.20401419699192047 + ] + } + }, + "Component_[7975043234993822905]": { + "$type": "AZ::Render::EditorMeshComponent", + "Id": 7975043234993822905, + "Controller": { + "Configuration": { + "ModelAsset": { + "assetId": { + "guid": "{0C6BBB76-4EC2-583A-B8C6-1A4C4FD1FE9D}", + "subId": 283109893 + }, + "assetHint": "objects/bunny.azmodel" + }, + "LodOverride": 255 + } + } + }, + "Component_[8510666363380501112]": { + "$type": "SelectionComponent", + "Id": 8510666363380501112 + }, + "Component_[9639060480533776634]": { + "$type": "EditorDisabledCompositionComponent", + "Id": 9639060480533776634 + } + } + }, + "Entity_[670308843764]": { + "Id": "Entity_[670308843764]", + "Name": "Camera1", + "Components": { + "Component_[12951260100632682169]": { + "$type": "GenericComponentWrapper", + "Id": 12951260100632682169, + "m_template": { + "$type": "FlyCameraInputComponent" + } + }, + "Component_[14180723329646459524]": { + "$type": "EditorPendingCompositionComponent", + "Id": 14180723329646459524 + }, + "Component_[14996469885773917977]": { + "$type": "{27F1E1A1-8D9D-4C3B-BD3A-AFB9762449C0} TransformComponent", + "Id": 14996469885773917977, + "Parent Entity": "ContainerEntity", + "Transform Data": { + "Translate": [ + 4.563776969909668, + 0.7667046785354614, + 3.000542640686035 + ], + "Rotate": [ + -9.740042686462402, + -20.20942497253418, + 63.57760238647461 + ] + } + }, + "Component_[17638492356673689530]": { + "$type": "EditorInspectorComponent", + "Id": 17638492356673689530 + }, + "Component_[2421853983468750254]": { + "$type": "{CA11DA46-29FF-4083-B5F6-E02C3A8C3A3D} EditorCameraComponent", + "Id": 2421853983468750254, + "Controller": { + "Configuration": { + "Field of View": 90.00020599365234, + "EditorEntityId": 666013876468 + } + } + }, + "Component_[2572028619185965684]": { + "$type": "EditorEntityIconComponent", + "Id": 2572028619185965684 + }, + "Component_[2782900516907042776]": { + "$type": "EditorDisabledCompositionComponent", + "Id": 2782900516907042776 + }, + "Component_[2849166119438883669]": { + "$type": "EditorVisibilityComponent", + "Id": 2849166119438883669 + }, + "Component_[4618311795498613781]": { + "$type": "EditorOnlyEntityComponent", + "Id": 4618311795498613781 + }, + "Component_[5402004894214413002]": { + "$type": "EditorEntitySortComponent", + "Id": 5402004894214413002 + }, + "Component_[6111028576371006514]": { + "$type": "SelectionComponent", + "Id": 6111028576371006514 + }, + "Component_[8203141294643544464]": { + "$type": "EditorLockComponent", + "Id": 8203141294643544464 + } + } + } + } +} \ No newline at end of file diff --git a/AutomatedTesting/Levels/Graphics/ShadowTest/tags.txt b/AutomatedTesting/Levels/Graphics/ShadowTest/tags.txt new file mode 100644 index 0000000000..0d6c1880e7 --- /dev/null +++ b/AutomatedTesting/Levels/Graphics/ShadowTest/tags.txt @@ -0,0 +1,12 @@ +0,0,0,0,0,0 +0,0,0,0,0,0 +0,0,0,0,0,0 +0,0,0,0,0,0 +0,0,0,0,0,0 +0,0,0,0,0,0 +0,0,0,0,0,0 +0,0,0,0,0,0 +0,0,0,0,0,0 +0,0,0,0,0,0 +0,0,0,0,0,0 +0,0,0,0,0,0 diff --git a/AutomatedTesting/Levels/Graphics/Sponza/Sponza.prefab b/AutomatedTesting/Levels/Graphics/Sponza/Sponza.prefab new file mode 100644 index 0000000000..d755eb9774 --- /dev/null +++ b/AutomatedTesting/Levels/Graphics/Sponza/Sponza.prefab @@ -0,0 +1,1489 @@ +{ + "ContainerEntity": { + "Id": "Entity_[406217483857]", + "Name": "Level", + "Components": { + "Component_[10588931505759123943]": { + "$type": "EditorVisibilityComponent", + "Id": 10588931505759123943 + }, + "Component_[135321489898029517]": { + "$type": "EditorDisabledCompositionComponent", + "Id": 135321489898029517 + }, + "Component_[14858507413812498857]": { + "$type": "EditorEntityIconComponent", + "Id": 14858507413812498857 + }, + "Component_[15178816766766638692]": { + "$type": "EditorInspectorComponent", + "Id": 15178816766766638692 + }, + "Component_[17951702430591084334]": { + "$type": "EditorPendingCompositionComponent", + "Id": 17951702430591084334 + }, + "Component_[2563280132145207190]": { + "$type": "EditorLockComponent", + "Id": 2563280132145207190 + }, + "Component_[2822556265044965634]": { + "$type": "EditorOnlyEntityComponent", + "Id": 2822556265044965634 + }, + "Component_[446057404408737487]": { + "$type": "EditorPrefabComponent", + "Id": 446057404408737487 + }, + "Component_[5683088399314452447]": { + "$type": "SelectionComponent", + "Id": 5683088399314452447 + }, + "Component_[5801776107759571453]": { + "$type": "{27F1E1A1-8D9D-4C3B-BD3A-AFB9762449C0} TransformComponent", + "Id": 5801776107759571453, + "Parent Entity": "" + }, + "Component_[9426929613394548724]": { + "$type": "EditorEntitySortComponent", + "Id": 9426929613394548724, + "ChildEntityOrderEntryArray": [ + { + "EntityId": "Entity_[1081216208506]" + }, + { + "EntityId": "Entity_[935187320442]", + "SortIndex": 1 + }, + { + "EntityId": "Entity_[935187320442]", + "SortIndex": 2 + }, + { + "EntityId": "Entity_[935187320442]", + "SortIndex": 3 + }, + { + "EntityId": "Entity_[935187320442]", + "SortIndex": 4 + }, + { + "EntityId": "Entity_[935187320442]", + "SortIndex": 5 + } + ] + } + } + }, + "Entities": { + "Entity_[1081216208506]": { + "Id": "Entity_[1081216208506]", + "Name": "LIGHTING", + "Components": { + "Component_[10807484710436476353]": { + "$type": "EditorInspectorComponent", + "Id": 10807484710436476353 + }, + "Component_[12535994014200063229]": { + "$type": "EditorVisibilityComponent", + "Id": 12535994014200063229 + }, + "Component_[12567916482013107382]": { + "$type": "SelectionComponent", + "Id": 12567916482013107382 + }, + "Component_[15060801524064219165]": { + "$type": "EditorOnlyEntityComponent", + "Id": 15060801524064219165 + }, + "Component_[1597296709936823974]": { + "$type": "EditorEntityIconComponent", + "Id": 1597296709936823974 + }, + "Component_[17535943354307721937]": { + "$type": "EditorDisabledCompositionComponent", + "Id": 17535943354307721937 + }, + "Component_[3144604952797148227]": { + "$type": "{27F1E1A1-8D9D-4C3B-BD3A-AFB9762449C0} TransformComponent", + "Id": 3144604952797148227, + "Parent Entity": "Entity_[406217483857]", + "Transform Data": { + "Translate": [ + -0.7899999022483826, + -10.387897491455078, + 8.160000801086426 + ] + } + }, + "Component_[3567054724563794528]": { + "$type": "EditorPendingCompositionComponent", + "Id": 3567054724563794528 + }, + "Component_[8097342669405778862]": { + "$type": "EditorEntitySortComponent", + "Id": 8097342669405778862, + "ChildEntityOrderEntryArray": [ + { + "EntityId": "Entity_[1613792153210]" + }, + { + "EntityId": "Entity_[1119870914170]", + "SortIndex": 1 + }, + { + "EntityId": "Entity_[1115575946874]", + "SortIndex": 2 + }, + { + "EntityId": "Entity_[1111280979578]", + "SortIndex": 3 + }, + { + "EntityId": "Entity_[1085511175802]", + "SortIndex": 4 + }, + { + "EntityId": "Entity_[1102691044986]", + "SortIndex": 5 + }, + { + "EntityId": "Entity_[1098396077690]", + "SortIndex": 6 + }, + { + "EntityId": "Entity_[1094101110394]", + "SortIndex": 7 + }, + { + "EntityId": "Entity_[1085511175802]", + "SortIndex": 8 + }, + { + "EntityId": "Entity_[1106986012282]", + "SortIndex": 8 + }, + { + "EntityId": "Entity_[1085511175802]", + "SortIndex": 7 + }, + { + "EntityId": "Entity_[1089806143098]", + "SortIndex": 6 + }, + { + "EntityId": "Entity_[1085511175802]", + "SortIndex": 5 + }, + { + "EntityId": "Entity_[1085511175802]", + "SortIndex": 4 + }, + { + "EntityId": "Entity_[1085511175802]", + "SortIndex": 3 + }, + { + "EntityId": "Entity_[1085511175802]", + "SortIndex": 2 + }, + { + "EntityId": "Entity_[1085511175802]", + "SortIndex": 1 + }, + { + "EntityId": "Entity_[1085511175802]", + "SortIndex": 17 + } + ] + }, + "Component_[9064866490989218404]": { + "$type": "EditorLockComponent", + "Id": 9064866490989218404 + } + } + }, + "Entity_[1085511175802]": { + "Id": "Entity_[1085511175802]", + "Name": "ReflectionProbe_UpperLevel", + "Components": { + "Component_[1038637709631818218]": { + "$type": "EditorEntitySortComponent", + "Id": 1038637709631818218 + }, + "Component_[13993242205578133374]": { + "$type": "EditorOnlyEntityComponent", + "Id": 13993242205578133374 + }, + "Component_[14164886745537962894]": { + "$type": "EditorPendingCompositionComponent", + "Id": 14164886745537962894 + }, + "Component_[15336954334699691810]": { + "$type": "EditorDisabledCompositionComponent", + "Id": 15336954334699691810 + }, + "Component_[17468041844277100837]": { + "$type": "EditorVisibilityComponent", + "Id": 17468041844277100837 + }, + "Component_[18107599364473376156]": { + "$type": "AZ::Render::EditorReflectionProbeComponent", + "Id": 18107599364473376156, + "Controller": { + "Configuration": { + "OuterHeight": 3.0, + "OuterLength": 3.0, + "OuterWidth": 1.0, + "InnerHeight": 2.75, + "InnerLength": 2.75, + "InnerWidth": 0.75, + "BakedCubemapQualityLevel": 3, + "BakedCubeMapRelativePath": "ReflectionProbes/ReflectionProbe_UpperLevel__4DABA7BF-9367-4D95-AA5F-A9BF6BA0F7BE__iblspecularcm512.dds", + "BakedCubeMapAsset": { + "assetId": { + "guid": "{7854FC84-FDCE-5C02-AC9C-DBD6894F52F4}", + "subId": 2000 + }, + "assetHint": "reflectionprobes/reflectionprobe_upperlevel__4daba7bf-9367-4d95-aa5f-a9bf6ba0f7be__iblspecularcm512.dds.streamingimage" + }, + "EntityId": 14568425243222190542, + "ShowVisualization": false + } + }, + "bakedCubeMapQualityLevel": 3, + "bakedCubeMapRelativePath": "ReflectionProbes/ReflectionProbe_UpperLevel__4DABA7BF-9367-4D95-AA5F-A9BF6BA0F7BE__iblspecularcm512.dds" + }, + "Component_[320343109587065620]": { + "$type": "EditorInspectorComponent", + "Id": 320343109587065620 + }, + "Component_[3267511667303906499]": { + "$type": "{27F1E1A1-8D9D-4C3B-BD3A-AFB9762449C0} TransformComponent", + "Id": 3267511667303906499, + "Parent Entity": "Entity_[1081216208506]", + "Transform Data": { + "Translate": [ + -13.363113403320313, + 10.723356246948242, + -1.8831419944763184 + ] + } + }, + "Component_[4634887848675078464]": { + "$type": "EditorLockComponent", + "Id": 4634887848675078464 + }, + "Component_[4783209159709094238]": { + "$type": "SelectionComponent", + "Id": 4783209159709094238 + }, + "Component_[728315922784530894]": { + "$type": "EditorEntityIconComponent", + "Id": 728315922784530894 + }, + "Component_[8999082608038997636]": { + "$type": "EditorAxisAlignedBoxShapeComponent", + "Id": 8999082608038997636, + "DisplayFilled": false, + "AxisAlignedBoxShape": { + "Configuration": { + "IsFilled": false, + "Dimensions": [ + 1.0, + 3.0, + 3.0 + ] + } + } + } + } + }, + "Entity_[1089806143098]": { + "Id": "Entity_[1089806143098]", + "Name": "ReflectionProbe_Lion", + "Components": { + "Component_[14298922893146648725]": { + "$type": "EditorAxisAlignedBoxShapeComponent", + "Id": 14298922893146648725, + "Visible": false, + "DisplayFilled": false, + "AxisAlignedBoxShape": { + "Configuration": { + "IsFilled": false, + "Dimensions": [ + 3.0, + 4.0, + 4.0 + ] + } + } + }, + "Component_[1455674266703651422]": { + "$type": "EditorEntitySortComponent", + "Id": 1455674266703651422 + }, + "Component_[14636684755738306181]": { + "$type": "AZ::Render::EditorReflectionProbeComponent", + "Id": 14636684755738306181, + "Controller": { + "Configuration": { + "OuterHeight": 4.0, + "OuterLength": 4.0, + "OuterWidth": 3.0, + "InnerHeight": 3.0, + "InnerLength": 3.0, + "InnerWidth": 2.0, + "BakedCubemapQualityLevel": 3, + "BakedCubeMapRelativePath": "ReflectionProbes/ReflectionProbe_Lion__CA20BB89-1587-4410-80BA-8150CB0EF47B__iblspecularcm512.dds", + "BakedCubeMapAsset": { + "assetId": { + "guid": "{AC2EF073-63B8-53C2-8178-9B80D2D7E56D}", + "subId": 2000 + }, + "assetHint": "reflectionprobes/reflectionprobe_lion__ca20bb89-1587-4410-80ba-8150cb0ef47b__iblspecularcm512.dds.streamingimage" + }, + "EntityId": 15188201575897363858, + "ShowVisualization": false + } + }, + "bakedCubeMapQualityLevel": 3, + "bakedCubeMapRelativePath": "ReflectionProbes/ReflectionProbe_Lion__CA20BB89-1587-4410-80BA-8150CB0EF47B__iblspecularcm512.dds" + }, + "Component_[1558055592965824024]": { + "$type": "EditorInspectorComponent", + "Id": 1558055592965824024 + }, + "Component_[161549568296074325]": { + "$type": "EditorOnlyEntityComponent", + "Id": 161549568296074325 + }, + "Component_[16573539057585083382]": { + "$type": "EditorDisabledCompositionComponent", + "Id": 16573539057585083382 + }, + "Component_[17523994278098812420]": { + "$type": "{27F1E1A1-8D9D-4C3B-BD3A-AFB9762449C0} TransformComponent", + "Id": 17523994278098812420, + "Parent Entity": "Entity_[1081216208506]", + "Transform Data": { + "Translate": [ + -13.342336654663086, + 10.449432373046875, + -6.156347274780273 + ] + } + }, + "Component_[1895148655574754151]": { + "$type": "EditorVisibilityComponent", + "Id": 1895148655574754151 + }, + "Component_[2659020665645761255]": { + "$type": "EditorPendingCompositionComponent", + "Id": 2659020665645761255 + }, + "Component_[3707403743603935171]": { + "$type": "EditorLockComponent", + "Id": 3707403743603935171 + }, + "Component_[5008186835003860730]": { + "$type": "EditorEntityIconComponent", + "Id": 5008186835003860730 + }, + "Component_[7632822173429043662]": { + "$type": "SelectionComponent", + "Id": 7632822173429043662 + } + } + }, + "Entity_[1094101110394]": { + "Id": "Entity_[1094101110394]", + "Name": "ReflectionProbe_Scene", + "Components": { + "Component_[1084328120591698803]": { + "$type": "{27F1E1A1-8D9D-4C3B-BD3A-AFB9762449C0} TransformComponent", + "Id": 1084328120591698803, + "Parent Entity": "Entity_[1081216208506]", + "Transform Data": { + "Translate": [ + 0.0, + 10.77357292175293, + -2.114013671875 + ] + } + }, + "Component_[11927919033815991882]": { + "$type": "EditorOnlyEntityComponent", + "Id": 11927919033815991882 + }, + "Component_[12922039245522655341]": { + "$type": "EditorPendingCompositionComponent", + "Id": 12922039245522655341 + }, + "Component_[13830787916768787880]": { + "$type": "EditorEntityIconComponent", + "Id": 13830787916768787880 + }, + "Component_[13864356435863998063]": { + "$type": "EditorEntitySortComponent", + "Id": 13864356435863998063 + }, + "Component_[14618987283145709626]": { + "$type": "EditorLockComponent", + "Id": 14618987283145709626 + }, + "Component_[14690766657349179909]": { + "$type": "AZ::Render::EditorReflectionProbeComponent", + "Id": 14690766657349179909, + "Controller": { + "Configuration": { + "OuterHeight": 17.0, + "OuterLength": 25.0, + "OuterWidth": 35.0, + "BakedCubeMapRelativePath": "ReflectionProbes/ReflectionProbe_Scene__D245F488-152E-4A3A-898B-FBCF71E4A87A__iblspecularcm256.dds", + "BakedCubeMapAsset": { + "assetId": { + "guid": "{E94B628B-9E61-5DD4-8AFD-200DD7540CAD}", + "subId": 2000 + }, + "assetHint": "reflectionprobes/reflectionprobe_scene__d245f488-152e-4a3a-898b-fbcf71e4a87a__iblspecularcm256.dds.streamingimage" + }, + "EntityId": 18057698412353009297, + "ShowVisualization": false + } + }, + "bakedCubeMapRelativePath": "ReflectionProbes/ReflectionProbe_Scene__D245F488-152E-4A3A-898B-FBCF71E4A87A__iblspecularcm256.dds" + }, + "Component_[16801122362190390827]": { + "$type": "EditorVisibilityComponent", + "Id": 16801122362190390827 + }, + "Component_[1897972008443666285]": { + "$type": "SelectionComponent", + "Id": 1897972008443666285 + }, + "Component_[2961811751273549376]": { + "$type": "EditorBoxShapeComponent", + "Id": 2961811751273549376, + "DisplayFilled": false, + "BoxShape": { + "Configuration": { + "IsFilled": false, + "Dimensions": [ + 35.0, + 25.0, + 17.0 + ] + } + } + }, + "Component_[879709407962202982]": { + "$type": "EditorDisabledCompositionComponent", + "Id": 879709407962202982 + }, + "Component_[9324834207126061548]": { + "$type": "EditorInspectorComponent", + "Id": 9324834207126061548 + } + } + }, + "Entity_[1098396077690]": { + "Id": "Entity_[1098396077690]", + "Name": "PointLight_02", + "Components": { + "Component_[10534705633537717631]": { + "$type": "EditorEntityIconComponent", + "Id": 10534705633537717631 + }, + "Component_[10552323305936140565]": { + "$type": "EditorInspectorComponent", + "Id": 10552323305936140565 + }, + "Component_[13058374277331580766]": { + "$type": "SelectionComponent", + "Id": 13058374277331580766 + }, + "Component_[14949512479506290054]": { + "$type": "EditorPendingCompositionComponent", + "Id": 14949512479506290054 + }, + "Component_[1548752089356963562]": { + "$type": "AZ::Render::EditorAreaLightComponent", + "Id": 1548752089356963562, + "Controller": { + "Configuration": { + "LightType": 1, + "IntensityMode": 4, + "Intensity": 15.359000205993652, + "AttenuationRadius": 72.0053482055664, + "Enable Shadow": true + } + } + }, + "Component_[15792288291507192351]": { + "$type": "EditorLockComponent", + "Id": 15792288291507192351 + }, + "Component_[17205110032543434616]": { + "$type": "EditorOnlyEntityComponent", + "Id": 17205110032543434616 + }, + "Component_[2030794600614672812]": { + "$type": "EditorVisibilityComponent", + "Id": 2030794600614672812 + }, + "Component_[2978368743586258871]": { + "$type": "EditorEntitySortComponent", + "Id": 2978368743586258871 + }, + "Component_[4291094216513321822]": { + "$type": "{27F1E1A1-8D9D-4C3B-BD3A-AFB9762449C0} TransformComponent", + "Id": 4291094216513321822, + "Parent Entity": "Entity_[1081216208506]", + "Transform Data": { + "Translate": [ + 2.581982135772705, + 10.840080261230469, + -0.9913702011108398 + ] + } + }, + "Component_[4611947863173505]": { + "$type": "EditorSphereShapeComponent", + "Id": 4611947863173505, + "ShapeColor": [ + 1.0, + 1.0, + 1.0, + 1.0 + ], + "SphereShape": { + "Configuration": { + "Radius": 0.05000000074505806 + } + } + }, + "Component_[7416869202661318055]": { + "$type": "EditorDisabledCompositionComponent", + "Id": 7416869202661318055 + } + } + }, + "Entity_[1102691044986]": { + "Id": "Entity_[1102691044986]", + "Name": "PointLight_01", + "Components": { + "Component_[11365983295692083092]": { + "$type": "EditorPendingCompositionComponent", + "Id": 11365983295692083092 + }, + "Component_[11475917125854123708]": { + "$type": "EditorEntitySortComponent", + "Id": 11475917125854123708 + }, + "Component_[14430205535050778968]": { + "$type": "EditorOnlyEntityComponent", + "Id": 14430205535050778968 + }, + "Component_[1466324423527856074]": { + "$type": "EditorEntityIconComponent", + "Id": 1466324423527856074 + }, + "Component_[15554484541906022976]": { + "$type": "EditorVisibilityComponent", + "Id": 15554484541906022976 + }, + "Component_[15619369680404016454]": { + "$type": "EditorLockComponent", + "Id": 15619369680404016454 + }, + "Component_[2289960019728880406]": { + "$type": "EditorDisabledCompositionComponent", + "Id": 2289960019728880406 + }, + "Component_[2537457439377723385]": { + "$type": "SelectionComponent", + "Id": 2537457439377723385 + }, + "Component_[3297556825839117286]": { + "$type": "EditorSphereShapeComponent", + "Id": 3297556825839117286, + "ShapeColor": [ + 1.0, + 1.0, + 1.0, + 1.0 + ], + "SphereShape": { + "Configuration": { + "Radius": 0.05000000074505806 + } + } + }, + "Component_[6893246775558579859]": { + "$type": "EditorInspectorComponent", + "Id": 6893246775558579859 + }, + "Component_[776705866357873394]": { + "$type": "AZ::Render::EditorAreaLightComponent", + "Id": 776705866357873394, + "Controller": { + "Configuration": { + "LightType": 1, + "IntensityMode": 4, + "Intensity": 15.84000015258789, + "AttenuationRadius": 85.0672607421875 + } + } + }, + "Component_[9324553387194905409]": { + "$type": "{27F1E1A1-8D9D-4C3B-BD3A-AFB9762449C0} TransformComponent", + "Id": 9324553387194905409, + "Parent Entity": "Entity_[1081216208506]", + "Transform Data": { + "Translate": [ + -2.2817187309265137, + 10.581533432006836, + 7.5597944259643555 + ] + } + } + } + }, + "Entity_[1106986012282]": { + "Id": "Entity_[1106986012282]", + "Name": "EnvironmentLight", + "Components": { + "Component_[10422300770865106323]": { + "$type": "EditorVisibilityComponent", + "Id": 10422300770865106323 + }, + "Component_[15319816472229733542]": { + "$type": "EditorPendingCompositionComponent", + "Id": 15319816472229733542 + }, + "Component_[16299889256965403184]": { + "$type": "{27F1E1A1-8D9D-4C3B-BD3A-AFB9762449C0} TransformComponent", + "Id": 16299889256965403184, + "Parent Entity": "Entity_[1081216208506]" + }, + "Component_[16493827350222098538]": { + "$type": "AZ::Render::EditorHDRiSkyboxComponent", + "Id": 16493827350222098538, + "Controller": { + "Configuration": { + "CubemapAsset": { + "assetId": { + "guid": "{B78C84E9-45BE-5A50-8898-177B33B8DA84}", + "subId": 2000 + }, + "assetHint": "envhdri/photo_studio_01_4k_iblskyboxcm_iblspecular.exr.streamingimage" + } + } + } + }, + "Component_[16719262120090148450]": { + "$type": "EditorEntityIconComponent", + "Id": 16719262120090148450 + }, + "Component_[16793670898160667741]": { + "$type": "EditorInspectorComponent", + "Id": 16793670898160667741 + }, + "Component_[18257477315946306250]": { + "$type": "AZ::Render::EditorImageBasedLightComponent", + "Id": 18257477315946306250, + "Controller": { + "Configuration": { + "diffuseImageAsset": { + "assetId": { + "guid": "{B78C84E9-45BE-5A50-8898-177B33B8DA84}", + "subId": 3000 + }, + "assetHint": "envhdri/photo_studio_01_4k_iblskyboxcm_ibldiffuse.exr.streamingimage" + }, + "specularImageAsset": { + "assetId": { + "guid": "{B78C84E9-45BE-5A50-8898-177B33B8DA84}", + "subId": 2000 + }, + "assetHint": "envhdri/photo_studio_01_4k_iblskyboxcm_iblspecular.exr.streamingimage" + } + } + } + }, + "Component_[4042063241506989985]": { + "$type": "EditorDisabledCompositionComponent", + "Id": 4042063241506989985 + }, + "Component_[4043099982625130775]": { + "$type": "EditorOnlyEntityComponent", + "Id": 4043099982625130775 + }, + "Component_[5787212845085960464]": { + "$type": "SelectionComponent", + "Id": 5787212845085960464 + }, + "Component_[7736270313311953442]": { + "$type": "EditorLockComponent", + "Id": 7736270313311953442 + }, + "Component_[9830936955971178632]": { + "$type": "EditorEntitySortComponent", + "Id": 9830936955971178632 + } + } + }, + "Entity_[1111280979578]": { + "Id": "Entity_[1111280979578]", + "Name": "DirectionalLight_01", + "Components": { + "Component_[10555827406016705179]": { + "$type": "AZ::Render::EditorDirectionalLightComponent", + "Id": 10555827406016705179, + "Controller": { + "Configuration": { + "Intensity": 2.700000047683716, + "CameraEntityId": "", + "ShadowmapSize": "Size2048", + "ShadowFilterMethod": 3 + } + } + }, + "Component_[10958643723292926203]": { + "$type": "EditorEntitySortComponent", + "Id": 10958643723292926203 + }, + "Component_[11446130315244380400]": { + "$type": "EditorInspectorComponent", + "Id": 11446130315244380400 + }, + "Component_[13236945310915796893]": { + "$type": "EditorVisibilityComponent", + "Id": 13236945310915796893 + }, + "Component_[1489806191674568397]": { + "$type": "EditorPendingCompositionComponent", + "Id": 1489806191674568397 + }, + "Component_[5250190904313425540]": { + "$type": "EditorOnlyEntityComponent", + "Id": 5250190904313425540 + }, + "Component_[6777228833367576785]": { + "$type": "EditorEntityIconComponent", + "Id": 6777228833367576785 + }, + "Component_[7346763132239097919]": { + "$type": "SelectionComponent", + "Id": 7346763132239097919 + }, + "Component_[7453645446520457790]": { + "$type": "{27F1E1A1-8D9D-4C3B-BD3A-AFB9762449C0} TransformComponent", + "Id": 7453645446520457790, + "Parent Entity": "Entity_[1081216208506]", + "Transform Data": { + "Translate": [ + 2.5331368446350098, + 10.560922622680664, + -5.415566921234131 + ], + "Rotate": [ + -103.25949096679688, + -1.1917028427124023, + 9.752097129821777 + ] + } + }, + "Component_[7712714857312986803]": { + "$type": "EditorDisabledCompositionComponent", + "Id": 7712714857312986803 + }, + "Component_[9180065208679807523]": { + "$type": "EditorLockComponent", + "Id": 9180065208679807523 + } + } + }, + "Entity_[1115575946874]": { + "Id": "Entity_[1115575946874]", + "Name": "DiffuseGI_02", + "Components": { + "Component_[10817704949085277229]": { + "$type": "EditorLockComponent", + "Id": 10817704949085277229 + }, + "Component_[11636460237576493708]": { + "$type": "EditorEntityIconComponent", + "Id": 11636460237576493708 + }, + "Component_[16774608348754201693]": { + "$type": "EditorEntitySortComponent", + "Id": 16774608348754201693 + }, + "Component_[17994425379406278407]": { + "$type": "{27F1E1A1-8D9D-4C3B-BD3A-AFB9762449C0} TransformComponent", + "Id": 17994425379406278407, + "Parent Entity": "Entity_[1081216208506]", + "Transform Data": { + "Translate": [ + 8.965616226196289, + 10.854515075683594, + -1.710240364074707 + ] + } + }, + "Component_[3002179259651230640]": { + "$type": "AZ::Render::EditorDiffuseProbeGridComponent", + "Id": 3002179259651230640, + "Controller": { + "Configuration": { + "Extents": [ + 21.0, + 23.0, + 16.0 + ], + "BakedIrradianceTextureRelativePath": "DiffuseProbeGrids/DiffuseGI_02_A78EEAF4-7CB2-4635-AA6F-2ED677328706_Irradiance_lutrgba16.dds", + "BakedDistanceTextureRelativePath": "DiffuseProbeGrids/DiffuseGI_02_84D0F8A4-AD4F-4FD1-BA26-4803EAD88FE2_Distance_lutrg32f.dds", + "BakedRelocationTextureRelativePath": "DiffuseProbeGrids/DiffuseGI_02_9DC8C208-5327-4F0F-B1DF-C98F7F81F07D_Relocation_lutrgba16f.dds", + "BakedClassificationTextureRelativePath": "DiffuseProbeGrids/DiffuseGI_02_222F1F65-BF31-4E0D-9957-14AE73194A37_Classification_lutr32f.dds", + "BakedIrradianceTextureAsset": { + "assetId": { + "guid": "{5B66D8B5-E4AE-5571-A551-1D21333519A0}", + "subId": 1000 + }, + "assetHint": "diffuseprobegrids/diffusegi_02_a78eeaf4-7cb2-4635-aa6f-2ed677328706_irradiance_lutrgba16.dds.streamingimage" + }, + "BakedDistanceTextureAsset": { + "assetId": { + "guid": "{B75364AF-D0AC-5E8C-A3B0-EBAFB063D6C3}", + "subId": 1000 + }, + "assetHint": "diffuseprobegrids/diffusegi_02_84d0f8a4-ad4f-4fd1-ba26-4803ead88fe2_distance_lutrg32f.dds.streamingimage" + }, + "BakedRelocationTextureAsset": { + "assetId": { + "guid": "{CB803781-B18A-51CE-AF8C-DF24FC48160B}", + "subId": 1000 + }, + "assetHint": "diffuseprobegrids/diffusegi_02_9dc8c208-5327-4f0f-b1df-c98f7f81f07d_relocation_lutrgba16f.dds.streamingimage" + }, + "BakedClassificationTextureAsset": { + "assetId": { + "guid": "{D4B4F7E6-3B39-58BE-B8E9-7D057EF9A1F9}", + "subId": 1000 + }, + "assetHint": "diffuseprobegrids/diffusegi_02_222f1f65-bf31-4e0d-9957-14ae73194a37_classification_lutr32f.dds.streamingimage" + } + } + } + }, + "Component_[4937167128415130244]": { + "$type": "EditorVisibilityComponent", + "Id": 4937167128415130244 + }, + "Component_[544440683292345740]": { + "$type": "EditorAxisAlignedBoxShapeComponent", + "Id": 544440683292345740, + "DisplayFilled": false, + "AxisAlignedBoxShape": { + "Configuration": { + "IsFilled": false, + "Dimensions": [ + 21.0, + 23.0, + 16.0 + ] + } + } + }, + "Component_[578950453122763358]": { + "$type": "EditorInspectorComponent", + "Id": 578950453122763358 + }, + "Component_[6950664630097923667]": { + "$type": "EditorOnlyEntityComponent", + "Id": 6950664630097923667 + }, + "Component_[7122880078686807527]": { + "$type": "SelectionComponent", + "Id": 7122880078686807527 + }, + "Component_[800320972776069167]": { + "$type": "EditorDisabledCompositionComponent", + "Id": 800320972776069167 + }, + "Component_[8383621918310482787]": { + "$type": "EditorPendingCompositionComponent", + "Id": 8383621918310482787 + } + } + }, + "Entity_[1119870914170]": { + "Id": "Entity_[1119870914170]", + "Name": "DiffuseGI_01", + "Components": { + "Component_[12209861770686976090]": { + "$type": "EditorEntityIconComponent", + "Id": 12209861770686976090 + }, + "Component_[15353835329112294192]": { + "$type": "AZ::Render::EditorDiffuseProbeGridComponent", + "Id": 15353835329112294192, + "Controller": { + "Configuration": { + "Extents": [ + 21.0, + 23.0, + 16.0 + ], + "BakedIrradianceTextureRelativePath": "DiffuseProbeGrids/DiffuseGI_01_1B66C428-1D7C-4A53-BC9B-6F23E420FEC0_Irradiance_lutrgba16.dds", + "BakedDistanceTextureRelativePath": "DiffuseProbeGrids/DiffuseGI_01_5A2C9A6B-F914-4D9E-8098-2AD411B69F87_Distance_lutrg32f.dds", + "BakedRelocationTextureRelativePath": "DiffuseProbeGrids/DiffuseGI_01_52D75B1C-90BE-40A8-A874-3376F6B39299_Relocation_lutrgba16f.dds", + "BakedClassificationTextureRelativePath": "DiffuseProbeGrids/DiffuseGI_01_A483018F-78ED-4814-986F-F925B0AA5EF8_Classification_lutr32f.dds", + "BakedIrradianceTextureAsset": { + "assetId": { + "guid": "{458A2A6C-6DEA-5D69-99B5-49A4F227C0A8}", + "subId": 1000 + }, + "assetHint": "diffuseprobegrids/diffusegi_01_1b66c428-1d7c-4a53-bc9b-6f23e420fec0_irradiance_lutrgba16.dds.streamingimage" + }, + "BakedDistanceTextureAsset": { + "assetId": { + "guid": "{9CB9A440-9BB1-56CA-B988-35FCF667F993}", + "subId": 1000 + }, + "assetHint": "diffuseprobegrids/diffusegi_01_5a2c9a6b-f914-4d9e-8098-2ad411b69f87_distance_lutrg32f.dds.streamingimage" + }, + "BakedRelocationTextureAsset": { + "assetId": { + "guid": "{DD6EB8D0-B68D-5AB8-B781-8E702F57C07D}", + "subId": 1000 + }, + "assetHint": "diffuseprobegrids/diffusegi_01_52d75b1c-90be-40a8-a874-3376f6b39299_relocation_lutrgba16f.dds.streamingimage" + }, + "BakedClassificationTextureAsset": { + "assetId": { + "guid": "{17D2178C-D102-5B11-B54C-A5EB233B570F}", + "subId": 1000 + }, + "assetHint": "diffuseprobegrids/diffusegi_01_a483018f-78ed-4814-986f-f925b0aa5ef8_classification_lutr32f.dds.streamingimage" + } + } + } + }, + "Component_[15878232015065363455]": { + "$type": "EditorAxisAlignedBoxShapeComponent", + "Id": 15878232015065363455, + "DisplayFilled": false, + "AxisAlignedBoxShape": { + "Configuration": { + "IsFilled": false, + "Dimensions": [ + 21.0, + 23.0, + 16.0 + ] + } + } + }, + "Component_[17684272660747914090]": { + "$type": "EditorVisibilityComponent", + "Id": 17684272660747914090 + }, + "Component_[6724702399933727508]": { + "$type": "{27F1E1A1-8D9D-4C3B-BD3A-AFB9762449C0} TransformComponent", + "Id": 6724702399933727508, + "Parent Entity": "Entity_[1081216208506]", + "Transform Data": { + "Translate": [ + -9.077760696411133, + 10.860031127929688, + -1.7297496795654297 + ] + } + }, + "Component_[6821316397695137380]": { + "$type": "EditorInspectorComponent", + "Id": 6821316397695137380 + }, + "Component_[7220674190610508127]": { + "$type": "SelectionComponent", + "Id": 7220674190610508127 + }, + "Component_[7255528083818713568]": { + "$type": "EditorPendingCompositionComponent", + "Id": 7255528083818713568 + }, + "Component_[7481484881559898788]": { + "$type": "EditorOnlyEntityComponent", + "Id": 7481484881559898788 + }, + "Component_[7524464908826669595]": { + "$type": "EditorLockComponent", + "Id": 7524464908826669595 + }, + "Component_[8325378114504743847]": { + "$type": "EditorEntitySortComponent", + "Id": 8325378114504743847 + }, + "Component_[997706187713882733]": { + "$type": "EditorDisabledCompositionComponent", + "Id": 997706187713882733 + } + } + }, + "Entity_[1613792153210]": { + "Id": "Entity_[1613792153210]", + "Name": "Bloom", + "Components": { + "Component_[10907847005341580620]": { + "$type": "EditorEntitySortComponent", + "Id": 10907847005341580620 + }, + "Component_[12758150889799563454]": { + "$type": "SelectionComponent", + "Id": 12758150889799563454 + }, + "Component_[13247037123089245326]": { + "$type": "EditorDisabledCompositionComponent", + "Id": 13247037123089245326 + }, + "Component_[14642483781584474817]": { + "$type": "EditorLockComponent", + "Id": 14642483781584474817 + }, + "Component_[17298230148657754532]": { + "$type": "AZ::Render::EditorBloomComponent", + "Id": 17298230148657754532, + "Controller": { + "Configuration": { + "Enabled": true, + "Intensity": 0.20000000298023224 + } + } + }, + "Component_[18357464390083641697]": { + "$type": "EditorEntityIconComponent", + "Id": 18357464390083641697 + }, + "Component_[2912267744881101414]": { + "$type": "EditorPendingCompositionComponent", + "Id": 2912267744881101414 + }, + "Component_[3110194465577429301]": { + "$type": "EditorInspectorComponent", + "Id": 3110194465577429301 + }, + "Component_[5583330531036127211]": { + "$type": "EditorVisibilityComponent", + "Id": 5583330531036127211 + }, + "Component_[6528482372370936011]": { + "$type": "EditorOnlyEntityComponent", + "Id": 6528482372370936011 + }, + "Component_[6944819497695081730]": { + "$type": "AZ::Render::EditorPostFxLayerComponent", + "Id": 6944819497695081730 + }, + "Component_[8401224278912231908]": { + "$type": "{27F1E1A1-8D9D-4C3B-BD3A-AFB9762449C0} TransformComponent", + "Id": 8401224278912231908, + "Parent Entity": "Entity_[1081216208506]", + "Transform Data": { + "Translate": [ + -9.137216567993164, + 8.613965034484863, + -6.547377586364746 + ] + } + } + } + }, + "Entity_[935187320442]": { + "Id": "Entity_[935187320442]", + "Name": "GEO_Sponza", + "Components": { + "Component_[10397152383962473889]": { + "$type": "EditorEntityIconComponent", + "Id": 10397152383962473889 + }, + "Component_[10403905564538530551]": { + "$type": "EditorEntitySortComponent", + "Id": 10403905564538530551 + }, + "Component_[1212647033037288333]": { + "$type": "SelectionComponent", + "Id": 1212647033037288333 + }, + "Component_[13446466918421510411]": { + "$type": "EditorPendingCompositionComponent", + "Id": 13446466918421510411 + }, + "Component_[14976154143417033372]": { + "$type": "EditorMaterialComponent", + "Id": 14976154143417033372, + "Controller": { + "Configuration": { + "materials": [ + { + "Key": { + "materialSlotStableId": 333178618 + }, + "Value": { + "MaterialAsset": { + "assetId": { + "guid": "{BE4DBB1D-16BA-5D82-9865-58904BAFD500}" + }, + "assetHint": "gem/sponza/assets/objects/sponza_mat_columna.azmaterial" + } + } + }, + { + "Key": { + "materialSlotStableId": 338114910 + }, + "Value": { + "MaterialAsset": { + "assetId": { + "guid": "{CE74A12B-9D17-5C84-8118-9F071E61AF82}" + }, + "assetHint": "gem/sponza/assets/objects/sponza_mat_curtaingreen.azmaterial" + } + } + }, + { + "Key": { + "materialSlotStableId": 775278732 + }, + "Value": { + "MaterialAsset": { + "assetId": { + "guid": "{31A90D34-8E36-5A69-AF65-CEC3776F4BD4}" + }, + "assetHint": "gem/sponza/assets/objects/sponza_mat_fabricblue.azmaterial" + } + } + }, + { + "Key": { + "materialSlotStableId": 856448979 + }, + "Value": { + "MaterialAsset": { + "assetId": { + "guid": "{7EDE4FB5-7629-5EA7-942B-DF4404F7F1BF}" + }, + "assetHint": "gem/sponza/assets/objects/sponza_mat_lion.azmaterial" + } + } + }, + { + "Key": { + "materialSlotStableId": 919776125 + }, + "Value": { + "MaterialAsset": { + "assetId": { + "guid": "{BA39AE42-222C-5965-868C-1A1D7ACD3B8B}" + }, + "assetHint": "gem/sponza/assets/objects/sponza_mat_arch.azmaterial" + } + } + }, + { + "Key": { + "materialSlotStableId": 1207315403 + }, + "Value": { + "MaterialAsset": { + "assetId": { + "guid": "{0B8E109B-F295-544E-A360-193D435E9CE7}" + }, + "assetHint": "gem/sponza/assets/objects/sponza_mat_bricks.azmaterial" + } + } + }, + { + "Key": { + "materialSlotStableId": 1802255958 + }, + "Value": { + "MaterialAsset": { + "assetId": { + "guid": "{31EDB842-C01F-53C3-BA5B-ABE47AE4202E}" + }, + "assetHint": "gem/sponza/assets/objects/sponza_mat_roof.azmaterial" + } + } + }, + { + "Key": { + "materialSlotStableId": 2017475302 + }, + "Value": { + "MaterialAsset": { + "assetId": { + "guid": "{96768574-B7E8-5AB1-A1D6-41A1FA817749}" + }, + "assetHint": "gem/sponza/assets/objects/sponza_mat_vaseround.azmaterial" + } + } + }, + { + "Key": { + "materialSlotStableId": 2070928957 + }, + "Value": { + "MaterialAsset": { + "assetId": { + "guid": "{5E3B1B14-DD87-56A9-AF68-58E17A98DAA4}" + }, + "assetHint": "gem/sponza/assets/objects/sponza_mat_vase.azmaterial" + } + } + }, + { + "Key": { + "materialSlotStableId": 2207162385 + }, + "Value": { + "MaterialAsset": { + "assetId": { + "guid": "{5E8EF668-45AD-5ADA-99CB-37F0BD155282}" + }, + "assetHint": "gem/sponza/assets/objects/sponza_mat_vaseplant.azmaterial" + } + } + }, + { + "Key": { + "materialSlotStableId": 2270338210 + }, + "Value": { + "MaterialAsset": { + "assetId": { + "guid": "{7D57D2FA-CC79-5A05-B89D-A821A69E06AA}" + }, + "assetHint": "gem/sponza/assets/objects/sponza_mat_fabricgreen.azmaterial" + } + } + }, + { + "Key": { + "materialSlotStableId": 2309916823 + }, + "Value": { + "MaterialAsset": { + "assetId": { + "guid": "{66472C16-905D-58D3-A2FF-189D0D81A72C}" + }, + "assetHint": "gem/sponza/assets/objects/sponza_mat_fabricred.azmaterial" + } + } + }, + { + "Key": { + "materialSlotStableId": 2590157792 + }, + "Value": { + "MaterialAsset": { + "assetId": { + "guid": "{B064CDF8-E63A-50FE-82C7-F73863C6BAE7}" + }, + "assetHint": "gem/sponza/assets/objects/sponza_mat_floor.azmaterial" + } + } + }, + { + "Key": { + "materialSlotStableId": 2958866002 + }, + "Value": { + "MaterialAsset": { + "assetId": { + "guid": "{C4EF81AF-6924-51F9-B653-374FDEEF2DFF}" + }, + "assetHint": "gem/sponza/assets/objects/sponza_mat_background.azmaterial" + } + } + }, + { + "Key": { + "materialSlotStableId": 3018304250 + }, + "Value": { + "MaterialAsset": { + "assetId": { + "guid": "{348EBEE6-9480-5284-8427-F3503D835C7A}" + }, + "assetHint": "gem/sponza/assets/objects/sponza_mat_details.azmaterial" + } + } + }, + { + "Key": { + "materialSlotStableId": 3091600944 + }, + "Value": { + "MaterialAsset": { + "assetId": { + "guid": "{1D82B774-8649-53B8-89B8-38392145D0B3}" + }, + "assetHint": "gem/sponza/assets/objects/sponza_mat_columnb.azmaterial" + } + } + }, + { + "Key": { + "materialSlotStableId": 3123792718 + }, + "Value": { + "MaterialAsset": { + "assetId": { + "guid": "{9ADCD89D-834D-5894-9829-81A938408C56}" + }, + "assetHint": "gem/sponza/assets/objects/sponza_mat_ceiling.azmaterial" + } + } + }, + { + "Key": { + "materialSlotStableId": 3332811907 + }, + "Value": { + "MaterialAsset": { + "assetId": { + "guid": "{6DC9F913-16C6-58D4-9E62-7C1BD2F17BAA}" + }, + "assetHint": "gem/sponza/assets/objects/sponza_mat_flagpole.azmaterial" + } + } + }, + { + "Key": { + "materialSlotStableId": 3597278613 + }, + "Value": { + "MaterialAsset": { + "assetId": { + "guid": "{CC0ED9DC-03DD-5BC3-97C7-30FCC53AB6D3}" + }, + "assetHint": "gem/sponza/assets/objects/sponza_mat_curtainred.azmaterial" + } + } + }, + { + "Key": { + "materialSlotStableId": 3682637945 + }, + "Value": { + "MaterialAsset": { + "assetId": { + "guid": "{0E6CFBCB-8A02-5BF8-A7BF-F367D729E343}" + }, + "assetHint": "gem/sponza/assets/objects/sponza_mat_curtainblue.azmaterial" + } + } + }, + { + "Key": { + "materialSlotStableId": 3761550797 + }, + "Value": { + "MaterialAsset": { + "assetId": { + "guid": "{8889EE6F-29FD-56D6-806A-77ED795F25E1}" + }, + "assetHint": "gem/sponza/assets/objects/sponza_mat_vasehanging.azmaterial" + } + } + }, + { + "Key": { + "materialSlotStableId": 3856935901 + }, + "Value": { + "MaterialAsset": { + "assetId": { + "guid": "{B44690C5-30A3-5B6B-8785-E51111965AFC}" + }, + "assetHint": "gem/sponza/assets/objects/sponza_mat_columnc.azmaterial" + } + } + }, + { + "Key": { + "materialSlotStableId": 3861299630 + }, + "Value": { + "MaterialAsset": { + "assetId": { + "guid": "{674F363F-C927-5977-8215-4B7E9D3D7E5A}" + }, + "assetHint": "gem/sponza/assets/objects/sponza_mat_leaf.azmaterial" + } + } + }, + { + "Key": { + "materialSlotStableId": 4043076162 + }, + "Value": { + "MaterialAsset": { + "assetId": { + "guid": "{73D2E54D-AA36-5EE3-818D-A627A014FE15}" + }, + "assetHint": "gem/sponza/assets/objects/sponza_mat_chain.azmaterial" + } + } + } + ] + } + } + }, + "Component_[17881751166570014482]": { + "$type": "EditorVisibilityComponent", + "Id": 17881751166570014482 + }, + "Component_[1890254654486049633]": { + "$type": "EditorLockComponent", + "Id": 1890254654486049633 + }, + "Component_[2265788496878584641]": { + "$type": "EditorInspectorComponent", + "Id": 2265788496878584641 + }, + "Component_[4234266794358802507]": { + "$type": "EditorOnlyEntityComponent", + "Id": 4234266794358802507 + }, + "Component_[7538889219751513244]": { + "$type": "AZ::Render::EditorMeshComponent", + "Id": 7538889219751513244, + "Controller": { + "Configuration": { + "ModelAsset": { + "assetId": { + "guid": "{0E91A4B4-9A13-56A1-8007-4F9594DFB8FC}", + "subId": 282066894 + }, + "assetHint": "gem/sponza/assets/objects/sponza.azmodel" + } + } + } + }, + "Component_[8795821630604550348]": { + "$type": "EditorDisabledCompositionComponent", + "Id": 8795821630604550348 + }, + "Component_[972437945687475257]": { + "$type": "{27F1E1A1-8D9D-4C3B-BD3A-AFB9762449C0} TransformComponent", + "Id": 972437945687475257, + "Parent Entity": "Entity_[406217483857]" + } + } + } + } +} \ No newline at end of file diff --git a/AutomatedTesting/Levels/Graphics/Sponza/tags.txt b/AutomatedTesting/Levels/Graphics/Sponza/tags.txt new file mode 100644 index 0000000000..0d6c1880e7 --- /dev/null +++ b/AutomatedTesting/Levels/Graphics/Sponza/tags.txt @@ -0,0 +1,12 @@ +0,0,0,0,0,0 +0,0,0,0,0,0 +0,0,0,0,0,0 +0,0,0,0,0,0 +0,0,0,0,0,0 +0,0,0,0,0,0 +0,0,0,0,0,0 +0,0,0,0,0,0 +0,0,0,0,0,0 +0,0,0,0,0,0 +0,0,0,0,0,0 +0,0,0,0,0,0 diff --git a/AutomatedTesting/Levels/Graphics/hermanubis/hermanubis.prefab b/AutomatedTesting/Levels/Graphics/hermanubis/hermanubis.prefab new file mode 100644 index 0000000000..2234b02cfe --- /dev/null +++ b/AutomatedTesting/Levels/Graphics/hermanubis/hermanubis.prefab @@ -0,0 +1,705 @@ +{ + "ContainerEntity": { + "Id": "ContainerEntity", + "Name": "Hermanubis", + "Components": { + "Component_[10182366347512475253]": { + "$type": "EditorPrefabComponent", + "Id": 10182366347512475253 + }, + "Component_[12917798267488243668]": { + "$type": "EditorPendingCompositionComponent", + "Id": 12917798267488243668 + }, + "Component_[3261249813163778338]": { + "$type": "EditorOnlyEntityComponent", + "Id": 3261249813163778338 + }, + "Component_[3837204912784440039]": { + "$type": "EditorDisabledCompositionComponent", + "Id": 3837204912784440039 + }, + "Component_[4272963378099646759]": { + "$type": "{27F1E1A1-8D9D-4C3B-BD3A-AFB9762449C0} TransformComponent", + "Id": 4272963378099646759, + "Parent Entity": "" + }, + "Component_[4848458548047175816]": { + "$type": "EditorVisibilityComponent", + "Id": 4848458548047175816 + }, + "Component_[5787060997243919943]": { + "$type": "EditorInspectorComponent", + "Id": 5787060997243919943 + }, + "Component_[7804170251266531779]": { + "$type": "EditorLockComponent", + "Id": 7804170251266531779 + }, + "Component_[7874177159288365422]": { + "$type": "EditorEntitySortComponent", + "Id": 7874177159288365422 + }, + "Component_[8018146290632383969]": { + "$type": "EditorEntityIconComponent", + "Id": 8018146290632383969 + }, + "Component_[8452360690590857075]": { + "$type": "SelectionComponent", + "Id": 8452360690590857075 + } + } + }, + "Entities": { + "Entity_[250006174949]": { + "Id": "Entity_[250006174949]", + "Name": "WorldOrigin", + "Components": { + "Component_[13379444112629774116]": { + "$type": "EditorEntityIconComponent", + "Id": 13379444112629774116 + }, + "Component_[13797113876161133062]": { + "$type": "{27F1E1A1-8D9D-4C3B-BD3A-AFB9762449C0} TransformComponent", + "Id": 13797113876161133062, + "Parent Entity": "ContainerEntity" + }, + "Component_[16382506042739704306]": { + "$type": "EditorInspectorComponent", + "Id": 16382506042739704306, + "ComponentOrderEntryArray": [ + { + "ComponentId": 13797113876161133062 + }, + { + "ComponentId": 8816319458242680670, + "SortIndex": 1 + } + ] + }, + "Component_[2147729086581105478]": { + "$type": "EditorOnlyEntityComponent", + "Id": 2147729086581105478 + }, + "Component_[2433100672102773575]": { + "$type": "SelectionComponent", + "Id": 2433100672102773575 + }, + "Component_[4832829387489613630]": { + "$type": "EditorVisibilityComponent", + "Id": 4832829387489613630 + }, + "Component_[5585931842723227683]": { + "$type": "EditorEntitySortComponent", + "Id": 5585931842723227683, + "Child Entity Order": [ + "Entity_[254301142245]" + ] + }, + "Component_[7088004383223117498]": { + "$type": "EditorDisabledCompositionComponent", + "Id": 7088004383223117498 + }, + "Component_[7856264459806503732]": { + "$type": "EditorPendingCompositionComponent", + "Id": 7856264459806503732 + }, + "Component_[8816319458242680670]": { + "$type": "AZ::Render::EditorGridComponent", + "Id": 8816319458242680670 + }, + "Component_[930042309700959235]": { + "$type": "EditorLockComponent", + "Id": 930042309700959235 + } + } + }, + "Entity_[254301142245]": { + "Id": "Entity_[254301142245]", + "Name": "GlobalSkylight", + "Components": { + "Component_[10076500561520682485]": { + "$type": "{27F1E1A1-8D9D-4C3B-BD3A-AFB9762449C0} TransformComponent", + "Id": 10076500561520682485, + "Parent Entity": "Entity_[250006174949]" + }, + "Component_[12626877995248630950]": { + "$type": "EditorInspectorComponent", + "Id": 12626877995248630950, + "ComponentOrderEntryArray": [ + { + "ComponentId": 10076500561520682485 + }, + { + "ComponentId": 8158442301445120126, + "SortIndex": 1 + }, + { + "ComponentId": 7260006984216245935, + "SortIndex": 2 + } + ] + }, + "Component_[13040837632921717329]": { + "$type": "SelectionComponent", + "Id": 13040837632921717329 + }, + "Component_[1390505494369101864]": { + "$type": "EditorDisabledCompositionComponent", + "Id": 1390505494369101864 + }, + "Component_[6733278858932131836]": { + "$type": "EditorVisibilityComponent", + "Id": 6733278858932131836 + }, + "Component_[7260006984216245935]": { + "$type": "AZ::Render::EditorImageBasedLightComponent", + "Id": 7260006984216245935, + "Controller": { + "Configuration": { + "diffuseImageAsset": { + "assetId": { + "guid": "{3B78EA69-7CF0-56A7-A49A-110B88412666}", + "subId": 3000 + }, + "assetHint": "lightingpresets/greenwich_park_02_4k_iblskyboxcm_ibldiffuse.exr.streamingimage" + }, + "specularImageAsset": { + "assetId": { + "guid": "{3B78EA69-7CF0-56A7-A49A-110B88412666}", + "subId": 2000 + }, + "assetHint": "lightingpresets/greenwich_park_02_4k_iblskyboxcm_iblspecular.exr.streamingimage" + } + } + } + }, + "Component_[7944006745008331817]": { + "$type": "EditorEntitySortComponent", + "Id": 7944006745008331817 + }, + "Component_[8158442301445120126]": { + "$type": "AZ::Render::EditorHDRiSkyboxComponent", + "Id": 8158442301445120126, + "Controller": { + "Configuration": { + "CubemapAsset": { + "assetId": { + "guid": "{3B78EA69-7CF0-56A7-A49A-110B88412666}", + "subId": 1000 + }, + "assetHint": "lightingpresets/greenwich_park_02_4k_iblskyboxcm.exr.streamingimage" + } + } + } + }, + "Component_[8255370213772594097]": { + "$type": "EditorOnlyEntityComponent", + "Id": 8255370213772594097 + }, + "Component_[8551180373364097938]": { + "$type": "EditorLockComponent", + "Id": 8551180373364097938 + }, + "Component_[8852330656608249928]": { + "$type": "EditorPendingCompositionComponent", + "Id": 8852330656608249928 + }, + "Component_[8913694496991926693]": { + "$type": "EditorEntityIconComponent", + "Id": 8913694496991926693 + } + } + }, + "Entity_[258596109541]": { + "Id": "Entity_[258596109541]", + "Name": "Hermanubis_stone", + "Components": { + "Component_[1026780512255775175]": { + "$type": "EditorEntityIconComponent", + "Id": 1026780512255775175 + }, + "Component_[10882452951986489612]": { + "$type": "SelectionComponent", + "Id": 10882452951986489612 + }, + "Component_[12454042755417175050]": { + "$type": "AZ::Render::EditorMeshComponent", + "Id": 12454042755417175050, + "Controller": { + "Configuration": { + "ModelAsset": { + "assetId": { + "guid": "{1F650917-AA74-5107-9C49-648C957B33DA}", + "subId": 275904906 + }, + "assetHint": "materialeditor/viewportmodels/hermanubis.azmodel" + }, + "LodOverride": 255 + } + } + }, + "Component_[13691807045809495479]": { + "$type": "EditorMaterialComponent", + "Id": 13691807045809495479, + "Controller": { + "Configuration": { + "materials": { + "{}": { + "MaterialAsset": { + "assetId": { + "guid": "{FF6412B6-F86E-54C8-835C-04F08190D81B}" + }, + "assetHint": "objects/hermanubis/hermanubis_stone.azmaterial" + } + } + } + } + }, + "materialSlotsByLodEnabled": true + }, + "Component_[14490373655742304057]": { + "$type": "EditorPendingCompositionComponent", + "Id": 14490373655742304057 + }, + "Component_[15248132570755287431]": { + "$type": "EditorDisabledCompositionComponent", + "Id": 15248132570755287431 + }, + "Component_[16950375358457415777]": { + "$type": "EditorVisibilityComponent", + "Id": 16950375358457415777 + }, + "Component_[17852268252813268496]": { + "$type": "{27F1E1A1-8D9D-4C3B-BD3A-AFB9762449C0} TransformComponent", + "Id": 17852268252813268496, + "Parent Entity": "ContainerEntity", + "Transform Data": { + "Translate": [ + 1.1189539432525635, + 0.0, + 0.0 + ] + } + }, + "Component_[3867610358542973898]": { + "$type": "EditorEntitySortComponent", + "Id": 3867610358542973898 + }, + "Component_[7717372065847089412]": { + "$type": "EditorOnlyEntityComponent", + "Id": 7717372065847089412 + }, + "Component_[7783943040473764331]": { + "$type": "EditorInspectorComponent", + "Id": 7783943040473764331, + "ComponentOrderEntryArray": [ + { + "ComponentId": 17852268252813268496 + }, + { + "ComponentId": 12454042755417175050, + "SortIndex": 1 + }, + { + "ComponentId": 13691807045809495479, + "SortIndex": 2 + } + ] + }, + "Component_[833407121913837256]": { + "$type": "EditorLockComponent", + "Id": 833407121913837256 + } + } + }, + "Entity_[262891076837]": { + "Id": "Entity_[262891076837]", + "Name": "Hermanubis_brass", + "Components": { + "Component_[1026780512255775175]": { + "$type": "EditorEntityIconComponent", + "Id": 1026780512255775175 + }, + "Component_[10882452951986489612]": { + "$type": "SelectionComponent", + "Id": 10882452951986489612 + }, + "Component_[12454042755417175050]": { + "$type": "AZ::Render::EditorMeshComponent", + "Id": 12454042755417175050, + "Controller": { + "Configuration": { + "ModelAsset": { + "assetId": { + "guid": "{1F650917-AA74-5107-9C49-648C957B33DA}", + "subId": 275904906 + }, + "assetHint": "materialeditor/viewportmodels/hermanubis.azmodel" + }, + "LodOverride": 255 + } + } + }, + "Component_[13691807045809495479]": { + "$type": "EditorMaterialComponent", + "Id": 13691807045809495479, + "Controller": { + "Configuration": { + "materials": { + "{}": { + "MaterialAsset": { + "assetId": { + "guid": "{B3AC2305-1DE6-54AA-AAD5-5E77C75E5BB5}" + }, + "assetHint": "objects/hermanubis/hermanubis_brass.azmaterial" + } + } + } + } + }, + "materialSlotsByLodEnabled": true + }, + "Component_[14490373655742304057]": { + "$type": "EditorPendingCompositionComponent", + "Id": 14490373655742304057 + }, + "Component_[15248132570755287431]": { + "$type": "EditorDisabledCompositionComponent", + "Id": 15248132570755287431 + }, + "Component_[16950375358457415777]": { + "$type": "EditorVisibilityComponent", + "Id": 16950375358457415777 + }, + "Component_[17852268252813268496]": { + "$type": "{27F1E1A1-8D9D-4C3B-BD3A-AFB9762449C0} TransformComponent", + "Id": 17852268252813268496, + "Parent Entity": "ContainerEntity", + "Transform Data": { + "Translate": [ + -1.4824472665786743, + -0.034557100385427475, + 0.0 + ] + } + }, + "Component_[3867610358542973898]": { + "$type": "EditorEntitySortComponent", + "Id": 3867610358542973898 + }, + "Component_[7717372065847089412]": { + "$type": "EditorOnlyEntityComponent", + "Id": 7717372065847089412 + }, + "Component_[7783943040473764331]": { + "$type": "EditorInspectorComponent", + "Id": 7783943040473764331, + "ComponentOrderEntryArray": [ + { + "ComponentId": 17852268252813268496 + }, + { + "ComponentId": 12454042755417175050, + "SortIndex": 1 + }, + { + "ComponentId": 13691807045809495479, + "SortIndex": 2 + } + ] + }, + "Component_[833407121913837256]": { + "$type": "EditorLockComponent", + "Id": 833407121913837256 + } + } + }, + "Entity_[267186044133]": { + "Id": "Entity_[267186044133]", + "Name": "SphereLight", + "Components": { + "Component_[10922228943444131599]": { + "$type": "EditorDisabledCompositionComponent", + "Id": 10922228943444131599 + }, + "Component_[11625534306113165068]": { + "$type": "{27F1E1A1-8D9D-4C3B-BD3A-AFB9762449C0} TransformComponent", + "Id": 11625534306113165068, + "Parent Entity": "ContainerEntity", + "Transform Data": { + "Translate": [ + 0.2636711895465851, + 2.2845842838287354, + 0.22468790411949158 + ] + } + }, + "Component_[12372418243816154216]": { + "$type": "EditorSphereShapeComponent", + "Id": 12372418243816154216, + "ShapeColor": [ + 0.3289234936237335, + 0.7307698130607605, + 0.14859239757061005, + 1.0 + ] + }, + "Component_[12579170654872581897]": { + "$type": "EditorLockComponent", + "Id": 12579170654872581897 + }, + "Component_[12844637542561882557]": { + "$type": "EditorOnlyEntityComponent", + "Id": 12844637542561882557 + }, + "Component_[13087890528096920855]": { + "$type": "EditorInspectorComponent", + "Id": 13087890528096920855, + "ComponentOrderEntryArray": [ + { + "ComponentId": 11625534306113165068 + }, + { + "ComponentId": 13427905514841050195, + "SortIndex": 1 + }, + { + "ComponentId": 12372418243816154216, + "SortIndex": 2 + } + ] + }, + "Component_[13427905514841050195]": { + "$type": "AZ::Render::EditorAreaLightComponent", + "Id": 13427905514841050195, + "Controller": { + "Configuration": { + "LightType": 1, + "Color": [ + 0.3289234936237335, + 0.7307698130607605, + 0.14859239757061005 + ], + "IntensityMode": 1, + "Intensity": 676.7677001953125, + "AttenuationRadius": 226.51287841796875 + } + } + }, + "Component_[15364092815744365073]": { + "$type": "SelectionComponent", + "Id": 15364092815744365073 + }, + "Component_[2481373975540551564]": { + "$type": "EditorPendingCompositionComponent", + "Id": 2481373975540551564 + }, + "Component_[4101167782224846352]": { + "$type": "EditorEntityIconComponent", + "Id": 4101167782224846352 + }, + "Component_[8664715119660216219]": { + "$type": "EditorEntitySortComponent", + "Id": 8664715119660216219 + }, + "Component_[8952093761729701957]": { + "$type": "EditorVisibilityComponent", + "Id": 8952093761729701957, + "VisibilityFlag": false + } + } + }, + "Entity_[275775978725]": { + "Id": "Entity_[275775978725]", + "Name": "TubeLight", + "Components": { + "Component_[10922228943444131599]": { + "$type": "EditorDisabledCompositionComponent", + "Id": 10922228943444131599, + "DisabledComponents": [ + { + "$type": "EditorSphereShapeComponent", + "Id": 12372418243816154216, + "ShapeColor": [ + 0.3289234936237335, + 0.7307698130607605, + 0.14859239757061005, + 1.0 + ] + } + ] + }, + "Component_[11625534306113165068]": { + "$type": "{27F1E1A1-8D9D-4C3B-BD3A-AFB9762449C0} TransformComponent", + "Id": 11625534306113165068, + "Parent Entity": "ContainerEntity", + "Transform Data": { + "Translate": [ + -4.275930881500244, + 0.5104026794433594, + 2.3807857036590576 + ], + "Rotate": [ + 270.0043029785156, + 0.16617189347743988, + 268.51611328125 + ] + } + }, + "Component_[12579170654872581897]": { + "$type": "EditorLockComponent", + "Id": 12579170654872581897 + }, + "Component_[12844637542561882557]": { + "$type": "EditorOnlyEntityComponent", + "Id": 12844637542561882557 + }, + "Component_[13087890528096920855]": { + "$type": "EditorInspectorComponent", + "Id": 13087890528096920855, + "ComponentOrderEntryArray": [ + { + "ComponentId": 11625534306113165068 + }, + { + "ComponentId": 13427905514841050195, + "SortIndex": 1 + }, + { + "ComponentId": 12372418243816154216, + "SortIndex": 2 + }, + { + "ComponentId": 2193911499802409037, + "SortIndex": 3 + } + ] + }, + "Component_[13427905514841050195]": { + "$type": "AZ::Render::EditorAreaLightComponent", + "Id": 13427905514841050195, + "Controller": { + "Configuration": { + "LightType": 3, + "Color": [ + 0.8521705865859985, + 0.7865872979164124, + 0.6079347133636475 + ], + "IntensityMode": 1, + "Intensity": 10000.0, + "AttenuationRadius": 21608.193359375 + } + } + }, + "Component_[15364092815744365073]": { + "$type": "SelectionComponent", + "Id": 15364092815744365073 + }, + "Component_[2193911499802409037]": { + "$type": "EditorCapsuleShapeComponent", + "Id": 2193911499802409037, + "ShapeColor": [ + 0.8521705865859985, + 0.7865872979164124, + 0.6079347133636475, + 1.0 + ], + "CapsuleShape": { + "Configuration": { + "Height": 5.0, + "Radius": 0.10000000149011612 + } + } + }, + "Component_[2481373975540551564]": { + "$type": "EditorPendingCompositionComponent", + "Id": 2481373975540551564 + }, + "Component_[4101167782224846352]": { + "$type": "EditorEntityIconComponent", + "Id": 4101167782224846352 + }, + "Component_[8664715119660216219]": { + "$type": "EditorEntitySortComponent", + "Id": 8664715119660216219 + }, + "Component_[8952093761729701957]": { + "$type": "EditorVisibilityComponent", + "Id": 8952093761729701957, + "VisibilityFlag": false + } + } + }, + "Entity_[482743502241]": { + "Id": "Entity_[482743502241]", + "Name": "Camera1", + "Components": { + "Component_[10672707967016183310]": { + "$type": "EditorDisabledCompositionComponent", + "Id": 10672707967016183310 + }, + "Component_[13520081755303040361]": { + "$type": "EditorLockComponent", + "Id": 13520081755303040361 + }, + "Component_[13650522584195762912]": { + "$type": "SelectionComponent", + "Id": 13650522584195762912 + }, + "Component_[14204465933176839167]": { + "$type": "EditorOnlyEntityComponent", + "Id": 14204465933176839167 + }, + "Component_[14509697511269710983]": { + "$type": "EditorEntitySortComponent", + "Id": 14509697511269710983 + }, + "Component_[271930369355383880]": { + "$type": "EditorEntityIconComponent", + "Id": 271930369355383880 + }, + "Component_[5015186380056948439]": { + "$type": "EditorInspectorComponent", + "Id": 5015186380056948439 + }, + "Component_[6297637832938894772]": { + "$type": "{27F1E1A1-8D9D-4C3B-BD3A-AFB9762449C0} TransformComponent", + "Id": 6297637832938894772, + "Parent Entity": "ContainerEntity", + "Transform Data": { + "Translate": [ + -0.0018702250672504306, + 2.9982283115386963, + 3.0017592906951904 + ], + "Rotate": [ + 20.080352783203125, + -0.020488755777478218, + 179.92381286621094 + ] + } + }, + "Component_[6611378759823339947]": { + "$type": "EditorPendingCompositionComponent", + "Id": 6611378759823339947 + }, + "Component_[8475839846509409509]": { + "$type": "{CA11DA46-29FF-4083-B5F6-E02C3A8C3A3D} EditorCameraComponent", + "Id": 8475839846509409509, + "Controller": { + "Configuration": { + "Field of View": 90.00020599365234, + "EditorEntityId": 478448534945 + } + } + }, + "Component_[9659542522325095386]": { + "$type": "EditorVisibilityComponent", + "Id": 9659542522325095386 + } + } + } + } +} \ No newline at end of file diff --git a/AutomatedTesting/Levels/Graphics/hermanubis/tags.txt b/AutomatedTesting/Levels/Graphics/hermanubis/tags.txt new file mode 100644 index 0000000000..0d6c1880e7 --- /dev/null +++ b/AutomatedTesting/Levels/Graphics/hermanubis/tags.txt @@ -0,0 +1,12 @@ +0,0,0,0,0,0 +0,0,0,0,0,0 +0,0,0,0,0,0 +0,0,0,0,0,0 +0,0,0,0,0,0 +0,0,0,0,0,0 +0,0,0,0,0,0 +0,0,0,0,0,0 +0,0,0,0,0,0 +0,0,0,0,0,0 +0,0,0,0,0,0 +0,0,0,0,0,0 diff --git a/AutomatedTesting/Levels/Graphics/hermanubis_high/hermanubis_high.prefab b/AutomatedTesting/Levels/Graphics/hermanubis_high/hermanubis_high.prefab new file mode 100644 index 0000000000..3378a0c144 --- /dev/null +++ b/AutomatedTesting/Levels/Graphics/hermanubis_high/hermanubis_high.prefab @@ -0,0 +1,943 @@ +{ + "ContainerEntity": { + "Id": "ContainerEntity", + "Name": "hermanubis_high", + "Components": { + "Component_[10182366347512475253]": { + "$type": "EditorPrefabComponent", + "Id": 10182366347512475253 + }, + "Component_[12917798267488243668]": { + "$type": "EditorPendingCompositionComponent", + "Id": 12917798267488243668 + }, + "Component_[3261249813163778338]": { + "$type": "EditorOnlyEntityComponent", + "Id": 3261249813163778338 + }, + "Component_[3837204912784440039]": { + "$type": "EditorDisabledCompositionComponent", + "Id": 3837204912784440039 + }, + "Component_[4272963378099646759]": { + "$type": "{27F1E1A1-8D9D-4C3B-BD3A-AFB9762449C0} TransformComponent", + "Id": 4272963378099646759, + "Parent Entity": "" + }, + "Component_[4848458548047175816]": { + "$type": "EditorVisibilityComponent", + "Id": 4848458548047175816 + }, + "Component_[5787060997243919943]": { + "$type": "EditorInspectorComponent", + "Id": 5787060997243919943 + }, + "Component_[7804170251266531779]": { + "$type": "EditorLockComponent", + "Id": 7804170251266531779 + }, + "Component_[7874177159288365422]": { + "$type": "EditorEntitySortComponent", + "Id": 7874177159288365422, + "Child Entity Order": [ + "Entity_[243647107259]", + "Entity_[247179151093]", + "Entity_[262891076837]", + "Entity_[242884183797]", + "Entity_[258596109541]", + "Entity_[267186044133]", + "Entity_[275775978725]", + "Entity_[250006174949]" + ] + }, + "Component_[8018146290632383969]": { + "$type": "EditorEntityIconComponent", + "Id": 8018146290632383969 + }, + "Component_[8452360690590857075]": { + "$type": "SelectionComponent", + "Id": 8452360690590857075 + } + } + }, + "Entities": { + "Entity_[242884183797]": { + "Id": "Entity_[242884183797]", + "Name": "Hermanubis_stone", + "Components": { + "Component_[1026780512255775175]": { + "$type": "EditorEntityIconComponent", + "Id": 1026780512255775175 + }, + "Component_[10882452951986489612]": { + "$type": "SelectionComponent", + "Id": 10882452951986489612 + }, + "Component_[12454042755417175050]": { + "$type": "AZ::Render::EditorMeshComponent", + "Id": 12454042755417175050, + "Controller": { + "Configuration": { + "ModelAsset": { + "assetId": { + "guid": "{35A45F31-F1C1-5076-8B51-FF599E2EEBAA}", + "subId": 274433667 + }, + "assetHint": "objects/hermanubis/hermanubis_high.azmodel" + }, + "LodOverride": 255 + } + } + }, + "Component_[13691807045809495479]": { + "$type": "EditorMaterialComponent", + "Id": 13691807045809495479, + "Controller": { + "Configuration": { + "materials": { + "{}": { + "MaterialAsset": { + "assetId": { + "guid": "{A78EA2FC-688B-5E3A-A7F6-DB413D11D4CF}" + }, + "assetHint": "materials/presets/pbr/metal_chrome_matte.azmaterial" + } + } + } + } + }, + "materialSlotsByLodEnabled": true + }, + "Component_[14490373655742304057]": { + "$type": "EditorPendingCompositionComponent", + "Id": 14490373655742304057 + }, + "Component_[15248132570755287431]": { + "$type": "EditorDisabledCompositionComponent", + "Id": 15248132570755287431 + }, + "Component_[16950375358457415777]": { + "$type": "EditorVisibilityComponent", + "Id": 16950375358457415777 + }, + "Component_[17852268252813268496]": { + "$type": "{27F1E1A1-8D9D-4C3B-BD3A-AFB9762449C0} TransformComponent", + "Id": 17852268252813268496, + "Parent Entity": "ContainerEntity", + "Transform Data": { + "Translate": [ + 3.810185432434082, + 0.0, + 0.0 + ] + } + }, + "Component_[3867610358542973898]": { + "$type": "EditorEntitySortComponent", + "Id": 3867610358542973898 + }, + "Component_[7717372065847089412]": { + "$type": "EditorOnlyEntityComponent", + "Id": 7717372065847089412 + }, + "Component_[7783943040473764331]": { + "$type": "EditorInspectorComponent", + "Id": 7783943040473764331, + "ComponentOrderEntryArray": [ + { + "ComponentId": 17852268252813268496 + }, + { + "ComponentId": 12454042755417175050, + "SortIndex": 1 + }, + { + "ComponentId": 13691807045809495479, + "SortIndex": 2 + } + ] + }, + "Component_[833407121913837256]": { + "$type": "EditorLockComponent", + "Id": 833407121913837256 + } + } + }, + "Entity_[243647107259]": { + "Id": "Entity_[243647107259]", + "Name": "Camera1", + "Components": { + "Component_[11276153162797125616]": { + "$type": "GenericComponentWrapper", + "Id": 11276153162797125616, + "m_template": { + "$type": "FlyCameraInputComponent" + } + }, + "Component_[11484120648160206262]": { + "$type": "EditorLockComponent", + "Id": 11484120648160206262 + }, + "Component_[14251459960897306807]": { + "$type": "{27F1E1A1-8D9D-4C3B-BD3A-AFB9762449C0} TransformComponent", + "Id": 14251459960897306807, + "Parent Entity": "ContainerEntity", + "Transform Data": { + "Translate": [ + -0.10533800721168518, + -4.001697063446045, + 3.061025619506836 + ], + "Rotate": [ + -19.998117446899414, + 0.01881762035191059, + -0.051706261932849884 + ], + "Scale": [ + 0.9999998807907104, + 1.0, + 1.0 + ] + } + }, + "Component_[149351061984148634]": { + "$type": "EditorOnlyEntityComponent", + "Id": 149351061984148634 + }, + "Component_[15121925351155689107]": { + "$type": "{CA11DA46-29FF-4083-B5F6-E02C3A8C3A3D} EditorCameraComponent", + "Id": 15121925351155689107, + "Controller": { + "Configuration": { + "EditorEntityId": 243647107259 + } + } + }, + "Component_[15327903729148812780]": { + "$type": "EditorPendingCompositionComponent", + "Id": 15327903729148812780 + }, + "Component_[17667820301809320373]": { + "$type": "EditorEntityIconComponent", + "Id": 17667820301809320373 + }, + "Component_[17708351813187009272]": { + "$type": "EditorVisibilityComponent", + "Id": 17708351813187009272 + }, + "Component_[17941668830905411554]": { + "$type": "SelectionComponent", + "Id": 17941668830905411554 + }, + "Component_[48451466091772435]": { + "$type": "EditorEntitySortComponent", + "Id": 48451466091772435 + }, + "Component_[6163614082436403601]": { + "$type": "EditorInspectorComponent", + "Id": 6163614082436403601, + "ComponentOrderEntryArray": [ + { + "ComponentId": 14251459960897306807 + }, + { + "ComponentId": 15121925351155689107, + "SortIndex": 1 + }, + { + "ComponentId": 11935019334576395684, + "SortIndex": 2 + } + ] + }, + "Component_[8660334631968180943]": { + "$type": "EditorDisabledCompositionComponent", + "Id": 8660334631968180943 + } + } + }, + "Entity_[247179151093]": { + "Id": "Entity_[247179151093]", + "Name": "Hermanubis_brass", + "Components": { + "Component_[1026780512255775175]": { + "$type": "EditorEntityIconComponent", + "Id": 1026780512255775175 + }, + "Component_[10882452951986489612]": { + "$type": "SelectionComponent", + "Id": 10882452951986489612 + }, + "Component_[12454042755417175050]": { + "$type": "AZ::Render::EditorMeshComponent", + "Id": 12454042755417175050, + "Controller": { + "Configuration": { + "ModelAsset": { + "assetId": { + "guid": "{35A45F31-F1C1-5076-8B51-FF599E2EEBAA}", + "subId": 274433667 + }, + "assetHint": "objects/hermanubis/hermanubis_high.azmodel" + }, + "LodOverride": 255 + } + } + }, + "Component_[13691807045809495479]": { + "$type": "EditorMaterialComponent", + "Id": 13691807045809495479, + "Controller": { + "Configuration": { + "materials": { + "{}": { + "MaterialAsset": { + "assetId": { + "guid": "{80E0F2A7-1EE4-597F-80EF-985C65BCE2EB}" + }, + "assetHint": "materials/presets/pbr/metal_brass.azmaterial" + } + } + } + } + }, + "materialSlotsByLodEnabled": true + }, + "Component_[14490373655742304057]": { + "$type": "EditorPendingCompositionComponent", + "Id": 14490373655742304057 + }, + "Component_[15248132570755287431]": { + "$type": "EditorDisabledCompositionComponent", + "Id": 15248132570755287431 + }, + "Component_[16950375358457415777]": { + "$type": "EditorVisibilityComponent", + "Id": 16950375358457415777 + }, + "Component_[17852268252813268496]": { + "$type": "{27F1E1A1-8D9D-4C3B-BD3A-AFB9762449C0} TransformComponent", + "Id": 17852268252813268496, + "Parent Entity": "ContainerEntity", + "Transform Data": { + "Translate": [ + -4.019397258758545, + -0.034557100385427475, + 0.0 + ] + } + }, + "Component_[3867610358542973898]": { + "$type": "EditorEntitySortComponent", + "Id": 3867610358542973898 + }, + "Component_[7717372065847089412]": { + "$type": "EditorOnlyEntityComponent", + "Id": 7717372065847089412 + }, + "Component_[7783943040473764331]": { + "$type": "EditorInspectorComponent", + "Id": 7783943040473764331, + "ComponentOrderEntryArray": [ + { + "ComponentId": 17852268252813268496 + }, + { + "ComponentId": 12454042755417175050, + "SortIndex": 1 + }, + { + "ComponentId": 13691807045809495479, + "SortIndex": 2 + } + ] + }, + "Component_[833407121913837256]": { + "$type": "EditorLockComponent", + "Id": 833407121913837256 + } + } + }, + "Entity_[250006174949]": { + "Id": "Entity_[250006174949]", + "Name": "WorldOrigin", + "Components": { + "Component_[13379444112629774116]": { + "$type": "EditorEntityIconComponent", + "Id": 13379444112629774116 + }, + "Component_[13797113876161133062]": { + "$type": "{27F1E1A1-8D9D-4C3B-BD3A-AFB9762449C0} TransformComponent", + "Id": 13797113876161133062, + "Parent Entity": "ContainerEntity" + }, + "Component_[16382506042739704306]": { + "$type": "EditorInspectorComponent", + "Id": 16382506042739704306, + "ComponentOrderEntryArray": [ + { + "ComponentId": 13797113876161133062 + }, + { + "ComponentId": 8816319458242680670, + "SortIndex": 1 + } + ] + }, + "Component_[2147729086581105478]": { + "$type": "EditorOnlyEntityComponent", + "Id": 2147729086581105478 + }, + "Component_[2433100672102773575]": { + "$type": "SelectionComponent", + "Id": 2433100672102773575 + }, + "Component_[4832829387489613630]": { + "$type": "EditorVisibilityComponent", + "Id": 4832829387489613630 + }, + "Component_[5585931842723227683]": { + "$type": "EditorEntitySortComponent", + "Id": 5585931842723227683, + "Child Entity Order": [ + "Entity_[254301142245]" + ] + }, + "Component_[7088004383223117498]": { + "$type": "EditorDisabledCompositionComponent", + "Id": 7088004383223117498 + }, + "Component_[7856264459806503732]": { + "$type": "EditorPendingCompositionComponent", + "Id": 7856264459806503732 + }, + "Component_[8816319458242680670]": { + "$type": "AZ::Render::EditorGridComponent", + "Id": 8816319458242680670 + }, + "Component_[930042309700959235]": { + "$type": "EditorLockComponent", + "Id": 930042309700959235 + } + } + }, + "Entity_[254301142245]": { + "Id": "Entity_[254301142245]", + "Name": "GlobalSkylight", + "Components": { + "Component_[10076500561520682485]": { + "$type": "{27F1E1A1-8D9D-4C3B-BD3A-AFB9762449C0} TransformComponent", + "Id": 10076500561520682485, + "Parent Entity": "Entity_[250006174949]" + }, + "Component_[12626877995248630950]": { + "$type": "EditorInspectorComponent", + "Id": 12626877995248630950, + "ComponentOrderEntryArray": [ + { + "ComponentId": 10076500561520682485 + }, + { + "ComponentId": 8158442301445120126, + "SortIndex": 1 + }, + { + "ComponentId": 7260006984216245935, + "SortIndex": 2 + } + ] + }, + "Component_[13040837632921717329]": { + "$type": "SelectionComponent", + "Id": 13040837632921717329 + }, + "Component_[1390505494369101864]": { + "$type": "EditorDisabledCompositionComponent", + "Id": 1390505494369101864 + }, + "Component_[6733278858932131836]": { + "$type": "EditorVisibilityComponent", + "Id": 6733278858932131836 + }, + "Component_[7260006984216245935]": { + "$type": "AZ::Render::EditorImageBasedLightComponent", + "Id": 7260006984216245935, + "Controller": { + "Configuration": { + "diffuseImageAsset": { + "assetId": { + "guid": "{3B78EA69-7CF0-56A7-A49A-110B88412666}", + "subId": 3000 + }, + "assetHint": "lightingpresets/greenwich_park_02_4k_iblskyboxcm_ibldiffuse.exr.streamingimage" + }, + "specularImageAsset": { + "assetId": { + "guid": "{3B78EA69-7CF0-56A7-A49A-110B88412666}", + "subId": 2000 + }, + "assetHint": "lightingpresets/greenwich_park_02_4k_iblskyboxcm_iblspecular.exr.streamingimage" + } + } + } + }, + "Component_[7944006745008331817]": { + "$type": "EditorEntitySortComponent", + "Id": 7944006745008331817 + }, + "Component_[8158442301445120126]": { + "$type": "AZ::Render::EditorHDRiSkyboxComponent", + "Id": 8158442301445120126, + "Controller": { + "Configuration": { + "CubemapAsset": { + "assetId": { + "guid": "{3B78EA69-7CF0-56A7-A49A-110B88412666}", + "subId": 1000 + }, + "assetHint": "lightingpresets/greenwich_park_02_4k_iblskyboxcm.exr.streamingimage" + } + } + } + }, + "Component_[8255370213772594097]": { + "$type": "EditorOnlyEntityComponent", + "Id": 8255370213772594097 + }, + "Component_[8551180373364097938]": { + "$type": "EditorLockComponent", + "Id": 8551180373364097938 + }, + "Component_[8852330656608249928]": { + "$type": "EditorPendingCompositionComponent", + "Id": 8852330656608249928 + }, + "Component_[8913694496991926693]": { + "$type": "EditorEntityIconComponent", + "Id": 8913694496991926693 + } + } + }, + "Entity_[258596109541]": { + "Id": "Entity_[258596109541]", + "Name": "Hermanubis_stone", + "Components": { + "Component_[1026780512255775175]": { + "$type": "EditorEntityIconComponent", + "Id": 1026780512255775175 + }, + "Component_[10882452951986489612]": { + "$type": "SelectionComponent", + "Id": 10882452951986489612 + }, + "Component_[12454042755417175050]": { + "$type": "AZ::Render::EditorMeshComponent", + "Id": 12454042755417175050, + "Controller": { + "Configuration": { + "ModelAsset": { + "assetId": { + "guid": "{35A45F31-F1C1-5076-8B51-FF599E2EEBAA}", + "subId": 274433667 + }, + "assetHint": "objects/hermanubis/hermanubis_high.azmodel" + }, + "LodOverride": 255 + } + } + }, + "Component_[13691807045809495479]": { + "$type": "EditorMaterialComponent", + "Id": 13691807045809495479, + "Controller": { + "Configuration": { + "materials": { + "{}": { + "MaterialAsset": { + "assetId": { + "guid": "{B7C712DC-4839-58BB-B522-A4F120084CF5}" + }, + "assetHint": "materials/presets/pbr/metal_chrome.azmaterial" + } + } + } + } + }, + "materialSlotsByLodEnabled": true + }, + "Component_[14490373655742304057]": { + "$type": "EditorPendingCompositionComponent", + "Id": 14490373655742304057 + }, + "Component_[15248132570755287431]": { + "$type": "EditorDisabledCompositionComponent", + "Id": 15248132570755287431 + }, + "Component_[16950375358457415777]": { + "$type": "EditorVisibilityComponent", + "Id": 16950375358457415777 + }, + "Component_[17852268252813268496]": { + "$type": "{27F1E1A1-8D9D-4C3B-BD3A-AFB9762449C0} TransformComponent", + "Id": 17852268252813268496, + "Parent Entity": "ContainerEntity", + "Transform Data": { + "Translate": [ + 1.1189539432525635, + 0.0, + 0.0 + ] + } + }, + "Component_[3867610358542973898]": { + "$type": "EditorEntitySortComponent", + "Id": 3867610358542973898 + }, + "Component_[7717372065847089412]": { + "$type": "EditorOnlyEntityComponent", + "Id": 7717372065847089412 + }, + "Component_[7783943040473764331]": { + "$type": "EditorInspectorComponent", + "Id": 7783943040473764331, + "ComponentOrderEntryArray": [ + { + "ComponentId": 17852268252813268496 + }, + { + "ComponentId": 12454042755417175050, + "SortIndex": 1 + }, + { + "ComponentId": 13691807045809495479, + "SortIndex": 2 + } + ] + }, + "Component_[833407121913837256]": { + "$type": "EditorLockComponent", + "Id": 833407121913837256 + } + } + }, + "Entity_[262891076837]": { + "Id": "Entity_[262891076837]", + "Name": "Hermanubis_brass", + "Components": { + "Component_[1026780512255775175]": { + "$type": "EditorEntityIconComponent", + "Id": 1026780512255775175 + }, + "Component_[10882452951986489612]": { + "$type": "SelectionComponent", + "Id": 10882452951986489612 + }, + "Component_[12454042755417175050]": { + "$type": "AZ::Render::EditorMeshComponent", + "Id": 12454042755417175050, + "Controller": { + "Configuration": { + "ModelAsset": { + "assetId": { + "guid": "{35A45F31-F1C1-5076-8B51-FF599E2EEBAA}", + "subId": 274433667 + }, + "assetHint": "objects/hermanubis/hermanubis_high.azmodel" + }, + "LodOverride": 255 + } + } + }, + "Component_[13691807045809495479]": { + "$type": "EditorMaterialComponent", + "Id": 13691807045809495479, + "Controller": { + "Configuration": { + "materials": { + "{}": { + "MaterialAsset": { + "assetId": { + "guid": "{CAF50181-3384-5DF2-9304-C6E48E83C72D}" + }, + "assetHint": "materials/presets/pbr/metal_chrome_polished.azmaterial" + } + } + } + } + }, + "materialSlotsByLodEnabled": true + }, + "Component_[14490373655742304057]": { + "$type": "EditorPendingCompositionComponent", + "Id": 14490373655742304057 + }, + "Component_[15248132570755287431]": { + "$type": "EditorDisabledCompositionComponent", + "Id": 15248132570755287431 + }, + "Component_[16950375358457415777]": { + "$type": "EditorVisibilityComponent", + "Id": 16950375358457415777 + }, + "Component_[17852268252813268496]": { + "$type": "{27F1E1A1-8D9D-4C3B-BD3A-AFB9762449C0} TransformComponent", + "Id": 17852268252813268496, + "Parent Entity": "ContainerEntity", + "Transform Data": { + "Translate": [ + -1.4824472665786743, + -0.034557100385427475, + 0.0 + ] + } + }, + "Component_[3867610358542973898]": { + "$type": "EditorEntitySortComponent", + "Id": 3867610358542973898 + }, + "Component_[7717372065847089412]": { + "$type": "EditorOnlyEntityComponent", + "Id": 7717372065847089412 + }, + "Component_[7783943040473764331]": { + "$type": "EditorInspectorComponent", + "Id": 7783943040473764331, + "ComponentOrderEntryArray": [ + { + "ComponentId": 17852268252813268496 + }, + { + "ComponentId": 12454042755417175050, + "SortIndex": 1 + }, + { + "ComponentId": 13691807045809495479, + "SortIndex": 2 + } + ] + }, + "Component_[833407121913837256]": { + "$type": "EditorLockComponent", + "Id": 833407121913837256 + } + } + }, + "Entity_[267186044133]": { + "Id": "Entity_[267186044133]", + "Name": "SphereLight", + "Components": { + "Component_[10922228943444131599]": { + "$type": "EditorDisabledCompositionComponent", + "Id": 10922228943444131599 + }, + "Component_[11625534306113165068]": { + "$type": "{27F1E1A1-8D9D-4C3B-BD3A-AFB9762449C0} TransformComponent", + "Id": 11625534306113165068, + "Parent Entity": "ContainerEntity", + "Transform Data": { + "Translate": [ + 0.2636711895465851, + 2.2845842838287354, + 0.22468790411949158 + ] + } + }, + "Component_[12372418243816154216]": { + "$type": "EditorSphereShapeComponent", + "Id": 12372418243816154216, + "ShapeColor": [ + 0.3289234936237335, + 0.7307698130607605, + 0.14859239757061005, + 1.0 + ] + }, + "Component_[12579170654872581897]": { + "$type": "EditorLockComponent", + "Id": 12579170654872581897 + }, + "Component_[12844637542561882557]": { + "$type": "EditorOnlyEntityComponent", + "Id": 12844637542561882557 + }, + "Component_[13087890528096920855]": { + "$type": "EditorInspectorComponent", + "Id": 13087890528096920855, + "ComponentOrderEntryArray": [ + { + "ComponentId": 11625534306113165068 + }, + { + "ComponentId": 13427905514841050195, + "SortIndex": 1 + }, + { + "ComponentId": 12372418243816154216, + "SortIndex": 2 + } + ] + }, + "Component_[13427905514841050195]": { + "$type": "AZ::Render::EditorAreaLightComponent", + "Id": 13427905514841050195, + "Controller": { + "Configuration": { + "LightType": 1, + "Color": [ + 0.3289234936237335, + 0.7307698130607605, + 0.14859239757061005 + ], + "IntensityMode": 1, + "Intensity": 676.7677001953125, + "AttenuationRadius": 226.51287841796875 + } + } + }, + "Component_[15364092815744365073]": { + "$type": "SelectionComponent", + "Id": 15364092815744365073 + }, + "Component_[2481373975540551564]": { + "$type": "EditorPendingCompositionComponent", + "Id": 2481373975540551564 + }, + "Component_[4101167782224846352]": { + "$type": "EditorEntityIconComponent", + "Id": 4101167782224846352 + }, + "Component_[8664715119660216219]": { + "$type": "EditorEntitySortComponent", + "Id": 8664715119660216219 + }, + "Component_[8952093761729701957]": { + "$type": "EditorVisibilityComponent", + "Id": 8952093761729701957, + "VisibilityFlag": false + } + } + }, + "Entity_[275775978725]": { + "Id": "Entity_[275775978725]", + "Name": "TubeLight", + "Components": { + "Component_[10922228943444131599]": { + "$type": "EditorDisabledCompositionComponent", + "Id": 10922228943444131599, + "DisabledComponents": [ + { + "$type": "EditorSphereShapeComponent", + "Id": 12372418243816154216, + "ShapeColor": [ + 0.3289234936237335, + 0.7307698130607605, + 0.14859239757061005, + 1.0 + ] + } + ] + }, + "Component_[11625534306113165068]": { + "$type": "{27F1E1A1-8D9D-4C3B-BD3A-AFB9762449C0} TransformComponent", + "Id": 11625534306113165068, + "Parent Entity": "ContainerEntity", + "Transform Data": { + "Translate": [ + -4.275930881500244, + 0.5104026794433594, + 2.3807857036590576 + ], + "Rotate": [ + 270.0043029785156, + 0.16617189347743988, + 268.51611328125 + ] + } + }, + "Component_[12579170654872581897]": { + "$type": "EditorLockComponent", + "Id": 12579170654872581897 + }, + "Component_[12844637542561882557]": { + "$type": "EditorOnlyEntityComponent", + "Id": 12844637542561882557 + }, + "Component_[13087890528096920855]": { + "$type": "EditorInspectorComponent", + "Id": 13087890528096920855, + "ComponentOrderEntryArray": [ + { + "ComponentId": 11625534306113165068 + }, + { + "ComponentId": 13427905514841050195, + "SortIndex": 1 + }, + { + "ComponentId": 12372418243816154216, + "SortIndex": 2 + }, + { + "ComponentId": 2193911499802409037, + "SortIndex": 3 + } + ] + }, + "Component_[13427905514841050195]": { + "$type": "AZ::Render::EditorAreaLightComponent", + "Id": 13427905514841050195, + "Controller": { + "Configuration": { + "LightType": 3, + "Color": [ + 0.8521705865859985, + 0.7865872979164124, + 0.6079347133636475 + ], + "IntensityMode": 1, + "Intensity": 10000.0, + "AttenuationRadius": 21608.193359375 + } + } + }, + "Component_[15364092815744365073]": { + "$type": "SelectionComponent", + "Id": 15364092815744365073 + }, + "Component_[2193911499802409037]": { + "$type": "EditorCapsuleShapeComponent", + "Id": 2193911499802409037, + "ShapeColor": [ + 0.8521705865859985, + 0.7865872979164124, + 0.6079347133636475, + 1.0 + ], + "CapsuleShape": { + "Configuration": { + "Height": 5.0, + "Radius": 0.10000000149011612 + } + } + }, + "Component_[2481373975540551564]": { + "$type": "EditorPendingCompositionComponent", + "Id": 2481373975540551564 + }, + "Component_[4101167782224846352]": { + "$type": "EditorEntityIconComponent", + "Id": 4101167782224846352 + }, + "Component_[8664715119660216219]": { + "$type": "EditorEntitySortComponent", + "Id": 8664715119660216219 + }, + "Component_[8952093761729701957]": { + "$type": "EditorVisibilityComponent", + "Id": 8952093761729701957, + "VisibilityFlag": false + } + } + } + } +} \ No newline at end of file diff --git a/AutomatedTesting/Levels/Graphics/hermanubis_high/tags.txt b/AutomatedTesting/Levels/Graphics/hermanubis_high/tags.txt new file mode 100644 index 0000000000..0d6c1880e7 --- /dev/null +++ b/AutomatedTesting/Levels/Graphics/hermanubis_high/tags.txt @@ -0,0 +1,12 @@ +0,0,0,0,0,0 +0,0,0,0,0,0 +0,0,0,0,0,0 +0,0,0,0,0,0 +0,0,0,0,0,0 +0,0,0,0,0,0 +0,0,0,0,0,0 +0,0,0,0,0,0 +0,0,0,0,0,0 +0,0,0,0,0,0 +0,0,0,0,0,0 +0,0,0,0,0,0 diff --git a/AutomatedTesting/Levels/Graphics/macbeth_shaderballs/macbeth_shaderballs.prefab b/AutomatedTesting/Levels/Graphics/macbeth_shaderballs/macbeth_shaderballs.prefab new file mode 100644 index 0000000000..22504f168a --- /dev/null +++ b/AutomatedTesting/Levels/Graphics/macbeth_shaderballs/macbeth_shaderballs.prefab @@ -0,0 +1,3401 @@ +{ + "ContainerEntity": { + "Id": "ContainerEntity", + "Name": "macbeth_shaderballs", + "Components": { + "Component_[10182366347512475253]": { + "$type": "EditorPrefabComponent", + "Id": 10182366347512475253 + }, + "Component_[12917798267488243668]": { + "$type": "EditorPendingCompositionComponent", + "Id": 12917798267488243668 + }, + "Component_[3261249813163778338]": { + "$type": "EditorOnlyEntityComponent", + "Id": 3261249813163778338 + }, + "Component_[3837204912784440039]": { + "$type": "EditorDisabledCompositionComponent", + "Id": 3837204912784440039 + }, + "Component_[4272963378099646759]": { + "$type": "{27F1E1A1-8D9D-4C3B-BD3A-AFB9762449C0} TransformComponent", + "Id": 4272963378099646759, + "Parent Entity": "" + }, + "Component_[4848458548047175816]": { + "$type": "EditorVisibilityComponent", + "Id": 4848458548047175816 + }, + "Component_[5787060997243919943]": { + "$type": "EditorInspectorComponent", + "Id": 5787060997243919943 + }, + "Component_[7804170251266531779]": { + "$type": "EditorLockComponent", + "Id": 7804170251266531779 + }, + "Component_[7874177159288365422]": { + "$type": "EditorEntitySortComponent", + "Id": 7874177159288365422 + }, + "Component_[8018146290632383969]": { + "$type": "EditorEntityIconComponent", + "Id": 8018146290632383969 + }, + "Component_[8452360690590857075]": { + "$type": "SelectionComponent", + "Id": 8452360690590857075 + } + } + }, + "Entities": { + "Entity_[471076350497]": { + "Id": "Entity_[471076350497]", + "Name": "WorldOrigin", + "Components": { + "Component_[10118378636607282023]": { + "$type": "AZ::Render::EditorImageBasedLightComponent", + "Id": 10118378636607282023, + "Controller": { + "Configuration": { + "diffuseImageAsset": { + "assetId": { + "guid": "{10853039-DC8A-558A-B27E-4433A6386731}", + "subId": 3000 + }, + "assetHint": "lightingpresets/lowcontrast/blouberg_sunrise_1_4k_iblskyboxcm_ibldiffuse.exr.streamingimage" + }, + "specularImageAsset": { + "assetId": { + "guid": "{10853039-DC8A-558A-B27E-4433A6386731}", + "subId": 2000 + }, + "assetHint": "lightingpresets/lowcontrast/blouberg_sunrise_1_4k_iblskyboxcm_iblspecular.exr.streamingimage" + }, + "exposure": 1.0 + } + } + }, + "Component_[10390989140659450689]": { + "$type": "EditorInspectorComponent", + "Id": 10390989140659450689, + "ComponentOrderEntryArray": [ + { + "ComponentId": 6066687697346848609 + }, + { + "ComponentId": 1538992203183232042, + "SortIndex": 1 + }, + { + "ComponentId": 10118378636607282023, + "SortIndex": 2 + } + ] + }, + "Component_[1122756123782465575]": { + "$type": "EditorLockComponent", + "Id": 1122756123782465575 + }, + "Component_[1411541685315998773]": { + "$type": "EditorDisabledCompositionComponent", + "Id": 1411541685315998773 + }, + "Component_[1538992203183232042]": { + "$type": "AZ::Render::EditorGridComponent", + "Id": 1538992203183232042 + }, + "Component_[16871442125196328877]": { + "$type": "EditorEntitySortComponent", + "Id": 16871442125196328877, + "ChildEntityOrderEntryArray": [ + { + "EntityId": "Entity_[604220336673]" + }, + { + "EntityId": "Entity_[599925369377]", + "SortIndex": 1 + }, + { + "EntityId": "Entity_[475371317793]", + "SortIndex": 2 + }, + { + "EntityId": "Entity_[509731056161]", + "SortIndex": 3 + }, + { + "EntityId": "Entity_[505436088865]", + "SortIndex": 4 + }, + { + "EntityId": "Entity_[539795827233]", + "SortIndex": 5 + }, + { + "EntityId": "Entity_[569860598305]", + "SortIndex": 6 + } + ] + }, + "Component_[18389136819207633744]": { + "$type": "SelectionComponent", + "Id": 18389136819207633744 + }, + "Component_[2967708543517171475]": { + "$type": "EditorEntityIconComponent", + "Id": 2967708543517171475 + }, + "Component_[6066687697346848609]": { + "$type": "{27F1E1A1-8D9D-4C3B-BD3A-AFB9762449C0} TransformComponent", + "Id": 6066687697346848609, + "Parent Entity": "ContainerEntity" + }, + "Component_[7035058231756199033]": { + "$type": "EditorVisibilityComponent", + "Id": 7035058231756199033 + }, + "Component_[7861798362721154905]": { + "$type": "EditorOnlyEntityComponent", + "Id": 7861798362721154905 + }, + "Component_[8535986786667781968]": { + "$type": "EditorPendingCompositionComponent", + "Id": 8535986786667781968 + } + } + }, + "Entity_[475371317793]": { + "Id": "Entity_[475371317793]", + "Name": "00_Illuminant", + "Components": { + "Component_[12222961627447331506]": { + "$type": "EditorMaterialComponent", + "Id": 12222961627447331506, + "Controller": { + "Configuration": { + "materials": { + "{}": { + "MaterialAsset": { + "assetId": { + "guid": "{29C7358C-9899-56DF-8F99-F654C7138DB8}" + }, + "assetHint": "materials/presets/macbeth/00_illuminant.azmaterial" + } + } + } + } + }, + "materialSlotsByLodEnabled": true + }, + "Component_[12780007764330464223]": { + "$type": "EditorVisibilityComponent", + "Id": 12780007764330464223 + }, + "Component_[12904863407657276829]": { + "$type": "EditorInspectorComponent", + "Id": 12904863407657276829, + "ComponentOrderEntryArray": [ + { + "ComponentId": 7205597372613518510 + }, + { + "ComponentId": 8564054653851438099, + "SortIndex": 1 + }, + { + "ComponentId": 12222961627447331506, + "SortIndex": 2 + } + ] + }, + "Component_[13729618014821386240]": { + "$type": "EditorPendingCompositionComponent", + "Id": 13729618014821386240 + }, + "Component_[14429836600052599894]": { + "$type": "EditorEntityIconComponent", + "Id": 14429836600052599894 + }, + "Component_[14808014799413383215]": { + "$type": "EditorEntitySortComponent", + "Id": 14808014799413383215 + }, + "Component_[17252932649882883756]": { + "$type": "SelectionComponent", + "Id": 17252932649882883756 + }, + "Component_[2229055145450914672]": { + "$type": "EditorLockComponent", + "Id": 2229055145450914672 + }, + "Component_[2249882080644631374]": { + "$type": "EditorOnlyEntityComponent", + "Id": 2249882080644631374 + }, + "Component_[7205597372613518510]": { + "$type": "{27F1E1A1-8D9D-4C3B-BD3A-AFB9762449C0} TransformComponent", + "Id": 7205597372613518510, + "Parent Entity": "Entity_[471076350497]", + "Transform Data": { + "Translate": [ + -0.020035700872540474, + 10.880657196044922, + 1.0 + ], + "Rotate": [ + 0.0, + 0.0, + 180.00001525878906 + ] + } + }, + "Component_[7918371639409185899]": { + "$type": "EditorDisabledCompositionComponent", + "Id": 7918371639409185899 + }, + "Component_[8564054653851438099]": { + "$type": "AZ::Render::EditorMeshComponent", + "Id": 8564054653851438099, + "Controller": { + "Configuration": { + "ModelAsset": { + "assetId": { + "guid": "{D0F73AAF-52B7-507C-B045-DBE2FE2D4403}", + "subId": 268677693 + }, + "assetHint": "objects/shaderball_simple/shaberball_simple_1m.azmodel" + }, + "LodOverride": 255 + } + } + } + } + }, + "Entity_[479666285089]": { + "Id": "Entity_[479666285089]", + "Name": "09_moderate_red", + "Components": { + "Component_[12222961627447331506]": { + "$type": "EditorMaterialComponent", + "Id": 12222961627447331506, + "Controller": { + "Configuration": { + "materials": { + "{}": { + "MaterialAsset": { + "assetId": { + "guid": "{FD3D09E1-9B20-5761-87A2-388ADD3C966A}" + }, + "assetHint": "materials/presets/macbeth/09_moderate_red.azmaterial" + } + } + } + } + }, + "materialSlotsByLodEnabled": true + }, + "Component_[12780007764330464223]": { + "$type": "EditorVisibilityComponent", + "Id": 12780007764330464223 + }, + "Component_[12904863407657276829]": { + "$type": "EditorInspectorComponent", + "Id": 12904863407657276829, + "ComponentOrderEntryArray": [ + { + "ComponentId": 7205597372613518510 + }, + { + "ComponentId": 8564054653851438099, + "SortIndex": 1 + }, + { + "ComponentId": 12222961627447331506, + "SortIndex": 2 + } + ] + }, + "Component_[13729618014821386240]": { + "$type": "EditorPendingCompositionComponent", + "Id": 13729618014821386240 + }, + "Component_[14429836600052599894]": { + "$type": "EditorEntityIconComponent", + "Id": 14429836600052599894 + }, + "Component_[14808014799413383215]": { + "$type": "EditorEntitySortComponent", + "Id": 14808014799413383215 + }, + "Component_[17252932649882883756]": { + "$type": "SelectionComponent", + "Id": 17252932649882883756 + }, + "Component_[2229055145450914672]": { + "$type": "EditorLockComponent", + "Id": 2229055145450914672 + }, + "Component_[2249882080644631374]": { + "$type": "EditorOnlyEntityComponent", + "Id": 2249882080644631374 + }, + "Component_[7205597372613518510]": { + "$type": "{27F1E1A1-8D9D-4C3B-BD3A-AFB9762449C0} TransformComponent", + "Id": 7205597372613518510, + "Parent Entity": "Entity_[505436088865]", + "Transform Data": { + "Translate": [ + -2.113382339477539, + -9.999999974752427e-7, + 0.0 + ], + "Rotate": [ + 0.0, + 0.0, + 180.00001525878906 + ] + } + }, + "Component_[7918371639409185899]": { + "$type": "EditorDisabledCompositionComponent", + "Id": 7918371639409185899 + }, + "Component_[8564054653851438099]": { + "$type": "AZ::Render::EditorMeshComponent", + "Id": 8564054653851438099, + "Controller": { + "Configuration": { + "ModelAsset": { + "assetId": { + "guid": "{D0F73AAF-52B7-507C-B045-DBE2FE2D4403}", + "subId": 268677693 + }, + "assetHint": "objects/shaderball_simple/shaberball_simple_1m.azmodel" + }, + "LodOverride": 255 + } + } + } + } + }, + "Entity_[483961252385]": { + "Id": "Entity_[483961252385]", + "Name": "08_purplish_blue", + "Components": { + "Component_[12222961627447331506]": { + "$type": "EditorMaterialComponent", + "Id": 12222961627447331506, + "Controller": { + "Configuration": { + "materials": { + "{}": { + "MaterialAsset": { + "assetId": { + "guid": "{0478869F-5E19-5A5C-AA22-0D31972E83B7}" + }, + "assetHint": "materials/presets/macbeth/08_purplish_blue.azmaterial" + } + } + } + } + }, + "materialSlotsByLodEnabled": true + }, + "Component_[12780007764330464223]": { + "$type": "EditorVisibilityComponent", + "Id": 12780007764330464223 + }, + "Component_[12904863407657276829]": { + "$type": "EditorInspectorComponent", + "Id": 12904863407657276829, + "ComponentOrderEntryArray": [ + { + "ComponentId": 7205597372613518510 + }, + { + "ComponentId": 8564054653851438099, + "SortIndex": 1 + }, + { + "ComponentId": 12222961627447331506, + "SortIndex": 2 + } + ] + }, + "Component_[13729618014821386240]": { + "$type": "EditorPendingCompositionComponent", + "Id": 13729618014821386240 + }, + "Component_[14429836600052599894]": { + "$type": "EditorEntityIconComponent", + "Id": 14429836600052599894 + }, + "Component_[14808014799413383215]": { + "$type": "EditorEntitySortComponent", + "Id": 14808014799413383215 + }, + "Component_[17252932649882883756]": { + "$type": "SelectionComponent", + "Id": 17252932649882883756 + }, + "Component_[2229055145450914672]": { + "$type": "EditorLockComponent", + "Id": 2229055145450914672 + }, + "Component_[2249882080644631374]": { + "$type": "EditorOnlyEntityComponent", + "Id": 2249882080644631374 + }, + "Component_[7205597372613518510]": { + "$type": "{27F1E1A1-8D9D-4C3B-BD3A-AFB9762449C0} TransformComponent", + "Id": 7205597372613518510, + "Parent Entity": "Entity_[505436088865]", + "Transform Data": { + "Translate": [ + -6.113382339477539, + -9.999999974752427e-7, + 0.0 + ], + "Rotate": [ + 0.0, + 0.0, + 180.00001525878906 + ] + } + }, + "Component_[7918371639409185899]": { + "$type": "EditorDisabledCompositionComponent", + "Id": 7918371639409185899 + }, + "Component_[8564054653851438099]": { + "$type": "AZ::Render::EditorMeshComponent", + "Id": 8564054653851438099, + "Controller": { + "Configuration": { + "ModelAsset": { + "assetId": { + "guid": "{D0F73AAF-52B7-507C-B045-DBE2FE2D4403}", + "subId": 268677693 + }, + "assetHint": "objects/shaderball_simple/shaberball_simple_1m.azmodel" + }, + "LodOverride": 255 + } + } + } + } + }, + "Entity_[488256219681]": { + "Id": "Entity_[488256219681]", + "Name": "07_orange", + "Components": { + "Component_[12222961627447331506]": { + "$type": "EditorMaterialComponent", + "Id": 12222961627447331506, + "Controller": { + "Configuration": { + "materials": { + "{}": { + "MaterialAsset": { + "assetId": { + "guid": "{3E414822-FF6A-5A79-BF1A-66F4C48C381D}" + }, + "assetHint": "materials/presets/macbeth/07_orange.azmaterial" + } + } + } + } + }, + "materialSlotsByLodEnabled": true + }, + "Component_[12780007764330464223]": { + "$type": "EditorVisibilityComponent", + "Id": 12780007764330464223 + }, + "Component_[12904863407657276829]": { + "$type": "EditorInspectorComponent", + "Id": 12904863407657276829, + "ComponentOrderEntryArray": [ + { + "ComponentId": 7205597372613518510 + }, + { + "ComponentId": 8564054653851438099, + "SortIndex": 1 + }, + { + "ComponentId": 12222961627447331506, + "SortIndex": 2 + } + ] + }, + "Component_[13729618014821386240]": { + "$type": "EditorPendingCompositionComponent", + "Id": 13729618014821386240 + }, + "Component_[14429836600052599894]": { + "$type": "EditorEntityIconComponent", + "Id": 14429836600052599894 + }, + "Component_[14808014799413383215]": { + "$type": "EditorEntitySortComponent", + "Id": 14808014799413383215 + }, + "Component_[17252932649882883756]": { + "$type": "SelectionComponent", + "Id": 17252932649882883756 + }, + "Component_[2229055145450914672]": { + "$type": "EditorLockComponent", + "Id": 2229055145450914672 + }, + "Component_[2249882080644631374]": { + "$type": "EditorOnlyEntityComponent", + "Id": 2249882080644631374 + }, + "Component_[7205597372613518510]": { + "$type": "{27F1E1A1-8D9D-4C3B-BD3A-AFB9762449C0} TransformComponent", + "Id": 7205597372613518510, + "Parent Entity": "Entity_[505436088865]", + "Transform Data": { + "Translate": [ + -10.113382339477539, + -9.999999974752427e-7, + 0.0 + ], + "Rotate": [ + 0.0, + 0.0, + 180.00001525878906 + ] + } + }, + "Component_[7918371639409185899]": { + "$type": "EditorDisabledCompositionComponent", + "Id": 7918371639409185899 + }, + "Component_[8564054653851438099]": { + "$type": "AZ::Render::EditorMeshComponent", + "Id": 8564054653851438099, + "Controller": { + "Configuration": { + "ModelAsset": { + "assetId": { + "guid": "{D0F73AAF-52B7-507C-B045-DBE2FE2D4403}", + "subId": 268677693 + }, + "assetHint": "objects/shaderball_simple/shaberball_simple_1m.azmodel" + }, + "LodOverride": 255 + } + } + } + } + }, + "Entity_[492551186977]": { + "Id": "Entity_[492551186977]", + "Name": "10_purple", + "Components": { + "Component_[12222961627447331506]": { + "$type": "EditorMaterialComponent", + "Id": 12222961627447331506, + "Controller": { + "Configuration": { + "materials": { + "{}": { + "MaterialAsset": { + "assetId": { + "guid": "{6A0A0CBE-FE95-5732-B2A9-442ABAC6B3AA}" + }, + "assetHint": "materials/presets/macbeth/10_purple.azmaterial" + } + } + } + } + }, + "materialSlotsByLodEnabled": true + }, + "Component_[12780007764330464223]": { + "$type": "EditorVisibilityComponent", + "Id": 12780007764330464223 + }, + "Component_[12904863407657276829]": { + "$type": "EditorInspectorComponent", + "Id": 12904863407657276829, + "ComponentOrderEntryArray": [ + { + "ComponentId": 7205597372613518510 + }, + { + "ComponentId": 8564054653851438099, + "SortIndex": 1 + }, + { + "ComponentId": 12222961627447331506, + "SortIndex": 2 + } + ] + }, + "Component_[13729618014821386240]": { + "$type": "EditorPendingCompositionComponent", + "Id": 13729618014821386240 + }, + "Component_[14429836600052599894]": { + "$type": "EditorEntityIconComponent", + "Id": 14429836600052599894 + }, + "Component_[14808014799413383215]": { + "$type": "EditorEntitySortComponent", + "Id": 14808014799413383215 + }, + "Component_[17252932649882883756]": { + "$type": "SelectionComponent", + "Id": 17252932649882883756 + }, + "Component_[2229055145450914672]": { + "$type": "EditorLockComponent", + "Id": 2229055145450914672 + }, + "Component_[2249882080644631374]": { + "$type": "EditorOnlyEntityComponent", + "Id": 2249882080644631374 + }, + "Component_[7205597372613518510]": { + "$type": "{27F1E1A1-8D9D-4C3B-BD3A-AFB9762449C0} TransformComponent", + "Id": 7205597372613518510, + "Parent Entity": "Entity_[505436088865]", + "Transform Data": { + "Translate": [ + 1.8866175413131714, + -9.999999974752427e-7, + 0.0 + ], + "Rotate": [ + 0.0, + 0.0, + 180.00001525878906 + ] + } + }, + "Component_[7918371639409185899]": { + "$type": "EditorDisabledCompositionComponent", + "Id": 7918371639409185899 + }, + "Component_[8564054653851438099]": { + "$type": "AZ::Render::EditorMeshComponent", + "Id": 8564054653851438099, + "Controller": { + "Configuration": { + "ModelAsset": { + "assetId": { + "guid": "{D0F73AAF-52B7-507C-B045-DBE2FE2D4403}", + "subId": 268677693 + }, + "assetHint": "objects/shaderball_simple/shaberball_simple_1m.azmodel" + }, + "LodOverride": 255 + } + } + } + } + }, + "Entity_[496846154273]": { + "Id": "Entity_[496846154273]", + "Name": "11_yellowish_green", + "Components": { + "Component_[12222961627447331506]": { + "$type": "EditorMaterialComponent", + "Id": 12222961627447331506, + "Controller": { + "Configuration": { + "materials": { + "{}": { + "MaterialAsset": { + "assetId": { + "guid": "{8D382D9F-D56E-523E-8372-C372B002B81D}" + }, + "assetHint": "materials/presets/macbeth/11_yellow_green.azmaterial" + } + } + } + } + }, + "materialSlotsByLodEnabled": true + }, + "Component_[12780007764330464223]": { + "$type": "EditorVisibilityComponent", + "Id": 12780007764330464223 + }, + "Component_[12904863407657276829]": { + "$type": "EditorInspectorComponent", + "Id": 12904863407657276829, + "ComponentOrderEntryArray": [ + { + "ComponentId": 7205597372613518510 + }, + { + "ComponentId": 8564054653851438099, + "SortIndex": 1 + }, + { + "ComponentId": 12222961627447331506, + "SortIndex": 2 + } + ] + }, + "Component_[13729618014821386240]": { + "$type": "EditorPendingCompositionComponent", + "Id": 13729618014821386240 + }, + "Component_[14429836600052599894]": { + "$type": "EditorEntityIconComponent", + "Id": 14429836600052599894 + }, + "Component_[14808014799413383215]": { + "$type": "EditorEntitySortComponent", + "Id": 14808014799413383215 + }, + "Component_[17252932649882883756]": { + "$type": "SelectionComponent", + "Id": 17252932649882883756 + }, + "Component_[2229055145450914672]": { + "$type": "EditorLockComponent", + "Id": 2229055145450914672 + }, + "Component_[2249882080644631374]": { + "$type": "EditorOnlyEntityComponent", + "Id": 2249882080644631374 + }, + "Component_[7205597372613518510]": { + "$type": "{27F1E1A1-8D9D-4C3B-BD3A-AFB9762449C0} TransformComponent", + "Id": 7205597372613518510, + "Parent Entity": "Entity_[505436088865]", + "Transform Data": { + "Translate": [ + 5.886617660522461, + -9.999999974752427e-7, + 0.0 + ], + "Rotate": [ + 0.0, + 0.0, + 180.00001525878906 + ] + } + }, + "Component_[7918371639409185899]": { + "$type": "EditorDisabledCompositionComponent", + "Id": 7918371639409185899 + }, + "Component_[8564054653851438099]": { + "$type": "AZ::Render::EditorMeshComponent", + "Id": 8564054653851438099, + "Controller": { + "Configuration": { + "ModelAsset": { + "assetId": { + "guid": "{D0F73AAF-52B7-507C-B045-DBE2FE2D4403}", + "subId": 268677693 + }, + "assetHint": "objects/shaderball_simple/shaberball_simple_1m.azmodel" + }, + "LodOverride": 255 + } + } + } + } + }, + "Entity_[501141121569]": { + "Id": "Entity_[501141121569]", + "Name": "12_orange_yellow", + "Components": { + "Component_[12222961627447331506]": { + "$type": "EditorMaterialComponent", + "Id": 12222961627447331506, + "Controller": { + "Configuration": { + "materials": { + "{}": { + "MaterialAsset": { + "assetId": { + "guid": "{7C8D9C96-8D79-5AA5-9A1D-DE68760127D7}" + }, + "assetHint": "materials/presets/macbeth/12_orange_yellow.azmaterial" + } + } + } + } + }, + "materialSlotsByLodEnabled": true + }, + "Component_[12780007764330464223]": { + "$type": "EditorVisibilityComponent", + "Id": 12780007764330464223 + }, + "Component_[12904863407657276829]": { + "$type": "EditorInspectorComponent", + "Id": 12904863407657276829, + "ComponentOrderEntryArray": [ + { + "ComponentId": 7205597372613518510 + }, + { + "ComponentId": 8564054653851438099, + "SortIndex": 1 + }, + { + "ComponentId": 12222961627447331506, + "SortIndex": 2 + } + ] + }, + "Component_[13729618014821386240]": { + "$type": "EditorPendingCompositionComponent", + "Id": 13729618014821386240 + }, + "Component_[14429836600052599894]": { + "$type": "EditorEntityIconComponent", + "Id": 14429836600052599894 + }, + "Component_[14808014799413383215]": { + "$type": "EditorEntitySortComponent", + "Id": 14808014799413383215 + }, + "Component_[17252932649882883756]": { + "$type": "SelectionComponent", + "Id": 17252932649882883756 + }, + "Component_[2229055145450914672]": { + "$type": "EditorLockComponent", + "Id": 2229055145450914672 + }, + "Component_[2249882080644631374]": { + "$type": "EditorOnlyEntityComponent", + "Id": 2249882080644631374 + }, + "Component_[7205597372613518510]": { + "$type": "{27F1E1A1-8D9D-4C3B-BD3A-AFB9762449C0} TransformComponent", + "Id": 7205597372613518510, + "Parent Entity": "Entity_[505436088865]", + "Transform Data": { + "Translate": [ + 9.886617660522461, + -9.999999974752427e-7, + 0.0 + ], + "Rotate": [ + 0.0, + 0.0, + 180.00001525878906 + ] + } + }, + "Component_[7918371639409185899]": { + "$type": "EditorDisabledCompositionComponent", + "Id": 7918371639409185899 + }, + "Component_[8564054653851438099]": { + "$type": "AZ::Render::EditorMeshComponent", + "Id": 8564054653851438099, + "Controller": { + "Configuration": { + "ModelAsset": { + "assetId": { + "guid": "{D0F73AAF-52B7-507C-B045-DBE2FE2D4403}", + "subId": 268677693 + }, + "assetHint": "objects/shaderball_simple/shaberball_simple_1m.azmodel" + }, + "LodOverride": 255 + } + } + } + } + }, + "Entity_[505436088865]": { + "Id": "Entity_[505436088865]", + "Name": "Row", + "Components": { + "Component_[10247332857034196288]": { + "$type": "EditorDisabledCompositionComponent", + "Id": 10247332857034196288 + }, + "Component_[1050259146293298025]": { + "$type": "EditorOnlyEntityComponent", + "Id": 1050259146293298025 + }, + "Component_[10963468433108777551]": { + "$type": "EditorInspectorComponent", + "Id": 10963468433108777551, + "ComponentOrderEntryArray": [ + { + "ComponentId": 5648156935684358836 + } + ] + }, + "Component_[11044618010943237536]": { + "$type": "EditorEntityIconComponent", + "Id": 11044618010943237536 + }, + "Component_[11056805018150955063]": { + "$type": "EditorEntitySortComponent", + "Id": 11056805018150955063, + "ChildEntityOrderEntryArray": [ + { + "EntityId": "Entity_[488256219681]" + }, + { + "EntityId": "Entity_[483961252385]", + "SortIndex": 1 + }, + { + "EntityId": "Entity_[479666285089]", + "SortIndex": 2 + }, + { + "EntityId": "Entity_[492551186977]", + "SortIndex": 3 + }, + { + "EntityId": "Entity_[496846154273]", + "SortIndex": 4 + }, + { + "EntityId": "Entity_[501141121569]", + "SortIndex": 5 + } + ] + }, + "Component_[11466054095979053511]": { + "$type": "EditorPendingCompositionComponent", + "Id": 11466054095979053511 + }, + "Component_[1364058654406679998]": { + "$type": "SelectionComponent", + "Id": 1364058654406679998 + }, + "Component_[1550934027474222562]": { + "$type": "EditorVisibilityComponent", + "Id": 1550934027474222562 + }, + "Component_[15938036103959223730]": { + "$type": "EditorLockComponent", + "Id": 15938036103959223730 + }, + "Component_[5648156935684358836]": { + "$type": "{27F1E1A1-8D9D-4C3B-BD3A-AFB9762449C0} TransformComponent", + "Id": 5648156935684358836, + "Parent Entity": "Entity_[471076350497]", + "Transform Data": { + "Translate": [ + 0.0, + 2.0, + 1.0 + ] + } + } + } + }, + "Entity_[509731056161]": { + "Id": "Entity_[509731056161]", + "Name": "Row", + "Components": { + "Component_[10247332857034196288]": { + "$type": "EditorDisabledCompositionComponent", + "Id": 10247332857034196288 + }, + "Component_[1050259146293298025]": { + "$type": "EditorOnlyEntityComponent", + "Id": 1050259146293298025 + }, + "Component_[10963468433108777551]": { + "$type": "EditorInspectorComponent", + "Id": 10963468433108777551, + "ComponentOrderEntryArray": [ + { + "ComponentId": 5648156935684358836 + } + ] + }, + "Component_[11044618010943237536]": { + "$type": "EditorEntityIconComponent", + "Id": 11044618010943237536 + }, + "Component_[11056805018150955063]": { + "$type": "EditorEntitySortComponent", + "Id": 11056805018150955063, + "ChildEntityOrderEntryArray": [ + { + "EntityId": "Entity_[522615958049]" + }, + { + "EntityId": "Entity_[518320990753]", + "SortIndex": 1 + }, + { + "EntityId": "Entity_[514026023457]", + "SortIndex": 2 + }, + { + "EntityId": "Entity_[526910925345]", + "SortIndex": 3 + }, + { + "EntityId": "Entity_[531205892641]", + "SortIndex": 4 + }, + { + "EntityId": "Entity_[535500859937]", + "SortIndex": 5 + } + ] + }, + "Component_[11466054095979053511]": { + "$type": "EditorPendingCompositionComponent", + "Id": 11466054095979053511 + }, + "Component_[1364058654406679998]": { + "$type": "SelectionComponent", + "Id": 1364058654406679998 + }, + "Component_[1550934027474222562]": { + "$type": "EditorVisibilityComponent", + "Id": 1550934027474222562 + }, + "Component_[15938036103959223730]": { + "$type": "EditorLockComponent", + "Id": 15938036103959223730 + }, + "Component_[5648156935684358836]": { + "$type": "{27F1E1A1-8D9D-4C3B-BD3A-AFB9762449C0} TransformComponent", + "Id": 5648156935684358836, + "Parent Entity": "Entity_[471076350497]", + "Transform Data": { + "Translate": [ + 0.0, + 6.0, + 1.0 + ] + } + } + } + }, + "Entity_[514026023457]": { + "Id": "Entity_[514026023457]", + "Name": "03_blue_sky", + "Components": { + "Component_[12222961627447331506]": { + "$type": "EditorMaterialComponent", + "Id": 12222961627447331506, + "Controller": { + "Configuration": { + "materials": { + "{}": { + "MaterialAsset": { + "assetId": { + "guid": "{65DF9715-8D50-5852-BDDF-345BF9A36AAF}" + }, + "assetHint": "materials/presets/macbeth/03_blue_sky.azmaterial" + } + } + } + } + }, + "materialSlotsByLodEnabled": true + }, + "Component_[12780007764330464223]": { + "$type": "EditorVisibilityComponent", + "Id": 12780007764330464223 + }, + "Component_[12904863407657276829]": { + "$type": "EditorInspectorComponent", + "Id": 12904863407657276829, + "ComponentOrderEntryArray": [ + { + "ComponentId": 7205597372613518510 + }, + { + "ComponentId": 8564054653851438099, + "SortIndex": 1 + }, + { + "ComponentId": 12222961627447331506, + "SortIndex": 2 + } + ] + }, + "Component_[13729618014821386240]": { + "$type": "EditorPendingCompositionComponent", + "Id": 13729618014821386240 + }, + "Component_[14429836600052599894]": { + "$type": "EditorEntityIconComponent", + "Id": 14429836600052599894 + }, + "Component_[14808014799413383215]": { + "$type": "EditorEntitySortComponent", + "Id": 14808014799413383215 + }, + "Component_[17252932649882883756]": { + "$type": "SelectionComponent", + "Id": 17252932649882883756 + }, + "Component_[2229055145450914672]": { + "$type": "EditorLockComponent", + "Id": 2229055145450914672 + }, + "Component_[2249882080644631374]": { + "$type": "EditorOnlyEntityComponent", + "Id": 2249882080644631374 + }, + "Component_[7205597372613518510]": { + "$type": "{27F1E1A1-8D9D-4C3B-BD3A-AFB9762449C0} TransformComponent", + "Id": 7205597372613518510, + "Parent Entity": "Entity_[509731056161]", + "Transform Data": { + "Translate": [ + -2.113382339477539, + -9.999999974752427e-7, + 0.0 + ], + "Rotate": [ + 0.0, + 0.0, + 180.00001525878906 + ] + } + }, + "Component_[7918371639409185899]": { + "$type": "EditorDisabledCompositionComponent", + "Id": 7918371639409185899 + }, + "Component_[8564054653851438099]": { + "$type": "AZ::Render::EditorMeshComponent", + "Id": 8564054653851438099, + "Controller": { + "Configuration": { + "ModelAsset": { + "assetId": { + "guid": "{D0F73AAF-52B7-507C-B045-DBE2FE2D4403}", + "subId": 268677693 + }, + "assetHint": "objects/shaderball_simple/shaberball_simple_1m.azmodel" + }, + "LodOverride": 255 + } + } + } + } + }, + "Entity_[518320990753]": { + "Id": "Entity_[518320990753]", + "Name": "02_light_skin", + "Components": { + "Component_[12222961627447331506]": { + "$type": "EditorMaterialComponent", + "Id": 12222961627447331506, + "Controller": { + "Configuration": { + "materials": { + "{}": { + "MaterialAsset": { + "assetId": { + "guid": "{0B0603C9-E7C3-5166-98EC-F8B3A4D469FB}" + }, + "assetHint": "materials/presets/macbeth/02_light_skin.azmaterial" + } + } + } + } + }, + "materialSlotsByLodEnabled": true + }, + "Component_[12780007764330464223]": { + "$type": "EditorVisibilityComponent", + "Id": 12780007764330464223 + }, + "Component_[12904863407657276829]": { + "$type": "EditorInspectorComponent", + "Id": 12904863407657276829, + "ComponentOrderEntryArray": [ + { + "ComponentId": 7205597372613518510 + }, + { + "ComponentId": 8564054653851438099, + "SortIndex": 1 + }, + { + "ComponentId": 12222961627447331506, + "SortIndex": 2 + } + ] + }, + "Component_[13729618014821386240]": { + "$type": "EditorPendingCompositionComponent", + "Id": 13729618014821386240 + }, + "Component_[14429836600052599894]": { + "$type": "EditorEntityIconComponent", + "Id": 14429836600052599894 + }, + "Component_[14808014799413383215]": { + "$type": "EditorEntitySortComponent", + "Id": 14808014799413383215 + }, + "Component_[17252932649882883756]": { + "$type": "SelectionComponent", + "Id": 17252932649882883756 + }, + "Component_[2229055145450914672]": { + "$type": "EditorLockComponent", + "Id": 2229055145450914672 + }, + "Component_[2249882080644631374]": { + "$type": "EditorOnlyEntityComponent", + "Id": 2249882080644631374 + }, + "Component_[7205597372613518510]": { + "$type": "{27F1E1A1-8D9D-4C3B-BD3A-AFB9762449C0} TransformComponent", + "Id": 7205597372613518510, + "Parent Entity": "Entity_[509731056161]", + "Transform Data": { + "Translate": [ + -6.113382339477539, + -9.999999974752427e-7, + 0.0 + ], + "Rotate": [ + 0.0, + 0.0, + 180.00001525878906 + ] + } + }, + "Component_[7918371639409185899]": { + "$type": "EditorDisabledCompositionComponent", + "Id": 7918371639409185899 + }, + "Component_[8564054653851438099]": { + "$type": "AZ::Render::EditorMeshComponent", + "Id": 8564054653851438099, + "Controller": { + "Configuration": { + "ModelAsset": { + "assetId": { + "guid": "{D0F73AAF-52B7-507C-B045-DBE2FE2D4403}", + "subId": 268677693 + }, + "assetHint": "objects/shaderball_simple/shaberball_simple_1m.azmodel" + }, + "LodOverride": 255 + } + } + } + } + }, + "Entity_[522615958049]": { + "Id": "Entity_[522615958049]", + "Name": "01_dark_skin", + "Components": { + "Component_[12222961627447331506]": { + "$type": "EditorMaterialComponent", + "Id": 12222961627447331506, + "Controller": { + "Configuration": { + "materials": { + "{}": { + "MaterialAsset": { + "assetId": { + "guid": "{73B6CE55-0766-51FD-8D9C-92C60862D270}" + }, + "assetHint": "materials/presets/macbeth/01_dark_skin.azmaterial" + } + } + } + } + }, + "materialSlotsByLodEnabled": true + }, + "Component_[12780007764330464223]": { + "$type": "EditorVisibilityComponent", + "Id": 12780007764330464223 + }, + "Component_[12904863407657276829]": { + "$type": "EditorInspectorComponent", + "Id": 12904863407657276829, + "ComponentOrderEntryArray": [ + { + "ComponentId": 7205597372613518510 + }, + { + "ComponentId": 8564054653851438099, + "SortIndex": 1 + }, + { + "ComponentId": 12222961627447331506, + "SortIndex": 2 + } + ] + }, + "Component_[13729618014821386240]": { + "$type": "EditorPendingCompositionComponent", + "Id": 13729618014821386240 + }, + "Component_[14429836600052599894]": { + "$type": "EditorEntityIconComponent", + "Id": 14429836600052599894 + }, + "Component_[14808014799413383215]": { + "$type": "EditorEntitySortComponent", + "Id": 14808014799413383215 + }, + "Component_[17252932649882883756]": { + "$type": "SelectionComponent", + "Id": 17252932649882883756 + }, + "Component_[2229055145450914672]": { + "$type": "EditorLockComponent", + "Id": 2229055145450914672 + }, + "Component_[2249882080644631374]": { + "$type": "EditorOnlyEntityComponent", + "Id": 2249882080644631374 + }, + "Component_[7205597372613518510]": { + "$type": "{27F1E1A1-8D9D-4C3B-BD3A-AFB9762449C0} TransformComponent", + "Id": 7205597372613518510, + "Parent Entity": "Entity_[509731056161]", + "Transform Data": { + "Translate": [ + -10.113382339477539, + -9.999999974752427e-7, + 0.0 + ], + "Rotate": [ + 0.0, + 0.0, + 180.00001525878906 + ] + } + }, + "Component_[7918371639409185899]": { + "$type": "EditorDisabledCompositionComponent", + "Id": 7918371639409185899 + }, + "Component_[8564054653851438099]": { + "$type": "AZ::Render::EditorMeshComponent", + "Id": 8564054653851438099, + "Controller": { + "Configuration": { + "ModelAsset": { + "assetId": { + "guid": "{D0F73AAF-52B7-507C-B045-DBE2FE2D4403}", + "subId": 268677693 + }, + "assetHint": "objects/shaderball_simple/shaberball_simple_1m.azmodel" + }, + "LodOverride": 255 + } + } + } + } + }, + "Entity_[526910925345]": { + "Id": "Entity_[526910925345]", + "Name": "04_foliage", + "Components": { + "Component_[12222961627447331506]": { + "$type": "EditorMaterialComponent", + "Id": 12222961627447331506, + "Controller": { + "Configuration": { + "materials": { + "{}": { + "MaterialAsset": { + "assetId": { + "guid": "{C11C560D-F984-5836-928A-45CF96179862}" + }, + "assetHint": "materials/presets/macbeth/04_foliage.azmaterial" + } + } + } + } + }, + "materialSlotsByLodEnabled": true + }, + "Component_[12780007764330464223]": { + "$type": "EditorVisibilityComponent", + "Id": 12780007764330464223 + }, + "Component_[12904863407657276829]": { + "$type": "EditorInspectorComponent", + "Id": 12904863407657276829, + "ComponentOrderEntryArray": [ + { + "ComponentId": 7205597372613518510 + }, + { + "ComponentId": 8564054653851438099, + "SortIndex": 1 + }, + { + "ComponentId": 12222961627447331506, + "SortIndex": 2 + } + ] + }, + "Component_[13729618014821386240]": { + "$type": "EditorPendingCompositionComponent", + "Id": 13729618014821386240 + }, + "Component_[14429836600052599894]": { + "$type": "EditorEntityIconComponent", + "Id": 14429836600052599894 + }, + "Component_[14808014799413383215]": { + "$type": "EditorEntitySortComponent", + "Id": 14808014799413383215 + }, + "Component_[17252932649882883756]": { + "$type": "SelectionComponent", + "Id": 17252932649882883756 + }, + "Component_[2229055145450914672]": { + "$type": "EditorLockComponent", + "Id": 2229055145450914672 + }, + "Component_[2249882080644631374]": { + "$type": "EditorOnlyEntityComponent", + "Id": 2249882080644631374 + }, + "Component_[7205597372613518510]": { + "$type": "{27F1E1A1-8D9D-4C3B-BD3A-AFB9762449C0} TransformComponent", + "Id": 7205597372613518510, + "Parent Entity": "Entity_[509731056161]", + "Transform Data": { + "Translate": [ + 1.8866175413131714, + -9.999999974752427e-7, + 0.0 + ], + "Rotate": [ + 0.0, + 0.0, + 180.00001525878906 + ] + } + }, + "Component_[7918371639409185899]": { + "$type": "EditorDisabledCompositionComponent", + "Id": 7918371639409185899 + }, + "Component_[8564054653851438099]": { + "$type": "AZ::Render::EditorMeshComponent", + "Id": 8564054653851438099, + "Controller": { + "Configuration": { + "ModelAsset": { + "assetId": { + "guid": "{D0F73AAF-52B7-507C-B045-DBE2FE2D4403}", + "subId": 268677693 + }, + "assetHint": "objects/shaderball_simple/shaberball_simple_1m.azmodel" + }, + "LodOverride": 255 + } + } + } + } + }, + "Entity_[531205892641]": { + "Id": "Entity_[531205892641]", + "Name": "05_blue_flower", + "Components": { + "Component_[12222961627447331506]": { + "$type": "EditorMaterialComponent", + "Id": 12222961627447331506, + "Controller": { + "Configuration": { + "materials": { + "{}": { + "MaterialAsset": { + "assetId": { + "guid": "{3326A6D9-FEA4-5CDE-AE4A-8BD28DF3A7CA}" + }, + "assetHint": "materials/presets/macbeth/05_blue_flower.azmaterial" + } + } + } + } + }, + "materialSlotsByLodEnabled": true + }, + "Component_[12780007764330464223]": { + "$type": "EditorVisibilityComponent", + "Id": 12780007764330464223 + }, + "Component_[12904863407657276829]": { + "$type": "EditorInspectorComponent", + "Id": 12904863407657276829, + "ComponentOrderEntryArray": [ + { + "ComponentId": 7205597372613518510 + }, + { + "ComponentId": 8564054653851438099, + "SortIndex": 1 + }, + { + "ComponentId": 12222961627447331506, + "SortIndex": 2 + } + ] + }, + "Component_[13729618014821386240]": { + "$type": "EditorPendingCompositionComponent", + "Id": 13729618014821386240 + }, + "Component_[14429836600052599894]": { + "$type": "EditorEntityIconComponent", + "Id": 14429836600052599894 + }, + "Component_[14808014799413383215]": { + "$type": "EditorEntitySortComponent", + "Id": 14808014799413383215 + }, + "Component_[17252932649882883756]": { + "$type": "SelectionComponent", + "Id": 17252932649882883756 + }, + "Component_[2229055145450914672]": { + "$type": "EditorLockComponent", + "Id": 2229055145450914672 + }, + "Component_[2249882080644631374]": { + "$type": "EditorOnlyEntityComponent", + "Id": 2249882080644631374 + }, + "Component_[7205597372613518510]": { + "$type": "{27F1E1A1-8D9D-4C3B-BD3A-AFB9762449C0} TransformComponent", + "Id": 7205597372613518510, + "Parent Entity": "Entity_[509731056161]", + "Transform Data": { + "Translate": [ + 5.886617660522461, + -9.999999974752427e-7, + 0.0 + ], + "Rotate": [ + 0.0, + 0.0, + 180.00001525878906 + ] + } + }, + "Component_[7918371639409185899]": { + "$type": "EditorDisabledCompositionComponent", + "Id": 7918371639409185899 + }, + "Component_[8564054653851438099]": { + "$type": "AZ::Render::EditorMeshComponent", + "Id": 8564054653851438099, + "Controller": { + "Configuration": { + "ModelAsset": { + "assetId": { + "guid": "{D0F73AAF-52B7-507C-B045-DBE2FE2D4403}", + "subId": 268677693 + }, + "assetHint": "objects/shaderball_simple/shaberball_simple_1m.azmodel" + }, + "LodOverride": 255 + } + } + } + } + }, + "Entity_[535500859937]": { + "Id": "Entity_[535500859937]", + "Name": "06_bluish_green", + "Components": { + "Component_[12222961627447331506]": { + "$type": "EditorMaterialComponent", + "Id": 12222961627447331506, + "Controller": { + "Configuration": { + "materials": { + "{}": { + "MaterialAsset": { + "assetId": { + "guid": "{BD7A8B80-242E-50CC-900F-9001945C5A0C}" + }, + "assetHint": "materials/presets/macbeth/06_bluish_green.azmaterial" + } + } + } + } + }, + "materialSlotsByLodEnabled": true + }, + "Component_[12780007764330464223]": { + "$type": "EditorVisibilityComponent", + "Id": 12780007764330464223 + }, + "Component_[12904863407657276829]": { + "$type": "EditorInspectorComponent", + "Id": 12904863407657276829, + "ComponentOrderEntryArray": [ + { + "ComponentId": 7205597372613518510 + }, + { + "ComponentId": 8564054653851438099, + "SortIndex": 1 + }, + { + "ComponentId": 12222961627447331506, + "SortIndex": 2 + } + ] + }, + "Component_[13729618014821386240]": { + "$type": "EditorPendingCompositionComponent", + "Id": 13729618014821386240 + }, + "Component_[14429836600052599894]": { + "$type": "EditorEntityIconComponent", + "Id": 14429836600052599894 + }, + "Component_[14808014799413383215]": { + "$type": "EditorEntitySortComponent", + "Id": 14808014799413383215 + }, + "Component_[17252932649882883756]": { + "$type": "SelectionComponent", + "Id": 17252932649882883756 + }, + "Component_[2229055145450914672]": { + "$type": "EditorLockComponent", + "Id": 2229055145450914672 + }, + "Component_[2249882080644631374]": { + "$type": "EditorOnlyEntityComponent", + "Id": 2249882080644631374 + }, + "Component_[7205597372613518510]": { + "$type": "{27F1E1A1-8D9D-4C3B-BD3A-AFB9762449C0} TransformComponent", + "Id": 7205597372613518510, + "Parent Entity": "Entity_[509731056161]", + "Transform Data": { + "Translate": [ + 9.886617660522461, + -9.999999974752427e-7, + 0.0 + ], + "Rotate": [ + 0.0, + 0.0, + 180.00001525878906 + ] + } + }, + "Component_[7918371639409185899]": { + "$type": "EditorDisabledCompositionComponent", + "Id": 7918371639409185899 + }, + "Component_[8564054653851438099]": { + "$type": "AZ::Render::EditorMeshComponent", + "Id": 8564054653851438099, + "Controller": { + "Configuration": { + "ModelAsset": { + "assetId": { + "guid": "{D0F73AAF-52B7-507C-B045-DBE2FE2D4403}", + "subId": 268677693 + }, + "assetHint": "objects/shaderball_simple/shaberball_simple_1m.azmodel" + }, + "LodOverride": 255 + } + } + } + } + }, + "Entity_[539795827233]": { + "Id": "Entity_[539795827233]", + "Name": "Row", + "Components": { + "Component_[10247332857034196288]": { + "$type": "EditorDisabledCompositionComponent", + "Id": 10247332857034196288 + }, + "Component_[1050259146293298025]": { + "$type": "EditorOnlyEntityComponent", + "Id": 1050259146293298025 + }, + "Component_[10963468433108777551]": { + "$type": "EditorInspectorComponent", + "Id": 10963468433108777551, + "ComponentOrderEntryArray": [ + { + "ComponentId": 5648156935684358836 + } + ] + }, + "Component_[11044618010943237536]": { + "$type": "EditorEntityIconComponent", + "Id": 11044618010943237536 + }, + "Component_[11056805018150955063]": { + "$type": "EditorEntitySortComponent", + "Id": 11056805018150955063, + "ChildEntityOrderEntryArray": [ + { + "EntityId": "Entity_[552680729121]" + }, + { + "EntityId": "Entity_[548385761825]", + "SortIndex": 1 + }, + { + "EntityId": "Entity_[544090794529]", + "SortIndex": 2 + }, + { + "EntityId": "Entity_[556975696417]", + "SortIndex": 3 + }, + { + "EntityId": "Entity_[561270663713]", + "SortIndex": 4 + }, + { + "EntityId": "Entity_[565565631009]", + "SortIndex": 5 + } + ] + }, + "Component_[11466054095979053511]": { + "$type": "EditorPendingCompositionComponent", + "Id": 11466054095979053511 + }, + "Component_[1364058654406679998]": { + "$type": "SelectionComponent", + "Id": 1364058654406679998 + }, + "Component_[1550934027474222562]": { + "$type": "EditorVisibilityComponent", + "Id": 1550934027474222562 + }, + "Component_[15938036103959223730]": { + "$type": "EditorLockComponent", + "Id": 15938036103959223730 + }, + "Component_[5648156935684358836]": { + "$type": "{27F1E1A1-8D9D-4C3B-BD3A-AFB9762449C0} TransformComponent", + "Id": 5648156935684358836, + "Parent Entity": "Entity_[471076350497]", + "Transform Data": { + "Translate": [ + 0.0, + -2.0, + 1.0 + ] + } + } + } + }, + "Entity_[544090794529]": { + "Id": "Entity_[544090794529]", + "Name": "15_red", + "Components": { + "Component_[12222961627447331506]": { + "$type": "EditorMaterialComponent", + "Id": 12222961627447331506, + "Controller": { + "Configuration": { + "materials": { + "{}": { + "MaterialAsset": { + "assetId": { + "guid": "{9C47066E-BD8F-5C1B-B935-933296BBE312}" + }, + "assetHint": "materials/presets/macbeth/15_red.azmaterial" + } + } + } + } + }, + "materialSlotsByLodEnabled": true + }, + "Component_[12780007764330464223]": { + "$type": "EditorVisibilityComponent", + "Id": 12780007764330464223 + }, + "Component_[12904863407657276829]": { + "$type": "EditorInspectorComponent", + "Id": 12904863407657276829, + "ComponentOrderEntryArray": [ + { + "ComponentId": 7205597372613518510 + }, + { + "ComponentId": 8564054653851438099, + "SortIndex": 1 + }, + { + "ComponentId": 12222961627447331506, + "SortIndex": 2 + } + ] + }, + "Component_[13729618014821386240]": { + "$type": "EditorPendingCompositionComponent", + "Id": 13729618014821386240 + }, + "Component_[14429836600052599894]": { + "$type": "EditorEntityIconComponent", + "Id": 14429836600052599894 + }, + "Component_[14808014799413383215]": { + "$type": "EditorEntitySortComponent", + "Id": 14808014799413383215 + }, + "Component_[17252932649882883756]": { + "$type": "SelectionComponent", + "Id": 17252932649882883756 + }, + "Component_[2229055145450914672]": { + "$type": "EditorLockComponent", + "Id": 2229055145450914672 + }, + "Component_[2249882080644631374]": { + "$type": "EditorOnlyEntityComponent", + "Id": 2249882080644631374 + }, + "Component_[7205597372613518510]": { + "$type": "{27F1E1A1-8D9D-4C3B-BD3A-AFB9762449C0} TransformComponent", + "Id": 7205597372613518510, + "Parent Entity": "Entity_[539795827233]", + "Transform Data": { + "Translate": [ + -2.113382339477539, + -9.999999974752427e-7, + 0.0 + ], + "Rotate": [ + 0.0, + 0.0, + 180.00001525878906 + ] + } + }, + "Component_[7918371639409185899]": { + "$type": "EditorDisabledCompositionComponent", + "Id": 7918371639409185899 + }, + "Component_[8564054653851438099]": { + "$type": "AZ::Render::EditorMeshComponent", + "Id": 8564054653851438099, + "Controller": { + "Configuration": { + "ModelAsset": { + "assetId": { + "guid": "{D0F73AAF-52B7-507C-B045-DBE2FE2D4403}", + "subId": 268677693 + }, + "assetHint": "objects/shaderball_simple/shaberball_simple_1m.azmodel" + }, + "LodOverride": 255 + } + } + } + } + }, + "Entity_[548385761825]": { + "Id": "Entity_[548385761825]", + "Name": "14_green", + "Components": { + "Component_[12222961627447331506]": { + "$type": "EditorMaterialComponent", + "Id": 12222961627447331506, + "Controller": { + "Configuration": { + "materials": { + "{}": { + "MaterialAsset": { + "assetId": { + "guid": "{82346ED7-D369-5EF0-A7E0-70C1082EE073}" + }, + "assetHint": "materials/presets/macbeth/14_green.azmaterial" + } + } + } + } + }, + "materialSlotsByLodEnabled": true + }, + "Component_[12780007764330464223]": { + "$type": "EditorVisibilityComponent", + "Id": 12780007764330464223 + }, + "Component_[12904863407657276829]": { + "$type": "EditorInspectorComponent", + "Id": 12904863407657276829, + "ComponentOrderEntryArray": [ + { + "ComponentId": 7205597372613518510 + }, + { + "ComponentId": 8564054653851438099, + "SortIndex": 1 + }, + { + "ComponentId": 12222961627447331506, + "SortIndex": 2 + } + ] + }, + "Component_[13729618014821386240]": { + "$type": "EditorPendingCompositionComponent", + "Id": 13729618014821386240 + }, + "Component_[14429836600052599894]": { + "$type": "EditorEntityIconComponent", + "Id": 14429836600052599894 + }, + "Component_[14808014799413383215]": { + "$type": "EditorEntitySortComponent", + "Id": 14808014799413383215 + }, + "Component_[17252932649882883756]": { + "$type": "SelectionComponent", + "Id": 17252932649882883756 + }, + "Component_[2229055145450914672]": { + "$type": "EditorLockComponent", + "Id": 2229055145450914672 + }, + "Component_[2249882080644631374]": { + "$type": "EditorOnlyEntityComponent", + "Id": 2249882080644631374 + }, + "Component_[7205597372613518510]": { + "$type": "{27F1E1A1-8D9D-4C3B-BD3A-AFB9762449C0} TransformComponent", + "Id": 7205597372613518510, + "Parent Entity": "Entity_[539795827233]", + "Transform Data": { + "Translate": [ + -6.113382339477539, + -9.999999974752427e-7, + 0.0 + ], + "Rotate": [ + 0.0, + 0.0, + 180.00001525878906 + ] + } + }, + "Component_[7918371639409185899]": { + "$type": "EditorDisabledCompositionComponent", + "Id": 7918371639409185899 + }, + "Component_[8564054653851438099]": { + "$type": "AZ::Render::EditorMeshComponent", + "Id": 8564054653851438099, + "Controller": { + "Configuration": { + "ModelAsset": { + "assetId": { + "guid": "{D0F73AAF-52B7-507C-B045-DBE2FE2D4403}", + "subId": 268677693 + }, + "assetHint": "objects/shaderball_simple/shaberball_simple_1m.azmodel" + }, + "LodOverride": 255 + } + } + } + } + }, + "Entity_[552680729121]": { + "Id": "Entity_[552680729121]", + "Name": "13_blue", + "Components": { + "Component_[12222961627447331506]": { + "$type": "EditorMaterialComponent", + "Id": 12222961627447331506, + "Controller": { + "Configuration": { + "materials": { + "{}": { + "MaterialAsset": { + "assetId": { + "guid": "{B8972ADB-DBA9-5807-9742-2B14453FDD96}" + }, + "assetHint": "materials/presets/macbeth/13_blue.azmaterial" + } + } + } + } + }, + "materialSlotsByLodEnabled": true + }, + "Component_[12780007764330464223]": { + "$type": "EditorVisibilityComponent", + "Id": 12780007764330464223 + }, + "Component_[12904863407657276829]": { + "$type": "EditorInspectorComponent", + "Id": 12904863407657276829, + "ComponentOrderEntryArray": [ + { + "ComponentId": 7205597372613518510 + }, + { + "ComponentId": 8564054653851438099, + "SortIndex": 1 + }, + { + "ComponentId": 12222961627447331506, + "SortIndex": 2 + } + ] + }, + "Component_[13729618014821386240]": { + "$type": "EditorPendingCompositionComponent", + "Id": 13729618014821386240 + }, + "Component_[14429836600052599894]": { + "$type": "EditorEntityIconComponent", + "Id": 14429836600052599894 + }, + "Component_[14808014799413383215]": { + "$type": "EditorEntitySortComponent", + "Id": 14808014799413383215 + }, + "Component_[17252932649882883756]": { + "$type": "SelectionComponent", + "Id": 17252932649882883756 + }, + "Component_[2229055145450914672]": { + "$type": "EditorLockComponent", + "Id": 2229055145450914672 + }, + "Component_[2249882080644631374]": { + "$type": "EditorOnlyEntityComponent", + "Id": 2249882080644631374 + }, + "Component_[7205597372613518510]": { + "$type": "{27F1E1A1-8D9D-4C3B-BD3A-AFB9762449C0} TransformComponent", + "Id": 7205597372613518510, + "Parent Entity": "Entity_[539795827233]", + "Transform Data": { + "Translate": [ + -10.113382339477539, + -9.999999974752427e-7, + 0.0 + ], + "Rotate": [ + 0.0, + 0.0, + 180.00001525878906 + ] + } + }, + "Component_[7918371639409185899]": { + "$type": "EditorDisabledCompositionComponent", + "Id": 7918371639409185899 + }, + "Component_[8564054653851438099]": { + "$type": "AZ::Render::EditorMeshComponent", + "Id": 8564054653851438099, + "Controller": { + "Configuration": { + "ModelAsset": { + "assetId": { + "guid": "{D0F73AAF-52B7-507C-B045-DBE2FE2D4403}", + "subId": 268677693 + }, + "assetHint": "objects/shaderball_simple/shaberball_simple_1m.azmodel" + }, + "LodOverride": 255 + } + } + } + } + }, + "Entity_[556975696417]": { + "Id": "Entity_[556975696417]", + "Name": "16_yellow", + "Components": { + "Component_[12222961627447331506]": { + "$type": "EditorMaterialComponent", + "Id": 12222961627447331506, + "Controller": { + "Configuration": { + "materials": { + "{}": { + "MaterialAsset": { + "assetId": { + "guid": "{099BB2A1-F76E-5B77-BCFD-B0A6249F0EA3}" + }, + "assetHint": "materials/presets/macbeth/16_yellow.azmaterial" + } + } + } + } + }, + "materialSlotsByLodEnabled": true + }, + "Component_[12780007764330464223]": { + "$type": "EditorVisibilityComponent", + "Id": 12780007764330464223 + }, + "Component_[12904863407657276829]": { + "$type": "EditorInspectorComponent", + "Id": 12904863407657276829, + "ComponentOrderEntryArray": [ + { + "ComponentId": 7205597372613518510 + }, + { + "ComponentId": 8564054653851438099, + "SortIndex": 1 + }, + { + "ComponentId": 12222961627447331506, + "SortIndex": 2 + } + ] + }, + "Component_[13729618014821386240]": { + "$type": "EditorPendingCompositionComponent", + "Id": 13729618014821386240 + }, + "Component_[14429836600052599894]": { + "$type": "EditorEntityIconComponent", + "Id": 14429836600052599894 + }, + "Component_[14808014799413383215]": { + "$type": "EditorEntitySortComponent", + "Id": 14808014799413383215 + }, + "Component_[17252932649882883756]": { + "$type": "SelectionComponent", + "Id": 17252932649882883756 + }, + "Component_[2229055145450914672]": { + "$type": "EditorLockComponent", + "Id": 2229055145450914672 + }, + "Component_[2249882080644631374]": { + "$type": "EditorOnlyEntityComponent", + "Id": 2249882080644631374 + }, + "Component_[7205597372613518510]": { + "$type": "{27F1E1A1-8D9D-4C3B-BD3A-AFB9762449C0} TransformComponent", + "Id": 7205597372613518510, + "Parent Entity": "Entity_[539795827233]", + "Transform Data": { + "Translate": [ + 1.8866175413131714, + -9.999999974752427e-7, + 0.0 + ], + "Rotate": [ + 0.0, + 0.0, + 180.00001525878906 + ] + } + }, + "Component_[7918371639409185899]": { + "$type": "EditorDisabledCompositionComponent", + "Id": 7918371639409185899 + }, + "Component_[8564054653851438099]": { + "$type": "AZ::Render::EditorMeshComponent", + "Id": 8564054653851438099, + "Controller": { + "Configuration": { + "ModelAsset": { + "assetId": { + "guid": "{D0F73AAF-52B7-507C-B045-DBE2FE2D4403}", + "subId": 268677693 + }, + "assetHint": "objects/shaderball_simple/shaberball_simple_1m.azmodel" + }, + "LodOverride": 255 + } + } + } + } + }, + "Entity_[561270663713]": { + "Id": "Entity_[561270663713]", + "Name": "17_magenta", + "Components": { + "Component_[12222961627447331506]": { + "$type": "EditorMaterialComponent", + "Id": 12222961627447331506, + "Controller": { + "Configuration": { + "materials": { + "{}": { + "MaterialAsset": { + "assetId": { + "guid": "{2A83451E-0FE6-508E-BAA2-6142AAA53C42}" + }, + "assetHint": "materials/presets/macbeth/17_magenta.azmaterial" + } + } + } + } + }, + "materialSlotsByLodEnabled": true + }, + "Component_[12780007764330464223]": { + "$type": "EditorVisibilityComponent", + "Id": 12780007764330464223 + }, + "Component_[12904863407657276829]": { + "$type": "EditorInspectorComponent", + "Id": 12904863407657276829, + "ComponentOrderEntryArray": [ + { + "ComponentId": 7205597372613518510 + }, + { + "ComponentId": 8564054653851438099, + "SortIndex": 1 + }, + { + "ComponentId": 12222961627447331506, + "SortIndex": 2 + } + ] + }, + "Component_[13729618014821386240]": { + "$type": "EditorPendingCompositionComponent", + "Id": 13729618014821386240 + }, + "Component_[14429836600052599894]": { + "$type": "EditorEntityIconComponent", + "Id": 14429836600052599894 + }, + "Component_[14808014799413383215]": { + "$type": "EditorEntitySortComponent", + "Id": 14808014799413383215 + }, + "Component_[17252932649882883756]": { + "$type": "SelectionComponent", + "Id": 17252932649882883756 + }, + "Component_[2229055145450914672]": { + "$type": "EditorLockComponent", + "Id": 2229055145450914672 + }, + "Component_[2249882080644631374]": { + "$type": "EditorOnlyEntityComponent", + "Id": 2249882080644631374 + }, + "Component_[7205597372613518510]": { + "$type": "{27F1E1A1-8D9D-4C3B-BD3A-AFB9762449C0} TransformComponent", + "Id": 7205597372613518510, + "Parent Entity": "Entity_[539795827233]", + "Transform Data": { + "Translate": [ + 5.886617660522461, + -9.999999974752427e-7, + 0.0 + ], + "Rotate": [ + 0.0, + 0.0, + 180.00001525878906 + ] + } + }, + "Component_[7918371639409185899]": { + "$type": "EditorDisabledCompositionComponent", + "Id": 7918371639409185899 + }, + "Component_[8564054653851438099]": { + "$type": "AZ::Render::EditorMeshComponent", + "Id": 8564054653851438099, + "Controller": { + "Configuration": { + "ModelAsset": { + "assetId": { + "guid": "{D0F73AAF-52B7-507C-B045-DBE2FE2D4403}", + "subId": 268677693 + }, + "assetHint": "objects/shaderball_simple/shaberball_simple_1m.azmodel" + }, + "LodOverride": 255 + } + } + } + } + }, + "Entity_[565565631009]": { + "Id": "Entity_[565565631009]", + "Name": "18_cyan", + "Components": { + "Component_[12222961627447331506]": { + "$type": "EditorMaterialComponent", + "Id": 12222961627447331506, + "Controller": { + "Configuration": { + "materials": { + "{}": { + "MaterialAsset": { + "assetId": { + "guid": "{6949B983-05D6-50A4-9D43-A6CDAB2BF3F5}" + }, + "assetHint": "materials/presets/macbeth/18_cyan.azmaterial" + } + } + } + } + }, + "materialSlotsByLodEnabled": true + }, + "Component_[12780007764330464223]": { + "$type": "EditorVisibilityComponent", + "Id": 12780007764330464223 + }, + "Component_[12904863407657276829]": { + "$type": "EditorInspectorComponent", + "Id": 12904863407657276829, + "ComponentOrderEntryArray": [ + { + "ComponentId": 7205597372613518510 + }, + { + "ComponentId": 8564054653851438099, + "SortIndex": 1 + }, + { + "ComponentId": 12222961627447331506, + "SortIndex": 2 + } + ] + }, + "Component_[13729618014821386240]": { + "$type": "EditorPendingCompositionComponent", + "Id": 13729618014821386240 + }, + "Component_[14429836600052599894]": { + "$type": "EditorEntityIconComponent", + "Id": 14429836600052599894 + }, + "Component_[14808014799413383215]": { + "$type": "EditorEntitySortComponent", + "Id": 14808014799413383215 + }, + "Component_[17252932649882883756]": { + "$type": "SelectionComponent", + "Id": 17252932649882883756 + }, + "Component_[2229055145450914672]": { + "$type": "EditorLockComponent", + "Id": 2229055145450914672 + }, + "Component_[2249882080644631374]": { + "$type": "EditorOnlyEntityComponent", + "Id": 2249882080644631374 + }, + "Component_[7205597372613518510]": { + "$type": "{27F1E1A1-8D9D-4C3B-BD3A-AFB9762449C0} TransformComponent", + "Id": 7205597372613518510, + "Parent Entity": "Entity_[539795827233]", + "Transform Data": { + "Translate": [ + 9.886617660522461, + -9.999999974752427e-7, + 0.0 + ], + "Rotate": [ + 0.0, + 0.0, + 180.00001525878906 + ] + } + }, + "Component_[7918371639409185899]": { + "$type": "EditorDisabledCompositionComponent", + "Id": 7918371639409185899 + }, + "Component_[8564054653851438099]": { + "$type": "AZ::Render::EditorMeshComponent", + "Id": 8564054653851438099, + "Controller": { + "Configuration": { + "ModelAsset": { + "assetId": { + "guid": "{D0F73AAF-52B7-507C-B045-DBE2FE2D4403}", + "subId": 268677693 + }, + "assetHint": "objects/shaderball_simple/shaberball_simple_1m.azmodel" + }, + "LodOverride": 255 + } + } + } + } + }, + "Entity_[569860598305]": { + "Id": "Entity_[569860598305]", + "Name": "Row", + "Components": { + "Component_[10247332857034196288]": { + "$type": "EditorDisabledCompositionComponent", + "Id": 10247332857034196288 + }, + "Component_[1050259146293298025]": { + "$type": "EditorOnlyEntityComponent", + "Id": 1050259146293298025 + }, + "Component_[10963468433108777551]": { + "$type": "EditorInspectorComponent", + "Id": 10963468433108777551, + "ComponentOrderEntryArray": [ + { + "ComponentId": 5648156935684358836 + } + ] + }, + "Component_[11044618010943237536]": { + "$type": "EditorEntityIconComponent", + "Id": 11044618010943237536 + }, + "Component_[11056805018150955063]": { + "$type": "EditorEntitySortComponent", + "Id": 11056805018150955063, + "ChildEntityOrderEntryArray": [ + { + "EntityId": "Entity_[582745500193]" + }, + { + "EntityId": "Entity_[578450532897]", + "SortIndex": 1 + }, + { + "EntityId": "Entity_[574155565601]", + "SortIndex": 2 + }, + { + "EntityId": "Entity_[587040467489]", + "SortIndex": 3 + }, + { + "EntityId": "Entity_[591335434785]", + "SortIndex": 4 + }, + { + "EntityId": "Entity_[595630402081]", + "SortIndex": 5 + } + ] + }, + "Component_[11466054095979053511]": { + "$type": "EditorPendingCompositionComponent", + "Id": 11466054095979053511 + }, + "Component_[1364058654406679998]": { + "$type": "SelectionComponent", + "Id": 1364058654406679998 + }, + "Component_[1550934027474222562]": { + "$type": "EditorVisibilityComponent", + "Id": 1550934027474222562 + }, + "Component_[15938036103959223730]": { + "$type": "EditorLockComponent", + "Id": 15938036103959223730 + }, + "Component_[5648156935684358836]": { + "$type": "{27F1E1A1-8D9D-4C3B-BD3A-AFB9762449C0} TransformComponent", + "Id": 5648156935684358836, + "Parent Entity": "Entity_[471076350497]", + "Transform Data": { + "Translate": [ + 0.0, + -6.0, + 1.0 + ] + } + } + } + }, + "Entity_[574155565601]": { + "Id": "Entity_[574155565601]", + "Name": "21_neutral_6.5", + "Components": { + "Component_[12222961627447331506]": { + "$type": "EditorMaterialComponent", + "Id": 12222961627447331506, + "Controller": { + "Configuration": { + "materials": { + "{}": { + "MaterialAsset": { + "assetId": { + "guid": "{ADAA8BF6-1580-5684-A7F5-4B0150117375}" + }, + "assetHint": "materials/presets/macbeth/21_neutral_6-5_0-44d.azmaterial" + } + } + } + } + }, + "materialSlotsByLodEnabled": true + }, + "Component_[12780007764330464223]": { + "$type": "EditorVisibilityComponent", + "Id": 12780007764330464223 + }, + "Component_[12904863407657276829]": { + "$type": "EditorInspectorComponent", + "Id": 12904863407657276829, + "ComponentOrderEntryArray": [ + { + "ComponentId": 7205597372613518510 + }, + { + "ComponentId": 8564054653851438099, + "SortIndex": 1 + }, + { + "ComponentId": 12222961627447331506, + "SortIndex": 2 + } + ] + }, + "Component_[13729618014821386240]": { + "$type": "EditorPendingCompositionComponent", + "Id": 13729618014821386240 + }, + "Component_[14429836600052599894]": { + "$type": "EditorEntityIconComponent", + "Id": 14429836600052599894 + }, + "Component_[14808014799413383215]": { + "$type": "EditorEntitySortComponent", + "Id": 14808014799413383215 + }, + "Component_[17252932649882883756]": { + "$type": "SelectionComponent", + "Id": 17252932649882883756 + }, + "Component_[2229055145450914672]": { + "$type": "EditorLockComponent", + "Id": 2229055145450914672 + }, + "Component_[2249882080644631374]": { + "$type": "EditorOnlyEntityComponent", + "Id": 2249882080644631374 + }, + "Component_[7205597372613518510]": { + "$type": "{27F1E1A1-8D9D-4C3B-BD3A-AFB9762449C0} TransformComponent", + "Id": 7205597372613518510, + "Parent Entity": "Entity_[569860598305]", + "Transform Data": { + "Translate": [ + -2.113382339477539, + -9.999999974752427e-7, + 0.0 + ], + "Rotate": [ + 0.0, + 0.0, + 180.00001525878906 + ] + } + }, + "Component_[7918371639409185899]": { + "$type": "EditorDisabledCompositionComponent", + "Id": 7918371639409185899 + }, + "Component_[8564054653851438099]": { + "$type": "AZ::Render::EditorMeshComponent", + "Id": 8564054653851438099, + "Controller": { + "Configuration": { + "ModelAsset": { + "assetId": { + "guid": "{D0F73AAF-52B7-507C-B045-DBE2FE2D4403}", + "subId": 268677693 + }, + "assetHint": "objects/shaderball_simple/shaberball_simple_1m.azmodel" + }, + "LodOverride": 255 + } + } + } + } + }, + "Entity_[578450532897]": { + "Id": "Entity_[578450532897]", + "Name": "20_neutral_8", + "Components": { + "Component_[12222961627447331506]": { + "$type": "EditorMaterialComponent", + "Id": 12222961627447331506, + "Controller": { + "Configuration": { + "materials": { + "{}": { + "MaterialAsset": { + "assetId": { + "guid": "{A9BAEC06-A3F6-53E9-9E3E-61E12048FC75}" + }, + "assetHint": "materials/presets/macbeth/20_neutral_8-0_0-23d.azmaterial" + } + } + } + } + }, + "materialSlotsByLodEnabled": true + }, + "Component_[12780007764330464223]": { + "$type": "EditorVisibilityComponent", + "Id": 12780007764330464223 + }, + "Component_[12904863407657276829]": { + "$type": "EditorInspectorComponent", + "Id": 12904863407657276829, + "ComponentOrderEntryArray": [ + { + "ComponentId": 7205597372613518510 + }, + { + "ComponentId": 8564054653851438099, + "SortIndex": 1 + }, + { + "ComponentId": 12222961627447331506, + "SortIndex": 2 + } + ] + }, + "Component_[13729618014821386240]": { + "$type": "EditorPendingCompositionComponent", + "Id": 13729618014821386240 + }, + "Component_[14429836600052599894]": { + "$type": "EditorEntityIconComponent", + "Id": 14429836600052599894 + }, + "Component_[14808014799413383215]": { + "$type": "EditorEntitySortComponent", + "Id": 14808014799413383215 + }, + "Component_[17252932649882883756]": { + "$type": "SelectionComponent", + "Id": 17252932649882883756 + }, + "Component_[2229055145450914672]": { + "$type": "EditorLockComponent", + "Id": 2229055145450914672 + }, + "Component_[2249882080644631374]": { + "$type": "EditorOnlyEntityComponent", + "Id": 2249882080644631374 + }, + "Component_[7205597372613518510]": { + "$type": "{27F1E1A1-8D9D-4C3B-BD3A-AFB9762449C0} TransformComponent", + "Id": 7205597372613518510, + "Parent Entity": "Entity_[569860598305]", + "Transform Data": { + "Translate": [ + -6.113382339477539, + -9.999999974752427e-7, + 0.0 + ], + "Rotate": [ + 0.0, + 0.0, + 180.00001525878906 + ] + } + }, + "Component_[7918371639409185899]": { + "$type": "EditorDisabledCompositionComponent", + "Id": 7918371639409185899 + }, + "Component_[8564054653851438099]": { + "$type": "AZ::Render::EditorMeshComponent", + "Id": 8564054653851438099, + "Controller": { + "Configuration": { + "ModelAsset": { + "assetId": { + "guid": "{D0F73AAF-52B7-507C-B045-DBE2FE2D4403}", + "subId": 268677693 + }, + "assetHint": "objects/shaderball_simple/shaberball_simple_1m.azmodel" + }, + "LodOverride": 255 + } + } + } + } + }, + "Entity_[582745500193]": { + "Id": "Entity_[582745500193]", + "Name": "19_white_9.5", + "Components": { + "Component_[12222961627447331506]": { + "$type": "EditorMaterialComponent", + "Id": 12222961627447331506, + "Controller": { + "Configuration": { + "materials": { + "{}": { + "MaterialAsset": { + "assetId": { + "guid": "{94E3052F-2B5A-5C28-912A-C0FDC00F5CD3}" + }, + "assetHint": "materials/presets/macbeth/19_white_9-5_0-05d.azmaterial" + } + } + } + } + }, + "materialSlotsByLodEnabled": true + }, + "Component_[12780007764330464223]": { + "$type": "EditorVisibilityComponent", + "Id": 12780007764330464223 + }, + "Component_[12904863407657276829]": { + "$type": "EditorInspectorComponent", + "Id": 12904863407657276829, + "ComponentOrderEntryArray": [ + { + "ComponentId": 7205597372613518510 + }, + { + "ComponentId": 8564054653851438099, + "SortIndex": 1 + }, + { + "ComponentId": 12222961627447331506, + "SortIndex": 2 + } + ] + }, + "Component_[13729618014821386240]": { + "$type": "EditorPendingCompositionComponent", + "Id": 13729618014821386240 + }, + "Component_[14429836600052599894]": { + "$type": "EditorEntityIconComponent", + "Id": 14429836600052599894 + }, + "Component_[14808014799413383215]": { + "$type": "EditorEntitySortComponent", + "Id": 14808014799413383215 + }, + "Component_[17252932649882883756]": { + "$type": "SelectionComponent", + "Id": 17252932649882883756 + }, + "Component_[2229055145450914672]": { + "$type": "EditorLockComponent", + "Id": 2229055145450914672 + }, + "Component_[2249882080644631374]": { + "$type": "EditorOnlyEntityComponent", + "Id": 2249882080644631374 + }, + "Component_[7205597372613518510]": { + "$type": "{27F1E1A1-8D9D-4C3B-BD3A-AFB9762449C0} TransformComponent", + "Id": 7205597372613518510, + "Parent Entity": "Entity_[569860598305]", + "Transform Data": { + "Translate": [ + -10.113382339477539, + -9.999999974752427e-7, + 0.0 + ], + "Rotate": [ + 0.0, + 0.0, + 180.00001525878906 + ] + } + }, + "Component_[7918371639409185899]": { + "$type": "EditorDisabledCompositionComponent", + "Id": 7918371639409185899 + }, + "Component_[8564054653851438099]": { + "$type": "AZ::Render::EditorMeshComponent", + "Id": 8564054653851438099, + "Controller": { + "Configuration": { + "ModelAsset": { + "assetId": { + "guid": "{D0F73AAF-52B7-507C-B045-DBE2FE2D4403}", + "subId": 268677693 + }, + "assetHint": "objects/shaderball_simple/shaberball_simple_1m.azmodel" + }, + "LodOverride": 255 + } + } + } + } + }, + "Entity_[587040467489]": { + "Id": "Entity_[587040467489]", + "Name": "22_neutral_5", + "Components": { + "Component_[12222961627447331506]": { + "$type": "EditorMaterialComponent", + "Id": 12222961627447331506, + "Controller": { + "Configuration": { + "materials": { + "{}": { + "MaterialAsset": { + "assetId": { + "guid": "{1E45E15B-8035-5775-B796-A77654CDB094}" + }, + "assetHint": "materials/presets/macbeth/22_neutral_5-0_0-70d.azmaterial" + } + } + } + } + }, + "materialSlotsByLodEnabled": true + }, + "Component_[12780007764330464223]": { + "$type": "EditorVisibilityComponent", + "Id": 12780007764330464223 + }, + "Component_[12904863407657276829]": { + "$type": "EditorInspectorComponent", + "Id": 12904863407657276829, + "ComponentOrderEntryArray": [ + { + "ComponentId": 7205597372613518510 + }, + { + "ComponentId": 8564054653851438099, + "SortIndex": 1 + }, + { + "ComponentId": 12222961627447331506, + "SortIndex": 2 + } + ] + }, + "Component_[13729618014821386240]": { + "$type": "EditorPendingCompositionComponent", + "Id": 13729618014821386240 + }, + "Component_[14429836600052599894]": { + "$type": "EditorEntityIconComponent", + "Id": 14429836600052599894 + }, + "Component_[14808014799413383215]": { + "$type": "EditorEntitySortComponent", + "Id": 14808014799413383215 + }, + "Component_[17252932649882883756]": { + "$type": "SelectionComponent", + "Id": 17252932649882883756 + }, + "Component_[2229055145450914672]": { + "$type": "EditorLockComponent", + "Id": 2229055145450914672 + }, + "Component_[2249882080644631374]": { + "$type": "EditorOnlyEntityComponent", + "Id": 2249882080644631374 + }, + "Component_[7205597372613518510]": { + "$type": "{27F1E1A1-8D9D-4C3B-BD3A-AFB9762449C0} TransformComponent", + "Id": 7205597372613518510, + "Parent Entity": "Entity_[569860598305]", + "Transform Data": { + "Translate": [ + 1.8866175413131714, + -9.999999974752427e-7, + 0.0 + ], + "Rotate": [ + 0.0, + 0.0, + 180.00001525878906 + ] + } + }, + "Component_[7918371639409185899]": { + "$type": "EditorDisabledCompositionComponent", + "Id": 7918371639409185899 + }, + "Component_[8564054653851438099]": { + "$type": "AZ::Render::EditorMeshComponent", + "Id": 8564054653851438099, + "Controller": { + "Configuration": { + "ModelAsset": { + "assetId": { + "guid": "{D0F73AAF-52B7-507C-B045-DBE2FE2D4403}", + "subId": 268677693 + }, + "assetHint": "objects/shaderball_simple/shaberball_simple_1m.azmodel" + }, + "LodOverride": 255 + } + } + } + } + }, + "Entity_[591335434785]": { + "Id": "Entity_[591335434785]", + "Name": "23_neutral_3.5", + "Components": { + "Component_[12222961627447331506]": { + "$type": "EditorMaterialComponent", + "Id": 12222961627447331506, + "Controller": { + "Configuration": { + "materials": { + "{}": { + "MaterialAsset": { + "assetId": { + "guid": "{23C26041-7155-5FE2-8E12-FACFD52DA006}" + }, + "assetHint": "materials/presets/macbeth/23_neutral_3-5_1-05d.azmaterial" + } + } + } + } + }, + "materialSlotsByLodEnabled": true + }, + "Component_[12780007764330464223]": { + "$type": "EditorVisibilityComponent", + "Id": 12780007764330464223 + }, + "Component_[12904863407657276829]": { + "$type": "EditorInspectorComponent", + "Id": 12904863407657276829, + "ComponentOrderEntryArray": [ + { + "ComponentId": 7205597372613518510 + }, + { + "ComponentId": 8564054653851438099, + "SortIndex": 1 + }, + { + "ComponentId": 12222961627447331506, + "SortIndex": 2 + } + ] + }, + "Component_[13729618014821386240]": { + "$type": "EditorPendingCompositionComponent", + "Id": 13729618014821386240 + }, + "Component_[14429836600052599894]": { + "$type": "EditorEntityIconComponent", + "Id": 14429836600052599894 + }, + "Component_[14808014799413383215]": { + "$type": "EditorEntitySortComponent", + "Id": 14808014799413383215 + }, + "Component_[17252932649882883756]": { + "$type": "SelectionComponent", + "Id": 17252932649882883756 + }, + "Component_[2229055145450914672]": { + "$type": "EditorLockComponent", + "Id": 2229055145450914672 + }, + "Component_[2249882080644631374]": { + "$type": "EditorOnlyEntityComponent", + "Id": 2249882080644631374 + }, + "Component_[7205597372613518510]": { + "$type": "{27F1E1A1-8D9D-4C3B-BD3A-AFB9762449C0} TransformComponent", + "Id": 7205597372613518510, + "Parent Entity": "Entity_[569860598305]", + "Transform Data": { + "Translate": [ + 5.886617660522461, + -9.999999974752427e-7, + 0.0 + ], + "Rotate": [ + 0.0, + 0.0, + 180.00001525878906 + ] + } + }, + "Component_[7918371639409185899]": { + "$type": "EditorDisabledCompositionComponent", + "Id": 7918371639409185899 + }, + "Component_[8564054653851438099]": { + "$type": "AZ::Render::EditorMeshComponent", + "Id": 8564054653851438099, + "Controller": { + "Configuration": { + "ModelAsset": { + "assetId": { + "guid": "{D0F73AAF-52B7-507C-B045-DBE2FE2D4403}", + "subId": 268677693 + }, + "assetHint": "objects/shaderball_simple/shaberball_simple_1m.azmodel" + }, + "LodOverride": 255 + } + } + } + } + }, + "Entity_[595630402081]": { + "Id": "Entity_[595630402081]", + "Name": "24_black_2", + "Components": { + "Component_[12222961627447331506]": { + "$type": "EditorMaterialComponent", + "Id": 12222961627447331506, + "Controller": { + "Configuration": { + "materials": { + "{}": { + "MaterialAsset": { + "assetId": { + "guid": "{1D83625A-4016-58F0-A94A-13B92B19F5B5}" + }, + "assetHint": "materials/presets/macbeth/24_black_2-0_1-50d.azmaterial" + } + } + } + } + }, + "materialSlotsByLodEnabled": true + }, + "Component_[12780007764330464223]": { + "$type": "EditorVisibilityComponent", + "Id": 12780007764330464223 + }, + "Component_[12904863407657276829]": { + "$type": "EditorInspectorComponent", + "Id": 12904863407657276829, + "ComponentOrderEntryArray": [ + { + "ComponentId": 7205597372613518510 + }, + { + "ComponentId": 8564054653851438099, + "SortIndex": 1 + }, + { + "ComponentId": 12222961627447331506, + "SortIndex": 2 + } + ] + }, + "Component_[13729618014821386240]": { + "$type": "EditorPendingCompositionComponent", + "Id": 13729618014821386240 + }, + "Component_[14429836600052599894]": { + "$type": "EditorEntityIconComponent", + "Id": 14429836600052599894 + }, + "Component_[14808014799413383215]": { + "$type": "EditorEntitySortComponent", + "Id": 14808014799413383215 + }, + "Component_[17252932649882883756]": { + "$type": "SelectionComponent", + "Id": 17252932649882883756 + }, + "Component_[2229055145450914672]": { + "$type": "EditorLockComponent", + "Id": 2229055145450914672 + }, + "Component_[2249882080644631374]": { + "$type": "EditorOnlyEntityComponent", + "Id": 2249882080644631374 + }, + "Component_[7205597372613518510]": { + "$type": "{27F1E1A1-8D9D-4C3B-BD3A-AFB9762449C0} TransformComponent", + "Id": 7205597372613518510, + "Parent Entity": "Entity_[569860598305]", + "Transform Data": { + "Translate": [ + 9.886617660522461, + -9.999999974752427e-7, + 0.0 + ], + "Rotate": [ + 0.0, + 0.0, + 180.00001525878906 + ] + } + }, + "Component_[7918371639409185899]": { + "$type": "EditorDisabledCompositionComponent", + "Id": 7918371639409185899 + }, + "Component_[8564054653851438099]": { + "$type": "AZ::Render::EditorMeshComponent", + "Id": 8564054653851438099, + "Controller": { + "Configuration": { + "ModelAsset": { + "assetId": { + "guid": "{D0F73AAF-52B7-507C-B045-DBE2FE2D4403}", + "subId": 268677693 + }, + "assetHint": "objects/shaderball_simple/shaberball_simple_1m.azmodel" + }, + "LodOverride": 255 + } + } + } + } + }, + "Entity_[599925369377]": { + "Id": "Entity_[599925369377]", + "Name": "MacBeth_Chart", + "Components": { + "Component_[10911367092756441312]": { + "$type": "EditorLockComponent", + "Id": 10911367092756441312 + }, + "Component_[11487615730470734577]": { + "$type": "EditorEntitySortComponent", + "Id": 11487615730470734577 + }, + "Component_[1380862607750834390]": { + "$type": "EditorDisabledCompositionComponent", + "Id": 1380862607750834390 + }, + "Component_[17376808010180534107]": { + "$type": "EditorOnlyEntityComponent", + "Id": 17376808010180534107 + }, + "Component_[18051852481298910543]": { + "$type": "EditorPendingCompositionComponent", + "Id": 18051852481298910543 + }, + "Component_[2468310869499941539]": { + "$type": "EditorVisibilityComponent", + "Id": 2468310869499941539 + }, + "Component_[3104847651593575388]": { + "$type": "{27F1E1A1-8D9D-4C3B-BD3A-AFB9762449C0} TransformComponent", + "Id": 3104847651593575388, + "Parent Entity": "Entity_[471076350497]", + "Transform Data": { + "Translate": [ + 0.0, + 0.0, + 1.0 + ], + "Scale": [ + 24.748918533325195, + 24.748918533325195, + 24.748918533325195 + ], + "UniformScale": 24.748918533325195 + } + }, + "Component_[4039743767801786212]": { + "$type": "AZ::Render::EditorMeshComponent", + "Id": 4039743767801786212, + "Controller": { + "Configuration": { + "ModelAsset": { + "assetId": { + "guid": "{767B3209-EDF7-503A-BF3D-6A69DAABC966}", + "subId": 285003870 + }, + "assetHint": "materialeditor/viewportmodels/plane_1x1.azmodel" + }, + "LodOverride": 255 + } + } + }, + "Component_[4350883917310195183]": { + "$type": "EditorMaterialComponent", + "Id": 4350883917310195183, + "Controller": { + "Configuration": { + "materials": { + "{}": { + "MaterialAsset": { + "assetId": { + "guid": "{6BCA78B0-98F0-5843-A0D9-2FD6AB5B8B95}" + }, + "assetHint": "materials/presets/macbeth/macbeth_lab_16bit_2014_srgb.azmaterial" + } + } + } + } + }, + "materialSlotsByLodEnabled": true + }, + "Component_[5382697958657080154]": { + "$type": "EditorInspectorComponent", + "Id": 5382697958657080154, + "ComponentOrderEntryArray": [ + { + "ComponentId": 3104847651593575388 + }, + { + "ComponentId": 4039743767801786212, + "SortIndex": 1 + }, + { + "ComponentId": 4350883917310195183, + "SortIndex": 2 + } + ] + }, + "Component_[5944774294236360498]": { + "$type": "SelectionComponent", + "Id": 5944774294236360498 + }, + "Component_[7918181081161287223]": { + "$type": "EditorEntityIconComponent", + "Id": 7918181081161287223 + } + } + }, + "Entity_[604220336673]": { + "Id": "Entity_[604220336673]", + "Name": "Camera1", + "Components": { + "Component_[10875630838724467144]": { + "$type": "{CA11DA46-29FF-4083-B5F6-E02C3A8C3A3D} EditorCameraComponent", + "Id": 10875630838724467144, + "Controller": { + "Configuration": { + "EditorEntityId": 604220336673 + } + } + }, + "Component_[11853636775353879324]": { + "$type": "{27F1E1A1-8D9D-4C3B-BD3A-AFB9762449C0} TransformComponent", + "Id": 11853636775353879324, + "Parent Entity": "Entity_[471076350497]", + "Transform Data": { + "Translate": [ + -0.088332898914814, + -14.735246658325195, + 12.247514724731445 + ], + "Rotate": [ + -34.60991287231445, + 0.19504709541797638, + -0.282683789730072 + ] + } + }, + "Component_[14115131108729471373]": { + "$type": "EditorEntitySortComponent", + "Id": 14115131108729471373 + }, + "Component_[14490537709933782275]": { + "$type": "SelectionComponent", + "Id": 14490537709933782275 + }, + "Component_[15389860813854215395]": { + "$type": "EditorDisabledCompositionComponent", + "Id": 15389860813854215395 + }, + "Component_[16956210187152487952]": { + "$type": "EditorVisibilityComponent", + "Id": 16956210187152487952 + }, + "Component_[3120168445836073859]": { + "$type": "EditorInspectorComponent", + "Id": 3120168445836073859, + "ComponentOrderEntryArray": [ + { + "ComponentId": 11853636775353879324 + }, + { + "ComponentId": 6418726603140010485, + "SortIndex": 1 + }, + { + "ComponentId": 6573470892650938647, + "SortIndex": 2 + }, + { + "ComponentId": 10875630838724467144, + "SortIndex": 3 + }, + { + "ComponentId": 9127356411199949930, + "SortIndex": 4 + } + ] + }, + "Component_[397791896240265054]": { + "$type": "EditorEntityIconComponent", + "Id": 397791896240265054 + }, + "Component_[6418726603140010485]": { + "$type": "AZ::Render::EditorExposureControlComponent", + "Id": 6418726603140010485, + "Controller": { + "Configuration": { + "ExposureControlType": 1, + "EyeAdaptationExposureMin": -10.0, + "EyeAdaptationExposureMax": 10.0 + } + } + }, + "Component_[6572845495569063152]": { + "$type": "EditorOnlyEntityComponent", + "Id": 6572845495569063152 + }, + "Component_[6573470892650938647]": { + "$type": "AZ::Render::EditorPostFxLayerComponent", + "Id": 6573470892650938647 + }, + "Component_[7175586201406734874]": { + "$type": "EditorLockComponent", + "Id": 7175586201406734874 + }, + "Component_[7393764569438584638]": { + "$type": "EditorPendingCompositionComponent", + "Id": 7393764569438584638 + }, + "Component_[9127356411199949930]": { + "$type": "GenericComponentWrapper", + "Id": 9127356411199949930, + "m_template": { + "$type": "FlyCameraInputComponent" + } + } + } + } + } +} \ No newline at end of file diff --git a/AutomatedTesting/Levels/Graphics/macbeth_shaderballs/tags.txt b/AutomatedTesting/Levels/Graphics/macbeth_shaderballs/tags.txt new file mode 100644 index 0000000000..0d6c1880e7 --- /dev/null +++ b/AutomatedTesting/Levels/Graphics/macbeth_shaderballs/tags.txt @@ -0,0 +1,12 @@ +0,0,0,0,0,0 +0,0,0,0,0,0 +0,0,0,0,0,0 +0,0,0,0,0,0 +0,0,0,0,0,0 +0,0,0,0,0,0 +0,0,0,0,0,0 +0,0,0,0,0,0 +0,0,0,0,0,0 +0,0,0,0,0,0 +0,0,0,0,0,0 +0,0,0,0,0,0 diff --git a/AutomatedTesting/Levels/Multiplayer/AutoComponent_NetworkInput/AutoComponent_NetworkInput.scriptcanvas b/AutomatedTesting/Levels/Multiplayer/AutoComponent_NetworkInput/AutoComponent_NetworkInput.scriptcanvas index 2f8a434108..bad28d5417 100644 --- a/AutomatedTesting/Levels/Multiplayer/AutoComponent_NetworkInput/AutoComponent_NetworkInput.scriptcanvas +++ b/AutomatedTesting/Levels/Multiplayer/AutoComponent_NetworkInput/AutoComponent_NetworkInput.scriptcanvas @@ -5,7 +5,7 @@ "ClassData": { "m_scriptCanvas": { "Id": { - "id": 20239954977260 + "id": 11859291537220 }, "Name": "AutoComponent_NetworkInput", "Components": { @@ -81,7 +81,7 @@ "m_nodes": [ { "Id": { - "id": 20265724781036 + "id": 11872176439108 }, "Name": "SC-Node(NotEqualTo)", "Components": { @@ -232,7 +232,7 @@ }, { "Id": { - "id": 20257134846444 + "id": 11893651275588 }, "Name": "SC-Node(NotEqualTo)", "Components": { @@ -383,7 +383,7 @@ }, { "Id": { - "id": 20278609682924 + "id": 11897946242884 }, "Name": "SC-Node(Print)", "Components": { @@ -423,16 +423,16 @@ } } ], - "m_format": "AutoComponent_NetworkInput ProcessInput called!", + "m_format": "AutoComponent_NetworkInput ProcessInput called!\n", "m_unresolvedString": [ - "AutoComponent_NetworkInput ProcessInput called!" + "AutoComponent_NetworkInput ProcessInput called!\n" ] } } }, { "Id": { - "id": 20244249944556 + "id": 11885061340996 }, "Name": "SC-Node(CreateFromValues)", "Components": { @@ -571,7 +571,7 @@ }, { "Id": { - "id": 20252839879148 + "id": 11867881471812 }, "Name": "EBusEventHandler", "Components": { @@ -862,7 +862,7 @@ }, { "Id": { - "id": 20248544911852 + "id": 11863586504516 }, "Name": "SC-Node(ExtractProperty)", "Components": { @@ -1003,7 +1003,7 @@ }, { "Id": { - "id": 20270019748332 + "id": 11880766373700 }, "Name": "SC-Node(Print)", "Components": { @@ -1043,16 +1043,16 @@ } } ], - "m_format": "AutoComponent_NetworkInput received bad fwdback!", + "m_format": "AutoComponent_NetworkInput received bad fwdback!\n", "m_unresolvedString": [ - "AutoComponent_NetworkInput received bad fwdback!" + "AutoComponent_NetworkInput received bad fwdback!\n" ] } } }, { "Id": { - "id": 20274314715628 + "id": 11889356308292 }, "Name": "SC-Node(Print)", "Components": { @@ -1092,16 +1092,16 @@ } } ], - "m_format": "AutoComponent_NetworkInput received bad leftright!", + "m_format": "AutoComponent_NetworkInput received bad leftright!\n", "m_unresolvedString": [ - "AutoComponent_NetworkInput received bad leftright!" + "AutoComponent_NetworkInput received bad leftright!\n" ] } } }, { "Id": { - "id": 20261429813740 + "id": 11876471406404 }, "Name": "SC-Node(Print)", "Components": { @@ -1141,9 +1141,9 @@ } } ], - "m_format": "AutoComponent_NetworkInput CreateInput called!", + "m_format": "AutoComponent_NetworkInput CreateInput called!\n", "m_unresolvedString": [ - "AutoComponent_NetworkInput CreateInput called!" + "AutoComponent_NetworkInput CreateInput called!\n" ] } } @@ -1152,7 +1152,7 @@ "m_connections": [ { "Id": { - "id": 20282904650220 + "id": 11902241210180 }, "Name": "srcEndpoint=(NetworkTestPlayerComponentBusHandler Handler: ExecutionSlot:CreateInput), destEndpoint=(Print: In)", "Components": { @@ -1161,7 +1161,7 @@ "Id": 3586317167340048684, "sourceEndpoint": { "nodeId": { - "id": 20252839879148 + "id": 11867881471812 }, "slotId": { "m_id": "{B831AC60-7641-4B74-9829-26A3576B4766}" @@ -1169,7 +1169,7 @@ }, "targetEndpoint": { "nodeId": { - "id": 20261429813740 + "id": 11876471406404 }, "slotId": { "m_id": "{2B6DB3BC-AA87-4280-B4C3-42C1EE17CBA3}" @@ -1180,7 +1180,7 @@ }, { "Id": { - "id": 20287199617516 + "id": 11906536177476 }, "Name": "srcEndpoint=(NetworkTestPlayerComponentBusHandler Handler: ExecutionSlot:CreateInput), destEndpoint=(CreateFromValues: In)", "Components": { @@ -1189,7 +1189,7 @@ "Id": 15956251897822268937, "sourceEndpoint": { "nodeId": { - "id": 20252839879148 + "id": 11867881471812 }, "slotId": { "m_id": "{B831AC60-7641-4B74-9829-26A3576B4766}" @@ -1197,7 +1197,7 @@ }, "targetEndpoint": { "nodeId": { - "id": 20244249944556 + "id": 11885061340996 }, "slotId": { "m_id": "{514CDDAA-290F-4758-B28F-4003E719E635}" @@ -1208,7 +1208,7 @@ }, { "Id": { - "id": 20291494584812 + "id": 11910831144772 }, "Name": "srcEndpoint=(CreateFromValues: Result: NetworkTestPlayerComponentNetworkInput), destEndpoint=(NetworkTestPlayerComponentBusHandler Handler: Result: NetworkTestPlayerComponentNetworkInput)", "Components": { @@ -1217,7 +1217,7 @@ "Id": 3864080489501353126, "sourceEndpoint": { "nodeId": { - "id": 20244249944556 + "id": 11885061340996 }, "slotId": { "m_id": "{90E52F81-54E0-4C63-9881-B661FB5D87D1}" @@ -1225,7 +1225,7 @@ }, "targetEndpoint": { "nodeId": { - "id": 20252839879148 + "id": 11867881471812 }, "slotId": { "m_id": "{ADF9B366-8324-4C1E-B601-C059DA70FDDE}" @@ -1236,7 +1236,7 @@ }, { "Id": { - "id": 20295789552108 + "id": 11915126112068 }, "Name": "srcEndpoint=(NetworkTestPlayerComponentBusHandler Handler: ExecutionSlot:ProcessInput), destEndpoint=(Print: In)", "Components": { @@ -1245,7 +1245,7 @@ "Id": 8628095809445337119, "sourceEndpoint": { "nodeId": { - "id": 20252839879148 + "id": 11867881471812 }, "slotId": { "m_id": "{4C8F2908-12B0-4C35-8468-31D3D4DF36AA}" @@ -1253,7 +1253,7 @@ }, "targetEndpoint": { "nodeId": { - "id": 20278609682924 + "id": 11897946242884 }, "slotId": { "m_id": "{D994D58A-DBF1-4929-B779-F0D2CBAD2F0D}" @@ -1264,7 +1264,7 @@ }, { "Id": { - "id": 20300084519404 + "id": 11919421079364 }, "Name": "srcEndpoint=(NetworkTestPlayerComponentBusHandler Handler: ExecutionSlot:ProcessInput), destEndpoint=(Extract Properties: In)", "Components": { @@ -1273,7 +1273,7 @@ "Id": 10621112306443381493, "sourceEndpoint": { "nodeId": { - "id": 20252839879148 + "id": 11867881471812 }, "slotId": { "m_id": "{4C8F2908-12B0-4C35-8468-31D3D4DF36AA}" @@ -1281,7 +1281,7 @@ }, "targetEndpoint": { "nodeId": { - "id": 20248544911852 + "id": 11863586504516 }, "slotId": { "m_id": "{C80C50EE-F216-4F44-B107-6B35354AFD52}" @@ -1292,7 +1292,7 @@ }, { "Id": { - "id": 20304379486700 + "id": 11923716046660 }, "Name": "srcEndpoint=(NetworkTestPlayerComponentBusHandler Handler: NetworkTestPlayerComponentNetworkInput), destEndpoint=(Extract Properties: Source)", "Components": { @@ -1301,7 +1301,7 @@ "Id": 14013500888143163469, "sourceEndpoint": { "nodeId": { - "id": 20252839879148 + "id": 11867881471812 }, "slotId": { "m_id": "{8F69FA2E-28D8-4DF1-A4B5-AEF3985095C5}" @@ -1309,7 +1309,7 @@ }, "targetEndpoint": { "nodeId": { - "id": 20248544911852 + "id": 11863586504516 }, "slotId": { "m_id": "{D387C800-352B-4B01-8765-4F4B40DF45CB}" @@ -1320,7 +1320,7 @@ }, { "Id": { - "id": 20308674453996 + "id": 11928011013956 }, "Name": "srcEndpoint=(Extract Properties: Out), destEndpoint=(Not Equal To (!=): In)", "Components": { @@ -1329,7 +1329,7 @@ "Id": 14597948098713219792, "sourceEndpoint": { "nodeId": { - "id": 20248544911852 + "id": 11863586504516 }, "slotId": { "m_id": "{C69C098D-D667-4DC7-85E5-AFD119727D94}" @@ -1337,7 +1337,7 @@ }, "targetEndpoint": { "nodeId": { - "id": 20257134846444 + "id": 11893651275588 }, "slotId": { "m_id": "{AE7E453C-15DE-47D2-954A-05C3895B7AC6}" @@ -1348,7 +1348,7 @@ }, { "Id": { - "id": 20312969421292 + "id": 11932305981252 }, "Name": "srcEndpoint=(Extract Properties: FwdBack: Number), destEndpoint=(Not Equal To (!=): Value A)", "Components": { @@ -1357,7 +1357,7 @@ "Id": 14915522756837814768, "sourceEndpoint": { "nodeId": { - "id": 20248544911852 + "id": 11863586504516 }, "slotId": { "m_id": "{0C03D491-DE25-46C2-BF09-14769FA49FDB}" @@ -1365,7 +1365,7 @@ }, "targetEndpoint": { "nodeId": { - "id": 20257134846444 + "id": 11893651275588 }, "slotId": { "m_id": "{57EBC15B-452E-49B3-8BD3-4FBBB07F1F14}" @@ -1376,7 +1376,7 @@ }, { "Id": { - "id": 20317264388588 + "id": 11936600948548 }, "Name": "srcEndpoint=(Extract Properties: Out), destEndpoint=(Not Equal To (!=): In)", "Components": { @@ -1385,7 +1385,7 @@ "Id": 6510282773353837676, "sourceEndpoint": { "nodeId": { - "id": 20248544911852 + "id": 11863586504516 }, "slotId": { "m_id": "{C69C098D-D667-4DC7-85E5-AFD119727D94}" @@ -1393,7 +1393,7 @@ }, "targetEndpoint": { "nodeId": { - "id": 20265724781036 + "id": 11872176439108 }, "slotId": { "m_id": "{AE7E453C-15DE-47D2-954A-05C3895B7AC6}" @@ -1404,7 +1404,7 @@ }, { "Id": { - "id": 20321559355884 + "id": 11940895915844 }, "Name": "srcEndpoint=(Extract Properties: LeftRight: Number), destEndpoint=(Not Equal To (!=): Value A)", "Components": { @@ -1413,7 +1413,7 @@ "Id": 16150645152204311425, "sourceEndpoint": { "nodeId": { - "id": 20248544911852 + "id": 11863586504516 }, "slotId": { "m_id": "{4C13F9EF-60BF-4AD1-8FA9-66F46455411C}" @@ -1421,7 +1421,7 @@ }, "targetEndpoint": { "nodeId": { - "id": 20265724781036 + "id": 11872176439108 }, "slotId": { "m_id": "{57EBC15B-452E-49B3-8BD3-4FBBB07F1F14}" @@ -1432,7 +1432,7 @@ }, { "Id": { - "id": 20325854323180 + "id": 11945190883140 }, "Name": "srcEndpoint=(Not Equal To (!=): True), destEndpoint=(Print: In)", "Components": { @@ -1441,7 +1441,7 @@ "Id": 3322355580364572639, "sourceEndpoint": { "nodeId": { - "id": 20257134846444 + "id": 11893651275588 }, "slotId": { "m_id": "{AC364E17-A9A1-42DB-A29D-7B2D666E4287}" @@ -1449,7 +1449,7 @@ }, "targetEndpoint": { "nodeId": { - "id": 20270019748332 + "id": 11880766373700 }, "slotId": { "m_id": "{733AA75D-022C-45E9-9D0F-3EF9A1633ADC}" @@ -1460,7 +1460,7 @@ }, { "Id": { - "id": 20330149290476 + "id": 11949485850436 }, "Name": "srcEndpoint=(Not Equal To (!=): True), destEndpoint=(Print: In)", "Components": { @@ -1469,7 +1469,7 @@ "Id": 1975626970668030308, "sourceEndpoint": { "nodeId": { - "id": 20265724781036 + "id": 11872176439108 }, "slotId": { "m_id": "{AC364E17-A9A1-42DB-A29D-7B2D666E4287}" @@ -1477,7 +1477,7 @@ }, "targetEndpoint": { "nodeId": { - "id": 20274314715628 + "id": 11889356308292 }, "slotId": { "m_id": "{733AA75D-022C-45E9-9D0F-3EF9A1633ADC}" @@ -1498,16 +1498,16 @@ "GraphCanvasData": [ { "Key": { - "id": 20239954977260 + "id": 11859291537220 }, "Value": { "ComponentData": { "{5F84B500-8C45-40D1-8EFC-A5306B241444}": { "$type": "SceneComponentSaveData", "ViewParams": { - "Scale": 1.0097068678919363, - "AnchorX": 1086.4539794921875, - "AnchorY": 198.07728576660156 + "Scale": 0.8416459517191037, + "AnchorX": -80.7940673828125, + "AnchorY": -622.589599609375 } } } @@ -1515,38 +1515,7 @@ }, { "Key": { - "id": 20244249944556 - }, - "Value": { - "ComponentData": { - "{24CB38BB-1705-4EC5-8F63-B574571B4DCD}": { - "$type": "NodeSaveData" - }, - "{328FF15C-C302-458F-A43D-E1794DE0904E}": { - "$type": "GeneralNodeTitleComponentSaveData", - "PaletteOverride": "MethodNodeTitlePalette" - }, - "{7CC444B1-F9B3-41B5-841B-0C4F2179F111}": { - "$type": "GeometrySaveData", - "Position": [ - 740.0, - 100.0 - ] - }, - "{B0B99C8A-03AF-4CF6-A926-F65C874C3D97}": { - "$type": "StylingComponentSaveData", - "SubStyle": ".method" - }, - "{B1F49A35-8408-40DA-B79E-F1E3B64322CE}": { - "$type": "PersistentIdComponentSaveData", - "PersistentId": "{7A7C96CB-4B5A-48DD-A0AD-0094A113549B}" - } - } - } - }, - { - "Key": { - "id": 20248544911852 + "id": 11863586504516 }, "Value": { "ComponentData": { @@ -1576,7 +1545,7 @@ }, { "Key": { - "id": 20252839879148 + "id": 11867881471812 }, "Value": { "ComponentData": { @@ -1613,67 +1582,7 @@ }, { "Key": { - "id": 20257134846444 - }, - "Value": { - "ComponentData": { - "{24CB38BB-1705-4EC5-8F63-B574571B4DCD}": { - "$type": "NodeSaveData" - }, - "{328FF15C-C302-458F-A43D-E1794DE0904E}": { - "$type": "GeneralNodeTitleComponentSaveData", - "PaletteOverride": "MathNodeTitlePalette" - }, - "{7CC444B1-F9B3-41B5-841B-0C4F2179F111}": { - "$type": "GeometrySaveData", - "Position": [ - 1040.0, - 320.0 - ] - }, - "{B0B99C8A-03AF-4CF6-A926-F65C874C3D97}": { - "$type": "StylingComponentSaveData" - }, - "{B1F49A35-8408-40DA-B79E-F1E3B64322CE}": { - "$type": "PersistentIdComponentSaveData", - "PersistentId": "{71AB4748-41F4-4FEA-874C-F54037236F31}" - } - } - } - }, - { - "Key": { - "id": 20261429813740 - }, - "Value": { - "ComponentData": { - "{24CB38BB-1705-4EC5-8F63-B574571B4DCD}": { - "$type": "NodeSaveData" - }, - "{328FF15C-C302-458F-A43D-E1794DE0904E}": { - "$type": "GeneralNodeTitleComponentSaveData", - "PaletteOverride": "StringNodeTitlePalette" - }, - "{7CC444B1-F9B3-41B5-841B-0C4F2179F111}": { - "$type": "GeometrySaveData", - "Position": [ - 740.0, - -100.0 - ] - }, - "{B0B99C8A-03AF-4CF6-A926-F65C874C3D97}": { - "$type": "StylingComponentSaveData" - }, - "{B1F49A35-8408-40DA-B79E-F1E3B64322CE}": { - "$type": "PersistentIdComponentSaveData", - "PersistentId": "{26E363EE-F35A-4096-88EF-DF907A809894}" - } - } - } - }, - { - "Key": { - "id": 20265724781036 + "id": 11872176439108 }, "Value": { "ComponentData": { @@ -1703,7 +1612,37 @@ }, { "Key": { - "id": 20270019748332 + "id": 11876471406404 + }, + "Value": { + "ComponentData": { + "{24CB38BB-1705-4EC5-8F63-B574571B4DCD}": { + "$type": "NodeSaveData" + }, + "{328FF15C-C302-458F-A43D-E1794DE0904E}": { + "$type": "GeneralNodeTitleComponentSaveData", + "PaletteOverride": "StringNodeTitlePalette" + }, + "{7CC444B1-F9B3-41B5-841B-0C4F2179F111}": { + "$type": "GeometrySaveData", + "Position": [ + 740.0, + -100.0 + ] + }, + "{B0B99C8A-03AF-4CF6-A926-F65C874C3D97}": { + "$type": "StylingComponentSaveData" + }, + "{B1F49A35-8408-40DA-B79E-F1E3B64322CE}": { + "$type": "PersistentIdComponentSaveData", + "PersistentId": "{26E363EE-F35A-4096-88EF-DF907A809894}" + } + } + } + }, + { + "Key": { + "id": 11880766373700 }, "Value": { "ComponentData": { @@ -1733,7 +1672,38 @@ }, { "Key": { - "id": 20274314715628 + "id": 11885061340996 + }, + "Value": { + "ComponentData": { + "{24CB38BB-1705-4EC5-8F63-B574571B4DCD}": { + "$type": "NodeSaveData" + }, + "{328FF15C-C302-458F-A43D-E1794DE0904E}": { + "$type": "GeneralNodeTitleComponentSaveData", + "PaletteOverride": "MethodNodeTitlePalette" + }, + "{7CC444B1-F9B3-41B5-841B-0C4F2179F111}": { + "$type": "GeometrySaveData", + "Position": [ + 740.0, + 100.0 + ] + }, + "{B0B99C8A-03AF-4CF6-A926-F65C874C3D97}": { + "$type": "StylingComponentSaveData", + "SubStyle": ".method" + }, + "{B1F49A35-8408-40DA-B79E-F1E3B64322CE}": { + "$type": "PersistentIdComponentSaveData", + "PersistentId": "{7A7C96CB-4B5A-48DD-A0AD-0094A113549B}" + } + } + } + }, + { + "Key": { + "id": 11889356308292 }, "Value": { "ComponentData": { @@ -1763,7 +1733,37 @@ }, { "Key": { - "id": 20278609682924 + "id": 11893651275588 + }, + "Value": { + "ComponentData": { + "{24CB38BB-1705-4EC5-8F63-B574571B4DCD}": { + "$type": "NodeSaveData" + }, + "{328FF15C-C302-458F-A43D-E1794DE0904E}": { + "$type": "GeneralNodeTitleComponentSaveData", + "PaletteOverride": "MathNodeTitlePalette" + }, + "{7CC444B1-F9B3-41B5-841B-0C4F2179F111}": { + "$type": "GeometrySaveData", + "Position": [ + 1040.0, + 320.0 + ] + }, + "{B0B99C8A-03AF-4CF6-A926-F65C874C3D97}": { + "$type": "StylingComponentSaveData" + }, + "{B1F49A35-8408-40DA-B79E-F1E3B64322CE}": { + "$type": "PersistentIdComponentSaveData", + "PersistentId": "{71AB4748-41F4-4FEA-874C-F54037236F31}" + } + } + } + }, + { + "Key": { + "id": 11897946242884 }, "Value": { "ComponentData": { diff --git a/AutomatedTesting/Levels/Multiplayer/AutoComponent_RPC/AutoComponent_RPC.prefab b/AutomatedTesting/Levels/Multiplayer/AutoComponent_RPC/AutoComponent_RPC.prefab new file mode 100644 index 0000000000..758cb4fca8 --- /dev/null +++ b/AutomatedTesting/Levels/Multiplayer/AutoComponent_RPC/AutoComponent_RPC.prefab @@ -0,0 +1,747 @@ +{ + "ContainerEntity": { + "Id": "Entity_[1146574390643]", + "Name": "Level", + "Components": { + "Component_[10641544592923449938]": { + "$type": "EditorInspectorComponent", + "Id": 10641544592923449938 + }, + "Component_[12039882709170782873]": { + "$type": "EditorOnlyEntityComponent", + "Id": 12039882709170782873 + }, + "Component_[12265484671603697631]": { + "$type": "EditorPendingCompositionComponent", + "Id": 12265484671603697631 + }, + "Component_[14126657869720434043]": { + "$type": "EditorEntitySortComponent", + "Id": 14126657869720434043, + "Child Entity Order": [ + "Entity_[1176639161715]", + "Entity_[12685882829720]", + "Entity_[31145534614197]" + ] + }, + "Component_[15230859088967841193]": { + "$type": "{27F1E1A1-8D9D-4C3B-BD3A-AFB9762449C0} TransformComponent", + "Id": 15230859088967841193, + "Parent Entity": "" + }, + "Component_[16239496886950819870]": { + "$type": "EditorDisabledCompositionComponent", + "Id": 16239496886950819870 + }, + "Component_[5688118765544765547]": { + "$type": "EditorEntityIconComponent", + "Id": 5688118765544765547 + }, + "Component_[6545738857812235305]": { + "$type": "SelectionComponent", + "Id": 6545738857812235305 + }, + "Component_[7247035804068349658]": { + "$type": "EditorPrefabComponent", + "Id": 7247035804068349658 + }, + "Component_[9307224322037797205]": { + "$type": "EditorLockComponent", + "Id": 9307224322037797205 + }, + "Component_[9562516168917670048]": { + "$type": "EditorVisibilityComponent", + "Id": 9562516168917670048 + } + } + }, + "Entities": { + "Entity_[1155164325235]": { + "Id": "Entity_[1155164325235]", + "Name": "Sun", + "Components": { + "Component_[10440557478882592717]": { + "$type": "SelectionComponent", + "Id": 10440557478882592717 + }, + "Component_[13620450453324765907]": { + "$type": "EditorLockComponent", + "Id": 13620450453324765907 + }, + "Component_[2134313378593666258]": { + "$type": "EditorInspectorComponent", + "Id": 2134313378593666258 + }, + "Component_[234010807770404186]": { + "$type": "EditorVisibilityComponent", + "Id": 234010807770404186 + }, + "Component_[2970359110423865725]": { + "$type": "EditorEntityIconComponent", + "Id": 2970359110423865725 + }, + "Component_[3722854130373041803]": { + "$type": "EditorOnlyEntityComponent", + "Id": 3722854130373041803 + }, + "Component_[5992533738676323195]": { + "$type": "EditorDisabledCompositionComponent", + "Id": 5992533738676323195 + }, + "Component_[7378860763541895402]": { + "$type": "AZ::Render::EditorDirectionalLightComponent", + "Id": 7378860763541895402, + "Controller": { + "Configuration": { + "Intensity": 1.0, + "CameraEntityId": "", + "ShadowFilterMethod": 1 + } + } + }, + "Component_[7892834440890947578]": { + "$type": "{27F1E1A1-8D9D-4C3B-BD3A-AFB9762449C0} TransformComponent", + "Id": 7892834440890947578, + "Parent Entity": "Entity_[1176639161715]", + "Transform Data": { + "Translate": [ + 0.0, + 0.0, + 13.487043380737305 + ], + "Rotate": [ + -76.13099670410156, + -0.847000002861023, + -15.8100004196167 + ] + } + }, + "Component_[8599729549570828259]": { + "$type": "EditorEntitySortComponent", + "Id": 8599729549570828259 + }, + "Component_[952797371922080273]": { + "$type": "EditorPendingCompositionComponent", + "Id": 952797371922080273 + } + } + }, + "Entity_[1159459292531]": { + "Id": "Entity_[1159459292531]", + "Name": "Ground", + "Components": { + "Component_[11701138785793981042]": { + "$type": "SelectionComponent", + "Id": 11701138785793981042 + }, + "Component_[12260880513256986252]": { + "$type": "EditorEntityIconComponent", + "Id": 12260880513256986252 + }, + "Component_[13711420870643673468]": { + "$type": "EditorDisabledCompositionComponent", + "Id": 13711420870643673468 + }, + "Component_[138002849734991713]": { + "$type": "EditorOnlyEntityComponent", + "Id": 138002849734991713 + }, + "Component_[16578565737331764849]": { + "$type": "{27F1E1A1-8D9D-4C3B-BD3A-AFB9762449C0} TransformComponent", + "Id": 16578565737331764849, + "Parent Entity": "Entity_[1176639161715]" + }, + "Component_[16919232076966545697]": { + "$type": "EditorInspectorComponent", + "Id": 16919232076966545697 + }, + "Component_[5182430712893438093]": { + "$type": "EditorMaterialComponent", + "Id": 5182430712893438093 + }, + "Component_[5675108321710651991]": { + "$type": "AZ::Render::EditorMeshComponent", + "Id": 5675108321710651991, + "Controller": { + "Configuration": { + "ModelAsset": { + "assetId": { + "guid": "{0CD745C0-6AA8-569A-A68A-73A3270986C4}", + "subId": 277889906 + }, + "assetHint": "objects/groudplane/groundplane_512x512m.azmodel" + } + } + } + }, + "Component_[5681893399601237518]": { + "$type": "EditorEntitySortComponent", + "Id": 5681893399601237518 + }, + "Component_[592692962543397545]": { + "$type": "EditorPendingCompositionComponent", + "Id": 592692962543397545 + }, + "Component_[7090012899106946164]": { + "$type": "EditorLockComponent", + "Id": 7090012899106946164 + }, + "Component_[9410832619875640998]": { + "$type": "EditorVisibilityComponent", + "Id": 9410832619875640998 + } + } + }, + "Entity_[1163754259827]": { + "Id": "Entity_[1163754259827]", + "Name": "Camera", + "Components": { + "Component_[11895140916889160460]": { + "$type": "EditorEntityIconComponent", + "Id": 11895140916889160460 + }, + "Component_[16880285896855930892]": { + "$type": "{CA11DA46-29FF-4083-B5F6-E02C3A8C3A3D} EditorCameraComponent", + "Id": 16880285896855930892, + "Controller": { + "Configuration": { + "Field of View": 55.0, + "EditorEntityId": 11050384689878106598 + } + } + }, + "Component_[17187464423780271193]": { + "$type": "EditorLockComponent", + "Id": 17187464423780271193 + }, + "Component_[17495696818315413311]": { + "$type": "EditorEntitySortComponent", + "Id": 17495696818315413311 + }, + "Component_[18086214374043522055]": { + "$type": "{27F1E1A1-8D9D-4C3B-BD3A-AFB9762449C0} TransformComponent", + "Id": 18086214374043522055, + "Parent Entity": "Entity_[1176639161715]", + "Transform Data": { + "Translate": [ + -2.3000001907348633, + -3.9368600845336914, + 1.0 + ], + "Rotate": [ + -2.050307512283325, + 1.9552897214889526, + -43.623355865478516 + ] + } + }, + "Component_[18387556550380114975]": { + "$type": "SelectionComponent", + "Id": 18387556550380114975 + }, + "Component_[2654521436129313160]": { + "$type": "EditorVisibilityComponent", + "Id": 2654521436129313160 + }, + "Component_[5265045084611556958]": { + "$type": "EditorDisabledCompositionComponent", + "Id": 5265045084611556958 + }, + "Component_[7169798125182238623]": { + "$type": "EditorPendingCompositionComponent", + "Id": 7169798125182238623 + }, + "Component_[7255796294953281766]": { + "$type": "GenericComponentWrapper", + "Id": 7255796294953281766, + "m_template": { + "$type": "FlyCameraInputComponent" + } + }, + "Component_[8866210352157164042]": { + "$type": "EditorInspectorComponent", + "Id": 8866210352157164042 + }, + "Component_[9129253381063760879]": { + "$type": "EditorOnlyEntityComponent", + "Id": 9129253381063760879 + } + } + }, + "Entity_[1168049227123]": { + "Id": "Entity_[1168049227123]", + "Name": "Grid", + "Components": { + "Component_[11443347433215807130]": { + "$type": "EditorEntityIconComponent", + "Id": 11443347433215807130 + }, + "Component_[11779275529534764488]": { + "$type": "SelectionComponent", + "Id": 11779275529534764488 + }, + "Component_[14249419413039427459]": { + "$type": "EditorInspectorComponent", + "Id": 14249419413039427459 + }, + "Component_[15448581635946161318]": { + "$type": "AZ::Render::EditorGridComponent", + "Id": 15448581635946161318, + "Controller": { + "Configuration": { + "primarySpacing": 4.0, + "primaryColor": [ + 0.501960813999176, + 0.501960813999176, + 0.501960813999176 + ], + "secondarySpacing": 0.5, + "secondaryColor": [ + 0.250980406999588, + 0.250980406999588, + 0.250980406999588 + ] + } + } + }, + "Component_[1843303322527297409]": { + "$type": "EditorDisabledCompositionComponent", + "Id": 1843303322527297409 + }, + "Component_[380249072065273654]": { + "$type": "{27F1E1A1-8D9D-4C3B-BD3A-AFB9762449C0} TransformComponent", + "Id": 380249072065273654, + "Parent Entity": "Entity_[1176639161715]" + }, + "Component_[7476660583684339787]": { + "$type": "EditorPendingCompositionComponent", + "Id": 7476660583684339787 + }, + "Component_[7557626501215118375]": { + "$type": "EditorEntitySortComponent", + "Id": 7557626501215118375 + }, + "Component_[7984048488947365511]": { + "$type": "EditorVisibilityComponent", + "Id": 7984048488947365511 + }, + "Component_[8118181039276487398]": { + "$type": "EditorOnlyEntityComponent", + "Id": 8118181039276487398 + }, + "Component_[9189909764215270515]": { + "$type": "EditorLockComponent", + "Id": 9189909764215270515 + } + } + }, + "Entity_[1172344194419]": { + "Id": "Entity_[1172344194419]", + "Name": "Shader Ball", + "Components": { + "Component_[10789351944715265527]": { + "$type": "EditorOnlyEntityComponent", + "Id": 10789351944715265527 + }, + "Component_[12037033284781049225]": { + "$type": "EditorEntitySortComponent", + "Id": 12037033284781049225 + }, + "Component_[13759153306105970079]": { + "$type": "EditorPendingCompositionComponent", + "Id": 13759153306105970079 + }, + "Component_[14135560884830586279]": { + "$type": "EditorInspectorComponent", + "Id": 14135560884830586279 + }, + "Component_[16247165675903986673]": { + "$type": "EditorVisibilityComponent", + "Id": 16247165675903986673 + }, + "Component_[18082433625958885247]": { + "$type": "EditorDisabledCompositionComponent", + "Id": 18082433625958885247 + }, + "Component_[6472623349872972660]": { + "$type": "{27F1E1A1-8D9D-4C3B-BD3A-AFB9762449C0} TransformComponent", + "Id": 6472623349872972660, + "Parent Entity": "Entity_[1176639161715]", + "Transform Data": { + "Rotate": [ + 0.0, + 0.10000000149011612, + 180.0 + ] + } + }, + "Component_[6495255223970673916]": { + "$type": "AZ::Render::EditorMeshComponent", + "Id": 6495255223970673916, + "Controller": { + "Configuration": { + "ModelAsset": { + "assetId": { + "guid": "{FD340C30-755C-5911-92A3-19A3F7A77931}", + "subId": 281415304 + }, + "assetHint": "objects/shaderball/shaderball_default_1m.azmodel" + } + } + } + }, + "Component_[8056625192494070973]": { + "$type": "SelectionComponent", + "Id": 8056625192494070973 + }, + "Component_[8550141614185782969]": { + "$type": "EditorEntityIconComponent", + "Id": 8550141614185782969 + }, + "Component_[9439770997198325425]": { + "$type": "EditorLockComponent", + "Id": 9439770997198325425 + } + } + }, + "Entity_[1176639161715]": { + "Id": "Entity_[1176639161715]", + "Name": "Atom Default Environment", + "Components": { + "Component_[10757302973393310045]": { + "$type": "{27F1E1A1-8D9D-4C3B-BD3A-AFB9762449C0} TransformComponent", + "Id": 10757302973393310045, + "Parent Entity": "Entity_[1146574390643]" + }, + "Component_[14505817420424255464]": { + "$type": "EditorInspectorComponent", + "Id": 14505817420424255464, + "ComponentOrderEntryArray": [ + { + "ComponentId": 10757302973393310045 + } + ] + }, + "Component_[14988041764659020032]": { + "$type": "EditorLockComponent", + "Id": 14988041764659020032 + }, + "Component_[15808690248755038124]": { + "$type": "SelectionComponent", + "Id": 15808690248755038124 + }, + "Component_[15900837685796817138]": { + "$type": "EditorVisibilityComponent", + "Id": 15900837685796817138 + }, + "Component_[3298767348226484884]": { + "$type": "EditorOnlyEntityComponent", + "Id": 3298767348226484884 + }, + "Component_[4076975109609220594]": { + "$type": "EditorPendingCompositionComponent", + "Id": 4076975109609220594 + }, + "Component_[5679760548946028854]": { + "$type": "EditorDisabledCompositionComponent", + "Id": 5679760548946028854 + }, + "Component_[5855590796136709437]": { + "$type": "EditorEntitySortComponent", + "Id": 5855590796136709437, + "Child Entity Order": [ + "Entity_[1155164325235]", + "Entity_[1180934129011]", + "Entity_[1172344194419]", + "Entity_[1168049227123]", + "Entity_[1163754259827]", + "Entity_[1159459292531]" + ] + }, + "Component_[9277695270015777859]": { + "$type": "EditorEntityIconComponent", + "Id": 9277695270015777859 + } + } + }, + "Entity_[1180934129011]": { + "Id": "Entity_[1180934129011]", + "Name": "Global Sky", + "Components": { + "Component_[11231930600558681245]": { + "$type": "AZ::Render::EditorHDRiSkyboxComponent", + "Id": 11231930600558681245, + "Controller": { + "Configuration": { + "CubemapAsset": { + "assetId": { + "guid": "{215E47FD-D181-5832-B1AB-91673ABF6399}", + "subId": 1000 + }, + "assetHint": "lightingpresets/highcontrast/goegap_4k_skyboxcm.exr.streamingimage" + } + } + } + }, + "Component_[11980494120202836095]": { + "$type": "SelectionComponent", + "Id": 11980494120202836095 + }, + "Component_[1428633914413949476]": { + "$type": "EditorLockComponent", + "Id": 1428633914413949476 + }, + "Component_[14936200426671614999]": { + "$type": "AZ::Render::EditorImageBasedLightComponent", + "Id": 14936200426671614999, + "Controller": { + "Configuration": { + "diffuseImageAsset": { + "assetId": { + "guid": "{3FD09945-D0F2-55C8-B9AF-B2FD421FE3BE}", + "subId": 3000 + }, + "assetHint": "lightingpresets/highcontrast/goegap_4k_iblglobalcm_ibldiffuse.exr.streamingimage" + }, + "specularImageAsset": { + "assetId": { + "guid": "{3FD09945-D0F2-55C8-B9AF-B2FD421FE3BE}", + "subId": 2000 + }, + "assetHint": "lightingpresets/highcontrast/goegap_4k_iblglobalcm_iblspecular.exr.streamingimage" + } + } + } + }, + "Component_[14994774102579326069]": { + "$type": "EditorDisabledCompositionComponent", + "Id": 14994774102579326069 + }, + "Component_[15417479889044493340]": { + "$type": "EditorPendingCompositionComponent", + "Id": 15417479889044493340 + }, + "Component_[15826613364991382688]": { + "$type": "EditorEntitySortComponent", + "Id": 15826613364991382688 + }, + "Component_[1665003113283562343]": { + "$type": "EditorOnlyEntityComponent", + "Id": 1665003113283562343 + }, + "Component_[3704934735944502280]": { + "$type": "EditorEntityIconComponent", + "Id": 3704934735944502280 + }, + "Component_[5698542331457326479]": { + "$type": "EditorVisibilityComponent", + "Id": 5698542331457326479 + }, + "Component_[6644513399057217122]": { + "$type": "{27F1E1A1-8D9D-4C3B-BD3A-AFB9762449C0} TransformComponent", + "Id": 6644513399057217122, + "Parent Entity": "Entity_[1176639161715]" + }, + "Component_[931091830724002070]": { + "$type": "EditorInspectorComponent", + "Id": 931091830724002070 + } + } + }, + "Entity_[12685882829720]": { + "Id": "Entity_[12685882829720]", + "Name": "GlobalGameData", + "Components": { + "Component_[11240656689650225106]": { + "$type": "EditorDisabledCompositionComponent", + "Id": 11240656689650225106 + }, + "Component_[13863201640354873385]": { + "$type": "EditorPendingCompositionComponent", + "Id": 13863201640354873385 + }, + "Component_[14671754037021562789]": { + "$type": "EditorInspectorComponent", + "Id": 14671754037021562789 + }, + "Component_[14750978061505735417]": { + "$type": "EditorScriptCanvasComponent", + "Id": 14750978061505735417, + "m_name": "GlobalGameData", + "m_assetHolder": { + "m_asset": { + "assetId": { + "guid": "{B16589A0-EA01-56BC-8141-91A3967FB95F}" + }, + "assetHint": "levels/multiplayer/autocomponent_rpc/globalgamedata.scriptcanvas" + } + }, + "runtimeDataIsValid": true, + "runtimeDataOverrides": { + "source": { + "assetId": { + "guid": "{B16589A0-EA01-56BC-8141-91A3967FB95F}" + }, + "assetHint": "levels/multiplayer/autocomponent_rpc/globalgamedata.scriptcanvas" + } + } + }, + "Component_[16436925042043744033]": { + "$type": "{27F1E1A1-8D9D-4C3B-BD3A-AFB9762449C0} TransformComponent", + "Id": 16436925042043744033, + "Parent Entity": "Entity_[1146574390643]", + "Transform Data": { + "Translate": [ + 0.0, + 0.10000038146972656, + 4.005393981933594 + ] + } + }, + "Component_[16974524495698916088]": { + "$type": "EditorOnlyEntityComponent", + "Id": 16974524495698916088 + }, + "Component_[2753700837834389204]": { + "$type": "EditorLockComponent", + "Id": 2753700837834389204 + }, + "Component_[3766473509503096065]": { + "$type": "SelectionComponent", + "Id": 3766473509503096065 + }, + "Component_[4025955184206569130]": { + "$type": "EditorEntitySortComponent", + "Id": 4025955184206569130 + }, + "Component_[7909743395732791573]": { + "$type": "EditorVisibilityComponent", + "Id": 7909743395732791573 + }, + "Component_[9550161640684119498]": { + "$type": "EditorEntityIconComponent", + "Id": 9550161640684119498 + } + } + }, + "Entity_[31145534614197]": { + "Id": "Entity_[31145534614197]", + "Name": "NetLevelEntity", + "Components": { + "Component_[12132849363414901338]": { + "$type": "EditorEntityIconComponent", + "Id": 12132849363414901338 + }, + "Component_[12302672911455629152]": { + "$type": "SelectionComponent", + "Id": 12302672911455629152 + }, + "Component_[14169903623243423134]": { + "$type": "EditorVisibilityComponent", + "Id": 14169903623243423134 + }, + "Component_[14607413934411389854]": { + "$type": "EditorInspectorComponent", + "Id": 14607413934411389854 + }, + "Component_[15396284312416541768]": { + "$type": "GenericComponentWrapper", + "Id": 15396284312416541768, + "m_template": { + "$type": "Multiplayer::LocalPredictionPlayerInputComponent" + } + }, + "Component_[15494977028055234270]": { + "$type": "EditorDisabledCompositionComponent", + "Id": 15494977028055234270 + }, + "Component_[16325088972532345964]": { + "$type": "EditorLockComponent", + "Id": 16325088972532345964 + }, + "Component_[1986030426392465743]": { + "$type": "EditorEntitySortComponent", + "Id": 1986030426392465743 + }, + "Component_[4591476848838823508]": { + "$type": "AZ::Render::EditorMeshComponent", + "Id": 4591476848838823508, + "Controller": { + "Configuration": { + "ModelAsset": { + "assetId": { + "guid": "{80FA8BAF-4A5B-5937-9679-2E592E841A3A}", + "subId": 275306041 + }, + "assetHint": "assets/physics/collider_pxmeshautoassigned/spherebot/r0-b_body.azmodel" + } + } + } + }, + "Component_[7256163899440301540]": { + "$type": "EditorScriptCanvasComponent", + "Id": 7256163899440301540, + "m_name": "AutoComponent_RPC_NetLevelEntity", + "m_assetHolder": { + "m_asset": { + "assetId": { + "guid": "{1D517006-AC01-5ECA-AE66-0E007871F0CD}" + }, + "assetHint": "levels/multiplayer/autocomponent_rpc/autocomponent_rpc_netlevelentity.scriptcanvas" + } + }, + "runtimeDataIsValid": true, + "runtimeDataOverrides": { + "source": { + "assetId": { + "guid": "{1D517006-AC01-5ECA-AE66-0E007871F0CD}" + }, + "assetHint": "levels/multiplayer/autocomponent_rpc/autocomponent_rpc_netlevelentity.scriptcanvas" + } + } + }, + "Component_[731336627222243355]": { + "$type": "{27F1E1A1-8D9D-4C3B-BD3A-AFB9762449C0} TransformComponent", + "Id": 731336627222243355, + "Parent Entity": "Entity_[1146574390643]", + "Transform Data": { + "Translate": [ + 2.561863899230957, + -1.038161277770996, + 0.1487259864807129 + ] + } + }, + "Component_[8012379125499217348]": { + "$type": "EditorPendingCompositionComponent", + "Id": 8012379125499217348 + }, + "Component_[8122568562140740597]": { + "$type": "GenericComponentWrapper", + "Id": 8122568562140740597, + "m_template": { + "$type": "Multiplayer::NetworkTransformComponent" + } + }, + "Component_[8805228647591404845]": { + "$type": "GenericComponentWrapper", + "Id": 8805228647591404845, + "m_template": { + "$type": "NetBindComponent" + } + }, + "Component_[9816897251206708579]": { + "$type": "GenericComponentWrapper", + "Id": 9816897251206708579, + "m_template": { + "$type": "AutomatedTesting::NetworkTestPlayerComponent" + } + }, + "Component_[9880860858035405475]": { + "$type": "EditorOnlyEntityComponent", + "Id": 9880860858035405475 + } + } + } + } +} \ No newline at end of file diff --git a/AutomatedTesting/Levels/Multiplayer/AutoComponent_RPC/AutoComponent_RPC.scriptcanvas b/AutomatedTesting/Levels/Multiplayer/AutoComponent_RPC/AutoComponent_RPC.scriptcanvas new file mode 100644 index 0000000000..c1c77b14fe --- /dev/null +++ b/AutomatedTesting/Levels/Multiplayer/AutoComponent_RPC/AutoComponent_RPC.scriptcanvas @@ -0,0 +1,5019 @@ +{ + "Type": "JsonSerialization", + "Version": 1, + "ClassName": "ScriptCanvasData", + "ClassData": { + "m_scriptCanvas": { + "Id": { + "id": 2816238339133127497 + }, + "Name": "AutoComponent_RPC", + "Components": { + "Component_[6790521910463264404]": { + "$type": "EditorGraphVariableManagerComponent", + "Id": 6790521910463264404, + "m_variableData": { + "m_nameVariableMap": [ + { + "Key": { + "m_id": "{71675BCB-6546-4B79-9D5E-912982945852}" + }, + "Value": { + "Datum": { + "scriptCanvasType": { + "m_type": 3 + }, + "isNullPointer": false, + "$type": "double", + "value": 0.0 + }, + "VariableId": { + "m_id": "{71675BCB-6546-4B79-9D5E-912982945852}" + }, + "VariableName": "PlayerNumber" + } + } + ] + } + }, + "Component_[9755768666831861951]": { + "$type": "{4D755CA9-AB92-462C-B24F-0B3376F19967} Graph", + "Id": 9755768666831861951, + "m_graphData": { + "m_nodes": [ + { + "Id": { + "id": 8706984967056 + }, + "Name": "SC-EventNode(AuthorityToAutonomous_PlayerNumber Notify Event)", + "Components": { + "Component_[10688723972761024546]": { + "$type": "AzEventHandler", + "Id": 10688723972761024546, + "Slots": [ + { + "id": { + "m_id": "{46E6B649-CAA4-4318-960D-5E4854E21BB2}" + }, + "contracts": [ + { + "$type": "SlotTypeContract" + }, + { + "$type": "ConnectionLimitContract", + "limit": 1 + }, + { + "$type": "RestrictedNodeContract", + "m_nodeId": { + "id": 8719869868944 + } + } + ], + "slotName": "Connect", + "toolTip": "Connect the AZ Event to this AZ Event Handler.", + "Descriptor": { + "ConnectionType": 1, + "SlotType": 1 + } + }, + { + "id": { + "m_id": "{221AFED2-BD9E-4CFF-8EC7-75ABA019134D}" + }, + "contracts": [ + { + "$type": "SlotTypeContract" + } + ], + "slotName": "Disconnect", + "toolTip": "Disconnect current AZ Event from this AZ Event Handler.", + "Descriptor": { + "ConnectionType": 1, + "SlotType": 1 + } + }, + { + "id": { + "m_id": "{D139A8D2-F57B-4EBF-B7F8-1D65C2D97C25}" + }, + "contracts": [ + { + "$type": "SlotTypeContract" + } + ], + "slotName": "On Connected", + "toolTip": "Signaled when a connection has taken place.", + "Descriptor": { + "ConnectionType": 2, + "SlotType": 1 + } + }, + { + "id": { + "m_id": "{3F47A140-182E-4B32-AE14-467555A6640A}" + }, + "contracts": [ + { + "$type": "SlotTypeContract" + } + ], + "slotName": "On Disconnected", + "toolTip": "Signaled when this event handler is disconnected.", + "Descriptor": { + "ConnectionType": 2, + "SlotType": 1 + } + }, + { + "id": { + "m_id": "{586BE222-2DEA-4E08-968F-07CA4EB96C54}" + }, + "contracts": [ + { + "$type": "SlotTypeContract" + } + ], + "slotName": "OnEvent", + "toolTip": "Triggered when the AZ Event invokes Signal() function.", + "Descriptor": { + "ConnectionType": 2, + "SlotType": 1 + }, + "IsLatent": true + }, + { + "id": { + "m_id": "{82D3E2FD-ADFA-47F7-A889-D1172BF2EC49}" + }, + "contracts": [ + { + "$type": "SlotTypeContract" + } + ], + "slotName": "player_number", + "DisplayDataType": { + "m_type": 3 + }, + "Descriptor": { + "ConnectionType": 2, + "SlotType": 2 + }, + "DataType": 1 + }, + { + "id": { + "m_id": "{8C7E88EA-8FEE-45D0-9A2E-78BC4A18F508}" + }, + "contracts": [ + { + "$type": "SlotTypeContract" + }, + { + "$type": "ConnectionLimitContract", + "limit": 1 + }, + { + "$type": "RestrictedNodeContract", + "m_nodeId": { + "id": 8719869868944 + } + } + ], + "slotName": "AuthorityToAutonomous_PlayerNumber Notify Event", + "Descriptor": { + "ConnectionType": 1, + "SlotType": 2 + }, + "DataType": 1 + } + ], + "Datums": [ + { + "scriptCanvasType": { + "m_type": 4, + "m_azType": "{DB613438-34F0-5B2E-A413-77424F4254CD}" + }, + "isNullPointer": true, + "label": "AuthorityToAutonomous_PlayerNumber Notify Event" + } + ], + "m_azEventEntry": { + "m_eventName": "AuthorityToAutonomous_PlayerNumber Notify Event", + "m_parameterSlotIds": [ + { + "m_id": "{82D3E2FD-ADFA-47F7-A889-D1172BF2EC49}" + }, + { + "m_id": "{82D3E2FD-ADFA-47F7-A889-D1172BF2EC49}" + }, + { + "m_id": "{82D3E2FD-ADFA-47F7-A889-D1172BF2EC49}" + }, + { + "m_id": "{82D3E2FD-ADFA-47F7-A889-D1172BF2EC49}" + }, + { + "m_id": "{82D3E2FD-ADFA-47F7-A889-D1172BF2EC49}" + }, + { + "m_id": "{82D3E2FD-ADFA-47F7-A889-D1172BF2EC49}" + }, + { + "m_id": "{82D3E2FD-ADFA-47F7-A889-D1172BF2EC49}" + }, + { + "m_id": "{82D3E2FD-ADFA-47F7-A889-D1172BF2EC49}" + }, + { + "m_id": "{82D3E2FD-ADFA-47F7-A889-D1172BF2EC49}" + }, + { + "m_id": "{82D3E2FD-ADFA-47F7-A889-D1172BF2EC49}" + }, + { + "m_id": "{82D3E2FD-ADFA-47F7-A889-D1172BF2EC49}" + }, + { + "m_id": "{82D3E2FD-ADFA-47F7-A889-D1172BF2EC49}" + }, + { + "m_id": "{82D3E2FD-ADFA-47F7-A889-D1172BF2EC49}" + }, + { + "m_id": "{82D3E2FD-ADFA-47F7-A889-D1172BF2EC49}" + }, + { + "m_id": "{82D3E2FD-ADFA-47F7-A889-D1172BF2EC49}" + }, + { + "m_id": "{82D3E2FD-ADFA-47F7-A889-D1172BF2EC49}" + }, + { + "m_id": "{82D3E2FD-ADFA-47F7-A889-D1172BF2EC49}" + }, + { + "m_id": "{82D3E2FD-ADFA-47F7-A889-D1172BF2EC49}" + }, + { + "m_id": "{82D3E2FD-ADFA-47F7-A889-D1172BF2EC49}" + }, + { + "m_id": "{82D3E2FD-ADFA-47F7-A889-D1172BF2EC49}" + }, + { + "m_id": "{82D3E2FD-ADFA-47F7-A889-D1172BF2EC49}" + }, + { + "m_id": "{82D3E2FD-ADFA-47F7-A889-D1172BF2EC49}" + }, + { + "m_id": "{82D3E2FD-ADFA-47F7-A889-D1172BF2EC49}" + }, + { + "m_id": "{82D3E2FD-ADFA-47F7-A889-D1172BF2EC49}" + }, + { + "m_id": "{82D3E2FD-ADFA-47F7-A889-D1172BF2EC49}" + }, + { + "m_id": "{82D3E2FD-ADFA-47F7-A889-D1172BF2EC49}" + }, + { + "m_id": "{82D3E2FD-ADFA-47F7-A889-D1172BF2EC49}" + }, + { + "m_id": "{82D3E2FD-ADFA-47F7-A889-D1172BF2EC49}" + }, + { + "m_id": "{82D3E2FD-ADFA-47F7-A889-D1172BF2EC49}" + }, + { + "m_id": "{82D3E2FD-ADFA-47F7-A889-D1172BF2EC49}" + }, + { + "m_id": "{82D3E2FD-ADFA-47F7-A889-D1172BF2EC49}" + }, + { + "m_id": "{82D3E2FD-ADFA-47F7-A889-D1172BF2EC49}" + }, + { + "m_id": "{82D3E2FD-ADFA-47F7-A889-D1172BF2EC49}" + }, + { + "m_id": "{82D3E2FD-ADFA-47F7-A889-D1172BF2EC49}" + }, + { + "m_id": "{82D3E2FD-ADFA-47F7-A889-D1172BF2EC49}" + }, + { + "m_id": "{82D3E2FD-ADFA-47F7-A889-D1172BF2EC49}" + }, + { + "m_id": "{82D3E2FD-ADFA-47F7-A889-D1172BF2EC49}" + }, + { + "m_id": "{82D3E2FD-ADFA-47F7-A889-D1172BF2EC49}" + }, + { + "m_id": "{82D3E2FD-ADFA-47F7-A889-D1172BF2EC49}" + }, + { + "m_id": "{82D3E2FD-ADFA-47F7-A889-D1172BF2EC49}" + }, + { + "m_id": "{82D3E2FD-ADFA-47F7-A889-D1172BF2EC49}" + }, + { + "m_id": "{82D3E2FD-ADFA-47F7-A889-D1172BF2EC49}" + }, + { + "m_id": "{82D3E2FD-ADFA-47F7-A889-D1172BF2EC49}" + }, + { + "m_id": "{82D3E2FD-ADFA-47F7-A889-D1172BF2EC49}" + }, + { + "m_id": "{82D3E2FD-ADFA-47F7-A889-D1172BF2EC49}" + }, + { + "m_id": "{82D3E2FD-ADFA-47F7-A889-D1172BF2EC49}" + }, + { + "m_id": "{82D3E2FD-ADFA-47F7-A889-D1172BF2EC49}" + }, + { + "m_id": "{82D3E2FD-ADFA-47F7-A889-D1172BF2EC49}" + }, + { + "m_id": "{82D3E2FD-ADFA-47F7-A889-D1172BF2EC49}" + }, + { + "m_id": "{82D3E2FD-ADFA-47F7-A889-D1172BF2EC49}" + }, + { + "m_id": "{82D3E2FD-ADFA-47F7-A889-D1172BF2EC49}" + }, + { + "m_id": "{82D3E2FD-ADFA-47F7-A889-D1172BF2EC49}" + }, + { + "m_id": "{82D3E2FD-ADFA-47F7-A889-D1172BF2EC49}" + }, + { + "m_id": "{82D3E2FD-ADFA-47F7-A889-D1172BF2EC49}" + }, + { + "m_id": "{82D3E2FD-ADFA-47F7-A889-D1172BF2EC49}" + }, + { + "m_id": "{82D3E2FD-ADFA-47F7-A889-D1172BF2EC49}" + }, + { + "m_id": "{82D3E2FD-ADFA-47F7-A889-D1172BF2EC49}" + }, + { + "m_id": "{82D3E2FD-ADFA-47F7-A889-D1172BF2EC49}" + }, + { + "m_id": "{82D3E2FD-ADFA-47F7-A889-D1172BF2EC49}" + }, + { + "m_id": "{82D3E2FD-ADFA-47F7-A889-D1172BF2EC49}" + }, + { + "m_id": "{82D3E2FD-ADFA-47F7-A889-D1172BF2EC49}" + }, + { + "m_id": "{82D3E2FD-ADFA-47F7-A889-D1172BF2EC49}" + }, + { + "m_id": "{82D3E2FD-ADFA-47F7-A889-D1172BF2EC49}" + }, + { + "m_id": "{82D3E2FD-ADFA-47F7-A889-D1172BF2EC49}" + }, + { + "m_id": "{82D3E2FD-ADFA-47F7-A889-D1172BF2EC49}" + }, + { + "m_id": "{82D3E2FD-ADFA-47F7-A889-D1172BF2EC49}" + }, + { + "m_id": "{82D3E2FD-ADFA-47F7-A889-D1172BF2EC49}" + }, + { + "m_id": "{82D3E2FD-ADFA-47F7-A889-D1172BF2EC49}" + }, + { + "m_id": "{82D3E2FD-ADFA-47F7-A889-D1172BF2EC49}" + }, + { + "m_id": "{82D3E2FD-ADFA-47F7-A889-D1172BF2EC49}" + }, + { + "m_id": "{82D3E2FD-ADFA-47F7-A889-D1172BF2EC49}" + }, + { + "m_id": "{82D3E2FD-ADFA-47F7-A889-D1172BF2EC49}" + }, + { + "m_id": "{82D3E2FD-ADFA-47F7-A889-D1172BF2EC49}" + }, + { + "m_id": "{82D3E2FD-ADFA-47F7-A889-D1172BF2EC49}" + }, + { + "m_id": "{82D3E2FD-ADFA-47F7-A889-D1172BF2EC49}" + }, + { + "m_id": "{82D3E2FD-ADFA-47F7-A889-D1172BF2EC49}" + }, + { + "m_id": "{82D3E2FD-ADFA-47F7-A889-D1172BF2EC49}" + }, + { + "m_id": "{82D3E2FD-ADFA-47F7-A889-D1172BF2EC49}" + }, + { + "m_id": "{82D3E2FD-ADFA-47F7-A889-D1172BF2EC49}" + }, + { + "m_id": "{82D3E2FD-ADFA-47F7-A889-D1172BF2EC49}" + }, + { + "m_id": "{82D3E2FD-ADFA-47F7-A889-D1172BF2EC49}" + }, + { + "m_id": "{82D3E2FD-ADFA-47F7-A889-D1172BF2EC49}" + }, + { + "m_id": "{82D3E2FD-ADFA-47F7-A889-D1172BF2EC49}" + }, + { + "m_id": "{82D3E2FD-ADFA-47F7-A889-D1172BF2EC49}" + }, + { + "m_id": "{82D3E2FD-ADFA-47F7-A889-D1172BF2EC49}" + }, + { + "m_id": "{82D3E2FD-ADFA-47F7-A889-D1172BF2EC49}" + }, + { + "m_id": "{82D3E2FD-ADFA-47F7-A889-D1172BF2EC49}" + }, + { + "m_id": "{82D3E2FD-ADFA-47F7-A889-D1172BF2EC49}" + }, + { + "m_id": "{82D3E2FD-ADFA-47F7-A889-D1172BF2EC49}" + }, + { + "m_id": "{82D3E2FD-ADFA-47F7-A889-D1172BF2EC49}" + }, + { + "m_id": "{82D3E2FD-ADFA-47F7-A889-D1172BF2EC49}" + }, + { + "m_id": "{82D3E2FD-ADFA-47F7-A889-D1172BF2EC49}" + }, + { + "m_id": "{82D3E2FD-ADFA-47F7-A889-D1172BF2EC49}" + }, + { + "m_id": "{82D3E2FD-ADFA-47F7-A889-D1172BF2EC49}" + }, + { + "m_id": "{82D3E2FD-ADFA-47F7-A889-D1172BF2EC49}" + }, + { + "m_id": "{82D3E2FD-ADFA-47F7-A889-D1172BF2EC49}" + }, + { + "m_id": "{82D3E2FD-ADFA-47F7-A889-D1172BF2EC49}" + }, + { + "m_id": "{82D3E2FD-ADFA-47F7-A889-D1172BF2EC49}" + }, + { + "m_id": "{82D3E2FD-ADFA-47F7-A889-D1172BF2EC49}" + }, + { + "m_id": "{82D3E2FD-ADFA-47F7-A889-D1172BF2EC49}" + }, + { + "m_id": "{82D3E2FD-ADFA-47F7-A889-D1172BF2EC49}" + }, + { + "m_id": "{82D3E2FD-ADFA-47F7-A889-D1172BF2EC49}" + }, + { + "m_id": "{82D3E2FD-ADFA-47F7-A889-D1172BF2EC49}" + }, + { + "m_id": "{82D3E2FD-ADFA-47F7-A889-D1172BF2EC49}" + }, + { + "m_id": "{82D3E2FD-ADFA-47F7-A889-D1172BF2EC49}" + }, + { + "m_id": "{82D3E2FD-ADFA-47F7-A889-D1172BF2EC49}" + }, + { + "m_id": "{82D3E2FD-ADFA-47F7-A889-D1172BF2EC49}" + }, + { + "m_id": "{82D3E2FD-ADFA-47F7-A889-D1172BF2EC49}" + }, + { + "m_id": "{82D3E2FD-ADFA-47F7-A889-D1172BF2EC49}" + }, + { + "m_id": "{82D3E2FD-ADFA-47F7-A889-D1172BF2EC49}" + }, + { + "m_id": "{82D3E2FD-ADFA-47F7-A889-D1172BF2EC49}" + }, + { + "m_id": "{82D3E2FD-ADFA-47F7-A889-D1172BF2EC49}" + }, + { + "m_id": "{82D3E2FD-ADFA-47F7-A889-D1172BF2EC49}" + }, + { + "m_id": "{82D3E2FD-ADFA-47F7-A889-D1172BF2EC49}" + }, + { + "m_id": "{82D3E2FD-ADFA-47F7-A889-D1172BF2EC49}" + }, + { + "m_id": "{82D3E2FD-ADFA-47F7-A889-D1172BF2EC49}" + }, + { + "m_id": "{82D3E2FD-ADFA-47F7-A889-D1172BF2EC49}" + }, + { + "m_id": "{82D3E2FD-ADFA-47F7-A889-D1172BF2EC49}" + }, + { + "m_id": "{82D3E2FD-ADFA-47F7-A889-D1172BF2EC49}" + }, + { + "m_id": "{82D3E2FD-ADFA-47F7-A889-D1172BF2EC49}" + }, + { + "m_id": "{82D3E2FD-ADFA-47F7-A889-D1172BF2EC49}" + }, + { + "m_id": "{82D3E2FD-ADFA-47F7-A889-D1172BF2EC49}" + }, + { + "m_id": "{82D3E2FD-ADFA-47F7-A889-D1172BF2EC49}" + }, + { + "m_id": "{82D3E2FD-ADFA-47F7-A889-D1172BF2EC49}" + }, + { + "m_id": "{82D3E2FD-ADFA-47F7-A889-D1172BF2EC49}" + }, + { + "m_id": "{82D3E2FD-ADFA-47F7-A889-D1172BF2EC49}" + }, + { + "m_id": "{82D3E2FD-ADFA-47F7-A889-D1172BF2EC49}" + }, + { + "m_id": "{82D3E2FD-ADFA-47F7-A889-D1172BF2EC49}" + }, + { + "m_id": "{82D3E2FD-ADFA-47F7-A889-D1172BF2EC49}" + }, + { + "m_id": "{82D3E2FD-ADFA-47F7-A889-D1172BF2EC49}" + }, + { + "m_id": "{82D3E2FD-ADFA-47F7-A889-D1172BF2EC49}" + }, + { + "m_id": "{82D3E2FD-ADFA-47F7-A889-D1172BF2EC49}" + }, + { + "m_id": "{82D3E2FD-ADFA-47F7-A889-D1172BF2EC49}" + }, + { + "m_id": "{82D3E2FD-ADFA-47F7-A889-D1172BF2EC49}" + }, + { + "m_id": "{82D3E2FD-ADFA-47F7-A889-D1172BF2EC49}" + }, + { + "m_id": "{82D3E2FD-ADFA-47F7-A889-D1172BF2EC49}" + }, + { + "m_id": "{82D3E2FD-ADFA-47F7-A889-D1172BF2EC49}" + }, + { + "m_id": "{82D3E2FD-ADFA-47F7-A889-D1172BF2EC49}" + }, + { + "m_id": "{82D3E2FD-ADFA-47F7-A889-D1172BF2EC49}" + }, + { + "m_id": "{82D3E2FD-ADFA-47F7-A889-D1172BF2EC49}" + }, + { + "m_id": "{82D3E2FD-ADFA-47F7-A889-D1172BF2EC49}" + }, + { + "m_id": "{82D3E2FD-ADFA-47F7-A889-D1172BF2EC49}" + }, + { + "m_id": "{82D3E2FD-ADFA-47F7-A889-D1172BF2EC49}" + }, + { + "m_id": "{82D3E2FD-ADFA-47F7-A889-D1172BF2EC49}" + }, + { + "m_id": "{82D3E2FD-ADFA-47F7-A889-D1172BF2EC49}" + }, + { + "m_id": "{82D3E2FD-ADFA-47F7-A889-D1172BF2EC49}" + }, + { + "m_id": "{82D3E2FD-ADFA-47F7-A889-D1172BF2EC49}" + }, + { + "m_id": "{82D3E2FD-ADFA-47F7-A889-D1172BF2EC49}" + }, + { + "m_id": "{82D3E2FD-ADFA-47F7-A889-D1172BF2EC49}" + }, + { + "m_id": "{82D3E2FD-ADFA-47F7-A889-D1172BF2EC49}" + }, + { + "m_id": "{82D3E2FD-ADFA-47F7-A889-D1172BF2EC49}" + }, + { + "m_id": "{82D3E2FD-ADFA-47F7-A889-D1172BF2EC49}" + }, + { + "m_id": "{82D3E2FD-ADFA-47F7-A889-D1172BF2EC49}" + }, + { + "m_id": "{82D3E2FD-ADFA-47F7-A889-D1172BF2EC49}" + }, + { + "m_id": "{82D3E2FD-ADFA-47F7-A889-D1172BF2EC49}" + }, + { + "m_id": "{82D3E2FD-ADFA-47F7-A889-D1172BF2EC49}" + }, + { + "m_id": "{82D3E2FD-ADFA-47F7-A889-D1172BF2EC49}" + }, + { + "m_id": "{82D3E2FD-ADFA-47F7-A889-D1172BF2EC49}" + }, + { + "m_id": "{82D3E2FD-ADFA-47F7-A889-D1172BF2EC49}" + }, + { + "m_id": "{82D3E2FD-ADFA-47F7-A889-D1172BF2EC49}" + }, + { + "m_id": "{82D3E2FD-ADFA-47F7-A889-D1172BF2EC49}" + }, + { + "m_id": "{82D3E2FD-ADFA-47F7-A889-D1172BF2EC49}" + }, + { + "m_id": "{82D3E2FD-ADFA-47F7-A889-D1172BF2EC49}" + }, + { + "m_id": "{82D3E2FD-ADFA-47F7-A889-D1172BF2EC49}" + }, + { + "m_id": "{82D3E2FD-ADFA-47F7-A889-D1172BF2EC49}" + }, + { + "m_id": "{82D3E2FD-ADFA-47F7-A889-D1172BF2EC49}" + }, + { + "m_id": "{82D3E2FD-ADFA-47F7-A889-D1172BF2EC49}" + }, + { + "m_id": "{82D3E2FD-ADFA-47F7-A889-D1172BF2EC49}" + }, + { + "m_id": "{82D3E2FD-ADFA-47F7-A889-D1172BF2EC49}" + }, + { + "m_id": "{82D3E2FD-ADFA-47F7-A889-D1172BF2EC49}" + }, + { + "m_id": "{82D3E2FD-ADFA-47F7-A889-D1172BF2EC49}" + }, + { + "m_id": "{82D3E2FD-ADFA-47F7-A889-D1172BF2EC49}" + }, + { + "m_id": "{82D3E2FD-ADFA-47F7-A889-D1172BF2EC49}" + }, + { + "m_id": "{82D3E2FD-ADFA-47F7-A889-D1172BF2EC49}" + }, + { + "m_id": "{82D3E2FD-ADFA-47F7-A889-D1172BF2EC49}" + }, + { + "m_id": "{82D3E2FD-ADFA-47F7-A889-D1172BF2EC49}" + }, + { + "m_id": "{82D3E2FD-ADFA-47F7-A889-D1172BF2EC49}" + }, + { + "m_id": "{82D3E2FD-ADFA-47F7-A889-D1172BF2EC49}" + }, + { + "m_id": "{82D3E2FD-ADFA-47F7-A889-D1172BF2EC49}" + }, + { + "m_id": "{82D3E2FD-ADFA-47F7-A889-D1172BF2EC49}" + }, + { + "m_id": "{82D3E2FD-ADFA-47F7-A889-D1172BF2EC49}" + }, + { + "m_id": "{82D3E2FD-ADFA-47F7-A889-D1172BF2EC49}" + }, + { + "m_id": "{82D3E2FD-ADFA-47F7-A889-D1172BF2EC49}" + }, + { + "m_id": "{82D3E2FD-ADFA-47F7-A889-D1172BF2EC49}" + }, + { + "m_id": "{82D3E2FD-ADFA-47F7-A889-D1172BF2EC49}" + }, + { + "m_id": "{82D3E2FD-ADFA-47F7-A889-D1172BF2EC49}" + }, + { + "m_id": "{82D3E2FD-ADFA-47F7-A889-D1172BF2EC49}" + }, + { + "m_id": "{82D3E2FD-ADFA-47F7-A889-D1172BF2EC49}" + }, + { + "m_id": "{82D3E2FD-ADFA-47F7-A889-D1172BF2EC49}" + }, + { + "m_id": "{82D3E2FD-ADFA-47F7-A889-D1172BF2EC49}" + }, + { + "m_id": "{82D3E2FD-ADFA-47F7-A889-D1172BF2EC49}" + }, + { + "m_id": "{82D3E2FD-ADFA-47F7-A889-D1172BF2EC49}" + }, + { + "m_id": "{82D3E2FD-ADFA-47F7-A889-D1172BF2EC49}" + }, + { + "m_id": "{82D3E2FD-ADFA-47F7-A889-D1172BF2EC49}" + }, + { + "m_id": "{82D3E2FD-ADFA-47F7-A889-D1172BF2EC49}" + }, + { + "m_id": "{82D3E2FD-ADFA-47F7-A889-D1172BF2EC49}" + }, + { + "m_id": "{82D3E2FD-ADFA-47F7-A889-D1172BF2EC49}" + }, + { + "m_id": "{82D3E2FD-ADFA-47F7-A889-D1172BF2EC49}" + }, + { + "m_id": "{82D3E2FD-ADFA-47F7-A889-D1172BF2EC49}" + }, + { + "m_id": "{82D3E2FD-ADFA-47F7-A889-D1172BF2EC49}" + }, + { + "m_id": "{82D3E2FD-ADFA-47F7-A889-D1172BF2EC49}" + }, + { + "m_id": "{82D3E2FD-ADFA-47F7-A889-D1172BF2EC49}" + }, + { + "m_id": "{82D3E2FD-ADFA-47F7-A889-D1172BF2EC49}" + }, + { + "m_id": "{82D3E2FD-ADFA-47F7-A889-D1172BF2EC49}" + }, + { + "m_id": "{82D3E2FD-ADFA-47F7-A889-D1172BF2EC49}" + }, + { + "m_id": "{82D3E2FD-ADFA-47F7-A889-D1172BF2EC49}" + }, + { + "m_id": "{82D3E2FD-ADFA-47F7-A889-D1172BF2EC49}" + }, + { + "m_id": "{82D3E2FD-ADFA-47F7-A889-D1172BF2EC49}" + }, + { + "m_id": "{82D3E2FD-ADFA-47F7-A889-D1172BF2EC49}" + }, + { + "m_id": "{82D3E2FD-ADFA-47F7-A889-D1172BF2EC49}" + }, + { + "m_id": "{82D3E2FD-ADFA-47F7-A889-D1172BF2EC49}" + }, + { + "m_id": "{82D3E2FD-ADFA-47F7-A889-D1172BF2EC49}" + }, + { + "m_id": "{82D3E2FD-ADFA-47F7-A889-D1172BF2EC49}" + }, + { + "m_id": "{82D3E2FD-ADFA-47F7-A889-D1172BF2EC49}" + }, + { + "m_id": "{82D3E2FD-ADFA-47F7-A889-D1172BF2EC49}" + }, + { + "m_id": "{82D3E2FD-ADFA-47F7-A889-D1172BF2EC49}" + }, + { + "m_id": "{82D3E2FD-ADFA-47F7-A889-D1172BF2EC49}" + }, + { + "m_id": "{82D3E2FD-ADFA-47F7-A889-D1172BF2EC49}" + }, + { + "m_id": "{82D3E2FD-ADFA-47F7-A889-D1172BF2EC49}" + }, + { + "m_id": "{82D3E2FD-ADFA-47F7-A889-D1172BF2EC49}" + }, + { + "m_id": "{82D3E2FD-ADFA-47F7-A889-D1172BF2EC49}" + }, + { + "m_id": "{82D3E2FD-ADFA-47F7-A889-D1172BF2EC49}" + }, + { + "m_id": "{82D3E2FD-ADFA-47F7-A889-D1172BF2EC49}" + }, + { + "m_id": "{82D3E2FD-ADFA-47F7-A889-D1172BF2EC49}" + }, + { + "m_id": "{82D3E2FD-ADFA-47F7-A889-D1172BF2EC49}" + }, + { + "m_id": "{82D3E2FD-ADFA-47F7-A889-D1172BF2EC49}" + }, + { + "m_id": "{82D3E2FD-ADFA-47F7-A889-D1172BF2EC49}" + }, + { + "m_id": "{82D3E2FD-ADFA-47F7-A889-D1172BF2EC49}" + }, + { + "m_id": "{82D3E2FD-ADFA-47F7-A889-D1172BF2EC49}" + }, + { + "m_id": "{82D3E2FD-ADFA-47F7-A889-D1172BF2EC49}" + }, + { + "m_id": "{82D3E2FD-ADFA-47F7-A889-D1172BF2EC49}" + }, + { + "m_id": "{82D3E2FD-ADFA-47F7-A889-D1172BF2EC49}" + }, + { + "m_id": "{82D3E2FD-ADFA-47F7-A889-D1172BF2EC49}" + }, + { + "m_id": "{82D3E2FD-ADFA-47F7-A889-D1172BF2EC49}" + }, + { + "m_id": "{82D3E2FD-ADFA-47F7-A889-D1172BF2EC49}" + }, + { + "m_id": "{82D3E2FD-ADFA-47F7-A889-D1172BF2EC49}" + }, + { + "m_id": "{82D3E2FD-ADFA-47F7-A889-D1172BF2EC49}" + }, + { + "m_id": "{82D3E2FD-ADFA-47F7-A889-D1172BF2EC49}" + }, + { + "m_id": "{82D3E2FD-ADFA-47F7-A889-D1172BF2EC49}" + }, + { + "m_id": "{82D3E2FD-ADFA-47F7-A889-D1172BF2EC49}" + }, + { + "m_id": "{82D3E2FD-ADFA-47F7-A889-D1172BF2EC49}" + }, + { + "m_id": "{82D3E2FD-ADFA-47F7-A889-D1172BF2EC49}" + }, + { + "m_id": "{82D3E2FD-ADFA-47F7-A889-D1172BF2EC49}" + }, + { + "m_id": "{82D3E2FD-ADFA-47F7-A889-D1172BF2EC49}" + }, + { + "m_id": "{82D3E2FD-ADFA-47F7-A889-D1172BF2EC49}" + }, + { + "m_id": "{82D3E2FD-ADFA-47F7-A889-D1172BF2EC49}" + }, + { + "m_id": "{82D3E2FD-ADFA-47F7-A889-D1172BF2EC49}" + }, + { + "m_id": "{82D3E2FD-ADFA-47F7-A889-D1172BF2EC49}" + }, + { + "m_id": "{82D3E2FD-ADFA-47F7-A889-D1172BF2EC49}" + }, + { + "m_id": "{82D3E2FD-ADFA-47F7-A889-D1172BF2EC49}" + }, + { + "m_id": "{82D3E2FD-ADFA-47F7-A889-D1172BF2EC49}" + }, + { + "m_id": "{82D3E2FD-ADFA-47F7-A889-D1172BF2EC49}" + }, + { + "m_id": "{82D3E2FD-ADFA-47F7-A889-D1172BF2EC49}" + }, + { + "m_id": "{82D3E2FD-ADFA-47F7-A889-D1172BF2EC49}" + }, + { + "m_id": "{82D3E2FD-ADFA-47F7-A889-D1172BF2EC49}" + }, + { + "m_id": "{82D3E2FD-ADFA-47F7-A889-D1172BF2EC49}" + }, + { + "m_id": "{82D3E2FD-ADFA-47F7-A889-D1172BF2EC49}" + }, + { + "m_id": "{82D3E2FD-ADFA-47F7-A889-D1172BF2EC49}" + }, + { + "m_id": "{82D3E2FD-ADFA-47F7-A889-D1172BF2EC49}" + }, + { + "m_id": "{82D3E2FD-ADFA-47F7-A889-D1172BF2EC49}" + }, + { + "m_id": "{82D3E2FD-ADFA-47F7-A889-D1172BF2EC49}" + }, + { + "m_id": "{82D3E2FD-ADFA-47F7-A889-D1172BF2EC49}" + }, + { + "m_id": "{82D3E2FD-ADFA-47F7-A889-D1172BF2EC49}" + }, + { + "m_id": "{82D3E2FD-ADFA-47F7-A889-D1172BF2EC49}" + }, + { + "m_id": "{82D3E2FD-ADFA-47F7-A889-D1172BF2EC49}" + }, + { + "m_id": "{82D3E2FD-ADFA-47F7-A889-D1172BF2EC49}" + }, + { + "m_id": "{82D3E2FD-ADFA-47F7-A889-D1172BF2EC49}" + }, + { + "m_id": "{82D3E2FD-ADFA-47F7-A889-D1172BF2EC49}" + }, + { + "m_id": "{82D3E2FD-ADFA-47F7-A889-D1172BF2EC49}" + }, + { + "m_id": "{82D3E2FD-ADFA-47F7-A889-D1172BF2EC49}" + }, + { + "m_id": "{82D3E2FD-ADFA-47F7-A889-D1172BF2EC49}" + }, + { + "m_id": "{82D3E2FD-ADFA-47F7-A889-D1172BF2EC49}" + }, + { + "m_id": "{82D3E2FD-ADFA-47F7-A889-D1172BF2EC49}" + }, + { + "m_id": "{82D3E2FD-ADFA-47F7-A889-D1172BF2EC49}" + }, + { + "m_id": "{82D3E2FD-ADFA-47F7-A889-D1172BF2EC49}" + }, + { + "m_id": "{82D3E2FD-ADFA-47F7-A889-D1172BF2EC49}" + }, + { + "m_id": "{82D3E2FD-ADFA-47F7-A889-D1172BF2EC49}" + }, + { + "m_id": "{82D3E2FD-ADFA-47F7-A889-D1172BF2EC49}" + }, + { + "m_id": "{82D3E2FD-ADFA-47F7-A889-D1172BF2EC49}" + }, + { + "m_id": "{82D3E2FD-ADFA-47F7-A889-D1172BF2EC49}" + }, + { + "m_id": "{82D3E2FD-ADFA-47F7-A889-D1172BF2EC49}" + }, + { + "m_id": "{82D3E2FD-ADFA-47F7-A889-D1172BF2EC49}" + }, + { + "m_id": "{82D3E2FD-ADFA-47F7-A889-D1172BF2EC49}" + }, + { + "m_id": "{82D3E2FD-ADFA-47F7-A889-D1172BF2EC49}" + }, + { + "m_id": "{82D3E2FD-ADFA-47F7-A889-D1172BF2EC49}" + }, + { + "m_id": "{82D3E2FD-ADFA-47F7-A889-D1172BF2EC49}" + }, + { + "m_id": "{82D3E2FD-ADFA-47F7-A889-D1172BF2EC49}" + }, + { + "m_id": "{82D3E2FD-ADFA-47F7-A889-D1172BF2EC49}" + }, + { + "m_id": "{82D3E2FD-ADFA-47F7-A889-D1172BF2EC49}" + }, + { + "m_id": "{82D3E2FD-ADFA-47F7-A889-D1172BF2EC49}" + }, + { + "m_id": "{82D3E2FD-ADFA-47F7-A889-D1172BF2EC49}" + }, + { + "m_id": "{82D3E2FD-ADFA-47F7-A889-D1172BF2EC49}" + }, + { + "m_id": "{82D3E2FD-ADFA-47F7-A889-D1172BF2EC49}" + }, + { + "m_id": "{82D3E2FD-ADFA-47F7-A889-D1172BF2EC49}" + }, + { + "m_id": "{82D3E2FD-ADFA-47F7-A889-D1172BF2EC49}" + }, + { + "m_id": "{82D3E2FD-ADFA-47F7-A889-D1172BF2EC49}" + }, + { + "m_id": "{82D3E2FD-ADFA-47F7-A889-D1172BF2EC49}" + }, + { + "m_id": "{82D3E2FD-ADFA-47F7-A889-D1172BF2EC49}" + }, + { + "m_id": "{82D3E2FD-ADFA-47F7-A889-D1172BF2EC49}" + }, + { + "m_id": "{82D3E2FD-ADFA-47F7-A889-D1172BF2EC49}" + }, + { + "m_id": "{82D3E2FD-ADFA-47F7-A889-D1172BF2EC49}" + }, + { + "m_id": "{82D3E2FD-ADFA-47F7-A889-D1172BF2EC49}" + }, + { + "m_id": "{82D3E2FD-ADFA-47F7-A889-D1172BF2EC49}" + }, + { + "m_id": "{82D3E2FD-ADFA-47F7-A889-D1172BF2EC49}" + }, + { + "m_id": "{82D3E2FD-ADFA-47F7-A889-D1172BF2EC49}" + }, + { + "m_id": "{82D3E2FD-ADFA-47F7-A889-D1172BF2EC49}" + }, + { + "m_id": "{82D3E2FD-ADFA-47F7-A889-D1172BF2EC49}" + }, + { + "m_id": "{82D3E2FD-ADFA-47F7-A889-D1172BF2EC49}" + }, + { + "m_id": "{82D3E2FD-ADFA-47F7-A889-D1172BF2EC49}" + }, + { + "m_id": "{82D3E2FD-ADFA-47F7-A889-D1172BF2EC49}" + }, + { + "m_id": "{82D3E2FD-ADFA-47F7-A889-D1172BF2EC49}" + }, + { + "m_id": "{82D3E2FD-ADFA-47F7-A889-D1172BF2EC49}" + }, + { + "m_id": "{82D3E2FD-ADFA-47F7-A889-D1172BF2EC49}" + }, + { + "m_id": "{82D3E2FD-ADFA-47F7-A889-D1172BF2EC49}" + }, + { + "m_id": "{82D3E2FD-ADFA-47F7-A889-D1172BF2EC49}" + }, + { + "m_id": "{82D3E2FD-ADFA-47F7-A889-D1172BF2EC49}" + }, + { + "m_id": "{82D3E2FD-ADFA-47F7-A889-D1172BF2EC49}" + }, + { + "m_id": "{82D3E2FD-ADFA-47F7-A889-D1172BF2EC49}" + }, + { + "m_id": "{82D3E2FD-ADFA-47F7-A889-D1172BF2EC49}" + }, + { + "m_id": "{82D3E2FD-ADFA-47F7-A889-D1172BF2EC49}" + }, + { + "m_id": "{82D3E2FD-ADFA-47F7-A889-D1172BF2EC49}" + }, + { + "m_id": "{82D3E2FD-ADFA-47F7-A889-D1172BF2EC49}" + }, + { + "m_id": "{82D3E2FD-ADFA-47F7-A889-D1172BF2EC49}" + }, + { + "m_id": "{82D3E2FD-ADFA-47F7-A889-D1172BF2EC49}" + }, + { + "m_id": "{82D3E2FD-ADFA-47F7-A889-D1172BF2EC49}" + }, + { + "m_id": "{82D3E2FD-ADFA-47F7-A889-D1172BF2EC49}" + }, + { + "m_id": "{82D3E2FD-ADFA-47F7-A889-D1172BF2EC49}" + }, + { + "m_id": "{82D3E2FD-ADFA-47F7-A889-D1172BF2EC49}" + }, + { + "m_id": "{82D3E2FD-ADFA-47F7-A889-D1172BF2EC49}" + }, + { + "m_id": "{82D3E2FD-ADFA-47F7-A889-D1172BF2EC49}" + }, + { + "m_id": "{82D3E2FD-ADFA-47F7-A889-D1172BF2EC49}" + }, + { + "m_id": "{82D3E2FD-ADFA-47F7-A889-D1172BF2EC49}" + }, + { + "m_id": "{82D3E2FD-ADFA-47F7-A889-D1172BF2EC49}" + }, + { + "m_id": "{82D3E2FD-ADFA-47F7-A889-D1172BF2EC49}" + }, + { + "m_id": "{82D3E2FD-ADFA-47F7-A889-D1172BF2EC49}" + }, + { + "m_id": "{82D3E2FD-ADFA-47F7-A889-D1172BF2EC49}" + }, + { + "m_id": "{82D3E2FD-ADFA-47F7-A889-D1172BF2EC49}" + }, + { + "m_id": "{82D3E2FD-ADFA-47F7-A889-D1172BF2EC49}" + }, + { + "m_id": "{82D3E2FD-ADFA-47F7-A889-D1172BF2EC49}" + }, + { + "m_id": "{82D3E2FD-ADFA-47F7-A889-D1172BF2EC49}" + }, + { + "m_id": "{82D3E2FD-ADFA-47F7-A889-D1172BF2EC49}" + }, + { + "m_id": "{82D3E2FD-ADFA-47F7-A889-D1172BF2EC49}" + }, + { + "m_id": "{82D3E2FD-ADFA-47F7-A889-D1172BF2EC49}" + }, + { + "m_id": "{82D3E2FD-ADFA-47F7-A889-D1172BF2EC49}" + }, + { + "m_id": "{82D3E2FD-ADFA-47F7-A889-D1172BF2EC49}" + }, + { + "m_id": "{82D3E2FD-ADFA-47F7-A889-D1172BF2EC49}" + }, + { + "m_id": "{82D3E2FD-ADFA-47F7-A889-D1172BF2EC49}" + }, + { + "m_id": "{82D3E2FD-ADFA-47F7-A889-D1172BF2EC49}" + }, + { + "m_id": "{82D3E2FD-ADFA-47F7-A889-D1172BF2EC49}" + }, + { + "m_id": "{82D3E2FD-ADFA-47F7-A889-D1172BF2EC49}" + }, + { + "m_id": "{82D3E2FD-ADFA-47F7-A889-D1172BF2EC49}" + }, + { + "m_id": "{82D3E2FD-ADFA-47F7-A889-D1172BF2EC49}" + }, + { + "m_id": "{82D3E2FD-ADFA-47F7-A889-D1172BF2EC49}" + }, + { + "m_id": "{82D3E2FD-ADFA-47F7-A889-D1172BF2EC49}" + }, + { + "m_id": "{82D3E2FD-ADFA-47F7-A889-D1172BF2EC49}" + }, + { + "m_id": "{82D3E2FD-ADFA-47F7-A889-D1172BF2EC49}" + }, + { + "m_id": "{82D3E2FD-ADFA-47F7-A889-D1172BF2EC49}" + }, + { + "m_id": "{82D3E2FD-ADFA-47F7-A889-D1172BF2EC49}" + }, + { + "m_id": "{82D3E2FD-ADFA-47F7-A889-D1172BF2EC49}" + }, + { + "m_id": "{82D3E2FD-ADFA-47F7-A889-D1172BF2EC49}" + }, + { + "m_id": "{82D3E2FD-ADFA-47F7-A889-D1172BF2EC49}" + }, + { + "m_id": "{82D3E2FD-ADFA-47F7-A889-D1172BF2EC49}" + }, + { + "m_id": "{82D3E2FD-ADFA-47F7-A889-D1172BF2EC49}" + }, + { + "m_id": "{82D3E2FD-ADFA-47F7-A889-D1172BF2EC49}" + }, + { + "m_id": "{82D3E2FD-ADFA-47F7-A889-D1172BF2EC49}" + }, + { + "m_id": "{82D3E2FD-ADFA-47F7-A889-D1172BF2EC49}" + }, + { + "m_id": "{82D3E2FD-ADFA-47F7-A889-D1172BF2EC49}" + }, + { + "m_id": "{82D3E2FD-ADFA-47F7-A889-D1172BF2EC49}" + }, + { + "m_id": "{82D3E2FD-ADFA-47F7-A889-D1172BF2EC49}" + }, + { + "m_id": "{82D3E2FD-ADFA-47F7-A889-D1172BF2EC49}" + }, + { + "m_id": "{82D3E2FD-ADFA-47F7-A889-D1172BF2EC49}" + }, + { + "m_id": "{82D3E2FD-ADFA-47F7-A889-D1172BF2EC49}" + }, + { + "m_id": "{82D3E2FD-ADFA-47F7-A889-D1172BF2EC49}" + }, + { + "m_id": "{82D3E2FD-ADFA-47F7-A889-D1172BF2EC49}" + }, + { + "m_id": "{82D3E2FD-ADFA-47F7-A889-D1172BF2EC49}" + }, + { + "m_id": "{82D3E2FD-ADFA-47F7-A889-D1172BF2EC49}" + }, + { + "m_id": "{82D3E2FD-ADFA-47F7-A889-D1172BF2EC49}" + }, + { + "m_id": "{82D3E2FD-ADFA-47F7-A889-D1172BF2EC49}" + }, + { + "m_id": "{82D3E2FD-ADFA-47F7-A889-D1172BF2EC49}" + }, + { + "m_id": "{82D3E2FD-ADFA-47F7-A889-D1172BF2EC49}" + }, + { + "m_id": "{82D3E2FD-ADFA-47F7-A889-D1172BF2EC49}" + }, + { + "m_id": "{82D3E2FD-ADFA-47F7-A889-D1172BF2EC49}" + }, + { + "m_id": "{82D3E2FD-ADFA-47F7-A889-D1172BF2EC49}" + }, + { + "m_id": "{82D3E2FD-ADFA-47F7-A889-D1172BF2EC49}" + }, + { + "m_id": "{82D3E2FD-ADFA-47F7-A889-D1172BF2EC49}" + }, + { + "m_id": "{82D3E2FD-ADFA-47F7-A889-D1172BF2EC49}" + }, + { + "m_id": "{82D3E2FD-ADFA-47F7-A889-D1172BF2EC49}" + }, + { + "m_id": "{82D3E2FD-ADFA-47F7-A889-D1172BF2EC49}" + }, + { + "m_id": "{82D3E2FD-ADFA-47F7-A889-D1172BF2EC49}" + }, + { + "m_id": "{82D3E2FD-ADFA-47F7-A889-D1172BF2EC49}" + }, + { + "m_id": "{82D3E2FD-ADFA-47F7-A889-D1172BF2EC49}" + }, + { + "m_id": "{82D3E2FD-ADFA-47F7-A889-D1172BF2EC49}" + }, + { + "m_id": "{82D3E2FD-ADFA-47F7-A889-D1172BF2EC49}" + }, + { + "m_id": "{82D3E2FD-ADFA-47F7-A889-D1172BF2EC49}" + }, + { + "m_id": "{82D3E2FD-ADFA-47F7-A889-D1172BF2EC49}" + }, + { + "m_id": "{82D3E2FD-ADFA-47F7-A889-D1172BF2EC49}" + }, + { + "m_id": "{82D3E2FD-ADFA-47F7-A889-D1172BF2EC49}" + }, + { + "m_id": "{82D3E2FD-ADFA-47F7-A889-D1172BF2EC49}" + }, + { + "m_id": "{82D3E2FD-ADFA-47F7-A889-D1172BF2EC49}" + }, + { + "m_id": "{82D3E2FD-ADFA-47F7-A889-D1172BF2EC49}" + }, + { + "m_id": "{82D3E2FD-ADFA-47F7-A889-D1172BF2EC49}" + }, + { + "m_id": "{82D3E2FD-ADFA-47F7-A889-D1172BF2EC49}" + }, + { + "m_id": "{82D3E2FD-ADFA-47F7-A889-D1172BF2EC49}" + }, + { + "m_id": "{82D3E2FD-ADFA-47F7-A889-D1172BF2EC49}" + }, + { + "m_id": "{82D3E2FD-ADFA-47F7-A889-D1172BF2EC49}" + }, + { + "m_id": "{82D3E2FD-ADFA-47F7-A889-D1172BF2EC49}" + }, + { + "m_id": "{82D3E2FD-ADFA-47F7-A889-D1172BF2EC49}" + }, + { + "m_id": "{82D3E2FD-ADFA-47F7-A889-D1172BF2EC49}" + }, + { + "m_id": "{82D3E2FD-ADFA-47F7-A889-D1172BF2EC49}" + }, + { + "m_id": "{82D3E2FD-ADFA-47F7-A889-D1172BF2EC49}" + }, + { + "m_id": "{82D3E2FD-ADFA-47F7-A889-D1172BF2EC49}" + }, + { + "m_id": "{82D3E2FD-ADFA-47F7-A889-D1172BF2EC49}" + }, + { + "m_id": "{82D3E2FD-ADFA-47F7-A889-D1172BF2EC49}" + }, + { + "m_id": "{82D3E2FD-ADFA-47F7-A889-D1172BF2EC49}" + }, + { + "m_id": "{82D3E2FD-ADFA-47F7-A889-D1172BF2EC49}" + }, + { + "m_id": "{82D3E2FD-ADFA-47F7-A889-D1172BF2EC49}" + }, + { + "m_id": "{82D3E2FD-ADFA-47F7-A889-D1172BF2EC49}" + }, + { + "m_id": "{82D3E2FD-ADFA-47F7-A889-D1172BF2EC49}" + }, + { + "m_id": "{82D3E2FD-ADFA-47F7-A889-D1172BF2EC49}" + }, + { + "m_id": "{82D3E2FD-ADFA-47F7-A889-D1172BF2EC49}" + }, + { + "m_id": "{82D3E2FD-ADFA-47F7-A889-D1172BF2EC49}" + }, + { + "m_id": "{82D3E2FD-ADFA-47F7-A889-D1172BF2EC49}" + }, + { + "m_id": "{82D3E2FD-ADFA-47F7-A889-D1172BF2EC49}" + }, + { + "m_id": "{82D3E2FD-ADFA-47F7-A889-D1172BF2EC49}" + }, + { + "m_id": "{82D3E2FD-ADFA-47F7-A889-D1172BF2EC49}" + }, + { + "m_id": "{82D3E2FD-ADFA-47F7-A889-D1172BF2EC49}" + }, + { + "m_id": "{82D3E2FD-ADFA-47F7-A889-D1172BF2EC49}" + }, + { + "m_id": "{82D3E2FD-ADFA-47F7-A889-D1172BF2EC49}" + }, + { + "m_id": "{82D3E2FD-ADFA-47F7-A889-D1172BF2EC49}" + }, + { + "m_id": "{82D3E2FD-ADFA-47F7-A889-D1172BF2EC49}" + }, + { + "m_id": "{82D3E2FD-ADFA-47F7-A889-D1172BF2EC49}" + }, + { + "m_id": "{82D3E2FD-ADFA-47F7-A889-D1172BF2EC49}" + }, + { + "m_id": "{82D3E2FD-ADFA-47F7-A889-D1172BF2EC49}" + }, + { + "m_id": "{82D3E2FD-ADFA-47F7-A889-D1172BF2EC49}" + }, + { + "m_id": "{82D3E2FD-ADFA-47F7-A889-D1172BF2EC49}" + }, + { + "m_id": "{82D3E2FD-ADFA-47F7-A889-D1172BF2EC49}" + }, + { + "m_id": "{82D3E2FD-ADFA-47F7-A889-D1172BF2EC49}" + }, + { + "m_id": "{82D3E2FD-ADFA-47F7-A889-D1172BF2EC49}" + }, + { + "m_id": "{82D3E2FD-ADFA-47F7-A889-D1172BF2EC49}" + }, + { + "m_id": "{82D3E2FD-ADFA-47F7-A889-D1172BF2EC49}" + }, + { + "m_id": "{82D3E2FD-ADFA-47F7-A889-D1172BF2EC49}" + }, + { + "m_id": "{82D3E2FD-ADFA-47F7-A889-D1172BF2EC49}" + }, + { + "m_id": "{82D3E2FD-ADFA-47F7-A889-D1172BF2EC49}" + }, + { + "m_id": "{82D3E2FD-ADFA-47F7-A889-D1172BF2EC49}" + }, + { + "m_id": "{82D3E2FD-ADFA-47F7-A889-D1172BF2EC49}" + }, + { + "m_id": "{82D3E2FD-ADFA-47F7-A889-D1172BF2EC49}" + }, + { + "m_id": "{82D3E2FD-ADFA-47F7-A889-D1172BF2EC49}" + }, + { + "m_id": "{82D3E2FD-ADFA-47F7-A889-D1172BF2EC49}" + }, + { + "m_id": "{82D3E2FD-ADFA-47F7-A889-D1172BF2EC49}" + }, + { + "m_id": "{82D3E2FD-ADFA-47F7-A889-D1172BF2EC49}" + }, + { + "m_id": "{82D3E2FD-ADFA-47F7-A889-D1172BF2EC49}" + }, + { + "m_id": "{82D3E2FD-ADFA-47F7-A889-D1172BF2EC49}" + }, + { + "m_id": "{82D3E2FD-ADFA-47F7-A889-D1172BF2EC49}" + }, + { + "m_id": "{82D3E2FD-ADFA-47F7-A889-D1172BF2EC49}" + }, + { + "m_id": "{82D3E2FD-ADFA-47F7-A889-D1172BF2EC49}" + }, + { + "m_id": "{82D3E2FD-ADFA-47F7-A889-D1172BF2EC49}" + }, + { + "m_id": "{82D3E2FD-ADFA-47F7-A889-D1172BF2EC49}" + }, + { + "m_id": "{82D3E2FD-ADFA-47F7-A889-D1172BF2EC49}" + }, + { + "m_id": "{82D3E2FD-ADFA-47F7-A889-D1172BF2EC49}" + }, + { + "m_id": "{82D3E2FD-ADFA-47F7-A889-D1172BF2EC49}" + }, + { + "m_id": "{82D3E2FD-ADFA-47F7-A889-D1172BF2EC49}" + }, + { + "m_id": "{82D3E2FD-ADFA-47F7-A889-D1172BF2EC49}" + }, + { + "m_id": "{82D3E2FD-ADFA-47F7-A889-D1172BF2EC49}" + }, + { + "m_id": "{82D3E2FD-ADFA-47F7-A889-D1172BF2EC49}" + }, + { + "m_id": "{82D3E2FD-ADFA-47F7-A889-D1172BF2EC49}" + }, + { + "m_id": "{82D3E2FD-ADFA-47F7-A889-D1172BF2EC49}" + }, + { + "m_id": "{82D3E2FD-ADFA-47F7-A889-D1172BF2EC49}" + }, + { + "m_id": "{82D3E2FD-ADFA-47F7-A889-D1172BF2EC49}" + }, + { + "m_id": "{82D3E2FD-ADFA-47F7-A889-D1172BF2EC49}" + }, + { + "m_id": "{82D3E2FD-ADFA-47F7-A889-D1172BF2EC49}" + }, + { + "m_id": "{82D3E2FD-ADFA-47F7-A889-D1172BF2EC49}" + }, + { + "m_id": "{82D3E2FD-ADFA-47F7-A889-D1172BF2EC49}" + }, + { + "m_id": "{82D3E2FD-ADFA-47F7-A889-D1172BF2EC49}" + }, + { + "m_id": "{82D3E2FD-ADFA-47F7-A889-D1172BF2EC49}" + }, + { + "m_id": "{82D3E2FD-ADFA-47F7-A889-D1172BF2EC49}" + }, + { + "m_id": "{82D3E2FD-ADFA-47F7-A889-D1172BF2EC49}" + }, + { + "m_id": "{82D3E2FD-ADFA-47F7-A889-D1172BF2EC49}" + }, + { + "m_id": "{82D3E2FD-ADFA-47F7-A889-D1172BF2EC49}" + }, + { + "m_id": "{82D3E2FD-ADFA-47F7-A889-D1172BF2EC49}" + }, + { + "m_id": "{82D3E2FD-ADFA-47F7-A889-D1172BF2EC49}" + }, + { + "m_id": "{82D3E2FD-ADFA-47F7-A889-D1172BF2EC49}" + }, + { + "m_id": "{82D3E2FD-ADFA-47F7-A889-D1172BF2EC49}" + }, + { + "m_id": "{82D3E2FD-ADFA-47F7-A889-D1172BF2EC49}" + }, + { + "m_id": "{82D3E2FD-ADFA-47F7-A889-D1172BF2EC49}" + }, + { + "m_id": "{82D3E2FD-ADFA-47F7-A889-D1172BF2EC49}" + }, + { + "m_id": "{82D3E2FD-ADFA-47F7-A889-D1172BF2EC49}" + }, + { + "m_id": "{82D3E2FD-ADFA-47F7-A889-D1172BF2EC49}" + }, + { + "m_id": "{82D3E2FD-ADFA-47F7-A889-D1172BF2EC49}" + }, + { + "m_id": "{82D3E2FD-ADFA-47F7-A889-D1172BF2EC49}" + }, + { + "m_id": "{82D3E2FD-ADFA-47F7-A889-D1172BF2EC49}" + }, + { + "m_id": "{82D3E2FD-ADFA-47F7-A889-D1172BF2EC49}" + }, + { + "m_id": "{82D3E2FD-ADFA-47F7-A889-D1172BF2EC49}" + }, + { + "m_id": "{82D3E2FD-ADFA-47F7-A889-D1172BF2EC49}" + }, + { + "m_id": "{82D3E2FD-ADFA-47F7-A889-D1172BF2EC49}" + }, + { + "m_id": "{82D3E2FD-ADFA-47F7-A889-D1172BF2EC49}" + }, + { + "m_id": "{82D3E2FD-ADFA-47F7-A889-D1172BF2EC49}" + }, + { + "m_id": "{82D3E2FD-ADFA-47F7-A889-D1172BF2EC49}" + }, + { + "m_id": "{82D3E2FD-ADFA-47F7-A889-D1172BF2EC49}" + }, + { + "m_id": "{82D3E2FD-ADFA-47F7-A889-D1172BF2EC49}" + }, + { + "m_id": "{82D3E2FD-ADFA-47F7-A889-D1172BF2EC49}" + }, + { + "m_id": "{82D3E2FD-ADFA-47F7-A889-D1172BF2EC49}" + }, + { + "m_id": "{82D3E2FD-ADFA-47F7-A889-D1172BF2EC49}" + }, + { + "m_id": "{82D3E2FD-ADFA-47F7-A889-D1172BF2EC49}" + }, + { + "m_id": "{82D3E2FD-ADFA-47F7-A889-D1172BF2EC49}" + }, + { + "m_id": "{82D3E2FD-ADFA-47F7-A889-D1172BF2EC49}" + }, + { + "m_id": "{82D3E2FD-ADFA-47F7-A889-D1172BF2EC49}" + }, + { + "m_id": "{82D3E2FD-ADFA-47F7-A889-D1172BF2EC49}" + }, + { + "m_id": "{82D3E2FD-ADFA-47F7-A889-D1172BF2EC49}" + }, + { + "m_id": "{82D3E2FD-ADFA-47F7-A889-D1172BF2EC49}" + }, + { + "m_id": "{82D3E2FD-ADFA-47F7-A889-D1172BF2EC49}" + }, + { + "m_id": "{82D3E2FD-ADFA-47F7-A889-D1172BF2EC49}" + }, + { + "m_id": "{82D3E2FD-ADFA-47F7-A889-D1172BF2EC49}" + } + ], + "m_parameterNames": [ + { + "m_id": "{82D3E2FD-ADFA-47F7-A889-D1172BF2EC49}" + }, + { + "m_id": "{82D3E2FD-ADFA-47F7-A889-D1172BF2EC49}" + }, + { + "m_id": "{82D3E2FD-ADFA-47F7-A889-D1172BF2EC49}" + }, + { + "m_id": "{82D3E2FD-ADFA-47F7-A889-D1172BF2EC49}" + }, + { + "m_id": "{82D3E2FD-ADFA-47F7-A889-D1172BF2EC49}" + }, + { + "m_id": "{82D3E2FD-ADFA-47F7-A889-D1172BF2EC49}" + }, + { + "m_id": "{82D3E2FD-ADFA-47F7-A889-D1172BF2EC49}" + }, + { + "m_id": "{82D3E2FD-ADFA-47F7-A889-D1172BF2EC49}" + }, + { + "m_id": "{82D3E2FD-ADFA-47F7-A889-D1172BF2EC49}" + }, + { + "m_id": "{82D3E2FD-ADFA-47F7-A889-D1172BF2EC49}" + }, + { + "m_id": "{82D3E2FD-ADFA-47F7-A889-D1172BF2EC49}" + }, + { + "m_id": "{82D3E2FD-ADFA-47F7-A889-D1172BF2EC49}" + }, + { + "m_id": "{82D3E2FD-ADFA-47F7-A889-D1172BF2EC49}" + }, + { + "m_id": "{82D3E2FD-ADFA-47F7-A889-D1172BF2EC49}" + }, + { + "m_id": "{82D3E2FD-ADFA-47F7-A889-D1172BF2EC49}" + }, + { + "m_id": "{82D3E2FD-ADFA-47F7-A889-D1172BF2EC49}" + }, + { + "m_id": "{82D3E2FD-ADFA-47F7-A889-D1172BF2EC49}" + }, + { + "m_id": "{82D3E2FD-ADFA-47F7-A889-D1172BF2EC49}" + }, + { + "m_id": "{82D3E2FD-ADFA-47F7-A889-D1172BF2EC49}" + }, + { + "m_id": "{82D3E2FD-ADFA-47F7-A889-D1172BF2EC49}" + }, + { + "m_id": "{82D3E2FD-ADFA-47F7-A889-D1172BF2EC49}" + }, + { + "m_id": "{82D3E2FD-ADFA-47F7-A889-D1172BF2EC49}" + }, + { + "m_id": "{82D3E2FD-ADFA-47F7-A889-D1172BF2EC49}" + }, + { + "m_id": "{82D3E2FD-ADFA-47F7-A889-D1172BF2EC49}" + }, + { + "m_id": "{82D3E2FD-ADFA-47F7-A889-D1172BF2EC49}" + }, + { + "m_id": "{82D3E2FD-ADFA-47F7-A889-D1172BF2EC49}" + }, + { + "m_id": "{82D3E2FD-ADFA-47F7-A889-D1172BF2EC49}" + }, + { + "m_id": "{82D3E2FD-ADFA-47F7-A889-D1172BF2EC49}" + }, + { + "m_id": "{82D3E2FD-ADFA-47F7-A889-D1172BF2EC49}" + }, + { + "m_id": "{82D3E2FD-ADFA-47F7-A889-D1172BF2EC49}" + }, + { + "m_id": "{82D3E2FD-ADFA-47F7-A889-D1172BF2EC49}" + }, + { + "m_id": "{82D3E2FD-ADFA-47F7-A889-D1172BF2EC49}" + }, + { + "m_id": "{82D3E2FD-ADFA-47F7-A889-D1172BF2EC49}" + }, + { + "m_id": "{82D3E2FD-ADFA-47F7-A889-D1172BF2EC49}" + }, + { + "m_id": "{82D3E2FD-ADFA-47F7-A889-D1172BF2EC49}" + }, + { + "m_id": "{82D3E2FD-ADFA-47F7-A889-D1172BF2EC49}" + }, + { + "m_id": "{82D3E2FD-ADFA-47F7-A889-D1172BF2EC49}" + }, + { + "m_id": "{82D3E2FD-ADFA-47F7-A889-D1172BF2EC49}" + }, + { + "m_id": "{82D3E2FD-ADFA-47F7-A889-D1172BF2EC49}" + }, + { + "m_id": "{82D3E2FD-ADFA-47F7-A889-D1172BF2EC49}" + }, + { + "m_id": "{82D3E2FD-ADFA-47F7-A889-D1172BF2EC49}" + }, + { + "m_id": "{82D3E2FD-ADFA-47F7-A889-D1172BF2EC49}" + }, + { + "m_id": "{82D3E2FD-ADFA-47F7-A889-D1172BF2EC49}" + }, + { + "m_id": "{82D3E2FD-ADFA-47F7-A889-D1172BF2EC49}" + }, + { + "m_id": "{82D3E2FD-ADFA-47F7-A889-D1172BF2EC49}" + }, + { + "m_id": "{82D3E2FD-ADFA-47F7-A889-D1172BF2EC49}" + }, + { + "m_id": "{82D3E2FD-ADFA-47F7-A889-D1172BF2EC49}" + }, + { + "m_id": "{82D3E2FD-ADFA-47F7-A889-D1172BF2EC49}" + }, + { + "m_id": "{82D3E2FD-ADFA-47F7-A889-D1172BF2EC49}" + }, + { + "m_id": "{82D3E2FD-ADFA-47F7-A889-D1172BF2EC49}" + }, + { + "m_id": "{82D3E2FD-ADFA-47F7-A889-D1172BF2EC49}" + }, + { + "m_id": "{82D3E2FD-ADFA-47F7-A889-D1172BF2EC49}" + }, + { + "m_id": "{82D3E2FD-ADFA-47F7-A889-D1172BF2EC49}" + }, + { + "m_id": "{82D3E2FD-ADFA-47F7-A889-D1172BF2EC49}" + }, + { + "m_id": "{82D3E2FD-ADFA-47F7-A889-D1172BF2EC49}" + }, + { + "m_id": "{82D3E2FD-ADFA-47F7-A889-D1172BF2EC49}" + }, + { + "m_id": "{82D3E2FD-ADFA-47F7-A889-D1172BF2EC49}" + }, + { + "m_id": "{82D3E2FD-ADFA-47F7-A889-D1172BF2EC49}" + }, + { + "m_id": "{82D3E2FD-ADFA-47F7-A889-D1172BF2EC49}" + }, + { + "m_id": "{82D3E2FD-ADFA-47F7-A889-D1172BF2EC49}" + }, + { + "m_id": "{82D3E2FD-ADFA-47F7-A889-D1172BF2EC49}" + }, + { + "m_id": "{82D3E2FD-ADFA-47F7-A889-D1172BF2EC49}" + }, + { + "m_id": "{82D3E2FD-ADFA-47F7-A889-D1172BF2EC49}" + }, + { + "m_id": "{82D3E2FD-ADFA-47F7-A889-D1172BF2EC49}" + }, + { + "m_id": "{82D3E2FD-ADFA-47F7-A889-D1172BF2EC49}" + }, + { + "m_id": "{82D3E2FD-ADFA-47F7-A889-D1172BF2EC49}" + }, + { + "m_id": "{82D3E2FD-ADFA-47F7-A889-D1172BF2EC49}" + }, + { + "m_id": "{82D3E2FD-ADFA-47F7-A889-D1172BF2EC49}" + }, + { + "m_id": "{82D3E2FD-ADFA-47F7-A889-D1172BF2EC49}" + }, + { + "m_id": "{82D3E2FD-ADFA-47F7-A889-D1172BF2EC49}" + }, + { + "m_id": "{82D3E2FD-ADFA-47F7-A889-D1172BF2EC49}" + }, + { + "m_id": "{82D3E2FD-ADFA-47F7-A889-D1172BF2EC49}" + }, + { + "m_id": "{82D3E2FD-ADFA-47F7-A889-D1172BF2EC49}" + }, + { + "m_id": "{82D3E2FD-ADFA-47F7-A889-D1172BF2EC49}" + }, + { + "m_id": "{82D3E2FD-ADFA-47F7-A889-D1172BF2EC49}" + }, + { + "m_id": "{82D3E2FD-ADFA-47F7-A889-D1172BF2EC49}" + }, + { + "m_id": "{82D3E2FD-ADFA-47F7-A889-D1172BF2EC49}" + }, + { + "m_id": "{82D3E2FD-ADFA-47F7-A889-D1172BF2EC49}" + }, + { + "m_id": "{82D3E2FD-ADFA-47F7-A889-D1172BF2EC49}" + }, + { + "m_id": "{82D3E2FD-ADFA-47F7-A889-D1172BF2EC49}" + }, + { + "m_id": "{82D3E2FD-ADFA-47F7-A889-D1172BF2EC49}" + }, + { + "m_id": "{82D3E2FD-ADFA-47F7-A889-D1172BF2EC49}" + }, + { + "m_id": "{82D3E2FD-ADFA-47F7-A889-D1172BF2EC49}" + }, + { + "m_id": "{82D3E2FD-ADFA-47F7-A889-D1172BF2EC49}" + }, + { + "m_id": "{82D3E2FD-ADFA-47F7-A889-D1172BF2EC49}" + }, + { + "m_id": "{82D3E2FD-ADFA-47F7-A889-D1172BF2EC49}" + }, + { + "m_id": "{82D3E2FD-ADFA-47F7-A889-D1172BF2EC49}" + }, + { + "m_id": "{82D3E2FD-ADFA-47F7-A889-D1172BF2EC49}" + }, + { + "m_id": "{82D3E2FD-ADFA-47F7-A889-D1172BF2EC49}" + }, + { + "m_id": "{82D3E2FD-ADFA-47F7-A889-D1172BF2EC49}" + }, + { + "m_id": "{82D3E2FD-ADFA-47F7-A889-D1172BF2EC49}" + }, + { + "m_id": "{82D3E2FD-ADFA-47F7-A889-D1172BF2EC49}" + }, + { + "m_id": "{82D3E2FD-ADFA-47F7-A889-D1172BF2EC49}" + }, + { + "m_id": "{82D3E2FD-ADFA-47F7-A889-D1172BF2EC49}" + }, + { + "m_id": "{82D3E2FD-ADFA-47F7-A889-D1172BF2EC49}" + }, + { + "m_id": "{82D3E2FD-ADFA-47F7-A889-D1172BF2EC49}" + }, + { + "m_id": "{82D3E2FD-ADFA-47F7-A889-D1172BF2EC49}" + }, + { + "m_id": "{82D3E2FD-ADFA-47F7-A889-D1172BF2EC49}" + }, + { + "m_id": "{82D3E2FD-ADFA-47F7-A889-D1172BF2EC49}" + }, + { + "m_id": "{82D3E2FD-ADFA-47F7-A889-D1172BF2EC49}" + }, + { + "m_id": "{82D3E2FD-ADFA-47F7-A889-D1172BF2EC49}" + }, + { + "m_id": "{82D3E2FD-ADFA-47F7-A889-D1172BF2EC49}" + }, + { + "m_id": "{82D3E2FD-ADFA-47F7-A889-D1172BF2EC49}" + }, + { + "m_id": "{82D3E2FD-ADFA-47F7-A889-D1172BF2EC49}" + }, + { + "m_id": "{82D3E2FD-ADFA-47F7-A889-D1172BF2EC49}" + }, + { + "m_id": "{82D3E2FD-ADFA-47F7-A889-D1172BF2EC49}" + }, + { + "m_id": "{82D3E2FD-ADFA-47F7-A889-D1172BF2EC49}" + }, + { + "m_id": "{82D3E2FD-ADFA-47F7-A889-D1172BF2EC49}" + }, + { + "m_id": "{82D3E2FD-ADFA-47F7-A889-D1172BF2EC49}" + }, + { + "m_id": "{82D3E2FD-ADFA-47F7-A889-D1172BF2EC49}" + }, + { + "m_id": "{82D3E2FD-ADFA-47F7-A889-D1172BF2EC49}" + }, + { + "m_id": "{82D3E2FD-ADFA-47F7-A889-D1172BF2EC49}" + }, + { + "m_id": "{82D3E2FD-ADFA-47F7-A889-D1172BF2EC49}" + }, + { + "m_id": "{82D3E2FD-ADFA-47F7-A889-D1172BF2EC49}" + }, + { + "m_id": "{82D3E2FD-ADFA-47F7-A889-D1172BF2EC49}" + }, + { + "m_id": "{82D3E2FD-ADFA-47F7-A889-D1172BF2EC49}" + }, + { + "m_id": "{82D3E2FD-ADFA-47F7-A889-D1172BF2EC49}" + }, + { + "m_id": "{82D3E2FD-ADFA-47F7-A889-D1172BF2EC49}" + }, + { + "m_id": "{82D3E2FD-ADFA-47F7-A889-D1172BF2EC49}" + }, + { + "m_id": "{82D3E2FD-ADFA-47F7-A889-D1172BF2EC49}" + }, + { + "m_id": "{82D3E2FD-ADFA-47F7-A889-D1172BF2EC49}" + }, + { + "m_id": "{82D3E2FD-ADFA-47F7-A889-D1172BF2EC49}" + }, + { + "m_id": "{82D3E2FD-ADFA-47F7-A889-D1172BF2EC49}" + }, + { + "m_id": "{82D3E2FD-ADFA-47F7-A889-D1172BF2EC49}" + }, + { + "m_id": "{82D3E2FD-ADFA-47F7-A889-D1172BF2EC49}" + }, + { + "m_id": "{82D3E2FD-ADFA-47F7-A889-D1172BF2EC49}" + }, + { + "m_id": "{82D3E2FD-ADFA-47F7-A889-D1172BF2EC49}" + }, + { + "m_id": "{82D3E2FD-ADFA-47F7-A889-D1172BF2EC49}" + }, + { + "m_id": "{82D3E2FD-ADFA-47F7-A889-D1172BF2EC49}" + }, + { + "m_id": "{82D3E2FD-ADFA-47F7-A889-D1172BF2EC49}" + }, + { + "m_id": "{82D3E2FD-ADFA-47F7-A889-D1172BF2EC49}" + }, + { + "m_id": "{82D3E2FD-ADFA-47F7-A889-D1172BF2EC49}" + }, + { + "m_id": "{82D3E2FD-ADFA-47F7-A889-D1172BF2EC49}" + }, + { + "m_id": "{82D3E2FD-ADFA-47F7-A889-D1172BF2EC49}" + }, + { + "m_id": "{82D3E2FD-ADFA-47F7-A889-D1172BF2EC49}" + }, + { + "m_id": "{82D3E2FD-ADFA-47F7-A889-D1172BF2EC49}" + }, + { + "m_id": "{82D3E2FD-ADFA-47F7-A889-D1172BF2EC49}" + }, + { + "m_id": "{82D3E2FD-ADFA-47F7-A889-D1172BF2EC49}" + }, + { + "m_id": "{82D3E2FD-ADFA-47F7-A889-D1172BF2EC49}" + }, + { + "m_id": "{82D3E2FD-ADFA-47F7-A889-D1172BF2EC49}" + }, + { + "m_id": "{82D3E2FD-ADFA-47F7-A889-D1172BF2EC49}" + }, + { + "m_id": "{82D3E2FD-ADFA-47F7-A889-D1172BF2EC49}" + }, + { + "m_id": "{82D3E2FD-ADFA-47F7-A889-D1172BF2EC49}" + }, + { + "m_id": "{82D3E2FD-ADFA-47F7-A889-D1172BF2EC49}" + }, + { + "m_id": "{82D3E2FD-ADFA-47F7-A889-D1172BF2EC49}" + }, + { + "m_id": "{82D3E2FD-ADFA-47F7-A889-D1172BF2EC49}" + }, + { + "m_id": "{82D3E2FD-ADFA-47F7-A889-D1172BF2EC49}" + }, + { + "m_id": "{82D3E2FD-ADFA-47F7-A889-D1172BF2EC49}" + }, + { + "m_id": "{82D3E2FD-ADFA-47F7-A889-D1172BF2EC49}" + }, + { + "m_id": "{82D3E2FD-ADFA-47F7-A889-D1172BF2EC49}" + }, + { + "m_id": "{82D3E2FD-ADFA-47F7-A889-D1172BF2EC49}" + }, + { + "m_id": "{82D3E2FD-ADFA-47F7-A889-D1172BF2EC49}" + }, + { + "m_id": "{82D3E2FD-ADFA-47F7-A889-D1172BF2EC49}" + }, + { + "m_id": "{82D3E2FD-ADFA-47F7-A889-D1172BF2EC49}" + }, + { + "m_id": "{82D3E2FD-ADFA-47F7-A889-D1172BF2EC49}" + }, + { + "m_id": "{82D3E2FD-ADFA-47F7-A889-D1172BF2EC49}" + }, + { + "m_id": "{82D3E2FD-ADFA-47F7-A889-D1172BF2EC49}" + }, + { + "m_id": "{82D3E2FD-ADFA-47F7-A889-D1172BF2EC49}" + }, + { + "m_id": "{82D3E2FD-ADFA-47F7-A889-D1172BF2EC49}" + }, + { + "m_id": "{82D3E2FD-ADFA-47F7-A889-D1172BF2EC49}" + }, + { + "m_id": "{82D3E2FD-ADFA-47F7-A889-D1172BF2EC49}" + }, + { + "m_id": "{82D3E2FD-ADFA-47F7-A889-D1172BF2EC49}" + }, + { + "m_id": "{82D3E2FD-ADFA-47F7-A889-D1172BF2EC49}" + }, + { + "m_id": "{82D3E2FD-ADFA-47F7-A889-D1172BF2EC49}" + }, + { + "m_id": "{82D3E2FD-ADFA-47F7-A889-D1172BF2EC49}" + }, + { + "m_id": "{82D3E2FD-ADFA-47F7-A889-D1172BF2EC49}" + }, + { + "m_id": "{82D3E2FD-ADFA-47F7-A889-D1172BF2EC49}" + }, + { + "m_id": "{82D3E2FD-ADFA-47F7-A889-D1172BF2EC49}" + }, + { + "m_id": "{82D3E2FD-ADFA-47F7-A889-D1172BF2EC49}" + }, + { + "m_id": "{82D3E2FD-ADFA-47F7-A889-D1172BF2EC49}" + }, + { + "m_id": "{82D3E2FD-ADFA-47F7-A889-D1172BF2EC49}" + }, + { + "m_id": "{82D3E2FD-ADFA-47F7-A889-D1172BF2EC49}" + }, + { + "m_id": "{82D3E2FD-ADFA-47F7-A889-D1172BF2EC49}" + }, + { + "m_id": "{82D3E2FD-ADFA-47F7-A889-D1172BF2EC49}" + }, + { + "m_id": "{82D3E2FD-ADFA-47F7-A889-D1172BF2EC49}" + }, + { + "m_id": "{82D3E2FD-ADFA-47F7-A889-D1172BF2EC49}" + }, + { + "m_id": "{82D3E2FD-ADFA-47F7-A889-D1172BF2EC49}" + }, + { + "m_id": "{82D3E2FD-ADFA-47F7-A889-D1172BF2EC49}" + }, + { + "m_id": "{82D3E2FD-ADFA-47F7-A889-D1172BF2EC49}" + }, + { + "m_id": "{82D3E2FD-ADFA-47F7-A889-D1172BF2EC49}" + }, + { + "m_id": "{82D3E2FD-ADFA-47F7-A889-D1172BF2EC49}" + }, + { + "m_id": "{82D3E2FD-ADFA-47F7-A889-D1172BF2EC49}" + }, + { + "m_id": "{82D3E2FD-ADFA-47F7-A889-D1172BF2EC49}" + }, + { + "m_id": "{82D3E2FD-ADFA-47F7-A889-D1172BF2EC49}" + }, + { + "m_id": "{82D3E2FD-ADFA-47F7-A889-D1172BF2EC49}" + }, + { + "m_id": "{82D3E2FD-ADFA-47F7-A889-D1172BF2EC49}" + }, + { + "m_id": "{82D3E2FD-ADFA-47F7-A889-D1172BF2EC49}" + }, + { + "m_id": "{82D3E2FD-ADFA-47F7-A889-D1172BF2EC49}" + }, + { + "m_id": "{82D3E2FD-ADFA-47F7-A889-D1172BF2EC49}" + }, + { + "m_id": "{82D3E2FD-ADFA-47F7-A889-D1172BF2EC49}" + }, + { + "m_id": "{82D3E2FD-ADFA-47F7-A889-D1172BF2EC49}" + }, + { + "m_id": "{82D3E2FD-ADFA-47F7-A889-D1172BF2EC49}" + }, + { + "m_id": "{82D3E2FD-ADFA-47F7-A889-D1172BF2EC49}" + }, + { + "m_id": "{82D3E2FD-ADFA-47F7-A889-D1172BF2EC49}" + }, + { + "m_id": "{82D3E2FD-ADFA-47F7-A889-D1172BF2EC49}" + }, + { + "m_id": "{82D3E2FD-ADFA-47F7-A889-D1172BF2EC49}" + }, + { + "m_id": "{82D3E2FD-ADFA-47F7-A889-D1172BF2EC49}" + }, + { + "m_id": "{82D3E2FD-ADFA-47F7-A889-D1172BF2EC49}" + }, + { + "m_id": "{82D3E2FD-ADFA-47F7-A889-D1172BF2EC49}" + }, + { + "m_id": "{82D3E2FD-ADFA-47F7-A889-D1172BF2EC49}" + }, + { + "m_id": "{82D3E2FD-ADFA-47F7-A889-D1172BF2EC49}" + }, + { + "m_id": "{82D3E2FD-ADFA-47F7-A889-D1172BF2EC49}" + }, + { + "m_id": "{82D3E2FD-ADFA-47F7-A889-D1172BF2EC49}" + }, + { + "m_id": "{82D3E2FD-ADFA-47F7-A889-D1172BF2EC49}" + }, + { + "m_id": "{82D3E2FD-ADFA-47F7-A889-D1172BF2EC49}" + }, + { + "m_id": "{82D3E2FD-ADFA-47F7-A889-D1172BF2EC49}" + }, + { + "m_id": "{82D3E2FD-ADFA-47F7-A889-D1172BF2EC49}" + }, + { + "m_id": "{82D3E2FD-ADFA-47F7-A889-D1172BF2EC49}" + }, + { + "m_id": "{82D3E2FD-ADFA-47F7-A889-D1172BF2EC49}" + }, + { + "m_id": "{82D3E2FD-ADFA-47F7-A889-D1172BF2EC49}" + }, + { + "m_id": "{82D3E2FD-ADFA-47F7-A889-D1172BF2EC49}" + }, + { + "m_id": "{82D3E2FD-ADFA-47F7-A889-D1172BF2EC49}" + }, + { + "m_id": "{82D3E2FD-ADFA-47F7-A889-D1172BF2EC49}" + }, + { + "m_id": "{82D3E2FD-ADFA-47F7-A889-D1172BF2EC49}" + }, + { + "m_id": "{82D3E2FD-ADFA-47F7-A889-D1172BF2EC49}" + }, + { + "m_id": "{82D3E2FD-ADFA-47F7-A889-D1172BF2EC49}" + }, + { + "m_id": "{82D3E2FD-ADFA-47F7-A889-D1172BF2EC49}" + }, + { + "m_id": "{82D3E2FD-ADFA-47F7-A889-D1172BF2EC49}" + }, + { + "m_id": "{82D3E2FD-ADFA-47F7-A889-D1172BF2EC49}" + }, + { + "m_id": "{82D3E2FD-ADFA-47F7-A889-D1172BF2EC49}" + }, + { + "m_id": "{82D3E2FD-ADFA-47F7-A889-D1172BF2EC49}" + }, + { + "m_id": "{82D3E2FD-ADFA-47F7-A889-D1172BF2EC49}" + }, + { + "m_id": "{82D3E2FD-ADFA-47F7-A889-D1172BF2EC49}" + }, + { + "m_id": "{82D3E2FD-ADFA-47F7-A889-D1172BF2EC49}" + }, + { + "m_id": "{82D3E2FD-ADFA-47F7-A889-D1172BF2EC49}" + }, + { + "m_id": "{82D3E2FD-ADFA-47F7-A889-D1172BF2EC49}" + }, + { + "m_id": "{82D3E2FD-ADFA-47F7-A889-D1172BF2EC49}" + }, + { + "m_id": "{82D3E2FD-ADFA-47F7-A889-D1172BF2EC49}" + }, + { + "m_id": "{82D3E2FD-ADFA-47F7-A889-D1172BF2EC49}" + }, + { + "m_id": "{82D3E2FD-ADFA-47F7-A889-D1172BF2EC49}" + }, + { + "m_id": "{82D3E2FD-ADFA-47F7-A889-D1172BF2EC49}" + }, + { + "m_id": "{82D3E2FD-ADFA-47F7-A889-D1172BF2EC49}" + }, + { + "m_id": "{82D3E2FD-ADFA-47F7-A889-D1172BF2EC49}" + }, + { + "m_id": "{82D3E2FD-ADFA-47F7-A889-D1172BF2EC49}" + }, + { + "m_id": "{82D3E2FD-ADFA-47F7-A889-D1172BF2EC49}" + }, + { + "m_id": "{82D3E2FD-ADFA-47F7-A889-D1172BF2EC49}" + }, + { + "m_id": "{82D3E2FD-ADFA-47F7-A889-D1172BF2EC49}" + }, + { + "m_id": "{82D3E2FD-ADFA-47F7-A889-D1172BF2EC49}" + }, + { + "m_id": "{82D3E2FD-ADFA-47F7-A889-D1172BF2EC49}" + }, + { + "m_id": "{82D3E2FD-ADFA-47F7-A889-D1172BF2EC49}" + }, + { + "m_id": "{82D3E2FD-ADFA-47F7-A889-D1172BF2EC49}" + }, + { + "m_id": "{82D3E2FD-ADFA-47F7-A889-D1172BF2EC49}" + }, + { + "m_id": "{82D3E2FD-ADFA-47F7-A889-D1172BF2EC49}" + }, + { + "m_id": "{82D3E2FD-ADFA-47F7-A889-D1172BF2EC49}" + }, + { + "m_id": "{82D3E2FD-ADFA-47F7-A889-D1172BF2EC49}" + }, + { + "m_id": "{82D3E2FD-ADFA-47F7-A889-D1172BF2EC49}" + }, + { + "m_id": "{82D3E2FD-ADFA-47F7-A889-D1172BF2EC49}" + }, + { + "m_id": "{82D3E2FD-ADFA-47F7-A889-D1172BF2EC49}" + }, + { + "m_id": "{82D3E2FD-ADFA-47F7-A889-D1172BF2EC49}" + }, + { + "m_id": "{82D3E2FD-ADFA-47F7-A889-D1172BF2EC49}" + }, + { + "m_id": "{82D3E2FD-ADFA-47F7-A889-D1172BF2EC49}" + }, + { + "m_id": "{82D3E2FD-ADFA-47F7-A889-D1172BF2EC49}" + }, + { + "m_id": "{82D3E2FD-ADFA-47F7-A889-D1172BF2EC49}" + }, + { + "m_id": "{82D3E2FD-ADFA-47F7-A889-D1172BF2EC49}" + }, + { + "m_id": "{82D3E2FD-ADFA-47F7-A889-D1172BF2EC49}" + }, + { + "m_id": "{82D3E2FD-ADFA-47F7-A889-D1172BF2EC49}" + }, + { + "m_id": "{82D3E2FD-ADFA-47F7-A889-D1172BF2EC49}" + }, + { + "m_id": "{82D3E2FD-ADFA-47F7-A889-D1172BF2EC49}" + }, + { + "m_id": "{82D3E2FD-ADFA-47F7-A889-D1172BF2EC49}" + }, + { + "m_id": "{82D3E2FD-ADFA-47F7-A889-D1172BF2EC49}" + }, + { + "m_id": "{82D3E2FD-ADFA-47F7-A889-D1172BF2EC49}" + }, + { + "m_id": "{82D3E2FD-ADFA-47F7-A889-D1172BF2EC49}" + }, + { + "m_id": "{82D3E2FD-ADFA-47F7-A889-D1172BF2EC49}" + }, + { + "m_id": "{82D3E2FD-ADFA-47F7-A889-D1172BF2EC49}" + }, + { + "m_id": "{82D3E2FD-ADFA-47F7-A889-D1172BF2EC49}" + }, + { + "m_id": "{82D3E2FD-ADFA-47F7-A889-D1172BF2EC49}" + }, + { + "m_id": "{82D3E2FD-ADFA-47F7-A889-D1172BF2EC49}" + }, + { + "m_id": "{82D3E2FD-ADFA-47F7-A889-D1172BF2EC49}" + }, + { + "m_id": "{82D3E2FD-ADFA-47F7-A889-D1172BF2EC49}" + }, + { + "m_id": "{82D3E2FD-ADFA-47F7-A889-D1172BF2EC49}" + }, + { + "m_id": "{82D3E2FD-ADFA-47F7-A889-D1172BF2EC49}" + }, + { + "m_id": "{82D3E2FD-ADFA-47F7-A889-D1172BF2EC49}" + }, + { + "m_id": "{82D3E2FD-ADFA-47F7-A889-D1172BF2EC49}" + }, + { + "m_id": "{82D3E2FD-ADFA-47F7-A889-D1172BF2EC49}" + }, + { + "m_id": "{82D3E2FD-ADFA-47F7-A889-D1172BF2EC49}" + }, + { + "m_id": "{82D3E2FD-ADFA-47F7-A889-D1172BF2EC49}" + }, + { + "m_id": "{82D3E2FD-ADFA-47F7-A889-D1172BF2EC49}" + }, + { + "m_id": "{82D3E2FD-ADFA-47F7-A889-D1172BF2EC49}" + }, + { + "m_id": "{82D3E2FD-ADFA-47F7-A889-D1172BF2EC49}" + }, + { + "m_id": "{82D3E2FD-ADFA-47F7-A889-D1172BF2EC49}" + }, + { + "m_id": "{82D3E2FD-ADFA-47F7-A889-D1172BF2EC49}" + }, + { + "m_id": "{82D3E2FD-ADFA-47F7-A889-D1172BF2EC49}" + }, + { + "m_id": "{82D3E2FD-ADFA-47F7-A889-D1172BF2EC49}" + }, + { + "m_id": "{82D3E2FD-ADFA-47F7-A889-D1172BF2EC49}" + }, + { + "m_id": "{82D3E2FD-ADFA-47F7-A889-D1172BF2EC49}" + }, + { + "m_id": "{82D3E2FD-ADFA-47F7-A889-D1172BF2EC49}" + }, + { + "m_id": "{82D3E2FD-ADFA-47F7-A889-D1172BF2EC49}" + }, + { + "m_id": "{82D3E2FD-ADFA-47F7-A889-D1172BF2EC49}" + }, + { + "m_id": "{82D3E2FD-ADFA-47F7-A889-D1172BF2EC49}" + }, + { + "m_id": "{82D3E2FD-ADFA-47F7-A889-D1172BF2EC49}" + }, + { + "m_id": "{82D3E2FD-ADFA-47F7-A889-D1172BF2EC49}" + }, + { + "m_id": "{82D3E2FD-ADFA-47F7-A889-D1172BF2EC49}" + }, + { + "m_id": "{82D3E2FD-ADFA-47F7-A889-D1172BF2EC49}" + }, + { + "m_id": "{82D3E2FD-ADFA-47F7-A889-D1172BF2EC49}" + }, + { + "m_id": "{82D3E2FD-ADFA-47F7-A889-D1172BF2EC49}" + }, + { + "m_id": "{82D3E2FD-ADFA-47F7-A889-D1172BF2EC49}" + }, + { + "m_id": "{82D3E2FD-ADFA-47F7-A889-D1172BF2EC49}" + }, + { + "m_id": "{82D3E2FD-ADFA-47F7-A889-D1172BF2EC49}" + }, + { + "m_id": "{82D3E2FD-ADFA-47F7-A889-D1172BF2EC49}" + }, + { + "m_id": "{82D3E2FD-ADFA-47F7-A889-D1172BF2EC49}" + }, + { + "m_id": "{82D3E2FD-ADFA-47F7-A889-D1172BF2EC49}" + }, + { + "m_id": "{82D3E2FD-ADFA-47F7-A889-D1172BF2EC49}" + }, + { + "m_id": "{82D3E2FD-ADFA-47F7-A889-D1172BF2EC49}" + }, + { + "m_id": "{82D3E2FD-ADFA-47F7-A889-D1172BF2EC49}" + }, + { + "m_id": "{82D3E2FD-ADFA-47F7-A889-D1172BF2EC49}" + }, + { + "m_id": "{82D3E2FD-ADFA-47F7-A889-D1172BF2EC49}" + }, + { + "m_id": "{82D3E2FD-ADFA-47F7-A889-D1172BF2EC49}" + }, + { + "m_id": "{82D3E2FD-ADFA-47F7-A889-D1172BF2EC49}" + }, + { + "m_id": "{82D3E2FD-ADFA-47F7-A889-D1172BF2EC49}" + }, + { + "m_id": "{82D3E2FD-ADFA-47F7-A889-D1172BF2EC49}" + }, + { + "m_id": "{82D3E2FD-ADFA-47F7-A889-D1172BF2EC49}" + }, + { + "m_id": "{82D3E2FD-ADFA-47F7-A889-D1172BF2EC49}" + }, + { + "m_id": "{82D3E2FD-ADFA-47F7-A889-D1172BF2EC49}" + }, + { + "m_id": "{82D3E2FD-ADFA-47F7-A889-D1172BF2EC49}" + }, + { + "m_id": "{82D3E2FD-ADFA-47F7-A889-D1172BF2EC49}" + }, + { + "m_id": "{82D3E2FD-ADFA-47F7-A889-D1172BF2EC49}" + }, + { + "m_id": "{82D3E2FD-ADFA-47F7-A889-D1172BF2EC49}" + }, + { + "m_id": "{82D3E2FD-ADFA-47F7-A889-D1172BF2EC49}" + }, + { + "m_id": "{82D3E2FD-ADFA-47F7-A889-D1172BF2EC49}" + }, + { + "m_id": "{82D3E2FD-ADFA-47F7-A889-D1172BF2EC49}" + }, + { + "m_id": "{82D3E2FD-ADFA-47F7-A889-D1172BF2EC49}" + }, + { + "m_id": "{82D3E2FD-ADFA-47F7-A889-D1172BF2EC49}" + }, + { + "m_id": "{82D3E2FD-ADFA-47F7-A889-D1172BF2EC49}" + }, + { + "m_id": "{82D3E2FD-ADFA-47F7-A889-D1172BF2EC49}" + }, + { + "m_id": "{82D3E2FD-ADFA-47F7-A889-D1172BF2EC49}" + }, + { + "m_id": "{82D3E2FD-ADFA-47F7-A889-D1172BF2EC49}" + }, + { + "m_id": "{82D3E2FD-ADFA-47F7-A889-D1172BF2EC49}" + }, + { + "m_id": "{82D3E2FD-ADFA-47F7-A889-D1172BF2EC49}" + }, + { + "m_id": "{82D3E2FD-ADFA-47F7-A889-D1172BF2EC49}" + }, + { + "m_id": "{82D3E2FD-ADFA-47F7-A889-D1172BF2EC49}" + }, + { + "m_id": "{82D3E2FD-ADFA-47F7-A889-D1172BF2EC49}" + }, + { + "m_id": "{82D3E2FD-ADFA-47F7-A889-D1172BF2EC49}" + }, + { + "m_id": "{82D3E2FD-ADFA-47F7-A889-D1172BF2EC49}" + }, + { + "m_id": "{82D3E2FD-ADFA-47F7-A889-D1172BF2EC49}" + }, + { + "m_id": "{82D3E2FD-ADFA-47F7-A889-D1172BF2EC49}" + }, + { + "m_id": "{82D3E2FD-ADFA-47F7-A889-D1172BF2EC49}" + }, + { + "m_id": "{82D3E2FD-ADFA-47F7-A889-D1172BF2EC49}" + }, + { + "m_id": "{82D3E2FD-ADFA-47F7-A889-D1172BF2EC49}" + }, + { + "m_id": "{82D3E2FD-ADFA-47F7-A889-D1172BF2EC49}" + }, + { + "m_id": "{82D3E2FD-ADFA-47F7-A889-D1172BF2EC49}" + }, + { + "m_id": "{82D3E2FD-ADFA-47F7-A889-D1172BF2EC49}" + }, + { + "m_id": "{82D3E2FD-ADFA-47F7-A889-D1172BF2EC49}" + }, + { + "m_id": "{82D3E2FD-ADFA-47F7-A889-D1172BF2EC49}" + }, + { + "m_id": "{82D3E2FD-ADFA-47F7-A889-D1172BF2EC49}" + }, + { + "m_id": "{82D3E2FD-ADFA-47F7-A889-D1172BF2EC49}" + }, + { + "m_id": "{82D3E2FD-ADFA-47F7-A889-D1172BF2EC49}" + }, + { + "m_id": "{82D3E2FD-ADFA-47F7-A889-D1172BF2EC49}" + }, + { + "m_id": "{82D3E2FD-ADFA-47F7-A889-D1172BF2EC49}" + }, + { + "m_id": "{82D3E2FD-ADFA-47F7-A889-D1172BF2EC49}" + }, + { + "m_id": "{82D3E2FD-ADFA-47F7-A889-D1172BF2EC49}" + }, + { + "m_id": "{82D3E2FD-ADFA-47F7-A889-D1172BF2EC49}" + }, + { + "m_id": "{82D3E2FD-ADFA-47F7-A889-D1172BF2EC49}" + }, + { + "m_id": "{82D3E2FD-ADFA-47F7-A889-D1172BF2EC49}" + }, + { + "m_id": "{82D3E2FD-ADFA-47F7-A889-D1172BF2EC49}" + }, + { + "m_id": "{82D3E2FD-ADFA-47F7-A889-D1172BF2EC49}" + }, + { + "m_id": "{82D3E2FD-ADFA-47F7-A889-D1172BF2EC49}" + }, + { + "m_id": "{82D3E2FD-ADFA-47F7-A889-D1172BF2EC49}" + }, + { + "m_id": "{82D3E2FD-ADFA-47F7-A889-D1172BF2EC49}" + }, + { + "m_id": "{82D3E2FD-ADFA-47F7-A889-D1172BF2EC49}" + }, + { + "m_id": "{82D3E2FD-ADFA-47F7-A889-D1172BF2EC49}" + }, + { + "m_id": "{82D3E2FD-ADFA-47F7-A889-D1172BF2EC49}" + }, + { + "m_id": "{82D3E2FD-ADFA-47F7-A889-D1172BF2EC49}" + }, + { + "m_id": "{82D3E2FD-ADFA-47F7-A889-D1172BF2EC49}" + }, + { + "m_id": "{82D3E2FD-ADFA-47F7-A889-D1172BF2EC49}" + }, + { + "m_id": "{82D3E2FD-ADFA-47F7-A889-D1172BF2EC49}" + }, + { + "m_id": "{82D3E2FD-ADFA-47F7-A889-D1172BF2EC49}" + }, + { + "m_id": "{82D3E2FD-ADFA-47F7-A889-D1172BF2EC49}" + }, + { + "m_id": "{82D3E2FD-ADFA-47F7-A889-D1172BF2EC49}" + }, + { + "m_id": "{82D3E2FD-ADFA-47F7-A889-D1172BF2EC49}" + }, + { + "m_id": "{82D3E2FD-ADFA-47F7-A889-D1172BF2EC49}" + }, + { + "m_id": "{82D3E2FD-ADFA-47F7-A889-D1172BF2EC49}" + }, + { + "m_id": "{82D3E2FD-ADFA-47F7-A889-D1172BF2EC49}" + }, + { + "m_id": "{82D3E2FD-ADFA-47F7-A889-D1172BF2EC49}" + }, + { + "m_id": "{82D3E2FD-ADFA-47F7-A889-D1172BF2EC49}" + }, + { + "m_id": "{82D3E2FD-ADFA-47F7-A889-D1172BF2EC49}" + }, + { + "m_id": "{82D3E2FD-ADFA-47F7-A889-D1172BF2EC49}" + }, + { + "m_id": "{82D3E2FD-ADFA-47F7-A889-D1172BF2EC49}" + }, + { + "m_id": "{82D3E2FD-ADFA-47F7-A889-D1172BF2EC49}" + }, + { + "m_id": "{82D3E2FD-ADFA-47F7-A889-D1172BF2EC49}" + }, + { + "m_id": "{82D3E2FD-ADFA-47F7-A889-D1172BF2EC49}" + }, + { + "m_id": "{82D3E2FD-ADFA-47F7-A889-D1172BF2EC49}" + }, + { + "m_id": "{82D3E2FD-ADFA-47F7-A889-D1172BF2EC49}" + }, + { + "m_id": "{82D3E2FD-ADFA-47F7-A889-D1172BF2EC49}" + }, + { + "m_id": "{82D3E2FD-ADFA-47F7-A889-D1172BF2EC49}" + }, + { + "m_id": "{82D3E2FD-ADFA-47F7-A889-D1172BF2EC49}" + }, + { + "m_id": "{82D3E2FD-ADFA-47F7-A889-D1172BF2EC49}" + }, + { + "m_id": "{82D3E2FD-ADFA-47F7-A889-D1172BF2EC49}" + }, + { + "m_id": "{82D3E2FD-ADFA-47F7-A889-D1172BF2EC49}" + }, + { + "m_id": "{82D3E2FD-ADFA-47F7-A889-D1172BF2EC49}" + }, + { + "m_id": "{82D3E2FD-ADFA-47F7-A889-D1172BF2EC49}" + }, + { + "m_id": "{82D3E2FD-ADFA-47F7-A889-D1172BF2EC49}" + }, + { + "m_id": "{82D3E2FD-ADFA-47F7-A889-D1172BF2EC49}" + }, + { + "m_id": "{82D3E2FD-ADFA-47F7-A889-D1172BF2EC49}" + }, + { + "m_id": "{82D3E2FD-ADFA-47F7-A889-D1172BF2EC49}" + }, + { + "m_id": "{82D3E2FD-ADFA-47F7-A889-D1172BF2EC49}" + }, + { + "m_id": "{82D3E2FD-ADFA-47F7-A889-D1172BF2EC49}" + }, + { + "m_id": "{82D3E2FD-ADFA-47F7-A889-D1172BF2EC49}" + }, + { + "m_id": "{82D3E2FD-ADFA-47F7-A889-D1172BF2EC49}" + }, + { + "m_id": "{82D3E2FD-ADFA-47F7-A889-D1172BF2EC49}" + }, + { + "m_id": "{82D3E2FD-ADFA-47F7-A889-D1172BF2EC49}" + }, + { + "m_id": "{82D3E2FD-ADFA-47F7-A889-D1172BF2EC49}" + }, + { + "m_id": "{82D3E2FD-ADFA-47F7-A889-D1172BF2EC49}" + }, + { + "m_id": "{82D3E2FD-ADFA-47F7-A889-D1172BF2EC49}" + }, + { + "m_id": "{82D3E2FD-ADFA-47F7-A889-D1172BF2EC49}" + }, + { + "m_id": "{82D3E2FD-ADFA-47F7-A889-D1172BF2EC49}" + }, + { + "m_id": "{82D3E2FD-ADFA-47F7-A889-D1172BF2EC49}" + }, + { + "m_id": "{82D3E2FD-ADFA-47F7-A889-D1172BF2EC49}" + }, + { + "m_id": "{82D3E2FD-ADFA-47F7-A889-D1172BF2EC49}" + }, + { + "m_id": "{82D3E2FD-ADFA-47F7-A889-D1172BF2EC49}" + }, + { + "m_id": "{82D3E2FD-ADFA-47F7-A889-D1172BF2EC49}" + }, + { + "m_id": "{82D3E2FD-ADFA-47F7-A889-D1172BF2EC49}" + }, + { + "m_id": "{82D3E2FD-ADFA-47F7-A889-D1172BF2EC49}" + }, + { + "m_id": "{82D3E2FD-ADFA-47F7-A889-D1172BF2EC49}" + }, + { + "m_id": "{82D3E2FD-ADFA-47F7-A889-D1172BF2EC49}" + }, + { + "m_id": "{82D3E2FD-ADFA-47F7-A889-D1172BF2EC49}" + }, + { + "m_id": "{82D3E2FD-ADFA-47F7-A889-D1172BF2EC49}" + }, + { + "m_id": "{82D3E2FD-ADFA-47F7-A889-D1172BF2EC49}" + }, + { + "m_id": "{82D3E2FD-ADFA-47F7-A889-D1172BF2EC49}" + }, + { + "m_id": "{82D3E2FD-ADFA-47F7-A889-D1172BF2EC49}" + }, + { + "m_id": "{82D3E2FD-ADFA-47F7-A889-D1172BF2EC49}" + }, + { + "m_id": "{82D3E2FD-ADFA-47F7-A889-D1172BF2EC49}" + }, + { + "m_id": "{82D3E2FD-ADFA-47F7-A889-D1172BF2EC49}" + }, + { + "m_id": "{82D3E2FD-ADFA-47F7-A889-D1172BF2EC49}" + }, + { + "m_id": "{82D3E2FD-ADFA-47F7-A889-D1172BF2EC49}" + }, + { + "m_id": "{82D3E2FD-ADFA-47F7-A889-D1172BF2EC49}" + }, + { + "m_id": "{82D3E2FD-ADFA-47F7-A889-D1172BF2EC49}" + }, + { + "m_id": "{82D3E2FD-ADFA-47F7-A889-D1172BF2EC49}" + }, + { + "m_id": "{82D3E2FD-ADFA-47F7-A889-D1172BF2EC49}" + }, + { + "m_id": "{82D3E2FD-ADFA-47F7-A889-D1172BF2EC49}" + }, + { + "m_id": "{82D3E2FD-ADFA-47F7-A889-D1172BF2EC49}" + }, + { + "m_id": "{82D3E2FD-ADFA-47F7-A889-D1172BF2EC49}" + }, + { + "m_id": "{82D3E2FD-ADFA-47F7-A889-D1172BF2EC49}" + }, + { + "m_id": "{82D3E2FD-ADFA-47F7-A889-D1172BF2EC49}" + }, + { + "m_id": "{82D3E2FD-ADFA-47F7-A889-D1172BF2EC49}" + }, + { + "m_id": "{82D3E2FD-ADFA-47F7-A889-D1172BF2EC49}" + }, + { + "m_id": "{82D3E2FD-ADFA-47F7-A889-D1172BF2EC49}" + }, + { + "m_id": "{82D3E2FD-ADFA-47F7-A889-D1172BF2EC49}" + }, + { + "m_id": "{82D3E2FD-ADFA-47F7-A889-D1172BF2EC49}" + }, + { + "m_id": "{82D3E2FD-ADFA-47F7-A889-D1172BF2EC49}" + }, + { + "m_id": "{82D3E2FD-ADFA-47F7-A889-D1172BF2EC49}" + }, + { + "m_id": "{82D3E2FD-ADFA-47F7-A889-D1172BF2EC49}" + }, + { + "m_id": "{82D3E2FD-ADFA-47F7-A889-D1172BF2EC49}" + }, + { + "m_id": "{82D3E2FD-ADFA-47F7-A889-D1172BF2EC49}" + }, + { + "m_id": "{82D3E2FD-ADFA-47F7-A889-D1172BF2EC49}" + }, + { + "m_id": "{82D3E2FD-ADFA-47F7-A889-D1172BF2EC49}" + }, + { + "m_id": "{82D3E2FD-ADFA-47F7-A889-D1172BF2EC49}" + }, + { + "m_id": "{82D3E2FD-ADFA-47F7-A889-D1172BF2EC49}" + }, + { + "m_id": "{82D3E2FD-ADFA-47F7-A889-D1172BF2EC49}" + }, + { + "m_id": "{82D3E2FD-ADFA-47F7-A889-D1172BF2EC49}" + }, + { + "m_id": "{82D3E2FD-ADFA-47F7-A889-D1172BF2EC49}" + }, + { + "m_id": "{82D3E2FD-ADFA-47F7-A889-D1172BF2EC49}" + }, + { + "m_id": "{82D3E2FD-ADFA-47F7-A889-D1172BF2EC49}" + }, + { + "m_id": "{82D3E2FD-ADFA-47F7-A889-D1172BF2EC49}" + }, + { + "m_id": "{82D3E2FD-ADFA-47F7-A889-D1172BF2EC49}" + }, + { + "m_id": "{82D3E2FD-ADFA-47F7-A889-D1172BF2EC49}" + }, + { + "m_id": "{82D3E2FD-ADFA-47F7-A889-D1172BF2EC49}" + }, + { + "m_id": "{82D3E2FD-ADFA-47F7-A889-D1172BF2EC49}" + }, + { + "m_id": "{82D3E2FD-ADFA-47F7-A889-D1172BF2EC49}" + }, + { + "m_id": "{82D3E2FD-ADFA-47F7-A889-D1172BF2EC49}" + }, + { + "m_id": "{82D3E2FD-ADFA-47F7-A889-D1172BF2EC49}" + }, + { + "m_id": "{82D3E2FD-ADFA-47F7-A889-D1172BF2EC49}" + }, + { + "m_id": "{82D3E2FD-ADFA-47F7-A889-D1172BF2EC49}" + }, + { + "m_id": "{82D3E2FD-ADFA-47F7-A889-D1172BF2EC49}" + }, + { + "m_id": "{82D3E2FD-ADFA-47F7-A889-D1172BF2EC49}" + }, + { + "m_id": "{82D3E2FD-ADFA-47F7-A889-D1172BF2EC49}" + }, + { + "m_id": "{82D3E2FD-ADFA-47F7-A889-D1172BF2EC49}" + }, + { + "m_id": "{82D3E2FD-ADFA-47F7-A889-D1172BF2EC49}" + }, + { + "m_id": "{82D3E2FD-ADFA-47F7-A889-D1172BF2EC49}" + }, + { + "m_id": "{82D3E2FD-ADFA-47F7-A889-D1172BF2EC49}" + }, + { + "m_id": "{82D3E2FD-ADFA-47F7-A889-D1172BF2EC49}" + }, + { + "m_id": "{82D3E2FD-ADFA-47F7-A889-D1172BF2EC49}" + }, + { + "m_id": "{82D3E2FD-ADFA-47F7-A889-D1172BF2EC49}" + }, + { + "m_id": "{82D3E2FD-ADFA-47F7-A889-D1172BF2EC49}" + }, + { + "m_id": "{82D3E2FD-ADFA-47F7-A889-D1172BF2EC49}" + }, + { + "m_id": "{82D3E2FD-ADFA-47F7-A889-D1172BF2EC49}" + }, + { + "m_id": "{82D3E2FD-ADFA-47F7-A889-D1172BF2EC49}" + }, + { + "m_id": "{82D3E2FD-ADFA-47F7-A889-D1172BF2EC49}" + }, + { + "m_id": "{82D3E2FD-ADFA-47F7-A889-D1172BF2EC49}" + }, + { + "m_id": "{82D3E2FD-ADFA-47F7-A889-D1172BF2EC49}" + }, + { + "m_id": "{82D3E2FD-ADFA-47F7-A889-D1172BF2EC49}" + }, + { + "m_id": "{82D3E2FD-ADFA-47F7-A889-D1172BF2EC49}" + }, + { + "m_id": "{82D3E2FD-ADFA-47F7-A889-D1172BF2EC49}" + }, + { + "m_id": "{82D3E2FD-ADFA-47F7-A889-D1172BF2EC49}" + }, + { + "m_id": "{82D3E2FD-ADFA-47F7-A889-D1172BF2EC49}" + }, + { + "m_id": "{82D3E2FD-ADFA-47F7-A889-D1172BF2EC49}" + }, + { + "m_id": "{82D3E2FD-ADFA-47F7-A889-D1172BF2EC49}" + }, + { + "m_id": "{82D3E2FD-ADFA-47F7-A889-D1172BF2EC49}" + }, + { + "m_id": "{82D3E2FD-ADFA-47F7-A889-D1172BF2EC49}" + }, + { + "m_id": "{82D3E2FD-ADFA-47F7-A889-D1172BF2EC49}" + }, + { + "m_id": "{82D3E2FD-ADFA-47F7-A889-D1172BF2EC49}" + }, + { + "m_id": "{82D3E2FD-ADFA-47F7-A889-D1172BF2EC49}" + }, + { + "m_id": "{82D3E2FD-ADFA-47F7-A889-D1172BF2EC49}" + }, + { + "m_id": "{82D3E2FD-ADFA-47F7-A889-D1172BF2EC49}" + }, + { + "m_id": "{82D3E2FD-ADFA-47F7-A889-D1172BF2EC49}" + }, + { + "m_id": "{82D3E2FD-ADFA-47F7-A889-D1172BF2EC49}" + }, + { + "m_id": "{82D3E2FD-ADFA-47F7-A889-D1172BF2EC49}" + }, + { + "m_id": "{82D3E2FD-ADFA-47F7-A889-D1172BF2EC49}" + }, + { + "m_id": "{82D3E2FD-ADFA-47F7-A889-D1172BF2EC49}" + }, + { + "m_id": "{82D3E2FD-ADFA-47F7-A889-D1172BF2EC49}" + }, + { + "m_id": "{82D3E2FD-ADFA-47F7-A889-D1172BF2EC49}" + }, + { + "m_id": "{82D3E2FD-ADFA-47F7-A889-D1172BF2EC49}" + }, + { + "m_id": "{82D3E2FD-ADFA-47F7-A889-D1172BF2EC49}" + }, + { + "m_id": "{82D3E2FD-ADFA-47F7-A889-D1172BF2EC49}" + }, + { + "m_id": "{82D3E2FD-ADFA-47F7-A889-D1172BF2EC49}" + }, + { + "m_id": "{82D3E2FD-ADFA-47F7-A889-D1172BF2EC49}" + }, + { + "m_id": "{82D3E2FD-ADFA-47F7-A889-D1172BF2EC49}" + }, + { + "m_id": "{82D3E2FD-ADFA-47F7-A889-D1172BF2EC49}" + }, + { + "m_id": "{82D3E2FD-ADFA-47F7-A889-D1172BF2EC49}" + }, + { + "m_id": "{82D3E2FD-ADFA-47F7-A889-D1172BF2EC49}" + }, + { + "m_id": "{82D3E2FD-ADFA-47F7-A889-D1172BF2EC49}" + }, + { + "m_id": "{82D3E2FD-ADFA-47F7-A889-D1172BF2EC49}" + }, + { + "m_id": "{82D3E2FD-ADFA-47F7-A889-D1172BF2EC49}" + } + ], + "m_eventSlotId": { + "m_id": "{8C7E88EA-8FEE-45D0-9A2E-78BC4A18F508}" + } + } + } + } + }, + { + "Id": { + "id": 8724164836240 + }, + "Name": "SC-Node(IsNetEntityRoleAuthority)", + "Components": { + "Component_[11076422520044215441]": { + "$type": "{E42861BD-1956-45AE-8DD7-CCFC1E3E5ACF} Method", + "Id": 11076422520044215441, + "Slots": [ + { + "id": { + "m_id": "{4EAB8D16-C0B4-44E1-885D-8E6754CD1A55}" + }, + "contracts": [ + { + "$type": "SlotTypeContract" + } + ], + "slotName": "EntityId: 0", + "Descriptor": { + "ConnectionType": 1, + "SlotType": 2 + }, + "DataType": 1 + }, + { + "id": { + "m_id": "{B6C4BE5E-CDE4-4EC7-98D0-A019CD80041C}" + }, + "contracts": [ + { + "$type": "SlotTypeContract" + } + ], + "slotName": "In", + "Descriptor": { + "ConnectionType": 1, + "SlotType": 1 + } + }, + { + "id": { + "m_id": "{1071F455-D5A0-4C7A-AF91-648A0F197885}" + }, + "contracts": [ + { + "$type": "SlotTypeContract" + } + ], + "slotName": "Out", + "Descriptor": { + "ConnectionType": 2, + "SlotType": 1 + } + }, + { + "id": { + "m_id": "{BA87B4ED-9A52-4A0D-8920-CD0ED4E839EA}" + }, + "contracts": [ + { + "$type": "SlotTypeContract" + } + ], + "slotName": "Is Role Authority", + "DisplayDataType": { + "m_type": 0 + }, + "Descriptor": { + "ConnectionType": 2, + "SlotType": 2 + }, + "DataType": 1 + } + ], + "Datums": [ + { + "scriptCanvasType": { + "m_type": 1 + }, + "isNullPointer": false, + "$type": "EntityId", + "value": { + "id": 2901262558 + }, + "label": "Entity Id" + } + ], + "methodType": 2, + "methodName": "IsNetEntityRoleAuthority", + "className": "NetBindComponent", + "resultSlotIDs": [ + {} + ], + "inputSlots": [ + { + "m_id": "{4EAB8D16-C0B4-44E1-885D-8E6754CD1A55}" + } + ], + "prettyClassName": "NetBindComponent" + } + } + }, + { + "Id": { + "id": 8737049738128 + }, + "Name": "SC-Node(Print)", + "Components": { + "Component_[15185116749844245504]": { + "$type": "Print", + "Id": 15185116749844245504, + "Slots": [ + { + "id": { + "m_id": "{F3ED8C08-D751-492A-A39A-7B7734727A5A}" + }, + "contracts": [ + { + "$type": "SlotTypeContract" + } + ], + "slotName": "In", + "toolTip": "Input signal", + "Descriptor": { + "ConnectionType": 1, + "SlotType": 1 + } + }, + { + "id": { + "m_id": "{D4FA5CCA-34FB-412B-826E-BC7050E684A6}" + }, + "DynamicTypeOverride": 3, + "contracts": [ + { + "$type": "SlotTypeContract" + } + ], + "slotName": "Value", + "toolTip": "Value which replaces instances of {Value} in the resulting string.", + "DisplayDataType": { + "m_type": 3 + }, + "DisplayGroup": { + "Value": 1015031923 + }, + "Descriptor": { + "ConnectionType": 1, + "SlotType": 2 + }, + "DataType": 1, + "IsReference": true, + "VariableReference": { + "m_id": "{71675BCB-6546-4B79-9D5E-912982945852}" + } + }, + { + "id": { + "m_id": "{5A4FB037-120E-4BF8-A170-D827E5DC161B}" + }, + "contracts": [ + { + "$type": "SlotTypeContract" + } + ], + "slotName": "Out", + "Descriptor": { + "ConnectionType": 2, + "SlotType": 1 + } + } + ], + "Datums": [ + { + "scriptCanvasType": { + "m_type": 3 + }, + "isNullPointer": false, + "$type": "double", + "value": 0.0, + "label": "Value" + } + ], + "m_format": "AutoComponent_RPC: Sending client PlayerNumber {Value}\n", + "m_numericPrecision": 0, + "m_arrayBindingMap": [ + { + "Key": 1, + "Value": { + "m_id": "{D4FA5CCA-34FB-412B-826E-BC7050E684A6}" + } + } + ], + "m_unresolvedString": [ + "AutoComponent_RPC: Sending client PlayerNumber ", + {}, + "\n" + ], + "m_formatSlotMap": { + "Value": { + "m_id": "{D4FA5CCA-34FB-412B-826E-BC7050E684A6}" + } + } + } + } + }, + { + "Id": { + "id": 8719869868944 + }, + "Name": "SC-Node(GetAuthorityToAutonomous_PlayerNumberEventByEntityId)", + "Components": { + "Component_[1841271567102345236]": { + "$type": "{E42861BD-1956-45AE-8DD7-CCFC1E3E5ACF} Method", + "Id": 1841271567102345236, + "Slots": [ + { + "id": { + "m_id": "{B556F66D-84DB-4118-8AFE-B3D88D6D75CA}" + }, + "contracts": [ + { + "$type": "SlotTypeContract" + } + ], + "slotName": "EntityId: 0", + "Descriptor": { + "ConnectionType": 1, + "SlotType": 2 + }, + "DataType": 1 + }, + { + "id": { + "m_id": "{211BD78B-E01E-44F8-B44E-2FD988047BE9}" + }, + "contracts": [ + { + "$type": "SlotTypeContract" + } + ], + "slotName": "In", + "Descriptor": { + "ConnectionType": 1, + "SlotType": 1 + } + }, + { + "id": { + "m_id": "{1A6BCB27-F99F-4B6B-89CC-F2BE2A698331}" + }, + "contracts": [ + { + "$type": "SlotTypeContract" + } + ], + "slotName": "Out", + "Descriptor": { + "ConnectionType": 2, + "SlotType": 1 + } + }, + { + "id": { + "m_id": "{7262E6CD-BADF-4DD0-8FCE-3A02C3F31CC8}" + }, + "contracts": [ + { + "$type": "SlotTypeContract" + } + ], + "slotName": "Event", + "DisplayDataType": { + "m_type": 4, + "m_azType": "{DB613438-34F0-5B2E-A413-77424F4254CD}" + }, + "Descriptor": { + "ConnectionType": 2, + "SlotType": 2 + }, + "DataType": 1 + } + ], + "Datums": [ + { + "scriptCanvasType": { + "m_type": 1 + }, + "isNullPointer": false, + "$type": "EntityId", + "value": { + "id": 2901262558 + }, + "label": "EntityId: 0" + } + ], + "methodType": 2, + "methodName": "GetAuthorityToAutonomous_PlayerNumberEventByEntityId", + "className": "NetworkTestPlayerComponent", + "resultSlotIDs": [ + {} + ], + "inputSlots": [ + { + "m_id": "{B556F66D-84DB-4118-8AFE-B3D88D6D75CA}" + } + ], + "prettyClassName": "NetworkTestPlayerComponent" + } + } + }, + { + "Id": { + "id": 8711279934352 + }, + "Name": "SendScriptEvent", + "Components": { + "Component_[5751772243856660980]": { + "$type": "SendScriptEvent", + "Id": 5751772243856660980, + "Slots": [ + { + "id": { + "m_id": "{2FF1A0A1-59C6-4DCF-AE1D-296BD5964D4E}" + }, + "contracts": [ + { + "$type": "SlotTypeContract" + } + ], + "slotName": "In", + "toolTip": "Fires the specified ScriptEvent when signaled", + "Descriptor": { + "ConnectionType": 1, + "SlotType": 1 + } + }, + { + "id": { + "m_id": "{F2955681-A901-432D-99A3-53818F46CDE7}" + }, + "contracts": [ + { + "$type": "SlotTypeContract" + } + ], + "slotName": "Out", + "toolTip": "Trigged after the ScriptEvent has been signaled and returns", + "Descriptor": { + "ConnectionType": 2, + "SlotType": 1 + } + } + ], + "m_version": 1, + "m_scriptEventAssetId": { + "guid": "{FE1B1992-8220-5DD3-A60A-AEC85EB91C54}" + }, + "m_asset": { + "assetId": { + "guid": "{FE1B1992-8220-5DD3-A60A-AEC85EB91C54}" + }, + "assetHint": "levels/multiplayer/autocomponent_rpc/globalgamedata.scriptevents" + }, + "m_busId": { + "Value": 1375178404 + }, + "m_eventId": { + "Value": 2930121176 + } + } + } + }, + { + "Id": { + "id": 8749934640016 + }, + "Name": "SendScriptEvent", + "Components": { + "Component_[6456267108920901297]": { + "$type": "SendScriptEvent", + "Id": 6456267108920901297, + "Slots": [ + { + "id": { + "m_id": "{23DBACD8-7784-4E18-A51C-258B25DF4C19}" + }, + "contracts": [ + { + "$type": "SlotTypeContract" + } + ], + "slotName": "In", + "toolTip": "Fires the specified ScriptEvent when signaled", + "Descriptor": { + "ConnectionType": 1, + "SlotType": 1 + } + }, + { + "id": { + "m_id": "{19C850D7-7F1E-4D41-AFD9-5A4FA03D54F0}" + }, + "contracts": [ + { + "$type": "SlotTypeContract" + } + ], + "slotName": "Out", + "toolTip": "Trigged after the ScriptEvent has been signaled and returns", + "Descriptor": { + "ConnectionType": 2, + "SlotType": 1 + } + }, + { + "id": { + "m_id": "{B6CA4982-245A-45F1-8AA6-3295F49DC071}" + }, + "contracts": [ + { + "$type": "SlotTypeContract" + } + ], + "slotName": "Number", + "DisplayDataType": { + "m_type": 3 + }, + "Descriptor": { + "ConnectionType": 2, + "SlotType": 2 + }, + "DataType": 1, + "IsReference": true, + "VariableReference": { + "m_id": "{71675BCB-6546-4B79-9D5E-912982945852}" + } + } + ], + "m_version": 1, + "m_eventSlotMapping": { + "{C7E99974-D1C0-4108-B731-120AF000060C}": { + "m_id": "{B6CA4982-245A-45F1-8AA6-3295F49DC071}" + } + }, + "m_scriptEventAssetId": { + "guid": "{FE1B1992-8220-5DD3-A60A-AEC85EB91C54}" + }, + "m_asset": { + "assetId": { + "guid": "{FE1B1992-8220-5DD3-A60A-AEC85EB91C54}" + }, + "assetHint": "levels/multiplayer/autocomponent_rpc/globalgamedata.scriptevents" + }, + "m_busId": { + "Value": 1375178404 + }, + "m_eventId": { + "Value": 242067946 + } + } + } + }, + { + "Id": { + "id": 8732754770832 + }, + "Name": "SC-Node(Print)", + "Components": { + "Component_[6838720237293185886]": { + "$type": "Print", + "Id": 6838720237293185886, + "Slots": [ + { + "id": { + "m_id": "{D206E5BC-3746-4A18-80C7-DBD335FD05FE}" + }, + "contracts": [ + { + "$type": "SlotTypeContract" + } + ], + "slotName": "In", + "toolTip": "Input signal", + "Descriptor": { + "ConnectionType": 1, + "SlotType": 1 + } + }, + { + "id": { + "m_id": "{BA146872-FBFF-4662-A569-8F1B4C8774AC}" + }, + "DynamicTypeOverride": 3, + "contracts": [ + { + "$type": "SlotTypeContract" + } + ], + "slotName": "Value", + "toolTip": "Value which replaces instances of {Value} in the resulting string.", + "DisplayDataType": { + "m_type": 3 + }, + "DisplayGroup": { + "Value": 1015031923 + }, + "Descriptor": { + "ConnectionType": 1, + "SlotType": 2 + }, + "DataType": 1 + }, + { + "id": { + "m_id": "{A4555039-973F-43F6-BC9D-CCC0C9B34252}" + }, + "contracts": [ + { + "$type": "SlotTypeContract" + } + ], + "slotName": "Out", + "Descriptor": { + "ConnectionType": 2, + "SlotType": 1 + } + } + ], + "Datums": [ + { + "scriptCanvasType": { + "m_type": 3 + }, + "isNullPointer": false, + "$type": "double", + "value": 0.0, + "label": "Value" + } + ], + "m_format": "AutoComponent_RPC: I'm Player #{Value}\n", + "m_numericPrecision": 0, + "m_arrayBindingMap": [ + { + "Key": 1, + "Value": { + "m_id": "{BA146872-FBFF-4662-A569-8F1B4C8774AC}" + } + } + ], + "m_unresolvedString": [ + "AutoComponent_RPC: I'm Player #", + {}, + "\n" + ], + "m_formatSlotMap": { + "Value": { + "m_id": "{BA146872-FBFF-4662-A569-8F1B4C8774AC}" + } + } + } + } + }, + { + "Id": { + "id": 8715574901648 + }, + "Name": "SC-Node(TimeDelayNodeableNode)", + "Components": { + "Component_[8216689437045635826]": { + "$type": "TimeDelayNodeableNode", + "Id": 8216689437045635826, + "Slots": [ + { + "id": { + "m_id": "{D2337DC6-F126-4254-B296-2DE6BA03993F}" + }, + "contracts": [ + { + "$type": "SlotTypeContract" + } + ], + "slotName": "Start", + "DisplayGroup": { + "Value": 2675529103 + }, + "Descriptor": { + "ConnectionType": 1, + "SlotType": 1 + } + }, + { + "id": { + "m_id": "{5809EA65-214B-43A9-8674-B89E9ADF1AE6}" + }, + "contracts": [ + { + "$type": "SlotTypeContract" + } + ], + "slotName": "Delay", + "toolTip": "The amount of time to delay before the Done is signalled.", + "DisplayGroup": { + "Value": 2675529103 + }, + "Descriptor": { + "ConnectionType": 1, + "SlotType": 2 + }, + "DataType": 1 + }, + { + "id": { + "m_id": "{AC3B9B74-5A7A-4AC9-89AA-B255879D6F63}" + }, + "contracts": [ + { + "$type": "SlotTypeContract" + } + ], + "slotName": "On Start", + "DisplayGroup": { + "Value": 2675529103 + }, + "Descriptor": { + "ConnectionType": 2, + "SlotType": 1 + } + }, + { + "id": { + "m_id": "{25568B15-5372-4C2D-8280-2B433251EACA}" + }, + "contracts": [ + { + "$type": "SlotTypeContract" + } + ], + "slotName": "Done", + "toolTip": "Signaled after waiting for the specified amount of times.", + "DisplayGroup": { + "Value": 271442091 + }, + "Descriptor": { + "ConnectionType": 2, + "SlotType": 1 + }, + "IsLatent": true + } + ], + "Datums": [ + { + "scriptCanvasType": { + "m_type": 3 + }, + "isNullPointer": false, + "$type": "double", + "value": 1.0, + "label": "Delay" + } + ], + "nodeable": { + "m_timeUnits": 2 + }, + "slotExecutionMap": { + "ins": [ + { + "_slotId": { + "m_id": "{D2337DC6-F126-4254-B296-2DE6BA03993F}" + }, + "_inputs": [ + { + "_slotId": { + "m_id": "{5809EA65-214B-43A9-8674-B89E9ADF1AE6}" + } + } + ], + "_outs": [ + { + "_slotId": { + "m_id": "{AC3B9B74-5A7A-4AC9-89AA-B255879D6F63}" + }, + "_name": "On Start", + "_interfaceSourceId": "{C071AF8D-5D00-0000-E074-ECBC15020000}" + } + ], + "_interfaceSourceId": "{C3B60A69-2ADF-0000-4062-ABA615020000}" + } + ], + "latents": [ + { + "_slotId": { + "m_id": "{25568B15-5372-4C2D-8280-2B433251EACA}" + }, + "_name": "Done", + "_interfaceSourceId": "{C3B60A69-2ADF-0000-4062-ABA615020000}" + } + ] + } + } + } + }, + { + "Id": { + "id": 8741344705424 + }, + "Name": "SC-Node(AuthorityToAutonomous_PlayerNumberByEntityId)", + "Components": { + "Component_[8243210565080727934]": { + "$type": "{E42861BD-1956-45AE-8DD7-CCFC1E3E5ACF} Method", + "Id": 8243210565080727934, + "Slots": [ + { + "id": { + "m_id": "{D8767DB8-4BD8-4907-A3A4-BE0AE4F1A774}" + }, + "contracts": [ + { + "$type": "SlotTypeContract" + } + ], + "slotName": "Source", + "toolTip": "The Source containing the NetworkTestPlayerComponentController", + "Descriptor": { + "ConnectionType": 1, + "SlotType": 2 + }, + "DataType": 1 + }, + { + "id": { + "m_id": "{2B948544-DD45-4DE1-A9FC-7AFBE1CAB202}" + }, + "contracts": [ + { + "$type": "SlotTypeContract" + } + ], + "slotName": "player_number", + "Descriptor": { + "ConnectionType": 1, + "SlotType": 2 + }, + "DataType": 1, + "IsReference": true, + "VariableReference": { + "m_id": "{71675BCB-6546-4B79-9D5E-912982945852}" + } + }, + { + "id": { + "m_id": "{1FDB4A9A-D46A-49E8-B734-475230EB7C06}" + }, + "contracts": [ + { + "$type": "SlotTypeContract" + } + ], + "slotName": "In", + "Descriptor": { + "ConnectionType": 1, + "SlotType": 1 + } + }, + { + "id": { + "m_id": "{964EAD23-8DF5-47A9-BF07-1E5C7CD0CC6C}" + }, + "contracts": [ + { + "$type": "SlotTypeContract" + } + ], + "slotName": "Out", + "Descriptor": { + "ConnectionType": 2, + "SlotType": 1 + } + } + ], + "Datums": [ + { + "scriptCanvasType": { + "m_type": 1 + }, + "isNullPointer": false, + "$type": "EntityId", + "value": { + "id": 2901262558 + }, + "label": "Source" + }, + { + "scriptCanvasType": { + "m_type": 3 + }, + "isNullPointer": false, + "$type": "double", + "value": 0.0, + "label": "player_number" + } + ], + "methodType": 2, + "methodName": "AuthorityToAutonomous_PlayerNumberByEntityId", + "className": "NetworkTestPlayerComponent", + "resultSlotIDs": [ + {} + ], + "inputSlots": [ + { + "m_id": "{D8767DB8-4BD8-4907-A3A4-BE0AE4F1A774}" + }, + { + "m_id": "{2B948544-DD45-4DE1-A9FC-7AFBE1CAB202}" + } + ], + "prettyClassName": "NetworkTestPlayerComponent" + } + } + }, + { + "Id": { + "id": 8745639672720 + }, + "Name": "SC-Node(Start)", + "Components": { + "Component_[8447409406288787781]": { + "$type": "Start", + "Id": 8447409406288787781, + "Slots": [ + { + "id": { + "m_id": "{A8EA9EF2-A3A6-46B5-8D43-08EF6B6B5B32}" + }, + "contracts": [ + { + "$type": "SlotTypeContract" + } + ], + "slotName": "Out", + "toolTip": "Signaled when the entity that owns this graph is fully activated.", + "Descriptor": { + "ConnectionType": 2, + "SlotType": 1 + } + } + ] + } + } + }, + { + "Id": { + "id": 8728459803536 + }, + "Name": "SC-Node(Gate)", + "Components": { + "Component_[8679383768392231909]": { + "$type": "Gate", + "Id": 8679383768392231909, + "Slots": [ + { + "id": { + "m_id": "{3E89B67B-1EF2-4DAB-8028-59A97527F3DF}" + }, + "contracts": [ + { + "$type": "SlotTypeContract" + } + ], + "slotName": "Condition", + "toolTip": "If true the node will signal the Output and proceed execution", + "Descriptor": { + "ConnectionType": 1, + "SlotType": 2 + }, + "DataType": 1 + }, + { + "id": { + "m_id": "{8AE7F430-C4A9-444E-B42A-BDDFE96C387A}" + }, + "contracts": [ + { + "$type": "SlotTypeContract" + } + ], + "slotName": "In", + "toolTip": "Input signal", + "Descriptor": { + "ConnectionType": 1, + "SlotType": 1 + } + }, + { + "id": { + "m_id": "{78C92586-C0E1-449F-8EB2-B1CE3BFC8AE7}" + }, + "contracts": [ + { + "$type": "SlotTypeContract" + } + ], + "slotName": "True", + "toolTip": "Signaled if the condition provided evaluates to true.", + "Descriptor": { + "ConnectionType": 2, + "SlotType": 1 + } + }, + { + "id": { + "m_id": "{47D87C86-2D61-46D3-A0FC-138F84FD352B}" + }, + "contracts": [ + { + "$type": "SlotTypeContract" + } + ], + "slotName": "False", + "toolTip": "Signaled if the condition provided evaluates to false.", + "Descriptor": { + "ConnectionType": 2, + "SlotType": 1 + } + } + ], + "Datums": [ + { + "scriptCanvasType": { + "m_type": 0 + }, + "isNullPointer": false, + "$type": "bool", + "value": false, + "label": "Condition" + } + ] + } + } + } + ], + "m_connections": [ + { + "Id": { + "id": 8754229607312 + }, + "Name": "srcEndpoint=(IsNetEntityRoleAuthority: Out), destEndpoint=(If: In)", + "Components": { + "Component_[3645153988172561571]": { + "$type": "{64CA5016-E803-4AC4-9A36-BDA2C890C6EB} Connection", + "Id": 3645153988172561571, + "sourceEndpoint": { + "nodeId": { + "id": 8724164836240 + }, + "slotId": { + "m_id": "{1071F455-D5A0-4C7A-AF91-648A0F197885}" + } + }, + "targetEndpoint": { + "nodeId": { + "id": 8728459803536 + }, + "slotId": { + "m_id": "{8AE7F430-C4A9-444E-B42A-BDDFE96C387A}" + } + } + } + } + }, + { + "Id": { + "id": 8758524574608 + }, + "Name": "srcEndpoint=(IsNetEntityRoleAuthority: Is Role Authority), destEndpoint=(If: Condition)", + "Components": { + "Component_[17942926291787646743]": { + "$type": "{64CA5016-E803-4AC4-9A36-BDA2C890C6EB} Connection", + "Id": 17942926291787646743, + "sourceEndpoint": { + "nodeId": { + "id": 8724164836240 + }, + "slotId": { + "m_id": "{BA87B4ED-9A52-4A0D-8920-CD0ED4E839EA}" + } + }, + "targetEndpoint": { + "nodeId": { + "id": 8728459803536 + }, + "slotId": { + "m_id": "{3E89B67B-1EF2-4DAB-8028-59A97527F3DF}" + } + } + } + } + }, + { + "Id": { + "id": 8762819541904 + }, + "Name": "srcEndpoint=(If: True), destEndpoint=(Send Script Event: In)", + "Components": { + "Component_[3298020356088639785]": { + "$type": "{64CA5016-E803-4AC4-9A36-BDA2C890C6EB} Connection", + "Id": 3298020356088639785, + "sourceEndpoint": { + "nodeId": { + "id": 8728459803536 + }, + "slotId": { + "m_id": "{78C92586-C0E1-449F-8EB2-B1CE3BFC8AE7}" + } + }, + "targetEndpoint": { + "nodeId": { + "id": 8711279934352 + }, + "slotId": { + "m_id": "{2FF1A0A1-59C6-4DCF-AE1D-296BD5964D4E}" + } + } + } + } + }, + { + "Id": { + "id": 8767114509200 + }, + "Name": "srcEndpoint=(Send Script Event: Out), destEndpoint=(Send Script Event: In)", + "Components": { + "Component_[5482500452520221078]": { + "$type": "{64CA5016-E803-4AC4-9A36-BDA2C890C6EB} Connection", + "Id": 5482500452520221078, + "sourceEndpoint": { + "nodeId": { + "id": 8711279934352 + }, + "slotId": { + "m_id": "{F2955681-A901-432D-99A3-53818F46CDE7}" + } + }, + "targetEndpoint": { + "nodeId": { + "id": 8749934640016 + }, + "slotId": { + "m_id": "{23DBACD8-7784-4E18-A51C-258B25DF4C19}" + } + } + } + } + }, + { + "Id": { + "id": 8771409476496 + }, + "Name": "srcEndpoint=(Send Script Event: Out), destEndpoint=(AuthorityToAutonomous_PlayerNumberByEntityId: In)", + "Components": { + "Component_[16156808606878296902]": { + "$type": "{64CA5016-E803-4AC4-9A36-BDA2C890C6EB} Connection", + "Id": 16156808606878296902, + "sourceEndpoint": { + "nodeId": { + "id": 8749934640016 + }, + "slotId": { + "m_id": "{19C850D7-7F1E-4D41-AFD9-5A4FA03D54F0}" + } + }, + "targetEndpoint": { + "nodeId": { + "id": 8741344705424 + }, + "slotId": { + "m_id": "{1FDB4A9A-D46A-49E8-B734-475230EB7C06}" + } + } + } + } + }, + { + "Id": { + "id": 8775704443792 + }, + "Name": "srcEndpoint=(AuthorityToAutonomous_PlayerNumberByEntityId: Out), destEndpoint=(Print: In)", + "Components": { + "Component_[17367899649716276273]": { + "$type": "{64CA5016-E803-4AC4-9A36-BDA2C890C6EB} Connection", + "Id": 17367899649716276273, + "sourceEndpoint": { + "nodeId": { + "id": 8741344705424 + }, + "slotId": { + "m_id": "{964EAD23-8DF5-47A9-BF07-1E5C7CD0CC6C}" + } + }, + "targetEndpoint": { + "nodeId": { + "id": 8737049738128 + }, + "slotId": { + "m_id": "{F3ED8C08-D751-492A-A39A-7B7734727A5A}" + } + } + } + } + }, + { + "Id": { + "id": 8779999411088 + }, + "Name": "srcEndpoint=(On Graph Start: Out), destEndpoint=(TimeDelay: Start)", + "Components": { + "Component_[13463448697016307967]": { + "$type": "{64CA5016-E803-4AC4-9A36-BDA2C890C6EB} Connection", + "Id": 13463448697016307967, + "sourceEndpoint": { + "nodeId": { + "id": 8745639672720 + }, + "slotId": { + "m_id": "{A8EA9EF2-A3A6-46B5-8D43-08EF6B6B5B32}" + } + }, + "targetEndpoint": { + "nodeId": { + "id": 8715574901648 + }, + "slotId": { + "m_id": "{D2337DC6-F126-4254-B296-2DE6BA03993F}" + } + } + } + } + }, + { + "Id": { + "id": 8784294378384 + }, + "Name": "srcEndpoint=(GetAuthorityToAutonomous_PlayerNumberEventByEntityId: Event), destEndpoint=(AuthorityToAutonomous_PlayerNumber Notify Event: AuthorityToAutonomous_PlayerNumber Notify Event)", + "Components": { + "Component_[9477060643694737434]": { + "$type": "{64CA5016-E803-4AC4-9A36-BDA2C890C6EB} Connection", + "Id": 9477060643694737434, + "sourceEndpoint": { + "nodeId": { + "id": 8719869868944 + }, + "slotId": { + "m_id": "{7262E6CD-BADF-4DD0-8FCE-3A02C3F31CC8}" + } + }, + "targetEndpoint": { + "nodeId": { + "id": 8706984967056 + }, + "slotId": { + "m_id": "{8C7E88EA-8FEE-45D0-9A2E-78BC4A18F508}" + } + } + } + } + }, + { + "Id": { + "id": 8788589345680 + }, + "Name": "srcEndpoint=(GetAuthorityToAutonomous_PlayerNumberEventByEntityId: Out), destEndpoint=(AuthorityToAutonomous_PlayerNumber Notify Event: Connect)", + "Components": { + "Component_[16543380658701699472]": { + "$type": "{64CA5016-E803-4AC4-9A36-BDA2C890C6EB} Connection", + "Id": 16543380658701699472, + "sourceEndpoint": { + "nodeId": { + "id": 8719869868944 + }, + "slotId": { + "m_id": "{1A6BCB27-F99F-4B6B-89CC-F2BE2A698331}" + } + }, + "targetEndpoint": { + "nodeId": { + "id": 8706984967056 + }, + "slotId": { + "m_id": "{46E6B649-CAA4-4318-960D-5E4854E21BB2}" + } + } + } + } + }, + { + "Id": { + "id": 8792884312976 + }, + "Name": "srcEndpoint=(AuthorityToAutonomous_PlayerNumber Notify Event: player_number), destEndpoint=(Print: Value)", + "Components": { + "Component_[864863482692400383]": { + "$type": "{64CA5016-E803-4AC4-9A36-BDA2C890C6EB} Connection", + "Id": 864863482692400383, + "sourceEndpoint": { + "nodeId": { + "id": 8706984967056 + }, + "slotId": { + "m_id": "{82D3E2FD-ADFA-47F7-A889-D1172BF2EC49}" + } + }, + "targetEndpoint": { + "nodeId": { + "id": 8732754770832 + }, + "slotId": { + "m_id": "{BA146872-FBFF-4662-A569-8F1B4C8774AC}" + } + } + } + } + }, + { + "Id": { + "id": 8797179280272 + }, + "Name": "srcEndpoint=(AuthorityToAutonomous_PlayerNumber Notify Event: OnEvent), destEndpoint=(Print: In)", + "Components": { + "Component_[2451057837093425972]": { + "$type": "{64CA5016-E803-4AC4-9A36-BDA2C890C6EB} Connection", + "Id": 2451057837093425972, + "sourceEndpoint": { + "nodeId": { + "id": 8706984967056 + }, + "slotId": { + "m_id": "{586BE222-2DEA-4E08-968F-07CA4EB96C54}" + } + }, + "targetEndpoint": { + "nodeId": { + "id": 8732754770832 + }, + "slotId": { + "m_id": "{D206E5BC-3746-4A18-80C7-DBD335FD05FE}" + } + } + } + } + }, + { + "Id": { + "id": 8801474247568 + }, + "Name": "srcEndpoint=(On Graph Start: Out), destEndpoint=(GetAuthorityToAutonomous_PlayerNumberEventByEntityId: In)", + "Components": { + "Component_[12180981889720748145]": { + "$type": "{64CA5016-E803-4AC4-9A36-BDA2C890C6EB} Connection", + "Id": 12180981889720748145, + "sourceEndpoint": { + "nodeId": { + "id": 8745639672720 + }, + "slotId": { + "m_id": "{A8EA9EF2-A3A6-46B5-8D43-08EF6B6B5B32}" + } + }, + "targetEndpoint": { + "nodeId": { + "id": 8719869868944 + }, + "slotId": { + "m_id": "{211BD78B-E01E-44F8-B44E-2FD988047BE9}" + } + } + } + } + }, + { + "Id": { + "id": 8805769214864 + }, + "Name": "srcEndpoint=(TimeDelay: Done), destEndpoint=(IsNetEntityRoleAuthority: In)", + "Components": { + "Component_[5772191552099194657]": { + "$type": "{64CA5016-E803-4AC4-9A36-BDA2C890C6EB} Connection", + "Id": 5772191552099194657, + "sourceEndpoint": { + "nodeId": { + "id": 8715574901648 + }, + "slotId": { + "m_id": "{25568B15-5372-4C2D-8280-2B433251EACA}" + } + }, + "targetEndpoint": { + "nodeId": { + "id": 8724164836240 + }, + "slotId": { + "m_id": "{B6C4BE5E-CDE4-4EC7-98D0-A019CD80041C}" + } + } + } + } + } + ], + "m_scriptEventAssets": [ + [ + { + "id": 8749934640016 + }, + {} + ], + [ + { + "id": 8711279934352 + }, + {} + ] + ] + }, + "m_assetType": "{3E2AC8CD-713F-453E-967F-29517F331784}", + "versionData": { + "_grammarVersion": 1, + "_runtimeVersion": 1, + "_fileVersion": 1 + }, + "m_variableCounter": 1, + "GraphCanvasData": [ + { + "Key": { + "id": 8706984967056 + }, + "Value": { + "ComponentData": { + "{24CB38BB-1705-4EC5-8F63-B574571B4DCD}": { + "$type": "NodeSaveData" + }, + "{328FF15C-C302-458F-A43D-E1794DE0904E}": { + "$type": "GeneralNodeTitleComponentSaveData", + "PaletteOverride": "HandlerNodeTitlePalette" + }, + "{7CC444B1-F9B3-41B5-841B-0C4F2179F111}": { + "$type": "GeometrySaveData", + "Position": [ + 820.0, + 620.0 + ] + }, + "{B0B99C8A-03AF-4CF6-A926-F65C874C3D97}": { + "$type": "StylingComponentSaveData", + "SubStyle": ".azeventhandler" + }, + "{B1F49A35-8408-40DA-B79E-F1E3B64322CE}": { + "$type": "PersistentIdComponentSaveData", + "PersistentId": "{F112D217-FAC8-4577-B67A-DFDF47842F7D}" + } + } + } + }, + { + "Key": { + "id": 8711279934352 + }, + "Value": { + "ComponentData": { + "{24CB38BB-1705-4EC5-8F63-B574571B4DCD}": { + "$type": "NodeSaveData" + }, + "{328FF15C-C302-458F-A43D-E1794DE0904E}": { + "$type": "GeneralNodeTitleComponentSaveData", + "PaletteOverride": "MethodNodeTitlePalette" + }, + "{7CC444B1-F9B3-41B5-841B-0C4F2179F111}": { + "$type": "GeometrySaveData", + "Position": [ + 1240.0, + 260.0 + ] + }, + "{B0B99C8A-03AF-4CF6-A926-F65C874C3D97}": { + "$type": "StylingComponentSaveData", + "SubStyle": ".method" + }, + "{B1F49A35-8408-40DA-B79E-F1E3B64322CE}": { + "$type": "PersistentIdComponentSaveData", + "PersistentId": "{13BD3C1C-EDBB-419E-8465-495935414A1A}" + } + } + } + }, + { + "Key": { + "id": 8715574901648 + }, + "Value": { + "ComponentData": { + "{24CB38BB-1705-4EC5-8F63-B574571B4DCD}": { + "$type": "NodeSaveData" + }, + "{328FF15C-C302-458F-A43D-E1794DE0904E}": { + "$type": "GeneralNodeTitleComponentSaveData", + "PaletteOverride": "TimeNodeTitlePalette" + }, + "{7CC444B1-F9B3-41B5-841B-0C4F2179F111}": { + "$type": "GeometrySaveData", + "Position": [ + 200.0, + 260.0 + ] + }, + "{B0B99C8A-03AF-4CF6-A926-F65C874C3D97}": { + "$type": "StylingComponentSaveData" + }, + "{B1F49A35-8408-40DA-B79E-F1E3B64322CE}": { + "$type": "PersistentIdComponentSaveData", + "PersistentId": "{5DF902FE-B0C4-4563-B2BA-17996B24E211}" + } + } + } + }, + { + "Key": { + "id": 8719869868944 + }, + "Value": { + "ComponentData": { + "{24CB38BB-1705-4EC5-8F63-B574571B4DCD}": { + "$type": "NodeSaveData" + }, + "{328FF15C-C302-458F-A43D-E1794DE0904E}": { + "$type": "GeneralNodeTitleComponentSaveData", + "PaletteOverride": "MethodNodeTitlePalette" + }, + "{7CC444B1-F9B3-41B5-841B-0C4F2179F111}": { + "$type": "GeometrySaveData", + "Position": [ + 380.0, + 620.0 + ] + }, + "{B0B99C8A-03AF-4CF6-A926-F65C874C3D97}": { + "$type": "StylingComponentSaveData", + "SubStyle": ".method" + }, + "{B1F49A35-8408-40DA-B79E-F1E3B64322CE}": { + "$type": "PersistentIdComponentSaveData", + "PersistentId": "{BBBE60FC-0215-4A5A-BEBE-4FC869E5EECE}" + } + } + } + }, + { + "Key": { + "id": 8724164836240 + }, + "Value": { + "ComponentData": { + "{24CB38BB-1705-4EC5-8F63-B574571B4DCD}": { + "$type": "NodeSaveData" + }, + "{328FF15C-C302-458F-A43D-E1794DE0904E}": { + "$type": "GeneralNodeTitleComponentSaveData", + "PaletteOverride": "MethodNodeTitlePalette" + }, + "{7CC444B1-F9B3-41B5-841B-0C4F2179F111}": { + "$type": "GeometrySaveData", + "Position": [ + 500.0, + 260.0 + ] + }, + "{B0B99C8A-03AF-4CF6-A926-F65C874C3D97}": { + "$type": "StylingComponentSaveData", + "SubStyle": ".method" + }, + "{B1F49A35-8408-40DA-B79E-F1E3B64322CE}": { + "$type": "PersistentIdComponentSaveData", + "PersistentId": "{348E780E-3A4E-47C7-ACF5-C7B2CB387517}" + } + } + } + }, + { + "Key": { + "id": 8728459803536 + }, + "Value": { + "ComponentData": { + "{24CB38BB-1705-4EC5-8F63-B574571B4DCD}": { + "$type": "NodeSaveData" + }, + "{328FF15C-C302-458F-A43D-E1794DE0904E}": { + "$type": "GeneralNodeTitleComponentSaveData", + "PaletteOverride": "LogicNodeTitlePalette" + }, + "{7CC444B1-F9B3-41B5-841B-0C4F2179F111}": { + "$type": "GeometrySaveData", + "Position": [ + 940.0, + 260.0 + ] + }, + "{B0B99C8A-03AF-4CF6-A926-F65C874C3D97}": { + "$type": "StylingComponentSaveData" + }, + "{B1F49A35-8408-40DA-B79E-F1E3B64322CE}": { + "$type": "PersistentIdComponentSaveData", + "PersistentId": "{53C8DAF1-FFF3-4AF8-A7FB-BC0B4E492B37}" + } + } + } + }, + { + "Key": { + "id": 8732754770832 + }, + "Value": { + "ComponentData": { + "{24CB38BB-1705-4EC5-8F63-B574571B4DCD}": { + "$type": "NodeSaveData" + }, + "{328FF15C-C302-458F-A43D-E1794DE0904E}": { + "$type": "GeneralNodeTitleComponentSaveData", + "PaletteOverride": "StringNodeTitlePalette" + }, + "{7CC444B1-F9B3-41B5-841B-0C4F2179F111}": { + "$type": "GeometrySaveData", + "Position": [ + 1440.0, + 620.0 + ] + }, + "{B0B99C8A-03AF-4CF6-A926-F65C874C3D97}": { + "$type": "StylingComponentSaveData" + }, + "{B1F49A35-8408-40DA-B79E-F1E3B64322CE}": { + "$type": "PersistentIdComponentSaveData", + "PersistentId": "{74ED5AE1-A269-46D4-B968-FEDF513C9CF1}" + } + } + } + }, + { + "Key": { + "id": 8737049738128 + }, + "Value": { + "ComponentData": { + "{24CB38BB-1705-4EC5-8F63-B574571B4DCD}": { + "$type": "NodeSaveData" + }, + "{328FF15C-C302-458F-A43D-E1794DE0904E}": { + "$type": "GeneralNodeTitleComponentSaveData", + "PaletteOverride": "StringNodeTitlePalette" + }, + "{7CC444B1-F9B3-41B5-841B-0C4F2179F111}": { + "$type": "GeometrySaveData", + "Position": [ + 2280.0, + 260.0 + ] + }, + "{B0B99C8A-03AF-4CF6-A926-F65C874C3D97}": { + "$type": "StylingComponentSaveData" + }, + "{B1F49A35-8408-40DA-B79E-F1E3B64322CE}": { + "$type": "PersistentIdComponentSaveData", + "PersistentId": "{B91C0E41-E6B5-46DE-885F-6BC6CFB2E813}" + } + } + } + }, + { + "Key": { + "id": 8741344705424 + }, + "Value": { + "ComponentData": { + "{24CB38BB-1705-4EC5-8F63-B574571B4DCD}": { + "$type": "NodeSaveData" + }, + "{328FF15C-C302-458F-A43D-E1794DE0904E}": { + "$type": "GeneralNodeTitleComponentSaveData", + "PaletteOverride": "MethodNodeTitlePalette" + }, + "{7CC444B1-F9B3-41B5-841B-0C4F2179F111}": { + "$type": "GeometrySaveData", + "Position": [ + 1840.0, + 260.0 + ] + }, + "{B0B99C8A-03AF-4CF6-A926-F65C874C3D97}": { + "$type": "StylingComponentSaveData", + "SubStyle": ".method" + }, + "{B1F49A35-8408-40DA-B79E-F1E3B64322CE}": { + "$type": "PersistentIdComponentSaveData", + "PersistentId": "{59FFF3C1-2D7B-47EA-AE35-ED15DCB95CC8}" + } + } + } + }, + { + "Key": { + "id": 8745639672720 + }, + "Value": { + "ComponentData": { + "{24CB38BB-1705-4EC5-8F63-B574571B4DCD}": { + "$type": "NodeSaveData" + }, + "{328FF15C-C302-458F-A43D-E1794DE0904E}": { + "$type": "GeneralNodeTitleComponentSaveData", + "PaletteOverride": "TimeNodeTitlePalette" + }, + "{7CC444B1-F9B3-41B5-841B-0C4F2179F111}": { + "$type": "GeometrySaveData", + "Position": [ + 40.0, + 280.0 + ] + }, + "{B0B99C8A-03AF-4CF6-A926-F65C874C3D97}": { + "$type": "StylingComponentSaveData" + }, + "{B1F49A35-8408-40DA-B79E-F1E3B64322CE}": { + "$type": "PersistentIdComponentSaveData", + "PersistentId": "{B4CB62D9-9965-42E2-81FF-BDADDBD14CBE}" + } + } + } + }, + { + "Key": { + "id": 8749934640016 + }, + "Value": { + "ComponentData": { + "{24CB38BB-1705-4EC5-8F63-B574571B4DCD}": { + "$type": "NodeSaveData" + }, + "{328FF15C-C302-458F-A43D-E1794DE0904E}": { + "$type": "GeneralNodeTitleComponentSaveData", + "PaletteOverride": "MethodNodeTitlePalette" + }, + "{7CC444B1-F9B3-41B5-841B-0C4F2179F111}": { + "$type": "GeometrySaveData", + "Position": [ + 1540.0, + 260.0 + ] + }, + "{B0B99C8A-03AF-4CF6-A926-F65C874C3D97}": { + "$type": "StylingComponentSaveData", + "SubStyle": ".method" + }, + "{B1F49A35-8408-40DA-B79E-F1E3B64322CE}": { + "$type": "PersistentIdComponentSaveData", + "PersistentId": "{FD844BFD-72DA-44BA-B92A-AFDB58263B91}" + } + } + } + }, + { + "Key": { + "id": 2816238339133127497 + }, + "Value": { + "ComponentData": { + "{5F84B500-8C45-40D1-8EFC-A5306B241444}": { + "$type": "SceneComponentSaveData", + "ViewParams": { + "AnchorX": 260.0, + "AnchorY": 479.0 + } + } + } + } + } + ], + "StatisticsHelper": { + "InstanceCounter": [ + { + "Key": 4199610336680704683, + "Value": 1 + }, + { + "Key": 4847610523576971761, + "Value": 1 + }, + { + "Key": 6462358712820489356, + "Value": 1 + }, + { + "Key": 7760188923571293852, + "Value": 1 + }, + { + "Key": 8065262779685207188, + "Value": 1 + }, + { + "Key": 8452971738487658154, + "Value": 1 + }, + { + "Key": 10684225535275896474, + "Value": 2 + }, + { + "Key": 12248403816200817622, + "Value": 1 + }, + { + "Key": 12248403882232298424, + "Value": 1 + }, + { + "Key": 16232169425081397848, + "Value": 1 + } + ] + } + } + } + } + } +} \ No newline at end of file diff --git a/AutomatedTesting/Levels/Multiplayer/AutoComponent_RPC/AutoComponent_RPC_NetLevelEntity.scriptcanvas b/AutomatedTesting/Levels/Multiplayer/AutoComponent_RPC/AutoComponent_RPC_NetLevelEntity.scriptcanvas new file mode 100644 index 0000000000..3869dfdfcb --- /dev/null +++ b/AutomatedTesting/Levels/Multiplayer/AutoComponent_RPC/AutoComponent_RPC_NetLevelEntity.scriptcanvas @@ -0,0 +1,1946 @@ +{ + "Type": "JsonSerialization", + "Version": 1, + "ClassName": "ScriptCanvasData", + "ClassData": { + "m_scriptCanvas": { + "Id": { + "id": 1685762441320719908 + }, + "Name": "AutoComponent_RPC_NetLevelEntity", + "Components": { + "Component_[2936040539888065977]": { + "$type": "{4D755CA9-AB92-462C-B24F-0B3376F19967} Graph", + "Id": 2936040539888065977, + "m_graphData": { + "m_nodes": [ + { + "Id": { + "id": 56986727032248 + }, + "Name": "SC-Node(RepeaterNodeableNode)", + "Components": { + "Component_[11069913642528675281]": { + "$type": "RepeaterNodeableNode", + "Id": 11069913642528675281, + "Slots": [ + { + "id": { + "m_id": "{07267CBA-B377-4B57-8A04-E322F8BFC07F}" + }, + "contracts": [ + { + "$type": "SlotTypeContract" + } + ], + "slotName": "Start", + "DisplayGroup": { + "Value": 2675529103 + }, + "Descriptor": { + "ConnectionType": 1, + "SlotType": 1 + } + }, + { + "id": { + "m_id": "{A9CCCCF4-BC3E-44B8-B2BB-2EEFBF475F82}" + }, + "contracts": [ + { + "$type": "SlotTypeContract" + } + ], + "slotName": "Repetitions", + "toolTip": "How many times to repeat.", + "DisplayGroup": { + "Value": 2675529103 + }, + "Descriptor": { + "ConnectionType": 1, + "SlotType": 2 + }, + "DataType": 1 + }, + { + "id": { + "m_id": "{E490B225-8A15-4CA1-9F25-6D8F9F8E398F}" + }, + "contracts": [ + { + "$type": "SlotTypeContract" + } + ], + "slotName": "Interval", + "toolTip": "The Interval between repetitions. If zero, all repititions execute immediately, before On Start", + "DisplayGroup": { + "Value": 2675529103 + }, + "Descriptor": { + "ConnectionType": 1, + "SlotType": 2 + }, + "DataType": 1 + }, + { + "id": { + "m_id": "{92077333-D7F5-4E54-80FD-0363876B5510}" + }, + "contracts": [ + { + "$type": "SlotTypeContract" + } + ], + "slotName": "On Start", + "DisplayGroup": { + "Value": 2675529103 + }, + "Descriptor": { + "ConnectionType": 2, + "SlotType": 1 + } + }, + { + "id": { + "m_id": "{91CF89F3-906C-4860-B84E-9BD7D6842CA8}" + }, + "contracts": [ + { + "$type": "SlotTypeContract" + } + ], + "slotName": "Complete", + "toolTip": "Signaled upon node exit", + "DisplayGroup": { + "Value": 1114099747 + }, + "Descriptor": { + "ConnectionType": 2, + "SlotType": 1 + }, + "IsLatent": true + }, + { + "id": { + "m_id": "{C1CCBA7B-A13B-4FCE-99ED-8FD1A8F72869}" + }, + "contracts": [ + { + "$type": "SlotTypeContract" + } + ], + "slotName": "Action", + "toolTip": "Signaled every repetition", + "DisplayGroup": { + "Value": 1204587666 + }, + "Descriptor": { + "ConnectionType": 2, + "SlotType": 1 + }, + "IsLatent": true + } + ], + "Datums": [ + { + "scriptCanvasType": { + "m_type": 3 + }, + "isNullPointer": false, + "$type": "double", + "value": 99.0, + "label": "Repetitions" + }, + { + "scriptCanvasType": { + "m_type": 3 + }, + "isNullPointer": false, + "$type": "double", + "value": 1.0, + "label": "Interval" + } + ], + "nodeable": { + "m_timeUnits": 2 + }, + "slotExecutionMap": { + "ins": [ + { + "_slotId": { + "m_id": "{07267CBA-B377-4B57-8A04-E322F8BFC07F}" + }, + "_inputs": [ + { + "_slotId": { + "m_id": "{A9CCCCF4-BC3E-44B8-B2BB-2EEFBF475F82}" + } + }, + { + "_slotId": { + "m_id": "{E490B225-8A15-4CA1-9F25-6D8F9F8E398F}" + } + } + ], + "_outs": [ + { + "_slotId": { + "m_id": "{92077333-D7F5-4E54-80FD-0363876B5510}" + }, + "_name": "On Start", + "_interfaceSourceId": "{60330D5B-FB7F-0000-8039-14DD7C020000}" + } + ], + "_interfaceSourceId": "{E1D0AF7E-837B-0000-0033-BA267C020000}" + } + ], + "latents": [ + { + "_slotId": { + "m_id": "{91CF89F3-906C-4860-B84E-9BD7D6842CA8}" + }, + "_name": "Complete", + "_interfaceSourceId": "{E1D0AF7E-837B-0000-0033-BA267C020000}" + }, + { + "_slotId": { + "m_id": "{C1CCBA7B-A13B-4FCE-99ED-8FD1A8F72869}" + }, + "_name": "Action", + "_interfaceSourceId": "{E1D0AF7E-837B-0000-0033-BA267C020000}" + } + ] + } + } + } + }, + { + "Id": { + "id": 57003906901432 + }, + "Name": "SC-Node(DrawTextOnEntity)", + "Components": { + "Component_[14125366736968050670]": { + "$type": "{E42861BD-1956-45AE-8DD7-CCFC1E3E5ACF} Method", + "Id": 14125366736968050670, + "Slots": [ + { + "id": { + "m_id": "{6BD7BF07-D1B6-4CC2-A861-C4334AA3A025}" + }, + "contracts": [ + { + "$type": "SlotTypeContract" + } + ], + "slotName": "EntityId: 0", + "Descriptor": { + "ConnectionType": 1, + "SlotType": 2 + }, + "DataType": 1 + }, + { + "id": { + "m_id": "{AB0304C4-CD52-4351-A009-CD959CDA6E2B}" + }, + "contracts": [ + { + "$type": "SlotTypeContract" + } + ], + "slotName": "String: 1", + "Descriptor": { + "ConnectionType": 1, + "SlotType": 2 + }, + "DataType": 1 + }, + { + "id": { + "m_id": "{EB877F87-C03A-4692-ABBB-2317E98E8C6F}" + }, + "contracts": [ + { + "$type": "SlotTypeContract" + } + ], + "slotName": "Color: 2", + "Descriptor": { + "ConnectionType": 1, + "SlotType": 2 + }, + "DataType": 1 + }, + { + "id": { + "m_id": "{E2D11762-F47C-4341-806A-DBB4FBAEC235}" + }, + "contracts": [ + { + "$type": "SlotTypeContract" + } + ], + "slotName": "Number: 3", + "Descriptor": { + "ConnectionType": 1, + "SlotType": 2 + }, + "DataType": 1 + }, + { + "id": { + "m_id": "{1673B8A0-D4EC-4CC7-8F80-0419BB5560EB}" + }, + "contracts": [ + { + "$type": "SlotTypeContract" + } + ], + "slotName": "In", + "Descriptor": { + "ConnectionType": 1, + "SlotType": 1 + } + }, + { + "id": { + "m_id": "{5F720C70-EA4F-4883-B5BE-4278E75370E8}" + }, + "contracts": [ + { + "$type": "SlotTypeContract" + } + ], + "slotName": "Out", + "Descriptor": { + "ConnectionType": 2, + "SlotType": 1 + } + } + ], + "Datums": [ + { + "scriptCanvasType": { + "m_type": 1 + }, + "isNullPointer": false, + "$type": "EntityId", + "value": { + "id": 2901262558 + }, + "label": "Entity Id" + }, + { + "scriptCanvasType": { + "m_type": 5 + }, + "isNullPointer": false, + "$type": "{03AAAB3F-5C47-5A66-9EBC-D5FA4DB353C9} AZStd::string", + "value": "AutoComponent_RPC_NetLevelEntity: I'm a client playing some superficial fx", + "label": "Color" + }, + { + "scriptCanvasType": { + "m_type": 12 + }, + "isNullPointer": false, + "$type": "Color", + "value": [ + 1.0, + 0.0, + 0.0, + 1.0 + ], + "label": "Color: 2" + }, + { + "scriptCanvasType": { + "m_type": 3 + }, + "isNullPointer": false, + "$type": "double", + "value": 2.0, + "label": "Number: 3" + } + ], + "methodType": 0, + "methodName": "DrawTextOnEntity", + "className": "DebugDrawRequestBus", + "resultSlotIDs": [ + {} + ], + "inputSlots": [ + { + "m_id": "{6BD7BF07-D1B6-4CC2-A861-C4334AA3A025}" + }, + { + "m_id": "{AB0304C4-CD52-4351-A009-CD959CDA6E2B}" + }, + { + "m_id": "{EB877F87-C03A-4692-ABBB-2317E98E8C6F}" + }, + { + "m_id": "{E2D11762-F47C-4341-806A-DBB4FBAEC235}" + } + ], + "prettyClassName": "DebugDrawRequestBus" + } + } + }, + { + "Id": { + "id": 56999611934136 + }, + "Name": "SC-Node(Print)", + "Components": { + "Component_[15472692142045278273]": { + "$type": "Print", + "Id": 15472692142045278273, + "Slots": [ + { + "id": { + "m_id": "{2F11CF04-DC4B-4881-8D74-AB0E51B4A278}" + }, + "contracts": [ + { + "$type": "SlotTypeContract" + } + ], + "slotName": "In", + "toolTip": "Input signal", + "Descriptor": { + "ConnectionType": 1, + "SlotType": 1 + } + }, + { + "id": { + "m_id": "{6CE4DAB2-4D8E-461E-B9B2-34338EBBAD97}" + }, + "contracts": [ + { + "$type": "SlotTypeContract" + } + ], + "slotName": "Out", + "Descriptor": { + "ConnectionType": 2, + "SlotType": 1 + } + } + ], + "m_format": "AutoComponent_RPC_NetLevelEntity: Authority sending RPC to play some fx.\n", + "m_unresolvedString": [ + "AutoComponent_RPC_NetLevelEntity: Authority sending RPC to play some fx.\n" + ] + } + } + }, + { + "Id": { + "id": 56995316966840 + }, + "Name": "SC-Node(Print)", + "Components": { + "Component_[15717135232290736332]": { + "$type": "Print", + "Id": 15717135232290736332, + "Slots": [ + { + "id": { + "m_id": "{7CAD6E31-6218-4326-8FFB-0523F545E250}" + }, + "contracts": [ + { + "$type": "SlotTypeContract" + } + ], + "slotName": "In", + "toolTip": "Input signal", + "Descriptor": { + "ConnectionType": 1, + "SlotType": 1 + } + }, + { + "id": { + "m_id": "{C38BB068-BF1B-4734-BFFA-10B258870349}" + }, + "contracts": [ + { + "$type": "SlotTypeContract" + } + ], + "slotName": "Out", + "Descriptor": { + "ConnectionType": 2, + "SlotType": 1 + } + } + ], + "m_format": "AutoComponent_RPC_NetLevelEntity: I'm a client playing some fx.\n", + "m_unresolvedString": [ + "AutoComponent_RPC_NetLevelEntity: I'm a client playing some fx.\n" + ] + } + } + }, + { + "Id": { + "id": 8318619017825 + }, + "Name": "SC-EventNode(AuthorityToClientNoParams_PlayFx Notify Event)", + "Components": { + "Component_[15772128920819427182]": { + "$type": "AzEventHandler", + "Id": 15772128920819427182, + "Slots": [ + { + "id": { + "m_id": "{2A42C379-8E3B-46EF-BC63-C1D5395CB583}" + }, + "contracts": [ + { + "$type": "SlotTypeContract" + }, + { + "$type": "ConnectionLimitContract", + "limit": 1 + }, + { + "$type": "RestrictedNodeContract", + "m_nodeId": { + "id": 7820402811489 + } + } + ], + "slotName": "Connect", + "toolTip": "Connect the AZ Event to this AZ Event Handler.", + "Descriptor": { + "ConnectionType": 1, + "SlotType": 1 + } + }, + { + "id": { + "m_id": "{3DB9829E-6088-49B9-A56D-4D1884C679BD}" + }, + "contracts": [ + { + "$type": "SlotTypeContract" + } + ], + "slotName": "Disconnect", + "toolTip": "Disconnect current AZ Event from this AZ Event Handler.", + "Descriptor": { + "ConnectionType": 1, + "SlotType": 1 + } + }, + { + "id": { + "m_id": "{9AC3CF57-B648-4B43-8FCA-8576B6EA350B}" + }, + "contracts": [ + { + "$type": "SlotTypeContract" + } + ], + "slotName": "On Connected", + "toolTip": "Signaled when a connection has taken place.", + "Descriptor": { + "ConnectionType": 2, + "SlotType": 1 + } + }, + { + "id": { + "m_id": "{5FB8D529-6FC6-4543-99B5-5B147EBD7BE6}" + }, + "contracts": [ + { + "$type": "SlotTypeContract" + } + ], + "slotName": "On Disconnected", + "toolTip": "Signaled when this event handler is disconnected.", + "Descriptor": { + "ConnectionType": 2, + "SlotType": 1 + } + }, + { + "id": { + "m_id": "{0481BBFE-D31E-421F-A6C2-8A7AF3012545}" + }, + "contracts": [ + { + "$type": "SlotTypeContract" + } + ], + "slotName": "OnEvent", + "toolTip": "Triggered when the AZ Event invokes Signal() function.", + "Descriptor": { + "ConnectionType": 2, + "SlotType": 1 + }, + "IsLatent": true + }, + { + "id": { + "m_id": "{5F809F1C-ED4E-4391-9E33-AD3B64561A40}" + }, + "contracts": [ + { + "$type": "SlotTypeContract" + }, + { + "$type": "ConnectionLimitContract", + "limit": 1 + }, + { + "$type": "RestrictedNodeContract", + "m_nodeId": { + "id": 7820402811489 + } + } + ], + "slotName": "AuthorityToClientNoParams_PlayFx Notify Event", + "Descriptor": { + "ConnectionType": 1, + "SlotType": 2 + }, + "DataType": 1 + } + ], + "Datums": [ + { + "scriptCanvasType": { + "m_type": 4, + "m_azType": "{F429F985-AF00-529B-8449-16E56694E5F9}" + }, + "isNullPointer": true, + "label": "AuthorityToClientNoParams_PlayFx Notify Event" + } + ], + "m_azEventEntry": { + "m_eventName": "AuthorityToClientNoParams_PlayFx Notify Event", + "m_eventSlotId": { + "m_id": "{5F809F1C-ED4E-4391-9E33-AD3B64561A40}" + } + } + } + } + }, + { + "Id": { + "id": 56991021999544 + }, + "Name": "SC-Node(Print)", + "Components": { + "Component_[15785913678997669879]": { + "$type": "Print", + "Id": 15785913678997669879, + "Slots": [ + { + "id": { + "m_id": "{8E1B9705-148A-42E4-831E-D7B2877358E3}" + }, + "contracts": [ + { + "$type": "SlotTypeContract" + } + ], + "slotName": "In", + "toolTip": "Input signal", + "Descriptor": { + "ConnectionType": 1, + "SlotType": 1 + } + }, + { + "id": { + "m_id": "{CEBD2B9C-7DBA-486A-88DB-19F9C406B18E}" + }, + "DynamicTypeOverride": 3, + "contracts": [ + { + "$type": "SlotTypeContract" + } + ], + "slotName": "Value", + "toolTip": "Value which replaces instances of {Value} in the resulting string.", + "DisplayDataType": { + "m_type": 5 + }, + "DisplayGroup": { + "Value": 1015031923 + }, + "Descriptor": { + "ConnectionType": 1, + "SlotType": 2 + }, + "DataType": 1 + }, + { + "id": { + "m_id": "{E9B979F9-D682-4B58-8E88-6102387FE70B}" + }, + "contracts": [ + { + "$type": "SlotTypeContract" + } + ], + "slotName": "Out", + "Descriptor": { + "ConnectionType": 2, + "SlotType": 1 + } + } + ], + "Datums": [ + { + "scriptCanvasType": { + "m_type": 5 + }, + "isNullPointer": false, + "$type": "{03AAAB3F-5C47-5A66-9EBC-D5FA4DB353C9} AZStd::string", + "value": "", + "label": "Value" + } + ], + "m_format": "AutoComponent_RPC_NetLevelEntity Activated on entity: {Value}\n", + "m_arrayBindingMap": [ + { + "Key": 1, + "Value": { + "m_id": "{CEBD2B9C-7DBA-486A-88DB-19F9C406B18E}" + } + } + ], + "m_unresolvedString": [ + "AutoComponent_RPC_NetLevelEntity Activated on entity: ", + {}, + "\n" + ], + "m_formatSlotMap": { + "Value": { + "m_id": "{CEBD2B9C-7DBA-486A-88DB-19F9C406B18E}" + } + } + } + } + }, + { + "Id": { + "id": 57025381737912 + }, + "Name": "SC-Node(Start)", + "Components": { + "Component_[1888047318201703857]": { + "$type": "Start", + "Id": 1888047318201703857, + "Slots": [ + { + "id": { + "m_id": "{28664064-2483-465A-9BB1-4E1890048CDF}" + }, + "contracts": [ + { + "$type": "SlotTypeContract" + } + ], + "slotName": "Out", + "toolTip": "Signaled when the entity that owns this graph is fully activated.", + "Descriptor": { + "ConnectionType": 2, + "SlotType": 1 + } + } + ] + } + } + }, + { + "Id": { + "id": 8310662318335 + }, + "Name": "SC-Node(GetEntityName)", + "Components": { + "Component_[2232030369305027010]": { + "$type": "{E42861BD-1956-45AE-8DD7-CCFC1E3E5ACF} Method", + "Id": 2232030369305027010, + "Slots": [ + { + "id": { + "m_id": "{F69C5762-0CAB-4A54-9C81-C99CDB73C834}" + }, + "contracts": [ + { + "$type": "SlotTypeContract" + } + ], + "slotName": "EntityId: 0", + "Descriptor": { + "ConnectionType": 1, + "SlotType": 2 + }, + "DataType": 1 + }, + { + "id": { + "m_id": "{03554C56-8237-4C19-B9F8-87DEA1AC3ED0}" + }, + "contracts": [ + { + "$type": "SlotTypeContract" + } + ], + "slotName": "In", + "Descriptor": { + "ConnectionType": 1, + "SlotType": 1 + } + }, + { + "id": { + "m_id": "{6ECBD749-25FE-4813-B34E-EF46BC09E616}" + }, + "contracts": [ + { + "$type": "SlotTypeContract" + } + ], + "slotName": "Out", + "Descriptor": { + "ConnectionType": 2, + "SlotType": 1 + } + }, + { + "id": { + "m_id": "{36D47097-8F0C-4CBD-8DE2-32F4754C569F}" + }, + "contracts": [ + { + "$type": "SlotTypeContract" + } + ], + "slotName": "String", + "DisplayDataType": { + "m_type": 5 + }, + "Descriptor": { + "ConnectionType": 2, + "SlotType": 2 + }, + "DataType": 1 + } + ], + "Datums": [ + { + "scriptCanvasType": { + "m_type": 1 + }, + "isNullPointer": false, + "$type": "EntityId", + "value": { + "id": 2901262558 + }, + "label": "Entity Id" + } + ], + "methodType": 0, + "methodName": "GetEntityName", + "className": "GameEntityContextRequestBus", + "resultSlotIDs": [ + {} + ], + "inputSlots": [ + { + "m_id": "{F69C5762-0CAB-4A54-9C81-C99CDB73C834}" + } + ], + "prettyClassName": "GameEntityContextRequestBus" + } + } + }, + { + "Id": { + "id": 8400576252253 + }, + "Name": "SC-Node(AuthorityToClientNoParams_PlayFxByEntityId)", + "Components": { + "Component_[6332803108634970671]": { + "$type": "{E42861BD-1956-45AE-8DD7-CCFC1E3E5ACF} Method", + "Id": 6332803108634970671, + "Slots": [ + { + "id": { + "m_id": "{87B7266B-D7B1-4CAD-9898-4D7F0274DAB0}" + }, + "contracts": [ + { + "$type": "SlotTypeContract" + } + ], + "slotName": "Source", + "toolTip": "The Source containing the NetworkTestPlayerComponentController", + "Descriptor": { + "ConnectionType": 1, + "SlotType": 2 + }, + "DataType": 1 + }, + { + "id": { + "m_id": "{AB0D7C00-A334-449A-AC56-EA3167AB8900}" + }, + "contracts": [ + { + "$type": "SlotTypeContract" + } + ], + "slotName": "In", + "Descriptor": { + "ConnectionType": 1, + "SlotType": 1 + } + }, + { + "id": { + "m_id": "{A52302D6-9DF9-45C2-960D-19BF90A4A931}" + }, + "contracts": [ + { + "$type": "SlotTypeContract" + } + ], + "slotName": "Out", + "Descriptor": { + "ConnectionType": 2, + "SlotType": 1 + } + } + ], + "Datums": [ + { + "scriptCanvasType": { + "m_type": 1 + }, + "isNullPointer": false, + "$type": "EntityId", + "value": { + "id": 2901262558 + }, + "label": "Source" + } + ], + "methodType": 2, + "methodName": "AuthorityToClientNoParams_PlayFxByEntityId", + "className": "NetworkTestPlayerComponent", + "resultSlotIDs": [ + {} + ], + "inputSlots": [ + { + "m_id": "{87B7266B-D7B1-4CAD-9898-4D7F0274DAB0}" + } + ], + "prettyClassName": "NetworkTestPlayerComponent" + } + } + }, + { + "Id": { + "id": 57012496836024 + }, + "Name": "SC-Node(TimeDelayNodeableNode)", + "Components": { + "Component_[8951348653904382148]": { + "$type": "TimeDelayNodeableNode", + "Id": 8951348653904382148, + "Slots": [ + { + "id": { + "m_id": "{EA0DF0AE-2FF7-4670-8D99-7CF863038E68}" + }, + "contracts": [ + { + "$type": "SlotTypeContract" + } + ], + "slotName": "Start", + "DisplayGroup": { + "Value": 2675529103 + }, + "Descriptor": { + "ConnectionType": 1, + "SlotType": 1 + } + }, + { + "id": { + "m_id": "{9C6D8500-B49B-4407-B2EB-40B1CD4CE762}" + }, + "contracts": [ + { + "$type": "SlotTypeContract" + } + ], + "slotName": "Delay", + "toolTip": "The amount of time to delay before the Done is signalled.", + "DisplayGroup": { + "Value": 2675529103 + }, + "Descriptor": { + "ConnectionType": 1, + "SlotType": 2 + }, + "DataType": 1 + }, + { + "id": { + "m_id": "{FE2A3D2F-7AC2-431D-B80C-C363DB475919}" + }, + "contracts": [ + { + "$type": "SlotTypeContract" + } + ], + "slotName": "On Start", + "DisplayGroup": { + "Value": 2675529103 + }, + "Descriptor": { + "ConnectionType": 2, + "SlotType": 1 + } + }, + { + "id": { + "m_id": "{158B30BE-BD39-40AE-A8A8-F0E5694F0180}" + }, + "contracts": [ + { + "$type": "SlotTypeContract" + } + ], + "slotName": "Done", + "toolTip": "Signaled after waiting for the specified amount of times.", + "DisplayGroup": { + "Value": 271442091 + }, + "Descriptor": { + "ConnectionType": 2, + "SlotType": 1 + }, + "IsLatent": true + } + ], + "Datums": [ + { + "scriptCanvasType": { + "m_type": 3 + }, + "isNullPointer": false, + "$type": "double", + "value": 1.0, + "label": "Delay" + } + ], + "nodeable": { + "m_timeUnits": 2 + }, + "slotExecutionMap": { + "ins": [ + { + "_slotId": { + "m_id": "{EA0DF0AE-2FF7-4670-8D99-7CF863038E68}" + }, + "_inputs": [ + { + "_slotId": { + "m_id": "{9C6D8500-B49B-4407-B2EB-40B1CD4CE762}" + } + } + ], + "_outs": [ + { + "_slotId": { + "m_id": "{FE2A3D2F-7AC2-431D-B80C-C363DB475919}" + }, + "_name": "On Start", + "_interfaceSourceId": "{4C400000-7C02-0000-B86E-0FACE0000000}" + } + ], + "_interfaceSourceId": "{24000000-0000-0000-0000-F421FC7F0000}" + } + ], + "latents": [ + { + "_slotId": { + "m_id": "{158B30BE-BD39-40AE-A8A8-F0E5694F0180}" + }, + "_name": "Done", + "_interfaceSourceId": "{24000000-0000-0000-0000-F421FC7F0000}" + } + ] + } + } + } + }, + { + "Id": { + "id": 7820402811489 + }, + "Name": "SC-Node(GetAuthorityToClientNoParams_PlayFxEventByEntityId)", + "Components": { + "Component_[9263945554457190064]": { + "$type": "{E42861BD-1956-45AE-8DD7-CCFC1E3E5ACF} Method", + "Id": 9263945554457190064, + "Slots": [ + { + "id": { + "m_id": "{F22A7438-E72F-4757-90D9-99F03C91E10D}" + }, + "contracts": [ + { + "$type": "SlotTypeContract" + } + ], + "slotName": "EntityId: 0", + "Descriptor": { + "ConnectionType": 1, + "SlotType": 2 + }, + "DataType": 1 + }, + { + "id": { + "m_id": "{510F56FD-6778-4DB8-BDDE-258335431CC6}" + }, + "contracts": [ + { + "$type": "SlotTypeContract" + } + ], + "slotName": "In", + "Descriptor": { + "ConnectionType": 1, + "SlotType": 1 + } + }, + { + "id": { + "m_id": "{94C2AF04-6BFA-4E5A-9490-C7479A7AF61E}" + }, + "contracts": [ + { + "$type": "SlotTypeContract" + } + ], + "slotName": "Out", + "Descriptor": { + "ConnectionType": 2, + "SlotType": 1 + } + }, + { + "id": { + "m_id": "{9C6DDF96-6BF0-45ED-B15F-2E6C2FF5F886}" + }, + "contracts": [ + { + "$type": "SlotTypeContract" + } + ], + "slotName": "Event<>", + "DisplayDataType": { + "m_type": 4, + "m_azType": "{F429F985-AF00-529B-8449-16E56694E5F9}" + }, + "Descriptor": { + "ConnectionType": 2, + "SlotType": 2 + }, + "DataType": 1 + } + ], + "Datums": [ + { + "scriptCanvasType": { + "m_type": 1 + }, + "isNullPointer": false, + "$type": "EntityId", + "value": { + "id": 2901262558 + }, + "label": "EntityId: 0" + } + ], + "methodType": 2, + "methodName": "GetAuthorityToClientNoParams_PlayFxEventByEntityId", + "className": "NetworkTestPlayerComponent", + "resultSlotIDs": [ + {} + ], + "inputSlots": [ + { + "m_id": "{F22A7438-E72F-4757-90D9-99F03C91E10D}" + } + ], + "prettyClassName": "NetworkTestPlayerComponent" + } + } + } + ], + "m_connections": [ + { + "Id": { + "id": 57029676705208 + }, + "Name": "srcEndpoint=(On Graph Start: Out), destEndpoint=(TimeDelay: Start)", + "Components": { + "Component_[5204535376548158590]": { + "$type": "{64CA5016-E803-4AC4-9A36-BDA2C890C6EB} Connection", + "Id": 5204535376548158590, + "sourceEndpoint": { + "nodeId": { + "id": 57025381737912 + }, + "slotId": { + "m_id": "{28664064-2483-465A-9BB1-4E1890048CDF}" + } + }, + "targetEndpoint": { + "nodeId": { + "id": 57012496836024 + }, + "slotId": { + "m_id": "{EA0DF0AE-2FF7-4670-8D99-7CF863038E68}" + } + } + } + } + }, + { + "Id": { + "id": 57055446508984 + }, + "Name": "srcEndpoint=(TimeDelay: Done), destEndpoint=(Repeater: Start)", + "Components": { + "Component_[6292481678297438578]": { + "$type": "{64CA5016-E803-4AC4-9A36-BDA2C890C6EB} Connection", + "Id": 6292481678297438578, + "sourceEndpoint": { + "nodeId": { + "id": 57012496836024 + }, + "slotId": { + "m_id": "{158B30BE-BD39-40AE-A8A8-F0E5694F0180}" + } + }, + "targetEndpoint": { + "nodeId": { + "id": 56986727032248 + }, + "slotId": { + "m_id": "{07267CBA-B377-4B57-8A04-E322F8BFC07F}" + } + } + } + } + }, + { + "Id": { + "id": 9392713697629 + }, + "Name": "srcEndpoint=(Repeater: Action), destEndpoint=(AuthorityToClientNoParams_PlayFxByEntityId: In)", + "Components": { + "Component_[17811480012084226596]": { + "$type": "{64CA5016-E803-4AC4-9A36-BDA2C890C6EB} Connection", + "Id": 17811480012084226596, + "sourceEndpoint": { + "nodeId": { + "id": 56986727032248 + }, + "slotId": { + "m_id": "{C1CCBA7B-A13B-4FCE-99ED-8FD1A8F72869}" + } + }, + "targetEndpoint": { + "nodeId": { + "id": 8400576252253 + }, + "slotId": { + "m_id": "{AB0D7C00-A334-449A-AC56-EA3167AB8900}" + } + } + } + } + }, + { + "Id": { + "id": 10269167405311 + }, + "Name": "srcEndpoint=(GetEntityName: String), destEndpoint=(Print: Value)", + "Components": { + "Component_[11931728297561282182]": { + "$type": "{64CA5016-E803-4AC4-9A36-BDA2C890C6EB} Connection", + "Id": 11931728297561282182, + "sourceEndpoint": { + "nodeId": { + "id": 8310662318335 + }, + "slotId": { + "m_id": "{36D47097-8F0C-4CBD-8DE2-32F4754C569F}" + } + }, + "targetEndpoint": { + "nodeId": { + "id": 56991021999544 + }, + "slotId": { + "m_id": "{CEBD2B9C-7DBA-486A-88DB-19F9C406B18E}" + } + } + } + } + }, + { + "Id": { + "id": 11042261518591 + }, + "Name": "srcEndpoint=(GetEntityName: Out), destEndpoint=(Print: In)", + "Components": { + "Component_[5559381044656171146]": { + "$type": "{64CA5016-E803-4AC4-9A36-BDA2C890C6EB} Connection", + "Id": 5559381044656171146, + "sourceEndpoint": { + "nodeId": { + "id": 8310662318335 + }, + "slotId": { + "m_id": "{6ECBD749-25FE-4813-B34E-EF46BC09E616}" + } + }, + "targetEndpoint": { + "nodeId": { + "id": 56991021999544 + }, + "slotId": { + "m_id": "{8E1B9705-148A-42E4-831E-D7B2877358E3}" + } + } + } + } + }, + { + "Id": { + "id": 36365388695807 + }, + "Name": "srcEndpoint=(TimeDelay: Done), destEndpoint=(GetEntityName: In)", + "Components": { + "Component_[5574600651313925988]": { + "$type": "{64CA5016-E803-4AC4-9A36-BDA2C890C6EB} Connection", + "Id": 5574600651313925988, + "sourceEndpoint": { + "nodeId": { + "id": 57012496836024 + }, + "slotId": { + "m_id": "{158B30BE-BD39-40AE-A8A8-F0E5694F0180}" + } + }, + "targetEndpoint": { + "nodeId": { + "id": 8310662318335 + }, + "slotId": { + "m_id": "{03554C56-8237-4C19-B9F8-87DEA1AC3ED0}" + } + } + } + } + }, + { + "Id": { + "id": 9022993654369 + }, + "Name": "srcEndpoint=(GetAuthorityToClientNoParams_PlayFxEventByEntityId: Event<>), destEndpoint=(AuthorityToClientNoParams_PlayFx Notify Event: AuthorityToClientNoParams_PlayFx Notify Event)", + "Components": { + "Component_[4910818715692868417]": { + "$type": "{64CA5016-E803-4AC4-9A36-BDA2C890C6EB} Connection", + "Id": 4910818715692868417, + "sourceEndpoint": { + "nodeId": { + "id": 7820402811489 + }, + "slotId": { + "m_id": "{9C6DDF96-6BF0-45ED-B15F-2E6C2FF5F886}" + } + }, + "targetEndpoint": { + "nodeId": { + "id": 8318619017825 + }, + "slotId": { + "m_id": "{5F809F1C-ED4E-4391-9E33-AD3B64561A40}" + } + } + } + } + }, + { + "Id": { + "id": 9078828229217 + }, + "Name": "srcEndpoint=(GetAuthorityToClientNoParams_PlayFxEventByEntityId: Out), destEndpoint=(AuthorityToClientNoParams_PlayFx Notify Event: Connect)", + "Components": { + "Component_[16758724763058723803]": { + "$type": "{64CA5016-E803-4AC4-9A36-BDA2C890C6EB} Connection", + "Id": 16758724763058723803, + "sourceEndpoint": { + "nodeId": { + "id": 7820402811489 + }, + "slotId": { + "m_id": "{94C2AF04-6BFA-4E5A-9490-C7479A7AF61E}" + } + }, + "targetEndpoint": { + "nodeId": { + "id": 8318619017825 + }, + "slotId": { + "m_id": "{2A42C379-8E3B-46EF-BC63-C1D5395CB583}" + } + } + } + } + }, + { + "Id": { + "id": 9808972669537 + }, + "Name": "srcEndpoint=(TimeDelay: Done), destEndpoint=(GetAuthorityToClientNoParams_PlayFxEventByEntityId: In)", + "Components": { + "Component_[597205010205160938]": { + "$type": "{64CA5016-E803-4AC4-9A36-BDA2C890C6EB} Connection", + "Id": 597205010205160938, + "sourceEndpoint": { + "nodeId": { + "id": 57012496836024 + }, + "slotId": { + "m_id": "{158B30BE-BD39-40AE-A8A8-F0E5694F0180}" + } + }, + "targetEndpoint": { + "nodeId": { + "id": 7820402811489 + }, + "slotId": { + "m_id": "{510F56FD-6778-4DB8-BDDE-258335431CC6}" + } + } + } + } + }, + { + "Id": { + "id": 10148275085921 + }, + "Name": "srcEndpoint=(AuthorityToClientNoParams_PlayFx Notify Event: OnEvent), destEndpoint=(Print: In)", + "Components": { + "Component_[1594149632687531010]": { + "$type": "{64CA5016-E803-4AC4-9A36-BDA2C890C6EB} Connection", + "Id": 1594149632687531010, + "sourceEndpoint": { + "nodeId": { + "id": 8318619017825 + }, + "slotId": { + "m_id": "{0481BBFE-D31E-421F-A6C2-8A7AF3012545}" + } + }, + "targetEndpoint": { + "nodeId": { + "id": 56995316966840 + }, + "slotId": { + "m_id": "{7CAD6E31-6218-4326-8FFB-0523F545E250}" + } + } + } + } + }, + { + "Id": { + "id": 10629311423073 + }, + "Name": "srcEndpoint=(AuthorityToClientNoParams_PlayFx Notify Event: OnEvent), destEndpoint=(DrawTextOnEntity: In)", + "Components": { + "Component_[17976200298405988971]": { + "$type": "{64CA5016-E803-4AC4-9A36-BDA2C890C6EB} Connection", + "Id": 17976200298405988971, + "sourceEndpoint": { + "nodeId": { + "id": 8318619017825 + }, + "slotId": { + "m_id": "{0481BBFE-D31E-421F-A6C2-8A7AF3012545}" + } + }, + "targetEndpoint": { + "nodeId": { + "id": 57003906901432 + }, + "slotId": { + "m_id": "{1673B8A0-D4EC-4CC7-8F80-0419BB5560EB}" + } + } + } + } + }, + { + "Id": { + "id": 42045766425613 + }, + "Name": "srcEndpoint=(Repeater: Action), destEndpoint=(Print: In)", + "Components": { + "Component_[1911118463107071864]": { + "$type": "{64CA5016-E803-4AC4-9A36-BDA2C890C6EB} Connection", + "Id": 1911118463107071864, + "sourceEndpoint": { + "nodeId": { + "id": 56986727032248 + }, + "slotId": { + "m_id": "{C1CCBA7B-A13B-4FCE-99ED-8FD1A8F72869}" + } + }, + "targetEndpoint": { + "nodeId": { + "id": 56999611934136 + }, + "slotId": { + "m_id": "{2F11CF04-DC4B-4881-8D74-AB0E51B4A278}" + } + } + } + } + } + ] + }, + "m_assetType": "{3E2AC8CD-713F-453E-967F-29517F331784}", + "versionData": { + "_grammarVersion": 1, + "_runtimeVersion": 1, + "_fileVersion": 1 + }, + "GraphCanvasData": [ + { + "Key": { + "id": 7820402811489 + }, + "Value": { + "ComponentData": { + "{24CB38BB-1705-4EC5-8F63-B574571B4DCD}": { + "$type": "NodeSaveData" + }, + "{328FF15C-C302-458F-A43D-E1794DE0904E}": { + "$type": "GeneralNodeTitleComponentSaveData", + "PaletteOverride": "MethodNodeTitlePalette" + }, + "{7CC444B1-F9B3-41B5-841B-0C4F2179F111}": { + "$type": "GeometrySaveData", + "Position": [ + -100.0, + 400.0 + ] + }, + "{B0B99C8A-03AF-4CF6-A926-F65C874C3D97}": { + "$type": "StylingComponentSaveData", + "SubStyle": ".method" + }, + "{B1F49A35-8408-40DA-B79E-F1E3B64322CE}": { + "$type": "PersistentIdComponentSaveData", + "PersistentId": "{F35F8202-B5EE-4ADD-9FF6-AF214A094266}" + } + } + } + }, + { + "Key": { + "id": 8310662318335 + }, + "Value": { + "ComponentData": { + "{24CB38BB-1705-4EC5-8F63-B574571B4DCD}": { + "$type": "NodeSaveData" + }, + "{328FF15C-C302-458F-A43D-E1794DE0904E}": { + "$type": "GeneralNodeTitleComponentSaveData", + "PaletteOverride": "MethodNodeTitlePalette" + }, + "{7CC444B1-F9B3-41B5-841B-0C4F2179F111}": { + "$type": "GeometrySaveData", + "Position": [ + 80.0, + -320.0 + ] + }, + "{B0B99C8A-03AF-4CF6-A926-F65C874C3D97}": { + "$type": "StylingComponentSaveData", + "SubStyle": ".method" + }, + "{B1F49A35-8408-40DA-B79E-F1E3B64322CE}": { + "$type": "PersistentIdComponentSaveData", + "PersistentId": "{346AFC26-B2EF-4495-AA1A-347BF77CB99D}" + } + } + } + }, + { + "Key": { + "id": 8318619017825 + }, + "Value": { + "ComponentData": { + "{24CB38BB-1705-4EC5-8F63-B574571B4DCD}": { + "$type": "NodeSaveData" + }, + "{328FF15C-C302-458F-A43D-E1794DE0904E}": { + "$type": "GeneralNodeTitleComponentSaveData", + "PaletteOverride": "HandlerNodeTitlePalette" + }, + "{7CC444B1-F9B3-41B5-841B-0C4F2179F111}": { + "$type": "GeometrySaveData", + "Position": [ + 340.0, + 400.0 + ] + }, + "{B0B99C8A-03AF-4CF6-A926-F65C874C3D97}": { + "$type": "StylingComponentSaveData", + "SubStyle": ".azeventhandler" + }, + "{B1F49A35-8408-40DA-B79E-F1E3B64322CE}": { + "$type": "PersistentIdComponentSaveData", + "PersistentId": "{67499699-CA73-48B4-87E0-C66F4A3EA7CB}" + } + } + } + }, + { + "Key": { + "id": 8400576252253 + }, + "Value": { + "ComponentData": { + "{24CB38BB-1705-4EC5-8F63-B574571B4DCD}": { + "$type": "NodeSaveData" + }, + "{328FF15C-C302-458F-A43D-E1794DE0904E}": { + "$type": "GeneralNodeTitleComponentSaveData", + "PaletteOverride": "MethodNodeTitlePalette" + }, + "{7CC444B1-F9B3-41B5-841B-0C4F2179F111}": { + "$type": "GeometrySaveData", + "Position": [ + 420.0, + -60.0 + ] + }, + "{B0B99C8A-03AF-4CF6-A926-F65C874C3D97}": { + "$type": "StylingComponentSaveData", + "SubStyle": ".method" + }, + "{B1F49A35-8408-40DA-B79E-F1E3B64322CE}": { + "$type": "PersistentIdComponentSaveData", + "PersistentId": "{2B6329F7-4CE7-4E01-B1A4-1FFCAB2D0B72}" + } + } + } + }, + { + "Key": { + "id": 56986727032248 + }, + "Value": { + "ComponentData": { + "{24CB38BB-1705-4EC5-8F63-B574571B4DCD}": { + "$type": "NodeSaveData" + }, + "{328FF15C-C302-458F-A43D-E1794DE0904E}": { + "$type": "GeneralNodeTitleComponentSaveData", + "PaletteOverride": "DefaultNodeTitlePalette" + }, + "{7CC444B1-F9B3-41B5-841B-0C4F2179F111}": { + "$type": "GeometrySaveData", + "Position": [ + 80.0, + -60.0 + ] + }, + "{B0B99C8A-03AF-4CF6-A926-F65C874C3D97}": { + "$type": "StylingComponentSaveData" + }, + "{B1F49A35-8408-40DA-B79E-F1E3B64322CE}": { + "$type": "PersistentIdComponentSaveData", + "PersistentId": "{41B7477C-D5B9-49AC-AFA3-AAAE2A6ED7C5}" + } + } + } + }, + { + "Key": { + "id": 56991021999544 + }, + "Value": { + "ComponentData": { + "{24CB38BB-1705-4EC5-8F63-B574571B4DCD}": { + "$type": "NodeSaveData" + }, + "{328FF15C-C302-458F-A43D-E1794DE0904E}": { + "$type": "GeneralNodeTitleComponentSaveData", + "PaletteOverride": "StringNodeTitlePalette" + }, + "{7CC444B1-F9B3-41B5-841B-0C4F2179F111}": { + "$type": "GeometrySaveData", + "Position": [ + 540.0, + -320.0 + ] + }, + "{B0B99C8A-03AF-4CF6-A926-F65C874C3D97}": { + "$type": "StylingComponentSaveData" + }, + "{B1F49A35-8408-40DA-B79E-F1E3B64322CE}": { + "$type": "PersistentIdComponentSaveData", + "PersistentId": "{0CF0846C-1D21-4B33-8723-1538FD4FD04A}" + } + } + } + }, + { + "Key": { + "id": 56995316966840 + }, + "Value": { + "ComponentData": { + "{24CB38BB-1705-4EC5-8F63-B574571B4DCD}": { + "$type": "NodeSaveData" + }, + "{328FF15C-C302-458F-A43D-E1794DE0904E}": { + "$type": "GeneralNodeTitleComponentSaveData", + "PaletteOverride": "StringNodeTitlePalette" + }, + "{7CC444B1-F9B3-41B5-841B-0C4F2179F111}": { + "$type": "GeometrySaveData", + "Position": [ + 800.0, + 260.0 + ] + }, + "{B0B99C8A-03AF-4CF6-A926-F65C874C3D97}": { + "$type": "StylingComponentSaveData" + }, + "{B1F49A35-8408-40DA-B79E-F1E3B64322CE}": { + "$type": "PersistentIdComponentSaveData", + "PersistentId": "{0D04EBA6-E1E7-4DF7-BAA9-CC87F4689CD2}" + } + } + } + }, + { + "Key": { + "id": 56999611934136 + }, + "Value": { + "ComponentData": { + "{24CB38BB-1705-4EC5-8F63-B574571B4DCD}": { + "$type": "NodeSaveData" + }, + "{328FF15C-C302-458F-A43D-E1794DE0904E}": { + "$type": "GeneralNodeTitleComponentSaveData", + "PaletteOverride": "StringNodeTitlePalette" + }, + "{7CC444B1-F9B3-41B5-841B-0C4F2179F111}": { + "$type": "GeometrySaveData", + "Position": [ + 420.0, + 100.0 + ] + }, + "{B0B99C8A-03AF-4CF6-A926-F65C874C3D97}": { + "$type": "StylingComponentSaveData" + }, + "{B1F49A35-8408-40DA-B79E-F1E3B64322CE}": { + "$type": "PersistentIdComponentSaveData", + "PersistentId": "{A4FDCB87-B021-48B9-ABCB-AECA986B33D6}" + } + } + } + }, + { + "Key": { + "id": 57003906901432 + }, + "Value": { + "ComponentData": { + "{24CB38BB-1705-4EC5-8F63-B574571B4DCD}": { + "$type": "NodeSaveData" + }, + "{328FF15C-C302-458F-A43D-E1794DE0904E}": { + "$type": "GeneralNodeTitleComponentSaveData", + "PaletteOverride": "MethodNodeTitlePalette" + }, + "{7CC444B1-F9B3-41B5-841B-0C4F2179F111}": { + "$type": "GeometrySaveData", + "Position": [ + 800.0, + 460.0 + ] + }, + "{B0B99C8A-03AF-4CF6-A926-F65C874C3D97}": { + "$type": "StylingComponentSaveData", + "SubStyle": ".method" + }, + "{B1F49A35-8408-40DA-B79E-F1E3B64322CE}": { + "$type": "PersistentIdComponentSaveData", + "PersistentId": "{82D0ED1B-98D3-4AEF-B1DA-2F27CACD3A4D}" + } + } + } + }, + { + "Key": { + "id": 57012496836024 + }, + "Value": { + "ComponentData": { + "{24CB38BB-1705-4EC5-8F63-B574571B4DCD}": { + "$type": "NodeSaveData" + }, + "{328FF15C-C302-458F-A43D-E1794DE0904E}": { + "$type": "GeneralNodeTitleComponentSaveData", + "PaletteOverride": "DefaultNodeTitlePalette" + }, + "{7CC444B1-F9B3-41B5-841B-0C4F2179F111}": { + "$type": "GeometrySaveData", + "Position": [ + -220.0, + -40.0 + ] + }, + "{B0B99C8A-03AF-4CF6-A926-F65C874C3D97}": { + "$type": "StylingComponentSaveData" + }, + "{B1F49A35-8408-40DA-B79E-F1E3B64322CE}": { + "$type": "PersistentIdComponentSaveData", + "PersistentId": "{D3F081D7-40C1-4C31-B298-B18C6AFDFD25}" + } + } + } + }, + { + "Key": { + "id": 57025381737912 + }, + "Value": { + "ComponentData": { + "{24CB38BB-1705-4EC5-8F63-B574571B4DCD}": { + "$type": "NodeSaveData" + }, + "{328FF15C-C302-458F-A43D-E1794DE0904E}": { + "$type": "GeneralNodeTitleComponentSaveData", + "PaletteOverride": "TimeNodeTitlePalette" + }, + "{7CC444B1-F9B3-41B5-841B-0C4F2179F111}": { + "$type": "GeometrySaveData", + "Position": [ + -380.0, + -20.0 + ] + }, + "{B0B99C8A-03AF-4CF6-A926-F65C874C3D97}": { + "$type": "StylingComponentSaveData" + }, + "{B1F49A35-8408-40DA-B79E-F1E3B64322CE}": { + "$type": "PersistentIdComponentSaveData", + "PersistentId": "{675C7E90-B89E-4347-A3C6-B8D12B6EA698}" + } + } + } + }, + { + "Key": { + "id": 1685762441320719908 + }, + "Value": { + "ComponentData": { + "{5F84B500-8C45-40D1-8EFC-A5306B241444}": { + "$type": "SceneComponentSaveData", + "ViewParams": { + "AnchorX": -349.0, + "AnchorY": 10.0 + } + } + } + } + } + ], + "StatisticsHelper": { + "InstanceCounter": [ + { + "Key": 4199610336680704683, + "Value": 1 + }, + { + "Key": 4847610523576971761, + "Value": 1 + }, + { + "Key": 6462358712820489356, + "Value": 1 + }, + { + "Key": 7087687843968394353, + "Value": 1 + }, + { + "Key": 8679770052035517025, + "Value": 1 + }, + { + "Key": 10684225535275896474, + "Value": 3 + }, + { + "Key": 11983076003173356132, + "Value": 1 + }, + { + "Key": 13774516196858047560, + "Value": 1 + }, + { + "Key": 13774516226790665785, + "Value": 1 + } + ] + } + }, + "Component_[630514155173445772]": { + "$type": "EditorGraphVariableManagerComponent", + "Id": 630514155173445772 + } + } + } + } +} \ No newline at end of file diff --git a/AutomatedTesting/Levels/Multiplayer/AutoComponent_RPC/GlobalGameData.scriptcanvas b/AutomatedTesting/Levels/Multiplayer/AutoComponent_RPC/GlobalGameData.scriptcanvas new file mode 100644 index 0000000000..3ba5cc6b7d --- /dev/null +++ b/AutomatedTesting/Levels/Multiplayer/AutoComponent_RPC/GlobalGameData.scriptcanvas @@ -0,0 +1,662 @@ +{ + "Type": "JsonSerialization", + "Version": 1, + "ClassName": "ScriptCanvasData", + "ClassData": { + "m_scriptCanvas": { + "Id": { + "id": 17732469402520 + }, + "Name": "Untitled-1", + "Components": { + "Component_[16492301523567686923]": { + "$type": "{4D755CA9-AB92-462C-B24F-0B3376F19967} Graph", + "Id": 16492301523567686923, + "m_graphData": { + "m_nodes": [ + { + "Id": { + "id": 17741059337112 + }, + "Name": "SC-Node(OperatorAdd)", + "Components": { + "Component_[11612963594766700030]": { + "$type": "OperatorAdd", + "Id": 11612963594766700030, + "Slots": [ + { + "id": { + "m_id": "{B7529112-C29F-45F0-811C-DB8EE18EB8B8}" + }, + "contracts": [ + { + "$type": "SlotTypeContract" + } + ], + "slotName": "In", + "Descriptor": { + "ConnectionType": 1, + "SlotType": 1 + } + }, + { + "id": { + "m_id": "{49618851-F6B2-4B90-BFDF-ADBAAA84BBA4}" + }, + "contracts": [ + { + "$type": "SlotTypeContract" + } + ], + "slotName": "Out", + "Descriptor": { + "ConnectionType": 2, + "SlotType": 1 + } + }, + { + "id": { + "m_id": "{4612C904-82DF-4B48-8485-4C878AF9A4D1}" + }, + "DynamicTypeOverride": 3, + "contracts": [ + { + "$type": "SlotTypeContract" + }, + { + "$type": "MathOperatorContract", + "NativeTypes": [ + { + "m_type": 3 + }, + { + "m_type": 6 + }, + { + "m_type": 8 + }, + { + "m_type": 9 + }, + { + "m_type": 10 + }, + { + "m_type": 11 + }, + { + "m_type": 12 + }, + { + "m_type": 14 + }, + { + "m_type": 15 + } + ] + } + ], + "slotName": "Number", + "toolTip": "An operand to use in performing the specified Operation", + "DisplayDataType": { + "m_type": 3 + }, + "DisplayGroup": { + "Value": 1114760223 + }, + "Descriptor": { + "ConnectionType": 1, + "SlotType": 2 + }, + "DynamicGroup": { + "Value": 1114760223 + }, + "DataType": 1, + "IsReference": true, + "VariableReference": { + "m_id": "{8451E795-6A0E-44CE-81FD-AEF0EE5B0400}" + } + }, + { + "id": { + "m_id": "{610B3BFB-9043-47A0-9694-5F14A1947E36}" + }, + "DynamicTypeOverride": 3, + "contracts": [ + { + "$type": "SlotTypeContract" + }, + { + "$type": "MathOperatorContract", + "NativeTypes": [ + { + "m_type": 3 + }, + { + "m_type": 6 + }, + { + "m_type": 8 + }, + { + "m_type": 9 + }, + { + "m_type": 10 + }, + { + "m_type": 11 + }, + { + "m_type": 12 + }, + { + "m_type": 14 + }, + { + "m_type": 15 + } + ] + } + ], + "slotName": "Number", + "toolTip": "An operand to use in performing the specified Operation", + "DisplayDataType": { + "m_type": 3 + }, + "DisplayGroup": { + "Value": 1114760223 + }, + "Descriptor": { + "ConnectionType": 1, + "SlotType": 2 + }, + "DynamicGroup": { + "Value": 1114760223 + }, + "DataType": 1 + }, + { + "id": { + "m_id": "{36FFF1AB-C208-47CB-8271-436C85E0AE42}" + }, + "DynamicTypeOverride": 3, + "contracts": [ + { + "$type": "SlotTypeContract" + }, + { + "$type": "MathOperatorContract", + "NativeTypes": [ + { + "m_type": 3 + }, + { + "m_type": 6 + }, + { + "m_type": 8 + }, + { + "m_type": 9 + }, + { + "m_type": 10 + }, + { + "m_type": 11 + }, + { + "m_type": 12 + }, + { + "m_type": 14 + }, + { + "m_type": 15 + } + ] + } + ], + "slotName": "Result", + "toolTip": "The result of the specified operation", + "DisplayDataType": { + "m_type": 3 + }, + "DisplayGroup": { + "Value": 1114760223 + }, + "Descriptor": { + "ConnectionType": 2, + "SlotType": 2 + }, + "DynamicGroup": { + "Value": 1114760223 + }, + "DataType": 1, + "IsReference": true, + "VariableReference": { + "m_id": "{8451E795-6A0E-44CE-81FD-AEF0EE5B0400}" + } + } + ], + "Datums": [ + { + "isOverloadedStorage": false, + "scriptCanvasType": { + "m_type": 3 + }, + "isNullPointer": false, + "$type": "double", + "value": 0.0, + "label": "Number" + }, + { + "isOverloadedStorage": false, + "scriptCanvasType": { + "m_type": 3 + }, + "isNullPointer": false, + "$type": "double", + "value": 1.0, + "label": "Number" + } + ] + } + } + }, + { + "Id": { + "id": 17736764369816 + }, + "Name": "ReceiveScriptEvent", + "Components": { + "Component_[16408183651077237195]": { + "$type": "ReceiveScriptEvent", + "Id": 16408183651077237195, + "Slots": [ + { + "id": { + "m_id": "{8DC10581-B8DF-473C-9C75-996111DBF560}" + }, + "contracts": [ + { + "$type": "SlotTypeContract" + } + ], + "slotName": "Connect", + "toolTip": "Connect this event handler to the specified entity.", + "Descriptor": { + "ConnectionType": 1, + "SlotType": 1 + } + }, + { + "id": { + "m_id": "{E60D1951-E56D-41F8-84C5-AD0BA803DD51}" + }, + "contracts": [ + { + "$type": "SlotTypeContract" + } + ], + "slotName": "Disconnect", + "toolTip": "Disconnect this event handler.", + "Descriptor": { + "ConnectionType": 1, + "SlotType": 1 + } + }, + { + "id": { + "m_id": "{1BCE6CAC-B1C0-43FA-B4F5-E9A34D5064E5}" + }, + "contracts": [ + { + "$type": "SlotTypeContract" + } + ], + "slotName": "OnConnected", + "toolTip": "Signaled when a connection has taken place.", + "Descriptor": { + "ConnectionType": 2, + "SlotType": 1 + } + }, + { + "id": { + "m_id": "{FEB42E9A-D562-4BBD-90AB-32255124BFE8}" + }, + "contracts": [ + { + "$type": "SlotTypeContract" + } + ], + "slotName": "OnDisconnected", + "toolTip": "Signaled when this event handler is disconnected.", + "Descriptor": { + "ConnectionType": 2, + "SlotType": 1 + } + }, + { + "id": { + "m_id": "{C9EF936B-8C74-42B4-8793-67FC7FD3BCBC}" + }, + "contracts": [ + { + "$type": "SlotTypeContract" + } + ], + "slotName": "OnFailure", + "toolTip": "Signaled when it is not possible to connect this handler.", + "Descriptor": { + "ConnectionType": 2, + "SlotType": 1 + } + }, + { + "id": { + "m_id": "{76985C7A-761A-4CEF-9F55-6DD2B136317A}" + }, + "contracts": [ + { + "$type": "SlotTypeContract" + } + ], + "slotName": "ExecutionSlot:NewPlayerScriptActive", + "Descriptor": { + "ConnectionType": 2, + "SlotType": 1 + }, + "IsLatent": true + }, + { + "id": { + "m_id": "{5CD8E1E9-6192-4B7D-9C2C-6C18BE99CF44}" + }, + "contracts": [ + { + "$type": "SlotTypeContract" + } + ], + "slotName": "Number", + "Descriptor": { + "ConnectionType": 1, + "SlotType": 2 + }, + "DataType": 1, + "IsReference": true, + "VariableReference": { + "m_id": "{8451E795-6A0E-44CE-81FD-AEF0EE5B0400}" + } + }, + { + "id": { + "m_id": "{9FDB71AA-0F19-406D-82CA-508A2CA10F95}" + }, + "contracts": [ + { + "$type": "SlotTypeContract" + } + ], + "slotName": "ExecutionSlot:GetNumberOfActivePlayers", + "Descriptor": { + "ConnectionType": 2, + "SlotType": 1 + }, + "IsLatent": true + } + ], + "Datums": [ + { + "isOverloadedStorage": false, + "scriptCanvasType": { + "m_type": 3 + }, + "isNullPointer": false, + "$type": "double", + "value": 0.0, + "label": "Number" + } + ], + "m_version": 1, + "m_eventMap": [ + { + "Key": { + "Value": 242067946 + }, + "Value": { + "m_scriptEventAssetId": { + "guid": "{FE1B1992-8220-5DD3-A60A-AEC85EB91C54}" + }, + "m_eventName": "GetNumberOfActivePlayers", + "m_eventSlotId": { + "m_id": "{9FDB71AA-0F19-406D-82CA-508A2CA10F95}" + }, + "m_resultSlotId": { + "m_id": "{5CD8E1E9-6192-4B7D-9C2C-6C18BE99CF44}" + } + } + }, + { + "Key": { + "Value": 2930121176 + }, + "Value": { + "m_scriptEventAssetId": { + "guid": "{FE1B1992-8220-5DD3-A60A-AEC85EB91C54}" + }, + "m_eventName": "NewPlayerScriptActive", + "m_eventSlotId": { + "m_id": "{76985C7A-761A-4CEF-9F55-6DD2B136317A}" + } + } + } + ], + "m_eventSlotMapping": { + "{155BF981-AD70-4D29-81A6-1517FAE59FB1}": { + "m_id": "{5CD8E1E9-6192-4B7D-9C2C-6C18BE99CF44}" + }, + "{65D394D3-F90D-4F10-94BF-F5E1581CF2CF}": { + "m_id": "{76985C7A-761A-4CEF-9F55-6DD2B136317A}" + }, + "{67784749-9B41-429C-9C97-3D296182EB67}": { + "m_id": "{9FDB71AA-0F19-406D-82CA-508A2CA10F95}" + } + }, + "m_scriptEventAssetId": { + "guid": "{FE1B1992-8220-5DD3-A60A-AEC85EB91C54}" + }, + "m_asset": { + "assetId": { + "guid": "{FE1B1992-8220-5DD3-A60A-AEC85EB91C54}" + }, + "assetHint": "levels/multiplayer/autocomponent_rpc/globalgamedata.scriptevents" + } + } + } + } + ], + "m_connections": [ + { + "Id": { + "id": 17745354304408 + }, + "Name": "srcEndpoint=(Receive Script Event: ExecutionSlot:NewPlayerScriptActive), destEndpoint=(Add (+): In)", + "Components": { + "Component_[8782209668839578826]": { + "$type": "{64CA5016-E803-4AC4-9A36-BDA2C890C6EB} Connection", + "Id": 8782209668839578826, + "sourceEndpoint": { + "nodeId": { + "id": 17736764369816 + }, + "slotId": { + "m_id": "{76985C7A-761A-4CEF-9F55-6DD2B136317A}" + } + }, + "targetEndpoint": { + "nodeId": { + "id": 17741059337112 + }, + "slotId": { + "m_id": "{B7529112-C29F-45F0-811C-DB8EE18EB8B8}" + } + } + } + } + } + ], + "m_scriptEventAssets": [ + [ + { + "id": 17736764369816 + }, + {} + ] + ] + }, + "m_assetType": "{3E2AC8CD-713F-453E-967F-29517F331784}", + "versionData": { + "_grammarVersion": 1, + "_runtimeVersion": 1, + "_fileVersion": 1 + }, + "m_variableCounter": 1, + "GraphCanvasData": [ + { + "Key": { + "id": 17732469402520 + }, + "Value": { + "ComponentData": { + "{5F84B500-8C45-40D1-8EFC-A5306B241444}": { + "$type": "SceneComponentSaveData" + } + } + } + }, + { + "Key": { + "id": 17736764369816 + }, + "Value": { + "ComponentData": { + "{24CB38BB-1705-4EC5-8F63-B574571B4DCD}": { + "$type": "NodeSaveData" + }, + "{7CC444B1-F9B3-41B5-841B-0C4F2179F111}": { + "$type": "GeometrySaveData", + "Position": [ + -360.0, + -60.0 + ] + }, + "{B0B99C8A-03AF-4CF6-A926-F65C874C3D97}": { + "$type": "StylingComponentSaveData" + }, + "{B1F49A35-8408-40DA-B79E-F1E3B64322CE}": { + "$type": "PersistentIdComponentSaveData", + "PersistentId": "{C419A1CF-CBA8-416B-BF6C-4B574C3E59E3}" + }, + "{D8BBE799-7E4D-495A-B69A-1E3940670891}": { + "$type": "ScriptEventReceiverHandlerNodeDescriptorSaveData", + "EventNames": [ + [ + { + "Value": 242067946 + }, + "GetNumberOfActivePlayers" + ], + [ + { + "Value": 2930121176 + }, + "NewPlayerScriptActive" + ] + ] + } + } + } + }, + { + "Key": { + "id": 17741059337112 + }, + "Value": { + "ComponentData": { + "{24CB38BB-1705-4EC5-8F63-B574571B4DCD}": { + "$type": "NodeSaveData" + }, + "{328FF15C-C302-458F-A43D-E1794DE0904E}": { + "$type": "GeneralNodeTitleComponentSaveData", + "PaletteOverride": "MathNodeTitlePalette" + }, + "{7CC444B1-F9B3-41B5-841B-0C4F2179F111}": { + "$type": "GeometrySaveData", + "Position": [ + 120.0, + 100.0 + ] + }, + "{B0B99C8A-03AF-4CF6-A926-F65C874C3D97}": { + "$type": "StylingComponentSaveData" + }, + "{B1F49A35-8408-40DA-B79E-F1E3B64322CE}": { + "$type": "PersistentIdComponentSaveData", + "PersistentId": "{0D0751AD-8164-4196-9C09-8CDB9AAA296F}" + } + } + } + } + ], + "StatisticsHelper": { + "InstanceCounter": [ + { + "Key": 1244476766431948410, + "Value": 1 + }, + { + "Key": 1678857390775488101, + "Value": 1 + }, + { + "Key": 1678857392390856307, + "Value": 1 + } + ] + } + }, + "Component_[16498171485036643402]": { + "$type": "EditorGraphVariableManagerComponent", + "Id": 16498171485036643402, + "m_variableData": { + "m_nameVariableMap": [ + { + "Key": { + "m_id": "{8451E795-6A0E-44CE-81FD-AEF0EE5B0400}" + }, + "Value": { + "Datum": { + "isOverloadedStorage": false, + "scriptCanvasType": { + "m_type": 3 + }, + "isNullPointer": false, + "$type": "double", + "value": 0.0 + }, + "VariableId": { + "m_id": "{8451E795-6A0E-44CE-81FD-AEF0EE5B0400}" + }, + "VariableName": "ActivePlayerCount" + } + } + ] + } + } + } + } + } +} \ No newline at end of file diff --git a/AutomatedTesting/Levels/Multiplayer/AutoComponent_RPC/GlobalGameData.scriptevents b/AutomatedTesting/Levels/Multiplayer/AutoComponent_RPC/GlobalGameData.scriptevents new file mode 100644 index 0000000000..059713e14b --- /dev/null +++ b/AutomatedTesting/Levels/Multiplayer/AutoComponent_RPC/GlobalGameData.scriptevents @@ -0,0 +1,106 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/AutomatedTesting/Levels/Multiplayer/AutoComponent_RPC/Player.prefab b/AutomatedTesting/Levels/Multiplayer/AutoComponent_RPC/Player.prefab new file mode 100644 index 0000000000..2653809dda --- /dev/null +++ b/AutomatedTesting/Levels/Multiplayer/AutoComponent_RPC/Player.prefab @@ -0,0 +1,195 @@ +{ + "ContainerEntity": { + "Id": "ContainerEntity", + "Name": "Player", + "Components": { + "Component_[10603663676997462041]": { + "$type": "EditorDisabledCompositionComponent", + "Id": 10603663676997462041 + }, + "Component_[11066377844757909329]": { + "$type": "EditorPrefabComponent", + "Id": 11066377844757909329 + }, + "Component_[11664640320098005944]": { + "$type": "EditorEntityIconComponent", + "Id": 11664640320098005944 + }, + "Component_[12551690377468870725]": { + "$type": "{27F1E1A1-8D9D-4C3B-BD3A-AFB9762449C0} TransformComponent", + "Id": 12551690377468870725, + "Parent Entity": "" + }, + "Component_[16402163080075698011]": { + "$type": "EditorOnlyEntityComponent", + "Id": 16402163080075698011 + }, + "Component_[3491366785918494447]": { + "$type": "EditorLockComponent", + "Id": 3491366785918494447 + }, + "Component_[4830373679514129871]": { + "$type": "EditorVisibilityComponent", + "Id": 4830373679514129871 + }, + "Component_[5144323498211834874]": { + "$type": "SelectionComponent", + "Id": 5144323498211834874 + }, + "Component_[5267607163086533733]": { + "$type": "EditorInspectorComponent", + "Id": 5267607163086533733 + }, + "Component_[6678300504118618849]": { + "$type": "EditorPendingCompositionComponent", + "Id": 6678300504118618849 + }, + "Component_[8384628950786300469]": { + "$type": "EditorEntitySortComponent", + "Id": 8384628950786300469, + "Child Entity Order": [ + "Entity_[10070247746456]" + ] + } + } + }, + "Entities": { + "Entity_[10070247746456]": { + "Id": "Entity_[10070247746456]", + "Name": "Player", + "Components": { + "Component_[1059478843478789313]": { + "$type": "EditorInspectorComponent", + "Id": 1059478843478789313, + "ComponentOrderEntryArray": [ + { + "ComponentId": 9878555871810913249 + }, + { + "ComponentId": 11481641385923146202, + "SortIndex": 1 + }, + { + "ComponentId": 11440172471478606933, + "SortIndex": 2 + }, + { + "ComponentId": 17461691807054668218, + "SortIndex": 3 + }, + { + "ComponentId": 15530420875454157766, + "SortIndex": 4 + }, + { + "ComponentId": 10596595655489113153, + "SortIndex": 5 + } + ] + }, + "Component_[10596595655489113153]": { + "$type": "EditorScriptCanvasComponent", + "Id": 10596595655489113153, + "m_name": "AutoComponent_RPC", + "m_assetHolder": { + "m_asset": { + "assetId": { + "guid": "{5ED120C4-07DC-56F1-80A7-37BFC98FD74E}" + }, + "assetHint": "levels/multiplayer/autocomponent_rpc/autocomponent_rpc.scriptcanvas" + } + }, + "runtimeDataIsValid": true, + "runtimeDataOverrides": { + "source": { + "assetId": { + "guid": "{5ED120C4-07DC-56F1-80A7-37BFC98FD74E}" + }, + "assetHint": "levels/multiplayer/autocomponent_rpc/autocomponent_rpc.scriptcanvas" + } + } + }, + "Component_[11440172471478606933]": { + "$type": "GenericComponentWrapper", + "Id": 11440172471478606933, + "m_template": { + "$type": "Multiplayer::NetworkTransformComponent" + } + }, + "Component_[11481641385923146202]": { + "$type": "GenericComponentWrapper", + "Id": 11481641385923146202, + "m_template": { + "$type": "NetBindComponent" + } + }, + "Component_[13110996849704981748]": { + "$type": "EditorVisibilityComponent", + "Id": 13110996849704981748 + }, + "Component_[1472895075383059499]": { + "$type": "EditorLockComponent", + "Id": 1472895075383059499 + }, + "Component_[1526920553231193509]": { + "$type": "EditorPendingCompositionComponent", + "Id": 1526920553231193509 + }, + "Component_[15530420875454157766]": { + "$type": "GenericComponentWrapper", + "Id": 15530420875454157766, + "m_template": { + "$type": "Multiplayer::LocalPredictionPlayerInputComponent" + } + }, + "Component_[1699895912837266792]": { + "$type": "EditorDisabledCompositionComponent", + "Id": 1699895912837266792 + }, + "Component_[17461691807054668218]": { + "$type": "GenericComponentWrapper", + "Id": 17461691807054668218, + "m_template": { + "$type": "AutomatedTesting::NetworkTestPlayerComponent" + } + }, + "Component_[3622545398462507871]": { + "$type": "EditorOnlyEntityComponent", + "Id": 3622545398462507871 + }, + "Component_[5778259918231688598]": { + "$type": "AZ::Render::EditorMeshComponent", + "Id": 5778259918231688598, + "Controller": { + "Configuration": { + "ModelAsset": { + "assetId": { + "guid": "{F322592F-43BC-50E7-903C-CC231846093F}", + "subId": 276443623 + }, + "assetHint": "objects/_primitives/_cylinder_1x1.azmodel" + } + } + } + }, + "Component_[7004633483882343256]": { + "$type": "SelectionComponent", + "Id": 7004633483882343256 + }, + "Component_[8469628382507693850]": { + "$type": "EditorEntitySortComponent", + "Id": 8469628382507693850 + }, + "Component_[9407892837096707905]": { + "$type": "EditorEntityIconComponent", + "Id": 9407892837096707905 + }, + "Component_[9878555871810913249]": { + "$type": "{27F1E1A1-8D9D-4C3B-BD3A-AFB9762449C0} TransformComponent", + "Id": 9878555871810913249, + "Parent Entity": "ContainerEntity" + } + } + } + } +} \ No newline at end of file diff --git a/AutomatedTesting/Levels/Multiplayer/AutoComponent_RPC/tags.txt b/AutomatedTesting/Levels/Multiplayer/AutoComponent_RPC/tags.txt new file mode 100644 index 0000000000..0d6c1880e7 --- /dev/null +++ b/AutomatedTesting/Levels/Multiplayer/AutoComponent_RPC/tags.txt @@ -0,0 +1,12 @@ +0,0,0,0,0,0 +0,0,0,0,0,0 +0,0,0,0,0,0 +0,0,0,0,0,0 +0,0,0,0,0,0 +0,0,0,0,0,0 +0,0,0,0,0,0 +0,0,0,0,0,0 +0,0,0,0,0,0 +0,0,0,0,0,0 +0,0,0,0,0,0 +0,0,0,0,0,0 diff --git a/AutomatedTesting/Levels/NvCloth/NvCloth_AddClothSimulationToActor/LevelData/Environment.xml b/AutomatedTesting/Levels/NvCloth/NvCloth_AddClothSimulationToActor/LevelData/Environment.xml deleted file mode 100644 index 4ba36f66ae..0000000000 --- a/AutomatedTesting/Levels/NvCloth/NvCloth_AddClothSimulationToActor/LevelData/Environment.xml +++ /dev/null @@ -1,14 +0,0 @@ - - - - - - - - - - - - - - diff --git a/AutomatedTesting/Levels/NvCloth/NvCloth_AddClothSimulationToActor/LevelData/TerrainTexture.xml b/AutomatedTesting/Levels/NvCloth/NvCloth_AddClothSimulationToActor/LevelData/TerrainTexture.xml deleted file mode 100644 index f43df05b22..0000000000 --- a/AutomatedTesting/Levels/NvCloth/NvCloth_AddClothSimulationToActor/LevelData/TerrainTexture.xml +++ /dev/null @@ -1,7 +0,0 @@ - - - - - - - diff --git a/AutomatedTesting/Levels/NvCloth/NvCloth_AddClothSimulationToActor/LevelData/TimeOfDay.xml b/AutomatedTesting/Levels/NvCloth/NvCloth_AddClothSimulationToActor/LevelData/TimeOfDay.xml deleted file mode 100644 index 6ea168cc6b..0000000000 --- a/AutomatedTesting/Levels/NvCloth/NvCloth_AddClothSimulationToActor/LevelData/TimeOfDay.xml +++ /dev/null @@ -1,356 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/AutomatedTesting/Levels/NvCloth/NvCloth_AddClothSimulationToActor/LevelData/VegetationMap.dat b/AutomatedTesting/Levels/NvCloth/NvCloth_AddClothSimulationToActor/LevelData/VegetationMap.dat deleted file mode 100644 index dce5631cd0..0000000000 --- a/AutomatedTesting/Levels/NvCloth/NvCloth_AddClothSimulationToActor/LevelData/VegetationMap.dat +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:0e6a5435c928079b27796f6b202bbc2623e7e454244ddc099a3cadf33b7cb9e9 -size 63 diff --git a/AutomatedTesting/Levels/NvCloth/NvCloth_AddClothSimulationToActor/NvCloth_AddClothSimulationToActor.ly b/AutomatedTesting/Levels/NvCloth/NvCloth_AddClothSimulationToActor/NvCloth_AddClothSimulationToActor.ly deleted file mode 100644 index 23397bf18d..0000000000 --- a/AutomatedTesting/Levels/NvCloth/NvCloth_AddClothSimulationToActor/NvCloth_AddClothSimulationToActor.ly +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:b59cbe84cb77090d723d120597f9d11817aa67a267a7f495f8b012fdd8a9dd86 -size 5536 diff --git a/AutomatedTesting/Levels/NvCloth/NvCloth_AddClothSimulationToActor/NvCloth_AddClothSimulationToActor.prefab b/AutomatedTesting/Levels/NvCloth/NvCloth_AddClothSimulationToActor/NvCloth_AddClothSimulationToActor.prefab new file mode 100644 index 0000000000..de23da874f --- /dev/null +++ b/AutomatedTesting/Levels/NvCloth/NvCloth_AddClothSimulationToActor/NvCloth_AddClothSimulationToActor.prefab @@ -0,0 +1,387 @@ +{ + "ContainerEntity": { + "Id": "Entity_[1146574390643]", + "Name": "Level", + "Components": { + "Component_[10641544592923449938]": { + "$type": "EditorInspectorComponent", + "Id": 10641544592923449938 + }, + "Component_[12039882709170782873]": { + "$type": "EditorOnlyEntityComponent", + "Id": 12039882709170782873 + }, + "Component_[12265484671603697631]": { + "$type": "EditorPendingCompositionComponent", + "Id": 12265484671603697631 + }, + "Component_[14126657869720434043]": { + "$type": "EditorEntitySortComponent", + "Id": 14126657869720434043, + "Child Entity Order": [ + "Entity_[1176639161715]", + "Instance_[1015201222663]/ContainerEntity" + ] + }, + "Component_[15230859088967841193]": { + "$type": "{27F1E1A1-8D9D-4C3B-BD3A-AFB9762449C0} TransformComponent", + "Id": 15230859088967841193, + "Parent Entity": "" + }, + "Component_[16239496886950819870]": { + "$type": "EditorDisabledCompositionComponent", + "Id": 16239496886950819870 + }, + "Component_[5688118765544765547]": { + "$type": "EditorEntityIconComponent", + "Id": 5688118765544765547 + }, + "Component_[6545738857812235305]": { + "$type": "SelectionComponent", + "Id": 6545738857812235305 + }, + "Component_[7247035804068349658]": { + "$type": "EditorPrefabComponent", + "Id": 7247035804068349658 + }, + "Component_[9307224322037797205]": { + "$type": "EditorLockComponent", + "Id": 9307224322037797205 + }, + "Component_[9562516168917670048]": { + "$type": "EditorVisibilityComponent", + "Id": 9562516168917670048 + } + } + }, + "Entities": { + "Entity_[1155164325235]": { + "Id": "Entity_[1155164325235]", + "Name": "Sun", + "Components": { + "Component_[10440557478882592717]": { + "$type": "SelectionComponent", + "Id": 10440557478882592717 + }, + "Component_[13620450453324765907]": { + "$type": "EditorLockComponent", + "Id": 13620450453324765907 + }, + "Component_[2134313378593666258]": { + "$type": "EditorInspectorComponent", + "Id": 2134313378593666258 + }, + "Component_[234010807770404186]": { + "$type": "EditorVisibilityComponent", + "Id": 234010807770404186 + }, + "Component_[2970359110423865725]": { + "$type": "EditorEntityIconComponent", + "Id": 2970359110423865725 + }, + "Component_[3722854130373041803]": { + "$type": "EditorOnlyEntityComponent", + "Id": 3722854130373041803 + }, + "Component_[5992533738676323195]": { + "$type": "EditorDisabledCompositionComponent", + "Id": 5992533738676323195 + }, + "Component_[7378860763541895402]": { + "$type": "AZ::Render::EditorDirectionalLightComponent", + "Id": 7378860763541895402, + "Controller": { + "Configuration": { + "Intensity": 1.0, + "CameraEntityId": "", + "ShadowFilterMethod": 1 + } + } + }, + "Component_[7892834440890947578]": { + "$type": "{27F1E1A1-8D9D-4C3B-BD3A-AFB9762449C0} TransformComponent", + "Id": 7892834440890947578, + "Parent Entity": "Entity_[1176639161715]", + "Transform Data": { + "Translate": [ + 0.0, + 0.0, + 13.487043380737305 + ], + "Rotate": [ + -76.13099670410156, + -0.847000002861023, + -15.8100004196167 + ] + } + }, + "Component_[8599729549570828259]": { + "$type": "EditorEntitySortComponent", + "Id": 8599729549570828259 + }, + "Component_[952797371922080273]": { + "$type": "EditorPendingCompositionComponent", + "Id": 952797371922080273 + } + } + }, + "Entity_[1163754259827]": { + "Id": "Entity_[1163754259827]", + "Name": "Camera", + "Components": { + "Component_[11895140916889160460]": { + "$type": "EditorEntityIconComponent", + "Id": 11895140916889160460 + }, + "Component_[16880285896855930892]": { + "$type": "{CA11DA46-29FF-4083-B5F6-E02C3A8C3A3D} EditorCameraComponent", + "Id": 16880285896855930892, + "Controller": { + "Configuration": { + "Field of View": 55.0, + "EditorEntityId": 8929576024571800510 + } + } + }, + "Component_[17187464423780271193]": { + "$type": "EditorLockComponent", + "Id": 17187464423780271193 + }, + "Component_[17495696818315413311]": { + "$type": "EditorEntitySortComponent", + "Id": 17495696818315413311 + }, + "Component_[18086214374043522055]": { + "$type": "{27F1E1A1-8D9D-4C3B-BD3A-AFB9762449C0} TransformComponent", + "Id": 18086214374043522055, + "Parent Entity": "Entity_[1176639161715]", + "Transform Data": { + "Translate": [ + 1.511600136756897, + -1.3604341745376587, + 1.412430763244629 + ], + "Rotate": [ + -7.442450523376465, + -6.665996551513672, + 41.62498092651367 + ] + } + }, + "Component_[18387556550380114975]": { + "$type": "SelectionComponent", + "Id": 18387556550380114975 + }, + "Component_[2654521436129313160]": { + "$type": "EditorVisibilityComponent", + "Id": 2654521436129313160 + }, + "Component_[5265045084611556958]": { + "$type": "EditorDisabledCompositionComponent", + "Id": 5265045084611556958 + }, + "Component_[7169798125182238623]": { + "$type": "EditorPendingCompositionComponent", + "Id": 7169798125182238623 + }, + "Component_[7255796294953281766]": { + "$type": "GenericComponentWrapper", + "Id": 7255796294953281766, + "m_template": { + "$type": "FlyCameraInputComponent" + } + }, + "Component_[8866210352157164042]": { + "$type": "EditorInspectorComponent", + "Id": 8866210352157164042 + }, + "Component_[9129253381063760879]": { + "$type": "EditorOnlyEntityComponent", + "Id": 9129253381063760879 + } + } + }, + "Entity_[1176639161715]": { + "Id": "Entity_[1176639161715]", + "Name": "Atom Default Environment", + "Components": { + "Component_[10757302973393310045]": { + "$type": "{27F1E1A1-8D9D-4C3B-BD3A-AFB9762449C0} TransformComponent", + "Id": 10757302973393310045, + "Parent Entity": "Entity_[1146574390643]" + }, + "Component_[14505817420424255464]": { + "$type": "EditorInspectorComponent", + "Id": 14505817420424255464, + "ComponentOrderEntryArray": [ + { + "ComponentId": 10757302973393310045 + } + ] + }, + "Component_[14988041764659020032]": { + "$type": "EditorLockComponent", + "Id": 14988041764659020032 + }, + "Component_[15808690248755038124]": { + "$type": "SelectionComponent", + "Id": 15808690248755038124 + }, + "Component_[15900837685796817138]": { + "$type": "EditorVisibilityComponent", + "Id": 15900837685796817138 + }, + "Component_[3298767348226484884]": { + "$type": "EditorOnlyEntityComponent", + "Id": 3298767348226484884 + }, + "Component_[4076975109609220594]": { + "$type": "EditorPendingCompositionComponent", + "Id": 4076975109609220594 + }, + "Component_[5679760548946028854]": { + "$type": "EditorDisabledCompositionComponent", + "Id": 5679760548946028854 + }, + "Component_[5855590796136709437]": { + "$type": "EditorEntitySortComponent", + "Id": 5855590796136709437, + "Child Entity Order": [ + "Entity_[1155164325235]", + "Entity_[1180934129011]", + "Entity_[1163754259827]" + ] + }, + "Component_[9277695270015777859]": { + "$type": "EditorEntityIconComponent", + "Id": 9277695270015777859 + } + } + }, + "Entity_[1180934129011]": { + "Id": "Entity_[1180934129011]", + "Name": "Global Sky", + "Components": { + "Component_[11231930600558681245]": { + "$type": "AZ::Render::EditorHDRiSkyboxComponent", + "Id": 11231930600558681245, + "Controller": { + "Configuration": { + "CubemapAsset": { + "assetId": { + "guid": "{215E47FD-D181-5832-B1AB-91673ABF6399}", + "subId": 1000 + }, + "assetHint": "lightingpresets/highcontrast/goegap_4k_skyboxcm.exr.streamingimage" + } + } + } + }, + "Component_[11980494120202836095]": { + "$type": "SelectionComponent", + "Id": 11980494120202836095 + }, + "Component_[1428633914413949476]": { + "$type": "EditorLockComponent", + "Id": 1428633914413949476 + }, + "Component_[14936200426671614999]": { + "$type": "AZ::Render::EditorImageBasedLightComponent", + "Id": 14936200426671614999, + "Controller": { + "Configuration": { + "diffuseImageAsset": { + "assetId": { + "guid": "{3FD09945-D0F2-55C8-B9AF-B2FD421FE3BE}", + "subId": 3000 + }, + "assetHint": "lightingpresets/highcontrast/goegap_4k_iblglobalcm_ibldiffuse.exr.streamingimage" + }, + "specularImageAsset": { + "assetId": { + "guid": "{3FD09945-D0F2-55C8-B9AF-B2FD421FE3BE}", + "subId": 2000 + }, + "assetHint": "lightingpresets/highcontrast/goegap_4k_iblglobalcm_iblspecular.exr.streamingimage" + } + } + } + }, + "Component_[14994774102579326069]": { + "$type": "EditorDisabledCompositionComponent", + "Id": 14994774102579326069 + }, + "Component_[15417479889044493340]": { + "$type": "EditorPendingCompositionComponent", + "Id": 15417479889044493340 + }, + "Component_[15826613364991382688]": { + "$type": "EditorEntitySortComponent", + "Id": 15826613364991382688 + }, + "Component_[1665003113283562343]": { + "$type": "EditorOnlyEntityComponent", + "Id": 1665003113283562343 + }, + "Component_[3704934735944502280]": { + "$type": "EditorEntityIconComponent", + "Id": 3704934735944502280 + }, + "Component_[5698542331457326479]": { + "$type": "EditorVisibilityComponent", + "Id": 5698542331457326479 + }, + "Component_[6644513399057217122]": { + "$type": "{27F1E1A1-8D9D-4C3B-BD3A-AFB9762449C0} TransformComponent", + "Id": 6644513399057217122, + "Parent Entity": "Entity_[1176639161715]" + }, + "Component_[931091830724002070]": { + "$type": "EditorInspectorComponent", + "Id": 931091830724002070 + } + } + } + }, + "Instances": { + "Instance_[1015201222663]": { + "Source": "prefabs/Cloth/Chicken_Actor.prefab", + "Patches": [ + { + "op": "replace", + "path": "/ContainerEntity/Components/Component_[4272963378099646759]/Parent Entity", + "value": "../Entity_[1146574390643]" + }, + { + "op": "replace", + "path": "/ContainerEntity/Components/Component_[4272963378099646759]/Transform Data/Translate/0", + "value": 0.31251561641693115 + }, + { + "op": "replace", + "path": "/ContainerEntity/Components/Component_[4272963378099646759]/Transform Data/Translate/1", + "value": -0.006644248962402344 + }, + { + "op": "replace", + "path": "/ContainerEntity/Components/Component_[4272963378099646759]/Transform Data/Translate/2", + "value": 0.3271239995956421 + }, + { + "op": "replace", + "path": "/ContainerEntity/Components/Component_[4272963378099646759]/Transform Data/Rotate/2", + "value": 179.72178649902344 + }, + { + "op": "add", + "path": "/ContainerEntity/Components/Component_[7874177159288365422]/Child Entity Order/0", + "value": "Entity_[303447173544404]" + }, + { + "op": "remove", + "path": "/LinkId" + } + ] + } + } +} \ No newline at end of file diff --git a/AutomatedTesting/Levels/NvCloth/NvCloth_AddClothSimulationToActor/TerrainTexture.pak b/AutomatedTesting/Levels/NvCloth/NvCloth_AddClothSimulationToActor/TerrainTexture.pak deleted file mode 100644 index fe3604a050..0000000000 --- a/AutomatedTesting/Levels/NvCloth/NvCloth_AddClothSimulationToActor/TerrainTexture.pak +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:8739c76e681f900923b900c9df0ef75cf421d39cabb54650c4b9ad19b6a76d85 -size 22 diff --git a/AutomatedTesting/Levels/NvCloth/NvCloth_AddClothSimulationToActor/filelist.xml b/AutomatedTesting/Levels/NvCloth/NvCloth_AddClothSimulationToActor/filelist.xml deleted file mode 100644 index 20952a47ce..0000000000 --- a/AutomatedTesting/Levels/NvCloth/NvCloth_AddClothSimulationToActor/filelist.xml +++ /dev/null @@ -1,6 +0,0 @@ - - - - - - diff --git a/AutomatedTesting/Levels/NvCloth/NvCloth_AddClothSimulationToActor/level.pak b/AutomatedTesting/Levels/NvCloth/NvCloth_AddClothSimulationToActor/level.pak deleted file mode 100644 index 4259131c4f..0000000000 --- a/AutomatedTesting/Levels/NvCloth/NvCloth_AddClothSimulationToActor/level.pak +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:46051f4116003e1a2d13855bea92a1b15501166b1379a11d02c4d2239ccd2530 -size 3648 diff --git a/AutomatedTesting/Levels/NvCloth/NvCloth_AddClothSimulationToMesh/LevelData/Environment.xml b/AutomatedTesting/Levels/NvCloth/NvCloth_AddClothSimulationToMesh/LevelData/Environment.xml deleted file mode 100644 index 4ba36f66ae..0000000000 --- a/AutomatedTesting/Levels/NvCloth/NvCloth_AddClothSimulationToMesh/LevelData/Environment.xml +++ /dev/null @@ -1,14 +0,0 @@ - - - - - - - - - - - - - - diff --git a/AutomatedTesting/Levels/NvCloth/NvCloth_AddClothSimulationToMesh/LevelData/TerrainTexture.xml b/AutomatedTesting/Levels/NvCloth/NvCloth_AddClothSimulationToMesh/LevelData/TerrainTexture.xml deleted file mode 100644 index f43df05b22..0000000000 --- a/AutomatedTesting/Levels/NvCloth/NvCloth_AddClothSimulationToMesh/LevelData/TerrainTexture.xml +++ /dev/null @@ -1,7 +0,0 @@ - - - - - - - diff --git a/AutomatedTesting/Levels/NvCloth/NvCloth_AddClothSimulationToMesh/LevelData/TimeOfDay.xml b/AutomatedTesting/Levels/NvCloth/NvCloth_AddClothSimulationToMesh/LevelData/TimeOfDay.xml deleted file mode 100644 index 6ea168cc6b..0000000000 --- a/AutomatedTesting/Levels/NvCloth/NvCloth_AddClothSimulationToMesh/LevelData/TimeOfDay.xml +++ /dev/null @@ -1,356 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/AutomatedTesting/Levels/NvCloth/NvCloth_AddClothSimulationToMesh/LevelData/VegetationMap.dat b/AutomatedTesting/Levels/NvCloth/NvCloth_AddClothSimulationToMesh/LevelData/VegetationMap.dat deleted file mode 100644 index dce5631cd0..0000000000 --- a/AutomatedTesting/Levels/NvCloth/NvCloth_AddClothSimulationToMesh/LevelData/VegetationMap.dat +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:0e6a5435c928079b27796f6b202bbc2623e7e454244ddc099a3cadf33b7cb9e9 -size 63 diff --git a/AutomatedTesting/Levels/NvCloth/NvCloth_AddClothSimulationToMesh/NvCloth_AddClothSimulationToMesh.ly b/AutomatedTesting/Levels/NvCloth/NvCloth_AddClothSimulationToMesh/NvCloth_AddClothSimulationToMesh.ly deleted file mode 100644 index 861626993e..0000000000 --- a/AutomatedTesting/Levels/NvCloth/NvCloth_AddClothSimulationToMesh/NvCloth_AddClothSimulationToMesh.ly +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:bedd2adc60f244a8595e64619069046d5036dd762f61b5393f9b759d69281362 -size 5276 diff --git a/AutomatedTesting/Levels/NvCloth/NvCloth_AddClothSimulationToMesh/NvCloth_AddClothSimulationToMesh.prefab b/AutomatedTesting/Levels/NvCloth/NvCloth_AddClothSimulationToMesh/NvCloth_AddClothSimulationToMesh.prefab new file mode 100644 index 0000000000..93d0d1e707 --- /dev/null +++ b/AutomatedTesting/Levels/NvCloth/NvCloth_AddClothSimulationToMesh/NvCloth_AddClothSimulationToMesh.prefab @@ -0,0 +1,522 @@ +{ + "ContainerEntity": { + "Id": "Entity_[1146574390643]", + "Name": "Level", + "Components": { + "Component_[10641544592923449938]": { + "$type": "EditorInspectorComponent", + "Id": 10641544592923449938 + }, + "Component_[12039882709170782873]": { + "$type": "EditorOnlyEntityComponent", + "Id": 12039882709170782873 + }, + "Component_[12265484671603697631]": { + "$type": "EditorPendingCompositionComponent", + "Id": 12265484671603697631 + }, + "Component_[14126657869720434043]": { + "$type": "EditorEntitySortComponent", + "Id": 14126657869720434043, + "Child Entity Order": [ + "Entity_[1176639161715]", + "Instance_[811083782986]/ContainerEntity", + "Instance_[503204883039]/ContainerEntity", + "Instance_[563334425183]/ContainerEntity", + "Instance_[640643836511]/ContainerEntity", + "Instance_[735133117023]/ContainerEntity" + ] + }, + "Component_[15230859088967841193]": { + "$type": "{27F1E1A1-8D9D-4C3B-BD3A-AFB9762449C0} TransformComponent", + "Id": 15230859088967841193, + "Parent Entity": "" + }, + "Component_[16239496886950819870]": { + "$type": "EditorDisabledCompositionComponent", + "Id": 16239496886950819870 + }, + "Component_[5688118765544765547]": { + "$type": "EditorEntityIconComponent", + "Id": 5688118765544765547 + }, + "Component_[6545738857812235305]": { + "$type": "SelectionComponent", + "Id": 6545738857812235305 + }, + "Component_[7247035804068349658]": { + "$type": "EditorPrefabComponent", + "Id": 7247035804068349658 + }, + "Component_[9307224322037797205]": { + "$type": "EditorLockComponent", + "Id": 9307224322037797205 + }, + "Component_[9562516168917670048]": { + "$type": "EditorVisibilityComponent", + "Id": 9562516168917670048 + } + } + }, + "Entities": { + "Entity_[1155164325235]": { + "Id": "Entity_[1155164325235]", + "Name": "Sun", + "Components": { + "Component_[10440557478882592717]": { + "$type": "SelectionComponent", + "Id": 10440557478882592717 + }, + "Component_[13620450453324765907]": { + "$type": "EditorLockComponent", + "Id": 13620450453324765907 + }, + "Component_[2134313378593666258]": { + "$type": "EditorInspectorComponent", + "Id": 2134313378593666258 + }, + "Component_[234010807770404186]": { + "$type": "EditorVisibilityComponent", + "Id": 234010807770404186 + }, + "Component_[2970359110423865725]": { + "$type": "EditorEntityIconComponent", + "Id": 2970359110423865725 + }, + "Component_[3722854130373041803]": { + "$type": "EditorOnlyEntityComponent", + "Id": 3722854130373041803 + }, + "Component_[5992533738676323195]": { + "$type": "EditorDisabledCompositionComponent", + "Id": 5992533738676323195 + }, + "Component_[7378860763541895402]": { + "$type": "AZ::Render::EditorDirectionalLightComponent", + "Id": 7378860763541895402, + "Controller": { + "Configuration": { + "Intensity": 1.0, + "CameraEntityId": "", + "ShadowFilterMethod": 1 + } + } + }, + "Component_[7892834440890947578]": { + "$type": "{27F1E1A1-8D9D-4C3B-BD3A-AFB9762449C0} TransformComponent", + "Id": 7892834440890947578, + "Parent Entity": "Entity_[1176639161715]", + "Transform Data": { + "Translate": [ + 0.0, + 0.0, + 13.487043380737305 + ], + "Rotate": [ + -76.13099670410156, + -0.847000002861023, + -15.8100004196167 + ] + } + }, + "Component_[8599729549570828259]": { + "$type": "EditorEntitySortComponent", + "Id": 8599729549570828259 + }, + "Component_[952797371922080273]": { + "$type": "EditorPendingCompositionComponent", + "Id": 952797371922080273 + } + } + }, + "Entity_[1163754259827]": { + "Id": "Entity_[1163754259827]", + "Name": "Camera", + "Components": { + "Component_[11895140916889160460]": { + "$type": "EditorEntityIconComponent", + "Id": 11895140916889160460 + }, + "Component_[16880285896855930892]": { + "$type": "{CA11DA46-29FF-4083-B5F6-E02C3A8C3A3D} EditorCameraComponent", + "Id": 16880285896855930892, + "Controller": { + "Configuration": { + "Field of View": 55.0, + "EditorEntityId": 8929576024571800510 + } + } + }, + "Component_[17187464423780271193]": { + "$type": "EditorLockComponent", + "Id": 17187464423780271193 + }, + "Component_[17495696818315413311]": { + "$type": "EditorEntitySortComponent", + "Id": 17495696818315413311 + }, + "Component_[18086214374043522055]": { + "$type": "{27F1E1A1-8D9D-4C3B-BD3A-AFB9762449C0} TransformComponent", + "Id": 18086214374043522055, + "Parent Entity": "Entity_[1176639161715]", + "Transform Data": { + "Translate": [ + 3.288902521133423, + -3.0976791381835938, + 1.595407247543335 + ], + "Rotate": [ + -6.36656379699707, + -6.542551040649414, + 45.600582122802734 + ] + } + }, + "Component_[18387556550380114975]": { + "$type": "SelectionComponent", + "Id": 18387556550380114975 + }, + "Component_[2654521436129313160]": { + "$type": "EditorVisibilityComponent", + "Id": 2654521436129313160 + }, + "Component_[5265045084611556958]": { + "$type": "EditorDisabledCompositionComponent", + "Id": 5265045084611556958 + }, + "Component_[7169798125182238623]": { + "$type": "EditorPendingCompositionComponent", + "Id": 7169798125182238623 + }, + "Component_[7255796294953281766]": { + "$type": "GenericComponentWrapper", + "Id": 7255796294953281766, + "m_template": { + "$type": "FlyCameraInputComponent" + } + }, + "Component_[8866210352157164042]": { + "$type": "EditorInspectorComponent", + "Id": 8866210352157164042 + }, + "Component_[9129253381063760879]": { + "$type": "EditorOnlyEntityComponent", + "Id": 9129253381063760879 + } + } + }, + "Entity_[1176639161715]": { + "Id": "Entity_[1176639161715]", + "Name": "Atom Default Environment", + "Components": { + "Component_[10757302973393310045]": { + "$type": "{27F1E1A1-8D9D-4C3B-BD3A-AFB9762449C0} TransformComponent", + "Id": 10757302973393310045, + "Parent Entity": "Entity_[1146574390643]" + }, + "Component_[14505817420424255464]": { + "$type": "EditorInspectorComponent", + "Id": 14505817420424255464, + "ComponentOrderEntryArray": [ + { + "ComponentId": 10757302973393310045 + } + ] + }, + "Component_[14988041764659020032]": { + "$type": "EditorLockComponent", + "Id": 14988041764659020032 + }, + "Component_[15808690248755038124]": { + "$type": "SelectionComponent", + "Id": 15808690248755038124 + }, + "Component_[15900837685796817138]": { + "$type": "EditorVisibilityComponent", + "Id": 15900837685796817138 + }, + "Component_[3298767348226484884]": { + "$type": "EditorOnlyEntityComponent", + "Id": 3298767348226484884 + }, + "Component_[4076975109609220594]": { + "$type": "EditorPendingCompositionComponent", + "Id": 4076975109609220594 + }, + "Component_[5679760548946028854]": { + "$type": "EditorDisabledCompositionComponent", + "Id": 5679760548946028854 + }, + "Component_[5855590796136709437]": { + "$type": "EditorEntitySortComponent", + "Id": 5855590796136709437, + "Child Entity Order": [ + "Entity_[1155164325235]", + "Entity_[1180934129011]", + "Entity_[1163754259827]" + ] + }, + "Component_[9277695270015777859]": { + "$type": "EditorEntityIconComponent", + "Id": 9277695270015777859 + } + } + }, + "Entity_[1180934129011]": { + "Id": "Entity_[1180934129011]", + "Name": "Global Sky", + "Components": { + "Component_[11231930600558681245]": { + "$type": "AZ::Render::EditorHDRiSkyboxComponent", + "Id": 11231930600558681245, + "Controller": { + "Configuration": { + "CubemapAsset": { + "assetId": { + "guid": "{215E47FD-D181-5832-B1AB-91673ABF6399}", + "subId": 1000 + }, + "assetHint": "lightingpresets/highcontrast/goegap_4k_skyboxcm.exr.streamingimage" + } + } + } + }, + "Component_[11980494120202836095]": { + "$type": "SelectionComponent", + "Id": 11980494120202836095 + }, + "Component_[1428633914413949476]": { + "$type": "EditorLockComponent", + "Id": 1428633914413949476 + }, + "Component_[14936200426671614999]": { + "$type": "AZ::Render::EditorImageBasedLightComponent", + "Id": 14936200426671614999, + "Controller": { + "Configuration": { + "diffuseImageAsset": { + "assetId": { + "guid": "{3FD09945-D0F2-55C8-B9AF-B2FD421FE3BE}", + "subId": 3000 + }, + "assetHint": "lightingpresets/highcontrast/goegap_4k_iblglobalcm_ibldiffuse.exr.streamingimage" + }, + "specularImageAsset": { + "assetId": { + "guid": "{3FD09945-D0F2-55C8-B9AF-B2FD421FE3BE}", + "subId": 2000 + }, + "assetHint": "lightingpresets/highcontrast/goegap_4k_iblglobalcm_iblspecular.exr.streamingimage" + } + } + } + }, + "Component_[14994774102579326069]": { + "$type": "EditorDisabledCompositionComponent", + "Id": 14994774102579326069 + }, + "Component_[15417479889044493340]": { + "$type": "EditorPendingCompositionComponent", + "Id": 15417479889044493340 + }, + "Component_[15826613364991382688]": { + "$type": "EditorEntitySortComponent", + "Id": 15826613364991382688 + }, + "Component_[1665003113283562343]": { + "$type": "EditorOnlyEntityComponent", + "Id": 1665003113283562343 + }, + "Component_[3704934735944502280]": { + "$type": "EditorEntityIconComponent", + "Id": 3704934735944502280 + }, + "Component_[5698542331457326479]": { + "$type": "EditorVisibilityComponent", + "Id": 5698542331457326479 + }, + "Component_[6644513399057217122]": { + "$type": "{27F1E1A1-8D9D-4C3B-BD3A-AFB9762449C0} TransformComponent", + "Id": 6644513399057217122, + "Parent Entity": "Entity_[1176639161715]" + }, + "Component_[931091830724002070]": { + "$type": "EditorInspectorComponent", + "Id": 931091830724002070 + } + } + } + }, + "Instances": { + "Instance_[503204883039]": { + "Source": "prefabs/Cloth/cloth_blinds_broken.prefab", + "Patches": [ + { + "op": "replace", + "path": "/ContainerEntity/Components/Component_[4272963378099646759]/Parent Entity", + "value": "../Entity_[1146574390643]" + }, + { + "op": "replace", + "path": "/ContainerEntity/Components/Component_[4272963378099646759]/Transform Data/Translate/0", + "value": -3.9779629707336426 + }, + { + "op": "replace", + "path": "/ContainerEntity/Components/Component_[4272963378099646759]/Transform Data/Translate/1", + "value": -0.7587795257568359 + }, + { + "op": "replace", + "path": "/ContainerEntity/Components/Component_[4272963378099646759]/Transform Data/Translate/2", + "value": 1.0752365589141846 + }, + { + "op": "add", + "path": "/ContainerEntity/Components/Component_[7874177159288365422]/Child Entity Order/0", + "value": "Entity_[303326914460116]" + }, + { + "op": "remove", + "path": "/LinkId" + } + ] + }, + "Instance_[563334425183]": { + "Source": "prefabs/Cloth/cloth_locked_corners_four.prefab", + "Patches": [ + { + "op": "replace", + "path": "/ContainerEntity/Components/Component_[4272963378099646759]/Parent Entity", + "value": "../Entity_[1146574390643]" + }, + { + "op": "replace", + "path": "/ContainerEntity/Components/Component_[4272963378099646759]/Transform Data/Translate/0", + "value": -4.94368839263916 + }, + { + "op": "replace", + "path": "/ContainerEntity/Components/Component_[4272963378099646759]/Transform Data/Translate/1", + "value": 0.805694580078125 + }, + { + "op": "replace", + "path": "/ContainerEntity/Components/Component_[4272963378099646759]/Transform Data/Translate/2", + "value": 2.2616283893585205 + }, + { + "op": "add", + "path": "/ContainerEntity/Components/Component_[7874177159288365422]/Child Entity Order/0", + "value": "Entity_[303417108773332]" + }, + { + "op": "remove", + "path": "/LinkId" + } + ] + }, + "Instance_[640643836511]": { + "Source": "prefabs/Cloth/cloth_locked_corners_two.prefab", + "Patches": [ + { + "op": "replace", + "path": "/ContainerEntity/Components/Component_[4272963378099646759]/Parent Entity", + "value": "../Entity_[1146574390643]" + }, + { + "op": "replace", + "path": "/ContainerEntity/Components/Component_[4272963378099646759]/Transform Data/Translate/0", + "value": -2.416099786758423 + }, + { + "op": "replace", + "path": "/ContainerEntity/Components/Component_[4272963378099646759]/Transform Data/Translate/1", + "value": 2.790005683898926 + }, + { + "op": "replace", + "path": "/ContainerEntity/Components/Component_[4272963378099646759]/Transform Data/Translate/2", + "value": 2.1456499099731445 + }, + { + "op": "add", + "path": "/ContainerEntity/Components/Component_[7874177159288365422]/Child Entity Order/0", + "value": "Entity_[303387044002260]" + }, + { + "op": "remove", + "path": "/LinkId" + } + ] + }, + "Instance_[735133117023]": { + "Source": "prefabs/Cloth/cloth_locked_edge.prefab", + "Patches": [ + { + "op": "replace", + "path": "/ContainerEntity/Components/Component_[4272963378099646759]/Parent Entity", + "value": "../Entity_[1146574390643]" + }, + { + "op": "replace", + "path": "/ContainerEntity/Components/Component_[4272963378099646759]/Transform Data/Translate/0", + "value": -1.9405040740966797 + }, + { + "op": "replace", + "path": "/ContainerEntity/Components/Component_[4272963378099646759]/Transform Data/Translate/1", + "value": -0.8027572631835938 + }, + { + "op": "replace", + "path": "/ContainerEntity/Components/Component_[4272963378099646759]/Transform Data/Translate/2", + "value": 0.2776646614074707 + }, + { + "op": "add", + "path": "/ContainerEntity/Components/Component_[7874177159288365422]/Child Entity Order/0", + "value": "Entity_[303356979231188]" + }, + { + "op": "remove", + "path": "/LinkId" + } + ] + }, + "Instance_[811083782986]": { + "Source": "prefabs/Cloth/cloth_blinds.prefab", + "Patches": [ + { + "op": "replace", + "path": "/ContainerEntity/Components/Component_[4272963378099646759]/Parent Entity", + "value": "../Entity_[1146574390643]" + }, + { + "op": "replace", + "path": "/ContainerEntity/Components/Component_[4272963378099646759]/Transform Data/Translate/0", + "value": 0.6851601600646973 + }, + { + "op": "replace", + "path": "/ContainerEntity/Components/Component_[4272963378099646759]/Transform Data/Translate/1", + "value": 0.1960926055908203 + }, + { + "op": "replace", + "path": "/ContainerEntity/Components/Component_[4272963378099646759]/Transform Data/Translate/2", + "value": 0.3339226245880127 + }, + { + "op": "add", + "path": "/ContainerEntity/Components/Component_[7874177159288365422]/Child Entity Order/0", + "value": "Entity_[303275374852564]" + }, + { + "op": "remove", + "path": "/LinkId" + } + ] + } + } +} \ No newline at end of file diff --git a/AutomatedTesting/Levels/NvCloth/NvCloth_AddClothSimulationToMesh/TerrainTexture.pak b/AutomatedTesting/Levels/NvCloth/NvCloth_AddClothSimulationToMesh/TerrainTexture.pak deleted file mode 100644 index fe3604a050..0000000000 --- a/AutomatedTesting/Levels/NvCloth/NvCloth_AddClothSimulationToMesh/TerrainTexture.pak +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:8739c76e681f900923b900c9df0ef75cf421d39cabb54650c4b9ad19b6a76d85 -size 22 diff --git a/AutomatedTesting/Levels/NvCloth/NvCloth_AddClothSimulationToMesh/filelist.xml b/AutomatedTesting/Levels/NvCloth/NvCloth_AddClothSimulationToMesh/filelist.xml deleted file mode 100644 index d3492ca7b6..0000000000 --- a/AutomatedTesting/Levels/NvCloth/NvCloth_AddClothSimulationToMesh/filelist.xml +++ /dev/null @@ -1,6 +0,0 @@ - - - - - - diff --git a/AutomatedTesting/Levels/NvCloth/NvCloth_AddClothSimulationToMesh/level.pak b/AutomatedTesting/Levels/NvCloth/NvCloth_AddClothSimulationToMesh/level.pak deleted file mode 100644 index 7fa23ea67f..0000000000 --- a/AutomatedTesting/Levels/NvCloth/NvCloth_AddClothSimulationToMesh/level.pak +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:81fc98854424d55e594a3983da53d2f5a4d7a7cf60e52e12366e4800d1d3f080 -size 38559 diff --git a/AutomatedTesting/Levels/Performance/10KEntityCpuPerfTest/10KEntityCpuPerfTest.prefab b/AutomatedTesting/Levels/Performance/10KEntityCpuPerfTest/10KEntityCpuPerfTest.prefab new file mode 100644 index 0000000000..5024ca9192 --- /dev/null +++ b/AutomatedTesting/Levels/Performance/10KEntityCpuPerfTest/10KEntityCpuPerfTest.prefab @@ -0,0 +1,1032 @@ +{ + "ContainerEntity": { + "Id": "Entity_[1146574390643]", + "Name": "Level", + "Components": { + "Component_[10641544592923449938]": { + "$type": "EditorInspectorComponent", + "Id": 10641544592923449938 + }, + "Component_[12039882709170782873]": { + "$type": "EditorOnlyEntityComponent", + "Id": 12039882709170782873 + }, + "Component_[12265484671603697631]": { + "$type": "EditorPendingCompositionComponent", + "Id": 12265484671603697631 + }, + "Component_[14126657869720434043]": { + "$type": "EditorEntitySortComponent", + "Id": 14126657869720434043, + "Child Entity Order": [ + "Entity_[1176639161715]", + "Instance_[470615713748]/ContainerEntity", + "Instance_[62786296211412]/ContainerEntity", + "Instance_[513945563413]/ContainerEntity", + "Instance_[612729811221]/ContainerEntity", + "Instance_[745873797397]/ContainerEntity" + ] + }, + "Component_[15230859088967841193]": { + "$type": "{27F1E1A1-8D9D-4C3B-BD3A-AFB9762449C0} TransformComponent", + "Id": 15230859088967841193, + "Parent Entity": "" + }, + "Component_[16239496886950819870]": { + "$type": "EditorDisabledCompositionComponent", + "Id": 16239496886950819870 + }, + "Component_[5688118765544765547]": { + "$type": "EditorEntityIconComponent", + "Id": 5688118765544765547 + }, + "Component_[6545738857812235305]": { + "$type": "SelectionComponent", + "Id": 6545738857812235305 + }, + "Component_[7247035804068349658]": { + "$type": "EditorPrefabComponent", + "Id": 7247035804068349658 + }, + "Component_[9307224322037797205]": { + "$type": "EditorLockComponent", + "Id": 9307224322037797205 + }, + "Component_[9562516168917670048]": { + "$type": "EditorVisibilityComponent", + "Id": 9562516168917670048 + } + } + }, + "Entities": { + "Entity_[1155164325235]": { + "Id": "Entity_[1155164325235]", + "Name": "Sun", + "Components": { + "Component_[10440557478882592717]": { + "$type": "SelectionComponent", + "Id": 10440557478882592717 + }, + "Component_[13620450453324765907]": { + "$type": "EditorLockComponent", + "Id": 13620450453324765907 + }, + "Component_[2134313378593666258]": { + "$type": "EditorInspectorComponent", + "Id": 2134313378593666258 + }, + "Component_[234010807770404186]": { + "$type": "EditorVisibilityComponent", + "Id": 234010807770404186 + }, + "Component_[2970359110423865725]": { + "$type": "EditorEntityIconComponent", + "Id": 2970359110423865725 + }, + "Component_[3722854130373041803]": { + "$type": "EditorOnlyEntityComponent", + "Id": 3722854130373041803 + }, + "Component_[5992533738676323195]": { + "$type": "EditorDisabledCompositionComponent", + "Id": 5992533738676323195 + }, + "Component_[7378860763541895402]": { + "$type": "AZ::Render::EditorDirectionalLightComponent", + "Id": 7378860763541895402, + "Controller": { + "Configuration": { + "Intensity": 1.0, + "CameraEntityId": "", + "ShadowFilterMethod": 1 + } + } + }, + "Component_[7892834440890947578]": { + "$type": "{27F1E1A1-8D9D-4C3B-BD3A-AFB9762449C0} TransformComponent", + "Id": 7892834440890947578, + "Parent Entity": "Entity_[1176639161715]", + "Transform Data": { + "Translate": [ + 0.0, + 0.0, + 13.487043380737305 + ], + "Rotate": [ + -76.13099670410156, + -0.847000002861023, + -15.8100004196167 + ] + } + }, + "Component_[8599729549570828259]": { + "$type": "EditorEntitySortComponent", + "Id": 8599729549570828259 + }, + "Component_[952797371922080273]": { + "$type": "EditorPendingCompositionComponent", + "Id": 952797371922080273 + } + } + }, + "Entity_[1159459292531]": { + "Id": "Entity_[1159459292531]", + "Name": "Ground", + "Components": { + "Component_[11701138785793981042]": { + "$type": "SelectionComponent", + "Id": 11701138785793981042 + }, + "Component_[12260880513256986252]": { + "$type": "EditorEntityIconComponent", + "Id": 12260880513256986252 + }, + "Component_[13711420870643673468]": { + "$type": "EditorDisabledCompositionComponent", + "Id": 13711420870643673468 + }, + "Component_[138002849734991713]": { + "$type": "EditorOnlyEntityComponent", + "Id": 138002849734991713 + }, + "Component_[16578565737331764849]": { + "$type": "{27F1E1A1-8D9D-4C3B-BD3A-AFB9762449C0} TransformComponent", + "Id": 16578565737331764849, + "Parent Entity": "Entity_[1176639161715]" + }, + "Component_[16919232076966545697]": { + "$type": "EditorInspectorComponent", + "Id": 16919232076966545697 + }, + "Component_[5182430712893438093]": { + "$type": "EditorMaterialComponent", + "Id": 5182430712893438093 + }, + "Component_[5675108321710651991]": { + "$type": "AZ::Render::EditorMeshComponent", + "Id": 5675108321710651991, + "Controller": { + "Configuration": { + "ModelAsset": { + "assetId": { + "guid": "{0CD745C0-6AA8-569A-A68A-73A3270986C4}", + "subId": 277889906 + }, + "assetHint": "objects/groudplane/groundplane_512x512m.azmodel" + } + } + } + }, + "Component_[5681893399601237518]": { + "$type": "EditorEntitySortComponent", + "Id": 5681893399601237518 + }, + "Component_[592692962543397545]": { + "$type": "EditorPendingCompositionComponent", + "Id": 592692962543397545 + }, + "Component_[7090012899106946164]": { + "$type": "EditorLockComponent", + "Id": 7090012899106946164 + }, + "Component_[9410832619875640998]": { + "$type": "EditorVisibilityComponent", + "Id": 9410832619875640998 + } + } + }, + "Entity_[1163754259827]": { + "Id": "Entity_[1163754259827]", + "Name": "Camera", + "Components": { + "Component_[11895140916889160460]": { + "$type": "EditorEntityIconComponent", + "Id": 11895140916889160460 + }, + "Component_[16880285896855930892]": { + "$type": "{CA11DA46-29FF-4083-B5F6-E02C3A8C3A3D} EditorCameraComponent", + "Id": 16880285896855930892, + "Controller": { + "Configuration": { + "Field of View": 55.0, + "EditorEntityId": 4792520350429473643 + } + } + }, + "Component_[17187464423780271193]": { + "$type": "EditorLockComponent", + "Id": 17187464423780271193 + }, + "Component_[17495696818315413311]": { + "$type": "EditorEntitySortComponent", + "Id": 17495696818315413311 + }, + "Component_[18086214374043522055]": { + "$type": "{27F1E1A1-8D9D-4C3B-BD3A-AFB9762449C0} TransformComponent", + "Id": 18086214374043522055, + "Parent Entity": "Entity_[1176639161715]", + "Transform Data": { + "Translate": [ + -2.3000001907348633, + -3.9368600845336914, + 1.0 + ], + "Rotate": [ + -2.050307512283325, + 1.9552897214889526, + -43.623355865478516 + ] + } + }, + "Component_[18387556550380114975]": { + "$type": "SelectionComponent", + "Id": 18387556550380114975 + }, + "Component_[2654521436129313160]": { + "$type": "EditorVisibilityComponent", + "Id": 2654521436129313160 + }, + "Component_[5265045084611556958]": { + "$type": "EditorDisabledCompositionComponent", + "Id": 5265045084611556958 + }, + "Component_[7169798125182238623]": { + "$type": "EditorPendingCompositionComponent", + "Id": 7169798125182238623 + }, + "Component_[7255796294953281766]": { + "$type": "GenericComponentWrapper", + "Id": 7255796294953281766, + "m_template": { + "$type": "FlyCameraInputComponent" + } + }, + "Component_[8866210352157164042]": { + "$type": "EditorInspectorComponent", + "Id": 8866210352157164042 + }, + "Component_[9129253381063760879]": { + "$type": "EditorOnlyEntityComponent", + "Id": 9129253381063760879 + } + } + }, + "Entity_[1168049227123]": { + "Id": "Entity_[1168049227123]", + "Name": "Grid", + "Components": { + "Component_[11443347433215807130]": { + "$type": "EditorEntityIconComponent", + "Id": 11443347433215807130 + }, + "Component_[11779275529534764488]": { + "$type": "SelectionComponent", + "Id": 11779275529534764488 + }, + "Component_[14249419413039427459]": { + "$type": "EditorInspectorComponent", + "Id": 14249419413039427459 + }, + "Component_[15448581635946161318]": { + "$type": "AZ::Render::EditorGridComponent", + "Id": 15448581635946161318, + "Controller": { + "Configuration": { + "primarySpacing": 4.0, + "primaryColor": [ + 0.501960813999176, + 0.501960813999176, + 0.501960813999176 + ], + "secondarySpacing": 0.5, + "secondaryColor": [ + 0.250980406999588, + 0.250980406999588, + 0.250980406999588 + ] + } + } + }, + "Component_[1843303322527297409]": { + "$type": "EditorDisabledCompositionComponent", + "Id": 1843303322527297409 + }, + "Component_[380249072065273654]": { + "$type": "{27F1E1A1-8D9D-4C3B-BD3A-AFB9762449C0} TransformComponent", + "Id": 380249072065273654, + "Parent Entity": "Entity_[1176639161715]" + }, + "Component_[7476660583684339787]": { + "$type": "EditorPendingCompositionComponent", + "Id": 7476660583684339787 + }, + "Component_[7557626501215118375]": { + "$type": "EditorEntitySortComponent", + "Id": 7557626501215118375 + }, + "Component_[7984048488947365511]": { + "$type": "EditorVisibilityComponent", + "Id": 7984048488947365511 + }, + "Component_[8118181039276487398]": { + "$type": "EditorOnlyEntityComponent", + "Id": 8118181039276487398 + }, + "Component_[9189909764215270515]": { + "$type": "EditorLockComponent", + "Id": 9189909764215270515 + } + } + }, + "Entity_[1176639161715]": { + "Id": "Entity_[1176639161715]", + "Name": "Atom Default Environment", + "Components": { + "Component_[10757302973393310045]": { + "$type": "{27F1E1A1-8D9D-4C3B-BD3A-AFB9762449C0} TransformComponent", + "Id": 10757302973393310045, + "Parent Entity": "Entity_[1146574390643]" + }, + "Component_[14505817420424255464]": { + "$type": "EditorInspectorComponent", + "Id": 14505817420424255464, + "ComponentOrderEntryArray": [ + { + "ComponentId": 10757302973393310045 + } + ] + }, + "Component_[14988041764659020032]": { + "$type": "EditorLockComponent", + "Id": 14988041764659020032 + }, + "Component_[15808690248755038124]": { + "$type": "SelectionComponent", + "Id": 15808690248755038124 + }, + "Component_[15900837685796817138]": { + "$type": "EditorVisibilityComponent", + "Id": 15900837685796817138 + }, + "Component_[3298767348226484884]": { + "$type": "EditorOnlyEntityComponent", + "Id": 3298767348226484884 + }, + "Component_[4076975109609220594]": { + "$type": "EditorPendingCompositionComponent", + "Id": 4076975109609220594 + }, + "Component_[5679760548946028854]": { + "$type": "EditorDisabledCompositionComponent", + "Id": 5679760548946028854 + }, + "Component_[5855590796136709437]": { + "$type": "EditorEntitySortComponent", + "Id": 5855590796136709437, + "Child Entity Order": [ + "Entity_[1155164325235]", + "Entity_[1180934129011]", + "Entity_[1168049227123]", + "Entity_[1163754259827]", + "Entity_[1159459292531]" + ] + }, + "Component_[9277695270015777859]": { + "$type": "EditorEntityIconComponent", + "Id": 9277695270015777859 + } + } + }, + "Entity_[1180934129011]": { + "Id": "Entity_[1180934129011]", + "Name": "Global Sky", + "Components": { + "Component_[11980494120202836095]": { + "$type": "SelectionComponent", + "Id": 11980494120202836095 + }, + "Component_[12198510776899974386]": { + "$type": "AZ::Render::EditorHDRiSkyboxComponent", + "Id": 12198510776899974386, + "Controller": { + "Configuration": { + "CubemapAsset": { + "assetId": { + "guid": "{215E47FD-D181-5832-B1AB-91673ABF6399}", + "subId": 1000 + }, + "assetHint": "lightingpresets/highcontrast/goegap_4k_skyboxcm.exr.streamingimage" + } + } + } + }, + "Component_[1428633914413949476]": { + "$type": "EditorLockComponent", + "Id": 1428633914413949476 + }, + "Component_[14936200426671614999]": { + "$type": "AZ::Render::EditorImageBasedLightComponent", + "Id": 14936200426671614999, + "Controller": { + "Configuration": { + "diffuseImageAsset": { + "assetId": { + "guid": "{3FD09945-D0F2-55C8-B9AF-B2FD421FE3BE}", + "subId": 3000 + }, + "assetHint": "lightingpresets/highcontrast/goegap_4k_iblglobalcm_ibldiffuse.exr.streamingimage" + }, + "specularImageAsset": { + "assetId": { + "guid": "{3FD09945-D0F2-55C8-B9AF-B2FD421FE3BE}", + "subId": 2000 + }, + "assetHint": "lightingpresets/highcontrast/goegap_4k_iblglobalcm_iblspecular.exr.streamingimage" + } + } + } + }, + "Component_[14994774102579326069]": { + "$type": "EditorDisabledCompositionComponent", + "Id": 14994774102579326069 + }, + "Component_[15417479889044493340]": { + "$type": "EditorPendingCompositionComponent", + "Id": 15417479889044493340 + }, + "Component_[15826613364991382688]": { + "$type": "EditorEntitySortComponent", + "Id": 15826613364991382688 + }, + "Component_[1665003113283562343]": { + "$type": "EditorOnlyEntityComponent", + "Id": 1665003113283562343 + }, + "Component_[3704934735944502280]": { + "$type": "EditorEntityIconComponent", + "Id": 3704934735944502280 + }, + "Component_[5698542331457326479]": { + "$type": "EditorVisibilityComponent", + "Id": 5698542331457326479 + }, + "Component_[6644513399057217122]": { + "$type": "{27F1E1A1-8D9D-4C3B-BD3A-AFB9762449C0} TransformComponent", + "Id": 6644513399057217122, + "Parent Entity": "Entity_[1176639161715]" + }, + "Component_[931091830724002070]": { + "$type": "EditorInspectorComponent", + "Id": 931091830724002070 + } + } + } + }, + "Instances": { + "Instance_[470615713748]": { + "Source": "Prefabs/TestData/Graphics/AtomCubeWall.prefab", + "Patches": [ + { + "op": "replace", + "path": "/ContainerEntity/Components/Component_[5052757994340238524]/Parent Entity", + "value": "../Entity_[1146574390643]" + }, + { + "op": "replace", + "path": "/ContainerEntity/Components/Component_[5052757994340238524]/Transform Data/Translate/0", + "value": 50.0 + }, + { + "op": "replace", + "path": "/ContainerEntity/Components/Component_[5052757994340238524]/Transform Data/Translate/2", + "value": 1.0 + } + ] + }, + "Instance_[513945563413]": { + "Source": "Prefabs/TestData/Graphics/AtomCubeWall.prefab", + "Patches": [ + { + "op": "replace", + "path": "/ContainerEntity/Components/Component_[5052757994340238524]/Parent Entity", + "value": "../Entity_[1146574390643]" + }, + { + "op": "replace", + "path": "/ContainerEntity/Components/Component_[5052757994340238524]/Transform Data/Translate/0", + "value": 50.0 + }, + { + "op": "replace", + "path": "/ContainerEntity/Components/Component_[5052757994340238524]/Transform Data/Translate/1", + "value": 10.0 + }, + { + "op": "replace", + "path": "/ContainerEntity/Components/Component_[5052757994340238524]/Transform Data/Translate/2", + "value": 1.0 + } + ] + }, + "Instance_[612729811221]": { + "Source": "Prefabs/TestData/Graphics/AtomCubeWall.prefab", + "Patches": [ + { + "op": "replace", + "path": "/ContainerEntity/Components/Component_[5052757994340238524]/Parent Entity", + "value": "../Entity_[1146574390643]" + }, + { + "op": "replace", + "path": "/ContainerEntity/Components/Component_[5052757994340238524]/Transform Data/Translate/0", + "value": 50.0 + }, + { + "op": "replace", + "path": "/ContainerEntity/Components/Component_[5052757994340238524]/Transform Data/Translate/1", + "value": 15.0 + }, + { + "op": "replace", + "path": "/ContainerEntity/Components/Component_[5052757994340238524]/Transform Data/Translate/2", + "value": 1.0 + } + ] + }, + "Instance_[62786296211412]": { + "Source": "Prefabs/TestData/Graphics/AtomCubeWall.prefab", + "Patches": [ + { + "op": "replace", + "path": "/ContainerEntity/Components/Component_[5052757994340238524]/Parent Entity", + "value": "../Entity_[1146574390643]" + }, + { + "op": "replace", + "path": "/ContainerEntity/Components/Component_[5052757994340238524]/Transform Data/Translate/0", + "value": 50.0 + }, + { + "op": "replace", + "path": "/ContainerEntity/Components/Component_[5052757994340238524]/Transform Data/Translate/1", + "value": 5.0 + }, + { + "op": "replace", + "path": "/ContainerEntity/Components/Component_[5052757994340238524]/Transform Data/Translate/2", + "value": 1.0 + } + ] + }, + "Instance_[745873797397]": { + "Source": "Prefabs/TestData/Graphics/AtomCubeWall.prefab", + "Patches": [ + { + "op": "replace", + "path": "/ContainerEntity/Components/Component_[5052757994340238524]/Parent Entity", + "value": "../Entity_[1146574390643]" + }, + { + "op": "replace", + "path": "/ContainerEntity/Components/Component_[5052757994340238524]/Transform Data/Translate/0", + "value": 50.0 + }, + { + "op": "replace", + "path": "/ContainerEntity/Components/Component_[5052757994340238524]/Transform Data/Translate/1", + "value": 20.0 + }, + { + "op": "replace", + "path": "/ContainerEntity/Components/Component_[5052757994340238524]/Transform Data/Translate/2", + "value": 1.0 + } + ] + }, + "Instance_[745873797497]": { + "Source": "Prefabs/TestData/Graphics/AtomCubeWall.prefab", + "Patches": [ + { + "op": "replace", + "path": "/ContainerEntity/Components/Component_[5052757994340238524]/Parent Entity", + "value": "../Entity_[1146574390643]" + }, + { + "op": "replace", + "path": "/ContainerEntity/Components/Component_[5052757994340238524]/Transform Data/Translate/0", + "value": 50.0 + }, + { + "op": "replace", + "path": "/ContainerEntity/Components/Component_[5052757994340238524]/Transform Data/Translate/1", + "value": 25.0 + }, + { + "op": "replace", + "path": "/ContainerEntity/Components/Component_[5052757994340238524]/Transform Data/Translate/2", + "value": 1.0 + } + ] + }, + "Instance_[745873797597]": { + "Source": "Prefabs/TestData/Graphics/AtomCubeWall.prefab", + "Patches": [ + { + "op": "replace", + "path": "/ContainerEntity/Components/Component_[5052757994340238524]/Parent Entity", + "value": "../Entity_[1146574390643]" + }, + { + "op": "replace", + "path": "/ContainerEntity/Components/Component_[5052757994340238524]/Transform Data/Translate/0", + "value": 50.0 + }, + { + "op": "replace", + "path": "/ContainerEntity/Components/Component_[5052757994340238524]/Transform Data/Translate/1", + "value": 30.0 + }, + { + "op": "replace", + "path": "/ContainerEntity/Components/Component_[5052757994340238524]/Transform Data/Translate/2", + "value": 1.0 + } + ] + }, + "Instance_[745873797697]": { + "Source": "Prefabs/TestData/Graphics/AtomCubeWall.prefab", + "Patches": [ + { + "op": "replace", + "path": "/ContainerEntity/Components/Component_[5052757994340238524]/Parent Entity", + "value": "../Entity_[1146574390643]" + }, + { + "op": "replace", + "path": "/ContainerEntity/Components/Component_[5052757994340238524]/Transform Data/Translate/0", + "value": 50.0 + }, + { + "op": "replace", + "path": "/ContainerEntity/Components/Component_[5052757994340238524]/Transform Data/Translate/1", + "value": 35.0 + }, + { + "op": "replace", + "path": "/ContainerEntity/Components/Component_[5052757994340238524]/Transform Data/Translate/2", + "value": 1.0 + } + ] + }, + "Instance_[745873797797]": { + "Source": "Prefabs/TestData/Graphics/AtomCubeWall.prefab", + "Patches": [ + { + "op": "replace", + "path": "/ContainerEntity/Components/Component_[5052757994340238524]/Parent Entity", + "value": "../Entity_[1146574390643]" + }, + { + "op": "replace", + "path": "/ContainerEntity/Components/Component_[5052757994340238524]/Transform Data/Translate/0", + "value": 50.0 + }, + { + "op": "replace", + "path": "/ContainerEntity/Components/Component_[5052757994340238524]/Transform Data/Translate/1", + "value": 40.0 + }, + { + "op": "replace", + "path": "/ContainerEntity/Components/Component_[5052757994340238524]/Transform Data/Translate/2", + "value": 1.0 + } + ] + }, + "Instance_[745873797897]": { + "Source": "Prefabs/TestData/Graphics/AtomCubeWall.prefab", + "Patches": [ + { + "op": "replace", + "path": "/ContainerEntity/Components/Component_[5052757994340238524]/Parent Entity", + "value": "../Entity_[1146574390643]" + }, + { + "op": "replace", + "path": "/ContainerEntity/Components/Component_[5052757994340238524]/Transform Data/Translate/0", + "value": 50.0 + }, + { + "op": "replace", + "path": "/ContainerEntity/Components/Component_[5052757994340238524]/Transform Data/Translate/1", + "value": 45.0 + }, + { + "op": "replace", + "path": "/ContainerEntity/Components/Component_[5052757994340238524]/Transform Data/Translate/2", + "value": 1.0 + } + ] + }, + "Instance_[745873797997]": { + "Source": "Prefabs/TestData/Graphics/AtomCubeWall.prefab", + "Patches": [ + { + "op": "replace", + "path": "/ContainerEntity/Components/Component_[5052757994340238524]/Parent Entity", + "value": "../Entity_[1146574390643]" + }, + { + "op": "replace", + "path": "/ContainerEntity/Components/Component_[5052757994340238524]/Transform Data/Translate/0", + "value": 50.0 + }, + { + "op": "replace", + "path": "/ContainerEntity/Components/Component_[5052757994340238524]/Transform Data/Translate/1", + "value": 50.0 + }, + { + "op": "replace", + "path": "/ContainerEntity/Components/Component_[5052757994340238524]/Transform Data/Translate/2", + "value": 1.0 + } + ] + }, + "Instance_[745873798097]": { + "Source": "Prefabs/TestData/Graphics/AtomCubeWall.prefab", + "Patches": [ + { + "op": "replace", + "path": "/ContainerEntity/Components/Component_[5052757994340238524]/Parent Entity", + "value": "../Entity_[1146574390643]" + }, + { + "op": "replace", + "path": "/ContainerEntity/Components/Component_[5052757994340238524]/Transform Data/Translate/0", + "value": 50.0 + }, + { + "op": "replace", + "path": "/ContainerEntity/Components/Component_[5052757994340238524]/Transform Data/Translate/1", + "value": 55.0 + }, + { + "op": "replace", + "path": "/ContainerEntity/Components/Component_[5052757994340238524]/Transform Data/Translate/2", + "value": 1.0 + } + ] + }, + "Instance_[745873798197]": { + "Source": "Prefabs/TestData/Graphics/AtomCubeWall.prefab", + "Patches": [ + { + "op": "replace", + "path": "/ContainerEntity/Components/Component_[5052757994340238524]/Parent Entity", + "value": "../Entity_[1146574390643]" + }, + { + "op": "replace", + "path": "/ContainerEntity/Components/Component_[5052757994340238524]/Transform Data/Translate/0", + "value": 50.0 + }, + { + "op": "replace", + "path": "/ContainerEntity/Components/Component_[5052757994340238524]/Transform Data/Translate/1", + "value": 60.0 + }, + { + "op": "replace", + "path": "/ContainerEntity/Components/Component_[5052757994340238524]/Transform Data/Translate/2", + "value": 1.0 + } + ] + }, + "Instance_[745873798297]": { + "Source": "Prefabs/TestData/Graphics/AtomCubeWall.prefab", + "Patches": [ + { + "op": "replace", + "path": "/ContainerEntity/Components/Component_[5052757994340238524]/Parent Entity", + "value": "../Entity_[1146574390643]" + }, + { + "op": "replace", + "path": "/ContainerEntity/Components/Component_[5052757994340238524]/Transform Data/Translate/0", + "value": 50.0 + }, + { + "op": "replace", + "path": "/ContainerEntity/Components/Component_[5052757994340238524]/Transform Data/Translate/1", + "value": 65.0 + }, + { + "op": "replace", + "path": "/ContainerEntity/Components/Component_[5052757994340238524]/Transform Data/Translate/2", + "value": 1.0 + } + ] + }, + "Instance_[745873798397]": { + "Source": "Prefabs/TestData/Graphics/AtomCubeWall.prefab", + "Patches": [ + { + "op": "replace", + "path": "/ContainerEntity/Components/Component_[5052757994340238524]/Parent Entity", + "value": "../Entity_[1146574390643]" + }, + { + "op": "replace", + "path": "/ContainerEntity/Components/Component_[5052757994340238524]/Transform Data/Translate/0", + "value": 50.0 + }, + { + "op": "replace", + "path": "/ContainerEntity/Components/Component_[5052757994340238524]/Transform Data/Translate/1", + "value": 70.0 + }, + { + "op": "replace", + "path": "/ContainerEntity/Components/Component_[5052757994340238524]/Transform Data/Translate/2", + "value": 1.0 + } + ] + }, + "Instance_[745873798497]": { + "Source": "Prefabs/TestData/Graphics/AtomCubeWall.prefab", + "Patches": [ + { + "op": "replace", + "path": "/ContainerEntity/Components/Component_[5052757994340238524]/Parent Entity", + "value": "../Entity_[1146574390643]" + }, + { + "op": "replace", + "path": "/ContainerEntity/Components/Component_[5052757994340238524]/Transform Data/Translate/0", + "value": 50.0 + }, + { + "op": "replace", + "path": "/ContainerEntity/Components/Component_[5052757994340238524]/Transform Data/Translate/1", + "value": 75.0 + }, + { + "op": "replace", + "path": "/ContainerEntity/Components/Component_[5052757994340238524]/Transform Data/Translate/2", + "value": 1.0 + } + ] + }, + "Instance_[745873798597]": { + "Source": "Prefabs/TestData/Graphics/AtomCubeWall.prefab", + "Patches": [ + { + "op": "replace", + "path": "/ContainerEntity/Components/Component_[5052757994340238524]/Parent Entity", + "value": "../Entity_[1146574390643]" + }, + { + "op": "replace", + "path": "/ContainerEntity/Components/Component_[5052757994340238524]/Transform Data/Translate/0", + "value": 50.0 + }, + { + "op": "replace", + "path": "/ContainerEntity/Components/Component_[5052757994340238524]/Transform Data/Translate/1", + "value": 80.0 + }, + { + "op": "replace", + "path": "/ContainerEntity/Components/Component_[5052757994340238524]/Transform Data/Translate/2", + "value": 1.0 + } + ] + }, + "Instance_[745873798697]": { + "Source": "Prefabs/TestData/Graphics/AtomCubeWall.prefab", + "Patches": [ + { + "op": "replace", + "path": "/ContainerEntity/Components/Component_[5052757994340238524]/Parent Entity", + "value": "../Entity_[1146574390643]" + }, + { + "op": "replace", + "path": "/ContainerEntity/Components/Component_[5052757994340238524]/Transform Data/Translate/0", + "value": 50.0 + }, + { + "op": "replace", + "path": "/ContainerEntity/Components/Component_[5052757994340238524]/Transform Data/Translate/1", + "value": 85.0 + }, + { + "op": "replace", + "path": "/ContainerEntity/Components/Component_[5052757994340238524]/Transform Data/Translate/2", + "value": 1.0 + } + ] + }, + "Instance_[745873798797]": { + "Source": "Prefabs/TestData/Graphics/AtomCubeWall.prefab", + "Patches": [ + { + "op": "replace", + "path": "/ContainerEntity/Components/Component_[5052757994340238524]/Parent Entity", + "value": "../Entity_[1146574390643]" + }, + { + "op": "replace", + "path": "/ContainerEntity/Components/Component_[5052757994340238524]/Transform Data/Translate/0", + "value": 50.0 + }, + { + "op": "replace", + "path": "/ContainerEntity/Components/Component_[5052757994340238524]/Transform Data/Translate/1", + "value": 90.0 + }, + { + "op": "replace", + "path": "/ContainerEntity/Components/Component_[5052757994340238524]/Transform Data/Translate/2", + "value": 1.0 + } + ] + }, + "Instance_[745873798897]": { + "Source": "Prefabs/TestData/Graphics/AtomCubeWall.prefab", + "Patches": [ + { + "op": "replace", + "path": "/ContainerEntity/Components/Component_[5052757994340238524]/Parent Entity", + "value": "../Entity_[1146574390643]" + }, + { + "op": "replace", + "path": "/ContainerEntity/Components/Component_[5052757994340238524]/Transform Data/Translate/0", + "value": 50.0 + }, + { + "op": "replace", + "path": "/ContainerEntity/Components/Component_[5052757994340238524]/Transform Data/Translate/1", + "value": 95.0 + }, + { + "op": "replace", + "path": "/ContainerEntity/Components/Component_[5052757994340238524]/Transform Data/Translate/2", + "value": 1.0 + } + ] + }, + "Instance_[745873798997]": { + "Source": "Prefabs/TestData/Graphics/AtomCubeWall.prefab", + "Patches": [ + { + "op": "replace", + "path": "/ContainerEntity/Components/Component_[5052757994340238524]/Parent Entity", + "value": "../Entity_[1146574390643]" + }, + { + "op": "replace", + "path": "/ContainerEntity/Components/Component_[5052757994340238524]/Transform Data/Translate/0", + "value": 50.0 + }, + { + "op": "replace", + "path": "/ContainerEntity/Components/Component_[5052757994340238524]/Transform Data/Translate/1", + "value": 100.0 + }, + { + "op": "replace", + "path": "/ContainerEntity/Components/Component_[5052757994340238524]/Transform Data/Translate/2", + "value": 1.0 + } + ] + }, + "Instance_[745873799097]": { + "Source": "Prefabs/TestData/Graphics/AtomCubeWall.prefab", + "Patches": [ + { + "op": "replace", + "path": "/ContainerEntity/Components/Component_[5052757994340238524]/Parent Entity", + "value": "../Entity_[1146574390643]" + }, + { + "op": "replace", + "path": "/ContainerEntity/Components/Component_[5052757994340238524]/Transform Data/Translate/0", + "value": 50.0 + }, + { + "op": "replace", + "path": "/ContainerEntity/Components/Component_[5052757994340238524]/Transform Data/Translate/1", + "value": 105.0 + }, + { + "op": "replace", + "path": "/ContainerEntity/Components/Component_[5052757994340238524]/Transform Data/Translate/2", + "value": 1.0 + } + ] + } + } +} \ No newline at end of file diff --git a/AutomatedTesting/Levels/Performance/10KEntityCpuPerfTest/tags.txt b/AutomatedTesting/Levels/Performance/10KEntityCpuPerfTest/tags.txt new file mode 100644 index 0000000000..0d6c1880e7 --- /dev/null +++ b/AutomatedTesting/Levels/Performance/10KEntityCpuPerfTest/tags.txt @@ -0,0 +1,12 @@ +0,0,0,0,0,0 +0,0,0,0,0,0 +0,0,0,0,0,0 +0,0,0,0,0,0 +0,0,0,0,0,0 +0,0,0,0,0,0 +0,0,0,0,0,0 +0,0,0,0,0,0 +0,0,0,0,0,0 +0,0,0,0,0,0 +0,0,0,0,0,0 +0,0,0,0,0,0 diff --git a/AutomatedTesting/Levels/Performance/10kVegInstancesTest/10KVegInstancesTest.prefab b/AutomatedTesting/Levels/Performance/10kVegInstancesTest/10KVegInstancesTest.prefab new file mode 100644 index 0000000000..4e6b17de73 --- /dev/null +++ b/AutomatedTesting/Levels/Performance/10kVegInstancesTest/10KVegInstancesTest.prefab @@ -0,0 +1,4216 @@ +{ + "ContainerEntity": { + "Id": "Entity_[1146574390643]", + "Name": "Level", + "Components": { + "Component_[10641544592923449938]": { + "$type": "EditorInspectorComponent", + "Id": 10641544592923449938 + }, + "Component_[12039882709170782873]": { + "$type": "EditorOnlyEntityComponent", + "Id": 12039882709170782873 + }, + "Component_[12265484671603697631]": { + "$type": "EditorPendingCompositionComponent", + "Id": 12265484671603697631 + }, + "Component_[14126657869720434043]": { + "$type": "EditorEntitySortComponent", + "Id": 14126657869720434043, + "Child Entity Order": [ + "Entity_[1176639161715]", + "Entity_[655472831242]", + "Entity_[659767798538]" + ] + }, + "Component_[14900044899939389494]": { + "$type": "EditorDebugComponent", + "Id": 14900044899939389494, + "Configuration": { + "ShowDebugStats": true + } + }, + "Component_[15230859088967841193]": { + "$type": "{27F1E1A1-8D9D-4C3B-BD3A-AFB9762449C0} TransformComponent", + "Id": 15230859088967841193, + "Parent Entity": "" + }, + "Component_[16239496886950819870]": { + "$type": "EditorDisabledCompositionComponent", + "Id": 16239496886950819870 + }, + "Component_[16599802339219703605]": { + "$type": "EditorLevelSettingsComponent", + "Id": 16599802339219703605, + "Configuration": { + "AreaSystemConfig": { + "ViewRectangleSize": 25, + "SectorDensity": 2, + "SectorSizeInMeters": 10 + } + } + }, + "Component_[5688118765544765547]": { + "$type": "EditorEntityIconComponent", + "Id": 5688118765544765547 + }, + "Component_[6545738857812235305]": { + "$type": "SelectionComponent", + "Id": 6545738857812235305 + }, + "Component_[7247035804068349658]": { + "$type": "EditorPrefabComponent", + "Id": 7247035804068349658 + }, + "Component_[9307224322037797205]": { + "$type": "EditorLockComponent", + "Id": 9307224322037797205 + }, + "Component_[9562516168917670048]": { + "$type": "EditorVisibilityComponent", + "Id": 9562516168917670048 + } + } + }, + "Entities": { + "Entity_[1155164325235]": { + "Id": "Entity_[1155164325235]", + "Name": "Sun", + "Components": { + "Component_[10440557478882592717]": { + "$type": "SelectionComponent", + "Id": 10440557478882592717 + }, + "Component_[13620450453324765907]": { + "$type": "EditorLockComponent", + "Id": 13620450453324765907 + }, + "Component_[2134313378593666258]": { + "$type": "EditorInspectorComponent", + "Id": 2134313378593666258 + }, + "Component_[234010807770404186]": { + "$type": "EditorVisibilityComponent", + "Id": 234010807770404186 + }, + "Component_[2970359110423865725]": { + "$type": "EditorEntityIconComponent", + "Id": 2970359110423865725 + }, + "Component_[3722854130373041803]": { + "$type": "EditorOnlyEntityComponent", + "Id": 3722854130373041803 + }, + "Component_[5992533738676323195]": { + "$type": "EditorDisabledCompositionComponent", + "Id": 5992533738676323195 + }, + "Component_[7378860763541895402]": { + "$type": "AZ::Render::EditorDirectionalLightComponent", + "Id": 7378860763541895402, + "Controller": { + "Configuration": { + "Intensity": 1.0, + "CameraEntityId": "", + "ShadowFilterMethod": 1 + } + } + }, + "Component_[7892834440890947578]": { + "$type": "{27F1E1A1-8D9D-4C3B-BD3A-AFB9762449C0} TransformComponent", + "Id": 7892834440890947578, + "Parent Entity": "Entity_[1176639161715]", + "Transform Data": { + "Translate": [ + 0.0, + 0.0, + 13.487043380737305 + ], + "Rotate": [ + -76.13099670410156, + -0.847000002861023, + -15.8100004196167 + ] + } + }, + "Component_[8599729549570828259]": { + "$type": "EditorEntitySortComponent", + "Id": 8599729549570828259 + }, + "Component_[952797371922080273]": { + "$type": "EditorPendingCompositionComponent", + "Id": 952797371922080273 + } + } + }, + "Entity_[1159459292531]": { + "Id": "Entity_[1159459292531]", + "Name": "Ground", + "Components": { + "Component_[11701138785793981042]": { + "$type": "SelectionComponent", + "Id": 11701138785793981042 + }, + "Component_[12260880513256986252]": { + "$type": "EditorEntityIconComponent", + "Id": 12260880513256986252 + }, + "Component_[13711420870643673468]": { + "$type": "EditorDisabledCompositionComponent", + "Id": 13711420870643673468 + }, + "Component_[138002849734991713]": { + "$type": "EditorOnlyEntityComponent", + "Id": 138002849734991713 + }, + "Component_[16578565737331764849]": { + "$type": "{27F1E1A1-8D9D-4C3B-BD3A-AFB9762449C0} TransformComponent", + "Id": 16578565737331764849, + "Parent Entity": "Entity_[1176639161715]" + }, + "Component_[16919232076966545697]": { + "$type": "EditorInspectorComponent", + "Id": 16919232076966545697 + }, + "Component_[5182430712893438093]": { + "$type": "EditorMaterialComponent", + "Id": 5182430712893438093 + }, + "Component_[5675108321710651991]": { + "$type": "AZ::Render::EditorMeshComponent", + "Id": 5675108321710651991, + "Controller": { + "Configuration": { + "ModelAsset": { + "assetId": { + "guid": "{0CD745C0-6AA8-569A-A68A-73A3270986C4}", + "subId": 277889906 + }, + "assetHint": "objects/groudplane/groundplane_512x512m.azmodel" + } + } + } + }, + "Component_[5681893399601237518]": { + "$type": "EditorEntitySortComponent", + "Id": 5681893399601237518 + }, + "Component_[592692962543397545]": { + "$type": "EditorPendingCompositionComponent", + "Id": 592692962543397545 + }, + "Component_[7090012899106946164]": { + "$type": "EditorLockComponent", + "Id": 7090012899106946164 + }, + "Component_[9410832619875640998]": { + "$type": "EditorVisibilityComponent", + "Id": 9410832619875640998 + } + } + }, + "Entity_[1163754259827]": { + "Id": "Entity_[1163754259827]", + "Name": "Camera", + "Components": { + "Component_[11895140916889160460]": { + "$type": "EditorEntityIconComponent", + "Id": 11895140916889160460 + }, + "Component_[16880285896855930892]": { + "$type": "{CA11DA46-29FF-4083-B5F6-E02C3A8C3A3D} EditorCameraComponent", + "Id": 16880285896855930892, + "Controller": { + "Configuration": { + "Field of View": 55.0, + "EditorEntityId": 17772187112516355261 + } + } + }, + "Component_[17187464423780271193]": { + "$type": "EditorLockComponent", + "Id": 17187464423780271193 + }, + "Component_[17495696818315413311]": { + "$type": "EditorEntitySortComponent", + "Id": 17495696818315413311 + }, + "Component_[18086214374043522055]": { + "$type": "{27F1E1A1-8D9D-4C3B-BD3A-AFB9762449C0} TransformComponent", + "Id": 18086214374043522055, + "Parent Entity": "Entity_[1176639161715]", + "Transform Data": { + "Translate": [ + -2.3000001907348633, + -3.9368600845336914, + 1.0 + ], + "Rotate": [ + -2.050307512283325, + 1.9552897214889526, + -43.623355865478516 + ] + } + }, + "Component_[18387556550380114975]": { + "$type": "SelectionComponent", + "Id": 18387556550380114975 + }, + "Component_[2654521436129313160]": { + "$type": "EditorVisibilityComponent", + "Id": 2654521436129313160 + }, + "Component_[5265045084611556958]": { + "$type": "EditorDisabledCompositionComponent", + "Id": 5265045084611556958 + }, + "Component_[7169798125182238623]": { + "$type": "EditorPendingCompositionComponent", + "Id": 7169798125182238623 + }, + "Component_[7255796294953281766]": { + "$type": "GenericComponentWrapper", + "Id": 7255796294953281766, + "m_template": { + "$type": "FlyCameraInputComponent" + } + }, + "Component_[8866210352157164042]": { + "$type": "EditorInspectorComponent", + "Id": 8866210352157164042 + }, + "Component_[9129253381063760879]": { + "$type": "EditorOnlyEntityComponent", + "Id": 9129253381063760879 + } + } + }, + "Entity_[1168049227123]": { + "Id": "Entity_[1168049227123]", + "Name": "Grid", + "Components": { + "Component_[11443347433215807130]": { + "$type": "EditorEntityIconComponent", + "Id": 11443347433215807130 + }, + "Component_[11779275529534764488]": { + "$type": "SelectionComponent", + "Id": 11779275529534764488 + }, + "Component_[14249419413039427459]": { + "$type": "EditorInspectorComponent", + "Id": 14249419413039427459 + }, + "Component_[15448581635946161318]": { + "$type": "AZ::Render::EditorGridComponent", + "Id": 15448581635946161318, + "Controller": { + "Configuration": { + "primarySpacing": 4.0, + "primaryColor": [ + 0.501960813999176, + 0.501960813999176, + 0.501960813999176 + ], + "secondarySpacing": 0.5, + "secondaryColor": [ + 0.250980406999588, + 0.250980406999588, + 0.250980406999588 + ] + } + } + }, + "Component_[1843303322527297409]": { + "$type": "EditorDisabledCompositionComponent", + "Id": 1843303322527297409 + }, + "Component_[380249072065273654]": { + "$type": "{27F1E1A1-8D9D-4C3B-BD3A-AFB9762449C0} TransformComponent", + "Id": 380249072065273654, + "Parent Entity": "Entity_[1176639161715]" + }, + "Component_[7476660583684339787]": { + "$type": "EditorPendingCompositionComponent", + "Id": 7476660583684339787 + }, + "Component_[7557626501215118375]": { + "$type": "EditorEntitySortComponent", + "Id": 7557626501215118375 + }, + "Component_[7984048488947365511]": { + "$type": "EditorVisibilityComponent", + "Id": 7984048488947365511 + }, + "Component_[8118181039276487398]": { + "$type": "EditorOnlyEntityComponent", + "Id": 8118181039276487398 + }, + "Component_[9189909764215270515]": { + "$type": "EditorLockComponent", + "Id": 9189909764215270515 + } + } + }, + "Entity_[1172344194419]": { + "Id": "Entity_[1172344194419]", + "Name": "Shader Ball", + "Components": { + "Component_[10789351944715265527]": { + "$type": "EditorOnlyEntityComponent", + "Id": 10789351944715265527 + }, + "Component_[12037033284781049225]": { + "$type": "EditorEntitySortComponent", + "Id": 12037033284781049225 + }, + "Component_[13759153306105970079]": { + "$type": "EditorPendingCompositionComponent", + "Id": 13759153306105970079 + }, + "Component_[14135560884830586279]": { + "$type": "EditorInspectorComponent", + "Id": 14135560884830586279 + }, + "Component_[16247165675903986673]": { + "$type": "EditorVisibilityComponent", + "Id": 16247165675903986673 + }, + "Component_[18082433625958885247]": { + "$type": "EditorDisabledCompositionComponent", + "Id": 18082433625958885247 + }, + "Component_[6472623349872972660]": { + "$type": "{27F1E1A1-8D9D-4C3B-BD3A-AFB9762449C0} TransformComponent", + "Id": 6472623349872972660, + "Parent Entity": "Entity_[1176639161715]", + "Transform Data": { + "Rotate": [ + 0.0, + 0.10000000149011612, + 180.0 + ] + } + }, + "Component_[6495255223970673916]": { + "$type": "AZ::Render::EditorMeshComponent", + "Id": 6495255223970673916, + "Controller": { + "Configuration": { + "ModelAsset": { + "assetId": { + "guid": "{FD340C30-755C-5911-92A3-19A3F7A77931}", + "subId": 281415304 + }, + "assetHint": "objects/shaderball/shaderball_default_1m.azmodel" + } + } + } + }, + "Component_[8056625192494070973]": { + "$type": "SelectionComponent", + "Id": 8056625192494070973 + }, + "Component_[8550141614185782969]": { + "$type": "EditorEntityIconComponent", + "Id": 8550141614185782969 + }, + "Component_[9439770997198325425]": { + "$type": "EditorLockComponent", + "Id": 9439770997198325425 + } + } + }, + "Entity_[1176639161715]": { + "Id": "Entity_[1176639161715]", + "Name": "Atom Default Environment", + "Components": { + "Component_[10757302973393310045]": { + "$type": "{27F1E1A1-8D9D-4C3B-BD3A-AFB9762449C0} TransformComponent", + "Id": 10757302973393310045, + "Parent Entity": "Entity_[1146574390643]" + }, + "Component_[14505817420424255464]": { + "$type": "EditorInspectorComponent", + "Id": 14505817420424255464, + "ComponentOrderEntryArray": [ + { + "ComponentId": 10757302973393310045 + } + ] + }, + "Component_[14988041764659020032]": { + "$type": "EditorLockComponent", + "Id": 14988041764659020032 + }, + "Component_[15808690248755038124]": { + "$type": "SelectionComponent", + "Id": 15808690248755038124 + }, + "Component_[15900837685796817138]": { + "$type": "EditorVisibilityComponent", + "Id": 15900837685796817138 + }, + "Component_[3298767348226484884]": { + "$type": "EditorOnlyEntityComponent", + "Id": 3298767348226484884 + }, + "Component_[4076975109609220594]": { + "$type": "EditorPendingCompositionComponent", + "Id": 4076975109609220594 + }, + "Component_[5679760548946028854]": { + "$type": "EditorDisabledCompositionComponent", + "Id": 5679760548946028854 + }, + "Component_[5855590796136709437]": { + "$type": "EditorEntitySortComponent", + "Id": 5855590796136709437, + "Child Entity Order": [ + "Entity_[1155164325235]", + "Entity_[1180934129011]", + "Entity_[1172344194419]", + "Entity_[1168049227123]", + "Entity_[1163754259827]", + "Entity_[1159459292531]" + ] + }, + "Component_[9277695270015777859]": { + "$type": "EditorEntityIconComponent", + "Id": 9277695270015777859 + } + } + }, + "Entity_[1180934129011]": { + "Id": "Entity_[1180934129011]", + "Name": "Global Sky", + "Components": { + "Component_[11231930600558681245]": { + "$type": "AZ::Render::EditorHDRiSkyboxComponent", + "Id": 11231930600558681245, + "Controller": { + "Configuration": { + "CubemapAsset": { + "assetId": { + "guid": "{215E47FD-D181-5832-B1AB-91673ABF6399}", + "subId": 1000 + }, + "assetHint": "lightingpresets/highcontrast/goegap_4k_skyboxcm.exr.streamingimage" + } + } + } + }, + "Component_[11980494120202836095]": { + "$type": "SelectionComponent", + "Id": 11980494120202836095 + }, + "Component_[1428633914413949476]": { + "$type": "EditorLockComponent", + "Id": 1428633914413949476 + }, + "Component_[14936200426671614999]": { + "$type": "AZ::Render::EditorImageBasedLightComponent", + "Id": 14936200426671614999, + "Controller": { + "Configuration": { + "diffuseImageAsset": { + "assetId": { + "guid": "{3FD09945-D0F2-55C8-B9AF-B2FD421FE3BE}", + "subId": 3000 + }, + "assetHint": "lightingpresets/highcontrast/goegap_4k_iblglobalcm_ibldiffuse.exr.streamingimage" + }, + "specularImageAsset": { + "assetId": { + "guid": "{3FD09945-D0F2-55C8-B9AF-B2FD421FE3BE}", + "subId": 2000 + }, + "assetHint": "lightingpresets/highcontrast/goegap_4k_iblglobalcm_iblspecular.exr.streamingimage" + } + } + } + }, + "Component_[14994774102579326069]": { + "$type": "EditorDisabledCompositionComponent", + "Id": 14994774102579326069 + }, + "Component_[15417479889044493340]": { + "$type": "EditorPendingCompositionComponent", + "Id": 15417479889044493340 + }, + "Component_[15826613364991382688]": { + "$type": "EditorEntitySortComponent", + "Id": 15826613364991382688 + }, + "Component_[1665003113283562343]": { + "$type": "EditorOnlyEntityComponent", + "Id": 1665003113283562343 + }, + "Component_[3704934735944502280]": { + "$type": "EditorEntityIconComponent", + "Id": 3704934735944502280 + }, + "Component_[5698542331457326479]": { + "$type": "EditorVisibilityComponent", + "Id": 5698542331457326479 + }, + "Component_[6644513399057217122]": { + "$type": "{27F1E1A1-8D9D-4C3B-BD3A-AFB9762449C0} TransformComponent", + "Id": 6644513399057217122, + "Parent Entity": "Entity_[1176639161715]" + }, + "Component_[931091830724002070]": { + "$type": "EditorInspectorComponent", + "Id": 931091830724002070 + } + } + }, + "Entity_[2994134174757065]": { + "Id": "Entity_[2994134174757065]", + "Name": "Surface", + "Components": { + "Component_[11461736083966389166]": { + "$type": "EditorSurfaceDataShapeComponent", + "Id": 11461736083966389166 + }, + "Component_[13283029886763197381]": { + "$type": "EditorLockComponent", + "Id": 13283029886763197381 + }, + "Component_[14567565716714370511]": { + "$type": "SelectionComponent", + "Id": 14567565716714370511 + }, + "Component_[14826005606950858247]": { + "$type": "EditorEntitySortComponent", + "Id": 14826005606950858247 + }, + "Component_[15952534836289892585]": { + "$type": "EditorInspectorComponent", + "Id": 15952534836289892585 + }, + "Component_[16429683758229234581]": { + "$type": "EditorPendingCompositionComponent", + "Id": 16429683758229234581 + }, + "Component_[3145304225809715428]": { + "$type": "{27F1E1A1-8D9D-4C3B-BD3A-AFB9762449C0} TransformComponent", + "Id": 3145304225809715428, + "Parent Entity": "Entity_[655472831242]", + "Transform Data": { + "Translate": [ + 24.860464096069336, + 6.0520172119140625, + 31.24283218383789 + ] + } + }, + "Component_[3194434268397003277]": { + "$type": "EditorBoxShapeComponent", + "Id": 3194434268397003277, + "Visible": false, + "DisplayFilled": false, + "BoxShape": { + "Configuration": { + "IsFilled": false, + "Dimensions": [ + 200.0, + 200.0, + 0.10000000149011612 + ] + } + } + }, + "Component_[5124743265172522601]": { + "$type": "EditorDisabledCompositionComponent", + "Id": 5124743265172522601 + }, + "Component_[6141261141385234831]": { + "$type": "EditorOnlyEntityComponent", + "Id": 6141261141385234831 + }, + "Component_[8075217947437400102]": { + "$type": "EditorVisibilityComponent", + "Id": 8075217947437400102 + }, + "Component_[9742596769363363433]": { + "$type": "EditorEntityIconComponent", + "Id": 9742596769363363433 + } + } + }, + "Entity_[2994138469724361]": { + "Id": "Entity_[2994138469724361]", + "Name": "Surface", + "Components": { + "Component_[11461736083966389166]": { + "$type": "EditorSurfaceDataShapeComponent", + "Id": 11461736083966389166 + }, + "Component_[13283029886763197381]": { + "$type": "EditorLockComponent", + "Id": 13283029886763197381 + }, + "Component_[14567565716714370511]": { + "$type": "SelectionComponent", + "Id": 14567565716714370511 + }, + "Component_[14826005606950858247]": { + "$type": "EditorEntitySortComponent", + "Id": 14826005606950858247 + }, + "Component_[15952534836289892585]": { + "$type": "EditorInspectorComponent", + "Id": 15952534836289892585 + }, + "Component_[16429683758229234581]": { + "$type": "EditorPendingCompositionComponent", + "Id": 16429683758229234581 + }, + "Component_[3145304225809715428]": { + "$type": "{27F1E1A1-8D9D-4C3B-BD3A-AFB9762449C0} TransformComponent", + "Id": 3145304225809715428, + "Parent Entity": "Entity_[655472831242]", + "Transform Data": { + "Translate": [ + 24.860464096069336, + 6.0520172119140625, + 33.24283218383789 + ] + } + }, + "Component_[3194434268397003277]": { + "$type": "EditorBoxShapeComponent", + "Id": 3194434268397003277, + "Visible": false, + "DisplayFilled": false, + "BoxShape": { + "Configuration": { + "IsFilled": false, + "Dimensions": [ + 200.0, + 200.0, + 0.10000000149011612 + ] + } + } + }, + "Component_[5124743265172522601]": { + "$type": "EditorDisabledCompositionComponent", + "Id": 5124743265172522601 + }, + "Component_[6141261141385234831]": { + "$type": "EditorOnlyEntityComponent", + "Id": 6141261141385234831 + }, + "Component_[8075217947437400102]": { + "$type": "EditorVisibilityComponent", + "Id": 8075217947437400102 + }, + "Component_[9742596769363363433]": { + "$type": "EditorEntityIconComponent", + "Id": 9742596769363363433 + } + } + }, + "Entity_[2994142764691657]": { + "Id": "Entity_[2994142764691657]", + "Name": "Surface", + "Components": { + "Component_[11461736083966389166]": { + "$type": "EditorSurfaceDataShapeComponent", + "Id": 11461736083966389166 + }, + "Component_[13283029886763197381]": { + "$type": "EditorLockComponent", + "Id": 13283029886763197381 + }, + "Component_[14567565716714370511]": { + "$type": "SelectionComponent", + "Id": 14567565716714370511 + }, + "Component_[14826005606950858247]": { + "$type": "EditorEntitySortComponent", + "Id": 14826005606950858247 + }, + "Component_[15952534836289892585]": { + "$type": "EditorInspectorComponent", + "Id": 15952534836289892585 + }, + "Component_[16429683758229234581]": { + "$type": "EditorPendingCompositionComponent", + "Id": 16429683758229234581 + }, + "Component_[3145304225809715428]": { + "$type": "{27F1E1A1-8D9D-4C3B-BD3A-AFB9762449C0} TransformComponent", + "Id": 3145304225809715428, + "Parent Entity": "Entity_[655472831242]", + "Transform Data": { + "Translate": [ + 24.860464096069336, + 6.0520172119140625, + 29.24283218383789 + ] + } + }, + "Component_[3194434268397003277]": { + "$type": "EditorBoxShapeComponent", + "Id": 3194434268397003277, + "Visible": false, + "DisplayFilled": false, + "BoxShape": { + "Configuration": { + "IsFilled": false, + "Dimensions": [ + 200.0, + 200.0, + 0.10000000149011612 + ] + } + } + }, + "Component_[5124743265172522601]": { + "$type": "EditorDisabledCompositionComponent", + "Id": 5124743265172522601 + }, + "Component_[6141261141385234831]": { + "$type": "EditorOnlyEntityComponent", + "Id": 6141261141385234831 + }, + "Component_[8075217947437400102]": { + "$type": "EditorVisibilityComponent", + "Id": 8075217947437400102 + }, + "Component_[9742596769363363433]": { + "$type": "EditorEntityIconComponent", + "Id": 9742596769363363433 + } + } + }, + "Entity_[2994147059658953]": { + "Id": "Entity_[2994147059658953]", + "Name": "Surface", + "Components": { + "Component_[11461736083966389166]": { + "$type": "EditorSurfaceDataShapeComponent", + "Id": 11461736083966389166 + }, + "Component_[13283029886763197381]": { + "$type": "EditorLockComponent", + "Id": 13283029886763197381 + }, + "Component_[14567565716714370511]": { + "$type": "SelectionComponent", + "Id": 14567565716714370511 + }, + "Component_[14826005606950858247]": { + "$type": "EditorEntitySortComponent", + "Id": 14826005606950858247 + }, + "Component_[15952534836289892585]": { + "$type": "EditorInspectorComponent", + "Id": 15952534836289892585 + }, + "Component_[16429683758229234581]": { + "$type": "EditorPendingCompositionComponent", + "Id": 16429683758229234581 + }, + "Component_[3145304225809715428]": { + "$type": "{27F1E1A1-8D9D-4C3B-BD3A-AFB9762449C0} TransformComponent", + "Id": 3145304225809715428, + "Parent Entity": "Entity_[655472831242]", + "Transform Data": { + "Translate": [ + 24.860464096069336, + 6.0520172119140625, + 27.24283218383789 + ] + } + }, + "Component_[3194434268397003277]": { + "$type": "EditorBoxShapeComponent", + "Id": 3194434268397003277, + "Visible": false, + "DisplayFilled": false, + "BoxShape": { + "Configuration": { + "IsFilled": false, + "Dimensions": [ + 200.0, + 200.0, + 0.10000000149011612 + ] + } + } + }, + "Component_[5124743265172522601]": { + "$type": "EditorDisabledCompositionComponent", + "Id": 5124743265172522601 + }, + "Component_[6141261141385234831]": { + "$type": "EditorOnlyEntityComponent", + "Id": 6141261141385234831 + }, + "Component_[8075217947437400102]": { + "$type": "EditorVisibilityComponent", + "Id": 8075217947437400102 + }, + "Component_[9742596769363363433]": { + "$type": "EditorEntityIconComponent", + "Id": 9742596769363363433 + } + } + }, + "Entity_[2994151354626249]": { + "Id": "Entity_[2994151354626249]", + "Name": "Surface", + "Components": { + "Component_[11461736083966389166]": { + "$type": "EditorSurfaceDataShapeComponent", + "Id": 11461736083966389166 + }, + "Component_[13283029886763197381]": { + "$type": "EditorLockComponent", + "Id": 13283029886763197381 + }, + "Component_[14567565716714370511]": { + "$type": "SelectionComponent", + "Id": 14567565716714370511 + }, + "Component_[14826005606950858247]": { + "$type": "EditorEntitySortComponent", + "Id": 14826005606950858247 + }, + "Component_[15952534836289892585]": { + "$type": "EditorInspectorComponent", + "Id": 15952534836289892585 + }, + "Component_[16429683758229234581]": { + "$type": "EditorPendingCompositionComponent", + "Id": 16429683758229234581 + }, + "Component_[3145304225809715428]": { + "$type": "{27F1E1A1-8D9D-4C3B-BD3A-AFB9762449C0} TransformComponent", + "Id": 3145304225809715428, + "Parent Entity": "Entity_[655472831242]", + "Transform Data": { + "Translate": [ + 24.860464096069336, + 6.0520172119140625, + 19.24283218383789 + ] + } + }, + "Component_[3194434268397003277]": { + "$type": "EditorBoxShapeComponent", + "Id": 3194434268397003277, + "Visible": false, + "DisplayFilled": false, + "BoxShape": { + "Configuration": { + "IsFilled": false, + "Dimensions": [ + 200.0, + 200.0, + 0.10000000149011612 + ] + } + } + }, + "Component_[5124743265172522601]": { + "$type": "EditorDisabledCompositionComponent", + "Id": 5124743265172522601 + }, + "Component_[6141261141385234831]": { + "$type": "EditorOnlyEntityComponent", + "Id": 6141261141385234831 + }, + "Component_[8075217947437400102]": { + "$type": "EditorVisibilityComponent", + "Id": 8075217947437400102 + }, + "Component_[9742596769363363433]": { + "$type": "EditorEntityIconComponent", + "Id": 9742596769363363433 + } + } + }, + "Entity_[2994155649593545]": { + "Id": "Entity_[2994155649593545]", + "Name": "Surface", + "Components": { + "Component_[11461736083966389166]": { + "$type": "EditorSurfaceDataShapeComponent", + "Id": 11461736083966389166 + }, + "Component_[13283029886763197381]": { + "$type": "EditorLockComponent", + "Id": 13283029886763197381 + }, + "Component_[14567565716714370511]": { + "$type": "SelectionComponent", + "Id": 14567565716714370511 + }, + "Component_[14826005606950858247]": { + "$type": "EditorEntitySortComponent", + "Id": 14826005606950858247 + }, + "Component_[15952534836289892585]": { + "$type": "EditorInspectorComponent", + "Id": 15952534836289892585 + }, + "Component_[16429683758229234581]": { + "$type": "EditorPendingCompositionComponent", + "Id": 16429683758229234581 + }, + "Component_[3145304225809715428]": { + "$type": "{27F1E1A1-8D9D-4C3B-BD3A-AFB9762449C0} TransformComponent", + "Id": 3145304225809715428, + "Parent Entity": "Entity_[655472831242]", + "Transform Data": { + "Translate": [ + 24.860464096069336, + 6.0520172119140625, + 25.24283218383789 + ] + } + }, + "Component_[3194434268397003277]": { + "$type": "EditorBoxShapeComponent", + "Id": 3194434268397003277, + "Visible": false, + "DisplayFilled": false, + "BoxShape": { + "Configuration": { + "IsFilled": false, + "Dimensions": [ + 200.0, + 200.0, + 0.10000000149011612 + ] + } + } + }, + "Component_[5124743265172522601]": { + "$type": "EditorDisabledCompositionComponent", + "Id": 5124743265172522601 + }, + "Component_[6141261141385234831]": { + "$type": "EditorOnlyEntityComponent", + "Id": 6141261141385234831 + }, + "Component_[8075217947437400102]": { + "$type": "EditorVisibilityComponent", + "Id": 8075217947437400102 + }, + "Component_[9742596769363363433]": { + "$type": "EditorEntityIconComponent", + "Id": 9742596769363363433 + } + } + }, + "Entity_[2994159944560841]": { + "Id": "Entity_[2994159944560841]", + "Name": "Surface", + "Components": { + "Component_[11461736083966389166]": { + "$type": "EditorSurfaceDataShapeComponent", + "Id": 11461736083966389166 + }, + "Component_[13283029886763197381]": { + "$type": "EditorLockComponent", + "Id": 13283029886763197381 + }, + "Component_[14567565716714370511]": { + "$type": "SelectionComponent", + "Id": 14567565716714370511 + }, + "Component_[14826005606950858247]": { + "$type": "EditorEntitySortComponent", + "Id": 14826005606950858247 + }, + "Component_[15952534836289892585]": { + "$type": "EditorInspectorComponent", + "Id": 15952534836289892585 + }, + "Component_[16429683758229234581]": { + "$type": "EditorPendingCompositionComponent", + "Id": 16429683758229234581 + }, + "Component_[3145304225809715428]": { + "$type": "{27F1E1A1-8D9D-4C3B-BD3A-AFB9762449C0} TransformComponent", + "Id": 3145304225809715428, + "Parent Entity": "Entity_[655472831242]", + "Transform Data": { + "Translate": [ + 24.860464096069336, + 6.0520172119140625, + 37.24283218383789 + ] + } + }, + "Component_[3194434268397003277]": { + "$type": "EditorBoxShapeComponent", + "Id": 3194434268397003277, + "Visible": false, + "DisplayFilled": false, + "BoxShape": { + "Configuration": { + "IsFilled": false, + "Dimensions": [ + 200.0, + 200.0, + 0.10000000149011612 + ] + } + } + }, + "Component_[5124743265172522601]": { + "$type": "EditorDisabledCompositionComponent", + "Id": 5124743265172522601 + }, + "Component_[6141261141385234831]": { + "$type": "EditorOnlyEntityComponent", + "Id": 6141261141385234831 + }, + "Component_[8075217947437400102]": { + "$type": "EditorVisibilityComponent", + "Id": 8075217947437400102 + }, + "Component_[9742596769363363433]": { + "$type": "EditorEntityIconComponent", + "Id": 9742596769363363433 + } + } + }, + "Entity_[2994164239528137]": { + "Id": "Entity_[2994164239528137]", + "Name": "Surface", + "Components": { + "Component_[11461736083966389166]": { + "$type": "EditorSurfaceDataShapeComponent", + "Id": 11461736083966389166 + }, + "Component_[13283029886763197381]": { + "$type": "EditorLockComponent", + "Id": 13283029886763197381 + }, + "Component_[14567565716714370511]": { + "$type": "SelectionComponent", + "Id": 14567565716714370511 + }, + "Component_[14826005606950858247]": { + "$type": "EditorEntitySortComponent", + "Id": 14826005606950858247 + }, + "Component_[15952534836289892585]": { + "$type": "EditorInspectorComponent", + "Id": 15952534836289892585 + }, + "Component_[16429683758229234581]": { + "$type": "EditorPendingCompositionComponent", + "Id": 16429683758229234581 + }, + "Component_[3145304225809715428]": { + "$type": "{27F1E1A1-8D9D-4C3B-BD3A-AFB9762449C0} TransformComponent", + "Id": 3145304225809715428, + "Parent Entity": "Entity_[655472831242]", + "Transform Data": { + "Translate": [ + 24.860464096069336, + 6.0520172119140625, + 35.24283218383789 + ] + } + }, + "Component_[3194434268397003277]": { + "$type": "EditorBoxShapeComponent", + "Id": 3194434268397003277, + "Visible": false, + "DisplayFilled": false, + "BoxShape": { + "Configuration": { + "IsFilled": false, + "Dimensions": [ + 200.0, + 200.0, + 0.10000000149011612 + ] + } + } + }, + "Component_[5124743265172522601]": { + "$type": "EditorDisabledCompositionComponent", + "Id": 5124743265172522601 + }, + "Component_[6141261141385234831]": { + "$type": "EditorOnlyEntityComponent", + "Id": 6141261141385234831 + }, + "Component_[8075217947437400102]": { + "$type": "EditorVisibilityComponent", + "Id": 8075217947437400102 + }, + "Component_[9742596769363363433]": { + "$type": "EditorEntityIconComponent", + "Id": 9742596769363363433 + } + } + }, + "Entity_[2994168534495433]": { + "Id": "Entity_[2994168534495433]", + "Name": "Surface", + "Components": { + "Component_[11461736083966389166]": { + "$type": "EditorSurfaceDataShapeComponent", + "Id": 11461736083966389166 + }, + "Component_[13283029886763197381]": { + "$type": "EditorLockComponent", + "Id": 13283029886763197381 + }, + "Component_[14567565716714370511]": { + "$type": "SelectionComponent", + "Id": 14567565716714370511 + }, + "Component_[14826005606950858247]": { + "$type": "EditorEntitySortComponent", + "Id": 14826005606950858247 + }, + "Component_[15952534836289892585]": { + "$type": "EditorInspectorComponent", + "Id": 15952534836289892585 + }, + "Component_[16429683758229234581]": { + "$type": "EditorPendingCompositionComponent", + "Id": 16429683758229234581 + }, + "Component_[3145304225809715428]": { + "$type": "{27F1E1A1-8D9D-4C3B-BD3A-AFB9762449C0} TransformComponent", + "Id": 3145304225809715428, + "Parent Entity": "Entity_[655472831242]", + "Transform Data": { + "Translate": [ + 24.860464096069336, + 6.0520172119140625, + 21.24283218383789 + ] + } + }, + "Component_[3194434268397003277]": { + "$type": "EditorBoxShapeComponent", + "Id": 3194434268397003277, + "Visible": false, + "DisplayFilled": false, + "BoxShape": { + "Configuration": { + "IsFilled": false, + "Dimensions": [ + 200.0, + 200.0, + 0.10000000149011612 + ] + } + } + }, + "Component_[5124743265172522601]": { + "$type": "EditorDisabledCompositionComponent", + "Id": 5124743265172522601 + }, + "Component_[6141261141385234831]": { + "$type": "EditorOnlyEntityComponent", + "Id": 6141261141385234831 + }, + "Component_[8075217947437400102]": { + "$type": "EditorVisibilityComponent", + "Id": 8075217947437400102 + }, + "Component_[9742596769363363433]": { + "$type": "EditorEntityIconComponent", + "Id": 9742596769363363433 + } + } + }, + "Entity_[2994172829462729]": { + "Id": "Entity_[2994172829462729]", + "Name": "Surface", + "Components": { + "Component_[11461736083966389166]": { + "$type": "EditorSurfaceDataShapeComponent", + "Id": 11461736083966389166 + }, + "Component_[13283029886763197381]": { + "$type": "EditorLockComponent", + "Id": 13283029886763197381 + }, + "Component_[14567565716714370511]": { + "$type": "SelectionComponent", + "Id": 14567565716714370511 + }, + "Component_[14826005606950858247]": { + "$type": "EditorEntitySortComponent", + "Id": 14826005606950858247 + }, + "Component_[15952534836289892585]": { + "$type": "EditorInspectorComponent", + "Id": 15952534836289892585 + }, + "Component_[16429683758229234581]": { + "$type": "EditorPendingCompositionComponent", + "Id": 16429683758229234581 + }, + "Component_[3145304225809715428]": { + "$type": "{27F1E1A1-8D9D-4C3B-BD3A-AFB9762449C0} TransformComponent", + "Id": 3145304225809715428, + "Parent Entity": "Entity_[655472831242]", + "Transform Data": { + "Translate": [ + 24.860464096069336, + 6.0520172119140625, + 23.24283218383789 + ] + } + }, + "Component_[3194434268397003277]": { + "$type": "EditorBoxShapeComponent", + "Id": 3194434268397003277, + "Visible": false, + "DisplayFilled": false, + "BoxShape": { + "Configuration": { + "IsFilled": false, + "Dimensions": [ + 200.0, + 200.0, + 0.10000000149011612 + ] + } + } + }, + "Component_[5124743265172522601]": { + "$type": "EditorDisabledCompositionComponent", + "Id": 5124743265172522601 + }, + "Component_[6141261141385234831]": { + "$type": "EditorOnlyEntityComponent", + "Id": 6141261141385234831 + }, + "Component_[8075217947437400102]": { + "$type": "EditorVisibilityComponent", + "Id": 8075217947437400102 + }, + "Component_[9742596769363363433]": { + "$type": "EditorEntityIconComponent", + "Id": 9742596769363363433 + } + } + }, + "Entity_[3446213842399433]": { + "Id": "Entity_[3446213842399433]", + "Name": "Surface", + "Components": { + "Component_[11461736083966389166]": { + "$type": "EditorSurfaceDataShapeComponent", + "Id": 11461736083966389166 + }, + "Component_[13283029886763197381]": { + "$type": "EditorLockComponent", + "Id": 13283029886763197381 + }, + "Component_[14567565716714370511]": { + "$type": "SelectionComponent", + "Id": 14567565716714370511 + }, + "Component_[14826005606950858247]": { + "$type": "EditorEntitySortComponent", + "Id": 14826005606950858247 + }, + "Component_[15952534836289892585]": { + "$type": "EditorInspectorComponent", + "Id": 15952534836289892585 + }, + "Component_[16429683758229234581]": { + "$type": "EditorPendingCompositionComponent", + "Id": 16429683758229234581 + }, + "Component_[3145304225809715428]": { + "$type": "{27F1E1A1-8D9D-4C3B-BD3A-AFB9762449C0} TransformComponent", + "Id": 3145304225809715428, + "Parent Entity": "Entity_[655472831242]", + "Transform Data": { + "Translate": [ + 24.860464096069336, + 6.0520172119140625, + 49.431697845458984 + ] + } + }, + "Component_[3194434268397003277]": { + "$type": "EditorBoxShapeComponent", + "Id": 3194434268397003277, + "Visible": false, + "DisplayFilled": false, + "BoxShape": { + "Configuration": { + "IsFilled": false, + "Dimensions": [ + 200.0, + 200.0, + 0.10000000149011612 + ] + } + } + }, + "Component_[5124743265172522601]": { + "$type": "EditorDisabledCompositionComponent", + "Id": 5124743265172522601 + }, + "Component_[6141261141385234831]": { + "$type": "EditorOnlyEntityComponent", + "Id": 6141261141385234831 + }, + "Component_[8075217947437400102]": { + "$type": "EditorVisibilityComponent", + "Id": 8075217947437400102 + }, + "Component_[9742596769363363433]": { + "$type": "EditorEntityIconComponent", + "Id": 9742596769363363433 + } + } + }, + "Entity_[3446218137366729]": { + "Id": "Entity_[3446218137366729]", + "Name": "Surface", + "Components": { + "Component_[11461736083966389166]": { + "$type": "EditorSurfaceDataShapeComponent", + "Id": 11461736083966389166 + }, + "Component_[13283029886763197381]": { + "$type": "EditorLockComponent", + "Id": 13283029886763197381 + }, + "Component_[14567565716714370511]": { + "$type": "SelectionComponent", + "Id": 14567565716714370511 + }, + "Component_[14826005606950858247]": { + "$type": "EditorEntitySortComponent", + "Id": 14826005606950858247 + }, + "Component_[15952534836289892585]": { + "$type": "EditorInspectorComponent", + "Id": 15952534836289892585 + }, + "Component_[16429683758229234581]": { + "$type": "EditorPendingCompositionComponent", + "Id": 16429683758229234581 + }, + "Component_[3145304225809715428]": { + "$type": "{27F1E1A1-8D9D-4C3B-BD3A-AFB9762449C0} TransformComponent", + "Id": 3145304225809715428, + "Parent Entity": "Entity_[655472831242]", + "Transform Data": { + "Translate": [ + 24.860464096069336, + 6.0520172119140625, + 41.431697845458984 + ] + } + }, + "Component_[3194434268397003277]": { + "$type": "EditorBoxShapeComponent", + "Id": 3194434268397003277, + "Visible": false, + "DisplayFilled": false, + "BoxShape": { + "Configuration": { + "IsFilled": false, + "Dimensions": [ + 200.0, + 200.0, + 0.10000000149011612 + ] + } + } + }, + "Component_[5124743265172522601]": { + "$type": "EditorDisabledCompositionComponent", + "Id": 5124743265172522601 + }, + "Component_[6141261141385234831]": { + "$type": "EditorOnlyEntityComponent", + "Id": 6141261141385234831 + }, + "Component_[8075217947437400102]": { + "$type": "EditorVisibilityComponent", + "Id": 8075217947437400102 + }, + "Component_[9742596769363363433]": { + "$type": "EditorEntityIconComponent", + "Id": 9742596769363363433 + } + } + }, + "Entity_[3446222432334025]": { + "Id": "Entity_[3446222432334025]", + "Name": "Surface", + "Components": { + "Component_[11461736083966389166]": { + "$type": "EditorSurfaceDataShapeComponent", + "Id": 11461736083966389166 + }, + "Component_[13283029886763197381]": { + "$type": "EditorLockComponent", + "Id": 13283029886763197381 + }, + "Component_[14567565716714370511]": { + "$type": "SelectionComponent", + "Id": 14567565716714370511 + }, + "Component_[14826005606950858247]": { + "$type": "EditorEntitySortComponent", + "Id": 14826005606950858247 + }, + "Component_[15952534836289892585]": { + "$type": "EditorInspectorComponent", + "Id": 15952534836289892585 + }, + "Component_[16429683758229234581]": { + "$type": "EditorPendingCompositionComponent", + "Id": 16429683758229234581 + }, + "Component_[3145304225809715428]": { + "$type": "{27F1E1A1-8D9D-4C3B-BD3A-AFB9762449C0} TransformComponent", + "Id": 3145304225809715428, + "Parent Entity": "Entity_[655472831242]", + "Transform Data": { + "Translate": [ + 24.860464096069336, + 6.0520172119140625, + 45.431697845458984 + ] + } + }, + "Component_[3194434268397003277]": { + "$type": "EditorBoxShapeComponent", + "Id": 3194434268397003277, + "Visible": false, + "DisplayFilled": false, + "BoxShape": { + "Configuration": { + "IsFilled": false, + "Dimensions": [ + 200.0, + 200.0, + 0.10000000149011612 + ] + } + } + }, + "Component_[5124743265172522601]": { + "$type": "EditorDisabledCompositionComponent", + "Id": 5124743265172522601 + }, + "Component_[6141261141385234831]": { + "$type": "EditorOnlyEntityComponent", + "Id": 6141261141385234831 + }, + "Component_[8075217947437400102]": { + "$type": "EditorVisibilityComponent", + "Id": 8075217947437400102 + }, + "Component_[9742596769363363433]": { + "$type": "EditorEntityIconComponent", + "Id": 9742596769363363433 + } + } + }, + "Entity_[3446226727301321]": { + "Id": "Entity_[3446226727301321]", + "Name": "Surface", + "Components": { + "Component_[11461736083966389166]": { + "$type": "EditorSurfaceDataShapeComponent", + "Id": 11461736083966389166 + }, + "Component_[13283029886763197381]": { + "$type": "EditorLockComponent", + "Id": 13283029886763197381 + }, + "Component_[14567565716714370511]": { + "$type": "SelectionComponent", + "Id": 14567565716714370511 + }, + "Component_[14826005606950858247]": { + "$type": "EditorEntitySortComponent", + "Id": 14826005606950858247 + }, + "Component_[15952534836289892585]": { + "$type": "EditorInspectorComponent", + "Id": 15952534836289892585 + }, + "Component_[16429683758229234581]": { + "$type": "EditorPendingCompositionComponent", + "Id": 16429683758229234581 + }, + "Component_[3145304225809715428]": { + "$type": "{27F1E1A1-8D9D-4C3B-BD3A-AFB9762449C0} TransformComponent", + "Id": 3145304225809715428, + "Parent Entity": "Entity_[655472831242]", + "Transform Data": { + "Translate": [ + 24.860464096069336, + 6.0520172119140625, + 57.431697845458984 + ] + } + }, + "Component_[3194434268397003277]": { + "$type": "EditorBoxShapeComponent", + "Id": 3194434268397003277, + "Visible": false, + "DisplayFilled": false, + "BoxShape": { + "Configuration": { + "IsFilled": false, + "Dimensions": [ + 200.0, + 200.0, + 0.10000000149011612 + ] + } + } + }, + "Component_[5124743265172522601]": { + "$type": "EditorDisabledCompositionComponent", + "Id": 5124743265172522601 + }, + "Component_[6141261141385234831]": { + "$type": "EditorOnlyEntityComponent", + "Id": 6141261141385234831 + }, + "Component_[8075217947437400102]": { + "$type": "EditorVisibilityComponent", + "Id": 8075217947437400102 + }, + "Component_[9742596769363363433]": { + "$type": "EditorEntityIconComponent", + "Id": 9742596769363363433 + } + } + }, + "Entity_[3446231022268617]": { + "Id": "Entity_[3446231022268617]", + "Name": "Surface", + "Components": { + "Component_[11461736083966389166]": { + "$type": "EditorSurfaceDataShapeComponent", + "Id": 11461736083966389166 + }, + "Component_[13283029886763197381]": { + "$type": "EditorLockComponent", + "Id": 13283029886763197381 + }, + "Component_[14567565716714370511]": { + "$type": "SelectionComponent", + "Id": 14567565716714370511 + }, + "Component_[14826005606950858247]": { + "$type": "EditorEntitySortComponent", + "Id": 14826005606950858247 + }, + "Component_[15952534836289892585]": { + "$type": "EditorInspectorComponent", + "Id": 15952534836289892585 + }, + "Component_[16429683758229234581]": { + "$type": "EditorPendingCompositionComponent", + "Id": 16429683758229234581 + }, + "Component_[3145304225809715428]": { + "$type": "{27F1E1A1-8D9D-4C3B-BD3A-AFB9762449C0} TransformComponent", + "Id": 3145304225809715428, + "Parent Entity": "Entity_[655472831242]", + "Transform Data": { + "Translate": [ + 24.860464096069336, + 6.0520172119140625, + 53.431697845458984 + ] + } + }, + "Component_[3194434268397003277]": { + "$type": "EditorBoxShapeComponent", + "Id": 3194434268397003277, + "Visible": false, + "DisplayFilled": false, + "BoxShape": { + "Configuration": { + "IsFilled": false, + "Dimensions": [ + 200.0, + 200.0, + 0.10000000149011612 + ] + } + } + }, + "Component_[5124743265172522601]": { + "$type": "EditorDisabledCompositionComponent", + "Id": 5124743265172522601 + }, + "Component_[6141261141385234831]": { + "$type": "EditorOnlyEntityComponent", + "Id": 6141261141385234831 + }, + "Component_[8075217947437400102]": { + "$type": "EditorVisibilityComponent", + "Id": 8075217947437400102 + }, + "Component_[9742596769363363433]": { + "$type": "EditorEntityIconComponent", + "Id": 9742596769363363433 + } + } + }, + "Entity_[3446235317235913]": { + "Id": "Entity_[3446235317235913]", + "Name": "Surface", + "Components": { + "Component_[11461736083966389166]": { + "$type": "EditorSurfaceDataShapeComponent", + "Id": 11461736083966389166 + }, + "Component_[13283029886763197381]": { + "$type": "EditorLockComponent", + "Id": 13283029886763197381 + }, + "Component_[14567565716714370511]": { + "$type": "SelectionComponent", + "Id": 14567565716714370511 + }, + "Component_[14826005606950858247]": { + "$type": "EditorEntitySortComponent", + "Id": 14826005606950858247 + }, + "Component_[15952534836289892585]": { + "$type": "EditorInspectorComponent", + "Id": 15952534836289892585 + }, + "Component_[16429683758229234581]": { + "$type": "EditorPendingCompositionComponent", + "Id": 16429683758229234581 + }, + "Component_[3145304225809715428]": { + "$type": "{27F1E1A1-8D9D-4C3B-BD3A-AFB9762449C0} TransformComponent", + "Id": 3145304225809715428, + "Parent Entity": "Entity_[655472831242]", + "Transform Data": { + "Translate": [ + 24.860464096069336, + 6.0520172119140625, + 43.431697845458984 + ] + } + }, + "Component_[3194434268397003277]": { + "$type": "EditorBoxShapeComponent", + "Id": 3194434268397003277, + "Visible": false, + "DisplayFilled": false, + "BoxShape": { + "Configuration": { + "IsFilled": false, + "Dimensions": [ + 200.0, + 200.0, + 0.10000000149011612 + ] + } + } + }, + "Component_[5124743265172522601]": { + "$type": "EditorDisabledCompositionComponent", + "Id": 5124743265172522601 + }, + "Component_[6141261141385234831]": { + "$type": "EditorOnlyEntityComponent", + "Id": 6141261141385234831 + }, + "Component_[8075217947437400102]": { + "$type": "EditorVisibilityComponent", + "Id": 8075217947437400102 + }, + "Component_[9742596769363363433]": { + "$type": "EditorEntityIconComponent", + "Id": 9742596769363363433 + } + } + }, + "Entity_[3446239612203209]": { + "Id": "Entity_[3446239612203209]", + "Name": "Surface", + "Components": { + "Component_[11461736083966389166]": { + "$type": "EditorSurfaceDataShapeComponent", + "Id": 11461736083966389166 + }, + "Component_[13283029886763197381]": { + "$type": "EditorLockComponent", + "Id": 13283029886763197381 + }, + "Component_[14567565716714370511]": { + "$type": "SelectionComponent", + "Id": 14567565716714370511 + }, + "Component_[14826005606950858247]": { + "$type": "EditorEntitySortComponent", + "Id": 14826005606950858247 + }, + "Component_[15952534836289892585]": { + "$type": "EditorInspectorComponent", + "Id": 15952534836289892585 + }, + "Component_[16429683758229234581]": { + "$type": "EditorPendingCompositionComponent", + "Id": 16429683758229234581 + }, + "Component_[3145304225809715428]": { + "$type": "{27F1E1A1-8D9D-4C3B-BD3A-AFB9762449C0} TransformComponent", + "Id": 3145304225809715428, + "Parent Entity": "Entity_[655472831242]", + "Transform Data": { + "Translate": [ + 24.860464096069336, + 6.0520172119140625, + 51.431697845458984 + ] + } + }, + "Component_[3194434268397003277]": { + "$type": "EditorBoxShapeComponent", + "Id": 3194434268397003277, + "Visible": false, + "DisplayFilled": false, + "BoxShape": { + "Configuration": { + "IsFilled": false, + "Dimensions": [ + 200.0, + 200.0, + 0.10000000149011612 + ] + } + } + }, + "Component_[5124743265172522601]": { + "$type": "EditorDisabledCompositionComponent", + "Id": 5124743265172522601 + }, + "Component_[6141261141385234831]": { + "$type": "EditorOnlyEntityComponent", + "Id": 6141261141385234831 + }, + "Component_[8075217947437400102]": { + "$type": "EditorVisibilityComponent", + "Id": 8075217947437400102 + }, + "Component_[9742596769363363433]": { + "$type": "EditorEntityIconComponent", + "Id": 9742596769363363433 + } + } + }, + "Entity_[3446243907170505]": { + "Id": "Entity_[3446243907170505]", + "Name": "Surface", + "Components": { + "Component_[11461736083966389166]": { + "$type": "EditorSurfaceDataShapeComponent", + "Id": 11461736083966389166 + }, + "Component_[13283029886763197381]": { + "$type": "EditorLockComponent", + "Id": 13283029886763197381 + }, + "Component_[14567565716714370511]": { + "$type": "SelectionComponent", + "Id": 14567565716714370511 + }, + "Component_[14826005606950858247]": { + "$type": "EditorEntitySortComponent", + "Id": 14826005606950858247 + }, + "Component_[15952534836289892585]": { + "$type": "EditorInspectorComponent", + "Id": 15952534836289892585 + }, + "Component_[16429683758229234581]": { + "$type": "EditorPendingCompositionComponent", + "Id": 16429683758229234581 + }, + "Component_[3145304225809715428]": { + "$type": "{27F1E1A1-8D9D-4C3B-BD3A-AFB9762449C0} TransformComponent", + "Id": 3145304225809715428, + "Parent Entity": "Entity_[655472831242]", + "Transform Data": { + "Translate": [ + 24.860464096069336, + 6.0520172119140625, + 47.431697845458984 + ] + } + }, + "Component_[3194434268397003277]": { + "$type": "EditorBoxShapeComponent", + "Id": 3194434268397003277, + "Visible": false, + "DisplayFilled": false, + "BoxShape": { + "Configuration": { + "IsFilled": false, + "Dimensions": [ + 200.0, + 200.0, + 0.10000000149011612 + ] + } + } + }, + "Component_[5124743265172522601]": { + "$type": "EditorDisabledCompositionComponent", + "Id": 5124743265172522601 + }, + "Component_[6141261141385234831]": { + "$type": "EditorOnlyEntityComponent", + "Id": 6141261141385234831 + }, + "Component_[8075217947437400102]": { + "$type": "EditorVisibilityComponent", + "Id": 8075217947437400102 + }, + "Component_[9742596769363363433]": { + "$type": "EditorEntityIconComponent", + "Id": 9742596769363363433 + } + } + }, + "Entity_[3446248202137801]": { + "Id": "Entity_[3446248202137801]", + "Name": "Surface", + "Components": { + "Component_[11461736083966389166]": { + "$type": "EditorSurfaceDataShapeComponent", + "Id": 11461736083966389166 + }, + "Component_[13283029886763197381]": { + "$type": "EditorLockComponent", + "Id": 13283029886763197381 + }, + "Component_[14567565716714370511]": { + "$type": "SelectionComponent", + "Id": 14567565716714370511 + }, + "Component_[14826005606950858247]": { + "$type": "EditorEntitySortComponent", + "Id": 14826005606950858247 + }, + "Component_[15952534836289892585]": { + "$type": "EditorInspectorComponent", + "Id": 15952534836289892585 + }, + "Component_[16429683758229234581]": { + "$type": "EditorPendingCompositionComponent", + "Id": 16429683758229234581 + }, + "Component_[3145304225809715428]": { + "$type": "{27F1E1A1-8D9D-4C3B-BD3A-AFB9762449C0} TransformComponent", + "Id": 3145304225809715428, + "Parent Entity": "Entity_[655472831242]", + "Transform Data": { + "Translate": [ + 24.860464096069336, + 6.0520172119140625, + 39.431697845458984 + ] + } + }, + "Component_[3194434268397003277]": { + "$type": "EditorBoxShapeComponent", + "Id": 3194434268397003277, + "Visible": false, + "DisplayFilled": false, + "BoxShape": { + "Configuration": { + "IsFilled": false, + "Dimensions": [ + 200.0, + 200.0, + 0.10000000149011612 + ] + } + } + }, + "Component_[5124743265172522601]": { + "$type": "EditorDisabledCompositionComponent", + "Id": 5124743265172522601 + }, + "Component_[6141261141385234831]": { + "$type": "EditorOnlyEntityComponent", + "Id": 6141261141385234831 + }, + "Component_[8075217947437400102]": { + "$type": "EditorVisibilityComponent", + "Id": 8075217947437400102 + }, + "Component_[9742596769363363433]": { + "$type": "EditorEntityIconComponent", + "Id": 9742596769363363433 + } + } + }, + "Entity_[3446252497105097]": { + "Id": "Entity_[3446252497105097]", + "Name": "Surface", + "Components": { + "Component_[11461736083966389166]": { + "$type": "EditorSurfaceDataShapeComponent", + "Id": 11461736083966389166 + }, + "Component_[13283029886763197381]": { + "$type": "EditorLockComponent", + "Id": 13283029886763197381 + }, + "Component_[14567565716714370511]": { + "$type": "SelectionComponent", + "Id": 14567565716714370511 + }, + "Component_[14826005606950858247]": { + "$type": "EditorEntitySortComponent", + "Id": 14826005606950858247 + }, + "Component_[15952534836289892585]": { + "$type": "EditorInspectorComponent", + "Id": 15952534836289892585 + }, + "Component_[16429683758229234581]": { + "$type": "EditorPendingCompositionComponent", + "Id": 16429683758229234581 + }, + "Component_[3145304225809715428]": { + "$type": "{27F1E1A1-8D9D-4C3B-BD3A-AFB9762449C0} TransformComponent", + "Id": 3145304225809715428, + "Parent Entity": "Entity_[655472831242]", + "Transform Data": { + "Translate": [ + 24.860464096069336, + 6.0520172119140625, + 55.431697845458984 + ] + } + }, + "Component_[3194434268397003277]": { + "$type": "EditorBoxShapeComponent", + "Id": 3194434268397003277, + "Visible": false, + "DisplayFilled": false, + "BoxShape": { + "Configuration": { + "IsFilled": false, + "Dimensions": [ + 200.0, + 200.0, + 0.10000000149011612 + ] + } + } + }, + "Component_[5124743265172522601]": { + "$type": "EditorDisabledCompositionComponent", + "Id": 5124743265172522601 + }, + "Component_[6141261141385234831]": { + "$type": "EditorOnlyEntityComponent", + "Id": 6141261141385234831 + }, + "Component_[8075217947437400102]": { + "$type": "EditorVisibilityComponent", + "Id": 8075217947437400102 + }, + "Component_[9742596769363363433]": { + "$type": "EditorEntityIconComponent", + "Id": 9742596769363363433 + } + } + }, + "Entity_[4073064319250633]": { + "Id": "Entity_[4073064319250633]", + "Name": "Surface", + "Components": { + "Component_[11461736083966389166]": { + "$type": "EditorSurfaceDataShapeComponent", + "Id": 11461736083966389166 + }, + "Component_[13283029886763197381]": { + "$type": "EditorLockComponent", + "Id": 13283029886763197381 + }, + "Component_[14567565716714370511]": { + "$type": "SelectionComponent", + "Id": 14567565716714370511 + }, + "Component_[14826005606950858247]": { + "$type": "EditorEntitySortComponent", + "Id": 14826005606950858247 + }, + "Component_[15952534836289892585]": { + "$type": "EditorInspectorComponent", + "Id": 15952534836289892585 + }, + "Component_[16429683758229234581]": { + "$type": "EditorPendingCompositionComponent", + "Id": 16429683758229234581 + }, + "Component_[3145304225809715428]": { + "$type": "{27F1E1A1-8D9D-4C3B-BD3A-AFB9762449C0} TransformComponent", + "Id": 3145304225809715428, + "Parent Entity": "Entity_[655472831242]", + "Transform Data": { + "Translate": [ + 24.860464096069336, + 6.0520172119140625, + 72.24310302734375 + ] + } + }, + "Component_[3194434268397003277]": { + "$type": "EditorBoxShapeComponent", + "Id": 3194434268397003277, + "Visible": false, + "DisplayFilled": false, + "BoxShape": { + "Configuration": { + "IsFilled": false, + "Dimensions": [ + 200.0, + 200.0, + 0.10000000149011612 + ] + } + } + }, + "Component_[5124743265172522601]": { + "$type": "EditorDisabledCompositionComponent", + "Id": 5124743265172522601 + }, + "Component_[6141261141385234831]": { + "$type": "EditorOnlyEntityComponent", + "Id": 6141261141385234831 + }, + "Component_[8075217947437400102]": { + "$type": "EditorVisibilityComponent", + "Id": 8075217947437400102 + }, + "Component_[9742596769363363433]": { + "$type": "EditorEntityIconComponent", + "Id": 9742596769363363433 + } + } + }, + "Entity_[4073068614217929]": { + "Id": "Entity_[4073068614217929]", + "Name": "Surface", + "Components": { + "Component_[11461736083966389166]": { + "$type": "EditorSurfaceDataShapeComponent", + "Id": 11461736083966389166 + }, + "Component_[13283029886763197381]": { + "$type": "EditorLockComponent", + "Id": 13283029886763197381 + }, + "Component_[14567565716714370511]": { + "$type": "SelectionComponent", + "Id": 14567565716714370511 + }, + "Component_[14826005606950858247]": { + "$type": "EditorEntitySortComponent", + "Id": 14826005606950858247 + }, + "Component_[15952534836289892585]": { + "$type": "EditorInspectorComponent", + "Id": 15952534836289892585 + }, + "Component_[16429683758229234581]": { + "$type": "EditorPendingCompositionComponent", + "Id": 16429683758229234581 + }, + "Component_[3145304225809715428]": { + "$type": "{27F1E1A1-8D9D-4C3B-BD3A-AFB9762449C0} TransformComponent", + "Id": 3145304225809715428, + "Parent Entity": "Entity_[655472831242]", + "Transform Data": { + "Translate": [ + 24.860464096069336, + 6.0520172119140625, + 60.243099212646484 + ] + } + }, + "Component_[3194434268397003277]": { + "$type": "EditorBoxShapeComponent", + "Id": 3194434268397003277, + "Visible": false, + "DisplayFilled": false, + "BoxShape": { + "Configuration": { + "IsFilled": false, + "Dimensions": [ + 200.0, + 200.0, + 0.10000000149011612 + ] + } + } + }, + "Component_[5124743265172522601]": { + "$type": "EditorDisabledCompositionComponent", + "Id": 5124743265172522601 + }, + "Component_[6141261141385234831]": { + "$type": "EditorOnlyEntityComponent", + "Id": 6141261141385234831 + }, + "Component_[8075217947437400102]": { + "$type": "EditorVisibilityComponent", + "Id": 8075217947437400102 + }, + "Component_[9742596769363363433]": { + "$type": "EditorEntityIconComponent", + "Id": 9742596769363363433 + } + } + }, + "Entity_[4073072909185225]": { + "Id": "Entity_[4073072909185225]", + "Name": "Surface", + "Components": { + "Component_[11461736083966389166]": { + "$type": "EditorSurfaceDataShapeComponent", + "Id": 11461736083966389166 + }, + "Component_[13283029886763197381]": { + "$type": "EditorLockComponent", + "Id": 13283029886763197381 + }, + "Component_[14567565716714370511]": { + "$type": "SelectionComponent", + "Id": 14567565716714370511 + }, + "Component_[14826005606950858247]": { + "$type": "EditorEntitySortComponent", + "Id": 14826005606950858247 + }, + "Component_[15952534836289892585]": { + "$type": "EditorInspectorComponent", + "Id": 15952534836289892585 + }, + "Component_[16429683758229234581]": { + "$type": "EditorPendingCompositionComponent", + "Id": 16429683758229234581 + }, + "Component_[3145304225809715428]": { + "$type": "{27F1E1A1-8D9D-4C3B-BD3A-AFB9762449C0} TransformComponent", + "Id": 3145304225809715428, + "Parent Entity": "Entity_[655472831242]", + "Transform Data": { + "Translate": [ + 24.860464096069336, + 6.0520172119140625, + 78.24310302734375 + ] + } + }, + "Component_[3194434268397003277]": { + "$type": "EditorBoxShapeComponent", + "Id": 3194434268397003277, + "Visible": false, + "DisplayFilled": false, + "BoxShape": { + "Configuration": { + "IsFilled": false, + "Dimensions": [ + 200.0, + 200.0, + 0.10000000149011612 + ] + } + } + }, + "Component_[5124743265172522601]": { + "$type": "EditorDisabledCompositionComponent", + "Id": 5124743265172522601 + }, + "Component_[6141261141385234831]": { + "$type": "EditorOnlyEntityComponent", + "Id": 6141261141385234831 + }, + "Component_[8075217947437400102]": { + "$type": "EditorVisibilityComponent", + "Id": 8075217947437400102 + }, + "Component_[9742596769363363433]": { + "$type": "EditorEntityIconComponent", + "Id": 9742596769363363433 + } + } + }, + "Entity_[4073077204152521]": { + "Id": "Entity_[4073077204152521]", + "Name": "Surface", + "Components": { + "Component_[11461736083966389166]": { + "$type": "EditorSurfaceDataShapeComponent", + "Id": 11461736083966389166 + }, + "Component_[13283029886763197381]": { + "$type": "EditorLockComponent", + "Id": 13283029886763197381 + }, + "Component_[14567565716714370511]": { + "$type": "SelectionComponent", + "Id": 14567565716714370511 + }, + "Component_[14826005606950858247]": { + "$type": "EditorEntitySortComponent", + "Id": 14826005606950858247 + }, + "Component_[15952534836289892585]": { + "$type": "EditorInspectorComponent", + "Id": 15952534836289892585 + }, + "Component_[16429683758229234581]": { + "$type": "EditorPendingCompositionComponent", + "Id": 16429683758229234581 + }, + "Component_[3145304225809715428]": { + "$type": "{27F1E1A1-8D9D-4C3B-BD3A-AFB9762449C0} TransformComponent", + "Id": 3145304225809715428, + "Parent Entity": "Entity_[655472831242]", + "Transform Data": { + "Translate": [ + 24.860464096069336, + 6.0520172119140625, + 68.24310302734375 + ] + } + }, + "Component_[3194434268397003277]": { + "$type": "EditorBoxShapeComponent", + "Id": 3194434268397003277, + "Visible": false, + "DisplayFilled": false, + "BoxShape": { + "Configuration": { + "IsFilled": false, + "Dimensions": [ + 200.0, + 200.0, + 0.10000000149011612 + ] + } + } + }, + "Component_[5124743265172522601]": { + "$type": "EditorDisabledCompositionComponent", + "Id": 5124743265172522601 + }, + "Component_[6141261141385234831]": { + "$type": "EditorOnlyEntityComponent", + "Id": 6141261141385234831 + }, + "Component_[8075217947437400102]": { + "$type": "EditorVisibilityComponent", + "Id": 8075217947437400102 + }, + "Component_[9742596769363363433]": { + "$type": "EditorEntityIconComponent", + "Id": 9742596769363363433 + } + } + }, + "Entity_[4073081499119817]": { + "Id": "Entity_[4073081499119817]", + "Name": "Surface", + "Components": { + "Component_[11461736083966389166]": { + "$type": "EditorSurfaceDataShapeComponent", + "Id": 11461736083966389166 + }, + "Component_[13283029886763197381]": { + "$type": "EditorLockComponent", + "Id": 13283029886763197381 + }, + "Component_[14567565716714370511]": { + "$type": "SelectionComponent", + "Id": 14567565716714370511 + }, + "Component_[14826005606950858247]": { + "$type": "EditorEntitySortComponent", + "Id": 14826005606950858247 + }, + "Component_[15952534836289892585]": { + "$type": "EditorInspectorComponent", + "Id": 15952534836289892585 + }, + "Component_[16429683758229234581]": { + "$type": "EditorPendingCompositionComponent", + "Id": 16429683758229234581 + }, + "Component_[3145304225809715428]": { + "$type": "{27F1E1A1-8D9D-4C3B-BD3A-AFB9762449C0} TransformComponent", + "Id": 3145304225809715428, + "Parent Entity": "Entity_[655472831242]", + "Transform Data": { + "Translate": [ + 24.860464096069336, + 6.0520172119140625, + 62.243099212646484 + ] + } + }, + "Component_[3194434268397003277]": { + "$type": "EditorBoxShapeComponent", + "Id": 3194434268397003277, + "Visible": false, + "DisplayFilled": false, + "BoxShape": { + "Configuration": { + "IsFilled": false, + "Dimensions": [ + 200.0, + 200.0, + 0.10000000149011612 + ] + } + } + }, + "Component_[5124743265172522601]": { + "$type": "EditorDisabledCompositionComponent", + "Id": 5124743265172522601 + }, + "Component_[6141261141385234831]": { + "$type": "EditorOnlyEntityComponent", + "Id": 6141261141385234831 + }, + "Component_[8075217947437400102]": { + "$type": "EditorVisibilityComponent", + "Id": 8075217947437400102 + }, + "Component_[9742596769363363433]": { + "$type": "EditorEntityIconComponent", + "Id": 9742596769363363433 + } + } + }, + "Entity_[4073085794087113]": { + "Id": "Entity_[4073085794087113]", + "Name": "Surface", + "Components": { + "Component_[11461736083966389166]": { + "$type": "EditorSurfaceDataShapeComponent", + "Id": 11461736083966389166 + }, + "Component_[13283029886763197381]": { + "$type": "EditorLockComponent", + "Id": 13283029886763197381 + }, + "Component_[14567565716714370511]": { + "$type": "SelectionComponent", + "Id": 14567565716714370511 + }, + "Component_[14826005606950858247]": { + "$type": "EditorEntitySortComponent", + "Id": 14826005606950858247 + }, + "Component_[15952534836289892585]": { + "$type": "EditorInspectorComponent", + "Id": 15952534836289892585 + }, + "Component_[16429683758229234581]": { + "$type": "EditorPendingCompositionComponent", + "Id": 16429683758229234581 + }, + "Component_[3145304225809715428]": { + "$type": "{27F1E1A1-8D9D-4C3B-BD3A-AFB9762449C0} TransformComponent", + "Id": 3145304225809715428, + "Parent Entity": "Entity_[655472831242]", + "Transform Data": { + "Translate": [ + 24.860464096069336, + 6.0520172119140625, + 76.24310302734375 + ] + } + }, + "Component_[3194434268397003277]": { + "$type": "EditorBoxShapeComponent", + "Id": 3194434268397003277, + "Visible": false, + "DisplayFilled": false, + "BoxShape": { + "Configuration": { + "IsFilled": false, + "Dimensions": [ + 200.0, + 200.0, + 0.10000000149011612 + ] + } + } + }, + "Component_[5124743265172522601]": { + "$type": "EditorDisabledCompositionComponent", + "Id": 5124743265172522601 + }, + "Component_[6141261141385234831]": { + "$type": "EditorOnlyEntityComponent", + "Id": 6141261141385234831 + }, + "Component_[8075217947437400102]": { + "$type": "EditorVisibilityComponent", + "Id": 8075217947437400102 + }, + "Component_[9742596769363363433]": { + "$type": "EditorEntityIconComponent", + "Id": 9742596769363363433 + } + } + }, + "Entity_[4073090089054409]": { + "Id": "Entity_[4073090089054409]", + "Name": "Surface", + "Components": { + "Component_[11461736083966389166]": { + "$type": "EditorSurfaceDataShapeComponent", + "Id": 11461736083966389166 + }, + "Component_[13283029886763197381]": { + "$type": "EditorLockComponent", + "Id": 13283029886763197381 + }, + "Component_[14567565716714370511]": { + "$type": "SelectionComponent", + "Id": 14567565716714370511 + }, + "Component_[14826005606950858247]": { + "$type": "EditorEntitySortComponent", + "Id": 14826005606950858247 + }, + "Component_[15952534836289892585]": { + "$type": "EditorInspectorComponent", + "Id": 15952534836289892585 + }, + "Component_[16429683758229234581]": { + "$type": "EditorPendingCompositionComponent", + "Id": 16429683758229234581 + }, + "Component_[3145304225809715428]": { + "$type": "{27F1E1A1-8D9D-4C3B-BD3A-AFB9762449C0} TransformComponent", + "Id": 3145304225809715428, + "Parent Entity": "Entity_[655472831242]", + "Transform Data": { + "Translate": [ + 24.860464096069336, + 6.0520172119140625, + 70.24310302734375 + ] + } + }, + "Component_[3194434268397003277]": { + "$type": "EditorBoxShapeComponent", + "Id": 3194434268397003277, + "Visible": false, + "DisplayFilled": false, + "BoxShape": { + "Configuration": { + "IsFilled": false, + "Dimensions": [ + 200.0, + 200.0, + 0.10000000149011612 + ] + } + } + }, + "Component_[5124743265172522601]": { + "$type": "EditorDisabledCompositionComponent", + "Id": 5124743265172522601 + }, + "Component_[6141261141385234831]": { + "$type": "EditorOnlyEntityComponent", + "Id": 6141261141385234831 + }, + "Component_[8075217947437400102]": { + "$type": "EditorVisibilityComponent", + "Id": 8075217947437400102 + }, + "Component_[9742596769363363433]": { + "$type": "EditorEntityIconComponent", + "Id": 9742596769363363433 + } + } + }, + "Entity_[4073094384021705]": { + "Id": "Entity_[4073094384021705]", + "Name": "Surface", + "Components": { + "Component_[11461736083966389166]": { + "$type": "EditorSurfaceDataShapeComponent", + "Id": 11461736083966389166 + }, + "Component_[13283029886763197381]": { + "$type": "EditorLockComponent", + "Id": 13283029886763197381 + }, + "Component_[14567565716714370511]": { + "$type": "SelectionComponent", + "Id": 14567565716714370511 + }, + "Component_[14826005606950858247]": { + "$type": "EditorEntitySortComponent", + "Id": 14826005606950858247 + }, + "Component_[15952534836289892585]": { + "$type": "EditorInspectorComponent", + "Id": 15952534836289892585 + }, + "Component_[16429683758229234581]": { + "$type": "EditorPendingCompositionComponent", + "Id": 16429683758229234581 + }, + "Component_[3145304225809715428]": { + "$type": "{27F1E1A1-8D9D-4C3B-BD3A-AFB9762449C0} TransformComponent", + "Id": 3145304225809715428, + "Parent Entity": "Entity_[655472831242]", + "Transform Data": { + "Translate": [ + 24.860464096069336, + 6.0520172119140625, + 64.24310302734375 + ] + } + }, + "Component_[3194434268397003277]": { + "$type": "EditorBoxShapeComponent", + "Id": 3194434268397003277, + "Visible": false, + "DisplayFilled": false, + "BoxShape": { + "Configuration": { + "IsFilled": false, + "Dimensions": [ + 200.0, + 200.0, + 0.10000000149011612 + ] + } + } + }, + "Component_[5124743265172522601]": { + "$type": "EditorDisabledCompositionComponent", + "Id": 5124743265172522601 + }, + "Component_[6141261141385234831]": { + "$type": "EditorOnlyEntityComponent", + "Id": 6141261141385234831 + }, + "Component_[8075217947437400102]": { + "$type": "EditorVisibilityComponent", + "Id": 8075217947437400102 + }, + "Component_[9742596769363363433]": { + "$type": "EditorEntityIconComponent", + "Id": 9742596769363363433 + } + } + }, + "Entity_[4073098678989001]": { + "Id": "Entity_[4073098678989001]", + "Name": "Surface", + "Components": { + "Component_[11461736083966389166]": { + "$type": "EditorSurfaceDataShapeComponent", + "Id": 11461736083966389166 + }, + "Component_[13283029886763197381]": { + "$type": "EditorLockComponent", + "Id": 13283029886763197381 + }, + "Component_[14567565716714370511]": { + "$type": "SelectionComponent", + "Id": 14567565716714370511 + }, + "Component_[14826005606950858247]": { + "$type": "EditorEntitySortComponent", + "Id": 14826005606950858247 + }, + "Component_[15952534836289892585]": { + "$type": "EditorInspectorComponent", + "Id": 15952534836289892585 + }, + "Component_[16429683758229234581]": { + "$type": "EditorPendingCompositionComponent", + "Id": 16429683758229234581 + }, + "Component_[3145304225809715428]": { + "$type": "{27F1E1A1-8D9D-4C3B-BD3A-AFB9762449C0} TransformComponent", + "Id": 3145304225809715428, + "Parent Entity": "Entity_[655472831242]", + "Transform Data": { + "Translate": [ + 24.860464096069336, + 6.0520172119140625, + 66.24310302734375 + ] + } + }, + "Component_[3194434268397003277]": { + "$type": "EditorBoxShapeComponent", + "Id": 3194434268397003277, + "Visible": false, + "DisplayFilled": false, + "BoxShape": { + "Configuration": { + "IsFilled": false, + "Dimensions": [ + 200.0, + 200.0, + 0.10000000149011612 + ] + } + } + }, + "Component_[5124743265172522601]": { + "$type": "EditorDisabledCompositionComponent", + "Id": 5124743265172522601 + }, + "Component_[6141261141385234831]": { + "$type": "EditorOnlyEntityComponent", + "Id": 6141261141385234831 + }, + "Component_[8075217947437400102]": { + "$type": "EditorVisibilityComponent", + "Id": 8075217947437400102 + }, + "Component_[9742596769363363433]": { + "$type": "EditorEntityIconComponent", + "Id": 9742596769363363433 + } + } + }, + "Entity_[4073102973956297]": { + "Id": "Entity_[4073102973956297]", + "Name": "Surface", + "Components": { + "Component_[11461736083966389166]": { + "$type": "EditorSurfaceDataShapeComponent", + "Id": 11461736083966389166 + }, + "Component_[13283029886763197381]": { + "$type": "EditorLockComponent", + "Id": 13283029886763197381 + }, + "Component_[14567565716714370511]": { + "$type": "SelectionComponent", + "Id": 14567565716714370511 + }, + "Component_[14826005606950858247]": { + "$type": "EditorEntitySortComponent", + "Id": 14826005606950858247 + }, + "Component_[15952534836289892585]": { + "$type": "EditorInspectorComponent", + "Id": 15952534836289892585 + }, + "Component_[16429683758229234581]": { + "$type": "EditorPendingCompositionComponent", + "Id": 16429683758229234581 + }, + "Component_[3145304225809715428]": { + "$type": "{27F1E1A1-8D9D-4C3B-BD3A-AFB9762449C0} TransformComponent", + "Id": 3145304225809715428, + "Parent Entity": "Entity_[655472831242]", + "Transform Data": { + "Translate": [ + 24.860464096069336, + 6.0520172119140625, + 74.24310302734375 + ] + } + }, + "Component_[3194434268397003277]": { + "$type": "EditorBoxShapeComponent", + "Id": 3194434268397003277, + "Visible": false, + "DisplayFilled": false, + "BoxShape": { + "Configuration": { + "IsFilled": false, + "Dimensions": [ + 200.0, + 200.0, + 0.10000000149011612 + ] + } + } + }, + "Component_[5124743265172522601]": { + "$type": "EditorDisabledCompositionComponent", + "Id": 5124743265172522601 + }, + "Component_[6141261141385234831]": { + "$type": "EditorOnlyEntityComponent", + "Id": 6141261141385234831 + }, + "Component_[8075217947437400102]": { + "$type": "EditorVisibilityComponent", + "Id": 8075217947437400102 + }, + "Component_[9742596769363363433]": { + "$type": "EditorEntityIconComponent", + "Id": 9742596769363363433 + } + } + }, + "Entity_[612523158282]": { + "Id": "Entity_[612523158282]", + "Name": "Surface", + "Components": { + "Component_[11461736083966389166]": { + "$type": "EditorSurfaceDataShapeComponent", + "Id": 11461736083966389166 + }, + "Component_[13283029886763197381]": { + "$type": "EditorLockComponent", + "Id": 13283029886763197381 + }, + "Component_[14567565716714370511]": { + "$type": "SelectionComponent", + "Id": 14567565716714370511 + }, + "Component_[14826005606950858247]": { + "$type": "EditorEntitySortComponent", + "Id": 14826005606950858247 + }, + "Component_[15952534836289892585]": { + "$type": "EditorInspectorComponent", + "Id": 15952534836289892585 + }, + "Component_[16429683758229234581]": { + "$type": "EditorPendingCompositionComponent", + "Id": 16429683758229234581 + }, + "Component_[3145304225809715428]": { + "$type": "{27F1E1A1-8D9D-4C3B-BD3A-AFB9762449C0} TransformComponent", + "Id": 3145304225809715428, + "Parent Entity": "Entity_[655472831242]", + "Transform Data": { + "Translate": [ + 24.860464096069336, + 6.0520172119140625, + 0.0 + ] + } + }, + "Component_[3194434268397003277]": { + "$type": "EditorBoxShapeComponent", + "Id": 3194434268397003277, + "Visible": false, + "DisplayFilled": false, + "BoxShape": { + "Configuration": { + "IsFilled": false, + "Dimensions": [ + 200.0, + 200.0, + 0.10000000149011612 + ] + } + } + }, + "Component_[5124743265172522601]": { + "$type": "EditorDisabledCompositionComponent", + "Id": 5124743265172522601 + }, + "Component_[6141261141385234831]": { + "$type": "EditorOnlyEntityComponent", + "Id": 6141261141385234831 + }, + "Component_[8075217947437400102]": { + "$type": "EditorVisibilityComponent", + "Id": 8075217947437400102 + }, + "Component_[9742596769363363433]": { + "$type": "EditorEntityIconComponent", + "Id": 9742596769363363433 + } + } + }, + "Entity_[616818125578]": { + "Id": "Entity_[616818125578]", + "Name": "Surface", + "Components": { + "Component_[11461736083966389166]": { + "$type": "EditorSurfaceDataShapeComponent", + "Id": 11461736083966389166 + }, + "Component_[13283029886763197381]": { + "$type": "EditorLockComponent", + "Id": 13283029886763197381 + }, + "Component_[14567565716714370511]": { + "$type": "SelectionComponent", + "Id": 14567565716714370511 + }, + "Component_[14826005606950858247]": { + "$type": "EditorEntitySortComponent", + "Id": 14826005606950858247 + }, + "Component_[15952534836289892585]": { + "$type": "EditorInspectorComponent", + "Id": 15952534836289892585 + }, + "Component_[16429683758229234581]": { + "$type": "EditorPendingCompositionComponent", + "Id": 16429683758229234581 + }, + "Component_[3145304225809715428]": { + "$type": "{27F1E1A1-8D9D-4C3B-BD3A-AFB9762449C0} TransformComponent", + "Id": 3145304225809715428, + "Parent Entity": "Entity_[655472831242]", + "Transform Data": { + "Translate": [ + 24.860464096069336, + 6.0520172119140625, + 18.0 + ] + } + }, + "Component_[3194434268397003277]": { + "$type": "EditorBoxShapeComponent", + "Id": 3194434268397003277, + "Visible": false, + "DisplayFilled": false, + "BoxShape": { + "Configuration": { + "IsFilled": false, + "Dimensions": [ + 200.0, + 200.0, + 0.10000000149011612 + ] + } + } + }, + "Component_[5124743265172522601]": { + "$type": "EditorDisabledCompositionComponent", + "Id": 5124743265172522601 + }, + "Component_[6141261141385234831]": { + "$type": "EditorOnlyEntityComponent", + "Id": 6141261141385234831 + }, + "Component_[8075217947437400102]": { + "$type": "EditorVisibilityComponent", + "Id": 8075217947437400102 + }, + "Component_[9742596769363363433]": { + "$type": "EditorEntityIconComponent", + "Id": 9742596769363363433 + } + } + }, + "Entity_[621113092874]": { + "Id": "Entity_[621113092874]", + "Name": "Surface", + "Components": { + "Component_[11461736083966389166]": { + "$type": "EditorSurfaceDataShapeComponent", + "Id": 11461736083966389166 + }, + "Component_[13283029886763197381]": { + "$type": "EditorLockComponent", + "Id": 13283029886763197381 + }, + "Component_[14567565716714370511]": { + "$type": "SelectionComponent", + "Id": 14567565716714370511 + }, + "Component_[14826005606950858247]": { + "$type": "EditorEntitySortComponent", + "Id": 14826005606950858247 + }, + "Component_[15952534836289892585]": { + "$type": "EditorInspectorComponent", + "Id": 15952534836289892585 + }, + "Component_[16429683758229234581]": { + "$type": "EditorPendingCompositionComponent", + "Id": 16429683758229234581 + }, + "Component_[3145304225809715428]": { + "$type": "{27F1E1A1-8D9D-4C3B-BD3A-AFB9762449C0} TransformComponent", + "Id": 3145304225809715428, + "Parent Entity": "Entity_[655472831242]", + "Transform Data": { + "Translate": [ + 24.860464096069336, + 6.0520172119140625, + 2.0 + ] + } + }, + "Component_[3194434268397003277]": { + "$type": "EditorBoxShapeComponent", + "Id": 3194434268397003277, + "Visible": false, + "DisplayFilled": false, + "BoxShape": { + "Configuration": { + "IsFilled": false, + "Dimensions": [ + 200.0, + 200.0, + 0.10000000149011612 + ] + } + } + }, + "Component_[5124743265172522601]": { + "$type": "EditorDisabledCompositionComponent", + "Id": 5124743265172522601 + }, + "Component_[6141261141385234831]": { + "$type": "EditorOnlyEntityComponent", + "Id": 6141261141385234831 + }, + "Component_[8075217947437400102]": { + "$type": "EditorVisibilityComponent", + "Id": 8075217947437400102 + }, + "Component_[9742596769363363433]": { + "$type": "EditorEntityIconComponent", + "Id": 9742596769363363433 + } + } + }, + "Entity_[625408060170]": { + "Id": "Entity_[625408060170]", + "Name": "Surface", + "Components": { + "Component_[11461736083966389166]": { + "$type": "EditorSurfaceDataShapeComponent", + "Id": 11461736083966389166 + }, + "Component_[13283029886763197381]": { + "$type": "EditorLockComponent", + "Id": 13283029886763197381 + }, + "Component_[14567565716714370511]": { + "$type": "SelectionComponent", + "Id": 14567565716714370511 + }, + "Component_[14826005606950858247]": { + "$type": "EditorEntitySortComponent", + "Id": 14826005606950858247 + }, + "Component_[15952534836289892585]": { + "$type": "EditorInspectorComponent", + "Id": 15952534836289892585 + }, + "Component_[16429683758229234581]": { + "$type": "EditorPendingCompositionComponent", + "Id": 16429683758229234581 + }, + "Component_[3145304225809715428]": { + "$type": "{27F1E1A1-8D9D-4C3B-BD3A-AFB9762449C0} TransformComponent", + "Id": 3145304225809715428, + "Parent Entity": "Entity_[655472831242]", + "Transform Data": { + "Translate": [ + 24.860464096069336, + 6.0520172119140625, + 16.0 + ] + } + }, + "Component_[3194434268397003277]": { + "$type": "EditorBoxShapeComponent", + "Id": 3194434268397003277, + "Visible": false, + "DisplayFilled": false, + "BoxShape": { + "Configuration": { + "IsFilled": false, + "Dimensions": [ + 200.0, + 200.0, + 0.10000000149011612 + ] + } + } + }, + "Component_[5124743265172522601]": { + "$type": "EditorDisabledCompositionComponent", + "Id": 5124743265172522601 + }, + "Component_[6141261141385234831]": { + "$type": "EditorOnlyEntityComponent", + "Id": 6141261141385234831 + }, + "Component_[8075217947437400102]": { + "$type": "EditorVisibilityComponent", + "Id": 8075217947437400102 + }, + "Component_[9742596769363363433]": { + "$type": "EditorEntityIconComponent", + "Id": 9742596769363363433 + } + } + }, + "Entity_[629703027466]": { + "Id": "Entity_[629703027466]", + "Name": "Surface", + "Components": { + "Component_[11461736083966389166]": { + "$type": "EditorSurfaceDataShapeComponent", + "Id": 11461736083966389166 + }, + "Component_[13283029886763197381]": { + "$type": "EditorLockComponent", + "Id": 13283029886763197381 + }, + "Component_[14567565716714370511]": { + "$type": "SelectionComponent", + "Id": 14567565716714370511 + }, + "Component_[14826005606950858247]": { + "$type": "EditorEntitySortComponent", + "Id": 14826005606950858247 + }, + "Component_[15952534836289892585]": { + "$type": "EditorInspectorComponent", + "Id": 15952534836289892585 + }, + "Component_[16429683758229234581]": { + "$type": "EditorPendingCompositionComponent", + "Id": 16429683758229234581 + }, + "Component_[3145304225809715428]": { + "$type": "{27F1E1A1-8D9D-4C3B-BD3A-AFB9762449C0} TransformComponent", + "Id": 3145304225809715428, + "Parent Entity": "Entity_[655472831242]", + "Transform Data": { + "Translate": [ + 24.860464096069336, + 6.0520172119140625, + 14.0 + ] + } + }, + "Component_[3194434268397003277]": { + "$type": "EditorBoxShapeComponent", + "Id": 3194434268397003277, + "Visible": false, + "DisplayFilled": false, + "BoxShape": { + "Configuration": { + "IsFilled": false, + "Dimensions": [ + 200.0, + 200.0, + 0.10000000149011612 + ] + } + } + }, + "Component_[5124743265172522601]": { + "$type": "EditorDisabledCompositionComponent", + "Id": 5124743265172522601 + }, + "Component_[6141261141385234831]": { + "$type": "EditorOnlyEntityComponent", + "Id": 6141261141385234831 + }, + "Component_[8075217947437400102]": { + "$type": "EditorVisibilityComponent", + "Id": 8075217947437400102 + }, + "Component_[9742596769363363433]": { + "$type": "EditorEntityIconComponent", + "Id": 9742596769363363433 + } + } + }, + "Entity_[633997994762]": { + "Id": "Entity_[633997994762]", + "Name": "Surface", + "Components": { + "Component_[11461736083966389166]": { + "$type": "EditorSurfaceDataShapeComponent", + "Id": 11461736083966389166 + }, + "Component_[13283029886763197381]": { + "$type": "EditorLockComponent", + "Id": 13283029886763197381 + }, + "Component_[14567565716714370511]": { + "$type": "SelectionComponent", + "Id": 14567565716714370511 + }, + "Component_[14826005606950858247]": { + "$type": "EditorEntitySortComponent", + "Id": 14826005606950858247 + }, + "Component_[15952534836289892585]": { + "$type": "EditorInspectorComponent", + "Id": 15952534836289892585 + }, + "Component_[16429683758229234581]": { + "$type": "EditorPendingCompositionComponent", + "Id": 16429683758229234581 + }, + "Component_[3145304225809715428]": { + "$type": "{27F1E1A1-8D9D-4C3B-BD3A-AFB9762449C0} TransformComponent", + "Id": 3145304225809715428, + "Parent Entity": "Entity_[655472831242]", + "Transform Data": { + "Translate": [ + 24.860464096069336, + 6.0520172119140625, + 12.0 + ] + } + }, + "Component_[3194434268397003277]": { + "$type": "EditorBoxShapeComponent", + "Id": 3194434268397003277, + "Visible": false, + "DisplayFilled": false, + "BoxShape": { + "Configuration": { + "IsFilled": false, + "Dimensions": [ + 200.0, + 200.0, + 0.10000000149011612 + ] + } + } + }, + "Component_[5124743265172522601]": { + "$type": "EditorDisabledCompositionComponent", + "Id": 5124743265172522601 + }, + "Component_[6141261141385234831]": { + "$type": "EditorOnlyEntityComponent", + "Id": 6141261141385234831 + }, + "Component_[8075217947437400102]": { + "$type": "EditorVisibilityComponent", + "Id": 8075217947437400102 + }, + "Component_[9742596769363363433]": { + "$type": "EditorEntityIconComponent", + "Id": 9742596769363363433 + } + } + }, + "Entity_[638292962058]": { + "Id": "Entity_[638292962058]", + "Name": "Surface", + "Components": { + "Component_[11461736083966389166]": { + "$type": "EditorSurfaceDataShapeComponent", + "Id": 11461736083966389166 + }, + "Component_[13283029886763197381]": { + "$type": "EditorLockComponent", + "Id": 13283029886763197381 + }, + "Component_[14567565716714370511]": { + "$type": "SelectionComponent", + "Id": 14567565716714370511 + }, + "Component_[14826005606950858247]": { + "$type": "EditorEntitySortComponent", + "Id": 14826005606950858247 + }, + "Component_[15952534836289892585]": { + "$type": "EditorInspectorComponent", + "Id": 15952534836289892585 + }, + "Component_[16429683758229234581]": { + "$type": "EditorPendingCompositionComponent", + "Id": 16429683758229234581 + }, + "Component_[3145304225809715428]": { + "$type": "{27F1E1A1-8D9D-4C3B-BD3A-AFB9762449C0} TransformComponent", + "Id": 3145304225809715428, + "Parent Entity": "Entity_[655472831242]", + "Transform Data": { + "Translate": [ + 24.860464096069336, + 6.0520172119140625, + 4.0 + ] + } + }, + "Component_[3194434268397003277]": { + "$type": "EditorBoxShapeComponent", + "Id": 3194434268397003277, + "Visible": false, + "DisplayFilled": false, + "BoxShape": { + "Configuration": { + "IsFilled": false, + "Dimensions": [ + 200.0, + 200.0, + 0.10000000149011612 + ] + } + } + }, + "Component_[5124743265172522601]": { + "$type": "EditorDisabledCompositionComponent", + "Id": 5124743265172522601 + }, + "Component_[6141261141385234831]": { + "$type": "EditorOnlyEntityComponent", + "Id": 6141261141385234831 + }, + "Component_[8075217947437400102]": { + "$type": "EditorVisibilityComponent", + "Id": 8075217947437400102 + }, + "Component_[9742596769363363433]": { + "$type": "EditorEntityIconComponent", + "Id": 9742596769363363433 + } + } + }, + "Entity_[642587929354]": { + "Id": "Entity_[642587929354]", + "Name": "Surface", + "Components": { + "Component_[11461736083966389166]": { + "$type": "EditorSurfaceDataShapeComponent", + "Id": 11461736083966389166 + }, + "Component_[13283029886763197381]": { + "$type": "EditorLockComponent", + "Id": 13283029886763197381 + }, + "Component_[14567565716714370511]": { + "$type": "SelectionComponent", + "Id": 14567565716714370511 + }, + "Component_[14826005606950858247]": { + "$type": "EditorEntitySortComponent", + "Id": 14826005606950858247 + }, + "Component_[15952534836289892585]": { + "$type": "EditorInspectorComponent", + "Id": 15952534836289892585 + }, + "Component_[16429683758229234581]": { + "$type": "EditorPendingCompositionComponent", + "Id": 16429683758229234581 + }, + "Component_[3145304225809715428]": { + "$type": "{27F1E1A1-8D9D-4C3B-BD3A-AFB9762449C0} TransformComponent", + "Id": 3145304225809715428, + "Parent Entity": "Entity_[655472831242]", + "Transform Data": { + "Translate": [ + 24.860464096069336, + 6.0520172119140625, + 10.0 + ] + } + }, + "Component_[3194434268397003277]": { + "$type": "EditorBoxShapeComponent", + "Id": 3194434268397003277, + "Visible": false, + "DisplayFilled": false, + "BoxShape": { + "Configuration": { + "IsFilled": false, + "Dimensions": [ + 200.0, + 200.0, + 0.10000000149011612 + ] + } + } + }, + "Component_[5124743265172522601]": { + "$type": "EditorDisabledCompositionComponent", + "Id": 5124743265172522601 + }, + "Component_[6141261141385234831]": { + "$type": "EditorOnlyEntityComponent", + "Id": 6141261141385234831 + }, + "Component_[8075217947437400102]": { + "$type": "EditorVisibilityComponent", + "Id": 8075217947437400102 + }, + "Component_[9742596769363363433]": { + "$type": "EditorEntityIconComponent", + "Id": 9742596769363363433 + } + } + }, + "Entity_[646882896650]": { + "Id": "Entity_[646882896650]", + "Name": "Surface", + "Components": { + "Component_[11461736083966389166]": { + "$type": "EditorSurfaceDataShapeComponent", + "Id": 11461736083966389166 + }, + "Component_[13283029886763197381]": { + "$type": "EditorLockComponent", + "Id": 13283029886763197381 + }, + "Component_[14567565716714370511]": { + "$type": "SelectionComponent", + "Id": 14567565716714370511 + }, + "Component_[14826005606950858247]": { + "$type": "EditorEntitySortComponent", + "Id": 14826005606950858247 + }, + "Component_[15952534836289892585]": { + "$type": "EditorInspectorComponent", + "Id": 15952534836289892585 + }, + "Component_[16429683758229234581]": { + "$type": "EditorPendingCompositionComponent", + "Id": 16429683758229234581 + }, + "Component_[3145304225809715428]": { + "$type": "{27F1E1A1-8D9D-4C3B-BD3A-AFB9762449C0} TransformComponent", + "Id": 3145304225809715428, + "Parent Entity": "Entity_[655472831242]", + "Transform Data": { + "Translate": [ + 24.860464096069336, + 6.0520172119140625, + 8.0 + ] + } + }, + "Component_[3194434268397003277]": { + "$type": "EditorBoxShapeComponent", + "Id": 3194434268397003277, + "Visible": false, + "DisplayFilled": false, + "BoxShape": { + "Configuration": { + "IsFilled": false, + "Dimensions": [ + 200.0, + 200.0, + 0.10000000149011612 + ] + } + } + }, + "Component_[5124743265172522601]": { + "$type": "EditorDisabledCompositionComponent", + "Id": 5124743265172522601 + }, + "Component_[6141261141385234831]": { + "$type": "EditorOnlyEntityComponent", + "Id": 6141261141385234831 + }, + "Component_[8075217947437400102]": { + "$type": "EditorVisibilityComponent", + "Id": 8075217947437400102 + }, + "Component_[9742596769363363433]": { + "$type": "EditorEntityIconComponent", + "Id": 9742596769363363433 + } + } + }, + "Entity_[651177863946]": { + "Id": "Entity_[651177863946]", + "Name": "Surface", + "Components": { + "Component_[11461736083966389166]": { + "$type": "EditorSurfaceDataShapeComponent", + "Id": 11461736083966389166 + }, + "Component_[13283029886763197381]": { + "$type": "EditorLockComponent", + "Id": 13283029886763197381 + }, + "Component_[14567565716714370511]": { + "$type": "SelectionComponent", + "Id": 14567565716714370511 + }, + "Component_[14826005606950858247]": { + "$type": "EditorEntitySortComponent", + "Id": 14826005606950858247 + }, + "Component_[15952534836289892585]": { + "$type": "EditorInspectorComponent", + "Id": 15952534836289892585 + }, + "Component_[16429683758229234581]": { + "$type": "EditorPendingCompositionComponent", + "Id": 16429683758229234581 + }, + "Component_[3145304225809715428]": { + "$type": "{27F1E1A1-8D9D-4C3B-BD3A-AFB9762449C0} TransformComponent", + "Id": 3145304225809715428, + "Parent Entity": "Entity_[655472831242]", + "Transform Data": { + "Translate": [ + 24.860464096069336, + 6.0520172119140625, + 6.0 + ] + } + }, + "Component_[3194434268397003277]": { + "$type": "EditorBoxShapeComponent", + "Id": 3194434268397003277, + "Visible": false, + "DisplayFilled": false, + "BoxShape": { + "Configuration": { + "IsFilled": false, + "Dimensions": [ + 200.0, + 200.0, + 0.10000000149011612 + ] + } + } + }, + "Component_[5124743265172522601]": { + "$type": "EditorDisabledCompositionComponent", + "Id": 5124743265172522601 + }, + "Component_[6141261141385234831]": { + "$type": "EditorOnlyEntityComponent", + "Id": 6141261141385234831 + }, + "Component_[8075217947437400102]": { + "$type": "EditorVisibilityComponent", + "Id": 8075217947437400102 + }, + "Component_[9742596769363363433]": { + "$type": "EditorEntityIconComponent", + "Id": 9742596769363363433 + } + } + }, + "Entity_[655472831242]": { + "Id": "Entity_[655472831242]", + "Name": "Surfaces", + "Components": { + "Component_[11463830567025741777]": { + "$type": "{27F1E1A1-8D9D-4C3B-BD3A-AFB9762449C0} TransformComponent", + "Id": 11463830567025741777, + "Parent Entity": "Entity_[1146574390643]", + "Transform Data": { + "Translate": [ + 25.139535903930664, + 43.94798278808594, + 0.0 + ] + } + }, + "Component_[16576383876931487287]": { + "$type": "EditorLockComponent", + "Id": 16576383876931487287 + }, + "Component_[17475328349202721984]": { + "$type": "EditorDisabledCompositionComponent", + "Id": 17475328349202721984 + }, + "Component_[2693664693208376125]": { + "$type": "EditorVisibilityComponent", + "Id": 2693664693208376125 + }, + "Component_[3772848404212958248]": { + "$type": "EditorInspectorComponent", + "Id": 3772848404212958248 + }, + "Component_[3891212684133169478]": { + "$type": "SelectionComponent", + "Id": 3891212684133169478 + }, + "Component_[4930031329153667734]": { + "$type": "EditorEntityIconComponent", + "Id": 4930031329153667734 + }, + "Component_[5015604486311198963]": { + "$type": "EditorEntitySortComponent", + "Id": 5015604486311198963, + "Child Entity Order": [ + "Entity_[612523158282]", + "Entity_[621113092874]", + "Entity_[638292962058]", + "Entity_[651177863946]", + "Entity_[646882896650]", + "Entity_[642587929354]", + "Entity_[633997994762]", + "Entity_[629703027466]", + "Entity_[625408060170]", + "Entity_[616818125578]", + "Entity_[2994164239528137]", + "Entity_[2994155649593545]", + "Entity_[2994134174757065]", + "Entity_[2994142764691657]", + "Entity_[2994138469724361]", + "Entity_[2994159944560841]", + "Entity_[2994151354626249]", + "Entity_[2994147059658953]", + "Entity_[2994172829462729]", + "Entity_[2994168534495433]", + "Entity_[3446243907170505]", + "Entity_[3446213842399433]", + "Entity_[3446239612203209]", + "Entity_[3446226727301321]", + "Entity_[3446218137366729]", + "Entity_[3446231022268617]", + "Entity_[3446222432334025]", + "Entity_[3446252497105097]", + "Entity_[3446248202137801]", + "Entity_[3446235317235913]", + "Entity_[4073090089054409]", + "Entity_[4073064319250633]", + "Entity_[4073077204152521]", + "Entity_[4073068614217929]", + "Entity_[4073072909185225]", + "Entity_[4073081499119817]", + "Entity_[4073085794087113]", + "Entity_[4073102973956297]", + "Entity_[4073094384021705]", + "Entity_[4073098678989001]" + ] + }, + "Component_[7096718211285552582]": { + "$type": "EditorOnlyEntityComponent", + "Id": 7096718211285552582 + }, + "Component_[8091190759736241533]": { + "$type": "EditorPendingCompositionComponent", + "Id": 8091190759736241533 + } + } + }, + "Entity_[659767798538]": { + "Id": "Entity_[659767798538]", + "Name": "VegArea", + "Components": { + "Component_[10457867987348570858]": { + "$type": "EditorInspectorComponent", + "Id": 10457867987348570858 + }, + "Component_[1229363445910756890]": { + "$type": "{DD96FD51-A86B-48BC-A6AB-89183B538269} EditorSpawnerComponent", + "Id": 1229363445910756890, + "PreviewEntity": "Entity_[659767798538]" + }, + "Component_[12481711086985445589]": { + "$type": "EditorVisibilityComponent", + "Id": 12481711086985445589 + }, + "Component_[14421356574908560819]": { + "$type": "EditorAxisAlignedBoxShapeComponent", + "Id": 14421356574908560819, + "Visible": false, + "DisplayFilled": false, + "AxisAlignedBoxShape": { + "Configuration": { + "IsFilled": false, + "Dimensions": [ + 200.0, + 200.0, + 200.0 + ] + } + } + }, + "Component_[14627293932927606859]": { + "$type": "{27F1E1A1-8D9D-4C3B-BD3A-AFB9762449C0} TransformComponent", + "Id": 14627293932927606859, + "Parent Entity": "Entity_[1146574390643]", + "Transform Data": { + "Translate": [ + 25.139535903930664, + 43.94798278808594, + 0.0 + ] + } + }, + "Component_[16742116787858765489]": { + "$type": "EditorDisabledCompositionComponent", + "Id": 16742116787858765489 + }, + "Component_[17369607211365211528]": { + "$type": "EditorEntitySortComponent", + "Id": 17369607211365211528, + "Child Entity Order": [ + "Instance_[919926567113]/ContainerEntity", + "Instance_[1031595716809]/ContainerEntity", + "Instance_[1160444735689]/ContainerEntity", + "Instance_[1306473623753]/ContainerEntity", + "Instance_[1469682381001]/ContainerEntity", + "Instance_[1650071007433]/ContainerEntity", + "Instance_[1847639503049]/ContainerEntity", + "Instance_[2062387867849]/ContainerEntity", + "Instance_[2294316101833]/ContainerEntity", + "Instance_[2543424205001]/ContainerEntity", + "Instance_[2809712177353]/ContainerEntity", + "Instance_[3093180018889]/ContainerEntity", + "Instance_[3398122696905]/ContainerEntity" + ] + }, + "Component_[17539394596964090620]": { + "$type": "EditorDescriptorListComponent", + "Id": 17539394596964090620, + "Configuration": { + "Descriptors": [ + { + "SpawnerType": "{74BEEDB5-81CF-409F-B375-0D93D81EF2E3}", + "InstanceSpawner": { + "$type": "PrefabInstanceSpawner", + "SpawnableAsset": { + "assetId": { + "guid": "{60CF6C60-8620-5173-814C-ED8B0C395BA7}", + "subId": 1611714993 + }, + "assetHint": "prefabs/testdata/graphics/cubealuminumpolishedpbr.spawnable" + } + } + }, + { + "SpawnerType": "{74BEEDB5-81CF-409F-B375-0D93D81EF2E3}", + "InstanceSpawner": { + "$type": "PrefabInstanceSpawner", + "SpawnableAsset": { + "assetId": { + "guid": "{B030470B-92ED-5673-B108-5BD3C31A3795}", + "subId": 2910987375 + }, + "assetHint": "prefabs/testdata/graphics/cubebrasspolishedpbr.spawnable" + } + } + }, + { + "SpawnerType": "{74BEEDB5-81CF-409F-B375-0D93D81EF2E3}", + "InstanceSpawner": { + "$type": "PrefabInstanceSpawner", + "SpawnableAsset": { + "assetId": { + "guid": "{D4AC76BB-BA32-5787-A862-3C6296503126}", + "subId": 1351414441 + }, + "assetHint": "prefabs/testdata/graphics/cubechromepolishedpbr.spawnable" + } + } + }, + { + "SpawnerType": "{74BEEDB5-81CF-409F-B375-0D93D81EF2E3}", + "InstanceSpawner": { + "$type": "PrefabInstanceSpawner", + "SpawnableAsset": { + "assetId": { + "guid": "{6E0DF0BD-2B50-5353-A063-88AAEEBED799}", + "subId": 1382904365 + }, + "assetHint": "prefabs/testdata/graphics/cubecobaltpolishedpbr.spawnable" + } + } + }, + { + "SpawnerType": "{74BEEDB5-81CF-409F-B375-0D93D81EF2E3}", + "InstanceSpawner": { + "$type": "PrefabInstanceSpawner", + "SpawnableAsset": { + "assetId": { + "guid": "{CB9E61C4-1122-56D8-8906-2FF8FC4D1876}", + "subId": 3884585917 + }, + "assetHint": "prefabs/testdata/graphics/cubecopperpolishedpbr.spawnable" + } + } + }, + { + "SpawnerType": "{74BEEDB5-81CF-409F-B375-0D93D81EF2E3}", + "InstanceSpawner": { + "$type": "PrefabInstanceSpawner", + "SpawnableAsset": { + "assetId": { + "guid": "{9105AA91-FE70-56C2-BA83-E08F268C333F}", + "subId": 2449326585 + }, + "assetHint": "prefabs/testdata/graphics/cubegoldpolishedpbr.spawnable" + } + } + }, + { + "SpawnerType": "{74BEEDB5-81CF-409F-B375-0D93D81EF2E3}", + "InstanceSpawner": { + "$type": "PrefabInstanceSpawner", + "SpawnableAsset": { + "assetId": { + "guid": "{7DB86E6D-05C1-5B3C-88B4-DC9039005E1F}", + "subId": 932993536 + }, + "assetHint": "prefabs/testdata/graphics/cubeironpolishedpbr.spawnable" + } + } + }, + { + "SpawnerType": "{74BEEDB5-81CF-409F-B375-0D93D81EF2E3}", + "InstanceSpawner": { + "$type": "PrefabInstanceSpawner", + "SpawnableAsset": { + "assetId": { + "guid": "{D8EEB566-07A9-5F39-9B89-66492858F178}", + "subId": 2937511027 + }, + "assetHint": "prefabs/testdata/graphics/cubemercurypbr.spawnable" + } + } + }, + { + "SpawnerType": "{74BEEDB5-81CF-409F-B375-0D93D81EF2E3}", + "InstanceSpawner": { + "$type": "PrefabInstanceSpawner", + "SpawnableAsset": { + "assetId": { + "guid": "{7988D594-BA33-5843-886B-9E23FD9B1B3F}", + "subId": 3637668335 + }, + "assetHint": "prefabs/testdata/graphics/cubenickelpolishedpbr.spawnable" + } + } + }, + { + "SpawnerType": "{74BEEDB5-81CF-409F-B375-0D93D81EF2E3}", + "InstanceSpawner": { + "$type": "PrefabInstanceSpawner", + "SpawnableAsset": { + "assetId": { + "guid": "{CDDFE051-9910-5CD5-BD62-6FC729910CE5}", + "subId": 3334536131 + }, + "assetHint": "prefabs/testdata/graphics/cubepalladiumpolishedpbr.spawnable" + } + } + }, + { + "SpawnerType": "{74BEEDB5-81CF-409F-B375-0D93D81EF2E3}", + "InstanceSpawner": { + "$type": "PrefabInstanceSpawner", + "SpawnableAsset": { + "assetId": { + "guid": "{F336F1A7-7FDF-5972-A48E-58DC83D152A4}", + "subId": 610633662 + }, + "assetHint": "prefabs/testdata/graphics/cubeplatinumpolishedpbr.spawnable" + } + }, + "Advanced": true + }, + { + "SpawnerType": "{74BEEDB5-81CF-409F-B375-0D93D81EF2E3}", + "InstanceSpawner": { + "$type": "PrefabInstanceSpawner", + "SpawnableAsset": { + "assetId": { + "guid": "{32B00E51-BC05-5F03-A9AA-2D7AFE680EAC}", + "subId": 3534297619 + }, + "assetHint": "prefabs/testdata/graphics/cubesilverpolishedpbr.spawnable" + } + } + }, + { + "SpawnerType": "{74BEEDB5-81CF-409F-B375-0D93D81EF2E3}", + "InstanceSpawner": { + "$type": "PrefabInstanceSpawner", + "SpawnableAsset": { + "assetId": { + "guid": "{BBAB8640-03D2-5138-B52F-D031F29AF8C9}", + "subId": 923463205 + }, + "assetHint": "prefabs/testdata/graphics/cubetitaniumpolishedpbr.spawnable" + } + } + } + ] + } + }, + "Component_[2434532182352640072]": { + "$type": "EditorLockComponent", + "Id": 2434532182352640072 + }, + "Component_[6884260241620821202]": { + "$type": "SelectionComponent", + "Id": 6884260241620821202 + }, + "Component_[7575363224499024733]": { + "$type": "EditorPendingCompositionComponent", + "Id": 7575363224499024733 + }, + "Component_[9440481613501976688]": { + "$type": "EditorEntityIconComponent", + "Id": 9440481613501976688 + }, + "Component_[9636552512161785427]": { + "$type": "EditorOnlyEntityComponent", + "Id": 9636552512161785427 + } + } + } + }, + "Instances": { + "Instance_[1031595716809]": { + "Source": "Prefabs/TestData/Graphics/CubeAluminumPolishedPBR.prefab", + "Patches": [ + { + "op": "replace", + "path": "/ContainerEntity/Components/Component_[1006636009791072742]/Parent Entity", + "value": "../Entity_[659767798538]" + }, + { + "op": "replace", + "path": "/ContainerEntity/Components/Component_[1006636009791072742]/Transform Data/Translate/0", + "value": -264.5232849121094 + }, + { + "op": "replace", + "path": "/ContainerEntity/Components/Component_[1006636009791072742]/Transform Data/Translate/2", + "value": 1.0 + } + ] + }, + "Instance_[1160444735689]": { + "Source": "Prefabs/TestData/Graphics/CubeBrassPolishedPBR.prefab", + "Patches": [ + { + "op": "replace", + "path": "/ContainerEntity/Components/Component_[17333992135029064645]/Parent Entity", + "value": "../Entity_[659767798538]" + }, + { + "op": "replace", + "path": "/ContainerEntity/Components/Component_[17333992135029064645]/Transform Data/Translate/0", + "value": -264.5232849121094 + }, + { + "op": "replace", + "path": "/ContainerEntity/Components/Component_[17333992135029064645]/Transform Data/Translate/1", + "value": 1.4970321655273438 + }, + { + "op": "replace", + "path": "/ContainerEntity/Components/Component_[17333992135029064645]/Transform Data/Translate/2", + "value": 1.0 + } + ] + }, + "Instance_[1306473623753]": { + "Source": "Prefabs/TestData/Graphics/CubeChromePolishedPBR.prefab", + "Patches": [ + { + "op": "replace", + "path": "/ContainerEntity/Components/Component_[15205683346512266293]/Parent Entity", + "value": "../Entity_[659767798538]" + }, + { + "op": "replace", + "path": "/ContainerEntity/Components/Component_[15205683346512266293]/Transform Data/Translate/0", + "value": -264.5232849121094 + }, + { + "op": "replace", + "path": "/ContainerEntity/Components/Component_[15205683346512266293]/Transform Data/Translate/1", + "value": 3.06375503540039 + }, + { + "op": "replace", + "path": "/ContainerEntity/Components/Component_[15205683346512266293]/Transform Data/Translate/2", + "value": 1.0 + } + ] + }, + "Instance_[1469682381001]": { + "Source": "Prefabs/TestData/Graphics/CubeCobaltPolishedPBR.prefab", + "Patches": [ + { + "op": "replace", + "path": "/ContainerEntity/Components/Component_[12811832964126776693]/Parent Entity", + "value": "../Entity_[659767798538]" + }, + { + "op": "replace", + "path": "/ContainerEntity/Components/Component_[12811832964126776693]/Transform Data/Translate/0", + "value": -264.5232849121094 + }, + { + "op": "replace", + "path": "/ContainerEntity/Components/Component_[12811832964126776693]/Transform Data/Translate/1", + "value": 4.512233734130859 + }, + { + "op": "replace", + "path": "/ContainerEntity/Components/Component_[12811832964126776693]/Transform Data/Translate/2", + "value": 1.0 + } + ] + }, + "Instance_[1650071007433]": { + "Source": "Prefabs/TestData/Graphics/CubeCopperPolishedPBR.prefab", + "Patches": [ + { + "op": "replace", + "path": "/ContainerEntity/Components/Component_[5749675910289562089]/Parent Entity", + "value": "../Entity_[659767798538]" + }, + { + "op": "replace", + "path": "/ContainerEntity/Components/Component_[5749675910289562089]/Transform Data/Translate/0", + "value": -264.5232849121094 + }, + { + "op": "replace", + "path": "/ContainerEntity/Components/Component_[5749675910289562089]/Transform Data/Translate/1", + "value": 5.966960906982422 + }, + { + "op": "replace", + "path": "/ContainerEntity/Components/Component_[5749675910289562089]/Transform Data/Translate/2", + "value": 1.0 + } + ] + }, + "Instance_[1847639503049]": { + "Source": "Prefabs/TestData/Graphics/CubeGoldPolishedPBR.prefab", + "Patches": [ + { + "op": "replace", + "path": "/ContainerEntity/Components/Component_[11570676153379582500]/Parent Entity", + "value": "../Entity_[659767798538]" + }, + { + "op": "replace", + "path": "/ContainerEntity/Components/Component_[11570676153379582500]/Transform Data/Translate/0", + "value": -264.5232849121094 + }, + { + "op": "replace", + "path": "/ContainerEntity/Components/Component_[11570676153379582500]/Transform Data/Translate/1", + "value": 7.424510955810547 + }, + { + "op": "replace", + "path": "/ContainerEntity/Components/Component_[11570676153379582500]/Transform Data/Translate/2", + "value": 1.0 + } + ] + }, + "Instance_[2062387867849]": { + "Source": "Prefabs/TestData/Graphics/CubeIronPolishedPBR.prefab", + "Patches": [ + { + "op": "replace", + "path": "/ContainerEntity/Components/Component_[17506200912680653288]/Parent Entity", + "value": "../Entity_[659767798538]" + }, + { + "op": "replace", + "path": "/ContainerEntity/Components/Component_[17506200912680653288]/Transform Data/Translate/0", + "value": -264.5232849121094 + }, + { + "op": "replace", + "path": "/ContainerEntity/Components/Component_[17506200912680653288]/Transform Data/Translate/1", + "value": 8.888202667236328 + }, + { + "op": "replace", + "path": "/ContainerEntity/Components/Component_[17506200912680653288]/Transform Data/Translate/2", + "value": 1.0 + } + ] + }, + "Instance_[2294316101833]": { + "Source": "Prefabs/TestData/Graphics/CubeNickelPolishedPBR.prefab", + "Patches": [ + { + "op": "replace", + "path": "/ContainerEntity/Components/Component_[12821987693261496174]/Parent Entity", + "value": "../Entity_[659767798538]" + }, + { + "op": "replace", + "path": "/ContainerEntity/Components/Component_[12821987693261496174]/Transform Data/Translate/0", + "value": -264.5232849121094 + }, + { + "op": "replace", + "path": "/ContainerEntity/Components/Component_[12821987693261496174]/Transform Data/Translate/1", + "value": 10.4295654296875 + }, + { + "op": "replace", + "path": "/ContainerEntity/Components/Component_[12821987693261496174]/Transform Data/Translate/2", + "value": 1.0 + } + ] + }, + "Instance_[2543424205001]": { + "Source": "Prefabs/TestData/Graphics/CubePalladiumPolishedPBR.prefab", + "Patches": [ + { + "op": "replace", + "path": "/ContainerEntity/Components/Component_[16012620721047170064]/Parent Entity", + "value": "../Entity_[659767798538]" + }, + { + "op": "replace", + "path": "/ContainerEntity/Components/Component_[16012620721047170064]/Transform Data/Translate/0", + "value": -264.5232849121094 + }, + { + "op": "replace", + "path": "/ContainerEntity/Components/Component_[16012620721047170064]/Transform Data/Translate/1", + "value": 12.071407318115234 + }, + { + "op": "replace", + "path": "/ContainerEntity/Components/Component_[16012620721047170064]/Transform Data/Translate/2", + "value": 1.0 + } + ] + }, + "Instance_[2809712177353]": { + "Source": "Prefabs/TestData/Graphics/CubePlatinumPolishedPBR.prefab", + "Patches": [ + { + "op": "replace", + "path": "/ContainerEntity/Components/Component_[1499102502234135899]/Parent Entity", + "value": "../Entity_[659767798538]" + }, + { + "op": "replace", + "path": "/ContainerEntity/Components/Component_[1499102502234135899]/Transform Data/Translate/0", + "value": -264.5232849121094 + }, + { + "op": "replace", + "path": "/ContainerEntity/Components/Component_[1499102502234135899]/Transform Data/Translate/1", + "value": 13.582500457763672 + }, + { + "op": "replace", + "path": "/ContainerEntity/Components/Component_[1499102502234135899]/Transform Data/Translate/2", + "value": 1.0 + } + ] + }, + "Instance_[3093180018889]": { + "Source": "Prefabs/TestData/Graphics/CubeSilverPolishedPBR.prefab", + "Patches": [ + { + "op": "replace", + "path": "/ContainerEntity/Components/Component_[18049054501916401618]/Parent Entity", + "value": "../Entity_[659767798538]" + }, + { + "op": "replace", + "path": "/ContainerEntity/Components/Component_[18049054501916401618]/Transform Data/Translate/0", + "value": -264.5232849121094 + }, + { + "op": "replace", + "path": "/ContainerEntity/Components/Component_[18049054501916401618]/Transform Data/Translate/1", + "value": 15.026111602783203 + }, + { + "op": "replace", + "path": "/ContainerEntity/Components/Component_[18049054501916401618]/Transform Data/Translate/2", + "value": 1.0 + } + ] + }, + "Instance_[3398122696905]": { + "Source": "Prefabs/TestData/Graphics/CubeTitaniumPolishedPBR.prefab", + "Patches": [ + { + "op": "replace", + "path": "/ContainerEntity/Components/Component_[14924371629431224666]/Parent Entity", + "value": "../Entity_[659767798538]" + }, + { + "op": "replace", + "path": "/ContainerEntity/Components/Component_[14924371629431224666]/Transform Data/Translate/0", + "value": -264.5232849121094 + }, + { + "op": "replace", + "path": "/ContainerEntity/Components/Component_[14924371629431224666]/Transform Data/Translate/1", + "value": 16.513294219970703 + }, + { + "op": "replace", + "path": "/ContainerEntity/Components/Component_[14924371629431224666]/Transform Data/Translate/2", + "value": 1.0 + } + ] + }, + "Instance_[919926567113]": { + "Source": "Prefabs/TestData/Graphics/CubeMercuryPBR.prefab", + "Patches": [ + { + "op": "replace", + "path": "/ContainerEntity/Components/Component_[2268958959705742396]/Parent Entity", + "value": "../Entity_[659767798538]" + }, + { + "op": "replace", + "path": "/ContainerEntity/Components/Component_[2268958959705742396]/Transform Data/Translate/0", + "value": -270.14752197265625 + }, + { + "op": "replace", + "path": "/ContainerEntity/Components/Component_[2268958959705742396]/Transform Data/Translate/1", + "value": 10.24942398071289 + }, + { + "op": "replace", + "path": "/ContainerEntity/Components/Component_[2268958959705742396]/Transform Data/Translate/2", + "value": 1.0 + } + ] + } + } +} \ No newline at end of file diff --git a/AutomatedTesting/Levels/Performance/10kVegInstancesTest/tags.txt b/AutomatedTesting/Levels/Performance/10kVegInstancesTest/tags.txt new file mode 100644 index 0000000000..0d6c1880e7 --- /dev/null +++ b/AutomatedTesting/Levels/Performance/10kVegInstancesTest/tags.txt @@ -0,0 +1,12 @@ +0,0,0,0,0,0 +0,0,0,0,0,0 +0,0,0,0,0,0 +0,0,0,0,0,0 +0,0,0,0,0,0 +0,0,0,0,0,0 +0,0,0,0,0,0 +0,0,0,0,0,0 +0,0,0,0,0,0 +0,0,0,0,0,0 +0,0,0,0,0,0 +0,0,0,0,0,0 diff --git a/AutomatedTesting/Levels/Physics/ForceRegion_ImpulsesPxMeshShapedRigidBody/PhysXSedan/_dev_sedan_r0-b.fbx.assetinfo b/AutomatedTesting/Levels/Physics/ForceRegion_ImpulsesPxMeshShapedRigidBody/PhysXSedan/_dev_Sedan_r0-b.fbx.assetinfo similarity index 100% rename from AutomatedTesting/Levels/Physics/ForceRegion_ImpulsesPxMeshShapedRigidBody/PhysXSedan/_dev_sedan_r0-b.fbx.assetinfo rename to AutomatedTesting/Levels/Physics/ForceRegion_ImpulsesPxMeshShapedRigidBody/PhysXSedan/_dev_Sedan_r0-b.fbx.assetinfo diff --git a/AutomatedTesting/Levels/Physics/ForceRegion_PxMeshShapedForce/PhysXSedan/_dev_sedan_r0-b.fbx.assetinfo b/AutomatedTesting/Levels/Physics/ForceRegion_PxMeshShapedForce/PhysXSedan/_dev_Sedan_r0-b.fbx.assetinfo similarity index 100% rename from AutomatedTesting/Levels/Physics/ForceRegion_PxMeshShapedForce/PhysXSedan/_dev_sedan_r0-b.fbx.assetinfo rename to AutomatedTesting/Levels/Physics/ForceRegion_PxMeshShapedForce/PhysXSedan/_dev_Sedan_r0-b.fbx.assetinfo diff --git a/AutomatedTesting/Levels/Physics/Material_DefaultMaterialLibraryChangesWork/rin_skeleton_newgeo - copy.fbx.assetinfo b/AutomatedTesting/Levels/Physics/Material_DefaultMaterialLibraryChangesWork/rin_skeleton_newgeo - Copy.fbx.assetinfo similarity index 100% rename from AutomatedTesting/Levels/Physics/Material_DefaultMaterialLibraryChangesWork/rin_skeleton_newgeo - copy.fbx.assetinfo rename to AutomatedTesting/Levels/Physics/Material_DefaultMaterialLibraryChangesWork/rin_skeleton_newgeo - Copy.fbx.assetinfo diff --git a/AutomatedTesting/Levels/Physics/Physics_WorldBodyBusWorksOnEditorComponents/PhysXSedan/_dev_sedan_r0-b.fbx.assetinfo b/AutomatedTesting/Levels/Physics/Physics_WorldBodyBusWorksOnEditorComponents/PhysXSedan/_dev_Sedan_r0-b.fbx.assetinfo similarity index 100% rename from AutomatedTesting/Levels/Physics/Physics_WorldBodyBusWorksOnEditorComponents/PhysXSedan/_dev_sedan_r0-b.fbx.assetinfo rename to AutomatedTesting/Levels/Physics/Physics_WorldBodyBusWorksOnEditorComponents/PhysXSedan/_dev_Sedan_r0-b.fbx.assetinfo diff --git a/AutomatedTesting/Levels/Physics/RigidBody_COM_ComputingWorks/PhysXSedan/_dev_sedan_r0-b.fbx.assetinfo b/AutomatedTesting/Levels/Physics/RigidBody_COM_ComputingWorks/PhysXSedan/_dev_Sedan_r0-b.fbx.assetinfo similarity index 100% rename from AutomatedTesting/Levels/Physics/RigidBody_COM_ComputingWorks/PhysXSedan/_dev_sedan_r0-b.fbx.assetinfo rename to AutomatedTesting/Levels/Physics/RigidBody_COM_ComputingWorks/PhysXSedan/_dev_Sedan_r0-b.fbx.assetinfo diff --git a/AutomatedTesting/Levels/Physics/ScriptCanvas_CollisionEvents/ScriptCanvas_CollisionEvents.ly b/AutomatedTesting/Levels/Physics/ScriptCanvas_CollisionEvents/ScriptCanvas_CollisionEvents.ly index 8fcf2dcde2..846ba9101c 100644 --- a/AutomatedTesting/Levels/Physics/ScriptCanvas_CollisionEvents/ScriptCanvas_CollisionEvents.ly +++ b/AutomatedTesting/Levels/Physics/ScriptCanvas_CollisionEvents/ScriptCanvas_CollisionEvents.ly @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:d674eac2070ed0028ceff1e84692c9cf1f69db2192c2295b6d714670ccd50308 -size 8936 +oid sha256:82a4ffbffeee43ea4ae293080e838bbc501fe9c7c20febc2e56e745451c95df3 +size 9221 diff --git a/AutomatedTesting/Levels/Physics/ScriptCanvas_PostUpdateEvent/ScriptCanvas_PostUpdateEvent.ly b/AutomatedTesting/Levels/Physics/ScriptCanvas_PostUpdateEvent/ScriptCanvas_PostUpdateEvent.ly index 35c3674159..9328e90996 100644 --- a/AutomatedTesting/Levels/Physics/ScriptCanvas_PostUpdateEvent/ScriptCanvas_PostUpdateEvent.ly +++ b/AutomatedTesting/Levels/Physics/ScriptCanvas_PostUpdateEvent/ScriptCanvas_PostUpdateEvent.ly @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:8a2c9ad554554eba1021abe0baf0b3455da1aaab2bb8331eb240f79c89031636 -size 5202 +oid sha256:3ef03f338cd867860068b5bd343f66fa9bda4f3de1662badf552f05716da35ed +size 5161 diff --git a/AutomatedTesting/Levels/Physics/ScriptCanvas_PreUpdateEvent/ScriptCanvas_PreUpdateEvent.ly b/AutomatedTesting/Levels/Physics/ScriptCanvas_PreUpdateEvent/ScriptCanvas_PreUpdateEvent.ly index 60cec8af58..c981e27142 100644 --- a/AutomatedTesting/Levels/Physics/ScriptCanvas_PreUpdateEvent/ScriptCanvas_PreUpdateEvent.ly +++ b/AutomatedTesting/Levels/Physics/ScriptCanvas_PreUpdateEvent/ScriptCanvas_PreUpdateEvent.ly @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:982f085cfb17ce957cd1534e89a6fb5c76bcbe6936caec214ecd422b0a5dbe7b -size 5214 +oid sha256:bf48b69c0cc2599581bd3d931d8adc6faba5d78d950c2c0946c19ec7ba7b6215 +size 5190 diff --git a/AutomatedTesting/Levels/Physics/ScriptCanvas_ShapeCast/ScriptCanvas_ShapeCast.ly b/AutomatedTesting/Levels/Physics/ScriptCanvas_ShapeCast/ScriptCanvas_ShapeCast.ly index 2f7291cb27..485556bb56 100644 --- a/AutomatedTesting/Levels/Physics/ScriptCanvas_ShapeCast/ScriptCanvas_ShapeCast.ly +++ b/AutomatedTesting/Levels/Physics/ScriptCanvas_ShapeCast/ScriptCanvas_ShapeCast.ly @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:3361ba7aa2faa53421d8a92ed0bb2e1747e766d93c0315484a3c85b74a6494c3 -size 8820 +oid sha256:be53bb087c53874577dad8f1fa084698c27fbad827f0ed7dc50927fb4c9d8884 +size 7748 diff --git a/AutomatedTesting/Levels/TestDependenciesLevel/LevelData/Environment.xml b/AutomatedTesting/Levels/TestDependenciesLevel/LevelData/Environment.xml deleted file mode 100644 index 4ba36f66ae..0000000000 --- a/AutomatedTesting/Levels/TestDependenciesLevel/LevelData/Environment.xml +++ /dev/null @@ -1,14 +0,0 @@ - - - - - - - - - - - - - - diff --git a/AutomatedTesting/Levels/TestDependenciesLevel/LevelData/TerrainTexture.xml b/AutomatedTesting/Levels/TestDependenciesLevel/LevelData/TerrainTexture.xml deleted file mode 100644 index f43df05b22..0000000000 --- a/AutomatedTesting/Levels/TestDependenciesLevel/LevelData/TerrainTexture.xml +++ /dev/null @@ -1,7 +0,0 @@ - - - - - - - diff --git a/AutomatedTesting/Levels/TestDependenciesLevel/LevelData/TimeOfDay.xml b/AutomatedTesting/Levels/TestDependenciesLevel/LevelData/TimeOfDay.xml deleted file mode 100644 index c5b404318e..0000000000 --- a/AutomatedTesting/Levels/TestDependenciesLevel/LevelData/TimeOfDay.xml +++ /dev/null @@ -1,356 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/AutomatedTesting/Levels/TestDependenciesLevel/LevelData/VegetationMap.dat b/AutomatedTesting/Levels/TestDependenciesLevel/LevelData/VegetationMap.dat deleted file mode 100644 index dce5631cd0..0000000000 --- a/AutomatedTesting/Levels/TestDependenciesLevel/LevelData/VegetationMap.dat +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:0e6a5435c928079b27796f6b202bbc2623e7e454244ddc099a3cadf33b7cb9e9 -size 63 diff --git a/AutomatedTesting/Levels/TestDependenciesLevel/TerrainTexture.pak b/AutomatedTesting/Levels/TestDependenciesLevel/TerrainTexture.pak deleted file mode 100644 index fe3604a050..0000000000 --- a/AutomatedTesting/Levels/TestDependenciesLevel/TerrainTexture.pak +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:8739c76e681f900923b900c9df0ef75cf421d39cabb54650c4b9ad19b6a76d85 -size 22 diff --git a/AutomatedTesting/Levels/TestDependenciesLevel/TestDependenciesLevel.ly b/AutomatedTesting/Levels/TestDependenciesLevel/TestDependenciesLevel.ly deleted file mode 100644 index 95cc91cd6b..0000000000 --- a/AutomatedTesting/Levels/TestDependenciesLevel/TestDependenciesLevel.ly +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:825828fe7c183e765315f933a8b1eb25283739d34d62cb84c34e2dcb56591d6e -size 12415 diff --git a/AutomatedTesting/Levels/TestDependenciesLevel/TestDependenciesLevel.prefab b/AutomatedTesting/Levels/TestDependenciesLevel/TestDependenciesLevel.prefab new file mode 100644 index 0000000000..cf30cb178c --- /dev/null +++ b/AutomatedTesting/Levels/TestDependenciesLevel/TestDependenciesLevel.prefab @@ -0,0 +1,555 @@ +{ + "ContainerEntity": { + "Id": "Entity_[1146574390643]", + "Name": "Level", + "Components": { + "Component_[10641544592923449938]": { + "$type": "EditorInspectorComponent", + "Id": 10641544592923449938 + }, + "Component_[12039882709170782873]": { + "$type": "EditorOnlyEntityComponent", + "Id": 12039882709170782873 + }, + "Component_[12265484671603697631]": { + "$type": "EditorPendingCompositionComponent", + "Id": 12265484671603697631 + }, + "Component_[14126657869720434043]": { + "$type": "EditorEntitySortComponent", + "Id": 14126657869720434043, + "Child Entity Order": [ + "Entity_[1176639161715]" + ] + }, + "Component_[15230859088967841193]": { + "$type": "{27F1E1A1-8D9D-4C3B-BD3A-AFB9762449C0} TransformComponent", + "Id": 15230859088967841193, + "Parent Entity": "" + }, + "Component_[16239496886950819870]": { + "$type": "EditorDisabledCompositionComponent", + "Id": 16239496886950819870 + }, + "Component_[5688118765544765547]": { + "$type": "EditorEntityIconComponent", + "Id": 5688118765544765547 + }, + "Component_[6545738857812235305]": { + "$type": "SelectionComponent", + "Id": 6545738857812235305 + }, + "Component_[7247035804068349658]": { + "$type": "EditorPrefabComponent", + "Id": 7247035804068349658 + }, + "Component_[9307224322037797205]": { + "$type": "EditorLockComponent", + "Id": 9307224322037797205 + }, + "Component_[9562516168917670048]": { + "$type": "EditorVisibilityComponent", + "Id": 9562516168917670048 + } + } + }, + "Entities": { + "Entity_[1155164325235]": { + "Id": "Entity_[1155164325235]", + "Name": "Sun", + "Components": { + "Component_[10440557478882592717]": { + "$type": "SelectionComponent", + "Id": 10440557478882592717 + }, + "Component_[13620450453324765907]": { + "$type": "EditorLockComponent", + "Id": 13620450453324765907 + }, + "Component_[2134313378593666258]": { + "$type": "EditorInspectorComponent", + "Id": 2134313378593666258 + }, + "Component_[234010807770404186]": { + "$type": "EditorVisibilityComponent", + "Id": 234010807770404186 + }, + "Component_[2970359110423865725]": { + "$type": "EditorEntityIconComponent", + "Id": 2970359110423865725 + }, + "Component_[3722854130373041803]": { + "$type": "EditorOnlyEntityComponent", + "Id": 3722854130373041803 + }, + "Component_[5992533738676323195]": { + "$type": "EditorDisabledCompositionComponent", + "Id": 5992533738676323195 + }, + "Component_[7378860763541895402]": { + "$type": "AZ::Render::EditorDirectionalLightComponent", + "Id": 7378860763541895402, + "Controller": { + "Configuration": { + "Intensity": 1.0, + "CameraEntityId": "", + "ShadowFilterMethod": 1 + } + } + }, + "Component_[7892834440890947578]": { + "$type": "{27F1E1A1-8D9D-4C3B-BD3A-AFB9762449C0} TransformComponent", + "Id": 7892834440890947578, + "Parent Entity": "Entity_[1176639161715]", + "Transform Data": { + "Translate": [ + 0.0, + 0.0, + 13.487043380737305 + ], + "Rotate": [ + -76.13099670410156, + -0.847000002861023, + -15.8100004196167 + ] + } + }, + "Component_[8599729549570828259]": { + "$type": "EditorEntitySortComponent", + "Id": 8599729549570828259 + }, + "Component_[952797371922080273]": { + "$type": "EditorPendingCompositionComponent", + "Id": 952797371922080273 + } + } + }, + "Entity_[1159459292531]": { + "Id": "Entity_[1159459292531]", + "Name": "Ground", + "Components": { + "Component_[11701138785793981042]": { + "$type": "SelectionComponent", + "Id": 11701138785793981042 + }, + "Component_[12260880513256986252]": { + "$type": "EditorEntityIconComponent", + "Id": 12260880513256986252 + }, + "Component_[13711420870643673468]": { + "$type": "EditorDisabledCompositionComponent", + "Id": 13711420870643673468 + }, + "Component_[138002849734991713]": { + "$type": "EditorOnlyEntityComponent", + "Id": 138002849734991713 + }, + "Component_[16578565737331764849]": { + "$type": "{27F1E1A1-8D9D-4C3B-BD3A-AFB9762449C0} TransformComponent", + "Id": 16578565737331764849, + "Parent Entity": "Entity_[1176639161715]" + }, + "Component_[16919232076966545697]": { + "$type": "EditorInspectorComponent", + "Id": 16919232076966545697 + }, + "Component_[5182430712893438093]": { + "$type": "EditorMaterialComponent", + "Id": 5182430712893438093 + }, + "Component_[5675108321710651991]": { + "$type": "AZ::Render::EditorMeshComponent", + "Id": 5675108321710651991, + "Controller": { + "Configuration": { + "ModelAsset": { + "assetId": { + "guid": "{0CD745C0-6AA8-569A-A68A-73A3270986C4}", + "subId": 277889906 + }, + "assetHint": "objects/groudplane/groundplane_512x512m.azmodel" + } + } + } + }, + "Component_[5681893399601237518]": { + "$type": "EditorEntitySortComponent", + "Id": 5681893399601237518 + }, + "Component_[592692962543397545]": { + "$type": "EditorPendingCompositionComponent", + "Id": 592692962543397545 + }, + "Component_[7090012899106946164]": { + "$type": "EditorLockComponent", + "Id": 7090012899106946164 + }, + "Component_[9410832619875640998]": { + "$type": "EditorVisibilityComponent", + "Id": 9410832619875640998 + } + } + }, + "Entity_[1163754259827]": { + "Id": "Entity_[1163754259827]", + "Name": "Camera", + "Components": { + "Component_[11895140916889160460]": { + "$type": "EditorEntityIconComponent", + "Id": 11895140916889160460 + }, + "Component_[16880285896855930892]": { + "$type": "{CA11DA46-29FF-4083-B5F6-E02C3A8C3A3D} EditorCameraComponent", + "Id": 16880285896855930892, + "Controller": { + "Configuration": { + "Field of View": 55.0, + "EditorEntityId": 3342481886060234850 + } + } + }, + "Component_[17187464423780271193]": { + "$type": "EditorLockComponent", + "Id": 17187464423780271193 + }, + "Component_[17495696818315413311]": { + "$type": "EditorEntitySortComponent", + "Id": 17495696818315413311 + }, + "Component_[18086214374043522055]": { + "$type": "{27F1E1A1-8D9D-4C3B-BD3A-AFB9762449C0} TransformComponent", + "Id": 18086214374043522055, + "Parent Entity": "Entity_[1176639161715]", + "Transform Data": { + "Translate": [ + -2.3000001907348633, + -3.9368600845336914, + 1.0 + ], + "Rotate": [ + -2.050307512283325, + 1.9552897214889526, + -43.623355865478516 + ] + } + }, + "Component_[18387556550380114975]": { + "$type": "SelectionComponent", + "Id": 18387556550380114975 + }, + "Component_[2654521436129313160]": { + "$type": "EditorVisibilityComponent", + "Id": 2654521436129313160 + }, + "Component_[5265045084611556958]": { + "$type": "EditorDisabledCompositionComponent", + "Id": 5265045084611556958 + }, + "Component_[7169798125182238623]": { + "$type": "EditorPendingCompositionComponent", + "Id": 7169798125182238623 + }, + "Component_[7255796294953281766]": { + "$type": "GenericComponentWrapper", + "Id": 7255796294953281766, + "m_template": { + "$type": "FlyCameraInputComponent" + } + }, + "Component_[8866210352157164042]": { + "$type": "EditorInspectorComponent", + "Id": 8866210352157164042 + }, + "Component_[9129253381063760879]": { + "$type": "EditorOnlyEntityComponent", + "Id": 9129253381063760879 + } + } + }, + "Entity_[1168049227123]": { + "Id": "Entity_[1168049227123]", + "Name": "Grid", + "Components": { + "Component_[11443347433215807130]": { + "$type": "EditorEntityIconComponent", + "Id": 11443347433215807130 + }, + "Component_[11779275529534764488]": { + "$type": "SelectionComponent", + "Id": 11779275529534764488 + }, + "Component_[14249419413039427459]": { + "$type": "EditorInspectorComponent", + "Id": 14249419413039427459 + }, + "Component_[15448581635946161318]": { + "$type": "AZ::Render::EditorGridComponent", + "Id": 15448581635946161318, + "Controller": { + "Configuration": { + "primarySpacing": 4.0, + "primaryColor": [ + 0.501960813999176, + 0.501960813999176, + 0.501960813999176 + ], + "secondarySpacing": 0.5, + "secondaryColor": [ + 0.250980406999588, + 0.250980406999588, + 0.250980406999588 + ] + } + } + }, + "Component_[1843303322527297409]": { + "$type": "EditorDisabledCompositionComponent", + "Id": 1843303322527297409 + }, + "Component_[380249072065273654]": { + "$type": "{27F1E1A1-8D9D-4C3B-BD3A-AFB9762449C0} TransformComponent", + "Id": 380249072065273654, + "Parent Entity": "Entity_[1176639161715]" + }, + "Component_[7476660583684339787]": { + "$type": "EditorPendingCompositionComponent", + "Id": 7476660583684339787 + }, + "Component_[7557626501215118375]": { + "$type": "EditorEntitySortComponent", + "Id": 7557626501215118375 + }, + "Component_[7984048488947365511]": { + "$type": "EditorVisibilityComponent", + "Id": 7984048488947365511 + }, + "Component_[8118181039276487398]": { + "$type": "EditorOnlyEntityComponent", + "Id": 8118181039276487398 + }, + "Component_[9189909764215270515]": { + "$type": "EditorLockComponent", + "Id": 9189909764215270515 + } + } + }, + "Entity_[1172344194419]": { + "Id": "Entity_[1172344194419]", + "Name": "Shader Ball", + "Components": { + "Component_[10789351944715265527]": { + "$type": "EditorOnlyEntityComponent", + "Id": 10789351944715265527 + }, + "Component_[12037033284781049225]": { + "$type": "EditorEntitySortComponent", + "Id": 12037033284781049225 + }, + "Component_[13759153306105970079]": { + "$type": "EditorPendingCompositionComponent", + "Id": 13759153306105970079 + }, + "Component_[14135560884830586279]": { + "$type": "EditorInspectorComponent", + "Id": 14135560884830586279 + }, + "Component_[16247165675903986673]": { + "$type": "EditorVisibilityComponent", + "Id": 16247165675903986673 + }, + "Component_[18082433625958885247]": { + "$type": "EditorDisabledCompositionComponent", + "Id": 18082433625958885247 + }, + "Component_[6472623349872972660]": { + "$type": "{27F1E1A1-8D9D-4C3B-BD3A-AFB9762449C0} TransformComponent", + "Id": 6472623349872972660, + "Parent Entity": "Entity_[1176639161715]", + "Transform Data": { + "Rotate": [ + 0.0, + 0.10000000149011612, + 180.0 + ] + } + }, + "Component_[6495255223970673916]": { + "$type": "AZ::Render::EditorMeshComponent", + "Id": 6495255223970673916, + "Controller": { + "Configuration": { + "ModelAsset": { + "assetId": { + "guid": "{FD340C30-755C-5911-92A3-19A3F7A77931}", + "subId": 281415304 + }, + "assetHint": "objects/shaderball/shaderball_default_1m.azmodel" + } + } + } + }, + "Component_[8056625192494070973]": { + "$type": "SelectionComponent", + "Id": 8056625192494070973 + }, + "Component_[8550141614185782969]": { + "$type": "EditorEntityIconComponent", + "Id": 8550141614185782969 + }, + "Component_[9439770997198325425]": { + "$type": "EditorLockComponent", + "Id": 9439770997198325425 + } + } + }, + "Entity_[1176639161715]": { + "Id": "Entity_[1176639161715]", + "Name": "Atom Default Environment", + "Components": { + "Component_[10757302973393310045]": { + "$type": "{27F1E1A1-8D9D-4C3B-BD3A-AFB9762449C0} TransformComponent", + "Id": 10757302973393310045, + "Parent Entity": "Entity_[1146574390643]" + }, + "Component_[14505817420424255464]": { + "$type": "EditorInspectorComponent", + "Id": 14505817420424255464, + "ComponentOrderEntryArray": [ + { + "ComponentId": 10757302973393310045 + } + ] + }, + "Component_[14988041764659020032]": { + "$type": "EditorLockComponent", + "Id": 14988041764659020032 + }, + "Component_[15808690248755038124]": { + "$type": "SelectionComponent", + "Id": 15808690248755038124 + }, + "Component_[15900837685796817138]": { + "$type": "EditorVisibilityComponent", + "Id": 15900837685796817138 + }, + "Component_[3298767348226484884]": { + "$type": "EditorOnlyEntityComponent", + "Id": 3298767348226484884 + }, + "Component_[4076975109609220594]": { + "$type": "EditorPendingCompositionComponent", + "Id": 4076975109609220594 + }, + "Component_[5679760548946028854]": { + "$type": "EditorDisabledCompositionComponent", + "Id": 5679760548946028854 + }, + "Component_[5855590796136709437]": { + "$type": "EditorEntitySortComponent", + "Id": 5855590796136709437, + "Child Entity Order": [ + "Entity_[1155164325235]", + "Entity_[1180934129011]", + "Entity_[1172344194419]", + "Entity_[1168049227123]", + "Entity_[1163754259827]", + "Entity_[1159459292531]" + ] + }, + "Component_[9277695270015777859]": { + "$type": "EditorEntityIconComponent", + "Id": 9277695270015777859 + } + } + }, + "Entity_[1180934129011]": { + "Id": "Entity_[1180934129011]", + "Name": "Global Sky", + "Components": { + "Component_[11231930600558681245]": { + "$type": "AZ::Render::EditorHDRiSkyboxComponent", + "Id": 11231930600558681245, + "Controller": { + "Configuration": { + "CubemapAsset": { + "assetId": { + "guid": "{215E47FD-D181-5832-B1AB-91673ABF6399}", + "subId": 1000 + }, + "assetHint": "lightingpresets/highcontrast/goegap_4k_skyboxcm.exr.streamingimage" + } + } + } + }, + "Component_[11980494120202836095]": { + "$type": "SelectionComponent", + "Id": 11980494120202836095 + }, + "Component_[1428633914413949476]": { + "$type": "EditorLockComponent", + "Id": 1428633914413949476 + }, + "Component_[14936200426671614999]": { + "$type": "AZ::Render::EditorImageBasedLightComponent", + "Id": 14936200426671614999, + "Controller": { + "Configuration": { + "diffuseImageAsset": { + "assetId": { + "guid": "{3FD09945-D0F2-55C8-B9AF-B2FD421FE3BE}", + "subId": 3000 + }, + "assetHint": "lightingpresets/highcontrast/goegap_4k_iblglobalcm_ibldiffuse.exr.streamingimage" + }, + "specularImageAsset": { + "assetId": { + "guid": "{3FD09945-D0F2-55C8-B9AF-B2FD421FE3BE}", + "subId": 2000 + }, + "assetHint": "lightingpresets/highcontrast/goegap_4k_iblglobalcm_iblspecular.exr.streamingimage" + } + } + } + }, + "Component_[14994774102579326069]": { + "$type": "EditorDisabledCompositionComponent", + "Id": 14994774102579326069 + }, + "Component_[15417479889044493340]": { + "$type": "EditorPendingCompositionComponent", + "Id": 15417479889044493340 + }, + "Component_[15826613364991382688]": { + "$type": "EditorEntitySortComponent", + "Id": 15826613364991382688 + }, + "Component_[1665003113283562343]": { + "$type": "EditorOnlyEntityComponent", + "Id": 1665003113283562343 + }, + "Component_[3704934735944502280]": { + "$type": "EditorEntityIconComponent", + "Id": 3704934735944502280 + }, + "Component_[5698542331457326479]": { + "$type": "EditorVisibilityComponent", + "Id": 5698542331457326479 + }, + "Component_[6644513399057217122]": { + "$type": "{27F1E1A1-8D9D-4C3B-BD3A-AFB9762449C0} TransformComponent", + "Id": 6644513399057217122, + "Parent Entity": "Entity_[1176639161715]" + }, + "Component_[931091830724002070]": { + "$type": "EditorInspectorComponent", + "Id": 931091830724002070 + } + } + } + }, + "Instances": { + "Instance_[425258647110]": { + "Source": "assets/simple_pot_fbx.procprefab" + } + } +} \ No newline at end of file diff --git a/AutomatedTesting/Levels/TestDependenciesLevel/filelist.xml b/AutomatedTesting/Levels/TestDependenciesLevel/filelist.xml deleted file mode 100644 index b5164a4aee..0000000000 --- a/AutomatedTesting/Levels/TestDependenciesLevel/filelist.xml +++ /dev/null @@ -1,6 +0,0 @@ - - - - - - diff --git a/AutomatedTesting/Levels/TestDependenciesLevel/level.pak b/AutomatedTesting/Levels/TestDependenciesLevel/level.pak deleted file mode 100644 index dfba7fb4e3..0000000000 --- a/AutomatedTesting/Levels/TestDependenciesLevel/level.pak +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:2611b691998640a0e802461f47b5b876f6832fbece62d34cc25da53e135e1c38 -size 44525 diff --git a/AutomatedTesting/Objects/ShaderBall_simple.fbx b/AutomatedTesting/Objects/ShaderBall_simple.fbx new file mode 100644 index 0000000000..50b7b8f44d --- /dev/null +++ b/AutomatedTesting/Objects/ShaderBall_simple.fbx @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:f5f7a86a693878c10f91783955cc72535bf7d7c495163087a4c1982f228d27f0 +size 2145248 diff --git a/AutomatedTesting/Objects/bunny.fbx b/AutomatedTesting/Objects/bunny.fbx new file mode 100644 index 0000000000..f0a16349f7 --- /dev/null +++ b/AutomatedTesting/Objects/bunny.fbx @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:ef71257b240a7e704731806f8cd4b966af5d3c60f22881f9c6a6320180ee71a4 +size 2496384 diff --git a/AutomatedTesting/Objects/cone.fbx b/AutomatedTesting/Objects/cone.fbx new file mode 100644 index 0000000000..081b8b119d --- /dev/null +++ b/AutomatedTesting/Objects/cone.fbx @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:531b6473b314259504ab595e4983838b5866035ef4d70cedaf4cc9c7d9e65c3a +size 24512 diff --git a/AutomatedTesting/Objects/cube.fbx b/AutomatedTesting/Objects/cube.fbx new file mode 100644 index 0000000000..616c7b4ff3 --- /dev/null +++ b/AutomatedTesting/Objects/cube.fbx @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:e32877eab35459499c73ff093df898f93bf3e7379de25eef6875d693be9bec81 +size 18015 diff --git a/AutomatedTesting/Objects/cylinder.fbx b/AutomatedTesting/Objects/cylinder.fbx new file mode 100644 index 0000000000..18ab200b4c --- /dev/null +++ b/AutomatedTesting/Objects/cylinder.fbx @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:2949a50eec079a7d43a1d92e056c580ef625ee39e00e91cc25318319e37dcd3b +size 115689 diff --git a/AutomatedTesting/Objects/plane.fbx b/AutomatedTesting/Objects/plane.fbx new file mode 100644 index 0000000000..b274bfa282 --- /dev/null +++ b/AutomatedTesting/Objects/plane.fbx @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:0a1f8d75dcd85e8b4aa57f6c0c81af0300ff96915ba3c2b591095c215d5e1d8c +size 12072 diff --git a/AutomatedTesting/Objects/sphere.fbx b/AutomatedTesting/Objects/sphere.fbx new file mode 100644 index 0000000000..5c8f550c8c --- /dev/null +++ b/AutomatedTesting/Objects/sphere.fbx @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:a476e99b55cf2a76fef6775c5a57dad29f8ffcb942c625bab04c89051a72a560 +size 62626 diff --git a/AutomatedTesting/Objects/sphere_5lods.fbx b/AutomatedTesting/Objects/sphere_5lods.fbx new file mode 100644 index 0000000000..965738c933 --- /dev/null +++ b/AutomatedTesting/Objects/sphere_5lods.fbx @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:7e169277bca473325281d5fe043cffc9196bd3ef46f6bffbea6e0b5e3b7194a1 +size 62700 diff --git a/AutomatedTesting/Objects/sphere_5lods.fbx.assetinfo b/AutomatedTesting/Objects/sphere_5lods.fbx.assetinfo new file mode 100644 index 0000000000..d46cbf322a --- /dev/null +++ b/AutomatedTesting/Objects/sphere_5lods.fbx.assetinfo @@ -0,0 +1,8 @@ +{ + "values": [ + { + "$type": "ScriptProcessorRule", + "scriptFilename": "Editor/Scripts/auto_lod.py" + } + ] +} diff --git a/AutomatedTesting/Objects/suzanne.fbx b/AutomatedTesting/Objects/suzanne.fbx new file mode 100644 index 0000000000..171a6d21e9 --- /dev/null +++ b/AutomatedTesting/Objects/suzanne.fbx @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:e3bcfac5de831c269dac58e7d73d1dc61eb8d9f6d8a241f5c029537b6bcdf166 +size 1088304 diff --git a/AutomatedTesting/Passes/MainPipeline.pass b/AutomatedTesting/Passes/MainPipeline.pass index aa9f3757c4..c34c556983 100644 --- a/AutomatedTesting/Passes/MainPipeline.pass +++ b/AutomatedTesting/Passes/MainPipeline.pass @@ -205,6 +205,99 @@ } ] }, + + { + // NOTE: HairParentPass does not write into Depth MSAA from Opaque Pass. If new passes downstream + // of HairParentPass will need to use Depth MSAA, HairParentPass will need to be updated to use Depth MSAA + // instead of regular Depth as DepthStencil. Specifically, HairResolvePPLL.pass and the associated + // .azsl file will need to be updated. + "Name": "HairParentPass", + // Note: The following two lines represent the choice of rendering pipeline for the hair. + // You can either choose to use PPLL or ShortCut and accordingly change the flag + // 'm_usePPLLRenderTechnique' in the class 'HairFeatureProcessor.cpp' +// "TemplateName": "HairParentPassTemplate", + "TemplateName": "HairParentShortCutPassTemplate", + "Enabled": true, + "Connections": [ + // Critical to keep DepthLinear as input - used to set the size of the Head PPLL image buffer. + // If DepthLinear is not available - connect to another viewport (non MSAA) image. + { + "LocalSlot": "DepthLinearInput", + "AttachmentRef": { + "Pass": "DepthPrePass", + "Attachment": "DepthLinear" + } + }, + { + "LocalSlot": "Depth", + "AttachmentRef": { + "Pass": "DepthPrePass", + "Attachment": "Depth" + } + }, + { + "LocalSlot": "RenderTargetInputOutput", + "AttachmentRef": { + "Pass": "OpaquePass", + "Attachment": "Output" + } + }, + { + "LocalSlot": "RenderTargetInputOnly", + "AttachmentRef": { + "Pass": "OpaquePass", + "Attachment": "Output" + } + }, + + // Shadows resources + { + "LocalSlot": "DirectionalShadowmap", + "AttachmentRef": { + "Pass": "ShadowPass", + "Attachment": "DirectionalShadowmap" + } + }, + { + "LocalSlot": "DirectionalESM", + "AttachmentRef": { + "Pass": "ShadowPass", + "Attachment": "DirectionalESM" + } + }, + { + "LocalSlot": "ProjectedShadowmap", + "AttachmentRef": { + "Pass": "ShadowPass", + "Attachment": "ProjectedShadowmap" + } + }, + { + "LocalSlot": "ProjectedESM", + "AttachmentRef": { + "Pass": "ShadowPass", + "Attachment": "ProjectedESM" + } + }, + + // Lighting Resources + { + "LocalSlot": "TileLightData", + "AttachmentRef": { + "Pass": "LightCullingPass", + "Attachment": "TileLightData" + } + }, + { + "LocalSlot": "LightListRemapped", + "AttachmentRef": { + "Pass": "LightCullingPass", + "Attachment": "LightListRemapped" + } + } + ] + }, + { "Name": "TransparentPass", "TemplateName": "TransparentParentTemplate", @@ -254,22 +347,22 @@ { "LocalSlot": "InputLinearDepth", "AttachmentRef": { - "Pass": "DepthPrePass", + "Pass": "HairParentPass", "Attachment": "DepthLinear" } }, { "LocalSlot": "DepthStencil", "AttachmentRef": { - "Pass": "DepthPrePass", + "Pass": "HairParentPass", "Attachment": "Depth" } }, { "LocalSlot": "InputOutput", "AttachmentRef": { - "Pass": "OpaquePass", - "Attachment": "Output" + "Pass": "HairParentPass", + "Attachment": "RenderTargetInputOutput" } } ] @@ -282,22 +375,22 @@ { "LocalSlot": "InputLinearDepth", "AttachmentRef": { - "Pass": "DepthPrePass", + "Pass": "HairParentPass", "Attachment": "DepthLinear" } }, { "LocalSlot": "InputDepthStencil", "AttachmentRef": { - "Pass": "DepthPrePass", + "Pass": "HairParentPass", "Attachment": "Depth" } }, { "LocalSlot": "RenderTargetInputOutput", "AttachmentRef": { - "Pass": "TransparentPass", - "Attachment": "InputOutput" + "Pass": "HairParentPass", + "Attachment": "RenderTargetInputOutput" } } ], @@ -337,7 +430,7 @@ { "LocalSlot": "Depth", "AttachmentRef": { - "Pass": "DepthPrePass", + "Pass": "HairParentPass", "Attachment": "Depth" } }, @@ -372,7 +465,7 @@ { "LocalSlot": "DepthInputOutput", "AttachmentRef": { - "Pass": "DepthPrePass", + "Pass": "HairParentPass", "Attachment": "Depth" } } @@ -431,7 +524,7 @@ { "LocalSlot": "DepthInputOutput", "AttachmentRef": { - "Pass": "DepthPrePass", + "Pass": "HairParentPass", "Attachment": "Depth" } } @@ -451,7 +544,7 @@ { "LocalSlot": "DepthInputOutput", "AttachmentRef": { - "Pass": "DepthPrePass", + "Pass": "HairParentPass", "Attachment": "Depth" } } diff --git a/AutomatedTesting/Prefabs/TestData/Graphics/AtomCubeWall.prefab b/AutomatedTesting/Prefabs/TestData/Graphics/AtomCubeWall.prefab new file mode 100644 index 0000000000..eda62c6f52 --- /dev/null +++ b/AutomatedTesting/Prefabs/TestData/Graphics/AtomCubeWall.prefab @@ -0,0 +1,102345 @@ +{ + "ContainerEntity": { + "Id": "ContainerEntity", + "Name": "AtomCubeWall", + "Components": { + "Component_[1378762968271397696]": { + "$type": "EditorPrefabComponent", + "Id": 1378762968271397696 + }, + "Component_[15861901244881316506]": { + "$type": "EditorDisabledCompositionComponent", + "Id": 15861901244881316506 + }, + "Component_[1667542861598358689]": { + "$type": "EditorVisibilityComponent", + "Id": 1667542861598358689 + }, + "Component_[2970248835877935836]": { + "$type": "EditorPendingCompositionComponent", + "Id": 2970248835877935836 + }, + "Component_[3475481110579263685]": { + "$type": "EditorEntityIconComponent", + "Id": 3475481110579263685 + }, + "Component_[4960733274366718926]": { + "$type": "EditorOnlyEntityComponent", + "Id": 4960733274366718926 + }, + "Component_[5052757994340238524]": { + "$type": "{27F1E1A1-8D9D-4C3B-BD3A-AFB9762449C0} TransformComponent", + "Id": 5052757994340238524, + "Parent Entity": "" + }, + "Component_[5847627832229774671]": { + "$type": "SelectionComponent", + "Id": 5847627832229774671 + }, + "Component_[686142448804056059]": { + "$type": "EditorInspectorComponent", + "Id": 686142448804056059 + }, + "Component_[8743584510936460932]": { + "$type": "EditorLockComponent", + "Id": 8743584510936460932 + }, + "Component_[9497718940671573904]": { + "$type": "EditorEntitySortComponent", + "Id": 9497718940671573904, + "Child Entity Order": [ + "Entity_[728313751508]", + "Entity_[3017531320276]", + "Entity_[2149947926484]", + "Entity_[3236574652372]", + "Entity_[2618099361748]", + "Entity_[1922314659796]", + "Entity_[2493545310164]", + "Entity_[887227541460]", + "Entity_[1458458191828]", + "Entity_[1638846818260]", + "Entity_[479205648340]", + "Entity_[2850027595732]", + "Entity_[947357083604]", + "Entity_[3640301578196]", + "Entity_[3094840731604]", + "Entity_[483500615636]", + "Entity_[4327496345556]", + "Entity_[2880092366804]", + "Entity_[487795582932]", + "Entity_[3348243802068]", + "Entity_[3983898961876]", + "Entity_[3429848180692]", + "Entity_[1497112897492]", + "Entity_[2295976814548]", + "Entity_[504975452116]", + "Entity_[2351811389396]", + "Entity_[3507157592020]", + "Entity_[646709372884]", + "Entity_[577989896148]", + "Entity_[2545084917716]", + "Entity_[2609509427156]", + "Entity_[3919474452436]", + "Entity_[3305294129108]", + "Entity_[3030416222164]", + "Entity_[1973854267348]", + "Entity_[4275956738004]", + "Entity_[2892977268692]", + "Entity_[2390466095060]", + "Entity_[3790625433556]", + "Entity_[3185035044820]", + "Entity_[492090550228]", + "Entity_[2781308118996]", + "Entity_[1230824925140]", + "Entity_[3399783409620]", + "Entity_[2098408318932]", + "Entity_[1862185117652]", + "Entity_[3090545764308]", + "Entity_[1600192112596]", + "Entity_[762673489876]", + "Entity_[2029688842196]", + "Entity_[917292312532]", + "Entity_[706838915028]", + "Entity_[745493620692]", + "Entity_[2562264786900]", + "Entity_[2141357991892]", + "Entity_[556515059668]", + "Entity_[2575149688788]", + "Entity_[535040223188]", + "Entity_[530745255892]", + "Entity_[496385517524]", + "Entity_[3043301124052]", + "Entity_[2635279230932]", + "Entity_[2777013151700]", + "Entity_[3425553213396]", + "Entity_[2716883609556]", + "Entity_[1909429757908]", + "Entity_[3524337461204]", + "Entity_[3116315568084]", + "Entity_[4495000070100]", + "Entity_[865752704980]", + "Entity_[831392966612]", + "Entity_[2373286225876]", + "Entity_[3876524779476]", + "Entity_[500680484820]", + "Entity_[509270419412]", + "Entity_[513565386708]", + "Entity_[2953106810836]", + "Entity_[4125632882644]", + "Entity_[3756265695188]", + "Entity_[2025393874900]", + "Entity_[3159265241044]", + "Entity_[2003919038420]", + "Entity_[1385443747796]", + "Entity_[719723816916]", + "Entity_[2476365440980]", + "Entity_[3296704194516]", + "Entity_[4314611443668]", + "Entity_[1329609172948]", + "Entity_[517860354004]", + "Entity_[4245891966932]", + "Entity_[1540062570452]", + "Entity_[522155321300]", + "Entity_[1814940477396]", + "Entity_[1093385971668]", + "Entity_[4215827195860]", + "Entity_[3966719092692]", + "Entity_[771263424468]", + "Entity_[526450288596]", + "Entity_[681069111252]", + "Entity_[1205055121364]", + "Entity_[2368991258580]", + "Entity_[3258049488852]", + "Entity_[4104158046164]", + "Entity_[912997345236]", + "Entity_[1282364532692]", + "Entity_[1617371981780]", + "Entity_[4357561116628]", + "Entity_[629529503700]", + "Entity_[2845732628436]", + "Entity_[2557969819604]", + "Entity_[2210077468628]", + "Entity_[1411213551572]", + "Entity_[1634551850964]", + "Entity_[552220092372]", + "Entity_[1905134790612]", + "Entity_[1552947472340]", + "Entity_[2317451651028]", + "Entity_[1278069565396]", + "Entity_[3142085371860]", + "Entity_[1123450742740]", + "Entity_[539335190484]", + "Entity_[3416963278804]", + "Entity_[1136335644628]", + "Entity_[1677501523924]", + "Entity_[3180740077524]", + "Entity_[2630984263636]", + "Entity_[638119438292]", + "Entity_[754083555284]", + "Entity_[1771990804436]", + "Entity_[981716821972]", + "Entity_[844277868500]", + "Entity_[543630157780]", + "Entity_[1733336098772]", + "Entity_[3283819292628]", + "Entity_[1007486625748]", + "Entity_[4013963732948]", + "Entity_[1673206556628]", + "Entity_[2940221908948]", + "Entity_[595169765332]", + "Entity_[3897999615956]", + "Entity_[1325314205652]", + "Entity_[547925125076]", + "Entity_[2424825833428]", + "Entity_[2347516422100]", + "Entity_[612349634516]", + "Entity_[1918019692500]", + "Entity_[1754810935252]", + "Entity_[4301726541780]", + "Entity_[3584467003348]", + "Entity_[560810026964]", + "Entity_[2832847726548]", + "Entity_[2016803940308]", + "Entity_[3915179485140]", + "Entity_[4585194383316]", + "Entity_[569399961556]", + "Entity_[3520042493908]", + "Entity_[3859344910292]", + "Entity_[2463480539092]", + "Entity_[4039733536724]", + "Entity_[779853359060]", + "Entity_[2983171581908]", + "Entity_[1832120346580]", + "Entity_[2334631520212]", + "Entity_[603759699924]", + "Entity_[1342494074836]", + "Entity_[2673933936596]", + "Entity_[565104994260]", + "Entity_[3279524325332]", + "Entity_[573694928852]", + "Entity_[3601646872532]", + "Entity_[582284863444]", + "Entity_[4443460462548]", + "Entity_[1879364986836]", + "Entity_[1750515967956]", + "Entity_[4082683209684]", + "Entity_[620939569108]", + "Entity_[973126887380]", + "Entity_[1179285317588]", + "Entity_[1406918584276]", + "Entity_[2330336552916]", + "Entity_[2253027141588]", + "Entity_[1802055575508]", + "Entity_[3992488896468]", + "Entity_[1359673944020]", + "Entity_[1424098453460]", + "Entity_[1720451196884]", + "Entity_[3545812297684]", + "Entity_[4482115168212]", + "Entity_[4589489350612]", + "Entity_[3906589550548]", + "Entity_[4224417130452]", + "Entity_[3412668311508]", + "Entity_[3812100270036]", + "Entity_[3447028049876]", + "Entity_[2068343547860]", + "Entity_[1887954921428]", + "Entity_[4546539677652]", + "Entity_[4147107719124]", + "Entity_[1196465186772]", + "Entity_[2987466549204]", + "Entity_[2695408773076]", + "Entity_[2691113805780]", + "Entity_[4202942293972]", + "Entity_[2171422762964]", + "Entity_[1501407864788]", + "Entity_[4563719546836]", + "Entity_[4417690658772]", + "Entity_[3683251251156]", + "Entity_[2046868711380]", + "Entity_[4529359808468]", + "Entity_[3837870073812]", + "Entity_[3163560208340]", + "Entity_[2785603086292]", + "Entity_[3073365895124]", + "Entity_[2523610081236]", + "Entity_[4159992621012]", + "Entity_[1978149234644]", + "Entity_[4035438569428]", + "Entity_[1759105902548]", + "Entity_[2145652959188]", + "Entity_[934472181716]", + "Entity_[3975309027284]", + "Entity_[3721905956820]", + "Entity_[2918747072468]", + "Entity_[3666071381972]", + "Entity_[3893704648660]", + "Entity_[2313156683732]", + "Entity_[2510725179348]", + "Entity_[1059026233300]", + "Entity_[2403350996948]", + "Entity_[1286659499988]", + "Entity_[3356833736660]", + "Entity_[2497840277460]", + "Entity_[2648164132820]", + "Entity_[3605941839828]", + "Entity_[741198653396]", + "Entity_[2579444656084]", + "Entity_[1840710281172]", + "Entity_[1960969365460]", + "Entity_[2764128249812]", + "Entity_[4469230266324]", + "Entity_[4022553667540]", + "Entity_[4336086280148]", + "Entity_[1471343093716]", + "Entity_[2837142693844]", + "Entity_[2703998707668]", + "Entity_[4409100724180]", + "Entity_[4237302032340]", + "Entity_[3039006156756]", + "Entity_[4430575560660]", + "Entity_[3335358900180]", + "Entity_[2923042039764]", + "Entity_[4593784317908]", + "Entity_[1213645055956]", + "Entity_[4344676214740]", + "Entity_[827097999316]", + "Entity_[951652050900]", + "Entity_[4413395691476]", + "Entity_[4207237261268]", + "Entity_[4056913405908]", + "Entity_[2721178576852]", + "Entity_[2081228449748]", + "Entity_[3794920400852]", + "Entity_[4194352359380]", + "Entity_[2965991712724]", + "Entity_[1415508518868]", + "Entity_[4031143602132]", + "Entity_[3197919946708]", + "Entity_[3099135698900]", + "Entity_[1570127341524]", + "Entity_[4516474906580]", + "Entity_[3438438115284]", + "Entity_[4172877522900]", + "Entity_[2433415768020]", + "Entity_[4473525233620]", + "Entity_[3760560662484]", + "Entity_[4052618438612]", + "Entity_[1643141785556]", + "Entity_[1368263878612]", + "Entity_[3240869619668]", + "Entity_[4572309481428]", + "Entity_[2798487988180]", + "Entity_[1101975906260]", + "Entity_[1518587733972]", + "Entity_[3962424125396]", + "Entity_[4267366803412]", + "Entity_[4095568111572]", + "Entity_[1557242439636]", + "Entity_[3936654321620]", + "Entity_[2665344002004]", + "Entity_[4044028504020]", + "Entity_[4447755429844]", + "Entity_[1243709827028]", + "Entity_[977421854676]", + "Entity_[2901567203284]", + "Entity_[642414405588]", + "Entity_[4323201378260]", + "Entity_[1767695837140]", + "Entity_[3691841185748]", + "Entity_[1492817930196]", + "Entity_[3674661316564]", + "Entity_[3515747526612]", + "Entity_[2871502432212]", + "Entity_[2506430212052]", + "Entity_[3777740531668]", + "Entity_[2386171127764]", + "Entity_[1265184663508]", + "Entity_[586579830740]", + "Entity_[3120610535380]", + "Entity_[2420530866132]", + "Entity_[2725473544148]", + "Entity_[1252299761620]", + "Entity_[2321746618324]", + "Entity_[3820690204628]", + "Entity_[3979603994580]", + "Entity_[3318179030996]", + "Entity_[1505702832084]", + "Entity_[1428393420756]", + "Entity_[3678956283860]", + "Entity_[1338199107540]", + "Entity_[895817476052]", + "Entity_[1660321654740]", + "Entity_[4525064841172]", + "Entity_[698248980436]", + "Entity_[4134222817236]", + "Entity_[2265912043476]", + "Entity_[1312429303764]", + "Entity_[4254481901524]", + "Entity_[4499295037396]", + "Entity_[3000351451092]", + "Entity_[3988193929172]", + "Entity_[655299307476]", + "Entity_[1346789042132]", + "Entity_[3769150597076]", + "Entity_[2480660408276]", + "Entity_[1866480084948]", + "Entity_[2214372435924]", + "Entity_[1046141331412]", + "Entity_[2261617076180]", + "Entity_[2042573744084]", + "Entity_[1183580284884]", + "Entity_[861457737684]", + "Entity_[1033256429524]", + "Entity_[711133882324]", + "Entity_[3928064387028]", + "Entity_[1316724271060]", + "Entity_[1003191658452]", + "Entity_[2218667403220]", + "Entity_[2991761516500]", + "Entity_[4452050397140]", + "Entity_[2291681847252]", + "Entity_[2751243347924]", + "Entity_[1784875706324]", + "Entity_[3176445110228]", + "Entity_[2815667857364]", + "Entity_[4533654775764]", + "Entity_[3610236807124]", + "Entity_[3880819746772]", + "Entity_[3124905502676]", + "Entity_[3494272690132]", + "Entity_[835687933908]", + "Entity_[1363968911316]", + "Entity_[3378308573140]", + "Entity_[1703271327700]", + "Entity_[3636006610900]", + "Entity_[2180012697556]", + "Entity_[1389738715092]", + "Entity_[4580899416020]", + "Entity_[3322473998292]", + "Entity_[878637606868]", + "Entity_[3550107264980]", + "Entity_[1166400415700]", + "Entity_[4370446018516]", + "Entity_[2240142239700]", + "Entity_[2399056029652]", + "Entity_[2729768511444]", + "Entity_[4310316476372]", + "Entity_[3189330012116]", + "Entity_[3047596091348]", + "Entity_[3867934844884]", + "Entity_[2867207464916]", + "Entity_[3575877068756]", + "Entity_[2446300669908]", + "Entity_[2536494983124]", + "Entity_[3262344456148]", + "Entity_[4486410135508]", + "Entity_[2519315113940]", + "Entity_[1724746164180]", + "Entity_[4048323471316]", + "Entity_[3051891058644]", + "Entity_[1419803486164]", + "Entity_[797033228244]", + "Entity_[1041846364116]", + "Entity_[4460640331732]", + "Entity_[3833575106516]", + "Entity_[3464207919060]", + "Entity_[1651731720148]", + "Entity_[1162105448404]", + "Entity_[663889242068]", + "Entity_[2755538315220]", + "Entity_[4507884971988]", + "Entity_[1522882701268]", + "Entity_[4151402686420]", + "Entity_[1144925579220]", + "Entity_[3850754975700]", + "Entity_[1467048126420]", + "Entity_[3945244256212]", + "Entity_[3958129158100]", + "Entity_[4061208373204]", + "Entity_[4555129612244]", + "Entity_[1299544401876]", + "Entity_[2897272235988]", + "Entity_[882932574164]", + "Entity_[4396215822292]", + "Entity_[1106270873556]", + "Entity_[2188602632148]", + "Entity_[2807077922772]", + "Entity_[998896691156]", + "Entity_[4331791312852]", + "Entity_[2197192566740]", + "Entity_[2738358446036]", + "Entity_[986011789268]", + "Entity_[4138517784532]", + "Entity_[1239414859732]", + "Entity_[1273774598100]", + "Entity_[2338926487508]", + "Entity_[2450595637204]", + "Entity_[784148326356]", + "Entity_[3704726087636]", + "Entity_[689659045844]", + "Entity_[3571582101460]", + "Entity_[1900839823316]", + "Entity_[1114860808148]", + "Entity_[4426280593364]", + "Entity_[4280251705300]", + "Entity_[4108453013460]", + "Entity_[1793465640916]", + "Entity_[4404805756884]", + "Entity_[2394761062356]", + "Entity_[2175717730260]", + "Entity_[3532927395796]", + "Entity_[3459912951764]", + "Entity_[1217940023252]", + "Entity_[1097680938964]", + "Entity_[3751970727892]", + "Entity_[1028961462228]", + "Entity_[3747675760596]", + "Entity_[4220122163156]", + "Entity_[3717610989524]", + "Entity_[3288114259924]", + "Entity_[1595897145300]", + "Entity_[1149220546516]", + "Entity_[599464732628]", + "Entity_[2583739623380]", + "Entity_[1436983355348]", + "Entity_[1913724725204]", + "Entity_[2935926941652]", + "Entity_[1690386425812]", + "Entity_[3206509881300]", + "Entity_[2137063024596]", + "Entity_[1054731266004]", + "Entity_[3842165041108]", + "Entity_[4001078831060]", + "Entity_[4348971182036]", + "Entity_[4293136607188]", + "Entity_[1222234990548]", + "Entity_[968831920084]", + "Entity_[4391920854996]", + "Entity_[2592329557972]", + "Entity_[870047672276]", + "Entity_[1711861262292]", + "Entity_[1608782047188]", + "Entity_[4306021509076]", + "Entity_[1999624071124]", + "Entity_[1269479630804]", + "Entity_[1140630611924]", + "Entity_[2227257337812]", + "Entity_[3339653867476]", + "Entity_[2854322563028]", + "Entity_[1024666494932]", + "Entity_[2686818838484]", + "Entity_[2300271781844]", + "Entity_[4361856083924]", + "Entity_[1527177668564]", + "Entity_[1372558845908]", + "Entity_[1514292766676]", + "Entity_[1943789496276]", + "Entity_[4340381247444]", + "Entity_[1737631066068]", + "Entity_[3996783863764]", + "Entity_[1574422308820]", + "Entity_[2059753613268]", + "Entity_[4009668765652]", + "Entity_[3713316022228]", + "Entity_[3846460008404]", + "Entity_[2553674852308]", + "Entity_[1321019238356]", + "Entity_[3167855175636]", + "Entity_[2961696745428]", + "Entity_[788443293652]", + "Entity_[4250186934228]", + "Entity_[4074093275092]", + "Entity_[3537222363092]", + "Entity_[4318906410964]", + "Entity_[1664616622036]", + "Entity_[4297431574484]", + "Entity_[4065503340500]", + "Entity_[994601723860]", + "Entity_[4142812751828]", + "Entity_[1333904140244]", + "Entity_[4117042948052]", + "Entity_[2996056483796]", + "Entity_[4263071836116]", + "Entity_[3940949288916]", + "Entity_[1351084009428]", + "Entity_[2094113351636]", + "Entity_[1797760608212]", + "Entity_[4241596999636]", + "Entity_[857162770388]", + "Entity_[3855049942996]", + "Entity_[2742653413332]", + "Entity_[2416235898836]", + "Entity_[3472797853652]", + "Entity_[3644596545492]", + "Entity_[2759833282516]", + "Entity_[4185762424788]", + "Entity_[3077660862420]", + "Entity_[2154242893780]", + "Entity_[2794193020884]", + "Entity_[1819235444692]", + "Entity_[3004646418388]", + "Entity_[1810645510100]", + "Entity_[4078388242388]", + "Entity_[4503590004692]", + "Entity_[2270207010772]", + "Entity_[3902294583252]", + "Entity_[3270934390740]", + "Entity_[1780580739028]", + "Entity_[3567287134164]", + "Entity_[3511452559316]", + "Entity_[4190057392084]", + "Entity_[1355378976724]", + "Entity_[3249459554260]", + "Entity_[3137790404564]", + "Entity_[4129927849940]", + "Entity_[2235847272404]", + "Entity_[4086978176980]", + "Entity_[3657481447380]", + "Entity_[2841437661140]", + "Entity_[2862912497620]", + "Entity_[4005373798356]", + "Entity_[3786330466260]", + "Entity_[814213097428]", + "Entity_[1308134336468]", + "Entity_[1707566294996]", + "Entity_[2356106356692]", + "Entity_[3889409681364]", + "Entity_[1153515513812]", + "Entity_[4542244710356]", + "Entity_[3614531774420]", + "Entity_[4434870527956]", + "Entity_[3202214914004]", + "Entity_[616644601812]", + "Entity_[2978876614612]", + "Entity_[3421258246100]", + "Entity_[4177172490196]", + "Entity_[2119883155412]", + "Entity_[1986739169236]", + "Entity_[2661049034708]", + "Entity_[3648891512788]", + "Entity_[4026848634836]", + "Entity_[2283091912660]", + "Entity_[1020371527636]", + "Entity_[990306756564]", + "Entity_[3498567657428]", + "Entity_[964536952788]", + "Entity_[2605214459860]", + "Entity_[2802782955476]", + "Entity_[2162832828372]", + "Entity_[2639574198228]", + "Entity_[4353266149332]", + "Entity_[4550834644948]", + "Entity_[2888682301396]", + "Entity_[3726200924116]", + "Entity_[2326041585620]", + "Entity_[1303839369172]", + "Entity_[3227984717780]", + "Entity_[1462753159124]", + "Entity_[2278796945364]", + "Entity_[1698976360404]", + "Entity_[4464935299028]", + "Entity_[2669638969300]", + "Entity_[801328195540]", + "Entity_[1565832374228]", + "Entity_[2377581193172]", + "Entity_[2970286680020]", + "Entity_[4387625887700]", + "Entity_[1763400869844]", + "Entity_[1789170673620]", + "Entity_[3021826287572]", + "Entity_[1982444201940]", + "Entity_[1625961916372]", + "Entity_[2613804394452]", + "Entity_[4211532228564]", + "Entity_[3807805302740]", + "Entity_[3502862624724]", + "Entity_[775558391764]", + "Entity_[3326768965588]", + "Entity_[2532200015828]", + "Entity_[3154970273748]", + "Entity_[3872229812180]", + "Entity_[3382603540436]", + "Entity_[1991034136532]", + "Entity_[1119155775444]", + "Entity_[2699703740372]", + "Entity_[2515020146644]", + "Entity_[1952379430868]", + "Entity_[1011781593044]", + "Entity_[4421985626068]", + "Entity_[1402623616980]", + "Entity_[4568014514132]", + "Entity_[4576604448724]", + "Entity_[3253754521556]", + "Entity_[1630256883668]", + "Entity_[2222962370516]", + "Entity_[3219394783188]", + "Entity_[3232279685076]", + "Entity_[3107725633492]", + "Entity_[633824470996]", + "Entity_[1896544856020]", + "Entity_[724018784212]", + "Entity_[1531472635860]", + "Entity_[2588034590676]", + "Entity_[3408373344212]", + "Entity_[852867803092]", + "Entity_[904407410644]", + "Entity_[2489250342868]", + "Entity_[3554402232276]", + "Entity_[921587279828]", + "Entity_[1827825379284]", + "Entity_[1295249434580]", + "Entity_[2540789950420]", + "Entity_[4271661770708]", + "Entity_[3442733082580]", + "Entity_[2527905048532]", + "Entity_[1544357537748]", + "Entity_[608054667220]", + "Entity_[2734063478740]", + "Entity_[4477820200916]", + "Entity_[693954013140]", + "Entity_[2931631974356]", + "Entity_[2111293220820]", + "Entity_[736903686100]", + "Entity_[1170695382996]", + "Entity_[3597351905236]", + "Entity_[2033983809492]", + "Entity_[839982901204]", + "Entity_[3562992166868]", + "Entity_[2914452105172]", + "Entity_[766968457172]", + "Entity_[848572835796]", + "Entity_[2132768057300]", + "Entity_[3395488442324]", + "Entity_[1883659954132]", + "Entity_[1484227995604]", + "Entity_[1849300215764]", + "Entity_[3343948834772]", + "Entity_[1587307210708]", + "Entity_[2467775506388]", + "Entity_[3971014059988]", + "Entity_[874342639572]", + "Entity_[1187875252180]", + "Entity_[1995329103828]", + "Entity_[3485682755540]", + "Entity_[2910157137876]", + "Entity_[4228712097748]", + "Entity_[3064775960532]", + "Entity_[2102703286228]", + "Entity_[3150675306452]", + "Entity_[2051163678676]", + "Entity_[2643869165524]", + "Entity_[1591602178004]", + "Entity_[2244437206996]", + "Entity_[2746948380628]", + "Entity_[1256594728916]", + "Entity_[1248004794324]", + "Entity_[3215099815892]", + "Entity_[2626689296340]", + "Entity_[672479176660]", + "Entity_[891522508756]", + "Entity_[1965264332756]", + "Entity_[1260889696212]", + "Entity_[955947018196]", + "Entity_[1445573289940]", + "Entity_[3653186480084]", + "Entity_[2459185571796]", + "Entity_[3588761970644]", + "Entity_[2304566749140]", + "Entity_[2948811843540]", + "Entity_[1080501069780]", + "Entity_[3829280139220]", + "Entity_[1127745710036]", + "Entity_[685364078548]", + "Entity_[3060480993236]", + "Entity_[2549379885012]", + "Entity_[3700431120340]", + "Entity_[2201487534036]", + "Entity_[3365423671252]", + "Entity_[925882247124]", + "Entity_[3361128703956]", + "Entity_[2308861716436]", + "Entity_[3086250797012]", + "Entity_[1686091458516]", + "Entity_[3623121709012]", + "Entity_[1776285771732]", + "Entity_[1376853813204]", + "Entity_[960241985492]", + "Entity_[3309589096404]", + "Entity_[1449868257236]", + "Entity_[3013236352980]", + "Entity_[2600919492564]", + "Entity_[3172150142932]", + "Entity_[2205782501332]", + "Entity_[4258776868820]", + "Entity_[2927337007060]", + "Entity_[1969559300052]", + "Entity_[1488522962900]", + "Entity_[809918130132]", + "Entity_[3558697199572]", + "Entity_[4383330920404]", + "Entity_[1381148780500]", + "Entity_[4233007065044]", + "Entity_[3292409227220]", + "Entity_[3910884517844]", + "Entity_[1935199561684]", + "Entity_[2076933482452]", + "Entity_[900112443348]", + "Entity_[2274501978068]", + "Entity_[1089091004372]", + "Entity_[3193624979412]", + "Entity_[1892249888724]", + "Entity_[1209350088660]", + "Entity_[3885114714068]", + "Entity_[2957401778132]", + "Entity_[2231552305108]", + "Entity_[2192897599444]", + "Entity_[943062116308]", + "Entity_[2974581647316]", + "Entity_[3580172036052]", + "Entity_[3627416676308]", + "Entity_[4559424579540]", + "Entity_[2454890604500]", + "Entity_[1475638061012]", + "Entity_[2824257791956]", + "Entity_[4198647326676]", + "Entity_[4520769873876]", + "Entity_[1479933028308]", + "Entity_[2566559754196]", + "Entity_[1604487079892]", + "Entity_[1561537406932]", + "Entity_[3331063932884]", + "Entity_[1729041131476]", + "Entity_[676774143956]", + "Entity_[2158537861076]", + "Entity_[1948084463572]", + "Entity_[4112747980756]", + "Entity_[1132040677332]", + "Entity_[1870775052244]", + "Entity_[3468502886356]", + "Entity_[1174990350292]", + "Entity_[715428849620]", + "Entity_[590874798036]", + "Entity_[3773445564372]", + "Entity_[1716156229588]", + "Entity_[3803510335444]", + "Entity_[1441278322644]", + "Entity_[2248732174292]", + "Entity_[4284546672596]", + "Entity_[3369718638548]", + "Entity_[4598079285204]", + "Entity_[659594274772]", + "Entity_[2381876160468]", + "Entity_[2115588188116]", + "Entity_[3764855629780]", + "Entity_[2811372890068]", + "Entity_[1746221000660]", + "Entity_[3034711189460]", + "Entity_[4366151051220]", + "Entity_[1157810481108]", + "Entity_[651004340180]", + "Entity_[2875797399508]", + "Entity_[2257322108884]", + "Entity_[3223689750484]", + "Entity_[2570854721492]", + "Entity_[4456345364436]", + "Entity_[1578717276116]", + "Entity_[2656754067412]", + "Entity_[1926609627092]", + "Entity_[2772718184404]", + "Entity_[1647436752852]", + "Entity_[3210804848596]", + "Entity_[818508064724]", + "Entity_[4537949743060]", + "Entity_[4018258700244]", + "Entity_[2768423217108]", + "Entity_[1432688388052]", + "Entity_[2360401323988]", + "Entity_[2343221454804]", + "Entity_[2622394329044]", + "Entity_[792738260948]", + "Entity_[1694681393108]", + "Entity_[2038278776788]", + "Entity_[3266639423444]", + "Entity_[4155697653716]", + "Entity_[3313884063700]", + "Entity_[2442005702612]", + "Entity_[1084796037076]", + "Entity_[1535767603156]", + "Entity_[3391193475028]", + "Entity_[3923769419732]", + "Entity_[3782035498964]", + "Entity_[3953834190804]", + "Entity_[625234536404]", + "Entity_[4512179939284]", + "Entity_[3081955829716]", + "Entity_[3275229358036]", + "Entity_[4091273144276]", + "Entity_[2858617530324]", + "Entity_[1235119892436]", + "Entity_[3300999161812]", + "Entity_[2021098907604]", + "Entity_[2596624525268]", + "Entity_[3069070927828]", + "Entity_[2905862170580]", + "Entity_[3734790858708]", + "Entity_[3008941385684]", + "Entity_[4490705102804]", + "Entity_[822803032020]", + "Entity_[3709021054932]", + "Entity_[2484955375572]", + "Entity_[2502135244756]", + "Entity_[3404078376916]", + "Entity_[3687546218452]", + "Entity_[3112020600788]", + "Entity_[3056186025940]", + "Entity_[749788587988]", + "Entity_[4379035953108]", + "Entity_[1067616167892]", + "Entity_[3352538769364]", + "Entity_[4099863078868]", + "Entity_[2411940931540]", + "Entity_[1656026687444]", + "Entity_[3932359354324]", + "Entity_[1741926033364]", + "Entity_[4168582555604]", + "Entity_[2064048580564]", + "Entity_[758378522580]", + "Entity_[2678228903892]", + "Entity_[3631711643604]", + "Entity_[2287386879956]", + "Entity_[1845005248468]", + "Entity_[3477092820948]", + "Entity_[2089818384340]", + "Entity_[1037551396820]", + "Entity_[702543947732]", + "Entity_[1681796491220]", + "Entity_[908702377940]", + "Entity_[2106998253524]", + "Entity_[3129200469972]", + "Entity_[3863639877588]", + "Entity_[1050436298708]", + "Entity_[2012508973012]", + "Entity_[3618826741716]", + "Entity_[3386898507732]", + "Entity_[3434143147988]", + "Entity_[2437710735316]", + "Entity_[4288841639892]", + "Entity_[1875070019540]", + "Entity_[2128473090004]", + "Entity_[3949539223508]", + "Entity_[3489977722836]", + "Entity_[1668911589332]", + "Entity_[1398328649684]", + "Entity_[3541517330388]", + "Entity_[1806350542804]", + "Entity_[2085523417044]", + "Entity_[732608718804]", + "Entity_[4439165495252]", + "Entity_[3528632428500]", + "Entity_[2407645964244]", + "Entity_[1930904594388]", + "Entity_[4374740985812]", + "Entity_[1509997799380]", + "Entity_[1290954467284]", + "Entity_[2819962824660]", + "Entity_[2944516876244]", + "Entity_[1583012243412]", + "Entity_[1613077014484]", + "Entity_[3451323017172]", + "Entity_[938767149012]", + "Entity_[3739085826004]", + "Entity_[1192170219476]", + "Entity_[3824985171924]", + "Entity_[1956674398164]", + "Entity_[2789898053588]", + "Entity_[3146380339156]", + "Entity_[3670366349268]", + "Entity_[2429120800724]", + "Entity_[1076206102484]", + "Entity_[1394033682388]", + "Entity_[3455617984468]", + "Entity_[2712588642260]", + "Entity_[4181467457492]", + "Entity_[3103430666196]", + "Entity_[1200760154068]", + "Entity_[4121337915348]", + "Entity_[2652459100116]", + "Entity_[1621666949076]", + "Entity_[1063321200596]", + "Entity_[1823530411988]", + "Entity_[2682523871188]", + "Entity_[3696136153044]", + "Entity_[3816395237332]", + "Entity_[1939494528980]", + "Entity_[2884387334100]", + "Entity_[2124178122708]", + "Entity_[3026121254868]", + "Entity_[1853595183060]", + "Entity_[2828552759252]", + "Entity_[2364696291284]", + "Entity_[2072638515156]", + "Entity_[2008214005716]", + "Entity_[930177214420]", + "Entity_[2472070473684]", + "Entity_[3133495437268]", + "Entity_[668184209364]", + "Entity_[3593056937940]", + "Entity_[3481387788244]", + "Entity_[1016076560340]", + "Entity_[3730495891412]", + "Entity_[2055458645972]", + "Entity_[1454163224532]", + "Entity_[2167127795668]", + "Entity_[2184307664852]", + "Entity_[1836415313876]", + "Entity_[3374013605844]", + "Entity_[2708293674964]", + "Entity_[3743380793300]", + "Entity_[3661776414676]", + "Entity_[805623162836]", + "Entity_[4400510789588]", + "Entity_[1071911135188]", + "Entity_[1857890150356]", + "Entity_[3245164586964]", + "Entity_[1226529957844]", + "Entity_[1548652505044]", + "Entity_[1110565840852]", + "Entity_[3799215368148]", + "Entity_[4164287588308]", + "Entity_[4069798307796]" + ] + } + } + }, + "Entities": { + "Entity_[1003191658452]": { + "Id": "Entity_[1003191658452]", + "Name": "Entity1", + "Components": { + "Component_[11525365929370623807]": { + "$type": "EditorVisibilityComponent", + "Id": 11525365929370623807 + }, + "Component_[12334620273692642550]": { + "$type": "EditorLockComponent", + "Id": 12334620273692642550 + }, + "Component_[14389735759337977675]": { + "$type": "EditorPendingCompositionComponent", + "Id": 14389735759337977675 + }, + "Component_[16184381538555246534]": { + "$type": "AZ::Render::EditorMeshComponent", + "Id": 16184381538555246534, + "Controller": { + "Configuration": { + "ModelAsset": { + "assetId": { + "guid": "{E14975EF-E676-51A4-B826-3EF59CB645AA}", + "subId": 285127096 + }, + "assetHint": "testdata/objects/cube/cube.azmodel" + } + } + } + }, + "Component_[17962478023087084794]": { + "$type": "SelectionComponent", + "Id": 17962478023087084794 + }, + "Component_[18071675051915092508]": { + "$type": "EditorEntityIconComponent", + "Id": 18071675051915092508 + }, + "Component_[2115498007879087044]": { + "$type": "EditorInspectorComponent", + "Id": 2115498007879087044, + "ComponentOrderEntryArray": [ + { + "ComponentId": 399415038452606756 + }, + { + "ComponentId": 16184381538555246534, + "SortIndex": 1 + }, + { + "ComponentId": 7827190074535394331, + "SortIndex": 2 + } + ] + }, + "Component_[3518973002096080237]": { + "$type": "EditorOnlyEntityComponent", + "Id": 3518973002096080237 + }, + "Component_[399415038452606756]": { + "$type": "{27F1E1A1-8D9D-4C3B-BD3A-AFB9762449C0} TransformComponent", + "Id": 399415038452606756, + "Parent Entity": "ContainerEntity", + "Transform Data": { + "Translate": [ + 22.53014373779297, + -0.00018183141946792603, + 89.95755767822266 + ] + } + }, + "Component_[4564240319609068082]": { + "$type": "EditorEntitySortComponent", + "Id": 4564240319609068082 + }, + "Component_[7827190074535394331]": { + "$type": "EditorMaterialComponent", + "Id": 7827190074535394331, + "Controller": { + "Configuration": { + "materials": [ + { + "Key": { + "materialSlotStableId": 2418540911 + }, + "Value": { + "MaterialAsset": { + "assetId": { + "guid": "{FC69F2F8-F73B-5A0C-B8B7-94BAA45780FC}" + }, + "assetHint": "materials/presets/pbr/metal_brass_polished.azmaterial" + } + } + } + ] + } + } + }, + "Component_[8092226976542590265]": { + "$type": "EditorDisabledCompositionComponent", + "Id": 8092226976542590265 + } + } + }, + "Entity_[1007486625748]": { + "Id": "Entity_[1007486625748]", + "Name": "Entity1", + "Components": { + "Component_[11525365929370623807]": { + "$type": "EditorVisibilityComponent", + "Id": 11525365929370623807 + }, + "Component_[12334620273692642550]": { + "$type": "EditorLockComponent", + "Id": 12334620273692642550 + }, + "Component_[14389735759337977675]": { + "$type": "EditorPendingCompositionComponent", + "Id": 14389735759337977675 + }, + "Component_[16184381538555246534]": { + "$type": "AZ::Render::EditorMeshComponent", + "Id": 16184381538555246534, + "Controller": { + "Configuration": { + "ModelAsset": { + "assetId": { + "guid": "{E14975EF-E676-51A4-B826-3EF59CB645AA}", + "subId": 285127096 + }, + "assetHint": "testdata/objects/cube/cube.azmodel" + } + } + } + }, + "Component_[17962478023087084794]": { + "$type": "SelectionComponent", + "Id": 17962478023087084794 + }, + "Component_[18071675051915092508]": { + "$type": "EditorEntityIconComponent", + "Id": 18071675051915092508 + }, + "Component_[2115498007879087044]": { + "$type": "EditorInspectorComponent", + "Id": 2115498007879087044, + "ComponentOrderEntryArray": [ + { + "ComponentId": 399415038452606756 + }, + { + "ComponentId": 16184381538555246534, + "SortIndex": 1 + }, + { + "ComponentId": 7827190074535394331, + "SortIndex": 2 + } + ] + }, + "Component_[3518973002096080237]": { + "$type": "EditorOnlyEntityComponent", + "Id": 3518973002096080237 + }, + "Component_[399415038452606756]": { + "$type": "{27F1E1A1-8D9D-4C3B-BD3A-AFB9762449C0} TransformComponent", + "Id": 399415038452606756, + "Parent Entity": "ContainerEntity", + "Transform Data": { + "Translate": [ + 22.53014373779297, + -0.00018183141946792603, + 69.34888458251953 + ] + } + }, + "Component_[4564240319609068082]": { + "$type": "EditorEntitySortComponent", + "Id": 4564240319609068082 + }, + "Component_[7827190074535394331]": { + "$type": "EditorMaterialComponent", + "Id": 7827190074535394331, + "Controller": { + "Configuration": { + "materials": [ + { + "Key": { + "materialSlotStableId": 2418540911 + }, + "Value": { + "MaterialAsset": { + "assetId": { + "guid": "{80E0F2A7-1EE4-597F-80EF-985C65BCE2EB}" + }, + "assetHint": "materials/presets/pbr/metal_brass.azmaterial" + } + } + } + ] + } + } + }, + "Component_[8092226976542590265]": { + "$type": "EditorDisabledCompositionComponent", + "Id": 8092226976542590265 + } + } + }, + "Entity_[1011781593044]": { + "Id": "Entity_[1011781593044]", + "Name": "Entity1", + "Components": { + "Component_[11525365929370623807]": { + "$type": "EditorVisibilityComponent", + "Id": 11525365929370623807 + }, + "Component_[12334620273692642550]": { + "$type": "EditorLockComponent", + "Id": 12334620273692642550 + }, + "Component_[14389735759337977675]": { + "$type": "EditorPendingCompositionComponent", + "Id": 14389735759337977675 + }, + "Component_[16184381538555246534]": { + "$type": "AZ::Render::EditorMeshComponent", + "Id": 16184381538555246534, + "Controller": { + "Configuration": { + "ModelAsset": { + "assetId": { + "guid": "{E14975EF-E676-51A4-B826-3EF59CB645AA}", + "subId": 285127096 + }, + "assetHint": "testdata/objects/cube/cube.azmodel" + } + } + } + }, + "Component_[17962478023087084794]": { + "$type": "SelectionComponent", + "Id": 17962478023087084794 + }, + "Component_[18071675051915092508]": { + "$type": "EditorEntityIconComponent", + "Id": 18071675051915092508 + }, + "Component_[2115498007879087044]": { + "$type": "EditorInspectorComponent", + "Id": 2115498007879087044, + "ComponentOrderEntryArray": [ + { + "ComponentId": 399415038452606756 + }, + { + "ComponentId": 16184381538555246534, + "SortIndex": 1 + }, + { + "ComponentId": 7827190074535394331, + "SortIndex": 2 + } + ] + }, + "Component_[3518973002096080237]": { + "$type": "EditorOnlyEntityComponent", + "Id": 3518973002096080237 + }, + "Component_[399415038452606756]": { + "$type": "{27F1E1A1-8D9D-4C3B-BD3A-AFB9762449C0} TransformComponent", + "Id": 399415038452606756, + "Parent Entity": "ContainerEntity", + "Transform Data": { + "Translate": [ + -12.530563354492188, + -0.00018183141946792603, + 34.53608703613281 + ] + } + }, + "Component_[4564240319609068082]": { + "$type": "EditorEntitySortComponent", + "Id": 4564240319609068082 + }, + "Component_[7827190074535394331]": { + "$type": "EditorMaterialComponent", + "Id": 7827190074535394331, + "Controller": { + "Configuration": { + "materials": [ + { + "Key": { + "materialSlotStableId": 2418540911 + }, + "Value": { + "MaterialAsset": { + "assetId": { + "guid": "{F2AD0EBF-7137-58D1-9991-9552FAD41B19}" + }, + "assetHint": "materials/presets/pbr/metal_mercury.azmaterial" + } + } + } + ] + } + } + }, + "Component_[8092226976542590265]": { + "$type": "EditorDisabledCompositionComponent", + "Id": 8092226976542590265 + } + } + }, + "Entity_[1016076560340]": { + "Id": "Entity_[1016076560340]", + "Name": "Entity1", + "Components": { + "Component_[11525365929370623807]": { + "$type": "EditorVisibilityComponent", + "Id": 11525365929370623807 + }, + "Component_[12334620273692642550]": { + "$type": "EditorLockComponent", + "Id": 12334620273692642550 + }, + "Component_[14389735759337977675]": { + "$type": "EditorPendingCompositionComponent", + "Id": 14389735759337977675 + }, + "Component_[16184381538555246534]": { + "$type": "AZ::Render::EditorMeshComponent", + "Id": 16184381538555246534, + "Controller": { + "Configuration": { + "ModelAsset": { + "assetId": { + "guid": "{E14975EF-E676-51A4-B826-3EF59CB645AA}", + "subId": 285127096 + }, + "assetHint": "testdata/objects/cube/cube.azmodel" + } + } + } + }, + "Component_[17962478023087084794]": { + "$type": "SelectionComponent", + "Id": 17962478023087084794 + }, + "Component_[18071675051915092508]": { + "$type": "EditorEntityIconComponent", + "Id": 18071675051915092508 + }, + "Component_[2115498007879087044]": { + "$type": "EditorInspectorComponent", + "Id": 2115498007879087044, + "ComponentOrderEntryArray": [ + { + "ComponentId": 399415038452606756 + }, + { + "ComponentId": 16184381538555246534, + "SortIndex": 1 + }, + { + "ComponentId": 7827190074535394331, + "SortIndex": 2 + } + ] + }, + "Component_[3518973002096080237]": { + "$type": "EditorOnlyEntityComponent", + "Id": 3518973002096080237 + }, + "Component_[399415038452606756]": { + "$type": "{27F1E1A1-8D9D-4C3B-BD3A-AFB9762449C0} TransformComponent", + "Id": 399415038452606756, + "Parent Entity": "ContainerEntity", + "Transform Data": { + "Translate": [ + 2.5301437377929688, + -0.00018183141946792603, + 9.475835800170898 + ] + } + }, + "Component_[4564240319609068082]": { + "$type": "EditorEntitySortComponent", + "Id": 4564240319609068082 + }, + "Component_[7827190074535394331]": { + "$type": "EditorMaterialComponent", + "Id": 7827190074535394331, + "Controller": { + "Configuration": { + "materials": [ + { + "Key": { + "materialSlotStableId": 2418540911 + }, + "Value": { + "MaterialAsset": { + "assetId": { + "guid": "{E23FC75B-4142-55F1-B9AE-884826E7EB23}" + }, + "assetHint": "materials/presets/pbr/metal_platinum.azmaterial" + } + } + } + ] + } + } + }, + "Component_[8092226976542590265]": { + "$type": "EditorDisabledCompositionComponent", + "Id": 8092226976542590265 + } + } + }, + "Entity_[1020371527636]": { + "Id": "Entity_[1020371527636]", + "Name": "Entity1", + "Components": { + "Component_[11525365929370623807]": { + "$type": "EditorVisibilityComponent", + "Id": 11525365929370623807 + }, + "Component_[12334620273692642550]": { + "$type": "EditorLockComponent", + "Id": 12334620273692642550 + }, + "Component_[14389735759337977675]": { + "$type": "EditorPendingCompositionComponent", + "Id": 14389735759337977675 + }, + "Component_[16184381538555246534]": { + "$type": "AZ::Render::EditorMeshComponent", + "Id": 16184381538555246534, + "Controller": { + "Configuration": { + "ModelAsset": { + "assetId": { + "guid": "{E14975EF-E676-51A4-B826-3EF59CB645AA}", + "subId": 285127096 + }, + "assetHint": "testdata/objects/cube/cube.azmodel" + } + } + } + }, + "Component_[17962478023087084794]": { + "$type": "SelectionComponent", + "Id": 17962478023087084794 + }, + "Component_[18071675051915092508]": { + "$type": "EditorEntityIconComponent", + "Id": 18071675051915092508 + }, + "Component_[2115498007879087044]": { + "$type": "EditorInspectorComponent", + "Id": 2115498007879087044, + "ComponentOrderEntryArray": [ + { + "ComponentId": 399415038452606756 + }, + { + "ComponentId": 16184381538555246534, + "SortIndex": 1 + }, + { + "ComponentId": 7827190074535394331, + "SortIndex": 2 + } + ] + }, + "Component_[3518973002096080237]": { + "$type": "EditorOnlyEntityComponent", + "Id": 3518973002096080237 + }, + "Component_[399415038452606756]": { + "$type": "{27F1E1A1-8D9D-4C3B-BD3A-AFB9762449C0} TransformComponent", + "Id": 399415038452606756, + "Parent Entity": "ContainerEntity", + "Transform Data": { + "Translate": [ + -27.530563354492188, + -0.00018183141946792603, + 39.56034851074219 + ] + } + }, + "Component_[4564240319609068082]": { + "$type": "EditorEntitySortComponent", + "Id": 4564240319609068082 + }, + "Component_[7827190074535394331]": { + "$type": "EditorMaterialComponent", + "Id": 7827190074535394331, + "Controller": { + "Configuration": { + "materials": [ + { + "Key": { + "materialSlotStableId": 2418540911 + }, + "Value": { + "MaterialAsset": { + "assetId": { + "guid": "{E621C5BF-B8E1-55F0-A791-EC960F2FA46F}" + }, + "assetHint": "materials/presets/pbr/metal_copper.azmaterial" + } + } + } + ] + } + } + }, + "Component_[8092226976542590265]": { + "$type": "EditorDisabledCompositionComponent", + "Id": 8092226976542590265 + } + } + }, + "Entity_[1024666494932]": { + "Id": "Entity_[1024666494932]", + "Name": "Entity1", + "Components": { + "Component_[11525365929370623807]": { + "$type": "EditorVisibilityComponent", + "Id": 11525365929370623807 + }, + "Component_[12334620273692642550]": { + "$type": "EditorLockComponent", + "Id": 12334620273692642550 + }, + "Component_[14389735759337977675]": { + "$type": "EditorPendingCompositionComponent", + "Id": 14389735759337977675 + }, + "Component_[16184381538555246534]": { + "$type": "AZ::Render::EditorMeshComponent", + "Id": 16184381538555246534, + "Controller": { + "Configuration": { + "ModelAsset": { + "assetId": { + "guid": "{E14975EF-E676-51A4-B826-3EF59CB645AA}", + "subId": 285127096 + }, + "assetHint": "testdata/objects/cube/cube.azmodel" + } + } + } + }, + "Component_[17962478023087084794]": { + "$type": "SelectionComponent", + "Id": 17962478023087084794 + }, + "Component_[18071675051915092508]": { + "$type": "EditorEntityIconComponent", + "Id": 18071675051915092508 + }, + "Component_[2115498007879087044]": { + "$type": "EditorInspectorComponent", + "Id": 2115498007879087044, + "ComponentOrderEntryArray": [ + { + "ComponentId": 399415038452606756 + }, + { + "ComponentId": 16184381538555246534, + "SortIndex": 1 + }, + { + "ComponentId": 7827190074535394331, + "SortIndex": 2 + } + ] + }, + "Component_[3518973002096080237]": { + "$type": "EditorOnlyEntityComponent", + "Id": 3518973002096080237 + }, + "Component_[399415038452606756]": { + "$type": "{27F1E1A1-8D9D-4C3B-BD3A-AFB9762449C0} TransformComponent", + "Id": 399415038452606756, + "Parent Entity": "ContainerEntity", + "Transform Data": { + "Translate": [ + -17.530563354492188, + -0.00018183141946792603, + 64.32462310791016 + ] + } + }, + "Component_[4564240319609068082]": { + "$type": "EditorEntitySortComponent", + "Id": 4564240319609068082 + }, + "Component_[7827190074535394331]": { + "$type": "EditorMaterialComponent", + "Id": 7827190074535394331, + "Controller": { + "Configuration": { + "materials": [ + { + "Key": { + "materialSlotStableId": 2418540911 + }, + "Value": { + "MaterialAsset": { + "assetId": { + "guid": "{970148AC-7258-5EC8-9CE7-F4EF93164D93}" + }, + "assetHint": "materials/presets/pbr/metal_iron_matte.azmaterial" + } + } + } + ] + } + } + }, + "Component_[8092226976542590265]": { + "$type": "EditorDisabledCompositionComponent", + "Id": 8092226976542590265 + } + } + }, + "Entity_[1028961462228]": { + "Id": "Entity_[1028961462228]", + "Name": "Entity1", + "Components": { + "Component_[11525365929370623807]": { + "$type": "EditorVisibilityComponent", + "Id": 11525365929370623807 + }, + "Component_[12334620273692642550]": { + "$type": "EditorLockComponent", + "Id": 12334620273692642550 + }, + "Component_[14389735759337977675]": { + "$type": "EditorPendingCompositionComponent", + "Id": 14389735759337977675 + }, + "Component_[16184381538555246534]": { + "$type": "AZ::Render::EditorMeshComponent", + "Id": 16184381538555246534, + "Controller": { + "Configuration": { + "ModelAsset": { + "assetId": { + "guid": "{E14975EF-E676-51A4-B826-3EF59CB645AA}", + "subId": 285127096 + }, + "assetHint": "testdata/objects/cube/cube.azmodel" + } + } + } + }, + "Component_[17962478023087084794]": { + "$type": "SelectionComponent", + "Id": 17962478023087084794 + }, + "Component_[18071675051915092508]": { + "$type": "EditorEntityIconComponent", + "Id": 18071675051915092508 + }, + "Component_[2115498007879087044]": { + "$type": "EditorInspectorComponent", + "Id": 2115498007879087044, + "ComponentOrderEntryArray": [ + { + "ComponentId": 399415038452606756 + }, + { + "ComponentId": 16184381538555246534, + "SortIndex": 1 + }, + { + "ComponentId": 7827190074535394331, + "SortIndex": 2 + } + ] + }, + "Component_[3518973002096080237]": { + "$type": "EditorOnlyEntityComponent", + "Id": 3518973002096080237 + }, + "Component_[399415038452606756]": { + "$type": "{27F1E1A1-8D9D-4C3B-BD3A-AFB9762449C0} TransformComponent", + "Id": 399415038452606756, + "Parent Entity": "ContainerEntity", + "Transform Data": { + "Translate": [ + 37.53014373779297, + -0.00018183141946792603, + 109.46680450439453 + ] + } + }, + "Component_[4564240319609068082]": { + "$type": "EditorEntitySortComponent", + "Id": 4564240319609068082 + }, + "Component_[7827190074535394331]": { + "$type": "EditorMaterialComponent", + "Id": 7827190074535394331, + "Controller": { + "Configuration": { + "materials": [ + { + "Key": { + "materialSlotStableId": 2418540911 + }, + "Value": { + "MaterialAsset": { + "assetId": { + "guid": "{2D054071-BEF7-53C0-A8C9-E4F026BD8364}" + }, + "assetHint": "materials/presets/pbr/metal_copper_matte.azmaterial" + } + } + } + ] + } + } + }, + "Component_[8092226976542590265]": { + "$type": "EditorDisabledCompositionComponent", + "Id": 8092226976542590265 + } + } + }, + "Entity_[1033256429524]": { + "Id": "Entity_[1033256429524]", + "Name": "Entity1", + "Components": { + "Component_[11525365929370623807]": { + "$type": "EditorVisibilityComponent", + "Id": 11525365929370623807 + }, + "Component_[12334620273692642550]": { + "$type": "EditorLockComponent", + "Id": 12334620273692642550 + }, + "Component_[14389735759337977675]": { + "$type": "EditorPendingCompositionComponent", + "Id": 14389735759337977675 + }, + "Component_[16184381538555246534]": { + "$type": "AZ::Render::EditorMeshComponent", + "Id": 16184381538555246534, + "Controller": { + "Configuration": { + "ModelAsset": { + "assetId": { + "guid": "{E14975EF-E676-51A4-B826-3EF59CB645AA}", + "subId": 285127096 + }, + "assetHint": "testdata/objects/cube/cube.azmodel" + } + } + } + }, + "Component_[17962478023087084794]": { + "$type": "SelectionComponent", + "Id": 17962478023087084794 + }, + "Component_[18071675051915092508]": { + "$type": "EditorEntityIconComponent", + "Id": 18071675051915092508 + }, + "Component_[2115498007879087044]": { + "$type": "EditorInspectorComponent", + "Id": 2115498007879087044, + "ComponentOrderEntryArray": [ + { + "ComponentId": 399415038452606756 + }, + { + "ComponentId": 16184381538555246534, + "SortIndex": 1 + }, + { + "ComponentId": 7827190074535394331, + "SortIndex": 2 + } + ] + }, + "Component_[3518973002096080237]": { + "$type": "EditorOnlyEntityComponent", + "Id": 3518973002096080237 + }, + "Component_[399415038452606756]": { + "$type": "{27F1E1A1-8D9D-4C3B-BD3A-AFB9762449C0} TransformComponent", + "Id": 399415038452606756, + "Parent Entity": "ContainerEntity", + "Transform Data": { + "Translate": [ + -42.53056335449219, + -0.00018183141946792603, + 84.40655517578125 + ] + } + }, + "Component_[4564240319609068082]": { + "$type": "EditorEntitySortComponent", + "Id": 4564240319609068082 + }, + "Component_[7827190074535394331]": { + "$type": "EditorMaterialComponent", + "Id": 7827190074535394331, + "Controller": { + "Configuration": { + "materials": [ + { + "Key": { + "materialSlotStableId": 2418540911 + }, + "Value": { + "MaterialAsset": { + "assetId": { + "guid": "{80E0F2A7-1EE4-597F-80EF-985C65BCE2EB}" + }, + "assetHint": "materials/presets/pbr/metal_brass.azmaterial" + } + } + } + ] + } + } + }, + "Component_[8092226976542590265]": { + "$type": "EditorDisabledCompositionComponent", + "Id": 8092226976542590265 + } + } + }, + "Entity_[1037551396820]": { + "Id": "Entity_[1037551396820]", + "Name": "Entity1", + "Components": { + "Component_[11525365929370623807]": { + "$type": "EditorVisibilityComponent", + "Id": 11525365929370623807 + }, + "Component_[12334620273692642550]": { + "$type": "EditorLockComponent", + "Id": 12334620273692642550 + }, + "Component_[14389735759337977675]": { + "$type": "EditorPendingCompositionComponent", + "Id": 14389735759337977675 + }, + "Component_[16184381538555246534]": { + "$type": "AZ::Render::EditorMeshComponent", + "Id": 16184381538555246534, + "Controller": { + "Configuration": { + "ModelAsset": { + "assetId": { + "guid": "{E14975EF-E676-51A4-B826-3EF59CB645AA}", + "subId": 285127096 + }, + "assetHint": "testdata/objects/cube/cube.azmodel" + } + } + } + }, + "Component_[17962478023087084794]": { + "$type": "SelectionComponent", + "Id": 17962478023087084794 + }, + "Component_[18071675051915092508]": { + "$type": "EditorEntityIconComponent", + "Id": 18071675051915092508 + }, + "Component_[2115498007879087044]": { + "$type": "EditorInspectorComponent", + "Id": 2115498007879087044, + "ComponentOrderEntryArray": [ + { + "ComponentId": 399415038452606756 + }, + { + "ComponentId": 16184381538555246534, + "SortIndex": 1 + }, + { + "ComponentId": 7827190074535394331, + "SortIndex": 2 + } + ] + }, + "Component_[3518973002096080237]": { + "$type": "EditorOnlyEntityComponent", + "Id": 3518973002096080237 + }, + "Component_[399415038452606756]": { + "$type": "{27F1E1A1-8D9D-4C3B-BD3A-AFB9762449C0} TransformComponent", + "Id": 399415038452606756, + "Parent Entity": "ContainerEntity", + "Transform Data": { + "Translate": [ + -22.530563354492188, + -0.00018183141946792603, + 24.533506393432617 + ] + } + }, + "Component_[4564240319609068082]": { + "$type": "EditorEntitySortComponent", + "Id": 4564240319609068082 + }, + "Component_[7827190074535394331]": { + "$type": "EditorMaterialComponent", + "Id": 7827190074535394331, + "Controller": { + "Configuration": { + "materials": [ + { + "Key": { + "materialSlotStableId": 2418540911 + }, + "Value": { + "MaterialAsset": { + "assetId": { + "guid": "{FE52E7C8-064D-506A-9C26-433EB93747DE}" + }, + "assetHint": "materials/presets/pbr/metal_gold.azmaterial" + } + } + } + ] + } + } + }, + "Component_[8092226976542590265]": { + "$type": "EditorDisabledCompositionComponent", + "Id": 8092226976542590265 + } + } + }, + "Entity_[1041846364116]": { + "Id": "Entity_[1041846364116]", + "Name": "Entity1", + "Components": { + "Component_[11525365929370623807]": { + "$type": "EditorVisibilityComponent", + "Id": 11525365929370623807 + }, + "Component_[12334620273692642550]": { + "$type": "EditorLockComponent", + "Id": 12334620273692642550 + }, + "Component_[14389735759337977675]": { + "$type": "EditorPendingCompositionComponent", + "Id": 14389735759337977675 + }, + "Component_[16184381538555246534]": { + "$type": "AZ::Render::EditorMeshComponent", + "Id": 16184381538555246534, + "Controller": { + "Configuration": { + "ModelAsset": { + "assetId": { + "guid": "{E14975EF-E676-51A4-B826-3EF59CB645AA}", + "subId": 285127096 + }, + "assetHint": "testdata/objects/cube/cube.azmodel" + } + } + } + }, + "Component_[17962478023087084794]": { + "$type": "SelectionComponent", + "Id": 17962478023087084794 + }, + "Component_[18071675051915092508]": { + "$type": "EditorEntityIconComponent", + "Id": 18071675051915092508 + }, + "Component_[2115498007879087044]": { + "$type": "EditorInspectorComponent", + "Id": 2115498007879087044, + "ComponentOrderEntryArray": [ + { + "ComponentId": 399415038452606756 + }, + { + "ComponentId": 16184381538555246534, + "SortIndex": 1 + }, + { + "ComponentId": 7827190074535394331, + "SortIndex": 2 + } + ] + }, + "Component_[3518973002096080237]": { + "$type": "EditorOnlyEntityComponent", + "Id": 3518973002096080237 + }, + "Component_[399415038452606756]": { + "$type": "{27F1E1A1-8D9D-4C3B-BD3A-AFB9762449C0} TransformComponent", + "Id": 399415038452606756, + "Parent Entity": "ContainerEntity", + "Transform Data": { + "Translate": [ + 7.530143737792969, + -0.00018183141946792603, + 114.4910659790039 + ] + } + }, + "Component_[4564240319609068082]": { + "$type": "EditorEntitySortComponent", + "Id": 4564240319609068082 + }, + "Component_[7827190074535394331]": { + "$type": "EditorMaterialComponent", + "Id": 7827190074535394331, + "Controller": { + "Configuration": { + "materials": [ + { + "Key": { + "materialSlotStableId": 2418540911 + }, + "Value": { + "MaterialAsset": { + "assetId": { + "guid": "{CDA13277-5EAB-5E2A-93F5-B7003597FBCE}" + }, + "assetHint": "materials/presets/pbr/metal_silver.azmaterial" + } + } + } + ] + } + } + }, + "Component_[8092226976542590265]": { + "$type": "EditorDisabledCompositionComponent", + "Id": 8092226976542590265 + } + } + }, + "Entity_[1046141331412]": { + "Id": "Entity_[1046141331412]", + "Name": "Entity1", + "Components": { + "Component_[11525365929370623807]": { + "$type": "EditorVisibilityComponent", + "Id": 11525365929370623807 + }, + "Component_[12334620273692642550]": { + "$type": "EditorLockComponent", + "Id": 12334620273692642550 + }, + "Component_[14389735759337977675]": { + "$type": "EditorPendingCompositionComponent", + "Id": 14389735759337977675 + }, + "Component_[16184381538555246534]": { + "$type": "AZ::Render::EditorMeshComponent", + "Id": 16184381538555246534, + "Controller": { + "Configuration": { + "ModelAsset": { + "assetId": { + "guid": "{E14975EF-E676-51A4-B826-3EF59CB645AA}", + "subId": 285127096 + }, + "assetHint": "testdata/objects/cube/cube.azmodel" + } + } + } + }, + "Component_[17962478023087084794]": { + "$type": "SelectionComponent", + "Id": 17962478023087084794 + }, + "Component_[18071675051915092508]": { + "$type": "EditorEntityIconComponent", + "Id": 18071675051915092508 + }, + "Component_[2115498007879087044]": { + "$type": "EditorInspectorComponent", + "Id": 2115498007879087044, + "ComponentOrderEntryArray": [ + { + "ComponentId": 399415038452606756 + }, + { + "ComponentId": 16184381538555246534, + "SortIndex": 1 + }, + { + "ComponentId": 7827190074535394331, + "SortIndex": 2 + } + ] + }, + "Component_[3518973002096080237]": { + "$type": "EditorOnlyEntityComponent", + "Id": 3518973002096080237 + }, + "Component_[399415038452606756]": { + "$type": "{27F1E1A1-8D9D-4C3B-BD3A-AFB9762449C0} TransformComponent", + "Id": 399415038452606756, + "Parent Entity": "ContainerEntity", + "Transform Data": { + "Translate": [ + 47.53014373779297, + -0.00018183141946792603, + 89.95755767822266 + ] + } + }, + "Component_[4564240319609068082]": { + "$type": "EditorEntitySortComponent", + "Id": 4564240319609068082 + }, + "Component_[7827190074535394331]": { + "$type": "EditorMaterialComponent", + "Id": 7827190074535394331, + "Controller": { + "Configuration": { + "materials": [ + { + "Key": { + "materialSlotStableId": 2418540911 + }, + "Value": { + "MaterialAsset": { + "assetId": { + "guid": "{A7F03135-ECAD-5440-99DB-E84ABA3D50DA}" + }, + "assetHint": "materials/presets/pbr/metal_iron_polished.azmaterial" + } + } + } + ] + } + } + }, + "Component_[8092226976542590265]": { + "$type": "EditorDisabledCompositionComponent", + "Id": 8092226976542590265 + } + } + }, + "Entity_[1050436298708]": { + "Id": "Entity_[1050436298708]", + "Name": "Entity1", + "Components": { + "Component_[11525365929370623807]": { + "$type": "EditorVisibilityComponent", + "Id": 11525365929370623807 + }, + "Component_[12334620273692642550]": { + "$type": "EditorLockComponent", + "Id": 12334620273692642550 + }, + "Component_[14389735759337977675]": { + "$type": "EditorPendingCompositionComponent", + "Id": 14389735759337977675 + }, + "Component_[16184381538555246534]": { + "$type": "AZ::Render::EditorMeshComponent", + "Id": 16184381538555246534, + "Controller": { + "Configuration": { + "ModelAsset": { + "assetId": { + "guid": "{E14975EF-E676-51A4-B826-3EF59CB645AA}", + "subId": 285127096 + }, + "assetHint": "testdata/objects/cube/cube.azmodel" + } + } + } + }, + "Component_[17962478023087084794]": { + "$type": "SelectionComponent", + "Id": 17962478023087084794 + }, + "Component_[18071675051915092508]": { + "$type": "EditorEntityIconComponent", + "Id": 18071675051915092508 + }, + "Component_[2115498007879087044]": { + "$type": "EditorInspectorComponent", + "Id": 2115498007879087044, + "ComponentOrderEntryArray": [ + { + "ComponentId": 399415038452606756 + }, + { + "ComponentId": 16184381538555246534, + "SortIndex": 1 + }, + { + "ComponentId": 7827190074535394331, + "SortIndex": 2 + } + ] + }, + "Component_[3518973002096080237]": { + "$type": "EditorOnlyEntityComponent", + "Id": 3518973002096080237 + }, + "Component_[399415038452606756]": { + "$type": "{27F1E1A1-8D9D-4C3B-BD3A-AFB9762449C0} TransformComponent", + "Id": 399415038452606756, + "Parent Entity": "ContainerEntity", + "Transform Data": { + "Translate": [ + 27.53014373779297, + -0.00018183141946792603, + 19.50924301147461 + ] + } + }, + "Component_[4564240319609068082]": { + "$type": "EditorEntitySortComponent", + "Id": 4564240319609068082 + }, + "Component_[7827190074535394331]": { + "$type": "EditorMaterialComponent", + "Id": 7827190074535394331, + "Controller": { + "Configuration": { + "materials": [ + { + "Key": { + "materialSlotStableId": 2418540911 + }, + "Value": { + "MaterialAsset": { + "assetId": { + "guid": "{A78EA2FC-688B-5E3A-A7F6-DB413D11D4CF}" + }, + "assetHint": "materials/presets/pbr/metal_chrome_matte.azmaterial" + } + } + } + ] + } + } + }, + "Component_[8092226976542590265]": { + "$type": "EditorDisabledCompositionComponent", + "Id": 8092226976542590265 + } + } + }, + "Entity_[1054731266004]": { + "Id": "Entity_[1054731266004]", + "Name": "Entity1", + "Components": { + "Component_[11525365929370623807]": { + "$type": "EditorVisibilityComponent", + "Id": 11525365929370623807 + }, + "Component_[12334620273692642550]": { + "$type": "EditorLockComponent", + "Id": 12334620273692642550 + }, + "Component_[14389735759337977675]": { + "$type": "EditorPendingCompositionComponent", + "Id": 14389735759337977675 + }, + "Component_[16184381538555246534]": { + "$type": "AZ::Render::EditorMeshComponent", + "Id": 16184381538555246534, + "Controller": { + "Configuration": { + "ModelAsset": { + "assetId": { + "guid": "{E14975EF-E676-51A4-B826-3EF59CB645AA}", + "subId": 285127096 + }, + "assetHint": "testdata/objects/cube/cube.azmodel" + } + } + } + }, + "Component_[17962478023087084794]": { + "$type": "SelectionComponent", + "Id": 17962478023087084794 + }, + "Component_[18071675051915092508]": { + "$type": "EditorEntityIconComponent", + "Id": 18071675051915092508 + }, + "Component_[2115498007879087044]": { + "$type": "EditorInspectorComponent", + "Id": 2115498007879087044, + "ComponentOrderEntryArray": [ + { + "ComponentId": 399415038452606756 + }, + { + "ComponentId": 16184381538555246534, + "SortIndex": 1 + }, + { + "ComponentId": 7827190074535394331, + "SortIndex": 2 + } + ] + }, + "Component_[3518973002096080237]": { + "$type": "EditorOnlyEntityComponent", + "Id": 3518973002096080237 + }, + "Component_[399415038452606756]": { + "$type": "{27F1E1A1-8D9D-4C3B-BD3A-AFB9762449C0} TransformComponent", + "Id": 399415038452606756, + "Parent Entity": "ContainerEntity", + "Transform Data": { + "Translate": [ + 7.530143737792969, + -0.00018183141946792603, + 59.873046875 + ] + } + }, + "Component_[4564240319609068082]": { + "$type": "EditorEntitySortComponent", + "Id": 4564240319609068082 + }, + "Component_[7827190074535394331]": { + "$type": "EditorMaterialComponent", + "Id": 7827190074535394331, + "Controller": { + "Configuration": { + "materials": [ + { + "Key": { + "materialSlotStableId": 2418540911 + }, + "Value": { + "MaterialAsset": { + "assetId": { + "guid": "{2AC06FA3-7670-542E-8996-DF346AFF1B61}" + }, + "assetHint": "materials/presets/pbr/metal_silver_polished.azmaterial" + } + } + } + ] + } + } + }, + "Component_[8092226976542590265]": { + "$type": "EditorDisabledCompositionComponent", + "Id": 8092226976542590265 + } + } + }, + "Entity_[1059026233300]": { + "Id": "Entity_[1059026233300]", + "Name": "Entity1", + "Components": { + "Component_[11525365929370623807]": { + "$type": "EditorVisibilityComponent", + "Id": 11525365929370623807 + }, + "Component_[12334620273692642550]": { + "$type": "EditorLockComponent", + "Id": 12334620273692642550 + }, + "Component_[14389735759337977675]": { + "$type": "EditorPendingCompositionComponent", + "Id": 14389735759337977675 + }, + "Component_[16184381538555246534]": { + "$type": "AZ::Render::EditorMeshComponent", + "Id": 16184381538555246534, + "Controller": { + "Configuration": { + "ModelAsset": { + "assetId": { + "guid": "{E14975EF-E676-51A4-B826-3EF59CB645AA}", + "subId": 285127096 + }, + "assetHint": "testdata/objects/cube/cube.azmodel" + } + } + } + }, + "Component_[17962478023087084794]": { + "$type": "SelectionComponent", + "Id": 17962478023087084794 + }, + "Component_[18071675051915092508]": { + "$type": "EditorEntityIconComponent", + "Id": 18071675051915092508 + }, + "Component_[2115498007879087044]": { + "$type": "EditorInspectorComponent", + "Id": 2115498007879087044, + "ComponentOrderEntryArray": [ + { + "ComponentId": 399415038452606756 + }, + { + "ComponentId": 16184381538555246534, + "SortIndex": 1 + }, + { + "ComponentId": 7827190074535394331, + "SortIndex": 2 + } + ] + }, + "Component_[3518973002096080237]": { + "$type": "EditorOnlyEntityComponent", + "Id": 3518973002096080237 + }, + "Component_[399415038452606756]": { + "$type": "{27F1E1A1-8D9D-4C3B-BD3A-AFB9762449C0} TransformComponent", + "Id": 399415038452606756, + "Parent Entity": "ContainerEntity", + "Transform Data": { + "Translate": [ + 7.530143737792969, + -0.00018183141946792603, + 99.43339538574219 + ] + } + }, + "Component_[4564240319609068082]": { + "$type": "EditorEntitySortComponent", + "Id": 4564240319609068082 + }, + "Component_[7827190074535394331]": { + "$type": "EditorMaterialComponent", + "Id": 7827190074535394331, + "Controller": { + "Configuration": { + "materials": [ + { + "Key": { + "materialSlotStableId": 2418540911 + }, + "Value": { + "MaterialAsset": { + "assetId": { + "guid": "{CDA13277-5EAB-5E2A-93F5-B7003597FBCE}" + }, + "assetHint": "materials/presets/pbr/metal_silver.azmaterial" + } + } + } + ] + } + } + }, + "Component_[8092226976542590265]": { + "$type": "EditorDisabledCompositionComponent", + "Id": 8092226976542590265 + } + } + }, + "Entity_[1063321200596]": { + "Id": "Entity_[1063321200596]", + "Name": "Entity1", + "Components": { + "Component_[11525365929370623807]": { + "$type": "EditorVisibilityComponent", + "Id": 11525365929370623807 + }, + "Component_[12334620273692642550]": { + "$type": "EditorLockComponent", + "Id": 12334620273692642550 + }, + "Component_[14389735759337977675]": { + "$type": "EditorPendingCompositionComponent", + "Id": 14389735759337977675 + }, + "Component_[16184381538555246534]": { + "$type": "AZ::Render::EditorMeshComponent", + "Id": 16184381538555246534, + "Controller": { + "Configuration": { + "ModelAsset": { + "assetId": { + "guid": "{E14975EF-E676-51A4-B826-3EF59CB645AA}", + "subId": 285127096 + }, + "assetHint": "testdata/objects/cube/cube.azmodel" + } + } + } + }, + "Component_[17962478023087084794]": { + "$type": "SelectionComponent", + "Id": 17962478023087084794 + }, + "Component_[18071675051915092508]": { + "$type": "EditorEntityIconComponent", + "Id": 18071675051915092508 + }, + "Component_[2115498007879087044]": { + "$type": "EditorInspectorComponent", + "Id": 2115498007879087044, + "ComponentOrderEntryArray": [ + { + "ComponentId": 399415038452606756 + }, + { + "ComponentId": 16184381538555246534, + "SortIndex": 1 + }, + { + "ComponentId": 7827190074535394331, + "SortIndex": 2 + } + ] + }, + "Component_[3518973002096080237]": { + "$type": "EditorOnlyEntityComponent", + "Id": 3518973002096080237 + }, + "Component_[399415038452606756]": { + "$type": "{27F1E1A1-8D9D-4C3B-BD3A-AFB9762449C0} TransformComponent", + "Id": 399415038452606756, + "Parent Entity": "ContainerEntity", + "Transform Data": { + "Translate": [ + 22.53014373779297, + -0.00018183141946792603, + 4.451573371887207 + ] + } + }, + "Component_[4564240319609068082]": { + "$type": "EditorEntitySortComponent", + "Id": 4564240319609068082 + }, + "Component_[7827190074535394331]": { + "$type": "EditorMaterialComponent", + "Id": 7827190074535394331, + "Controller": { + "Configuration": { + "materials": [ + { + "Key": { + "materialSlotStableId": 2418540911 + }, + "Value": { + "MaterialAsset": { + "assetId": { + "guid": "{AE350D9F-0000-526D-B49C-4303D687BB86}" + }, + "assetHint": "materials/presets/pbr/metal_brass_matte.azmaterial" + } + } + } + ] + } + } + }, + "Component_[8092226976542590265]": { + "$type": "EditorDisabledCompositionComponent", + "Id": 8092226976542590265 + } + } + }, + "Entity_[1067616167892]": { + "Id": "Entity_[1067616167892]", + "Name": "Entity1", + "Components": { + "Component_[11525365929370623807]": { + "$type": "EditorVisibilityComponent", + "Id": 11525365929370623807 + }, + "Component_[12334620273692642550]": { + "$type": "EditorLockComponent", + "Id": 12334620273692642550 + }, + "Component_[14389735759337977675]": { + "$type": "EditorPendingCompositionComponent", + "Id": 14389735759337977675 + }, + "Component_[16184381538555246534]": { + "$type": "AZ::Render::EditorMeshComponent", + "Id": 16184381538555246534, + "Controller": { + "Configuration": { + "ModelAsset": { + "assetId": { + "guid": "{E14975EF-E676-51A4-B826-3EF59CB645AA}", + "subId": 285127096 + }, + "assetHint": "testdata/objects/cube/cube.azmodel" + } + } + } + }, + "Component_[17962478023087084794]": { + "$type": "SelectionComponent", + "Id": 17962478023087084794 + }, + "Component_[18071675051915092508]": { + "$type": "EditorEntityIconComponent", + "Id": 18071675051915092508 + }, + "Component_[2115498007879087044]": { + "$type": "EditorInspectorComponent", + "Id": 2115498007879087044, + "ComponentOrderEntryArray": [ + { + "ComponentId": 399415038452606756 + }, + { + "ComponentId": 16184381538555246534, + "SortIndex": 1 + }, + { + "ComponentId": 7827190074535394331, + "SortIndex": 2 + } + ] + }, + "Component_[3518973002096080237]": { + "$type": "EditorOnlyEntityComponent", + "Id": 3518973002096080237 + }, + "Component_[399415038452606756]": { + "$type": "{27F1E1A1-8D9D-4C3B-BD3A-AFB9762449C0} TransformComponent", + "Id": 399415038452606756, + "Parent Entity": "ContainerEntity", + "Transform Data": { + "Translate": [ + 22.53014373779297, + -0.00018183141946792603, + 19.50924301147461 + ] + } + }, + "Component_[4564240319609068082]": { + "$type": "EditorEntitySortComponent", + "Id": 4564240319609068082 + }, + "Component_[7827190074535394331]": { + "$type": "EditorMaterialComponent", + "Id": 7827190074535394331, + "Controller": { + "Configuration": { + "materials": [ + { + "Key": { + "materialSlotStableId": 2418540911 + }, + "Value": { + "MaterialAsset": { + "assetId": { + "guid": "{AE350D9F-0000-526D-B49C-4303D687BB86}" + }, + "assetHint": "materials/presets/pbr/metal_brass_matte.azmaterial" + } + } + } + ] + } + } + }, + "Component_[8092226976542590265]": { + "$type": "EditorDisabledCompositionComponent", + "Id": 8092226976542590265 + } + } + }, + "Entity_[1071911135188]": { + "Id": "Entity_[1071911135188]", + "Name": "Entity1", + "Components": { + "Component_[11525365929370623807]": { + "$type": "EditorVisibilityComponent", + "Id": 11525365929370623807 + }, + "Component_[12334620273692642550]": { + "$type": "EditorLockComponent", + "Id": 12334620273692642550 + }, + "Component_[14389735759337977675]": { + "$type": "EditorPendingCompositionComponent", + "Id": 14389735759337977675 + }, + "Component_[16184381538555246534]": { + "$type": "AZ::Render::EditorMeshComponent", + "Id": 16184381538555246534, + "Controller": { + "Configuration": { + "ModelAsset": { + "assetId": { + "guid": "{E14975EF-E676-51A4-B826-3EF59CB645AA}", + "subId": 285127096 + }, + "assetHint": "testdata/objects/cube/cube.azmodel" + } + } + } + }, + "Component_[17962478023087084794]": { + "$type": "SelectionComponent", + "Id": 17962478023087084794 + }, + "Component_[18071675051915092508]": { + "$type": "EditorEntityIconComponent", + "Id": 18071675051915092508 + }, + "Component_[2115498007879087044]": { + "$type": "EditorInspectorComponent", + "Id": 2115498007879087044, + "ComponentOrderEntryArray": [ + { + "ComponentId": 399415038452606756 + }, + { + "ComponentId": 16184381538555246534, + "SortIndex": 1 + }, + { + "ComponentId": 7827190074535394331, + "SortIndex": 2 + } + ] + }, + "Component_[3518973002096080237]": { + "$type": "EditorOnlyEntityComponent", + "Id": 3518973002096080237 + }, + "Component_[399415038452606756]": { + "$type": "{27F1E1A1-8D9D-4C3B-BD3A-AFB9762449C0} TransformComponent", + "Id": 399415038452606756, + "Parent Entity": "ContainerEntity", + "Transform Data": { + "Translate": [ + -27.530563354492188, + -0.00018183141946792603, + 0.0 + ] + } + }, + "Component_[4564240319609068082]": { + "$type": "EditorEntitySortComponent", + "Id": 4564240319609068082 + }, + "Component_[7827190074535394331]": { + "$type": "EditorMaterialComponent", + "Id": 7827190074535394331, + "Controller": { + "Configuration": { + "materials": [ + { + "Key": { + "materialSlotStableId": 2418540911 + }, + "Value": { + "MaterialAsset": { + "assetId": { + "guid": "{CF5C7B01-4912-58AE-991A-F25251E505AC}" + }, + "assetHint": "materials/presets/pbr/metal_copper_polished.azmaterial" + } + } + } + ] + } + } + }, + "Component_[8092226976542590265]": { + "$type": "EditorDisabledCompositionComponent", + "Id": 8092226976542590265 + } + } + }, + "Entity_[1076206102484]": { + "Id": "Entity_[1076206102484]", + "Name": "Entity1", + "Components": { + "Component_[11525365929370623807]": { + "$type": "EditorVisibilityComponent", + "Id": 11525365929370623807 + }, + "Component_[12334620273692642550]": { + "$type": "EditorLockComponent", + "Id": 12334620273692642550 + }, + "Component_[14389735759337977675]": { + "$type": "EditorPendingCompositionComponent", + "Id": 14389735759337977675 + }, + "Component_[16184381538555246534]": { + "$type": "AZ::Render::EditorMeshComponent", + "Id": 16184381538555246534, + "Controller": { + "Configuration": { + "ModelAsset": { + "assetId": { + "guid": "{E14975EF-E676-51A4-B826-3EF59CB645AA}", + "subId": 285127096 + }, + "assetHint": "testdata/objects/cube/cube.azmodel" + } + } + } + }, + "Component_[17962478023087084794]": { + "$type": "SelectionComponent", + "Id": 17962478023087084794 + }, + "Component_[18071675051915092508]": { + "$type": "EditorEntityIconComponent", + "Id": 18071675051915092508 + }, + "Component_[2115498007879087044]": { + "$type": "EditorInspectorComponent", + "Id": 2115498007879087044, + "ComponentOrderEntryArray": [ + { + "ComponentId": 399415038452606756 + }, + { + "ComponentId": 16184381538555246534, + "SortIndex": 1 + }, + { + "ComponentId": 7827190074535394331, + "SortIndex": 2 + } + ] + }, + "Component_[3518973002096080237]": { + "$type": "EditorOnlyEntityComponent", + "Id": 3518973002096080237 + }, + "Component_[399415038452606756]": { + "$type": "{27F1E1A1-8D9D-4C3B-BD3A-AFB9762449C0} TransformComponent", + "Id": 399415038452606756, + "Parent Entity": "ContainerEntity", + "Transform Data": { + "Translate": [ + -37.53056335449219, + -0.00018183141946792603, + 4.451573371887207 + ] + } + }, + "Component_[4564240319609068082]": { + "$type": "EditorEntitySortComponent", + "Id": 4564240319609068082 + }, + "Component_[7827190074535394331]": { + "$type": "EditorMaterialComponent", + "Id": 7827190074535394331, + "Controller": { + "Configuration": { + "materials": [ + { + "Key": { + "materialSlotStableId": 2418540911 + }, + "Value": { + "MaterialAsset": { + "assetId": { + "guid": "{A78EA2FC-688B-5E3A-A7F6-DB413D11D4CF}" + }, + "assetHint": "materials/presets/pbr/metal_chrome_matte.azmaterial" + } + } + } + ] + } + } + }, + "Component_[8092226976542590265]": { + "$type": "EditorDisabledCompositionComponent", + "Id": 8092226976542590265 + } + } + }, + "Entity_[1080501069780]": { + "Id": "Entity_[1080501069780]", + "Name": "Entity1", + "Components": { + "Component_[11525365929370623807]": { + "$type": "EditorVisibilityComponent", + "Id": 11525365929370623807 + }, + "Component_[12334620273692642550]": { + "$type": "EditorLockComponent", + "Id": 12334620273692642550 + }, + "Component_[14389735759337977675]": { + "$type": "EditorPendingCompositionComponent", + "Id": 14389735759337977675 + }, + "Component_[16184381538555246534]": { + "$type": "AZ::Render::EditorMeshComponent", + "Id": 16184381538555246534, + "Controller": { + "Configuration": { + "ModelAsset": { + "assetId": { + "guid": "{E14975EF-E676-51A4-B826-3EF59CB645AA}", + "subId": 285127096 + }, + "assetHint": "testdata/objects/cube/cube.azmodel" + } + } + } + }, + "Component_[17962478023087084794]": { + "$type": "SelectionComponent", + "Id": 17962478023087084794 + }, + "Component_[18071675051915092508]": { + "$type": "EditorEntityIconComponent", + "Id": 18071675051915092508 + }, + "Component_[2115498007879087044]": { + "$type": "EditorInspectorComponent", + "Id": 2115498007879087044, + "ComponentOrderEntryArray": [ + { + "ComponentId": 399415038452606756 + }, + { + "ComponentId": 16184381538555246534, + "SortIndex": 1 + }, + { + "ComponentId": 7827190074535394331, + "SortIndex": 2 + } + ] + }, + "Component_[3518973002096080237]": { + "$type": "EditorOnlyEntityComponent", + "Id": 3518973002096080237 + }, + "Component_[399415038452606756]": { + "$type": "{27F1E1A1-8D9D-4C3B-BD3A-AFB9762449C0} TransformComponent", + "Id": 399415038452606756, + "Parent Entity": "ContainerEntity", + "Transform Data": { + "Translate": [ + -37.53056335449219, + -0.00018183141946792603, + 19.50924301147461 + ] + } + }, + "Component_[4564240319609068082]": { + "$type": "EditorEntitySortComponent", + "Id": 4564240319609068082 + }, + "Component_[7827190074535394331]": { + "$type": "EditorMaterialComponent", + "Id": 7827190074535394331, + "Controller": { + "Configuration": { + "materials": [ + { + "Key": { + "materialSlotStableId": 2418540911 + }, + "Value": { + "MaterialAsset": { + "assetId": { + "guid": "{A78EA2FC-688B-5E3A-A7F6-DB413D11D4CF}" + }, + "assetHint": "materials/presets/pbr/metal_chrome_matte.azmaterial" + } + } + } + ] + } + } + }, + "Component_[8092226976542590265]": { + "$type": "EditorDisabledCompositionComponent", + "Id": 8092226976542590265 + } + } + }, + "Entity_[1084796037076]": { + "Id": "Entity_[1084796037076]", + "Name": "Entity1", + "Components": { + "Component_[11525365929370623807]": { + "$type": "EditorVisibilityComponent", + "Id": 11525365929370623807 + }, + "Component_[12334620273692642550]": { + "$type": "EditorLockComponent", + "Id": 12334620273692642550 + }, + "Component_[14389735759337977675]": { + "$type": "EditorPendingCompositionComponent", + "Id": 14389735759337977675 + }, + "Component_[16184381538555246534]": { + "$type": "AZ::Render::EditorMeshComponent", + "Id": 16184381538555246534, + "Controller": { + "Configuration": { + "ModelAsset": { + "assetId": { + "guid": "{E14975EF-E676-51A4-B826-3EF59CB645AA}", + "subId": 285127096 + }, + "assetHint": "testdata/objects/cube/cube.azmodel" + } + } + } + }, + "Component_[17962478023087084794]": { + "$type": "SelectionComponent", + "Id": 17962478023087084794 + }, + "Component_[18071675051915092508]": { + "$type": "EditorEntityIconComponent", + "Id": 18071675051915092508 + }, + "Component_[2115498007879087044]": { + "$type": "EditorInspectorComponent", + "Id": 2115498007879087044, + "ComponentOrderEntryArray": [ + { + "ComponentId": 399415038452606756 + }, + { + "ComponentId": 16184381538555246534, + "SortIndex": 1 + }, + { + "ComponentId": 7827190074535394331, + "SortIndex": 2 + } + ] + }, + "Component_[3518973002096080237]": { + "$type": "EditorOnlyEntityComponent", + "Id": 3518973002096080237 + }, + "Component_[399415038452606756]": { + "$type": "{27F1E1A1-8D9D-4C3B-BD3A-AFB9762449C0} TransformComponent", + "Id": 399415038452606756, + "Parent Entity": "ContainerEntity", + "Transform Data": { + "Translate": [ + 32.53014373779297, + -0.00018183141946792603, + 54.618019104003906 + ] + } + }, + "Component_[4564240319609068082]": { + "$type": "EditorEntitySortComponent", + "Id": 4564240319609068082 + }, + "Component_[7827190074535394331]": { + "$type": "EditorMaterialComponent", + "Id": 7827190074535394331, + "Controller": { + "Configuration": { + "materials": [ + { + "Key": { + "materialSlotStableId": 2418540911 + }, + "Value": { + "MaterialAsset": { + "assetId": { + "guid": "{99976D73-6248-5D66-AD15-E8F52B0AFE36}" + }, + "assetHint": "materials/presets/pbr/metal_cobalt.azmaterial" + } + } + } + ] + } + } + }, + "Component_[8092226976542590265]": { + "$type": "EditorDisabledCompositionComponent", + "Id": 8092226976542590265 + } + } + }, + "Entity_[1089091004372]": { + "Id": "Entity_[1089091004372]", + "Name": "Entity1", + "Components": { + "Component_[11525365929370623807]": { + "$type": "EditorVisibilityComponent", + "Id": 11525365929370623807 + }, + "Component_[12334620273692642550]": { + "$type": "EditorLockComponent", + "Id": 12334620273692642550 + }, + "Component_[14389735759337977675]": { + "$type": "EditorPendingCompositionComponent", + "Id": 14389735759337977675 + }, + "Component_[16184381538555246534]": { + "$type": "AZ::Render::EditorMeshComponent", + "Id": 16184381538555246534, + "Controller": { + "Configuration": { + "ModelAsset": { + "assetId": { + "guid": "{E14975EF-E676-51A4-B826-3EF59CB645AA}", + "subId": 285127096 + }, + "assetHint": "testdata/objects/cube/cube.azmodel" + } + } + } + }, + "Component_[17962478023087084794]": { + "$type": "SelectionComponent", + "Id": 17962478023087084794 + }, + "Component_[18071675051915092508]": { + "$type": "EditorEntityIconComponent", + "Id": 18071675051915092508 + }, + "Component_[2115498007879087044]": { + "$type": "EditorInspectorComponent", + "Id": 2115498007879087044, + "ComponentOrderEntryArray": [ + { + "ComponentId": 399415038452606756 + }, + { + "ComponentId": 16184381538555246534, + "SortIndex": 1 + }, + { + "ComponentId": 7827190074535394331, + "SortIndex": 2 + } + ] + }, + "Component_[3518973002096080237]": { + "$type": "EditorOnlyEntityComponent", + "Id": 3518973002096080237 + }, + "Component_[399415038452606756]": { + "$type": "{27F1E1A1-8D9D-4C3B-BD3A-AFB9762449C0} TransformComponent", + "Id": 399415038452606756, + "Parent Entity": "ContainerEntity", + "Transform Data": { + "Translate": [ + -17.530563354492188, + -0.00018183141946792603, + 49.593753814697266 + ] + } + }, + "Component_[4564240319609068082]": { + "$type": "EditorEntitySortComponent", + "Id": 4564240319609068082 + }, + "Component_[7827190074535394331]": { + "$type": "EditorMaterialComponent", + "Id": 7827190074535394331, + "Controller": { + "Configuration": { + "materials": [ + { + "Key": { + "materialSlotStableId": 2418540911 + }, + "Value": { + "MaterialAsset": { + "assetId": { + "guid": "{970148AC-7258-5EC8-9CE7-F4EF93164D93}" + }, + "assetHint": "materials/presets/pbr/metal_iron_matte.azmaterial" + } + } + } + ] + } + } + }, + "Component_[8092226976542590265]": { + "$type": "EditorDisabledCompositionComponent", + "Id": 8092226976542590265 + } + } + }, + "Entity_[1093385971668]": { + "Id": "Entity_[1093385971668]", + "Name": "Entity1", + "Components": { + "Component_[11525365929370623807]": { + "$type": "EditorVisibilityComponent", + "Id": 11525365929370623807 + }, + "Component_[12334620273692642550]": { + "$type": "EditorLockComponent", + "Id": 12334620273692642550 + }, + "Component_[14389735759337977675]": { + "$type": "EditorPendingCompositionComponent", + "Id": 14389735759337977675 + }, + "Component_[16184381538555246534]": { + "$type": "AZ::Render::EditorMeshComponent", + "Id": 16184381538555246534, + "Controller": { + "Configuration": { + "ModelAsset": { + "assetId": { + "guid": "{E14975EF-E676-51A4-B826-3EF59CB645AA}", + "subId": 285127096 + }, + "assetHint": "testdata/objects/cube/cube.azmodel" + } + } + } + }, + "Component_[17962478023087084794]": { + "$type": "SelectionComponent", + "Id": 17962478023087084794 + }, + "Component_[18071675051915092508]": { + "$type": "EditorEntityIconComponent", + "Id": 18071675051915092508 + }, + "Component_[2115498007879087044]": { + "$type": "EditorInspectorComponent", + "Id": 2115498007879087044, + "ComponentOrderEntryArray": [ + { + "ComponentId": 399415038452606756 + }, + { + "ComponentId": 16184381538555246534, + "SortIndex": 1 + }, + { + "ComponentId": 7827190074535394331, + "SortIndex": 2 + } + ] + }, + "Component_[3518973002096080237]": { + "$type": "EditorOnlyEntityComponent", + "Id": 3518973002096080237 + }, + "Component_[399415038452606756]": { + "$type": "{27F1E1A1-8D9D-4C3B-BD3A-AFB9762449C0} TransformComponent", + "Id": 399415038452606756, + "Parent Entity": "ContainerEntity", + "Transform Data": { + "Translate": [ + -37.53056335449219, + -0.00018183141946792603, + 74.93071746826172 + ] + } + }, + "Component_[4564240319609068082]": { + "$type": "EditorEntitySortComponent", + "Id": 4564240319609068082 + }, + "Component_[7827190074535394331]": { + "$type": "EditorMaterialComponent", + "Id": 7827190074535394331, + "Controller": { + "Configuration": { + "materials": [ + { + "Key": { + "materialSlotStableId": 2418540911 + }, + "Value": { + "MaterialAsset": { + "assetId": { + "guid": "{CAF50181-3384-5DF2-9304-C6E48E83C72D}" + }, + "assetHint": "materials/presets/pbr/metal_chrome_polished.azmaterial" + } + } + } + ] + } + } + }, + "Component_[8092226976542590265]": { + "$type": "EditorDisabledCompositionComponent", + "Id": 8092226976542590265 + } + } + }, + "Entity_[1097680938964]": { + "Id": "Entity_[1097680938964]", + "Name": "Entity1", + "Components": { + "Component_[11525365929370623807]": { + "$type": "EditorVisibilityComponent", + "Id": 11525365929370623807 + }, + "Component_[12334620273692642550]": { + "$type": "EditorLockComponent", + "Id": 12334620273692642550 + }, + "Component_[14389735759337977675]": { + "$type": "EditorPendingCompositionComponent", + "Id": 14389735759337977675 + }, + "Component_[16184381538555246534]": { + "$type": "AZ::Render::EditorMeshComponent", + "Id": 16184381538555246534, + "Controller": { + "Configuration": { + "ModelAsset": { + "assetId": { + "guid": "{E14975EF-E676-51A4-B826-3EF59CB645AA}", + "subId": 285127096 + }, + "assetHint": "testdata/objects/cube/cube.azmodel" + } + } + } + }, + "Component_[17962478023087084794]": { + "$type": "SelectionComponent", + "Id": 17962478023087084794 + }, + "Component_[18071675051915092508]": { + "$type": "EditorEntityIconComponent", + "Id": 18071675051915092508 + }, + "Component_[2115498007879087044]": { + "$type": "EditorInspectorComponent", + "Id": 2115498007879087044, + "ComponentOrderEntryArray": [ + { + "ComponentId": 399415038452606756 + }, + { + "ComponentId": 16184381538555246534, + "SortIndex": 1 + }, + { + "ComponentId": 7827190074535394331, + "SortIndex": 2 + } + ] + }, + "Component_[3518973002096080237]": { + "$type": "EditorOnlyEntityComponent", + "Id": 3518973002096080237 + }, + "Component_[399415038452606756]": { + "$type": "{27F1E1A1-8D9D-4C3B-BD3A-AFB9762449C0} TransformComponent", + "Id": 399415038452606756, + "Parent Entity": "ContainerEntity", + "Transform Data": { + "Translate": [ + -27.530563354492188, + -0.00018183141946792603, + 99.43339538574219 + ] + } + }, + "Component_[4564240319609068082]": { + "$type": "EditorEntitySortComponent", + "Id": 4564240319609068082 + }, + "Component_[7827190074535394331]": { + "$type": "EditorMaterialComponent", + "Id": 7827190074535394331, + "Controller": { + "Configuration": { + "materials": [ + { + "Key": { + "materialSlotStableId": 2418540911 + }, + "Value": { + "MaterialAsset": { + "assetId": { + "guid": "{E621C5BF-B8E1-55F0-A791-EC960F2FA46F}" + }, + "assetHint": "materials/presets/pbr/metal_copper.azmaterial" + } + } + } + ] + } + } + }, + "Component_[8092226976542590265]": { + "$type": "EditorDisabledCompositionComponent", + "Id": 8092226976542590265 + } + } + }, + "Entity_[1101975906260]": { + "Id": "Entity_[1101975906260]", + "Name": "Entity1", + "Components": { + "Component_[1057179753323467068]": { + "$type": "EditorMaterialComponent", + "Id": 1057179753323467068, + "Controller": { + "Configuration": { + "materials": [ + { + "Key": { + "materialSlotStableId": 2418540911 + }, + "Value": { + "MaterialAsset": { + "assetId": { + "guid": "{721188E0-B7CC-5D06-8D5D-39AF8ABF2EF9}" + }, + "assetHint": "materials/presets/pbr/metal_titanium.azmaterial" + } + } + } + ] + } + } + }, + "Component_[11525365929370623807]": { + "$type": "EditorVisibilityComponent", + "Id": 11525365929370623807 + }, + "Component_[12334620273692642550]": { + "$type": "EditorLockComponent", + "Id": 12334620273692642550 + }, + "Component_[14389735759337977675]": { + "$type": "EditorPendingCompositionComponent", + "Id": 14389735759337977675 + }, + "Component_[16184381538555246534]": { + "$type": "AZ::Render::EditorMeshComponent", + "Id": 16184381538555246534, + "Controller": { + "Configuration": { + "ModelAsset": { + "assetId": { + "guid": "{E14975EF-E676-51A4-B826-3EF59CB645AA}", + "subId": 285127096 + }, + "assetHint": "testdata/objects/cube/cube.azmodel" + } + } + } + }, + "Component_[17962478023087084794]": { + "$type": "SelectionComponent", + "Id": 17962478023087084794 + }, + "Component_[18071675051915092508]": { + "$type": "EditorEntityIconComponent", + "Id": 18071675051915092508 + }, + "Component_[2115498007879087044]": { + "$type": "EditorInspectorComponent", + "Id": 2115498007879087044, + "ComponentOrderEntryArray": [ + { + "ComponentId": 399415038452606756 + }, + { + "ComponentId": 16184381538555246534, + "SortIndex": 1 + }, + { + "ComponentId": 1057179753323467068, + "SortIndex": 2 + } + ] + }, + "Component_[3518973002096080237]": { + "$type": "EditorOnlyEntityComponent", + "Id": 3518973002096080237 + }, + "Component_[399415038452606756]": { + "$type": "{27F1E1A1-8D9D-4C3B-BD3A-AFB9762449C0} TransformComponent", + "Id": 399415038452606756, + "Parent Entity": "ContainerEntity", + "Transform Data": { + "Translate": [ + 12.530143737792969, + -0.00018183141946792603, + 84.40655517578125 + ] + } + }, + "Component_[4564240319609068082]": { + "$type": "EditorEntitySortComponent", + "Id": 4564240319609068082 + }, + "Component_[8092226976542590265]": { + "$type": "EditorDisabledCompositionComponent", + "Id": 8092226976542590265 + } + } + }, + "Entity_[1106270873556]": { + "Id": "Entity_[1106270873556]", + "Name": "Entity1", + "Components": { + "Component_[11525365929370623807]": { + "$type": "EditorVisibilityComponent", + "Id": 11525365929370623807 + }, + "Component_[12334620273692642550]": { + "$type": "EditorLockComponent", + "Id": 12334620273692642550 + }, + "Component_[14389735759337977675]": { + "$type": "EditorPendingCompositionComponent", + "Id": 14389735759337977675 + }, + "Component_[16184381538555246534]": { + "$type": "AZ::Render::EditorMeshComponent", + "Id": 16184381538555246534, + "Controller": { + "Configuration": { + "ModelAsset": { + "assetId": { + "guid": "{E14975EF-E676-51A4-B826-3EF59CB645AA}", + "subId": 285127096 + }, + "assetHint": "testdata/objects/cube/cube.azmodel" + } + } + } + }, + "Component_[17962478023087084794]": { + "$type": "SelectionComponent", + "Id": 17962478023087084794 + }, + "Component_[18071675051915092508]": { + "$type": "EditorEntityIconComponent", + "Id": 18071675051915092508 + }, + "Component_[2115498007879087044]": { + "$type": "EditorInspectorComponent", + "Id": 2115498007879087044, + "ComponentOrderEntryArray": [ + { + "ComponentId": 399415038452606756 + }, + { + "ComponentId": 16184381538555246534, + "SortIndex": 1 + }, + { + "ComponentId": 7827190074535394331, + "SortIndex": 2 + } + ] + }, + "Component_[3518973002096080237]": { + "$type": "EditorOnlyEntityComponent", + "Id": 3518973002096080237 + }, + "Component_[399415038452606756]": { + "$type": "{27F1E1A1-8D9D-4C3B-BD3A-AFB9762449C0} TransformComponent", + "Id": 399415038452606756, + "Parent Entity": "ContainerEntity", + "Transform Data": { + "Translate": [ + -37.53056335449219, + -0.00018183141946792603, + 79.38228607177734 + ] + } + }, + "Component_[4564240319609068082]": { + "$type": "EditorEntitySortComponent", + "Id": 4564240319609068082 + }, + "Component_[7827190074535394331]": { + "$type": "EditorMaterialComponent", + "Id": 7827190074535394331, + "Controller": { + "Configuration": { + "materials": [ + { + "Key": { + "materialSlotStableId": 2418540911 + }, + "Value": { + "MaterialAsset": { + "assetId": { + "guid": "{A78EA2FC-688B-5E3A-A7F6-DB413D11D4CF}" + }, + "assetHint": "materials/presets/pbr/metal_chrome_matte.azmaterial" + } + } + } + ] + } + } + }, + "Component_[8092226976542590265]": { + "$type": "EditorDisabledCompositionComponent", + "Id": 8092226976542590265 + } + } + }, + "Entity_[1110565840852]": { + "Id": "Entity_[1110565840852]", + "Name": "Entity1", + "Components": { + "Component_[11525365929370623807]": { + "$type": "EditorVisibilityComponent", + "Id": 11525365929370623807 + }, + "Component_[12334620273692642550]": { + "$type": "EditorLockComponent", + "Id": 12334620273692642550 + }, + "Component_[14389735759337977675]": { + "$type": "EditorPendingCompositionComponent", + "Id": 14389735759337977675 + }, + "Component_[16184381538555246534]": { + "$type": "AZ::Render::EditorMeshComponent", + "Id": 16184381538555246534, + "Controller": { + "Configuration": { + "ModelAsset": { + "assetId": { + "guid": "{E14975EF-E676-51A4-B826-3EF59CB645AA}", + "subId": 285127096 + }, + "assetHint": "testdata/objects/cube/cube.azmodel" + } + } + } + }, + "Component_[17962478023087084794]": { + "$type": "SelectionComponent", + "Id": 17962478023087084794 + }, + "Component_[18071675051915092508]": { + "$type": "EditorEntityIconComponent", + "Id": 18071675051915092508 + }, + "Component_[2115498007879087044]": { + "$type": "EditorInspectorComponent", + "Id": 2115498007879087044, + "ComponentOrderEntryArray": [ + { + "ComponentId": 399415038452606756 + }, + { + "ComponentId": 16184381538555246534, + "SortIndex": 1 + }, + { + "ComponentId": 7827190074535394331, + "SortIndex": 2 + } + ] + }, + "Component_[3518973002096080237]": { + "$type": "EditorOnlyEntityComponent", + "Id": 3518973002096080237 + }, + "Component_[399415038452606756]": { + "$type": "{27F1E1A1-8D9D-4C3B-BD3A-AFB9762449C0} TransformComponent", + "Id": 399415038452606756, + "Parent Entity": "ContainerEntity", + "Transform Data": { + "Translate": [ + -32.53056335449219, + -0.00018183141946792603, + 0.0 + ] + } + }, + "Component_[4564240319609068082]": { + "$type": "EditorEntitySortComponent", + "Id": 4564240319609068082 + }, + "Component_[7827190074535394331]": { + "$type": "EditorMaterialComponent", + "Id": 7827190074535394331, + "Controller": { + "Configuration": { + "materials": [ + { + "Key": { + "materialSlotStableId": 2418540911 + }, + "Value": { + "MaterialAsset": { + "assetId": { + "guid": "{93DF55AE-8D1B-5AD1-A609-05F1BD9F6EA0}" + }, + "assetHint": "materials/presets/pbr/metal_cobalt_polished.azmaterial" + } + } + } + ] + } + } + }, + "Component_[8092226976542590265]": { + "$type": "EditorDisabledCompositionComponent", + "Id": 8092226976542590265 + } + } + }, + "Entity_[1114860808148]": { + "Id": "Entity_[1114860808148]", + "Name": "Entity1", + "Components": { + "Component_[11525365929370623807]": { + "$type": "EditorVisibilityComponent", + "Id": 11525365929370623807 + }, + "Component_[12334620273692642550]": { + "$type": "EditorLockComponent", + "Id": 12334620273692642550 + }, + "Component_[14389735759337977675]": { + "$type": "EditorPendingCompositionComponent", + "Id": 14389735759337977675 + }, + "Component_[16184381538555246534]": { + "$type": "AZ::Render::EditorMeshComponent", + "Id": 16184381538555246534, + "Controller": { + "Configuration": { + "ModelAsset": { + "assetId": { + "guid": "{E14975EF-E676-51A4-B826-3EF59CB645AA}", + "subId": 285127096 + }, + "assetHint": "testdata/objects/cube/cube.azmodel" + } + } + } + }, + "Component_[17962478023087084794]": { + "$type": "SelectionComponent", + "Id": 17962478023087084794 + }, + "Component_[18071675051915092508]": { + "$type": "EditorEntityIconComponent", + "Id": 18071675051915092508 + }, + "Component_[2115498007879087044]": { + "$type": "EditorInspectorComponent", + "Id": 2115498007879087044, + "ComponentOrderEntryArray": [ + { + "ComponentId": 399415038452606756 + }, + { + "ComponentId": 16184381538555246534, + "SortIndex": 1 + }, + { + "ComponentId": 7827190074535394331, + "SortIndex": 2 + } + ] + }, + "Component_[3518973002096080237]": { + "$type": "EditorOnlyEntityComponent", + "Id": 3518973002096080237 + }, + "Component_[399415038452606756]": { + "$type": "{27F1E1A1-8D9D-4C3B-BD3A-AFB9762449C0} TransformComponent", + "Id": 399415038452606756, + "Parent Entity": "ContainerEntity", + "Transform Data": { + "Translate": [ + -47.53056335449219, + -0.00018183141946792603, + 69.34888458251953 + ] + } + }, + "Component_[4564240319609068082]": { + "$type": "EditorEntitySortComponent", + "Id": 4564240319609068082 + }, + "Component_[7827190074535394331]": { + "$type": "EditorMaterialComponent", + "Id": 7827190074535394331, + "Controller": { + "Configuration": { + "materials": [ + { + "Key": { + "materialSlotStableId": 2418540911 + }, + "Value": { + "MaterialAsset": { + "assetId": { + "guid": "{94CF2BD7-7D09-5577-B1D8-3FF85B15E127}" + }, + "assetHint": "materials/presets/pbr/metal_aluminum.azmaterial" + } + } + } + ] + } + } + }, + "Component_[8092226976542590265]": { + "$type": "EditorDisabledCompositionComponent", + "Id": 8092226976542590265 + } + } + }, + "Entity_[1119155775444]": { + "Id": "Entity_[1119155775444]", + "Name": "Entity1", + "Components": { + "Component_[11525365929370623807]": { + "$type": "EditorVisibilityComponent", + "Id": 11525365929370623807 + }, + "Component_[12334620273692642550]": { + "$type": "EditorLockComponent", + "Id": 12334620273692642550 + }, + "Component_[14389735759337977675]": { + "$type": "EditorPendingCompositionComponent", + "Id": 14389735759337977675 + }, + "Component_[16184381538555246534]": { + "$type": "AZ::Render::EditorMeshComponent", + "Id": 16184381538555246534, + "Controller": { + "Configuration": { + "ModelAsset": { + "assetId": { + "guid": "{E14975EF-E676-51A4-B826-3EF59CB645AA}", + "subId": 285127096 + }, + "assetHint": "testdata/objects/cube/cube.azmodel" + } + } + } + }, + "Component_[17962478023087084794]": { + "$type": "SelectionComponent", + "Id": 17962478023087084794 + }, + "Component_[18071675051915092508]": { + "$type": "EditorEntityIconComponent", + "Id": 18071675051915092508 + }, + "Component_[2115498007879087044]": { + "$type": "EditorInspectorComponent", + "Id": 2115498007879087044, + "ComponentOrderEntryArray": [ + { + "ComponentId": 399415038452606756 + }, + { + "ComponentId": 16184381538555246534, + "SortIndex": 1 + }, + { + "ComponentId": 7827190074535394331, + "SortIndex": 2 + } + ] + }, + "Component_[3518973002096080237]": { + "$type": "EditorOnlyEntityComponent", + "Id": 3518973002096080237 + }, + "Component_[399415038452606756]": { + "$type": "{27F1E1A1-8D9D-4C3B-BD3A-AFB9762449C0} TransformComponent", + "Id": 399415038452606756, + "Parent Entity": "ContainerEntity", + "Transform Data": { + "Translate": [ + -27.530563354492188, + -0.00018183141946792603, + 54.618019104003906 + ] + } + }, + "Component_[4564240319609068082]": { + "$type": "EditorEntitySortComponent", + "Id": 4564240319609068082 + }, + "Component_[7827190074535394331]": { + "$type": "EditorMaterialComponent", + "Id": 7827190074535394331, + "Controller": { + "Configuration": { + "materials": [ + { + "Key": { + "materialSlotStableId": 2418540911 + }, + "Value": { + "MaterialAsset": { + "assetId": { + "guid": "{E621C5BF-B8E1-55F0-A791-EC960F2FA46F}" + }, + "assetHint": "materials/presets/pbr/metal_copper.azmaterial" + } + } + } + ] + } + } + }, + "Component_[8092226976542590265]": { + "$type": "EditorDisabledCompositionComponent", + "Id": 8092226976542590265 + } + } + }, + "Entity_[1123450742740]": { + "Id": "Entity_[1123450742740]", + "Name": "Entity1", + "Components": { + "Component_[11525365929370623807]": { + "$type": "EditorVisibilityComponent", + "Id": 11525365929370623807 + }, + "Component_[12334620273692642550]": { + "$type": "EditorLockComponent", + "Id": 12334620273692642550 + }, + "Component_[14389735759337977675]": { + "$type": "EditorPendingCompositionComponent", + "Id": 14389735759337977675 + }, + "Component_[16184381538555246534]": { + "$type": "AZ::Render::EditorMeshComponent", + "Id": 16184381538555246534, + "Controller": { + "Configuration": { + "ModelAsset": { + "assetId": { + "guid": "{E14975EF-E676-51A4-B826-3EF59CB645AA}", + "subId": 285127096 + }, + "assetHint": "testdata/objects/cube/cube.azmodel" + } + } + } + }, + "Component_[17962478023087084794]": { + "$type": "SelectionComponent", + "Id": 17962478023087084794 + }, + "Component_[18071675051915092508]": { + "$type": "EditorEntityIconComponent", + "Id": 18071675051915092508 + }, + "Component_[2115498007879087044]": { + "$type": "EditorInspectorComponent", + "Id": 2115498007879087044, + "ComponentOrderEntryArray": [ + { + "ComponentId": 399415038452606756 + }, + { + "ComponentId": 16184381538555246534, + "SortIndex": 1 + }, + { + "ComponentId": 7827190074535394331, + "SortIndex": 2 + } + ] + }, + "Component_[3518973002096080237]": { + "$type": "EditorOnlyEntityComponent", + "Id": 3518973002096080237 + }, + "Component_[399415038452606756]": { + "$type": "{27F1E1A1-8D9D-4C3B-BD3A-AFB9762449C0} TransformComponent", + "Id": 399415038452606756, + "Parent Entity": "ContainerEntity", + "Transform Data": { + "Translate": [ + 22.53014373779297, + -0.00018183141946792603, + 94.40913391113281 + ] + } + }, + "Component_[4564240319609068082]": { + "$type": "EditorEntitySortComponent", + "Id": 4564240319609068082 + }, + "Component_[7827190074535394331]": { + "$type": "EditorMaterialComponent", + "Id": 7827190074535394331, + "Controller": { + "Configuration": { + "materials": [ + { + "Key": { + "materialSlotStableId": 2418540911 + }, + "Value": { + "MaterialAsset": { + "assetId": { + "guid": "{AE350D9F-0000-526D-B49C-4303D687BB86}" + }, + "assetHint": "materials/presets/pbr/metal_brass_matte.azmaterial" + } + } + } + ] + } + } + }, + "Component_[8092226976542590265]": { + "$type": "EditorDisabledCompositionComponent", + "Id": 8092226976542590265 + } + } + }, + "Entity_[1127745710036]": { + "Id": "Entity_[1127745710036]", + "Name": "Entity1", + "Components": { + "Component_[1057179753323467068]": { + "$type": "EditorMaterialComponent", + "Id": 1057179753323467068, + "Controller": { + "Configuration": { + "materials": [ + { + "Key": { + "materialSlotStableId": 2418540911 + }, + "Value": { + "MaterialAsset": { + "assetId": { + "guid": "{A3F3CD98-1634-5542-AD5A-78E91BE21AE9}" + }, + "assetHint": "materials/presets/pbr/metal_titanium_matte.azmaterial" + } + } + } + ] + } + } + }, + "Component_[11525365929370623807]": { + "$type": "EditorVisibilityComponent", + "Id": 11525365929370623807 + }, + "Component_[12334620273692642550]": { + "$type": "EditorLockComponent", + "Id": 12334620273692642550 + }, + "Component_[14389735759337977675]": { + "$type": "EditorPendingCompositionComponent", + "Id": 14389735759337977675 + }, + "Component_[16184381538555246534]": { + "$type": "AZ::Render::EditorMeshComponent", + "Id": 16184381538555246534, + "Controller": { + "Configuration": { + "ModelAsset": { + "assetId": { + "guid": "{E14975EF-E676-51A4-B826-3EF59CB645AA}", + "subId": 285127096 + }, + "assetHint": "testdata/objects/cube/cube.azmodel" + } + } + } + }, + "Component_[17962478023087084794]": { + "$type": "SelectionComponent", + "Id": 17962478023087084794 + }, + "Component_[18071675051915092508]": { + "$type": "EditorEntityIconComponent", + "Id": 18071675051915092508 + }, + "Component_[2115498007879087044]": { + "$type": "EditorInspectorComponent", + "Id": 2115498007879087044, + "ComponentOrderEntryArray": [ + { + "ComponentId": 399415038452606756 + }, + { + "ComponentId": 16184381538555246534, + "SortIndex": 1 + }, + { + "ComponentId": 1057179753323467068, + "SortIndex": 2 + } + ] + }, + "Component_[3518973002096080237]": { + "$type": "EditorOnlyEntityComponent", + "Id": 3518973002096080237 + }, + "Component_[399415038452606756]": { + "$type": "{27F1E1A1-8D9D-4C3B-BD3A-AFB9762449C0} TransformComponent", + "Id": 399415038452606756, + "Parent Entity": "ContainerEntity", + "Transform Data": { + "Translate": [ + 12.530143737792969, + -0.00018183141946792603, + 19.50924301147461 + ] + } + }, + "Component_[4564240319609068082]": { + "$type": "EditorEntitySortComponent", + "Id": 4564240319609068082 + }, + "Component_[8092226976542590265]": { + "$type": "EditorDisabledCompositionComponent", + "Id": 8092226976542590265 + } + } + }, + "Entity_[1132040677332]": { + "Id": "Entity_[1132040677332]", + "Name": "Entity1", + "Components": { + "Component_[11525365929370623807]": { + "$type": "EditorVisibilityComponent", + "Id": 11525365929370623807 + }, + "Component_[12334620273692642550]": { + "$type": "EditorLockComponent", + "Id": 12334620273692642550 + }, + "Component_[14389735759337977675]": { + "$type": "EditorPendingCompositionComponent", + "Id": 14389735759337977675 + }, + "Component_[16184381538555246534]": { + "$type": "AZ::Render::EditorMeshComponent", + "Id": 16184381538555246534, + "Controller": { + "Configuration": { + "ModelAsset": { + "assetId": { + "guid": "{E14975EF-E676-51A4-B826-3EF59CB645AA}", + "subId": 285127096 + }, + "assetHint": "testdata/objects/cube/cube.azmodel" + } + } + } + }, + "Component_[17962478023087084794]": { + "$type": "SelectionComponent", + "Id": 17962478023087084794 + }, + "Component_[18071675051915092508]": { + "$type": "EditorEntityIconComponent", + "Id": 18071675051915092508 + }, + "Component_[2115498007879087044]": { + "$type": "EditorInspectorComponent", + "Id": 2115498007879087044, + "ComponentOrderEntryArray": [ + { + "ComponentId": 399415038452606756 + }, + { + "ComponentId": 16184381538555246534, + "SortIndex": 1 + }, + { + "ComponentId": 7827190074535394331, + "SortIndex": 2 + } + ] + }, + "Component_[3518973002096080237]": { + "$type": "EditorOnlyEntityComponent", + "Id": 3518973002096080237 + }, + "Component_[399415038452606756]": { + "$type": "{27F1E1A1-8D9D-4C3B-BD3A-AFB9762449C0} TransformComponent", + "Id": 399415038452606756, + "Parent Entity": "ContainerEntity", + "Transform Data": { + "Translate": [ + 2.5301437377929688, + -0.00018183141946792603, + 39.56034851074219 + ] + } + }, + "Component_[4564240319609068082]": { + "$type": "EditorEntitySortComponent", + "Id": 4564240319609068082 + }, + "Component_[7827190074535394331]": { + "$type": "EditorMaterialComponent", + "Id": 7827190074535394331, + "Controller": { + "Configuration": { + "materials": [ + { + "Key": { + "materialSlotStableId": 2418540911 + }, + "Value": { + "MaterialAsset": { + "assetId": { + "guid": "{E23FC75B-4142-55F1-B9AE-884826E7EB23}" + }, + "assetHint": "materials/presets/pbr/metal_platinum.azmaterial" + } + } + } + ] + } + } + }, + "Component_[8092226976542590265]": { + "$type": "EditorDisabledCompositionComponent", + "Id": 8092226976542590265 + } + } + }, + "Entity_[1136335644628]": { + "Id": "Entity_[1136335644628]", + "Name": "Entity1", + "Components": { + "Component_[11525365929370623807]": { + "$type": "EditorVisibilityComponent", + "Id": 11525365929370623807 + }, + "Component_[12334620273692642550]": { + "$type": "EditorLockComponent", + "Id": 12334620273692642550 + }, + "Component_[14389735759337977675]": { + "$type": "EditorPendingCompositionComponent", + "Id": 14389735759337977675 + }, + "Component_[16184381538555246534]": { + "$type": "AZ::Render::EditorMeshComponent", + "Id": 16184381538555246534, + "Controller": { + "Configuration": { + "ModelAsset": { + "assetId": { + "guid": "{E14975EF-E676-51A4-B826-3EF59CB645AA}", + "subId": 285127096 + }, + "assetHint": "testdata/objects/cube/cube.azmodel" + } + } + } + }, + "Component_[17962478023087084794]": { + "$type": "SelectionComponent", + "Id": 17962478023087084794 + }, + "Component_[18071675051915092508]": { + "$type": "EditorEntityIconComponent", + "Id": 18071675051915092508 + }, + "Component_[2115498007879087044]": { + "$type": "EditorInspectorComponent", + "Id": 2115498007879087044, + "ComponentOrderEntryArray": [ + { + "ComponentId": 399415038452606756 + }, + { + "ComponentId": 16184381538555246534, + "SortIndex": 1 + }, + { + "ComponentId": 7827190074535394331, + "SortIndex": 2 + } + ] + }, + "Component_[3518973002096080237]": { + "$type": "EditorOnlyEntityComponent", + "Id": 3518973002096080237 + }, + "Component_[399415038452606756]": { + "$type": "{27F1E1A1-8D9D-4C3B-BD3A-AFB9762449C0} TransformComponent", + "Id": 399415038452606756, + "Parent Entity": "ContainerEntity", + "Transform Data": { + "Translate": [ + -2.5305633544921875, + -0.00018183141946792603, + 74.93071746826172 + ] + } + }, + "Component_[4564240319609068082]": { + "$type": "EditorEntitySortComponent", + "Id": 4564240319609068082 + }, + "Component_[7827190074535394331]": { + "$type": "EditorMaterialComponent", + "Id": 7827190074535394331, + "Controller": { + "Configuration": { + "materials": [ + { + "Key": { + "materialSlotStableId": 2418540911 + }, + "Value": { + "MaterialAsset": { + "assetId": { + "guid": "{D0E9960A-4B31-5136-BAC6-5482B203D3B4}" + }, + "assetHint": "materials/presets/pbr/metal_palladium_polished.azmaterial" + } + } + } + ] + } + } + }, + "Component_[8092226976542590265]": { + "$type": "EditorDisabledCompositionComponent", + "Id": 8092226976542590265 + } + } + }, + "Entity_[1140630611924]": { + "Id": "Entity_[1140630611924]", + "Name": "Entity1", + "Components": { + "Component_[11525365929370623807]": { + "$type": "EditorVisibilityComponent", + "Id": 11525365929370623807 + }, + "Component_[12334620273692642550]": { + "$type": "EditorLockComponent", + "Id": 12334620273692642550 + }, + "Component_[14389735759337977675]": { + "$type": "EditorPendingCompositionComponent", + "Id": 14389735759337977675 + }, + "Component_[16184381538555246534]": { + "$type": "AZ::Render::EditorMeshComponent", + "Id": 16184381538555246534, + "Controller": { + "Configuration": { + "ModelAsset": { + "assetId": { + "guid": "{E14975EF-E676-51A4-B826-3EF59CB645AA}", + "subId": 285127096 + }, + "assetHint": "testdata/objects/cube/cube.azmodel" + } + } + } + }, + "Component_[17962478023087084794]": { + "$type": "SelectionComponent", + "Id": 17962478023087084794 + }, + "Component_[18071675051915092508]": { + "$type": "EditorEntityIconComponent", + "Id": 18071675051915092508 + }, + "Component_[2115498007879087044]": { + "$type": "EditorInspectorComponent", + "Id": 2115498007879087044, + "ComponentOrderEntryArray": [ + { + "ComponentId": 399415038452606756 + }, + { + "ComponentId": 16184381538555246534, + "SortIndex": 1 + }, + { + "ComponentId": 7827190074535394331, + "SortIndex": 2 + } + ] + }, + "Component_[3518973002096080237]": { + "$type": "EditorOnlyEntityComponent", + "Id": 3518973002096080237 + }, + "Component_[399415038452606756]": { + "$type": "{27F1E1A1-8D9D-4C3B-BD3A-AFB9762449C0} TransformComponent", + "Id": 399415038452606756, + "Parent Entity": "ContainerEntity", + "Transform Data": { + "Translate": [ + 7.530143737792969, + -0.00018183141946792603, + 74.93071746826172 + ] + } + }, + "Component_[4564240319609068082]": { + "$type": "EditorEntitySortComponent", + "Id": 4564240319609068082 + }, + "Component_[7827190074535394331]": { + "$type": "EditorMaterialComponent", + "Id": 7827190074535394331, + "Controller": { + "Configuration": { + "materials": [ + { + "Key": { + "materialSlotStableId": 2418540911 + }, + "Value": { + "MaterialAsset": { + "assetId": { + "guid": "{2AC06FA3-7670-542E-8996-DF346AFF1B61}" + }, + "assetHint": "materials/presets/pbr/metal_silver_polished.azmaterial" + } + } + } + ] + } + } + }, + "Component_[8092226976542590265]": { + "$type": "EditorDisabledCompositionComponent", + "Id": 8092226976542590265 + } + } + }, + "Entity_[1144925579220]": { + "Id": "Entity_[1144925579220]", + "Name": "Entity1", + "Components": { + "Component_[11525365929370623807]": { + "$type": "EditorVisibilityComponent", + "Id": 11525365929370623807 + }, + "Component_[12334620273692642550]": { + "$type": "EditorLockComponent", + "Id": 12334620273692642550 + }, + "Component_[14389735759337977675]": { + "$type": "EditorPendingCompositionComponent", + "Id": 14389735759337977675 + }, + "Component_[16184381538555246534]": { + "$type": "AZ::Render::EditorMeshComponent", + "Id": 16184381538555246534, + "Controller": { + "Configuration": { + "ModelAsset": { + "assetId": { + "guid": "{E14975EF-E676-51A4-B826-3EF59CB645AA}", + "subId": 285127096 + }, + "assetHint": "testdata/objects/cube/cube.azmodel" + } + } + } + }, + "Component_[17962478023087084794]": { + "$type": "SelectionComponent", + "Id": 17962478023087084794 + }, + "Component_[18071675051915092508]": { + "$type": "EditorEntityIconComponent", + "Id": 18071675051915092508 + }, + "Component_[2115498007879087044]": { + "$type": "EditorInspectorComponent", + "Id": 2115498007879087044, + "ComponentOrderEntryArray": [ + { + "ComponentId": 399415038452606756 + }, + { + "ComponentId": 16184381538555246534, + "SortIndex": 1 + }, + { + "ComponentId": 7827190074535394331, + "SortIndex": 2 + } + ] + }, + "Component_[3518973002096080237]": { + "$type": "EditorOnlyEntityComponent", + "Id": 3518973002096080237 + }, + "Component_[399415038452606756]": { + "$type": "{27F1E1A1-8D9D-4C3B-BD3A-AFB9762449C0} TransformComponent", + "Id": 399415038452606756, + "Parent Entity": "ContainerEntity", + "Transform Data": { + "Translate": [ + -47.53056335449219, + -0.00018183141946792603, + 99.43339538574219 + ] + } + }, + "Component_[4564240319609068082]": { + "$type": "EditorEntitySortComponent", + "Id": 4564240319609068082 + }, + "Component_[7827190074535394331]": { + "$type": "EditorMaterialComponent", + "Id": 7827190074535394331, + "Controller": { + "Configuration": { + "materials": [ + { + "Key": { + "materialSlotStableId": 2418540911 + }, + "Value": { + "MaterialAsset": { + "assetId": { + "guid": "{94CF2BD7-7D09-5577-B1D8-3FF85B15E127}" + }, + "assetHint": "materials/presets/pbr/metal_aluminum.azmaterial" + } + } + } + ] + } + } + }, + "Component_[8092226976542590265]": { + "$type": "EditorDisabledCompositionComponent", + "Id": 8092226976542590265 + } + } + }, + "Entity_[1149220546516]": { + "Id": "Entity_[1149220546516]", + "Name": "Entity1", + "Components": { + "Component_[11525365929370623807]": { + "$type": "EditorVisibilityComponent", + "Id": 11525365929370623807 + }, + "Component_[12334620273692642550]": { + "$type": "EditorLockComponent", + "Id": 12334620273692642550 + }, + "Component_[14389735759337977675]": { + "$type": "EditorPendingCompositionComponent", + "Id": 14389735759337977675 + }, + "Component_[16184381538555246534]": { + "$type": "AZ::Render::EditorMeshComponent", + "Id": 16184381538555246534, + "Controller": { + "Configuration": { + "ModelAsset": { + "assetId": { + "guid": "{E14975EF-E676-51A4-B826-3EF59CB645AA}", + "subId": 285127096 + }, + "assetHint": "testdata/objects/cube/cube.azmodel" + } + } + } + }, + "Component_[17962478023087084794]": { + "$type": "SelectionComponent", + "Id": 17962478023087084794 + }, + "Component_[18071675051915092508]": { + "$type": "EditorEntityIconComponent", + "Id": 18071675051915092508 + }, + "Component_[2115498007879087044]": { + "$type": "EditorInspectorComponent", + "Id": 2115498007879087044, + "ComponentOrderEntryArray": [ + { + "ComponentId": 399415038452606756 + }, + { + "ComponentId": 16184381538555246534, + "SortIndex": 1 + }, + { + "ComponentId": 7827190074535394331, + "SortIndex": 2 + } + ] + }, + "Component_[3518973002096080237]": { + "$type": "EditorOnlyEntityComponent", + "Id": 3518973002096080237 + }, + "Component_[399415038452606756]": { + "$type": "{27F1E1A1-8D9D-4C3B-BD3A-AFB9762449C0} TransformComponent", + "Id": 399415038452606756, + "Parent Entity": "ContainerEntity", + "Transform Data": { + "Translate": [ + 17.53014373779297, + -0.00018183141946792603, + 74.93071746826172 + ] + } + }, + "Component_[4564240319609068082]": { + "$type": "EditorEntitySortComponent", + "Id": 4564240319609068082 + }, + "Component_[7827190074535394331]": { + "$type": "EditorMaterialComponent", + "Id": 7827190074535394331, + "Controller": { + "Configuration": { + "materials": [ + { + "Key": {}, + "Value": { + "MaterialAsset": { + "assetId": { + "guid": "{721188E0-B7CC-5D06-8D5D-39AF8ABF2EF9}" + }, + "assetHint": "materials/presets/pbr/metal_titanium.azmaterial" + } + } + }, + { + "Key": { + "materialSlotStableId": 2418540911 + }, + "Value": { + "MaterialAsset": { + "assetId": { + "guid": "{64C1F6A6-6BDA-551A-BE56-1829E5913278}" + }, + "assetHint": "materials/presets/pbr/metal_aluminum_polished.azmaterial" + } + } + } + ] + } + } + }, + "Component_[8092226976542590265]": { + "$type": "EditorDisabledCompositionComponent", + "Id": 8092226976542590265 + } + } + }, + "Entity_[1153515513812]": { + "Id": "Entity_[1153515513812]", + "Name": "Entity1", + "Components": { + "Component_[11525365929370623807]": { + "$type": "EditorVisibilityComponent", + "Id": 11525365929370623807 + }, + "Component_[12334620273692642550]": { + "$type": "EditorLockComponent", + "Id": 12334620273692642550 + }, + "Component_[14389735759337977675]": { + "$type": "EditorPendingCompositionComponent", + "Id": 14389735759337977675 + }, + "Component_[16184381538555246534]": { + "$type": "AZ::Render::EditorMeshComponent", + "Id": 16184381538555246534, + "Controller": { + "Configuration": { + "ModelAsset": { + "assetId": { + "guid": "{E14975EF-E676-51A4-B826-3EF59CB645AA}", + "subId": 285127096 + }, + "assetHint": "testdata/objects/cube/cube.azmodel" + } + } + } + }, + "Component_[17962478023087084794]": { + "$type": "SelectionComponent", + "Id": 17962478023087084794 + }, + "Component_[18071675051915092508]": { + "$type": "EditorEntityIconComponent", + "Id": 18071675051915092508 + }, + "Component_[2115498007879087044]": { + "$type": "EditorInspectorComponent", + "Id": 2115498007879087044, + "ComponentOrderEntryArray": [ + { + "ComponentId": 399415038452606756 + }, + { + "ComponentId": 16184381538555246534, + "SortIndex": 1 + }, + { + "ComponentId": 7827190074535394331, + "SortIndex": 2 + } + ] + }, + "Component_[3518973002096080237]": { + "$type": "EditorOnlyEntityComponent", + "Id": 3518973002096080237 + }, + "Component_[399415038452606756]": { + "$type": "{27F1E1A1-8D9D-4C3B-BD3A-AFB9762449C0} TransformComponent", + "Id": 399415038452606756, + "Parent Entity": "ContainerEntity", + "Transform Data": { + "Translate": [ + -2.5305633544921875, + -0.00018183141946792603, + 15.057670593261719 + ] + } + }, + "Component_[4564240319609068082]": { + "$type": "EditorEntitySortComponent", + "Id": 4564240319609068082 + }, + "Component_[7827190074535394331]": { + "$type": "EditorMaterialComponent", + "Id": 7827190074535394331, + "Controller": { + "Configuration": { + "materials": [ + { + "Key": { + "materialSlotStableId": 2418540911 + }, + "Value": { + "MaterialAsset": { + "assetId": { + "guid": "{D0E9960A-4B31-5136-BAC6-5482B203D3B4}" + }, + "assetHint": "materials/presets/pbr/metal_palladium_polished.azmaterial" + } + } + } + ] + } + } + }, + "Component_[8092226976542590265]": { + "$type": "EditorDisabledCompositionComponent", + "Id": 8092226976542590265 + } + } + }, + "Entity_[1157810481108]": { + "Id": "Entity_[1157810481108]", + "Name": "Entity1", + "Components": { + "Component_[11525365929370623807]": { + "$type": "EditorVisibilityComponent", + "Id": 11525365929370623807 + }, + "Component_[12334620273692642550]": { + "$type": "EditorLockComponent", + "Id": 12334620273692642550 + }, + "Component_[14389735759337977675]": { + "$type": "EditorPendingCompositionComponent", + "Id": 14389735759337977675 + }, + "Component_[16184381538555246534]": { + "$type": "AZ::Render::EditorMeshComponent", + "Id": 16184381538555246534, + "Controller": { + "Configuration": { + "ModelAsset": { + "assetId": { + "guid": "{E14975EF-E676-51A4-B826-3EF59CB645AA}", + "subId": 285127096 + }, + "assetHint": "testdata/objects/cube/cube.azmodel" + } + } + } + }, + "Component_[17962478023087084794]": { + "$type": "SelectionComponent", + "Id": 17962478023087084794 + }, + "Component_[18071675051915092508]": { + "$type": "EditorEntityIconComponent", + "Id": 18071675051915092508 + }, + "Component_[2115498007879087044]": { + "$type": "EditorInspectorComponent", + "Id": 2115498007879087044, + "ComponentOrderEntryArray": [ + { + "ComponentId": 399415038452606756 + }, + { + "ComponentId": 16184381538555246534, + "SortIndex": 1 + }, + { + "ComponentId": 7827190074535394331, + "SortIndex": 2 + } + ] + }, + "Component_[3518973002096080237]": { + "$type": "EditorOnlyEntityComponent", + "Id": 3518973002096080237 + }, + "Component_[399415038452606756]": { + "$type": "{27F1E1A1-8D9D-4C3B-BD3A-AFB9762449C0} TransformComponent", + "Id": 399415038452606756, + "Parent Entity": "ContainerEntity", + "Transform Data": { + "Translate": [ + -12.530563354492188, + -0.00018183141946792603, + 49.593753814697266 + ] + } + }, + "Component_[4564240319609068082]": { + "$type": "EditorEntitySortComponent", + "Id": 4564240319609068082 + }, + "Component_[7827190074535394331]": { + "$type": "EditorMaterialComponent", + "Id": 7827190074535394331, + "Controller": { + "Configuration": { + "materials": [ + { + "Key": { + "materialSlotStableId": 2418540911 + }, + "Value": { + "MaterialAsset": { + "assetId": { + "guid": "{F2AD0EBF-7137-58D1-9991-9552FAD41B19}" + }, + "assetHint": "materials/presets/pbr/metal_mercury.azmaterial" + } + } + } + ] + } + } + }, + "Component_[8092226976542590265]": { + "$type": "EditorDisabledCompositionComponent", + "Id": 8092226976542590265 + } + } + }, + "Entity_[1162105448404]": { + "Id": "Entity_[1162105448404]", + "Name": "Entity1", + "Components": { + "Component_[11525365929370623807]": { + "$type": "EditorVisibilityComponent", + "Id": 11525365929370623807 + }, + "Component_[12334620273692642550]": { + "$type": "EditorLockComponent", + "Id": 12334620273692642550 + }, + "Component_[14389735759337977675]": { + "$type": "EditorPendingCompositionComponent", + "Id": 14389735759337977675 + }, + "Component_[16184381538555246534]": { + "$type": "AZ::Render::EditorMeshComponent", + "Id": 16184381538555246534, + "Controller": { + "Configuration": { + "ModelAsset": { + "assetId": { + "guid": "{E14975EF-E676-51A4-B826-3EF59CB645AA}", + "subId": 285127096 + }, + "assetHint": "testdata/objects/cube/cube.azmodel" + } + } + } + }, + "Component_[17962478023087084794]": { + "$type": "SelectionComponent", + "Id": 17962478023087084794 + }, + "Component_[18071675051915092508]": { + "$type": "EditorEntityIconComponent", + "Id": 18071675051915092508 + }, + "Component_[2115498007879087044]": { + "$type": "EditorInspectorComponent", + "Id": 2115498007879087044, + "ComponentOrderEntryArray": [ + { + "ComponentId": 399415038452606756 + }, + { + "ComponentId": 16184381538555246534, + "SortIndex": 1 + }, + { + "ComponentId": 7827190074535394331, + "SortIndex": 2 + } + ] + }, + "Component_[3518973002096080237]": { + "$type": "EditorOnlyEntityComponent", + "Id": 3518973002096080237 + }, + "Component_[399415038452606756]": { + "$type": "{27F1E1A1-8D9D-4C3B-BD3A-AFB9762449C0} TransformComponent", + "Id": 399415038452606756, + "Parent Entity": "ContainerEntity", + "Transform Data": { + "Translate": [ + -7.5305633544921875, + -0.00018183141946792603, + 64.32462310791016 + ] + } + }, + "Component_[4564240319609068082]": { + "$type": "EditorEntitySortComponent", + "Id": 4564240319609068082 + }, + "Component_[7827190074535394331]": { + "$type": "EditorMaterialComponent", + "Id": 7827190074535394331, + "Controller": { + "Configuration": { + "materials": [ + { + "Key": { + "materialSlotStableId": 2418540911 + }, + "Value": { + "MaterialAsset": { + "assetId": { + "guid": "{E56377B1-6310-5311-A494-135BE50B74F0}" + }, + "assetHint": "materials/presets/pbr/metal_nickel_matte.azmaterial" + } + } + } + ] + } + } + }, + "Component_[8092226976542590265]": { + "$type": "EditorDisabledCompositionComponent", + "Id": 8092226976542590265 + } + } + }, + "Entity_[1166400415700]": { + "Id": "Entity_[1166400415700]", + "Name": "Entity1", + "Components": { + "Component_[11525365929370623807]": { + "$type": "EditorVisibilityComponent", + "Id": 11525365929370623807 + }, + "Component_[12334620273692642550]": { + "$type": "EditorLockComponent", + "Id": 12334620273692642550 + }, + "Component_[14389735759337977675]": { + "$type": "EditorPendingCompositionComponent", + "Id": 14389735759337977675 + }, + "Component_[16184381538555246534]": { + "$type": "AZ::Render::EditorMeshComponent", + "Id": 16184381538555246534, + "Controller": { + "Configuration": { + "ModelAsset": { + "assetId": { + "guid": "{E14975EF-E676-51A4-B826-3EF59CB645AA}", + "subId": 285127096 + }, + "assetHint": "testdata/objects/cube/cube.azmodel" + } + } + } + }, + "Component_[17962478023087084794]": { + "$type": "SelectionComponent", + "Id": 17962478023087084794 + }, + "Component_[18071675051915092508]": { + "$type": "EditorEntityIconComponent", + "Id": 18071675051915092508 + }, + "Component_[2115498007879087044]": { + "$type": "EditorInspectorComponent", + "Id": 2115498007879087044, + "ComponentOrderEntryArray": [ + { + "ComponentId": 399415038452606756 + }, + { + "ComponentId": 16184381538555246534, + "SortIndex": 1 + }, + { + "ComponentId": 7827190074535394331, + "SortIndex": 2 + } + ] + }, + "Component_[3518973002096080237]": { + "$type": "EditorOnlyEntityComponent", + "Id": 3518973002096080237 + }, + "Component_[399415038452606756]": { + "$type": "{27F1E1A1-8D9D-4C3B-BD3A-AFB9762449C0} TransformComponent", + "Id": 399415038452606756, + "Parent Entity": "ContainerEntity", + "Transform Data": { + "Translate": [ + 2.5301437377929688, + -0.00018183141946792603, + 114.4910659790039 + ] + } + }, + "Component_[4564240319609068082]": { + "$type": "EditorEntitySortComponent", + "Id": 4564240319609068082 + }, + "Component_[7827190074535394331]": { + "$type": "EditorMaterialComponent", + "Id": 7827190074535394331, + "Controller": { + "Configuration": { + "materials": [ + { + "Key": { + "materialSlotStableId": 2418540911 + }, + "Value": { + "MaterialAsset": { + "assetId": { + "guid": "{E23FC75B-4142-55F1-B9AE-884826E7EB23}" + }, + "assetHint": "materials/presets/pbr/metal_platinum.azmaterial" + } + } + } + ] + } + } + }, + "Component_[8092226976542590265]": { + "$type": "EditorDisabledCompositionComponent", + "Id": 8092226976542590265 + } + } + }, + "Entity_[1170695382996]": { + "Id": "Entity_[1170695382996]", + "Name": "Entity1", + "Components": { + "Component_[11525365929370623807]": { + "$type": "EditorVisibilityComponent", + "Id": 11525365929370623807 + }, + "Component_[12334620273692642550]": { + "$type": "EditorLockComponent", + "Id": 12334620273692642550 + }, + "Component_[14389735759337977675]": { + "$type": "EditorPendingCompositionComponent", + "Id": 14389735759337977675 + }, + "Component_[16184381538555246534]": { + "$type": "AZ::Render::EditorMeshComponent", + "Id": 16184381538555246534, + "Controller": { + "Configuration": { + "ModelAsset": { + "assetId": { + "guid": "{E14975EF-E676-51A4-B826-3EF59CB645AA}", + "subId": 285127096 + }, + "assetHint": "testdata/objects/cube/cube.azmodel" + } + } + } + }, + "Component_[17962478023087084794]": { + "$type": "SelectionComponent", + "Id": 17962478023087084794 + }, + "Component_[18071675051915092508]": { + "$type": "EditorEntityIconComponent", + "Id": 18071675051915092508 + }, + "Component_[2115498007879087044]": { + "$type": "EditorInspectorComponent", + "Id": 2115498007879087044, + "ComponentOrderEntryArray": [ + { + "ComponentId": 399415038452606756 + }, + { + "ComponentId": 16184381538555246534, + "SortIndex": 1 + }, + { + "ComponentId": 7827190074535394331, + "SortIndex": 2 + } + ] + }, + "Component_[3518973002096080237]": { + "$type": "EditorOnlyEntityComponent", + "Id": 3518973002096080237 + }, + "Component_[399415038452606756]": { + "$type": "{27F1E1A1-8D9D-4C3B-BD3A-AFB9762449C0} TransformComponent", + "Id": 399415038452606756, + "Parent Entity": "ContainerEntity", + "Transform Data": { + "Translate": [ + 2.5301437377929688, + -0.00018183141946792603, + 9.475835800170898 + ] + } + }, + "Component_[4564240319609068082]": { + "$type": "EditorEntitySortComponent", + "Id": 4564240319609068082 + }, + "Component_[7827190074535394331]": { + "$type": "EditorMaterialComponent", + "Id": 7827190074535394331, + "Controller": { + "Configuration": { + "materials": [ + { + "Key": { + "materialSlotStableId": 2418540911 + }, + "Value": { + "MaterialAsset": { + "assetId": { + "guid": "{E23FC75B-4142-55F1-B9AE-884826E7EB23}" + }, + "assetHint": "materials/presets/pbr/metal_platinum.azmaterial" + } + } + } + ] + } + } + }, + "Component_[8092226976542590265]": { + "$type": "EditorDisabledCompositionComponent", + "Id": 8092226976542590265 + } + } + }, + "Entity_[1174990350292]": { + "Id": "Entity_[1174990350292]", + "Name": "Entity1", + "Components": { + "Component_[11525365929370623807]": { + "$type": "EditorVisibilityComponent", + "Id": 11525365929370623807 + }, + "Component_[12334620273692642550]": { + "$type": "EditorLockComponent", + "Id": 12334620273692642550 + }, + "Component_[14389735759337977675]": { + "$type": "EditorPendingCompositionComponent", + "Id": 14389735759337977675 + }, + "Component_[16184381538555246534]": { + "$type": "AZ::Render::EditorMeshComponent", + "Id": 16184381538555246534, + "Controller": { + "Configuration": { + "ModelAsset": { + "assetId": { + "guid": "{E14975EF-E676-51A4-B826-3EF59CB645AA}", + "subId": 285127096 + }, + "assetHint": "testdata/objects/cube/cube.azmodel" + } + } + } + }, + "Component_[17962478023087084794]": { + "$type": "SelectionComponent", + "Id": 17962478023087084794 + }, + "Component_[18071675051915092508]": { + "$type": "EditorEntityIconComponent", + "Id": 18071675051915092508 + }, + "Component_[2115498007879087044]": { + "$type": "EditorInspectorComponent", + "Id": 2115498007879087044, + "ComponentOrderEntryArray": [ + { + "ComponentId": 399415038452606756 + }, + { + "ComponentId": 16184381538555246534, + "SortIndex": 1 + }, + { + "ComponentId": 7827190074535394331, + "SortIndex": 2 + } + ] + }, + "Component_[3518973002096080237]": { + "$type": "EditorOnlyEntityComponent", + "Id": 3518973002096080237 + }, + "Component_[399415038452606756]": { + "$type": "{27F1E1A1-8D9D-4C3B-BD3A-AFB9762449C0} TransformComponent", + "Id": 399415038452606756, + "Parent Entity": "ContainerEntity", + "Transform Data": { + "Translate": [ + 32.53014373779297, + -0.00018183141946792603, + 34.53608703613281 + ] + } + }, + "Component_[4564240319609068082]": { + "$type": "EditorEntitySortComponent", + "Id": 4564240319609068082 + }, + "Component_[7827190074535394331]": { + "$type": "EditorMaterialComponent", + "Id": 7827190074535394331, + "Controller": { + "Configuration": { + "materials": [ + { + "Key": { + "materialSlotStableId": 2418540911 + }, + "Value": { + "MaterialAsset": { + "assetId": { + "guid": "{C60A39AF-BB76-51BD-9468-A88C9A6F78D7}" + }, + "assetHint": "materials/presets/pbr/metal_cobalt_matte.azmaterial" + } + } + } + ] + } + } + }, + "Component_[8092226976542590265]": { + "$type": "EditorDisabledCompositionComponent", + "Id": 8092226976542590265 + } + } + }, + "Entity_[1179285317588]": { + "Id": "Entity_[1179285317588]", + "Name": "Entity1", + "Components": { + "Component_[11525365929370623807]": { + "$type": "EditorVisibilityComponent", + "Id": 11525365929370623807 + }, + "Component_[12334620273692642550]": { + "$type": "EditorLockComponent", + "Id": 12334620273692642550 + }, + "Component_[14389735759337977675]": { + "$type": "EditorPendingCompositionComponent", + "Id": 14389735759337977675 + }, + "Component_[16184381538555246534]": { + "$type": "AZ::Render::EditorMeshComponent", + "Id": 16184381538555246534, + "Controller": { + "Configuration": { + "ModelAsset": { + "assetId": { + "guid": "{E14975EF-E676-51A4-B826-3EF59CB645AA}", + "subId": 285127096 + }, + "assetHint": "testdata/objects/cube/cube.azmodel" + } + } + } + }, + "Component_[17962478023087084794]": { + "$type": "SelectionComponent", + "Id": 17962478023087084794 + }, + "Component_[18071675051915092508]": { + "$type": "EditorEntityIconComponent", + "Id": 18071675051915092508 + }, + "Component_[2115498007879087044]": { + "$type": "EditorInspectorComponent", + "Id": 2115498007879087044, + "ComponentOrderEntryArray": [ + { + "ComponentId": 399415038452606756 + }, + { + "ComponentId": 16184381538555246534, + "SortIndex": 1 + }, + { + "ComponentId": 7827190074535394331, + "SortIndex": 2 + } + ] + }, + "Component_[3518973002096080237]": { + "$type": "EditorOnlyEntityComponent", + "Id": 3518973002096080237 + }, + "Component_[399415038452606756]": { + "$type": "{27F1E1A1-8D9D-4C3B-BD3A-AFB9762449C0} TransformComponent", + "Id": 399415038452606756, + "Parent Entity": "ContainerEntity", + "Transform Data": { + "Translate": [ + 32.53014373779297, + -0.00018183141946792603, + 105.0152359008789 + ] + } + }, + "Component_[4564240319609068082]": { + "$type": "EditorEntitySortComponent", + "Id": 4564240319609068082 + }, + "Component_[7827190074535394331]": { + "$type": "EditorMaterialComponent", + "Id": 7827190074535394331, + "Controller": { + "Configuration": { + "materials": [ + { + "Key": { + "materialSlotStableId": 2418540911 + }, + "Value": { + "MaterialAsset": { + "assetId": { + "guid": "{93DF55AE-8D1B-5AD1-A609-05F1BD9F6EA0}" + }, + "assetHint": "materials/presets/pbr/metal_cobalt_polished.azmaterial" + } + } + } + ] + } + } + }, + "Component_[8092226976542590265]": { + "$type": "EditorDisabledCompositionComponent", + "Id": 8092226976542590265 + } + } + }, + "Entity_[1183580284884]": { + "Id": "Entity_[1183580284884]", + "Name": "Entity1", + "Components": { + "Component_[1057179753323467068]": { + "$type": "EditorMaterialComponent", + "Id": 1057179753323467068, + "Controller": { + "Configuration": { + "materials": [ + { + "Key": { + "materialSlotStableId": 2418540911 + }, + "Value": { + "MaterialAsset": { + "assetId": { + "guid": "{721188E0-B7CC-5D06-8D5D-39AF8ABF2EF9}" + }, + "assetHint": "materials/presets/pbr/metal_titanium.azmaterial" + } + } + } + ] + } + } + }, + "Component_[11525365929370623807]": { + "$type": "EditorVisibilityComponent", + "Id": 11525365929370623807 + }, + "Component_[12334620273692642550]": { + "$type": "EditorLockComponent", + "Id": 12334620273692642550 + }, + "Component_[14389735759337977675]": { + "$type": "EditorPendingCompositionComponent", + "Id": 14389735759337977675 + }, + "Component_[16184381538555246534]": { + "$type": "AZ::Render::EditorMeshComponent", + "Id": 16184381538555246534, + "Controller": { + "Configuration": { + "ModelAsset": { + "assetId": { + "guid": "{E14975EF-E676-51A4-B826-3EF59CB645AA}", + "subId": 285127096 + }, + "assetHint": "testdata/objects/cube/cube.azmodel" + } + } + } + }, + "Component_[17962478023087084794]": { + "$type": "SelectionComponent", + "Id": 17962478023087084794 + }, + "Component_[18071675051915092508]": { + "$type": "EditorEntityIconComponent", + "Id": 18071675051915092508 + }, + "Component_[2115498007879087044]": { + "$type": "EditorInspectorComponent", + "Id": 2115498007879087044, + "ComponentOrderEntryArray": [ + { + "ComponentId": 399415038452606756 + }, + { + "ComponentId": 16184381538555246534, + "SortIndex": 1 + }, + { + "ComponentId": 1057179753323467068, + "SortIndex": 2 + } + ] + }, + "Component_[3518973002096080237]": { + "$type": "EditorOnlyEntityComponent", + "Id": 3518973002096080237 + }, + "Component_[399415038452606756]": { + "$type": "{27F1E1A1-8D9D-4C3B-BD3A-AFB9762449C0} TransformComponent", + "Id": 399415038452606756, + "Parent Entity": "ContainerEntity", + "Transform Data": { + "Translate": [ + 12.530143737792969, + -0.00018183141946792603, + 99.43339538574219 + ] + } + }, + "Component_[4564240319609068082]": { + "$type": "EditorEntitySortComponent", + "Id": 4564240319609068082 + }, + "Component_[8092226976542590265]": { + "$type": "EditorDisabledCompositionComponent", + "Id": 8092226976542590265 + } + } + }, + "Entity_[1187875252180]": { + "Id": "Entity_[1187875252180]", + "Name": "Entity1", + "Components": { + "Component_[11525365929370623807]": { + "$type": "EditorVisibilityComponent", + "Id": 11525365929370623807 + }, + "Component_[12334620273692642550]": { + "$type": "EditorLockComponent", + "Id": 12334620273692642550 + }, + "Component_[14389735759337977675]": { + "$type": "EditorPendingCompositionComponent", + "Id": 14389735759337977675 + }, + "Component_[16184381538555246534]": { + "$type": "AZ::Render::EditorMeshComponent", + "Id": 16184381538555246534, + "Controller": { + "Configuration": { + "ModelAsset": { + "assetId": { + "guid": "{E14975EF-E676-51A4-B826-3EF59CB645AA}", + "subId": 285127096 + }, + "assetHint": "testdata/objects/cube/cube.azmodel" + } + } + } + }, + "Component_[17962478023087084794]": { + "$type": "SelectionComponent", + "Id": 17962478023087084794 + }, + "Component_[18071675051915092508]": { + "$type": "EditorEntityIconComponent", + "Id": 18071675051915092508 + }, + "Component_[2115498007879087044]": { + "$type": "EditorInspectorComponent", + "Id": 2115498007879087044, + "ComponentOrderEntryArray": [ + { + "ComponentId": 399415038452606756 + }, + { + "ComponentId": 16184381538555246534, + "SortIndex": 1 + }, + { + "ComponentId": 7827190074535394331, + "SortIndex": 2 + } + ] + }, + "Component_[3518973002096080237]": { + "$type": "EditorOnlyEntityComponent", + "Id": 3518973002096080237 + }, + "Component_[399415038452606756]": { + "$type": "{27F1E1A1-8D9D-4C3B-BD3A-AFB9762449C0} TransformComponent", + "Id": 399415038452606756, + "Parent Entity": "ContainerEntity", + "Transform Data": { + "Translate": [ + -32.53056335449219, + -0.00018183141946792603, + 24.533506393432617 + ] + } + }, + "Component_[4564240319609068082]": { + "$type": "EditorEntitySortComponent", + "Id": 4564240319609068082 + }, + "Component_[7827190074535394331]": { + "$type": "EditorMaterialComponent", + "Id": 7827190074535394331, + "Controller": { + "Configuration": { + "materials": [ + { + "Key": { + "materialSlotStableId": 2418540911 + }, + "Value": { + "MaterialAsset": { + "assetId": { + "guid": "{99976D73-6248-5D66-AD15-E8F52B0AFE36}" + }, + "assetHint": "materials/presets/pbr/metal_cobalt.azmaterial" + } + } + } + ] + } + } + }, + "Component_[8092226976542590265]": { + "$type": "EditorDisabledCompositionComponent", + "Id": 8092226976542590265 + } + } + }, + "Entity_[1192170219476]": { + "Id": "Entity_[1192170219476]", + "Name": "Entity1", + "Components": { + "Component_[11525365929370623807]": { + "$type": "EditorVisibilityComponent", + "Id": 11525365929370623807 + }, + "Component_[12334620273692642550]": { + "$type": "EditorLockComponent", + "Id": 12334620273692642550 + }, + "Component_[14389735759337977675]": { + "$type": "EditorPendingCompositionComponent", + "Id": 14389735759337977675 + }, + "Component_[16184381538555246534]": { + "$type": "AZ::Render::EditorMeshComponent", + "Id": 16184381538555246534, + "Controller": { + "Configuration": { + "ModelAsset": { + "assetId": { + "guid": "{E14975EF-E676-51A4-B826-3EF59CB645AA}", + "subId": 285127096 + }, + "assetHint": "testdata/objects/cube/cube.azmodel" + } + } + } + }, + "Component_[17962478023087084794]": { + "$type": "SelectionComponent", + "Id": 17962478023087084794 + }, + "Component_[18071675051915092508]": { + "$type": "EditorEntityIconComponent", + "Id": 18071675051915092508 + }, + "Component_[2115498007879087044]": { + "$type": "EditorInspectorComponent", + "Id": 2115498007879087044, + "ComponentOrderEntryArray": [ + { + "ComponentId": 399415038452606756 + }, + { + "ComponentId": 16184381538555246534, + "SortIndex": 1 + }, + { + "ComponentId": 7827190074535394331, + "SortIndex": 2 + } + ] + }, + "Component_[3518973002096080237]": { + "$type": "EditorOnlyEntityComponent", + "Id": 3518973002096080237 + }, + "Component_[399415038452606756]": { + "$type": "{27F1E1A1-8D9D-4C3B-BD3A-AFB9762449C0} TransformComponent", + "Id": 399415038452606756, + "Parent Entity": "ContainerEntity", + "Transform Data": { + "Translate": [ + -12.530563354492188, + -0.00018183141946792603, + 4.451573371887207 + ] + } + }, + "Component_[4564240319609068082]": { + "$type": "EditorEntitySortComponent", + "Id": 4564240319609068082 + }, + "Component_[7827190074535394331]": { + "$type": "EditorMaterialComponent", + "Id": 7827190074535394331, + "Controller": { + "Configuration": { + "materials": [ + { + "Key": { + "materialSlotStableId": 2418540911 + }, + "Value": { + "MaterialAsset": { + "assetId": { + "guid": "{F2AD0EBF-7137-58D1-9991-9552FAD41B19}" + }, + "assetHint": "materials/presets/pbr/metal_mercury.azmaterial" + } + } + } + ] + } + } + }, + "Component_[8092226976542590265]": { + "$type": "EditorDisabledCompositionComponent", + "Id": 8092226976542590265 + } + } + }, + "Entity_[1196465186772]": { + "Id": "Entity_[1196465186772]", + "Name": "Entity1", + "Components": { + "Component_[11525365929370623807]": { + "$type": "EditorVisibilityComponent", + "Id": 11525365929370623807 + }, + "Component_[12334620273692642550]": { + "$type": "EditorLockComponent", + "Id": 12334620273692642550 + }, + "Component_[14389735759337977675]": { + "$type": "EditorPendingCompositionComponent", + "Id": 14389735759337977675 + }, + "Component_[16184381538555246534]": { + "$type": "AZ::Render::EditorMeshComponent", + "Id": 16184381538555246534, + "Controller": { + "Configuration": { + "ModelAsset": { + "assetId": { + "guid": "{E14975EF-E676-51A4-B826-3EF59CB645AA}", + "subId": 285127096 + }, + "assetHint": "testdata/objects/cube/cube.azmodel" + } + } + } + }, + "Component_[17962478023087084794]": { + "$type": "SelectionComponent", + "Id": 17962478023087084794 + }, + "Component_[18071675051915092508]": { + "$type": "EditorEntityIconComponent", + "Id": 18071675051915092508 + }, + "Component_[2115498007879087044]": { + "$type": "EditorInspectorComponent", + "Id": 2115498007879087044, + "ComponentOrderEntryArray": [ + { + "ComponentId": 399415038452606756 + }, + { + "ComponentId": 16184381538555246534, + "SortIndex": 1 + }, + { + "ComponentId": 7827190074535394331, + "SortIndex": 2 + } + ] + }, + "Component_[3518973002096080237]": { + "$type": "EditorOnlyEntityComponent", + "Id": 3518973002096080237 + }, + "Component_[399415038452606756]": { + "$type": "{27F1E1A1-8D9D-4C3B-BD3A-AFB9762449C0} TransformComponent", + "Id": 399415038452606756, + "Parent Entity": "ContainerEntity", + "Transform Data": { + "Translate": [ + -27.530563354492188, + -0.00018183141946792603, + 114.4910659790039 + ] + } + }, + "Component_[4564240319609068082]": { + "$type": "EditorEntitySortComponent", + "Id": 4564240319609068082 + }, + "Component_[7827190074535394331]": { + "$type": "EditorMaterialComponent", + "Id": 7827190074535394331, + "Controller": { + "Configuration": { + "materials": [ + { + "Key": { + "materialSlotStableId": 2418540911 + }, + "Value": { + "MaterialAsset": { + "assetId": { + "guid": "{E621C5BF-B8E1-55F0-A791-EC960F2FA46F}" + }, + "assetHint": "materials/presets/pbr/metal_copper.azmaterial" + } + } + } + ] + } + } + }, + "Component_[8092226976542590265]": { + "$type": "EditorDisabledCompositionComponent", + "Id": 8092226976542590265 + } + } + }, + "Entity_[1200760154068]": { + "Id": "Entity_[1200760154068]", + "Name": "Entity1", + "Components": { + "Component_[11525365929370623807]": { + "$type": "EditorVisibilityComponent", + "Id": 11525365929370623807 + }, + "Component_[12334620273692642550]": { + "$type": "EditorLockComponent", + "Id": 12334620273692642550 + }, + "Component_[14389735759337977675]": { + "$type": "EditorPendingCompositionComponent", + "Id": 14389735759337977675 + }, + "Component_[16184381538555246534]": { + "$type": "AZ::Render::EditorMeshComponent", + "Id": 16184381538555246534, + "Controller": { + "Configuration": { + "ModelAsset": { + "assetId": { + "guid": "{E14975EF-E676-51A4-B826-3EF59CB645AA}", + "subId": 285127096 + }, + "assetHint": "testdata/objects/cube/cube.azmodel" + } + } + } + }, + "Component_[17962478023087084794]": { + "$type": "SelectionComponent", + "Id": 17962478023087084794 + }, + "Component_[18071675051915092508]": { + "$type": "EditorEntityIconComponent", + "Id": 18071675051915092508 + }, + "Component_[2115498007879087044]": { + "$type": "EditorInspectorComponent", + "Id": 2115498007879087044, + "ComponentOrderEntryArray": [ + { + "ComponentId": 399415038452606756 + }, + { + "ComponentId": 16184381538555246534, + "SortIndex": 1 + }, + { + "ComponentId": 7827190074535394331, + "SortIndex": 2 + } + ] + }, + "Component_[3518973002096080237]": { + "$type": "EditorOnlyEntityComponent", + "Id": 3518973002096080237 + }, + "Component_[399415038452606756]": { + "$type": "{27F1E1A1-8D9D-4C3B-BD3A-AFB9762449C0} TransformComponent", + "Id": 399415038452606756, + "Parent Entity": "ContainerEntity", + "Transform Data": { + "Translate": [ + 42.53014373779297, + -0.00018183141946792603, + 4.451573371887207 + ] + } + }, + "Component_[4564240319609068082]": { + "$type": "EditorEntitySortComponent", + "Id": 4564240319609068082 + }, + "Component_[7827190074535394331]": { + "$type": "EditorMaterialComponent", + "Id": 7827190074535394331, + "Controller": { + "Configuration": { + "materials": [ + { + "Key": { + "materialSlotStableId": 2418540911 + }, + "Value": { + "MaterialAsset": { + "assetId": { + "guid": "{5BC13D95-377E-53EA-9A93-156384BE8B04}" + }, + "assetHint": "materials/presets/pbr/metal_gold_matte.azmaterial" + } + } + } + ] + } + } + }, + "Component_[8092226976542590265]": { + "$type": "EditorDisabledCompositionComponent", + "Id": 8092226976542590265 + } + } + }, + "Entity_[1205055121364]": { + "Id": "Entity_[1205055121364]", + "Name": "Entity1", + "Components": { + "Component_[11525365929370623807]": { + "$type": "EditorVisibilityComponent", + "Id": 11525365929370623807 + }, + "Component_[12334620273692642550]": { + "$type": "EditorLockComponent", + "Id": 12334620273692642550 + }, + "Component_[14389735759337977675]": { + "$type": "EditorPendingCompositionComponent", + "Id": 14389735759337977675 + }, + "Component_[16184381538555246534]": { + "$type": "AZ::Render::EditorMeshComponent", + "Id": 16184381538555246534, + "Controller": { + "Configuration": { + "ModelAsset": { + "assetId": { + "guid": "{E14975EF-E676-51A4-B826-3EF59CB645AA}", + "subId": 285127096 + }, + "assetHint": "testdata/objects/cube/cube.azmodel" + } + } + } + }, + "Component_[17962478023087084794]": { + "$type": "SelectionComponent", + "Id": 17962478023087084794 + }, + "Component_[18071675051915092508]": { + "$type": "EditorEntityIconComponent", + "Id": 18071675051915092508 + }, + "Component_[2115498007879087044]": { + "$type": "EditorInspectorComponent", + "Id": 2115498007879087044, + "ComponentOrderEntryArray": [ + { + "ComponentId": 399415038452606756 + }, + { + "ComponentId": 16184381538555246534, + "SortIndex": 1 + }, + { + "ComponentId": 7827190074535394331, + "SortIndex": 2 + } + ] + }, + "Component_[3518973002096080237]": { + "$type": "EditorOnlyEntityComponent", + "Id": 3518973002096080237 + }, + "Component_[399415038452606756]": { + "$type": "{27F1E1A1-8D9D-4C3B-BD3A-AFB9762449C0} TransformComponent", + "Id": 399415038452606756, + "Parent Entity": "ContainerEntity", + "Transform Data": { + "Translate": [ + -32.53056335449219, + -0.00018183141946792603, + 59.873046875 + ] + } + }, + "Component_[4564240319609068082]": { + "$type": "EditorEntitySortComponent", + "Id": 4564240319609068082 + }, + "Component_[7827190074535394331]": { + "$type": "EditorMaterialComponent", + "Id": 7827190074535394331, + "Controller": { + "Configuration": { + "materials": [ + { + "Key": { + "materialSlotStableId": 2418540911 + }, + "Value": { + "MaterialAsset": { + "assetId": { + "guid": "{93DF55AE-8D1B-5AD1-A609-05F1BD9F6EA0}" + }, + "assetHint": "materials/presets/pbr/metal_cobalt_polished.azmaterial" + } + } + } + ] + } + } + }, + "Component_[8092226976542590265]": { + "$type": "EditorDisabledCompositionComponent", + "Id": 8092226976542590265 + } + } + }, + "Entity_[1209350088660]": { + "Id": "Entity_[1209350088660]", + "Name": "Entity1", + "Components": { + "Component_[11525365929370623807]": { + "$type": "EditorVisibilityComponent", + "Id": 11525365929370623807 + }, + "Component_[12334620273692642550]": { + "$type": "EditorLockComponent", + "Id": 12334620273692642550 + }, + "Component_[14389735759337977675]": { + "$type": "EditorPendingCompositionComponent", + "Id": 14389735759337977675 + }, + "Component_[16184381538555246534]": { + "$type": "AZ::Render::EditorMeshComponent", + "Id": 16184381538555246534, + "Controller": { + "Configuration": { + "ModelAsset": { + "assetId": { + "guid": "{E14975EF-E676-51A4-B826-3EF59CB645AA}", + "subId": 285127096 + }, + "assetHint": "testdata/objects/cube/cube.azmodel" + } + } + } + }, + "Component_[17962478023087084794]": { + "$type": "SelectionComponent", + "Id": 17962478023087084794 + }, + "Component_[18071675051915092508]": { + "$type": "EditorEntityIconComponent", + "Id": 18071675051915092508 + }, + "Component_[2115498007879087044]": { + "$type": "EditorInspectorComponent", + "Id": 2115498007879087044, + "ComponentOrderEntryArray": [ + { + "ComponentId": 399415038452606756 + }, + { + "ComponentId": 16184381538555246534, + "SortIndex": 1 + }, + { + "ComponentId": 7827190074535394331, + "SortIndex": 2 + } + ] + }, + "Component_[3518973002096080237]": { + "$type": "EditorOnlyEntityComponent", + "Id": 3518973002096080237 + }, + "Component_[399415038452606756]": { + "$type": "{27F1E1A1-8D9D-4C3B-BD3A-AFB9762449C0} TransformComponent", + "Id": 399415038452606756, + "Parent Entity": "ContainerEntity", + "Transform Data": { + "Translate": [ + -22.530563354492188, + -0.00018183141946792603, + 45.14218521118164 + ] + } + }, + "Component_[4564240319609068082]": { + "$type": "EditorEntitySortComponent", + "Id": 4564240319609068082 + }, + "Component_[7827190074535394331]": { + "$type": "EditorMaterialComponent", + "Id": 7827190074535394331, + "Controller": { + "Configuration": { + "materials": [ + { + "Key": { + "materialSlotStableId": 2418540911 + }, + "Value": { + "MaterialAsset": { + "assetId": { + "guid": "{FB4657EB-FB3A-5EC3-A772-DC36D6F733C3}" + }, + "assetHint": "materials/presets/pbr/metal_gold_polished.azmaterial" + } + } + } + ] + } + } + }, + "Component_[8092226976542590265]": { + "$type": "EditorDisabledCompositionComponent", + "Id": 8092226976542590265 + } + } + }, + "Entity_[1213645055956]": { + "Id": "Entity_[1213645055956]", + "Name": "Entity1", + "Components": { + "Component_[11525365929370623807]": { + "$type": "EditorVisibilityComponent", + "Id": 11525365929370623807 + }, + "Component_[12334620273692642550]": { + "$type": "EditorLockComponent", + "Id": 12334620273692642550 + }, + "Component_[14389735759337977675]": { + "$type": "EditorPendingCompositionComponent", + "Id": 14389735759337977675 + }, + "Component_[16184381538555246534]": { + "$type": "AZ::Render::EditorMeshComponent", + "Id": 16184381538555246534, + "Controller": { + "Configuration": { + "ModelAsset": { + "assetId": { + "guid": "{E14975EF-E676-51A4-B826-3EF59CB645AA}", + "subId": 285127096 + }, + "assetHint": "testdata/objects/cube/cube.azmodel" + } + } + } + }, + "Component_[17962478023087084794]": { + "$type": "SelectionComponent", + "Id": 17962478023087084794 + }, + "Component_[18071675051915092508]": { + "$type": "EditorEntityIconComponent", + "Id": 18071675051915092508 + }, + "Component_[2115498007879087044]": { + "$type": "EditorInspectorComponent", + "Id": 2115498007879087044, + "ComponentOrderEntryArray": [ + { + "ComponentId": 399415038452606756 + }, + { + "ComponentId": 16184381538555246534, + "SortIndex": 1 + }, + { + "ComponentId": 7827190074535394331, + "SortIndex": 2 + } + ] + }, + "Component_[3518973002096080237]": { + "$type": "EditorOnlyEntityComponent", + "Id": 3518973002096080237 + }, + "Component_[399415038452606756]": { + "$type": "{27F1E1A1-8D9D-4C3B-BD3A-AFB9762449C0} TransformComponent", + "Id": 399415038452606756, + "Parent Entity": "ContainerEntity", + "Transform Data": { + "Translate": [ + 7.530143737792969, + -0.00018183141946792603, + 89.95755767822266 + ] + } + }, + "Component_[4564240319609068082]": { + "$type": "EditorEntitySortComponent", + "Id": 4564240319609068082 + }, + "Component_[7827190074535394331]": { + "$type": "EditorMaterialComponent", + "Id": 7827190074535394331, + "Controller": { + "Configuration": { + "materials": [ + { + "Key": { + "materialSlotStableId": 2418540911 + }, + "Value": { + "MaterialAsset": { + "assetId": { + "guid": "{2AC06FA3-7670-542E-8996-DF346AFF1B61}" + }, + "assetHint": "materials/presets/pbr/metal_silver_polished.azmaterial" + } + } + } + ] + } + } + }, + "Component_[8092226976542590265]": { + "$type": "EditorDisabledCompositionComponent", + "Id": 8092226976542590265 + } + } + }, + "Entity_[1217940023252]": { + "Id": "Entity_[1217940023252]", + "Name": "Entity1", + "Components": { + "Component_[11525365929370623807]": { + "$type": "EditorVisibilityComponent", + "Id": 11525365929370623807 + }, + "Component_[12334620273692642550]": { + "$type": "EditorLockComponent", + "Id": 12334620273692642550 + }, + "Component_[14389735759337977675]": { + "$type": "EditorPendingCompositionComponent", + "Id": 14389735759337977675 + }, + "Component_[16184381538555246534]": { + "$type": "AZ::Render::EditorMeshComponent", + "Id": 16184381538555246534, + "Controller": { + "Configuration": { + "ModelAsset": { + "assetId": { + "guid": "{E14975EF-E676-51A4-B826-3EF59CB645AA}", + "subId": 285127096 + }, + "assetHint": "testdata/objects/cube/cube.azmodel" + } + } + } + }, + "Component_[17962478023087084794]": { + "$type": "SelectionComponent", + "Id": 17962478023087084794 + }, + "Component_[18071675051915092508]": { + "$type": "EditorEntityIconComponent", + "Id": 18071675051915092508 + }, + "Component_[2115498007879087044]": { + "$type": "EditorInspectorComponent", + "Id": 2115498007879087044, + "ComponentOrderEntryArray": [ + { + "ComponentId": 399415038452606756 + }, + { + "ComponentId": 16184381538555246534, + "SortIndex": 1 + }, + { + "ComponentId": 7827190074535394331, + "SortIndex": 2 + } + ] + }, + "Component_[3518973002096080237]": { + "$type": "EditorOnlyEntityComponent", + "Id": 3518973002096080237 + }, + "Component_[399415038452606756]": { + "$type": "{27F1E1A1-8D9D-4C3B-BD3A-AFB9762449C0} TransformComponent", + "Id": 399415038452606756, + "Parent Entity": "ContainerEntity", + "Transform Data": { + "Translate": [ + 42.53014373779297, + -0.00018183141946792603, + 114.4910659790039 + ] + } + }, + "Component_[4564240319609068082]": { + "$type": "EditorEntitySortComponent", + "Id": 4564240319609068082 + }, + "Component_[7827190074535394331]": { + "$type": "EditorMaterialComponent", + "Id": 7827190074535394331, + "Controller": { + "Configuration": { + "materials": [ + { + "Key": { + "materialSlotStableId": 2418540911 + }, + "Value": { + "MaterialAsset": { + "assetId": { + "guid": "{FE52E7C8-064D-506A-9C26-433EB93747DE}" + }, + "assetHint": "materials/presets/pbr/metal_gold.azmaterial" + } + } + } + ] + } + } + }, + "Component_[8092226976542590265]": { + "$type": "EditorDisabledCompositionComponent", + "Id": 8092226976542590265 + } + } + }, + "Entity_[1222234990548]": { + "Id": "Entity_[1222234990548]", + "Name": "Entity1", + "Components": { + "Component_[11525365929370623807]": { + "$type": "EditorVisibilityComponent", + "Id": 11525365929370623807 + }, + "Component_[12334620273692642550]": { + "$type": "EditorLockComponent", + "Id": 12334620273692642550 + }, + "Component_[14389735759337977675]": { + "$type": "EditorPendingCompositionComponent", + "Id": 14389735759337977675 + }, + "Component_[16184381538555246534]": { + "$type": "AZ::Render::EditorMeshComponent", + "Id": 16184381538555246534, + "Controller": { + "Configuration": { + "ModelAsset": { + "assetId": { + "guid": "{E14975EF-E676-51A4-B826-3EF59CB645AA}", + "subId": 285127096 + }, + "assetHint": "testdata/objects/cube/cube.azmodel" + } + } + } + }, + "Component_[17962478023087084794]": { + "$type": "SelectionComponent", + "Id": 17962478023087084794 + }, + "Component_[18071675051915092508]": { + "$type": "EditorEntityIconComponent", + "Id": 18071675051915092508 + }, + "Component_[2115498007879087044]": { + "$type": "EditorInspectorComponent", + "Id": 2115498007879087044, + "ComponentOrderEntryArray": [ + { + "ComponentId": 399415038452606756 + }, + { + "ComponentId": 16184381538555246534, + "SortIndex": 1 + }, + { + "ComponentId": 7827190074535394331, + "SortIndex": 2 + } + ] + }, + "Component_[3518973002096080237]": { + "$type": "EditorOnlyEntityComponent", + "Id": 3518973002096080237 + }, + "Component_[399415038452606756]": { + "$type": "{27F1E1A1-8D9D-4C3B-BD3A-AFB9762449C0} TransformComponent", + "Id": 399415038452606756, + "Parent Entity": "ContainerEntity", + "Transform Data": { + "Translate": [ + 27.53014373779297, + -0.00018183141946792603, + 114.4910659790039 + ] + } + }, + "Component_[4564240319609068082]": { + "$type": "EditorEntitySortComponent", + "Id": 4564240319609068082 + }, + "Component_[7827190074535394331]": { + "$type": "EditorMaterialComponent", + "Id": 7827190074535394331, + "Controller": { + "Configuration": { + "materials": [ + { + "Key": { + "materialSlotStableId": 2418540911 + }, + "Value": { + "MaterialAsset": { + "assetId": { + "guid": "{B7C712DC-4839-58BB-B522-A4F120084CF5}" + }, + "assetHint": "materials/presets/pbr/metal_chrome.azmaterial" + } + } + } + ] + } + } + }, + "Component_[8092226976542590265]": { + "$type": "EditorDisabledCompositionComponent", + "Id": 8092226976542590265 + } + } + }, + "Entity_[1226529957844]": { + "Id": "Entity_[1226529957844]", + "Name": "Entity1", + "Components": { + "Component_[11525365929370623807]": { + "$type": "EditorVisibilityComponent", + "Id": 11525365929370623807 + }, + "Component_[12334620273692642550]": { + "$type": "EditorLockComponent", + "Id": 12334620273692642550 + }, + "Component_[14389735759337977675]": { + "$type": "EditorPendingCompositionComponent", + "Id": 14389735759337977675 + }, + "Component_[16184381538555246534]": { + "$type": "AZ::Render::EditorMeshComponent", + "Id": 16184381538555246534, + "Controller": { + "Configuration": { + "ModelAsset": { + "assetId": { + "guid": "{E14975EF-E676-51A4-B826-3EF59CB645AA}", + "subId": 285127096 + }, + "assetHint": "testdata/objects/cube/cube.azmodel" + } + } + } + }, + "Component_[17962478023087084794]": { + "$type": "SelectionComponent", + "Id": 17962478023087084794 + }, + "Component_[18071675051915092508]": { + "$type": "EditorEntityIconComponent", + "Id": 18071675051915092508 + }, + "Component_[2115498007879087044]": { + "$type": "EditorInspectorComponent", + "Id": 2115498007879087044, + "ComponentOrderEntryArray": [ + { + "ComponentId": 399415038452606756 + }, + { + "ComponentId": 16184381538555246534, + "SortIndex": 1 + }, + { + "ComponentId": 7827190074535394331, + "SortIndex": 2 + } + ] + }, + "Component_[3518973002096080237]": { + "$type": "EditorOnlyEntityComponent", + "Id": 3518973002096080237 + }, + "Component_[399415038452606756]": { + "$type": "{27F1E1A1-8D9D-4C3B-BD3A-AFB9762449C0} TransformComponent", + "Id": 399415038452606756, + "Parent Entity": "ContainerEntity", + "Transform Data": { + "Translate": [ + -7.5305633544921875, + -0.00018183141946792603, + 0.0 + ] + } + }, + "Component_[4564240319609068082]": { + "$type": "EditorEntitySortComponent", + "Id": 4564240319609068082 + }, + "Component_[7827190074535394331]": { + "$type": "EditorMaterialComponent", + "Id": 7827190074535394331, + "Controller": { + "Configuration": { + "materials": [ + { + "Key": { + "materialSlotStableId": 2418540911 + }, + "Value": { + "MaterialAsset": { + "assetId": { + "guid": "{E66E4343-F45A-536D-AAE1-C4D096420640}" + }, + "assetHint": "materials/presets/pbr/metal_nickel_polished.azmaterial" + } + } + } + ] + } + } + }, + "Component_[8092226976542590265]": { + "$type": "EditorDisabledCompositionComponent", + "Id": 8092226976542590265 + } + } + }, + "Entity_[1230824925140]": { + "Id": "Entity_[1230824925140]", + "Name": "Entity1", + "Components": { + "Component_[1057179753323467068]": { + "$type": "EditorMaterialComponent", + "Id": 1057179753323467068, + "Controller": { + "Configuration": { + "materials": [ + { + "Key": { + "materialSlotStableId": 2418540911 + }, + "Value": { + "MaterialAsset": { + "assetId": { + "guid": "{721188E0-B7CC-5D06-8D5D-39AF8ABF2EF9}" + }, + "assetHint": "materials/presets/pbr/metal_titanium.azmaterial" + } + } + } + ] + } + } + }, + "Component_[11525365929370623807]": { + "$type": "EditorVisibilityComponent", + "Id": 11525365929370623807 + }, + "Component_[12334620273692642550]": { + "$type": "EditorLockComponent", + "Id": 12334620273692642550 + }, + "Component_[14389735759337977675]": { + "$type": "EditorPendingCompositionComponent", + "Id": 14389735759337977675 + }, + "Component_[16184381538555246534]": { + "$type": "AZ::Render::EditorMeshComponent", + "Id": 16184381538555246534, + "Controller": { + "Configuration": { + "ModelAsset": { + "assetId": { + "guid": "{E14975EF-E676-51A4-B826-3EF59CB645AA}", + "subId": 285127096 + }, + "assetHint": "testdata/objects/cube/cube.azmodel" + } + } + } + }, + "Component_[17962478023087084794]": { + "$type": "SelectionComponent", + "Id": 17962478023087084794 + }, + "Component_[18071675051915092508]": { + "$type": "EditorEntityIconComponent", + "Id": 18071675051915092508 + }, + "Component_[2115498007879087044]": { + "$type": "EditorInspectorComponent", + "Id": 2115498007879087044, + "ComponentOrderEntryArray": [ + { + "ComponentId": 399415038452606756 + }, + { + "ComponentId": 16184381538555246534, + "SortIndex": 1 + }, + { + "ComponentId": 1057179753323467068, + "SortIndex": 2 + } + ] + }, + "Component_[3518973002096080237]": { + "$type": "EditorOnlyEntityComponent", + "Id": 3518973002096080237 + }, + "Component_[399415038452606756]": { + "$type": "{27F1E1A1-8D9D-4C3B-BD3A-AFB9762449C0} TransformComponent", + "Id": 399415038452606756, + "Parent Entity": "ContainerEntity", + "Transform Data": { + "Translate": [ + 12.530143737792969, + -0.00018183141946792603, + 114.4910659790039 + ] + } + }, + "Component_[4564240319609068082]": { + "$type": "EditorEntitySortComponent", + "Id": 4564240319609068082 + }, + "Component_[8092226976542590265]": { + "$type": "EditorDisabledCompositionComponent", + "Id": 8092226976542590265 + } + } + }, + "Entity_[1235119892436]": { + "Id": "Entity_[1235119892436]", + "Name": "Entity1", + "Components": { + "Component_[11525365929370623807]": { + "$type": "EditorVisibilityComponent", + "Id": 11525365929370623807 + }, + "Component_[12334620273692642550]": { + "$type": "EditorLockComponent", + "Id": 12334620273692642550 + }, + "Component_[14389735759337977675]": { + "$type": "EditorPendingCompositionComponent", + "Id": 14389735759337977675 + }, + "Component_[16184381538555246534]": { + "$type": "AZ::Render::EditorMeshComponent", + "Id": 16184381538555246534, + "Controller": { + "Configuration": { + "ModelAsset": { + "assetId": { + "guid": "{E14975EF-E676-51A4-B826-3EF59CB645AA}", + "subId": 285127096 + }, + "assetHint": "testdata/objects/cube/cube.azmodel" + } + } + } + }, + "Component_[17962478023087084794]": { + "$type": "SelectionComponent", + "Id": 17962478023087084794 + }, + "Component_[18071675051915092508]": { + "$type": "EditorEntityIconComponent", + "Id": 18071675051915092508 + }, + "Component_[2115498007879087044]": { + "$type": "EditorInspectorComponent", + "Id": 2115498007879087044, + "ComponentOrderEntryArray": [ + { + "ComponentId": 399415038452606756 + }, + { + "ComponentId": 16184381538555246534, + "SortIndex": 1 + }, + { + "ComponentId": 7827190074535394331, + "SortIndex": 2 + } + ] + }, + "Component_[3518973002096080237]": { + "$type": "EditorOnlyEntityComponent", + "Id": 3518973002096080237 + }, + "Component_[399415038452606756]": { + "$type": "{27F1E1A1-8D9D-4C3B-BD3A-AFB9762449C0} TransformComponent", + "Id": 399415038452606756, + "Parent Entity": "ContainerEntity", + "Transform Data": { + "Translate": [ + 17.53014373779297, + -0.00018183141946792603, + 54.618019104003906 + ] + } + }, + "Component_[4564240319609068082]": { + "$type": "EditorEntitySortComponent", + "Id": 4564240319609068082 + }, + "Component_[7827190074535394331]": { + "$type": "EditorMaterialComponent", + "Id": 7827190074535394331, + "Controller": { + "Configuration": { + "materials": [ + { + "Key": {}, + "Value": { + "MaterialAsset": { + "assetId": { + "guid": "{721188E0-B7CC-5D06-8D5D-39AF8ABF2EF9}" + }, + "assetHint": "materials/presets/pbr/metal_titanium.azmaterial" + } + } + }, + { + "Key": { + "materialSlotStableId": 2418540911 + }, + "Value": { + "MaterialAsset": { + "assetId": { + "guid": "{94CF2BD7-7D09-5577-B1D8-3FF85B15E127}" + }, + "assetHint": "materials/presets/pbr/metal_aluminum.azmaterial" + } + } + } + ] + } + } + }, + "Component_[8092226976542590265]": { + "$type": "EditorDisabledCompositionComponent", + "Id": 8092226976542590265 + } + } + }, + "Entity_[1239414859732]": { + "Id": "Entity_[1239414859732]", + "Name": "Entity1", + "Components": { + "Component_[11525365929370623807]": { + "$type": "EditorVisibilityComponent", + "Id": 11525365929370623807 + }, + "Component_[12334620273692642550]": { + "$type": "EditorLockComponent", + "Id": 12334620273692642550 + }, + "Component_[14389735759337977675]": { + "$type": "EditorPendingCompositionComponent", + "Id": 14389735759337977675 + }, + "Component_[16184381538555246534]": { + "$type": "AZ::Render::EditorMeshComponent", + "Id": 16184381538555246534, + "Controller": { + "Configuration": { + "ModelAsset": { + "assetId": { + "guid": "{E14975EF-E676-51A4-B826-3EF59CB645AA}", + "subId": 285127096 + }, + "assetHint": "testdata/objects/cube/cube.azmodel" + } + } + } + }, + "Component_[17962478023087084794]": { + "$type": "SelectionComponent", + "Id": 17962478023087084794 + }, + "Component_[18071675051915092508]": { + "$type": "EditorEntityIconComponent", + "Id": 18071675051915092508 + }, + "Component_[2115498007879087044]": { + "$type": "EditorInspectorComponent", + "Id": 2115498007879087044, + "ComponentOrderEntryArray": [ + { + "ComponentId": 399415038452606756 + }, + { + "ComponentId": 16184381538555246534, + "SortIndex": 1 + }, + { + "ComponentId": 7827190074535394331, + "SortIndex": 2 + } + ] + }, + "Component_[3518973002096080237]": { + "$type": "EditorOnlyEntityComponent", + "Id": 3518973002096080237 + }, + "Component_[399415038452606756]": { + "$type": "{27F1E1A1-8D9D-4C3B-BD3A-AFB9762449C0} TransformComponent", + "Id": 399415038452606756, + "Parent Entity": "ContainerEntity", + "Transform Data": { + "Translate": [ + -47.53056335449219, + -0.00018183141946792603, + 94.40913391113281 + ] + } + }, + "Component_[4564240319609068082]": { + "$type": "EditorEntitySortComponent", + "Id": 4564240319609068082 + }, + "Component_[7827190074535394331]": { + "$type": "EditorMaterialComponent", + "Id": 7827190074535394331, + "Controller": { + "Configuration": { + "materials": [ + { + "Key": { + "materialSlotStableId": 2418540911 + }, + "Value": { + "MaterialAsset": { + "assetId": { + "guid": "{549D26B8-881D-569F-AF05-961F36A43F4F}" + }, + "assetHint": "materials/presets/pbr/metal_aluminum_matte.azmaterial" + } + } + } + ] + } + } + }, + "Component_[8092226976542590265]": { + "$type": "EditorDisabledCompositionComponent", + "Id": 8092226976542590265 + } + } + }, + "Entity_[1243709827028]": { + "Id": "Entity_[1243709827028]", + "Name": "Entity1", + "Components": { + "Component_[11525365929370623807]": { + "$type": "EditorVisibilityComponent", + "Id": 11525365929370623807 + }, + "Component_[12334620273692642550]": { + "$type": "EditorLockComponent", + "Id": 12334620273692642550 + }, + "Component_[14389735759337977675]": { + "$type": "EditorPendingCompositionComponent", + "Id": 14389735759337977675 + }, + "Component_[16184381538555246534]": { + "$type": "AZ::Render::EditorMeshComponent", + "Id": 16184381538555246534, + "Controller": { + "Configuration": { + "ModelAsset": { + "assetId": { + "guid": "{E14975EF-E676-51A4-B826-3EF59CB645AA}", + "subId": 285127096 + }, + "assetHint": "testdata/objects/cube/cube.azmodel" + } + } + } + }, + "Component_[17962478023087084794]": { + "$type": "SelectionComponent", + "Id": 17962478023087084794 + }, + "Component_[18071675051915092508]": { + "$type": "EditorEntityIconComponent", + "Id": 18071675051915092508 + }, + "Component_[2115498007879087044]": { + "$type": "EditorInspectorComponent", + "Id": 2115498007879087044, + "ComponentOrderEntryArray": [ + { + "ComponentId": 399415038452606756 + }, + { + "ComponentId": 16184381538555246534, + "SortIndex": 1 + }, + { + "ComponentId": 7827190074535394331, + "SortIndex": 2 + } + ] + }, + "Component_[3518973002096080237]": { + "$type": "EditorOnlyEntityComponent", + "Id": 3518973002096080237 + }, + "Component_[399415038452606756]": { + "$type": "{27F1E1A1-8D9D-4C3B-BD3A-AFB9762449C0} TransformComponent", + "Id": 399415038452606756, + "Parent Entity": "ContainerEntity", + "Transform Data": { + "Translate": [ + 7.530143737792969, + -0.00018183141946792603, + 84.40655517578125 + ] + } + }, + "Component_[4564240319609068082]": { + "$type": "EditorEntitySortComponent", + "Id": 4564240319609068082 + }, + "Component_[7827190074535394331]": { + "$type": "EditorMaterialComponent", + "Id": 7827190074535394331, + "Controller": { + "Configuration": { + "materials": [ + { + "Key": { + "materialSlotStableId": 2418540911 + }, + "Value": { + "MaterialAsset": { + "assetId": { + "guid": "{CDA13277-5EAB-5E2A-93F5-B7003597FBCE}" + }, + "assetHint": "materials/presets/pbr/metal_silver.azmaterial" + } + } + } + ] + } + } + }, + "Component_[8092226976542590265]": { + "$type": "EditorDisabledCompositionComponent", + "Id": 8092226976542590265 + } + } + }, + "Entity_[1248004794324]": { + "Id": "Entity_[1248004794324]", + "Name": "Entity1", + "Components": { + "Component_[11525365929370623807]": { + "$type": "EditorVisibilityComponent", + "Id": 11525365929370623807 + }, + "Component_[12334620273692642550]": { + "$type": "EditorLockComponent", + "Id": 12334620273692642550 + }, + "Component_[14389735759337977675]": { + "$type": "EditorPendingCompositionComponent", + "Id": 14389735759337977675 + }, + "Component_[16184381538555246534]": { + "$type": "AZ::Render::EditorMeshComponent", + "Id": 16184381538555246534, + "Controller": { + "Configuration": { + "ModelAsset": { + "assetId": { + "guid": "{E14975EF-E676-51A4-B826-3EF59CB645AA}", + "subId": 285127096 + }, + "assetHint": "testdata/objects/cube/cube.azmodel" + } + } + } + }, + "Component_[17962478023087084794]": { + "$type": "SelectionComponent", + "Id": 17962478023087084794 + }, + "Component_[18071675051915092508]": { + "$type": "EditorEntityIconComponent", + "Id": 18071675051915092508 + }, + "Component_[2115498007879087044]": { + "$type": "EditorInspectorComponent", + "Id": 2115498007879087044, + "ComponentOrderEntryArray": [ + { + "ComponentId": 399415038452606756 + }, + { + "ComponentId": 16184381538555246534, + "SortIndex": 1 + }, + { + "ComponentId": 7827190074535394331, + "SortIndex": 2 + } + ] + }, + "Component_[3518973002096080237]": { + "$type": "EditorOnlyEntityComponent", + "Id": 3518973002096080237 + }, + "Component_[399415038452606756]": { + "$type": "{27F1E1A1-8D9D-4C3B-BD3A-AFB9762449C0} TransformComponent", + "Id": 399415038452606756, + "Parent Entity": "ContainerEntity", + "Transform Data": { + "Translate": [ + 32.53014373779297, + -0.00018183141946792603, + 9.475835800170898 + ] + } + }, + "Component_[4564240319609068082]": { + "$type": "EditorEntitySortComponent", + "Id": 4564240319609068082 + }, + "Component_[7827190074535394331]": { + "$type": "EditorMaterialComponent", + "Id": 7827190074535394331, + "Controller": { + "Configuration": { + "materials": [ + { + "Key": { + "materialSlotStableId": 2418540911 + }, + "Value": { + "MaterialAsset": { + "assetId": { + "guid": "{99976D73-6248-5D66-AD15-E8F52B0AFE36}" + }, + "assetHint": "materials/presets/pbr/metal_cobalt.azmaterial" + } + } + } + ] + } + } + }, + "Component_[8092226976542590265]": { + "$type": "EditorDisabledCompositionComponent", + "Id": 8092226976542590265 + } + } + }, + "Entity_[1252299761620]": { + "Id": "Entity_[1252299761620]", + "Name": "Entity1", + "Components": { + "Component_[11525365929370623807]": { + "$type": "EditorVisibilityComponent", + "Id": 11525365929370623807 + }, + "Component_[12334620273692642550]": { + "$type": "EditorLockComponent", + "Id": 12334620273692642550 + }, + "Component_[14389735759337977675]": { + "$type": "EditorPendingCompositionComponent", + "Id": 14389735759337977675 + }, + "Component_[16184381538555246534]": { + "$type": "AZ::Render::EditorMeshComponent", + "Id": 16184381538555246534, + "Controller": { + "Configuration": { + "ModelAsset": { + "assetId": { + "guid": "{E14975EF-E676-51A4-B826-3EF59CB645AA}", + "subId": 285127096 + }, + "assetHint": "testdata/objects/cube/cube.azmodel" + } + } + } + }, + "Component_[17962478023087084794]": { + "$type": "SelectionComponent", + "Id": 17962478023087084794 + }, + "Component_[18071675051915092508]": { + "$type": "EditorEntityIconComponent", + "Id": 18071675051915092508 + }, + "Component_[2115498007879087044]": { + "$type": "EditorInspectorComponent", + "Id": 2115498007879087044, + "ComponentOrderEntryArray": [ + { + "ComponentId": 399415038452606756 + }, + { + "ComponentId": 16184381538555246534, + "SortIndex": 1 + }, + { + "ComponentId": 7827190074535394331, + "SortIndex": 2 + } + ] + }, + "Component_[3518973002096080237]": { + "$type": "EditorOnlyEntityComponent", + "Id": 3518973002096080237 + }, + "Component_[399415038452606756]": { + "$type": "{27F1E1A1-8D9D-4C3B-BD3A-AFB9762449C0} TransformComponent", + "Id": 399415038452606756, + "Parent Entity": "ContainerEntity", + "Transform Data": { + "Translate": [ + 7.530143737792969, + -0.00018183141946792603, + 105.0152359008789 + ] + } + }, + "Component_[4564240319609068082]": { + "$type": "EditorEntitySortComponent", + "Id": 4564240319609068082 + }, + "Component_[7827190074535394331]": { + "$type": "EditorMaterialComponent", + "Id": 7827190074535394331, + "Controller": { + "Configuration": { + "materials": [ + { + "Key": { + "materialSlotStableId": 2418540911 + }, + "Value": { + "MaterialAsset": { + "assetId": { + "guid": "{2AC06FA3-7670-542E-8996-DF346AFF1B61}" + }, + "assetHint": "materials/presets/pbr/metal_silver_polished.azmaterial" + } + } + } + ] + } + } + }, + "Component_[8092226976542590265]": { + "$type": "EditorDisabledCompositionComponent", + "Id": 8092226976542590265 + } + } + }, + "Entity_[1256594728916]": { + "Id": "Entity_[1256594728916]", + "Name": "Entity1", + "Components": { + "Component_[11525365929370623807]": { + "$type": "EditorVisibilityComponent", + "Id": 11525365929370623807 + }, + "Component_[12334620273692642550]": { + "$type": "EditorLockComponent", + "Id": 12334620273692642550 + }, + "Component_[14389735759337977675]": { + "$type": "EditorPendingCompositionComponent", + "Id": 14389735759337977675 + }, + "Component_[16184381538555246534]": { + "$type": "AZ::Render::EditorMeshComponent", + "Id": 16184381538555246534, + "Controller": { + "Configuration": { + "ModelAsset": { + "assetId": { + "guid": "{E14975EF-E676-51A4-B826-3EF59CB645AA}", + "subId": 285127096 + }, + "assetHint": "testdata/objects/cube/cube.azmodel" + } + } + } + }, + "Component_[17962478023087084794]": { + "$type": "SelectionComponent", + "Id": 17962478023087084794 + }, + "Component_[18071675051915092508]": { + "$type": "EditorEntityIconComponent", + "Id": 18071675051915092508 + }, + "Component_[2115498007879087044]": { + "$type": "EditorInspectorComponent", + "Id": 2115498007879087044, + "ComponentOrderEntryArray": [ + { + "ComponentId": 399415038452606756 + }, + { + "ComponentId": 16184381538555246534, + "SortIndex": 1 + }, + { + "ComponentId": 7827190074535394331, + "SortIndex": 2 + } + ] + }, + "Component_[3518973002096080237]": { + "$type": "EditorOnlyEntityComponent", + "Id": 3518973002096080237 + }, + "Component_[399415038452606756]": { + "$type": "{27F1E1A1-8D9D-4C3B-BD3A-AFB9762449C0} TransformComponent", + "Id": 399415038452606756, + "Parent Entity": "ContainerEntity", + "Transform Data": { + "Translate": [ + -22.530563354492188, + -0.00018183141946792603, + 34.53608703613281 + ] + } + }, + "Component_[4564240319609068082]": { + "$type": "EditorEntitySortComponent", + "Id": 4564240319609068082 + }, + "Component_[7827190074535394331]": { + "$type": "EditorMaterialComponent", + "Id": 7827190074535394331, + "Controller": { + "Configuration": { + "materials": [ + { + "Key": { + "materialSlotStableId": 2418540911 + }, + "Value": { + "MaterialAsset": { + "assetId": { + "guid": "{5BC13D95-377E-53EA-9A93-156384BE8B04}" + }, + "assetHint": "materials/presets/pbr/metal_gold_matte.azmaterial" + } + } + } + ] + } + } + }, + "Component_[8092226976542590265]": { + "$type": "EditorDisabledCompositionComponent", + "Id": 8092226976542590265 + } + } + }, + "Entity_[1260889696212]": { + "Id": "Entity_[1260889696212]", + "Name": "Entity1", + "Components": { + "Component_[11525365929370623807]": { + "$type": "EditorVisibilityComponent", + "Id": 11525365929370623807 + }, + "Component_[12334620273692642550]": { + "$type": "EditorLockComponent", + "Id": 12334620273692642550 + }, + "Component_[14389735759337977675]": { + "$type": "EditorPendingCompositionComponent", + "Id": 14389735759337977675 + }, + "Component_[16184381538555246534]": { + "$type": "AZ::Render::EditorMeshComponent", + "Id": 16184381538555246534, + "Controller": { + "Configuration": { + "ModelAsset": { + "assetId": { + "guid": "{E14975EF-E676-51A4-B826-3EF59CB645AA}", + "subId": 285127096 + }, + "assetHint": "testdata/objects/cube/cube.azmodel" + } + } + } + }, + "Component_[17962478023087084794]": { + "$type": "SelectionComponent", + "Id": 17962478023087084794 + }, + "Component_[18071675051915092508]": { + "$type": "EditorEntityIconComponent", + "Id": 18071675051915092508 + }, + "Component_[2115498007879087044]": { + "$type": "EditorInspectorComponent", + "Id": 2115498007879087044, + "ComponentOrderEntryArray": [ + { + "ComponentId": 399415038452606756 + }, + { + "ComponentId": 16184381538555246534, + "SortIndex": 1 + }, + { + "ComponentId": 7827190074535394331, + "SortIndex": 2 + } + ] + }, + "Component_[3518973002096080237]": { + "$type": "EditorOnlyEntityComponent", + "Id": 3518973002096080237 + }, + "Component_[399415038452606756]": { + "$type": "{27F1E1A1-8D9D-4C3B-BD3A-AFB9762449C0} TransformComponent", + "Id": 399415038452606756, + "Parent Entity": "ContainerEntity", + "Transform Data": { + "Translate": [ + -37.53056335449219, + -0.00018183141946792603, + 15.057670593261719 + ] + } + }, + "Component_[4564240319609068082]": { + "$type": "EditorEntitySortComponent", + "Id": 4564240319609068082 + }, + "Component_[7827190074535394331]": { + "$type": "EditorMaterialComponent", + "Id": 7827190074535394331, + "Controller": { + "Configuration": { + "materials": [ + { + "Key": { + "materialSlotStableId": 2418540911 + }, + "Value": { + "MaterialAsset": { + "assetId": { + "guid": "{CAF50181-3384-5DF2-9304-C6E48E83C72D}" + }, + "assetHint": "materials/presets/pbr/metal_chrome_polished.azmaterial" + } + } + } + ] + } + } + }, + "Component_[8092226976542590265]": { + "$type": "EditorDisabledCompositionComponent", + "Id": 8092226976542590265 + } + } + }, + "Entity_[1265184663508]": { + "Id": "Entity_[1265184663508]", + "Name": "Entity1", + "Components": { + "Component_[11525365929370623807]": { + "$type": "EditorVisibilityComponent", + "Id": 11525365929370623807 + }, + "Component_[12334620273692642550]": { + "$type": "EditorLockComponent", + "Id": 12334620273692642550 + }, + "Component_[14389735759337977675]": { + "$type": "EditorPendingCompositionComponent", + "Id": 14389735759337977675 + }, + "Component_[16184381538555246534]": { + "$type": "AZ::Render::EditorMeshComponent", + "Id": 16184381538555246534, + "Controller": { + "Configuration": { + "ModelAsset": { + "assetId": { + "guid": "{E14975EF-E676-51A4-B826-3EF59CB645AA}", + "subId": 285127096 + }, + "assetHint": "testdata/objects/cube/cube.azmodel" + } + } + } + }, + "Component_[17962478023087084794]": { + "$type": "SelectionComponent", + "Id": 17962478023087084794 + }, + "Component_[18071675051915092508]": { + "$type": "EditorEntityIconComponent", + "Id": 18071675051915092508 + }, + "Component_[2115498007879087044]": { + "$type": "EditorInspectorComponent", + "Id": 2115498007879087044, + "ComponentOrderEntryArray": [ + { + "ComponentId": 399415038452606756 + }, + { + "ComponentId": 16184381538555246534, + "SortIndex": 1 + }, + { + "ComponentId": 7827190074535394331, + "SortIndex": 2 + } + ] + }, + "Component_[3518973002096080237]": { + "$type": "EditorOnlyEntityComponent", + "Id": 3518973002096080237 + }, + "Component_[399415038452606756]": { + "$type": "{27F1E1A1-8D9D-4C3B-BD3A-AFB9762449C0} TransformComponent", + "Id": 399415038452606756, + "Parent Entity": "ContainerEntity", + "Transform Data": { + "Translate": [ + -7.5305633544921875, + -0.00018183141946792603, + 59.873046875 + ] + } + }, + "Component_[4564240319609068082]": { + "$type": "EditorEntitySortComponent", + "Id": 4564240319609068082 + }, + "Component_[7827190074535394331]": { + "$type": "EditorMaterialComponent", + "Id": 7827190074535394331, + "Controller": { + "Configuration": { + "materials": [ + { + "Key": { + "materialSlotStableId": 2418540911 + }, + "Value": { + "MaterialAsset": { + "assetId": { + "guid": "{E66E4343-F45A-536D-AAE1-C4D096420640}" + }, + "assetHint": "materials/presets/pbr/metal_nickel_polished.azmaterial" + } + } + } + ] + } + } + }, + "Component_[8092226976542590265]": { + "$type": "EditorDisabledCompositionComponent", + "Id": 8092226976542590265 + } + } + }, + "Entity_[1269479630804]": { + "Id": "Entity_[1269479630804]", + "Name": "Entity1", + "Components": { + "Component_[11525365929370623807]": { + "$type": "EditorVisibilityComponent", + "Id": 11525365929370623807 + }, + "Component_[12334620273692642550]": { + "$type": "EditorLockComponent", + "Id": 12334620273692642550 + }, + "Component_[14389735759337977675]": { + "$type": "EditorPendingCompositionComponent", + "Id": 14389735759337977675 + }, + "Component_[16184381538555246534]": { + "$type": "AZ::Render::EditorMeshComponent", + "Id": 16184381538555246534, + "Controller": { + "Configuration": { + "ModelAsset": { + "assetId": { + "guid": "{E14975EF-E676-51A4-B826-3EF59CB645AA}", + "subId": 285127096 + }, + "assetHint": "testdata/objects/cube/cube.azmodel" + } + } + } + }, + "Component_[17962478023087084794]": { + "$type": "SelectionComponent", + "Id": 17962478023087084794 + }, + "Component_[18071675051915092508]": { + "$type": "EditorEntityIconComponent", + "Id": 18071675051915092508 + }, + "Component_[2115498007879087044]": { + "$type": "EditorInspectorComponent", + "Id": 2115498007879087044, + "ComponentOrderEntryArray": [ + { + "ComponentId": 399415038452606756 + }, + { + "ComponentId": 16184381538555246534, + "SortIndex": 1 + }, + { + "ComponentId": 7827190074535394331, + "SortIndex": 2 + } + ] + }, + "Component_[3518973002096080237]": { + "$type": "EditorOnlyEntityComponent", + "Id": 3518973002096080237 + }, + "Component_[399415038452606756]": { + "$type": "{27F1E1A1-8D9D-4C3B-BD3A-AFB9762449C0} TransformComponent", + "Id": 399415038452606756, + "Parent Entity": "ContainerEntity", + "Transform Data": { + "Translate": [ + -37.53056335449219, + -0.00018183141946792603, + 64.32462310791016 + ] + } + }, + "Component_[4564240319609068082]": { + "$type": "EditorEntitySortComponent", + "Id": 4564240319609068082 + }, + "Component_[7827190074535394331]": { + "$type": "EditorMaterialComponent", + "Id": 7827190074535394331, + "Controller": { + "Configuration": { + "materials": [ + { + "Key": { + "materialSlotStableId": 2418540911 + }, + "Value": { + "MaterialAsset": { + "assetId": { + "guid": "{A78EA2FC-688B-5E3A-A7F6-DB413D11D4CF}" + }, + "assetHint": "materials/presets/pbr/metal_chrome_matte.azmaterial" + } + } + } + ] + } + } + }, + "Component_[8092226976542590265]": { + "$type": "EditorDisabledCompositionComponent", + "Id": 8092226976542590265 + } + } + }, + "Entity_[1273774598100]": { + "Id": "Entity_[1273774598100]", + "Name": "Entity1", + "Components": { + "Component_[11525365929370623807]": { + "$type": "EditorVisibilityComponent", + "Id": 11525365929370623807 + }, + "Component_[12334620273692642550]": { + "$type": "EditorLockComponent", + "Id": 12334620273692642550 + }, + "Component_[14389735759337977675]": { + "$type": "EditorPendingCompositionComponent", + "Id": 14389735759337977675 + }, + "Component_[16184381538555246534]": { + "$type": "AZ::Render::EditorMeshComponent", + "Id": 16184381538555246534, + "Controller": { + "Configuration": { + "ModelAsset": { + "assetId": { + "guid": "{E14975EF-E676-51A4-B826-3EF59CB645AA}", + "subId": 285127096 + }, + "assetHint": "testdata/objects/cube/cube.azmodel" + } + } + } + }, + "Component_[17962478023087084794]": { + "$type": "SelectionComponent", + "Id": 17962478023087084794 + }, + "Component_[18071675051915092508]": { + "$type": "EditorEntityIconComponent", + "Id": 18071675051915092508 + }, + "Component_[2115498007879087044]": { + "$type": "EditorInspectorComponent", + "Id": 2115498007879087044, + "ComponentOrderEntryArray": [ + { + "ComponentId": 399415038452606756 + }, + { + "ComponentId": 16184381538555246534, + "SortIndex": 1 + }, + { + "ComponentId": 7827190074535394331, + "SortIndex": 2 + } + ] + }, + "Component_[3518973002096080237]": { + "$type": "EditorOnlyEntityComponent", + "Id": 3518973002096080237 + }, + "Component_[399415038452606756]": { + "$type": "{27F1E1A1-8D9D-4C3B-BD3A-AFB9762449C0} TransformComponent", + "Id": 399415038452606756, + "Parent Entity": "ContainerEntity", + "Transform Data": { + "Translate": [ + -47.53056335449219, + -0.00018183141946792603, + 99.43339538574219 + ] + } + }, + "Component_[4564240319609068082]": { + "$type": "EditorEntitySortComponent", + "Id": 4564240319609068082 + }, + "Component_[7827190074535394331]": { + "$type": "EditorMaterialComponent", + "Id": 7827190074535394331, + "Controller": { + "Configuration": { + "materials": [ + { + "Key": { + "materialSlotStableId": 2418540911 + }, + "Value": { + "MaterialAsset": { + "assetId": { + "guid": "{94CF2BD7-7D09-5577-B1D8-3FF85B15E127}" + }, + "assetHint": "materials/presets/pbr/metal_aluminum.azmaterial" + } + } + } + ] + } + } + }, + "Component_[8092226976542590265]": { + "$type": "EditorDisabledCompositionComponent", + "Id": 8092226976542590265 + } + } + }, + "Entity_[1278069565396]": { + "Id": "Entity_[1278069565396]", + "Name": "Entity1", + "Components": { + "Component_[11525365929370623807]": { + "$type": "EditorVisibilityComponent", + "Id": 11525365929370623807 + }, + "Component_[12334620273692642550]": { + "$type": "EditorLockComponent", + "Id": 12334620273692642550 + }, + "Component_[14389735759337977675]": { + "$type": "EditorPendingCompositionComponent", + "Id": 14389735759337977675 + }, + "Component_[16184381538555246534]": { + "$type": "AZ::Render::EditorMeshComponent", + "Id": 16184381538555246534, + "Controller": { + "Configuration": { + "ModelAsset": { + "assetId": { + "guid": "{E14975EF-E676-51A4-B826-3EF59CB645AA}", + "subId": 285127096 + }, + "assetHint": "testdata/objects/cube/cube.azmodel" + } + } + } + }, + "Component_[17962478023087084794]": { + "$type": "SelectionComponent", + "Id": 17962478023087084794 + }, + "Component_[18071675051915092508]": { + "$type": "EditorEntityIconComponent", + "Id": 18071675051915092508 + }, + "Component_[2115498007879087044]": { + "$type": "EditorInspectorComponent", + "Id": 2115498007879087044, + "ComponentOrderEntryArray": [ + { + "ComponentId": 399415038452606756 + }, + { + "ComponentId": 16184381538555246534, + "SortIndex": 1 + }, + { + "ComponentId": 7827190074535394331, + "SortIndex": 2 + } + ] + }, + "Component_[3518973002096080237]": { + "$type": "EditorOnlyEntityComponent", + "Id": 3518973002096080237 + }, + "Component_[399415038452606756]": { + "$type": "{27F1E1A1-8D9D-4C3B-BD3A-AFB9762449C0} TransformComponent", + "Id": 399415038452606756, + "Parent Entity": "ContainerEntity", + "Transform Data": { + "Translate": [ + -37.53056335449219, + -0.00018183141946792603, + 109.46680450439453 + ] + } + }, + "Component_[4564240319609068082]": { + "$type": "EditorEntitySortComponent", + "Id": 4564240319609068082 + }, + "Component_[7827190074535394331]": { + "$type": "EditorMaterialComponent", + "Id": 7827190074535394331, + "Controller": { + "Configuration": { + "materials": [ + { + "Key": { + "materialSlotStableId": 2418540911 + }, + "Value": { + "MaterialAsset": { + "assetId": { + "guid": "{A78EA2FC-688B-5E3A-A7F6-DB413D11D4CF}" + }, + "assetHint": "materials/presets/pbr/metal_chrome_matte.azmaterial" + } + } + } + ] + } + } + }, + "Component_[8092226976542590265]": { + "$type": "EditorDisabledCompositionComponent", + "Id": 8092226976542590265 + } + } + }, + "Entity_[1282364532692]": { + "Id": "Entity_[1282364532692]", + "Name": "Entity1", + "Components": { + "Component_[11525365929370623807]": { + "$type": "EditorVisibilityComponent", + "Id": 11525365929370623807 + }, + "Component_[12334620273692642550]": { + "$type": "EditorLockComponent", + "Id": 12334620273692642550 + }, + "Component_[14389735759337977675]": { + "$type": "EditorPendingCompositionComponent", + "Id": 14389735759337977675 + }, + "Component_[16184381538555246534]": { + "$type": "AZ::Render::EditorMeshComponent", + "Id": 16184381538555246534, + "Controller": { + "Configuration": { + "ModelAsset": { + "assetId": { + "guid": "{E14975EF-E676-51A4-B826-3EF59CB645AA}", + "subId": 285127096 + }, + "assetHint": "testdata/objects/cube/cube.azmodel" + } + } + } + }, + "Component_[17962478023087084794]": { + "$type": "SelectionComponent", + "Id": 17962478023087084794 + }, + "Component_[18071675051915092508]": { + "$type": "EditorEntityIconComponent", + "Id": 18071675051915092508 + }, + "Component_[2115498007879087044]": { + "$type": "EditorInspectorComponent", + "Id": 2115498007879087044, + "ComponentOrderEntryArray": [ + { + "ComponentId": 399415038452606756 + }, + { + "ComponentId": 16184381538555246534, + "SortIndex": 1 + }, + { + "ComponentId": 7827190074535394331, + "SortIndex": 2 + } + ] + }, + "Component_[3518973002096080237]": { + "$type": "EditorOnlyEntityComponent", + "Id": 3518973002096080237 + }, + "Component_[399415038452606756]": { + "$type": "{27F1E1A1-8D9D-4C3B-BD3A-AFB9762449C0} TransformComponent", + "Id": 399415038452606756, + "Parent Entity": "ContainerEntity", + "Transform Data": { + "Translate": [ + -32.53056335449219, + -0.00018183141946792603, + 109.46680450439453 + ] + } + }, + "Component_[4564240319609068082]": { + "$type": "EditorEntitySortComponent", + "Id": 4564240319609068082 + }, + "Component_[7827190074535394331]": { + "$type": "EditorMaterialComponent", + "Id": 7827190074535394331, + "Controller": { + "Configuration": { + "materials": [ + { + "Key": { + "materialSlotStableId": 2418540911 + }, + "Value": { + "MaterialAsset": { + "assetId": { + "guid": "{C60A39AF-BB76-51BD-9468-A88C9A6F78D7}" + }, + "assetHint": "materials/presets/pbr/metal_cobalt_matte.azmaterial" + } + } + } + ] + } + } + }, + "Component_[8092226976542590265]": { + "$type": "EditorDisabledCompositionComponent", + "Id": 8092226976542590265 + } + } + }, + "Entity_[1286659499988]": { + "Id": "Entity_[1286659499988]", + "Name": "Entity1", + "Components": { + "Component_[11525365929370623807]": { + "$type": "EditorVisibilityComponent", + "Id": 11525365929370623807 + }, + "Component_[12334620273692642550]": { + "$type": "EditorLockComponent", + "Id": 12334620273692642550 + }, + "Component_[14389735759337977675]": { + "$type": "EditorPendingCompositionComponent", + "Id": 14389735759337977675 + }, + "Component_[16184381538555246534]": { + "$type": "AZ::Render::EditorMeshComponent", + "Id": 16184381538555246534, + "Controller": { + "Configuration": { + "ModelAsset": { + "assetId": { + "guid": "{E14975EF-E676-51A4-B826-3EF59CB645AA}", + "subId": 285127096 + }, + "assetHint": "testdata/objects/cube/cube.azmodel" + } + } + } + }, + "Component_[17962478023087084794]": { + "$type": "SelectionComponent", + "Id": 17962478023087084794 + }, + "Component_[18071675051915092508]": { + "$type": "EditorEntityIconComponent", + "Id": 18071675051915092508 + }, + "Component_[2115498007879087044]": { + "$type": "EditorInspectorComponent", + "Id": 2115498007879087044, + "ComponentOrderEntryArray": [ + { + "ComponentId": 399415038452606756 + }, + { + "ComponentId": 16184381538555246534, + "SortIndex": 1 + }, + { + "ComponentId": 7827190074535394331, + "SortIndex": 2 + } + ] + }, + "Component_[3518973002096080237]": { + "$type": "EditorOnlyEntityComponent", + "Id": 3518973002096080237 + }, + "Component_[399415038452606756]": { + "$type": "{27F1E1A1-8D9D-4C3B-BD3A-AFB9762449C0} TransformComponent", + "Id": 399415038452606756, + "Parent Entity": "ContainerEntity", + "Transform Data": { + "Translate": [ + 37.53014373779297, + -0.00018183141946792603, + 105.0152359008789 + ] + } + }, + "Component_[4564240319609068082]": { + "$type": "EditorEntitySortComponent", + "Id": 4564240319609068082 + }, + "Component_[7827190074535394331]": { + "$type": "EditorMaterialComponent", + "Id": 7827190074535394331, + "Controller": { + "Configuration": { + "materials": [ + { + "Key": { + "materialSlotStableId": 2418540911 + }, + "Value": { + "MaterialAsset": { + "assetId": { + "guid": "{CF5C7B01-4912-58AE-991A-F25251E505AC}" + }, + "assetHint": "materials/presets/pbr/metal_copper_polished.azmaterial" + } + } + } + ] + } + } + }, + "Component_[8092226976542590265]": { + "$type": "EditorDisabledCompositionComponent", + "Id": 8092226976542590265 + } + } + }, + "Entity_[1290954467284]": { + "Id": "Entity_[1290954467284]", + "Name": "Entity1", + "Components": { + "Component_[11525365929370623807]": { + "$type": "EditorVisibilityComponent", + "Id": 11525365929370623807 + }, + "Component_[12334620273692642550]": { + "$type": "EditorLockComponent", + "Id": 12334620273692642550 + }, + "Component_[14389735759337977675]": { + "$type": "EditorPendingCompositionComponent", + "Id": 14389735759337977675 + }, + "Component_[16184381538555246534]": { + "$type": "AZ::Render::EditorMeshComponent", + "Id": 16184381538555246534, + "Controller": { + "Configuration": { + "ModelAsset": { + "assetId": { + "guid": "{E14975EF-E676-51A4-B826-3EF59CB645AA}", + "subId": 285127096 + }, + "assetHint": "testdata/objects/cube/cube.azmodel" + } + } + } + }, + "Component_[17962478023087084794]": { + "$type": "SelectionComponent", + "Id": 17962478023087084794 + }, + "Component_[18071675051915092508]": { + "$type": "EditorEntityIconComponent", + "Id": 18071675051915092508 + }, + "Component_[2115498007879087044]": { + "$type": "EditorInspectorComponent", + "Id": 2115498007879087044, + "ComponentOrderEntryArray": [ + { + "ComponentId": 399415038452606756 + }, + { + "ComponentId": 16184381538555246534, + "SortIndex": 1 + }, + { + "ComponentId": 7827190074535394331, + "SortIndex": 2 + } + ] + }, + "Component_[3518973002096080237]": { + "$type": "EditorOnlyEntityComponent", + "Id": 3518973002096080237 + }, + "Component_[399415038452606756]": { + "$type": "{27F1E1A1-8D9D-4C3B-BD3A-AFB9762449C0} TransformComponent", + "Id": 399415038452606756, + "Parent Entity": "ContainerEntity", + "Transform Data": { + "Translate": [ + -22.530563354492188, + -0.00018183141946792603, + 15.057670593261719 + ] + } + }, + "Component_[4564240319609068082]": { + "$type": "EditorEntitySortComponent", + "Id": 4564240319609068082 + }, + "Component_[7827190074535394331]": { + "$type": "EditorMaterialComponent", + "Id": 7827190074535394331, + "Controller": { + "Configuration": { + "materials": [ + { + "Key": { + "materialSlotStableId": 2418540911 + }, + "Value": { + "MaterialAsset": { + "assetId": { + "guid": "{FB4657EB-FB3A-5EC3-A772-DC36D6F733C3}" + }, + "assetHint": "materials/presets/pbr/metal_gold_polished.azmaterial" + } + } + } + ] + } + } + }, + "Component_[8092226976542590265]": { + "$type": "EditorDisabledCompositionComponent", + "Id": 8092226976542590265 + } + } + }, + "Entity_[1295249434580]": { + "Id": "Entity_[1295249434580]", + "Name": "Entity1", + "Components": { + "Component_[11525365929370623807]": { + "$type": "EditorVisibilityComponent", + "Id": 11525365929370623807 + }, + "Component_[12334620273692642550]": { + "$type": "EditorLockComponent", + "Id": 12334620273692642550 + }, + "Component_[14389735759337977675]": { + "$type": "EditorPendingCompositionComponent", + "Id": 14389735759337977675 + }, + "Component_[16184381538555246534]": { + "$type": "AZ::Render::EditorMeshComponent", + "Id": 16184381538555246534, + "Controller": { + "Configuration": { + "ModelAsset": { + "assetId": { + "guid": "{E14975EF-E676-51A4-B826-3EF59CB645AA}", + "subId": 285127096 + }, + "assetHint": "testdata/objects/cube/cube.azmodel" + } + } + } + }, + "Component_[17962478023087084794]": { + "$type": "SelectionComponent", + "Id": 17962478023087084794 + }, + "Component_[18071675051915092508]": { + "$type": "EditorEntityIconComponent", + "Id": 18071675051915092508 + }, + "Component_[2115498007879087044]": { + "$type": "EditorInspectorComponent", + "Id": 2115498007879087044, + "ComponentOrderEntryArray": [ + { + "ComponentId": 399415038452606756 + }, + { + "ComponentId": 16184381538555246534, + "SortIndex": 1 + }, + { + "ComponentId": 7827190074535394331, + "SortIndex": 2 + } + ] + }, + "Component_[3518973002096080237]": { + "$type": "EditorOnlyEntityComponent", + "Id": 3518973002096080237 + }, + "Component_[399415038452606756]": { + "$type": "{27F1E1A1-8D9D-4C3B-BD3A-AFB9762449C0} TransformComponent", + "Id": 399415038452606756, + "Parent Entity": "ContainerEntity", + "Transform Data": { + "Translate": [ + 37.53014373779297, + -0.00018183141946792603, + 34.53608703613281 + ] + } + }, + "Component_[4564240319609068082]": { + "$type": "EditorEntitySortComponent", + "Id": 4564240319609068082 + }, + "Component_[7827190074535394331]": { + "$type": "EditorMaterialComponent", + "Id": 7827190074535394331, + "Controller": { + "Configuration": { + "materials": [ + { + "Key": { + "materialSlotStableId": 2418540911 + }, + "Value": { + "MaterialAsset": { + "assetId": { + "guid": "{2D054071-BEF7-53C0-A8C9-E4F026BD8364}" + }, + "assetHint": "materials/presets/pbr/metal_copper_matte.azmaterial" + } + } + } + ] + } + } + }, + "Component_[8092226976542590265]": { + "$type": "EditorDisabledCompositionComponent", + "Id": 8092226976542590265 + } + } + }, + "Entity_[1299544401876]": { + "Id": "Entity_[1299544401876]", + "Name": "Entity1", + "Components": { + "Component_[11525365929370623807]": { + "$type": "EditorVisibilityComponent", + "Id": 11525365929370623807 + }, + "Component_[12334620273692642550]": { + "$type": "EditorLockComponent", + "Id": 12334620273692642550 + }, + "Component_[14389735759337977675]": { + "$type": "EditorPendingCompositionComponent", + "Id": 14389735759337977675 + }, + "Component_[16184381538555246534]": { + "$type": "AZ::Render::EditorMeshComponent", + "Id": 16184381538555246534, + "Controller": { + "Configuration": { + "ModelAsset": { + "assetId": { + "guid": "{E14975EF-E676-51A4-B826-3EF59CB645AA}", + "subId": 285127096 + }, + "assetHint": "testdata/objects/cube/cube.azmodel" + } + } + } + }, + "Component_[17962478023087084794]": { + "$type": "SelectionComponent", + "Id": 17962478023087084794 + }, + "Component_[18071675051915092508]": { + "$type": "EditorEntityIconComponent", + "Id": 18071675051915092508 + }, + "Component_[2115498007879087044]": { + "$type": "EditorInspectorComponent", + "Id": 2115498007879087044, + "ComponentOrderEntryArray": [ + { + "ComponentId": 399415038452606756 + }, + { + "ComponentId": 16184381538555246534, + "SortIndex": 1 + }, + { + "ComponentId": 7827190074535394331, + "SortIndex": 2 + } + ] + }, + "Component_[3518973002096080237]": { + "$type": "EditorOnlyEntityComponent", + "Id": 3518973002096080237 + }, + "Component_[399415038452606756]": { + "$type": "{27F1E1A1-8D9D-4C3B-BD3A-AFB9762449C0} TransformComponent", + "Id": 399415038452606756, + "Parent Entity": "ContainerEntity", + "Transform Data": { + "Translate": [ + -17.530563354492188, + -0.00018183141946792603, + 74.93071746826172 + ] + } + }, + "Component_[4564240319609068082]": { + "$type": "EditorEntitySortComponent", + "Id": 4564240319609068082 + }, + "Component_[7827190074535394331]": { + "$type": "EditorMaterialComponent", + "Id": 7827190074535394331, + "Controller": { + "Configuration": { + "materials": [ + { + "Key": { + "materialSlotStableId": 2418540911 + }, + "Value": { + "MaterialAsset": { + "assetId": { + "guid": "{A7F03135-ECAD-5440-99DB-E84ABA3D50DA}" + }, + "assetHint": "materials/presets/pbr/metal_iron_polished.azmaterial" + } + } + } + ] + } + } + }, + "Component_[8092226976542590265]": { + "$type": "EditorDisabledCompositionComponent", + "Id": 8092226976542590265 + } + } + }, + "Entity_[1303839369172]": { + "Id": "Entity_[1303839369172]", + "Name": "Entity1", + "Components": { + "Component_[11525365929370623807]": { + "$type": "EditorVisibilityComponent", + "Id": 11525365929370623807 + }, + "Component_[12334620273692642550]": { + "$type": "EditorLockComponent", + "Id": 12334620273692642550 + }, + "Component_[14389735759337977675]": { + "$type": "EditorPendingCompositionComponent", + "Id": 14389735759337977675 + }, + "Component_[16184381538555246534]": { + "$type": "AZ::Render::EditorMeshComponent", + "Id": 16184381538555246534, + "Controller": { + "Configuration": { + "ModelAsset": { + "assetId": { + "guid": "{E14975EF-E676-51A4-B826-3EF59CB645AA}", + "subId": 285127096 + }, + "assetHint": "testdata/objects/cube/cube.azmodel" + } + } + } + }, + "Component_[17962478023087084794]": { + "$type": "SelectionComponent", + "Id": 17962478023087084794 + }, + "Component_[18071675051915092508]": { + "$type": "EditorEntityIconComponent", + "Id": 18071675051915092508 + }, + "Component_[2115498007879087044]": { + "$type": "EditorInspectorComponent", + "Id": 2115498007879087044, + "ComponentOrderEntryArray": [ + { + "ComponentId": 399415038452606756 + }, + { + "ComponentId": 16184381538555246534, + "SortIndex": 1 + }, + { + "ComponentId": 7827190074535394331, + "SortIndex": 2 + } + ] + }, + "Component_[3518973002096080237]": { + "$type": "EditorOnlyEntityComponent", + "Id": 3518973002096080237 + }, + "Component_[399415038452606756]": { + "$type": "{27F1E1A1-8D9D-4C3B-BD3A-AFB9762449C0} TransformComponent", + "Id": 399415038452606756, + "Parent Entity": "ContainerEntity", + "Transform Data": { + "Translate": [ + -17.530563354492188, + -0.00018183141946792603, + 0.0 + ] + } + }, + "Component_[4564240319609068082]": { + "$type": "EditorEntitySortComponent", + "Id": 4564240319609068082 + }, + "Component_[7827190074535394331]": { + "$type": "EditorMaterialComponent", + "Id": 7827190074535394331, + "Controller": { + "Configuration": { + "materials": [ + { + "Key": { + "materialSlotStableId": 2418540911 + }, + "Value": { + "MaterialAsset": { + "assetId": { + "guid": "{A7F03135-ECAD-5440-99DB-E84ABA3D50DA}" + }, + "assetHint": "materials/presets/pbr/metal_iron_polished.azmaterial" + } + } + } + ] + } + } + }, + "Component_[8092226976542590265]": { + "$type": "EditorDisabledCompositionComponent", + "Id": 8092226976542590265 + } + } + }, + "Entity_[1308134336468]": { + "Id": "Entity_[1308134336468]", + "Name": "Entity1", + "Components": { + "Component_[11525365929370623807]": { + "$type": "EditorVisibilityComponent", + "Id": 11525365929370623807 + }, + "Component_[12334620273692642550]": { + "$type": "EditorLockComponent", + "Id": 12334620273692642550 + }, + "Component_[14389735759337977675]": { + "$type": "EditorPendingCompositionComponent", + "Id": 14389735759337977675 + }, + "Component_[16184381538555246534]": { + "$type": "AZ::Render::EditorMeshComponent", + "Id": 16184381538555246534, + "Controller": { + "Configuration": { + "ModelAsset": { + "assetId": { + "guid": "{E14975EF-E676-51A4-B826-3EF59CB645AA}", + "subId": 285127096 + }, + "assetHint": "testdata/objects/cube/cube.azmodel" + } + } + } + }, + "Component_[17962478023087084794]": { + "$type": "SelectionComponent", + "Id": 17962478023087084794 + }, + "Component_[18071675051915092508]": { + "$type": "EditorEntityIconComponent", + "Id": 18071675051915092508 + }, + "Component_[2115498007879087044]": { + "$type": "EditorInspectorComponent", + "Id": 2115498007879087044, + "ComponentOrderEntryArray": [ + { + "ComponentId": 399415038452606756 + }, + { + "ComponentId": 16184381538555246534, + "SortIndex": 1 + }, + { + "ComponentId": 7827190074535394331, + "SortIndex": 2 + } + ] + }, + "Component_[3518973002096080237]": { + "$type": "EditorOnlyEntityComponent", + "Id": 3518973002096080237 + }, + "Component_[399415038452606756]": { + "$type": "{27F1E1A1-8D9D-4C3B-BD3A-AFB9762449C0} TransformComponent", + "Id": 399415038452606756, + "Parent Entity": "ContainerEntity", + "Transform Data": { + "Translate": [ + 22.53014373779297, + -0.00018183141946792603, + 54.618019104003906 + ] + } + }, + "Component_[4564240319609068082]": { + "$type": "EditorEntitySortComponent", + "Id": 4564240319609068082 + }, + "Component_[7827190074535394331]": { + "$type": "EditorMaterialComponent", + "Id": 7827190074535394331, + "Controller": { + "Configuration": { + "materials": [ + { + "Key": { + "materialSlotStableId": 2418540911 + }, + "Value": { + "MaterialAsset": { + "assetId": { + "guid": "{80E0F2A7-1EE4-597F-80EF-985C65BCE2EB}" + }, + "assetHint": "materials/presets/pbr/metal_brass.azmaterial" + } + } + } + ] + } + } + }, + "Component_[8092226976542590265]": { + "$type": "EditorDisabledCompositionComponent", + "Id": 8092226976542590265 + } + } + }, + "Entity_[1312429303764]": { + "Id": "Entity_[1312429303764]", + "Name": "Entity1", + "Components": { + "Component_[11525365929370623807]": { + "$type": "EditorVisibilityComponent", + "Id": 11525365929370623807 + }, + "Component_[12334620273692642550]": { + "$type": "EditorLockComponent", + "Id": 12334620273692642550 + }, + "Component_[14389735759337977675]": { + "$type": "EditorPendingCompositionComponent", + "Id": 14389735759337977675 + }, + "Component_[16184381538555246534]": { + "$type": "AZ::Render::EditorMeshComponent", + "Id": 16184381538555246534, + "Controller": { + "Configuration": { + "ModelAsset": { + "assetId": { + "guid": "{E14975EF-E676-51A4-B826-3EF59CB645AA}", + "subId": 285127096 + }, + "assetHint": "testdata/objects/cube/cube.azmodel" + } + } + } + }, + "Component_[17962478023087084794]": { + "$type": "SelectionComponent", + "Id": 17962478023087084794 + }, + "Component_[18071675051915092508]": { + "$type": "EditorEntityIconComponent", + "Id": 18071675051915092508 + }, + "Component_[2115498007879087044]": { + "$type": "EditorInspectorComponent", + "Id": 2115498007879087044, + "ComponentOrderEntryArray": [ + { + "ComponentId": 399415038452606756 + }, + { + "ComponentId": 16184381538555246534, + "SortIndex": 1 + }, + { + "ComponentId": 7827190074535394331, + "SortIndex": 2 + } + ] + }, + "Component_[3518973002096080237]": { + "$type": "EditorOnlyEntityComponent", + "Id": 3518973002096080237 + }, + "Component_[399415038452606756]": { + "$type": "{27F1E1A1-8D9D-4C3B-BD3A-AFB9762449C0} TransformComponent", + "Id": 399415038452606756, + "Parent Entity": "ContainerEntity", + "Transform Data": { + "Translate": [ + 22.53014373779297, + -0.00018183141946792603, + 114.4910659790039 + ] + } + }, + "Component_[4564240319609068082]": { + "$type": "EditorEntitySortComponent", + "Id": 4564240319609068082 + }, + "Component_[7827190074535394331]": { + "$type": "EditorMaterialComponent", + "Id": 7827190074535394331, + "Controller": { + "Configuration": { + "materials": [ + { + "Key": { + "materialSlotStableId": 2418540911 + }, + "Value": { + "MaterialAsset": { + "assetId": { + "guid": "{80E0F2A7-1EE4-597F-80EF-985C65BCE2EB}" + }, + "assetHint": "materials/presets/pbr/metal_brass.azmaterial" + } + } + } + ] + } + } + }, + "Component_[8092226976542590265]": { + "$type": "EditorDisabledCompositionComponent", + "Id": 8092226976542590265 + } + } + }, + "Entity_[1316724271060]": { + "Id": "Entity_[1316724271060]", + "Name": "Entity1", + "Components": { + "Component_[11525365929370623807]": { + "$type": "EditorVisibilityComponent", + "Id": 11525365929370623807 + }, + "Component_[12334620273692642550]": { + "$type": "EditorLockComponent", + "Id": 12334620273692642550 + }, + "Component_[14389735759337977675]": { + "$type": "EditorPendingCompositionComponent", + "Id": 14389735759337977675 + }, + "Component_[16184381538555246534]": { + "$type": "AZ::Render::EditorMeshComponent", + "Id": 16184381538555246534, + "Controller": { + "Configuration": { + "ModelAsset": { + "assetId": { + "guid": "{E14975EF-E676-51A4-B826-3EF59CB645AA}", + "subId": 285127096 + }, + "assetHint": "testdata/objects/cube/cube.azmodel" + } + } + } + }, + "Component_[17962478023087084794]": { + "$type": "SelectionComponent", + "Id": 17962478023087084794 + }, + "Component_[18071675051915092508]": { + "$type": "EditorEntityIconComponent", + "Id": 18071675051915092508 + }, + "Component_[2115498007879087044]": { + "$type": "EditorInspectorComponent", + "Id": 2115498007879087044, + "ComponentOrderEntryArray": [ + { + "ComponentId": 399415038452606756 + }, + { + "ComponentId": 16184381538555246534, + "SortIndex": 1 + }, + { + "ComponentId": 7827190074535394331, + "SortIndex": 2 + } + ] + }, + "Component_[3518973002096080237]": { + "$type": "EditorOnlyEntityComponent", + "Id": 3518973002096080237 + }, + "Component_[399415038452606756]": { + "$type": "{27F1E1A1-8D9D-4C3B-BD3A-AFB9762449C0} TransformComponent", + "Id": 399415038452606756, + "Parent Entity": "ContainerEntity", + "Transform Data": { + "Translate": [ + -27.530563354492188, + -0.00018183141946792603, + 69.34888458251953 + ] + } + }, + "Component_[4564240319609068082]": { + "$type": "EditorEntitySortComponent", + "Id": 4564240319609068082 + }, + "Component_[7827190074535394331]": { + "$type": "EditorMaterialComponent", + "Id": 7827190074535394331, + "Controller": { + "Configuration": { + "materials": [ + { + "Key": { + "materialSlotStableId": 2418540911 + }, + "Value": { + "MaterialAsset": { + "assetId": { + "guid": "{E621C5BF-B8E1-55F0-A791-EC960F2FA46F}" + }, + "assetHint": "materials/presets/pbr/metal_copper.azmaterial" + } + } + } + ] + } + } + }, + "Component_[8092226976542590265]": { + "$type": "EditorDisabledCompositionComponent", + "Id": 8092226976542590265 + } + } + }, + "Entity_[1321019238356]": { + "Id": "Entity_[1321019238356]", + "Name": "Entity1", + "Components": { + "Component_[11525365929370623807]": { + "$type": "EditorVisibilityComponent", + "Id": 11525365929370623807 + }, + "Component_[12334620273692642550]": { + "$type": "EditorLockComponent", + "Id": 12334620273692642550 + }, + "Component_[14389735759337977675]": { + "$type": "EditorPendingCompositionComponent", + "Id": 14389735759337977675 + }, + "Component_[16184381538555246534]": { + "$type": "AZ::Render::EditorMeshComponent", + "Id": 16184381538555246534, + "Controller": { + "Configuration": { + "ModelAsset": { + "assetId": { + "guid": "{E14975EF-E676-51A4-B826-3EF59CB645AA}", + "subId": 285127096 + }, + "assetHint": "testdata/objects/cube/cube.azmodel" + } + } + } + }, + "Component_[17962478023087084794]": { + "$type": "SelectionComponent", + "Id": 17962478023087084794 + }, + "Component_[18071675051915092508]": { + "$type": "EditorEntityIconComponent", + "Id": 18071675051915092508 + }, + "Component_[2115498007879087044]": { + "$type": "EditorInspectorComponent", + "Id": 2115498007879087044, + "ComponentOrderEntryArray": [ + { + "ComponentId": 399415038452606756 + }, + { + "ComponentId": 16184381538555246534, + "SortIndex": 1 + }, + { + "ComponentId": 7827190074535394331, + "SortIndex": 2 + } + ] + }, + "Component_[3518973002096080237]": { + "$type": "EditorOnlyEntityComponent", + "Id": 3518973002096080237 + }, + "Component_[399415038452606756]": { + "$type": "{27F1E1A1-8D9D-4C3B-BD3A-AFB9762449C0} TransformComponent", + "Id": 399415038452606756, + "Parent Entity": "ContainerEntity", + "Transform Data": { + "Translate": [ + -7.5305633544921875, + -0.00018183141946792603, + 15.057670593261719 + ] + } + }, + "Component_[4564240319609068082]": { + "$type": "EditorEntitySortComponent", + "Id": 4564240319609068082 + }, + "Component_[7827190074535394331]": { + "$type": "EditorMaterialComponent", + "Id": 7827190074535394331, + "Controller": { + "Configuration": { + "materials": [ + { + "Key": { + "materialSlotStableId": 2418540911 + }, + "Value": { + "MaterialAsset": { + "assetId": { + "guid": "{E66E4343-F45A-536D-AAE1-C4D096420640}" + }, + "assetHint": "materials/presets/pbr/metal_nickel_polished.azmaterial" + } + } + } + ] + } + } + }, + "Component_[8092226976542590265]": { + "$type": "EditorDisabledCompositionComponent", + "Id": 8092226976542590265 + } + } + }, + "Entity_[1325314205652]": { + "Id": "Entity_[1325314205652]", + "Name": "Entity1", + "Components": { + "Component_[11525365929370623807]": { + "$type": "EditorVisibilityComponent", + "Id": 11525365929370623807 + }, + "Component_[12334620273692642550]": { + "$type": "EditorLockComponent", + "Id": 12334620273692642550 + }, + "Component_[14389735759337977675]": { + "$type": "EditorPendingCompositionComponent", + "Id": 14389735759337977675 + }, + "Component_[16184381538555246534]": { + "$type": "AZ::Render::EditorMeshComponent", + "Id": 16184381538555246534, + "Controller": { + "Configuration": { + "ModelAsset": { + "assetId": { + "guid": "{E14975EF-E676-51A4-B826-3EF59CB645AA}", + "subId": 285127096 + }, + "assetHint": "testdata/objects/cube/cube.azmodel" + } + } + } + }, + "Component_[17962478023087084794]": { + "$type": "SelectionComponent", + "Id": 17962478023087084794 + }, + "Component_[18071675051915092508]": { + "$type": "EditorEntityIconComponent", + "Id": 18071675051915092508 + }, + "Component_[2115498007879087044]": { + "$type": "EditorInspectorComponent", + "Id": 2115498007879087044, + "ComponentOrderEntryArray": [ + { + "ComponentId": 399415038452606756 + }, + { + "ComponentId": 16184381538555246534, + "SortIndex": 1 + }, + { + "ComponentId": 7827190074535394331, + "SortIndex": 2 + } + ] + }, + "Component_[3518973002096080237]": { + "$type": "EditorOnlyEntityComponent", + "Id": 3518973002096080237 + }, + "Component_[399415038452606756]": { + "$type": "{27F1E1A1-8D9D-4C3B-BD3A-AFB9762449C0} TransformComponent", + "Id": 399415038452606756, + "Parent Entity": "ContainerEntity", + "Transform Data": { + "Translate": [ + -27.530563354492188, + -0.00018183141946792603, + 114.4910659790039 + ] + } + }, + "Component_[4564240319609068082]": { + "$type": "EditorEntitySortComponent", + "Id": 4564240319609068082 + }, + "Component_[7827190074535394331]": { + "$type": "EditorMaterialComponent", + "Id": 7827190074535394331, + "Controller": { + "Configuration": { + "materials": [ + { + "Key": { + "materialSlotStableId": 2418540911 + }, + "Value": { + "MaterialAsset": { + "assetId": { + "guid": "{E621C5BF-B8E1-55F0-A791-EC960F2FA46F}" + }, + "assetHint": "materials/presets/pbr/metal_copper.azmaterial" + } + } + } + ] + } + } + }, + "Component_[8092226976542590265]": { + "$type": "EditorDisabledCompositionComponent", + "Id": 8092226976542590265 + } + } + }, + "Entity_[1329609172948]": { + "Id": "Entity_[1329609172948]", + "Name": "Entity1", + "Components": { + "Component_[11525365929370623807]": { + "$type": "EditorVisibilityComponent", + "Id": 11525365929370623807 + }, + "Component_[12334620273692642550]": { + "$type": "EditorLockComponent", + "Id": 12334620273692642550 + }, + "Component_[14389735759337977675]": { + "$type": "EditorPendingCompositionComponent", + "Id": 14389735759337977675 + }, + "Component_[16184381538555246534]": { + "$type": "AZ::Render::EditorMeshComponent", + "Id": 16184381538555246534, + "Controller": { + "Configuration": { + "ModelAsset": { + "assetId": { + "guid": "{E14975EF-E676-51A4-B826-3EF59CB645AA}", + "subId": 285127096 + }, + "assetHint": "testdata/objects/cube/cube.azmodel" + } + } + } + }, + "Component_[17962478023087084794]": { + "$type": "SelectionComponent", + "Id": 17962478023087084794 + }, + "Component_[18071675051915092508]": { + "$type": "EditorEntityIconComponent", + "Id": 18071675051915092508 + }, + "Component_[2115498007879087044]": { + "$type": "EditorInspectorComponent", + "Id": 2115498007879087044, + "ComponentOrderEntryArray": [ + { + "ComponentId": 399415038452606756 + }, + { + "ComponentId": 16184381538555246534, + "SortIndex": 1 + }, + { + "ComponentId": 7827190074535394331, + "SortIndex": 2 + } + ] + }, + "Component_[3518973002096080237]": { + "$type": "EditorOnlyEntityComponent", + "Id": 3518973002096080237 + }, + "Component_[399415038452606756]": { + "$type": "{27F1E1A1-8D9D-4C3B-BD3A-AFB9762449C0} TransformComponent", + "Id": 399415038452606756, + "Parent Entity": "ContainerEntity", + "Transform Data": { + "Translate": [ + 2.5301437377929688, + -0.00018183141946792603, + 84.40655517578125 + ] + } + }, + "Component_[4564240319609068082]": { + "$type": "EditorEntitySortComponent", + "Id": 4564240319609068082 + }, + "Component_[7827190074535394331]": { + "$type": "EditorMaterialComponent", + "Id": 7827190074535394331, + "Controller": { + "Configuration": { + "materials": [ + { + "Key": { + "materialSlotStableId": 2418540911 + }, + "Value": { + "MaterialAsset": { + "assetId": { + "guid": "{E23FC75B-4142-55F1-B9AE-884826E7EB23}" + }, + "assetHint": "materials/presets/pbr/metal_platinum.azmaterial" + } + } + } + ] + } + } + }, + "Component_[8092226976542590265]": { + "$type": "EditorDisabledCompositionComponent", + "Id": 8092226976542590265 + } + } + }, + "Entity_[1333904140244]": { + "Id": "Entity_[1333904140244]", + "Name": "Entity1", + "Components": { + "Component_[11525365929370623807]": { + "$type": "EditorVisibilityComponent", + "Id": 11525365929370623807 + }, + "Component_[12334620273692642550]": { + "$type": "EditorLockComponent", + "Id": 12334620273692642550 + }, + "Component_[14389735759337977675]": { + "$type": "EditorPendingCompositionComponent", + "Id": 14389735759337977675 + }, + "Component_[16184381538555246534]": { + "$type": "AZ::Render::EditorMeshComponent", + "Id": 16184381538555246534, + "Controller": { + "Configuration": { + "ModelAsset": { + "assetId": { + "guid": "{E14975EF-E676-51A4-B826-3EF59CB645AA}", + "subId": 285127096 + }, + "assetHint": "testdata/objects/cube/cube.azmodel" + } + } + } + }, + "Component_[17962478023087084794]": { + "$type": "SelectionComponent", + "Id": 17962478023087084794 + }, + "Component_[18071675051915092508]": { + "$type": "EditorEntityIconComponent", + "Id": 18071675051915092508 + }, + "Component_[2115498007879087044]": { + "$type": "EditorInspectorComponent", + "Id": 2115498007879087044, + "ComponentOrderEntryArray": [ + { + "ComponentId": 399415038452606756 + }, + { + "ComponentId": 16184381538555246534, + "SortIndex": 1 + }, + { + "ComponentId": 7827190074535394331, + "SortIndex": 2 + } + ] + }, + "Component_[3518973002096080237]": { + "$type": "EditorOnlyEntityComponent", + "Id": 3518973002096080237 + }, + "Component_[399415038452606756]": { + "$type": "{27F1E1A1-8D9D-4C3B-BD3A-AFB9762449C0} TransformComponent", + "Id": 399415038452606756, + "Parent Entity": "ContainerEntity", + "Transform Data": { + "Translate": [ + -42.53056335449219, + -0.00018183141946792603, + 4.451573371887207 + ] + } + }, + "Component_[4564240319609068082]": { + "$type": "EditorEntitySortComponent", + "Id": 4564240319609068082 + }, + "Component_[7827190074535394331]": { + "$type": "EditorMaterialComponent", + "Id": 7827190074535394331, + "Controller": { + "Configuration": { + "materials": [ + { + "Key": { + "materialSlotStableId": 2418540911 + }, + "Value": { + "MaterialAsset": { + "assetId": { + "guid": "{AE350D9F-0000-526D-B49C-4303D687BB86}" + }, + "assetHint": "materials/presets/pbr/metal_brass_matte.azmaterial" + } + } + } + ] + } + } + }, + "Component_[8092226976542590265]": { + "$type": "EditorDisabledCompositionComponent", + "Id": 8092226976542590265 + } + } + }, + "Entity_[1338199107540]": { + "Id": "Entity_[1338199107540]", + "Name": "Entity1", + "Components": { + "Component_[11525365929370623807]": { + "$type": "EditorVisibilityComponent", + "Id": 11525365929370623807 + }, + "Component_[12334620273692642550]": { + "$type": "EditorLockComponent", + "Id": 12334620273692642550 + }, + "Component_[14389735759337977675]": { + "$type": "EditorPendingCompositionComponent", + "Id": 14389735759337977675 + }, + "Component_[16184381538555246534]": { + "$type": "AZ::Render::EditorMeshComponent", + "Id": 16184381538555246534, + "Controller": { + "Configuration": { + "ModelAsset": { + "assetId": { + "guid": "{E14975EF-E676-51A4-B826-3EF59CB645AA}", + "subId": 285127096 + }, + "assetHint": "testdata/objects/cube/cube.azmodel" + } + } + } + }, + "Component_[17962478023087084794]": { + "$type": "SelectionComponent", + "Id": 17962478023087084794 + }, + "Component_[18071675051915092508]": { + "$type": "EditorEntityIconComponent", + "Id": 18071675051915092508 + }, + "Component_[2115498007879087044]": { + "$type": "EditorInspectorComponent", + "Id": 2115498007879087044, + "ComponentOrderEntryArray": [ + { + "ComponentId": 399415038452606756 + }, + { + "ComponentId": 16184381538555246534, + "SortIndex": 1 + }, + { + "ComponentId": 7827190074535394331, + "SortIndex": 2 + } + ] + }, + "Component_[3518973002096080237]": { + "$type": "EditorOnlyEntityComponent", + "Id": 3518973002096080237 + }, + "Component_[399415038452606756]": { + "$type": "{27F1E1A1-8D9D-4C3B-BD3A-AFB9762449C0} TransformComponent", + "Id": 399415038452606756, + "Parent Entity": "ContainerEntity", + "Transform Data": { + "Translate": [ + 7.530143737792969, + -0.00018183141946792603, + 94.40913391113281 + ] + } + }, + "Component_[4564240319609068082]": { + "$type": "EditorEntitySortComponent", + "Id": 4564240319609068082 + }, + "Component_[7827190074535394331]": { + "$type": "EditorMaterialComponent", + "Id": 7827190074535394331, + "Controller": { + "Configuration": { + "materials": [ + { + "Key": { + "materialSlotStableId": 2418540911 + }, + "Value": { + "MaterialAsset": { + "assetId": { + "guid": "{E54E46E7-9FA3-54D7-B5F8-8DCCDF17BC24}" + }, + "assetHint": "materials/presets/pbr/metal_silver_matte.azmaterial" + } + } + } + ] + } + } + }, + "Component_[8092226976542590265]": { + "$type": "EditorDisabledCompositionComponent", + "Id": 8092226976542590265 + } + } + }, + "Entity_[1342494074836]": { + "Id": "Entity_[1342494074836]", + "Name": "Entity1", + "Components": { + "Component_[11525365929370623807]": { + "$type": "EditorVisibilityComponent", + "Id": 11525365929370623807 + }, + "Component_[12334620273692642550]": { + "$type": "EditorLockComponent", + "Id": 12334620273692642550 + }, + "Component_[14389735759337977675]": { + "$type": "EditorPendingCompositionComponent", + "Id": 14389735759337977675 + }, + "Component_[16184381538555246534]": { + "$type": "AZ::Render::EditorMeshComponent", + "Id": 16184381538555246534, + "Controller": { + "Configuration": { + "ModelAsset": { + "assetId": { + "guid": "{E14975EF-E676-51A4-B826-3EF59CB645AA}", + "subId": 285127096 + }, + "assetHint": "testdata/objects/cube/cube.azmodel" + } + } + } + }, + "Component_[17962478023087084794]": { + "$type": "SelectionComponent", + "Id": 17962478023087084794 + }, + "Component_[18071675051915092508]": { + "$type": "EditorEntityIconComponent", + "Id": 18071675051915092508 + }, + "Component_[2115498007879087044]": { + "$type": "EditorInspectorComponent", + "Id": 2115498007879087044, + "ComponentOrderEntryArray": [ + { + "ComponentId": 399415038452606756 + }, + { + "ComponentId": 16184381538555246534, + "SortIndex": 1 + }, + { + "ComponentId": 7827190074535394331, + "SortIndex": 2 + } + ] + }, + "Component_[3518973002096080237]": { + "$type": "EditorOnlyEntityComponent", + "Id": 3518973002096080237 + }, + "Component_[399415038452606756]": { + "$type": "{27F1E1A1-8D9D-4C3B-BD3A-AFB9762449C0} TransformComponent", + "Id": 399415038452606756, + "Parent Entity": "ContainerEntity", + "Transform Data": { + "Translate": [ + 2.5301437377929688, + -0.00018183141946792603, + 109.46680450439453 + ] + } + }, + "Component_[4564240319609068082]": { + "$type": "EditorEntitySortComponent", + "Id": 4564240319609068082 + }, + "Component_[7827190074535394331]": { + "$type": "EditorMaterialComponent", + "Id": 7827190074535394331, + "Controller": { + "Configuration": { + "materials": [ + { + "Key": { + "materialSlotStableId": 2418540911 + }, + "Value": { + "MaterialAsset": { + "assetId": { + "guid": "{60D4CA04-A2FE-5AE7-B472-694C38D05183}" + }, + "assetHint": "materials/presets/pbr/metal_platinum_matte.azmaterial" + } + } + } + ] + } + } + }, + "Component_[8092226976542590265]": { + "$type": "EditorDisabledCompositionComponent", + "Id": 8092226976542590265 + } + } + }, + "Entity_[1346789042132]": { + "Id": "Entity_[1346789042132]", + "Name": "Entity1", + "Components": { + "Component_[11525365929370623807]": { + "$type": "EditorVisibilityComponent", + "Id": 11525365929370623807 + }, + "Component_[12334620273692642550]": { + "$type": "EditorLockComponent", + "Id": 12334620273692642550 + }, + "Component_[14389735759337977675]": { + "$type": "EditorPendingCompositionComponent", + "Id": 14389735759337977675 + }, + "Component_[16184381538555246534]": { + "$type": "AZ::Render::EditorMeshComponent", + "Id": 16184381538555246534, + "Controller": { + "Configuration": { + "ModelAsset": { + "assetId": { + "guid": "{E14975EF-E676-51A4-B826-3EF59CB645AA}", + "subId": 285127096 + }, + "assetHint": "testdata/objects/cube/cube.azmodel" + } + } + } + }, + "Component_[17962478023087084794]": { + "$type": "SelectionComponent", + "Id": 17962478023087084794 + }, + "Component_[18071675051915092508]": { + "$type": "EditorEntityIconComponent", + "Id": 18071675051915092508 + }, + "Component_[2115498007879087044]": { + "$type": "EditorInspectorComponent", + "Id": 2115498007879087044, + "ComponentOrderEntryArray": [ + { + "ComponentId": 399415038452606756 + }, + { + "ComponentId": 16184381538555246534, + "SortIndex": 1 + }, + { + "ComponentId": 7827190074535394331, + "SortIndex": 2 + } + ] + }, + "Component_[3518973002096080237]": { + "$type": "EditorOnlyEntityComponent", + "Id": 3518973002096080237 + }, + "Component_[399415038452606756]": { + "$type": "{27F1E1A1-8D9D-4C3B-BD3A-AFB9762449C0} TransformComponent", + "Id": 399415038452606756, + "Parent Entity": "ContainerEntity", + "Transform Data": { + "Translate": [ + 42.53014373779297, + -0.00018183141946792603, + 84.40655517578125 + ] + } + }, + "Component_[4564240319609068082]": { + "$type": "EditorEntitySortComponent", + "Id": 4564240319609068082 + }, + "Component_[7827190074535394331]": { + "$type": "EditorMaterialComponent", + "Id": 7827190074535394331, + "Controller": { + "Configuration": { + "materials": [ + { + "Key": { + "materialSlotStableId": 2418540911 + }, + "Value": { + "MaterialAsset": { + "assetId": { + "guid": "{FE52E7C8-064D-506A-9C26-433EB93747DE}" + }, + "assetHint": "materials/presets/pbr/metal_gold.azmaterial" + } + } + } + ] + } + } + }, + "Component_[8092226976542590265]": { + "$type": "EditorDisabledCompositionComponent", + "Id": 8092226976542590265 + } + } + }, + "Entity_[1351084009428]": { + "Id": "Entity_[1351084009428]", + "Name": "Entity1", + "Components": { + "Component_[11525365929370623807]": { + "$type": "EditorVisibilityComponent", + "Id": 11525365929370623807 + }, + "Component_[12334620273692642550]": { + "$type": "EditorLockComponent", + "Id": 12334620273692642550 + }, + "Component_[14389735759337977675]": { + "$type": "EditorPendingCompositionComponent", + "Id": 14389735759337977675 + }, + "Component_[16184381538555246534]": { + "$type": "AZ::Render::EditorMeshComponent", + "Id": 16184381538555246534, + "Controller": { + "Configuration": { + "ModelAsset": { + "assetId": { + "guid": "{E14975EF-E676-51A4-B826-3EF59CB645AA}", + "subId": 285127096 + }, + "assetHint": "testdata/objects/cube/cube.azmodel" + } + } + } + }, + "Component_[17962478023087084794]": { + "$type": "SelectionComponent", + "Id": 17962478023087084794 + }, + "Component_[18071675051915092508]": { + "$type": "EditorEntityIconComponent", + "Id": 18071675051915092508 + }, + "Component_[2115498007879087044]": { + "$type": "EditorInspectorComponent", + "Id": 2115498007879087044, + "ComponentOrderEntryArray": [ + { + "ComponentId": 399415038452606756 + }, + { + "ComponentId": 16184381538555246534, + "SortIndex": 1 + }, + { + "ComponentId": 7827190074535394331, + "SortIndex": 2 + } + ] + }, + "Component_[3518973002096080237]": { + "$type": "EditorOnlyEntityComponent", + "Id": 3518973002096080237 + }, + "Component_[399415038452606756]": { + "$type": "{27F1E1A1-8D9D-4C3B-BD3A-AFB9762449C0} TransformComponent", + "Id": 399415038452606756, + "Parent Entity": "ContainerEntity", + "Transform Data": { + "Translate": [ + -12.530563354492188, + -0.00018183141946792603, + 49.593753814697266 + ] + } + }, + "Component_[4564240319609068082]": { + "$type": "EditorEntitySortComponent", + "Id": 4564240319609068082 + }, + "Component_[7827190074535394331]": { + "$type": "EditorMaterialComponent", + "Id": 7827190074535394331, + "Controller": { + "Configuration": { + "materials": [ + { + "Key": { + "materialSlotStableId": 2418540911 + }, + "Value": { + "MaterialAsset": { + "assetId": { + "guid": "{F2AD0EBF-7137-58D1-9991-9552FAD41B19}" + }, + "assetHint": "materials/presets/pbr/metal_mercury.azmaterial" + } + } + } + ] + } + } + }, + "Component_[8092226976542590265]": { + "$type": "EditorDisabledCompositionComponent", + "Id": 8092226976542590265 + } + } + }, + "Entity_[1355378976724]": { + "Id": "Entity_[1355378976724]", + "Name": "Entity1", + "Components": { + "Component_[11525365929370623807]": { + "$type": "EditorVisibilityComponent", + "Id": 11525365929370623807 + }, + "Component_[12334620273692642550]": { + "$type": "EditorLockComponent", + "Id": 12334620273692642550 + }, + "Component_[14389735759337977675]": { + "$type": "EditorPendingCompositionComponent", + "Id": 14389735759337977675 + }, + "Component_[16184381538555246534]": { + "$type": "AZ::Render::EditorMeshComponent", + "Id": 16184381538555246534, + "Controller": { + "Configuration": { + "ModelAsset": { + "assetId": { + "guid": "{E14975EF-E676-51A4-B826-3EF59CB645AA}", + "subId": 285127096 + }, + "assetHint": "testdata/objects/cube/cube.azmodel" + } + } + } + }, + "Component_[17962478023087084794]": { + "$type": "SelectionComponent", + "Id": 17962478023087084794 + }, + "Component_[18071675051915092508]": { + "$type": "EditorEntityIconComponent", + "Id": 18071675051915092508 + }, + "Component_[2115498007879087044]": { + "$type": "EditorInspectorComponent", + "Id": 2115498007879087044, + "ComponentOrderEntryArray": [ + { + "ComponentId": 399415038452606756 + }, + { + "ComponentId": 16184381538555246534, + "SortIndex": 1 + }, + { + "ComponentId": 7827190074535394331, + "SortIndex": 2 + } + ] + }, + "Component_[3518973002096080237]": { + "$type": "EditorOnlyEntityComponent", + "Id": 3518973002096080237 + }, + "Component_[399415038452606756]": { + "$type": "{27F1E1A1-8D9D-4C3B-BD3A-AFB9762449C0} TransformComponent", + "Id": 399415038452606756, + "Parent Entity": "ContainerEntity", + "Transform Data": { + "Translate": [ + 22.53014373779297, + -0.00018183141946792603, + 19.50924301147461 + ] + } + }, + "Component_[4564240319609068082]": { + "$type": "EditorEntitySortComponent", + "Id": 4564240319609068082 + }, + "Component_[7827190074535394331]": { + "$type": "EditorMaterialComponent", + "Id": 7827190074535394331, + "Controller": { + "Configuration": { + "materials": [ + { + "Key": { + "materialSlotStableId": 2418540911 + }, + "Value": { + "MaterialAsset": { + "assetId": { + "guid": "{AE350D9F-0000-526D-B49C-4303D687BB86}" + }, + "assetHint": "materials/presets/pbr/metal_brass_matte.azmaterial" + } + } + } + ] + } + } + }, + "Component_[8092226976542590265]": { + "$type": "EditorDisabledCompositionComponent", + "Id": 8092226976542590265 + } + } + }, + "Entity_[1359673944020]": { + "Id": "Entity_[1359673944020]", + "Name": "Entity1", + "Components": { + "Component_[11525365929370623807]": { + "$type": "EditorVisibilityComponent", + "Id": 11525365929370623807 + }, + "Component_[12334620273692642550]": { + "$type": "EditorLockComponent", + "Id": 12334620273692642550 + }, + "Component_[14389735759337977675]": { + "$type": "EditorPendingCompositionComponent", + "Id": 14389735759337977675 + }, + "Component_[16184381538555246534]": { + "$type": "AZ::Render::EditorMeshComponent", + "Id": 16184381538555246534, + "Controller": { + "Configuration": { + "ModelAsset": { + "assetId": { + "guid": "{E14975EF-E676-51A4-B826-3EF59CB645AA}", + "subId": 285127096 + }, + "assetHint": "testdata/objects/cube/cube.azmodel" + } + } + } + }, + "Component_[17962478023087084794]": { + "$type": "SelectionComponent", + "Id": 17962478023087084794 + }, + "Component_[18071675051915092508]": { + "$type": "EditorEntityIconComponent", + "Id": 18071675051915092508 + }, + "Component_[2115498007879087044]": { + "$type": "EditorInspectorComponent", + "Id": 2115498007879087044, + "ComponentOrderEntryArray": [ + { + "ComponentId": 399415038452606756 + }, + { + "ComponentId": 16184381538555246534, + "SortIndex": 1 + }, + { + "ComponentId": 7827190074535394331, + "SortIndex": 2 + } + ] + }, + "Component_[3518973002096080237]": { + "$type": "EditorOnlyEntityComponent", + "Id": 3518973002096080237 + }, + "Component_[399415038452606756]": { + "$type": "{27F1E1A1-8D9D-4C3B-BD3A-AFB9762449C0} TransformComponent", + "Id": 399415038452606756, + "Parent Entity": "ContainerEntity", + "Transform Data": { + "Translate": [ + 32.53014373779297, + -0.00018183141946792603, + 89.95755767822266 + ] + } + }, + "Component_[4564240319609068082]": { + "$type": "EditorEntitySortComponent", + "Id": 4564240319609068082 + }, + "Component_[7827190074535394331]": { + "$type": "EditorMaterialComponent", + "Id": 7827190074535394331, + "Controller": { + "Configuration": { + "materials": [ + { + "Key": { + "materialSlotStableId": 2418540911 + }, + "Value": { + "MaterialAsset": { + "assetId": { + "guid": "{93DF55AE-8D1B-5AD1-A609-05F1BD9F6EA0}" + }, + "assetHint": "materials/presets/pbr/metal_cobalt_polished.azmaterial" + } + } + } + ] + } + } + }, + "Component_[8092226976542590265]": { + "$type": "EditorDisabledCompositionComponent", + "Id": 8092226976542590265 + } + } + }, + "Entity_[1363968911316]": { + "Id": "Entity_[1363968911316]", + "Name": "Entity1", + "Components": { + "Component_[11525365929370623807]": { + "$type": "EditorVisibilityComponent", + "Id": 11525365929370623807 + }, + "Component_[12334620273692642550]": { + "$type": "EditorLockComponent", + "Id": 12334620273692642550 + }, + "Component_[14389735759337977675]": { + "$type": "EditorPendingCompositionComponent", + "Id": 14389735759337977675 + }, + "Component_[16184381538555246534]": { + "$type": "AZ::Render::EditorMeshComponent", + "Id": 16184381538555246534, + "Controller": { + "Configuration": { + "ModelAsset": { + "assetId": { + "guid": "{E14975EF-E676-51A4-B826-3EF59CB645AA}", + "subId": 285127096 + }, + "assetHint": "testdata/objects/cube/cube.azmodel" + } + } + } + }, + "Component_[17962478023087084794]": { + "$type": "SelectionComponent", + "Id": 17962478023087084794 + }, + "Component_[18071675051915092508]": { + "$type": "EditorEntityIconComponent", + "Id": 18071675051915092508 + }, + "Component_[2115498007879087044]": { + "$type": "EditorInspectorComponent", + "Id": 2115498007879087044, + "ComponentOrderEntryArray": [ + { + "ComponentId": 399415038452606756 + }, + { + "ComponentId": 16184381538555246534, + "SortIndex": 1 + }, + { + "ComponentId": 7827190074535394331, + "SortIndex": 2 + } + ] + }, + "Component_[3518973002096080237]": { + "$type": "EditorOnlyEntityComponent", + "Id": 3518973002096080237 + }, + "Component_[399415038452606756]": { + "$type": "{27F1E1A1-8D9D-4C3B-BD3A-AFB9762449C0} TransformComponent", + "Id": 399415038452606756, + "Parent Entity": "ContainerEntity", + "Transform Data": { + "Translate": [ + 22.53014373779297, + -0.00018183141946792603, + 74.93071746826172 + ] + } + }, + "Component_[4564240319609068082]": { + "$type": "EditorEntitySortComponent", + "Id": 4564240319609068082 + }, + "Component_[7827190074535394331]": { + "$type": "EditorMaterialComponent", + "Id": 7827190074535394331, + "Controller": { + "Configuration": { + "materials": [ + { + "Key": { + "materialSlotStableId": 2418540911 + }, + "Value": { + "MaterialAsset": { + "assetId": { + "guid": "{FC69F2F8-F73B-5A0C-B8B7-94BAA45780FC}" + }, + "assetHint": "materials/presets/pbr/metal_brass_polished.azmaterial" + } + } + } + ] + } + } + }, + "Component_[8092226976542590265]": { + "$type": "EditorDisabledCompositionComponent", + "Id": 8092226976542590265 + } + } + }, + "Entity_[1368263878612]": { + "Id": "Entity_[1368263878612]", + "Name": "Entity1", + "Components": { + "Component_[11525365929370623807]": { + "$type": "EditorVisibilityComponent", + "Id": 11525365929370623807 + }, + "Component_[12334620273692642550]": { + "$type": "EditorLockComponent", + "Id": 12334620273692642550 + }, + "Component_[14389735759337977675]": { + "$type": "EditorPendingCompositionComponent", + "Id": 14389735759337977675 + }, + "Component_[16184381538555246534]": { + "$type": "AZ::Render::EditorMeshComponent", + "Id": 16184381538555246534, + "Controller": { + "Configuration": { + "ModelAsset": { + "assetId": { + "guid": "{E14975EF-E676-51A4-B826-3EF59CB645AA}", + "subId": 285127096 + }, + "assetHint": "testdata/objects/cube/cube.azmodel" + } + } + } + }, + "Component_[17962478023087084794]": { + "$type": "SelectionComponent", + "Id": 17962478023087084794 + }, + "Component_[18071675051915092508]": { + "$type": "EditorEntityIconComponent", + "Id": 18071675051915092508 + }, + "Component_[2115498007879087044]": { + "$type": "EditorInspectorComponent", + "Id": 2115498007879087044, + "ComponentOrderEntryArray": [ + { + "ComponentId": 399415038452606756 + }, + { + "ComponentId": 16184381538555246534, + "SortIndex": 1 + }, + { + "ComponentId": 7827190074535394331, + "SortIndex": 2 + } + ] + }, + "Component_[3518973002096080237]": { + "$type": "EditorOnlyEntityComponent", + "Id": 3518973002096080237 + }, + "Component_[399415038452606756]": { + "$type": "{27F1E1A1-8D9D-4C3B-BD3A-AFB9762449C0} TransformComponent", + "Id": 399415038452606756, + "Parent Entity": "ContainerEntity", + "Transform Data": { + "Translate": [ + -17.530563354492188, + -0.00018183141946792603, + 109.46680450439453 + ] + } + }, + "Component_[4564240319609068082]": { + "$type": "EditorEntitySortComponent", + "Id": 4564240319609068082 + }, + "Component_[7827190074535394331]": { + "$type": "EditorMaterialComponent", + "Id": 7827190074535394331, + "Controller": { + "Configuration": { + "materials": [ + { + "Key": { + "materialSlotStableId": 2418540911 + }, + "Value": { + "MaterialAsset": { + "assetId": { + "guid": "{970148AC-7258-5EC8-9CE7-F4EF93164D93}" + }, + "assetHint": "materials/presets/pbr/metal_iron_matte.azmaterial" + } + } + } + ] + } + } + }, + "Component_[8092226976542590265]": { + "$type": "EditorDisabledCompositionComponent", + "Id": 8092226976542590265 + } + } + }, + "Entity_[1372558845908]": { + "Id": "Entity_[1372558845908]", + "Name": "Entity1", + "Components": { + "Component_[11525365929370623807]": { + "$type": "EditorVisibilityComponent", + "Id": 11525365929370623807 + }, + "Component_[12334620273692642550]": { + "$type": "EditorLockComponent", + "Id": 12334620273692642550 + }, + "Component_[14389735759337977675]": { + "$type": "EditorPendingCompositionComponent", + "Id": 14389735759337977675 + }, + "Component_[16184381538555246534]": { + "$type": "AZ::Render::EditorMeshComponent", + "Id": 16184381538555246534, + "Controller": { + "Configuration": { + "ModelAsset": { + "assetId": { + "guid": "{E14975EF-E676-51A4-B826-3EF59CB645AA}", + "subId": 285127096 + }, + "assetHint": "testdata/objects/cube/cube.azmodel" + } + } + } + }, + "Component_[17962478023087084794]": { + "$type": "SelectionComponent", + "Id": 17962478023087084794 + }, + "Component_[18071675051915092508]": { + "$type": "EditorEntityIconComponent", + "Id": 18071675051915092508 + }, + "Component_[2115498007879087044]": { + "$type": "EditorInspectorComponent", + "Id": 2115498007879087044, + "ComponentOrderEntryArray": [ + { + "ComponentId": 399415038452606756 + }, + { + "ComponentId": 16184381538555246534, + "SortIndex": 1 + }, + { + "ComponentId": 7827190074535394331, + "SortIndex": 2 + } + ] + }, + "Component_[3518973002096080237]": { + "$type": "EditorOnlyEntityComponent", + "Id": 3518973002096080237 + }, + "Component_[399415038452606756]": { + "$type": "{27F1E1A1-8D9D-4C3B-BD3A-AFB9762449C0} TransformComponent", + "Id": 399415038452606756, + "Parent Entity": "ContainerEntity", + "Transform Data": { + "Translate": [ + 32.53014373779297, + -0.00018183141946792603, + 19.50924301147461 + ] + } + }, + "Component_[4564240319609068082]": { + "$type": "EditorEntitySortComponent", + "Id": 4564240319609068082 + }, + "Component_[7827190074535394331]": { + "$type": "EditorMaterialComponent", + "Id": 7827190074535394331, + "Controller": { + "Configuration": { + "materials": [ + { + "Key": { + "materialSlotStableId": 2418540911 + }, + "Value": { + "MaterialAsset": { + "assetId": { + "guid": "{C60A39AF-BB76-51BD-9468-A88C9A6F78D7}" + }, + "assetHint": "materials/presets/pbr/metal_cobalt_matte.azmaterial" + } + } + } + ] + } + } + }, + "Component_[8092226976542590265]": { + "$type": "EditorDisabledCompositionComponent", + "Id": 8092226976542590265 + } + } + }, + "Entity_[1376853813204]": { + "Id": "Entity_[1376853813204]", + "Name": "Entity1", + "Components": { + "Component_[11525365929370623807]": { + "$type": "EditorVisibilityComponent", + "Id": 11525365929370623807 + }, + "Component_[12334620273692642550]": { + "$type": "EditorLockComponent", + "Id": 12334620273692642550 + }, + "Component_[14389735759337977675]": { + "$type": "EditorPendingCompositionComponent", + "Id": 14389735759337977675 + }, + "Component_[16184381538555246534]": { + "$type": "AZ::Render::EditorMeshComponent", + "Id": 16184381538555246534, + "Controller": { + "Configuration": { + "ModelAsset": { + "assetId": { + "guid": "{E14975EF-E676-51A4-B826-3EF59CB645AA}", + "subId": 285127096 + }, + "assetHint": "testdata/objects/cube/cube.azmodel" + } + } + } + }, + "Component_[17962478023087084794]": { + "$type": "SelectionComponent", + "Id": 17962478023087084794 + }, + "Component_[18071675051915092508]": { + "$type": "EditorEntityIconComponent", + "Id": 18071675051915092508 + }, + "Component_[2115498007879087044]": { + "$type": "EditorInspectorComponent", + "Id": 2115498007879087044, + "ComponentOrderEntryArray": [ + { + "ComponentId": 399415038452606756 + }, + { + "ComponentId": 16184381538555246534, + "SortIndex": 1 + }, + { + "ComponentId": 7827190074535394331, + "SortIndex": 2 + } + ] + }, + "Component_[3518973002096080237]": { + "$type": "EditorOnlyEntityComponent", + "Id": 3518973002096080237 + }, + "Component_[399415038452606756]": { + "$type": "{27F1E1A1-8D9D-4C3B-BD3A-AFB9762449C0} TransformComponent", + "Id": 399415038452606756, + "Parent Entity": "ContainerEntity", + "Transform Data": { + "Translate": [ + -7.5305633544921875, + -0.00018183141946792603, + 39.56034851074219 + ] + } + }, + "Component_[4564240319609068082]": { + "$type": "EditorEntitySortComponent", + "Id": 4564240319609068082 + }, + "Component_[7827190074535394331]": { + "$type": "EditorMaterialComponent", + "Id": 7827190074535394331, + "Controller": { + "Configuration": { + "materials": [ + { + "Key": { + "materialSlotStableId": 2418540911 + }, + "Value": { + "MaterialAsset": { + "assetId": { + "guid": "{DD1E26AE-80FB-5DB6-8786-26D438190A38}" + }, + "assetHint": "materials/presets/pbr/metal_nickel.azmaterial" + } + } + } + ] + } + } + }, + "Component_[8092226976542590265]": { + "$type": "EditorDisabledCompositionComponent", + "Id": 8092226976542590265 + } + } + }, + "Entity_[1381148780500]": { + "Id": "Entity_[1381148780500]", + "Name": "Entity1", + "Components": { + "Component_[11525365929370623807]": { + "$type": "EditorVisibilityComponent", + "Id": 11525365929370623807 + }, + "Component_[12334620273692642550]": { + "$type": "EditorLockComponent", + "Id": 12334620273692642550 + }, + "Component_[14389735759337977675]": { + "$type": "EditorPendingCompositionComponent", + "Id": 14389735759337977675 + }, + "Component_[16184381538555246534]": { + "$type": "AZ::Render::EditorMeshComponent", + "Id": 16184381538555246534, + "Controller": { + "Configuration": { + "ModelAsset": { + "assetId": { + "guid": "{E14975EF-E676-51A4-B826-3EF59CB645AA}", + "subId": 285127096 + }, + "assetHint": "testdata/objects/cube/cube.azmodel" + } + } + } + }, + "Component_[17962478023087084794]": { + "$type": "SelectionComponent", + "Id": 17962478023087084794 + }, + "Component_[18071675051915092508]": { + "$type": "EditorEntityIconComponent", + "Id": 18071675051915092508 + }, + "Component_[2115498007879087044]": { + "$type": "EditorInspectorComponent", + "Id": 2115498007879087044, + "ComponentOrderEntryArray": [ + { + "ComponentId": 399415038452606756 + }, + { + "ComponentId": 16184381538555246534, + "SortIndex": 1 + }, + { + "ComponentId": 7827190074535394331, + "SortIndex": 2 + } + ] + }, + "Component_[3518973002096080237]": { + "$type": "EditorOnlyEntityComponent", + "Id": 3518973002096080237 + }, + "Component_[399415038452606756]": { + "$type": "{27F1E1A1-8D9D-4C3B-BD3A-AFB9762449C0} TransformComponent", + "Id": 399415038452606756, + "Parent Entity": "ContainerEntity", + "Transform Data": { + "Translate": [ + 2.5301437377929688, + -0.00018183141946792603, + 49.593753814697266 + ] + } + }, + "Component_[4564240319609068082]": { + "$type": "EditorEntitySortComponent", + "Id": 4564240319609068082 + }, + "Component_[7827190074535394331]": { + "$type": "EditorMaterialComponent", + "Id": 7827190074535394331, + "Controller": { + "Configuration": { + "materials": [ + { + "Key": { + "materialSlotStableId": 2418540911 + }, + "Value": { + "MaterialAsset": { + "assetId": { + "guid": "{60D4CA04-A2FE-5AE7-B472-694C38D05183}" + }, + "assetHint": "materials/presets/pbr/metal_platinum_matte.azmaterial" + } + } + } + ] + } + } + }, + "Component_[8092226976542590265]": { + "$type": "EditorDisabledCompositionComponent", + "Id": 8092226976542590265 + } + } + }, + "Entity_[1385443747796]": { + "Id": "Entity_[1385443747796]", + "Name": "Entity1", + "Components": { + "Component_[11525365929370623807]": { + "$type": "EditorVisibilityComponent", + "Id": 11525365929370623807 + }, + "Component_[12334620273692642550]": { + "$type": "EditorLockComponent", + "Id": 12334620273692642550 + }, + "Component_[14389735759337977675]": { + "$type": "EditorPendingCompositionComponent", + "Id": 14389735759337977675 + }, + "Component_[16184381538555246534]": { + "$type": "AZ::Render::EditorMeshComponent", + "Id": 16184381538555246534, + "Controller": { + "Configuration": { + "ModelAsset": { + "assetId": { + "guid": "{E14975EF-E676-51A4-B826-3EF59CB645AA}", + "subId": 285127096 + }, + "assetHint": "testdata/objects/cube/cube.azmodel" + } + } + } + }, + "Component_[17962478023087084794]": { + "$type": "SelectionComponent", + "Id": 17962478023087084794 + }, + "Component_[18071675051915092508]": { + "$type": "EditorEntityIconComponent", + "Id": 18071675051915092508 + }, + "Component_[2115498007879087044]": { + "$type": "EditorInspectorComponent", + "Id": 2115498007879087044, + "ComponentOrderEntryArray": [ + { + "ComponentId": 399415038452606756 + }, + { + "ComponentId": 16184381538555246534, + "SortIndex": 1 + }, + { + "ComponentId": 7827190074535394331, + "SortIndex": 2 + } + ] + }, + "Component_[3518973002096080237]": { + "$type": "EditorOnlyEntityComponent", + "Id": 3518973002096080237 + }, + "Component_[399415038452606756]": { + "$type": "{27F1E1A1-8D9D-4C3B-BD3A-AFB9762449C0} TransformComponent", + "Id": 399415038452606756, + "Parent Entity": "ContainerEntity", + "Transform Data": { + "Translate": [ + -32.53056335449219, + -0.00018183141946792603, + 84.40655517578125 + ] + } + }, + "Component_[4564240319609068082]": { + "$type": "EditorEntitySortComponent", + "Id": 4564240319609068082 + }, + "Component_[7827190074535394331]": { + "$type": "EditorMaterialComponent", + "Id": 7827190074535394331, + "Controller": { + "Configuration": { + "materials": [ + { + "Key": { + "materialSlotStableId": 2418540911 + }, + "Value": { + "MaterialAsset": { + "assetId": { + "guid": "{99976D73-6248-5D66-AD15-E8F52B0AFE36}" + }, + "assetHint": "materials/presets/pbr/metal_cobalt.azmaterial" + } + } + } + ] + } + } + }, + "Component_[8092226976542590265]": { + "$type": "EditorDisabledCompositionComponent", + "Id": 8092226976542590265 + } + } + }, + "Entity_[1389738715092]": { + "Id": "Entity_[1389738715092]", + "Name": "Entity1", + "Components": { + "Component_[11525365929370623807]": { + "$type": "EditorVisibilityComponent", + "Id": 11525365929370623807 + }, + "Component_[12334620273692642550]": { + "$type": "EditorLockComponent", + "Id": 12334620273692642550 + }, + "Component_[14389735759337977675]": { + "$type": "EditorPendingCompositionComponent", + "Id": 14389735759337977675 + }, + "Component_[16184381538555246534]": { + "$type": "AZ::Render::EditorMeshComponent", + "Id": 16184381538555246534, + "Controller": { + "Configuration": { + "ModelAsset": { + "assetId": { + "guid": "{E14975EF-E676-51A4-B826-3EF59CB645AA}", + "subId": 285127096 + }, + "assetHint": "testdata/objects/cube/cube.azmodel" + } + } + } + }, + "Component_[17962478023087084794]": { + "$type": "SelectionComponent", + "Id": 17962478023087084794 + }, + "Component_[18071675051915092508]": { + "$type": "EditorEntityIconComponent", + "Id": 18071675051915092508 + }, + "Component_[2115498007879087044]": { + "$type": "EditorInspectorComponent", + "Id": 2115498007879087044, + "ComponentOrderEntryArray": [ + { + "ComponentId": 399415038452606756 + }, + { + "ComponentId": 16184381538555246534, + "SortIndex": 1 + }, + { + "ComponentId": 7827190074535394331, + "SortIndex": 2 + } + ] + }, + "Component_[3518973002096080237]": { + "$type": "EditorOnlyEntityComponent", + "Id": 3518973002096080237 + }, + "Component_[399415038452606756]": { + "$type": "{27F1E1A1-8D9D-4C3B-BD3A-AFB9762449C0} TransformComponent", + "Id": 399415038452606756, + "Parent Entity": "ContainerEntity", + "Transform Data": { + "Translate": [ + -37.53056335449219, + -0.00018183141946792603, + 74.93071746826172 + ] + } + }, + "Component_[4564240319609068082]": { + "$type": "EditorEntitySortComponent", + "Id": 4564240319609068082 + }, + "Component_[7827190074535394331]": { + "$type": "EditorMaterialComponent", + "Id": 7827190074535394331, + "Controller": { + "Configuration": { + "materials": [ + { + "Key": { + "materialSlotStableId": 2418540911 + }, + "Value": { + "MaterialAsset": { + "assetId": { + "guid": "{CAF50181-3384-5DF2-9304-C6E48E83C72D}" + }, + "assetHint": "materials/presets/pbr/metal_chrome_polished.azmaterial" + } + } + } + ] + } + } + }, + "Component_[8092226976542590265]": { + "$type": "EditorDisabledCompositionComponent", + "Id": 8092226976542590265 + } + } + }, + "Entity_[1394033682388]": { + "Id": "Entity_[1394033682388]", + "Name": "Entity1", + "Components": { + "Component_[11525365929370623807]": { + "$type": "EditorVisibilityComponent", + "Id": 11525365929370623807 + }, + "Component_[12334620273692642550]": { + "$type": "EditorLockComponent", + "Id": 12334620273692642550 + }, + "Component_[14389735759337977675]": { + "$type": "EditorPendingCompositionComponent", + "Id": 14389735759337977675 + }, + "Component_[16184381538555246534]": { + "$type": "AZ::Render::EditorMeshComponent", + "Id": 16184381538555246534, + "Controller": { + "Configuration": { + "ModelAsset": { + "assetId": { + "guid": "{E14975EF-E676-51A4-B826-3EF59CB645AA}", + "subId": 285127096 + }, + "assetHint": "testdata/objects/cube/cube.azmodel" + } + } + } + }, + "Component_[17962478023087084794]": { + "$type": "SelectionComponent", + "Id": 17962478023087084794 + }, + "Component_[18071675051915092508]": { + "$type": "EditorEntityIconComponent", + "Id": 18071675051915092508 + }, + "Component_[2115498007879087044]": { + "$type": "EditorInspectorComponent", + "Id": 2115498007879087044, + "ComponentOrderEntryArray": [ + { + "ComponentId": 399415038452606756 + }, + { + "ComponentId": 16184381538555246534, + "SortIndex": 1 + }, + { + "ComponentId": 7827190074535394331, + "SortIndex": 2 + } + ] + }, + "Component_[3518973002096080237]": { + "$type": "EditorOnlyEntityComponent", + "Id": 3518973002096080237 + }, + "Component_[399415038452606756]": { + "$type": "{27F1E1A1-8D9D-4C3B-BD3A-AFB9762449C0} TransformComponent", + "Id": 399415038452606756, + "Parent Entity": "ContainerEntity", + "Transform Data": { + "Translate": [ + -42.53056335449219, + -0.00018183141946792603, + 4.451573371887207 + ] + } + }, + "Component_[4564240319609068082]": { + "$type": "EditorEntitySortComponent", + "Id": 4564240319609068082 + }, + "Component_[7827190074535394331]": { + "$type": "EditorMaterialComponent", + "Id": 7827190074535394331, + "Controller": { + "Configuration": { + "materials": [ + { + "Key": { + "materialSlotStableId": 2418540911 + }, + "Value": { + "MaterialAsset": { + "assetId": { + "guid": "{AE350D9F-0000-526D-B49C-4303D687BB86}" + }, + "assetHint": "materials/presets/pbr/metal_brass_matte.azmaterial" + } + } + } + ] + } + } + }, + "Component_[8092226976542590265]": { + "$type": "EditorDisabledCompositionComponent", + "Id": 8092226976542590265 + } + } + }, + "Entity_[1398328649684]": { + "Id": "Entity_[1398328649684]", + "Name": "Entity1", + "Components": { + "Component_[11525365929370623807]": { + "$type": "EditorVisibilityComponent", + "Id": 11525365929370623807 + }, + "Component_[12334620273692642550]": { + "$type": "EditorLockComponent", + "Id": 12334620273692642550 + }, + "Component_[14389735759337977675]": { + "$type": "EditorPendingCompositionComponent", + "Id": 14389735759337977675 + }, + "Component_[16184381538555246534]": { + "$type": "AZ::Render::EditorMeshComponent", + "Id": 16184381538555246534, + "Controller": { + "Configuration": { + "ModelAsset": { + "assetId": { + "guid": "{E14975EF-E676-51A4-B826-3EF59CB645AA}", + "subId": 285127096 + }, + "assetHint": "testdata/objects/cube/cube.azmodel" + } + } + } + }, + "Component_[17962478023087084794]": { + "$type": "SelectionComponent", + "Id": 17962478023087084794 + }, + "Component_[18071675051915092508]": { + "$type": "EditorEntityIconComponent", + "Id": 18071675051915092508 + }, + "Component_[2115498007879087044]": { + "$type": "EditorInspectorComponent", + "Id": 2115498007879087044, + "ComponentOrderEntryArray": [ + { + "ComponentId": 399415038452606756 + }, + { + "ComponentId": 16184381538555246534, + "SortIndex": 1 + }, + { + "ComponentId": 7827190074535394331, + "SortIndex": 2 + } + ] + }, + "Component_[3518973002096080237]": { + "$type": "EditorOnlyEntityComponent", + "Id": 3518973002096080237 + }, + "Component_[399415038452606756]": { + "$type": "{27F1E1A1-8D9D-4C3B-BD3A-AFB9762449C0} TransformComponent", + "Id": 399415038452606756, + "Parent Entity": "ContainerEntity", + "Transform Data": { + "Translate": [ + -32.53056335449219, + -0.00018183141946792603, + 19.50924301147461 + ] + } + }, + "Component_[4564240319609068082]": { + "$type": "EditorEntitySortComponent", + "Id": 4564240319609068082 + }, + "Component_[7827190074535394331]": { + "$type": "EditorMaterialComponent", + "Id": 7827190074535394331, + "Controller": { + "Configuration": { + "materials": [ + { + "Key": { + "materialSlotStableId": 2418540911 + }, + "Value": { + "MaterialAsset": { + "assetId": { + "guid": "{C60A39AF-BB76-51BD-9468-A88C9A6F78D7}" + }, + "assetHint": "materials/presets/pbr/metal_cobalt_matte.azmaterial" + } + } + } + ] + } + } + }, + "Component_[8092226976542590265]": { + "$type": "EditorDisabledCompositionComponent", + "Id": 8092226976542590265 + } + } + }, + "Entity_[1402623616980]": { + "Id": "Entity_[1402623616980]", + "Name": "Entity1", + "Components": { + "Component_[11525365929370623807]": { + "$type": "EditorVisibilityComponent", + "Id": 11525365929370623807 + }, + "Component_[12334620273692642550]": { + "$type": "EditorLockComponent", + "Id": 12334620273692642550 + }, + "Component_[14389735759337977675]": { + "$type": "EditorPendingCompositionComponent", + "Id": 14389735759337977675 + }, + "Component_[16184381538555246534]": { + "$type": "AZ::Render::EditorMeshComponent", + "Id": 16184381538555246534, + "Controller": { + "Configuration": { + "ModelAsset": { + "assetId": { + "guid": "{E14975EF-E676-51A4-B826-3EF59CB645AA}", + "subId": 285127096 + }, + "assetHint": "testdata/objects/cube/cube.azmodel" + } + } + } + }, + "Component_[17962478023087084794]": { + "$type": "SelectionComponent", + "Id": 17962478023087084794 + }, + "Component_[18071675051915092508]": { + "$type": "EditorEntityIconComponent", + "Id": 18071675051915092508 + }, + "Component_[2115498007879087044]": { + "$type": "EditorInspectorComponent", + "Id": 2115498007879087044, + "ComponentOrderEntryArray": [ + { + "ComponentId": 399415038452606756 + }, + { + "ComponentId": 16184381538555246534, + "SortIndex": 1 + }, + { + "ComponentId": 7827190074535394331, + "SortIndex": 2 + } + ] + }, + "Component_[3518973002096080237]": { + "$type": "EditorOnlyEntityComponent", + "Id": 3518973002096080237 + }, + "Component_[399415038452606756]": { + "$type": "{27F1E1A1-8D9D-4C3B-BD3A-AFB9762449C0} TransformComponent", + "Id": 399415038452606756, + "Parent Entity": "ContainerEntity", + "Transform Data": { + "Translate": [ + -47.53056335449219, + -0.00018183141946792603, + 34.53608703613281 + ] + } + }, + "Component_[4564240319609068082]": { + "$type": "EditorEntitySortComponent", + "Id": 4564240319609068082 + }, + "Component_[7827190074535394331]": { + "$type": "EditorMaterialComponent", + "Id": 7827190074535394331, + "Controller": { + "Configuration": { + "materials": [ + { + "Key": { + "materialSlotStableId": 2418540911 + }, + "Value": { + "MaterialAsset": { + "assetId": { + "guid": "{549D26B8-881D-569F-AF05-961F36A43F4F}" + }, + "assetHint": "materials/presets/pbr/metal_aluminum_matte.azmaterial" + } + } + } + ] + } + } + }, + "Component_[8092226976542590265]": { + "$type": "EditorDisabledCompositionComponent", + "Id": 8092226976542590265 + } + } + }, + "Entity_[1406918584276]": { + "Id": "Entity_[1406918584276]", + "Name": "Entity1", + "Components": { + "Component_[11525365929370623807]": { + "$type": "EditorVisibilityComponent", + "Id": 11525365929370623807 + }, + "Component_[12334620273692642550]": { + "$type": "EditorLockComponent", + "Id": 12334620273692642550 + }, + "Component_[14389735759337977675]": { + "$type": "EditorPendingCompositionComponent", + "Id": 14389735759337977675 + }, + "Component_[16184381538555246534]": { + "$type": "AZ::Render::EditorMeshComponent", + "Id": 16184381538555246534, + "Controller": { + "Configuration": { + "ModelAsset": { + "assetId": { + "guid": "{E14975EF-E676-51A4-B826-3EF59CB645AA}", + "subId": 285127096 + }, + "assetHint": "testdata/objects/cube/cube.azmodel" + } + } + } + }, + "Component_[17962478023087084794]": { + "$type": "SelectionComponent", + "Id": 17962478023087084794 + }, + "Component_[18071675051915092508]": { + "$type": "EditorEntityIconComponent", + "Id": 18071675051915092508 + }, + "Component_[2115498007879087044]": { + "$type": "EditorInspectorComponent", + "Id": 2115498007879087044, + "ComponentOrderEntryArray": [ + { + "ComponentId": 399415038452606756 + }, + { + "ComponentId": 16184381538555246534, + "SortIndex": 1 + }, + { + "ComponentId": 7827190074535394331, + "SortIndex": 2 + } + ] + }, + "Component_[3518973002096080237]": { + "$type": "EditorOnlyEntityComponent", + "Id": 3518973002096080237 + }, + "Component_[399415038452606756]": { + "$type": "{27F1E1A1-8D9D-4C3B-BD3A-AFB9762449C0} TransformComponent", + "Id": 399415038452606756, + "Parent Entity": "ContainerEntity", + "Transform Data": { + "Translate": [ + 42.53014373779297, + -0.00018183141946792603, + 79.38228607177734 + ] + } + }, + "Component_[4564240319609068082]": { + "$type": "EditorEntitySortComponent", + "Id": 4564240319609068082 + }, + "Component_[7827190074535394331]": { + "$type": "EditorMaterialComponent", + "Id": 7827190074535394331, + "Controller": { + "Configuration": { + "materials": [ + { + "Key": { + "materialSlotStableId": 2418540911 + }, + "Value": { + "MaterialAsset": { + "assetId": { + "guid": "{5BC13D95-377E-53EA-9A93-156384BE8B04}" + }, + "assetHint": "materials/presets/pbr/metal_gold_matte.azmaterial" + } + } + } + ] + } + } + }, + "Component_[8092226976542590265]": { + "$type": "EditorDisabledCompositionComponent", + "Id": 8092226976542590265 + } + } + }, + "Entity_[1411213551572]": { + "Id": "Entity_[1411213551572]", + "Name": "Entity1", + "Components": { + "Component_[11525365929370623807]": { + "$type": "EditorVisibilityComponent", + "Id": 11525365929370623807 + }, + "Component_[12334620273692642550]": { + "$type": "EditorLockComponent", + "Id": 12334620273692642550 + }, + "Component_[14389735759337977675]": { + "$type": "EditorPendingCompositionComponent", + "Id": 14389735759337977675 + }, + "Component_[16184381538555246534]": { + "$type": "AZ::Render::EditorMeshComponent", + "Id": 16184381538555246534, + "Controller": { + "Configuration": { + "ModelAsset": { + "assetId": { + "guid": "{E14975EF-E676-51A4-B826-3EF59CB645AA}", + "subId": 285127096 + }, + "assetHint": "testdata/objects/cube/cube.azmodel" + } + } + } + }, + "Component_[17962478023087084794]": { + "$type": "SelectionComponent", + "Id": 17962478023087084794 + }, + "Component_[18071675051915092508]": { + "$type": "EditorEntityIconComponent", + "Id": 18071675051915092508 + }, + "Component_[2115498007879087044]": { + "$type": "EditorInspectorComponent", + "Id": 2115498007879087044, + "ComponentOrderEntryArray": [ + { + "ComponentId": 399415038452606756 + }, + { + "ComponentId": 16184381538555246534, + "SortIndex": 1 + }, + { + "ComponentId": 7827190074535394331, + "SortIndex": 2 + } + ] + }, + "Component_[3518973002096080237]": { + "$type": "EditorOnlyEntityComponent", + "Id": 3518973002096080237 + }, + "Component_[399415038452606756]": { + "$type": "{27F1E1A1-8D9D-4C3B-BD3A-AFB9762449C0} TransformComponent", + "Id": 399415038452606756, + "Parent Entity": "ContainerEntity", + "Transform Data": { + "Translate": [ + -37.53056335449219, + -0.00018183141946792603, + 79.38228607177734 + ] + } + }, + "Component_[4564240319609068082]": { + "$type": "EditorEntitySortComponent", + "Id": 4564240319609068082 + }, + "Component_[7827190074535394331]": { + "$type": "EditorMaterialComponent", + "Id": 7827190074535394331, + "Controller": { + "Configuration": { + "materials": [ + { + "Key": { + "materialSlotStableId": 2418540911 + }, + "Value": { + "MaterialAsset": { + "assetId": { + "guid": "{A78EA2FC-688B-5E3A-A7F6-DB413D11D4CF}" + }, + "assetHint": "materials/presets/pbr/metal_chrome_matte.azmaterial" + } + } + } + ] + } + } + }, + "Component_[8092226976542590265]": { + "$type": "EditorDisabledCompositionComponent", + "Id": 8092226976542590265 + } + } + }, + "Entity_[1415508518868]": { + "Id": "Entity_[1415508518868]", + "Name": "Entity1", + "Components": { + "Component_[11525365929370623807]": { + "$type": "EditorVisibilityComponent", + "Id": 11525365929370623807 + }, + "Component_[12334620273692642550]": { + "$type": "EditorLockComponent", + "Id": 12334620273692642550 + }, + "Component_[14389735759337977675]": { + "$type": "EditorPendingCompositionComponent", + "Id": 14389735759337977675 + }, + "Component_[16184381538555246534]": { + "$type": "AZ::Render::EditorMeshComponent", + "Id": 16184381538555246534, + "Controller": { + "Configuration": { + "ModelAsset": { + "assetId": { + "guid": "{E14975EF-E676-51A4-B826-3EF59CB645AA}", + "subId": 285127096 + }, + "assetHint": "testdata/objects/cube/cube.azmodel" + } + } + } + }, + "Component_[17962478023087084794]": { + "$type": "SelectionComponent", + "Id": 17962478023087084794 + }, + "Component_[18071675051915092508]": { + "$type": "EditorEntityIconComponent", + "Id": 18071675051915092508 + }, + "Component_[2115498007879087044]": { + "$type": "EditorInspectorComponent", + "Id": 2115498007879087044, + "ComponentOrderEntryArray": [ + { + "ComponentId": 399415038452606756 + }, + { + "ComponentId": 16184381538555246534, + "SortIndex": 1 + }, + { + "ComponentId": 7827190074535394331, + "SortIndex": 2 + } + ] + }, + "Component_[3518973002096080237]": { + "$type": "EditorOnlyEntityComponent", + "Id": 3518973002096080237 + }, + "Component_[399415038452606756]": { + "$type": "{27F1E1A1-8D9D-4C3B-BD3A-AFB9762449C0} TransformComponent", + "Id": 399415038452606756, + "Parent Entity": "ContainerEntity", + "Transform Data": { + "Translate": [ + 37.53014373779297, + -0.00018183141946792603, + 59.873046875 + ] + } + }, + "Component_[4564240319609068082]": { + "$type": "EditorEntitySortComponent", + "Id": 4564240319609068082 + }, + "Component_[7827190074535394331]": { + "$type": "EditorMaterialComponent", + "Id": 7827190074535394331, + "Controller": { + "Configuration": { + "materials": [ + { + "Key": { + "materialSlotStableId": 2418540911 + }, + "Value": { + "MaterialAsset": { + "assetId": { + "guid": "{CF5C7B01-4912-58AE-991A-F25251E505AC}" + }, + "assetHint": "materials/presets/pbr/metal_copper_polished.azmaterial" + } + } + } + ] + } + } + }, + "Component_[8092226976542590265]": { + "$type": "EditorDisabledCompositionComponent", + "Id": 8092226976542590265 + } + } + }, + "Entity_[1419803486164]": { + "Id": "Entity_[1419803486164]", + "Name": "Entity1", + "Components": { + "Component_[11525365929370623807]": { + "$type": "EditorVisibilityComponent", + "Id": 11525365929370623807 + }, + "Component_[12334620273692642550]": { + "$type": "EditorLockComponent", + "Id": 12334620273692642550 + }, + "Component_[14389735759337977675]": { + "$type": "EditorPendingCompositionComponent", + "Id": 14389735759337977675 + }, + "Component_[16184381538555246534]": { + "$type": "AZ::Render::EditorMeshComponent", + "Id": 16184381538555246534, + "Controller": { + "Configuration": { + "ModelAsset": { + "assetId": { + "guid": "{E14975EF-E676-51A4-B826-3EF59CB645AA}", + "subId": 285127096 + }, + "assetHint": "testdata/objects/cube/cube.azmodel" + } + } + } + }, + "Component_[17962478023087084794]": { + "$type": "SelectionComponent", + "Id": 17962478023087084794 + }, + "Component_[18071675051915092508]": { + "$type": "EditorEntityIconComponent", + "Id": 18071675051915092508 + }, + "Component_[2115498007879087044]": { + "$type": "EditorInspectorComponent", + "Id": 2115498007879087044, + "ComponentOrderEntryArray": [ + { + "ComponentId": 399415038452606756 + }, + { + "ComponentId": 16184381538555246534, + "SortIndex": 1 + }, + { + "ComponentId": 7827190074535394331, + "SortIndex": 2 + } + ] + }, + "Component_[3518973002096080237]": { + "$type": "EditorOnlyEntityComponent", + "Id": 3518973002096080237 + }, + "Component_[399415038452606756]": { + "$type": "{27F1E1A1-8D9D-4C3B-BD3A-AFB9762449C0} TransformComponent", + "Id": 399415038452606756, + "Parent Entity": "ContainerEntity", + "Transform Data": { + "Translate": [ + -22.530563354492188, + -0.00018183141946792603, + 69.34888458251953 + ] + } + }, + "Component_[4564240319609068082]": { + "$type": "EditorEntitySortComponent", + "Id": 4564240319609068082 + }, + "Component_[7827190074535394331]": { + "$type": "EditorMaterialComponent", + "Id": 7827190074535394331, + "Controller": { + "Configuration": { + "materials": [ + { + "Key": { + "materialSlotStableId": 2418540911 + }, + "Value": { + "MaterialAsset": { + "assetId": { + "guid": "{FE52E7C8-064D-506A-9C26-433EB93747DE}" + }, + "assetHint": "materials/presets/pbr/metal_gold.azmaterial" + } + } + } + ] + } + } + }, + "Component_[8092226976542590265]": { + "$type": "EditorDisabledCompositionComponent", + "Id": 8092226976542590265 + } + } + }, + "Entity_[1424098453460]": { + "Id": "Entity_[1424098453460]", + "Name": "Entity1", + "Components": { + "Component_[11525365929370623807]": { + "$type": "EditorVisibilityComponent", + "Id": 11525365929370623807 + }, + "Component_[12334620273692642550]": { + "$type": "EditorLockComponent", + "Id": 12334620273692642550 + }, + "Component_[14389735759337977675]": { + "$type": "EditorPendingCompositionComponent", + "Id": 14389735759337977675 + }, + "Component_[16184381538555246534]": { + "$type": "AZ::Render::EditorMeshComponent", + "Id": 16184381538555246534, + "Controller": { + "Configuration": { + "ModelAsset": { + "assetId": { + "guid": "{E14975EF-E676-51A4-B826-3EF59CB645AA}", + "subId": 285127096 + }, + "assetHint": "testdata/objects/cube/cube.azmodel" + } + } + } + }, + "Component_[17962478023087084794]": { + "$type": "SelectionComponent", + "Id": 17962478023087084794 + }, + "Component_[18071675051915092508]": { + "$type": "EditorEntityIconComponent", + "Id": 18071675051915092508 + }, + "Component_[2115498007879087044]": { + "$type": "EditorInspectorComponent", + "Id": 2115498007879087044, + "ComponentOrderEntryArray": [ + { + "ComponentId": 399415038452606756 + }, + { + "ComponentId": 16184381538555246534, + "SortIndex": 1 + }, + { + "ComponentId": 7827190074535394331, + "SortIndex": 2 + } + ] + }, + "Component_[3518973002096080237]": { + "$type": "EditorOnlyEntityComponent", + "Id": 3518973002096080237 + }, + "Component_[399415038452606756]": { + "$type": "{27F1E1A1-8D9D-4C3B-BD3A-AFB9762449C0} TransformComponent", + "Id": 399415038452606756, + "Parent Entity": "ContainerEntity", + "Transform Data": { + "Translate": [ + -2.5305633544921875, + -0.00018183141946792603, + 105.0152359008789 + ] + } + }, + "Component_[4564240319609068082]": { + "$type": "EditorEntitySortComponent", + "Id": 4564240319609068082 + }, + "Component_[7827190074535394331]": { + "$type": "EditorMaterialComponent", + "Id": 7827190074535394331, + "Controller": { + "Configuration": { + "materials": [ + { + "Key": { + "materialSlotStableId": 2418540911 + }, + "Value": { + "MaterialAsset": { + "assetId": { + "guid": "{D0E9960A-4B31-5136-BAC6-5482B203D3B4}" + }, + "assetHint": "materials/presets/pbr/metal_palladium_polished.azmaterial" + } + } + } + ] + } + } + }, + "Component_[8092226976542590265]": { + "$type": "EditorDisabledCompositionComponent", + "Id": 8092226976542590265 + } + } + }, + "Entity_[1428393420756]": { + "Id": "Entity_[1428393420756]", + "Name": "Entity1", + "Components": { + "Component_[11525365929370623807]": { + "$type": "EditorVisibilityComponent", + "Id": 11525365929370623807 + }, + "Component_[12334620273692642550]": { + "$type": "EditorLockComponent", + "Id": 12334620273692642550 + }, + "Component_[14389735759337977675]": { + "$type": "EditorPendingCompositionComponent", + "Id": 14389735759337977675 + }, + "Component_[16184381538555246534]": { + "$type": "AZ::Render::EditorMeshComponent", + "Id": 16184381538555246534, + "Controller": { + "Configuration": { + "ModelAsset": { + "assetId": { + "guid": "{E14975EF-E676-51A4-B826-3EF59CB645AA}", + "subId": 285127096 + }, + "assetHint": "testdata/objects/cube/cube.azmodel" + } + } + } + }, + "Component_[17962478023087084794]": { + "$type": "SelectionComponent", + "Id": 17962478023087084794 + }, + "Component_[18071675051915092508]": { + "$type": "EditorEntityIconComponent", + "Id": 18071675051915092508 + }, + "Component_[2115498007879087044]": { + "$type": "EditorInspectorComponent", + "Id": 2115498007879087044, + "ComponentOrderEntryArray": [ + { + "ComponentId": 399415038452606756 + }, + { + "ComponentId": 16184381538555246534, + "SortIndex": 1 + }, + { + "ComponentId": 7827190074535394331, + "SortIndex": 2 + } + ] + }, + "Component_[3518973002096080237]": { + "$type": "EditorOnlyEntityComponent", + "Id": 3518973002096080237 + }, + "Component_[399415038452606756]": { + "$type": "{27F1E1A1-8D9D-4C3B-BD3A-AFB9762449C0} TransformComponent", + "Id": 399415038452606756, + "Parent Entity": "ContainerEntity", + "Transform Data": { + "Translate": [ + 42.53014373779297, + -0.00018183141946792603, + 69.34888458251953 + ] + } + }, + "Component_[4564240319609068082]": { + "$type": "EditorEntitySortComponent", + "Id": 4564240319609068082 + }, + "Component_[7827190074535394331]": { + "$type": "EditorMaterialComponent", + "Id": 7827190074535394331, + "Controller": { + "Configuration": { + "materials": [ + { + "Key": { + "materialSlotStableId": 2418540911 + }, + "Value": { + "MaterialAsset": { + "assetId": { + "guid": "{FE52E7C8-064D-506A-9C26-433EB93747DE}" + }, + "assetHint": "materials/presets/pbr/metal_gold.azmaterial" + } + } + } + ] + } + } + }, + "Component_[8092226976542590265]": { + "$type": "EditorDisabledCompositionComponent", + "Id": 8092226976542590265 + } + } + }, + "Entity_[1432688388052]": { + "Id": "Entity_[1432688388052]", + "Name": "Entity1", + "Components": { + "Component_[11525365929370623807]": { + "$type": "EditorVisibilityComponent", + "Id": 11525365929370623807 + }, + "Component_[12334620273692642550]": { + "$type": "EditorLockComponent", + "Id": 12334620273692642550 + }, + "Component_[14389735759337977675]": { + "$type": "EditorPendingCompositionComponent", + "Id": 14389735759337977675 + }, + "Component_[16184381538555246534]": { + "$type": "AZ::Render::EditorMeshComponent", + "Id": 16184381538555246534, + "Controller": { + "Configuration": { + "ModelAsset": { + "assetId": { + "guid": "{E14975EF-E676-51A4-B826-3EF59CB645AA}", + "subId": 285127096 + }, + "assetHint": "testdata/objects/cube/cube.azmodel" + } + } + } + }, + "Component_[17962478023087084794]": { + "$type": "SelectionComponent", + "Id": 17962478023087084794 + }, + "Component_[18071675051915092508]": { + "$type": "EditorEntityIconComponent", + "Id": 18071675051915092508 + }, + "Component_[2115498007879087044]": { + "$type": "EditorInspectorComponent", + "Id": 2115498007879087044, + "ComponentOrderEntryArray": [ + { + "ComponentId": 399415038452606756 + }, + { + "ComponentId": 16184381538555246534, + "SortIndex": 1 + }, + { + "ComponentId": 7827190074535394331, + "SortIndex": 2 + } + ] + }, + "Component_[3518973002096080237]": { + "$type": "EditorOnlyEntityComponent", + "Id": 3518973002096080237 + }, + "Component_[399415038452606756]": { + "$type": "{27F1E1A1-8D9D-4C3B-BD3A-AFB9762449C0} TransformComponent", + "Id": 399415038452606756, + "Parent Entity": "ContainerEntity", + "Transform Data": { + "Translate": [ + 22.53014373779297, + -0.00018183141946792603, + 49.593753814697266 + ] + } + }, + "Component_[4564240319609068082]": { + "$type": "EditorEntitySortComponent", + "Id": 4564240319609068082 + }, + "Component_[7827190074535394331]": { + "$type": "EditorMaterialComponent", + "Id": 7827190074535394331, + "Controller": { + "Configuration": { + "materials": [ + { + "Key": { + "materialSlotStableId": 2418540911 + }, + "Value": { + "MaterialAsset": { + "assetId": { + "guid": "{AE350D9F-0000-526D-B49C-4303D687BB86}" + }, + "assetHint": "materials/presets/pbr/metal_brass_matte.azmaterial" + } + } + } + ] + } + } + }, + "Component_[8092226976542590265]": { + "$type": "EditorDisabledCompositionComponent", + "Id": 8092226976542590265 + } + } + }, + "Entity_[1436983355348]": { + "Id": "Entity_[1436983355348]", + "Name": "Entity1", + "Components": { + "Component_[11525365929370623807]": { + "$type": "EditorVisibilityComponent", + "Id": 11525365929370623807 + }, + "Component_[12334620273692642550]": { + "$type": "EditorLockComponent", + "Id": 12334620273692642550 + }, + "Component_[14389735759337977675]": { + "$type": "EditorPendingCompositionComponent", + "Id": 14389735759337977675 + }, + "Component_[16184381538555246534]": { + "$type": "AZ::Render::EditorMeshComponent", + "Id": 16184381538555246534, + "Controller": { + "Configuration": { + "ModelAsset": { + "assetId": { + "guid": "{E14975EF-E676-51A4-B826-3EF59CB645AA}", + "subId": 285127096 + }, + "assetHint": "testdata/objects/cube/cube.azmodel" + } + } + } + }, + "Component_[17962478023087084794]": { + "$type": "SelectionComponent", + "Id": 17962478023087084794 + }, + "Component_[18071675051915092508]": { + "$type": "EditorEntityIconComponent", + "Id": 18071675051915092508 + }, + "Component_[2115498007879087044]": { + "$type": "EditorInspectorComponent", + "Id": 2115498007879087044, + "ComponentOrderEntryArray": [ + { + "ComponentId": 399415038452606756 + }, + { + "ComponentId": 16184381538555246534, + "SortIndex": 1 + }, + { + "ComponentId": 7827190074535394331, + "SortIndex": 2 + } + ] + }, + "Component_[3518973002096080237]": { + "$type": "EditorOnlyEntityComponent", + "Id": 3518973002096080237 + }, + "Component_[399415038452606756]": { + "$type": "{27F1E1A1-8D9D-4C3B-BD3A-AFB9762449C0} TransformComponent", + "Id": 399415038452606756, + "Parent Entity": "ContainerEntity", + "Transform Data": { + "Translate": [ + -22.530563354492188, + -0.00018183141946792603, + 94.40913391113281 + ] + } + }, + "Component_[4564240319609068082]": { + "$type": "EditorEntitySortComponent", + "Id": 4564240319609068082 + }, + "Component_[7827190074535394331]": { + "$type": "EditorMaterialComponent", + "Id": 7827190074535394331, + "Controller": { + "Configuration": { + "materials": [ + { + "Key": { + "materialSlotStableId": 2418540911 + }, + "Value": { + "MaterialAsset": { + "assetId": { + "guid": "{5BC13D95-377E-53EA-9A93-156384BE8B04}" + }, + "assetHint": "materials/presets/pbr/metal_gold_matte.azmaterial" + } + } + } + ] + } + } + }, + "Component_[8092226976542590265]": { + "$type": "EditorDisabledCompositionComponent", + "Id": 8092226976542590265 + } + } + }, + "Entity_[1441278322644]": { + "Id": "Entity_[1441278322644]", + "Name": "Entity1", + "Components": { + "Component_[11525365929370623807]": { + "$type": "EditorVisibilityComponent", + "Id": 11525365929370623807 + }, + "Component_[12334620273692642550]": { + "$type": "EditorLockComponent", + "Id": 12334620273692642550 + }, + "Component_[14389735759337977675]": { + "$type": "EditorPendingCompositionComponent", + "Id": 14389735759337977675 + }, + "Component_[16184381538555246534]": { + "$type": "AZ::Render::EditorMeshComponent", + "Id": 16184381538555246534, + "Controller": { + "Configuration": { + "ModelAsset": { + "assetId": { + "guid": "{E14975EF-E676-51A4-B826-3EF59CB645AA}", + "subId": 285127096 + }, + "assetHint": "testdata/objects/cube/cube.azmodel" + } + } + } + }, + "Component_[17962478023087084794]": { + "$type": "SelectionComponent", + "Id": 17962478023087084794 + }, + "Component_[18071675051915092508]": { + "$type": "EditorEntityIconComponent", + "Id": 18071675051915092508 + }, + "Component_[2115498007879087044]": { + "$type": "EditorInspectorComponent", + "Id": 2115498007879087044, + "ComponentOrderEntryArray": [ + { + "ComponentId": 399415038452606756 + }, + { + "ComponentId": 16184381538555246534, + "SortIndex": 1 + }, + { + "ComponentId": 7827190074535394331, + "SortIndex": 2 + } + ] + }, + "Component_[3518973002096080237]": { + "$type": "EditorOnlyEntityComponent", + "Id": 3518973002096080237 + }, + "Component_[399415038452606756]": { + "$type": "{27F1E1A1-8D9D-4C3B-BD3A-AFB9762449C0} TransformComponent", + "Id": 399415038452606756, + "Parent Entity": "ContainerEntity", + "Transform Data": { + "Translate": [ + -32.53056335449219, + -0.00018183141946792603, + 34.53608703613281 + ] + } + }, + "Component_[4564240319609068082]": { + "$type": "EditorEntitySortComponent", + "Id": 4564240319609068082 + }, + "Component_[7827190074535394331]": { + "$type": "EditorMaterialComponent", + "Id": 7827190074535394331, + "Controller": { + "Configuration": { + "materials": [ + { + "Key": { + "materialSlotStableId": 2418540911 + }, + "Value": { + "MaterialAsset": { + "assetId": { + "guid": "{C60A39AF-BB76-51BD-9468-A88C9A6F78D7}" + }, + "assetHint": "materials/presets/pbr/metal_cobalt_matte.azmaterial" + } + } + } + ] + } + } + }, + "Component_[8092226976542590265]": { + "$type": "EditorDisabledCompositionComponent", + "Id": 8092226976542590265 + } + } + }, + "Entity_[1445573289940]": { + "Id": "Entity_[1445573289940]", + "Name": "Entity1", + "Components": { + "Component_[11525365929370623807]": { + "$type": "EditorVisibilityComponent", + "Id": 11525365929370623807 + }, + "Component_[12334620273692642550]": { + "$type": "EditorLockComponent", + "Id": 12334620273692642550 + }, + "Component_[14389735759337977675]": { + "$type": "EditorPendingCompositionComponent", + "Id": 14389735759337977675 + }, + "Component_[16184381538555246534]": { + "$type": "AZ::Render::EditorMeshComponent", + "Id": 16184381538555246534, + "Controller": { + "Configuration": { + "ModelAsset": { + "assetId": { + "guid": "{E14975EF-E676-51A4-B826-3EF59CB645AA}", + "subId": 285127096 + }, + "assetHint": "testdata/objects/cube/cube.azmodel" + } + } + } + }, + "Component_[17962478023087084794]": { + "$type": "SelectionComponent", + "Id": 17962478023087084794 + }, + "Component_[18071675051915092508]": { + "$type": "EditorEntityIconComponent", + "Id": 18071675051915092508 + }, + "Component_[2115498007879087044]": { + "$type": "EditorInspectorComponent", + "Id": 2115498007879087044, + "ComponentOrderEntryArray": [ + { + "ComponentId": 399415038452606756 + }, + { + "ComponentId": 16184381538555246534, + "SortIndex": 1 + }, + { + "ComponentId": 7827190074535394331, + "SortIndex": 2 + } + ] + }, + "Component_[3518973002096080237]": { + "$type": "EditorOnlyEntityComponent", + "Id": 3518973002096080237 + }, + "Component_[399415038452606756]": { + "$type": "{27F1E1A1-8D9D-4C3B-BD3A-AFB9762449C0} TransformComponent", + "Id": 399415038452606756, + "Parent Entity": "ContainerEntity", + "Transform Data": { + "Translate": [ + -37.53056335449219, + -0.00018183141946792603, + 34.53608703613281 + ] + } + }, + "Component_[4564240319609068082]": { + "$type": "EditorEntitySortComponent", + "Id": 4564240319609068082 + }, + "Component_[7827190074535394331]": { + "$type": "EditorMaterialComponent", + "Id": 7827190074535394331, + "Controller": { + "Configuration": { + "materials": [ + { + "Key": { + "materialSlotStableId": 2418540911 + }, + "Value": { + "MaterialAsset": { + "assetId": { + "guid": "{A78EA2FC-688B-5E3A-A7F6-DB413D11D4CF}" + }, + "assetHint": "materials/presets/pbr/metal_chrome_matte.azmaterial" + } + } + } + ] + } + } + }, + "Component_[8092226976542590265]": { + "$type": "EditorDisabledCompositionComponent", + "Id": 8092226976542590265 + } + } + }, + "Entity_[1449868257236]": { + "Id": "Entity_[1449868257236]", + "Name": "Entity1", + "Components": { + "Component_[11525365929370623807]": { + "$type": "EditorVisibilityComponent", + "Id": 11525365929370623807 + }, + "Component_[12334620273692642550]": { + "$type": "EditorLockComponent", + "Id": 12334620273692642550 + }, + "Component_[14389735759337977675]": { + "$type": "EditorPendingCompositionComponent", + "Id": 14389735759337977675 + }, + "Component_[16184381538555246534]": { + "$type": "AZ::Render::EditorMeshComponent", + "Id": 16184381538555246534, + "Controller": { + "Configuration": { + "ModelAsset": { + "assetId": { + "guid": "{E14975EF-E676-51A4-B826-3EF59CB645AA}", + "subId": 285127096 + }, + "assetHint": "testdata/objects/cube/cube.azmodel" + } + } + } + }, + "Component_[17962478023087084794]": { + "$type": "SelectionComponent", + "Id": 17962478023087084794 + }, + "Component_[18071675051915092508]": { + "$type": "EditorEntityIconComponent", + "Id": 18071675051915092508 + }, + "Component_[2115498007879087044]": { + "$type": "EditorInspectorComponent", + "Id": 2115498007879087044, + "ComponentOrderEntryArray": [ + { + "ComponentId": 399415038452606756 + }, + { + "ComponentId": 16184381538555246534, + "SortIndex": 1 + }, + { + "ComponentId": 7827190074535394331, + "SortIndex": 2 + } + ] + }, + "Component_[3518973002096080237]": { + "$type": "EditorOnlyEntityComponent", + "Id": 3518973002096080237 + }, + "Component_[399415038452606756]": { + "$type": "{27F1E1A1-8D9D-4C3B-BD3A-AFB9762449C0} TransformComponent", + "Id": 399415038452606756, + "Parent Entity": "ContainerEntity", + "Transform Data": { + "Translate": [ + -17.530563354492188, + -0.00018183141946792603, + 45.14218521118164 + ] + } + }, + "Component_[4564240319609068082]": { + "$type": "EditorEntitySortComponent", + "Id": 4564240319609068082 + }, + "Component_[7827190074535394331]": { + "$type": "EditorMaterialComponent", + "Id": 7827190074535394331, + "Controller": { + "Configuration": { + "materials": [ + { + "Key": { + "materialSlotStableId": 2418540911 + }, + "Value": { + "MaterialAsset": { + "assetId": { + "guid": "{A7F03135-ECAD-5440-99DB-E84ABA3D50DA}" + }, + "assetHint": "materials/presets/pbr/metal_iron_polished.azmaterial" + } + } + } + ] + } + } + }, + "Component_[8092226976542590265]": { + "$type": "EditorDisabledCompositionComponent", + "Id": 8092226976542590265 + } + } + }, + "Entity_[1454163224532]": { + "Id": "Entity_[1454163224532]", + "Name": "Entity1", + "Components": { + "Component_[11525365929370623807]": { + "$type": "EditorVisibilityComponent", + "Id": 11525365929370623807 + }, + "Component_[12334620273692642550]": { + "$type": "EditorLockComponent", + "Id": 12334620273692642550 + }, + "Component_[14389735759337977675]": { + "$type": "EditorPendingCompositionComponent", + "Id": 14389735759337977675 + }, + "Component_[16184381538555246534]": { + "$type": "AZ::Render::EditorMeshComponent", + "Id": 16184381538555246534, + "Controller": { + "Configuration": { + "ModelAsset": { + "assetId": { + "guid": "{E14975EF-E676-51A4-B826-3EF59CB645AA}", + "subId": 285127096 + }, + "assetHint": "testdata/objects/cube/cube.azmodel" + } + } + } + }, + "Component_[17962478023087084794]": { + "$type": "SelectionComponent", + "Id": 17962478023087084794 + }, + "Component_[18071675051915092508]": { + "$type": "EditorEntityIconComponent", + "Id": 18071675051915092508 + }, + "Component_[2115498007879087044]": { + "$type": "EditorInspectorComponent", + "Id": 2115498007879087044, + "ComponentOrderEntryArray": [ + { + "ComponentId": 399415038452606756 + }, + { + "ComponentId": 16184381538555246534, + "SortIndex": 1 + }, + { + "ComponentId": 7827190074535394331, + "SortIndex": 2 + } + ] + }, + "Component_[3518973002096080237]": { + "$type": "EditorOnlyEntityComponent", + "Id": 3518973002096080237 + }, + "Component_[399415038452606756]": { + "$type": "{27F1E1A1-8D9D-4C3B-BD3A-AFB9762449C0} TransformComponent", + "Id": 399415038452606756, + "Parent Entity": "ContainerEntity", + "Transform Data": { + "Translate": [ + 2.5301437377929688, + -0.00018183141946792603, + 0.0 + ] + } + }, + "Component_[4564240319609068082]": { + "$type": "EditorEntitySortComponent", + "Id": 4564240319609068082 + }, + "Component_[7827190074535394331]": { + "$type": "EditorMaterialComponent", + "Id": 7827190074535394331, + "Controller": { + "Configuration": { + "materials": [ + { + "Key": { + "materialSlotStableId": 2418540911 + }, + "Value": { + "MaterialAsset": { + "assetId": { + "guid": "{79419183-FFCE-5A89-AA16-C2789D81AF75}" + }, + "assetHint": "materials/presets/pbr/metal_platinum_polished.azmaterial" + } + } + } + ] + } + } + }, + "Component_[8092226976542590265]": { + "$type": "EditorDisabledCompositionComponent", + "Id": 8092226976542590265 + } + } + }, + "Entity_[1458458191828]": { + "Id": "Entity_[1458458191828]", + "Name": "Entity1", + "Components": { + "Component_[11525365929370623807]": { + "$type": "EditorVisibilityComponent", + "Id": 11525365929370623807 + }, + "Component_[12334620273692642550]": { + "$type": "EditorLockComponent", + "Id": 12334620273692642550 + }, + "Component_[14389735759337977675]": { + "$type": "EditorPendingCompositionComponent", + "Id": 14389735759337977675 + }, + "Component_[16184381538555246534]": { + "$type": "AZ::Render::EditorMeshComponent", + "Id": 16184381538555246534, + "Controller": { + "Configuration": { + "ModelAsset": { + "assetId": { + "guid": "{E14975EF-E676-51A4-B826-3EF59CB645AA}", + "subId": 285127096 + }, + "assetHint": "testdata/objects/cube/cube.azmodel" + } + } + } + }, + "Component_[17962478023087084794]": { + "$type": "SelectionComponent", + "Id": 17962478023087084794 + }, + "Component_[18071675051915092508]": { + "$type": "EditorEntityIconComponent", + "Id": 18071675051915092508 + }, + "Component_[2115498007879087044]": { + "$type": "EditorInspectorComponent", + "Id": 2115498007879087044, + "ComponentOrderEntryArray": [ + { + "ComponentId": 399415038452606756 + }, + { + "ComponentId": 16184381538555246534, + "SortIndex": 1 + }, + { + "ComponentId": 7827190074535394331, + "SortIndex": 2 + } + ] + }, + "Component_[3518973002096080237]": { + "$type": "EditorOnlyEntityComponent", + "Id": 3518973002096080237 + }, + "Component_[399415038452606756]": { + "$type": "{27F1E1A1-8D9D-4C3B-BD3A-AFB9762449C0} TransformComponent", + "Id": 399415038452606756, + "Parent Entity": "ContainerEntity", + "Transform Data": { + "Translate": [ + 2.5301437377929688, + -0.00018183141946792603, + 59.873046875 + ] + } + }, + "Component_[4564240319609068082]": { + "$type": "EditorEntitySortComponent", + "Id": 4564240319609068082 + }, + "Component_[7827190074535394331]": { + "$type": "EditorMaterialComponent", + "Id": 7827190074535394331, + "Controller": { + "Configuration": { + "materials": [ + { + "Key": { + "materialSlotStableId": 2418540911 + }, + "Value": { + "MaterialAsset": { + "assetId": { + "guid": "{79419183-FFCE-5A89-AA16-C2789D81AF75}" + }, + "assetHint": "materials/presets/pbr/metal_platinum_polished.azmaterial" + } + } + } + ] + } + } + }, + "Component_[8092226976542590265]": { + "$type": "EditorDisabledCompositionComponent", + "Id": 8092226976542590265 + } + } + }, + "Entity_[1462753159124]": { + "Id": "Entity_[1462753159124]", + "Name": "Entity1", + "Components": { + "Component_[11525365929370623807]": { + "$type": "EditorVisibilityComponent", + "Id": 11525365929370623807 + }, + "Component_[12334620273692642550]": { + "$type": "EditorLockComponent", + "Id": 12334620273692642550 + }, + "Component_[14389735759337977675]": { + "$type": "EditorPendingCompositionComponent", + "Id": 14389735759337977675 + }, + "Component_[16184381538555246534]": { + "$type": "AZ::Render::EditorMeshComponent", + "Id": 16184381538555246534, + "Controller": { + "Configuration": { + "ModelAsset": { + "assetId": { + "guid": "{E14975EF-E676-51A4-B826-3EF59CB645AA}", + "subId": 285127096 + }, + "assetHint": "testdata/objects/cube/cube.azmodel" + } + } + } + }, + "Component_[17962478023087084794]": { + "$type": "SelectionComponent", + "Id": 17962478023087084794 + }, + "Component_[18071675051915092508]": { + "$type": "EditorEntityIconComponent", + "Id": 18071675051915092508 + }, + "Component_[2115498007879087044]": { + "$type": "EditorInspectorComponent", + "Id": 2115498007879087044, + "ComponentOrderEntryArray": [ + { + "ComponentId": 399415038452606756 + }, + { + "ComponentId": 16184381538555246534, + "SortIndex": 1 + }, + { + "ComponentId": 7827190074535394331, + "SortIndex": 2 + } + ] + }, + "Component_[3518973002096080237]": { + "$type": "EditorOnlyEntityComponent", + "Id": 3518973002096080237 + }, + "Component_[399415038452606756]": { + "$type": "{27F1E1A1-8D9D-4C3B-BD3A-AFB9762449C0} TransformComponent", + "Id": 399415038452606756, + "Parent Entity": "ContainerEntity", + "Transform Data": { + "Translate": [ + -17.530563354492188, + -0.00018183141946792603, + 4.451573371887207 + ] + } + }, + "Component_[4564240319609068082]": { + "$type": "EditorEntitySortComponent", + "Id": 4564240319609068082 + }, + "Component_[7827190074535394331]": { + "$type": "EditorMaterialComponent", + "Id": 7827190074535394331, + "Controller": { + "Configuration": { + "materials": [ + { + "Key": { + "materialSlotStableId": 2418540911 + }, + "Value": { + "MaterialAsset": { + "assetId": { + "guid": "{970148AC-7258-5EC8-9CE7-F4EF93164D93}" + }, + "assetHint": "materials/presets/pbr/metal_iron_matte.azmaterial" + } + } + } + ] + } + } + }, + "Component_[8092226976542590265]": { + "$type": "EditorDisabledCompositionComponent", + "Id": 8092226976542590265 + } + } + }, + "Entity_[1467048126420]": { + "Id": "Entity_[1467048126420]", + "Name": "Entity1", + "Components": { + "Component_[11525365929370623807]": { + "$type": "EditorVisibilityComponent", + "Id": 11525365929370623807 + }, + "Component_[12334620273692642550]": { + "$type": "EditorLockComponent", + "Id": 12334620273692642550 + }, + "Component_[14389735759337977675]": { + "$type": "EditorPendingCompositionComponent", + "Id": 14389735759337977675 + }, + "Component_[16184381538555246534]": { + "$type": "AZ::Render::EditorMeshComponent", + "Id": 16184381538555246534, + "Controller": { + "Configuration": { + "ModelAsset": { + "assetId": { + "guid": "{E14975EF-E676-51A4-B826-3EF59CB645AA}", + "subId": 285127096 + }, + "assetHint": "testdata/objects/cube/cube.azmodel" + } + } + } + }, + "Component_[17962478023087084794]": { + "$type": "SelectionComponent", + "Id": 17962478023087084794 + }, + "Component_[18071675051915092508]": { + "$type": "EditorEntityIconComponent", + "Id": 18071675051915092508 + }, + "Component_[2115498007879087044]": { + "$type": "EditorInspectorComponent", + "Id": 2115498007879087044, + "ComponentOrderEntryArray": [ + { + "ComponentId": 399415038452606756 + }, + { + "ComponentId": 16184381538555246534, + "SortIndex": 1 + }, + { + "ComponentId": 7827190074535394331, + "SortIndex": 2 + } + ] + }, + "Component_[3518973002096080237]": { + "$type": "EditorOnlyEntityComponent", + "Id": 3518973002096080237 + }, + "Component_[399415038452606756]": { + "$type": "{27F1E1A1-8D9D-4C3B-BD3A-AFB9762449C0} TransformComponent", + "Id": 399415038452606756, + "Parent Entity": "ContainerEntity", + "Transform Data": { + "Translate": [ + 22.53014373779297, + -0.00018183141946792603, + 79.38228607177734 + ] + } + }, + "Component_[4564240319609068082]": { + "$type": "EditorEntitySortComponent", + "Id": 4564240319609068082 + }, + "Component_[7827190074535394331]": { + "$type": "EditorMaterialComponent", + "Id": 7827190074535394331, + "Controller": { + "Configuration": { + "materials": [ + { + "Key": { + "materialSlotStableId": 2418540911 + }, + "Value": { + "MaterialAsset": { + "assetId": { + "guid": "{AE350D9F-0000-526D-B49C-4303D687BB86}" + }, + "assetHint": "materials/presets/pbr/metal_brass_matte.azmaterial" + } + } + } + ] + } + } + }, + "Component_[8092226976542590265]": { + "$type": "EditorDisabledCompositionComponent", + "Id": 8092226976542590265 + } + } + }, + "Entity_[1471343093716]": { + "Id": "Entity_[1471343093716]", + "Name": "Entity1", + "Components": { + "Component_[11525365929370623807]": { + "$type": "EditorVisibilityComponent", + "Id": 11525365929370623807 + }, + "Component_[12334620273692642550]": { + "$type": "EditorLockComponent", + "Id": 12334620273692642550 + }, + "Component_[14389735759337977675]": { + "$type": "EditorPendingCompositionComponent", + "Id": 14389735759337977675 + }, + "Component_[16184381538555246534]": { + "$type": "AZ::Render::EditorMeshComponent", + "Id": 16184381538555246534, + "Controller": { + "Configuration": { + "ModelAsset": { + "assetId": { + "guid": "{E14975EF-E676-51A4-B826-3EF59CB645AA}", + "subId": 285127096 + }, + "assetHint": "testdata/objects/cube/cube.azmodel" + } + } + } + }, + "Component_[17962478023087084794]": { + "$type": "SelectionComponent", + "Id": 17962478023087084794 + }, + "Component_[18071675051915092508]": { + "$type": "EditorEntityIconComponent", + "Id": 18071675051915092508 + }, + "Component_[2115498007879087044]": { + "$type": "EditorInspectorComponent", + "Id": 2115498007879087044, + "ComponentOrderEntryArray": [ + { + "ComponentId": 399415038452606756 + }, + { + "ComponentId": 16184381538555246534, + "SortIndex": 1 + }, + { + "ComponentId": 7827190074535394331, + "SortIndex": 2 + } + ] + }, + "Component_[3518973002096080237]": { + "$type": "EditorOnlyEntityComponent", + "Id": 3518973002096080237 + }, + "Component_[399415038452606756]": { + "$type": "{27F1E1A1-8D9D-4C3B-BD3A-AFB9762449C0} TransformComponent", + "Id": 399415038452606756, + "Parent Entity": "ContainerEntity", + "Transform Data": { + "Translate": [ + 7.530143737792969, + -0.00018183141946792603, + 99.43339538574219 + ] + } + }, + "Component_[4564240319609068082]": { + "$type": "EditorEntitySortComponent", + "Id": 4564240319609068082 + }, + "Component_[7827190074535394331]": { + "$type": "EditorMaterialComponent", + "Id": 7827190074535394331, + "Controller": { + "Configuration": { + "materials": [ + { + "Key": { + "materialSlotStableId": 2418540911 + }, + "Value": { + "MaterialAsset": { + "assetId": { + "guid": "{CDA13277-5EAB-5E2A-93F5-B7003597FBCE}" + }, + "assetHint": "materials/presets/pbr/metal_silver.azmaterial" + } + } + } + ] + } + } + }, + "Component_[8092226976542590265]": { + "$type": "EditorDisabledCompositionComponent", + "Id": 8092226976542590265 + } + } + }, + "Entity_[1475638061012]": { + "Id": "Entity_[1475638061012]", + "Name": "Entity1", + "Components": { + "Component_[11525365929370623807]": { + "$type": "EditorVisibilityComponent", + "Id": 11525365929370623807 + }, + "Component_[12334620273692642550]": { + "$type": "EditorLockComponent", + "Id": 12334620273692642550 + }, + "Component_[14389735759337977675]": { + "$type": "EditorPendingCompositionComponent", + "Id": 14389735759337977675 + }, + "Component_[16184381538555246534]": { + "$type": "AZ::Render::EditorMeshComponent", + "Id": 16184381538555246534, + "Controller": { + "Configuration": { + "ModelAsset": { + "assetId": { + "guid": "{E14975EF-E676-51A4-B826-3EF59CB645AA}", + "subId": 285127096 + }, + "assetHint": "testdata/objects/cube/cube.azmodel" + } + } + } + }, + "Component_[17962478023087084794]": { + "$type": "SelectionComponent", + "Id": 17962478023087084794 + }, + "Component_[18071675051915092508]": { + "$type": "EditorEntityIconComponent", + "Id": 18071675051915092508 + }, + "Component_[2115498007879087044]": { + "$type": "EditorInspectorComponent", + "Id": 2115498007879087044, + "ComponentOrderEntryArray": [ + { + "ComponentId": 399415038452606756 + }, + { + "ComponentId": 16184381538555246534, + "SortIndex": 1 + }, + { + "ComponentId": 7827190074535394331, + "SortIndex": 2 + } + ] + }, + "Component_[3518973002096080237]": { + "$type": "EditorOnlyEntityComponent", + "Id": 3518973002096080237 + }, + "Component_[399415038452606756]": { + "$type": "{27F1E1A1-8D9D-4C3B-BD3A-AFB9762449C0} TransformComponent", + "Id": 399415038452606756, + "Parent Entity": "ContainerEntity", + "Transform Data": { + "Translate": [ + 27.53014373779297, + -0.00018183141946792603, + 45.14218521118164 + ] + } + }, + "Component_[4564240319609068082]": { + "$type": "EditorEntitySortComponent", + "Id": 4564240319609068082 + }, + "Component_[7827190074535394331]": { + "$type": "EditorMaterialComponent", + "Id": 7827190074535394331, + "Controller": { + "Configuration": { + "materials": [ + { + "Key": { + "materialSlotStableId": 2418540911 + }, + "Value": { + "MaterialAsset": { + "assetId": { + "guid": "{CAF50181-3384-5DF2-9304-C6E48E83C72D}" + }, + "assetHint": "materials/presets/pbr/metal_chrome_polished.azmaterial" + } + } + } + ] + } + } + }, + "Component_[8092226976542590265]": { + "$type": "EditorDisabledCompositionComponent", + "Id": 8092226976542590265 + } + } + }, + "Entity_[1479933028308]": { + "Id": "Entity_[1479933028308]", + "Name": "Entity1", + "Components": { + "Component_[11525365929370623807]": { + "$type": "EditorVisibilityComponent", + "Id": 11525365929370623807 + }, + "Component_[12334620273692642550]": { + "$type": "EditorLockComponent", + "Id": 12334620273692642550 + }, + "Component_[14389735759337977675]": { + "$type": "EditorPendingCompositionComponent", + "Id": 14389735759337977675 + }, + "Component_[16184381538555246534]": { + "$type": "AZ::Render::EditorMeshComponent", + "Id": 16184381538555246534, + "Controller": { + "Configuration": { + "ModelAsset": { + "assetId": { + "guid": "{E14975EF-E676-51A4-B826-3EF59CB645AA}", + "subId": 285127096 + }, + "assetHint": "testdata/objects/cube/cube.azmodel" + } + } + } + }, + "Component_[17962478023087084794]": { + "$type": "SelectionComponent", + "Id": 17962478023087084794 + }, + "Component_[18071675051915092508]": { + "$type": "EditorEntityIconComponent", + "Id": 18071675051915092508 + }, + "Component_[2115498007879087044]": { + "$type": "EditorInspectorComponent", + "Id": 2115498007879087044, + "ComponentOrderEntryArray": [ + { + "ComponentId": 399415038452606756 + }, + { + "ComponentId": 16184381538555246534, + "SortIndex": 1 + }, + { + "ComponentId": 7827190074535394331, + "SortIndex": 2 + } + ] + }, + "Component_[3518973002096080237]": { + "$type": "EditorOnlyEntityComponent", + "Id": 3518973002096080237 + }, + "Component_[399415038452606756]": { + "$type": "{27F1E1A1-8D9D-4C3B-BD3A-AFB9762449C0} TransformComponent", + "Id": 399415038452606756, + "Parent Entity": "ContainerEntity", + "Transform Data": { + "Translate": [ + 17.53014373779297, + -0.00018183141946792603, + 45.14218521118164 + ] + } + }, + "Component_[4564240319609068082]": { + "$type": "EditorEntitySortComponent", + "Id": 4564240319609068082 + }, + "Component_[7827190074535394331]": { + "$type": "EditorMaterialComponent", + "Id": 7827190074535394331, + "Controller": { + "Configuration": { + "materials": [ + { + "Key": {}, + "Value": { + "MaterialAsset": { + "assetId": { + "guid": "{721188E0-B7CC-5D06-8D5D-39AF8ABF2EF9}" + }, + "assetHint": "materials/presets/pbr/metal_titanium.azmaterial" + } + } + }, + { + "Key": { + "materialSlotStableId": 2418540911 + }, + "Value": { + "MaterialAsset": { + "assetId": { + "guid": "{64C1F6A6-6BDA-551A-BE56-1829E5913278}" + }, + "assetHint": "materials/presets/pbr/metal_aluminum_polished.azmaterial" + } + } + } + ] + } + } + }, + "Component_[8092226976542590265]": { + "$type": "EditorDisabledCompositionComponent", + "Id": 8092226976542590265 + } + } + }, + "Entity_[1484227995604]": { + "Id": "Entity_[1484227995604]", + "Name": "Entity1", + "Components": { + "Component_[11525365929370623807]": { + "$type": "EditorVisibilityComponent", + "Id": 11525365929370623807 + }, + "Component_[12334620273692642550]": { + "$type": "EditorLockComponent", + "Id": 12334620273692642550 + }, + "Component_[14389735759337977675]": { + "$type": "EditorPendingCompositionComponent", + "Id": 14389735759337977675 + }, + "Component_[16184381538555246534]": { + "$type": "AZ::Render::EditorMeshComponent", + "Id": 16184381538555246534, + "Controller": { + "Configuration": { + "ModelAsset": { + "assetId": { + "guid": "{E14975EF-E676-51A4-B826-3EF59CB645AA}", + "subId": 285127096 + }, + "assetHint": "testdata/objects/cube/cube.azmodel" + } + } + } + }, + "Component_[17962478023087084794]": { + "$type": "SelectionComponent", + "Id": 17962478023087084794 + }, + "Component_[18071675051915092508]": { + "$type": "EditorEntityIconComponent", + "Id": 18071675051915092508 + }, + "Component_[2115498007879087044]": { + "$type": "EditorInspectorComponent", + "Id": 2115498007879087044, + "ComponentOrderEntryArray": [ + { + "ComponentId": 399415038452606756 + }, + { + "ComponentId": 16184381538555246534, + "SortIndex": 1 + }, + { + "ComponentId": 7827190074535394331, + "SortIndex": 2 + } + ] + }, + "Component_[3518973002096080237]": { + "$type": "EditorOnlyEntityComponent", + "Id": 3518973002096080237 + }, + "Component_[399415038452606756]": { + "$type": "{27F1E1A1-8D9D-4C3B-BD3A-AFB9762449C0} TransformComponent", + "Id": 399415038452606756, + "Parent Entity": "ContainerEntity", + "Transform Data": { + "Translate": [ + 27.53014373779297, + -0.00018183141946792603, + 24.533506393432617 + ] + } + }, + "Component_[4564240319609068082]": { + "$type": "EditorEntitySortComponent", + "Id": 4564240319609068082 + }, + "Component_[7827190074535394331]": { + "$type": "EditorMaterialComponent", + "Id": 7827190074535394331, + "Controller": { + "Configuration": { + "materials": [ + { + "Key": { + "materialSlotStableId": 2418540911 + }, + "Value": { + "MaterialAsset": { + "assetId": { + "guid": "{B7C712DC-4839-58BB-B522-A4F120084CF5}" + }, + "assetHint": "materials/presets/pbr/metal_chrome.azmaterial" + } + } + } + ] + } + } + }, + "Component_[8092226976542590265]": { + "$type": "EditorDisabledCompositionComponent", + "Id": 8092226976542590265 + } + } + }, + "Entity_[1488522962900]": { + "Id": "Entity_[1488522962900]", + "Name": "Entity1", + "Components": { + "Component_[11525365929370623807]": { + "$type": "EditorVisibilityComponent", + "Id": 11525365929370623807 + }, + "Component_[12334620273692642550]": { + "$type": "EditorLockComponent", + "Id": 12334620273692642550 + }, + "Component_[14389735759337977675]": { + "$type": "EditorPendingCompositionComponent", + "Id": 14389735759337977675 + }, + "Component_[16184381538555246534]": { + "$type": "AZ::Render::EditorMeshComponent", + "Id": 16184381538555246534, + "Controller": { + "Configuration": { + "ModelAsset": { + "assetId": { + "guid": "{E14975EF-E676-51A4-B826-3EF59CB645AA}", + "subId": 285127096 + }, + "assetHint": "testdata/objects/cube/cube.azmodel" + } + } + } + }, + "Component_[17962478023087084794]": { + "$type": "SelectionComponent", + "Id": 17962478023087084794 + }, + "Component_[18071675051915092508]": { + "$type": "EditorEntityIconComponent", + "Id": 18071675051915092508 + }, + "Component_[2115498007879087044]": { + "$type": "EditorInspectorComponent", + "Id": 2115498007879087044, + "ComponentOrderEntryArray": [ + { + "ComponentId": 399415038452606756 + }, + { + "ComponentId": 16184381538555246534, + "SortIndex": 1 + }, + { + "ComponentId": 7827190074535394331, + "SortIndex": 2 + } + ] + }, + "Component_[3518973002096080237]": { + "$type": "EditorOnlyEntityComponent", + "Id": 3518973002096080237 + }, + "Component_[399415038452606756]": { + "$type": "{27F1E1A1-8D9D-4C3B-BD3A-AFB9762449C0} TransformComponent", + "Id": 399415038452606756, + "Parent Entity": "ContainerEntity", + "Transform Data": { + "Translate": [ + -37.53056335449219, + -0.00018183141946792603, + 34.53608703613281 + ] + } + }, + "Component_[4564240319609068082]": { + "$type": "EditorEntitySortComponent", + "Id": 4564240319609068082 + }, + "Component_[7827190074535394331]": { + "$type": "EditorMaterialComponent", + "Id": 7827190074535394331, + "Controller": { + "Configuration": { + "materials": [ + { + "Key": { + "materialSlotStableId": 2418540911 + }, + "Value": { + "MaterialAsset": { + "assetId": { + "guid": "{A78EA2FC-688B-5E3A-A7F6-DB413D11D4CF}" + }, + "assetHint": "materials/presets/pbr/metal_chrome_matte.azmaterial" + } + } + } + ] + } + } + }, + "Component_[8092226976542590265]": { + "$type": "EditorDisabledCompositionComponent", + "Id": 8092226976542590265 + } + } + }, + "Entity_[1492817930196]": { + "Id": "Entity_[1492817930196]", + "Name": "Entity1", + "Components": { + "Component_[11525365929370623807]": { + "$type": "EditorVisibilityComponent", + "Id": 11525365929370623807 + }, + "Component_[12334620273692642550]": { + "$type": "EditorLockComponent", + "Id": 12334620273692642550 + }, + "Component_[14389735759337977675]": { + "$type": "EditorPendingCompositionComponent", + "Id": 14389735759337977675 + }, + "Component_[16184381538555246534]": { + "$type": "AZ::Render::EditorMeshComponent", + "Id": 16184381538555246534, + "Controller": { + "Configuration": { + "ModelAsset": { + "assetId": { + "guid": "{E14975EF-E676-51A4-B826-3EF59CB645AA}", + "subId": 285127096 + }, + "assetHint": "testdata/objects/cube/cube.azmodel" + } + } + } + }, + "Component_[17962478023087084794]": { + "$type": "SelectionComponent", + "Id": 17962478023087084794 + }, + "Component_[18071675051915092508]": { + "$type": "EditorEntityIconComponent", + "Id": 18071675051915092508 + }, + "Component_[2115498007879087044]": { + "$type": "EditorInspectorComponent", + "Id": 2115498007879087044, + "ComponentOrderEntryArray": [ + { + "ComponentId": 399415038452606756 + }, + { + "ComponentId": 16184381538555246534, + "SortIndex": 1 + }, + { + "ComponentId": 7827190074535394331, + "SortIndex": 2 + } + ] + }, + "Component_[3518973002096080237]": { + "$type": "EditorOnlyEntityComponent", + "Id": 3518973002096080237 + }, + "Component_[399415038452606756]": { + "$type": "{27F1E1A1-8D9D-4C3B-BD3A-AFB9762449C0} TransformComponent", + "Id": 399415038452606756, + "Parent Entity": "ContainerEntity", + "Transform Data": { + "Translate": [ + -17.530563354492188, + -0.00018183141946792603, + 89.95755767822266 + ] + } + }, + "Component_[4564240319609068082]": { + "$type": "EditorEntitySortComponent", + "Id": 4564240319609068082 + }, + "Component_[7827190074535394331]": { + "$type": "EditorMaterialComponent", + "Id": 7827190074535394331, + "Controller": { + "Configuration": { + "materials": [ + { + "Key": { + "materialSlotStableId": 2418540911 + }, + "Value": { + "MaterialAsset": { + "assetId": { + "guid": "{A7F03135-ECAD-5440-99DB-E84ABA3D50DA}" + }, + "assetHint": "materials/presets/pbr/metal_iron_polished.azmaterial" + } + } + } + ] + } + } + }, + "Component_[8092226976542590265]": { + "$type": "EditorDisabledCompositionComponent", + "Id": 8092226976542590265 + } + } + }, + "Entity_[1497112897492]": { + "Id": "Entity_[1497112897492]", + "Name": "Entity1", + "Components": { + "Component_[11525365929370623807]": { + "$type": "EditorVisibilityComponent", + "Id": 11525365929370623807 + }, + "Component_[12334620273692642550]": { + "$type": "EditorLockComponent", + "Id": 12334620273692642550 + }, + "Component_[14389735759337977675]": { + "$type": "EditorPendingCompositionComponent", + "Id": 14389735759337977675 + }, + "Component_[16184381538555246534]": { + "$type": "AZ::Render::EditorMeshComponent", + "Id": 16184381538555246534, + "Controller": { + "Configuration": { + "ModelAsset": { + "assetId": { + "guid": "{E14975EF-E676-51A4-B826-3EF59CB645AA}", + "subId": 285127096 + }, + "assetHint": "testdata/objects/cube/cube.azmodel" + } + } + } + }, + "Component_[17962478023087084794]": { + "$type": "SelectionComponent", + "Id": 17962478023087084794 + }, + "Component_[18071675051915092508]": { + "$type": "EditorEntityIconComponent", + "Id": 18071675051915092508 + }, + "Component_[2115498007879087044]": { + "$type": "EditorInspectorComponent", + "Id": 2115498007879087044, + "ComponentOrderEntryArray": [ + { + "ComponentId": 399415038452606756 + }, + { + "ComponentId": 16184381538555246534, + "SortIndex": 1 + }, + { + "ComponentId": 7827190074535394331, + "SortIndex": 2 + } + ] + }, + "Component_[3518973002096080237]": { + "$type": "EditorOnlyEntityComponent", + "Id": 3518973002096080237 + }, + "Component_[399415038452606756]": { + "$type": "{27F1E1A1-8D9D-4C3B-BD3A-AFB9762449C0} TransformComponent", + "Id": 399415038452606756, + "Parent Entity": "ContainerEntity", + "Transform Data": { + "Translate": [ + 2.5301437377929688, + -0.00018183141946792603, + 79.38228607177734 + ] + } + }, + "Component_[4564240319609068082]": { + "$type": "EditorEntitySortComponent", + "Id": 4564240319609068082 + }, + "Component_[7827190074535394331]": { + "$type": "EditorMaterialComponent", + "Id": 7827190074535394331, + "Controller": { + "Configuration": { + "materials": [ + { + "Key": { + "materialSlotStableId": 2418540911 + }, + "Value": { + "MaterialAsset": { + "assetId": { + "guid": "{60D4CA04-A2FE-5AE7-B472-694C38D05183}" + }, + "assetHint": "materials/presets/pbr/metal_platinum_matte.azmaterial" + } + } + } + ] + } + } + }, + "Component_[8092226976542590265]": { + "$type": "EditorDisabledCompositionComponent", + "Id": 8092226976542590265 + } + } + }, + "Entity_[1501407864788]": { + "Id": "Entity_[1501407864788]", + "Name": "Entity1", + "Components": { + "Component_[11525365929370623807]": { + "$type": "EditorVisibilityComponent", + "Id": 11525365929370623807 + }, + "Component_[12334620273692642550]": { + "$type": "EditorLockComponent", + "Id": 12334620273692642550 + }, + "Component_[14389735759337977675]": { + "$type": "EditorPendingCompositionComponent", + "Id": 14389735759337977675 + }, + "Component_[16184381538555246534]": { + "$type": "AZ::Render::EditorMeshComponent", + "Id": 16184381538555246534, + "Controller": { + "Configuration": { + "ModelAsset": { + "assetId": { + "guid": "{E14975EF-E676-51A4-B826-3EF59CB645AA}", + "subId": 285127096 + }, + "assetHint": "testdata/objects/cube/cube.azmodel" + } + } + } + }, + "Component_[17962478023087084794]": { + "$type": "SelectionComponent", + "Id": 17962478023087084794 + }, + "Component_[18071675051915092508]": { + "$type": "EditorEntityIconComponent", + "Id": 18071675051915092508 + }, + "Component_[2115498007879087044]": { + "$type": "EditorInspectorComponent", + "Id": 2115498007879087044, + "ComponentOrderEntryArray": [ + { + "ComponentId": 399415038452606756 + }, + { + "ComponentId": 16184381538555246534, + "SortIndex": 1 + }, + { + "ComponentId": 7827190074535394331, + "SortIndex": 2 + } + ] + }, + "Component_[3518973002096080237]": { + "$type": "EditorOnlyEntityComponent", + "Id": 3518973002096080237 + }, + "Component_[399415038452606756]": { + "$type": "{27F1E1A1-8D9D-4C3B-BD3A-AFB9762449C0} TransformComponent", + "Id": 399415038452606756, + "Parent Entity": "ContainerEntity", + "Transform Data": { + "Translate": [ + -42.53056335449219, + -0.00018183141946792603, + 89.95755767822266 + ] + } + }, + "Component_[4564240319609068082]": { + "$type": "EditorEntitySortComponent", + "Id": 4564240319609068082 + }, + "Component_[7827190074535394331]": { + "$type": "EditorMaterialComponent", + "Id": 7827190074535394331, + "Controller": { + "Configuration": { + "materials": [ + { + "Key": { + "materialSlotStableId": 2418540911 + }, + "Value": { + "MaterialAsset": { + "assetId": { + "guid": "{FC69F2F8-F73B-5A0C-B8B7-94BAA45780FC}" + }, + "assetHint": "materials/presets/pbr/metal_brass_polished.azmaterial" + } + } + } + ] + } + } + }, + "Component_[8092226976542590265]": { + "$type": "EditorDisabledCompositionComponent", + "Id": 8092226976542590265 + } + } + }, + "Entity_[1505702832084]": { + "Id": "Entity_[1505702832084]", + "Name": "Entity1", + "Components": { + "Component_[11525365929370623807]": { + "$type": "EditorVisibilityComponent", + "Id": 11525365929370623807 + }, + "Component_[12334620273692642550]": { + "$type": "EditorLockComponent", + "Id": 12334620273692642550 + }, + "Component_[14389735759337977675]": { + "$type": "EditorPendingCompositionComponent", + "Id": 14389735759337977675 + }, + "Component_[16184381538555246534]": { + "$type": "AZ::Render::EditorMeshComponent", + "Id": 16184381538555246534, + "Controller": { + "Configuration": { + "ModelAsset": { + "assetId": { + "guid": "{E14975EF-E676-51A4-B826-3EF59CB645AA}", + "subId": 285127096 + }, + "assetHint": "testdata/objects/cube/cube.azmodel" + } + } + } + }, + "Component_[17962478023087084794]": { + "$type": "SelectionComponent", + "Id": 17962478023087084794 + }, + "Component_[18071675051915092508]": { + "$type": "EditorEntityIconComponent", + "Id": 18071675051915092508 + }, + "Component_[2115498007879087044]": { + "$type": "EditorInspectorComponent", + "Id": 2115498007879087044, + "ComponentOrderEntryArray": [ + { + "ComponentId": 399415038452606756 + }, + { + "ComponentId": 16184381538555246534, + "SortIndex": 1 + }, + { + "ComponentId": 7827190074535394331, + "SortIndex": 2 + } + ] + }, + "Component_[3518973002096080237]": { + "$type": "EditorOnlyEntityComponent", + "Id": 3518973002096080237 + }, + "Component_[399415038452606756]": { + "$type": "{27F1E1A1-8D9D-4C3B-BD3A-AFB9762449C0} TransformComponent", + "Id": 399415038452606756, + "Parent Entity": "ContainerEntity", + "Transform Data": { + "Translate": [ + -17.530563354492188, + -0.00018183141946792603, + 105.0152359008789 + ] + } + }, + "Component_[4564240319609068082]": { + "$type": "EditorEntitySortComponent", + "Id": 4564240319609068082 + }, + "Component_[7827190074535394331]": { + "$type": "EditorMaterialComponent", + "Id": 7827190074535394331, + "Controller": { + "Configuration": { + "materials": [ + { + "Key": { + "materialSlotStableId": 2418540911 + }, + "Value": { + "MaterialAsset": { + "assetId": { + "guid": "{A7F03135-ECAD-5440-99DB-E84ABA3D50DA}" + }, + "assetHint": "materials/presets/pbr/metal_iron_polished.azmaterial" + } + } + } + ] + } + } + }, + "Component_[8092226976542590265]": { + "$type": "EditorDisabledCompositionComponent", + "Id": 8092226976542590265 + } + } + }, + "Entity_[1509997799380]": { + "Id": "Entity_[1509997799380]", + "Name": "Entity1", + "Components": { + "Component_[11525365929370623807]": { + "$type": "EditorVisibilityComponent", + "Id": 11525365929370623807 + }, + "Component_[12334620273692642550]": { + "$type": "EditorLockComponent", + "Id": 12334620273692642550 + }, + "Component_[14389735759337977675]": { + "$type": "EditorPendingCompositionComponent", + "Id": 14389735759337977675 + }, + "Component_[16184381538555246534]": { + "$type": "AZ::Render::EditorMeshComponent", + "Id": 16184381538555246534, + "Controller": { + "Configuration": { + "ModelAsset": { + "assetId": { + "guid": "{E14975EF-E676-51A4-B826-3EF59CB645AA}", + "subId": 285127096 + }, + "assetHint": "testdata/objects/cube/cube.azmodel" + } + } + } + }, + "Component_[17962478023087084794]": { + "$type": "SelectionComponent", + "Id": 17962478023087084794 + }, + "Component_[18071675051915092508]": { + "$type": "EditorEntityIconComponent", + "Id": 18071675051915092508 + }, + "Component_[2115498007879087044]": { + "$type": "EditorInspectorComponent", + "Id": 2115498007879087044, + "ComponentOrderEntryArray": [ + { + "ComponentId": 399415038452606756 + }, + { + "ComponentId": 16184381538555246534, + "SortIndex": 1 + }, + { + "ComponentId": 7827190074535394331, + "SortIndex": 2 + } + ] + }, + "Component_[3518973002096080237]": { + "$type": "EditorOnlyEntityComponent", + "Id": 3518973002096080237 + }, + "Component_[399415038452606756]": { + "$type": "{27F1E1A1-8D9D-4C3B-BD3A-AFB9762449C0} TransformComponent", + "Id": 399415038452606756, + "Parent Entity": "ContainerEntity", + "Transform Data": { + "Translate": [ + -17.530563354492188, + -0.00018183141946792603, + 24.533506393432617 + ] + } + }, + "Component_[4564240319609068082]": { + "$type": "EditorEntitySortComponent", + "Id": 4564240319609068082 + }, + "Component_[7827190074535394331]": { + "$type": "EditorMaterialComponent", + "Id": 7827190074535394331, + "Controller": { + "Configuration": { + "materials": [ + { + "Key": { + "materialSlotStableId": 2418540911 + }, + "Value": { + "MaterialAsset": { + "assetId": { + "guid": "{892EA944-0325-5FA6-94D7-4AB4FC02A0F5}" + }, + "assetHint": "materials/presets/pbr/metal_iron.azmaterial" + } + } + } + ] + } + } + }, + "Component_[8092226976542590265]": { + "$type": "EditorDisabledCompositionComponent", + "Id": 8092226976542590265 + } + } + }, + "Entity_[1514292766676]": { + "Id": "Entity_[1514292766676]", + "Name": "Entity1", + "Components": { + "Component_[1057179753323467068]": { + "$type": "EditorMaterialComponent", + "Id": 1057179753323467068, + "Controller": { + "Configuration": { + "materials": [ + { + "Key": { + "materialSlotStableId": 2418540911 + }, + "Value": { + "MaterialAsset": { + "assetId": { + "guid": "{721188E0-B7CC-5D06-8D5D-39AF8ABF2EF9}" + }, + "assetHint": "materials/presets/pbr/metal_titanium.azmaterial" + } + } + } + ] + } + } + }, + "Component_[11525365929370623807]": { + "$type": "EditorVisibilityComponent", + "Id": 11525365929370623807 + }, + "Component_[12334620273692642550]": { + "$type": "EditorLockComponent", + "Id": 12334620273692642550 + }, + "Component_[14389735759337977675]": { + "$type": "EditorPendingCompositionComponent", + "Id": 14389735759337977675 + }, + "Component_[16184381538555246534]": { + "$type": "AZ::Render::EditorMeshComponent", + "Id": 16184381538555246534, + "Controller": { + "Configuration": { + "ModelAsset": { + "assetId": { + "guid": "{E14975EF-E676-51A4-B826-3EF59CB645AA}", + "subId": 285127096 + }, + "assetHint": "testdata/objects/cube/cube.azmodel" + } + } + } + }, + "Component_[17962478023087084794]": { + "$type": "SelectionComponent", + "Id": 17962478023087084794 + }, + "Component_[18071675051915092508]": { + "$type": "EditorEntityIconComponent", + "Id": 18071675051915092508 + }, + "Component_[2115498007879087044]": { + "$type": "EditorInspectorComponent", + "Id": 2115498007879087044, + "ComponentOrderEntryArray": [ + { + "ComponentId": 399415038452606756 + }, + { + "ComponentId": 16184381538555246534, + "SortIndex": 1 + }, + { + "ComponentId": 1057179753323467068, + "SortIndex": 2 + } + ] + }, + "Component_[3518973002096080237]": { + "$type": "EditorOnlyEntityComponent", + "Id": 3518973002096080237 + }, + "Component_[399415038452606756]": { + "$type": "{27F1E1A1-8D9D-4C3B-BD3A-AFB9762449C0} TransformComponent", + "Id": 399415038452606756, + "Parent Entity": "ContainerEntity", + "Transform Data": { + "Translate": [ + 12.530143737792969, + -0.00018183141946792603, + 54.618019104003906 + ] + } + }, + "Component_[4564240319609068082]": { + "$type": "EditorEntitySortComponent", + "Id": 4564240319609068082 + }, + "Component_[8092226976542590265]": { + "$type": "EditorDisabledCompositionComponent", + "Id": 8092226976542590265 + } + } + }, + "Entity_[1518587733972]": { + "Id": "Entity_[1518587733972]", + "Name": "Entity1", + "Components": { + "Component_[11525365929370623807]": { + "$type": "EditorVisibilityComponent", + "Id": 11525365929370623807 + }, + "Component_[12334620273692642550]": { + "$type": "EditorLockComponent", + "Id": 12334620273692642550 + }, + "Component_[14389735759337977675]": { + "$type": "EditorPendingCompositionComponent", + "Id": 14389735759337977675 + }, + "Component_[16184381538555246534]": { + "$type": "AZ::Render::EditorMeshComponent", + "Id": 16184381538555246534, + "Controller": { + "Configuration": { + "ModelAsset": { + "assetId": { + "guid": "{E14975EF-E676-51A4-B826-3EF59CB645AA}", + "subId": 285127096 + }, + "assetHint": "testdata/objects/cube/cube.azmodel" + } + } + } + }, + "Component_[17962478023087084794]": { + "$type": "SelectionComponent", + "Id": 17962478023087084794 + }, + "Component_[18071675051915092508]": { + "$type": "EditorEntityIconComponent", + "Id": 18071675051915092508 + }, + "Component_[2115498007879087044]": { + "$type": "EditorInspectorComponent", + "Id": 2115498007879087044, + "ComponentOrderEntryArray": [ + { + "ComponentId": 399415038452606756 + }, + { + "ComponentId": 16184381538555246534, + "SortIndex": 1 + }, + { + "ComponentId": 7827190074535394331, + "SortIndex": 2 + } + ] + }, + "Component_[3518973002096080237]": { + "$type": "EditorOnlyEntityComponent", + "Id": 3518973002096080237 + }, + "Component_[399415038452606756]": { + "$type": "{27F1E1A1-8D9D-4C3B-BD3A-AFB9762449C0} TransformComponent", + "Id": 399415038452606756, + "Parent Entity": "ContainerEntity", + "Transform Data": { + "Translate": [ + -37.53056335449219, + -0.00018183141946792603, + 69.34888458251953 + ] + } + }, + "Component_[4564240319609068082]": { + "$type": "EditorEntitySortComponent", + "Id": 4564240319609068082 + }, + "Component_[7827190074535394331]": { + "$type": "EditorMaterialComponent", + "Id": 7827190074535394331, + "Controller": { + "Configuration": { + "materials": [ + { + "Key": { + "materialSlotStableId": 2418540911 + }, + "Value": { + "MaterialAsset": { + "assetId": { + "guid": "{B7C712DC-4839-58BB-B522-A4F120084CF5}" + }, + "assetHint": "materials/presets/pbr/metal_chrome.azmaterial" + } + } + } + ] + } + } + }, + "Component_[8092226976542590265]": { + "$type": "EditorDisabledCompositionComponent", + "Id": 8092226976542590265 + } + } + }, + "Entity_[1522882701268]": { + "Id": "Entity_[1522882701268]", + "Name": "Entity1", + "Components": { + "Component_[11525365929370623807]": { + "$type": "EditorVisibilityComponent", + "Id": 11525365929370623807 + }, + "Component_[12334620273692642550]": { + "$type": "EditorLockComponent", + "Id": 12334620273692642550 + }, + "Component_[14389735759337977675]": { + "$type": "EditorPendingCompositionComponent", + "Id": 14389735759337977675 + }, + "Component_[16184381538555246534]": { + "$type": "AZ::Render::EditorMeshComponent", + "Id": 16184381538555246534, + "Controller": { + "Configuration": { + "ModelAsset": { + "assetId": { + "guid": "{E14975EF-E676-51A4-B826-3EF59CB645AA}", + "subId": 285127096 + }, + "assetHint": "testdata/objects/cube/cube.azmodel" + } + } + } + }, + "Component_[17962478023087084794]": { + "$type": "SelectionComponent", + "Id": 17962478023087084794 + }, + "Component_[18071675051915092508]": { + "$type": "EditorEntityIconComponent", + "Id": 18071675051915092508 + }, + "Component_[2115498007879087044]": { + "$type": "EditorInspectorComponent", + "Id": 2115498007879087044, + "ComponentOrderEntryArray": [ + { + "ComponentId": 399415038452606756 + }, + { + "ComponentId": 16184381538555246534, + "SortIndex": 1 + }, + { + "ComponentId": 7827190074535394331, + "SortIndex": 2 + } + ] + }, + "Component_[3518973002096080237]": { + "$type": "EditorOnlyEntityComponent", + "Id": 3518973002096080237 + }, + "Component_[399415038452606756]": { + "$type": "{27F1E1A1-8D9D-4C3B-BD3A-AFB9762449C0} TransformComponent", + "Id": 399415038452606756, + "Parent Entity": "ContainerEntity", + "Transform Data": { + "Translate": [ + 22.53014373779297, + -0.00018183141946792603, + 109.46680450439453 + ] + } + }, + "Component_[4564240319609068082]": { + "$type": "EditorEntitySortComponent", + "Id": 4564240319609068082 + }, + "Component_[7827190074535394331]": { + "$type": "EditorMaterialComponent", + "Id": 7827190074535394331, + "Controller": { + "Configuration": { + "materials": [ + { + "Key": { + "materialSlotStableId": 2418540911 + }, + "Value": { + "MaterialAsset": { + "assetId": { + "guid": "{AE350D9F-0000-526D-B49C-4303D687BB86}" + }, + "assetHint": "materials/presets/pbr/metal_brass_matte.azmaterial" + } + } + } + ] + } + } + }, + "Component_[8092226976542590265]": { + "$type": "EditorDisabledCompositionComponent", + "Id": 8092226976542590265 + } + } + }, + "Entity_[1527177668564]": { + "Id": "Entity_[1527177668564]", + "Name": "Entity1", + "Components": { + "Component_[11525365929370623807]": { + "$type": "EditorVisibilityComponent", + "Id": 11525365929370623807 + }, + "Component_[12334620273692642550]": { + "$type": "EditorLockComponent", + "Id": 12334620273692642550 + }, + "Component_[14389735759337977675]": { + "$type": "EditorPendingCompositionComponent", + "Id": 14389735759337977675 + }, + "Component_[16184381538555246534]": { + "$type": "AZ::Render::EditorMeshComponent", + "Id": 16184381538555246534, + "Controller": { + "Configuration": { + "ModelAsset": { + "assetId": { + "guid": "{E14975EF-E676-51A4-B826-3EF59CB645AA}", + "subId": 285127096 + }, + "assetHint": "testdata/objects/cube/cube.azmodel" + } + } + } + }, + "Component_[17962478023087084794]": { + "$type": "SelectionComponent", + "Id": 17962478023087084794 + }, + "Component_[18071675051915092508]": { + "$type": "EditorEntityIconComponent", + "Id": 18071675051915092508 + }, + "Component_[2115498007879087044]": { + "$type": "EditorInspectorComponent", + "Id": 2115498007879087044, + "ComponentOrderEntryArray": [ + { + "ComponentId": 399415038452606756 + }, + { + "ComponentId": 16184381538555246534, + "SortIndex": 1 + }, + { + "ComponentId": 7827190074535394331, + "SortIndex": 2 + } + ] + }, + "Component_[3518973002096080237]": { + "$type": "EditorOnlyEntityComponent", + "Id": 3518973002096080237 + }, + "Component_[399415038452606756]": { + "$type": "{27F1E1A1-8D9D-4C3B-BD3A-AFB9762449C0} TransformComponent", + "Id": 399415038452606756, + "Parent Entity": "ContainerEntity", + "Transform Data": { + "Translate": [ + 7.530143737792969, + -0.00018183141946792603, + 4.451573371887207 + ] + } + }, + "Component_[4564240319609068082]": { + "$type": "EditorEntitySortComponent", + "Id": 4564240319609068082 + }, + "Component_[7827190074535394331]": { + "$type": "EditorMaterialComponent", + "Id": 7827190074535394331, + "Controller": { + "Configuration": { + "materials": [ + { + "Key": { + "materialSlotStableId": 2418540911 + }, + "Value": { + "MaterialAsset": { + "assetId": { + "guid": "{E54E46E7-9FA3-54D7-B5F8-8DCCDF17BC24}" + }, + "assetHint": "materials/presets/pbr/metal_silver_matte.azmaterial" + } + } + } + ] + } + } + }, + "Component_[8092226976542590265]": { + "$type": "EditorDisabledCompositionComponent", + "Id": 8092226976542590265 + } + } + }, + "Entity_[1531472635860]": { + "Id": "Entity_[1531472635860]", + "Name": "Entity1", + "Components": { + "Component_[11525365929370623807]": { + "$type": "EditorVisibilityComponent", + "Id": 11525365929370623807 + }, + "Component_[12334620273692642550]": { + "$type": "EditorLockComponent", + "Id": 12334620273692642550 + }, + "Component_[14389735759337977675]": { + "$type": "EditorPendingCompositionComponent", + "Id": 14389735759337977675 + }, + "Component_[16184381538555246534]": { + "$type": "AZ::Render::EditorMeshComponent", + "Id": 16184381538555246534, + "Controller": { + "Configuration": { + "ModelAsset": { + "assetId": { + "guid": "{E14975EF-E676-51A4-B826-3EF59CB645AA}", + "subId": 285127096 + }, + "assetHint": "testdata/objects/cube/cube.azmodel" + } + } + } + }, + "Component_[17962478023087084794]": { + "$type": "SelectionComponent", + "Id": 17962478023087084794 + }, + "Component_[18071675051915092508]": { + "$type": "EditorEntityIconComponent", + "Id": 18071675051915092508 + }, + "Component_[2115498007879087044]": { + "$type": "EditorInspectorComponent", + "Id": 2115498007879087044, + "ComponentOrderEntryArray": [ + { + "ComponentId": 399415038452606756 + }, + { + "ComponentId": 16184381538555246534, + "SortIndex": 1 + }, + { + "ComponentId": 7827190074535394331, + "SortIndex": 2 + } + ] + }, + "Component_[3518973002096080237]": { + "$type": "EditorOnlyEntityComponent", + "Id": 3518973002096080237 + }, + "Component_[399415038452606756]": { + "$type": "{27F1E1A1-8D9D-4C3B-BD3A-AFB9762449C0} TransformComponent", + "Id": 399415038452606756, + "Parent Entity": "ContainerEntity", + "Transform Data": { + "Translate": [ + -47.53056335449219, + -0.00018183141946792603, + 19.50924301147461 + ] + } + }, + "Component_[4564240319609068082]": { + "$type": "EditorEntitySortComponent", + "Id": 4564240319609068082 + }, + "Component_[7827190074535394331]": { + "$type": "EditorMaterialComponent", + "Id": 7827190074535394331, + "Controller": { + "Configuration": { + "materials": [ + { + "Key": { + "materialSlotStableId": 2418540911 + }, + "Value": { + "MaterialAsset": { + "assetId": { + "guid": "{549D26B8-881D-569F-AF05-961F36A43F4F}" + }, + "assetHint": "materials/presets/pbr/metal_aluminum_matte.azmaterial" + } + } + } + ] + } + } + }, + "Component_[8092226976542590265]": { + "$type": "EditorDisabledCompositionComponent", + "Id": 8092226976542590265 + } + } + }, + "Entity_[1535767603156]": { + "Id": "Entity_[1535767603156]", + "Name": "Entity1", + "Components": { + "Component_[11525365929370623807]": { + "$type": "EditorVisibilityComponent", + "Id": 11525365929370623807 + }, + "Component_[12334620273692642550]": { + "$type": "EditorLockComponent", + "Id": 12334620273692642550 + }, + "Component_[14389735759337977675]": { + "$type": "EditorPendingCompositionComponent", + "Id": 14389735759337977675 + }, + "Component_[16184381538555246534]": { + "$type": "AZ::Render::EditorMeshComponent", + "Id": 16184381538555246534, + "Controller": { + "Configuration": { + "ModelAsset": { + "assetId": { + "guid": "{E14975EF-E676-51A4-B826-3EF59CB645AA}", + "subId": 285127096 + }, + "assetHint": "testdata/objects/cube/cube.azmodel" + } + } + } + }, + "Component_[17962478023087084794]": { + "$type": "SelectionComponent", + "Id": 17962478023087084794 + }, + "Component_[18071675051915092508]": { + "$type": "EditorEntityIconComponent", + "Id": 18071675051915092508 + }, + "Component_[2115498007879087044]": { + "$type": "EditorInspectorComponent", + "Id": 2115498007879087044, + "ComponentOrderEntryArray": [ + { + "ComponentId": 399415038452606756 + }, + { + "ComponentId": 16184381538555246534, + "SortIndex": 1 + }, + { + "ComponentId": 7827190074535394331, + "SortIndex": 2 + } + ] + }, + "Component_[3518973002096080237]": { + "$type": "EditorOnlyEntityComponent", + "Id": 3518973002096080237 + }, + "Component_[399415038452606756]": { + "$type": "{27F1E1A1-8D9D-4C3B-BD3A-AFB9762449C0} TransformComponent", + "Id": 399415038452606756, + "Parent Entity": "ContainerEntity", + "Transform Data": { + "Translate": [ + -7.5305633544921875, + -0.00018183141946792603, + 39.56034851074219 + ] + } + }, + "Component_[4564240319609068082]": { + "$type": "EditorEntitySortComponent", + "Id": 4564240319609068082 + }, + "Component_[7827190074535394331]": { + "$type": "EditorMaterialComponent", + "Id": 7827190074535394331, + "Controller": { + "Configuration": { + "materials": [ + { + "Key": { + "materialSlotStableId": 2418540911 + }, + "Value": { + "MaterialAsset": { + "assetId": { + "guid": "{DD1E26AE-80FB-5DB6-8786-26D438190A38}" + }, + "assetHint": "materials/presets/pbr/metal_nickel.azmaterial" + } + } + } + ] + } + } + }, + "Component_[8092226976542590265]": { + "$type": "EditorDisabledCompositionComponent", + "Id": 8092226976542590265 + } + } + }, + "Entity_[1540062570452]": { + "Id": "Entity_[1540062570452]", + "Name": "Entity1", + "Components": { + "Component_[11525365929370623807]": { + "$type": "EditorVisibilityComponent", + "Id": 11525365929370623807 + }, + "Component_[12334620273692642550]": { + "$type": "EditorLockComponent", + "Id": 12334620273692642550 + }, + "Component_[14389735759337977675]": { + "$type": "EditorPendingCompositionComponent", + "Id": 14389735759337977675 + }, + "Component_[16184381538555246534]": { + "$type": "AZ::Render::EditorMeshComponent", + "Id": 16184381538555246534, + "Controller": { + "Configuration": { + "ModelAsset": { + "assetId": { + "guid": "{E14975EF-E676-51A4-B826-3EF59CB645AA}", + "subId": 285127096 + }, + "assetHint": "testdata/objects/cube/cube.azmodel" + } + } + } + }, + "Component_[17962478023087084794]": { + "$type": "SelectionComponent", + "Id": 17962478023087084794 + }, + "Component_[18071675051915092508]": { + "$type": "EditorEntityIconComponent", + "Id": 18071675051915092508 + }, + "Component_[2115498007879087044]": { + "$type": "EditorInspectorComponent", + "Id": 2115498007879087044, + "ComponentOrderEntryArray": [ + { + "ComponentId": 399415038452606756 + }, + { + "ComponentId": 16184381538555246534, + "SortIndex": 1 + }, + { + "ComponentId": 7827190074535394331, + "SortIndex": 2 + } + ] + }, + "Component_[3518973002096080237]": { + "$type": "EditorOnlyEntityComponent", + "Id": 3518973002096080237 + }, + "Component_[399415038452606756]": { + "$type": "{27F1E1A1-8D9D-4C3B-BD3A-AFB9762449C0} TransformComponent", + "Id": 399415038452606756, + "Parent Entity": "ContainerEntity", + "Transform Data": { + "Translate": [ + -27.530563354492188, + -0.00018183141946792603, + 89.95755767822266 + ] + } + }, + "Component_[4564240319609068082]": { + "$type": "EditorEntitySortComponent", + "Id": 4564240319609068082 + }, + "Component_[7827190074535394331]": { + "$type": "EditorMaterialComponent", + "Id": 7827190074535394331, + "Controller": { + "Configuration": { + "materials": [ + { + "Key": { + "materialSlotStableId": 2418540911 + }, + "Value": { + "MaterialAsset": { + "assetId": { + "guid": "{CF5C7B01-4912-58AE-991A-F25251E505AC}" + }, + "assetHint": "materials/presets/pbr/metal_copper_polished.azmaterial" + } + } + } + ] + } + } + }, + "Component_[8092226976542590265]": { + "$type": "EditorDisabledCompositionComponent", + "Id": 8092226976542590265 + } + } + }, + "Entity_[1544357537748]": { + "Id": "Entity_[1544357537748]", + "Name": "Entity1", + "Components": { + "Component_[11525365929370623807]": { + "$type": "EditorVisibilityComponent", + "Id": 11525365929370623807 + }, + "Component_[12334620273692642550]": { + "$type": "EditorLockComponent", + "Id": 12334620273692642550 + }, + "Component_[14389735759337977675]": { + "$type": "EditorPendingCompositionComponent", + "Id": 14389735759337977675 + }, + "Component_[16184381538555246534]": { + "$type": "AZ::Render::EditorMeshComponent", + "Id": 16184381538555246534, + "Controller": { + "Configuration": { + "ModelAsset": { + "assetId": { + "guid": "{E14975EF-E676-51A4-B826-3EF59CB645AA}", + "subId": 285127096 + }, + "assetHint": "testdata/objects/cube/cube.azmodel" + } + } + } + }, + "Component_[17962478023087084794]": { + "$type": "SelectionComponent", + "Id": 17962478023087084794 + }, + "Component_[18071675051915092508]": { + "$type": "EditorEntityIconComponent", + "Id": 18071675051915092508 + }, + "Component_[2115498007879087044]": { + "$type": "EditorInspectorComponent", + "Id": 2115498007879087044, + "ComponentOrderEntryArray": [ + { + "ComponentId": 399415038452606756 + }, + { + "ComponentId": 16184381538555246534, + "SortIndex": 1 + }, + { + "ComponentId": 7827190074535394331, + "SortIndex": 2 + } + ] + }, + "Component_[3518973002096080237]": { + "$type": "EditorOnlyEntityComponent", + "Id": 3518973002096080237 + }, + "Component_[399415038452606756]": { + "$type": "{27F1E1A1-8D9D-4C3B-BD3A-AFB9762449C0} TransformComponent", + "Id": 399415038452606756, + "Parent Entity": "ContainerEntity", + "Transform Data": { + "Translate": [ + 22.53014373779297, + -0.00018183141946792603, + 39.56034851074219 + ] + } + }, + "Component_[4564240319609068082]": { + "$type": "EditorEntitySortComponent", + "Id": 4564240319609068082 + }, + "Component_[7827190074535394331]": { + "$type": "EditorMaterialComponent", + "Id": 7827190074535394331, + "Controller": { + "Configuration": { + "materials": [ + { + "Key": { + "materialSlotStableId": 2418540911 + }, + "Value": { + "MaterialAsset": { + "assetId": { + "guid": "{80E0F2A7-1EE4-597F-80EF-985C65BCE2EB}" + }, + "assetHint": "materials/presets/pbr/metal_brass.azmaterial" + } + } + } + ] + } + } + }, + "Component_[8092226976542590265]": { + "$type": "EditorDisabledCompositionComponent", + "Id": 8092226976542590265 + } + } + }, + "Entity_[1548652505044]": { + "Id": "Entity_[1548652505044]", + "Name": "Entity1", + "Components": { + "Component_[11525365929370623807]": { + "$type": "EditorVisibilityComponent", + "Id": 11525365929370623807 + }, + "Component_[12334620273692642550]": { + "$type": "EditorLockComponent", + "Id": 12334620273692642550 + }, + "Component_[14389735759337977675]": { + "$type": "EditorPendingCompositionComponent", + "Id": 14389735759337977675 + }, + "Component_[16184381538555246534]": { + "$type": "AZ::Render::EditorMeshComponent", + "Id": 16184381538555246534, + "Controller": { + "Configuration": { + "ModelAsset": { + "assetId": { + "guid": "{E14975EF-E676-51A4-B826-3EF59CB645AA}", + "subId": 285127096 + }, + "assetHint": "testdata/objects/cube/cube.azmodel" + } + } + } + }, + "Component_[17962478023087084794]": { + "$type": "SelectionComponent", + "Id": 17962478023087084794 + }, + "Component_[18071675051915092508]": { + "$type": "EditorEntityIconComponent", + "Id": 18071675051915092508 + }, + "Component_[2115498007879087044]": { + "$type": "EditorInspectorComponent", + "Id": 2115498007879087044, + "ComponentOrderEntryArray": [ + { + "ComponentId": 399415038452606756 + }, + { + "ComponentId": 16184381538555246534, + "SortIndex": 1 + }, + { + "ComponentId": 7827190074535394331, + "SortIndex": 2 + } + ] + }, + "Component_[3518973002096080237]": { + "$type": "EditorOnlyEntityComponent", + "Id": 3518973002096080237 + }, + "Component_[399415038452606756]": { + "$type": "{27F1E1A1-8D9D-4C3B-BD3A-AFB9762449C0} TransformComponent", + "Id": 399415038452606756, + "Parent Entity": "ContainerEntity", + "Transform Data": { + "Translate": [ + -12.530563354492188, + -0.00018183141946792603, + 0.0 + ] + } + }, + "Component_[4564240319609068082]": { + "$type": "EditorEntitySortComponent", + "Id": 4564240319609068082 + }, + "Component_[7827190074535394331]": { + "$type": "EditorMaterialComponent", + "Id": 7827190074535394331, + "Controller": { + "Configuration": { + "materials": [ + { + "Key": { + "materialSlotStableId": 2418540911 + }, + "Value": { + "MaterialAsset": { + "assetId": { + "guid": "{F2AD0EBF-7137-58D1-9991-9552FAD41B19}" + }, + "assetHint": "materials/presets/pbr/metal_mercury.azmaterial" + } + } + } + ] + } + } + }, + "Component_[8092226976542590265]": { + "$type": "EditorDisabledCompositionComponent", + "Id": 8092226976542590265 + } + } + }, + "Entity_[1552947472340]": { + "Id": "Entity_[1552947472340]", + "Name": "Entity1", + "Components": { + "Component_[11525365929370623807]": { + "$type": "EditorVisibilityComponent", + "Id": 11525365929370623807 + }, + "Component_[12334620273692642550]": { + "$type": "EditorLockComponent", + "Id": 12334620273692642550 + }, + "Component_[14389735759337977675]": { + "$type": "EditorPendingCompositionComponent", + "Id": 14389735759337977675 + }, + "Component_[16184381538555246534]": { + "$type": "AZ::Render::EditorMeshComponent", + "Id": 16184381538555246534, + "Controller": { + "Configuration": { + "ModelAsset": { + "assetId": { + "guid": "{E14975EF-E676-51A4-B826-3EF59CB645AA}", + "subId": 285127096 + }, + "assetHint": "testdata/objects/cube/cube.azmodel" + } + } + } + }, + "Component_[17962478023087084794]": { + "$type": "SelectionComponent", + "Id": 17962478023087084794 + }, + "Component_[18071675051915092508]": { + "$type": "EditorEntityIconComponent", + "Id": 18071675051915092508 + }, + "Component_[2115498007879087044]": { + "$type": "EditorInspectorComponent", + "Id": 2115498007879087044, + "ComponentOrderEntryArray": [ + { + "ComponentId": 399415038452606756 + }, + { + "ComponentId": 16184381538555246534, + "SortIndex": 1 + }, + { + "ComponentId": 7827190074535394331, + "SortIndex": 2 + } + ] + }, + "Component_[3518973002096080237]": { + "$type": "EditorOnlyEntityComponent", + "Id": 3518973002096080237 + }, + "Component_[399415038452606756]": { + "$type": "{27F1E1A1-8D9D-4C3B-BD3A-AFB9762449C0} TransformComponent", + "Id": 399415038452606756, + "Parent Entity": "ContainerEntity", + "Transform Data": { + "Translate": [ + -47.53056335449219, + -0.00018183141946792603, + 89.95755767822266 + ] + } + }, + "Component_[4564240319609068082]": { + "$type": "EditorEntitySortComponent", + "Id": 4564240319609068082 + }, + "Component_[7827190074535394331]": { + "$type": "EditorMaterialComponent", + "Id": 7827190074535394331, + "Controller": { + "Configuration": { + "materials": [ + { + "Key": { + "materialSlotStableId": 2418540911 + }, + "Value": { + "MaterialAsset": { + "assetId": { + "guid": "{64C1F6A6-6BDA-551A-BE56-1829E5913278}" + }, + "assetHint": "materials/presets/pbr/metal_aluminum_polished.azmaterial" + } + } + } + ] + } + } + }, + "Component_[8092226976542590265]": { + "$type": "EditorDisabledCompositionComponent", + "Id": 8092226976542590265 + } + } + }, + "Entity_[1557242439636]": { + "Id": "Entity_[1557242439636]", + "Name": "Entity1", + "Components": { + "Component_[11525365929370623807]": { + "$type": "EditorVisibilityComponent", + "Id": 11525365929370623807 + }, + "Component_[12334620273692642550]": { + "$type": "EditorLockComponent", + "Id": 12334620273692642550 + }, + "Component_[14389735759337977675]": { + "$type": "EditorPendingCompositionComponent", + "Id": 14389735759337977675 + }, + "Component_[16184381538555246534]": { + "$type": "AZ::Render::EditorMeshComponent", + "Id": 16184381538555246534, + "Controller": { + "Configuration": { + "ModelAsset": { + "assetId": { + "guid": "{E14975EF-E676-51A4-B826-3EF59CB645AA}", + "subId": 285127096 + }, + "assetHint": "testdata/objects/cube/cube.azmodel" + } + } + } + }, + "Component_[17962478023087084794]": { + "$type": "SelectionComponent", + "Id": 17962478023087084794 + }, + "Component_[18071675051915092508]": { + "$type": "EditorEntityIconComponent", + "Id": 18071675051915092508 + }, + "Component_[2115498007879087044]": { + "$type": "EditorInspectorComponent", + "Id": 2115498007879087044, + "ComponentOrderEntryArray": [ + { + "ComponentId": 399415038452606756 + }, + { + "ComponentId": 16184381538555246534, + "SortIndex": 1 + }, + { + "ComponentId": 7827190074535394331, + "SortIndex": 2 + } + ] + }, + "Component_[3518973002096080237]": { + "$type": "EditorOnlyEntityComponent", + "Id": 3518973002096080237 + }, + "Component_[399415038452606756]": { + "$type": "{27F1E1A1-8D9D-4C3B-BD3A-AFB9762449C0} TransformComponent", + "Id": 399415038452606756, + "Parent Entity": "ContainerEntity", + "Transform Data": { + "Translate": [ + 42.53014373779297, + -0.00018183141946792603, + 89.95755767822266 + ] + } + }, + "Component_[4564240319609068082]": { + "$type": "EditorEntitySortComponent", + "Id": 4564240319609068082 + }, + "Component_[7827190074535394331]": { + "$type": "EditorMaterialComponent", + "Id": 7827190074535394331, + "Controller": { + "Configuration": { + "materials": [ + { + "Key": { + "materialSlotStableId": 2418540911 + }, + "Value": { + "MaterialAsset": { + "assetId": { + "guid": "{FB4657EB-FB3A-5EC3-A772-DC36D6F733C3}" + }, + "assetHint": "materials/presets/pbr/metal_gold_polished.azmaterial" + } + } + } + ] + } + } + }, + "Component_[8092226976542590265]": { + "$type": "EditorDisabledCompositionComponent", + "Id": 8092226976542590265 + } + } + }, + "Entity_[1561537406932]": { + "Id": "Entity_[1561537406932]", + "Name": "Entity1", + "Components": { + "Component_[11525365929370623807]": { + "$type": "EditorVisibilityComponent", + "Id": 11525365929370623807 + }, + "Component_[12334620273692642550]": { + "$type": "EditorLockComponent", + "Id": 12334620273692642550 + }, + "Component_[14389735759337977675]": { + "$type": "EditorPendingCompositionComponent", + "Id": 14389735759337977675 + }, + "Component_[16184381538555246534]": { + "$type": "AZ::Render::EditorMeshComponent", + "Id": 16184381538555246534, + "Controller": { + "Configuration": { + "ModelAsset": { + "assetId": { + "guid": "{E14975EF-E676-51A4-B826-3EF59CB645AA}", + "subId": 285127096 + }, + "assetHint": "testdata/objects/cube/cube.azmodel" + } + } + } + }, + "Component_[17962478023087084794]": { + "$type": "SelectionComponent", + "Id": 17962478023087084794 + }, + "Component_[18071675051915092508]": { + "$type": "EditorEntityIconComponent", + "Id": 18071675051915092508 + }, + "Component_[2115498007879087044]": { + "$type": "EditorInspectorComponent", + "Id": 2115498007879087044, + "ComponentOrderEntryArray": [ + { + "ComponentId": 399415038452606756 + }, + { + "ComponentId": 16184381538555246534, + "SortIndex": 1 + }, + { + "ComponentId": 7827190074535394331, + "SortIndex": 2 + } + ] + }, + "Component_[3518973002096080237]": { + "$type": "EditorOnlyEntityComponent", + "Id": 3518973002096080237 + }, + "Component_[399415038452606756]": { + "$type": "{27F1E1A1-8D9D-4C3B-BD3A-AFB9762449C0} TransformComponent", + "Id": 399415038452606756, + "Parent Entity": "ContainerEntity", + "Transform Data": { + "Translate": [ + 37.53014373779297, + 0.010651908814907074, + 54.6579704284668 + ] + } + }, + "Component_[4564240319609068082]": { + "$type": "EditorEntitySortComponent", + "Id": 4564240319609068082 + }, + "Component_[7827190074535394331]": { + "$type": "EditorMaterialComponent", + "Id": 7827190074535394331, + "Controller": { + "Configuration": { + "materials": [ + { + "Key": { + "materialSlotStableId": 2418540911 + }, + "Value": { + "MaterialAsset": { + "assetId": { + "guid": "{E621C5BF-B8E1-55F0-A791-EC960F2FA46F}" + }, + "assetHint": "materials/presets/pbr/metal_copper.azmaterial" + } + } + } + ] + } + } + }, + "Component_[8092226976542590265]": { + "$type": "EditorDisabledCompositionComponent", + "Id": 8092226976542590265 + } + } + }, + "Entity_[1565832374228]": { + "Id": "Entity_[1565832374228]", + "Name": "Entity1", + "Components": { + "Component_[11525365929370623807]": { + "$type": "EditorVisibilityComponent", + "Id": 11525365929370623807 + }, + "Component_[12334620273692642550]": { + "$type": "EditorLockComponent", + "Id": 12334620273692642550 + }, + "Component_[14389735759337977675]": { + "$type": "EditorPendingCompositionComponent", + "Id": 14389735759337977675 + }, + "Component_[16184381538555246534]": { + "$type": "AZ::Render::EditorMeshComponent", + "Id": 16184381538555246534, + "Controller": { + "Configuration": { + "ModelAsset": { + "assetId": { + "guid": "{E14975EF-E676-51A4-B826-3EF59CB645AA}", + "subId": 285127096 + }, + "assetHint": "testdata/objects/cube/cube.azmodel" + } + } + } + }, + "Component_[17962478023087084794]": { + "$type": "SelectionComponent", + "Id": 17962478023087084794 + }, + "Component_[18071675051915092508]": { + "$type": "EditorEntityIconComponent", + "Id": 18071675051915092508 + }, + "Component_[2115498007879087044]": { + "$type": "EditorInspectorComponent", + "Id": 2115498007879087044, + "ComponentOrderEntryArray": [ + { + "ComponentId": 399415038452606756 + }, + { + "ComponentId": 16184381538555246534, + "SortIndex": 1 + }, + { + "ComponentId": 7827190074535394331, + "SortIndex": 2 + } + ] + }, + "Component_[3518973002096080237]": { + "$type": "EditorOnlyEntityComponent", + "Id": 3518973002096080237 + }, + "Component_[399415038452606756]": { + "$type": "{27F1E1A1-8D9D-4C3B-BD3A-AFB9762449C0} TransformComponent", + "Id": 399415038452606756, + "Parent Entity": "ContainerEntity", + "Transform Data": { + "Translate": [ + -22.530563354492188, + -0.00018183141946792603, + 39.56034851074219 + ] + } + }, + "Component_[4564240319609068082]": { + "$type": "EditorEntitySortComponent", + "Id": 4564240319609068082 + }, + "Component_[7827190074535394331]": { + "$type": "EditorMaterialComponent", + "Id": 7827190074535394331, + "Controller": { + "Configuration": { + "materials": [ + { + "Key": { + "materialSlotStableId": 2418540911 + }, + "Value": { + "MaterialAsset": { + "assetId": { + "guid": "{FE52E7C8-064D-506A-9C26-433EB93747DE}" + }, + "assetHint": "materials/presets/pbr/metal_gold.azmaterial" + } + } + } + ] + } + } + }, + "Component_[8092226976542590265]": { + "$type": "EditorDisabledCompositionComponent", + "Id": 8092226976542590265 + } + } + }, + "Entity_[1570127341524]": { + "Id": "Entity_[1570127341524]", + "Name": "Entity1", + "Components": { + "Component_[11525365929370623807]": { + "$type": "EditorVisibilityComponent", + "Id": 11525365929370623807 + }, + "Component_[12334620273692642550]": { + "$type": "EditorLockComponent", + "Id": 12334620273692642550 + }, + "Component_[14389735759337977675]": { + "$type": "EditorPendingCompositionComponent", + "Id": 14389735759337977675 + }, + "Component_[16184381538555246534]": { + "$type": "AZ::Render::EditorMeshComponent", + "Id": 16184381538555246534, + "Controller": { + "Configuration": { + "ModelAsset": { + "assetId": { + "guid": "{E14975EF-E676-51A4-B826-3EF59CB645AA}", + "subId": 285127096 + }, + "assetHint": "testdata/objects/cube/cube.azmodel" + } + } + } + }, + "Component_[17962478023087084794]": { + "$type": "SelectionComponent", + "Id": 17962478023087084794 + }, + "Component_[18071675051915092508]": { + "$type": "EditorEntityIconComponent", + "Id": 18071675051915092508 + }, + "Component_[2115498007879087044]": { + "$type": "EditorInspectorComponent", + "Id": 2115498007879087044, + "ComponentOrderEntryArray": [ + { + "ComponentId": 399415038452606756 + }, + { + "ComponentId": 16184381538555246534, + "SortIndex": 1 + }, + { + "ComponentId": 7827190074535394331, + "SortIndex": 2 + } + ] + }, + "Component_[3518973002096080237]": { + "$type": "EditorOnlyEntityComponent", + "Id": 3518973002096080237 + }, + "Component_[399415038452606756]": { + "$type": "{27F1E1A1-8D9D-4C3B-BD3A-AFB9762449C0} TransformComponent", + "Id": 399415038452606756, + "Parent Entity": "ContainerEntity", + "Transform Data": { + "Translate": [ + -17.530563354492188, + -0.00018183141946792603, + 69.34888458251953 + ] + } + }, + "Component_[4564240319609068082]": { + "$type": "EditorEntitySortComponent", + "Id": 4564240319609068082 + }, + "Component_[7827190074535394331]": { + "$type": "EditorMaterialComponent", + "Id": 7827190074535394331, + "Controller": { + "Configuration": { + "materials": [ + { + "Key": { + "materialSlotStableId": 2418540911 + }, + "Value": { + "MaterialAsset": { + "assetId": { + "guid": "{892EA944-0325-5FA6-94D7-4AB4FC02A0F5}" + }, + "assetHint": "materials/presets/pbr/metal_iron.azmaterial" + } + } + } + ] + } + } + }, + "Component_[8092226976542590265]": { + "$type": "EditorDisabledCompositionComponent", + "Id": 8092226976542590265 + } + } + }, + "Entity_[1574422308820]": { + "Id": "Entity_[1574422308820]", + "Name": "Entity1", + "Components": { + "Component_[11525365929370623807]": { + "$type": "EditorVisibilityComponent", + "Id": 11525365929370623807 + }, + "Component_[12334620273692642550]": { + "$type": "EditorLockComponent", + "Id": 12334620273692642550 + }, + "Component_[14389735759337977675]": { + "$type": "EditorPendingCompositionComponent", + "Id": 14389735759337977675 + }, + "Component_[16184381538555246534]": { + "$type": "AZ::Render::EditorMeshComponent", + "Id": 16184381538555246534, + "Controller": { + "Configuration": { + "ModelAsset": { + "assetId": { + "guid": "{E14975EF-E676-51A4-B826-3EF59CB645AA}", + "subId": 285127096 + }, + "assetHint": "testdata/objects/cube/cube.azmodel" + } + } + } + }, + "Component_[17962478023087084794]": { + "$type": "SelectionComponent", + "Id": 17962478023087084794 + }, + "Component_[18071675051915092508]": { + "$type": "EditorEntityIconComponent", + "Id": 18071675051915092508 + }, + "Component_[2115498007879087044]": { + "$type": "EditorInspectorComponent", + "Id": 2115498007879087044, + "ComponentOrderEntryArray": [ + { + "ComponentId": 399415038452606756 + }, + { + "ComponentId": 16184381538555246534, + "SortIndex": 1 + }, + { + "ComponentId": 7827190074535394331, + "SortIndex": 2 + } + ] + }, + "Component_[3518973002096080237]": { + "$type": "EditorOnlyEntityComponent", + "Id": 3518973002096080237 + }, + "Component_[399415038452606756]": { + "$type": "{27F1E1A1-8D9D-4C3B-BD3A-AFB9762449C0} TransformComponent", + "Id": 399415038452606756, + "Parent Entity": "ContainerEntity", + "Transform Data": { + "Translate": [ + -7.5305633544921875, + -0.00018183141946792603, + 49.593753814697266 + ] + } + }, + "Component_[4564240319609068082]": { + "$type": "EditorEntitySortComponent", + "Id": 4564240319609068082 + }, + "Component_[7827190074535394331]": { + "$type": "EditorMaterialComponent", + "Id": 7827190074535394331, + "Controller": { + "Configuration": { + "materials": [ + { + "Key": { + "materialSlotStableId": 2418540911 + }, + "Value": { + "MaterialAsset": { + "assetId": { + "guid": "{E56377B1-6310-5311-A494-135BE50B74F0}" + }, + "assetHint": "materials/presets/pbr/metal_nickel_matte.azmaterial" + } + } + } + ] + } + } + }, + "Component_[8092226976542590265]": { + "$type": "EditorDisabledCompositionComponent", + "Id": 8092226976542590265 + } + } + }, + "Entity_[1578717276116]": { + "Id": "Entity_[1578717276116]", + "Name": "Entity1", + "Components": { + "Component_[11525365929370623807]": { + "$type": "EditorVisibilityComponent", + "Id": 11525365929370623807 + }, + "Component_[12334620273692642550]": { + "$type": "EditorLockComponent", + "Id": 12334620273692642550 + }, + "Component_[14389735759337977675]": { + "$type": "EditorPendingCompositionComponent", + "Id": 14389735759337977675 + }, + "Component_[16184381538555246534]": { + "$type": "AZ::Render::EditorMeshComponent", + "Id": 16184381538555246534, + "Controller": { + "Configuration": { + "ModelAsset": { + "assetId": { + "guid": "{E14975EF-E676-51A4-B826-3EF59CB645AA}", + "subId": 285127096 + }, + "assetHint": "testdata/objects/cube/cube.azmodel" + } + } + } + }, + "Component_[17962478023087084794]": { + "$type": "SelectionComponent", + "Id": 17962478023087084794 + }, + "Component_[18071675051915092508]": { + "$type": "EditorEntityIconComponent", + "Id": 18071675051915092508 + }, + "Component_[2115498007879087044]": { + "$type": "EditorInspectorComponent", + "Id": 2115498007879087044, + "ComponentOrderEntryArray": [ + { + "ComponentId": 399415038452606756 + }, + { + "ComponentId": 16184381538555246534, + "SortIndex": 1 + }, + { + "ComponentId": 7827190074535394331, + "SortIndex": 2 + } + ] + }, + "Component_[3518973002096080237]": { + "$type": "EditorOnlyEntityComponent", + "Id": 3518973002096080237 + }, + "Component_[399415038452606756]": { + "$type": "{27F1E1A1-8D9D-4C3B-BD3A-AFB9762449C0} TransformComponent", + "Id": 399415038452606756, + "Parent Entity": "ContainerEntity", + "Transform Data": { + "Translate": [ + 32.53014373779297, + -0.00018183141946792603, + 30.08451271057129 + ] + } + }, + "Component_[4564240319609068082]": { + "$type": "EditorEntitySortComponent", + "Id": 4564240319609068082 + }, + "Component_[7827190074535394331]": { + "$type": "EditorMaterialComponent", + "Id": 7827190074535394331, + "Controller": { + "Configuration": { + "materials": [ + { + "Key": { + "materialSlotStableId": 2418540911 + }, + "Value": { + "MaterialAsset": { + "assetId": { + "guid": "{93DF55AE-8D1B-5AD1-A609-05F1BD9F6EA0}" + }, + "assetHint": "materials/presets/pbr/metal_cobalt_polished.azmaterial" + } + } + } + ] + } + } + }, + "Component_[8092226976542590265]": { + "$type": "EditorDisabledCompositionComponent", + "Id": 8092226976542590265 + } + } + }, + "Entity_[1583012243412]": { + "Id": "Entity_[1583012243412]", + "Name": "Entity1", + "Components": { + "Component_[11525365929370623807]": { + "$type": "EditorVisibilityComponent", + "Id": 11525365929370623807 + }, + "Component_[12334620273692642550]": { + "$type": "EditorLockComponent", + "Id": 12334620273692642550 + }, + "Component_[14389735759337977675]": { + "$type": "EditorPendingCompositionComponent", + "Id": 14389735759337977675 + }, + "Component_[16184381538555246534]": { + "$type": "AZ::Render::EditorMeshComponent", + "Id": 16184381538555246534, + "Controller": { + "Configuration": { + "ModelAsset": { + "assetId": { + "guid": "{E14975EF-E676-51A4-B826-3EF59CB645AA}", + "subId": 285127096 + }, + "assetHint": "testdata/objects/cube/cube.azmodel" + } + } + } + }, + "Component_[17962478023087084794]": { + "$type": "SelectionComponent", + "Id": 17962478023087084794 + }, + "Component_[18071675051915092508]": { + "$type": "EditorEntityIconComponent", + "Id": 18071675051915092508 + }, + "Component_[2115498007879087044]": { + "$type": "EditorInspectorComponent", + "Id": 2115498007879087044, + "ComponentOrderEntryArray": [ + { + "ComponentId": 399415038452606756 + }, + { + "ComponentId": 16184381538555246534, + "SortIndex": 1 + }, + { + "ComponentId": 7827190074535394331, + "SortIndex": 2 + } + ] + }, + "Component_[3518973002096080237]": { + "$type": "EditorOnlyEntityComponent", + "Id": 3518973002096080237 + }, + "Component_[399415038452606756]": { + "$type": "{27F1E1A1-8D9D-4C3B-BD3A-AFB9762449C0} TransformComponent", + "Id": 399415038452606756, + "Parent Entity": "ContainerEntity", + "Transform Data": { + "Translate": [ + -27.530563354492188, + -0.00018183141946792603, + 15.057670593261719 + ] + } + }, + "Component_[4564240319609068082]": { + "$type": "EditorEntitySortComponent", + "Id": 4564240319609068082 + }, + "Component_[7827190074535394331]": { + "$type": "EditorMaterialComponent", + "Id": 7827190074535394331, + "Controller": { + "Configuration": { + "materials": [ + { + "Key": { + "materialSlotStableId": 2418540911 + }, + "Value": { + "MaterialAsset": { + "assetId": { + "guid": "{CF5C7B01-4912-58AE-991A-F25251E505AC}" + }, + "assetHint": "materials/presets/pbr/metal_copper_polished.azmaterial" + } + } + } + ] + } + } + }, + "Component_[8092226976542590265]": { + "$type": "EditorDisabledCompositionComponent", + "Id": 8092226976542590265 + } + } + }, + "Entity_[1587307210708]": { + "Id": "Entity_[1587307210708]", + "Name": "Entity1", + "Components": { + "Component_[11525365929370623807]": { + "$type": "EditorVisibilityComponent", + "Id": 11525365929370623807 + }, + "Component_[12334620273692642550]": { + "$type": "EditorLockComponent", + "Id": 12334620273692642550 + }, + "Component_[14389735759337977675]": { + "$type": "EditorPendingCompositionComponent", + "Id": 14389735759337977675 + }, + "Component_[16184381538555246534]": { + "$type": "AZ::Render::EditorMeshComponent", + "Id": 16184381538555246534, + "Controller": { + "Configuration": { + "ModelAsset": { + "assetId": { + "guid": "{E14975EF-E676-51A4-B826-3EF59CB645AA}", + "subId": 285127096 + }, + "assetHint": "testdata/objects/cube/cube.azmodel" + } + } + } + }, + "Component_[17962478023087084794]": { + "$type": "SelectionComponent", + "Id": 17962478023087084794 + }, + "Component_[18071675051915092508]": { + "$type": "EditorEntityIconComponent", + "Id": 18071675051915092508 + }, + "Component_[2115498007879087044]": { + "$type": "EditorInspectorComponent", + "Id": 2115498007879087044, + "ComponentOrderEntryArray": [ + { + "ComponentId": 399415038452606756 + }, + { + "ComponentId": 16184381538555246534, + "SortIndex": 1 + }, + { + "ComponentId": 7827190074535394331, + "SortIndex": 2 + } + ] + }, + "Component_[3518973002096080237]": { + "$type": "EditorOnlyEntityComponent", + "Id": 3518973002096080237 + }, + "Component_[399415038452606756]": { + "$type": "{27F1E1A1-8D9D-4C3B-BD3A-AFB9762449C0} TransformComponent", + "Id": 399415038452606756, + "Parent Entity": "ContainerEntity", + "Transform Data": { + "Translate": [ + -32.53056335449219, + -0.00018183141946792603, + 45.14218521118164 + ] + } + }, + "Component_[4564240319609068082]": { + "$type": "EditorEntitySortComponent", + "Id": 4564240319609068082 + }, + "Component_[7827190074535394331]": { + "$type": "EditorMaterialComponent", + "Id": 7827190074535394331, + "Controller": { + "Configuration": { + "materials": [ + { + "Key": { + "materialSlotStableId": 2418540911 + }, + "Value": { + "MaterialAsset": { + "assetId": { + "guid": "{93DF55AE-8D1B-5AD1-A609-05F1BD9F6EA0}" + }, + "assetHint": "materials/presets/pbr/metal_cobalt_polished.azmaterial" + } + } + } + ] + } + } + }, + "Component_[8092226976542590265]": { + "$type": "EditorDisabledCompositionComponent", + "Id": 8092226976542590265 + } + } + }, + "Entity_[1591602178004]": { + "Id": "Entity_[1591602178004]", + "Name": "Entity1", + "Components": { + "Component_[11525365929370623807]": { + "$type": "EditorVisibilityComponent", + "Id": 11525365929370623807 + }, + "Component_[12334620273692642550]": { + "$type": "EditorLockComponent", + "Id": 12334620273692642550 + }, + "Component_[14389735759337977675]": { + "$type": "EditorPendingCompositionComponent", + "Id": 14389735759337977675 + }, + "Component_[16184381538555246534]": { + "$type": "AZ::Render::EditorMeshComponent", + "Id": 16184381538555246534, + "Controller": { + "Configuration": { + "ModelAsset": { + "assetId": { + "guid": "{E14975EF-E676-51A4-B826-3EF59CB645AA}", + "subId": 285127096 + }, + "assetHint": "testdata/objects/cube/cube.azmodel" + } + } + } + }, + "Component_[17962478023087084794]": { + "$type": "SelectionComponent", + "Id": 17962478023087084794 + }, + "Component_[18071675051915092508]": { + "$type": "EditorEntityIconComponent", + "Id": 18071675051915092508 + }, + "Component_[2115498007879087044]": { + "$type": "EditorInspectorComponent", + "Id": 2115498007879087044, + "ComponentOrderEntryArray": [ + { + "ComponentId": 399415038452606756 + }, + { + "ComponentId": 16184381538555246534, + "SortIndex": 1 + }, + { + "ComponentId": 7827190074535394331, + "SortIndex": 2 + } + ] + }, + "Component_[3518973002096080237]": { + "$type": "EditorOnlyEntityComponent", + "Id": 3518973002096080237 + }, + "Component_[399415038452606756]": { + "$type": "{27F1E1A1-8D9D-4C3B-BD3A-AFB9762449C0} TransformComponent", + "Id": 399415038452606756, + "Parent Entity": "ContainerEntity", + "Transform Data": { + "Translate": [ + 42.53014373779297, + -0.00018183141946792603, + 24.533506393432617 + ] + } + }, + "Component_[4564240319609068082]": { + "$type": "EditorEntitySortComponent", + "Id": 4564240319609068082 + }, + "Component_[7827190074535394331]": { + "$type": "EditorMaterialComponent", + "Id": 7827190074535394331, + "Controller": { + "Configuration": { + "materials": [ + { + "Key": { + "materialSlotStableId": 2418540911 + }, + "Value": { + "MaterialAsset": { + "assetId": { + "guid": "{FE52E7C8-064D-506A-9C26-433EB93747DE}" + }, + "assetHint": "materials/presets/pbr/metal_gold.azmaterial" + } + } + } + ] + } + } + }, + "Component_[8092226976542590265]": { + "$type": "EditorDisabledCompositionComponent", + "Id": 8092226976542590265 + } + } + }, + "Entity_[1595897145300]": { + "Id": "Entity_[1595897145300]", + "Name": "Entity1", + "Components": { + "Component_[11525365929370623807]": { + "$type": "EditorVisibilityComponent", + "Id": 11525365929370623807 + }, + "Component_[12334620273692642550]": { + "$type": "EditorLockComponent", + "Id": 12334620273692642550 + }, + "Component_[14389735759337977675]": { + "$type": "EditorPendingCompositionComponent", + "Id": 14389735759337977675 + }, + "Component_[16184381538555246534]": { + "$type": "AZ::Render::EditorMeshComponent", + "Id": 16184381538555246534, + "Controller": { + "Configuration": { + "ModelAsset": { + "assetId": { + "guid": "{E14975EF-E676-51A4-B826-3EF59CB645AA}", + "subId": 285127096 + }, + "assetHint": "testdata/objects/cube/cube.azmodel" + } + } + } + }, + "Component_[17962478023087084794]": { + "$type": "SelectionComponent", + "Id": 17962478023087084794 + }, + "Component_[18071675051915092508]": { + "$type": "EditorEntityIconComponent", + "Id": 18071675051915092508 + }, + "Component_[2115498007879087044]": { + "$type": "EditorInspectorComponent", + "Id": 2115498007879087044, + "ComponentOrderEntryArray": [ + { + "ComponentId": 399415038452606756 + }, + { + "ComponentId": 16184381538555246534, + "SortIndex": 1 + }, + { + "ComponentId": 7827190074535394331, + "SortIndex": 2 + } + ] + }, + "Component_[3518973002096080237]": { + "$type": "EditorOnlyEntityComponent", + "Id": 3518973002096080237 + }, + "Component_[399415038452606756]": { + "$type": "{27F1E1A1-8D9D-4C3B-BD3A-AFB9762449C0} TransformComponent", + "Id": 399415038452606756, + "Parent Entity": "ContainerEntity", + "Transform Data": { + "Translate": [ + 37.53014373779297, + -0.00018183141946792603, + 89.95755767822266 + ] + } + }, + "Component_[4564240319609068082]": { + "$type": "EditorEntitySortComponent", + "Id": 4564240319609068082 + }, + "Component_[7827190074535394331]": { + "$type": "EditorMaterialComponent", + "Id": 7827190074535394331, + "Controller": { + "Configuration": { + "materials": [ + { + "Key": { + "materialSlotStableId": 2418540911 + }, + "Value": { + "MaterialAsset": { + "assetId": { + "guid": "{CF5C7B01-4912-58AE-991A-F25251E505AC}" + }, + "assetHint": "materials/presets/pbr/metal_copper_polished.azmaterial" + } + } + } + ] + } + } + }, + "Component_[8092226976542590265]": { + "$type": "EditorDisabledCompositionComponent", + "Id": 8092226976542590265 + } + } + }, + "Entity_[1600192112596]": { + "Id": "Entity_[1600192112596]", + "Name": "Entity1", + "Components": { + "Component_[11525365929370623807]": { + "$type": "EditorVisibilityComponent", + "Id": 11525365929370623807 + }, + "Component_[12334620273692642550]": { + "$type": "EditorLockComponent", + "Id": 12334620273692642550 + }, + "Component_[14389735759337977675]": { + "$type": "EditorPendingCompositionComponent", + "Id": 14389735759337977675 + }, + "Component_[16184381538555246534]": { + "$type": "AZ::Render::EditorMeshComponent", + "Id": 16184381538555246534, + "Controller": { + "Configuration": { + "ModelAsset": { + "assetId": { + "guid": "{E14975EF-E676-51A4-B826-3EF59CB645AA}", + "subId": 285127096 + }, + "assetHint": "testdata/objects/cube/cube.azmodel" + } + } + } + }, + "Component_[17962478023087084794]": { + "$type": "SelectionComponent", + "Id": 17962478023087084794 + }, + "Component_[18071675051915092508]": { + "$type": "EditorEntityIconComponent", + "Id": 18071675051915092508 + }, + "Component_[2115498007879087044]": { + "$type": "EditorInspectorComponent", + "Id": 2115498007879087044, + "ComponentOrderEntryArray": [ + { + "ComponentId": 399415038452606756 + }, + { + "ComponentId": 16184381538555246534, + "SortIndex": 1 + }, + { + "ComponentId": 7827190074535394331, + "SortIndex": 2 + } + ] + }, + "Component_[3518973002096080237]": { + "$type": "EditorOnlyEntityComponent", + "Id": 3518973002096080237 + }, + "Component_[399415038452606756]": { + "$type": "{27F1E1A1-8D9D-4C3B-BD3A-AFB9762449C0} TransformComponent", + "Id": 399415038452606756, + "Parent Entity": "ContainerEntity", + "Transform Data": { + "Translate": [ + -12.530563354492188, + -0.00018183141946792603, + 105.0152359008789 + ] + } + }, + "Component_[4564240319609068082]": { + "$type": "EditorEntitySortComponent", + "Id": 4564240319609068082 + }, + "Component_[7827190074535394331]": { + "$type": "EditorMaterialComponent", + "Id": 7827190074535394331, + "Controller": { + "Configuration": { + "materials": [ + { + "Key": { + "materialSlotStableId": 2418540911 + }, + "Value": { + "MaterialAsset": { + "assetId": { + "guid": "{F2AD0EBF-7137-58D1-9991-9552FAD41B19}" + }, + "assetHint": "materials/presets/pbr/metal_mercury.azmaterial" + } + } + } + ] + } + } + }, + "Component_[8092226976542590265]": { + "$type": "EditorDisabledCompositionComponent", + "Id": 8092226976542590265 + } + } + }, + "Entity_[1604487079892]": { + "Id": "Entity_[1604487079892]", + "Name": "Entity1", + "Components": { + "Component_[11525365929370623807]": { + "$type": "EditorVisibilityComponent", + "Id": 11525365929370623807 + }, + "Component_[12334620273692642550]": { + "$type": "EditorLockComponent", + "Id": 12334620273692642550 + }, + "Component_[14389735759337977675]": { + "$type": "EditorPendingCompositionComponent", + "Id": 14389735759337977675 + }, + "Component_[16184381538555246534]": { + "$type": "AZ::Render::EditorMeshComponent", + "Id": 16184381538555246534, + "Controller": { + "Configuration": { + "ModelAsset": { + "assetId": { + "guid": "{E14975EF-E676-51A4-B826-3EF59CB645AA}", + "subId": 285127096 + }, + "assetHint": "testdata/objects/cube/cube.azmodel" + } + } + } + }, + "Component_[17962478023087084794]": { + "$type": "SelectionComponent", + "Id": 17962478023087084794 + }, + "Component_[18071675051915092508]": { + "$type": "EditorEntityIconComponent", + "Id": 18071675051915092508 + }, + "Component_[2115498007879087044]": { + "$type": "EditorInspectorComponent", + "Id": 2115498007879087044, + "ComponentOrderEntryArray": [ + { + "ComponentId": 399415038452606756 + }, + { + "ComponentId": 16184381538555246534, + "SortIndex": 1 + }, + { + "ComponentId": 7827190074535394331, + "SortIndex": 2 + } + ] + }, + "Component_[3518973002096080237]": { + "$type": "EditorOnlyEntityComponent", + "Id": 3518973002096080237 + }, + "Component_[399415038452606756]": { + "$type": "{27F1E1A1-8D9D-4C3B-BD3A-AFB9762449C0} TransformComponent", + "Id": 399415038452606756, + "Parent Entity": "ContainerEntity", + "Transform Data": { + "Translate": [ + 42.53014373779297, + -0.00018183141946792603, + 49.593753814697266 + ] + } + }, + "Component_[4564240319609068082]": { + "$type": "EditorEntitySortComponent", + "Id": 4564240319609068082 + }, + "Component_[7827190074535394331]": { + "$type": "EditorMaterialComponent", + "Id": 7827190074535394331, + "Controller": { + "Configuration": { + "materials": [ + { + "Key": { + "materialSlotStableId": 2418540911 + }, + "Value": { + "MaterialAsset": { + "assetId": { + "guid": "{5BC13D95-377E-53EA-9A93-156384BE8B04}" + }, + "assetHint": "materials/presets/pbr/metal_gold_matte.azmaterial" + } + } + } + ] + } + } + }, + "Component_[8092226976542590265]": { + "$type": "EditorDisabledCompositionComponent", + "Id": 8092226976542590265 + } + } + }, + "Entity_[1608782047188]": { + "Id": "Entity_[1608782047188]", + "Name": "Entity1", + "Components": { + "Component_[11525365929370623807]": { + "$type": "EditorVisibilityComponent", + "Id": 11525365929370623807 + }, + "Component_[12334620273692642550]": { + "$type": "EditorLockComponent", + "Id": 12334620273692642550 + }, + "Component_[14389735759337977675]": { + "$type": "EditorPendingCompositionComponent", + "Id": 14389735759337977675 + }, + "Component_[16184381538555246534]": { + "$type": "AZ::Render::EditorMeshComponent", + "Id": 16184381538555246534, + "Controller": { + "Configuration": { + "ModelAsset": { + "assetId": { + "guid": "{E14975EF-E676-51A4-B826-3EF59CB645AA}", + "subId": 285127096 + }, + "assetHint": "testdata/objects/cube/cube.azmodel" + } + } + } + }, + "Component_[17962478023087084794]": { + "$type": "SelectionComponent", + "Id": 17962478023087084794 + }, + "Component_[18071675051915092508]": { + "$type": "EditorEntityIconComponent", + "Id": 18071675051915092508 + }, + "Component_[2115498007879087044]": { + "$type": "EditorInspectorComponent", + "Id": 2115498007879087044, + "ComponentOrderEntryArray": [ + { + "ComponentId": 399415038452606756 + }, + { + "ComponentId": 16184381538555246534, + "SortIndex": 1 + }, + { + "ComponentId": 7827190074535394331, + "SortIndex": 2 + } + ] + }, + "Component_[3518973002096080237]": { + "$type": "EditorOnlyEntityComponent", + "Id": 3518973002096080237 + }, + "Component_[399415038452606756]": { + "$type": "{27F1E1A1-8D9D-4C3B-BD3A-AFB9762449C0} TransformComponent", + "Id": 399415038452606756, + "Parent Entity": "ContainerEntity", + "Transform Data": { + "Translate": [ + -32.53056335449219, + -0.00018183141946792603, + 79.38228607177734 + ] + } + }, + "Component_[4564240319609068082]": { + "$type": "EditorEntitySortComponent", + "Id": 4564240319609068082 + }, + "Component_[7827190074535394331]": { + "$type": "EditorMaterialComponent", + "Id": 7827190074535394331, + "Controller": { + "Configuration": { + "materials": [ + { + "Key": { + "materialSlotStableId": 2418540911 + }, + "Value": { + "MaterialAsset": { + "assetId": { + "guid": "{C60A39AF-BB76-51BD-9468-A88C9A6F78D7}" + }, + "assetHint": "materials/presets/pbr/metal_cobalt_matte.azmaterial" + } + } + } + ] + } + } + }, + "Component_[8092226976542590265]": { + "$type": "EditorDisabledCompositionComponent", + "Id": 8092226976542590265 + } + } + }, + "Entity_[1613077014484]": { + "Id": "Entity_[1613077014484]", + "Name": "Entity1", + "Components": { + "Component_[11525365929370623807]": { + "$type": "EditorVisibilityComponent", + "Id": 11525365929370623807 + }, + "Component_[12334620273692642550]": { + "$type": "EditorLockComponent", + "Id": 12334620273692642550 + }, + "Component_[14389735759337977675]": { + "$type": "EditorPendingCompositionComponent", + "Id": 14389735759337977675 + }, + "Component_[16184381538555246534]": { + "$type": "AZ::Render::EditorMeshComponent", + "Id": 16184381538555246534, + "Controller": { + "Configuration": { + "ModelAsset": { + "assetId": { + "guid": "{E14975EF-E676-51A4-B826-3EF59CB645AA}", + "subId": 285127096 + }, + "assetHint": "testdata/objects/cube/cube.azmodel" + } + } + } + }, + "Component_[17962478023087084794]": { + "$type": "SelectionComponent", + "Id": 17962478023087084794 + }, + "Component_[18071675051915092508]": { + "$type": "EditorEntityIconComponent", + "Id": 18071675051915092508 + }, + "Component_[2115498007879087044]": { + "$type": "EditorInspectorComponent", + "Id": 2115498007879087044, + "ComponentOrderEntryArray": [ + { + "ComponentId": 399415038452606756 + }, + { + "ComponentId": 16184381538555246534, + "SortIndex": 1 + }, + { + "ComponentId": 7827190074535394331, + "SortIndex": 2 + } + ] + }, + "Component_[3518973002096080237]": { + "$type": "EditorOnlyEntityComponent", + "Id": 3518973002096080237 + }, + "Component_[399415038452606756]": { + "$type": "{27F1E1A1-8D9D-4C3B-BD3A-AFB9762449C0} TransformComponent", + "Id": 399415038452606756, + "Parent Entity": "ContainerEntity", + "Transform Data": { + "Translate": [ + -42.53056335449219, + -0.00018183141946792603, + 19.50924301147461 + ] + } + }, + "Component_[4564240319609068082]": { + "$type": "EditorEntitySortComponent", + "Id": 4564240319609068082 + }, + "Component_[7827190074535394331]": { + "$type": "EditorMaterialComponent", + "Id": 7827190074535394331, + "Controller": { + "Configuration": { + "materials": [ + { + "Key": { + "materialSlotStableId": 2418540911 + }, + "Value": { + "MaterialAsset": { + "assetId": { + "guid": "{AE350D9F-0000-526D-B49C-4303D687BB86}" + }, + "assetHint": "materials/presets/pbr/metal_brass_matte.azmaterial" + } + } + } + ] + } + } + }, + "Component_[8092226976542590265]": { + "$type": "EditorDisabledCompositionComponent", + "Id": 8092226976542590265 + } + } + }, + "Entity_[1617371981780]": { + "Id": "Entity_[1617371981780]", + "Name": "Entity1", + "Components": { + "Component_[11525365929370623807]": { + "$type": "EditorVisibilityComponent", + "Id": 11525365929370623807 + }, + "Component_[12334620273692642550]": { + "$type": "EditorLockComponent", + "Id": 12334620273692642550 + }, + "Component_[14389735759337977675]": { + "$type": "EditorPendingCompositionComponent", + "Id": 14389735759337977675 + }, + "Component_[16184381538555246534]": { + "$type": "AZ::Render::EditorMeshComponent", + "Id": 16184381538555246534, + "Controller": { + "Configuration": { + "ModelAsset": { + "assetId": { + "guid": "{E14975EF-E676-51A4-B826-3EF59CB645AA}", + "subId": 285127096 + }, + "assetHint": "testdata/objects/cube/cube.azmodel" + } + } + } + }, + "Component_[17962478023087084794]": { + "$type": "SelectionComponent", + "Id": 17962478023087084794 + }, + "Component_[18071675051915092508]": { + "$type": "EditorEntityIconComponent", + "Id": 18071675051915092508 + }, + "Component_[2115498007879087044]": { + "$type": "EditorInspectorComponent", + "Id": 2115498007879087044, + "ComponentOrderEntryArray": [ + { + "ComponentId": 399415038452606756 + }, + { + "ComponentId": 16184381538555246534, + "SortIndex": 1 + }, + { + "ComponentId": 7827190074535394331, + "SortIndex": 2 + } + ] + }, + "Component_[3518973002096080237]": { + "$type": "EditorOnlyEntityComponent", + "Id": 3518973002096080237 + }, + "Component_[399415038452606756]": { + "$type": "{27F1E1A1-8D9D-4C3B-BD3A-AFB9762449C0} TransformComponent", + "Id": 399415038452606756, + "Parent Entity": "ContainerEntity", + "Transform Data": { + "Translate": [ + 22.53014373779297, + -0.00018183141946792603, + 99.43339538574219 + ] + } + }, + "Component_[4564240319609068082]": { + "$type": "EditorEntitySortComponent", + "Id": 4564240319609068082 + }, + "Component_[7827190074535394331]": { + "$type": "EditorMaterialComponent", + "Id": 7827190074535394331, + "Controller": { + "Configuration": { + "materials": [ + { + "Key": { + "materialSlotStableId": 2418540911 + }, + "Value": { + "MaterialAsset": { + "assetId": { + "guid": "{80E0F2A7-1EE4-597F-80EF-985C65BCE2EB}" + }, + "assetHint": "materials/presets/pbr/metal_brass.azmaterial" + } + } + } + ] + } + } + }, + "Component_[8092226976542590265]": { + "$type": "EditorDisabledCompositionComponent", + "Id": 8092226976542590265 + } + } + }, + "Entity_[1621666949076]": { + "Id": "Entity_[1621666949076]", + "Name": "Entity1", + "Components": { + "Component_[1057179753323467068]": { + "$type": "EditorMaterialComponent", + "Id": 1057179753323467068, + "Controller": { + "Configuration": { + "materials": [ + { + "Key": { + "materialSlotStableId": 2418540911 + }, + "Value": { + "MaterialAsset": { + "assetId": { + "guid": "{A3F3CD98-1634-5542-AD5A-78E91BE21AE9}" + }, + "assetHint": "materials/presets/pbr/metal_titanium_matte.azmaterial" + } + } + } + ] + } + } + }, + "Component_[11525365929370623807]": { + "$type": "EditorVisibilityComponent", + "Id": 11525365929370623807 + }, + "Component_[12334620273692642550]": { + "$type": "EditorLockComponent", + "Id": 12334620273692642550 + }, + "Component_[14389735759337977675]": { + "$type": "EditorPendingCompositionComponent", + "Id": 14389735759337977675 + }, + "Component_[16184381538555246534]": { + "$type": "AZ::Render::EditorMeshComponent", + "Id": 16184381538555246534, + "Controller": { + "Configuration": { + "ModelAsset": { + "assetId": { + "guid": "{E14975EF-E676-51A4-B826-3EF59CB645AA}", + "subId": 285127096 + }, + "assetHint": "testdata/objects/cube/cube.azmodel" + } + } + } + }, + "Component_[17962478023087084794]": { + "$type": "SelectionComponent", + "Id": 17962478023087084794 + }, + "Component_[18071675051915092508]": { + "$type": "EditorEntityIconComponent", + "Id": 18071675051915092508 + }, + "Component_[2115498007879087044]": { + "$type": "EditorInspectorComponent", + "Id": 2115498007879087044, + "ComponentOrderEntryArray": [ + { + "ComponentId": 399415038452606756 + }, + { + "ComponentId": 16184381538555246534, + "SortIndex": 1 + }, + { + "ComponentId": 1057179753323467068, + "SortIndex": 2 + } + ] + }, + "Component_[3518973002096080237]": { + "$type": "EditorOnlyEntityComponent", + "Id": 3518973002096080237 + }, + "Component_[399415038452606756]": { + "$type": "{27F1E1A1-8D9D-4C3B-BD3A-AFB9762449C0} TransformComponent", + "Id": 399415038452606756, + "Parent Entity": "ContainerEntity", + "Transform Data": { + "Translate": [ + 12.530143737792969, + -0.00018183141946792603, + 4.451573371887207 + ] + } + }, + "Component_[4564240319609068082]": { + "$type": "EditorEntitySortComponent", + "Id": 4564240319609068082 + }, + "Component_[8092226976542590265]": { + "$type": "EditorDisabledCompositionComponent", + "Id": 8092226976542590265 + } + } + }, + "Entity_[1625961916372]": { + "Id": "Entity_[1625961916372]", + "Name": "Entity1", + "Components": { + "Component_[11525365929370623807]": { + "$type": "EditorVisibilityComponent", + "Id": 11525365929370623807 + }, + "Component_[12334620273692642550]": { + "$type": "EditorLockComponent", + "Id": 12334620273692642550 + }, + "Component_[14389735759337977675]": { + "$type": "EditorPendingCompositionComponent", + "Id": 14389735759337977675 + }, + "Component_[16184381538555246534]": { + "$type": "AZ::Render::EditorMeshComponent", + "Id": 16184381538555246534, + "Controller": { + "Configuration": { + "ModelAsset": { + "assetId": { + "guid": "{E14975EF-E676-51A4-B826-3EF59CB645AA}", + "subId": 285127096 + }, + "assetHint": "testdata/objects/cube/cube.azmodel" + } + } + } + }, + "Component_[17962478023087084794]": { + "$type": "SelectionComponent", + "Id": 17962478023087084794 + }, + "Component_[18071675051915092508]": { + "$type": "EditorEntityIconComponent", + "Id": 18071675051915092508 + }, + "Component_[2115498007879087044]": { + "$type": "EditorInspectorComponent", + "Id": 2115498007879087044, + "ComponentOrderEntryArray": [ + { + "ComponentId": 399415038452606756 + }, + { + "ComponentId": 16184381538555246534, + "SortIndex": 1 + }, + { + "ComponentId": 7827190074535394331, + "SortIndex": 2 + } + ] + }, + "Component_[3518973002096080237]": { + "$type": "EditorOnlyEntityComponent", + "Id": 3518973002096080237 + }, + "Component_[399415038452606756]": { + "$type": "{27F1E1A1-8D9D-4C3B-BD3A-AFB9762449C0} TransformComponent", + "Id": 399415038452606756, + "Parent Entity": "ContainerEntity", + "Transform Data": { + "Translate": [ + 7.530143737792969, + -0.00018183141946792603, + 9.475835800170898 + ] + } + }, + "Component_[4564240319609068082]": { + "$type": "EditorEntitySortComponent", + "Id": 4564240319609068082 + }, + "Component_[7827190074535394331]": { + "$type": "EditorMaterialComponent", + "Id": 7827190074535394331, + "Controller": { + "Configuration": { + "materials": [ + { + "Key": { + "materialSlotStableId": 2418540911 + }, + "Value": { + "MaterialAsset": { + "assetId": { + "guid": "{CDA13277-5EAB-5E2A-93F5-B7003597FBCE}" + }, + "assetHint": "materials/presets/pbr/metal_silver.azmaterial" + } + } + } + ] + } + } + }, + "Component_[8092226976542590265]": { + "$type": "EditorDisabledCompositionComponent", + "Id": 8092226976542590265 + } + } + }, + "Entity_[1630256883668]": { + "Id": "Entity_[1630256883668]", + "Name": "Entity1", + "Components": { + "Component_[11525365929370623807]": { + "$type": "EditorVisibilityComponent", + "Id": 11525365929370623807 + }, + "Component_[12334620273692642550]": { + "$type": "EditorLockComponent", + "Id": 12334620273692642550 + }, + "Component_[14389735759337977675]": { + "$type": "EditorPendingCompositionComponent", + "Id": 14389735759337977675 + }, + "Component_[16184381538555246534]": { + "$type": "AZ::Render::EditorMeshComponent", + "Id": 16184381538555246534, + "Controller": { + "Configuration": { + "ModelAsset": { + "assetId": { + "guid": "{E14975EF-E676-51A4-B826-3EF59CB645AA}", + "subId": 285127096 + }, + "assetHint": "testdata/objects/cube/cube.azmodel" + } + } + } + }, + "Component_[17962478023087084794]": { + "$type": "SelectionComponent", + "Id": 17962478023087084794 + }, + "Component_[18071675051915092508]": { + "$type": "EditorEntityIconComponent", + "Id": 18071675051915092508 + }, + "Component_[2115498007879087044]": { + "$type": "EditorInspectorComponent", + "Id": 2115498007879087044, + "ComponentOrderEntryArray": [ + { + "ComponentId": 399415038452606756 + }, + { + "ComponentId": 16184381538555246534, + "SortIndex": 1 + }, + { + "ComponentId": 7827190074535394331, + "SortIndex": 2 + } + ] + }, + "Component_[3518973002096080237]": { + "$type": "EditorOnlyEntityComponent", + "Id": 3518973002096080237 + }, + "Component_[399415038452606756]": { + "$type": "{27F1E1A1-8D9D-4C3B-BD3A-AFB9762449C0} TransformComponent", + "Id": 399415038452606756, + "Parent Entity": "ContainerEntity", + "Transform Data": { + "Translate": [ + -2.5305633544921875, + -0.00018183141946792603, + 30.08451271057129 + ] + } + }, + "Component_[4564240319609068082]": { + "$type": "EditorEntitySortComponent", + "Id": 4564240319609068082 + }, + "Component_[7827190074535394331]": { + "$type": "EditorMaterialComponent", + "Id": 7827190074535394331, + "Controller": { + "Configuration": { + "materials": [ + { + "Key": { + "materialSlotStableId": 2418540911 + }, + "Value": { + "MaterialAsset": { + "assetId": { + "guid": "{D0E9960A-4B31-5136-BAC6-5482B203D3B4}" + }, + "assetHint": "materials/presets/pbr/metal_palladium_polished.azmaterial" + } + } + } + ] + } + } + }, + "Component_[8092226976542590265]": { + "$type": "EditorDisabledCompositionComponent", + "Id": 8092226976542590265 + } + } + }, + "Entity_[1634551850964]": { + "Id": "Entity_[1634551850964]", + "Name": "Entity1", + "Components": { + "Component_[11525365929370623807]": { + "$type": "EditorVisibilityComponent", + "Id": 11525365929370623807 + }, + "Component_[12334620273692642550]": { + "$type": "EditorLockComponent", + "Id": 12334620273692642550 + }, + "Component_[14389735759337977675]": { + "$type": "EditorPendingCompositionComponent", + "Id": 14389735759337977675 + }, + "Component_[16184381538555246534]": { + "$type": "AZ::Render::EditorMeshComponent", + "Id": 16184381538555246534, + "Controller": { + "Configuration": { + "ModelAsset": { + "assetId": { + "guid": "{E14975EF-E676-51A4-B826-3EF59CB645AA}", + "subId": 285127096 + }, + "assetHint": "testdata/objects/cube/cube.azmodel" + } + } + } + }, + "Component_[17962478023087084794]": { + "$type": "SelectionComponent", + "Id": 17962478023087084794 + }, + "Component_[18071675051915092508]": { + "$type": "EditorEntityIconComponent", + "Id": 18071675051915092508 + }, + "Component_[2115498007879087044]": { + "$type": "EditorInspectorComponent", + "Id": 2115498007879087044, + "ComponentOrderEntryArray": [ + { + "ComponentId": 399415038452606756 + }, + { + "ComponentId": 16184381538555246534, + "SortIndex": 1 + }, + { + "ComponentId": 7827190074535394331, + "SortIndex": 2 + } + ] + }, + "Component_[3518973002096080237]": { + "$type": "EditorOnlyEntityComponent", + "Id": 3518973002096080237 + }, + "Component_[399415038452606756]": { + "$type": "{27F1E1A1-8D9D-4C3B-BD3A-AFB9762449C0} TransformComponent", + "Id": 399415038452606756, + "Parent Entity": "ContainerEntity", + "Transform Data": { + "Translate": [ + -7.5305633544921875, + -0.00018183141946792603, + 114.4910659790039 + ] + } + }, + "Component_[4564240319609068082]": { + "$type": "EditorEntitySortComponent", + "Id": 4564240319609068082 + }, + "Component_[7827190074535394331]": { + "$type": "EditorMaterialComponent", + "Id": 7827190074535394331, + "Controller": { + "Configuration": { + "materials": [ + { + "Key": { + "materialSlotStableId": 2418540911 + }, + "Value": { + "MaterialAsset": { + "assetId": { + "guid": "{DD1E26AE-80FB-5DB6-8786-26D438190A38}" + }, + "assetHint": "materials/presets/pbr/metal_nickel.azmaterial" + } + } + } + ] + } + } + }, + "Component_[8092226976542590265]": { + "$type": "EditorDisabledCompositionComponent", + "Id": 8092226976542590265 + } + } + }, + "Entity_[1638846818260]": { + "Id": "Entity_[1638846818260]", + "Name": "Entity1", + "Components": { + "Component_[11525365929370623807]": { + "$type": "EditorVisibilityComponent", + "Id": 11525365929370623807 + }, + "Component_[12334620273692642550]": { + "$type": "EditorLockComponent", + "Id": 12334620273692642550 + }, + "Component_[14389735759337977675]": { + "$type": "EditorPendingCompositionComponent", + "Id": 14389735759337977675 + }, + "Component_[16184381538555246534]": { + "$type": "AZ::Render::EditorMeshComponent", + "Id": 16184381538555246534, + "Controller": { + "Configuration": { + "ModelAsset": { + "assetId": { + "guid": "{E14975EF-E676-51A4-B826-3EF59CB645AA}", + "subId": 285127096 + }, + "assetHint": "testdata/objects/cube/cube.azmodel" + } + } + } + }, + "Component_[17962478023087084794]": { + "$type": "SelectionComponent", + "Id": 17962478023087084794 + }, + "Component_[18071675051915092508]": { + "$type": "EditorEntityIconComponent", + "Id": 18071675051915092508 + }, + "Component_[2115498007879087044]": { + "$type": "EditorInspectorComponent", + "Id": 2115498007879087044, + "ComponentOrderEntryArray": [ + { + "ComponentId": 399415038452606756 + }, + { + "ComponentId": 16184381538555246534, + "SortIndex": 1 + }, + { + "ComponentId": 7827190074535394331, + "SortIndex": 2 + } + ] + }, + "Component_[3518973002096080237]": { + "$type": "EditorOnlyEntityComponent", + "Id": 3518973002096080237 + }, + "Component_[399415038452606756]": { + "$type": "{27F1E1A1-8D9D-4C3B-BD3A-AFB9762449C0} TransformComponent", + "Id": 399415038452606756, + "Parent Entity": "ContainerEntity", + "Transform Data": { + "Translate": [ + -2.5305633544921875, + -0.00018183141946792603, + 109.46680450439453 + ] + } + }, + "Component_[4564240319609068082]": { + "$type": "EditorEntitySortComponent", + "Id": 4564240319609068082 + }, + "Component_[7827190074535394331]": { + "$type": "EditorMaterialComponent", + "Id": 7827190074535394331, + "Controller": { + "Configuration": { + "materials": [ + { + "Key": { + "materialSlotStableId": 2418540911 + }, + "Value": { + "MaterialAsset": { + "assetId": { + "guid": "{9187B84B-425F-5D11-B4D7-35BBDB0959D1}" + }, + "assetHint": "materials/presets/pbr/metal_palladium_matte.azmaterial" + } + } + } + ] + } + } + }, + "Component_[8092226976542590265]": { + "$type": "EditorDisabledCompositionComponent", + "Id": 8092226976542590265 + } + } + }, + "Entity_[1643141785556]": { + "Id": "Entity_[1643141785556]", + "Name": "Entity1", + "Components": { + "Component_[1057179753323467068]": { + "$type": "EditorMaterialComponent", + "Id": 1057179753323467068, + "Controller": { + "Configuration": { + "materials": [ + { + "Key": { + "materialSlotStableId": 2418540911 + }, + "Value": { + "MaterialAsset": { + "assetId": { + "guid": "{3F0DF0C4-5F23-5EB1-B762-7344AFFDC011}" + }, + "assetHint": "materials/presets/pbr/metal_titanium_polished.azmaterial" + } + } + } + ] + } + } + }, + "Component_[11525365929370623807]": { + "$type": "EditorVisibilityComponent", + "Id": 11525365929370623807 + }, + "Component_[12334620273692642550]": { + "$type": "EditorLockComponent", + "Id": 12334620273692642550 + }, + "Component_[14389735759337977675]": { + "$type": "EditorPendingCompositionComponent", + "Id": 14389735759337977675 + }, + "Component_[16184381538555246534]": { + "$type": "AZ::Render::EditorMeshComponent", + "Id": 16184381538555246534, + "Controller": { + "Configuration": { + "ModelAsset": { + "assetId": { + "guid": "{E14975EF-E676-51A4-B826-3EF59CB645AA}", + "subId": 285127096 + }, + "assetHint": "testdata/objects/cube/cube.azmodel" + } + } + } + }, + "Component_[17962478023087084794]": { + "$type": "SelectionComponent", + "Id": 17962478023087084794 + }, + "Component_[18071675051915092508]": { + "$type": "EditorEntityIconComponent", + "Id": 18071675051915092508 + }, + "Component_[2115498007879087044]": { + "$type": "EditorInspectorComponent", + "Id": 2115498007879087044, + "ComponentOrderEntryArray": [ + { + "ComponentId": 399415038452606756 + }, + { + "ComponentId": 16184381538555246534, + "SortIndex": 1 + }, + { + "ComponentId": 1057179753323467068, + "SortIndex": 2 + } + ] + }, + "Component_[3518973002096080237]": { + "$type": "EditorOnlyEntityComponent", + "Id": 3518973002096080237 + }, + "Component_[399415038452606756]": { + "$type": "{27F1E1A1-8D9D-4C3B-BD3A-AFB9762449C0} TransformComponent", + "Id": 399415038452606756, + "Parent Entity": "ContainerEntity", + "Transform Data": { + "Translate": [ + 12.530143737792969, + -0.00018183141946792603, + 89.95755767822266 + ] + } + }, + "Component_[4564240319609068082]": { + "$type": "EditorEntitySortComponent", + "Id": 4564240319609068082 + }, + "Component_[8092226976542590265]": { + "$type": "EditorDisabledCompositionComponent", + "Id": 8092226976542590265 + } + } + }, + "Entity_[1647436752852]": { + "Id": "Entity_[1647436752852]", + "Name": "Entity1", + "Components": { + "Component_[11525365929370623807]": { + "$type": "EditorVisibilityComponent", + "Id": 11525365929370623807 + }, + "Component_[12334620273692642550]": { + "$type": "EditorLockComponent", + "Id": 12334620273692642550 + }, + "Component_[14389735759337977675]": { + "$type": "EditorPendingCompositionComponent", + "Id": 14389735759337977675 + }, + "Component_[16184381538555246534]": { + "$type": "AZ::Render::EditorMeshComponent", + "Id": 16184381538555246534, + "Controller": { + "Configuration": { + "ModelAsset": { + "assetId": { + "guid": "{E14975EF-E676-51A4-B826-3EF59CB645AA}", + "subId": 285127096 + }, + "assetHint": "testdata/objects/cube/cube.azmodel" + } + } + } + }, + "Component_[17962478023087084794]": { + "$type": "SelectionComponent", + "Id": 17962478023087084794 + }, + "Component_[18071675051915092508]": { + "$type": "EditorEntityIconComponent", + "Id": 18071675051915092508 + }, + "Component_[2115498007879087044]": { + "$type": "EditorInspectorComponent", + "Id": 2115498007879087044, + "ComponentOrderEntryArray": [ + { + "ComponentId": 399415038452606756 + }, + { + "ComponentId": 16184381538555246534, + "SortIndex": 1 + }, + { + "ComponentId": 7827190074535394331, + "SortIndex": 2 + } + ] + }, + "Component_[3518973002096080237]": { + "$type": "EditorOnlyEntityComponent", + "Id": 3518973002096080237 + }, + "Component_[399415038452606756]": { + "$type": "{27F1E1A1-8D9D-4C3B-BD3A-AFB9762449C0} TransformComponent", + "Id": 399415038452606756, + "Parent Entity": "ContainerEntity", + "Transform Data": { + "Translate": [ + 47.53014373779297, + -0.00018183141946792603, + 39.56034851074219 + ] + } + }, + "Component_[4564240319609068082]": { + "$type": "EditorEntitySortComponent", + "Id": 4564240319609068082 + }, + "Component_[7827190074535394331]": { + "$type": "EditorMaterialComponent", + "Id": 7827190074535394331, + "Controller": { + "Configuration": { + "materials": [ + { + "Key": { + "materialSlotStableId": 2418540911 + }, + "Value": { + "MaterialAsset": { + "assetId": { + "guid": "{892EA944-0325-5FA6-94D7-4AB4FC02A0F5}" + }, + "assetHint": "materials/presets/pbr/metal_iron.azmaterial" + } + } + } + ] + } + } + }, + "Component_[8092226976542590265]": { + "$type": "EditorDisabledCompositionComponent", + "Id": 8092226976542590265 + } + } + }, + "Entity_[1651731720148]": { + "Id": "Entity_[1651731720148]", + "Name": "Entity1", + "Components": { + "Component_[1057179753323467068]": { + "$type": "EditorMaterialComponent", + "Id": 1057179753323467068, + "Controller": { + "Configuration": { + "materials": [ + { + "Key": { + "materialSlotStableId": 2418540911 + }, + "Value": { + "MaterialAsset": { + "assetId": { + "guid": "{A3F3CD98-1634-5542-AD5A-78E91BE21AE9}" + }, + "assetHint": "materials/presets/pbr/metal_titanium_matte.azmaterial" + } + } + } + ] + } + } + }, + "Component_[11525365929370623807]": { + "$type": "EditorVisibilityComponent", + "Id": 11525365929370623807 + }, + "Component_[12334620273692642550]": { + "$type": "EditorLockComponent", + "Id": 12334620273692642550 + }, + "Component_[14389735759337977675]": { + "$type": "EditorPendingCompositionComponent", + "Id": 14389735759337977675 + }, + "Component_[16184381538555246534]": { + "$type": "AZ::Render::EditorMeshComponent", + "Id": 16184381538555246534, + "Controller": { + "Configuration": { + "ModelAsset": { + "assetId": { + "guid": "{E14975EF-E676-51A4-B826-3EF59CB645AA}", + "subId": 285127096 + }, + "assetHint": "testdata/objects/cube/cube.azmodel" + } + } + } + }, + "Component_[17962478023087084794]": { + "$type": "SelectionComponent", + "Id": 17962478023087084794 + }, + "Component_[18071675051915092508]": { + "$type": "EditorEntityIconComponent", + "Id": 18071675051915092508 + }, + "Component_[2115498007879087044]": { + "$type": "EditorInspectorComponent", + "Id": 2115498007879087044, + "ComponentOrderEntryArray": [ + { + "ComponentId": 399415038452606756 + }, + { + "ComponentId": 16184381538555246534, + "SortIndex": 1 + }, + { + "ComponentId": 1057179753323467068, + "SortIndex": 2 + } + ] + }, + "Component_[3518973002096080237]": { + "$type": "EditorOnlyEntityComponent", + "Id": 3518973002096080237 + }, + "Component_[399415038452606756]": { + "$type": "{27F1E1A1-8D9D-4C3B-BD3A-AFB9762449C0} TransformComponent", + "Id": 399415038452606756, + "Parent Entity": "ContainerEntity", + "Transform Data": { + "Translate": [ + 12.530143737792969, + -0.00018183141946792603, + 109.46680450439453 + ] + } + }, + "Component_[4564240319609068082]": { + "$type": "EditorEntitySortComponent", + "Id": 4564240319609068082 + }, + "Component_[8092226976542590265]": { + "$type": "EditorDisabledCompositionComponent", + "Id": 8092226976542590265 + } + } + }, + "Entity_[1656026687444]": { + "Id": "Entity_[1656026687444]", + "Name": "Entity1", + "Components": { + "Component_[11525365929370623807]": { + "$type": "EditorVisibilityComponent", + "Id": 11525365929370623807 + }, + "Component_[12334620273692642550]": { + "$type": "EditorLockComponent", + "Id": 12334620273692642550 + }, + "Component_[14389735759337977675]": { + "$type": "EditorPendingCompositionComponent", + "Id": 14389735759337977675 + }, + "Component_[16184381538555246534]": { + "$type": "AZ::Render::EditorMeshComponent", + "Id": 16184381538555246534, + "Controller": { + "Configuration": { + "ModelAsset": { + "assetId": { + "guid": "{E14975EF-E676-51A4-B826-3EF59CB645AA}", + "subId": 285127096 + }, + "assetHint": "testdata/objects/cube/cube.azmodel" + } + } + } + }, + "Component_[17962478023087084794]": { + "$type": "SelectionComponent", + "Id": 17962478023087084794 + }, + "Component_[18071675051915092508]": { + "$type": "EditorEntityIconComponent", + "Id": 18071675051915092508 + }, + "Component_[2115498007879087044]": { + "$type": "EditorInspectorComponent", + "Id": 2115498007879087044, + "ComponentOrderEntryArray": [ + { + "ComponentId": 399415038452606756 + }, + { + "ComponentId": 16184381538555246534, + "SortIndex": 1 + }, + { + "ComponentId": 7827190074535394331, + "SortIndex": 2 + } + ] + }, + "Component_[3518973002096080237]": { + "$type": "EditorOnlyEntityComponent", + "Id": 3518973002096080237 + }, + "Component_[399415038452606756]": { + "$type": "{27F1E1A1-8D9D-4C3B-BD3A-AFB9762449C0} TransformComponent", + "Id": 399415038452606756, + "Parent Entity": "ContainerEntity", + "Transform Data": { + "Translate": [ + -2.5305633544921875, + -0.00018183141946792603, + 24.533506393432617 + ] + } + }, + "Component_[4564240319609068082]": { + "$type": "EditorEntitySortComponent", + "Id": 4564240319609068082 + }, + "Component_[7827190074535394331]": { + "$type": "EditorMaterialComponent", + "Id": 7827190074535394331, + "Controller": { + "Configuration": { + "materials": [ + { + "Key": { + "materialSlotStableId": 2418540911 + }, + "Value": { + "MaterialAsset": { + "assetId": { + "guid": "{DC0598ED-1EDD-5B37-892E-E0867621D74C}" + }, + "assetHint": "materials/presets/pbr/metal_palladium.azmaterial" + } + } + } + ] + } + } + }, + "Component_[8092226976542590265]": { + "$type": "EditorDisabledCompositionComponent", + "Id": 8092226976542590265 + } + } + }, + "Entity_[1660321654740]": { + "Id": "Entity_[1660321654740]", + "Name": "Entity1", + "Components": { + "Component_[11525365929370623807]": { + "$type": "EditorVisibilityComponent", + "Id": 11525365929370623807 + }, + "Component_[12334620273692642550]": { + "$type": "EditorLockComponent", + "Id": 12334620273692642550 + }, + "Component_[14389735759337977675]": { + "$type": "EditorPendingCompositionComponent", + "Id": 14389735759337977675 + }, + "Component_[16184381538555246534]": { + "$type": "AZ::Render::EditorMeshComponent", + "Id": 16184381538555246534, + "Controller": { + "Configuration": { + "ModelAsset": { + "assetId": { + "guid": "{E14975EF-E676-51A4-B826-3EF59CB645AA}", + "subId": 285127096 + }, + "assetHint": "testdata/objects/cube/cube.azmodel" + } + } + } + }, + "Component_[17962478023087084794]": { + "$type": "SelectionComponent", + "Id": 17962478023087084794 + }, + "Component_[18071675051915092508]": { + "$type": "EditorEntityIconComponent", + "Id": 18071675051915092508 + }, + "Component_[2115498007879087044]": { + "$type": "EditorInspectorComponent", + "Id": 2115498007879087044, + "ComponentOrderEntryArray": [ + { + "ComponentId": 399415038452606756 + }, + { + "ComponentId": 16184381538555246534, + "SortIndex": 1 + }, + { + "ComponentId": 7827190074535394331, + "SortIndex": 2 + } + ] + }, + "Component_[3518973002096080237]": { + "$type": "EditorOnlyEntityComponent", + "Id": 3518973002096080237 + }, + "Component_[399415038452606756]": { + "$type": "{27F1E1A1-8D9D-4C3B-BD3A-AFB9762449C0} TransformComponent", + "Id": 399415038452606756, + "Parent Entity": "ContainerEntity", + "Transform Data": { + "Translate": [ + -22.530563354492188, + -0.00018183141946792603, + 59.873046875 + ] + } + }, + "Component_[4564240319609068082]": { + "$type": "EditorEntitySortComponent", + "Id": 4564240319609068082 + }, + "Component_[7827190074535394331]": { + "$type": "EditorMaterialComponent", + "Id": 7827190074535394331, + "Controller": { + "Configuration": { + "materials": [ + { + "Key": { + "materialSlotStableId": 2418540911 + }, + "Value": { + "MaterialAsset": { + "assetId": { + "guid": "{FB4657EB-FB3A-5EC3-A772-DC36D6F733C3}" + }, + "assetHint": "materials/presets/pbr/metal_gold_polished.azmaterial" + } + } + } + ] + } + } + }, + "Component_[8092226976542590265]": { + "$type": "EditorDisabledCompositionComponent", + "Id": 8092226976542590265 + } + } + }, + "Entity_[1664616622036]": { + "Id": "Entity_[1664616622036]", + "Name": "Entity1", + "Components": { + "Component_[11525365929370623807]": { + "$type": "EditorVisibilityComponent", + "Id": 11525365929370623807 + }, + "Component_[12334620273692642550]": { + "$type": "EditorLockComponent", + "Id": 12334620273692642550 + }, + "Component_[14389735759337977675]": { + "$type": "EditorPendingCompositionComponent", + "Id": 14389735759337977675 + }, + "Component_[16184381538555246534]": { + "$type": "AZ::Render::EditorMeshComponent", + "Id": 16184381538555246534, + "Controller": { + "Configuration": { + "ModelAsset": { + "assetId": { + "guid": "{E14975EF-E676-51A4-B826-3EF59CB645AA}", + "subId": 285127096 + }, + "assetHint": "testdata/objects/cube/cube.azmodel" + } + } + } + }, + "Component_[17962478023087084794]": { + "$type": "SelectionComponent", + "Id": 17962478023087084794 + }, + "Component_[18071675051915092508]": { + "$type": "EditorEntityIconComponent", + "Id": 18071675051915092508 + }, + "Component_[2115498007879087044]": { + "$type": "EditorInspectorComponent", + "Id": 2115498007879087044, + "ComponentOrderEntryArray": [ + { + "ComponentId": 399415038452606756 + }, + { + "ComponentId": 16184381538555246534, + "SortIndex": 1 + }, + { + "ComponentId": 7827190074535394331, + "SortIndex": 2 + } + ] + }, + "Component_[3518973002096080237]": { + "$type": "EditorOnlyEntityComponent", + "Id": 3518973002096080237 + }, + "Component_[399415038452606756]": { + "$type": "{27F1E1A1-8D9D-4C3B-BD3A-AFB9762449C0} TransformComponent", + "Id": 399415038452606756, + "Parent Entity": "ContainerEntity", + "Transform Data": { + "Translate": [ + -42.53056335449219, + -0.00018183141946792603, + 24.533506393432617 + ] + } + }, + "Component_[4564240319609068082]": { + "$type": "EditorEntitySortComponent", + "Id": 4564240319609068082 + }, + "Component_[7827190074535394331]": { + "$type": "EditorMaterialComponent", + "Id": 7827190074535394331, + "Controller": { + "Configuration": { + "materials": [ + { + "Key": { + "materialSlotStableId": 2418540911 + }, + "Value": { + "MaterialAsset": { + "assetId": { + "guid": "{80E0F2A7-1EE4-597F-80EF-985C65BCE2EB}" + }, + "assetHint": "materials/presets/pbr/metal_brass.azmaterial" + } + } + } + ] + } + } + }, + "Component_[8092226976542590265]": { + "$type": "EditorDisabledCompositionComponent", + "Id": 8092226976542590265 + } + } + }, + "Entity_[1668911589332]": { + "Id": "Entity_[1668911589332]", + "Name": "Entity1", + "Components": { + "Component_[11525365929370623807]": { + "$type": "EditorVisibilityComponent", + "Id": 11525365929370623807 + }, + "Component_[12334620273692642550]": { + "$type": "EditorLockComponent", + "Id": 12334620273692642550 + }, + "Component_[14389735759337977675]": { + "$type": "EditorPendingCompositionComponent", + "Id": 14389735759337977675 + }, + "Component_[16184381538555246534]": { + "$type": "AZ::Render::EditorMeshComponent", + "Id": 16184381538555246534, + "Controller": { + "Configuration": { + "ModelAsset": { + "assetId": { + "guid": "{E14975EF-E676-51A4-B826-3EF59CB645AA}", + "subId": 285127096 + }, + "assetHint": "testdata/objects/cube/cube.azmodel" + } + } + } + }, + "Component_[17962478023087084794]": { + "$type": "SelectionComponent", + "Id": 17962478023087084794 + }, + "Component_[18071675051915092508]": { + "$type": "EditorEntityIconComponent", + "Id": 18071675051915092508 + }, + "Component_[2115498007879087044]": { + "$type": "EditorInspectorComponent", + "Id": 2115498007879087044, + "ComponentOrderEntryArray": [ + { + "ComponentId": 399415038452606756 + }, + { + "ComponentId": 16184381538555246534, + "SortIndex": 1 + }, + { + "ComponentId": 7827190074535394331, + "SortIndex": 2 + } + ] + }, + "Component_[3518973002096080237]": { + "$type": "EditorOnlyEntityComponent", + "Id": 3518973002096080237 + }, + "Component_[399415038452606756]": { + "$type": "{27F1E1A1-8D9D-4C3B-BD3A-AFB9762449C0} TransformComponent", + "Id": 399415038452606756, + "Parent Entity": "ContainerEntity", + "Transform Data": { + "Translate": [ + 22.53014373779297, + -0.00018183141946792603, + 24.533506393432617 + ] + } + }, + "Component_[4564240319609068082]": { + "$type": "EditorEntitySortComponent", + "Id": 4564240319609068082 + }, + "Component_[7827190074535394331]": { + "$type": "EditorMaterialComponent", + "Id": 7827190074535394331, + "Controller": { + "Configuration": { + "materials": [ + { + "Key": { + "materialSlotStableId": 2418540911 + }, + "Value": { + "MaterialAsset": { + "assetId": { + "guid": "{80E0F2A7-1EE4-597F-80EF-985C65BCE2EB}" + }, + "assetHint": "materials/presets/pbr/metal_brass.azmaterial" + } + } + } + ] + } + } + }, + "Component_[8092226976542590265]": { + "$type": "EditorDisabledCompositionComponent", + "Id": 8092226976542590265 + } + } + }, + "Entity_[1673206556628]": { + "Id": "Entity_[1673206556628]", + "Name": "Entity1", + "Components": { + "Component_[11525365929370623807]": { + "$type": "EditorVisibilityComponent", + "Id": 11525365929370623807 + }, + "Component_[12334620273692642550]": { + "$type": "EditorLockComponent", + "Id": 12334620273692642550 + }, + "Component_[14389735759337977675]": { + "$type": "EditorPendingCompositionComponent", + "Id": 14389735759337977675 + }, + "Component_[16184381538555246534]": { + "$type": "AZ::Render::EditorMeshComponent", + "Id": 16184381538555246534, + "Controller": { + "Configuration": { + "ModelAsset": { + "assetId": { + "guid": "{E14975EF-E676-51A4-B826-3EF59CB645AA}", + "subId": 285127096 + }, + "assetHint": "testdata/objects/cube/cube.azmodel" + } + } + } + }, + "Component_[17962478023087084794]": { + "$type": "SelectionComponent", + "Id": 17962478023087084794 + }, + "Component_[18071675051915092508]": { + "$type": "EditorEntityIconComponent", + "Id": 18071675051915092508 + }, + "Component_[2115498007879087044]": { + "$type": "EditorInspectorComponent", + "Id": 2115498007879087044, + "ComponentOrderEntryArray": [ + { + "ComponentId": 399415038452606756 + }, + { + "ComponentId": 16184381538555246534, + "SortIndex": 1 + }, + { + "ComponentId": 7827190074535394331, + "SortIndex": 2 + } + ] + }, + "Component_[3518973002096080237]": { + "$type": "EditorOnlyEntityComponent", + "Id": 3518973002096080237 + }, + "Component_[399415038452606756]": { + "$type": "{27F1E1A1-8D9D-4C3B-BD3A-AFB9762449C0} TransformComponent", + "Id": 399415038452606756, + "Parent Entity": "ContainerEntity", + "Transform Data": { + "Translate": [ + -12.530563354492188, + -0.00018183141946792603, + 99.43339538574219 + ] + } + }, + "Component_[4564240319609068082]": { + "$type": "EditorEntitySortComponent", + "Id": 4564240319609068082 + }, + "Component_[7827190074535394331]": { + "$type": "EditorMaterialComponent", + "Id": 7827190074535394331, + "Controller": { + "Configuration": { + "materials": [ + { + "Key": { + "materialSlotStableId": 2418540911 + }, + "Value": { + "MaterialAsset": { + "assetId": { + "guid": "{F2AD0EBF-7137-58D1-9991-9552FAD41B19}" + }, + "assetHint": "materials/presets/pbr/metal_mercury.azmaterial" + } + } + } + ] + } + } + }, + "Component_[8092226976542590265]": { + "$type": "EditorDisabledCompositionComponent", + "Id": 8092226976542590265 + } + } + }, + "Entity_[1677501523924]": { + "Id": "Entity_[1677501523924]", + "Name": "Entity1", + "Components": { + "Component_[1057179753323467068]": { + "$type": "EditorMaterialComponent", + "Id": 1057179753323467068, + "Controller": { + "Configuration": { + "materials": [ + { + "Key": { + "materialSlotStableId": 2418540911 + }, + "Value": { + "MaterialAsset": { + "assetId": { + "guid": "{3F0DF0C4-5F23-5EB1-B762-7344AFFDC011}" + }, + "assetHint": "materials/presets/pbr/metal_titanium_polished.azmaterial" + } + } + } + ] + } + } + }, + "Component_[11525365929370623807]": { + "$type": "EditorVisibilityComponent", + "Id": 11525365929370623807 + }, + "Component_[12334620273692642550]": { + "$type": "EditorLockComponent", + "Id": 12334620273692642550 + }, + "Component_[14389735759337977675]": { + "$type": "EditorPendingCompositionComponent", + "Id": 14389735759337977675 + }, + "Component_[16184381538555246534]": { + "$type": "AZ::Render::EditorMeshComponent", + "Id": 16184381538555246534, + "Controller": { + "Configuration": { + "ModelAsset": { + "assetId": { + "guid": "{E14975EF-E676-51A4-B826-3EF59CB645AA}", + "subId": 285127096 + }, + "assetHint": "testdata/objects/cube/cube.azmodel" + } + } + } + }, + "Component_[17962478023087084794]": { + "$type": "SelectionComponent", + "Id": 17962478023087084794 + }, + "Component_[18071675051915092508]": { + "$type": "EditorEntityIconComponent", + "Id": 18071675051915092508 + }, + "Component_[2115498007879087044]": { + "$type": "EditorInspectorComponent", + "Id": 2115498007879087044, + "ComponentOrderEntryArray": [ + { + "ComponentId": 399415038452606756 + }, + { + "ComponentId": 16184381538555246534, + "SortIndex": 1 + }, + { + "ComponentId": 1057179753323467068, + "SortIndex": 2 + } + ] + }, + "Component_[3518973002096080237]": { + "$type": "EditorOnlyEntityComponent", + "Id": 3518973002096080237 + }, + "Component_[399415038452606756]": { + "$type": "{27F1E1A1-8D9D-4C3B-BD3A-AFB9762449C0} TransformComponent", + "Id": 399415038452606756, + "Parent Entity": "ContainerEntity", + "Transform Data": { + "Translate": [ + 12.530143737792969, + -0.00018183141946792603, + 105.0152359008789 + ] + } + }, + "Component_[4564240319609068082]": { + "$type": "EditorEntitySortComponent", + "Id": 4564240319609068082 + }, + "Component_[8092226976542590265]": { + "$type": "EditorDisabledCompositionComponent", + "Id": 8092226976542590265 + } + } + }, + "Entity_[1681796491220]": { + "Id": "Entity_[1681796491220]", + "Name": "Entity1", + "Components": { + "Component_[11525365929370623807]": { + "$type": "EditorVisibilityComponent", + "Id": 11525365929370623807 + }, + "Component_[12334620273692642550]": { + "$type": "EditorLockComponent", + "Id": 12334620273692642550 + }, + "Component_[14389735759337977675]": { + "$type": "EditorPendingCompositionComponent", + "Id": 14389735759337977675 + }, + "Component_[16184381538555246534]": { + "$type": "AZ::Render::EditorMeshComponent", + "Id": 16184381538555246534, + "Controller": { + "Configuration": { + "ModelAsset": { + "assetId": { + "guid": "{E14975EF-E676-51A4-B826-3EF59CB645AA}", + "subId": 285127096 + }, + "assetHint": "testdata/objects/cube/cube.azmodel" + } + } + } + }, + "Component_[17962478023087084794]": { + "$type": "SelectionComponent", + "Id": 17962478023087084794 + }, + "Component_[18071675051915092508]": { + "$type": "EditorEntityIconComponent", + "Id": 18071675051915092508 + }, + "Component_[2115498007879087044]": { + "$type": "EditorInspectorComponent", + "Id": 2115498007879087044, + "ComponentOrderEntryArray": [ + { + "ComponentId": 399415038452606756 + }, + { + "ComponentId": 16184381538555246534, + "SortIndex": 1 + }, + { + "ComponentId": 7827190074535394331, + "SortIndex": 2 + } + ] + }, + "Component_[3518973002096080237]": { + "$type": "EditorOnlyEntityComponent", + "Id": 3518973002096080237 + }, + "Component_[399415038452606756]": { + "$type": "{27F1E1A1-8D9D-4C3B-BD3A-AFB9762449C0} TransformComponent", + "Id": 399415038452606756, + "Parent Entity": "ContainerEntity", + "Transform Data": { + "Translate": [ + -47.53056335449219, + -0.00018183141946792603, + 15.057670593261719 + ] + } + }, + "Component_[4564240319609068082]": { + "$type": "EditorEntitySortComponent", + "Id": 4564240319609068082 + }, + "Component_[7827190074535394331]": { + "$type": "EditorMaterialComponent", + "Id": 7827190074535394331, + "Controller": { + "Configuration": { + "materials": [ + { + "Key": { + "materialSlotStableId": 2418540911 + }, + "Value": { + "MaterialAsset": { + "assetId": { + "guid": "{64C1F6A6-6BDA-551A-BE56-1829E5913278}" + }, + "assetHint": "materials/presets/pbr/metal_aluminum_polished.azmaterial" + } + } + } + ] + } + } + }, + "Component_[8092226976542590265]": { + "$type": "EditorDisabledCompositionComponent", + "Id": 8092226976542590265 + } + } + }, + "Entity_[1686091458516]": { + "Id": "Entity_[1686091458516]", + "Name": "Entity1", + "Components": { + "Component_[11525365929370623807]": { + "$type": "EditorVisibilityComponent", + "Id": 11525365929370623807 + }, + "Component_[12334620273692642550]": { + "$type": "EditorLockComponent", + "Id": 12334620273692642550 + }, + "Component_[14389735759337977675]": { + "$type": "EditorPendingCompositionComponent", + "Id": 14389735759337977675 + }, + "Component_[16184381538555246534]": { + "$type": "AZ::Render::EditorMeshComponent", + "Id": 16184381538555246534, + "Controller": { + "Configuration": { + "ModelAsset": { + "assetId": { + "guid": "{E14975EF-E676-51A4-B826-3EF59CB645AA}", + "subId": 285127096 + }, + "assetHint": "testdata/objects/cube/cube.azmodel" + } + } + } + }, + "Component_[17962478023087084794]": { + "$type": "SelectionComponent", + "Id": 17962478023087084794 + }, + "Component_[18071675051915092508]": { + "$type": "EditorEntityIconComponent", + "Id": 18071675051915092508 + }, + "Component_[2115498007879087044]": { + "$type": "EditorInspectorComponent", + "Id": 2115498007879087044, + "ComponentOrderEntryArray": [ + { + "ComponentId": 399415038452606756 + }, + { + "ComponentId": 16184381538555246534, + "SortIndex": 1 + }, + { + "ComponentId": 7827190074535394331, + "SortIndex": 2 + } + ] + }, + "Component_[3518973002096080237]": { + "$type": "EditorOnlyEntityComponent", + "Id": 3518973002096080237 + }, + "Component_[399415038452606756]": { + "$type": "{27F1E1A1-8D9D-4C3B-BD3A-AFB9762449C0} TransformComponent", + "Id": 399415038452606756, + "Parent Entity": "ContainerEntity", + "Transform Data": { + "Translate": [ + 7.530143737792969, + -0.00018183141946792603, + 0.0 + ] + } + }, + "Component_[4564240319609068082]": { + "$type": "EditorEntitySortComponent", + "Id": 4564240319609068082 + }, + "Component_[7827190074535394331]": { + "$type": "EditorMaterialComponent", + "Id": 7827190074535394331, + "Controller": { + "Configuration": { + "materials": [ + { + "Key": { + "materialSlotStableId": 2418540911 + }, + "Value": { + "MaterialAsset": { + "assetId": { + "guid": "{2AC06FA3-7670-542E-8996-DF346AFF1B61}" + }, + "assetHint": "materials/presets/pbr/metal_silver_polished.azmaterial" + } + } + } + ] + } + } + }, + "Component_[8092226976542590265]": { + "$type": "EditorDisabledCompositionComponent", + "Id": 8092226976542590265 + } + } + }, + "Entity_[1690386425812]": { + "Id": "Entity_[1690386425812]", + "Name": "Entity1", + "Components": { + "Component_[11525365929370623807]": { + "$type": "EditorVisibilityComponent", + "Id": 11525365929370623807 + }, + "Component_[12334620273692642550]": { + "$type": "EditorLockComponent", + "Id": 12334620273692642550 + }, + "Component_[14389735759337977675]": { + "$type": "EditorPendingCompositionComponent", + "Id": 14389735759337977675 + }, + "Component_[16184381538555246534]": { + "$type": "AZ::Render::EditorMeshComponent", + "Id": 16184381538555246534, + "Controller": { + "Configuration": { + "ModelAsset": { + "assetId": { + "guid": "{E14975EF-E676-51A4-B826-3EF59CB645AA}", + "subId": 285127096 + }, + "assetHint": "testdata/objects/cube/cube.azmodel" + } + } + } + }, + "Component_[17962478023087084794]": { + "$type": "SelectionComponent", + "Id": 17962478023087084794 + }, + "Component_[18071675051915092508]": { + "$type": "EditorEntityIconComponent", + "Id": 18071675051915092508 + }, + "Component_[2115498007879087044]": { + "$type": "EditorInspectorComponent", + "Id": 2115498007879087044, + "ComponentOrderEntryArray": [ + { + "ComponentId": 399415038452606756 + }, + { + "ComponentId": 16184381538555246534, + "SortIndex": 1 + }, + { + "ComponentId": 7827190074535394331, + "SortIndex": 2 + } + ] + }, + "Component_[3518973002096080237]": { + "$type": "EditorOnlyEntityComponent", + "Id": 3518973002096080237 + }, + "Component_[399415038452606756]": { + "$type": "{27F1E1A1-8D9D-4C3B-BD3A-AFB9762449C0} TransformComponent", + "Id": 399415038452606756, + "Parent Entity": "ContainerEntity", + "Transform Data": { + "Translate": [ + 2.5301437377929688, + -0.00018183141946792603, + 84.40655517578125 + ] + } + }, + "Component_[4564240319609068082]": { + "$type": "EditorEntitySortComponent", + "Id": 4564240319609068082 + }, + "Component_[7827190074535394331]": { + "$type": "EditorMaterialComponent", + "Id": 7827190074535394331, + "Controller": { + "Configuration": { + "materials": [ + { + "Key": { + "materialSlotStableId": 2418540911 + }, + "Value": { + "MaterialAsset": { + "assetId": { + "guid": "{E23FC75B-4142-55F1-B9AE-884826E7EB23}" + }, + "assetHint": "materials/presets/pbr/metal_platinum.azmaterial" + } + } + } + ] + } + } + }, + "Component_[8092226976542590265]": { + "$type": "EditorDisabledCompositionComponent", + "Id": 8092226976542590265 + } + } + }, + "Entity_[1694681393108]": { + "Id": "Entity_[1694681393108]", + "Name": "Entity1", + "Components": { + "Component_[11525365929370623807]": { + "$type": "EditorVisibilityComponent", + "Id": 11525365929370623807 + }, + "Component_[12334620273692642550]": { + "$type": "EditorLockComponent", + "Id": 12334620273692642550 + }, + "Component_[14389735759337977675]": { + "$type": "EditorPendingCompositionComponent", + "Id": 14389735759337977675 + }, + "Component_[16184381538555246534]": { + "$type": "AZ::Render::EditorMeshComponent", + "Id": 16184381538555246534, + "Controller": { + "Configuration": { + "ModelAsset": { + "assetId": { + "guid": "{E14975EF-E676-51A4-B826-3EF59CB645AA}", + "subId": 285127096 + }, + "assetHint": "testdata/objects/cube/cube.azmodel" + } + } + } + }, + "Component_[17962478023087084794]": { + "$type": "SelectionComponent", + "Id": 17962478023087084794 + }, + "Component_[18071675051915092508]": { + "$type": "EditorEntityIconComponent", + "Id": 18071675051915092508 + }, + "Component_[2115498007879087044]": { + "$type": "EditorInspectorComponent", + "Id": 2115498007879087044, + "ComponentOrderEntryArray": [ + { + "ComponentId": 399415038452606756 + }, + { + "ComponentId": 16184381538555246534, + "SortIndex": 1 + }, + { + "ComponentId": 7827190074535394331, + "SortIndex": 2 + } + ] + }, + "Component_[3518973002096080237]": { + "$type": "EditorOnlyEntityComponent", + "Id": 3518973002096080237 + }, + "Component_[399415038452606756]": { + "$type": "{27F1E1A1-8D9D-4C3B-BD3A-AFB9762449C0} TransformComponent", + "Id": 399415038452606756, + "Parent Entity": "ContainerEntity", + "Transform Data": { + "Translate": [ + -2.5305633544921875, + -0.00018183141946792603, + 39.56034851074219 + ] + } + }, + "Component_[4564240319609068082]": { + "$type": "EditorEntitySortComponent", + "Id": 4564240319609068082 + }, + "Component_[7827190074535394331]": { + "$type": "EditorMaterialComponent", + "Id": 7827190074535394331, + "Controller": { + "Configuration": { + "materials": [ + { + "Key": { + "materialSlotStableId": 2418540911 + }, + "Value": { + "MaterialAsset": { + "assetId": { + "guid": "{DC0598ED-1EDD-5B37-892E-E0867621D74C}" + }, + "assetHint": "materials/presets/pbr/metal_palladium.azmaterial" + } + } + } + ] + } + } + }, + "Component_[8092226976542590265]": { + "$type": "EditorDisabledCompositionComponent", + "Id": 8092226976542590265 + } + } + }, + "Entity_[1698976360404]": { + "Id": "Entity_[1698976360404]", + "Name": "Entity1", + "Components": { + "Component_[11525365929370623807]": { + "$type": "EditorVisibilityComponent", + "Id": 11525365929370623807 + }, + "Component_[12334620273692642550]": { + "$type": "EditorLockComponent", + "Id": 12334620273692642550 + }, + "Component_[14389735759337977675]": { + "$type": "EditorPendingCompositionComponent", + "Id": 14389735759337977675 + }, + "Component_[16184381538555246534]": { + "$type": "AZ::Render::EditorMeshComponent", + "Id": 16184381538555246534, + "Controller": { + "Configuration": { + "ModelAsset": { + "assetId": { + "guid": "{E14975EF-E676-51A4-B826-3EF59CB645AA}", + "subId": 285127096 + }, + "assetHint": "testdata/objects/cube/cube.azmodel" + } + } + } + }, + "Component_[17962478023087084794]": { + "$type": "SelectionComponent", + "Id": 17962478023087084794 + }, + "Component_[18071675051915092508]": { + "$type": "EditorEntityIconComponent", + "Id": 18071675051915092508 + }, + "Component_[2115498007879087044]": { + "$type": "EditorInspectorComponent", + "Id": 2115498007879087044, + "ComponentOrderEntryArray": [ + { + "ComponentId": 399415038452606756 + }, + { + "ComponentId": 16184381538555246534, + "SortIndex": 1 + }, + { + "ComponentId": 7827190074535394331, + "SortIndex": 2 + } + ] + }, + "Component_[3518973002096080237]": { + "$type": "EditorOnlyEntityComponent", + "Id": 3518973002096080237 + }, + "Component_[399415038452606756]": { + "$type": "{27F1E1A1-8D9D-4C3B-BD3A-AFB9762449C0} TransformComponent", + "Id": 399415038452606756, + "Parent Entity": "ContainerEntity", + "Transform Data": { + "Translate": [ + -17.530563354492188, + -0.00018183141946792603, + 49.593753814697266 + ] + } + }, + "Component_[4564240319609068082]": { + "$type": "EditorEntitySortComponent", + "Id": 4564240319609068082 + }, + "Component_[7827190074535394331]": { + "$type": "EditorMaterialComponent", + "Id": 7827190074535394331, + "Controller": { + "Configuration": { + "materials": [ + { + "Key": { + "materialSlotStableId": 2418540911 + }, + "Value": { + "MaterialAsset": { + "assetId": { + "guid": "{970148AC-7258-5EC8-9CE7-F4EF93164D93}" + }, + "assetHint": "materials/presets/pbr/metal_iron_matte.azmaterial" + } + } + } + ] + } + } + }, + "Component_[8092226976542590265]": { + "$type": "EditorDisabledCompositionComponent", + "Id": 8092226976542590265 + } + } + }, + "Entity_[1703271327700]": { + "Id": "Entity_[1703271327700]", + "Name": "Entity1", + "Components": { + "Component_[11525365929370623807]": { + "$type": "EditorVisibilityComponent", + "Id": 11525365929370623807 + }, + "Component_[12334620273692642550]": { + "$type": "EditorLockComponent", + "Id": 12334620273692642550 + }, + "Component_[14389735759337977675]": { + "$type": "EditorPendingCompositionComponent", + "Id": 14389735759337977675 + }, + "Component_[16184381538555246534]": { + "$type": "AZ::Render::EditorMeshComponent", + "Id": 16184381538555246534, + "Controller": { + "Configuration": { + "ModelAsset": { + "assetId": { + "guid": "{E14975EF-E676-51A4-B826-3EF59CB645AA}", + "subId": 285127096 + }, + "assetHint": "testdata/objects/cube/cube.azmodel" + } + } + } + }, + "Component_[17962478023087084794]": { + "$type": "SelectionComponent", + "Id": 17962478023087084794 + }, + "Component_[18071675051915092508]": { + "$type": "EditorEntityIconComponent", + "Id": 18071675051915092508 + }, + "Component_[2115498007879087044]": { + "$type": "EditorInspectorComponent", + "Id": 2115498007879087044, + "ComponentOrderEntryArray": [ + { + "ComponentId": 399415038452606756 + }, + { + "ComponentId": 16184381538555246534, + "SortIndex": 1 + }, + { + "ComponentId": 7827190074535394331, + "SortIndex": 2 + } + ] + }, + "Component_[3518973002096080237]": { + "$type": "EditorOnlyEntityComponent", + "Id": 3518973002096080237 + }, + "Component_[399415038452606756]": { + "$type": "{27F1E1A1-8D9D-4C3B-BD3A-AFB9762449C0} TransformComponent", + "Id": 399415038452606756, + "Parent Entity": "ContainerEntity", + "Transform Data": { + "Translate": [ + 47.53014373779297, + -0.00018183141946792603, + 105.0152359008789 + ] + } + }, + "Component_[4564240319609068082]": { + "$type": "EditorEntitySortComponent", + "Id": 4564240319609068082 + }, + "Component_[7827190074535394331]": { + "$type": "EditorMaterialComponent", + "Id": 7827190074535394331, + "Controller": { + "Configuration": { + "materials": [ + { + "Key": { + "materialSlotStableId": 2418540911 + }, + "Value": { + "MaterialAsset": { + "assetId": { + "guid": "{A7F03135-ECAD-5440-99DB-E84ABA3D50DA}" + }, + "assetHint": "materials/presets/pbr/metal_iron_polished.azmaterial" + } + } + } + ] + } + } + }, + "Component_[8092226976542590265]": { + "$type": "EditorDisabledCompositionComponent", + "Id": 8092226976542590265 + } + } + }, + "Entity_[1707566294996]": { + "Id": "Entity_[1707566294996]", + "Name": "Entity1", + "Components": { + "Component_[11525365929370623807]": { + "$type": "EditorVisibilityComponent", + "Id": 11525365929370623807 + }, + "Component_[12334620273692642550]": { + "$type": "EditorLockComponent", + "Id": 12334620273692642550 + }, + "Component_[14389735759337977675]": { + "$type": "EditorPendingCompositionComponent", + "Id": 14389735759337977675 + }, + "Component_[16184381538555246534]": { + "$type": "AZ::Render::EditorMeshComponent", + "Id": 16184381538555246534, + "Controller": { + "Configuration": { + "ModelAsset": { + "assetId": { + "guid": "{E14975EF-E676-51A4-B826-3EF59CB645AA}", + "subId": 285127096 + }, + "assetHint": "testdata/objects/cube/cube.azmodel" + } + } + } + }, + "Component_[17962478023087084794]": { + "$type": "SelectionComponent", + "Id": 17962478023087084794 + }, + "Component_[18071675051915092508]": { + "$type": "EditorEntityIconComponent", + "Id": 18071675051915092508 + }, + "Component_[2115498007879087044]": { + "$type": "EditorInspectorComponent", + "Id": 2115498007879087044, + "ComponentOrderEntryArray": [ + { + "ComponentId": 399415038452606756 + }, + { + "ComponentId": 16184381538555246534, + "SortIndex": 1 + }, + { + "ComponentId": 7827190074535394331, + "SortIndex": 2 + } + ] + }, + "Component_[3518973002096080237]": { + "$type": "EditorOnlyEntityComponent", + "Id": 3518973002096080237 + }, + "Component_[399415038452606756]": { + "$type": "{27F1E1A1-8D9D-4C3B-BD3A-AFB9762449C0} TransformComponent", + "Id": 399415038452606756, + "Parent Entity": "ContainerEntity", + "Transform Data": { + "Translate": [ + 37.53014373779297, + 0.010651908814907074, + 54.6579704284668 + ] + } + }, + "Component_[4564240319609068082]": { + "$type": "EditorEntitySortComponent", + "Id": 4564240319609068082 + }, + "Component_[7827190074535394331]": { + "$type": "EditorMaterialComponent", + "Id": 7827190074535394331, + "Controller": { + "Configuration": { + "materials": [ + { + "Key": { + "materialSlotStableId": 2418540911 + }, + "Value": { + "MaterialAsset": { + "assetId": { + "guid": "{E621C5BF-B8E1-55F0-A791-EC960F2FA46F}" + }, + "assetHint": "materials/presets/pbr/metal_copper.azmaterial" + } + } + } + ] + } + } + }, + "Component_[8092226976542590265]": { + "$type": "EditorDisabledCompositionComponent", + "Id": 8092226976542590265 + } + } + }, + "Entity_[1711861262292]": { + "Id": "Entity_[1711861262292]", + "Name": "Entity1", + "Components": { + "Component_[11525365929370623807]": { + "$type": "EditorVisibilityComponent", + "Id": 11525365929370623807 + }, + "Component_[12334620273692642550]": { + "$type": "EditorLockComponent", + "Id": 12334620273692642550 + }, + "Component_[14389735759337977675]": { + "$type": "EditorPendingCompositionComponent", + "Id": 14389735759337977675 + }, + "Component_[16184381538555246534]": { + "$type": "AZ::Render::EditorMeshComponent", + "Id": 16184381538555246534, + "Controller": { + "Configuration": { + "ModelAsset": { + "assetId": { + "guid": "{E14975EF-E676-51A4-B826-3EF59CB645AA}", + "subId": 285127096 + }, + "assetHint": "testdata/objects/cube/cube.azmodel" + } + } + } + }, + "Component_[17962478023087084794]": { + "$type": "SelectionComponent", + "Id": 17962478023087084794 + }, + "Component_[18071675051915092508]": { + "$type": "EditorEntityIconComponent", + "Id": 18071675051915092508 + }, + "Component_[2115498007879087044]": { + "$type": "EditorInspectorComponent", + "Id": 2115498007879087044, + "ComponentOrderEntryArray": [ + { + "ComponentId": 399415038452606756 + }, + { + "ComponentId": 16184381538555246534, + "SortIndex": 1 + }, + { + "ComponentId": 7827190074535394331, + "SortIndex": 2 + } + ] + }, + "Component_[3518973002096080237]": { + "$type": "EditorOnlyEntityComponent", + "Id": 3518973002096080237 + }, + "Component_[399415038452606756]": { + "$type": "{27F1E1A1-8D9D-4C3B-BD3A-AFB9762449C0} TransformComponent", + "Id": 399415038452606756, + "Parent Entity": "ContainerEntity", + "Transform Data": { + "Translate": [ + -32.53056335449219, + -0.00018183141946792603, + 89.95755767822266 + ] + } + }, + "Component_[4564240319609068082]": { + "$type": "EditorEntitySortComponent", + "Id": 4564240319609068082 + }, + "Component_[7827190074535394331]": { + "$type": "EditorMaterialComponent", + "Id": 7827190074535394331, + "Controller": { + "Configuration": { + "materials": [ + { + "Key": { + "materialSlotStableId": 2418540911 + }, + "Value": { + "MaterialAsset": { + "assetId": { + "guid": "{93DF55AE-8D1B-5AD1-A609-05F1BD9F6EA0}" + }, + "assetHint": "materials/presets/pbr/metal_cobalt_polished.azmaterial" + } + } + } + ] + } + } + }, + "Component_[8092226976542590265]": { + "$type": "EditorDisabledCompositionComponent", + "Id": 8092226976542590265 + } + } + }, + "Entity_[1716156229588]": { + "Id": "Entity_[1716156229588]", + "Name": "Entity1", + "Components": { + "Component_[11525365929370623807]": { + "$type": "EditorVisibilityComponent", + "Id": 11525365929370623807 + }, + "Component_[12334620273692642550]": { + "$type": "EditorLockComponent", + "Id": 12334620273692642550 + }, + "Component_[14389735759337977675]": { + "$type": "EditorPendingCompositionComponent", + "Id": 14389735759337977675 + }, + "Component_[16184381538555246534]": { + "$type": "AZ::Render::EditorMeshComponent", + "Id": 16184381538555246534, + "Controller": { + "Configuration": { + "ModelAsset": { + "assetId": { + "guid": "{E14975EF-E676-51A4-B826-3EF59CB645AA}", + "subId": 285127096 + }, + "assetHint": "testdata/objects/cube/cube.azmodel" + } + } + } + }, + "Component_[17962478023087084794]": { + "$type": "SelectionComponent", + "Id": 17962478023087084794 + }, + "Component_[18071675051915092508]": { + "$type": "EditorEntityIconComponent", + "Id": 18071675051915092508 + }, + "Component_[2115498007879087044]": { + "$type": "EditorInspectorComponent", + "Id": 2115498007879087044, + "ComponentOrderEntryArray": [ + { + "ComponentId": 399415038452606756 + }, + { + "ComponentId": 16184381538555246534, + "SortIndex": 1 + }, + { + "ComponentId": 7827190074535394331, + "SortIndex": 2 + } + ] + }, + "Component_[3518973002096080237]": { + "$type": "EditorOnlyEntityComponent", + "Id": 3518973002096080237 + }, + "Component_[399415038452606756]": { + "$type": "{27F1E1A1-8D9D-4C3B-BD3A-AFB9762449C0} TransformComponent", + "Id": 399415038452606756, + "Parent Entity": "ContainerEntity", + "Transform Data": { + "Translate": [ + 2.5301437377929688, + -0.00018183141946792603, + 54.618019104003906 + ] + } + }, + "Component_[4564240319609068082]": { + "$type": "EditorEntitySortComponent", + "Id": 4564240319609068082 + }, + "Component_[7827190074535394331]": { + "$type": "EditorMaterialComponent", + "Id": 7827190074535394331, + "Controller": { + "Configuration": { + "materials": [ + { + "Key": { + "materialSlotStableId": 2418540911 + }, + "Value": { + "MaterialAsset": { + "assetId": { + "guid": "{E23FC75B-4142-55F1-B9AE-884826E7EB23}" + }, + "assetHint": "materials/presets/pbr/metal_platinum.azmaterial" + } + } + } + ] + } + } + }, + "Component_[8092226976542590265]": { + "$type": "EditorDisabledCompositionComponent", + "Id": 8092226976542590265 + } + } + }, + "Entity_[1720451196884]": { + "Id": "Entity_[1720451196884]", + "Name": "Entity1", + "Components": { + "Component_[11525365929370623807]": { + "$type": "EditorVisibilityComponent", + "Id": 11525365929370623807 + }, + "Component_[12334620273692642550]": { + "$type": "EditorLockComponent", + "Id": 12334620273692642550 + }, + "Component_[14389735759337977675]": { + "$type": "EditorPendingCompositionComponent", + "Id": 14389735759337977675 + }, + "Component_[16184381538555246534]": { + "$type": "AZ::Render::EditorMeshComponent", + "Id": 16184381538555246534, + "Controller": { + "Configuration": { + "ModelAsset": { + "assetId": { + "guid": "{E14975EF-E676-51A4-B826-3EF59CB645AA}", + "subId": 285127096 + }, + "assetHint": "testdata/objects/cube/cube.azmodel" + } + } + } + }, + "Component_[17962478023087084794]": { + "$type": "SelectionComponent", + "Id": 17962478023087084794 + }, + "Component_[18071675051915092508]": { + "$type": "EditorEntityIconComponent", + "Id": 18071675051915092508 + }, + "Component_[2115498007879087044]": { + "$type": "EditorInspectorComponent", + "Id": 2115498007879087044, + "ComponentOrderEntryArray": [ + { + "ComponentId": 399415038452606756 + }, + { + "ComponentId": 16184381538555246534, + "SortIndex": 1 + }, + { + "ComponentId": 7827190074535394331, + "SortIndex": 2 + } + ] + }, + "Component_[3518973002096080237]": { + "$type": "EditorOnlyEntityComponent", + "Id": 3518973002096080237 + }, + "Component_[399415038452606756]": { + "$type": "{27F1E1A1-8D9D-4C3B-BD3A-AFB9762449C0} TransformComponent", + "Id": 399415038452606756, + "Parent Entity": "ContainerEntity", + "Transform Data": { + "Translate": [ + -22.530563354492188, + -0.00018183141946792603, + 84.40655517578125 + ] + } + }, + "Component_[4564240319609068082]": { + "$type": "EditorEntitySortComponent", + "Id": 4564240319609068082 + }, + "Component_[7827190074535394331]": { + "$type": "EditorMaterialComponent", + "Id": 7827190074535394331, + "Controller": { + "Configuration": { + "materials": [ + { + "Key": { + "materialSlotStableId": 2418540911 + }, + "Value": { + "MaterialAsset": { + "assetId": { + "guid": "{FE52E7C8-064D-506A-9C26-433EB93747DE}" + }, + "assetHint": "materials/presets/pbr/metal_gold.azmaterial" + } + } + } + ] + } + } + }, + "Component_[8092226976542590265]": { + "$type": "EditorDisabledCompositionComponent", + "Id": 8092226976542590265 + } + } + }, + "Entity_[1724746164180]": { + "Id": "Entity_[1724746164180]", + "Name": "Entity1", + "Components": { + "Component_[1057179753323467068]": { + "$type": "EditorMaterialComponent", + "Id": 1057179753323467068, + "Controller": { + "Configuration": { + "materials": [ + { + "Key": { + "materialSlotStableId": 2418540911 + }, + "Value": { + "MaterialAsset": { + "assetId": { + "guid": "{721188E0-B7CC-5D06-8D5D-39AF8ABF2EF9}" + }, + "assetHint": "materials/presets/pbr/metal_titanium.azmaterial" + } + } + } + ] + } + } + }, + "Component_[11525365929370623807]": { + "$type": "EditorVisibilityComponent", + "Id": 11525365929370623807 + }, + "Component_[12334620273692642550]": { + "$type": "EditorLockComponent", + "Id": 12334620273692642550 + }, + "Component_[14389735759337977675]": { + "$type": "EditorPendingCompositionComponent", + "Id": 14389735759337977675 + }, + "Component_[16184381538555246534]": { + "$type": "AZ::Render::EditorMeshComponent", + "Id": 16184381538555246534, + "Controller": { + "Configuration": { + "ModelAsset": { + "assetId": { + "guid": "{E14975EF-E676-51A4-B826-3EF59CB645AA}", + "subId": 285127096 + }, + "assetHint": "testdata/objects/cube/cube.azmodel" + } + } + } + }, + "Component_[17962478023087084794]": { + "$type": "SelectionComponent", + "Id": 17962478023087084794 + }, + "Component_[18071675051915092508]": { + "$type": "EditorEntityIconComponent", + "Id": 18071675051915092508 + }, + "Component_[2115498007879087044]": { + "$type": "EditorInspectorComponent", + "Id": 2115498007879087044, + "ComponentOrderEntryArray": [ + { + "ComponentId": 399415038452606756 + }, + { + "ComponentId": 16184381538555246534, + "SortIndex": 1 + }, + { + "ComponentId": 1057179753323467068, + "SortIndex": 2 + } + ] + }, + "Component_[3518973002096080237]": { + "$type": "EditorOnlyEntityComponent", + "Id": 3518973002096080237 + }, + "Component_[399415038452606756]": { + "$type": "{27F1E1A1-8D9D-4C3B-BD3A-AFB9762449C0} TransformComponent", + "Id": 399415038452606756, + "Parent Entity": "ContainerEntity", + "Transform Data": { + "Translate": [ + 12.530143737792969, + -0.00018183141946792603, + 84.40655517578125 + ] + } + }, + "Component_[4564240319609068082]": { + "$type": "EditorEntitySortComponent", + "Id": 4564240319609068082 + }, + "Component_[8092226976542590265]": { + "$type": "EditorDisabledCompositionComponent", + "Id": 8092226976542590265 + } + } + }, + "Entity_[1729041131476]": { + "Id": "Entity_[1729041131476]", + "Name": "Entity1", + "Components": { + "Component_[11525365929370623807]": { + "$type": "EditorVisibilityComponent", + "Id": 11525365929370623807 + }, + "Component_[12334620273692642550]": { + "$type": "EditorLockComponent", + "Id": 12334620273692642550 + }, + "Component_[14389735759337977675]": { + "$type": "EditorPendingCompositionComponent", + "Id": 14389735759337977675 + }, + "Component_[16184381538555246534]": { + "$type": "AZ::Render::EditorMeshComponent", + "Id": 16184381538555246534, + "Controller": { + "Configuration": { + "ModelAsset": { + "assetId": { + "guid": "{E14975EF-E676-51A4-B826-3EF59CB645AA}", + "subId": 285127096 + }, + "assetHint": "testdata/objects/cube/cube.azmodel" + } + } + } + }, + "Component_[17962478023087084794]": { + "$type": "SelectionComponent", + "Id": 17962478023087084794 + }, + "Component_[18071675051915092508]": { + "$type": "EditorEntityIconComponent", + "Id": 18071675051915092508 + }, + "Component_[2115498007879087044]": { + "$type": "EditorInspectorComponent", + "Id": 2115498007879087044, + "ComponentOrderEntryArray": [ + { + "ComponentId": 399415038452606756 + }, + { + "ComponentId": 16184381538555246534, + "SortIndex": 1 + }, + { + "ComponentId": 7827190074535394331, + "SortIndex": 2 + } + ] + }, + "Component_[3518973002096080237]": { + "$type": "EditorOnlyEntityComponent", + "Id": 3518973002096080237 + }, + "Component_[399415038452606756]": { + "$type": "{27F1E1A1-8D9D-4C3B-BD3A-AFB9762449C0} TransformComponent", + "Id": 399415038452606756, + "Parent Entity": "ContainerEntity", + "Transform Data": { + "Translate": [ + 42.53014373779297, + -0.00018183141946792603, + 45.14218521118164 + ] + } + }, + "Component_[4564240319609068082]": { + "$type": "EditorEntitySortComponent", + "Id": 4564240319609068082 + }, + "Component_[7827190074535394331]": { + "$type": "EditorMaterialComponent", + "Id": 7827190074535394331, + "Controller": { + "Configuration": { + "materials": [ + { + "Key": { + "materialSlotStableId": 2418540911 + }, + "Value": { + "MaterialAsset": { + "assetId": { + "guid": "{FB4657EB-FB3A-5EC3-A772-DC36D6F733C3}" + }, + "assetHint": "materials/presets/pbr/metal_gold_polished.azmaterial" + } + } + } + ] + } + } + }, + "Component_[8092226976542590265]": { + "$type": "EditorDisabledCompositionComponent", + "Id": 8092226976542590265 + } + } + }, + "Entity_[1733336098772]": { + "Id": "Entity_[1733336098772]", + "Name": "Entity1", + "Components": { + "Component_[11525365929370623807]": { + "$type": "EditorVisibilityComponent", + "Id": 11525365929370623807 + }, + "Component_[12334620273692642550]": { + "$type": "EditorLockComponent", + "Id": 12334620273692642550 + }, + "Component_[14389735759337977675]": { + "$type": "EditorPendingCompositionComponent", + "Id": 14389735759337977675 + }, + "Component_[16184381538555246534]": { + "$type": "AZ::Render::EditorMeshComponent", + "Id": 16184381538555246534, + "Controller": { + "Configuration": { + "ModelAsset": { + "assetId": { + "guid": "{E14975EF-E676-51A4-B826-3EF59CB645AA}", + "subId": 285127096 + }, + "assetHint": "testdata/objects/cube/cube.azmodel" + } + } + } + }, + "Component_[17962478023087084794]": { + "$type": "SelectionComponent", + "Id": 17962478023087084794 + }, + "Component_[18071675051915092508]": { + "$type": "EditorEntityIconComponent", + "Id": 18071675051915092508 + }, + "Component_[2115498007879087044]": { + "$type": "EditorInspectorComponent", + "Id": 2115498007879087044, + "ComponentOrderEntryArray": [ + { + "ComponentId": 399415038452606756 + }, + { + "ComponentId": 16184381538555246534, + "SortIndex": 1 + }, + { + "ComponentId": 7827190074535394331, + "SortIndex": 2 + } + ] + }, + "Component_[3518973002096080237]": { + "$type": "EditorOnlyEntityComponent", + "Id": 3518973002096080237 + }, + "Component_[399415038452606756]": { + "$type": "{27F1E1A1-8D9D-4C3B-BD3A-AFB9762449C0} TransformComponent", + "Id": 399415038452606756, + "Parent Entity": "ContainerEntity", + "Transform Data": { + "Translate": [ + 2.5301437377929688, + -0.00018183141946792603, + 105.0152359008789 + ] + } + }, + "Component_[4564240319609068082]": { + "$type": "EditorEntitySortComponent", + "Id": 4564240319609068082 + }, + "Component_[7827190074535394331]": { + "$type": "EditorMaterialComponent", + "Id": 7827190074535394331, + "Controller": { + "Configuration": { + "materials": [ + { + "Key": { + "materialSlotStableId": 2418540911 + }, + "Value": { + "MaterialAsset": { + "assetId": { + "guid": "{79419183-FFCE-5A89-AA16-C2789D81AF75}" + }, + "assetHint": "materials/presets/pbr/metal_platinum_polished.azmaterial" + } + } + } + ] + } + } + }, + "Component_[8092226976542590265]": { + "$type": "EditorDisabledCompositionComponent", + "Id": 8092226976542590265 + } + } + }, + "Entity_[1737631066068]": { + "Id": "Entity_[1737631066068]", + "Name": "Entity1", + "Components": { + "Component_[11525365929370623807]": { + "$type": "EditorVisibilityComponent", + "Id": 11525365929370623807 + }, + "Component_[12334620273692642550]": { + "$type": "EditorLockComponent", + "Id": 12334620273692642550 + }, + "Component_[14389735759337977675]": { + "$type": "EditorPendingCompositionComponent", + "Id": 14389735759337977675 + }, + "Component_[16184381538555246534]": { + "$type": "AZ::Render::EditorMeshComponent", + "Id": 16184381538555246534, + "Controller": { + "Configuration": { + "ModelAsset": { + "assetId": { + "guid": "{E14975EF-E676-51A4-B826-3EF59CB645AA}", + "subId": 285127096 + }, + "assetHint": "testdata/objects/cube/cube.azmodel" + } + } + } + }, + "Component_[17962478023087084794]": { + "$type": "SelectionComponent", + "Id": 17962478023087084794 + }, + "Component_[18071675051915092508]": { + "$type": "EditorEntityIconComponent", + "Id": 18071675051915092508 + }, + "Component_[2115498007879087044]": { + "$type": "EditorInspectorComponent", + "Id": 2115498007879087044, + "ComponentOrderEntryArray": [ + { + "ComponentId": 399415038452606756 + }, + { + "ComponentId": 16184381538555246534, + "SortIndex": 1 + }, + { + "ComponentId": 7827190074535394331, + "SortIndex": 2 + } + ] + }, + "Component_[3518973002096080237]": { + "$type": "EditorOnlyEntityComponent", + "Id": 3518973002096080237 + }, + "Component_[399415038452606756]": { + "$type": "{27F1E1A1-8D9D-4C3B-BD3A-AFB9762449C0} TransformComponent", + "Id": 399415038452606756, + "Parent Entity": "ContainerEntity", + "Transform Data": { + "Translate": [ + 42.53014373779297, + -0.00018183141946792603, + 9.475835800170898 + ] + } + }, + "Component_[4564240319609068082]": { + "$type": "EditorEntitySortComponent", + "Id": 4564240319609068082 + }, + "Component_[7827190074535394331]": { + "$type": "EditorMaterialComponent", + "Id": 7827190074535394331, + "Controller": { + "Configuration": { + "materials": [ + { + "Key": { + "materialSlotStableId": 2418540911 + }, + "Value": { + "MaterialAsset": { + "assetId": { + "guid": "{FE52E7C8-064D-506A-9C26-433EB93747DE}" + }, + "assetHint": "materials/presets/pbr/metal_gold.azmaterial" + } + } + } + ] + } + } + }, + "Component_[8092226976542590265]": { + "$type": "EditorDisabledCompositionComponent", + "Id": 8092226976542590265 + } + } + }, + "Entity_[1741926033364]": { + "Id": "Entity_[1741926033364]", + "Name": "Entity1", + "Components": { + "Component_[11525365929370623807]": { + "$type": "EditorVisibilityComponent", + "Id": 11525365929370623807 + }, + "Component_[12334620273692642550]": { + "$type": "EditorLockComponent", + "Id": 12334620273692642550 + }, + "Component_[14389735759337977675]": { + "$type": "EditorPendingCompositionComponent", + "Id": 14389735759337977675 + }, + "Component_[16184381538555246534]": { + "$type": "AZ::Render::EditorMeshComponent", + "Id": 16184381538555246534, + "Controller": { + "Configuration": { + "ModelAsset": { + "assetId": { + "guid": "{E14975EF-E676-51A4-B826-3EF59CB645AA}", + "subId": 285127096 + }, + "assetHint": "testdata/objects/cube/cube.azmodel" + } + } + } + }, + "Component_[17962478023087084794]": { + "$type": "SelectionComponent", + "Id": 17962478023087084794 + }, + "Component_[18071675051915092508]": { + "$type": "EditorEntityIconComponent", + "Id": 18071675051915092508 + }, + "Component_[2115498007879087044]": { + "$type": "EditorInspectorComponent", + "Id": 2115498007879087044, + "ComponentOrderEntryArray": [ + { + "ComponentId": 399415038452606756 + }, + { + "ComponentId": 16184381538555246534, + "SortIndex": 1 + }, + { + "ComponentId": 7827190074535394331, + "SortIndex": 2 + } + ] + }, + "Component_[3518973002096080237]": { + "$type": "EditorOnlyEntityComponent", + "Id": 3518973002096080237 + }, + "Component_[399415038452606756]": { + "$type": "{27F1E1A1-8D9D-4C3B-BD3A-AFB9762449C0} TransformComponent", + "Id": 399415038452606756, + "Parent Entity": "ContainerEntity", + "Transform Data": { + "Translate": [ + -42.53056335449219, + -0.00018183141946792603, + 15.057670593261719 + ] + } + }, + "Component_[4564240319609068082]": { + "$type": "EditorEntitySortComponent", + "Id": 4564240319609068082 + }, + "Component_[7827190074535394331]": { + "$type": "EditorMaterialComponent", + "Id": 7827190074535394331, + "Controller": { + "Configuration": { + "materials": [ + { + "Key": { + "materialSlotStableId": 2418540911 + }, + "Value": { + "MaterialAsset": { + "assetId": { + "guid": "{FC69F2F8-F73B-5A0C-B8B7-94BAA45780FC}" + }, + "assetHint": "materials/presets/pbr/metal_brass_polished.azmaterial" + } + } + } + ] + } + } + }, + "Component_[8092226976542590265]": { + "$type": "EditorDisabledCompositionComponent", + "Id": 8092226976542590265 + } + } + }, + "Entity_[1746221000660]": { + "Id": "Entity_[1746221000660]", + "Name": "Entity1", + "Components": { + "Component_[11525365929370623807]": { + "$type": "EditorVisibilityComponent", + "Id": 11525365929370623807 + }, + "Component_[12334620273692642550]": { + "$type": "EditorLockComponent", + "Id": 12334620273692642550 + }, + "Component_[14389735759337977675]": { + "$type": "EditorPendingCompositionComponent", + "Id": 14389735759337977675 + }, + "Component_[16184381538555246534]": { + "$type": "AZ::Render::EditorMeshComponent", + "Id": 16184381538555246534, + "Controller": { + "Configuration": { + "ModelAsset": { + "assetId": { + "guid": "{E14975EF-E676-51A4-B826-3EF59CB645AA}", + "subId": 285127096 + }, + "assetHint": "testdata/objects/cube/cube.azmodel" + } + } + } + }, + "Component_[17962478023087084794]": { + "$type": "SelectionComponent", + "Id": 17962478023087084794 + }, + "Component_[18071675051915092508]": { + "$type": "EditorEntityIconComponent", + "Id": 18071675051915092508 + }, + "Component_[2115498007879087044]": { + "$type": "EditorInspectorComponent", + "Id": 2115498007879087044, + "ComponentOrderEntryArray": [ + { + "ComponentId": 399415038452606756 + }, + { + "ComponentId": 16184381538555246534, + "SortIndex": 1 + }, + { + "ComponentId": 7827190074535394331, + "SortIndex": 2 + } + ] + }, + "Component_[3518973002096080237]": { + "$type": "EditorOnlyEntityComponent", + "Id": 3518973002096080237 + }, + "Component_[399415038452606756]": { + "$type": "{27F1E1A1-8D9D-4C3B-BD3A-AFB9762449C0} TransformComponent", + "Id": 399415038452606756, + "Parent Entity": "ContainerEntity", + "Transform Data": { + "Translate": [ + -37.53056335449219, + -0.00018183141946792603, + 45.14218521118164 + ] + } + }, + "Component_[4564240319609068082]": { + "$type": "EditorEntitySortComponent", + "Id": 4564240319609068082 + }, + "Component_[7827190074535394331]": { + "$type": "EditorMaterialComponent", + "Id": 7827190074535394331, + "Controller": { + "Configuration": { + "materials": [ + { + "Key": { + "materialSlotStableId": 2418540911 + }, + "Value": { + "MaterialAsset": { + "assetId": { + "guid": "{CAF50181-3384-5DF2-9304-C6E48E83C72D}" + }, + "assetHint": "materials/presets/pbr/metal_chrome_polished.azmaterial" + } + } + } + ] + } + } + }, + "Component_[8092226976542590265]": { + "$type": "EditorDisabledCompositionComponent", + "Id": 8092226976542590265 + } + } + }, + "Entity_[1750515967956]": { + "Id": "Entity_[1750515967956]", + "Name": "Entity1", + "Components": { + "Component_[11525365929370623807]": { + "$type": "EditorVisibilityComponent", + "Id": 11525365929370623807 + }, + "Component_[12334620273692642550]": { + "$type": "EditorLockComponent", + "Id": 12334620273692642550 + }, + "Component_[14389735759337977675]": { + "$type": "EditorPendingCompositionComponent", + "Id": 14389735759337977675 + }, + "Component_[16184381538555246534]": { + "$type": "AZ::Render::EditorMeshComponent", + "Id": 16184381538555246534, + "Controller": { + "Configuration": { + "ModelAsset": { + "assetId": { + "guid": "{E14975EF-E676-51A4-B826-3EF59CB645AA}", + "subId": 285127096 + }, + "assetHint": "testdata/objects/cube/cube.azmodel" + } + } + } + }, + "Component_[17962478023087084794]": { + "$type": "SelectionComponent", + "Id": 17962478023087084794 + }, + "Component_[18071675051915092508]": { + "$type": "EditorEntityIconComponent", + "Id": 18071675051915092508 + }, + "Component_[2115498007879087044]": { + "$type": "EditorInspectorComponent", + "Id": 2115498007879087044, + "ComponentOrderEntryArray": [ + { + "ComponentId": 399415038452606756 + }, + { + "ComponentId": 16184381538555246534, + "SortIndex": 1 + }, + { + "ComponentId": 7827190074535394331, + "SortIndex": 2 + } + ] + }, + "Component_[3518973002096080237]": { + "$type": "EditorOnlyEntityComponent", + "Id": 3518973002096080237 + }, + "Component_[399415038452606756]": { + "$type": "{27F1E1A1-8D9D-4C3B-BD3A-AFB9762449C0} TransformComponent", + "Id": 399415038452606756, + "Parent Entity": "ContainerEntity", + "Transform Data": { + "Translate": [ + 27.53014373779297, + -0.00018183141946792603, + 109.46680450439453 + ] + } + }, + "Component_[4564240319609068082]": { + "$type": "EditorEntitySortComponent", + "Id": 4564240319609068082 + }, + "Component_[7827190074535394331]": { + "$type": "EditorMaterialComponent", + "Id": 7827190074535394331, + "Controller": { + "Configuration": { + "materials": [ + { + "Key": { + "materialSlotStableId": 2418540911 + }, + "Value": { + "MaterialAsset": { + "assetId": { + "guid": "{A78EA2FC-688B-5E3A-A7F6-DB413D11D4CF}" + }, + "assetHint": "materials/presets/pbr/metal_chrome_matte.azmaterial" + } + } + } + ] + } + } + }, + "Component_[8092226976542590265]": { + "$type": "EditorDisabledCompositionComponent", + "Id": 8092226976542590265 + } + } + }, + "Entity_[1754810935252]": { + "Id": "Entity_[1754810935252]", + "Name": "Entity1", + "Components": { + "Component_[11525365929370623807]": { + "$type": "EditorVisibilityComponent", + "Id": 11525365929370623807 + }, + "Component_[12334620273692642550]": { + "$type": "EditorLockComponent", + "Id": 12334620273692642550 + }, + "Component_[14389735759337977675]": { + "$type": "EditorPendingCompositionComponent", + "Id": 14389735759337977675 + }, + "Component_[16184381538555246534]": { + "$type": "AZ::Render::EditorMeshComponent", + "Id": 16184381538555246534, + "Controller": { + "Configuration": { + "ModelAsset": { + "assetId": { + "guid": "{E14975EF-E676-51A4-B826-3EF59CB645AA}", + "subId": 285127096 + }, + "assetHint": "testdata/objects/cube/cube.azmodel" + } + } + } + }, + "Component_[17962478023087084794]": { + "$type": "SelectionComponent", + "Id": 17962478023087084794 + }, + "Component_[18071675051915092508]": { + "$type": "EditorEntityIconComponent", + "Id": 18071675051915092508 + }, + "Component_[2115498007879087044]": { + "$type": "EditorInspectorComponent", + "Id": 2115498007879087044, + "ComponentOrderEntryArray": [ + { + "ComponentId": 399415038452606756 + }, + { + "ComponentId": 16184381538555246534, + "SortIndex": 1 + }, + { + "ComponentId": 7827190074535394331, + "SortIndex": 2 + } + ] + }, + "Component_[3518973002096080237]": { + "$type": "EditorOnlyEntityComponent", + "Id": 3518973002096080237 + }, + "Component_[399415038452606756]": { + "$type": "{27F1E1A1-8D9D-4C3B-BD3A-AFB9762449C0} TransformComponent", + "Id": 399415038452606756, + "Parent Entity": "ContainerEntity", + "Transform Data": { + "Translate": [ + 17.53014373779297, + -0.00018183141946792603, + 114.4910659790039 + ] + } + }, + "Component_[4564240319609068082]": { + "$type": "EditorEntitySortComponent", + "Id": 4564240319609068082 + }, + "Component_[7827190074535394331]": { + "$type": "EditorMaterialComponent", + "Id": 7827190074535394331, + "Controller": { + "Configuration": { + "materials": [ + { + "Key": {}, + "Value": { + "MaterialAsset": { + "assetId": { + "guid": "{721188E0-B7CC-5D06-8D5D-39AF8ABF2EF9}" + }, + "assetHint": "materials/presets/pbr/metal_titanium.azmaterial" + } + } + }, + { + "Key": { + "materialSlotStableId": 2418540911 + }, + "Value": { + "MaterialAsset": { + "assetId": { + "guid": "{94CF2BD7-7D09-5577-B1D8-3FF85B15E127}" + }, + "assetHint": "materials/presets/pbr/metal_aluminum.azmaterial" + } + } + } + ] + } + } + }, + "Component_[8092226976542590265]": { + "$type": "EditorDisabledCompositionComponent", + "Id": 8092226976542590265 + } + } + }, + "Entity_[1759105902548]": { + "Id": "Entity_[1759105902548]", + "Name": "Entity1", + "Components": { + "Component_[11525365929370623807]": { + "$type": "EditorVisibilityComponent", + "Id": 11525365929370623807 + }, + "Component_[12334620273692642550]": { + "$type": "EditorLockComponent", + "Id": 12334620273692642550 + }, + "Component_[14389735759337977675]": { + "$type": "EditorPendingCompositionComponent", + "Id": 14389735759337977675 + }, + "Component_[16184381538555246534]": { + "$type": "AZ::Render::EditorMeshComponent", + "Id": 16184381538555246534, + "Controller": { + "Configuration": { + "ModelAsset": { + "assetId": { + "guid": "{E14975EF-E676-51A4-B826-3EF59CB645AA}", + "subId": 285127096 + }, + "assetHint": "testdata/objects/cube/cube.azmodel" + } + } + } + }, + "Component_[17962478023087084794]": { + "$type": "SelectionComponent", + "Id": 17962478023087084794 + }, + "Component_[18071675051915092508]": { + "$type": "EditorEntityIconComponent", + "Id": 18071675051915092508 + }, + "Component_[2115498007879087044]": { + "$type": "EditorInspectorComponent", + "Id": 2115498007879087044, + "ComponentOrderEntryArray": [ + { + "ComponentId": 399415038452606756 + }, + { + "ComponentId": 16184381538555246534, + "SortIndex": 1 + }, + { + "ComponentId": 7827190074535394331, + "SortIndex": 2 + } + ] + }, + "Component_[3518973002096080237]": { + "$type": "EditorOnlyEntityComponent", + "Id": 3518973002096080237 + }, + "Component_[399415038452606756]": { + "$type": "{27F1E1A1-8D9D-4C3B-BD3A-AFB9762449C0} TransformComponent", + "Id": 399415038452606756, + "Parent Entity": "ContainerEntity", + "Transform Data": { + "Translate": [ + -42.53056335449219, + -0.00018183141946792603, + 89.95755767822266 + ] + } + }, + "Component_[4564240319609068082]": { + "$type": "EditorEntitySortComponent", + "Id": 4564240319609068082 + }, + "Component_[7827190074535394331]": { + "$type": "EditorMaterialComponent", + "Id": 7827190074535394331, + "Controller": { + "Configuration": { + "materials": [ + { + "Key": { + "materialSlotStableId": 2418540911 + }, + "Value": { + "MaterialAsset": { + "assetId": { + "guid": "{FC69F2F8-F73B-5A0C-B8B7-94BAA45780FC}" + }, + "assetHint": "materials/presets/pbr/metal_brass_polished.azmaterial" + } + } + } + ] + } + } + }, + "Component_[8092226976542590265]": { + "$type": "EditorDisabledCompositionComponent", + "Id": 8092226976542590265 + } + } + }, + "Entity_[1763400869844]": { + "Id": "Entity_[1763400869844]", + "Name": "Entity1", + "Components": { + "Component_[11525365929370623807]": { + "$type": "EditorVisibilityComponent", + "Id": 11525365929370623807 + }, + "Component_[12334620273692642550]": { + "$type": "EditorLockComponent", + "Id": 12334620273692642550 + }, + "Component_[14389735759337977675]": { + "$type": "EditorPendingCompositionComponent", + "Id": 14389735759337977675 + }, + "Component_[16184381538555246534]": { + "$type": "AZ::Render::EditorMeshComponent", + "Id": 16184381538555246534, + "Controller": { + "Configuration": { + "ModelAsset": { + "assetId": { + "guid": "{E14975EF-E676-51A4-B826-3EF59CB645AA}", + "subId": 285127096 + }, + "assetHint": "testdata/objects/cube/cube.azmodel" + } + } + } + }, + "Component_[17962478023087084794]": { + "$type": "SelectionComponent", + "Id": 17962478023087084794 + }, + "Component_[18071675051915092508]": { + "$type": "EditorEntityIconComponent", + "Id": 18071675051915092508 + }, + "Component_[2115498007879087044]": { + "$type": "EditorInspectorComponent", + "Id": 2115498007879087044, + "ComponentOrderEntryArray": [ + { + "ComponentId": 399415038452606756 + }, + { + "ComponentId": 16184381538555246534, + "SortIndex": 1 + }, + { + "ComponentId": 7827190074535394331, + "SortIndex": 2 + } + ] + }, + "Component_[3518973002096080237]": { + "$type": "EditorOnlyEntityComponent", + "Id": 3518973002096080237 + }, + "Component_[399415038452606756]": { + "$type": "{27F1E1A1-8D9D-4C3B-BD3A-AFB9762449C0} TransformComponent", + "Id": 399415038452606756, + "Parent Entity": "ContainerEntity", + "Transform Data": { + "Translate": [ + -27.530563354492188, + -0.00018183141946792603, + 0.0 + ] + } + }, + "Component_[4564240319609068082]": { + "$type": "EditorEntitySortComponent", + "Id": 4564240319609068082 + }, + "Component_[7827190074535394331]": { + "$type": "EditorMaterialComponent", + "Id": 7827190074535394331, + "Controller": { + "Configuration": { + "materials": [ + { + "Key": { + "materialSlotStableId": 2418540911 + }, + "Value": { + "MaterialAsset": { + "assetId": { + "guid": "{CF5C7B01-4912-58AE-991A-F25251E505AC}" + }, + "assetHint": "materials/presets/pbr/metal_copper_polished.azmaterial" + } + } + } + ] + } + } + }, + "Component_[8092226976542590265]": { + "$type": "EditorDisabledCompositionComponent", + "Id": 8092226976542590265 + } + } + }, + "Entity_[1767695837140]": { + "Id": "Entity_[1767695837140]", + "Name": "Entity1", + "Components": { + "Component_[11525365929370623807]": { + "$type": "EditorVisibilityComponent", + "Id": 11525365929370623807 + }, + "Component_[12334620273692642550]": { + "$type": "EditorLockComponent", + "Id": 12334620273692642550 + }, + "Component_[14389735759337977675]": { + "$type": "EditorPendingCompositionComponent", + "Id": 14389735759337977675 + }, + "Component_[16184381538555246534]": { + "$type": "AZ::Render::EditorMeshComponent", + "Id": 16184381538555246534, + "Controller": { + "Configuration": { + "ModelAsset": { + "assetId": { + "guid": "{E14975EF-E676-51A4-B826-3EF59CB645AA}", + "subId": 285127096 + }, + "assetHint": "testdata/objects/cube/cube.azmodel" + } + } + } + }, + "Component_[17962478023087084794]": { + "$type": "SelectionComponent", + "Id": 17962478023087084794 + }, + "Component_[18071675051915092508]": { + "$type": "EditorEntityIconComponent", + "Id": 18071675051915092508 + }, + "Component_[2115498007879087044]": { + "$type": "EditorInspectorComponent", + "Id": 2115498007879087044, + "ComponentOrderEntryArray": [ + { + "ComponentId": 399415038452606756 + }, + { + "ComponentId": 16184381538555246534, + "SortIndex": 1 + }, + { + "ComponentId": 7827190074535394331, + "SortIndex": 2 + } + ] + }, + "Component_[3518973002096080237]": { + "$type": "EditorOnlyEntityComponent", + "Id": 3518973002096080237 + }, + "Component_[399415038452606756]": { + "$type": "{27F1E1A1-8D9D-4C3B-BD3A-AFB9762449C0} TransformComponent", + "Id": 399415038452606756, + "Parent Entity": "ContainerEntity", + "Transform Data": { + "Translate": [ + 7.530143737792969, + -0.00018183141946792603, + 84.40655517578125 + ] + } + }, + "Component_[4564240319609068082]": { + "$type": "EditorEntitySortComponent", + "Id": 4564240319609068082 + }, + "Component_[7827190074535394331]": { + "$type": "EditorMaterialComponent", + "Id": 7827190074535394331, + "Controller": { + "Configuration": { + "materials": [ + { + "Key": { + "materialSlotStableId": 2418540911 + }, + "Value": { + "MaterialAsset": { + "assetId": { + "guid": "{CDA13277-5EAB-5E2A-93F5-B7003597FBCE}" + }, + "assetHint": "materials/presets/pbr/metal_silver.azmaterial" + } + } + } + ] + } + } + }, + "Component_[8092226976542590265]": { + "$type": "EditorDisabledCompositionComponent", + "Id": 8092226976542590265 + } + } + }, + "Entity_[1771990804436]": { + "Id": "Entity_[1771990804436]", + "Name": "Entity1", + "Components": { + "Component_[11525365929370623807]": { + "$type": "EditorVisibilityComponent", + "Id": 11525365929370623807 + }, + "Component_[12334620273692642550]": { + "$type": "EditorLockComponent", + "Id": 12334620273692642550 + }, + "Component_[14389735759337977675]": { + "$type": "EditorPendingCompositionComponent", + "Id": 14389735759337977675 + }, + "Component_[16184381538555246534]": { + "$type": "AZ::Render::EditorMeshComponent", + "Id": 16184381538555246534, + "Controller": { + "Configuration": { + "ModelAsset": { + "assetId": { + "guid": "{E14975EF-E676-51A4-B826-3EF59CB645AA}", + "subId": 285127096 + }, + "assetHint": "testdata/objects/cube/cube.azmodel" + } + } + } + }, + "Component_[17962478023087084794]": { + "$type": "SelectionComponent", + "Id": 17962478023087084794 + }, + "Component_[18071675051915092508]": { + "$type": "EditorEntityIconComponent", + "Id": 18071675051915092508 + }, + "Component_[2115498007879087044]": { + "$type": "EditorInspectorComponent", + "Id": 2115498007879087044, + "ComponentOrderEntryArray": [ + { + "ComponentId": 399415038452606756 + }, + { + "ComponentId": 16184381538555246534, + "SortIndex": 1 + }, + { + "ComponentId": 7827190074535394331, + "SortIndex": 2 + } + ] + }, + "Component_[3518973002096080237]": { + "$type": "EditorOnlyEntityComponent", + "Id": 3518973002096080237 + }, + "Component_[399415038452606756]": { + "$type": "{27F1E1A1-8D9D-4C3B-BD3A-AFB9762449C0} TransformComponent", + "Id": 399415038452606756, + "Parent Entity": "ContainerEntity", + "Transform Data": { + "Translate": [ + -27.530563354492188, + -0.00018183141946792603, + 69.34888458251953 + ] + } + }, + "Component_[4564240319609068082]": { + "$type": "EditorEntitySortComponent", + "Id": 4564240319609068082 + }, + "Component_[7827190074535394331]": { + "$type": "EditorMaterialComponent", + "Id": 7827190074535394331, + "Controller": { + "Configuration": { + "materials": [ + { + "Key": { + "materialSlotStableId": 2418540911 + }, + "Value": { + "MaterialAsset": { + "assetId": { + "guid": "{E621C5BF-B8E1-55F0-A791-EC960F2FA46F}" + }, + "assetHint": "materials/presets/pbr/metal_copper.azmaterial" + } + } + } + ] + } + } + }, + "Component_[8092226976542590265]": { + "$type": "EditorDisabledCompositionComponent", + "Id": 8092226976542590265 + } + } + }, + "Entity_[1776285771732]": { + "Id": "Entity_[1776285771732]", + "Name": "Entity1", + "Components": { + "Component_[11525365929370623807]": { + "$type": "EditorVisibilityComponent", + "Id": 11525365929370623807 + }, + "Component_[12334620273692642550]": { + "$type": "EditorLockComponent", + "Id": 12334620273692642550 + }, + "Component_[14389735759337977675]": { + "$type": "EditorPendingCompositionComponent", + "Id": 14389735759337977675 + }, + "Component_[16184381538555246534]": { + "$type": "AZ::Render::EditorMeshComponent", + "Id": 16184381538555246534, + "Controller": { + "Configuration": { + "ModelAsset": { + "assetId": { + "guid": "{E14975EF-E676-51A4-B826-3EF59CB645AA}", + "subId": 285127096 + }, + "assetHint": "testdata/objects/cube/cube.azmodel" + } + } + } + }, + "Component_[17962478023087084794]": { + "$type": "SelectionComponent", + "Id": 17962478023087084794 + }, + "Component_[18071675051915092508]": { + "$type": "EditorEntityIconComponent", + "Id": 18071675051915092508 + }, + "Component_[2115498007879087044]": { + "$type": "EditorInspectorComponent", + "Id": 2115498007879087044, + "ComponentOrderEntryArray": [ + { + "ComponentId": 399415038452606756 + }, + { + "ComponentId": 16184381538555246534, + "SortIndex": 1 + }, + { + "ComponentId": 7827190074535394331, + "SortIndex": 2 + } + ] + }, + "Component_[3518973002096080237]": { + "$type": "EditorOnlyEntityComponent", + "Id": 3518973002096080237 + }, + "Component_[399415038452606756]": { + "$type": "{27F1E1A1-8D9D-4C3B-BD3A-AFB9762449C0} TransformComponent", + "Id": 399415038452606756, + "Parent Entity": "ContainerEntity", + "Transform Data": { + "Translate": [ + -27.530563354492188, + -0.00018183141946792603, + 15.057670593261719 + ] + } + }, + "Component_[4564240319609068082]": { + "$type": "EditorEntitySortComponent", + "Id": 4564240319609068082 + }, + "Component_[7827190074535394331]": { + "$type": "EditorMaterialComponent", + "Id": 7827190074535394331, + "Controller": { + "Configuration": { + "materials": [ + { + "Key": { + "materialSlotStableId": 2418540911 + }, + "Value": { + "MaterialAsset": { + "assetId": { + "guid": "{CF5C7B01-4912-58AE-991A-F25251E505AC}" + }, + "assetHint": "materials/presets/pbr/metal_copper_polished.azmaterial" + } + } + } + ] + } + } + }, + "Component_[8092226976542590265]": { + "$type": "EditorDisabledCompositionComponent", + "Id": 8092226976542590265 + } + } + }, + "Entity_[1780580739028]": { + "Id": "Entity_[1780580739028]", + "Name": "Entity1", + "Components": { + "Component_[11525365929370623807]": { + "$type": "EditorVisibilityComponent", + "Id": 11525365929370623807 + }, + "Component_[12334620273692642550]": { + "$type": "EditorLockComponent", + "Id": 12334620273692642550 + }, + "Component_[14389735759337977675]": { + "$type": "EditorPendingCompositionComponent", + "Id": 14389735759337977675 + }, + "Component_[16184381538555246534]": { + "$type": "AZ::Render::EditorMeshComponent", + "Id": 16184381538555246534, + "Controller": { + "Configuration": { + "ModelAsset": { + "assetId": { + "guid": "{E14975EF-E676-51A4-B826-3EF59CB645AA}", + "subId": 285127096 + }, + "assetHint": "testdata/objects/cube/cube.azmodel" + } + } + } + }, + "Component_[17962478023087084794]": { + "$type": "SelectionComponent", + "Id": 17962478023087084794 + }, + "Component_[18071675051915092508]": { + "$type": "EditorEntityIconComponent", + "Id": 18071675051915092508 + }, + "Component_[2115498007879087044]": { + "$type": "EditorInspectorComponent", + "Id": 2115498007879087044, + "ComponentOrderEntryArray": [ + { + "ComponentId": 399415038452606756 + }, + { + "ComponentId": 16184381538555246534, + "SortIndex": 1 + }, + { + "ComponentId": 7827190074535394331, + "SortIndex": 2 + } + ] + }, + "Component_[3518973002096080237]": { + "$type": "EditorOnlyEntityComponent", + "Id": 3518973002096080237 + }, + "Component_[399415038452606756]": { + "$type": "{27F1E1A1-8D9D-4C3B-BD3A-AFB9762449C0} TransformComponent", + "Id": 399415038452606756, + "Parent Entity": "ContainerEntity", + "Transform Data": { + "Translate": [ + -2.5305633544921875, + -0.00018183141946792603, + 4.451573371887207 + ] + } + }, + "Component_[4564240319609068082]": { + "$type": "EditorEntitySortComponent", + "Id": 4564240319609068082 + }, + "Component_[7827190074535394331]": { + "$type": "EditorMaterialComponent", + "Id": 7827190074535394331, + "Controller": { + "Configuration": { + "materials": [ + { + "Key": { + "materialSlotStableId": 2418540911 + }, + "Value": { + "MaterialAsset": { + "assetId": { + "guid": "{9187B84B-425F-5D11-B4D7-35BBDB0959D1}" + }, + "assetHint": "materials/presets/pbr/metal_palladium_matte.azmaterial" + } + } + } + ] + } + } + }, + "Component_[8092226976542590265]": { + "$type": "EditorDisabledCompositionComponent", + "Id": 8092226976542590265 + } + } + }, + "Entity_[1784875706324]": { + "Id": "Entity_[1784875706324]", + "Name": "Entity1", + "Components": { + "Component_[11525365929370623807]": { + "$type": "EditorVisibilityComponent", + "Id": 11525365929370623807 + }, + "Component_[12334620273692642550]": { + "$type": "EditorLockComponent", + "Id": 12334620273692642550 + }, + "Component_[14389735759337977675]": { + "$type": "EditorPendingCompositionComponent", + "Id": 14389735759337977675 + }, + "Component_[16184381538555246534]": { + "$type": "AZ::Render::EditorMeshComponent", + "Id": 16184381538555246534, + "Controller": { + "Configuration": { + "ModelAsset": { + "assetId": { + "guid": "{E14975EF-E676-51A4-B826-3EF59CB645AA}", + "subId": 285127096 + }, + "assetHint": "testdata/objects/cube/cube.azmodel" + } + } + } + }, + "Component_[17962478023087084794]": { + "$type": "SelectionComponent", + "Id": 17962478023087084794 + }, + "Component_[18071675051915092508]": { + "$type": "EditorEntityIconComponent", + "Id": 18071675051915092508 + }, + "Component_[2115498007879087044]": { + "$type": "EditorInspectorComponent", + "Id": 2115498007879087044, + "ComponentOrderEntryArray": [ + { + "ComponentId": 399415038452606756 + }, + { + "ComponentId": 16184381538555246534, + "SortIndex": 1 + }, + { + "ComponentId": 7827190074535394331, + "SortIndex": 2 + } + ] + }, + "Component_[3518973002096080237]": { + "$type": "EditorOnlyEntityComponent", + "Id": 3518973002096080237 + }, + "Component_[399415038452606756]": { + "$type": "{27F1E1A1-8D9D-4C3B-BD3A-AFB9762449C0} TransformComponent", + "Id": 399415038452606756, + "Parent Entity": "ContainerEntity", + "Transform Data": { + "Translate": [ + 42.53014373779297, + -0.00018183141946792603, + 105.0152359008789 + ] + } + }, + "Component_[4564240319609068082]": { + "$type": "EditorEntitySortComponent", + "Id": 4564240319609068082 + }, + "Component_[7827190074535394331]": { + "$type": "EditorMaterialComponent", + "Id": 7827190074535394331, + "Controller": { + "Configuration": { + "materials": [ + { + "Key": { + "materialSlotStableId": 2418540911 + }, + "Value": { + "MaterialAsset": { + "assetId": { + "guid": "{FB4657EB-FB3A-5EC3-A772-DC36D6F733C3}" + }, + "assetHint": "materials/presets/pbr/metal_gold_polished.azmaterial" + } + } + } + ] + } + } + }, + "Component_[8092226976542590265]": { + "$type": "EditorDisabledCompositionComponent", + "Id": 8092226976542590265 + } + } + }, + "Entity_[1789170673620]": { + "Id": "Entity_[1789170673620]", + "Name": "Entity1", + "Components": { + "Component_[11525365929370623807]": { + "$type": "EditorVisibilityComponent", + "Id": 11525365929370623807 + }, + "Component_[12334620273692642550]": { + "$type": "EditorLockComponent", + "Id": 12334620273692642550 + }, + "Component_[14389735759337977675]": { + "$type": "EditorPendingCompositionComponent", + "Id": 14389735759337977675 + }, + "Component_[16184381538555246534]": { + "$type": "AZ::Render::EditorMeshComponent", + "Id": 16184381538555246534, + "Controller": { + "Configuration": { + "ModelAsset": { + "assetId": { + "guid": "{E14975EF-E676-51A4-B826-3EF59CB645AA}", + "subId": 285127096 + }, + "assetHint": "testdata/objects/cube/cube.azmodel" + } + } + } + }, + "Component_[17962478023087084794]": { + "$type": "SelectionComponent", + "Id": 17962478023087084794 + }, + "Component_[18071675051915092508]": { + "$type": "EditorEntityIconComponent", + "Id": 18071675051915092508 + }, + "Component_[2115498007879087044]": { + "$type": "EditorInspectorComponent", + "Id": 2115498007879087044, + "ComponentOrderEntryArray": [ + { + "ComponentId": 399415038452606756 + }, + { + "ComponentId": 16184381538555246534, + "SortIndex": 1 + }, + { + "ComponentId": 7827190074535394331, + "SortIndex": 2 + } + ] + }, + "Component_[3518973002096080237]": { + "$type": "EditorOnlyEntityComponent", + "Id": 3518973002096080237 + }, + "Component_[399415038452606756]": { + "$type": "{27F1E1A1-8D9D-4C3B-BD3A-AFB9762449C0} TransformComponent", + "Id": 399415038452606756, + "Parent Entity": "ContainerEntity", + "Transform Data": { + "Translate": [ + 2.5301437377929688, + -0.00018183141946792603, + 54.618019104003906 + ] + } + }, + "Component_[4564240319609068082]": { + "$type": "EditorEntitySortComponent", + "Id": 4564240319609068082 + }, + "Component_[7827190074535394331]": { + "$type": "EditorMaterialComponent", + "Id": 7827190074535394331, + "Controller": { + "Configuration": { + "materials": [ + { + "Key": { + "materialSlotStableId": 2418540911 + }, + "Value": { + "MaterialAsset": { + "assetId": { + "guid": "{E23FC75B-4142-55F1-B9AE-884826E7EB23}" + }, + "assetHint": "materials/presets/pbr/metal_platinum.azmaterial" + } + } + } + ] + } + } + }, + "Component_[8092226976542590265]": { + "$type": "EditorDisabledCompositionComponent", + "Id": 8092226976542590265 + } + } + }, + "Entity_[1793465640916]": { + "Id": "Entity_[1793465640916]", + "Name": "Entity1", + "Components": { + "Component_[11525365929370623807]": { + "$type": "EditorVisibilityComponent", + "Id": 11525365929370623807 + }, + "Component_[12334620273692642550]": { + "$type": "EditorLockComponent", + "Id": 12334620273692642550 + }, + "Component_[14389735759337977675]": { + "$type": "EditorPendingCompositionComponent", + "Id": 14389735759337977675 + }, + "Component_[16184381538555246534]": { + "$type": "AZ::Render::EditorMeshComponent", + "Id": 16184381538555246534, + "Controller": { + "Configuration": { + "ModelAsset": { + "assetId": { + "guid": "{E14975EF-E676-51A4-B826-3EF59CB645AA}", + "subId": 285127096 + }, + "assetHint": "testdata/objects/cube/cube.azmodel" + } + } + } + }, + "Component_[17962478023087084794]": { + "$type": "SelectionComponent", + "Id": 17962478023087084794 + }, + "Component_[18071675051915092508]": { + "$type": "EditorEntityIconComponent", + "Id": 18071675051915092508 + }, + "Component_[2115498007879087044]": { + "$type": "EditorInspectorComponent", + "Id": 2115498007879087044, + "ComponentOrderEntryArray": [ + { + "ComponentId": 399415038452606756 + }, + { + "ComponentId": 16184381538555246534, + "SortIndex": 1 + }, + { + "ComponentId": 7827190074535394331, + "SortIndex": 2 + } + ] + }, + "Component_[3518973002096080237]": { + "$type": "EditorOnlyEntityComponent", + "Id": 3518973002096080237 + }, + "Component_[399415038452606756]": { + "$type": "{27F1E1A1-8D9D-4C3B-BD3A-AFB9762449C0} TransformComponent", + "Id": 399415038452606756, + "Parent Entity": "ContainerEntity", + "Transform Data": { + "Translate": [ + -7.5305633544921875, + -0.00018183141946792603, + 94.40913391113281 + ] + } + }, + "Component_[4564240319609068082]": { + "$type": "EditorEntitySortComponent", + "Id": 4564240319609068082 + }, + "Component_[7827190074535394331]": { + "$type": "EditorMaterialComponent", + "Id": 7827190074535394331, + "Controller": { + "Configuration": { + "materials": [ + { + "Key": { + "materialSlotStableId": 2418540911 + }, + "Value": { + "MaterialAsset": { + "assetId": { + "guid": "{E56377B1-6310-5311-A494-135BE50B74F0}" + }, + "assetHint": "materials/presets/pbr/metal_nickel_matte.azmaterial" + } + } + } + ] + } + } + }, + "Component_[8092226976542590265]": { + "$type": "EditorDisabledCompositionComponent", + "Id": 8092226976542590265 + } + } + }, + "Entity_[1797760608212]": { + "Id": "Entity_[1797760608212]", + "Name": "Entity1", + "Components": { + "Component_[11525365929370623807]": { + "$type": "EditorVisibilityComponent", + "Id": 11525365929370623807 + }, + "Component_[12334620273692642550]": { + "$type": "EditorLockComponent", + "Id": 12334620273692642550 + }, + "Component_[14389735759337977675]": { + "$type": "EditorPendingCompositionComponent", + "Id": 14389735759337977675 + }, + "Component_[16184381538555246534]": { + "$type": "AZ::Render::EditorMeshComponent", + "Id": 16184381538555246534, + "Controller": { + "Configuration": { + "ModelAsset": { + "assetId": { + "guid": "{E14975EF-E676-51A4-B826-3EF59CB645AA}", + "subId": 285127096 + }, + "assetHint": "testdata/objects/cube/cube.azmodel" + } + } + } + }, + "Component_[17962478023087084794]": { + "$type": "SelectionComponent", + "Id": 17962478023087084794 + }, + "Component_[18071675051915092508]": { + "$type": "EditorEntityIconComponent", + "Id": 18071675051915092508 + }, + "Component_[2115498007879087044]": { + "$type": "EditorInspectorComponent", + "Id": 2115498007879087044, + "ComponentOrderEntryArray": [ + { + "ComponentId": 399415038452606756 + }, + { + "ComponentId": 16184381538555246534, + "SortIndex": 1 + }, + { + "ComponentId": 7827190074535394331, + "SortIndex": 2 + } + ] + }, + "Component_[3518973002096080237]": { + "$type": "EditorOnlyEntityComponent", + "Id": 3518973002096080237 + }, + "Component_[399415038452606756]": { + "$type": "{27F1E1A1-8D9D-4C3B-BD3A-AFB9762449C0} TransformComponent", + "Id": 399415038452606756, + "Parent Entity": "ContainerEntity", + "Transform Data": { + "Translate": [ + -2.5305633544921875, + -0.00018183141946792603, + 34.53608703613281 + ] + } + }, + "Component_[4564240319609068082]": { + "$type": "EditorEntitySortComponent", + "Id": 4564240319609068082 + }, + "Component_[7827190074535394331]": { + "$type": "EditorMaterialComponent", + "Id": 7827190074535394331, + "Controller": { + "Configuration": { + "materials": [ + { + "Key": { + "materialSlotStableId": 2418540911 + }, + "Value": { + "MaterialAsset": { + "assetId": { + "guid": "{9187B84B-425F-5D11-B4D7-35BBDB0959D1}" + }, + "assetHint": "materials/presets/pbr/metal_palladium_matte.azmaterial" + } + } + } + ] + } + } + }, + "Component_[8092226976542590265]": { + "$type": "EditorDisabledCompositionComponent", + "Id": 8092226976542590265 + } + } + }, + "Entity_[1802055575508]": { + "Id": "Entity_[1802055575508]", + "Name": "Entity1", + "Components": { + "Component_[11525365929370623807]": { + "$type": "EditorVisibilityComponent", + "Id": 11525365929370623807 + }, + "Component_[12334620273692642550]": { + "$type": "EditorLockComponent", + "Id": 12334620273692642550 + }, + "Component_[14389735759337977675]": { + "$type": "EditorPendingCompositionComponent", + "Id": 14389735759337977675 + }, + "Component_[16184381538555246534]": { + "$type": "AZ::Render::EditorMeshComponent", + "Id": 16184381538555246534, + "Controller": { + "Configuration": { + "ModelAsset": { + "assetId": { + "guid": "{E14975EF-E676-51A4-B826-3EF59CB645AA}", + "subId": 285127096 + }, + "assetHint": "testdata/objects/cube/cube.azmodel" + } + } + } + }, + "Component_[17962478023087084794]": { + "$type": "SelectionComponent", + "Id": 17962478023087084794 + }, + "Component_[18071675051915092508]": { + "$type": "EditorEntityIconComponent", + "Id": 18071675051915092508 + }, + "Component_[2115498007879087044]": { + "$type": "EditorInspectorComponent", + "Id": 2115498007879087044, + "ComponentOrderEntryArray": [ + { + "ComponentId": 399415038452606756 + }, + { + "ComponentId": 16184381538555246534, + "SortIndex": 1 + }, + { + "ComponentId": 7827190074535394331, + "SortIndex": 2 + } + ] + }, + "Component_[3518973002096080237]": { + "$type": "EditorOnlyEntityComponent", + "Id": 3518973002096080237 + }, + "Component_[399415038452606756]": { + "$type": "{27F1E1A1-8D9D-4C3B-BD3A-AFB9762449C0} TransformComponent", + "Id": 399415038452606756, + "Parent Entity": "ContainerEntity", + "Transform Data": { + "Translate": [ + -22.530563354492188, + -0.00018183141946792603, + 74.93071746826172 + ] + } + }, + "Component_[4564240319609068082]": { + "$type": "EditorEntitySortComponent", + "Id": 4564240319609068082 + }, + "Component_[7827190074535394331]": { + "$type": "EditorMaterialComponent", + "Id": 7827190074535394331, + "Controller": { + "Configuration": { + "materials": [ + { + "Key": { + "materialSlotStableId": 2418540911 + }, + "Value": { + "MaterialAsset": { + "assetId": { + "guid": "{FB4657EB-FB3A-5EC3-A772-DC36D6F733C3}" + }, + "assetHint": "materials/presets/pbr/metal_gold_polished.azmaterial" + } + } + } + ] + } + } + }, + "Component_[8092226976542590265]": { + "$type": "EditorDisabledCompositionComponent", + "Id": 8092226976542590265 + } + } + }, + "Entity_[1806350542804]": { + "Id": "Entity_[1806350542804]", + "Name": "Entity1", + "Components": { + "Component_[11525365929370623807]": { + "$type": "EditorVisibilityComponent", + "Id": 11525365929370623807 + }, + "Component_[12334620273692642550]": { + "$type": "EditorLockComponent", + "Id": 12334620273692642550 + }, + "Component_[14389735759337977675]": { + "$type": "EditorPendingCompositionComponent", + "Id": 14389735759337977675 + }, + "Component_[16184381538555246534]": { + "$type": "AZ::Render::EditorMeshComponent", + "Id": 16184381538555246534, + "Controller": { + "Configuration": { + "ModelAsset": { + "assetId": { + "guid": "{E14975EF-E676-51A4-B826-3EF59CB645AA}", + "subId": 285127096 + }, + "assetHint": "testdata/objects/cube/cube.azmodel" + } + } + } + }, + "Component_[17962478023087084794]": { + "$type": "SelectionComponent", + "Id": 17962478023087084794 + }, + "Component_[18071675051915092508]": { + "$type": "EditorEntityIconComponent", + "Id": 18071675051915092508 + }, + "Component_[2115498007879087044]": { + "$type": "EditorInspectorComponent", + "Id": 2115498007879087044, + "ComponentOrderEntryArray": [ + { + "ComponentId": 399415038452606756 + }, + { + "ComponentId": 16184381538555246534, + "SortIndex": 1 + }, + { + "ComponentId": 7827190074535394331, + "SortIndex": 2 + } + ] + }, + "Component_[3518973002096080237]": { + "$type": "EditorOnlyEntityComponent", + "Id": 3518973002096080237 + }, + "Component_[399415038452606756]": { + "$type": "{27F1E1A1-8D9D-4C3B-BD3A-AFB9762449C0} TransformComponent", + "Id": 399415038452606756, + "Parent Entity": "ContainerEntity", + "Transform Data": { + "Translate": [ + 47.53014373779297, + -0.00018183141946792603, + 15.057670593261719 + ] + } + }, + "Component_[4564240319609068082]": { + "$type": "EditorEntitySortComponent", + "Id": 4564240319609068082 + }, + "Component_[7827190074535394331]": { + "$type": "EditorMaterialComponent", + "Id": 7827190074535394331, + "Controller": { + "Configuration": { + "materials": [ + { + "Key": { + "materialSlotStableId": 2418540911 + }, + "Value": { + "MaterialAsset": { + "assetId": { + "guid": "{A7F03135-ECAD-5440-99DB-E84ABA3D50DA}" + }, + "assetHint": "materials/presets/pbr/metal_iron_polished.azmaterial" + } + } + } + ] + } + } + }, + "Component_[8092226976542590265]": { + "$type": "EditorDisabledCompositionComponent", + "Id": 8092226976542590265 + } + } + }, + "Entity_[1810645510100]": { + "Id": "Entity_[1810645510100]", + "Name": "Entity1", + "Components": { + "Component_[11525365929370623807]": { + "$type": "EditorVisibilityComponent", + "Id": 11525365929370623807 + }, + "Component_[12334620273692642550]": { + "$type": "EditorLockComponent", + "Id": 12334620273692642550 + }, + "Component_[14389735759337977675]": { + "$type": "EditorPendingCompositionComponent", + "Id": 14389735759337977675 + }, + "Component_[16184381538555246534]": { + "$type": "AZ::Render::EditorMeshComponent", + "Id": 16184381538555246534, + "Controller": { + "Configuration": { + "ModelAsset": { + "assetId": { + "guid": "{E14975EF-E676-51A4-B826-3EF59CB645AA}", + "subId": 285127096 + }, + "assetHint": "testdata/objects/cube/cube.azmodel" + } + } + } + }, + "Component_[17962478023087084794]": { + "$type": "SelectionComponent", + "Id": 17962478023087084794 + }, + "Component_[18071675051915092508]": { + "$type": "EditorEntityIconComponent", + "Id": 18071675051915092508 + }, + "Component_[2115498007879087044]": { + "$type": "EditorInspectorComponent", + "Id": 2115498007879087044, + "ComponentOrderEntryArray": [ + { + "ComponentId": 399415038452606756 + }, + { + "ComponentId": 16184381538555246534, + "SortIndex": 1 + }, + { + "ComponentId": 7827190074535394331, + "SortIndex": 2 + } + ] + }, + "Component_[3518973002096080237]": { + "$type": "EditorOnlyEntityComponent", + "Id": 3518973002096080237 + }, + "Component_[399415038452606756]": { + "$type": "{27F1E1A1-8D9D-4C3B-BD3A-AFB9762449C0} TransformComponent", + "Id": 399415038452606756, + "Parent Entity": "ContainerEntity", + "Transform Data": { + "Translate": [ + -22.530563354492188, + -0.00018183141946792603, + 49.593753814697266 + ] + } + }, + "Component_[4564240319609068082]": { + "$type": "EditorEntitySortComponent", + "Id": 4564240319609068082 + }, + "Component_[7827190074535394331]": { + "$type": "EditorMaterialComponent", + "Id": 7827190074535394331, + "Controller": { + "Configuration": { + "materials": [ + { + "Key": { + "materialSlotStableId": 2418540911 + }, + "Value": { + "MaterialAsset": { + "assetId": { + "guid": "{5BC13D95-377E-53EA-9A93-156384BE8B04}" + }, + "assetHint": "materials/presets/pbr/metal_gold_matte.azmaterial" + } + } + } + ] + } + } + }, + "Component_[8092226976542590265]": { + "$type": "EditorDisabledCompositionComponent", + "Id": 8092226976542590265 + } + } + }, + "Entity_[1814940477396]": { + "Id": "Entity_[1814940477396]", + "Name": "Entity1", + "Components": { + "Component_[11525365929370623807]": { + "$type": "EditorVisibilityComponent", + "Id": 11525365929370623807 + }, + "Component_[12334620273692642550]": { + "$type": "EditorLockComponent", + "Id": 12334620273692642550 + }, + "Component_[14389735759337977675]": { + "$type": "EditorPendingCompositionComponent", + "Id": 14389735759337977675 + }, + "Component_[16184381538555246534]": { + "$type": "AZ::Render::EditorMeshComponent", + "Id": 16184381538555246534, + "Controller": { + "Configuration": { + "ModelAsset": { + "assetId": { + "guid": "{E14975EF-E676-51A4-B826-3EF59CB645AA}", + "subId": 285127096 + }, + "assetHint": "testdata/objects/cube/cube.azmodel" + } + } + } + }, + "Component_[17962478023087084794]": { + "$type": "SelectionComponent", + "Id": 17962478023087084794 + }, + "Component_[18071675051915092508]": { + "$type": "EditorEntityIconComponent", + "Id": 18071675051915092508 + }, + "Component_[2115498007879087044]": { + "$type": "EditorInspectorComponent", + "Id": 2115498007879087044, + "ComponentOrderEntryArray": [ + { + "ComponentId": 399415038452606756 + }, + { + "ComponentId": 16184381538555246534, + "SortIndex": 1 + }, + { + "ComponentId": 7827190074535394331, + "SortIndex": 2 + } + ] + }, + "Component_[3518973002096080237]": { + "$type": "EditorOnlyEntityComponent", + "Id": 3518973002096080237 + }, + "Component_[399415038452606756]": { + "$type": "{27F1E1A1-8D9D-4C3B-BD3A-AFB9762449C0} TransformComponent", + "Id": 399415038452606756, + "Parent Entity": "ContainerEntity", + "Transform Data": { + "Translate": [ + 27.53014373779297, + -0.00018183141946792603, + 89.95755767822266 + ] + } + }, + "Component_[4564240319609068082]": { + "$type": "EditorEntitySortComponent", + "Id": 4564240319609068082 + }, + "Component_[7827190074535394331]": { + "$type": "EditorMaterialComponent", + "Id": 7827190074535394331, + "Controller": { + "Configuration": { + "materials": [ + { + "Key": { + "materialSlotStableId": 2418540911 + }, + "Value": { + "MaterialAsset": { + "assetId": { + "guid": "{CAF50181-3384-5DF2-9304-C6E48E83C72D}" + }, + "assetHint": "materials/presets/pbr/metal_chrome_polished.azmaterial" + } + } + } + ] + } + } + }, + "Component_[8092226976542590265]": { + "$type": "EditorDisabledCompositionComponent", + "Id": 8092226976542590265 + } + } + }, + "Entity_[1819235444692]": { + "Id": "Entity_[1819235444692]", + "Name": "Entity1", + "Components": { + "Component_[11525365929370623807]": { + "$type": "EditorVisibilityComponent", + "Id": 11525365929370623807 + }, + "Component_[12334620273692642550]": { + "$type": "EditorLockComponent", + "Id": 12334620273692642550 + }, + "Component_[14389735759337977675]": { + "$type": "EditorPendingCompositionComponent", + "Id": 14389735759337977675 + }, + "Component_[16184381538555246534]": { + "$type": "AZ::Render::EditorMeshComponent", + "Id": 16184381538555246534, + "Controller": { + "Configuration": { + "ModelAsset": { + "assetId": { + "guid": "{E14975EF-E676-51A4-B826-3EF59CB645AA}", + "subId": 285127096 + }, + "assetHint": "testdata/objects/cube/cube.azmodel" + } + } + } + }, + "Component_[17962478023087084794]": { + "$type": "SelectionComponent", + "Id": 17962478023087084794 + }, + "Component_[18071675051915092508]": { + "$type": "EditorEntityIconComponent", + "Id": 18071675051915092508 + }, + "Component_[2115498007879087044]": { + "$type": "EditorInspectorComponent", + "Id": 2115498007879087044, + "ComponentOrderEntryArray": [ + { + "ComponentId": 399415038452606756 + }, + { + "ComponentId": 16184381538555246534, + "SortIndex": 1 + }, + { + "ComponentId": 7827190074535394331, + "SortIndex": 2 + } + ] + }, + "Component_[3518973002096080237]": { + "$type": "EditorOnlyEntityComponent", + "Id": 3518973002096080237 + }, + "Component_[399415038452606756]": { + "$type": "{27F1E1A1-8D9D-4C3B-BD3A-AFB9762449C0} TransformComponent", + "Id": 399415038452606756, + "Parent Entity": "ContainerEntity", + "Transform Data": { + "Translate": [ + 47.53014373779297, + -0.00018183141946792603, + 45.14218521118164 + ] + } + }, + "Component_[4564240319609068082]": { + "$type": "EditorEntitySortComponent", + "Id": 4564240319609068082 + }, + "Component_[7827190074535394331]": { + "$type": "EditorMaterialComponent", + "Id": 7827190074535394331, + "Controller": { + "Configuration": { + "materials": [ + { + "Key": { + "materialSlotStableId": 2418540911 + }, + "Value": { + "MaterialAsset": { + "assetId": { + "guid": "{A7F03135-ECAD-5440-99DB-E84ABA3D50DA}" + }, + "assetHint": "materials/presets/pbr/metal_iron_polished.azmaterial" + } + } + } + ] + } + } + }, + "Component_[8092226976542590265]": { + "$type": "EditorDisabledCompositionComponent", + "Id": 8092226976542590265 + } + } + }, + "Entity_[1823530411988]": { + "Id": "Entity_[1823530411988]", + "Name": "Entity1", + "Components": { + "Component_[11525365929370623807]": { + "$type": "EditorVisibilityComponent", + "Id": 11525365929370623807 + }, + "Component_[12334620273692642550]": { + "$type": "EditorLockComponent", + "Id": 12334620273692642550 + }, + "Component_[14389735759337977675]": { + "$type": "EditorPendingCompositionComponent", + "Id": 14389735759337977675 + }, + "Component_[16184381538555246534]": { + "$type": "AZ::Render::EditorMeshComponent", + "Id": 16184381538555246534, + "Controller": { + "Configuration": { + "ModelAsset": { + "assetId": { + "guid": "{E14975EF-E676-51A4-B826-3EF59CB645AA}", + "subId": 285127096 + }, + "assetHint": "testdata/objects/cube/cube.azmodel" + } + } + } + }, + "Component_[17962478023087084794]": { + "$type": "SelectionComponent", + "Id": 17962478023087084794 + }, + "Component_[18071675051915092508]": { + "$type": "EditorEntityIconComponent", + "Id": 18071675051915092508 + }, + "Component_[2115498007879087044]": { + "$type": "EditorInspectorComponent", + "Id": 2115498007879087044, + "ComponentOrderEntryArray": [ + { + "ComponentId": 399415038452606756 + }, + { + "ComponentId": 16184381538555246534, + "SortIndex": 1 + }, + { + "ComponentId": 7827190074535394331, + "SortIndex": 2 + } + ] + }, + "Component_[3518973002096080237]": { + "$type": "EditorOnlyEntityComponent", + "Id": 3518973002096080237 + }, + "Component_[399415038452606756]": { + "$type": "{27F1E1A1-8D9D-4C3B-BD3A-AFB9762449C0} TransformComponent", + "Id": 399415038452606756, + "Parent Entity": "ContainerEntity", + "Transform Data": { + "Translate": [ + 22.53014373779297, + -0.00018183141946792603, + 9.475835800170898 + ] + } + }, + "Component_[4564240319609068082]": { + "$type": "EditorEntitySortComponent", + "Id": 4564240319609068082 + }, + "Component_[7827190074535394331]": { + "$type": "EditorMaterialComponent", + "Id": 7827190074535394331, + "Controller": { + "Configuration": { + "materials": [ + { + "Key": { + "materialSlotStableId": 2418540911 + }, + "Value": { + "MaterialAsset": { + "assetId": { + "guid": "{80E0F2A7-1EE4-597F-80EF-985C65BCE2EB}" + }, + "assetHint": "materials/presets/pbr/metal_brass.azmaterial" + } + } + } + ] + } + } + }, + "Component_[8092226976542590265]": { + "$type": "EditorDisabledCompositionComponent", + "Id": 8092226976542590265 + } + } + }, + "Entity_[1827825379284]": { + "Id": "Entity_[1827825379284]", + "Name": "Entity1", + "Components": { + "Component_[11525365929370623807]": { + "$type": "EditorVisibilityComponent", + "Id": 11525365929370623807 + }, + "Component_[12334620273692642550]": { + "$type": "EditorLockComponent", + "Id": 12334620273692642550 + }, + "Component_[14389735759337977675]": { + "$type": "EditorPendingCompositionComponent", + "Id": 14389735759337977675 + }, + "Component_[16184381538555246534]": { + "$type": "AZ::Render::EditorMeshComponent", + "Id": 16184381538555246534, + "Controller": { + "Configuration": { + "ModelAsset": { + "assetId": { + "guid": "{E14975EF-E676-51A4-B826-3EF59CB645AA}", + "subId": 285127096 + }, + "assetHint": "testdata/objects/cube/cube.azmodel" + } + } + } + }, + "Component_[17962478023087084794]": { + "$type": "SelectionComponent", + "Id": 17962478023087084794 + }, + "Component_[18071675051915092508]": { + "$type": "EditorEntityIconComponent", + "Id": 18071675051915092508 + }, + "Component_[2115498007879087044]": { + "$type": "EditorInspectorComponent", + "Id": 2115498007879087044, + "ComponentOrderEntryArray": [ + { + "ComponentId": 399415038452606756 + }, + { + "ComponentId": 16184381538555246534, + "SortIndex": 1 + }, + { + "ComponentId": 7827190074535394331, + "SortIndex": 2 + } + ] + }, + "Component_[3518973002096080237]": { + "$type": "EditorOnlyEntityComponent", + "Id": 3518973002096080237 + }, + "Component_[399415038452606756]": { + "$type": "{27F1E1A1-8D9D-4C3B-BD3A-AFB9762449C0} TransformComponent", + "Id": 399415038452606756, + "Parent Entity": "ContainerEntity", + "Transform Data": { + "Translate": [ + -7.5305633544921875, + -0.00018183141946792603, + 45.14218521118164 + ] + } + }, + "Component_[4564240319609068082]": { + "$type": "EditorEntitySortComponent", + "Id": 4564240319609068082 + }, + "Component_[7827190074535394331]": { + "$type": "EditorMaterialComponent", + "Id": 7827190074535394331, + "Controller": { + "Configuration": { + "materials": [ + { + "Key": { + "materialSlotStableId": 2418540911 + }, + "Value": { + "MaterialAsset": { + "assetId": { + "guid": "{E66E4343-F45A-536D-AAE1-C4D096420640}" + }, + "assetHint": "materials/presets/pbr/metal_nickel_polished.azmaterial" + } + } + } + ] + } + } + }, + "Component_[8092226976542590265]": { + "$type": "EditorDisabledCompositionComponent", + "Id": 8092226976542590265 + } + } + }, + "Entity_[1832120346580]": { + "Id": "Entity_[1832120346580]", + "Name": "Entity1", + "Components": { + "Component_[11525365929370623807]": { + "$type": "EditorVisibilityComponent", + "Id": 11525365929370623807 + }, + "Component_[12334620273692642550]": { + "$type": "EditorLockComponent", + "Id": 12334620273692642550 + }, + "Component_[14389735759337977675]": { + "$type": "EditorPendingCompositionComponent", + "Id": 14389735759337977675 + }, + "Component_[16184381538555246534]": { + "$type": "AZ::Render::EditorMeshComponent", + "Id": 16184381538555246534, + "Controller": { + "Configuration": { + "ModelAsset": { + "assetId": { + "guid": "{E14975EF-E676-51A4-B826-3EF59CB645AA}", + "subId": 285127096 + }, + "assetHint": "testdata/objects/cube/cube.azmodel" + } + } + } + }, + "Component_[17962478023087084794]": { + "$type": "SelectionComponent", + "Id": 17962478023087084794 + }, + "Component_[18071675051915092508]": { + "$type": "EditorEntityIconComponent", + "Id": 18071675051915092508 + }, + "Component_[2115498007879087044]": { + "$type": "EditorInspectorComponent", + "Id": 2115498007879087044, + "ComponentOrderEntryArray": [ + { + "ComponentId": 399415038452606756 + }, + { + "ComponentId": 16184381538555246534, + "SortIndex": 1 + }, + { + "ComponentId": 7827190074535394331, + "SortIndex": 2 + } + ] + }, + "Component_[3518973002096080237]": { + "$type": "EditorOnlyEntityComponent", + "Id": 3518973002096080237 + }, + "Component_[399415038452606756]": { + "$type": "{27F1E1A1-8D9D-4C3B-BD3A-AFB9762449C0} TransformComponent", + "Id": 399415038452606756, + "Parent Entity": "ContainerEntity", + "Transform Data": { + "Translate": [ + 32.53014373779297, + -0.00018183141946792603, + 94.40913391113281 + ] + } + }, + "Component_[4564240319609068082]": { + "$type": "EditorEntitySortComponent", + "Id": 4564240319609068082 + }, + "Component_[7827190074535394331]": { + "$type": "EditorMaterialComponent", + "Id": 7827190074535394331, + "Controller": { + "Configuration": { + "materials": [ + { + "Key": { + "materialSlotStableId": 2418540911 + }, + "Value": { + "MaterialAsset": { + "assetId": { + "guid": "{C60A39AF-BB76-51BD-9468-A88C9A6F78D7}" + }, + "assetHint": "materials/presets/pbr/metal_cobalt_matte.azmaterial" + } + } + } + ] + } + } + }, + "Component_[8092226976542590265]": { + "$type": "EditorDisabledCompositionComponent", + "Id": 8092226976542590265 + } + } + }, + "Entity_[1836415313876]": { + "Id": "Entity_[1836415313876]", + "Name": "Entity1", + "Components": { + "Component_[11525365929370623807]": { + "$type": "EditorVisibilityComponent", + "Id": 11525365929370623807 + }, + "Component_[12334620273692642550]": { + "$type": "EditorLockComponent", + "Id": 12334620273692642550 + }, + "Component_[14389735759337977675]": { + "$type": "EditorPendingCompositionComponent", + "Id": 14389735759337977675 + }, + "Component_[16184381538555246534]": { + "$type": "AZ::Render::EditorMeshComponent", + "Id": 16184381538555246534, + "Controller": { + "Configuration": { + "ModelAsset": { + "assetId": { + "guid": "{E14975EF-E676-51A4-B826-3EF59CB645AA}", + "subId": 285127096 + }, + "assetHint": "testdata/objects/cube/cube.azmodel" + } + } + } + }, + "Component_[17962478023087084794]": { + "$type": "SelectionComponent", + "Id": 17962478023087084794 + }, + "Component_[18071675051915092508]": { + "$type": "EditorEntityIconComponent", + "Id": 18071675051915092508 + }, + "Component_[2115498007879087044]": { + "$type": "EditorInspectorComponent", + "Id": 2115498007879087044, + "ComponentOrderEntryArray": [ + { + "ComponentId": 399415038452606756 + }, + { + "ComponentId": 16184381538555246534, + "SortIndex": 1 + }, + { + "ComponentId": 7827190074535394331, + "SortIndex": 2 + } + ] + }, + "Component_[3518973002096080237]": { + "$type": "EditorOnlyEntityComponent", + "Id": 3518973002096080237 + }, + "Component_[399415038452606756]": { + "$type": "{27F1E1A1-8D9D-4C3B-BD3A-AFB9762449C0} TransformComponent", + "Id": 399415038452606756, + "Parent Entity": "ContainerEntity", + "Transform Data": { + "Translate": [ + 47.53014373779297, + -0.00018183141946792603, + 0.0 + ] + } + }, + "Component_[4564240319609068082]": { + "$type": "EditorEntitySortComponent", + "Id": 4564240319609068082 + }, + "Component_[7827190074535394331]": { + "$type": "EditorMaterialComponent", + "Id": 7827190074535394331, + "Controller": { + "Configuration": { + "materials": [ + { + "Key": { + "materialSlotStableId": 2418540911 + }, + "Value": { + "MaterialAsset": { + "assetId": { + "guid": "{A7F03135-ECAD-5440-99DB-E84ABA3D50DA}" + }, + "assetHint": "materials/presets/pbr/metal_iron_polished.azmaterial" + } + } + } + ] + } + } + }, + "Component_[8092226976542590265]": { + "$type": "EditorDisabledCompositionComponent", + "Id": 8092226976542590265 + } + } + }, + "Entity_[1840710281172]": { + "Id": "Entity_[1840710281172]", + "Name": "Entity1", + "Components": { + "Component_[11525365929370623807]": { + "$type": "EditorVisibilityComponent", + "Id": 11525365929370623807 + }, + "Component_[12334620273692642550]": { + "$type": "EditorLockComponent", + "Id": 12334620273692642550 + }, + "Component_[14389735759337977675]": { + "$type": "EditorPendingCompositionComponent", + "Id": 14389735759337977675 + }, + "Component_[16184381538555246534]": { + "$type": "AZ::Render::EditorMeshComponent", + "Id": 16184381538555246534, + "Controller": { + "Configuration": { + "ModelAsset": { + "assetId": { + "guid": "{E14975EF-E676-51A4-B826-3EF59CB645AA}", + "subId": 285127096 + }, + "assetHint": "testdata/objects/cube/cube.azmodel" + } + } + } + }, + "Component_[17962478023087084794]": { + "$type": "SelectionComponent", + "Id": 17962478023087084794 + }, + "Component_[18071675051915092508]": { + "$type": "EditorEntityIconComponent", + "Id": 18071675051915092508 + }, + "Component_[2115498007879087044]": { + "$type": "EditorInspectorComponent", + "Id": 2115498007879087044, + "ComponentOrderEntryArray": [ + { + "ComponentId": 399415038452606756 + }, + { + "ComponentId": 16184381538555246534, + "SortIndex": 1 + }, + { + "ComponentId": 7827190074535394331, + "SortIndex": 2 + } + ] + }, + "Component_[3518973002096080237]": { + "$type": "EditorOnlyEntityComponent", + "Id": 3518973002096080237 + }, + "Component_[399415038452606756]": { + "$type": "{27F1E1A1-8D9D-4C3B-BD3A-AFB9762449C0} TransformComponent", + "Id": 399415038452606756, + "Parent Entity": "ContainerEntity", + "Transform Data": { + "Translate": [ + -12.530563354492188, + -0.00018183141946792603, + 79.38228607177734 + ] + } + }, + "Component_[4564240319609068082]": { + "$type": "EditorEntitySortComponent", + "Id": 4564240319609068082 + }, + "Component_[7827190074535394331]": { + "$type": "EditorMaterialComponent", + "Id": 7827190074535394331, + "Controller": { + "Configuration": { + "materials": [ + { + "Key": { + "materialSlotStableId": 2418540911 + }, + "Value": { + "MaterialAsset": { + "assetId": { + "guid": "{F2AD0EBF-7137-58D1-9991-9552FAD41B19}" + }, + "assetHint": "materials/presets/pbr/metal_mercury.azmaterial" + } + } + } + ] + } + } + }, + "Component_[8092226976542590265]": { + "$type": "EditorDisabledCompositionComponent", + "Id": 8092226976542590265 + } + } + }, + "Entity_[1845005248468]": { + "Id": "Entity_[1845005248468]", + "Name": "Entity1", + "Components": { + "Component_[1057179753323467068]": { + "$type": "EditorMaterialComponent", + "Id": 1057179753323467068, + "Controller": { + "Configuration": { + "materials": [ + { + "Key": { + "materialSlotStableId": 2418540911 + }, + "Value": { + "MaterialAsset": { + "assetId": { + "guid": "{721188E0-B7CC-5D06-8D5D-39AF8ABF2EF9}" + }, + "assetHint": "materials/presets/pbr/metal_titanium.azmaterial" + } + } + } + ] + } + } + }, + "Component_[11525365929370623807]": { + "$type": "EditorVisibilityComponent", + "Id": 11525365929370623807 + }, + "Component_[12334620273692642550]": { + "$type": "EditorLockComponent", + "Id": 12334620273692642550 + }, + "Component_[14389735759337977675]": { + "$type": "EditorPendingCompositionComponent", + "Id": 14389735759337977675 + }, + "Component_[16184381538555246534]": { + "$type": "AZ::Render::EditorMeshComponent", + "Id": 16184381538555246534, + "Controller": { + "Configuration": { + "ModelAsset": { + "assetId": { + "guid": "{E14975EF-E676-51A4-B826-3EF59CB645AA}", + "subId": 285127096 + }, + "assetHint": "testdata/objects/cube/cube.azmodel" + } + } + } + }, + "Component_[17962478023087084794]": { + "$type": "SelectionComponent", + "Id": 17962478023087084794 + }, + "Component_[18071675051915092508]": { + "$type": "EditorEntityIconComponent", + "Id": 18071675051915092508 + }, + "Component_[2115498007879087044]": { + "$type": "EditorInspectorComponent", + "Id": 2115498007879087044, + "ComponentOrderEntryArray": [ + { + "ComponentId": 399415038452606756 + }, + { + "ComponentId": 16184381538555246534, + "SortIndex": 1 + }, + { + "ComponentId": 1057179753323467068, + "SortIndex": 2 + } + ] + }, + "Component_[3518973002096080237]": { + "$type": "EditorOnlyEntityComponent", + "Id": 3518973002096080237 + }, + "Component_[399415038452606756]": { + "$type": "{27F1E1A1-8D9D-4C3B-BD3A-AFB9762449C0} TransformComponent", + "Id": 399415038452606756, + "Parent Entity": "ContainerEntity", + "Transform Data": { + "Translate": [ + 12.530143737792969, + -0.00018183141946792603, + 24.533506393432617 + ] + } + }, + "Component_[4564240319609068082]": { + "$type": "EditorEntitySortComponent", + "Id": 4564240319609068082 + }, + "Component_[8092226976542590265]": { + "$type": "EditorDisabledCompositionComponent", + "Id": 8092226976542590265 + } + } + }, + "Entity_[1849300215764]": { + "Id": "Entity_[1849300215764]", + "Name": "Entity1", + "Components": { + "Component_[1057179753323467068]": { + "$type": "EditorMaterialComponent", + "Id": 1057179753323467068, + "Controller": { + "Configuration": { + "materials": [ + { + "Key": { + "materialSlotStableId": 2418540911 + }, + "Value": { + "MaterialAsset": { + "assetId": { + "guid": "{721188E0-B7CC-5D06-8D5D-39AF8ABF2EF9}" + }, + "assetHint": "materials/presets/pbr/metal_titanium.azmaterial" + } + } + } + ] + } + } + }, + "Component_[11525365929370623807]": { + "$type": "EditorVisibilityComponent", + "Id": 11525365929370623807 + }, + "Component_[12334620273692642550]": { + "$type": "EditorLockComponent", + "Id": 12334620273692642550 + }, + "Component_[14389735759337977675]": { + "$type": "EditorPendingCompositionComponent", + "Id": 14389735759337977675 + }, + "Component_[16184381538555246534]": { + "$type": "AZ::Render::EditorMeshComponent", + "Id": 16184381538555246534, + "Controller": { + "Configuration": { + "ModelAsset": { + "assetId": { + "guid": "{E14975EF-E676-51A4-B826-3EF59CB645AA}", + "subId": 285127096 + }, + "assetHint": "testdata/objects/cube/cube.azmodel" + } + } + } + }, + "Component_[17962478023087084794]": { + "$type": "SelectionComponent", + "Id": 17962478023087084794 + }, + "Component_[18071675051915092508]": { + "$type": "EditorEntityIconComponent", + "Id": 18071675051915092508 + }, + "Component_[2115498007879087044]": { + "$type": "EditorInspectorComponent", + "Id": 2115498007879087044, + "ComponentOrderEntryArray": [ + { + "ComponentId": 399415038452606756 + }, + { + "ComponentId": 16184381538555246534, + "SortIndex": 1 + }, + { + "ComponentId": 1057179753323467068, + "SortIndex": 2 + } + ] + }, + "Component_[3518973002096080237]": { + "$type": "EditorOnlyEntityComponent", + "Id": 3518973002096080237 + }, + "Component_[399415038452606756]": { + "$type": "{27F1E1A1-8D9D-4C3B-BD3A-AFB9762449C0} TransformComponent", + "Id": 399415038452606756, + "Parent Entity": "ContainerEntity", + "Transform Data": { + "Translate": [ + 12.530143737792969, + -0.00018183141946792603, + 9.475835800170898 + ] + } + }, + "Component_[4564240319609068082]": { + "$type": "EditorEntitySortComponent", + "Id": 4564240319609068082 + }, + "Component_[8092226976542590265]": { + "$type": "EditorDisabledCompositionComponent", + "Id": 8092226976542590265 + } + } + }, + "Entity_[1853595183060]": { + "Id": "Entity_[1853595183060]", + "Name": "Entity1", + "Components": { + "Component_[11525365929370623807]": { + "$type": "EditorVisibilityComponent", + "Id": 11525365929370623807 + }, + "Component_[12334620273692642550]": { + "$type": "EditorLockComponent", + "Id": 12334620273692642550 + }, + "Component_[14389735759337977675]": { + "$type": "EditorPendingCompositionComponent", + "Id": 14389735759337977675 + }, + "Component_[16184381538555246534]": { + "$type": "AZ::Render::EditorMeshComponent", + "Id": 16184381538555246534, + "Controller": { + "Configuration": { + "ModelAsset": { + "assetId": { + "guid": "{E14975EF-E676-51A4-B826-3EF59CB645AA}", + "subId": 285127096 + }, + "assetHint": "testdata/objects/cube/cube.azmodel" + } + } + } + }, + "Component_[17962478023087084794]": { + "$type": "SelectionComponent", + "Id": 17962478023087084794 + }, + "Component_[18071675051915092508]": { + "$type": "EditorEntityIconComponent", + "Id": 18071675051915092508 + }, + "Component_[2115498007879087044]": { + "$type": "EditorInspectorComponent", + "Id": 2115498007879087044, + "ComponentOrderEntryArray": [ + { + "ComponentId": 399415038452606756 + }, + { + "ComponentId": 16184381538555246534, + "SortIndex": 1 + }, + { + "ComponentId": 7827190074535394331, + "SortIndex": 2 + } + ] + }, + "Component_[3518973002096080237]": { + "$type": "EditorOnlyEntityComponent", + "Id": 3518973002096080237 + }, + "Component_[399415038452606756]": { + "$type": "{27F1E1A1-8D9D-4C3B-BD3A-AFB9762449C0} TransformComponent", + "Id": 399415038452606756, + "Parent Entity": "ContainerEntity", + "Transform Data": { + "Translate": [ + 27.53014373779297, + -0.00018183141946792603, + 9.475835800170898 + ] + } + }, + "Component_[4564240319609068082]": { + "$type": "EditorEntitySortComponent", + "Id": 4564240319609068082 + }, + "Component_[7827190074535394331]": { + "$type": "EditorMaterialComponent", + "Id": 7827190074535394331, + "Controller": { + "Configuration": { + "materials": [ + { + "Key": { + "materialSlotStableId": 2418540911 + }, + "Value": { + "MaterialAsset": { + "assetId": { + "guid": "{B7C712DC-4839-58BB-B522-A4F120084CF5}" + }, + "assetHint": "materials/presets/pbr/metal_chrome.azmaterial" + } + } + } + ] + } + } + }, + "Component_[8092226976542590265]": { + "$type": "EditorDisabledCompositionComponent", + "Id": 8092226976542590265 + } + } + }, + "Entity_[1857890150356]": { + "Id": "Entity_[1857890150356]", + "Name": "Entity1", + "Components": { + "Component_[11525365929370623807]": { + "$type": "EditorVisibilityComponent", + "Id": 11525365929370623807 + }, + "Component_[12334620273692642550]": { + "$type": "EditorLockComponent", + "Id": 12334620273692642550 + }, + "Component_[14389735759337977675]": { + "$type": "EditorPendingCompositionComponent", + "Id": 14389735759337977675 + }, + "Component_[16184381538555246534]": { + "$type": "AZ::Render::EditorMeshComponent", + "Id": 16184381538555246534, + "Controller": { + "Configuration": { + "ModelAsset": { + "assetId": { + "guid": "{E14975EF-E676-51A4-B826-3EF59CB645AA}", + "subId": 285127096 + }, + "assetHint": "testdata/objects/cube/cube.azmodel" + } + } + } + }, + "Component_[17962478023087084794]": { + "$type": "SelectionComponent", + "Id": 17962478023087084794 + }, + "Component_[18071675051915092508]": { + "$type": "EditorEntityIconComponent", + "Id": 18071675051915092508 + }, + "Component_[2115498007879087044]": { + "$type": "EditorInspectorComponent", + "Id": 2115498007879087044, + "ComponentOrderEntryArray": [ + { + "ComponentId": 399415038452606756 + }, + { + "ComponentId": 16184381538555246534, + "SortIndex": 1 + }, + { + "ComponentId": 7827190074535394331, + "SortIndex": 2 + } + ] + }, + "Component_[3518973002096080237]": { + "$type": "EditorOnlyEntityComponent", + "Id": 3518973002096080237 + }, + "Component_[399415038452606756]": { + "$type": "{27F1E1A1-8D9D-4C3B-BD3A-AFB9762449C0} TransformComponent", + "Id": 399415038452606756, + "Parent Entity": "ContainerEntity", + "Transform Data": { + "Translate": [ + -22.530563354492188, + -0.00018183141946792603, + 0.0 + ] + } + }, + "Component_[4564240319609068082]": { + "$type": "EditorEntitySortComponent", + "Id": 4564240319609068082 + }, + "Component_[7827190074535394331]": { + "$type": "EditorMaterialComponent", + "Id": 7827190074535394331, + "Controller": { + "Configuration": { + "materials": [ + { + "Key": { + "materialSlotStableId": 2418540911 + }, + "Value": { + "MaterialAsset": { + "assetId": { + "guid": "{FB4657EB-FB3A-5EC3-A772-DC36D6F733C3}" + }, + "assetHint": "materials/presets/pbr/metal_gold_polished.azmaterial" + } + } + } + ] + } + } + }, + "Component_[8092226976542590265]": { + "$type": "EditorDisabledCompositionComponent", + "Id": 8092226976542590265 + } + } + }, + "Entity_[1862185117652]": { + "Id": "Entity_[1862185117652]", + "Name": "Entity1", + "Components": { + "Component_[11525365929370623807]": { + "$type": "EditorVisibilityComponent", + "Id": 11525365929370623807 + }, + "Component_[12334620273692642550]": { + "$type": "EditorLockComponent", + "Id": 12334620273692642550 + }, + "Component_[14389735759337977675]": { + "$type": "EditorPendingCompositionComponent", + "Id": 14389735759337977675 + }, + "Component_[16184381538555246534]": { + "$type": "AZ::Render::EditorMeshComponent", + "Id": 16184381538555246534, + "Controller": { + "Configuration": { + "ModelAsset": { + "assetId": { + "guid": "{E14975EF-E676-51A4-B826-3EF59CB645AA}", + "subId": 285127096 + }, + "assetHint": "testdata/objects/cube/cube.azmodel" + } + } + } + }, + "Component_[17962478023087084794]": { + "$type": "SelectionComponent", + "Id": 17962478023087084794 + }, + "Component_[18071675051915092508]": { + "$type": "EditorEntityIconComponent", + "Id": 18071675051915092508 + }, + "Component_[2115498007879087044]": { + "$type": "EditorInspectorComponent", + "Id": 2115498007879087044, + "ComponentOrderEntryArray": [ + { + "ComponentId": 399415038452606756 + }, + { + "ComponentId": 16184381538555246534, + "SortIndex": 1 + }, + { + "ComponentId": 7827190074535394331, + "SortIndex": 2 + } + ] + }, + "Component_[3518973002096080237]": { + "$type": "EditorOnlyEntityComponent", + "Id": 3518973002096080237 + }, + "Component_[399415038452606756]": { + "$type": "{27F1E1A1-8D9D-4C3B-BD3A-AFB9762449C0} TransformComponent", + "Id": 399415038452606756, + "Parent Entity": "ContainerEntity", + "Transform Data": { + "Translate": [ + 27.53014373779297, + -0.00018183141946792603, + 74.93071746826172 + ] + } + }, + "Component_[4564240319609068082]": { + "$type": "EditorEntitySortComponent", + "Id": 4564240319609068082 + }, + "Component_[7827190074535394331]": { + "$type": "EditorMaterialComponent", + "Id": 7827190074535394331, + "Controller": { + "Configuration": { + "materials": [ + { + "Key": { + "materialSlotStableId": 2418540911 + }, + "Value": { + "MaterialAsset": { + "assetId": { + "guid": "{CAF50181-3384-5DF2-9304-C6E48E83C72D}" + }, + "assetHint": "materials/presets/pbr/metal_chrome_polished.azmaterial" + } + } + } + ] + } + } + }, + "Component_[8092226976542590265]": { + "$type": "EditorDisabledCompositionComponent", + "Id": 8092226976542590265 + } + } + }, + "Entity_[1866480084948]": { + "Id": "Entity_[1866480084948]", + "Name": "Entity1", + "Components": { + "Component_[11525365929370623807]": { + "$type": "EditorVisibilityComponent", + "Id": 11525365929370623807 + }, + "Component_[12334620273692642550]": { + "$type": "EditorLockComponent", + "Id": 12334620273692642550 + }, + "Component_[14389735759337977675]": { + "$type": "EditorPendingCompositionComponent", + "Id": 14389735759337977675 + }, + "Component_[16184381538555246534]": { + "$type": "AZ::Render::EditorMeshComponent", + "Id": 16184381538555246534, + "Controller": { + "Configuration": { + "ModelAsset": { + "assetId": { + "guid": "{E14975EF-E676-51A4-B826-3EF59CB645AA}", + "subId": 285127096 + }, + "assetHint": "testdata/objects/cube/cube.azmodel" + } + } + } + }, + "Component_[17962478023087084794]": { + "$type": "SelectionComponent", + "Id": 17962478023087084794 + }, + "Component_[18071675051915092508]": { + "$type": "EditorEntityIconComponent", + "Id": 18071675051915092508 + }, + "Component_[2115498007879087044]": { + "$type": "EditorInspectorComponent", + "Id": 2115498007879087044, + "ComponentOrderEntryArray": [ + { + "ComponentId": 399415038452606756 + }, + { + "ComponentId": 16184381538555246534, + "SortIndex": 1 + }, + { + "ComponentId": 7827190074535394331, + "SortIndex": 2 + } + ] + }, + "Component_[3518973002096080237]": { + "$type": "EditorOnlyEntityComponent", + "Id": 3518973002096080237 + }, + "Component_[399415038452606756]": { + "$type": "{27F1E1A1-8D9D-4C3B-BD3A-AFB9762449C0} TransformComponent", + "Id": 399415038452606756, + "Parent Entity": "ContainerEntity", + "Transform Data": { + "Translate": [ + -7.5305633544921875, + -0.00018183141946792603, + 89.95755767822266 + ] + } + }, + "Component_[4564240319609068082]": { + "$type": "EditorEntitySortComponent", + "Id": 4564240319609068082 + }, + "Component_[7827190074535394331]": { + "$type": "EditorMaterialComponent", + "Id": 7827190074535394331, + "Controller": { + "Configuration": { + "materials": [ + { + "Key": { + "materialSlotStableId": 2418540911 + }, + "Value": { + "MaterialAsset": { + "assetId": { + "guid": "{E66E4343-F45A-536D-AAE1-C4D096420640}" + }, + "assetHint": "materials/presets/pbr/metal_nickel_polished.azmaterial" + } + } + } + ] + } + } + }, + "Component_[8092226976542590265]": { + "$type": "EditorDisabledCompositionComponent", + "Id": 8092226976542590265 + } + } + }, + "Entity_[1870775052244]": { + "Id": "Entity_[1870775052244]", + "Name": "Entity1", + "Components": { + "Component_[11525365929370623807]": { + "$type": "EditorVisibilityComponent", + "Id": 11525365929370623807 + }, + "Component_[12334620273692642550]": { + "$type": "EditorLockComponent", + "Id": 12334620273692642550 + }, + "Component_[14389735759337977675]": { + "$type": "EditorPendingCompositionComponent", + "Id": 14389735759337977675 + }, + "Component_[16184381538555246534]": { + "$type": "AZ::Render::EditorMeshComponent", + "Id": 16184381538555246534, + "Controller": { + "Configuration": { + "ModelAsset": { + "assetId": { + "guid": "{E14975EF-E676-51A4-B826-3EF59CB645AA}", + "subId": 285127096 + }, + "assetHint": "testdata/objects/cube/cube.azmodel" + } + } + } + }, + "Component_[17962478023087084794]": { + "$type": "SelectionComponent", + "Id": 17962478023087084794 + }, + "Component_[18071675051915092508]": { + "$type": "EditorEntityIconComponent", + "Id": 18071675051915092508 + }, + "Component_[2115498007879087044]": { + "$type": "EditorInspectorComponent", + "Id": 2115498007879087044, + "ComponentOrderEntryArray": [ + { + "ComponentId": 399415038452606756 + }, + { + "ComponentId": 16184381538555246534, + "SortIndex": 1 + }, + { + "ComponentId": 7827190074535394331, + "SortIndex": 2 + } + ] + }, + "Component_[3518973002096080237]": { + "$type": "EditorOnlyEntityComponent", + "Id": 3518973002096080237 + }, + "Component_[399415038452606756]": { + "$type": "{27F1E1A1-8D9D-4C3B-BD3A-AFB9762449C0} TransformComponent", + "Id": 399415038452606756, + "Parent Entity": "ContainerEntity", + "Transform Data": { + "Translate": [ + 42.53014373779297, + -0.00018183141946792603, + 34.53608703613281 + ] + } + }, + "Component_[4564240319609068082]": { + "$type": "EditorEntitySortComponent", + "Id": 4564240319609068082 + }, + "Component_[7827190074535394331]": { + "$type": "EditorMaterialComponent", + "Id": 7827190074535394331, + "Controller": { + "Configuration": { + "materials": [ + { + "Key": { + "materialSlotStableId": 2418540911 + }, + "Value": { + "MaterialAsset": { + "assetId": { + "guid": "{5BC13D95-377E-53EA-9A93-156384BE8B04}" + }, + "assetHint": "materials/presets/pbr/metal_gold_matte.azmaterial" + } + } + } + ] + } + } + }, + "Component_[8092226976542590265]": { + "$type": "EditorDisabledCompositionComponent", + "Id": 8092226976542590265 + } + } + }, + "Entity_[1875070019540]": { + "Id": "Entity_[1875070019540]", + "Name": "Entity1", + "Components": { + "Component_[11525365929370623807]": { + "$type": "EditorVisibilityComponent", + "Id": 11525365929370623807 + }, + "Component_[12334620273692642550]": { + "$type": "EditorLockComponent", + "Id": 12334620273692642550 + }, + "Component_[14389735759337977675]": { + "$type": "EditorPendingCompositionComponent", + "Id": 14389735759337977675 + }, + "Component_[16184381538555246534]": { + "$type": "AZ::Render::EditorMeshComponent", + "Id": 16184381538555246534, + "Controller": { + "Configuration": { + "ModelAsset": { + "assetId": { + "guid": "{E14975EF-E676-51A4-B826-3EF59CB645AA}", + "subId": 285127096 + }, + "assetHint": "testdata/objects/cube/cube.azmodel" + } + } + } + }, + "Component_[17962478023087084794]": { + "$type": "SelectionComponent", + "Id": 17962478023087084794 + }, + "Component_[18071675051915092508]": { + "$type": "EditorEntityIconComponent", + "Id": 18071675051915092508 + }, + "Component_[2115498007879087044]": { + "$type": "EditorInspectorComponent", + "Id": 2115498007879087044, + "ComponentOrderEntryArray": [ + { + "ComponentId": 399415038452606756 + }, + { + "ComponentId": 16184381538555246534, + "SortIndex": 1 + }, + { + "ComponentId": 7827190074535394331, + "SortIndex": 2 + } + ] + }, + "Component_[3518973002096080237]": { + "$type": "EditorOnlyEntityComponent", + "Id": 3518973002096080237 + }, + "Component_[399415038452606756]": { + "$type": "{27F1E1A1-8D9D-4C3B-BD3A-AFB9762449C0} TransformComponent", + "Id": 399415038452606756, + "Parent Entity": "ContainerEntity", + "Transform Data": { + "Translate": [ + 7.530143737792969, + -0.00018183141946792603, + 24.533506393432617 + ] + } + }, + "Component_[4564240319609068082]": { + "$type": "EditorEntitySortComponent", + "Id": 4564240319609068082 + }, + "Component_[7827190074535394331]": { + "$type": "EditorMaterialComponent", + "Id": 7827190074535394331, + "Controller": { + "Configuration": { + "materials": [ + { + "Key": { + "materialSlotStableId": 2418540911 + }, + "Value": { + "MaterialAsset": { + "assetId": { + "guid": "{CDA13277-5EAB-5E2A-93F5-B7003597FBCE}" + }, + "assetHint": "materials/presets/pbr/metal_silver.azmaterial" + } + } + } + ] + } + } + }, + "Component_[8092226976542590265]": { + "$type": "EditorDisabledCompositionComponent", + "Id": 8092226976542590265 + } + } + }, + "Entity_[1879364986836]": { + "Id": "Entity_[1879364986836]", + "Name": "Entity1", + "Components": { + "Component_[11525365929370623807]": { + "$type": "EditorVisibilityComponent", + "Id": 11525365929370623807 + }, + "Component_[12334620273692642550]": { + "$type": "EditorLockComponent", + "Id": 12334620273692642550 + }, + "Component_[14389735759337977675]": { + "$type": "EditorPendingCompositionComponent", + "Id": 14389735759337977675 + }, + "Component_[16184381538555246534]": { + "$type": "AZ::Render::EditorMeshComponent", + "Id": 16184381538555246534, + "Controller": { + "Configuration": { + "ModelAsset": { + "assetId": { + "guid": "{E14975EF-E676-51A4-B826-3EF59CB645AA}", + "subId": 285127096 + }, + "assetHint": "testdata/objects/cube/cube.azmodel" + } + } + } + }, + "Component_[17962478023087084794]": { + "$type": "SelectionComponent", + "Id": 17962478023087084794 + }, + "Component_[18071675051915092508]": { + "$type": "EditorEntityIconComponent", + "Id": 18071675051915092508 + }, + "Component_[2115498007879087044]": { + "$type": "EditorInspectorComponent", + "Id": 2115498007879087044, + "ComponentOrderEntryArray": [ + { + "ComponentId": 399415038452606756 + }, + { + "ComponentId": 16184381538555246534, + "SortIndex": 1 + }, + { + "ComponentId": 7827190074535394331, + "SortIndex": 2 + } + ] + }, + "Component_[3518973002096080237]": { + "$type": "EditorOnlyEntityComponent", + "Id": 3518973002096080237 + }, + "Component_[399415038452606756]": { + "$type": "{27F1E1A1-8D9D-4C3B-BD3A-AFB9762449C0} TransformComponent", + "Id": 399415038452606756, + "Parent Entity": "ContainerEntity", + "Transform Data": { + "Translate": [ + 37.53014373779297, + 0.010651908814907074, + 114.53101348876953 + ] + } + }, + "Component_[4564240319609068082]": { + "$type": "EditorEntitySortComponent", + "Id": 4564240319609068082 + }, + "Component_[7827190074535394331]": { + "$type": "EditorMaterialComponent", + "Id": 7827190074535394331, + "Controller": { + "Configuration": { + "materials": [ + { + "Key": { + "materialSlotStableId": 2418540911 + }, + "Value": { + "MaterialAsset": { + "assetId": { + "guid": "{E621C5BF-B8E1-55F0-A791-EC960F2FA46F}" + }, + "assetHint": "materials/presets/pbr/metal_copper.azmaterial" + } + } + } + ] + } + } + }, + "Component_[8092226976542590265]": { + "$type": "EditorDisabledCompositionComponent", + "Id": 8092226976542590265 + } + } + }, + "Entity_[1883659954132]": { + "Id": "Entity_[1883659954132]", + "Name": "Entity1", + "Components": { + "Component_[11525365929370623807]": { + "$type": "EditorVisibilityComponent", + "Id": 11525365929370623807 + }, + "Component_[12334620273692642550]": { + "$type": "EditorLockComponent", + "Id": 12334620273692642550 + }, + "Component_[14389735759337977675]": { + "$type": "EditorPendingCompositionComponent", + "Id": 14389735759337977675 + }, + "Component_[16184381538555246534]": { + "$type": "AZ::Render::EditorMeshComponent", + "Id": 16184381538555246534, + "Controller": { + "Configuration": { + "ModelAsset": { + "assetId": { + "guid": "{E14975EF-E676-51A4-B826-3EF59CB645AA}", + "subId": 285127096 + }, + "assetHint": "testdata/objects/cube/cube.azmodel" + } + } + } + }, + "Component_[17962478023087084794]": { + "$type": "SelectionComponent", + "Id": 17962478023087084794 + }, + "Component_[18071675051915092508]": { + "$type": "EditorEntityIconComponent", + "Id": 18071675051915092508 + }, + "Component_[2115498007879087044]": { + "$type": "EditorInspectorComponent", + "Id": 2115498007879087044, + "ComponentOrderEntryArray": [ + { + "ComponentId": 399415038452606756 + }, + { + "ComponentId": 16184381538555246534, + "SortIndex": 1 + }, + { + "ComponentId": 7827190074535394331, + "SortIndex": 2 + } + ] + }, + "Component_[3518973002096080237]": { + "$type": "EditorOnlyEntityComponent", + "Id": 3518973002096080237 + }, + "Component_[399415038452606756]": { + "$type": "{27F1E1A1-8D9D-4C3B-BD3A-AFB9762449C0} TransformComponent", + "Id": 399415038452606756, + "Parent Entity": "ContainerEntity", + "Transform Data": { + "Translate": [ + 42.53014373779297, + -0.00018183141946792603, + 15.057670593261719 + ] + } + }, + "Component_[4564240319609068082]": { + "$type": "EditorEntitySortComponent", + "Id": 4564240319609068082 + }, + "Component_[7827190074535394331]": { + "$type": "EditorMaterialComponent", + "Id": 7827190074535394331, + "Controller": { + "Configuration": { + "materials": [ + { + "Key": { + "materialSlotStableId": 2418540911 + }, + "Value": { + "MaterialAsset": { + "assetId": { + "guid": "{FB4657EB-FB3A-5EC3-A772-DC36D6F733C3}" + }, + "assetHint": "materials/presets/pbr/metal_gold_polished.azmaterial" + } + } + } + ] + } + } + }, + "Component_[8092226976542590265]": { + "$type": "EditorDisabledCompositionComponent", + "Id": 8092226976542590265 + } + } + }, + "Entity_[1887954921428]": { + "Id": "Entity_[1887954921428]", + "Name": "Entity1", + "Components": { + "Component_[11525365929370623807]": { + "$type": "EditorVisibilityComponent", + "Id": 11525365929370623807 + }, + "Component_[12334620273692642550]": { + "$type": "EditorLockComponent", + "Id": 12334620273692642550 + }, + "Component_[14389735759337977675]": { + "$type": "EditorPendingCompositionComponent", + "Id": 14389735759337977675 + }, + "Component_[16184381538555246534]": { + "$type": "AZ::Render::EditorMeshComponent", + "Id": 16184381538555246534, + "Controller": { + "Configuration": { + "ModelAsset": { + "assetId": { + "guid": "{E14975EF-E676-51A4-B826-3EF59CB645AA}", + "subId": 285127096 + }, + "assetHint": "testdata/objects/cube/cube.azmodel" + } + } + } + }, + "Component_[17962478023087084794]": { + "$type": "SelectionComponent", + "Id": 17962478023087084794 + }, + "Component_[18071675051915092508]": { + "$type": "EditorEntityIconComponent", + "Id": 18071675051915092508 + }, + "Component_[2115498007879087044]": { + "$type": "EditorInspectorComponent", + "Id": 2115498007879087044, + "ComponentOrderEntryArray": [ + { + "ComponentId": 399415038452606756 + }, + { + "ComponentId": 16184381538555246534, + "SortIndex": 1 + }, + { + "ComponentId": 7827190074535394331, + "SortIndex": 2 + } + ] + }, + "Component_[3518973002096080237]": { + "$type": "EditorOnlyEntityComponent", + "Id": 3518973002096080237 + }, + "Component_[399415038452606756]": { + "$type": "{27F1E1A1-8D9D-4C3B-BD3A-AFB9762449C0} TransformComponent", + "Id": 399415038452606756, + "Parent Entity": "ContainerEntity", + "Transform Data": { + "Translate": [ + -42.53056335449219, + -0.00018183141946792603, + 94.40913391113281 + ] + } + }, + "Component_[4564240319609068082]": { + "$type": "EditorEntitySortComponent", + "Id": 4564240319609068082 + }, + "Component_[7827190074535394331]": { + "$type": "EditorMaterialComponent", + "Id": 7827190074535394331, + "Controller": { + "Configuration": { + "materials": [ + { + "Key": { + "materialSlotStableId": 2418540911 + }, + "Value": { + "MaterialAsset": { + "assetId": { + "guid": "{AE350D9F-0000-526D-B49C-4303D687BB86}" + }, + "assetHint": "materials/presets/pbr/metal_brass_matte.azmaterial" + } + } + } + ] + } + } + }, + "Component_[8092226976542590265]": { + "$type": "EditorDisabledCompositionComponent", + "Id": 8092226976542590265 + } + } + }, + "Entity_[1892249888724]": { + "Id": "Entity_[1892249888724]", + "Name": "Entity1", + "Components": { + "Component_[11525365929370623807]": { + "$type": "EditorVisibilityComponent", + "Id": 11525365929370623807 + }, + "Component_[12334620273692642550]": { + "$type": "EditorLockComponent", + "Id": 12334620273692642550 + }, + "Component_[14389735759337977675]": { + "$type": "EditorPendingCompositionComponent", + "Id": 14389735759337977675 + }, + "Component_[16184381538555246534]": { + "$type": "AZ::Render::EditorMeshComponent", + "Id": 16184381538555246534, + "Controller": { + "Configuration": { + "ModelAsset": { + "assetId": { + "guid": "{E14975EF-E676-51A4-B826-3EF59CB645AA}", + "subId": 285127096 + }, + "assetHint": "testdata/objects/cube/cube.azmodel" + } + } + } + }, + "Component_[17962478023087084794]": { + "$type": "SelectionComponent", + "Id": 17962478023087084794 + }, + "Component_[18071675051915092508]": { + "$type": "EditorEntityIconComponent", + "Id": 18071675051915092508 + }, + "Component_[2115498007879087044]": { + "$type": "EditorInspectorComponent", + "Id": 2115498007879087044, + "ComponentOrderEntryArray": [ + { + "ComponentId": 399415038452606756 + }, + { + "ComponentId": 16184381538555246534, + "SortIndex": 1 + }, + { + "ComponentId": 7827190074535394331, + "SortIndex": 2 + } + ] + }, + "Component_[3518973002096080237]": { + "$type": "EditorOnlyEntityComponent", + "Id": 3518973002096080237 + }, + "Component_[399415038452606756]": { + "$type": "{27F1E1A1-8D9D-4C3B-BD3A-AFB9762449C0} TransformComponent", + "Id": 399415038452606756, + "Parent Entity": "ContainerEntity", + "Transform Data": { + "Translate": [ + -17.530563354492188, + -0.00018183141946792603, + 39.56034851074219 + ] + } + }, + "Component_[4564240319609068082]": { + "$type": "EditorEntitySortComponent", + "Id": 4564240319609068082 + }, + "Component_[7827190074535394331]": { + "$type": "EditorMaterialComponent", + "Id": 7827190074535394331, + "Controller": { + "Configuration": { + "materials": [ + { + "Key": { + "materialSlotStableId": 2418540911 + }, + "Value": { + "MaterialAsset": { + "assetId": { + "guid": "{892EA944-0325-5FA6-94D7-4AB4FC02A0F5}" + }, + "assetHint": "materials/presets/pbr/metal_iron.azmaterial" + } + } + } + ] + } + } + }, + "Component_[8092226976542590265]": { + "$type": "EditorDisabledCompositionComponent", + "Id": 8092226976542590265 + } + } + }, + "Entity_[1896544856020]": { + "Id": "Entity_[1896544856020]", + "Name": "Entity1", + "Components": { + "Component_[11525365929370623807]": { + "$type": "EditorVisibilityComponent", + "Id": 11525365929370623807 + }, + "Component_[12334620273692642550]": { + "$type": "EditorLockComponent", + "Id": 12334620273692642550 + }, + "Component_[14389735759337977675]": { + "$type": "EditorPendingCompositionComponent", + "Id": 14389735759337977675 + }, + "Component_[16184381538555246534]": { + "$type": "AZ::Render::EditorMeshComponent", + "Id": 16184381538555246534, + "Controller": { + "Configuration": { + "ModelAsset": { + "assetId": { + "guid": "{E14975EF-E676-51A4-B826-3EF59CB645AA}", + "subId": 285127096 + }, + "assetHint": "testdata/objects/cube/cube.azmodel" + } + } + } + }, + "Component_[17962478023087084794]": { + "$type": "SelectionComponent", + "Id": 17962478023087084794 + }, + "Component_[18071675051915092508]": { + "$type": "EditorEntityIconComponent", + "Id": 18071675051915092508 + }, + "Component_[2115498007879087044]": { + "$type": "EditorInspectorComponent", + "Id": 2115498007879087044, + "ComponentOrderEntryArray": [ + { + "ComponentId": 399415038452606756 + }, + { + "ComponentId": 16184381538555246534, + "SortIndex": 1 + }, + { + "ComponentId": 7827190074535394331, + "SortIndex": 2 + } + ] + }, + "Component_[3518973002096080237]": { + "$type": "EditorOnlyEntityComponent", + "Id": 3518973002096080237 + }, + "Component_[399415038452606756]": { + "$type": "{27F1E1A1-8D9D-4C3B-BD3A-AFB9762449C0} TransformComponent", + "Id": 399415038452606756, + "Parent Entity": "ContainerEntity", + "Transform Data": { + "Translate": [ + 32.53014373779297, + -0.00018183141946792603, + 34.53608703613281 + ] + } + }, + "Component_[4564240319609068082]": { + "$type": "EditorEntitySortComponent", + "Id": 4564240319609068082 + }, + "Component_[7827190074535394331]": { + "$type": "EditorMaterialComponent", + "Id": 7827190074535394331, + "Controller": { + "Configuration": { + "materials": [ + { + "Key": { + "materialSlotStableId": 2418540911 + }, + "Value": { + "MaterialAsset": { + "assetId": { + "guid": "{C60A39AF-BB76-51BD-9468-A88C9A6F78D7}" + }, + "assetHint": "materials/presets/pbr/metal_cobalt_matte.azmaterial" + } + } + } + ] + } + } + }, + "Component_[8092226976542590265]": { + "$type": "EditorDisabledCompositionComponent", + "Id": 8092226976542590265 + } + } + }, + "Entity_[1900839823316]": { + "Id": "Entity_[1900839823316]", + "Name": "Entity1", + "Components": { + "Component_[11525365929370623807]": { + "$type": "EditorVisibilityComponent", + "Id": 11525365929370623807 + }, + "Component_[12334620273692642550]": { + "$type": "EditorLockComponent", + "Id": 12334620273692642550 + }, + "Component_[14389735759337977675]": { + "$type": "EditorPendingCompositionComponent", + "Id": 14389735759337977675 + }, + "Component_[16184381538555246534]": { + "$type": "AZ::Render::EditorMeshComponent", + "Id": 16184381538555246534, + "Controller": { + "Configuration": { + "ModelAsset": { + "assetId": { + "guid": "{E14975EF-E676-51A4-B826-3EF59CB645AA}", + "subId": 285127096 + }, + "assetHint": "testdata/objects/cube/cube.azmodel" + } + } + } + }, + "Component_[17962478023087084794]": { + "$type": "SelectionComponent", + "Id": 17962478023087084794 + }, + "Component_[18071675051915092508]": { + "$type": "EditorEntityIconComponent", + "Id": 18071675051915092508 + }, + "Component_[2115498007879087044]": { + "$type": "EditorInspectorComponent", + "Id": 2115498007879087044, + "ComponentOrderEntryArray": [ + { + "ComponentId": 399415038452606756 + }, + { + "ComponentId": 16184381538555246534, + "SortIndex": 1 + }, + { + "ComponentId": 7827190074535394331, + "SortIndex": 2 + } + ] + }, + "Component_[3518973002096080237]": { + "$type": "EditorOnlyEntityComponent", + "Id": 3518973002096080237 + }, + "Component_[399415038452606756]": { + "$type": "{27F1E1A1-8D9D-4C3B-BD3A-AFB9762449C0} TransformComponent", + "Id": 399415038452606756, + "Parent Entity": "ContainerEntity", + "Transform Data": { + "Translate": [ + 27.53014373779297, + -0.00018183141946792603, + 59.873046875 + ] + } + }, + "Component_[4564240319609068082]": { + "$type": "EditorEntitySortComponent", + "Id": 4564240319609068082 + }, + "Component_[7827190074535394331]": { + "$type": "EditorMaterialComponent", + "Id": 7827190074535394331, + "Controller": { + "Configuration": { + "materials": [ + { + "Key": { + "materialSlotStableId": 2418540911 + }, + "Value": { + "MaterialAsset": { + "assetId": { + "guid": "{CAF50181-3384-5DF2-9304-C6E48E83C72D}" + }, + "assetHint": "materials/presets/pbr/metal_chrome_polished.azmaterial" + } + } + } + ] + } + } + }, + "Component_[8092226976542590265]": { + "$type": "EditorDisabledCompositionComponent", + "Id": 8092226976542590265 + } + } + }, + "Entity_[1905134790612]": { + "Id": "Entity_[1905134790612]", + "Name": "Entity1", + "Components": { + "Component_[11525365929370623807]": { + "$type": "EditorVisibilityComponent", + "Id": 11525365929370623807 + }, + "Component_[12334620273692642550]": { + "$type": "EditorLockComponent", + "Id": 12334620273692642550 + }, + "Component_[14389735759337977675]": { + "$type": "EditorPendingCompositionComponent", + "Id": 14389735759337977675 + }, + "Component_[16184381538555246534]": { + "$type": "AZ::Render::EditorMeshComponent", + "Id": 16184381538555246534, + "Controller": { + "Configuration": { + "ModelAsset": { + "assetId": { + "guid": "{E14975EF-E676-51A4-B826-3EF59CB645AA}", + "subId": 285127096 + }, + "assetHint": "testdata/objects/cube/cube.azmodel" + } + } + } + }, + "Component_[17962478023087084794]": { + "$type": "SelectionComponent", + "Id": 17962478023087084794 + }, + "Component_[18071675051915092508]": { + "$type": "EditorEntityIconComponent", + "Id": 18071675051915092508 + }, + "Component_[2115498007879087044]": { + "$type": "EditorInspectorComponent", + "Id": 2115498007879087044, + "ComponentOrderEntryArray": [ + { + "ComponentId": 399415038452606756 + }, + { + "ComponentId": 16184381538555246534, + "SortIndex": 1 + }, + { + "ComponentId": 7827190074535394331, + "SortIndex": 2 + } + ] + }, + "Component_[3518973002096080237]": { + "$type": "EditorOnlyEntityComponent", + "Id": 3518973002096080237 + }, + "Component_[399415038452606756]": { + "$type": "{27F1E1A1-8D9D-4C3B-BD3A-AFB9762449C0} TransformComponent", + "Id": 399415038452606756, + "Parent Entity": "ContainerEntity", + "Transform Data": { + "Translate": [ + 32.53014373779297, + -0.00018183141946792603, + 105.0152359008789 + ] + } + }, + "Component_[4564240319609068082]": { + "$type": "EditorEntitySortComponent", + "Id": 4564240319609068082 + }, + "Component_[7827190074535394331]": { + "$type": "EditorMaterialComponent", + "Id": 7827190074535394331, + "Controller": { + "Configuration": { + "materials": [ + { + "Key": { + "materialSlotStableId": 2418540911 + }, + "Value": { + "MaterialAsset": { + "assetId": { + "guid": "{93DF55AE-8D1B-5AD1-A609-05F1BD9F6EA0}" + }, + "assetHint": "materials/presets/pbr/metal_cobalt_polished.azmaterial" + } + } + } + ] + } + } + }, + "Component_[8092226976542590265]": { + "$type": "EditorDisabledCompositionComponent", + "Id": 8092226976542590265 + } + } + }, + "Entity_[1909429757908]": { + "Id": "Entity_[1909429757908]", + "Name": "Entity1", + "Components": { + "Component_[11525365929370623807]": { + "$type": "EditorVisibilityComponent", + "Id": 11525365929370623807 + }, + "Component_[12334620273692642550]": { + "$type": "EditorLockComponent", + "Id": 12334620273692642550 + }, + "Component_[14389735759337977675]": { + "$type": "EditorPendingCompositionComponent", + "Id": 14389735759337977675 + }, + "Component_[16184381538555246534]": { + "$type": "AZ::Render::EditorMeshComponent", + "Id": 16184381538555246534, + "Controller": { + "Configuration": { + "ModelAsset": { + "assetId": { + "guid": "{E14975EF-E676-51A4-B826-3EF59CB645AA}", + "subId": 285127096 + }, + "assetHint": "testdata/objects/cube/cube.azmodel" + } + } + } + }, + "Component_[17962478023087084794]": { + "$type": "SelectionComponent", + "Id": 17962478023087084794 + }, + "Component_[18071675051915092508]": { + "$type": "EditorEntityIconComponent", + "Id": 18071675051915092508 + }, + "Component_[2115498007879087044]": { + "$type": "EditorInspectorComponent", + "Id": 2115498007879087044, + "ComponentOrderEntryArray": [ + { + "ComponentId": 399415038452606756 + }, + { + "ComponentId": 16184381538555246534, + "SortIndex": 1 + }, + { + "ComponentId": 7827190074535394331, + "SortIndex": 2 + } + ] + }, + "Component_[3518973002096080237]": { + "$type": "EditorOnlyEntityComponent", + "Id": 3518973002096080237 + }, + "Component_[399415038452606756]": { + "$type": "{27F1E1A1-8D9D-4C3B-BD3A-AFB9762449C0} TransformComponent", + "Id": 399415038452606756, + "Parent Entity": "ContainerEntity", + "Transform Data": { + "Translate": [ + -12.530563354492188, + -0.00018183141946792603, + 99.43339538574219 + ] + } + }, + "Component_[4564240319609068082]": { + "$type": "EditorEntitySortComponent", + "Id": 4564240319609068082 + }, + "Component_[7827190074535394331]": { + "$type": "EditorMaterialComponent", + "Id": 7827190074535394331, + "Controller": { + "Configuration": { + "materials": [ + { + "Key": { + "materialSlotStableId": 2418540911 + }, + "Value": { + "MaterialAsset": { + "assetId": { + "guid": "{F2AD0EBF-7137-58D1-9991-9552FAD41B19}" + }, + "assetHint": "materials/presets/pbr/metal_mercury.azmaterial" + } + } + } + ] + } + } + }, + "Component_[8092226976542590265]": { + "$type": "EditorDisabledCompositionComponent", + "Id": 8092226976542590265 + } + } + }, + "Entity_[1913724725204]": { + "Id": "Entity_[1913724725204]", + "Name": "Entity1", + "Components": { + "Component_[11525365929370623807]": { + "$type": "EditorVisibilityComponent", + "Id": 11525365929370623807 + }, + "Component_[12334620273692642550]": { + "$type": "EditorLockComponent", + "Id": 12334620273692642550 + }, + "Component_[14389735759337977675]": { + "$type": "EditorPendingCompositionComponent", + "Id": 14389735759337977675 + }, + "Component_[16184381538555246534]": { + "$type": "AZ::Render::EditorMeshComponent", + "Id": 16184381538555246534, + "Controller": { + "Configuration": { + "ModelAsset": { + "assetId": { + "guid": "{E14975EF-E676-51A4-B826-3EF59CB645AA}", + "subId": 285127096 + }, + "assetHint": "testdata/objects/cube/cube.azmodel" + } + } + } + }, + "Component_[17962478023087084794]": { + "$type": "SelectionComponent", + "Id": 17962478023087084794 + }, + "Component_[18071675051915092508]": { + "$type": "EditorEntityIconComponent", + "Id": 18071675051915092508 + }, + "Component_[2115498007879087044]": { + "$type": "EditorInspectorComponent", + "Id": 2115498007879087044, + "ComponentOrderEntryArray": [ + { + "ComponentId": 399415038452606756 + }, + { + "ComponentId": 16184381538555246534, + "SortIndex": 1 + }, + { + "ComponentId": 7827190074535394331, + "SortIndex": 2 + } + ] + }, + "Component_[3518973002096080237]": { + "$type": "EditorOnlyEntityComponent", + "Id": 3518973002096080237 + }, + "Component_[399415038452606756]": { + "$type": "{27F1E1A1-8D9D-4C3B-BD3A-AFB9762449C0} TransformComponent", + "Id": 399415038452606756, + "Parent Entity": "ContainerEntity", + "Transform Data": { + "Translate": [ + -17.530563354492188, + -0.00018183141946792603, + 79.38228607177734 + ] + } + }, + "Component_[4564240319609068082]": { + "$type": "EditorEntitySortComponent", + "Id": 4564240319609068082 + }, + "Component_[7827190074535394331]": { + "$type": "EditorMaterialComponent", + "Id": 7827190074535394331, + "Controller": { + "Configuration": { + "materials": [ + { + "Key": { + "materialSlotStableId": 2418540911 + }, + "Value": { + "MaterialAsset": { + "assetId": { + "guid": "{970148AC-7258-5EC8-9CE7-F4EF93164D93}" + }, + "assetHint": "materials/presets/pbr/metal_iron_matte.azmaterial" + } + } + } + ] + } + } + }, + "Component_[8092226976542590265]": { + "$type": "EditorDisabledCompositionComponent", + "Id": 8092226976542590265 + } + } + }, + "Entity_[1918019692500]": { + "Id": "Entity_[1918019692500]", + "Name": "Entity1", + "Components": { + "Component_[11525365929370623807]": { + "$type": "EditorVisibilityComponent", + "Id": 11525365929370623807 + }, + "Component_[12334620273692642550]": { + "$type": "EditorLockComponent", + "Id": 12334620273692642550 + }, + "Component_[14389735759337977675]": { + "$type": "EditorPendingCompositionComponent", + "Id": 14389735759337977675 + }, + "Component_[16184381538555246534]": { + "$type": "AZ::Render::EditorMeshComponent", + "Id": 16184381538555246534, + "Controller": { + "Configuration": { + "ModelAsset": { + "assetId": { + "guid": "{E14975EF-E676-51A4-B826-3EF59CB645AA}", + "subId": 285127096 + }, + "assetHint": "testdata/objects/cube/cube.azmodel" + } + } + } + }, + "Component_[17962478023087084794]": { + "$type": "SelectionComponent", + "Id": 17962478023087084794 + }, + "Component_[18071675051915092508]": { + "$type": "EditorEntityIconComponent", + "Id": 18071675051915092508 + }, + "Component_[2115498007879087044]": { + "$type": "EditorInspectorComponent", + "Id": 2115498007879087044, + "ComponentOrderEntryArray": [ + { + "ComponentId": 399415038452606756 + }, + { + "ComponentId": 16184381538555246534, + "SortIndex": 1 + }, + { + "ComponentId": 7827190074535394331, + "SortIndex": 2 + } + ] + }, + "Component_[3518973002096080237]": { + "$type": "EditorOnlyEntityComponent", + "Id": 3518973002096080237 + }, + "Component_[399415038452606756]": { + "$type": "{27F1E1A1-8D9D-4C3B-BD3A-AFB9762449C0} TransformComponent", + "Id": 399415038452606756, + "Parent Entity": "ContainerEntity", + "Transform Data": { + "Translate": [ + -2.5305633544921875, + -0.00018183141946792603, + 99.43339538574219 + ] + } + }, + "Component_[4564240319609068082]": { + "$type": "EditorEntitySortComponent", + "Id": 4564240319609068082 + }, + "Component_[7827190074535394331]": { + "$type": "EditorMaterialComponent", + "Id": 7827190074535394331, + "Controller": { + "Configuration": { + "materials": [ + { + "Key": { + "materialSlotStableId": 2418540911 + }, + "Value": { + "MaterialAsset": { + "assetId": { + "guid": "{DC0598ED-1EDD-5B37-892E-E0867621D74C}" + }, + "assetHint": "materials/presets/pbr/metal_palladium.azmaterial" + } + } + } + ] + } + } + }, + "Component_[8092226976542590265]": { + "$type": "EditorDisabledCompositionComponent", + "Id": 8092226976542590265 + } + } + }, + "Entity_[1922314659796]": { + "Id": "Entity_[1922314659796]", + "Name": "Entity1", + "Components": { + "Component_[11525365929370623807]": { + "$type": "EditorVisibilityComponent", + "Id": 11525365929370623807 + }, + "Component_[12334620273692642550]": { + "$type": "EditorLockComponent", + "Id": 12334620273692642550 + }, + "Component_[14389735759337977675]": { + "$type": "EditorPendingCompositionComponent", + "Id": 14389735759337977675 + }, + "Component_[16184381538555246534]": { + "$type": "AZ::Render::EditorMeshComponent", + "Id": 16184381538555246534, + "Controller": { + "Configuration": { + "ModelAsset": { + "assetId": { + "guid": "{E14975EF-E676-51A4-B826-3EF59CB645AA}", + "subId": 285127096 + }, + "assetHint": "testdata/objects/cube/cube.azmodel" + } + } + } + }, + "Component_[17962478023087084794]": { + "$type": "SelectionComponent", + "Id": 17962478023087084794 + }, + "Component_[18071675051915092508]": { + "$type": "EditorEntityIconComponent", + "Id": 18071675051915092508 + }, + "Component_[2115498007879087044]": { + "$type": "EditorInspectorComponent", + "Id": 2115498007879087044, + "ComponentOrderEntryArray": [ + { + "ComponentId": 399415038452606756 + }, + { + "ComponentId": 16184381538555246534, + "SortIndex": 1 + }, + { + "ComponentId": 7827190074535394331, + "SortIndex": 2 + } + ] + }, + "Component_[3518973002096080237]": { + "$type": "EditorOnlyEntityComponent", + "Id": 3518973002096080237 + }, + "Component_[399415038452606756]": { + "$type": "{27F1E1A1-8D9D-4C3B-BD3A-AFB9762449C0} TransformComponent", + "Id": 399415038452606756, + "Parent Entity": "ContainerEntity", + "Transform Data": { + "Translate": [ + -47.53056335449219, + -0.00018183141946792603, + 84.40655517578125 + ] + } + }, + "Component_[4564240319609068082]": { + "$type": "EditorEntitySortComponent", + "Id": 4564240319609068082 + }, + "Component_[7827190074535394331]": { + "$type": "EditorMaterialComponent", + "Id": 7827190074535394331, + "Controller": { + "Configuration": { + "materials": [ + { + "Key": { + "materialSlotStableId": 2418540911 + }, + "Value": { + "MaterialAsset": { + "assetId": { + "guid": "{94CF2BD7-7D09-5577-B1D8-3FF85B15E127}" + }, + "assetHint": "materials/presets/pbr/metal_aluminum.azmaterial" + } + } + } + ] + } + } + }, + "Component_[8092226976542590265]": { + "$type": "EditorDisabledCompositionComponent", + "Id": 8092226976542590265 + } + } + }, + "Entity_[1926609627092]": { + "Id": "Entity_[1926609627092]", + "Name": "Entity1", + "Components": { + "Component_[11525365929370623807]": { + "$type": "EditorVisibilityComponent", + "Id": 11525365929370623807 + }, + "Component_[12334620273692642550]": { + "$type": "EditorLockComponent", + "Id": 12334620273692642550 + }, + "Component_[14389735759337977675]": { + "$type": "EditorPendingCompositionComponent", + "Id": 14389735759337977675 + }, + "Component_[16184381538555246534]": { + "$type": "AZ::Render::EditorMeshComponent", + "Id": 16184381538555246534, + "Controller": { + "Configuration": { + "ModelAsset": { + "assetId": { + "guid": "{E14975EF-E676-51A4-B826-3EF59CB645AA}", + "subId": 285127096 + }, + "assetHint": "testdata/objects/cube/cube.azmodel" + } + } + } + }, + "Component_[17962478023087084794]": { + "$type": "SelectionComponent", + "Id": 17962478023087084794 + }, + "Component_[18071675051915092508]": { + "$type": "EditorEntityIconComponent", + "Id": 18071675051915092508 + }, + "Component_[2115498007879087044]": { + "$type": "EditorInspectorComponent", + "Id": 2115498007879087044, + "ComponentOrderEntryArray": [ + { + "ComponentId": 399415038452606756 + }, + { + "ComponentId": 16184381538555246534, + "SortIndex": 1 + }, + { + "ComponentId": 7827190074535394331, + "SortIndex": 2 + } + ] + }, + "Component_[3518973002096080237]": { + "$type": "EditorOnlyEntityComponent", + "Id": 3518973002096080237 + }, + "Component_[399415038452606756]": { + "$type": "{27F1E1A1-8D9D-4C3B-BD3A-AFB9762449C0} TransformComponent", + "Id": 399415038452606756, + "Parent Entity": "ContainerEntity", + "Transform Data": { + "Translate": [ + -7.5305633544921875, + -0.00018183141946792603, + 49.593753814697266 + ] + } + }, + "Component_[4564240319609068082]": { + "$type": "EditorEntitySortComponent", + "Id": 4564240319609068082 + }, + "Component_[7827190074535394331]": { + "$type": "EditorMaterialComponent", + "Id": 7827190074535394331, + "Controller": { + "Configuration": { + "materials": [ + { + "Key": { + "materialSlotStableId": 2418540911 + }, + "Value": { + "MaterialAsset": { + "assetId": { + "guid": "{E56377B1-6310-5311-A494-135BE50B74F0}" + }, + "assetHint": "materials/presets/pbr/metal_nickel_matte.azmaterial" + } + } + } + ] + } + } + }, + "Component_[8092226976542590265]": { + "$type": "EditorDisabledCompositionComponent", + "Id": 8092226976542590265 + } + } + }, + "Entity_[1930904594388]": { + "Id": "Entity_[1930904594388]", + "Name": "Entity1", + "Components": { + "Component_[11525365929370623807]": { + "$type": "EditorVisibilityComponent", + "Id": 11525365929370623807 + }, + "Component_[12334620273692642550]": { + "$type": "EditorLockComponent", + "Id": 12334620273692642550 + }, + "Component_[14389735759337977675]": { + "$type": "EditorPendingCompositionComponent", + "Id": 14389735759337977675 + }, + "Component_[16184381538555246534]": { + "$type": "AZ::Render::EditorMeshComponent", + "Id": 16184381538555246534, + "Controller": { + "Configuration": { + "ModelAsset": { + "assetId": { + "guid": "{E14975EF-E676-51A4-B826-3EF59CB645AA}", + "subId": 285127096 + }, + "assetHint": "testdata/objects/cube/cube.azmodel" + } + } + } + }, + "Component_[17962478023087084794]": { + "$type": "SelectionComponent", + "Id": 17962478023087084794 + }, + "Component_[18071675051915092508]": { + "$type": "EditorEntityIconComponent", + "Id": 18071675051915092508 + }, + "Component_[2115498007879087044]": { + "$type": "EditorInspectorComponent", + "Id": 2115498007879087044, + "ComponentOrderEntryArray": [ + { + "ComponentId": 399415038452606756 + }, + { + "ComponentId": 16184381538555246534, + "SortIndex": 1 + }, + { + "ComponentId": 7827190074535394331, + "SortIndex": 2 + } + ] + }, + "Component_[3518973002096080237]": { + "$type": "EditorOnlyEntityComponent", + "Id": 3518973002096080237 + }, + "Component_[399415038452606756]": { + "$type": "{27F1E1A1-8D9D-4C3B-BD3A-AFB9762449C0} TransformComponent", + "Id": 399415038452606756, + "Parent Entity": "ContainerEntity", + "Transform Data": { + "Translate": [ + -12.530563354492188, + -0.00018183141946792603, + 19.50924301147461 + ] + } + }, + "Component_[4564240319609068082]": { + "$type": "EditorEntitySortComponent", + "Id": 4564240319609068082 + }, + "Component_[7827190074535394331]": { + "$type": "EditorMaterialComponent", + "Id": 7827190074535394331, + "Controller": { + "Configuration": { + "materials": [ + { + "Key": { + "materialSlotStableId": 2418540911 + }, + "Value": { + "MaterialAsset": { + "assetId": { + "guid": "{F2AD0EBF-7137-58D1-9991-9552FAD41B19}" + }, + "assetHint": "materials/presets/pbr/metal_mercury.azmaterial" + } + } + } + ] + } + } + }, + "Component_[8092226976542590265]": { + "$type": "EditorDisabledCompositionComponent", + "Id": 8092226976542590265 + } + } + }, + "Entity_[1935199561684]": { + "Id": "Entity_[1935199561684]", + "Name": "Entity1", + "Components": { + "Component_[11525365929370623807]": { + "$type": "EditorVisibilityComponent", + "Id": 11525365929370623807 + }, + "Component_[12334620273692642550]": { + "$type": "EditorLockComponent", + "Id": 12334620273692642550 + }, + "Component_[14389735759337977675]": { + "$type": "EditorPendingCompositionComponent", + "Id": 14389735759337977675 + }, + "Component_[16184381538555246534]": { + "$type": "AZ::Render::EditorMeshComponent", + "Id": 16184381538555246534, + "Controller": { + "Configuration": { + "ModelAsset": { + "assetId": { + "guid": "{E14975EF-E676-51A4-B826-3EF59CB645AA}", + "subId": 285127096 + }, + "assetHint": "testdata/objects/cube/cube.azmodel" + } + } + } + }, + "Component_[17962478023087084794]": { + "$type": "SelectionComponent", + "Id": 17962478023087084794 + }, + "Component_[18071675051915092508]": { + "$type": "EditorEntityIconComponent", + "Id": 18071675051915092508 + }, + "Component_[2115498007879087044]": { + "$type": "EditorInspectorComponent", + "Id": 2115498007879087044, + "ComponentOrderEntryArray": [ + { + "ComponentId": 399415038452606756 + }, + { + "ComponentId": 16184381538555246534, + "SortIndex": 1 + }, + { + "ComponentId": 7827190074535394331, + "SortIndex": 2 + } + ] + }, + "Component_[3518973002096080237]": { + "$type": "EditorOnlyEntityComponent", + "Id": 3518973002096080237 + }, + "Component_[399415038452606756]": { + "$type": "{27F1E1A1-8D9D-4C3B-BD3A-AFB9762449C0} TransformComponent", + "Id": 399415038452606756, + "Parent Entity": "ContainerEntity", + "Transform Data": { + "Translate": [ + 7.530143737792969, + -0.00018183141946792603, + 49.593753814697266 + ] + } + }, + "Component_[4564240319609068082]": { + "$type": "EditorEntitySortComponent", + "Id": 4564240319609068082 + }, + "Component_[7827190074535394331]": { + "$type": "EditorMaterialComponent", + "Id": 7827190074535394331, + "Controller": { + "Configuration": { + "materials": [ + { + "Key": { + "materialSlotStableId": 2418540911 + }, + "Value": { + "MaterialAsset": { + "assetId": { + "guid": "{E54E46E7-9FA3-54D7-B5F8-8DCCDF17BC24}" + }, + "assetHint": "materials/presets/pbr/metal_silver_matte.azmaterial" + } + } + } + ] + } + } + }, + "Component_[8092226976542590265]": { + "$type": "EditorDisabledCompositionComponent", + "Id": 8092226976542590265 + } + } + }, + "Entity_[1939494528980]": { + "Id": "Entity_[1939494528980]", + "Name": "Entity1", + "Components": { + "Component_[11525365929370623807]": { + "$type": "EditorVisibilityComponent", + "Id": 11525365929370623807 + }, + "Component_[12334620273692642550]": { + "$type": "EditorLockComponent", + "Id": 12334620273692642550 + }, + "Component_[14389735759337977675]": { + "$type": "EditorPendingCompositionComponent", + "Id": 14389735759337977675 + }, + "Component_[16184381538555246534]": { + "$type": "AZ::Render::EditorMeshComponent", + "Id": 16184381538555246534, + "Controller": { + "Configuration": { + "ModelAsset": { + "assetId": { + "guid": "{E14975EF-E676-51A4-B826-3EF59CB645AA}", + "subId": 285127096 + }, + "assetHint": "testdata/objects/cube/cube.azmodel" + } + } + } + }, + "Component_[17962478023087084794]": { + "$type": "SelectionComponent", + "Id": 17962478023087084794 + }, + "Component_[18071675051915092508]": { + "$type": "EditorEntityIconComponent", + "Id": 18071675051915092508 + }, + "Component_[2115498007879087044]": { + "$type": "EditorInspectorComponent", + "Id": 2115498007879087044, + "ComponentOrderEntryArray": [ + { + "ComponentId": 399415038452606756 + }, + { + "ComponentId": 16184381538555246534, + "SortIndex": 1 + }, + { + "ComponentId": 7827190074535394331, + "SortIndex": 2 + } + ] + }, + "Component_[3518973002096080237]": { + "$type": "EditorOnlyEntityComponent", + "Id": 3518973002096080237 + }, + "Component_[399415038452606756]": { + "$type": "{27F1E1A1-8D9D-4C3B-BD3A-AFB9762449C0} TransformComponent", + "Id": 399415038452606756, + "Parent Entity": "ContainerEntity", + "Transform Data": { + "Translate": [ + -12.530563354492188, + -0.00018183141946792603, + 9.475835800170898 + ] + } + }, + "Component_[4564240319609068082]": { + "$type": "EditorEntitySortComponent", + "Id": 4564240319609068082 + }, + "Component_[7827190074535394331]": { + "$type": "EditorMaterialComponent", + "Id": 7827190074535394331, + "Controller": { + "Configuration": { + "materials": [ + { + "Key": { + "materialSlotStableId": 2418540911 + }, + "Value": { + "MaterialAsset": { + "assetId": { + "guid": "{F2AD0EBF-7137-58D1-9991-9552FAD41B19}" + }, + "assetHint": "materials/presets/pbr/metal_mercury.azmaterial" + } + } + } + ] + } + } + }, + "Component_[8092226976542590265]": { + "$type": "EditorDisabledCompositionComponent", + "Id": 8092226976542590265 + } + } + }, + "Entity_[1943789496276]": { + "Id": "Entity_[1943789496276]", + "Name": "Entity1", + "Components": { + "Component_[11525365929370623807]": { + "$type": "EditorVisibilityComponent", + "Id": 11525365929370623807 + }, + "Component_[12334620273692642550]": { + "$type": "EditorLockComponent", + "Id": 12334620273692642550 + }, + "Component_[14389735759337977675]": { + "$type": "EditorPendingCompositionComponent", + "Id": 14389735759337977675 + }, + "Component_[16184381538555246534]": { + "$type": "AZ::Render::EditorMeshComponent", + "Id": 16184381538555246534, + "Controller": { + "Configuration": { + "ModelAsset": { + "assetId": { + "guid": "{E14975EF-E676-51A4-B826-3EF59CB645AA}", + "subId": 285127096 + }, + "assetHint": "testdata/objects/cube/cube.azmodel" + } + } + } + }, + "Component_[17962478023087084794]": { + "$type": "SelectionComponent", + "Id": 17962478023087084794 + }, + "Component_[18071675051915092508]": { + "$type": "EditorEntityIconComponent", + "Id": 18071675051915092508 + }, + "Component_[2115498007879087044]": { + "$type": "EditorInspectorComponent", + "Id": 2115498007879087044, + "ComponentOrderEntryArray": [ + { + "ComponentId": 399415038452606756 + }, + { + "ComponentId": 16184381538555246534, + "SortIndex": 1 + }, + { + "ComponentId": 7827190074535394331, + "SortIndex": 2 + } + ] + }, + "Component_[3518973002096080237]": { + "$type": "EditorOnlyEntityComponent", + "Id": 3518973002096080237 + }, + "Component_[399415038452606756]": { + "$type": "{27F1E1A1-8D9D-4C3B-BD3A-AFB9762449C0} TransformComponent", + "Id": 399415038452606756, + "Parent Entity": "ContainerEntity", + "Transform Data": { + "Translate": [ + 2.5301437377929688, + -0.00018183141946792603, + 15.057670593261719 + ] + } + }, + "Component_[4564240319609068082]": { + "$type": "EditorEntitySortComponent", + "Id": 4564240319609068082 + }, + "Component_[7827190074535394331]": { + "$type": "EditorMaterialComponent", + "Id": 7827190074535394331, + "Controller": { + "Configuration": { + "materials": [ + { + "Key": { + "materialSlotStableId": 2418540911 + }, + "Value": { + "MaterialAsset": { + "assetId": { + "guid": "{79419183-FFCE-5A89-AA16-C2789D81AF75}" + }, + "assetHint": "materials/presets/pbr/metal_platinum_polished.azmaterial" + } + } + } + ] + } + } + }, + "Component_[8092226976542590265]": { + "$type": "EditorDisabledCompositionComponent", + "Id": 8092226976542590265 + } + } + }, + "Entity_[1948084463572]": { + "Id": "Entity_[1948084463572]", + "Name": "Entity1", + "Components": { + "Component_[11525365929370623807]": { + "$type": "EditorVisibilityComponent", + "Id": 11525365929370623807 + }, + "Component_[12334620273692642550]": { + "$type": "EditorLockComponent", + "Id": 12334620273692642550 + }, + "Component_[14389735759337977675]": { + "$type": "EditorPendingCompositionComponent", + "Id": 14389735759337977675 + }, + "Component_[16184381538555246534]": { + "$type": "AZ::Render::EditorMeshComponent", + "Id": 16184381538555246534, + "Controller": { + "Configuration": { + "ModelAsset": { + "assetId": { + "guid": "{E14975EF-E676-51A4-B826-3EF59CB645AA}", + "subId": 285127096 + }, + "assetHint": "testdata/objects/cube/cube.azmodel" + } + } + } + }, + "Component_[17962478023087084794]": { + "$type": "SelectionComponent", + "Id": 17962478023087084794 + }, + "Component_[18071675051915092508]": { + "$type": "EditorEntityIconComponent", + "Id": 18071675051915092508 + }, + "Component_[2115498007879087044]": { + "$type": "EditorInspectorComponent", + "Id": 2115498007879087044, + "ComponentOrderEntryArray": [ + { + "ComponentId": 399415038452606756 + }, + { + "ComponentId": 16184381538555246534, + "SortIndex": 1 + }, + { + "ComponentId": 7827190074535394331, + "SortIndex": 2 + } + ] + }, + "Component_[3518973002096080237]": { + "$type": "EditorOnlyEntityComponent", + "Id": 3518973002096080237 + }, + "Component_[399415038452606756]": { + "$type": "{27F1E1A1-8D9D-4C3B-BD3A-AFB9762449C0} TransformComponent", + "Id": 399415038452606756, + "Parent Entity": "ContainerEntity", + "Transform Data": { + "Translate": [ + -12.530563354492188, + -0.00018183141946792603, + 54.618019104003906 + ] + } + }, + "Component_[4564240319609068082]": { + "$type": "EditorEntitySortComponent", + "Id": 4564240319609068082 + }, + "Component_[7827190074535394331]": { + "$type": "EditorMaterialComponent", + "Id": 7827190074535394331, + "Controller": { + "Configuration": { + "materials": [ + { + "Key": { + "materialSlotStableId": 2418540911 + }, + "Value": { + "MaterialAsset": { + "assetId": { + "guid": "{F2AD0EBF-7137-58D1-9991-9552FAD41B19}" + }, + "assetHint": "materials/presets/pbr/metal_mercury.azmaterial" + } + } + } + ] + } + } + }, + "Component_[8092226976542590265]": { + "$type": "EditorDisabledCompositionComponent", + "Id": 8092226976542590265 + } + } + }, + "Entity_[1952379430868]": { + "Id": "Entity_[1952379430868]", + "Name": "Entity1", + "Components": { + "Component_[11525365929370623807]": { + "$type": "EditorVisibilityComponent", + "Id": 11525365929370623807 + }, + "Component_[12334620273692642550]": { + "$type": "EditorLockComponent", + "Id": 12334620273692642550 + }, + "Component_[14389735759337977675]": { + "$type": "EditorPendingCompositionComponent", + "Id": 14389735759337977675 + }, + "Component_[16184381538555246534]": { + "$type": "AZ::Render::EditorMeshComponent", + "Id": 16184381538555246534, + "Controller": { + "Configuration": { + "ModelAsset": { + "assetId": { + "guid": "{E14975EF-E676-51A4-B826-3EF59CB645AA}", + "subId": 285127096 + }, + "assetHint": "testdata/objects/cube/cube.azmodel" + } + } + } + }, + "Component_[17962478023087084794]": { + "$type": "SelectionComponent", + "Id": 17962478023087084794 + }, + "Component_[18071675051915092508]": { + "$type": "EditorEntityIconComponent", + "Id": 18071675051915092508 + }, + "Component_[2115498007879087044]": { + "$type": "EditorInspectorComponent", + "Id": 2115498007879087044, + "ComponentOrderEntryArray": [ + { + "ComponentId": 399415038452606756 + }, + { + "ComponentId": 16184381538555246534, + "SortIndex": 1 + }, + { + "ComponentId": 7827190074535394331, + "SortIndex": 2 + } + ] + }, + "Component_[3518973002096080237]": { + "$type": "EditorOnlyEntityComponent", + "Id": 3518973002096080237 + }, + "Component_[399415038452606756]": { + "$type": "{27F1E1A1-8D9D-4C3B-BD3A-AFB9762449C0} TransformComponent", + "Id": 399415038452606756, + "Parent Entity": "ContainerEntity", + "Transform Data": { + "Translate": [ + 37.53014373779297, + 0.010651908814907074, + 24.573455810546875 + ] + } + }, + "Component_[4564240319609068082]": { + "$type": "EditorEntitySortComponent", + "Id": 4564240319609068082 + }, + "Component_[7827190074535394331]": { + "$type": "EditorMaterialComponent", + "Id": 7827190074535394331, + "Controller": { + "Configuration": { + "materials": [ + { + "Key": { + "materialSlotStableId": 2418540911 + }, + "Value": { + "MaterialAsset": { + "assetId": { + "guid": "{E621C5BF-B8E1-55F0-A791-EC960F2FA46F}" + }, + "assetHint": "materials/presets/pbr/metal_copper.azmaterial" + } + } + } + ] + } + } + }, + "Component_[8092226976542590265]": { + "$type": "EditorDisabledCompositionComponent", + "Id": 8092226976542590265 + } + } + }, + "Entity_[1956674398164]": { + "Id": "Entity_[1956674398164]", + "Name": "Entity1", + "Components": { + "Component_[11525365929370623807]": { + "$type": "EditorVisibilityComponent", + "Id": 11525365929370623807 + }, + "Component_[12334620273692642550]": { + "$type": "EditorLockComponent", + "Id": 12334620273692642550 + }, + "Component_[14389735759337977675]": { + "$type": "EditorPendingCompositionComponent", + "Id": 14389735759337977675 + }, + "Component_[16184381538555246534]": { + "$type": "AZ::Render::EditorMeshComponent", + "Id": 16184381538555246534, + "Controller": { + "Configuration": { + "ModelAsset": { + "assetId": { + "guid": "{E14975EF-E676-51A4-B826-3EF59CB645AA}", + "subId": 285127096 + }, + "assetHint": "testdata/objects/cube/cube.azmodel" + } + } + } + }, + "Component_[17962478023087084794]": { + "$type": "SelectionComponent", + "Id": 17962478023087084794 + }, + "Component_[18071675051915092508]": { + "$type": "EditorEntityIconComponent", + "Id": 18071675051915092508 + }, + "Component_[2115498007879087044]": { + "$type": "EditorInspectorComponent", + "Id": 2115498007879087044, + "ComponentOrderEntryArray": [ + { + "ComponentId": 399415038452606756 + }, + { + "ComponentId": 16184381538555246534, + "SortIndex": 1 + }, + { + "ComponentId": 7827190074535394331, + "SortIndex": 2 + } + ] + }, + "Component_[3518973002096080237]": { + "$type": "EditorOnlyEntityComponent", + "Id": 3518973002096080237 + }, + "Component_[399415038452606756]": { + "$type": "{27F1E1A1-8D9D-4C3B-BD3A-AFB9762449C0} TransformComponent", + "Id": 399415038452606756, + "Parent Entity": "ContainerEntity", + "Transform Data": { + "Translate": [ + -2.5305633544921875, + -0.00018183141946792603, + 4.451573371887207 + ] + } + }, + "Component_[4564240319609068082]": { + "$type": "EditorEntitySortComponent", + "Id": 4564240319609068082 + }, + "Component_[7827190074535394331]": { + "$type": "EditorMaterialComponent", + "Id": 7827190074535394331, + "Controller": { + "Configuration": { + "materials": [ + { + "Key": { + "materialSlotStableId": 2418540911 + }, + "Value": { + "MaterialAsset": { + "assetId": { + "guid": "{9187B84B-425F-5D11-B4D7-35BBDB0959D1}" + }, + "assetHint": "materials/presets/pbr/metal_palladium_matte.azmaterial" + } + } + } + ] + } + } + }, + "Component_[8092226976542590265]": { + "$type": "EditorDisabledCompositionComponent", + "Id": 8092226976542590265 + } + } + }, + "Entity_[1960969365460]": { + "Id": "Entity_[1960969365460]", + "Name": "Entity1", + "Components": { + "Component_[11525365929370623807]": { + "$type": "EditorVisibilityComponent", + "Id": 11525365929370623807 + }, + "Component_[12334620273692642550]": { + "$type": "EditorLockComponent", + "Id": 12334620273692642550 + }, + "Component_[14389735759337977675]": { + "$type": "EditorPendingCompositionComponent", + "Id": 14389735759337977675 + }, + "Component_[16184381538555246534]": { + "$type": "AZ::Render::EditorMeshComponent", + "Id": 16184381538555246534, + "Controller": { + "Configuration": { + "ModelAsset": { + "assetId": { + "guid": "{E14975EF-E676-51A4-B826-3EF59CB645AA}", + "subId": 285127096 + }, + "assetHint": "testdata/objects/cube/cube.azmodel" + } + } + } + }, + "Component_[17962478023087084794]": { + "$type": "SelectionComponent", + "Id": 17962478023087084794 + }, + "Component_[18071675051915092508]": { + "$type": "EditorEntityIconComponent", + "Id": 18071675051915092508 + }, + "Component_[2115498007879087044]": { + "$type": "EditorInspectorComponent", + "Id": 2115498007879087044, + "ComponentOrderEntryArray": [ + { + "ComponentId": 399415038452606756 + }, + { + "ComponentId": 16184381538555246534, + "SortIndex": 1 + }, + { + "ComponentId": 7827190074535394331, + "SortIndex": 2 + } + ] + }, + "Component_[3518973002096080237]": { + "$type": "EditorOnlyEntityComponent", + "Id": 3518973002096080237 + }, + "Component_[399415038452606756]": { + "$type": "{27F1E1A1-8D9D-4C3B-BD3A-AFB9762449C0} TransformComponent", + "Id": 399415038452606756, + "Parent Entity": "ContainerEntity", + "Transform Data": { + "Translate": [ + -7.5305633544921875, + -0.00018183141946792603, + 109.46680450439453 + ] + } + }, + "Component_[4564240319609068082]": { + "$type": "EditorEntitySortComponent", + "Id": 4564240319609068082 + }, + "Component_[7827190074535394331]": { + "$type": "EditorMaterialComponent", + "Id": 7827190074535394331, + "Controller": { + "Configuration": { + "materials": [ + { + "Key": { + "materialSlotStableId": 2418540911 + }, + "Value": { + "MaterialAsset": { + "assetId": { + "guid": "{E56377B1-6310-5311-A494-135BE50B74F0}" + }, + "assetHint": "materials/presets/pbr/metal_nickel_matte.azmaterial" + } + } + } + ] + } + } + }, + "Component_[8092226976542590265]": { + "$type": "EditorDisabledCompositionComponent", + "Id": 8092226976542590265 + } + } + }, + "Entity_[1965264332756]": { + "Id": "Entity_[1965264332756]", + "Name": "Entity1", + "Components": { + "Component_[1057179753323467068]": { + "$type": "EditorMaterialComponent", + "Id": 1057179753323467068, + "Controller": { + "Configuration": { + "materials": [ + { + "Key": { + "materialSlotStableId": 2418540911 + }, + "Value": { + "MaterialAsset": { + "assetId": { + "guid": "{A3F3CD98-1634-5542-AD5A-78E91BE21AE9}" + }, + "assetHint": "materials/presets/pbr/metal_titanium_matte.azmaterial" + } + } + } + ] + } + } + }, + "Component_[11525365929370623807]": { + "$type": "EditorVisibilityComponent", + "Id": 11525365929370623807 + }, + "Component_[12334620273692642550]": { + "$type": "EditorLockComponent", + "Id": 12334620273692642550 + }, + "Component_[14389735759337977675]": { + "$type": "EditorPendingCompositionComponent", + "Id": 14389735759337977675 + }, + "Component_[16184381538555246534]": { + "$type": "AZ::Render::EditorMeshComponent", + "Id": 16184381538555246534, + "Controller": { + "Configuration": { + "ModelAsset": { + "assetId": { + "guid": "{E14975EF-E676-51A4-B826-3EF59CB645AA}", + "subId": 285127096 + }, + "assetHint": "testdata/objects/cube/cube.azmodel" + } + } + } + }, + "Component_[17962478023087084794]": { + "$type": "SelectionComponent", + "Id": 17962478023087084794 + }, + "Component_[18071675051915092508]": { + "$type": "EditorEntityIconComponent", + "Id": 18071675051915092508 + }, + "Component_[2115498007879087044]": { + "$type": "EditorInspectorComponent", + "Id": 2115498007879087044, + "ComponentOrderEntryArray": [ + { + "ComponentId": 399415038452606756 + }, + { + "ComponentId": 16184381538555246534, + "SortIndex": 1 + }, + { + "ComponentId": 1057179753323467068, + "SortIndex": 2 + } + ] + }, + "Component_[3518973002096080237]": { + "$type": "EditorOnlyEntityComponent", + "Id": 3518973002096080237 + }, + "Component_[399415038452606756]": { + "$type": "{27F1E1A1-8D9D-4C3B-BD3A-AFB9762449C0} TransformComponent", + "Id": 399415038452606756, + "Parent Entity": "ContainerEntity", + "Transform Data": { + "Translate": [ + 12.530143737792969, + -0.00018183141946792603, + 49.593753814697266 + ] + } + }, + "Component_[4564240319609068082]": { + "$type": "EditorEntitySortComponent", + "Id": 4564240319609068082 + }, + "Component_[8092226976542590265]": { + "$type": "EditorDisabledCompositionComponent", + "Id": 8092226976542590265 + } + } + }, + "Entity_[1969559300052]": { + "Id": "Entity_[1969559300052]", + "Name": "Entity1", + "Components": { + "Component_[11525365929370623807]": { + "$type": "EditorVisibilityComponent", + "Id": 11525365929370623807 + }, + "Component_[12334620273692642550]": { + "$type": "EditorLockComponent", + "Id": 12334620273692642550 + }, + "Component_[14389735759337977675]": { + "$type": "EditorPendingCompositionComponent", + "Id": 14389735759337977675 + }, + "Component_[16184381538555246534]": { + "$type": "AZ::Render::EditorMeshComponent", + "Id": 16184381538555246534, + "Controller": { + "Configuration": { + "ModelAsset": { + "assetId": { + "guid": "{E14975EF-E676-51A4-B826-3EF59CB645AA}", + "subId": 285127096 + }, + "assetHint": "testdata/objects/cube/cube.azmodel" + } + } + } + }, + "Component_[17962478023087084794]": { + "$type": "SelectionComponent", + "Id": 17962478023087084794 + }, + "Component_[18071675051915092508]": { + "$type": "EditorEntityIconComponent", + "Id": 18071675051915092508 + }, + "Component_[2115498007879087044]": { + "$type": "EditorInspectorComponent", + "Id": 2115498007879087044, + "ComponentOrderEntryArray": [ + { + "ComponentId": 399415038452606756 + }, + { + "ComponentId": 16184381538555246534, + "SortIndex": 1 + }, + { + "ComponentId": 7827190074535394331, + "SortIndex": 2 + } + ] + }, + "Component_[3518973002096080237]": { + "$type": "EditorOnlyEntityComponent", + "Id": 3518973002096080237 + }, + "Component_[399415038452606756]": { + "$type": "{27F1E1A1-8D9D-4C3B-BD3A-AFB9762449C0} TransformComponent", + "Id": 399415038452606756, + "Parent Entity": "ContainerEntity", + "Transform Data": { + "Translate": [ + -22.530563354492188, + -0.00018183141946792603, + 39.56034851074219 + ] + } + }, + "Component_[4564240319609068082]": { + "$type": "EditorEntitySortComponent", + "Id": 4564240319609068082 + }, + "Component_[7827190074535394331]": { + "$type": "EditorMaterialComponent", + "Id": 7827190074535394331, + "Controller": { + "Configuration": { + "materials": [ + { + "Key": { + "materialSlotStableId": 2418540911 + }, + "Value": { + "MaterialAsset": { + "assetId": { + "guid": "{FE52E7C8-064D-506A-9C26-433EB93747DE}" + }, + "assetHint": "materials/presets/pbr/metal_gold.azmaterial" + } + } + } + ] + } + } + }, + "Component_[8092226976542590265]": { + "$type": "EditorDisabledCompositionComponent", + "Id": 8092226976542590265 + } + } + }, + "Entity_[1973854267348]": { + "Id": "Entity_[1973854267348]", + "Name": "Entity1", + "Components": { + "Component_[11525365929370623807]": { + "$type": "EditorVisibilityComponent", + "Id": 11525365929370623807 + }, + "Component_[12334620273692642550]": { + "$type": "EditorLockComponent", + "Id": 12334620273692642550 + }, + "Component_[14389735759337977675]": { + "$type": "EditorPendingCompositionComponent", + "Id": 14389735759337977675 + }, + "Component_[16184381538555246534]": { + "$type": "AZ::Render::EditorMeshComponent", + "Id": 16184381538555246534, + "Controller": { + "Configuration": { + "ModelAsset": { + "assetId": { + "guid": "{E14975EF-E676-51A4-B826-3EF59CB645AA}", + "subId": 285127096 + }, + "assetHint": "testdata/objects/cube/cube.azmodel" + } + } + } + }, + "Component_[17962478023087084794]": { + "$type": "SelectionComponent", + "Id": 17962478023087084794 + }, + "Component_[18071675051915092508]": { + "$type": "EditorEntityIconComponent", + "Id": 18071675051915092508 + }, + "Component_[2115498007879087044]": { + "$type": "EditorInspectorComponent", + "Id": 2115498007879087044, + "ComponentOrderEntryArray": [ + { + "ComponentId": 399415038452606756 + }, + { + "ComponentId": 16184381538555246534, + "SortIndex": 1 + }, + { + "ComponentId": 7827190074535394331, + "SortIndex": 2 + } + ] + }, + "Component_[3518973002096080237]": { + "$type": "EditorOnlyEntityComponent", + "Id": 3518973002096080237 + }, + "Component_[399415038452606756]": { + "$type": "{27F1E1A1-8D9D-4C3B-BD3A-AFB9762449C0} TransformComponent", + "Id": 399415038452606756, + "Parent Entity": "ContainerEntity", + "Transform Data": { + "Translate": [ + -7.5305633544921875, + -0.00018183141946792603, + 79.38228607177734 + ] + } + }, + "Component_[4564240319609068082]": { + "$type": "EditorEntitySortComponent", + "Id": 4564240319609068082 + }, + "Component_[7827190074535394331]": { + "$type": "EditorMaterialComponent", + "Id": 7827190074535394331, + "Controller": { + "Configuration": { + "materials": [ + { + "Key": { + "materialSlotStableId": 2418540911 + }, + "Value": { + "MaterialAsset": { + "assetId": { + "guid": "{E56377B1-6310-5311-A494-135BE50B74F0}" + }, + "assetHint": "materials/presets/pbr/metal_nickel_matte.azmaterial" + } + } + } + ] + } + } + }, + "Component_[8092226976542590265]": { + "$type": "EditorDisabledCompositionComponent", + "Id": 8092226976542590265 + } + } + }, + "Entity_[1978149234644]": { + "Id": "Entity_[1978149234644]", + "Name": "Entity1", + "Components": { + "Component_[11525365929370623807]": { + "$type": "EditorVisibilityComponent", + "Id": 11525365929370623807 + }, + "Component_[12334620273692642550]": { + "$type": "EditorLockComponent", + "Id": 12334620273692642550 + }, + "Component_[14389735759337977675]": { + "$type": "EditorPendingCompositionComponent", + "Id": 14389735759337977675 + }, + "Component_[16184381538555246534]": { + "$type": "AZ::Render::EditorMeshComponent", + "Id": 16184381538555246534, + "Controller": { + "Configuration": { + "ModelAsset": { + "assetId": { + "guid": "{E14975EF-E676-51A4-B826-3EF59CB645AA}", + "subId": 285127096 + }, + "assetHint": "testdata/objects/cube/cube.azmodel" + } + } + } + }, + "Component_[17962478023087084794]": { + "$type": "SelectionComponent", + "Id": 17962478023087084794 + }, + "Component_[18071675051915092508]": { + "$type": "EditorEntityIconComponent", + "Id": 18071675051915092508 + }, + "Component_[2115498007879087044]": { + "$type": "EditorInspectorComponent", + "Id": 2115498007879087044, + "ComponentOrderEntryArray": [ + { + "ComponentId": 399415038452606756 + }, + { + "ComponentId": 16184381538555246534, + "SortIndex": 1 + }, + { + "ComponentId": 7827190074535394331, + "SortIndex": 2 + } + ] + }, + "Component_[3518973002096080237]": { + "$type": "EditorOnlyEntityComponent", + "Id": 3518973002096080237 + }, + "Component_[399415038452606756]": { + "$type": "{27F1E1A1-8D9D-4C3B-BD3A-AFB9762449C0} TransformComponent", + "Id": 399415038452606756, + "Parent Entity": "ContainerEntity", + "Transform Data": { + "Translate": [ + 42.53014373779297, + -0.00018183141946792603, + 109.46680450439453 + ] + } + }, + "Component_[4564240319609068082]": { + "$type": "EditorEntitySortComponent", + "Id": 4564240319609068082 + }, + "Component_[7827190074535394331]": { + "$type": "EditorMaterialComponent", + "Id": 7827190074535394331, + "Controller": { + "Configuration": { + "materials": [ + { + "Key": { + "materialSlotStableId": 2418540911 + }, + "Value": { + "MaterialAsset": { + "assetId": { + "guid": "{5BC13D95-377E-53EA-9A93-156384BE8B04}" + }, + "assetHint": "materials/presets/pbr/metal_gold_matte.azmaterial" + } + } + } + ] + } + } + }, + "Component_[8092226976542590265]": { + "$type": "EditorDisabledCompositionComponent", + "Id": 8092226976542590265 + } + } + }, + "Entity_[1982444201940]": { + "Id": "Entity_[1982444201940]", + "Name": "Entity1", + "Components": { + "Component_[11525365929370623807]": { + "$type": "EditorVisibilityComponent", + "Id": 11525365929370623807 + }, + "Component_[12334620273692642550]": { + "$type": "EditorLockComponent", + "Id": 12334620273692642550 + }, + "Component_[14389735759337977675]": { + "$type": "EditorPendingCompositionComponent", + "Id": 14389735759337977675 + }, + "Component_[16184381538555246534]": { + "$type": "AZ::Render::EditorMeshComponent", + "Id": 16184381538555246534, + "Controller": { + "Configuration": { + "ModelAsset": { + "assetId": { + "guid": "{E14975EF-E676-51A4-B826-3EF59CB645AA}", + "subId": 285127096 + }, + "assetHint": "testdata/objects/cube/cube.azmodel" + } + } + } + }, + "Component_[17962478023087084794]": { + "$type": "SelectionComponent", + "Id": 17962478023087084794 + }, + "Component_[18071675051915092508]": { + "$type": "EditorEntityIconComponent", + "Id": 18071675051915092508 + }, + "Component_[2115498007879087044]": { + "$type": "EditorInspectorComponent", + "Id": 2115498007879087044, + "ComponentOrderEntryArray": [ + { + "ComponentId": 399415038452606756 + }, + { + "ComponentId": 16184381538555246534, + "SortIndex": 1 + }, + { + "ComponentId": 7827190074535394331, + "SortIndex": 2 + } + ] + }, + "Component_[3518973002096080237]": { + "$type": "EditorOnlyEntityComponent", + "Id": 3518973002096080237 + }, + "Component_[399415038452606756]": { + "$type": "{27F1E1A1-8D9D-4C3B-BD3A-AFB9762449C0} TransformComponent", + "Id": 399415038452606756, + "Parent Entity": "ContainerEntity", + "Transform Data": { + "Translate": [ + -37.53056335449219, + -0.00018183141946792603, + 30.08451271057129 + ] + } + }, + "Component_[4564240319609068082]": { + "$type": "EditorEntitySortComponent", + "Id": 4564240319609068082 + }, + "Component_[7827190074535394331]": { + "$type": "EditorMaterialComponent", + "Id": 7827190074535394331, + "Controller": { + "Configuration": { + "materials": [ + { + "Key": { + "materialSlotStableId": 2418540911 + }, + "Value": { + "MaterialAsset": { + "assetId": { + "guid": "{CAF50181-3384-5DF2-9304-C6E48E83C72D}" + }, + "assetHint": "materials/presets/pbr/metal_chrome_polished.azmaterial" + } + } + } + ] + } + } + }, + "Component_[8092226976542590265]": { + "$type": "EditorDisabledCompositionComponent", + "Id": 8092226976542590265 + } + } + }, + "Entity_[1986739169236]": { + "Id": "Entity_[1986739169236]", + "Name": "Entity1", + "Components": { + "Component_[11525365929370623807]": { + "$type": "EditorVisibilityComponent", + "Id": 11525365929370623807 + }, + "Component_[12334620273692642550]": { + "$type": "EditorLockComponent", + "Id": 12334620273692642550 + }, + "Component_[14389735759337977675]": { + "$type": "EditorPendingCompositionComponent", + "Id": 14389735759337977675 + }, + "Component_[16184381538555246534]": { + "$type": "AZ::Render::EditorMeshComponent", + "Id": 16184381538555246534, + "Controller": { + "Configuration": { + "ModelAsset": { + "assetId": { + "guid": "{E14975EF-E676-51A4-B826-3EF59CB645AA}", + "subId": 285127096 + }, + "assetHint": "testdata/objects/cube/cube.azmodel" + } + } + } + }, + "Component_[17962478023087084794]": { + "$type": "SelectionComponent", + "Id": 17962478023087084794 + }, + "Component_[18071675051915092508]": { + "$type": "EditorEntityIconComponent", + "Id": 18071675051915092508 + }, + "Component_[2115498007879087044]": { + "$type": "EditorInspectorComponent", + "Id": 2115498007879087044, + "ComponentOrderEntryArray": [ + { + "ComponentId": 399415038452606756 + }, + { + "ComponentId": 16184381538555246534, + "SortIndex": 1 + }, + { + "ComponentId": 7827190074535394331, + "SortIndex": 2 + } + ] + }, + "Component_[3518973002096080237]": { + "$type": "EditorOnlyEntityComponent", + "Id": 3518973002096080237 + }, + "Component_[399415038452606756]": { + "$type": "{27F1E1A1-8D9D-4C3B-BD3A-AFB9762449C0} TransformComponent", + "Id": 399415038452606756, + "Parent Entity": "ContainerEntity", + "Transform Data": { + "Translate": [ + -27.530563354492188, + -0.00018183141946792603, + 45.14218521118164 + ] + } + }, + "Component_[4564240319609068082]": { + "$type": "EditorEntitySortComponent", + "Id": 4564240319609068082 + }, + "Component_[7827190074535394331]": { + "$type": "EditorMaterialComponent", + "Id": 7827190074535394331, + "Controller": { + "Configuration": { + "materials": [ + { + "Key": { + "materialSlotStableId": 2418540911 + }, + "Value": { + "MaterialAsset": { + "assetId": { + "guid": "{CF5C7B01-4912-58AE-991A-F25251E505AC}" + }, + "assetHint": "materials/presets/pbr/metal_copper_polished.azmaterial" + } + } + } + ] + } + } + }, + "Component_[8092226976542590265]": { + "$type": "EditorDisabledCompositionComponent", + "Id": 8092226976542590265 + } + } + }, + "Entity_[1991034136532]": { + "Id": "Entity_[1991034136532]", + "Name": "Entity1", + "Components": { + "Component_[11525365929370623807]": { + "$type": "EditorVisibilityComponent", + "Id": 11525365929370623807 + }, + "Component_[12334620273692642550]": { + "$type": "EditorLockComponent", + "Id": 12334620273692642550 + }, + "Component_[14389735759337977675]": { + "$type": "EditorPendingCompositionComponent", + "Id": 14389735759337977675 + }, + "Component_[16184381538555246534]": { + "$type": "AZ::Render::EditorMeshComponent", + "Id": 16184381538555246534, + "Controller": { + "Configuration": { + "ModelAsset": { + "assetId": { + "guid": "{E14975EF-E676-51A4-B826-3EF59CB645AA}", + "subId": 285127096 + }, + "assetHint": "testdata/objects/cube/cube.azmodel" + } + } + } + }, + "Component_[17962478023087084794]": { + "$type": "SelectionComponent", + "Id": 17962478023087084794 + }, + "Component_[18071675051915092508]": { + "$type": "EditorEntityIconComponent", + "Id": 18071675051915092508 + }, + "Component_[2115498007879087044]": { + "$type": "EditorInspectorComponent", + "Id": 2115498007879087044, + "ComponentOrderEntryArray": [ + { + "ComponentId": 399415038452606756 + }, + { + "ComponentId": 16184381538555246534, + "SortIndex": 1 + }, + { + "ComponentId": 7827190074535394331, + "SortIndex": 2 + } + ] + }, + "Component_[3518973002096080237]": { + "$type": "EditorOnlyEntityComponent", + "Id": 3518973002096080237 + }, + "Component_[399415038452606756]": { + "$type": "{27F1E1A1-8D9D-4C3B-BD3A-AFB9762449C0} TransformComponent", + "Id": 399415038452606756, + "Parent Entity": "ContainerEntity", + "Transform Data": { + "Translate": [ + -22.530563354492188, + -0.00018183141946792603, + 54.618019104003906 + ] + } + }, + "Component_[4564240319609068082]": { + "$type": "EditorEntitySortComponent", + "Id": 4564240319609068082 + }, + "Component_[7827190074535394331]": { + "$type": "EditorMaterialComponent", + "Id": 7827190074535394331, + "Controller": { + "Configuration": { + "materials": [ + { + "Key": { + "materialSlotStableId": 2418540911 + }, + "Value": { + "MaterialAsset": { + "assetId": { + "guid": "{FE52E7C8-064D-506A-9C26-433EB93747DE}" + }, + "assetHint": "materials/presets/pbr/metal_gold.azmaterial" + } + } + } + ] + } + } + }, + "Component_[8092226976542590265]": { + "$type": "EditorDisabledCompositionComponent", + "Id": 8092226976542590265 + } + } + }, + "Entity_[1995329103828]": { + "Id": "Entity_[1995329103828]", + "Name": "Entity1", + "Components": { + "Component_[11525365929370623807]": { + "$type": "EditorVisibilityComponent", + "Id": 11525365929370623807 + }, + "Component_[12334620273692642550]": { + "$type": "EditorLockComponent", + "Id": 12334620273692642550 + }, + "Component_[14389735759337977675]": { + "$type": "EditorPendingCompositionComponent", + "Id": 14389735759337977675 + }, + "Component_[16184381538555246534]": { + "$type": "AZ::Render::EditorMeshComponent", + "Id": 16184381538555246534, + "Controller": { + "Configuration": { + "ModelAsset": { + "assetId": { + "guid": "{E14975EF-E676-51A4-B826-3EF59CB645AA}", + "subId": 285127096 + }, + "assetHint": "testdata/objects/cube/cube.azmodel" + } + } + } + }, + "Component_[17962478023087084794]": { + "$type": "SelectionComponent", + "Id": 17962478023087084794 + }, + "Component_[18071675051915092508]": { + "$type": "EditorEntityIconComponent", + "Id": 18071675051915092508 + }, + "Component_[2115498007879087044]": { + "$type": "EditorInspectorComponent", + "Id": 2115498007879087044, + "ComponentOrderEntryArray": [ + { + "ComponentId": 399415038452606756 + }, + { + "ComponentId": 16184381538555246534, + "SortIndex": 1 + }, + { + "ComponentId": 7827190074535394331, + "SortIndex": 2 + } + ] + }, + "Component_[3518973002096080237]": { + "$type": "EditorOnlyEntityComponent", + "Id": 3518973002096080237 + }, + "Component_[399415038452606756]": { + "$type": "{27F1E1A1-8D9D-4C3B-BD3A-AFB9762449C0} TransformComponent", + "Id": 399415038452606756, + "Parent Entity": "ContainerEntity", + "Transform Data": { + "Translate": [ + 2.5301437377929688, + -0.00018183141946792603, + 45.14218521118164 + ] + } + }, + "Component_[4564240319609068082]": { + "$type": "EditorEntitySortComponent", + "Id": 4564240319609068082 + }, + "Component_[7827190074535394331]": { + "$type": "EditorMaterialComponent", + "Id": 7827190074535394331, + "Controller": { + "Configuration": { + "materials": [ + { + "Key": { + "materialSlotStableId": 2418540911 + }, + "Value": { + "MaterialAsset": { + "assetId": { + "guid": "{79419183-FFCE-5A89-AA16-C2789D81AF75}" + }, + "assetHint": "materials/presets/pbr/metal_platinum_polished.azmaterial" + } + } + } + ] + } + } + }, + "Component_[8092226976542590265]": { + "$type": "EditorDisabledCompositionComponent", + "Id": 8092226976542590265 + } + } + }, + "Entity_[1999624071124]": { + "Id": "Entity_[1999624071124]", + "Name": "Entity1", + "Components": { + "Component_[11525365929370623807]": { + "$type": "EditorVisibilityComponent", + "Id": 11525365929370623807 + }, + "Component_[12334620273692642550]": { + "$type": "EditorLockComponent", + "Id": 12334620273692642550 + }, + "Component_[14389735759337977675]": { + "$type": "EditorPendingCompositionComponent", + "Id": 14389735759337977675 + }, + "Component_[16184381538555246534]": { + "$type": "AZ::Render::EditorMeshComponent", + "Id": 16184381538555246534, + "Controller": { + "Configuration": { + "ModelAsset": { + "assetId": { + "guid": "{E14975EF-E676-51A4-B826-3EF59CB645AA}", + "subId": 285127096 + }, + "assetHint": "testdata/objects/cube/cube.azmodel" + } + } + } + }, + "Component_[17962478023087084794]": { + "$type": "SelectionComponent", + "Id": 17962478023087084794 + }, + "Component_[18071675051915092508]": { + "$type": "EditorEntityIconComponent", + "Id": 18071675051915092508 + }, + "Component_[2115498007879087044]": { + "$type": "EditorInspectorComponent", + "Id": 2115498007879087044, + "ComponentOrderEntryArray": [ + { + "ComponentId": 399415038452606756 + }, + { + "ComponentId": 16184381538555246534, + "SortIndex": 1 + }, + { + "ComponentId": 7827190074535394331, + "SortIndex": 2 + } + ] + }, + "Component_[3518973002096080237]": { + "$type": "EditorOnlyEntityComponent", + "Id": 3518973002096080237 + }, + "Component_[399415038452606756]": { + "$type": "{27F1E1A1-8D9D-4C3B-BD3A-AFB9762449C0} TransformComponent", + "Id": 399415038452606756, + "Parent Entity": "ContainerEntity", + "Transform Data": { + "Translate": [ + -22.530563354492188, + -0.00018183141946792603, + 109.46680450439453 + ] + } + }, + "Component_[4564240319609068082]": { + "$type": "EditorEntitySortComponent", + "Id": 4564240319609068082 + }, + "Component_[7827190074535394331]": { + "$type": "EditorMaterialComponent", + "Id": 7827190074535394331, + "Controller": { + "Configuration": { + "materials": [ + { + "Key": { + "materialSlotStableId": 2418540911 + }, + "Value": { + "MaterialAsset": { + "assetId": { + "guid": "{5BC13D95-377E-53EA-9A93-156384BE8B04}" + }, + "assetHint": "materials/presets/pbr/metal_gold_matte.azmaterial" + } + } + } + ] + } + } + }, + "Component_[8092226976542590265]": { + "$type": "EditorDisabledCompositionComponent", + "Id": 8092226976542590265 + } + } + }, + "Entity_[2003919038420]": { + "Id": "Entity_[2003919038420]", + "Name": "Entity1", + "Components": { + "Component_[11525365929370623807]": { + "$type": "EditorVisibilityComponent", + "Id": 11525365929370623807 + }, + "Component_[12334620273692642550]": { + "$type": "EditorLockComponent", + "Id": 12334620273692642550 + }, + "Component_[14389735759337977675]": { + "$type": "EditorPendingCompositionComponent", + "Id": 14389735759337977675 + }, + "Component_[16184381538555246534]": { + "$type": "AZ::Render::EditorMeshComponent", + "Id": 16184381538555246534, + "Controller": { + "Configuration": { + "ModelAsset": { + "assetId": { + "guid": "{E14975EF-E676-51A4-B826-3EF59CB645AA}", + "subId": 285127096 + }, + "assetHint": "testdata/objects/cube/cube.azmodel" + } + } + } + }, + "Component_[17962478023087084794]": { + "$type": "SelectionComponent", + "Id": 17962478023087084794 + }, + "Component_[18071675051915092508]": { + "$type": "EditorEntityIconComponent", + "Id": 18071675051915092508 + }, + "Component_[2115498007879087044]": { + "$type": "EditorInspectorComponent", + "Id": 2115498007879087044, + "ComponentOrderEntryArray": [ + { + "ComponentId": 399415038452606756 + }, + { + "ComponentId": 16184381538555246534, + "SortIndex": 1 + }, + { + "ComponentId": 7827190074535394331, + "SortIndex": 2 + } + ] + }, + "Component_[3518973002096080237]": { + "$type": "EditorOnlyEntityComponent", + "Id": 3518973002096080237 + }, + "Component_[399415038452606756]": { + "$type": "{27F1E1A1-8D9D-4C3B-BD3A-AFB9762449C0} TransformComponent", + "Id": 399415038452606756, + "Parent Entity": "ContainerEntity", + "Transform Data": { + "Translate": [ + 17.53014373779297, + -0.00018183141946792603, + 84.40655517578125 + ] + } + }, + "Component_[4564240319609068082]": { + "$type": "EditorEntitySortComponent", + "Id": 4564240319609068082 + }, + "Component_[7827190074535394331]": { + "$type": "EditorMaterialComponent", + "Id": 7827190074535394331, + "Controller": { + "Configuration": { + "materials": [ + { + "Key": {}, + "Value": { + "MaterialAsset": { + "assetId": { + "guid": "{721188E0-B7CC-5D06-8D5D-39AF8ABF2EF9}" + }, + "assetHint": "materials/presets/pbr/metal_titanium.azmaterial" + } + } + }, + { + "Key": { + "materialSlotStableId": 2418540911 + }, + "Value": { + "MaterialAsset": { + "assetId": { + "guid": "{94CF2BD7-7D09-5577-B1D8-3FF85B15E127}" + }, + "assetHint": "materials/presets/pbr/metal_aluminum.azmaterial" + } + } + } + ] + } + } + }, + "Component_[8092226976542590265]": { + "$type": "EditorDisabledCompositionComponent", + "Id": 8092226976542590265 + } + } + }, + "Entity_[2008214005716]": { + "Id": "Entity_[2008214005716]", + "Name": "Entity1", + "Components": { + "Component_[11525365929370623807]": { + "$type": "EditorVisibilityComponent", + "Id": 11525365929370623807 + }, + "Component_[12334620273692642550]": { + "$type": "EditorLockComponent", + "Id": 12334620273692642550 + }, + "Component_[14389735759337977675]": { + "$type": "EditorPendingCompositionComponent", + "Id": 14389735759337977675 + }, + "Component_[16184381538555246534]": { + "$type": "AZ::Render::EditorMeshComponent", + "Id": 16184381538555246534, + "Controller": { + "Configuration": { + "ModelAsset": { + "assetId": { + "guid": "{E14975EF-E676-51A4-B826-3EF59CB645AA}", + "subId": 285127096 + }, + "assetHint": "testdata/objects/cube/cube.azmodel" + } + } + } + }, + "Component_[17962478023087084794]": { + "$type": "SelectionComponent", + "Id": 17962478023087084794 + }, + "Component_[18071675051915092508]": { + "$type": "EditorEntityIconComponent", + "Id": 18071675051915092508 + }, + "Component_[2115498007879087044]": { + "$type": "EditorInspectorComponent", + "Id": 2115498007879087044, + "ComponentOrderEntryArray": [ + { + "ComponentId": 399415038452606756 + }, + { + "ComponentId": 16184381538555246534, + "SortIndex": 1 + }, + { + "ComponentId": 7827190074535394331, + "SortIndex": 2 + } + ] + }, + "Component_[3518973002096080237]": { + "$type": "EditorOnlyEntityComponent", + "Id": 3518973002096080237 + }, + "Component_[399415038452606756]": { + "$type": "{27F1E1A1-8D9D-4C3B-BD3A-AFB9762449C0} TransformComponent", + "Id": 399415038452606756, + "Parent Entity": "ContainerEntity", + "Transform Data": { + "Translate": [ + -32.53056335449219, + -0.00018183141946792603, + 9.475835800170898 + ] + } + }, + "Component_[4564240319609068082]": { + "$type": "EditorEntitySortComponent", + "Id": 4564240319609068082 + }, + "Component_[7827190074535394331]": { + "$type": "EditorMaterialComponent", + "Id": 7827190074535394331, + "Controller": { + "Configuration": { + "materials": [ + { + "Key": { + "materialSlotStableId": 2418540911 + }, + "Value": { + "MaterialAsset": { + "assetId": { + "guid": "{99976D73-6248-5D66-AD15-E8F52B0AFE36}" + }, + "assetHint": "materials/presets/pbr/metal_cobalt.azmaterial" + } + } + } + ] + } + } + }, + "Component_[8092226976542590265]": { + "$type": "EditorDisabledCompositionComponent", + "Id": 8092226976542590265 + } + } + }, + "Entity_[2012508973012]": { + "Id": "Entity_[2012508973012]", + "Name": "Entity1", + "Components": { + "Component_[11525365929370623807]": { + "$type": "EditorVisibilityComponent", + "Id": 11525365929370623807 + }, + "Component_[12334620273692642550]": { + "$type": "EditorLockComponent", + "Id": 12334620273692642550 + }, + "Component_[14389735759337977675]": { + "$type": "EditorPendingCompositionComponent", + "Id": 14389735759337977675 + }, + "Component_[16184381538555246534]": { + "$type": "AZ::Render::EditorMeshComponent", + "Id": 16184381538555246534, + "Controller": { + "Configuration": { + "ModelAsset": { + "assetId": { + "guid": "{E14975EF-E676-51A4-B826-3EF59CB645AA}", + "subId": 285127096 + }, + "assetHint": "testdata/objects/cube/cube.azmodel" + } + } + } + }, + "Component_[17962478023087084794]": { + "$type": "SelectionComponent", + "Id": 17962478023087084794 + }, + "Component_[18071675051915092508]": { + "$type": "EditorEntityIconComponent", + "Id": 18071675051915092508 + }, + "Component_[2115498007879087044]": { + "$type": "EditorInspectorComponent", + "Id": 2115498007879087044, + "ComponentOrderEntryArray": [ + { + "ComponentId": 399415038452606756 + }, + { + "ComponentId": 16184381538555246534, + "SortIndex": 1 + }, + { + "ComponentId": 7827190074535394331, + "SortIndex": 2 + } + ] + }, + "Component_[3518973002096080237]": { + "$type": "EditorOnlyEntityComponent", + "Id": 3518973002096080237 + }, + "Component_[399415038452606756]": { + "$type": "{27F1E1A1-8D9D-4C3B-BD3A-AFB9762449C0} TransformComponent", + "Id": 399415038452606756, + "Parent Entity": "ContainerEntity", + "Transform Data": { + "Translate": [ + 7.530143737792969, + -0.00018183141946792603, + 15.057670593261719 + ] + } + }, + "Component_[4564240319609068082]": { + "$type": "EditorEntitySortComponent", + "Id": 4564240319609068082 + }, + "Component_[7827190074535394331]": { + "$type": "EditorMaterialComponent", + "Id": 7827190074535394331, + "Controller": { + "Configuration": { + "materials": [ + { + "Key": { + "materialSlotStableId": 2418540911 + }, + "Value": { + "MaterialAsset": { + "assetId": { + "guid": "{2AC06FA3-7670-542E-8996-DF346AFF1B61}" + }, + "assetHint": "materials/presets/pbr/metal_silver_polished.azmaterial" + } + } + } + ] + } + } + }, + "Component_[8092226976542590265]": { + "$type": "EditorDisabledCompositionComponent", + "Id": 8092226976542590265 + } + } + }, + "Entity_[2016803940308]": { + "Id": "Entity_[2016803940308]", + "Name": "Entity1", + "Components": { + "Component_[11525365929370623807]": { + "$type": "EditorVisibilityComponent", + "Id": 11525365929370623807 + }, + "Component_[12334620273692642550]": { + "$type": "EditorLockComponent", + "Id": 12334620273692642550 + }, + "Component_[14389735759337977675]": { + "$type": "EditorPendingCompositionComponent", + "Id": 14389735759337977675 + }, + "Component_[16184381538555246534]": { + "$type": "AZ::Render::EditorMeshComponent", + "Id": 16184381538555246534, + "Controller": { + "Configuration": { + "ModelAsset": { + "assetId": { + "guid": "{E14975EF-E676-51A4-B826-3EF59CB645AA}", + "subId": 285127096 + }, + "assetHint": "testdata/objects/cube/cube.azmodel" + } + } + } + }, + "Component_[17962478023087084794]": { + "$type": "SelectionComponent", + "Id": 17962478023087084794 + }, + "Component_[18071675051915092508]": { + "$type": "EditorEntityIconComponent", + "Id": 18071675051915092508 + }, + "Component_[2115498007879087044]": { + "$type": "EditorInspectorComponent", + "Id": 2115498007879087044, + "ComponentOrderEntryArray": [ + { + "ComponentId": 399415038452606756 + }, + { + "ComponentId": 16184381538555246534, + "SortIndex": 1 + }, + { + "ComponentId": 7827190074535394331, + "SortIndex": 2 + } + ] + }, + "Component_[3518973002096080237]": { + "$type": "EditorOnlyEntityComponent", + "Id": 3518973002096080237 + }, + "Component_[399415038452606756]": { + "$type": "{27F1E1A1-8D9D-4C3B-BD3A-AFB9762449C0} TransformComponent", + "Id": 399415038452606756, + "Parent Entity": "ContainerEntity", + "Transform Data": { + "Translate": [ + 17.53014373779297, + -0.00018183141946792603, + 105.0152359008789 + ] + } + }, + "Component_[4564240319609068082]": { + "$type": "EditorEntitySortComponent", + "Id": 4564240319609068082 + }, + "Component_[7827190074535394331]": { + "$type": "EditorMaterialComponent", + "Id": 7827190074535394331, + "Controller": { + "Configuration": { + "materials": [ + { + "Key": {}, + "Value": { + "MaterialAsset": { + "assetId": { + "guid": "{721188E0-B7CC-5D06-8D5D-39AF8ABF2EF9}" + }, + "assetHint": "materials/presets/pbr/metal_titanium.azmaterial" + } + } + }, + { + "Key": { + "materialSlotStableId": 2418540911 + }, + "Value": { + "MaterialAsset": { + "assetId": { + "guid": "{64C1F6A6-6BDA-551A-BE56-1829E5913278}" + }, + "assetHint": "materials/presets/pbr/metal_aluminum_polished.azmaterial" + } + } + } + ] + } + } + }, + "Component_[8092226976542590265]": { + "$type": "EditorDisabledCompositionComponent", + "Id": 8092226976542590265 + } + } + }, + "Entity_[2021098907604]": { + "Id": "Entity_[2021098907604]", + "Name": "Entity1", + "Components": { + "Component_[11525365929370623807]": { + "$type": "EditorVisibilityComponent", + "Id": 11525365929370623807 + }, + "Component_[12334620273692642550]": { + "$type": "EditorLockComponent", + "Id": 12334620273692642550 + }, + "Component_[14389735759337977675]": { + "$type": "EditorPendingCompositionComponent", + "Id": 14389735759337977675 + }, + "Component_[16184381538555246534]": { + "$type": "AZ::Render::EditorMeshComponent", + "Id": 16184381538555246534, + "Controller": { + "Configuration": { + "ModelAsset": { + "assetId": { + "guid": "{E14975EF-E676-51A4-B826-3EF59CB645AA}", + "subId": 285127096 + }, + "assetHint": "testdata/objects/cube/cube.azmodel" + } + } + } + }, + "Component_[17962478023087084794]": { + "$type": "SelectionComponent", + "Id": 17962478023087084794 + }, + "Component_[18071675051915092508]": { + "$type": "EditorEntityIconComponent", + "Id": 18071675051915092508 + }, + "Component_[2115498007879087044]": { + "$type": "EditorInspectorComponent", + "Id": 2115498007879087044, + "ComponentOrderEntryArray": [ + { + "ComponentId": 399415038452606756 + }, + { + "ComponentId": 16184381538555246534, + "SortIndex": 1 + }, + { + "ComponentId": 7827190074535394331, + "SortIndex": 2 + } + ] + }, + "Component_[3518973002096080237]": { + "$type": "EditorOnlyEntityComponent", + "Id": 3518973002096080237 + }, + "Component_[399415038452606756]": { + "$type": "{27F1E1A1-8D9D-4C3B-BD3A-AFB9762449C0} TransformComponent", + "Id": 399415038452606756, + "Parent Entity": "ContainerEntity", + "Transform Data": { + "Translate": [ + 22.53014373779297, + -0.00018183141946792603, + 45.14218521118164 + ] + } + }, + "Component_[4564240319609068082]": { + "$type": "EditorEntitySortComponent", + "Id": 4564240319609068082 + }, + "Component_[7827190074535394331]": { + "$type": "EditorMaterialComponent", + "Id": 7827190074535394331, + "Controller": { + "Configuration": { + "materials": [ + { + "Key": { + "materialSlotStableId": 2418540911 + }, + "Value": { + "MaterialAsset": { + "assetId": { + "guid": "{FC69F2F8-F73B-5A0C-B8B7-94BAA45780FC}" + }, + "assetHint": "materials/presets/pbr/metal_brass_polished.azmaterial" + } + } + } + ] + } + } + }, + "Component_[8092226976542590265]": { + "$type": "EditorDisabledCompositionComponent", + "Id": 8092226976542590265 + } + } + }, + "Entity_[2025393874900]": { + "Id": "Entity_[2025393874900]", + "Name": "Entity1", + "Components": { + "Component_[11525365929370623807]": { + "$type": "EditorVisibilityComponent", + "Id": 11525365929370623807 + }, + "Component_[12334620273692642550]": { + "$type": "EditorLockComponent", + "Id": 12334620273692642550 + }, + "Component_[14389735759337977675]": { + "$type": "EditorPendingCompositionComponent", + "Id": 14389735759337977675 + }, + "Component_[16184381538555246534]": { + "$type": "AZ::Render::EditorMeshComponent", + "Id": 16184381538555246534, + "Controller": { + "Configuration": { + "ModelAsset": { + "assetId": { + "guid": "{E14975EF-E676-51A4-B826-3EF59CB645AA}", + "subId": 285127096 + }, + "assetHint": "testdata/objects/cube/cube.azmodel" + } + } + } + }, + "Component_[17962478023087084794]": { + "$type": "SelectionComponent", + "Id": 17962478023087084794 + }, + "Component_[18071675051915092508]": { + "$type": "EditorEntityIconComponent", + "Id": 18071675051915092508 + }, + "Component_[2115498007879087044]": { + "$type": "EditorInspectorComponent", + "Id": 2115498007879087044, + "ComponentOrderEntryArray": [ + { + "ComponentId": 399415038452606756 + }, + { + "ComponentId": 16184381538555246534, + "SortIndex": 1 + }, + { + "ComponentId": 7827190074535394331, + "SortIndex": 2 + } + ] + }, + "Component_[3518973002096080237]": { + "$type": "EditorOnlyEntityComponent", + "Id": 3518973002096080237 + }, + "Component_[399415038452606756]": { + "$type": "{27F1E1A1-8D9D-4C3B-BD3A-AFB9762449C0} TransformComponent", + "Id": 399415038452606756, + "Parent Entity": "ContainerEntity", + "Transform Data": { + "Translate": [ + -7.5305633544921875, + -0.00018183141946792603, + 79.38228607177734 + ] + } + }, + "Component_[4564240319609068082]": { + "$type": "EditorEntitySortComponent", + "Id": 4564240319609068082 + }, + "Component_[7827190074535394331]": { + "$type": "EditorMaterialComponent", + "Id": 7827190074535394331, + "Controller": { + "Configuration": { + "materials": [ + { + "Key": { + "materialSlotStableId": 2418540911 + }, + "Value": { + "MaterialAsset": { + "assetId": { + "guid": "{E56377B1-6310-5311-A494-135BE50B74F0}" + }, + "assetHint": "materials/presets/pbr/metal_nickel_matte.azmaterial" + } + } + } + ] + } + } + }, + "Component_[8092226976542590265]": { + "$type": "EditorDisabledCompositionComponent", + "Id": 8092226976542590265 + } + } + }, + "Entity_[2029688842196]": { + "Id": "Entity_[2029688842196]", + "Name": "Entity1", + "Components": { + "Component_[11525365929370623807]": { + "$type": "EditorVisibilityComponent", + "Id": 11525365929370623807 + }, + "Component_[12334620273692642550]": { + "$type": "EditorLockComponent", + "Id": 12334620273692642550 + }, + "Component_[14389735759337977675]": { + "$type": "EditorPendingCompositionComponent", + "Id": 14389735759337977675 + }, + "Component_[16184381538555246534]": { + "$type": "AZ::Render::EditorMeshComponent", + "Id": 16184381538555246534, + "Controller": { + "Configuration": { + "ModelAsset": { + "assetId": { + "guid": "{E14975EF-E676-51A4-B826-3EF59CB645AA}", + "subId": 285127096 + }, + "assetHint": "testdata/objects/cube/cube.azmodel" + } + } + } + }, + "Component_[17962478023087084794]": { + "$type": "SelectionComponent", + "Id": 17962478023087084794 + }, + "Component_[18071675051915092508]": { + "$type": "EditorEntityIconComponent", + "Id": 18071675051915092508 + }, + "Component_[2115498007879087044]": { + "$type": "EditorInspectorComponent", + "Id": 2115498007879087044, + "ComponentOrderEntryArray": [ + { + "ComponentId": 399415038452606756 + }, + { + "ComponentId": 16184381538555246534, + "SortIndex": 1 + }, + { + "ComponentId": 7827190074535394331, + "SortIndex": 2 + } + ] + }, + "Component_[3518973002096080237]": { + "$type": "EditorOnlyEntityComponent", + "Id": 3518973002096080237 + }, + "Component_[399415038452606756]": { + "$type": "{27F1E1A1-8D9D-4C3B-BD3A-AFB9762449C0} TransformComponent", + "Id": 399415038452606756, + "Parent Entity": "ContainerEntity", + "Transform Data": { + "Translate": [ + -2.5305633544921875, + -0.00018183141946792603, + 89.95755767822266 + ] + } + }, + "Component_[4564240319609068082]": { + "$type": "EditorEntitySortComponent", + "Id": 4564240319609068082 + }, + "Component_[7827190074535394331]": { + "$type": "EditorMaterialComponent", + "Id": 7827190074535394331, + "Controller": { + "Configuration": { + "materials": [ + { + "Key": { + "materialSlotStableId": 2418540911 + }, + "Value": { + "MaterialAsset": { + "assetId": { + "guid": "{D0E9960A-4B31-5136-BAC6-5482B203D3B4}" + }, + "assetHint": "materials/presets/pbr/metal_palladium_polished.azmaterial" + } + } + } + ] + } + } + }, + "Component_[8092226976542590265]": { + "$type": "EditorDisabledCompositionComponent", + "Id": 8092226976542590265 + } + } + }, + "Entity_[2033983809492]": { + "Id": "Entity_[2033983809492]", + "Name": "Entity1", + "Components": { + "Component_[11525365929370623807]": { + "$type": "EditorVisibilityComponent", + "Id": 11525365929370623807 + }, + "Component_[12334620273692642550]": { + "$type": "EditorLockComponent", + "Id": 12334620273692642550 + }, + "Component_[14389735759337977675]": { + "$type": "EditorPendingCompositionComponent", + "Id": 14389735759337977675 + }, + "Component_[16184381538555246534]": { + "$type": "AZ::Render::EditorMeshComponent", + "Id": 16184381538555246534, + "Controller": { + "Configuration": { + "ModelAsset": { + "assetId": { + "guid": "{E14975EF-E676-51A4-B826-3EF59CB645AA}", + "subId": 285127096 + }, + "assetHint": "testdata/objects/cube/cube.azmodel" + } + } + } + }, + "Component_[17962478023087084794]": { + "$type": "SelectionComponent", + "Id": 17962478023087084794 + }, + "Component_[18071675051915092508]": { + "$type": "EditorEntityIconComponent", + "Id": 18071675051915092508 + }, + "Component_[2115498007879087044]": { + "$type": "EditorInspectorComponent", + "Id": 2115498007879087044, + "ComponentOrderEntryArray": [ + { + "ComponentId": 399415038452606756 + }, + { + "ComponentId": 16184381538555246534, + "SortIndex": 1 + }, + { + "ComponentId": 7827190074535394331, + "SortIndex": 2 + } + ] + }, + "Component_[3518973002096080237]": { + "$type": "EditorOnlyEntityComponent", + "Id": 3518973002096080237 + }, + "Component_[399415038452606756]": { + "$type": "{27F1E1A1-8D9D-4C3B-BD3A-AFB9762449C0} TransformComponent", + "Id": 399415038452606756, + "Parent Entity": "ContainerEntity", + "Transform Data": { + "Translate": [ + -7.5305633544921875, + -0.00018183141946792603, + 4.451573371887207 + ] + } + }, + "Component_[4564240319609068082]": { + "$type": "EditorEntitySortComponent", + "Id": 4564240319609068082 + }, + "Component_[7827190074535394331]": { + "$type": "EditorMaterialComponent", + "Id": 7827190074535394331, + "Controller": { + "Configuration": { + "materials": [ + { + "Key": { + "materialSlotStableId": 2418540911 + }, + "Value": { + "MaterialAsset": { + "assetId": { + "guid": "{E56377B1-6310-5311-A494-135BE50B74F0}" + }, + "assetHint": "materials/presets/pbr/metal_nickel_matte.azmaterial" + } + } + } + ] + } + } + }, + "Component_[8092226976542590265]": { + "$type": "EditorDisabledCompositionComponent", + "Id": 8092226976542590265 + } + } + }, + "Entity_[2038278776788]": { + "Id": "Entity_[2038278776788]", + "Name": "Entity1", + "Components": { + "Component_[11525365929370623807]": { + "$type": "EditorVisibilityComponent", + "Id": 11525365929370623807 + }, + "Component_[12334620273692642550]": { + "$type": "EditorLockComponent", + "Id": 12334620273692642550 + }, + "Component_[14389735759337977675]": { + "$type": "EditorPendingCompositionComponent", + "Id": 14389735759337977675 + }, + "Component_[16184381538555246534]": { + "$type": "AZ::Render::EditorMeshComponent", + "Id": 16184381538555246534, + "Controller": { + "Configuration": { + "ModelAsset": { + "assetId": { + "guid": "{E14975EF-E676-51A4-B826-3EF59CB645AA}", + "subId": 285127096 + }, + "assetHint": "testdata/objects/cube/cube.azmodel" + } + } + } + }, + "Component_[17962478023087084794]": { + "$type": "SelectionComponent", + "Id": 17962478023087084794 + }, + "Component_[18071675051915092508]": { + "$type": "EditorEntityIconComponent", + "Id": 18071675051915092508 + }, + "Component_[2115498007879087044]": { + "$type": "EditorInspectorComponent", + "Id": 2115498007879087044, + "ComponentOrderEntryArray": [ + { + "ComponentId": 399415038452606756 + }, + { + "ComponentId": 16184381538555246534, + "SortIndex": 1 + }, + { + "ComponentId": 7827190074535394331, + "SortIndex": 2 + } + ] + }, + "Component_[3518973002096080237]": { + "$type": "EditorOnlyEntityComponent", + "Id": 3518973002096080237 + }, + "Component_[399415038452606756]": { + "$type": "{27F1E1A1-8D9D-4C3B-BD3A-AFB9762449C0} TransformComponent", + "Id": 399415038452606756, + "Parent Entity": "ContainerEntity", + "Transform Data": { + "Translate": [ + -12.530563354492188, + -0.00018183141946792603, + 34.53608703613281 + ] + } + }, + "Component_[4564240319609068082]": { + "$type": "EditorEntitySortComponent", + "Id": 4564240319609068082 + }, + "Component_[7827190074535394331]": { + "$type": "EditorMaterialComponent", + "Id": 7827190074535394331, + "Controller": { + "Configuration": { + "materials": [ + { + "Key": { + "materialSlotStableId": 2418540911 + }, + "Value": { + "MaterialAsset": { + "assetId": { + "guid": "{F2AD0EBF-7137-58D1-9991-9552FAD41B19}" + }, + "assetHint": "materials/presets/pbr/metal_mercury.azmaterial" + } + } + } + ] + } + } + }, + "Component_[8092226976542590265]": { + "$type": "EditorDisabledCompositionComponent", + "Id": 8092226976542590265 + } + } + }, + "Entity_[2042573744084]": { + "Id": "Entity_[2042573744084]", + "Name": "Entity1", + "Components": { + "Component_[11525365929370623807]": { + "$type": "EditorVisibilityComponent", + "Id": 11525365929370623807 + }, + "Component_[12334620273692642550]": { + "$type": "EditorLockComponent", + "Id": 12334620273692642550 + }, + "Component_[14389735759337977675]": { + "$type": "EditorPendingCompositionComponent", + "Id": 14389735759337977675 + }, + "Component_[16184381538555246534]": { + "$type": "AZ::Render::EditorMeshComponent", + "Id": 16184381538555246534, + "Controller": { + "Configuration": { + "ModelAsset": { + "assetId": { + "guid": "{E14975EF-E676-51A4-B826-3EF59CB645AA}", + "subId": 285127096 + }, + "assetHint": "testdata/objects/cube/cube.azmodel" + } + } + } + }, + "Component_[17962478023087084794]": { + "$type": "SelectionComponent", + "Id": 17962478023087084794 + }, + "Component_[18071675051915092508]": { + "$type": "EditorEntityIconComponent", + "Id": 18071675051915092508 + }, + "Component_[2115498007879087044]": { + "$type": "EditorInspectorComponent", + "Id": 2115498007879087044, + "ComponentOrderEntryArray": [ + { + "ComponentId": 399415038452606756 + }, + { + "ComponentId": 16184381538555246534, + "SortIndex": 1 + }, + { + "ComponentId": 7827190074535394331, + "SortIndex": 2 + } + ] + }, + "Component_[3518973002096080237]": { + "$type": "EditorOnlyEntityComponent", + "Id": 3518973002096080237 + }, + "Component_[399415038452606756]": { + "$type": "{27F1E1A1-8D9D-4C3B-BD3A-AFB9762449C0} TransformComponent", + "Id": 399415038452606756, + "Parent Entity": "ContainerEntity", + "Transform Data": { + "Translate": [ + 47.53014373779297, + -0.00018183141946792603, + 74.93071746826172 + ] + } + }, + "Component_[4564240319609068082]": { + "$type": "EditorEntitySortComponent", + "Id": 4564240319609068082 + }, + "Component_[7827190074535394331]": { + "$type": "EditorMaterialComponent", + "Id": 7827190074535394331, + "Controller": { + "Configuration": { + "materials": [ + { + "Key": { + "materialSlotStableId": 2418540911 + }, + "Value": { + "MaterialAsset": { + "assetId": { + "guid": "{A7F03135-ECAD-5440-99DB-E84ABA3D50DA}" + }, + "assetHint": "materials/presets/pbr/metal_iron_polished.azmaterial" + } + } + } + ] + } + } + }, + "Component_[8092226976542590265]": { + "$type": "EditorDisabledCompositionComponent", + "Id": 8092226976542590265 + } + } + }, + "Entity_[2046868711380]": { + "Id": "Entity_[2046868711380]", + "Name": "Entity1", + "Components": { + "Component_[1057179753323467068]": { + "$type": "EditorMaterialComponent", + "Id": 1057179753323467068, + "Controller": { + "Configuration": { + "materials": [ + { + "Key": { + "materialSlotStableId": 2418540911 + }, + "Value": { + "MaterialAsset": { + "assetId": { + "guid": "{3F0DF0C4-5F23-5EB1-B762-7344AFFDC011}" + }, + "assetHint": "materials/presets/pbr/metal_titanium_polished.azmaterial" + } + } + } + ] + } + } + }, + "Component_[11525365929370623807]": { + "$type": "EditorVisibilityComponent", + "Id": 11525365929370623807 + }, + "Component_[12334620273692642550]": { + "$type": "EditorLockComponent", + "Id": 12334620273692642550 + }, + "Component_[14389735759337977675]": { + "$type": "EditorPendingCompositionComponent", + "Id": 14389735759337977675 + }, + "Component_[16184381538555246534]": { + "$type": "AZ::Render::EditorMeshComponent", + "Id": 16184381538555246534, + "Controller": { + "Configuration": { + "ModelAsset": { + "assetId": { + "guid": "{E14975EF-E676-51A4-B826-3EF59CB645AA}", + "subId": 285127096 + }, + "assetHint": "testdata/objects/cube/cube.azmodel" + } + } + } + }, + "Component_[17962478023087084794]": { + "$type": "SelectionComponent", + "Id": 17962478023087084794 + }, + "Component_[18071675051915092508]": { + "$type": "EditorEntityIconComponent", + "Id": 18071675051915092508 + }, + "Component_[2115498007879087044]": { + "$type": "EditorInspectorComponent", + "Id": 2115498007879087044, + "ComponentOrderEntryArray": [ + { + "ComponentId": 399415038452606756 + }, + { + "ComponentId": 16184381538555246534, + "SortIndex": 1 + }, + { + "ComponentId": 1057179753323467068, + "SortIndex": 2 + } + ] + }, + "Component_[3518973002096080237]": { + "$type": "EditorOnlyEntityComponent", + "Id": 3518973002096080237 + }, + "Component_[399415038452606756]": { + "$type": "{27F1E1A1-8D9D-4C3B-BD3A-AFB9762449C0} TransformComponent", + "Id": 399415038452606756, + "Parent Entity": "ContainerEntity", + "Transform Data": { + "Translate": [ + 12.530143737792969, + -0.00018183141946792603, + 74.93071746826172 + ] + } + }, + "Component_[4564240319609068082]": { + "$type": "EditorEntitySortComponent", + "Id": 4564240319609068082 + }, + "Component_[8092226976542590265]": { + "$type": "EditorDisabledCompositionComponent", + "Id": 8092226976542590265 + } + } + }, + "Entity_[2051163678676]": { + "Id": "Entity_[2051163678676]", + "Name": "Entity1", + "Components": { + "Component_[1057179753323467068]": { + "$type": "EditorMaterialComponent", + "Id": 1057179753323467068, + "Controller": { + "Configuration": { + "materials": [ + { + "Key": { + "materialSlotStableId": 2418540911 + }, + "Value": { + "MaterialAsset": { + "assetId": { + "guid": "{3F0DF0C4-5F23-5EB1-B762-7344AFFDC011}" + }, + "assetHint": "materials/presets/pbr/metal_titanium_polished.azmaterial" + } + } + } + ] + } + } + }, + "Component_[11525365929370623807]": { + "$type": "EditorVisibilityComponent", + "Id": 11525365929370623807 + }, + "Component_[12334620273692642550]": { + "$type": "EditorLockComponent", + "Id": 12334620273692642550 + }, + "Component_[14389735759337977675]": { + "$type": "EditorPendingCompositionComponent", + "Id": 14389735759337977675 + }, + "Component_[16184381538555246534]": { + "$type": "AZ::Render::EditorMeshComponent", + "Id": 16184381538555246534, + "Controller": { + "Configuration": { + "ModelAsset": { + "assetId": { + "guid": "{E14975EF-E676-51A4-B826-3EF59CB645AA}", + "subId": 285127096 + }, + "assetHint": "testdata/objects/cube/cube.azmodel" + } + } + } + }, + "Component_[17962478023087084794]": { + "$type": "SelectionComponent", + "Id": 17962478023087084794 + }, + "Component_[18071675051915092508]": { + "$type": "EditorEntityIconComponent", + "Id": 18071675051915092508 + }, + "Component_[2115498007879087044]": { + "$type": "EditorInspectorComponent", + "Id": 2115498007879087044, + "ComponentOrderEntryArray": [ + { + "ComponentId": 399415038452606756 + }, + { + "ComponentId": 16184381538555246534, + "SortIndex": 1 + }, + { + "ComponentId": 1057179753323467068, + "SortIndex": 2 + } + ] + }, + "Component_[3518973002096080237]": { + "$type": "EditorOnlyEntityComponent", + "Id": 3518973002096080237 + }, + "Component_[399415038452606756]": { + "$type": "{27F1E1A1-8D9D-4C3B-BD3A-AFB9762449C0} TransformComponent", + "Id": 399415038452606756, + "Parent Entity": "ContainerEntity", + "Transform Data": { + "Translate": [ + 12.530143737792969, + -0.00018183141946792603, + 0.0 + ] + } + }, + "Component_[4564240319609068082]": { + "$type": "EditorEntitySortComponent", + "Id": 4564240319609068082 + }, + "Component_[8092226976542590265]": { + "$type": "EditorDisabledCompositionComponent", + "Id": 8092226976542590265 + } + } + }, + "Entity_[2055458645972]": { + "Id": "Entity_[2055458645972]", + "Name": "Entity1", + "Components": { + "Component_[11525365929370623807]": { + "$type": "EditorVisibilityComponent", + "Id": 11525365929370623807 + }, + "Component_[12334620273692642550]": { + "$type": "EditorLockComponent", + "Id": 12334620273692642550 + }, + "Component_[14389735759337977675]": { + "$type": "EditorPendingCompositionComponent", + "Id": 14389735759337977675 + }, + "Component_[16184381538555246534]": { + "$type": "AZ::Render::EditorMeshComponent", + "Id": 16184381538555246534, + "Controller": { + "Configuration": { + "ModelAsset": { + "assetId": { + "guid": "{E14975EF-E676-51A4-B826-3EF59CB645AA}", + "subId": 285127096 + }, + "assetHint": "testdata/objects/cube/cube.azmodel" + } + } + } + }, + "Component_[17962478023087084794]": { + "$type": "SelectionComponent", + "Id": 17962478023087084794 + }, + "Component_[18071675051915092508]": { + "$type": "EditorEntityIconComponent", + "Id": 18071675051915092508 + }, + "Component_[2115498007879087044]": { + "$type": "EditorInspectorComponent", + "Id": 2115498007879087044, + "ComponentOrderEntryArray": [ + { + "ComponentId": 399415038452606756 + }, + { + "ComponentId": 16184381538555246534, + "SortIndex": 1 + }, + { + "ComponentId": 7827190074535394331, + "SortIndex": 2 + } + ] + }, + "Component_[3518973002096080237]": { + "$type": "EditorOnlyEntityComponent", + "Id": 3518973002096080237 + }, + "Component_[399415038452606756]": { + "$type": "{27F1E1A1-8D9D-4C3B-BD3A-AFB9762449C0} TransformComponent", + "Id": 399415038452606756, + "Parent Entity": "ContainerEntity", + "Transform Data": { + "Translate": [ + 37.53014373779297, + -0.00018183141946792603, + 0.0 + ] + } + }, + "Component_[4564240319609068082]": { + "$type": "EditorEntitySortComponent", + "Id": 4564240319609068082 + }, + "Component_[7827190074535394331]": { + "$type": "EditorMaterialComponent", + "Id": 7827190074535394331, + "Controller": { + "Configuration": { + "materials": [ + { + "Key": { + "materialSlotStableId": 2418540911 + }, + "Value": { + "MaterialAsset": { + "assetId": { + "guid": "{CF5C7B01-4912-58AE-991A-F25251E505AC}" + }, + "assetHint": "materials/presets/pbr/metal_copper_polished.azmaterial" + } + } + } + ] + } + } + }, + "Component_[8092226976542590265]": { + "$type": "EditorDisabledCompositionComponent", + "Id": 8092226976542590265 + } + } + }, + "Entity_[2059753613268]": { + "Id": "Entity_[2059753613268]", + "Name": "Entity1", + "Components": { + "Component_[11525365929370623807]": { + "$type": "EditorVisibilityComponent", + "Id": 11525365929370623807 + }, + "Component_[12334620273692642550]": { + "$type": "EditorLockComponent", + "Id": 12334620273692642550 + }, + "Component_[14389735759337977675]": { + "$type": "EditorPendingCompositionComponent", + "Id": 14389735759337977675 + }, + "Component_[16184381538555246534]": { + "$type": "AZ::Render::EditorMeshComponent", + "Id": 16184381538555246534, + "Controller": { + "Configuration": { + "ModelAsset": { + "assetId": { + "guid": "{E14975EF-E676-51A4-B826-3EF59CB645AA}", + "subId": 285127096 + }, + "assetHint": "testdata/objects/cube/cube.azmodel" + } + } + } + }, + "Component_[17962478023087084794]": { + "$type": "SelectionComponent", + "Id": 17962478023087084794 + }, + "Component_[18071675051915092508]": { + "$type": "EditorEntityIconComponent", + "Id": 18071675051915092508 + }, + "Component_[2115498007879087044]": { + "$type": "EditorInspectorComponent", + "Id": 2115498007879087044, + "ComponentOrderEntryArray": [ + { + "ComponentId": 399415038452606756 + }, + { + "ComponentId": 16184381538555246534, + "SortIndex": 1 + }, + { + "ComponentId": 7827190074535394331, + "SortIndex": 2 + } + ] + }, + "Component_[3518973002096080237]": { + "$type": "EditorOnlyEntityComponent", + "Id": 3518973002096080237 + }, + "Component_[399415038452606756]": { + "$type": "{27F1E1A1-8D9D-4C3B-BD3A-AFB9762449C0} TransformComponent", + "Id": 399415038452606756, + "Parent Entity": "ContainerEntity", + "Transform Data": { + "Translate": [ + 27.53014373779297, + -0.00018183141946792603, + 54.618019104003906 + ] + } + }, + "Component_[4564240319609068082]": { + "$type": "EditorEntitySortComponent", + "Id": 4564240319609068082 + }, + "Component_[7827190074535394331]": { + "$type": "EditorMaterialComponent", + "Id": 7827190074535394331, + "Controller": { + "Configuration": { + "materials": [ + { + "Key": { + "materialSlotStableId": 2418540911 + }, + "Value": { + "MaterialAsset": { + "assetId": { + "guid": "{B7C712DC-4839-58BB-B522-A4F120084CF5}" + }, + "assetHint": "materials/presets/pbr/metal_chrome.azmaterial" + } + } + } + ] + } + } + }, + "Component_[8092226976542590265]": { + "$type": "EditorDisabledCompositionComponent", + "Id": 8092226976542590265 + } + } + }, + "Entity_[2064048580564]": { + "Id": "Entity_[2064048580564]", + "Name": "Entity1", + "Components": { + "Component_[11525365929370623807]": { + "$type": "EditorVisibilityComponent", + "Id": 11525365929370623807 + }, + "Component_[12334620273692642550]": { + "$type": "EditorLockComponent", + "Id": 12334620273692642550 + }, + "Component_[14389735759337977675]": { + "$type": "EditorPendingCompositionComponent", + "Id": 14389735759337977675 + }, + "Component_[16184381538555246534]": { + "$type": "AZ::Render::EditorMeshComponent", + "Id": 16184381538555246534, + "Controller": { + "Configuration": { + "ModelAsset": { + "assetId": { + "guid": "{E14975EF-E676-51A4-B826-3EF59CB645AA}", + "subId": 285127096 + }, + "assetHint": "testdata/objects/cube/cube.azmodel" + } + } + } + }, + "Component_[17962478023087084794]": { + "$type": "SelectionComponent", + "Id": 17962478023087084794 + }, + "Component_[18071675051915092508]": { + "$type": "EditorEntityIconComponent", + "Id": 18071675051915092508 + }, + "Component_[2115498007879087044]": { + "$type": "EditorInspectorComponent", + "Id": 2115498007879087044, + "ComponentOrderEntryArray": [ + { + "ComponentId": 399415038452606756 + }, + { + "ComponentId": 16184381538555246534, + "SortIndex": 1 + }, + { + "ComponentId": 7827190074535394331, + "SortIndex": 2 + } + ] + }, + "Component_[3518973002096080237]": { + "$type": "EditorOnlyEntityComponent", + "Id": 3518973002096080237 + }, + "Component_[399415038452606756]": { + "$type": "{27F1E1A1-8D9D-4C3B-BD3A-AFB9762449C0} TransformComponent", + "Id": 399415038452606756, + "Parent Entity": "ContainerEntity", + "Transform Data": { + "Translate": [ + 37.53014373779297, + -0.00018183141946792603, + 19.50924301147461 + ] + } + }, + "Component_[4564240319609068082]": { + "$type": "EditorEntitySortComponent", + "Id": 4564240319609068082 + }, + "Component_[7827190074535394331]": { + "$type": "EditorMaterialComponent", + "Id": 7827190074535394331, + "Controller": { + "Configuration": { + "materials": [ + { + "Key": { + "materialSlotStableId": 2418540911 + }, + "Value": { + "MaterialAsset": { + "assetId": { + "guid": "{2D054071-BEF7-53C0-A8C9-E4F026BD8364}" + }, + "assetHint": "materials/presets/pbr/metal_copper_matte.azmaterial" + } + } + } + ] + } + } + }, + "Component_[8092226976542590265]": { + "$type": "EditorDisabledCompositionComponent", + "Id": 8092226976542590265 + } + } + }, + "Entity_[2068343547860]": { + "Id": "Entity_[2068343547860]", + "Name": "Entity1", + "Components": { + "Component_[11525365929370623807]": { + "$type": "EditorVisibilityComponent", + "Id": 11525365929370623807 + }, + "Component_[12334620273692642550]": { + "$type": "EditorLockComponent", + "Id": 12334620273692642550 + }, + "Component_[14389735759337977675]": { + "$type": "EditorPendingCompositionComponent", + "Id": 14389735759337977675 + }, + "Component_[16184381538555246534]": { + "$type": "AZ::Render::EditorMeshComponent", + "Id": 16184381538555246534, + "Controller": { + "Configuration": { + "ModelAsset": { + "assetId": { + "guid": "{E14975EF-E676-51A4-B826-3EF59CB645AA}", + "subId": 285127096 + }, + "assetHint": "testdata/objects/cube/cube.azmodel" + } + } + } + }, + "Component_[17962478023087084794]": { + "$type": "SelectionComponent", + "Id": 17962478023087084794 + }, + "Component_[18071675051915092508]": { + "$type": "EditorEntityIconComponent", + "Id": 18071675051915092508 + }, + "Component_[2115498007879087044]": { + "$type": "EditorInspectorComponent", + "Id": 2115498007879087044, + "ComponentOrderEntryArray": [ + { + "ComponentId": 399415038452606756 + }, + { + "ComponentId": 16184381538555246534, + "SortIndex": 1 + }, + { + "ComponentId": 7827190074535394331, + "SortIndex": 2 + } + ] + }, + "Component_[3518973002096080237]": { + "$type": "EditorOnlyEntityComponent", + "Id": 3518973002096080237 + }, + "Component_[399415038452606756]": { + "$type": "{27F1E1A1-8D9D-4C3B-BD3A-AFB9762449C0} TransformComponent", + "Id": 399415038452606756, + "Parent Entity": "ContainerEntity", + "Transform Data": { + "Translate": [ + -42.53056335449219, + -0.00018183141946792603, + 74.93071746826172 + ] + } + }, + "Component_[4564240319609068082]": { + "$type": "EditorEntitySortComponent", + "Id": 4564240319609068082 + }, + "Component_[7827190074535394331]": { + "$type": "EditorMaterialComponent", + "Id": 7827190074535394331, + "Controller": { + "Configuration": { + "materials": [ + { + "Key": { + "materialSlotStableId": 2418540911 + }, + "Value": { + "MaterialAsset": { + "assetId": { + "guid": "{FC69F2F8-F73B-5A0C-B8B7-94BAA45780FC}" + }, + "assetHint": "materials/presets/pbr/metal_brass_polished.azmaterial" + } + } + } + ] + } + } + }, + "Component_[8092226976542590265]": { + "$type": "EditorDisabledCompositionComponent", + "Id": 8092226976542590265 + } + } + }, + "Entity_[2072638515156]": { + "Id": "Entity_[2072638515156]", + "Name": "Entity1", + "Components": { + "Component_[11525365929370623807]": { + "$type": "EditorVisibilityComponent", + "Id": 11525365929370623807 + }, + "Component_[12334620273692642550]": { + "$type": "EditorLockComponent", + "Id": 12334620273692642550 + }, + "Component_[14389735759337977675]": { + "$type": "EditorPendingCompositionComponent", + "Id": 14389735759337977675 + }, + "Component_[16184381538555246534]": { + "$type": "AZ::Render::EditorMeshComponent", + "Id": 16184381538555246534, + "Controller": { + "Configuration": { + "ModelAsset": { + "assetId": { + "guid": "{E14975EF-E676-51A4-B826-3EF59CB645AA}", + "subId": 285127096 + }, + "assetHint": "testdata/objects/cube/cube.azmodel" + } + } + } + }, + "Component_[17962478023087084794]": { + "$type": "SelectionComponent", + "Id": 17962478023087084794 + }, + "Component_[18071675051915092508]": { + "$type": "EditorEntityIconComponent", + "Id": 18071675051915092508 + }, + "Component_[2115498007879087044]": { + "$type": "EditorInspectorComponent", + "Id": 2115498007879087044, + "ComponentOrderEntryArray": [ + { + "ComponentId": 399415038452606756 + }, + { + "ComponentId": 16184381538555246534, + "SortIndex": 1 + }, + { + "ComponentId": 7827190074535394331, + "SortIndex": 2 + } + ] + }, + "Component_[3518973002096080237]": { + "$type": "EditorOnlyEntityComponent", + "Id": 3518973002096080237 + }, + "Component_[399415038452606756]": { + "$type": "{27F1E1A1-8D9D-4C3B-BD3A-AFB9762449C0} TransformComponent", + "Id": 399415038452606756, + "Parent Entity": "ContainerEntity", + "Transform Data": { + "Translate": [ + 32.53014373779297, + -0.00018183141946792603, + 9.475835800170898 + ] + } + }, + "Component_[4564240319609068082]": { + "$type": "EditorEntitySortComponent", + "Id": 4564240319609068082 + }, + "Component_[7827190074535394331]": { + "$type": "EditorMaterialComponent", + "Id": 7827190074535394331, + "Controller": { + "Configuration": { + "materials": [ + { + "Key": { + "materialSlotStableId": 2418540911 + }, + "Value": { + "MaterialAsset": { + "assetId": { + "guid": "{99976D73-6248-5D66-AD15-E8F52B0AFE36}" + }, + "assetHint": "materials/presets/pbr/metal_cobalt.azmaterial" + } + } + } + ] + } + } + }, + "Component_[8092226976542590265]": { + "$type": "EditorDisabledCompositionComponent", + "Id": 8092226976542590265 + } + } + }, + "Entity_[2076933482452]": { + "Id": "Entity_[2076933482452]", + "Name": "Entity1", + "Components": { + "Component_[11525365929370623807]": { + "$type": "EditorVisibilityComponent", + "Id": 11525365929370623807 + }, + "Component_[12334620273692642550]": { + "$type": "EditorLockComponent", + "Id": 12334620273692642550 + }, + "Component_[14389735759337977675]": { + "$type": "EditorPendingCompositionComponent", + "Id": 14389735759337977675 + }, + "Component_[16184381538555246534]": { + "$type": "AZ::Render::EditorMeshComponent", + "Id": 16184381538555246534, + "Controller": { + "Configuration": { + "ModelAsset": { + "assetId": { + "guid": "{E14975EF-E676-51A4-B826-3EF59CB645AA}", + "subId": 285127096 + }, + "assetHint": "testdata/objects/cube/cube.azmodel" + } + } + } + }, + "Component_[17962478023087084794]": { + "$type": "SelectionComponent", + "Id": 17962478023087084794 + }, + "Component_[18071675051915092508]": { + "$type": "EditorEntityIconComponent", + "Id": 18071675051915092508 + }, + "Component_[2115498007879087044]": { + "$type": "EditorInspectorComponent", + "Id": 2115498007879087044, + "ComponentOrderEntryArray": [ + { + "ComponentId": 399415038452606756 + }, + { + "ComponentId": 16184381538555246534, + "SortIndex": 1 + }, + { + "ComponentId": 7827190074535394331, + "SortIndex": 2 + } + ] + }, + "Component_[3518973002096080237]": { + "$type": "EditorOnlyEntityComponent", + "Id": 3518973002096080237 + }, + "Component_[399415038452606756]": { + "$type": "{27F1E1A1-8D9D-4C3B-BD3A-AFB9762449C0} TransformComponent", + "Id": 399415038452606756, + "Parent Entity": "ContainerEntity", + "Transform Data": { + "Translate": [ + 7.530143737792969, + -0.00018183141946792603, + 34.53608703613281 + ] + } + }, + "Component_[4564240319609068082]": { + "$type": "EditorEntitySortComponent", + "Id": 4564240319609068082 + }, + "Component_[7827190074535394331]": { + "$type": "EditorMaterialComponent", + "Id": 7827190074535394331, + "Controller": { + "Configuration": { + "materials": [ + { + "Key": { + "materialSlotStableId": 2418540911 + }, + "Value": { + "MaterialAsset": { + "assetId": { + "guid": "{E54E46E7-9FA3-54D7-B5F8-8DCCDF17BC24}" + }, + "assetHint": "materials/presets/pbr/metal_silver_matte.azmaterial" + } + } + } + ] + } + } + }, + "Component_[8092226976542590265]": { + "$type": "EditorDisabledCompositionComponent", + "Id": 8092226976542590265 + } + } + }, + "Entity_[2081228449748]": { + "Id": "Entity_[2081228449748]", + "Name": "Entity1", + "Components": { + "Component_[11525365929370623807]": { + "$type": "EditorVisibilityComponent", + "Id": 11525365929370623807 + }, + "Component_[12334620273692642550]": { + "$type": "EditorLockComponent", + "Id": 12334620273692642550 + }, + "Component_[14389735759337977675]": { + "$type": "EditorPendingCompositionComponent", + "Id": 14389735759337977675 + }, + "Component_[16184381538555246534]": { + "$type": "AZ::Render::EditorMeshComponent", + "Id": 16184381538555246534, + "Controller": { + "Configuration": { + "ModelAsset": { + "assetId": { + "guid": "{E14975EF-E676-51A4-B826-3EF59CB645AA}", + "subId": 285127096 + }, + "assetHint": "testdata/objects/cube/cube.azmodel" + } + } + } + }, + "Component_[17962478023087084794]": { + "$type": "SelectionComponent", + "Id": 17962478023087084794 + }, + "Component_[18071675051915092508]": { + "$type": "EditorEntityIconComponent", + "Id": 18071675051915092508 + }, + "Component_[2115498007879087044]": { + "$type": "EditorInspectorComponent", + "Id": 2115498007879087044, + "ComponentOrderEntryArray": [ + { + "ComponentId": 399415038452606756 + }, + { + "ComponentId": 16184381538555246534, + "SortIndex": 1 + }, + { + "ComponentId": 7827190074535394331, + "SortIndex": 2 + } + ] + }, + "Component_[3518973002096080237]": { + "$type": "EditorOnlyEntityComponent", + "Id": 3518973002096080237 + }, + "Component_[399415038452606756]": { + "$type": "{27F1E1A1-8D9D-4C3B-BD3A-AFB9762449C0} TransformComponent", + "Id": 399415038452606756, + "Parent Entity": "ContainerEntity", + "Transform Data": { + "Translate": [ + 2.5301437377929688, + -0.00018183141946792603, + 89.95755767822266 + ] + } + }, + "Component_[4564240319609068082]": { + "$type": "EditorEntitySortComponent", + "Id": 4564240319609068082 + }, + "Component_[7827190074535394331]": { + "$type": "EditorMaterialComponent", + "Id": 7827190074535394331, + "Controller": { + "Configuration": { + "materials": [ + { + "Key": { + "materialSlotStableId": 2418540911 + }, + "Value": { + "MaterialAsset": { + "assetId": { + "guid": "{79419183-FFCE-5A89-AA16-C2789D81AF75}" + }, + "assetHint": "materials/presets/pbr/metal_platinum_polished.azmaterial" + } + } + } + ] + } + } + }, + "Component_[8092226976542590265]": { + "$type": "EditorDisabledCompositionComponent", + "Id": 8092226976542590265 + } + } + }, + "Entity_[2085523417044]": { + "Id": "Entity_[2085523417044]", + "Name": "Entity1", + "Components": { + "Component_[11525365929370623807]": { + "$type": "EditorVisibilityComponent", + "Id": 11525365929370623807 + }, + "Component_[12334620273692642550]": { + "$type": "EditorLockComponent", + "Id": 12334620273692642550 + }, + "Component_[14389735759337977675]": { + "$type": "EditorPendingCompositionComponent", + "Id": 14389735759337977675 + }, + "Component_[16184381538555246534]": { + "$type": "AZ::Render::EditorMeshComponent", + "Id": 16184381538555246534, + "Controller": { + "Configuration": { + "ModelAsset": { + "assetId": { + "guid": "{E14975EF-E676-51A4-B826-3EF59CB645AA}", + "subId": 285127096 + }, + "assetHint": "testdata/objects/cube/cube.azmodel" + } + } + } + }, + "Component_[17962478023087084794]": { + "$type": "SelectionComponent", + "Id": 17962478023087084794 + }, + "Component_[18071675051915092508]": { + "$type": "EditorEntityIconComponent", + "Id": 18071675051915092508 + }, + "Component_[2115498007879087044]": { + "$type": "EditorInspectorComponent", + "Id": 2115498007879087044, + "ComponentOrderEntryArray": [ + { + "ComponentId": 399415038452606756 + }, + { + "ComponentId": 16184381538555246534, + "SortIndex": 1 + }, + { + "ComponentId": 7827190074535394331, + "SortIndex": 2 + } + ] + }, + "Component_[3518973002096080237]": { + "$type": "EditorOnlyEntityComponent", + "Id": 3518973002096080237 + }, + "Component_[399415038452606756]": { + "$type": "{27F1E1A1-8D9D-4C3B-BD3A-AFB9762449C0} TransformComponent", + "Id": 399415038452606756, + "Parent Entity": "ContainerEntity", + "Transform Data": { + "Translate": [ + -37.53056335449219, + -0.00018183141946792603, + 15.057670593261719 + ] + } + }, + "Component_[4564240319609068082]": { + "$type": "EditorEntitySortComponent", + "Id": 4564240319609068082 + }, + "Component_[7827190074535394331]": { + "$type": "EditorMaterialComponent", + "Id": 7827190074535394331, + "Controller": { + "Configuration": { + "materials": [ + { + "Key": { + "materialSlotStableId": 2418540911 + }, + "Value": { + "MaterialAsset": { + "assetId": { + "guid": "{CAF50181-3384-5DF2-9304-C6E48E83C72D}" + }, + "assetHint": "materials/presets/pbr/metal_chrome_polished.azmaterial" + } + } + } + ] + } + } + }, + "Component_[8092226976542590265]": { + "$type": "EditorDisabledCompositionComponent", + "Id": 8092226976542590265 + } + } + }, + "Entity_[2089818384340]": { + "Id": "Entity_[2089818384340]", + "Name": "Entity1", + "Components": { + "Component_[11525365929370623807]": { + "$type": "EditorVisibilityComponent", + "Id": 11525365929370623807 + }, + "Component_[12334620273692642550]": { + "$type": "EditorLockComponent", + "Id": 12334620273692642550 + }, + "Component_[14389735759337977675]": { + "$type": "EditorPendingCompositionComponent", + "Id": 14389735759337977675 + }, + "Component_[16184381538555246534]": { + "$type": "AZ::Render::EditorMeshComponent", + "Id": 16184381538555246534, + "Controller": { + "Configuration": { + "ModelAsset": { + "assetId": { + "guid": "{E14975EF-E676-51A4-B826-3EF59CB645AA}", + "subId": 285127096 + }, + "assetHint": "testdata/objects/cube/cube.azmodel" + } + } + } + }, + "Component_[17962478023087084794]": { + "$type": "SelectionComponent", + "Id": 17962478023087084794 + }, + "Component_[18071675051915092508]": { + "$type": "EditorEntityIconComponent", + "Id": 18071675051915092508 + }, + "Component_[2115498007879087044]": { + "$type": "EditorInspectorComponent", + "Id": 2115498007879087044, + "ComponentOrderEntryArray": [ + { + "ComponentId": 399415038452606756 + }, + { + "ComponentId": 16184381538555246534, + "SortIndex": 1 + }, + { + "ComponentId": 7827190074535394331, + "SortIndex": 2 + } + ] + }, + "Component_[3518973002096080237]": { + "$type": "EditorOnlyEntityComponent", + "Id": 3518973002096080237 + }, + "Component_[399415038452606756]": { + "$type": "{27F1E1A1-8D9D-4C3B-BD3A-AFB9762449C0} TransformComponent", + "Id": 399415038452606756, + "Parent Entity": "ContainerEntity", + "Transform Data": { + "Translate": [ + -2.5305633544921875, + -0.00018183141946792603, + 15.057670593261719 + ] + } + }, + "Component_[4564240319609068082]": { + "$type": "EditorEntitySortComponent", + "Id": 4564240319609068082 + }, + "Component_[7827190074535394331]": { + "$type": "EditorMaterialComponent", + "Id": 7827190074535394331, + "Controller": { + "Configuration": { + "materials": [ + { + "Key": { + "materialSlotStableId": 2418540911 + }, + "Value": { + "MaterialAsset": { + "assetId": { + "guid": "{D0E9960A-4B31-5136-BAC6-5482B203D3B4}" + }, + "assetHint": "materials/presets/pbr/metal_palladium_polished.azmaterial" + } + } + } + ] + } + } + }, + "Component_[8092226976542590265]": { + "$type": "EditorDisabledCompositionComponent", + "Id": 8092226976542590265 + } + } + }, + "Entity_[2094113351636]": { + "Id": "Entity_[2094113351636]", + "Name": "Entity1", + "Components": { + "Component_[11525365929370623807]": { + "$type": "EditorVisibilityComponent", + "Id": 11525365929370623807 + }, + "Component_[12334620273692642550]": { + "$type": "EditorLockComponent", + "Id": 12334620273692642550 + }, + "Component_[14389735759337977675]": { + "$type": "EditorPendingCompositionComponent", + "Id": 14389735759337977675 + }, + "Component_[16184381538555246534]": { + "$type": "AZ::Render::EditorMeshComponent", + "Id": 16184381538555246534, + "Controller": { + "Configuration": { + "ModelAsset": { + "assetId": { + "guid": "{E14975EF-E676-51A4-B826-3EF59CB645AA}", + "subId": 285127096 + }, + "assetHint": "testdata/objects/cube/cube.azmodel" + } + } + } + }, + "Component_[17962478023087084794]": { + "$type": "SelectionComponent", + "Id": 17962478023087084794 + }, + "Component_[18071675051915092508]": { + "$type": "EditorEntityIconComponent", + "Id": 18071675051915092508 + }, + "Component_[2115498007879087044]": { + "$type": "EditorInspectorComponent", + "Id": 2115498007879087044, + "ComponentOrderEntryArray": [ + { + "ComponentId": 399415038452606756 + }, + { + "ComponentId": 16184381538555246534, + "SortIndex": 1 + }, + { + "ComponentId": 7827190074535394331, + "SortIndex": 2 + } + ] + }, + "Component_[3518973002096080237]": { + "$type": "EditorOnlyEntityComponent", + "Id": 3518973002096080237 + }, + "Component_[399415038452606756]": { + "$type": "{27F1E1A1-8D9D-4C3B-BD3A-AFB9762449C0} TransformComponent", + "Id": 399415038452606756, + "Parent Entity": "ContainerEntity", + "Transform Data": { + "Translate": [ + 37.53014373779297, + -0.00018183141946792603, + 0.0 + ] + } + }, + "Component_[4564240319609068082]": { + "$type": "EditorEntitySortComponent", + "Id": 4564240319609068082 + }, + "Component_[7827190074535394331]": { + "$type": "EditorMaterialComponent", + "Id": 7827190074535394331, + "Controller": { + "Configuration": { + "materials": [ + { + "Key": { + "materialSlotStableId": 2418540911 + }, + "Value": { + "MaterialAsset": { + "assetId": { + "guid": "{CF5C7B01-4912-58AE-991A-F25251E505AC}" + }, + "assetHint": "materials/presets/pbr/metal_copper_polished.azmaterial" + } + } + } + ] + } + } + }, + "Component_[8092226976542590265]": { + "$type": "EditorDisabledCompositionComponent", + "Id": 8092226976542590265 + } + } + }, + "Entity_[2098408318932]": { + "Id": "Entity_[2098408318932]", + "Name": "Entity1", + "Components": { + "Component_[11525365929370623807]": { + "$type": "EditorVisibilityComponent", + "Id": 11525365929370623807 + }, + "Component_[12334620273692642550]": { + "$type": "EditorLockComponent", + "Id": 12334620273692642550 + }, + "Component_[14389735759337977675]": { + "$type": "EditorPendingCompositionComponent", + "Id": 14389735759337977675 + }, + "Component_[16184381538555246534]": { + "$type": "AZ::Render::EditorMeshComponent", + "Id": 16184381538555246534, + "Controller": { + "Configuration": { + "ModelAsset": { + "assetId": { + "guid": "{E14975EF-E676-51A4-B826-3EF59CB645AA}", + "subId": 285127096 + }, + "assetHint": "testdata/objects/cube/cube.azmodel" + } + } + } + }, + "Component_[17962478023087084794]": { + "$type": "SelectionComponent", + "Id": 17962478023087084794 + }, + "Component_[18071675051915092508]": { + "$type": "EditorEntityIconComponent", + "Id": 18071675051915092508 + }, + "Component_[2115498007879087044]": { + "$type": "EditorInspectorComponent", + "Id": 2115498007879087044, + "ComponentOrderEntryArray": [ + { + "ComponentId": 399415038452606756 + }, + { + "ComponentId": 16184381538555246534, + "SortIndex": 1 + }, + { + "ComponentId": 7827190074535394331, + "SortIndex": 2 + } + ] + }, + "Component_[3518973002096080237]": { + "$type": "EditorOnlyEntityComponent", + "Id": 3518973002096080237 + }, + "Component_[399415038452606756]": { + "$type": "{27F1E1A1-8D9D-4C3B-BD3A-AFB9762449C0} TransformComponent", + "Id": 399415038452606756, + "Parent Entity": "ContainerEntity", + "Transform Data": { + "Translate": [ + -42.53056335449219, + -0.00018183141946792603, + 64.32462310791016 + ] + } + }, + "Component_[4564240319609068082]": { + "$type": "EditorEntitySortComponent", + "Id": 4564240319609068082 + }, + "Component_[7827190074535394331]": { + "$type": "EditorMaterialComponent", + "Id": 7827190074535394331, + "Controller": { + "Configuration": { + "materials": [ + { + "Key": { + "materialSlotStableId": 2418540911 + }, + "Value": { + "MaterialAsset": { + "assetId": { + "guid": "{AE350D9F-0000-526D-B49C-4303D687BB86}" + }, + "assetHint": "materials/presets/pbr/metal_brass_matte.azmaterial" + } + } + } + ] + } + } + }, + "Component_[8092226976542590265]": { + "$type": "EditorDisabledCompositionComponent", + "Id": 8092226976542590265 + } + } + }, + "Entity_[2102703286228]": { + "Id": "Entity_[2102703286228]", + "Name": "Entity1", + "Components": { + "Component_[11525365929370623807]": { + "$type": "EditorVisibilityComponent", + "Id": 11525365929370623807 + }, + "Component_[12334620273692642550]": { + "$type": "EditorLockComponent", + "Id": 12334620273692642550 + }, + "Component_[14389735759337977675]": { + "$type": "EditorPendingCompositionComponent", + "Id": 14389735759337977675 + }, + "Component_[16184381538555246534]": { + "$type": "AZ::Render::EditorMeshComponent", + "Id": 16184381538555246534, + "Controller": { + "Configuration": { + "ModelAsset": { + "assetId": { + "guid": "{E14975EF-E676-51A4-B826-3EF59CB645AA}", + "subId": 285127096 + }, + "assetHint": "testdata/objects/cube/cube.azmodel" + } + } + } + }, + "Component_[17962478023087084794]": { + "$type": "SelectionComponent", + "Id": 17962478023087084794 + }, + "Component_[18071675051915092508]": { + "$type": "EditorEntityIconComponent", + "Id": 18071675051915092508 + }, + "Component_[2115498007879087044]": { + "$type": "EditorInspectorComponent", + "Id": 2115498007879087044, + "ComponentOrderEntryArray": [ + { + "ComponentId": 399415038452606756 + }, + { + "ComponentId": 16184381538555246534, + "SortIndex": 1 + }, + { + "ComponentId": 7827190074535394331, + "SortIndex": 2 + } + ] + }, + "Component_[3518973002096080237]": { + "$type": "EditorOnlyEntityComponent", + "Id": 3518973002096080237 + }, + "Component_[399415038452606756]": { + "$type": "{27F1E1A1-8D9D-4C3B-BD3A-AFB9762449C0} TransformComponent", + "Id": 399415038452606756, + "Parent Entity": "ContainerEntity", + "Transform Data": { + "Translate": [ + -37.53056335449219, + -0.00018183141946792603, + 39.56034851074219 + ] + } + }, + "Component_[4564240319609068082]": { + "$type": "EditorEntitySortComponent", + "Id": 4564240319609068082 + }, + "Component_[7827190074535394331]": { + "$type": "EditorMaterialComponent", + "Id": 7827190074535394331, + "Controller": { + "Configuration": { + "materials": [ + { + "Key": { + "materialSlotStableId": 2418540911 + }, + "Value": { + "MaterialAsset": { + "assetId": { + "guid": "{B7C712DC-4839-58BB-B522-A4F120084CF5}" + }, + "assetHint": "materials/presets/pbr/metal_chrome.azmaterial" + } + } + } + ] + } + } + }, + "Component_[8092226976542590265]": { + "$type": "EditorDisabledCompositionComponent", + "Id": 8092226976542590265 + } + } + }, + "Entity_[2106998253524]": { + "Id": "Entity_[2106998253524]", + "Name": "Entity1", + "Components": { + "Component_[11525365929370623807]": { + "$type": "EditorVisibilityComponent", + "Id": 11525365929370623807 + }, + "Component_[12334620273692642550]": { + "$type": "EditorLockComponent", + "Id": 12334620273692642550 + }, + "Component_[14389735759337977675]": { + "$type": "EditorPendingCompositionComponent", + "Id": 14389735759337977675 + }, + "Component_[16184381538555246534]": { + "$type": "AZ::Render::EditorMeshComponent", + "Id": 16184381538555246534, + "Controller": { + "Configuration": { + "ModelAsset": { + "assetId": { + "guid": "{E14975EF-E676-51A4-B826-3EF59CB645AA}", + "subId": 285127096 + }, + "assetHint": "testdata/objects/cube/cube.azmodel" + } + } + } + }, + "Component_[17962478023087084794]": { + "$type": "SelectionComponent", + "Id": 17962478023087084794 + }, + "Component_[18071675051915092508]": { + "$type": "EditorEntityIconComponent", + "Id": 18071675051915092508 + }, + "Component_[2115498007879087044]": { + "$type": "EditorInspectorComponent", + "Id": 2115498007879087044, + "ComponentOrderEntryArray": [ + { + "ComponentId": 399415038452606756 + }, + { + "ComponentId": 16184381538555246534, + "SortIndex": 1 + }, + { + "ComponentId": 7827190074535394331, + "SortIndex": 2 + } + ] + }, + "Component_[3518973002096080237]": { + "$type": "EditorOnlyEntityComponent", + "Id": 3518973002096080237 + }, + "Component_[399415038452606756]": { + "$type": "{27F1E1A1-8D9D-4C3B-BD3A-AFB9762449C0} TransformComponent", + "Id": 399415038452606756, + "Parent Entity": "ContainerEntity", + "Transform Data": { + "Translate": [ + 37.53014373779297, + -0.00018183141946792603, + 15.057670593261719 + ] + } + }, + "Component_[4564240319609068082]": { + "$type": "EditorEntitySortComponent", + "Id": 4564240319609068082 + }, + "Component_[7827190074535394331]": { + "$type": "EditorMaterialComponent", + "Id": 7827190074535394331, + "Controller": { + "Configuration": { + "materials": [ + { + "Key": { + "materialSlotStableId": 2418540911 + }, + "Value": { + "MaterialAsset": { + "assetId": { + "guid": "{CF5C7B01-4912-58AE-991A-F25251E505AC}" + }, + "assetHint": "materials/presets/pbr/metal_copper_polished.azmaterial" + } + } + } + ] + } + } + }, + "Component_[8092226976542590265]": { + "$type": "EditorDisabledCompositionComponent", + "Id": 8092226976542590265 + } + } + }, + "Entity_[2111293220820]": { + "Id": "Entity_[2111293220820]", + "Name": "Entity1", + "Components": { + "Component_[11525365929370623807]": { + "$type": "EditorVisibilityComponent", + "Id": 11525365929370623807 + }, + "Component_[12334620273692642550]": { + "$type": "EditorLockComponent", + "Id": 12334620273692642550 + }, + "Component_[14389735759337977675]": { + "$type": "EditorPendingCompositionComponent", + "Id": 14389735759337977675 + }, + "Component_[16184381538555246534]": { + "$type": "AZ::Render::EditorMeshComponent", + "Id": 16184381538555246534, + "Controller": { + "Configuration": { + "ModelAsset": { + "assetId": { + "guid": "{E14975EF-E676-51A4-B826-3EF59CB645AA}", + "subId": 285127096 + }, + "assetHint": "testdata/objects/cube/cube.azmodel" + } + } + } + }, + "Component_[17962478023087084794]": { + "$type": "SelectionComponent", + "Id": 17962478023087084794 + }, + "Component_[18071675051915092508]": { + "$type": "EditorEntityIconComponent", + "Id": 18071675051915092508 + }, + "Component_[2115498007879087044]": { + "$type": "EditorInspectorComponent", + "Id": 2115498007879087044, + "ComponentOrderEntryArray": [ + { + "ComponentId": 399415038452606756 + }, + { + "ComponentId": 16184381538555246534, + "SortIndex": 1 + }, + { + "ComponentId": 7827190074535394331, + "SortIndex": 2 + } + ] + }, + "Component_[3518973002096080237]": { + "$type": "EditorOnlyEntityComponent", + "Id": 3518973002096080237 + }, + "Component_[399415038452606756]": { + "$type": "{27F1E1A1-8D9D-4C3B-BD3A-AFB9762449C0} TransformComponent", + "Id": 399415038452606756, + "Parent Entity": "ContainerEntity", + "Transform Data": { + "Translate": [ + -47.53056335449219, + -0.00018183141946792603, + 45.14218521118164 + ] + } + }, + "Component_[4564240319609068082]": { + "$type": "EditorEntitySortComponent", + "Id": 4564240319609068082 + }, + "Component_[7827190074535394331]": { + "$type": "EditorMaterialComponent", + "Id": 7827190074535394331, + "Controller": { + "Configuration": { + "materials": [ + { + "Key": { + "materialSlotStableId": 2418540911 + }, + "Value": { + "MaterialAsset": { + "assetId": { + "guid": "{64C1F6A6-6BDA-551A-BE56-1829E5913278}" + }, + "assetHint": "materials/presets/pbr/metal_aluminum_polished.azmaterial" + } + } + } + ] + } + } + }, + "Component_[8092226976542590265]": { + "$type": "EditorDisabledCompositionComponent", + "Id": 8092226976542590265 + } + } + }, + "Entity_[2115588188116]": { + "Id": "Entity_[2115588188116]", + "Name": "Entity1", + "Components": { + "Component_[11525365929370623807]": { + "$type": "EditorVisibilityComponent", + "Id": 11525365929370623807 + }, + "Component_[12334620273692642550]": { + "$type": "EditorLockComponent", + "Id": 12334620273692642550 + }, + "Component_[14389735759337977675]": { + "$type": "EditorPendingCompositionComponent", + "Id": 14389735759337977675 + }, + "Component_[16184381538555246534]": { + "$type": "AZ::Render::EditorMeshComponent", + "Id": 16184381538555246534, + "Controller": { + "Configuration": { + "ModelAsset": { + "assetId": { + "guid": "{E14975EF-E676-51A4-B826-3EF59CB645AA}", + "subId": 285127096 + }, + "assetHint": "testdata/objects/cube/cube.azmodel" + } + } + } + }, + "Component_[17962478023087084794]": { + "$type": "SelectionComponent", + "Id": 17962478023087084794 + }, + "Component_[18071675051915092508]": { + "$type": "EditorEntityIconComponent", + "Id": 18071675051915092508 + }, + "Component_[2115498007879087044]": { + "$type": "EditorInspectorComponent", + "Id": 2115498007879087044, + "ComponentOrderEntryArray": [ + { + "ComponentId": 399415038452606756 + }, + { + "ComponentId": 16184381538555246534, + "SortIndex": 1 + }, + { + "ComponentId": 7827190074535394331, + "SortIndex": 2 + } + ] + }, + "Component_[3518973002096080237]": { + "$type": "EditorOnlyEntityComponent", + "Id": 3518973002096080237 + }, + "Component_[399415038452606756]": { + "$type": "{27F1E1A1-8D9D-4C3B-BD3A-AFB9762449C0} TransformComponent", + "Id": 399415038452606756, + "Parent Entity": "ContainerEntity", + "Transform Data": { + "Translate": [ + -42.53056335449219, + -0.00018183141946792603, + 49.593753814697266 + ] + } + }, + "Component_[4564240319609068082]": { + "$type": "EditorEntitySortComponent", + "Id": 4564240319609068082 + }, + "Component_[7827190074535394331]": { + "$type": "EditorMaterialComponent", + "Id": 7827190074535394331, + "Controller": { + "Configuration": { + "materials": [ + { + "Key": { + "materialSlotStableId": 2418540911 + }, + "Value": { + "MaterialAsset": { + "assetId": { + "guid": "{AE350D9F-0000-526D-B49C-4303D687BB86}" + }, + "assetHint": "materials/presets/pbr/metal_brass_matte.azmaterial" + } + } + } + ] + } + } + }, + "Component_[8092226976542590265]": { + "$type": "EditorDisabledCompositionComponent", + "Id": 8092226976542590265 + } + } + }, + "Entity_[2119883155412]": { + "Id": "Entity_[2119883155412]", + "Name": "Entity1", + "Components": { + "Component_[11525365929370623807]": { + "$type": "EditorVisibilityComponent", + "Id": 11525365929370623807 + }, + "Component_[12334620273692642550]": { + "$type": "EditorLockComponent", + "Id": 12334620273692642550 + }, + "Component_[14389735759337977675]": { + "$type": "EditorPendingCompositionComponent", + "Id": 14389735759337977675 + }, + "Component_[16184381538555246534]": { + "$type": "AZ::Render::EditorMeshComponent", + "Id": 16184381538555246534, + "Controller": { + "Configuration": { + "ModelAsset": { + "assetId": { + "guid": "{E14975EF-E676-51A4-B826-3EF59CB645AA}", + "subId": 285127096 + }, + "assetHint": "testdata/objects/cube/cube.azmodel" + } + } + } + }, + "Component_[17962478023087084794]": { + "$type": "SelectionComponent", + "Id": 17962478023087084794 + }, + "Component_[18071675051915092508]": { + "$type": "EditorEntityIconComponent", + "Id": 18071675051915092508 + }, + "Component_[2115498007879087044]": { + "$type": "EditorInspectorComponent", + "Id": 2115498007879087044, + "ComponentOrderEntryArray": [ + { + "ComponentId": 399415038452606756 + }, + { + "ComponentId": 16184381538555246534, + "SortIndex": 1 + }, + { + "ComponentId": 7827190074535394331, + "SortIndex": 2 + } + ] + }, + "Component_[3518973002096080237]": { + "$type": "EditorOnlyEntityComponent", + "Id": 3518973002096080237 + }, + "Component_[399415038452606756]": { + "$type": "{27F1E1A1-8D9D-4C3B-BD3A-AFB9762449C0} TransformComponent", + "Id": 399415038452606756, + "Parent Entity": "ContainerEntity", + "Transform Data": { + "Translate": [ + 17.53014373779297, + -0.00018183141946792603, + 34.53608703613281 + ] + } + }, + "Component_[4564240319609068082]": { + "$type": "EditorEntitySortComponent", + "Id": 4564240319609068082 + }, + "Component_[7827190074535394331]": { + "$type": "EditorMaterialComponent", + "Id": 7827190074535394331, + "Controller": { + "Configuration": { + "materials": [ + { + "Key": {}, + "Value": { + "MaterialAsset": { + "assetId": { + "guid": "{721188E0-B7CC-5D06-8D5D-39AF8ABF2EF9}" + }, + "assetHint": "materials/presets/pbr/metal_titanium.azmaterial" + } + } + }, + { + "Key": { + "materialSlotStableId": 2418540911 + }, + "Value": { + "MaterialAsset": { + "assetId": { + "guid": "{549D26B8-881D-569F-AF05-961F36A43F4F}" + }, + "assetHint": "materials/presets/pbr/metal_aluminum_matte.azmaterial" + } + } + } + ] + } + } + }, + "Component_[8092226976542590265]": { + "$type": "EditorDisabledCompositionComponent", + "Id": 8092226976542590265 + } + } + }, + "Entity_[2124178122708]": { + "Id": "Entity_[2124178122708]", + "Name": "Entity1", + "Components": { + "Component_[11525365929370623807]": { + "$type": "EditorVisibilityComponent", + "Id": 11525365929370623807 + }, + "Component_[12334620273692642550]": { + "$type": "EditorLockComponent", + "Id": 12334620273692642550 + }, + "Component_[14389735759337977675]": { + "$type": "EditorPendingCompositionComponent", + "Id": 14389735759337977675 + }, + "Component_[16184381538555246534]": { + "$type": "AZ::Render::EditorMeshComponent", + "Id": 16184381538555246534, + "Controller": { + "Configuration": { + "ModelAsset": { + "assetId": { + "guid": "{E14975EF-E676-51A4-B826-3EF59CB645AA}", + "subId": 285127096 + }, + "assetHint": "testdata/objects/cube/cube.azmodel" + } + } + } + }, + "Component_[17962478023087084794]": { + "$type": "SelectionComponent", + "Id": 17962478023087084794 + }, + "Component_[18071675051915092508]": { + "$type": "EditorEntityIconComponent", + "Id": 18071675051915092508 + }, + "Component_[2115498007879087044]": { + "$type": "EditorInspectorComponent", + "Id": 2115498007879087044, + "ComponentOrderEntryArray": [ + { + "ComponentId": 399415038452606756 + }, + { + "ComponentId": 16184381538555246534, + "SortIndex": 1 + }, + { + "ComponentId": 7827190074535394331, + "SortIndex": 2 + } + ] + }, + "Component_[3518973002096080237]": { + "$type": "EditorOnlyEntityComponent", + "Id": 3518973002096080237 + }, + "Component_[399415038452606756]": { + "$type": "{27F1E1A1-8D9D-4C3B-BD3A-AFB9762449C0} TransformComponent", + "Id": 399415038452606756, + "Parent Entity": "ContainerEntity", + "Transform Data": { + "Translate": [ + 32.53014373779297, + -0.00018183141946792603, + 4.451573371887207 + ] + } + }, + "Component_[4564240319609068082]": { + "$type": "EditorEntitySortComponent", + "Id": 4564240319609068082 + }, + "Component_[7827190074535394331]": { + "$type": "EditorMaterialComponent", + "Id": 7827190074535394331, + "Controller": { + "Configuration": { + "materials": [ + { + "Key": { + "materialSlotStableId": 2418540911 + }, + "Value": { + "MaterialAsset": { + "assetId": { + "guid": "{C60A39AF-BB76-51BD-9468-A88C9A6F78D7}" + }, + "assetHint": "materials/presets/pbr/metal_cobalt_matte.azmaterial" + } + } + } + ] + } + } + }, + "Component_[8092226976542590265]": { + "$type": "EditorDisabledCompositionComponent", + "Id": 8092226976542590265 + } + } + }, + "Entity_[2128473090004]": { + "Id": "Entity_[2128473090004]", + "Name": "Entity1", + "Components": { + "Component_[11525365929370623807]": { + "$type": "EditorVisibilityComponent", + "Id": 11525365929370623807 + }, + "Component_[12334620273692642550]": { + "$type": "EditorLockComponent", + "Id": 12334620273692642550 + }, + "Component_[14389735759337977675]": { + "$type": "EditorPendingCompositionComponent", + "Id": 14389735759337977675 + }, + "Component_[16184381538555246534]": { + "$type": "AZ::Render::EditorMeshComponent", + "Id": 16184381538555246534, + "Controller": { + "Configuration": { + "ModelAsset": { + "assetId": { + "guid": "{E14975EF-E676-51A4-B826-3EF59CB645AA}", + "subId": 285127096 + }, + "assetHint": "testdata/objects/cube/cube.azmodel" + } + } + } + }, + "Component_[17962478023087084794]": { + "$type": "SelectionComponent", + "Id": 17962478023087084794 + }, + "Component_[18071675051915092508]": { + "$type": "EditorEntityIconComponent", + "Id": 18071675051915092508 + }, + "Component_[2115498007879087044]": { + "$type": "EditorInspectorComponent", + "Id": 2115498007879087044, + "ComponentOrderEntryArray": [ + { + "ComponentId": 399415038452606756 + }, + { + "ComponentId": 16184381538555246534, + "SortIndex": 1 + }, + { + "ComponentId": 7827190074535394331, + "SortIndex": 2 + } + ] + }, + "Component_[3518973002096080237]": { + "$type": "EditorOnlyEntityComponent", + "Id": 3518973002096080237 + }, + "Component_[399415038452606756]": { + "$type": "{27F1E1A1-8D9D-4C3B-BD3A-AFB9762449C0} TransformComponent", + "Id": 399415038452606756, + "Parent Entity": "ContainerEntity", + "Transform Data": { + "Translate": [ + -7.5305633544921875, + -0.00018183141946792603, + 15.057670593261719 + ] + } + }, + "Component_[4564240319609068082]": { + "$type": "EditorEntitySortComponent", + "Id": 4564240319609068082 + }, + "Component_[7827190074535394331]": { + "$type": "EditorMaterialComponent", + "Id": 7827190074535394331, + "Controller": { + "Configuration": { + "materials": [ + { + "Key": { + "materialSlotStableId": 2418540911 + }, + "Value": { + "MaterialAsset": { + "assetId": { + "guid": "{E66E4343-F45A-536D-AAE1-C4D096420640}" + }, + "assetHint": "materials/presets/pbr/metal_nickel_polished.azmaterial" + } + } + } + ] + } + } + }, + "Component_[8092226976542590265]": { + "$type": "EditorDisabledCompositionComponent", + "Id": 8092226976542590265 + } + } + }, + "Entity_[2132768057300]": { + "Id": "Entity_[2132768057300]", + "Name": "Entity1", + "Components": { + "Component_[11525365929370623807]": { + "$type": "EditorVisibilityComponent", + "Id": 11525365929370623807 + }, + "Component_[12334620273692642550]": { + "$type": "EditorLockComponent", + "Id": 12334620273692642550 + }, + "Component_[14389735759337977675]": { + "$type": "EditorPendingCompositionComponent", + "Id": 14389735759337977675 + }, + "Component_[16184381538555246534]": { + "$type": "AZ::Render::EditorMeshComponent", + "Id": 16184381538555246534, + "Controller": { + "Configuration": { + "ModelAsset": { + "assetId": { + "guid": "{E14975EF-E676-51A4-B826-3EF59CB645AA}", + "subId": 285127096 + }, + "assetHint": "testdata/objects/cube/cube.azmodel" + } + } + } + }, + "Component_[17962478023087084794]": { + "$type": "SelectionComponent", + "Id": 17962478023087084794 + }, + "Component_[18071675051915092508]": { + "$type": "EditorEntityIconComponent", + "Id": 18071675051915092508 + }, + "Component_[2115498007879087044]": { + "$type": "EditorInspectorComponent", + "Id": 2115498007879087044, + "ComponentOrderEntryArray": [ + { + "ComponentId": 399415038452606756 + }, + { + "ComponentId": 16184381538555246534, + "SortIndex": 1 + }, + { + "ComponentId": 7827190074535394331, + "SortIndex": 2 + } + ] + }, + "Component_[3518973002096080237]": { + "$type": "EditorOnlyEntityComponent", + "Id": 3518973002096080237 + }, + "Component_[399415038452606756]": { + "$type": "{27F1E1A1-8D9D-4C3B-BD3A-AFB9762449C0} TransformComponent", + "Id": 399415038452606756, + "Parent Entity": "ContainerEntity", + "Transform Data": { + "Translate": [ + -37.53056335449219, + -0.00018183141946792603, + 49.593753814697266 + ] + } + }, + "Component_[4564240319609068082]": { + "$type": "EditorEntitySortComponent", + "Id": 4564240319609068082 + }, + "Component_[7827190074535394331]": { + "$type": "EditorMaterialComponent", + "Id": 7827190074535394331, + "Controller": { + "Configuration": { + "materials": [ + { + "Key": { + "materialSlotStableId": 2418540911 + }, + "Value": { + "MaterialAsset": { + "assetId": { + "guid": "{A78EA2FC-688B-5E3A-A7F6-DB413D11D4CF}" + }, + "assetHint": "materials/presets/pbr/metal_chrome_matte.azmaterial" + } + } + } + ] + } + } + }, + "Component_[8092226976542590265]": { + "$type": "EditorDisabledCompositionComponent", + "Id": 8092226976542590265 + } + } + }, + "Entity_[2137063024596]": { + "Id": "Entity_[2137063024596]", + "Name": "Entity1", + "Components": { + "Component_[11525365929370623807]": { + "$type": "EditorVisibilityComponent", + "Id": 11525365929370623807 + }, + "Component_[12334620273692642550]": { + "$type": "EditorLockComponent", + "Id": 12334620273692642550 + }, + "Component_[14389735759337977675]": { + "$type": "EditorPendingCompositionComponent", + "Id": 14389735759337977675 + }, + "Component_[16184381538555246534]": { + "$type": "AZ::Render::EditorMeshComponent", + "Id": 16184381538555246534, + "Controller": { + "Configuration": { + "ModelAsset": { + "assetId": { + "guid": "{E14975EF-E676-51A4-B826-3EF59CB645AA}", + "subId": 285127096 + }, + "assetHint": "testdata/objects/cube/cube.azmodel" + } + } + } + }, + "Component_[17962478023087084794]": { + "$type": "SelectionComponent", + "Id": 17962478023087084794 + }, + "Component_[18071675051915092508]": { + "$type": "EditorEntityIconComponent", + "Id": 18071675051915092508 + }, + "Component_[2115498007879087044]": { + "$type": "EditorInspectorComponent", + "Id": 2115498007879087044, + "ComponentOrderEntryArray": [ + { + "ComponentId": 399415038452606756 + }, + { + "ComponentId": 16184381538555246534, + "SortIndex": 1 + }, + { + "ComponentId": 7827190074535394331, + "SortIndex": 2 + } + ] + }, + "Component_[3518973002096080237]": { + "$type": "EditorOnlyEntityComponent", + "Id": 3518973002096080237 + }, + "Component_[399415038452606756]": { + "$type": "{27F1E1A1-8D9D-4C3B-BD3A-AFB9762449C0} TransformComponent", + "Id": 399415038452606756, + "Parent Entity": "ContainerEntity", + "Transform Data": { + "Translate": [ + 32.53014373779297, + -0.00018183141946792603, + 59.873046875 + ] + } + }, + "Component_[4564240319609068082]": { + "$type": "EditorEntitySortComponent", + "Id": 4564240319609068082 + }, + "Component_[7827190074535394331]": { + "$type": "EditorMaterialComponent", + "Id": 7827190074535394331, + "Controller": { + "Configuration": { + "materials": [ + { + "Key": { + "materialSlotStableId": 2418540911 + }, + "Value": { + "MaterialAsset": { + "assetId": { + "guid": "{93DF55AE-8D1B-5AD1-A609-05F1BD9F6EA0}" + }, + "assetHint": "materials/presets/pbr/metal_cobalt_polished.azmaterial" + } + } + } + ] + } + } + }, + "Component_[8092226976542590265]": { + "$type": "EditorDisabledCompositionComponent", + "Id": 8092226976542590265 + } + } + }, + "Entity_[2141357991892]": { + "Id": "Entity_[2141357991892]", + "Name": "Entity1", + "Components": { + "Component_[11525365929370623807]": { + "$type": "EditorVisibilityComponent", + "Id": 11525365929370623807 + }, + "Component_[12334620273692642550]": { + "$type": "EditorLockComponent", + "Id": 12334620273692642550 + }, + "Component_[14389735759337977675]": { + "$type": "EditorPendingCompositionComponent", + "Id": 14389735759337977675 + }, + "Component_[16184381538555246534]": { + "$type": "AZ::Render::EditorMeshComponent", + "Id": 16184381538555246534, + "Controller": { + "Configuration": { + "ModelAsset": { + "assetId": { + "guid": "{E14975EF-E676-51A4-B826-3EF59CB645AA}", + "subId": 285127096 + }, + "assetHint": "testdata/objects/cube/cube.azmodel" + } + } + } + }, + "Component_[17962478023087084794]": { + "$type": "SelectionComponent", + "Id": 17962478023087084794 + }, + "Component_[18071675051915092508]": { + "$type": "EditorEntityIconComponent", + "Id": 18071675051915092508 + }, + "Component_[2115498007879087044]": { + "$type": "EditorInspectorComponent", + "Id": 2115498007879087044, + "ComponentOrderEntryArray": [ + { + "ComponentId": 399415038452606756 + }, + { + "ComponentId": 16184381538555246534, + "SortIndex": 1 + }, + { + "ComponentId": 7827190074535394331, + "SortIndex": 2 + } + ] + }, + "Component_[3518973002096080237]": { + "$type": "EditorOnlyEntityComponent", + "Id": 3518973002096080237 + }, + "Component_[399415038452606756]": { + "$type": "{27F1E1A1-8D9D-4C3B-BD3A-AFB9762449C0} TransformComponent", + "Id": 399415038452606756, + "Parent Entity": "ContainerEntity", + "Transform Data": { + "Translate": [ + -32.53056335449219, + -0.00018183141946792603, + 69.34888458251953 + ] + } + }, + "Component_[4564240319609068082]": { + "$type": "EditorEntitySortComponent", + "Id": 4564240319609068082 + }, + "Component_[7827190074535394331]": { + "$type": "EditorMaterialComponent", + "Id": 7827190074535394331, + "Controller": { + "Configuration": { + "materials": [ + { + "Key": { + "materialSlotStableId": 2418540911 + }, + "Value": { + "MaterialAsset": { + "assetId": { + "guid": "{99976D73-6248-5D66-AD15-E8F52B0AFE36}" + }, + "assetHint": "materials/presets/pbr/metal_cobalt.azmaterial" + } + } + } + ] + } + } + }, + "Component_[8092226976542590265]": { + "$type": "EditorDisabledCompositionComponent", + "Id": 8092226976542590265 + } + } + }, + "Entity_[2145652959188]": { + "Id": "Entity_[2145652959188]", + "Name": "Entity1", + "Components": { + "Component_[11525365929370623807]": { + "$type": "EditorVisibilityComponent", + "Id": 11525365929370623807 + }, + "Component_[12334620273692642550]": { + "$type": "EditorLockComponent", + "Id": 12334620273692642550 + }, + "Component_[14389735759337977675]": { + "$type": "EditorPendingCompositionComponent", + "Id": 14389735759337977675 + }, + "Component_[16184381538555246534]": { + "$type": "AZ::Render::EditorMeshComponent", + "Id": 16184381538555246534, + "Controller": { + "Configuration": { + "ModelAsset": { + "assetId": { + "guid": "{E14975EF-E676-51A4-B826-3EF59CB645AA}", + "subId": 285127096 + }, + "assetHint": "testdata/objects/cube/cube.azmodel" + } + } + } + }, + "Component_[17962478023087084794]": { + "$type": "SelectionComponent", + "Id": 17962478023087084794 + }, + "Component_[18071675051915092508]": { + "$type": "EditorEntityIconComponent", + "Id": 18071675051915092508 + }, + "Component_[2115498007879087044]": { + "$type": "EditorInspectorComponent", + "Id": 2115498007879087044, + "ComponentOrderEntryArray": [ + { + "ComponentId": 399415038452606756 + }, + { + "ComponentId": 16184381538555246534, + "SortIndex": 1 + }, + { + "ComponentId": 7827190074535394331, + "SortIndex": 2 + } + ] + }, + "Component_[3518973002096080237]": { + "$type": "EditorOnlyEntityComponent", + "Id": 3518973002096080237 + }, + "Component_[399415038452606756]": { + "$type": "{27F1E1A1-8D9D-4C3B-BD3A-AFB9762449C0} TransformComponent", + "Id": 399415038452606756, + "Parent Entity": "ContainerEntity", + "Transform Data": { + "Translate": [ + 27.53014373779297, + -0.00018183141946792603, + 64.32462310791016 + ] + } + }, + "Component_[4564240319609068082]": { + "$type": "EditorEntitySortComponent", + "Id": 4564240319609068082 + }, + "Component_[7827190074535394331]": { + "$type": "EditorMaterialComponent", + "Id": 7827190074535394331, + "Controller": { + "Configuration": { + "materials": [ + { + "Key": { + "materialSlotStableId": 2418540911 + }, + "Value": { + "MaterialAsset": { + "assetId": { + "guid": "{A78EA2FC-688B-5E3A-A7F6-DB413D11D4CF}" + }, + "assetHint": "materials/presets/pbr/metal_chrome_matte.azmaterial" + } + } + } + ] + } + } + }, + "Component_[8092226976542590265]": { + "$type": "EditorDisabledCompositionComponent", + "Id": 8092226976542590265 + } + } + }, + "Entity_[2149947926484]": { + "Id": "Entity_[2149947926484]", + "Name": "Entity1", + "Components": { + "Component_[11525365929370623807]": { + "$type": "EditorVisibilityComponent", + "Id": 11525365929370623807 + }, + "Component_[12334620273692642550]": { + "$type": "EditorLockComponent", + "Id": 12334620273692642550 + }, + "Component_[14389735759337977675]": { + "$type": "EditorPendingCompositionComponent", + "Id": 14389735759337977675 + }, + "Component_[16184381538555246534]": { + "$type": "AZ::Render::EditorMeshComponent", + "Id": 16184381538555246534, + "Controller": { + "Configuration": { + "ModelAsset": { + "assetId": { + "guid": "{E14975EF-E676-51A4-B826-3EF59CB645AA}", + "subId": 285127096 + }, + "assetHint": "testdata/objects/cube/cube.azmodel" + } + } + } + }, + "Component_[17962478023087084794]": { + "$type": "SelectionComponent", + "Id": 17962478023087084794 + }, + "Component_[18071675051915092508]": { + "$type": "EditorEntityIconComponent", + "Id": 18071675051915092508 + }, + "Component_[2115498007879087044]": { + "$type": "EditorInspectorComponent", + "Id": 2115498007879087044, + "ComponentOrderEntryArray": [ + { + "ComponentId": 399415038452606756 + }, + { + "ComponentId": 16184381538555246534, + "SortIndex": 1 + }, + { + "ComponentId": 7827190074535394331, + "SortIndex": 2 + } + ] + }, + "Component_[3518973002096080237]": { + "$type": "EditorOnlyEntityComponent", + "Id": 3518973002096080237 + }, + "Component_[399415038452606756]": { + "$type": "{27F1E1A1-8D9D-4C3B-BD3A-AFB9762449C0} TransformComponent", + "Id": 399415038452606756, + "Parent Entity": "ContainerEntity", + "Transform Data": { + "Translate": [ + -12.530563354492188, + -0.00018183141946792603, + 64.32462310791016 + ] + } + }, + "Component_[4564240319609068082]": { + "$type": "EditorEntitySortComponent", + "Id": 4564240319609068082 + }, + "Component_[7827190074535394331]": { + "$type": "EditorMaterialComponent", + "Id": 7827190074535394331, + "Controller": { + "Configuration": { + "materials": [ + { + "Key": { + "materialSlotStableId": 2418540911 + }, + "Value": { + "MaterialAsset": { + "assetId": { + "guid": "{F2AD0EBF-7137-58D1-9991-9552FAD41B19}" + }, + "assetHint": "materials/presets/pbr/metal_mercury.azmaterial" + } + } + } + ] + } + } + }, + "Component_[8092226976542590265]": { + "$type": "EditorDisabledCompositionComponent", + "Id": 8092226976542590265 + } + } + }, + "Entity_[2154242893780]": { + "Id": "Entity_[2154242893780]", + "Name": "Entity1", + "Components": { + "Component_[11525365929370623807]": { + "$type": "EditorVisibilityComponent", + "Id": 11525365929370623807 + }, + "Component_[12334620273692642550]": { + "$type": "EditorLockComponent", + "Id": 12334620273692642550 + }, + "Component_[14389735759337977675]": { + "$type": "EditorPendingCompositionComponent", + "Id": 14389735759337977675 + }, + "Component_[16184381538555246534]": { + "$type": "AZ::Render::EditorMeshComponent", + "Id": 16184381538555246534, + "Controller": { + "Configuration": { + "ModelAsset": { + "assetId": { + "guid": "{E14975EF-E676-51A4-B826-3EF59CB645AA}", + "subId": 285127096 + }, + "assetHint": "testdata/objects/cube/cube.azmodel" + } + } + } + }, + "Component_[17962478023087084794]": { + "$type": "SelectionComponent", + "Id": 17962478023087084794 + }, + "Component_[18071675051915092508]": { + "$type": "EditorEntityIconComponent", + "Id": 18071675051915092508 + }, + "Component_[2115498007879087044]": { + "$type": "EditorInspectorComponent", + "Id": 2115498007879087044, + "ComponentOrderEntryArray": [ + { + "ComponentId": 399415038452606756 + }, + { + "ComponentId": 16184381538555246534, + "SortIndex": 1 + }, + { + "ComponentId": 7827190074535394331, + "SortIndex": 2 + } + ] + }, + "Component_[3518973002096080237]": { + "$type": "EditorOnlyEntityComponent", + "Id": 3518973002096080237 + }, + "Component_[399415038452606756]": { + "$type": "{27F1E1A1-8D9D-4C3B-BD3A-AFB9762449C0} TransformComponent", + "Id": 399415038452606756, + "Parent Entity": "ContainerEntity", + "Transform Data": { + "Translate": [ + 42.53014373779297, + -0.00018183141946792603, + 19.50924301147461 + ] + } + }, + "Component_[4564240319609068082]": { + "$type": "EditorEntitySortComponent", + "Id": 4564240319609068082 + }, + "Component_[7827190074535394331]": { + "$type": "EditorMaterialComponent", + "Id": 7827190074535394331, + "Controller": { + "Configuration": { + "materials": [ + { + "Key": { + "materialSlotStableId": 2418540911 + }, + "Value": { + "MaterialAsset": { + "assetId": { + "guid": "{5BC13D95-377E-53EA-9A93-156384BE8B04}" + }, + "assetHint": "materials/presets/pbr/metal_gold_matte.azmaterial" + } + } + } + ] + } + } + }, + "Component_[8092226976542590265]": { + "$type": "EditorDisabledCompositionComponent", + "Id": 8092226976542590265 + } + } + }, + "Entity_[2158537861076]": { + "Id": "Entity_[2158537861076]", + "Name": "Entity1", + "Components": { + "Component_[11525365929370623807]": { + "$type": "EditorVisibilityComponent", + "Id": 11525365929370623807 + }, + "Component_[12334620273692642550]": { + "$type": "EditorLockComponent", + "Id": 12334620273692642550 + }, + "Component_[14389735759337977675]": { + "$type": "EditorPendingCompositionComponent", + "Id": 14389735759337977675 + }, + "Component_[16184381538555246534]": { + "$type": "AZ::Render::EditorMeshComponent", + "Id": 16184381538555246534, + "Controller": { + "Configuration": { + "ModelAsset": { + "assetId": { + "guid": "{E14975EF-E676-51A4-B826-3EF59CB645AA}", + "subId": 285127096 + }, + "assetHint": "testdata/objects/cube/cube.azmodel" + } + } + } + }, + "Component_[17962478023087084794]": { + "$type": "SelectionComponent", + "Id": 17962478023087084794 + }, + "Component_[18071675051915092508]": { + "$type": "EditorEntityIconComponent", + "Id": 18071675051915092508 + }, + "Component_[2115498007879087044]": { + "$type": "EditorInspectorComponent", + "Id": 2115498007879087044, + "ComponentOrderEntryArray": [ + { + "ComponentId": 399415038452606756 + }, + { + "ComponentId": 16184381538555246534, + "SortIndex": 1 + }, + { + "ComponentId": 7827190074535394331, + "SortIndex": 2 + } + ] + }, + "Component_[3518973002096080237]": { + "$type": "EditorOnlyEntityComponent", + "Id": 3518973002096080237 + }, + "Component_[399415038452606756]": { + "$type": "{27F1E1A1-8D9D-4C3B-BD3A-AFB9762449C0} TransformComponent", + "Id": 399415038452606756, + "Parent Entity": "ContainerEntity", + "Transform Data": { + "Translate": [ + -2.5305633544921875, + -0.00018183141946792603, + 49.593753814697266 + ] + } + }, + "Component_[4564240319609068082]": { + "$type": "EditorEntitySortComponent", + "Id": 4564240319609068082 + }, + "Component_[7827190074535394331]": { + "$type": "EditorMaterialComponent", + "Id": 7827190074535394331, + "Controller": { + "Configuration": { + "materials": [ + { + "Key": { + "materialSlotStableId": 2418540911 + }, + "Value": { + "MaterialAsset": { + "assetId": { + "guid": "{9187B84B-425F-5D11-B4D7-35BBDB0959D1}" + }, + "assetHint": "materials/presets/pbr/metal_palladium_matte.azmaterial" + } + } + } + ] + } + } + }, + "Component_[8092226976542590265]": { + "$type": "EditorDisabledCompositionComponent", + "Id": 8092226976542590265 + } + } + }, + "Entity_[2162832828372]": { + "Id": "Entity_[2162832828372]", + "Name": "Entity1", + "Components": { + "Component_[11525365929370623807]": { + "$type": "EditorVisibilityComponent", + "Id": 11525365929370623807 + }, + "Component_[12334620273692642550]": { + "$type": "EditorLockComponent", + "Id": 12334620273692642550 + }, + "Component_[14389735759337977675]": { + "$type": "EditorPendingCompositionComponent", + "Id": 14389735759337977675 + }, + "Component_[16184381538555246534]": { + "$type": "AZ::Render::EditorMeshComponent", + "Id": 16184381538555246534, + "Controller": { + "Configuration": { + "ModelAsset": { + "assetId": { + "guid": "{E14975EF-E676-51A4-B826-3EF59CB645AA}", + "subId": 285127096 + }, + "assetHint": "testdata/objects/cube/cube.azmodel" + } + } + } + }, + "Component_[17962478023087084794]": { + "$type": "SelectionComponent", + "Id": 17962478023087084794 + }, + "Component_[18071675051915092508]": { + "$type": "EditorEntityIconComponent", + "Id": 18071675051915092508 + }, + "Component_[2115498007879087044]": { + "$type": "EditorInspectorComponent", + "Id": 2115498007879087044, + "ComponentOrderEntryArray": [ + { + "ComponentId": 399415038452606756 + }, + { + "ComponentId": 16184381538555246534, + "SortIndex": 1 + }, + { + "ComponentId": 7827190074535394331, + "SortIndex": 2 + } + ] + }, + "Component_[3518973002096080237]": { + "$type": "EditorOnlyEntityComponent", + "Id": 3518973002096080237 + }, + "Component_[399415038452606756]": { + "$type": "{27F1E1A1-8D9D-4C3B-BD3A-AFB9762449C0} TransformComponent", + "Id": 399415038452606756, + "Parent Entity": "ContainerEntity", + "Transform Data": { + "Translate": [ + 7.530143737792969, + -0.00018183141946792603, + 30.08451271057129 + ] + } + }, + "Component_[4564240319609068082]": { + "$type": "EditorEntitySortComponent", + "Id": 4564240319609068082 + }, + "Component_[7827190074535394331]": { + "$type": "EditorMaterialComponent", + "Id": 7827190074535394331, + "Controller": { + "Configuration": { + "materials": [ + { + "Key": { + "materialSlotStableId": 2418540911 + }, + "Value": { + "MaterialAsset": { + "assetId": { + "guid": "{2AC06FA3-7670-542E-8996-DF346AFF1B61}" + }, + "assetHint": "materials/presets/pbr/metal_silver_polished.azmaterial" + } + } + } + ] + } + } + }, + "Component_[8092226976542590265]": { + "$type": "EditorDisabledCompositionComponent", + "Id": 8092226976542590265 + } + } + }, + "Entity_[2167127795668]": { + "Id": "Entity_[2167127795668]", + "Name": "Entity1", + "Components": { + "Component_[11525365929370623807]": { + "$type": "EditorVisibilityComponent", + "Id": 11525365929370623807 + }, + "Component_[12334620273692642550]": { + "$type": "EditorLockComponent", + "Id": 12334620273692642550 + }, + "Component_[14389735759337977675]": { + "$type": "EditorPendingCompositionComponent", + "Id": 14389735759337977675 + }, + "Component_[16184381538555246534]": { + "$type": "AZ::Render::EditorMeshComponent", + "Id": 16184381538555246534, + "Controller": { + "Configuration": { + "ModelAsset": { + "assetId": { + "guid": "{E14975EF-E676-51A4-B826-3EF59CB645AA}", + "subId": 285127096 + }, + "assetHint": "testdata/objects/cube/cube.azmodel" + } + } + } + }, + "Component_[17962478023087084794]": { + "$type": "SelectionComponent", + "Id": 17962478023087084794 + }, + "Component_[18071675051915092508]": { + "$type": "EditorEntityIconComponent", + "Id": 18071675051915092508 + }, + "Component_[2115498007879087044]": { + "$type": "EditorInspectorComponent", + "Id": 2115498007879087044, + "ComponentOrderEntryArray": [ + { + "ComponentId": 399415038452606756 + }, + { + "ComponentId": 16184381538555246534, + "SortIndex": 1 + }, + { + "ComponentId": 7827190074535394331, + "SortIndex": 2 + } + ] + }, + "Component_[3518973002096080237]": { + "$type": "EditorOnlyEntityComponent", + "Id": 3518973002096080237 + }, + "Component_[399415038452606756]": { + "$type": "{27F1E1A1-8D9D-4C3B-BD3A-AFB9762449C0} TransformComponent", + "Id": 399415038452606756, + "Parent Entity": "ContainerEntity", + "Transform Data": { + "Translate": [ + 22.53014373779297, + -0.00018183141946792603, + 0.0 + ] + } + }, + "Component_[4564240319609068082]": { + "$type": "EditorEntitySortComponent", + "Id": 4564240319609068082 + }, + "Component_[7827190074535394331]": { + "$type": "EditorMaterialComponent", + "Id": 7827190074535394331, + "Controller": { + "Configuration": { + "materials": [ + { + "Key": { + "materialSlotStableId": 2418540911 + }, + "Value": { + "MaterialAsset": { + "assetId": { + "guid": "{FC69F2F8-F73B-5A0C-B8B7-94BAA45780FC}" + }, + "assetHint": "materials/presets/pbr/metal_brass_polished.azmaterial" + } + } + } + ] + } + } + }, + "Component_[8092226976542590265]": { + "$type": "EditorDisabledCompositionComponent", + "Id": 8092226976542590265 + } + } + }, + "Entity_[2171422762964]": { + "Id": "Entity_[2171422762964]", + "Name": "Entity1", + "Components": { + "Component_[11525365929370623807]": { + "$type": "EditorVisibilityComponent", + "Id": 11525365929370623807 + }, + "Component_[12334620273692642550]": { + "$type": "EditorLockComponent", + "Id": 12334620273692642550 + }, + "Component_[14389735759337977675]": { + "$type": "EditorPendingCompositionComponent", + "Id": 14389735759337977675 + }, + "Component_[16184381538555246534]": { + "$type": "AZ::Render::EditorMeshComponent", + "Id": 16184381538555246534, + "Controller": { + "Configuration": { + "ModelAsset": { + "assetId": { + "guid": "{E14975EF-E676-51A4-B826-3EF59CB645AA}", + "subId": 285127096 + }, + "assetHint": "testdata/objects/cube/cube.azmodel" + } + } + } + }, + "Component_[17962478023087084794]": { + "$type": "SelectionComponent", + "Id": 17962478023087084794 + }, + "Component_[18071675051915092508]": { + "$type": "EditorEntityIconComponent", + "Id": 18071675051915092508 + }, + "Component_[2115498007879087044]": { + "$type": "EditorInspectorComponent", + "Id": 2115498007879087044, + "ComponentOrderEntryArray": [ + { + "ComponentId": 399415038452606756 + }, + { + "ComponentId": 16184381538555246534, + "SortIndex": 1 + }, + { + "ComponentId": 7827190074535394331, + "SortIndex": 2 + } + ] + }, + "Component_[3518973002096080237]": { + "$type": "EditorOnlyEntityComponent", + "Id": 3518973002096080237 + }, + "Component_[399415038452606756]": { + "$type": "{27F1E1A1-8D9D-4C3B-BD3A-AFB9762449C0} TransformComponent", + "Id": 399415038452606756, + "Parent Entity": "ContainerEntity", + "Transform Data": { + "Translate": [ + 42.53014373779297, + -0.00018183141946792603, + 74.93071746826172 + ] + } + }, + "Component_[4564240319609068082]": { + "$type": "EditorEntitySortComponent", + "Id": 4564240319609068082 + }, + "Component_[7827190074535394331]": { + "$type": "EditorMaterialComponent", + "Id": 7827190074535394331, + "Controller": { + "Configuration": { + "materials": [ + { + "Key": { + "materialSlotStableId": 2418540911 + }, + "Value": { + "MaterialAsset": { + "assetId": { + "guid": "{FB4657EB-FB3A-5EC3-A772-DC36D6F733C3}" + }, + "assetHint": "materials/presets/pbr/metal_gold_polished.azmaterial" + } + } + } + ] + } + } + }, + "Component_[8092226976542590265]": { + "$type": "EditorDisabledCompositionComponent", + "Id": 8092226976542590265 + } + } + }, + "Entity_[2175717730260]": { + "Id": "Entity_[2175717730260]", + "Name": "Entity1", + "Components": { + "Component_[11525365929370623807]": { + "$type": "EditorVisibilityComponent", + "Id": 11525365929370623807 + }, + "Component_[12334620273692642550]": { + "$type": "EditorLockComponent", + "Id": 12334620273692642550 + }, + "Component_[14389735759337977675]": { + "$type": "EditorPendingCompositionComponent", + "Id": 14389735759337977675 + }, + "Component_[16184381538555246534]": { + "$type": "AZ::Render::EditorMeshComponent", + "Id": 16184381538555246534, + "Controller": { + "Configuration": { + "ModelAsset": { + "assetId": { + "guid": "{E14975EF-E676-51A4-B826-3EF59CB645AA}", + "subId": 285127096 + }, + "assetHint": "testdata/objects/cube/cube.azmodel" + } + } + } + }, + "Component_[17962478023087084794]": { + "$type": "SelectionComponent", + "Id": 17962478023087084794 + }, + "Component_[18071675051915092508]": { + "$type": "EditorEntityIconComponent", + "Id": 18071675051915092508 + }, + "Component_[2115498007879087044]": { + "$type": "EditorInspectorComponent", + "Id": 2115498007879087044, + "ComponentOrderEntryArray": [ + { + "ComponentId": 399415038452606756 + }, + { + "ComponentId": 16184381538555246534, + "SortIndex": 1 + }, + { + "ComponentId": 7827190074535394331, + "SortIndex": 2 + } + ] + }, + "Component_[3518973002096080237]": { + "$type": "EditorOnlyEntityComponent", + "Id": 3518973002096080237 + }, + "Component_[399415038452606756]": { + "$type": "{27F1E1A1-8D9D-4C3B-BD3A-AFB9762449C0} TransformComponent", + "Id": 399415038452606756, + "Parent Entity": "ContainerEntity", + "Transform Data": { + "Translate": [ + 32.53014373779297, + -0.00018183141946792603, + 64.32462310791016 + ] + } + }, + "Component_[4564240319609068082]": { + "$type": "EditorEntitySortComponent", + "Id": 4564240319609068082 + }, + "Component_[7827190074535394331]": { + "$type": "EditorMaterialComponent", + "Id": 7827190074535394331, + "Controller": { + "Configuration": { + "materials": [ + { + "Key": { + "materialSlotStableId": 2418540911 + }, + "Value": { + "MaterialAsset": { + "assetId": { + "guid": "{C60A39AF-BB76-51BD-9468-A88C9A6F78D7}" + }, + "assetHint": "materials/presets/pbr/metal_cobalt_matte.azmaterial" + } + } + } + ] + } + } + }, + "Component_[8092226976542590265]": { + "$type": "EditorDisabledCompositionComponent", + "Id": 8092226976542590265 + } + } + }, + "Entity_[2180012697556]": { + "Id": "Entity_[2180012697556]", + "Name": "Entity1", + "Components": { + "Component_[11525365929370623807]": { + "$type": "EditorVisibilityComponent", + "Id": 11525365929370623807 + }, + "Component_[12334620273692642550]": { + "$type": "EditorLockComponent", + "Id": 12334620273692642550 + }, + "Component_[14389735759337977675]": { + "$type": "EditorPendingCompositionComponent", + "Id": 14389735759337977675 + }, + "Component_[16184381538555246534]": { + "$type": "AZ::Render::EditorMeshComponent", + "Id": 16184381538555246534, + "Controller": { + "Configuration": { + "ModelAsset": { + "assetId": { + "guid": "{E14975EF-E676-51A4-B826-3EF59CB645AA}", + "subId": 285127096 + }, + "assetHint": "testdata/objects/cube/cube.azmodel" + } + } + } + }, + "Component_[17962478023087084794]": { + "$type": "SelectionComponent", + "Id": 17962478023087084794 + }, + "Component_[18071675051915092508]": { + "$type": "EditorEntityIconComponent", + "Id": 18071675051915092508 + }, + "Component_[2115498007879087044]": { + "$type": "EditorInspectorComponent", + "Id": 2115498007879087044, + "ComponentOrderEntryArray": [ + { + "ComponentId": 399415038452606756 + }, + { + "ComponentId": 16184381538555246534, + "SortIndex": 1 + }, + { + "ComponentId": 7827190074535394331, + "SortIndex": 2 + } + ] + }, + "Component_[3518973002096080237]": { + "$type": "EditorOnlyEntityComponent", + "Id": 3518973002096080237 + }, + "Component_[399415038452606756]": { + "$type": "{27F1E1A1-8D9D-4C3B-BD3A-AFB9762449C0} TransformComponent", + "Id": 399415038452606756, + "Parent Entity": "ContainerEntity", + "Transform Data": { + "Translate": [ + -2.5305633544921875, + -0.00018183141946792603, + 99.43339538574219 + ] + } + }, + "Component_[4564240319609068082]": { + "$type": "EditorEntitySortComponent", + "Id": 4564240319609068082 + }, + "Component_[7827190074535394331]": { + "$type": "EditorMaterialComponent", + "Id": 7827190074535394331, + "Controller": { + "Configuration": { + "materials": [ + { + "Key": { + "materialSlotStableId": 2418540911 + }, + "Value": { + "MaterialAsset": { + "assetId": { + "guid": "{DC0598ED-1EDD-5B37-892E-E0867621D74C}" + }, + "assetHint": "materials/presets/pbr/metal_palladium.azmaterial" + } + } + } + ] + } + } + }, + "Component_[8092226976542590265]": { + "$type": "EditorDisabledCompositionComponent", + "Id": 8092226976542590265 + } + } + }, + "Entity_[2184307664852]": { + "Id": "Entity_[2184307664852]", + "Name": "Entity1", + "Components": { + "Component_[11525365929370623807]": { + "$type": "EditorVisibilityComponent", + "Id": 11525365929370623807 + }, + "Component_[12334620273692642550]": { + "$type": "EditorLockComponent", + "Id": 12334620273692642550 + }, + "Component_[14389735759337977675]": { + "$type": "EditorPendingCompositionComponent", + "Id": 14389735759337977675 + }, + "Component_[16184381538555246534]": { + "$type": "AZ::Render::EditorMeshComponent", + "Id": 16184381538555246534, + "Controller": { + "Configuration": { + "ModelAsset": { + "assetId": { + "guid": "{E14975EF-E676-51A4-B826-3EF59CB645AA}", + "subId": 285127096 + }, + "assetHint": "testdata/objects/cube/cube.azmodel" + } + } + } + }, + "Component_[17962478023087084794]": { + "$type": "SelectionComponent", + "Id": 17962478023087084794 + }, + "Component_[18071675051915092508]": { + "$type": "EditorEntityIconComponent", + "Id": 18071675051915092508 + }, + "Component_[2115498007879087044]": { + "$type": "EditorInspectorComponent", + "Id": 2115498007879087044, + "ComponentOrderEntryArray": [ + { + "ComponentId": 399415038452606756 + }, + { + "ComponentId": 16184381538555246534, + "SortIndex": 1 + }, + { + "ComponentId": 7827190074535394331, + "SortIndex": 2 + } + ] + }, + "Component_[3518973002096080237]": { + "$type": "EditorOnlyEntityComponent", + "Id": 3518973002096080237 + }, + "Component_[399415038452606756]": { + "$type": "{27F1E1A1-8D9D-4C3B-BD3A-AFB9762449C0} TransformComponent", + "Id": 399415038452606756, + "Parent Entity": "ContainerEntity", + "Transform Data": { + "Translate": [ + 42.53014373779297, + -0.00018183141946792603, + 0.0 + ] + } + }, + "Component_[4564240319609068082]": { + "$type": "EditorEntitySortComponent", + "Id": 4564240319609068082 + }, + "Component_[7827190074535394331]": { + "$type": "EditorMaterialComponent", + "Id": 7827190074535394331, + "Controller": { + "Configuration": { + "materials": [ + { + "Key": { + "materialSlotStableId": 2418540911 + }, + "Value": { + "MaterialAsset": { + "assetId": { + "guid": "{FB4657EB-FB3A-5EC3-A772-DC36D6F733C3}" + }, + "assetHint": "materials/presets/pbr/metal_gold_polished.azmaterial" + } + } + } + ] + } + } + }, + "Component_[8092226976542590265]": { + "$type": "EditorDisabledCompositionComponent", + "Id": 8092226976542590265 + } + } + }, + "Entity_[2188602632148]": { + "Id": "Entity_[2188602632148]", + "Name": "Entity1", + "Components": { + "Component_[11525365929370623807]": { + "$type": "EditorVisibilityComponent", + "Id": 11525365929370623807 + }, + "Component_[12334620273692642550]": { + "$type": "EditorLockComponent", + "Id": 12334620273692642550 + }, + "Component_[14389735759337977675]": { + "$type": "EditorPendingCompositionComponent", + "Id": 14389735759337977675 + }, + "Component_[16184381538555246534]": { + "$type": "AZ::Render::EditorMeshComponent", + "Id": 16184381538555246534, + "Controller": { + "Configuration": { + "ModelAsset": { + "assetId": { + "guid": "{E14975EF-E676-51A4-B826-3EF59CB645AA}", + "subId": 285127096 + }, + "assetHint": "testdata/objects/cube/cube.azmodel" + } + } + } + }, + "Component_[17962478023087084794]": { + "$type": "SelectionComponent", + "Id": 17962478023087084794 + }, + "Component_[18071675051915092508]": { + "$type": "EditorEntityIconComponent", + "Id": 18071675051915092508 + }, + "Component_[2115498007879087044]": { + "$type": "EditorInspectorComponent", + "Id": 2115498007879087044, + "ComponentOrderEntryArray": [ + { + "ComponentId": 399415038452606756 + }, + { + "ComponentId": 16184381538555246534, + "SortIndex": 1 + }, + { + "ComponentId": 7827190074535394331, + "SortIndex": 2 + } + ] + }, + "Component_[3518973002096080237]": { + "$type": "EditorOnlyEntityComponent", + "Id": 3518973002096080237 + }, + "Component_[399415038452606756]": { + "$type": "{27F1E1A1-8D9D-4C3B-BD3A-AFB9762449C0} TransformComponent", + "Id": 399415038452606756, + "Parent Entity": "ContainerEntity", + "Transform Data": { + "Translate": [ + -47.53056335449219, + -0.00018183141946792603, + 59.873046875 + ] + } + }, + "Component_[4564240319609068082]": { + "$type": "EditorEntitySortComponent", + "Id": 4564240319609068082 + }, + "Component_[7827190074535394331]": { + "$type": "EditorMaterialComponent", + "Id": 7827190074535394331, + "Controller": { + "Configuration": { + "materials": [ + { + "Key": { + "materialSlotStableId": 2418540911 + }, + "Value": { + "MaterialAsset": { + "assetId": { + "guid": "{64C1F6A6-6BDA-551A-BE56-1829E5913278}" + }, + "assetHint": "materials/presets/pbr/metal_aluminum_polished.azmaterial" + } + } + } + ] + } + } + }, + "Component_[8092226976542590265]": { + "$type": "EditorDisabledCompositionComponent", + "Id": 8092226976542590265 + } + } + }, + "Entity_[2192897599444]": { + "Id": "Entity_[2192897599444]", + "Name": "Entity1", + "Components": { + "Component_[11525365929370623807]": { + "$type": "EditorVisibilityComponent", + "Id": 11525365929370623807 + }, + "Component_[12334620273692642550]": { + "$type": "EditorLockComponent", + "Id": 12334620273692642550 + }, + "Component_[14389735759337977675]": { + "$type": "EditorPendingCompositionComponent", + "Id": 14389735759337977675 + }, + "Component_[16184381538555246534]": { + "$type": "AZ::Render::EditorMeshComponent", + "Id": 16184381538555246534, + "Controller": { + "Configuration": { + "ModelAsset": { + "assetId": { + "guid": "{E14975EF-E676-51A4-B826-3EF59CB645AA}", + "subId": 285127096 + }, + "assetHint": "testdata/objects/cube/cube.azmodel" + } + } + } + }, + "Component_[17962478023087084794]": { + "$type": "SelectionComponent", + "Id": 17962478023087084794 + }, + "Component_[18071675051915092508]": { + "$type": "EditorEntityIconComponent", + "Id": 18071675051915092508 + }, + "Component_[2115498007879087044]": { + "$type": "EditorInspectorComponent", + "Id": 2115498007879087044, + "ComponentOrderEntryArray": [ + { + "ComponentId": 399415038452606756 + }, + { + "ComponentId": 16184381538555246534, + "SortIndex": 1 + }, + { + "ComponentId": 7827190074535394331, + "SortIndex": 2 + } + ] + }, + "Component_[3518973002096080237]": { + "$type": "EditorOnlyEntityComponent", + "Id": 3518973002096080237 + }, + "Component_[399415038452606756]": { + "$type": "{27F1E1A1-8D9D-4C3B-BD3A-AFB9762449C0} TransformComponent", + "Id": 399415038452606756, + "Parent Entity": "ContainerEntity", + "Transform Data": { + "Translate": [ + 2.5301437377929688, + -0.00018183141946792603, + 30.08451271057129 + ] + } + }, + "Component_[4564240319609068082]": { + "$type": "EditorEntitySortComponent", + "Id": 4564240319609068082 + }, + "Component_[7827190074535394331]": { + "$type": "EditorMaterialComponent", + "Id": 7827190074535394331, + "Controller": { + "Configuration": { + "materials": [ + { + "Key": { + "materialSlotStableId": 2418540911 + }, + "Value": { + "MaterialAsset": { + "assetId": { + "guid": "{79419183-FFCE-5A89-AA16-C2789D81AF75}" + }, + "assetHint": "materials/presets/pbr/metal_platinum_polished.azmaterial" + } + } + } + ] + } + } + }, + "Component_[8092226976542590265]": { + "$type": "EditorDisabledCompositionComponent", + "Id": 8092226976542590265 + } + } + }, + "Entity_[2197192566740]": { + "Id": "Entity_[2197192566740]", + "Name": "Entity1", + "Components": { + "Component_[11525365929370623807]": { + "$type": "EditorVisibilityComponent", + "Id": 11525365929370623807 + }, + "Component_[12334620273692642550]": { + "$type": "EditorLockComponent", + "Id": 12334620273692642550 + }, + "Component_[14389735759337977675]": { + "$type": "EditorPendingCompositionComponent", + "Id": 14389735759337977675 + }, + "Component_[16184381538555246534]": { + "$type": "AZ::Render::EditorMeshComponent", + "Id": 16184381538555246534, + "Controller": { + "Configuration": { + "ModelAsset": { + "assetId": { + "guid": "{E14975EF-E676-51A4-B826-3EF59CB645AA}", + "subId": 285127096 + }, + "assetHint": "testdata/objects/cube/cube.azmodel" + } + } + } + }, + "Component_[17962478023087084794]": { + "$type": "SelectionComponent", + "Id": 17962478023087084794 + }, + "Component_[18071675051915092508]": { + "$type": "EditorEntityIconComponent", + "Id": 18071675051915092508 + }, + "Component_[2115498007879087044]": { + "$type": "EditorInspectorComponent", + "Id": 2115498007879087044, + "ComponentOrderEntryArray": [ + { + "ComponentId": 399415038452606756 + }, + { + "ComponentId": 16184381538555246534, + "SortIndex": 1 + }, + { + "ComponentId": 7827190074535394331, + "SortIndex": 2 + } + ] + }, + "Component_[3518973002096080237]": { + "$type": "EditorOnlyEntityComponent", + "Id": 3518973002096080237 + }, + "Component_[399415038452606756]": { + "$type": "{27F1E1A1-8D9D-4C3B-BD3A-AFB9762449C0} TransformComponent", + "Id": 399415038452606756, + "Parent Entity": "ContainerEntity", + "Transform Data": { + "Translate": [ + -42.53056335449219, + -0.00018183141946792603, + 109.46680450439453 + ] + } + }, + "Component_[4564240319609068082]": { + "$type": "EditorEntitySortComponent", + "Id": 4564240319609068082 + }, + "Component_[7827190074535394331]": { + "$type": "EditorMaterialComponent", + "Id": 7827190074535394331, + "Controller": { + "Configuration": { + "materials": [ + { + "Key": { + "materialSlotStableId": 2418540911 + }, + "Value": { + "MaterialAsset": { + "assetId": { + "guid": "{AE350D9F-0000-526D-B49C-4303D687BB86}" + }, + "assetHint": "materials/presets/pbr/metal_brass_matte.azmaterial" + } + } + } + ] + } + } + }, + "Component_[8092226976542590265]": { + "$type": "EditorDisabledCompositionComponent", + "Id": 8092226976542590265 + } + } + }, + "Entity_[2201487534036]": { + "Id": "Entity_[2201487534036]", + "Name": "Entity1", + "Components": { + "Component_[11525365929370623807]": { + "$type": "EditorVisibilityComponent", + "Id": 11525365929370623807 + }, + "Component_[12334620273692642550]": { + "$type": "EditorLockComponent", + "Id": 12334620273692642550 + }, + "Component_[14389735759337977675]": { + "$type": "EditorPendingCompositionComponent", + "Id": 14389735759337977675 + }, + "Component_[16184381538555246534]": { + "$type": "AZ::Render::EditorMeshComponent", + "Id": 16184381538555246534, + "Controller": { + "Configuration": { + "ModelAsset": { + "assetId": { + "guid": "{E14975EF-E676-51A4-B826-3EF59CB645AA}", + "subId": 285127096 + }, + "assetHint": "testdata/objects/cube/cube.azmodel" + } + } + } + }, + "Component_[17962478023087084794]": { + "$type": "SelectionComponent", + "Id": 17962478023087084794 + }, + "Component_[18071675051915092508]": { + "$type": "EditorEntityIconComponent", + "Id": 18071675051915092508 + }, + "Component_[2115498007879087044]": { + "$type": "EditorInspectorComponent", + "Id": 2115498007879087044, + "ComponentOrderEntryArray": [ + { + "ComponentId": 399415038452606756 + }, + { + "ComponentId": 16184381538555246534, + "SortIndex": 1 + }, + { + "ComponentId": 7827190074535394331, + "SortIndex": 2 + } + ] + }, + "Component_[3518973002096080237]": { + "$type": "EditorOnlyEntityComponent", + "Id": 3518973002096080237 + }, + "Component_[399415038452606756]": { + "$type": "{27F1E1A1-8D9D-4C3B-BD3A-AFB9762449C0} TransformComponent", + "Id": 399415038452606756, + "Parent Entity": "ContainerEntity", + "Transform Data": { + "Translate": [ + -2.5305633544921875, + -0.00018183141946792603, + 39.56034851074219 + ] + } + }, + "Component_[4564240319609068082]": { + "$type": "EditorEntitySortComponent", + "Id": 4564240319609068082 + }, + "Component_[7827190074535394331]": { + "$type": "EditorMaterialComponent", + "Id": 7827190074535394331, + "Controller": { + "Configuration": { + "materials": [ + { + "Key": { + "materialSlotStableId": 2418540911 + }, + "Value": { + "MaterialAsset": { + "assetId": { + "guid": "{DC0598ED-1EDD-5B37-892E-E0867621D74C}" + }, + "assetHint": "materials/presets/pbr/metal_palladium.azmaterial" + } + } + } + ] + } + } + }, + "Component_[8092226976542590265]": { + "$type": "EditorDisabledCompositionComponent", + "Id": 8092226976542590265 + } + } + }, + "Entity_[2205782501332]": { + "Id": "Entity_[2205782501332]", + "Name": "Entity1", + "Components": { + "Component_[1057179753323467068]": { + "$type": "EditorMaterialComponent", + "Id": 1057179753323467068, + "Controller": { + "Configuration": { + "materials": [ + { + "Key": { + "materialSlotStableId": 2418540911 + }, + "Value": { + "MaterialAsset": { + "assetId": { + "guid": "{3F0DF0C4-5F23-5EB1-B762-7344AFFDC011}" + }, + "assetHint": "materials/presets/pbr/metal_titanium_polished.azmaterial" + } + } + } + ] + } + } + }, + "Component_[11525365929370623807]": { + "$type": "EditorVisibilityComponent", + "Id": 11525365929370623807 + }, + "Component_[12334620273692642550]": { + "$type": "EditorLockComponent", + "Id": 12334620273692642550 + }, + "Component_[14389735759337977675]": { + "$type": "EditorPendingCompositionComponent", + "Id": 14389735759337977675 + }, + "Component_[16184381538555246534]": { + "$type": "AZ::Render::EditorMeshComponent", + "Id": 16184381538555246534, + "Controller": { + "Configuration": { + "ModelAsset": { + "assetId": { + "guid": "{E14975EF-E676-51A4-B826-3EF59CB645AA}", + "subId": 285127096 + }, + "assetHint": "testdata/objects/cube/cube.azmodel" + } + } + } + }, + "Component_[17962478023087084794]": { + "$type": "SelectionComponent", + "Id": 17962478023087084794 + }, + "Component_[18071675051915092508]": { + "$type": "EditorEntityIconComponent", + "Id": 18071675051915092508 + }, + "Component_[2115498007879087044]": { + "$type": "EditorInspectorComponent", + "Id": 2115498007879087044, + "ComponentOrderEntryArray": [ + { + "ComponentId": 399415038452606756 + }, + { + "ComponentId": 16184381538555246534, + "SortIndex": 1 + }, + { + "ComponentId": 1057179753323467068, + "SortIndex": 2 + } + ] + }, + "Component_[3518973002096080237]": { + "$type": "EditorOnlyEntityComponent", + "Id": 3518973002096080237 + }, + "Component_[399415038452606756]": { + "$type": "{27F1E1A1-8D9D-4C3B-BD3A-AFB9762449C0} TransformComponent", + "Id": 399415038452606756, + "Parent Entity": "ContainerEntity", + "Transform Data": { + "Translate": [ + 12.530143737792969, + -0.00018183141946792603, + 45.14218521118164 + ] + } + }, + "Component_[4564240319609068082]": { + "$type": "EditorEntitySortComponent", + "Id": 4564240319609068082 + }, + "Component_[8092226976542590265]": { + "$type": "EditorDisabledCompositionComponent", + "Id": 8092226976542590265 + } + } + }, + "Entity_[2210077468628]": { + "Id": "Entity_[2210077468628]", + "Name": "Entity1", + "Components": { + "Component_[11525365929370623807]": { + "$type": "EditorVisibilityComponent", + "Id": 11525365929370623807 + }, + "Component_[12334620273692642550]": { + "$type": "EditorLockComponent", + "Id": 12334620273692642550 + }, + "Component_[14389735759337977675]": { + "$type": "EditorPendingCompositionComponent", + "Id": 14389735759337977675 + }, + "Component_[16184381538555246534]": { + "$type": "AZ::Render::EditorMeshComponent", + "Id": 16184381538555246534, + "Controller": { + "Configuration": { + "ModelAsset": { + "assetId": { + "guid": "{E14975EF-E676-51A4-B826-3EF59CB645AA}", + "subId": 285127096 + }, + "assetHint": "testdata/objects/cube/cube.azmodel" + } + } + } + }, + "Component_[17962478023087084794]": { + "$type": "SelectionComponent", + "Id": 17962478023087084794 + }, + "Component_[18071675051915092508]": { + "$type": "EditorEntityIconComponent", + "Id": 18071675051915092508 + }, + "Component_[2115498007879087044]": { + "$type": "EditorInspectorComponent", + "Id": 2115498007879087044, + "ComponentOrderEntryArray": [ + { + "ComponentId": 399415038452606756 + }, + { + "ComponentId": 16184381538555246534, + "SortIndex": 1 + }, + { + "ComponentId": 7827190074535394331, + "SortIndex": 2 + } + ] + }, + "Component_[3518973002096080237]": { + "$type": "EditorOnlyEntityComponent", + "Id": 3518973002096080237 + }, + "Component_[399415038452606756]": { + "$type": "{27F1E1A1-8D9D-4C3B-BD3A-AFB9762449C0} TransformComponent", + "Id": 399415038452606756, + "Parent Entity": "ContainerEntity", + "Transform Data": { + "Translate": [ + -32.53056335449219, + -0.00018183141946792603, + 59.873046875 + ] + } + }, + "Component_[4564240319609068082]": { + "$type": "EditorEntitySortComponent", + "Id": 4564240319609068082 + }, + "Component_[7827190074535394331]": { + "$type": "EditorMaterialComponent", + "Id": 7827190074535394331, + "Controller": { + "Configuration": { + "materials": [ + { + "Key": { + "materialSlotStableId": 2418540911 + }, + "Value": { + "MaterialAsset": { + "assetId": { + "guid": "{93DF55AE-8D1B-5AD1-A609-05F1BD9F6EA0}" + }, + "assetHint": "materials/presets/pbr/metal_cobalt_polished.azmaterial" + } + } + } + ] + } + } + }, + "Component_[8092226976542590265]": { + "$type": "EditorDisabledCompositionComponent", + "Id": 8092226976542590265 + } + } + }, + "Entity_[2214372435924]": { + "Id": "Entity_[2214372435924]", + "Name": "Entity1", + "Components": { + "Component_[11525365929370623807]": { + "$type": "EditorVisibilityComponent", + "Id": 11525365929370623807 + }, + "Component_[12334620273692642550]": { + "$type": "EditorLockComponent", + "Id": 12334620273692642550 + }, + "Component_[14389735759337977675]": { + "$type": "EditorPendingCompositionComponent", + "Id": 14389735759337977675 + }, + "Component_[16184381538555246534]": { + "$type": "AZ::Render::EditorMeshComponent", + "Id": 16184381538555246534, + "Controller": { + "Configuration": { + "ModelAsset": { + "assetId": { + "guid": "{E14975EF-E676-51A4-B826-3EF59CB645AA}", + "subId": 285127096 + }, + "assetHint": "testdata/objects/cube/cube.azmodel" + } + } + } + }, + "Component_[17962478023087084794]": { + "$type": "SelectionComponent", + "Id": 17962478023087084794 + }, + "Component_[18071675051915092508]": { + "$type": "EditorEntityIconComponent", + "Id": 18071675051915092508 + }, + "Component_[2115498007879087044]": { + "$type": "EditorInspectorComponent", + "Id": 2115498007879087044, + "ComponentOrderEntryArray": [ + { + "ComponentId": 399415038452606756 + }, + { + "ComponentId": 16184381538555246534, + "SortIndex": 1 + }, + { + "ComponentId": 7827190074535394331, + "SortIndex": 2 + } + ] + }, + "Component_[3518973002096080237]": { + "$type": "EditorOnlyEntityComponent", + "Id": 3518973002096080237 + }, + "Component_[399415038452606756]": { + "$type": "{27F1E1A1-8D9D-4C3B-BD3A-AFB9762449C0} TransformComponent", + "Id": 399415038452606756, + "Parent Entity": "ContainerEntity", + "Transform Data": { + "Translate": [ + 47.53014373779297, + -0.00018183141946792603, + 114.4910659790039 + ] + } + }, + "Component_[4564240319609068082]": { + "$type": "EditorEntitySortComponent", + "Id": 4564240319609068082 + }, + "Component_[7827190074535394331]": { + "$type": "EditorMaterialComponent", + "Id": 7827190074535394331, + "Controller": { + "Configuration": { + "materials": [ + { + "Key": { + "materialSlotStableId": 2418540911 + }, + "Value": { + "MaterialAsset": { + "assetId": { + "guid": "{892EA944-0325-5FA6-94D7-4AB4FC02A0F5}" + }, + "assetHint": "materials/presets/pbr/metal_iron.azmaterial" + } + } + } + ] + } + } + }, + "Component_[8092226976542590265]": { + "$type": "EditorDisabledCompositionComponent", + "Id": 8092226976542590265 + } + } + }, + "Entity_[2218667403220]": { + "Id": "Entity_[2218667403220]", + "Name": "Entity1", + "Components": { + "Component_[11525365929370623807]": { + "$type": "EditorVisibilityComponent", + "Id": 11525365929370623807 + }, + "Component_[12334620273692642550]": { + "$type": "EditorLockComponent", + "Id": 12334620273692642550 + }, + "Component_[14389735759337977675]": { + "$type": "EditorPendingCompositionComponent", + "Id": 14389735759337977675 + }, + "Component_[16184381538555246534]": { + "$type": "AZ::Render::EditorMeshComponent", + "Id": 16184381538555246534, + "Controller": { + "Configuration": { + "ModelAsset": { + "assetId": { + "guid": "{E14975EF-E676-51A4-B826-3EF59CB645AA}", + "subId": 285127096 + }, + "assetHint": "testdata/objects/cube/cube.azmodel" + } + } + } + }, + "Component_[17962478023087084794]": { + "$type": "SelectionComponent", + "Id": 17962478023087084794 + }, + "Component_[18071675051915092508]": { + "$type": "EditorEntityIconComponent", + "Id": 18071675051915092508 + }, + "Component_[2115498007879087044]": { + "$type": "EditorInspectorComponent", + "Id": 2115498007879087044, + "ComponentOrderEntryArray": [ + { + "ComponentId": 399415038452606756 + }, + { + "ComponentId": 16184381538555246534, + "SortIndex": 1 + }, + { + "ComponentId": 7827190074535394331, + "SortIndex": 2 + } + ] + }, + "Component_[3518973002096080237]": { + "$type": "EditorOnlyEntityComponent", + "Id": 3518973002096080237 + }, + "Component_[399415038452606756]": { + "$type": "{27F1E1A1-8D9D-4C3B-BD3A-AFB9762449C0} TransformComponent", + "Id": 399415038452606756, + "Parent Entity": "ContainerEntity", + "Transform Data": { + "Translate": [ + 7.530143737792969, + -0.00018183141946792603, + 109.46680450439453 + ] + } + }, + "Component_[4564240319609068082]": { + "$type": "EditorEntitySortComponent", + "Id": 4564240319609068082 + }, + "Component_[7827190074535394331]": { + "$type": "EditorMaterialComponent", + "Id": 7827190074535394331, + "Controller": { + "Configuration": { + "materials": [ + { + "Key": { + "materialSlotStableId": 2418540911 + }, + "Value": { + "MaterialAsset": { + "assetId": { + "guid": "{E54E46E7-9FA3-54D7-B5F8-8DCCDF17BC24}" + }, + "assetHint": "materials/presets/pbr/metal_silver_matte.azmaterial" + } + } + } + ] + } + } + }, + "Component_[8092226976542590265]": { + "$type": "EditorDisabledCompositionComponent", + "Id": 8092226976542590265 + } + } + }, + "Entity_[2222962370516]": { + "Id": "Entity_[2222962370516]", + "Name": "Entity1", + "Components": { + "Component_[11525365929370623807]": { + "$type": "EditorVisibilityComponent", + "Id": 11525365929370623807 + }, + "Component_[12334620273692642550]": { + "$type": "EditorLockComponent", + "Id": 12334620273692642550 + }, + "Component_[14389735759337977675]": { + "$type": "EditorPendingCompositionComponent", + "Id": 14389735759337977675 + }, + "Component_[16184381538555246534]": { + "$type": "AZ::Render::EditorMeshComponent", + "Id": 16184381538555246534, + "Controller": { + "Configuration": { + "ModelAsset": { + "assetId": { + "guid": "{E14975EF-E676-51A4-B826-3EF59CB645AA}", + "subId": 285127096 + }, + "assetHint": "testdata/objects/cube/cube.azmodel" + } + } + } + }, + "Component_[17962478023087084794]": { + "$type": "SelectionComponent", + "Id": 17962478023087084794 + }, + "Component_[18071675051915092508]": { + "$type": "EditorEntityIconComponent", + "Id": 18071675051915092508 + }, + "Component_[2115498007879087044]": { + "$type": "EditorInspectorComponent", + "Id": 2115498007879087044, + "ComponentOrderEntryArray": [ + { + "ComponentId": 399415038452606756 + }, + { + "ComponentId": 16184381538555246534, + "SortIndex": 1 + }, + { + "ComponentId": 7827190074535394331, + "SortIndex": 2 + } + ] + }, + "Component_[3518973002096080237]": { + "$type": "EditorOnlyEntityComponent", + "Id": 3518973002096080237 + }, + "Component_[399415038452606756]": { + "$type": "{27F1E1A1-8D9D-4C3B-BD3A-AFB9762449C0} TransformComponent", + "Id": 399415038452606756, + "Parent Entity": "ContainerEntity", + "Transform Data": { + "Translate": [ + -7.5305633544921875, + -0.00018183141946792603, + 19.50924301147461 + ] + } + }, + "Component_[4564240319609068082]": { + "$type": "EditorEntitySortComponent", + "Id": 4564240319609068082 + }, + "Component_[7827190074535394331]": { + "$type": "EditorMaterialComponent", + "Id": 7827190074535394331, + "Controller": { + "Configuration": { + "materials": [ + { + "Key": { + "materialSlotStableId": 2418540911 + }, + "Value": { + "MaterialAsset": { + "assetId": { + "guid": "{E56377B1-6310-5311-A494-135BE50B74F0}" + }, + "assetHint": "materials/presets/pbr/metal_nickel_matte.azmaterial" + } + } + } + ] + } + } + }, + "Component_[8092226976542590265]": { + "$type": "EditorDisabledCompositionComponent", + "Id": 8092226976542590265 + } + } + }, + "Entity_[2227257337812]": { + "Id": "Entity_[2227257337812]", + "Name": "Entity1", + "Components": { + "Component_[11525365929370623807]": { + "$type": "EditorVisibilityComponent", + "Id": 11525365929370623807 + }, + "Component_[12334620273692642550]": { + "$type": "EditorLockComponent", + "Id": 12334620273692642550 + }, + "Component_[14389735759337977675]": { + "$type": "EditorPendingCompositionComponent", + "Id": 14389735759337977675 + }, + "Component_[16184381538555246534]": { + "$type": "AZ::Render::EditorMeshComponent", + "Id": 16184381538555246534, + "Controller": { + "Configuration": { + "ModelAsset": { + "assetId": { + "guid": "{E14975EF-E676-51A4-B826-3EF59CB645AA}", + "subId": 285127096 + }, + "assetHint": "testdata/objects/cube/cube.azmodel" + } + } + } + }, + "Component_[17962478023087084794]": { + "$type": "SelectionComponent", + "Id": 17962478023087084794 + }, + "Component_[18071675051915092508]": { + "$type": "EditorEntityIconComponent", + "Id": 18071675051915092508 + }, + "Component_[2115498007879087044]": { + "$type": "EditorInspectorComponent", + "Id": 2115498007879087044, + "ComponentOrderEntryArray": [ + { + "ComponentId": 399415038452606756 + }, + { + "ComponentId": 16184381538555246534, + "SortIndex": 1 + }, + { + "ComponentId": 7827190074535394331, + "SortIndex": 2 + } + ] + }, + "Component_[3518973002096080237]": { + "$type": "EditorOnlyEntityComponent", + "Id": 3518973002096080237 + }, + "Component_[399415038452606756]": { + "$type": "{27F1E1A1-8D9D-4C3B-BD3A-AFB9762449C0} TransformComponent", + "Id": 399415038452606756, + "Parent Entity": "ContainerEntity", + "Transform Data": { + "Translate": [ + -42.53056335449219, + -0.00018183141946792603, + 64.32462310791016 + ] + } + }, + "Component_[4564240319609068082]": { + "$type": "EditorEntitySortComponent", + "Id": 4564240319609068082 + }, + "Component_[7827190074535394331]": { + "$type": "EditorMaterialComponent", + "Id": 7827190074535394331, + "Controller": { + "Configuration": { + "materials": [ + { + "Key": { + "materialSlotStableId": 2418540911 + }, + "Value": { + "MaterialAsset": { + "assetId": { + "guid": "{AE350D9F-0000-526D-B49C-4303D687BB86}" + }, + "assetHint": "materials/presets/pbr/metal_brass_matte.azmaterial" + } + } + } + ] + } + } + }, + "Component_[8092226976542590265]": { + "$type": "EditorDisabledCompositionComponent", + "Id": 8092226976542590265 + } + } + }, + "Entity_[2231552305108]": { + "Id": "Entity_[2231552305108]", + "Name": "Entity1", + "Components": { + "Component_[11525365929370623807]": { + "$type": "EditorVisibilityComponent", + "Id": 11525365929370623807 + }, + "Component_[12334620273692642550]": { + "$type": "EditorLockComponent", + "Id": 12334620273692642550 + }, + "Component_[14389735759337977675]": { + "$type": "EditorPendingCompositionComponent", + "Id": 14389735759337977675 + }, + "Component_[16184381538555246534]": { + "$type": "AZ::Render::EditorMeshComponent", + "Id": 16184381538555246534, + "Controller": { + "Configuration": { + "ModelAsset": { + "assetId": { + "guid": "{E14975EF-E676-51A4-B826-3EF59CB645AA}", + "subId": 285127096 + }, + "assetHint": "testdata/objects/cube/cube.azmodel" + } + } + } + }, + "Component_[17962478023087084794]": { + "$type": "SelectionComponent", + "Id": 17962478023087084794 + }, + "Component_[18071675051915092508]": { + "$type": "EditorEntityIconComponent", + "Id": 18071675051915092508 + }, + "Component_[2115498007879087044]": { + "$type": "EditorInspectorComponent", + "Id": 2115498007879087044, + "ComponentOrderEntryArray": [ + { + "ComponentId": 399415038452606756 + }, + { + "ComponentId": 16184381538555246534, + "SortIndex": 1 + }, + { + "ComponentId": 7827190074535394331, + "SortIndex": 2 + } + ] + }, + "Component_[3518973002096080237]": { + "$type": "EditorOnlyEntityComponent", + "Id": 3518973002096080237 + }, + "Component_[399415038452606756]": { + "$type": "{27F1E1A1-8D9D-4C3B-BD3A-AFB9762449C0} TransformComponent", + "Id": 399415038452606756, + "Parent Entity": "ContainerEntity", + "Transform Data": { + "Translate": [ + -47.53056335449219, + -0.00018183141946792603, + 49.593753814697266 + ] + } + }, + "Component_[4564240319609068082]": { + "$type": "EditorEntitySortComponent", + "Id": 4564240319609068082 + }, + "Component_[7827190074535394331]": { + "$type": "EditorMaterialComponent", + "Id": 7827190074535394331, + "Controller": { + "Configuration": { + "materials": [ + { + "Key": { + "materialSlotStableId": 2418540911 + }, + "Value": { + "MaterialAsset": { + "assetId": { + "guid": "{549D26B8-881D-569F-AF05-961F36A43F4F}" + }, + "assetHint": "materials/presets/pbr/metal_aluminum_matte.azmaterial" + } + } + } + ] + } + } + }, + "Component_[8092226976542590265]": { + "$type": "EditorDisabledCompositionComponent", + "Id": 8092226976542590265 + } + } + }, + "Entity_[2235847272404]": { + "Id": "Entity_[2235847272404]", + "Name": "Entity1", + "Components": { + "Component_[11525365929370623807]": { + "$type": "EditorVisibilityComponent", + "Id": 11525365929370623807 + }, + "Component_[12334620273692642550]": { + "$type": "EditorLockComponent", + "Id": 12334620273692642550 + }, + "Component_[14389735759337977675]": { + "$type": "EditorPendingCompositionComponent", + "Id": 14389735759337977675 + }, + "Component_[16184381538555246534]": { + "$type": "AZ::Render::EditorMeshComponent", + "Id": 16184381538555246534, + "Controller": { + "Configuration": { + "ModelAsset": { + "assetId": { + "guid": "{E14975EF-E676-51A4-B826-3EF59CB645AA}", + "subId": 285127096 + }, + "assetHint": "testdata/objects/cube/cube.azmodel" + } + } + } + }, + "Component_[17962478023087084794]": { + "$type": "SelectionComponent", + "Id": 17962478023087084794 + }, + "Component_[18071675051915092508]": { + "$type": "EditorEntityIconComponent", + "Id": 18071675051915092508 + }, + "Component_[2115498007879087044]": { + "$type": "EditorInspectorComponent", + "Id": 2115498007879087044, + "ComponentOrderEntryArray": [ + { + "ComponentId": 399415038452606756 + }, + { + "ComponentId": 16184381538555246534, + "SortIndex": 1 + }, + { + "ComponentId": 7827190074535394331, + "SortIndex": 2 + } + ] + }, + "Component_[3518973002096080237]": { + "$type": "EditorOnlyEntityComponent", + "Id": 3518973002096080237 + }, + "Component_[399415038452606756]": { + "$type": "{27F1E1A1-8D9D-4C3B-BD3A-AFB9762449C0} TransformComponent", + "Id": 399415038452606756, + "Parent Entity": "ContainerEntity", + "Transform Data": { + "Translate": [ + 2.5301437377929688, + -0.00018183141946792603, + 0.0 + ] + } + }, + "Component_[4564240319609068082]": { + "$type": "EditorEntitySortComponent", + "Id": 4564240319609068082 + }, + "Component_[7827190074535394331]": { + "$type": "EditorMaterialComponent", + "Id": 7827190074535394331, + "Controller": { + "Configuration": { + "materials": [ + { + "Key": { + "materialSlotStableId": 2418540911 + }, + "Value": { + "MaterialAsset": { + "assetId": { + "guid": "{79419183-FFCE-5A89-AA16-C2789D81AF75}" + }, + "assetHint": "materials/presets/pbr/metal_platinum_polished.azmaterial" + } + } + } + ] + } + } + }, + "Component_[8092226976542590265]": { + "$type": "EditorDisabledCompositionComponent", + "Id": 8092226976542590265 + } + } + }, + "Entity_[2240142239700]": { + "Id": "Entity_[2240142239700]", + "Name": "Entity1", + "Components": { + "Component_[11525365929370623807]": { + "$type": "EditorVisibilityComponent", + "Id": 11525365929370623807 + }, + "Component_[12334620273692642550]": { + "$type": "EditorLockComponent", + "Id": 12334620273692642550 + }, + "Component_[14389735759337977675]": { + "$type": "EditorPendingCompositionComponent", + "Id": 14389735759337977675 + }, + "Component_[16184381538555246534]": { + "$type": "AZ::Render::EditorMeshComponent", + "Id": 16184381538555246534, + "Controller": { + "Configuration": { + "ModelAsset": { + "assetId": { + "guid": "{E14975EF-E676-51A4-B826-3EF59CB645AA}", + "subId": 285127096 + }, + "assetHint": "testdata/objects/cube/cube.azmodel" + } + } + } + }, + "Component_[17962478023087084794]": { + "$type": "SelectionComponent", + "Id": 17962478023087084794 + }, + "Component_[18071675051915092508]": { + "$type": "EditorEntityIconComponent", + "Id": 18071675051915092508 + }, + "Component_[2115498007879087044]": { + "$type": "EditorInspectorComponent", + "Id": 2115498007879087044, + "ComponentOrderEntryArray": [ + { + "ComponentId": 399415038452606756 + }, + { + "ComponentId": 16184381538555246534, + "SortIndex": 1 + }, + { + "ComponentId": 7827190074535394331, + "SortIndex": 2 + } + ] + }, + "Component_[3518973002096080237]": { + "$type": "EditorOnlyEntityComponent", + "Id": 3518973002096080237 + }, + "Component_[399415038452606756]": { + "$type": "{27F1E1A1-8D9D-4C3B-BD3A-AFB9762449C0} TransformComponent", + "Id": 399415038452606756, + "Parent Entity": "ContainerEntity", + "Transform Data": { + "Translate": [ + -27.530563354492188, + -0.00018183141946792603, + 79.38228607177734 + ] + } + }, + "Component_[4564240319609068082]": { + "$type": "EditorEntitySortComponent", + "Id": 4564240319609068082 + }, + "Component_[7827190074535394331]": { + "$type": "EditorMaterialComponent", + "Id": 7827190074535394331, + "Controller": { + "Configuration": { + "materials": [ + { + "Key": { + "materialSlotStableId": 2418540911 + }, + "Value": { + "MaterialAsset": { + "assetId": { + "guid": "{2D054071-BEF7-53C0-A8C9-E4F026BD8364}" + }, + "assetHint": "materials/presets/pbr/metal_copper_matte.azmaterial" + } + } + } + ] + } + } + }, + "Component_[8092226976542590265]": { + "$type": "EditorDisabledCompositionComponent", + "Id": 8092226976542590265 + } + } + }, + "Entity_[2244437206996]": { + "Id": "Entity_[2244437206996]", + "Name": "Entity1", + "Components": { + "Component_[11525365929370623807]": { + "$type": "EditorVisibilityComponent", + "Id": 11525365929370623807 + }, + "Component_[12334620273692642550]": { + "$type": "EditorLockComponent", + "Id": 12334620273692642550 + }, + "Component_[14389735759337977675]": { + "$type": "EditorPendingCompositionComponent", + "Id": 14389735759337977675 + }, + "Component_[16184381538555246534]": { + "$type": "AZ::Render::EditorMeshComponent", + "Id": 16184381538555246534, + "Controller": { + "Configuration": { + "ModelAsset": { + "assetId": { + "guid": "{E14975EF-E676-51A4-B826-3EF59CB645AA}", + "subId": 285127096 + }, + "assetHint": "testdata/objects/cube/cube.azmodel" + } + } + } + }, + "Component_[17962478023087084794]": { + "$type": "SelectionComponent", + "Id": 17962478023087084794 + }, + "Component_[18071675051915092508]": { + "$type": "EditorEntityIconComponent", + "Id": 18071675051915092508 + }, + "Component_[2115498007879087044]": { + "$type": "EditorInspectorComponent", + "Id": 2115498007879087044, + "ComponentOrderEntryArray": [ + { + "ComponentId": 399415038452606756 + }, + { + "ComponentId": 16184381538555246534, + "SortIndex": 1 + }, + { + "ComponentId": 7827190074535394331, + "SortIndex": 2 + } + ] + }, + "Component_[3518973002096080237]": { + "$type": "EditorOnlyEntityComponent", + "Id": 3518973002096080237 + }, + "Component_[399415038452606756]": { + "$type": "{27F1E1A1-8D9D-4C3B-BD3A-AFB9762449C0} TransformComponent", + "Id": 399415038452606756, + "Parent Entity": "ContainerEntity", + "Transform Data": { + "Translate": [ + -7.5305633544921875, + -0.00018183141946792603, + 30.08451271057129 + ] + } + }, + "Component_[4564240319609068082]": { + "$type": "EditorEntitySortComponent", + "Id": 4564240319609068082 + }, + "Component_[7827190074535394331]": { + "$type": "EditorMaterialComponent", + "Id": 7827190074535394331, + "Controller": { + "Configuration": { + "materials": [ + { + "Key": { + "materialSlotStableId": 2418540911 + }, + "Value": { + "MaterialAsset": { + "assetId": { + "guid": "{E66E4343-F45A-536D-AAE1-C4D096420640}" + }, + "assetHint": "materials/presets/pbr/metal_nickel_polished.azmaterial" + } + } + } + ] + } + } + }, + "Component_[8092226976542590265]": { + "$type": "EditorDisabledCompositionComponent", + "Id": 8092226976542590265 + } + } + }, + "Entity_[2248732174292]": { + "Id": "Entity_[2248732174292]", + "Name": "Entity1", + "Components": { + "Component_[11525365929370623807]": { + "$type": "EditorVisibilityComponent", + "Id": 11525365929370623807 + }, + "Component_[12334620273692642550]": { + "$type": "EditorLockComponent", + "Id": 12334620273692642550 + }, + "Component_[14389735759337977675]": { + "$type": "EditorPendingCompositionComponent", + "Id": 14389735759337977675 + }, + "Component_[16184381538555246534]": { + "$type": "AZ::Render::EditorMeshComponent", + "Id": 16184381538555246534, + "Controller": { + "Configuration": { + "ModelAsset": { + "assetId": { + "guid": "{E14975EF-E676-51A4-B826-3EF59CB645AA}", + "subId": 285127096 + }, + "assetHint": "testdata/objects/cube/cube.azmodel" + } + } + } + }, + "Component_[17962478023087084794]": { + "$type": "SelectionComponent", + "Id": 17962478023087084794 + }, + "Component_[18071675051915092508]": { + "$type": "EditorEntityIconComponent", + "Id": 18071675051915092508 + }, + "Component_[2115498007879087044]": { + "$type": "EditorInspectorComponent", + "Id": 2115498007879087044, + "ComponentOrderEntryArray": [ + { + "ComponentId": 399415038452606756 + }, + { + "ComponentId": 16184381538555246534, + "SortIndex": 1 + }, + { + "ComponentId": 7827190074535394331, + "SortIndex": 2 + } + ] + }, + "Component_[3518973002096080237]": { + "$type": "EditorOnlyEntityComponent", + "Id": 3518973002096080237 + }, + "Component_[399415038452606756]": { + "$type": "{27F1E1A1-8D9D-4C3B-BD3A-AFB9762449C0} TransformComponent", + "Id": 399415038452606756, + "Parent Entity": "ContainerEntity", + "Transform Data": { + "Translate": [ + -7.5305633544921875, + -0.00018183141946792603, + 45.14218521118164 + ] + } + }, + "Component_[4564240319609068082]": { + "$type": "EditorEntitySortComponent", + "Id": 4564240319609068082 + }, + "Component_[7827190074535394331]": { + "$type": "EditorMaterialComponent", + "Id": 7827190074535394331, + "Controller": { + "Configuration": { + "materials": [ + { + "Key": { + "materialSlotStableId": 2418540911 + }, + "Value": { + "MaterialAsset": { + "assetId": { + "guid": "{E66E4343-F45A-536D-AAE1-C4D096420640}" + }, + "assetHint": "materials/presets/pbr/metal_nickel_polished.azmaterial" + } + } + } + ] + } + } + }, + "Component_[8092226976542590265]": { + "$type": "EditorDisabledCompositionComponent", + "Id": 8092226976542590265 + } + } + }, + "Entity_[2253027141588]": { + "Id": "Entity_[2253027141588]", + "Name": "Entity1", + "Components": { + "Component_[11525365929370623807]": { + "$type": "EditorVisibilityComponent", + "Id": 11525365929370623807 + }, + "Component_[12334620273692642550]": { + "$type": "EditorLockComponent", + "Id": 12334620273692642550 + }, + "Component_[14389735759337977675]": { + "$type": "EditorPendingCompositionComponent", + "Id": 14389735759337977675 + }, + "Component_[16184381538555246534]": { + "$type": "AZ::Render::EditorMeshComponent", + "Id": 16184381538555246534, + "Controller": { + "Configuration": { + "ModelAsset": { + "assetId": { + "guid": "{E14975EF-E676-51A4-B826-3EF59CB645AA}", + "subId": 285127096 + }, + "assetHint": "testdata/objects/cube/cube.azmodel" + } + } + } + }, + "Component_[17962478023087084794]": { + "$type": "SelectionComponent", + "Id": 17962478023087084794 + }, + "Component_[18071675051915092508]": { + "$type": "EditorEntityIconComponent", + "Id": 18071675051915092508 + }, + "Component_[2115498007879087044]": { + "$type": "EditorInspectorComponent", + "Id": 2115498007879087044, + "ComponentOrderEntryArray": [ + { + "ComponentId": 399415038452606756 + }, + { + "ComponentId": 16184381538555246534, + "SortIndex": 1 + }, + { + "ComponentId": 7827190074535394331, + "SortIndex": 2 + } + ] + }, + "Component_[3518973002096080237]": { + "$type": "EditorOnlyEntityComponent", + "Id": 3518973002096080237 + }, + "Component_[399415038452606756]": { + "$type": "{27F1E1A1-8D9D-4C3B-BD3A-AFB9762449C0} TransformComponent", + "Id": 399415038452606756, + "Parent Entity": "ContainerEntity", + "Transform Data": { + "Translate": [ + -2.5305633544921875, + -0.00018183141946792603, + 109.46680450439453 + ] + } + }, + "Component_[4564240319609068082]": { + "$type": "EditorEntitySortComponent", + "Id": 4564240319609068082 + }, + "Component_[7827190074535394331]": { + "$type": "EditorMaterialComponent", + "Id": 7827190074535394331, + "Controller": { + "Configuration": { + "materials": [ + { + "Key": { + "materialSlotStableId": 2418540911 + }, + "Value": { + "MaterialAsset": { + "assetId": { + "guid": "{9187B84B-425F-5D11-B4D7-35BBDB0959D1}" + }, + "assetHint": "materials/presets/pbr/metal_palladium_matte.azmaterial" + } + } + } + ] + } + } + }, + "Component_[8092226976542590265]": { + "$type": "EditorDisabledCompositionComponent", + "Id": 8092226976542590265 + } + } + }, + "Entity_[2257322108884]": { + "Id": "Entity_[2257322108884]", + "Name": "Entity1", + "Components": { + "Component_[11525365929370623807]": { + "$type": "EditorVisibilityComponent", + "Id": 11525365929370623807 + }, + "Component_[12334620273692642550]": { + "$type": "EditorLockComponent", + "Id": 12334620273692642550 + }, + "Component_[14389735759337977675]": { + "$type": "EditorPendingCompositionComponent", + "Id": 14389735759337977675 + }, + "Component_[16184381538555246534]": { + "$type": "AZ::Render::EditorMeshComponent", + "Id": 16184381538555246534, + "Controller": { + "Configuration": { + "ModelAsset": { + "assetId": { + "guid": "{E14975EF-E676-51A4-B826-3EF59CB645AA}", + "subId": 285127096 + }, + "assetHint": "testdata/objects/cube/cube.azmodel" + } + } + } + }, + "Component_[17962478023087084794]": { + "$type": "SelectionComponent", + "Id": 17962478023087084794 + }, + "Component_[18071675051915092508]": { + "$type": "EditorEntityIconComponent", + "Id": 18071675051915092508 + }, + "Component_[2115498007879087044]": { + "$type": "EditorInspectorComponent", + "Id": 2115498007879087044, + "ComponentOrderEntryArray": [ + { + "ComponentId": 399415038452606756 + }, + { + "ComponentId": 16184381538555246534, + "SortIndex": 1 + }, + { + "ComponentId": 7827190074535394331, + "SortIndex": 2 + } + ] + }, + "Component_[3518973002096080237]": { + "$type": "EditorOnlyEntityComponent", + "Id": 3518973002096080237 + }, + "Component_[399415038452606756]": { + "$type": "{27F1E1A1-8D9D-4C3B-BD3A-AFB9762449C0} TransformComponent", + "Id": 399415038452606756, + "Parent Entity": "ContainerEntity", + "Transform Data": { + "Translate": [ + -37.53056335449219, + -0.00018183141946792603, + 49.593753814697266 + ] + } + }, + "Component_[4564240319609068082]": { + "$type": "EditorEntitySortComponent", + "Id": 4564240319609068082 + }, + "Component_[7827190074535394331]": { + "$type": "EditorMaterialComponent", + "Id": 7827190074535394331, + "Controller": { + "Configuration": { + "materials": [ + { + "Key": { + "materialSlotStableId": 2418540911 + }, + "Value": { + "MaterialAsset": { + "assetId": { + "guid": "{A78EA2FC-688B-5E3A-A7F6-DB413D11D4CF}" + }, + "assetHint": "materials/presets/pbr/metal_chrome_matte.azmaterial" + } + } + } + ] + } + } + }, + "Component_[8092226976542590265]": { + "$type": "EditorDisabledCompositionComponent", + "Id": 8092226976542590265 + } + } + }, + "Entity_[2261617076180]": { + "Id": "Entity_[2261617076180]", + "Name": "Entity1", + "Components": { + "Component_[11525365929370623807]": { + "$type": "EditorVisibilityComponent", + "Id": 11525365929370623807 + }, + "Component_[12334620273692642550]": { + "$type": "EditorLockComponent", + "Id": 12334620273692642550 + }, + "Component_[14389735759337977675]": { + "$type": "EditorPendingCompositionComponent", + "Id": 14389735759337977675 + }, + "Component_[16184381538555246534]": { + "$type": "AZ::Render::EditorMeshComponent", + "Id": 16184381538555246534, + "Controller": { + "Configuration": { + "ModelAsset": { + "assetId": { + "guid": "{E14975EF-E676-51A4-B826-3EF59CB645AA}", + "subId": 285127096 + }, + "assetHint": "testdata/objects/cube/cube.azmodel" + } + } + } + }, + "Component_[17962478023087084794]": { + "$type": "SelectionComponent", + "Id": 17962478023087084794 + }, + "Component_[18071675051915092508]": { + "$type": "EditorEntityIconComponent", + "Id": 18071675051915092508 + }, + "Component_[2115498007879087044]": { + "$type": "EditorInspectorComponent", + "Id": 2115498007879087044, + "ComponentOrderEntryArray": [ + { + "ComponentId": 399415038452606756 + }, + { + "ComponentId": 16184381538555246534, + "SortIndex": 1 + }, + { + "ComponentId": 7827190074535394331, + "SortIndex": 2 + } + ] + }, + "Component_[3518973002096080237]": { + "$type": "EditorOnlyEntityComponent", + "Id": 3518973002096080237 + }, + "Component_[399415038452606756]": { + "$type": "{27F1E1A1-8D9D-4C3B-BD3A-AFB9762449C0} TransformComponent", + "Id": 399415038452606756, + "Parent Entity": "ContainerEntity", + "Transform Data": { + "Translate": [ + 22.53014373779297, + -0.00018183141946792603, + 69.34888458251953 + ] + } + }, + "Component_[4564240319609068082]": { + "$type": "EditorEntitySortComponent", + "Id": 4564240319609068082 + }, + "Component_[7827190074535394331]": { + "$type": "EditorMaterialComponent", + "Id": 7827190074535394331, + "Controller": { + "Configuration": { + "materials": [ + { + "Key": { + "materialSlotStableId": 2418540911 + }, + "Value": { + "MaterialAsset": { + "assetId": { + "guid": "{80E0F2A7-1EE4-597F-80EF-985C65BCE2EB}" + }, + "assetHint": "materials/presets/pbr/metal_brass.azmaterial" + } + } + } + ] + } + } + }, + "Component_[8092226976542590265]": { + "$type": "EditorDisabledCompositionComponent", + "Id": 8092226976542590265 + } + } + }, + "Entity_[2265912043476]": { + "Id": "Entity_[2265912043476]", + "Name": "Entity1", + "Components": { + "Component_[11525365929370623807]": { + "$type": "EditorVisibilityComponent", + "Id": 11525365929370623807 + }, + "Component_[12334620273692642550]": { + "$type": "EditorLockComponent", + "Id": 12334620273692642550 + }, + "Component_[14389735759337977675]": { + "$type": "EditorPendingCompositionComponent", + "Id": 14389735759337977675 + }, + "Component_[16184381538555246534]": { + "$type": "AZ::Render::EditorMeshComponent", + "Id": 16184381538555246534, + "Controller": { + "Configuration": { + "ModelAsset": { + "assetId": { + "guid": "{E14975EF-E676-51A4-B826-3EF59CB645AA}", + "subId": 285127096 + }, + "assetHint": "testdata/objects/cube/cube.azmodel" + } + } + } + }, + "Component_[17962478023087084794]": { + "$type": "SelectionComponent", + "Id": 17962478023087084794 + }, + "Component_[18071675051915092508]": { + "$type": "EditorEntityIconComponent", + "Id": 18071675051915092508 + }, + "Component_[2115498007879087044]": { + "$type": "EditorInspectorComponent", + "Id": 2115498007879087044, + "ComponentOrderEntryArray": [ + { + "ComponentId": 399415038452606756 + }, + { + "ComponentId": 16184381538555246534, + "SortIndex": 1 + }, + { + "ComponentId": 7827190074535394331, + "SortIndex": 2 + } + ] + }, + "Component_[3518973002096080237]": { + "$type": "EditorOnlyEntityComponent", + "Id": 3518973002096080237 + }, + "Component_[399415038452606756]": { + "$type": "{27F1E1A1-8D9D-4C3B-BD3A-AFB9762449C0} TransformComponent", + "Id": 399415038452606756, + "Parent Entity": "ContainerEntity", + "Transform Data": { + "Translate": [ + -32.53056335449219, + -0.00018183141946792603, + 84.40655517578125 + ] + } + }, + "Component_[4564240319609068082]": { + "$type": "EditorEntitySortComponent", + "Id": 4564240319609068082 + }, + "Component_[7827190074535394331]": { + "$type": "EditorMaterialComponent", + "Id": 7827190074535394331, + "Controller": { + "Configuration": { + "materials": [ + { + "Key": { + "materialSlotStableId": 2418540911 + }, + "Value": { + "MaterialAsset": { + "assetId": { + "guid": "{99976D73-6248-5D66-AD15-E8F52B0AFE36}" + }, + "assetHint": "materials/presets/pbr/metal_cobalt.azmaterial" + } + } + } + ] + } + } + }, + "Component_[8092226976542590265]": { + "$type": "EditorDisabledCompositionComponent", + "Id": 8092226976542590265 + } + } + }, + "Entity_[2270207010772]": { + "Id": "Entity_[2270207010772]", + "Name": "Entity1", + "Components": { + "Component_[11525365929370623807]": { + "$type": "EditorVisibilityComponent", + "Id": 11525365929370623807 + }, + "Component_[12334620273692642550]": { + "$type": "EditorLockComponent", + "Id": 12334620273692642550 + }, + "Component_[14389735759337977675]": { + "$type": "EditorPendingCompositionComponent", + "Id": 14389735759337977675 + }, + "Component_[16184381538555246534]": { + "$type": "AZ::Render::EditorMeshComponent", + "Id": 16184381538555246534, + "Controller": { + "Configuration": { + "ModelAsset": { + "assetId": { + "guid": "{E14975EF-E676-51A4-B826-3EF59CB645AA}", + "subId": 285127096 + }, + "assetHint": "testdata/objects/cube/cube.azmodel" + } + } + } + }, + "Component_[17962478023087084794]": { + "$type": "SelectionComponent", + "Id": 17962478023087084794 + }, + "Component_[18071675051915092508]": { + "$type": "EditorEntityIconComponent", + "Id": 18071675051915092508 + }, + "Component_[2115498007879087044]": { + "$type": "EditorInspectorComponent", + "Id": 2115498007879087044, + "ComponentOrderEntryArray": [ + { + "ComponentId": 399415038452606756 + }, + { + "ComponentId": 16184381538555246534, + "SortIndex": 1 + }, + { + "ComponentId": 7827190074535394331, + "SortIndex": 2 + } + ] + }, + "Component_[3518973002096080237]": { + "$type": "EditorOnlyEntityComponent", + "Id": 3518973002096080237 + }, + "Component_[399415038452606756]": { + "$type": "{27F1E1A1-8D9D-4C3B-BD3A-AFB9762449C0} TransformComponent", + "Id": 399415038452606756, + "Parent Entity": "ContainerEntity", + "Transform Data": { + "Translate": [ + 47.53014373779297, + -0.00018183141946792603, + 34.53608703613281 + ] + } + }, + "Component_[4564240319609068082]": { + "$type": "EditorEntitySortComponent", + "Id": 4564240319609068082 + }, + "Component_[7827190074535394331]": { + "$type": "EditorMaterialComponent", + "Id": 7827190074535394331, + "Controller": { + "Configuration": { + "materials": [ + { + "Key": { + "materialSlotStableId": 2418540911 + }, + "Value": { + "MaterialAsset": { + "assetId": { + "guid": "{970148AC-7258-5EC8-9CE7-F4EF93164D93}" + }, + "assetHint": "materials/presets/pbr/metal_iron_matte.azmaterial" + } + } + } + ] + } + } + }, + "Component_[8092226976542590265]": { + "$type": "EditorDisabledCompositionComponent", + "Id": 8092226976542590265 + } + } + }, + "Entity_[2274501978068]": { + "Id": "Entity_[2274501978068]", + "Name": "Entity1", + "Components": { + "Component_[11525365929370623807]": { + "$type": "EditorVisibilityComponent", + "Id": 11525365929370623807 + }, + "Component_[12334620273692642550]": { + "$type": "EditorLockComponent", + "Id": 12334620273692642550 + }, + "Component_[14389735759337977675]": { + "$type": "EditorPendingCompositionComponent", + "Id": 14389735759337977675 + }, + "Component_[16184381538555246534]": { + "$type": "AZ::Render::EditorMeshComponent", + "Id": 16184381538555246534, + "Controller": { + "Configuration": { + "ModelAsset": { + "assetId": { + "guid": "{E14975EF-E676-51A4-B826-3EF59CB645AA}", + "subId": 285127096 + }, + "assetHint": "testdata/objects/cube/cube.azmodel" + } + } + } + }, + "Component_[17962478023087084794]": { + "$type": "SelectionComponent", + "Id": 17962478023087084794 + }, + "Component_[18071675051915092508]": { + "$type": "EditorEntityIconComponent", + "Id": 18071675051915092508 + }, + "Component_[2115498007879087044]": { + "$type": "EditorInspectorComponent", + "Id": 2115498007879087044, + "ComponentOrderEntryArray": [ + { + "ComponentId": 399415038452606756 + }, + { + "ComponentId": 16184381538555246534, + "SortIndex": 1 + }, + { + "ComponentId": 7827190074535394331, + "SortIndex": 2 + } + ] + }, + "Component_[3518973002096080237]": { + "$type": "EditorOnlyEntityComponent", + "Id": 3518973002096080237 + }, + "Component_[399415038452606756]": { + "$type": "{27F1E1A1-8D9D-4C3B-BD3A-AFB9762449C0} TransformComponent", + "Id": 399415038452606756, + "Parent Entity": "ContainerEntity", + "Transform Data": { + "Translate": [ + -37.53056335449219, + -0.00018183141946792603, + 54.618019104003906 + ] + } + }, + "Component_[4564240319609068082]": { + "$type": "EditorEntitySortComponent", + "Id": 4564240319609068082 + }, + "Component_[7827190074535394331]": { + "$type": "EditorMaterialComponent", + "Id": 7827190074535394331, + "Controller": { + "Configuration": { + "materials": [ + { + "Key": { + "materialSlotStableId": 2418540911 + }, + "Value": { + "MaterialAsset": { + "assetId": { + "guid": "{B7C712DC-4839-58BB-B522-A4F120084CF5}" + }, + "assetHint": "materials/presets/pbr/metal_chrome.azmaterial" + } + } + } + ] + } + } + }, + "Component_[8092226976542590265]": { + "$type": "EditorDisabledCompositionComponent", + "Id": 8092226976542590265 + } + } + }, + "Entity_[2278796945364]": { + "Id": "Entity_[2278796945364]", + "Name": "Entity1", + "Components": { + "Component_[11525365929370623807]": { + "$type": "EditorVisibilityComponent", + "Id": 11525365929370623807 + }, + "Component_[12334620273692642550]": { + "$type": "EditorLockComponent", + "Id": 12334620273692642550 + }, + "Component_[14389735759337977675]": { + "$type": "EditorPendingCompositionComponent", + "Id": 14389735759337977675 + }, + "Component_[16184381538555246534]": { + "$type": "AZ::Render::EditorMeshComponent", + "Id": 16184381538555246534, + "Controller": { + "Configuration": { + "ModelAsset": { + "assetId": { + "guid": "{E14975EF-E676-51A4-B826-3EF59CB645AA}", + "subId": 285127096 + }, + "assetHint": "testdata/objects/cube/cube.azmodel" + } + } + } + }, + "Component_[17962478023087084794]": { + "$type": "SelectionComponent", + "Id": 17962478023087084794 + }, + "Component_[18071675051915092508]": { + "$type": "EditorEntityIconComponent", + "Id": 18071675051915092508 + }, + "Component_[2115498007879087044]": { + "$type": "EditorInspectorComponent", + "Id": 2115498007879087044, + "ComponentOrderEntryArray": [ + { + "ComponentId": 399415038452606756 + }, + { + "ComponentId": 16184381538555246534, + "SortIndex": 1 + }, + { + "ComponentId": 7827190074535394331, + "SortIndex": 2 + } + ] + }, + "Component_[3518973002096080237]": { + "$type": "EditorOnlyEntityComponent", + "Id": 3518973002096080237 + }, + "Component_[399415038452606756]": { + "$type": "{27F1E1A1-8D9D-4C3B-BD3A-AFB9762449C0} TransformComponent", + "Id": 399415038452606756, + "Parent Entity": "ContainerEntity", + "Transform Data": { + "Translate": [ + -7.5305633544921875, + -0.00018183141946792603, + 34.53608703613281 + ] + } + }, + "Component_[4564240319609068082]": { + "$type": "EditorEntitySortComponent", + "Id": 4564240319609068082 + }, + "Component_[7827190074535394331]": { + "$type": "EditorMaterialComponent", + "Id": 7827190074535394331, + "Controller": { + "Configuration": { + "materials": [ + { + "Key": { + "materialSlotStableId": 2418540911 + }, + "Value": { + "MaterialAsset": { + "assetId": { + "guid": "{E56377B1-6310-5311-A494-135BE50B74F0}" + }, + "assetHint": "materials/presets/pbr/metal_nickel_matte.azmaterial" + } + } + } + ] + } + } + }, + "Component_[8092226976542590265]": { + "$type": "EditorDisabledCompositionComponent", + "Id": 8092226976542590265 + } + } + }, + "Entity_[2283091912660]": { + "Id": "Entity_[2283091912660]", + "Name": "Entity1", + "Components": { + "Component_[11525365929370623807]": { + "$type": "EditorVisibilityComponent", + "Id": 11525365929370623807 + }, + "Component_[12334620273692642550]": { + "$type": "EditorLockComponent", + "Id": 12334620273692642550 + }, + "Component_[14389735759337977675]": { + "$type": "EditorPendingCompositionComponent", + "Id": 14389735759337977675 + }, + "Component_[16184381538555246534]": { + "$type": "AZ::Render::EditorMeshComponent", + "Id": 16184381538555246534, + "Controller": { + "Configuration": { + "ModelAsset": { + "assetId": { + "guid": "{E14975EF-E676-51A4-B826-3EF59CB645AA}", + "subId": 285127096 + }, + "assetHint": "testdata/objects/cube/cube.azmodel" + } + } + } + }, + "Component_[17962478023087084794]": { + "$type": "SelectionComponent", + "Id": 17962478023087084794 + }, + "Component_[18071675051915092508]": { + "$type": "EditorEntityIconComponent", + "Id": 18071675051915092508 + }, + "Component_[2115498007879087044]": { + "$type": "EditorInspectorComponent", + "Id": 2115498007879087044, + "ComponentOrderEntryArray": [ + { + "ComponentId": 399415038452606756 + }, + { + "ComponentId": 16184381538555246534, + "SortIndex": 1 + }, + { + "ComponentId": 7827190074535394331, + "SortIndex": 2 + } + ] + }, + "Component_[3518973002096080237]": { + "$type": "EditorOnlyEntityComponent", + "Id": 3518973002096080237 + }, + "Component_[399415038452606756]": { + "$type": "{27F1E1A1-8D9D-4C3B-BD3A-AFB9762449C0} TransformComponent", + "Id": 399415038452606756, + "Parent Entity": "ContainerEntity", + "Transform Data": { + "Translate": [ + 17.53014373779297, + -0.00018183141946792603, + 19.50924301147461 + ] + } + }, + "Component_[4564240319609068082]": { + "$type": "EditorEntitySortComponent", + "Id": 4564240319609068082 + }, + "Component_[7827190074535394331]": { + "$type": "EditorMaterialComponent", + "Id": 7827190074535394331, + "Controller": { + "Configuration": { + "materials": [ + { + "Key": {}, + "Value": { + "MaterialAsset": { + "assetId": { + "guid": "{721188E0-B7CC-5D06-8D5D-39AF8ABF2EF9}" + }, + "assetHint": "materials/presets/pbr/metal_titanium.azmaterial" + } + } + }, + { + "Key": { + "materialSlotStableId": 2418540911 + }, + "Value": { + "MaterialAsset": { + "assetId": { + "guid": "{549D26B8-881D-569F-AF05-961F36A43F4F}" + }, + "assetHint": "materials/presets/pbr/metal_aluminum_matte.azmaterial" + } + } + } + ] + } + } + }, + "Component_[8092226976542590265]": { + "$type": "EditorDisabledCompositionComponent", + "Id": 8092226976542590265 + } + } + }, + "Entity_[2287386879956]": { + "Id": "Entity_[2287386879956]", + "Name": "Entity1", + "Components": { + "Component_[11525365929370623807]": { + "$type": "EditorVisibilityComponent", + "Id": 11525365929370623807 + }, + "Component_[12334620273692642550]": { + "$type": "EditorLockComponent", + "Id": 12334620273692642550 + }, + "Component_[14389735759337977675]": { + "$type": "EditorPendingCompositionComponent", + "Id": 14389735759337977675 + }, + "Component_[16184381538555246534]": { + "$type": "AZ::Render::EditorMeshComponent", + "Id": 16184381538555246534, + "Controller": { + "Configuration": { + "ModelAsset": { + "assetId": { + "guid": "{E14975EF-E676-51A4-B826-3EF59CB645AA}", + "subId": 285127096 + }, + "assetHint": "testdata/objects/cube/cube.azmodel" + } + } + } + }, + "Component_[17962478023087084794]": { + "$type": "SelectionComponent", + "Id": 17962478023087084794 + }, + "Component_[18071675051915092508]": { + "$type": "EditorEntityIconComponent", + "Id": 18071675051915092508 + }, + "Component_[2115498007879087044]": { + "$type": "EditorInspectorComponent", + "Id": 2115498007879087044, + "ComponentOrderEntryArray": [ + { + "ComponentId": 399415038452606756 + }, + { + "ComponentId": 16184381538555246534, + "SortIndex": 1 + }, + { + "ComponentId": 7827190074535394331, + "SortIndex": 2 + } + ] + }, + "Component_[3518973002096080237]": { + "$type": "EditorOnlyEntityComponent", + "Id": 3518973002096080237 + }, + "Component_[399415038452606756]": { + "$type": "{27F1E1A1-8D9D-4C3B-BD3A-AFB9762449C0} TransformComponent", + "Id": 399415038452606756, + "Parent Entity": "ContainerEntity", + "Transform Data": { + "Translate": [ + 27.53014373779297, + -0.00018183141946792603, + 24.533506393432617 + ] + } + }, + "Component_[4564240319609068082]": { + "$type": "EditorEntitySortComponent", + "Id": 4564240319609068082 + }, + "Component_[7827190074535394331]": { + "$type": "EditorMaterialComponent", + "Id": 7827190074535394331, + "Controller": { + "Configuration": { + "materials": [ + { + "Key": { + "materialSlotStableId": 2418540911 + }, + "Value": { + "MaterialAsset": { + "assetId": { + "guid": "{B7C712DC-4839-58BB-B522-A4F120084CF5}" + }, + "assetHint": "materials/presets/pbr/metal_chrome.azmaterial" + } + } + } + ] + } + } + }, + "Component_[8092226976542590265]": { + "$type": "EditorDisabledCompositionComponent", + "Id": 8092226976542590265 + } + } + }, + "Entity_[2291681847252]": { + "Id": "Entity_[2291681847252]", + "Name": "Entity1", + "Components": { + "Component_[11525365929370623807]": { + "$type": "EditorVisibilityComponent", + "Id": 11525365929370623807 + }, + "Component_[12334620273692642550]": { + "$type": "EditorLockComponent", + "Id": 12334620273692642550 + }, + "Component_[14389735759337977675]": { + "$type": "EditorPendingCompositionComponent", + "Id": 14389735759337977675 + }, + "Component_[16184381538555246534]": { + "$type": "AZ::Render::EditorMeshComponent", + "Id": 16184381538555246534, + "Controller": { + "Configuration": { + "ModelAsset": { + "assetId": { + "guid": "{E14975EF-E676-51A4-B826-3EF59CB645AA}", + "subId": 285127096 + }, + "assetHint": "testdata/objects/cube/cube.azmodel" + } + } + } + }, + "Component_[17962478023087084794]": { + "$type": "SelectionComponent", + "Id": 17962478023087084794 + }, + "Component_[18071675051915092508]": { + "$type": "EditorEntityIconComponent", + "Id": 18071675051915092508 + }, + "Component_[2115498007879087044]": { + "$type": "EditorInspectorComponent", + "Id": 2115498007879087044, + "ComponentOrderEntryArray": [ + { + "ComponentId": 399415038452606756 + }, + { + "ComponentId": 16184381538555246534, + "SortIndex": 1 + }, + { + "ComponentId": 7827190074535394331, + "SortIndex": 2 + } + ] + }, + "Component_[3518973002096080237]": { + "$type": "EditorOnlyEntityComponent", + "Id": 3518973002096080237 + }, + "Component_[399415038452606756]": { + "$type": "{27F1E1A1-8D9D-4C3B-BD3A-AFB9762449C0} TransformComponent", + "Id": 399415038452606756, + "Parent Entity": "ContainerEntity", + "Transform Data": { + "Translate": [ + -47.53056335449219, + -0.00018183141946792603, + 64.32462310791016 + ] + } + }, + "Component_[4564240319609068082]": { + "$type": "EditorEntitySortComponent", + "Id": 4564240319609068082 + }, + "Component_[7827190074535394331]": { + "$type": "EditorMaterialComponent", + "Id": 7827190074535394331, + "Controller": { + "Configuration": { + "materials": [ + { + "Key": { + "materialSlotStableId": 2418540911 + }, + "Value": { + "MaterialAsset": { + "assetId": { + "guid": "{549D26B8-881D-569F-AF05-961F36A43F4F}" + }, + "assetHint": "materials/presets/pbr/metal_aluminum_matte.azmaterial" + } + } + } + ] + } + } + }, + "Component_[8092226976542590265]": { + "$type": "EditorDisabledCompositionComponent", + "Id": 8092226976542590265 + } + } + }, + "Entity_[2295976814548]": { + "Id": "Entity_[2295976814548]", + "Name": "Entity1", + "Components": { + "Component_[11525365929370623807]": { + "$type": "EditorVisibilityComponent", + "Id": 11525365929370623807 + }, + "Component_[12334620273692642550]": { + "$type": "EditorLockComponent", + "Id": 12334620273692642550 + }, + "Component_[14389735759337977675]": { + "$type": "EditorPendingCompositionComponent", + "Id": 14389735759337977675 + }, + "Component_[16184381538555246534]": { + "$type": "AZ::Render::EditorMeshComponent", + "Id": 16184381538555246534, + "Controller": { + "Configuration": { + "ModelAsset": { + "assetId": { + "guid": "{E14975EF-E676-51A4-B826-3EF59CB645AA}", + "subId": 285127096 + }, + "assetHint": "testdata/objects/cube/cube.azmodel" + } + } + } + }, + "Component_[17962478023087084794]": { + "$type": "SelectionComponent", + "Id": 17962478023087084794 + }, + "Component_[18071675051915092508]": { + "$type": "EditorEntityIconComponent", + "Id": 18071675051915092508 + }, + "Component_[2115498007879087044]": { + "$type": "EditorInspectorComponent", + "Id": 2115498007879087044, + "ComponentOrderEntryArray": [ + { + "ComponentId": 399415038452606756 + }, + { + "ComponentId": 16184381538555246534, + "SortIndex": 1 + }, + { + "ComponentId": 7827190074535394331, + "SortIndex": 2 + } + ] + }, + "Component_[3518973002096080237]": { + "$type": "EditorOnlyEntityComponent", + "Id": 3518973002096080237 + }, + "Component_[399415038452606756]": { + "$type": "{27F1E1A1-8D9D-4C3B-BD3A-AFB9762449C0} TransformComponent", + "Id": 399415038452606756, + "Parent Entity": "ContainerEntity", + "Transform Data": { + "Translate": [ + 47.53014373779297, + -0.00018183141946792603, + 99.43339538574219 + ] + } + }, + "Component_[4564240319609068082]": { + "$type": "EditorEntitySortComponent", + "Id": 4564240319609068082 + }, + "Component_[7827190074535394331]": { + "$type": "EditorMaterialComponent", + "Id": 7827190074535394331, + "Controller": { + "Configuration": { + "materials": [ + { + "Key": { + "materialSlotStableId": 2418540911 + }, + "Value": { + "MaterialAsset": { + "assetId": { + "guid": "{892EA944-0325-5FA6-94D7-4AB4FC02A0F5}" + }, + "assetHint": "materials/presets/pbr/metal_iron.azmaterial" + } + } + } + ] + } + } + }, + "Component_[8092226976542590265]": { + "$type": "EditorDisabledCompositionComponent", + "Id": 8092226976542590265 + } + } + }, + "Entity_[2300271781844]": { + "Id": "Entity_[2300271781844]", + "Name": "Entity1", + "Components": { + "Component_[11525365929370623807]": { + "$type": "EditorVisibilityComponent", + "Id": 11525365929370623807 + }, + "Component_[12334620273692642550]": { + "$type": "EditorLockComponent", + "Id": 12334620273692642550 + }, + "Component_[14389735759337977675]": { + "$type": "EditorPendingCompositionComponent", + "Id": 14389735759337977675 + }, + "Component_[16184381538555246534]": { + "$type": "AZ::Render::EditorMeshComponent", + "Id": 16184381538555246534, + "Controller": { + "Configuration": { + "ModelAsset": { + "assetId": { + "guid": "{E14975EF-E676-51A4-B826-3EF59CB645AA}", + "subId": 285127096 + }, + "assetHint": "testdata/objects/cube/cube.azmodel" + } + } + } + }, + "Component_[17962478023087084794]": { + "$type": "SelectionComponent", + "Id": 17962478023087084794 + }, + "Component_[18071675051915092508]": { + "$type": "EditorEntityIconComponent", + "Id": 18071675051915092508 + }, + "Component_[2115498007879087044]": { + "$type": "EditorInspectorComponent", + "Id": 2115498007879087044, + "ComponentOrderEntryArray": [ + { + "ComponentId": 399415038452606756 + }, + { + "ComponentId": 16184381538555246534, + "SortIndex": 1 + }, + { + "ComponentId": 7827190074535394331, + "SortIndex": 2 + } + ] + }, + "Component_[3518973002096080237]": { + "$type": "EditorOnlyEntityComponent", + "Id": 3518973002096080237 + }, + "Component_[399415038452606756]": { + "$type": "{27F1E1A1-8D9D-4C3B-BD3A-AFB9762449C0} TransformComponent", + "Id": 399415038452606756, + "Parent Entity": "ContainerEntity", + "Transform Data": { + "Translate": [ + 7.530143737792969, + -0.00018183141946792603, + 49.593753814697266 + ] + } + }, + "Component_[4564240319609068082]": { + "$type": "EditorEntitySortComponent", + "Id": 4564240319609068082 + }, + "Component_[7827190074535394331]": { + "$type": "EditorMaterialComponent", + "Id": 7827190074535394331, + "Controller": { + "Configuration": { + "materials": [ + { + "Key": { + "materialSlotStableId": 2418540911 + }, + "Value": { + "MaterialAsset": { + "assetId": { + "guid": "{E54E46E7-9FA3-54D7-B5F8-8DCCDF17BC24}" + }, + "assetHint": "materials/presets/pbr/metal_silver_matte.azmaterial" + } + } + } + ] + } + } + }, + "Component_[8092226976542590265]": { + "$type": "EditorDisabledCompositionComponent", + "Id": 8092226976542590265 + } + } + }, + "Entity_[2304566749140]": { + "Id": "Entity_[2304566749140]", + "Name": "Entity1", + "Components": { + "Component_[11525365929370623807]": { + "$type": "EditorVisibilityComponent", + "Id": 11525365929370623807 + }, + "Component_[12334620273692642550]": { + "$type": "EditorLockComponent", + "Id": 12334620273692642550 + }, + "Component_[14389735759337977675]": { + "$type": "EditorPendingCompositionComponent", + "Id": 14389735759337977675 + }, + "Component_[16184381538555246534]": { + "$type": "AZ::Render::EditorMeshComponent", + "Id": 16184381538555246534, + "Controller": { + "Configuration": { + "ModelAsset": { + "assetId": { + "guid": "{E14975EF-E676-51A4-B826-3EF59CB645AA}", + "subId": 285127096 + }, + "assetHint": "testdata/objects/cube/cube.azmodel" + } + } + } + }, + "Component_[17962478023087084794]": { + "$type": "SelectionComponent", + "Id": 17962478023087084794 + }, + "Component_[18071675051915092508]": { + "$type": "EditorEntityIconComponent", + "Id": 18071675051915092508 + }, + "Component_[2115498007879087044]": { + "$type": "EditorInspectorComponent", + "Id": 2115498007879087044, + "ComponentOrderEntryArray": [ + { + "ComponentId": 399415038452606756 + }, + { + "ComponentId": 16184381538555246534, + "SortIndex": 1 + }, + { + "ComponentId": 7827190074535394331, + "SortIndex": 2 + } + ] + }, + "Component_[3518973002096080237]": { + "$type": "EditorOnlyEntityComponent", + "Id": 3518973002096080237 + }, + "Component_[399415038452606756]": { + "$type": "{27F1E1A1-8D9D-4C3B-BD3A-AFB9762449C0} TransformComponent", + "Id": 399415038452606756, + "Parent Entity": "ContainerEntity", + "Transform Data": { + "Translate": [ + 22.53014373779297, + -0.00018183141946792603, + 24.533506393432617 + ] + } + }, + "Component_[4564240319609068082]": { + "$type": "EditorEntitySortComponent", + "Id": 4564240319609068082 + }, + "Component_[7827190074535394331]": { + "$type": "EditorMaterialComponent", + "Id": 7827190074535394331, + "Controller": { + "Configuration": { + "materials": [ + { + "Key": { + "materialSlotStableId": 2418540911 + }, + "Value": { + "MaterialAsset": { + "assetId": { + "guid": "{80E0F2A7-1EE4-597F-80EF-985C65BCE2EB}" + }, + "assetHint": "materials/presets/pbr/metal_brass.azmaterial" + } + } + } + ] + } + } + }, + "Component_[8092226976542590265]": { + "$type": "EditorDisabledCompositionComponent", + "Id": 8092226976542590265 + } + } + }, + "Entity_[2308861716436]": { + "Id": "Entity_[2308861716436]", + "Name": "Entity1", + "Components": { + "Component_[11525365929370623807]": { + "$type": "EditorVisibilityComponent", + "Id": 11525365929370623807 + }, + "Component_[12334620273692642550]": { + "$type": "EditorLockComponent", + "Id": 12334620273692642550 + }, + "Component_[14389735759337977675]": { + "$type": "EditorPendingCompositionComponent", + "Id": 14389735759337977675 + }, + "Component_[16184381538555246534]": { + "$type": "AZ::Render::EditorMeshComponent", + "Id": 16184381538555246534, + "Controller": { + "Configuration": { + "ModelAsset": { + "assetId": { + "guid": "{E14975EF-E676-51A4-B826-3EF59CB645AA}", + "subId": 285127096 + }, + "assetHint": "testdata/objects/cube/cube.azmodel" + } + } + } + }, + "Component_[17962478023087084794]": { + "$type": "SelectionComponent", + "Id": 17962478023087084794 + }, + "Component_[18071675051915092508]": { + "$type": "EditorEntityIconComponent", + "Id": 18071675051915092508 + }, + "Component_[2115498007879087044]": { + "$type": "EditorInspectorComponent", + "Id": 2115498007879087044, + "ComponentOrderEntryArray": [ + { + "ComponentId": 399415038452606756 + }, + { + "ComponentId": 16184381538555246534, + "SortIndex": 1 + }, + { + "ComponentId": 7827190074535394331, + "SortIndex": 2 + } + ] + }, + "Component_[3518973002096080237]": { + "$type": "EditorOnlyEntityComponent", + "Id": 3518973002096080237 + }, + "Component_[399415038452606756]": { + "$type": "{27F1E1A1-8D9D-4C3B-BD3A-AFB9762449C0} TransformComponent", + "Id": 399415038452606756, + "Parent Entity": "ContainerEntity", + "Transform Data": { + "Translate": [ + 47.53014373779297, + -0.00018183141946792603, + 24.533506393432617 + ] + } + }, + "Component_[4564240319609068082]": { + "$type": "EditorEntitySortComponent", + "Id": 4564240319609068082 + }, + "Component_[7827190074535394331]": { + "$type": "EditorMaterialComponent", + "Id": 7827190074535394331, + "Controller": { + "Configuration": { + "materials": [ + { + "Key": { + "materialSlotStableId": 2418540911 + }, + "Value": { + "MaterialAsset": { + "assetId": { + "guid": "{892EA944-0325-5FA6-94D7-4AB4FC02A0F5}" + }, + "assetHint": "materials/presets/pbr/metal_iron.azmaterial" + } + } + } + ] + } + } + }, + "Component_[8092226976542590265]": { + "$type": "EditorDisabledCompositionComponent", + "Id": 8092226976542590265 + } + } + }, + "Entity_[2313156683732]": { + "Id": "Entity_[2313156683732]", + "Name": "Entity1", + "Components": { + "Component_[11525365929370623807]": { + "$type": "EditorVisibilityComponent", + "Id": 11525365929370623807 + }, + "Component_[12334620273692642550]": { + "$type": "EditorLockComponent", + "Id": 12334620273692642550 + }, + "Component_[14389735759337977675]": { + "$type": "EditorPendingCompositionComponent", + "Id": 14389735759337977675 + }, + "Component_[16184381538555246534]": { + "$type": "AZ::Render::EditorMeshComponent", + "Id": 16184381538555246534, + "Controller": { + "Configuration": { + "ModelAsset": { + "assetId": { + "guid": "{E14975EF-E676-51A4-B826-3EF59CB645AA}", + "subId": 285127096 + }, + "assetHint": "testdata/objects/cube/cube.azmodel" + } + } + } + }, + "Component_[17962478023087084794]": { + "$type": "SelectionComponent", + "Id": 17962478023087084794 + }, + "Component_[18071675051915092508]": { + "$type": "EditorEntityIconComponent", + "Id": 18071675051915092508 + }, + "Component_[2115498007879087044]": { + "$type": "EditorInspectorComponent", + "Id": 2115498007879087044, + "ComponentOrderEntryArray": [ + { + "ComponentId": 399415038452606756 + }, + { + "ComponentId": 16184381538555246534, + "SortIndex": 1 + }, + { + "ComponentId": 7827190074535394331, + "SortIndex": 2 + } + ] + }, + "Component_[3518973002096080237]": { + "$type": "EditorOnlyEntityComponent", + "Id": 3518973002096080237 + }, + "Component_[399415038452606756]": { + "$type": "{27F1E1A1-8D9D-4C3B-BD3A-AFB9762449C0} TransformComponent", + "Id": 399415038452606756, + "Parent Entity": "ContainerEntity", + "Transform Data": { + "Translate": [ + -12.530563354492188, + -0.00018183141946792603, + 109.46680450439453 + ] + } + }, + "Component_[4564240319609068082]": { + "$type": "EditorEntitySortComponent", + "Id": 4564240319609068082 + }, + "Component_[7827190074535394331]": { + "$type": "EditorMaterialComponent", + "Id": 7827190074535394331, + "Controller": { + "Configuration": { + "materials": [ + { + "Key": { + "materialSlotStableId": 2418540911 + }, + "Value": { + "MaterialAsset": { + "assetId": { + "guid": "{F2AD0EBF-7137-58D1-9991-9552FAD41B19}" + }, + "assetHint": "materials/presets/pbr/metal_mercury.azmaterial" + } + } + } + ] + } + } + }, + "Component_[8092226976542590265]": { + "$type": "EditorDisabledCompositionComponent", + "Id": 8092226976542590265 + } + } + }, + "Entity_[2317451651028]": { + "Id": "Entity_[2317451651028]", + "Name": "Entity1", + "Components": { + "Component_[11525365929370623807]": { + "$type": "EditorVisibilityComponent", + "Id": 11525365929370623807 + }, + "Component_[12334620273692642550]": { + "$type": "EditorLockComponent", + "Id": 12334620273692642550 + }, + "Component_[14389735759337977675]": { + "$type": "EditorPendingCompositionComponent", + "Id": 14389735759337977675 + }, + "Component_[16184381538555246534]": { + "$type": "AZ::Render::EditorMeshComponent", + "Id": 16184381538555246534, + "Controller": { + "Configuration": { + "ModelAsset": { + "assetId": { + "guid": "{E14975EF-E676-51A4-B826-3EF59CB645AA}", + "subId": 285127096 + }, + "assetHint": "testdata/objects/cube/cube.azmodel" + } + } + } + }, + "Component_[17962478023087084794]": { + "$type": "SelectionComponent", + "Id": 17962478023087084794 + }, + "Component_[18071675051915092508]": { + "$type": "EditorEntityIconComponent", + "Id": 18071675051915092508 + }, + "Component_[2115498007879087044]": { + "$type": "EditorInspectorComponent", + "Id": 2115498007879087044, + "ComponentOrderEntryArray": [ + { + "ComponentId": 399415038452606756 + }, + { + "ComponentId": 16184381538555246534, + "SortIndex": 1 + }, + { + "ComponentId": 7827190074535394331, + "SortIndex": 2 + } + ] + }, + "Component_[3518973002096080237]": { + "$type": "EditorOnlyEntityComponent", + "Id": 3518973002096080237 + }, + "Component_[399415038452606756]": { + "$type": "{27F1E1A1-8D9D-4C3B-BD3A-AFB9762449C0} TransformComponent", + "Id": 399415038452606756, + "Parent Entity": "ContainerEntity", + "Transform Data": { + "Translate": [ + -27.530563354492188, + -0.00018183141946792603, + 64.32462310791016 + ] + } + }, + "Component_[4564240319609068082]": { + "$type": "EditorEntitySortComponent", + "Id": 4564240319609068082 + }, + "Component_[7827190074535394331]": { + "$type": "EditorMaterialComponent", + "Id": 7827190074535394331, + "Controller": { + "Configuration": { + "materials": [ + { + "Key": { + "materialSlotStableId": 2418540911 + }, + "Value": { + "MaterialAsset": { + "assetId": { + "guid": "{2D054071-BEF7-53C0-A8C9-E4F026BD8364}" + }, + "assetHint": "materials/presets/pbr/metal_copper_matte.azmaterial" + } + } + } + ] + } + } + }, + "Component_[8092226976542590265]": { + "$type": "EditorDisabledCompositionComponent", + "Id": 8092226976542590265 + } + } + }, + "Entity_[2321746618324]": { + "Id": "Entity_[2321746618324]", + "Name": "Entity1", + "Components": { + "Component_[1057179753323467068]": { + "$type": "EditorMaterialComponent", + "Id": 1057179753323467068, + "Controller": { + "Configuration": { + "materials": [ + { + "Key": { + "materialSlotStableId": 2418540911 + }, + "Value": { + "MaterialAsset": { + "assetId": { + "guid": "{3F0DF0C4-5F23-5EB1-B762-7344AFFDC011}" + }, + "assetHint": "materials/presets/pbr/metal_titanium_polished.azmaterial" + } + } + } + ] + } + } + }, + "Component_[11525365929370623807]": { + "$type": "EditorVisibilityComponent", + "Id": 11525365929370623807 + }, + "Component_[12334620273692642550]": { + "$type": "EditorLockComponent", + "Id": 12334620273692642550 + }, + "Component_[14389735759337977675]": { + "$type": "EditorPendingCompositionComponent", + "Id": 14389735759337977675 + }, + "Component_[16184381538555246534]": { + "$type": "AZ::Render::EditorMeshComponent", + "Id": 16184381538555246534, + "Controller": { + "Configuration": { + "ModelAsset": { + "assetId": { + "guid": "{E14975EF-E676-51A4-B826-3EF59CB645AA}", + "subId": 285127096 + }, + "assetHint": "testdata/objects/cube/cube.azmodel" + } + } + } + }, + "Component_[17962478023087084794]": { + "$type": "SelectionComponent", + "Id": 17962478023087084794 + }, + "Component_[18071675051915092508]": { + "$type": "EditorEntityIconComponent", + "Id": 18071675051915092508 + }, + "Component_[2115498007879087044]": { + "$type": "EditorInspectorComponent", + "Id": 2115498007879087044, + "ComponentOrderEntryArray": [ + { + "ComponentId": 399415038452606756 + }, + { + "ComponentId": 16184381538555246534, + "SortIndex": 1 + }, + { + "ComponentId": 1057179753323467068, + "SortIndex": 2 + } + ] + }, + "Component_[3518973002096080237]": { + "$type": "EditorOnlyEntityComponent", + "Id": 3518973002096080237 + }, + "Component_[399415038452606756]": { + "$type": "{27F1E1A1-8D9D-4C3B-BD3A-AFB9762449C0} TransformComponent", + "Id": 399415038452606756, + "Parent Entity": "ContainerEntity", + "Transform Data": { + "Translate": [ + 12.530143737792969, + -0.00018183141946792603, + 105.0152359008789 + ] + } + }, + "Component_[4564240319609068082]": { + "$type": "EditorEntitySortComponent", + "Id": 4564240319609068082 + }, + "Component_[8092226976542590265]": { + "$type": "EditorDisabledCompositionComponent", + "Id": 8092226976542590265 + } + } + }, + "Entity_[2326041585620]": { + "Id": "Entity_[2326041585620]", + "Name": "Entity1", + "Components": { + "Component_[11525365929370623807]": { + "$type": "EditorVisibilityComponent", + "Id": 11525365929370623807 + }, + "Component_[12334620273692642550]": { + "$type": "EditorLockComponent", + "Id": 12334620273692642550 + }, + "Component_[14389735759337977675]": { + "$type": "EditorPendingCompositionComponent", + "Id": 14389735759337977675 + }, + "Component_[16184381538555246534]": { + "$type": "AZ::Render::EditorMeshComponent", + "Id": 16184381538555246534, + "Controller": { + "Configuration": { + "ModelAsset": { + "assetId": { + "guid": "{E14975EF-E676-51A4-B826-3EF59CB645AA}", + "subId": 285127096 + }, + "assetHint": "testdata/objects/cube/cube.azmodel" + } + } + } + }, + "Component_[17962478023087084794]": { + "$type": "SelectionComponent", + "Id": 17962478023087084794 + }, + "Component_[18071675051915092508]": { + "$type": "EditorEntityIconComponent", + "Id": 18071675051915092508 + }, + "Component_[2115498007879087044]": { + "$type": "EditorInspectorComponent", + "Id": 2115498007879087044, + "ComponentOrderEntryArray": [ + { + "ComponentId": 399415038452606756 + }, + { + "ComponentId": 16184381538555246534, + "SortIndex": 1 + }, + { + "ComponentId": 7827190074535394331, + "SortIndex": 2 + } + ] + }, + "Component_[3518973002096080237]": { + "$type": "EditorOnlyEntityComponent", + "Id": 3518973002096080237 + }, + "Component_[399415038452606756]": { + "$type": "{27F1E1A1-8D9D-4C3B-BD3A-AFB9762449C0} TransformComponent", + "Id": 399415038452606756, + "Parent Entity": "ContainerEntity", + "Transform Data": { + "Translate": [ + 17.53014373779297, + -0.00018183141946792603, + 4.451573371887207 + ] + } + }, + "Component_[4564240319609068082]": { + "$type": "EditorEntitySortComponent", + "Id": 4564240319609068082 + }, + "Component_[7827190074535394331]": { + "$type": "EditorMaterialComponent", + "Id": 7827190074535394331, + "Controller": { + "Configuration": { + "materials": [ + { + "Key": {}, + "Value": { + "MaterialAsset": { + "assetId": { + "guid": "{721188E0-B7CC-5D06-8D5D-39AF8ABF2EF9}" + }, + "assetHint": "materials/presets/pbr/metal_titanium.azmaterial" + } + } + }, + { + "Key": { + "materialSlotStableId": 2418540911 + }, + "Value": { + "MaterialAsset": { + "assetId": { + "guid": "{549D26B8-881D-569F-AF05-961F36A43F4F}" + }, + "assetHint": "materials/presets/pbr/metal_aluminum_matte.azmaterial" + } + } + } + ] + } + } + }, + "Component_[8092226976542590265]": { + "$type": "EditorDisabledCompositionComponent", + "Id": 8092226976542590265 + } + } + }, + "Entity_[2330336552916]": { + "Id": "Entity_[2330336552916]", + "Name": "Entity1", + "Components": { + "Component_[11525365929370623807]": { + "$type": "EditorVisibilityComponent", + "Id": 11525365929370623807 + }, + "Component_[12334620273692642550]": { + "$type": "EditorLockComponent", + "Id": 12334620273692642550 + }, + "Component_[14389735759337977675]": { + "$type": "EditorPendingCompositionComponent", + "Id": 14389735759337977675 + }, + "Component_[16184381538555246534]": { + "$type": "AZ::Render::EditorMeshComponent", + "Id": 16184381538555246534, + "Controller": { + "Configuration": { + "ModelAsset": { + "assetId": { + "guid": "{E14975EF-E676-51A4-B826-3EF59CB645AA}", + "subId": 285127096 + }, + "assetHint": "testdata/objects/cube/cube.azmodel" + } + } + } + }, + "Component_[17962478023087084794]": { + "$type": "SelectionComponent", + "Id": 17962478023087084794 + }, + "Component_[18071675051915092508]": { + "$type": "EditorEntityIconComponent", + "Id": 18071675051915092508 + }, + "Component_[2115498007879087044]": { + "$type": "EditorInspectorComponent", + "Id": 2115498007879087044, + "ComponentOrderEntryArray": [ + { + "ComponentId": 399415038452606756 + }, + { + "ComponentId": 16184381538555246534, + "SortIndex": 1 + }, + { + "ComponentId": 7827190074535394331, + "SortIndex": 2 + } + ] + }, + "Component_[3518973002096080237]": { + "$type": "EditorOnlyEntityComponent", + "Id": 3518973002096080237 + }, + "Component_[399415038452606756]": { + "$type": "{27F1E1A1-8D9D-4C3B-BD3A-AFB9762449C0} TransformComponent", + "Id": 399415038452606756, + "Parent Entity": "ContainerEntity", + "Transform Data": { + "Translate": [ + -42.53056335449219, + -0.00018183141946792603, + 105.0152359008789 + ] + } + }, + "Component_[4564240319609068082]": { + "$type": "EditorEntitySortComponent", + "Id": 4564240319609068082 + }, + "Component_[7827190074535394331]": { + "$type": "EditorMaterialComponent", + "Id": 7827190074535394331, + "Controller": { + "Configuration": { + "materials": [ + { + "Key": { + "materialSlotStableId": 2418540911 + }, + "Value": { + "MaterialAsset": { + "assetId": { + "guid": "{FC69F2F8-F73B-5A0C-B8B7-94BAA45780FC}" + }, + "assetHint": "materials/presets/pbr/metal_brass_polished.azmaterial" + } + } + } + ] + } + } + }, + "Component_[8092226976542590265]": { + "$type": "EditorDisabledCompositionComponent", + "Id": 8092226976542590265 + } + } + }, + "Entity_[2334631520212]": { + "Id": "Entity_[2334631520212]", + "Name": "Entity1", + "Components": { + "Component_[11525365929370623807]": { + "$type": "EditorVisibilityComponent", + "Id": 11525365929370623807 + }, + "Component_[12334620273692642550]": { + "$type": "EditorLockComponent", + "Id": 12334620273692642550 + }, + "Component_[14389735759337977675]": { + "$type": "EditorPendingCompositionComponent", + "Id": 14389735759337977675 + }, + "Component_[16184381538555246534]": { + "$type": "AZ::Render::EditorMeshComponent", + "Id": 16184381538555246534, + "Controller": { + "Configuration": { + "ModelAsset": { + "assetId": { + "guid": "{E14975EF-E676-51A4-B826-3EF59CB645AA}", + "subId": 285127096 + }, + "assetHint": "testdata/objects/cube/cube.azmodel" + } + } + } + }, + "Component_[17962478023087084794]": { + "$type": "SelectionComponent", + "Id": 17962478023087084794 + }, + "Component_[18071675051915092508]": { + "$type": "EditorEntityIconComponent", + "Id": 18071675051915092508 + }, + "Component_[2115498007879087044]": { + "$type": "EditorInspectorComponent", + "Id": 2115498007879087044, + "ComponentOrderEntryArray": [ + { + "ComponentId": 399415038452606756 + }, + { + "ComponentId": 16184381538555246534, + "SortIndex": 1 + }, + { + "ComponentId": 7827190074535394331, + "SortIndex": 2 + } + ] + }, + "Component_[3518973002096080237]": { + "$type": "EditorOnlyEntityComponent", + "Id": 3518973002096080237 + }, + "Component_[399415038452606756]": { + "$type": "{27F1E1A1-8D9D-4C3B-BD3A-AFB9762449C0} TransformComponent", + "Id": 399415038452606756, + "Parent Entity": "ContainerEntity", + "Transform Data": { + "Translate": [ + -12.530563354492188, + -0.00018183141946792603, + 59.873046875 + ] + } + }, + "Component_[4564240319609068082]": { + "$type": "EditorEntitySortComponent", + "Id": 4564240319609068082 + }, + "Component_[7827190074535394331]": { + "$type": "EditorMaterialComponent", + "Id": 7827190074535394331, + "Controller": { + "Configuration": { + "materials": [ + { + "Key": { + "materialSlotStableId": 2418540911 + }, + "Value": { + "MaterialAsset": { + "assetId": { + "guid": "{F2AD0EBF-7137-58D1-9991-9552FAD41B19}" + }, + "assetHint": "materials/presets/pbr/metal_mercury.azmaterial" + } + } + } + ] + } + } + }, + "Component_[8092226976542590265]": { + "$type": "EditorDisabledCompositionComponent", + "Id": 8092226976542590265 + } + } + }, + "Entity_[2338926487508]": { + "Id": "Entity_[2338926487508]", + "Name": "Entity1", + "Components": { + "Component_[1057179753323467068]": { + "$type": "EditorMaterialComponent", + "Id": 1057179753323467068, + "Controller": { + "Configuration": { + "materials": [ + { + "Key": { + "materialSlotStableId": 2418540911 + }, + "Value": { + "MaterialAsset": { + "assetId": { + "guid": "{A3F3CD98-1634-5542-AD5A-78E91BE21AE9}" + }, + "assetHint": "materials/presets/pbr/metal_titanium_matte.azmaterial" + } + } + } + ] + } + } + }, + "Component_[11525365929370623807]": { + "$type": "EditorVisibilityComponent", + "Id": 11525365929370623807 + }, + "Component_[12334620273692642550]": { + "$type": "EditorLockComponent", + "Id": 12334620273692642550 + }, + "Component_[14389735759337977675]": { + "$type": "EditorPendingCompositionComponent", + "Id": 14389735759337977675 + }, + "Component_[16184381538555246534]": { + "$type": "AZ::Render::EditorMeshComponent", + "Id": 16184381538555246534, + "Controller": { + "Configuration": { + "ModelAsset": { + "assetId": { + "guid": "{E14975EF-E676-51A4-B826-3EF59CB645AA}", + "subId": 285127096 + }, + "assetHint": "testdata/objects/cube/cube.azmodel" + } + } + } + }, + "Component_[17962478023087084794]": { + "$type": "SelectionComponent", + "Id": 17962478023087084794 + }, + "Component_[18071675051915092508]": { + "$type": "EditorEntityIconComponent", + "Id": 18071675051915092508 + }, + "Component_[2115498007879087044]": { + "$type": "EditorInspectorComponent", + "Id": 2115498007879087044, + "ComponentOrderEntryArray": [ + { + "ComponentId": 399415038452606756 + }, + { + "ComponentId": 16184381538555246534, + "SortIndex": 1 + }, + { + "ComponentId": 1057179753323467068, + "SortIndex": 2 + } + ] + }, + "Component_[3518973002096080237]": { + "$type": "EditorOnlyEntityComponent", + "Id": 3518973002096080237 + }, + "Component_[399415038452606756]": { + "$type": "{27F1E1A1-8D9D-4C3B-BD3A-AFB9762449C0} TransformComponent", + "Id": 399415038452606756, + "Parent Entity": "ContainerEntity", + "Transform Data": { + "Translate": [ + 12.530143737792969, + -0.00018183141946792603, + 64.32462310791016 + ] + } + }, + "Component_[4564240319609068082]": { + "$type": "EditorEntitySortComponent", + "Id": 4564240319609068082 + }, + "Component_[8092226976542590265]": { + "$type": "EditorDisabledCompositionComponent", + "Id": 8092226976542590265 + } + } + }, + "Entity_[2343221454804]": { + "Id": "Entity_[2343221454804]", + "Name": "Entity1", + "Components": { + "Component_[11525365929370623807]": { + "$type": "EditorVisibilityComponent", + "Id": 11525365929370623807 + }, + "Component_[12334620273692642550]": { + "$type": "EditorLockComponent", + "Id": 12334620273692642550 + }, + "Component_[14389735759337977675]": { + "$type": "EditorPendingCompositionComponent", + "Id": 14389735759337977675 + }, + "Component_[16184381538555246534]": { + "$type": "AZ::Render::EditorMeshComponent", + "Id": 16184381538555246534, + "Controller": { + "Configuration": { + "ModelAsset": { + "assetId": { + "guid": "{E14975EF-E676-51A4-B826-3EF59CB645AA}", + "subId": 285127096 + }, + "assetHint": "testdata/objects/cube/cube.azmodel" + } + } + } + }, + "Component_[17962478023087084794]": { + "$type": "SelectionComponent", + "Id": 17962478023087084794 + }, + "Component_[18071675051915092508]": { + "$type": "EditorEntityIconComponent", + "Id": 18071675051915092508 + }, + "Component_[2115498007879087044]": { + "$type": "EditorInspectorComponent", + "Id": 2115498007879087044, + "ComponentOrderEntryArray": [ + { + "ComponentId": 399415038452606756 + }, + { + "ComponentId": 16184381538555246534, + "SortIndex": 1 + }, + { + "ComponentId": 7827190074535394331, + "SortIndex": 2 + } + ] + }, + "Component_[3518973002096080237]": { + "$type": "EditorOnlyEntityComponent", + "Id": 3518973002096080237 + }, + "Component_[399415038452606756]": { + "$type": "{27F1E1A1-8D9D-4C3B-BD3A-AFB9762449C0} TransformComponent", + "Id": 399415038452606756, + "Parent Entity": "ContainerEntity", + "Transform Data": { + "Translate": [ + 27.53014373779297, + -0.00018183141946792603, + 39.56034851074219 + ] + } + }, + "Component_[4564240319609068082]": { + "$type": "EditorEntitySortComponent", + "Id": 4564240319609068082 + }, + "Component_[7827190074535394331]": { + "$type": "EditorMaterialComponent", + "Id": 7827190074535394331, + "Controller": { + "Configuration": { + "materials": [ + { + "Key": { + "materialSlotStableId": 2418540911 + }, + "Value": { + "MaterialAsset": { + "assetId": { + "guid": "{B7C712DC-4839-58BB-B522-A4F120084CF5}" + }, + "assetHint": "materials/presets/pbr/metal_chrome.azmaterial" + } + } + } + ] + } + } + }, + "Component_[8092226976542590265]": { + "$type": "EditorDisabledCompositionComponent", + "Id": 8092226976542590265 + } + } + }, + "Entity_[2347516422100]": { + "Id": "Entity_[2347516422100]", + "Name": "Entity1", + "Components": { + "Component_[11525365929370623807]": { + "$type": "EditorVisibilityComponent", + "Id": 11525365929370623807 + }, + "Component_[12334620273692642550]": { + "$type": "EditorLockComponent", + "Id": 12334620273692642550 + }, + "Component_[14389735759337977675]": { + "$type": "EditorPendingCompositionComponent", + "Id": 14389735759337977675 + }, + "Component_[16184381538555246534]": { + "$type": "AZ::Render::EditorMeshComponent", + "Id": 16184381538555246534, + "Controller": { + "Configuration": { + "ModelAsset": { + "assetId": { + "guid": "{E14975EF-E676-51A4-B826-3EF59CB645AA}", + "subId": 285127096 + }, + "assetHint": "testdata/objects/cube/cube.azmodel" + } + } + } + }, + "Component_[17962478023087084794]": { + "$type": "SelectionComponent", + "Id": 17962478023087084794 + }, + "Component_[18071675051915092508]": { + "$type": "EditorEntityIconComponent", + "Id": 18071675051915092508 + }, + "Component_[2115498007879087044]": { + "$type": "EditorInspectorComponent", + "Id": 2115498007879087044, + "ComponentOrderEntryArray": [ + { + "ComponentId": 399415038452606756 + }, + { + "ComponentId": 16184381538555246534, + "SortIndex": 1 + }, + { + "ComponentId": 7827190074535394331, + "SortIndex": 2 + } + ] + }, + "Component_[3518973002096080237]": { + "$type": "EditorOnlyEntityComponent", + "Id": 3518973002096080237 + }, + "Component_[399415038452606756]": { + "$type": "{27F1E1A1-8D9D-4C3B-BD3A-AFB9762449C0} TransformComponent", + "Id": 399415038452606756, + "Parent Entity": "ContainerEntity", + "Transform Data": { + "Translate": [ + 42.53014373779297, + -0.00018183141946792603, + 114.4910659790039 + ] + } + }, + "Component_[4564240319609068082]": { + "$type": "EditorEntitySortComponent", + "Id": 4564240319609068082 + }, + "Component_[7827190074535394331]": { + "$type": "EditorMaterialComponent", + "Id": 7827190074535394331, + "Controller": { + "Configuration": { + "materials": [ + { + "Key": { + "materialSlotStableId": 2418540911 + }, + "Value": { + "MaterialAsset": { + "assetId": { + "guid": "{FE52E7C8-064D-506A-9C26-433EB93747DE}" + }, + "assetHint": "materials/presets/pbr/metal_gold.azmaterial" + } + } + } + ] + } + } + }, + "Component_[8092226976542590265]": { + "$type": "EditorDisabledCompositionComponent", + "Id": 8092226976542590265 + } + } + }, + "Entity_[2351811389396]": { + "Id": "Entity_[2351811389396]", + "Name": "Entity1", + "Components": { + "Component_[11525365929370623807]": { + "$type": "EditorVisibilityComponent", + "Id": 11525365929370623807 + }, + "Component_[12334620273692642550]": { + "$type": "EditorLockComponent", + "Id": 12334620273692642550 + }, + "Component_[14389735759337977675]": { + "$type": "EditorPendingCompositionComponent", + "Id": 14389735759337977675 + }, + "Component_[16184381538555246534]": { + "$type": "AZ::Render::EditorMeshComponent", + "Id": 16184381538555246534, + "Controller": { + "Configuration": { + "ModelAsset": { + "assetId": { + "guid": "{E14975EF-E676-51A4-B826-3EF59CB645AA}", + "subId": 285127096 + }, + "assetHint": "testdata/objects/cube/cube.azmodel" + } + } + } + }, + "Component_[17962478023087084794]": { + "$type": "SelectionComponent", + "Id": 17962478023087084794 + }, + "Component_[18071675051915092508]": { + "$type": "EditorEntityIconComponent", + "Id": 18071675051915092508 + }, + "Component_[2115498007879087044]": { + "$type": "EditorInspectorComponent", + "Id": 2115498007879087044, + "ComponentOrderEntryArray": [ + { + "ComponentId": 399415038452606756 + }, + { + "ComponentId": 16184381538555246534, + "SortIndex": 1 + }, + { + "ComponentId": 7827190074535394331, + "SortIndex": 2 + } + ] + }, + "Component_[3518973002096080237]": { + "$type": "EditorOnlyEntityComponent", + "Id": 3518973002096080237 + }, + "Component_[399415038452606756]": { + "$type": "{27F1E1A1-8D9D-4C3B-BD3A-AFB9762449C0} TransformComponent", + "Id": 399415038452606756, + "Parent Entity": "ContainerEntity", + "Transform Data": { + "Translate": [ + -7.5305633544921875, + -0.00018183141946792603, + 109.46680450439453 + ] + } + }, + "Component_[4564240319609068082]": { + "$type": "EditorEntitySortComponent", + "Id": 4564240319609068082 + }, + "Component_[7827190074535394331]": { + "$type": "EditorMaterialComponent", + "Id": 7827190074535394331, + "Controller": { + "Configuration": { + "materials": [ + { + "Key": { + "materialSlotStableId": 2418540911 + }, + "Value": { + "MaterialAsset": { + "assetId": { + "guid": "{E56377B1-6310-5311-A494-135BE50B74F0}" + }, + "assetHint": "materials/presets/pbr/metal_nickel_matte.azmaterial" + } + } + } + ] + } + } + }, + "Component_[8092226976542590265]": { + "$type": "EditorDisabledCompositionComponent", + "Id": 8092226976542590265 + } + } + }, + "Entity_[2356106356692]": { + "Id": "Entity_[2356106356692]", + "Name": "Entity1", + "Components": { + "Component_[11525365929370623807]": { + "$type": "EditorVisibilityComponent", + "Id": 11525365929370623807 + }, + "Component_[12334620273692642550]": { + "$type": "EditorLockComponent", + "Id": 12334620273692642550 + }, + "Component_[14389735759337977675]": { + "$type": "EditorPendingCompositionComponent", + "Id": 14389735759337977675 + }, + "Component_[16184381538555246534]": { + "$type": "AZ::Render::EditorMeshComponent", + "Id": 16184381538555246534, + "Controller": { + "Configuration": { + "ModelAsset": { + "assetId": { + "guid": "{E14975EF-E676-51A4-B826-3EF59CB645AA}", + "subId": 285127096 + }, + "assetHint": "testdata/objects/cube/cube.azmodel" + } + } + } + }, + "Component_[17962478023087084794]": { + "$type": "SelectionComponent", + "Id": 17962478023087084794 + }, + "Component_[18071675051915092508]": { + "$type": "EditorEntityIconComponent", + "Id": 18071675051915092508 + }, + "Component_[2115498007879087044]": { + "$type": "EditorInspectorComponent", + "Id": 2115498007879087044, + "ComponentOrderEntryArray": [ + { + "ComponentId": 399415038452606756 + }, + { + "ComponentId": 16184381538555246534, + "SortIndex": 1 + }, + { + "ComponentId": 7827190074535394331, + "SortIndex": 2 + } + ] + }, + "Component_[3518973002096080237]": { + "$type": "EditorOnlyEntityComponent", + "Id": 3518973002096080237 + }, + "Component_[399415038452606756]": { + "$type": "{27F1E1A1-8D9D-4C3B-BD3A-AFB9762449C0} TransformComponent", + "Id": 399415038452606756, + "Parent Entity": "ContainerEntity", + "Transform Data": { + "Translate": [ + -22.530563354492188, + -0.00018183141946792603, + 4.451573371887207 + ] + } + }, + "Component_[4564240319609068082]": { + "$type": "EditorEntitySortComponent", + "Id": 4564240319609068082 + }, + "Component_[7827190074535394331]": { + "$type": "EditorMaterialComponent", + "Id": 7827190074535394331, + "Controller": { + "Configuration": { + "materials": [ + { + "Key": { + "materialSlotStableId": 2418540911 + }, + "Value": { + "MaterialAsset": { + "assetId": { + "guid": "{5BC13D95-377E-53EA-9A93-156384BE8B04}" + }, + "assetHint": "materials/presets/pbr/metal_gold_matte.azmaterial" + } + } + } + ] + } + } + }, + "Component_[8092226976542590265]": { + "$type": "EditorDisabledCompositionComponent", + "Id": 8092226976542590265 + } + } + }, + "Entity_[2360401323988]": { + "Id": "Entity_[2360401323988]", + "Name": "Entity1", + "Components": { + "Component_[11525365929370623807]": { + "$type": "EditorVisibilityComponent", + "Id": 11525365929370623807 + }, + "Component_[12334620273692642550]": { + "$type": "EditorLockComponent", + "Id": 12334620273692642550 + }, + "Component_[14389735759337977675]": { + "$type": "EditorPendingCompositionComponent", + "Id": 14389735759337977675 + }, + "Component_[16184381538555246534]": { + "$type": "AZ::Render::EditorMeshComponent", + "Id": 16184381538555246534, + "Controller": { + "Configuration": { + "ModelAsset": { + "assetId": { + "guid": "{E14975EF-E676-51A4-B826-3EF59CB645AA}", + "subId": 285127096 + }, + "assetHint": "testdata/objects/cube/cube.azmodel" + } + } + } + }, + "Component_[17962478023087084794]": { + "$type": "SelectionComponent", + "Id": 17962478023087084794 + }, + "Component_[18071675051915092508]": { + "$type": "EditorEntityIconComponent", + "Id": 18071675051915092508 + }, + "Component_[2115498007879087044]": { + "$type": "EditorInspectorComponent", + "Id": 2115498007879087044, + "ComponentOrderEntryArray": [ + { + "ComponentId": 399415038452606756 + }, + { + "ComponentId": 16184381538555246534, + "SortIndex": 1 + }, + { + "ComponentId": 7827190074535394331, + "SortIndex": 2 + } + ] + }, + "Component_[3518973002096080237]": { + "$type": "EditorOnlyEntityComponent", + "Id": 3518973002096080237 + }, + "Component_[399415038452606756]": { + "$type": "{27F1E1A1-8D9D-4C3B-BD3A-AFB9762449C0} TransformComponent", + "Id": 399415038452606756, + "Parent Entity": "ContainerEntity", + "Transform Data": { + "Translate": [ + -22.530563354492188, + -0.00018183141946792603, + 54.618019104003906 + ] + } + }, + "Component_[4564240319609068082]": { + "$type": "EditorEntitySortComponent", + "Id": 4564240319609068082 + }, + "Component_[7827190074535394331]": { + "$type": "EditorMaterialComponent", + "Id": 7827190074535394331, + "Controller": { + "Configuration": { + "materials": [ + { + "Key": { + "materialSlotStableId": 2418540911 + }, + "Value": { + "MaterialAsset": { + "assetId": { + "guid": "{FE52E7C8-064D-506A-9C26-433EB93747DE}" + }, + "assetHint": "materials/presets/pbr/metal_gold.azmaterial" + } + } + } + ] + } + } + }, + "Component_[8092226976542590265]": { + "$type": "EditorDisabledCompositionComponent", + "Id": 8092226976542590265 + } + } + }, + "Entity_[2364696291284]": { + "Id": "Entity_[2364696291284]", + "Name": "Entity1", + "Components": { + "Component_[11525365929370623807]": { + "$type": "EditorVisibilityComponent", + "Id": 11525365929370623807 + }, + "Component_[12334620273692642550]": { + "$type": "EditorLockComponent", + "Id": 12334620273692642550 + }, + "Component_[14389735759337977675]": { + "$type": "EditorPendingCompositionComponent", + "Id": 14389735759337977675 + }, + "Component_[16184381538555246534]": { + "$type": "AZ::Render::EditorMeshComponent", + "Id": 16184381538555246534, + "Controller": { + "Configuration": { + "ModelAsset": { + "assetId": { + "guid": "{E14975EF-E676-51A4-B826-3EF59CB645AA}", + "subId": 285127096 + }, + "assetHint": "testdata/objects/cube/cube.azmodel" + } + } + } + }, + "Component_[17962478023087084794]": { + "$type": "SelectionComponent", + "Id": 17962478023087084794 + }, + "Component_[18071675051915092508]": { + "$type": "EditorEntityIconComponent", + "Id": 18071675051915092508 + }, + "Component_[2115498007879087044]": { + "$type": "EditorInspectorComponent", + "Id": 2115498007879087044, + "ComponentOrderEntryArray": [ + { + "ComponentId": 399415038452606756 + }, + { + "ComponentId": 16184381538555246534, + "SortIndex": 1 + }, + { + "ComponentId": 7827190074535394331, + "SortIndex": 2 + } + ] + }, + "Component_[3518973002096080237]": { + "$type": "EditorOnlyEntityComponent", + "Id": 3518973002096080237 + }, + "Component_[399415038452606756]": { + "$type": "{27F1E1A1-8D9D-4C3B-BD3A-AFB9762449C0} TransformComponent", + "Id": 399415038452606756, + "Parent Entity": "ContainerEntity", + "Transform Data": { + "Translate": [ + -37.53056335449219, + -0.00018183141946792603, + 9.475835800170898 + ] + } + }, + "Component_[4564240319609068082]": { + "$type": "EditorEntitySortComponent", + "Id": 4564240319609068082 + }, + "Component_[7827190074535394331]": { + "$type": "EditorMaterialComponent", + "Id": 7827190074535394331, + "Controller": { + "Configuration": { + "materials": [ + { + "Key": { + "materialSlotStableId": 2418540911 + }, + "Value": { + "MaterialAsset": { + "assetId": { + "guid": "{B7C712DC-4839-58BB-B522-A4F120084CF5}" + }, + "assetHint": "materials/presets/pbr/metal_chrome.azmaterial" + } + } + } + ] + } + } + }, + "Component_[8092226976542590265]": { + "$type": "EditorDisabledCompositionComponent", + "Id": 8092226976542590265 + } + } + }, + "Entity_[2368991258580]": { + "Id": "Entity_[2368991258580]", + "Name": "Entity1", + "Components": { + "Component_[11525365929370623807]": { + "$type": "EditorVisibilityComponent", + "Id": 11525365929370623807 + }, + "Component_[12334620273692642550]": { + "$type": "EditorLockComponent", + "Id": 12334620273692642550 + }, + "Component_[14389735759337977675]": { + "$type": "EditorPendingCompositionComponent", + "Id": 14389735759337977675 + }, + "Component_[16184381538555246534]": { + "$type": "AZ::Render::EditorMeshComponent", + "Id": 16184381538555246534, + "Controller": { + "Configuration": { + "ModelAsset": { + "assetId": { + "guid": "{E14975EF-E676-51A4-B826-3EF59CB645AA}", + "subId": 285127096 + }, + "assetHint": "testdata/objects/cube/cube.azmodel" + } + } + } + }, + "Component_[17962478023087084794]": { + "$type": "SelectionComponent", + "Id": 17962478023087084794 + }, + "Component_[18071675051915092508]": { + "$type": "EditorEntityIconComponent", + "Id": 18071675051915092508 + }, + "Component_[2115498007879087044]": { + "$type": "EditorInspectorComponent", + "Id": 2115498007879087044, + "ComponentOrderEntryArray": [ + { + "ComponentId": 399415038452606756 + }, + { + "ComponentId": 16184381538555246534, + "SortIndex": 1 + }, + { + "ComponentId": 7827190074535394331, + "SortIndex": 2 + } + ] + }, + "Component_[3518973002096080237]": { + "$type": "EditorOnlyEntityComponent", + "Id": 3518973002096080237 + }, + "Component_[399415038452606756]": { + "$type": "{27F1E1A1-8D9D-4C3B-BD3A-AFB9762449C0} TransformComponent", + "Id": 399415038452606756, + "Parent Entity": "ContainerEntity", + "Transform Data": { + "Translate": [ + 22.53014373779297, + -0.00018183141946792603, + 89.95755767822266 + ] + } + }, + "Component_[4564240319609068082]": { + "$type": "EditorEntitySortComponent", + "Id": 4564240319609068082 + }, + "Component_[7827190074535394331]": { + "$type": "EditorMaterialComponent", + "Id": 7827190074535394331, + "Controller": { + "Configuration": { + "materials": [ + { + "Key": { + "materialSlotStableId": 2418540911 + }, + "Value": { + "MaterialAsset": { + "assetId": { + "guid": "{FC69F2F8-F73B-5A0C-B8B7-94BAA45780FC}" + }, + "assetHint": "materials/presets/pbr/metal_brass_polished.azmaterial" + } + } + } + ] + } + } + }, + "Component_[8092226976542590265]": { + "$type": "EditorDisabledCompositionComponent", + "Id": 8092226976542590265 + } + } + }, + "Entity_[2373286225876]": { + "Id": "Entity_[2373286225876]", + "Name": "Entity1", + "Components": { + "Component_[11525365929370623807]": { + "$type": "EditorVisibilityComponent", + "Id": 11525365929370623807 + }, + "Component_[12334620273692642550]": { + "$type": "EditorLockComponent", + "Id": 12334620273692642550 + }, + "Component_[14389735759337977675]": { + "$type": "EditorPendingCompositionComponent", + "Id": 14389735759337977675 + }, + "Component_[16184381538555246534]": { + "$type": "AZ::Render::EditorMeshComponent", + "Id": 16184381538555246534, + "Controller": { + "Configuration": { + "ModelAsset": { + "assetId": { + "guid": "{E14975EF-E676-51A4-B826-3EF59CB645AA}", + "subId": 285127096 + }, + "assetHint": "testdata/objects/cube/cube.azmodel" + } + } + } + }, + "Component_[17962478023087084794]": { + "$type": "SelectionComponent", + "Id": 17962478023087084794 + }, + "Component_[18071675051915092508]": { + "$type": "EditorEntityIconComponent", + "Id": 18071675051915092508 + }, + "Component_[2115498007879087044]": { + "$type": "EditorInspectorComponent", + "Id": 2115498007879087044, + "ComponentOrderEntryArray": [ + { + "ComponentId": 399415038452606756 + }, + { + "ComponentId": 16184381538555246534, + "SortIndex": 1 + }, + { + "ComponentId": 7827190074535394331, + "SortIndex": 2 + } + ] + }, + "Component_[3518973002096080237]": { + "$type": "EditorOnlyEntityComponent", + "Id": 3518973002096080237 + }, + "Component_[399415038452606756]": { + "$type": "{27F1E1A1-8D9D-4C3B-BD3A-AFB9762449C0} TransformComponent", + "Id": 399415038452606756, + "Parent Entity": "ContainerEntity", + "Transform Data": { + "Translate": [ + -32.53056335449219, + -0.00018183141946792603, + 99.43339538574219 + ] + } + }, + "Component_[4564240319609068082]": { + "$type": "EditorEntitySortComponent", + "Id": 4564240319609068082 + }, + "Component_[7827190074535394331]": { + "$type": "EditorMaterialComponent", + "Id": 7827190074535394331, + "Controller": { + "Configuration": { + "materials": [ + { + "Key": { + "materialSlotStableId": 2418540911 + }, + "Value": { + "MaterialAsset": { + "assetId": { + "guid": "{99976D73-6248-5D66-AD15-E8F52B0AFE36}" + }, + "assetHint": "materials/presets/pbr/metal_cobalt.azmaterial" + } + } + } + ] + } + } + }, + "Component_[8092226976542590265]": { + "$type": "EditorDisabledCompositionComponent", + "Id": 8092226976542590265 + } + } + }, + "Entity_[2377581193172]": { + "Id": "Entity_[2377581193172]", + "Name": "Entity1", + "Components": { + "Component_[11525365929370623807]": { + "$type": "EditorVisibilityComponent", + "Id": 11525365929370623807 + }, + "Component_[12334620273692642550]": { + "$type": "EditorLockComponent", + "Id": 12334620273692642550 + }, + "Component_[14389735759337977675]": { + "$type": "EditorPendingCompositionComponent", + "Id": 14389735759337977675 + }, + "Component_[16184381538555246534]": { + "$type": "AZ::Render::EditorMeshComponent", + "Id": 16184381538555246534, + "Controller": { + "Configuration": { + "ModelAsset": { + "assetId": { + "guid": "{E14975EF-E676-51A4-B826-3EF59CB645AA}", + "subId": 285127096 + }, + "assetHint": "testdata/objects/cube/cube.azmodel" + } + } + } + }, + "Component_[17962478023087084794]": { + "$type": "SelectionComponent", + "Id": 17962478023087084794 + }, + "Component_[18071675051915092508]": { + "$type": "EditorEntityIconComponent", + "Id": 18071675051915092508 + }, + "Component_[2115498007879087044]": { + "$type": "EditorInspectorComponent", + "Id": 2115498007879087044, + "ComponentOrderEntryArray": [ + { + "ComponentId": 399415038452606756 + }, + { + "ComponentId": 16184381538555246534, + "SortIndex": 1 + }, + { + "ComponentId": 7827190074535394331, + "SortIndex": 2 + } + ] + }, + "Component_[3518973002096080237]": { + "$type": "EditorOnlyEntityComponent", + "Id": 3518973002096080237 + }, + "Component_[399415038452606756]": { + "$type": "{27F1E1A1-8D9D-4C3B-BD3A-AFB9762449C0} TransformComponent", + "Id": 399415038452606756, + "Parent Entity": "ContainerEntity", + "Transform Data": { + "Translate": [ + -22.530563354492188, + -0.00018183141946792603, + 15.057670593261719 + ] + } + }, + "Component_[4564240319609068082]": { + "$type": "EditorEntitySortComponent", + "Id": 4564240319609068082 + }, + "Component_[7827190074535394331]": { + "$type": "EditorMaterialComponent", + "Id": 7827190074535394331, + "Controller": { + "Configuration": { + "materials": [ + { + "Key": { + "materialSlotStableId": 2418540911 + }, + "Value": { + "MaterialAsset": { + "assetId": { + "guid": "{FB4657EB-FB3A-5EC3-A772-DC36D6F733C3}" + }, + "assetHint": "materials/presets/pbr/metal_gold_polished.azmaterial" + } + } + } + ] + } + } + }, + "Component_[8092226976542590265]": { + "$type": "EditorDisabledCompositionComponent", + "Id": 8092226976542590265 + } + } + }, + "Entity_[2381876160468]": { + "Id": "Entity_[2381876160468]", + "Name": "Entity1", + "Components": { + "Component_[11525365929370623807]": { + "$type": "EditorVisibilityComponent", + "Id": 11525365929370623807 + }, + "Component_[12334620273692642550]": { + "$type": "EditorLockComponent", + "Id": 12334620273692642550 + }, + "Component_[14389735759337977675]": { + "$type": "EditorPendingCompositionComponent", + "Id": 14389735759337977675 + }, + "Component_[16184381538555246534]": { + "$type": "AZ::Render::EditorMeshComponent", + "Id": 16184381538555246534, + "Controller": { + "Configuration": { + "ModelAsset": { + "assetId": { + "guid": "{E14975EF-E676-51A4-B826-3EF59CB645AA}", + "subId": 285127096 + }, + "assetHint": "testdata/objects/cube/cube.azmodel" + } + } + } + }, + "Component_[17962478023087084794]": { + "$type": "SelectionComponent", + "Id": 17962478023087084794 + }, + "Component_[18071675051915092508]": { + "$type": "EditorEntityIconComponent", + "Id": 18071675051915092508 + }, + "Component_[2115498007879087044]": { + "$type": "EditorInspectorComponent", + "Id": 2115498007879087044, + "ComponentOrderEntryArray": [ + { + "ComponentId": 399415038452606756 + }, + { + "ComponentId": 16184381538555246534, + "SortIndex": 1 + }, + { + "ComponentId": 7827190074535394331, + "SortIndex": 2 + } + ] + }, + "Component_[3518973002096080237]": { + "$type": "EditorOnlyEntityComponent", + "Id": 3518973002096080237 + }, + "Component_[399415038452606756]": { + "$type": "{27F1E1A1-8D9D-4C3B-BD3A-AFB9762449C0} TransformComponent", + "Id": 399415038452606756, + "Parent Entity": "ContainerEntity", + "Transform Data": { + "Translate": [ + 27.53014373779297, + -0.00018183141946792603, + 49.593753814697266 + ] + } + }, + "Component_[4564240319609068082]": { + "$type": "EditorEntitySortComponent", + "Id": 4564240319609068082 + }, + "Component_[7827190074535394331]": { + "$type": "EditorMaterialComponent", + "Id": 7827190074535394331, + "Controller": { + "Configuration": { + "materials": [ + { + "Key": { + "materialSlotStableId": 2418540911 + }, + "Value": { + "MaterialAsset": { + "assetId": { + "guid": "{A78EA2FC-688B-5E3A-A7F6-DB413D11D4CF}" + }, + "assetHint": "materials/presets/pbr/metal_chrome_matte.azmaterial" + } + } + } + ] + } + } + }, + "Component_[8092226976542590265]": { + "$type": "EditorDisabledCompositionComponent", + "Id": 8092226976542590265 + } + } + }, + "Entity_[2386171127764]": { + "Id": "Entity_[2386171127764]", + "Name": "Entity1", + "Components": { + "Component_[11525365929370623807]": { + "$type": "EditorVisibilityComponent", + "Id": 11525365929370623807 + }, + "Component_[12334620273692642550]": { + "$type": "EditorLockComponent", + "Id": 12334620273692642550 + }, + "Component_[14389735759337977675]": { + "$type": "EditorPendingCompositionComponent", + "Id": 14389735759337977675 + }, + "Component_[16184381538555246534]": { + "$type": "AZ::Render::EditorMeshComponent", + "Id": 16184381538555246534, + "Controller": { + "Configuration": { + "ModelAsset": { + "assetId": { + "guid": "{E14975EF-E676-51A4-B826-3EF59CB645AA}", + "subId": 285127096 + }, + "assetHint": "testdata/objects/cube/cube.azmodel" + } + } + } + }, + "Component_[17962478023087084794]": { + "$type": "SelectionComponent", + "Id": 17962478023087084794 + }, + "Component_[18071675051915092508]": { + "$type": "EditorEntityIconComponent", + "Id": 18071675051915092508 + }, + "Component_[2115498007879087044]": { + "$type": "EditorInspectorComponent", + "Id": 2115498007879087044, + "ComponentOrderEntryArray": [ + { + "ComponentId": 399415038452606756 + }, + { + "ComponentId": 16184381538555246534, + "SortIndex": 1 + }, + { + "ComponentId": 7827190074535394331, + "SortIndex": 2 + } + ] + }, + "Component_[3518973002096080237]": { + "$type": "EditorOnlyEntityComponent", + "Id": 3518973002096080237 + }, + "Component_[399415038452606756]": { + "$type": "{27F1E1A1-8D9D-4C3B-BD3A-AFB9762449C0} TransformComponent", + "Id": 399415038452606756, + "Parent Entity": "ContainerEntity", + "Transform Data": { + "Translate": [ + 47.53014373779297, + -0.00018183141946792603, + 69.34888458251953 + ] + } + }, + "Component_[4564240319609068082]": { + "$type": "EditorEntitySortComponent", + "Id": 4564240319609068082 + }, + "Component_[7827190074535394331]": { + "$type": "EditorMaterialComponent", + "Id": 7827190074535394331, + "Controller": { + "Configuration": { + "materials": [ + { + "Key": { + "materialSlotStableId": 2418540911 + }, + "Value": { + "MaterialAsset": { + "assetId": { + "guid": "{892EA944-0325-5FA6-94D7-4AB4FC02A0F5}" + }, + "assetHint": "materials/presets/pbr/metal_iron.azmaterial" + } + } + } + ] + } + } + }, + "Component_[8092226976542590265]": { + "$type": "EditorDisabledCompositionComponent", + "Id": 8092226976542590265 + } + } + }, + "Entity_[2390466095060]": { + "Id": "Entity_[2390466095060]", + "Name": "Entity1", + "Components": { + "Component_[11525365929370623807]": { + "$type": "EditorVisibilityComponent", + "Id": 11525365929370623807 + }, + "Component_[12334620273692642550]": { + "$type": "EditorLockComponent", + "Id": 12334620273692642550 + }, + "Component_[14389735759337977675]": { + "$type": "EditorPendingCompositionComponent", + "Id": 14389735759337977675 + }, + "Component_[16184381538555246534]": { + "$type": "AZ::Render::EditorMeshComponent", + "Id": 16184381538555246534, + "Controller": { + "Configuration": { + "ModelAsset": { + "assetId": { + "guid": "{E14975EF-E676-51A4-B826-3EF59CB645AA}", + "subId": 285127096 + }, + "assetHint": "testdata/objects/cube/cube.azmodel" + } + } + } + }, + "Component_[17962478023087084794]": { + "$type": "SelectionComponent", + "Id": 17962478023087084794 + }, + "Component_[18071675051915092508]": { + "$type": "EditorEntityIconComponent", + "Id": 18071675051915092508 + }, + "Component_[2115498007879087044]": { + "$type": "EditorInspectorComponent", + "Id": 2115498007879087044, + "ComponentOrderEntryArray": [ + { + "ComponentId": 399415038452606756 + }, + { + "ComponentId": 16184381538555246534, + "SortIndex": 1 + }, + { + "ComponentId": 7827190074535394331, + "SortIndex": 2 + } + ] + }, + "Component_[3518973002096080237]": { + "$type": "EditorOnlyEntityComponent", + "Id": 3518973002096080237 + }, + "Component_[399415038452606756]": { + "$type": "{27F1E1A1-8D9D-4C3B-BD3A-AFB9762449C0} TransformComponent", + "Id": 399415038452606756, + "Parent Entity": "ContainerEntity", + "Transform Data": { + "Translate": [ + 42.53014373779297, + -0.00018183141946792603, + 105.0152359008789 + ] + } + }, + "Component_[4564240319609068082]": { + "$type": "EditorEntitySortComponent", + "Id": 4564240319609068082 + }, + "Component_[7827190074535394331]": { + "$type": "EditorMaterialComponent", + "Id": 7827190074535394331, + "Controller": { + "Configuration": { + "materials": [ + { + "Key": { + "materialSlotStableId": 2418540911 + }, + "Value": { + "MaterialAsset": { + "assetId": { + "guid": "{FB4657EB-FB3A-5EC3-A772-DC36D6F733C3}" + }, + "assetHint": "materials/presets/pbr/metal_gold_polished.azmaterial" + } + } + } + ] + } + } + }, + "Component_[8092226976542590265]": { + "$type": "EditorDisabledCompositionComponent", + "Id": 8092226976542590265 + } + } + }, + "Entity_[2394761062356]": { + "Id": "Entity_[2394761062356]", + "Name": "Entity1", + "Components": { + "Component_[11525365929370623807]": { + "$type": "EditorVisibilityComponent", + "Id": 11525365929370623807 + }, + "Component_[12334620273692642550]": { + "$type": "EditorLockComponent", + "Id": 12334620273692642550 + }, + "Component_[14389735759337977675]": { + "$type": "EditorPendingCompositionComponent", + "Id": 14389735759337977675 + }, + "Component_[16184381538555246534]": { + "$type": "AZ::Render::EditorMeshComponent", + "Id": 16184381538555246534, + "Controller": { + "Configuration": { + "ModelAsset": { + "assetId": { + "guid": "{E14975EF-E676-51A4-B826-3EF59CB645AA}", + "subId": 285127096 + }, + "assetHint": "testdata/objects/cube/cube.azmodel" + } + } + } + }, + "Component_[17962478023087084794]": { + "$type": "SelectionComponent", + "Id": 17962478023087084794 + }, + "Component_[18071675051915092508]": { + "$type": "EditorEntityIconComponent", + "Id": 18071675051915092508 + }, + "Component_[2115498007879087044]": { + "$type": "EditorInspectorComponent", + "Id": 2115498007879087044, + "ComponentOrderEntryArray": [ + { + "ComponentId": 399415038452606756 + }, + { + "ComponentId": 16184381538555246534, + "SortIndex": 1 + }, + { + "ComponentId": 7827190074535394331, + "SortIndex": 2 + } + ] + }, + "Component_[3518973002096080237]": { + "$type": "EditorOnlyEntityComponent", + "Id": 3518973002096080237 + }, + "Component_[399415038452606756]": { + "$type": "{27F1E1A1-8D9D-4C3B-BD3A-AFB9762449C0} TransformComponent", + "Id": 399415038452606756, + "Parent Entity": "ContainerEntity", + "Transform Data": { + "Translate": [ + -47.53056335449219, + -0.00018183141946792603, + 74.93071746826172 + ] + } + }, + "Component_[4564240319609068082]": { + "$type": "EditorEntitySortComponent", + "Id": 4564240319609068082 + }, + "Component_[7827190074535394331]": { + "$type": "EditorMaterialComponent", + "Id": 7827190074535394331, + "Controller": { + "Configuration": { + "materials": [ + { + "Key": { + "materialSlotStableId": 2418540911 + }, + "Value": { + "MaterialAsset": { + "assetId": { + "guid": "{64C1F6A6-6BDA-551A-BE56-1829E5913278}" + }, + "assetHint": "materials/presets/pbr/metal_aluminum_polished.azmaterial" + } + } + } + ] + } + } + }, + "Component_[8092226976542590265]": { + "$type": "EditorDisabledCompositionComponent", + "Id": 8092226976542590265 + } + } + }, + "Entity_[2399056029652]": { + "Id": "Entity_[2399056029652]", + "Name": "Entity1", + "Components": { + "Component_[11525365929370623807]": { + "$type": "EditorVisibilityComponent", + "Id": 11525365929370623807 + }, + "Component_[12334620273692642550]": { + "$type": "EditorLockComponent", + "Id": 12334620273692642550 + }, + "Component_[14389735759337977675]": { + "$type": "EditorPendingCompositionComponent", + "Id": 14389735759337977675 + }, + "Component_[16184381538555246534]": { + "$type": "AZ::Render::EditorMeshComponent", + "Id": 16184381538555246534, + "Controller": { + "Configuration": { + "ModelAsset": { + "assetId": { + "guid": "{E14975EF-E676-51A4-B826-3EF59CB645AA}", + "subId": 285127096 + }, + "assetHint": "testdata/objects/cube/cube.azmodel" + } + } + } + }, + "Component_[17962478023087084794]": { + "$type": "SelectionComponent", + "Id": 17962478023087084794 + }, + "Component_[18071675051915092508]": { + "$type": "EditorEntityIconComponent", + "Id": 18071675051915092508 + }, + "Component_[2115498007879087044]": { + "$type": "EditorInspectorComponent", + "Id": 2115498007879087044, + "ComponentOrderEntryArray": [ + { + "ComponentId": 399415038452606756 + }, + { + "ComponentId": 16184381538555246534, + "SortIndex": 1 + }, + { + "ComponentId": 7827190074535394331, + "SortIndex": 2 + } + ] + }, + "Component_[3518973002096080237]": { + "$type": "EditorOnlyEntityComponent", + "Id": 3518973002096080237 + }, + "Component_[399415038452606756]": { + "$type": "{27F1E1A1-8D9D-4C3B-BD3A-AFB9762449C0} TransformComponent", + "Id": 399415038452606756, + "Parent Entity": "ContainerEntity", + "Transform Data": { + "Translate": [ + -37.53056335449219, + -0.00018183141946792603, + 89.95755767822266 + ] + } + }, + "Component_[4564240319609068082]": { + "$type": "EditorEntitySortComponent", + "Id": 4564240319609068082 + }, + "Component_[7827190074535394331]": { + "$type": "EditorMaterialComponent", + "Id": 7827190074535394331, + "Controller": { + "Configuration": { + "materials": [ + { + "Key": { + "materialSlotStableId": 2418540911 + }, + "Value": { + "MaterialAsset": { + "assetId": { + "guid": "{CAF50181-3384-5DF2-9304-C6E48E83C72D}" + }, + "assetHint": "materials/presets/pbr/metal_chrome_polished.azmaterial" + } + } + } + ] + } + } + }, + "Component_[8092226976542590265]": { + "$type": "EditorDisabledCompositionComponent", + "Id": 8092226976542590265 + } + } + }, + "Entity_[2403350996948]": { + "Id": "Entity_[2403350996948]", + "Name": "Entity1", + "Components": { + "Component_[11525365929370623807]": { + "$type": "EditorVisibilityComponent", + "Id": 11525365929370623807 + }, + "Component_[12334620273692642550]": { + "$type": "EditorLockComponent", + "Id": 12334620273692642550 + }, + "Component_[14389735759337977675]": { + "$type": "EditorPendingCompositionComponent", + "Id": 14389735759337977675 + }, + "Component_[16184381538555246534]": { + "$type": "AZ::Render::EditorMeshComponent", + "Id": 16184381538555246534, + "Controller": { + "Configuration": { + "ModelAsset": { + "assetId": { + "guid": "{E14975EF-E676-51A4-B826-3EF59CB645AA}", + "subId": 285127096 + }, + "assetHint": "testdata/objects/cube/cube.azmodel" + } + } + } + }, + "Component_[17962478023087084794]": { + "$type": "SelectionComponent", + "Id": 17962478023087084794 + }, + "Component_[18071675051915092508]": { + "$type": "EditorEntityIconComponent", + "Id": 18071675051915092508 + }, + "Component_[2115498007879087044]": { + "$type": "EditorInspectorComponent", + "Id": 2115498007879087044, + "ComponentOrderEntryArray": [ + { + "ComponentId": 399415038452606756 + }, + { + "ComponentId": 16184381538555246534, + "SortIndex": 1 + }, + { + "ComponentId": 7827190074535394331, + "SortIndex": 2 + } + ] + }, + "Component_[3518973002096080237]": { + "$type": "EditorOnlyEntityComponent", + "Id": 3518973002096080237 + }, + "Component_[399415038452606756]": { + "$type": "{27F1E1A1-8D9D-4C3B-BD3A-AFB9762449C0} TransformComponent", + "Id": 399415038452606756, + "Parent Entity": "ContainerEntity", + "Transform Data": { + "Translate": [ + 37.53014373779297, + -0.00018183141946792603, + 94.40913391113281 + ] + } + }, + "Component_[4564240319609068082]": { + "$type": "EditorEntitySortComponent", + "Id": 4564240319609068082 + }, + "Component_[7827190074535394331]": { + "$type": "EditorMaterialComponent", + "Id": 7827190074535394331, + "Controller": { + "Configuration": { + "materials": [ + { + "Key": { + "materialSlotStableId": 2418540911 + }, + "Value": { + "MaterialAsset": { + "assetId": { + "guid": "{2D054071-BEF7-53C0-A8C9-E4F026BD8364}" + }, + "assetHint": "materials/presets/pbr/metal_copper_matte.azmaterial" + } + } + } + ] + } + } + }, + "Component_[8092226976542590265]": { + "$type": "EditorDisabledCompositionComponent", + "Id": 8092226976542590265 + } + } + }, + "Entity_[2407645964244]": { + "Id": "Entity_[2407645964244]", + "Name": "Entity1", + "Components": { + "Component_[11525365929370623807]": { + "$type": "EditorVisibilityComponent", + "Id": 11525365929370623807 + }, + "Component_[12334620273692642550]": { + "$type": "EditorLockComponent", + "Id": 12334620273692642550 + }, + "Component_[14389735759337977675]": { + "$type": "EditorPendingCompositionComponent", + "Id": 14389735759337977675 + }, + "Component_[16184381538555246534]": { + "$type": "AZ::Render::EditorMeshComponent", + "Id": 16184381538555246534, + "Controller": { + "Configuration": { + "ModelAsset": { + "assetId": { + "guid": "{E14975EF-E676-51A4-B826-3EF59CB645AA}", + "subId": 285127096 + }, + "assetHint": "testdata/objects/cube/cube.azmodel" + } + } + } + }, + "Component_[17962478023087084794]": { + "$type": "SelectionComponent", + "Id": 17962478023087084794 + }, + "Component_[18071675051915092508]": { + "$type": "EditorEntityIconComponent", + "Id": 18071675051915092508 + }, + "Component_[2115498007879087044]": { + "$type": "EditorInspectorComponent", + "Id": 2115498007879087044, + "ComponentOrderEntryArray": [ + { + "ComponentId": 399415038452606756 + }, + { + "ComponentId": 16184381538555246534, + "SortIndex": 1 + }, + { + "ComponentId": 7827190074535394331, + "SortIndex": 2 + } + ] + }, + "Component_[3518973002096080237]": { + "$type": "EditorOnlyEntityComponent", + "Id": 3518973002096080237 + }, + "Component_[399415038452606756]": { + "$type": "{27F1E1A1-8D9D-4C3B-BD3A-AFB9762449C0} TransformComponent", + "Id": 399415038452606756, + "Parent Entity": "ContainerEntity", + "Transform Data": { + "Translate": [ + 32.53014373779297, + -0.00018183141946792603, + 15.057670593261719 + ] + } + }, + "Component_[4564240319609068082]": { + "$type": "EditorEntitySortComponent", + "Id": 4564240319609068082 + }, + "Component_[7827190074535394331]": { + "$type": "EditorMaterialComponent", + "Id": 7827190074535394331, + "Controller": { + "Configuration": { + "materials": [ + { + "Key": { + "materialSlotStableId": 2418540911 + }, + "Value": { + "MaterialAsset": { + "assetId": { + "guid": "{93DF55AE-8D1B-5AD1-A609-05F1BD9F6EA0}" + }, + "assetHint": "materials/presets/pbr/metal_cobalt_polished.azmaterial" + } + } + } + ] + } + } + }, + "Component_[8092226976542590265]": { + "$type": "EditorDisabledCompositionComponent", + "Id": 8092226976542590265 + } + } + }, + "Entity_[2411940931540]": { + "Id": "Entity_[2411940931540]", + "Name": "Entity1", + "Components": { + "Component_[11525365929370623807]": { + "$type": "EditorVisibilityComponent", + "Id": 11525365929370623807 + }, + "Component_[12334620273692642550]": { + "$type": "EditorLockComponent", + "Id": 12334620273692642550 + }, + "Component_[14389735759337977675]": { + "$type": "EditorPendingCompositionComponent", + "Id": 14389735759337977675 + }, + "Component_[16184381538555246534]": { + "$type": "AZ::Render::EditorMeshComponent", + "Id": 16184381538555246534, + "Controller": { + "Configuration": { + "ModelAsset": { + "assetId": { + "guid": "{E14975EF-E676-51A4-B826-3EF59CB645AA}", + "subId": 285127096 + }, + "assetHint": "testdata/objects/cube/cube.azmodel" + } + } + } + }, + "Component_[17962478023087084794]": { + "$type": "SelectionComponent", + "Id": 17962478023087084794 + }, + "Component_[18071675051915092508]": { + "$type": "EditorEntityIconComponent", + "Id": 18071675051915092508 + }, + "Component_[2115498007879087044]": { + "$type": "EditorInspectorComponent", + "Id": 2115498007879087044, + "ComponentOrderEntryArray": [ + { + "ComponentId": 399415038452606756 + }, + { + "ComponentId": 16184381538555246534, + "SortIndex": 1 + }, + { + "ComponentId": 7827190074535394331, + "SortIndex": 2 + } + ] + }, + "Component_[3518973002096080237]": { + "$type": "EditorOnlyEntityComponent", + "Id": 3518973002096080237 + }, + "Component_[399415038452606756]": { + "$type": "{27F1E1A1-8D9D-4C3B-BD3A-AFB9762449C0} TransformComponent", + "Id": 399415038452606756, + "Parent Entity": "ContainerEntity", + "Transform Data": { + "Translate": [ + -37.53056335449219, + -0.00018183141946792603, + 19.50924301147461 + ] + } + }, + "Component_[4564240319609068082]": { + "$type": "EditorEntitySortComponent", + "Id": 4564240319609068082 + }, + "Component_[7827190074535394331]": { + "$type": "EditorMaterialComponent", + "Id": 7827190074535394331, + "Controller": { + "Configuration": { + "materials": [ + { + "Key": { + "materialSlotStableId": 2418540911 + }, + "Value": { + "MaterialAsset": { + "assetId": { + "guid": "{A78EA2FC-688B-5E3A-A7F6-DB413D11D4CF}" + }, + "assetHint": "materials/presets/pbr/metal_chrome_matte.azmaterial" + } + } + } + ] + } + } + }, + "Component_[8092226976542590265]": { + "$type": "EditorDisabledCompositionComponent", + "Id": 8092226976542590265 + } + } + }, + "Entity_[2416235898836]": { + "Id": "Entity_[2416235898836]", + "Name": "Entity1", + "Components": { + "Component_[11525365929370623807]": { + "$type": "EditorVisibilityComponent", + "Id": 11525365929370623807 + }, + "Component_[12334620273692642550]": { + "$type": "EditorLockComponent", + "Id": 12334620273692642550 + }, + "Component_[14389735759337977675]": { + "$type": "EditorPendingCompositionComponent", + "Id": 14389735759337977675 + }, + "Component_[16184381538555246534]": { + "$type": "AZ::Render::EditorMeshComponent", + "Id": 16184381538555246534, + "Controller": { + "Configuration": { + "ModelAsset": { + "assetId": { + "guid": "{E14975EF-E676-51A4-B826-3EF59CB645AA}", + "subId": 285127096 + }, + "assetHint": "testdata/objects/cube/cube.azmodel" + } + } + } + }, + "Component_[17962478023087084794]": { + "$type": "SelectionComponent", + "Id": 17962478023087084794 + }, + "Component_[18071675051915092508]": { + "$type": "EditorEntityIconComponent", + "Id": 18071675051915092508 + }, + "Component_[2115498007879087044]": { + "$type": "EditorInspectorComponent", + "Id": 2115498007879087044, + "ComponentOrderEntryArray": [ + { + "ComponentId": 399415038452606756 + }, + { + "ComponentId": 16184381538555246534, + "SortIndex": 1 + }, + { + "ComponentId": 7827190074535394331, + "SortIndex": 2 + } + ] + }, + "Component_[3518973002096080237]": { + "$type": "EditorOnlyEntityComponent", + "Id": 3518973002096080237 + }, + "Component_[399415038452606756]": { + "$type": "{27F1E1A1-8D9D-4C3B-BD3A-AFB9762449C0} TransformComponent", + "Id": 399415038452606756, + "Parent Entity": "ContainerEntity", + "Transform Data": { + "Translate": [ + -7.5305633544921875, + -0.00018183141946792603, + 54.618019104003906 + ] + } + }, + "Component_[4564240319609068082]": { + "$type": "EditorEntitySortComponent", + "Id": 4564240319609068082 + }, + "Component_[7827190074535394331]": { + "$type": "EditorMaterialComponent", + "Id": 7827190074535394331, + "Controller": { + "Configuration": { + "materials": [ + { + "Key": { + "materialSlotStableId": 2418540911 + }, + "Value": { + "MaterialAsset": { + "assetId": { + "guid": "{DD1E26AE-80FB-5DB6-8786-26D438190A38}" + }, + "assetHint": "materials/presets/pbr/metal_nickel.azmaterial" + } + } + } + ] + } + } + }, + "Component_[8092226976542590265]": { + "$type": "EditorDisabledCompositionComponent", + "Id": 8092226976542590265 + } + } + }, + "Entity_[2420530866132]": { + "Id": "Entity_[2420530866132]", + "Name": "Entity1", + "Components": { + "Component_[11525365929370623807]": { + "$type": "EditorVisibilityComponent", + "Id": 11525365929370623807 + }, + "Component_[12334620273692642550]": { + "$type": "EditorLockComponent", + "Id": 12334620273692642550 + }, + "Component_[14389735759337977675]": { + "$type": "EditorPendingCompositionComponent", + "Id": 14389735759337977675 + }, + "Component_[16184381538555246534]": { + "$type": "AZ::Render::EditorMeshComponent", + "Id": 16184381538555246534, + "Controller": { + "Configuration": { + "ModelAsset": { + "assetId": { + "guid": "{E14975EF-E676-51A4-B826-3EF59CB645AA}", + "subId": 285127096 + }, + "assetHint": "testdata/objects/cube/cube.azmodel" + } + } + } + }, + "Component_[17962478023087084794]": { + "$type": "SelectionComponent", + "Id": 17962478023087084794 + }, + "Component_[18071675051915092508]": { + "$type": "EditorEntityIconComponent", + "Id": 18071675051915092508 + }, + "Component_[2115498007879087044]": { + "$type": "EditorInspectorComponent", + "Id": 2115498007879087044, + "ComponentOrderEntryArray": [ + { + "ComponentId": 399415038452606756 + }, + { + "ComponentId": 16184381538555246534, + "SortIndex": 1 + }, + { + "ComponentId": 7827190074535394331, + "SortIndex": 2 + } + ] + }, + "Component_[3518973002096080237]": { + "$type": "EditorOnlyEntityComponent", + "Id": 3518973002096080237 + }, + "Component_[399415038452606756]": { + "$type": "{27F1E1A1-8D9D-4C3B-BD3A-AFB9762449C0} TransformComponent", + "Id": 399415038452606756, + "Parent Entity": "ContainerEntity", + "Transform Data": { + "Translate": [ + -2.5305633544921875, + -0.00018183141946792603, + 94.40913391113281 + ] + } + }, + "Component_[4564240319609068082]": { + "$type": "EditorEntitySortComponent", + "Id": 4564240319609068082 + }, + "Component_[7827190074535394331]": { + "$type": "EditorMaterialComponent", + "Id": 7827190074535394331, + "Controller": { + "Configuration": { + "materials": [ + { + "Key": { + "materialSlotStableId": 2418540911 + }, + "Value": { + "MaterialAsset": { + "assetId": { + "guid": "{9187B84B-425F-5D11-B4D7-35BBDB0959D1}" + }, + "assetHint": "materials/presets/pbr/metal_palladium_matte.azmaterial" + } + } + } + ] + } + } + }, + "Component_[8092226976542590265]": { + "$type": "EditorDisabledCompositionComponent", + "Id": 8092226976542590265 + } + } + }, + "Entity_[2424825833428]": { + "Id": "Entity_[2424825833428]", + "Name": "Entity1", + "Components": { + "Component_[11525365929370623807]": { + "$type": "EditorVisibilityComponent", + "Id": 11525365929370623807 + }, + "Component_[12334620273692642550]": { + "$type": "EditorLockComponent", + "Id": 12334620273692642550 + }, + "Component_[14389735759337977675]": { + "$type": "EditorPendingCompositionComponent", + "Id": 14389735759337977675 + }, + "Component_[16184381538555246534]": { + "$type": "AZ::Render::EditorMeshComponent", + "Id": 16184381538555246534, + "Controller": { + "Configuration": { + "ModelAsset": { + "assetId": { + "guid": "{E14975EF-E676-51A4-B826-3EF59CB645AA}", + "subId": 285127096 + }, + "assetHint": "testdata/objects/cube/cube.azmodel" + } + } + } + }, + "Component_[17962478023087084794]": { + "$type": "SelectionComponent", + "Id": 17962478023087084794 + }, + "Component_[18071675051915092508]": { + "$type": "EditorEntityIconComponent", + "Id": 18071675051915092508 + }, + "Component_[2115498007879087044]": { + "$type": "EditorInspectorComponent", + "Id": 2115498007879087044, + "ComponentOrderEntryArray": [ + { + "ComponentId": 399415038452606756 + }, + { + "ComponentId": 16184381538555246534, + "SortIndex": 1 + }, + { + "ComponentId": 7827190074535394331, + "SortIndex": 2 + } + ] + }, + "Component_[3518973002096080237]": { + "$type": "EditorOnlyEntityComponent", + "Id": 3518973002096080237 + }, + "Component_[399415038452606756]": { + "$type": "{27F1E1A1-8D9D-4C3B-BD3A-AFB9762449C0} TransformComponent", + "Id": 399415038452606756, + "Parent Entity": "ContainerEntity", + "Transform Data": { + "Translate": [ + 47.53014373779297, + -0.00018183141946792603, + 94.40913391113281 + ] + } + }, + "Component_[4564240319609068082]": { + "$type": "EditorEntitySortComponent", + "Id": 4564240319609068082 + }, + "Component_[7827190074535394331]": { + "$type": "EditorMaterialComponent", + "Id": 7827190074535394331, + "Controller": { + "Configuration": { + "materials": [ + { + "Key": { + "materialSlotStableId": 2418540911 + }, + "Value": { + "MaterialAsset": { + "assetId": { + "guid": "{970148AC-7258-5EC8-9CE7-F4EF93164D93}" + }, + "assetHint": "materials/presets/pbr/metal_iron_matte.azmaterial" + } + } + } + ] + } + } + }, + "Component_[8092226976542590265]": { + "$type": "EditorDisabledCompositionComponent", + "Id": 8092226976542590265 + } + } + }, + "Entity_[2429120800724]": { + "Id": "Entity_[2429120800724]", + "Name": "Entity1", + "Components": { + "Component_[11525365929370623807]": { + "$type": "EditorVisibilityComponent", + "Id": 11525365929370623807 + }, + "Component_[12334620273692642550]": { + "$type": "EditorLockComponent", + "Id": 12334620273692642550 + }, + "Component_[14389735759337977675]": { + "$type": "EditorPendingCompositionComponent", + "Id": 14389735759337977675 + }, + "Component_[16184381538555246534]": { + "$type": "AZ::Render::EditorMeshComponent", + "Id": 16184381538555246534, + "Controller": { + "Configuration": { + "ModelAsset": { + "assetId": { + "guid": "{E14975EF-E676-51A4-B826-3EF59CB645AA}", + "subId": 285127096 + }, + "assetHint": "testdata/objects/cube/cube.azmodel" + } + } + } + }, + "Component_[17962478023087084794]": { + "$type": "SelectionComponent", + "Id": 17962478023087084794 + }, + "Component_[18071675051915092508]": { + "$type": "EditorEntityIconComponent", + "Id": 18071675051915092508 + }, + "Component_[2115498007879087044]": { + "$type": "EditorInspectorComponent", + "Id": 2115498007879087044, + "ComponentOrderEntryArray": [ + { + "ComponentId": 399415038452606756 + }, + { + "ComponentId": 16184381538555246534, + "SortIndex": 1 + }, + { + "ComponentId": 7827190074535394331, + "SortIndex": 2 + } + ] + }, + "Component_[3518973002096080237]": { + "$type": "EditorOnlyEntityComponent", + "Id": 3518973002096080237 + }, + "Component_[399415038452606756]": { + "$type": "{27F1E1A1-8D9D-4C3B-BD3A-AFB9762449C0} TransformComponent", + "Id": 399415038452606756, + "Parent Entity": "ContainerEntity", + "Transform Data": { + "Translate": [ + 2.5301437377929688, + -0.00018183141946792603, + 4.451573371887207 + ] + } + }, + "Component_[4564240319609068082]": { + "$type": "EditorEntitySortComponent", + "Id": 4564240319609068082 + }, + "Component_[7827190074535394331]": { + "$type": "EditorMaterialComponent", + "Id": 7827190074535394331, + "Controller": { + "Configuration": { + "materials": [ + { + "Key": { + "materialSlotStableId": 2418540911 + }, + "Value": { + "MaterialAsset": { + "assetId": { + "guid": "{60D4CA04-A2FE-5AE7-B472-694C38D05183}" + }, + "assetHint": "materials/presets/pbr/metal_platinum_matte.azmaterial" + } + } + } + ] + } + } + }, + "Component_[8092226976542590265]": { + "$type": "EditorDisabledCompositionComponent", + "Id": 8092226976542590265 + } + } + }, + "Entity_[2433415768020]": { + "Id": "Entity_[2433415768020]", + "Name": "Entity1", + "Components": { + "Component_[11525365929370623807]": { + "$type": "EditorVisibilityComponent", + "Id": 11525365929370623807 + }, + "Component_[12334620273692642550]": { + "$type": "EditorLockComponent", + "Id": 12334620273692642550 + }, + "Component_[14389735759337977675]": { + "$type": "EditorPendingCompositionComponent", + "Id": 14389735759337977675 + }, + "Component_[16184381538555246534]": { + "$type": "AZ::Render::EditorMeshComponent", + "Id": 16184381538555246534, + "Controller": { + "Configuration": { + "ModelAsset": { + "assetId": { + "guid": "{E14975EF-E676-51A4-B826-3EF59CB645AA}", + "subId": 285127096 + }, + "assetHint": "testdata/objects/cube/cube.azmodel" + } + } + } + }, + "Component_[17962478023087084794]": { + "$type": "SelectionComponent", + "Id": 17962478023087084794 + }, + "Component_[18071675051915092508]": { + "$type": "EditorEntityIconComponent", + "Id": 18071675051915092508 + }, + "Component_[2115498007879087044]": { + "$type": "EditorInspectorComponent", + "Id": 2115498007879087044, + "ComponentOrderEntryArray": [ + { + "ComponentId": 399415038452606756 + }, + { + "ComponentId": 16184381538555246534, + "SortIndex": 1 + }, + { + "ComponentId": 7827190074535394331, + "SortIndex": 2 + } + ] + }, + "Component_[3518973002096080237]": { + "$type": "EditorOnlyEntityComponent", + "Id": 3518973002096080237 + }, + "Component_[399415038452606756]": { + "$type": "{27F1E1A1-8D9D-4C3B-BD3A-AFB9762449C0} TransformComponent", + "Id": 399415038452606756, + "Parent Entity": "ContainerEntity", + "Transform Data": { + "Translate": [ + 47.53014373779297, + -0.00018183141946792603, + 84.40655517578125 + ] + } + }, + "Component_[4564240319609068082]": { + "$type": "EditorEntitySortComponent", + "Id": 4564240319609068082 + }, + "Component_[7827190074535394331]": { + "$type": "EditorMaterialComponent", + "Id": 7827190074535394331, + "Controller": { + "Configuration": { + "materials": [ + { + "Key": { + "materialSlotStableId": 2418540911 + }, + "Value": { + "MaterialAsset": { + "assetId": { + "guid": "{892EA944-0325-5FA6-94D7-4AB4FC02A0F5}" + }, + "assetHint": "materials/presets/pbr/metal_iron.azmaterial" + } + } + } + ] + } + } + }, + "Component_[8092226976542590265]": { + "$type": "EditorDisabledCompositionComponent", + "Id": 8092226976542590265 + } + } + }, + "Entity_[2437710735316]": { + "Id": "Entity_[2437710735316]", + "Name": "Entity1", + "Components": { + "Component_[11525365929370623807]": { + "$type": "EditorVisibilityComponent", + "Id": 11525365929370623807 + }, + "Component_[12334620273692642550]": { + "$type": "EditorLockComponent", + "Id": 12334620273692642550 + }, + "Component_[14389735759337977675]": { + "$type": "EditorPendingCompositionComponent", + "Id": 14389735759337977675 + }, + "Component_[16184381538555246534]": { + "$type": "AZ::Render::EditorMeshComponent", + "Id": 16184381538555246534, + "Controller": { + "Configuration": { + "ModelAsset": { + "assetId": { + "guid": "{E14975EF-E676-51A4-B826-3EF59CB645AA}", + "subId": 285127096 + }, + "assetHint": "testdata/objects/cube/cube.azmodel" + } + } + } + }, + "Component_[17962478023087084794]": { + "$type": "SelectionComponent", + "Id": 17962478023087084794 + }, + "Component_[18071675051915092508]": { + "$type": "EditorEntityIconComponent", + "Id": 18071675051915092508 + }, + "Component_[2115498007879087044]": { + "$type": "EditorInspectorComponent", + "Id": 2115498007879087044, + "ComponentOrderEntryArray": [ + { + "ComponentId": 399415038452606756 + }, + { + "ComponentId": 16184381538555246534, + "SortIndex": 1 + }, + { + "ComponentId": 7827190074535394331, + "SortIndex": 2 + } + ] + }, + "Component_[3518973002096080237]": { + "$type": "EditorOnlyEntityComponent", + "Id": 3518973002096080237 + }, + "Component_[399415038452606756]": { + "$type": "{27F1E1A1-8D9D-4C3B-BD3A-AFB9762449C0} TransformComponent", + "Id": 399415038452606756, + "Parent Entity": "ContainerEntity", + "Transform Data": { + "Translate": [ + -47.53056335449219, + -0.00018183141946792603, + 19.50924301147461 + ] + } + }, + "Component_[4564240319609068082]": { + "$type": "EditorEntitySortComponent", + "Id": 4564240319609068082 + }, + "Component_[7827190074535394331]": { + "$type": "EditorMaterialComponent", + "Id": 7827190074535394331, + "Controller": { + "Configuration": { + "materials": [ + { + "Key": { + "materialSlotStableId": 2418540911 + }, + "Value": { + "MaterialAsset": { + "assetId": { + "guid": "{549D26B8-881D-569F-AF05-961F36A43F4F}" + }, + "assetHint": "materials/presets/pbr/metal_aluminum_matte.azmaterial" + } + } + } + ] + } + } + }, + "Component_[8092226976542590265]": { + "$type": "EditorDisabledCompositionComponent", + "Id": 8092226976542590265 + } + } + }, + "Entity_[2442005702612]": { + "Id": "Entity_[2442005702612]", + "Name": "Entity1", + "Components": { + "Component_[11525365929370623807]": { + "$type": "EditorVisibilityComponent", + "Id": 11525365929370623807 + }, + "Component_[12334620273692642550]": { + "$type": "EditorLockComponent", + "Id": 12334620273692642550 + }, + "Component_[14389735759337977675]": { + "$type": "EditorPendingCompositionComponent", + "Id": 14389735759337977675 + }, + "Component_[16184381538555246534]": { + "$type": "AZ::Render::EditorMeshComponent", + "Id": 16184381538555246534, + "Controller": { + "Configuration": { + "ModelAsset": { + "assetId": { + "guid": "{E14975EF-E676-51A4-B826-3EF59CB645AA}", + "subId": 285127096 + }, + "assetHint": "testdata/objects/cube/cube.azmodel" + } + } + } + }, + "Component_[17962478023087084794]": { + "$type": "SelectionComponent", + "Id": 17962478023087084794 + }, + "Component_[18071675051915092508]": { + "$type": "EditorEntityIconComponent", + "Id": 18071675051915092508 + }, + "Component_[2115498007879087044]": { + "$type": "EditorInspectorComponent", + "Id": 2115498007879087044, + "ComponentOrderEntryArray": [ + { + "ComponentId": 399415038452606756 + }, + { + "ComponentId": 16184381538555246534, + "SortIndex": 1 + }, + { + "ComponentId": 7827190074535394331, + "SortIndex": 2 + } + ] + }, + "Component_[3518973002096080237]": { + "$type": "EditorOnlyEntityComponent", + "Id": 3518973002096080237 + }, + "Component_[399415038452606756]": { + "$type": "{27F1E1A1-8D9D-4C3B-BD3A-AFB9762449C0} TransformComponent", + "Id": 399415038452606756, + "Parent Entity": "ContainerEntity", + "Transform Data": { + "Translate": [ + 7.530143737792969, + -0.00018183141946792603, + 39.56034851074219 + ] + } + }, + "Component_[4564240319609068082]": { + "$type": "EditorEntitySortComponent", + "Id": 4564240319609068082 + }, + "Component_[7827190074535394331]": { + "$type": "EditorMaterialComponent", + "Id": 7827190074535394331, + "Controller": { + "Configuration": { + "materials": [ + { + "Key": { + "materialSlotStableId": 2418540911 + }, + "Value": { + "MaterialAsset": { + "assetId": { + "guid": "{CDA13277-5EAB-5E2A-93F5-B7003597FBCE}" + }, + "assetHint": "materials/presets/pbr/metal_silver.azmaterial" + } + } + } + ] + } + } + }, + "Component_[8092226976542590265]": { + "$type": "EditorDisabledCompositionComponent", + "Id": 8092226976542590265 + } + } + }, + "Entity_[2446300669908]": { + "Id": "Entity_[2446300669908]", + "Name": "Entity1", + "Components": { + "Component_[11525365929370623807]": { + "$type": "EditorVisibilityComponent", + "Id": 11525365929370623807 + }, + "Component_[12334620273692642550]": { + "$type": "EditorLockComponent", + "Id": 12334620273692642550 + }, + "Component_[14389735759337977675]": { + "$type": "EditorPendingCompositionComponent", + "Id": 14389735759337977675 + }, + "Component_[16184381538555246534]": { + "$type": "AZ::Render::EditorMeshComponent", + "Id": 16184381538555246534, + "Controller": { + "Configuration": { + "ModelAsset": { + "assetId": { + "guid": "{E14975EF-E676-51A4-B826-3EF59CB645AA}", + "subId": 285127096 + }, + "assetHint": "testdata/objects/cube/cube.azmodel" + } + } + } + }, + "Component_[17962478023087084794]": { + "$type": "SelectionComponent", + "Id": 17962478023087084794 + }, + "Component_[18071675051915092508]": { + "$type": "EditorEntityIconComponent", + "Id": 18071675051915092508 + }, + "Component_[2115498007879087044]": { + "$type": "EditorInspectorComponent", + "Id": 2115498007879087044, + "ComponentOrderEntryArray": [ + { + "ComponentId": 399415038452606756 + }, + { + "ComponentId": 16184381538555246534, + "SortIndex": 1 + }, + { + "ComponentId": 7827190074535394331, + "SortIndex": 2 + } + ] + }, + "Component_[3518973002096080237]": { + "$type": "EditorOnlyEntityComponent", + "Id": 3518973002096080237 + }, + "Component_[399415038452606756]": { + "$type": "{27F1E1A1-8D9D-4C3B-BD3A-AFB9762449C0} TransformComponent", + "Id": 399415038452606756, + "Parent Entity": "ContainerEntity", + "Transform Data": { + "Translate": [ + 47.53014373779297, + -0.00018183141946792603, + 105.0152359008789 + ] + } + }, + "Component_[4564240319609068082]": { + "$type": "EditorEntitySortComponent", + "Id": 4564240319609068082 + }, + "Component_[7827190074535394331]": { + "$type": "EditorMaterialComponent", + "Id": 7827190074535394331, + "Controller": { + "Configuration": { + "materials": [ + { + "Key": { + "materialSlotStableId": 2418540911 + }, + "Value": { + "MaterialAsset": { + "assetId": { + "guid": "{A7F03135-ECAD-5440-99DB-E84ABA3D50DA}" + }, + "assetHint": "materials/presets/pbr/metal_iron_polished.azmaterial" + } + } + } + ] + } + } + }, + "Component_[8092226976542590265]": { + "$type": "EditorDisabledCompositionComponent", + "Id": 8092226976542590265 + } + } + }, + "Entity_[2450595637204]": { + "Id": "Entity_[2450595637204]", + "Name": "Entity1", + "Components": { + "Component_[11525365929370623807]": { + "$type": "EditorVisibilityComponent", + "Id": 11525365929370623807 + }, + "Component_[12334620273692642550]": { + "$type": "EditorLockComponent", + "Id": 12334620273692642550 + }, + "Component_[14389735759337977675]": { + "$type": "EditorPendingCompositionComponent", + "Id": 14389735759337977675 + }, + "Component_[16184381538555246534]": { + "$type": "AZ::Render::EditorMeshComponent", + "Id": 16184381538555246534, + "Controller": { + "Configuration": { + "ModelAsset": { + "assetId": { + "guid": "{E14975EF-E676-51A4-B826-3EF59CB645AA}", + "subId": 285127096 + }, + "assetHint": "testdata/objects/cube/cube.azmodel" + } + } + } + }, + "Component_[17962478023087084794]": { + "$type": "SelectionComponent", + "Id": 17962478023087084794 + }, + "Component_[18071675051915092508]": { + "$type": "EditorEntityIconComponent", + "Id": 18071675051915092508 + }, + "Component_[2115498007879087044]": { + "$type": "EditorInspectorComponent", + "Id": 2115498007879087044, + "ComponentOrderEntryArray": [ + { + "ComponentId": 399415038452606756 + }, + { + "ComponentId": 16184381538555246534, + "SortIndex": 1 + }, + { + "ComponentId": 7827190074535394331, + "SortIndex": 2 + } + ] + }, + "Component_[3518973002096080237]": { + "$type": "EditorOnlyEntityComponent", + "Id": 3518973002096080237 + }, + "Component_[399415038452606756]": { + "$type": "{27F1E1A1-8D9D-4C3B-BD3A-AFB9762449C0} TransformComponent", + "Id": 399415038452606756, + "Parent Entity": "ContainerEntity", + "Transform Data": { + "Translate": [ + 17.53014373779297, + -0.00018183141946792603, + 94.40913391113281 + ] + } + }, + "Component_[4564240319609068082]": { + "$type": "EditorEntitySortComponent", + "Id": 4564240319609068082 + }, + "Component_[7827190074535394331]": { + "$type": "EditorMaterialComponent", + "Id": 7827190074535394331, + "Controller": { + "Configuration": { + "materials": [ + { + "Key": {}, + "Value": { + "MaterialAsset": { + "assetId": { + "guid": "{721188E0-B7CC-5D06-8D5D-39AF8ABF2EF9}" + }, + "assetHint": "materials/presets/pbr/metal_titanium.azmaterial" + } + } + }, + { + "Key": { + "materialSlotStableId": 2418540911 + }, + "Value": { + "MaterialAsset": { + "assetId": { + "guid": "{549D26B8-881D-569F-AF05-961F36A43F4F}" + }, + "assetHint": "materials/presets/pbr/metal_aluminum_matte.azmaterial" + } + } + } + ] + } + } + }, + "Component_[8092226976542590265]": { + "$type": "EditorDisabledCompositionComponent", + "Id": 8092226976542590265 + } + } + }, + "Entity_[2454890604500]": { + "Id": "Entity_[2454890604500]", + "Name": "Entity1", + "Components": { + "Component_[11525365929370623807]": { + "$type": "EditorVisibilityComponent", + "Id": 11525365929370623807 + }, + "Component_[12334620273692642550]": { + "$type": "EditorLockComponent", + "Id": 12334620273692642550 + }, + "Component_[14389735759337977675]": { + "$type": "EditorPendingCompositionComponent", + "Id": 14389735759337977675 + }, + "Component_[16184381538555246534]": { + "$type": "AZ::Render::EditorMeshComponent", + "Id": 16184381538555246534, + "Controller": { + "Configuration": { + "ModelAsset": { + "assetId": { + "guid": "{E14975EF-E676-51A4-B826-3EF59CB645AA}", + "subId": 285127096 + }, + "assetHint": "testdata/objects/cube/cube.azmodel" + } + } + } + }, + "Component_[17962478023087084794]": { + "$type": "SelectionComponent", + "Id": 17962478023087084794 + }, + "Component_[18071675051915092508]": { + "$type": "EditorEntityIconComponent", + "Id": 18071675051915092508 + }, + "Component_[2115498007879087044]": { + "$type": "EditorInspectorComponent", + "Id": 2115498007879087044, + "ComponentOrderEntryArray": [ + { + "ComponentId": 399415038452606756 + }, + { + "ComponentId": 16184381538555246534, + "SortIndex": 1 + }, + { + "ComponentId": 7827190074535394331, + "SortIndex": 2 + } + ] + }, + "Component_[3518973002096080237]": { + "$type": "EditorOnlyEntityComponent", + "Id": 3518973002096080237 + }, + "Component_[399415038452606756]": { + "$type": "{27F1E1A1-8D9D-4C3B-BD3A-AFB9762449C0} TransformComponent", + "Id": 399415038452606756, + "Parent Entity": "ContainerEntity", + "Transform Data": { + "Translate": [ + -2.5305633544921875, + -0.00018183141946792603, + 45.14218521118164 + ] + } + }, + "Component_[4564240319609068082]": { + "$type": "EditorEntitySortComponent", + "Id": 4564240319609068082 + }, + "Component_[7827190074535394331]": { + "$type": "EditorMaterialComponent", + "Id": 7827190074535394331, + "Controller": { + "Configuration": { + "materials": [ + { + "Key": { + "materialSlotStableId": 2418540911 + }, + "Value": { + "MaterialAsset": { + "assetId": { + "guid": "{D0E9960A-4B31-5136-BAC6-5482B203D3B4}" + }, + "assetHint": "materials/presets/pbr/metal_palladium_polished.azmaterial" + } + } + } + ] + } + } + }, + "Component_[8092226976542590265]": { + "$type": "EditorDisabledCompositionComponent", + "Id": 8092226976542590265 + } + } + }, + "Entity_[2459185571796]": { + "Id": "Entity_[2459185571796]", + "Name": "Entity1", + "Components": { + "Component_[11525365929370623807]": { + "$type": "EditorVisibilityComponent", + "Id": 11525365929370623807 + }, + "Component_[12334620273692642550]": { + "$type": "EditorLockComponent", + "Id": 12334620273692642550 + }, + "Component_[14389735759337977675]": { + "$type": "EditorPendingCompositionComponent", + "Id": 14389735759337977675 + }, + "Component_[16184381538555246534]": { + "$type": "AZ::Render::EditorMeshComponent", + "Id": 16184381538555246534, + "Controller": { + "Configuration": { + "ModelAsset": { + "assetId": { + "guid": "{E14975EF-E676-51A4-B826-3EF59CB645AA}", + "subId": 285127096 + }, + "assetHint": "testdata/objects/cube/cube.azmodel" + } + } + } + }, + "Component_[17962478023087084794]": { + "$type": "SelectionComponent", + "Id": 17962478023087084794 + }, + "Component_[18071675051915092508]": { + "$type": "EditorEntityIconComponent", + "Id": 18071675051915092508 + }, + "Component_[2115498007879087044]": { + "$type": "EditorInspectorComponent", + "Id": 2115498007879087044, + "ComponentOrderEntryArray": [ + { + "ComponentId": 399415038452606756 + }, + { + "ComponentId": 16184381538555246534, + "SortIndex": 1 + }, + { + "ComponentId": 7827190074535394331, + "SortIndex": 2 + } + ] + }, + "Component_[3518973002096080237]": { + "$type": "EditorOnlyEntityComponent", + "Id": 3518973002096080237 + }, + "Component_[399415038452606756]": { + "$type": "{27F1E1A1-8D9D-4C3B-BD3A-AFB9762449C0} TransformComponent", + "Id": 399415038452606756, + "Parent Entity": "ContainerEntity", + "Transform Data": { + "Translate": [ + -37.53056335449219, + -0.00018183141946792603, + 9.475835800170898 + ] + } + }, + "Component_[4564240319609068082]": { + "$type": "EditorEntitySortComponent", + "Id": 4564240319609068082 + }, + "Component_[7827190074535394331]": { + "$type": "EditorMaterialComponent", + "Id": 7827190074535394331, + "Controller": { + "Configuration": { + "materials": [ + { + "Key": { + "materialSlotStableId": 2418540911 + }, + "Value": { + "MaterialAsset": { + "assetId": { + "guid": "{B7C712DC-4839-58BB-B522-A4F120084CF5}" + }, + "assetHint": "materials/presets/pbr/metal_chrome.azmaterial" + } + } + } + ] + } + } + }, + "Component_[8092226976542590265]": { + "$type": "EditorDisabledCompositionComponent", + "Id": 8092226976542590265 + } + } + }, + "Entity_[2463480539092]": { + "Id": "Entity_[2463480539092]", + "Name": "Entity1", + "Components": { + "Component_[11525365929370623807]": { + "$type": "EditorVisibilityComponent", + "Id": 11525365929370623807 + }, + "Component_[12334620273692642550]": { + "$type": "EditorLockComponent", + "Id": 12334620273692642550 + }, + "Component_[14389735759337977675]": { + "$type": "EditorPendingCompositionComponent", + "Id": 14389735759337977675 + }, + "Component_[16184381538555246534]": { + "$type": "AZ::Render::EditorMeshComponent", + "Id": 16184381538555246534, + "Controller": { + "Configuration": { + "ModelAsset": { + "assetId": { + "guid": "{E14975EF-E676-51A4-B826-3EF59CB645AA}", + "subId": 285127096 + }, + "assetHint": "testdata/objects/cube/cube.azmodel" + } + } + } + }, + "Component_[17962478023087084794]": { + "$type": "SelectionComponent", + "Id": 17962478023087084794 + }, + "Component_[18071675051915092508]": { + "$type": "EditorEntityIconComponent", + "Id": 18071675051915092508 + }, + "Component_[2115498007879087044]": { + "$type": "EditorInspectorComponent", + "Id": 2115498007879087044, + "ComponentOrderEntryArray": [ + { + "ComponentId": 399415038452606756 + }, + { + "ComponentId": 16184381538555246534, + "SortIndex": 1 + }, + { + "ComponentId": 7827190074535394331, + "SortIndex": 2 + } + ] + }, + "Component_[3518973002096080237]": { + "$type": "EditorOnlyEntityComponent", + "Id": 3518973002096080237 + }, + "Component_[399415038452606756]": { + "$type": "{27F1E1A1-8D9D-4C3B-BD3A-AFB9762449C0} TransformComponent", + "Id": 399415038452606756, + "Parent Entity": "ContainerEntity", + "Transform Data": { + "Translate": [ + 17.53014373779297, + -0.00018183141946792603, + 74.93071746826172 + ] + } + }, + "Component_[4564240319609068082]": { + "$type": "EditorEntitySortComponent", + "Id": 4564240319609068082 + }, + "Component_[7827190074535394331]": { + "$type": "EditorMaterialComponent", + "Id": 7827190074535394331, + "Controller": { + "Configuration": { + "materials": [ + { + "Key": {}, + "Value": { + "MaterialAsset": { + "assetId": { + "guid": "{721188E0-B7CC-5D06-8D5D-39AF8ABF2EF9}" + }, + "assetHint": "materials/presets/pbr/metal_titanium.azmaterial" + } + } + }, + { + "Key": { + "materialSlotStableId": 2418540911 + }, + "Value": { + "MaterialAsset": { + "assetId": { + "guid": "{64C1F6A6-6BDA-551A-BE56-1829E5913278}" + }, + "assetHint": "materials/presets/pbr/metal_aluminum_polished.azmaterial" + } + } + } + ] + } + } + }, + "Component_[8092226976542590265]": { + "$type": "EditorDisabledCompositionComponent", + "Id": 8092226976542590265 + } + } + }, + "Entity_[2467775506388]": { + "Id": "Entity_[2467775506388]", + "Name": "Entity1", + "Components": { + "Component_[11525365929370623807]": { + "$type": "EditorVisibilityComponent", + "Id": 11525365929370623807 + }, + "Component_[12334620273692642550]": { + "$type": "EditorLockComponent", + "Id": 12334620273692642550 + }, + "Component_[14389735759337977675]": { + "$type": "EditorPendingCompositionComponent", + "Id": 14389735759337977675 + }, + "Component_[16184381538555246534]": { + "$type": "AZ::Render::EditorMeshComponent", + "Id": 16184381538555246534, + "Controller": { + "Configuration": { + "ModelAsset": { + "assetId": { + "guid": "{E14975EF-E676-51A4-B826-3EF59CB645AA}", + "subId": 285127096 + }, + "assetHint": "testdata/objects/cube/cube.azmodel" + } + } + } + }, + "Component_[17962478023087084794]": { + "$type": "SelectionComponent", + "Id": 17962478023087084794 + }, + "Component_[18071675051915092508]": { + "$type": "EditorEntityIconComponent", + "Id": 18071675051915092508 + }, + "Component_[2115498007879087044]": { + "$type": "EditorInspectorComponent", + "Id": 2115498007879087044, + "ComponentOrderEntryArray": [ + { + "ComponentId": 399415038452606756 + }, + { + "ComponentId": 16184381538555246534, + "SortIndex": 1 + }, + { + "ComponentId": 7827190074535394331, + "SortIndex": 2 + } + ] + }, + "Component_[3518973002096080237]": { + "$type": "EditorOnlyEntityComponent", + "Id": 3518973002096080237 + }, + "Component_[399415038452606756]": { + "$type": "{27F1E1A1-8D9D-4C3B-BD3A-AFB9762449C0} TransformComponent", + "Id": 399415038452606756, + "Parent Entity": "ContainerEntity", + "Transform Data": { + "Translate": [ + 2.5301437377929688, + -0.00018183141946792603, + 30.08451271057129 + ] + } + }, + "Component_[4564240319609068082]": { + "$type": "EditorEntitySortComponent", + "Id": 4564240319609068082 + }, + "Component_[7827190074535394331]": { + "$type": "EditorMaterialComponent", + "Id": 7827190074535394331, + "Controller": { + "Configuration": { + "materials": [ + { + "Key": { + "materialSlotStableId": 2418540911 + }, + "Value": { + "MaterialAsset": { + "assetId": { + "guid": "{79419183-FFCE-5A89-AA16-C2789D81AF75}" + }, + "assetHint": "materials/presets/pbr/metal_platinum_polished.azmaterial" + } + } + } + ] + } + } + }, + "Component_[8092226976542590265]": { + "$type": "EditorDisabledCompositionComponent", + "Id": 8092226976542590265 + } + } + }, + "Entity_[2472070473684]": { + "Id": "Entity_[2472070473684]", + "Name": "Entity1", + "Components": { + "Component_[11525365929370623807]": { + "$type": "EditorVisibilityComponent", + "Id": 11525365929370623807 + }, + "Component_[12334620273692642550]": { + "$type": "EditorLockComponent", + "Id": 12334620273692642550 + }, + "Component_[14389735759337977675]": { + "$type": "EditorPendingCompositionComponent", + "Id": 14389735759337977675 + }, + "Component_[16184381538555246534]": { + "$type": "AZ::Render::EditorMeshComponent", + "Id": 16184381538555246534, + "Controller": { + "Configuration": { + "ModelAsset": { + "assetId": { + "guid": "{E14975EF-E676-51A4-B826-3EF59CB645AA}", + "subId": 285127096 + }, + "assetHint": "testdata/objects/cube/cube.azmodel" + } + } + } + }, + "Component_[17962478023087084794]": { + "$type": "SelectionComponent", + "Id": 17962478023087084794 + }, + "Component_[18071675051915092508]": { + "$type": "EditorEntityIconComponent", + "Id": 18071675051915092508 + }, + "Component_[2115498007879087044]": { + "$type": "EditorInspectorComponent", + "Id": 2115498007879087044, + "ComponentOrderEntryArray": [ + { + "ComponentId": 399415038452606756 + }, + { + "ComponentId": 16184381538555246534, + "SortIndex": 1 + }, + { + "ComponentId": 7827190074535394331, + "SortIndex": 2 + } + ] + }, + "Component_[3518973002096080237]": { + "$type": "EditorOnlyEntityComponent", + "Id": 3518973002096080237 + }, + "Component_[399415038452606756]": { + "$type": "{27F1E1A1-8D9D-4C3B-BD3A-AFB9762449C0} TransformComponent", + "Id": 399415038452606756, + "Parent Entity": "ContainerEntity", + "Transform Data": { + "Translate": [ + 7.530143737792969, + -0.00018183141946792603, + 9.475835800170898 + ] + } + }, + "Component_[4564240319609068082]": { + "$type": "EditorEntitySortComponent", + "Id": 4564240319609068082 + }, + "Component_[7827190074535394331]": { + "$type": "EditorMaterialComponent", + "Id": 7827190074535394331, + "Controller": { + "Configuration": { + "materials": [ + { + "Key": { + "materialSlotStableId": 2418540911 + }, + "Value": { + "MaterialAsset": { + "assetId": { + "guid": "{CDA13277-5EAB-5E2A-93F5-B7003597FBCE}" + }, + "assetHint": "materials/presets/pbr/metal_silver.azmaterial" + } + } + } + ] + } + } + }, + "Component_[8092226976542590265]": { + "$type": "EditorDisabledCompositionComponent", + "Id": 8092226976542590265 + } + } + }, + "Entity_[2476365440980]": { + "Id": "Entity_[2476365440980]", + "Name": "Entity1", + "Components": { + "Component_[11525365929370623807]": { + "$type": "EditorVisibilityComponent", + "Id": 11525365929370623807 + }, + "Component_[12334620273692642550]": { + "$type": "EditorLockComponent", + "Id": 12334620273692642550 + }, + "Component_[14389735759337977675]": { + "$type": "EditorPendingCompositionComponent", + "Id": 14389735759337977675 + }, + "Component_[16184381538555246534]": { + "$type": "AZ::Render::EditorMeshComponent", + "Id": 16184381538555246534, + "Controller": { + "Configuration": { + "ModelAsset": { + "assetId": { + "guid": "{E14975EF-E676-51A4-B826-3EF59CB645AA}", + "subId": 285127096 + }, + "assetHint": "testdata/objects/cube/cube.azmodel" + } + } + } + }, + "Component_[17962478023087084794]": { + "$type": "SelectionComponent", + "Id": 17962478023087084794 + }, + "Component_[18071675051915092508]": { + "$type": "EditorEntityIconComponent", + "Id": 18071675051915092508 + }, + "Component_[2115498007879087044]": { + "$type": "EditorInspectorComponent", + "Id": 2115498007879087044, + "ComponentOrderEntryArray": [ + { + "ComponentId": 399415038452606756 + }, + { + "ComponentId": 16184381538555246534, + "SortIndex": 1 + }, + { + "ComponentId": 7827190074535394331, + "SortIndex": 2 + } + ] + }, + "Component_[3518973002096080237]": { + "$type": "EditorOnlyEntityComponent", + "Id": 3518973002096080237 + }, + "Component_[399415038452606756]": { + "$type": "{27F1E1A1-8D9D-4C3B-BD3A-AFB9762449C0} TransformComponent", + "Id": 399415038452606756, + "Parent Entity": "ContainerEntity", + "Transform Data": { + "Translate": [ + -47.53056335449219, + -0.00018183141946792603, + 94.40913391113281 + ] + } + }, + "Component_[4564240319609068082]": { + "$type": "EditorEntitySortComponent", + "Id": 4564240319609068082 + }, + "Component_[7827190074535394331]": { + "$type": "EditorMaterialComponent", + "Id": 7827190074535394331, + "Controller": { + "Configuration": { + "materials": [ + { + "Key": { + "materialSlotStableId": 2418540911 + }, + "Value": { + "MaterialAsset": { + "assetId": { + "guid": "{549D26B8-881D-569F-AF05-961F36A43F4F}" + }, + "assetHint": "materials/presets/pbr/metal_aluminum_matte.azmaterial" + } + } + } + ] + } + } + }, + "Component_[8092226976542590265]": { + "$type": "EditorDisabledCompositionComponent", + "Id": 8092226976542590265 + } + } + }, + "Entity_[2480660408276]": { + "Id": "Entity_[2480660408276]", + "Name": "Entity1", + "Components": { + "Component_[11525365929370623807]": { + "$type": "EditorVisibilityComponent", + "Id": 11525365929370623807 + }, + "Component_[12334620273692642550]": { + "$type": "EditorLockComponent", + "Id": 12334620273692642550 + }, + "Component_[14389735759337977675]": { + "$type": "EditorPendingCompositionComponent", + "Id": 14389735759337977675 + }, + "Component_[16184381538555246534]": { + "$type": "AZ::Render::EditorMeshComponent", + "Id": 16184381538555246534, + "Controller": { + "Configuration": { + "ModelAsset": { + "assetId": { + "guid": "{E14975EF-E676-51A4-B826-3EF59CB645AA}", + "subId": 285127096 + }, + "assetHint": "testdata/objects/cube/cube.azmodel" + } + } + } + }, + "Component_[17962478023087084794]": { + "$type": "SelectionComponent", + "Id": 17962478023087084794 + }, + "Component_[18071675051915092508]": { + "$type": "EditorEntityIconComponent", + "Id": 18071675051915092508 + }, + "Component_[2115498007879087044]": { + "$type": "EditorInspectorComponent", + "Id": 2115498007879087044, + "ComponentOrderEntryArray": [ + { + "ComponentId": 399415038452606756 + }, + { + "ComponentId": 16184381538555246534, + "SortIndex": 1 + }, + { + "ComponentId": 7827190074535394331, + "SortIndex": 2 + } + ] + }, + "Component_[3518973002096080237]": { + "$type": "EditorOnlyEntityComponent", + "Id": 3518973002096080237 + }, + "Component_[399415038452606756]": { + "$type": "{27F1E1A1-8D9D-4C3B-BD3A-AFB9762449C0} TransformComponent", + "Id": 399415038452606756, + "Parent Entity": "ContainerEntity", + "Transform Data": { + "Translate": [ + -12.530563354492188, + -0.00018183141946792603, + 69.34888458251953 + ] + } + }, + "Component_[4564240319609068082]": { + "$type": "EditorEntitySortComponent", + "Id": 4564240319609068082 + }, + "Component_[7827190074535394331]": { + "$type": "EditorMaterialComponent", + "Id": 7827190074535394331, + "Controller": { + "Configuration": { + "materials": [ + { + "Key": { + "materialSlotStableId": 2418540911 + }, + "Value": { + "MaterialAsset": { + "assetId": { + "guid": "{F2AD0EBF-7137-58D1-9991-9552FAD41B19}" + }, + "assetHint": "materials/presets/pbr/metal_mercury.azmaterial" + } + } + } + ] + } + } + }, + "Component_[8092226976542590265]": { + "$type": "EditorDisabledCompositionComponent", + "Id": 8092226976542590265 + } + } + }, + "Entity_[2484955375572]": { + "Id": "Entity_[2484955375572]", + "Name": "Entity1", + "Components": { + "Component_[11525365929370623807]": { + "$type": "EditorVisibilityComponent", + "Id": 11525365929370623807 + }, + "Component_[12334620273692642550]": { + "$type": "EditorLockComponent", + "Id": 12334620273692642550 + }, + "Component_[14389735759337977675]": { + "$type": "EditorPendingCompositionComponent", + "Id": 14389735759337977675 + }, + "Component_[16184381538555246534]": { + "$type": "AZ::Render::EditorMeshComponent", + "Id": 16184381538555246534, + "Controller": { + "Configuration": { + "ModelAsset": { + "assetId": { + "guid": "{E14975EF-E676-51A4-B826-3EF59CB645AA}", + "subId": 285127096 + }, + "assetHint": "testdata/objects/cube/cube.azmodel" + } + } + } + }, + "Component_[17962478023087084794]": { + "$type": "SelectionComponent", + "Id": 17962478023087084794 + }, + "Component_[18071675051915092508]": { + "$type": "EditorEntityIconComponent", + "Id": 18071675051915092508 + }, + "Component_[2115498007879087044]": { + "$type": "EditorInspectorComponent", + "Id": 2115498007879087044, + "ComponentOrderEntryArray": [ + { + "ComponentId": 399415038452606756 + }, + { + "ComponentId": 16184381538555246534, + "SortIndex": 1 + }, + { + "ComponentId": 7827190074535394331, + "SortIndex": 2 + } + ] + }, + "Component_[3518973002096080237]": { + "$type": "EditorOnlyEntityComponent", + "Id": 3518973002096080237 + }, + "Component_[399415038452606756]": { + "$type": "{27F1E1A1-8D9D-4C3B-BD3A-AFB9762449C0} TransformComponent", + "Id": 399415038452606756, + "Parent Entity": "ContainerEntity", + "Transform Data": { + "Translate": [ + -27.530563354492188, + -0.00018183141946792603, + 49.593753814697266 + ] + } + }, + "Component_[4564240319609068082]": { + "$type": "EditorEntitySortComponent", + "Id": 4564240319609068082 + }, + "Component_[7827190074535394331]": { + "$type": "EditorMaterialComponent", + "Id": 7827190074535394331, + "Controller": { + "Configuration": { + "materials": [ + { + "Key": { + "materialSlotStableId": 2418540911 + }, + "Value": { + "MaterialAsset": { + "assetId": { + "guid": "{2D054071-BEF7-53C0-A8C9-E4F026BD8364}" + }, + "assetHint": "materials/presets/pbr/metal_copper_matte.azmaterial" + } + } + } + ] + } + } + }, + "Component_[8092226976542590265]": { + "$type": "EditorDisabledCompositionComponent", + "Id": 8092226976542590265 + } + } + }, + "Entity_[2489250342868]": { + "Id": "Entity_[2489250342868]", + "Name": "Entity1", + "Components": { + "Component_[11525365929370623807]": { + "$type": "EditorVisibilityComponent", + "Id": 11525365929370623807 + }, + "Component_[12334620273692642550]": { + "$type": "EditorLockComponent", + "Id": 12334620273692642550 + }, + "Component_[14389735759337977675]": { + "$type": "EditorPendingCompositionComponent", + "Id": 14389735759337977675 + }, + "Component_[16184381538555246534]": { + "$type": "AZ::Render::EditorMeshComponent", + "Id": 16184381538555246534, + "Controller": { + "Configuration": { + "ModelAsset": { + "assetId": { + "guid": "{E14975EF-E676-51A4-B826-3EF59CB645AA}", + "subId": 285127096 + }, + "assetHint": "testdata/objects/cube/cube.azmodel" + } + } + } + }, + "Component_[17962478023087084794]": { + "$type": "SelectionComponent", + "Id": 17962478023087084794 + }, + "Component_[18071675051915092508]": { + "$type": "EditorEntityIconComponent", + "Id": 18071675051915092508 + }, + "Component_[2115498007879087044]": { + "$type": "EditorInspectorComponent", + "Id": 2115498007879087044, + "ComponentOrderEntryArray": [ + { + "ComponentId": 399415038452606756 + }, + { + "ComponentId": 16184381538555246534, + "SortIndex": 1 + }, + { + "ComponentId": 7827190074535394331, + "SortIndex": 2 + } + ] + }, + "Component_[3518973002096080237]": { + "$type": "EditorOnlyEntityComponent", + "Id": 3518973002096080237 + }, + "Component_[399415038452606756]": { + "$type": "{27F1E1A1-8D9D-4C3B-BD3A-AFB9762449C0} TransformComponent", + "Id": 399415038452606756, + "Parent Entity": "ContainerEntity", + "Transform Data": { + "Translate": [ + -22.530563354492188, + -0.00018183141946792603, + 0.0 + ] + } + }, + "Component_[4564240319609068082]": { + "$type": "EditorEntitySortComponent", + "Id": 4564240319609068082 + }, + "Component_[7827190074535394331]": { + "$type": "EditorMaterialComponent", + "Id": 7827190074535394331, + "Controller": { + "Configuration": { + "materials": [ + { + "Key": { + "materialSlotStableId": 2418540911 + }, + "Value": { + "MaterialAsset": { + "assetId": { + "guid": "{FB4657EB-FB3A-5EC3-A772-DC36D6F733C3}" + }, + "assetHint": "materials/presets/pbr/metal_gold_polished.azmaterial" + } + } + } + ] + } + } + }, + "Component_[8092226976542590265]": { + "$type": "EditorDisabledCompositionComponent", + "Id": 8092226976542590265 + } + } + }, + "Entity_[2493545310164]": { + "Id": "Entity_[2493545310164]", + "Name": "Entity1", + "Components": { + "Component_[11525365929370623807]": { + "$type": "EditorVisibilityComponent", + "Id": 11525365929370623807 + }, + "Component_[12334620273692642550]": { + "$type": "EditorLockComponent", + "Id": 12334620273692642550 + }, + "Component_[14389735759337977675]": { + "$type": "EditorPendingCompositionComponent", + "Id": 14389735759337977675 + }, + "Component_[16184381538555246534]": { + "$type": "AZ::Render::EditorMeshComponent", + "Id": 16184381538555246534, + "Controller": { + "Configuration": { + "ModelAsset": { + "assetId": { + "guid": "{E14975EF-E676-51A4-B826-3EF59CB645AA}", + "subId": 285127096 + }, + "assetHint": "testdata/objects/cube/cube.azmodel" + } + } + } + }, + "Component_[17962478023087084794]": { + "$type": "SelectionComponent", + "Id": 17962478023087084794 + }, + "Component_[18071675051915092508]": { + "$type": "EditorEntityIconComponent", + "Id": 18071675051915092508 + }, + "Component_[2115498007879087044]": { + "$type": "EditorInspectorComponent", + "Id": 2115498007879087044, + "ComponentOrderEntryArray": [ + { + "ComponentId": 399415038452606756 + }, + { + "ComponentId": 16184381538555246534, + "SortIndex": 1 + }, + { + "ComponentId": 7827190074535394331, + "SortIndex": 2 + } + ] + }, + "Component_[3518973002096080237]": { + "$type": "EditorOnlyEntityComponent", + "Id": 3518973002096080237 + }, + "Component_[399415038452606756]": { + "$type": "{27F1E1A1-8D9D-4C3B-BD3A-AFB9762449C0} TransformComponent", + "Id": 399415038452606756, + "Parent Entity": "ContainerEntity", + "Transform Data": { + "Translate": [ + -32.53056335449219, + -0.00018183141946792603, + 99.43339538574219 + ] + } + }, + "Component_[4564240319609068082]": { + "$type": "EditorEntitySortComponent", + "Id": 4564240319609068082 + }, + "Component_[7827190074535394331]": { + "$type": "EditorMaterialComponent", + "Id": 7827190074535394331, + "Controller": { + "Configuration": { + "materials": [ + { + "Key": { + "materialSlotStableId": 2418540911 + }, + "Value": { + "MaterialAsset": { + "assetId": { + "guid": "{99976D73-6248-5D66-AD15-E8F52B0AFE36}" + }, + "assetHint": "materials/presets/pbr/metal_cobalt.azmaterial" + } + } + } + ] + } + } + }, + "Component_[8092226976542590265]": { + "$type": "EditorDisabledCompositionComponent", + "Id": 8092226976542590265 + } + } + }, + "Entity_[2497840277460]": { + "Id": "Entity_[2497840277460]", + "Name": "Entity1", + "Components": { + "Component_[11525365929370623807]": { + "$type": "EditorVisibilityComponent", + "Id": 11525365929370623807 + }, + "Component_[12334620273692642550]": { + "$type": "EditorLockComponent", + "Id": 12334620273692642550 + }, + "Component_[14389735759337977675]": { + "$type": "EditorPendingCompositionComponent", + "Id": 14389735759337977675 + }, + "Component_[16184381538555246534]": { + "$type": "AZ::Render::EditorMeshComponent", + "Id": 16184381538555246534, + "Controller": { + "Configuration": { + "ModelAsset": { + "assetId": { + "guid": "{E14975EF-E676-51A4-B826-3EF59CB645AA}", + "subId": 285127096 + }, + "assetHint": "testdata/objects/cube/cube.azmodel" + } + } + } + }, + "Component_[17962478023087084794]": { + "$type": "SelectionComponent", + "Id": 17962478023087084794 + }, + "Component_[18071675051915092508]": { + "$type": "EditorEntityIconComponent", + "Id": 18071675051915092508 + }, + "Component_[2115498007879087044]": { + "$type": "EditorInspectorComponent", + "Id": 2115498007879087044, + "ComponentOrderEntryArray": [ + { + "ComponentId": 399415038452606756 + }, + { + "ComponentId": 16184381538555246534, + "SortIndex": 1 + }, + { + "ComponentId": 7827190074535394331, + "SortIndex": 2 + } + ] + }, + "Component_[3518973002096080237]": { + "$type": "EditorOnlyEntityComponent", + "Id": 3518973002096080237 + }, + "Component_[399415038452606756]": { + "$type": "{27F1E1A1-8D9D-4C3B-BD3A-AFB9762449C0} TransformComponent", + "Id": 399415038452606756, + "Parent Entity": "ContainerEntity", + "Transform Data": { + "Translate": [ + 17.53014373779297, + -0.00018183141946792603, + 64.32462310791016 + ] + } + }, + "Component_[4564240319609068082]": { + "$type": "EditorEntitySortComponent", + "Id": 4564240319609068082 + }, + "Component_[7827190074535394331]": { + "$type": "EditorMaterialComponent", + "Id": 7827190074535394331, + "Controller": { + "Configuration": { + "materials": [ + { + "Key": {}, + "Value": { + "MaterialAsset": { + "assetId": { + "guid": "{721188E0-B7CC-5D06-8D5D-39AF8ABF2EF9}" + }, + "assetHint": "materials/presets/pbr/metal_titanium.azmaterial" + } + } + }, + { + "Key": { + "materialSlotStableId": 2418540911 + }, + "Value": { + "MaterialAsset": { + "assetId": { + "guid": "{549D26B8-881D-569F-AF05-961F36A43F4F}" + }, + "assetHint": "materials/presets/pbr/metal_aluminum_matte.azmaterial" + } + } + } + ] + } + } + }, + "Component_[8092226976542590265]": { + "$type": "EditorDisabledCompositionComponent", + "Id": 8092226976542590265 + } + } + }, + "Entity_[2502135244756]": { + "Id": "Entity_[2502135244756]", + "Name": "Entity1", + "Components": { + "Component_[11525365929370623807]": { + "$type": "EditorVisibilityComponent", + "Id": 11525365929370623807 + }, + "Component_[12334620273692642550]": { + "$type": "EditorLockComponent", + "Id": 12334620273692642550 + }, + "Component_[14389735759337977675]": { + "$type": "EditorPendingCompositionComponent", + "Id": 14389735759337977675 + }, + "Component_[16184381538555246534]": { + "$type": "AZ::Render::EditorMeshComponent", + "Id": 16184381538555246534, + "Controller": { + "Configuration": { + "ModelAsset": { + "assetId": { + "guid": "{E14975EF-E676-51A4-B826-3EF59CB645AA}", + "subId": 285127096 + }, + "assetHint": "testdata/objects/cube/cube.azmodel" + } + } + } + }, + "Component_[17962478023087084794]": { + "$type": "SelectionComponent", + "Id": 17962478023087084794 + }, + "Component_[18071675051915092508]": { + "$type": "EditorEntityIconComponent", + "Id": 18071675051915092508 + }, + "Component_[2115498007879087044]": { + "$type": "EditorInspectorComponent", + "Id": 2115498007879087044, + "ComponentOrderEntryArray": [ + { + "ComponentId": 399415038452606756 + }, + { + "ComponentId": 16184381538555246534, + "SortIndex": 1 + }, + { + "ComponentId": 7827190074535394331, + "SortIndex": 2 + } + ] + }, + "Component_[3518973002096080237]": { + "$type": "EditorOnlyEntityComponent", + "Id": 3518973002096080237 + }, + "Component_[399415038452606756]": { + "$type": "{27F1E1A1-8D9D-4C3B-BD3A-AFB9762449C0} TransformComponent", + "Id": 399415038452606756, + "Parent Entity": "ContainerEntity", + "Transform Data": { + "Translate": [ + -17.530563354492188, + -0.00018183141946792603, + 15.057670593261719 + ] + } + }, + "Component_[4564240319609068082]": { + "$type": "EditorEntitySortComponent", + "Id": 4564240319609068082 + }, + "Component_[7827190074535394331]": { + "$type": "EditorMaterialComponent", + "Id": 7827190074535394331, + "Controller": { + "Configuration": { + "materials": [ + { + "Key": { + "materialSlotStableId": 2418540911 + }, + "Value": { + "MaterialAsset": { + "assetId": { + "guid": "{A7F03135-ECAD-5440-99DB-E84ABA3D50DA}" + }, + "assetHint": "materials/presets/pbr/metal_iron_polished.azmaterial" + } + } + } + ] + } + } + }, + "Component_[8092226976542590265]": { + "$type": "EditorDisabledCompositionComponent", + "Id": 8092226976542590265 + } + } + }, + "Entity_[2506430212052]": { + "Id": "Entity_[2506430212052]", + "Name": "Entity1", + "Components": { + "Component_[11525365929370623807]": { + "$type": "EditorVisibilityComponent", + "Id": 11525365929370623807 + }, + "Component_[12334620273692642550]": { + "$type": "EditorLockComponent", + "Id": 12334620273692642550 + }, + "Component_[14389735759337977675]": { + "$type": "EditorPendingCompositionComponent", + "Id": 14389735759337977675 + }, + "Component_[16184381538555246534]": { + "$type": "AZ::Render::EditorMeshComponent", + "Id": 16184381538555246534, + "Controller": { + "Configuration": { + "ModelAsset": { + "assetId": { + "guid": "{E14975EF-E676-51A4-B826-3EF59CB645AA}", + "subId": 285127096 + }, + "assetHint": "testdata/objects/cube/cube.azmodel" + } + } + } + }, + "Component_[17962478023087084794]": { + "$type": "SelectionComponent", + "Id": 17962478023087084794 + }, + "Component_[18071675051915092508]": { + "$type": "EditorEntityIconComponent", + "Id": 18071675051915092508 + }, + "Component_[2115498007879087044]": { + "$type": "EditorInspectorComponent", + "Id": 2115498007879087044, + "ComponentOrderEntryArray": [ + { + "ComponentId": 399415038452606756 + }, + { + "ComponentId": 16184381538555246534, + "SortIndex": 1 + }, + { + "ComponentId": 7827190074535394331, + "SortIndex": 2 + } + ] + }, + "Component_[3518973002096080237]": { + "$type": "EditorOnlyEntityComponent", + "Id": 3518973002096080237 + }, + "Component_[399415038452606756]": { + "$type": "{27F1E1A1-8D9D-4C3B-BD3A-AFB9762449C0} TransformComponent", + "Id": 399415038452606756, + "Parent Entity": "ContainerEntity", + "Transform Data": { + "Translate": [ + 42.53014373779297, + -0.00018183141946792603, + 109.46680450439453 + ] + } + }, + "Component_[4564240319609068082]": { + "$type": "EditorEntitySortComponent", + "Id": 4564240319609068082 + }, + "Component_[7827190074535394331]": { + "$type": "EditorMaterialComponent", + "Id": 7827190074535394331, + "Controller": { + "Configuration": { + "materials": [ + { + "Key": { + "materialSlotStableId": 2418540911 + }, + "Value": { + "MaterialAsset": { + "assetId": { + "guid": "{5BC13D95-377E-53EA-9A93-156384BE8B04}" + }, + "assetHint": "materials/presets/pbr/metal_gold_matte.azmaterial" + } + } + } + ] + } + } + }, + "Component_[8092226976542590265]": { + "$type": "EditorDisabledCompositionComponent", + "Id": 8092226976542590265 + } + } + }, + "Entity_[2510725179348]": { + "Id": "Entity_[2510725179348]", + "Name": "Entity1", + "Components": { + "Component_[11525365929370623807]": { + "$type": "EditorVisibilityComponent", + "Id": 11525365929370623807 + }, + "Component_[12334620273692642550]": { + "$type": "EditorLockComponent", + "Id": 12334620273692642550 + }, + "Component_[14389735759337977675]": { + "$type": "EditorPendingCompositionComponent", + "Id": 14389735759337977675 + }, + "Component_[16184381538555246534]": { + "$type": "AZ::Render::EditorMeshComponent", + "Id": 16184381538555246534, + "Controller": { + "Configuration": { + "ModelAsset": { + "assetId": { + "guid": "{E14975EF-E676-51A4-B826-3EF59CB645AA}", + "subId": 285127096 + }, + "assetHint": "testdata/objects/cube/cube.azmodel" + } + } + } + }, + "Component_[17962478023087084794]": { + "$type": "SelectionComponent", + "Id": 17962478023087084794 + }, + "Component_[18071675051915092508]": { + "$type": "EditorEntityIconComponent", + "Id": 18071675051915092508 + }, + "Component_[2115498007879087044]": { + "$type": "EditorInspectorComponent", + "Id": 2115498007879087044, + "ComponentOrderEntryArray": [ + { + "ComponentId": 399415038452606756 + }, + { + "ComponentId": 16184381538555246534, + "SortIndex": 1 + }, + { + "ComponentId": 7827190074535394331, + "SortIndex": 2 + } + ] + }, + "Component_[3518973002096080237]": { + "$type": "EditorOnlyEntityComponent", + "Id": 3518973002096080237 + }, + "Component_[399415038452606756]": { + "$type": "{27F1E1A1-8D9D-4C3B-BD3A-AFB9762449C0} TransformComponent", + "Id": 399415038452606756, + "Parent Entity": "ContainerEntity", + "Transform Data": { + "Translate": [ + -22.530563354492188, + -0.00018183141946792603, + 74.93071746826172 + ] + } + }, + "Component_[4564240319609068082]": { + "$type": "EditorEntitySortComponent", + "Id": 4564240319609068082 + }, + "Component_[7827190074535394331]": { + "$type": "EditorMaterialComponent", + "Id": 7827190074535394331, + "Controller": { + "Configuration": { + "materials": [ + { + "Key": { + "materialSlotStableId": 2418540911 + }, + "Value": { + "MaterialAsset": { + "assetId": { + "guid": "{FB4657EB-FB3A-5EC3-A772-DC36D6F733C3}" + }, + "assetHint": "materials/presets/pbr/metal_gold_polished.azmaterial" + } + } + } + ] + } + } + }, + "Component_[8092226976542590265]": { + "$type": "EditorDisabledCompositionComponent", + "Id": 8092226976542590265 + } + } + }, + "Entity_[2515020146644]": { + "Id": "Entity_[2515020146644]", + "Name": "Entity1", + "Components": { + "Component_[11525365929370623807]": { + "$type": "EditorVisibilityComponent", + "Id": 11525365929370623807 + }, + "Component_[12334620273692642550]": { + "$type": "EditorLockComponent", + "Id": 12334620273692642550 + }, + "Component_[14389735759337977675]": { + "$type": "EditorPendingCompositionComponent", + "Id": 14389735759337977675 + }, + "Component_[16184381538555246534]": { + "$type": "AZ::Render::EditorMeshComponent", + "Id": 16184381538555246534, + "Controller": { + "Configuration": { + "ModelAsset": { + "assetId": { + "guid": "{E14975EF-E676-51A4-B826-3EF59CB645AA}", + "subId": 285127096 + }, + "assetHint": "testdata/objects/cube/cube.azmodel" + } + } + } + }, + "Component_[17962478023087084794]": { + "$type": "SelectionComponent", + "Id": 17962478023087084794 + }, + "Component_[18071675051915092508]": { + "$type": "EditorEntityIconComponent", + "Id": 18071675051915092508 + }, + "Component_[2115498007879087044]": { + "$type": "EditorInspectorComponent", + "Id": 2115498007879087044, + "ComponentOrderEntryArray": [ + { + "ComponentId": 399415038452606756 + }, + { + "ComponentId": 16184381538555246534, + "SortIndex": 1 + }, + { + "ComponentId": 7827190074535394331, + "SortIndex": 2 + } + ] + }, + "Component_[3518973002096080237]": { + "$type": "EditorOnlyEntityComponent", + "Id": 3518973002096080237 + }, + "Component_[399415038452606756]": { + "$type": "{27F1E1A1-8D9D-4C3B-BD3A-AFB9762449C0} TransformComponent", + "Id": 399415038452606756, + "Parent Entity": "ContainerEntity", + "Transform Data": { + "Translate": [ + -12.530563354492188, + -0.00018183141946792603, + 54.618019104003906 + ] + } + }, + "Component_[4564240319609068082]": { + "$type": "EditorEntitySortComponent", + "Id": 4564240319609068082 + }, + "Component_[7827190074535394331]": { + "$type": "EditorMaterialComponent", + "Id": 7827190074535394331, + "Controller": { + "Configuration": { + "materials": [ + { + "Key": { + "materialSlotStableId": 2418540911 + }, + "Value": { + "MaterialAsset": { + "assetId": { + "guid": "{F2AD0EBF-7137-58D1-9991-9552FAD41B19}" + }, + "assetHint": "materials/presets/pbr/metal_mercury.azmaterial" + } + } + } + ] + } + } + }, + "Component_[8092226976542590265]": { + "$type": "EditorDisabledCompositionComponent", + "Id": 8092226976542590265 + } + } + }, + "Entity_[2519315113940]": { + "Id": "Entity_[2519315113940]", + "Name": "Entity1", + "Components": { + "Component_[1057179753323467068]": { + "$type": "EditorMaterialComponent", + "Id": 1057179753323467068, + "Controller": { + "Configuration": { + "materials": [ + { + "Key": { + "materialSlotStableId": 2418540911 + }, + "Value": { + "MaterialAsset": { + "assetId": { + "guid": "{A3F3CD98-1634-5542-AD5A-78E91BE21AE9}" + }, + "assetHint": "materials/presets/pbr/metal_titanium_matte.azmaterial" + } + } + } + ] + } + } + }, + "Component_[11525365929370623807]": { + "$type": "EditorVisibilityComponent", + "Id": 11525365929370623807 + }, + "Component_[12334620273692642550]": { + "$type": "EditorLockComponent", + "Id": 12334620273692642550 + }, + "Component_[14389735759337977675]": { + "$type": "EditorPendingCompositionComponent", + "Id": 14389735759337977675 + }, + "Component_[16184381538555246534]": { + "$type": "AZ::Render::EditorMeshComponent", + "Id": 16184381538555246534, + "Controller": { + "Configuration": { + "ModelAsset": { + "assetId": { + "guid": "{E14975EF-E676-51A4-B826-3EF59CB645AA}", + "subId": 285127096 + }, + "assetHint": "testdata/objects/cube/cube.azmodel" + } + } + } + }, + "Component_[17962478023087084794]": { + "$type": "SelectionComponent", + "Id": 17962478023087084794 + }, + "Component_[18071675051915092508]": { + "$type": "EditorEntityIconComponent", + "Id": 18071675051915092508 + }, + "Component_[2115498007879087044]": { + "$type": "EditorInspectorComponent", + "Id": 2115498007879087044, + "ComponentOrderEntryArray": [ + { + "ComponentId": 399415038452606756 + }, + { + "ComponentId": 16184381538555246534, + "SortIndex": 1 + }, + { + "ComponentId": 1057179753323467068, + "SortIndex": 2 + } + ] + }, + "Component_[3518973002096080237]": { + "$type": "EditorOnlyEntityComponent", + "Id": 3518973002096080237 + }, + "Component_[399415038452606756]": { + "$type": "{27F1E1A1-8D9D-4C3B-BD3A-AFB9762449C0} TransformComponent", + "Id": 399415038452606756, + "Parent Entity": "ContainerEntity", + "Transform Data": { + "Translate": [ + 12.530143737792969, + -0.00018183141946792603, + 79.38228607177734 + ] + } + }, + "Component_[4564240319609068082]": { + "$type": "EditorEntitySortComponent", + "Id": 4564240319609068082 + }, + "Component_[8092226976542590265]": { + "$type": "EditorDisabledCompositionComponent", + "Id": 8092226976542590265 + } + } + }, + "Entity_[2523610081236]": { + "Id": "Entity_[2523610081236]", + "Name": "Entity1", + "Components": { + "Component_[11525365929370623807]": { + "$type": "EditorVisibilityComponent", + "Id": 11525365929370623807 + }, + "Component_[12334620273692642550]": { + "$type": "EditorLockComponent", + "Id": 12334620273692642550 + }, + "Component_[14389735759337977675]": { + "$type": "EditorPendingCompositionComponent", + "Id": 14389735759337977675 + }, + "Component_[16184381538555246534]": { + "$type": "AZ::Render::EditorMeshComponent", + "Id": 16184381538555246534, + "Controller": { + "Configuration": { + "ModelAsset": { + "assetId": { + "guid": "{E14975EF-E676-51A4-B826-3EF59CB645AA}", + "subId": 285127096 + }, + "assetHint": "testdata/objects/cube/cube.azmodel" + } + } + } + }, + "Component_[17962478023087084794]": { + "$type": "SelectionComponent", + "Id": 17962478023087084794 + }, + "Component_[18071675051915092508]": { + "$type": "EditorEntityIconComponent", + "Id": 18071675051915092508 + }, + "Component_[2115498007879087044]": { + "$type": "EditorInspectorComponent", + "Id": 2115498007879087044, + "ComponentOrderEntryArray": [ + { + "ComponentId": 399415038452606756 + }, + { + "ComponentId": 16184381538555246534, + "SortIndex": 1 + }, + { + "ComponentId": 7827190074535394331, + "SortIndex": 2 + } + ] + }, + "Component_[3518973002096080237]": { + "$type": "EditorOnlyEntityComponent", + "Id": 3518973002096080237 + }, + "Component_[399415038452606756]": { + "$type": "{27F1E1A1-8D9D-4C3B-BD3A-AFB9762449C0} TransformComponent", + "Id": 399415038452606756, + "Parent Entity": "ContainerEntity", + "Transform Data": { + "Translate": [ + 17.53014373779297, + -0.00018183141946792603, + 89.95755767822266 + ] + } + }, + "Component_[4564240319609068082]": { + "$type": "EditorEntitySortComponent", + "Id": 4564240319609068082 + }, + "Component_[7827190074535394331]": { + "$type": "EditorMaterialComponent", + "Id": 7827190074535394331, + "Controller": { + "Configuration": { + "materials": [ + { + "Key": {}, + "Value": { + "MaterialAsset": { + "assetId": { + "guid": "{721188E0-B7CC-5D06-8D5D-39AF8ABF2EF9}" + }, + "assetHint": "materials/presets/pbr/metal_titanium.azmaterial" + } + } + }, + { + "Key": { + "materialSlotStableId": 2418540911 + }, + "Value": { + "MaterialAsset": { + "assetId": { + "guid": "{64C1F6A6-6BDA-551A-BE56-1829E5913278}" + }, + "assetHint": "materials/presets/pbr/metal_aluminum_polished.azmaterial" + } + } + } + ] + } + } + }, + "Component_[8092226976542590265]": { + "$type": "EditorDisabledCompositionComponent", + "Id": 8092226976542590265 + } + } + }, + "Entity_[2527905048532]": { + "Id": "Entity_[2527905048532]", + "Name": "Entity1", + "Components": { + "Component_[11525365929370623807]": { + "$type": "EditorVisibilityComponent", + "Id": 11525365929370623807 + }, + "Component_[12334620273692642550]": { + "$type": "EditorLockComponent", + "Id": 12334620273692642550 + }, + "Component_[14389735759337977675]": { + "$type": "EditorPendingCompositionComponent", + "Id": 14389735759337977675 + }, + "Component_[16184381538555246534]": { + "$type": "AZ::Render::EditorMeshComponent", + "Id": 16184381538555246534, + "Controller": { + "Configuration": { + "ModelAsset": { + "assetId": { + "guid": "{E14975EF-E676-51A4-B826-3EF59CB645AA}", + "subId": 285127096 + }, + "assetHint": "testdata/objects/cube/cube.azmodel" + } + } + } + }, + "Component_[17962478023087084794]": { + "$type": "SelectionComponent", + "Id": 17962478023087084794 + }, + "Component_[18071675051915092508]": { + "$type": "EditorEntityIconComponent", + "Id": 18071675051915092508 + }, + "Component_[2115498007879087044]": { + "$type": "EditorInspectorComponent", + "Id": 2115498007879087044, + "ComponentOrderEntryArray": [ + { + "ComponentId": 399415038452606756 + }, + { + "ComponentId": 16184381538555246534, + "SortIndex": 1 + }, + { + "ComponentId": 7827190074535394331, + "SortIndex": 2 + } + ] + }, + "Component_[3518973002096080237]": { + "$type": "EditorOnlyEntityComponent", + "Id": 3518973002096080237 + }, + "Component_[399415038452606756]": { + "$type": "{27F1E1A1-8D9D-4C3B-BD3A-AFB9762449C0} TransformComponent", + "Id": 399415038452606756, + "Parent Entity": "ContainerEntity", + "Transform Data": { + "Translate": [ + 22.53014373779297, + -0.00018183141946792603, + 34.53608703613281 + ] + } + }, + "Component_[4564240319609068082]": { + "$type": "EditorEntitySortComponent", + "Id": 4564240319609068082 + }, + "Component_[7827190074535394331]": { + "$type": "EditorMaterialComponent", + "Id": 7827190074535394331, + "Controller": { + "Configuration": { + "materials": [ + { + "Key": { + "materialSlotStableId": 2418540911 + }, + "Value": { + "MaterialAsset": { + "assetId": { + "guid": "{AE350D9F-0000-526D-B49C-4303D687BB86}" + }, + "assetHint": "materials/presets/pbr/metal_brass_matte.azmaterial" + } + } + } + ] + } + } + }, + "Component_[8092226976542590265]": { + "$type": "EditorDisabledCompositionComponent", + "Id": 8092226976542590265 + } + } + }, + "Entity_[2532200015828]": { + "Id": "Entity_[2532200015828]", + "Name": "Entity1", + "Components": { + "Component_[11525365929370623807]": { + "$type": "EditorVisibilityComponent", + "Id": 11525365929370623807 + }, + "Component_[12334620273692642550]": { + "$type": "EditorLockComponent", + "Id": 12334620273692642550 + }, + "Component_[14389735759337977675]": { + "$type": "EditorPendingCompositionComponent", + "Id": 14389735759337977675 + }, + "Component_[16184381538555246534]": { + "$type": "AZ::Render::EditorMeshComponent", + "Id": 16184381538555246534, + "Controller": { + "Configuration": { + "ModelAsset": { + "assetId": { + "guid": "{E14975EF-E676-51A4-B826-3EF59CB645AA}", + "subId": 285127096 + }, + "assetHint": "testdata/objects/cube/cube.azmodel" + } + } + } + }, + "Component_[17962478023087084794]": { + "$type": "SelectionComponent", + "Id": 17962478023087084794 + }, + "Component_[18071675051915092508]": { + "$type": "EditorEntityIconComponent", + "Id": 18071675051915092508 + }, + "Component_[2115498007879087044]": { + "$type": "EditorInspectorComponent", + "Id": 2115498007879087044, + "ComponentOrderEntryArray": [ + { + "ComponentId": 399415038452606756 + }, + { + "ComponentId": 16184381538555246534, + "SortIndex": 1 + }, + { + "ComponentId": 7827190074535394331, + "SortIndex": 2 + } + ] + }, + "Component_[3518973002096080237]": { + "$type": "EditorOnlyEntityComponent", + "Id": 3518973002096080237 + }, + "Component_[399415038452606756]": { + "$type": "{27F1E1A1-8D9D-4C3B-BD3A-AFB9762449C0} TransformComponent", + "Id": 399415038452606756, + "Parent Entity": "ContainerEntity", + "Transform Data": { + "Translate": [ + 32.53014373779297, + -0.00018183141946792603, + 4.451573371887207 + ] + } + }, + "Component_[4564240319609068082]": { + "$type": "EditorEntitySortComponent", + "Id": 4564240319609068082 + }, + "Component_[7827190074535394331]": { + "$type": "EditorMaterialComponent", + "Id": 7827190074535394331, + "Controller": { + "Configuration": { + "materials": [ + { + "Key": { + "materialSlotStableId": 2418540911 + }, + "Value": { + "MaterialAsset": { + "assetId": { + "guid": "{C60A39AF-BB76-51BD-9468-A88C9A6F78D7}" + }, + "assetHint": "materials/presets/pbr/metal_cobalt_matte.azmaterial" + } + } + } + ] + } + } + }, + "Component_[8092226976542590265]": { + "$type": "EditorDisabledCompositionComponent", + "Id": 8092226976542590265 + } + } + }, + "Entity_[2536494983124]": { + "Id": "Entity_[2536494983124]", + "Name": "Entity1", + "Components": { + "Component_[11525365929370623807]": { + "$type": "EditorVisibilityComponent", + "Id": 11525365929370623807 + }, + "Component_[12334620273692642550]": { + "$type": "EditorLockComponent", + "Id": 12334620273692642550 + }, + "Component_[14389735759337977675]": { + "$type": "EditorPendingCompositionComponent", + "Id": 14389735759337977675 + }, + "Component_[16184381538555246534]": { + "$type": "AZ::Render::EditorMeshComponent", + "Id": 16184381538555246534, + "Controller": { + "Configuration": { + "ModelAsset": { + "assetId": { + "guid": "{E14975EF-E676-51A4-B826-3EF59CB645AA}", + "subId": 285127096 + }, + "assetHint": "testdata/objects/cube/cube.azmodel" + } + } + } + }, + "Component_[17962478023087084794]": { + "$type": "SelectionComponent", + "Id": 17962478023087084794 + }, + "Component_[18071675051915092508]": { + "$type": "EditorEntityIconComponent", + "Id": 18071675051915092508 + }, + "Component_[2115498007879087044]": { + "$type": "EditorInspectorComponent", + "Id": 2115498007879087044, + "ComponentOrderEntryArray": [ + { + "ComponentId": 399415038452606756 + }, + { + "ComponentId": 16184381538555246534, + "SortIndex": 1 + }, + { + "ComponentId": 7827190074535394331, + "SortIndex": 2 + } + ] + }, + "Component_[3518973002096080237]": { + "$type": "EditorOnlyEntityComponent", + "Id": 3518973002096080237 + }, + "Component_[399415038452606756]": { + "$type": "{27F1E1A1-8D9D-4C3B-BD3A-AFB9762449C0} TransformComponent", + "Id": 399415038452606756, + "Parent Entity": "ContainerEntity", + "Transform Data": { + "Translate": [ + -12.530563354492188, + -0.00018183141946792603, + 74.93071746826172 + ] + } + }, + "Component_[4564240319609068082]": { + "$type": "EditorEntitySortComponent", + "Id": 4564240319609068082 + }, + "Component_[7827190074535394331]": { + "$type": "EditorMaterialComponent", + "Id": 7827190074535394331, + "Controller": { + "Configuration": { + "materials": [ + { + "Key": { + "materialSlotStableId": 2418540911 + }, + "Value": { + "MaterialAsset": { + "assetId": { + "guid": "{F2AD0EBF-7137-58D1-9991-9552FAD41B19}" + }, + "assetHint": "materials/presets/pbr/metal_mercury.azmaterial" + } + } + } + ] + } + } + }, + "Component_[8092226976542590265]": { + "$type": "EditorDisabledCompositionComponent", + "Id": 8092226976542590265 + } + } + }, + "Entity_[2540789950420]": { + "Id": "Entity_[2540789950420]", + "Name": "Entity1", + "Components": { + "Component_[11525365929370623807]": { + "$type": "EditorVisibilityComponent", + "Id": 11525365929370623807 + }, + "Component_[12334620273692642550]": { + "$type": "EditorLockComponent", + "Id": 12334620273692642550 + }, + "Component_[14389735759337977675]": { + "$type": "EditorPendingCompositionComponent", + "Id": 14389735759337977675 + }, + "Component_[16184381538555246534]": { + "$type": "AZ::Render::EditorMeshComponent", + "Id": 16184381538555246534, + "Controller": { + "Configuration": { + "ModelAsset": { + "assetId": { + "guid": "{E14975EF-E676-51A4-B826-3EF59CB645AA}", + "subId": 285127096 + }, + "assetHint": "testdata/objects/cube/cube.azmodel" + } + } + } + }, + "Component_[17962478023087084794]": { + "$type": "SelectionComponent", + "Id": 17962478023087084794 + }, + "Component_[18071675051915092508]": { + "$type": "EditorEntityIconComponent", + "Id": 18071675051915092508 + }, + "Component_[2115498007879087044]": { + "$type": "EditorInspectorComponent", + "Id": 2115498007879087044, + "ComponentOrderEntryArray": [ + { + "ComponentId": 399415038452606756 + }, + { + "ComponentId": 16184381538555246534, + "SortIndex": 1 + }, + { + "ComponentId": 7827190074535394331, + "SortIndex": 2 + } + ] + }, + "Component_[3518973002096080237]": { + "$type": "EditorOnlyEntityComponent", + "Id": 3518973002096080237 + }, + "Component_[399415038452606756]": { + "$type": "{27F1E1A1-8D9D-4C3B-BD3A-AFB9762449C0} TransformComponent", + "Id": 399415038452606756, + "Parent Entity": "ContainerEntity", + "Transform Data": { + "Translate": [ + 7.530143737792969, + -0.00018183141946792603, + 24.533506393432617 + ] + } + }, + "Component_[4564240319609068082]": { + "$type": "EditorEntitySortComponent", + "Id": 4564240319609068082 + }, + "Component_[7827190074535394331]": { + "$type": "EditorMaterialComponent", + "Id": 7827190074535394331, + "Controller": { + "Configuration": { + "materials": [ + { + "Key": { + "materialSlotStableId": 2418540911 + }, + "Value": { + "MaterialAsset": { + "assetId": { + "guid": "{CDA13277-5EAB-5E2A-93F5-B7003597FBCE}" + }, + "assetHint": "materials/presets/pbr/metal_silver.azmaterial" + } + } + } + ] + } + } + }, + "Component_[8092226976542590265]": { + "$type": "EditorDisabledCompositionComponent", + "Id": 8092226976542590265 + } + } + }, + "Entity_[2545084917716]": { + "Id": "Entity_[2545084917716]", + "Name": "Entity1", + "Components": { + "Component_[11525365929370623807]": { + "$type": "EditorVisibilityComponent", + "Id": 11525365929370623807 + }, + "Component_[12334620273692642550]": { + "$type": "EditorLockComponent", + "Id": 12334620273692642550 + }, + "Component_[14389735759337977675]": { + "$type": "EditorPendingCompositionComponent", + "Id": 14389735759337977675 + }, + "Component_[16184381538555246534]": { + "$type": "AZ::Render::EditorMeshComponent", + "Id": 16184381538555246534, + "Controller": { + "Configuration": { + "ModelAsset": { + "assetId": { + "guid": "{E14975EF-E676-51A4-B826-3EF59CB645AA}", + "subId": 285127096 + }, + "assetHint": "testdata/objects/cube/cube.azmodel" + } + } + } + }, + "Component_[17962478023087084794]": { + "$type": "SelectionComponent", + "Id": 17962478023087084794 + }, + "Component_[18071675051915092508]": { + "$type": "EditorEntityIconComponent", + "Id": 18071675051915092508 + }, + "Component_[2115498007879087044]": { + "$type": "EditorInspectorComponent", + "Id": 2115498007879087044, + "ComponentOrderEntryArray": [ + { + "ComponentId": 399415038452606756 + }, + { + "ComponentId": 16184381538555246534, + "SortIndex": 1 + }, + { + "ComponentId": 7827190074535394331, + "SortIndex": 2 + } + ] + }, + "Component_[3518973002096080237]": { + "$type": "EditorOnlyEntityComponent", + "Id": 3518973002096080237 + }, + "Component_[399415038452606756]": { + "$type": "{27F1E1A1-8D9D-4C3B-BD3A-AFB9762449C0} TransformComponent", + "Id": 399415038452606756, + "Parent Entity": "ContainerEntity", + "Transform Data": { + "Translate": [ + 47.53014373779297, + -0.00018183141946792603, + 74.93071746826172 + ] + } + }, + "Component_[4564240319609068082]": { + "$type": "EditorEntitySortComponent", + "Id": 4564240319609068082 + }, + "Component_[7827190074535394331]": { + "$type": "EditorMaterialComponent", + "Id": 7827190074535394331, + "Controller": { + "Configuration": { + "materials": [ + { + "Key": { + "materialSlotStableId": 2418540911 + }, + "Value": { + "MaterialAsset": { + "assetId": { + "guid": "{A7F03135-ECAD-5440-99DB-E84ABA3D50DA}" + }, + "assetHint": "materials/presets/pbr/metal_iron_polished.azmaterial" + } + } + } + ] + } + } + }, + "Component_[8092226976542590265]": { + "$type": "EditorDisabledCompositionComponent", + "Id": 8092226976542590265 + } + } + }, + "Entity_[2549379885012]": { + "Id": "Entity_[2549379885012]", + "Name": "Entity1", + "Components": { + "Component_[11525365929370623807]": { + "$type": "EditorVisibilityComponent", + "Id": 11525365929370623807 + }, + "Component_[12334620273692642550]": { + "$type": "EditorLockComponent", + "Id": 12334620273692642550 + }, + "Component_[14389735759337977675]": { + "$type": "EditorPendingCompositionComponent", + "Id": 14389735759337977675 + }, + "Component_[16184381538555246534]": { + "$type": "AZ::Render::EditorMeshComponent", + "Id": 16184381538555246534, + "Controller": { + "Configuration": { + "ModelAsset": { + "assetId": { + "guid": "{E14975EF-E676-51A4-B826-3EF59CB645AA}", + "subId": 285127096 + }, + "assetHint": "testdata/objects/cube/cube.azmodel" + } + } + } + }, + "Component_[17962478023087084794]": { + "$type": "SelectionComponent", + "Id": 17962478023087084794 + }, + "Component_[18071675051915092508]": { + "$type": "EditorEntityIconComponent", + "Id": 18071675051915092508 + }, + "Component_[2115498007879087044]": { + "$type": "EditorInspectorComponent", + "Id": 2115498007879087044, + "ComponentOrderEntryArray": [ + { + "ComponentId": 399415038452606756 + }, + { + "ComponentId": 16184381538555246534, + "SortIndex": 1 + }, + { + "ComponentId": 7827190074535394331, + "SortIndex": 2 + } + ] + }, + "Component_[3518973002096080237]": { + "$type": "EditorOnlyEntityComponent", + "Id": 3518973002096080237 + }, + "Component_[399415038452606756]": { + "$type": "{27F1E1A1-8D9D-4C3B-BD3A-AFB9762449C0} TransformComponent", + "Id": 399415038452606756, + "Parent Entity": "ContainerEntity", + "Transform Data": { + "Translate": [ + -12.530563354492188, + -0.00018183141946792603, + 19.50924301147461 + ] + } + }, + "Component_[4564240319609068082]": { + "$type": "EditorEntitySortComponent", + "Id": 4564240319609068082 + }, + "Component_[7827190074535394331]": { + "$type": "EditorMaterialComponent", + "Id": 7827190074535394331, + "Controller": { + "Configuration": { + "materials": [ + { + "Key": { + "materialSlotStableId": 2418540911 + }, + "Value": { + "MaterialAsset": { + "assetId": { + "guid": "{F2AD0EBF-7137-58D1-9991-9552FAD41B19}" + }, + "assetHint": "materials/presets/pbr/metal_mercury.azmaterial" + } + } + } + ] + } + } + }, + "Component_[8092226976542590265]": { + "$type": "EditorDisabledCompositionComponent", + "Id": 8092226976542590265 + } + } + }, + "Entity_[2553674852308]": { + "Id": "Entity_[2553674852308]", + "Name": "Entity1", + "Components": { + "Component_[11525365929370623807]": { + "$type": "EditorVisibilityComponent", + "Id": 11525365929370623807 + }, + "Component_[12334620273692642550]": { + "$type": "EditorLockComponent", + "Id": 12334620273692642550 + }, + "Component_[14389735759337977675]": { + "$type": "EditorPendingCompositionComponent", + "Id": 14389735759337977675 + }, + "Component_[16184381538555246534]": { + "$type": "AZ::Render::EditorMeshComponent", + "Id": 16184381538555246534, + "Controller": { + "Configuration": { + "ModelAsset": { + "assetId": { + "guid": "{E14975EF-E676-51A4-B826-3EF59CB645AA}", + "subId": 285127096 + }, + "assetHint": "testdata/objects/cube/cube.azmodel" + } + } + } + }, + "Component_[17962478023087084794]": { + "$type": "SelectionComponent", + "Id": 17962478023087084794 + }, + "Component_[18071675051915092508]": { + "$type": "EditorEntityIconComponent", + "Id": 18071675051915092508 + }, + "Component_[2115498007879087044]": { + "$type": "EditorInspectorComponent", + "Id": 2115498007879087044, + "ComponentOrderEntryArray": [ + { + "ComponentId": 399415038452606756 + }, + { + "ComponentId": 16184381538555246534, + "SortIndex": 1 + }, + { + "ComponentId": 7827190074535394331, + "SortIndex": 2 + } + ] + }, + "Component_[3518973002096080237]": { + "$type": "EditorOnlyEntityComponent", + "Id": 3518973002096080237 + }, + "Component_[399415038452606756]": { + "$type": "{27F1E1A1-8D9D-4C3B-BD3A-AFB9762449C0} TransformComponent", + "Id": 399415038452606756, + "Parent Entity": "ContainerEntity", + "Transform Data": { + "Translate": [ + -47.53056335449219, + -0.00018183141946792603, + 4.451573371887207 + ] + } + }, + "Component_[4564240319609068082]": { + "$type": "EditorEntitySortComponent", + "Id": 4564240319609068082 + }, + "Component_[7827190074535394331]": { + "$type": "EditorMaterialComponent", + "Id": 7827190074535394331, + "Controller": { + "Configuration": { + "materials": [ + { + "Key": { + "materialSlotStableId": 2418540911 + }, + "Value": { + "MaterialAsset": { + "assetId": { + "guid": "{549D26B8-881D-569F-AF05-961F36A43F4F}" + }, + "assetHint": "materials/presets/pbr/metal_aluminum_matte.azmaterial" + } + } + } + ] + } + } + }, + "Component_[8092226976542590265]": { + "$type": "EditorDisabledCompositionComponent", + "Id": 8092226976542590265 + } + } + }, + "Entity_[2557969819604]": { + "Id": "Entity_[2557969819604]", + "Name": "Entity1", + "Components": { + "Component_[1057179753323467068]": { + "$type": "EditorMaterialComponent", + "Id": 1057179753323467068, + "Controller": { + "Configuration": { + "materials": [ + { + "Key": { + "materialSlotStableId": 2418540911 + }, + "Value": { + "MaterialAsset": { + "assetId": { + "guid": "{A3F3CD98-1634-5542-AD5A-78E91BE21AE9}" + }, + "assetHint": "materials/presets/pbr/metal_titanium_matte.azmaterial" + } + } + } + ] + } + } + }, + "Component_[11525365929370623807]": { + "$type": "EditorVisibilityComponent", + "Id": 11525365929370623807 + }, + "Component_[12334620273692642550]": { + "$type": "EditorLockComponent", + "Id": 12334620273692642550 + }, + "Component_[14389735759337977675]": { + "$type": "EditorPendingCompositionComponent", + "Id": 14389735759337977675 + }, + "Component_[16184381538555246534]": { + "$type": "AZ::Render::EditorMeshComponent", + "Id": 16184381538555246534, + "Controller": { + "Configuration": { + "ModelAsset": { + "assetId": { + "guid": "{E14975EF-E676-51A4-B826-3EF59CB645AA}", + "subId": 285127096 + }, + "assetHint": "testdata/objects/cube/cube.azmodel" + } + } + } + }, + "Component_[17962478023087084794]": { + "$type": "SelectionComponent", + "Id": 17962478023087084794 + }, + "Component_[18071675051915092508]": { + "$type": "EditorEntityIconComponent", + "Id": 18071675051915092508 + }, + "Component_[2115498007879087044]": { + "$type": "EditorInspectorComponent", + "Id": 2115498007879087044, + "ComponentOrderEntryArray": [ + { + "ComponentId": 399415038452606756 + }, + { + "ComponentId": 16184381538555246534, + "SortIndex": 1 + }, + { + "ComponentId": 1057179753323467068, + "SortIndex": 2 + } + ] + }, + "Component_[3518973002096080237]": { + "$type": "EditorOnlyEntityComponent", + "Id": 3518973002096080237 + }, + "Component_[399415038452606756]": { + "$type": "{27F1E1A1-8D9D-4C3B-BD3A-AFB9762449C0} TransformComponent", + "Id": 399415038452606756, + "Parent Entity": "ContainerEntity", + "Transform Data": { + "Translate": [ + 12.530143737792969, + -0.00018183141946792603, + 64.32462310791016 + ] + } + }, + "Component_[4564240319609068082]": { + "$type": "EditorEntitySortComponent", + "Id": 4564240319609068082 + }, + "Component_[8092226976542590265]": { + "$type": "EditorDisabledCompositionComponent", + "Id": 8092226976542590265 + } + } + }, + "Entity_[2562264786900]": { + "Id": "Entity_[2562264786900]", + "Name": "Entity1", + "Components": { + "Component_[1057179753323467068]": { + "$type": "EditorMaterialComponent", + "Id": 1057179753323467068, + "Controller": { + "Configuration": { + "materials": [ + { + "Key": { + "materialSlotStableId": 2418540911 + }, + "Value": { + "MaterialAsset": { + "assetId": { + "guid": "{3F0DF0C4-5F23-5EB1-B762-7344AFFDC011}" + }, + "assetHint": "materials/presets/pbr/metal_titanium_polished.azmaterial" + } + } + } + ] + } + } + }, + "Component_[11525365929370623807]": { + "$type": "EditorVisibilityComponent", + "Id": 11525365929370623807 + }, + "Component_[12334620273692642550]": { + "$type": "EditorLockComponent", + "Id": 12334620273692642550 + }, + "Component_[14389735759337977675]": { + "$type": "EditorPendingCompositionComponent", + "Id": 14389735759337977675 + }, + "Component_[16184381538555246534]": { + "$type": "AZ::Render::EditorMeshComponent", + "Id": 16184381538555246534, + "Controller": { + "Configuration": { + "ModelAsset": { + "assetId": { + "guid": "{E14975EF-E676-51A4-B826-3EF59CB645AA}", + "subId": 285127096 + }, + "assetHint": "testdata/objects/cube/cube.azmodel" + } + } + } + }, + "Component_[17962478023087084794]": { + "$type": "SelectionComponent", + "Id": 17962478023087084794 + }, + "Component_[18071675051915092508]": { + "$type": "EditorEntityIconComponent", + "Id": 18071675051915092508 + }, + "Component_[2115498007879087044]": { + "$type": "EditorInspectorComponent", + "Id": 2115498007879087044, + "ComponentOrderEntryArray": [ + { + "ComponentId": 399415038452606756 + }, + { + "ComponentId": 16184381538555246534, + "SortIndex": 1 + }, + { + "ComponentId": 1057179753323467068, + "SortIndex": 2 + } + ] + }, + "Component_[3518973002096080237]": { + "$type": "EditorOnlyEntityComponent", + "Id": 3518973002096080237 + }, + "Component_[399415038452606756]": { + "$type": "{27F1E1A1-8D9D-4C3B-BD3A-AFB9762449C0} TransformComponent", + "Id": 399415038452606756, + "Parent Entity": "ContainerEntity", + "Transform Data": { + "Translate": [ + 12.530143737792969, + -0.00018183141946792603, + 74.93071746826172 + ] + } + }, + "Component_[4564240319609068082]": { + "$type": "EditorEntitySortComponent", + "Id": 4564240319609068082 + }, + "Component_[8092226976542590265]": { + "$type": "EditorDisabledCompositionComponent", + "Id": 8092226976542590265 + } + } + }, + "Entity_[2566559754196]": { + "Id": "Entity_[2566559754196]", + "Name": "Entity1", + "Components": { + "Component_[11525365929370623807]": { + "$type": "EditorVisibilityComponent", + "Id": 11525365929370623807 + }, + "Component_[12334620273692642550]": { + "$type": "EditorLockComponent", + "Id": 12334620273692642550 + }, + "Component_[14389735759337977675]": { + "$type": "EditorPendingCompositionComponent", + "Id": 14389735759337977675 + }, + "Component_[16184381538555246534]": { + "$type": "AZ::Render::EditorMeshComponent", + "Id": 16184381538555246534, + "Controller": { + "Configuration": { + "ModelAsset": { + "assetId": { + "guid": "{E14975EF-E676-51A4-B826-3EF59CB645AA}", + "subId": 285127096 + }, + "assetHint": "testdata/objects/cube/cube.azmodel" + } + } + } + }, + "Component_[17962478023087084794]": { + "$type": "SelectionComponent", + "Id": 17962478023087084794 + }, + "Component_[18071675051915092508]": { + "$type": "EditorEntityIconComponent", + "Id": 18071675051915092508 + }, + "Component_[2115498007879087044]": { + "$type": "EditorInspectorComponent", + "Id": 2115498007879087044, + "ComponentOrderEntryArray": [ + { + "ComponentId": 399415038452606756 + }, + { + "ComponentId": 16184381538555246534, + "SortIndex": 1 + }, + { + "ComponentId": 7827190074535394331, + "SortIndex": 2 + } + ] + }, + "Component_[3518973002096080237]": { + "$type": "EditorOnlyEntityComponent", + "Id": 3518973002096080237 + }, + "Component_[399415038452606756]": { + "$type": "{27F1E1A1-8D9D-4C3B-BD3A-AFB9762449C0} TransformComponent", + "Id": 399415038452606756, + "Parent Entity": "ContainerEntity", + "Transform Data": { + "Translate": [ + -42.53056335449219, + -0.00018183141946792603, + 45.14218521118164 + ] + } + }, + "Component_[4564240319609068082]": { + "$type": "EditorEntitySortComponent", + "Id": 4564240319609068082 + }, + "Component_[7827190074535394331]": { + "$type": "EditorMaterialComponent", + "Id": 7827190074535394331, + "Controller": { + "Configuration": { + "materials": [ + { + "Key": { + "materialSlotStableId": 2418540911 + }, + "Value": { + "MaterialAsset": { + "assetId": { + "guid": "{FC69F2F8-F73B-5A0C-B8B7-94BAA45780FC}" + }, + "assetHint": "materials/presets/pbr/metal_brass_polished.azmaterial" + } + } + } + ] + } + } + }, + "Component_[8092226976542590265]": { + "$type": "EditorDisabledCompositionComponent", + "Id": 8092226976542590265 + } + } + }, + "Entity_[2570854721492]": { + "Id": "Entity_[2570854721492]", + "Name": "Entity1", + "Components": { + "Component_[11525365929370623807]": { + "$type": "EditorVisibilityComponent", + "Id": 11525365929370623807 + }, + "Component_[12334620273692642550]": { + "$type": "EditorLockComponent", + "Id": 12334620273692642550 + }, + "Component_[14389735759337977675]": { + "$type": "EditorPendingCompositionComponent", + "Id": 14389735759337977675 + }, + "Component_[16184381538555246534]": { + "$type": "AZ::Render::EditorMeshComponent", + "Id": 16184381538555246534, + "Controller": { + "Configuration": { + "ModelAsset": { + "assetId": { + "guid": "{E14975EF-E676-51A4-B826-3EF59CB645AA}", + "subId": 285127096 + }, + "assetHint": "testdata/objects/cube/cube.azmodel" + } + } + } + }, + "Component_[17962478023087084794]": { + "$type": "SelectionComponent", + "Id": 17962478023087084794 + }, + "Component_[18071675051915092508]": { + "$type": "EditorEntityIconComponent", + "Id": 18071675051915092508 + }, + "Component_[2115498007879087044]": { + "$type": "EditorInspectorComponent", + "Id": 2115498007879087044, + "ComponentOrderEntryArray": [ + { + "ComponentId": 399415038452606756 + }, + { + "ComponentId": 16184381538555246534, + "SortIndex": 1 + }, + { + "ComponentId": 7827190074535394331, + "SortIndex": 2 + } + ] + }, + "Component_[3518973002096080237]": { + "$type": "EditorOnlyEntityComponent", + "Id": 3518973002096080237 + }, + "Component_[399415038452606756]": { + "$type": "{27F1E1A1-8D9D-4C3B-BD3A-AFB9762449C0} TransformComponent", + "Id": 399415038452606756, + "Parent Entity": "ContainerEntity", + "Transform Data": { + "Translate": [ + -2.5305633544921875, + -0.00018183141946792603, + 30.08451271057129 + ] + } + }, + "Component_[4564240319609068082]": { + "$type": "EditorEntitySortComponent", + "Id": 4564240319609068082 + }, + "Component_[7827190074535394331]": { + "$type": "EditorMaterialComponent", + "Id": 7827190074535394331, + "Controller": { + "Configuration": { + "materials": [ + { + "Key": { + "materialSlotStableId": 2418540911 + }, + "Value": { + "MaterialAsset": { + "assetId": { + "guid": "{D0E9960A-4B31-5136-BAC6-5482B203D3B4}" + }, + "assetHint": "materials/presets/pbr/metal_palladium_polished.azmaterial" + } + } + } + ] + } + } + }, + "Component_[8092226976542590265]": { + "$type": "EditorDisabledCompositionComponent", + "Id": 8092226976542590265 + } + } + }, + "Entity_[2575149688788]": { + "Id": "Entity_[2575149688788]", + "Name": "Entity1", + "Components": { + "Component_[11525365929370623807]": { + "$type": "EditorVisibilityComponent", + "Id": 11525365929370623807 + }, + "Component_[12334620273692642550]": { + "$type": "EditorLockComponent", + "Id": 12334620273692642550 + }, + "Component_[14389735759337977675]": { + "$type": "EditorPendingCompositionComponent", + "Id": 14389735759337977675 + }, + "Component_[16184381538555246534]": { + "$type": "AZ::Render::EditorMeshComponent", + "Id": 16184381538555246534, + "Controller": { + "Configuration": { + "ModelAsset": { + "assetId": { + "guid": "{E14975EF-E676-51A4-B826-3EF59CB645AA}", + "subId": 285127096 + }, + "assetHint": "testdata/objects/cube/cube.azmodel" + } + } + } + }, + "Component_[17962478023087084794]": { + "$type": "SelectionComponent", + "Id": 17962478023087084794 + }, + "Component_[18071675051915092508]": { + "$type": "EditorEntityIconComponent", + "Id": 18071675051915092508 + }, + "Component_[2115498007879087044]": { + "$type": "EditorInspectorComponent", + "Id": 2115498007879087044, + "ComponentOrderEntryArray": [ + { + "ComponentId": 399415038452606756 + }, + { + "ComponentId": 16184381538555246534, + "SortIndex": 1 + }, + { + "ComponentId": 7827190074535394331, + "SortIndex": 2 + } + ] + }, + "Component_[3518973002096080237]": { + "$type": "EditorOnlyEntityComponent", + "Id": 3518973002096080237 + }, + "Component_[399415038452606756]": { + "$type": "{27F1E1A1-8D9D-4C3B-BD3A-AFB9762449C0} TransformComponent", + "Id": 399415038452606756, + "Parent Entity": "ContainerEntity", + "Transform Data": { + "Translate": [ + 32.53014373779297, + -0.00018183141946792603, + 59.873046875 + ] + } + }, + "Component_[4564240319609068082]": { + "$type": "EditorEntitySortComponent", + "Id": 4564240319609068082 + }, + "Component_[7827190074535394331]": { + "$type": "EditorMaterialComponent", + "Id": 7827190074535394331, + "Controller": { + "Configuration": { + "materials": [ + { + "Key": { + "materialSlotStableId": 2418540911 + }, + "Value": { + "MaterialAsset": { + "assetId": { + "guid": "{93DF55AE-8D1B-5AD1-A609-05F1BD9F6EA0}" + }, + "assetHint": "materials/presets/pbr/metal_cobalt_polished.azmaterial" + } + } + } + ] + } + } + }, + "Component_[8092226976542590265]": { + "$type": "EditorDisabledCompositionComponent", + "Id": 8092226976542590265 + } + } + }, + "Entity_[2579444656084]": { + "Id": "Entity_[2579444656084]", + "Name": "Entity1", + "Components": { + "Component_[11525365929370623807]": { + "$type": "EditorVisibilityComponent", + "Id": 11525365929370623807 + }, + "Component_[12334620273692642550]": { + "$type": "EditorLockComponent", + "Id": 12334620273692642550 + }, + "Component_[14389735759337977675]": { + "$type": "EditorPendingCompositionComponent", + "Id": 14389735759337977675 + }, + "Component_[16184381538555246534]": { + "$type": "AZ::Render::EditorMeshComponent", + "Id": 16184381538555246534, + "Controller": { + "Configuration": { + "ModelAsset": { + "assetId": { + "guid": "{E14975EF-E676-51A4-B826-3EF59CB645AA}", + "subId": 285127096 + }, + "assetHint": "testdata/objects/cube/cube.azmodel" + } + } + } + }, + "Component_[17962478023087084794]": { + "$type": "SelectionComponent", + "Id": 17962478023087084794 + }, + "Component_[18071675051915092508]": { + "$type": "EditorEntityIconComponent", + "Id": 18071675051915092508 + }, + "Component_[2115498007879087044]": { + "$type": "EditorInspectorComponent", + "Id": 2115498007879087044, + "ComponentOrderEntryArray": [ + { + "ComponentId": 399415038452606756 + }, + { + "ComponentId": 16184381538555246534, + "SortIndex": 1 + }, + { + "ComponentId": 7827190074535394331, + "SortIndex": 2 + } + ] + }, + "Component_[3518973002096080237]": { + "$type": "EditorOnlyEntityComponent", + "Id": 3518973002096080237 + }, + "Component_[399415038452606756]": { + "$type": "{27F1E1A1-8D9D-4C3B-BD3A-AFB9762449C0} TransformComponent", + "Id": 399415038452606756, + "Parent Entity": "ContainerEntity", + "Transform Data": { + "Translate": [ + 42.53014373779297, + -0.00018183141946792603, + 89.95755767822266 + ] + } + }, + "Component_[4564240319609068082]": { + "$type": "EditorEntitySortComponent", + "Id": 4564240319609068082 + }, + "Component_[7827190074535394331]": { + "$type": "EditorMaterialComponent", + "Id": 7827190074535394331, + "Controller": { + "Configuration": { + "materials": [ + { + "Key": { + "materialSlotStableId": 2418540911 + }, + "Value": { + "MaterialAsset": { + "assetId": { + "guid": "{FB4657EB-FB3A-5EC3-A772-DC36D6F733C3}" + }, + "assetHint": "materials/presets/pbr/metal_gold_polished.azmaterial" + } + } + } + ] + } + } + }, + "Component_[8092226976542590265]": { + "$type": "EditorDisabledCompositionComponent", + "Id": 8092226976542590265 + } + } + }, + "Entity_[2583739623380]": { + "Id": "Entity_[2583739623380]", + "Name": "Entity1", + "Components": { + "Component_[11525365929370623807]": { + "$type": "EditorVisibilityComponent", + "Id": 11525365929370623807 + }, + "Component_[12334620273692642550]": { + "$type": "EditorLockComponent", + "Id": 12334620273692642550 + }, + "Component_[14389735759337977675]": { + "$type": "EditorPendingCompositionComponent", + "Id": 14389735759337977675 + }, + "Component_[16184381538555246534]": { + "$type": "AZ::Render::EditorMeshComponent", + "Id": 16184381538555246534, + "Controller": { + "Configuration": { + "ModelAsset": { + "assetId": { + "guid": "{E14975EF-E676-51A4-B826-3EF59CB645AA}", + "subId": 285127096 + }, + "assetHint": "testdata/objects/cube/cube.azmodel" + } + } + } + }, + "Component_[17962478023087084794]": { + "$type": "SelectionComponent", + "Id": 17962478023087084794 + }, + "Component_[18071675051915092508]": { + "$type": "EditorEntityIconComponent", + "Id": 18071675051915092508 + }, + "Component_[2115498007879087044]": { + "$type": "EditorInspectorComponent", + "Id": 2115498007879087044, + "ComponentOrderEntryArray": [ + { + "ComponentId": 399415038452606756 + }, + { + "ComponentId": 16184381538555246534, + "SortIndex": 1 + }, + { + "ComponentId": 7827190074535394331, + "SortIndex": 2 + } + ] + }, + "Component_[3518973002096080237]": { + "$type": "EditorOnlyEntityComponent", + "Id": 3518973002096080237 + }, + "Component_[399415038452606756]": { + "$type": "{27F1E1A1-8D9D-4C3B-BD3A-AFB9762449C0} TransformComponent", + "Id": 399415038452606756, + "Parent Entity": "ContainerEntity", + "Transform Data": { + "Translate": [ + 17.53014373779297, + -0.00018183141946792603, + 79.38228607177734 + ] + } + }, + "Component_[4564240319609068082]": { + "$type": "EditorEntitySortComponent", + "Id": 4564240319609068082 + }, + "Component_[7827190074535394331]": { + "$type": "EditorMaterialComponent", + "Id": 7827190074535394331, + "Controller": { + "Configuration": { + "materials": [ + { + "Key": {}, + "Value": { + "MaterialAsset": { + "assetId": { + "guid": "{721188E0-B7CC-5D06-8D5D-39AF8ABF2EF9}" + }, + "assetHint": "materials/presets/pbr/metal_titanium.azmaterial" + } + } + }, + { + "Key": { + "materialSlotStableId": 2418540911 + }, + "Value": { + "MaterialAsset": { + "assetId": { + "guid": "{549D26B8-881D-569F-AF05-961F36A43F4F}" + }, + "assetHint": "materials/presets/pbr/metal_aluminum_matte.azmaterial" + } + } + } + ] + } + } + }, + "Component_[8092226976542590265]": { + "$type": "EditorDisabledCompositionComponent", + "Id": 8092226976542590265 + } + } + }, + "Entity_[2588034590676]": { + "Id": "Entity_[2588034590676]", + "Name": "Entity1", + "Components": { + "Component_[11525365929370623807]": { + "$type": "EditorVisibilityComponent", + "Id": 11525365929370623807 + }, + "Component_[12334620273692642550]": { + "$type": "EditorLockComponent", + "Id": 12334620273692642550 + }, + "Component_[14389735759337977675]": { + "$type": "EditorPendingCompositionComponent", + "Id": 14389735759337977675 + }, + "Component_[16184381538555246534]": { + "$type": "AZ::Render::EditorMeshComponent", + "Id": 16184381538555246534, + "Controller": { + "Configuration": { + "ModelAsset": { + "assetId": { + "guid": "{E14975EF-E676-51A4-B826-3EF59CB645AA}", + "subId": 285127096 + }, + "assetHint": "testdata/objects/cube/cube.azmodel" + } + } + } + }, + "Component_[17962478023087084794]": { + "$type": "SelectionComponent", + "Id": 17962478023087084794 + }, + "Component_[18071675051915092508]": { + "$type": "EditorEntityIconComponent", + "Id": 18071675051915092508 + }, + "Component_[2115498007879087044]": { + "$type": "EditorInspectorComponent", + "Id": 2115498007879087044, + "ComponentOrderEntryArray": [ + { + "ComponentId": 399415038452606756 + }, + { + "ComponentId": 16184381538555246534, + "SortIndex": 1 + }, + { + "ComponentId": 7827190074535394331, + "SortIndex": 2 + } + ] + }, + "Component_[3518973002096080237]": { + "$type": "EditorOnlyEntityComponent", + "Id": 3518973002096080237 + }, + "Component_[399415038452606756]": { + "$type": "{27F1E1A1-8D9D-4C3B-BD3A-AFB9762449C0} TransformComponent", + "Id": 399415038452606756, + "Parent Entity": "ContainerEntity", + "Transform Data": { + "Translate": [ + -2.5305633544921875, + -0.00018183141946792603, + 54.618019104003906 + ] + } + }, + "Component_[4564240319609068082]": { + "$type": "EditorEntitySortComponent", + "Id": 4564240319609068082 + }, + "Component_[7827190074535394331]": { + "$type": "EditorMaterialComponent", + "Id": 7827190074535394331, + "Controller": { + "Configuration": { + "materials": [ + { + "Key": { + "materialSlotStableId": 2418540911 + }, + "Value": { + "MaterialAsset": { + "assetId": { + "guid": "{DC0598ED-1EDD-5B37-892E-E0867621D74C}" + }, + "assetHint": "materials/presets/pbr/metal_palladium.azmaterial" + } + } + } + ] + } + } + }, + "Component_[8092226976542590265]": { + "$type": "EditorDisabledCompositionComponent", + "Id": 8092226976542590265 + } + } + }, + "Entity_[2592329557972]": { + "Id": "Entity_[2592329557972]", + "Name": "Entity1", + "Components": { + "Component_[11525365929370623807]": { + "$type": "EditorVisibilityComponent", + "Id": 11525365929370623807 + }, + "Component_[12334620273692642550]": { + "$type": "EditorLockComponent", + "Id": 12334620273692642550 + }, + "Component_[14389735759337977675]": { + "$type": "EditorPendingCompositionComponent", + "Id": 14389735759337977675 + }, + "Component_[16184381538555246534]": { + "$type": "AZ::Render::EditorMeshComponent", + "Id": 16184381538555246534, + "Controller": { + "Configuration": { + "ModelAsset": { + "assetId": { + "guid": "{E14975EF-E676-51A4-B826-3EF59CB645AA}", + "subId": 285127096 + }, + "assetHint": "testdata/objects/cube/cube.azmodel" + } + } + } + }, + "Component_[17962478023087084794]": { + "$type": "SelectionComponent", + "Id": 17962478023087084794 + }, + "Component_[18071675051915092508]": { + "$type": "EditorEntityIconComponent", + "Id": 18071675051915092508 + }, + "Component_[2115498007879087044]": { + "$type": "EditorInspectorComponent", + "Id": 2115498007879087044, + "ComponentOrderEntryArray": [ + { + "ComponentId": 399415038452606756 + }, + { + "ComponentId": 16184381538555246534, + "SortIndex": 1 + }, + { + "ComponentId": 7827190074535394331, + "SortIndex": 2 + } + ] + }, + "Component_[3518973002096080237]": { + "$type": "EditorOnlyEntityComponent", + "Id": 3518973002096080237 + }, + "Component_[399415038452606756]": { + "$type": "{27F1E1A1-8D9D-4C3B-BD3A-AFB9762449C0} TransformComponent", + "Id": 399415038452606756, + "Parent Entity": "ContainerEntity", + "Transform Data": { + "Translate": [ + -37.53056335449219, + -0.00018183141946792603, + 99.43339538574219 + ] + } + }, + "Component_[4564240319609068082]": { + "$type": "EditorEntitySortComponent", + "Id": 4564240319609068082 + }, + "Component_[7827190074535394331]": { + "$type": "EditorMaterialComponent", + "Id": 7827190074535394331, + "Controller": { + "Configuration": { + "materials": [ + { + "Key": { + "materialSlotStableId": 2418540911 + }, + "Value": { + "MaterialAsset": { + "assetId": { + "guid": "{B7C712DC-4839-58BB-B522-A4F120084CF5}" + }, + "assetHint": "materials/presets/pbr/metal_chrome.azmaterial" + } + } + } + ] + } + } + }, + "Component_[8092226976542590265]": { + "$type": "EditorDisabledCompositionComponent", + "Id": 8092226976542590265 + } + } + }, + "Entity_[2596624525268]": { + "Id": "Entity_[2596624525268]", + "Name": "Entity1", + "Components": { + "Component_[11525365929370623807]": { + "$type": "EditorVisibilityComponent", + "Id": 11525365929370623807 + }, + "Component_[12334620273692642550]": { + "$type": "EditorLockComponent", + "Id": 12334620273692642550 + }, + "Component_[14389735759337977675]": { + "$type": "EditorPendingCompositionComponent", + "Id": 14389735759337977675 + }, + "Component_[16184381538555246534]": { + "$type": "AZ::Render::EditorMeshComponent", + "Id": 16184381538555246534, + "Controller": { + "Configuration": { + "ModelAsset": { + "assetId": { + "guid": "{E14975EF-E676-51A4-B826-3EF59CB645AA}", + "subId": 285127096 + }, + "assetHint": "testdata/objects/cube/cube.azmodel" + } + } + } + }, + "Component_[17962478023087084794]": { + "$type": "SelectionComponent", + "Id": 17962478023087084794 + }, + "Component_[18071675051915092508]": { + "$type": "EditorEntityIconComponent", + "Id": 18071675051915092508 + }, + "Component_[2115498007879087044]": { + "$type": "EditorInspectorComponent", + "Id": 2115498007879087044, + "ComponentOrderEntryArray": [ + { + "ComponentId": 399415038452606756 + }, + { + "ComponentId": 16184381538555246534, + "SortIndex": 1 + }, + { + "ComponentId": 7827190074535394331, + "SortIndex": 2 + } + ] + }, + "Component_[3518973002096080237]": { + "$type": "EditorOnlyEntityComponent", + "Id": 3518973002096080237 + }, + "Component_[399415038452606756]": { + "$type": "{27F1E1A1-8D9D-4C3B-BD3A-AFB9762449C0} TransformComponent", + "Id": 399415038452606756, + "Parent Entity": "ContainerEntity", + "Transform Data": { + "Translate": [ + -37.53056335449219, + -0.00018183141946792603, + 39.56034851074219 + ] + } + }, + "Component_[4564240319609068082]": { + "$type": "EditorEntitySortComponent", + "Id": 4564240319609068082 + }, + "Component_[7827190074535394331]": { + "$type": "EditorMaterialComponent", + "Id": 7827190074535394331, + "Controller": { + "Configuration": { + "materials": [ + { + "Key": { + "materialSlotStableId": 2418540911 + }, + "Value": { + "MaterialAsset": { + "assetId": { + "guid": "{B7C712DC-4839-58BB-B522-A4F120084CF5}" + }, + "assetHint": "materials/presets/pbr/metal_chrome.azmaterial" + } + } + } + ] + } + } + }, + "Component_[8092226976542590265]": { + "$type": "EditorDisabledCompositionComponent", + "Id": 8092226976542590265 + } + } + }, + "Entity_[2600919492564]": { + "Id": "Entity_[2600919492564]", + "Name": "Entity1", + "Components": { + "Component_[11525365929370623807]": { + "$type": "EditorVisibilityComponent", + "Id": 11525365929370623807 + }, + "Component_[12334620273692642550]": { + "$type": "EditorLockComponent", + "Id": 12334620273692642550 + }, + "Component_[14389735759337977675]": { + "$type": "EditorPendingCompositionComponent", + "Id": 14389735759337977675 + }, + "Component_[16184381538555246534]": { + "$type": "AZ::Render::EditorMeshComponent", + "Id": 16184381538555246534, + "Controller": { + "Configuration": { + "ModelAsset": { + "assetId": { + "guid": "{E14975EF-E676-51A4-B826-3EF59CB645AA}", + "subId": 285127096 + }, + "assetHint": "testdata/objects/cube/cube.azmodel" + } + } + } + }, + "Component_[17962478023087084794]": { + "$type": "SelectionComponent", + "Id": 17962478023087084794 + }, + "Component_[18071675051915092508]": { + "$type": "EditorEntityIconComponent", + "Id": 18071675051915092508 + }, + "Component_[2115498007879087044]": { + "$type": "EditorInspectorComponent", + "Id": 2115498007879087044, + "ComponentOrderEntryArray": [ + { + "ComponentId": 399415038452606756 + }, + { + "ComponentId": 16184381538555246534, + "SortIndex": 1 + }, + { + "ComponentId": 7827190074535394331, + "SortIndex": 2 + } + ] + }, + "Component_[3518973002096080237]": { + "$type": "EditorOnlyEntityComponent", + "Id": 3518973002096080237 + }, + "Component_[399415038452606756]": { + "$type": "{27F1E1A1-8D9D-4C3B-BD3A-AFB9762449C0} TransformComponent", + "Id": 399415038452606756, + "Parent Entity": "ContainerEntity", + "Transform Data": { + "Translate": [ + 32.53014373779297, + -0.00018183141946792603, + 39.56034851074219 + ] + } + }, + "Component_[4564240319609068082]": { + "$type": "EditorEntitySortComponent", + "Id": 4564240319609068082 + }, + "Component_[7827190074535394331]": { + "$type": "EditorMaterialComponent", + "Id": 7827190074535394331, + "Controller": { + "Configuration": { + "materials": [ + { + "Key": { + "materialSlotStableId": 2418540911 + }, + "Value": { + "MaterialAsset": { + "assetId": { + "guid": "{99976D73-6248-5D66-AD15-E8F52B0AFE36}" + }, + "assetHint": "materials/presets/pbr/metal_cobalt.azmaterial" + } + } + } + ] + } + } + }, + "Component_[8092226976542590265]": { + "$type": "EditorDisabledCompositionComponent", + "Id": 8092226976542590265 + } + } + }, + "Entity_[2605214459860]": { + "Id": "Entity_[2605214459860]", + "Name": "Entity1", + "Components": { + "Component_[11525365929370623807]": { + "$type": "EditorVisibilityComponent", + "Id": 11525365929370623807 + }, + "Component_[12334620273692642550]": { + "$type": "EditorLockComponent", + "Id": 12334620273692642550 + }, + "Component_[14389735759337977675]": { + "$type": "EditorPendingCompositionComponent", + "Id": 14389735759337977675 + }, + "Component_[16184381538555246534]": { + "$type": "AZ::Render::EditorMeshComponent", + "Id": 16184381538555246534, + "Controller": { + "Configuration": { + "ModelAsset": { + "assetId": { + "guid": "{E14975EF-E676-51A4-B826-3EF59CB645AA}", + "subId": 285127096 + }, + "assetHint": "testdata/objects/cube/cube.azmodel" + } + } + } + }, + "Component_[17962478023087084794]": { + "$type": "SelectionComponent", + "Id": 17962478023087084794 + }, + "Component_[18071675051915092508]": { + "$type": "EditorEntityIconComponent", + "Id": 18071675051915092508 + }, + "Component_[2115498007879087044]": { + "$type": "EditorInspectorComponent", + "Id": 2115498007879087044, + "ComponentOrderEntryArray": [ + { + "ComponentId": 399415038452606756 + }, + { + "ComponentId": 16184381538555246534, + "SortIndex": 1 + }, + { + "ComponentId": 7827190074535394331, + "SortIndex": 2 + } + ] + }, + "Component_[3518973002096080237]": { + "$type": "EditorOnlyEntityComponent", + "Id": 3518973002096080237 + }, + "Component_[399415038452606756]": { + "$type": "{27F1E1A1-8D9D-4C3B-BD3A-AFB9762449C0} TransformComponent", + "Id": 399415038452606756, + "Parent Entity": "ContainerEntity", + "Transform Data": { + "Translate": [ + 17.53014373779297, + -0.00018183141946792603, + 9.475835800170898 + ] + } + }, + "Component_[4564240319609068082]": { + "$type": "EditorEntitySortComponent", + "Id": 4564240319609068082 + }, + "Component_[7827190074535394331]": { + "$type": "EditorMaterialComponent", + "Id": 7827190074535394331, + "Controller": { + "Configuration": { + "materials": [ + { + "Key": {}, + "Value": { + "MaterialAsset": { + "assetId": { + "guid": "{721188E0-B7CC-5D06-8D5D-39AF8ABF2EF9}" + }, + "assetHint": "materials/presets/pbr/metal_titanium.azmaterial" + } + } + }, + { + "Key": { + "materialSlotStableId": 2418540911 + }, + "Value": { + "MaterialAsset": { + "assetId": { + "guid": "{94CF2BD7-7D09-5577-B1D8-3FF85B15E127}" + }, + "assetHint": "materials/presets/pbr/metal_aluminum.azmaterial" + } + } + } + ] + } + } + }, + "Component_[8092226976542590265]": { + "$type": "EditorDisabledCompositionComponent", + "Id": 8092226976542590265 + } + } + }, + "Entity_[2609509427156]": { + "Id": "Entity_[2609509427156]", + "Name": "Entity1", + "Components": { + "Component_[11525365929370623807]": { + "$type": "EditorVisibilityComponent", + "Id": 11525365929370623807 + }, + "Component_[12334620273692642550]": { + "$type": "EditorLockComponent", + "Id": 12334620273692642550 + }, + "Component_[14389735759337977675]": { + "$type": "EditorPendingCompositionComponent", + "Id": 14389735759337977675 + }, + "Component_[16184381538555246534]": { + "$type": "AZ::Render::EditorMeshComponent", + "Id": 16184381538555246534, + "Controller": { + "Configuration": { + "ModelAsset": { + "assetId": { + "guid": "{E14975EF-E676-51A4-B826-3EF59CB645AA}", + "subId": 285127096 + }, + "assetHint": "testdata/objects/cube/cube.azmodel" + } + } + } + }, + "Component_[17962478023087084794]": { + "$type": "SelectionComponent", + "Id": 17962478023087084794 + }, + "Component_[18071675051915092508]": { + "$type": "EditorEntityIconComponent", + "Id": 18071675051915092508 + }, + "Component_[2115498007879087044]": { + "$type": "EditorInspectorComponent", + "Id": 2115498007879087044, + "ComponentOrderEntryArray": [ + { + "ComponentId": 399415038452606756 + }, + { + "ComponentId": 16184381538555246534, + "SortIndex": 1 + }, + { + "ComponentId": 7827190074535394331, + "SortIndex": 2 + } + ] + }, + "Component_[3518973002096080237]": { + "$type": "EditorOnlyEntityComponent", + "Id": 3518973002096080237 + }, + "Component_[399415038452606756]": { + "$type": "{27F1E1A1-8D9D-4C3B-BD3A-AFB9762449C0} TransformComponent", + "Id": 399415038452606756, + "Parent Entity": "ContainerEntity", + "Transform Data": { + "Translate": [ + -27.530563354492188, + -0.00018183141946792603, + 84.40655517578125 + ] + } + }, + "Component_[4564240319609068082]": { + "$type": "EditorEntitySortComponent", + "Id": 4564240319609068082 + }, + "Component_[7827190074535394331]": { + "$type": "EditorMaterialComponent", + "Id": 7827190074535394331, + "Controller": { + "Configuration": { + "materials": [ + { + "Key": { + "materialSlotStableId": 2418540911 + }, + "Value": { + "MaterialAsset": { + "assetId": { + "guid": "{E621C5BF-B8E1-55F0-A791-EC960F2FA46F}" + }, + "assetHint": "materials/presets/pbr/metal_copper.azmaterial" + } + } + } + ] + } + } + }, + "Component_[8092226976542590265]": { + "$type": "EditorDisabledCompositionComponent", + "Id": 8092226976542590265 + } + } + }, + "Entity_[2613804394452]": { + "Id": "Entity_[2613804394452]", + "Name": "Entity1", + "Components": { + "Component_[11525365929370623807]": { + "$type": "EditorVisibilityComponent", + "Id": 11525365929370623807 + }, + "Component_[12334620273692642550]": { + "$type": "EditorLockComponent", + "Id": 12334620273692642550 + }, + "Component_[14389735759337977675]": { + "$type": "EditorPendingCompositionComponent", + "Id": 14389735759337977675 + }, + "Component_[16184381538555246534]": { + "$type": "AZ::Render::EditorMeshComponent", + "Id": 16184381538555246534, + "Controller": { + "Configuration": { + "ModelAsset": { + "assetId": { + "guid": "{E14975EF-E676-51A4-B826-3EF59CB645AA}", + "subId": 285127096 + }, + "assetHint": "testdata/objects/cube/cube.azmodel" + } + } + } + }, + "Component_[17962478023087084794]": { + "$type": "SelectionComponent", + "Id": 17962478023087084794 + }, + "Component_[18071675051915092508]": { + "$type": "EditorEntityIconComponent", + "Id": 18071675051915092508 + }, + "Component_[2115498007879087044]": { + "$type": "EditorInspectorComponent", + "Id": 2115498007879087044, + "ComponentOrderEntryArray": [ + { + "ComponentId": 399415038452606756 + }, + { + "ComponentId": 16184381538555246534, + "SortIndex": 1 + }, + { + "ComponentId": 7827190074535394331, + "SortIndex": 2 + } + ] + }, + "Component_[3518973002096080237]": { + "$type": "EditorOnlyEntityComponent", + "Id": 3518973002096080237 + }, + "Component_[399415038452606756]": { + "$type": "{27F1E1A1-8D9D-4C3B-BD3A-AFB9762449C0} TransformComponent", + "Id": 399415038452606756, + "Parent Entity": "ContainerEntity", + "Transform Data": { + "Translate": [ + 22.53014373779297, + -0.00018183141946792603, + 15.057670593261719 + ] + } + }, + "Component_[4564240319609068082]": { + "$type": "EditorEntitySortComponent", + "Id": 4564240319609068082 + }, + "Component_[7827190074535394331]": { + "$type": "EditorMaterialComponent", + "Id": 7827190074535394331, + "Controller": { + "Configuration": { + "materials": [ + { + "Key": { + "materialSlotStableId": 2418540911 + }, + "Value": { + "MaterialAsset": { + "assetId": { + "guid": "{FC69F2F8-F73B-5A0C-B8B7-94BAA45780FC}" + }, + "assetHint": "materials/presets/pbr/metal_brass_polished.azmaterial" + } + } + } + ] + } + } + }, + "Component_[8092226976542590265]": { + "$type": "EditorDisabledCompositionComponent", + "Id": 8092226976542590265 + } + } + }, + "Entity_[2618099361748]": { + "Id": "Entity_[2618099361748]", + "Name": "Entity1", + "Components": { + "Component_[11525365929370623807]": { + "$type": "EditorVisibilityComponent", + "Id": 11525365929370623807 + }, + "Component_[12334620273692642550]": { + "$type": "EditorLockComponent", + "Id": 12334620273692642550 + }, + "Component_[14389735759337977675]": { + "$type": "EditorPendingCompositionComponent", + "Id": 14389735759337977675 + }, + "Component_[16184381538555246534]": { + "$type": "AZ::Render::EditorMeshComponent", + "Id": 16184381538555246534, + "Controller": { + "Configuration": { + "ModelAsset": { + "assetId": { + "guid": "{E14975EF-E676-51A4-B826-3EF59CB645AA}", + "subId": 285127096 + }, + "assetHint": "testdata/objects/cube/cube.azmodel" + } + } + } + }, + "Component_[17962478023087084794]": { + "$type": "SelectionComponent", + "Id": 17962478023087084794 + }, + "Component_[18071675051915092508]": { + "$type": "EditorEntityIconComponent", + "Id": 18071675051915092508 + }, + "Component_[2115498007879087044]": { + "$type": "EditorInspectorComponent", + "Id": 2115498007879087044, + "ComponentOrderEntryArray": [ + { + "ComponentId": 399415038452606756 + }, + { + "ComponentId": 16184381538555246534, + "SortIndex": 1 + }, + { + "ComponentId": 7827190074535394331, + "SortIndex": 2 + } + ] + }, + "Component_[3518973002096080237]": { + "$type": "EditorOnlyEntityComponent", + "Id": 3518973002096080237 + }, + "Component_[399415038452606756]": { + "$type": "{27F1E1A1-8D9D-4C3B-BD3A-AFB9762449C0} TransformComponent", + "Id": 399415038452606756, + "Parent Entity": "ContainerEntity", + "Transform Data": { + "Translate": [ + -47.53056335449219, + -0.00018183141946792603, + 84.40655517578125 + ] + } + }, + "Component_[4564240319609068082]": { + "$type": "EditorEntitySortComponent", + "Id": 4564240319609068082 + }, + "Component_[7827190074535394331]": { + "$type": "EditorMaterialComponent", + "Id": 7827190074535394331, + "Controller": { + "Configuration": { + "materials": [ + { + "Key": { + "materialSlotStableId": 2418540911 + }, + "Value": { + "MaterialAsset": { + "assetId": { + "guid": "{94CF2BD7-7D09-5577-B1D8-3FF85B15E127}" + }, + "assetHint": "materials/presets/pbr/metal_aluminum.azmaterial" + } + } + } + ] + } + } + }, + "Component_[8092226976542590265]": { + "$type": "EditorDisabledCompositionComponent", + "Id": 8092226976542590265 + } + } + }, + "Entity_[2622394329044]": { + "Id": "Entity_[2622394329044]", + "Name": "Entity1", + "Components": { + "Component_[11525365929370623807]": { + "$type": "EditorVisibilityComponent", + "Id": 11525365929370623807 + }, + "Component_[12334620273692642550]": { + "$type": "EditorLockComponent", + "Id": 12334620273692642550 + }, + "Component_[14389735759337977675]": { + "$type": "EditorPendingCompositionComponent", + "Id": 14389735759337977675 + }, + "Component_[16184381538555246534]": { + "$type": "AZ::Render::EditorMeshComponent", + "Id": 16184381538555246534, + "Controller": { + "Configuration": { + "ModelAsset": { + "assetId": { + "guid": "{E14975EF-E676-51A4-B826-3EF59CB645AA}", + "subId": 285127096 + }, + "assetHint": "testdata/objects/cube/cube.azmodel" + } + } + } + }, + "Component_[17962478023087084794]": { + "$type": "SelectionComponent", + "Id": 17962478023087084794 + }, + "Component_[18071675051915092508]": { + "$type": "EditorEntityIconComponent", + "Id": 18071675051915092508 + }, + "Component_[2115498007879087044]": { + "$type": "EditorInspectorComponent", + "Id": 2115498007879087044, + "ComponentOrderEntryArray": [ + { + "ComponentId": 399415038452606756 + }, + { + "ComponentId": 16184381538555246534, + "SortIndex": 1 + }, + { + "ComponentId": 7827190074535394331, + "SortIndex": 2 + } + ] + }, + "Component_[3518973002096080237]": { + "$type": "EditorOnlyEntityComponent", + "Id": 3518973002096080237 + }, + "Component_[399415038452606756]": { + "$type": "{27F1E1A1-8D9D-4C3B-BD3A-AFB9762449C0} TransformComponent", + "Id": 399415038452606756, + "Parent Entity": "ContainerEntity", + "Transform Data": { + "Translate": [ + -17.530563354492188, + -0.00018183141946792603, + 54.618019104003906 + ] + } + }, + "Component_[4564240319609068082]": { + "$type": "EditorEntitySortComponent", + "Id": 4564240319609068082 + }, + "Component_[7827190074535394331]": { + "$type": "EditorMaterialComponent", + "Id": 7827190074535394331, + "Controller": { + "Configuration": { + "materials": [ + { + "Key": { + "materialSlotStableId": 2418540911 + }, + "Value": { + "MaterialAsset": { + "assetId": { + "guid": "{892EA944-0325-5FA6-94D7-4AB4FC02A0F5}" + }, + "assetHint": "materials/presets/pbr/metal_iron.azmaterial" + } + } + } + ] + } + } + }, + "Component_[8092226976542590265]": { + "$type": "EditorDisabledCompositionComponent", + "Id": 8092226976542590265 + } + } + }, + "Entity_[2626689296340]": { + "Id": "Entity_[2626689296340]", + "Name": "Entity1", + "Components": { + "Component_[11525365929370623807]": { + "$type": "EditorVisibilityComponent", + "Id": 11525365929370623807 + }, + "Component_[12334620273692642550]": { + "$type": "EditorLockComponent", + "Id": 12334620273692642550 + }, + "Component_[14389735759337977675]": { + "$type": "EditorPendingCompositionComponent", + "Id": 14389735759337977675 + }, + "Component_[16184381538555246534]": { + "$type": "AZ::Render::EditorMeshComponent", + "Id": 16184381538555246534, + "Controller": { + "Configuration": { + "ModelAsset": { + "assetId": { + "guid": "{E14975EF-E676-51A4-B826-3EF59CB645AA}", + "subId": 285127096 + }, + "assetHint": "testdata/objects/cube/cube.azmodel" + } + } + } + }, + "Component_[17962478023087084794]": { + "$type": "SelectionComponent", + "Id": 17962478023087084794 + }, + "Component_[18071675051915092508]": { + "$type": "EditorEntityIconComponent", + "Id": 18071675051915092508 + }, + "Component_[2115498007879087044]": { + "$type": "EditorInspectorComponent", + "Id": 2115498007879087044, + "ComponentOrderEntryArray": [ + { + "ComponentId": 399415038452606756 + }, + { + "ComponentId": 16184381538555246534, + "SortIndex": 1 + }, + { + "ComponentId": 7827190074535394331, + "SortIndex": 2 + } + ] + }, + "Component_[3518973002096080237]": { + "$type": "EditorOnlyEntityComponent", + "Id": 3518973002096080237 + }, + "Component_[399415038452606756]": { + "$type": "{27F1E1A1-8D9D-4C3B-BD3A-AFB9762449C0} TransformComponent", + "Id": 399415038452606756, + "Parent Entity": "ContainerEntity", + "Transform Data": { + "Translate": [ + 42.53014373779297, + -0.00018183141946792603, + 39.56034851074219 + ] + } + }, + "Component_[4564240319609068082]": { + "$type": "EditorEntitySortComponent", + "Id": 4564240319609068082 + }, + "Component_[7827190074535394331]": { + "$type": "EditorMaterialComponent", + "Id": 7827190074535394331, + "Controller": { + "Configuration": { + "materials": [ + { + "Key": { + "materialSlotStableId": 2418540911 + }, + "Value": { + "MaterialAsset": { + "assetId": { + "guid": "{FE52E7C8-064D-506A-9C26-433EB93747DE}" + }, + "assetHint": "materials/presets/pbr/metal_gold.azmaterial" + } + } + } + ] + } + } + }, + "Component_[8092226976542590265]": { + "$type": "EditorDisabledCompositionComponent", + "Id": 8092226976542590265 + } + } + }, + "Entity_[2630984263636]": { + "Id": "Entity_[2630984263636]", + "Name": "Entity1", + "Components": { + "Component_[11525365929370623807]": { + "$type": "EditorVisibilityComponent", + "Id": 11525365929370623807 + }, + "Component_[12334620273692642550]": { + "$type": "EditorLockComponent", + "Id": 12334620273692642550 + }, + "Component_[14389735759337977675]": { + "$type": "EditorPendingCompositionComponent", + "Id": 14389735759337977675 + }, + "Component_[16184381538555246534]": { + "$type": "AZ::Render::EditorMeshComponent", + "Id": 16184381538555246534, + "Controller": { + "Configuration": { + "ModelAsset": { + "assetId": { + "guid": "{E14975EF-E676-51A4-B826-3EF59CB645AA}", + "subId": 285127096 + }, + "assetHint": "testdata/objects/cube/cube.azmodel" + } + } + } + }, + "Component_[17962478023087084794]": { + "$type": "SelectionComponent", + "Id": 17962478023087084794 + }, + "Component_[18071675051915092508]": { + "$type": "EditorEntityIconComponent", + "Id": 18071675051915092508 + }, + "Component_[2115498007879087044]": { + "$type": "EditorInspectorComponent", + "Id": 2115498007879087044, + "ComponentOrderEntryArray": [ + { + "ComponentId": 399415038452606756 + }, + { + "ComponentId": 16184381538555246534, + "SortIndex": 1 + }, + { + "ComponentId": 7827190074535394331, + "SortIndex": 2 + } + ] + }, + "Component_[3518973002096080237]": { + "$type": "EditorOnlyEntityComponent", + "Id": 3518973002096080237 + }, + "Component_[399415038452606756]": { + "$type": "{27F1E1A1-8D9D-4C3B-BD3A-AFB9762449C0} TransformComponent", + "Id": 399415038452606756, + "Parent Entity": "ContainerEntity", + "Transform Data": { + "Translate": [ + 22.53014373779297, + -0.00018183141946792603, + 64.32462310791016 + ] + } + }, + "Component_[4564240319609068082]": { + "$type": "EditorEntitySortComponent", + "Id": 4564240319609068082 + }, + "Component_[7827190074535394331]": { + "$type": "EditorMaterialComponent", + "Id": 7827190074535394331, + "Controller": { + "Configuration": { + "materials": [ + { + "Key": { + "materialSlotStableId": 2418540911 + }, + "Value": { + "MaterialAsset": { + "assetId": { + "guid": "{AE350D9F-0000-526D-B49C-4303D687BB86}" + }, + "assetHint": "materials/presets/pbr/metal_brass_matte.azmaterial" + } + } + } + ] + } + } + }, + "Component_[8092226976542590265]": { + "$type": "EditorDisabledCompositionComponent", + "Id": 8092226976542590265 + } + } + }, + "Entity_[2635279230932]": { + "Id": "Entity_[2635279230932]", + "Name": "Entity1", + "Components": { + "Component_[11525365929370623807]": { + "$type": "EditorVisibilityComponent", + "Id": 11525365929370623807 + }, + "Component_[12334620273692642550]": { + "$type": "EditorLockComponent", + "Id": 12334620273692642550 + }, + "Component_[14389735759337977675]": { + "$type": "EditorPendingCompositionComponent", + "Id": 14389735759337977675 + }, + "Component_[16184381538555246534]": { + "$type": "AZ::Render::EditorMeshComponent", + "Id": 16184381538555246534, + "Controller": { + "Configuration": { + "ModelAsset": { + "assetId": { + "guid": "{E14975EF-E676-51A4-B826-3EF59CB645AA}", + "subId": 285127096 + }, + "assetHint": "testdata/objects/cube/cube.azmodel" + } + } + } + }, + "Component_[17962478023087084794]": { + "$type": "SelectionComponent", + "Id": 17962478023087084794 + }, + "Component_[18071675051915092508]": { + "$type": "EditorEntityIconComponent", + "Id": 18071675051915092508 + }, + "Component_[2115498007879087044]": { + "$type": "EditorInspectorComponent", + "Id": 2115498007879087044, + "ComponentOrderEntryArray": [ + { + "ComponentId": 399415038452606756 + }, + { + "ComponentId": 16184381538555246534, + "SortIndex": 1 + }, + { + "ComponentId": 7827190074535394331, + "SortIndex": 2 + } + ] + }, + "Component_[3518973002096080237]": { + "$type": "EditorOnlyEntityComponent", + "Id": 3518973002096080237 + }, + "Component_[399415038452606756]": { + "$type": "{27F1E1A1-8D9D-4C3B-BD3A-AFB9762449C0} TransformComponent", + "Id": 399415038452606756, + "Parent Entity": "ContainerEntity", + "Transform Data": { + "Translate": [ + -7.5305633544921875, + -0.00018183141946792603, + 74.93071746826172 + ] + } + }, + "Component_[4564240319609068082]": { + "$type": "EditorEntitySortComponent", + "Id": 4564240319609068082 + }, + "Component_[7827190074535394331]": { + "$type": "EditorMaterialComponent", + "Id": 7827190074535394331, + "Controller": { + "Configuration": { + "materials": [ + { + "Key": { + "materialSlotStableId": 2418540911 + }, + "Value": { + "MaterialAsset": { + "assetId": { + "guid": "{E66E4343-F45A-536D-AAE1-C4D096420640}" + }, + "assetHint": "materials/presets/pbr/metal_nickel_polished.azmaterial" + } + } + } + ] + } + } + }, + "Component_[8092226976542590265]": { + "$type": "EditorDisabledCompositionComponent", + "Id": 8092226976542590265 + } + } + }, + "Entity_[2639574198228]": { + "Id": "Entity_[2639574198228]", + "Name": "Entity1", + "Components": { + "Component_[11525365929370623807]": { + "$type": "EditorVisibilityComponent", + "Id": 11525365929370623807 + }, + "Component_[12334620273692642550]": { + "$type": "EditorLockComponent", + "Id": 12334620273692642550 + }, + "Component_[14389735759337977675]": { + "$type": "EditorPendingCompositionComponent", + "Id": 14389735759337977675 + }, + "Component_[16184381538555246534]": { + "$type": "AZ::Render::EditorMeshComponent", + "Id": 16184381538555246534, + "Controller": { + "Configuration": { + "ModelAsset": { + "assetId": { + "guid": "{E14975EF-E676-51A4-B826-3EF59CB645AA}", + "subId": 285127096 + }, + "assetHint": "testdata/objects/cube/cube.azmodel" + } + } + } + }, + "Component_[17962478023087084794]": { + "$type": "SelectionComponent", + "Id": 17962478023087084794 + }, + "Component_[18071675051915092508]": { + "$type": "EditorEntityIconComponent", + "Id": 18071675051915092508 + }, + "Component_[2115498007879087044]": { + "$type": "EditorInspectorComponent", + "Id": 2115498007879087044, + "ComponentOrderEntryArray": [ + { + "ComponentId": 399415038452606756 + }, + { + "ComponentId": 16184381538555246534, + "SortIndex": 1 + }, + { + "ComponentId": 7827190074535394331, + "SortIndex": 2 + } + ] + }, + "Component_[3518973002096080237]": { + "$type": "EditorOnlyEntityComponent", + "Id": 3518973002096080237 + }, + "Component_[399415038452606756]": { + "$type": "{27F1E1A1-8D9D-4C3B-BD3A-AFB9762449C0} TransformComponent", + "Id": 399415038452606756, + "Parent Entity": "ContainerEntity", + "Transform Data": { + "Translate": [ + -47.53056335449219, + -0.00018183141946792603, + 9.475835800170898 + ] + } + }, + "Component_[4564240319609068082]": { + "$type": "EditorEntitySortComponent", + "Id": 4564240319609068082 + }, + "Component_[7827190074535394331]": { + "$type": "EditorMaterialComponent", + "Id": 7827190074535394331, + "Controller": { + "Configuration": { + "materials": [ + { + "Key": { + "materialSlotStableId": 2418540911 + }, + "Value": { + "MaterialAsset": { + "assetId": { + "guid": "{94CF2BD7-7D09-5577-B1D8-3FF85B15E127}" + }, + "assetHint": "materials/presets/pbr/metal_aluminum.azmaterial" + } + } + } + ] + } + } + }, + "Component_[8092226976542590265]": { + "$type": "EditorDisabledCompositionComponent", + "Id": 8092226976542590265 + } + } + }, + "Entity_[2643869165524]": { + "Id": "Entity_[2643869165524]", + "Name": "Entity1", + "Components": { + "Component_[11525365929370623807]": { + "$type": "EditorVisibilityComponent", + "Id": 11525365929370623807 + }, + "Component_[12334620273692642550]": { + "$type": "EditorLockComponent", + "Id": 12334620273692642550 + }, + "Component_[14389735759337977675]": { + "$type": "EditorPendingCompositionComponent", + "Id": 14389735759337977675 + }, + "Component_[16184381538555246534]": { + "$type": "AZ::Render::EditorMeshComponent", + "Id": 16184381538555246534, + "Controller": { + "Configuration": { + "ModelAsset": { + "assetId": { + "guid": "{E14975EF-E676-51A4-B826-3EF59CB645AA}", + "subId": 285127096 + }, + "assetHint": "testdata/objects/cube/cube.azmodel" + } + } + } + }, + "Component_[17962478023087084794]": { + "$type": "SelectionComponent", + "Id": 17962478023087084794 + }, + "Component_[18071675051915092508]": { + "$type": "EditorEntityIconComponent", + "Id": 18071675051915092508 + }, + "Component_[2115498007879087044]": { + "$type": "EditorInspectorComponent", + "Id": 2115498007879087044, + "ComponentOrderEntryArray": [ + { + "ComponentId": 399415038452606756 + }, + { + "ComponentId": 16184381538555246534, + "SortIndex": 1 + }, + { + "ComponentId": 7827190074535394331, + "SortIndex": 2 + } + ] + }, + "Component_[3518973002096080237]": { + "$type": "EditorOnlyEntityComponent", + "Id": 3518973002096080237 + }, + "Component_[399415038452606756]": { + "$type": "{27F1E1A1-8D9D-4C3B-BD3A-AFB9762449C0} TransformComponent", + "Id": 399415038452606756, + "Parent Entity": "ContainerEntity", + "Transform Data": { + "Translate": [ + -42.53056335449219, + -0.00018183141946792603, + 0.0 + ] + } + }, + "Component_[4564240319609068082]": { + "$type": "EditorEntitySortComponent", + "Id": 4564240319609068082 + }, + "Component_[7827190074535394331]": { + "$type": "EditorMaterialComponent", + "Id": 7827190074535394331, + "Controller": { + "Configuration": { + "materials": [ + { + "Key": { + "materialSlotStableId": 2418540911 + }, + "Value": { + "MaterialAsset": { + "assetId": { + "guid": "{FC69F2F8-F73B-5A0C-B8B7-94BAA45780FC}" + }, + "assetHint": "materials/presets/pbr/metal_brass_polished.azmaterial" + } + } + } + ] + } + } + }, + "Component_[8092226976542590265]": { + "$type": "EditorDisabledCompositionComponent", + "Id": 8092226976542590265 + } + } + }, + "Entity_[2648164132820]": { + "Id": "Entity_[2648164132820]", + "Name": "Entity1", + "Components": { + "Component_[11525365929370623807]": { + "$type": "EditorVisibilityComponent", + "Id": 11525365929370623807 + }, + "Component_[12334620273692642550]": { + "$type": "EditorLockComponent", + "Id": 12334620273692642550 + }, + "Component_[14389735759337977675]": { + "$type": "EditorPendingCompositionComponent", + "Id": 14389735759337977675 + }, + "Component_[16184381538555246534]": { + "$type": "AZ::Render::EditorMeshComponent", + "Id": 16184381538555246534, + "Controller": { + "Configuration": { + "ModelAsset": { + "assetId": { + "guid": "{E14975EF-E676-51A4-B826-3EF59CB645AA}", + "subId": 285127096 + }, + "assetHint": "testdata/objects/cube/cube.azmodel" + } + } + } + }, + "Component_[17962478023087084794]": { + "$type": "SelectionComponent", + "Id": 17962478023087084794 + }, + "Component_[18071675051915092508]": { + "$type": "EditorEntityIconComponent", + "Id": 18071675051915092508 + }, + "Component_[2115498007879087044]": { + "$type": "EditorInspectorComponent", + "Id": 2115498007879087044, + "ComponentOrderEntryArray": [ + { + "ComponentId": 399415038452606756 + }, + { + "ComponentId": 16184381538555246534, + "SortIndex": 1 + }, + { + "ComponentId": 7827190074535394331, + "SortIndex": 2 + } + ] + }, + "Component_[3518973002096080237]": { + "$type": "EditorOnlyEntityComponent", + "Id": 3518973002096080237 + }, + "Component_[399415038452606756]": { + "$type": "{27F1E1A1-8D9D-4C3B-BD3A-AFB9762449C0} TransformComponent", + "Id": 399415038452606756, + "Parent Entity": "ContainerEntity", + "Transform Data": { + "Translate": [ + -17.530563354492188, + -0.00018183141946792603, + 99.43339538574219 + ] + } + }, + "Component_[4564240319609068082]": { + "$type": "EditorEntitySortComponent", + "Id": 4564240319609068082 + }, + "Component_[7827190074535394331]": { + "$type": "EditorMaterialComponent", + "Id": 7827190074535394331, + "Controller": { + "Configuration": { + "materials": [ + { + "Key": { + "materialSlotStableId": 2418540911 + }, + "Value": { + "MaterialAsset": { + "assetId": { + "guid": "{892EA944-0325-5FA6-94D7-4AB4FC02A0F5}" + }, + "assetHint": "materials/presets/pbr/metal_iron.azmaterial" + } + } + } + ] + } + } + }, + "Component_[8092226976542590265]": { + "$type": "EditorDisabledCompositionComponent", + "Id": 8092226976542590265 + } + } + }, + "Entity_[2652459100116]": { + "Id": "Entity_[2652459100116]", + "Name": "Entity1", + "Components": { + "Component_[11525365929370623807]": { + "$type": "EditorVisibilityComponent", + "Id": 11525365929370623807 + }, + "Component_[12334620273692642550]": { + "$type": "EditorLockComponent", + "Id": 12334620273692642550 + }, + "Component_[14389735759337977675]": { + "$type": "EditorPendingCompositionComponent", + "Id": 14389735759337977675 + }, + "Component_[16184381538555246534]": { + "$type": "AZ::Render::EditorMeshComponent", + "Id": 16184381538555246534, + "Controller": { + "Configuration": { + "ModelAsset": { + "assetId": { + "guid": "{E14975EF-E676-51A4-B826-3EF59CB645AA}", + "subId": 285127096 + }, + "assetHint": "testdata/objects/cube/cube.azmodel" + } + } + } + }, + "Component_[17962478023087084794]": { + "$type": "SelectionComponent", + "Id": 17962478023087084794 + }, + "Component_[18071675051915092508]": { + "$type": "EditorEntityIconComponent", + "Id": 18071675051915092508 + }, + "Component_[2115498007879087044]": { + "$type": "EditorInspectorComponent", + "Id": 2115498007879087044, + "ComponentOrderEntryArray": [ + { + "ComponentId": 399415038452606756 + }, + { + "ComponentId": 16184381538555246534, + "SortIndex": 1 + }, + { + "ComponentId": 7827190074535394331, + "SortIndex": 2 + } + ] + }, + "Component_[3518973002096080237]": { + "$type": "EditorOnlyEntityComponent", + "Id": 3518973002096080237 + }, + "Component_[399415038452606756]": { + "$type": "{27F1E1A1-8D9D-4C3B-BD3A-AFB9762449C0} TransformComponent", + "Id": 399415038452606756, + "Parent Entity": "ContainerEntity", + "Transform Data": { + "Translate": [ + 37.53014373779297, + -0.00018183141946792603, + 4.451573371887207 + ] + } + }, + "Component_[4564240319609068082]": { + "$type": "EditorEntitySortComponent", + "Id": 4564240319609068082 + }, + "Component_[7827190074535394331]": { + "$type": "EditorMaterialComponent", + "Id": 7827190074535394331, + "Controller": { + "Configuration": { + "materials": [ + { + "Key": { + "materialSlotStableId": 2418540911 + }, + "Value": { + "MaterialAsset": { + "assetId": { + "guid": "{2D054071-BEF7-53C0-A8C9-E4F026BD8364}" + }, + "assetHint": "materials/presets/pbr/metal_copper_matte.azmaterial" + } + } + } + ] + } + } + }, + "Component_[8092226976542590265]": { + "$type": "EditorDisabledCompositionComponent", + "Id": 8092226976542590265 + } + } + }, + "Entity_[2656754067412]": { + "Id": "Entity_[2656754067412]", + "Name": "Entity1", + "Components": { + "Component_[11525365929370623807]": { + "$type": "EditorVisibilityComponent", + "Id": 11525365929370623807 + }, + "Component_[12334620273692642550]": { + "$type": "EditorLockComponent", + "Id": 12334620273692642550 + }, + "Component_[14389735759337977675]": { + "$type": "EditorPendingCompositionComponent", + "Id": 14389735759337977675 + }, + "Component_[16184381538555246534]": { + "$type": "AZ::Render::EditorMeshComponent", + "Id": 16184381538555246534, + "Controller": { + "Configuration": { + "ModelAsset": { + "assetId": { + "guid": "{E14975EF-E676-51A4-B826-3EF59CB645AA}", + "subId": 285127096 + }, + "assetHint": "testdata/objects/cube/cube.azmodel" + } + } + } + }, + "Component_[17962478023087084794]": { + "$type": "SelectionComponent", + "Id": 17962478023087084794 + }, + "Component_[18071675051915092508]": { + "$type": "EditorEntityIconComponent", + "Id": 18071675051915092508 + }, + "Component_[2115498007879087044]": { + "$type": "EditorInspectorComponent", + "Id": 2115498007879087044, + "ComponentOrderEntryArray": [ + { + "ComponentId": 399415038452606756 + }, + { + "ComponentId": 16184381538555246534, + "SortIndex": 1 + }, + { + "ComponentId": 7827190074535394331, + "SortIndex": 2 + } + ] + }, + "Component_[3518973002096080237]": { + "$type": "EditorOnlyEntityComponent", + "Id": 3518973002096080237 + }, + "Component_[399415038452606756]": { + "$type": "{27F1E1A1-8D9D-4C3B-BD3A-AFB9762449C0} TransformComponent", + "Id": 399415038452606756, + "Parent Entity": "ContainerEntity", + "Transform Data": { + "Translate": [ + 17.53014373779297, + -0.00018183141946792603, + 39.56034851074219 + ] + } + }, + "Component_[4564240319609068082]": { + "$type": "EditorEntitySortComponent", + "Id": 4564240319609068082 + }, + "Component_[7827190074535394331]": { + "$type": "EditorMaterialComponent", + "Id": 7827190074535394331, + "Controller": { + "Configuration": { + "materials": [ + { + "Key": {}, + "Value": { + "MaterialAsset": { + "assetId": { + "guid": "{721188E0-B7CC-5D06-8D5D-39AF8ABF2EF9}" + }, + "assetHint": "materials/presets/pbr/metal_titanium.azmaterial" + } + } + }, + { + "Key": { + "materialSlotStableId": 2418540911 + }, + "Value": { + "MaterialAsset": { + "assetId": { + "guid": "{94CF2BD7-7D09-5577-B1D8-3FF85B15E127}" + }, + "assetHint": "materials/presets/pbr/metal_aluminum.azmaterial" + } + } + } + ] + } + } + }, + "Component_[8092226976542590265]": { + "$type": "EditorDisabledCompositionComponent", + "Id": 8092226976542590265 + } + } + }, + "Entity_[2661049034708]": { + "Id": "Entity_[2661049034708]", + "Name": "Entity1", + "Components": { + "Component_[11525365929370623807]": { + "$type": "EditorVisibilityComponent", + "Id": 11525365929370623807 + }, + "Component_[12334620273692642550]": { + "$type": "EditorLockComponent", + "Id": 12334620273692642550 + }, + "Component_[14389735759337977675]": { + "$type": "EditorPendingCompositionComponent", + "Id": 14389735759337977675 + }, + "Component_[16184381538555246534]": { + "$type": "AZ::Render::EditorMeshComponent", + "Id": 16184381538555246534, + "Controller": { + "Configuration": { + "ModelAsset": { + "assetId": { + "guid": "{E14975EF-E676-51A4-B826-3EF59CB645AA}", + "subId": 285127096 + }, + "assetHint": "testdata/objects/cube/cube.azmodel" + } + } + } + }, + "Component_[17962478023087084794]": { + "$type": "SelectionComponent", + "Id": 17962478023087084794 + }, + "Component_[18071675051915092508]": { + "$type": "EditorEntityIconComponent", + "Id": 18071675051915092508 + }, + "Component_[2115498007879087044]": { + "$type": "EditorInspectorComponent", + "Id": 2115498007879087044, + "ComponentOrderEntryArray": [ + { + "ComponentId": 399415038452606756 + }, + { + "ComponentId": 16184381538555246534, + "SortIndex": 1 + }, + { + "ComponentId": 7827190074535394331, + "SortIndex": 2 + } + ] + }, + "Component_[3518973002096080237]": { + "$type": "EditorOnlyEntityComponent", + "Id": 3518973002096080237 + }, + "Component_[399415038452606756]": { + "$type": "{27F1E1A1-8D9D-4C3B-BD3A-AFB9762449C0} TransformComponent", + "Id": 399415038452606756, + "Parent Entity": "ContainerEntity", + "Transform Data": { + "Translate": [ + -47.53056335449219, + -0.00018183141946792603, + 24.533506393432617 + ] + } + }, + "Component_[4564240319609068082]": { + "$type": "EditorEntitySortComponent", + "Id": 4564240319609068082 + }, + "Component_[7827190074535394331]": { + "$type": "EditorMaterialComponent", + "Id": 7827190074535394331, + "Controller": { + "Configuration": { + "materials": [ + { + "Key": { + "materialSlotStableId": 2418540911 + }, + "Value": { + "MaterialAsset": { + "assetId": { + "guid": "{94CF2BD7-7D09-5577-B1D8-3FF85B15E127}" + }, + "assetHint": "materials/presets/pbr/metal_aluminum.azmaterial" + } + } + } + ] + } + } + }, + "Component_[8092226976542590265]": { + "$type": "EditorDisabledCompositionComponent", + "Id": 8092226976542590265 + } + } + }, + "Entity_[2665344002004]": { + "Id": "Entity_[2665344002004]", + "Name": "Entity1", + "Components": { + "Component_[11525365929370623807]": { + "$type": "EditorVisibilityComponent", + "Id": 11525365929370623807 + }, + "Component_[12334620273692642550]": { + "$type": "EditorLockComponent", + "Id": 12334620273692642550 + }, + "Component_[14389735759337977675]": { + "$type": "EditorPendingCompositionComponent", + "Id": 14389735759337977675 + }, + "Component_[16184381538555246534]": { + "$type": "AZ::Render::EditorMeshComponent", + "Id": 16184381538555246534, + "Controller": { + "Configuration": { + "ModelAsset": { + "assetId": { + "guid": "{E14975EF-E676-51A4-B826-3EF59CB645AA}", + "subId": 285127096 + }, + "assetHint": "testdata/objects/cube/cube.azmodel" + } + } + } + }, + "Component_[17962478023087084794]": { + "$type": "SelectionComponent", + "Id": 17962478023087084794 + }, + "Component_[18071675051915092508]": { + "$type": "EditorEntityIconComponent", + "Id": 18071675051915092508 + }, + "Component_[2115498007879087044]": { + "$type": "EditorInspectorComponent", + "Id": 2115498007879087044, + "ComponentOrderEntryArray": [ + { + "ComponentId": 399415038452606756 + }, + { + "ComponentId": 16184381538555246534, + "SortIndex": 1 + }, + { + "ComponentId": 7827190074535394331, + "SortIndex": 2 + } + ] + }, + "Component_[3518973002096080237]": { + "$type": "EditorOnlyEntityComponent", + "Id": 3518973002096080237 + }, + "Component_[399415038452606756]": { + "$type": "{27F1E1A1-8D9D-4C3B-BD3A-AFB9762449C0} TransformComponent", + "Id": 399415038452606756, + "Parent Entity": "ContainerEntity", + "Transform Data": { + "Translate": [ + 22.53014373779297, + -0.00018183141946792603, + 84.40655517578125 + ] + } + }, + "Component_[4564240319609068082]": { + "$type": "EditorEntitySortComponent", + "Id": 4564240319609068082 + }, + "Component_[7827190074535394331]": { + "$type": "EditorMaterialComponent", + "Id": 7827190074535394331, + "Controller": { + "Configuration": { + "materials": [ + { + "Key": { + "materialSlotStableId": 2418540911 + }, + "Value": { + "MaterialAsset": { + "assetId": { + "guid": "{80E0F2A7-1EE4-597F-80EF-985C65BCE2EB}" + }, + "assetHint": "materials/presets/pbr/metal_brass.azmaterial" + } + } + } + ] + } + } + }, + "Component_[8092226976542590265]": { + "$type": "EditorDisabledCompositionComponent", + "Id": 8092226976542590265 + } + } + }, + "Entity_[2669638969300]": { + "Id": "Entity_[2669638969300]", + "Name": "Entity1", + "Components": { + "Component_[11525365929370623807]": { + "$type": "EditorVisibilityComponent", + "Id": 11525365929370623807 + }, + "Component_[12334620273692642550]": { + "$type": "EditorLockComponent", + "Id": 12334620273692642550 + }, + "Component_[14389735759337977675]": { + "$type": "EditorPendingCompositionComponent", + "Id": 14389735759337977675 + }, + "Component_[16184381538555246534]": { + "$type": "AZ::Render::EditorMeshComponent", + "Id": 16184381538555246534, + "Controller": { + "Configuration": { + "ModelAsset": { + "assetId": { + "guid": "{E14975EF-E676-51A4-B826-3EF59CB645AA}", + "subId": 285127096 + }, + "assetHint": "testdata/objects/cube/cube.azmodel" + } + } + } + }, + "Component_[17962478023087084794]": { + "$type": "SelectionComponent", + "Id": 17962478023087084794 + }, + "Component_[18071675051915092508]": { + "$type": "EditorEntityIconComponent", + "Id": 18071675051915092508 + }, + "Component_[2115498007879087044]": { + "$type": "EditorInspectorComponent", + "Id": 2115498007879087044, + "ComponentOrderEntryArray": [ + { + "ComponentId": 399415038452606756 + }, + { + "ComponentId": 16184381538555246534, + "SortIndex": 1 + }, + { + "ComponentId": 7827190074535394331, + "SortIndex": 2 + } + ] + }, + "Component_[3518973002096080237]": { + "$type": "EditorOnlyEntityComponent", + "Id": 3518973002096080237 + }, + "Component_[399415038452606756]": { + "$type": "{27F1E1A1-8D9D-4C3B-BD3A-AFB9762449C0} TransformComponent", + "Id": 399415038452606756, + "Parent Entity": "ContainerEntity", + "Transform Data": { + "Translate": [ + -22.530563354492188, + -0.00018183141946792603, + 30.08451271057129 + ] + } + }, + "Component_[4564240319609068082]": { + "$type": "EditorEntitySortComponent", + "Id": 4564240319609068082 + }, + "Component_[7827190074535394331]": { + "$type": "EditorMaterialComponent", + "Id": 7827190074535394331, + "Controller": { + "Configuration": { + "materials": [ + { + "Key": { + "materialSlotStableId": 2418540911 + }, + "Value": { + "MaterialAsset": { + "assetId": { + "guid": "{FB4657EB-FB3A-5EC3-A772-DC36D6F733C3}" + }, + "assetHint": "materials/presets/pbr/metal_gold_polished.azmaterial" + } + } + } + ] + } + } + }, + "Component_[8092226976542590265]": { + "$type": "EditorDisabledCompositionComponent", + "Id": 8092226976542590265 + } + } + }, + "Entity_[2673933936596]": { + "Id": "Entity_[2673933936596]", + "Name": "Entity1", + "Components": { + "Component_[11525365929370623807]": { + "$type": "EditorVisibilityComponent", + "Id": 11525365929370623807 + }, + "Component_[12334620273692642550]": { + "$type": "EditorLockComponent", + "Id": 12334620273692642550 + }, + "Component_[14389735759337977675]": { + "$type": "EditorPendingCompositionComponent", + "Id": 14389735759337977675 + }, + "Component_[16184381538555246534]": { + "$type": "AZ::Render::EditorMeshComponent", + "Id": 16184381538555246534, + "Controller": { + "Configuration": { + "ModelAsset": { + "assetId": { + "guid": "{E14975EF-E676-51A4-B826-3EF59CB645AA}", + "subId": 285127096 + }, + "assetHint": "testdata/objects/cube/cube.azmodel" + } + } + } + }, + "Component_[17962478023087084794]": { + "$type": "SelectionComponent", + "Id": 17962478023087084794 + }, + "Component_[18071675051915092508]": { + "$type": "EditorEntityIconComponent", + "Id": 18071675051915092508 + }, + "Component_[2115498007879087044]": { + "$type": "EditorInspectorComponent", + "Id": 2115498007879087044, + "ComponentOrderEntryArray": [ + { + "ComponentId": 399415038452606756 + }, + { + "ComponentId": 16184381538555246534, + "SortIndex": 1 + }, + { + "ComponentId": 7827190074535394331, + "SortIndex": 2 + } + ] + }, + "Component_[3518973002096080237]": { + "$type": "EditorOnlyEntityComponent", + "Id": 3518973002096080237 + }, + "Component_[399415038452606756]": { + "$type": "{27F1E1A1-8D9D-4C3B-BD3A-AFB9762449C0} TransformComponent", + "Id": 399415038452606756, + "Parent Entity": "ContainerEntity", + "Transform Data": { + "Translate": [ + 22.53014373779297, + -0.00018183141946792603, + 74.93071746826172 + ] + } + }, + "Component_[4564240319609068082]": { + "$type": "EditorEntitySortComponent", + "Id": 4564240319609068082 + }, + "Component_[7827190074535394331]": { + "$type": "EditorMaterialComponent", + "Id": 7827190074535394331, + "Controller": { + "Configuration": { + "materials": [ + { + "Key": { + "materialSlotStableId": 2418540911 + }, + "Value": { + "MaterialAsset": { + "assetId": { + "guid": "{FC69F2F8-F73B-5A0C-B8B7-94BAA45780FC}" + }, + "assetHint": "materials/presets/pbr/metal_brass_polished.azmaterial" + } + } + } + ] + } + } + }, + "Component_[8092226976542590265]": { + "$type": "EditorDisabledCompositionComponent", + "Id": 8092226976542590265 + } + } + }, + "Entity_[2678228903892]": { + "Id": "Entity_[2678228903892]", + "Name": "Entity1", + "Components": { + "Component_[11525365929370623807]": { + "$type": "EditorVisibilityComponent", + "Id": 11525365929370623807 + }, + "Component_[12334620273692642550]": { + "$type": "EditorLockComponent", + "Id": 12334620273692642550 + }, + "Component_[14389735759337977675]": { + "$type": "EditorPendingCompositionComponent", + "Id": 14389735759337977675 + }, + "Component_[16184381538555246534]": { + "$type": "AZ::Render::EditorMeshComponent", + "Id": 16184381538555246534, + "Controller": { + "Configuration": { + "ModelAsset": { + "assetId": { + "guid": "{E14975EF-E676-51A4-B826-3EF59CB645AA}", + "subId": 285127096 + }, + "assetHint": "testdata/objects/cube/cube.azmodel" + } + } + } + }, + "Component_[17962478023087084794]": { + "$type": "SelectionComponent", + "Id": 17962478023087084794 + }, + "Component_[18071675051915092508]": { + "$type": "EditorEntityIconComponent", + "Id": 18071675051915092508 + }, + "Component_[2115498007879087044]": { + "$type": "EditorInspectorComponent", + "Id": 2115498007879087044, + "ComponentOrderEntryArray": [ + { + "ComponentId": 399415038452606756 + }, + { + "ComponentId": 16184381538555246534, + "SortIndex": 1 + }, + { + "ComponentId": 7827190074535394331, + "SortIndex": 2 + } + ] + }, + "Component_[3518973002096080237]": { + "$type": "EditorOnlyEntityComponent", + "Id": 3518973002096080237 + }, + "Component_[399415038452606756]": { + "$type": "{27F1E1A1-8D9D-4C3B-BD3A-AFB9762449C0} TransformComponent", + "Id": 399415038452606756, + "Parent Entity": "ContainerEntity", + "Transform Data": { + "Translate": [ + 17.53014373779297, + -0.00018183141946792603, + 19.50924301147461 + ] + } + }, + "Component_[4564240319609068082]": { + "$type": "EditorEntitySortComponent", + "Id": 4564240319609068082 + }, + "Component_[7827190074535394331]": { + "$type": "EditorMaterialComponent", + "Id": 7827190074535394331, + "Controller": { + "Configuration": { + "materials": [ + { + "Key": {}, + "Value": { + "MaterialAsset": { + "assetId": { + "guid": "{721188E0-B7CC-5D06-8D5D-39AF8ABF2EF9}" + }, + "assetHint": "materials/presets/pbr/metal_titanium.azmaterial" + } + } + }, + { + "Key": { + "materialSlotStableId": 2418540911 + }, + "Value": { + "MaterialAsset": { + "assetId": { + "guid": "{549D26B8-881D-569F-AF05-961F36A43F4F}" + }, + "assetHint": "materials/presets/pbr/metal_aluminum_matte.azmaterial" + } + } + } + ] + } + } + }, + "Component_[8092226976542590265]": { + "$type": "EditorDisabledCompositionComponent", + "Id": 8092226976542590265 + } + } + }, + "Entity_[2682523871188]": { + "Id": "Entity_[2682523871188]", + "Name": "Entity1", + "Components": { + "Component_[11525365929370623807]": { + "$type": "EditorVisibilityComponent", + "Id": 11525365929370623807 + }, + "Component_[12334620273692642550]": { + "$type": "EditorLockComponent", + "Id": 12334620273692642550 + }, + "Component_[14389735759337977675]": { + "$type": "EditorPendingCompositionComponent", + "Id": 14389735759337977675 + }, + "Component_[16184381538555246534]": { + "$type": "AZ::Render::EditorMeshComponent", + "Id": 16184381538555246534, + "Controller": { + "Configuration": { + "ModelAsset": { + "assetId": { + "guid": "{E14975EF-E676-51A4-B826-3EF59CB645AA}", + "subId": 285127096 + }, + "assetHint": "testdata/objects/cube/cube.azmodel" + } + } + } + }, + "Component_[17962478023087084794]": { + "$type": "SelectionComponent", + "Id": 17962478023087084794 + }, + "Component_[18071675051915092508]": { + "$type": "EditorEntityIconComponent", + "Id": 18071675051915092508 + }, + "Component_[2115498007879087044]": { + "$type": "EditorInspectorComponent", + "Id": 2115498007879087044, + "ComponentOrderEntryArray": [ + { + "ComponentId": 399415038452606756 + }, + { + "ComponentId": 16184381538555246534, + "SortIndex": 1 + }, + { + "ComponentId": 7827190074535394331, + "SortIndex": 2 + } + ] + }, + "Component_[3518973002096080237]": { + "$type": "EditorOnlyEntityComponent", + "Id": 3518973002096080237 + }, + "Component_[399415038452606756]": { + "$type": "{27F1E1A1-8D9D-4C3B-BD3A-AFB9762449C0} TransformComponent", + "Id": 399415038452606756, + "Parent Entity": "ContainerEntity", + "Transform Data": { + "Translate": [ + -27.530563354492188, + -0.00018183141946792603, + 9.475835800170898 + ] + } + }, + "Component_[4564240319609068082]": { + "$type": "EditorEntitySortComponent", + "Id": 4564240319609068082 + }, + "Component_[7827190074535394331]": { + "$type": "EditorMaterialComponent", + "Id": 7827190074535394331, + "Controller": { + "Configuration": { + "materials": [ + { + "Key": { + "materialSlotStableId": 2418540911 + }, + "Value": { + "MaterialAsset": { + "assetId": { + "guid": "{E621C5BF-B8E1-55F0-A791-EC960F2FA46F}" + }, + "assetHint": "materials/presets/pbr/metal_copper.azmaterial" + } + } + } + ] + } + } + }, + "Component_[8092226976542590265]": { + "$type": "EditorDisabledCompositionComponent", + "Id": 8092226976542590265 + } + } + }, + "Entity_[2686818838484]": { + "Id": "Entity_[2686818838484]", + "Name": "Entity1", + "Components": { + "Component_[11525365929370623807]": { + "$type": "EditorVisibilityComponent", + "Id": 11525365929370623807 + }, + "Component_[12334620273692642550]": { + "$type": "EditorLockComponent", + "Id": 12334620273692642550 + }, + "Component_[14389735759337977675]": { + "$type": "EditorPendingCompositionComponent", + "Id": 14389735759337977675 + }, + "Component_[16184381538555246534]": { + "$type": "AZ::Render::EditorMeshComponent", + "Id": 16184381538555246534, + "Controller": { + "Configuration": { + "ModelAsset": { + "assetId": { + "guid": "{E14975EF-E676-51A4-B826-3EF59CB645AA}", + "subId": 285127096 + }, + "assetHint": "testdata/objects/cube/cube.azmodel" + } + } + } + }, + "Component_[17962478023087084794]": { + "$type": "SelectionComponent", + "Id": 17962478023087084794 + }, + "Component_[18071675051915092508]": { + "$type": "EditorEntityIconComponent", + "Id": 18071675051915092508 + }, + "Component_[2115498007879087044]": { + "$type": "EditorInspectorComponent", + "Id": 2115498007879087044, + "ComponentOrderEntryArray": [ + { + "ComponentId": 399415038452606756 + }, + { + "ComponentId": 16184381538555246534, + "SortIndex": 1 + }, + { + "ComponentId": 7827190074535394331, + "SortIndex": 2 + } + ] + }, + "Component_[3518973002096080237]": { + "$type": "EditorOnlyEntityComponent", + "Id": 3518973002096080237 + }, + "Component_[399415038452606756]": { + "$type": "{27F1E1A1-8D9D-4C3B-BD3A-AFB9762449C0} TransformComponent", + "Id": 399415038452606756, + "Parent Entity": "ContainerEntity", + "Transform Data": { + "Translate": [ + -32.53056335449219, + -0.00018183141946792603, + 54.618019104003906 + ] + } + }, + "Component_[4564240319609068082]": { + "$type": "EditorEntitySortComponent", + "Id": 4564240319609068082 + }, + "Component_[7827190074535394331]": { + "$type": "EditorMaterialComponent", + "Id": 7827190074535394331, + "Controller": { + "Configuration": { + "materials": [ + { + "Key": { + "materialSlotStableId": 2418540911 + }, + "Value": { + "MaterialAsset": { + "assetId": { + "guid": "{99976D73-6248-5D66-AD15-E8F52B0AFE36}" + }, + "assetHint": "materials/presets/pbr/metal_cobalt.azmaterial" + } + } + } + ] + } + } + }, + "Component_[8092226976542590265]": { + "$type": "EditorDisabledCompositionComponent", + "Id": 8092226976542590265 + } + } + }, + "Entity_[2691113805780]": { + "Id": "Entity_[2691113805780]", + "Name": "Entity1", + "Components": { + "Component_[11525365929370623807]": { + "$type": "EditorVisibilityComponent", + "Id": 11525365929370623807 + }, + "Component_[12334620273692642550]": { + "$type": "EditorLockComponent", + "Id": 12334620273692642550 + }, + "Component_[14389735759337977675]": { + "$type": "EditorPendingCompositionComponent", + "Id": 14389735759337977675 + }, + "Component_[16184381538555246534]": { + "$type": "AZ::Render::EditorMeshComponent", + "Id": 16184381538555246534, + "Controller": { + "Configuration": { + "ModelAsset": { + "assetId": { + "guid": "{E14975EF-E676-51A4-B826-3EF59CB645AA}", + "subId": 285127096 + }, + "assetHint": "testdata/objects/cube/cube.azmodel" + } + } + } + }, + "Component_[17962478023087084794]": { + "$type": "SelectionComponent", + "Id": 17962478023087084794 + }, + "Component_[18071675051915092508]": { + "$type": "EditorEntityIconComponent", + "Id": 18071675051915092508 + }, + "Component_[2115498007879087044]": { + "$type": "EditorInspectorComponent", + "Id": 2115498007879087044, + "ComponentOrderEntryArray": [ + { + "ComponentId": 399415038452606756 + }, + { + "ComponentId": 16184381538555246534, + "SortIndex": 1 + }, + { + "ComponentId": 7827190074535394331, + "SortIndex": 2 + } + ] + }, + "Component_[3518973002096080237]": { + "$type": "EditorOnlyEntityComponent", + "Id": 3518973002096080237 + }, + "Component_[399415038452606756]": { + "$type": "{27F1E1A1-8D9D-4C3B-BD3A-AFB9762449C0} TransformComponent", + "Id": 399415038452606756, + "Parent Entity": "ContainerEntity", + "Transform Data": { + "Translate": [ + 17.53014373779297, + -0.00018183141946792603, + 84.40655517578125 + ] + } + }, + "Component_[4564240319609068082]": { + "$type": "EditorEntitySortComponent", + "Id": 4564240319609068082 + }, + "Component_[7827190074535394331]": { + "$type": "EditorMaterialComponent", + "Id": 7827190074535394331, + "Controller": { + "Configuration": { + "materials": [ + { + "Key": {}, + "Value": { + "MaterialAsset": { + "assetId": { + "guid": "{721188E0-B7CC-5D06-8D5D-39AF8ABF2EF9}" + }, + "assetHint": "materials/presets/pbr/metal_titanium.azmaterial" + } + } + }, + { + "Key": { + "materialSlotStableId": 2418540911 + }, + "Value": { + "MaterialAsset": { + "assetId": { + "guid": "{94CF2BD7-7D09-5577-B1D8-3FF85B15E127}" + }, + "assetHint": "materials/presets/pbr/metal_aluminum.azmaterial" + } + } + } + ] + } + } + }, + "Component_[8092226976542590265]": { + "$type": "EditorDisabledCompositionComponent", + "Id": 8092226976542590265 + } + } + }, + "Entity_[2695408773076]": { + "Id": "Entity_[2695408773076]", + "Name": "Entity1", + "Components": { + "Component_[11525365929370623807]": { + "$type": "EditorVisibilityComponent", + "Id": 11525365929370623807 + }, + "Component_[12334620273692642550]": { + "$type": "EditorLockComponent", + "Id": 12334620273692642550 + }, + "Component_[14389735759337977675]": { + "$type": "EditorPendingCompositionComponent", + "Id": 14389735759337977675 + }, + "Component_[16184381538555246534]": { + "$type": "AZ::Render::EditorMeshComponent", + "Id": 16184381538555246534, + "Controller": { + "Configuration": { + "ModelAsset": { + "assetId": { + "guid": "{E14975EF-E676-51A4-B826-3EF59CB645AA}", + "subId": 285127096 + }, + "assetHint": "testdata/objects/cube/cube.azmodel" + } + } + } + }, + "Component_[17962478023087084794]": { + "$type": "SelectionComponent", + "Id": 17962478023087084794 + }, + "Component_[18071675051915092508]": { + "$type": "EditorEntityIconComponent", + "Id": 18071675051915092508 + }, + "Component_[2115498007879087044]": { + "$type": "EditorInspectorComponent", + "Id": 2115498007879087044, + "ComponentOrderEntryArray": [ + { + "ComponentId": 399415038452606756 + }, + { + "ComponentId": 16184381538555246534, + "SortIndex": 1 + }, + { + "ComponentId": 7827190074535394331, + "SortIndex": 2 + } + ] + }, + "Component_[3518973002096080237]": { + "$type": "EditorOnlyEntityComponent", + "Id": 3518973002096080237 + }, + "Component_[399415038452606756]": { + "$type": "{27F1E1A1-8D9D-4C3B-BD3A-AFB9762449C0} TransformComponent", + "Id": 399415038452606756, + "Parent Entity": "ContainerEntity", + "Transform Data": { + "Translate": [ + 17.53014373779297, + -0.00018183141946792603, + 109.46680450439453 + ] + } + }, + "Component_[4564240319609068082]": { + "$type": "EditorEntitySortComponent", + "Id": 4564240319609068082 + }, + "Component_[7827190074535394331]": { + "$type": "EditorMaterialComponent", + "Id": 7827190074535394331, + "Controller": { + "Configuration": { + "materials": [ + { + "Key": {}, + "Value": { + "MaterialAsset": { + "assetId": { + "guid": "{721188E0-B7CC-5D06-8D5D-39AF8ABF2EF9}" + }, + "assetHint": "materials/presets/pbr/metal_titanium.azmaterial" + } + } + }, + { + "Key": { + "materialSlotStableId": 2418540911 + }, + "Value": { + "MaterialAsset": { + "assetId": { + "guid": "{549D26B8-881D-569F-AF05-961F36A43F4F}" + }, + "assetHint": "materials/presets/pbr/metal_aluminum_matte.azmaterial" + } + } + } + ] + } + } + }, + "Component_[8092226976542590265]": { + "$type": "EditorDisabledCompositionComponent", + "Id": 8092226976542590265 + } + } + }, + "Entity_[2699703740372]": { + "Id": "Entity_[2699703740372]", + "Name": "Entity1", + "Components": { + "Component_[11525365929370623807]": { + "$type": "EditorVisibilityComponent", + "Id": 11525365929370623807 + }, + "Component_[12334620273692642550]": { + "$type": "EditorLockComponent", + "Id": 12334620273692642550 + }, + "Component_[14389735759337977675]": { + "$type": "EditorPendingCompositionComponent", + "Id": 14389735759337977675 + }, + "Component_[16184381538555246534]": { + "$type": "AZ::Render::EditorMeshComponent", + "Id": 16184381538555246534, + "Controller": { + "Configuration": { + "ModelAsset": { + "assetId": { + "guid": "{E14975EF-E676-51A4-B826-3EF59CB645AA}", + "subId": 285127096 + }, + "assetHint": "testdata/objects/cube/cube.azmodel" + } + } + } + }, + "Component_[17962478023087084794]": { + "$type": "SelectionComponent", + "Id": 17962478023087084794 + }, + "Component_[18071675051915092508]": { + "$type": "EditorEntityIconComponent", + "Id": 18071675051915092508 + }, + "Component_[2115498007879087044]": { + "$type": "EditorInspectorComponent", + "Id": 2115498007879087044, + "ComponentOrderEntryArray": [ + { + "ComponentId": 399415038452606756 + }, + { + "ComponentId": 16184381538555246534, + "SortIndex": 1 + }, + { + "ComponentId": 7827190074535394331, + "SortIndex": 2 + } + ] + }, + "Component_[3518973002096080237]": { + "$type": "EditorOnlyEntityComponent", + "Id": 3518973002096080237 + }, + "Component_[399415038452606756]": { + "$type": "{27F1E1A1-8D9D-4C3B-BD3A-AFB9762449C0} TransformComponent", + "Id": 399415038452606756, + "Parent Entity": "ContainerEntity", + "Transform Data": { + "Translate": [ + -17.530563354492188, + -0.00018183141946792603, + 15.057670593261719 + ] + } + }, + "Component_[4564240319609068082]": { + "$type": "EditorEntitySortComponent", + "Id": 4564240319609068082 + }, + "Component_[7827190074535394331]": { + "$type": "EditorMaterialComponent", + "Id": 7827190074535394331, + "Controller": { + "Configuration": { + "materials": [ + { + "Key": { + "materialSlotStableId": 2418540911 + }, + "Value": { + "MaterialAsset": { + "assetId": { + "guid": "{A7F03135-ECAD-5440-99DB-E84ABA3D50DA}" + }, + "assetHint": "materials/presets/pbr/metal_iron_polished.azmaterial" + } + } + } + ] + } + } + }, + "Component_[8092226976542590265]": { + "$type": "EditorDisabledCompositionComponent", + "Id": 8092226976542590265 + } + } + }, + "Entity_[2703998707668]": { + "Id": "Entity_[2703998707668]", + "Name": "Entity1", + "Components": { + "Component_[11525365929370623807]": { + "$type": "EditorVisibilityComponent", + "Id": 11525365929370623807 + }, + "Component_[12334620273692642550]": { + "$type": "EditorLockComponent", + "Id": 12334620273692642550 + }, + "Component_[14389735759337977675]": { + "$type": "EditorPendingCompositionComponent", + "Id": 14389735759337977675 + }, + "Component_[16184381538555246534]": { + "$type": "AZ::Render::EditorMeshComponent", + "Id": 16184381538555246534, + "Controller": { + "Configuration": { + "ModelAsset": { + "assetId": { + "guid": "{E14975EF-E676-51A4-B826-3EF59CB645AA}", + "subId": 285127096 + }, + "assetHint": "testdata/objects/cube/cube.azmodel" + } + } + } + }, + "Component_[17962478023087084794]": { + "$type": "SelectionComponent", + "Id": 17962478023087084794 + }, + "Component_[18071675051915092508]": { + "$type": "EditorEntityIconComponent", + "Id": 18071675051915092508 + }, + "Component_[2115498007879087044]": { + "$type": "EditorInspectorComponent", + "Id": 2115498007879087044, + "ComponentOrderEntryArray": [ + { + "ComponentId": 399415038452606756 + }, + { + "ComponentId": 16184381538555246534, + "SortIndex": 1 + }, + { + "ComponentId": 7827190074535394331, + "SortIndex": 2 + } + ] + }, + "Component_[3518973002096080237]": { + "$type": "EditorOnlyEntityComponent", + "Id": 3518973002096080237 + }, + "Component_[399415038452606756]": { + "$type": "{27F1E1A1-8D9D-4C3B-BD3A-AFB9762449C0} TransformComponent", + "Id": 399415038452606756, + "Parent Entity": "ContainerEntity", + "Transform Data": { + "Translate": [ + -42.53056335449219, + -0.00018183141946792603, + 99.43339538574219 + ] + } + }, + "Component_[4564240319609068082]": { + "$type": "EditorEntitySortComponent", + "Id": 4564240319609068082 + }, + "Component_[7827190074535394331]": { + "$type": "EditorMaterialComponent", + "Id": 7827190074535394331, + "Controller": { + "Configuration": { + "materials": [ + { + "Key": { + "materialSlotStableId": 2418540911 + }, + "Value": { + "MaterialAsset": { + "assetId": { + "guid": "{80E0F2A7-1EE4-597F-80EF-985C65BCE2EB}" + }, + "assetHint": "materials/presets/pbr/metal_brass.azmaterial" + } + } + } + ] + } + } + }, + "Component_[8092226976542590265]": { + "$type": "EditorDisabledCompositionComponent", + "Id": 8092226976542590265 + } + } + }, + "Entity_[2708293674964]": { + "Id": "Entity_[2708293674964]", + "Name": "Entity1", + "Components": { + "Component_[1057179753323467068]": { + "$type": "EditorMaterialComponent", + "Id": 1057179753323467068, + "Controller": { + "Configuration": { + "materials": [ + { + "Key": { + "materialSlotStableId": 2418540911 + }, + "Value": { + "MaterialAsset": { + "assetId": { + "guid": "{3F0DF0C4-5F23-5EB1-B762-7344AFFDC011}" + }, + "assetHint": "materials/presets/pbr/metal_titanium_polished.azmaterial" + } + } + } + ] + } + } + }, + "Component_[11525365929370623807]": { + "$type": "EditorVisibilityComponent", + "Id": 11525365929370623807 + }, + "Component_[12334620273692642550]": { + "$type": "EditorLockComponent", + "Id": 12334620273692642550 + }, + "Component_[14389735759337977675]": { + "$type": "EditorPendingCompositionComponent", + "Id": 14389735759337977675 + }, + "Component_[16184381538555246534]": { + "$type": "AZ::Render::EditorMeshComponent", + "Id": 16184381538555246534, + "Controller": { + "Configuration": { + "ModelAsset": { + "assetId": { + "guid": "{E14975EF-E676-51A4-B826-3EF59CB645AA}", + "subId": 285127096 + }, + "assetHint": "testdata/objects/cube/cube.azmodel" + } + } + } + }, + "Component_[17962478023087084794]": { + "$type": "SelectionComponent", + "Id": 17962478023087084794 + }, + "Component_[18071675051915092508]": { + "$type": "EditorEntityIconComponent", + "Id": 18071675051915092508 + }, + "Component_[2115498007879087044]": { + "$type": "EditorInspectorComponent", + "Id": 2115498007879087044, + "ComponentOrderEntryArray": [ + { + "ComponentId": 399415038452606756 + }, + { + "ComponentId": 16184381538555246534, + "SortIndex": 1 + }, + { + "ComponentId": 1057179753323467068, + "SortIndex": 2 + } + ] + }, + "Component_[3518973002096080237]": { + "$type": "EditorOnlyEntityComponent", + "Id": 3518973002096080237 + }, + "Component_[399415038452606756]": { + "$type": "{27F1E1A1-8D9D-4C3B-BD3A-AFB9762449C0} TransformComponent", + "Id": 399415038452606756, + "Parent Entity": "ContainerEntity", + "Transform Data": { + "Translate": [ + 12.530143737792969, + -0.00018183141946792603, + 0.0 + ] + } + }, + "Component_[4564240319609068082]": { + "$type": "EditorEntitySortComponent", + "Id": 4564240319609068082 + }, + "Component_[8092226976542590265]": { + "$type": "EditorDisabledCompositionComponent", + "Id": 8092226976542590265 + } + } + }, + "Entity_[2712588642260]": { + "Id": "Entity_[2712588642260]", + "Name": "Entity1", + "Components": { + "Component_[11525365929370623807]": { + "$type": "EditorVisibilityComponent", + "Id": 11525365929370623807 + }, + "Component_[12334620273692642550]": { + "$type": "EditorLockComponent", + "Id": 12334620273692642550 + }, + "Component_[14389735759337977675]": { + "$type": "EditorPendingCompositionComponent", + "Id": 14389735759337977675 + }, + "Component_[16184381538555246534]": { + "$type": "AZ::Render::EditorMeshComponent", + "Id": 16184381538555246534, + "Controller": { + "Configuration": { + "ModelAsset": { + "assetId": { + "guid": "{E14975EF-E676-51A4-B826-3EF59CB645AA}", + "subId": 285127096 + }, + "assetHint": "testdata/objects/cube/cube.azmodel" + } + } + } + }, + "Component_[17962478023087084794]": { + "$type": "SelectionComponent", + "Id": 17962478023087084794 + }, + "Component_[18071675051915092508]": { + "$type": "EditorEntityIconComponent", + "Id": 18071675051915092508 + }, + "Component_[2115498007879087044]": { + "$type": "EditorInspectorComponent", + "Id": 2115498007879087044, + "ComponentOrderEntryArray": [ + { + "ComponentId": 399415038452606756 + }, + { + "ComponentId": 16184381538555246534, + "SortIndex": 1 + }, + { + "ComponentId": 7827190074535394331, + "SortIndex": 2 + } + ] + }, + "Component_[3518973002096080237]": { + "$type": "EditorOnlyEntityComponent", + "Id": 3518973002096080237 + }, + "Component_[399415038452606756]": { + "$type": "{27F1E1A1-8D9D-4C3B-BD3A-AFB9762449C0} TransformComponent", + "Id": 399415038452606756, + "Parent Entity": "ContainerEntity", + "Transform Data": { + "Translate": [ + 47.53014373779297, + -0.00018183141946792603, + 4.451573371887207 + ] + } + }, + "Component_[4564240319609068082]": { + "$type": "EditorEntitySortComponent", + "Id": 4564240319609068082 + }, + "Component_[7827190074535394331]": { + "$type": "EditorMaterialComponent", + "Id": 7827190074535394331, + "Controller": { + "Configuration": { + "materials": [ + { + "Key": { + "materialSlotStableId": 2418540911 + }, + "Value": { + "MaterialAsset": { + "assetId": { + "guid": "{970148AC-7258-5EC8-9CE7-F4EF93164D93}" + }, + "assetHint": "materials/presets/pbr/metal_iron_matte.azmaterial" + } + } + } + ] + } + } + }, + "Component_[8092226976542590265]": { + "$type": "EditorDisabledCompositionComponent", + "Id": 8092226976542590265 + } + } + }, + "Entity_[2716883609556]": { + "Id": "Entity_[2716883609556]", + "Name": "Entity1", + "Components": { + "Component_[11525365929370623807]": { + "$type": "EditorVisibilityComponent", + "Id": 11525365929370623807 + }, + "Component_[12334620273692642550]": { + "$type": "EditorLockComponent", + "Id": 12334620273692642550 + }, + "Component_[14389735759337977675]": { + "$type": "EditorPendingCompositionComponent", + "Id": 14389735759337977675 + }, + "Component_[16184381538555246534]": { + "$type": "AZ::Render::EditorMeshComponent", + "Id": 16184381538555246534, + "Controller": { + "Configuration": { + "ModelAsset": { + "assetId": { + "guid": "{E14975EF-E676-51A4-B826-3EF59CB645AA}", + "subId": 285127096 + }, + "assetHint": "testdata/objects/cube/cube.azmodel" + } + } + } + }, + "Component_[17962478023087084794]": { + "$type": "SelectionComponent", + "Id": 17962478023087084794 + }, + "Component_[18071675051915092508]": { + "$type": "EditorEntityIconComponent", + "Id": 18071675051915092508 + }, + "Component_[2115498007879087044]": { + "$type": "EditorInspectorComponent", + "Id": 2115498007879087044, + "ComponentOrderEntryArray": [ + { + "ComponentId": 399415038452606756 + }, + { + "ComponentId": 16184381538555246534, + "SortIndex": 1 + }, + { + "ComponentId": 7827190074535394331, + "SortIndex": 2 + } + ] + }, + "Component_[3518973002096080237]": { + "$type": "EditorOnlyEntityComponent", + "Id": 3518973002096080237 + }, + "Component_[399415038452606756]": { + "$type": "{27F1E1A1-8D9D-4C3B-BD3A-AFB9762449C0} TransformComponent", + "Id": 399415038452606756, + "Parent Entity": "ContainerEntity", + "Transform Data": { + "Translate": [ + -17.530563354492188, + -0.00018183141946792603, + 69.34888458251953 + ] + } + }, + "Component_[4564240319609068082]": { + "$type": "EditorEntitySortComponent", + "Id": 4564240319609068082 + }, + "Component_[7827190074535394331]": { + "$type": "EditorMaterialComponent", + "Id": 7827190074535394331, + "Controller": { + "Configuration": { + "materials": [ + { + "Key": { + "materialSlotStableId": 2418540911 + }, + "Value": { + "MaterialAsset": { + "assetId": { + "guid": "{892EA944-0325-5FA6-94D7-4AB4FC02A0F5}" + }, + "assetHint": "materials/presets/pbr/metal_iron.azmaterial" + } + } + } + ] + } + } + }, + "Component_[8092226976542590265]": { + "$type": "EditorDisabledCompositionComponent", + "Id": 8092226976542590265 + } + } + }, + "Entity_[2721178576852]": { + "Id": "Entity_[2721178576852]", + "Name": "Entity1", + "Components": { + "Component_[11525365929370623807]": { + "$type": "EditorVisibilityComponent", + "Id": 11525365929370623807 + }, + "Component_[12334620273692642550]": { + "$type": "EditorLockComponent", + "Id": 12334620273692642550 + }, + "Component_[14389735759337977675]": { + "$type": "EditorPendingCompositionComponent", + "Id": 14389735759337977675 + }, + "Component_[16184381538555246534]": { + "$type": "AZ::Render::EditorMeshComponent", + "Id": 16184381538555246534, + "Controller": { + "Configuration": { + "ModelAsset": { + "assetId": { + "guid": "{E14975EF-E676-51A4-B826-3EF59CB645AA}", + "subId": 285127096 + }, + "assetHint": "testdata/objects/cube/cube.azmodel" + } + } + } + }, + "Component_[17962478023087084794]": { + "$type": "SelectionComponent", + "Id": 17962478023087084794 + }, + "Component_[18071675051915092508]": { + "$type": "EditorEntityIconComponent", + "Id": 18071675051915092508 + }, + "Component_[2115498007879087044]": { + "$type": "EditorInspectorComponent", + "Id": 2115498007879087044, + "ComponentOrderEntryArray": [ + { + "ComponentId": 399415038452606756 + }, + { + "ComponentId": 16184381538555246534, + "SortIndex": 1 + }, + { + "ComponentId": 7827190074535394331, + "SortIndex": 2 + } + ] + }, + "Component_[3518973002096080237]": { + "$type": "EditorOnlyEntityComponent", + "Id": 3518973002096080237 + }, + "Component_[399415038452606756]": { + "$type": "{27F1E1A1-8D9D-4C3B-BD3A-AFB9762449C0} TransformComponent", + "Id": 399415038452606756, + "Parent Entity": "ContainerEntity", + "Transform Data": { + "Translate": [ + -22.530563354492188, + -0.00018183141946792603, + 114.4910659790039 + ] + } + }, + "Component_[4564240319609068082]": { + "$type": "EditorEntitySortComponent", + "Id": 4564240319609068082 + }, + "Component_[7827190074535394331]": { + "$type": "EditorMaterialComponent", + "Id": 7827190074535394331, + "Controller": { + "Configuration": { + "materials": [ + { + "Key": { + "materialSlotStableId": 2418540911 + }, + "Value": { + "MaterialAsset": { + "assetId": { + "guid": "{FE52E7C8-064D-506A-9C26-433EB93747DE}" + }, + "assetHint": "materials/presets/pbr/metal_gold.azmaterial" + } + } + } + ] + } + } + }, + "Component_[8092226976542590265]": { + "$type": "EditorDisabledCompositionComponent", + "Id": 8092226976542590265 + } + } + }, + "Entity_[2725473544148]": { + "Id": "Entity_[2725473544148]", + "Name": "Entity1", + "Components": { + "Component_[11525365929370623807]": { + "$type": "EditorVisibilityComponent", + "Id": 11525365929370623807 + }, + "Component_[12334620273692642550]": { + "$type": "EditorLockComponent", + "Id": 12334620273692642550 + }, + "Component_[14389735759337977675]": { + "$type": "EditorPendingCompositionComponent", + "Id": 14389735759337977675 + }, + "Component_[16184381538555246534]": { + "$type": "AZ::Render::EditorMeshComponent", + "Id": 16184381538555246534, + "Controller": { + "Configuration": { + "ModelAsset": { + "assetId": { + "guid": "{E14975EF-E676-51A4-B826-3EF59CB645AA}", + "subId": 285127096 + }, + "assetHint": "testdata/objects/cube/cube.azmodel" + } + } + } + }, + "Component_[17962478023087084794]": { + "$type": "SelectionComponent", + "Id": 17962478023087084794 + }, + "Component_[18071675051915092508]": { + "$type": "EditorEntityIconComponent", + "Id": 18071675051915092508 + }, + "Component_[2115498007879087044]": { + "$type": "EditorInspectorComponent", + "Id": 2115498007879087044, + "ComponentOrderEntryArray": [ + { + "ComponentId": 399415038452606756 + }, + { + "ComponentId": 16184381538555246534, + "SortIndex": 1 + }, + { + "ComponentId": 7827190074535394331, + "SortIndex": 2 + } + ] + }, + "Component_[3518973002096080237]": { + "$type": "EditorOnlyEntityComponent", + "Id": 3518973002096080237 + }, + "Component_[399415038452606756]": { + "$type": "{27F1E1A1-8D9D-4C3B-BD3A-AFB9762449C0} TransformComponent", + "Id": 399415038452606756, + "Parent Entity": "ContainerEntity", + "Transform Data": { + "Translate": [ + -7.5305633544921875, + -0.00018183141946792603, + 94.40913391113281 + ] + } + }, + "Component_[4564240319609068082]": { + "$type": "EditorEntitySortComponent", + "Id": 4564240319609068082 + }, + "Component_[7827190074535394331]": { + "$type": "EditorMaterialComponent", + "Id": 7827190074535394331, + "Controller": { + "Configuration": { + "materials": [ + { + "Key": { + "materialSlotStableId": 2418540911 + }, + "Value": { + "MaterialAsset": { + "assetId": { + "guid": "{E56377B1-6310-5311-A494-135BE50B74F0}" + }, + "assetHint": "materials/presets/pbr/metal_nickel_matte.azmaterial" + } + } + } + ] + } + } + }, + "Component_[8092226976542590265]": { + "$type": "EditorDisabledCompositionComponent", + "Id": 8092226976542590265 + } + } + }, + "Entity_[2729768511444]": { + "Id": "Entity_[2729768511444]", + "Name": "Entity1", + "Components": { + "Component_[11525365929370623807]": { + "$type": "EditorVisibilityComponent", + "Id": 11525365929370623807 + }, + "Component_[12334620273692642550]": { + "$type": "EditorLockComponent", + "Id": 12334620273692642550 + }, + "Component_[14389735759337977675]": { + "$type": "EditorPendingCompositionComponent", + "Id": 14389735759337977675 + }, + "Component_[16184381538555246534]": { + "$type": "AZ::Render::EditorMeshComponent", + "Id": 16184381538555246534, + "Controller": { + "Configuration": { + "ModelAsset": { + "assetId": { + "guid": "{E14975EF-E676-51A4-B826-3EF59CB645AA}", + "subId": 285127096 + }, + "assetHint": "testdata/objects/cube/cube.azmodel" + } + } + } + }, + "Component_[17962478023087084794]": { + "$type": "SelectionComponent", + "Id": 17962478023087084794 + }, + "Component_[18071675051915092508]": { + "$type": "EditorEntityIconComponent", + "Id": 18071675051915092508 + }, + "Component_[2115498007879087044]": { + "$type": "EditorInspectorComponent", + "Id": 2115498007879087044, + "ComponentOrderEntryArray": [ + { + "ComponentId": 399415038452606756 + }, + { + "ComponentId": 16184381538555246534, + "SortIndex": 1 + }, + { + "ComponentId": 7827190074535394331, + "SortIndex": 2 + } + ] + }, + "Component_[3518973002096080237]": { + "$type": "EditorOnlyEntityComponent", + "Id": 3518973002096080237 + }, + "Component_[399415038452606756]": { + "$type": "{27F1E1A1-8D9D-4C3B-BD3A-AFB9762449C0} TransformComponent", + "Id": 399415038452606756, + "Parent Entity": "ContainerEntity", + "Transform Data": { + "Translate": [ + 2.5301437377929688, + -0.00018183141946792603, + 105.0152359008789 + ] + } + }, + "Component_[4564240319609068082]": { + "$type": "EditorEntitySortComponent", + "Id": 4564240319609068082 + }, + "Component_[7827190074535394331]": { + "$type": "EditorMaterialComponent", + "Id": 7827190074535394331, + "Controller": { + "Configuration": { + "materials": [ + { + "Key": { + "materialSlotStableId": 2418540911 + }, + "Value": { + "MaterialAsset": { + "assetId": { + "guid": "{79419183-FFCE-5A89-AA16-C2789D81AF75}" + }, + "assetHint": "materials/presets/pbr/metal_platinum_polished.azmaterial" + } + } + } + ] + } + } + }, + "Component_[8092226976542590265]": { + "$type": "EditorDisabledCompositionComponent", + "Id": 8092226976542590265 + } + } + }, + "Entity_[2734063478740]": { + "Id": "Entity_[2734063478740]", + "Name": "Entity1", + "Components": { + "Component_[11525365929370623807]": { + "$type": "EditorVisibilityComponent", + "Id": 11525365929370623807 + }, + "Component_[12334620273692642550]": { + "$type": "EditorLockComponent", + "Id": 12334620273692642550 + }, + "Component_[14389735759337977675]": { + "$type": "EditorPendingCompositionComponent", + "Id": 14389735759337977675 + }, + "Component_[16184381538555246534]": { + "$type": "AZ::Render::EditorMeshComponent", + "Id": 16184381538555246534, + "Controller": { + "Configuration": { + "ModelAsset": { + "assetId": { + "guid": "{E14975EF-E676-51A4-B826-3EF59CB645AA}", + "subId": 285127096 + }, + "assetHint": "testdata/objects/cube/cube.azmodel" + } + } + } + }, + "Component_[17962478023087084794]": { + "$type": "SelectionComponent", + "Id": 17962478023087084794 + }, + "Component_[18071675051915092508]": { + "$type": "EditorEntityIconComponent", + "Id": 18071675051915092508 + }, + "Component_[2115498007879087044]": { + "$type": "EditorInspectorComponent", + "Id": 2115498007879087044, + "ComponentOrderEntryArray": [ + { + "ComponentId": 399415038452606756 + }, + { + "ComponentId": 16184381538555246534, + "SortIndex": 1 + }, + { + "ComponentId": 7827190074535394331, + "SortIndex": 2 + } + ] + }, + "Component_[3518973002096080237]": { + "$type": "EditorOnlyEntityComponent", + "Id": 3518973002096080237 + }, + "Component_[399415038452606756]": { + "$type": "{27F1E1A1-8D9D-4C3B-BD3A-AFB9762449C0} TransformComponent", + "Id": 399415038452606756, + "Parent Entity": "ContainerEntity", + "Transform Data": { + "Translate": [ + 22.53014373779297, + -0.00018183141946792603, + 4.451573371887207 + ] + } + }, + "Component_[4564240319609068082]": { + "$type": "EditorEntitySortComponent", + "Id": 4564240319609068082 + }, + "Component_[7827190074535394331]": { + "$type": "EditorMaterialComponent", + "Id": 7827190074535394331, + "Controller": { + "Configuration": { + "materials": [ + { + "Key": { + "materialSlotStableId": 2418540911 + }, + "Value": { + "MaterialAsset": { + "assetId": { + "guid": "{AE350D9F-0000-526D-B49C-4303D687BB86}" + }, + "assetHint": "materials/presets/pbr/metal_brass_matte.azmaterial" + } + } + } + ] + } + } + }, + "Component_[8092226976542590265]": { + "$type": "EditorDisabledCompositionComponent", + "Id": 8092226976542590265 + } + } + }, + "Entity_[2738358446036]": { + "Id": "Entity_[2738358446036]", + "Name": "Entity1", + "Components": { + "Component_[11525365929370623807]": { + "$type": "EditorVisibilityComponent", + "Id": 11525365929370623807 + }, + "Component_[12334620273692642550]": { + "$type": "EditorLockComponent", + "Id": 12334620273692642550 + }, + "Component_[14389735759337977675]": { + "$type": "EditorPendingCompositionComponent", + "Id": 14389735759337977675 + }, + "Component_[16184381538555246534]": { + "$type": "AZ::Render::EditorMeshComponent", + "Id": 16184381538555246534, + "Controller": { + "Configuration": { + "ModelAsset": { + "assetId": { + "guid": "{E14975EF-E676-51A4-B826-3EF59CB645AA}", + "subId": 285127096 + }, + "assetHint": "testdata/objects/cube/cube.azmodel" + } + } + } + }, + "Component_[17962478023087084794]": { + "$type": "SelectionComponent", + "Id": 17962478023087084794 + }, + "Component_[18071675051915092508]": { + "$type": "EditorEntityIconComponent", + "Id": 18071675051915092508 + }, + "Component_[2115498007879087044]": { + "$type": "EditorInspectorComponent", + "Id": 2115498007879087044, + "ComponentOrderEntryArray": [ + { + "ComponentId": 399415038452606756 + }, + { + "ComponentId": 16184381538555246534, + "SortIndex": 1 + }, + { + "ComponentId": 7827190074535394331, + "SortIndex": 2 + } + ] + }, + "Component_[3518973002096080237]": { + "$type": "EditorOnlyEntityComponent", + "Id": 3518973002096080237 + }, + "Component_[399415038452606756]": { + "$type": "{27F1E1A1-8D9D-4C3B-BD3A-AFB9762449C0} TransformComponent", + "Id": 399415038452606756, + "Parent Entity": "ContainerEntity", + "Transform Data": { + "Translate": [ + 32.53014373779297, + -0.00018183141946792603, + 69.34888458251953 + ] + } + }, + "Component_[4564240319609068082]": { + "$type": "EditorEntitySortComponent", + "Id": 4564240319609068082 + }, + "Component_[7827190074535394331]": { + "$type": "EditorMaterialComponent", + "Id": 7827190074535394331, + "Controller": { + "Configuration": { + "materials": [ + { + "Key": { + "materialSlotStableId": 2418540911 + }, + "Value": { + "MaterialAsset": { + "assetId": { + "guid": "{99976D73-6248-5D66-AD15-E8F52B0AFE36}" + }, + "assetHint": "materials/presets/pbr/metal_cobalt.azmaterial" + } + } + } + ] + } + } + }, + "Component_[8092226976542590265]": { + "$type": "EditorDisabledCompositionComponent", + "Id": 8092226976542590265 + } + } + }, + "Entity_[2742653413332]": { + "Id": "Entity_[2742653413332]", + "Name": "Entity1", + "Components": { + "Component_[11525365929370623807]": { + "$type": "EditorVisibilityComponent", + "Id": 11525365929370623807 + }, + "Component_[12334620273692642550]": { + "$type": "EditorLockComponent", + "Id": 12334620273692642550 + }, + "Component_[14389735759337977675]": { + "$type": "EditorPendingCompositionComponent", + "Id": 14389735759337977675 + }, + "Component_[16184381538555246534]": { + "$type": "AZ::Render::EditorMeshComponent", + "Id": 16184381538555246534, + "Controller": { + "Configuration": { + "ModelAsset": { + "assetId": { + "guid": "{E14975EF-E676-51A4-B826-3EF59CB645AA}", + "subId": 285127096 + }, + "assetHint": "testdata/objects/cube/cube.azmodel" + } + } + } + }, + "Component_[17962478023087084794]": { + "$type": "SelectionComponent", + "Id": 17962478023087084794 + }, + "Component_[18071675051915092508]": { + "$type": "EditorEntityIconComponent", + "Id": 18071675051915092508 + }, + "Component_[2115498007879087044]": { + "$type": "EditorInspectorComponent", + "Id": 2115498007879087044, + "ComponentOrderEntryArray": [ + { + "ComponentId": 399415038452606756 + }, + { + "ComponentId": 16184381538555246534, + "SortIndex": 1 + }, + { + "ComponentId": 7827190074535394331, + "SortIndex": 2 + } + ] + }, + "Component_[3518973002096080237]": { + "$type": "EditorOnlyEntityComponent", + "Id": 3518973002096080237 + }, + "Component_[399415038452606756]": { + "$type": "{27F1E1A1-8D9D-4C3B-BD3A-AFB9762449C0} TransformComponent", + "Id": 399415038452606756, + "Parent Entity": "ContainerEntity", + "Transform Data": { + "Translate": [ + -37.53056335449219, + -0.00018183141946792603, + 24.533506393432617 + ] + } + }, + "Component_[4564240319609068082]": { + "$type": "EditorEntitySortComponent", + "Id": 4564240319609068082 + }, + "Component_[7827190074535394331]": { + "$type": "EditorMaterialComponent", + "Id": 7827190074535394331, + "Controller": { + "Configuration": { + "materials": [ + { + "Key": { + "materialSlotStableId": 2418540911 + }, + "Value": { + "MaterialAsset": { + "assetId": { + "guid": "{B7C712DC-4839-58BB-B522-A4F120084CF5}" + }, + "assetHint": "materials/presets/pbr/metal_chrome.azmaterial" + } + } + } + ] + } + } + }, + "Component_[8092226976542590265]": { + "$type": "EditorDisabledCompositionComponent", + "Id": 8092226976542590265 + } + } + }, + "Entity_[2746948380628]": { + "Id": "Entity_[2746948380628]", + "Name": "Entity1", + "Components": { + "Component_[11525365929370623807]": { + "$type": "EditorVisibilityComponent", + "Id": 11525365929370623807 + }, + "Component_[12334620273692642550]": { + "$type": "EditorLockComponent", + "Id": 12334620273692642550 + }, + "Component_[14389735759337977675]": { + "$type": "EditorPendingCompositionComponent", + "Id": 14389735759337977675 + }, + "Component_[16184381538555246534]": { + "$type": "AZ::Render::EditorMeshComponent", + "Id": 16184381538555246534, + "Controller": { + "Configuration": { + "ModelAsset": { + "assetId": { + "guid": "{E14975EF-E676-51A4-B826-3EF59CB645AA}", + "subId": 285127096 + }, + "assetHint": "testdata/objects/cube/cube.azmodel" + } + } + } + }, + "Component_[17962478023087084794]": { + "$type": "SelectionComponent", + "Id": 17962478023087084794 + }, + "Component_[18071675051915092508]": { + "$type": "EditorEntityIconComponent", + "Id": 18071675051915092508 + }, + "Component_[2115498007879087044]": { + "$type": "EditorInspectorComponent", + "Id": 2115498007879087044, + "ComponentOrderEntryArray": [ + { + "ComponentId": 399415038452606756 + }, + { + "ComponentId": 16184381538555246534, + "SortIndex": 1 + }, + { + "ComponentId": 7827190074535394331, + "SortIndex": 2 + } + ] + }, + "Component_[3518973002096080237]": { + "$type": "EditorOnlyEntityComponent", + "Id": 3518973002096080237 + }, + "Component_[399415038452606756]": { + "$type": "{27F1E1A1-8D9D-4C3B-BD3A-AFB9762449C0} TransformComponent", + "Id": 399415038452606756, + "Parent Entity": "ContainerEntity", + "Transform Data": { + "Translate": [ + 2.5301437377929688, + -0.00018183141946792603, + 49.593753814697266 + ] + } + }, + "Component_[4564240319609068082]": { + "$type": "EditorEntitySortComponent", + "Id": 4564240319609068082 + }, + "Component_[7827190074535394331]": { + "$type": "EditorMaterialComponent", + "Id": 7827190074535394331, + "Controller": { + "Configuration": { + "materials": [ + { + "Key": { + "materialSlotStableId": 2418540911 + }, + "Value": { + "MaterialAsset": { + "assetId": { + "guid": "{60D4CA04-A2FE-5AE7-B472-694C38D05183}" + }, + "assetHint": "materials/presets/pbr/metal_platinum_matte.azmaterial" + } + } + } + ] + } + } + }, + "Component_[8092226976542590265]": { + "$type": "EditorDisabledCompositionComponent", + "Id": 8092226976542590265 + } + } + }, + "Entity_[2751243347924]": { + "Id": "Entity_[2751243347924]", + "Name": "Entity1", + "Components": { + "Component_[11525365929370623807]": { + "$type": "EditorVisibilityComponent", + "Id": 11525365929370623807 + }, + "Component_[12334620273692642550]": { + "$type": "EditorLockComponent", + "Id": 12334620273692642550 + }, + "Component_[14389735759337977675]": { + "$type": "EditorPendingCompositionComponent", + "Id": 14389735759337977675 + }, + "Component_[16184381538555246534]": { + "$type": "AZ::Render::EditorMeshComponent", + "Id": 16184381538555246534, + "Controller": { + "Configuration": { + "ModelAsset": { + "assetId": { + "guid": "{E14975EF-E676-51A4-B826-3EF59CB645AA}", + "subId": 285127096 + }, + "assetHint": "testdata/objects/cube/cube.azmodel" + } + } + } + }, + "Component_[17962478023087084794]": { + "$type": "SelectionComponent", + "Id": 17962478023087084794 + }, + "Component_[18071675051915092508]": { + "$type": "EditorEntityIconComponent", + "Id": 18071675051915092508 + }, + "Component_[2115498007879087044]": { + "$type": "EditorInspectorComponent", + "Id": 2115498007879087044, + "ComponentOrderEntryArray": [ + { + "ComponentId": 399415038452606756 + }, + { + "ComponentId": 16184381538555246534, + "SortIndex": 1 + }, + { + "ComponentId": 7827190074535394331, + "SortIndex": 2 + } + ] + }, + "Component_[3518973002096080237]": { + "$type": "EditorOnlyEntityComponent", + "Id": 3518973002096080237 + }, + "Component_[399415038452606756]": { + "$type": "{27F1E1A1-8D9D-4C3B-BD3A-AFB9762449C0} TransformComponent", + "Id": 399415038452606756, + "Parent Entity": "ContainerEntity", + "Transform Data": { + "Translate": [ + 32.53014373779297, + -0.00018183141946792603, + 109.46680450439453 + ] + } + }, + "Component_[4564240319609068082]": { + "$type": "EditorEntitySortComponent", + "Id": 4564240319609068082 + }, + "Component_[7827190074535394331]": { + "$type": "EditorMaterialComponent", + "Id": 7827190074535394331, + "Controller": { + "Configuration": { + "materials": [ + { + "Key": { + "materialSlotStableId": 2418540911 + }, + "Value": { + "MaterialAsset": { + "assetId": { + "guid": "{C60A39AF-BB76-51BD-9468-A88C9A6F78D7}" + }, + "assetHint": "materials/presets/pbr/metal_cobalt_matte.azmaterial" + } + } + } + ] + } + } + }, + "Component_[8092226976542590265]": { + "$type": "EditorDisabledCompositionComponent", + "Id": 8092226976542590265 + } + } + }, + "Entity_[2755538315220]": { + "Id": "Entity_[2755538315220]", + "Name": "Entity1", + "Components": { + "Component_[11525365929370623807]": { + "$type": "EditorVisibilityComponent", + "Id": 11525365929370623807 + }, + "Component_[12334620273692642550]": { + "$type": "EditorLockComponent", + "Id": 12334620273692642550 + }, + "Component_[14389735759337977675]": { + "$type": "EditorPendingCompositionComponent", + "Id": 14389735759337977675 + }, + "Component_[16184381538555246534]": { + "$type": "AZ::Render::EditorMeshComponent", + "Id": 16184381538555246534, + "Controller": { + "Configuration": { + "ModelAsset": { + "assetId": { + "guid": "{E14975EF-E676-51A4-B826-3EF59CB645AA}", + "subId": 285127096 + }, + "assetHint": "testdata/objects/cube/cube.azmodel" + } + } + } + }, + "Component_[17962478023087084794]": { + "$type": "SelectionComponent", + "Id": 17962478023087084794 + }, + "Component_[18071675051915092508]": { + "$type": "EditorEntityIconComponent", + "Id": 18071675051915092508 + }, + "Component_[2115498007879087044]": { + "$type": "EditorInspectorComponent", + "Id": 2115498007879087044, + "ComponentOrderEntryArray": [ + { + "ComponentId": 399415038452606756 + }, + { + "ComponentId": 16184381538555246534, + "SortIndex": 1 + }, + { + "ComponentId": 7827190074535394331, + "SortIndex": 2 + } + ] + }, + "Component_[3518973002096080237]": { + "$type": "EditorOnlyEntityComponent", + "Id": 3518973002096080237 + }, + "Component_[399415038452606756]": { + "$type": "{27F1E1A1-8D9D-4C3B-BD3A-AFB9762449C0} TransformComponent", + "Id": 399415038452606756, + "Parent Entity": "ContainerEntity", + "Transform Data": { + "Translate": [ + 17.53014373779297, + -0.00018183141946792603, + 105.0152359008789 + ] + } + }, + "Component_[4564240319609068082]": { + "$type": "EditorEntitySortComponent", + "Id": 4564240319609068082 + }, + "Component_[7827190074535394331]": { + "$type": "EditorMaterialComponent", + "Id": 7827190074535394331, + "Controller": { + "Configuration": { + "materials": [ + { + "Key": {}, + "Value": { + "MaterialAsset": { + "assetId": { + "guid": "{721188E0-B7CC-5D06-8D5D-39AF8ABF2EF9}" + }, + "assetHint": "materials/presets/pbr/metal_titanium.azmaterial" + } + } + }, + { + "Key": { + "materialSlotStableId": 2418540911 + }, + "Value": { + "MaterialAsset": { + "assetId": { + "guid": "{64C1F6A6-6BDA-551A-BE56-1829E5913278}" + }, + "assetHint": "materials/presets/pbr/metal_aluminum_polished.azmaterial" + } + } + } + ] + } + } + }, + "Component_[8092226976542590265]": { + "$type": "EditorDisabledCompositionComponent", + "Id": 8092226976542590265 + } + } + }, + "Entity_[2759833282516]": { + "Id": "Entity_[2759833282516]", + "Name": "Entity1", + "Components": { + "Component_[11525365929370623807]": { + "$type": "EditorVisibilityComponent", + "Id": 11525365929370623807 + }, + "Component_[12334620273692642550]": { + "$type": "EditorLockComponent", + "Id": 12334620273692642550 + }, + "Component_[14389735759337977675]": { + "$type": "EditorPendingCompositionComponent", + "Id": 14389735759337977675 + }, + "Component_[16184381538555246534]": { + "$type": "AZ::Render::EditorMeshComponent", + "Id": 16184381538555246534, + "Controller": { + "Configuration": { + "ModelAsset": { + "assetId": { + "guid": "{E14975EF-E676-51A4-B826-3EF59CB645AA}", + "subId": 285127096 + }, + "assetHint": "testdata/objects/cube/cube.azmodel" + } + } + } + }, + "Component_[17962478023087084794]": { + "$type": "SelectionComponent", + "Id": 17962478023087084794 + }, + "Component_[18071675051915092508]": { + "$type": "EditorEntityIconComponent", + "Id": 18071675051915092508 + }, + "Component_[2115498007879087044]": { + "$type": "EditorInspectorComponent", + "Id": 2115498007879087044, + "ComponentOrderEntryArray": [ + { + "ComponentId": 399415038452606756 + }, + { + "ComponentId": 16184381538555246534, + "SortIndex": 1 + }, + { + "ComponentId": 7827190074535394331, + "SortIndex": 2 + } + ] + }, + "Component_[3518973002096080237]": { + "$type": "EditorOnlyEntityComponent", + "Id": 3518973002096080237 + }, + "Component_[399415038452606756]": { + "$type": "{27F1E1A1-8D9D-4C3B-BD3A-AFB9762449C0} TransformComponent", + "Id": 399415038452606756, + "Parent Entity": "ContainerEntity", + "Transform Data": { + "Translate": [ + 27.53014373779297, + -0.00018183141946792603, + 15.057670593261719 + ] + } + }, + "Component_[4564240319609068082]": { + "$type": "EditorEntitySortComponent", + "Id": 4564240319609068082 + }, + "Component_[7827190074535394331]": { + "$type": "EditorMaterialComponent", + "Id": 7827190074535394331, + "Controller": { + "Configuration": { + "materials": [ + { + "Key": { + "materialSlotStableId": 2418540911 + }, + "Value": { + "MaterialAsset": { + "assetId": { + "guid": "{CAF50181-3384-5DF2-9304-C6E48E83C72D}" + }, + "assetHint": "materials/presets/pbr/metal_chrome_polished.azmaterial" + } + } + } + ] + } + } + }, + "Component_[8092226976542590265]": { + "$type": "EditorDisabledCompositionComponent", + "Id": 8092226976542590265 + } + } + }, + "Entity_[2764128249812]": { + "Id": "Entity_[2764128249812]", + "Name": "Entity1", + "Components": { + "Component_[11525365929370623807]": { + "$type": "EditorVisibilityComponent", + "Id": 11525365929370623807 + }, + "Component_[12334620273692642550]": { + "$type": "EditorLockComponent", + "Id": 12334620273692642550 + }, + "Component_[14389735759337977675]": { + "$type": "EditorPendingCompositionComponent", + "Id": 14389735759337977675 + }, + "Component_[16184381538555246534]": { + "$type": "AZ::Render::EditorMeshComponent", + "Id": 16184381538555246534, + "Controller": { + "Configuration": { + "ModelAsset": { + "assetId": { + "guid": "{E14975EF-E676-51A4-B826-3EF59CB645AA}", + "subId": 285127096 + }, + "assetHint": "testdata/objects/cube/cube.azmodel" + } + } + } + }, + "Component_[17962478023087084794]": { + "$type": "SelectionComponent", + "Id": 17962478023087084794 + }, + "Component_[18071675051915092508]": { + "$type": "EditorEntityIconComponent", + "Id": 18071675051915092508 + }, + "Component_[2115498007879087044]": { + "$type": "EditorInspectorComponent", + "Id": 2115498007879087044, + "ComponentOrderEntryArray": [ + { + "ComponentId": 399415038452606756 + }, + { + "ComponentId": 16184381538555246534, + "SortIndex": 1 + }, + { + "ComponentId": 7827190074535394331, + "SortIndex": 2 + } + ] + }, + "Component_[3518973002096080237]": { + "$type": "EditorOnlyEntityComponent", + "Id": 3518973002096080237 + }, + "Component_[399415038452606756]": { + "$type": "{27F1E1A1-8D9D-4C3B-BD3A-AFB9762449C0} TransformComponent", + "Id": 399415038452606756, + "Parent Entity": "ContainerEntity", + "Transform Data": { + "Translate": [ + 37.53014373779297, + -0.00018183141946792603, + 64.32462310791016 + ] + } + }, + "Component_[4564240319609068082]": { + "$type": "EditorEntitySortComponent", + "Id": 4564240319609068082 + }, + "Component_[7827190074535394331]": { + "$type": "EditorMaterialComponent", + "Id": 7827190074535394331, + "Controller": { + "Configuration": { + "materials": [ + { + "Key": { + "materialSlotStableId": 2418540911 + }, + "Value": { + "MaterialAsset": { + "assetId": { + "guid": "{2D054071-BEF7-53C0-A8C9-E4F026BD8364}" + }, + "assetHint": "materials/presets/pbr/metal_copper_matte.azmaterial" + } + } + } + ] + } + } + }, + "Component_[8092226976542590265]": { + "$type": "EditorDisabledCompositionComponent", + "Id": 8092226976542590265 + } + } + }, + "Entity_[2768423217108]": { + "Id": "Entity_[2768423217108]", + "Name": "Entity1", + "Components": { + "Component_[11525365929370623807]": { + "$type": "EditorVisibilityComponent", + "Id": 11525365929370623807 + }, + "Component_[12334620273692642550]": { + "$type": "EditorLockComponent", + "Id": 12334620273692642550 + }, + "Component_[14389735759337977675]": { + "$type": "EditorPendingCompositionComponent", + "Id": 14389735759337977675 + }, + "Component_[16184381538555246534]": { + "$type": "AZ::Render::EditorMeshComponent", + "Id": 16184381538555246534, + "Controller": { + "Configuration": { + "ModelAsset": { + "assetId": { + "guid": "{E14975EF-E676-51A4-B826-3EF59CB645AA}", + "subId": 285127096 + }, + "assetHint": "testdata/objects/cube/cube.azmodel" + } + } + } + }, + "Component_[17962478023087084794]": { + "$type": "SelectionComponent", + "Id": 17962478023087084794 + }, + "Component_[18071675051915092508]": { + "$type": "EditorEntityIconComponent", + "Id": 18071675051915092508 + }, + "Component_[2115498007879087044]": { + "$type": "EditorInspectorComponent", + "Id": 2115498007879087044, + "ComponentOrderEntryArray": [ + { + "ComponentId": 399415038452606756 + }, + { + "ComponentId": 16184381538555246534, + "SortIndex": 1 + }, + { + "ComponentId": 7827190074535394331, + "SortIndex": 2 + } + ] + }, + "Component_[3518973002096080237]": { + "$type": "EditorOnlyEntityComponent", + "Id": 3518973002096080237 + }, + "Component_[399415038452606756]": { + "$type": "{27F1E1A1-8D9D-4C3B-BD3A-AFB9762449C0} TransformComponent", + "Id": 399415038452606756, + "Parent Entity": "ContainerEntity", + "Transform Data": { + "Translate": [ + -7.5305633544921875, + -0.00018183141946792603, + 34.53608703613281 + ] + } + }, + "Component_[4564240319609068082]": { + "$type": "EditorEntitySortComponent", + "Id": 4564240319609068082 + }, + "Component_[7827190074535394331]": { + "$type": "EditorMaterialComponent", + "Id": 7827190074535394331, + "Controller": { + "Configuration": { + "materials": [ + { + "Key": { + "materialSlotStableId": 2418540911 + }, + "Value": { + "MaterialAsset": { + "assetId": { + "guid": "{E56377B1-6310-5311-A494-135BE50B74F0}" + }, + "assetHint": "materials/presets/pbr/metal_nickel_matte.azmaterial" + } + } + } + ] + } + } + }, + "Component_[8092226976542590265]": { + "$type": "EditorDisabledCompositionComponent", + "Id": 8092226976542590265 + } + } + }, + "Entity_[2772718184404]": { + "Id": "Entity_[2772718184404]", + "Name": "Entity1", + "Components": { + "Component_[11525365929370623807]": { + "$type": "EditorVisibilityComponent", + "Id": 11525365929370623807 + }, + "Component_[12334620273692642550]": { + "$type": "EditorLockComponent", + "Id": 12334620273692642550 + }, + "Component_[14389735759337977675]": { + "$type": "EditorPendingCompositionComponent", + "Id": 14389735759337977675 + }, + "Component_[16184381538555246534]": { + "$type": "AZ::Render::EditorMeshComponent", + "Id": 16184381538555246534, + "Controller": { + "Configuration": { + "ModelAsset": { + "assetId": { + "guid": "{E14975EF-E676-51A4-B826-3EF59CB645AA}", + "subId": 285127096 + }, + "assetHint": "testdata/objects/cube/cube.azmodel" + } + } + } + }, + "Component_[17962478023087084794]": { + "$type": "SelectionComponent", + "Id": 17962478023087084794 + }, + "Component_[18071675051915092508]": { + "$type": "EditorEntityIconComponent", + "Id": 18071675051915092508 + }, + "Component_[2115498007879087044]": { + "$type": "EditorInspectorComponent", + "Id": 2115498007879087044, + "ComponentOrderEntryArray": [ + { + "ComponentId": 399415038452606756 + }, + { + "ComponentId": 16184381538555246534, + "SortIndex": 1 + }, + { + "ComponentId": 7827190074535394331, + "SortIndex": 2 + } + ] + }, + "Component_[3518973002096080237]": { + "$type": "EditorOnlyEntityComponent", + "Id": 3518973002096080237 + }, + "Component_[399415038452606756]": { + "$type": "{27F1E1A1-8D9D-4C3B-BD3A-AFB9762449C0} TransformComponent", + "Id": 399415038452606756, + "Parent Entity": "ContainerEntity", + "Transform Data": { + "Translate": [ + 2.5301437377929688, + -0.00018183141946792603, + 45.14218521118164 + ] + } + }, + "Component_[4564240319609068082]": { + "$type": "EditorEntitySortComponent", + "Id": 4564240319609068082 + }, + "Component_[7827190074535394331]": { + "$type": "EditorMaterialComponent", + "Id": 7827190074535394331, + "Controller": { + "Configuration": { + "materials": [ + { + "Key": { + "materialSlotStableId": 2418540911 + }, + "Value": { + "MaterialAsset": { + "assetId": { + "guid": "{79419183-FFCE-5A89-AA16-C2789D81AF75}" + }, + "assetHint": "materials/presets/pbr/metal_platinum_polished.azmaterial" + } + } + } + ] + } + } + }, + "Component_[8092226976542590265]": { + "$type": "EditorDisabledCompositionComponent", + "Id": 8092226976542590265 + } + } + }, + "Entity_[2777013151700]": { + "Id": "Entity_[2777013151700]", + "Name": "Entity1", + "Components": { + "Component_[11525365929370623807]": { + "$type": "EditorVisibilityComponent", + "Id": 11525365929370623807 + }, + "Component_[12334620273692642550]": { + "$type": "EditorLockComponent", + "Id": 12334620273692642550 + }, + "Component_[14389735759337977675]": { + "$type": "EditorPendingCompositionComponent", + "Id": 14389735759337977675 + }, + "Component_[16184381538555246534]": { + "$type": "AZ::Render::EditorMeshComponent", + "Id": 16184381538555246534, + "Controller": { + "Configuration": { + "ModelAsset": { + "assetId": { + "guid": "{E14975EF-E676-51A4-B826-3EF59CB645AA}", + "subId": 285127096 + }, + "assetHint": "testdata/objects/cube/cube.azmodel" + } + } + } + }, + "Component_[17962478023087084794]": { + "$type": "SelectionComponent", + "Id": 17962478023087084794 + }, + "Component_[18071675051915092508]": { + "$type": "EditorEntityIconComponent", + "Id": 18071675051915092508 + }, + "Component_[2115498007879087044]": { + "$type": "EditorInspectorComponent", + "Id": 2115498007879087044, + "ComponentOrderEntryArray": [ + { + "ComponentId": 399415038452606756 + }, + { + "ComponentId": 16184381538555246534, + "SortIndex": 1 + }, + { + "ComponentId": 7827190074535394331, + "SortIndex": 2 + } + ] + }, + "Component_[3518973002096080237]": { + "$type": "EditorOnlyEntityComponent", + "Id": 3518973002096080237 + }, + "Component_[399415038452606756]": { + "$type": "{27F1E1A1-8D9D-4C3B-BD3A-AFB9762449C0} TransformComponent", + "Id": 399415038452606756, + "Parent Entity": "ContainerEntity", + "Transform Data": { + "Translate": [ + -27.530563354492188, + -0.00018183141946792603, + 94.40913391113281 + ] + } + }, + "Component_[4564240319609068082]": { + "$type": "EditorEntitySortComponent", + "Id": 4564240319609068082 + }, + "Component_[7827190074535394331]": { + "$type": "EditorMaterialComponent", + "Id": 7827190074535394331, + "Controller": { + "Configuration": { + "materials": [ + { + "Key": { + "materialSlotStableId": 2418540911 + }, + "Value": { + "MaterialAsset": { + "assetId": { + "guid": "{2D054071-BEF7-53C0-A8C9-E4F026BD8364}" + }, + "assetHint": "materials/presets/pbr/metal_copper_matte.azmaterial" + } + } + } + ] + } + } + }, + "Component_[8092226976542590265]": { + "$type": "EditorDisabledCompositionComponent", + "Id": 8092226976542590265 + } + } + }, + "Entity_[2781308118996]": { + "Id": "Entity_[2781308118996]", + "Name": "Entity1", + "Components": { + "Component_[11525365929370623807]": { + "$type": "EditorVisibilityComponent", + "Id": 11525365929370623807 + }, + "Component_[12334620273692642550]": { + "$type": "EditorLockComponent", + "Id": 12334620273692642550 + }, + "Component_[14389735759337977675]": { + "$type": "EditorPendingCompositionComponent", + "Id": 14389735759337977675 + }, + "Component_[16184381538555246534]": { + "$type": "AZ::Render::EditorMeshComponent", + "Id": 16184381538555246534, + "Controller": { + "Configuration": { + "ModelAsset": { + "assetId": { + "guid": "{E14975EF-E676-51A4-B826-3EF59CB645AA}", + "subId": 285127096 + }, + "assetHint": "testdata/objects/cube/cube.azmodel" + } + } + } + }, + "Component_[17962478023087084794]": { + "$type": "SelectionComponent", + "Id": 17962478023087084794 + }, + "Component_[18071675051915092508]": { + "$type": "EditorEntityIconComponent", + "Id": 18071675051915092508 + }, + "Component_[2115498007879087044]": { + "$type": "EditorInspectorComponent", + "Id": 2115498007879087044, + "ComponentOrderEntryArray": [ + { + "ComponentId": 399415038452606756 + }, + { + "ComponentId": 16184381538555246534, + "SortIndex": 1 + }, + { + "ComponentId": 7827190074535394331, + "SortIndex": 2 + } + ] + }, + "Component_[3518973002096080237]": { + "$type": "EditorOnlyEntityComponent", + "Id": 3518973002096080237 + }, + "Component_[399415038452606756]": { + "$type": "{27F1E1A1-8D9D-4C3B-BD3A-AFB9762449C0} TransformComponent", + "Id": 399415038452606756, + "Parent Entity": "ContainerEntity", + "Transform Data": { + "Translate": [ + 2.5301437377929688, + -0.00018183141946792603, + 64.32462310791016 + ] + } + }, + "Component_[4564240319609068082]": { + "$type": "EditorEntitySortComponent", + "Id": 4564240319609068082 + }, + "Component_[7827190074535394331]": { + "$type": "EditorMaterialComponent", + "Id": 7827190074535394331, + "Controller": { + "Configuration": { + "materials": [ + { + "Key": { + "materialSlotStableId": 2418540911 + }, + "Value": { + "MaterialAsset": { + "assetId": { + "guid": "{60D4CA04-A2FE-5AE7-B472-694C38D05183}" + }, + "assetHint": "materials/presets/pbr/metal_platinum_matte.azmaterial" + } + } + } + ] + } + } + }, + "Component_[8092226976542590265]": { + "$type": "EditorDisabledCompositionComponent", + "Id": 8092226976542590265 + } + } + }, + "Entity_[2785603086292]": { + "Id": "Entity_[2785603086292]", + "Name": "Entity1", + "Components": { + "Component_[11525365929370623807]": { + "$type": "EditorVisibilityComponent", + "Id": 11525365929370623807 + }, + "Component_[12334620273692642550]": { + "$type": "EditorLockComponent", + "Id": 12334620273692642550 + }, + "Component_[14389735759337977675]": { + "$type": "EditorPendingCompositionComponent", + "Id": 14389735759337977675 + }, + "Component_[16184381538555246534]": { + "$type": "AZ::Render::EditorMeshComponent", + "Id": 16184381538555246534, + "Controller": { + "Configuration": { + "ModelAsset": { + "assetId": { + "guid": "{E14975EF-E676-51A4-B826-3EF59CB645AA}", + "subId": 285127096 + }, + "assetHint": "testdata/objects/cube/cube.azmodel" + } + } + } + }, + "Component_[17962478023087084794]": { + "$type": "SelectionComponent", + "Id": 17962478023087084794 + }, + "Component_[18071675051915092508]": { + "$type": "EditorEntityIconComponent", + "Id": 18071675051915092508 + }, + "Component_[2115498007879087044]": { + "$type": "EditorInspectorComponent", + "Id": 2115498007879087044, + "ComponentOrderEntryArray": [ + { + "ComponentId": 399415038452606756 + }, + { + "ComponentId": 16184381538555246534, + "SortIndex": 1 + }, + { + "ComponentId": 7827190074535394331, + "SortIndex": 2 + } + ] + }, + "Component_[3518973002096080237]": { + "$type": "EditorOnlyEntityComponent", + "Id": 3518973002096080237 + }, + "Component_[399415038452606756]": { + "$type": "{27F1E1A1-8D9D-4C3B-BD3A-AFB9762449C0} TransformComponent", + "Id": 399415038452606756, + "Parent Entity": "ContainerEntity", + "Transform Data": { + "Translate": [ + 7.530143737792969, + -0.00018183141946792603, + 94.40913391113281 + ] + } + }, + "Component_[4564240319609068082]": { + "$type": "EditorEntitySortComponent", + "Id": 4564240319609068082 + }, + "Component_[7827190074535394331]": { + "$type": "EditorMaterialComponent", + "Id": 7827190074535394331, + "Controller": { + "Configuration": { + "materials": [ + { + "Key": { + "materialSlotStableId": 2418540911 + }, + "Value": { + "MaterialAsset": { + "assetId": { + "guid": "{E54E46E7-9FA3-54D7-B5F8-8DCCDF17BC24}" + }, + "assetHint": "materials/presets/pbr/metal_silver_matte.azmaterial" + } + } + } + ] + } + } + }, + "Component_[8092226976542590265]": { + "$type": "EditorDisabledCompositionComponent", + "Id": 8092226976542590265 + } + } + }, + "Entity_[2789898053588]": { + "Id": "Entity_[2789898053588]", + "Name": "Entity1", + "Components": { + "Component_[11525365929370623807]": { + "$type": "EditorVisibilityComponent", + "Id": 11525365929370623807 + }, + "Component_[12334620273692642550]": { + "$type": "EditorLockComponent", + "Id": 12334620273692642550 + }, + "Component_[14389735759337977675]": { + "$type": "EditorPendingCompositionComponent", + "Id": 14389735759337977675 + }, + "Component_[16184381538555246534]": { + "$type": "AZ::Render::EditorMeshComponent", + "Id": 16184381538555246534, + "Controller": { + "Configuration": { + "ModelAsset": { + "assetId": { + "guid": "{E14975EF-E676-51A4-B826-3EF59CB645AA}", + "subId": 285127096 + }, + "assetHint": "testdata/objects/cube/cube.azmodel" + } + } + } + }, + "Component_[17962478023087084794]": { + "$type": "SelectionComponent", + "Id": 17962478023087084794 + }, + "Component_[18071675051915092508]": { + "$type": "EditorEntityIconComponent", + "Id": 18071675051915092508 + }, + "Component_[2115498007879087044]": { + "$type": "EditorInspectorComponent", + "Id": 2115498007879087044, + "ComponentOrderEntryArray": [ + { + "ComponentId": 399415038452606756 + }, + { + "ComponentId": 16184381538555246534, + "SortIndex": 1 + }, + { + "ComponentId": 7827190074535394331, + "SortIndex": 2 + } + ] + }, + "Component_[3518973002096080237]": { + "$type": "EditorOnlyEntityComponent", + "Id": 3518973002096080237 + }, + "Component_[399415038452606756]": { + "$type": "{27F1E1A1-8D9D-4C3B-BD3A-AFB9762449C0} TransformComponent", + "Id": 399415038452606756, + "Parent Entity": "ContainerEntity", + "Transform Data": { + "Translate": [ + 7.530143737792969, + -0.00018183141946792603, + 4.451573371887207 + ] + } + }, + "Component_[4564240319609068082]": { + "$type": "EditorEntitySortComponent", + "Id": 4564240319609068082 + }, + "Component_[7827190074535394331]": { + "$type": "EditorMaterialComponent", + "Id": 7827190074535394331, + "Controller": { + "Configuration": { + "materials": [ + { + "Key": { + "materialSlotStableId": 2418540911 + }, + "Value": { + "MaterialAsset": { + "assetId": { + "guid": "{E54E46E7-9FA3-54D7-B5F8-8DCCDF17BC24}" + }, + "assetHint": "materials/presets/pbr/metal_silver_matte.azmaterial" + } + } + } + ] + } + } + }, + "Component_[8092226976542590265]": { + "$type": "EditorDisabledCompositionComponent", + "Id": 8092226976542590265 + } + } + }, + "Entity_[2794193020884]": { + "Id": "Entity_[2794193020884]", + "Name": "Entity1", + "Components": { + "Component_[11525365929370623807]": { + "$type": "EditorVisibilityComponent", + "Id": 11525365929370623807 + }, + "Component_[12334620273692642550]": { + "$type": "EditorLockComponent", + "Id": 12334620273692642550 + }, + "Component_[14389735759337977675]": { + "$type": "EditorPendingCompositionComponent", + "Id": 14389735759337977675 + }, + "Component_[16184381538555246534]": { + "$type": "AZ::Render::EditorMeshComponent", + "Id": 16184381538555246534, + "Controller": { + "Configuration": { + "ModelAsset": { + "assetId": { + "guid": "{E14975EF-E676-51A4-B826-3EF59CB645AA}", + "subId": 285127096 + }, + "assetHint": "testdata/objects/cube/cube.azmodel" + } + } + } + }, + "Component_[17962478023087084794]": { + "$type": "SelectionComponent", + "Id": 17962478023087084794 + }, + "Component_[18071675051915092508]": { + "$type": "EditorEntityIconComponent", + "Id": 18071675051915092508 + }, + "Component_[2115498007879087044]": { + "$type": "EditorInspectorComponent", + "Id": 2115498007879087044, + "ComponentOrderEntryArray": [ + { + "ComponentId": 399415038452606756 + }, + { + "ComponentId": 16184381538555246534, + "SortIndex": 1 + }, + { + "ComponentId": 7827190074535394331, + "SortIndex": 2 + } + ] + }, + "Component_[3518973002096080237]": { + "$type": "EditorOnlyEntityComponent", + "Id": 3518973002096080237 + }, + "Component_[399415038452606756]": { + "$type": "{27F1E1A1-8D9D-4C3B-BD3A-AFB9762449C0} TransformComponent", + "Id": 399415038452606756, + "Parent Entity": "ContainerEntity", + "Transform Data": { + "Translate": [ + 17.53014373779297, + -0.00018183141946792603, + 45.14218521118164 + ] + } + }, + "Component_[4564240319609068082]": { + "$type": "EditorEntitySortComponent", + "Id": 4564240319609068082 + }, + "Component_[7827190074535394331]": { + "$type": "EditorMaterialComponent", + "Id": 7827190074535394331, + "Controller": { + "Configuration": { + "materials": [ + { + "Key": {}, + "Value": { + "MaterialAsset": { + "assetId": { + "guid": "{721188E0-B7CC-5D06-8D5D-39AF8ABF2EF9}" + }, + "assetHint": "materials/presets/pbr/metal_titanium.azmaterial" + } + } + }, + { + "Key": { + "materialSlotStableId": 2418540911 + }, + "Value": { + "MaterialAsset": { + "assetId": { + "guid": "{64C1F6A6-6BDA-551A-BE56-1829E5913278}" + }, + "assetHint": "materials/presets/pbr/metal_aluminum_polished.azmaterial" + } + } + } + ] + } + } + }, + "Component_[8092226976542590265]": { + "$type": "EditorDisabledCompositionComponent", + "Id": 8092226976542590265 + } + } + }, + "Entity_[2798487988180]": { + "Id": "Entity_[2798487988180]", + "Name": "Entity1", + "Components": { + "Component_[11525365929370623807]": { + "$type": "EditorVisibilityComponent", + "Id": 11525365929370623807 + }, + "Component_[12334620273692642550]": { + "$type": "EditorLockComponent", + "Id": 12334620273692642550 + }, + "Component_[14389735759337977675]": { + "$type": "EditorPendingCompositionComponent", + "Id": 14389735759337977675 + }, + "Component_[16184381538555246534]": { + "$type": "AZ::Render::EditorMeshComponent", + "Id": 16184381538555246534, + "Controller": { + "Configuration": { + "ModelAsset": { + "assetId": { + "guid": "{E14975EF-E676-51A4-B826-3EF59CB645AA}", + "subId": 285127096 + }, + "assetHint": "testdata/objects/cube/cube.azmodel" + } + } + } + }, + "Component_[17962478023087084794]": { + "$type": "SelectionComponent", + "Id": 17962478023087084794 + }, + "Component_[18071675051915092508]": { + "$type": "EditorEntityIconComponent", + "Id": 18071675051915092508 + }, + "Component_[2115498007879087044]": { + "$type": "EditorInspectorComponent", + "Id": 2115498007879087044, + "ComponentOrderEntryArray": [ + { + "ComponentId": 399415038452606756 + }, + { + "ComponentId": 16184381538555246534, + "SortIndex": 1 + }, + { + "ComponentId": 7827190074535394331, + "SortIndex": 2 + } + ] + }, + "Component_[3518973002096080237]": { + "$type": "EditorOnlyEntityComponent", + "Id": 3518973002096080237 + }, + "Component_[399415038452606756]": { + "$type": "{27F1E1A1-8D9D-4C3B-BD3A-AFB9762449C0} TransformComponent", + "Id": 399415038452606756, + "Parent Entity": "ContainerEntity", + "Transform Data": { + "Translate": [ + -47.53056335449219, + -0.00018183141946792603, + 74.93071746826172 + ] + } + }, + "Component_[4564240319609068082]": { + "$type": "EditorEntitySortComponent", + "Id": 4564240319609068082 + }, + "Component_[7827190074535394331]": { + "$type": "EditorMaterialComponent", + "Id": 7827190074535394331, + "Controller": { + "Configuration": { + "materials": [ + { + "Key": { + "materialSlotStableId": 2418540911 + }, + "Value": { + "MaterialAsset": { + "assetId": { + "guid": "{64C1F6A6-6BDA-551A-BE56-1829E5913278}" + }, + "assetHint": "materials/presets/pbr/metal_aluminum_polished.azmaterial" + } + } + } + ] + } + } + }, + "Component_[8092226976542590265]": { + "$type": "EditorDisabledCompositionComponent", + "Id": 8092226976542590265 + } + } + }, + "Entity_[2802782955476]": { + "Id": "Entity_[2802782955476]", + "Name": "Entity1", + "Components": { + "Component_[11525365929370623807]": { + "$type": "EditorVisibilityComponent", + "Id": 11525365929370623807 + }, + "Component_[12334620273692642550]": { + "$type": "EditorLockComponent", + "Id": 12334620273692642550 + }, + "Component_[14389735759337977675]": { + "$type": "EditorPendingCompositionComponent", + "Id": 14389735759337977675 + }, + "Component_[16184381538555246534]": { + "$type": "AZ::Render::EditorMeshComponent", + "Id": 16184381538555246534, + "Controller": { + "Configuration": { + "ModelAsset": { + "assetId": { + "guid": "{E14975EF-E676-51A4-B826-3EF59CB645AA}", + "subId": 285127096 + }, + "assetHint": "testdata/objects/cube/cube.azmodel" + } + } + } + }, + "Component_[17962478023087084794]": { + "$type": "SelectionComponent", + "Id": 17962478023087084794 + }, + "Component_[18071675051915092508]": { + "$type": "EditorEntityIconComponent", + "Id": 18071675051915092508 + }, + "Component_[2115498007879087044]": { + "$type": "EditorInspectorComponent", + "Id": 2115498007879087044, + "ComponentOrderEntryArray": [ + { + "ComponentId": 399415038452606756 + }, + { + "ComponentId": 16184381538555246534, + "SortIndex": 1 + }, + { + "ComponentId": 7827190074535394331, + "SortIndex": 2 + } + ] + }, + "Component_[3518973002096080237]": { + "$type": "EditorOnlyEntityComponent", + "Id": 3518973002096080237 + }, + "Component_[399415038452606756]": { + "$type": "{27F1E1A1-8D9D-4C3B-BD3A-AFB9762449C0} TransformComponent", + "Id": 399415038452606756, + "Parent Entity": "ContainerEntity", + "Transform Data": { + "Translate": [ + 42.53014373779297, + -0.00018183141946792603, + 34.53608703613281 + ] + } + }, + "Component_[4564240319609068082]": { + "$type": "EditorEntitySortComponent", + "Id": 4564240319609068082 + }, + "Component_[7827190074535394331]": { + "$type": "EditorMaterialComponent", + "Id": 7827190074535394331, + "Controller": { + "Configuration": { + "materials": [ + { + "Key": { + "materialSlotStableId": 2418540911 + }, + "Value": { + "MaterialAsset": { + "assetId": { + "guid": "{5BC13D95-377E-53EA-9A93-156384BE8B04}" + }, + "assetHint": "materials/presets/pbr/metal_gold_matte.azmaterial" + } + } + } + ] + } + } + }, + "Component_[8092226976542590265]": { + "$type": "EditorDisabledCompositionComponent", + "Id": 8092226976542590265 + } + } + }, + "Entity_[2807077922772]": { + "Id": "Entity_[2807077922772]", + "Name": "Entity1", + "Components": { + "Component_[11525365929370623807]": { + "$type": "EditorVisibilityComponent", + "Id": 11525365929370623807 + }, + "Component_[12334620273692642550]": { + "$type": "EditorLockComponent", + "Id": 12334620273692642550 + }, + "Component_[14389735759337977675]": { + "$type": "EditorPendingCompositionComponent", + "Id": 14389735759337977675 + }, + "Component_[16184381538555246534]": { + "$type": "AZ::Render::EditorMeshComponent", + "Id": 16184381538555246534, + "Controller": { + "Configuration": { + "ModelAsset": { + "assetId": { + "guid": "{E14975EF-E676-51A4-B826-3EF59CB645AA}", + "subId": 285127096 + }, + "assetHint": "testdata/objects/cube/cube.azmodel" + } + } + } + }, + "Component_[17962478023087084794]": { + "$type": "SelectionComponent", + "Id": 17962478023087084794 + }, + "Component_[18071675051915092508]": { + "$type": "EditorEntityIconComponent", + "Id": 18071675051915092508 + }, + "Component_[2115498007879087044]": { + "$type": "EditorInspectorComponent", + "Id": 2115498007879087044, + "ComponentOrderEntryArray": [ + { + "ComponentId": 399415038452606756 + }, + { + "ComponentId": 16184381538555246534, + "SortIndex": 1 + }, + { + "ComponentId": 7827190074535394331, + "SortIndex": 2 + } + ] + }, + "Component_[3518973002096080237]": { + "$type": "EditorOnlyEntityComponent", + "Id": 3518973002096080237 + }, + "Component_[399415038452606756]": { + "$type": "{27F1E1A1-8D9D-4C3B-BD3A-AFB9762449C0} TransformComponent", + "Id": 399415038452606756, + "Parent Entity": "ContainerEntity", + "Transform Data": { + "Translate": [ + -27.530563354492188, + -0.00018183141946792603, + 105.0152359008789 + ] + } + }, + "Component_[4564240319609068082]": { + "$type": "EditorEntitySortComponent", + "Id": 4564240319609068082 + }, + "Component_[7827190074535394331]": { + "$type": "EditorMaterialComponent", + "Id": 7827190074535394331, + "Controller": { + "Configuration": { + "materials": [ + { + "Key": { + "materialSlotStableId": 2418540911 + }, + "Value": { + "MaterialAsset": { + "assetId": { + "guid": "{CF5C7B01-4912-58AE-991A-F25251E505AC}" + }, + "assetHint": "materials/presets/pbr/metal_copper_polished.azmaterial" + } + } + } + ] + } + } + }, + "Component_[8092226976542590265]": { + "$type": "EditorDisabledCompositionComponent", + "Id": 8092226976542590265 + } + } + }, + "Entity_[2811372890068]": { + "Id": "Entity_[2811372890068]", + "Name": "Entity1", + "Components": { + "Component_[11525365929370623807]": { + "$type": "EditorVisibilityComponent", + "Id": 11525365929370623807 + }, + "Component_[12334620273692642550]": { + "$type": "EditorLockComponent", + "Id": 12334620273692642550 + }, + "Component_[14389735759337977675]": { + "$type": "EditorPendingCompositionComponent", + "Id": 14389735759337977675 + }, + "Component_[16184381538555246534]": { + "$type": "AZ::Render::EditorMeshComponent", + "Id": 16184381538555246534, + "Controller": { + "Configuration": { + "ModelAsset": { + "assetId": { + "guid": "{E14975EF-E676-51A4-B826-3EF59CB645AA}", + "subId": 285127096 + }, + "assetHint": "testdata/objects/cube/cube.azmodel" + } + } + } + }, + "Component_[17962478023087084794]": { + "$type": "SelectionComponent", + "Id": 17962478023087084794 + }, + "Component_[18071675051915092508]": { + "$type": "EditorEntityIconComponent", + "Id": 18071675051915092508 + }, + "Component_[2115498007879087044]": { + "$type": "EditorInspectorComponent", + "Id": 2115498007879087044, + "ComponentOrderEntryArray": [ + { + "ComponentId": 399415038452606756 + }, + { + "ComponentId": 16184381538555246534, + "SortIndex": 1 + }, + { + "ComponentId": 7827190074535394331, + "SortIndex": 2 + } + ] + }, + "Component_[3518973002096080237]": { + "$type": "EditorOnlyEntityComponent", + "Id": 3518973002096080237 + }, + "Component_[399415038452606756]": { + "$type": "{27F1E1A1-8D9D-4C3B-BD3A-AFB9762449C0} TransformComponent", + "Id": 399415038452606756, + "Parent Entity": "ContainerEntity", + "Transform Data": { + "Translate": [ + -47.53056335449219, + -0.00018183141946792603, + 34.53608703613281 + ] + } + }, + "Component_[4564240319609068082]": { + "$type": "EditorEntitySortComponent", + "Id": 4564240319609068082 + }, + "Component_[7827190074535394331]": { + "$type": "EditorMaterialComponent", + "Id": 7827190074535394331, + "Controller": { + "Configuration": { + "materials": [ + { + "Key": { + "materialSlotStableId": 2418540911 + }, + "Value": { + "MaterialAsset": { + "assetId": { + "guid": "{549D26B8-881D-569F-AF05-961F36A43F4F}" + }, + "assetHint": "materials/presets/pbr/metal_aluminum_matte.azmaterial" + } + } + } + ] + } + } + }, + "Component_[8092226976542590265]": { + "$type": "EditorDisabledCompositionComponent", + "Id": 8092226976542590265 + } + } + }, + "Entity_[2815667857364]": { + "Id": "Entity_[2815667857364]", + "Name": "Entity1", + "Components": { + "Component_[11525365929370623807]": { + "$type": "EditorVisibilityComponent", + "Id": 11525365929370623807 + }, + "Component_[12334620273692642550]": { + "$type": "EditorLockComponent", + "Id": 12334620273692642550 + }, + "Component_[14389735759337977675]": { + "$type": "EditorPendingCompositionComponent", + "Id": 14389735759337977675 + }, + "Component_[16184381538555246534]": { + "$type": "AZ::Render::EditorMeshComponent", + "Id": 16184381538555246534, + "Controller": { + "Configuration": { + "ModelAsset": { + "assetId": { + "guid": "{E14975EF-E676-51A4-B826-3EF59CB645AA}", + "subId": 285127096 + }, + "assetHint": "testdata/objects/cube/cube.azmodel" + } + } + } + }, + "Component_[17962478023087084794]": { + "$type": "SelectionComponent", + "Id": 17962478023087084794 + }, + "Component_[18071675051915092508]": { + "$type": "EditorEntityIconComponent", + "Id": 18071675051915092508 + }, + "Component_[2115498007879087044]": { + "$type": "EditorInspectorComponent", + "Id": 2115498007879087044, + "ComponentOrderEntryArray": [ + { + "ComponentId": 399415038452606756 + }, + { + "ComponentId": 16184381538555246534, + "SortIndex": 1 + }, + { + "ComponentId": 7827190074535394331, + "SortIndex": 2 + } + ] + }, + "Component_[3518973002096080237]": { + "$type": "EditorOnlyEntityComponent", + "Id": 3518973002096080237 + }, + "Component_[399415038452606756]": { + "$type": "{27F1E1A1-8D9D-4C3B-BD3A-AFB9762449C0} TransformComponent", + "Id": 399415038452606756, + "Parent Entity": "ContainerEntity", + "Transform Data": { + "Translate": [ + 27.53014373779297, + -0.00018183141946792603, + 79.38228607177734 + ] + } + }, + "Component_[4564240319609068082]": { + "$type": "EditorEntitySortComponent", + "Id": 4564240319609068082 + }, + "Component_[7827190074535394331]": { + "$type": "EditorMaterialComponent", + "Id": 7827190074535394331, + "Controller": { + "Configuration": { + "materials": [ + { + "Key": { + "materialSlotStableId": 2418540911 + }, + "Value": { + "MaterialAsset": { + "assetId": { + "guid": "{A78EA2FC-688B-5E3A-A7F6-DB413D11D4CF}" + }, + "assetHint": "materials/presets/pbr/metal_chrome_matte.azmaterial" + } + } + } + ] + } + } + }, + "Component_[8092226976542590265]": { + "$type": "EditorDisabledCompositionComponent", + "Id": 8092226976542590265 + } + } + }, + "Entity_[2819962824660]": { + "Id": "Entity_[2819962824660]", + "Name": "Entity1", + "Components": { + "Component_[11525365929370623807]": { + "$type": "EditorVisibilityComponent", + "Id": 11525365929370623807 + }, + "Component_[12334620273692642550]": { + "$type": "EditorLockComponent", + "Id": 12334620273692642550 + }, + "Component_[14389735759337977675]": { + "$type": "EditorPendingCompositionComponent", + "Id": 14389735759337977675 + }, + "Component_[16184381538555246534]": { + "$type": "AZ::Render::EditorMeshComponent", + "Id": 16184381538555246534, + "Controller": { + "Configuration": { + "ModelAsset": { + "assetId": { + "guid": "{E14975EF-E676-51A4-B826-3EF59CB645AA}", + "subId": 285127096 + }, + "assetHint": "testdata/objects/cube/cube.azmodel" + } + } + } + }, + "Component_[17962478023087084794]": { + "$type": "SelectionComponent", + "Id": 17962478023087084794 + }, + "Component_[18071675051915092508]": { + "$type": "EditorEntityIconComponent", + "Id": 18071675051915092508 + }, + "Component_[2115498007879087044]": { + "$type": "EditorInspectorComponent", + "Id": 2115498007879087044, + "ComponentOrderEntryArray": [ + { + "ComponentId": 399415038452606756 + }, + { + "ComponentId": 16184381538555246534, + "SortIndex": 1 + }, + { + "ComponentId": 7827190074535394331, + "SortIndex": 2 + } + ] + }, + "Component_[3518973002096080237]": { + "$type": "EditorOnlyEntityComponent", + "Id": 3518973002096080237 + }, + "Component_[399415038452606756]": { + "$type": "{27F1E1A1-8D9D-4C3B-BD3A-AFB9762449C0} TransformComponent", + "Id": 399415038452606756, + "Parent Entity": "ContainerEntity", + "Transform Data": { + "Translate": [ + -7.5305633544921875, + -0.00018183141946792603, + 19.50924301147461 + ] + } + }, + "Component_[4564240319609068082]": { + "$type": "EditorEntitySortComponent", + "Id": 4564240319609068082 + }, + "Component_[7827190074535394331]": { + "$type": "EditorMaterialComponent", + "Id": 7827190074535394331, + "Controller": { + "Configuration": { + "materials": [ + { + "Key": { + "materialSlotStableId": 2418540911 + }, + "Value": { + "MaterialAsset": { + "assetId": { + "guid": "{E56377B1-6310-5311-A494-135BE50B74F0}" + }, + "assetHint": "materials/presets/pbr/metal_nickel_matte.azmaterial" + } + } + } + ] + } + } + }, + "Component_[8092226976542590265]": { + "$type": "EditorDisabledCompositionComponent", + "Id": 8092226976542590265 + } + } + }, + "Entity_[2824257791956]": { + "Id": "Entity_[2824257791956]", + "Name": "Entity1", + "Components": { + "Component_[11525365929370623807]": { + "$type": "EditorVisibilityComponent", + "Id": 11525365929370623807 + }, + "Component_[12334620273692642550]": { + "$type": "EditorLockComponent", + "Id": 12334620273692642550 + }, + "Component_[14389735759337977675]": { + "$type": "EditorPendingCompositionComponent", + "Id": 14389735759337977675 + }, + "Component_[16184381538555246534]": { + "$type": "AZ::Render::EditorMeshComponent", + "Id": 16184381538555246534, + "Controller": { + "Configuration": { + "ModelAsset": { + "assetId": { + "guid": "{E14975EF-E676-51A4-B826-3EF59CB645AA}", + "subId": 285127096 + }, + "assetHint": "testdata/objects/cube/cube.azmodel" + } + } + } + }, + "Component_[17962478023087084794]": { + "$type": "SelectionComponent", + "Id": 17962478023087084794 + }, + "Component_[18071675051915092508]": { + "$type": "EditorEntityIconComponent", + "Id": 18071675051915092508 + }, + "Component_[2115498007879087044]": { + "$type": "EditorInspectorComponent", + "Id": 2115498007879087044, + "ComponentOrderEntryArray": [ + { + "ComponentId": 399415038452606756 + }, + { + "ComponentId": 16184381538555246534, + "SortIndex": 1 + }, + { + "ComponentId": 7827190074535394331, + "SortIndex": 2 + } + ] + }, + "Component_[3518973002096080237]": { + "$type": "EditorOnlyEntityComponent", + "Id": 3518973002096080237 + }, + "Component_[399415038452606756]": { + "$type": "{27F1E1A1-8D9D-4C3B-BD3A-AFB9762449C0} TransformComponent", + "Id": 399415038452606756, + "Parent Entity": "ContainerEntity", + "Transform Data": { + "Translate": [ + -47.53056335449219, + -0.00018183141946792603, + 30.08451271057129 + ] + } + }, + "Component_[4564240319609068082]": { + "$type": "EditorEntitySortComponent", + "Id": 4564240319609068082 + }, + "Component_[7827190074535394331]": { + "$type": "EditorMaterialComponent", + "Id": 7827190074535394331, + "Controller": { + "Configuration": { + "materials": [ + { + "Key": { + "materialSlotStableId": 2418540911 + }, + "Value": { + "MaterialAsset": { + "assetId": { + "guid": "{64C1F6A6-6BDA-551A-BE56-1829E5913278}" + }, + "assetHint": "materials/presets/pbr/metal_aluminum_polished.azmaterial" + } + } + } + ] + } + } + }, + "Component_[8092226976542590265]": { + "$type": "EditorDisabledCompositionComponent", + "Id": 8092226976542590265 + } + } + }, + "Entity_[2828552759252]": { + "Id": "Entity_[2828552759252]", + "Name": "Entity1", + "Components": { + "Component_[11525365929370623807]": { + "$type": "EditorVisibilityComponent", + "Id": 11525365929370623807 + }, + "Component_[12334620273692642550]": { + "$type": "EditorLockComponent", + "Id": 12334620273692642550 + }, + "Component_[14389735759337977675]": { + "$type": "EditorPendingCompositionComponent", + "Id": 14389735759337977675 + }, + "Component_[16184381538555246534]": { + "$type": "AZ::Render::EditorMeshComponent", + "Id": 16184381538555246534, + "Controller": { + "Configuration": { + "ModelAsset": { + "assetId": { + "guid": "{E14975EF-E676-51A4-B826-3EF59CB645AA}", + "subId": 285127096 + }, + "assetHint": "testdata/objects/cube/cube.azmodel" + } + } + } + }, + "Component_[17962478023087084794]": { + "$type": "SelectionComponent", + "Id": 17962478023087084794 + }, + "Component_[18071675051915092508]": { + "$type": "EditorEntityIconComponent", + "Id": 18071675051915092508 + }, + "Component_[2115498007879087044]": { + "$type": "EditorInspectorComponent", + "Id": 2115498007879087044, + "ComponentOrderEntryArray": [ + { + "ComponentId": 399415038452606756 + }, + { + "ComponentId": 16184381538555246534, + "SortIndex": 1 + }, + { + "ComponentId": 7827190074535394331, + "SortIndex": 2 + } + ] + }, + "Component_[3518973002096080237]": { + "$type": "EditorOnlyEntityComponent", + "Id": 3518973002096080237 + }, + "Component_[399415038452606756]": { + "$type": "{27F1E1A1-8D9D-4C3B-BD3A-AFB9762449C0} TransformComponent", + "Id": 399415038452606756, + "Parent Entity": "ContainerEntity", + "Transform Data": { + "Translate": [ + 42.53014373779297, + -0.00018183141946792603, + 9.475835800170898 + ] + } + }, + "Component_[4564240319609068082]": { + "$type": "EditorEntitySortComponent", + "Id": 4564240319609068082 + }, + "Component_[7827190074535394331]": { + "$type": "EditorMaterialComponent", + "Id": 7827190074535394331, + "Controller": { + "Configuration": { + "materials": [ + { + "Key": { + "materialSlotStableId": 2418540911 + }, + "Value": { + "MaterialAsset": { + "assetId": { + "guid": "{FE52E7C8-064D-506A-9C26-433EB93747DE}" + }, + "assetHint": "materials/presets/pbr/metal_gold.azmaterial" + } + } + } + ] + } + } + }, + "Component_[8092226976542590265]": { + "$type": "EditorDisabledCompositionComponent", + "Id": 8092226976542590265 + } + } + }, + "Entity_[2832847726548]": { + "Id": "Entity_[2832847726548]", + "Name": "Entity1", + "Components": { + "Component_[11525365929370623807]": { + "$type": "EditorVisibilityComponent", + "Id": 11525365929370623807 + }, + "Component_[12334620273692642550]": { + "$type": "EditorLockComponent", + "Id": 12334620273692642550 + }, + "Component_[14389735759337977675]": { + "$type": "EditorPendingCompositionComponent", + "Id": 14389735759337977675 + }, + "Component_[16184381538555246534]": { + "$type": "AZ::Render::EditorMeshComponent", + "Id": 16184381538555246534, + "Controller": { + "Configuration": { + "ModelAsset": { + "assetId": { + "guid": "{E14975EF-E676-51A4-B826-3EF59CB645AA}", + "subId": 285127096 + }, + "assetHint": "testdata/objects/cube/cube.azmodel" + } + } + } + }, + "Component_[17962478023087084794]": { + "$type": "SelectionComponent", + "Id": 17962478023087084794 + }, + "Component_[18071675051915092508]": { + "$type": "EditorEntityIconComponent", + "Id": 18071675051915092508 + }, + "Component_[2115498007879087044]": { + "$type": "EditorInspectorComponent", + "Id": 2115498007879087044, + "ComponentOrderEntryArray": [ + { + "ComponentId": 399415038452606756 + }, + { + "ComponentId": 16184381538555246534, + "SortIndex": 1 + }, + { + "ComponentId": 7827190074535394331, + "SortIndex": 2 + } + ] + }, + "Component_[3518973002096080237]": { + "$type": "EditorOnlyEntityComponent", + "Id": 3518973002096080237 + }, + "Component_[399415038452606756]": { + "$type": "{27F1E1A1-8D9D-4C3B-BD3A-AFB9762449C0} TransformComponent", + "Id": 399415038452606756, + "Parent Entity": "ContainerEntity", + "Transform Data": { + "Translate": [ + -12.530563354492188, + -0.00018183141946792603, + 94.40913391113281 + ] + } + }, + "Component_[4564240319609068082]": { + "$type": "EditorEntitySortComponent", + "Id": 4564240319609068082 + }, + "Component_[7827190074535394331]": { + "$type": "EditorMaterialComponent", + "Id": 7827190074535394331, + "Controller": { + "Configuration": { + "materials": [ + { + "Key": { + "materialSlotStableId": 2418540911 + }, + "Value": { + "MaterialAsset": { + "assetId": { + "guid": "{F2AD0EBF-7137-58D1-9991-9552FAD41B19}" + }, + "assetHint": "materials/presets/pbr/metal_mercury.azmaterial" + } + } + } + ] + } + } + }, + "Component_[8092226976542590265]": { + "$type": "EditorDisabledCompositionComponent", + "Id": 8092226976542590265 + } + } + }, + "Entity_[2837142693844]": { + "Id": "Entity_[2837142693844]", + "Name": "Entity1", + "Components": { + "Component_[11525365929370623807]": { + "$type": "EditorVisibilityComponent", + "Id": 11525365929370623807 + }, + "Component_[12334620273692642550]": { + "$type": "EditorLockComponent", + "Id": 12334620273692642550 + }, + "Component_[14389735759337977675]": { + "$type": "EditorPendingCompositionComponent", + "Id": 14389735759337977675 + }, + "Component_[16184381538555246534]": { + "$type": "AZ::Render::EditorMeshComponent", + "Id": 16184381538555246534, + "Controller": { + "Configuration": { + "ModelAsset": { + "assetId": { + "guid": "{E14975EF-E676-51A4-B826-3EF59CB645AA}", + "subId": 285127096 + }, + "assetHint": "testdata/objects/cube/cube.azmodel" + } + } + } + }, + "Component_[17962478023087084794]": { + "$type": "SelectionComponent", + "Id": 17962478023087084794 + }, + "Component_[18071675051915092508]": { + "$type": "EditorEntityIconComponent", + "Id": 18071675051915092508 + }, + "Component_[2115498007879087044]": { + "$type": "EditorInspectorComponent", + "Id": 2115498007879087044, + "ComponentOrderEntryArray": [ + { + "ComponentId": 399415038452606756 + }, + { + "ComponentId": 16184381538555246534, + "SortIndex": 1 + }, + { + "ComponentId": 7827190074535394331, + "SortIndex": 2 + } + ] + }, + "Component_[3518973002096080237]": { + "$type": "EditorOnlyEntityComponent", + "Id": 3518973002096080237 + }, + "Component_[399415038452606756]": { + "$type": "{27F1E1A1-8D9D-4C3B-BD3A-AFB9762449C0} TransformComponent", + "Id": 399415038452606756, + "Parent Entity": "ContainerEntity", + "Transform Data": { + "Translate": [ + 7.530143737792969, + -0.00018183141946792603, + 64.32462310791016 + ] + } + }, + "Component_[4564240319609068082]": { + "$type": "EditorEntitySortComponent", + "Id": 4564240319609068082 + }, + "Component_[7827190074535394331]": { + "$type": "EditorMaterialComponent", + "Id": 7827190074535394331, + "Controller": { + "Configuration": { + "materials": [ + { + "Key": { + "materialSlotStableId": 2418540911 + }, + "Value": { + "MaterialAsset": { + "assetId": { + "guid": "{E54E46E7-9FA3-54D7-B5F8-8DCCDF17BC24}" + }, + "assetHint": "materials/presets/pbr/metal_silver_matte.azmaterial" + } + } + } + ] + } + } + }, + "Component_[8092226976542590265]": { + "$type": "EditorDisabledCompositionComponent", + "Id": 8092226976542590265 + } + } + }, + "Entity_[2841437661140]": { + "Id": "Entity_[2841437661140]", + "Name": "Entity1", + "Components": { + "Component_[11525365929370623807]": { + "$type": "EditorVisibilityComponent", + "Id": 11525365929370623807 + }, + "Component_[12334620273692642550]": { + "$type": "EditorLockComponent", + "Id": 12334620273692642550 + }, + "Component_[14389735759337977675]": { + "$type": "EditorPendingCompositionComponent", + "Id": 14389735759337977675 + }, + "Component_[16184381538555246534]": { + "$type": "AZ::Render::EditorMeshComponent", + "Id": 16184381538555246534, + "Controller": { + "Configuration": { + "ModelAsset": { + "assetId": { + "guid": "{E14975EF-E676-51A4-B826-3EF59CB645AA}", + "subId": 285127096 + }, + "assetHint": "testdata/objects/cube/cube.azmodel" + } + } + } + }, + "Component_[17962478023087084794]": { + "$type": "SelectionComponent", + "Id": 17962478023087084794 + }, + "Component_[18071675051915092508]": { + "$type": "EditorEntityIconComponent", + "Id": 18071675051915092508 + }, + "Component_[2115498007879087044]": { + "$type": "EditorInspectorComponent", + "Id": 2115498007879087044, + "ComponentOrderEntryArray": [ + { + "ComponentId": 399415038452606756 + }, + { + "ComponentId": 16184381538555246534, + "SortIndex": 1 + }, + { + "ComponentId": 7827190074535394331, + "SortIndex": 2 + } + ] + }, + "Component_[3518973002096080237]": { + "$type": "EditorOnlyEntityComponent", + "Id": 3518973002096080237 + }, + "Component_[399415038452606756]": { + "$type": "{27F1E1A1-8D9D-4C3B-BD3A-AFB9762449C0} TransformComponent", + "Id": 399415038452606756, + "Parent Entity": "ContainerEntity", + "Transform Data": { + "Translate": [ + 37.53014373779297, + -0.00018183141946792603, + 15.057670593261719 + ] + } + }, + "Component_[4564240319609068082]": { + "$type": "EditorEntitySortComponent", + "Id": 4564240319609068082 + }, + "Component_[7827190074535394331]": { + "$type": "EditorMaterialComponent", + "Id": 7827190074535394331, + "Controller": { + "Configuration": { + "materials": [ + { + "Key": { + "materialSlotStableId": 2418540911 + }, + "Value": { + "MaterialAsset": { + "assetId": { + "guid": "{CF5C7B01-4912-58AE-991A-F25251E505AC}" + }, + "assetHint": "materials/presets/pbr/metal_copper_polished.azmaterial" + } + } + } + ] + } + } + }, + "Component_[8092226976542590265]": { + "$type": "EditorDisabledCompositionComponent", + "Id": 8092226976542590265 + } + } + }, + "Entity_[2845732628436]": { + "Id": "Entity_[2845732628436]", + "Name": "Entity1", + "Components": { + "Component_[11525365929370623807]": { + "$type": "EditorVisibilityComponent", + "Id": 11525365929370623807 + }, + "Component_[12334620273692642550]": { + "$type": "EditorLockComponent", + "Id": 12334620273692642550 + }, + "Component_[14389735759337977675]": { + "$type": "EditorPendingCompositionComponent", + "Id": 14389735759337977675 + }, + "Component_[16184381538555246534]": { + "$type": "AZ::Render::EditorMeshComponent", + "Id": 16184381538555246534, + "Controller": { + "Configuration": { + "ModelAsset": { + "assetId": { + "guid": "{E14975EF-E676-51A4-B826-3EF59CB645AA}", + "subId": 285127096 + }, + "assetHint": "testdata/objects/cube/cube.azmodel" + } + } + } + }, + "Component_[17962478023087084794]": { + "$type": "SelectionComponent", + "Id": 17962478023087084794 + }, + "Component_[18071675051915092508]": { + "$type": "EditorEntityIconComponent", + "Id": 18071675051915092508 + }, + "Component_[2115498007879087044]": { + "$type": "EditorInspectorComponent", + "Id": 2115498007879087044, + "ComponentOrderEntryArray": [ + { + "ComponentId": 399415038452606756 + }, + { + "ComponentId": 16184381538555246534, + "SortIndex": 1 + }, + { + "ComponentId": 7827190074535394331, + "SortIndex": 2 + } + ] + }, + "Component_[3518973002096080237]": { + "$type": "EditorOnlyEntityComponent", + "Id": 3518973002096080237 + }, + "Component_[399415038452606756]": { + "$type": "{27F1E1A1-8D9D-4C3B-BD3A-AFB9762449C0} TransformComponent", + "Id": 399415038452606756, + "Parent Entity": "ContainerEntity", + "Transform Data": { + "Translate": [ + 17.53014373779297, + -0.00018183141946792603, + 109.46680450439453 + ] + } + }, + "Component_[4564240319609068082]": { + "$type": "EditorEntitySortComponent", + "Id": 4564240319609068082 + }, + "Component_[7827190074535394331]": { + "$type": "EditorMaterialComponent", + "Id": 7827190074535394331, + "Controller": { + "Configuration": { + "materials": [ + { + "Key": {}, + "Value": { + "MaterialAsset": { + "assetId": { + "guid": "{721188E0-B7CC-5D06-8D5D-39AF8ABF2EF9}" + }, + "assetHint": "materials/presets/pbr/metal_titanium.azmaterial" + } + } + }, + { + "Key": { + "materialSlotStableId": 2418540911 + }, + "Value": { + "MaterialAsset": { + "assetId": { + "guid": "{549D26B8-881D-569F-AF05-961F36A43F4F}" + }, + "assetHint": "materials/presets/pbr/metal_aluminum_matte.azmaterial" + } + } + } + ] + } + } + }, + "Component_[8092226976542590265]": { + "$type": "EditorDisabledCompositionComponent", + "Id": 8092226976542590265 + } + } + }, + "Entity_[2850027595732]": { + "Id": "Entity_[2850027595732]", + "Name": "Entity1", + "Components": { + "Component_[11525365929370623807]": { + "$type": "EditorVisibilityComponent", + "Id": 11525365929370623807 + }, + "Component_[12334620273692642550]": { + "$type": "EditorLockComponent", + "Id": 12334620273692642550 + }, + "Component_[14389735759337977675]": { + "$type": "EditorPendingCompositionComponent", + "Id": 14389735759337977675 + }, + "Component_[16184381538555246534]": { + "$type": "AZ::Render::EditorMeshComponent", + "Id": 16184381538555246534, + "Controller": { + "Configuration": { + "ModelAsset": { + "assetId": { + "guid": "{E14975EF-E676-51A4-B826-3EF59CB645AA}", + "subId": 285127096 + }, + "assetHint": "testdata/objects/cube/cube.azmodel" + } + } + } + }, + "Component_[17962478023087084794]": { + "$type": "SelectionComponent", + "Id": 17962478023087084794 + }, + "Component_[18071675051915092508]": { + "$type": "EditorEntityIconComponent", + "Id": 18071675051915092508 + }, + "Component_[2115498007879087044]": { + "$type": "EditorInspectorComponent", + "Id": 2115498007879087044, + "ComponentOrderEntryArray": [ + { + "ComponentId": 399415038452606756 + }, + { + "ComponentId": 16184381538555246534, + "SortIndex": 1 + }, + { + "ComponentId": 7827190074535394331, + "SortIndex": 2 + } + ] + }, + "Component_[3518973002096080237]": { + "$type": "EditorOnlyEntityComponent", + "Id": 3518973002096080237 + }, + "Component_[399415038452606756]": { + "$type": "{27F1E1A1-8D9D-4C3B-BD3A-AFB9762449C0} TransformComponent", + "Id": 399415038452606756, + "Parent Entity": "ContainerEntity", + "Transform Data": { + "Translate": [ + 22.53014373779297, + -0.00018183141946792603, + 114.4910659790039 + ] + } + }, + "Component_[4564240319609068082]": { + "$type": "EditorEntitySortComponent", + "Id": 4564240319609068082 + }, + "Component_[7827190074535394331]": { + "$type": "EditorMaterialComponent", + "Id": 7827190074535394331, + "Controller": { + "Configuration": { + "materials": [ + { + "Key": { + "materialSlotStableId": 2418540911 + }, + "Value": { + "MaterialAsset": { + "assetId": { + "guid": "{80E0F2A7-1EE4-597F-80EF-985C65BCE2EB}" + }, + "assetHint": "materials/presets/pbr/metal_brass.azmaterial" + } + } + } + ] + } + } + }, + "Component_[8092226976542590265]": { + "$type": "EditorDisabledCompositionComponent", + "Id": 8092226976542590265 + } + } + }, + "Entity_[2854322563028]": { + "Id": "Entity_[2854322563028]", + "Name": "Entity1", + "Components": { + "Component_[11525365929370623807]": { + "$type": "EditorVisibilityComponent", + "Id": 11525365929370623807 + }, + "Component_[12334620273692642550]": { + "$type": "EditorLockComponent", + "Id": 12334620273692642550 + }, + "Component_[14389735759337977675]": { + "$type": "EditorPendingCompositionComponent", + "Id": 14389735759337977675 + }, + "Component_[16184381538555246534]": { + "$type": "AZ::Render::EditorMeshComponent", + "Id": 16184381538555246534, + "Controller": { + "Configuration": { + "ModelAsset": { + "assetId": { + "guid": "{E14975EF-E676-51A4-B826-3EF59CB645AA}", + "subId": 285127096 + }, + "assetHint": "testdata/objects/cube/cube.azmodel" + } + } + } + }, + "Component_[17962478023087084794]": { + "$type": "SelectionComponent", + "Id": 17962478023087084794 + }, + "Component_[18071675051915092508]": { + "$type": "EditorEntityIconComponent", + "Id": 18071675051915092508 + }, + "Component_[2115498007879087044]": { + "$type": "EditorInspectorComponent", + "Id": 2115498007879087044, + "ComponentOrderEntryArray": [ + { + "ComponentId": 399415038452606756 + }, + { + "ComponentId": 16184381538555246534, + "SortIndex": 1 + }, + { + "ComponentId": 7827190074535394331, + "SortIndex": 2 + } + ] + }, + "Component_[3518973002096080237]": { + "$type": "EditorOnlyEntityComponent", + "Id": 3518973002096080237 + }, + "Component_[399415038452606756]": { + "$type": "{27F1E1A1-8D9D-4C3B-BD3A-AFB9762449C0} TransformComponent", + "Id": 399415038452606756, + "Parent Entity": "ContainerEntity", + "Transform Data": { + "Translate": [ + -32.53056335449219, + -0.00018183141946792603, + 105.0152359008789 + ] + } + }, + "Component_[4564240319609068082]": { + "$type": "EditorEntitySortComponent", + "Id": 4564240319609068082 + }, + "Component_[7827190074535394331]": { + "$type": "EditorMaterialComponent", + "Id": 7827190074535394331, + "Controller": { + "Configuration": { + "materials": [ + { + "Key": { + "materialSlotStableId": 2418540911 + }, + "Value": { + "MaterialAsset": { + "assetId": { + "guid": "{93DF55AE-8D1B-5AD1-A609-05F1BD9F6EA0}" + }, + "assetHint": "materials/presets/pbr/metal_cobalt_polished.azmaterial" + } + } + } + ] + } + } + }, + "Component_[8092226976542590265]": { + "$type": "EditorDisabledCompositionComponent", + "Id": 8092226976542590265 + } + } + }, + "Entity_[2858617530324]": { + "Id": "Entity_[2858617530324]", + "Name": "Entity1", + "Components": { + "Component_[11525365929370623807]": { + "$type": "EditorVisibilityComponent", + "Id": 11525365929370623807 + }, + "Component_[12334620273692642550]": { + "$type": "EditorLockComponent", + "Id": 12334620273692642550 + }, + "Component_[14389735759337977675]": { + "$type": "EditorPendingCompositionComponent", + "Id": 14389735759337977675 + }, + "Component_[16184381538555246534]": { + "$type": "AZ::Render::EditorMeshComponent", + "Id": 16184381538555246534, + "Controller": { + "Configuration": { + "ModelAsset": { + "assetId": { + "guid": "{E14975EF-E676-51A4-B826-3EF59CB645AA}", + "subId": 285127096 + }, + "assetHint": "testdata/objects/cube/cube.azmodel" + } + } + } + }, + "Component_[17962478023087084794]": { + "$type": "SelectionComponent", + "Id": 17962478023087084794 + }, + "Component_[18071675051915092508]": { + "$type": "EditorEntityIconComponent", + "Id": 18071675051915092508 + }, + "Component_[2115498007879087044]": { + "$type": "EditorInspectorComponent", + "Id": 2115498007879087044, + "ComponentOrderEntryArray": [ + { + "ComponentId": 399415038452606756 + }, + { + "ComponentId": 16184381538555246534, + "SortIndex": 1 + }, + { + "ComponentId": 7827190074535394331, + "SortIndex": 2 + } + ] + }, + "Component_[3518973002096080237]": { + "$type": "EditorOnlyEntityComponent", + "Id": 3518973002096080237 + }, + "Component_[399415038452606756]": { + "$type": "{27F1E1A1-8D9D-4C3B-BD3A-AFB9762449C0} TransformComponent", + "Id": 399415038452606756, + "Parent Entity": "ContainerEntity", + "Transform Data": { + "Translate": [ + -17.530563354492188, + -0.00018183141946792603, + 34.53608703613281 + ] + } + }, + "Component_[4564240319609068082]": { + "$type": "EditorEntitySortComponent", + "Id": 4564240319609068082 + }, + "Component_[7827190074535394331]": { + "$type": "EditorMaterialComponent", + "Id": 7827190074535394331, + "Controller": { + "Configuration": { + "materials": [ + { + "Key": { + "materialSlotStableId": 2418540911 + }, + "Value": { + "MaterialAsset": { + "assetId": { + "guid": "{970148AC-7258-5EC8-9CE7-F4EF93164D93}" + }, + "assetHint": "materials/presets/pbr/metal_iron_matte.azmaterial" + } + } + } + ] + } + } + }, + "Component_[8092226976542590265]": { + "$type": "EditorDisabledCompositionComponent", + "Id": 8092226976542590265 + } + } + }, + "Entity_[2862912497620]": { + "Id": "Entity_[2862912497620]", + "Name": "Entity1", + "Components": { + "Component_[11525365929370623807]": { + "$type": "EditorVisibilityComponent", + "Id": 11525365929370623807 + }, + "Component_[12334620273692642550]": { + "$type": "EditorLockComponent", + "Id": 12334620273692642550 + }, + "Component_[14389735759337977675]": { + "$type": "EditorPendingCompositionComponent", + "Id": 14389735759337977675 + }, + "Component_[16184381538555246534]": { + "$type": "AZ::Render::EditorMeshComponent", + "Id": 16184381538555246534, + "Controller": { + "Configuration": { + "ModelAsset": { + "assetId": { + "guid": "{E14975EF-E676-51A4-B826-3EF59CB645AA}", + "subId": 285127096 + }, + "assetHint": "testdata/objects/cube/cube.azmodel" + } + } + } + }, + "Component_[17962478023087084794]": { + "$type": "SelectionComponent", + "Id": 17962478023087084794 + }, + "Component_[18071675051915092508]": { + "$type": "EditorEntityIconComponent", + "Id": 18071675051915092508 + }, + "Component_[2115498007879087044]": { + "$type": "EditorInspectorComponent", + "Id": 2115498007879087044, + "ComponentOrderEntryArray": [ + { + "ComponentId": 399415038452606756 + }, + { + "ComponentId": 16184381538555246534, + "SortIndex": 1 + }, + { + "ComponentId": 7827190074535394331, + "SortIndex": 2 + } + ] + }, + "Component_[3518973002096080237]": { + "$type": "EditorOnlyEntityComponent", + "Id": 3518973002096080237 + }, + "Component_[399415038452606756]": { + "$type": "{27F1E1A1-8D9D-4C3B-BD3A-AFB9762449C0} TransformComponent", + "Id": 399415038452606756, + "Parent Entity": "ContainerEntity", + "Transform Data": { + "Translate": [ + -22.530563354492188, + -0.00018183141946792603, + 19.50924301147461 + ] + } + }, + "Component_[4564240319609068082]": { + "$type": "EditorEntitySortComponent", + "Id": 4564240319609068082 + }, + "Component_[7827190074535394331]": { + "$type": "EditorMaterialComponent", + "Id": 7827190074535394331, + "Controller": { + "Configuration": { + "materials": [ + { + "Key": { + "materialSlotStableId": 2418540911 + }, + "Value": { + "MaterialAsset": { + "assetId": { + "guid": "{5BC13D95-377E-53EA-9A93-156384BE8B04}" + }, + "assetHint": "materials/presets/pbr/metal_gold_matte.azmaterial" + } + } + } + ] + } + } + }, + "Component_[8092226976542590265]": { + "$type": "EditorDisabledCompositionComponent", + "Id": 8092226976542590265 + } + } + }, + "Entity_[2867207464916]": { + "Id": "Entity_[2867207464916]", + "Name": "Entity1", + "Components": { + "Component_[11525365929370623807]": { + "$type": "EditorVisibilityComponent", + "Id": 11525365929370623807 + }, + "Component_[12334620273692642550]": { + "$type": "EditorLockComponent", + "Id": 12334620273692642550 + }, + "Component_[14389735759337977675]": { + "$type": "EditorPendingCompositionComponent", + "Id": 14389735759337977675 + }, + "Component_[16184381538555246534]": { + "$type": "AZ::Render::EditorMeshComponent", + "Id": 16184381538555246534, + "Controller": { + "Configuration": { + "ModelAsset": { + "assetId": { + "guid": "{E14975EF-E676-51A4-B826-3EF59CB645AA}", + "subId": 285127096 + }, + "assetHint": "testdata/objects/cube/cube.azmodel" + } + } + } + }, + "Component_[17962478023087084794]": { + "$type": "SelectionComponent", + "Id": 17962478023087084794 + }, + "Component_[18071675051915092508]": { + "$type": "EditorEntityIconComponent", + "Id": 18071675051915092508 + }, + "Component_[2115498007879087044]": { + "$type": "EditorInspectorComponent", + "Id": 2115498007879087044, + "ComponentOrderEntryArray": [ + { + "ComponentId": 399415038452606756 + }, + { + "ComponentId": 16184381538555246534, + "SortIndex": 1 + }, + { + "ComponentId": 7827190074535394331, + "SortIndex": 2 + } + ] + }, + "Component_[3518973002096080237]": { + "$type": "EditorOnlyEntityComponent", + "Id": 3518973002096080237 + }, + "Component_[399415038452606756]": { + "$type": "{27F1E1A1-8D9D-4C3B-BD3A-AFB9762449C0} TransformComponent", + "Id": 399415038452606756, + "Parent Entity": "ContainerEntity", + "Transform Data": { + "Translate": [ + 27.53014373779297, + -0.00018183141946792603, + 109.46680450439453 + ] + } + }, + "Component_[4564240319609068082]": { + "$type": "EditorEntitySortComponent", + "Id": 4564240319609068082 + }, + "Component_[7827190074535394331]": { + "$type": "EditorMaterialComponent", + "Id": 7827190074535394331, + "Controller": { + "Configuration": { + "materials": [ + { + "Key": { + "materialSlotStableId": 2418540911 + }, + "Value": { + "MaterialAsset": { + "assetId": { + "guid": "{A78EA2FC-688B-5E3A-A7F6-DB413D11D4CF}" + }, + "assetHint": "materials/presets/pbr/metal_chrome_matte.azmaterial" + } + } + } + ] + } + } + }, + "Component_[8092226976542590265]": { + "$type": "EditorDisabledCompositionComponent", + "Id": 8092226976542590265 + } + } + }, + "Entity_[2871502432212]": { + "Id": "Entity_[2871502432212]", + "Name": "Entity1", + "Components": { + "Component_[11525365929370623807]": { + "$type": "EditorVisibilityComponent", + "Id": 11525365929370623807 + }, + "Component_[12334620273692642550]": { + "$type": "EditorLockComponent", + "Id": 12334620273692642550 + }, + "Component_[14389735759337977675]": { + "$type": "EditorPendingCompositionComponent", + "Id": 14389735759337977675 + }, + "Component_[16184381538555246534]": { + "$type": "AZ::Render::EditorMeshComponent", + "Id": 16184381538555246534, + "Controller": { + "Configuration": { + "ModelAsset": { + "assetId": { + "guid": "{E14975EF-E676-51A4-B826-3EF59CB645AA}", + "subId": 285127096 + }, + "assetHint": "testdata/objects/cube/cube.azmodel" + } + } + } + }, + "Component_[17962478023087084794]": { + "$type": "SelectionComponent", + "Id": 17962478023087084794 + }, + "Component_[18071675051915092508]": { + "$type": "EditorEntityIconComponent", + "Id": 18071675051915092508 + }, + "Component_[2115498007879087044]": { + "$type": "EditorInspectorComponent", + "Id": 2115498007879087044, + "ComponentOrderEntryArray": [ + { + "ComponentId": 399415038452606756 + }, + { + "ComponentId": 16184381538555246534, + "SortIndex": 1 + }, + { + "ComponentId": 7827190074535394331, + "SortIndex": 2 + } + ] + }, + "Component_[3518973002096080237]": { + "$type": "EditorOnlyEntityComponent", + "Id": 3518973002096080237 + }, + "Component_[399415038452606756]": { + "$type": "{27F1E1A1-8D9D-4C3B-BD3A-AFB9762449C0} TransformComponent", + "Id": 399415038452606756, + "Parent Entity": "ContainerEntity", + "Transform Data": { + "Translate": [ + 17.53014373779297, + -0.00018183141946792603, + 64.32462310791016 + ] + } + }, + "Component_[4564240319609068082]": { + "$type": "EditorEntitySortComponent", + "Id": 4564240319609068082 + }, + "Component_[7827190074535394331]": { + "$type": "EditorMaterialComponent", + "Id": 7827190074535394331, + "Controller": { + "Configuration": { + "materials": [ + { + "Key": {}, + "Value": { + "MaterialAsset": { + "assetId": { + "guid": "{721188E0-B7CC-5D06-8D5D-39AF8ABF2EF9}" + }, + "assetHint": "materials/presets/pbr/metal_titanium.azmaterial" + } + } + }, + { + "Key": { + "materialSlotStableId": 2418540911 + }, + "Value": { + "MaterialAsset": { + "assetId": { + "guid": "{549D26B8-881D-569F-AF05-961F36A43F4F}" + }, + "assetHint": "materials/presets/pbr/metal_aluminum_matte.azmaterial" + } + } + } + ] + } + } + }, + "Component_[8092226976542590265]": { + "$type": "EditorDisabledCompositionComponent", + "Id": 8092226976542590265 + } + } + }, + "Entity_[2875797399508]": { + "Id": "Entity_[2875797399508]", + "Name": "Entity1", + "Components": { + "Component_[11525365929370623807]": { + "$type": "EditorVisibilityComponent", + "Id": 11525365929370623807 + }, + "Component_[12334620273692642550]": { + "$type": "EditorLockComponent", + "Id": 12334620273692642550 + }, + "Component_[14389735759337977675]": { + "$type": "EditorPendingCompositionComponent", + "Id": 14389735759337977675 + }, + "Component_[16184381538555246534]": { + "$type": "AZ::Render::EditorMeshComponent", + "Id": 16184381538555246534, + "Controller": { + "Configuration": { + "ModelAsset": { + "assetId": { + "guid": "{E14975EF-E676-51A4-B826-3EF59CB645AA}", + "subId": 285127096 + }, + "assetHint": "testdata/objects/cube/cube.azmodel" + } + } + } + }, + "Component_[17962478023087084794]": { + "$type": "SelectionComponent", + "Id": 17962478023087084794 + }, + "Component_[18071675051915092508]": { + "$type": "EditorEntityIconComponent", + "Id": 18071675051915092508 + }, + "Component_[2115498007879087044]": { + "$type": "EditorInspectorComponent", + "Id": 2115498007879087044, + "ComponentOrderEntryArray": [ + { + "ComponentId": 399415038452606756 + }, + { + "ComponentId": 16184381538555246534, + "SortIndex": 1 + }, + { + "ComponentId": 7827190074535394331, + "SortIndex": 2 + } + ] + }, + "Component_[3518973002096080237]": { + "$type": "EditorOnlyEntityComponent", + "Id": 3518973002096080237 + }, + "Component_[399415038452606756]": { + "$type": "{27F1E1A1-8D9D-4C3B-BD3A-AFB9762449C0} TransformComponent", + "Id": 399415038452606756, + "Parent Entity": "ContainerEntity", + "Transform Data": { + "Translate": [ + 32.53014373779297, + -0.00018183141946792603, + 49.593753814697266 + ] + } + }, + "Component_[4564240319609068082]": { + "$type": "EditorEntitySortComponent", + "Id": 4564240319609068082 + }, + "Component_[7827190074535394331]": { + "$type": "EditorMaterialComponent", + "Id": 7827190074535394331, + "Controller": { + "Configuration": { + "materials": [ + { + "Key": { + "materialSlotStableId": 2418540911 + }, + "Value": { + "MaterialAsset": { + "assetId": { + "guid": "{C60A39AF-BB76-51BD-9468-A88C9A6F78D7}" + }, + "assetHint": "materials/presets/pbr/metal_cobalt_matte.azmaterial" + } + } + } + ] + } + } + }, + "Component_[8092226976542590265]": { + "$type": "EditorDisabledCompositionComponent", + "Id": 8092226976542590265 + } + } + }, + "Entity_[2880092366804]": { + "Id": "Entity_[2880092366804]", + "Name": "Entity1", + "Components": { + "Component_[11525365929370623807]": { + "$type": "EditorVisibilityComponent", + "Id": 11525365929370623807 + }, + "Component_[12334620273692642550]": { + "$type": "EditorLockComponent", + "Id": 12334620273692642550 + }, + "Component_[14389735759337977675]": { + "$type": "EditorPendingCompositionComponent", + "Id": 14389735759337977675 + }, + "Component_[16184381538555246534]": { + "$type": "AZ::Render::EditorMeshComponent", + "Id": 16184381538555246534, + "Controller": { + "Configuration": { + "ModelAsset": { + "assetId": { + "guid": "{E14975EF-E676-51A4-B826-3EF59CB645AA}", + "subId": 285127096 + }, + "assetHint": "testdata/objects/cube/cube.azmodel" + } + } + } + }, + "Component_[17962478023087084794]": { + "$type": "SelectionComponent", + "Id": 17962478023087084794 + }, + "Component_[18071675051915092508]": { + "$type": "EditorEntityIconComponent", + "Id": 18071675051915092508 + }, + "Component_[2115498007879087044]": { + "$type": "EditorInspectorComponent", + "Id": 2115498007879087044, + "ComponentOrderEntryArray": [ + { + "ComponentId": 399415038452606756 + }, + { + "ComponentId": 16184381538555246534, + "SortIndex": 1 + }, + { + "ComponentId": 7827190074535394331, + "SortIndex": 2 + } + ] + }, + "Component_[3518973002096080237]": { + "$type": "EditorOnlyEntityComponent", + "Id": 3518973002096080237 + }, + "Component_[399415038452606756]": { + "$type": "{27F1E1A1-8D9D-4C3B-BD3A-AFB9762449C0} TransformComponent", + "Id": 399415038452606756, + "Parent Entity": "ContainerEntity", + "Transform Data": { + "Translate": [ + 32.53014373779297, + -0.00018183141946792603, + 84.40655517578125 + ] + } + }, + "Component_[4564240319609068082]": { + "$type": "EditorEntitySortComponent", + "Id": 4564240319609068082 + }, + "Component_[7827190074535394331]": { + "$type": "EditorMaterialComponent", + "Id": 7827190074535394331, + "Controller": { + "Configuration": { + "materials": [ + { + "Key": { + "materialSlotStableId": 2418540911 + }, + "Value": { + "MaterialAsset": { + "assetId": { + "guid": "{99976D73-6248-5D66-AD15-E8F52B0AFE36}" + }, + "assetHint": "materials/presets/pbr/metal_cobalt.azmaterial" + } + } + } + ] + } + } + }, + "Component_[8092226976542590265]": { + "$type": "EditorDisabledCompositionComponent", + "Id": 8092226976542590265 + } + } + }, + "Entity_[2884387334100]": { + "Id": "Entity_[2884387334100]", + "Name": "Entity1", + "Components": { + "Component_[1057179753323467068]": { + "$type": "EditorMaterialComponent", + "Id": 1057179753323467068, + "Controller": { + "Configuration": { + "materials": [ + { + "Key": { + "materialSlotStableId": 2418540911 + }, + "Value": { + "MaterialAsset": { + "assetId": { + "guid": "{721188E0-B7CC-5D06-8D5D-39AF8ABF2EF9}" + }, + "assetHint": "materials/presets/pbr/metal_titanium.azmaterial" + } + } + } + ] + } + } + }, + "Component_[11525365929370623807]": { + "$type": "EditorVisibilityComponent", + "Id": 11525365929370623807 + }, + "Component_[12334620273692642550]": { + "$type": "EditorLockComponent", + "Id": 12334620273692642550 + }, + "Component_[14389735759337977675]": { + "$type": "EditorPendingCompositionComponent", + "Id": 14389735759337977675 + }, + "Component_[16184381538555246534]": { + "$type": "AZ::Render::EditorMeshComponent", + "Id": 16184381538555246534, + "Controller": { + "Configuration": { + "ModelAsset": { + "assetId": { + "guid": "{E14975EF-E676-51A4-B826-3EF59CB645AA}", + "subId": 285127096 + }, + "assetHint": "testdata/objects/cube/cube.azmodel" + } + } + } + }, + "Component_[17962478023087084794]": { + "$type": "SelectionComponent", + "Id": 17962478023087084794 + }, + "Component_[18071675051915092508]": { + "$type": "EditorEntityIconComponent", + "Id": 18071675051915092508 + }, + "Component_[2115498007879087044]": { + "$type": "EditorInspectorComponent", + "Id": 2115498007879087044, + "ComponentOrderEntryArray": [ + { + "ComponentId": 399415038452606756 + }, + { + "ComponentId": 16184381538555246534, + "SortIndex": 1 + }, + { + "ComponentId": 1057179753323467068, + "SortIndex": 2 + } + ] + }, + "Component_[3518973002096080237]": { + "$type": "EditorOnlyEntityComponent", + "Id": 3518973002096080237 + }, + "Component_[399415038452606756]": { + "$type": "{27F1E1A1-8D9D-4C3B-BD3A-AFB9762449C0} TransformComponent", + "Id": 399415038452606756, + "Parent Entity": "ContainerEntity", + "Transform Data": { + "Translate": [ + 12.530143737792969, + -0.00018183141946792603, + 9.475835800170898 + ] + } + }, + "Component_[4564240319609068082]": { + "$type": "EditorEntitySortComponent", + "Id": 4564240319609068082 + }, + "Component_[8092226976542590265]": { + "$type": "EditorDisabledCompositionComponent", + "Id": 8092226976542590265 + } + } + }, + "Entity_[2888682301396]": { + "Id": "Entity_[2888682301396]", + "Name": "Entity1", + "Components": { + "Component_[11525365929370623807]": { + "$type": "EditorVisibilityComponent", + "Id": 11525365929370623807 + }, + "Component_[12334620273692642550]": { + "$type": "EditorLockComponent", + "Id": 12334620273692642550 + }, + "Component_[14389735759337977675]": { + "$type": "EditorPendingCompositionComponent", + "Id": 14389735759337977675 + }, + "Component_[16184381538555246534]": { + "$type": "AZ::Render::EditorMeshComponent", + "Id": 16184381538555246534, + "Controller": { + "Configuration": { + "ModelAsset": { + "assetId": { + "guid": "{E14975EF-E676-51A4-B826-3EF59CB645AA}", + "subId": 285127096 + }, + "assetHint": "testdata/objects/cube/cube.azmodel" + } + } + } + }, + "Component_[17962478023087084794]": { + "$type": "SelectionComponent", + "Id": 17962478023087084794 + }, + "Component_[18071675051915092508]": { + "$type": "EditorEntityIconComponent", + "Id": 18071675051915092508 + }, + "Component_[2115498007879087044]": { + "$type": "EditorInspectorComponent", + "Id": 2115498007879087044, + "ComponentOrderEntryArray": [ + { + "ComponentId": 399415038452606756 + }, + { + "ComponentId": 16184381538555246534, + "SortIndex": 1 + }, + { + "ComponentId": 7827190074535394331, + "SortIndex": 2 + } + ] + }, + "Component_[3518973002096080237]": { + "$type": "EditorOnlyEntityComponent", + "Id": 3518973002096080237 + }, + "Component_[399415038452606756]": { + "$type": "{27F1E1A1-8D9D-4C3B-BD3A-AFB9762449C0} TransformComponent", + "Id": 399415038452606756, + "Parent Entity": "ContainerEntity", + "Transform Data": { + "Translate": [ + 32.53014373779297, + -0.00018183141946792603, + 24.533506393432617 + ] + } + }, + "Component_[4564240319609068082]": { + "$type": "EditorEntitySortComponent", + "Id": 4564240319609068082 + }, + "Component_[7827190074535394331]": { + "$type": "EditorMaterialComponent", + "Id": 7827190074535394331, + "Controller": { + "Configuration": { + "materials": [ + { + "Key": { + "materialSlotStableId": 2418540911 + }, + "Value": { + "MaterialAsset": { + "assetId": { + "guid": "{99976D73-6248-5D66-AD15-E8F52B0AFE36}" + }, + "assetHint": "materials/presets/pbr/metal_cobalt.azmaterial" + } + } + } + ] + } + } + }, + "Component_[8092226976542590265]": { + "$type": "EditorDisabledCompositionComponent", + "Id": 8092226976542590265 + } + } + }, + "Entity_[2892977268692]": { + "Id": "Entity_[2892977268692]", + "Name": "Entity1", + "Components": { + "Component_[11525365929370623807]": { + "$type": "EditorVisibilityComponent", + "Id": 11525365929370623807 + }, + "Component_[12334620273692642550]": { + "$type": "EditorLockComponent", + "Id": 12334620273692642550 + }, + "Component_[14389735759337977675]": { + "$type": "EditorPendingCompositionComponent", + "Id": 14389735759337977675 + }, + "Component_[16184381538555246534]": { + "$type": "AZ::Render::EditorMeshComponent", + "Id": 16184381538555246534, + "Controller": { + "Configuration": { + "ModelAsset": { + "assetId": { + "guid": "{E14975EF-E676-51A4-B826-3EF59CB645AA}", + "subId": 285127096 + }, + "assetHint": "testdata/objects/cube/cube.azmodel" + } + } + } + }, + "Component_[17962478023087084794]": { + "$type": "SelectionComponent", + "Id": 17962478023087084794 + }, + "Component_[18071675051915092508]": { + "$type": "EditorEntityIconComponent", + "Id": 18071675051915092508 + }, + "Component_[2115498007879087044]": { + "$type": "EditorInspectorComponent", + "Id": 2115498007879087044, + "ComponentOrderEntryArray": [ + { + "ComponentId": 399415038452606756 + }, + { + "ComponentId": 16184381538555246534, + "SortIndex": 1 + }, + { + "ComponentId": 7827190074535394331, + "SortIndex": 2 + } + ] + }, + "Component_[3518973002096080237]": { + "$type": "EditorOnlyEntityComponent", + "Id": 3518973002096080237 + }, + "Component_[399415038452606756]": { + "$type": "{27F1E1A1-8D9D-4C3B-BD3A-AFB9762449C0} TransformComponent", + "Id": 399415038452606756, + "Parent Entity": "ContainerEntity", + "Transform Data": { + "Translate": [ + -27.530563354492188, + -0.00018183141946792603, + 84.40655517578125 + ] + } + }, + "Component_[4564240319609068082]": { + "$type": "EditorEntitySortComponent", + "Id": 4564240319609068082 + }, + "Component_[7827190074535394331]": { + "$type": "EditorMaterialComponent", + "Id": 7827190074535394331, + "Controller": { + "Configuration": { + "materials": [ + { + "Key": { + "materialSlotStableId": 2418540911 + }, + "Value": { + "MaterialAsset": { + "assetId": { + "guid": "{E621C5BF-B8E1-55F0-A791-EC960F2FA46F}" + }, + "assetHint": "materials/presets/pbr/metal_copper.azmaterial" + } + } + } + ] + } + } + }, + "Component_[8092226976542590265]": { + "$type": "EditorDisabledCompositionComponent", + "Id": 8092226976542590265 + } + } + }, + "Entity_[2897272235988]": { + "Id": "Entity_[2897272235988]", + "Name": "Entity1", + "Components": { + "Component_[11525365929370623807]": { + "$type": "EditorVisibilityComponent", + "Id": 11525365929370623807 + }, + "Component_[12334620273692642550]": { + "$type": "EditorLockComponent", + "Id": 12334620273692642550 + }, + "Component_[14389735759337977675]": { + "$type": "EditorPendingCompositionComponent", + "Id": 14389735759337977675 + }, + "Component_[16184381538555246534]": { + "$type": "AZ::Render::EditorMeshComponent", + "Id": 16184381538555246534, + "Controller": { + "Configuration": { + "ModelAsset": { + "assetId": { + "guid": "{E14975EF-E676-51A4-B826-3EF59CB645AA}", + "subId": 285127096 + }, + "assetHint": "testdata/objects/cube/cube.azmodel" + } + } + } + }, + "Component_[17962478023087084794]": { + "$type": "SelectionComponent", + "Id": 17962478023087084794 + }, + "Component_[18071675051915092508]": { + "$type": "EditorEntityIconComponent", + "Id": 18071675051915092508 + }, + "Component_[2115498007879087044]": { + "$type": "EditorInspectorComponent", + "Id": 2115498007879087044, + "ComponentOrderEntryArray": [ + { + "ComponentId": 399415038452606756 + }, + { + "ComponentId": 16184381538555246534, + "SortIndex": 1 + }, + { + "ComponentId": 7827190074535394331, + "SortIndex": 2 + } + ] + }, + "Component_[3518973002096080237]": { + "$type": "EditorOnlyEntityComponent", + "Id": 3518973002096080237 + }, + "Component_[399415038452606756]": { + "$type": "{27F1E1A1-8D9D-4C3B-BD3A-AFB9762449C0} TransformComponent", + "Id": 399415038452606756, + "Parent Entity": "ContainerEntity", + "Transform Data": { + "Translate": [ + 22.53014373779297, + -0.00018183141946792603, + 84.40655517578125 + ] + } + }, + "Component_[4564240319609068082]": { + "$type": "EditorEntitySortComponent", + "Id": 4564240319609068082 + }, + "Component_[7827190074535394331]": { + "$type": "EditorMaterialComponent", + "Id": 7827190074535394331, + "Controller": { + "Configuration": { + "materials": [ + { + "Key": { + "materialSlotStableId": 2418540911 + }, + "Value": { + "MaterialAsset": { + "assetId": { + "guid": "{80E0F2A7-1EE4-597F-80EF-985C65BCE2EB}" + }, + "assetHint": "materials/presets/pbr/metal_brass.azmaterial" + } + } + } + ] + } + } + }, + "Component_[8092226976542590265]": { + "$type": "EditorDisabledCompositionComponent", + "Id": 8092226976542590265 + } + } + }, + "Entity_[2901567203284]": { + "Id": "Entity_[2901567203284]", + "Name": "Entity1", + "Components": { + "Component_[11525365929370623807]": { + "$type": "EditorVisibilityComponent", + "Id": 11525365929370623807 + }, + "Component_[12334620273692642550]": { + "$type": "EditorLockComponent", + "Id": 12334620273692642550 + }, + "Component_[14389735759337977675]": { + "$type": "EditorPendingCompositionComponent", + "Id": 14389735759337977675 + }, + "Component_[16184381538555246534]": { + "$type": "AZ::Render::EditorMeshComponent", + "Id": 16184381538555246534, + "Controller": { + "Configuration": { + "ModelAsset": { + "assetId": { + "guid": "{E14975EF-E676-51A4-B826-3EF59CB645AA}", + "subId": 285127096 + }, + "assetHint": "testdata/objects/cube/cube.azmodel" + } + } + } + }, + "Component_[17962478023087084794]": { + "$type": "SelectionComponent", + "Id": 17962478023087084794 + }, + "Component_[18071675051915092508]": { + "$type": "EditorEntityIconComponent", + "Id": 18071675051915092508 + }, + "Component_[2115498007879087044]": { + "$type": "EditorInspectorComponent", + "Id": 2115498007879087044, + "ComponentOrderEntryArray": [ + { + "ComponentId": 399415038452606756 + }, + { + "ComponentId": 16184381538555246534, + "SortIndex": 1 + }, + { + "ComponentId": 7827190074535394331, + "SortIndex": 2 + } + ] + }, + "Component_[3518973002096080237]": { + "$type": "EditorOnlyEntityComponent", + "Id": 3518973002096080237 + }, + "Component_[399415038452606756]": { + "$type": "{27F1E1A1-8D9D-4C3B-BD3A-AFB9762449C0} TransformComponent", + "Id": 399415038452606756, + "Parent Entity": "ContainerEntity", + "Transform Data": { + "Translate": [ + -32.53056335449219, + -0.00018183141946792603, + 105.0152359008789 + ] + } + }, + "Component_[4564240319609068082]": { + "$type": "EditorEntitySortComponent", + "Id": 4564240319609068082 + }, + "Component_[7827190074535394331]": { + "$type": "EditorMaterialComponent", + "Id": 7827190074535394331, + "Controller": { + "Configuration": { + "materials": [ + { + "Key": { + "materialSlotStableId": 2418540911 + }, + "Value": { + "MaterialAsset": { + "assetId": { + "guid": "{93DF55AE-8D1B-5AD1-A609-05F1BD9F6EA0}" + }, + "assetHint": "materials/presets/pbr/metal_cobalt_polished.azmaterial" + } + } + } + ] + } + } + }, + "Component_[8092226976542590265]": { + "$type": "EditorDisabledCompositionComponent", + "Id": 8092226976542590265 + } + } + }, + "Entity_[2905862170580]": { + "Id": "Entity_[2905862170580]", + "Name": "Entity1", + "Components": { + "Component_[11525365929370623807]": { + "$type": "EditorVisibilityComponent", + "Id": 11525365929370623807 + }, + "Component_[12334620273692642550]": { + "$type": "EditorLockComponent", + "Id": 12334620273692642550 + }, + "Component_[14389735759337977675]": { + "$type": "EditorPendingCompositionComponent", + "Id": 14389735759337977675 + }, + "Component_[16184381538555246534]": { + "$type": "AZ::Render::EditorMeshComponent", + "Id": 16184381538555246534, + "Controller": { + "Configuration": { + "ModelAsset": { + "assetId": { + "guid": "{E14975EF-E676-51A4-B826-3EF59CB645AA}", + "subId": 285127096 + }, + "assetHint": "testdata/objects/cube/cube.azmodel" + } + } + } + }, + "Component_[17962478023087084794]": { + "$type": "SelectionComponent", + "Id": 17962478023087084794 + }, + "Component_[18071675051915092508]": { + "$type": "EditorEntityIconComponent", + "Id": 18071675051915092508 + }, + "Component_[2115498007879087044]": { + "$type": "EditorInspectorComponent", + "Id": 2115498007879087044, + "ComponentOrderEntryArray": [ + { + "ComponentId": 399415038452606756 + }, + { + "ComponentId": 16184381538555246534, + "SortIndex": 1 + }, + { + "ComponentId": 7827190074535394331, + "SortIndex": 2 + } + ] + }, + "Component_[3518973002096080237]": { + "$type": "EditorOnlyEntityComponent", + "Id": 3518973002096080237 + }, + "Component_[399415038452606756]": { + "$type": "{27F1E1A1-8D9D-4C3B-BD3A-AFB9762449C0} TransformComponent", + "Id": 399415038452606756, + "Parent Entity": "ContainerEntity", + "Transform Data": { + "Translate": [ + -22.530563354492188, + -0.00018183141946792603, + 49.593753814697266 + ] + } + }, + "Component_[4564240319609068082]": { + "$type": "EditorEntitySortComponent", + "Id": 4564240319609068082 + }, + "Component_[7827190074535394331]": { + "$type": "EditorMaterialComponent", + "Id": 7827190074535394331, + "Controller": { + "Configuration": { + "materials": [ + { + "Key": { + "materialSlotStableId": 2418540911 + }, + "Value": { + "MaterialAsset": { + "assetId": { + "guid": "{5BC13D95-377E-53EA-9A93-156384BE8B04}" + }, + "assetHint": "materials/presets/pbr/metal_gold_matte.azmaterial" + } + } + } + ] + } + } + }, + "Component_[8092226976542590265]": { + "$type": "EditorDisabledCompositionComponent", + "Id": 8092226976542590265 + } + } + }, + "Entity_[2910157137876]": { + "Id": "Entity_[2910157137876]", + "Name": "Entity1", + "Components": { + "Component_[11525365929370623807]": { + "$type": "EditorVisibilityComponent", + "Id": 11525365929370623807 + }, + "Component_[12334620273692642550]": { + "$type": "EditorLockComponent", + "Id": 12334620273692642550 + }, + "Component_[14389735759337977675]": { + "$type": "EditorPendingCompositionComponent", + "Id": 14389735759337977675 + }, + "Component_[16184381538555246534]": { + "$type": "AZ::Render::EditorMeshComponent", + "Id": 16184381538555246534, + "Controller": { + "Configuration": { + "ModelAsset": { + "assetId": { + "guid": "{E14975EF-E676-51A4-B826-3EF59CB645AA}", + "subId": 285127096 + }, + "assetHint": "testdata/objects/cube/cube.azmodel" + } + } + } + }, + "Component_[17962478023087084794]": { + "$type": "SelectionComponent", + "Id": 17962478023087084794 + }, + "Component_[18071675051915092508]": { + "$type": "EditorEntityIconComponent", + "Id": 18071675051915092508 + }, + "Component_[2115498007879087044]": { + "$type": "EditorInspectorComponent", + "Id": 2115498007879087044, + "ComponentOrderEntryArray": [ + { + "ComponentId": 399415038452606756 + }, + { + "ComponentId": 16184381538555246534, + "SortIndex": 1 + }, + { + "ComponentId": 7827190074535394331, + "SortIndex": 2 + } + ] + }, + "Component_[3518973002096080237]": { + "$type": "EditorOnlyEntityComponent", + "Id": 3518973002096080237 + }, + "Component_[399415038452606756]": { + "$type": "{27F1E1A1-8D9D-4C3B-BD3A-AFB9762449C0} TransformComponent", + "Id": 399415038452606756, + "Parent Entity": "ContainerEntity", + "Transform Data": { + "Translate": [ + -42.53056335449219, + -0.00018183141946792603, + 45.14218521118164 + ] + } + }, + "Component_[4564240319609068082]": { + "$type": "EditorEntitySortComponent", + "Id": 4564240319609068082 + }, + "Component_[7827190074535394331]": { + "$type": "EditorMaterialComponent", + "Id": 7827190074535394331, + "Controller": { + "Configuration": { + "materials": [ + { + "Key": { + "materialSlotStableId": 2418540911 + }, + "Value": { + "MaterialAsset": { + "assetId": { + "guid": "{FC69F2F8-F73B-5A0C-B8B7-94BAA45780FC}" + }, + "assetHint": "materials/presets/pbr/metal_brass_polished.azmaterial" + } + } + } + ] + } + } + }, + "Component_[8092226976542590265]": { + "$type": "EditorDisabledCompositionComponent", + "Id": 8092226976542590265 + } + } + }, + "Entity_[2914452105172]": { + "Id": "Entity_[2914452105172]", + "Name": "Entity1", + "Components": { + "Component_[11525365929370623807]": { + "$type": "EditorVisibilityComponent", + "Id": 11525365929370623807 + }, + "Component_[12334620273692642550]": { + "$type": "EditorLockComponent", + "Id": 12334620273692642550 + }, + "Component_[14389735759337977675]": { + "$type": "EditorPendingCompositionComponent", + "Id": 14389735759337977675 + }, + "Component_[16184381538555246534]": { + "$type": "AZ::Render::EditorMeshComponent", + "Id": 16184381538555246534, + "Controller": { + "Configuration": { + "ModelAsset": { + "assetId": { + "guid": "{E14975EF-E676-51A4-B826-3EF59CB645AA}", + "subId": 285127096 + }, + "assetHint": "testdata/objects/cube/cube.azmodel" + } + } + } + }, + "Component_[17962478023087084794]": { + "$type": "SelectionComponent", + "Id": 17962478023087084794 + }, + "Component_[18071675051915092508]": { + "$type": "EditorEntityIconComponent", + "Id": 18071675051915092508 + }, + "Component_[2115498007879087044]": { + "$type": "EditorInspectorComponent", + "Id": 2115498007879087044, + "ComponentOrderEntryArray": [ + { + "ComponentId": 399415038452606756 + }, + { + "ComponentId": 16184381538555246534, + "SortIndex": 1 + }, + { + "ComponentId": 7827190074535394331, + "SortIndex": 2 + } + ] + }, + "Component_[3518973002096080237]": { + "$type": "EditorOnlyEntityComponent", + "Id": 3518973002096080237 + }, + "Component_[399415038452606756]": { + "$type": "{27F1E1A1-8D9D-4C3B-BD3A-AFB9762449C0} TransformComponent", + "Id": 399415038452606756, + "Parent Entity": "ContainerEntity", + "Transform Data": { + "Translate": [ + -37.53056335449219, + -0.00018183141946792603, + 4.451573371887207 + ] + } + }, + "Component_[4564240319609068082]": { + "$type": "EditorEntitySortComponent", + "Id": 4564240319609068082 + }, + "Component_[7827190074535394331]": { + "$type": "EditorMaterialComponent", + "Id": 7827190074535394331, + "Controller": { + "Configuration": { + "materials": [ + { + "Key": { + "materialSlotStableId": 2418540911 + }, + "Value": { + "MaterialAsset": { + "assetId": { + "guid": "{A78EA2FC-688B-5E3A-A7F6-DB413D11D4CF}" + }, + "assetHint": "materials/presets/pbr/metal_chrome_matte.azmaterial" + } + } + } + ] + } + } + }, + "Component_[8092226976542590265]": { + "$type": "EditorDisabledCompositionComponent", + "Id": 8092226976542590265 + } + } + }, + "Entity_[2918747072468]": { + "Id": "Entity_[2918747072468]", + "Name": "Entity1", + "Components": { + "Component_[11525365929370623807]": { + "$type": "EditorVisibilityComponent", + "Id": 11525365929370623807 + }, + "Component_[12334620273692642550]": { + "$type": "EditorLockComponent", + "Id": 12334620273692642550 + }, + "Component_[14389735759337977675]": { + "$type": "EditorPendingCompositionComponent", + "Id": 14389735759337977675 + }, + "Component_[16184381538555246534]": { + "$type": "AZ::Render::EditorMeshComponent", + "Id": 16184381538555246534, + "Controller": { + "Configuration": { + "ModelAsset": { + "assetId": { + "guid": "{E14975EF-E676-51A4-B826-3EF59CB645AA}", + "subId": 285127096 + }, + "assetHint": "testdata/objects/cube/cube.azmodel" + } + } + } + }, + "Component_[17962478023087084794]": { + "$type": "SelectionComponent", + "Id": 17962478023087084794 + }, + "Component_[18071675051915092508]": { + "$type": "EditorEntityIconComponent", + "Id": 18071675051915092508 + }, + "Component_[2115498007879087044]": { + "$type": "EditorInspectorComponent", + "Id": 2115498007879087044, + "ComponentOrderEntryArray": [ + { + "ComponentId": 399415038452606756 + }, + { + "ComponentId": 16184381538555246534, + "SortIndex": 1 + }, + { + "ComponentId": 7827190074535394331, + "SortIndex": 2 + } + ] + }, + "Component_[3518973002096080237]": { + "$type": "EditorOnlyEntityComponent", + "Id": 3518973002096080237 + }, + "Component_[399415038452606756]": { + "$type": "{27F1E1A1-8D9D-4C3B-BD3A-AFB9762449C0} TransformComponent", + "Id": 399415038452606756, + "Parent Entity": "ContainerEntity", + "Transform Data": { + "Translate": [ + -47.53056335449219, + -0.00018183141946792603, + 109.46680450439453 + ] + } + }, + "Component_[4564240319609068082]": { + "$type": "EditorEntitySortComponent", + "Id": 4564240319609068082 + }, + "Component_[7827190074535394331]": { + "$type": "EditorMaterialComponent", + "Id": 7827190074535394331, + "Controller": { + "Configuration": { + "materials": [ + { + "Key": { + "materialSlotStableId": 2418540911 + }, + "Value": { + "MaterialAsset": { + "assetId": { + "guid": "{549D26B8-881D-569F-AF05-961F36A43F4F}" + }, + "assetHint": "materials/presets/pbr/metal_aluminum_matte.azmaterial" + } + } + } + ] + } + } + }, + "Component_[8092226976542590265]": { + "$type": "EditorDisabledCompositionComponent", + "Id": 8092226976542590265 + } + } + }, + "Entity_[2923042039764]": { + "Id": "Entity_[2923042039764]", + "Name": "Entity1", + "Components": { + "Component_[11525365929370623807]": { + "$type": "EditorVisibilityComponent", + "Id": 11525365929370623807 + }, + "Component_[12334620273692642550]": { + "$type": "EditorLockComponent", + "Id": 12334620273692642550 + }, + "Component_[14389735759337977675]": { + "$type": "EditorPendingCompositionComponent", + "Id": 14389735759337977675 + }, + "Component_[16184381538555246534]": { + "$type": "AZ::Render::EditorMeshComponent", + "Id": 16184381538555246534, + "Controller": { + "Configuration": { + "ModelAsset": { + "assetId": { + "guid": "{E14975EF-E676-51A4-B826-3EF59CB645AA}", + "subId": 285127096 + }, + "assetHint": "testdata/objects/cube/cube.azmodel" + } + } + } + }, + "Component_[17962478023087084794]": { + "$type": "SelectionComponent", + "Id": 17962478023087084794 + }, + "Component_[18071675051915092508]": { + "$type": "EditorEntityIconComponent", + "Id": 18071675051915092508 + }, + "Component_[2115498007879087044]": { + "$type": "EditorInspectorComponent", + "Id": 2115498007879087044, + "ComponentOrderEntryArray": [ + { + "ComponentId": 399415038452606756 + }, + { + "ComponentId": 16184381538555246534, + "SortIndex": 1 + }, + { + "ComponentId": 7827190074535394331, + "SortIndex": 2 + } + ] + }, + "Component_[3518973002096080237]": { + "$type": "EditorOnlyEntityComponent", + "Id": 3518973002096080237 + }, + "Component_[399415038452606756]": { + "$type": "{27F1E1A1-8D9D-4C3B-BD3A-AFB9762449C0} TransformComponent", + "Id": 399415038452606756, + "Parent Entity": "ContainerEntity", + "Transform Data": { + "Translate": [ + 7.530143737792969, + -0.00018183141946792603, + 59.873046875 + ] + } + }, + "Component_[4564240319609068082]": { + "$type": "EditorEntitySortComponent", + "Id": 4564240319609068082 + }, + "Component_[7827190074535394331]": { + "$type": "EditorMaterialComponent", + "Id": 7827190074535394331, + "Controller": { + "Configuration": { + "materials": [ + { + "Key": { + "materialSlotStableId": 2418540911 + }, + "Value": { + "MaterialAsset": { + "assetId": { + "guid": "{2AC06FA3-7670-542E-8996-DF346AFF1B61}" + }, + "assetHint": "materials/presets/pbr/metal_silver_polished.azmaterial" + } + } + } + ] + } + } + }, + "Component_[8092226976542590265]": { + "$type": "EditorDisabledCompositionComponent", + "Id": 8092226976542590265 + } + } + }, + "Entity_[2927337007060]": { + "Id": "Entity_[2927337007060]", + "Name": "Entity1", + "Components": { + "Component_[11525365929370623807]": { + "$type": "EditorVisibilityComponent", + "Id": 11525365929370623807 + }, + "Component_[12334620273692642550]": { + "$type": "EditorLockComponent", + "Id": 12334620273692642550 + }, + "Component_[14389735759337977675]": { + "$type": "EditorPendingCompositionComponent", + "Id": 14389735759337977675 + }, + "Component_[16184381538555246534]": { + "$type": "AZ::Render::EditorMeshComponent", + "Id": 16184381538555246534, + "Controller": { + "Configuration": { + "ModelAsset": { + "assetId": { + "guid": "{E14975EF-E676-51A4-B826-3EF59CB645AA}", + "subId": 285127096 + }, + "assetHint": "testdata/objects/cube/cube.azmodel" + } + } + } + }, + "Component_[17962478023087084794]": { + "$type": "SelectionComponent", + "Id": 17962478023087084794 + }, + "Component_[18071675051915092508]": { + "$type": "EditorEntityIconComponent", + "Id": 18071675051915092508 + }, + "Component_[2115498007879087044]": { + "$type": "EditorInspectorComponent", + "Id": 2115498007879087044, + "ComponentOrderEntryArray": [ + { + "ComponentId": 399415038452606756 + }, + { + "ComponentId": 16184381538555246534, + "SortIndex": 1 + }, + { + "ComponentId": 7827190074535394331, + "SortIndex": 2 + } + ] + }, + "Component_[3518973002096080237]": { + "$type": "EditorOnlyEntityComponent", + "Id": 3518973002096080237 + }, + "Component_[399415038452606756]": { + "$type": "{27F1E1A1-8D9D-4C3B-BD3A-AFB9762449C0} TransformComponent", + "Id": 399415038452606756, + "Parent Entity": "ContainerEntity", + "Transform Data": { + "Translate": [ + 17.53014373779297, + -0.00018183141946792603, + 34.53608703613281 + ] + } + }, + "Component_[4564240319609068082]": { + "$type": "EditorEntitySortComponent", + "Id": 4564240319609068082 + }, + "Component_[7827190074535394331]": { + "$type": "EditorMaterialComponent", + "Id": 7827190074535394331, + "Controller": { + "Configuration": { + "materials": [ + { + "Key": {}, + "Value": { + "MaterialAsset": { + "assetId": { + "guid": "{721188E0-B7CC-5D06-8D5D-39AF8ABF2EF9}" + }, + "assetHint": "materials/presets/pbr/metal_titanium.azmaterial" + } + } + }, + { + "Key": { + "materialSlotStableId": 2418540911 + }, + "Value": { + "MaterialAsset": { + "assetId": { + "guid": "{549D26B8-881D-569F-AF05-961F36A43F4F}" + }, + "assetHint": "materials/presets/pbr/metal_aluminum_matte.azmaterial" + } + } + } + ] + } + } + }, + "Component_[8092226976542590265]": { + "$type": "EditorDisabledCompositionComponent", + "Id": 8092226976542590265 + } + } + }, + "Entity_[2931631974356]": { + "Id": "Entity_[2931631974356]", + "Name": "Entity1", + "Components": { + "Component_[11525365929370623807]": { + "$type": "EditorVisibilityComponent", + "Id": 11525365929370623807 + }, + "Component_[12334620273692642550]": { + "$type": "EditorLockComponent", + "Id": 12334620273692642550 + }, + "Component_[14389735759337977675]": { + "$type": "EditorPendingCompositionComponent", + "Id": 14389735759337977675 + }, + "Component_[16184381538555246534]": { + "$type": "AZ::Render::EditorMeshComponent", + "Id": 16184381538555246534, + "Controller": { + "Configuration": { + "ModelAsset": { + "assetId": { + "guid": "{E14975EF-E676-51A4-B826-3EF59CB645AA}", + "subId": 285127096 + }, + "assetHint": "testdata/objects/cube/cube.azmodel" + } + } + } + }, + "Component_[17962478023087084794]": { + "$type": "SelectionComponent", + "Id": 17962478023087084794 + }, + "Component_[18071675051915092508]": { + "$type": "EditorEntityIconComponent", + "Id": 18071675051915092508 + }, + "Component_[2115498007879087044]": { + "$type": "EditorInspectorComponent", + "Id": 2115498007879087044, + "ComponentOrderEntryArray": [ + { + "ComponentId": 399415038452606756 + }, + { + "ComponentId": 16184381538555246534, + "SortIndex": 1 + }, + { + "ComponentId": 7827190074535394331, + "SortIndex": 2 + } + ] + }, + "Component_[3518973002096080237]": { + "$type": "EditorOnlyEntityComponent", + "Id": 3518973002096080237 + }, + "Component_[399415038452606756]": { + "$type": "{27F1E1A1-8D9D-4C3B-BD3A-AFB9762449C0} TransformComponent", + "Id": 399415038452606756, + "Parent Entity": "ContainerEntity", + "Transform Data": { + "Translate": [ + 47.53014373779297, + -0.00018183141946792603, + 49.593753814697266 + ] + } + }, + "Component_[4564240319609068082]": { + "$type": "EditorEntitySortComponent", + "Id": 4564240319609068082 + }, + "Component_[7827190074535394331]": { + "$type": "EditorMaterialComponent", + "Id": 7827190074535394331, + "Controller": { + "Configuration": { + "materials": [ + { + "Key": { + "materialSlotStableId": 2418540911 + }, + "Value": { + "MaterialAsset": { + "assetId": { + "guid": "{970148AC-7258-5EC8-9CE7-F4EF93164D93}" + }, + "assetHint": "materials/presets/pbr/metal_iron_matte.azmaterial" + } + } + } + ] + } + } + }, + "Component_[8092226976542590265]": { + "$type": "EditorDisabledCompositionComponent", + "Id": 8092226976542590265 + } + } + }, + "Entity_[2935926941652]": { + "Id": "Entity_[2935926941652]", + "Name": "Entity1", + "Components": { + "Component_[11525365929370623807]": { + "$type": "EditorVisibilityComponent", + "Id": 11525365929370623807 + }, + "Component_[12334620273692642550]": { + "$type": "EditorLockComponent", + "Id": 12334620273692642550 + }, + "Component_[14389735759337977675]": { + "$type": "EditorPendingCompositionComponent", + "Id": 14389735759337977675 + }, + "Component_[16184381538555246534]": { + "$type": "AZ::Render::EditorMeshComponent", + "Id": 16184381538555246534, + "Controller": { + "Configuration": { + "ModelAsset": { + "assetId": { + "guid": "{E14975EF-E676-51A4-B826-3EF59CB645AA}", + "subId": 285127096 + }, + "assetHint": "testdata/objects/cube/cube.azmodel" + } + } + } + }, + "Component_[17962478023087084794]": { + "$type": "SelectionComponent", + "Id": 17962478023087084794 + }, + "Component_[18071675051915092508]": { + "$type": "EditorEntityIconComponent", + "Id": 18071675051915092508 + }, + "Component_[2115498007879087044]": { + "$type": "EditorInspectorComponent", + "Id": 2115498007879087044, + "ComponentOrderEntryArray": [ + { + "ComponentId": 399415038452606756 + }, + { + "ComponentId": 16184381538555246534, + "SortIndex": 1 + }, + { + "ComponentId": 7827190074535394331, + "SortIndex": 2 + } + ] + }, + "Component_[3518973002096080237]": { + "$type": "EditorOnlyEntityComponent", + "Id": 3518973002096080237 + }, + "Component_[399415038452606756]": { + "$type": "{27F1E1A1-8D9D-4C3B-BD3A-AFB9762449C0} TransformComponent", + "Id": 399415038452606756, + "Parent Entity": "ContainerEntity", + "Transform Data": { + "Translate": [ + -12.530563354492188, + -0.00018183141946792603, + 69.34888458251953 + ] + } + }, + "Component_[4564240319609068082]": { + "$type": "EditorEntitySortComponent", + "Id": 4564240319609068082 + }, + "Component_[7827190074535394331]": { + "$type": "EditorMaterialComponent", + "Id": 7827190074535394331, + "Controller": { + "Configuration": { + "materials": [ + { + "Key": { + "materialSlotStableId": 2418540911 + }, + "Value": { + "MaterialAsset": { + "assetId": { + "guid": "{F2AD0EBF-7137-58D1-9991-9552FAD41B19}" + }, + "assetHint": "materials/presets/pbr/metal_mercury.azmaterial" + } + } + } + ] + } + } + }, + "Component_[8092226976542590265]": { + "$type": "EditorDisabledCompositionComponent", + "Id": 8092226976542590265 + } + } + }, + "Entity_[2940221908948]": { + "Id": "Entity_[2940221908948]", + "Name": "Entity1", + "Components": { + "Component_[11525365929370623807]": { + "$type": "EditorVisibilityComponent", + "Id": 11525365929370623807 + }, + "Component_[12334620273692642550]": { + "$type": "EditorLockComponent", + "Id": 12334620273692642550 + }, + "Component_[14389735759337977675]": { + "$type": "EditorPendingCompositionComponent", + "Id": 14389735759337977675 + }, + "Component_[16184381538555246534]": { + "$type": "AZ::Render::EditorMeshComponent", + "Id": 16184381538555246534, + "Controller": { + "Configuration": { + "ModelAsset": { + "assetId": { + "guid": "{E14975EF-E676-51A4-B826-3EF59CB645AA}", + "subId": 285127096 + }, + "assetHint": "testdata/objects/cube/cube.azmodel" + } + } + } + }, + "Component_[17962478023087084794]": { + "$type": "SelectionComponent", + "Id": 17962478023087084794 + }, + "Component_[18071675051915092508]": { + "$type": "EditorEntityIconComponent", + "Id": 18071675051915092508 + }, + "Component_[2115498007879087044]": { + "$type": "EditorInspectorComponent", + "Id": 2115498007879087044, + "ComponentOrderEntryArray": [ + { + "ComponentId": 399415038452606756 + }, + { + "ComponentId": 16184381538555246534, + "SortIndex": 1 + }, + { + "ComponentId": 7827190074535394331, + "SortIndex": 2 + } + ] + }, + "Component_[3518973002096080237]": { + "$type": "EditorOnlyEntityComponent", + "Id": 3518973002096080237 + }, + "Component_[399415038452606756]": { + "$type": "{27F1E1A1-8D9D-4C3B-BD3A-AFB9762449C0} TransformComponent", + "Id": 399415038452606756, + "Parent Entity": "ContainerEntity", + "Transform Data": { + "Translate": [ + 17.53014373779297, + -0.00018183141946792603, + 99.43339538574219 + ] + } + }, + "Component_[4564240319609068082]": { + "$type": "EditorEntitySortComponent", + "Id": 4564240319609068082 + }, + "Component_[7827190074535394331]": { + "$type": "EditorMaterialComponent", + "Id": 7827190074535394331, + "Controller": { + "Configuration": { + "materials": [ + { + "Key": {}, + "Value": { + "MaterialAsset": { + "assetId": { + "guid": "{721188E0-B7CC-5D06-8D5D-39AF8ABF2EF9}" + }, + "assetHint": "materials/presets/pbr/metal_titanium.azmaterial" + } + } + }, + { + "Key": { + "materialSlotStableId": 2418540911 + }, + "Value": { + "MaterialAsset": { + "assetId": { + "guid": "{94CF2BD7-7D09-5577-B1D8-3FF85B15E127}" + }, + "assetHint": "materials/presets/pbr/metal_aluminum.azmaterial" + } + } + } + ] + } + } + }, + "Component_[8092226976542590265]": { + "$type": "EditorDisabledCompositionComponent", + "Id": 8092226976542590265 + } + } + }, + "Entity_[2944516876244]": { + "Id": "Entity_[2944516876244]", + "Name": "Entity1", + "Components": { + "Component_[11525365929370623807]": { + "$type": "EditorVisibilityComponent", + "Id": 11525365929370623807 + }, + "Component_[12334620273692642550]": { + "$type": "EditorLockComponent", + "Id": 12334620273692642550 + }, + "Component_[14389735759337977675]": { + "$type": "EditorPendingCompositionComponent", + "Id": 14389735759337977675 + }, + "Component_[16184381538555246534]": { + "$type": "AZ::Render::EditorMeshComponent", + "Id": 16184381538555246534, + "Controller": { + "Configuration": { + "ModelAsset": { + "assetId": { + "guid": "{E14975EF-E676-51A4-B826-3EF59CB645AA}", + "subId": 285127096 + }, + "assetHint": "testdata/objects/cube/cube.azmodel" + } + } + } + }, + "Component_[17962478023087084794]": { + "$type": "SelectionComponent", + "Id": 17962478023087084794 + }, + "Component_[18071675051915092508]": { + "$type": "EditorEntityIconComponent", + "Id": 18071675051915092508 + }, + "Component_[2115498007879087044]": { + "$type": "EditorInspectorComponent", + "Id": 2115498007879087044, + "ComponentOrderEntryArray": [ + { + "ComponentId": 399415038452606756 + }, + { + "ComponentId": 16184381538555246534, + "SortIndex": 1 + }, + { + "ComponentId": 7827190074535394331, + "SortIndex": 2 + } + ] + }, + "Component_[3518973002096080237]": { + "$type": "EditorOnlyEntityComponent", + "Id": 3518973002096080237 + }, + "Component_[399415038452606756]": { + "$type": "{27F1E1A1-8D9D-4C3B-BD3A-AFB9762449C0} TransformComponent", + "Id": 399415038452606756, + "Parent Entity": "ContainerEntity", + "Transform Data": { + "Translate": [ + 42.53014373779297, + -0.00018183141946792603, + 19.50924301147461 + ] + } + }, + "Component_[4564240319609068082]": { + "$type": "EditorEntitySortComponent", + "Id": 4564240319609068082 + }, + "Component_[7827190074535394331]": { + "$type": "EditorMaterialComponent", + "Id": 7827190074535394331, + "Controller": { + "Configuration": { + "materials": [ + { + "Key": { + "materialSlotStableId": 2418540911 + }, + "Value": { + "MaterialAsset": { + "assetId": { + "guid": "{5BC13D95-377E-53EA-9A93-156384BE8B04}" + }, + "assetHint": "materials/presets/pbr/metal_gold_matte.azmaterial" + } + } + } + ] + } + } + }, + "Component_[8092226976542590265]": { + "$type": "EditorDisabledCompositionComponent", + "Id": 8092226976542590265 + } + } + }, + "Entity_[2948811843540]": { + "Id": "Entity_[2948811843540]", + "Name": "Entity1", + "Components": { + "Component_[11525365929370623807]": { + "$type": "EditorVisibilityComponent", + "Id": 11525365929370623807 + }, + "Component_[12334620273692642550]": { + "$type": "EditorLockComponent", + "Id": 12334620273692642550 + }, + "Component_[14389735759337977675]": { + "$type": "EditorPendingCompositionComponent", + "Id": 14389735759337977675 + }, + "Component_[16184381538555246534]": { + "$type": "AZ::Render::EditorMeshComponent", + "Id": 16184381538555246534, + "Controller": { + "Configuration": { + "ModelAsset": { + "assetId": { + "guid": "{E14975EF-E676-51A4-B826-3EF59CB645AA}", + "subId": 285127096 + }, + "assetHint": "testdata/objects/cube/cube.azmodel" + } + } + } + }, + "Component_[17962478023087084794]": { + "$type": "SelectionComponent", + "Id": 17962478023087084794 + }, + "Component_[18071675051915092508]": { + "$type": "EditorEntityIconComponent", + "Id": 18071675051915092508 + }, + "Component_[2115498007879087044]": { + "$type": "EditorInspectorComponent", + "Id": 2115498007879087044, + "ComponentOrderEntryArray": [ + { + "ComponentId": 399415038452606756 + }, + { + "ComponentId": 16184381538555246534, + "SortIndex": 1 + }, + { + "ComponentId": 7827190074535394331, + "SortIndex": 2 + } + ] + }, + "Component_[3518973002096080237]": { + "$type": "EditorOnlyEntityComponent", + "Id": 3518973002096080237 + }, + "Component_[399415038452606756]": { + "$type": "{27F1E1A1-8D9D-4C3B-BD3A-AFB9762449C0} TransformComponent", + "Id": 399415038452606756, + "Parent Entity": "ContainerEntity", + "Transform Data": { + "Translate": [ + 22.53014373779297, + -0.00018183141946792603, + 45.14218521118164 + ] + } + }, + "Component_[4564240319609068082]": { + "$type": "EditorEntitySortComponent", + "Id": 4564240319609068082 + }, + "Component_[7827190074535394331]": { + "$type": "EditorMaterialComponent", + "Id": 7827190074535394331, + "Controller": { + "Configuration": { + "materials": [ + { + "Key": { + "materialSlotStableId": 2418540911 + }, + "Value": { + "MaterialAsset": { + "assetId": { + "guid": "{FC69F2F8-F73B-5A0C-B8B7-94BAA45780FC}" + }, + "assetHint": "materials/presets/pbr/metal_brass_polished.azmaterial" + } + } + } + ] + } + } + }, + "Component_[8092226976542590265]": { + "$type": "EditorDisabledCompositionComponent", + "Id": 8092226976542590265 + } + } + }, + "Entity_[2953106810836]": { + "Id": "Entity_[2953106810836]", + "Name": "Entity1", + "Components": { + "Component_[11525365929370623807]": { + "$type": "EditorVisibilityComponent", + "Id": 11525365929370623807 + }, + "Component_[12334620273692642550]": { + "$type": "EditorLockComponent", + "Id": 12334620273692642550 + }, + "Component_[14389735759337977675]": { + "$type": "EditorPendingCompositionComponent", + "Id": 14389735759337977675 + }, + "Component_[16184381538555246534]": { + "$type": "AZ::Render::EditorMeshComponent", + "Id": 16184381538555246534, + "Controller": { + "Configuration": { + "ModelAsset": { + "assetId": { + "guid": "{E14975EF-E676-51A4-B826-3EF59CB645AA}", + "subId": 285127096 + }, + "assetHint": "testdata/objects/cube/cube.azmodel" + } + } + } + }, + "Component_[17962478023087084794]": { + "$type": "SelectionComponent", + "Id": 17962478023087084794 + }, + "Component_[18071675051915092508]": { + "$type": "EditorEntityIconComponent", + "Id": 18071675051915092508 + }, + "Component_[2115498007879087044]": { + "$type": "EditorInspectorComponent", + "Id": 2115498007879087044, + "ComponentOrderEntryArray": [ + { + "ComponentId": 399415038452606756 + }, + { + "ComponentId": 16184381538555246534, + "SortIndex": 1 + }, + { + "ComponentId": 7827190074535394331, + "SortIndex": 2 + } + ] + }, + "Component_[3518973002096080237]": { + "$type": "EditorOnlyEntityComponent", + "Id": 3518973002096080237 + }, + "Component_[399415038452606756]": { + "$type": "{27F1E1A1-8D9D-4C3B-BD3A-AFB9762449C0} TransformComponent", + "Id": 399415038452606756, + "Parent Entity": "ContainerEntity", + "Transform Data": { + "Translate": [ + 37.53014373779297, + 0.010651908814907074, + 99.47334289550781 + ] + } + }, + "Component_[4564240319609068082]": { + "$type": "EditorEntitySortComponent", + "Id": 4564240319609068082 + }, + "Component_[7827190074535394331]": { + "$type": "EditorMaterialComponent", + "Id": 7827190074535394331, + "Controller": { + "Configuration": { + "materials": [ + { + "Key": { + "materialSlotStableId": 2418540911 + }, + "Value": { + "MaterialAsset": { + "assetId": { + "guid": "{E621C5BF-B8E1-55F0-A791-EC960F2FA46F}" + }, + "assetHint": "materials/presets/pbr/metal_copper.azmaterial" + } + } + } + ] + } + } + }, + "Component_[8092226976542590265]": { + "$type": "EditorDisabledCompositionComponent", + "Id": 8092226976542590265 + } + } + }, + "Entity_[2957401778132]": { + "Id": "Entity_[2957401778132]", + "Name": "Entity1", + "Components": { + "Component_[11525365929370623807]": { + "$type": "EditorVisibilityComponent", + "Id": 11525365929370623807 + }, + "Component_[12334620273692642550]": { + "$type": "EditorLockComponent", + "Id": 12334620273692642550 + }, + "Component_[14389735759337977675]": { + "$type": "EditorPendingCompositionComponent", + "Id": 14389735759337977675 + }, + "Component_[16184381538555246534]": { + "$type": "AZ::Render::EditorMeshComponent", + "Id": 16184381538555246534, + "Controller": { + "Configuration": { + "ModelAsset": { + "assetId": { + "guid": "{E14975EF-E676-51A4-B826-3EF59CB645AA}", + "subId": 285127096 + }, + "assetHint": "testdata/objects/cube/cube.azmodel" + } + } + } + }, + "Component_[17962478023087084794]": { + "$type": "SelectionComponent", + "Id": 17962478023087084794 + }, + "Component_[18071675051915092508]": { + "$type": "EditorEntityIconComponent", + "Id": 18071675051915092508 + }, + "Component_[2115498007879087044]": { + "$type": "EditorInspectorComponent", + "Id": 2115498007879087044, + "ComponentOrderEntryArray": [ + { + "ComponentId": 399415038452606756 + }, + { + "ComponentId": 16184381538555246534, + "SortIndex": 1 + }, + { + "ComponentId": 7827190074535394331, + "SortIndex": 2 + } + ] + }, + "Component_[3518973002096080237]": { + "$type": "EditorOnlyEntityComponent", + "Id": 3518973002096080237 + }, + "Component_[399415038452606756]": { + "$type": "{27F1E1A1-8D9D-4C3B-BD3A-AFB9762449C0} TransformComponent", + "Id": 399415038452606756, + "Parent Entity": "ContainerEntity", + "Transform Data": { + "Translate": [ + -27.530563354492188, + -0.00018183141946792603, + 54.618019104003906 + ] + } + }, + "Component_[4564240319609068082]": { + "$type": "EditorEntitySortComponent", + "Id": 4564240319609068082 + }, + "Component_[7827190074535394331]": { + "$type": "EditorMaterialComponent", + "Id": 7827190074535394331, + "Controller": { + "Configuration": { + "materials": [ + { + "Key": { + "materialSlotStableId": 2418540911 + }, + "Value": { + "MaterialAsset": { + "assetId": { + "guid": "{E621C5BF-B8E1-55F0-A791-EC960F2FA46F}" + }, + "assetHint": "materials/presets/pbr/metal_copper.azmaterial" + } + } + } + ] + } + } + }, + "Component_[8092226976542590265]": { + "$type": "EditorDisabledCompositionComponent", + "Id": 8092226976542590265 + } + } + }, + "Entity_[2961696745428]": { + "Id": "Entity_[2961696745428]", + "Name": "Entity1", + "Components": { + "Component_[11525365929370623807]": { + "$type": "EditorVisibilityComponent", + "Id": 11525365929370623807 + }, + "Component_[12334620273692642550]": { + "$type": "EditorLockComponent", + "Id": 12334620273692642550 + }, + "Component_[14389735759337977675]": { + "$type": "EditorPendingCompositionComponent", + "Id": 14389735759337977675 + }, + "Component_[16184381538555246534]": { + "$type": "AZ::Render::EditorMeshComponent", + "Id": 16184381538555246534, + "Controller": { + "Configuration": { + "ModelAsset": { + "assetId": { + "guid": "{E14975EF-E676-51A4-B826-3EF59CB645AA}", + "subId": 285127096 + }, + "assetHint": "testdata/objects/cube/cube.azmodel" + } + } + } + }, + "Component_[17962478023087084794]": { + "$type": "SelectionComponent", + "Id": 17962478023087084794 + }, + "Component_[18071675051915092508]": { + "$type": "EditorEntityIconComponent", + "Id": 18071675051915092508 + }, + "Component_[2115498007879087044]": { + "$type": "EditorInspectorComponent", + "Id": 2115498007879087044, + "ComponentOrderEntryArray": [ + { + "ComponentId": 399415038452606756 + }, + { + "ComponentId": 16184381538555246534, + "SortIndex": 1 + }, + { + "ComponentId": 7827190074535394331, + "SortIndex": 2 + } + ] + }, + "Component_[3518973002096080237]": { + "$type": "EditorOnlyEntityComponent", + "Id": 3518973002096080237 + }, + "Component_[399415038452606756]": { + "$type": "{27F1E1A1-8D9D-4C3B-BD3A-AFB9762449C0} TransformComponent", + "Id": 399415038452606756, + "Parent Entity": "ContainerEntity", + "Transform Data": { + "Translate": [ + 27.53014373779297, + -0.00018183141946792603, + 4.451573371887207 + ] + } + }, + "Component_[4564240319609068082]": { + "$type": "EditorEntitySortComponent", + "Id": 4564240319609068082 + }, + "Component_[7827190074535394331]": { + "$type": "EditorMaterialComponent", + "Id": 7827190074535394331, + "Controller": { + "Configuration": { + "materials": [ + { + "Key": { + "materialSlotStableId": 2418540911 + }, + "Value": { + "MaterialAsset": { + "assetId": { + "guid": "{A78EA2FC-688B-5E3A-A7F6-DB413D11D4CF}" + }, + "assetHint": "materials/presets/pbr/metal_chrome_matte.azmaterial" + } + } + } + ] + } + } + }, + "Component_[8092226976542590265]": { + "$type": "EditorDisabledCompositionComponent", + "Id": 8092226976542590265 + } + } + }, + "Entity_[2965991712724]": { + "Id": "Entity_[2965991712724]", + "Name": "Entity1", + "Components": { + "Component_[11525365929370623807]": { + "$type": "EditorVisibilityComponent", + "Id": 11525365929370623807 + }, + "Component_[12334620273692642550]": { + "$type": "EditorLockComponent", + "Id": 12334620273692642550 + }, + "Component_[14389735759337977675]": { + "$type": "EditorPendingCompositionComponent", + "Id": 14389735759337977675 + }, + "Component_[16184381538555246534]": { + "$type": "AZ::Render::EditorMeshComponent", + "Id": 16184381538555246534, + "Controller": { + "Configuration": { + "ModelAsset": { + "assetId": { + "guid": "{E14975EF-E676-51A4-B826-3EF59CB645AA}", + "subId": 285127096 + }, + "assetHint": "testdata/objects/cube/cube.azmodel" + } + } + } + }, + "Component_[17962478023087084794]": { + "$type": "SelectionComponent", + "Id": 17962478023087084794 + }, + "Component_[18071675051915092508]": { + "$type": "EditorEntityIconComponent", + "Id": 18071675051915092508 + }, + "Component_[2115498007879087044]": { + "$type": "EditorInspectorComponent", + "Id": 2115498007879087044, + "ComponentOrderEntryArray": [ + { + "ComponentId": 399415038452606756 + }, + { + "ComponentId": 16184381538555246534, + "SortIndex": 1 + }, + { + "ComponentId": 7827190074535394331, + "SortIndex": 2 + } + ] + }, + "Component_[3518973002096080237]": { + "$type": "EditorOnlyEntityComponent", + "Id": 3518973002096080237 + }, + "Component_[399415038452606756]": { + "$type": "{27F1E1A1-8D9D-4C3B-BD3A-AFB9762449C0} TransformComponent", + "Id": 399415038452606756, + "Parent Entity": "ContainerEntity", + "Transform Data": { + "Translate": [ + 42.53014373779297, + -0.00018183141946792603, + 59.873046875 + ] + } + }, + "Component_[4564240319609068082]": { + "$type": "EditorEntitySortComponent", + "Id": 4564240319609068082 + }, + "Component_[7827190074535394331]": { + "$type": "EditorMaterialComponent", + "Id": 7827190074535394331, + "Controller": { + "Configuration": { + "materials": [ + { + "Key": { + "materialSlotStableId": 2418540911 + }, + "Value": { + "MaterialAsset": { + "assetId": { + "guid": "{FB4657EB-FB3A-5EC3-A772-DC36D6F733C3}" + }, + "assetHint": "materials/presets/pbr/metal_gold_polished.azmaterial" + } + } + } + ] + } + } + }, + "Component_[8092226976542590265]": { + "$type": "EditorDisabledCompositionComponent", + "Id": 8092226976542590265 + } + } + }, + "Entity_[2970286680020]": { + "Id": "Entity_[2970286680020]", + "Name": "Entity1", + "Components": { + "Component_[11525365929370623807]": { + "$type": "EditorVisibilityComponent", + "Id": 11525365929370623807 + }, + "Component_[12334620273692642550]": { + "$type": "EditorLockComponent", + "Id": 12334620273692642550 + }, + "Component_[14389735759337977675]": { + "$type": "EditorPendingCompositionComponent", + "Id": 14389735759337977675 + }, + "Component_[16184381538555246534]": { + "$type": "AZ::Render::EditorMeshComponent", + "Id": 16184381538555246534, + "Controller": { + "Configuration": { + "ModelAsset": { + "assetId": { + "guid": "{E14975EF-E676-51A4-B826-3EF59CB645AA}", + "subId": 285127096 + }, + "assetHint": "testdata/objects/cube/cube.azmodel" + } + } + } + }, + "Component_[17962478023087084794]": { + "$type": "SelectionComponent", + "Id": 17962478023087084794 + }, + "Component_[18071675051915092508]": { + "$type": "EditorEntityIconComponent", + "Id": 18071675051915092508 + }, + "Component_[2115498007879087044]": { + "$type": "EditorInspectorComponent", + "Id": 2115498007879087044, + "ComponentOrderEntryArray": [ + { + "ComponentId": 399415038452606756 + }, + { + "ComponentId": 16184381538555246534, + "SortIndex": 1 + }, + { + "ComponentId": 7827190074535394331, + "SortIndex": 2 + } + ] + }, + "Component_[3518973002096080237]": { + "$type": "EditorOnlyEntityComponent", + "Id": 3518973002096080237 + }, + "Component_[399415038452606756]": { + "$type": "{27F1E1A1-8D9D-4C3B-BD3A-AFB9762449C0} TransformComponent", + "Id": 399415038452606756, + "Parent Entity": "ContainerEntity", + "Transform Data": { + "Translate": [ + 27.53014373779297, + -0.00018183141946792603, + 34.53608703613281 + ] + } + }, + "Component_[4564240319609068082]": { + "$type": "EditorEntitySortComponent", + "Id": 4564240319609068082 + }, + "Component_[7827190074535394331]": { + "$type": "EditorMaterialComponent", + "Id": 7827190074535394331, + "Controller": { + "Configuration": { + "materials": [ + { + "Key": { + "materialSlotStableId": 2418540911 + }, + "Value": { + "MaterialAsset": { + "assetId": { + "guid": "{A78EA2FC-688B-5E3A-A7F6-DB413D11D4CF}" + }, + "assetHint": "materials/presets/pbr/metal_chrome_matte.azmaterial" + } + } + } + ] + } + } + }, + "Component_[8092226976542590265]": { + "$type": "EditorDisabledCompositionComponent", + "Id": 8092226976542590265 + } + } + }, + "Entity_[2974581647316]": { + "Id": "Entity_[2974581647316]", + "Name": "Entity1", + "Components": { + "Component_[11525365929370623807]": { + "$type": "EditorVisibilityComponent", + "Id": 11525365929370623807 + }, + "Component_[12334620273692642550]": { + "$type": "EditorLockComponent", + "Id": 12334620273692642550 + }, + "Component_[14389735759337977675]": { + "$type": "EditorPendingCompositionComponent", + "Id": 14389735759337977675 + }, + "Component_[16184381538555246534]": { + "$type": "AZ::Render::EditorMeshComponent", + "Id": 16184381538555246534, + "Controller": { + "Configuration": { + "ModelAsset": { + "assetId": { + "guid": "{E14975EF-E676-51A4-B826-3EF59CB645AA}", + "subId": 285127096 + }, + "assetHint": "testdata/objects/cube/cube.azmodel" + } + } + } + }, + "Component_[17962478023087084794]": { + "$type": "SelectionComponent", + "Id": 17962478023087084794 + }, + "Component_[18071675051915092508]": { + "$type": "EditorEntityIconComponent", + "Id": 18071675051915092508 + }, + "Component_[2115498007879087044]": { + "$type": "EditorInspectorComponent", + "Id": 2115498007879087044, + "ComponentOrderEntryArray": [ + { + "ComponentId": 399415038452606756 + }, + { + "ComponentId": 16184381538555246534, + "SortIndex": 1 + }, + { + "ComponentId": 7827190074535394331, + "SortIndex": 2 + } + ] + }, + "Component_[3518973002096080237]": { + "$type": "EditorOnlyEntityComponent", + "Id": 3518973002096080237 + }, + "Component_[399415038452606756]": { + "$type": "{27F1E1A1-8D9D-4C3B-BD3A-AFB9762449C0} TransformComponent", + "Id": 399415038452606756, + "Parent Entity": "ContainerEntity", + "Transform Data": { + "Translate": [ + 47.53014373779297, + -0.00018183141946792603, + 45.14218521118164 + ] + } + }, + "Component_[4564240319609068082]": { + "$type": "EditorEntitySortComponent", + "Id": 4564240319609068082 + }, + "Component_[7827190074535394331]": { + "$type": "EditorMaterialComponent", + "Id": 7827190074535394331, + "Controller": { + "Configuration": { + "materials": [ + { + "Key": { + "materialSlotStableId": 2418540911 + }, + "Value": { + "MaterialAsset": { + "assetId": { + "guid": "{A7F03135-ECAD-5440-99DB-E84ABA3D50DA}" + }, + "assetHint": "materials/presets/pbr/metal_iron_polished.azmaterial" + } + } + } + ] + } + } + }, + "Component_[8092226976542590265]": { + "$type": "EditorDisabledCompositionComponent", + "Id": 8092226976542590265 + } + } + }, + "Entity_[2978876614612]": { + "Id": "Entity_[2978876614612]", + "Name": "Entity1", + "Components": { + "Component_[11525365929370623807]": { + "$type": "EditorVisibilityComponent", + "Id": 11525365929370623807 + }, + "Component_[12334620273692642550]": { + "$type": "EditorLockComponent", + "Id": 12334620273692642550 + }, + "Component_[14389735759337977675]": { + "$type": "EditorPendingCompositionComponent", + "Id": 14389735759337977675 + }, + "Component_[16184381538555246534]": { + "$type": "AZ::Render::EditorMeshComponent", + "Id": 16184381538555246534, + "Controller": { + "Configuration": { + "ModelAsset": { + "assetId": { + "guid": "{E14975EF-E676-51A4-B826-3EF59CB645AA}", + "subId": 285127096 + }, + "assetHint": "testdata/objects/cube/cube.azmodel" + } + } + } + }, + "Component_[17962478023087084794]": { + "$type": "SelectionComponent", + "Id": 17962478023087084794 + }, + "Component_[18071675051915092508]": { + "$type": "EditorEntityIconComponent", + "Id": 18071675051915092508 + }, + "Component_[2115498007879087044]": { + "$type": "EditorInspectorComponent", + "Id": 2115498007879087044, + "ComponentOrderEntryArray": [ + { + "ComponentId": 399415038452606756 + }, + { + "ComponentId": 16184381538555246534, + "SortIndex": 1 + }, + { + "ComponentId": 7827190074535394331, + "SortIndex": 2 + } + ] + }, + "Component_[3518973002096080237]": { + "$type": "EditorOnlyEntityComponent", + "Id": 3518973002096080237 + }, + "Component_[399415038452606756]": { + "$type": "{27F1E1A1-8D9D-4C3B-BD3A-AFB9762449C0} TransformComponent", + "Id": 399415038452606756, + "Parent Entity": "ContainerEntity", + "Transform Data": { + "Translate": [ + -47.53056335449219, + -0.00018183141946792603, + 30.08451271057129 + ] + } + }, + "Component_[4564240319609068082]": { + "$type": "EditorEntitySortComponent", + "Id": 4564240319609068082 + }, + "Component_[7827190074535394331]": { + "$type": "EditorMaterialComponent", + "Id": 7827190074535394331, + "Controller": { + "Configuration": { + "materials": [ + { + "Key": { + "materialSlotStableId": 2418540911 + }, + "Value": { + "MaterialAsset": { + "assetId": { + "guid": "{64C1F6A6-6BDA-551A-BE56-1829E5913278}" + }, + "assetHint": "materials/presets/pbr/metal_aluminum_polished.azmaterial" + } + } + } + ] + } + } + }, + "Component_[8092226976542590265]": { + "$type": "EditorDisabledCompositionComponent", + "Id": 8092226976542590265 + } + } + }, + "Entity_[2983171581908]": { + "Id": "Entity_[2983171581908]", + "Name": "Entity1", + "Components": { + "Component_[11525365929370623807]": { + "$type": "EditorVisibilityComponent", + "Id": 11525365929370623807 + }, + "Component_[12334620273692642550]": { + "$type": "EditorLockComponent", + "Id": 12334620273692642550 + }, + "Component_[14389735759337977675]": { + "$type": "EditorPendingCompositionComponent", + "Id": 14389735759337977675 + }, + "Component_[16184381538555246534]": { + "$type": "AZ::Render::EditorMeshComponent", + "Id": 16184381538555246534, + "Controller": { + "Configuration": { + "ModelAsset": { + "assetId": { + "guid": "{E14975EF-E676-51A4-B826-3EF59CB645AA}", + "subId": 285127096 + }, + "assetHint": "testdata/objects/cube/cube.azmodel" + } + } + } + }, + "Component_[17962478023087084794]": { + "$type": "SelectionComponent", + "Id": 17962478023087084794 + }, + "Component_[18071675051915092508]": { + "$type": "EditorEntityIconComponent", + "Id": 18071675051915092508 + }, + "Component_[2115498007879087044]": { + "$type": "EditorInspectorComponent", + "Id": 2115498007879087044, + "ComponentOrderEntryArray": [ + { + "ComponentId": 399415038452606756 + }, + { + "ComponentId": 16184381538555246534, + "SortIndex": 1 + }, + { + "ComponentId": 7827190074535394331, + "SortIndex": 2 + } + ] + }, + "Component_[3518973002096080237]": { + "$type": "EditorOnlyEntityComponent", + "Id": 3518973002096080237 + }, + "Component_[399415038452606756]": { + "$type": "{27F1E1A1-8D9D-4C3B-BD3A-AFB9762449C0} TransformComponent", + "Id": 399415038452606756, + "Parent Entity": "ContainerEntity", + "Transform Data": { + "Translate": [ + 32.53014373779297, + -0.00018183141946792603, + 84.40655517578125 + ] + } + }, + "Component_[4564240319609068082]": { + "$type": "EditorEntitySortComponent", + "Id": 4564240319609068082 + }, + "Component_[7827190074535394331]": { + "$type": "EditorMaterialComponent", + "Id": 7827190074535394331, + "Controller": { + "Configuration": { + "materials": [ + { + "Key": { + "materialSlotStableId": 2418540911 + }, + "Value": { + "MaterialAsset": { + "assetId": { + "guid": "{99976D73-6248-5D66-AD15-E8F52B0AFE36}" + }, + "assetHint": "materials/presets/pbr/metal_cobalt.azmaterial" + } + } + } + ] + } + } + }, + "Component_[8092226976542590265]": { + "$type": "EditorDisabledCompositionComponent", + "Id": 8092226976542590265 + } + } + }, + "Entity_[2987466549204]": { + "Id": "Entity_[2987466549204]", + "Name": "Entity1", + "Components": { + "Component_[11525365929370623807]": { + "$type": "EditorVisibilityComponent", + "Id": 11525365929370623807 + }, + "Component_[12334620273692642550]": { + "$type": "EditorLockComponent", + "Id": 12334620273692642550 + }, + "Component_[14389735759337977675]": { + "$type": "EditorPendingCompositionComponent", + "Id": 14389735759337977675 + }, + "Component_[16184381538555246534]": { + "$type": "AZ::Render::EditorMeshComponent", + "Id": 16184381538555246534, + "Controller": { + "Configuration": { + "ModelAsset": { + "assetId": { + "guid": "{E14975EF-E676-51A4-B826-3EF59CB645AA}", + "subId": 285127096 + }, + "assetHint": "testdata/objects/cube/cube.azmodel" + } + } + } + }, + "Component_[17962478023087084794]": { + "$type": "SelectionComponent", + "Id": 17962478023087084794 + }, + "Component_[18071675051915092508]": { + "$type": "EditorEntityIconComponent", + "Id": 18071675051915092508 + }, + "Component_[2115498007879087044]": { + "$type": "EditorInspectorComponent", + "Id": 2115498007879087044, + "ComponentOrderEntryArray": [ + { + "ComponentId": 399415038452606756 + }, + { + "ComponentId": 16184381538555246534, + "SortIndex": 1 + }, + { + "ComponentId": 7827190074535394331, + "SortIndex": 2 + } + ] + }, + "Component_[3518973002096080237]": { + "$type": "EditorOnlyEntityComponent", + "Id": 3518973002096080237 + }, + "Component_[399415038452606756]": { + "$type": "{27F1E1A1-8D9D-4C3B-BD3A-AFB9762449C0} TransformComponent", + "Id": 399415038452606756, + "Parent Entity": "ContainerEntity", + "Transform Data": { + "Translate": [ + -42.53056335449219, + -0.00018183141946792603, + 74.93071746826172 + ] + } + }, + "Component_[4564240319609068082]": { + "$type": "EditorEntitySortComponent", + "Id": 4564240319609068082 + }, + "Component_[7827190074535394331]": { + "$type": "EditorMaterialComponent", + "Id": 7827190074535394331, + "Controller": { + "Configuration": { + "materials": [ + { + "Key": { + "materialSlotStableId": 2418540911 + }, + "Value": { + "MaterialAsset": { + "assetId": { + "guid": "{FC69F2F8-F73B-5A0C-B8B7-94BAA45780FC}" + }, + "assetHint": "materials/presets/pbr/metal_brass_polished.azmaterial" + } + } + } + ] + } + } + }, + "Component_[8092226976542590265]": { + "$type": "EditorDisabledCompositionComponent", + "Id": 8092226976542590265 + } + } + }, + "Entity_[2991761516500]": { + "Id": "Entity_[2991761516500]", + "Name": "Entity1", + "Components": { + "Component_[11525365929370623807]": { + "$type": "EditorVisibilityComponent", + "Id": 11525365929370623807 + }, + "Component_[12334620273692642550]": { + "$type": "EditorLockComponent", + "Id": 12334620273692642550 + }, + "Component_[14389735759337977675]": { + "$type": "EditorPendingCompositionComponent", + "Id": 14389735759337977675 + }, + "Component_[16184381538555246534]": { + "$type": "AZ::Render::EditorMeshComponent", + "Id": 16184381538555246534, + "Controller": { + "Configuration": { + "ModelAsset": { + "assetId": { + "guid": "{E14975EF-E676-51A4-B826-3EF59CB645AA}", + "subId": 285127096 + }, + "assetHint": "testdata/objects/cube/cube.azmodel" + } + } + } + }, + "Component_[17962478023087084794]": { + "$type": "SelectionComponent", + "Id": 17962478023087084794 + }, + "Component_[18071675051915092508]": { + "$type": "EditorEntityIconComponent", + "Id": 18071675051915092508 + }, + "Component_[2115498007879087044]": { + "$type": "EditorInspectorComponent", + "Id": 2115498007879087044, + "ComponentOrderEntryArray": [ + { + "ComponentId": 399415038452606756 + }, + { + "ComponentId": 16184381538555246534, + "SortIndex": 1 + }, + { + "ComponentId": 7827190074535394331, + "SortIndex": 2 + } + ] + }, + "Component_[3518973002096080237]": { + "$type": "EditorOnlyEntityComponent", + "Id": 3518973002096080237 + }, + "Component_[399415038452606756]": { + "$type": "{27F1E1A1-8D9D-4C3B-BD3A-AFB9762449C0} TransformComponent", + "Id": 399415038452606756, + "Parent Entity": "ContainerEntity", + "Transform Data": { + "Translate": [ + 17.53014373779297, + -0.00018183141946792603, + 79.38228607177734 + ] + } + }, + "Component_[4564240319609068082]": { + "$type": "EditorEntitySortComponent", + "Id": 4564240319609068082 + }, + "Component_[7827190074535394331]": { + "$type": "EditorMaterialComponent", + "Id": 7827190074535394331, + "Controller": { + "Configuration": { + "materials": [ + { + "Key": {}, + "Value": { + "MaterialAsset": { + "assetId": { + "guid": "{721188E0-B7CC-5D06-8D5D-39AF8ABF2EF9}" + }, + "assetHint": "materials/presets/pbr/metal_titanium.azmaterial" + } + } + }, + { + "Key": { + "materialSlotStableId": 2418540911 + }, + "Value": { + "MaterialAsset": { + "assetId": { + "guid": "{549D26B8-881D-569F-AF05-961F36A43F4F}" + }, + "assetHint": "materials/presets/pbr/metal_aluminum_matte.azmaterial" + } + } + } + ] + } + } + }, + "Component_[8092226976542590265]": { + "$type": "EditorDisabledCompositionComponent", + "Id": 8092226976542590265 + } + } + }, + "Entity_[2996056483796]": { + "Id": "Entity_[2996056483796]", + "Name": "Entity1", + "Components": { + "Component_[11525365929370623807]": { + "$type": "EditorVisibilityComponent", + "Id": 11525365929370623807 + }, + "Component_[12334620273692642550]": { + "$type": "EditorLockComponent", + "Id": 12334620273692642550 + }, + "Component_[14389735759337977675]": { + "$type": "EditorPendingCompositionComponent", + "Id": 14389735759337977675 + }, + "Component_[16184381538555246534]": { + "$type": "AZ::Render::EditorMeshComponent", + "Id": 16184381538555246534, + "Controller": { + "Configuration": { + "ModelAsset": { + "assetId": { + "guid": "{E14975EF-E676-51A4-B826-3EF59CB645AA}", + "subId": 285127096 + }, + "assetHint": "testdata/objects/cube/cube.azmodel" + } + } + } + }, + "Component_[17962478023087084794]": { + "$type": "SelectionComponent", + "Id": 17962478023087084794 + }, + "Component_[18071675051915092508]": { + "$type": "EditorEntityIconComponent", + "Id": 18071675051915092508 + }, + "Component_[2115498007879087044]": { + "$type": "EditorInspectorComponent", + "Id": 2115498007879087044, + "ComponentOrderEntryArray": [ + { + "ComponentId": 399415038452606756 + }, + { + "ComponentId": 16184381538555246534, + "SortIndex": 1 + }, + { + "ComponentId": 7827190074535394331, + "SortIndex": 2 + } + ] + }, + "Component_[3518973002096080237]": { + "$type": "EditorOnlyEntityComponent", + "Id": 3518973002096080237 + }, + "Component_[399415038452606756]": { + "$type": "{27F1E1A1-8D9D-4C3B-BD3A-AFB9762449C0} TransformComponent", + "Id": 399415038452606756, + "Parent Entity": "ContainerEntity", + "Transform Data": { + "Translate": [ + -32.53056335449219, + -0.00018183141946792603, + 15.057670593261719 + ] + } + }, + "Component_[4564240319609068082]": { + "$type": "EditorEntitySortComponent", + "Id": 4564240319609068082 + }, + "Component_[7827190074535394331]": { + "$type": "EditorMaterialComponent", + "Id": 7827190074535394331, + "Controller": { + "Configuration": { + "materials": [ + { + "Key": { + "materialSlotStableId": 2418540911 + }, + "Value": { + "MaterialAsset": { + "assetId": { + "guid": "{93DF55AE-8D1B-5AD1-A609-05F1BD9F6EA0}" + }, + "assetHint": "materials/presets/pbr/metal_cobalt_polished.azmaterial" + } + } + } + ] + } + } + }, + "Component_[8092226976542590265]": { + "$type": "EditorDisabledCompositionComponent", + "Id": 8092226976542590265 + } + } + }, + "Entity_[3000351451092]": { + "Id": "Entity_[3000351451092]", + "Name": "Entity1", + "Components": { + "Component_[11525365929370623807]": { + "$type": "EditorVisibilityComponent", + "Id": 11525365929370623807 + }, + "Component_[12334620273692642550]": { + "$type": "EditorLockComponent", + "Id": 12334620273692642550 + }, + "Component_[14389735759337977675]": { + "$type": "EditorPendingCompositionComponent", + "Id": 14389735759337977675 + }, + "Component_[16184381538555246534]": { + "$type": "AZ::Render::EditorMeshComponent", + "Id": 16184381538555246534, + "Controller": { + "Configuration": { + "ModelAsset": { + "assetId": { + "guid": "{E14975EF-E676-51A4-B826-3EF59CB645AA}", + "subId": 285127096 + }, + "assetHint": "testdata/objects/cube/cube.azmodel" + } + } + } + }, + "Component_[17962478023087084794]": { + "$type": "SelectionComponent", + "Id": 17962478023087084794 + }, + "Component_[18071675051915092508]": { + "$type": "EditorEntityIconComponent", + "Id": 18071675051915092508 + }, + "Component_[2115498007879087044]": { + "$type": "EditorInspectorComponent", + "Id": 2115498007879087044, + "ComponentOrderEntryArray": [ + { + "ComponentId": 399415038452606756 + }, + { + "ComponentId": 16184381538555246534, + "SortIndex": 1 + }, + { + "ComponentId": 7827190074535394331, + "SortIndex": 2 + } + ] + }, + "Component_[3518973002096080237]": { + "$type": "EditorOnlyEntityComponent", + "Id": 3518973002096080237 + }, + "Component_[399415038452606756]": { + "$type": "{27F1E1A1-8D9D-4C3B-BD3A-AFB9762449C0} TransformComponent", + "Id": 399415038452606756, + "Parent Entity": "ContainerEntity", + "Transform Data": { + "Translate": [ + -7.5305633544921875, + -0.00018183141946792603, + 59.873046875 + ] + } + }, + "Component_[4564240319609068082]": { + "$type": "EditorEntitySortComponent", + "Id": 4564240319609068082 + }, + "Component_[7827190074535394331]": { + "$type": "EditorMaterialComponent", + "Id": 7827190074535394331, + "Controller": { + "Configuration": { + "materials": [ + { + "Key": { + "materialSlotStableId": 2418540911 + }, + "Value": { + "MaterialAsset": { + "assetId": { + "guid": "{E66E4343-F45A-536D-AAE1-C4D096420640}" + }, + "assetHint": "materials/presets/pbr/metal_nickel_polished.azmaterial" + } + } + } + ] + } + } + }, + "Component_[8092226976542590265]": { + "$type": "EditorDisabledCompositionComponent", + "Id": 8092226976542590265 + } + } + }, + "Entity_[3004646418388]": { + "Id": "Entity_[3004646418388]", + "Name": "Entity1", + "Components": { + "Component_[11525365929370623807]": { + "$type": "EditorVisibilityComponent", + "Id": 11525365929370623807 + }, + "Component_[12334620273692642550]": { + "$type": "EditorLockComponent", + "Id": 12334620273692642550 + }, + "Component_[14389735759337977675]": { + "$type": "EditorPendingCompositionComponent", + "Id": 14389735759337977675 + }, + "Component_[16184381538555246534]": { + "$type": "AZ::Render::EditorMeshComponent", + "Id": 16184381538555246534, + "Controller": { + "Configuration": { + "ModelAsset": { + "assetId": { + "guid": "{E14975EF-E676-51A4-B826-3EF59CB645AA}", + "subId": 285127096 + }, + "assetHint": "testdata/objects/cube/cube.azmodel" + } + } + } + }, + "Component_[17962478023087084794]": { + "$type": "SelectionComponent", + "Id": 17962478023087084794 + }, + "Component_[18071675051915092508]": { + "$type": "EditorEntityIconComponent", + "Id": 18071675051915092508 + }, + "Component_[2115498007879087044]": { + "$type": "EditorInspectorComponent", + "Id": 2115498007879087044, + "ComponentOrderEntryArray": [ + { + "ComponentId": 399415038452606756 + }, + { + "ComponentId": 16184381538555246534, + "SortIndex": 1 + }, + { + "ComponentId": 7827190074535394331, + "SortIndex": 2 + } + ] + }, + "Component_[3518973002096080237]": { + "$type": "EditorOnlyEntityComponent", + "Id": 3518973002096080237 + }, + "Component_[399415038452606756]": { + "$type": "{27F1E1A1-8D9D-4C3B-BD3A-AFB9762449C0} TransformComponent", + "Id": 399415038452606756, + "Parent Entity": "ContainerEntity", + "Transform Data": { + "Translate": [ + -17.530563354492188, + -0.00018183141946792603, + 24.533506393432617 + ] + } + }, + "Component_[4564240319609068082]": { + "$type": "EditorEntitySortComponent", + "Id": 4564240319609068082 + }, + "Component_[7827190074535394331]": { + "$type": "EditorMaterialComponent", + "Id": 7827190074535394331, + "Controller": { + "Configuration": { + "materials": [ + { + "Key": { + "materialSlotStableId": 2418540911 + }, + "Value": { + "MaterialAsset": { + "assetId": { + "guid": "{892EA944-0325-5FA6-94D7-4AB4FC02A0F5}" + }, + "assetHint": "materials/presets/pbr/metal_iron.azmaterial" + } + } + } + ] + } + } + }, + "Component_[8092226976542590265]": { + "$type": "EditorDisabledCompositionComponent", + "Id": 8092226976542590265 + } + } + }, + "Entity_[3008941385684]": { + "Id": "Entity_[3008941385684]", + "Name": "Entity1", + "Components": { + "Component_[11525365929370623807]": { + "$type": "EditorVisibilityComponent", + "Id": 11525365929370623807 + }, + "Component_[12334620273692642550]": { + "$type": "EditorLockComponent", + "Id": 12334620273692642550 + }, + "Component_[14389735759337977675]": { + "$type": "EditorPendingCompositionComponent", + "Id": 14389735759337977675 + }, + "Component_[16184381538555246534]": { + "$type": "AZ::Render::EditorMeshComponent", + "Id": 16184381538555246534, + "Controller": { + "Configuration": { + "ModelAsset": { + "assetId": { + "guid": "{E14975EF-E676-51A4-B826-3EF59CB645AA}", + "subId": 285127096 + }, + "assetHint": "testdata/objects/cube/cube.azmodel" + } + } + } + }, + "Component_[17962478023087084794]": { + "$type": "SelectionComponent", + "Id": 17962478023087084794 + }, + "Component_[18071675051915092508]": { + "$type": "EditorEntityIconComponent", + "Id": 18071675051915092508 + }, + "Component_[2115498007879087044]": { + "$type": "EditorInspectorComponent", + "Id": 2115498007879087044, + "ComponentOrderEntryArray": [ + { + "ComponentId": 399415038452606756 + }, + { + "ComponentId": 16184381538555246534, + "SortIndex": 1 + }, + { + "ComponentId": 7827190074535394331, + "SortIndex": 2 + } + ] + }, + "Component_[3518973002096080237]": { + "$type": "EditorOnlyEntityComponent", + "Id": 3518973002096080237 + }, + "Component_[399415038452606756]": { + "$type": "{27F1E1A1-8D9D-4C3B-BD3A-AFB9762449C0} TransformComponent", + "Id": 399415038452606756, + "Parent Entity": "ContainerEntity", + "Transform Data": { + "Translate": [ + 17.53014373779297, + -0.00018183141946792603, + 30.08451271057129 + ] + } + }, + "Component_[4564240319609068082]": { + "$type": "EditorEntitySortComponent", + "Id": 4564240319609068082 + }, + "Component_[7827190074535394331]": { + "$type": "EditorMaterialComponent", + "Id": 7827190074535394331, + "Controller": { + "Configuration": { + "materials": [ + { + "Key": {}, + "Value": { + "MaterialAsset": { + "assetId": { + "guid": "{721188E0-B7CC-5D06-8D5D-39AF8ABF2EF9}" + }, + "assetHint": "materials/presets/pbr/metal_titanium.azmaterial" + } + } + }, + { + "Key": { + "materialSlotStableId": 2418540911 + }, + "Value": { + "MaterialAsset": { + "assetId": { + "guid": "{64C1F6A6-6BDA-551A-BE56-1829E5913278}" + }, + "assetHint": "materials/presets/pbr/metal_aluminum_polished.azmaterial" + } + } + } + ] + } + } + }, + "Component_[8092226976542590265]": { + "$type": "EditorDisabledCompositionComponent", + "Id": 8092226976542590265 + } + } + }, + "Entity_[3013236352980]": { + "Id": "Entity_[3013236352980]", + "Name": "Entity1", + "Components": { + "Component_[11525365929370623807]": { + "$type": "EditorVisibilityComponent", + "Id": 11525365929370623807 + }, + "Component_[12334620273692642550]": { + "$type": "EditorLockComponent", + "Id": 12334620273692642550 + }, + "Component_[14389735759337977675]": { + "$type": "EditorPendingCompositionComponent", + "Id": 14389735759337977675 + }, + "Component_[16184381538555246534]": { + "$type": "AZ::Render::EditorMeshComponent", + "Id": 16184381538555246534, + "Controller": { + "Configuration": { + "ModelAsset": { + "assetId": { + "guid": "{E14975EF-E676-51A4-B826-3EF59CB645AA}", + "subId": 285127096 + }, + "assetHint": "testdata/objects/cube/cube.azmodel" + } + } + } + }, + "Component_[17962478023087084794]": { + "$type": "SelectionComponent", + "Id": 17962478023087084794 + }, + "Component_[18071675051915092508]": { + "$type": "EditorEntityIconComponent", + "Id": 18071675051915092508 + }, + "Component_[2115498007879087044]": { + "$type": "EditorInspectorComponent", + "Id": 2115498007879087044, + "ComponentOrderEntryArray": [ + { + "ComponentId": 399415038452606756 + }, + { + "ComponentId": 16184381538555246534, + "SortIndex": 1 + }, + { + "ComponentId": 7827190074535394331, + "SortIndex": 2 + } + ] + }, + "Component_[3518973002096080237]": { + "$type": "EditorOnlyEntityComponent", + "Id": 3518973002096080237 + }, + "Component_[399415038452606756]": { + "$type": "{27F1E1A1-8D9D-4C3B-BD3A-AFB9762449C0} TransformComponent", + "Id": 399415038452606756, + "Parent Entity": "ContainerEntity", + "Transform Data": { + "Translate": [ + 42.53014373779297, + -0.00018183141946792603, + 4.451573371887207 + ] + } + }, + "Component_[4564240319609068082]": { + "$type": "EditorEntitySortComponent", + "Id": 4564240319609068082 + }, + "Component_[7827190074535394331]": { + "$type": "EditorMaterialComponent", + "Id": 7827190074535394331, + "Controller": { + "Configuration": { + "materials": [ + { + "Key": { + "materialSlotStableId": 2418540911 + }, + "Value": { + "MaterialAsset": { + "assetId": { + "guid": "{5BC13D95-377E-53EA-9A93-156384BE8B04}" + }, + "assetHint": "materials/presets/pbr/metal_gold_matte.azmaterial" + } + } + } + ] + } + } + }, + "Component_[8092226976542590265]": { + "$type": "EditorDisabledCompositionComponent", + "Id": 8092226976542590265 + } + } + }, + "Entity_[3017531320276]": { + "Id": "Entity_[3017531320276]", + "Name": "Entity1", + "Components": { + "Component_[11525365929370623807]": { + "$type": "EditorVisibilityComponent", + "Id": 11525365929370623807 + }, + "Component_[12334620273692642550]": { + "$type": "EditorLockComponent", + "Id": 12334620273692642550 + }, + "Component_[14389735759337977675]": { + "$type": "EditorPendingCompositionComponent", + "Id": 14389735759337977675 + }, + "Component_[16184381538555246534]": { + "$type": "AZ::Render::EditorMeshComponent", + "Id": 16184381538555246534, + "Controller": { + "Configuration": { + "ModelAsset": { + "assetId": { + "guid": "{E14975EF-E676-51A4-B826-3EF59CB645AA}", + "subId": 285127096 + }, + "assetHint": "testdata/objects/cube/cube.azmodel" + } + } + } + }, + "Component_[17962478023087084794]": { + "$type": "SelectionComponent", + "Id": 17962478023087084794 + }, + "Component_[18071675051915092508]": { + "$type": "EditorEntityIconComponent", + "Id": 18071675051915092508 + }, + "Component_[2115498007879087044]": { + "$type": "EditorInspectorComponent", + "Id": 2115498007879087044, + "ComponentOrderEntryArray": [ + { + "ComponentId": 399415038452606756 + }, + { + "ComponentId": 16184381538555246534, + "SortIndex": 1 + }, + { + "ComponentId": 7827190074535394331, + "SortIndex": 2 + } + ] + }, + "Component_[3518973002096080237]": { + "$type": "EditorOnlyEntityComponent", + "Id": 3518973002096080237 + }, + "Component_[399415038452606756]": { + "$type": "{27F1E1A1-8D9D-4C3B-BD3A-AFB9762449C0} TransformComponent", + "Id": 399415038452606756, + "Parent Entity": "ContainerEntity", + "Transform Data": { + "Translate": [ + 42.53014373779297, + -0.00018183141946792603, + 94.40913391113281 + ] + } + }, + "Component_[4564240319609068082]": { + "$type": "EditorEntitySortComponent", + "Id": 4564240319609068082 + }, + "Component_[7827190074535394331]": { + "$type": "EditorMaterialComponent", + "Id": 7827190074535394331, + "Controller": { + "Configuration": { + "materials": [ + { + "Key": { + "materialSlotStableId": 2418540911 + }, + "Value": { + "MaterialAsset": { + "assetId": { + "guid": "{5BC13D95-377E-53EA-9A93-156384BE8B04}" + }, + "assetHint": "materials/presets/pbr/metal_gold_matte.azmaterial" + } + } + } + ] + } + } + }, + "Component_[8092226976542590265]": { + "$type": "EditorDisabledCompositionComponent", + "Id": 8092226976542590265 + } + } + }, + "Entity_[3021826287572]": { + "Id": "Entity_[3021826287572]", + "Name": "Entity1", + "Components": { + "Component_[11525365929370623807]": { + "$type": "EditorVisibilityComponent", + "Id": 11525365929370623807 + }, + "Component_[12334620273692642550]": { + "$type": "EditorLockComponent", + "Id": 12334620273692642550 + }, + "Component_[14389735759337977675]": { + "$type": "EditorPendingCompositionComponent", + "Id": 14389735759337977675 + }, + "Component_[16184381538555246534]": { + "$type": "AZ::Render::EditorMeshComponent", + "Id": 16184381538555246534, + "Controller": { + "Configuration": { + "ModelAsset": { + "assetId": { + "guid": "{E14975EF-E676-51A4-B826-3EF59CB645AA}", + "subId": 285127096 + }, + "assetHint": "testdata/objects/cube/cube.azmodel" + } + } + } + }, + "Component_[17962478023087084794]": { + "$type": "SelectionComponent", + "Id": 17962478023087084794 + }, + "Component_[18071675051915092508]": { + "$type": "EditorEntityIconComponent", + "Id": 18071675051915092508 + }, + "Component_[2115498007879087044]": { + "$type": "EditorInspectorComponent", + "Id": 2115498007879087044, + "ComponentOrderEntryArray": [ + { + "ComponentId": 399415038452606756 + }, + { + "ComponentId": 16184381538555246534, + "SortIndex": 1 + }, + { + "ComponentId": 7827190074535394331, + "SortIndex": 2 + } + ] + }, + "Component_[3518973002096080237]": { + "$type": "EditorOnlyEntityComponent", + "Id": 3518973002096080237 + }, + "Component_[399415038452606756]": { + "$type": "{27F1E1A1-8D9D-4C3B-BD3A-AFB9762449C0} TransformComponent", + "Id": 399415038452606756, + "Parent Entity": "ContainerEntity", + "Transform Data": { + "Translate": [ + 37.53014373779297, + -0.00018183141946792603, + 30.08451271057129 + ] + } + }, + "Component_[4564240319609068082]": { + "$type": "EditorEntitySortComponent", + "Id": 4564240319609068082 + }, + "Component_[7827190074535394331]": { + "$type": "EditorMaterialComponent", + "Id": 7827190074535394331, + "Controller": { + "Configuration": { + "materials": [ + { + "Key": { + "materialSlotStableId": 2418540911 + }, + "Value": { + "MaterialAsset": { + "assetId": { + "guid": "{CF5C7B01-4912-58AE-991A-F25251E505AC}" + }, + "assetHint": "materials/presets/pbr/metal_copper_polished.azmaterial" + } + } + } + ] + } + } + }, + "Component_[8092226976542590265]": { + "$type": "EditorDisabledCompositionComponent", + "Id": 8092226976542590265 + } + } + }, + "Entity_[3026121254868]": { + "Id": "Entity_[3026121254868]", + "Name": "Entity1", + "Components": { + "Component_[11525365929370623807]": { + "$type": "EditorVisibilityComponent", + "Id": 11525365929370623807 + }, + "Component_[12334620273692642550]": { + "$type": "EditorLockComponent", + "Id": 12334620273692642550 + }, + "Component_[14389735759337977675]": { + "$type": "EditorPendingCompositionComponent", + "Id": 14389735759337977675 + }, + "Component_[16184381538555246534]": { + "$type": "AZ::Render::EditorMeshComponent", + "Id": 16184381538555246534, + "Controller": { + "Configuration": { + "ModelAsset": { + "assetId": { + "guid": "{E14975EF-E676-51A4-B826-3EF59CB645AA}", + "subId": 285127096 + }, + "assetHint": "testdata/objects/cube/cube.azmodel" + } + } + } + }, + "Component_[17962478023087084794]": { + "$type": "SelectionComponent", + "Id": 17962478023087084794 + }, + "Component_[18071675051915092508]": { + "$type": "EditorEntityIconComponent", + "Id": 18071675051915092508 + }, + "Component_[2115498007879087044]": { + "$type": "EditorInspectorComponent", + "Id": 2115498007879087044, + "ComponentOrderEntryArray": [ + { + "ComponentId": 399415038452606756 + }, + { + "ComponentId": 16184381538555246534, + "SortIndex": 1 + }, + { + "ComponentId": 7827190074535394331, + "SortIndex": 2 + } + ] + }, + "Component_[3518973002096080237]": { + "$type": "EditorOnlyEntityComponent", + "Id": 3518973002096080237 + }, + "Component_[399415038452606756]": { + "$type": "{27F1E1A1-8D9D-4C3B-BD3A-AFB9762449C0} TransformComponent", + "Id": 399415038452606756, + "Parent Entity": "ContainerEntity", + "Transform Data": { + "Translate": [ + 47.53014373779297, + -0.00018183141946792603, + 9.475835800170898 + ] + } + }, + "Component_[4564240319609068082]": { + "$type": "EditorEntitySortComponent", + "Id": 4564240319609068082 + }, + "Component_[7827190074535394331]": { + "$type": "EditorMaterialComponent", + "Id": 7827190074535394331, + "Controller": { + "Configuration": { + "materials": [ + { + "Key": { + "materialSlotStableId": 2418540911 + }, + "Value": { + "MaterialAsset": { + "assetId": { + "guid": "{892EA944-0325-5FA6-94D7-4AB4FC02A0F5}" + }, + "assetHint": "materials/presets/pbr/metal_iron.azmaterial" + } + } + } + ] + } + } + }, + "Component_[8092226976542590265]": { + "$type": "EditorDisabledCompositionComponent", + "Id": 8092226976542590265 + } + } + }, + "Entity_[3030416222164]": { + "Id": "Entity_[3030416222164]", + "Name": "Entity1", + "Components": { + "Component_[11525365929370623807]": { + "$type": "EditorVisibilityComponent", + "Id": 11525365929370623807 + }, + "Component_[12334620273692642550]": { + "$type": "EditorLockComponent", + "Id": 12334620273692642550 + }, + "Component_[14389735759337977675]": { + "$type": "EditorPendingCompositionComponent", + "Id": 14389735759337977675 + }, + "Component_[16184381538555246534]": { + "$type": "AZ::Render::EditorMeshComponent", + "Id": 16184381538555246534, + "Controller": { + "Configuration": { + "ModelAsset": { + "assetId": { + "guid": "{E14975EF-E676-51A4-B826-3EF59CB645AA}", + "subId": 285127096 + }, + "assetHint": "testdata/objects/cube/cube.azmodel" + } + } + } + }, + "Component_[17962478023087084794]": { + "$type": "SelectionComponent", + "Id": 17962478023087084794 + }, + "Component_[18071675051915092508]": { + "$type": "EditorEntityIconComponent", + "Id": 18071675051915092508 + }, + "Component_[2115498007879087044]": { + "$type": "EditorInspectorComponent", + "Id": 2115498007879087044, + "ComponentOrderEntryArray": [ + { + "ComponentId": 399415038452606756 + }, + { + "ComponentId": 16184381538555246534, + "SortIndex": 1 + }, + { + "ComponentId": 7827190074535394331, + "SortIndex": 2 + } + ] + }, + "Component_[3518973002096080237]": { + "$type": "EditorOnlyEntityComponent", + "Id": 3518973002096080237 + }, + "Component_[399415038452606756]": { + "$type": "{27F1E1A1-8D9D-4C3B-BD3A-AFB9762449C0} TransformComponent", + "Id": 399415038452606756, + "Parent Entity": "ContainerEntity", + "Transform Data": { + "Translate": [ + -2.5305633544921875, + -0.00018183141946792603, + 84.40655517578125 + ] + } + }, + "Component_[4564240319609068082]": { + "$type": "EditorEntitySortComponent", + "Id": 4564240319609068082 + }, + "Component_[7827190074535394331]": { + "$type": "EditorMaterialComponent", + "Id": 7827190074535394331, + "Controller": { + "Configuration": { + "materials": [ + { + "Key": { + "materialSlotStableId": 2418540911 + }, + "Value": { + "MaterialAsset": { + "assetId": { + "guid": "{DC0598ED-1EDD-5B37-892E-E0867621D74C}" + }, + "assetHint": "materials/presets/pbr/metal_palladium.azmaterial" + } + } + } + ] + } + } + }, + "Component_[8092226976542590265]": { + "$type": "EditorDisabledCompositionComponent", + "Id": 8092226976542590265 + } + } + }, + "Entity_[3034711189460]": { + "Id": "Entity_[3034711189460]", + "Name": "Entity1", + "Components": { + "Component_[1057179753323467068]": { + "$type": "EditorMaterialComponent", + "Id": 1057179753323467068, + "Controller": { + "Configuration": { + "materials": [ + { + "Key": { + "materialSlotStableId": 2418540911 + }, + "Value": { + "MaterialAsset": { + "assetId": { + "guid": "{A3F3CD98-1634-5542-AD5A-78E91BE21AE9}" + }, + "assetHint": "materials/presets/pbr/metal_titanium_matte.azmaterial" + } + } + } + ] + } + } + }, + "Component_[11525365929370623807]": { + "$type": "EditorVisibilityComponent", + "Id": 11525365929370623807 + }, + "Component_[12334620273692642550]": { + "$type": "EditorLockComponent", + "Id": 12334620273692642550 + }, + "Component_[14389735759337977675]": { + "$type": "EditorPendingCompositionComponent", + "Id": 14389735759337977675 + }, + "Component_[16184381538555246534]": { + "$type": "AZ::Render::EditorMeshComponent", + "Id": 16184381538555246534, + "Controller": { + "Configuration": { + "ModelAsset": { + "assetId": { + "guid": "{E14975EF-E676-51A4-B826-3EF59CB645AA}", + "subId": 285127096 + }, + "assetHint": "testdata/objects/cube/cube.azmodel" + } + } + } + }, + "Component_[17962478023087084794]": { + "$type": "SelectionComponent", + "Id": 17962478023087084794 + }, + "Component_[18071675051915092508]": { + "$type": "EditorEntityIconComponent", + "Id": 18071675051915092508 + }, + "Component_[2115498007879087044]": { + "$type": "EditorInspectorComponent", + "Id": 2115498007879087044, + "ComponentOrderEntryArray": [ + { + "ComponentId": 399415038452606756 + }, + { + "ComponentId": 16184381538555246534, + "SortIndex": 1 + }, + { + "ComponentId": 1057179753323467068, + "SortIndex": 2 + } + ] + }, + "Component_[3518973002096080237]": { + "$type": "EditorOnlyEntityComponent", + "Id": 3518973002096080237 + }, + "Component_[399415038452606756]": { + "$type": "{27F1E1A1-8D9D-4C3B-BD3A-AFB9762449C0} TransformComponent", + "Id": 399415038452606756, + "Parent Entity": "ContainerEntity", + "Transform Data": { + "Translate": [ + 12.530143737792969, + -0.00018183141946792603, + 49.593753814697266 + ] + } + }, + "Component_[4564240319609068082]": { + "$type": "EditorEntitySortComponent", + "Id": 4564240319609068082 + }, + "Component_[8092226976542590265]": { + "$type": "EditorDisabledCompositionComponent", + "Id": 8092226976542590265 + } + } + }, + "Entity_[3039006156756]": { + "Id": "Entity_[3039006156756]", + "Name": "Entity1", + "Components": { + "Component_[11525365929370623807]": { + "$type": "EditorVisibilityComponent", + "Id": 11525365929370623807 + }, + "Component_[12334620273692642550]": { + "$type": "EditorLockComponent", + "Id": 12334620273692642550 + }, + "Component_[14389735759337977675]": { + "$type": "EditorPendingCompositionComponent", + "Id": 14389735759337977675 + }, + "Component_[16184381538555246534]": { + "$type": "AZ::Render::EditorMeshComponent", + "Id": 16184381538555246534, + "Controller": { + "Configuration": { + "ModelAsset": { + "assetId": { + "guid": "{E14975EF-E676-51A4-B826-3EF59CB645AA}", + "subId": 285127096 + }, + "assetHint": "testdata/objects/cube/cube.azmodel" + } + } + } + }, + "Component_[17962478023087084794]": { + "$type": "SelectionComponent", + "Id": 17962478023087084794 + }, + "Component_[18071675051915092508]": { + "$type": "EditorEntityIconComponent", + "Id": 18071675051915092508 + }, + "Component_[2115498007879087044]": { + "$type": "EditorInspectorComponent", + "Id": 2115498007879087044, + "ComponentOrderEntryArray": [ + { + "ComponentId": 399415038452606756 + }, + { + "ComponentId": 16184381538555246534, + "SortIndex": 1 + }, + { + "ComponentId": 7827190074535394331, + "SortIndex": 2 + } + ] + }, + "Component_[3518973002096080237]": { + "$type": "EditorOnlyEntityComponent", + "Id": 3518973002096080237 + }, + "Component_[399415038452606756]": { + "$type": "{27F1E1A1-8D9D-4C3B-BD3A-AFB9762449C0} TransformComponent", + "Id": 399415038452606756, + "Parent Entity": "ContainerEntity", + "Transform Data": { + "Translate": [ + -7.5305633544921875, + -0.00018183141946792603, + 114.4910659790039 + ] + } + }, + "Component_[4564240319609068082]": { + "$type": "EditorEntitySortComponent", + "Id": 4564240319609068082 + }, + "Component_[7827190074535394331]": { + "$type": "EditorMaterialComponent", + "Id": 7827190074535394331, + "Controller": { + "Configuration": { + "materials": [ + { + "Key": { + "materialSlotStableId": 2418540911 + }, + "Value": { + "MaterialAsset": { + "assetId": { + "guid": "{DD1E26AE-80FB-5DB6-8786-26D438190A38}" + }, + "assetHint": "materials/presets/pbr/metal_nickel.azmaterial" + } + } + } + ] + } + } + }, + "Component_[8092226976542590265]": { + "$type": "EditorDisabledCompositionComponent", + "Id": 8092226976542590265 + } + } + }, + "Entity_[3043301124052]": { + "Id": "Entity_[3043301124052]", + "Name": "Entity1", + "Components": { + "Component_[11525365929370623807]": { + "$type": "EditorVisibilityComponent", + "Id": 11525365929370623807 + }, + "Component_[12334620273692642550]": { + "$type": "EditorLockComponent", + "Id": 12334620273692642550 + }, + "Component_[14389735759337977675]": { + "$type": "EditorPendingCompositionComponent", + "Id": 14389735759337977675 + }, + "Component_[16184381538555246534]": { + "$type": "AZ::Render::EditorMeshComponent", + "Id": 16184381538555246534, + "Controller": { + "Configuration": { + "ModelAsset": { + "assetId": { + "guid": "{E14975EF-E676-51A4-B826-3EF59CB645AA}", + "subId": 285127096 + }, + "assetHint": "testdata/objects/cube/cube.azmodel" + } + } + } + }, + "Component_[17962478023087084794]": { + "$type": "SelectionComponent", + "Id": 17962478023087084794 + }, + "Component_[18071675051915092508]": { + "$type": "EditorEntityIconComponent", + "Id": 18071675051915092508 + }, + "Component_[2115498007879087044]": { + "$type": "EditorInspectorComponent", + "Id": 2115498007879087044, + "ComponentOrderEntryArray": [ + { + "ComponentId": 399415038452606756 + }, + { + "ComponentId": 16184381538555246534, + "SortIndex": 1 + }, + { + "ComponentId": 7827190074535394331, + "SortIndex": 2 + } + ] + }, + "Component_[3518973002096080237]": { + "$type": "EditorOnlyEntityComponent", + "Id": 3518973002096080237 + }, + "Component_[399415038452606756]": { + "$type": "{27F1E1A1-8D9D-4C3B-BD3A-AFB9762449C0} TransformComponent", + "Id": 399415038452606756, + "Parent Entity": "ContainerEntity", + "Transform Data": { + "Translate": [ + -47.53056335449219, + -0.00018183141946792603, + 114.4910659790039 + ] + } + }, + "Component_[4564240319609068082]": { + "$type": "EditorEntitySortComponent", + "Id": 4564240319609068082 + }, + "Component_[7827190074535394331]": { + "$type": "EditorMaterialComponent", + "Id": 7827190074535394331, + "Controller": { + "Configuration": { + "materials": [ + { + "Key": { + "materialSlotStableId": 2418540911 + }, + "Value": { + "MaterialAsset": { + "assetId": { + "guid": "{94CF2BD7-7D09-5577-B1D8-3FF85B15E127}" + }, + "assetHint": "materials/presets/pbr/metal_aluminum.azmaterial" + } + } + } + ] + } + } + }, + "Component_[8092226976542590265]": { + "$type": "EditorDisabledCompositionComponent", + "Id": 8092226976542590265 + } + } + }, + "Entity_[3047596091348]": { + "Id": "Entity_[3047596091348]", + "Name": "Entity1", + "Components": { + "Component_[11525365929370623807]": { + "$type": "EditorVisibilityComponent", + "Id": 11525365929370623807 + }, + "Component_[12334620273692642550]": { + "$type": "EditorLockComponent", + "Id": 12334620273692642550 + }, + "Component_[14389735759337977675]": { + "$type": "EditorPendingCompositionComponent", + "Id": 14389735759337977675 + }, + "Component_[16184381538555246534]": { + "$type": "AZ::Render::EditorMeshComponent", + "Id": 16184381538555246534, + "Controller": { + "Configuration": { + "ModelAsset": { + "assetId": { + "guid": "{E14975EF-E676-51A4-B826-3EF59CB645AA}", + "subId": 285127096 + }, + "assetHint": "testdata/objects/cube/cube.azmodel" + } + } + } + }, + "Component_[17962478023087084794]": { + "$type": "SelectionComponent", + "Id": 17962478023087084794 + }, + "Component_[18071675051915092508]": { + "$type": "EditorEntityIconComponent", + "Id": 18071675051915092508 + }, + "Component_[2115498007879087044]": { + "$type": "EditorInspectorComponent", + "Id": 2115498007879087044, + "ComponentOrderEntryArray": [ + { + "ComponentId": 399415038452606756 + }, + { + "ComponentId": 16184381538555246534, + "SortIndex": 1 + }, + { + "ComponentId": 7827190074535394331, + "SortIndex": 2 + } + ] + }, + "Component_[3518973002096080237]": { + "$type": "EditorOnlyEntityComponent", + "Id": 3518973002096080237 + }, + "Component_[399415038452606756]": { + "$type": "{27F1E1A1-8D9D-4C3B-BD3A-AFB9762449C0} TransformComponent", + "Id": 399415038452606756, + "Parent Entity": "ContainerEntity", + "Transform Data": { + "Translate": [ + -27.530563354492188, + -0.00018183141946792603, + 109.46680450439453 + ] + } + }, + "Component_[4564240319609068082]": { + "$type": "EditorEntitySortComponent", + "Id": 4564240319609068082 + }, + "Component_[7827190074535394331]": { + "$type": "EditorMaterialComponent", + "Id": 7827190074535394331, + "Controller": { + "Configuration": { + "materials": [ + { + "Key": { + "materialSlotStableId": 2418540911 + }, + "Value": { + "MaterialAsset": { + "assetId": { + "guid": "{2D054071-BEF7-53C0-A8C9-E4F026BD8364}" + }, + "assetHint": "materials/presets/pbr/metal_copper_matte.azmaterial" + } + } + } + ] + } + } + }, + "Component_[8092226976542590265]": { + "$type": "EditorDisabledCompositionComponent", + "Id": 8092226976542590265 + } + } + }, + "Entity_[3051891058644]": { + "Id": "Entity_[3051891058644]", + "Name": "Entity1", + "Components": { + "Component_[11525365929370623807]": { + "$type": "EditorVisibilityComponent", + "Id": 11525365929370623807 + }, + "Component_[12334620273692642550]": { + "$type": "EditorLockComponent", + "Id": 12334620273692642550 + }, + "Component_[14389735759337977675]": { + "$type": "EditorPendingCompositionComponent", + "Id": 14389735759337977675 + }, + "Component_[16184381538555246534]": { + "$type": "AZ::Render::EditorMeshComponent", + "Id": 16184381538555246534, + "Controller": { + "Configuration": { + "ModelAsset": { + "assetId": { + "guid": "{E14975EF-E676-51A4-B826-3EF59CB645AA}", + "subId": 285127096 + }, + "assetHint": "testdata/objects/cube/cube.azmodel" + } + } + } + }, + "Component_[17962478023087084794]": { + "$type": "SelectionComponent", + "Id": 17962478023087084794 + }, + "Component_[18071675051915092508]": { + "$type": "EditorEntityIconComponent", + "Id": 18071675051915092508 + }, + "Component_[2115498007879087044]": { + "$type": "EditorInspectorComponent", + "Id": 2115498007879087044, + "ComponentOrderEntryArray": [ + { + "ComponentId": 399415038452606756 + }, + { + "ComponentId": 16184381538555246534, + "SortIndex": 1 + }, + { + "ComponentId": 7827190074535394331, + "SortIndex": 2 + } + ] + }, + "Component_[3518973002096080237]": { + "$type": "EditorOnlyEntityComponent", + "Id": 3518973002096080237 + }, + "Component_[399415038452606756]": { + "$type": "{27F1E1A1-8D9D-4C3B-BD3A-AFB9762449C0} TransformComponent", + "Id": 399415038452606756, + "Parent Entity": "ContainerEntity", + "Transform Data": { + "Translate": [ + 37.53014373779297, + 0.010651908814907074, + 69.38883209228516 + ] + } + }, + "Component_[4564240319609068082]": { + "$type": "EditorEntitySortComponent", + "Id": 4564240319609068082 + }, + "Component_[7827190074535394331]": { + "$type": "EditorMaterialComponent", + "Id": 7827190074535394331, + "Controller": { + "Configuration": { + "materials": [ + { + "Key": { + "materialSlotStableId": 2418540911 + }, + "Value": { + "MaterialAsset": { + "assetId": { + "guid": "{E621C5BF-B8E1-55F0-A791-EC960F2FA46F}" + }, + "assetHint": "materials/presets/pbr/metal_copper.azmaterial" + } + } + } + ] + } + } + }, + "Component_[8092226976542590265]": { + "$type": "EditorDisabledCompositionComponent", + "Id": 8092226976542590265 + } + } + }, + "Entity_[3056186025940]": { + "Id": "Entity_[3056186025940]", + "Name": "Entity1", + "Components": { + "Component_[11525365929370623807]": { + "$type": "EditorVisibilityComponent", + "Id": 11525365929370623807 + }, + "Component_[12334620273692642550]": { + "$type": "EditorLockComponent", + "Id": 12334620273692642550 + }, + "Component_[14389735759337977675]": { + "$type": "EditorPendingCompositionComponent", + "Id": 14389735759337977675 + }, + "Component_[16184381538555246534]": { + "$type": "AZ::Render::EditorMeshComponent", + "Id": 16184381538555246534, + "Controller": { + "Configuration": { + "ModelAsset": { + "assetId": { + "guid": "{E14975EF-E676-51A4-B826-3EF59CB645AA}", + "subId": 285127096 + }, + "assetHint": "testdata/objects/cube/cube.azmodel" + } + } + } + }, + "Component_[17962478023087084794]": { + "$type": "SelectionComponent", + "Id": 17962478023087084794 + }, + "Component_[18071675051915092508]": { + "$type": "EditorEntityIconComponent", + "Id": 18071675051915092508 + }, + "Component_[2115498007879087044]": { + "$type": "EditorInspectorComponent", + "Id": 2115498007879087044, + "ComponentOrderEntryArray": [ + { + "ComponentId": 399415038452606756 + }, + { + "ComponentId": 16184381538555246534, + "SortIndex": 1 + }, + { + "ComponentId": 7827190074535394331, + "SortIndex": 2 + } + ] + }, + "Component_[3518973002096080237]": { + "$type": "EditorOnlyEntityComponent", + "Id": 3518973002096080237 + }, + "Component_[399415038452606756]": { + "$type": "{27F1E1A1-8D9D-4C3B-BD3A-AFB9762449C0} TransformComponent", + "Id": 399415038452606756, + "Parent Entity": "ContainerEntity", + "Transform Data": { + "Translate": [ + -12.530563354492188, + -0.00018183141946792603, + 15.057670593261719 + ] + } + }, + "Component_[4564240319609068082]": { + "$type": "EditorEntitySortComponent", + "Id": 4564240319609068082 + }, + "Component_[7827190074535394331]": { + "$type": "EditorMaterialComponent", + "Id": 7827190074535394331, + "Controller": { + "Configuration": { + "materials": [ + { + "Key": { + "materialSlotStableId": 2418540911 + }, + "Value": { + "MaterialAsset": { + "assetId": { + "guid": "{F2AD0EBF-7137-58D1-9991-9552FAD41B19}" + }, + "assetHint": "materials/presets/pbr/metal_mercury.azmaterial" + } + } + } + ] + } + } + }, + "Component_[8092226976542590265]": { + "$type": "EditorDisabledCompositionComponent", + "Id": 8092226976542590265 + } + } + }, + "Entity_[3060480993236]": { + "Id": "Entity_[3060480993236]", + "Name": "Entity1", + "Components": { + "Component_[11525365929370623807]": { + "$type": "EditorVisibilityComponent", + "Id": 11525365929370623807 + }, + "Component_[12334620273692642550]": { + "$type": "EditorLockComponent", + "Id": 12334620273692642550 + }, + "Component_[14389735759337977675]": { + "$type": "EditorPendingCompositionComponent", + "Id": 14389735759337977675 + }, + "Component_[16184381538555246534]": { + "$type": "AZ::Render::EditorMeshComponent", + "Id": 16184381538555246534, + "Controller": { + "Configuration": { + "ModelAsset": { + "assetId": { + "guid": "{E14975EF-E676-51A4-B826-3EF59CB645AA}", + "subId": 285127096 + }, + "assetHint": "testdata/objects/cube/cube.azmodel" + } + } + } + }, + "Component_[17962478023087084794]": { + "$type": "SelectionComponent", + "Id": 17962478023087084794 + }, + "Component_[18071675051915092508]": { + "$type": "EditorEntityIconComponent", + "Id": 18071675051915092508 + }, + "Component_[2115498007879087044]": { + "$type": "EditorInspectorComponent", + "Id": 2115498007879087044, + "ComponentOrderEntryArray": [ + { + "ComponentId": 399415038452606756 + }, + { + "ComponentId": 16184381538555246534, + "SortIndex": 1 + }, + { + "ComponentId": 7827190074535394331, + "SortIndex": 2 + } + ] + }, + "Component_[3518973002096080237]": { + "$type": "EditorOnlyEntityComponent", + "Id": 3518973002096080237 + }, + "Component_[399415038452606756]": { + "$type": "{27F1E1A1-8D9D-4C3B-BD3A-AFB9762449C0} TransformComponent", + "Id": 399415038452606756, + "Parent Entity": "ContainerEntity", + "Transform Data": { + "Translate": [ + -27.530563354492188, + -0.00018183141946792603, + 4.451573371887207 + ] + } + }, + "Component_[4564240319609068082]": { + "$type": "EditorEntitySortComponent", + "Id": 4564240319609068082 + }, + "Component_[7827190074535394331]": { + "$type": "EditorMaterialComponent", + "Id": 7827190074535394331, + "Controller": { + "Configuration": { + "materials": [ + { + "Key": { + "materialSlotStableId": 2418540911 + }, + "Value": { + "MaterialAsset": { + "assetId": { + "guid": "{2D054071-BEF7-53C0-A8C9-E4F026BD8364}" + }, + "assetHint": "materials/presets/pbr/metal_copper_matte.azmaterial" + } + } + } + ] + } + } + }, + "Component_[8092226976542590265]": { + "$type": "EditorDisabledCompositionComponent", + "Id": 8092226976542590265 + } + } + }, + "Entity_[3064775960532]": { + "Id": "Entity_[3064775960532]", + "Name": "Entity1", + "Components": { + "Component_[11525365929370623807]": { + "$type": "EditorVisibilityComponent", + "Id": 11525365929370623807 + }, + "Component_[12334620273692642550]": { + "$type": "EditorLockComponent", + "Id": 12334620273692642550 + }, + "Component_[14389735759337977675]": { + "$type": "EditorPendingCompositionComponent", + "Id": 14389735759337977675 + }, + "Component_[16184381538555246534]": { + "$type": "AZ::Render::EditorMeshComponent", + "Id": 16184381538555246534, + "Controller": { + "Configuration": { + "ModelAsset": { + "assetId": { + "guid": "{E14975EF-E676-51A4-B826-3EF59CB645AA}", + "subId": 285127096 + }, + "assetHint": "testdata/objects/cube/cube.azmodel" + } + } + } + }, + "Component_[17962478023087084794]": { + "$type": "SelectionComponent", + "Id": 17962478023087084794 + }, + "Component_[18071675051915092508]": { + "$type": "EditorEntityIconComponent", + "Id": 18071675051915092508 + }, + "Component_[2115498007879087044]": { + "$type": "EditorInspectorComponent", + "Id": 2115498007879087044, + "ComponentOrderEntryArray": [ + { + "ComponentId": 399415038452606756 + }, + { + "ComponentId": 16184381538555246534, + "SortIndex": 1 + }, + { + "ComponentId": 7827190074535394331, + "SortIndex": 2 + } + ] + }, + "Component_[3518973002096080237]": { + "$type": "EditorOnlyEntityComponent", + "Id": 3518973002096080237 + }, + "Component_[399415038452606756]": { + "$type": "{27F1E1A1-8D9D-4C3B-BD3A-AFB9762449C0} TransformComponent", + "Id": 399415038452606756, + "Parent Entity": "ContainerEntity", + "Transform Data": { + "Translate": [ + -42.53056335449219, + -0.00018183141946792603, + 54.618019104003906 + ] + } + }, + "Component_[4564240319609068082]": { + "$type": "EditorEntitySortComponent", + "Id": 4564240319609068082 + }, + "Component_[7827190074535394331]": { + "$type": "EditorMaterialComponent", + "Id": 7827190074535394331, + "Controller": { + "Configuration": { + "materials": [ + { + "Key": { + "materialSlotStableId": 2418540911 + }, + "Value": { + "MaterialAsset": { + "assetId": { + "guid": "{80E0F2A7-1EE4-597F-80EF-985C65BCE2EB}" + }, + "assetHint": "materials/presets/pbr/metal_brass.azmaterial" + } + } + } + ] + } + } + }, + "Component_[8092226976542590265]": { + "$type": "EditorDisabledCompositionComponent", + "Id": 8092226976542590265 + } + } + }, + "Entity_[3069070927828]": { + "Id": "Entity_[3069070927828]", + "Name": "Entity1", + "Components": { + "Component_[11525365929370623807]": { + "$type": "EditorVisibilityComponent", + "Id": 11525365929370623807 + }, + "Component_[12334620273692642550]": { + "$type": "EditorLockComponent", + "Id": 12334620273692642550 + }, + "Component_[14389735759337977675]": { + "$type": "EditorPendingCompositionComponent", + "Id": 14389735759337977675 + }, + "Component_[16184381538555246534]": { + "$type": "AZ::Render::EditorMeshComponent", + "Id": 16184381538555246534, + "Controller": { + "Configuration": { + "ModelAsset": { + "assetId": { + "guid": "{E14975EF-E676-51A4-B826-3EF59CB645AA}", + "subId": 285127096 + }, + "assetHint": "testdata/objects/cube/cube.azmodel" + } + } + } + }, + "Component_[17962478023087084794]": { + "$type": "SelectionComponent", + "Id": 17962478023087084794 + }, + "Component_[18071675051915092508]": { + "$type": "EditorEntityIconComponent", + "Id": 18071675051915092508 + }, + "Component_[2115498007879087044]": { + "$type": "EditorInspectorComponent", + "Id": 2115498007879087044, + "ComponentOrderEntryArray": [ + { + "ComponentId": 399415038452606756 + }, + { + "ComponentId": 16184381538555246534, + "SortIndex": 1 + }, + { + "ComponentId": 7827190074535394331, + "SortIndex": 2 + } + ] + }, + "Component_[3518973002096080237]": { + "$type": "EditorOnlyEntityComponent", + "Id": 3518973002096080237 + }, + "Component_[399415038452606756]": { + "$type": "{27F1E1A1-8D9D-4C3B-BD3A-AFB9762449C0} TransformComponent", + "Id": 399415038452606756, + "Parent Entity": "ContainerEntity", + "Transform Data": { + "Translate": [ + 22.53014373779297, + -0.00018183141946792603, + 30.08451271057129 + ] + } + }, + "Component_[4564240319609068082]": { + "$type": "EditorEntitySortComponent", + "Id": 4564240319609068082 + }, + "Component_[7827190074535394331]": { + "$type": "EditorMaterialComponent", + "Id": 7827190074535394331, + "Controller": { + "Configuration": { + "materials": [ + { + "Key": { + "materialSlotStableId": 2418540911 + }, + "Value": { + "MaterialAsset": { + "assetId": { + "guid": "{FC69F2F8-F73B-5A0C-B8B7-94BAA45780FC}" + }, + "assetHint": "materials/presets/pbr/metal_brass_polished.azmaterial" + } + } + } + ] + } + } + }, + "Component_[8092226976542590265]": { + "$type": "EditorDisabledCompositionComponent", + "Id": 8092226976542590265 + } + } + }, + "Entity_[3073365895124]": { + "Id": "Entity_[3073365895124]", + "Name": "Entity1", + "Components": { + "Component_[11525365929370623807]": { + "$type": "EditorVisibilityComponent", + "Id": 11525365929370623807 + }, + "Component_[12334620273692642550]": { + "$type": "EditorLockComponent", + "Id": 12334620273692642550 + }, + "Component_[14389735759337977675]": { + "$type": "EditorPendingCompositionComponent", + "Id": 14389735759337977675 + }, + "Component_[16184381538555246534]": { + "$type": "AZ::Render::EditorMeshComponent", + "Id": 16184381538555246534, + "Controller": { + "Configuration": { + "ModelAsset": { + "assetId": { + "guid": "{E14975EF-E676-51A4-B826-3EF59CB645AA}", + "subId": 285127096 + }, + "assetHint": "testdata/objects/cube/cube.azmodel" + } + } + } + }, + "Component_[17962478023087084794]": { + "$type": "SelectionComponent", + "Id": 17962478023087084794 + }, + "Component_[18071675051915092508]": { + "$type": "EditorEntityIconComponent", + "Id": 18071675051915092508 + }, + "Component_[2115498007879087044]": { + "$type": "EditorInspectorComponent", + "Id": 2115498007879087044, + "ComponentOrderEntryArray": [ + { + "ComponentId": 399415038452606756 + }, + { + "ComponentId": 16184381538555246534, + "SortIndex": 1 + }, + { + "ComponentId": 7827190074535394331, + "SortIndex": 2 + } + ] + }, + "Component_[3518973002096080237]": { + "$type": "EditorOnlyEntityComponent", + "Id": 3518973002096080237 + }, + "Component_[399415038452606756]": { + "$type": "{27F1E1A1-8D9D-4C3B-BD3A-AFB9762449C0} TransformComponent", + "Id": 399415038452606756, + "Parent Entity": "ContainerEntity", + "Transform Data": { + "Translate": [ + -2.5305633544921875, + -0.00018183141946792603, + 79.38228607177734 + ] + } + }, + "Component_[4564240319609068082]": { + "$type": "EditorEntitySortComponent", + "Id": 4564240319609068082 + }, + "Component_[7827190074535394331]": { + "$type": "EditorMaterialComponent", + "Id": 7827190074535394331, + "Controller": { + "Configuration": { + "materials": [ + { + "Key": { + "materialSlotStableId": 2418540911 + }, + "Value": { + "MaterialAsset": { + "assetId": { + "guid": "{9187B84B-425F-5D11-B4D7-35BBDB0959D1}" + }, + "assetHint": "materials/presets/pbr/metal_palladium_matte.azmaterial" + } + } + } + ] + } + } + }, + "Component_[8092226976542590265]": { + "$type": "EditorDisabledCompositionComponent", + "Id": 8092226976542590265 + } + } + }, + "Entity_[3077660862420]": { + "Id": "Entity_[3077660862420]", + "Name": "Entity1", + "Components": { + "Component_[11525365929370623807]": { + "$type": "EditorVisibilityComponent", + "Id": 11525365929370623807 + }, + "Component_[12334620273692642550]": { + "$type": "EditorLockComponent", + "Id": 12334620273692642550 + }, + "Component_[14389735759337977675]": { + "$type": "EditorPendingCompositionComponent", + "Id": 14389735759337977675 + }, + "Component_[16184381538555246534]": { + "$type": "AZ::Render::EditorMeshComponent", + "Id": 16184381538555246534, + "Controller": { + "Configuration": { + "ModelAsset": { + "assetId": { + "guid": "{E14975EF-E676-51A4-B826-3EF59CB645AA}", + "subId": 285127096 + }, + "assetHint": "testdata/objects/cube/cube.azmodel" + } + } + } + }, + "Component_[17962478023087084794]": { + "$type": "SelectionComponent", + "Id": 17962478023087084794 + }, + "Component_[18071675051915092508]": { + "$type": "EditorEntityIconComponent", + "Id": 18071675051915092508 + }, + "Component_[2115498007879087044]": { + "$type": "EditorInspectorComponent", + "Id": 2115498007879087044, + "ComponentOrderEntryArray": [ + { + "ComponentId": 399415038452606756 + }, + { + "ComponentId": 16184381538555246534, + "SortIndex": 1 + }, + { + "ComponentId": 7827190074535394331, + "SortIndex": 2 + } + ] + }, + "Component_[3518973002096080237]": { + "$type": "EditorOnlyEntityComponent", + "Id": 3518973002096080237 + }, + "Component_[399415038452606756]": { + "$type": "{27F1E1A1-8D9D-4C3B-BD3A-AFB9762449C0} TransformComponent", + "Id": 399415038452606756, + "Parent Entity": "ContainerEntity", + "Transform Data": { + "Translate": [ + 2.5301437377929688, + -0.00018183141946792603, + 19.50924301147461 + ] + } + }, + "Component_[4564240319609068082]": { + "$type": "EditorEntitySortComponent", + "Id": 4564240319609068082 + }, + "Component_[7827190074535394331]": { + "$type": "EditorMaterialComponent", + "Id": 7827190074535394331, + "Controller": { + "Configuration": { + "materials": [ + { + "Key": { + "materialSlotStableId": 2418540911 + }, + "Value": { + "MaterialAsset": { + "assetId": { + "guid": "{60D4CA04-A2FE-5AE7-B472-694C38D05183}" + }, + "assetHint": "materials/presets/pbr/metal_platinum_matte.azmaterial" + } + } + } + ] + } + } + }, + "Component_[8092226976542590265]": { + "$type": "EditorDisabledCompositionComponent", + "Id": 8092226976542590265 + } + } + }, + "Entity_[3081955829716]": { + "Id": "Entity_[3081955829716]", + "Name": "Entity1", + "Components": { + "Component_[11525365929370623807]": { + "$type": "EditorVisibilityComponent", + "Id": 11525365929370623807 + }, + "Component_[12334620273692642550]": { + "$type": "EditorLockComponent", + "Id": 12334620273692642550 + }, + "Component_[14389735759337977675]": { + "$type": "EditorPendingCompositionComponent", + "Id": 14389735759337977675 + }, + "Component_[16184381538555246534]": { + "$type": "AZ::Render::EditorMeshComponent", + "Id": 16184381538555246534, + "Controller": { + "Configuration": { + "ModelAsset": { + "assetId": { + "guid": "{E14975EF-E676-51A4-B826-3EF59CB645AA}", + "subId": 285127096 + }, + "assetHint": "testdata/objects/cube/cube.azmodel" + } + } + } + }, + "Component_[17962478023087084794]": { + "$type": "SelectionComponent", + "Id": 17962478023087084794 + }, + "Component_[18071675051915092508]": { + "$type": "EditorEntityIconComponent", + "Id": 18071675051915092508 + }, + "Component_[2115498007879087044]": { + "$type": "EditorInspectorComponent", + "Id": 2115498007879087044, + "ComponentOrderEntryArray": [ + { + "ComponentId": 399415038452606756 + }, + { + "ComponentId": 16184381538555246534, + "SortIndex": 1 + }, + { + "ComponentId": 7827190074535394331, + "SortIndex": 2 + } + ] + }, + "Component_[3518973002096080237]": { + "$type": "EditorOnlyEntityComponent", + "Id": 3518973002096080237 + }, + "Component_[399415038452606756]": { + "$type": "{27F1E1A1-8D9D-4C3B-BD3A-AFB9762449C0} TransformComponent", + "Id": 399415038452606756, + "Parent Entity": "ContainerEntity", + "Transform Data": { + "Translate": [ + -12.530563354492188, + -0.00018183141946792603, + 30.08451271057129 + ] + } + }, + "Component_[4564240319609068082]": { + "$type": "EditorEntitySortComponent", + "Id": 4564240319609068082 + }, + "Component_[7827190074535394331]": { + "$type": "EditorMaterialComponent", + "Id": 7827190074535394331, + "Controller": { + "Configuration": { + "materials": [ + { + "Key": { + "materialSlotStableId": 2418540911 + }, + "Value": { + "MaterialAsset": { + "assetId": { + "guid": "{F2AD0EBF-7137-58D1-9991-9552FAD41B19}" + }, + "assetHint": "materials/presets/pbr/metal_mercury.azmaterial" + } + } + } + ] + } + } + }, + "Component_[8092226976542590265]": { + "$type": "EditorDisabledCompositionComponent", + "Id": 8092226976542590265 + } + } + }, + "Entity_[3086250797012]": { + "Id": "Entity_[3086250797012]", + "Name": "Entity1", + "Components": { + "Component_[11525365929370623807]": { + "$type": "EditorVisibilityComponent", + "Id": 11525365929370623807 + }, + "Component_[12334620273692642550]": { + "$type": "EditorLockComponent", + "Id": 12334620273692642550 + }, + "Component_[14389735759337977675]": { + "$type": "EditorPendingCompositionComponent", + "Id": 14389735759337977675 + }, + "Component_[16184381538555246534]": { + "$type": "AZ::Render::EditorMeshComponent", + "Id": 16184381538555246534, + "Controller": { + "Configuration": { + "ModelAsset": { + "assetId": { + "guid": "{E14975EF-E676-51A4-B826-3EF59CB645AA}", + "subId": 285127096 + }, + "assetHint": "testdata/objects/cube/cube.azmodel" + } + } + } + }, + "Component_[17962478023087084794]": { + "$type": "SelectionComponent", + "Id": 17962478023087084794 + }, + "Component_[18071675051915092508]": { + "$type": "EditorEntityIconComponent", + "Id": 18071675051915092508 + }, + "Component_[2115498007879087044]": { + "$type": "EditorInspectorComponent", + "Id": 2115498007879087044, + "ComponentOrderEntryArray": [ + { + "ComponentId": 399415038452606756 + }, + { + "ComponentId": 16184381538555246534, + "SortIndex": 1 + }, + { + "ComponentId": 7827190074535394331, + "SortIndex": 2 + } + ] + }, + "Component_[3518973002096080237]": { + "$type": "EditorOnlyEntityComponent", + "Id": 3518973002096080237 + }, + "Component_[399415038452606756]": { + "$type": "{27F1E1A1-8D9D-4C3B-BD3A-AFB9762449C0} TransformComponent", + "Id": 399415038452606756, + "Parent Entity": "ContainerEntity", + "Transform Data": { + "Translate": [ + -47.53056335449219, + -0.00018183141946792603, + 0.0 + ] + } + }, + "Component_[4564240319609068082]": { + "$type": "EditorEntitySortComponent", + "Id": 4564240319609068082 + }, + "Component_[7827190074535394331]": { + "$type": "EditorMaterialComponent", + "Id": 7827190074535394331, + "Controller": { + "Configuration": { + "materials": [ + { + "Key": { + "materialSlotStableId": 2418540911 + }, + "Value": { + "MaterialAsset": { + "assetId": { + "guid": "{64C1F6A6-6BDA-551A-BE56-1829E5913278}" + }, + "assetHint": "materials/presets/pbr/metal_aluminum_polished.azmaterial" + } + } + } + ] + } + } + }, + "Component_[8092226976542590265]": { + "$type": "EditorDisabledCompositionComponent", + "Id": 8092226976542590265 + } + } + }, + "Entity_[3090545764308]": { + "Id": "Entity_[3090545764308]", + "Name": "Entity1", + "Components": { + "Component_[11525365929370623807]": { + "$type": "EditorVisibilityComponent", + "Id": 11525365929370623807 + }, + "Component_[12334620273692642550]": { + "$type": "EditorLockComponent", + "Id": 12334620273692642550 + }, + "Component_[14389735759337977675]": { + "$type": "EditorPendingCompositionComponent", + "Id": 14389735759337977675 + }, + "Component_[16184381538555246534]": { + "$type": "AZ::Render::EditorMeshComponent", + "Id": 16184381538555246534, + "Controller": { + "Configuration": { + "ModelAsset": { + "assetId": { + "guid": "{E14975EF-E676-51A4-B826-3EF59CB645AA}", + "subId": 285127096 + }, + "assetHint": "testdata/objects/cube/cube.azmodel" + } + } + } + }, + "Component_[17962478023087084794]": { + "$type": "SelectionComponent", + "Id": 17962478023087084794 + }, + "Component_[18071675051915092508]": { + "$type": "EditorEntityIconComponent", + "Id": 18071675051915092508 + }, + "Component_[2115498007879087044]": { + "$type": "EditorInspectorComponent", + "Id": 2115498007879087044, + "ComponentOrderEntryArray": [ + { + "ComponentId": 399415038452606756 + }, + { + "ComponentId": 16184381538555246534, + "SortIndex": 1 + }, + { + "ComponentId": 7827190074535394331, + "SortIndex": 2 + } + ] + }, + "Component_[3518973002096080237]": { + "$type": "EditorOnlyEntityComponent", + "Id": 3518973002096080237 + }, + "Component_[399415038452606756]": { + "$type": "{27F1E1A1-8D9D-4C3B-BD3A-AFB9762449C0} TransformComponent", + "Id": 399415038452606756, + "Parent Entity": "ContainerEntity", + "Transform Data": { + "Translate": [ + 32.53014373779297, + -0.00018183141946792603, + 64.32462310791016 + ] + } + }, + "Component_[4564240319609068082]": { + "$type": "EditorEntitySortComponent", + "Id": 4564240319609068082 + }, + "Component_[7827190074535394331]": { + "$type": "EditorMaterialComponent", + "Id": 7827190074535394331, + "Controller": { + "Configuration": { + "materials": [ + { + "Key": { + "materialSlotStableId": 2418540911 + }, + "Value": { + "MaterialAsset": { + "assetId": { + "guid": "{C60A39AF-BB76-51BD-9468-A88C9A6F78D7}" + }, + "assetHint": "materials/presets/pbr/metal_cobalt_matte.azmaterial" + } + } + } + ] + } + } + }, + "Component_[8092226976542590265]": { + "$type": "EditorDisabledCompositionComponent", + "Id": 8092226976542590265 + } + } + }, + "Entity_[3094840731604]": { + "Id": "Entity_[3094840731604]", + "Name": "Entity1", + "Components": { + "Component_[11525365929370623807]": { + "$type": "EditorVisibilityComponent", + "Id": 11525365929370623807 + }, + "Component_[12334620273692642550]": { + "$type": "EditorLockComponent", + "Id": 12334620273692642550 + }, + "Component_[14389735759337977675]": { + "$type": "EditorPendingCompositionComponent", + "Id": 14389735759337977675 + }, + "Component_[16184381538555246534]": { + "$type": "AZ::Render::EditorMeshComponent", + "Id": 16184381538555246534, + "Controller": { + "Configuration": { + "ModelAsset": { + "assetId": { + "guid": "{E14975EF-E676-51A4-B826-3EF59CB645AA}", + "subId": 285127096 + }, + "assetHint": "testdata/objects/cube/cube.azmodel" + } + } + } + }, + "Component_[17962478023087084794]": { + "$type": "SelectionComponent", + "Id": 17962478023087084794 + }, + "Component_[18071675051915092508]": { + "$type": "EditorEntityIconComponent", + "Id": 18071675051915092508 + }, + "Component_[2115498007879087044]": { + "$type": "EditorInspectorComponent", + "Id": 2115498007879087044, + "ComponentOrderEntryArray": [ + { + "ComponentId": 399415038452606756 + }, + { + "ComponentId": 16184381538555246534, + "SortIndex": 1 + }, + { + "ComponentId": 7827190074535394331, + "SortIndex": 2 + } + ] + }, + "Component_[3518973002096080237]": { + "$type": "EditorOnlyEntityComponent", + "Id": 3518973002096080237 + }, + "Component_[399415038452606756]": { + "$type": "{27F1E1A1-8D9D-4C3B-BD3A-AFB9762449C0} TransformComponent", + "Id": 399415038452606756, + "Parent Entity": "ContainerEntity", + "Transform Data": { + "Translate": [ + -27.530563354492188, + -0.00018183141946792603, + 74.93071746826172 + ] + } + }, + "Component_[4564240319609068082]": { + "$type": "EditorEntitySortComponent", + "Id": 4564240319609068082 + }, + "Component_[7827190074535394331]": { + "$type": "EditorMaterialComponent", + "Id": 7827190074535394331, + "Controller": { + "Configuration": { + "materials": [ + { + "Key": { + "materialSlotStableId": 2418540911 + }, + "Value": { + "MaterialAsset": { + "assetId": { + "guid": "{CF5C7B01-4912-58AE-991A-F25251E505AC}" + }, + "assetHint": "materials/presets/pbr/metal_copper_polished.azmaterial" + } + } + } + ] + } + } + }, + "Component_[8092226976542590265]": { + "$type": "EditorDisabledCompositionComponent", + "Id": 8092226976542590265 + } + } + }, + "Entity_[3099135698900]": { + "Id": "Entity_[3099135698900]", + "Name": "Entity1", + "Components": { + "Component_[11525365929370623807]": { + "$type": "EditorVisibilityComponent", + "Id": 11525365929370623807 + }, + "Component_[12334620273692642550]": { + "$type": "EditorLockComponent", + "Id": 12334620273692642550 + }, + "Component_[14389735759337977675]": { + "$type": "EditorPendingCompositionComponent", + "Id": 14389735759337977675 + }, + "Component_[16184381538555246534]": { + "$type": "AZ::Render::EditorMeshComponent", + "Id": 16184381538555246534, + "Controller": { + "Configuration": { + "ModelAsset": { + "assetId": { + "guid": "{E14975EF-E676-51A4-B826-3EF59CB645AA}", + "subId": 285127096 + }, + "assetHint": "testdata/objects/cube/cube.azmodel" + } + } + } + }, + "Component_[17962478023087084794]": { + "$type": "SelectionComponent", + "Id": 17962478023087084794 + }, + "Component_[18071675051915092508]": { + "$type": "EditorEntityIconComponent", + "Id": 18071675051915092508 + }, + "Component_[2115498007879087044]": { + "$type": "EditorInspectorComponent", + "Id": 2115498007879087044, + "ComponentOrderEntryArray": [ + { + "ComponentId": 399415038452606756 + }, + { + "ComponentId": 16184381538555246534, + "SortIndex": 1 + }, + { + "ComponentId": 7827190074535394331, + "SortIndex": 2 + } + ] + }, + "Component_[3518973002096080237]": { + "$type": "EditorOnlyEntityComponent", + "Id": 3518973002096080237 + }, + "Component_[399415038452606756]": { + "$type": "{27F1E1A1-8D9D-4C3B-BD3A-AFB9762449C0} TransformComponent", + "Id": 399415038452606756, + "Parent Entity": "ContainerEntity", + "Transform Data": { + "Translate": [ + -17.530563354492188, + -0.00018183141946792603, + 74.93071746826172 + ] + } + }, + "Component_[4564240319609068082]": { + "$type": "EditorEntitySortComponent", + "Id": 4564240319609068082 + }, + "Component_[7827190074535394331]": { + "$type": "EditorMaterialComponent", + "Id": 7827190074535394331, + "Controller": { + "Configuration": { + "materials": [ + { + "Key": { + "materialSlotStableId": 2418540911 + }, + "Value": { + "MaterialAsset": { + "assetId": { + "guid": "{A7F03135-ECAD-5440-99DB-E84ABA3D50DA}" + }, + "assetHint": "materials/presets/pbr/metal_iron_polished.azmaterial" + } + } + } + ] + } + } + }, + "Component_[8092226976542590265]": { + "$type": "EditorDisabledCompositionComponent", + "Id": 8092226976542590265 + } + } + }, + "Entity_[3103430666196]": { + "Id": "Entity_[3103430666196]", + "Name": "Entity1", + "Components": { + "Component_[11525365929370623807]": { + "$type": "EditorVisibilityComponent", + "Id": 11525365929370623807 + }, + "Component_[12334620273692642550]": { + "$type": "EditorLockComponent", + "Id": 12334620273692642550 + }, + "Component_[14389735759337977675]": { + "$type": "EditorPendingCompositionComponent", + "Id": 14389735759337977675 + }, + "Component_[16184381538555246534]": { + "$type": "AZ::Render::EditorMeshComponent", + "Id": 16184381538555246534, + "Controller": { + "Configuration": { + "ModelAsset": { + "assetId": { + "guid": "{E14975EF-E676-51A4-B826-3EF59CB645AA}", + "subId": 285127096 + }, + "assetHint": "testdata/objects/cube/cube.azmodel" + } + } + } + }, + "Component_[17962478023087084794]": { + "$type": "SelectionComponent", + "Id": 17962478023087084794 + }, + "Component_[18071675051915092508]": { + "$type": "EditorEntityIconComponent", + "Id": 18071675051915092508 + }, + "Component_[2115498007879087044]": { + "$type": "EditorInspectorComponent", + "Id": 2115498007879087044, + "ComponentOrderEntryArray": [ + { + "ComponentId": 399415038452606756 + }, + { + "ComponentId": 16184381538555246534, + "SortIndex": 1 + }, + { + "ComponentId": 7827190074535394331, + "SortIndex": 2 + } + ] + }, + "Component_[3518973002096080237]": { + "$type": "EditorOnlyEntityComponent", + "Id": 3518973002096080237 + }, + "Component_[399415038452606756]": { + "$type": "{27F1E1A1-8D9D-4C3B-BD3A-AFB9762449C0} TransformComponent", + "Id": 399415038452606756, + "Parent Entity": "ContainerEntity", + "Transform Data": { + "Translate": [ + -47.53056335449219, + -0.00018183141946792603, + 4.451573371887207 + ] + } + }, + "Component_[4564240319609068082]": { + "$type": "EditorEntitySortComponent", + "Id": 4564240319609068082 + }, + "Component_[7827190074535394331]": { + "$type": "EditorMaterialComponent", + "Id": 7827190074535394331, + "Controller": { + "Configuration": { + "materials": [ + { + "Key": { + "materialSlotStableId": 2418540911 + }, + "Value": { + "MaterialAsset": { + "assetId": { + "guid": "{549D26B8-881D-569F-AF05-961F36A43F4F}" + }, + "assetHint": "materials/presets/pbr/metal_aluminum_matte.azmaterial" + } + } + } + ] + } + } + }, + "Component_[8092226976542590265]": { + "$type": "EditorDisabledCompositionComponent", + "Id": 8092226976542590265 + } + } + }, + "Entity_[3107725633492]": { + "Id": "Entity_[3107725633492]", + "Name": "Entity1", + "Components": { + "Component_[11525365929370623807]": { + "$type": "EditorVisibilityComponent", + "Id": 11525365929370623807 + }, + "Component_[12334620273692642550]": { + "$type": "EditorLockComponent", + "Id": 12334620273692642550 + }, + "Component_[14389735759337977675]": { + "$type": "EditorPendingCompositionComponent", + "Id": 14389735759337977675 + }, + "Component_[16184381538555246534]": { + "$type": "AZ::Render::EditorMeshComponent", + "Id": 16184381538555246534, + "Controller": { + "Configuration": { + "ModelAsset": { + "assetId": { + "guid": "{E14975EF-E676-51A4-B826-3EF59CB645AA}", + "subId": 285127096 + }, + "assetHint": "testdata/objects/cube/cube.azmodel" + } + } + } + }, + "Component_[17962478023087084794]": { + "$type": "SelectionComponent", + "Id": 17962478023087084794 + }, + "Component_[18071675051915092508]": { + "$type": "EditorEntityIconComponent", + "Id": 18071675051915092508 + }, + "Component_[2115498007879087044]": { + "$type": "EditorInspectorComponent", + "Id": 2115498007879087044, + "ComponentOrderEntryArray": [ + { + "ComponentId": 399415038452606756 + }, + { + "ComponentId": 16184381538555246534, + "SortIndex": 1 + }, + { + "ComponentId": 7827190074535394331, + "SortIndex": 2 + } + ] + }, + "Component_[3518973002096080237]": { + "$type": "EditorOnlyEntityComponent", + "Id": 3518973002096080237 + }, + "Component_[399415038452606756]": { + "$type": "{27F1E1A1-8D9D-4C3B-BD3A-AFB9762449C0} TransformComponent", + "Id": 399415038452606756, + "Parent Entity": "ContainerEntity", + "Transform Data": { + "Translate": [ + 37.53014373779297, + -0.00018183141946792603, + 45.14218521118164 + ] + } + }, + "Component_[4564240319609068082]": { + "$type": "EditorEntitySortComponent", + "Id": 4564240319609068082 + }, + "Component_[7827190074535394331]": { + "$type": "EditorMaterialComponent", + "Id": 7827190074535394331, + "Controller": { + "Configuration": { + "materials": [ + { + "Key": { + "materialSlotStableId": 2418540911 + }, + "Value": { + "MaterialAsset": { + "assetId": { + "guid": "{CF5C7B01-4912-58AE-991A-F25251E505AC}" + }, + "assetHint": "materials/presets/pbr/metal_copper_polished.azmaterial" + } + } + } + ] + } + } + }, + "Component_[8092226976542590265]": { + "$type": "EditorDisabledCompositionComponent", + "Id": 8092226976542590265 + } + } + }, + "Entity_[3112020600788]": { + "Id": "Entity_[3112020600788]", + "Name": "Entity1", + "Components": { + "Component_[11525365929370623807]": { + "$type": "EditorVisibilityComponent", + "Id": 11525365929370623807 + }, + "Component_[12334620273692642550]": { + "$type": "EditorLockComponent", + "Id": 12334620273692642550 + }, + "Component_[14389735759337977675]": { + "$type": "EditorPendingCompositionComponent", + "Id": 14389735759337977675 + }, + "Component_[16184381538555246534]": { + "$type": "AZ::Render::EditorMeshComponent", + "Id": 16184381538555246534, + "Controller": { + "Configuration": { + "ModelAsset": { + "assetId": { + "guid": "{E14975EF-E676-51A4-B826-3EF59CB645AA}", + "subId": 285127096 + }, + "assetHint": "testdata/objects/cube/cube.azmodel" + } + } + } + }, + "Component_[17962478023087084794]": { + "$type": "SelectionComponent", + "Id": 17962478023087084794 + }, + "Component_[18071675051915092508]": { + "$type": "EditorEntityIconComponent", + "Id": 18071675051915092508 + }, + "Component_[2115498007879087044]": { + "$type": "EditorInspectorComponent", + "Id": 2115498007879087044, + "ComponentOrderEntryArray": [ + { + "ComponentId": 399415038452606756 + }, + { + "ComponentId": 16184381538555246534, + "SortIndex": 1 + }, + { + "ComponentId": 7827190074535394331, + "SortIndex": 2 + } + ] + }, + "Component_[3518973002096080237]": { + "$type": "EditorOnlyEntityComponent", + "Id": 3518973002096080237 + }, + "Component_[399415038452606756]": { + "$type": "{27F1E1A1-8D9D-4C3B-BD3A-AFB9762449C0} TransformComponent", + "Id": 399415038452606756, + "Parent Entity": "ContainerEntity", + "Transform Data": { + "Translate": [ + -22.530563354492188, + -0.00018183141946792603, + 19.50924301147461 + ] + } + }, + "Component_[4564240319609068082]": { + "$type": "EditorEntitySortComponent", + "Id": 4564240319609068082 + }, + "Component_[7827190074535394331]": { + "$type": "EditorMaterialComponent", + "Id": 7827190074535394331, + "Controller": { + "Configuration": { + "materials": [ + { + "Key": { + "materialSlotStableId": 2418540911 + }, + "Value": { + "MaterialAsset": { + "assetId": { + "guid": "{5BC13D95-377E-53EA-9A93-156384BE8B04}" + }, + "assetHint": "materials/presets/pbr/metal_gold_matte.azmaterial" + } + } + } + ] + } + } + }, + "Component_[8092226976542590265]": { + "$type": "EditorDisabledCompositionComponent", + "Id": 8092226976542590265 + } + } + }, + "Entity_[3116315568084]": { + "Id": "Entity_[3116315568084]", + "Name": "Entity1", + "Components": { + "Component_[11525365929370623807]": { + "$type": "EditorVisibilityComponent", + "Id": 11525365929370623807 + }, + "Component_[12334620273692642550]": { + "$type": "EditorLockComponent", + "Id": 12334620273692642550 + }, + "Component_[14389735759337977675]": { + "$type": "EditorPendingCompositionComponent", + "Id": 14389735759337977675 + }, + "Component_[16184381538555246534]": { + "$type": "AZ::Render::EditorMeshComponent", + "Id": 16184381538555246534, + "Controller": { + "Configuration": { + "ModelAsset": { + "assetId": { + "guid": "{E14975EF-E676-51A4-B826-3EF59CB645AA}", + "subId": 285127096 + }, + "assetHint": "testdata/objects/cube/cube.azmodel" + } + } + } + }, + "Component_[17962478023087084794]": { + "$type": "SelectionComponent", + "Id": 17962478023087084794 + }, + "Component_[18071675051915092508]": { + "$type": "EditorEntityIconComponent", + "Id": 18071675051915092508 + }, + "Component_[2115498007879087044]": { + "$type": "EditorInspectorComponent", + "Id": 2115498007879087044, + "ComponentOrderEntryArray": [ + { + "ComponentId": 399415038452606756 + }, + { + "ComponentId": 16184381538555246534, + "SortIndex": 1 + }, + { + "ComponentId": 7827190074535394331, + "SortIndex": 2 + } + ] + }, + "Component_[3518973002096080237]": { + "$type": "EditorOnlyEntityComponent", + "Id": 3518973002096080237 + }, + "Component_[399415038452606756]": { + "$type": "{27F1E1A1-8D9D-4C3B-BD3A-AFB9762449C0} TransformComponent", + "Id": 399415038452606756, + "Parent Entity": "ContainerEntity", + "Transform Data": { + "Translate": [ + -37.53056335449219, + -0.00018183141946792603, + 94.40913391113281 + ] + } + }, + "Component_[4564240319609068082]": { + "$type": "EditorEntitySortComponent", + "Id": 4564240319609068082 + }, + "Component_[7827190074535394331]": { + "$type": "EditorMaterialComponent", + "Id": 7827190074535394331, + "Controller": { + "Configuration": { + "materials": [ + { + "Key": { + "materialSlotStableId": 2418540911 + }, + "Value": { + "MaterialAsset": { + "assetId": { + "guid": "{A78EA2FC-688B-5E3A-A7F6-DB413D11D4CF}" + }, + "assetHint": "materials/presets/pbr/metal_chrome_matte.azmaterial" + } + } + } + ] + } + } + }, + "Component_[8092226976542590265]": { + "$type": "EditorDisabledCompositionComponent", + "Id": 8092226976542590265 + } + } + }, + "Entity_[3120610535380]": { + "Id": "Entity_[3120610535380]", + "Name": "Entity1", + "Components": { + "Component_[1057179753323467068]": { + "$type": "EditorMaterialComponent", + "Id": 1057179753323467068, + "Controller": { + "Configuration": { + "materials": [ + { + "Key": { + "materialSlotStableId": 2418540911 + }, + "Value": { + "MaterialAsset": { + "assetId": { + "guid": "{A3F3CD98-1634-5542-AD5A-78E91BE21AE9}" + }, + "assetHint": "materials/presets/pbr/metal_titanium_matte.azmaterial" + } + } + } + ] + } + } + }, + "Component_[11525365929370623807]": { + "$type": "EditorVisibilityComponent", + "Id": 11525365929370623807 + }, + "Component_[12334620273692642550]": { + "$type": "EditorLockComponent", + "Id": 12334620273692642550 + }, + "Component_[14389735759337977675]": { + "$type": "EditorPendingCompositionComponent", + "Id": 14389735759337977675 + }, + "Component_[16184381538555246534]": { + "$type": "AZ::Render::EditorMeshComponent", + "Id": 16184381538555246534, + "Controller": { + "Configuration": { + "ModelAsset": { + "assetId": { + "guid": "{E14975EF-E676-51A4-B826-3EF59CB645AA}", + "subId": 285127096 + }, + "assetHint": "testdata/objects/cube/cube.azmodel" + } + } + } + }, + "Component_[17962478023087084794]": { + "$type": "SelectionComponent", + "Id": 17962478023087084794 + }, + "Component_[18071675051915092508]": { + "$type": "EditorEntityIconComponent", + "Id": 18071675051915092508 + }, + "Component_[2115498007879087044]": { + "$type": "EditorInspectorComponent", + "Id": 2115498007879087044, + "ComponentOrderEntryArray": [ + { + "ComponentId": 399415038452606756 + }, + { + "ComponentId": 16184381538555246534, + "SortIndex": 1 + }, + { + "ComponentId": 1057179753323467068, + "SortIndex": 2 + } + ] + }, + "Component_[3518973002096080237]": { + "$type": "EditorOnlyEntityComponent", + "Id": 3518973002096080237 + }, + "Component_[399415038452606756]": { + "$type": "{27F1E1A1-8D9D-4C3B-BD3A-AFB9762449C0} TransformComponent", + "Id": 399415038452606756, + "Parent Entity": "ContainerEntity", + "Transform Data": { + "Translate": [ + 12.530143737792969, + -0.00018183141946792603, + 94.40913391113281 + ] + } + }, + "Component_[4564240319609068082]": { + "$type": "EditorEntitySortComponent", + "Id": 4564240319609068082 + }, + "Component_[8092226976542590265]": { + "$type": "EditorDisabledCompositionComponent", + "Id": 8092226976542590265 + } + } + }, + "Entity_[3124905502676]": { + "Id": "Entity_[3124905502676]", + "Name": "Entity1", + "Components": { + "Component_[11525365929370623807]": { + "$type": "EditorVisibilityComponent", + "Id": 11525365929370623807 + }, + "Component_[12334620273692642550]": { + "$type": "EditorLockComponent", + "Id": 12334620273692642550 + }, + "Component_[14389735759337977675]": { + "$type": "EditorPendingCompositionComponent", + "Id": 14389735759337977675 + }, + "Component_[16184381538555246534]": { + "$type": "AZ::Render::EditorMeshComponent", + "Id": 16184381538555246534, + "Controller": { + "Configuration": { + "ModelAsset": { + "assetId": { + "guid": "{E14975EF-E676-51A4-B826-3EF59CB645AA}", + "subId": 285127096 + }, + "assetHint": "testdata/objects/cube/cube.azmodel" + } + } + } + }, + "Component_[17962478023087084794]": { + "$type": "SelectionComponent", + "Id": 17962478023087084794 + }, + "Component_[18071675051915092508]": { + "$type": "EditorEntityIconComponent", + "Id": 18071675051915092508 + }, + "Component_[2115498007879087044]": { + "$type": "EditorInspectorComponent", + "Id": 2115498007879087044, + "ComponentOrderEntryArray": [ + { + "ComponentId": 399415038452606756 + }, + { + "ComponentId": 16184381538555246534, + "SortIndex": 1 + }, + { + "ComponentId": 7827190074535394331, + "SortIndex": 2 + } + ] + }, + "Component_[3518973002096080237]": { + "$type": "EditorOnlyEntityComponent", + "Id": 3518973002096080237 + }, + "Component_[399415038452606756]": { + "$type": "{27F1E1A1-8D9D-4C3B-BD3A-AFB9762449C0} TransformComponent", + "Id": 399415038452606756, + "Parent Entity": "ContainerEntity", + "Transform Data": { + "Translate": [ + 17.53014373779297, + -0.00018183141946792603, + 114.4910659790039 + ] + } + }, + "Component_[4564240319609068082]": { + "$type": "EditorEntitySortComponent", + "Id": 4564240319609068082 + }, + "Component_[7827190074535394331]": { + "$type": "EditorMaterialComponent", + "Id": 7827190074535394331, + "Controller": { + "Configuration": { + "materials": [ + { + "Key": {}, + "Value": { + "MaterialAsset": { + "assetId": { + "guid": "{721188E0-B7CC-5D06-8D5D-39AF8ABF2EF9}" + }, + "assetHint": "materials/presets/pbr/metal_titanium.azmaterial" + } + } + }, + { + "Key": { + "materialSlotStableId": 2418540911 + }, + "Value": { + "MaterialAsset": { + "assetId": { + "guid": "{94CF2BD7-7D09-5577-B1D8-3FF85B15E127}" + }, + "assetHint": "materials/presets/pbr/metal_aluminum.azmaterial" + } + } + } + ] + } + } + }, + "Component_[8092226976542590265]": { + "$type": "EditorDisabledCompositionComponent", + "Id": 8092226976542590265 + } + } + }, + "Entity_[3129200469972]": { + "Id": "Entity_[3129200469972]", + "Name": "Entity1", + "Components": { + "Component_[11525365929370623807]": { + "$type": "EditorVisibilityComponent", + "Id": 11525365929370623807 + }, + "Component_[12334620273692642550]": { + "$type": "EditorLockComponent", + "Id": 12334620273692642550 + }, + "Component_[14389735759337977675]": { + "$type": "EditorPendingCompositionComponent", + "Id": 14389735759337977675 + }, + "Component_[16184381538555246534]": { + "$type": "AZ::Render::EditorMeshComponent", + "Id": 16184381538555246534, + "Controller": { + "Configuration": { + "ModelAsset": { + "assetId": { + "guid": "{E14975EF-E676-51A4-B826-3EF59CB645AA}", + "subId": 285127096 + }, + "assetHint": "testdata/objects/cube/cube.azmodel" + } + } + } + }, + "Component_[17962478023087084794]": { + "$type": "SelectionComponent", + "Id": 17962478023087084794 + }, + "Component_[18071675051915092508]": { + "$type": "EditorEntityIconComponent", + "Id": 18071675051915092508 + }, + "Component_[2115498007879087044]": { + "$type": "EditorInspectorComponent", + "Id": 2115498007879087044, + "ComponentOrderEntryArray": [ + { + "ComponentId": 399415038452606756 + }, + { + "ComponentId": 16184381538555246534, + "SortIndex": 1 + }, + { + "ComponentId": 7827190074535394331, + "SortIndex": 2 + } + ] + }, + "Component_[3518973002096080237]": { + "$type": "EditorOnlyEntityComponent", + "Id": 3518973002096080237 + }, + "Component_[399415038452606756]": { + "$type": "{27F1E1A1-8D9D-4C3B-BD3A-AFB9762449C0} TransformComponent", + "Id": 399415038452606756, + "Parent Entity": "ContainerEntity", + "Transform Data": { + "Translate": [ + 27.53014373779297, + -0.00018183141946792603, + 15.057670593261719 + ] + } + }, + "Component_[4564240319609068082]": { + "$type": "EditorEntitySortComponent", + "Id": 4564240319609068082 + }, + "Component_[7827190074535394331]": { + "$type": "EditorMaterialComponent", + "Id": 7827190074535394331, + "Controller": { + "Configuration": { + "materials": [ + { + "Key": { + "materialSlotStableId": 2418540911 + }, + "Value": { + "MaterialAsset": { + "assetId": { + "guid": "{CAF50181-3384-5DF2-9304-C6E48E83C72D}" + }, + "assetHint": "materials/presets/pbr/metal_chrome_polished.azmaterial" + } + } + } + ] + } + } + }, + "Component_[8092226976542590265]": { + "$type": "EditorDisabledCompositionComponent", + "Id": 8092226976542590265 + } + } + }, + "Entity_[3133495437268]": { + "Id": "Entity_[3133495437268]", + "Name": "Entity1", + "Components": { + "Component_[11525365929370623807]": { + "$type": "EditorVisibilityComponent", + "Id": 11525365929370623807 + }, + "Component_[12334620273692642550]": { + "$type": "EditorLockComponent", + "Id": 12334620273692642550 + }, + "Component_[14389735759337977675]": { + "$type": "EditorPendingCompositionComponent", + "Id": 14389735759337977675 + }, + "Component_[16184381538555246534]": { + "$type": "AZ::Render::EditorMeshComponent", + "Id": 16184381538555246534, + "Controller": { + "Configuration": { + "ModelAsset": { + "assetId": { + "guid": "{E14975EF-E676-51A4-B826-3EF59CB645AA}", + "subId": 285127096 + }, + "assetHint": "testdata/objects/cube/cube.azmodel" + } + } + } + }, + "Component_[17962478023087084794]": { + "$type": "SelectionComponent", + "Id": 17962478023087084794 + }, + "Component_[18071675051915092508]": { + "$type": "EditorEntityIconComponent", + "Id": 18071675051915092508 + }, + "Component_[2115498007879087044]": { + "$type": "EditorInspectorComponent", + "Id": 2115498007879087044, + "ComponentOrderEntryArray": [ + { + "ComponentId": 399415038452606756 + }, + { + "ComponentId": 16184381538555246534, + "SortIndex": 1 + }, + { + "ComponentId": 7827190074535394331, + "SortIndex": 2 + } + ] + }, + "Component_[3518973002096080237]": { + "$type": "EditorOnlyEntityComponent", + "Id": 3518973002096080237 + }, + "Component_[399415038452606756]": { + "$type": "{27F1E1A1-8D9D-4C3B-BD3A-AFB9762449C0} TransformComponent", + "Id": 399415038452606756, + "Parent Entity": "ContainerEntity", + "Transform Data": { + "Translate": [ + -47.53056335449219, + -0.00018183141946792603, + 9.475835800170898 + ] + } + }, + "Component_[4564240319609068082]": { + "$type": "EditorEntitySortComponent", + "Id": 4564240319609068082 + }, + "Component_[7827190074535394331]": { + "$type": "EditorMaterialComponent", + "Id": 7827190074535394331, + "Controller": { + "Configuration": { + "materials": [ + { + "Key": { + "materialSlotStableId": 2418540911 + }, + "Value": { + "MaterialAsset": { + "assetId": { + "guid": "{94CF2BD7-7D09-5577-B1D8-3FF85B15E127}" + }, + "assetHint": "materials/presets/pbr/metal_aluminum.azmaterial" + } + } + } + ] + } + } + }, + "Component_[8092226976542590265]": { + "$type": "EditorDisabledCompositionComponent", + "Id": 8092226976542590265 + } + } + }, + "Entity_[3137790404564]": { + "Id": "Entity_[3137790404564]", + "Name": "Entity1", + "Components": { + "Component_[11525365929370623807]": { + "$type": "EditorVisibilityComponent", + "Id": 11525365929370623807 + }, + "Component_[12334620273692642550]": { + "$type": "EditorLockComponent", + "Id": 12334620273692642550 + }, + "Component_[14389735759337977675]": { + "$type": "EditorPendingCompositionComponent", + "Id": 14389735759337977675 + }, + "Component_[16184381538555246534]": { + "$type": "AZ::Render::EditorMeshComponent", + "Id": 16184381538555246534, + "Controller": { + "Configuration": { + "ModelAsset": { + "assetId": { + "guid": "{E14975EF-E676-51A4-B826-3EF59CB645AA}", + "subId": 285127096 + }, + "assetHint": "testdata/objects/cube/cube.azmodel" + } + } + } + }, + "Component_[17962478023087084794]": { + "$type": "SelectionComponent", + "Id": 17962478023087084794 + }, + "Component_[18071675051915092508]": { + "$type": "EditorEntityIconComponent", + "Id": 18071675051915092508 + }, + "Component_[2115498007879087044]": { + "$type": "EditorInspectorComponent", + "Id": 2115498007879087044, + "ComponentOrderEntryArray": [ + { + "ComponentId": 399415038452606756 + }, + { + "ComponentId": 16184381538555246534, + "SortIndex": 1 + }, + { + "ComponentId": 7827190074535394331, + "SortIndex": 2 + } + ] + }, + "Component_[3518973002096080237]": { + "$type": "EditorOnlyEntityComponent", + "Id": 3518973002096080237 + }, + "Component_[399415038452606756]": { + "$type": "{27F1E1A1-8D9D-4C3B-BD3A-AFB9762449C0} TransformComponent", + "Id": 399415038452606756, + "Parent Entity": "ContainerEntity", + "Transform Data": { + "Translate": [ + -32.53056335449219, + -0.00018183141946792603, + 4.451573371887207 + ] + } + }, + "Component_[4564240319609068082]": { + "$type": "EditorEntitySortComponent", + "Id": 4564240319609068082 + }, + "Component_[7827190074535394331]": { + "$type": "EditorMaterialComponent", + "Id": 7827190074535394331, + "Controller": { + "Configuration": { + "materials": [ + { + "Key": { + "materialSlotStableId": 2418540911 + }, + "Value": { + "MaterialAsset": { + "assetId": { + "guid": "{C60A39AF-BB76-51BD-9468-A88C9A6F78D7}" + }, + "assetHint": "materials/presets/pbr/metal_cobalt_matte.azmaterial" + } + } + } + ] + } + } + }, + "Component_[8092226976542590265]": { + "$type": "EditorDisabledCompositionComponent", + "Id": 8092226976542590265 + } + } + }, + "Entity_[3142085371860]": { + "Id": "Entity_[3142085371860]", + "Name": "Entity1", + "Components": { + "Component_[11525365929370623807]": { + "$type": "EditorVisibilityComponent", + "Id": 11525365929370623807 + }, + "Component_[12334620273692642550]": { + "$type": "EditorLockComponent", + "Id": 12334620273692642550 + }, + "Component_[14389735759337977675]": { + "$type": "EditorPendingCompositionComponent", + "Id": 14389735759337977675 + }, + "Component_[16184381538555246534]": { + "$type": "AZ::Render::EditorMeshComponent", + "Id": 16184381538555246534, + "Controller": { + "Configuration": { + "ModelAsset": { + "assetId": { + "guid": "{E14975EF-E676-51A4-B826-3EF59CB645AA}", + "subId": 285127096 + }, + "assetHint": "testdata/objects/cube/cube.azmodel" + } + } + } + }, + "Component_[17962478023087084794]": { + "$type": "SelectionComponent", + "Id": 17962478023087084794 + }, + "Component_[18071675051915092508]": { + "$type": "EditorEntityIconComponent", + "Id": 18071675051915092508 + }, + "Component_[2115498007879087044]": { + "$type": "EditorInspectorComponent", + "Id": 2115498007879087044, + "ComponentOrderEntryArray": [ + { + "ComponentId": 399415038452606756 + }, + { + "ComponentId": 16184381538555246534, + "SortIndex": 1 + }, + { + "ComponentId": 7827190074535394331, + "SortIndex": 2 + } + ] + }, + "Component_[3518973002096080237]": { + "$type": "EditorOnlyEntityComponent", + "Id": 3518973002096080237 + }, + "Component_[399415038452606756]": { + "$type": "{27F1E1A1-8D9D-4C3B-BD3A-AFB9762449C0} TransformComponent", + "Id": 399415038452606756, + "Parent Entity": "ContainerEntity", + "Transform Data": { + "Translate": [ + 27.53014373779297, + -0.00018183141946792603, + 79.38228607177734 + ] + } + }, + "Component_[4564240319609068082]": { + "$type": "EditorEntitySortComponent", + "Id": 4564240319609068082 + }, + "Component_[7827190074535394331]": { + "$type": "EditorMaterialComponent", + "Id": 7827190074535394331, + "Controller": { + "Configuration": { + "materials": [ + { + "Key": { + "materialSlotStableId": 2418540911 + }, + "Value": { + "MaterialAsset": { + "assetId": { + "guid": "{A78EA2FC-688B-5E3A-A7F6-DB413D11D4CF}" + }, + "assetHint": "materials/presets/pbr/metal_chrome_matte.azmaterial" + } + } + } + ] + } + } + }, + "Component_[8092226976542590265]": { + "$type": "EditorDisabledCompositionComponent", + "Id": 8092226976542590265 + } + } + }, + "Entity_[3146380339156]": { + "Id": "Entity_[3146380339156]", + "Name": "Entity1", + "Components": { + "Component_[11525365929370623807]": { + "$type": "EditorVisibilityComponent", + "Id": 11525365929370623807 + }, + "Component_[12334620273692642550]": { + "$type": "EditorLockComponent", + "Id": 12334620273692642550 + }, + "Component_[14389735759337977675]": { + "$type": "EditorPendingCompositionComponent", + "Id": 14389735759337977675 + }, + "Component_[16184381538555246534]": { + "$type": "AZ::Render::EditorMeshComponent", + "Id": 16184381538555246534, + "Controller": { + "Configuration": { + "ModelAsset": { + "assetId": { + "guid": "{E14975EF-E676-51A4-B826-3EF59CB645AA}", + "subId": 285127096 + }, + "assetHint": "testdata/objects/cube/cube.azmodel" + } + } + } + }, + "Component_[17962478023087084794]": { + "$type": "SelectionComponent", + "Id": 17962478023087084794 + }, + "Component_[18071675051915092508]": { + "$type": "EditorEntityIconComponent", + "Id": 18071675051915092508 + }, + "Component_[2115498007879087044]": { + "$type": "EditorInspectorComponent", + "Id": 2115498007879087044, + "ComponentOrderEntryArray": [ + { + "ComponentId": 399415038452606756 + }, + { + "ComponentId": 16184381538555246534, + "SortIndex": 1 + }, + { + "ComponentId": 7827190074535394331, + "SortIndex": 2 + } + ] + }, + "Component_[3518973002096080237]": { + "$type": "EditorOnlyEntityComponent", + "Id": 3518973002096080237 + }, + "Component_[399415038452606756]": { + "$type": "{27F1E1A1-8D9D-4C3B-BD3A-AFB9762449C0} TransformComponent", + "Id": 399415038452606756, + "Parent Entity": "ContainerEntity", + "Transform Data": { + "Translate": [ + -27.530563354492188, + -0.00018183141946792603, + 4.451573371887207 + ] + } + }, + "Component_[4564240319609068082]": { + "$type": "EditorEntitySortComponent", + "Id": 4564240319609068082 + }, + "Component_[7827190074535394331]": { + "$type": "EditorMaterialComponent", + "Id": 7827190074535394331, + "Controller": { + "Configuration": { + "materials": [ + { + "Key": { + "materialSlotStableId": 2418540911 + }, + "Value": { + "MaterialAsset": { + "assetId": { + "guid": "{2D054071-BEF7-53C0-A8C9-E4F026BD8364}" + }, + "assetHint": "materials/presets/pbr/metal_copper_matte.azmaterial" + } + } + } + ] + } + } + }, + "Component_[8092226976542590265]": { + "$type": "EditorDisabledCompositionComponent", + "Id": 8092226976542590265 + } + } + }, + "Entity_[3150675306452]": { + "Id": "Entity_[3150675306452]", + "Name": "Entity1", + "Components": { + "Component_[11525365929370623807]": { + "$type": "EditorVisibilityComponent", + "Id": 11525365929370623807 + }, + "Component_[12334620273692642550]": { + "$type": "EditorLockComponent", + "Id": 12334620273692642550 + }, + "Component_[14389735759337977675]": { + "$type": "EditorPendingCompositionComponent", + "Id": 14389735759337977675 + }, + "Component_[16184381538555246534]": { + "$type": "AZ::Render::EditorMeshComponent", + "Id": 16184381538555246534, + "Controller": { + "Configuration": { + "ModelAsset": { + "assetId": { + "guid": "{E14975EF-E676-51A4-B826-3EF59CB645AA}", + "subId": 285127096 + }, + "assetHint": "testdata/objects/cube/cube.azmodel" + } + } + } + }, + "Component_[17962478023087084794]": { + "$type": "SelectionComponent", + "Id": 17962478023087084794 + }, + "Component_[18071675051915092508]": { + "$type": "EditorEntityIconComponent", + "Id": 18071675051915092508 + }, + "Component_[2115498007879087044]": { + "$type": "EditorInspectorComponent", + "Id": 2115498007879087044, + "ComponentOrderEntryArray": [ + { + "ComponentId": 399415038452606756 + }, + { + "ComponentId": 16184381538555246534, + "SortIndex": 1 + }, + { + "ComponentId": 7827190074535394331, + "SortIndex": 2 + } + ] + }, + "Component_[3518973002096080237]": { + "$type": "EditorOnlyEntityComponent", + "Id": 3518973002096080237 + }, + "Component_[399415038452606756]": { + "$type": "{27F1E1A1-8D9D-4C3B-BD3A-AFB9762449C0} TransformComponent", + "Id": 399415038452606756, + "Parent Entity": "ContainerEntity", + "Transform Data": { + "Translate": [ + -27.530563354492188, + -0.00018183141946792603, + 19.50924301147461 + ] + } + }, + "Component_[4564240319609068082]": { + "$type": "EditorEntitySortComponent", + "Id": 4564240319609068082 + }, + "Component_[7827190074535394331]": { + "$type": "EditorMaterialComponent", + "Id": 7827190074535394331, + "Controller": { + "Configuration": { + "materials": [ + { + "Key": { + "materialSlotStableId": 2418540911 + }, + "Value": { + "MaterialAsset": { + "assetId": { + "guid": "{2D054071-BEF7-53C0-A8C9-E4F026BD8364}" + }, + "assetHint": "materials/presets/pbr/metal_copper_matte.azmaterial" + } + } + } + ] + } + } + }, + "Component_[8092226976542590265]": { + "$type": "EditorDisabledCompositionComponent", + "Id": 8092226976542590265 + } + } + }, + "Entity_[3154970273748]": { + "Id": "Entity_[3154970273748]", + "Name": "Entity1", + "Components": { + "Component_[11525365929370623807]": { + "$type": "EditorVisibilityComponent", + "Id": 11525365929370623807 + }, + "Component_[12334620273692642550]": { + "$type": "EditorLockComponent", + "Id": 12334620273692642550 + }, + "Component_[14389735759337977675]": { + "$type": "EditorPendingCompositionComponent", + "Id": 14389735759337977675 + }, + "Component_[16184381538555246534]": { + "$type": "AZ::Render::EditorMeshComponent", + "Id": 16184381538555246534, + "Controller": { + "Configuration": { + "ModelAsset": { + "assetId": { + "guid": "{E14975EF-E676-51A4-B826-3EF59CB645AA}", + "subId": 285127096 + }, + "assetHint": "testdata/objects/cube/cube.azmodel" + } + } + } + }, + "Component_[17962478023087084794]": { + "$type": "SelectionComponent", + "Id": 17962478023087084794 + }, + "Component_[18071675051915092508]": { + "$type": "EditorEntityIconComponent", + "Id": 18071675051915092508 + }, + "Component_[2115498007879087044]": { + "$type": "EditorInspectorComponent", + "Id": 2115498007879087044, + "ComponentOrderEntryArray": [ + { + "ComponentId": 399415038452606756 + }, + { + "ComponentId": 16184381538555246534, + "SortIndex": 1 + }, + { + "ComponentId": 7827190074535394331, + "SortIndex": 2 + } + ] + }, + "Component_[3518973002096080237]": { + "$type": "EditorOnlyEntityComponent", + "Id": 3518973002096080237 + }, + "Component_[399415038452606756]": { + "$type": "{27F1E1A1-8D9D-4C3B-BD3A-AFB9762449C0} TransformComponent", + "Id": 399415038452606756, + "Parent Entity": "ContainerEntity", + "Transform Data": { + "Translate": [ + 17.53014373779297, + -0.00018183141946792603, + 49.593753814697266 + ] + } + }, + "Component_[4564240319609068082]": { + "$type": "EditorEntitySortComponent", + "Id": 4564240319609068082 + }, + "Component_[7827190074535394331]": { + "$type": "EditorMaterialComponent", + "Id": 7827190074535394331, + "Controller": { + "Configuration": { + "materials": [ + { + "Key": {}, + "Value": { + "MaterialAsset": { + "assetId": { + "guid": "{721188E0-B7CC-5D06-8D5D-39AF8ABF2EF9}" + }, + "assetHint": "materials/presets/pbr/metal_titanium.azmaterial" + } + } + }, + { + "Key": { + "materialSlotStableId": 2418540911 + }, + "Value": { + "MaterialAsset": { + "assetId": { + "guid": "{549D26B8-881D-569F-AF05-961F36A43F4F}" + }, + "assetHint": "materials/presets/pbr/metal_aluminum_matte.azmaterial" + } + } + } + ] + } + } + }, + "Component_[8092226976542590265]": { + "$type": "EditorDisabledCompositionComponent", + "Id": 8092226976542590265 + } + } + }, + "Entity_[3159265241044]": { + "Id": "Entity_[3159265241044]", + "Name": "Entity1", + "Components": { + "Component_[11525365929370623807]": { + "$type": "EditorVisibilityComponent", + "Id": 11525365929370623807 + }, + "Component_[12334620273692642550]": { + "$type": "EditorLockComponent", + "Id": 12334620273692642550 + }, + "Component_[14389735759337977675]": { + "$type": "EditorPendingCompositionComponent", + "Id": 14389735759337977675 + }, + "Component_[16184381538555246534]": { + "$type": "AZ::Render::EditorMeshComponent", + "Id": 16184381538555246534, + "Controller": { + "Configuration": { + "ModelAsset": { + "assetId": { + "guid": "{E14975EF-E676-51A4-B826-3EF59CB645AA}", + "subId": 285127096 + }, + "assetHint": "testdata/objects/cube/cube.azmodel" + } + } + } + }, + "Component_[17962478023087084794]": { + "$type": "SelectionComponent", + "Id": 17962478023087084794 + }, + "Component_[18071675051915092508]": { + "$type": "EditorEntityIconComponent", + "Id": 18071675051915092508 + }, + "Component_[2115498007879087044]": { + "$type": "EditorInspectorComponent", + "Id": 2115498007879087044, + "ComponentOrderEntryArray": [ + { + "ComponentId": 399415038452606756 + }, + { + "ComponentId": 16184381538555246534, + "SortIndex": 1 + }, + { + "ComponentId": 7827190074535394331, + "SortIndex": 2 + } + ] + }, + "Component_[3518973002096080237]": { + "$type": "EditorOnlyEntityComponent", + "Id": 3518973002096080237 + }, + "Component_[399415038452606756]": { + "$type": "{27F1E1A1-8D9D-4C3B-BD3A-AFB9762449C0} TransformComponent", + "Id": 399415038452606756, + "Parent Entity": "ContainerEntity", + "Transform Data": { + "Translate": [ + 27.53014373779297, + -0.00018183141946792603, + 89.95755767822266 + ] + } + }, + "Component_[4564240319609068082]": { + "$type": "EditorEntitySortComponent", + "Id": 4564240319609068082 + }, + "Component_[7827190074535394331]": { + "$type": "EditorMaterialComponent", + "Id": 7827190074535394331, + "Controller": { + "Configuration": { + "materials": [ + { + "Key": { + "materialSlotStableId": 2418540911 + }, + "Value": { + "MaterialAsset": { + "assetId": { + "guid": "{CAF50181-3384-5DF2-9304-C6E48E83C72D}" + }, + "assetHint": "materials/presets/pbr/metal_chrome_polished.azmaterial" + } + } + } + ] + } + } + }, + "Component_[8092226976542590265]": { + "$type": "EditorDisabledCompositionComponent", + "Id": 8092226976542590265 + } + } + }, + "Entity_[3163560208340]": { + "Id": "Entity_[3163560208340]", + "Name": "Entity1", + "Components": { + "Component_[11525365929370623807]": { + "$type": "EditorVisibilityComponent", + "Id": 11525365929370623807 + }, + "Component_[12334620273692642550]": { + "$type": "EditorLockComponent", + "Id": 12334620273692642550 + }, + "Component_[14389735759337977675]": { + "$type": "EditorPendingCompositionComponent", + "Id": 14389735759337977675 + }, + "Component_[16184381538555246534]": { + "$type": "AZ::Render::EditorMeshComponent", + "Id": 16184381538555246534, + "Controller": { + "Configuration": { + "ModelAsset": { + "assetId": { + "guid": "{E14975EF-E676-51A4-B826-3EF59CB645AA}", + "subId": 285127096 + }, + "assetHint": "testdata/objects/cube/cube.azmodel" + } + } + } + }, + "Component_[17962478023087084794]": { + "$type": "SelectionComponent", + "Id": 17962478023087084794 + }, + "Component_[18071675051915092508]": { + "$type": "EditorEntityIconComponent", + "Id": 18071675051915092508 + }, + "Component_[2115498007879087044]": { + "$type": "EditorInspectorComponent", + "Id": 2115498007879087044, + "ComponentOrderEntryArray": [ + { + "ComponentId": 399415038452606756 + }, + { + "ComponentId": 16184381538555246534, + "SortIndex": 1 + }, + { + "ComponentId": 7827190074535394331, + "SortIndex": 2 + } + ] + }, + "Component_[3518973002096080237]": { + "$type": "EditorOnlyEntityComponent", + "Id": 3518973002096080237 + }, + "Component_[399415038452606756]": { + "$type": "{27F1E1A1-8D9D-4C3B-BD3A-AFB9762449C0} TransformComponent", + "Id": 399415038452606756, + "Parent Entity": "ContainerEntity", + "Transform Data": { + "Translate": [ + 17.53014373779297, + -0.00018183141946792603, + 89.95755767822266 + ] + } + }, + "Component_[4564240319609068082]": { + "$type": "EditorEntitySortComponent", + "Id": 4564240319609068082 + }, + "Component_[7827190074535394331]": { + "$type": "EditorMaterialComponent", + "Id": 7827190074535394331, + "Controller": { + "Configuration": { + "materials": [ + { + "Key": {}, + "Value": { + "MaterialAsset": { + "assetId": { + "guid": "{721188E0-B7CC-5D06-8D5D-39AF8ABF2EF9}" + }, + "assetHint": "materials/presets/pbr/metal_titanium.azmaterial" + } + } + }, + { + "Key": { + "materialSlotStableId": 2418540911 + }, + "Value": { + "MaterialAsset": { + "assetId": { + "guid": "{64C1F6A6-6BDA-551A-BE56-1829E5913278}" + }, + "assetHint": "materials/presets/pbr/metal_aluminum_polished.azmaterial" + } + } + } + ] + } + } + }, + "Component_[8092226976542590265]": { + "$type": "EditorDisabledCompositionComponent", + "Id": 8092226976542590265 + } + } + }, + "Entity_[3167855175636]": { + "Id": "Entity_[3167855175636]", + "Name": "Entity1", + "Components": { + "Component_[1057179753323467068]": { + "$type": "EditorMaterialComponent", + "Id": 1057179753323467068, + "Controller": { + "Configuration": { + "materials": [ + { + "Key": { + "materialSlotStableId": 2418540911 + }, + "Value": { + "MaterialAsset": { + "assetId": { + "guid": "{721188E0-B7CC-5D06-8D5D-39AF8ABF2EF9}" + }, + "assetHint": "materials/presets/pbr/metal_titanium.azmaterial" + } + } + } + ] + } + } + }, + "Component_[11525365929370623807]": { + "$type": "EditorVisibilityComponent", + "Id": 11525365929370623807 + }, + "Component_[12334620273692642550]": { + "$type": "EditorLockComponent", + "Id": 12334620273692642550 + }, + "Component_[14389735759337977675]": { + "$type": "EditorPendingCompositionComponent", + "Id": 14389735759337977675 + }, + "Component_[16184381538555246534]": { + "$type": "AZ::Render::EditorMeshComponent", + "Id": 16184381538555246534, + "Controller": { + "Configuration": { + "ModelAsset": { + "assetId": { + "guid": "{E14975EF-E676-51A4-B826-3EF59CB645AA}", + "subId": 285127096 + }, + "assetHint": "testdata/objects/cube/cube.azmodel" + } + } + } + }, + "Component_[17962478023087084794]": { + "$type": "SelectionComponent", + "Id": 17962478023087084794 + }, + "Component_[18071675051915092508]": { + "$type": "EditorEntityIconComponent", + "Id": 18071675051915092508 + }, + "Component_[2115498007879087044]": { + "$type": "EditorInspectorComponent", + "Id": 2115498007879087044, + "ComponentOrderEntryArray": [ + { + "ComponentId": 399415038452606756 + }, + { + "ComponentId": 16184381538555246534, + "SortIndex": 1 + }, + { + "ComponentId": 1057179753323467068, + "SortIndex": 2 + } + ] + }, + "Component_[3518973002096080237]": { + "$type": "EditorOnlyEntityComponent", + "Id": 3518973002096080237 + }, + "Component_[399415038452606756]": { + "$type": "{27F1E1A1-8D9D-4C3B-BD3A-AFB9762449C0} TransformComponent", + "Id": 399415038452606756, + "Parent Entity": "ContainerEntity", + "Transform Data": { + "Translate": [ + 12.530143737792969, + -0.00018183141946792603, + 39.56034851074219 + ] + } + }, + "Component_[4564240319609068082]": { + "$type": "EditorEntitySortComponent", + "Id": 4564240319609068082 + }, + "Component_[8092226976542590265]": { + "$type": "EditorDisabledCompositionComponent", + "Id": 8092226976542590265 + } + } + }, + "Entity_[3172150142932]": { + "Id": "Entity_[3172150142932]", + "Name": "Entity1", + "Components": { + "Component_[11525365929370623807]": { + "$type": "EditorVisibilityComponent", + "Id": 11525365929370623807 + }, + "Component_[12334620273692642550]": { + "$type": "EditorLockComponent", + "Id": 12334620273692642550 + }, + "Component_[14389735759337977675]": { + "$type": "EditorPendingCompositionComponent", + "Id": 14389735759337977675 + }, + "Component_[16184381538555246534]": { + "$type": "AZ::Render::EditorMeshComponent", + "Id": 16184381538555246534, + "Controller": { + "Configuration": { + "ModelAsset": { + "assetId": { + "guid": "{E14975EF-E676-51A4-B826-3EF59CB645AA}", + "subId": 285127096 + }, + "assetHint": "testdata/objects/cube/cube.azmodel" + } + } + } + }, + "Component_[17962478023087084794]": { + "$type": "SelectionComponent", + "Id": 17962478023087084794 + }, + "Component_[18071675051915092508]": { + "$type": "EditorEntityIconComponent", + "Id": 18071675051915092508 + }, + "Component_[2115498007879087044]": { + "$type": "EditorInspectorComponent", + "Id": 2115498007879087044, + "ComponentOrderEntryArray": [ + { + "ComponentId": 399415038452606756 + }, + { + "ComponentId": 16184381538555246534, + "SortIndex": 1 + }, + { + "ComponentId": 7827190074535394331, + "SortIndex": 2 + } + ] + }, + "Component_[3518973002096080237]": { + "$type": "EditorOnlyEntityComponent", + "Id": 3518973002096080237 + }, + "Component_[399415038452606756]": { + "$type": "{27F1E1A1-8D9D-4C3B-BD3A-AFB9762449C0} TransformComponent", + "Id": 399415038452606756, + "Parent Entity": "ContainerEntity", + "Transform Data": { + "Translate": [ + -42.53056335449219, + -0.00018183141946792603, + 30.08451271057129 + ] + } + }, + "Component_[4564240319609068082]": { + "$type": "EditorEntitySortComponent", + "Id": 4564240319609068082 + }, + "Component_[7827190074535394331]": { + "$type": "EditorMaterialComponent", + "Id": 7827190074535394331, + "Controller": { + "Configuration": { + "materials": [ + { + "Key": { + "materialSlotStableId": 2418540911 + }, + "Value": { + "MaterialAsset": { + "assetId": { + "guid": "{FC69F2F8-F73B-5A0C-B8B7-94BAA45780FC}" + }, + "assetHint": "materials/presets/pbr/metal_brass_polished.azmaterial" + } + } + } + ] + } + } + }, + "Component_[8092226976542590265]": { + "$type": "EditorDisabledCompositionComponent", + "Id": 8092226976542590265 + } + } + }, + "Entity_[3176445110228]": { + "Id": "Entity_[3176445110228]", + "Name": "Entity1", + "Components": { + "Component_[11525365929370623807]": { + "$type": "EditorVisibilityComponent", + "Id": 11525365929370623807 + }, + "Component_[12334620273692642550]": { + "$type": "EditorLockComponent", + "Id": 12334620273692642550 + }, + "Component_[14389735759337977675]": { + "$type": "EditorPendingCompositionComponent", + "Id": 14389735759337977675 + }, + "Component_[16184381538555246534]": { + "$type": "AZ::Render::EditorMeshComponent", + "Id": 16184381538555246534, + "Controller": { + "Configuration": { + "ModelAsset": { + "assetId": { + "guid": "{E14975EF-E676-51A4-B826-3EF59CB645AA}", + "subId": 285127096 + }, + "assetHint": "testdata/objects/cube/cube.azmodel" + } + } + } + }, + "Component_[17962478023087084794]": { + "$type": "SelectionComponent", + "Id": 17962478023087084794 + }, + "Component_[18071675051915092508]": { + "$type": "EditorEntityIconComponent", + "Id": 18071675051915092508 + }, + "Component_[2115498007879087044]": { + "$type": "EditorInspectorComponent", + "Id": 2115498007879087044, + "ComponentOrderEntryArray": [ + { + "ComponentId": 399415038452606756 + }, + { + "ComponentId": 16184381538555246534, + "SortIndex": 1 + }, + { + "ComponentId": 7827190074535394331, + "SortIndex": 2 + } + ] + }, + "Component_[3518973002096080237]": { + "$type": "EditorOnlyEntityComponent", + "Id": 3518973002096080237 + }, + "Component_[399415038452606756]": { + "$type": "{27F1E1A1-8D9D-4C3B-BD3A-AFB9762449C0} TransformComponent", + "Id": 399415038452606756, + "Parent Entity": "ContainerEntity", + "Transform Data": { + "Translate": [ + -42.53056335449219, + -0.00018183141946792603, + 69.34888458251953 + ] + } + }, + "Component_[4564240319609068082]": { + "$type": "EditorEntitySortComponent", + "Id": 4564240319609068082 + }, + "Component_[7827190074535394331]": { + "$type": "EditorMaterialComponent", + "Id": 7827190074535394331, + "Controller": { + "Configuration": { + "materials": [ + { + "Key": { + "materialSlotStableId": 2418540911 + }, + "Value": { + "MaterialAsset": { + "assetId": { + "guid": "{80E0F2A7-1EE4-597F-80EF-985C65BCE2EB}" + }, + "assetHint": "materials/presets/pbr/metal_brass.azmaterial" + } + } + } + ] + } + } + }, + "Component_[8092226976542590265]": { + "$type": "EditorDisabledCompositionComponent", + "Id": 8092226976542590265 + } + } + }, + "Entity_[3180740077524]": { + "Id": "Entity_[3180740077524]", + "Name": "Entity1", + "Components": { + "Component_[11525365929370623807]": { + "$type": "EditorVisibilityComponent", + "Id": 11525365929370623807 + }, + "Component_[12334620273692642550]": { + "$type": "EditorLockComponent", + "Id": 12334620273692642550 + }, + "Component_[14389735759337977675]": { + "$type": "EditorPendingCompositionComponent", + "Id": 14389735759337977675 + }, + "Component_[16184381538555246534]": { + "$type": "AZ::Render::EditorMeshComponent", + "Id": 16184381538555246534, + "Controller": { + "Configuration": { + "ModelAsset": { + "assetId": { + "guid": "{E14975EF-E676-51A4-B826-3EF59CB645AA}", + "subId": 285127096 + }, + "assetHint": "testdata/objects/cube/cube.azmodel" + } + } + } + }, + "Component_[17962478023087084794]": { + "$type": "SelectionComponent", + "Id": 17962478023087084794 + }, + "Component_[18071675051915092508]": { + "$type": "EditorEntityIconComponent", + "Id": 18071675051915092508 + }, + "Component_[2115498007879087044]": { + "$type": "EditorInspectorComponent", + "Id": 2115498007879087044, + "ComponentOrderEntryArray": [ + { + "ComponentId": 399415038452606756 + }, + { + "ComponentId": 16184381538555246534, + "SortIndex": 1 + }, + { + "ComponentId": 7827190074535394331, + "SortIndex": 2 + } + ] + }, + "Component_[3518973002096080237]": { + "$type": "EditorOnlyEntityComponent", + "Id": 3518973002096080237 + }, + "Component_[399415038452606756]": { + "$type": "{27F1E1A1-8D9D-4C3B-BD3A-AFB9762449C0} TransformComponent", + "Id": 399415038452606756, + "Parent Entity": "ContainerEntity", + "Transform Data": { + "Translate": [ + -42.53056335449219, + -0.00018183141946792603, + 114.4910659790039 + ] + } + }, + "Component_[4564240319609068082]": { + "$type": "EditorEntitySortComponent", + "Id": 4564240319609068082 + }, + "Component_[7827190074535394331]": { + "$type": "EditorMaterialComponent", + "Id": 7827190074535394331, + "Controller": { + "Configuration": { + "materials": [ + { + "Key": { + "materialSlotStableId": 2418540911 + }, + "Value": { + "MaterialAsset": { + "assetId": { + "guid": "{80E0F2A7-1EE4-597F-80EF-985C65BCE2EB}" + }, + "assetHint": "materials/presets/pbr/metal_brass.azmaterial" + } + } + } + ] + } + } + }, + "Component_[8092226976542590265]": { + "$type": "EditorDisabledCompositionComponent", + "Id": 8092226976542590265 + } + } + }, + "Entity_[3185035044820]": { + "Id": "Entity_[3185035044820]", + "Name": "Entity1", + "Components": { + "Component_[11525365929370623807]": { + "$type": "EditorVisibilityComponent", + "Id": 11525365929370623807 + }, + "Component_[12334620273692642550]": { + "$type": "EditorLockComponent", + "Id": 12334620273692642550 + }, + "Component_[14389735759337977675]": { + "$type": "EditorPendingCompositionComponent", + "Id": 14389735759337977675 + }, + "Component_[16184381538555246534]": { + "$type": "AZ::Render::EditorMeshComponent", + "Id": 16184381538555246534, + "Controller": { + "Configuration": { + "ModelAsset": { + "assetId": { + "guid": "{E14975EF-E676-51A4-B826-3EF59CB645AA}", + "subId": 285127096 + }, + "assetHint": "testdata/objects/cube/cube.azmodel" + } + } + } + }, + "Component_[17962478023087084794]": { + "$type": "SelectionComponent", + "Id": 17962478023087084794 + }, + "Component_[18071675051915092508]": { + "$type": "EditorEntityIconComponent", + "Id": 18071675051915092508 + }, + "Component_[2115498007879087044]": { + "$type": "EditorInspectorComponent", + "Id": 2115498007879087044, + "ComponentOrderEntryArray": [ + { + "ComponentId": 399415038452606756 + }, + { + "ComponentId": 16184381538555246534, + "SortIndex": 1 + }, + { + "ComponentId": 7827190074535394331, + "SortIndex": 2 + } + ] + }, + "Component_[3518973002096080237]": { + "$type": "EditorOnlyEntityComponent", + "Id": 3518973002096080237 + }, + "Component_[399415038452606756]": { + "$type": "{27F1E1A1-8D9D-4C3B-BD3A-AFB9762449C0} TransformComponent", + "Id": 399415038452606756, + "Parent Entity": "ContainerEntity", + "Transform Data": { + "Translate": [ + 47.53014373779297, + -0.00018183141946792603, + 109.46680450439453 + ] + } + }, + "Component_[4564240319609068082]": { + "$type": "EditorEntitySortComponent", + "Id": 4564240319609068082 + }, + "Component_[7827190074535394331]": { + "$type": "EditorMaterialComponent", + "Id": 7827190074535394331, + "Controller": { + "Configuration": { + "materials": [ + { + "Key": { + "materialSlotStableId": 2418540911 + }, + "Value": { + "MaterialAsset": { + "assetId": { + "guid": "{970148AC-7258-5EC8-9CE7-F4EF93164D93}" + }, + "assetHint": "materials/presets/pbr/metal_iron_matte.azmaterial" + } + } + } + ] + } + } + }, + "Component_[8092226976542590265]": { + "$type": "EditorDisabledCompositionComponent", + "Id": 8092226976542590265 + } + } + }, + "Entity_[3189330012116]": { + "Id": "Entity_[3189330012116]", + "Name": "Entity1", + "Components": { + "Component_[11525365929370623807]": { + "$type": "EditorVisibilityComponent", + "Id": 11525365929370623807 + }, + "Component_[12334620273692642550]": { + "$type": "EditorLockComponent", + "Id": 12334620273692642550 + }, + "Component_[14389735759337977675]": { + "$type": "EditorPendingCompositionComponent", + "Id": 14389735759337977675 + }, + "Component_[16184381538555246534]": { + "$type": "AZ::Render::EditorMeshComponent", + "Id": 16184381538555246534, + "Controller": { + "Configuration": { + "ModelAsset": { + "assetId": { + "guid": "{E14975EF-E676-51A4-B826-3EF59CB645AA}", + "subId": 285127096 + }, + "assetHint": "testdata/objects/cube/cube.azmodel" + } + } + } + }, + "Component_[17962478023087084794]": { + "$type": "SelectionComponent", + "Id": 17962478023087084794 + }, + "Component_[18071675051915092508]": { + "$type": "EditorEntityIconComponent", + "Id": 18071675051915092508 + }, + "Component_[2115498007879087044]": { + "$type": "EditorInspectorComponent", + "Id": 2115498007879087044, + "ComponentOrderEntryArray": [ + { + "ComponentId": 399415038452606756 + }, + { + "ComponentId": 16184381538555246534, + "SortIndex": 1 + }, + { + "ComponentId": 7827190074535394331, + "SortIndex": 2 + } + ] + }, + "Component_[3518973002096080237]": { + "$type": "EditorOnlyEntityComponent", + "Id": 3518973002096080237 + }, + "Component_[399415038452606756]": { + "$type": "{27F1E1A1-8D9D-4C3B-BD3A-AFB9762449C0} TransformComponent", + "Id": 399415038452606756, + "Parent Entity": "ContainerEntity", + "Transform Data": { + "Translate": [ + 32.53014373779297, + -0.00018183141946792603, + 79.38228607177734 + ] + } + }, + "Component_[4564240319609068082]": { + "$type": "EditorEntitySortComponent", + "Id": 4564240319609068082 + }, + "Component_[7827190074535394331]": { + "$type": "EditorMaterialComponent", + "Id": 7827190074535394331, + "Controller": { + "Configuration": { + "materials": [ + { + "Key": { + "materialSlotStableId": 2418540911 + }, + "Value": { + "MaterialAsset": { + "assetId": { + "guid": "{C60A39AF-BB76-51BD-9468-A88C9A6F78D7}" + }, + "assetHint": "materials/presets/pbr/metal_cobalt_matte.azmaterial" + } + } + } + ] + } + } + }, + "Component_[8092226976542590265]": { + "$type": "EditorDisabledCompositionComponent", + "Id": 8092226976542590265 + } + } + }, + "Entity_[3193624979412]": { + "Id": "Entity_[3193624979412]", + "Name": "Entity1", + "Components": { + "Component_[11525365929370623807]": { + "$type": "EditorVisibilityComponent", + "Id": 11525365929370623807 + }, + "Component_[12334620273692642550]": { + "$type": "EditorLockComponent", + "Id": 12334620273692642550 + }, + "Component_[14389735759337977675]": { + "$type": "EditorPendingCompositionComponent", + "Id": 14389735759337977675 + }, + "Component_[16184381538555246534]": { + "$type": "AZ::Render::EditorMeshComponent", + "Id": 16184381538555246534, + "Controller": { + "Configuration": { + "ModelAsset": { + "assetId": { + "guid": "{E14975EF-E676-51A4-B826-3EF59CB645AA}", + "subId": 285127096 + }, + "assetHint": "testdata/objects/cube/cube.azmodel" + } + } + } + }, + "Component_[17962478023087084794]": { + "$type": "SelectionComponent", + "Id": 17962478023087084794 + }, + "Component_[18071675051915092508]": { + "$type": "EditorEntityIconComponent", + "Id": 18071675051915092508 + }, + "Component_[2115498007879087044]": { + "$type": "EditorInspectorComponent", + "Id": 2115498007879087044, + "ComponentOrderEntryArray": [ + { + "ComponentId": 399415038452606756 + }, + { + "ComponentId": 16184381538555246534, + "SortIndex": 1 + }, + { + "ComponentId": 7827190074535394331, + "SortIndex": 2 + } + ] + }, + "Component_[3518973002096080237]": { + "$type": "EditorOnlyEntityComponent", + "Id": 3518973002096080237 + }, + "Component_[399415038452606756]": { + "$type": "{27F1E1A1-8D9D-4C3B-BD3A-AFB9762449C0} TransformComponent", + "Id": 399415038452606756, + "Parent Entity": "ContainerEntity", + "Transform Data": { + "Translate": [ + 22.53014373779297, + -0.00018183141946792603, + 39.56034851074219 + ] + } + }, + "Component_[4564240319609068082]": { + "$type": "EditorEntitySortComponent", + "Id": 4564240319609068082 + }, + "Component_[7827190074535394331]": { + "$type": "EditorMaterialComponent", + "Id": 7827190074535394331, + "Controller": { + "Configuration": { + "materials": [ + { + "Key": { + "materialSlotStableId": 2418540911 + }, + "Value": { + "MaterialAsset": { + "assetId": { + "guid": "{80E0F2A7-1EE4-597F-80EF-985C65BCE2EB}" + }, + "assetHint": "materials/presets/pbr/metal_brass.azmaterial" + } + } + } + ] + } + } + }, + "Component_[8092226976542590265]": { + "$type": "EditorDisabledCompositionComponent", + "Id": 8092226976542590265 + } + } + }, + "Entity_[3197919946708]": { + "Id": "Entity_[3197919946708]", + "Name": "Entity1", + "Components": { + "Component_[11525365929370623807]": { + "$type": "EditorVisibilityComponent", + "Id": 11525365929370623807 + }, + "Component_[12334620273692642550]": { + "$type": "EditorLockComponent", + "Id": 12334620273692642550 + }, + "Component_[14389735759337977675]": { + "$type": "EditorPendingCompositionComponent", + "Id": 14389735759337977675 + }, + "Component_[16184381538555246534]": { + "$type": "AZ::Render::EditorMeshComponent", + "Id": 16184381538555246534, + "Controller": { + "Configuration": { + "ModelAsset": { + "assetId": { + "guid": "{E14975EF-E676-51A4-B826-3EF59CB645AA}", + "subId": 285127096 + }, + "assetHint": "testdata/objects/cube/cube.azmodel" + } + } + } + }, + "Component_[17962478023087084794]": { + "$type": "SelectionComponent", + "Id": 17962478023087084794 + }, + "Component_[18071675051915092508]": { + "$type": "EditorEntityIconComponent", + "Id": 18071675051915092508 + }, + "Component_[2115498007879087044]": { + "$type": "EditorInspectorComponent", + "Id": 2115498007879087044, + "ComponentOrderEntryArray": [ + { + "ComponentId": 399415038452606756 + }, + { + "ComponentId": 16184381538555246534, + "SortIndex": 1 + }, + { + "ComponentId": 7827190074535394331, + "SortIndex": 2 + } + ] + }, + "Component_[3518973002096080237]": { + "$type": "EditorOnlyEntityComponent", + "Id": 3518973002096080237 + }, + "Component_[399415038452606756]": { + "$type": "{27F1E1A1-8D9D-4C3B-BD3A-AFB9762449C0} TransformComponent", + "Id": 399415038452606756, + "Parent Entity": "ContainerEntity", + "Transform Data": { + "Translate": [ + -7.5305633544921875, + -0.00018183141946792603, + 99.43339538574219 + ] + } + }, + "Component_[4564240319609068082]": { + "$type": "EditorEntitySortComponent", + "Id": 4564240319609068082 + }, + "Component_[7827190074535394331]": { + "$type": "EditorMaterialComponent", + "Id": 7827190074535394331, + "Controller": { + "Configuration": { + "materials": [ + { + "Key": { + "materialSlotStableId": 2418540911 + }, + "Value": { + "MaterialAsset": { + "assetId": { + "guid": "{DD1E26AE-80FB-5DB6-8786-26D438190A38}" + }, + "assetHint": "materials/presets/pbr/metal_nickel.azmaterial" + } + } + } + ] + } + } + }, + "Component_[8092226976542590265]": { + "$type": "EditorDisabledCompositionComponent", + "Id": 8092226976542590265 + } + } + }, + "Entity_[3202214914004]": { + "Id": "Entity_[3202214914004]", + "Name": "Entity1", + "Components": { + "Component_[11525365929370623807]": { + "$type": "EditorVisibilityComponent", + "Id": 11525365929370623807 + }, + "Component_[12334620273692642550]": { + "$type": "EditorLockComponent", + "Id": 12334620273692642550 + }, + "Component_[14389735759337977675]": { + "$type": "EditorPendingCompositionComponent", + "Id": 14389735759337977675 + }, + "Component_[16184381538555246534]": { + "$type": "AZ::Render::EditorMeshComponent", + "Id": 16184381538555246534, + "Controller": { + "Configuration": { + "ModelAsset": { + "assetId": { + "guid": "{E14975EF-E676-51A4-B826-3EF59CB645AA}", + "subId": 285127096 + }, + "assetHint": "testdata/objects/cube/cube.azmodel" + } + } + } + }, + "Component_[17962478023087084794]": { + "$type": "SelectionComponent", + "Id": 17962478023087084794 + }, + "Component_[18071675051915092508]": { + "$type": "EditorEntityIconComponent", + "Id": 18071675051915092508 + }, + "Component_[2115498007879087044]": { + "$type": "EditorInspectorComponent", + "Id": 2115498007879087044, + "ComponentOrderEntryArray": [ + { + "ComponentId": 399415038452606756 + }, + { + "ComponentId": 16184381538555246534, + "SortIndex": 1 + }, + { + "ComponentId": 7827190074535394331, + "SortIndex": 2 + } + ] + }, + "Component_[3518973002096080237]": { + "$type": "EditorOnlyEntityComponent", + "Id": 3518973002096080237 + }, + "Component_[399415038452606756]": { + "$type": "{27F1E1A1-8D9D-4C3B-BD3A-AFB9762449C0} TransformComponent", + "Id": 399415038452606756, + "Parent Entity": "ContainerEntity", + "Transform Data": { + "Translate": [ + 27.53014373779297, + -0.00018183141946792603, + 19.50924301147461 + ] + } + }, + "Component_[4564240319609068082]": { + "$type": "EditorEntitySortComponent", + "Id": 4564240319609068082 + }, + "Component_[7827190074535394331]": { + "$type": "EditorMaterialComponent", + "Id": 7827190074535394331, + "Controller": { + "Configuration": { + "materials": [ + { + "Key": { + "materialSlotStableId": 2418540911 + }, + "Value": { + "MaterialAsset": { + "assetId": { + "guid": "{A78EA2FC-688B-5E3A-A7F6-DB413D11D4CF}" + }, + "assetHint": "materials/presets/pbr/metal_chrome_matte.azmaterial" + } + } + } + ] + } + } + }, + "Component_[8092226976542590265]": { + "$type": "EditorDisabledCompositionComponent", + "Id": 8092226976542590265 + } + } + }, + "Entity_[3206509881300]": { + "Id": "Entity_[3206509881300]", + "Name": "Entity1", + "Components": { + "Component_[11525365929370623807]": { + "$type": "EditorVisibilityComponent", + "Id": 11525365929370623807 + }, + "Component_[12334620273692642550]": { + "$type": "EditorLockComponent", + "Id": 12334620273692642550 + }, + "Component_[14389735759337977675]": { + "$type": "EditorPendingCompositionComponent", + "Id": 14389735759337977675 + }, + "Component_[16184381538555246534]": { + "$type": "AZ::Render::EditorMeshComponent", + "Id": 16184381538555246534, + "Controller": { + "Configuration": { + "ModelAsset": { + "assetId": { + "guid": "{E14975EF-E676-51A4-B826-3EF59CB645AA}", + "subId": 285127096 + }, + "assetHint": "testdata/objects/cube/cube.azmodel" + } + } + } + }, + "Component_[17962478023087084794]": { + "$type": "SelectionComponent", + "Id": 17962478023087084794 + }, + "Component_[18071675051915092508]": { + "$type": "EditorEntityIconComponent", + "Id": 18071675051915092508 + }, + "Component_[2115498007879087044]": { + "$type": "EditorInspectorComponent", + "Id": 2115498007879087044, + "ComponentOrderEntryArray": [ + { + "ComponentId": 399415038452606756 + }, + { + "ComponentId": 16184381538555246534, + "SortIndex": 1 + }, + { + "ComponentId": 7827190074535394331, + "SortIndex": 2 + } + ] + }, + "Component_[3518973002096080237]": { + "$type": "EditorOnlyEntityComponent", + "Id": 3518973002096080237 + }, + "Component_[399415038452606756]": { + "$type": "{27F1E1A1-8D9D-4C3B-BD3A-AFB9762449C0} TransformComponent", + "Id": 399415038452606756, + "Parent Entity": "ContainerEntity", + "Transform Data": { + "Translate": [ + 47.53014373779297, + -0.00018183141946792603, + 64.32462310791016 + ] + } + }, + "Component_[4564240319609068082]": { + "$type": "EditorEntitySortComponent", + "Id": 4564240319609068082 + }, + "Component_[7827190074535394331]": { + "$type": "EditorMaterialComponent", + "Id": 7827190074535394331, + "Controller": { + "Configuration": { + "materials": [ + { + "Key": { + "materialSlotStableId": 2418540911 + }, + "Value": { + "MaterialAsset": { + "assetId": { + "guid": "{970148AC-7258-5EC8-9CE7-F4EF93164D93}" + }, + "assetHint": "materials/presets/pbr/metal_iron_matte.azmaterial" + } + } + } + ] + } + } + }, + "Component_[8092226976542590265]": { + "$type": "EditorDisabledCompositionComponent", + "Id": 8092226976542590265 + } + } + }, + "Entity_[3210804848596]": { + "Id": "Entity_[3210804848596]", + "Name": "Entity1", + "Components": { + "Component_[11525365929370623807]": { + "$type": "EditorVisibilityComponent", + "Id": 11525365929370623807 + }, + "Component_[12334620273692642550]": { + "$type": "EditorLockComponent", + "Id": 12334620273692642550 + }, + "Component_[14389735759337977675]": { + "$type": "EditorPendingCompositionComponent", + "Id": 14389735759337977675 + }, + "Component_[16184381538555246534]": { + "$type": "AZ::Render::EditorMeshComponent", + "Id": 16184381538555246534, + "Controller": { + "Configuration": { + "ModelAsset": { + "assetId": { + "guid": "{E14975EF-E676-51A4-B826-3EF59CB645AA}", + "subId": 285127096 + }, + "assetHint": "testdata/objects/cube/cube.azmodel" + } + } + } + }, + "Component_[17962478023087084794]": { + "$type": "SelectionComponent", + "Id": 17962478023087084794 + }, + "Component_[18071675051915092508]": { + "$type": "EditorEntityIconComponent", + "Id": 18071675051915092508 + }, + "Component_[2115498007879087044]": { + "$type": "EditorInspectorComponent", + "Id": 2115498007879087044, + "ComponentOrderEntryArray": [ + { + "ComponentId": 399415038452606756 + }, + { + "ComponentId": 16184381538555246534, + "SortIndex": 1 + }, + { + "ComponentId": 7827190074535394331, + "SortIndex": 2 + } + ] + }, + "Component_[3518973002096080237]": { + "$type": "EditorOnlyEntityComponent", + "Id": 3518973002096080237 + }, + "Component_[399415038452606756]": { + "$type": "{27F1E1A1-8D9D-4C3B-BD3A-AFB9762449C0} TransformComponent", + "Id": 399415038452606756, + "Parent Entity": "ContainerEntity", + "Transform Data": { + "Translate": [ + -7.5305633544921875, + -0.00018183141946792603, + 54.618019104003906 + ] + } + }, + "Component_[4564240319609068082]": { + "$type": "EditorEntitySortComponent", + "Id": 4564240319609068082 + }, + "Component_[7827190074535394331]": { + "$type": "EditorMaterialComponent", + "Id": 7827190074535394331, + "Controller": { + "Configuration": { + "materials": [ + { + "Key": { + "materialSlotStableId": 2418540911 + }, + "Value": { + "MaterialAsset": { + "assetId": { + "guid": "{DD1E26AE-80FB-5DB6-8786-26D438190A38}" + }, + "assetHint": "materials/presets/pbr/metal_nickel.azmaterial" + } + } + } + ] + } + } + }, + "Component_[8092226976542590265]": { + "$type": "EditorDisabledCompositionComponent", + "Id": 8092226976542590265 + } + } + }, + "Entity_[3215099815892]": { + "Id": "Entity_[3215099815892]", + "Name": "Entity1", + "Components": { + "Component_[11525365929370623807]": { + "$type": "EditorVisibilityComponent", + "Id": 11525365929370623807 + }, + "Component_[12334620273692642550]": { + "$type": "EditorLockComponent", + "Id": 12334620273692642550 + }, + "Component_[14389735759337977675]": { + "$type": "EditorPendingCompositionComponent", + "Id": 14389735759337977675 + }, + "Component_[16184381538555246534]": { + "$type": "AZ::Render::EditorMeshComponent", + "Id": 16184381538555246534, + "Controller": { + "Configuration": { + "ModelAsset": { + "assetId": { + "guid": "{E14975EF-E676-51A4-B826-3EF59CB645AA}", + "subId": 285127096 + }, + "assetHint": "testdata/objects/cube/cube.azmodel" + } + } + } + }, + "Component_[17962478023087084794]": { + "$type": "SelectionComponent", + "Id": 17962478023087084794 + }, + "Component_[18071675051915092508]": { + "$type": "EditorEntityIconComponent", + "Id": 18071675051915092508 + }, + "Component_[2115498007879087044]": { + "$type": "EditorInspectorComponent", + "Id": 2115498007879087044, + "ComponentOrderEntryArray": [ + { + "ComponentId": 399415038452606756 + }, + { + "ComponentId": 16184381538555246534, + "SortIndex": 1 + }, + { + "ComponentId": 7827190074535394331, + "SortIndex": 2 + } + ] + }, + "Component_[3518973002096080237]": { + "$type": "EditorOnlyEntityComponent", + "Id": 3518973002096080237 + }, + "Component_[399415038452606756]": { + "$type": "{27F1E1A1-8D9D-4C3B-BD3A-AFB9762449C0} TransformComponent", + "Id": 399415038452606756, + "Parent Entity": "ContainerEntity", + "Transform Data": { + "Translate": [ + 32.53014373779297, + -0.00018183141946792603, + 39.56034851074219 + ] + } + }, + "Component_[4564240319609068082]": { + "$type": "EditorEntitySortComponent", + "Id": 4564240319609068082 + }, + "Component_[7827190074535394331]": { + "$type": "EditorMaterialComponent", + "Id": 7827190074535394331, + "Controller": { + "Configuration": { + "materials": [ + { + "Key": { + "materialSlotStableId": 2418540911 + }, + "Value": { + "MaterialAsset": { + "assetId": { + "guid": "{99976D73-6248-5D66-AD15-E8F52B0AFE36}" + }, + "assetHint": "materials/presets/pbr/metal_cobalt.azmaterial" + } + } + } + ] + } + } + }, + "Component_[8092226976542590265]": { + "$type": "EditorDisabledCompositionComponent", + "Id": 8092226976542590265 + } + } + }, + "Entity_[3219394783188]": { + "Id": "Entity_[3219394783188]", + "Name": "Entity1", + "Components": { + "Component_[11525365929370623807]": { + "$type": "EditorVisibilityComponent", + "Id": 11525365929370623807 + }, + "Component_[12334620273692642550]": { + "$type": "EditorLockComponent", + "Id": 12334620273692642550 + }, + "Component_[14389735759337977675]": { + "$type": "EditorPendingCompositionComponent", + "Id": 14389735759337977675 + }, + "Component_[16184381538555246534]": { + "$type": "AZ::Render::EditorMeshComponent", + "Id": 16184381538555246534, + "Controller": { + "Configuration": { + "ModelAsset": { + "assetId": { + "guid": "{E14975EF-E676-51A4-B826-3EF59CB645AA}", + "subId": 285127096 + }, + "assetHint": "testdata/objects/cube/cube.azmodel" + } + } + } + }, + "Component_[17962478023087084794]": { + "$type": "SelectionComponent", + "Id": 17962478023087084794 + }, + "Component_[18071675051915092508]": { + "$type": "EditorEntityIconComponent", + "Id": 18071675051915092508 + }, + "Component_[2115498007879087044]": { + "$type": "EditorInspectorComponent", + "Id": 2115498007879087044, + "ComponentOrderEntryArray": [ + { + "ComponentId": 399415038452606756 + }, + { + "ComponentId": 16184381538555246534, + "SortIndex": 1 + }, + { + "ComponentId": 7827190074535394331, + "SortIndex": 2 + } + ] + }, + "Component_[3518973002096080237]": { + "$type": "EditorOnlyEntityComponent", + "Id": 3518973002096080237 + }, + "Component_[399415038452606756]": { + "$type": "{27F1E1A1-8D9D-4C3B-BD3A-AFB9762449C0} TransformComponent", + "Id": 399415038452606756, + "Parent Entity": "ContainerEntity", + "Transform Data": { + "Translate": [ + 7.530143737792969, + -0.00018183141946792603, + 45.14218521118164 + ] + } + }, + "Component_[4564240319609068082]": { + "$type": "EditorEntitySortComponent", + "Id": 4564240319609068082 + }, + "Component_[7827190074535394331]": { + "$type": "EditorMaterialComponent", + "Id": 7827190074535394331, + "Controller": { + "Configuration": { + "materials": [ + { + "Key": { + "materialSlotStableId": 2418540911 + }, + "Value": { + "MaterialAsset": { + "assetId": { + "guid": "{2AC06FA3-7670-542E-8996-DF346AFF1B61}" + }, + "assetHint": "materials/presets/pbr/metal_silver_polished.azmaterial" + } + } + } + ] + } + } + }, + "Component_[8092226976542590265]": { + "$type": "EditorDisabledCompositionComponent", + "Id": 8092226976542590265 + } + } + }, + "Entity_[3223689750484]": { + "Id": "Entity_[3223689750484]", + "Name": "Entity1", + "Components": { + "Component_[11525365929370623807]": { + "$type": "EditorVisibilityComponent", + "Id": 11525365929370623807 + }, + "Component_[12334620273692642550]": { + "$type": "EditorLockComponent", + "Id": 12334620273692642550 + }, + "Component_[14389735759337977675]": { + "$type": "EditorPendingCompositionComponent", + "Id": 14389735759337977675 + }, + "Component_[16184381538555246534]": { + "$type": "AZ::Render::EditorMeshComponent", + "Id": 16184381538555246534, + "Controller": { + "Configuration": { + "ModelAsset": { + "assetId": { + "guid": "{E14975EF-E676-51A4-B826-3EF59CB645AA}", + "subId": 285127096 + }, + "assetHint": "testdata/objects/cube/cube.azmodel" + } + } + } + }, + "Component_[17962478023087084794]": { + "$type": "SelectionComponent", + "Id": 17962478023087084794 + }, + "Component_[18071675051915092508]": { + "$type": "EditorEntityIconComponent", + "Id": 18071675051915092508 + }, + "Component_[2115498007879087044]": { + "$type": "EditorInspectorComponent", + "Id": 2115498007879087044, + "ComponentOrderEntryArray": [ + { + "ComponentId": 399415038452606756 + }, + { + "ComponentId": 16184381538555246534, + "SortIndex": 1 + }, + { + "ComponentId": 7827190074535394331, + "SortIndex": 2 + } + ] + }, + "Component_[3518973002096080237]": { + "$type": "EditorOnlyEntityComponent", + "Id": 3518973002096080237 + }, + "Component_[399415038452606756]": { + "$type": "{27F1E1A1-8D9D-4C3B-BD3A-AFB9762449C0} TransformComponent", + "Id": 399415038452606756, + "Parent Entity": "ContainerEntity", + "Transform Data": { + "Translate": [ + 47.53014373779297, + -0.00018183141946792603, + 49.593753814697266 + ] + } + }, + "Component_[4564240319609068082]": { + "$type": "EditorEntitySortComponent", + "Id": 4564240319609068082 + }, + "Component_[7827190074535394331]": { + "$type": "EditorMaterialComponent", + "Id": 7827190074535394331, + "Controller": { + "Configuration": { + "materials": [ + { + "Key": { + "materialSlotStableId": 2418540911 + }, + "Value": { + "MaterialAsset": { + "assetId": { + "guid": "{970148AC-7258-5EC8-9CE7-F4EF93164D93}" + }, + "assetHint": "materials/presets/pbr/metal_iron_matte.azmaterial" + } + } + } + ] + } + } + }, + "Component_[8092226976542590265]": { + "$type": "EditorDisabledCompositionComponent", + "Id": 8092226976542590265 + } + } + }, + "Entity_[3227984717780]": { + "Id": "Entity_[3227984717780]", + "Name": "Entity1", + "Components": { + "Component_[11525365929370623807]": { + "$type": "EditorVisibilityComponent", + "Id": 11525365929370623807 + }, + "Component_[12334620273692642550]": { + "$type": "EditorLockComponent", + "Id": 12334620273692642550 + }, + "Component_[14389735759337977675]": { + "$type": "EditorPendingCompositionComponent", + "Id": 14389735759337977675 + }, + "Component_[16184381538555246534]": { + "$type": "AZ::Render::EditorMeshComponent", + "Id": 16184381538555246534, + "Controller": { + "Configuration": { + "ModelAsset": { + "assetId": { + "guid": "{E14975EF-E676-51A4-B826-3EF59CB645AA}", + "subId": 285127096 + }, + "assetHint": "testdata/objects/cube/cube.azmodel" + } + } + } + }, + "Component_[17962478023087084794]": { + "$type": "SelectionComponent", + "Id": 17962478023087084794 + }, + "Component_[18071675051915092508]": { + "$type": "EditorEntityIconComponent", + "Id": 18071675051915092508 + }, + "Component_[2115498007879087044]": { + "$type": "EditorInspectorComponent", + "Id": 2115498007879087044, + "ComponentOrderEntryArray": [ + { + "ComponentId": 399415038452606756 + }, + { + "ComponentId": 16184381538555246534, + "SortIndex": 1 + }, + { + "ComponentId": 7827190074535394331, + "SortIndex": 2 + } + ] + }, + "Component_[3518973002096080237]": { + "$type": "EditorOnlyEntityComponent", + "Id": 3518973002096080237 + }, + "Component_[399415038452606756]": { + "$type": "{27F1E1A1-8D9D-4C3B-BD3A-AFB9762449C0} TransformComponent", + "Id": 399415038452606756, + "Parent Entity": "ContainerEntity", + "Transform Data": { + "Translate": [ + 17.53014373779297, + -0.00018183141946792603, + 30.08451271057129 + ] + } + }, + "Component_[4564240319609068082]": { + "$type": "EditorEntitySortComponent", + "Id": 4564240319609068082 + }, + "Component_[7827190074535394331]": { + "$type": "EditorMaterialComponent", + "Id": 7827190074535394331, + "Controller": { + "Configuration": { + "materials": [ + { + "Key": {}, + "Value": { + "MaterialAsset": { + "assetId": { + "guid": "{721188E0-B7CC-5D06-8D5D-39AF8ABF2EF9}" + }, + "assetHint": "materials/presets/pbr/metal_titanium.azmaterial" + } + } + }, + { + "Key": { + "materialSlotStableId": 2418540911 + }, + "Value": { + "MaterialAsset": { + "assetId": { + "guid": "{64C1F6A6-6BDA-551A-BE56-1829E5913278}" + }, + "assetHint": "materials/presets/pbr/metal_aluminum_polished.azmaterial" + } + } + } + ] + } + } + }, + "Component_[8092226976542590265]": { + "$type": "EditorDisabledCompositionComponent", + "Id": 8092226976542590265 + } + } + }, + "Entity_[3232279685076]": { + "Id": "Entity_[3232279685076]", + "Name": "Entity1", + "Components": { + "Component_[11525365929370623807]": { + "$type": "EditorVisibilityComponent", + "Id": 11525365929370623807 + }, + "Component_[12334620273692642550]": { + "$type": "EditorLockComponent", + "Id": 12334620273692642550 + }, + "Component_[14389735759337977675]": { + "$type": "EditorPendingCompositionComponent", + "Id": 14389735759337977675 + }, + "Component_[16184381538555246534]": { + "$type": "AZ::Render::EditorMeshComponent", + "Id": 16184381538555246534, + "Controller": { + "Configuration": { + "ModelAsset": { + "assetId": { + "guid": "{E14975EF-E676-51A4-B826-3EF59CB645AA}", + "subId": 285127096 + }, + "assetHint": "testdata/objects/cube/cube.azmodel" + } + } + } + }, + "Component_[17962478023087084794]": { + "$type": "SelectionComponent", + "Id": 17962478023087084794 + }, + "Component_[18071675051915092508]": { + "$type": "EditorEntityIconComponent", + "Id": 18071675051915092508 + }, + "Component_[2115498007879087044]": { + "$type": "EditorInspectorComponent", + "Id": 2115498007879087044, + "ComponentOrderEntryArray": [ + { + "ComponentId": 399415038452606756 + }, + { + "ComponentId": 16184381538555246534, + "SortIndex": 1 + }, + { + "ComponentId": 7827190074535394331, + "SortIndex": 2 + } + ] + }, + "Component_[3518973002096080237]": { + "$type": "EditorOnlyEntityComponent", + "Id": 3518973002096080237 + }, + "Component_[399415038452606756]": { + "$type": "{27F1E1A1-8D9D-4C3B-BD3A-AFB9762449C0} TransformComponent", + "Id": 399415038452606756, + "Parent Entity": "ContainerEntity", + "Transform Data": { + "Translate": [ + -32.53056335449219, + -0.00018183141946792603, + 19.50924301147461 + ] + } + }, + "Component_[4564240319609068082]": { + "$type": "EditorEntitySortComponent", + "Id": 4564240319609068082 + }, + "Component_[7827190074535394331]": { + "$type": "EditorMaterialComponent", + "Id": 7827190074535394331, + "Controller": { + "Configuration": { + "materials": [ + { + "Key": { + "materialSlotStableId": 2418540911 + }, + "Value": { + "MaterialAsset": { + "assetId": { + "guid": "{C60A39AF-BB76-51BD-9468-A88C9A6F78D7}" + }, + "assetHint": "materials/presets/pbr/metal_cobalt_matte.azmaterial" + } + } + } + ] + } + } + }, + "Component_[8092226976542590265]": { + "$type": "EditorDisabledCompositionComponent", + "Id": 8092226976542590265 + } + } + }, + "Entity_[3236574652372]": { + "Id": "Entity_[3236574652372]", + "Name": "Entity1", + "Components": { + "Component_[11525365929370623807]": { + "$type": "EditorVisibilityComponent", + "Id": 11525365929370623807 + }, + "Component_[12334620273692642550]": { + "$type": "EditorLockComponent", + "Id": 12334620273692642550 + }, + "Component_[14389735759337977675]": { + "$type": "EditorPendingCompositionComponent", + "Id": 14389735759337977675 + }, + "Component_[16184381538555246534]": { + "$type": "AZ::Render::EditorMeshComponent", + "Id": 16184381538555246534, + "Controller": { + "Configuration": { + "ModelAsset": { + "assetId": { + "guid": "{E14975EF-E676-51A4-B826-3EF59CB645AA}", + "subId": 285127096 + }, + "assetHint": "testdata/objects/cube/cube.azmodel" + } + } + } + }, + "Component_[17962478023087084794]": { + "$type": "SelectionComponent", + "Id": 17962478023087084794 + }, + "Component_[18071675051915092508]": { + "$type": "EditorEntityIconComponent", + "Id": 18071675051915092508 + }, + "Component_[2115498007879087044]": { + "$type": "EditorInspectorComponent", + "Id": 2115498007879087044, + "ComponentOrderEntryArray": [ + { + "ComponentId": 399415038452606756 + }, + { + "ComponentId": 16184381538555246534, + "SortIndex": 1 + }, + { + "ComponentId": 7827190074535394331, + "SortIndex": 2 + } + ] + }, + "Component_[3518973002096080237]": { + "$type": "EditorOnlyEntityComponent", + "Id": 3518973002096080237 + }, + "Component_[399415038452606756]": { + "$type": "{27F1E1A1-8D9D-4C3B-BD3A-AFB9762449C0} TransformComponent", + "Id": 399415038452606756, + "Parent Entity": "ContainerEntity", + "Transform Data": { + "Translate": [ + 47.53014373779297, + -0.00018183141946792603, + 84.40655517578125 + ] + } + }, + "Component_[4564240319609068082]": { + "$type": "EditorEntitySortComponent", + "Id": 4564240319609068082 + }, + "Component_[7827190074535394331]": { + "$type": "EditorMaterialComponent", + "Id": 7827190074535394331, + "Controller": { + "Configuration": { + "materials": [ + { + "Key": { + "materialSlotStableId": 2418540911 + }, + "Value": { + "MaterialAsset": { + "assetId": { + "guid": "{892EA944-0325-5FA6-94D7-4AB4FC02A0F5}" + }, + "assetHint": "materials/presets/pbr/metal_iron.azmaterial" + } + } + } + ] + } + } + }, + "Component_[8092226976542590265]": { + "$type": "EditorDisabledCompositionComponent", + "Id": 8092226976542590265 + } + } + }, + "Entity_[3240869619668]": { + "Id": "Entity_[3240869619668]", + "Name": "Entity1", + "Components": { + "Component_[11525365929370623807]": { + "$type": "EditorVisibilityComponent", + "Id": 11525365929370623807 + }, + "Component_[12334620273692642550]": { + "$type": "EditorLockComponent", + "Id": 12334620273692642550 + }, + "Component_[14389735759337977675]": { + "$type": "EditorPendingCompositionComponent", + "Id": 14389735759337977675 + }, + "Component_[16184381538555246534]": { + "$type": "AZ::Render::EditorMeshComponent", + "Id": 16184381538555246534, + "Controller": { + "Configuration": { + "ModelAsset": { + "assetId": { + "guid": "{E14975EF-E676-51A4-B826-3EF59CB645AA}", + "subId": 285127096 + }, + "assetHint": "testdata/objects/cube/cube.azmodel" + } + } + } + }, + "Component_[17962478023087084794]": { + "$type": "SelectionComponent", + "Id": 17962478023087084794 + }, + "Component_[18071675051915092508]": { + "$type": "EditorEntityIconComponent", + "Id": 18071675051915092508 + }, + "Component_[2115498007879087044]": { + "$type": "EditorInspectorComponent", + "Id": 2115498007879087044, + "ComponentOrderEntryArray": [ + { + "ComponentId": 399415038452606756 + }, + { + "ComponentId": 16184381538555246534, + "SortIndex": 1 + }, + { + "ComponentId": 7827190074535394331, + "SortIndex": 2 + } + ] + }, + "Component_[3518973002096080237]": { + "$type": "EditorOnlyEntityComponent", + "Id": 3518973002096080237 + }, + "Component_[399415038452606756]": { + "$type": "{27F1E1A1-8D9D-4C3B-BD3A-AFB9762449C0} TransformComponent", + "Id": 399415038452606756, + "Parent Entity": "ContainerEntity", + "Transform Data": { + "Translate": [ + -37.53056335449219, + -0.00018183141946792603, + 114.4910659790039 + ] + } + }, + "Component_[4564240319609068082]": { + "$type": "EditorEntitySortComponent", + "Id": 4564240319609068082 + }, + "Component_[7827190074535394331]": { + "$type": "EditorMaterialComponent", + "Id": 7827190074535394331, + "Controller": { + "Configuration": { + "materials": [ + { + "Key": { + "materialSlotStableId": 2418540911 + }, + "Value": { + "MaterialAsset": { + "assetId": { + "guid": "{B7C712DC-4839-58BB-B522-A4F120084CF5}" + }, + "assetHint": "materials/presets/pbr/metal_chrome.azmaterial" + } + } + } + ] + } + } + }, + "Component_[8092226976542590265]": { + "$type": "EditorDisabledCompositionComponent", + "Id": 8092226976542590265 + } + } + }, + "Entity_[3245164586964]": { + "Id": "Entity_[3245164586964]", + "Name": "Entity1", + "Components": { + "Component_[11525365929370623807]": { + "$type": "EditorVisibilityComponent", + "Id": 11525365929370623807 + }, + "Component_[12334620273692642550]": { + "$type": "EditorLockComponent", + "Id": 12334620273692642550 + }, + "Component_[14389735759337977675]": { + "$type": "EditorPendingCompositionComponent", + "Id": 14389735759337977675 + }, + "Component_[16184381538555246534]": { + "$type": "AZ::Render::EditorMeshComponent", + "Id": 16184381538555246534, + "Controller": { + "Configuration": { + "ModelAsset": { + "assetId": { + "guid": "{E14975EF-E676-51A4-B826-3EF59CB645AA}", + "subId": 285127096 + }, + "assetHint": "testdata/objects/cube/cube.azmodel" + } + } + } + }, + "Component_[17962478023087084794]": { + "$type": "SelectionComponent", + "Id": 17962478023087084794 + }, + "Component_[18071675051915092508]": { + "$type": "EditorEntityIconComponent", + "Id": 18071675051915092508 + }, + "Component_[2115498007879087044]": { + "$type": "EditorInspectorComponent", + "Id": 2115498007879087044, + "ComponentOrderEntryArray": [ + { + "ComponentId": 399415038452606756 + }, + { + "ComponentId": 16184381538555246534, + "SortIndex": 1 + }, + { + "ComponentId": 7827190074535394331, + "SortIndex": 2 + } + ] + }, + "Component_[3518973002096080237]": { + "$type": "EditorOnlyEntityComponent", + "Id": 3518973002096080237 + }, + "Component_[399415038452606756]": { + "$type": "{27F1E1A1-8D9D-4C3B-BD3A-AFB9762449C0} TransformComponent", + "Id": 399415038452606756, + "Parent Entity": "ContainerEntity", + "Transform Data": { + "Translate": [ + -2.5305633544921875, + -0.00018183141946792603, + 0.0 + ] + } + }, + "Component_[4564240319609068082]": { + "$type": "EditorEntitySortComponent", + "Id": 4564240319609068082 + }, + "Component_[7827190074535394331]": { + "$type": "EditorMaterialComponent", + "Id": 7827190074535394331, + "Controller": { + "Configuration": { + "materials": [ + { + "Key": { + "materialSlotStableId": 2418540911 + }, + "Value": { + "MaterialAsset": { + "assetId": { + "guid": "{D0E9960A-4B31-5136-BAC6-5482B203D3B4}" + }, + "assetHint": "materials/presets/pbr/metal_palladium_polished.azmaterial" + } + } + } + ] + } + } + }, + "Component_[8092226976542590265]": { + "$type": "EditorDisabledCompositionComponent", + "Id": 8092226976542590265 + } + } + }, + "Entity_[3249459554260]": { + "Id": "Entity_[3249459554260]", + "Name": "Entity1", + "Components": { + "Component_[11525365929370623807]": { + "$type": "EditorVisibilityComponent", + "Id": 11525365929370623807 + }, + "Component_[12334620273692642550]": { + "$type": "EditorLockComponent", + "Id": 12334620273692642550 + }, + "Component_[14389735759337977675]": { + "$type": "EditorPendingCompositionComponent", + "Id": 14389735759337977675 + }, + "Component_[16184381538555246534]": { + "$type": "AZ::Render::EditorMeshComponent", + "Id": 16184381538555246534, + "Controller": { + "Configuration": { + "ModelAsset": { + "assetId": { + "guid": "{E14975EF-E676-51A4-B826-3EF59CB645AA}", + "subId": 285127096 + }, + "assetHint": "testdata/objects/cube/cube.azmodel" + } + } + } + }, + "Component_[17962478023087084794]": { + "$type": "SelectionComponent", + "Id": 17962478023087084794 + }, + "Component_[18071675051915092508]": { + "$type": "EditorEntityIconComponent", + "Id": 18071675051915092508 + }, + "Component_[2115498007879087044]": { + "$type": "EditorInspectorComponent", + "Id": 2115498007879087044, + "ComponentOrderEntryArray": [ + { + "ComponentId": 399415038452606756 + }, + { + "ComponentId": 16184381538555246534, + "SortIndex": 1 + }, + { + "ComponentId": 7827190074535394331, + "SortIndex": 2 + } + ] + }, + "Component_[3518973002096080237]": { + "$type": "EditorOnlyEntityComponent", + "Id": 3518973002096080237 + }, + "Component_[399415038452606756]": { + "$type": "{27F1E1A1-8D9D-4C3B-BD3A-AFB9762449C0} TransformComponent", + "Id": 399415038452606756, + "Parent Entity": "ContainerEntity", + "Transform Data": { + "Translate": [ + -17.530563354492188, + -0.00018183141946792603, + 34.53608703613281 + ] + } + }, + "Component_[4564240319609068082]": { + "$type": "EditorEntitySortComponent", + "Id": 4564240319609068082 + }, + "Component_[7827190074535394331]": { + "$type": "EditorMaterialComponent", + "Id": 7827190074535394331, + "Controller": { + "Configuration": { + "materials": [ + { + "Key": { + "materialSlotStableId": 2418540911 + }, + "Value": { + "MaterialAsset": { + "assetId": { + "guid": "{970148AC-7258-5EC8-9CE7-F4EF93164D93}" + }, + "assetHint": "materials/presets/pbr/metal_iron_matte.azmaterial" + } + } + } + ] + } + } + }, + "Component_[8092226976542590265]": { + "$type": "EditorDisabledCompositionComponent", + "Id": 8092226976542590265 + } + } + }, + "Entity_[3253754521556]": { + "Id": "Entity_[3253754521556]", + "Name": "Entity1", + "Components": { + "Component_[11525365929370623807]": { + "$type": "EditorVisibilityComponent", + "Id": 11525365929370623807 + }, + "Component_[12334620273692642550]": { + "$type": "EditorLockComponent", + "Id": 12334620273692642550 + }, + "Component_[14389735759337977675]": { + "$type": "EditorPendingCompositionComponent", + "Id": 14389735759337977675 + }, + "Component_[16184381538555246534]": { + "$type": "AZ::Render::EditorMeshComponent", + "Id": 16184381538555246534, + "Controller": { + "Configuration": { + "ModelAsset": { + "assetId": { + "guid": "{E14975EF-E676-51A4-B826-3EF59CB645AA}", + "subId": 285127096 + }, + "assetHint": "testdata/objects/cube/cube.azmodel" + } + } + } + }, + "Component_[17962478023087084794]": { + "$type": "SelectionComponent", + "Id": 17962478023087084794 + }, + "Component_[18071675051915092508]": { + "$type": "EditorEntityIconComponent", + "Id": 18071675051915092508 + }, + "Component_[2115498007879087044]": { + "$type": "EditorInspectorComponent", + "Id": 2115498007879087044, + "ComponentOrderEntryArray": [ + { + "ComponentId": 399415038452606756 + }, + { + "ComponentId": 16184381538555246534, + "SortIndex": 1 + }, + { + "ComponentId": 7827190074535394331, + "SortIndex": 2 + } + ] + }, + "Component_[3518973002096080237]": { + "$type": "EditorOnlyEntityComponent", + "Id": 3518973002096080237 + }, + "Component_[399415038452606756]": { + "$type": "{27F1E1A1-8D9D-4C3B-BD3A-AFB9762449C0} TransformComponent", + "Id": 399415038452606756, + "Parent Entity": "ContainerEntity", + "Transform Data": { + "Translate": [ + 27.53014373779297, + -0.00018183141946792603, + 9.475835800170898 + ] + } + }, + "Component_[4564240319609068082]": { + "$type": "EditorEntitySortComponent", + "Id": 4564240319609068082 + }, + "Component_[7827190074535394331]": { + "$type": "EditorMaterialComponent", + "Id": 7827190074535394331, + "Controller": { + "Configuration": { + "materials": [ + { + "Key": { + "materialSlotStableId": 2418540911 + }, + "Value": { + "MaterialAsset": { + "assetId": { + "guid": "{B7C712DC-4839-58BB-B522-A4F120084CF5}" + }, + "assetHint": "materials/presets/pbr/metal_chrome.azmaterial" + } + } + } + ] + } + } + }, + "Component_[8092226976542590265]": { + "$type": "EditorDisabledCompositionComponent", + "Id": 8092226976542590265 + } + } + }, + "Entity_[3258049488852]": { + "Id": "Entity_[3258049488852]", + "Name": "Entity1", + "Components": { + "Component_[11525365929370623807]": { + "$type": "EditorVisibilityComponent", + "Id": 11525365929370623807 + }, + "Component_[12334620273692642550]": { + "$type": "EditorLockComponent", + "Id": 12334620273692642550 + }, + "Component_[14389735759337977675]": { + "$type": "EditorPendingCompositionComponent", + "Id": 14389735759337977675 + }, + "Component_[16184381538555246534]": { + "$type": "AZ::Render::EditorMeshComponent", + "Id": 16184381538555246534, + "Controller": { + "Configuration": { + "ModelAsset": { + "assetId": { + "guid": "{E14975EF-E676-51A4-B826-3EF59CB645AA}", + "subId": 285127096 + }, + "assetHint": "testdata/objects/cube/cube.azmodel" + } + } + } + }, + "Component_[17962478023087084794]": { + "$type": "SelectionComponent", + "Id": 17962478023087084794 + }, + "Component_[18071675051915092508]": { + "$type": "EditorEntityIconComponent", + "Id": 18071675051915092508 + }, + "Component_[2115498007879087044]": { + "$type": "EditorInspectorComponent", + "Id": 2115498007879087044, + "ComponentOrderEntryArray": [ + { + "ComponentId": 399415038452606756 + }, + { + "ComponentId": 16184381538555246534, + "SortIndex": 1 + }, + { + "ComponentId": 7827190074535394331, + "SortIndex": 2 + } + ] + }, + "Component_[3518973002096080237]": { + "$type": "EditorOnlyEntityComponent", + "Id": 3518973002096080237 + }, + "Component_[399415038452606756]": { + "$type": "{27F1E1A1-8D9D-4C3B-BD3A-AFB9762449C0} TransformComponent", + "Id": 399415038452606756, + "Parent Entity": "ContainerEntity", + "Transform Data": { + "Translate": [ + -12.530563354492188, + -0.00018183141946792603, + 109.46680450439453 + ] + } + }, + "Component_[4564240319609068082]": { + "$type": "EditorEntitySortComponent", + "Id": 4564240319609068082 + }, + "Component_[7827190074535394331]": { + "$type": "EditorMaterialComponent", + "Id": 7827190074535394331, + "Controller": { + "Configuration": { + "materials": [ + { + "Key": { + "materialSlotStableId": 2418540911 + }, + "Value": { + "MaterialAsset": { + "assetId": { + "guid": "{F2AD0EBF-7137-58D1-9991-9552FAD41B19}" + }, + "assetHint": "materials/presets/pbr/metal_mercury.azmaterial" + } + } + } + ] + } + } + }, + "Component_[8092226976542590265]": { + "$type": "EditorDisabledCompositionComponent", + "Id": 8092226976542590265 + } + } + }, + "Entity_[3262344456148]": { + "Id": "Entity_[3262344456148]", + "Name": "Entity1", + "Components": { + "Component_[11525365929370623807]": { + "$type": "EditorVisibilityComponent", + "Id": 11525365929370623807 + }, + "Component_[12334620273692642550]": { + "$type": "EditorLockComponent", + "Id": 12334620273692642550 + }, + "Component_[14389735759337977675]": { + "$type": "EditorPendingCompositionComponent", + "Id": 14389735759337977675 + }, + "Component_[16184381538555246534]": { + "$type": "AZ::Render::EditorMeshComponent", + "Id": 16184381538555246534, + "Controller": { + "Configuration": { + "ModelAsset": { + "assetId": { + "guid": "{E14975EF-E676-51A4-B826-3EF59CB645AA}", + "subId": 285127096 + }, + "assetHint": "testdata/objects/cube/cube.azmodel" + } + } + } + }, + "Component_[17962478023087084794]": { + "$type": "SelectionComponent", + "Id": 17962478023087084794 + }, + "Component_[18071675051915092508]": { + "$type": "EditorEntityIconComponent", + "Id": 18071675051915092508 + }, + "Component_[2115498007879087044]": { + "$type": "EditorInspectorComponent", + "Id": 2115498007879087044, + "ComponentOrderEntryArray": [ + { + "ComponentId": 399415038452606756 + }, + { + "ComponentId": 16184381538555246534, + "SortIndex": 1 + }, + { + "ComponentId": 7827190074535394331, + "SortIndex": 2 + } + ] + }, + "Component_[3518973002096080237]": { + "$type": "EditorOnlyEntityComponent", + "Id": 3518973002096080237 + }, + "Component_[399415038452606756]": { + "$type": "{27F1E1A1-8D9D-4C3B-BD3A-AFB9762449C0} TransformComponent", + "Id": 399415038452606756, + "Parent Entity": "ContainerEntity", + "Transform Data": { + "Translate": [ + -27.530563354492188, + -0.00018183141946792603, + 59.873046875 + ] + } + }, + "Component_[4564240319609068082]": { + "$type": "EditorEntitySortComponent", + "Id": 4564240319609068082 + }, + "Component_[7827190074535394331]": { + "$type": "EditorMaterialComponent", + "Id": 7827190074535394331, + "Controller": { + "Configuration": { + "materials": [ + { + "Key": { + "materialSlotStableId": 2418540911 + }, + "Value": { + "MaterialAsset": { + "assetId": { + "guid": "{CF5C7B01-4912-58AE-991A-F25251E505AC}" + }, + "assetHint": "materials/presets/pbr/metal_copper_polished.azmaterial" + } + } + } + ] + } + } + }, + "Component_[8092226976542590265]": { + "$type": "EditorDisabledCompositionComponent", + "Id": 8092226976542590265 + } + } + }, + "Entity_[3266639423444]": { + "Id": "Entity_[3266639423444]", + "Name": "Entity1", + "Components": { + "Component_[11525365929370623807]": { + "$type": "EditorVisibilityComponent", + "Id": 11525365929370623807 + }, + "Component_[12334620273692642550]": { + "$type": "EditorLockComponent", + "Id": 12334620273692642550 + }, + "Component_[14389735759337977675]": { + "$type": "EditorPendingCompositionComponent", + "Id": 14389735759337977675 + }, + "Component_[16184381538555246534]": { + "$type": "AZ::Render::EditorMeshComponent", + "Id": 16184381538555246534, + "Controller": { + "Configuration": { + "ModelAsset": { + "assetId": { + "guid": "{E14975EF-E676-51A4-B826-3EF59CB645AA}", + "subId": 285127096 + }, + "assetHint": "testdata/objects/cube/cube.azmodel" + } + } + } + }, + "Component_[17962478023087084794]": { + "$type": "SelectionComponent", + "Id": 17962478023087084794 + }, + "Component_[18071675051915092508]": { + "$type": "EditorEntityIconComponent", + "Id": 18071675051915092508 + }, + "Component_[2115498007879087044]": { + "$type": "EditorInspectorComponent", + "Id": 2115498007879087044, + "ComponentOrderEntryArray": [ + { + "ComponentId": 399415038452606756 + }, + { + "ComponentId": 16184381538555246534, + "SortIndex": 1 + }, + { + "ComponentId": 7827190074535394331, + "SortIndex": 2 + } + ] + }, + "Component_[3518973002096080237]": { + "$type": "EditorOnlyEntityComponent", + "Id": 3518973002096080237 + }, + "Component_[399415038452606756]": { + "$type": "{27F1E1A1-8D9D-4C3B-BD3A-AFB9762449C0} TransformComponent", + "Id": 399415038452606756, + "Parent Entity": "ContainerEntity", + "Transform Data": { + "Translate": [ + 37.53014373779297, + -0.00018183141946792603, + 49.593753814697266 + ] + } + }, + "Component_[4564240319609068082]": { + "$type": "EditorEntitySortComponent", + "Id": 4564240319609068082 + }, + "Component_[7827190074535394331]": { + "$type": "EditorMaterialComponent", + "Id": 7827190074535394331, + "Controller": { + "Configuration": { + "materials": [ + { + "Key": { + "materialSlotStableId": 2418540911 + }, + "Value": { + "MaterialAsset": { + "assetId": { + "guid": "{2D054071-BEF7-53C0-A8C9-E4F026BD8364}" + }, + "assetHint": "materials/presets/pbr/metal_copper_matte.azmaterial" + } + } + } + ] + } + } + }, + "Component_[8092226976542590265]": { + "$type": "EditorDisabledCompositionComponent", + "Id": 8092226976542590265 + } + } + }, + "Entity_[3270934390740]": { + "Id": "Entity_[3270934390740]", + "Name": "Entity1", + "Components": { + "Component_[1057179753323467068]": { + "$type": "EditorMaterialComponent", + "Id": 1057179753323467068, + "Controller": { + "Configuration": { + "materials": [ + { + "Key": { + "materialSlotStableId": 2418540911 + }, + "Value": { + "MaterialAsset": { + "assetId": { + "guid": "{721188E0-B7CC-5D06-8D5D-39AF8ABF2EF9}" + }, + "assetHint": "materials/presets/pbr/metal_titanium.azmaterial" + } + } + } + ] + } + } + }, + "Component_[11525365929370623807]": { + "$type": "EditorVisibilityComponent", + "Id": 11525365929370623807 + }, + "Component_[12334620273692642550]": { + "$type": "EditorLockComponent", + "Id": 12334620273692642550 + }, + "Component_[14389735759337977675]": { + "$type": "EditorPendingCompositionComponent", + "Id": 14389735759337977675 + }, + "Component_[16184381538555246534]": { + "$type": "AZ::Render::EditorMeshComponent", + "Id": 16184381538555246534, + "Controller": { + "Configuration": { + "ModelAsset": { + "assetId": { + "guid": "{E14975EF-E676-51A4-B826-3EF59CB645AA}", + "subId": 285127096 + }, + "assetHint": "testdata/objects/cube/cube.azmodel" + } + } + } + }, + "Component_[17962478023087084794]": { + "$type": "SelectionComponent", + "Id": 17962478023087084794 + }, + "Component_[18071675051915092508]": { + "$type": "EditorEntityIconComponent", + "Id": 18071675051915092508 + }, + "Component_[2115498007879087044]": { + "$type": "EditorInspectorComponent", + "Id": 2115498007879087044, + "ComponentOrderEntryArray": [ + { + "ComponentId": 399415038452606756 + }, + { + "ComponentId": 16184381538555246534, + "SortIndex": 1 + }, + { + "ComponentId": 1057179753323467068, + "SortIndex": 2 + } + ] + }, + "Component_[3518973002096080237]": { + "$type": "EditorOnlyEntityComponent", + "Id": 3518973002096080237 + }, + "Component_[399415038452606756]": { + "$type": "{27F1E1A1-8D9D-4C3B-BD3A-AFB9762449C0} TransformComponent", + "Id": 399415038452606756, + "Parent Entity": "ContainerEntity", + "Transform Data": { + "Translate": [ + 12.530143737792969, + -0.00018183141946792603, + 24.533506393432617 + ] + } + }, + "Component_[4564240319609068082]": { + "$type": "EditorEntitySortComponent", + "Id": 4564240319609068082 + }, + "Component_[8092226976542590265]": { + "$type": "EditorDisabledCompositionComponent", + "Id": 8092226976542590265 + } + } + }, + "Entity_[3275229358036]": { + "Id": "Entity_[3275229358036]", + "Name": "Entity1", + "Components": { + "Component_[11525365929370623807]": { + "$type": "EditorVisibilityComponent", + "Id": 11525365929370623807 + }, + "Component_[12334620273692642550]": { + "$type": "EditorLockComponent", + "Id": 12334620273692642550 + }, + "Component_[14389735759337977675]": { + "$type": "EditorPendingCompositionComponent", + "Id": 14389735759337977675 + }, + "Component_[16184381538555246534]": { + "$type": "AZ::Render::EditorMeshComponent", + "Id": 16184381538555246534, + "Controller": { + "Configuration": { + "ModelAsset": { + "assetId": { + "guid": "{E14975EF-E676-51A4-B826-3EF59CB645AA}", + "subId": 285127096 + }, + "assetHint": "testdata/objects/cube/cube.azmodel" + } + } + } + }, + "Component_[17962478023087084794]": { + "$type": "SelectionComponent", + "Id": 17962478023087084794 + }, + "Component_[18071675051915092508]": { + "$type": "EditorEntityIconComponent", + "Id": 18071675051915092508 + }, + "Component_[2115498007879087044]": { + "$type": "EditorInspectorComponent", + "Id": 2115498007879087044, + "ComponentOrderEntryArray": [ + { + "ComponentId": 399415038452606756 + }, + { + "ComponentId": 16184381538555246534, + "SortIndex": 1 + }, + { + "ComponentId": 7827190074535394331, + "SortIndex": 2 + } + ] + }, + "Component_[3518973002096080237]": { + "$type": "EditorOnlyEntityComponent", + "Id": 3518973002096080237 + }, + "Component_[399415038452606756]": { + "$type": "{27F1E1A1-8D9D-4C3B-BD3A-AFB9762449C0} TransformComponent", + "Id": 399415038452606756, + "Parent Entity": "ContainerEntity", + "Transform Data": { + "Translate": [ + 37.53014373779297, + -0.00018183141946792603, + 34.53608703613281 + ] + } + }, + "Component_[4564240319609068082]": { + "$type": "EditorEntitySortComponent", + "Id": 4564240319609068082 + }, + "Component_[7827190074535394331]": { + "$type": "EditorMaterialComponent", + "Id": 7827190074535394331, + "Controller": { + "Configuration": { + "materials": [ + { + "Key": { + "materialSlotStableId": 2418540911 + }, + "Value": { + "MaterialAsset": { + "assetId": { + "guid": "{2D054071-BEF7-53C0-A8C9-E4F026BD8364}" + }, + "assetHint": "materials/presets/pbr/metal_copper_matte.azmaterial" + } + } + } + ] + } + } + }, + "Component_[8092226976542590265]": { + "$type": "EditorDisabledCompositionComponent", + "Id": 8092226976542590265 + } + } + }, + "Entity_[3279524325332]": { + "Id": "Entity_[3279524325332]", + "Name": "Entity1", + "Components": { + "Component_[11525365929370623807]": { + "$type": "EditorVisibilityComponent", + "Id": 11525365929370623807 + }, + "Component_[12334620273692642550]": { + "$type": "EditorLockComponent", + "Id": 12334620273692642550 + }, + "Component_[14389735759337977675]": { + "$type": "EditorPendingCompositionComponent", + "Id": 14389735759337977675 + }, + "Component_[16184381538555246534]": { + "$type": "AZ::Render::EditorMeshComponent", + "Id": 16184381538555246534, + "Controller": { + "Configuration": { + "ModelAsset": { + "assetId": { + "guid": "{E14975EF-E676-51A4-B826-3EF59CB645AA}", + "subId": 285127096 + }, + "assetHint": "testdata/objects/cube/cube.azmodel" + } + } + } + }, + "Component_[17962478023087084794]": { + "$type": "SelectionComponent", + "Id": 17962478023087084794 + }, + "Component_[18071675051915092508]": { + "$type": "EditorEntityIconComponent", + "Id": 18071675051915092508 + }, + "Component_[2115498007879087044]": { + "$type": "EditorInspectorComponent", + "Id": 2115498007879087044, + "ComponentOrderEntryArray": [ + { + "ComponentId": 399415038452606756 + }, + { + "ComponentId": 16184381538555246534, + "SortIndex": 1 + }, + { + "ComponentId": 7827190074535394331, + "SortIndex": 2 + } + ] + }, + "Component_[3518973002096080237]": { + "$type": "EditorOnlyEntityComponent", + "Id": 3518973002096080237 + }, + "Component_[399415038452606756]": { + "$type": "{27F1E1A1-8D9D-4C3B-BD3A-AFB9762449C0} TransformComponent", + "Id": 399415038452606756, + "Parent Entity": "ContainerEntity", + "Transform Data": { + "Translate": [ + -47.53056335449219, + -0.00018183141946792603, + 69.34888458251953 + ] + } + }, + "Component_[4564240319609068082]": { + "$type": "EditorEntitySortComponent", + "Id": 4564240319609068082 + }, + "Component_[7827190074535394331]": { + "$type": "EditorMaterialComponent", + "Id": 7827190074535394331, + "Controller": { + "Configuration": { + "materials": [ + { + "Key": { + "materialSlotStableId": 2418540911 + }, + "Value": { + "MaterialAsset": { + "assetId": { + "guid": "{94CF2BD7-7D09-5577-B1D8-3FF85B15E127}" + }, + "assetHint": "materials/presets/pbr/metal_aluminum.azmaterial" + } + } + } + ] + } + } + }, + "Component_[8092226976542590265]": { + "$type": "EditorDisabledCompositionComponent", + "Id": 8092226976542590265 + } + } + }, + "Entity_[3283819292628]": { + "Id": "Entity_[3283819292628]", + "Name": "Entity1", + "Components": { + "Component_[11525365929370623807]": { + "$type": "EditorVisibilityComponent", + "Id": 11525365929370623807 + }, + "Component_[12334620273692642550]": { + "$type": "EditorLockComponent", + "Id": 12334620273692642550 + }, + "Component_[14389735759337977675]": { + "$type": "EditorPendingCompositionComponent", + "Id": 14389735759337977675 + }, + "Component_[16184381538555246534]": { + "$type": "AZ::Render::EditorMeshComponent", + "Id": 16184381538555246534, + "Controller": { + "Configuration": { + "ModelAsset": { + "assetId": { + "guid": "{E14975EF-E676-51A4-B826-3EF59CB645AA}", + "subId": 285127096 + }, + "assetHint": "testdata/objects/cube/cube.azmodel" + } + } + } + }, + "Component_[17962478023087084794]": { + "$type": "SelectionComponent", + "Id": 17962478023087084794 + }, + "Component_[18071675051915092508]": { + "$type": "EditorEntityIconComponent", + "Id": 18071675051915092508 + }, + "Component_[2115498007879087044]": { + "$type": "EditorInspectorComponent", + "Id": 2115498007879087044, + "ComponentOrderEntryArray": [ + { + "ComponentId": 399415038452606756 + }, + { + "ComponentId": 16184381538555246534, + "SortIndex": 1 + }, + { + "ComponentId": 7827190074535394331, + "SortIndex": 2 + } + ] + }, + "Component_[3518973002096080237]": { + "$type": "EditorOnlyEntityComponent", + "Id": 3518973002096080237 + }, + "Component_[399415038452606756]": { + "$type": "{27F1E1A1-8D9D-4C3B-BD3A-AFB9762449C0} TransformComponent", + "Id": 399415038452606756, + "Parent Entity": "ContainerEntity", + "Transform Data": { + "Translate": [ + -17.530563354492188, + -0.00018183141946792603, + 94.40913391113281 + ] + } + }, + "Component_[4564240319609068082]": { + "$type": "EditorEntitySortComponent", + "Id": 4564240319609068082 + }, + "Component_[7827190074535394331]": { + "$type": "EditorMaterialComponent", + "Id": 7827190074535394331, + "Controller": { + "Configuration": { + "materials": [ + { + "Key": { + "materialSlotStableId": 2418540911 + }, + "Value": { + "MaterialAsset": { + "assetId": { + "guid": "{970148AC-7258-5EC8-9CE7-F4EF93164D93}" + }, + "assetHint": "materials/presets/pbr/metal_iron_matte.azmaterial" + } + } + } + ] + } + } + }, + "Component_[8092226976542590265]": { + "$type": "EditorDisabledCompositionComponent", + "Id": 8092226976542590265 + } + } + }, + "Entity_[3288114259924]": { + "Id": "Entity_[3288114259924]", + "Name": "Entity1", + "Components": { + "Component_[11525365929370623807]": { + "$type": "EditorVisibilityComponent", + "Id": 11525365929370623807 + }, + "Component_[12334620273692642550]": { + "$type": "EditorLockComponent", + "Id": 12334620273692642550 + }, + "Component_[14389735759337977675]": { + "$type": "EditorPendingCompositionComponent", + "Id": 14389735759337977675 + }, + "Component_[16184381538555246534]": { + "$type": "AZ::Render::EditorMeshComponent", + "Id": 16184381538555246534, + "Controller": { + "Configuration": { + "ModelAsset": { + "assetId": { + "guid": "{E14975EF-E676-51A4-B826-3EF59CB645AA}", + "subId": 285127096 + }, + "assetHint": "testdata/objects/cube/cube.azmodel" + } + } + } + }, + "Component_[17962478023087084794]": { + "$type": "SelectionComponent", + "Id": 17962478023087084794 + }, + "Component_[18071675051915092508]": { + "$type": "EditorEntityIconComponent", + "Id": 18071675051915092508 + }, + "Component_[2115498007879087044]": { + "$type": "EditorInspectorComponent", + "Id": 2115498007879087044, + "ComponentOrderEntryArray": [ + { + "ComponentId": 399415038452606756 + }, + { + "ComponentId": 16184381538555246534, + "SortIndex": 1 + }, + { + "ComponentId": 7827190074535394331, + "SortIndex": 2 + } + ] + }, + "Component_[3518973002096080237]": { + "$type": "EditorOnlyEntityComponent", + "Id": 3518973002096080237 + }, + "Component_[399415038452606756]": { + "$type": "{27F1E1A1-8D9D-4C3B-BD3A-AFB9762449C0} TransformComponent", + "Id": 399415038452606756, + "Parent Entity": "ContainerEntity", + "Transform Data": { + "Translate": [ + -22.530563354492188, + -0.00018183141946792603, + 94.40913391113281 + ] + } + }, + "Component_[4564240319609068082]": { + "$type": "EditorEntitySortComponent", + "Id": 4564240319609068082 + }, + "Component_[7827190074535394331]": { + "$type": "EditorMaterialComponent", + "Id": 7827190074535394331, + "Controller": { + "Configuration": { + "materials": [ + { + "Key": { + "materialSlotStableId": 2418540911 + }, + "Value": { + "MaterialAsset": { + "assetId": { + "guid": "{5BC13D95-377E-53EA-9A93-156384BE8B04}" + }, + "assetHint": "materials/presets/pbr/metal_gold_matte.azmaterial" + } + } + } + ] + } + } + }, + "Component_[8092226976542590265]": { + "$type": "EditorDisabledCompositionComponent", + "Id": 8092226976542590265 + } + } + }, + "Entity_[3292409227220]": { + "Id": "Entity_[3292409227220]", + "Name": "Entity1", + "Components": { + "Component_[11525365929370623807]": { + "$type": "EditorVisibilityComponent", + "Id": 11525365929370623807 + }, + "Component_[12334620273692642550]": { + "$type": "EditorLockComponent", + "Id": 12334620273692642550 + }, + "Component_[14389735759337977675]": { + "$type": "EditorPendingCompositionComponent", + "Id": 14389735759337977675 + }, + "Component_[16184381538555246534]": { + "$type": "AZ::Render::EditorMeshComponent", + "Id": 16184381538555246534, + "Controller": { + "Configuration": { + "ModelAsset": { + "assetId": { + "guid": "{E14975EF-E676-51A4-B826-3EF59CB645AA}", + "subId": 285127096 + }, + "assetHint": "testdata/objects/cube/cube.azmodel" + } + } + } + }, + "Component_[17962478023087084794]": { + "$type": "SelectionComponent", + "Id": 17962478023087084794 + }, + "Component_[18071675051915092508]": { + "$type": "EditorEntityIconComponent", + "Id": 18071675051915092508 + }, + "Component_[2115498007879087044]": { + "$type": "EditorInspectorComponent", + "Id": 2115498007879087044, + "ComponentOrderEntryArray": [ + { + "ComponentId": 399415038452606756 + }, + { + "ComponentId": 16184381538555246534, + "SortIndex": 1 + }, + { + "ComponentId": 7827190074535394331, + "SortIndex": 2 + } + ] + }, + "Component_[3518973002096080237]": { + "$type": "EditorOnlyEntityComponent", + "Id": 3518973002096080237 + }, + "Component_[399415038452606756]": { + "$type": "{27F1E1A1-8D9D-4C3B-BD3A-AFB9762449C0} TransformComponent", + "Id": 399415038452606756, + "Parent Entity": "ContainerEntity", + "Transform Data": { + "Translate": [ + 7.530143737792969, + -0.00018183141946792603, + 54.618019104003906 + ] + } + }, + "Component_[4564240319609068082]": { + "$type": "EditorEntitySortComponent", + "Id": 4564240319609068082 + }, + "Component_[7827190074535394331]": { + "$type": "EditorMaterialComponent", + "Id": 7827190074535394331, + "Controller": { + "Configuration": { + "materials": [ + { + "Key": { + "materialSlotStableId": 2418540911 + }, + "Value": { + "MaterialAsset": { + "assetId": { + "guid": "{CDA13277-5EAB-5E2A-93F5-B7003597FBCE}" + }, + "assetHint": "materials/presets/pbr/metal_silver.azmaterial" + } + } + } + ] + } + } + }, + "Component_[8092226976542590265]": { + "$type": "EditorDisabledCompositionComponent", + "Id": 8092226976542590265 + } + } + }, + "Entity_[3296704194516]": { + "Id": "Entity_[3296704194516]", + "Name": "Entity1", + "Components": { + "Component_[11525365929370623807]": { + "$type": "EditorVisibilityComponent", + "Id": 11525365929370623807 + }, + "Component_[12334620273692642550]": { + "$type": "EditorLockComponent", + "Id": 12334620273692642550 + }, + "Component_[14389735759337977675]": { + "$type": "EditorPendingCompositionComponent", + "Id": 14389735759337977675 + }, + "Component_[16184381538555246534]": { + "$type": "AZ::Render::EditorMeshComponent", + "Id": 16184381538555246534, + "Controller": { + "Configuration": { + "ModelAsset": { + "assetId": { + "guid": "{E14975EF-E676-51A4-B826-3EF59CB645AA}", + "subId": 285127096 + }, + "assetHint": "testdata/objects/cube/cube.azmodel" + } + } + } + }, + "Component_[17962478023087084794]": { + "$type": "SelectionComponent", + "Id": 17962478023087084794 + }, + "Component_[18071675051915092508]": { + "$type": "EditorEntityIconComponent", + "Id": 18071675051915092508 + }, + "Component_[2115498007879087044]": { + "$type": "EditorInspectorComponent", + "Id": 2115498007879087044, + "ComponentOrderEntryArray": [ + { + "ComponentId": 399415038452606756 + }, + { + "ComponentId": 16184381538555246534, + "SortIndex": 1 + }, + { + "ComponentId": 7827190074535394331, + "SortIndex": 2 + } + ] + }, + "Component_[3518973002096080237]": { + "$type": "EditorOnlyEntityComponent", + "Id": 3518973002096080237 + }, + "Component_[399415038452606756]": { + "$type": "{27F1E1A1-8D9D-4C3B-BD3A-AFB9762449C0} TransformComponent", + "Id": 399415038452606756, + "Parent Entity": "ContainerEntity", + "Transform Data": { + "Translate": [ + -7.5305633544921875, + -0.00018183141946792603, + 99.43339538574219 + ] + } + }, + "Component_[4564240319609068082]": { + "$type": "EditorEntitySortComponent", + "Id": 4564240319609068082 + }, + "Component_[7827190074535394331]": { + "$type": "EditorMaterialComponent", + "Id": 7827190074535394331, + "Controller": { + "Configuration": { + "materials": [ + { + "Key": { + "materialSlotStableId": 2418540911 + }, + "Value": { + "MaterialAsset": { + "assetId": { + "guid": "{DD1E26AE-80FB-5DB6-8786-26D438190A38}" + }, + "assetHint": "materials/presets/pbr/metal_nickel.azmaterial" + } + } + } + ] + } + } + }, + "Component_[8092226976542590265]": { + "$type": "EditorDisabledCompositionComponent", + "Id": 8092226976542590265 + } + } + }, + "Entity_[3300999161812]": { + "Id": "Entity_[3300999161812]", + "Name": "Entity1", + "Components": { + "Component_[11525365929370623807]": { + "$type": "EditorVisibilityComponent", + "Id": 11525365929370623807 + }, + "Component_[12334620273692642550]": { + "$type": "EditorLockComponent", + "Id": 12334620273692642550 + }, + "Component_[14389735759337977675]": { + "$type": "EditorPendingCompositionComponent", + "Id": 14389735759337977675 + }, + "Component_[16184381538555246534]": { + "$type": "AZ::Render::EditorMeshComponent", + "Id": 16184381538555246534, + "Controller": { + "Configuration": { + "ModelAsset": { + "assetId": { + "guid": "{E14975EF-E676-51A4-B826-3EF59CB645AA}", + "subId": 285127096 + }, + "assetHint": "testdata/objects/cube/cube.azmodel" + } + } + } + }, + "Component_[17962478023087084794]": { + "$type": "SelectionComponent", + "Id": 17962478023087084794 + }, + "Component_[18071675051915092508]": { + "$type": "EditorEntityIconComponent", + "Id": 18071675051915092508 + }, + "Component_[2115498007879087044]": { + "$type": "EditorInspectorComponent", + "Id": 2115498007879087044, + "ComponentOrderEntryArray": [ + { + "ComponentId": 399415038452606756 + }, + { + "ComponentId": 16184381538555246534, + "SortIndex": 1 + }, + { + "ComponentId": 7827190074535394331, + "SortIndex": 2 + } + ] + }, + "Component_[3518973002096080237]": { + "$type": "EditorOnlyEntityComponent", + "Id": 3518973002096080237 + }, + "Component_[399415038452606756]": { + "$type": "{27F1E1A1-8D9D-4C3B-BD3A-AFB9762449C0} TransformComponent", + "Id": 399415038452606756, + "Parent Entity": "ContainerEntity", + "Transform Data": { + "Translate": [ + -2.5305633544921875, + -0.00018183141946792603, + 34.53608703613281 + ] + } + }, + "Component_[4564240319609068082]": { + "$type": "EditorEntitySortComponent", + "Id": 4564240319609068082 + }, + "Component_[7827190074535394331]": { + "$type": "EditorMaterialComponent", + "Id": 7827190074535394331, + "Controller": { + "Configuration": { + "materials": [ + { + "Key": { + "materialSlotStableId": 2418540911 + }, + "Value": { + "MaterialAsset": { + "assetId": { + "guid": "{9187B84B-425F-5D11-B4D7-35BBDB0959D1}" + }, + "assetHint": "materials/presets/pbr/metal_palladium_matte.azmaterial" + } + } + } + ] + } + } + }, + "Component_[8092226976542590265]": { + "$type": "EditorDisabledCompositionComponent", + "Id": 8092226976542590265 + } + } + }, + "Entity_[3305294129108]": { + "Id": "Entity_[3305294129108]", + "Name": "Entity1", + "Components": { + "Component_[11525365929370623807]": { + "$type": "EditorVisibilityComponent", + "Id": 11525365929370623807 + }, + "Component_[12334620273692642550]": { + "$type": "EditorLockComponent", + "Id": 12334620273692642550 + }, + "Component_[14389735759337977675]": { + "$type": "EditorPendingCompositionComponent", + "Id": 14389735759337977675 + }, + "Component_[16184381538555246534]": { + "$type": "AZ::Render::EditorMeshComponent", + "Id": 16184381538555246534, + "Controller": { + "Configuration": { + "ModelAsset": { + "assetId": { + "guid": "{E14975EF-E676-51A4-B826-3EF59CB645AA}", + "subId": 285127096 + }, + "assetHint": "testdata/objects/cube/cube.azmodel" + } + } + } + }, + "Component_[17962478023087084794]": { + "$type": "SelectionComponent", + "Id": 17962478023087084794 + }, + "Component_[18071675051915092508]": { + "$type": "EditorEntityIconComponent", + "Id": 18071675051915092508 + }, + "Component_[2115498007879087044]": { + "$type": "EditorInspectorComponent", + "Id": 2115498007879087044, + "ComponentOrderEntryArray": [ + { + "ComponentId": 399415038452606756 + }, + { + "ComponentId": 16184381538555246534, + "SortIndex": 1 + }, + { + "ComponentId": 7827190074535394331, + "SortIndex": 2 + } + ] + }, + "Component_[3518973002096080237]": { + "$type": "EditorOnlyEntityComponent", + "Id": 3518973002096080237 + }, + "Component_[399415038452606756]": { + "$type": "{27F1E1A1-8D9D-4C3B-BD3A-AFB9762449C0} TransformComponent", + "Id": 399415038452606756, + "Parent Entity": "ContainerEntity", + "Transform Data": { + "Translate": [ + 42.53014373779297, + -0.00018183141946792603, + 79.38228607177734 + ] + } + }, + "Component_[4564240319609068082]": { + "$type": "EditorEntitySortComponent", + "Id": 4564240319609068082 + }, + "Component_[7827190074535394331]": { + "$type": "EditorMaterialComponent", + "Id": 7827190074535394331, + "Controller": { + "Configuration": { + "materials": [ + { + "Key": { + "materialSlotStableId": 2418540911 + }, + "Value": { + "MaterialAsset": { + "assetId": { + "guid": "{5BC13D95-377E-53EA-9A93-156384BE8B04}" + }, + "assetHint": "materials/presets/pbr/metal_gold_matte.azmaterial" + } + } + } + ] + } + } + }, + "Component_[8092226976542590265]": { + "$type": "EditorDisabledCompositionComponent", + "Id": 8092226976542590265 + } + } + }, + "Entity_[3309589096404]": { + "Id": "Entity_[3309589096404]", + "Name": "Entity1", + "Components": { + "Component_[11525365929370623807]": { + "$type": "EditorVisibilityComponent", + "Id": 11525365929370623807 + }, + "Component_[12334620273692642550]": { + "$type": "EditorLockComponent", + "Id": 12334620273692642550 + }, + "Component_[14389735759337977675]": { + "$type": "EditorPendingCompositionComponent", + "Id": 14389735759337977675 + }, + "Component_[16184381538555246534]": { + "$type": "AZ::Render::EditorMeshComponent", + "Id": 16184381538555246534, + "Controller": { + "Configuration": { + "ModelAsset": { + "assetId": { + "guid": "{E14975EF-E676-51A4-B826-3EF59CB645AA}", + "subId": 285127096 + }, + "assetHint": "testdata/objects/cube/cube.azmodel" + } + } + } + }, + "Component_[17962478023087084794]": { + "$type": "SelectionComponent", + "Id": 17962478023087084794 + }, + "Component_[18071675051915092508]": { + "$type": "EditorEntityIconComponent", + "Id": 18071675051915092508 + }, + "Component_[2115498007879087044]": { + "$type": "EditorInspectorComponent", + "Id": 2115498007879087044, + "ComponentOrderEntryArray": [ + { + "ComponentId": 399415038452606756 + }, + { + "ComponentId": 16184381538555246534, + "SortIndex": 1 + }, + { + "ComponentId": 7827190074535394331, + "SortIndex": 2 + } + ] + }, + "Component_[3518973002096080237]": { + "$type": "EditorOnlyEntityComponent", + "Id": 3518973002096080237 + }, + "Component_[399415038452606756]": { + "$type": "{27F1E1A1-8D9D-4C3B-BD3A-AFB9762449C0} TransformComponent", + "Id": 399415038452606756, + "Parent Entity": "ContainerEntity", + "Transform Data": { + "Translate": [ + 47.53014373779297, + -0.00018183141946792603, + 39.56034851074219 + ] + } + }, + "Component_[4564240319609068082]": { + "$type": "EditorEntitySortComponent", + "Id": 4564240319609068082 + }, + "Component_[7827190074535394331]": { + "$type": "EditorMaterialComponent", + "Id": 7827190074535394331, + "Controller": { + "Configuration": { + "materials": [ + { + "Key": { + "materialSlotStableId": 2418540911 + }, + "Value": { + "MaterialAsset": { + "assetId": { + "guid": "{892EA944-0325-5FA6-94D7-4AB4FC02A0F5}" + }, + "assetHint": "materials/presets/pbr/metal_iron.azmaterial" + } + } + } + ] + } + } + }, + "Component_[8092226976542590265]": { + "$type": "EditorDisabledCompositionComponent", + "Id": 8092226976542590265 + } + } + }, + "Entity_[3313884063700]": { + "Id": "Entity_[3313884063700]", + "Name": "Entity1", + "Components": { + "Component_[11525365929370623807]": { + "$type": "EditorVisibilityComponent", + "Id": 11525365929370623807 + }, + "Component_[12334620273692642550]": { + "$type": "EditorLockComponent", + "Id": 12334620273692642550 + }, + "Component_[14389735759337977675]": { + "$type": "EditorPendingCompositionComponent", + "Id": 14389735759337977675 + }, + "Component_[16184381538555246534]": { + "$type": "AZ::Render::EditorMeshComponent", + "Id": 16184381538555246534, + "Controller": { + "Configuration": { + "ModelAsset": { + "assetId": { + "guid": "{E14975EF-E676-51A4-B826-3EF59CB645AA}", + "subId": 285127096 + }, + "assetHint": "testdata/objects/cube/cube.azmodel" + } + } + } + }, + "Component_[17962478023087084794]": { + "$type": "SelectionComponent", + "Id": 17962478023087084794 + }, + "Component_[18071675051915092508]": { + "$type": "EditorEntityIconComponent", + "Id": 18071675051915092508 + }, + "Component_[2115498007879087044]": { + "$type": "EditorInspectorComponent", + "Id": 2115498007879087044, + "ComponentOrderEntryArray": [ + { + "ComponentId": 399415038452606756 + }, + { + "ComponentId": 16184381538555246534, + "SortIndex": 1 + }, + { + "ComponentId": 7827190074535394331, + "SortIndex": 2 + } + ] + }, + "Component_[3518973002096080237]": { + "$type": "EditorOnlyEntityComponent", + "Id": 3518973002096080237 + }, + "Component_[399415038452606756]": { + "$type": "{27F1E1A1-8D9D-4C3B-BD3A-AFB9762449C0} TransformComponent", + "Id": 399415038452606756, + "Parent Entity": "ContainerEntity", + "Transform Data": { + "Translate": [ + -27.530563354492188, + -0.00018183141946792603, + 30.08451271057129 + ] + } + }, + "Component_[4564240319609068082]": { + "$type": "EditorEntitySortComponent", + "Id": 4564240319609068082 + }, + "Component_[7827190074535394331]": { + "$type": "EditorMaterialComponent", + "Id": 7827190074535394331, + "Controller": { + "Configuration": { + "materials": [ + { + "Key": { + "materialSlotStableId": 2418540911 + }, + "Value": { + "MaterialAsset": { + "assetId": { + "guid": "{CF5C7B01-4912-58AE-991A-F25251E505AC}" + }, + "assetHint": "materials/presets/pbr/metal_copper_polished.azmaterial" + } + } + } + ] + } + } + }, + "Component_[8092226976542590265]": { + "$type": "EditorDisabledCompositionComponent", + "Id": 8092226976542590265 + } + } + }, + "Entity_[3318179030996]": { + "Id": "Entity_[3318179030996]", + "Name": "Entity1", + "Components": { + "Component_[11525365929370623807]": { + "$type": "EditorVisibilityComponent", + "Id": 11525365929370623807 + }, + "Component_[12334620273692642550]": { + "$type": "EditorLockComponent", + "Id": 12334620273692642550 + }, + "Component_[14389735759337977675]": { + "$type": "EditorPendingCompositionComponent", + "Id": 14389735759337977675 + }, + "Component_[16184381538555246534]": { + "$type": "AZ::Render::EditorMeshComponent", + "Id": 16184381538555246534, + "Controller": { + "Configuration": { + "ModelAsset": { + "assetId": { + "guid": "{E14975EF-E676-51A4-B826-3EF59CB645AA}", + "subId": 285127096 + }, + "assetHint": "testdata/objects/cube/cube.azmodel" + } + } + } + }, + "Component_[17962478023087084794]": { + "$type": "SelectionComponent", + "Id": 17962478023087084794 + }, + "Component_[18071675051915092508]": { + "$type": "EditorEntityIconComponent", + "Id": 18071675051915092508 + }, + "Component_[2115498007879087044]": { + "$type": "EditorInspectorComponent", + "Id": 2115498007879087044, + "ComponentOrderEntryArray": [ + { + "ComponentId": 399415038452606756 + }, + { + "ComponentId": 16184381538555246534, + "SortIndex": 1 + }, + { + "ComponentId": 7827190074535394331, + "SortIndex": 2 + } + ] + }, + "Component_[3518973002096080237]": { + "$type": "EditorOnlyEntityComponent", + "Id": 3518973002096080237 + }, + "Component_[399415038452606756]": { + "$type": "{27F1E1A1-8D9D-4C3B-BD3A-AFB9762449C0} TransformComponent", + "Id": 399415038452606756, + "Parent Entity": "ContainerEntity", + "Transform Data": { + "Translate": [ + -22.530563354492188, + -0.00018183141946792603, + 99.43339538574219 + ] + } + }, + "Component_[4564240319609068082]": { + "$type": "EditorEntitySortComponent", + "Id": 4564240319609068082 + }, + "Component_[7827190074535394331]": { + "$type": "EditorMaterialComponent", + "Id": 7827190074535394331, + "Controller": { + "Configuration": { + "materials": [ + { + "Key": { + "materialSlotStableId": 2418540911 + }, + "Value": { + "MaterialAsset": { + "assetId": { + "guid": "{FE52E7C8-064D-506A-9C26-433EB93747DE}" + }, + "assetHint": "materials/presets/pbr/metal_gold.azmaterial" + } + } + } + ] + } + } + }, + "Component_[8092226976542590265]": { + "$type": "EditorDisabledCompositionComponent", + "Id": 8092226976542590265 + } + } + }, + "Entity_[3322473998292]": { + "Id": "Entity_[3322473998292]", + "Name": "Entity1", + "Components": { + "Component_[11525365929370623807]": { + "$type": "EditorVisibilityComponent", + "Id": 11525365929370623807 + }, + "Component_[12334620273692642550]": { + "$type": "EditorLockComponent", + "Id": 12334620273692642550 + }, + "Component_[14389735759337977675]": { + "$type": "EditorPendingCompositionComponent", + "Id": 14389735759337977675 + }, + "Component_[16184381538555246534]": { + "$type": "AZ::Render::EditorMeshComponent", + "Id": 16184381538555246534, + "Controller": { + "Configuration": { + "ModelAsset": { + "assetId": { + "guid": "{E14975EF-E676-51A4-B826-3EF59CB645AA}", + "subId": 285127096 + }, + "assetHint": "testdata/objects/cube/cube.azmodel" + } + } + } + }, + "Component_[17962478023087084794]": { + "$type": "SelectionComponent", + "Id": 17962478023087084794 + }, + "Component_[18071675051915092508]": { + "$type": "EditorEntityIconComponent", + "Id": 18071675051915092508 + }, + "Component_[2115498007879087044]": { + "$type": "EditorInspectorComponent", + "Id": 2115498007879087044, + "ComponentOrderEntryArray": [ + { + "ComponentId": 399415038452606756 + }, + { + "ComponentId": 16184381538555246534, + "SortIndex": 1 + }, + { + "ComponentId": 7827190074535394331, + "SortIndex": 2 + } + ] + }, + "Component_[3518973002096080237]": { + "$type": "EditorOnlyEntityComponent", + "Id": 3518973002096080237 + }, + "Component_[399415038452606756]": { + "$type": "{27F1E1A1-8D9D-4C3B-BD3A-AFB9762449C0} TransformComponent", + "Id": 399415038452606756, + "Parent Entity": "ContainerEntity", + "Transform Data": { + "Translate": [ + -37.53056335449219, + -0.00018183141946792603, + 109.46680450439453 + ] + } + }, + "Component_[4564240319609068082]": { + "$type": "EditorEntitySortComponent", + "Id": 4564240319609068082 + }, + "Component_[7827190074535394331]": { + "$type": "EditorMaterialComponent", + "Id": 7827190074535394331, + "Controller": { + "Configuration": { + "materials": [ + { + "Key": { + "materialSlotStableId": 2418540911 + }, + "Value": { + "MaterialAsset": { + "assetId": { + "guid": "{A78EA2FC-688B-5E3A-A7F6-DB413D11D4CF}" + }, + "assetHint": "materials/presets/pbr/metal_chrome_matte.azmaterial" + } + } + } + ] + } + } + }, + "Component_[8092226976542590265]": { + "$type": "EditorDisabledCompositionComponent", + "Id": 8092226976542590265 + } + } + }, + "Entity_[3326768965588]": { + "Id": "Entity_[3326768965588]", + "Name": "Entity1", + "Components": { + "Component_[11525365929370623807]": { + "$type": "EditorVisibilityComponent", + "Id": 11525365929370623807 + }, + "Component_[12334620273692642550]": { + "$type": "EditorLockComponent", + "Id": 12334620273692642550 + }, + "Component_[14389735759337977675]": { + "$type": "EditorPendingCompositionComponent", + "Id": 14389735759337977675 + }, + "Component_[16184381538555246534]": { + "$type": "AZ::Render::EditorMeshComponent", + "Id": 16184381538555246534, + "Controller": { + "Configuration": { + "ModelAsset": { + "assetId": { + "guid": "{E14975EF-E676-51A4-B826-3EF59CB645AA}", + "subId": 285127096 + }, + "assetHint": "testdata/objects/cube/cube.azmodel" + } + } + } + }, + "Component_[17962478023087084794]": { + "$type": "SelectionComponent", + "Id": 17962478023087084794 + }, + "Component_[18071675051915092508]": { + "$type": "EditorEntityIconComponent", + "Id": 18071675051915092508 + }, + "Component_[2115498007879087044]": { + "$type": "EditorInspectorComponent", + "Id": 2115498007879087044, + "ComponentOrderEntryArray": [ + { + "ComponentId": 399415038452606756 + }, + { + "ComponentId": 16184381538555246534, + "SortIndex": 1 + }, + { + "ComponentId": 7827190074535394331, + "SortIndex": 2 + } + ] + }, + "Component_[3518973002096080237]": { + "$type": "EditorOnlyEntityComponent", + "Id": 3518973002096080237 + }, + "Component_[399415038452606756]": { + "$type": "{27F1E1A1-8D9D-4C3B-BD3A-AFB9762449C0} TransformComponent", + "Id": 399415038452606756, + "Parent Entity": "ContainerEntity", + "Transform Data": { + "Translate": [ + 47.53014373779297, + -0.00018183141946792603, + 54.618019104003906 + ] + } + }, + "Component_[4564240319609068082]": { + "$type": "EditorEntitySortComponent", + "Id": 4564240319609068082 + }, + "Component_[7827190074535394331]": { + "$type": "EditorMaterialComponent", + "Id": 7827190074535394331, + "Controller": { + "Configuration": { + "materials": [ + { + "Key": { + "materialSlotStableId": 2418540911 + }, + "Value": { + "MaterialAsset": { + "assetId": { + "guid": "{892EA944-0325-5FA6-94D7-4AB4FC02A0F5}" + }, + "assetHint": "materials/presets/pbr/metal_iron.azmaterial" + } + } + } + ] + } + } + }, + "Component_[8092226976542590265]": { + "$type": "EditorDisabledCompositionComponent", + "Id": 8092226976542590265 + } + } + }, + "Entity_[3331063932884]": { + "Id": "Entity_[3331063932884]", + "Name": "Entity1", + "Components": { + "Component_[11525365929370623807]": { + "$type": "EditorVisibilityComponent", + "Id": 11525365929370623807 + }, + "Component_[12334620273692642550]": { + "$type": "EditorLockComponent", + "Id": 12334620273692642550 + }, + "Component_[14389735759337977675]": { + "$type": "EditorPendingCompositionComponent", + "Id": 14389735759337977675 + }, + "Component_[16184381538555246534]": { + "$type": "AZ::Render::EditorMeshComponent", + "Id": 16184381538555246534, + "Controller": { + "Configuration": { + "ModelAsset": { + "assetId": { + "guid": "{E14975EF-E676-51A4-B826-3EF59CB645AA}", + "subId": 285127096 + }, + "assetHint": "testdata/objects/cube/cube.azmodel" + } + } + } + }, + "Component_[17962478023087084794]": { + "$type": "SelectionComponent", + "Id": 17962478023087084794 + }, + "Component_[18071675051915092508]": { + "$type": "EditorEntityIconComponent", + "Id": 18071675051915092508 + }, + "Component_[2115498007879087044]": { + "$type": "EditorInspectorComponent", + "Id": 2115498007879087044, + "ComponentOrderEntryArray": [ + { + "ComponentId": 399415038452606756 + }, + { + "ComponentId": 16184381538555246534, + "SortIndex": 1 + }, + { + "ComponentId": 7827190074535394331, + "SortIndex": 2 + } + ] + }, + "Component_[3518973002096080237]": { + "$type": "EditorOnlyEntityComponent", + "Id": 3518973002096080237 + }, + "Component_[399415038452606756]": { + "$type": "{27F1E1A1-8D9D-4C3B-BD3A-AFB9762449C0} TransformComponent", + "Id": 399415038452606756, + "Parent Entity": "ContainerEntity", + "Transform Data": { + "Translate": [ + 22.53014373779297, + -0.00018183141946792603, + 54.618019104003906 + ] + } + }, + "Component_[4564240319609068082]": { + "$type": "EditorEntitySortComponent", + "Id": 4564240319609068082 + }, + "Component_[7827190074535394331]": { + "$type": "EditorMaterialComponent", + "Id": 7827190074535394331, + "Controller": { + "Configuration": { + "materials": [ + { + "Key": { + "materialSlotStableId": 2418540911 + }, + "Value": { + "MaterialAsset": { + "assetId": { + "guid": "{80E0F2A7-1EE4-597F-80EF-985C65BCE2EB}" + }, + "assetHint": "materials/presets/pbr/metal_brass.azmaterial" + } + } + } + ] + } + } + }, + "Component_[8092226976542590265]": { + "$type": "EditorDisabledCompositionComponent", + "Id": 8092226976542590265 + } + } + }, + "Entity_[3335358900180]": { + "Id": "Entity_[3335358900180]", + "Name": "Entity1", + "Components": { + "Component_[11525365929370623807]": { + "$type": "EditorVisibilityComponent", + "Id": 11525365929370623807 + }, + "Component_[12334620273692642550]": { + "$type": "EditorLockComponent", + "Id": 12334620273692642550 + }, + "Component_[14389735759337977675]": { + "$type": "EditorPendingCompositionComponent", + "Id": 14389735759337977675 + }, + "Component_[16184381538555246534]": { + "$type": "AZ::Render::EditorMeshComponent", + "Id": 16184381538555246534, + "Controller": { + "Configuration": { + "ModelAsset": { + "assetId": { + "guid": "{E14975EF-E676-51A4-B826-3EF59CB645AA}", + "subId": 285127096 + }, + "assetHint": "testdata/objects/cube/cube.azmodel" + } + } + } + }, + "Component_[17962478023087084794]": { + "$type": "SelectionComponent", + "Id": 17962478023087084794 + }, + "Component_[18071675051915092508]": { + "$type": "EditorEntityIconComponent", + "Id": 18071675051915092508 + }, + "Component_[2115498007879087044]": { + "$type": "EditorInspectorComponent", + "Id": 2115498007879087044, + "ComponentOrderEntryArray": [ + { + "ComponentId": 399415038452606756 + }, + { + "ComponentId": 16184381538555246534, + "SortIndex": 1 + }, + { + "ComponentId": 7827190074535394331, + "SortIndex": 2 + } + ] + }, + "Component_[3518973002096080237]": { + "$type": "EditorOnlyEntityComponent", + "Id": 3518973002096080237 + }, + "Component_[399415038452606756]": { + "$type": "{27F1E1A1-8D9D-4C3B-BD3A-AFB9762449C0} TransformComponent", + "Id": 399415038452606756, + "Parent Entity": "ContainerEntity", + "Transform Data": { + "Translate": [ + 47.53014373779297, + -0.00018183141946792603, + 114.4910659790039 + ] + } + }, + "Component_[4564240319609068082]": { + "$type": "EditorEntitySortComponent", + "Id": 4564240319609068082 + }, + "Component_[7827190074535394331]": { + "$type": "EditorMaterialComponent", + "Id": 7827190074535394331, + "Controller": { + "Configuration": { + "materials": [ + { + "Key": { + "materialSlotStableId": 2418540911 + }, + "Value": { + "MaterialAsset": { + "assetId": { + "guid": "{892EA944-0325-5FA6-94D7-4AB4FC02A0F5}" + }, + "assetHint": "materials/presets/pbr/metal_iron.azmaterial" + } + } + } + ] + } + } + }, + "Component_[8092226976542590265]": { + "$type": "EditorDisabledCompositionComponent", + "Id": 8092226976542590265 + } + } + }, + "Entity_[3339653867476]": { + "Id": "Entity_[3339653867476]", + "Name": "Entity1", + "Components": { + "Component_[11525365929370623807]": { + "$type": "EditorVisibilityComponent", + "Id": 11525365929370623807 + }, + "Component_[12334620273692642550]": { + "$type": "EditorLockComponent", + "Id": 12334620273692642550 + }, + "Component_[14389735759337977675]": { + "$type": "EditorPendingCompositionComponent", + "Id": 14389735759337977675 + }, + "Component_[16184381538555246534]": { + "$type": "AZ::Render::EditorMeshComponent", + "Id": 16184381538555246534, + "Controller": { + "Configuration": { + "ModelAsset": { + "assetId": { + "guid": "{E14975EF-E676-51A4-B826-3EF59CB645AA}", + "subId": 285127096 + }, + "assetHint": "testdata/objects/cube/cube.azmodel" + } + } + } + }, + "Component_[17962478023087084794]": { + "$type": "SelectionComponent", + "Id": 17962478023087084794 + }, + "Component_[18071675051915092508]": { + "$type": "EditorEntityIconComponent", + "Id": 18071675051915092508 + }, + "Component_[2115498007879087044]": { + "$type": "EditorInspectorComponent", + "Id": 2115498007879087044, + "ComponentOrderEntryArray": [ + { + "ComponentId": 399415038452606756 + }, + { + "ComponentId": 16184381538555246534, + "SortIndex": 1 + }, + { + "ComponentId": 7827190074535394331, + "SortIndex": 2 + } + ] + }, + "Component_[3518973002096080237]": { + "$type": "EditorOnlyEntityComponent", + "Id": 3518973002096080237 + }, + "Component_[399415038452606756]": { + "$type": "{27F1E1A1-8D9D-4C3B-BD3A-AFB9762449C0} TransformComponent", + "Id": 399415038452606756, + "Parent Entity": "ContainerEntity", + "Transform Data": { + "Translate": [ + 32.53014373779297, + -0.00018183141946792603, + 74.93071746826172 + ] + } + }, + "Component_[4564240319609068082]": { + "$type": "EditorEntitySortComponent", + "Id": 4564240319609068082 + }, + "Component_[7827190074535394331]": { + "$type": "EditorMaterialComponent", + "Id": 7827190074535394331, + "Controller": { + "Configuration": { + "materials": [ + { + "Key": { + "materialSlotStableId": 2418540911 + }, + "Value": { + "MaterialAsset": { + "assetId": { + "guid": "{93DF55AE-8D1B-5AD1-A609-05F1BD9F6EA0}" + }, + "assetHint": "materials/presets/pbr/metal_cobalt_polished.azmaterial" + } + } + } + ] + } + } + }, + "Component_[8092226976542590265]": { + "$type": "EditorDisabledCompositionComponent", + "Id": 8092226976542590265 + } + } + }, + "Entity_[3343948834772]": { + "Id": "Entity_[3343948834772]", + "Name": "Entity1", + "Components": { + "Component_[11525365929370623807]": { + "$type": "EditorVisibilityComponent", + "Id": 11525365929370623807 + }, + "Component_[12334620273692642550]": { + "$type": "EditorLockComponent", + "Id": 12334620273692642550 + }, + "Component_[14389735759337977675]": { + "$type": "EditorPendingCompositionComponent", + "Id": 14389735759337977675 + }, + "Component_[16184381538555246534]": { + "$type": "AZ::Render::EditorMeshComponent", + "Id": 16184381538555246534, + "Controller": { + "Configuration": { + "ModelAsset": { + "assetId": { + "guid": "{E14975EF-E676-51A4-B826-3EF59CB645AA}", + "subId": 285127096 + }, + "assetHint": "testdata/objects/cube/cube.azmodel" + } + } + } + }, + "Component_[17962478023087084794]": { + "$type": "SelectionComponent", + "Id": 17962478023087084794 + }, + "Component_[18071675051915092508]": { + "$type": "EditorEntityIconComponent", + "Id": 18071675051915092508 + }, + "Component_[2115498007879087044]": { + "$type": "EditorInspectorComponent", + "Id": 2115498007879087044, + "ComponentOrderEntryArray": [ + { + "ComponentId": 399415038452606756 + }, + { + "ComponentId": 16184381538555246534, + "SortIndex": 1 + }, + { + "ComponentId": 7827190074535394331, + "SortIndex": 2 + } + ] + }, + "Component_[3518973002096080237]": { + "$type": "EditorOnlyEntityComponent", + "Id": 3518973002096080237 + }, + "Component_[399415038452606756]": { + "$type": "{27F1E1A1-8D9D-4C3B-BD3A-AFB9762449C0} TransformComponent", + "Id": 399415038452606756, + "Parent Entity": "ContainerEntity", + "Transform Data": { + "Translate": [ + 17.53014373779297, + -0.00018183141946792603, + 0.0 + ] + } + }, + "Component_[4564240319609068082]": { + "$type": "EditorEntitySortComponent", + "Id": 4564240319609068082 + }, + "Component_[7827190074535394331]": { + "$type": "EditorMaterialComponent", + "Id": 7827190074535394331, + "Controller": { + "Configuration": { + "materials": [ + { + "Key": {}, + "Value": { + "MaterialAsset": { + "assetId": { + "guid": "{721188E0-B7CC-5D06-8D5D-39AF8ABF2EF9}" + }, + "assetHint": "materials/presets/pbr/metal_titanium.azmaterial" + } + } + }, + { + "Key": { + "materialSlotStableId": 2418540911 + }, + "Value": { + "MaterialAsset": { + "assetId": { + "guid": "{64C1F6A6-6BDA-551A-BE56-1829E5913278}" + }, + "assetHint": "materials/presets/pbr/metal_aluminum_polished.azmaterial" + } + } + } + ] + } + } + }, + "Component_[8092226976542590265]": { + "$type": "EditorDisabledCompositionComponent", + "Id": 8092226976542590265 + } + } + }, + "Entity_[3348243802068]": { + "Id": "Entity_[3348243802068]", + "Name": "Entity1", + "Components": { + "Component_[11525365929370623807]": { + "$type": "EditorVisibilityComponent", + "Id": 11525365929370623807 + }, + "Component_[12334620273692642550]": { + "$type": "EditorLockComponent", + "Id": 12334620273692642550 + }, + "Component_[14389735759337977675]": { + "$type": "EditorPendingCompositionComponent", + "Id": 14389735759337977675 + }, + "Component_[16184381538555246534]": { + "$type": "AZ::Render::EditorMeshComponent", + "Id": 16184381538555246534, + "Controller": { + "Configuration": { + "ModelAsset": { + "assetId": { + "guid": "{E14975EF-E676-51A4-B826-3EF59CB645AA}", + "subId": 285127096 + }, + "assetHint": "testdata/objects/cube/cube.azmodel" + } + } + } + }, + "Component_[17962478023087084794]": { + "$type": "SelectionComponent", + "Id": 17962478023087084794 + }, + "Component_[18071675051915092508]": { + "$type": "EditorEntityIconComponent", + "Id": 18071675051915092508 + }, + "Component_[2115498007879087044]": { + "$type": "EditorInspectorComponent", + "Id": 2115498007879087044, + "ComponentOrderEntryArray": [ + { + "ComponentId": 399415038452606756 + }, + { + "ComponentId": 16184381538555246534, + "SortIndex": 1 + }, + { + "ComponentId": 7827190074535394331, + "SortIndex": 2 + } + ] + }, + "Component_[3518973002096080237]": { + "$type": "EditorOnlyEntityComponent", + "Id": 3518973002096080237 + }, + "Component_[399415038452606756]": { + "$type": "{27F1E1A1-8D9D-4C3B-BD3A-AFB9762449C0} TransformComponent", + "Id": 399415038452606756, + "Parent Entity": "ContainerEntity", + "Transform Data": { + "Translate": [ + 27.53014373779297, + -0.00018183141946792603, + 74.93071746826172 + ] + } + }, + "Component_[4564240319609068082]": { + "$type": "EditorEntitySortComponent", + "Id": 4564240319609068082 + }, + "Component_[7827190074535394331]": { + "$type": "EditorMaterialComponent", + "Id": 7827190074535394331, + "Controller": { + "Configuration": { + "materials": [ + { + "Key": { + "materialSlotStableId": 2418540911 + }, + "Value": { + "MaterialAsset": { + "assetId": { + "guid": "{CAF50181-3384-5DF2-9304-C6E48E83C72D}" + }, + "assetHint": "materials/presets/pbr/metal_chrome_polished.azmaterial" + } + } + } + ] + } + } + }, + "Component_[8092226976542590265]": { + "$type": "EditorDisabledCompositionComponent", + "Id": 8092226976542590265 + } + } + }, + "Entity_[3352538769364]": { + "Id": "Entity_[3352538769364]", + "Name": "Entity1", + "Components": { + "Component_[11525365929370623807]": { + "$type": "EditorVisibilityComponent", + "Id": 11525365929370623807 + }, + "Component_[12334620273692642550]": { + "$type": "EditorLockComponent", + "Id": 12334620273692642550 + }, + "Component_[14389735759337977675]": { + "$type": "EditorPendingCompositionComponent", + "Id": 14389735759337977675 + }, + "Component_[16184381538555246534]": { + "$type": "AZ::Render::EditorMeshComponent", + "Id": 16184381538555246534, + "Controller": { + "Configuration": { + "ModelAsset": { + "assetId": { + "guid": "{E14975EF-E676-51A4-B826-3EF59CB645AA}", + "subId": 285127096 + }, + "assetHint": "testdata/objects/cube/cube.azmodel" + } + } + } + }, + "Component_[17962478023087084794]": { + "$type": "SelectionComponent", + "Id": 17962478023087084794 + }, + "Component_[18071675051915092508]": { + "$type": "EditorEntityIconComponent", + "Id": 18071675051915092508 + }, + "Component_[2115498007879087044]": { + "$type": "EditorInspectorComponent", + "Id": 2115498007879087044, + "ComponentOrderEntryArray": [ + { + "ComponentId": 399415038452606756 + }, + { + "ComponentId": 16184381538555246534, + "SortIndex": 1 + }, + { + "ComponentId": 7827190074535394331, + "SortIndex": 2 + } + ] + }, + "Component_[3518973002096080237]": { + "$type": "EditorOnlyEntityComponent", + "Id": 3518973002096080237 + }, + "Component_[399415038452606756]": { + "$type": "{27F1E1A1-8D9D-4C3B-BD3A-AFB9762449C0} TransformComponent", + "Id": 399415038452606756, + "Parent Entity": "ContainerEntity", + "Transform Data": { + "Translate": [ + 47.53014373779297, + -0.00018183141946792603, + 19.50924301147461 + ] + } + }, + "Component_[4564240319609068082]": { + "$type": "EditorEntitySortComponent", + "Id": 4564240319609068082 + }, + "Component_[7827190074535394331]": { + "$type": "EditorMaterialComponent", + "Id": 7827190074535394331, + "Controller": { + "Configuration": { + "materials": [ + { + "Key": { + "materialSlotStableId": 2418540911 + }, + "Value": { + "MaterialAsset": { + "assetId": { + "guid": "{970148AC-7258-5EC8-9CE7-F4EF93164D93}" + }, + "assetHint": "materials/presets/pbr/metal_iron_matte.azmaterial" + } + } + } + ] + } + } + }, + "Component_[8092226976542590265]": { + "$type": "EditorDisabledCompositionComponent", + "Id": 8092226976542590265 + } + } + }, + "Entity_[3356833736660]": { + "Id": "Entity_[3356833736660]", + "Name": "Entity1", + "Components": { + "Component_[11525365929370623807]": { + "$type": "EditorVisibilityComponent", + "Id": 11525365929370623807 + }, + "Component_[12334620273692642550]": { + "$type": "EditorLockComponent", + "Id": 12334620273692642550 + }, + "Component_[14389735759337977675]": { + "$type": "EditorPendingCompositionComponent", + "Id": 14389735759337977675 + }, + "Component_[16184381538555246534]": { + "$type": "AZ::Render::EditorMeshComponent", + "Id": 16184381538555246534, + "Controller": { + "Configuration": { + "ModelAsset": { + "assetId": { + "guid": "{E14975EF-E676-51A4-B826-3EF59CB645AA}", + "subId": 285127096 + }, + "assetHint": "testdata/objects/cube/cube.azmodel" + } + } + } + }, + "Component_[17962478023087084794]": { + "$type": "SelectionComponent", + "Id": 17962478023087084794 + }, + "Component_[18071675051915092508]": { + "$type": "EditorEntityIconComponent", + "Id": 18071675051915092508 + }, + "Component_[2115498007879087044]": { + "$type": "EditorInspectorComponent", + "Id": 2115498007879087044, + "ComponentOrderEntryArray": [ + { + "ComponentId": 399415038452606756 + }, + { + "ComponentId": 16184381538555246534, + "SortIndex": 1 + }, + { + "ComponentId": 7827190074535394331, + "SortIndex": 2 + } + ] + }, + "Component_[3518973002096080237]": { + "$type": "EditorOnlyEntityComponent", + "Id": 3518973002096080237 + }, + "Component_[399415038452606756]": { + "$type": "{27F1E1A1-8D9D-4C3B-BD3A-AFB9762449C0} TransformComponent", + "Id": 399415038452606756, + "Parent Entity": "ContainerEntity", + "Transform Data": { + "Translate": [ + 42.53014373779297, + -0.00018183141946792603, + 94.40913391113281 + ] + } + }, + "Component_[4564240319609068082]": { + "$type": "EditorEntitySortComponent", + "Id": 4564240319609068082 + }, + "Component_[7827190074535394331]": { + "$type": "EditorMaterialComponent", + "Id": 7827190074535394331, + "Controller": { + "Configuration": { + "materials": [ + { + "Key": { + "materialSlotStableId": 2418540911 + }, + "Value": { + "MaterialAsset": { + "assetId": { + "guid": "{5BC13D95-377E-53EA-9A93-156384BE8B04}" + }, + "assetHint": "materials/presets/pbr/metal_gold_matte.azmaterial" + } + } + } + ] + } + } + }, + "Component_[8092226976542590265]": { + "$type": "EditorDisabledCompositionComponent", + "Id": 8092226976542590265 + } + } + }, + "Entity_[3361128703956]": { + "Id": "Entity_[3361128703956]", + "Name": "Entity1", + "Components": { + "Component_[11525365929370623807]": { + "$type": "EditorVisibilityComponent", + "Id": 11525365929370623807 + }, + "Component_[12334620273692642550]": { + "$type": "EditorLockComponent", + "Id": 12334620273692642550 + }, + "Component_[14389735759337977675]": { + "$type": "EditorPendingCompositionComponent", + "Id": 14389735759337977675 + }, + "Component_[16184381538555246534]": { + "$type": "AZ::Render::EditorMeshComponent", + "Id": 16184381538555246534, + "Controller": { + "Configuration": { + "ModelAsset": { + "assetId": { + "guid": "{E14975EF-E676-51A4-B826-3EF59CB645AA}", + "subId": 285127096 + }, + "assetHint": "testdata/objects/cube/cube.azmodel" + } + } + } + }, + "Component_[17962478023087084794]": { + "$type": "SelectionComponent", + "Id": 17962478023087084794 + }, + "Component_[18071675051915092508]": { + "$type": "EditorEntityIconComponent", + "Id": 18071675051915092508 + }, + "Component_[2115498007879087044]": { + "$type": "EditorInspectorComponent", + "Id": 2115498007879087044, + "ComponentOrderEntryArray": [ + { + "ComponentId": 399415038452606756 + }, + { + "ComponentId": 16184381538555246534, + "SortIndex": 1 + }, + { + "ComponentId": 7827190074535394331, + "SortIndex": 2 + } + ] + }, + "Component_[3518973002096080237]": { + "$type": "EditorOnlyEntityComponent", + "Id": 3518973002096080237 + }, + "Component_[399415038452606756]": { + "$type": "{27F1E1A1-8D9D-4C3B-BD3A-AFB9762449C0} TransformComponent", + "Id": 399415038452606756, + "Parent Entity": "ContainerEntity", + "Transform Data": { + "Translate": [ + 47.53014373779297, + -0.00018183141946792603, + 0.0 + ] + } + }, + "Component_[4564240319609068082]": { + "$type": "EditorEntitySortComponent", + "Id": 4564240319609068082 + }, + "Component_[7827190074535394331]": { + "$type": "EditorMaterialComponent", + "Id": 7827190074535394331, + "Controller": { + "Configuration": { + "materials": [ + { + "Key": { + "materialSlotStableId": 2418540911 + }, + "Value": { + "MaterialAsset": { + "assetId": { + "guid": "{A7F03135-ECAD-5440-99DB-E84ABA3D50DA}" + }, + "assetHint": "materials/presets/pbr/metal_iron_polished.azmaterial" + } + } + } + ] + } + } + }, + "Component_[8092226976542590265]": { + "$type": "EditorDisabledCompositionComponent", + "Id": 8092226976542590265 + } + } + }, + "Entity_[3365423671252]": { + "Id": "Entity_[3365423671252]", + "Name": "Entity1", + "Components": { + "Component_[11525365929370623807]": { + "$type": "EditorVisibilityComponent", + "Id": 11525365929370623807 + }, + "Component_[12334620273692642550]": { + "$type": "EditorLockComponent", + "Id": 12334620273692642550 + }, + "Component_[14389735759337977675]": { + "$type": "EditorPendingCompositionComponent", + "Id": 14389735759337977675 + }, + "Component_[16184381538555246534]": { + "$type": "AZ::Render::EditorMeshComponent", + "Id": 16184381538555246534, + "Controller": { + "Configuration": { + "ModelAsset": { + "assetId": { + "guid": "{E14975EF-E676-51A4-B826-3EF59CB645AA}", + "subId": 285127096 + }, + "assetHint": "testdata/objects/cube/cube.azmodel" + } + } + } + }, + "Component_[17962478023087084794]": { + "$type": "SelectionComponent", + "Id": 17962478023087084794 + }, + "Component_[18071675051915092508]": { + "$type": "EditorEntityIconComponent", + "Id": 18071675051915092508 + }, + "Component_[2115498007879087044]": { + "$type": "EditorInspectorComponent", + "Id": 2115498007879087044, + "ComponentOrderEntryArray": [ + { + "ComponentId": 399415038452606756 + }, + { + "ComponentId": 16184381538555246534, + "SortIndex": 1 + }, + { + "ComponentId": 7827190074535394331, + "SortIndex": 2 + } + ] + }, + "Component_[3518973002096080237]": { + "$type": "EditorOnlyEntityComponent", + "Id": 3518973002096080237 + }, + "Component_[399415038452606756]": { + "$type": "{27F1E1A1-8D9D-4C3B-BD3A-AFB9762449C0} TransformComponent", + "Id": 399415038452606756, + "Parent Entity": "ContainerEntity", + "Transform Data": { + "Translate": [ + 2.5301437377929688, + -0.00018183141946792603, + 4.451573371887207 + ] + } + }, + "Component_[4564240319609068082]": { + "$type": "EditorEntitySortComponent", + "Id": 4564240319609068082 + }, + "Component_[7827190074535394331]": { + "$type": "EditorMaterialComponent", + "Id": 7827190074535394331, + "Controller": { + "Configuration": { + "materials": [ + { + "Key": { + "materialSlotStableId": 2418540911 + }, + "Value": { + "MaterialAsset": { + "assetId": { + "guid": "{60D4CA04-A2FE-5AE7-B472-694C38D05183}" + }, + "assetHint": "materials/presets/pbr/metal_platinum_matte.azmaterial" + } + } + } + ] + } + } + }, + "Component_[8092226976542590265]": { + "$type": "EditorDisabledCompositionComponent", + "Id": 8092226976542590265 + } + } + }, + "Entity_[3369718638548]": { + "Id": "Entity_[3369718638548]", + "Name": "Entity1", + "Components": { + "Component_[11525365929370623807]": { + "$type": "EditorVisibilityComponent", + "Id": 11525365929370623807 + }, + "Component_[12334620273692642550]": { + "$type": "EditorLockComponent", + "Id": 12334620273692642550 + }, + "Component_[14389735759337977675]": { + "$type": "EditorPendingCompositionComponent", + "Id": 14389735759337977675 + }, + "Component_[16184381538555246534]": { + "$type": "AZ::Render::EditorMeshComponent", + "Id": 16184381538555246534, + "Controller": { + "Configuration": { + "ModelAsset": { + "assetId": { + "guid": "{E14975EF-E676-51A4-B826-3EF59CB645AA}", + "subId": 285127096 + }, + "assetHint": "testdata/objects/cube/cube.azmodel" + } + } + } + }, + "Component_[17962478023087084794]": { + "$type": "SelectionComponent", + "Id": 17962478023087084794 + }, + "Component_[18071675051915092508]": { + "$type": "EditorEntityIconComponent", + "Id": 18071675051915092508 + }, + "Component_[2115498007879087044]": { + "$type": "EditorInspectorComponent", + "Id": 2115498007879087044, + "ComponentOrderEntryArray": [ + { + "ComponentId": 399415038452606756 + }, + { + "ComponentId": 16184381538555246534, + "SortIndex": 1 + }, + { + "ComponentId": 7827190074535394331, + "SortIndex": 2 + } + ] + }, + "Component_[3518973002096080237]": { + "$type": "EditorOnlyEntityComponent", + "Id": 3518973002096080237 + }, + "Component_[399415038452606756]": { + "$type": "{27F1E1A1-8D9D-4C3B-BD3A-AFB9762449C0} TransformComponent", + "Id": 399415038452606756, + "Parent Entity": "ContainerEntity", + "Transform Data": { + "Translate": [ + -12.530563354492188, + -0.00018183141946792603, + 39.56034851074219 + ] + } + }, + "Component_[4564240319609068082]": { + "$type": "EditorEntitySortComponent", + "Id": 4564240319609068082 + }, + "Component_[7827190074535394331]": { + "$type": "EditorMaterialComponent", + "Id": 7827190074535394331, + "Controller": { + "Configuration": { + "materials": [ + { + "Key": { + "materialSlotStableId": 2418540911 + }, + "Value": { + "MaterialAsset": { + "assetId": { + "guid": "{F2AD0EBF-7137-58D1-9991-9552FAD41B19}" + }, + "assetHint": "materials/presets/pbr/metal_mercury.azmaterial" + } + } + } + ] + } + } + }, + "Component_[8092226976542590265]": { + "$type": "EditorDisabledCompositionComponent", + "Id": 8092226976542590265 + } + } + }, + "Entity_[3374013605844]": { + "Id": "Entity_[3374013605844]", + "Name": "Entity1", + "Components": { + "Component_[11525365929370623807]": { + "$type": "EditorVisibilityComponent", + "Id": 11525365929370623807 + }, + "Component_[12334620273692642550]": { + "$type": "EditorLockComponent", + "Id": 12334620273692642550 + }, + "Component_[14389735759337977675]": { + "$type": "EditorPendingCompositionComponent", + "Id": 14389735759337977675 + }, + "Component_[16184381538555246534]": { + "$type": "AZ::Render::EditorMeshComponent", + "Id": 16184381538555246534, + "Controller": { + "Configuration": { + "ModelAsset": { + "assetId": { + "guid": "{E14975EF-E676-51A4-B826-3EF59CB645AA}", + "subId": 285127096 + }, + "assetHint": "testdata/objects/cube/cube.azmodel" + } + } + } + }, + "Component_[17962478023087084794]": { + "$type": "SelectionComponent", + "Id": 17962478023087084794 + }, + "Component_[18071675051915092508]": { + "$type": "EditorEntityIconComponent", + "Id": 18071675051915092508 + }, + "Component_[2115498007879087044]": { + "$type": "EditorInspectorComponent", + "Id": 2115498007879087044, + "ComponentOrderEntryArray": [ + { + "ComponentId": 399415038452606756 + }, + { + "ComponentId": 16184381538555246534, + "SortIndex": 1 + }, + { + "ComponentId": 7827190074535394331, + "SortIndex": 2 + } + ] + }, + "Component_[3518973002096080237]": { + "$type": "EditorOnlyEntityComponent", + "Id": 3518973002096080237 + }, + "Component_[399415038452606756]": { + "$type": "{27F1E1A1-8D9D-4C3B-BD3A-AFB9762449C0} TransformComponent", + "Id": 399415038452606756, + "Parent Entity": "ContainerEntity", + "Transform Data": { + "Translate": [ + 32.53014373779297, + -0.00018183141946792603, + 0.0 + ] + } + }, + "Component_[4564240319609068082]": { + "$type": "EditorEntitySortComponent", + "Id": 4564240319609068082 + }, + "Component_[7827190074535394331]": { + "$type": "EditorMaterialComponent", + "Id": 7827190074535394331, + "Controller": { + "Configuration": { + "materials": [ + { + "Key": { + "materialSlotStableId": 2418540911 + }, + "Value": { + "MaterialAsset": { + "assetId": { + "guid": "{93DF55AE-8D1B-5AD1-A609-05F1BD9F6EA0}" + }, + "assetHint": "materials/presets/pbr/metal_cobalt_polished.azmaterial" + } + } + } + ] + } + } + }, + "Component_[8092226976542590265]": { + "$type": "EditorDisabledCompositionComponent", + "Id": 8092226976542590265 + } + } + }, + "Entity_[3378308573140]": { + "Id": "Entity_[3378308573140]", + "Name": "Entity1", + "Components": { + "Component_[11525365929370623807]": { + "$type": "EditorVisibilityComponent", + "Id": 11525365929370623807 + }, + "Component_[12334620273692642550]": { + "$type": "EditorLockComponent", + "Id": 12334620273692642550 + }, + "Component_[14389735759337977675]": { + "$type": "EditorPendingCompositionComponent", + "Id": 14389735759337977675 + }, + "Component_[16184381538555246534]": { + "$type": "AZ::Render::EditorMeshComponent", + "Id": 16184381538555246534, + "Controller": { + "Configuration": { + "ModelAsset": { + "assetId": { + "guid": "{E14975EF-E676-51A4-B826-3EF59CB645AA}", + "subId": 285127096 + }, + "assetHint": "testdata/objects/cube/cube.azmodel" + } + } + } + }, + "Component_[17962478023087084794]": { + "$type": "SelectionComponent", + "Id": 17962478023087084794 + }, + "Component_[18071675051915092508]": { + "$type": "EditorEntityIconComponent", + "Id": 18071675051915092508 + }, + "Component_[2115498007879087044]": { + "$type": "EditorInspectorComponent", + "Id": 2115498007879087044, + "ComponentOrderEntryArray": [ + { + "ComponentId": 399415038452606756 + }, + { + "ComponentId": 16184381538555246534, + "SortIndex": 1 + }, + { + "ComponentId": 7827190074535394331, + "SortIndex": 2 + } + ] + }, + "Component_[3518973002096080237]": { + "$type": "EditorOnlyEntityComponent", + "Id": 3518973002096080237 + }, + "Component_[399415038452606756]": { + "$type": "{27F1E1A1-8D9D-4C3B-BD3A-AFB9762449C0} TransformComponent", + "Id": 399415038452606756, + "Parent Entity": "ContainerEntity", + "Transform Data": { + "Translate": [ + -2.5305633544921875, + -0.00018183141946792603, + 94.40913391113281 + ] + } + }, + "Component_[4564240319609068082]": { + "$type": "EditorEntitySortComponent", + "Id": 4564240319609068082 + }, + "Component_[7827190074535394331]": { + "$type": "EditorMaterialComponent", + "Id": 7827190074535394331, + "Controller": { + "Configuration": { + "materials": [ + { + "Key": { + "materialSlotStableId": 2418540911 + }, + "Value": { + "MaterialAsset": { + "assetId": { + "guid": "{9187B84B-425F-5D11-B4D7-35BBDB0959D1}" + }, + "assetHint": "materials/presets/pbr/metal_palladium_matte.azmaterial" + } + } + } + ] + } + } + }, + "Component_[8092226976542590265]": { + "$type": "EditorDisabledCompositionComponent", + "Id": 8092226976542590265 + } + } + }, + "Entity_[3382603540436]": { + "Id": "Entity_[3382603540436]", + "Name": "Entity1", + "Components": { + "Component_[11525365929370623807]": { + "$type": "EditorVisibilityComponent", + "Id": 11525365929370623807 + }, + "Component_[12334620273692642550]": { + "$type": "EditorLockComponent", + "Id": 12334620273692642550 + }, + "Component_[14389735759337977675]": { + "$type": "EditorPendingCompositionComponent", + "Id": 14389735759337977675 + }, + "Component_[16184381538555246534]": { + "$type": "AZ::Render::EditorMeshComponent", + "Id": 16184381538555246534, + "Controller": { + "Configuration": { + "ModelAsset": { + "assetId": { + "guid": "{E14975EF-E676-51A4-B826-3EF59CB645AA}", + "subId": 285127096 + }, + "assetHint": "testdata/objects/cube/cube.azmodel" + } + } + } + }, + "Component_[17962478023087084794]": { + "$type": "SelectionComponent", + "Id": 17962478023087084794 + }, + "Component_[18071675051915092508]": { + "$type": "EditorEntityIconComponent", + "Id": 18071675051915092508 + }, + "Component_[2115498007879087044]": { + "$type": "EditorInspectorComponent", + "Id": 2115498007879087044, + "ComponentOrderEntryArray": [ + { + "ComponentId": 399415038452606756 + }, + { + "ComponentId": 16184381538555246534, + "SortIndex": 1 + }, + { + "ComponentId": 7827190074535394331, + "SortIndex": 2 + } + ] + }, + "Component_[3518973002096080237]": { + "$type": "EditorOnlyEntityComponent", + "Id": 3518973002096080237 + }, + "Component_[399415038452606756]": { + "$type": "{27F1E1A1-8D9D-4C3B-BD3A-AFB9762449C0} TransformComponent", + "Id": 399415038452606756, + "Parent Entity": "ContainerEntity", + "Transform Data": { + "Translate": [ + 47.53014373779297, + -0.00018183141946792603, + 15.057670593261719 + ] + } + }, + "Component_[4564240319609068082]": { + "$type": "EditorEntitySortComponent", + "Id": 4564240319609068082 + }, + "Component_[7827190074535394331]": { + "$type": "EditorMaterialComponent", + "Id": 7827190074535394331, + "Controller": { + "Configuration": { + "materials": [ + { + "Key": { + "materialSlotStableId": 2418540911 + }, + "Value": { + "MaterialAsset": { + "assetId": { + "guid": "{A7F03135-ECAD-5440-99DB-E84ABA3D50DA}" + }, + "assetHint": "materials/presets/pbr/metal_iron_polished.azmaterial" + } + } + } + ] + } + } + }, + "Component_[8092226976542590265]": { + "$type": "EditorDisabledCompositionComponent", + "Id": 8092226976542590265 + } + } + }, + "Entity_[3386898507732]": { + "Id": "Entity_[3386898507732]", + "Name": "Entity1", + "Components": { + "Component_[11525365929370623807]": { + "$type": "EditorVisibilityComponent", + "Id": 11525365929370623807 + }, + "Component_[12334620273692642550]": { + "$type": "EditorLockComponent", + "Id": 12334620273692642550 + }, + "Component_[14389735759337977675]": { + "$type": "EditorPendingCompositionComponent", + "Id": 14389735759337977675 + }, + "Component_[16184381538555246534]": { + "$type": "AZ::Render::EditorMeshComponent", + "Id": 16184381538555246534, + "Controller": { + "Configuration": { + "ModelAsset": { + "assetId": { + "guid": "{E14975EF-E676-51A4-B826-3EF59CB645AA}", + "subId": 285127096 + }, + "assetHint": "testdata/objects/cube/cube.azmodel" + } + } + } + }, + "Component_[17962478023087084794]": { + "$type": "SelectionComponent", + "Id": 17962478023087084794 + }, + "Component_[18071675051915092508]": { + "$type": "EditorEntityIconComponent", + "Id": 18071675051915092508 + }, + "Component_[2115498007879087044]": { + "$type": "EditorInspectorComponent", + "Id": 2115498007879087044, + "ComponentOrderEntryArray": [ + { + "ComponentId": 399415038452606756 + }, + { + "ComponentId": 16184381538555246534, + "SortIndex": 1 + }, + { + "ComponentId": 7827190074535394331, + "SortIndex": 2 + } + ] + }, + "Component_[3518973002096080237]": { + "$type": "EditorOnlyEntityComponent", + "Id": 3518973002096080237 + }, + "Component_[399415038452606756]": { + "$type": "{27F1E1A1-8D9D-4C3B-BD3A-AFB9762449C0} TransformComponent", + "Id": 399415038452606756, + "Parent Entity": "ContainerEntity", + "Transform Data": { + "Translate": [ + -27.530563354492188, + -0.00018183141946792603, + 24.533506393432617 + ] + } + }, + "Component_[4564240319609068082]": { + "$type": "EditorEntitySortComponent", + "Id": 4564240319609068082 + }, + "Component_[7827190074535394331]": { + "$type": "EditorMaterialComponent", + "Id": 7827190074535394331, + "Controller": { + "Configuration": { + "materials": [ + { + "Key": { + "materialSlotStableId": 2418540911 + }, + "Value": { + "MaterialAsset": { + "assetId": { + "guid": "{E621C5BF-B8E1-55F0-A791-EC960F2FA46F}" + }, + "assetHint": "materials/presets/pbr/metal_copper.azmaterial" + } + } + } + ] + } + } + }, + "Component_[8092226976542590265]": { + "$type": "EditorDisabledCompositionComponent", + "Id": 8092226976542590265 + } + } + }, + "Entity_[3391193475028]": { + "Id": "Entity_[3391193475028]", + "Name": "Entity1", + "Components": { + "Component_[11525365929370623807]": { + "$type": "EditorVisibilityComponent", + "Id": 11525365929370623807 + }, + "Component_[12334620273692642550]": { + "$type": "EditorLockComponent", + "Id": 12334620273692642550 + }, + "Component_[14389735759337977675]": { + "$type": "EditorPendingCompositionComponent", + "Id": 14389735759337977675 + }, + "Component_[16184381538555246534]": { + "$type": "AZ::Render::EditorMeshComponent", + "Id": 16184381538555246534, + "Controller": { + "Configuration": { + "ModelAsset": { + "assetId": { + "guid": "{E14975EF-E676-51A4-B826-3EF59CB645AA}", + "subId": 285127096 + }, + "assetHint": "testdata/objects/cube/cube.azmodel" + } + } + } + }, + "Component_[17962478023087084794]": { + "$type": "SelectionComponent", + "Id": 17962478023087084794 + }, + "Component_[18071675051915092508]": { + "$type": "EditorEntityIconComponent", + "Id": 18071675051915092508 + }, + "Component_[2115498007879087044]": { + "$type": "EditorInspectorComponent", + "Id": 2115498007879087044, + "ComponentOrderEntryArray": [ + { + "ComponentId": 399415038452606756 + }, + { + "ComponentId": 16184381538555246534, + "SortIndex": 1 + }, + { + "ComponentId": 7827190074535394331, + "SortIndex": 2 + } + ] + }, + "Component_[3518973002096080237]": { + "$type": "EditorOnlyEntityComponent", + "Id": 3518973002096080237 + }, + "Component_[399415038452606756]": { + "$type": "{27F1E1A1-8D9D-4C3B-BD3A-AFB9762449C0} TransformComponent", + "Id": 399415038452606756, + "Parent Entity": "ContainerEntity", + "Transform Data": { + "Translate": [ + 32.53014373779297, + -0.00018183141946792603, + 45.14218521118164 + ] + } + }, + "Component_[4564240319609068082]": { + "$type": "EditorEntitySortComponent", + "Id": 4564240319609068082 + }, + "Component_[7827190074535394331]": { + "$type": "EditorMaterialComponent", + "Id": 7827190074535394331, + "Controller": { + "Configuration": { + "materials": [ + { + "Key": { + "materialSlotStableId": 2418540911 + }, + "Value": { + "MaterialAsset": { + "assetId": { + "guid": "{93DF55AE-8D1B-5AD1-A609-05F1BD9F6EA0}" + }, + "assetHint": "materials/presets/pbr/metal_cobalt_polished.azmaterial" + } + } + } + ] + } + } + }, + "Component_[8092226976542590265]": { + "$type": "EditorDisabledCompositionComponent", + "Id": 8092226976542590265 + } + } + }, + "Entity_[3395488442324]": { + "Id": "Entity_[3395488442324]", + "Name": "Entity1", + "Components": { + "Component_[1057179753323467068]": { + "$type": "EditorMaterialComponent", + "Id": 1057179753323467068, + "Controller": { + "Configuration": { + "materials": [ + { + "Key": { + "materialSlotStableId": 2418540911 + }, + "Value": { + "MaterialAsset": { + "assetId": { + "guid": "{A3F3CD98-1634-5542-AD5A-78E91BE21AE9}" + }, + "assetHint": "materials/presets/pbr/metal_titanium_matte.azmaterial" + } + } + } + ] + } + } + }, + "Component_[11525365929370623807]": { + "$type": "EditorVisibilityComponent", + "Id": 11525365929370623807 + }, + "Component_[12334620273692642550]": { + "$type": "EditorLockComponent", + "Id": 12334620273692642550 + }, + "Component_[14389735759337977675]": { + "$type": "EditorPendingCompositionComponent", + "Id": 14389735759337977675 + }, + "Component_[16184381538555246534]": { + "$type": "AZ::Render::EditorMeshComponent", + "Id": 16184381538555246534, + "Controller": { + "Configuration": { + "ModelAsset": { + "assetId": { + "guid": "{E14975EF-E676-51A4-B826-3EF59CB645AA}", + "subId": 285127096 + }, + "assetHint": "testdata/objects/cube/cube.azmodel" + } + } + } + }, + "Component_[17962478023087084794]": { + "$type": "SelectionComponent", + "Id": 17962478023087084794 + }, + "Component_[18071675051915092508]": { + "$type": "EditorEntityIconComponent", + "Id": 18071675051915092508 + }, + "Component_[2115498007879087044]": { + "$type": "EditorInspectorComponent", + "Id": 2115498007879087044, + "ComponentOrderEntryArray": [ + { + "ComponentId": 399415038452606756 + }, + { + "ComponentId": 16184381538555246534, + "SortIndex": 1 + }, + { + "ComponentId": 1057179753323467068, + "SortIndex": 2 + } + ] + }, + "Component_[3518973002096080237]": { + "$type": "EditorOnlyEntityComponent", + "Id": 3518973002096080237 + }, + "Component_[399415038452606756]": { + "$type": "{27F1E1A1-8D9D-4C3B-BD3A-AFB9762449C0} TransformComponent", + "Id": 399415038452606756, + "Parent Entity": "ContainerEntity", + "Transform Data": { + "Translate": [ + 12.530143737792969, + -0.00018183141946792603, + 4.451573371887207 + ] + } + }, + "Component_[4564240319609068082]": { + "$type": "EditorEntitySortComponent", + "Id": 4564240319609068082 + }, + "Component_[8092226976542590265]": { + "$type": "EditorDisabledCompositionComponent", + "Id": 8092226976542590265 + } + } + }, + "Entity_[3399783409620]": { + "Id": "Entity_[3399783409620]", + "Name": "Entity1", + "Components": { + "Component_[11525365929370623807]": { + "$type": "EditorVisibilityComponent", + "Id": 11525365929370623807 + }, + "Component_[12334620273692642550]": { + "$type": "EditorLockComponent", + "Id": 12334620273692642550 + }, + "Component_[14389735759337977675]": { + "$type": "EditorPendingCompositionComponent", + "Id": 14389735759337977675 + }, + "Component_[16184381538555246534]": { + "$type": "AZ::Render::EditorMeshComponent", + "Id": 16184381538555246534, + "Controller": { + "Configuration": { + "ModelAsset": { + "assetId": { + "guid": "{E14975EF-E676-51A4-B826-3EF59CB645AA}", + "subId": 285127096 + }, + "assetHint": "testdata/objects/cube/cube.azmodel" + } + } + } + }, + "Component_[17962478023087084794]": { + "$type": "SelectionComponent", + "Id": 17962478023087084794 + }, + "Component_[18071675051915092508]": { + "$type": "EditorEntityIconComponent", + "Id": 18071675051915092508 + }, + "Component_[2115498007879087044]": { + "$type": "EditorInspectorComponent", + "Id": 2115498007879087044, + "ComponentOrderEntryArray": [ + { + "ComponentId": 399415038452606756 + }, + { + "ComponentId": 16184381538555246534, + "SortIndex": 1 + }, + { + "ComponentId": 7827190074535394331, + "SortIndex": 2 + } + ] + }, + "Component_[3518973002096080237]": { + "$type": "EditorOnlyEntityComponent", + "Id": 3518973002096080237 + }, + "Component_[399415038452606756]": { + "$type": "{27F1E1A1-8D9D-4C3B-BD3A-AFB9762449C0} TransformComponent", + "Id": 399415038452606756, + "Parent Entity": "ContainerEntity", + "Transform Data": { + "Translate": [ + -37.53056335449219, + -0.00018183141946792603, + 84.40655517578125 + ] + } + }, + "Component_[4564240319609068082]": { + "$type": "EditorEntitySortComponent", + "Id": 4564240319609068082 + }, + "Component_[7827190074535394331]": { + "$type": "EditorMaterialComponent", + "Id": 7827190074535394331, + "Controller": { + "Configuration": { + "materials": [ + { + "Key": { + "materialSlotStableId": 2418540911 + }, + "Value": { + "MaterialAsset": { + "assetId": { + "guid": "{B7C712DC-4839-58BB-B522-A4F120084CF5}" + }, + "assetHint": "materials/presets/pbr/metal_chrome.azmaterial" + } + } + } + ] + } + } + }, + "Component_[8092226976542590265]": { + "$type": "EditorDisabledCompositionComponent", + "Id": 8092226976542590265 + } + } + }, + "Entity_[3404078376916]": { + "Id": "Entity_[3404078376916]", + "Name": "Entity1", + "Components": { + "Component_[11525365929370623807]": { + "$type": "EditorVisibilityComponent", + "Id": 11525365929370623807 + }, + "Component_[12334620273692642550]": { + "$type": "EditorLockComponent", + "Id": 12334620273692642550 + }, + "Component_[14389735759337977675]": { + "$type": "EditorPendingCompositionComponent", + "Id": 14389735759337977675 + }, + "Component_[16184381538555246534]": { + "$type": "AZ::Render::EditorMeshComponent", + "Id": 16184381538555246534, + "Controller": { + "Configuration": { + "ModelAsset": { + "assetId": { + "guid": "{E14975EF-E676-51A4-B826-3EF59CB645AA}", + "subId": 285127096 + }, + "assetHint": "testdata/objects/cube/cube.azmodel" + } + } + } + }, + "Component_[17962478023087084794]": { + "$type": "SelectionComponent", + "Id": 17962478023087084794 + }, + "Component_[18071675051915092508]": { + "$type": "EditorEntityIconComponent", + "Id": 18071675051915092508 + }, + "Component_[2115498007879087044]": { + "$type": "EditorInspectorComponent", + "Id": 2115498007879087044, + "ComponentOrderEntryArray": [ + { + "ComponentId": 399415038452606756 + }, + { + "ComponentId": 16184381538555246534, + "SortIndex": 1 + }, + { + "ComponentId": 7827190074535394331, + "SortIndex": 2 + } + ] + }, + "Component_[3518973002096080237]": { + "$type": "EditorOnlyEntityComponent", + "Id": 3518973002096080237 + }, + "Component_[399415038452606756]": { + "$type": "{27F1E1A1-8D9D-4C3B-BD3A-AFB9762449C0} TransformComponent", + "Id": 399415038452606756, + "Parent Entity": "ContainerEntity", + "Transform Data": { + "Translate": [ + -17.530563354492188, + -0.00018183141946792603, + 19.50924301147461 + ] + } + }, + "Component_[4564240319609068082]": { + "$type": "EditorEntitySortComponent", + "Id": 4564240319609068082 + }, + "Component_[7827190074535394331]": { + "$type": "EditorMaterialComponent", + "Id": 7827190074535394331, + "Controller": { + "Configuration": { + "materials": [ + { + "Key": { + "materialSlotStableId": 2418540911 + }, + "Value": { + "MaterialAsset": { + "assetId": { + "guid": "{970148AC-7258-5EC8-9CE7-F4EF93164D93}" + }, + "assetHint": "materials/presets/pbr/metal_iron_matte.azmaterial" + } + } + } + ] + } + } + }, + "Component_[8092226976542590265]": { + "$type": "EditorDisabledCompositionComponent", + "Id": 8092226976542590265 + } + } + }, + "Entity_[3408373344212]": { + "Id": "Entity_[3408373344212]", + "Name": "Entity1", + "Components": { + "Component_[11525365929370623807]": { + "$type": "EditorVisibilityComponent", + "Id": 11525365929370623807 + }, + "Component_[12334620273692642550]": { + "$type": "EditorLockComponent", + "Id": 12334620273692642550 + }, + "Component_[14389735759337977675]": { + "$type": "EditorPendingCompositionComponent", + "Id": 14389735759337977675 + }, + "Component_[16184381538555246534]": { + "$type": "AZ::Render::EditorMeshComponent", + "Id": 16184381538555246534, + "Controller": { + "Configuration": { + "ModelAsset": { + "assetId": { + "guid": "{E14975EF-E676-51A4-B826-3EF59CB645AA}", + "subId": 285127096 + }, + "assetHint": "testdata/objects/cube/cube.azmodel" + } + } + } + }, + "Component_[17962478023087084794]": { + "$type": "SelectionComponent", + "Id": 17962478023087084794 + }, + "Component_[18071675051915092508]": { + "$type": "EditorEntityIconComponent", + "Id": 18071675051915092508 + }, + "Component_[2115498007879087044]": { + "$type": "EditorInspectorComponent", + "Id": 2115498007879087044, + "ComponentOrderEntryArray": [ + { + "ComponentId": 399415038452606756 + }, + { + "ComponentId": 16184381538555246534, + "SortIndex": 1 + }, + { + "ComponentId": 7827190074535394331, + "SortIndex": 2 + } + ] + }, + "Component_[3518973002096080237]": { + "$type": "EditorOnlyEntityComponent", + "Id": 3518973002096080237 + }, + "Component_[399415038452606756]": { + "$type": "{27F1E1A1-8D9D-4C3B-BD3A-AFB9762449C0} TransformComponent", + "Id": 399415038452606756, + "Parent Entity": "ContainerEntity", + "Transform Data": { + "Translate": [ + -2.5305633544921875, + -0.00018183141946792603, + 0.0 + ] + } + }, + "Component_[4564240319609068082]": { + "$type": "EditorEntitySortComponent", + "Id": 4564240319609068082 + }, + "Component_[7827190074535394331]": { + "$type": "EditorMaterialComponent", + "Id": 7827190074535394331, + "Controller": { + "Configuration": { + "materials": [ + { + "Key": { + "materialSlotStableId": 2418540911 + }, + "Value": { + "MaterialAsset": { + "assetId": { + "guid": "{D0E9960A-4B31-5136-BAC6-5482B203D3B4}" + }, + "assetHint": "materials/presets/pbr/metal_palladium_polished.azmaterial" + } + } + } + ] + } + } + }, + "Component_[8092226976542590265]": { + "$type": "EditorDisabledCompositionComponent", + "Id": 8092226976542590265 + } + } + }, + "Entity_[3412668311508]": { + "Id": "Entity_[3412668311508]", + "Name": "Entity1", + "Components": { + "Component_[11525365929370623807]": { + "$type": "EditorVisibilityComponent", + "Id": 11525365929370623807 + }, + "Component_[12334620273692642550]": { + "$type": "EditorLockComponent", + "Id": 12334620273692642550 + }, + "Component_[14389735759337977675]": { + "$type": "EditorPendingCompositionComponent", + "Id": 14389735759337977675 + }, + "Component_[16184381538555246534]": { + "$type": "AZ::Render::EditorMeshComponent", + "Id": 16184381538555246534, + "Controller": { + "Configuration": { + "ModelAsset": { + "assetId": { + "guid": "{E14975EF-E676-51A4-B826-3EF59CB645AA}", + "subId": 285127096 + }, + "assetHint": "testdata/objects/cube/cube.azmodel" + } + } + } + }, + "Component_[17962478023087084794]": { + "$type": "SelectionComponent", + "Id": 17962478023087084794 + }, + "Component_[18071675051915092508]": { + "$type": "EditorEntityIconComponent", + "Id": 18071675051915092508 + }, + "Component_[2115498007879087044]": { + "$type": "EditorInspectorComponent", + "Id": 2115498007879087044, + "ComponentOrderEntryArray": [ + { + "ComponentId": 399415038452606756 + }, + { + "ComponentId": 16184381538555246534, + "SortIndex": 1 + }, + { + "ComponentId": 7827190074535394331, + "SortIndex": 2 + } + ] + }, + "Component_[3518973002096080237]": { + "$type": "EditorOnlyEntityComponent", + "Id": 3518973002096080237 + }, + "Component_[399415038452606756]": { + "$type": "{27F1E1A1-8D9D-4C3B-BD3A-AFB9762449C0} TransformComponent", + "Id": 399415038452606756, + "Parent Entity": "ContainerEntity", + "Transform Data": { + "Translate": [ + 2.5301437377929688, + -0.00018183141946792603, + 99.43339538574219 + ] + } + }, + "Component_[4564240319609068082]": { + "$type": "EditorEntitySortComponent", + "Id": 4564240319609068082 + }, + "Component_[7827190074535394331]": { + "$type": "EditorMaterialComponent", + "Id": 7827190074535394331, + "Controller": { + "Configuration": { + "materials": [ + { + "Key": { + "materialSlotStableId": 2418540911 + }, + "Value": { + "MaterialAsset": { + "assetId": { + "guid": "{E23FC75B-4142-55F1-B9AE-884826E7EB23}" + }, + "assetHint": "materials/presets/pbr/metal_platinum.azmaterial" + } + } + } + ] + } + } + }, + "Component_[8092226976542590265]": { + "$type": "EditorDisabledCompositionComponent", + "Id": 8092226976542590265 + } + } + }, + "Entity_[3416963278804]": { + "Id": "Entity_[3416963278804]", + "Name": "Entity1", + "Components": { + "Component_[11525365929370623807]": { + "$type": "EditorVisibilityComponent", + "Id": 11525365929370623807 + }, + "Component_[12334620273692642550]": { + "$type": "EditorLockComponent", + "Id": 12334620273692642550 + }, + "Component_[14389735759337977675]": { + "$type": "EditorPendingCompositionComponent", + "Id": 14389735759337977675 + }, + "Component_[16184381538555246534]": { + "$type": "AZ::Render::EditorMeshComponent", + "Id": 16184381538555246534, + "Controller": { + "Configuration": { + "ModelAsset": { + "assetId": { + "guid": "{E14975EF-E676-51A4-B826-3EF59CB645AA}", + "subId": 285127096 + }, + "assetHint": "testdata/objects/cube/cube.azmodel" + } + } + } + }, + "Component_[17962478023087084794]": { + "$type": "SelectionComponent", + "Id": 17962478023087084794 + }, + "Component_[18071675051915092508]": { + "$type": "EditorEntityIconComponent", + "Id": 18071675051915092508 + }, + "Component_[2115498007879087044]": { + "$type": "EditorInspectorComponent", + "Id": 2115498007879087044, + "ComponentOrderEntryArray": [ + { + "ComponentId": 399415038452606756 + }, + { + "ComponentId": 16184381538555246534, + "SortIndex": 1 + }, + { + "ComponentId": 7827190074535394331, + "SortIndex": 2 + } + ] + }, + "Component_[3518973002096080237]": { + "$type": "EditorOnlyEntityComponent", + "Id": 3518973002096080237 + }, + "Component_[399415038452606756]": { + "$type": "{27F1E1A1-8D9D-4C3B-BD3A-AFB9762449C0} TransformComponent", + "Id": 399415038452606756, + "Parent Entity": "ContainerEntity", + "Transform Data": { + "Translate": [ + 47.53014373779297, + -0.00018183141946792603, + 109.46680450439453 + ] + } + }, + "Component_[4564240319609068082]": { + "$type": "EditorEntitySortComponent", + "Id": 4564240319609068082 + }, + "Component_[7827190074535394331]": { + "$type": "EditorMaterialComponent", + "Id": 7827190074535394331, + "Controller": { + "Configuration": { + "materials": [ + { + "Key": { + "materialSlotStableId": 2418540911 + }, + "Value": { + "MaterialAsset": { + "assetId": { + "guid": "{970148AC-7258-5EC8-9CE7-F4EF93164D93}" + }, + "assetHint": "materials/presets/pbr/metal_iron_matte.azmaterial" + } + } + } + ] + } + } + }, + "Component_[8092226976542590265]": { + "$type": "EditorDisabledCompositionComponent", + "Id": 8092226976542590265 + } + } + }, + "Entity_[3421258246100]": { + "Id": "Entity_[3421258246100]", + "Name": "Entity1", + "Components": { + "Component_[11525365929370623807]": { + "$type": "EditorVisibilityComponent", + "Id": 11525365929370623807 + }, + "Component_[12334620273692642550]": { + "$type": "EditorLockComponent", + "Id": 12334620273692642550 + }, + "Component_[14389735759337977675]": { + "$type": "EditorPendingCompositionComponent", + "Id": 14389735759337977675 + }, + "Component_[16184381538555246534]": { + "$type": "AZ::Render::EditorMeshComponent", + "Id": 16184381538555246534, + "Controller": { + "Configuration": { + "ModelAsset": { + "assetId": { + "guid": "{E14975EF-E676-51A4-B826-3EF59CB645AA}", + "subId": 285127096 + }, + "assetHint": "testdata/objects/cube/cube.azmodel" + } + } + } + }, + "Component_[17962478023087084794]": { + "$type": "SelectionComponent", + "Id": 17962478023087084794 + }, + "Component_[18071675051915092508]": { + "$type": "EditorEntityIconComponent", + "Id": 18071675051915092508 + }, + "Component_[2115498007879087044]": { + "$type": "EditorInspectorComponent", + "Id": 2115498007879087044, + "ComponentOrderEntryArray": [ + { + "ComponentId": 399415038452606756 + }, + { + "ComponentId": 16184381538555246534, + "SortIndex": 1 + }, + { + "ComponentId": 7827190074535394331, + "SortIndex": 2 + } + ] + }, + "Component_[3518973002096080237]": { + "$type": "EditorOnlyEntityComponent", + "Id": 3518973002096080237 + }, + "Component_[399415038452606756]": { + "$type": "{27F1E1A1-8D9D-4C3B-BD3A-AFB9762449C0} TransformComponent", + "Id": 399415038452606756, + "Parent Entity": "ContainerEntity", + "Transform Data": { + "Translate": [ + 22.53014373779297, + -0.00018183141946792603, + 49.593753814697266 + ] + } + }, + "Component_[4564240319609068082]": { + "$type": "EditorEntitySortComponent", + "Id": 4564240319609068082 + }, + "Component_[7827190074535394331]": { + "$type": "EditorMaterialComponent", + "Id": 7827190074535394331, + "Controller": { + "Configuration": { + "materials": [ + { + "Key": { + "materialSlotStableId": 2418540911 + }, + "Value": { + "MaterialAsset": { + "assetId": { + "guid": "{AE350D9F-0000-526D-B49C-4303D687BB86}" + }, + "assetHint": "materials/presets/pbr/metal_brass_matte.azmaterial" + } + } + } + ] + } + } + }, + "Component_[8092226976542590265]": { + "$type": "EditorDisabledCompositionComponent", + "Id": 8092226976542590265 + } + } + }, + "Entity_[3425553213396]": { + "Id": "Entity_[3425553213396]", + "Name": "Entity1", + "Components": { + "Component_[11525365929370623807]": { + "$type": "EditorVisibilityComponent", + "Id": 11525365929370623807 + }, + "Component_[12334620273692642550]": { + "$type": "EditorLockComponent", + "Id": 12334620273692642550 + }, + "Component_[14389735759337977675]": { + "$type": "EditorPendingCompositionComponent", + "Id": 14389735759337977675 + }, + "Component_[16184381538555246534]": { + "$type": "AZ::Render::EditorMeshComponent", + "Id": 16184381538555246534, + "Controller": { + "Configuration": { + "ModelAsset": { + "assetId": { + "guid": "{E14975EF-E676-51A4-B826-3EF59CB645AA}", + "subId": 285127096 + }, + "assetHint": "testdata/objects/cube/cube.azmodel" + } + } + } + }, + "Component_[17962478023087084794]": { + "$type": "SelectionComponent", + "Id": 17962478023087084794 + }, + "Component_[18071675051915092508]": { + "$type": "EditorEntityIconComponent", + "Id": 18071675051915092508 + }, + "Component_[2115498007879087044]": { + "$type": "EditorInspectorComponent", + "Id": 2115498007879087044, + "ComponentOrderEntryArray": [ + { + "ComponentId": 399415038452606756 + }, + { + "ComponentId": 16184381538555246534, + "SortIndex": 1 + }, + { + "ComponentId": 7827190074535394331, + "SortIndex": 2 + } + ] + }, + "Component_[3518973002096080237]": { + "$type": "EditorOnlyEntityComponent", + "Id": 3518973002096080237 + }, + "Component_[399415038452606756]": { + "$type": "{27F1E1A1-8D9D-4C3B-BD3A-AFB9762449C0} TransformComponent", + "Id": 399415038452606756, + "Parent Entity": "ContainerEntity", + "Transform Data": { + "Translate": [ + 47.53014373779297, + -0.00018183141946792603, + 79.38228607177734 + ] + } + }, + "Component_[4564240319609068082]": { + "$type": "EditorEntitySortComponent", + "Id": 4564240319609068082 + }, + "Component_[7827190074535394331]": { + "$type": "EditorMaterialComponent", + "Id": 7827190074535394331, + "Controller": { + "Configuration": { + "materials": [ + { + "Key": { + "materialSlotStableId": 2418540911 + }, + "Value": { + "MaterialAsset": { + "assetId": { + "guid": "{970148AC-7258-5EC8-9CE7-F4EF93164D93}" + }, + "assetHint": "materials/presets/pbr/metal_iron_matte.azmaterial" + } + } + } + ] + } + } + }, + "Component_[8092226976542590265]": { + "$type": "EditorDisabledCompositionComponent", + "Id": 8092226976542590265 + } + } + }, + "Entity_[3429848180692]": { + "Id": "Entity_[3429848180692]", + "Name": "Entity1", + "Components": { + "Component_[11525365929370623807]": { + "$type": "EditorVisibilityComponent", + "Id": 11525365929370623807 + }, + "Component_[12334620273692642550]": { + "$type": "EditorLockComponent", + "Id": 12334620273692642550 + }, + "Component_[14389735759337977675]": { + "$type": "EditorPendingCompositionComponent", + "Id": 14389735759337977675 + }, + "Component_[16184381538555246534]": { + "$type": "AZ::Render::EditorMeshComponent", + "Id": 16184381538555246534, + "Controller": { + "Configuration": { + "ModelAsset": { + "assetId": { + "guid": "{E14975EF-E676-51A4-B826-3EF59CB645AA}", + "subId": 285127096 + }, + "assetHint": "testdata/objects/cube/cube.azmodel" + } + } + } + }, + "Component_[17962478023087084794]": { + "$type": "SelectionComponent", + "Id": 17962478023087084794 + }, + "Component_[18071675051915092508]": { + "$type": "EditorEntityIconComponent", + "Id": 18071675051915092508 + }, + "Component_[2115498007879087044]": { + "$type": "EditorInspectorComponent", + "Id": 2115498007879087044, + "ComponentOrderEntryArray": [ + { + "ComponentId": 399415038452606756 + }, + { + "ComponentId": 16184381538555246534, + "SortIndex": 1 + }, + { + "ComponentId": 7827190074535394331, + "SortIndex": 2 + } + ] + }, + "Component_[3518973002096080237]": { + "$type": "EditorOnlyEntityComponent", + "Id": 3518973002096080237 + }, + "Component_[399415038452606756]": { + "$type": "{27F1E1A1-8D9D-4C3B-BD3A-AFB9762449C0} TransformComponent", + "Id": 399415038452606756, + "Parent Entity": "ContainerEntity", + "Transform Data": { + "Translate": [ + -37.53056335449219, + -0.00018183141946792603, + 105.0152359008789 + ] + } + }, + "Component_[4564240319609068082]": { + "$type": "EditorEntitySortComponent", + "Id": 4564240319609068082 + }, + "Component_[7827190074535394331]": { + "$type": "EditorMaterialComponent", + "Id": 7827190074535394331, + "Controller": { + "Configuration": { + "materials": [ + { + "Key": { + "materialSlotStableId": 2418540911 + }, + "Value": { + "MaterialAsset": { + "assetId": { + "guid": "{CAF50181-3384-5DF2-9304-C6E48E83C72D}" + }, + "assetHint": "materials/presets/pbr/metal_chrome_polished.azmaterial" + } + } + } + ] + } + } + }, + "Component_[8092226976542590265]": { + "$type": "EditorDisabledCompositionComponent", + "Id": 8092226976542590265 + } + } + }, + "Entity_[3434143147988]": { + "Id": "Entity_[3434143147988]", + "Name": "Entity1", + "Components": { + "Component_[1057179753323467068]": { + "$type": "EditorMaterialComponent", + "Id": 1057179753323467068, + "Controller": { + "Configuration": { + "materials": [ + { + "Key": { + "materialSlotStableId": 2418540911 + }, + "Value": { + "MaterialAsset": { + "assetId": { + "guid": "{3F0DF0C4-5F23-5EB1-B762-7344AFFDC011}" + }, + "assetHint": "materials/presets/pbr/metal_titanium_polished.azmaterial" + } + } + } + ] + } + } + }, + "Component_[11525365929370623807]": { + "$type": "EditorVisibilityComponent", + "Id": 11525365929370623807 + }, + "Component_[12334620273692642550]": { + "$type": "EditorLockComponent", + "Id": 12334620273692642550 + }, + "Component_[14389735759337977675]": { + "$type": "EditorPendingCompositionComponent", + "Id": 14389735759337977675 + }, + "Component_[16184381538555246534]": { + "$type": "AZ::Render::EditorMeshComponent", + "Id": 16184381538555246534, + "Controller": { + "Configuration": { + "ModelAsset": { + "assetId": { + "guid": "{E14975EF-E676-51A4-B826-3EF59CB645AA}", + "subId": 285127096 + }, + "assetHint": "testdata/objects/cube/cube.azmodel" + } + } + } + }, + "Component_[17962478023087084794]": { + "$type": "SelectionComponent", + "Id": 17962478023087084794 + }, + "Component_[18071675051915092508]": { + "$type": "EditorEntityIconComponent", + "Id": 18071675051915092508 + }, + "Component_[2115498007879087044]": { + "$type": "EditorInspectorComponent", + "Id": 2115498007879087044, + "ComponentOrderEntryArray": [ + { + "ComponentId": 399415038452606756 + }, + { + "ComponentId": 16184381538555246534, + "SortIndex": 1 + }, + { + "ComponentId": 1057179753323467068, + "SortIndex": 2 + } + ] + }, + "Component_[3518973002096080237]": { + "$type": "EditorOnlyEntityComponent", + "Id": 3518973002096080237 + }, + "Component_[399415038452606756]": { + "$type": "{27F1E1A1-8D9D-4C3B-BD3A-AFB9762449C0} TransformComponent", + "Id": 399415038452606756, + "Parent Entity": "ContainerEntity", + "Transform Data": { + "Translate": [ + 12.530143737792969, + -0.00018183141946792603, + 15.057670593261719 + ] + } + }, + "Component_[4564240319609068082]": { + "$type": "EditorEntitySortComponent", + "Id": 4564240319609068082 + }, + "Component_[8092226976542590265]": { + "$type": "EditorDisabledCompositionComponent", + "Id": 8092226976542590265 + } + } + }, + "Entity_[3438438115284]": { + "Id": "Entity_[3438438115284]", + "Name": "Entity1", + "Components": { + "Component_[11525365929370623807]": { + "$type": "EditorVisibilityComponent", + "Id": 11525365929370623807 + }, + "Component_[12334620273692642550]": { + "$type": "EditorLockComponent", + "Id": 12334620273692642550 + }, + "Component_[14389735759337977675]": { + "$type": "EditorPendingCompositionComponent", + "Id": 14389735759337977675 + }, + "Component_[16184381538555246534]": { + "$type": "AZ::Render::EditorMeshComponent", + "Id": 16184381538555246534, + "Controller": { + "Configuration": { + "ModelAsset": { + "assetId": { + "guid": "{E14975EF-E676-51A4-B826-3EF59CB645AA}", + "subId": 285127096 + }, + "assetHint": "testdata/objects/cube/cube.azmodel" + } + } + } + }, + "Component_[17962478023087084794]": { + "$type": "SelectionComponent", + "Id": 17962478023087084794 + }, + "Component_[18071675051915092508]": { + "$type": "EditorEntityIconComponent", + "Id": 18071675051915092508 + }, + "Component_[2115498007879087044]": { + "$type": "EditorInspectorComponent", + "Id": 2115498007879087044, + "ComponentOrderEntryArray": [ + { + "ComponentId": 399415038452606756 + }, + { + "ComponentId": 16184381538555246534, + "SortIndex": 1 + }, + { + "ComponentId": 7827190074535394331, + "SortIndex": 2 + } + ] + }, + "Component_[3518973002096080237]": { + "$type": "EditorOnlyEntityComponent", + "Id": 3518973002096080237 + }, + "Component_[399415038452606756]": { + "$type": "{27F1E1A1-8D9D-4C3B-BD3A-AFB9762449C0} TransformComponent", + "Id": 399415038452606756, + "Parent Entity": "ContainerEntity", + "Transform Data": { + "Translate": [ + -37.53056335449219, + -0.00018183141946792603, + 89.95755767822266 + ] + } + }, + "Component_[4564240319609068082]": { + "$type": "EditorEntitySortComponent", + "Id": 4564240319609068082 + }, + "Component_[7827190074535394331]": { + "$type": "EditorMaterialComponent", + "Id": 7827190074535394331, + "Controller": { + "Configuration": { + "materials": [ + { + "Key": { + "materialSlotStableId": 2418540911 + }, + "Value": { + "MaterialAsset": { + "assetId": { + "guid": "{CAF50181-3384-5DF2-9304-C6E48E83C72D}" + }, + "assetHint": "materials/presets/pbr/metal_chrome_polished.azmaterial" + } + } + } + ] + } + } + }, + "Component_[8092226976542590265]": { + "$type": "EditorDisabledCompositionComponent", + "Id": 8092226976542590265 + } + } + }, + "Entity_[3442733082580]": { + "Id": "Entity_[3442733082580]", + "Name": "Entity1", + "Components": { + "Component_[11525365929370623807]": { + "$type": "EditorVisibilityComponent", + "Id": 11525365929370623807 + }, + "Component_[12334620273692642550]": { + "$type": "EditorLockComponent", + "Id": 12334620273692642550 + }, + "Component_[14389735759337977675]": { + "$type": "EditorPendingCompositionComponent", + "Id": 14389735759337977675 + }, + "Component_[16184381538555246534]": { + "$type": "AZ::Render::EditorMeshComponent", + "Id": 16184381538555246534, + "Controller": { + "Configuration": { + "ModelAsset": { + "assetId": { + "guid": "{E14975EF-E676-51A4-B826-3EF59CB645AA}", + "subId": 285127096 + }, + "assetHint": "testdata/objects/cube/cube.azmodel" + } + } + } + }, + "Component_[17962478023087084794]": { + "$type": "SelectionComponent", + "Id": 17962478023087084794 + }, + "Component_[18071675051915092508]": { + "$type": "EditorEntityIconComponent", + "Id": 18071675051915092508 + }, + "Component_[2115498007879087044]": { + "$type": "EditorInspectorComponent", + "Id": 2115498007879087044, + "ComponentOrderEntryArray": [ + { + "ComponentId": 399415038452606756 + }, + { + "ComponentId": 16184381538555246534, + "SortIndex": 1 + }, + { + "ComponentId": 7827190074535394331, + "SortIndex": 2 + } + ] + }, + "Component_[3518973002096080237]": { + "$type": "EditorOnlyEntityComponent", + "Id": 3518973002096080237 + }, + "Component_[399415038452606756]": { + "$type": "{27F1E1A1-8D9D-4C3B-BD3A-AFB9762449C0} TransformComponent", + "Id": 399415038452606756, + "Parent Entity": "ContainerEntity", + "Transform Data": { + "Translate": [ + 37.53014373779297, + -0.00018183141946792603, + 19.50924301147461 + ] + } + }, + "Component_[4564240319609068082]": { + "$type": "EditorEntitySortComponent", + "Id": 4564240319609068082 + }, + "Component_[7827190074535394331]": { + "$type": "EditorMaterialComponent", + "Id": 7827190074535394331, + "Controller": { + "Configuration": { + "materials": [ + { + "Key": { + "materialSlotStableId": 2418540911 + }, + "Value": { + "MaterialAsset": { + "assetId": { + "guid": "{2D054071-BEF7-53C0-A8C9-E4F026BD8364}" + }, + "assetHint": "materials/presets/pbr/metal_copper_matte.azmaterial" + } + } + } + ] + } + } + }, + "Component_[8092226976542590265]": { + "$type": "EditorDisabledCompositionComponent", + "Id": 8092226976542590265 + } + } + }, + "Entity_[3447028049876]": { + "Id": "Entity_[3447028049876]", + "Name": "Entity1", + "Components": { + "Component_[11525365929370623807]": { + "$type": "EditorVisibilityComponent", + "Id": 11525365929370623807 + }, + "Component_[12334620273692642550]": { + "$type": "EditorLockComponent", + "Id": 12334620273692642550 + }, + "Component_[14389735759337977675]": { + "$type": "EditorPendingCompositionComponent", + "Id": 14389735759337977675 + }, + "Component_[16184381538555246534]": { + "$type": "AZ::Render::EditorMeshComponent", + "Id": 16184381538555246534, + "Controller": { + "Configuration": { + "ModelAsset": { + "assetId": { + "guid": "{E14975EF-E676-51A4-B826-3EF59CB645AA}", + "subId": 285127096 + }, + "assetHint": "testdata/objects/cube/cube.azmodel" + } + } + } + }, + "Component_[17962478023087084794]": { + "$type": "SelectionComponent", + "Id": 17962478023087084794 + }, + "Component_[18071675051915092508]": { + "$type": "EditorEntityIconComponent", + "Id": 18071675051915092508 + }, + "Component_[2115498007879087044]": { + "$type": "EditorInspectorComponent", + "Id": 2115498007879087044, + "ComponentOrderEntryArray": [ + { + "ComponentId": 399415038452606756 + }, + { + "ComponentId": 16184381538555246534, + "SortIndex": 1 + }, + { + "ComponentId": 7827190074535394331, + "SortIndex": 2 + } + ] + }, + "Component_[3518973002096080237]": { + "$type": "EditorOnlyEntityComponent", + "Id": 3518973002096080237 + }, + "Component_[399415038452606756]": { + "$type": "{27F1E1A1-8D9D-4C3B-BD3A-AFB9762449C0} TransformComponent", + "Id": 399415038452606756, + "Parent Entity": "ContainerEntity", + "Transform Data": { + "Translate": [ + 32.53014373779297, + -0.00018183141946792603, + 74.93071746826172 + ] + } + }, + "Component_[4564240319609068082]": { + "$type": "EditorEntitySortComponent", + "Id": 4564240319609068082 + }, + "Component_[7827190074535394331]": { + "$type": "EditorMaterialComponent", + "Id": 7827190074535394331, + "Controller": { + "Configuration": { + "materials": [ + { + "Key": { + "materialSlotStableId": 2418540911 + }, + "Value": { + "MaterialAsset": { + "assetId": { + "guid": "{93DF55AE-8D1B-5AD1-A609-05F1BD9F6EA0}" + }, + "assetHint": "materials/presets/pbr/metal_cobalt_polished.azmaterial" + } + } + } + ] + } + } + }, + "Component_[8092226976542590265]": { + "$type": "EditorDisabledCompositionComponent", + "Id": 8092226976542590265 + } + } + }, + "Entity_[3451323017172]": { + "Id": "Entity_[3451323017172]", + "Name": "Entity1", + "Components": { + "Component_[11525365929370623807]": { + "$type": "EditorVisibilityComponent", + "Id": 11525365929370623807 + }, + "Component_[12334620273692642550]": { + "$type": "EditorLockComponent", + "Id": 12334620273692642550 + }, + "Component_[14389735759337977675]": { + "$type": "EditorPendingCompositionComponent", + "Id": 14389735759337977675 + }, + "Component_[16184381538555246534]": { + "$type": "AZ::Render::EditorMeshComponent", + "Id": 16184381538555246534, + "Controller": { + "Configuration": { + "ModelAsset": { + "assetId": { + "guid": "{E14975EF-E676-51A4-B826-3EF59CB645AA}", + "subId": 285127096 + }, + "assetHint": "testdata/objects/cube/cube.azmodel" + } + } + } + }, + "Component_[17962478023087084794]": { + "$type": "SelectionComponent", + "Id": 17962478023087084794 + }, + "Component_[18071675051915092508]": { + "$type": "EditorEntityIconComponent", + "Id": 18071675051915092508 + }, + "Component_[2115498007879087044]": { + "$type": "EditorInspectorComponent", + "Id": 2115498007879087044, + "ComponentOrderEntryArray": [ + { + "ComponentId": 399415038452606756 + }, + { + "ComponentId": 16184381538555246534, + "SortIndex": 1 + }, + { + "ComponentId": 7827190074535394331, + "SortIndex": 2 + } + ] + }, + "Component_[3518973002096080237]": { + "$type": "EditorOnlyEntityComponent", + "Id": 3518973002096080237 + }, + "Component_[399415038452606756]": { + "$type": "{27F1E1A1-8D9D-4C3B-BD3A-AFB9762449C0} TransformComponent", + "Id": 399415038452606756, + "Parent Entity": "ContainerEntity", + "Transform Data": { + "Translate": [ + 2.5301437377929688, + -0.00018183141946792603, + 24.533506393432617 + ] + } + }, + "Component_[4564240319609068082]": { + "$type": "EditorEntitySortComponent", + "Id": 4564240319609068082 + }, + "Component_[7827190074535394331]": { + "$type": "EditorMaterialComponent", + "Id": 7827190074535394331, + "Controller": { + "Configuration": { + "materials": [ + { + "Key": { + "materialSlotStableId": 2418540911 + }, + "Value": { + "MaterialAsset": { + "assetId": { + "guid": "{E23FC75B-4142-55F1-B9AE-884826E7EB23}" + }, + "assetHint": "materials/presets/pbr/metal_platinum.azmaterial" + } + } + } + ] + } + } + }, + "Component_[8092226976542590265]": { + "$type": "EditorDisabledCompositionComponent", + "Id": 8092226976542590265 + } + } + }, + "Entity_[3455617984468]": { + "Id": "Entity_[3455617984468]", + "Name": "Entity1", + "Components": { + "Component_[11525365929370623807]": { + "$type": "EditorVisibilityComponent", + "Id": 11525365929370623807 + }, + "Component_[12334620273692642550]": { + "$type": "EditorLockComponent", + "Id": 12334620273692642550 + }, + "Component_[14389735759337977675]": { + "$type": "EditorPendingCompositionComponent", + "Id": 14389735759337977675 + }, + "Component_[16184381538555246534]": { + "$type": "AZ::Render::EditorMeshComponent", + "Id": 16184381538555246534, + "Controller": { + "Configuration": { + "ModelAsset": { + "assetId": { + "guid": "{E14975EF-E676-51A4-B826-3EF59CB645AA}", + "subId": 285127096 + }, + "assetHint": "testdata/objects/cube/cube.azmodel" + } + } + } + }, + "Component_[17962478023087084794]": { + "$type": "SelectionComponent", + "Id": 17962478023087084794 + }, + "Component_[18071675051915092508]": { + "$type": "EditorEntityIconComponent", + "Id": 18071675051915092508 + }, + "Component_[2115498007879087044]": { + "$type": "EditorInspectorComponent", + "Id": 2115498007879087044, + "ComponentOrderEntryArray": [ + { + "ComponentId": 399415038452606756 + }, + { + "ComponentId": 16184381538555246534, + "SortIndex": 1 + }, + { + "ComponentId": 7827190074535394331, + "SortIndex": 2 + } + ] + }, + "Component_[3518973002096080237]": { + "$type": "EditorOnlyEntityComponent", + "Id": 3518973002096080237 + }, + "Component_[399415038452606756]": { + "$type": "{27F1E1A1-8D9D-4C3B-BD3A-AFB9762449C0} TransformComponent", + "Id": 399415038452606756, + "Parent Entity": "ContainerEntity", + "Transform Data": { + "Translate": [ + -17.530563354492188, + -0.00018183141946792603, + 4.451573371887207 + ] + } + }, + "Component_[4564240319609068082]": { + "$type": "EditorEntitySortComponent", + "Id": 4564240319609068082 + }, + "Component_[7827190074535394331]": { + "$type": "EditorMaterialComponent", + "Id": 7827190074535394331, + "Controller": { + "Configuration": { + "materials": [ + { + "Key": { + "materialSlotStableId": 2418540911 + }, + "Value": { + "MaterialAsset": { + "assetId": { + "guid": "{970148AC-7258-5EC8-9CE7-F4EF93164D93}" + }, + "assetHint": "materials/presets/pbr/metal_iron_matte.azmaterial" + } + } + } + ] + } + } + }, + "Component_[8092226976542590265]": { + "$type": "EditorDisabledCompositionComponent", + "Id": 8092226976542590265 + } + } + }, + "Entity_[3459912951764]": { + "Id": "Entity_[3459912951764]", + "Name": "Entity1", + "Components": { + "Component_[11525365929370623807]": { + "$type": "EditorVisibilityComponent", + "Id": 11525365929370623807 + }, + "Component_[12334620273692642550]": { + "$type": "EditorLockComponent", + "Id": 12334620273692642550 + }, + "Component_[14389735759337977675]": { + "$type": "EditorPendingCompositionComponent", + "Id": 14389735759337977675 + }, + "Component_[16184381538555246534]": { + "$type": "AZ::Render::EditorMeshComponent", + "Id": 16184381538555246534, + "Controller": { + "Configuration": { + "ModelAsset": { + "assetId": { + "guid": "{E14975EF-E676-51A4-B826-3EF59CB645AA}", + "subId": 285127096 + }, + "assetHint": "testdata/objects/cube/cube.azmodel" + } + } + } + }, + "Component_[17962478023087084794]": { + "$type": "SelectionComponent", + "Id": 17962478023087084794 + }, + "Component_[18071675051915092508]": { + "$type": "EditorEntityIconComponent", + "Id": 18071675051915092508 + }, + "Component_[2115498007879087044]": { + "$type": "EditorInspectorComponent", + "Id": 2115498007879087044, + "ComponentOrderEntryArray": [ + { + "ComponentId": 399415038452606756 + }, + { + "ComponentId": 16184381538555246534, + "SortIndex": 1 + }, + { + "ComponentId": 7827190074535394331, + "SortIndex": 2 + } + ] + }, + "Component_[3518973002096080237]": { + "$type": "EditorOnlyEntityComponent", + "Id": 3518973002096080237 + }, + "Component_[399415038452606756]": { + "$type": "{27F1E1A1-8D9D-4C3B-BD3A-AFB9762449C0} TransformComponent", + "Id": 399415038452606756, + "Parent Entity": "ContainerEntity", + "Transform Data": { + "Translate": [ + 7.530143737792969, + -0.00018183141946792603, + 64.32462310791016 + ] + } + }, + "Component_[4564240319609068082]": { + "$type": "EditorEntitySortComponent", + "Id": 4564240319609068082 + }, + "Component_[7827190074535394331]": { + "$type": "EditorMaterialComponent", + "Id": 7827190074535394331, + "Controller": { + "Configuration": { + "materials": [ + { + "Key": { + "materialSlotStableId": 2418540911 + }, + "Value": { + "MaterialAsset": { + "assetId": { + "guid": "{E54E46E7-9FA3-54D7-B5F8-8DCCDF17BC24}" + }, + "assetHint": "materials/presets/pbr/metal_silver_matte.azmaterial" + } + } + } + ] + } + } + }, + "Component_[8092226976542590265]": { + "$type": "EditorDisabledCompositionComponent", + "Id": 8092226976542590265 + } + } + }, + "Entity_[3464207919060]": { + "Id": "Entity_[3464207919060]", + "Name": "Entity1", + "Components": { + "Component_[11525365929370623807]": { + "$type": "EditorVisibilityComponent", + "Id": 11525365929370623807 + }, + "Component_[12334620273692642550]": { + "$type": "EditorLockComponent", + "Id": 12334620273692642550 + }, + "Component_[14389735759337977675]": { + "$type": "EditorPendingCompositionComponent", + "Id": 14389735759337977675 + }, + "Component_[16184381538555246534]": { + "$type": "AZ::Render::EditorMeshComponent", + "Id": 16184381538555246534, + "Controller": { + "Configuration": { + "ModelAsset": { + "assetId": { + "guid": "{E14975EF-E676-51A4-B826-3EF59CB645AA}", + "subId": 285127096 + }, + "assetHint": "testdata/objects/cube/cube.azmodel" + } + } + } + }, + "Component_[17962478023087084794]": { + "$type": "SelectionComponent", + "Id": 17962478023087084794 + }, + "Component_[18071675051915092508]": { + "$type": "EditorEntityIconComponent", + "Id": 18071675051915092508 + }, + "Component_[2115498007879087044]": { + "$type": "EditorInspectorComponent", + "Id": 2115498007879087044, + "ComponentOrderEntryArray": [ + { + "ComponentId": 399415038452606756 + }, + { + "ComponentId": 16184381538555246534, + "SortIndex": 1 + }, + { + "ComponentId": 7827190074535394331, + "SortIndex": 2 + } + ] + }, + "Component_[3518973002096080237]": { + "$type": "EditorOnlyEntityComponent", + "Id": 3518973002096080237 + }, + "Component_[399415038452606756]": { + "$type": "{27F1E1A1-8D9D-4C3B-BD3A-AFB9762449C0} TransformComponent", + "Id": 399415038452606756, + "Parent Entity": "ContainerEntity", + "Transform Data": { + "Translate": [ + 32.53014373779297, + -0.00018183141946792603, + 109.46680450439453 + ] + } + }, + "Component_[4564240319609068082]": { + "$type": "EditorEntitySortComponent", + "Id": 4564240319609068082 + }, + "Component_[7827190074535394331]": { + "$type": "EditorMaterialComponent", + "Id": 7827190074535394331, + "Controller": { + "Configuration": { + "materials": [ + { + "Key": { + "materialSlotStableId": 2418540911 + }, + "Value": { + "MaterialAsset": { + "assetId": { + "guid": "{C60A39AF-BB76-51BD-9468-A88C9A6F78D7}" + }, + "assetHint": "materials/presets/pbr/metal_cobalt_matte.azmaterial" + } + } + } + ] + } + } + }, + "Component_[8092226976542590265]": { + "$type": "EditorDisabledCompositionComponent", + "Id": 8092226976542590265 + } + } + }, + "Entity_[3468502886356]": { + "Id": "Entity_[3468502886356]", + "Name": "Entity1", + "Components": { + "Component_[11525365929370623807]": { + "$type": "EditorVisibilityComponent", + "Id": 11525365929370623807 + }, + "Component_[12334620273692642550]": { + "$type": "EditorLockComponent", + "Id": 12334620273692642550 + }, + "Component_[14389735759337977675]": { + "$type": "EditorPendingCompositionComponent", + "Id": 14389735759337977675 + }, + "Component_[16184381538555246534]": { + "$type": "AZ::Render::EditorMeshComponent", + "Id": 16184381538555246534, + "Controller": { + "Configuration": { + "ModelAsset": { + "assetId": { + "guid": "{E14975EF-E676-51A4-B826-3EF59CB645AA}", + "subId": 285127096 + }, + "assetHint": "testdata/objects/cube/cube.azmodel" + } + } + } + }, + "Component_[17962478023087084794]": { + "$type": "SelectionComponent", + "Id": 17962478023087084794 + }, + "Component_[18071675051915092508]": { + "$type": "EditorEntityIconComponent", + "Id": 18071675051915092508 + }, + "Component_[2115498007879087044]": { + "$type": "EditorInspectorComponent", + "Id": 2115498007879087044, + "ComponentOrderEntryArray": [ + { + "ComponentId": 399415038452606756 + }, + { + "ComponentId": 16184381538555246534, + "SortIndex": 1 + }, + { + "ComponentId": 7827190074535394331, + "SortIndex": 2 + } + ] + }, + "Component_[3518973002096080237]": { + "$type": "EditorOnlyEntityComponent", + "Id": 3518973002096080237 + }, + "Component_[399415038452606756]": { + "$type": "{27F1E1A1-8D9D-4C3B-BD3A-AFB9762449C0} TransformComponent", + "Id": 399415038452606756, + "Parent Entity": "ContainerEntity", + "Transform Data": { + "Translate": [ + 27.53014373779297, + -0.00018183141946792603, + 54.618019104003906 + ] + } + }, + "Component_[4564240319609068082]": { + "$type": "EditorEntitySortComponent", + "Id": 4564240319609068082 + }, + "Component_[7827190074535394331]": { + "$type": "EditorMaterialComponent", + "Id": 7827190074535394331, + "Controller": { + "Configuration": { + "materials": [ + { + "Key": { + "materialSlotStableId": 2418540911 + }, + "Value": { + "MaterialAsset": { + "assetId": { + "guid": "{B7C712DC-4839-58BB-B522-A4F120084CF5}" + }, + "assetHint": "materials/presets/pbr/metal_chrome.azmaterial" + } + } + } + ] + } + } + }, + "Component_[8092226976542590265]": { + "$type": "EditorDisabledCompositionComponent", + "Id": 8092226976542590265 + } + } + }, + "Entity_[3472797853652]": { + "Id": "Entity_[3472797853652]", + "Name": "Entity1", + "Components": { + "Component_[11525365929370623807]": { + "$type": "EditorVisibilityComponent", + "Id": 11525365929370623807 + }, + "Component_[12334620273692642550]": { + "$type": "EditorLockComponent", + "Id": 12334620273692642550 + }, + "Component_[14389735759337977675]": { + "$type": "EditorPendingCompositionComponent", + "Id": 14389735759337977675 + }, + "Component_[16184381538555246534]": { + "$type": "AZ::Render::EditorMeshComponent", + "Id": 16184381538555246534, + "Controller": { + "Configuration": { + "ModelAsset": { + "assetId": { + "guid": "{E14975EF-E676-51A4-B826-3EF59CB645AA}", + "subId": 285127096 + }, + "assetHint": "testdata/objects/cube/cube.azmodel" + } + } + } + }, + "Component_[17962478023087084794]": { + "$type": "SelectionComponent", + "Id": 17962478023087084794 + }, + "Component_[18071675051915092508]": { + "$type": "EditorEntityIconComponent", + "Id": 18071675051915092508 + }, + "Component_[2115498007879087044]": { + "$type": "EditorInspectorComponent", + "Id": 2115498007879087044, + "ComponentOrderEntryArray": [ + { + "ComponentId": 399415038452606756 + }, + { + "ComponentId": 16184381538555246534, + "SortIndex": 1 + }, + { + "ComponentId": 7827190074535394331, + "SortIndex": 2 + } + ] + }, + "Component_[3518973002096080237]": { + "$type": "EditorOnlyEntityComponent", + "Id": 3518973002096080237 + }, + "Component_[399415038452606756]": { + "$type": "{27F1E1A1-8D9D-4C3B-BD3A-AFB9762449C0} TransformComponent", + "Id": 399415038452606756, + "Parent Entity": "ContainerEntity", + "Transform Data": { + "Translate": [ + 27.53014373779297, + -0.00018183141946792603, + 45.14218521118164 + ] + } + }, + "Component_[4564240319609068082]": { + "$type": "EditorEntitySortComponent", + "Id": 4564240319609068082 + }, + "Component_[7827190074535394331]": { + "$type": "EditorMaterialComponent", + "Id": 7827190074535394331, + "Controller": { + "Configuration": { + "materials": [ + { + "Key": { + "materialSlotStableId": 2418540911 + }, + "Value": { + "MaterialAsset": { + "assetId": { + "guid": "{CAF50181-3384-5DF2-9304-C6E48E83C72D}" + }, + "assetHint": "materials/presets/pbr/metal_chrome_polished.azmaterial" + } + } + } + ] + } + } + }, + "Component_[8092226976542590265]": { + "$type": "EditorDisabledCompositionComponent", + "Id": 8092226976542590265 + } + } + }, + "Entity_[3477092820948]": { + "Id": "Entity_[3477092820948]", + "Name": "Entity1", + "Components": { + "Component_[11525365929370623807]": { + "$type": "EditorVisibilityComponent", + "Id": 11525365929370623807 + }, + "Component_[12334620273692642550]": { + "$type": "EditorLockComponent", + "Id": 12334620273692642550 + }, + "Component_[14389735759337977675]": { + "$type": "EditorPendingCompositionComponent", + "Id": 14389735759337977675 + }, + "Component_[16184381538555246534]": { + "$type": "AZ::Render::EditorMeshComponent", + "Id": 16184381538555246534, + "Controller": { + "Configuration": { + "ModelAsset": { + "assetId": { + "guid": "{E14975EF-E676-51A4-B826-3EF59CB645AA}", + "subId": 285127096 + }, + "assetHint": "testdata/objects/cube/cube.azmodel" + } + } + } + }, + "Component_[17962478023087084794]": { + "$type": "SelectionComponent", + "Id": 17962478023087084794 + }, + "Component_[18071675051915092508]": { + "$type": "EditorEntityIconComponent", + "Id": 18071675051915092508 + }, + "Component_[2115498007879087044]": { + "$type": "EditorInspectorComponent", + "Id": 2115498007879087044, + "ComponentOrderEntryArray": [ + { + "ComponentId": 399415038452606756 + }, + { + "ComponentId": 16184381538555246534, + "SortIndex": 1 + }, + { + "ComponentId": 7827190074535394331, + "SortIndex": 2 + } + ] + }, + "Component_[3518973002096080237]": { + "$type": "EditorOnlyEntityComponent", + "Id": 3518973002096080237 + }, + "Component_[399415038452606756]": { + "$type": "{27F1E1A1-8D9D-4C3B-BD3A-AFB9762449C0} TransformComponent", + "Id": 399415038452606756, + "Parent Entity": "ContainerEntity", + "Transform Data": { + "Translate": [ + -42.53056335449219, + -0.00018183141946792603, + 24.533506393432617 + ] + } + }, + "Component_[4564240319609068082]": { + "$type": "EditorEntitySortComponent", + "Id": 4564240319609068082 + }, + "Component_[7827190074535394331]": { + "$type": "EditorMaterialComponent", + "Id": 7827190074535394331, + "Controller": { + "Configuration": { + "materials": [ + { + "Key": { + "materialSlotStableId": 2418540911 + }, + "Value": { + "MaterialAsset": { + "assetId": { + "guid": "{80E0F2A7-1EE4-597F-80EF-985C65BCE2EB}" + }, + "assetHint": "materials/presets/pbr/metal_brass.azmaterial" + } + } + } + ] + } + } + }, + "Component_[8092226976542590265]": { + "$type": "EditorDisabledCompositionComponent", + "Id": 8092226976542590265 + } + } + }, + "Entity_[3481387788244]": { + "Id": "Entity_[3481387788244]", + "Name": "Entity1", + "Components": { + "Component_[11525365929370623807]": { + "$type": "EditorVisibilityComponent", + "Id": 11525365929370623807 + }, + "Component_[12334620273692642550]": { + "$type": "EditorLockComponent", + "Id": 12334620273692642550 + }, + "Component_[14389735759337977675]": { + "$type": "EditorPendingCompositionComponent", + "Id": 14389735759337977675 + }, + "Component_[16184381538555246534]": { + "$type": "AZ::Render::EditorMeshComponent", + "Id": 16184381538555246534, + "Controller": { + "Configuration": { + "ModelAsset": { + "assetId": { + "guid": "{E14975EF-E676-51A4-B826-3EF59CB645AA}", + "subId": 285127096 + }, + "assetHint": "testdata/objects/cube/cube.azmodel" + } + } + } + }, + "Component_[17962478023087084794]": { + "$type": "SelectionComponent", + "Id": 17962478023087084794 + }, + "Component_[18071675051915092508]": { + "$type": "EditorEntityIconComponent", + "Id": 18071675051915092508 + }, + "Component_[2115498007879087044]": { + "$type": "EditorInspectorComponent", + "Id": 2115498007879087044, + "ComponentOrderEntryArray": [ + { + "ComponentId": 399415038452606756 + }, + { + "ComponentId": 16184381538555246534, + "SortIndex": 1 + }, + { + "ComponentId": 7827190074535394331, + "SortIndex": 2 + } + ] + }, + "Component_[3518973002096080237]": { + "$type": "EditorOnlyEntityComponent", + "Id": 3518973002096080237 + }, + "Component_[399415038452606756]": { + "$type": "{27F1E1A1-8D9D-4C3B-BD3A-AFB9762449C0} TransformComponent", + "Id": 399415038452606756, + "Parent Entity": "ContainerEntity", + "Transform Data": { + "Translate": [ + -2.5305633544921875, + -0.00018183141946792603, + 9.475835800170898 + ] + } + }, + "Component_[4564240319609068082]": { + "$type": "EditorEntitySortComponent", + "Id": 4564240319609068082 + }, + "Component_[7827190074535394331]": { + "$type": "EditorMaterialComponent", + "Id": 7827190074535394331, + "Controller": { + "Configuration": { + "materials": [ + { + "Key": { + "materialSlotStableId": 2418540911 + }, + "Value": { + "MaterialAsset": { + "assetId": { + "guid": "{DC0598ED-1EDD-5B37-892E-E0867621D74C}" + }, + "assetHint": "materials/presets/pbr/metal_palladium.azmaterial" + } + } + } + ] + } + } + }, + "Component_[8092226976542590265]": { + "$type": "EditorDisabledCompositionComponent", + "Id": 8092226976542590265 + } + } + }, + "Entity_[3485682755540]": { + "Id": "Entity_[3485682755540]", + "Name": "Entity1", + "Components": { + "Component_[11525365929370623807]": { + "$type": "EditorVisibilityComponent", + "Id": 11525365929370623807 + }, + "Component_[12334620273692642550]": { + "$type": "EditorLockComponent", + "Id": 12334620273692642550 + }, + "Component_[14389735759337977675]": { + "$type": "EditorPendingCompositionComponent", + "Id": 14389735759337977675 + }, + "Component_[16184381538555246534]": { + "$type": "AZ::Render::EditorMeshComponent", + "Id": 16184381538555246534, + "Controller": { + "Configuration": { + "ModelAsset": { + "assetId": { + "guid": "{E14975EF-E676-51A4-B826-3EF59CB645AA}", + "subId": 285127096 + }, + "assetHint": "testdata/objects/cube/cube.azmodel" + } + } + } + }, + "Component_[17962478023087084794]": { + "$type": "SelectionComponent", + "Id": 17962478023087084794 + }, + "Component_[18071675051915092508]": { + "$type": "EditorEntityIconComponent", + "Id": 18071675051915092508 + }, + "Component_[2115498007879087044]": { + "$type": "EditorInspectorComponent", + "Id": 2115498007879087044, + "ComponentOrderEntryArray": [ + { + "ComponentId": 399415038452606756 + }, + { + "ComponentId": 16184381538555246534, + "SortIndex": 1 + }, + { + "ComponentId": 7827190074535394331, + "SortIndex": 2 + } + ] + }, + "Component_[3518973002096080237]": { + "$type": "EditorOnlyEntityComponent", + "Id": 3518973002096080237 + }, + "Component_[399415038452606756]": { + "$type": "{27F1E1A1-8D9D-4C3B-BD3A-AFB9762449C0} TransformComponent", + "Id": 399415038452606756, + "Parent Entity": "ContainerEntity", + "Transform Data": { + "Translate": [ + -47.53056335449219, + -0.00018183141946792603, + 15.057670593261719 + ] + } + }, + "Component_[4564240319609068082]": { + "$type": "EditorEntitySortComponent", + "Id": 4564240319609068082 + }, + "Component_[7827190074535394331]": { + "$type": "EditorMaterialComponent", + "Id": 7827190074535394331, + "Controller": { + "Configuration": { + "materials": [ + { + "Key": { + "materialSlotStableId": 2418540911 + }, + "Value": { + "MaterialAsset": { + "assetId": { + "guid": "{64C1F6A6-6BDA-551A-BE56-1829E5913278}" + }, + "assetHint": "materials/presets/pbr/metal_aluminum_polished.azmaterial" + } + } + } + ] + } + } + }, + "Component_[8092226976542590265]": { + "$type": "EditorDisabledCompositionComponent", + "Id": 8092226976542590265 + } + } + }, + "Entity_[3489977722836]": { + "Id": "Entity_[3489977722836]", + "Name": "Entity1", + "Components": { + "Component_[11525365929370623807]": { + "$type": "EditorVisibilityComponent", + "Id": 11525365929370623807 + }, + "Component_[12334620273692642550]": { + "$type": "EditorLockComponent", + "Id": 12334620273692642550 + }, + "Component_[14389735759337977675]": { + "$type": "EditorPendingCompositionComponent", + "Id": 14389735759337977675 + }, + "Component_[16184381538555246534]": { + "$type": "AZ::Render::EditorMeshComponent", + "Id": 16184381538555246534, + "Controller": { + "Configuration": { + "ModelAsset": { + "assetId": { + "guid": "{E14975EF-E676-51A4-B826-3EF59CB645AA}", + "subId": 285127096 + }, + "assetHint": "testdata/objects/cube/cube.azmodel" + } + } + } + }, + "Component_[17962478023087084794]": { + "$type": "SelectionComponent", + "Id": 17962478023087084794 + }, + "Component_[18071675051915092508]": { + "$type": "EditorEntityIconComponent", + "Id": 18071675051915092508 + }, + "Component_[2115498007879087044]": { + "$type": "EditorInspectorComponent", + "Id": 2115498007879087044, + "ComponentOrderEntryArray": [ + { + "ComponentId": 399415038452606756 + }, + { + "ComponentId": 16184381538555246534, + "SortIndex": 1 + }, + { + "ComponentId": 7827190074535394331, + "SortIndex": 2 + } + ] + }, + "Component_[3518973002096080237]": { + "$type": "EditorOnlyEntityComponent", + "Id": 3518973002096080237 + }, + "Component_[399415038452606756]": { + "$type": "{27F1E1A1-8D9D-4C3B-BD3A-AFB9762449C0} TransformComponent", + "Id": 399415038452606756, + "Parent Entity": "ContainerEntity", + "Transform Data": { + "Translate": [ + -12.530563354492188, + -0.00018183141946792603, + 24.533506393432617 + ] + } + }, + "Component_[4564240319609068082]": { + "$type": "EditorEntitySortComponent", + "Id": 4564240319609068082 + }, + "Component_[7827190074535394331]": { + "$type": "EditorMaterialComponent", + "Id": 7827190074535394331, + "Controller": { + "Configuration": { + "materials": [ + { + "Key": { + "materialSlotStableId": 2418540911 + }, + "Value": { + "MaterialAsset": { + "assetId": { + "guid": "{F2AD0EBF-7137-58D1-9991-9552FAD41B19}" + }, + "assetHint": "materials/presets/pbr/metal_mercury.azmaterial" + } + } + } + ] + } + } + }, + "Component_[8092226976542590265]": { + "$type": "EditorDisabledCompositionComponent", + "Id": 8092226976542590265 + } + } + }, + "Entity_[3494272690132]": { + "Id": "Entity_[3494272690132]", + "Name": "Entity1", + "Components": { + "Component_[11525365929370623807]": { + "$type": "EditorVisibilityComponent", + "Id": 11525365929370623807 + }, + "Component_[12334620273692642550]": { + "$type": "EditorLockComponent", + "Id": 12334620273692642550 + }, + "Component_[14389735759337977675]": { + "$type": "EditorPendingCompositionComponent", + "Id": 14389735759337977675 + }, + "Component_[16184381538555246534]": { + "$type": "AZ::Render::EditorMeshComponent", + "Id": 16184381538555246534, + "Controller": { + "Configuration": { + "ModelAsset": { + "assetId": { + "guid": "{E14975EF-E676-51A4-B826-3EF59CB645AA}", + "subId": 285127096 + }, + "assetHint": "testdata/objects/cube/cube.azmodel" + } + } + } + }, + "Component_[17962478023087084794]": { + "$type": "SelectionComponent", + "Id": 17962478023087084794 + }, + "Component_[18071675051915092508]": { + "$type": "EditorEntityIconComponent", + "Id": 18071675051915092508 + }, + "Component_[2115498007879087044]": { + "$type": "EditorInspectorComponent", + "Id": 2115498007879087044, + "ComponentOrderEntryArray": [ + { + "ComponentId": 399415038452606756 + }, + { + "ComponentId": 16184381538555246534, + "SortIndex": 1 + }, + { + "ComponentId": 7827190074535394331, + "SortIndex": 2 + } + ] + }, + "Component_[3518973002096080237]": { + "$type": "EditorOnlyEntityComponent", + "Id": 3518973002096080237 + }, + "Component_[399415038452606756]": { + "$type": "{27F1E1A1-8D9D-4C3B-BD3A-AFB9762449C0} TransformComponent", + "Id": 399415038452606756, + "Parent Entity": "ContainerEntity", + "Transform Data": { + "Translate": [ + 17.53014373779297, + -0.00018183141946792603, + 59.873046875 + ] + } + }, + "Component_[4564240319609068082]": { + "$type": "EditorEntitySortComponent", + "Id": 4564240319609068082 + }, + "Component_[7827190074535394331]": { + "$type": "EditorMaterialComponent", + "Id": 7827190074535394331, + "Controller": { + "Configuration": { + "materials": [ + { + "Key": {}, + "Value": { + "MaterialAsset": { + "assetId": { + "guid": "{721188E0-B7CC-5D06-8D5D-39AF8ABF2EF9}" + }, + "assetHint": "materials/presets/pbr/metal_titanium.azmaterial" + } + } + }, + { + "Key": { + "materialSlotStableId": 2418540911 + }, + "Value": { + "MaterialAsset": { + "assetId": { + "guid": "{64C1F6A6-6BDA-551A-BE56-1829E5913278}" + }, + "assetHint": "materials/presets/pbr/metal_aluminum_polished.azmaterial" + } + } + } + ] + } + } + }, + "Component_[8092226976542590265]": { + "$type": "EditorDisabledCompositionComponent", + "Id": 8092226976542590265 + } + } + }, + "Entity_[3498567657428]": { + "Id": "Entity_[3498567657428]", + "Name": "Entity1", + "Components": { + "Component_[11525365929370623807]": { + "$type": "EditorVisibilityComponent", + "Id": 11525365929370623807 + }, + "Component_[12334620273692642550]": { + "$type": "EditorLockComponent", + "Id": 12334620273692642550 + }, + "Component_[14389735759337977675]": { + "$type": "EditorPendingCompositionComponent", + "Id": 14389735759337977675 + }, + "Component_[16184381538555246534]": { + "$type": "AZ::Render::EditorMeshComponent", + "Id": 16184381538555246534, + "Controller": { + "Configuration": { + "ModelAsset": { + "assetId": { + "guid": "{E14975EF-E676-51A4-B826-3EF59CB645AA}", + "subId": 285127096 + }, + "assetHint": "testdata/objects/cube/cube.azmodel" + } + } + } + }, + "Component_[17962478023087084794]": { + "$type": "SelectionComponent", + "Id": 17962478023087084794 + }, + "Component_[18071675051915092508]": { + "$type": "EditorEntityIconComponent", + "Id": 18071675051915092508 + }, + "Component_[2115498007879087044]": { + "$type": "EditorInspectorComponent", + "Id": 2115498007879087044, + "ComponentOrderEntryArray": [ + { + "ComponentId": 399415038452606756 + }, + { + "ComponentId": 16184381538555246534, + "SortIndex": 1 + }, + { + "ComponentId": 7827190074535394331, + "SortIndex": 2 + } + ] + }, + "Component_[3518973002096080237]": { + "$type": "EditorOnlyEntityComponent", + "Id": 3518973002096080237 + }, + "Component_[399415038452606756]": { + "$type": "{27F1E1A1-8D9D-4C3B-BD3A-AFB9762449C0} TransformComponent", + "Id": 399415038452606756, + "Parent Entity": "ContainerEntity", + "Transform Data": { + "Translate": [ + -27.530563354492188, + -0.00018183141946792603, + 34.53608703613281 + ] + } + }, + "Component_[4564240319609068082]": { + "$type": "EditorEntitySortComponent", + "Id": 4564240319609068082 + }, + "Component_[7827190074535394331]": { + "$type": "EditorMaterialComponent", + "Id": 7827190074535394331, + "Controller": { + "Configuration": { + "materials": [ + { + "Key": { + "materialSlotStableId": 2418540911 + }, + "Value": { + "MaterialAsset": { + "assetId": { + "guid": "{2D054071-BEF7-53C0-A8C9-E4F026BD8364}" + }, + "assetHint": "materials/presets/pbr/metal_copper_matte.azmaterial" + } + } + } + ] + } + } + }, + "Component_[8092226976542590265]": { + "$type": "EditorDisabledCompositionComponent", + "Id": 8092226976542590265 + } + } + }, + "Entity_[3502862624724]": { + "Id": "Entity_[3502862624724]", + "Name": "Entity1", + "Components": { + "Component_[11525365929370623807]": { + "$type": "EditorVisibilityComponent", + "Id": 11525365929370623807 + }, + "Component_[12334620273692642550]": { + "$type": "EditorLockComponent", + "Id": 12334620273692642550 + }, + "Component_[14389735759337977675]": { + "$type": "EditorPendingCompositionComponent", + "Id": 14389735759337977675 + }, + "Component_[16184381538555246534]": { + "$type": "AZ::Render::EditorMeshComponent", + "Id": 16184381538555246534, + "Controller": { + "Configuration": { + "ModelAsset": { + "assetId": { + "guid": "{E14975EF-E676-51A4-B826-3EF59CB645AA}", + "subId": 285127096 + }, + "assetHint": "testdata/objects/cube/cube.azmodel" + } + } + } + }, + "Component_[17962478023087084794]": { + "$type": "SelectionComponent", + "Id": 17962478023087084794 + }, + "Component_[18071675051915092508]": { + "$type": "EditorEntityIconComponent", + "Id": 18071675051915092508 + }, + "Component_[2115498007879087044]": { + "$type": "EditorInspectorComponent", + "Id": 2115498007879087044, + "ComponentOrderEntryArray": [ + { + "ComponentId": 399415038452606756 + }, + { + "ComponentId": 16184381538555246534, + "SortIndex": 1 + }, + { + "ComponentId": 7827190074535394331, + "SortIndex": 2 + } + ] + }, + "Component_[3518973002096080237]": { + "$type": "EditorOnlyEntityComponent", + "Id": 3518973002096080237 + }, + "Component_[399415038452606756]": { + "$type": "{27F1E1A1-8D9D-4C3B-BD3A-AFB9762449C0} TransformComponent", + "Id": 399415038452606756, + "Parent Entity": "ContainerEntity", + "Transform Data": { + "Translate": [ + -7.5305633544921875, + -0.00018183141946792603, + 9.475835800170898 + ] + } + }, + "Component_[4564240319609068082]": { + "$type": "EditorEntitySortComponent", + "Id": 4564240319609068082 + }, + "Component_[7827190074535394331]": { + "$type": "EditorMaterialComponent", + "Id": 7827190074535394331, + "Controller": { + "Configuration": { + "materials": [ + { + "Key": { + "materialSlotStableId": 2418540911 + }, + "Value": { + "MaterialAsset": { + "assetId": { + "guid": "{DD1E26AE-80FB-5DB6-8786-26D438190A38}" + }, + "assetHint": "materials/presets/pbr/metal_nickel.azmaterial" + } + } + } + ] + } + } + }, + "Component_[8092226976542590265]": { + "$type": "EditorDisabledCompositionComponent", + "Id": 8092226976542590265 + } + } + }, + "Entity_[3507157592020]": { + "Id": "Entity_[3507157592020]", + "Name": "Entity1", + "Components": { + "Component_[11525365929370623807]": { + "$type": "EditorVisibilityComponent", + "Id": 11525365929370623807 + }, + "Component_[12334620273692642550]": { + "$type": "EditorLockComponent", + "Id": 12334620273692642550 + }, + "Component_[14389735759337977675]": { + "$type": "EditorPendingCompositionComponent", + "Id": 14389735759337977675 + }, + "Component_[16184381538555246534]": { + "$type": "AZ::Render::EditorMeshComponent", + "Id": 16184381538555246534, + "Controller": { + "Configuration": { + "ModelAsset": { + "assetId": { + "guid": "{E14975EF-E676-51A4-B826-3EF59CB645AA}", + "subId": 285127096 + }, + "assetHint": "testdata/objects/cube/cube.azmodel" + } + } + } + }, + "Component_[17962478023087084794]": { + "$type": "SelectionComponent", + "Id": 17962478023087084794 + }, + "Component_[18071675051915092508]": { + "$type": "EditorEntityIconComponent", + "Id": 18071675051915092508 + }, + "Component_[2115498007879087044]": { + "$type": "EditorInspectorComponent", + "Id": 2115498007879087044, + "ComponentOrderEntryArray": [ + { + "ComponentId": 399415038452606756 + }, + { + "ComponentId": 16184381538555246534, + "SortIndex": 1 + }, + { + "ComponentId": 7827190074535394331, + "SortIndex": 2 + } + ] + }, + "Component_[3518973002096080237]": { + "$type": "EditorOnlyEntityComponent", + "Id": 3518973002096080237 + }, + "Component_[399415038452606756]": { + "$type": "{27F1E1A1-8D9D-4C3B-BD3A-AFB9762449C0} TransformComponent", + "Id": 399415038452606756, + "Parent Entity": "ContainerEntity", + "Transform Data": { + "Translate": [ + 37.53014373779297, + -0.00018183141946792603, + 59.873046875 + ] + } + }, + "Component_[4564240319609068082]": { + "$type": "EditorEntitySortComponent", + "Id": 4564240319609068082 + }, + "Component_[7827190074535394331]": { + "$type": "EditorMaterialComponent", + "Id": 7827190074535394331, + "Controller": { + "Configuration": { + "materials": [ + { + "Key": { + "materialSlotStableId": 2418540911 + }, + "Value": { + "MaterialAsset": { + "assetId": { + "guid": "{CF5C7B01-4912-58AE-991A-F25251E505AC}" + }, + "assetHint": "materials/presets/pbr/metal_copper_polished.azmaterial" + } + } + } + ] + } + } + }, + "Component_[8092226976542590265]": { + "$type": "EditorDisabledCompositionComponent", + "Id": 8092226976542590265 + } + } + }, + "Entity_[3511452559316]": { + "Id": "Entity_[3511452559316]", + "Name": "Entity1", + "Components": { + "Component_[11525365929370623807]": { + "$type": "EditorVisibilityComponent", + "Id": 11525365929370623807 + }, + "Component_[12334620273692642550]": { + "$type": "EditorLockComponent", + "Id": 12334620273692642550 + }, + "Component_[14389735759337977675]": { + "$type": "EditorPendingCompositionComponent", + "Id": 14389735759337977675 + }, + "Component_[16184381538555246534]": { + "$type": "AZ::Render::EditorMeshComponent", + "Id": 16184381538555246534, + "Controller": { + "Configuration": { + "ModelAsset": { + "assetId": { + "guid": "{E14975EF-E676-51A4-B826-3EF59CB645AA}", + "subId": 285127096 + }, + "assetHint": "testdata/objects/cube/cube.azmodel" + } + } + } + }, + "Component_[17962478023087084794]": { + "$type": "SelectionComponent", + "Id": 17962478023087084794 + }, + "Component_[18071675051915092508]": { + "$type": "EditorEntityIconComponent", + "Id": 18071675051915092508 + }, + "Component_[2115498007879087044]": { + "$type": "EditorInspectorComponent", + "Id": 2115498007879087044, + "ComponentOrderEntryArray": [ + { + "ComponentId": 399415038452606756 + }, + { + "ComponentId": 16184381538555246534, + "SortIndex": 1 + }, + { + "ComponentId": 7827190074535394331, + "SortIndex": 2 + } + ] + }, + "Component_[3518973002096080237]": { + "$type": "EditorOnlyEntityComponent", + "Id": 3518973002096080237 + }, + "Component_[399415038452606756]": { + "$type": "{27F1E1A1-8D9D-4C3B-BD3A-AFB9762449C0} TransformComponent", + "Id": 399415038452606756, + "Parent Entity": "ContainerEntity", + "Transform Data": { + "Translate": [ + -42.53056335449219, + -0.00018183141946792603, + 15.057670593261719 + ] + } + }, + "Component_[4564240319609068082]": { + "$type": "EditorEntitySortComponent", + "Id": 4564240319609068082 + }, + "Component_[7827190074535394331]": { + "$type": "EditorMaterialComponent", + "Id": 7827190074535394331, + "Controller": { + "Configuration": { + "materials": [ + { + "Key": { + "materialSlotStableId": 2418540911 + }, + "Value": { + "MaterialAsset": { + "assetId": { + "guid": "{FC69F2F8-F73B-5A0C-B8B7-94BAA45780FC}" + }, + "assetHint": "materials/presets/pbr/metal_brass_polished.azmaterial" + } + } + } + ] + } + } + }, + "Component_[8092226976542590265]": { + "$type": "EditorDisabledCompositionComponent", + "Id": 8092226976542590265 + } + } + }, + "Entity_[3515747526612]": { + "Id": "Entity_[3515747526612]", + "Name": "Entity1", + "Components": { + "Component_[11525365929370623807]": { + "$type": "EditorVisibilityComponent", + "Id": 11525365929370623807 + }, + "Component_[12334620273692642550]": { + "$type": "EditorLockComponent", + "Id": 12334620273692642550 + }, + "Component_[14389735759337977675]": { + "$type": "EditorPendingCompositionComponent", + "Id": 14389735759337977675 + }, + "Component_[16184381538555246534]": { + "$type": "AZ::Render::EditorMeshComponent", + "Id": 16184381538555246534, + "Controller": { + "Configuration": { + "ModelAsset": { + "assetId": { + "guid": "{E14975EF-E676-51A4-B826-3EF59CB645AA}", + "subId": 285127096 + }, + "assetHint": "testdata/objects/cube/cube.azmodel" + } + } + } + }, + "Component_[17962478023087084794]": { + "$type": "SelectionComponent", + "Id": 17962478023087084794 + }, + "Component_[18071675051915092508]": { + "$type": "EditorEntityIconComponent", + "Id": 18071675051915092508 + }, + "Component_[2115498007879087044]": { + "$type": "EditorInspectorComponent", + "Id": 2115498007879087044, + "ComponentOrderEntryArray": [ + { + "ComponentId": 399415038452606756 + }, + { + "ComponentId": 16184381538555246534, + "SortIndex": 1 + }, + { + "ComponentId": 7827190074535394331, + "SortIndex": 2 + } + ] + }, + "Component_[3518973002096080237]": { + "$type": "EditorOnlyEntityComponent", + "Id": 3518973002096080237 + }, + "Component_[399415038452606756]": { + "$type": "{27F1E1A1-8D9D-4C3B-BD3A-AFB9762449C0} TransformComponent", + "Id": 399415038452606756, + "Parent Entity": "ContainerEntity", + "Transform Data": { + "Translate": [ + 2.5301437377929688, + -0.00018183141946792603, + 74.93071746826172 + ] + } + }, + "Component_[4564240319609068082]": { + "$type": "EditorEntitySortComponent", + "Id": 4564240319609068082 + }, + "Component_[7827190074535394331]": { + "$type": "EditorMaterialComponent", + "Id": 7827190074535394331, + "Controller": { + "Configuration": { + "materials": [ + { + "Key": { + "materialSlotStableId": 2418540911 + }, + "Value": { + "MaterialAsset": { + "assetId": { + "guid": "{79419183-FFCE-5A89-AA16-C2789D81AF75}" + }, + "assetHint": "materials/presets/pbr/metal_platinum_polished.azmaterial" + } + } + } + ] + } + } + }, + "Component_[8092226976542590265]": { + "$type": "EditorDisabledCompositionComponent", + "Id": 8092226976542590265 + } + } + }, + "Entity_[3520042493908]": { + "Id": "Entity_[3520042493908]", + "Name": "Entity1", + "Components": { + "Component_[11525365929370623807]": { + "$type": "EditorVisibilityComponent", + "Id": 11525365929370623807 + }, + "Component_[12334620273692642550]": { + "$type": "EditorLockComponent", + "Id": 12334620273692642550 + }, + "Component_[14389735759337977675]": { + "$type": "EditorPendingCompositionComponent", + "Id": 14389735759337977675 + }, + "Component_[16184381538555246534]": { + "$type": "AZ::Render::EditorMeshComponent", + "Id": 16184381538555246534, + "Controller": { + "Configuration": { + "ModelAsset": { + "assetId": { + "guid": "{E14975EF-E676-51A4-B826-3EF59CB645AA}", + "subId": 285127096 + }, + "assetHint": "testdata/objects/cube/cube.azmodel" + } + } + } + }, + "Component_[17962478023087084794]": { + "$type": "SelectionComponent", + "Id": 17962478023087084794 + }, + "Component_[18071675051915092508]": { + "$type": "EditorEntityIconComponent", + "Id": 18071675051915092508 + }, + "Component_[2115498007879087044]": { + "$type": "EditorInspectorComponent", + "Id": 2115498007879087044, + "ComponentOrderEntryArray": [ + { + "ComponentId": 399415038452606756 + }, + { + "ComponentId": 16184381538555246534, + "SortIndex": 1 + }, + { + "ComponentId": 7827190074535394331, + "SortIndex": 2 + } + ] + }, + "Component_[3518973002096080237]": { + "$type": "EditorOnlyEntityComponent", + "Id": 3518973002096080237 + }, + "Component_[399415038452606756]": { + "$type": "{27F1E1A1-8D9D-4C3B-BD3A-AFB9762449C0} TransformComponent", + "Id": 399415038452606756, + "Parent Entity": "ContainerEntity", + "Transform Data": { + "Translate": [ + 37.53014373779297, + 0.010651908814907074, + 84.44650268554688 + ] + } + }, + "Component_[4564240319609068082]": { + "$type": "EditorEntitySortComponent", + "Id": 4564240319609068082 + }, + "Component_[7827190074535394331]": { + "$type": "EditorMaterialComponent", + "Id": 7827190074535394331, + "Controller": { + "Configuration": { + "materials": [ + { + "Key": { + "materialSlotStableId": 2418540911 + }, + "Value": { + "MaterialAsset": { + "assetId": { + "guid": "{E621C5BF-B8E1-55F0-A791-EC960F2FA46F}" + }, + "assetHint": "materials/presets/pbr/metal_copper.azmaterial" + } + } + } + ] + } + } + }, + "Component_[8092226976542590265]": { + "$type": "EditorDisabledCompositionComponent", + "Id": 8092226976542590265 + } + } + }, + "Entity_[3524337461204]": { + "Id": "Entity_[3524337461204]", + "Name": "Entity1", + "Components": { + "Component_[11525365929370623807]": { + "$type": "EditorVisibilityComponent", + "Id": 11525365929370623807 + }, + "Component_[12334620273692642550]": { + "$type": "EditorLockComponent", + "Id": 12334620273692642550 + }, + "Component_[14389735759337977675]": { + "$type": "EditorPendingCompositionComponent", + "Id": 14389735759337977675 + }, + "Component_[16184381538555246534]": { + "$type": "AZ::Render::EditorMeshComponent", + "Id": 16184381538555246534, + "Controller": { + "Configuration": { + "ModelAsset": { + "assetId": { + "guid": "{E14975EF-E676-51A4-B826-3EF59CB645AA}", + "subId": 285127096 + }, + "assetHint": "testdata/objects/cube/cube.azmodel" + } + } + } + }, + "Component_[17962478023087084794]": { + "$type": "SelectionComponent", + "Id": 17962478023087084794 + }, + "Component_[18071675051915092508]": { + "$type": "EditorEntityIconComponent", + "Id": 18071675051915092508 + }, + "Component_[2115498007879087044]": { + "$type": "EditorInspectorComponent", + "Id": 2115498007879087044, + "ComponentOrderEntryArray": [ + { + "ComponentId": 399415038452606756 + }, + { + "ComponentId": 16184381538555246534, + "SortIndex": 1 + }, + { + "ComponentId": 7827190074535394331, + "SortIndex": 2 + } + ] + }, + "Component_[3518973002096080237]": { + "$type": "EditorOnlyEntityComponent", + "Id": 3518973002096080237 + }, + "Component_[399415038452606756]": { + "$type": "{27F1E1A1-8D9D-4C3B-BD3A-AFB9762449C0} TransformComponent", + "Id": 399415038452606756, + "Parent Entity": "ContainerEntity", + "Transform Data": { + "Translate": [ + -22.530563354492188, + -0.00018183141946792603, + 109.46680450439453 + ] + } + }, + "Component_[4564240319609068082]": { + "$type": "EditorEntitySortComponent", + "Id": 4564240319609068082 + }, + "Component_[7827190074535394331]": { + "$type": "EditorMaterialComponent", + "Id": 7827190074535394331, + "Controller": { + "Configuration": { + "materials": [ + { + "Key": { + "materialSlotStableId": 2418540911 + }, + "Value": { + "MaterialAsset": { + "assetId": { + "guid": "{5BC13D95-377E-53EA-9A93-156384BE8B04}" + }, + "assetHint": "materials/presets/pbr/metal_gold_matte.azmaterial" + } + } + } + ] + } + } + }, + "Component_[8092226976542590265]": { + "$type": "EditorDisabledCompositionComponent", + "Id": 8092226976542590265 + } + } + }, + "Entity_[3528632428500]": { + "Id": "Entity_[3528632428500]", + "Name": "Entity1", + "Components": { + "Component_[11525365929370623807]": { + "$type": "EditorVisibilityComponent", + "Id": 11525365929370623807 + }, + "Component_[12334620273692642550]": { + "$type": "EditorLockComponent", + "Id": 12334620273692642550 + }, + "Component_[14389735759337977675]": { + "$type": "EditorPendingCompositionComponent", + "Id": 14389735759337977675 + }, + "Component_[16184381538555246534]": { + "$type": "AZ::Render::EditorMeshComponent", + "Id": 16184381538555246534, + "Controller": { + "Configuration": { + "ModelAsset": { + "assetId": { + "guid": "{E14975EF-E676-51A4-B826-3EF59CB645AA}", + "subId": 285127096 + }, + "assetHint": "testdata/objects/cube/cube.azmodel" + } + } + } + }, + "Component_[17962478023087084794]": { + "$type": "SelectionComponent", + "Id": 17962478023087084794 + }, + "Component_[18071675051915092508]": { + "$type": "EditorEntityIconComponent", + "Id": 18071675051915092508 + }, + "Component_[2115498007879087044]": { + "$type": "EditorInspectorComponent", + "Id": 2115498007879087044, + "ComponentOrderEntryArray": [ + { + "ComponentId": 399415038452606756 + }, + { + "ComponentId": 16184381538555246534, + "SortIndex": 1 + }, + { + "ComponentId": 7827190074535394331, + "SortIndex": 2 + } + ] + }, + "Component_[3518973002096080237]": { + "$type": "EditorOnlyEntityComponent", + "Id": 3518973002096080237 + }, + "Component_[399415038452606756]": { + "$type": "{27F1E1A1-8D9D-4C3B-BD3A-AFB9762449C0} TransformComponent", + "Id": 399415038452606756, + "Parent Entity": "ContainerEntity", + "Transform Data": { + "Translate": [ + 2.5301437377929688, + -0.00018183141946792603, + 15.057670593261719 + ] + } + }, + "Component_[4564240319609068082]": { + "$type": "EditorEntitySortComponent", + "Id": 4564240319609068082 + }, + "Component_[7827190074535394331]": { + "$type": "EditorMaterialComponent", + "Id": 7827190074535394331, + "Controller": { + "Configuration": { + "materials": [ + { + "Key": { + "materialSlotStableId": 2418540911 + }, + "Value": { + "MaterialAsset": { + "assetId": { + "guid": "{79419183-FFCE-5A89-AA16-C2789D81AF75}" + }, + "assetHint": "materials/presets/pbr/metal_platinum_polished.azmaterial" + } + } + } + ] + } + } + }, + "Component_[8092226976542590265]": { + "$type": "EditorDisabledCompositionComponent", + "Id": 8092226976542590265 + } + } + }, + "Entity_[3532927395796]": { + "Id": "Entity_[3532927395796]", + "Name": "Entity1", + "Components": { + "Component_[11525365929370623807]": { + "$type": "EditorVisibilityComponent", + "Id": 11525365929370623807 + }, + "Component_[12334620273692642550]": { + "$type": "EditorLockComponent", + "Id": 12334620273692642550 + }, + "Component_[14389735759337977675]": { + "$type": "EditorPendingCompositionComponent", + "Id": 14389735759337977675 + }, + "Component_[16184381538555246534]": { + "$type": "AZ::Render::EditorMeshComponent", + "Id": 16184381538555246534, + "Controller": { + "Configuration": { + "ModelAsset": { + "assetId": { + "guid": "{E14975EF-E676-51A4-B826-3EF59CB645AA}", + "subId": 285127096 + }, + "assetHint": "testdata/objects/cube/cube.azmodel" + } + } + } + }, + "Component_[17962478023087084794]": { + "$type": "SelectionComponent", + "Id": 17962478023087084794 + }, + "Component_[18071675051915092508]": { + "$type": "EditorEntityIconComponent", + "Id": 18071675051915092508 + }, + "Component_[2115498007879087044]": { + "$type": "EditorInspectorComponent", + "Id": 2115498007879087044, + "ComponentOrderEntryArray": [ + { + "ComponentId": 399415038452606756 + }, + { + "ComponentId": 16184381538555246534, + "SortIndex": 1 + }, + { + "ComponentId": 7827190074535394331, + "SortIndex": 2 + } + ] + }, + "Component_[3518973002096080237]": { + "$type": "EditorOnlyEntityComponent", + "Id": 3518973002096080237 + }, + "Component_[399415038452606756]": { + "$type": "{27F1E1A1-8D9D-4C3B-BD3A-AFB9762449C0} TransformComponent", + "Id": 399415038452606756, + "Parent Entity": "ContainerEntity", + "Transform Data": { + "Translate": [ + 22.53014373779297, + -0.00018183141946792603, + 64.32462310791016 + ] + } + }, + "Component_[4564240319609068082]": { + "$type": "EditorEntitySortComponent", + "Id": 4564240319609068082 + }, + "Component_[7827190074535394331]": { + "$type": "EditorMaterialComponent", + "Id": 7827190074535394331, + "Controller": { + "Configuration": { + "materials": [ + { + "Key": { + "materialSlotStableId": 2418540911 + }, + "Value": { + "MaterialAsset": { + "assetId": { + "guid": "{AE350D9F-0000-526D-B49C-4303D687BB86}" + }, + "assetHint": "materials/presets/pbr/metal_brass_matte.azmaterial" + } + } + } + ] + } + } + }, + "Component_[8092226976542590265]": { + "$type": "EditorDisabledCompositionComponent", + "Id": 8092226976542590265 + } + } + }, + "Entity_[3537222363092]": { + "Id": "Entity_[3537222363092]", + "Name": "Entity1", + "Components": { + "Component_[11525365929370623807]": { + "$type": "EditorVisibilityComponent", + "Id": 11525365929370623807 + }, + "Component_[12334620273692642550]": { + "$type": "EditorLockComponent", + "Id": 12334620273692642550 + }, + "Component_[14389735759337977675]": { + "$type": "EditorPendingCompositionComponent", + "Id": 14389735759337977675 + }, + "Component_[16184381538555246534]": { + "$type": "AZ::Render::EditorMeshComponent", + "Id": 16184381538555246534, + "Controller": { + "Configuration": { + "ModelAsset": { + "assetId": { + "guid": "{E14975EF-E676-51A4-B826-3EF59CB645AA}", + "subId": 285127096 + }, + "assetHint": "testdata/objects/cube/cube.azmodel" + } + } + } + }, + "Component_[17962478023087084794]": { + "$type": "SelectionComponent", + "Id": 17962478023087084794 + }, + "Component_[18071675051915092508]": { + "$type": "EditorEntityIconComponent", + "Id": 18071675051915092508 + }, + "Component_[2115498007879087044]": { + "$type": "EditorInspectorComponent", + "Id": 2115498007879087044, + "ComponentOrderEntryArray": [ + { + "ComponentId": 399415038452606756 + }, + { + "ComponentId": 16184381538555246534, + "SortIndex": 1 + }, + { + "ComponentId": 7827190074535394331, + "SortIndex": 2 + } + ] + }, + "Component_[3518973002096080237]": { + "$type": "EditorOnlyEntityComponent", + "Id": 3518973002096080237 + }, + "Component_[399415038452606756]": { + "$type": "{27F1E1A1-8D9D-4C3B-BD3A-AFB9762449C0} TransformComponent", + "Id": 399415038452606756, + "Parent Entity": "ContainerEntity", + "Transform Data": { + "Translate": [ + -12.530563354492188, + -0.00018183141946792603, + 30.08451271057129 + ] + } + }, + "Component_[4564240319609068082]": { + "$type": "EditorEntitySortComponent", + "Id": 4564240319609068082 + }, + "Component_[7827190074535394331]": { + "$type": "EditorMaterialComponent", + "Id": 7827190074535394331, + "Controller": { + "Configuration": { + "materials": [ + { + "Key": { + "materialSlotStableId": 2418540911 + }, + "Value": { + "MaterialAsset": { + "assetId": { + "guid": "{F2AD0EBF-7137-58D1-9991-9552FAD41B19}" + }, + "assetHint": "materials/presets/pbr/metal_mercury.azmaterial" + } + } + } + ] + } + } + }, + "Component_[8092226976542590265]": { + "$type": "EditorDisabledCompositionComponent", + "Id": 8092226976542590265 + } + } + }, + "Entity_[3541517330388]": { + "Id": "Entity_[3541517330388]", + "Name": "Entity1", + "Components": { + "Component_[1057179753323467068]": { + "$type": "EditorMaterialComponent", + "Id": 1057179753323467068, + "Controller": { + "Configuration": { + "materials": [ + { + "Key": { + "materialSlotStableId": 2418540911 + }, + "Value": { + "MaterialAsset": { + "assetId": { + "guid": "{A3F3CD98-1634-5542-AD5A-78E91BE21AE9}" + }, + "assetHint": "materials/presets/pbr/metal_titanium_matte.azmaterial" + } + } + } + ] + } + } + }, + "Component_[11525365929370623807]": { + "$type": "EditorVisibilityComponent", + "Id": 11525365929370623807 + }, + "Component_[12334620273692642550]": { + "$type": "EditorLockComponent", + "Id": 12334620273692642550 + }, + "Component_[14389735759337977675]": { + "$type": "EditorPendingCompositionComponent", + "Id": 14389735759337977675 + }, + "Component_[16184381538555246534]": { + "$type": "AZ::Render::EditorMeshComponent", + "Id": 16184381538555246534, + "Controller": { + "Configuration": { + "ModelAsset": { + "assetId": { + "guid": "{E14975EF-E676-51A4-B826-3EF59CB645AA}", + "subId": 285127096 + }, + "assetHint": "testdata/objects/cube/cube.azmodel" + } + } + } + }, + "Component_[17962478023087084794]": { + "$type": "SelectionComponent", + "Id": 17962478023087084794 + }, + "Component_[18071675051915092508]": { + "$type": "EditorEntityIconComponent", + "Id": 18071675051915092508 + }, + "Component_[2115498007879087044]": { + "$type": "EditorInspectorComponent", + "Id": 2115498007879087044, + "ComponentOrderEntryArray": [ + { + "ComponentId": 399415038452606756 + }, + { + "ComponentId": 16184381538555246534, + "SortIndex": 1 + }, + { + "ComponentId": 1057179753323467068, + "SortIndex": 2 + } + ] + }, + "Component_[3518973002096080237]": { + "$type": "EditorOnlyEntityComponent", + "Id": 3518973002096080237 + }, + "Component_[399415038452606756]": { + "$type": "{27F1E1A1-8D9D-4C3B-BD3A-AFB9762449C0} TransformComponent", + "Id": 399415038452606756, + "Parent Entity": "ContainerEntity", + "Transform Data": { + "Translate": [ + 12.530143737792969, + -0.00018183141946792603, + 19.50924301147461 + ] + } + }, + "Component_[4564240319609068082]": { + "$type": "EditorEntitySortComponent", + "Id": 4564240319609068082 + }, + "Component_[8092226976542590265]": { + "$type": "EditorDisabledCompositionComponent", + "Id": 8092226976542590265 + } + } + }, + "Entity_[3545812297684]": { + "Id": "Entity_[3545812297684]", + "Name": "Entity1", + "Components": { + "Component_[11525365929370623807]": { + "$type": "EditorVisibilityComponent", + "Id": 11525365929370623807 + }, + "Component_[12334620273692642550]": { + "$type": "EditorLockComponent", + "Id": 12334620273692642550 + }, + "Component_[14389735759337977675]": { + "$type": "EditorPendingCompositionComponent", + "Id": 14389735759337977675 + }, + "Component_[16184381538555246534]": { + "$type": "AZ::Render::EditorMeshComponent", + "Id": 16184381538555246534, + "Controller": { + "Configuration": { + "ModelAsset": { + "assetId": { + "guid": "{E14975EF-E676-51A4-B826-3EF59CB645AA}", + "subId": 285127096 + }, + "assetHint": "testdata/objects/cube/cube.azmodel" + } + } + } + }, + "Component_[17962478023087084794]": { + "$type": "SelectionComponent", + "Id": 17962478023087084794 + }, + "Component_[18071675051915092508]": { + "$type": "EditorEntityIconComponent", + "Id": 18071675051915092508 + }, + "Component_[2115498007879087044]": { + "$type": "EditorInspectorComponent", + "Id": 2115498007879087044, + "ComponentOrderEntryArray": [ + { + "ComponentId": 399415038452606756 + }, + { + "ComponentId": 16184381538555246534, + "SortIndex": 1 + }, + { + "ComponentId": 7827190074535394331, + "SortIndex": 2 + } + ] + }, + "Component_[3518973002096080237]": { + "$type": "EditorOnlyEntityComponent", + "Id": 3518973002096080237 + }, + "Component_[399415038452606756]": { + "$type": "{27F1E1A1-8D9D-4C3B-BD3A-AFB9762449C0} TransformComponent", + "Id": 399415038452606756, + "Parent Entity": "ContainerEntity", + "Transform Data": { + "Translate": [ + -22.530563354492188, + -0.00018183141946792603, + 84.40655517578125 + ] + } + }, + "Component_[4564240319609068082]": { + "$type": "EditorEntitySortComponent", + "Id": 4564240319609068082 + }, + "Component_[7827190074535394331]": { + "$type": "EditorMaterialComponent", + "Id": 7827190074535394331, + "Controller": { + "Configuration": { + "materials": [ + { + "Key": { + "materialSlotStableId": 2418540911 + }, + "Value": { + "MaterialAsset": { + "assetId": { + "guid": "{FE52E7C8-064D-506A-9C26-433EB93747DE}" + }, + "assetHint": "materials/presets/pbr/metal_gold.azmaterial" + } + } + } + ] + } + } + }, + "Component_[8092226976542590265]": { + "$type": "EditorDisabledCompositionComponent", + "Id": 8092226976542590265 + } + } + }, + "Entity_[3550107264980]": { + "Id": "Entity_[3550107264980]", + "Name": "Entity1", + "Components": { + "Component_[11525365929370623807]": { + "$type": "EditorVisibilityComponent", + "Id": 11525365929370623807 + }, + "Component_[12334620273692642550]": { + "$type": "EditorLockComponent", + "Id": 12334620273692642550 + }, + "Component_[14389735759337977675]": { + "$type": "EditorPendingCompositionComponent", + "Id": 14389735759337977675 + }, + "Component_[16184381538555246534]": { + "$type": "AZ::Render::EditorMeshComponent", + "Id": 16184381538555246534, + "Controller": { + "Configuration": { + "ModelAsset": { + "assetId": { + "guid": "{E14975EF-E676-51A4-B826-3EF59CB645AA}", + "subId": 285127096 + }, + "assetHint": "testdata/objects/cube/cube.azmodel" + } + } + } + }, + "Component_[17962478023087084794]": { + "$type": "SelectionComponent", + "Id": 17962478023087084794 + }, + "Component_[18071675051915092508]": { + "$type": "EditorEntityIconComponent", + "Id": 18071675051915092508 + }, + "Component_[2115498007879087044]": { + "$type": "EditorInspectorComponent", + "Id": 2115498007879087044, + "ComponentOrderEntryArray": [ + { + "ComponentId": 399415038452606756 + }, + { + "ComponentId": 16184381538555246534, + "SortIndex": 1 + }, + { + "ComponentId": 7827190074535394331, + "SortIndex": 2 + } + ] + }, + "Component_[3518973002096080237]": { + "$type": "EditorOnlyEntityComponent", + "Id": 3518973002096080237 + }, + "Component_[399415038452606756]": { + "$type": "{27F1E1A1-8D9D-4C3B-BD3A-AFB9762449C0} TransformComponent", + "Id": 399415038452606756, + "Parent Entity": "ContainerEntity", + "Transform Data": { + "Translate": [ + -22.530563354492188, + -0.00018183141946792603, + 105.0152359008789 + ] + } + }, + "Component_[4564240319609068082]": { + "$type": "EditorEntitySortComponent", + "Id": 4564240319609068082 + }, + "Component_[7827190074535394331]": { + "$type": "EditorMaterialComponent", + "Id": 7827190074535394331, + "Controller": { + "Configuration": { + "materials": [ + { + "Key": { + "materialSlotStableId": 2418540911 + }, + "Value": { + "MaterialAsset": { + "assetId": { + "guid": "{FB4657EB-FB3A-5EC3-A772-DC36D6F733C3}" + }, + "assetHint": "materials/presets/pbr/metal_gold_polished.azmaterial" + } + } + } + ] + } + } + }, + "Component_[8092226976542590265]": { + "$type": "EditorDisabledCompositionComponent", + "Id": 8092226976542590265 + } + } + }, + "Entity_[3554402232276]": { + "Id": "Entity_[3554402232276]", + "Name": "Entity1", + "Components": { + "Component_[11525365929370623807]": { + "$type": "EditorVisibilityComponent", + "Id": 11525365929370623807 + }, + "Component_[12334620273692642550]": { + "$type": "EditorLockComponent", + "Id": 12334620273692642550 + }, + "Component_[14389735759337977675]": { + "$type": "EditorPendingCompositionComponent", + "Id": 14389735759337977675 + }, + "Component_[16184381538555246534]": { + "$type": "AZ::Render::EditorMeshComponent", + "Id": 16184381538555246534, + "Controller": { + "Configuration": { + "ModelAsset": { + "assetId": { + "guid": "{E14975EF-E676-51A4-B826-3EF59CB645AA}", + "subId": 285127096 + }, + "assetHint": "testdata/objects/cube/cube.azmodel" + } + } + } + }, + "Component_[17962478023087084794]": { + "$type": "SelectionComponent", + "Id": 17962478023087084794 + }, + "Component_[18071675051915092508]": { + "$type": "EditorEntityIconComponent", + "Id": 18071675051915092508 + }, + "Component_[2115498007879087044]": { + "$type": "EditorInspectorComponent", + "Id": 2115498007879087044, + "ComponentOrderEntryArray": [ + { + "ComponentId": 399415038452606756 + }, + { + "ComponentId": 16184381538555246534, + "SortIndex": 1 + }, + { + "ComponentId": 7827190074535394331, + "SortIndex": 2 + } + ] + }, + "Component_[3518973002096080237]": { + "$type": "EditorOnlyEntityComponent", + "Id": 3518973002096080237 + }, + "Component_[399415038452606756]": { + "$type": "{27F1E1A1-8D9D-4C3B-BD3A-AFB9762449C0} TransformComponent", + "Id": 399415038452606756, + "Parent Entity": "ContainerEntity", + "Transform Data": { + "Translate": [ + -12.530563354492188, + -0.00018183141946792603, + 39.56034851074219 + ] + } + }, + "Component_[4564240319609068082]": { + "$type": "EditorEntitySortComponent", + "Id": 4564240319609068082 + }, + "Component_[7827190074535394331]": { + "$type": "EditorMaterialComponent", + "Id": 7827190074535394331, + "Controller": { + "Configuration": { + "materials": [ + { + "Key": { + "materialSlotStableId": 2418540911 + }, + "Value": { + "MaterialAsset": { + "assetId": { + "guid": "{F2AD0EBF-7137-58D1-9991-9552FAD41B19}" + }, + "assetHint": "materials/presets/pbr/metal_mercury.azmaterial" + } + } + } + ] + } + } + }, + "Component_[8092226976542590265]": { + "$type": "EditorDisabledCompositionComponent", + "Id": 8092226976542590265 + } + } + }, + "Entity_[3558697199572]": { + "Id": "Entity_[3558697199572]", + "Name": "Entity1", + "Components": { + "Component_[11525365929370623807]": { + "$type": "EditorVisibilityComponent", + "Id": 11525365929370623807 + }, + "Component_[12334620273692642550]": { + "$type": "EditorLockComponent", + "Id": 12334620273692642550 + }, + "Component_[14389735759337977675]": { + "$type": "EditorPendingCompositionComponent", + "Id": 14389735759337977675 + }, + "Component_[16184381538555246534]": { + "$type": "AZ::Render::EditorMeshComponent", + "Id": 16184381538555246534, + "Controller": { + "Configuration": { + "ModelAsset": { + "assetId": { + "guid": "{E14975EF-E676-51A4-B826-3EF59CB645AA}", + "subId": 285127096 + }, + "assetHint": "testdata/objects/cube/cube.azmodel" + } + } + } + }, + "Component_[17962478023087084794]": { + "$type": "SelectionComponent", + "Id": 17962478023087084794 + }, + "Component_[18071675051915092508]": { + "$type": "EditorEntityIconComponent", + "Id": 18071675051915092508 + }, + "Component_[2115498007879087044]": { + "$type": "EditorInspectorComponent", + "Id": 2115498007879087044, + "ComponentOrderEntryArray": [ + { + "ComponentId": 399415038452606756 + }, + { + "ComponentId": 16184381538555246534, + "SortIndex": 1 + }, + { + "ComponentId": 7827190074535394331, + "SortIndex": 2 + } + ] + }, + "Component_[3518973002096080237]": { + "$type": "EditorOnlyEntityComponent", + "Id": 3518973002096080237 + }, + "Component_[399415038452606756]": { + "$type": "{27F1E1A1-8D9D-4C3B-BD3A-AFB9762449C0} TransformComponent", + "Id": 399415038452606756, + "Parent Entity": "ContainerEntity", + "Transform Data": { + "Translate": [ + -22.530563354492188, + -0.00018183141946792603, + 34.53608703613281 + ] + } + }, + "Component_[4564240319609068082]": { + "$type": "EditorEntitySortComponent", + "Id": 4564240319609068082 + }, + "Component_[7827190074535394331]": { + "$type": "EditorMaterialComponent", + "Id": 7827190074535394331, + "Controller": { + "Configuration": { + "materials": [ + { + "Key": { + "materialSlotStableId": 2418540911 + }, + "Value": { + "MaterialAsset": { + "assetId": { + "guid": "{5BC13D95-377E-53EA-9A93-156384BE8B04}" + }, + "assetHint": "materials/presets/pbr/metal_gold_matte.azmaterial" + } + } + } + ] + } + } + }, + "Component_[8092226976542590265]": { + "$type": "EditorDisabledCompositionComponent", + "Id": 8092226976542590265 + } + } + }, + "Entity_[3562992166868]": { + "Id": "Entity_[3562992166868]", + "Name": "Entity1", + "Components": { + "Component_[11525365929370623807]": { + "$type": "EditorVisibilityComponent", + "Id": 11525365929370623807 + }, + "Component_[12334620273692642550]": { + "$type": "EditorLockComponent", + "Id": 12334620273692642550 + }, + "Component_[14389735759337977675]": { + "$type": "EditorPendingCompositionComponent", + "Id": 14389735759337977675 + }, + "Component_[16184381538555246534]": { + "$type": "AZ::Render::EditorMeshComponent", + "Id": 16184381538555246534, + "Controller": { + "Configuration": { + "ModelAsset": { + "assetId": { + "guid": "{E14975EF-E676-51A4-B826-3EF59CB645AA}", + "subId": 285127096 + }, + "assetHint": "testdata/objects/cube/cube.azmodel" + } + } + } + }, + "Component_[17962478023087084794]": { + "$type": "SelectionComponent", + "Id": 17962478023087084794 + }, + "Component_[18071675051915092508]": { + "$type": "EditorEntityIconComponent", + "Id": 18071675051915092508 + }, + "Component_[2115498007879087044]": { + "$type": "EditorInspectorComponent", + "Id": 2115498007879087044, + "ComponentOrderEntryArray": [ + { + "ComponentId": 399415038452606756 + }, + { + "ComponentId": 16184381538555246534, + "SortIndex": 1 + }, + { + "ComponentId": 7827190074535394331, + "SortIndex": 2 + } + ] + }, + "Component_[3518973002096080237]": { + "$type": "EditorOnlyEntityComponent", + "Id": 3518973002096080237 + }, + "Component_[399415038452606756]": { + "$type": "{27F1E1A1-8D9D-4C3B-BD3A-AFB9762449C0} TransformComponent", + "Id": 399415038452606756, + "Parent Entity": "ContainerEntity", + "Transform Data": { + "Translate": [ + -12.530563354492188, + -0.00018183141946792603, + 45.14218521118164 + ] + } + }, + "Component_[4564240319609068082]": { + "$type": "EditorEntitySortComponent", + "Id": 4564240319609068082 + }, + "Component_[7827190074535394331]": { + "$type": "EditorMaterialComponent", + "Id": 7827190074535394331, + "Controller": { + "Configuration": { + "materials": [ + { + "Key": { + "materialSlotStableId": 2418540911 + }, + "Value": { + "MaterialAsset": { + "assetId": { + "guid": "{F2AD0EBF-7137-58D1-9991-9552FAD41B19}" + }, + "assetHint": "materials/presets/pbr/metal_mercury.azmaterial" + } + } + } + ] + } + } + }, + "Component_[8092226976542590265]": { + "$type": "EditorDisabledCompositionComponent", + "Id": 8092226976542590265 + } + } + }, + "Entity_[3567287134164]": { + "Id": "Entity_[3567287134164]", + "Name": "Entity1", + "Components": { + "Component_[11525365929370623807]": { + "$type": "EditorVisibilityComponent", + "Id": 11525365929370623807 + }, + "Component_[12334620273692642550]": { + "$type": "EditorLockComponent", + "Id": 12334620273692642550 + }, + "Component_[14389735759337977675]": { + "$type": "EditorPendingCompositionComponent", + "Id": 14389735759337977675 + }, + "Component_[16184381538555246534]": { + "$type": "AZ::Render::EditorMeshComponent", + "Id": 16184381538555246534, + "Controller": { + "Configuration": { + "ModelAsset": { + "assetId": { + "guid": "{E14975EF-E676-51A4-B826-3EF59CB645AA}", + "subId": 285127096 + }, + "assetHint": "testdata/objects/cube/cube.azmodel" + } + } + } + }, + "Component_[17962478023087084794]": { + "$type": "SelectionComponent", + "Id": 17962478023087084794 + }, + "Component_[18071675051915092508]": { + "$type": "EditorEntityIconComponent", + "Id": 18071675051915092508 + }, + "Component_[2115498007879087044]": { + "$type": "EditorInspectorComponent", + "Id": 2115498007879087044, + "ComponentOrderEntryArray": [ + { + "ComponentId": 399415038452606756 + }, + { + "ComponentId": 16184381538555246534, + "SortIndex": 1 + }, + { + "ComponentId": 7827190074535394331, + "SortIndex": 2 + } + ] + }, + "Component_[3518973002096080237]": { + "$type": "EditorOnlyEntityComponent", + "Id": 3518973002096080237 + }, + "Component_[399415038452606756]": { + "$type": "{27F1E1A1-8D9D-4C3B-BD3A-AFB9762449C0} TransformComponent", + "Id": 399415038452606756, + "Parent Entity": "ContainerEntity", + "Transform Data": { + "Translate": [ + 32.53014373779297, + -0.00018183141946792603, + 54.618019104003906 + ] + } + }, + "Component_[4564240319609068082]": { + "$type": "EditorEntitySortComponent", + "Id": 4564240319609068082 + }, + "Component_[7827190074535394331]": { + "$type": "EditorMaterialComponent", + "Id": 7827190074535394331, + "Controller": { + "Configuration": { + "materials": [ + { + "Key": { + "materialSlotStableId": 2418540911 + }, + "Value": { + "MaterialAsset": { + "assetId": { + "guid": "{99976D73-6248-5D66-AD15-E8F52B0AFE36}" + }, + "assetHint": "materials/presets/pbr/metal_cobalt.azmaterial" + } + } + } + ] + } + } + }, + "Component_[8092226976542590265]": { + "$type": "EditorDisabledCompositionComponent", + "Id": 8092226976542590265 + } + } + }, + "Entity_[3571582101460]": { + "Id": "Entity_[3571582101460]", + "Name": "Entity1", + "Components": { + "Component_[11525365929370623807]": { + "$type": "EditorVisibilityComponent", + "Id": 11525365929370623807 + }, + "Component_[12334620273692642550]": { + "$type": "EditorLockComponent", + "Id": 12334620273692642550 + }, + "Component_[14389735759337977675]": { + "$type": "EditorPendingCompositionComponent", + "Id": 14389735759337977675 + }, + "Component_[16184381538555246534]": { + "$type": "AZ::Render::EditorMeshComponent", + "Id": 16184381538555246534, + "Controller": { + "Configuration": { + "ModelAsset": { + "assetId": { + "guid": "{E14975EF-E676-51A4-B826-3EF59CB645AA}", + "subId": 285127096 + }, + "assetHint": "testdata/objects/cube/cube.azmodel" + } + } + } + }, + "Component_[17962478023087084794]": { + "$type": "SelectionComponent", + "Id": 17962478023087084794 + }, + "Component_[18071675051915092508]": { + "$type": "EditorEntityIconComponent", + "Id": 18071675051915092508 + }, + "Component_[2115498007879087044]": { + "$type": "EditorInspectorComponent", + "Id": 2115498007879087044, + "ComponentOrderEntryArray": [ + { + "ComponentId": 399415038452606756 + }, + { + "ComponentId": 16184381538555246534, + "SortIndex": 1 + }, + { + "ComponentId": 7827190074535394331, + "SortIndex": 2 + } + ] + }, + "Component_[3518973002096080237]": { + "$type": "EditorOnlyEntityComponent", + "Id": 3518973002096080237 + }, + "Component_[399415038452606756]": { + "$type": "{27F1E1A1-8D9D-4C3B-BD3A-AFB9762449C0} TransformComponent", + "Id": 399415038452606756, + "Parent Entity": "ContainerEntity", + "Transform Data": { + "Translate": [ + 27.53014373779297, + -0.00018183141946792603, + 99.43339538574219 + ] + } + }, + "Component_[4564240319609068082]": { + "$type": "EditorEntitySortComponent", + "Id": 4564240319609068082 + }, + "Component_[7827190074535394331]": { + "$type": "EditorMaterialComponent", + "Id": 7827190074535394331, + "Controller": { + "Configuration": { + "materials": [ + { + "Key": { + "materialSlotStableId": 2418540911 + }, + "Value": { + "MaterialAsset": { + "assetId": { + "guid": "{B7C712DC-4839-58BB-B522-A4F120084CF5}" + }, + "assetHint": "materials/presets/pbr/metal_chrome.azmaterial" + } + } + } + ] + } + } + }, + "Component_[8092226976542590265]": { + "$type": "EditorDisabledCompositionComponent", + "Id": 8092226976542590265 + } + } + }, + "Entity_[3575877068756]": { + "Id": "Entity_[3575877068756]", + "Name": "Entity1", + "Components": { + "Component_[11525365929370623807]": { + "$type": "EditorVisibilityComponent", + "Id": 11525365929370623807 + }, + "Component_[12334620273692642550]": { + "$type": "EditorLockComponent", + "Id": 12334620273692642550 + }, + "Component_[14389735759337977675]": { + "$type": "EditorPendingCompositionComponent", + "Id": 14389735759337977675 + }, + "Component_[16184381538555246534]": { + "$type": "AZ::Render::EditorMeshComponent", + "Id": 16184381538555246534, + "Controller": { + "Configuration": { + "ModelAsset": { + "assetId": { + "guid": "{E14975EF-E676-51A4-B826-3EF59CB645AA}", + "subId": 285127096 + }, + "assetHint": "testdata/objects/cube/cube.azmodel" + } + } + } + }, + "Component_[17962478023087084794]": { + "$type": "SelectionComponent", + "Id": 17962478023087084794 + }, + "Component_[18071675051915092508]": { + "$type": "EditorEntityIconComponent", + "Id": 18071675051915092508 + }, + "Component_[2115498007879087044]": { + "$type": "EditorInspectorComponent", + "Id": 2115498007879087044, + "ComponentOrderEntryArray": [ + { + "ComponentId": 399415038452606756 + }, + { + "ComponentId": 16184381538555246534, + "SortIndex": 1 + }, + { + "ComponentId": 7827190074535394331, + "SortIndex": 2 + } + ] + }, + "Component_[3518973002096080237]": { + "$type": "EditorOnlyEntityComponent", + "Id": 3518973002096080237 + }, + "Component_[399415038452606756]": { + "$type": "{27F1E1A1-8D9D-4C3B-BD3A-AFB9762449C0} TransformComponent", + "Id": 399415038452606756, + "Parent Entity": "ContainerEntity", + "Transform Data": { + "Translate": [ + -22.530563354492188, + -0.00018183141946792603, + 105.0152359008789 + ] + } + }, + "Component_[4564240319609068082]": { + "$type": "EditorEntitySortComponent", + "Id": 4564240319609068082 + }, + "Component_[7827190074535394331]": { + "$type": "EditorMaterialComponent", + "Id": 7827190074535394331, + "Controller": { + "Configuration": { + "materials": [ + { + "Key": { + "materialSlotStableId": 2418540911 + }, + "Value": { + "MaterialAsset": { + "assetId": { + "guid": "{FB4657EB-FB3A-5EC3-A772-DC36D6F733C3}" + }, + "assetHint": "materials/presets/pbr/metal_gold_polished.azmaterial" + } + } + } + ] + } + } + }, + "Component_[8092226976542590265]": { + "$type": "EditorDisabledCompositionComponent", + "Id": 8092226976542590265 + } + } + }, + "Entity_[3580172036052]": { + "Id": "Entity_[3580172036052]", + "Name": "Entity1", + "Components": { + "Component_[11525365929370623807]": { + "$type": "EditorVisibilityComponent", + "Id": 11525365929370623807 + }, + "Component_[12334620273692642550]": { + "$type": "EditorLockComponent", + "Id": 12334620273692642550 + }, + "Component_[14389735759337977675]": { + "$type": "EditorPendingCompositionComponent", + "Id": 14389735759337977675 + }, + "Component_[16184381538555246534]": { + "$type": "AZ::Render::EditorMeshComponent", + "Id": 16184381538555246534, + "Controller": { + "Configuration": { + "ModelAsset": { + "assetId": { + "guid": "{E14975EF-E676-51A4-B826-3EF59CB645AA}", + "subId": 285127096 + }, + "assetHint": "testdata/objects/cube/cube.azmodel" + } + } + } + }, + "Component_[17962478023087084794]": { + "$type": "SelectionComponent", + "Id": 17962478023087084794 + }, + "Component_[18071675051915092508]": { + "$type": "EditorEntityIconComponent", + "Id": 18071675051915092508 + }, + "Component_[2115498007879087044]": { + "$type": "EditorInspectorComponent", + "Id": 2115498007879087044, + "ComponentOrderEntryArray": [ + { + "ComponentId": 399415038452606756 + }, + { + "ComponentId": 16184381538555246534, + "SortIndex": 1 + }, + { + "ComponentId": 7827190074535394331, + "SortIndex": 2 + } + ] + }, + "Component_[3518973002096080237]": { + "$type": "EditorOnlyEntityComponent", + "Id": 3518973002096080237 + }, + "Component_[399415038452606756]": { + "$type": "{27F1E1A1-8D9D-4C3B-BD3A-AFB9762449C0} TransformComponent", + "Id": 399415038452606756, + "Parent Entity": "ContainerEntity", + "Transform Data": { + "Translate": [ + -42.53056335449219, + -0.00018183141946792603, + 54.618019104003906 + ] + } + }, + "Component_[4564240319609068082]": { + "$type": "EditorEntitySortComponent", + "Id": 4564240319609068082 + }, + "Component_[7827190074535394331]": { + "$type": "EditorMaterialComponent", + "Id": 7827190074535394331, + "Controller": { + "Configuration": { + "materials": [ + { + "Key": { + "materialSlotStableId": 2418540911 + }, + "Value": { + "MaterialAsset": { + "assetId": { + "guid": "{80E0F2A7-1EE4-597F-80EF-985C65BCE2EB}" + }, + "assetHint": "materials/presets/pbr/metal_brass.azmaterial" + } + } + } + ] + } + } + }, + "Component_[8092226976542590265]": { + "$type": "EditorDisabledCompositionComponent", + "Id": 8092226976542590265 + } + } + }, + "Entity_[3584467003348]": { + "Id": "Entity_[3584467003348]", + "Name": "Entity1", + "Components": { + "Component_[11525365929370623807]": { + "$type": "EditorVisibilityComponent", + "Id": 11525365929370623807 + }, + "Component_[12334620273692642550]": { + "$type": "EditorLockComponent", + "Id": 12334620273692642550 + }, + "Component_[14389735759337977675]": { + "$type": "EditorPendingCompositionComponent", + "Id": 14389735759337977675 + }, + "Component_[16184381538555246534]": { + "$type": "AZ::Render::EditorMeshComponent", + "Id": 16184381538555246534, + "Controller": { + "Configuration": { + "ModelAsset": { + "assetId": { + "guid": "{E14975EF-E676-51A4-B826-3EF59CB645AA}", + "subId": 285127096 + }, + "assetHint": "testdata/objects/cube/cube.azmodel" + } + } + } + }, + "Component_[17962478023087084794]": { + "$type": "SelectionComponent", + "Id": 17962478023087084794 + }, + "Component_[18071675051915092508]": { + "$type": "EditorEntityIconComponent", + "Id": 18071675051915092508 + }, + "Component_[2115498007879087044]": { + "$type": "EditorInspectorComponent", + "Id": 2115498007879087044, + "ComponentOrderEntryArray": [ + { + "ComponentId": 399415038452606756 + }, + { + "ComponentId": 16184381538555246534, + "SortIndex": 1 + }, + { + "ComponentId": 7827190074535394331, + "SortIndex": 2 + } + ] + }, + "Component_[3518973002096080237]": { + "$type": "EditorOnlyEntityComponent", + "Id": 3518973002096080237 + }, + "Component_[399415038452606756]": { + "$type": "{27F1E1A1-8D9D-4C3B-BD3A-AFB9762449C0} TransformComponent", + "Id": 399415038452606756, + "Parent Entity": "ContainerEntity", + "Transform Data": { + "Translate": [ + 2.5301437377929688, + -0.00018183141946792603, + 69.34888458251953 + ] + } + }, + "Component_[4564240319609068082]": { + "$type": "EditorEntitySortComponent", + "Id": 4564240319609068082 + }, + "Component_[7827190074535394331]": { + "$type": "EditorMaterialComponent", + "Id": 7827190074535394331, + "Controller": { + "Configuration": { + "materials": [ + { + "Key": { + "materialSlotStableId": 2418540911 + }, + "Value": { + "MaterialAsset": { + "assetId": { + "guid": "{E23FC75B-4142-55F1-B9AE-884826E7EB23}" + }, + "assetHint": "materials/presets/pbr/metal_platinum.azmaterial" + } + } + } + ] + } + } + }, + "Component_[8092226976542590265]": { + "$type": "EditorDisabledCompositionComponent", + "Id": 8092226976542590265 + } + } + }, + "Entity_[3588761970644]": { + "Id": "Entity_[3588761970644]", + "Name": "Entity1", + "Components": { + "Component_[11525365929370623807]": { + "$type": "EditorVisibilityComponent", + "Id": 11525365929370623807 + }, + "Component_[12334620273692642550]": { + "$type": "EditorLockComponent", + "Id": 12334620273692642550 + }, + "Component_[14389735759337977675]": { + "$type": "EditorPendingCompositionComponent", + "Id": 14389735759337977675 + }, + "Component_[16184381538555246534]": { + "$type": "AZ::Render::EditorMeshComponent", + "Id": 16184381538555246534, + "Controller": { + "Configuration": { + "ModelAsset": { + "assetId": { + "guid": "{E14975EF-E676-51A4-B826-3EF59CB645AA}", + "subId": 285127096 + }, + "assetHint": "testdata/objects/cube/cube.azmodel" + } + } + } + }, + "Component_[17962478023087084794]": { + "$type": "SelectionComponent", + "Id": 17962478023087084794 + }, + "Component_[18071675051915092508]": { + "$type": "EditorEntityIconComponent", + "Id": 18071675051915092508 + }, + "Component_[2115498007879087044]": { + "$type": "EditorInspectorComponent", + "Id": 2115498007879087044, + "ComponentOrderEntryArray": [ + { + "ComponentId": 399415038452606756 + }, + { + "ComponentId": 16184381538555246534, + "SortIndex": 1 + }, + { + "ComponentId": 7827190074535394331, + "SortIndex": 2 + } + ] + }, + "Component_[3518973002096080237]": { + "$type": "EditorOnlyEntityComponent", + "Id": 3518973002096080237 + }, + "Component_[399415038452606756]": { + "$type": "{27F1E1A1-8D9D-4C3B-BD3A-AFB9762449C0} TransformComponent", + "Id": 399415038452606756, + "Parent Entity": "ContainerEntity", + "Transform Data": { + "Translate": [ + 32.53014373779297, + -0.00018183141946792603, + 49.593753814697266 + ] + } + }, + "Component_[4564240319609068082]": { + "$type": "EditorEntitySortComponent", + "Id": 4564240319609068082 + }, + "Component_[7827190074535394331]": { + "$type": "EditorMaterialComponent", + "Id": 7827190074535394331, + "Controller": { + "Configuration": { + "materials": [ + { + "Key": { + "materialSlotStableId": 2418540911 + }, + "Value": { + "MaterialAsset": { + "assetId": { + "guid": "{C60A39AF-BB76-51BD-9468-A88C9A6F78D7}" + }, + "assetHint": "materials/presets/pbr/metal_cobalt_matte.azmaterial" + } + } + } + ] + } + } + }, + "Component_[8092226976542590265]": { + "$type": "EditorDisabledCompositionComponent", + "Id": 8092226976542590265 + } + } + }, + "Entity_[3593056937940]": { + "Id": "Entity_[3593056937940]", + "Name": "Entity1", + "Components": { + "Component_[11525365929370623807]": { + "$type": "EditorVisibilityComponent", + "Id": 11525365929370623807 + }, + "Component_[12334620273692642550]": { + "$type": "EditorLockComponent", + "Id": 12334620273692642550 + }, + "Component_[14389735759337977675]": { + "$type": "EditorPendingCompositionComponent", + "Id": 14389735759337977675 + }, + "Component_[16184381538555246534]": { + "$type": "AZ::Render::EditorMeshComponent", + "Id": 16184381538555246534, + "Controller": { + "Configuration": { + "ModelAsset": { + "assetId": { + "guid": "{E14975EF-E676-51A4-B826-3EF59CB645AA}", + "subId": 285127096 + }, + "assetHint": "testdata/objects/cube/cube.azmodel" + } + } + } + }, + "Component_[17962478023087084794]": { + "$type": "SelectionComponent", + "Id": 17962478023087084794 + }, + "Component_[18071675051915092508]": { + "$type": "EditorEntityIconComponent", + "Id": 18071675051915092508 + }, + "Component_[2115498007879087044]": { + "$type": "EditorInspectorComponent", + "Id": 2115498007879087044, + "ComponentOrderEntryArray": [ + { + "ComponentId": 399415038452606756 + }, + { + "ComponentId": 16184381538555246534, + "SortIndex": 1 + }, + { + "ComponentId": 7827190074535394331, + "SortIndex": 2 + } + ] + }, + "Component_[3518973002096080237]": { + "$type": "EditorOnlyEntityComponent", + "Id": 3518973002096080237 + }, + "Component_[399415038452606756]": { + "$type": "{27F1E1A1-8D9D-4C3B-BD3A-AFB9762449C0} TransformComponent", + "Id": 399415038452606756, + "Parent Entity": "ContainerEntity", + "Transform Data": { + "Translate": [ + 17.53014373779297, + -0.00018183141946792603, + 9.475835800170898 + ] + } + }, + "Component_[4564240319609068082]": { + "$type": "EditorEntitySortComponent", + "Id": 4564240319609068082 + }, + "Component_[7827190074535394331]": { + "$type": "EditorMaterialComponent", + "Id": 7827190074535394331, + "Controller": { + "Configuration": { + "materials": [ + { + "Key": {}, + "Value": { + "MaterialAsset": { + "assetId": { + "guid": "{721188E0-B7CC-5D06-8D5D-39AF8ABF2EF9}" + }, + "assetHint": "materials/presets/pbr/metal_titanium.azmaterial" + } + } + }, + { + "Key": { + "materialSlotStableId": 2418540911 + }, + "Value": { + "MaterialAsset": { + "assetId": { + "guid": "{94CF2BD7-7D09-5577-B1D8-3FF85B15E127}" + }, + "assetHint": "materials/presets/pbr/metal_aluminum.azmaterial" + } + } + } + ] + } + } + }, + "Component_[8092226976542590265]": { + "$type": "EditorDisabledCompositionComponent", + "Id": 8092226976542590265 + } + } + }, + "Entity_[3597351905236]": { + "Id": "Entity_[3597351905236]", + "Name": "Entity1", + "Components": { + "Component_[11525365929370623807]": { + "$type": "EditorVisibilityComponent", + "Id": 11525365929370623807 + }, + "Component_[12334620273692642550]": { + "$type": "EditorLockComponent", + "Id": 12334620273692642550 + }, + "Component_[14389735759337977675]": { + "$type": "EditorPendingCompositionComponent", + "Id": 14389735759337977675 + }, + "Component_[16184381538555246534]": { + "$type": "AZ::Render::EditorMeshComponent", + "Id": 16184381538555246534, + "Controller": { + "Configuration": { + "ModelAsset": { + "assetId": { + "guid": "{E14975EF-E676-51A4-B826-3EF59CB645AA}", + "subId": 285127096 + }, + "assetHint": "testdata/objects/cube/cube.azmodel" + } + } + } + }, + "Component_[17962478023087084794]": { + "$type": "SelectionComponent", + "Id": 17962478023087084794 + }, + "Component_[18071675051915092508]": { + "$type": "EditorEntityIconComponent", + "Id": 18071675051915092508 + }, + "Component_[2115498007879087044]": { + "$type": "EditorInspectorComponent", + "Id": 2115498007879087044, + "ComponentOrderEntryArray": [ + { + "ComponentId": 399415038452606756 + }, + { + "ComponentId": 16184381538555246534, + "SortIndex": 1 + }, + { + "ComponentId": 7827190074535394331, + "SortIndex": 2 + } + ] + }, + "Component_[3518973002096080237]": { + "$type": "EditorOnlyEntityComponent", + "Id": 3518973002096080237 + }, + "Component_[399415038452606756]": { + "$type": "{27F1E1A1-8D9D-4C3B-BD3A-AFB9762449C0} TransformComponent", + "Id": 399415038452606756, + "Parent Entity": "ContainerEntity", + "Transform Data": { + "Translate": [ + 27.53014373779297, + -0.00018183141946792603, + 39.56034851074219 + ] + } + }, + "Component_[4564240319609068082]": { + "$type": "EditorEntitySortComponent", + "Id": 4564240319609068082 + }, + "Component_[7827190074535394331]": { + "$type": "EditorMaterialComponent", + "Id": 7827190074535394331, + "Controller": { + "Configuration": { + "materials": [ + { + "Key": { + "materialSlotStableId": 2418540911 + }, + "Value": { + "MaterialAsset": { + "assetId": { + "guid": "{B7C712DC-4839-58BB-B522-A4F120084CF5}" + }, + "assetHint": "materials/presets/pbr/metal_chrome.azmaterial" + } + } + } + ] + } + } + }, + "Component_[8092226976542590265]": { + "$type": "EditorDisabledCompositionComponent", + "Id": 8092226976542590265 + } + } + }, + "Entity_[3601646872532]": { + "Id": "Entity_[3601646872532]", + "Name": "Entity1", + "Components": { + "Component_[11525365929370623807]": { + "$type": "EditorVisibilityComponent", + "Id": 11525365929370623807 + }, + "Component_[12334620273692642550]": { + "$type": "EditorLockComponent", + "Id": 12334620273692642550 + }, + "Component_[14389735759337977675]": { + "$type": "EditorPendingCompositionComponent", + "Id": 14389735759337977675 + }, + "Component_[16184381538555246534]": { + "$type": "AZ::Render::EditorMeshComponent", + "Id": 16184381538555246534, + "Controller": { + "Configuration": { + "ModelAsset": { + "assetId": { + "guid": "{E14975EF-E676-51A4-B826-3EF59CB645AA}", + "subId": 285127096 + }, + "assetHint": "testdata/objects/cube/cube.azmodel" + } + } + } + }, + "Component_[17962478023087084794]": { + "$type": "SelectionComponent", + "Id": 17962478023087084794 + }, + "Component_[18071675051915092508]": { + "$type": "EditorEntityIconComponent", + "Id": 18071675051915092508 + }, + "Component_[2115498007879087044]": { + "$type": "EditorInspectorComponent", + "Id": 2115498007879087044, + "ComponentOrderEntryArray": [ + { + "ComponentId": 399415038452606756 + }, + { + "ComponentId": 16184381538555246534, + "SortIndex": 1 + }, + { + "ComponentId": 7827190074535394331, + "SortIndex": 2 + } + ] + }, + "Component_[3518973002096080237]": { + "$type": "EditorOnlyEntityComponent", + "Id": 3518973002096080237 + }, + "Component_[399415038452606756]": { + "$type": "{27F1E1A1-8D9D-4C3B-BD3A-AFB9762449C0} TransformComponent", + "Id": 399415038452606756, + "Parent Entity": "ContainerEntity", + "Transform Data": { + "Translate": [ + 42.53014373779297, + -0.00018183141946792603, + 74.93071746826172 + ] + } + }, + "Component_[4564240319609068082]": { + "$type": "EditorEntitySortComponent", + "Id": 4564240319609068082 + }, + "Component_[7827190074535394331]": { + "$type": "EditorMaterialComponent", + "Id": 7827190074535394331, + "Controller": { + "Configuration": { + "materials": [ + { + "Key": { + "materialSlotStableId": 2418540911 + }, + "Value": { + "MaterialAsset": { + "assetId": { + "guid": "{FB4657EB-FB3A-5EC3-A772-DC36D6F733C3}" + }, + "assetHint": "materials/presets/pbr/metal_gold_polished.azmaterial" + } + } + } + ] + } + } + }, + "Component_[8092226976542590265]": { + "$type": "EditorDisabledCompositionComponent", + "Id": 8092226976542590265 + } + } + }, + "Entity_[3605941839828]": { + "Id": "Entity_[3605941839828]", + "Name": "Entity1", + "Components": { + "Component_[11525365929370623807]": { + "$type": "EditorVisibilityComponent", + "Id": 11525365929370623807 + }, + "Component_[12334620273692642550]": { + "$type": "EditorLockComponent", + "Id": 12334620273692642550 + }, + "Component_[14389735759337977675]": { + "$type": "EditorPendingCompositionComponent", + "Id": 14389735759337977675 + }, + "Component_[16184381538555246534]": { + "$type": "AZ::Render::EditorMeshComponent", + "Id": 16184381538555246534, + "Controller": { + "Configuration": { + "ModelAsset": { + "assetId": { + "guid": "{E14975EF-E676-51A4-B826-3EF59CB645AA}", + "subId": 285127096 + }, + "assetHint": "testdata/objects/cube/cube.azmodel" + } + } + } + }, + "Component_[17962478023087084794]": { + "$type": "SelectionComponent", + "Id": 17962478023087084794 + }, + "Component_[18071675051915092508]": { + "$type": "EditorEntityIconComponent", + "Id": 18071675051915092508 + }, + "Component_[2115498007879087044]": { + "$type": "EditorInspectorComponent", + "Id": 2115498007879087044, + "ComponentOrderEntryArray": [ + { + "ComponentId": 399415038452606756 + }, + { + "ComponentId": 16184381538555246534, + "SortIndex": 1 + }, + { + "ComponentId": 7827190074535394331, + "SortIndex": 2 + } + ] + }, + "Component_[3518973002096080237]": { + "$type": "EditorOnlyEntityComponent", + "Id": 3518973002096080237 + }, + "Component_[399415038452606756]": { + "$type": "{27F1E1A1-8D9D-4C3B-BD3A-AFB9762449C0} TransformComponent", + "Id": 399415038452606756, + "Parent Entity": "ContainerEntity", + "Transform Data": { + "Translate": [ + 42.53014373779297, + -0.00018183141946792603, + 64.32462310791016 + ] + } + }, + "Component_[4564240319609068082]": { + "$type": "EditorEntitySortComponent", + "Id": 4564240319609068082 + }, + "Component_[7827190074535394331]": { + "$type": "EditorMaterialComponent", + "Id": 7827190074535394331, + "Controller": { + "Configuration": { + "materials": [ + { + "Key": { + "materialSlotStableId": 2418540911 + }, + "Value": { + "MaterialAsset": { + "assetId": { + "guid": "{5BC13D95-377E-53EA-9A93-156384BE8B04}" + }, + "assetHint": "materials/presets/pbr/metal_gold_matte.azmaterial" + } + } + } + ] + } + } + }, + "Component_[8092226976542590265]": { + "$type": "EditorDisabledCompositionComponent", + "Id": 8092226976542590265 + } + } + }, + "Entity_[3610236807124]": { + "Id": "Entity_[3610236807124]", + "Name": "Entity1", + "Components": { + "Component_[11525365929370623807]": { + "$type": "EditorVisibilityComponent", + "Id": 11525365929370623807 + }, + "Component_[12334620273692642550]": { + "$type": "EditorLockComponent", + "Id": 12334620273692642550 + }, + "Component_[14389735759337977675]": { + "$type": "EditorPendingCompositionComponent", + "Id": 14389735759337977675 + }, + "Component_[16184381538555246534]": { + "$type": "AZ::Render::EditorMeshComponent", + "Id": 16184381538555246534, + "Controller": { + "Configuration": { + "ModelAsset": { + "assetId": { + "guid": "{E14975EF-E676-51A4-B826-3EF59CB645AA}", + "subId": 285127096 + }, + "assetHint": "testdata/objects/cube/cube.azmodel" + } + } + } + }, + "Component_[17962478023087084794]": { + "$type": "SelectionComponent", + "Id": 17962478023087084794 + }, + "Component_[18071675051915092508]": { + "$type": "EditorEntityIconComponent", + "Id": 18071675051915092508 + }, + "Component_[2115498007879087044]": { + "$type": "EditorInspectorComponent", + "Id": 2115498007879087044, + "ComponentOrderEntryArray": [ + { + "ComponentId": 399415038452606756 + }, + { + "ComponentId": 16184381538555246534, + "SortIndex": 1 + }, + { + "ComponentId": 7827190074535394331, + "SortIndex": 2 + } + ] + }, + "Component_[3518973002096080237]": { + "$type": "EditorOnlyEntityComponent", + "Id": 3518973002096080237 + }, + "Component_[399415038452606756]": { + "$type": "{27F1E1A1-8D9D-4C3B-BD3A-AFB9762449C0} TransformComponent", + "Id": 399415038452606756, + "Parent Entity": "ContainerEntity", + "Transform Data": { + "Translate": [ + 17.53014373779297, + -0.00018183141946792603, + 69.34888458251953 + ] + } + }, + "Component_[4564240319609068082]": { + "$type": "EditorEntitySortComponent", + "Id": 4564240319609068082 + }, + "Component_[7827190074535394331]": { + "$type": "EditorMaterialComponent", + "Id": 7827190074535394331, + "Controller": { + "Configuration": { + "materials": [ + { + "Key": {}, + "Value": { + "MaterialAsset": { + "assetId": { + "guid": "{721188E0-B7CC-5D06-8D5D-39AF8ABF2EF9}" + }, + "assetHint": "materials/presets/pbr/metal_titanium.azmaterial" + } + } + }, + { + "Key": { + "materialSlotStableId": 2418540911 + }, + "Value": { + "MaterialAsset": { + "assetId": { + "guid": "{94CF2BD7-7D09-5577-B1D8-3FF85B15E127}" + }, + "assetHint": "materials/presets/pbr/metal_aluminum.azmaterial" + } + } + } + ] + } + } + }, + "Component_[8092226976542590265]": { + "$type": "EditorDisabledCompositionComponent", + "Id": 8092226976542590265 + } + } + }, + "Entity_[3614531774420]": { + "Id": "Entity_[3614531774420]", + "Name": "Entity1", + "Components": { + "Component_[11525365929370623807]": { + "$type": "EditorVisibilityComponent", + "Id": 11525365929370623807 + }, + "Component_[12334620273692642550]": { + "$type": "EditorLockComponent", + "Id": 12334620273692642550 + }, + "Component_[14389735759337977675]": { + "$type": "EditorPendingCompositionComponent", + "Id": 14389735759337977675 + }, + "Component_[16184381538555246534]": { + "$type": "AZ::Render::EditorMeshComponent", + "Id": 16184381538555246534, + "Controller": { + "Configuration": { + "ModelAsset": { + "assetId": { + "guid": "{E14975EF-E676-51A4-B826-3EF59CB645AA}", + "subId": 285127096 + }, + "assetHint": "testdata/objects/cube/cube.azmodel" + } + } + } + }, + "Component_[17962478023087084794]": { + "$type": "SelectionComponent", + "Id": 17962478023087084794 + }, + "Component_[18071675051915092508]": { + "$type": "EditorEntityIconComponent", + "Id": 18071675051915092508 + }, + "Component_[2115498007879087044]": { + "$type": "EditorInspectorComponent", + "Id": 2115498007879087044, + "ComponentOrderEntryArray": [ + { + "ComponentId": 399415038452606756 + }, + { + "ComponentId": 16184381538555246534, + "SortIndex": 1 + }, + { + "ComponentId": 7827190074535394331, + "SortIndex": 2 + } + ] + }, + "Component_[3518973002096080237]": { + "$type": "EditorOnlyEntityComponent", + "Id": 3518973002096080237 + }, + "Component_[399415038452606756]": { + "$type": "{27F1E1A1-8D9D-4C3B-BD3A-AFB9762449C0} TransformComponent", + "Id": 399415038452606756, + "Parent Entity": "ContainerEntity", + "Transform Data": { + "Translate": [ + 7.530143737792969, + -0.00018183141946792603, + 39.56034851074219 + ] + } + }, + "Component_[4564240319609068082]": { + "$type": "EditorEntitySortComponent", + "Id": 4564240319609068082 + }, + "Component_[7827190074535394331]": { + "$type": "EditorMaterialComponent", + "Id": 7827190074535394331, + "Controller": { + "Configuration": { + "materials": [ + { + "Key": { + "materialSlotStableId": 2418540911 + }, + "Value": { + "MaterialAsset": { + "assetId": { + "guid": "{CDA13277-5EAB-5E2A-93F5-B7003597FBCE}" + }, + "assetHint": "materials/presets/pbr/metal_silver.azmaterial" + } + } + } + ] + } + } + }, + "Component_[8092226976542590265]": { + "$type": "EditorDisabledCompositionComponent", + "Id": 8092226976542590265 + } + } + }, + "Entity_[3618826741716]": { + "Id": "Entity_[3618826741716]", + "Name": "Entity1", + "Components": { + "Component_[11525365929370623807]": { + "$type": "EditorVisibilityComponent", + "Id": 11525365929370623807 + }, + "Component_[12334620273692642550]": { + "$type": "EditorLockComponent", + "Id": 12334620273692642550 + }, + "Component_[14389735759337977675]": { + "$type": "EditorPendingCompositionComponent", + "Id": 14389735759337977675 + }, + "Component_[16184381538555246534]": { + "$type": "AZ::Render::EditorMeshComponent", + "Id": 16184381538555246534, + "Controller": { + "Configuration": { + "ModelAsset": { + "assetId": { + "guid": "{E14975EF-E676-51A4-B826-3EF59CB645AA}", + "subId": 285127096 + }, + "assetHint": "testdata/objects/cube/cube.azmodel" + } + } + } + }, + "Component_[17962478023087084794]": { + "$type": "SelectionComponent", + "Id": 17962478023087084794 + }, + "Component_[18071675051915092508]": { + "$type": "EditorEntityIconComponent", + "Id": 18071675051915092508 + }, + "Component_[2115498007879087044]": { + "$type": "EditorInspectorComponent", + "Id": 2115498007879087044, + "ComponentOrderEntryArray": [ + { + "ComponentId": 399415038452606756 + }, + { + "ComponentId": 16184381538555246534, + "SortIndex": 1 + }, + { + "ComponentId": 7827190074535394331, + "SortIndex": 2 + } + ] + }, + "Component_[3518973002096080237]": { + "$type": "EditorOnlyEntityComponent", + "Id": 3518973002096080237 + }, + "Component_[399415038452606756]": { + "$type": "{27F1E1A1-8D9D-4C3B-BD3A-AFB9762449C0} TransformComponent", + "Id": 399415038452606756, + "Parent Entity": "ContainerEntity", + "Transform Data": { + "Translate": [ + 17.53014373779297, + -0.00018183141946792603, + 24.533506393432617 + ] + } + }, + "Component_[4564240319609068082]": { + "$type": "EditorEntitySortComponent", + "Id": 4564240319609068082 + }, + "Component_[7827190074535394331]": { + "$type": "EditorMaterialComponent", + "Id": 7827190074535394331, + "Controller": { + "Configuration": { + "materials": [ + { + "Key": {}, + "Value": { + "MaterialAsset": { + "assetId": { + "guid": "{721188E0-B7CC-5D06-8D5D-39AF8ABF2EF9}" + }, + "assetHint": "materials/presets/pbr/metal_titanium.azmaterial" + } + } + }, + { + "Key": { + "materialSlotStableId": 2418540911 + }, + "Value": { + "MaterialAsset": { + "assetId": { + "guid": "{94CF2BD7-7D09-5577-B1D8-3FF85B15E127}" + }, + "assetHint": "materials/presets/pbr/metal_aluminum.azmaterial" + } + } + } + ] + } + } + }, + "Component_[8092226976542590265]": { + "$type": "EditorDisabledCompositionComponent", + "Id": 8092226976542590265 + } + } + }, + "Entity_[3623121709012]": { + "Id": "Entity_[3623121709012]", + "Name": "Entity1", + "Components": { + "Component_[11525365929370623807]": { + "$type": "EditorVisibilityComponent", + "Id": 11525365929370623807 + }, + "Component_[12334620273692642550]": { + "$type": "EditorLockComponent", + "Id": 12334620273692642550 + }, + "Component_[14389735759337977675]": { + "$type": "EditorPendingCompositionComponent", + "Id": 14389735759337977675 + }, + "Component_[16184381538555246534]": { + "$type": "AZ::Render::EditorMeshComponent", + "Id": 16184381538555246534, + "Controller": { + "Configuration": { + "ModelAsset": { + "assetId": { + "guid": "{E14975EF-E676-51A4-B826-3EF59CB645AA}", + "subId": 285127096 + }, + "assetHint": "testdata/objects/cube/cube.azmodel" + } + } + } + }, + "Component_[17962478023087084794]": { + "$type": "SelectionComponent", + "Id": 17962478023087084794 + }, + "Component_[18071675051915092508]": { + "$type": "EditorEntityIconComponent", + "Id": 18071675051915092508 + }, + "Component_[2115498007879087044]": { + "$type": "EditorInspectorComponent", + "Id": 2115498007879087044, + "ComponentOrderEntryArray": [ + { + "ComponentId": 399415038452606756 + }, + { + "ComponentId": 16184381538555246534, + "SortIndex": 1 + }, + { + "ComponentId": 7827190074535394331, + "SortIndex": 2 + } + ] + }, + "Component_[3518973002096080237]": { + "$type": "EditorOnlyEntityComponent", + "Id": 3518973002096080237 + }, + "Component_[399415038452606756]": { + "$type": "{27F1E1A1-8D9D-4C3B-BD3A-AFB9762449C0} TransformComponent", + "Id": 399415038452606756, + "Parent Entity": "ContainerEntity", + "Transform Data": { + "Translate": [ + 7.530143737792969, + -0.00018183141946792603, + 34.53608703613281 + ] + } + }, + "Component_[4564240319609068082]": { + "$type": "EditorEntitySortComponent", + "Id": 4564240319609068082 + }, + "Component_[7827190074535394331]": { + "$type": "EditorMaterialComponent", + "Id": 7827190074535394331, + "Controller": { + "Configuration": { + "materials": [ + { + "Key": { + "materialSlotStableId": 2418540911 + }, + "Value": { + "MaterialAsset": { + "assetId": { + "guid": "{E54E46E7-9FA3-54D7-B5F8-8DCCDF17BC24}" + }, + "assetHint": "materials/presets/pbr/metal_silver_matte.azmaterial" + } + } + } + ] + } + } + }, + "Component_[8092226976542590265]": { + "$type": "EditorDisabledCompositionComponent", + "Id": 8092226976542590265 + } + } + }, + "Entity_[3627416676308]": { + "Id": "Entity_[3627416676308]", + "Name": "Entity1", + "Components": { + "Component_[11525365929370623807]": { + "$type": "EditorVisibilityComponent", + "Id": 11525365929370623807 + }, + "Component_[12334620273692642550]": { + "$type": "EditorLockComponent", + "Id": 12334620273692642550 + }, + "Component_[14389735759337977675]": { + "$type": "EditorPendingCompositionComponent", + "Id": 14389735759337977675 + }, + "Component_[16184381538555246534]": { + "$type": "AZ::Render::EditorMeshComponent", + "Id": 16184381538555246534, + "Controller": { + "Configuration": { + "ModelAsset": { + "assetId": { + "guid": "{E14975EF-E676-51A4-B826-3EF59CB645AA}", + "subId": 285127096 + }, + "assetHint": "testdata/objects/cube/cube.azmodel" + } + } + } + }, + "Component_[17962478023087084794]": { + "$type": "SelectionComponent", + "Id": 17962478023087084794 + }, + "Component_[18071675051915092508]": { + "$type": "EditorEntityIconComponent", + "Id": 18071675051915092508 + }, + "Component_[2115498007879087044]": { + "$type": "EditorInspectorComponent", + "Id": 2115498007879087044, + "ComponentOrderEntryArray": [ + { + "ComponentId": 399415038452606756 + }, + { + "ComponentId": 16184381538555246534, + "SortIndex": 1 + }, + { + "ComponentId": 7827190074535394331, + "SortIndex": 2 + } + ] + }, + "Component_[3518973002096080237]": { + "$type": "EditorOnlyEntityComponent", + "Id": 3518973002096080237 + }, + "Component_[399415038452606756]": { + "$type": "{27F1E1A1-8D9D-4C3B-BD3A-AFB9762449C0} TransformComponent", + "Id": 399415038452606756, + "Parent Entity": "ContainerEntity", + "Transform Data": { + "Translate": [ + 47.53014373779297, + -0.00018183141946792603, + 34.53608703613281 + ] + } + }, + "Component_[4564240319609068082]": { + "$type": "EditorEntitySortComponent", + "Id": 4564240319609068082 + }, + "Component_[7827190074535394331]": { + "$type": "EditorMaterialComponent", + "Id": 7827190074535394331, + "Controller": { + "Configuration": { + "materials": [ + { + "Key": { + "materialSlotStableId": 2418540911 + }, + "Value": { + "MaterialAsset": { + "assetId": { + "guid": "{970148AC-7258-5EC8-9CE7-F4EF93164D93}" + }, + "assetHint": "materials/presets/pbr/metal_iron_matte.azmaterial" + } + } + } + ] + } + } + }, + "Component_[8092226976542590265]": { + "$type": "EditorDisabledCompositionComponent", + "Id": 8092226976542590265 + } + } + }, + "Entity_[3631711643604]": { + "Id": "Entity_[3631711643604]", + "Name": "Entity1", + "Components": { + "Component_[11525365929370623807]": { + "$type": "EditorVisibilityComponent", + "Id": 11525365929370623807 + }, + "Component_[12334620273692642550]": { + "$type": "EditorLockComponent", + "Id": 12334620273692642550 + }, + "Component_[14389735759337977675]": { + "$type": "EditorPendingCompositionComponent", + "Id": 14389735759337977675 + }, + "Component_[16184381538555246534]": { + "$type": "AZ::Render::EditorMeshComponent", + "Id": 16184381538555246534, + "Controller": { + "Configuration": { + "ModelAsset": { + "assetId": { + "guid": "{E14975EF-E676-51A4-B826-3EF59CB645AA}", + "subId": 285127096 + }, + "assetHint": "testdata/objects/cube/cube.azmodel" + } + } + } + }, + "Component_[17962478023087084794]": { + "$type": "SelectionComponent", + "Id": 17962478023087084794 + }, + "Component_[18071675051915092508]": { + "$type": "EditorEntityIconComponent", + "Id": 18071675051915092508 + }, + "Component_[2115498007879087044]": { + "$type": "EditorInspectorComponent", + "Id": 2115498007879087044, + "ComponentOrderEntryArray": [ + { + "ComponentId": 399415038452606756 + }, + { + "ComponentId": 16184381538555246534, + "SortIndex": 1 + }, + { + "ComponentId": 7827190074535394331, + "SortIndex": 2 + } + ] + }, + "Component_[3518973002096080237]": { + "$type": "EditorOnlyEntityComponent", + "Id": 3518973002096080237 + }, + "Component_[399415038452606756]": { + "$type": "{27F1E1A1-8D9D-4C3B-BD3A-AFB9762449C0} TransformComponent", + "Id": 399415038452606756, + "Parent Entity": "ContainerEntity", + "Transform Data": { + "Translate": [ + 22.53014373779297, + -0.00018183141946792603, + 15.057670593261719 + ] + } + }, + "Component_[4564240319609068082]": { + "$type": "EditorEntitySortComponent", + "Id": 4564240319609068082 + }, + "Component_[7827190074535394331]": { + "$type": "EditorMaterialComponent", + "Id": 7827190074535394331, + "Controller": { + "Configuration": { + "materials": [ + { + "Key": { + "materialSlotStableId": 2418540911 + }, + "Value": { + "MaterialAsset": { + "assetId": { + "guid": "{FC69F2F8-F73B-5A0C-B8B7-94BAA45780FC}" + }, + "assetHint": "materials/presets/pbr/metal_brass_polished.azmaterial" + } + } + } + ] + } + } + }, + "Component_[8092226976542590265]": { + "$type": "EditorDisabledCompositionComponent", + "Id": 8092226976542590265 + } + } + }, + "Entity_[3636006610900]": { + "Id": "Entity_[3636006610900]", + "Name": "Entity1", + "Components": { + "Component_[11525365929370623807]": { + "$type": "EditorVisibilityComponent", + "Id": 11525365929370623807 + }, + "Component_[12334620273692642550]": { + "$type": "EditorLockComponent", + "Id": 12334620273692642550 + }, + "Component_[14389735759337977675]": { + "$type": "EditorPendingCompositionComponent", + "Id": 14389735759337977675 + }, + "Component_[16184381538555246534]": { + "$type": "AZ::Render::EditorMeshComponent", + "Id": 16184381538555246534, + "Controller": { + "Configuration": { + "ModelAsset": { + "assetId": { + "guid": "{E14975EF-E676-51A4-B826-3EF59CB645AA}", + "subId": 285127096 + }, + "assetHint": "testdata/objects/cube/cube.azmodel" + } + } + } + }, + "Component_[17962478023087084794]": { + "$type": "SelectionComponent", + "Id": 17962478023087084794 + }, + "Component_[18071675051915092508]": { + "$type": "EditorEntityIconComponent", + "Id": 18071675051915092508 + }, + "Component_[2115498007879087044]": { + "$type": "EditorInspectorComponent", + "Id": 2115498007879087044, + "ComponentOrderEntryArray": [ + { + "ComponentId": 399415038452606756 + }, + { + "ComponentId": 16184381538555246534, + "SortIndex": 1 + }, + { + "ComponentId": 7827190074535394331, + "SortIndex": 2 + } + ] + }, + "Component_[3518973002096080237]": { + "$type": "EditorOnlyEntityComponent", + "Id": 3518973002096080237 + }, + "Component_[399415038452606756]": { + "$type": "{27F1E1A1-8D9D-4C3B-BD3A-AFB9762449C0} TransformComponent", + "Id": 399415038452606756, + "Parent Entity": "ContainerEntity", + "Transform Data": { + "Translate": [ + 7.530143737792969, + -0.00018183141946792603, + 74.93071746826172 + ] + } + }, + "Component_[4564240319609068082]": { + "$type": "EditorEntitySortComponent", + "Id": 4564240319609068082 + }, + "Component_[7827190074535394331]": { + "$type": "EditorMaterialComponent", + "Id": 7827190074535394331, + "Controller": { + "Configuration": { + "materials": [ + { + "Key": { + "materialSlotStableId": 2418540911 + }, + "Value": { + "MaterialAsset": { + "assetId": { + "guid": "{2AC06FA3-7670-542E-8996-DF346AFF1B61}" + }, + "assetHint": "materials/presets/pbr/metal_silver_polished.azmaterial" + } + } + } + ] + } + } + }, + "Component_[8092226976542590265]": { + "$type": "EditorDisabledCompositionComponent", + "Id": 8092226976542590265 + } + } + }, + "Entity_[3640301578196]": { + "Id": "Entity_[3640301578196]", + "Name": "Entity1", + "Components": { + "Component_[11525365929370623807]": { + "$type": "EditorVisibilityComponent", + "Id": 11525365929370623807 + }, + "Component_[12334620273692642550]": { + "$type": "EditorLockComponent", + "Id": 12334620273692642550 + }, + "Component_[14389735759337977675]": { + "$type": "EditorPendingCompositionComponent", + "Id": 14389735759337977675 + }, + "Component_[16184381538555246534]": { + "$type": "AZ::Render::EditorMeshComponent", + "Id": 16184381538555246534, + "Controller": { + "Configuration": { + "ModelAsset": { + "assetId": { + "guid": "{E14975EF-E676-51A4-B826-3EF59CB645AA}", + "subId": 285127096 + }, + "assetHint": "testdata/objects/cube/cube.azmodel" + } + } + } + }, + "Component_[17962478023087084794]": { + "$type": "SelectionComponent", + "Id": 17962478023087084794 + }, + "Component_[18071675051915092508]": { + "$type": "EditorEntityIconComponent", + "Id": 18071675051915092508 + }, + "Component_[2115498007879087044]": { + "$type": "EditorInspectorComponent", + "Id": 2115498007879087044, + "ComponentOrderEntryArray": [ + { + "ComponentId": 399415038452606756 + }, + { + "ComponentId": 16184381538555246534, + "SortIndex": 1 + }, + { + "ComponentId": 7827190074535394331, + "SortIndex": 2 + } + ] + }, + "Component_[3518973002096080237]": { + "$type": "EditorOnlyEntityComponent", + "Id": 3518973002096080237 + }, + "Component_[399415038452606756]": { + "$type": "{27F1E1A1-8D9D-4C3B-BD3A-AFB9762449C0} TransformComponent", + "Id": 399415038452606756, + "Parent Entity": "ContainerEntity", + "Transform Data": { + "Translate": [ + -12.530563354492188, + -0.00018183141946792603, + 94.40913391113281 + ] + } + }, + "Component_[4564240319609068082]": { + "$type": "EditorEntitySortComponent", + "Id": 4564240319609068082 + }, + "Component_[7827190074535394331]": { + "$type": "EditorMaterialComponent", + "Id": 7827190074535394331, + "Controller": { + "Configuration": { + "materials": [ + { + "Key": { + "materialSlotStableId": 2418540911 + }, + "Value": { + "MaterialAsset": { + "assetId": { + "guid": "{F2AD0EBF-7137-58D1-9991-9552FAD41B19}" + }, + "assetHint": "materials/presets/pbr/metal_mercury.azmaterial" + } + } + } + ] + } + } + }, + "Component_[8092226976542590265]": { + "$type": "EditorDisabledCompositionComponent", + "Id": 8092226976542590265 + } + } + }, + "Entity_[3644596545492]": { + "Id": "Entity_[3644596545492]", + "Name": "Entity1", + "Components": { + "Component_[11525365929370623807]": { + "$type": "EditorVisibilityComponent", + "Id": 11525365929370623807 + }, + "Component_[12334620273692642550]": { + "$type": "EditorLockComponent", + "Id": 12334620273692642550 + }, + "Component_[14389735759337977675]": { + "$type": "EditorPendingCompositionComponent", + "Id": 14389735759337977675 + }, + "Component_[16184381538555246534]": { + "$type": "AZ::Render::EditorMeshComponent", + "Id": 16184381538555246534, + "Controller": { + "Configuration": { + "ModelAsset": { + "assetId": { + "guid": "{E14975EF-E676-51A4-B826-3EF59CB645AA}", + "subId": 285127096 + }, + "assetHint": "testdata/objects/cube/cube.azmodel" + } + } + } + }, + "Component_[17962478023087084794]": { + "$type": "SelectionComponent", + "Id": 17962478023087084794 + }, + "Component_[18071675051915092508]": { + "$type": "EditorEntityIconComponent", + "Id": 18071675051915092508 + }, + "Component_[2115498007879087044]": { + "$type": "EditorInspectorComponent", + "Id": 2115498007879087044, + "ComponentOrderEntryArray": [ + { + "ComponentId": 399415038452606756 + }, + { + "ComponentId": 16184381538555246534, + "SortIndex": 1 + }, + { + "ComponentId": 7827190074535394331, + "SortIndex": 2 + } + ] + }, + "Component_[3518973002096080237]": { + "$type": "EditorOnlyEntityComponent", + "Id": 3518973002096080237 + }, + "Component_[399415038452606756]": { + "$type": "{27F1E1A1-8D9D-4C3B-BD3A-AFB9762449C0} TransformComponent", + "Id": 399415038452606756, + "Parent Entity": "ContainerEntity", + "Transform Data": { + "Translate": [ + -22.530563354492188, + -0.00018183141946792603, + 24.533506393432617 + ] + } + }, + "Component_[4564240319609068082]": { + "$type": "EditorEntitySortComponent", + "Id": 4564240319609068082 + }, + "Component_[7827190074535394331]": { + "$type": "EditorMaterialComponent", + "Id": 7827190074535394331, + "Controller": { + "Configuration": { + "materials": [ + { + "Key": { + "materialSlotStableId": 2418540911 + }, + "Value": { + "MaterialAsset": { + "assetId": { + "guid": "{FE52E7C8-064D-506A-9C26-433EB93747DE}" + }, + "assetHint": "materials/presets/pbr/metal_gold.azmaterial" + } + } + } + ] + } + } + }, + "Component_[8092226976542590265]": { + "$type": "EditorDisabledCompositionComponent", + "Id": 8092226976542590265 + } + } + }, + "Entity_[3648891512788]": { + "Id": "Entity_[3648891512788]", + "Name": "Entity1", + "Components": { + "Component_[11525365929370623807]": { + "$type": "EditorVisibilityComponent", + "Id": 11525365929370623807 + }, + "Component_[12334620273692642550]": { + "$type": "EditorLockComponent", + "Id": 12334620273692642550 + }, + "Component_[14389735759337977675]": { + "$type": "EditorPendingCompositionComponent", + "Id": 14389735759337977675 + }, + "Component_[16184381538555246534]": { + "$type": "AZ::Render::EditorMeshComponent", + "Id": 16184381538555246534, + "Controller": { + "Configuration": { + "ModelAsset": { + "assetId": { + "guid": "{E14975EF-E676-51A4-B826-3EF59CB645AA}", + "subId": 285127096 + }, + "assetHint": "testdata/objects/cube/cube.azmodel" + } + } + } + }, + "Component_[17962478023087084794]": { + "$type": "SelectionComponent", + "Id": 17962478023087084794 + }, + "Component_[18071675051915092508]": { + "$type": "EditorEntityIconComponent", + "Id": 18071675051915092508 + }, + "Component_[2115498007879087044]": { + "$type": "EditorInspectorComponent", + "Id": 2115498007879087044, + "ComponentOrderEntryArray": [ + { + "ComponentId": 399415038452606756 + }, + { + "ComponentId": 16184381538555246534, + "SortIndex": 1 + }, + { + "ComponentId": 7827190074535394331, + "SortIndex": 2 + } + ] + }, + "Component_[3518973002096080237]": { + "$type": "EditorOnlyEntityComponent", + "Id": 3518973002096080237 + }, + "Component_[399415038452606756]": { + "$type": "{27F1E1A1-8D9D-4C3B-BD3A-AFB9762449C0} TransformComponent", + "Id": 399415038452606756, + "Parent Entity": "ContainerEntity", + "Transform Data": { + "Translate": [ + -47.53056335449219, + -0.00018183141946792603, + 39.56034851074219 + ] + } + }, + "Component_[4564240319609068082]": { + "$type": "EditorEntitySortComponent", + "Id": 4564240319609068082 + }, + "Component_[7827190074535394331]": { + "$type": "EditorMaterialComponent", + "Id": 7827190074535394331, + "Controller": { + "Configuration": { + "materials": [ + { + "Key": { + "materialSlotStableId": 2418540911 + }, + "Value": { + "MaterialAsset": { + "assetId": { + "guid": "{94CF2BD7-7D09-5577-B1D8-3FF85B15E127}" + }, + "assetHint": "materials/presets/pbr/metal_aluminum.azmaterial" + } + } + } + ] + } + } + }, + "Component_[8092226976542590265]": { + "$type": "EditorDisabledCompositionComponent", + "Id": 8092226976542590265 + } + } + }, + "Entity_[3653186480084]": { + "Id": "Entity_[3653186480084]", + "Name": "Entity1", + "Components": { + "Component_[11525365929370623807]": { + "$type": "EditorVisibilityComponent", + "Id": 11525365929370623807 + }, + "Component_[12334620273692642550]": { + "$type": "EditorLockComponent", + "Id": 12334620273692642550 + }, + "Component_[14389735759337977675]": { + "$type": "EditorPendingCompositionComponent", + "Id": 14389735759337977675 + }, + "Component_[16184381538555246534]": { + "$type": "AZ::Render::EditorMeshComponent", + "Id": 16184381538555246534, + "Controller": { + "Configuration": { + "ModelAsset": { + "assetId": { + "guid": "{E14975EF-E676-51A4-B826-3EF59CB645AA}", + "subId": 285127096 + }, + "assetHint": "testdata/objects/cube/cube.azmodel" + } + } + } + }, + "Component_[17962478023087084794]": { + "$type": "SelectionComponent", + "Id": 17962478023087084794 + }, + "Component_[18071675051915092508]": { + "$type": "EditorEntityIconComponent", + "Id": 18071675051915092508 + }, + "Component_[2115498007879087044]": { + "$type": "EditorInspectorComponent", + "Id": 2115498007879087044, + "ComponentOrderEntryArray": [ + { + "ComponentId": 399415038452606756 + }, + { + "ComponentId": 16184381538555246534, + "SortIndex": 1 + }, + { + "ComponentId": 7827190074535394331, + "SortIndex": 2 + } + ] + }, + "Component_[3518973002096080237]": { + "$type": "EditorOnlyEntityComponent", + "Id": 3518973002096080237 + }, + "Component_[399415038452606756]": { + "$type": "{27F1E1A1-8D9D-4C3B-BD3A-AFB9762449C0} TransformComponent", + "Id": 399415038452606756, + "Parent Entity": "ContainerEntity", + "Transform Data": { + "Translate": [ + -12.530563354492188, + -0.00018183141946792603, + 9.475835800170898 + ] + } + }, + "Component_[4564240319609068082]": { + "$type": "EditorEntitySortComponent", + "Id": 4564240319609068082 + }, + "Component_[7827190074535394331]": { + "$type": "EditorMaterialComponent", + "Id": 7827190074535394331, + "Controller": { + "Configuration": { + "materials": [ + { + "Key": { + "materialSlotStableId": 2418540911 + }, + "Value": { + "MaterialAsset": { + "assetId": { + "guid": "{F2AD0EBF-7137-58D1-9991-9552FAD41B19}" + }, + "assetHint": "materials/presets/pbr/metal_mercury.azmaterial" + } + } + } + ] + } + } + }, + "Component_[8092226976542590265]": { + "$type": "EditorDisabledCompositionComponent", + "Id": 8092226976542590265 + } + } + }, + "Entity_[3657481447380]": { + "Id": "Entity_[3657481447380]", + "Name": "Entity1", + "Components": { + "Component_[11525365929370623807]": { + "$type": "EditorVisibilityComponent", + "Id": 11525365929370623807 + }, + "Component_[12334620273692642550]": { + "$type": "EditorLockComponent", + "Id": 12334620273692642550 + }, + "Component_[14389735759337977675]": { + "$type": "EditorPendingCompositionComponent", + "Id": 14389735759337977675 + }, + "Component_[16184381538555246534]": { + "$type": "AZ::Render::EditorMeshComponent", + "Id": 16184381538555246534, + "Controller": { + "Configuration": { + "ModelAsset": { + "assetId": { + "guid": "{E14975EF-E676-51A4-B826-3EF59CB645AA}", + "subId": 285127096 + }, + "assetHint": "testdata/objects/cube/cube.azmodel" + } + } + } + }, + "Component_[17962478023087084794]": { + "$type": "SelectionComponent", + "Id": 17962478023087084794 + }, + "Component_[18071675051915092508]": { + "$type": "EditorEntityIconComponent", + "Id": 18071675051915092508 + }, + "Component_[2115498007879087044]": { + "$type": "EditorInspectorComponent", + "Id": 2115498007879087044, + "ComponentOrderEntryArray": [ + { + "ComponentId": 399415038452606756 + }, + { + "ComponentId": 16184381538555246534, + "SortIndex": 1 + }, + { + "ComponentId": 7827190074535394331, + "SortIndex": 2 + } + ] + }, + "Component_[3518973002096080237]": { + "$type": "EditorOnlyEntityComponent", + "Id": 3518973002096080237 + }, + "Component_[399415038452606756]": { + "$type": "{27F1E1A1-8D9D-4C3B-BD3A-AFB9762449C0} TransformComponent", + "Id": 399415038452606756, + "Parent Entity": "ContainerEntity", + "Transform Data": { + "Translate": [ + -17.530563354492188, + -0.00018183141946792603, + 9.475835800170898 + ] + } + }, + "Component_[4564240319609068082]": { + "$type": "EditorEntitySortComponent", + "Id": 4564240319609068082 + }, + "Component_[7827190074535394331]": { + "$type": "EditorMaterialComponent", + "Id": 7827190074535394331, + "Controller": { + "Configuration": { + "materials": [ + { + "Key": { + "materialSlotStableId": 2418540911 + }, + "Value": { + "MaterialAsset": { + "assetId": { + "guid": "{892EA944-0325-5FA6-94D7-4AB4FC02A0F5}" + }, + "assetHint": "materials/presets/pbr/metal_iron.azmaterial" + } + } + } + ] + } + } + }, + "Component_[8092226976542590265]": { + "$type": "EditorDisabledCompositionComponent", + "Id": 8092226976542590265 + } + } + }, + "Entity_[3661776414676]": { + "Id": "Entity_[3661776414676]", + "Name": "Entity1", + "Components": { + "Component_[11525365929370623807]": { + "$type": "EditorVisibilityComponent", + "Id": 11525365929370623807 + }, + "Component_[12334620273692642550]": { + "$type": "EditorLockComponent", + "Id": 12334620273692642550 + }, + "Component_[14389735759337977675]": { + "$type": "EditorPendingCompositionComponent", + "Id": 14389735759337977675 + }, + "Component_[16184381538555246534]": { + "$type": "AZ::Render::EditorMeshComponent", + "Id": 16184381538555246534, + "Controller": { + "Configuration": { + "ModelAsset": { + "assetId": { + "guid": "{E14975EF-E676-51A4-B826-3EF59CB645AA}", + "subId": 285127096 + }, + "assetHint": "testdata/objects/cube/cube.azmodel" + } + } + } + }, + "Component_[17962478023087084794]": { + "$type": "SelectionComponent", + "Id": 17962478023087084794 + }, + "Component_[18071675051915092508]": { + "$type": "EditorEntityIconComponent", + "Id": 18071675051915092508 + }, + "Component_[2115498007879087044]": { + "$type": "EditorInspectorComponent", + "Id": 2115498007879087044, + "ComponentOrderEntryArray": [ + { + "ComponentId": 399415038452606756 + }, + { + "ComponentId": 16184381538555246534, + "SortIndex": 1 + }, + { + "ComponentId": 7827190074535394331, + "SortIndex": 2 + } + ] + }, + "Component_[3518973002096080237]": { + "$type": "EditorOnlyEntityComponent", + "Id": 3518973002096080237 + }, + "Component_[399415038452606756]": { + "$type": "{27F1E1A1-8D9D-4C3B-BD3A-AFB9762449C0} TransformComponent", + "Id": 399415038452606756, + "Parent Entity": "ContainerEntity", + "Transform Data": { + "Translate": [ + 17.53014373779297, + -0.00018183141946792603, + 0.0 + ] + } + }, + "Component_[4564240319609068082]": { + "$type": "EditorEntitySortComponent", + "Id": 4564240319609068082 + }, + "Component_[7827190074535394331]": { + "$type": "EditorMaterialComponent", + "Id": 7827190074535394331, + "Controller": { + "Configuration": { + "materials": [ + { + "Key": {}, + "Value": { + "MaterialAsset": { + "assetId": { + "guid": "{721188E0-B7CC-5D06-8D5D-39AF8ABF2EF9}" + }, + "assetHint": "materials/presets/pbr/metal_titanium.azmaterial" + } + } + }, + { + "Key": { + "materialSlotStableId": 2418540911 + }, + "Value": { + "MaterialAsset": { + "assetId": { + "guid": "{64C1F6A6-6BDA-551A-BE56-1829E5913278}" + }, + "assetHint": "materials/presets/pbr/metal_aluminum_polished.azmaterial" + } + } + } + ] + } + } + }, + "Component_[8092226976542590265]": { + "$type": "EditorDisabledCompositionComponent", + "Id": 8092226976542590265 + } + } + }, + "Entity_[3666071381972]": { + "Id": "Entity_[3666071381972]", + "Name": "Entity1", + "Components": { + "Component_[11525365929370623807]": { + "$type": "EditorVisibilityComponent", + "Id": 11525365929370623807 + }, + "Component_[12334620273692642550]": { + "$type": "EditorLockComponent", + "Id": 12334620273692642550 + }, + "Component_[14389735759337977675]": { + "$type": "EditorPendingCompositionComponent", + "Id": 14389735759337977675 + }, + "Component_[16184381538555246534]": { + "$type": "AZ::Render::EditorMeshComponent", + "Id": 16184381538555246534, + "Controller": { + "Configuration": { + "ModelAsset": { + "assetId": { + "guid": "{E14975EF-E676-51A4-B826-3EF59CB645AA}", + "subId": 285127096 + }, + "assetHint": "testdata/objects/cube/cube.azmodel" + } + } + } + }, + "Component_[17962478023087084794]": { + "$type": "SelectionComponent", + "Id": 17962478023087084794 + }, + "Component_[18071675051915092508]": { + "$type": "EditorEntityIconComponent", + "Id": 18071675051915092508 + }, + "Component_[2115498007879087044]": { + "$type": "EditorInspectorComponent", + "Id": 2115498007879087044, + "ComponentOrderEntryArray": [ + { + "ComponentId": 399415038452606756 + }, + { + "ComponentId": 16184381538555246534, + "SortIndex": 1 + }, + { + "ComponentId": 7827190074535394331, + "SortIndex": 2 + } + ] + }, + "Component_[3518973002096080237]": { + "$type": "EditorOnlyEntityComponent", + "Id": 3518973002096080237 + }, + "Component_[399415038452606756]": { + "$type": "{27F1E1A1-8D9D-4C3B-BD3A-AFB9762449C0} TransformComponent", + "Id": 399415038452606756, + "Parent Entity": "ContainerEntity", + "Transform Data": { + "Translate": [ + -42.53056335449219, + -0.00018183141946792603, + 114.4910659790039 + ] + } + }, + "Component_[4564240319609068082]": { + "$type": "EditorEntitySortComponent", + "Id": 4564240319609068082 + }, + "Component_[7827190074535394331]": { + "$type": "EditorMaterialComponent", + "Id": 7827190074535394331, + "Controller": { + "Configuration": { + "materials": [ + { + "Key": { + "materialSlotStableId": 2418540911 + }, + "Value": { + "MaterialAsset": { + "assetId": { + "guid": "{80E0F2A7-1EE4-597F-80EF-985C65BCE2EB}" + }, + "assetHint": "materials/presets/pbr/metal_brass.azmaterial" + } + } + } + ] + } + } + }, + "Component_[8092226976542590265]": { + "$type": "EditorDisabledCompositionComponent", + "Id": 8092226976542590265 + } + } + }, + "Entity_[3670366349268]": { + "Id": "Entity_[3670366349268]", + "Name": "Entity1", + "Components": { + "Component_[11525365929370623807]": { + "$type": "EditorVisibilityComponent", + "Id": 11525365929370623807 + }, + "Component_[12334620273692642550]": { + "$type": "EditorLockComponent", + "Id": 12334620273692642550 + }, + "Component_[14389735759337977675]": { + "$type": "EditorPendingCompositionComponent", + "Id": 14389735759337977675 + }, + "Component_[16184381538555246534]": { + "$type": "AZ::Render::EditorMeshComponent", + "Id": 16184381538555246534, + "Controller": { + "Configuration": { + "ModelAsset": { + "assetId": { + "guid": "{E14975EF-E676-51A4-B826-3EF59CB645AA}", + "subId": 285127096 + }, + "assetHint": "testdata/objects/cube/cube.azmodel" + } + } + } + }, + "Component_[17962478023087084794]": { + "$type": "SelectionComponent", + "Id": 17962478023087084794 + }, + "Component_[18071675051915092508]": { + "$type": "EditorEntityIconComponent", + "Id": 18071675051915092508 + }, + "Component_[2115498007879087044]": { + "$type": "EditorInspectorComponent", + "Id": 2115498007879087044, + "ComponentOrderEntryArray": [ + { + "ComponentId": 399415038452606756 + }, + { + "ComponentId": 16184381538555246534, + "SortIndex": 1 + }, + { + "ComponentId": 7827190074535394331, + "SortIndex": 2 + } + ] + }, + "Component_[3518973002096080237]": { + "$type": "EditorOnlyEntityComponent", + "Id": 3518973002096080237 + }, + "Component_[399415038452606756]": { + "$type": "{27F1E1A1-8D9D-4C3B-BD3A-AFB9762449C0} TransformComponent", + "Id": 399415038452606756, + "Parent Entity": "ContainerEntity", + "Transform Data": { + "Translate": [ + -7.5305633544921875, + -0.00018183141946792603, + 4.451573371887207 + ] + } + }, + "Component_[4564240319609068082]": { + "$type": "EditorEntitySortComponent", + "Id": 4564240319609068082 + }, + "Component_[7827190074535394331]": { + "$type": "EditorMaterialComponent", + "Id": 7827190074535394331, + "Controller": { + "Configuration": { + "materials": [ + { + "Key": { + "materialSlotStableId": 2418540911 + }, + "Value": { + "MaterialAsset": { + "assetId": { + "guid": "{E56377B1-6310-5311-A494-135BE50B74F0}" + }, + "assetHint": "materials/presets/pbr/metal_nickel_matte.azmaterial" + } + } + } + ] + } + } + }, + "Component_[8092226976542590265]": { + "$type": "EditorDisabledCompositionComponent", + "Id": 8092226976542590265 + } + } + }, + "Entity_[3674661316564]": { + "Id": "Entity_[3674661316564]", + "Name": "Entity1", + "Components": { + "Component_[11525365929370623807]": { + "$type": "EditorVisibilityComponent", + "Id": 11525365929370623807 + }, + "Component_[12334620273692642550]": { + "$type": "EditorLockComponent", + "Id": 12334620273692642550 + }, + "Component_[14389735759337977675]": { + "$type": "EditorPendingCompositionComponent", + "Id": 14389735759337977675 + }, + "Component_[16184381538555246534]": { + "$type": "AZ::Render::EditorMeshComponent", + "Id": 16184381538555246534, + "Controller": { + "Configuration": { + "ModelAsset": { + "assetId": { + "guid": "{E14975EF-E676-51A4-B826-3EF59CB645AA}", + "subId": 285127096 + }, + "assetHint": "testdata/objects/cube/cube.azmodel" + } + } + } + }, + "Component_[17962478023087084794]": { + "$type": "SelectionComponent", + "Id": 17962478023087084794 + }, + "Component_[18071675051915092508]": { + "$type": "EditorEntityIconComponent", + "Id": 18071675051915092508 + }, + "Component_[2115498007879087044]": { + "$type": "EditorInspectorComponent", + "Id": 2115498007879087044, + "ComponentOrderEntryArray": [ + { + "ComponentId": 399415038452606756 + }, + { + "ComponentId": 16184381538555246534, + "SortIndex": 1 + }, + { + "ComponentId": 7827190074535394331, + "SortIndex": 2 + } + ] + }, + "Component_[3518973002096080237]": { + "$type": "EditorOnlyEntityComponent", + "Id": 3518973002096080237 + }, + "Component_[399415038452606756]": { + "$type": "{27F1E1A1-8D9D-4C3B-BD3A-AFB9762449C0} TransformComponent", + "Id": 399415038452606756, + "Parent Entity": "ContainerEntity", + "Transform Data": { + "Translate": [ + 22.53014373779297, + -0.00018183141946792603, + 109.46680450439453 + ] + } + }, + "Component_[4564240319609068082]": { + "$type": "EditorEntitySortComponent", + "Id": 4564240319609068082 + }, + "Component_[7827190074535394331]": { + "$type": "EditorMaterialComponent", + "Id": 7827190074535394331, + "Controller": { + "Configuration": { + "materials": [ + { + "Key": { + "materialSlotStableId": 2418540911 + }, + "Value": { + "MaterialAsset": { + "assetId": { + "guid": "{AE350D9F-0000-526D-B49C-4303D687BB86}" + }, + "assetHint": "materials/presets/pbr/metal_brass_matte.azmaterial" + } + } + } + ] + } + } + }, + "Component_[8092226976542590265]": { + "$type": "EditorDisabledCompositionComponent", + "Id": 8092226976542590265 + } + } + }, + "Entity_[3678956283860]": { + "Id": "Entity_[3678956283860]", + "Name": "Entity1", + "Components": { + "Component_[11525365929370623807]": { + "$type": "EditorVisibilityComponent", + "Id": 11525365929370623807 + }, + "Component_[12334620273692642550]": { + "$type": "EditorLockComponent", + "Id": 12334620273692642550 + }, + "Component_[14389735759337977675]": { + "$type": "EditorPendingCompositionComponent", + "Id": 14389735759337977675 + }, + "Component_[16184381538555246534]": { + "$type": "AZ::Render::EditorMeshComponent", + "Id": 16184381538555246534, + "Controller": { + "Configuration": { + "ModelAsset": { + "assetId": { + "guid": "{E14975EF-E676-51A4-B826-3EF59CB645AA}", + "subId": 285127096 + }, + "assetHint": "testdata/objects/cube/cube.azmodel" + } + } + } + }, + "Component_[17962478023087084794]": { + "$type": "SelectionComponent", + "Id": 17962478023087084794 + }, + "Component_[18071675051915092508]": { + "$type": "EditorEntityIconComponent", + "Id": 18071675051915092508 + }, + "Component_[2115498007879087044]": { + "$type": "EditorInspectorComponent", + "Id": 2115498007879087044, + "ComponentOrderEntryArray": [ + { + "ComponentId": 399415038452606756 + }, + { + "ComponentId": 16184381538555246534, + "SortIndex": 1 + }, + { + "ComponentId": 7827190074535394331, + "SortIndex": 2 + } + ] + }, + "Component_[3518973002096080237]": { + "$type": "EditorOnlyEntityComponent", + "Id": 3518973002096080237 + }, + "Component_[399415038452606756]": { + "$type": "{27F1E1A1-8D9D-4C3B-BD3A-AFB9762449C0} TransformComponent", + "Id": 399415038452606756, + "Parent Entity": "ContainerEntity", + "Transform Data": { + "Translate": [ + -22.530563354492188, + -0.00018183141946792603, + 114.4910659790039 + ] + } + }, + "Component_[4564240319609068082]": { + "$type": "EditorEntitySortComponent", + "Id": 4564240319609068082 + }, + "Component_[7827190074535394331]": { + "$type": "EditorMaterialComponent", + "Id": 7827190074535394331, + "Controller": { + "Configuration": { + "materials": [ + { + "Key": { + "materialSlotStableId": 2418540911 + }, + "Value": { + "MaterialAsset": { + "assetId": { + "guid": "{FE52E7C8-064D-506A-9C26-433EB93747DE}" + }, + "assetHint": "materials/presets/pbr/metal_gold.azmaterial" + } + } + } + ] + } + } + }, + "Component_[8092226976542590265]": { + "$type": "EditorDisabledCompositionComponent", + "Id": 8092226976542590265 + } + } + }, + "Entity_[3683251251156]": { + "Id": "Entity_[3683251251156]", + "Name": "Entity1", + "Components": { + "Component_[11525365929370623807]": { + "$type": "EditorVisibilityComponent", + "Id": 11525365929370623807 + }, + "Component_[12334620273692642550]": { + "$type": "EditorLockComponent", + "Id": 12334620273692642550 + }, + "Component_[14389735759337977675]": { + "$type": "EditorPendingCompositionComponent", + "Id": 14389735759337977675 + }, + "Component_[16184381538555246534]": { + "$type": "AZ::Render::EditorMeshComponent", + "Id": 16184381538555246534, + "Controller": { + "Configuration": { + "ModelAsset": { + "assetId": { + "guid": "{E14975EF-E676-51A4-B826-3EF59CB645AA}", + "subId": 285127096 + }, + "assetHint": "testdata/objects/cube/cube.azmodel" + } + } + } + }, + "Component_[17962478023087084794]": { + "$type": "SelectionComponent", + "Id": 17962478023087084794 + }, + "Component_[18071675051915092508]": { + "$type": "EditorEntityIconComponent", + "Id": 18071675051915092508 + }, + "Component_[2115498007879087044]": { + "$type": "EditorInspectorComponent", + "Id": 2115498007879087044, + "ComponentOrderEntryArray": [ + { + "ComponentId": 399415038452606756 + }, + { + "ComponentId": 16184381538555246534, + "SortIndex": 1 + }, + { + "ComponentId": 7827190074535394331, + "SortIndex": 2 + } + ] + }, + "Component_[3518973002096080237]": { + "$type": "EditorOnlyEntityComponent", + "Id": 3518973002096080237 + }, + "Component_[399415038452606756]": { + "$type": "{27F1E1A1-8D9D-4C3B-BD3A-AFB9762449C0} TransformComponent", + "Id": 399415038452606756, + "Parent Entity": "ContainerEntity", + "Transform Data": { + "Translate": [ + 42.53014373779297, + -0.00018183141946792603, + 64.32462310791016 + ] + } + }, + "Component_[4564240319609068082]": { + "$type": "EditorEntitySortComponent", + "Id": 4564240319609068082 + }, + "Component_[7827190074535394331]": { + "$type": "EditorMaterialComponent", + "Id": 7827190074535394331, + "Controller": { + "Configuration": { + "materials": [ + { + "Key": { + "materialSlotStableId": 2418540911 + }, + "Value": { + "MaterialAsset": { + "assetId": { + "guid": "{5BC13D95-377E-53EA-9A93-156384BE8B04}" + }, + "assetHint": "materials/presets/pbr/metal_gold_matte.azmaterial" + } + } + } + ] + } + } + }, + "Component_[8092226976542590265]": { + "$type": "EditorDisabledCompositionComponent", + "Id": 8092226976542590265 + } + } + }, + "Entity_[3687546218452]": { + "Id": "Entity_[3687546218452]", + "Name": "Entity1", + "Components": { + "Component_[11525365929370623807]": { + "$type": "EditorVisibilityComponent", + "Id": 11525365929370623807 + }, + "Component_[12334620273692642550]": { + "$type": "EditorLockComponent", + "Id": 12334620273692642550 + }, + "Component_[14389735759337977675]": { + "$type": "EditorPendingCompositionComponent", + "Id": 14389735759337977675 + }, + "Component_[16184381538555246534]": { + "$type": "AZ::Render::EditorMeshComponent", + "Id": 16184381538555246534, + "Controller": { + "Configuration": { + "ModelAsset": { + "assetId": { + "guid": "{E14975EF-E676-51A4-B826-3EF59CB645AA}", + "subId": 285127096 + }, + "assetHint": "testdata/objects/cube/cube.azmodel" + } + } + } + }, + "Component_[17962478023087084794]": { + "$type": "SelectionComponent", + "Id": 17962478023087084794 + }, + "Component_[18071675051915092508]": { + "$type": "EditorEntityIconComponent", + "Id": 18071675051915092508 + }, + "Component_[2115498007879087044]": { + "$type": "EditorInspectorComponent", + "Id": 2115498007879087044, + "ComponentOrderEntryArray": [ + { + "ComponentId": 399415038452606756 + }, + { + "ComponentId": 16184381538555246534, + "SortIndex": 1 + }, + { + "ComponentId": 7827190074535394331, + "SortIndex": 2 + } + ] + }, + "Component_[3518973002096080237]": { + "$type": "EditorOnlyEntityComponent", + "Id": 3518973002096080237 + }, + "Component_[399415038452606756]": { + "$type": "{27F1E1A1-8D9D-4C3B-BD3A-AFB9762449C0} TransformComponent", + "Id": 399415038452606756, + "Parent Entity": "ContainerEntity", + "Transform Data": { + "Translate": [ + 47.53014373779297, + -0.00018183141946792603, + 24.533506393432617 + ] + } + }, + "Component_[4564240319609068082]": { + "$type": "EditorEntitySortComponent", + "Id": 4564240319609068082 + }, + "Component_[7827190074535394331]": { + "$type": "EditorMaterialComponent", + "Id": 7827190074535394331, + "Controller": { + "Configuration": { + "materials": [ + { + "Key": { + "materialSlotStableId": 2418540911 + }, + "Value": { + "MaterialAsset": { + "assetId": { + "guid": "{892EA944-0325-5FA6-94D7-4AB4FC02A0F5}" + }, + "assetHint": "materials/presets/pbr/metal_iron.azmaterial" + } + } + } + ] + } + } + }, + "Component_[8092226976542590265]": { + "$type": "EditorDisabledCompositionComponent", + "Id": 8092226976542590265 + } + } + }, + "Entity_[3691841185748]": { + "Id": "Entity_[3691841185748]", + "Name": "Entity1", + "Components": { + "Component_[11525365929370623807]": { + "$type": "EditorVisibilityComponent", + "Id": 11525365929370623807 + }, + "Component_[12334620273692642550]": { + "$type": "EditorLockComponent", + "Id": 12334620273692642550 + }, + "Component_[14389735759337977675]": { + "$type": "EditorPendingCompositionComponent", + "Id": 14389735759337977675 + }, + "Component_[16184381538555246534]": { + "$type": "AZ::Render::EditorMeshComponent", + "Id": 16184381538555246534, + "Controller": { + "Configuration": { + "ModelAsset": { + "assetId": { + "guid": "{E14975EF-E676-51A4-B826-3EF59CB645AA}", + "subId": 285127096 + }, + "assetHint": "testdata/objects/cube/cube.azmodel" + } + } + } + }, + "Component_[17962478023087084794]": { + "$type": "SelectionComponent", + "Id": 17962478023087084794 + }, + "Component_[18071675051915092508]": { + "$type": "EditorEntityIconComponent", + "Id": 18071675051915092508 + }, + "Component_[2115498007879087044]": { + "$type": "EditorInspectorComponent", + "Id": 2115498007879087044, + "ComponentOrderEntryArray": [ + { + "ComponentId": 399415038452606756 + }, + { + "ComponentId": 16184381538555246534, + "SortIndex": 1 + }, + { + "ComponentId": 7827190074535394331, + "SortIndex": 2 + } + ] + }, + "Component_[3518973002096080237]": { + "$type": "EditorOnlyEntityComponent", + "Id": 3518973002096080237 + }, + "Component_[399415038452606756]": { + "$type": "{27F1E1A1-8D9D-4C3B-BD3A-AFB9762449C0} TransformComponent", + "Id": 399415038452606756, + "Parent Entity": "ContainerEntity", + "Transform Data": { + "Translate": [ + -2.5305633544921875, + -0.00018183141946792603, + 64.32462310791016 + ] + } + }, + "Component_[4564240319609068082]": { + "$type": "EditorEntitySortComponent", + "Id": 4564240319609068082 + }, + "Component_[7827190074535394331]": { + "$type": "EditorMaterialComponent", + "Id": 7827190074535394331, + "Controller": { + "Configuration": { + "materials": [ + { + "Key": { + "materialSlotStableId": 2418540911 + }, + "Value": { + "MaterialAsset": { + "assetId": { + "guid": "{9187B84B-425F-5D11-B4D7-35BBDB0959D1}" + }, + "assetHint": "materials/presets/pbr/metal_palladium_matte.azmaterial" + } + } + } + ] + } + } + }, + "Component_[8092226976542590265]": { + "$type": "EditorDisabledCompositionComponent", + "Id": 8092226976542590265 + } + } + }, + "Entity_[3696136153044]": { + "Id": "Entity_[3696136153044]", + "Name": "Entity1", + "Components": { + "Component_[11525365929370623807]": { + "$type": "EditorVisibilityComponent", + "Id": 11525365929370623807 + }, + "Component_[12334620273692642550]": { + "$type": "EditorLockComponent", + "Id": 12334620273692642550 + }, + "Component_[14389735759337977675]": { + "$type": "EditorPendingCompositionComponent", + "Id": 14389735759337977675 + }, + "Component_[16184381538555246534]": { + "$type": "AZ::Render::EditorMeshComponent", + "Id": 16184381538555246534, + "Controller": { + "Configuration": { + "ModelAsset": { + "assetId": { + "guid": "{E14975EF-E676-51A4-B826-3EF59CB645AA}", + "subId": 285127096 + }, + "assetHint": "testdata/objects/cube/cube.azmodel" + } + } + } + }, + "Component_[17962478023087084794]": { + "$type": "SelectionComponent", + "Id": 17962478023087084794 + }, + "Component_[18071675051915092508]": { + "$type": "EditorEntityIconComponent", + "Id": 18071675051915092508 + }, + "Component_[2115498007879087044]": { + "$type": "EditorInspectorComponent", + "Id": 2115498007879087044, + "ComponentOrderEntryArray": [ + { + "ComponentId": 399415038452606756 + }, + { + "ComponentId": 16184381538555246534, + "SortIndex": 1 + }, + { + "ComponentId": 7827190074535394331, + "SortIndex": 2 + } + ] + }, + "Component_[3518973002096080237]": { + "$type": "EditorOnlyEntityComponent", + "Id": 3518973002096080237 + }, + "Component_[399415038452606756]": { + "$type": "{27F1E1A1-8D9D-4C3B-BD3A-AFB9762449C0} TransformComponent", + "Id": 399415038452606756, + "Parent Entity": "ContainerEntity", + "Transform Data": { + "Translate": [ + -42.53056335449219, + -0.00018183141946792603, + 9.475835800170898 + ] + } + }, + "Component_[4564240319609068082]": { + "$type": "EditorEntitySortComponent", + "Id": 4564240319609068082 + }, + "Component_[7827190074535394331]": { + "$type": "EditorMaterialComponent", + "Id": 7827190074535394331, + "Controller": { + "Configuration": { + "materials": [ + { + "Key": { + "materialSlotStableId": 2418540911 + }, + "Value": { + "MaterialAsset": { + "assetId": { + "guid": "{80E0F2A7-1EE4-597F-80EF-985C65BCE2EB}" + }, + "assetHint": "materials/presets/pbr/metal_brass.azmaterial" + } + } + } + ] + } + } + }, + "Component_[8092226976542590265]": { + "$type": "EditorDisabledCompositionComponent", + "Id": 8092226976542590265 + } + } + }, + "Entity_[3700431120340]": { + "Id": "Entity_[3700431120340]", + "Name": "Entity1", + "Components": { + "Component_[11525365929370623807]": { + "$type": "EditorVisibilityComponent", + "Id": 11525365929370623807 + }, + "Component_[12334620273692642550]": { + "$type": "EditorLockComponent", + "Id": 12334620273692642550 + }, + "Component_[14389735759337977675]": { + "$type": "EditorPendingCompositionComponent", + "Id": 14389735759337977675 + }, + "Component_[16184381538555246534]": { + "$type": "AZ::Render::EditorMeshComponent", + "Id": 16184381538555246534, + "Controller": { + "Configuration": { + "ModelAsset": { + "assetId": { + "guid": "{E14975EF-E676-51A4-B826-3EF59CB645AA}", + "subId": 285127096 + }, + "assetHint": "testdata/objects/cube/cube.azmodel" + } + } + } + }, + "Component_[17962478023087084794]": { + "$type": "SelectionComponent", + "Id": 17962478023087084794 + }, + "Component_[18071675051915092508]": { + "$type": "EditorEntityIconComponent", + "Id": 18071675051915092508 + }, + "Component_[2115498007879087044]": { + "$type": "EditorInspectorComponent", + "Id": 2115498007879087044, + "ComponentOrderEntryArray": [ + { + "ComponentId": 399415038452606756 + }, + { + "ComponentId": 16184381538555246534, + "SortIndex": 1 + }, + { + "ComponentId": 7827190074535394331, + "SortIndex": 2 + } + ] + }, + "Component_[3518973002096080237]": { + "$type": "EditorOnlyEntityComponent", + "Id": 3518973002096080237 + }, + "Component_[399415038452606756]": { + "$type": "{27F1E1A1-8D9D-4C3B-BD3A-AFB9762449C0} TransformComponent", + "Id": 399415038452606756, + "Parent Entity": "ContainerEntity", + "Transform Data": { + "Translate": [ + -27.530563354492188, + -0.00018183141946792603, + 24.533506393432617 + ] + } + }, + "Component_[4564240319609068082]": { + "$type": "EditorEntitySortComponent", + "Id": 4564240319609068082 + }, + "Component_[7827190074535394331]": { + "$type": "EditorMaterialComponent", + "Id": 7827190074535394331, + "Controller": { + "Configuration": { + "materials": [ + { + "Key": { + "materialSlotStableId": 2418540911 + }, + "Value": { + "MaterialAsset": { + "assetId": { + "guid": "{E621C5BF-B8E1-55F0-A791-EC960F2FA46F}" + }, + "assetHint": "materials/presets/pbr/metal_copper.azmaterial" + } + } + } + ] + } + } + }, + "Component_[8092226976542590265]": { + "$type": "EditorDisabledCompositionComponent", + "Id": 8092226976542590265 + } + } + }, + "Entity_[3704726087636]": { + "Id": "Entity_[3704726087636]", + "Name": "Entity1", + "Components": { + "Component_[11525365929370623807]": { + "$type": "EditorVisibilityComponent", + "Id": 11525365929370623807 + }, + "Component_[12334620273692642550]": { + "$type": "EditorLockComponent", + "Id": 12334620273692642550 + }, + "Component_[14389735759337977675]": { + "$type": "EditorPendingCompositionComponent", + "Id": 14389735759337977675 + }, + "Component_[16184381538555246534]": { + "$type": "AZ::Render::EditorMeshComponent", + "Id": 16184381538555246534, + "Controller": { + "Configuration": { + "ModelAsset": { + "assetId": { + "guid": "{E14975EF-E676-51A4-B826-3EF59CB645AA}", + "subId": 285127096 + }, + "assetHint": "testdata/objects/cube/cube.azmodel" + } + } + } + }, + "Component_[17962478023087084794]": { + "$type": "SelectionComponent", + "Id": 17962478023087084794 + }, + "Component_[18071675051915092508]": { + "$type": "EditorEntityIconComponent", + "Id": 18071675051915092508 + }, + "Component_[2115498007879087044]": { + "$type": "EditorInspectorComponent", + "Id": 2115498007879087044, + "ComponentOrderEntryArray": [ + { + "ComponentId": 399415038452606756 + }, + { + "ComponentId": 16184381538555246534, + "SortIndex": 1 + }, + { + "ComponentId": 7827190074535394331, + "SortIndex": 2 + } + ] + }, + "Component_[3518973002096080237]": { + "$type": "EditorOnlyEntityComponent", + "Id": 3518973002096080237 + }, + "Component_[399415038452606756]": { + "$type": "{27F1E1A1-8D9D-4C3B-BD3A-AFB9762449C0} TransformComponent", + "Id": 399415038452606756, + "Parent Entity": "ContainerEntity", + "Transform Data": { + "Translate": [ + 47.53014373779297, + -0.00018183141946792603, + 99.43339538574219 + ] + } + }, + "Component_[4564240319609068082]": { + "$type": "EditorEntitySortComponent", + "Id": 4564240319609068082 + }, + "Component_[7827190074535394331]": { + "$type": "EditorMaterialComponent", + "Id": 7827190074535394331, + "Controller": { + "Configuration": { + "materials": [ + { + "Key": { + "materialSlotStableId": 2418540911 + }, + "Value": { + "MaterialAsset": { + "assetId": { + "guid": "{892EA944-0325-5FA6-94D7-4AB4FC02A0F5}" + }, + "assetHint": "materials/presets/pbr/metal_iron.azmaterial" + } + } + } + ] + } + } + }, + "Component_[8092226976542590265]": { + "$type": "EditorDisabledCompositionComponent", + "Id": 8092226976542590265 + } + } + }, + "Entity_[3709021054932]": { + "Id": "Entity_[3709021054932]", + "Name": "Entity1", + "Components": { + "Component_[11525365929370623807]": { + "$type": "EditorVisibilityComponent", + "Id": 11525365929370623807 + }, + "Component_[12334620273692642550]": { + "$type": "EditorLockComponent", + "Id": 12334620273692642550 + }, + "Component_[14389735759337977675]": { + "$type": "EditorPendingCompositionComponent", + "Id": 14389735759337977675 + }, + "Component_[16184381538555246534]": { + "$type": "AZ::Render::EditorMeshComponent", + "Id": 16184381538555246534, + "Controller": { + "Configuration": { + "ModelAsset": { + "assetId": { + "guid": "{E14975EF-E676-51A4-B826-3EF59CB645AA}", + "subId": 285127096 + }, + "assetHint": "testdata/objects/cube/cube.azmodel" + } + } + } + }, + "Component_[17962478023087084794]": { + "$type": "SelectionComponent", + "Id": 17962478023087084794 + }, + "Component_[18071675051915092508]": { + "$type": "EditorEntityIconComponent", + "Id": 18071675051915092508 + }, + "Component_[2115498007879087044]": { + "$type": "EditorInspectorComponent", + "Id": 2115498007879087044, + "ComponentOrderEntryArray": [ + { + "ComponentId": 399415038452606756 + }, + { + "ComponentId": 16184381538555246534, + "SortIndex": 1 + }, + { + "ComponentId": 7827190074535394331, + "SortIndex": 2 + } + ] + }, + "Component_[3518973002096080237]": { + "$type": "EditorOnlyEntityComponent", + "Id": 3518973002096080237 + }, + "Component_[399415038452606756]": { + "$type": "{27F1E1A1-8D9D-4C3B-BD3A-AFB9762449C0} TransformComponent", + "Id": 399415038452606756, + "Parent Entity": "ContainerEntity", + "Transform Data": { + "Translate": [ + 42.53014373779297, + -0.00018183141946792603, + 54.618019104003906 + ] + } + }, + "Component_[4564240319609068082]": { + "$type": "EditorEntitySortComponent", + "Id": 4564240319609068082 + }, + "Component_[7827190074535394331]": { + "$type": "EditorMaterialComponent", + "Id": 7827190074535394331, + "Controller": { + "Configuration": { + "materials": [ + { + "Key": { + "materialSlotStableId": 2418540911 + }, + "Value": { + "MaterialAsset": { + "assetId": { + "guid": "{FE52E7C8-064D-506A-9C26-433EB93747DE}" + }, + "assetHint": "materials/presets/pbr/metal_gold.azmaterial" + } + } + } + ] + } + } + }, + "Component_[8092226976542590265]": { + "$type": "EditorDisabledCompositionComponent", + "Id": 8092226976542590265 + } + } + }, + "Entity_[3713316022228]": { + "Id": "Entity_[3713316022228]", + "Name": "Entity1", + "Components": { + "Component_[11525365929370623807]": { + "$type": "EditorVisibilityComponent", + "Id": 11525365929370623807 + }, + "Component_[12334620273692642550]": { + "$type": "EditorLockComponent", + "Id": 12334620273692642550 + }, + "Component_[14389735759337977675]": { + "$type": "EditorPendingCompositionComponent", + "Id": 14389735759337977675 + }, + "Component_[16184381538555246534]": { + "$type": "AZ::Render::EditorMeshComponent", + "Id": 16184381538555246534, + "Controller": { + "Configuration": { + "ModelAsset": { + "assetId": { + "guid": "{E14975EF-E676-51A4-B826-3EF59CB645AA}", + "subId": 285127096 + }, + "assetHint": "testdata/objects/cube/cube.azmodel" + } + } + } + }, + "Component_[17962478023087084794]": { + "$type": "SelectionComponent", + "Id": 17962478023087084794 + }, + "Component_[18071675051915092508]": { + "$type": "EditorEntityIconComponent", + "Id": 18071675051915092508 + }, + "Component_[2115498007879087044]": { + "$type": "EditorInspectorComponent", + "Id": 2115498007879087044, + "ComponentOrderEntryArray": [ + { + "ComponentId": 399415038452606756 + }, + { + "ComponentId": 16184381538555246534, + "SortIndex": 1 + }, + { + "ComponentId": 7827190074535394331, + "SortIndex": 2 + } + ] + }, + "Component_[3518973002096080237]": { + "$type": "EditorOnlyEntityComponent", + "Id": 3518973002096080237 + }, + "Component_[399415038452606756]": { + "$type": "{27F1E1A1-8D9D-4C3B-BD3A-AFB9762449C0} TransformComponent", + "Id": 399415038452606756, + "Parent Entity": "ContainerEntity", + "Transform Data": { + "Translate": [ + 32.53014373779297, + -0.00018183141946792603, + 45.14218521118164 + ] + } + }, + "Component_[4564240319609068082]": { + "$type": "EditorEntitySortComponent", + "Id": 4564240319609068082 + }, + "Component_[7827190074535394331]": { + "$type": "EditorMaterialComponent", + "Id": 7827190074535394331, + "Controller": { + "Configuration": { + "materials": [ + { + "Key": { + "materialSlotStableId": 2418540911 + }, + "Value": { + "MaterialAsset": { + "assetId": { + "guid": "{93DF55AE-8D1B-5AD1-A609-05F1BD9F6EA0}" + }, + "assetHint": "materials/presets/pbr/metal_cobalt_polished.azmaterial" + } + } + } + ] + } + } + }, + "Component_[8092226976542590265]": { + "$type": "EditorDisabledCompositionComponent", + "Id": 8092226976542590265 + } + } + }, + "Entity_[3717610989524]": { + "Id": "Entity_[3717610989524]", + "Name": "Entity1", + "Components": { + "Component_[11525365929370623807]": { + "$type": "EditorVisibilityComponent", + "Id": 11525365929370623807 + }, + "Component_[12334620273692642550]": { + "$type": "EditorLockComponent", + "Id": 12334620273692642550 + }, + "Component_[14389735759337977675]": { + "$type": "EditorPendingCompositionComponent", + "Id": 14389735759337977675 + }, + "Component_[16184381538555246534]": { + "$type": "AZ::Render::EditorMeshComponent", + "Id": 16184381538555246534, + "Controller": { + "Configuration": { + "ModelAsset": { + "assetId": { + "guid": "{E14975EF-E676-51A4-B826-3EF59CB645AA}", + "subId": 285127096 + }, + "assetHint": "testdata/objects/cube/cube.azmodel" + } + } + } + }, + "Component_[17962478023087084794]": { + "$type": "SelectionComponent", + "Id": 17962478023087084794 + }, + "Component_[18071675051915092508]": { + "$type": "EditorEntityIconComponent", + "Id": 18071675051915092508 + }, + "Component_[2115498007879087044]": { + "$type": "EditorInspectorComponent", + "Id": 2115498007879087044, + "ComponentOrderEntryArray": [ + { + "ComponentId": 399415038452606756 + }, + { + "ComponentId": 16184381538555246534, + "SortIndex": 1 + }, + { + "ComponentId": 7827190074535394331, + "SortIndex": 2 + } + ] + }, + "Component_[3518973002096080237]": { + "$type": "EditorOnlyEntityComponent", + "Id": 3518973002096080237 + }, + "Component_[399415038452606756]": { + "$type": "{27F1E1A1-8D9D-4C3B-BD3A-AFB9762449C0} TransformComponent", + "Id": 399415038452606756, + "Parent Entity": "ContainerEntity", + "Transform Data": { + "Translate": [ + -7.5305633544921875, + -0.00018183141946792603, + 74.93071746826172 + ] + } + }, + "Component_[4564240319609068082]": { + "$type": "EditorEntitySortComponent", + "Id": 4564240319609068082 + }, + "Component_[7827190074535394331]": { + "$type": "EditorMaterialComponent", + "Id": 7827190074535394331, + "Controller": { + "Configuration": { + "materials": [ + { + "Key": { + "materialSlotStableId": 2418540911 + }, + "Value": { + "MaterialAsset": { + "assetId": { + "guid": "{E66E4343-F45A-536D-AAE1-C4D096420640}" + }, + "assetHint": "materials/presets/pbr/metal_nickel_polished.azmaterial" + } + } + } + ] + } + } + }, + "Component_[8092226976542590265]": { + "$type": "EditorDisabledCompositionComponent", + "Id": 8092226976542590265 + } + } + }, + "Entity_[3721905956820]": { + "Id": "Entity_[3721905956820]", + "Name": "Entity1", + "Components": { + "Component_[11525365929370623807]": { + "$type": "EditorVisibilityComponent", + "Id": 11525365929370623807 + }, + "Component_[12334620273692642550]": { + "$type": "EditorLockComponent", + "Id": 12334620273692642550 + }, + "Component_[14389735759337977675]": { + "$type": "EditorPendingCompositionComponent", + "Id": 14389735759337977675 + }, + "Component_[16184381538555246534]": { + "$type": "AZ::Render::EditorMeshComponent", + "Id": 16184381538555246534, + "Controller": { + "Configuration": { + "ModelAsset": { + "assetId": { + "guid": "{E14975EF-E676-51A4-B826-3EF59CB645AA}", + "subId": 285127096 + }, + "assetHint": "testdata/objects/cube/cube.azmodel" + } + } + } + }, + "Component_[17962478023087084794]": { + "$type": "SelectionComponent", + "Id": 17962478023087084794 + }, + "Component_[18071675051915092508]": { + "$type": "EditorEntityIconComponent", + "Id": 18071675051915092508 + }, + "Component_[2115498007879087044]": { + "$type": "EditorInspectorComponent", + "Id": 2115498007879087044, + "ComponentOrderEntryArray": [ + { + "ComponentId": 399415038452606756 + }, + { + "ComponentId": 16184381538555246534, + "SortIndex": 1 + }, + { + "ComponentId": 7827190074535394331, + "SortIndex": 2 + } + ] + }, + "Component_[3518973002096080237]": { + "$type": "EditorOnlyEntityComponent", + "Id": 3518973002096080237 + }, + "Component_[399415038452606756]": { + "$type": "{27F1E1A1-8D9D-4C3B-BD3A-AFB9762449C0} TransformComponent", + "Id": 399415038452606756, + "Parent Entity": "ContainerEntity", + "Transform Data": { + "Translate": [ + 47.53014373779297, + -0.00018183141946792603, + 94.40913391113281 + ] + } + }, + "Component_[4564240319609068082]": { + "$type": "EditorEntitySortComponent", + "Id": 4564240319609068082 + }, + "Component_[7827190074535394331]": { + "$type": "EditorMaterialComponent", + "Id": 7827190074535394331, + "Controller": { + "Configuration": { + "materials": [ + { + "Key": { + "materialSlotStableId": 2418540911 + }, + "Value": { + "MaterialAsset": { + "assetId": { + "guid": "{970148AC-7258-5EC8-9CE7-F4EF93164D93}" + }, + "assetHint": "materials/presets/pbr/metal_iron_matte.azmaterial" + } + } + } + ] + } + } + }, + "Component_[8092226976542590265]": { + "$type": "EditorDisabledCompositionComponent", + "Id": 8092226976542590265 + } + } + }, + "Entity_[3726200924116]": { + "Id": "Entity_[3726200924116]", + "Name": "Entity1", + "Components": { + "Component_[11525365929370623807]": { + "$type": "EditorVisibilityComponent", + "Id": 11525365929370623807 + }, + "Component_[12334620273692642550]": { + "$type": "EditorLockComponent", + "Id": 12334620273692642550 + }, + "Component_[14389735759337977675]": { + "$type": "EditorPendingCompositionComponent", + "Id": 14389735759337977675 + }, + "Component_[16184381538555246534]": { + "$type": "AZ::Render::EditorMeshComponent", + "Id": 16184381538555246534, + "Controller": { + "Configuration": { + "ModelAsset": { + "assetId": { + "guid": "{E14975EF-E676-51A4-B826-3EF59CB645AA}", + "subId": 285127096 + }, + "assetHint": "testdata/objects/cube/cube.azmodel" + } + } + } + }, + "Component_[17962478023087084794]": { + "$type": "SelectionComponent", + "Id": 17962478023087084794 + }, + "Component_[18071675051915092508]": { + "$type": "EditorEntityIconComponent", + "Id": 18071675051915092508 + }, + "Component_[2115498007879087044]": { + "$type": "EditorInspectorComponent", + "Id": 2115498007879087044, + "ComponentOrderEntryArray": [ + { + "ComponentId": 399415038452606756 + }, + { + "ComponentId": 16184381538555246534, + "SortIndex": 1 + }, + { + "ComponentId": 7827190074535394331, + "SortIndex": 2 + } + ] + }, + "Component_[3518973002096080237]": { + "$type": "EditorOnlyEntityComponent", + "Id": 3518973002096080237 + }, + "Component_[399415038452606756]": { + "$type": "{27F1E1A1-8D9D-4C3B-BD3A-AFB9762449C0} TransformComponent", + "Id": 399415038452606756, + "Parent Entity": "ContainerEntity", + "Transform Data": { + "Translate": [ + 42.53014373779297, + -0.00018183141946792603, + 49.593753814697266 + ] + } + }, + "Component_[4564240319609068082]": { + "$type": "EditorEntitySortComponent", + "Id": 4564240319609068082 + }, + "Component_[7827190074535394331]": { + "$type": "EditorMaterialComponent", + "Id": 7827190074535394331, + "Controller": { + "Configuration": { + "materials": [ + { + "Key": { + "materialSlotStableId": 2418540911 + }, + "Value": { + "MaterialAsset": { + "assetId": { + "guid": "{5BC13D95-377E-53EA-9A93-156384BE8B04}" + }, + "assetHint": "materials/presets/pbr/metal_gold_matte.azmaterial" + } + } + } + ] + } + } + }, + "Component_[8092226976542590265]": { + "$type": "EditorDisabledCompositionComponent", + "Id": 8092226976542590265 + } + } + }, + "Entity_[3730495891412]": { + "Id": "Entity_[3730495891412]", + "Name": "Entity1", + "Components": { + "Component_[11525365929370623807]": { + "$type": "EditorVisibilityComponent", + "Id": 11525365929370623807 + }, + "Component_[12334620273692642550]": { + "$type": "EditorLockComponent", + "Id": 12334620273692642550 + }, + "Component_[14389735759337977675]": { + "$type": "EditorPendingCompositionComponent", + "Id": 14389735759337977675 + }, + "Component_[16184381538555246534]": { + "$type": "AZ::Render::EditorMeshComponent", + "Id": 16184381538555246534, + "Controller": { + "Configuration": { + "ModelAsset": { + "assetId": { + "guid": "{E14975EF-E676-51A4-B826-3EF59CB645AA}", + "subId": 285127096 + }, + "assetHint": "testdata/objects/cube/cube.azmodel" + } + } + } + }, + "Component_[17962478023087084794]": { + "$type": "SelectionComponent", + "Id": 17962478023087084794 + }, + "Component_[18071675051915092508]": { + "$type": "EditorEntityIconComponent", + "Id": 18071675051915092508 + }, + "Component_[2115498007879087044]": { + "$type": "EditorInspectorComponent", + "Id": 2115498007879087044, + "ComponentOrderEntryArray": [ + { + "ComponentId": 399415038452606756 + }, + { + "ComponentId": 16184381538555246534, + "SortIndex": 1 + }, + { + "ComponentId": 7827190074535394331, + "SortIndex": 2 + } + ] + }, + "Component_[3518973002096080237]": { + "$type": "EditorOnlyEntityComponent", + "Id": 3518973002096080237 + }, + "Component_[399415038452606756]": { + "$type": "{27F1E1A1-8D9D-4C3B-BD3A-AFB9762449C0} TransformComponent", + "Id": 399415038452606756, + "Parent Entity": "ContainerEntity", + "Transform Data": { + "Translate": [ + -17.530563354492188, + -0.00018183141946792603, + 9.475835800170898 + ] + } + }, + "Component_[4564240319609068082]": { + "$type": "EditorEntitySortComponent", + "Id": 4564240319609068082 + }, + "Component_[7827190074535394331]": { + "$type": "EditorMaterialComponent", + "Id": 7827190074535394331, + "Controller": { + "Configuration": { + "materials": [ + { + "Key": { + "materialSlotStableId": 2418540911 + }, + "Value": { + "MaterialAsset": { + "assetId": { + "guid": "{892EA944-0325-5FA6-94D7-4AB4FC02A0F5}" + }, + "assetHint": "materials/presets/pbr/metal_iron.azmaterial" + } + } + } + ] + } + } + }, + "Component_[8092226976542590265]": { + "$type": "EditorDisabledCompositionComponent", + "Id": 8092226976542590265 + } + } + }, + "Entity_[3734790858708]": { + "Id": "Entity_[3734790858708]", + "Name": "Entity1", + "Components": { + "Component_[11525365929370623807]": { + "$type": "EditorVisibilityComponent", + "Id": 11525365929370623807 + }, + "Component_[12334620273692642550]": { + "$type": "EditorLockComponent", + "Id": 12334620273692642550 + }, + "Component_[14389735759337977675]": { + "$type": "EditorPendingCompositionComponent", + "Id": 14389735759337977675 + }, + "Component_[16184381538555246534]": { + "$type": "AZ::Render::EditorMeshComponent", + "Id": 16184381538555246534, + "Controller": { + "Configuration": { + "ModelAsset": { + "assetId": { + "guid": "{E14975EF-E676-51A4-B826-3EF59CB645AA}", + "subId": 285127096 + }, + "assetHint": "testdata/objects/cube/cube.azmodel" + } + } + } + }, + "Component_[17962478023087084794]": { + "$type": "SelectionComponent", + "Id": 17962478023087084794 + }, + "Component_[18071675051915092508]": { + "$type": "EditorEntityIconComponent", + "Id": 18071675051915092508 + }, + "Component_[2115498007879087044]": { + "$type": "EditorInspectorComponent", + "Id": 2115498007879087044, + "ComponentOrderEntryArray": [ + { + "ComponentId": 399415038452606756 + }, + { + "ComponentId": 16184381538555246534, + "SortIndex": 1 + }, + { + "ComponentId": 7827190074535394331, + "SortIndex": 2 + } + ] + }, + "Component_[3518973002096080237]": { + "$type": "EditorOnlyEntityComponent", + "Id": 3518973002096080237 + }, + "Component_[399415038452606756]": { + "$type": "{27F1E1A1-8D9D-4C3B-BD3A-AFB9762449C0} TransformComponent", + "Id": 399415038452606756, + "Parent Entity": "ContainerEntity", + "Transform Data": { + "Translate": [ + -7.5305633544921875, + -0.00018183141946792603, + 30.08451271057129 + ] + } + }, + "Component_[4564240319609068082]": { + "$type": "EditorEntitySortComponent", + "Id": 4564240319609068082 + }, + "Component_[7827190074535394331]": { + "$type": "EditorMaterialComponent", + "Id": 7827190074535394331, + "Controller": { + "Configuration": { + "materials": [ + { + "Key": { + "materialSlotStableId": 2418540911 + }, + "Value": { + "MaterialAsset": { + "assetId": { + "guid": "{E66E4343-F45A-536D-AAE1-C4D096420640}" + }, + "assetHint": "materials/presets/pbr/metal_nickel_polished.azmaterial" + } + } + } + ] + } + } + }, + "Component_[8092226976542590265]": { + "$type": "EditorDisabledCompositionComponent", + "Id": 8092226976542590265 + } + } + }, + "Entity_[3739085826004]": { + "Id": "Entity_[3739085826004]", + "Name": "Entity1", + "Components": { + "Component_[11525365929370623807]": { + "$type": "EditorVisibilityComponent", + "Id": 11525365929370623807 + }, + "Component_[12334620273692642550]": { + "$type": "EditorLockComponent", + "Id": 12334620273692642550 + }, + "Component_[14389735759337977675]": { + "$type": "EditorPendingCompositionComponent", + "Id": 14389735759337977675 + }, + "Component_[16184381538555246534]": { + "$type": "AZ::Render::EditorMeshComponent", + "Id": 16184381538555246534, + "Controller": { + "Configuration": { + "ModelAsset": { + "assetId": { + "guid": "{E14975EF-E676-51A4-B826-3EF59CB645AA}", + "subId": 285127096 + }, + "assetHint": "testdata/objects/cube/cube.azmodel" + } + } + } + }, + "Component_[17962478023087084794]": { + "$type": "SelectionComponent", + "Id": 17962478023087084794 + }, + "Component_[18071675051915092508]": { + "$type": "EditorEntityIconComponent", + "Id": 18071675051915092508 + }, + "Component_[2115498007879087044]": { + "$type": "EditorInspectorComponent", + "Id": 2115498007879087044, + "ComponentOrderEntryArray": [ + { + "ComponentId": 399415038452606756 + }, + { + "ComponentId": 16184381538555246534, + "SortIndex": 1 + }, + { + "ComponentId": 7827190074535394331, + "SortIndex": 2 + } + ] + }, + "Component_[3518973002096080237]": { + "$type": "EditorOnlyEntityComponent", + "Id": 3518973002096080237 + }, + "Component_[399415038452606756]": { + "$type": "{27F1E1A1-8D9D-4C3B-BD3A-AFB9762449C0} TransformComponent", + "Id": 399415038452606756, + "Parent Entity": "ContainerEntity", + "Transform Data": { + "Translate": [ + -22.530563354492188, + -0.00018183141946792603, + 4.451573371887207 + ] + } + }, + "Component_[4564240319609068082]": { + "$type": "EditorEntitySortComponent", + "Id": 4564240319609068082 + }, + "Component_[7827190074535394331]": { + "$type": "EditorMaterialComponent", + "Id": 7827190074535394331, + "Controller": { + "Configuration": { + "materials": [ + { + "Key": { + "materialSlotStableId": 2418540911 + }, + "Value": { + "MaterialAsset": { + "assetId": { + "guid": "{5BC13D95-377E-53EA-9A93-156384BE8B04}" + }, + "assetHint": "materials/presets/pbr/metal_gold_matte.azmaterial" + } + } + } + ] + } + } + }, + "Component_[8092226976542590265]": { + "$type": "EditorDisabledCompositionComponent", + "Id": 8092226976542590265 + } + } + }, + "Entity_[3743380793300]": { + "Id": "Entity_[3743380793300]", + "Name": "Entity1", + "Components": { + "Component_[11525365929370623807]": { + "$type": "EditorVisibilityComponent", + "Id": 11525365929370623807 + }, + "Component_[12334620273692642550]": { + "$type": "EditorLockComponent", + "Id": 12334620273692642550 + }, + "Component_[14389735759337977675]": { + "$type": "EditorPendingCompositionComponent", + "Id": 14389735759337977675 + }, + "Component_[16184381538555246534]": { + "$type": "AZ::Render::EditorMeshComponent", + "Id": 16184381538555246534, + "Controller": { + "Configuration": { + "ModelAsset": { + "assetId": { + "guid": "{E14975EF-E676-51A4-B826-3EF59CB645AA}", + "subId": 285127096 + }, + "assetHint": "testdata/objects/cube/cube.azmodel" + } + } + } + }, + "Component_[17962478023087084794]": { + "$type": "SelectionComponent", + "Id": 17962478023087084794 + }, + "Component_[18071675051915092508]": { + "$type": "EditorEntityIconComponent", + "Id": 18071675051915092508 + }, + "Component_[2115498007879087044]": { + "$type": "EditorInspectorComponent", + "Id": 2115498007879087044, + "ComponentOrderEntryArray": [ + { + "ComponentId": 399415038452606756 + }, + { + "ComponentId": 16184381538555246534, + "SortIndex": 1 + }, + { + "ComponentId": 7827190074535394331, + "SortIndex": 2 + } + ] + }, + "Component_[3518973002096080237]": { + "$type": "EditorOnlyEntityComponent", + "Id": 3518973002096080237 + }, + "Component_[399415038452606756]": { + "$type": "{27F1E1A1-8D9D-4C3B-BD3A-AFB9762449C0} TransformComponent", + "Id": 399415038452606756, + "Parent Entity": "ContainerEntity", + "Transform Data": { + "Translate": [ + 27.53014373779297, + -0.00018183141946792603, + 0.0 + ] + } + }, + "Component_[4564240319609068082]": { + "$type": "EditorEntitySortComponent", + "Id": 4564240319609068082 + }, + "Component_[7827190074535394331]": { + "$type": "EditorMaterialComponent", + "Id": 7827190074535394331, + "Controller": { + "Configuration": { + "materials": [ + { + "Key": { + "materialSlotStableId": 2418540911 + }, + "Value": { + "MaterialAsset": { + "assetId": { + "guid": "{CAF50181-3384-5DF2-9304-C6E48E83C72D}" + }, + "assetHint": "materials/presets/pbr/metal_chrome_polished.azmaterial" + } + } + } + ] + } + } + }, + "Component_[8092226976542590265]": { + "$type": "EditorDisabledCompositionComponent", + "Id": 8092226976542590265 + } + } + }, + "Entity_[3747675760596]": { + "Id": "Entity_[3747675760596]", + "Name": "Entity1", + "Components": { + "Component_[1057179753323467068]": { + "$type": "EditorMaterialComponent", + "Id": 1057179753323467068, + "Controller": { + "Configuration": { + "materials": [ + { + "Key": { + "materialSlotStableId": 2418540911 + }, + "Value": { + "MaterialAsset": { + "assetId": { + "guid": "{721188E0-B7CC-5D06-8D5D-39AF8ABF2EF9}" + }, + "assetHint": "materials/presets/pbr/metal_titanium.azmaterial" + } + } + } + ] + } + } + }, + "Component_[11525365929370623807]": { + "$type": "EditorVisibilityComponent", + "Id": 11525365929370623807 + }, + "Component_[12334620273692642550]": { + "$type": "EditorLockComponent", + "Id": 12334620273692642550 + }, + "Component_[14389735759337977675]": { + "$type": "EditorPendingCompositionComponent", + "Id": 14389735759337977675 + }, + "Component_[16184381538555246534]": { + "$type": "AZ::Render::EditorMeshComponent", + "Id": 16184381538555246534, + "Controller": { + "Configuration": { + "ModelAsset": { + "assetId": { + "guid": "{E14975EF-E676-51A4-B826-3EF59CB645AA}", + "subId": 285127096 + }, + "assetHint": "testdata/objects/cube/cube.azmodel" + } + } + } + }, + "Component_[17962478023087084794]": { + "$type": "SelectionComponent", + "Id": 17962478023087084794 + }, + "Component_[18071675051915092508]": { + "$type": "EditorEntityIconComponent", + "Id": 18071675051915092508 + }, + "Component_[2115498007879087044]": { + "$type": "EditorInspectorComponent", + "Id": 2115498007879087044, + "ComponentOrderEntryArray": [ + { + "ComponentId": 399415038452606756 + }, + { + "ComponentId": 16184381538555246534, + "SortIndex": 1 + }, + { + "ComponentId": 1057179753323467068, + "SortIndex": 2 + } + ] + }, + "Component_[3518973002096080237]": { + "$type": "EditorOnlyEntityComponent", + "Id": 3518973002096080237 + }, + "Component_[399415038452606756]": { + "$type": "{27F1E1A1-8D9D-4C3B-BD3A-AFB9762449C0} TransformComponent", + "Id": 399415038452606756, + "Parent Entity": "ContainerEntity", + "Transform Data": { + "Translate": [ + 12.530143737792969, + -0.00018183141946792603, + 99.43339538574219 + ] + } + }, + "Component_[4564240319609068082]": { + "$type": "EditorEntitySortComponent", + "Id": 4564240319609068082 + }, + "Component_[8092226976542590265]": { + "$type": "EditorDisabledCompositionComponent", + "Id": 8092226976542590265 + } + } + }, + "Entity_[3751970727892]": { + "Id": "Entity_[3751970727892]", + "Name": "Entity1", + "Components": { + "Component_[11525365929370623807]": { + "$type": "EditorVisibilityComponent", + "Id": 11525365929370623807 + }, + "Component_[12334620273692642550]": { + "$type": "EditorLockComponent", + "Id": 12334620273692642550 + }, + "Component_[14389735759337977675]": { + "$type": "EditorPendingCompositionComponent", + "Id": 14389735759337977675 + }, + "Component_[16184381538555246534]": { + "$type": "AZ::Render::EditorMeshComponent", + "Id": 16184381538555246534, + "Controller": { + "Configuration": { + "ModelAsset": { + "assetId": { + "guid": "{E14975EF-E676-51A4-B826-3EF59CB645AA}", + "subId": 285127096 + }, + "assetHint": "testdata/objects/cube/cube.azmodel" + } + } + } + }, + "Component_[17962478023087084794]": { + "$type": "SelectionComponent", + "Id": 17962478023087084794 + }, + "Component_[18071675051915092508]": { + "$type": "EditorEntityIconComponent", + "Id": 18071675051915092508 + }, + "Component_[2115498007879087044]": { + "$type": "EditorInspectorComponent", + "Id": 2115498007879087044, + "ComponentOrderEntryArray": [ + { + "ComponentId": 399415038452606756 + }, + { + "ComponentId": 16184381538555246534, + "SortIndex": 1 + }, + { + "ComponentId": 7827190074535394331, + "SortIndex": 2 + } + ] + }, + "Component_[3518973002096080237]": { + "$type": "EditorOnlyEntityComponent", + "Id": 3518973002096080237 + }, + "Component_[399415038452606756]": { + "$type": "{27F1E1A1-8D9D-4C3B-BD3A-AFB9762449C0} TransformComponent", + "Id": 399415038452606756, + "Parent Entity": "ContainerEntity", + "Transform Data": { + "Translate": [ + -2.5305633544921875, + -0.00018183141946792603, + 69.34888458251953 + ] + } + }, + "Component_[4564240319609068082]": { + "$type": "EditorEntitySortComponent", + "Id": 4564240319609068082 + }, + "Component_[7827190074535394331]": { + "$type": "EditorMaterialComponent", + "Id": 7827190074535394331, + "Controller": { + "Configuration": { + "materials": [ + { + "Key": { + "materialSlotStableId": 2418540911 + }, + "Value": { + "MaterialAsset": { + "assetId": { + "guid": "{DC0598ED-1EDD-5B37-892E-E0867621D74C}" + }, + "assetHint": "materials/presets/pbr/metal_palladium.azmaterial" + } + } + } + ] + } + } + }, + "Component_[8092226976542590265]": { + "$type": "EditorDisabledCompositionComponent", + "Id": 8092226976542590265 + } + } + }, + "Entity_[3756265695188]": { + "Id": "Entity_[3756265695188]", + "Name": "Entity1", + "Components": { + "Component_[11525365929370623807]": { + "$type": "EditorVisibilityComponent", + "Id": 11525365929370623807 + }, + "Component_[12334620273692642550]": { + "$type": "EditorLockComponent", + "Id": 12334620273692642550 + }, + "Component_[14389735759337977675]": { + "$type": "EditorPendingCompositionComponent", + "Id": 14389735759337977675 + }, + "Component_[16184381538555246534]": { + "$type": "AZ::Render::EditorMeshComponent", + "Id": 16184381538555246534, + "Controller": { + "Configuration": { + "ModelAsset": { + "assetId": { + "guid": "{E14975EF-E676-51A4-B826-3EF59CB645AA}", + "subId": 285127096 + }, + "assetHint": "testdata/objects/cube/cube.azmodel" + } + } + } + }, + "Component_[17962478023087084794]": { + "$type": "SelectionComponent", + "Id": 17962478023087084794 + }, + "Component_[18071675051915092508]": { + "$type": "EditorEntityIconComponent", + "Id": 18071675051915092508 + }, + "Component_[2115498007879087044]": { + "$type": "EditorInspectorComponent", + "Id": 2115498007879087044, + "ComponentOrderEntryArray": [ + { + "ComponentId": 399415038452606756 + }, + { + "ComponentId": 16184381538555246534, + "SortIndex": 1 + }, + { + "ComponentId": 7827190074535394331, + "SortIndex": 2 + } + ] + }, + "Component_[3518973002096080237]": { + "$type": "EditorOnlyEntityComponent", + "Id": 3518973002096080237 + }, + "Component_[399415038452606756]": { + "$type": "{27F1E1A1-8D9D-4C3B-BD3A-AFB9762449C0} TransformComponent", + "Id": 399415038452606756, + "Parent Entity": "ContainerEntity", + "Transform Data": { + "Translate": [ + 32.53014373779297, + -0.00018183141946792603, + 94.40913391113281 + ] + } + }, + "Component_[4564240319609068082]": { + "$type": "EditorEntitySortComponent", + "Id": 4564240319609068082 + }, + "Component_[7827190074535394331]": { + "$type": "EditorMaterialComponent", + "Id": 7827190074535394331, + "Controller": { + "Configuration": { + "materials": [ + { + "Key": { + "materialSlotStableId": 2418540911 + }, + "Value": { + "MaterialAsset": { + "assetId": { + "guid": "{C60A39AF-BB76-51BD-9468-A88C9A6F78D7}" + }, + "assetHint": "materials/presets/pbr/metal_cobalt_matte.azmaterial" + } + } + } + ] + } + } + }, + "Component_[8092226976542590265]": { + "$type": "EditorDisabledCompositionComponent", + "Id": 8092226976542590265 + } + } + }, + "Entity_[3760560662484]": { + "Id": "Entity_[3760560662484]", + "Name": "Entity1", + "Components": { + "Component_[11525365929370623807]": { + "$type": "EditorVisibilityComponent", + "Id": 11525365929370623807 + }, + "Component_[12334620273692642550]": { + "$type": "EditorLockComponent", + "Id": 12334620273692642550 + }, + "Component_[14389735759337977675]": { + "$type": "EditorPendingCompositionComponent", + "Id": 14389735759337977675 + }, + "Component_[16184381538555246534]": { + "$type": "AZ::Render::EditorMeshComponent", + "Id": 16184381538555246534, + "Controller": { + "Configuration": { + "ModelAsset": { + "assetId": { + "guid": "{E14975EF-E676-51A4-B826-3EF59CB645AA}", + "subId": 285127096 + }, + "assetHint": "testdata/objects/cube/cube.azmodel" + } + } + } + }, + "Component_[17962478023087084794]": { + "$type": "SelectionComponent", + "Id": 17962478023087084794 + }, + "Component_[18071675051915092508]": { + "$type": "EditorEntityIconComponent", + "Id": 18071675051915092508 + }, + "Component_[2115498007879087044]": { + "$type": "EditorInspectorComponent", + "Id": 2115498007879087044, + "ComponentOrderEntryArray": [ + { + "ComponentId": 399415038452606756 + }, + { + "ComponentId": 16184381538555246534, + "SortIndex": 1 + }, + { + "ComponentId": 7827190074535394331, + "SortIndex": 2 + } + ] + }, + "Component_[3518973002096080237]": { + "$type": "EditorOnlyEntityComponent", + "Id": 3518973002096080237 + }, + "Component_[399415038452606756]": { + "$type": "{27F1E1A1-8D9D-4C3B-BD3A-AFB9762449C0} TransformComponent", + "Id": 399415038452606756, + "Parent Entity": "ContainerEntity", + "Transform Data": { + "Translate": [ + 2.5301437377929688, + -0.00018183141946792603, + 59.873046875 + ] + } + }, + "Component_[4564240319609068082]": { + "$type": "EditorEntitySortComponent", + "Id": 4564240319609068082 + }, + "Component_[7827190074535394331]": { + "$type": "EditorMaterialComponent", + "Id": 7827190074535394331, + "Controller": { + "Configuration": { + "materials": [ + { + "Key": { + "materialSlotStableId": 2418540911 + }, + "Value": { + "MaterialAsset": { + "assetId": { + "guid": "{79419183-FFCE-5A89-AA16-C2789D81AF75}" + }, + "assetHint": "materials/presets/pbr/metal_platinum_polished.azmaterial" + } + } + } + ] + } + } + }, + "Component_[8092226976542590265]": { + "$type": "EditorDisabledCompositionComponent", + "Id": 8092226976542590265 + } + } + }, + "Entity_[3764855629780]": { + "Id": "Entity_[3764855629780]", + "Name": "Entity1", + "Components": { + "Component_[11525365929370623807]": { + "$type": "EditorVisibilityComponent", + "Id": 11525365929370623807 + }, + "Component_[12334620273692642550]": { + "$type": "EditorLockComponent", + "Id": 12334620273692642550 + }, + "Component_[14389735759337977675]": { + "$type": "EditorPendingCompositionComponent", + "Id": 14389735759337977675 + }, + "Component_[16184381538555246534]": { + "$type": "AZ::Render::EditorMeshComponent", + "Id": 16184381538555246534, + "Controller": { + "Configuration": { + "ModelAsset": { + "assetId": { + "guid": "{E14975EF-E676-51A4-B826-3EF59CB645AA}", + "subId": 285127096 + }, + "assetHint": "testdata/objects/cube/cube.azmodel" + } + } + } + }, + "Component_[17962478023087084794]": { + "$type": "SelectionComponent", + "Id": 17962478023087084794 + }, + "Component_[18071675051915092508]": { + "$type": "EditorEntityIconComponent", + "Id": 18071675051915092508 + }, + "Component_[2115498007879087044]": { + "$type": "EditorInspectorComponent", + "Id": 2115498007879087044, + "ComponentOrderEntryArray": [ + { + "ComponentId": 399415038452606756 + }, + { + "ComponentId": 16184381538555246534, + "SortIndex": 1 + }, + { + "ComponentId": 7827190074535394331, + "SortIndex": 2 + } + ] + }, + "Component_[3518973002096080237]": { + "$type": "EditorOnlyEntityComponent", + "Id": 3518973002096080237 + }, + "Component_[399415038452606756]": { + "$type": "{27F1E1A1-8D9D-4C3B-BD3A-AFB9762449C0} TransformComponent", + "Id": 399415038452606756, + "Parent Entity": "ContainerEntity", + "Transform Data": { + "Translate": [ + -32.53056335449219, + -0.00018183141946792603, + 39.56034851074219 + ] + } + }, + "Component_[4564240319609068082]": { + "$type": "EditorEntitySortComponent", + "Id": 4564240319609068082 + }, + "Component_[7827190074535394331]": { + "$type": "EditorMaterialComponent", + "Id": 7827190074535394331, + "Controller": { + "Configuration": { + "materials": [ + { + "Key": { + "materialSlotStableId": 2418540911 + }, + "Value": { + "MaterialAsset": { + "assetId": { + "guid": "{99976D73-6248-5D66-AD15-E8F52B0AFE36}" + }, + "assetHint": "materials/presets/pbr/metal_cobalt.azmaterial" + } + } + } + ] + } + } + }, + "Component_[8092226976542590265]": { + "$type": "EditorDisabledCompositionComponent", + "Id": 8092226976542590265 + } + } + }, + "Entity_[3769150597076]": { + "Id": "Entity_[3769150597076]", + "Name": "Entity1", + "Components": { + "Component_[11525365929370623807]": { + "$type": "EditorVisibilityComponent", + "Id": 11525365929370623807 + }, + "Component_[12334620273692642550]": { + "$type": "EditorLockComponent", + "Id": 12334620273692642550 + }, + "Component_[14389735759337977675]": { + "$type": "EditorPendingCompositionComponent", + "Id": 14389735759337977675 + }, + "Component_[16184381538555246534]": { + "$type": "AZ::Render::EditorMeshComponent", + "Id": 16184381538555246534, + "Controller": { + "Configuration": { + "ModelAsset": { + "assetId": { + "guid": "{E14975EF-E676-51A4-B826-3EF59CB645AA}", + "subId": 285127096 + }, + "assetHint": "testdata/objects/cube/cube.azmodel" + } + } + } + }, + "Component_[17962478023087084794]": { + "$type": "SelectionComponent", + "Id": 17962478023087084794 + }, + "Component_[18071675051915092508]": { + "$type": "EditorEntityIconComponent", + "Id": 18071675051915092508 + }, + "Component_[2115498007879087044]": { + "$type": "EditorInspectorComponent", + "Id": 2115498007879087044, + "ComponentOrderEntryArray": [ + { + "ComponentId": 399415038452606756 + }, + { + "ComponentId": 16184381538555246534, + "SortIndex": 1 + }, + { + "ComponentId": 7827190074535394331, + "SortIndex": 2 + } + ] + }, + "Component_[3518973002096080237]": { + "$type": "EditorOnlyEntityComponent", + "Id": 3518973002096080237 + }, + "Component_[399415038452606756]": { + "$type": "{27F1E1A1-8D9D-4C3B-BD3A-AFB9762449C0} TransformComponent", + "Id": 399415038452606756, + "Parent Entity": "ContainerEntity", + "Transform Data": { + "Translate": [ + 7.530143737792969, + -0.00018183141946792603, + 69.34888458251953 + ] + } + }, + "Component_[4564240319609068082]": { + "$type": "EditorEntitySortComponent", + "Id": 4564240319609068082 + }, + "Component_[7827190074535394331]": { + "$type": "EditorMaterialComponent", + "Id": 7827190074535394331, + "Controller": { + "Configuration": { + "materials": [ + { + "Key": { + "materialSlotStableId": 2418540911 + }, + "Value": { + "MaterialAsset": { + "assetId": { + "guid": "{CDA13277-5EAB-5E2A-93F5-B7003597FBCE}" + }, + "assetHint": "materials/presets/pbr/metal_silver.azmaterial" + } + } + } + ] + } + } + }, + "Component_[8092226976542590265]": { + "$type": "EditorDisabledCompositionComponent", + "Id": 8092226976542590265 + } + } + }, + "Entity_[3773445564372]": { + "Id": "Entity_[3773445564372]", + "Name": "Entity1", + "Components": { + "Component_[11525365929370623807]": { + "$type": "EditorVisibilityComponent", + "Id": 11525365929370623807 + }, + "Component_[12334620273692642550]": { + "$type": "EditorLockComponent", + "Id": 12334620273692642550 + }, + "Component_[14389735759337977675]": { + "$type": "EditorPendingCompositionComponent", + "Id": 14389735759337977675 + }, + "Component_[16184381538555246534]": { + "$type": "AZ::Render::EditorMeshComponent", + "Id": 16184381538555246534, + "Controller": { + "Configuration": { + "ModelAsset": { + "assetId": { + "guid": "{E14975EF-E676-51A4-B826-3EF59CB645AA}", + "subId": 285127096 + }, + "assetHint": "testdata/objects/cube/cube.azmodel" + } + } + } + }, + "Component_[17962478023087084794]": { + "$type": "SelectionComponent", + "Id": 17962478023087084794 + }, + "Component_[18071675051915092508]": { + "$type": "EditorEntityIconComponent", + "Id": 18071675051915092508 + }, + "Component_[2115498007879087044]": { + "$type": "EditorInspectorComponent", + "Id": 2115498007879087044, + "ComponentOrderEntryArray": [ + { + "ComponentId": 399415038452606756 + }, + { + "ComponentId": 16184381538555246534, + "SortIndex": 1 + }, + { + "ComponentId": 7827190074535394331, + "SortIndex": 2 + } + ] + }, + "Component_[3518973002096080237]": { + "$type": "EditorOnlyEntityComponent", + "Id": 3518973002096080237 + }, + "Component_[399415038452606756]": { + "$type": "{27F1E1A1-8D9D-4C3B-BD3A-AFB9762449C0} TransformComponent", + "Id": 399415038452606756, + "Parent Entity": "ContainerEntity", + "Transform Data": { + "Translate": [ + 37.53014373779297, + -0.00018183141946792603, + 45.14218521118164 + ] + } + }, + "Component_[4564240319609068082]": { + "$type": "EditorEntitySortComponent", + "Id": 4564240319609068082 + }, + "Component_[7827190074535394331]": { + "$type": "EditorMaterialComponent", + "Id": 7827190074535394331, + "Controller": { + "Configuration": { + "materials": [ + { + "Key": { + "materialSlotStableId": 2418540911 + }, + "Value": { + "MaterialAsset": { + "assetId": { + "guid": "{CF5C7B01-4912-58AE-991A-F25251E505AC}" + }, + "assetHint": "materials/presets/pbr/metal_copper_polished.azmaterial" + } + } + } + ] + } + } + }, + "Component_[8092226976542590265]": { + "$type": "EditorDisabledCompositionComponent", + "Id": 8092226976542590265 + } + } + }, + "Entity_[3777740531668]": { + "Id": "Entity_[3777740531668]", + "Name": "Entity1", + "Components": { + "Component_[11525365929370623807]": { + "$type": "EditorVisibilityComponent", + "Id": 11525365929370623807 + }, + "Component_[12334620273692642550]": { + "$type": "EditorLockComponent", + "Id": 12334620273692642550 + }, + "Component_[14389735759337977675]": { + "$type": "EditorPendingCompositionComponent", + "Id": 14389735759337977675 + }, + "Component_[16184381538555246534]": { + "$type": "AZ::Render::EditorMeshComponent", + "Id": 16184381538555246534, + "Controller": { + "Configuration": { + "ModelAsset": { + "assetId": { + "guid": "{E14975EF-E676-51A4-B826-3EF59CB645AA}", + "subId": 285127096 + }, + "assetHint": "testdata/objects/cube/cube.azmodel" + } + } + } + }, + "Component_[17962478023087084794]": { + "$type": "SelectionComponent", + "Id": 17962478023087084794 + }, + "Component_[18071675051915092508]": { + "$type": "EditorEntityIconComponent", + "Id": 18071675051915092508 + }, + "Component_[2115498007879087044]": { + "$type": "EditorInspectorComponent", + "Id": 2115498007879087044, + "ComponentOrderEntryArray": [ + { + "ComponentId": 399415038452606756 + }, + { + "ComponentId": 16184381538555246534, + "SortIndex": 1 + }, + { + "ComponentId": 7827190074535394331, + "SortIndex": 2 + } + ] + }, + "Component_[3518973002096080237]": { + "$type": "EditorOnlyEntityComponent", + "Id": 3518973002096080237 + }, + "Component_[399415038452606756]": { + "$type": "{27F1E1A1-8D9D-4C3B-BD3A-AFB9762449C0} TransformComponent", + "Id": 399415038452606756, + "Parent Entity": "ContainerEntity", + "Transform Data": { + "Translate": [ + -37.53056335449219, + -0.00018183141946792603, + 105.0152359008789 + ] + } + }, + "Component_[4564240319609068082]": { + "$type": "EditorEntitySortComponent", + "Id": 4564240319609068082 + }, + "Component_[7827190074535394331]": { + "$type": "EditorMaterialComponent", + "Id": 7827190074535394331, + "Controller": { + "Configuration": { + "materials": [ + { + "Key": { + "materialSlotStableId": 2418540911 + }, + "Value": { + "MaterialAsset": { + "assetId": { + "guid": "{CAF50181-3384-5DF2-9304-C6E48E83C72D}" + }, + "assetHint": "materials/presets/pbr/metal_chrome_polished.azmaterial" + } + } + } + ] + } + } + }, + "Component_[8092226976542590265]": { + "$type": "EditorDisabledCompositionComponent", + "Id": 8092226976542590265 + } + } + }, + "Entity_[3782035498964]": { + "Id": "Entity_[3782035498964]", + "Name": "Entity1", + "Components": { + "Component_[11525365929370623807]": { + "$type": "EditorVisibilityComponent", + "Id": 11525365929370623807 + }, + "Component_[12334620273692642550]": { + "$type": "EditorLockComponent", + "Id": 12334620273692642550 + }, + "Component_[14389735759337977675]": { + "$type": "EditorPendingCompositionComponent", + "Id": 14389735759337977675 + }, + "Component_[16184381538555246534]": { + "$type": "AZ::Render::EditorMeshComponent", + "Id": 16184381538555246534, + "Controller": { + "Configuration": { + "ModelAsset": { + "assetId": { + "guid": "{E14975EF-E676-51A4-B826-3EF59CB645AA}", + "subId": 285127096 + }, + "assetHint": "testdata/objects/cube/cube.azmodel" + } + } + } + }, + "Component_[17962478023087084794]": { + "$type": "SelectionComponent", + "Id": 17962478023087084794 + }, + "Component_[18071675051915092508]": { + "$type": "EditorEntityIconComponent", + "Id": 18071675051915092508 + }, + "Component_[2115498007879087044]": { + "$type": "EditorInspectorComponent", + "Id": 2115498007879087044, + "ComponentOrderEntryArray": [ + { + "ComponentId": 399415038452606756 + }, + { + "ComponentId": 16184381538555246534, + "SortIndex": 1 + }, + { + "ComponentId": 7827190074535394331, + "SortIndex": 2 + } + ] + }, + "Component_[3518973002096080237]": { + "$type": "EditorOnlyEntityComponent", + "Id": 3518973002096080237 + }, + "Component_[399415038452606756]": { + "$type": "{27F1E1A1-8D9D-4C3B-BD3A-AFB9762449C0} TransformComponent", + "Id": 399415038452606756, + "Parent Entity": "ContainerEntity", + "Transform Data": { + "Translate": [ + 27.53014373779297, + -0.00018183141946792603, + 34.53608703613281 + ] + } + }, + "Component_[4564240319609068082]": { + "$type": "EditorEntitySortComponent", + "Id": 4564240319609068082 + }, + "Component_[7827190074535394331]": { + "$type": "EditorMaterialComponent", + "Id": 7827190074535394331, + "Controller": { + "Configuration": { + "materials": [ + { + "Key": { + "materialSlotStableId": 2418540911 + }, + "Value": { + "MaterialAsset": { + "assetId": { + "guid": "{A78EA2FC-688B-5E3A-A7F6-DB413D11D4CF}" + }, + "assetHint": "materials/presets/pbr/metal_chrome_matte.azmaterial" + } + } + } + ] + } + } + }, + "Component_[8092226976542590265]": { + "$type": "EditorDisabledCompositionComponent", + "Id": 8092226976542590265 + } + } + }, + "Entity_[3786330466260]": { + "Id": "Entity_[3786330466260]", + "Name": "Entity1", + "Components": { + "Component_[11525365929370623807]": { + "$type": "EditorVisibilityComponent", + "Id": 11525365929370623807 + }, + "Component_[12334620273692642550]": { + "$type": "EditorLockComponent", + "Id": 12334620273692642550 + }, + "Component_[14389735759337977675]": { + "$type": "EditorPendingCompositionComponent", + "Id": 14389735759337977675 + }, + "Component_[16184381538555246534]": { + "$type": "AZ::Render::EditorMeshComponent", + "Id": 16184381538555246534, + "Controller": { + "Configuration": { + "ModelAsset": { + "assetId": { + "guid": "{E14975EF-E676-51A4-B826-3EF59CB645AA}", + "subId": 285127096 + }, + "assetHint": "testdata/objects/cube/cube.azmodel" + } + } + } + }, + "Component_[17962478023087084794]": { + "$type": "SelectionComponent", + "Id": 17962478023087084794 + }, + "Component_[18071675051915092508]": { + "$type": "EditorEntityIconComponent", + "Id": 18071675051915092508 + }, + "Component_[2115498007879087044]": { + "$type": "EditorInspectorComponent", + "Id": 2115498007879087044, + "ComponentOrderEntryArray": [ + { + "ComponentId": 399415038452606756 + }, + { + "ComponentId": 16184381538555246534, + "SortIndex": 1 + }, + { + "ComponentId": 7827190074535394331, + "SortIndex": 2 + } + ] + }, + "Component_[3518973002096080237]": { + "$type": "EditorOnlyEntityComponent", + "Id": 3518973002096080237 + }, + "Component_[399415038452606756]": { + "$type": "{27F1E1A1-8D9D-4C3B-BD3A-AFB9762449C0} TransformComponent", + "Id": 399415038452606756, + "Parent Entity": "ContainerEntity", + "Transform Data": { + "Translate": [ + 42.53014373779297, + -0.00018183141946792603, + 54.618019104003906 + ] + } + }, + "Component_[4564240319609068082]": { + "$type": "EditorEntitySortComponent", + "Id": 4564240319609068082 + }, + "Component_[7827190074535394331]": { + "$type": "EditorMaterialComponent", + "Id": 7827190074535394331, + "Controller": { + "Configuration": { + "materials": [ + { + "Key": { + "materialSlotStableId": 2418540911 + }, + "Value": { + "MaterialAsset": { + "assetId": { + "guid": "{FE52E7C8-064D-506A-9C26-433EB93747DE}" + }, + "assetHint": "materials/presets/pbr/metal_gold.azmaterial" + } + } + } + ] + } + } + }, + "Component_[8092226976542590265]": { + "$type": "EditorDisabledCompositionComponent", + "Id": 8092226976542590265 + } + } + }, + "Entity_[3790625433556]": { + "Id": "Entity_[3790625433556]", + "Name": "Entity1", + "Components": { + "Component_[11525365929370623807]": { + "$type": "EditorVisibilityComponent", + "Id": 11525365929370623807 + }, + "Component_[12334620273692642550]": { + "$type": "EditorLockComponent", + "Id": 12334620273692642550 + }, + "Component_[14389735759337977675]": { + "$type": "EditorPendingCompositionComponent", + "Id": 14389735759337977675 + }, + "Component_[16184381538555246534]": { + "$type": "AZ::Render::EditorMeshComponent", + "Id": 16184381538555246534, + "Controller": { + "Configuration": { + "ModelAsset": { + "assetId": { + "guid": "{E14975EF-E676-51A4-B826-3EF59CB645AA}", + "subId": 285127096 + }, + "assetHint": "testdata/objects/cube/cube.azmodel" + } + } + } + }, + "Component_[17962478023087084794]": { + "$type": "SelectionComponent", + "Id": 17962478023087084794 + }, + "Component_[18071675051915092508]": { + "$type": "EditorEntityIconComponent", + "Id": 18071675051915092508 + }, + "Component_[2115498007879087044]": { + "$type": "EditorInspectorComponent", + "Id": 2115498007879087044, + "ComponentOrderEntryArray": [ + { + "ComponentId": 399415038452606756 + }, + { + "ComponentId": 16184381538555246534, + "SortIndex": 1 + }, + { + "ComponentId": 7827190074535394331, + "SortIndex": 2 + } + ] + }, + "Component_[3518973002096080237]": { + "$type": "EditorOnlyEntityComponent", + "Id": 3518973002096080237 + }, + "Component_[399415038452606756]": { + "$type": "{27F1E1A1-8D9D-4C3B-BD3A-AFB9762449C0} TransformComponent", + "Id": 399415038452606756, + "Parent Entity": "ContainerEntity", + "Transform Data": { + "Translate": [ + -47.53056335449219, + -0.00018183141946792603, + 89.95755767822266 + ] + } + }, + "Component_[4564240319609068082]": { + "$type": "EditorEntitySortComponent", + "Id": 4564240319609068082 + }, + "Component_[7827190074535394331]": { + "$type": "EditorMaterialComponent", + "Id": 7827190074535394331, + "Controller": { + "Configuration": { + "materials": [ + { + "Key": { + "materialSlotStableId": 2418540911 + }, + "Value": { + "MaterialAsset": { + "assetId": { + "guid": "{64C1F6A6-6BDA-551A-BE56-1829E5913278}" + }, + "assetHint": "materials/presets/pbr/metal_aluminum_polished.azmaterial" + } + } + } + ] + } + } + }, + "Component_[8092226976542590265]": { + "$type": "EditorDisabledCompositionComponent", + "Id": 8092226976542590265 + } + } + }, + "Entity_[3794920400852]": { + "Id": "Entity_[3794920400852]", + "Name": "Entity1", + "Components": { + "Component_[11525365929370623807]": { + "$type": "EditorVisibilityComponent", + "Id": 11525365929370623807 + }, + "Component_[12334620273692642550]": { + "$type": "EditorLockComponent", + "Id": 12334620273692642550 + }, + "Component_[14389735759337977675]": { + "$type": "EditorPendingCompositionComponent", + "Id": 14389735759337977675 + }, + "Component_[16184381538555246534]": { + "$type": "AZ::Render::EditorMeshComponent", + "Id": 16184381538555246534, + "Controller": { + "Configuration": { + "ModelAsset": { + "assetId": { + "guid": "{E14975EF-E676-51A4-B826-3EF59CB645AA}", + "subId": 285127096 + }, + "assetHint": "testdata/objects/cube/cube.azmodel" + } + } + } + }, + "Component_[17962478023087084794]": { + "$type": "SelectionComponent", + "Id": 17962478023087084794 + }, + "Component_[18071675051915092508]": { + "$type": "EditorEntityIconComponent", + "Id": 18071675051915092508 + }, + "Component_[2115498007879087044]": { + "$type": "EditorInspectorComponent", + "Id": 2115498007879087044, + "ComponentOrderEntryArray": [ + { + "ComponentId": 399415038452606756 + }, + { + "ComponentId": 16184381538555246534, + "SortIndex": 1 + }, + { + "ComponentId": 7827190074535394331, + "SortIndex": 2 + } + ] + }, + "Component_[3518973002096080237]": { + "$type": "EditorOnlyEntityComponent", + "Id": 3518973002096080237 + }, + "Component_[399415038452606756]": { + "$type": "{27F1E1A1-8D9D-4C3B-BD3A-AFB9762449C0} TransformComponent", + "Id": 399415038452606756, + "Parent Entity": "ContainerEntity", + "Transform Data": { + "Translate": [ + -7.5305633544921875, + -0.00018183141946792603, + 69.34888458251953 + ] + } + }, + "Component_[4564240319609068082]": { + "$type": "EditorEntitySortComponent", + "Id": 4564240319609068082 + }, + "Component_[7827190074535394331]": { + "$type": "EditorMaterialComponent", + "Id": 7827190074535394331, + "Controller": { + "Configuration": { + "materials": [ + { + "Key": { + "materialSlotStableId": 2418540911 + }, + "Value": { + "MaterialAsset": { + "assetId": { + "guid": "{DD1E26AE-80FB-5DB6-8786-26D438190A38}" + }, + "assetHint": "materials/presets/pbr/metal_nickel.azmaterial" + } + } + } + ] + } + } + }, + "Component_[8092226976542590265]": { + "$type": "EditorDisabledCompositionComponent", + "Id": 8092226976542590265 + } + } + }, + "Entity_[3799215368148]": { + "Id": "Entity_[3799215368148]", + "Name": "Entity1", + "Components": { + "Component_[11525365929370623807]": { + "$type": "EditorVisibilityComponent", + "Id": 11525365929370623807 + }, + "Component_[12334620273692642550]": { + "$type": "EditorLockComponent", + "Id": 12334620273692642550 + }, + "Component_[14389735759337977675]": { + "$type": "EditorPendingCompositionComponent", + "Id": 14389735759337977675 + }, + "Component_[16184381538555246534]": { + "$type": "AZ::Render::EditorMeshComponent", + "Id": 16184381538555246534, + "Controller": { + "Configuration": { + "ModelAsset": { + "assetId": { + "guid": "{E14975EF-E676-51A4-B826-3EF59CB645AA}", + "subId": 285127096 + }, + "assetHint": "testdata/objects/cube/cube.azmodel" + } + } + } + }, + "Component_[17962478023087084794]": { + "$type": "SelectionComponent", + "Id": 17962478023087084794 + }, + "Component_[18071675051915092508]": { + "$type": "EditorEntityIconComponent", + "Id": 18071675051915092508 + }, + "Component_[2115498007879087044]": { + "$type": "EditorInspectorComponent", + "Id": 2115498007879087044, + "ComponentOrderEntryArray": [ + { + "ComponentId": 399415038452606756 + }, + { + "ComponentId": 16184381538555246534, + "SortIndex": 1 + }, + { + "ComponentId": 7827190074535394331, + "SortIndex": 2 + } + ] + }, + "Component_[3518973002096080237]": { + "$type": "EditorOnlyEntityComponent", + "Id": 3518973002096080237 + }, + "Component_[399415038452606756]": { + "$type": "{27F1E1A1-8D9D-4C3B-BD3A-AFB9762449C0} TransformComponent", + "Id": 399415038452606756, + "Parent Entity": "ContainerEntity", + "Transform Data": { + "Translate": [ + -37.53056335449219, + -0.00018183141946792603, + 0.0 + ] + } + }, + "Component_[4564240319609068082]": { + "$type": "EditorEntitySortComponent", + "Id": 4564240319609068082 + }, + "Component_[7827190074535394331]": { + "$type": "EditorMaterialComponent", + "Id": 7827190074535394331, + "Controller": { + "Configuration": { + "materials": [ + { + "Key": { + "materialSlotStableId": 2418540911 + }, + "Value": { + "MaterialAsset": { + "assetId": { + "guid": "{CAF50181-3384-5DF2-9304-C6E48E83C72D}" + }, + "assetHint": "materials/presets/pbr/metal_chrome_polished.azmaterial" + } + } + } + ] + } + } + }, + "Component_[8092226976542590265]": { + "$type": "EditorDisabledCompositionComponent", + "Id": 8092226976542590265 + } + } + }, + "Entity_[3803510335444]": { + "Id": "Entity_[3803510335444]", + "Name": "Entity1", + "Components": { + "Component_[11525365929370623807]": { + "$type": "EditorVisibilityComponent", + "Id": 11525365929370623807 + }, + "Component_[12334620273692642550]": { + "$type": "EditorLockComponent", + "Id": 12334620273692642550 + }, + "Component_[14389735759337977675]": { + "$type": "EditorPendingCompositionComponent", + "Id": 14389735759337977675 + }, + "Component_[16184381538555246534]": { + "$type": "AZ::Render::EditorMeshComponent", + "Id": 16184381538555246534, + "Controller": { + "Configuration": { + "ModelAsset": { + "assetId": { + "guid": "{E14975EF-E676-51A4-B826-3EF59CB645AA}", + "subId": 285127096 + }, + "assetHint": "testdata/objects/cube/cube.azmodel" + } + } + } + }, + "Component_[17962478023087084794]": { + "$type": "SelectionComponent", + "Id": 17962478023087084794 + }, + "Component_[18071675051915092508]": { + "$type": "EditorEntityIconComponent", + "Id": 18071675051915092508 + }, + "Component_[2115498007879087044]": { + "$type": "EditorInspectorComponent", + "Id": 2115498007879087044, + "ComponentOrderEntryArray": [ + { + "ComponentId": 399415038452606756 + }, + { + "ComponentId": 16184381538555246534, + "SortIndex": 1 + }, + { + "ComponentId": 7827190074535394331, + "SortIndex": 2 + } + ] + }, + "Component_[3518973002096080237]": { + "$type": "EditorOnlyEntityComponent", + "Id": 3518973002096080237 + }, + "Component_[399415038452606756]": { + "$type": "{27F1E1A1-8D9D-4C3B-BD3A-AFB9762449C0} TransformComponent", + "Id": 399415038452606756, + "Parent Entity": "ContainerEntity", + "Transform Data": { + "Translate": [ + 7.530143737792969, + -0.00018183141946792603, + 30.08451271057129 + ] + } + }, + "Component_[4564240319609068082]": { + "$type": "EditorEntitySortComponent", + "Id": 4564240319609068082 + }, + "Component_[7827190074535394331]": { + "$type": "EditorMaterialComponent", + "Id": 7827190074535394331, + "Controller": { + "Configuration": { + "materials": [ + { + "Key": { + "materialSlotStableId": 2418540911 + }, + "Value": { + "MaterialAsset": { + "assetId": { + "guid": "{2AC06FA3-7670-542E-8996-DF346AFF1B61}" + }, + "assetHint": "materials/presets/pbr/metal_silver_polished.azmaterial" + } + } + } + ] + } + } + }, + "Component_[8092226976542590265]": { + "$type": "EditorDisabledCompositionComponent", + "Id": 8092226976542590265 + } + } + }, + "Entity_[3807805302740]": { + "Id": "Entity_[3807805302740]", + "Name": "Entity1", + "Components": { + "Component_[11525365929370623807]": { + "$type": "EditorVisibilityComponent", + "Id": 11525365929370623807 + }, + "Component_[12334620273692642550]": { + "$type": "EditorLockComponent", + "Id": 12334620273692642550 + }, + "Component_[14389735759337977675]": { + "$type": "EditorPendingCompositionComponent", + "Id": 14389735759337977675 + }, + "Component_[16184381538555246534]": { + "$type": "AZ::Render::EditorMeshComponent", + "Id": 16184381538555246534, + "Controller": { + "Configuration": { + "ModelAsset": { + "assetId": { + "guid": "{E14975EF-E676-51A4-B826-3EF59CB645AA}", + "subId": 285127096 + }, + "assetHint": "testdata/objects/cube/cube.azmodel" + } + } + } + }, + "Component_[17962478023087084794]": { + "$type": "SelectionComponent", + "Id": 17962478023087084794 + }, + "Component_[18071675051915092508]": { + "$type": "EditorEntityIconComponent", + "Id": 18071675051915092508 + }, + "Component_[2115498007879087044]": { + "$type": "EditorInspectorComponent", + "Id": 2115498007879087044, + "ComponentOrderEntryArray": [ + { + "ComponentId": 399415038452606756 + }, + { + "ComponentId": 16184381538555246534, + "SortIndex": 1 + }, + { + "ComponentId": 7827190074535394331, + "SortIndex": 2 + } + ] + }, + "Component_[3518973002096080237]": { + "$type": "EditorOnlyEntityComponent", + "Id": 3518973002096080237 + }, + "Component_[399415038452606756]": { + "$type": "{27F1E1A1-8D9D-4C3B-BD3A-AFB9762449C0} TransformComponent", + "Id": 399415038452606756, + "Parent Entity": "ContainerEntity", + "Transform Data": { + "Translate": [ + 22.53014373779297, + -0.00018183141946792603, + 30.08451271057129 + ] + } + }, + "Component_[4564240319609068082]": { + "$type": "EditorEntitySortComponent", + "Id": 4564240319609068082 + }, + "Component_[7827190074535394331]": { + "$type": "EditorMaterialComponent", + "Id": 7827190074535394331, + "Controller": { + "Configuration": { + "materials": [ + { + "Key": { + "materialSlotStableId": 2418540911 + }, + "Value": { + "MaterialAsset": { + "assetId": { + "guid": "{FC69F2F8-F73B-5A0C-B8B7-94BAA45780FC}" + }, + "assetHint": "materials/presets/pbr/metal_brass_polished.azmaterial" + } + } + } + ] + } + } + }, + "Component_[8092226976542590265]": { + "$type": "EditorDisabledCompositionComponent", + "Id": 8092226976542590265 + } + } + }, + "Entity_[3812100270036]": { + "Id": "Entity_[3812100270036]", + "Name": "Entity1", + "Components": { + "Component_[11525365929370623807]": { + "$type": "EditorVisibilityComponent", + "Id": 11525365929370623807 + }, + "Component_[12334620273692642550]": { + "$type": "EditorLockComponent", + "Id": 12334620273692642550 + }, + "Component_[14389735759337977675]": { + "$type": "EditorPendingCompositionComponent", + "Id": 14389735759337977675 + }, + "Component_[16184381538555246534]": { + "$type": "AZ::Render::EditorMeshComponent", + "Id": 16184381538555246534, + "Controller": { + "Configuration": { + "ModelAsset": { + "assetId": { + "guid": "{E14975EF-E676-51A4-B826-3EF59CB645AA}", + "subId": 285127096 + }, + "assetHint": "testdata/objects/cube/cube.azmodel" + } + } + } + }, + "Component_[17962478023087084794]": { + "$type": "SelectionComponent", + "Id": 17962478023087084794 + }, + "Component_[18071675051915092508]": { + "$type": "EditorEntityIconComponent", + "Id": 18071675051915092508 + }, + "Component_[2115498007879087044]": { + "$type": "EditorInspectorComponent", + "Id": 2115498007879087044, + "ComponentOrderEntryArray": [ + { + "ComponentId": 399415038452606756 + }, + { + "ComponentId": 16184381538555246534, + "SortIndex": 1 + }, + { + "ComponentId": 7827190074535394331, + "SortIndex": 2 + } + ] + }, + "Component_[3518973002096080237]": { + "$type": "EditorOnlyEntityComponent", + "Id": 3518973002096080237 + }, + "Component_[399415038452606756]": { + "$type": "{27F1E1A1-8D9D-4C3B-BD3A-AFB9762449C0} TransformComponent", + "Id": 399415038452606756, + "Parent Entity": "ContainerEntity", + "Transform Data": { + "Translate": [ + 27.53014373779297, + -0.00018183141946792603, + 59.873046875 + ] + } + }, + "Component_[4564240319609068082]": { + "$type": "EditorEntitySortComponent", + "Id": 4564240319609068082 + }, + "Component_[7827190074535394331]": { + "$type": "EditorMaterialComponent", + "Id": 7827190074535394331, + "Controller": { + "Configuration": { + "materials": [ + { + "Key": { + "materialSlotStableId": 2418540911 + }, + "Value": { + "MaterialAsset": { + "assetId": { + "guid": "{CAF50181-3384-5DF2-9304-C6E48E83C72D}" + }, + "assetHint": "materials/presets/pbr/metal_chrome_polished.azmaterial" + } + } + } + ] + } + } + }, + "Component_[8092226976542590265]": { + "$type": "EditorDisabledCompositionComponent", + "Id": 8092226976542590265 + } + } + }, + "Entity_[3816395237332]": { + "Id": "Entity_[3816395237332]", + "Name": "Entity1", + "Components": { + "Component_[11525365929370623807]": { + "$type": "EditorVisibilityComponent", + "Id": 11525365929370623807 + }, + "Component_[12334620273692642550]": { + "$type": "EditorLockComponent", + "Id": 12334620273692642550 + }, + "Component_[14389735759337977675]": { + "$type": "EditorPendingCompositionComponent", + "Id": 14389735759337977675 + }, + "Component_[16184381538555246534]": { + "$type": "AZ::Render::EditorMeshComponent", + "Id": 16184381538555246534, + "Controller": { + "Configuration": { + "ModelAsset": { + "assetId": { + "guid": "{E14975EF-E676-51A4-B826-3EF59CB645AA}", + "subId": 285127096 + }, + "assetHint": "testdata/objects/cube/cube.azmodel" + } + } + } + }, + "Component_[17962478023087084794]": { + "$type": "SelectionComponent", + "Id": 17962478023087084794 + }, + "Component_[18071675051915092508]": { + "$type": "EditorEntityIconComponent", + "Id": 18071675051915092508 + }, + "Component_[2115498007879087044]": { + "$type": "EditorInspectorComponent", + "Id": 2115498007879087044, + "ComponentOrderEntryArray": [ + { + "ComponentId": 399415038452606756 + }, + { + "ComponentId": 16184381538555246534, + "SortIndex": 1 + }, + { + "ComponentId": 7827190074535394331, + "SortIndex": 2 + } + ] + }, + "Component_[3518973002096080237]": { + "$type": "EditorOnlyEntityComponent", + "Id": 3518973002096080237 + }, + "Component_[399415038452606756]": { + "$type": "{27F1E1A1-8D9D-4C3B-BD3A-AFB9762449C0} TransformComponent", + "Id": 399415038452606756, + "Parent Entity": "ContainerEntity", + "Transform Data": { + "Translate": [ + 37.53014373779297, + 0.010651908814907074, + 9.51578426361084 + ] + } + }, + "Component_[4564240319609068082]": { + "$type": "EditorEntitySortComponent", + "Id": 4564240319609068082 + }, + "Component_[7827190074535394331]": { + "$type": "EditorMaterialComponent", + "Id": 7827190074535394331, + "Controller": { + "Configuration": { + "materials": [ + { + "Key": { + "materialSlotStableId": 2418540911 + }, + "Value": { + "MaterialAsset": { + "assetId": { + "guid": "{E621C5BF-B8E1-55F0-A791-EC960F2FA46F}" + }, + "assetHint": "materials/presets/pbr/metal_copper.azmaterial" + } + } + } + ] + } + } + }, + "Component_[8092226976542590265]": { + "$type": "EditorDisabledCompositionComponent", + "Id": 8092226976542590265 + } + } + }, + "Entity_[3820690204628]": { + "Id": "Entity_[3820690204628]", + "Name": "Entity1", + "Components": { + "Component_[11525365929370623807]": { + "$type": "EditorVisibilityComponent", + "Id": 11525365929370623807 + }, + "Component_[12334620273692642550]": { + "$type": "EditorLockComponent", + "Id": 12334620273692642550 + }, + "Component_[14389735759337977675]": { + "$type": "EditorPendingCompositionComponent", + "Id": 14389735759337977675 + }, + "Component_[16184381538555246534]": { + "$type": "AZ::Render::EditorMeshComponent", + "Id": 16184381538555246534, + "Controller": { + "Configuration": { + "ModelAsset": { + "assetId": { + "guid": "{E14975EF-E676-51A4-B826-3EF59CB645AA}", + "subId": 285127096 + }, + "assetHint": "testdata/objects/cube/cube.azmodel" + } + } + } + }, + "Component_[17962478023087084794]": { + "$type": "SelectionComponent", + "Id": 17962478023087084794 + }, + "Component_[18071675051915092508]": { + "$type": "EditorEntityIconComponent", + "Id": 18071675051915092508 + }, + "Component_[2115498007879087044]": { + "$type": "EditorInspectorComponent", + "Id": 2115498007879087044, + "ComponentOrderEntryArray": [ + { + "ComponentId": 399415038452606756 + }, + { + "ComponentId": 16184381538555246534, + "SortIndex": 1 + }, + { + "ComponentId": 7827190074535394331, + "SortIndex": 2 + } + ] + }, + "Component_[3518973002096080237]": { + "$type": "EditorOnlyEntityComponent", + "Id": 3518973002096080237 + }, + "Component_[399415038452606756]": { + "$type": "{27F1E1A1-8D9D-4C3B-BD3A-AFB9762449C0} TransformComponent", + "Id": 399415038452606756, + "Parent Entity": "ContainerEntity", + "Transform Data": { + "Translate": [ + -42.53056335449219, + -0.00018183141946792603, + 79.38228607177734 + ] + } + }, + "Component_[4564240319609068082]": { + "$type": "EditorEntitySortComponent", + "Id": 4564240319609068082 + }, + "Component_[7827190074535394331]": { + "$type": "EditorMaterialComponent", + "Id": 7827190074535394331, + "Controller": { + "Configuration": { + "materials": [ + { + "Key": { + "materialSlotStableId": 2418540911 + }, + "Value": { + "MaterialAsset": { + "assetId": { + "guid": "{AE350D9F-0000-526D-B49C-4303D687BB86}" + }, + "assetHint": "materials/presets/pbr/metal_brass_matte.azmaterial" + } + } + } + ] + } + } + }, + "Component_[8092226976542590265]": { + "$type": "EditorDisabledCompositionComponent", + "Id": 8092226976542590265 + } + } + }, + "Entity_[3824985171924]": { + "Id": "Entity_[3824985171924]", + "Name": "Entity1", + "Components": { + "Component_[11525365929370623807]": { + "$type": "EditorVisibilityComponent", + "Id": 11525365929370623807 + }, + "Component_[12334620273692642550]": { + "$type": "EditorLockComponent", + "Id": 12334620273692642550 + }, + "Component_[14389735759337977675]": { + "$type": "EditorPendingCompositionComponent", + "Id": 14389735759337977675 + }, + "Component_[16184381538555246534]": { + "$type": "AZ::Render::EditorMeshComponent", + "Id": 16184381538555246534, + "Controller": { + "Configuration": { + "ModelAsset": { + "assetId": { + "guid": "{E14975EF-E676-51A4-B826-3EF59CB645AA}", + "subId": 285127096 + }, + "assetHint": "testdata/objects/cube/cube.azmodel" + } + } + } + }, + "Component_[17962478023087084794]": { + "$type": "SelectionComponent", + "Id": 17962478023087084794 + }, + "Component_[18071675051915092508]": { + "$type": "EditorEntityIconComponent", + "Id": 18071675051915092508 + }, + "Component_[2115498007879087044]": { + "$type": "EditorInspectorComponent", + "Id": 2115498007879087044, + "ComponentOrderEntryArray": [ + { + "ComponentId": 399415038452606756 + }, + { + "ComponentId": 16184381538555246534, + "SortIndex": 1 + }, + { + "ComponentId": 7827190074535394331, + "SortIndex": 2 + } + ] + }, + "Component_[3518973002096080237]": { + "$type": "EditorOnlyEntityComponent", + "Id": 3518973002096080237 + }, + "Component_[399415038452606756]": { + "$type": "{27F1E1A1-8D9D-4C3B-BD3A-AFB9762449C0} TransformComponent", + "Id": 399415038452606756, + "Parent Entity": "ContainerEntity", + "Transform Data": { + "Translate": [ + 27.53014373779297, + -0.00018183141946792603, + 4.451573371887207 + ] + } + }, + "Component_[4564240319609068082]": { + "$type": "EditorEntitySortComponent", + "Id": 4564240319609068082 + }, + "Component_[7827190074535394331]": { + "$type": "EditorMaterialComponent", + "Id": 7827190074535394331, + "Controller": { + "Configuration": { + "materials": [ + { + "Key": { + "materialSlotStableId": 2418540911 + }, + "Value": { + "MaterialAsset": { + "assetId": { + "guid": "{A78EA2FC-688B-5E3A-A7F6-DB413D11D4CF}" + }, + "assetHint": "materials/presets/pbr/metal_chrome_matte.azmaterial" + } + } + } + ] + } + } + }, + "Component_[8092226976542590265]": { + "$type": "EditorDisabledCompositionComponent", + "Id": 8092226976542590265 + } + } + }, + "Entity_[3829280139220]": { + "Id": "Entity_[3829280139220]", + "Name": "Entity1", + "Components": { + "Component_[11525365929370623807]": { + "$type": "EditorVisibilityComponent", + "Id": 11525365929370623807 + }, + "Component_[12334620273692642550]": { + "$type": "EditorLockComponent", + "Id": 12334620273692642550 + }, + "Component_[14389735759337977675]": { + "$type": "EditorPendingCompositionComponent", + "Id": 14389735759337977675 + }, + "Component_[16184381538555246534]": { + "$type": "AZ::Render::EditorMeshComponent", + "Id": 16184381538555246534, + "Controller": { + "Configuration": { + "ModelAsset": { + "assetId": { + "guid": "{E14975EF-E676-51A4-B826-3EF59CB645AA}", + "subId": 285127096 + }, + "assetHint": "testdata/objects/cube/cube.azmodel" + } + } + } + }, + "Component_[17962478023087084794]": { + "$type": "SelectionComponent", + "Id": 17962478023087084794 + }, + "Component_[18071675051915092508]": { + "$type": "EditorEntityIconComponent", + "Id": 18071675051915092508 + }, + "Component_[2115498007879087044]": { + "$type": "EditorInspectorComponent", + "Id": 2115498007879087044, + "ComponentOrderEntryArray": [ + { + "ComponentId": 399415038452606756 + }, + { + "ComponentId": 16184381538555246534, + "SortIndex": 1 + }, + { + "ComponentId": 7827190074535394331, + "SortIndex": 2 + } + ] + }, + "Component_[3518973002096080237]": { + "$type": "EditorOnlyEntityComponent", + "Id": 3518973002096080237 + }, + "Component_[399415038452606756]": { + "$type": "{27F1E1A1-8D9D-4C3B-BD3A-AFB9762449C0} TransformComponent", + "Id": 399415038452606756, + "Parent Entity": "ContainerEntity", + "Transform Data": { + "Translate": [ + 2.5301437377929688, + -0.00018183141946792603, + 24.533506393432617 + ] + } + }, + "Component_[4564240319609068082]": { + "$type": "EditorEntitySortComponent", + "Id": 4564240319609068082 + }, + "Component_[7827190074535394331]": { + "$type": "EditorMaterialComponent", + "Id": 7827190074535394331, + "Controller": { + "Configuration": { + "materials": [ + { + "Key": { + "materialSlotStableId": 2418540911 + }, + "Value": { + "MaterialAsset": { + "assetId": { + "guid": "{E23FC75B-4142-55F1-B9AE-884826E7EB23}" + }, + "assetHint": "materials/presets/pbr/metal_platinum.azmaterial" + } + } + } + ] + } + } + }, + "Component_[8092226976542590265]": { + "$type": "EditorDisabledCompositionComponent", + "Id": 8092226976542590265 + } + } + }, + "Entity_[3833575106516]": { + "Id": "Entity_[3833575106516]", + "Name": "Entity1", + "Components": { + "Component_[11525365929370623807]": { + "$type": "EditorVisibilityComponent", + "Id": 11525365929370623807 + }, + "Component_[12334620273692642550]": { + "$type": "EditorLockComponent", + "Id": 12334620273692642550 + }, + "Component_[14389735759337977675]": { + "$type": "EditorPendingCompositionComponent", + "Id": 14389735759337977675 + }, + "Component_[16184381538555246534]": { + "$type": "AZ::Render::EditorMeshComponent", + "Id": 16184381538555246534, + "Controller": { + "Configuration": { + "ModelAsset": { + "assetId": { + "guid": "{E14975EF-E676-51A4-B826-3EF59CB645AA}", + "subId": 285127096 + }, + "assetHint": "testdata/objects/cube/cube.azmodel" + } + } + } + }, + "Component_[17962478023087084794]": { + "$type": "SelectionComponent", + "Id": 17962478023087084794 + }, + "Component_[18071675051915092508]": { + "$type": "EditorEntityIconComponent", + "Id": 18071675051915092508 + }, + "Component_[2115498007879087044]": { + "$type": "EditorInspectorComponent", + "Id": 2115498007879087044, + "ComponentOrderEntryArray": [ + { + "ComponentId": 399415038452606756 + }, + { + "ComponentId": 16184381538555246534, + "SortIndex": 1 + }, + { + "ComponentId": 7827190074535394331, + "SortIndex": 2 + } + ] + }, + "Component_[3518973002096080237]": { + "$type": "EditorOnlyEntityComponent", + "Id": 3518973002096080237 + }, + "Component_[399415038452606756]": { + "$type": "{27F1E1A1-8D9D-4C3B-BD3A-AFB9762449C0} TransformComponent", + "Id": 399415038452606756, + "Parent Entity": "ContainerEntity", + "Transform Data": { + "Translate": [ + -42.53056335449219, + -0.00018183141946792603, + 105.0152359008789 + ] + } + }, + "Component_[4564240319609068082]": { + "$type": "EditorEntitySortComponent", + "Id": 4564240319609068082 + }, + "Component_[7827190074535394331]": { + "$type": "EditorMaterialComponent", + "Id": 7827190074535394331, + "Controller": { + "Configuration": { + "materials": [ + { + "Key": { + "materialSlotStableId": 2418540911 + }, + "Value": { + "MaterialAsset": { + "assetId": { + "guid": "{FC69F2F8-F73B-5A0C-B8B7-94BAA45780FC}" + }, + "assetHint": "materials/presets/pbr/metal_brass_polished.azmaterial" + } + } + } + ] + } + } + }, + "Component_[8092226976542590265]": { + "$type": "EditorDisabledCompositionComponent", + "Id": 8092226976542590265 + } + } + }, + "Entity_[3837870073812]": { + "Id": "Entity_[3837870073812]", + "Name": "Entity1", + "Components": { + "Component_[11525365929370623807]": { + "$type": "EditorVisibilityComponent", + "Id": 11525365929370623807 + }, + "Component_[12334620273692642550]": { + "$type": "EditorLockComponent", + "Id": 12334620273692642550 + }, + "Component_[14389735759337977675]": { + "$type": "EditorPendingCompositionComponent", + "Id": 14389735759337977675 + }, + "Component_[16184381538555246534]": { + "$type": "AZ::Render::EditorMeshComponent", + "Id": 16184381538555246534, + "Controller": { + "Configuration": { + "ModelAsset": { + "assetId": { + "guid": "{E14975EF-E676-51A4-B826-3EF59CB645AA}", + "subId": 285127096 + }, + "assetHint": "testdata/objects/cube/cube.azmodel" + } + } + } + }, + "Component_[17962478023087084794]": { + "$type": "SelectionComponent", + "Id": 17962478023087084794 + }, + "Component_[18071675051915092508]": { + "$type": "EditorEntityIconComponent", + "Id": 18071675051915092508 + }, + "Component_[2115498007879087044]": { + "$type": "EditorInspectorComponent", + "Id": 2115498007879087044, + "ComponentOrderEntryArray": [ + { + "ComponentId": 399415038452606756 + }, + { + "ComponentId": 16184381538555246534, + "SortIndex": 1 + }, + { + "ComponentId": 7827190074535394331, + "SortIndex": 2 + } + ] + }, + "Component_[3518973002096080237]": { + "$type": "EditorOnlyEntityComponent", + "Id": 3518973002096080237 + }, + "Component_[399415038452606756]": { + "$type": "{27F1E1A1-8D9D-4C3B-BD3A-AFB9762449C0} TransformComponent", + "Id": 399415038452606756, + "Parent Entity": "ContainerEntity", + "Transform Data": { + "Translate": [ + -37.53056335449219, + -0.00018183141946792603, + 99.43339538574219 + ] + } + }, + "Component_[4564240319609068082]": { + "$type": "EditorEntitySortComponent", + "Id": 4564240319609068082 + }, + "Component_[7827190074535394331]": { + "$type": "EditorMaterialComponent", + "Id": 7827190074535394331, + "Controller": { + "Configuration": { + "materials": [ + { + "Key": { + "materialSlotStableId": 2418540911 + }, + "Value": { + "MaterialAsset": { + "assetId": { + "guid": "{B7C712DC-4839-58BB-B522-A4F120084CF5}" + }, + "assetHint": "materials/presets/pbr/metal_chrome.azmaterial" + } + } + } + ] + } + } + }, + "Component_[8092226976542590265]": { + "$type": "EditorDisabledCompositionComponent", + "Id": 8092226976542590265 + } + } + }, + "Entity_[3842165041108]": { + "Id": "Entity_[3842165041108]", + "Name": "Entity1", + "Components": { + "Component_[11525365929370623807]": { + "$type": "EditorVisibilityComponent", + "Id": 11525365929370623807 + }, + "Component_[12334620273692642550]": { + "$type": "EditorLockComponent", + "Id": 12334620273692642550 + }, + "Component_[14389735759337977675]": { + "$type": "EditorPendingCompositionComponent", + "Id": 14389735759337977675 + }, + "Component_[16184381538555246534]": { + "$type": "AZ::Render::EditorMeshComponent", + "Id": 16184381538555246534, + "Controller": { + "Configuration": { + "ModelAsset": { + "assetId": { + "guid": "{E14975EF-E676-51A4-B826-3EF59CB645AA}", + "subId": 285127096 + }, + "assetHint": "testdata/objects/cube/cube.azmodel" + } + } + } + }, + "Component_[17962478023087084794]": { + "$type": "SelectionComponent", + "Id": 17962478023087084794 + }, + "Component_[18071675051915092508]": { + "$type": "EditorEntityIconComponent", + "Id": 18071675051915092508 + }, + "Component_[2115498007879087044]": { + "$type": "EditorInspectorComponent", + "Id": 2115498007879087044, + "ComponentOrderEntryArray": [ + { + "ComponentId": 399415038452606756 + }, + { + "ComponentId": 16184381538555246534, + "SortIndex": 1 + }, + { + "ComponentId": 7827190074535394331, + "SortIndex": 2 + } + ] + }, + "Component_[3518973002096080237]": { + "$type": "EditorOnlyEntityComponent", + "Id": 3518973002096080237 + }, + "Component_[399415038452606756]": { + "$type": "{27F1E1A1-8D9D-4C3B-BD3A-AFB9762449C0} TransformComponent", + "Id": 399415038452606756, + "Parent Entity": "ContainerEntity", + "Transform Data": { + "Translate": [ + -47.53056335449219, + -0.00018183141946792603, + 79.38228607177734 + ] + } + }, + "Component_[4564240319609068082]": { + "$type": "EditorEntitySortComponent", + "Id": 4564240319609068082 + }, + "Component_[7827190074535394331]": { + "$type": "EditorMaterialComponent", + "Id": 7827190074535394331, + "Controller": { + "Configuration": { + "materials": [ + { + "Key": { + "materialSlotStableId": 2418540911 + }, + "Value": { + "MaterialAsset": { + "assetId": { + "guid": "{549D26B8-881D-569F-AF05-961F36A43F4F}" + }, + "assetHint": "materials/presets/pbr/metal_aluminum_matte.azmaterial" + } + } + } + ] + } + } + }, + "Component_[8092226976542590265]": { + "$type": "EditorDisabledCompositionComponent", + "Id": 8092226976542590265 + } + } + }, + "Entity_[3846460008404]": { + "Id": "Entity_[3846460008404]", + "Name": "Entity1", + "Components": { + "Component_[11525365929370623807]": { + "$type": "EditorVisibilityComponent", + "Id": 11525365929370623807 + }, + "Component_[12334620273692642550]": { + "$type": "EditorLockComponent", + "Id": 12334620273692642550 + }, + "Component_[14389735759337977675]": { + "$type": "EditorPendingCompositionComponent", + "Id": 14389735759337977675 + }, + "Component_[16184381538555246534]": { + "$type": "AZ::Render::EditorMeshComponent", + "Id": 16184381538555246534, + "Controller": { + "Configuration": { + "ModelAsset": { + "assetId": { + "guid": "{E14975EF-E676-51A4-B826-3EF59CB645AA}", + "subId": 285127096 + }, + "assetHint": "testdata/objects/cube/cube.azmodel" + } + } + } + }, + "Component_[17962478023087084794]": { + "$type": "SelectionComponent", + "Id": 17962478023087084794 + }, + "Component_[18071675051915092508]": { + "$type": "EditorEntityIconComponent", + "Id": 18071675051915092508 + }, + "Component_[2115498007879087044]": { + "$type": "EditorInspectorComponent", + "Id": 2115498007879087044, + "ComponentOrderEntryArray": [ + { + "ComponentId": 399415038452606756 + }, + { + "ComponentId": 16184381538555246534, + "SortIndex": 1 + }, + { + "ComponentId": 7827190074535394331, + "SortIndex": 2 + } + ] + }, + "Component_[3518973002096080237]": { + "$type": "EditorOnlyEntityComponent", + "Id": 3518973002096080237 + }, + "Component_[399415038452606756]": { + "$type": "{27F1E1A1-8D9D-4C3B-BD3A-AFB9762449C0} TransformComponent", + "Id": 399415038452606756, + "Parent Entity": "ContainerEntity", + "Transform Data": { + "Translate": [ + -12.530563354492188, + -0.00018183141946792603, + 15.057670593261719 + ] + } + }, + "Component_[4564240319609068082]": { + "$type": "EditorEntitySortComponent", + "Id": 4564240319609068082 + }, + "Component_[7827190074535394331]": { + "$type": "EditorMaterialComponent", + "Id": 7827190074535394331, + "Controller": { + "Configuration": { + "materials": [ + { + "Key": { + "materialSlotStableId": 2418540911 + }, + "Value": { + "MaterialAsset": { + "assetId": { + "guid": "{F2AD0EBF-7137-58D1-9991-9552FAD41B19}" + }, + "assetHint": "materials/presets/pbr/metal_mercury.azmaterial" + } + } + } + ] + } + } + }, + "Component_[8092226976542590265]": { + "$type": "EditorDisabledCompositionComponent", + "Id": 8092226976542590265 + } + } + }, + "Entity_[3850754975700]": { + "Id": "Entity_[3850754975700]", + "Name": "Entity1", + "Components": { + "Component_[11525365929370623807]": { + "$type": "EditorVisibilityComponent", + "Id": 11525365929370623807 + }, + "Component_[12334620273692642550]": { + "$type": "EditorLockComponent", + "Id": 12334620273692642550 + }, + "Component_[14389735759337977675]": { + "$type": "EditorPendingCompositionComponent", + "Id": 14389735759337977675 + }, + "Component_[16184381538555246534]": { + "$type": "AZ::Render::EditorMeshComponent", + "Id": 16184381538555246534, + "Controller": { + "Configuration": { + "ModelAsset": { + "assetId": { + "guid": "{E14975EF-E676-51A4-B826-3EF59CB645AA}", + "subId": 285127096 + }, + "assetHint": "testdata/objects/cube/cube.azmodel" + } + } + } + }, + "Component_[17962478023087084794]": { + "$type": "SelectionComponent", + "Id": 17962478023087084794 + }, + "Component_[18071675051915092508]": { + "$type": "EditorEntityIconComponent", + "Id": 18071675051915092508 + }, + "Component_[2115498007879087044]": { + "$type": "EditorInspectorComponent", + "Id": 2115498007879087044, + "ComponentOrderEntryArray": [ + { + "ComponentId": 399415038452606756 + }, + { + "ComponentId": 16184381538555246534, + "SortIndex": 1 + }, + { + "ComponentId": 7827190074535394331, + "SortIndex": 2 + } + ] + }, + "Component_[3518973002096080237]": { + "$type": "EditorOnlyEntityComponent", + "Id": 3518973002096080237 + }, + "Component_[399415038452606756]": { + "$type": "{27F1E1A1-8D9D-4C3B-BD3A-AFB9762449C0} TransformComponent", + "Id": 399415038452606756, + "Parent Entity": "ContainerEntity", + "Transform Data": { + "Translate": [ + -17.530563354492188, + -0.00018183141946792603, + 94.40913391113281 + ] + } + }, + "Component_[4564240319609068082]": { + "$type": "EditorEntitySortComponent", + "Id": 4564240319609068082 + }, + "Component_[7827190074535394331]": { + "$type": "EditorMaterialComponent", + "Id": 7827190074535394331, + "Controller": { + "Configuration": { + "materials": [ + { + "Key": { + "materialSlotStableId": 2418540911 + }, + "Value": { + "MaterialAsset": { + "assetId": { + "guid": "{970148AC-7258-5EC8-9CE7-F4EF93164D93}" + }, + "assetHint": "materials/presets/pbr/metal_iron_matte.azmaterial" + } + } + } + ] + } + } + }, + "Component_[8092226976542590265]": { + "$type": "EditorDisabledCompositionComponent", + "Id": 8092226976542590265 + } + } + }, + "Entity_[3855049942996]": { + "Id": "Entity_[3855049942996]", + "Name": "Entity1", + "Components": { + "Component_[11525365929370623807]": { + "$type": "EditorVisibilityComponent", + "Id": 11525365929370623807 + }, + "Component_[12334620273692642550]": { + "$type": "EditorLockComponent", + "Id": 12334620273692642550 + }, + "Component_[14389735759337977675]": { + "$type": "EditorPendingCompositionComponent", + "Id": 14389735759337977675 + }, + "Component_[16184381538555246534]": { + "$type": "AZ::Render::EditorMeshComponent", + "Id": 16184381538555246534, + "Controller": { + "Configuration": { + "ModelAsset": { + "assetId": { + "guid": "{E14975EF-E676-51A4-B826-3EF59CB645AA}", + "subId": 285127096 + }, + "assetHint": "testdata/objects/cube/cube.azmodel" + } + } + } + }, + "Component_[17962478023087084794]": { + "$type": "SelectionComponent", + "Id": 17962478023087084794 + }, + "Component_[18071675051915092508]": { + "$type": "EditorEntityIconComponent", + "Id": 18071675051915092508 + }, + "Component_[2115498007879087044]": { + "$type": "EditorInspectorComponent", + "Id": 2115498007879087044, + "ComponentOrderEntryArray": [ + { + "ComponentId": 399415038452606756 + }, + { + "ComponentId": 16184381538555246534, + "SortIndex": 1 + }, + { + "ComponentId": 7827190074535394331, + "SortIndex": 2 + } + ] + }, + "Component_[3518973002096080237]": { + "$type": "EditorOnlyEntityComponent", + "Id": 3518973002096080237 + }, + "Component_[399415038452606756]": { + "$type": "{27F1E1A1-8D9D-4C3B-BD3A-AFB9762449C0} TransformComponent", + "Id": 399415038452606756, + "Parent Entity": "ContainerEntity", + "Transform Data": { + "Translate": [ + 27.53014373779297, + -0.00018183141946792603, + 0.0 + ] + } + }, + "Component_[4564240319609068082]": { + "$type": "EditorEntitySortComponent", + "Id": 4564240319609068082 + }, + "Component_[7827190074535394331]": { + "$type": "EditorMaterialComponent", + "Id": 7827190074535394331, + "Controller": { + "Configuration": { + "materials": [ + { + "Key": { + "materialSlotStableId": 2418540911 + }, + "Value": { + "MaterialAsset": { + "assetId": { + "guid": "{CAF50181-3384-5DF2-9304-C6E48E83C72D}" + }, + "assetHint": "materials/presets/pbr/metal_chrome_polished.azmaterial" + } + } + } + ] + } + } + }, + "Component_[8092226976542590265]": { + "$type": "EditorDisabledCompositionComponent", + "Id": 8092226976542590265 + } + } + }, + "Entity_[3859344910292]": { + "Id": "Entity_[3859344910292]", + "Name": "Entity1", + "Components": { + "Component_[11525365929370623807]": { + "$type": "EditorVisibilityComponent", + "Id": 11525365929370623807 + }, + "Component_[12334620273692642550]": { + "$type": "EditorLockComponent", + "Id": 12334620273692642550 + }, + "Component_[14389735759337977675]": { + "$type": "EditorPendingCompositionComponent", + "Id": 14389735759337977675 + }, + "Component_[16184381538555246534]": { + "$type": "AZ::Render::EditorMeshComponent", + "Id": 16184381538555246534, + "Controller": { + "Configuration": { + "ModelAsset": { + "assetId": { + "guid": "{E14975EF-E676-51A4-B826-3EF59CB645AA}", + "subId": 285127096 + }, + "assetHint": "testdata/objects/cube/cube.azmodel" + } + } + } + }, + "Component_[17962478023087084794]": { + "$type": "SelectionComponent", + "Id": 17962478023087084794 + }, + "Component_[18071675051915092508]": { + "$type": "EditorEntityIconComponent", + "Id": 18071675051915092508 + }, + "Component_[2115498007879087044]": { + "$type": "EditorInspectorComponent", + "Id": 2115498007879087044, + "ComponentOrderEntryArray": [ + { + "ComponentId": 399415038452606756 + }, + { + "ComponentId": 16184381538555246534, + "SortIndex": 1 + }, + { + "ComponentId": 7827190074535394331, + "SortIndex": 2 + } + ] + }, + "Component_[3518973002096080237]": { + "$type": "EditorOnlyEntityComponent", + "Id": 3518973002096080237 + }, + "Component_[399415038452606756]": { + "$type": "{27F1E1A1-8D9D-4C3B-BD3A-AFB9762449C0} TransformComponent", + "Id": 399415038452606756, + "Parent Entity": "ContainerEntity", + "Transform Data": { + "Translate": [ + 32.53014373779297, + -0.00018183141946792603, + 114.4910659790039 + ] + } + }, + "Component_[4564240319609068082]": { + "$type": "EditorEntitySortComponent", + "Id": 4564240319609068082 + }, + "Component_[7827190074535394331]": { + "$type": "EditorMaterialComponent", + "Id": 7827190074535394331, + "Controller": { + "Configuration": { + "materials": [ + { + "Key": { + "materialSlotStableId": 2418540911 + }, + "Value": { + "MaterialAsset": { + "assetId": { + "guid": "{99976D73-6248-5D66-AD15-E8F52B0AFE36}" + }, + "assetHint": "materials/presets/pbr/metal_cobalt.azmaterial" + } + } + } + ] + } + } + }, + "Component_[8092226976542590265]": { + "$type": "EditorDisabledCompositionComponent", + "Id": 8092226976542590265 + } + } + }, + "Entity_[3863639877588]": { + "Id": "Entity_[3863639877588]", + "Name": "Entity1", + "Components": { + "Component_[11525365929370623807]": { + "$type": "EditorVisibilityComponent", + "Id": 11525365929370623807 + }, + "Component_[12334620273692642550]": { + "$type": "EditorLockComponent", + "Id": 12334620273692642550 + }, + "Component_[14389735759337977675]": { + "$type": "EditorPendingCompositionComponent", + "Id": 14389735759337977675 + }, + "Component_[16184381538555246534]": { + "$type": "AZ::Render::EditorMeshComponent", + "Id": 16184381538555246534, + "Controller": { + "Configuration": { + "ModelAsset": { + "assetId": { + "guid": "{E14975EF-E676-51A4-B826-3EF59CB645AA}", + "subId": 285127096 + }, + "assetHint": "testdata/objects/cube/cube.azmodel" + } + } + } + }, + "Component_[17962478023087084794]": { + "$type": "SelectionComponent", + "Id": 17962478023087084794 + }, + "Component_[18071675051915092508]": { + "$type": "EditorEntityIconComponent", + "Id": 18071675051915092508 + }, + "Component_[2115498007879087044]": { + "$type": "EditorInspectorComponent", + "Id": 2115498007879087044, + "ComponentOrderEntryArray": [ + { + "ComponentId": 399415038452606756 + }, + { + "ComponentId": 16184381538555246534, + "SortIndex": 1 + }, + { + "ComponentId": 7827190074535394331, + "SortIndex": 2 + } + ] + }, + "Component_[3518973002096080237]": { + "$type": "EditorOnlyEntityComponent", + "Id": 3518973002096080237 + }, + "Component_[399415038452606756]": { + "$type": "{27F1E1A1-8D9D-4C3B-BD3A-AFB9762449C0} TransformComponent", + "Id": 399415038452606756, + "Parent Entity": "ContainerEntity", + "Transform Data": { + "Translate": [ + -2.5305633544921875, + -0.00018183141946792603, + 19.50924301147461 + ] + } + }, + "Component_[4564240319609068082]": { + "$type": "EditorEntitySortComponent", + "Id": 4564240319609068082 + }, + "Component_[7827190074535394331]": { + "$type": "EditorMaterialComponent", + "Id": 7827190074535394331, + "Controller": { + "Configuration": { + "materials": [ + { + "Key": { + "materialSlotStableId": 2418540911 + }, + "Value": { + "MaterialAsset": { + "assetId": { + "guid": "{9187B84B-425F-5D11-B4D7-35BBDB0959D1}" + }, + "assetHint": "materials/presets/pbr/metal_palladium_matte.azmaterial" + } + } + } + ] + } + } + }, + "Component_[8092226976542590265]": { + "$type": "EditorDisabledCompositionComponent", + "Id": 8092226976542590265 + } + } + }, + "Entity_[3867934844884]": { + "Id": "Entity_[3867934844884]", + "Name": "Entity1", + "Components": { + "Component_[11525365929370623807]": { + "$type": "EditorVisibilityComponent", + "Id": 11525365929370623807 + }, + "Component_[12334620273692642550]": { + "$type": "EditorLockComponent", + "Id": 12334620273692642550 + }, + "Component_[14389735759337977675]": { + "$type": "EditorPendingCompositionComponent", + "Id": 14389735759337977675 + }, + "Component_[16184381538555246534]": { + "$type": "AZ::Render::EditorMeshComponent", + "Id": 16184381538555246534, + "Controller": { + "Configuration": { + "ModelAsset": { + "assetId": { + "guid": "{E14975EF-E676-51A4-B826-3EF59CB645AA}", + "subId": 285127096 + }, + "assetHint": "testdata/objects/cube/cube.azmodel" + } + } + } + }, + "Component_[17962478023087084794]": { + "$type": "SelectionComponent", + "Id": 17962478023087084794 + }, + "Component_[18071675051915092508]": { + "$type": "EditorEntityIconComponent", + "Id": 18071675051915092508 + }, + "Component_[2115498007879087044]": { + "$type": "EditorInspectorComponent", + "Id": 2115498007879087044, + "ComponentOrderEntryArray": [ + { + "ComponentId": 399415038452606756 + }, + { + "ComponentId": 16184381538555246534, + "SortIndex": 1 + }, + { + "ComponentId": 7827190074535394331, + "SortIndex": 2 + } + ] + }, + "Component_[3518973002096080237]": { + "$type": "EditorOnlyEntityComponent", + "Id": 3518973002096080237 + }, + "Component_[399415038452606756]": { + "$type": "{27F1E1A1-8D9D-4C3B-BD3A-AFB9762449C0} TransformComponent", + "Id": 399415038452606756, + "Parent Entity": "ContainerEntity", + "Transform Data": { + "Translate": [ + -47.53056335449219, + -0.00018183141946792603, + 114.4910659790039 + ] + } + }, + "Component_[4564240319609068082]": { + "$type": "EditorEntitySortComponent", + "Id": 4564240319609068082 + }, + "Component_[7827190074535394331]": { + "$type": "EditorMaterialComponent", + "Id": 7827190074535394331, + "Controller": { + "Configuration": { + "materials": [ + { + "Key": { + "materialSlotStableId": 2418540911 + }, + "Value": { + "MaterialAsset": { + "assetId": { + "guid": "{94CF2BD7-7D09-5577-B1D8-3FF85B15E127}" + }, + "assetHint": "materials/presets/pbr/metal_aluminum.azmaterial" + } + } + } + ] + } + } + }, + "Component_[8092226976542590265]": { + "$type": "EditorDisabledCompositionComponent", + "Id": 8092226976542590265 + } + } + }, + "Entity_[3872229812180]": { + "Id": "Entity_[3872229812180]", + "Name": "Entity1", + "Components": { + "Component_[11525365929370623807]": { + "$type": "EditorVisibilityComponent", + "Id": 11525365929370623807 + }, + "Component_[12334620273692642550]": { + "$type": "EditorLockComponent", + "Id": 12334620273692642550 + }, + "Component_[14389735759337977675]": { + "$type": "EditorPendingCompositionComponent", + "Id": 14389735759337977675 + }, + "Component_[16184381538555246534]": { + "$type": "AZ::Render::EditorMeshComponent", + "Id": 16184381538555246534, + "Controller": { + "Configuration": { + "ModelAsset": { + "assetId": { + "guid": "{E14975EF-E676-51A4-B826-3EF59CB645AA}", + "subId": 285127096 + }, + "assetHint": "testdata/objects/cube/cube.azmodel" + } + } + } + }, + "Component_[17962478023087084794]": { + "$type": "SelectionComponent", + "Id": 17962478023087084794 + }, + "Component_[18071675051915092508]": { + "$type": "EditorEntityIconComponent", + "Id": 18071675051915092508 + }, + "Component_[2115498007879087044]": { + "$type": "EditorInspectorComponent", + "Id": 2115498007879087044, + "ComponentOrderEntryArray": [ + { + "ComponentId": 399415038452606756 + }, + { + "ComponentId": 16184381538555246534, + "SortIndex": 1 + }, + { + "ComponentId": 7827190074535394331, + "SortIndex": 2 + } + ] + }, + "Component_[3518973002096080237]": { + "$type": "EditorOnlyEntityComponent", + "Id": 3518973002096080237 + }, + "Component_[399415038452606756]": { + "$type": "{27F1E1A1-8D9D-4C3B-BD3A-AFB9762449C0} TransformComponent", + "Id": 399415038452606756, + "Parent Entity": "ContainerEntity", + "Transform Data": { + "Translate": [ + 2.5301437377929688, + -0.00018183141946792603, + 39.56034851074219 + ] + } + }, + "Component_[4564240319609068082]": { + "$type": "EditorEntitySortComponent", + "Id": 4564240319609068082 + }, + "Component_[7827190074535394331]": { + "$type": "EditorMaterialComponent", + "Id": 7827190074535394331, + "Controller": { + "Configuration": { + "materials": [ + { + "Key": { + "materialSlotStableId": 2418540911 + }, + "Value": { + "MaterialAsset": { + "assetId": { + "guid": "{E23FC75B-4142-55F1-B9AE-884826E7EB23}" + }, + "assetHint": "materials/presets/pbr/metal_platinum.azmaterial" + } + } + } + ] + } + } + }, + "Component_[8092226976542590265]": { + "$type": "EditorDisabledCompositionComponent", + "Id": 8092226976542590265 + } + } + }, + "Entity_[3876524779476]": { + "Id": "Entity_[3876524779476]", + "Name": "Entity1", + "Components": { + "Component_[11525365929370623807]": { + "$type": "EditorVisibilityComponent", + "Id": 11525365929370623807 + }, + "Component_[12334620273692642550]": { + "$type": "EditorLockComponent", + "Id": 12334620273692642550 + }, + "Component_[14389735759337977675]": { + "$type": "EditorPendingCompositionComponent", + "Id": 14389735759337977675 + }, + "Component_[16184381538555246534]": { + "$type": "AZ::Render::EditorMeshComponent", + "Id": 16184381538555246534, + "Controller": { + "Configuration": { + "ModelAsset": { + "assetId": { + "guid": "{E14975EF-E676-51A4-B826-3EF59CB645AA}", + "subId": 285127096 + }, + "assetHint": "testdata/objects/cube/cube.azmodel" + } + } + } + }, + "Component_[17962478023087084794]": { + "$type": "SelectionComponent", + "Id": 17962478023087084794 + }, + "Component_[18071675051915092508]": { + "$type": "EditorEntityIconComponent", + "Id": 18071675051915092508 + }, + "Component_[2115498007879087044]": { + "$type": "EditorInspectorComponent", + "Id": 2115498007879087044, + "ComponentOrderEntryArray": [ + { + "ComponentId": 399415038452606756 + }, + { + "ComponentId": 16184381538555246534, + "SortIndex": 1 + }, + { + "ComponentId": 7827190074535394331, + "SortIndex": 2 + } + ] + }, + "Component_[3518973002096080237]": { + "$type": "EditorOnlyEntityComponent", + "Id": 3518973002096080237 + }, + "Component_[399415038452606756]": { + "$type": "{27F1E1A1-8D9D-4C3B-BD3A-AFB9762449C0} TransformComponent", + "Id": 399415038452606756, + "Parent Entity": "ContainerEntity", + "Transform Data": { + "Translate": [ + -42.53056335449219, + -0.00018183141946792603, + 69.34888458251953 + ] + } + }, + "Component_[4564240319609068082]": { + "$type": "EditorEntitySortComponent", + "Id": 4564240319609068082 + }, + "Component_[7827190074535394331]": { + "$type": "EditorMaterialComponent", + "Id": 7827190074535394331, + "Controller": { + "Configuration": { + "materials": [ + { + "Key": { + "materialSlotStableId": 2418540911 + }, + "Value": { + "MaterialAsset": { + "assetId": { + "guid": "{80E0F2A7-1EE4-597F-80EF-985C65BCE2EB}" + }, + "assetHint": "materials/presets/pbr/metal_brass.azmaterial" + } + } + } + ] + } + } + }, + "Component_[8092226976542590265]": { + "$type": "EditorDisabledCompositionComponent", + "Id": 8092226976542590265 + } + } + }, + "Entity_[3880819746772]": { + "Id": "Entity_[3880819746772]", + "Name": "Entity1", + "Components": { + "Component_[11525365929370623807]": { + "$type": "EditorVisibilityComponent", + "Id": 11525365929370623807 + }, + "Component_[12334620273692642550]": { + "$type": "EditorLockComponent", + "Id": 12334620273692642550 + }, + "Component_[14389735759337977675]": { + "$type": "EditorPendingCompositionComponent", + "Id": 14389735759337977675 + }, + "Component_[16184381538555246534]": { + "$type": "AZ::Render::EditorMeshComponent", + "Id": 16184381538555246534, + "Controller": { + "Configuration": { + "ModelAsset": { + "assetId": { + "guid": "{E14975EF-E676-51A4-B826-3EF59CB645AA}", + "subId": 285127096 + }, + "assetHint": "testdata/objects/cube/cube.azmodel" + } + } + } + }, + "Component_[17962478023087084794]": { + "$type": "SelectionComponent", + "Id": 17962478023087084794 + }, + "Component_[18071675051915092508]": { + "$type": "EditorEntityIconComponent", + "Id": 18071675051915092508 + }, + "Component_[2115498007879087044]": { + "$type": "EditorInspectorComponent", + "Id": 2115498007879087044, + "ComponentOrderEntryArray": [ + { + "ComponentId": 399415038452606756 + }, + { + "ComponentId": 16184381538555246534, + "SortIndex": 1 + }, + { + "ComponentId": 7827190074535394331, + "SortIndex": 2 + } + ] + }, + "Component_[3518973002096080237]": { + "$type": "EditorOnlyEntityComponent", + "Id": 3518973002096080237 + }, + "Component_[399415038452606756]": { + "$type": "{27F1E1A1-8D9D-4C3B-BD3A-AFB9762449C0} TransformComponent", + "Id": 399415038452606756, + "Parent Entity": "ContainerEntity", + "Transform Data": { + "Translate": [ + -37.53056335449219, + -0.00018183141946792603, + 59.873046875 + ] + } + }, + "Component_[4564240319609068082]": { + "$type": "EditorEntitySortComponent", + "Id": 4564240319609068082 + }, + "Component_[7827190074535394331]": { + "$type": "EditorMaterialComponent", + "Id": 7827190074535394331, + "Controller": { + "Configuration": { + "materials": [ + { + "Key": { + "materialSlotStableId": 2418540911 + }, + "Value": { + "MaterialAsset": { + "assetId": { + "guid": "{CAF50181-3384-5DF2-9304-C6E48E83C72D}" + }, + "assetHint": "materials/presets/pbr/metal_chrome_polished.azmaterial" + } + } + } + ] + } + } + }, + "Component_[8092226976542590265]": { + "$type": "EditorDisabledCompositionComponent", + "Id": 8092226976542590265 + } + } + }, + "Entity_[3885114714068]": { + "Id": "Entity_[3885114714068]", + "Name": "Entity1", + "Components": { + "Component_[11525365929370623807]": { + "$type": "EditorVisibilityComponent", + "Id": 11525365929370623807 + }, + "Component_[12334620273692642550]": { + "$type": "EditorLockComponent", + "Id": 12334620273692642550 + }, + "Component_[14389735759337977675]": { + "$type": "EditorPendingCompositionComponent", + "Id": 14389735759337977675 + }, + "Component_[16184381538555246534]": { + "$type": "AZ::Render::EditorMeshComponent", + "Id": 16184381538555246534, + "Controller": { + "Configuration": { + "ModelAsset": { + "assetId": { + "guid": "{E14975EF-E676-51A4-B826-3EF59CB645AA}", + "subId": 285127096 + }, + "assetHint": "testdata/objects/cube/cube.azmodel" + } + } + } + }, + "Component_[17962478023087084794]": { + "$type": "SelectionComponent", + "Id": 17962478023087084794 + }, + "Component_[18071675051915092508]": { + "$type": "EditorEntityIconComponent", + "Id": 18071675051915092508 + }, + "Component_[2115498007879087044]": { + "$type": "EditorInspectorComponent", + "Id": 2115498007879087044, + "ComponentOrderEntryArray": [ + { + "ComponentId": 399415038452606756 + }, + { + "ComponentId": 16184381538555246534, + "SortIndex": 1 + }, + { + "ComponentId": 7827190074535394331, + "SortIndex": 2 + } + ] + }, + "Component_[3518973002096080237]": { + "$type": "EditorOnlyEntityComponent", + "Id": 3518973002096080237 + }, + "Component_[399415038452606756]": { + "$type": "{27F1E1A1-8D9D-4C3B-BD3A-AFB9762449C0} TransformComponent", + "Id": 399415038452606756, + "Parent Entity": "ContainerEntity", + "Transform Data": { + "Translate": [ + 22.53014373779297, + -0.00018183141946792603, + 34.53608703613281 + ] + } + }, + "Component_[4564240319609068082]": { + "$type": "EditorEntitySortComponent", + "Id": 4564240319609068082 + }, + "Component_[7827190074535394331]": { + "$type": "EditorMaterialComponent", + "Id": 7827190074535394331, + "Controller": { + "Configuration": { + "materials": [ + { + "Key": { + "materialSlotStableId": 2418540911 + }, + "Value": { + "MaterialAsset": { + "assetId": { + "guid": "{AE350D9F-0000-526D-B49C-4303D687BB86}" + }, + "assetHint": "materials/presets/pbr/metal_brass_matte.azmaterial" + } + } + } + ] + } + } + }, + "Component_[8092226976542590265]": { + "$type": "EditorDisabledCompositionComponent", + "Id": 8092226976542590265 + } + } + }, + "Entity_[3889409681364]": { + "Id": "Entity_[3889409681364]", + "Name": "Entity1", + "Components": { + "Component_[11525365929370623807]": { + "$type": "EditorVisibilityComponent", + "Id": 11525365929370623807 + }, + "Component_[12334620273692642550]": { + "$type": "EditorLockComponent", + "Id": 12334620273692642550 + }, + "Component_[14389735759337977675]": { + "$type": "EditorPendingCompositionComponent", + "Id": 14389735759337977675 + }, + "Component_[16184381538555246534]": { + "$type": "AZ::Render::EditorMeshComponent", + "Id": 16184381538555246534, + "Controller": { + "Configuration": { + "ModelAsset": { + "assetId": { + "guid": "{E14975EF-E676-51A4-B826-3EF59CB645AA}", + "subId": 285127096 + }, + "assetHint": "testdata/objects/cube/cube.azmodel" + } + } + } + }, + "Component_[17962478023087084794]": { + "$type": "SelectionComponent", + "Id": 17962478023087084794 + }, + "Component_[18071675051915092508]": { + "$type": "EditorEntityIconComponent", + "Id": 18071675051915092508 + }, + "Component_[2115498007879087044]": { + "$type": "EditorInspectorComponent", + "Id": 2115498007879087044, + "ComponentOrderEntryArray": [ + { + "ComponentId": 399415038452606756 + }, + { + "ComponentId": 16184381538555246534, + "SortIndex": 1 + }, + { + "ComponentId": 7827190074535394331, + "SortIndex": 2 + } + ] + }, + "Component_[3518973002096080237]": { + "$type": "EditorOnlyEntityComponent", + "Id": 3518973002096080237 + }, + "Component_[399415038452606756]": { + "$type": "{27F1E1A1-8D9D-4C3B-BD3A-AFB9762449C0} TransformComponent", + "Id": 399415038452606756, + "Parent Entity": "ContainerEntity", + "Transform Data": { + "Translate": [ + -2.5305633544921875, + -0.00018183141946792603, + 9.475835800170898 + ] + } + }, + "Component_[4564240319609068082]": { + "$type": "EditorEntitySortComponent", + "Id": 4564240319609068082 + }, + "Component_[7827190074535394331]": { + "$type": "EditorMaterialComponent", + "Id": 7827190074535394331, + "Controller": { + "Configuration": { + "materials": [ + { + "Key": { + "materialSlotStableId": 2418540911 + }, + "Value": { + "MaterialAsset": { + "assetId": { + "guid": "{DC0598ED-1EDD-5B37-892E-E0867621D74C}" + }, + "assetHint": "materials/presets/pbr/metal_palladium.azmaterial" + } + } + } + ] + } + } + }, + "Component_[8092226976542590265]": { + "$type": "EditorDisabledCompositionComponent", + "Id": 8092226976542590265 + } + } + }, + "Entity_[3893704648660]": { + "Id": "Entity_[3893704648660]", + "Name": "Entity1", + "Components": { + "Component_[11525365929370623807]": { + "$type": "EditorVisibilityComponent", + "Id": 11525365929370623807 + }, + "Component_[12334620273692642550]": { + "$type": "EditorLockComponent", + "Id": 12334620273692642550 + }, + "Component_[14389735759337977675]": { + "$type": "EditorPendingCompositionComponent", + "Id": 14389735759337977675 + }, + "Component_[16184381538555246534]": { + "$type": "AZ::Render::EditorMeshComponent", + "Id": 16184381538555246534, + "Controller": { + "Configuration": { + "ModelAsset": { + "assetId": { + "guid": "{E14975EF-E676-51A4-B826-3EF59CB645AA}", + "subId": 285127096 + }, + "assetHint": "testdata/objects/cube/cube.azmodel" + } + } + } + }, + "Component_[17962478023087084794]": { + "$type": "SelectionComponent", + "Id": 17962478023087084794 + }, + "Component_[18071675051915092508]": { + "$type": "EditorEntityIconComponent", + "Id": 18071675051915092508 + }, + "Component_[2115498007879087044]": { + "$type": "EditorInspectorComponent", + "Id": 2115498007879087044, + "ComponentOrderEntryArray": [ + { + "ComponentId": 399415038452606756 + }, + { + "ComponentId": 16184381538555246534, + "SortIndex": 1 + }, + { + "ComponentId": 7827190074535394331, + "SortIndex": 2 + } + ] + }, + "Component_[3518973002096080237]": { + "$type": "EditorOnlyEntityComponent", + "Id": 3518973002096080237 + }, + "Component_[399415038452606756]": { + "$type": "{27F1E1A1-8D9D-4C3B-BD3A-AFB9762449C0} TransformComponent", + "Id": 399415038452606756, + "Parent Entity": "ContainerEntity", + "Transform Data": { + "Translate": [ + -17.530563354492188, + -0.00018183141946792603, + 99.43339538574219 + ] + } + }, + "Component_[4564240319609068082]": { + "$type": "EditorEntitySortComponent", + "Id": 4564240319609068082 + }, + "Component_[7827190074535394331]": { + "$type": "EditorMaterialComponent", + "Id": 7827190074535394331, + "Controller": { + "Configuration": { + "materials": [ + { + "Key": { + "materialSlotStableId": 2418540911 + }, + "Value": { + "MaterialAsset": { + "assetId": { + "guid": "{892EA944-0325-5FA6-94D7-4AB4FC02A0F5}" + }, + "assetHint": "materials/presets/pbr/metal_iron.azmaterial" + } + } + } + ] + } + } + }, + "Component_[8092226976542590265]": { + "$type": "EditorDisabledCompositionComponent", + "Id": 8092226976542590265 + } + } + }, + "Entity_[3897999615956]": { + "Id": "Entity_[3897999615956]", + "Name": "Entity1", + "Components": { + "Component_[11525365929370623807]": { + "$type": "EditorVisibilityComponent", + "Id": 11525365929370623807 + }, + "Component_[12334620273692642550]": { + "$type": "EditorLockComponent", + "Id": 12334620273692642550 + }, + "Component_[14389735759337977675]": { + "$type": "EditorPendingCompositionComponent", + "Id": 14389735759337977675 + }, + "Component_[16184381538555246534]": { + "$type": "AZ::Render::EditorMeshComponent", + "Id": 16184381538555246534, + "Controller": { + "Configuration": { + "ModelAsset": { + "assetId": { + "guid": "{E14975EF-E676-51A4-B826-3EF59CB645AA}", + "subId": 285127096 + }, + "assetHint": "testdata/objects/cube/cube.azmodel" + } + } + } + }, + "Component_[17962478023087084794]": { + "$type": "SelectionComponent", + "Id": 17962478023087084794 + }, + "Component_[18071675051915092508]": { + "$type": "EditorEntityIconComponent", + "Id": 18071675051915092508 + }, + "Component_[2115498007879087044]": { + "$type": "EditorInspectorComponent", + "Id": 2115498007879087044, + "ComponentOrderEntryArray": [ + { + "ComponentId": 399415038452606756 + }, + { + "ComponentId": 16184381538555246534, + "SortIndex": 1 + }, + { + "ComponentId": 7827190074535394331, + "SortIndex": 2 + } + ] + }, + "Component_[3518973002096080237]": { + "$type": "EditorOnlyEntityComponent", + "Id": 3518973002096080237 + }, + "Component_[399415038452606756]": { + "$type": "{27F1E1A1-8D9D-4C3B-BD3A-AFB9762449C0} TransformComponent", + "Id": 399415038452606756, + "Parent Entity": "ContainerEntity", + "Transform Data": { + "Translate": [ + -32.53056335449219, + -0.00018183141946792603, + 64.32462310791016 + ] + } + }, + "Component_[4564240319609068082]": { + "$type": "EditorEntitySortComponent", + "Id": 4564240319609068082 + }, + "Component_[7827190074535394331]": { + "$type": "EditorMaterialComponent", + "Id": 7827190074535394331, + "Controller": { + "Configuration": { + "materials": [ + { + "Key": { + "materialSlotStableId": 2418540911 + }, + "Value": { + "MaterialAsset": { + "assetId": { + "guid": "{C60A39AF-BB76-51BD-9468-A88C9A6F78D7}" + }, + "assetHint": "materials/presets/pbr/metal_cobalt_matte.azmaterial" + } + } + } + ] + } + } + }, + "Component_[8092226976542590265]": { + "$type": "EditorDisabledCompositionComponent", + "Id": 8092226976542590265 + } + } + }, + "Entity_[3902294583252]": { + "Id": "Entity_[3902294583252]", + "Name": "Entity1", + "Components": { + "Component_[11525365929370623807]": { + "$type": "EditorVisibilityComponent", + "Id": 11525365929370623807 + }, + "Component_[12334620273692642550]": { + "$type": "EditorLockComponent", + "Id": 12334620273692642550 + }, + "Component_[14389735759337977675]": { + "$type": "EditorPendingCompositionComponent", + "Id": 14389735759337977675 + }, + "Component_[16184381538555246534]": { + "$type": "AZ::Render::EditorMeshComponent", + "Id": 16184381538555246534, + "Controller": { + "Configuration": { + "ModelAsset": { + "assetId": { + "guid": "{E14975EF-E676-51A4-B826-3EF59CB645AA}", + "subId": 285127096 + }, + "assetHint": "testdata/objects/cube/cube.azmodel" + } + } + } + }, + "Component_[17962478023087084794]": { + "$type": "SelectionComponent", + "Id": 17962478023087084794 + }, + "Component_[18071675051915092508]": { + "$type": "EditorEntityIconComponent", + "Id": 18071675051915092508 + }, + "Component_[2115498007879087044]": { + "$type": "EditorInspectorComponent", + "Id": 2115498007879087044, + "ComponentOrderEntryArray": [ + { + "ComponentId": 399415038452606756 + }, + { + "ComponentId": 16184381538555246534, + "SortIndex": 1 + }, + { + "ComponentId": 7827190074535394331, + "SortIndex": 2 + } + ] + }, + "Component_[3518973002096080237]": { + "$type": "EditorOnlyEntityComponent", + "Id": 3518973002096080237 + }, + "Component_[399415038452606756]": { + "$type": "{27F1E1A1-8D9D-4C3B-BD3A-AFB9762449C0} TransformComponent", + "Id": 399415038452606756, + "Parent Entity": "ContainerEntity", + "Transform Data": { + "Translate": [ + 42.53014373779297, + -0.00018183141946792603, + 45.14218521118164 + ] + } + }, + "Component_[4564240319609068082]": { + "$type": "EditorEntitySortComponent", + "Id": 4564240319609068082 + }, + "Component_[7827190074535394331]": { + "$type": "EditorMaterialComponent", + "Id": 7827190074535394331, + "Controller": { + "Configuration": { + "materials": [ + { + "Key": { + "materialSlotStableId": 2418540911 + }, + "Value": { + "MaterialAsset": { + "assetId": { + "guid": "{FB4657EB-FB3A-5EC3-A772-DC36D6F733C3}" + }, + "assetHint": "materials/presets/pbr/metal_gold_polished.azmaterial" + } + } + } + ] + } + } + }, + "Component_[8092226976542590265]": { + "$type": "EditorDisabledCompositionComponent", + "Id": 8092226976542590265 + } + } + }, + "Entity_[3906589550548]": { + "Id": "Entity_[3906589550548]", + "Name": "Entity1", + "Components": { + "Component_[11525365929370623807]": { + "$type": "EditorVisibilityComponent", + "Id": 11525365929370623807 + }, + "Component_[12334620273692642550]": { + "$type": "EditorLockComponent", + "Id": 12334620273692642550 + }, + "Component_[14389735759337977675]": { + "$type": "EditorPendingCompositionComponent", + "Id": 14389735759337977675 + }, + "Component_[16184381538555246534]": { + "$type": "AZ::Render::EditorMeshComponent", + "Id": 16184381538555246534, + "Controller": { + "Configuration": { + "ModelAsset": { + "assetId": { + "guid": "{E14975EF-E676-51A4-B826-3EF59CB645AA}", + "subId": 285127096 + }, + "assetHint": "testdata/objects/cube/cube.azmodel" + } + } + } + }, + "Component_[17962478023087084794]": { + "$type": "SelectionComponent", + "Id": 17962478023087084794 + }, + "Component_[18071675051915092508]": { + "$type": "EditorEntityIconComponent", + "Id": 18071675051915092508 + }, + "Component_[2115498007879087044]": { + "$type": "EditorInspectorComponent", + "Id": 2115498007879087044, + "ComponentOrderEntryArray": [ + { + "ComponentId": 399415038452606756 + }, + { + "ComponentId": 16184381538555246534, + "SortIndex": 1 + }, + { + "ComponentId": 7827190074535394331, + "SortIndex": 2 + } + ] + }, + "Component_[3518973002096080237]": { + "$type": "EditorOnlyEntityComponent", + "Id": 3518973002096080237 + }, + "Component_[399415038452606756]": { + "$type": "{27F1E1A1-8D9D-4C3B-BD3A-AFB9762449C0} TransformComponent", + "Id": 399415038452606756, + "Parent Entity": "ContainerEntity", + "Transform Data": { + "Translate": [ + 2.5301437377929688, + -0.00018183141946792603, + 94.40913391113281 + ] + } + }, + "Component_[4564240319609068082]": { + "$type": "EditorEntitySortComponent", + "Id": 4564240319609068082 + }, + "Component_[7827190074535394331]": { + "$type": "EditorMaterialComponent", + "Id": 7827190074535394331, + "Controller": { + "Configuration": { + "materials": [ + { + "Key": { + "materialSlotStableId": 2418540911 + }, + "Value": { + "MaterialAsset": { + "assetId": { + "guid": "{60D4CA04-A2FE-5AE7-B472-694C38D05183}" + }, + "assetHint": "materials/presets/pbr/metal_platinum_matte.azmaterial" + } + } + } + ] + } + } + }, + "Component_[8092226976542590265]": { + "$type": "EditorDisabledCompositionComponent", + "Id": 8092226976542590265 + } + } + }, + "Entity_[3910884517844]": { + "Id": "Entity_[3910884517844]", + "Name": "Entity1", + "Components": { + "Component_[1057179753323467068]": { + "$type": "EditorMaterialComponent", + "Id": 1057179753323467068, + "Controller": { + "Configuration": { + "materials": [ + { + "Key": { + "materialSlotStableId": 2418540911 + }, + "Value": { + "MaterialAsset": { + "assetId": { + "guid": "{3F0DF0C4-5F23-5EB1-B762-7344AFFDC011}" + }, + "assetHint": "materials/presets/pbr/metal_titanium_polished.azmaterial" + } + } + } + ] + } + } + }, + "Component_[11525365929370623807]": { + "$type": "EditorVisibilityComponent", + "Id": 11525365929370623807 + }, + "Component_[12334620273692642550]": { + "$type": "EditorLockComponent", + "Id": 12334620273692642550 + }, + "Component_[14389735759337977675]": { + "$type": "EditorPendingCompositionComponent", + "Id": 14389735759337977675 + }, + "Component_[16184381538555246534]": { + "$type": "AZ::Render::EditorMeshComponent", + "Id": 16184381538555246534, + "Controller": { + "Configuration": { + "ModelAsset": { + "assetId": { + "guid": "{E14975EF-E676-51A4-B826-3EF59CB645AA}", + "subId": 285127096 + }, + "assetHint": "testdata/objects/cube/cube.azmodel" + } + } + } + }, + "Component_[17962478023087084794]": { + "$type": "SelectionComponent", + "Id": 17962478023087084794 + }, + "Component_[18071675051915092508]": { + "$type": "EditorEntityIconComponent", + "Id": 18071675051915092508 + }, + "Component_[2115498007879087044]": { + "$type": "EditorInspectorComponent", + "Id": 2115498007879087044, + "ComponentOrderEntryArray": [ + { + "ComponentId": 399415038452606756 + }, + { + "ComponentId": 16184381538555246534, + "SortIndex": 1 + }, + { + "ComponentId": 1057179753323467068, + "SortIndex": 2 + } + ] + }, + "Component_[3518973002096080237]": { + "$type": "EditorOnlyEntityComponent", + "Id": 3518973002096080237 + }, + "Component_[399415038452606756]": { + "$type": "{27F1E1A1-8D9D-4C3B-BD3A-AFB9762449C0} TransformComponent", + "Id": 399415038452606756, + "Parent Entity": "ContainerEntity", + "Transform Data": { + "Translate": [ + 12.530143737792969, + -0.00018183141946792603, + 30.08451271057129 + ] + } + }, + "Component_[4564240319609068082]": { + "$type": "EditorEntitySortComponent", + "Id": 4564240319609068082 + }, + "Component_[8092226976542590265]": { + "$type": "EditorDisabledCompositionComponent", + "Id": 8092226976542590265 + } + } + }, + "Entity_[3915179485140]": { + "Id": "Entity_[3915179485140]", + "Name": "Entity1", + "Components": { + "Component_[11525365929370623807]": { + "$type": "EditorVisibilityComponent", + "Id": 11525365929370623807 + }, + "Component_[12334620273692642550]": { + "$type": "EditorLockComponent", + "Id": 12334620273692642550 + }, + "Component_[14389735759337977675]": { + "$type": "EditorPendingCompositionComponent", + "Id": 14389735759337977675 + }, + "Component_[16184381538555246534]": { + "$type": "AZ::Render::EditorMeshComponent", + "Id": 16184381538555246534, + "Controller": { + "Configuration": { + "ModelAsset": { + "assetId": { + "guid": "{E14975EF-E676-51A4-B826-3EF59CB645AA}", + "subId": 285127096 + }, + "assetHint": "testdata/objects/cube/cube.azmodel" + } + } + } + }, + "Component_[17962478023087084794]": { + "$type": "SelectionComponent", + "Id": 17962478023087084794 + }, + "Component_[18071675051915092508]": { + "$type": "EditorEntityIconComponent", + "Id": 18071675051915092508 + }, + "Component_[2115498007879087044]": { + "$type": "EditorInspectorComponent", + "Id": 2115498007879087044, + "ComponentOrderEntryArray": [ + { + "ComponentId": 399415038452606756 + }, + { + "ComponentId": 16184381538555246534, + "SortIndex": 1 + }, + { + "ComponentId": 7827190074535394331, + "SortIndex": 2 + } + ] + }, + "Component_[3518973002096080237]": { + "$type": "EditorOnlyEntityComponent", + "Id": 3518973002096080237 + }, + "Component_[399415038452606756]": { + "$type": "{27F1E1A1-8D9D-4C3B-BD3A-AFB9762449C0} TransformComponent", + "Id": 399415038452606756, + "Parent Entity": "ContainerEntity", + "Transform Data": { + "Translate": [ + 7.530143737792969, + -0.00018183141946792603, + 114.4910659790039 + ] + } + }, + "Component_[4564240319609068082]": { + "$type": "EditorEntitySortComponent", + "Id": 4564240319609068082 + }, + "Component_[7827190074535394331]": { + "$type": "EditorMaterialComponent", + "Id": 7827190074535394331, + "Controller": { + "Configuration": { + "materials": [ + { + "Key": { + "materialSlotStableId": 2418540911 + }, + "Value": { + "MaterialAsset": { + "assetId": { + "guid": "{CDA13277-5EAB-5E2A-93F5-B7003597FBCE}" + }, + "assetHint": "materials/presets/pbr/metal_silver.azmaterial" + } + } + } + ] + } + } + }, + "Component_[8092226976542590265]": { + "$type": "EditorDisabledCompositionComponent", + "Id": 8092226976542590265 + } + } + }, + "Entity_[3919474452436]": { + "Id": "Entity_[3919474452436]", + "Name": "Entity1", + "Components": { + "Component_[11525365929370623807]": { + "$type": "EditorVisibilityComponent", + "Id": 11525365929370623807 + }, + "Component_[12334620273692642550]": { + "$type": "EditorLockComponent", + "Id": 12334620273692642550 + }, + "Component_[14389735759337977675]": { + "$type": "EditorPendingCompositionComponent", + "Id": 14389735759337977675 + }, + "Component_[16184381538555246534]": { + "$type": "AZ::Render::EditorMeshComponent", + "Id": 16184381538555246534, + "Controller": { + "Configuration": { + "ModelAsset": { + "assetId": { + "guid": "{E14975EF-E676-51A4-B826-3EF59CB645AA}", + "subId": 285127096 + }, + "assetHint": "testdata/objects/cube/cube.azmodel" + } + } + } + }, + "Component_[17962478023087084794]": { + "$type": "SelectionComponent", + "Id": 17962478023087084794 + }, + "Component_[18071675051915092508]": { + "$type": "EditorEntityIconComponent", + "Id": 18071675051915092508 + }, + "Component_[2115498007879087044]": { + "$type": "EditorInspectorComponent", + "Id": 2115498007879087044, + "ComponentOrderEntryArray": [ + { + "ComponentId": 399415038452606756 + }, + { + "ComponentId": 16184381538555246534, + "SortIndex": 1 + }, + { + "ComponentId": 7827190074535394331, + "SortIndex": 2 + } + ] + }, + "Component_[3518973002096080237]": { + "$type": "EditorOnlyEntityComponent", + "Id": 3518973002096080237 + }, + "Component_[399415038452606756]": { + "$type": "{27F1E1A1-8D9D-4C3B-BD3A-AFB9762449C0} TransformComponent", + "Id": 399415038452606756, + "Parent Entity": "ContainerEntity", + "Transform Data": { + "Translate": [ + 37.53014373779297, + -0.00018183141946792603, + 89.95755767822266 + ] + } + }, + "Component_[4564240319609068082]": { + "$type": "EditorEntitySortComponent", + "Id": 4564240319609068082 + }, + "Component_[7827190074535394331]": { + "$type": "EditorMaterialComponent", + "Id": 7827190074535394331, + "Controller": { + "Configuration": { + "materials": [ + { + "Key": { + "materialSlotStableId": 2418540911 + }, + "Value": { + "MaterialAsset": { + "assetId": { + "guid": "{CF5C7B01-4912-58AE-991A-F25251E505AC}" + }, + "assetHint": "materials/presets/pbr/metal_copper_polished.azmaterial" + } + } + } + ] + } + } + }, + "Component_[8092226976542590265]": { + "$type": "EditorDisabledCompositionComponent", + "Id": 8092226976542590265 + } + } + }, + "Entity_[3923769419732]": { + "Id": "Entity_[3923769419732]", + "Name": "Entity1", + "Components": { + "Component_[11525365929370623807]": { + "$type": "EditorVisibilityComponent", + "Id": 11525365929370623807 + }, + "Component_[12334620273692642550]": { + "$type": "EditorLockComponent", + "Id": 12334620273692642550 + }, + "Component_[14389735759337977675]": { + "$type": "EditorPendingCompositionComponent", + "Id": 14389735759337977675 + }, + "Component_[16184381538555246534]": { + "$type": "AZ::Render::EditorMeshComponent", + "Id": 16184381538555246534, + "Controller": { + "Configuration": { + "ModelAsset": { + "assetId": { + "guid": "{E14975EF-E676-51A4-B826-3EF59CB645AA}", + "subId": 285127096 + }, + "assetHint": "testdata/objects/cube/cube.azmodel" + } + } + } + }, + "Component_[17962478023087084794]": { + "$type": "SelectionComponent", + "Id": 17962478023087084794 + }, + "Component_[18071675051915092508]": { + "$type": "EditorEntityIconComponent", + "Id": 18071675051915092508 + }, + "Component_[2115498007879087044]": { + "$type": "EditorInspectorComponent", + "Id": 2115498007879087044, + "ComponentOrderEntryArray": [ + { + "ComponentId": 399415038452606756 + }, + { + "ComponentId": 16184381538555246534, + "SortIndex": 1 + }, + { + "ComponentId": 7827190074535394331, + "SortIndex": 2 + } + ] + }, + "Component_[3518973002096080237]": { + "$type": "EditorOnlyEntityComponent", + "Id": 3518973002096080237 + }, + "Component_[399415038452606756]": { + "$type": "{27F1E1A1-8D9D-4C3B-BD3A-AFB9762449C0} TransformComponent", + "Id": 399415038452606756, + "Parent Entity": "ContainerEntity", + "Transform Data": { + "Translate": [ + 17.53014373779297, + -0.00018183141946792603, + 49.593753814697266 + ] + } + }, + "Component_[4564240319609068082]": { + "$type": "EditorEntitySortComponent", + "Id": 4564240319609068082 + }, + "Component_[7827190074535394331]": { + "$type": "EditorMaterialComponent", + "Id": 7827190074535394331, + "Controller": { + "Configuration": { + "materials": [ + { + "Key": {}, + "Value": { + "MaterialAsset": { + "assetId": { + "guid": "{721188E0-B7CC-5D06-8D5D-39AF8ABF2EF9}" + }, + "assetHint": "materials/presets/pbr/metal_titanium.azmaterial" + } + } + }, + { + "Key": { + "materialSlotStableId": 2418540911 + }, + "Value": { + "MaterialAsset": { + "assetId": { + "guid": "{549D26B8-881D-569F-AF05-961F36A43F4F}" + }, + "assetHint": "materials/presets/pbr/metal_aluminum_matte.azmaterial" + } + } + } + ] + } + } + }, + "Component_[8092226976542590265]": { + "$type": "EditorDisabledCompositionComponent", + "Id": 8092226976542590265 + } + } + }, + "Entity_[3928064387028]": { + "Id": "Entity_[3928064387028]", + "Name": "Entity1", + "Components": { + "Component_[11525365929370623807]": { + "$type": "EditorVisibilityComponent", + "Id": 11525365929370623807 + }, + "Component_[12334620273692642550]": { + "$type": "EditorLockComponent", + "Id": 12334620273692642550 + }, + "Component_[14389735759337977675]": { + "$type": "EditorPendingCompositionComponent", + "Id": 14389735759337977675 + }, + "Component_[16184381538555246534]": { + "$type": "AZ::Render::EditorMeshComponent", + "Id": 16184381538555246534, + "Controller": { + "Configuration": { + "ModelAsset": { + "assetId": { + "guid": "{E14975EF-E676-51A4-B826-3EF59CB645AA}", + "subId": 285127096 + }, + "assetHint": "testdata/objects/cube/cube.azmodel" + } + } + } + }, + "Component_[17962478023087084794]": { + "$type": "SelectionComponent", + "Id": 17962478023087084794 + }, + "Component_[18071675051915092508]": { + "$type": "EditorEntityIconComponent", + "Id": 18071675051915092508 + }, + "Component_[2115498007879087044]": { + "$type": "EditorInspectorComponent", + "Id": 2115498007879087044, + "ComponentOrderEntryArray": [ + { + "ComponentId": 399415038452606756 + }, + { + "ComponentId": 16184381538555246534, + "SortIndex": 1 + }, + { + "ComponentId": 7827190074535394331, + "SortIndex": 2 + } + ] + }, + "Component_[3518973002096080237]": { + "$type": "EditorOnlyEntityComponent", + "Id": 3518973002096080237 + }, + "Component_[399415038452606756]": { + "$type": "{27F1E1A1-8D9D-4C3B-BD3A-AFB9762449C0} TransformComponent", + "Id": 399415038452606756, + "Parent Entity": "ContainerEntity", + "Transform Data": { + "Translate": [ + -12.530563354492188, + -0.00018183141946792603, + 114.4910659790039 + ] + } + }, + "Component_[4564240319609068082]": { + "$type": "EditorEntitySortComponent", + "Id": 4564240319609068082 + }, + "Component_[7827190074535394331]": { + "$type": "EditorMaterialComponent", + "Id": 7827190074535394331, + "Controller": { + "Configuration": { + "materials": [ + { + "Key": { + "materialSlotStableId": 2418540911 + }, + "Value": { + "MaterialAsset": { + "assetId": { + "guid": "{F2AD0EBF-7137-58D1-9991-9552FAD41B19}" + }, + "assetHint": "materials/presets/pbr/metal_mercury.azmaterial" + } + } + } + ] + } + } + }, + "Component_[8092226976542590265]": { + "$type": "EditorDisabledCompositionComponent", + "Id": 8092226976542590265 + } + } + }, + "Entity_[3932359354324]": { + "Id": "Entity_[3932359354324]", + "Name": "Entity1", + "Components": { + "Component_[11525365929370623807]": { + "$type": "EditorVisibilityComponent", + "Id": 11525365929370623807 + }, + "Component_[12334620273692642550]": { + "$type": "EditorLockComponent", + "Id": 12334620273692642550 + }, + "Component_[14389735759337977675]": { + "$type": "EditorPendingCompositionComponent", + "Id": 14389735759337977675 + }, + "Component_[16184381538555246534]": { + "$type": "AZ::Render::EditorMeshComponent", + "Id": 16184381538555246534, + "Controller": { + "Configuration": { + "ModelAsset": { + "assetId": { + "guid": "{E14975EF-E676-51A4-B826-3EF59CB645AA}", + "subId": 285127096 + }, + "assetHint": "testdata/objects/cube/cube.azmodel" + } + } + } + }, + "Component_[17962478023087084794]": { + "$type": "SelectionComponent", + "Id": 17962478023087084794 + }, + "Component_[18071675051915092508]": { + "$type": "EditorEntityIconComponent", + "Id": 18071675051915092508 + }, + "Component_[2115498007879087044]": { + "$type": "EditorInspectorComponent", + "Id": 2115498007879087044, + "ComponentOrderEntryArray": [ + { + "ComponentId": 399415038452606756 + }, + { + "ComponentId": 16184381538555246534, + "SortIndex": 1 + }, + { + "ComponentId": 7827190074535394331, + "SortIndex": 2 + } + ] + }, + "Component_[3518973002096080237]": { + "$type": "EditorOnlyEntityComponent", + "Id": 3518973002096080237 + }, + "Component_[399415038452606756]": { + "$type": "{27F1E1A1-8D9D-4C3B-BD3A-AFB9762449C0} TransformComponent", + "Id": 399415038452606756, + "Parent Entity": "ContainerEntity", + "Transform Data": { + "Translate": [ + -7.5305633544921875, + -0.00018183141946792603, + 24.533506393432617 + ] + } + }, + "Component_[4564240319609068082]": { + "$type": "EditorEntitySortComponent", + "Id": 4564240319609068082 + }, + "Component_[7827190074535394331]": { + "$type": "EditorMaterialComponent", + "Id": 7827190074535394331, + "Controller": { + "Configuration": { + "materials": [ + { + "Key": { + "materialSlotStableId": 2418540911 + }, + "Value": { + "MaterialAsset": { + "assetId": { + "guid": "{DD1E26AE-80FB-5DB6-8786-26D438190A38}" + }, + "assetHint": "materials/presets/pbr/metal_nickel.azmaterial" + } + } + } + ] + } + } + }, + "Component_[8092226976542590265]": { + "$type": "EditorDisabledCompositionComponent", + "Id": 8092226976542590265 + } + } + }, + "Entity_[3936654321620]": { + "Id": "Entity_[3936654321620]", + "Name": "Entity1", + "Components": { + "Component_[11525365929370623807]": { + "$type": "EditorVisibilityComponent", + "Id": 11525365929370623807 + }, + "Component_[12334620273692642550]": { + "$type": "EditorLockComponent", + "Id": 12334620273692642550 + }, + "Component_[14389735759337977675]": { + "$type": "EditorPendingCompositionComponent", + "Id": 14389735759337977675 + }, + "Component_[16184381538555246534]": { + "$type": "AZ::Render::EditorMeshComponent", + "Id": 16184381538555246534, + "Controller": { + "Configuration": { + "ModelAsset": { + "assetId": { + "guid": "{E14975EF-E676-51A4-B826-3EF59CB645AA}", + "subId": 285127096 + }, + "assetHint": "testdata/objects/cube/cube.azmodel" + } + } + } + }, + "Component_[17962478023087084794]": { + "$type": "SelectionComponent", + "Id": 17962478023087084794 + }, + "Component_[18071675051915092508]": { + "$type": "EditorEntityIconComponent", + "Id": 18071675051915092508 + }, + "Component_[2115498007879087044]": { + "$type": "EditorInspectorComponent", + "Id": 2115498007879087044, + "ComponentOrderEntryArray": [ + { + "ComponentId": 399415038452606756 + }, + { + "ComponentId": 16184381538555246534, + "SortIndex": 1 + }, + { + "ComponentId": 7827190074535394331, + "SortIndex": 2 + } + ] + }, + "Component_[3518973002096080237]": { + "$type": "EditorOnlyEntityComponent", + "Id": 3518973002096080237 + }, + "Component_[399415038452606756]": { + "$type": "{27F1E1A1-8D9D-4C3B-BD3A-AFB9762449C0} TransformComponent", + "Id": 399415038452606756, + "Parent Entity": "ContainerEntity", + "Transform Data": { + "Translate": [ + -32.53056335449219, + -0.00018183141946792603, + 79.38228607177734 + ] + } + }, + "Component_[4564240319609068082]": { + "$type": "EditorEntitySortComponent", + "Id": 4564240319609068082 + }, + "Component_[7827190074535394331]": { + "$type": "EditorMaterialComponent", + "Id": 7827190074535394331, + "Controller": { + "Configuration": { + "materials": [ + { + "Key": { + "materialSlotStableId": 2418540911 + }, + "Value": { + "MaterialAsset": { + "assetId": { + "guid": "{C60A39AF-BB76-51BD-9468-A88C9A6F78D7}" + }, + "assetHint": "materials/presets/pbr/metal_cobalt_matte.azmaterial" + } + } + } + ] + } + } + }, + "Component_[8092226976542590265]": { + "$type": "EditorDisabledCompositionComponent", + "Id": 8092226976542590265 + } + } + }, + "Entity_[3940949288916]": { + "Id": "Entity_[3940949288916]", + "Name": "Entity1", + "Components": { + "Component_[11525365929370623807]": { + "$type": "EditorVisibilityComponent", + "Id": 11525365929370623807 + }, + "Component_[12334620273692642550]": { + "$type": "EditorLockComponent", + "Id": 12334620273692642550 + }, + "Component_[14389735759337977675]": { + "$type": "EditorPendingCompositionComponent", + "Id": 14389735759337977675 + }, + "Component_[16184381538555246534]": { + "$type": "AZ::Render::EditorMeshComponent", + "Id": 16184381538555246534, + "Controller": { + "Configuration": { + "ModelAsset": { + "assetId": { + "guid": "{E14975EF-E676-51A4-B826-3EF59CB645AA}", + "subId": 285127096 + }, + "assetHint": "testdata/objects/cube/cube.azmodel" + } + } + } + }, + "Component_[17962478023087084794]": { + "$type": "SelectionComponent", + "Id": 17962478023087084794 + }, + "Component_[18071675051915092508]": { + "$type": "EditorEntityIconComponent", + "Id": 18071675051915092508 + }, + "Component_[2115498007879087044]": { + "$type": "EditorInspectorComponent", + "Id": 2115498007879087044, + "ComponentOrderEntryArray": [ + { + "ComponentId": 399415038452606756 + }, + { + "ComponentId": 16184381538555246534, + "SortIndex": 1 + }, + { + "ComponentId": 7827190074535394331, + "SortIndex": 2 + } + ] + }, + "Component_[3518973002096080237]": { + "$type": "EditorOnlyEntityComponent", + "Id": 3518973002096080237 + }, + "Component_[399415038452606756]": { + "$type": "{27F1E1A1-8D9D-4C3B-BD3A-AFB9762449C0} TransformComponent", + "Id": 399415038452606756, + "Parent Entity": "ContainerEntity", + "Transform Data": { + "Translate": [ + -22.530563354492188, + -0.00018183141946792603, + 9.475835800170898 + ] + } + }, + "Component_[4564240319609068082]": { + "$type": "EditorEntitySortComponent", + "Id": 4564240319609068082 + }, + "Component_[7827190074535394331]": { + "$type": "EditorMaterialComponent", + "Id": 7827190074535394331, + "Controller": { + "Configuration": { + "materials": [ + { + "Key": { + "materialSlotStableId": 2418540911 + }, + "Value": { + "MaterialAsset": { + "assetId": { + "guid": "{FE52E7C8-064D-506A-9C26-433EB93747DE}" + }, + "assetHint": "materials/presets/pbr/metal_gold.azmaterial" + } + } + } + ] + } + } + }, + "Component_[8092226976542590265]": { + "$type": "EditorDisabledCompositionComponent", + "Id": 8092226976542590265 + } + } + }, + "Entity_[3945244256212]": { + "Id": "Entity_[3945244256212]", + "Name": "Entity1", + "Components": { + "Component_[11525365929370623807]": { + "$type": "EditorVisibilityComponent", + "Id": 11525365929370623807 + }, + "Component_[12334620273692642550]": { + "$type": "EditorLockComponent", + "Id": 12334620273692642550 + }, + "Component_[14389735759337977675]": { + "$type": "EditorPendingCompositionComponent", + "Id": 14389735759337977675 + }, + "Component_[16184381538555246534]": { + "$type": "AZ::Render::EditorMeshComponent", + "Id": 16184381538555246534, + "Controller": { + "Configuration": { + "ModelAsset": { + "assetId": { + "guid": "{E14975EF-E676-51A4-B826-3EF59CB645AA}", + "subId": 285127096 + }, + "assetHint": "testdata/objects/cube/cube.azmodel" + } + } + } + }, + "Component_[17962478023087084794]": { + "$type": "SelectionComponent", + "Id": 17962478023087084794 + }, + "Component_[18071675051915092508]": { + "$type": "EditorEntityIconComponent", + "Id": 18071675051915092508 + }, + "Component_[2115498007879087044]": { + "$type": "EditorInspectorComponent", + "Id": 2115498007879087044, + "ComponentOrderEntryArray": [ + { + "ComponentId": 399415038452606756 + }, + { + "ComponentId": 16184381538555246534, + "SortIndex": 1 + }, + { + "ComponentId": 7827190074535394331, + "SortIndex": 2 + } + ] + }, + "Component_[3518973002096080237]": { + "$type": "EditorOnlyEntityComponent", + "Id": 3518973002096080237 + }, + "Component_[399415038452606756]": { + "$type": "{27F1E1A1-8D9D-4C3B-BD3A-AFB9762449C0} TransformComponent", + "Id": 399415038452606756, + "Parent Entity": "ContainerEntity", + "Transform Data": { + "Translate": [ + -32.53056335449219, + -0.00018183141946792603, + 114.4910659790039 + ] + } + }, + "Component_[4564240319609068082]": { + "$type": "EditorEntitySortComponent", + "Id": 4564240319609068082 + }, + "Component_[7827190074535394331]": { + "$type": "EditorMaterialComponent", + "Id": 7827190074535394331, + "Controller": { + "Configuration": { + "materials": [ + { + "Key": { + "materialSlotStableId": 2418540911 + }, + "Value": { + "MaterialAsset": { + "assetId": { + "guid": "{99976D73-6248-5D66-AD15-E8F52B0AFE36}" + }, + "assetHint": "materials/presets/pbr/metal_cobalt.azmaterial" + } + } + } + ] + } + } + }, + "Component_[8092226976542590265]": { + "$type": "EditorDisabledCompositionComponent", + "Id": 8092226976542590265 + } + } + }, + "Entity_[3949539223508]": { + "Id": "Entity_[3949539223508]", + "Name": "Entity1", + "Components": { + "Component_[11525365929370623807]": { + "$type": "EditorVisibilityComponent", + "Id": 11525365929370623807 + }, + "Component_[12334620273692642550]": { + "$type": "EditorLockComponent", + "Id": 12334620273692642550 + }, + "Component_[14389735759337977675]": { + "$type": "EditorPendingCompositionComponent", + "Id": 14389735759337977675 + }, + "Component_[16184381538555246534]": { + "$type": "AZ::Render::EditorMeshComponent", + "Id": 16184381538555246534, + "Controller": { + "Configuration": { + "ModelAsset": { + "assetId": { + "guid": "{E14975EF-E676-51A4-B826-3EF59CB645AA}", + "subId": 285127096 + }, + "assetHint": "testdata/objects/cube/cube.azmodel" + } + } + } + }, + "Component_[17962478023087084794]": { + "$type": "SelectionComponent", + "Id": 17962478023087084794 + }, + "Component_[18071675051915092508]": { + "$type": "EditorEntityIconComponent", + "Id": 18071675051915092508 + }, + "Component_[2115498007879087044]": { + "$type": "EditorInspectorComponent", + "Id": 2115498007879087044, + "ComponentOrderEntryArray": [ + { + "ComponentId": 399415038452606756 + }, + { + "ComponentId": 16184381538555246534, + "SortIndex": 1 + }, + { + "ComponentId": 7827190074535394331, + "SortIndex": 2 + } + ] + }, + "Component_[3518973002096080237]": { + "$type": "EditorOnlyEntityComponent", + "Id": 3518973002096080237 + }, + "Component_[399415038452606756]": { + "$type": "{27F1E1A1-8D9D-4C3B-BD3A-AFB9762449C0} TransformComponent", + "Id": 399415038452606756, + "Parent Entity": "ContainerEntity", + "Transform Data": { + "Translate": [ + 37.53014373779297, + 0.010651908814907074, + 24.573455810546875 + ] + } + }, + "Component_[4564240319609068082]": { + "$type": "EditorEntitySortComponent", + "Id": 4564240319609068082 + }, + "Component_[7827190074535394331]": { + "$type": "EditorMaterialComponent", + "Id": 7827190074535394331, + "Controller": { + "Configuration": { + "materials": [ + { + "Key": { + "materialSlotStableId": 2418540911 + }, + "Value": { + "MaterialAsset": { + "assetId": { + "guid": "{E621C5BF-B8E1-55F0-A791-EC960F2FA46F}" + }, + "assetHint": "materials/presets/pbr/metal_copper.azmaterial" + } + } + } + ] + } + } + }, + "Component_[8092226976542590265]": { + "$type": "EditorDisabledCompositionComponent", + "Id": 8092226976542590265 + } + } + }, + "Entity_[3953834190804]": { + "Id": "Entity_[3953834190804]", + "Name": "Entity1", + "Components": { + "Component_[11525365929370623807]": { + "$type": "EditorVisibilityComponent", + "Id": 11525365929370623807 + }, + "Component_[12334620273692642550]": { + "$type": "EditorLockComponent", + "Id": 12334620273692642550 + }, + "Component_[14389735759337977675]": { + "$type": "EditorPendingCompositionComponent", + "Id": 14389735759337977675 + }, + "Component_[16184381538555246534]": { + "$type": "AZ::Render::EditorMeshComponent", + "Id": 16184381538555246534, + "Controller": { + "Configuration": { + "ModelAsset": { + "assetId": { + "guid": "{E14975EF-E676-51A4-B826-3EF59CB645AA}", + "subId": 285127096 + }, + "assetHint": "testdata/objects/cube/cube.azmodel" + } + } + } + }, + "Component_[17962478023087084794]": { + "$type": "SelectionComponent", + "Id": 17962478023087084794 + }, + "Component_[18071675051915092508]": { + "$type": "EditorEntityIconComponent", + "Id": 18071675051915092508 + }, + "Component_[2115498007879087044]": { + "$type": "EditorInspectorComponent", + "Id": 2115498007879087044, + "ComponentOrderEntryArray": [ + { + "ComponentId": 399415038452606756 + }, + { + "ComponentId": 16184381538555246534, + "SortIndex": 1 + }, + { + "ComponentId": 7827190074535394331, + "SortIndex": 2 + } + ] + }, + "Component_[3518973002096080237]": { + "$type": "EditorOnlyEntityComponent", + "Id": 3518973002096080237 + }, + "Component_[399415038452606756]": { + "$type": "{27F1E1A1-8D9D-4C3B-BD3A-AFB9762449C0} TransformComponent", + "Id": 399415038452606756, + "Parent Entity": "ContainerEntity", + "Transform Data": { + "Translate": [ + -37.53056335449219, + -0.00018183141946792603, + 30.08451271057129 + ] + } + }, + "Component_[4564240319609068082]": { + "$type": "EditorEntitySortComponent", + "Id": 4564240319609068082 + }, + "Component_[7827190074535394331]": { + "$type": "EditorMaterialComponent", + "Id": 7827190074535394331, + "Controller": { + "Configuration": { + "materials": [ + { + "Key": { + "materialSlotStableId": 2418540911 + }, + "Value": { + "MaterialAsset": { + "assetId": { + "guid": "{CAF50181-3384-5DF2-9304-C6E48E83C72D}" + }, + "assetHint": "materials/presets/pbr/metal_chrome_polished.azmaterial" + } + } + } + ] + } + } + }, + "Component_[8092226976542590265]": { + "$type": "EditorDisabledCompositionComponent", + "Id": 8092226976542590265 + } + } + }, + "Entity_[3958129158100]": { + "Id": "Entity_[3958129158100]", + "Name": "Entity1", + "Components": { + "Component_[11525365929370623807]": { + "$type": "EditorVisibilityComponent", + "Id": 11525365929370623807 + }, + "Component_[12334620273692642550]": { + "$type": "EditorLockComponent", + "Id": 12334620273692642550 + }, + "Component_[14389735759337977675]": { + "$type": "EditorPendingCompositionComponent", + "Id": 14389735759337977675 + }, + "Component_[16184381538555246534]": { + "$type": "AZ::Render::EditorMeshComponent", + "Id": 16184381538555246534, + "Controller": { + "Configuration": { + "ModelAsset": { + "assetId": { + "guid": "{E14975EF-E676-51A4-B826-3EF59CB645AA}", + "subId": 285127096 + }, + "assetHint": "testdata/objects/cube/cube.azmodel" + } + } + } + }, + "Component_[17962478023087084794]": { + "$type": "SelectionComponent", + "Id": 17962478023087084794 + }, + "Component_[18071675051915092508]": { + "$type": "EditorEntityIconComponent", + "Id": 18071675051915092508 + }, + "Component_[2115498007879087044]": { + "$type": "EditorInspectorComponent", + "Id": 2115498007879087044, + "ComponentOrderEntryArray": [ + { + "ComponentId": 399415038452606756 + }, + { + "ComponentId": 16184381538555246534, + "SortIndex": 1 + }, + { + "ComponentId": 7827190074535394331, + "SortIndex": 2 + } + ] + }, + "Component_[3518973002096080237]": { + "$type": "EditorOnlyEntityComponent", + "Id": 3518973002096080237 + }, + "Component_[399415038452606756]": { + "$type": "{27F1E1A1-8D9D-4C3B-BD3A-AFB9762449C0} TransformComponent", + "Id": 399415038452606756, + "Parent Entity": "ContainerEntity", + "Transform Data": { + "Translate": [ + -22.530563354492188, + -0.00018183141946792603, + 79.38228607177734 + ] + } + }, + "Component_[4564240319609068082]": { + "$type": "EditorEntitySortComponent", + "Id": 4564240319609068082 + }, + "Component_[7827190074535394331]": { + "$type": "EditorMaterialComponent", + "Id": 7827190074535394331, + "Controller": { + "Configuration": { + "materials": [ + { + "Key": { + "materialSlotStableId": 2418540911 + }, + "Value": { + "MaterialAsset": { + "assetId": { + "guid": "{5BC13D95-377E-53EA-9A93-156384BE8B04}" + }, + "assetHint": "materials/presets/pbr/metal_gold_matte.azmaterial" + } + } + } + ] + } + } + }, + "Component_[8092226976542590265]": { + "$type": "EditorDisabledCompositionComponent", + "Id": 8092226976542590265 + } + } + }, + "Entity_[3962424125396]": { + "Id": "Entity_[3962424125396]", + "Name": "Entity1", + "Components": { + "Component_[11525365929370623807]": { + "$type": "EditorVisibilityComponent", + "Id": 11525365929370623807 + }, + "Component_[12334620273692642550]": { + "$type": "EditorLockComponent", + "Id": 12334620273692642550 + }, + "Component_[14389735759337977675]": { + "$type": "EditorPendingCompositionComponent", + "Id": 14389735759337977675 + }, + "Component_[16184381538555246534]": { + "$type": "AZ::Render::EditorMeshComponent", + "Id": 16184381538555246534, + "Controller": { + "Configuration": { + "ModelAsset": { + "assetId": { + "guid": "{E14975EF-E676-51A4-B826-3EF59CB645AA}", + "subId": 285127096 + }, + "assetHint": "testdata/objects/cube/cube.azmodel" + } + } + } + }, + "Component_[17962478023087084794]": { + "$type": "SelectionComponent", + "Id": 17962478023087084794 + }, + "Component_[18071675051915092508]": { + "$type": "EditorEntityIconComponent", + "Id": 18071675051915092508 + }, + "Component_[2115498007879087044]": { + "$type": "EditorInspectorComponent", + "Id": 2115498007879087044, + "ComponentOrderEntryArray": [ + { + "ComponentId": 399415038452606756 + }, + { + "ComponentId": 16184381538555246534, + "SortIndex": 1 + }, + { + "ComponentId": 7827190074535394331, + "SortIndex": 2 + } + ] + }, + "Component_[3518973002096080237]": { + "$type": "EditorOnlyEntityComponent", + "Id": 3518973002096080237 + }, + "Component_[399415038452606756]": { + "$type": "{27F1E1A1-8D9D-4C3B-BD3A-AFB9762449C0} TransformComponent", + "Id": 399415038452606756, + "Parent Entity": "ContainerEntity", + "Transform Data": { + "Translate": [ + -17.530563354492188, + -0.00018183141946792603, + 64.32462310791016 + ] + } + }, + "Component_[4564240319609068082]": { + "$type": "EditorEntitySortComponent", + "Id": 4564240319609068082 + }, + "Component_[7827190074535394331]": { + "$type": "EditorMaterialComponent", + "Id": 7827190074535394331, + "Controller": { + "Configuration": { + "materials": [ + { + "Key": { + "materialSlotStableId": 2418540911 + }, + "Value": { + "MaterialAsset": { + "assetId": { + "guid": "{970148AC-7258-5EC8-9CE7-F4EF93164D93}" + }, + "assetHint": "materials/presets/pbr/metal_iron_matte.azmaterial" + } + } + } + ] + } + } + }, + "Component_[8092226976542590265]": { + "$type": "EditorDisabledCompositionComponent", + "Id": 8092226976542590265 + } + } + }, + "Entity_[3966719092692]": { + "Id": "Entity_[3966719092692]", + "Name": "Entity1", + "Components": { + "Component_[11525365929370623807]": { + "$type": "EditorVisibilityComponent", + "Id": 11525365929370623807 + }, + "Component_[12334620273692642550]": { + "$type": "EditorLockComponent", + "Id": 12334620273692642550 + }, + "Component_[14389735759337977675]": { + "$type": "EditorPendingCompositionComponent", + "Id": 14389735759337977675 + }, + "Component_[16184381538555246534]": { + "$type": "AZ::Render::EditorMeshComponent", + "Id": 16184381538555246534, + "Controller": { + "Configuration": { + "ModelAsset": { + "assetId": { + "guid": "{E14975EF-E676-51A4-B826-3EF59CB645AA}", + "subId": 285127096 + }, + "assetHint": "testdata/objects/cube/cube.azmodel" + } + } + } + }, + "Component_[17962478023087084794]": { + "$type": "SelectionComponent", + "Id": 17962478023087084794 + }, + "Component_[18071675051915092508]": { + "$type": "EditorEntityIconComponent", + "Id": 18071675051915092508 + }, + "Component_[2115498007879087044]": { + "$type": "EditorInspectorComponent", + "Id": 2115498007879087044, + "ComponentOrderEntryArray": [ + { + "ComponentId": 399415038452606756 + }, + { + "ComponentId": 16184381538555246534, + "SortIndex": 1 + }, + { + "ComponentId": 7827190074535394331, + "SortIndex": 2 + } + ] + }, + "Component_[3518973002096080237]": { + "$type": "EditorOnlyEntityComponent", + "Id": 3518973002096080237 + }, + "Component_[399415038452606756]": { + "$type": "{27F1E1A1-8D9D-4C3B-BD3A-AFB9762449C0} TransformComponent", + "Id": 399415038452606756, + "Parent Entity": "ContainerEntity", + "Transform Data": { + "Translate": [ + -32.53056335449219, + -0.00018183141946792603, + 69.34888458251953 + ] + } + }, + "Component_[4564240319609068082]": { + "$type": "EditorEntitySortComponent", + "Id": 4564240319609068082 + }, + "Component_[7827190074535394331]": { + "$type": "EditorMaterialComponent", + "Id": 7827190074535394331, + "Controller": { + "Configuration": { + "materials": [ + { + "Key": { + "materialSlotStableId": 2418540911 + }, + "Value": { + "MaterialAsset": { + "assetId": { + "guid": "{99976D73-6248-5D66-AD15-E8F52B0AFE36}" + }, + "assetHint": "materials/presets/pbr/metal_cobalt.azmaterial" + } + } + } + ] + } + } + }, + "Component_[8092226976542590265]": { + "$type": "EditorDisabledCompositionComponent", + "Id": 8092226976542590265 + } + } + }, + "Entity_[3971014059988]": { + "Id": "Entity_[3971014059988]", + "Name": "Entity1", + "Components": { + "Component_[11525365929370623807]": { + "$type": "EditorVisibilityComponent", + "Id": 11525365929370623807 + }, + "Component_[12334620273692642550]": { + "$type": "EditorLockComponent", + "Id": 12334620273692642550 + }, + "Component_[14389735759337977675]": { + "$type": "EditorPendingCompositionComponent", + "Id": 14389735759337977675 + }, + "Component_[16184381538555246534]": { + "$type": "AZ::Render::EditorMeshComponent", + "Id": 16184381538555246534, + "Controller": { + "Configuration": { + "ModelAsset": { + "assetId": { + "guid": "{E14975EF-E676-51A4-B826-3EF59CB645AA}", + "subId": 285127096 + }, + "assetHint": "testdata/objects/cube/cube.azmodel" + } + } + } + }, + "Component_[17962478023087084794]": { + "$type": "SelectionComponent", + "Id": 17962478023087084794 + }, + "Component_[18071675051915092508]": { + "$type": "EditorEntityIconComponent", + "Id": 18071675051915092508 + }, + "Component_[2115498007879087044]": { + "$type": "EditorInspectorComponent", + "Id": 2115498007879087044, + "ComponentOrderEntryArray": [ + { + "ComponentId": 399415038452606756 + }, + { + "ComponentId": 16184381538555246534, + "SortIndex": 1 + }, + { + "ComponentId": 7827190074535394331, + "SortIndex": 2 + } + ] + }, + "Component_[3518973002096080237]": { + "$type": "EditorOnlyEntityComponent", + "Id": 3518973002096080237 + }, + "Component_[399415038452606756]": { + "$type": "{27F1E1A1-8D9D-4C3B-BD3A-AFB9762449C0} TransformComponent", + "Id": 399415038452606756, + "Parent Entity": "ContainerEntity", + "Transform Data": { + "Translate": [ + -27.530563354492188, + -0.00018183141946792603, + 49.593753814697266 + ] + } + }, + "Component_[4564240319609068082]": { + "$type": "EditorEntitySortComponent", + "Id": 4564240319609068082 + }, + "Component_[7827190074535394331]": { + "$type": "EditorMaterialComponent", + "Id": 7827190074535394331, + "Controller": { + "Configuration": { + "materials": [ + { + "Key": { + "materialSlotStableId": 2418540911 + }, + "Value": { + "MaterialAsset": { + "assetId": { + "guid": "{2D054071-BEF7-53C0-A8C9-E4F026BD8364}" + }, + "assetHint": "materials/presets/pbr/metal_copper_matte.azmaterial" + } + } + } + ] + } + } + }, + "Component_[8092226976542590265]": { + "$type": "EditorDisabledCompositionComponent", + "Id": 8092226976542590265 + } + } + }, + "Entity_[3975309027284]": { + "Id": "Entity_[3975309027284]", + "Name": "Entity1", + "Components": { + "Component_[11525365929370623807]": { + "$type": "EditorVisibilityComponent", + "Id": 11525365929370623807 + }, + "Component_[12334620273692642550]": { + "$type": "EditorLockComponent", + "Id": 12334620273692642550 + }, + "Component_[14389735759337977675]": { + "$type": "EditorPendingCompositionComponent", + "Id": 14389735759337977675 + }, + "Component_[16184381538555246534]": { + "$type": "AZ::Render::EditorMeshComponent", + "Id": 16184381538555246534, + "Controller": { + "Configuration": { + "ModelAsset": { + "assetId": { + "guid": "{E14975EF-E676-51A4-B826-3EF59CB645AA}", + "subId": 285127096 + }, + "assetHint": "testdata/objects/cube/cube.azmodel" + } + } + } + }, + "Component_[17962478023087084794]": { + "$type": "SelectionComponent", + "Id": 17962478023087084794 + }, + "Component_[18071675051915092508]": { + "$type": "EditorEntityIconComponent", + "Id": 18071675051915092508 + }, + "Component_[2115498007879087044]": { + "$type": "EditorInspectorComponent", + "Id": 2115498007879087044, + "ComponentOrderEntryArray": [ + { + "ComponentId": 399415038452606756 + }, + { + "ComponentId": 16184381538555246534, + "SortIndex": 1 + }, + { + "ComponentId": 7827190074535394331, + "SortIndex": 2 + } + ] + }, + "Component_[3518973002096080237]": { + "$type": "EditorOnlyEntityComponent", + "Id": 3518973002096080237 + }, + "Component_[399415038452606756]": { + "$type": "{27F1E1A1-8D9D-4C3B-BD3A-AFB9762449C0} TransformComponent", + "Id": 399415038452606756, + "Parent Entity": "ContainerEntity", + "Transform Data": { + "Translate": [ + -22.530563354492188, + -0.00018183141946792603, + 64.32462310791016 + ] + } + }, + "Component_[4564240319609068082]": { + "$type": "EditorEntitySortComponent", + "Id": 4564240319609068082 + }, + "Component_[7827190074535394331]": { + "$type": "EditorMaterialComponent", + "Id": 7827190074535394331, + "Controller": { + "Configuration": { + "materials": [ + { + "Key": { + "materialSlotStableId": 2418540911 + }, + "Value": { + "MaterialAsset": { + "assetId": { + "guid": "{5BC13D95-377E-53EA-9A93-156384BE8B04}" + }, + "assetHint": "materials/presets/pbr/metal_gold_matte.azmaterial" + } + } + } + ] + } + } + }, + "Component_[8092226976542590265]": { + "$type": "EditorDisabledCompositionComponent", + "Id": 8092226976542590265 + } + } + }, + "Entity_[3979603994580]": { + "Id": "Entity_[3979603994580]", + "Name": "Entity1", + "Components": { + "Component_[1057179753323467068]": { + "$type": "EditorMaterialComponent", + "Id": 1057179753323467068, + "Controller": { + "Configuration": { + "materials": [ + { + "Key": { + "materialSlotStableId": 2418540911 + }, + "Value": { + "MaterialAsset": { + "assetId": { + "guid": "{3F0DF0C4-5F23-5EB1-B762-7344AFFDC011}" + }, + "assetHint": "materials/presets/pbr/metal_titanium_polished.azmaterial" + } + } + } + ] + } + } + }, + "Component_[11525365929370623807]": { + "$type": "EditorVisibilityComponent", + "Id": 11525365929370623807 + }, + "Component_[12334620273692642550]": { + "$type": "EditorLockComponent", + "Id": 12334620273692642550 + }, + "Component_[14389735759337977675]": { + "$type": "EditorPendingCompositionComponent", + "Id": 14389735759337977675 + }, + "Component_[16184381538555246534]": { + "$type": "AZ::Render::EditorMeshComponent", + "Id": 16184381538555246534, + "Controller": { + "Configuration": { + "ModelAsset": { + "assetId": { + "guid": "{E14975EF-E676-51A4-B826-3EF59CB645AA}", + "subId": 285127096 + }, + "assetHint": "testdata/objects/cube/cube.azmodel" + } + } + } + }, + "Component_[17962478023087084794]": { + "$type": "SelectionComponent", + "Id": 17962478023087084794 + }, + "Component_[18071675051915092508]": { + "$type": "EditorEntityIconComponent", + "Id": 18071675051915092508 + }, + "Component_[2115498007879087044]": { + "$type": "EditorInspectorComponent", + "Id": 2115498007879087044, + "ComponentOrderEntryArray": [ + { + "ComponentId": 399415038452606756 + }, + { + "ComponentId": 16184381538555246534, + "SortIndex": 1 + }, + { + "ComponentId": 1057179753323467068, + "SortIndex": 2 + } + ] + }, + "Component_[3518973002096080237]": { + "$type": "EditorOnlyEntityComponent", + "Id": 3518973002096080237 + }, + "Component_[399415038452606756]": { + "$type": "{27F1E1A1-8D9D-4C3B-BD3A-AFB9762449C0} TransformComponent", + "Id": 399415038452606756, + "Parent Entity": "ContainerEntity", + "Transform Data": { + "Translate": [ + 12.530143737792969, + -0.00018183141946792603, + 89.95755767822266 + ] + } + }, + "Component_[4564240319609068082]": { + "$type": "EditorEntitySortComponent", + "Id": 4564240319609068082 + }, + "Component_[8092226976542590265]": { + "$type": "EditorDisabledCompositionComponent", + "Id": 8092226976542590265 + } + } + }, + "Entity_[3983898961876]": { + "Id": "Entity_[3983898961876]", + "Name": "Entity1", + "Components": { + "Component_[11525365929370623807]": { + "$type": "EditorVisibilityComponent", + "Id": 11525365929370623807 + }, + "Component_[12334620273692642550]": { + "$type": "EditorLockComponent", + "Id": 12334620273692642550 + }, + "Component_[14389735759337977675]": { + "$type": "EditorPendingCompositionComponent", + "Id": 14389735759337977675 + }, + "Component_[16184381538555246534]": { + "$type": "AZ::Render::EditorMeshComponent", + "Id": 16184381538555246534, + "Controller": { + "Configuration": { + "ModelAsset": { + "assetId": { + "guid": "{E14975EF-E676-51A4-B826-3EF59CB645AA}", + "subId": 285127096 + }, + "assetHint": "testdata/objects/cube/cube.azmodel" + } + } + } + }, + "Component_[17962478023087084794]": { + "$type": "SelectionComponent", + "Id": 17962478023087084794 + }, + "Component_[18071675051915092508]": { + "$type": "EditorEntityIconComponent", + "Id": 18071675051915092508 + }, + "Component_[2115498007879087044]": { + "$type": "EditorInspectorComponent", + "Id": 2115498007879087044, + "ComponentOrderEntryArray": [ + { + "ComponentId": 399415038452606756 + }, + { + "ComponentId": 16184381538555246534, + "SortIndex": 1 + }, + { + "ComponentId": 7827190074535394331, + "SortIndex": 2 + } + ] + }, + "Component_[3518973002096080237]": { + "$type": "EditorOnlyEntityComponent", + "Id": 3518973002096080237 + }, + "Component_[399415038452606756]": { + "$type": "{27F1E1A1-8D9D-4C3B-BD3A-AFB9762449C0} TransformComponent", + "Id": 399415038452606756, + "Parent Entity": "ContainerEntity", + "Transform Data": { + "Translate": [ + 2.5301437377929688, + -0.00018183141946792603, + 74.93071746826172 + ] + } + }, + "Component_[4564240319609068082]": { + "$type": "EditorEntitySortComponent", + "Id": 4564240319609068082 + }, + "Component_[7827190074535394331]": { + "$type": "EditorMaterialComponent", + "Id": 7827190074535394331, + "Controller": { + "Configuration": { + "materials": [ + { + "Key": { + "materialSlotStableId": 2418540911 + }, + "Value": { + "MaterialAsset": { + "assetId": { + "guid": "{79419183-FFCE-5A89-AA16-C2789D81AF75}" + }, + "assetHint": "materials/presets/pbr/metal_platinum_polished.azmaterial" + } + } + } + ] + } + } + }, + "Component_[8092226976542590265]": { + "$type": "EditorDisabledCompositionComponent", + "Id": 8092226976542590265 + } + } + }, + "Entity_[3988193929172]": { + "Id": "Entity_[3988193929172]", + "Name": "Entity1", + "Components": { + "Component_[11525365929370623807]": { + "$type": "EditorVisibilityComponent", + "Id": 11525365929370623807 + }, + "Component_[12334620273692642550]": { + "$type": "EditorLockComponent", + "Id": 12334620273692642550 + }, + "Component_[14389735759337977675]": { + "$type": "EditorPendingCompositionComponent", + "Id": 14389735759337977675 + }, + "Component_[16184381538555246534]": { + "$type": "AZ::Render::EditorMeshComponent", + "Id": 16184381538555246534, + "Controller": { + "Configuration": { + "ModelAsset": { + "assetId": { + "guid": "{E14975EF-E676-51A4-B826-3EF59CB645AA}", + "subId": 285127096 + }, + "assetHint": "testdata/objects/cube/cube.azmodel" + } + } + } + }, + "Component_[17962478023087084794]": { + "$type": "SelectionComponent", + "Id": 17962478023087084794 + }, + "Component_[18071675051915092508]": { + "$type": "EditorEntityIconComponent", + "Id": 18071675051915092508 + }, + "Component_[2115498007879087044]": { + "$type": "EditorInspectorComponent", + "Id": 2115498007879087044, + "ComponentOrderEntryArray": [ + { + "ComponentId": 399415038452606756 + }, + { + "ComponentId": 16184381538555246534, + "SortIndex": 1 + }, + { + "ComponentId": 7827190074535394331, + "SortIndex": 2 + } + ] + }, + "Component_[3518973002096080237]": { + "$type": "EditorOnlyEntityComponent", + "Id": 3518973002096080237 + }, + "Component_[399415038452606756]": { + "$type": "{27F1E1A1-8D9D-4C3B-BD3A-AFB9762449C0} TransformComponent", + "Id": 399415038452606756, + "Parent Entity": "ContainerEntity", + "Transform Data": { + "Translate": [ + -22.530563354492188, + -0.00018183141946792603, + 59.873046875 + ] + } + }, + "Component_[4564240319609068082]": { + "$type": "EditorEntitySortComponent", + "Id": 4564240319609068082 + }, + "Component_[7827190074535394331]": { + "$type": "EditorMaterialComponent", + "Id": 7827190074535394331, + "Controller": { + "Configuration": { + "materials": [ + { + "Key": { + "materialSlotStableId": 2418540911 + }, + "Value": { + "MaterialAsset": { + "assetId": { + "guid": "{FB4657EB-FB3A-5EC3-A772-DC36D6F733C3}" + }, + "assetHint": "materials/presets/pbr/metal_gold_polished.azmaterial" + } + } + } + ] + } + } + }, + "Component_[8092226976542590265]": { + "$type": "EditorDisabledCompositionComponent", + "Id": 8092226976542590265 + } + } + }, + "Entity_[3992488896468]": { + "Id": "Entity_[3992488896468]", + "Name": "Entity1", + "Components": { + "Component_[11525365929370623807]": { + "$type": "EditorVisibilityComponent", + "Id": 11525365929370623807 + }, + "Component_[12334620273692642550]": { + "$type": "EditorLockComponent", + "Id": 12334620273692642550 + }, + "Component_[14389735759337977675]": { + "$type": "EditorPendingCompositionComponent", + "Id": 14389735759337977675 + }, + "Component_[16184381538555246534]": { + "$type": "AZ::Render::EditorMeshComponent", + "Id": 16184381538555246534, + "Controller": { + "Configuration": { + "ModelAsset": { + "assetId": { + "guid": "{E14975EF-E676-51A4-B826-3EF59CB645AA}", + "subId": 285127096 + }, + "assetHint": "testdata/objects/cube/cube.azmodel" + } + } + } + }, + "Component_[17962478023087084794]": { + "$type": "SelectionComponent", + "Id": 17962478023087084794 + }, + "Component_[18071675051915092508]": { + "$type": "EditorEntityIconComponent", + "Id": 18071675051915092508 + }, + "Component_[2115498007879087044]": { + "$type": "EditorInspectorComponent", + "Id": 2115498007879087044, + "ComponentOrderEntryArray": [ + { + "ComponentId": 399415038452606756 + }, + { + "ComponentId": 16184381538555246534, + "SortIndex": 1 + }, + { + "ComponentId": 7827190074535394331, + "SortIndex": 2 + } + ] + }, + "Component_[3518973002096080237]": { + "$type": "EditorOnlyEntityComponent", + "Id": 3518973002096080237 + }, + "Component_[399415038452606756]": { + "$type": "{27F1E1A1-8D9D-4C3B-BD3A-AFB9762449C0} TransformComponent", + "Id": 399415038452606756, + "Parent Entity": "ContainerEntity", + "Transform Data": { + "Translate": [ + -7.5305633544921875, + -0.00018183141946792603, + 64.32462310791016 + ] + } + }, + "Component_[4564240319609068082]": { + "$type": "EditorEntitySortComponent", + "Id": 4564240319609068082 + }, + "Component_[7827190074535394331]": { + "$type": "EditorMaterialComponent", + "Id": 7827190074535394331, + "Controller": { + "Configuration": { + "materials": [ + { + "Key": { + "materialSlotStableId": 2418540911 + }, + "Value": { + "MaterialAsset": { + "assetId": { + "guid": "{E56377B1-6310-5311-A494-135BE50B74F0}" + }, + "assetHint": "materials/presets/pbr/metal_nickel_matte.azmaterial" + } + } + } + ] + } + } + }, + "Component_[8092226976542590265]": { + "$type": "EditorDisabledCompositionComponent", + "Id": 8092226976542590265 + } + } + }, + "Entity_[3996783863764]": { + "Id": "Entity_[3996783863764]", + "Name": "Entity1", + "Components": { + "Component_[11525365929370623807]": { + "$type": "EditorVisibilityComponent", + "Id": 11525365929370623807 + }, + "Component_[12334620273692642550]": { + "$type": "EditorLockComponent", + "Id": 12334620273692642550 + }, + "Component_[14389735759337977675]": { + "$type": "EditorPendingCompositionComponent", + "Id": 14389735759337977675 + }, + "Component_[16184381538555246534]": { + "$type": "AZ::Render::EditorMeshComponent", + "Id": 16184381538555246534, + "Controller": { + "Configuration": { + "ModelAsset": { + "assetId": { + "guid": "{E14975EF-E676-51A4-B826-3EF59CB645AA}", + "subId": 285127096 + }, + "assetHint": "testdata/objects/cube/cube.azmodel" + } + } + } + }, + "Component_[17962478023087084794]": { + "$type": "SelectionComponent", + "Id": 17962478023087084794 + }, + "Component_[18071675051915092508]": { + "$type": "EditorEntityIconComponent", + "Id": 18071675051915092508 + }, + "Component_[2115498007879087044]": { + "$type": "EditorInspectorComponent", + "Id": 2115498007879087044, + "ComponentOrderEntryArray": [ + { + "ComponentId": 399415038452606756 + }, + { + "ComponentId": 16184381538555246534, + "SortIndex": 1 + }, + { + "ComponentId": 7827190074535394331, + "SortIndex": 2 + } + ] + }, + "Component_[3518973002096080237]": { + "$type": "EditorOnlyEntityComponent", + "Id": 3518973002096080237 + }, + "Component_[399415038452606756]": { + "$type": "{27F1E1A1-8D9D-4C3B-BD3A-AFB9762449C0} TransformComponent", + "Id": 399415038452606756, + "Parent Entity": "ContainerEntity", + "Transform Data": { + "Translate": [ + -47.53056335449219, + -0.00018183141946792603, + 54.618019104003906 + ] + } + }, + "Component_[4564240319609068082]": { + "$type": "EditorEntitySortComponent", + "Id": 4564240319609068082 + }, + "Component_[7827190074535394331]": { + "$type": "EditorMaterialComponent", + "Id": 7827190074535394331, + "Controller": { + "Configuration": { + "materials": [ + { + "Key": { + "materialSlotStableId": 2418540911 + }, + "Value": { + "MaterialAsset": { + "assetId": { + "guid": "{94CF2BD7-7D09-5577-B1D8-3FF85B15E127}" + }, + "assetHint": "materials/presets/pbr/metal_aluminum.azmaterial" + } + } + } + ] + } + } + }, + "Component_[8092226976542590265]": { + "$type": "EditorDisabledCompositionComponent", + "Id": 8092226976542590265 + } + } + }, + "Entity_[4001078831060]": { + "Id": "Entity_[4001078831060]", + "Name": "Entity1", + "Components": { + "Component_[11525365929370623807]": { + "$type": "EditorVisibilityComponent", + "Id": 11525365929370623807 + }, + "Component_[12334620273692642550]": { + "$type": "EditorLockComponent", + "Id": 12334620273692642550 + }, + "Component_[14389735759337977675]": { + "$type": "EditorPendingCompositionComponent", + "Id": 14389735759337977675 + }, + "Component_[16184381538555246534]": { + "$type": "AZ::Render::EditorMeshComponent", + "Id": 16184381538555246534, + "Controller": { + "Configuration": { + "ModelAsset": { + "assetId": { + "guid": "{E14975EF-E676-51A4-B826-3EF59CB645AA}", + "subId": 285127096 + }, + "assetHint": "testdata/objects/cube/cube.azmodel" + } + } + } + }, + "Component_[17962478023087084794]": { + "$type": "SelectionComponent", + "Id": 17962478023087084794 + }, + "Component_[18071675051915092508]": { + "$type": "EditorEntityIconComponent", + "Id": 18071675051915092508 + }, + "Component_[2115498007879087044]": { + "$type": "EditorInspectorComponent", + "Id": 2115498007879087044, + "ComponentOrderEntryArray": [ + { + "ComponentId": 399415038452606756 + }, + { + "ComponentId": 16184381538555246534, + "SortIndex": 1 + }, + { + "ComponentId": 7827190074535394331, + "SortIndex": 2 + } + ] + }, + "Component_[3518973002096080237]": { + "$type": "EditorOnlyEntityComponent", + "Id": 3518973002096080237 + }, + "Component_[399415038452606756]": { + "$type": "{27F1E1A1-8D9D-4C3B-BD3A-AFB9762449C0} TransformComponent", + "Id": 399415038452606756, + "Parent Entity": "ContainerEntity", + "Transform Data": { + "Translate": [ + -17.530563354492188, + -0.00018183141946792603, + 114.4910659790039 + ] + } + }, + "Component_[4564240319609068082]": { + "$type": "EditorEntitySortComponent", + "Id": 4564240319609068082 + }, + "Component_[7827190074535394331]": { + "$type": "EditorMaterialComponent", + "Id": 7827190074535394331, + "Controller": { + "Configuration": { + "materials": [ + { + "Key": { + "materialSlotStableId": 2418540911 + }, + "Value": { + "MaterialAsset": { + "assetId": { + "guid": "{892EA944-0325-5FA6-94D7-4AB4FC02A0F5}" + }, + "assetHint": "materials/presets/pbr/metal_iron.azmaterial" + } + } + } + ] + } + } + }, + "Component_[8092226976542590265]": { + "$type": "EditorDisabledCompositionComponent", + "Id": 8092226976542590265 + } + } + }, + "Entity_[4005373798356]": { + "Id": "Entity_[4005373798356]", + "Name": "Entity1", + "Components": { + "Component_[11525365929370623807]": { + "$type": "EditorVisibilityComponent", + "Id": 11525365929370623807 + }, + "Component_[12334620273692642550]": { + "$type": "EditorLockComponent", + "Id": 12334620273692642550 + }, + "Component_[14389735759337977675]": { + "$type": "EditorPendingCompositionComponent", + "Id": 14389735759337977675 + }, + "Component_[16184381538555246534]": { + "$type": "AZ::Render::EditorMeshComponent", + "Id": 16184381538555246534, + "Controller": { + "Configuration": { + "ModelAsset": { + "assetId": { + "guid": "{E14975EF-E676-51A4-B826-3EF59CB645AA}", + "subId": 285127096 + }, + "assetHint": "testdata/objects/cube/cube.azmodel" + } + } + } + }, + "Component_[17962478023087084794]": { + "$type": "SelectionComponent", + "Id": 17962478023087084794 + }, + "Component_[18071675051915092508]": { + "$type": "EditorEntityIconComponent", + "Id": 18071675051915092508 + }, + "Component_[2115498007879087044]": { + "$type": "EditorInspectorComponent", + "Id": 2115498007879087044, + "ComponentOrderEntryArray": [ + { + "ComponentId": 399415038452606756 + }, + { + "ComponentId": 16184381538555246534, + "SortIndex": 1 + }, + { + "ComponentId": 7827190074535394331, + "SortIndex": 2 + } + ] + }, + "Component_[3518973002096080237]": { + "$type": "EditorOnlyEntityComponent", + "Id": 3518973002096080237 + }, + "Component_[399415038452606756]": { + "$type": "{27F1E1A1-8D9D-4C3B-BD3A-AFB9762449C0} TransformComponent", + "Id": 399415038452606756, + "Parent Entity": "ContainerEntity", + "Transform Data": { + "Translate": [ + -42.53056335449219, + -0.00018183141946792603, + 49.593753814697266 + ] + } + }, + "Component_[4564240319609068082]": { + "$type": "EditorEntitySortComponent", + "Id": 4564240319609068082 + }, + "Component_[7827190074535394331]": { + "$type": "EditorMaterialComponent", + "Id": 7827190074535394331, + "Controller": { + "Configuration": { + "materials": [ + { + "Key": { + "materialSlotStableId": 2418540911 + }, + "Value": { + "MaterialAsset": { + "assetId": { + "guid": "{AE350D9F-0000-526D-B49C-4303D687BB86}" + }, + "assetHint": "materials/presets/pbr/metal_brass_matte.azmaterial" + } + } + } + ] + } + } + }, + "Component_[8092226976542590265]": { + "$type": "EditorDisabledCompositionComponent", + "Id": 8092226976542590265 + } + } + }, + "Entity_[4009668765652]": { + "Id": "Entity_[4009668765652]", + "Name": "Entity1", + "Components": { + "Component_[11525365929370623807]": { + "$type": "EditorVisibilityComponent", + "Id": 11525365929370623807 + }, + "Component_[12334620273692642550]": { + "$type": "EditorLockComponent", + "Id": 12334620273692642550 + }, + "Component_[14389735759337977675]": { + "$type": "EditorPendingCompositionComponent", + "Id": 14389735759337977675 + }, + "Component_[16184381538555246534]": { + "$type": "AZ::Render::EditorMeshComponent", + "Id": 16184381538555246534, + "Controller": { + "Configuration": { + "ModelAsset": { + "assetId": { + "guid": "{E14975EF-E676-51A4-B826-3EF59CB645AA}", + "subId": 285127096 + }, + "assetHint": "testdata/objects/cube/cube.azmodel" + } + } + } + }, + "Component_[17962478023087084794]": { + "$type": "SelectionComponent", + "Id": 17962478023087084794 + }, + "Component_[18071675051915092508]": { + "$type": "EditorEntityIconComponent", + "Id": 18071675051915092508 + }, + "Component_[2115498007879087044]": { + "$type": "EditorInspectorComponent", + "Id": 2115498007879087044, + "ComponentOrderEntryArray": [ + { + "ComponentId": 399415038452606756 + }, + { + "ComponentId": 16184381538555246534, + "SortIndex": 1 + }, + { + "ComponentId": 7827190074535394331, + "SortIndex": 2 + } + ] + }, + "Component_[3518973002096080237]": { + "$type": "EditorOnlyEntityComponent", + "Id": 3518973002096080237 + }, + "Component_[399415038452606756]": { + "$type": "{27F1E1A1-8D9D-4C3B-BD3A-AFB9762449C0} TransformComponent", + "Id": 399415038452606756, + "Parent Entity": "ContainerEntity", + "Transform Data": { + "Translate": [ + -22.530563354492188, + -0.00018183141946792603, + 45.14218521118164 + ] + } + }, + "Component_[4564240319609068082]": { + "$type": "EditorEntitySortComponent", + "Id": 4564240319609068082 + }, + "Component_[7827190074535394331]": { + "$type": "EditorMaterialComponent", + "Id": 7827190074535394331, + "Controller": { + "Configuration": { + "materials": [ + { + "Key": { + "materialSlotStableId": 2418540911 + }, + "Value": { + "MaterialAsset": { + "assetId": { + "guid": "{FB4657EB-FB3A-5EC3-A772-DC36D6F733C3}" + }, + "assetHint": "materials/presets/pbr/metal_gold_polished.azmaterial" + } + } + } + ] + } + } + }, + "Component_[8092226976542590265]": { + "$type": "EditorDisabledCompositionComponent", + "Id": 8092226976542590265 + } + } + }, + "Entity_[4013963732948]": { + "Id": "Entity_[4013963732948]", + "Name": "Entity1", + "Components": { + "Component_[11525365929370623807]": { + "$type": "EditorVisibilityComponent", + "Id": 11525365929370623807 + }, + "Component_[12334620273692642550]": { + "$type": "EditorLockComponent", + "Id": 12334620273692642550 + }, + "Component_[14389735759337977675]": { + "$type": "EditorPendingCompositionComponent", + "Id": 14389735759337977675 + }, + "Component_[16184381538555246534]": { + "$type": "AZ::Render::EditorMeshComponent", + "Id": 16184381538555246534, + "Controller": { + "Configuration": { + "ModelAsset": { + "assetId": { + "guid": "{E14975EF-E676-51A4-B826-3EF59CB645AA}", + "subId": 285127096 + }, + "assetHint": "testdata/objects/cube/cube.azmodel" + } + } + } + }, + "Component_[17962478023087084794]": { + "$type": "SelectionComponent", + "Id": 17962478023087084794 + }, + "Component_[18071675051915092508]": { + "$type": "EditorEntityIconComponent", + "Id": 18071675051915092508 + }, + "Component_[2115498007879087044]": { + "$type": "EditorInspectorComponent", + "Id": 2115498007879087044, + "ComponentOrderEntryArray": [ + { + "ComponentId": 399415038452606756 + }, + { + "ComponentId": 16184381538555246534, + "SortIndex": 1 + }, + { + "ComponentId": 7827190074535394331, + "SortIndex": 2 + } + ] + }, + "Component_[3518973002096080237]": { + "$type": "EditorOnlyEntityComponent", + "Id": 3518973002096080237 + }, + "Component_[399415038452606756]": { + "$type": "{27F1E1A1-8D9D-4C3B-BD3A-AFB9762449C0} TransformComponent", + "Id": 399415038452606756, + "Parent Entity": "ContainerEntity", + "Transform Data": { + "Translate": [ + 32.53014373779297, + -0.00018183141946792603, + 99.43339538574219 + ] + } + }, + "Component_[4564240319609068082]": { + "$type": "EditorEntitySortComponent", + "Id": 4564240319609068082 + }, + "Component_[7827190074535394331]": { + "$type": "EditorMaterialComponent", + "Id": 7827190074535394331, + "Controller": { + "Configuration": { + "materials": [ + { + "Key": { + "materialSlotStableId": 2418540911 + }, + "Value": { + "MaterialAsset": { + "assetId": { + "guid": "{99976D73-6248-5D66-AD15-E8F52B0AFE36}" + }, + "assetHint": "materials/presets/pbr/metal_cobalt.azmaterial" + } + } + } + ] + } + } + }, + "Component_[8092226976542590265]": { + "$type": "EditorDisabledCompositionComponent", + "Id": 8092226976542590265 + } + } + }, + "Entity_[4018258700244]": { + "Id": "Entity_[4018258700244]", + "Name": "Entity1", + "Components": { + "Component_[11525365929370623807]": { + "$type": "EditorVisibilityComponent", + "Id": 11525365929370623807 + }, + "Component_[12334620273692642550]": { + "$type": "EditorLockComponent", + "Id": 12334620273692642550 + }, + "Component_[14389735759337977675]": { + "$type": "EditorPendingCompositionComponent", + "Id": 14389735759337977675 + }, + "Component_[16184381538555246534]": { + "$type": "AZ::Render::EditorMeshComponent", + "Id": 16184381538555246534, + "Controller": { + "Configuration": { + "ModelAsset": { + "assetId": { + "guid": "{E14975EF-E676-51A4-B826-3EF59CB645AA}", + "subId": 285127096 + }, + "assetHint": "testdata/objects/cube/cube.azmodel" + } + } + } + }, + "Component_[17962478023087084794]": { + "$type": "SelectionComponent", + "Id": 17962478023087084794 + }, + "Component_[18071675051915092508]": { + "$type": "EditorEntityIconComponent", + "Id": 18071675051915092508 + }, + "Component_[2115498007879087044]": { + "$type": "EditorInspectorComponent", + "Id": 2115498007879087044, + "ComponentOrderEntryArray": [ + { + "ComponentId": 399415038452606756 + }, + { + "ComponentId": 16184381538555246534, + "SortIndex": 1 + }, + { + "ComponentId": 7827190074535394331, + "SortIndex": 2 + } + ] + }, + "Component_[3518973002096080237]": { + "$type": "EditorOnlyEntityComponent", + "Id": 3518973002096080237 + }, + "Component_[399415038452606756]": { + "$type": "{27F1E1A1-8D9D-4C3B-BD3A-AFB9762449C0} TransformComponent", + "Id": 399415038452606756, + "Parent Entity": "ContainerEntity", + "Transform Data": { + "Translate": [ + -32.53056335449219, + -0.00018183141946792603, + 45.14218521118164 + ] + } + }, + "Component_[4564240319609068082]": { + "$type": "EditorEntitySortComponent", + "Id": 4564240319609068082 + }, + "Component_[7827190074535394331]": { + "$type": "EditorMaterialComponent", + "Id": 7827190074535394331, + "Controller": { + "Configuration": { + "materials": [ + { + "Key": { + "materialSlotStableId": 2418540911 + }, + "Value": { + "MaterialAsset": { + "assetId": { + "guid": "{93DF55AE-8D1B-5AD1-A609-05F1BD9F6EA0}" + }, + "assetHint": "materials/presets/pbr/metal_cobalt_polished.azmaterial" + } + } + } + ] + } + } + }, + "Component_[8092226976542590265]": { + "$type": "EditorDisabledCompositionComponent", + "Id": 8092226976542590265 + } + } + }, + "Entity_[4022553667540]": { + "Id": "Entity_[4022553667540]", + "Name": "Entity1", + "Components": { + "Component_[11525365929370623807]": { + "$type": "EditorVisibilityComponent", + "Id": 11525365929370623807 + }, + "Component_[12334620273692642550]": { + "$type": "EditorLockComponent", + "Id": 12334620273692642550 + }, + "Component_[14389735759337977675]": { + "$type": "EditorPendingCompositionComponent", + "Id": 14389735759337977675 + }, + "Component_[16184381538555246534]": { + "$type": "AZ::Render::EditorMeshComponent", + "Id": 16184381538555246534, + "Controller": { + "Configuration": { + "ModelAsset": { + "assetId": { + "guid": "{E14975EF-E676-51A4-B826-3EF59CB645AA}", + "subId": 285127096 + }, + "assetHint": "testdata/objects/cube/cube.azmodel" + } + } + } + }, + "Component_[17962478023087084794]": { + "$type": "SelectionComponent", + "Id": 17962478023087084794 + }, + "Component_[18071675051915092508]": { + "$type": "EditorEntityIconComponent", + "Id": 18071675051915092508 + }, + "Component_[2115498007879087044]": { + "$type": "EditorInspectorComponent", + "Id": 2115498007879087044, + "ComponentOrderEntryArray": [ + { + "ComponentId": 399415038452606756 + }, + { + "ComponentId": 16184381538555246534, + "SortIndex": 1 + }, + { + "ComponentId": 7827190074535394331, + "SortIndex": 2 + } + ] + }, + "Component_[3518973002096080237]": { + "$type": "EditorOnlyEntityComponent", + "Id": 3518973002096080237 + }, + "Component_[399415038452606756]": { + "$type": "{27F1E1A1-8D9D-4C3B-BD3A-AFB9762449C0} TransformComponent", + "Id": 399415038452606756, + "Parent Entity": "ContainerEntity", + "Transform Data": { + "Translate": [ + 2.5301437377929688, + -0.00018183141946792603, + 109.46680450439453 + ] + } + }, + "Component_[4564240319609068082]": { + "$type": "EditorEntitySortComponent", + "Id": 4564240319609068082 + }, + "Component_[7827190074535394331]": { + "$type": "EditorMaterialComponent", + "Id": 7827190074535394331, + "Controller": { + "Configuration": { + "materials": [ + { + "Key": { + "materialSlotStableId": 2418540911 + }, + "Value": { + "MaterialAsset": { + "assetId": { + "guid": "{60D4CA04-A2FE-5AE7-B472-694C38D05183}" + }, + "assetHint": "materials/presets/pbr/metal_platinum_matte.azmaterial" + } + } + } + ] + } + } + }, + "Component_[8092226976542590265]": { + "$type": "EditorDisabledCompositionComponent", + "Id": 8092226976542590265 + } + } + }, + "Entity_[4026848634836]": { + "Id": "Entity_[4026848634836]", + "Name": "Entity1", + "Components": { + "Component_[11525365929370623807]": { + "$type": "EditorVisibilityComponent", + "Id": 11525365929370623807 + }, + "Component_[12334620273692642550]": { + "$type": "EditorLockComponent", + "Id": 12334620273692642550 + }, + "Component_[14389735759337977675]": { + "$type": "EditorPendingCompositionComponent", + "Id": 14389735759337977675 + }, + "Component_[16184381538555246534]": { + "$type": "AZ::Render::EditorMeshComponent", + "Id": 16184381538555246534, + "Controller": { + "Configuration": { + "ModelAsset": { + "assetId": { + "guid": "{E14975EF-E676-51A4-B826-3EF59CB645AA}", + "subId": 285127096 + }, + "assetHint": "testdata/objects/cube/cube.azmodel" + } + } + } + }, + "Component_[17962478023087084794]": { + "$type": "SelectionComponent", + "Id": 17962478023087084794 + }, + "Component_[18071675051915092508]": { + "$type": "EditorEntityIconComponent", + "Id": 18071675051915092508 + }, + "Component_[2115498007879087044]": { + "$type": "EditorInspectorComponent", + "Id": 2115498007879087044, + "ComponentOrderEntryArray": [ + { + "ComponentId": 399415038452606756 + }, + { + "ComponentId": 16184381538555246534, + "SortIndex": 1 + }, + { + "ComponentId": 7827190074535394331, + "SortIndex": 2 + } + ] + }, + "Component_[3518973002096080237]": { + "$type": "EditorOnlyEntityComponent", + "Id": 3518973002096080237 + }, + "Component_[399415038452606756]": { + "$type": "{27F1E1A1-8D9D-4C3B-BD3A-AFB9762449C0} TransformComponent", + "Id": 399415038452606756, + "Parent Entity": "ContainerEntity", + "Transform Data": { + "Translate": [ + 22.53014373779297, + -0.00018183141946792603, + 9.475835800170898 + ] + } + }, + "Component_[4564240319609068082]": { + "$type": "EditorEntitySortComponent", + "Id": 4564240319609068082 + }, + "Component_[7827190074535394331]": { + "$type": "EditorMaterialComponent", + "Id": 7827190074535394331, + "Controller": { + "Configuration": { + "materials": [ + { + "Key": { + "materialSlotStableId": 2418540911 + }, + "Value": { + "MaterialAsset": { + "assetId": { + "guid": "{80E0F2A7-1EE4-597F-80EF-985C65BCE2EB}" + }, + "assetHint": "materials/presets/pbr/metal_brass.azmaterial" + } + } + } + ] + } + } + }, + "Component_[8092226976542590265]": { + "$type": "EditorDisabledCompositionComponent", + "Id": 8092226976542590265 + } + } + }, + "Entity_[4031143602132]": { + "Id": "Entity_[4031143602132]", + "Name": "Entity1", + "Components": { + "Component_[11525365929370623807]": { + "$type": "EditorVisibilityComponent", + "Id": 11525365929370623807 + }, + "Component_[12334620273692642550]": { + "$type": "EditorLockComponent", + "Id": 12334620273692642550 + }, + "Component_[14389735759337977675]": { + "$type": "EditorPendingCompositionComponent", + "Id": 14389735759337977675 + }, + "Component_[16184381538555246534]": { + "$type": "AZ::Render::EditorMeshComponent", + "Id": 16184381538555246534, + "Controller": { + "Configuration": { + "ModelAsset": { + "assetId": { + "guid": "{E14975EF-E676-51A4-B826-3EF59CB645AA}", + "subId": 285127096 + }, + "assetHint": "testdata/objects/cube/cube.azmodel" + } + } + } + }, + "Component_[17962478023087084794]": { + "$type": "SelectionComponent", + "Id": 17962478023087084794 + }, + "Component_[18071675051915092508]": { + "$type": "EditorEntityIconComponent", + "Id": 18071675051915092508 + }, + "Component_[2115498007879087044]": { + "$type": "EditorInspectorComponent", + "Id": 2115498007879087044, + "ComponentOrderEntryArray": [ + { + "ComponentId": 399415038452606756 + }, + { + "ComponentId": 16184381538555246534, + "SortIndex": 1 + }, + { + "ComponentId": 7827190074535394331, + "SortIndex": 2 + } + ] + }, + "Component_[3518973002096080237]": { + "$type": "EditorOnlyEntityComponent", + "Id": 3518973002096080237 + }, + "Component_[399415038452606756]": { + "$type": "{27F1E1A1-8D9D-4C3B-BD3A-AFB9762449C0} TransformComponent", + "Id": 399415038452606756, + "Parent Entity": "ContainerEntity", + "Transform Data": { + "Translate": [ + 7.530143737792969, + -0.00018183141946792603, + 109.46680450439453 + ] + } + }, + "Component_[4564240319609068082]": { + "$type": "EditorEntitySortComponent", + "Id": 4564240319609068082 + }, + "Component_[7827190074535394331]": { + "$type": "EditorMaterialComponent", + "Id": 7827190074535394331, + "Controller": { + "Configuration": { + "materials": [ + { + "Key": { + "materialSlotStableId": 2418540911 + }, + "Value": { + "MaterialAsset": { + "assetId": { + "guid": "{E54E46E7-9FA3-54D7-B5F8-8DCCDF17BC24}" + }, + "assetHint": "materials/presets/pbr/metal_silver_matte.azmaterial" + } + } + } + ] + } + } + }, + "Component_[8092226976542590265]": { + "$type": "EditorDisabledCompositionComponent", + "Id": 8092226976542590265 + } + } + }, + "Entity_[4035438569428]": { + "Id": "Entity_[4035438569428]", + "Name": "Entity1", + "Components": { + "Component_[11525365929370623807]": { + "$type": "EditorVisibilityComponent", + "Id": 11525365929370623807 + }, + "Component_[12334620273692642550]": { + "$type": "EditorLockComponent", + "Id": 12334620273692642550 + }, + "Component_[14389735759337977675]": { + "$type": "EditorPendingCompositionComponent", + "Id": 14389735759337977675 + }, + "Component_[16184381538555246534]": { + "$type": "AZ::Render::EditorMeshComponent", + "Id": 16184381538555246534, + "Controller": { + "Configuration": { + "ModelAsset": { + "assetId": { + "guid": "{E14975EF-E676-51A4-B826-3EF59CB645AA}", + "subId": 285127096 + }, + "assetHint": "testdata/objects/cube/cube.azmodel" + } + } + } + }, + "Component_[17962478023087084794]": { + "$type": "SelectionComponent", + "Id": 17962478023087084794 + }, + "Component_[18071675051915092508]": { + "$type": "EditorEntityIconComponent", + "Id": 18071675051915092508 + }, + "Component_[2115498007879087044]": { + "$type": "EditorInspectorComponent", + "Id": 2115498007879087044, + "ComponentOrderEntryArray": [ + { + "ComponentId": 399415038452606756 + }, + { + "ComponentId": 16184381538555246534, + "SortIndex": 1 + }, + { + "ComponentId": 7827190074535394331, + "SortIndex": 2 + } + ] + }, + "Component_[3518973002096080237]": { + "$type": "EditorOnlyEntityComponent", + "Id": 3518973002096080237 + }, + "Component_[399415038452606756]": { + "$type": "{27F1E1A1-8D9D-4C3B-BD3A-AFB9762449C0} TransformComponent", + "Id": 399415038452606756, + "Parent Entity": "ContainerEntity", + "Transform Data": { + "Translate": [ + 17.53014373779297, + -0.00018183141946792603, + 94.40913391113281 + ] + } + }, + "Component_[4564240319609068082]": { + "$type": "EditorEntitySortComponent", + "Id": 4564240319609068082 + }, + "Component_[7827190074535394331]": { + "$type": "EditorMaterialComponent", + "Id": 7827190074535394331, + "Controller": { + "Configuration": { + "materials": [ + { + "Key": {}, + "Value": { + "MaterialAsset": { + "assetId": { + "guid": "{721188E0-B7CC-5D06-8D5D-39AF8ABF2EF9}" + }, + "assetHint": "materials/presets/pbr/metal_titanium.azmaterial" + } + } + }, + { + "Key": { + "materialSlotStableId": 2418540911 + }, + "Value": { + "MaterialAsset": { + "assetId": { + "guid": "{549D26B8-881D-569F-AF05-961F36A43F4F}" + }, + "assetHint": "materials/presets/pbr/metal_aluminum_matte.azmaterial" + } + } + } + ] + } + } + }, + "Component_[8092226976542590265]": { + "$type": "EditorDisabledCompositionComponent", + "Id": 8092226976542590265 + } + } + }, + "Entity_[4039733536724]": { + "Id": "Entity_[4039733536724]", + "Name": "Entity1", + "Components": { + "Component_[11525365929370623807]": { + "$type": "EditorVisibilityComponent", + "Id": 11525365929370623807 + }, + "Component_[12334620273692642550]": { + "$type": "EditorLockComponent", + "Id": 12334620273692642550 + }, + "Component_[14389735759337977675]": { + "$type": "EditorPendingCompositionComponent", + "Id": 14389735759337977675 + }, + "Component_[16184381538555246534]": { + "$type": "AZ::Render::EditorMeshComponent", + "Id": 16184381538555246534, + "Controller": { + "Configuration": { + "ModelAsset": { + "assetId": { + "guid": "{E14975EF-E676-51A4-B826-3EF59CB645AA}", + "subId": 285127096 + }, + "assetHint": "testdata/objects/cube/cube.azmodel" + } + } + } + }, + "Component_[17962478023087084794]": { + "$type": "SelectionComponent", + "Id": 17962478023087084794 + }, + "Component_[18071675051915092508]": { + "$type": "EditorEntityIconComponent", + "Id": 18071675051915092508 + }, + "Component_[2115498007879087044]": { + "$type": "EditorInspectorComponent", + "Id": 2115498007879087044, + "ComponentOrderEntryArray": [ + { + "ComponentId": 399415038452606756 + }, + { + "ComponentId": 16184381538555246534, + "SortIndex": 1 + }, + { + "ComponentId": 7827190074535394331, + "SortIndex": 2 + } + ] + }, + "Component_[3518973002096080237]": { + "$type": "EditorOnlyEntityComponent", + "Id": 3518973002096080237 + }, + "Component_[399415038452606756]": { + "$type": "{27F1E1A1-8D9D-4C3B-BD3A-AFB9762449C0} TransformComponent", + "Id": 399415038452606756, + "Parent Entity": "ContainerEntity", + "Transform Data": { + "Translate": [ + -47.53056335449219, + -0.00018183141946792603, + 79.38228607177734 + ] + } + }, + "Component_[4564240319609068082]": { + "$type": "EditorEntitySortComponent", + "Id": 4564240319609068082 + }, + "Component_[7827190074535394331]": { + "$type": "EditorMaterialComponent", + "Id": 7827190074535394331, + "Controller": { + "Configuration": { + "materials": [ + { + "Key": { + "materialSlotStableId": 2418540911 + }, + "Value": { + "MaterialAsset": { + "assetId": { + "guid": "{549D26B8-881D-569F-AF05-961F36A43F4F}" + }, + "assetHint": "materials/presets/pbr/metal_aluminum_matte.azmaterial" + } + } + } + ] + } + } + }, + "Component_[8092226976542590265]": { + "$type": "EditorDisabledCompositionComponent", + "Id": 8092226976542590265 + } + } + }, + "Entity_[4044028504020]": { + "Id": "Entity_[4044028504020]", + "Name": "Entity1", + "Components": { + "Component_[11525365929370623807]": { + "$type": "EditorVisibilityComponent", + "Id": 11525365929370623807 + }, + "Component_[12334620273692642550]": { + "$type": "EditorLockComponent", + "Id": 12334620273692642550 + }, + "Component_[14389735759337977675]": { + "$type": "EditorPendingCompositionComponent", + "Id": 14389735759337977675 + }, + "Component_[16184381538555246534]": { + "$type": "AZ::Render::EditorMeshComponent", + "Id": 16184381538555246534, + "Controller": { + "Configuration": { + "ModelAsset": { + "assetId": { + "guid": "{E14975EF-E676-51A4-B826-3EF59CB645AA}", + "subId": 285127096 + }, + "assetHint": "testdata/objects/cube/cube.azmodel" + } + } + } + }, + "Component_[17962478023087084794]": { + "$type": "SelectionComponent", + "Id": 17962478023087084794 + }, + "Component_[18071675051915092508]": { + "$type": "EditorEntityIconComponent", + "Id": 18071675051915092508 + }, + "Component_[2115498007879087044]": { + "$type": "EditorInspectorComponent", + "Id": 2115498007879087044, + "ComponentOrderEntryArray": [ + { + "ComponentId": 399415038452606756 + }, + { + "ComponentId": 16184381538555246534, + "SortIndex": 1 + }, + { + "ComponentId": 7827190074535394331, + "SortIndex": 2 + } + ] + }, + "Component_[3518973002096080237]": { + "$type": "EditorOnlyEntityComponent", + "Id": 3518973002096080237 + }, + "Component_[399415038452606756]": { + "$type": "{27F1E1A1-8D9D-4C3B-BD3A-AFB9762449C0} TransformComponent", + "Id": 399415038452606756, + "Parent Entity": "ContainerEntity", + "Transform Data": { + "Translate": [ + -12.530563354492188, + -0.00018183141946792603, + 74.93071746826172 + ] + } + }, + "Component_[4564240319609068082]": { + "$type": "EditorEntitySortComponent", + "Id": 4564240319609068082 + }, + "Component_[7827190074535394331]": { + "$type": "EditorMaterialComponent", + "Id": 7827190074535394331, + "Controller": { + "Configuration": { + "materials": [ + { + "Key": { + "materialSlotStableId": 2418540911 + }, + "Value": { + "MaterialAsset": { + "assetId": { + "guid": "{F2AD0EBF-7137-58D1-9991-9552FAD41B19}" + }, + "assetHint": "materials/presets/pbr/metal_mercury.azmaterial" + } + } + } + ] + } + } + }, + "Component_[8092226976542590265]": { + "$type": "EditorDisabledCompositionComponent", + "Id": 8092226976542590265 + } + } + }, + "Entity_[4048323471316]": { + "Id": "Entity_[4048323471316]", + "Name": "Entity1", + "Components": { + "Component_[11525365929370623807]": { + "$type": "EditorVisibilityComponent", + "Id": 11525365929370623807 + }, + "Component_[12334620273692642550]": { + "$type": "EditorLockComponent", + "Id": 12334620273692642550 + }, + "Component_[14389735759337977675]": { + "$type": "EditorPendingCompositionComponent", + "Id": 14389735759337977675 + }, + "Component_[16184381538555246534]": { + "$type": "AZ::Render::EditorMeshComponent", + "Id": 16184381538555246534, + "Controller": { + "Configuration": { + "ModelAsset": { + "assetId": { + "guid": "{E14975EF-E676-51A4-B826-3EF59CB645AA}", + "subId": 285127096 + }, + "assetHint": "testdata/objects/cube/cube.azmodel" + } + } + } + }, + "Component_[17962478023087084794]": { + "$type": "SelectionComponent", + "Id": 17962478023087084794 + }, + "Component_[18071675051915092508]": { + "$type": "EditorEntityIconComponent", + "Id": 18071675051915092508 + }, + "Component_[2115498007879087044]": { + "$type": "EditorInspectorComponent", + "Id": 2115498007879087044, + "ComponentOrderEntryArray": [ + { + "ComponentId": 399415038452606756 + }, + { + "ComponentId": 16184381538555246534, + "SortIndex": 1 + }, + { + "ComponentId": 7827190074535394331, + "SortIndex": 2 + } + ] + }, + "Component_[3518973002096080237]": { + "$type": "EditorOnlyEntityComponent", + "Id": 3518973002096080237 + }, + "Component_[399415038452606756]": { + "$type": "{27F1E1A1-8D9D-4C3B-BD3A-AFB9762449C0} TransformComponent", + "Id": 399415038452606756, + "Parent Entity": "ContainerEntity", + "Transform Data": { + "Translate": [ + -32.53056335449219, + -0.00018183141946792603, + 74.93071746826172 + ] + } + }, + "Component_[4564240319609068082]": { + "$type": "EditorEntitySortComponent", + "Id": 4564240319609068082 + }, + "Component_[7827190074535394331]": { + "$type": "EditorMaterialComponent", + "Id": 7827190074535394331, + "Controller": { + "Configuration": { + "materials": [ + { + "Key": { + "materialSlotStableId": 2418540911 + }, + "Value": { + "MaterialAsset": { + "assetId": { + "guid": "{93DF55AE-8D1B-5AD1-A609-05F1BD9F6EA0}" + }, + "assetHint": "materials/presets/pbr/metal_cobalt_polished.azmaterial" + } + } + } + ] + } + } + }, + "Component_[8092226976542590265]": { + "$type": "EditorDisabledCompositionComponent", + "Id": 8092226976542590265 + } + } + }, + "Entity_[4052618438612]": { + "Id": "Entity_[4052618438612]", + "Name": "Entity1", + "Components": { + "Component_[11525365929370623807]": { + "$type": "EditorVisibilityComponent", + "Id": 11525365929370623807 + }, + "Component_[12334620273692642550]": { + "$type": "EditorLockComponent", + "Id": 12334620273692642550 + }, + "Component_[14389735759337977675]": { + "$type": "EditorPendingCompositionComponent", + "Id": 14389735759337977675 + }, + "Component_[16184381538555246534]": { + "$type": "AZ::Render::EditorMeshComponent", + "Id": 16184381538555246534, + "Controller": { + "Configuration": { + "ModelAsset": { + "assetId": { + "guid": "{E14975EF-E676-51A4-B826-3EF59CB645AA}", + "subId": 285127096 + }, + "assetHint": "testdata/objects/cube/cube.azmodel" + } + } + } + }, + "Component_[17962478023087084794]": { + "$type": "SelectionComponent", + "Id": 17962478023087084794 + }, + "Component_[18071675051915092508]": { + "$type": "EditorEntityIconComponent", + "Id": 18071675051915092508 + }, + "Component_[2115498007879087044]": { + "$type": "EditorInspectorComponent", + "Id": 2115498007879087044, + "ComponentOrderEntryArray": [ + { + "ComponentId": 399415038452606756 + }, + { + "ComponentId": 16184381538555246534, + "SortIndex": 1 + }, + { + "ComponentId": 7827190074535394331, + "SortIndex": 2 + } + ] + }, + "Component_[3518973002096080237]": { + "$type": "EditorOnlyEntityComponent", + "Id": 3518973002096080237 + }, + "Component_[399415038452606756]": { + "$type": "{27F1E1A1-8D9D-4C3B-BD3A-AFB9762449C0} TransformComponent", + "Id": 399415038452606756, + "Parent Entity": "ContainerEntity", + "Transform Data": { + "Translate": [ + -32.53056335449219, + -0.00018183141946792603, + 64.32462310791016 + ] + } + }, + "Component_[4564240319609068082]": { + "$type": "EditorEntitySortComponent", + "Id": 4564240319609068082 + }, + "Component_[7827190074535394331]": { + "$type": "EditorMaterialComponent", + "Id": 7827190074535394331, + "Controller": { + "Configuration": { + "materials": [ + { + "Key": { + "materialSlotStableId": 2418540911 + }, + "Value": { + "MaterialAsset": { + "assetId": { + "guid": "{C60A39AF-BB76-51BD-9468-A88C9A6F78D7}" + }, + "assetHint": "materials/presets/pbr/metal_cobalt_matte.azmaterial" + } + } + } + ] + } + } + }, + "Component_[8092226976542590265]": { + "$type": "EditorDisabledCompositionComponent", + "Id": 8092226976542590265 + } + } + }, + "Entity_[4056913405908]": { + "Id": "Entity_[4056913405908]", + "Name": "Entity1", + "Components": { + "Component_[11525365929370623807]": { + "$type": "EditorVisibilityComponent", + "Id": 11525365929370623807 + }, + "Component_[12334620273692642550]": { + "$type": "EditorLockComponent", + "Id": 12334620273692642550 + }, + "Component_[14389735759337977675]": { + "$type": "EditorPendingCompositionComponent", + "Id": 14389735759337977675 + }, + "Component_[16184381538555246534]": { + "$type": "AZ::Render::EditorMeshComponent", + "Id": 16184381538555246534, + "Controller": { + "Configuration": { + "ModelAsset": { + "assetId": { + "guid": "{E14975EF-E676-51A4-B826-3EF59CB645AA}", + "subId": 285127096 + }, + "assetHint": "testdata/objects/cube/cube.azmodel" + } + } + } + }, + "Component_[17962478023087084794]": { + "$type": "SelectionComponent", + "Id": 17962478023087084794 + }, + "Component_[18071675051915092508]": { + "$type": "EditorEntityIconComponent", + "Id": 18071675051915092508 + }, + "Component_[2115498007879087044]": { + "$type": "EditorInspectorComponent", + "Id": 2115498007879087044, + "ComponentOrderEntryArray": [ + { + "ComponentId": 399415038452606756 + }, + { + "ComponentId": 16184381538555246534, + "SortIndex": 1 + }, + { + "ComponentId": 7827190074535394331, + "SortIndex": 2 + } + ] + }, + "Component_[3518973002096080237]": { + "$type": "EditorOnlyEntityComponent", + "Id": 3518973002096080237 + }, + "Component_[399415038452606756]": { + "$type": "{27F1E1A1-8D9D-4C3B-BD3A-AFB9762449C0} TransformComponent", + "Id": 399415038452606756, + "Parent Entity": "ContainerEntity", + "Transform Data": { + "Translate": [ + 17.53014373779297, + -0.00018183141946792603, + 69.34888458251953 + ] + } + }, + "Component_[4564240319609068082]": { + "$type": "EditorEntitySortComponent", + "Id": 4564240319609068082 + }, + "Component_[7827190074535394331]": { + "$type": "EditorMaterialComponent", + "Id": 7827190074535394331, + "Controller": { + "Configuration": { + "materials": [ + { + "Key": {}, + "Value": { + "MaterialAsset": { + "assetId": { + "guid": "{721188E0-B7CC-5D06-8D5D-39AF8ABF2EF9}" + }, + "assetHint": "materials/presets/pbr/metal_titanium.azmaterial" + } + } + }, + { + "Key": { + "materialSlotStableId": 2418540911 + }, + "Value": { + "MaterialAsset": { + "assetId": { + "guid": "{94CF2BD7-7D09-5577-B1D8-3FF85B15E127}" + }, + "assetHint": "materials/presets/pbr/metal_aluminum.azmaterial" + } + } + } + ] + } + } + }, + "Component_[8092226976542590265]": { + "$type": "EditorDisabledCompositionComponent", + "Id": 8092226976542590265 + } + } + }, + "Entity_[4061208373204]": { + "Id": "Entity_[4061208373204]", + "Name": "Entity1", + "Components": { + "Component_[11525365929370623807]": { + "$type": "EditorVisibilityComponent", + "Id": 11525365929370623807 + }, + "Component_[12334620273692642550]": { + "$type": "EditorLockComponent", + "Id": 12334620273692642550 + }, + "Component_[14389735759337977675]": { + "$type": "EditorPendingCompositionComponent", + "Id": 14389735759337977675 + }, + "Component_[16184381538555246534]": { + "$type": "AZ::Render::EditorMeshComponent", + "Id": 16184381538555246534, + "Controller": { + "Configuration": { + "ModelAsset": { + "assetId": { + "guid": "{E14975EF-E676-51A4-B826-3EF59CB645AA}", + "subId": 285127096 + }, + "assetHint": "testdata/objects/cube/cube.azmodel" + } + } + } + }, + "Component_[17962478023087084794]": { + "$type": "SelectionComponent", + "Id": 17962478023087084794 + }, + "Component_[18071675051915092508]": { + "$type": "EditorEntityIconComponent", + "Id": 18071675051915092508 + }, + "Component_[2115498007879087044]": { + "$type": "EditorInspectorComponent", + "Id": 2115498007879087044, + "ComponentOrderEntryArray": [ + { + "ComponentId": 399415038452606756 + }, + { + "ComponentId": 16184381538555246534, + "SortIndex": 1 + }, + { + "ComponentId": 7827190074535394331, + "SortIndex": 2 + } + ] + }, + "Component_[3518973002096080237]": { + "$type": "EditorOnlyEntityComponent", + "Id": 3518973002096080237 + }, + "Component_[399415038452606756]": { + "$type": "{27F1E1A1-8D9D-4C3B-BD3A-AFB9762449C0} TransformComponent", + "Id": 399415038452606756, + "Parent Entity": "ContainerEntity", + "Transform Data": { + "Translate": [ + -7.5305633544921875, + -0.00018183141946792603, + 105.0152359008789 + ] + } + }, + "Component_[4564240319609068082]": { + "$type": "EditorEntitySortComponent", + "Id": 4564240319609068082 + }, + "Component_[7827190074535394331]": { + "$type": "EditorMaterialComponent", + "Id": 7827190074535394331, + "Controller": { + "Configuration": { + "materials": [ + { + "Key": { + "materialSlotStableId": 2418540911 + }, + "Value": { + "MaterialAsset": { + "assetId": { + "guid": "{E66E4343-F45A-536D-AAE1-C4D096420640}" + }, + "assetHint": "materials/presets/pbr/metal_nickel_polished.azmaterial" + } + } + } + ] + } + } + }, + "Component_[8092226976542590265]": { + "$type": "EditorDisabledCompositionComponent", + "Id": 8092226976542590265 + } + } + }, + "Entity_[4065503340500]": { + "Id": "Entity_[4065503340500]", + "Name": "Entity1", + "Components": { + "Component_[11525365929370623807]": { + "$type": "EditorVisibilityComponent", + "Id": 11525365929370623807 + }, + "Component_[12334620273692642550]": { + "$type": "EditorLockComponent", + "Id": 12334620273692642550 + }, + "Component_[14389735759337977675]": { + "$type": "EditorPendingCompositionComponent", + "Id": 14389735759337977675 + }, + "Component_[16184381538555246534]": { + "$type": "AZ::Render::EditorMeshComponent", + "Id": 16184381538555246534, + "Controller": { + "Configuration": { + "ModelAsset": { + "assetId": { + "guid": "{E14975EF-E676-51A4-B826-3EF59CB645AA}", + "subId": 285127096 + }, + "assetHint": "testdata/objects/cube/cube.azmodel" + } + } + } + }, + "Component_[17962478023087084794]": { + "$type": "SelectionComponent", + "Id": 17962478023087084794 + }, + "Component_[18071675051915092508]": { + "$type": "EditorEntityIconComponent", + "Id": 18071675051915092508 + }, + "Component_[2115498007879087044]": { + "$type": "EditorInspectorComponent", + "Id": 2115498007879087044, + "ComponentOrderEntryArray": [ + { + "ComponentId": 399415038452606756 + }, + { + "ComponentId": 16184381538555246534, + "SortIndex": 1 + }, + { + "ComponentId": 7827190074535394331, + "SortIndex": 2 + } + ] + }, + "Component_[3518973002096080237]": { + "$type": "EditorOnlyEntityComponent", + "Id": 3518973002096080237 + }, + "Component_[399415038452606756]": { + "$type": "{27F1E1A1-8D9D-4C3B-BD3A-AFB9762449C0} TransformComponent", + "Id": 399415038452606756, + "Parent Entity": "ContainerEntity", + "Transform Data": { + "Translate": [ + 7.530143737792969, + -0.00018183141946792603, + 19.50924301147461 + ] + } + }, + "Component_[4564240319609068082]": { + "$type": "EditorEntitySortComponent", + "Id": 4564240319609068082 + }, + "Component_[7827190074535394331]": { + "$type": "EditorMaterialComponent", + "Id": 7827190074535394331, + "Controller": { + "Configuration": { + "materials": [ + { + "Key": { + "materialSlotStableId": 2418540911 + }, + "Value": { + "MaterialAsset": { + "assetId": { + "guid": "{E54E46E7-9FA3-54D7-B5F8-8DCCDF17BC24}" + }, + "assetHint": "materials/presets/pbr/metal_silver_matte.azmaterial" + } + } + } + ] + } + } + }, + "Component_[8092226976542590265]": { + "$type": "EditorDisabledCompositionComponent", + "Id": 8092226976542590265 + } + } + }, + "Entity_[4069798307796]": { + "Id": "Entity_[4069798307796]", + "Name": "Entity1", + "Components": { + "Component_[11525365929370623807]": { + "$type": "EditorVisibilityComponent", + "Id": 11525365929370623807 + }, + "Component_[12334620273692642550]": { + "$type": "EditorLockComponent", + "Id": 12334620273692642550 + }, + "Component_[14389735759337977675]": { + "$type": "EditorPendingCompositionComponent", + "Id": 14389735759337977675 + }, + "Component_[16184381538555246534]": { + "$type": "AZ::Render::EditorMeshComponent", + "Id": 16184381538555246534, + "Controller": { + "Configuration": { + "ModelAsset": { + "assetId": { + "guid": "{E14975EF-E676-51A4-B826-3EF59CB645AA}", + "subId": 285127096 + }, + "assetHint": "testdata/objects/cube/cube.azmodel" + } + } + } + }, + "Component_[17962478023087084794]": { + "$type": "SelectionComponent", + "Id": 17962478023087084794 + }, + "Component_[18071675051915092508]": { + "$type": "EditorEntityIconComponent", + "Id": 18071675051915092508 + }, + "Component_[2115498007879087044]": { + "$type": "EditorInspectorComponent", + "Id": 2115498007879087044, + "ComponentOrderEntryArray": [ + { + "ComponentId": 399415038452606756 + }, + { + "ComponentId": 16184381538555246534, + "SortIndex": 1 + }, + { + "ComponentId": 7827190074535394331, + "SortIndex": 2 + } + ] + }, + "Component_[3518973002096080237]": { + "$type": "EditorOnlyEntityComponent", + "Id": 3518973002096080237 + }, + "Component_[399415038452606756]": { + "$type": "{27F1E1A1-8D9D-4C3B-BD3A-AFB9762449C0} TransformComponent", + "Id": 399415038452606756, + "Parent Entity": "ContainerEntity", + "Transform Data": { + "Translate": [ + -47.53056335449219, + -0.00018183141946792603, + 0.0 + ] + } + }, + "Component_[4564240319609068082]": { + "$type": "EditorEntitySortComponent", + "Id": 4564240319609068082 + }, + "Component_[7827190074535394331]": { + "$type": "EditorMaterialComponent", + "Id": 7827190074535394331, + "Controller": { + "Configuration": { + "materials": [ + { + "Key": { + "materialSlotStableId": 2418540911 + }, + "Value": { + "MaterialAsset": { + "assetId": { + "guid": "{64C1F6A6-6BDA-551A-BE56-1829E5913278}" + }, + "assetHint": "materials/presets/pbr/metal_aluminum_polished.azmaterial" + } + } + } + ] + } + } + }, + "Component_[8092226976542590265]": { + "$type": "EditorDisabledCompositionComponent", + "Id": 8092226976542590265 + } + } + }, + "Entity_[4074093275092]": { + "Id": "Entity_[4074093275092]", + "Name": "Entity1", + "Components": { + "Component_[11525365929370623807]": { + "$type": "EditorVisibilityComponent", + "Id": 11525365929370623807 + }, + "Component_[12334620273692642550]": { + "$type": "EditorLockComponent", + "Id": 12334620273692642550 + }, + "Component_[14389735759337977675]": { + "$type": "EditorPendingCompositionComponent", + "Id": 14389735759337977675 + }, + "Component_[16184381538555246534]": { + "$type": "AZ::Render::EditorMeshComponent", + "Id": 16184381538555246534, + "Controller": { + "Configuration": { + "ModelAsset": { + "assetId": { + "guid": "{E14975EF-E676-51A4-B826-3EF59CB645AA}", + "subId": 285127096 + }, + "assetHint": "testdata/objects/cube/cube.azmodel" + } + } + } + }, + "Component_[17962478023087084794]": { + "$type": "SelectionComponent", + "Id": 17962478023087084794 + }, + "Component_[18071675051915092508]": { + "$type": "EditorEntityIconComponent", + "Id": 18071675051915092508 + }, + "Component_[2115498007879087044]": { + "$type": "EditorInspectorComponent", + "Id": 2115498007879087044, + "ComponentOrderEntryArray": [ + { + "ComponentId": 399415038452606756 + }, + { + "ComponentId": 16184381538555246534, + "SortIndex": 1 + }, + { + "ComponentId": 7827190074535394331, + "SortIndex": 2 + } + ] + }, + "Component_[3518973002096080237]": { + "$type": "EditorOnlyEntityComponent", + "Id": 3518973002096080237 + }, + "Component_[399415038452606756]": { + "$type": "{27F1E1A1-8D9D-4C3B-BD3A-AFB9762449C0} TransformComponent", + "Id": 399415038452606756, + "Parent Entity": "ContainerEntity", + "Transform Data": { + "Translate": [ + -42.53056335449219, + -0.00018183141946792603, + 34.53608703613281 + ] + } + }, + "Component_[4564240319609068082]": { + "$type": "EditorEntitySortComponent", + "Id": 4564240319609068082 + }, + "Component_[7827190074535394331]": { + "$type": "EditorMaterialComponent", + "Id": 7827190074535394331, + "Controller": { + "Configuration": { + "materials": [ + { + "Key": { + "materialSlotStableId": 2418540911 + }, + "Value": { + "MaterialAsset": { + "assetId": { + "guid": "{AE350D9F-0000-526D-B49C-4303D687BB86}" + }, + "assetHint": "materials/presets/pbr/metal_brass_matte.azmaterial" + } + } + } + ] + } + } + }, + "Component_[8092226976542590265]": { + "$type": "EditorDisabledCompositionComponent", + "Id": 8092226976542590265 + } + } + }, + "Entity_[4078388242388]": { + "Id": "Entity_[4078388242388]", + "Name": "Entity1", + "Components": { + "Component_[11525365929370623807]": { + "$type": "EditorVisibilityComponent", + "Id": 11525365929370623807 + }, + "Component_[12334620273692642550]": { + "$type": "EditorLockComponent", + "Id": 12334620273692642550 + }, + "Component_[14389735759337977675]": { + "$type": "EditorPendingCompositionComponent", + "Id": 14389735759337977675 + }, + "Component_[16184381538555246534]": { + "$type": "AZ::Render::EditorMeshComponent", + "Id": 16184381538555246534, + "Controller": { + "Configuration": { + "ModelAsset": { + "assetId": { + "guid": "{E14975EF-E676-51A4-B826-3EF59CB645AA}", + "subId": 285127096 + }, + "assetHint": "testdata/objects/cube/cube.azmodel" + } + } + } + }, + "Component_[17962478023087084794]": { + "$type": "SelectionComponent", + "Id": 17962478023087084794 + }, + "Component_[18071675051915092508]": { + "$type": "EditorEntityIconComponent", + "Id": 18071675051915092508 + }, + "Component_[2115498007879087044]": { + "$type": "EditorInspectorComponent", + "Id": 2115498007879087044, + "ComponentOrderEntryArray": [ + { + "ComponentId": 399415038452606756 + }, + { + "ComponentId": 16184381538555246534, + "SortIndex": 1 + }, + { + "ComponentId": 7827190074535394331, + "SortIndex": 2 + } + ] + }, + "Component_[3518973002096080237]": { + "$type": "EditorOnlyEntityComponent", + "Id": 3518973002096080237 + }, + "Component_[399415038452606756]": { + "$type": "{27F1E1A1-8D9D-4C3B-BD3A-AFB9762449C0} TransformComponent", + "Id": 399415038452606756, + "Parent Entity": "ContainerEntity", + "Transform Data": { + "Translate": [ + 37.53014373779297, + 0.010651908814907074, + 39.60029602050781 + ] + } + }, + "Component_[4564240319609068082]": { + "$type": "EditorEntitySortComponent", + "Id": 4564240319609068082 + }, + "Component_[7827190074535394331]": { + "$type": "EditorMaterialComponent", + "Id": 7827190074535394331, + "Controller": { + "Configuration": { + "materials": [ + { + "Key": { + "materialSlotStableId": 2418540911 + }, + "Value": { + "MaterialAsset": { + "assetId": { + "guid": "{E621C5BF-B8E1-55F0-A791-EC960F2FA46F}" + }, + "assetHint": "materials/presets/pbr/metal_copper.azmaterial" + } + } + } + ] + } + } + }, + "Component_[8092226976542590265]": { + "$type": "EditorDisabledCompositionComponent", + "Id": 8092226976542590265 + } + } + }, + "Entity_[4082683209684]": { + "Id": "Entity_[4082683209684]", + "Name": "Entity1", + "Components": { + "Component_[11525365929370623807]": { + "$type": "EditorVisibilityComponent", + "Id": 11525365929370623807 + }, + "Component_[12334620273692642550]": { + "$type": "EditorLockComponent", + "Id": 12334620273692642550 + }, + "Component_[14389735759337977675]": { + "$type": "EditorPendingCompositionComponent", + "Id": 14389735759337977675 + }, + "Component_[16184381538555246534]": { + "$type": "AZ::Render::EditorMeshComponent", + "Id": 16184381538555246534, + "Controller": { + "Configuration": { + "ModelAsset": { + "assetId": { + "guid": "{E14975EF-E676-51A4-B826-3EF59CB645AA}", + "subId": 285127096 + }, + "assetHint": "testdata/objects/cube/cube.azmodel" + } + } + } + }, + "Component_[17962478023087084794]": { + "$type": "SelectionComponent", + "Id": 17962478023087084794 + }, + "Component_[18071675051915092508]": { + "$type": "EditorEntityIconComponent", + "Id": 18071675051915092508 + }, + "Component_[2115498007879087044]": { + "$type": "EditorInspectorComponent", + "Id": 2115498007879087044, + "ComponentOrderEntryArray": [ + { + "ComponentId": 399415038452606756 + }, + { + "ComponentId": 16184381538555246534, + "SortIndex": 1 + }, + { + "ComponentId": 7827190074535394331, + "SortIndex": 2 + } + ] + }, + "Component_[3518973002096080237]": { + "$type": "EditorOnlyEntityComponent", + "Id": 3518973002096080237 + }, + "Component_[399415038452606756]": { + "$type": "{27F1E1A1-8D9D-4C3B-BD3A-AFB9762449C0} TransformComponent", + "Id": 399415038452606756, + "Parent Entity": "ContainerEntity", + "Transform Data": { + "Translate": [ + 2.5301437377929688, + -0.00018183141946792603, + 99.43339538574219 + ] + } + }, + "Component_[4564240319609068082]": { + "$type": "EditorEntitySortComponent", + "Id": 4564240319609068082 + }, + "Component_[7827190074535394331]": { + "$type": "EditorMaterialComponent", + "Id": 7827190074535394331, + "Controller": { + "Configuration": { + "materials": [ + { + "Key": { + "materialSlotStableId": 2418540911 + }, + "Value": { + "MaterialAsset": { + "assetId": { + "guid": "{E23FC75B-4142-55F1-B9AE-884826E7EB23}" + }, + "assetHint": "materials/presets/pbr/metal_platinum.azmaterial" + } + } + } + ] + } + } + }, + "Component_[8092226976542590265]": { + "$type": "EditorDisabledCompositionComponent", + "Id": 8092226976542590265 + } + } + }, + "Entity_[4086978176980]": { + "Id": "Entity_[4086978176980]", + "Name": "Entity1", + "Components": { + "Component_[11525365929370623807]": { + "$type": "EditorVisibilityComponent", + "Id": 11525365929370623807 + }, + "Component_[12334620273692642550]": { + "$type": "EditorLockComponent", + "Id": 12334620273692642550 + }, + "Component_[14389735759337977675]": { + "$type": "EditorPendingCompositionComponent", + "Id": 14389735759337977675 + }, + "Component_[16184381538555246534]": { + "$type": "AZ::Render::EditorMeshComponent", + "Id": 16184381538555246534, + "Controller": { + "Configuration": { + "ModelAsset": { + "assetId": { + "guid": "{E14975EF-E676-51A4-B826-3EF59CB645AA}", + "subId": 285127096 + }, + "assetHint": "testdata/objects/cube/cube.azmodel" + } + } + } + }, + "Component_[17962478023087084794]": { + "$type": "SelectionComponent", + "Id": 17962478023087084794 + }, + "Component_[18071675051915092508]": { + "$type": "EditorEntityIconComponent", + "Id": 18071675051915092508 + }, + "Component_[2115498007879087044]": { + "$type": "EditorInspectorComponent", + "Id": 2115498007879087044, + "ComponentOrderEntryArray": [ + { + "ComponentId": 399415038452606756 + }, + { + "ComponentId": 16184381538555246534, + "SortIndex": 1 + }, + { + "ComponentId": 7827190074535394331, + "SortIndex": 2 + } + ] + }, + "Component_[3518973002096080237]": { + "$type": "EditorOnlyEntityComponent", + "Id": 3518973002096080237 + }, + "Component_[399415038452606756]": { + "$type": "{27F1E1A1-8D9D-4C3B-BD3A-AFB9762449C0} TransformComponent", + "Id": 399415038452606756, + "Parent Entity": "ContainerEntity", + "Transform Data": { + "Translate": [ + 37.53014373779297, + -0.00018183141946792603, + 4.451573371887207 + ] + } + }, + "Component_[4564240319609068082]": { + "$type": "EditorEntitySortComponent", + "Id": 4564240319609068082 + }, + "Component_[7827190074535394331]": { + "$type": "EditorMaterialComponent", + "Id": 7827190074535394331, + "Controller": { + "Configuration": { + "materials": [ + { + "Key": { + "materialSlotStableId": 2418540911 + }, + "Value": { + "MaterialAsset": { + "assetId": { + "guid": "{2D054071-BEF7-53C0-A8C9-E4F026BD8364}" + }, + "assetHint": "materials/presets/pbr/metal_copper_matte.azmaterial" + } + } + } + ] + } + } + }, + "Component_[8092226976542590265]": { + "$type": "EditorDisabledCompositionComponent", + "Id": 8092226976542590265 + } + } + }, + "Entity_[4091273144276]": { + "Id": "Entity_[4091273144276]", + "Name": "Entity1", + "Components": { + "Component_[11525365929370623807]": { + "$type": "EditorVisibilityComponent", + "Id": 11525365929370623807 + }, + "Component_[12334620273692642550]": { + "$type": "EditorLockComponent", + "Id": 12334620273692642550 + }, + "Component_[14389735759337977675]": { + "$type": "EditorPendingCompositionComponent", + "Id": 14389735759337977675 + }, + "Component_[16184381538555246534]": { + "$type": "AZ::Render::EditorMeshComponent", + "Id": 16184381538555246534, + "Controller": { + "Configuration": { + "ModelAsset": { + "assetId": { + "guid": "{E14975EF-E676-51A4-B826-3EF59CB645AA}", + "subId": 285127096 + }, + "assetHint": "testdata/objects/cube/cube.azmodel" + } + } + } + }, + "Component_[17962478023087084794]": { + "$type": "SelectionComponent", + "Id": 17962478023087084794 + }, + "Component_[18071675051915092508]": { + "$type": "EditorEntityIconComponent", + "Id": 18071675051915092508 + }, + "Component_[2115498007879087044]": { + "$type": "EditorInspectorComponent", + "Id": 2115498007879087044, + "ComponentOrderEntryArray": [ + { + "ComponentId": 399415038452606756 + }, + { + "ComponentId": 16184381538555246534, + "SortIndex": 1 + }, + { + "ComponentId": 7827190074535394331, + "SortIndex": 2 + } + ] + }, + "Component_[3518973002096080237]": { + "$type": "EditorOnlyEntityComponent", + "Id": 3518973002096080237 + }, + "Component_[399415038452606756]": { + "$type": "{27F1E1A1-8D9D-4C3B-BD3A-AFB9762449C0} TransformComponent", + "Id": 399415038452606756, + "Parent Entity": "ContainerEntity", + "Transform Data": { + "Translate": [ + 37.53014373779297, + 0.010651908814907074, + 39.60029602050781 + ] + } + }, + "Component_[4564240319609068082]": { + "$type": "EditorEntitySortComponent", + "Id": 4564240319609068082 + }, + "Component_[7827190074535394331]": { + "$type": "EditorMaterialComponent", + "Id": 7827190074535394331, + "Controller": { + "Configuration": { + "materials": [ + { + "Key": { + "materialSlotStableId": 2418540911 + }, + "Value": { + "MaterialAsset": { + "assetId": { + "guid": "{E621C5BF-B8E1-55F0-A791-EC960F2FA46F}" + }, + "assetHint": "materials/presets/pbr/metal_copper.azmaterial" + } + } + } + ] + } + } + }, + "Component_[8092226976542590265]": { + "$type": "EditorDisabledCompositionComponent", + "Id": 8092226976542590265 + } + } + }, + "Entity_[4095568111572]": { + "Id": "Entity_[4095568111572]", + "Name": "Entity1", + "Components": { + "Component_[11525365929370623807]": { + "$type": "EditorVisibilityComponent", + "Id": 11525365929370623807 + }, + "Component_[12334620273692642550]": { + "$type": "EditorLockComponent", + "Id": 12334620273692642550 + }, + "Component_[14389735759337977675]": { + "$type": "EditorPendingCompositionComponent", + "Id": 14389735759337977675 + }, + "Component_[16184381538555246534]": { + "$type": "AZ::Render::EditorMeshComponent", + "Id": 16184381538555246534, + "Controller": { + "Configuration": { + "ModelAsset": { + "assetId": { + "guid": "{E14975EF-E676-51A4-B826-3EF59CB645AA}", + "subId": 285127096 + }, + "assetHint": "testdata/objects/cube/cube.azmodel" + } + } + } + }, + "Component_[17962478023087084794]": { + "$type": "SelectionComponent", + "Id": 17962478023087084794 + }, + "Component_[18071675051915092508]": { + "$type": "EditorEntityIconComponent", + "Id": 18071675051915092508 + }, + "Component_[2115498007879087044]": { + "$type": "EditorInspectorComponent", + "Id": 2115498007879087044, + "ComponentOrderEntryArray": [ + { + "ComponentId": 399415038452606756 + }, + { + "ComponentId": 16184381538555246534, + "SortIndex": 1 + }, + { + "ComponentId": 7827190074535394331, + "SortIndex": 2 + } + ] + }, + "Component_[3518973002096080237]": { + "$type": "EditorOnlyEntityComponent", + "Id": 3518973002096080237 + }, + "Component_[399415038452606756]": { + "$type": "{27F1E1A1-8D9D-4C3B-BD3A-AFB9762449C0} TransformComponent", + "Id": 399415038452606756, + "Parent Entity": "ContainerEntity", + "Transform Data": { + "Translate": [ + -12.530563354492188, + -0.00018183141946792603, + 79.38228607177734 + ] + } + }, + "Component_[4564240319609068082]": { + "$type": "EditorEntitySortComponent", + "Id": 4564240319609068082 + }, + "Component_[7827190074535394331]": { + "$type": "EditorMaterialComponent", + "Id": 7827190074535394331, + "Controller": { + "Configuration": { + "materials": [ + { + "Key": { + "materialSlotStableId": 2418540911 + }, + "Value": { + "MaterialAsset": { + "assetId": { + "guid": "{F2AD0EBF-7137-58D1-9991-9552FAD41B19}" + }, + "assetHint": "materials/presets/pbr/metal_mercury.azmaterial" + } + } + } + ] + } + } + }, + "Component_[8092226976542590265]": { + "$type": "EditorDisabledCompositionComponent", + "Id": 8092226976542590265 + } + } + }, + "Entity_[4099863078868]": { + "Id": "Entity_[4099863078868]", + "Name": "Entity1", + "Components": { + "Component_[11525365929370623807]": { + "$type": "EditorVisibilityComponent", + "Id": 11525365929370623807 + }, + "Component_[12334620273692642550]": { + "$type": "EditorLockComponent", + "Id": 12334620273692642550 + }, + "Component_[14389735759337977675]": { + "$type": "EditorPendingCompositionComponent", + "Id": 14389735759337977675 + }, + "Component_[16184381538555246534]": { + "$type": "AZ::Render::EditorMeshComponent", + "Id": 16184381538555246534, + "Controller": { + "Configuration": { + "ModelAsset": { + "assetId": { + "guid": "{E14975EF-E676-51A4-B826-3EF59CB645AA}", + "subId": 285127096 + }, + "assetHint": "testdata/objects/cube/cube.azmodel" + } + } + } + }, + "Component_[17962478023087084794]": { + "$type": "SelectionComponent", + "Id": 17962478023087084794 + }, + "Component_[18071675051915092508]": { + "$type": "EditorEntityIconComponent", + "Id": 18071675051915092508 + }, + "Component_[2115498007879087044]": { + "$type": "EditorInspectorComponent", + "Id": 2115498007879087044, + "ComponentOrderEntryArray": [ + { + "ComponentId": 399415038452606756 + }, + { + "ComponentId": 16184381538555246534, + "SortIndex": 1 + }, + { + "ComponentId": 7827190074535394331, + "SortIndex": 2 + } + ] + }, + "Component_[3518973002096080237]": { + "$type": "EditorOnlyEntityComponent", + "Id": 3518973002096080237 + }, + "Component_[399415038452606756]": { + "$type": "{27F1E1A1-8D9D-4C3B-BD3A-AFB9762449C0} TransformComponent", + "Id": 399415038452606756, + "Parent Entity": "ContainerEntity", + "Transform Data": { + "Translate": [ + 17.53014373779297, + -0.00018183141946792603, + 15.057670593261719 + ] + } + }, + "Component_[4564240319609068082]": { + "$type": "EditorEntitySortComponent", + "Id": 4564240319609068082 + }, + "Component_[7827190074535394331]": { + "$type": "EditorMaterialComponent", + "Id": 7827190074535394331, + "Controller": { + "Configuration": { + "materials": [ + { + "Key": {}, + "Value": { + "MaterialAsset": { + "assetId": { + "guid": "{721188E0-B7CC-5D06-8D5D-39AF8ABF2EF9}" + }, + "assetHint": "materials/presets/pbr/metal_titanium.azmaterial" + } + } + }, + { + "Key": { + "materialSlotStableId": 2418540911 + }, + "Value": { + "MaterialAsset": { + "assetId": { + "guid": "{64C1F6A6-6BDA-551A-BE56-1829E5913278}" + }, + "assetHint": "materials/presets/pbr/metal_aluminum_polished.azmaterial" + } + } + } + ] + } + } + }, + "Component_[8092226976542590265]": { + "$type": "EditorDisabledCompositionComponent", + "Id": 8092226976542590265 + } + } + }, + "Entity_[4104158046164]": { + "Id": "Entity_[4104158046164]", + "Name": "Entity1", + "Components": { + "Component_[11525365929370623807]": { + "$type": "EditorVisibilityComponent", + "Id": 11525365929370623807 + }, + "Component_[12334620273692642550]": { + "$type": "EditorLockComponent", + "Id": 12334620273692642550 + }, + "Component_[14389735759337977675]": { + "$type": "EditorPendingCompositionComponent", + "Id": 14389735759337977675 + }, + "Component_[16184381538555246534]": { + "$type": "AZ::Render::EditorMeshComponent", + "Id": 16184381538555246534, + "Controller": { + "Configuration": { + "ModelAsset": { + "assetId": { + "guid": "{E14975EF-E676-51A4-B826-3EF59CB645AA}", + "subId": 285127096 + }, + "assetHint": "testdata/objects/cube/cube.azmodel" + } + } + } + }, + "Component_[17962478023087084794]": { + "$type": "SelectionComponent", + "Id": 17962478023087084794 + }, + "Component_[18071675051915092508]": { + "$type": "EditorEntityIconComponent", + "Id": 18071675051915092508 + }, + "Component_[2115498007879087044]": { + "$type": "EditorInspectorComponent", + "Id": 2115498007879087044, + "ComponentOrderEntryArray": [ + { + "ComponentId": 399415038452606756 + }, + { + "ComponentId": 16184381538555246534, + "SortIndex": 1 + }, + { + "ComponentId": 7827190074535394331, + "SortIndex": 2 + } + ] + }, + "Component_[3518973002096080237]": { + "$type": "EditorOnlyEntityComponent", + "Id": 3518973002096080237 + }, + "Component_[399415038452606756]": { + "$type": "{27F1E1A1-8D9D-4C3B-BD3A-AFB9762449C0} TransformComponent", + "Id": 399415038452606756, + "Parent Entity": "ContainerEntity", + "Transform Data": { + "Translate": [ + 22.53014373779297, + -0.00018183141946792603, + 59.873046875 + ] + } + }, + "Component_[4564240319609068082]": { + "$type": "EditorEntitySortComponent", + "Id": 4564240319609068082 + }, + "Component_[7827190074535394331]": { + "$type": "EditorMaterialComponent", + "Id": 7827190074535394331, + "Controller": { + "Configuration": { + "materials": [ + { + "Key": { + "materialSlotStableId": 2418540911 + }, + "Value": { + "MaterialAsset": { + "assetId": { + "guid": "{FC69F2F8-F73B-5A0C-B8B7-94BAA45780FC}" + }, + "assetHint": "materials/presets/pbr/metal_brass_polished.azmaterial" + } + } + } + ] + } + } + }, + "Component_[8092226976542590265]": { + "$type": "EditorDisabledCompositionComponent", + "Id": 8092226976542590265 + } + } + }, + "Entity_[4108453013460]": { + "Id": "Entity_[4108453013460]", + "Name": "Entity1", + "Components": { + "Component_[11525365929370623807]": { + "$type": "EditorVisibilityComponent", + "Id": 11525365929370623807 + }, + "Component_[12334620273692642550]": { + "$type": "EditorLockComponent", + "Id": 12334620273692642550 + }, + "Component_[14389735759337977675]": { + "$type": "EditorPendingCompositionComponent", + "Id": 14389735759337977675 + }, + "Component_[16184381538555246534]": { + "$type": "AZ::Render::EditorMeshComponent", + "Id": 16184381538555246534, + "Controller": { + "Configuration": { + "ModelAsset": { + "assetId": { + "guid": "{E14975EF-E676-51A4-B826-3EF59CB645AA}", + "subId": 285127096 + }, + "assetHint": "testdata/objects/cube/cube.azmodel" + } + } + } + }, + "Component_[17962478023087084794]": { + "$type": "SelectionComponent", + "Id": 17962478023087084794 + }, + "Component_[18071675051915092508]": { + "$type": "EditorEntityIconComponent", + "Id": 18071675051915092508 + }, + "Component_[2115498007879087044]": { + "$type": "EditorInspectorComponent", + "Id": 2115498007879087044, + "ComponentOrderEntryArray": [ + { + "ComponentId": 399415038452606756 + }, + { + "ComponentId": 16184381538555246534, + "SortIndex": 1 + }, + { + "ComponentId": 7827190074535394331, + "SortIndex": 2 + } + ] + }, + "Component_[3518973002096080237]": { + "$type": "EditorOnlyEntityComponent", + "Id": 3518973002096080237 + }, + "Component_[399415038452606756]": { + "$type": "{27F1E1A1-8D9D-4C3B-BD3A-AFB9762449C0} TransformComponent", + "Id": 399415038452606756, + "Parent Entity": "ContainerEntity", + "Transform Data": { + "Translate": [ + 37.53014373779297, + 0.010651908814907074, + 84.44650268554688 + ] + } + }, + "Component_[4564240319609068082]": { + "$type": "EditorEntitySortComponent", + "Id": 4564240319609068082 + }, + "Component_[7827190074535394331]": { + "$type": "EditorMaterialComponent", + "Id": 7827190074535394331, + "Controller": { + "Configuration": { + "materials": [ + { + "Key": { + "materialSlotStableId": 2418540911 + }, + "Value": { + "MaterialAsset": { + "assetId": { + "guid": "{E621C5BF-B8E1-55F0-A791-EC960F2FA46F}" + }, + "assetHint": "materials/presets/pbr/metal_copper.azmaterial" + } + } + } + ] + } + } + }, + "Component_[8092226976542590265]": { + "$type": "EditorDisabledCompositionComponent", + "Id": 8092226976542590265 + } + } + }, + "Entity_[4112747980756]": { + "Id": "Entity_[4112747980756]", + "Name": "Entity1", + "Components": { + "Component_[11525365929370623807]": { + "$type": "EditorVisibilityComponent", + "Id": 11525365929370623807 + }, + "Component_[12334620273692642550]": { + "$type": "EditorLockComponent", + "Id": 12334620273692642550 + }, + "Component_[14389735759337977675]": { + "$type": "EditorPendingCompositionComponent", + "Id": 14389735759337977675 + }, + "Component_[16184381538555246534]": { + "$type": "AZ::Render::EditorMeshComponent", + "Id": 16184381538555246534, + "Controller": { + "Configuration": { + "ModelAsset": { + "assetId": { + "guid": "{E14975EF-E676-51A4-B826-3EF59CB645AA}", + "subId": 285127096 + }, + "assetHint": "testdata/objects/cube/cube.azmodel" + } + } + } + }, + "Component_[17962478023087084794]": { + "$type": "SelectionComponent", + "Id": 17962478023087084794 + }, + "Component_[18071675051915092508]": { + "$type": "EditorEntityIconComponent", + "Id": 18071675051915092508 + }, + "Component_[2115498007879087044]": { + "$type": "EditorInspectorComponent", + "Id": 2115498007879087044, + "ComponentOrderEntryArray": [ + { + "ComponentId": 399415038452606756 + }, + { + "ComponentId": 16184381538555246534, + "SortIndex": 1 + }, + { + "ComponentId": 7827190074535394331, + "SortIndex": 2 + } + ] + }, + "Component_[3518973002096080237]": { + "$type": "EditorOnlyEntityComponent", + "Id": 3518973002096080237 + }, + "Component_[399415038452606756]": { + "$type": "{27F1E1A1-8D9D-4C3B-BD3A-AFB9762449C0} TransformComponent", + "Id": 399415038452606756, + "Parent Entity": "ContainerEntity", + "Transform Data": { + "Translate": [ + -12.530563354492188, + -0.00018183141946792603, + 45.14218521118164 + ] + } + }, + "Component_[4564240319609068082]": { + "$type": "EditorEntitySortComponent", + "Id": 4564240319609068082 + }, + "Component_[7827190074535394331]": { + "$type": "EditorMaterialComponent", + "Id": 7827190074535394331, + "Controller": { + "Configuration": { + "materials": [ + { + "Key": { + "materialSlotStableId": 2418540911 + }, + "Value": { + "MaterialAsset": { + "assetId": { + "guid": "{F2AD0EBF-7137-58D1-9991-9552FAD41B19}" + }, + "assetHint": "materials/presets/pbr/metal_mercury.azmaterial" + } + } + } + ] + } + } + }, + "Component_[8092226976542590265]": { + "$type": "EditorDisabledCompositionComponent", + "Id": 8092226976542590265 + } + } + }, + "Entity_[4117042948052]": { + "Id": "Entity_[4117042948052]", + "Name": "Entity1", + "Components": { + "Component_[11525365929370623807]": { + "$type": "EditorVisibilityComponent", + "Id": 11525365929370623807 + }, + "Component_[12334620273692642550]": { + "$type": "EditorLockComponent", + "Id": 12334620273692642550 + }, + "Component_[14389735759337977675]": { + "$type": "EditorPendingCompositionComponent", + "Id": 14389735759337977675 + }, + "Component_[16184381538555246534]": { + "$type": "AZ::Render::EditorMeshComponent", + "Id": 16184381538555246534, + "Controller": { + "Configuration": { + "ModelAsset": { + "assetId": { + "guid": "{E14975EF-E676-51A4-B826-3EF59CB645AA}", + "subId": 285127096 + }, + "assetHint": "testdata/objects/cube/cube.azmodel" + } + } + } + }, + "Component_[17962478023087084794]": { + "$type": "SelectionComponent", + "Id": 17962478023087084794 + }, + "Component_[18071675051915092508]": { + "$type": "EditorEntityIconComponent", + "Id": 18071675051915092508 + }, + "Component_[2115498007879087044]": { + "$type": "EditorInspectorComponent", + "Id": 2115498007879087044, + "ComponentOrderEntryArray": [ + { + "ComponentId": 399415038452606756 + }, + { + "ComponentId": 16184381538555246534, + "SortIndex": 1 + }, + { + "ComponentId": 7827190074535394331, + "SortIndex": 2 + } + ] + }, + "Component_[3518973002096080237]": { + "$type": "EditorOnlyEntityComponent", + "Id": 3518973002096080237 + }, + "Component_[399415038452606756]": { + "$type": "{27F1E1A1-8D9D-4C3B-BD3A-AFB9762449C0} TransformComponent", + "Id": 399415038452606756, + "Parent Entity": "ContainerEntity", + "Transform Data": { + "Translate": [ + 7.530143737792969, + -0.00018183141946792603, + 15.057670593261719 + ] + } + }, + "Component_[4564240319609068082]": { + "$type": "EditorEntitySortComponent", + "Id": 4564240319609068082 + }, + "Component_[7827190074535394331]": { + "$type": "EditorMaterialComponent", + "Id": 7827190074535394331, + "Controller": { + "Configuration": { + "materials": [ + { + "Key": { + "materialSlotStableId": 2418540911 + }, + "Value": { + "MaterialAsset": { + "assetId": { + "guid": "{2AC06FA3-7670-542E-8996-DF346AFF1B61}" + }, + "assetHint": "materials/presets/pbr/metal_silver_polished.azmaterial" + } + } + } + ] + } + } + }, + "Component_[8092226976542590265]": { + "$type": "EditorDisabledCompositionComponent", + "Id": 8092226976542590265 + } + } + }, + "Entity_[4121337915348]": { + "Id": "Entity_[4121337915348]", + "Name": "Entity1", + "Components": { + "Component_[11525365929370623807]": { + "$type": "EditorVisibilityComponent", + "Id": 11525365929370623807 + }, + "Component_[12334620273692642550]": { + "$type": "EditorLockComponent", + "Id": 12334620273692642550 + }, + "Component_[14389735759337977675]": { + "$type": "EditorPendingCompositionComponent", + "Id": 14389735759337977675 + }, + "Component_[16184381538555246534]": { + "$type": "AZ::Render::EditorMeshComponent", + "Id": 16184381538555246534, + "Controller": { + "Configuration": { + "ModelAsset": { + "assetId": { + "guid": "{E14975EF-E676-51A4-B826-3EF59CB645AA}", + "subId": 285127096 + }, + "assetHint": "testdata/objects/cube/cube.azmodel" + } + } + } + }, + "Component_[17962478023087084794]": { + "$type": "SelectionComponent", + "Id": 17962478023087084794 + }, + "Component_[18071675051915092508]": { + "$type": "EditorEntityIconComponent", + "Id": 18071675051915092508 + }, + "Component_[2115498007879087044]": { + "$type": "EditorInspectorComponent", + "Id": 2115498007879087044, + "ComponentOrderEntryArray": [ + { + "ComponentId": 399415038452606756 + }, + { + "ComponentId": 16184381538555246534, + "SortIndex": 1 + }, + { + "ComponentId": 7827190074535394331, + "SortIndex": 2 + } + ] + }, + "Component_[3518973002096080237]": { + "$type": "EditorOnlyEntityComponent", + "Id": 3518973002096080237 + }, + "Component_[399415038452606756]": { + "$type": "{27F1E1A1-8D9D-4C3B-BD3A-AFB9762449C0} TransformComponent", + "Id": 399415038452606756, + "Parent Entity": "ContainerEntity", + "Transform Data": { + "Translate": [ + -32.53056335449219, + -0.00018183141946792603, + 4.451573371887207 + ] + } + }, + "Component_[4564240319609068082]": { + "$type": "EditorEntitySortComponent", + "Id": 4564240319609068082 + }, + "Component_[7827190074535394331]": { + "$type": "EditorMaterialComponent", + "Id": 7827190074535394331, + "Controller": { + "Configuration": { + "materials": [ + { + "Key": { + "materialSlotStableId": 2418540911 + }, + "Value": { + "MaterialAsset": { + "assetId": { + "guid": "{C60A39AF-BB76-51BD-9468-A88C9A6F78D7}" + }, + "assetHint": "materials/presets/pbr/metal_cobalt_matte.azmaterial" + } + } + } + ] + } + } + }, + "Component_[8092226976542590265]": { + "$type": "EditorDisabledCompositionComponent", + "Id": 8092226976542590265 + } + } + }, + "Entity_[4125632882644]": { + "Id": "Entity_[4125632882644]", + "Name": "Entity1", + "Components": { + "Component_[11525365929370623807]": { + "$type": "EditorVisibilityComponent", + "Id": 11525365929370623807 + }, + "Component_[12334620273692642550]": { + "$type": "EditorLockComponent", + "Id": 12334620273692642550 + }, + "Component_[14389735759337977675]": { + "$type": "EditorPendingCompositionComponent", + "Id": 14389735759337977675 + }, + "Component_[16184381538555246534]": { + "$type": "AZ::Render::EditorMeshComponent", + "Id": 16184381538555246534, + "Controller": { + "Configuration": { + "ModelAsset": { + "assetId": { + "guid": "{E14975EF-E676-51A4-B826-3EF59CB645AA}", + "subId": 285127096 + }, + "assetHint": "testdata/objects/cube/cube.azmodel" + } + } + } + }, + "Component_[17962478023087084794]": { + "$type": "SelectionComponent", + "Id": 17962478023087084794 + }, + "Component_[18071675051915092508]": { + "$type": "EditorEntityIconComponent", + "Id": 18071675051915092508 + }, + "Component_[2115498007879087044]": { + "$type": "EditorInspectorComponent", + "Id": 2115498007879087044, + "ComponentOrderEntryArray": [ + { + "ComponentId": 399415038452606756 + }, + { + "ComponentId": 16184381538555246534, + "SortIndex": 1 + }, + { + "ComponentId": 7827190074535394331, + "SortIndex": 2 + } + ] + }, + "Component_[3518973002096080237]": { + "$type": "EditorOnlyEntityComponent", + "Id": 3518973002096080237 + }, + "Component_[399415038452606756]": { + "$type": "{27F1E1A1-8D9D-4C3B-BD3A-AFB9762449C0} TransformComponent", + "Id": 399415038452606756, + "Parent Entity": "ContainerEntity", + "Transform Data": { + "Translate": [ + -17.530563354492188, + -0.00018183141946792603, + 105.0152359008789 + ] + } + }, + "Component_[4564240319609068082]": { + "$type": "EditorEntitySortComponent", + "Id": 4564240319609068082 + }, + "Component_[7827190074535394331]": { + "$type": "EditorMaterialComponent", + "Id": 7827190074535394331, + "Controller": { + "Configuration": { + "materials": [ + { + "Key": { + "materialSlotStableId": 2418540911 + }, + "Value": { + "MaterialAsset": { + "assetId": { + "guid": "{A7F03135-ECAD-5440-99DB-E84ABA3D50DA}" + }, + "assetHint": "materials/presets/pbr/metal_iron_polished.azmaterial" + } + } + } + ] + } + } + }, + "Component_[8092226976542590265]": { + "$type": "EditorDisabledCompositionComponent", + "Id": 8092226976542590265 + } + } + }, + "Entity_[4129927849940]": { + "Id": "Entity_[4129927849940]", + "Name": "Entity1", + "Components": { + "Component_[11525365929370623807]": { + "$type": "EditorVisibilityComponent", + "Id": 11525365929370623807 + }, + "Component_[12334620273692642550]": { + "$type": "EditorLockComponent", + "Id": 12334620273692642550 + }, + "Component_[14389735759337977675]": { + "$type": "EditorPendingCompositionComponent", + "Id": 14389735759337977675 + }, + "Component_[16184381538555246534]": { + "$type": "AZ::Render::EditorMeshComponent", + "Id": 16184381538555246534, + "Controller": { + "Configuration": { + "ModelAsset": { + "assetId": { + "guid": "{E14975EF-E676-51A4-B826-3EF59CB645AA}", + "subId": 285127096 + }, + "assetHint": "testdata/objects/cube/cube.azmodel" + } + } + } + }, + "Component_[17962478023087084794]": { + "$type": "SelectionComponent", + "Id": 17962478023087084794 + }, + "Component_[18071675051915092508]": { + "$type": "EditorEntityIconComponent", + "Id": 18071675051915092508 + }, + "Component_[2115498007879087044]": { + "$type": "EditorInspectorComponent", + "Id": 2115498007879087044, + "ComponentOrderEntryArray": [ + { + "ComponentId": 399415038452606756 + }, + { + "ComponentId": 16184381538555246534, + "SortIndex": 1 + }, + { + "ComponentId": 7827190074535394331, + "SortIndex": 2 + } + ] + }, + "Component_[3518973002096080237]": { + "$type": "EditorOnlyEntityComponent", + "Id": 3518973002096080237 + }, + "Component_[399415038452606756]": { + "$type": "{27F1E1A1-8D9D-4C3B-BD3A-AFB9762449C0} TransformComponent", + "Id": 399415038452606756, + "Parent Entity": "ContainerEntity", + "Transform Data": { + "Translate": [ + 37.53014373779297, + -0.00018183141946792603, + 49.593753814697266 + ] + } + }, + "Component_[4564240319609068082]": { + "$type": "EditorEntitySortComponent", + "Id": 4564240319609068082 + }, + "Component_[7827190074535394331]": { + "$type": "EditorMaterialComponent", + "Id": 7827190074535394331, + "Controller": { + "Configuration": { + "materials": [ + { + "Key": { + "materialSlotStableId": 2418540911 + }, + "Value": { + "MaterialAsset": { + "assetId": { + "guid": "{2D054071-BEF7-53C0-A8C9-E4F026BD8364}" + }, + "assetHint": "materials/presets/pbr/metal_copper_matte.azmaterial" + } + } + } + ] + } + } + }, + "Component_[8092226976542590265]": { + "$type": "EditorDisabledCompositionComponent", + "Id": 8092226976542590265 + } + } + }, + "Entity_[4134222817236]": { + "Id": "Entity_[4134222817236]", + "Name": "Entity1", + "Components": { + "Component_[11525365929370623807]": { + "$type": "EditorVisibilityComponent", + "Id": 11525365929370623807 + }, + "Component_[12334620273692642550]": { + "$type": "EditorLockComponent", + "Id": 12334620273692642550 + }, + "Component_[14389735759337977675]": { + "$type": "EditorPendingCompositionComponent", + "Id": 14389735759337977675 + }, + "Component_[16184381538555246534]": { + "$type": "AZ::Render::EditorMeshComponent", + "Id": 16184381538555246534, + "Controller": { + "Configuration": { + "ModelAsset": { + "assetId": { + "guid": "{E14975EF-E676-51A4-B826-3EF59CB645AA}", + "subId": 285127096 + }, + "assetHint": "testdata/objects/cube/cube.azmodel" + } + } + } + }, + "Component_[17962478023087084794]": { + "$type": "SelectionComponent", + "Id": 17962478023087084794 + }, + "Component_[18071675051915092508]": { + "$type": "EditorEntityIconComponent", + "Id": 18071675051915092508 + }, + "Component_[2115498007879087044]": { + "$type": "EditorInspectorComponent", + "Id": 2115498007879087044, + "ComponentOrderEntryArray": [ + { + "ComponentId": 399415038452606756 + }, + { + "ComponentId": 16184381538555246534, + "SortIndex": 1 + }, + { + "ComponentId": 7827190074535394331, + "SortIndex": 2 + } + ] + }, + "Component_[3518973002096080237]": { + "$type": "EditorOnlyEntityComponent", + "Id": 3518973002096080237 + }, + "Component_[399415038452606756]": { + "$type": "{27F1E1A1-8D9D-4C3B-BD3A-AFB9762449C0} TransformComponent", + "Id": 399415038452606756, + "Parent Entity": "ContainerEntity", + "Transform Data": { + "Translate": [ + 47.53014373779297, + -0.00018183141946792603, + 59.873046875 + ] + } + }, + "Component_[4564240319609068082]": { + "$type": "EditorEntitySortComponent", + "Id": 4564240319609068082 + }, + "Component_[7827190074535394331]": { + "$type": "EditorMaterialComponent", + "Id": 7827190074535394331, + "Controller": { + "Configuration": { + "materials": [ + { + "Key": { + "materialSlotStableId": 2418540911 + }, + "Value": { + "MaterialAsset": { + "assetId": { + "guid": "{A7F03135-ECAD-5440-99DB-E84ABA3D50DA}" + }, + "assetHint": "materials/presets/pbr/metal_iron_polished.azmaterial" + } + } + } + ] + } + } + }, + "Component_[8092226976542590265]": { + "$type": "EditorDisabledCompositionComponent", + "Id": 8092226976542590265 + } + } + }, + "Entity_[4138517784532]": { + "Id": "Entity_[4138517784532]", + "Name": "Entity1", + "Components": { + "Component_[11525365929370623807]": { + "$type": "EditorVisibilityComponent", + "Id": 11525365929370623807 + }, + "Component_[12334620273692642550]": { + "$type": "EditorLockComponent", + "Id": 12334620273692642550 + }, + "Component_[14389735759337977675]": { + "$type": "EditorPendingCompositionComponent", + "Id": 14389735759337977675 + }, + "Component_[16184381538555246534]": { + "$type": "AZ::Render::EditorMeshComponent", + "Id": 16184381538555246534, + "Controller": { + "Configuration": { + "ModelAsset": { + "assetId": { + "guid": "{E14975EF-E676-51A4-B826-3EF59CB645AA}", + "subId": 285127096 + }, + "assetHint": "testdata/objects/cube/cube.azmodel" + } + } + } + }, + "Component_[17962478023087084794]": { + "$type": "SelectionComponent", + "Id": 17962478023087084794 + }, + "Component_[18071675051915092508]": { + "$type": "EditorEntityIconComponent", + "Id": 18071675051915092508 + }, + "Component_[2115498007879087044]": { + "$type": "EditorInspectorComponent", + "Id": 2115498007879087044, + "ComponentOrderEntryArray": [ + { + "ComponentId": 399415038452606756 + }, + { + "ComponentId": 16184381538555246534, + "SortIndex": 1 + }, + { + "ComponentId": 7827190074535394331, + "SortIndex": 2 + } + ] + }, + "Component_[3518973002096080237]": { + "$type": "EditorOnlyEntityComponent", + "Id": 3518973002096080237 + }, + "Component_[399415038452606756]": { + "$type": "{27F1E1A1-8D9D-4C3B-BD3A-AFB9762449C0} TransformComponent", + "Id": 399415038452606756, + "Parent Entity": "ContainerEntity", + "Transform Data": { + "Translate": [ + -12.530563354492188, + -0.00018183141946792603, + 84.40655517578125 + ] + } + }, + "Component_[4564240319609068082]": { + "$type": "EditorEntitySortComponent", + "Id": 4564240319609068082 + }, + "Component_[7827190074535394331]": { + "$type": "EditorMaterialComponent", + "Id": 7827190074535394331, + "Controller": { + "Configuration": { + "materials": [ + { + "Key": { + "materialSlotStableId": 2418540911 + }, + "Value": { + "MaterialAsset": { + "assetId": { + "guid": "{F2AD0EBF-7137-58D1-9991-9552FAD41B19}" + }, + "assetHint": "materials/presets/pbr/metal_mercury.azmaterial" + } + } + } + ] + } + } + }, + "Component_[8092226976542590265]": { + "$type": "EditorDisabledCompositionComponent", + "Id": 8092226976542590265 + } + } + }, + "Entity_[4142812751828]": { + "Id": "Entity_[4142812751828]", + "Name": "Entity1", + "Components": { + "Component_[11525365929370623807]": { + "$type": "EditorVisibilityComponent", + "Id": 11525365929370623807 + }, + "Component_[12334620273692642550]": { + "$type": "EditorLockComponent", + "Id": 12334620273692642550 + }, + "Component_[14389735759337977675]": { + "$type": "EditorPendingCompositionComponent", + "Id": 14389735759337977675 + }, + "Component_[16184381538555246534]": { + "$type": "AZ::Render::EditorMeshComponent", + "Id": 16184381538555246534, + "Controller": { + "Configuration": { + "ModelAsset": { + "assetId": { + "guid": "{E14975EF-E676-51A4-B826-3EF59CB645AA}", + "subId": 285127096 + }, + "assetHint": "testdata/objects/cube/cube.azmodel" + } + } + } + }, + "Component_[17962478023087084794]": { + "$type": "SelectionComponent", + "Id": 17962478023087084794 + }, + "Component_[18071675051915092508]": { + "$type": "EditorEntityIconComponent", + "Id": 18071675051915092508 + }, + "Component_[2115498007879087044]": { + "$type": "EditorInspectorComponent", + "Id": 2115498007879087044, + "ComponentOrderEntryArray": [ + { + "ComponentId": 399415038452606756 + }, + { + "ComponentId": 16184381538555246534, + "SortIndex": 1 + }, + { + "ComponentId": 7827190074535394331, + "SortIndex": 2 + } + ] + }, + "Component_[3518973002096080237]": { + "$type": "EditorOnlyEntityComponent", + "Id": 3518973002096080237 + }, + "Component_[399415038452606756]": { + "$type": "{27F1E1A1-8D9D-4C3B-BD3A-AFB9762449C0} TransformComponent", + "Id": 399415038452606756, + "Parent Entity": "ContainerEntity", + "Transform Data": { + "Translate": [ + -17.530563354492188, + -0.00018183141946792603, + 30.08451271057129 + ] + } + }, + "Component_[4564240319609068082]": { + "$type": "EditorEntitySortComponent", + "Id": 4564240319609068082 + }, + "Component_[7827190074535394331]": { + "$type": "EditorMaterialComponent", + "Id": 7827190074535394331, + "Controller": { + "Configuration": { + "materials": [ + { + "Key": { + "materialSlotStableId": 2418540911 + }, + "Value": { + "MaterialAsset": { + "assetId": { + "guid": "{A7F03135-ECAD-5440-99DB-E84ABA3D50DA}" + }, + "assetHint": "materials/presets/pbr/metal_iron_polished.azmaterial" + } + } + } + ] + } + } + }, + "Component_[8092226976542590265]": { + "$type": "EditorDisabledCompositionComponent", + "Id": 8092226976542590265 + } + } + }, + "Entity_[4147107719124]": { + "Id": "Entity_[4147107719124]", + "Name": "Entity1", + "Components": { + "Component_[11525365929370623807]": { + "$type": "EditorVisibilityComponent", + "Id": 11525365929370623807 + }, + "Component_[12334620273692642550]": { + "$type": "EditorLockComponent", + "Id": 12334620273692642550 + }, + "Component_[14389735759337977675]": { + "$type": "EditorPendingCompositionComponent", + "Id": 14389735759337977675 + }, + "Component_[16184381538555246534]": { + "$type": "AZ::Render::EditorMeshComponent", + "Id": 16184381538555246534, + "Controller": { + "Configuration": { + "ModelAsset": { + "assetId": { + "guid": "{E14975EF-E676-51A4-B826-3EF59CB645AA}", + "subId": 285127096 + }, + "assetHint": "testdata/objects/cube/cube.azmodel" + } + } + } + }, + "Component_[17962478023087084794]": { + "$type": "SelectionComponent", + "Id": 17962478023087084794 + }, + "Component_[18071675051915092508]": { + "$type": "EditorEntityIconComponent", + "Id": 18071675051915092508 + }, + "Component_[2115498007879087044]": { + "$type": "EditorInspectorComponent", + "Id": 2115498007879087044, + "ComponentOrderEntryArray": [ + { + "ComponentId": 399415038452606756 + }, + { + "ComponentId": 16184381538555246534, + "SortIndex": 1 + }, + { + "ComponentId": 7827190074535394331, + "SortIndex": 2 + } + ] + }, + "Component_[3518973002096080237]": { + "$type": "EditorOnlyEntityComponent", + "Id": 3518973002096080237 + }, + "Component_[399415038452606756]": { + "$type": "{27F1E1A1-8D9D-4C3B-BD3A-AFB9762449C0} TransformComponent", + "Id": 399415038452606756, + "Parent Entity": "ContainerEntity", + "Transform Data": { + "Translate": [ + -22.530563354492188, + -0.00018183141946792603, + 64.32462310791016 + ] + } + }, + "Component_[4564240319609068082]": { + "$type": "EditorEntitySortComponent", + "Id": 4564240319609068082 + }, + "Component_[7827190074535394331]": { + "$type": "EditorMaterialComponent", + "Id": 7827190074535394331, + "Controller": { + "Configuration": { + "materials": [ + { + "Key": { + "materialSlotStableId": 2418540911 + }, + "Value": { + "MaterialAsset": { + "assetId": { + "guid": "{5BC13D95-377E-53EA-9A93-156384BE8B04}" + }, + "assetHint": "materials/presets/pbr/metal_gold_matte.azmaterial" + } + } + } + ] + } + } + }, + "Component_[8092226976542590265]": { + "$type": "EditorDisabledCompositionComponent", + "Id": 8092226976542590265 + } + } + }, + "Entity_[4151402686420]": { + "Id": "Entity_[4151402686420]", + "Name": "Entity1", + "Components": { + "Component_[11525365929370623807]": { + "$type": "EditorVisibilityComponent", + "Id": 11525365929370623807 + }, + "Component_[12334620273692642550]": { + "$type": "EditorLockComponent", + "Id": 12334620273692642550 + }, + "Component_[14389735759337977675]": { + "$type": "EditorPendingCompositionComponent", + "Id": 14389735759337977675 + }, + "Component_[16184381538555246534]": { + "$type": "AZ::Render::EditorMeshComponent", + "Id": 16184381538555246534, + "Controller": { + "Configuration": { + "ModelAsset": { + "assetId": { + "guid": "{E14975EF-E676-51A4-B826-3EF59CB645AA}", + "subId": 285127096 + }, + "assetHint": "testdata/objects/cube/cube.azmodel" + } + } + } + }, + "Component_[17962478023087084794]": { + "$type": "SelectionComponent", + "Id": 17962478023087084794 + }, + "Component_[18071675051915092508]": { + "$type": "EditorEntityIconComponent", + "Id": 18071675051915092508 + }, + "Component_[2115498007879087044]": { + "$type": "EditorInspectorComponent", + "Id": 2115498007879087044, + "ComponentOrderEntryArray": [ + { + "ComponentId": 399415038452606756 + }, + { + "ComponentId": 16184381538555246534, + "SortIndex": 1 + }, + { + "ComponentId": 7827190074535394331, + "SortIndex": 2 + } + ] + }, + "Component_[3518973002096080237]": { + "$type": "EditorOnlyEntityComponent", + "Id": 3518973002096080237 + }, + "Component_[399415038452606756]": { + "$type": "{27F1E1A1-8D9D-4C3B-BD3A-AFB9762449C0} TransformComponent", + "Id": 399415038452606756, + "Parent Entity": "ContainerEntity", + "Transform Data": { + "Translate": [ + 27.53014373779297, + -0.00018183141946792603, + 84.40655517578125 + ] + } + }, + "Component_[4564240319609068082]": { + "$type": "EditorEntitySortComponent", + "Id": 4564240319609068082 + }, + "Component_[7827190074535394331]": { + "$type": "EditorMaterialComponent", + "Id": 7827190074535394331, + "Controller": { + "Configuration": { + "materials": [ + { + "Key": { + "materialSlotStableId": 2418540911 + }, + "Value": { + "MaterialAsset": { + "assetId": { + "guid": "{B7C712DC-4839-58BB-B522-A4F120084CF5}" + }, + "assetHint": "materials/presets/pbr/metal_chrome.azmaterial" + } + } + } + ] + } + } + }, + "Component_[8092226976542590265]": { + "$type": "EditorDisabledCompositionComponent", + "Id": 8092226976542590265 + } + } + }, + "Entity_[4155697653716]": { + "Id": "Entity_[4155697653716]", + "Name": "Entity1", + "Components": { + "Component_[11525365929370623807]": { + "$type": "EditorVisibilityComponent", + "Id": 11525365929370623807 + }, + "Component_[12334620273692642550]": { + "$type": "EditorLockComponent", + "Id": 12334620273692642550 + }, + "Component_[14389735759337977675]": { + "$type": "EditorPendingCompositionComponent", + "Id": 14389735759337977675 + }, + "Component_[16184381538555246534]": { + "$type": "AZ::Render::EditorMeshComponent", + "Id": 16184381538555246534, + "Controller": { + "Configuration": { + "ModelAsset": { + "assetId": { + "guid": "{E14975EF-E676-51A4-B826-3EF59CB645AA}", + "subId": 285127096 + }, + "assetHint": "testdata/objects/cube/cube.azmodel" + } + } + } + }, + "Component_[17962478023087084794]": { + "$type": "SelectionComponent", + "Id": 17962478023087084794 + }, + "Component_[18071675051915092508]": { + "$type": "EditorEntityIconComponent", + "Id": 18071675051915092508 + }, + "Component_[2115498007879087044]": { + "$type": "EditorInspectorComponent", + "Id": 2115498007879087044, + "ComponentOrderEntryArray": [ + { + "ComponentId": 399415038452606756 + }, + { + "ComponentId": 16184381538555246534, + "SortIndex": 1 + }, + { + "ComponentId": 7827190074535394331, + "SortIndex": 2 + } + ] + }, + "Component_[3518973002096080237]": { + "$type": "EditorOnlyEntityComponent", + "Id": 3518973002096080237 + }, + "Component_[399415038452606756]": { + "$type": "{27F1E1A1-8D9D-4C3B-BD3A-AFB9762449C0} TransformComponent", + "Id": 399415038452606756, + "Parent Entity": "ContainerEntity", + "Transform Data": { + "Translate": [ + 37.53014373779297, + -0.00018183141946792603, + 30.08451271057129 + ] + } + }, + "Component_[4564240319609068082]": { + "$type": "EditorEntitySortComponent", + "Id": 4564240319609068082 + }, + "Component_[7827190074535394331]": { + "$type": "EditorMaterialComponent", + "Id": 7827190074535394331, + "Controller": { + "Configuration": { + "materials": [ + { + "Key": { + "materialSlotStableId": 2418540911 + }, + "Value": { + "MaterialAsset": { + "assetId": { + "guid": "{CF5C7B01-4912-58AE-991A-F25251E505AC}" + }, + "assetHint": "materials/presets/pbr/metal_copper_polished.azmaterial" + } + } + } + ] + } + } + }, + "Component_[8092226976542590265]": { + "$type": "EditorDisabledCompositionComponent", + "Id": 8092226976542590265 + } + } + }, + "Entity_[4159992621012]": { + "Id": "Entity_[4159992621012]", + "Name": "Entity1", + "Components": { + "Component_[11525365929370623807]": { + "$type": "EditorVisibilityComponent", + "Id": 11525365929370623807 + }, + "Component_[12334620273692642550]": { + "$type": "EditorLockComponent", + "Id": 12334620273692642550 + }, + "Component_[14389735759337977675]": { + "$type": "EditorPendingCompositionComponent", + "Id": 14389735759337977675 + }, + "Component_[16184381538555246534]": { + "$type": "AZ::Render::EditorMeshComponent", + "Id": 16184381538555246534, + "Controller": { + "Configuration": { + "ModelAsset": { + "assetId": { + "guid": "{E14975EF-E676-51A4-B826-3EF59CB645AA}", + "subId": 285127096 + }, + "assetHint": "testdata/objects/cube/cube.azmodel" + } + } + } + }, + "Component_[17962478023087084794]": { + "$type": "SelectionComponent", + "Id": 17962478023087084794 + }, + "Component_[18071675051915092508]": { + "$type": "EditorEntityIconComponent", + "Id": 18071675051915092508 + }, + "Component_[2115498007879087044]": { + "$type": "EditorInspectorComponent", + "Id": 2115498007879087044, + "ComponentOrderEntryArray": [ + { + "ComponentId": 399415038452606756 + }, + { + "ComponentId": 16184381538555246534, + "SortIndex": 1 + }, + { + "ComponentId": 7827190074535394331, + "SortIndex": 2 + } + ] + }, + "Component_[3518973002096080237]": { + "$type": "EditorOnlyEntityComponent", + "Id": 3518973002096080237 + }, + "Component_[399415038452606756]": { + "$type": "{27F1E1A1-8D9D-4C3B-BD3A-AFB9762449C0} TransformComponent", + "Id": 399415038452606756, + "Parent Entity": "ContainerEntity", + "Transform Data": { + "Translate": [ + 2.5301437377929688, + -0.00018183141946792603, + 94.40913391113281 + ] + } + }, + "Component_[4564240319609068082]": { + "$type": "EditorEntitySortComponent", + "Id": 4564240319609068082 + }, + "Component_[7827190074535394331]": { + "$type": "EditorMaterialComponent", + "Id": 7827190074535394331, + "Controller": { + "Configuration": { + "materials": [ + { + "Key": { + "materialSlotStableId": 2418540911 + }, + "Value": { + "MaterialAsset": { + "assetId": { + "guid": "{60D4CA04-A2FE-5AE7-B472-694C38D05183}" + }, + "assetHint": "materials/presets/pbr/metal_platinum_matte.azmaterial" + } + } + } + ] + } + } + }, + "Component_[8092226976542590265]": { + "$type": "EditorDisabledCompositionComponent", + "Id": 8092226976542590265 + } + } + }, + "Entity_[4164287588308]": { + "Id": "Entity_[4164287588308]", + "Name": "Entity1", + "Components": { + "Component_[11525365929370623807]": { + "$type": "EditorVisibilityComponent", + "Id": 11525365929370623807 + }, + "Component_[12334620273692642550]": { + "$type": "EditorLockComponent", + "Id": 12334620273692642550 + }, + "Component_[14389735759337977675]": { + "$type": "EditorPendingCompositionComponent", + "Id": 14389735759337977675 + }, + "Component_[16184381538555246534]": { + "$type": "AZ::Render::EditorMeshComponent", + "Id": 16184381538555246534, + "Controller": { + "Configuration": { + "ModelAsset": { + "assetId": { + "guid": "{E14975EF-E676-51A4-B826-3EF59CB645AA}", + "subId": 285127096 + }, + "assetHint": "testdata/objects/cube/cube.azmodel" + } + } + } + }, + "Component_[17962478023087084794]": { + "$type": "SelectionComponent", + "Id": 17962478023087084794 + }, + "Component_[18071675051915092508]": { + "$type": "EditorEntityIconComponent", + "Id": 18071675051915092508 + }, + "Component_[2115498007879087044]": { + "$type": "EditorInspectorComponent", + "Id": 2115498007879087044, + "ComponentOrderEntryArray": [ + { + "ComponentId": 399415038452606756 + }, + { + "ComponentId": 16184381538555246534, + "SortIndex": 1 + }, + { + "ComponentId": 7827190074535394331, + "SortIndex": 2 + } + ] + }, + "Component_[3518973002096080237]": { + "$type": "EditorOnlyEntityComponent", + "Id": 3518973002096080237 + }, + "Component_[399415038452606756]": { + "$type": "{27F1E1A1-8D9D-4C3B-BD3A-AFB9762449C0} TransformComponent", + "Id": 399415038452606756, + "Parent Entity": "ContainerEntity", + "Transform Data": { + "Translate": [ + -42.53056335449219, + -0.00018183141946792603, + 0.0 + ] + } + }, + "Component_[4564240319609068082]": { + "$type": "EditorEntitySortComponent", + "Id": 4564240319609068082 + }, + "Component_[7827190074535394331]": { + "$type": "EditorMaterialComponent", + "Id": 7827190074535394331, + "Controller": { + "Configuration": { + "materials": [ + { + "Key": { + "materialSlotStableId": 2418540911 + }, + "Value": { + "MaterialAsset": { + "assetId": { + "guid": "{FC69F2F8-F73B-5A0C-B8B7-94BAA45780FC}" + }, + "assetHint": "materials/presets/pbr/metal_brass_polished.azmaterial" + } + } + } + ] + } + } + }, + "Component_[8092226976542590265]": { + "$type": "EditorDisabledCompositionComponent", + "Id": 8092226976542590265 + } + } + }, + "Entity_[4168582555604]": { + "Id": "Entity_[4168582555604]", + "Name": "Entity1", + "Components": { + "Component_[11525365929370623807]": { + "$type": "EditorVisibilityComponent", + "Id": 11525365929370623807 + }, + "Component_[12334620273692642550]": { + "$type": "EditorLockComponent", + "Id": 12334620273692642550 + }, + "Component_[14389735759337977675]": { + "$type": "EditorPendingCompositionComponent", + "Id": 14389735759337977675 + }, + "Component_[16184381538555246534]": { + "$type": "AZ::Render::EditorMeshComponent", + "Id": 16184381538555246534, + "Controller": { + "Configuration": { + "ModelAsset": { + "assetId": { + "guid": "{E14975EF-E676-51A4-B826-3EF59CB645AA}", + "subId": 285127096 + }, + "assetHint": "testdata/objects/cube/cube.azmodel" + } + } + } + }, + "Component_[17962478023087084794]": { + "$type": "SelectionComponent", + "Id": 17962478023087084794 + }, + "Component_[18071675051915092508]": { + "$type": "EditorEntityIconComponent", + "Id": 18071675051915092508 + }, + "Component_[2115498007879087044]": { + "$type": "EditorInspectorComponent", + "Id": 2115498007879087044, + "ComponentOrderEntryArray": [ + { + "ComponentId": 399415038452606756 + }, + { + "ComponentId": 16184381538555246534, + "SortIndex": 1 + }, + { + "ComponentId": 7827190074535394331, + "SortIndex": 2 + } + ] + }, + "Component_[3518973002096080237]": { + "$type": "EditorOnlyEntityComponent", + "Id": 3518973002096080237 + }, + "Component_[399415038452606756]": { + "$type": "{27F1E1A1-8D9D-4C3B-BD3A-AFB9762449C0} TransformComponent", + "Id": 399415038452606756, + "Parent Entity": "ContainerEntity", + "Transform Data": { + "Translate": [ + -37.53056335449219, + -0.00018183141946792603, + 24.533506393432617 + ] + } + }, + "Component_[4564240319609068082]": { + "$type": "EditorEntitySortComponent", + "Id": 4564240319609068082 + }, + "Component_[7827190074535394331]": { + "$type": "EditorMaterialComponent", + "Id": 7827190074535394331, + "Controller": { + "Configuration": { + "materials": [ + { + "Key": { + "materialSlotStableId": 2418540911 + }, + "Value": { + "MaterialAsset": { + "assetId": { + "guid": "{B7C712DC-4839-58BB-B522-A4F120084CF5}" + }, + "assetHint": "materials/presets/pbr/metal_chrome.azmaterial" + } + } + } + ] + } + } + }, + "Component_[8092226976542590265]": { + "$type": "EditorDisabledCompositionComponent", + "Id": 8092226976542590265 + } + } + }, + "Entity_[4172877522900]": { + "Id": "Entity_[4172877522900]", + "Name": "Entity1", + "Components": { + "Component_[11525365929370623807]": { + "$type": "EditorVisibilityComponent", + "Id": 11525365929370623807 + }, + "Component_[12334620273692642550]": { + "$type": "EditorLockComponent", + "Id": 12334620273692642550 + }, + "Component_[14389735759337977675]": { + "$type": "EditorPendingCompositionComponent", + "Id": 14389735759337977675 + }, + "Component_[16184381538555246534]": { + "$type": "AZ::Render::EditorMeshComponent", + "Id": 16184381538555246534, + "Controller": { + "Configuration": { + "ModelAsset": { + "assetId": { + "guid": "{E14975EF-E676-51A4-B826-3EF59CB645AA}", + "subId": 285127096 + }, + "assetHint": "testdata/objects/cube/cube.azmodel" + } + } + } + }, + "Component_[17962478023087084794]": { + "$type": "SelectionComponent", + "Id": 17962478023087084794 + }, + "Component_[18071675051915092508]": { + "$type": "EditorEntityIconComponent", + "Id": 18071675051915092508 + }, + "Component_[2115498007879087044]": { + "$type": "EditorInspectorComponent", + "Id": 2115498007879087044, + "ComponentOrderEntryArray": [ + { + "ComponentId": 399415038452606756 + }, + { + "ComponentId": 16184381538555246534, + "SortIndex": 1 + }, + { + "ComponentId": 7827190074535394331, + "SortIndex": 2 + } + ] + }, + "Component_[3518973002096080237]": { + "$type": "EditorOnlyEntityComponent", + "Id": 3518973002096080237 + }, + "Component_[399415038452606756]": { + "$type": "{27F1E1A1-8D9D-4C3B-BD3A-AFB9762449C0} TransformComponent", + "Id": 399415038452606756, + "Parent Entity": "ContainerEntity", + "Transform Data": { + "Translate": [ + -37.53056335449219, + -0.00018183141946792603, + 114.4910659790039 + ] + } + }, + "Component_[4564240319609068082]": { + "$type": "EditorEntitySortComponent", + "Id": 4564240319609068082 + }, + "Component_[7827190074535394331]": { + "$type": "EditorMaterialComponent", + "Id": 7827190074535394331, + "Controller": { + "Configuration": { + "materials": [ + { + "Key": { + "materialSlotStableId": 2418540911 + }, + "Value": { + "MaterialAsset": { + "assetId": { + "guid": "{B7C712DC-4839-58BB-B522-A4F120084CF5}" + }, + "assetHint": "materials/presets/pbr/metal_chrome.azmaterial" + } + } + } + ] + } + } + }, + "Component_[8092226976542590265]": { + "$type": "EditorDisabledCompositionComponent", + "Id": 8092226976542590265 + } + } + }, + "Entity_[4177172490196]": { + "Id": "Entity_[4177172490196]", + "Name": "Entity1", + "Components": { + "Component_[1057179753323467068]": { + "$type": "EditorMaterialComponent", + "Id": 1057179753323467068, + "Controller": { + "Configuration": { + "materials": [ + { + "Key": { + "materialSlotStableId": 2418540911 + }, + "Value": { + "MaterialAsset": { + "assetId": { + "guid": "{3F0DF0C4-5F23-5EB1-B762-7344AFFDC011}" + }, + "assetHint": "materials/presets/pbr/metal_titanium_polished.azmaterial" + } + } + } + ] + } + } + }, + "Component_[11525365929370623807]": { + "$type": "EditorVisibilityComponent", + "Id": 11525365929370623807 + }, + "Component_[12334620273692642550]": { + "$type": "EditorLockComponent", + "Id": 12334620273692642550 + }, + "Component_[14389735759337977675]": { + "$type": "EditorPendingCompositionComponent", + "Id": 14389735759337977675 + }, + "Component_[16184381538555246534]": { + "$type": "AZ::Render::EditorMeshComponent", + "Id": 16184381538555246534, + "Controller": { + "Configuration": { + "ModelAsset": { + "assetId": { + "guid": "{E14975EF-E676-51A4-B826-3EF59CB645AA}", + "subId": 285127096 + }, + "assetHint": "testdata/objects/cube/cube.azmodel" + } + } + } + }, + "Component_[17962478023087084794]": { + "$type": "SelectionComponent", + "Id": 17962478023087084794 + }, + "Component_[18071675051915092508]": { + "$type": "EditorEntityIconComponent", + "Id": 18071675051915092508 + }, + "Component_[2115498007879087044]": { + "$type": "EditorInspectorComponent", + "Id": 2115498007879087044, + "ComponentOrderEntryArray": [ + { + "ComponentId": 399415038452606756 + }, + { + "ComponentId": 16184381538555246534, + "SortIndex": 1 + }, + { + "ComponentId": 1057179753323467068, + "SortIndex": 2 + } + ] + }, + "Component_[3518973002096080237]": { + "$type": "EditorOnlyEntityComponent", + "Id": 3518973002096080237 + }, + "Component_[399415038452606756]": { + "$type": "{27F1E1A1-8D9D-4C3B-BD3A-AFB9762449C0} TransformComponent", + "Id": 399415038452606756, + "Parent Entity": "ContainerEntity", + "Transform Data": { + "Translate": [ + 12.530143737792969, + -0.00018183141946792603, + 15.057670593261719 + ] + } + }, + "Component_[4564240319609068082]": { + "$type": "EditorEntitySortComponent", + "Id": 4564240319609068082 + }, + "Component_[8092226976542590265]": { + "$type": "EditorDisabledCompositionComponent", + "Id": 8092226976542590265 + } + } + }, + "Entity_[4181467457492]": { + "Id": "Entity_[4181467457492]", + "Name": "Entity1", + "Components": { + "Component_[11525365929370623807]": { + "$type": "EditorVisibilityComponent", + "Id": 11525365929370623807 + }, + "Component_[12334620273692642550]": { + "$type": "EditorLockComponent", + "Id": 12334620273692642550 + }, + "Component_[14389735759337977675]": { + "$type": "EditorPendingCompositionComponent", + "Id": 14389735759337977675 + }, + "Component_[16184381538555246534]": { + "$type": "AZ::Render::EditorMeshComponent", + "Id": 16184381538555246534, + "Controller": { + "Configuration": { + "ModelAsset": { + "assetId": { + "guid": "{E14975EF-E676-51A4-B826-3EF59CB645AA}", + "subId": 285127096 + }, + "assetHint": "testdata/objects/cube/cube.azmodel" + } + } + } + }, + "Component_[17962478023087084794]": { + "$type": "SelectionComponent", + "Id": 17962478023087084794 + }, + "Component_[18071675051915092508]": { + "$type": "EditorEntityIconComponent", + "Id": 18071675051915092508 + }, + "Component_[2115498007879087044]": { + "$type": "EditorInspectorComponent", + "Id": 2115498007879087044, + "ComponentOrderEntryArray": [ + { + "ComponentId": 399415038452606756 + }, + { + "ComponentId": 16184381538555246534, + "SortIndex": 1 + }, + { + "ComponentId": 7827190074535394331, + "SortIndex": 2 + } + ] + }, + "Component_[3518973002096080237]": { + "$type": "EditorOnlyEntityComponent", + "Id": 3518973002096080237 + }, + "Component_[399415038452606756]": { + "$type": "{27F1E1A1-8D9D-4C3B-BD3A-AFB9762449C0} TransformComponent", + "Id": 399415038452606756, + "Parent Entity": "ContainerEntity", + "Transform Data": { + "Translate": [ + 17.53014373779297, + -0.00018183141946792603, + 4.451573371887207 + ] + } + }, + "Component_[4564240319609068082]": { + "$type": "EditorEntitySortComponent", + "Id": 4564240319609068082 + }, + "Component_[7827190074535394331]": { + "$type": "EditorMaterialComponent", + "Id": 7827190074535394331, + "Controller": { + "Configuration": { + "materials": [ + { + "Key": {}, + "Value": { + "MaterialAsset": { + "assetId": { + "guid": "{721188E0-B7CC-5D06-8D5D-39AF8ABF2EF9}" + }, + "assetHint": "materials/presets/pbr/metal_titanium.azmaterial" + } + } + }, + { + "Key": { + "materialSlotStableId": 2418540911 + }, + "Value": { + "MaterialAsset": { + "assetId": { + "guid": "{549D26B8-881D-569F-AF05-961F36A43F4F}" + }, + "assetHint": "materials/presets/pbr/metal_aluminum_matte.azmaterial" + } + } + } + ] + } + } + }, + "Component_[8092226976542590265]": { + "$type": "EditorDisabledCompositionComponent", + "Id": 8092226976542590265 + } + } + }, + "Entity_[4185762424788]": { + "Id": "Entity_[4185762424788]", + "Name": "Entity1", + "Components": { + "Component_[11525365929370623807]": { + "$type": "EditorVisibilityComponent", + "Id": 11525365929370623807 + }, + "Component_[12334620273692642550]": { + "$type": "EditorLockComponent", + "Id": 12334620273692642550 + }, + "Component_[14389735759337977675]": { + "$type": "EditorPendingCompositionComponent", + "Id": 14389735759337977675 + }, + "Component_[16184381538555246534]": { + "$type": "AZ::Render::EditorMeshComponent", + "Id": 16184381538555246534, + "Controller": { + "Configuration": { + "ModelAsset": { + "assetId": { + "guid": "{E14975EF-E676-51A4-B826-3EF59CB645AA}", + "subId": 285127096 + }, + "assetHint": "testdata/objects/cube/cube.azmodel" + } + } + } + }, + "Component_[17962478023087084794]": { + "$type": "SelectionComponent", + "Id": 17962478023087084794 + }, + "Component_[18071675051915092508]": { + "$type": "EditorEntityIconComponent", + "Id": 18071675051915092508 + }, + "Component_[2115498007879087044]": { + "$type": "EditorInspectorComponent", + "Id": 2115498007879087044, + "ComponentOrderEntryArray": [ + { + "ComponentId": 399415038452606756 + }, + { + "ComponentId": 16184381538555246534, + "SortIndex": 1 + }, + { + "ComponentId": 7827190074535394331, + "SortIndex": 2 + } + ] + }, + "Component_[3518973002096080237]": { + "$type": "EditorOnlyEntityComponent", + "Id": 3518973002096080237 + }, + "Component_[399415038452606756]": { + "$type": "{27F1E1A1-8D9D-4C3B-BD3A-AFB9762449C0} TransformComponent", + "Id": 399415038452606756, + "Parent Entity": "ContainerEntity", + "Transform Data": { + "Translate": [ + 47.53014373779297, + -0.00018183141946792603, + 4.451573371887207 + ] + } + }, + "Component_[4564240319609068082]": { + "$type": "EditorEntitySortComponent", + "Id": 4564240319609068082 + }, + "Component_[7827190074535394331]": { + "$type": "EditorMaterialComponent", + "Id": 7827190074535394331, + "Controller": { + "Configuration": { + "materials": [ + { + "Key": { + "materialSlotStableId": 2418540911 + }, + "Value": { + "MaterialAsset": { + "assetId": { + "guid": "{970148AC-7258-5EC8-9CE7-F4EF93164D93}" + }, + "assetHint": "materials/presets/pbr/metal_iron_matte.azmaterial" + } + } + } + ] + } + } + }, + "Component_[8092226976542590265]": { + "$type": "EditorDisabledCompositionComponent", + "Id": 8092226976542590265 + } + } + }, + "Entity_[4190057392084]": { + "Id": "Entity_[4190057392084]", + "Name": "Entity1", + "Components": { + "Component_[11525365929370623807]": { + "$type": "EditorVisibilityComponent", + "Id": 11525365929370623807 + }, + "Component_[12334620273692642550]": { + "$type": "EditorLockComponent", + "Id": 12334620273692642550 + }, + "Component_[14389735759337977675]": { + "$type": "EditorPendingCompositionComponent", + "Id": 14389735759337977675 + }, + "Component_[16184381538555246534]": { + "$type": "AZ::Render::EditorMeshComponent", + "Id": 16184381538555246534, + "Controller": { + "Configuration": { + "ModelAsset": { + "assetId": { + "guid": "{E14975EF-E676-51A4-B826-3EF59CB645AA}", + "subId": 285127096 + }, + "assetHint": "testdata/objects/cube/cube.azmodel" + } + } + } + }, + "Component_[17962478023087084794]": { + "$type": "SelectionComponent", + "Id": 17962478023087084794 + }, + "Component_[18071675051915092508]": { + "$type": "EditorEntityIconComponent", + "Id": 18071675051915092508 + }, + "Component_[2115498007879087044]": { + "$type": "EditorInspectorComponent", + "Id": 2115498007879087044, + "ComponentOrderEntryArray": [ + { + "ComponentId": 399415038452606756 + }, + { + "ComponentId": 16184381538555246534, + "SortIndex": 1 + }, + { + "ComponentId": 7827190074535394331, + "SortIndex": 2 + } + ] + }, + "Component_[3518973002096080237]": { + "$type": "EditorOnlyEntityComponent", + "Id": 3518973002096080237 + }, + "Component_[399415038452606756]": { + "$type": "{27F1E1A1-8D9D-4C3B-BD3A-AFB9762449C0} TransformComponent", + "Id": 399415038452606756, + "Parent Entity": "ContainerEntity", + "Transform Data": { + "Translate": [ + -37.53056335449219, + -0.00018183141946792603, + 54.618019104003906 + ] + } + }, + "Component_[4564240319609068082]": { + "$type": "EditorEntitySortComponent", + "Id": 4564240319609068082 + }, + "Component_[7827190074535394331]": { + "$type": "EditorMaterialComponent", + "Id": 7827190074535394331, + "Controller": { + "Configuration": { + "materials": [ + { + "Key": { + "materialSlotStableId": 2418540911 + }, + "Value": { + "MaterialAsset": { + "assetId": { + "guid": "{B7C712DC-4839-58BB-B522-A4F120084CF5}" + }, + "assetHint": "materials/presets/pbr/metal_chrome.azmaterial" + } + } + } + ] + } + } + }, + "Component_[8092226976542590265]": { + "$type": "EditorDisabledCompositionComponent", + "Id": 8092226976542590265 + } + } + }, + "Entity_[4194352359380]": { + "Id": "Entity_[4194352359380]", + "Name": "Entity1", + "Components": { + "Component_[11525365929370623807]": { + "$type": "EditorVisibilityComponent", + "Id": 11525365929370623807 + }, + "Component_[12334620273692642550]": { + "$type": "EditorLockComponent", + "Id": 12334620273692642550 + }, + "Component_[14389735759337977675]": { + "$type": "EditorPendingCompositionComponent", + "Id": 14389735759337977675 + }, + "Component_[16184381538555246534]": { + "$type": "AZ::Render::EditorMeshComponent", + "Id": 16184381538555246534, + "Controller": { + "Configuration": { + "ModelAsset": { + "assetId": { + "guid": "{E14975EF-E676-51A4-B826-3EF59CB645AA}", + "subId": 285127096 + }, + "assetHint": "testdata/objects/cube/cube.azmodel" + } + } + } + }, + "Component_[17962478023087084794]": { + "$type": "SelectionComponent", + "Id": 17962478023087084794 + }, + "Component_[18071675051915092508]": { + "$type": "EditorEntityIconComponent", + "Id": 18071675051915092508 + }, + "Component_[2115498007879087044]": { + "$type": "EditorInspectorComponent", + "Id": 2115498007879087044, + "ComponentOrderEntryArray": [ + { + "ComponentId": 399415038452606756 + }, + { + "ComponentId": 16184381538555246534, + "SortIndex": 1 + }, + { + "ComponentId": 7827190074535394331, + "SortIndex": 2 + } + ] + }, + "Component_[3518973002096080237]": { + "$type": "EditorOnlyEntityComponent", + "Id": 3518973002096080237 + }, + "Component_[399415038452606756]": { + "$type": "{27F1E1A1-8D9D-4C3B-BD3A-AFB9762449C0} TransformComponent", + "Id": 399415038452606756, + "Parent Entity": "ContainerEntity", + "Transform Data": { + "Translate": [ + -17.530563354492188, + -0.00018183141946792603, + 59.873046875 + ] + } + }, + "Component_[4564240319609068082]": { + "$type": "EditorEntitySortComponent", + "Id": 4564240319609068082 + }, + "Component_[7827190074535394331]": { + "$type": "EditorMaterialComponent", + "Id": 7827190074535394331, + "Controller": { + "Configuration": { + "materials": [ + { + "Key": { + "materialSlotStableId": 2418540911 + }, + "Value": { + "MaterialAsset": { + "assetId": { + "guid": "{A7F03135-ECAD-5440-99DB-E84ABA3D50DA}" + }, + "assetHint": "materials/presets/pbr/metal_iron_polished.azmaterial" + } + } + } + ] + } + } + }, + "Component_[8092226976542590265]": { + "$type": "EditorDisabledCompositionComponent", + "Id": 8092226976542590265 + } + } + }, + "Entity_[4198647326676]": { + "Id": "Entity_[4198647326676]", + "Name": "Entity1", + "Components": { + "Component_[11525365929370623807]": { + "$type": "EditorVisibilityComponent", + "Id": 11525365929370623807 + }, + "Component_[12334620273692642550]": { + "$type": "EditorLockComponent", + "Id": 12334620273692642550 + }, + "Component_[14389735759337977675]": { + "$type": "EditorPendingCompositionComponent", + "Id": 14389735759337977675 + }, + "Component_[16184381538555246534]": { + "$type": "AZ::Render::EditorMeshComponent", + "Id": 16184381538555246534, + "Controller": { + "Configuration": { + "ModelAsset": { + "assetId": { + "guid": "{E14975EF-E676-51A4-B826-3EF59CB645AA}", + "subId": 285127096 + }, + "assetHint": "testdata/objects/cube/cube.azmodel" + } + } + } + }, + "Component_[17962478023087084794]": { + "$type": "SelectionComponent", + "Id": 17962478023087084794 + }, + "Component_[18071675051915092508]": { + "$type": "EditorEntityIconComponent", + "Id": 18071675051915092508 + }, + "Component_[2115498007879087044]": { + "$type": "EditorInspectorComponent", + "Id": 2115498007879087044, + "ComponentOrderEntryArray": [ + { + "ComponentId": 399415038452606756 + }, + { + "ComponentId": 16184381538555246534, + "SortIndex": 1 + }, + { + "ComponentId": 7827190074535394331, + "SortIndex": 2 + } + ] + }, + "Component_[3518973002096080237]": { + "$type": "EditorOnlyEntityComponent", + "Id": 3518973002096080237 + }, + "Component_[399415038452606756]": { + "$type": "{27F1E1A1-8D9D-4C3B-BD3A-AFB9762449C0} TransformComponent", + "Id": 399415038452606756, + "Parent Entity": "ContainerEntity", + "Transform Data": { + "Translate": [ + -27.530563354492188, + -0.00018183141946792603, + 39.56034851074219 + ] + } + }, + "Component_[4564240319609068082]": { + "$type": "EditorEntitySortComponent", + "Id": 4564240319609068082 + }, + "Component_[7827190074535394331]": { + "$type": "EditorMaterialComponent", + "Id": 7827190074535394331, + "Controller": { + "Configuration": { + "materials": [ + { + "Key": { + "materialSlotStableId": 2418540911 + }, + "Value": { + "MaterialAsset": { + "assetId": { + "guid": "{E621C5BF-B8E1-55F0-A791-EC960F2FA46F}" + }, + "assetHint": "materials/presets/pbr/metal_copper.azmaterial" + } + } + } + ] + } + } + }, + "Component_[8092226976542590265]": { + "$type": "EditorDisabledCompositionComponent", + "Id": 8092226976542590265 + } + } + }, + "Entity_[4202942293972]": { + "Id": "Entity_[4202942293972]", + "Name": "Entity1", + "Components": { + "Component_[11525365929370623807]": { + "$type": "EditorVisibilityComponent", + "Id": 11525365929370623807 + }, + "Component_[12334620273692642550]": { + "$type": "EditorLockComponent", + "Id": 12334620273692642550 + }, + "Component_[14389735759337977675]": { + "$type": "EditorPendingCompositionComponent", + "Id": 14389735759337977675 + }, + "Component_[16184381538555246534]": { + "$type": "AZ::Render::EditorMeshComponent", + "Id": 16184381538555246534, + "Controller": { + "Configuration": { + "ModelAsset": { + "assetId": { + "guid": "{E14975EF-E676-51A4-B826-3EF59CB645AA}", + "subId": 285127096 + }, + "assetHint": "testdata/objects/cube/cube.azmodel" + } + } + } + }, + "Component_[17962478023087084794]": { + "$type": "SelectionComponent", + "Id": 17962478023087084794 + }, + "Component_[18071675051915092508]": { + "$type": "EditorEntityIconComponent", + "Id": 18071675051915092508 + }, + "Component_[2115498007879087044]": { + "$type": "EditorInspectorComponent", + "Id": 2115498007879087044, + "ComponentOrderEntryArray": [ + { + "ComponentId": 399415038452606756 + }, + { + "ComponentId": 16184381538555246534, + "SortIndex": 1 + }, + { + "ComponentId": 7827190074535394331, + "SortIndex": 2 + } + ] + }, + "Component_[3518973002096080237]": { + "$type": "EditorOnlyEntityComponent", + "Id": 3518973002096080237 + }, + "Component_[399415038452606756]": { + "$type": "{27F1E1A1-8D9D-4C3B-BD3A-AFB9762449C0} TransformComponent", + "Id": 399415038452606756, + "Parent Entity": "ContainerEntity", + "Transform Data": { + "Translate": [ + 22.53014373779297, + -0.00018183141946792603, + 99.43339538574219 + ] + } + }, + "Component_[4564240319609068082]": { + "$type": "EditorEntitySortComponent", + "Id": 4564240319609068082 + }, + "Component_[7827190074535394331]": { + "$type": "EditorMaterialComponent", + "Id": 7827190074535394331, + "Controller": { + "Configuration": { + "materials": [ + { + "Key": { + "materialSlotStableId": 2418540911 + }, + "Value": { + "MaterialAsset": { + "assetId": { + "guid": "{80E0F2A7-1EE4-597F-80EF-985C65BCE2EB}" + }, + "assetHint": "materials/presets/pbr/metal_brass.azmaterial" + } + } + } + ] + } + } + }, + "Component_[8092226976542590265]": { + "$type": "EditorDisabledCompositionComponent", + "Id": 8092226976542590265 + } + } + }, + "Entity_[4207237261268]": { + "Id": "Entity_[4207237261268]", + "Name": "Entity1", + "Components": { + "Component_[1057179753323467068]": { + "$type": "EditorMaterialComponent", + "Id": 1057179753323467068, + "Controller": { + "Configuration": { + "materials": [ + { + "Key": { + "materialSlotStableId": 2418540911 + }, + "Value": { + "MaterialAsset": { + "assetId": { + "guid": "{3F0DF0C4-5F23-5EB1-B762-7344AFFDC011}" + }, + "assetHint": "materials/presets/pbr/metal_titanium_polished.azmaterial" + } + } + } + ] + } + } + }, + "Component_[11525365929370623807]": { + "$type": "EditorVisibilityComponent", + "Id": 11525365929370623807 + }, + "Component_[12334620273692642550]": { + "$type": "EditorLockComponent", + "Id": 12334620273692642550 + }, + "Component_[14389735759337977675]": { + "$type": "EditorPendingCompositionComponent", + "Id": 14389735759337977675 + }, + "Component_[16184381538555246534]": { + "$type": "AZ::Render::EditorMeshComponent", + "Id": 16184381538555246534, + "Controller": { + "Configuration": { + "ModelAsset": { + "assetId": { + "guid": "{E14975EF-E676-51A4-B826-3EF59CB645AA}", + "subId": 285127096 + }, + "assetHint": "testdata/objects/cube/cube.azmodel" + } + } + } + }, + "Component_[17962478023087084794]": { + "$type": "SelectionComponent", + "Id": 17962478023087084794 + }, + "Component_[18071675051915092508]": { + "$type": "EditorEntityIconComponent", + "Id": 18071675051915092508 + }, + "Component_[2115498007879087044]": { + "$type": "EditorInspectorComponent", + "Id": 2115498007879087044, + "ComponentOrderEntryArray": [ + { + "ComponentId": 399415038452606756 + }, + { + "ComponentId": 16184381538555246534, + "SortIndex": 1 + }, + { + "ComponentId": 1057179753323467068, + "SortIndex": 2 + } + ] + }, + "Component_[3518973002096080237]": { + "$type": "EditorOnlyEntityComponent", + "Id": 3518973002096080237 + }, + "Component_[399415038452606756]": { + "$type": "{27F1E1A1-8D9D-4C3B-BD3A-AFB9762449C0} TransformComponent", + "Id": 399415038452606756, + "Parent Entity": "ContainerEntity", + "Transform Data": { + "Translate": [ + 12.530143737792969, + -0.00018183141946792603, + 59.873046875 + ] + } + }, + "Component_[4564240319609068082]": { + "$type": "EditorEntitySortComponent", + "Id": 4564240319609068082 + }, + "Component_[8092226976542590265]": { + "$type": "EditorDisabledCompositionComponent", + "Id": 8092226976542590265 + } + } + }, + "Entity_[4211532228564]": { + "Id": "Entity_[4211532228564]", + "Name": "Entity1", + "Components": { + "Component_[11525365929370623807]": { + "$type": "EditorVisibilityComponent", + "Id": 11525365929370623807 + }, + "Component_[12334620273692642550]": { + "$type": "EditorLockComponent", + "Id": 12334620273692642550 + }, + "Component_[14389735759337977675]": { + "$type": "EditorPendingCompositionComponent", + "Id": 14389735759337977675 + }, + "Component_[16184381538555246534]": { + "$type": "AZ::Render::EditorMeshComponent", + "Id": 16184381538555246534, + "Controller": { + "Configuration": { + "ModelAsset": { + "assetId": { + "guid": "{E14975EF-E676-51A4-B826-3EF59CB645AA}", + "subId": 285127096 + }, + "assetHint": "testdata/objects/cube/cube.azmodel" + } + } + } + }, + "Component_[17962478023087084794]": { + "$type": "SelectionComponent", + "Id": 17962478023087084794 + }, + "Component_[18071675051915092508]": { + "$type": "EditorEntityIconComponent", + "Id": 18071675051915092508 + }, + "Component_[2115498007879087044]": { + "$type": "EditorInspectorComponent", + "Id": 2115498007879087044, + "ComponentOrderEntryArray": [ + { + "ComponentId": 399415038452606756 + }, + { + "ComponentId": 16184381538555246534, + "SortIndex": 1 + }, + { + "ComponentId": 7827190074535394331, + "SortIndex": 2 + } + ] + }, + "Component_[3518973002096080237]": { + "$type": "EditorOnlyEntityComponent", + "Id": 3518973002096080237 + }, + "Component_[399415038452606756]": { + "$type": "{27F1E1A1-8D9D-4C3B-BD3A-AFB9762449C0} TransformComponent", + "Id": 399415038452606756, + "Parent Entity": "ContainerEntity", + "Transform Data": { + "Translate": [ + -42.53056335449219, + -0.00018183141946792603, + 30.08451271057129 + ] + } + }, + "Component_[4564240319609068082]": { + "$type": "EditorEntitySortComponent", + "Id": 4564240319609068082 + }, + "Component_[7827190074535394331]": { + "$type": "EditorMaterialComponent", + "Id": 7827190074535394331, + "Controller": { + "Configuration": { + "materials": [ + { + "Key": { + "materialSlotStableId": 2418540911 + }, + "Value": { + "MaterialAsset": { + "assetId": { + "guid": "{FC69F2F8-F73B-5A0C-B8B7-94BAA45780FC}" + }, + "assetHint": "materials/presets/pbr/metal_brass_polished.azmaterial" + } + } + } + ] + } + } + }, + "Component_[8092226976542590265]": { + "$type": "EditorDisabledCompositionComponent", + "Id": 8092226976542590265 + } + } + }, + "Entity_[4215827195860]": { + "Id": "Entity_[4215827195860]", + "Name": "Entity1", + "Components": { + "Component_[11525365929370623807]": { + "$type": "EditorVisibilityComponent", + "Id": 11525365929370623807 + }, + "Component_[12334620273692642550]": { + "$type": "EditorLockComponent", + "Id": 12334620273692642550 + }, + "Component_[14389735759337977675]": { + "$type": "EditorPendingCompositionComponent", + "Id": 14389735759337977675 + }, + "Component_[16184381538555246534]": { + "$type": "AZ::Render::EditorMeshComponent", + "Id": 16184381538555246534, + "Controller": { + "Configuration": { + "ModelAsset": { + "assetId": { + "guid": "{E14975EF-E676-51A4-B826-3EF59CB645AA}", + "subId": 285127096 + }, + "assetHint": "testdata/objects/cube/cube.azmodel" + } + } + } + }, + "Component_[17962478023087084794]": { + "$type": "SelectionComponent", + "Id": 17962478023087084794 + }, + "Component_[18071675051915092508]": { + "$type": "EditorEntityIconComponent", + "Id": 18071675051915092508 + }, + "Component_[2115498007879087044]": { + "$type": "EditorInspectorComponent", + "Id": 2115498007879087044, + "ComponentOrderEntryArray": [ + { + "ComponentId": 399415038452606756 + }, + { + "ComponentId": 16184381538555246534, + "SortIndex": 1 + }, + { + "ComponentId": 7827190074535394331, + "SortIndex": 2 + } + ] + }, + "Component_[3518973002096080237]": { + "$type": "EditorOnlyEntityComponent", + "Id": 3518973002096080237 + }, + "Component_[399415038452606756]": { + "$type": "{27F1E1A1-8D9D-4C3B-BD3A-AFB9762449C0} TransformComponent", + "Id": 399415038452606756, + "Parent Entity": "ContainerEntity", + "Transform Data": { + "Translate": [ + 2.5301437377929688, + -0.00018183141946792603, + 64.32462310791016 + ] + } + }, + "Component_[4564240319609068082]": { + "$type": "EditorEntitySortComponent", + "Id": 4564240319609068082 + }, + "Component_[7827190074535394331]": { + "$type": "EditorMaterialComponent", + "Id": 7827190074535394331, + "Controller": { + "Configuration": { + "materials": [ + { + "Key": { + "materialSlotStableId": 2418540911 + }, + "Value": { + "MaterialAsset": { + "assetId": { + "guid": "{60D4CA04-A2FE-5AE7-B472-694C38D05183}" + }, + "assetHint": "materials/presets/pbr/metal_platinum_matte.azmaterial" + } + } + } + ] + } + } + }, + "Component_[8092226976542590265]": { + "$type": "EditorDisabledCompositionComponent", + "Id": 8092226976542590265 + } + } + }, + "Entity_[4220122163156]": { + "Id": "Entity_[4220122163156]", + "Name": "Entity1", + "Components": { + "Component_[11525365929370623807]": { + "$type": "EditorVisibilityComponent", + "Id": 11525365929370623807 + }, + "Component_[12334620273692642550]": { + "$type": "EditorLockComponent", + "Id": 12334620273692642550 + }, + "Component_[14389735759337977675]": { + "$type": "EditorPendingCompositionComponent", + "Id": 14389735759337977675 + }, + "Component_[16184381538555246534]": { + "$type": "AZ::Render::EditorMeshComponent", + "Id": 16184381538555246534, + "Controller": { + "Configuration": { + "ModelAsset": { + "assetId": { + "guid": "{E14975EF-E676-51A4-B826-3EF59CB645AA}", + "subId": 285127096 + }, + "assetHint": "testdata/objects/cube/cube.azmodel" + } + } + } + }, + "Component_[17962478023087084794]": { + "$type": "SelectionComponent", + "Id": 17962478023087084794 + }, + "Component_[18071675051915092508]": { + "$type": "EditorEntityIconComponent", + "Id": 18071675051915092508 + }, + "Component_[2115498007879087044]": { + "$type": "EditorInspectorComponent", + "Id": 2115498007879087044, + "ComponentOrderEntryArray": [ + { + "ComponentId": 399415038452606756 + }, + { + "ComponentId": 16184381538555246534, + "SortIndex": 1 + }, + { + "ComponentId": 7827190074535394331, + "SortIndex": 2 + } + ] + }, + "Component_[3518973002096080237]": { + "$type": "EditorOnlyEntityComponent", + "Id": 3518973002096080237 + }, + "Component_[399415038452606756]": { + "$type": "{27F1E1A1-8D9D-4C3B-BD3A-AFB9762449C0} TransformComponent", + "Id": 399415038452606756, + "Parent Entity": "ContainerEntity", + "Transform Data": { + "Translate": [ + -2.5305633544921875, + -0.00018183141946792603, + 79.38228607177734 + ] + } + }, + "Component_[4564240319609068082]": { + "$type": "EditorEntitySortComponent", + "Id": 4564240319609068082 + }, + "Component_[7827190074535394331]": { + "$type": "EditorMaterialComponent", + "Id": 7827190074535394331, + "Controller": { + "Configuration": { + "materials": [ + { + "Key": { + "materialSlotStableId": 2418540911 + }, + "Value": { + "MaterialAsset": { + "assetId": { + "guid": "{9187B84B-425F-5D11-B4D7-35BBDB0959D1}" + }, + "assetHint": "materials/presets/pbr/metal_palladium_matte.azmaterial" + } + } + } + ] + } + } + }, + "Component_[8092226976542590265]": { + "$type": "EditorDisabledCompositionComponent", + "Id": 8092226976542590265 + } + } + }, + "Entity_[4224417130452]": { + "Id": "Entity_[4224417130452]", + "Name": "Entity1", + "Components": { + "Component_[11525365929370623807]": { + "$type": "EditorVisibilityComponent", + "Id": 11525365929370623807 + }, + "Component_[12334620273692642550]": { + "$type": "EditorLockComponent", + "Id": 12334620273692642550 + }, + "Component_[14389735759337977675]": { + "$type": "EditorPendingCompositionComponent", + "Id": 14389735759337977675 + }, + "Component_[16184381538555246534]": { + "$type": "AZ::Render::EditorMeshComponent", + "Id": 16184381538555246534, + "Controller": { + "Configuration": { + "ModelAsset": { + "assetId": { + "guid": "{E14975EF-E676-51A4-B826-3EF59CB645AA}", + "subId": 285127096 + }, + "assetHint": "testdata/objects/cube/cube.azmodel" + } + } + } + }, + "Component_[17962478023087084794]": { + "$type": "SelectionComponent", + "Id": 17962478023087084794 + }, + "Component_[18071675051915092508]": { + "$type": "EditorEntityIconComponent", + "Id": 18071675051915092508 + }, + "Component_[2115498007879087044]": { + "$type": "EditorInspectorComponent", + "Id": 2115498007879087044, + "ComponentOrderEntryArray": [ + { + "ComponentId": 399415038452606756 + }, + { + "ComponentId": 16184381538555246534, + "SortIndex": 1 + }, + { + "ComponentId": 7827190074535394331, + "SortIndex": 2 + } + ] + }, + "Component_[3518973002096080237]": { + "$type": "EditorOnlyEntityComponent", + "Id": 3518973002096080237 + }, + "Component_[399415038452606756]": { + "$type": "{27F1E1A1-8D9D-4C3B-BD3A-AFB9762449C0} TransformComponent", + "Id": 399415038452606756, + "Parent Entity": "ContainerEntity", + "Transform Data": { + "Translate": [ + -2.5305633544921875, + -0.00018183141946792603, + 89.95755767822266 + ] + } + }, + "Component_[4564240319609068082]": { + "$type": "EditorEntitySortComponent", + "Id": 4564240319609068082 + }, + "Component_[7827190074535394331]": { + "$type": "EditorMaterialComponent", + "Id": 7827190074535394331, + "Controller": { + "Configuration": { + "materials": [ + { + "Key": { + "materialSlotStableId": 2418540911 + }, + "Value": { + "MaterialAsset": { + "assetId": { + "guid": "{D0E9960A-4B31-5136-BAC6-5482B203D3B4}" + }, + "assetHint": "materials/presets/pbr/metal_palladium_polished.azmaterial" + } + } + } + ] + } + } + }, + "Component_[8092226976542590265]": { + "$type": "EditorDisabledCompositionComponent", + "Id": 8092226976542590265 + } + } + }, + "Entity_[4228712097748]": { + "Id": "Entity_[4228712097748]", + "Name": "Entity1", + "Components": { + "Component_[11525365929370623807]": { + "$type": "EditorVisibilityComponent", + "Id": 11525365929370623807 + }, + "Component_[12334620273692642550]": { + "$type": "EditorLockComponent", + "Id": 12334620273692642550 + }, + "Component_[14389735759337977675]": { + "$type": "EditorPendingCompositionComponent", + "Id": 14389735759337977675 + }, + "Component_[16184381538555246534]": { + "$type": "AZ::Render::EditorMeshComponent", + "Id": 16184381538555246534, + "Controller": { + "Configuration": { + "ModelAsset": { + "assetId": { + "guid": "{E14975EF-E676-51A4-B826-3EF59CB645AA}", + "subId": 285127096 + }, + "assetHint": "testdata/objects/cube/cube.azmodel" + } + } + } + }, + "Component_[17962478023087084794]": { + "$type": "SelectionComponent", + "Id": 17962478023087084794 + }, + "Component_[18071675051915092508]": { + "$type": "EditorEntityIconComponent", + "Id": 18071675051915092508 + }, + "Component_[2115498007879087044]": { + "$type": "EditorInspectorComponent", + "Id": 2115498007879087044, + "ComponentOrderEntryArray": [ + { + "ComponentId": 399415038452606756 + }, + { + "ComponentId": 16184381538555246534, + "SortIndex": 1 + }, + { + "ComponentId": 7827190074535394331, + "SortIndex": 2 + } + ] + }, + "Component_[3518973002096080237]": { + "$type": "EditorOnlyEntityComponent", + "Id": 3518973002096080237 + }, + "Component_[399415038452606756]": { + "$type": "{27F1E1A1-8D9D-4C3B-BD3A-AFB9762449C0} TransformComponent", + "Id": 399415038452606756, + "Parent Entity": "ContainerEntity", + "Transform Data": { + "Translate": [ + 32.53014373779297, + -0.00018183141946792603, + 15.057670593261719 + ] + } + }, + "Component_[4564240319609068082]": { + "$type": "EditorEntitySortComponent", + "Id": 4564240319609068082 + }, + "Component_[7827190074535394331]": { + "$type": "EditorMaterialComponent", + "Id": 7827190074535394331, + "Controller": { + "Configuration": { + "materials": [ + { + "Key": { + "materialSlotStableId": 2418540911 + }, + "Value": { + "MaterialAsset": { + "assetId": { + "guid": "{93DF55AE-8D1B-5AD1-A609-05F1BD9F6EA0}" + }, + "assetHint": "materials/presets/pbr/metal_cobalt_polished.azmaterial" + } + } + } + ] + } + } + }, + "Component_[8092226976542590265]": { + "$type": "EditorDisabledCompositionComponent", + "Id": 8092226976542590265 + } + } + }, + "Entity_[4233007065044]": { + "Id": "Entity_[4233007065044]", + "Name": "Entity1", + "Components": { + "Component_[11525365929370623807]": { + "$type": "EditorVisibilityComponent", + "Id": 11525365929370623807 + }, + "Component_[12334620273692642550]": { + "$type": "EditorLockComponent", + "Id": 12334620273692642550 + }, + "Component_[14389735759337977675]": { + "$type": "EditorPendingCompositionComponent", + "Id": 14389735759337977675 + }, + "Component_[16184381538555246534]": { + "$type": "AZ::Render::EditorMeshComponent", + "Id": 16184381538555246534, + "Controller": { + "Configuration": { + "ModelAsset": { + "assetId": { + "guid": "{E14975EF-E676-51A4-B826-3EF59CB645AA}", + "subId": 285127096 + }, + "assetHint": "testdata/objects/cube/cube.azmodel" + } + } + } + }, + "Component_[17962478023087084794]": { + "$type": "SelectionComponent", + "Id": 17962478023087084794 + }, + "Component_[18071675051915092508]": { + "$type": "EditorEntityIconComponent", + "Id": 18071675051915092508 + }, + "Component_[2115498007879087044]": { + "$type": "EditorInspectorComponent", + "Id": 2115498007879087044, + "ComponentOrderEntryArray": [ + { + "ComponentId": 399415038452606756 + }, + { + "ComponentId": 16184381538555246534, + "SortIndex": 1 + }, + { + "ComponentId": 7827190074535394331, + "SortIndex": 2 + } + ] + }, + "Component_[3518973002096080237]": { + "$type": "EditorOnlyEntityComponent", + "Id": 3518973002096080237 + }, + "Component_[399415038452606756]": { + "$type": "{27F1E1A1-8D9D-4C3B-BD3A-AFB9762449C0} TransformComponent", + "Id": 399415038452606756, + "Parent Entity": "ContainerEntity", + "Transform Data": { + "Translate": [ + -32.53056335449219, + -0.00018183141946792603, + 30.08451271057129 + ] + } + }, + "Component_[4564240319609068082]": { + "$type": "EditorEntitySortComponent", + "Id": 4564240319609068082 + }, + "Component_[7827190074535394331]": { + "$type": "EditorMaterialComponent", + "Id": 7827190074535394331, + "Controller": { + "Configuration": { + "materials": [ + { + "Key": { + "materialSlotStableId": 2418540911 + }, + "Value": { + "MaterialAsset": { + "assetId": { + "guid": "{93DF55AE-8D1B-5AD1-A609-05F1BD9F6EA0}" + }, + "assetHint": "materials/presets/pbr/metal_cobalt_polished.azmaterial" + } + } + } + ] + } + } + }, + "Component_[8092226976542590265]": { + "$type": "EditorDisabledCompositionComponent", + "Id": 8092226976542590265 + } + } + }, + "Entity_[4237302032340]": { + "Id": "Entity_[4237302032340]", + "Name": "Entity1", + "Components": { + "Component_[11525365929370623807]": { + "$type": "EditorVisibilityComponent", + "Id": 11525365929370623807 + }, + "Component_[12334620273692642550]": { + "$type": "EditorLockComponent", + "Id": 12334620273692642550 + }, + "Component_[14389735759337977675]": { + "$type": "EditorPendingCompositionComponent", + "Id": 14389735759337977675 + }, + "Component_[16184381538555246534]": { + "$type": "AZ::Render::EditorMeshComponent", + "Id": 16184381538555246534, + "Controller": { + "Configuration": { + "ModelAsset": { + "assetId": { + "guid": "{E14975EF-E676-51A4-B826-3EF59CB645AA}", + "subId": 285127096 + }, + "assetHint": "testdata/objects/cube/cube.azmodel" + } + } + } + }, + "Component_[17962478023087084794]": { + "$type": "SelectionComponent", + "Id": 17962478023087084794 + }, + "Component_[18071675051915092508]": { + "$type": "EditorEntityIconComponent", + "Id": 18071675051915092508 + }, + "Component_[2115498007879087044]": { + "$type": "EditorInspectorComponent", + "Id": 2115498007879087044, + "ComponentOrderEntryArray": [ + { + "ComponentId": 399415038452606756 + }, + { + "ComponentId": 16184381538555246534, + "SortIndex": 1 + }, + { + "ComponentId": 7827190074535394331, + "SortIndex": 2 + } + ] + }, + "Component_[3518973002096080237]": { + "$type": "EditorOnlyEntityComponent", + "Id": 3518973002096080237 + }, + "Component_[399415038452606756]": { + "$type": "{27F1E1A1-8D9D-4C3B-BD3A-AFB9762449C0} TransformComponent", + "Id": 399415038452606756, + "Parent Entity": "ContainerEntity", + "Transform Data": { + "Translate": [ + 22.53014373779297, + -0.00018183141946792603, + 105.0152359008789 + ] + } + }, + "Component_[4564240319609068082]": { + "$type": "EditorEntitySortComponent", + "Id": 4564240319609068082 + }, + "Component_[7827190074535394331]": { + "$type": "EditorMaterialComponent", + "Id": 7827190074535394331, + "Controller": { + "Configuration": { + "materials": [ + { + "Key": { + "materialSlotStableId": 2418540911 + }, + "Value": { + "MaterialAsset": { + "assetId": { + "guid": "{FC69F2F8-F73B-5A0C-B8B7-94BAA45780FC}" + }, + "assetHint": "materials/presets/pbr/metal_brass_polished.azmaterial" + } + } + } + ] + } + } + }, + "Component_[8092226976542590265]": { + "$type": "EditorDisabledCompositionComponent", + "Id": 8092226976542590265 + } + } + }, + "Entity_[4241596999636]": { + "Id": "Entity_[4241596999636]", + "Name": "Entity1", + "Components": { + "Component_[11525365929370623807]": { + "$type": "EditorVisibilityComponent", + "Id": 11525365929370623807 + }, + "Component_[12334620273692642550]": { + "$type": "EditorLockComponent", + "Id": 12334620273692642550 + }, + "Component_[14389735759337977675]": { + "$type": "EditorPendingCompositionComponent", + "Id": 14389735759337977675 + }, + "Component_[16184381538555246534]": { + "$type": "AZ::Render::EditorMeshComponent", + "Id": 16184381538555246534, + "Controller": { + "Configuration": { + "ModelAsset": { + "assetId": { + "guid": "{E14975EF-E676-51A4-B826-3EF59CB645AA}", + "subId": 285127096 + }, + "assetHint": "testdata/objects/cube/cube.azmodel" + } + } + } + }, + "Component_[17962478023087084794]": { + "$type": "SelectionComponent", + "Id": 17962478023087084794 + }, + "Component_[18071675051915092508]": { + "$type": "EditorEntityIconComponent", + "Id": 18071675051915092508 + }, + "Component_[2115498007879087044]": { + "$type": "EditorInspectorComponent", + "Id": 2115498007879087044, + "ComponentOrderEntryArray": [ + { + "ComponentId": 399415038452606756 + }, + { + "ComponentId": 16184381538555246534, + "SortIndex": 1 + }, + { + "ComponentId": 7827190074535394331, + "SortIndex": 2 + } + ] + }, + "Component_[3518973002096080237]": { + "$type": "EditorOnlyEntityComponent", + "Id": 3518973002096080237 + }, + "Component_[399415038452606756]": { + "$type": "{27F1E1A1-8D9D-4C3B-BD3A-AFB9762449C0} TransformComponent", + "Id": 399415038452606756, + "Parent Entity": "ContainerEntity", + "Transform Data": { + "Translate": [ + 32.53014373779297, + -0.00018183141946792603, + 0.0 + ] + } + }, + "Component_[4564240319609068082]": { + "$type": "EditorEntitySortComponent", + "Id": 4564240319609068082 + }, + "Component_[7827190074535394331]": { + "$type": "EditorMaterialComponent", + "Id": 7827190074535394331, + "Controller": { + "Configuration": { + "materials": [ + { + "Key": { + "materialSlotStableId": 2418540911 + }, + "Value": { + "MaterialAsset": { + "assetId": { + "guid": "{93DF55AE-8D1B-5AD1-A609-05F1BD9F6EA0}" + }, + "assetHint": "materials/presets/pbr/metal_cobalt_polished.azmaterial" + } + } + } + ] + } + } + }, + "Component_[8092226976542590265]": { + "$type": "EditorDisabledCompositionComponent", + "Id": 8092226976542590265 + } + } + }, + "Entity_[4245891966932]": { + "Id": "Entity_[4245891966932]", + "Name": "Entity1", + "Components": { + "Component_[11525365929370623807]": { + "$type": "EditorVisibilityComponent", + "Id": 11525365929370623807 + }, + "Component_[12334620273692642550]": { + "$type": "EditorLockComponent", + "Id": 12334620273692642550 + }, + "Component_[14389735759337977675]": { + "$type": "EditorPendingCompositionComponent", + "Id": 14389735759337977675 + }, + "Component_[16184381538555246534]": { + "$type": "AZ::Render::EditorMeshComponent", + "Id": 16184381538555246534, + "Controller": { + "Configuration": { + "ModelAsset": { + "assetId": { + "guid": "{E14975EF-E676-51A4-B826-3EF59CB645AA}", + "subId": 285127096 + }, + "assetHint": "testdata/objects/cube/cube.azmodel" + } + } + } + }, + "Component_[17962478023087084794]": { + "$type": "SelectionComponent", + "Id": 17962478023087084794 + }, + "Component_[18071675051915092508]": { + "$type": "EditorEntityIconComponent", + "Id": 18071675051915092508 + }, + "Component_[2115498007879087044]": { + "$type": "EditorInspectorComponent", + "Id": 2115498007879087044, + "ComponentOrderEntryArray": [ + { + "ComponentId": 399415038452606756 + }, + { + "ComponentId": 16184381538555246534, + "SortIndex": 1 + }, + { + "ComponentId": 7827190074535394331, + "SortIndex": 2 + } + ] + }, + "Component_[3518973002096080237]": { + "$type": "EditorOnlyEntityComponent", + "Id": 3518973002096080237 + }, + "Component_[399415038452606756]": { + "$type": "{27F1E1A1-8D9D-4C3B-BD3A-AFB9762449C0} TransformComponent", + "Id": 399415038452606756, + "Parent Entity": "ContainerEntity", + "Transform Data": { + "Translate": [ + 37.53014373779297, + -0.00018183141946792603, + 105.0152359008789 + ] + } + }, + "Component_[4564240319609068082]": { + "$type": "EditorEntitySortComponent", + "Id": 4564240319609068082 + }, + "Component_[7827190074535394331]": { + "$type": "EditorMaterialComponent", + "Id": 7827190074535394331, + "Controller": { + "Configuration": { + "materials": [ + { + "Key": { + "materialSlotStableId": 2418540911 + }, + "Value": { + "MaterialAsset": { + "assetId": { + "guid": "{CF5C7B01-4912-58AE-991A-F25251E505AC}" + }, + "assetHint": "materials/presets/pbr/metal_copper_polished.azmaterial" + } + } + } + ] + } + } + }, + "Component_[8092226976542590265]": { + "$type": "EditorDisabledCompositionComponent", + "Id": 8092226976542590265 + } + } + }, + "Entity_[4250186934228]": { + "Id": "Entity_[4250186934228]", + "Name": "Entity1", + "Components": { + "Component_[11525365929370623807]": { + "$type": "EditorVisibilityComponent", + "Id": 11525365929370623807 + }, + "Component_[12334620273692642550]": { + "$type": "EditorLockComponent", + "Id": 12334620273692642550 + }, + "Component_[14389735759337977675]": { + "$type": "EditorPendingCompositionComponent", + "Id": 14389735759337977675 + }, + "Component_[16184381538555246534]": { + "$type": "AZ::Render::EditorMeshComponent", + "Id": 16184381538555246534, + "Controller": { + "Configuration": { + "ModelAsset": { + "assetId": { + "guid": "{E14975EF-E676-51A4-B826-3EF59CB645AA}", + "subId": 285127096 + }, + "assetHint": "testdata/objects/cube/cube.azmodel" + } + } + } + }, + "Component_[17962478023087084794]": { + "$type": "SelectionComponent", + "Id": 17962478023087084794 + }, + "Component_[18071675051915092508]": { + "$type": "EditorEntityIconComponent", + "Id": 18071675051915092508 + }, + "Component_[2115498007879087044]": { + "$type": "EditorInspectorComponent", + "Id": 2115498007879087044, + "ComponentOrderEntryArray": [ + { + "ComponentId": 399415038452606756 + }, + { + "ComponentId": 16184381538555246534, + "SortIndex": 1 + }, + { + "ComponentId": 7827190074535394331, + "SortIndex": 2 + } + ] + }, + "Component_[3518973002096080237]": { + "$type": "EditorOnlyEntityComponent", + "Id": 3518973002096080237 + }, + "Component_[399415038452606756]": { + "$type": "{27F1E1A1-8D9D-4C3B-BD3A-AFB9762449C0} TransformComponent", + "Id": 399415038452606756, + "Parent Entity": "ContainerEntity", + "Transform Data": { + "Translate": [ + -2.5305633544921875, + -0.00018183141946792603, + 49.593753814697266 + ] + } + }, + "Component_[4564240319609068082]": { + "$type": "EditorEntitySortComponent", + "Id": 4564240319609068082 + }, + "Component_[7827190074535394331]": { + "$type": "EditorMaterialComponent", + "Id": 7827190074535394331, + "Controller": { + "Configuration": { + "materials": [ + { + "Key": { + "materialSlotStableId": 2418540911 + }, + "Value": { + "MaterialAsset": { + "assetId": { + "guid": "{9187B84B-425F-5D11-B4D7-35BBDB0959D1}" + }, + "assetHint": "materials/presets/pbr/metal_palladium_matte.azmaterial" + } + } + } + ] + } + } + }, + "Component_[8092226976542590265]": { + "$type": "EditorDisabledCompositionComponent", + "Id": 8092226976542590265 + } + } + }, + "Entity_[4254481901524]": { + "Id": "Entity_[4254481901524]", + "Name": "Entity1", + "Components": { + "Component_[11525365929370623807]": { + "$type": "EditorVisibilityComponent", + "Id": 11525365929370623807 + }, + "Component_[12334620273692642550]": { + "$type": "EditorLockComponent", + "Id": 12334620273692642550 + }, + "Component_[14389735759337977675]": { + "$type": "EditorPendingCompositionComponent", + "Id": 14389735759337977675 + }, + "Component_[16184381538555246534]": { + "$type": "AZ::Render::EditorMeshComponent", + "Id": 16184381538555246534, + "Controller": { + "Configuration": { + "ModelAsset": { + "assetId": { + "guid": "{E14975EF-E676-51A4-B826-3EF59CB645AA}", + "subId": 285127096 + }, + "assetHint": "testdata/objects/cube/cube.azmodel" + } + } + } + }, + "Component_[17962478023087084794]": { + "$type": "SelectionComponent", + "Id": 17962478023087084794 + }, + "Component_[18071675051915092508]": { + "$type": "EditorEntityIconComponent", + "Id": 18071675051915092508 + }, + "Component_[2115498007879087044]": { + "$type": "EditorInspectorComponent", + "Id": 2115498007879087044, + "ComponentOrderEntryArray": [ + { + "ComponentId": 399415038452606756 + }, + { + "ComponentId": 16184381538555246534, + "SortIndex": 1 + }, + { + "ComponentId": 7827190074535394331, + "SortIndex": 2 + } + ] + }, + "Component_[3518973002096080237]": { + "$type": "EditorOnlyEntityComponent", + "Id": 3518973002096080237 + }, + "Component_[399415038452606756]": { + "$type": "{27F1E1A1-8D9D-4C3B-BD3A-AFB9762449C0} TransformComponent", + "Id": 399415038452606756, + "Parent Entity": "ContainerEntity", + "Transform Data": { + "Translate": [ + -2.5305633544921875, + -0.00018183141946792603, + 114.4910659790039 + ] + } + }, + "Component_[4564240319609068082]": { + "$type": "EditorEntitySortComponent", + "Id": 4564240319609068082 + }, + "Component_[7827190074535394331]": { + "$type": "EditorMaterialComponent", + "Id": 7827190074535394331, + "Controller": { + "Configuration": { + "materials": [ + { + "Key": { + "materialSlotStableId": 2418540911 + }, + "Value": { + "MaterialAsset": { + "assetId": { + "guid": "{DC0598ED-1EDD-5B37-892E-E0867621D74C}" + }, + "assetHint": "materials/presets/pbr/metal_palladium.azmaterial" + } + } + } + ] + } + } + }, + "Component_[8092226976542590265]": { + "$type": "EditorDisabledCompositionComponent", + "Id": 8092226976542590265 + } + } + }, + "Entity_[4258776868820]": { + "Id": "Entity_[4258776868820]", + "Name": "Entity1", + "Components": { + "Component_[11525365929370623807]": { + "$type": "EditorVisibilityComponent", + "Id": 11525365929370623807 + }, + "Component_[12334620273692642550]": { + "$type": "EditorLockComponent", + "Id": 12334620273692642550 + }, + "Component_[14389735759337977675]": { + "$type": "EditorPendingCompositionComponent", + "Id": 14389735759337977675 + }, + "Component_[16184381538555246534]": { + "$type": "AZ::Render::EditorMeshComponent", + "Id": 16184381538555246534, + "Controller": { + "Configuration": { + "ModelAsset": { + "assetId": { + "guid": "{E14975EF-E676-51A4-B826-3EF59CB645AA}", + "subId": 285127096 + }, + "assetHint": "testdata/objects/cube/cube.azmodel" + } + } + } + }, + "Component_[17962478023087084794]": { + "$type": "SelectionComponent", + "Id": 17962478023087084794 + }, + "Component_[18071675051915092508]": { + "$type": "EditorEntityIconComponent", + "Id": 18071675051915092508 + }, + "Component_[2115498007879087044]": { + "$type": "EditorInspectorComponent", + "Id": 2115498007879087044, + "ComponentOrderEntryArray": [ + { + "ComponentId": 399415038452606756 + }, + { + "ComponentId": 16184381538555246534, + "SortIndex": 1 + }, + { + "ComponentId": 7827190074535394331, + "SortIndex": 2 + } + ] + }, + "Component_[3518973002096080237]": { + "$type": "EditorOnlyEntityComponent", + "Id": 3518973002096080237 + }, + "Component_[399415038452606756]": { + "$type": "{27F1E1A1-8D9D-4C3B-BD3A-AFB9762449C0} TransformComponent", + "Id": 399415038452606756, + "Parent Entity": "ContainerEntity", + "Transform Data": { + "Translate": [ + -32.53056335449219, + -0.00018183141946792603, + 49.593753814697266 + ] + } + }, + "Component_[4564240319609068082]": { + "$type": "EditorEntitySortComponent", + "Id": 4564240319609068082 + }, + "Component_[7827190074535394331]": { + "$type": "EditorMaterialComponent", + "Id": 7827190074535394331, + "Controller": { + "Configuration": { + "materials": [ + { + "Key": { + "materialSlotStableId": 2418540911 + }, + "Value": { + "MaterialAsset": { + "assetId": { + "guid": "{C60A39AF-BB76-51BD-9468-A88C9A6F78D7}" + }, + "assetHint": "materials/presets/pbr/metal_cobalt_matte.azmaterial" + } + } + } + ] + } + } + }, + "Component_[8092226976542590265]": { + "$type": "EditorDisabledCompositionComponent", + "Id": 8092226976542590265 + } + } + }, + "Entity_[4263071836116]": { + "Id": "Entity_[4263071836116]", + "Name": "Entity1", + "Components": { + "Component_[11525365929370623807]": { + "$type": "EditorVisibilityComponent", + "Id": 11525365929370623807 + }, + "Component_[12334620273692642550]": { + "$type": "EditorLockComponent", + "Id": 12334620273692642550 + }, + "Component_[14389735759337977675]": { + "$type": "EditorPendingCompositionComponent", + "Id": 14389735759337977675 + }, + "Component_[16184381538555246534]": { + "$type": "AZ::Render::EditorMeshComponent", + "Id": 16184381538555246534, + "Controller": { + "Configuration": { + "ModelAsset": { + "assetId": { + "guid": "{E14975EF-E676-51A4-B826-3EF59CB645AA}", + "subId": 285127096 + }, + "assetHint": "testdata/objects/cube/cube.azmodel" + } + } + } + }, + "Component_[17962478023087084794]": { + "$type": "SelectionComponent", + "Id": 17962478023087084794 + }, + "Component_[18071675051915092508]": { + "$type": "EditorEntityIconComponent", + "Id": 18071675051915092508 + }, + "Component_[2115498007879087044]": { + "$type": "EditorInspectorComponent", + "Id": 2115498007879087044, + "ComponentOrderEntryArray": [ + { + "ComponentId": 399415038452606756 + }, + { + "ComponentId": 16184381538555246534, + "SortIndex": 1 + }, + { + "ComponentId": 7827190074535394331, + "SortIndex": 2 + } + ] + }, + "Component_[3518973002096080237]": { + "$type": "EditorOnlyEntityComponent", + "Id": 3518973002096080237 + }, + "Component_[399415038452606756]": { + "$type": "{27F1E1A1-8D9D-4C3B-BD3A-AFB9762449C0} TransformComponent", + "Id": 399415038452606756, + "Parent Entity": "ContainerEntity", + "Transform Data": { + "Translate": [ + 27.53014373779297, + -0.00018183141946792603, + 30.08451271057129 + ] + } + }, + "Component_[4564240319609068082]": { + "$type": "EditorEntitySortComponent", + "Id": 4564240319609068082 + }, + "Component_[7827190074535394331]": { + "$type": "EditorMaterialComponent", + "Id": 7827190074535394331, + "Controller": { + "Configuration": { + "materials": [ + { + "Key": { + "materialSlotStableId": 2418540911 + }, + "Value": { + "MaterialAsset": { + "assetId": { + "guid": "{CAF50181-3384-5DF2-9304-C6E48E83C72D}" + }, + "assetHint": "materials/presets/pbr/metal_chrome_polished.azmaterial" + } + } + } + ] + } + } + }, + "Component_[8092226976542590265]": { + "$type": "EditorDisabledCompositionComponent", + "Id": 8092226976542590265 + } + } + }, + "Entity_[4267366803412]": { + "Id": "Entity_[4267366803412]", + "Name": "Entity1", + "Components": { + "Component_[11525365929370623807]": { + "$type": "EditorVisibilityComponent", + "Id": 11525365929370623807 + }, + "Component_[12334620273692642550]": { + "$type": "EditorLockComponent", + "Id": 12334620273692642550 + }, + "Component_[14389735759337977675]": { + "$type": "EditorPendingCompositionComponent", + "Id": 14389735759337977675 + }, + "Component_[16184381538555246534]": { + "$type": "AZ::Render::EditorMeshComponent", + "Id": 16184381538555246534, + "Controller": { + "Configuration": { + "ModelAsset": { + "assetId": { + "guid": "{E14975EF-E676-51A4-B826-3EF59CB645AA}", + "subId": 285127096 + }, + "assetHint": "testdata/objects/cube/cube.azmodel" + } + } + } + }, + "Component_[17962478023087084794]": { + "$type": "SelectionComponent", + "Id": 17962478023087084794 + }, + "Component_[18071675051915092508]": { + "$type": "EditorEntityIconComponent", + "Id": 18071675051915092508 + }, + "Component_[2115498007879087044]": { + "$type": "EditorInspectorComponent", + "Id": 2115498007879087044, + "ComponentOrderEntryArray": [ + { + "ComponentId": 399415038452606756 + }, + { + "ComponentId": 16184381538555246534, + "SortIndex": 1 + }, + { + "ComponentId": 7827190074535394331, + "SortIndex": 2 + } + ] + }, + "Component_[3518973002096080237]": { + "$type": "EditorOnlyEntityComponent", + "Id": 3518973002096080237 + }, + "Component_[399415038452606756]": { + "$type": "{27F1E1A1-8D9D-4C3B-BD3A-AFB9762449C0} TransformComponent", + "Id": 399415038452606756, + "Parent Entity": "ContainerEntity", + "Transform Data": { + "Translate": [ + -42.53056335449219, + -0.00018183141946792603, + 59.873046875 + ] + } + }, + "Component_[4564240319609068082]": { + "$type": "EditorEntitySortComponent", + "Id": 4564240319609068082 + }, + "Component_[7827190074535394331]": { + "$type": "EditorMaterialComponent", + "Id": 7827190074535394331, + "Controller": { + "Configuration": { + "materials": [ + { + "Key": { + "materialSlotStableId": 2418540911 + }, + "Value": { + "MaterialAsset": { + "assetId": { + "guid": "{FC69F2F8-F73B-5A0C-B8B7-94BAA45780FC}" + }, + "assetHint": "materials/presets/pbr/metal_brass_polished.azmaterial" + } + } + } + ] + } + } + }, + "Component_[8092226976542590265]": { + "$type": "EditorDisabledCompositionComponent", + "Id": 8092226976542590265 + } + } + }, + "Entity_[4271661770708]": { + "Id": "Entity_[4271661770708]", + "Name": "Entity1", + "Components": { + "Component_[11525365929370623807]": { + "$type": "EditorVisibilityComponent", + "Id": 11525365929370623807 + }, + "Component_[12334620273692642550]": { + "$type": "EditorLockComponent", + "Id": 12334620273692642550 + }, + "Component_[14389735759337977675]": { + "$type": "EditorPendingCompositionComponent", + "Id": 14389735759337977675 + }, + "Component_[16184381538555246534]": { + "$type": "AZ::Render::EditorMeshComponent", + "Id": 16184381538555246534, + "Controller": { + "Configuration": { + "ModelAsset": { + "assetId": { + "guid": "{E14975EF-E676-51A4-B826-3EF59CB645AA}", + "subId": 285127096 + }, + "assetHint": "testdata/objects/cube/cube.azmodel" + } + } + } + }, + "Component_[17962478023087084794]": { + "$type": "SelectionComponent", + "Id": 17962478023087084794 + }, + "Component_[18071675051915092508]": { + "$type": "EditorEntityIconComponent", + "Id": 18071675051915092508 + }, + "Component_[2115498007879087044]": { + "$type": "EditorInspectorComponent", + "Id": 2115498007879087044, + "ComponentOrderEntryArray": [ + { + "ComponentId": 399415038452606756 + }, + { + "ComponentId": 16184381538555246534, + "SortIndex": 1 + }, + { + "ComponentId": 7827190074535394331, + "SortIndex": 2 + } + ] + }, + "Component_[3518973002096080237]": { + "$type": "EditorOnlyEntityComponent", + "Id": 3518973002096080237 + }, + "Component_[399415038452606756]": { + "$type": "{27F1E1A1-8D9D-4C3B-BD3A-AFB9762449C0} TransformComponent", + "Id": 399415038452606756, + "Parent Entity": "ContainerEntity", + "Transform Data": { + "Translate": [ + -12.530563354492188, + -0.00018183141946792603, + 0.0 + ] + } + }, + "Component_[4564240319609068082]": { + "$type": "EditorEntitySortComponent", + "Id": 4564240319609068082 + }, + "Component_[7827190074535394331]": { + "$type": "EditorMaterialComponent", + "Id": 7827190074535394331, + "Controller": { + "Configuration": { + "materials": [ + { + "Key": { + "materialSlotStableId": 2418540911 + }, + "Value": { + "MaterialAsset": { + "assetId": { + "guid": "{F2AD0EBF-7137-58D1-9991-9552FAD41B19}" + }, + "assetHint": "materials/presets/pbr/metal_mercury.azmaterial" + } + } + } + ] + } + } + }, + "Component_[8092226976542590265]": { + "$type": "EditorDisabledCompositionComponent", + "Id": 8092226976542590265 + } + } + }, + "Entity_[4275956738004]": { + "Id": "Entity_[4275956738004]", + "Name": "Entity1", + "Components": { + "Component_[11525365929370623807]": { + "$type": "EditorVisibilityComponent", + "Id": 11525365929370623807 + }, + "Component_[12334620273692642550]": { + "$type": "EditorLockComponent", + "Id": 12334620273692642550 + }, + "Component_[14389735759337977675]": { + "$type": "EditorPendingCompositionComponent", + "Id": 14389735759337977675 + }, + "Component_[16184381538555246534]": { + "$type": "AZ::Render::EditorMeshComponent", + "Id": 16184381538555246534, + "Controller": { + "Configuration": { + "ModelAsset": { + "assetId": { + "guid": "{E14975EF-E676-51A4-B826-3EF59CB645AA}", + "subId": 285127096 + }, + "assetHint": "testdata/objects/cube/cube.azmodel" + } + } + } + }, + "Component_[17962478023087084794]": { + "$type": "SelectionComponent", + "Id": 17962478023087084794 + }, + "Component_[18071675051915092508]": { + "$type": "EditorEntityIconComponent", + "Id": 18071675051915092508 + }, + "Component_[2115498007879087044]": { + "$type": "EditorInspectorComponent", + "Id": 2115498007879087044, + "ComponentOrderEntryArray": [ + { + "ComponentId": 399415038452606756 + }, + { + "ComponentId": 16184381538555246534, + "SortIndex": 1 + }, + { + "ComponentId": 7827190074535394331, + "SortIndex": 2 + } + ] + }, + "Component_[3518973002096080237]": { + "$type": "EditorOnlyEntityComponent", + "Id": 3518973002096080237 + }, + "Component_[399415038452606756]": { + "$type": "{27F1E1A1-8D9D-4C3B-BD3A-AFB9762449C0} TransformComponent", + "Id": 399415038452606756, + "Parent Entity": "ContainerEntity", + "Transform Data": { + "Translate": [ + -7.5305633544921875, + -0.00018183141946792603, + 84.40655517578125 + ] + } + }, + "Component_[4564240319609068082]": { + "$type": "EditorEntitySortComponent", + "Id": 4564240319609068082 + }, + "Component_[7827190074535394331]": { + "$type": "EditorMaterialComponent", + "Id": 7827190074535394331, + "Controller": { + "Configuration": { + "materials": [ + { + "Key": { + "materialSlotStableId": 2418540911 + }, + "Value": { + "MaterialAsset": { + "assetId": { + "guid": "{DD1E26AE-80FB-5DB6-8786-26D438190A38}" + }, + "assetHint": "materials/presets/pbr/metal_nickel.azmaterial" + } + } + } + ] + } + } + }, + "Component_[8092226976542590265]": { + "$type": "EditorDisabledCompositionComponent", + "Id": 8092226976542590265 + } + } + }, + "Entity_[4280251705300]": { + "Id": "Entity_[4280251705300]", + "Name": "Entity1", + "Components": { + "Component_[11525365929370623807]": { + "$type": "EditorVisibilityComponent", + "Id": 11525365929370623807 + }, + "Component_[12334620273692642550]": { + "$type": "EditorLockComponent", + "Id": 12334620273692642550 + }, + "Component_[14389735759337977675]": { + "$type": "EditorPendingCompositionComponent", + "Id": 14389735759337977675 + }, + "Component_[16184381538555246534]": { + "$type": "AZ::Render::EditorMeshComponent", + "Id": 16184381538555246534, + "Controller": { + "Configuration": { + "ModelAsset": { + "assetId": { + "guid": "{E14975EF-E676-51A4-B826-3EF59CB645AA}", + "subId": 285127096 + }, + "assetHint": "testdata/objects/cube/cube.azmodel" + } + } + } + }, + "Component_[17962478023087084794]": { + "$type": "SelectionComponent", + "Id": 17962478023087084794 + }, + "Component_[18071675051915092508]": { + "$type": "EditorEntityIconComponent", + "Id": 18071675051915092508 + }, + "Component_[2115498007879087044]": { + "$type": "EditorInspectorComponent", + "Id": 2115498007879087044, + "ComponentOrderEntryArray": [ + { + "ComponentId": 399415038452606756 + }, + { + "ComponentId": 16184381538555246534, + "SortIndex": 1 + }, + { + "ComponentId": 7827190074535394331, + "SortIndex": 2 + } + ] + }, + "Component_[3518973002096080237]": { + "$type": "EditorOnlyEntityComponent", + "Id": 3518973002096080237 + }, + "Component_[399415038452606756]": { + "$type": "{27F1E1A1-8D9D-4C3B-BD3A-AFB9762449C0} TransformComponent", + "Id": 399415038452606756, + "Parent Entity": "ContainerEntity", + "Transform Data": { + "Translate": [ + -37.53056335449219, + -0.00018183141946792603, + 94.40913391113281 + ] + } + }, + "Component_[4564240319609068082]": { + "$type": "EditorEntitySortComponent", + "Id": 4564240319609068082 + }, + "Component_[7827190074535394331]": { + "$type": "EditorMaterialComponent", + "Id": 7827190074535394331, + "Controller": { + "Configuration": { + "materials": [ + { + "Key": { + "materialSlotStableId": 2418540911 + }, + "Value": { + "MaterialAsset": { + "assetId": { + "guid": "{A78EA2FC-688B-5E3A-A7F6-DB413D11D4CF}" + }, + "assetHint": "materials/presets/pbr/metal_chrome_matte.azmaterial" + } + } + } + ] + } + } + }, + "Component_[8092226976542590265]": { + "$type": "EditorDisabledCompositionComponent", + "Id": 8092226976542590265 + } + } + }, + "Entity_[4284546672596]": { + "Id": "Entity_[4284546672596]", + "Name": "Entity1", + "Components": { + "Component_[11525365929370623807]": { + "$type": "EditorVisibilityComponent", + "Id": 11525365929370623807 + }, + "Component_[12334620273692642550]": { + "$type": "EditorLockComponent", + "Id": 12334620273692642550 + }, + "Component_[14389735759337977675]": { + "$type": "EditorPendingCompositionComponent", + "Id": 14389735759337977675 + }, + "Component_[16184381538555246534]": { + "$type": "AZ::Render::EditorMeshComponent", + "Id": 16184381538555246534, + "Controller": { + "Configuration": { + "ModelAsset": { + "assetId": { + "guid": "{E14975EF-E676-51A4-B826-3EF59CB645AA}", + "subId": 285127096 + }, + "assetHint": "testdata/objects/cube/cube.azmodel" + } + } + } + }, + "Component_[17962478023087084794]": { + "$type": "SelectionComponent", + "Id": 17962478023087084794 + }, + "Component_[18071675051915092508]": { + "$type": "EditorEntityIconComponent", + "Id": 18071675051915092508 + }, + "Component_[2115498007879087044]": { + "$type": "EditorInspectorComponent", + "Id": 2115498007879087044, + "ComponentOrderEntryArray": [ + { + "ComponentId": 399415038452606756 + }, + { + "ComponentId": 16184381538555246534, + "SortIndex": 1 + }, + { + "ComponentId": 7827190074535394331, + "SortIndex": 2 + } + ] + }, + "Component_[3518973002096080237]": { + "$type": "EditorOnlyEntityComponent", + "Id": 3518973002096080237 + }, + "Component_[399415038452606756]": { + "$type": "{27F1E1A1-8D9D-4C3B-BD3A-AFB9762449C0} TransformComponent", + "Id": 399415038452606756, + "Parent Entity": "ContainerEntity", + "Transform Data": { + "Translate": [ + 47.53014373779297, + -0.00018183141946792603, + 54.618019104003906 + ] + } + }, + "Component_[4564240319609068082]": { + "$type": "EditorEntitySortComponent", + "Id": 4564240319609068082 + }, + "Component_[7827190074535394331]": { + "$type": "EditorMaterialComponent", + "Id": 7827190074535394331, + "Controller": { + "Configuration": { + "materials": [ + { + "Key": { + "materialSlotStableId": 2418540911 + }, + "Value": { + "MaterialAsset": { + "assetId": { + "guid": "{892EA944-0325-5FA6-94D7-4AB4FC02A0F5}" + }, + "assetHint": "materials/presets/pbr/metal_iron.azmaterial" + } + } + } + ] + } + } + }, + "Component_[8092226976542590265]": { + "$type": "EditorDisabledCompositionComponent", + "Id": 8092226976542590265 + } + } + }, + "Entity_[4288841639892]": { + "Id": "Entity_[4288841639892]", + "Name": "Entity1", + "Components": { + "Component_[11525365929370623807]": { + "$type": "EditorVisibilityComponent", + "Id": 11525365929370623807 + }, + "Component_[12334620273692642550]": { + "$type": "EditorLockComponent", + "Id": 12334620273692642550 + }, + "Component_[14389735759337977675]": { + "$type": "EditorPendingCompositionComponent", + "Id": 14389735759337977675 + }, + "Component_[16184381538555246534]": { + "$type": "AZ::Render::EditorMeshComponent", + "Id": 16184381538555246534, + "Controller": { + "Configuration": { + "ModelAsset": { + "assetId": { + "guid": "{E14975EF-E676-51A4-B826-3EF59CB645AA}", + "subId": 285127096 + }, + "assetHint": "testdata/objects/cube/cube.azmodel" + } + } + } + }, + "Component_[17962478023087084794]": { + "$type": "SelectionComponent", + "Id": 17962478023087084794 + }, + "Component_[18071675051915092508]": { + "$type": "EditorEntityIconComponent", + "Id": 18071675051915092508 + }, + "Component_[2115498007879087044]": { + "$type": "EditorInspectorComponent", + "Id": 2115498007879087044, + "ComponentOrderEntryArray": [ + { + "ComponentId": 399415038452606756 + }, + { + "ComponentId": 16184381538555246534, + "SortIndex": 1 + }, + { + "ComponentId": 7827190074535394331, + "SortIndex": 2 + } + ] + }, + "Component_[3518973002096080237]": { + "$type": "EditorOnlyEntityComponent", + "Id": 3518973002096080237 + }, + "Component_[399415038452606756]": { + "$type": "{27F1E1A1-8D9D-4C3B-BD3A-AFB9762449C0} TransformComponent", + "Id": 399415038452606756, + "Parent Entity": "ContainerEntity", + "Transform Data": { + "Translate": [ + 2.5301437377929688, + -0.00018183141946792603, + 19.50924301147461 + ] + } + }, + "Component_[4564240319609068082]": { + "$type": "EditorEntitySortComponent", + "Id": 4564240319609068082 + }, + "Component_[7827190074535394331]": { + "$type": "EditorMaterialComponent", + "Id": 7827190074535394331, + "Controller": { + "Configuration": { + "materials": [ + { + "Key": { + "materialSlotStableId": 2418540911 + }, + "Value": { + "MaterialAsset": { + "assetId": { + "guid": "{60D4CA04-A2FE-5AE7-B472-694C38D05183}" + }, + "assetHint": "materials/presets/pbr/metal_platinum_matte.azmaterial" + } + } + } + ] + } + } + }, + "Component_[8092226976542590265]": { + "$type": "EditorDisabledCompositionComponent", + "Id": 8092226976542590265 + } + } + }, + "Entity_[4293136607188]": { + "Id": "Entity_[4293136607188]", + "Name": "Entity1", + "Components": { + "Component_[11525365929370623807]": { + "$type": "EditorVisibilityComponent", + "Id": 11525365929370623807 + }, + "Component_[12334620273692642550]": { + "$type": "EditorLockComponent", + "Id": 12334620273692642550 + }, + "Component_[14389735759337977675]": { + "$type": "EditorPendingCompositionComponent", + "Id": 14389735759337977675 + }, + "Component_[16184381538555246534]": { + "$type": "AZ::Render::EditorMeshComponent", + "Id": 16184381538555246534, + "Controller": { + "Configuration": { + "ModelAsset": { + "assetId": { + "guid": "{E14975EF-E676-51A4-B826-3EF59CB645AA}", + "subId": 285127096 + }, + "assetHint": "testdata/objects/cube/cube.azmodel" + } + } + } + }, + "Component_[17962478023087084794]": { + "$type": "SelectionComponent", + "Id": 17962478023087084794 + }, + "Component_[18071675051915092508]": { + "$type": "EditorEntityIconComponent", + "Id": 18071675051915092508 + }, + "Component_[2115498007879087044]": { + "$type": "EditorInspectorComponent", + "Id": 2115498007879087044, + "ComponentOrderEntryArray": [ + { + "ComponentId": 399415038452606756 + }, + { + "ComponentId": 16184381538555246534, + "SortIndex": 1 + }, + { + "ComponentId": 7827190074535394331, + "SortIndex": 2 + } + ] + }, + "Component_[3518973002096080237]": { + "$type": "EditorOnlyEntityComponent", + "Id": 3518973002096080237 + }, + "Component_[399415038452606756]": { + "$type": "{27F1E1A1-8D9D-4C3B-BD3A-AFB9762449C0} TransformComponent", + "Id": 399415038452606756, + "Parent Entity": "ContainerEntity", + "Transform Data": { + "Translate": [ + 42.53014373779297, + -0.00018183141946792603, + 84.40655517578125 + ] + } + }, + "Component_[4564240319609068082]": { + "$type": "EditorEntitySortComponent", + "Id": 4564240319609068082 + }, + "Component_[7827190074535394331]": { + "$type": "EditorMaterialComponent", + "Id": 7827190074535394331, + "Controller": { + "Configuration": { + "materials": [ + { + "Key": { + "materialSlotStableId": 2418540911 + }, + "Value": { + "MaterialAsset": { + "assetId": { + "guid": "{FE52E7C8-064D-506A-9C26-433EB93747DE}" + }, + "assetHint": "materials/presets/pbr/metal_gold.azmaterial" + } + } + } + ] + } + } + }, + "Component_[8092226976542590265]": { + "$type": "EditorDisabledCompositionComponent", + "Id": 8092226976542590265 + } + } + }, + "Entity_[4297431574484]": { + "Id": "Entity_[4297431574484]", + "Name": "Entity1", + "Components": { + "Component_[11525365929370623807]": { + "$type": "EditorVisibilityComponent", + "Id": 11525365929370623807 + }, + "Component_[12334620273692642550]": { + "$type": "EditorLockComponent", + "Id": 12334620273692642550 + }, + "Component_[14389735759337977675]": { + "$type": "EditorPendingCompositionComponent", + "Id": 14389735759337977675 + }, + "Component_[16184381538555246534]": { + "$type": "AZ::Render::EditorMeshComponent", + "Id": 16184381538555246534, + "Controller": { + "Configuration": { + "ModelAsset": { + "assetId": { + "guid": "{E14975EF-E676-51A4-B826-3EF59CB645AA}", + "subId": 285127096 + }, + "assetHint": "testdata/objects/cube/cube.azmodel" + } + } + } + }, + "Component_[17962478023087084794]": { + "$type": "SelectionComponent", + "Id": 17962478023087084794 + }, + "Component_[18071675051915092508]": { + "$type": "EditorEntityIconComponent", + "Id": 18071675051915092508 + }, + "Component_[2115498007879087044]": { + "$type": "EditorInspectorComponent", + "Id": 2115498007879087044, + "ComponentOrderEntryArray": [ + { + "ComponentId": 399415038452606756 + }, + { + "ComponentId": 16184381538555246534, + "SortIndex": 1 + }, + { + "ComponentId": 7827190074535394331, + "SortIndex": 2 + } + ] + }, + "Component_[3518973002096080237]": { + "$type": "EditorOnlyEntityComponent", + "Id": 3518973002096080237 + }, + "Component_[399415038452606756]": { + "$type": "{27F1E1A1-8D9D-4C3B-BD3A-AFB9762449C0} TransformComponent", + "Id": 399415038452606756, + "Parent Entity": "ContainerEntity", + "Transform Data": { + "Translate": [ + -32.53056335449219, + -0.00018183141946792603, + 0.0 + ] + } + }, + "Component_[4564240319609068082]": { + "$type": "EditorEntitySortComponent", + "Id": 4564240319609068082 + }, + "Component_[7827190074535394331]": { + "$type": "EditorMaterialComponent", + "Id": 7827190074535394331, + "Controller": { + "Configuration": { + "materials": [ + { + "Key": { + "materialSlotStableId": 2418540911 + }, + "Value": { + "MaterialAsset": { + "assetId": { + "guid": "{93DF55AE-8D1B-5AD1-A609-05F1BD9F6EA0}" + }, + "assetHint": "materials/presets/pbr/metal_cobalt_polished.azmaterial" + } + } + } + ] + } + } + }, + "Component_[8092226976542590265]": { + "$type": "EditorDisabledCompositionComponent", + "Id": 8092226976542590265 + } + } + }, + "Entity_[4301726541780]": { + "Id": "Entity_[4301726541780]", + "Name": "Entity1", + "Components": { + "Component_[11525365929370623807]": { + "$type": "EditorVisibilityComponent", + "Id": 11525365929370623807 + }, + "Component_[12334620273692642550]": { + "$type": "EditorLockComponent", + "Id": 12334620273692642550 + }, + "Component_[14389735759337977675]": { + "$type": "EditorPendingCompositionComponent", + "Id": 14389735759337977675 + }, + "Component_[16184381538555246534]": { + "$type": "AZ::Render::EditorMeshComponent", + "Id": 16184381538555246534, + "Controller": { + "Configuration": { + "ModelAsset": { + "assetId": { + "guid": "{E14975EF-E676-51A4-B826-3EF59CB645AA}", + "subId": 285127096 + }, + "assetHint": "testdata/objects/cube/cube.azmodel" + } + } + } + }, + "Component_[17962478023087084794]": { + "$type": "SelectionComponent", + "Id": 17962478023087084794 + }, + "Component_[18071675051915092508]": { + "$type": "EditorEntityIconComponent", + "Id": 18071675051915092508 + }, + "Component_[2115498007879087044]": { + "$type": "EditorInspectorComponent", + "Id": 2115498007879087044, + "ComponentOrderEntryArray": [ + { + "ComponentId": 399415038452606756 + }, + { + "ComponentId": 16184381538555246534, + "SortIndex": 1 + }, + { + "ComponentId": 7827190074535394331, + "SortIndex": 2 + } + ] + }, + "Component_[3518973002096080237]": { + "$type": "EditorOnlyEntityComponent", + "Id": 3518973002096080237 + }, + "Component_[399415038452606756]": { + "$type": "{27F1E1A1-8D9D-4C3B-BD3A-AFB9762449C0} TransformComponent", + "Id": 399415038452606756, + "Parent Entity": "ContainerEntity", + "Transform Data": { + "Translate": [ + -32.53056335449219, + -0.00018183141946792603, + 109.46680450439453 + ] + } + }, + "Component_[4564240319609068082]": { + "$type": "EditorEntitySortComponent", + "Id": 4564240319609068082 + }, + "Component_[7827190074535394331]": { + "$type": "EditorMaterialComponent", + "Id": 7827190074535394331, + "Controller": { + "Configuration": { + "materials": [ + { + "Key": { + "materialSlotStableId": 2418540911 + }, + "Value": { + "MaterialAsset": { + "assetId": { + "guid": "{C60A39AF-BB76-51BD-9468-A88C9A6F78D7}" + }, + "assetHint": "materials/presets/pbr/metal_cobalt_matte.azmaterial" + } + } + } + ] + } + } + }, + "Component_[8092226976542590265]": { + "$type": "EditorDisabledCompositionComponent", + "Id": 8092226976542590265 + } + } + }, + "Entity_[4306021509076]": { + "Id": "Entity_[4306021509076]", + "Name": "Entity1", + "Components": { + "Component_[11525365929370623807]": { + "$type": "EditorVisibilityComponent", + "Id": 11525365929370623807 + }, + "Component_[12334620273692642550]": { + "$type": "EditorLockComponent", + "Id": 12334620273692642550 + }, + "Component_[14389735759337977675]": { + "$type": "EditorPendingCompositionComponent", + "Id": 14389735759337977675 + }, + "Component_[16184381538555246534]": { + "$type": "AZ::Render::EditorMeshComponent", + "Id": 16184381538555246534, + "Controller": { + "Configuration": { + "ModelAsset": { + "assetId": { + "guid": "{E14975EF-E676-51A4-B826-3EF59CB645AA}", + "subId": 285127096 + }, + "assetHint": "testdata/objects/cube/cube.azmodel" + } + } + } + }, + "Component_[17962478023087084794]": { + "$type": "SelectionComponent", + "Id": 17962478023087084794 + }, + "Component_[18071675051915092508]": { + "$type": "EditorEntityIconComponent", + "Id": 18071675051915092508 + }, + "Component_[2115498007879087044]": { + "$type": "EditorInspectorComponent", + "Id": 2115498007879087044, + "ComponentOrderEntryArray": [ + { + "ComponentId": 399415038452606756 + }, + { + "ComponentId": 16184381538555246534, + "SortIndex": 1 + }, + { + "ComponentId": 7827190074535394331, + "SortIndex": 2 + } + ] + }, + "Component_[3518973002096080237]": { + "$type": "EditorOnlyEntityComponent", + "Id": 3518973002096080237 + }, + "Component_[399415038452606756]": { + "$type": "{27F1E1A1-8D9D-4C3B-BD3A-AFB9762449C0} TransformComponent", + "Id": 399415038452606756, + "Parent Entity": "ContainerEntity", + "Transform Data": { + "Translate": [ + 22.53014373779297, + -0.00018183141946792603, + 59.873046875 + ] + } + }, + "Component_[4564240319609068082]": { + "$type": "EditorEntitySortComponent", + "Id": 4564240319609068082 + }, + "Component_[7827190074535394331]": { + "$type": "EditorMaterialComponent", + "Id": 7827190074535394331, + "Controller": { + "Configuration": { + "materials": [ + { + "Key": { + "materialSlotStableId": 2418540911 + }, + "Value": { + "MaterialAsset": { + "assetId": { + "guid": "{FC69F2F8-F73B-5A0C-B8B7-94BAA45780FC}" + }, + "assetHint": "materials/presets/pbr/metal_brass_polished.azmaterial" + } + } + } + ] + } + } + }, + "Component_[8092226976542590265]": { + "$type": "EditorDisabledCompositionComponent", + "Id": 8092226976542590265 + } + } + }, + "Entity_[4310316476372]": { + "Id": "Entity_[4310316476372]", + "Name": "Entity1", + "Components": { + "Component_[11525365929370623807]": { + "$type": "EditorVisibilityComponent", + "Id": 11525365929370623807 + }, + "Component_[12334620273692642550]": { + "$type": "EditorLockComponent", + "Id": 12334620273692642550 + }, + "Component_[14389735759337977675]": { + "$type": "EditorPendingCompositionComponent", + "Id": 14389735759337977675 + }, + "Component_[16184381538555246534]": { + "$type": "AZ::Render::EditorMeshComponent", + "Id": 16184381538555246534, + "Controller": { + "Configuration": { + "ModelAsset": { + "assetId": { + "guid": "{E14975EF-E676-51A4-B826-3EF59CB645AA}", + "subId": 285127096 + }, + "assetHint": "testdata/objects/cube/cube.azmodel" + } + } + } + }, + "Component_[17962478023087084794]": { + "$type": "SelectionComponent", + "Id": 17962478023087084794 + }, + "Component_[18071675051915092508]": { + "$type": "EditorEntityIconComponent", + "Id": 18071675051915092508 + }, + "Component_[2115498007879087044]": { + "$type": "EditorInspectorComponent", + "Id": 2115498007879087044, + "ComponentOrderEntryArray": [ + { + "ComponentId": 399415038452606756 + }, + { + "ComponentId": 16184381538555246534, + "SortIndex": 1 + }, + { + "ComponentId": 7827190074535394331, + "SortIndex": 2 + } + ] + }, + "Component_[3518973002096080237]": { + "$type": "EditorOnlyEntityComponent", + "Id": 3518973002096080237 + }, + "Component_[399415038452606756]": { + "$type": "{27F1E1A1-8D9D-4C3B-BD3A-AFB9762449C0} TransformComponent", + "Id": 399415038452606756, + "Parent Entity": "ContainerEntity", + "Transform Data": { + "Translate": [ + -42.53056335449219, + -0.00018183141946792603, + 84.40655517578125 + ] + } + }, + "Component_[4564240319609068082]": { + "$type": "EditorEntitySortComponent", + "Id": 4564240319609068082 + }, + "Component_[7827190074535394331]": { + "$type": "EditorMaterialComponent", + "Id": 7827190074535394331, + "Controller": { + "Configuration": { + "materials": [ + { + "Key": { + "materialSlotStableId": 2418540911 + }, + "Value": { + "MaterialAsset": { + "assetId": { + "guid": "{80E0F2A7-1EE4-597F-80EF-985C65BCE2EB}" + }, + "assetHint": "materials/presets/pbr/metal_brass.azmaterial" + } + } + } + ] + } + } + }, + "Component_[8092226976542590265]": { + "$type": "EditorDisabledCompositionComponent", + "Id": 8092226976542590265 + } + } + }, + "Entity_[4314611443668]": { + "Id": "Entity_[4314611443668]", + "Name": "Entity1", + "Components": { + "Component_[11525365929370623807]": { + "$type": "EditorVisibilityComponent", + "Id": 11525365929370623807 + }, + "Component_[12334620273692642550]": { + "$type": "EditorLockComponent", + "Id": 12334620273692642550 + }, + "Component_[14389735759337977675]": { + "$type": "EditorPendingCompositionComponent", + "Id": 14389735759337977675 + }, + "Component_[16184381538555246534]": { + "$type": "AZ::Render::EditorMeshComponent", + "Id": 16184381538555246534, + "Controller": { + "Configuration": { + "ModelAsset": { + "assetId": { + "guid": "{E14975EF-E676-51A4-B826-3EF59CB645AA}", + "subId": 285127096 + }, + "assetHint": "testdata/objects/cube/cube.azmodel" + } + } + } + }, + "Component_[17962478023087084794]": { + "$type": "SelectionComponent", + "Id": 17962478023087084794 + }, + "Component_[18071675051915092508]": { + "$type": "EditorEntityIconComponent", + "Id": 18071675051915092508 + }, + "Component_[2115498007879087044]": { + "$type": "EditorInspectorComponent", + "Id": 2115498007879087044, + "ComponentOrderEntryArray": [ + { + "ComponentId": 399415038452606756 + }, + { + "ComponentId": 16184381538555246534, + "SortIndex": 1 + }, + { + "ComponentId": 7827190074535394331, + "SortIndex": 2 + } + ] + }, + "Component_[3518973002096080237]": { + "$type": "EditorOnlyEntityComponent", + "Id": 3518973002096080237 + }, + "Component_[399415038452606756]": { + "$type": "{27F1E1A1-8D9D-4C3B-BD3A-AFB9762449C0} TransformComponent", + "Id": 399415038452606756, + "Parent Entity": "ContainerEntity", + "Transform Data": { + "Translate": [ + -12.530563354492188, + -0.00018183141946792603, + 114.4910659790039 + ] + } + }, + "Component_[4564240319609068082]": { + "$type": "EditorEntitySortComponent", + "Id": 4564240319609068082 + }, + "Component_[7827190074535394331]": { + "$type": "EditorMaterialComponent", + "Id": 7827190074535394331, + "Controller": { + "Configuration": { + "materials": [ + { + "Key": { + "materialSlotStableId": 2418540911 + }, + "Value": { + "MaterialAsset": { + "assetId": { + "guid": "{F2AD0EBF-7137-58D1-9991-9552FAD41B19}" + }, + "assetHint": "materials/presets/pbr/metal_mercury.azmaterial" + } + } + } + ] + } + } + }, + "Component_[8092226976542590265]": { + "$type": "EditorDisabledCompositionComponent", + "Id": 8092226976542590265 + } + } + }, + "Entity_[4318906410964]": { + "Id": "Entity_[4318906410964]", + "Name": "Entity1", + "Components": { + "Component_[11525365929370623807]": { + "$type": "EditorVisibilityComponent", + "Id": 11525365929370623807 + }, + "Component_[12334620273692642550]": { + "$type": "EditorLockComponent", + "Id": 12334620273692642550 + }, + "Component_[14389735759337977675]": { + "$type": "EditorPendingCompositionComponent", + "Id": 14389735759337977675 + }, + "Component_[16184381538555246534]": { + "$type": "AZ::Render::EditorMeshComponent", + "Id": 16184381538555246534, + "Controller": { + "Configuration": { + "ModelAsset": { + "assetId": { + "guid": "{E14975EF-E676-51A4-B826-3EF59CB645AA}", + "subId": 285127096 + }, + "assetHint": "testdata/objects/cube/cube.azmodel" + } + } + } + }, + "Component_[17962478023087084794]": { + "$type": "SelectionComponent", + "Id": 17962478023087084794 + }, + "Component_[18071675051915092508]": { + "$type": "EditorEntityIconComponent", + "Id": 18071675051915092508 + }, + "Component_[2115498007879087044]": { + "$type": "EditorInspectorComponent", + "Id": 2115498007879087044, + "ComponentOrderEntryArray": [ + { + "ComponentId": 399415038452606756 + }, + { + "ComponentId": 16184381538555246534, + "SortIndex": 1 + }, + { + "ComponentId": 7827190074535394331, + "SortIndex": 2 + } + ] + }, + "Component_[3518973002096080237]": { + "$type": "EditorOnlyEntityComponent", + "Id": 3518973002096080237 + }, + "Component_[399415038452606756]": { + "$type": "{27F1E1A1-8D9D-4C3B-BD3A-AFB9762449C0} TransformComponent", + "Id": 399415038452606756, + "Parent Entity": "ContainerEntity", + "Transform Data": { + "Translate": [ + 17.53014373779297, + -0.00018183141946792603, + 24.533506393432617 + ] + } + }, + "Component_[4564240319609068082]": { + "$type": "EditorEntitySortComponent", + "Id": 4564240319609068082 + }, + "Component_[7827190074535394331]": { + "$type": "EditorMaterialComponent", + "Id": 7827190074535394331, + "Controller": { + "Configuration": { + "materials": [ + { + "Key": {}, + "Value": { + "MaterialAsset": { + "assetId": { + "guid": "{721188E0-B7CC-5D06-8D5D-39AF8ABF2EF9}" + }, + "assetHint": "materials/presets/pbr/metal_titanium.azmaterial" + } + } + }, + { + "Key": { + "materialSlotStableId": 2418540911 + }, + "Value": { + "MaterialAsset": { + "assetId": { + "guid": "{94CF2BD7-7D09-5577-B1D8-3FF85B15E127}" + }, + "assetHint": "materials/presets/pbr/metal_aluminum.azmaterial" + } + } + } + ] + } + } + }, + "Component_[8092226976542590265]": { + "$type": "EditorDisabledCompositionComponent", + "Id": 8092226976542590265 + } + } + }, + "Entity_[4323201378260]": { + "Id": "Entity_[4323201378260]", + "Name": "Entity1", + "Components": { + "Component_[11525365929370623807]": { + "$type": "EditorVisibilityComponent", + "Id": 11525365929370623807 + }, + "Component_[12334620273692642550]": { + "$type": "EditorLockComponent", + "Id": 12334620273692642550 + }, + "Component_[14389735759337977675]": { + "$type": "EditorPendingCompositionComponent", + "Id": 14389735759337977675 + }, + "Component_[16184381538555246534]": { + "$type": "AZ::Render::EditorMeshComponent", + "Id": 16184381538555246534, + "Controller": { + "Configuration": { + "ModelAsset": { + "assetId": { + "guid": "{E14975EF-E676-51A4-B826-3EF59CB645AA}", + "subId": 285127096 + }, + "assetHint": "testdata/objects/cube/cube.azmodel" + } + } + } + }, + "Component_[17962478023087084794]": { + "$type": "SelectionComponent", + "Id": 17962478023087084794 + }, + "Component_[18071675051915092508]": { + "$type": "EditorEntityIconComponent", + "Id": 18071675051915092508 + }, + "Component_[2115498007879087044]": { + "$type": "EditorInspectorComponent", + "Id": 2115498007879087044, + "ComponentOrderEntryArray": [ + { + "ComponentId": 399415038452606756 + }, + { + "ComponentId": 16184381538555246534, + "SortIndex": 1 + }, + { + "ComponentId": 7827190074535394331, + "SortIndex": 2 + } + ] + }, + "Component_[3518973002096080237]": { + "$type": "EditorOnlyEntityComponent", + "Id": 3518973002096080237 + }, + "Component_[399415038452606756]": { + "$type": "{27F1E1A1-8D9D-4C3B-BD3A-AFB9762449C0} TransformComponent", + "Id": 399415038452606756, + "Parent Entity": "ContainerEntity", + "Transform Data": { + "Translate": [ + -32.53056335449219, + -0.00018183141946792603, + 89.95755767822266 + ] + } + }, + "Component_[4564240319609068082]": { + "$type": "EditorEntitySortComponent", + "Id": 4564240319609068082 + }, + "Component_[7827190074535394331]": { + "$type": "EditorMaterialComponent", + "Id": 7827190074535394331, + "Controller": { + "Configuration": { + "materials": [ + { + "Key": { + "materialSlotStableId": 2418540911 + }, + "Value": { + "MaterialAsset": { + "assetId": { + "guid": "{93DF55AE-8D1B-5AD1-A609-05F1BD9F6EA0}" + }, + "assetHint": "materials/presets/pbr/metal_cobalt_polished.azmaterial" + } + } + } + ] + } + } + }, + "Component_[8092226976542590265]": { + "$type": "EditorDisabledCompositionComponent", + "Id": 8092226976542590265 + } + } + }, + "Entity_[4327496345556]": { + "Id": "Entity_[4327496345556]", + "Name": "Entity1", + "Components": { + "Component_[11525365929370623807]": { + "$type": "EditorVisibilityComponent", + "Id": 11525365929370623807 + }, + "Component_[12334620273692642550]": { + "$type": "EditorLockComponent", + "Id": 12334620273692642550 + }, + "Component_[14389735759337977675]": { + "$type": "EditorPendingCompositionComponent", + "Id": 14389735759337977675 + }, + "Component_[16184381538555246534]": { + "$type": "AZ::Render::EditorMeshComponent", + "Id": 16184381538555246534, + "Controller": { + "Configuration": { + "ModelAsset": { + "assetId": { + "guid": "{E14975EF-E676-51A4-B826-3EF59CB645AA}", + "subId": 285127096 + }, + "assetHint": "testdata/objects/cube/cube.azmodel" + } + } + } + }, + "Component_[17962478023087084794]": { + "$type": "SelectionComponent", + "Id": 17962478023087084794 + }, + "Component_[18071675051915092508]": { + "$type": "EditorEntityIconComponent", + "Id": 18071675051915092508 + }, + "Component_[2115498007879087044]": { + "$type": "EditorInspectorComponent", + "Id": 2115498007879087044, + "ComponentOrderEntryArray": [ + { + "ComponentId": 399415038452606756 + }, + { + "ComponentId": 16184381538555246534, + "SortIndex": 1 + }, + { + "ComponentId": 7827190074535394331, + "SortIndex": 2 + } + ] + }, + "Component_[3518973002096080237]": { + "$type": "EditorOnlyEntityComponent", + "Id": 3518973002096080237 + }, + "Component_[399415038452606756]": { + "$type": "{27F1E1A1-8D9D-4C3B-BD3A-AFB9762449C0} TransformComponent", + "Id": 399415038452606756, + "Parent Entity": "ContainerEntity", + "Transform Data": { + "Translate": [ + -27.530563354492188, + -0.00018183141946792603, + 109.46680450439453 + ] + } + }, + "Component_[4564240319609068082]": { + "$type": "EditorEntitySortComponent", + "Id": 4564240319609068082 + }, + "Component_[7827190074535394331]": { + "$type": "EditorMaterialComponent", + "Id": 7827190074535394331, + "Controller": { + "Configuration": { + "materials": [ + { + "Key": { + "materialSlotStableId": 2418540911 + }, + "Value": { + "MaterialAsset": { + "assetId": { + "guid": "{2D054071-BEF7-53C0-A8C9-E4F026BD8364}" + }, + "assetHint": "materials/presets/pbr/metal_copper_matte.azmaterial" + } + } + } + ] + } + } + }, + "Component_[8092226976542590265]": { + "$type": "EditorDisabledCompositionComponent", + "Id": 8092226976542590265 + } + } + }, + "Entity_[4331791312852]": { + "Id": "Entity_[4331791312852]", + "Name": "Entity1", + "Components": { + "Component_[11525365929370623807]": { + "$type": "EditorVisibilityComponent", + "Id": 11525365929370623807 + }, + "Component_[12334620273692642550]": { + "$type": "EditorLockComponent", + "Id": 12334620273692642550 + }, + "Component_[14389735759337977675]": { + "$type": "EditorPendingCompositionComponent", + "Id": 14389735759337977675 + }, + "Component_[16184381538555246534]": { + "$type": "AZ::Render::EditorMeshComponent", + "Id": 16184381538555246534, + "Controller": { + "Configuration": { + "ModelAsset": { + "assetId": { + "guid": "{E14975EF-E676-51A4-B826-3EF59CB645AA}", + "subId": 285127096 + }, + "assetHint": "testdata/objects/cube/cube.azmodel" + } + } + } + }, + "Component_[17962478023087084794]": { + "$type": "SelectionComponent", + "Id": 17962478023087084794 + }, + "Component_[18071675051915092508]": { + "$type": "EditorEntityIconComponent", + "Id": 18071675051915092508 + }, + "Component_[2115498007879087044]": { + "$type": "EditorInspectorComponent", + "Id": 2115498007879087044, + "ComponentOrderEntryArray": [ + { + "ComponentId": 399415038452606756 + }, + { + "ComponentId": 16184381538555246534, + "SortIndex": 1 + }, + { + "ComponentId": 7827190074535394331, + "SortIndex": 2 + } + ] + }, + "Component_[3518973002096080237]": { + "$type": "EditorOnlyEntityComponent", + "Id": 3518973002096080237 + }, + "Component_[399415038452606756]": { + "$type": "{27F1E1A1-8D9D-4C3B-BD3A-AFB9762449C0} TransformComponent", + "Id": 399415038452606756, + "Parent Entity": "ContainerEntity", + "Transform Data": { + "Translate": [ + -47.53056335449219, + -0.00018183141946792603, + 59.873046875 + ] + } + }, + "Component_[4564240319609068082]": { + "$type": "EditorEntitySortComponent", + "Id": 4564240319609068082 + }, + "Component_[7827190074535394331]": { + "$type": "EditorMaterialComponent", + "Id": 7827190074535394331, + "Controller": { + "Configuration": { + "materials": [ + { + "Key": { + "materialSlotStableId": 2418540911 + }, + "Value": { + "MaterialAsset": { + "assetId": { + "guid": "{64C1F6A6-6BDA-551A-BE56-1829E5913278}" + }, + "assetHint": "materials/presets/pbr/metal_aluminum_polished.azmaterial" + } + } + } + ] + } + } + }, + "Component_[8092226976542590265]": { + "$type": "EditorDisabledCompositionComponent", + "Id": 8092226976542590265 + } + } + }, + "Entity_[4336086280148]": { + "Id": "Entity_[4336086280148]", + "Name": "Entity1", + "Components": { + "Component_[11525365929370623807]": { + "$type": "EditorVisibilityComponent", + "Id": 11525365929370623807 + }, + "Component_[12334620273692642550]": { + "$type": "EditorLockComponent", + "Id": 12334620273692642550 + }, + "Component_[14389735759337977675]": { + "$type": "EditorPendingCompositionComponent", + "Id": 14389735759337977675 + }, + "Component_[16184381538555246534]": { + "$type": "AZ::Render::EditorMeshComponent", + "Id": 16184381538555246534, + "Controller": { + "Configuration": { + "ModelAsset": { + "assetId": { + "guid": "{E14975EF-E676-51A4-B826-3EF59CB645AA}", + "subId": 285127096 + }, + "assetHint": "testdata/objects/cube/cube.azmodel" + } + } + } + }, + "Component_[17962478023087084794]": { + "$type": "SelectionComponent", + "Id": 17962478023087084794 + }, + "Component_[18071675051915092508]": { + "$type": "EditorEntityIconComponent", + "Id": 18071675051915092508 + }, + "Component_[2115498007879087044]": { + "$type": "EditorInspectorComponent", + "Id": 2115498007879087044, + "ComponentOrderEntryArray": [ + { + "ComponentId": 399415038452606756 + }, + { + "ComponentId": 16184381538555246534, + "SortIndex": 1 + }, + { + "ComponentId": 7827190074535394331, + "SortIndex": 2 + } + ] + }, + "Component_[3518973002096080237]": { + "$type": "EditorOnlyEntityComponent", + "Id": 3518973002096080237 + }, + "Component_[399415038452606756]": { + "$type": "{27F1E1A1-8D9D-4C3B-BD3A-AFB9762449C0} TransformComponent", + "Id": 399415038452606756, + "Parent Entity": "ContainerEntity", + "Transform Data": { + "Translate": [ + -7.5305633544921875, + -0.00018183141946792603, + 105.0152359008789 + ] + } + }, + "Component_[4564240319609068082]": { + "$type": "EditorEntitySortComponent", + "Id": 4564240319609068082 + }, + "Component_[7827190074535394331]": { + "$type": "EditorMaterialComponent", + "Id": 7827190074535394331, + "Controller": { + "Configuration": { + "materials": [ + { + "Key": { + "materialSlotStableId": 2418540911 + }, + "Value": { + "MaterialAsset": { + "assetId": { + "guid": "{E66E4343-F45A-536D-AAE1-C4D096420640}" + }, + "assetHint": "materials/presets/pbr/metal_nickel_polished.azmaterial" + } + } + } + ] + } + } + }, + "Component_[8092226976542590265]": { + "$type": "EditorDisabledCompositionComponent", + "Id": 8092226976542590265 + } + } + }, + "Entity_[4340381247444]": { + "Id": "Entity_[4340381247444]", + "Name": "Entity1", + "Components": { + "Component_[11525365929370623807]": { + "$type": "EditorVisibilityComponent", + "Id": 11525365929370623807 + }, + "Component_[12334620273692642550]": { + "$type": "EditorLockComponent", + "Id": 12334620273692642550 + }, + "Component_[14389735759337977675]": { + "$type": "EditorPendingCompositionComponent", + "Id": 14389735759337977675 + }, + "Component_[16184381538555246534]": { + "$type": "AZ::Render::EditorMeshComponent", + "Id": 16184381538555246534, + "Controller": { + "Configuration": { + "ModelAsset": { + "assetId": { + "guid": "{E14975EF-E676-51A4-B826-3EF59CB645AA}", + "subId": 285127096 + }, + "assetHint": "testdata/objects/cube/cube.azmodel" + } + } + } + }, + "Component_[17962478023087084794]": { + "$type": "SelectionComponent", + "Id": 17962478023087084794 + }, + "Component_[18071675051915092508]": { + "$type": "EditorEntityIconComponent", + "Id": 18071675051915092508 + }, + "Component_[2115498007879087044]": { + "$type": "EditorInspectorComponent", + "Id": 2115498007879087044, + "ComponentOrderEntryArray": [ + { + "ComponentId": 399415038452606756 + }, + { + "ComponentId": 16184381538555246534, + "SortIndex": 1 + }, + { + "ComponentId": 7827190074535394331, + "SortIndex": 2 + } + ] + }, + "Component_[3518973002096080237]": { + "$type": "EditorOnlyEntityComponent", + "Id": 3518973002096080237 + }, + "Component_[399415038452606756]": { + "$type": "{27F1E1A1-8D9D-4C3B-BD3A-AFB9762449C0} TransformComponent", + "Id": 399415038452606756, + "Parent Entity": "ContainerEntity", + "Transform Data": { + "Translate": [ + -27.530563354492188, + -0.00018183141946792603, + 30.08451271057129 + ] + } + }, + "Component_[4564240319609068082]": { + "$type": "EditorEntitySortComponent", + "Id": 4564240319609068082 + }, + "Component_[7827190074535394331]": { + "$type": "EditorMaterialComponent", + "Id": 7827190074535394331, + "Controller": { + "Configuration": { + "materials": [ + { + "Key": { + "materialSlotStableId": 2418540911 + }, + "Value": { + "MaterialAsset": { + "assetId": { + "guid": "{CF5C7B01-4912-58AE-991A-F25251E505AC}" + }, + "assetHint": "materials/presets/pbr/metal_copper_polished.azmaterial" + } + } + } + ] + } + } + }, + "Component_[8092226976542590265]": { + "$type": "EditorDisabledCompositionComponent", + "Id": 8092226976542590265 + } + } + }, + "Entity_[4344676214740]": { + "Id": "Entity_[4344676214740]", + "Name": "Entity1", + "Components": { + "Component_[11525365929370623807]": { + "$type": "EditorVisibilityComponent", + "Id": 11525365929370623807 + }, + "Component_[12334620273692642550]": { + "$type": "EditorLockComponent", + "Id": 12334620273692642550 + }, + "Component_[14389735759337977675]": { + "$type": "EditorPendingCompositionComponent", + "Id": 14389735759337977675 + }, + "Component_[16184381538555246534]": { + "$type": "AZ::Render::EditorMeshComponent", + "Id": 16184381538555246534, + "Controller": { + "Configuration": { + "ModelAsset": { + "assetId": { + "guid": "{E14975EF-E676-51A4-B826-3EF59CB645AA}", + "subId": 285127096 + }, + "assetHint": "testdata/objects/cube/cube.azmodel" + } + } + } + }, + "Component_[17962478023087084794]": { + "$type": "SelectionComponent", + "Id": 17962478023087084794 + }, + "Component_[18071675051915092508]": { + "$type": "EditorEntityIconComponent", + "Id": 18071675051915092508 + }, + "Component_[2115498007879087044]": { + "$type": "EditorInspectorComponent", + "Id": 2115498007879087044, + "ComponentOrderEntryArray": [ + { + "ComponentId": 399415038452606756 + }, + { + "ComponentId": 16184381538555246534, + "SortIndex": 1 + }, + { + "ComponentId": 7827190074535394331, + "SortIndex": 2 + } + ] + }, + "Component_[3518973002096080237]": { + "$type": "EditorOnlyEntityComponent", + "Id": 3518973002096080237 + }, + "Component_[399415038452606756]": { + "$type": "{27F1E1A1-8D9D-4C3B-BD3A-AFB9762449C0} TransformComponent", + "Id": 399415038452606756, + "Parent Entity": "ContainerEntity", + "Transform Data": { + "Translate": [ + -22.530563354492188, + -0.00018183141946792603, + 99.43339538574219 + ] + } + }, + "Component_[4564240319609068082]": { + "$type": "EditorEntitySortComponent", + "Id": 4564240319609068082 + }, + "Component_[7827190074535394331]": { + "$type": "EditorMaterialComponent", + "Id": 7827190074535394331, + "Controller": { + "Configuration": { + "materials": [ + { + "Key": { + "materialSlotStableId": 2418540911 + }, + "Value": { + "MaterialAsset": { + "assetId": { + "guid": "{FE52E7C8-064D-506A-9C26-433EB93747DE}" + }, + "assetHint": "materials/presets/pbr/metal_gold.azmaterial" + } + } + } + ] + } + } + }, + "Component_[8092226976542590265]": { + "$type": "EditorDisabledCompositionComponent", + "Id": 8092226976542590265 + } + } + }, + "Entity_[4348971182036]": { + "Id": "Entity_[4348971182036]", + "Name": "Entity1", + "Components": { + "Component_[11525365929370623807]": { + "$type": "EditorVisibilityComponent", + "Id": 11525365929370623807 + }, + "Component_[12334620273692642550]": { + "$type": "EditorLockComponent", + "Id": 12334620273692642550 + }, + "Component_[14389735759337977675]": { + "$type": "EditorPendingCompositionComponent", + "Id": 14389735759337977675 + }, + "Component_[16184381538555246534]": { + "$type": "AZ::Render::EditorMeshComponent", + "Id": 16184381538555246534, + "Controller": { + "Configuration": { + "ModelAsset": { + "assetId": { + "guid": "{E14975EF-E676-51A4-B826-3EF59CB645AA}", + "subId": 285127096 + }, + "assetHint": "testdata/objects/cube/cube.azmodel" + } + } + } + }, + "Component_[17962478023087084794]": { + "$type": "SelectionComponent", + "Id": 17962478023087084794 + }, + "Component_[18071675051915092508]": { + "$type": "EditorEntityIconComponent", + "Id": 18071675051915092508 + }, + "Component_[2115498007879087044]": { + "$type": "EditorInspectorComponent", + "Id": 2115498007879087044, + "ComponentOrderEntryArray": [ + { + "ComponentId": 399415038452606756 + }, + { + "ComponentId": 16184381538555246534, + "SortIndex": 1 + }, + { + "ComponentId": 7827190074535394331, + "SortIndex": 2 + } + ] + }, + "Component_[3518973002096080237]": { + "$type": "EditorOnlyEntityComponent", + "Id": 3518973002096080237 + }, + "Component_[399415038452606756]": { + "$type": "{27F1E1A1-8D9D-4C3B-BD3A-AFB9762449C0} TransformComponent", + "Id": 399415038452606756, + "Parent Entity": "ContainerEntity", + "Transform Data": { + "Translate": [ + -47.53056335449219, + -0.00018183141946792603, + 109.46680450439453 + ] + } + }, + "Component_[4564240319609068082]": { + "$type": "EditorEntitySortComponent", + "Id": 4564240319609068082 + }, + "Component_[7827190074535394331]": { + "$type": "EditorMaterialComponent", + "Id": 7827190074535394331, + "Controller": { + "Configuration": { + "materials": [ + { + "Key": { + "materialSlotStableId": 2418540911 + }, + "Value": { + "MaterialAsset": { + "assetId": { + "guid": "{549D26B8-881D-569F-AF05-961F36A43F4F}" + }, + "assetHint": "materials/presets/pbr/metal_aluminum_matte.azmaterial" + } + } + } + ] + } + } + }, + "Component_[8092226976542590265]": { + "$type": "EditorDisabledCompositionComponent", + "Id": 8092226976542590265 + } + } + }, + "Entity_[4353266149332]": { + "Id": "Entity_[4353266149332]", + "Name": "Entity1", + "Components": { + "Component_[11525365929370623807]": { + "$type": "EditorVisibilityComponent", + "Id": 11525365929370623807 + }, + "Component_[12334620273692642550]": { + "$type": "EditorLockComponent", + "Id": 12334620273692642550 + }, + "Component_[14389735759337977675]": { + "$type": "EditorPendingCompositionComponent", + "Id": 14389735759337977675 + }, + "Component_[16184381538555246534]": { + "$type": "AZ::Render::EditorMeshComponent", + "Id": 16184381538555246534, + "Controller": { + "Configuration": { + "ModelAsset": { + "assetId": { + "guid": "{E14975EF-E676-51A4-B826-3EF59CB645AA}", + "subId": 285127096 + }, + "assetHint": "testdata/objects/cube/cube.azmodel" + } + } + } + }, + "Component_[17962478023087084794]": { + "$type": "SelectionComponent", + "Id": 17962478023087084794 + }, + "Component_[18071675051915092508]": { + "$type": "EditorEntityIconComponent", + "Id": 18071675051915092508 + }, + "Component_[2115498007879087044]": { + "$type": "EditorInspectorComponent", + "Id": 2115498007879087044, + "ComponentOrderEntryArray": [ + { + "ComponentId": 399415038452606756 + }, + { + "ComponentId": 16184381538555246534, + "SortIndex": 1 + }, + { + "ComponentId": 7827190074535394331, + "SortIndex": 2 + } + ] + }, + "Component_[3518973002096080237]": { + "$type": "EditorOnlyEntityComponent", + "Id": 3518973002096080237 + }, + "Component_[399415038452606756]": { + "$type": "{27F1E1A1-8D9D-4C3B-BD3A-AFB9762449C0} TransformComponent", + "Id": 399415038452606756, + "Parent Entity": "ContainerEntity", + "Transform Data": { + "Translate": [ + 32.53014373779297, + -0.00018183141946792603, + 30.08451271057129 + ] + } + }, + "Component_[4564240319609068082]": { + "$type": "EditorEntitySortComponent", + "Id": 4564240319609068082 + }, + "Component_[7827190074535394331]": { + "$type": "EditorMaterialComponent", + "Id": 7827190074535394331, + "Controller": { + "Configuration": { + "materials": [ + { + "Key": { + "materialSlotStableId": 2418540911 + }, + "Value": { + "MaterialAsset": { + "assetId": { + "guid": "{93DF55AE-8D1B-5AD1-A609-05F1BD9F6EA0}" + }, + "assetHint": "materials/presets/pbr/metal_cobalt_polished.azmaterial" + } + } + } + ] + } + } + }, + "Component_[8092226976542590265]": { + "$type": "EditorDisabledCompositionComponent", + "Id": 8092226976542590265 + } + } + }, + "Entity_[4357561116628]": { + "Id": "Entity_[4357561116628]", + "Name": "Entity1", + "Components": { + "Component_[11525365929370623807]": { + "$type": "EditorVisibilityComponent", + "Id": 11525365929370623807 + }, + "Component_[12334620273692642550]": { + "$type": "EditorLockComponent", + "Id": 12334620273692642550 + }, + "Component_[14389735759337977675]": { + "$type": "EditorPendingCompositionComponent", + "Id": 14389735759337977675 + }, + "Component_[16184381538555246534]": { + "$type": "AZ::Render::EditorMeshComponent", + "Id": 16184381538555246534, + "Controller": { + "Configuration": { + "ModelAsset": { + "assetId": { + "guid": "{E14975EF-E676-51A4-B826-3EF59CB645AA}", + "subId": 285127096 + }, + "assetHint": "testdata/objects/cube/cube.azmodel" + } + } + } + }, + "Component_[17962478023087084794]": { + "$type": "SelectionComponent", + "Id": 17962478023087084794 + }, + "Component_[18071675051915092508]": { + "$type": "EditorEntityIconComponent", + "Id": 18071675051915092508 + }, + "Component_[2115498007879087044]": { + "$type": "EditorInspectorComponent", + "Id": 2115498007879087044, + "ComponentOrderEntryArray": [ + { + "ComponentId": 399415038452606756 + }, + { + "ComponentId": 16184381538555246534, + "SortIndex": 1 + }, + { + "ComponentId": 7827190074535394331, + "SortIndex": 2 + } + ] + }, + "Component_[3518973002096080237]": { + "$type": "EditorOnlyEntityComponent", + "Id": 3518973002096080237 + }, + "Component_[399415038452606756]": { + "$type": "{27F1E1A1-8D9D-4C3B-BD3A-AFB9762449C0} TransformComponent", + "Id": 399415038452606756, + "Parent Entity": "ContainerEntity", + "Transform Data": { + "Translate": [ + 7.530143737792969, + -0.00018183141946792603, + 89.95755767822266 + ] + } + }, + "Component_[4564240319609068082]": { + "$type": "EditorEntitySortComponent", + "Id": 4564240319609068082 + }, + "Component_[7827190074535394331]": { + "$type": "EditorMaterialComponent", + "Id": 7827190074535394331, + "Controller": { + "Configuration": { + "materials": [ + { + "Key": { + "materialSlotStableId": 2418540911 + }, + "Value": { + "MaterialAsset": { + "assetId": { + "guid": "{2AC06FA3-7670-542E-8996-DF346AFF1B61}" + }, + "assetHint": "materials/presets/pbr/metal_silver_polished.azmaterial" + } + } + } + ] + } + } + }, + "Component_[8092226976542590265]": { + "$type": "EditorDisabledCompositionComponent", + "Id": 8092226976542590265 + } + } + }, + "Entity_[4361856083924]": { + "Id": "Entity_[4361856083924]", + "Name": "Entity1", + "Components": { + "Component_[1057179753323467068]": { + "$type": "EditorMaterialComponent", + "Id": 1057179753323467068, + "Controller": { + "Configuration": { + "materials": [ + { + "Key": { + "materialSlotStableId": 2418540911 + }, + "Value": { + "MaterialAsset": { + "assetId": { + "guid": "{A3F3CD98-1634-5542-AD5A-78E91BE21AE9}" + }, + "assetHint": "materials/presets/pbr/metal_titanium_matte.azmaterial" + } + } + } + ] + } + } + }, + "Component_[11525365929370623807]": { + "$type": "EditorVisibilityComponent", + "Id": 11525365929370623807 + }, + "Component_[12334620273692642550]": { + "$type": "EditorLockComponent", + "Id": 12334620273692642550 + }, + "Component_[14389735759337977675]": { + "$type": "EditorPendingCompositionComponent", + "Id": 14389735759337977675 + }, + "Component_[16184381538555246534]": { + "$type": "AZ::Render::EditorMeshComponent", + "Id": 16184381538555246534, + "Controller": { + "Configuration": { + "ModelAsset": { + "assetId": { + "guid": "{E14975EF-E676-51A4-B826-3EF59CB645AA}", + "subId": 285127096 + }, + "assetHint": "testdata/objects/cube/cube.azmodel" + } + } + } + }, + "Component_[17962478023087084794]": { + "$type": "SelectionComponent", + "Id": 17962478023087084794 + }, + "Component_[18071675051915092508]": { + "$type": "EditorEntityIconComponent", + "Id": 18071675051915092508 + }, + "Component_[2115498007879087044]": { + "$type": "EditorInspectorComponent", + "Id": 2115498007879087044, + "ComponentOrderEntryArray": [ + { + "ComponentId": 399415038452606756 + }, + { + "ComponentId": 16184381538555246534, + "SortIndex": 1 + }, + { + "ComponentId": 1057179753323467068, + "SortIndex": 2 + } + ] + }, + "Component_[3518973002096080237]": { + "$type": "EditorOnlyEntityComponent", + "Id": 3518973002096080237 + }, + "Component_[399415038452606756]": { + "$type": "{27F1E1A1-8D9D-4C3B-BD3A-AFB9762449C0} TransformComponent", + "Id": 399415038452606756, + "Parent Entity": "ContainerEntity", + "Transform Data": { + "Translate": [ + 12.530143737792969, + -0.00018183141946792603, + 34.53608703613281 + ] + } + }, + "Component_[4564240319609068082]": { + "$type": "EditorEntitySortComponent", + "Id": 4564240319609068082 + }, + "Component_[8092226976542590265]": { + "$type": "EditorDisabledCompositionComponent", + "Id": 8092226976542590265 + } + } + }, + "Entity_[4366151051220]": { + "Id": "Entity_[4366151051220]", + "Name": "Entity1", + "Components": { + "Component_[11525365929370623807]": { + "$type": "EditorVisibilityComponent", + "Id": 11525365929370623807 + }, + "Component_[12334620273692642550]": { + "$type": "EditorLockComponent", + "Id": 12334620273692642550 + }, + "Component_[14389735759337977675]": { + "$type": "EditorPendingCompositionComponent", + "Id": 14389735759337977675 + }, + "Component_[16184381538555246534]": { + "$type": "AZ::Render::EditorMeshComponent", + "Id": 16184381538555246534, + "Controller": { + "Configuration": { + "ModelAsset": { + "assetId": { + "guid": "{E14975EF-E676-51A4-B826-3EF59CB645AA}", + "subId": 285127096 + }, + "assetHint": "testdata/objects/cube/cube.azmodel" + } + } + } + }, + "Component_[17962478023087084794]": { + "$type": "SelectionComponent", + "Id": 17962478023087084794 + }, + "Component_[18071675051915092508]": { + "$type": "EditorEntityIconComponent", + "Id": 18071675051915092508 + }, + "Component_[2115498007879087044]": { + "$type": "EditorInspectorComponent", + "Id": 2115498007879087044, + "ComponentOrderEntryArray": [ + { + "ComponentId": 399415038452606756 + }, + { + "ComponentId": 16184381538555246534, + "SortIndex": 1 + }, + { + "ComponentId": 7827190074535394331, + "SortIndex": 2 + } + ] + }, + "Component_[3518973002096080237]": { + "$type": "EditorOnlyEntityComponent", + "Id": 3518973002096080237 + }, + "Component_[399415038452606756]": { + "$type": "{27F1E1A1-8D9D-4C3B-BD3A-AFB9762449C0} TransformComponent", + "Id": 399415038452606756, + "Parent Entity": "ContainerEntity", + "Transform Data": { + "Translate": [ + -2.5305633544921875, + -0.00018183141946792603, + 54.618019104003906 + ] + } + }, + "Component_[4564240319609068082]": { + "$type": "EditorEntitySortComponent", + "Id": 4564240319609068082 + }, + "Component_[7827190074535394331]": { + "$type": "EditorMaterialComponent", + "Id": 7827190074535394331, + "Controller": { + "Configuration": { + "materials": [ + { + "Key": { + "materialSlotStableId": 2418540911 + }, + "Value": { + "MaterialAsset": { + "assetId": { + "guid": "{DC0598ED-1EDD-5B37-892E-E0867621D74C}" + }, + "assetHint": "materials/presets/pbr/metal_palladium.azmaterial" + } + } + } + ] + } + } + }, + "Component_[8092226976542590265]": { + "$type": "EditorDisabledCompositionComponent", + "Id": 8092226976542590265 + } + } + }, + "Entity_[4370446018516]": { + "Id": "Entity_[4370446018516]", + "Name": "Entity1", + "Components": { + "Component_[11525365929370623807]": { + "$type": "EditorVisibilityComponent", + "Id": 11525365929370623807 + }, + "Component_[12334620273692642550]": { + "$type": "EditorLockComponent", + "Id": 12334620273692642550 + }, + "Component_[14389735759337977675]": { + "$type": "EditorPendingCompositionComponent", + "Id": 14389735759337977675 + }, + "Component_[16184381538555246534]": { + "$type": "AZ::Render::EditorMeshComponent", + "Id": 16184381538555246534, + "Controller": { + "Configuration": { + "ModelAsset": { + "assetId": { + "guid": "{E14975EF-E676-51A4-B826-3EF59CB645AA}", + "subId": 285127096 + }, + "assetHint": "testdata/objects/cube/cube.azmodel" + } + } + } + }, + "Component_[17962478023087084794]": { + "$type": "SelectionComponent", + "Id": 17962478023087084794 + }, + "Component_[18071675051915092508]": { + "$type": "EditorEntityIconComponent", + "Id": 18071675051915092508 + }, + "Component_[2115498007879087044]": { + "$type": "EditorInspectorComponent", + "Id": 2115498007879087044, + "ComponentOrderEntryArray": [ + { + "ComponentId": 399415038452606756 + }, + { + "ComponentId": 16184381538555246534, + "SortIndex": 1 + }, + { + "ComponentId": 7827190074535394331, + "SortIndex": 2 + } + ] + }, + "Component_[3518973002096080237]": { + "$type": "EditorOnlyEntityComponent", + "Id": 3518973002096080237 + }, + "Component_[399415038452606756]": { + "$type": "{27F1E1A1-8D9D-4C3B-BD3A-AFB9762449C0} TransformComponent", + "Id": 399415038452606756, + "Parent Entity": "ContainerEntity", + "Transform Data": { + "Translate": [ + -27.530563354492188, + -0.00018183141946792603, + 79.38228607177734 + ] + } + }, + "Component_[4564240319609068082]": { + "$type": "EditorEntitySortComponent", + "Id": 4564240319609068082 + }, + "Component_[7827190074535394331]": { + "$type": "EditorMaterialComponent", + "Id": 7827190074535394331, + "Controller": { + "Configuration": { + "materials": [ + { + "Key": { + "materialSlotStableId": 2418540911 + }, + "Value": { + "MaterialAsset": { + "assetId": { + "guid": "{2D054071-BEF7-53C0-A8C9-E4F026BD8364}" + }, + "assetHint": "materials/presets/pbr/metal_copper_matte.azmaterial" + } + } + } + ] + } + } + }, + "Component_[8092226976542590265]": { + "$type": "EditorDisabledCompositionComponent", + "Id": 8092226976542590265 + } + } + }, + "Entity_[4374740985812]": { + "Id": "Entity_[4374740985812]", + "Name": "Entity1", + "Components": { + "Component_[11525365929370623807]": { + "$type": "EditorVisibilityComponent", + "Id": 11525365929370623807 + }, + "Component_[12334620273692642550]": { + "$type": "EditorLockComponent", + "Id": 12334620273692642550 + }, + "Component_[14389735759337977675]": { + "$type": "EditorPendingCompositionComponent", + "Id": 14389735759337977675 + }, + "Component_[16184381538555246534]": { + "$type": "AZ::Render::EditorMeshComponent", + "Id": 16184381538555246534, + "Controller": { + "Configuration": { + "ModelAsset": { + "assetId": { + "guid": "{E14975EF-E676-51A4-B826-3EF59CB645AA}", + "subId": 285127096 + }, + "assetHint": "testdata/objects/cube/cube.azmodel" + } + } + } + }, + "Component_[17962478023087084794]": { + "$type": "SelectionComponent", + "Id": 17962478023087084794 + }, + "Component_[18071675051915092508]": { + "$type": "EditorEntityIconComponent", + "Id": 18071675051915092508 + }, + "Component_[2115498007879087044]": { + "$type": "EditorInspectorComponent", + "Id": 2115498007879087044, + "ComponentOrderEntryArray": [ + { + "ComponentId": 399415038452606756 + }, + { + "ComponentId": 16184381538555246534, + "SortIndex": 1 + }, + { + "ComponentId": 7827190074535394331, + "SortIndex": 2 + } + ] + }, + "Component_[3518973002096080237]": { + "$type": "EditorOnlyEntityComponent", + "Id": 3518973002096080237 + }, + "Component_[399415038452606756]": { + "$type": "{27F1E1A1-8D9D-4C3B-BD3A-AFB9762449C0} TransformComponent", + "Id": 399415038452606756, + "Parent Entity": "ContainerEntity", + "Transform Data": { + "Translate": [ + 42.53014373779297, + -0.00018183141946792603, + 24.533506393432617 + ] + } + }, + "Component_[4564240319609068082]": { + "$type": "EditorEntitySortComponent", + "Id": 4564240319609068082 + }, + "Component_[7827190074535394331]": { + "$type": "EditorMaterialComponent", + "Id": 7827190074535394331, + "Controller": { + "Configuration": { + "materials": [ + { + "Key": { + "materialSlotStableId": 2418540911 + }, + "Value": { + "MaterialAsset": { + "assetId": { + "guid": "{FE52E7C8-064D-506A-9C26-433EB93747DE}" + }, + "assetHint": "materials/presets/pbr/metal_gold.azmaterial" + } + } + } + ] + } + } + }, + "Component_[8092226976542590265]": { + "$type": "EditorDisabledCompositionComponent", + "Id": 8092226976542590265 + } + } + }, + "Entity_[4379035953108]": { + "Id": "Entity_[4379035953108]", + "Name": "Entity1", + "Components": { + "Component_[11525365929370623807]": { + "$type": "EditorVisibilityComponent", + "Id": 11525365929370623807 + }, + "Component_[12334620273692642550]": { + "$type": "EditorLockComponent", + "Id": 12334620273692642550 + }, + "Component_[14389735759337977675]": { + "$type": "EditorPendingCompositionComponent", + "Id": 14389735759337977675 + }, + "Component_[16184381538555246534]": { + "$type": "AZ::Render::EditorMeshComponent", + "Id": 16184381538555246534, + "Controller": { + "Configuration": { + "ModelAsset": { + "assetId": { + "guid": "{E14975EF-E676-51A4-B826-3EF59CB645AA}", + "subId": 285127096 + }, + "assetHint": "testdata/objects/cube/cube.azmodel" + } + } + } + }, + "Component_[17962478023087084794]": { + "$type": "SelectionComponent", + "Id": 17962478023087084794 + }, + "Component_[18071675051915092508]": { + "$type": "EditorEntityIconComponent", + "Id": 18071675051915092508 + }, + "Component_[2115498007879087044]": { + "$type": "EditorInspectorComponent", + "Id": 2115498007879087044, + "ComponentOrderEntryArray": [ + { + "ComponentId": 399415038452606756 + }, + { + "ComponentId": 16184381538555246534, + "SortIndex": 1 + }, + { + "ComponentId": 7827190074535394331, + "SortIndex": 2 + } + ] + }, + "Component_[3518973002096080237]": { + "$type": "EditorOnlyEntityComponent", + "Id": 3518973002096080237 + }, + "Component_[399415038452606756]": { + "$type": "{27F1E1A1-8D9D-4C3B-BD3A-AFB9762449C0} TransformComponent", + "Id": 399415038452606756, + "Parent Entity": "ContainerEntity", + "Transform Data": { + "Translate": [ + 32.53014373779297, + -0.00018183141946792603, + 19.50924301147461 + ] + } + }, + "Component_[4564240319609068082]": { + "$type": "EditorEntitySortComponent", + "Id": 4564240319609068082 + }, + "Component_[7827190074535394331]": { + "$type": "EditorMaterialComponent", + "Id": 7827190074535394331, + "Controller": { + "Configuration": { + "materials": [ + { + "Key": { + "materialSlotStableId": 2418540911 + }, + "Value": { + "MaterialAsset": { + "assetId": { + "guid": "{C60A39AF-BB76-51BD-9468-A88C9A6F78D7}" + }, + "assetHint": "materials/presets/pbr/metal_cobalt_matte.azmaterial" + } + } + } + ] + } + } + }, + "Component_[8092226976542590265]": { + "$type": "EditorDisabledCompositionComponent", + "Id": 8092226976542590265 + } + } + }, + "Entity_[4383330920404]": { + "Id": "Entity_[4383330920404]", + "Name": "Entity1", + "Components": { + "Component_[11525365929370623807]": { + "$type": "EditorVisibilityComponent", + "Id": 11525365929370623807 + }, + "Component_[12334620273692642550]": { + "$type": "EditorLockComponent", + "Id": 12334620273692642550 + }, + "Component_[14389735759337977675]": { + "$type": "EditorPendingCompositionComponent", + "Id": 14389735759337977675 + }, + "Component_[16184381538555246534]": { + "$type": "AZ::Render::EditorMeshComponent", + "Id": 16184381538555246534, + "Controller": { + "Configuration": { + "ModelAsset": { + "assetId": { + "guid": "{E14975EF-E676-51A4-B826-3EF59CB645AA}", + "subId": 285127096 + }, + "assetHint": "testdata/objects/cube/cube.azmodel" + } + } + } + }, + "Component_[17962478023087084794]": { + "$type": "SelectionComponent", + "Id": 17962478023087084794 + }, + "Component_[18071675051915092508]": { + "$type": "EditorEntityIconComponent", + "Id": 18071675051915092508 + }, + "Component_[2115498007879087044]": { + "$type": "EditorInspectorComponent", + "Id": 2115498007879087044, + "ComponentOrderEntryArray": [ + { + "ComponentId": 399415038452606756 + }, + { + "ComponentId": 16184381538555246534, + "SortIndex": 1 + }, + { + "ComponentId": 7827190074535394331, + "SortIndex": 2 + } + ] + }, + "Component_[3518973002096080237]": { + "$type": "EditorOnlyEntityComponent", + "Id": 3518973002096080237 + }, + "Component_[399415038452606756]": { + "$type": "{27F1E1A1-8D9D-4C3B-BD3A-AFB9762449C0} TransformComponent", + "Id": 399415038452606756, + "Parent Entity": "ContainerEntity", + "Transform Data": { + "Translate": [ + -47.53056335449219, + -0.00018183141946792603, + 45.14218521118164 + ] + } + }, + "Component_[4564240319609068082]": { + "$type": "EditorEntitySortComponent", + "Id": 4564240319609068082 + }, + "Component_[7827190074535394331]": { + "$type": "EditorMaterialComponent", + "Id": 7827190074535394331, + "Controller": { + "Configuration": { + "materials": [ + { + "Key": { + "materialSlotStableId": 2418540911 + }, + "Value": { + "MaterialAsset": { + "assetId": { + "guid": "{64C1F6A6-6BDA-551A-BE56-1829E5913278}" + }, + "assetHint": "materials/presets/pbr/metal_aluminum_polished.azmaterial" + } + } + } + ] + } + } + }, + "Component_[8092226976542590265]": { + "$type": "EditorDisabledCompositionComponent", + "Id": 8092226976542590265 + } + } + }, + "Entity_[4387625887700]": { + "Id": "Entity_[4387625887700]", + "Name": "Entity1", + "Components": { + "Component_[11525365929370623807]": { + "$type": "EditorVisibilityComponent", + "Id": 11525365929370623807 + }, + "Component_[12334620273692642550]": { + "$type": "EditorLockComponent", + "Id": 12334620273692642550 + }, + "Component_[14389735759337977675]": { + "$type": "EditorPendingCompositionComponent", + "Id": 14389735759337977675 + }, + "Component_[16184381538555246534]": { + "$type": "AZ::Render::EditorMeshComponent", + "Id": 16184381538555246534, + "Controller": { + "Configuration": { + "ModelAsset": { + "assetId": { + "guid": "{E14975EF-E676-51A4-B826-3EF59CB645AA}", + "subId": 285127096 + }, + "assetHint": "testdata/objects/cube/cube.azmodel" + } + } + } + }, + "Component_[17962478023087084794]": { + "$type": "SelectionComponent", + "Id": 17962478023087084794 + }, + "Component_[18071675051915092508]": { + "$type": "EditorEntityIconComponent", + "Id": 18071675051915092508 + }, + "Component_[2115498007879087044]": { + "$type": "EditorInspectorComponent", + "Id": 2115498007879087044, + "ComponentOrderEntryArray": [ + { + "ComponentId": 399415038452606756 + }, + { + "ComponentId": 16184381538555246534, + "SortIndex": 1 + }, + { + "ComponentId": 7827190074535394331, + "SortIndex": 2 + } + ] + }, + "Component_[3518973002096080237]": { + "$type": "EditorOnlyEntityComponent", + "Id": 3518973002096080237 + }, + "Component_[399415038452606756]": { + "$type": "{27F1E1A1-8D9D-4C3B-BD3A-AFB9762449C0} TransformComponent", + "Id": 399415038452606756, + "Parent Entity": "ContainerEntity", + "Transform Data": { + "Translate": [ + -37.53056335449219, + -0.00018183141946792603, + 45.14218521118164 + ] + } + }, + "Component_[4564240319609068082]": { + "$type": "EditorEntitySortComponent", + "Id": 4564240319609068082 + }, + "Component_[7827190074535394331]": { + "$type": "EditorMaterialComponent", + "Id": 7827190074535394331, + "Controller": { + "Configuration": { + "materials": [ + { + "Key": { + "materialSlotStableId": 2418540911 + }, + "Value": { + "MaterialAsset": { + "assetId": { + "guid": "{CAF50181-3384-5DF2-9304-C6E48E83C72D}" + }, + "assetHint": "materials/presets/pbr/metal_chrome_polished.azmaterial" + } + } + } + ] + } + } + }, + "Component_[8092226976542590265]": { + "$type": "EditorDisabledCompositionComponent", + "Id": 8092226976542590265 + } + } + }, + "Entity_[4391920854996]": { + "Id": "Entity_[4391920854996]", + "Name": "Entity1", + "Components": { + "Component_[11525365929370623807]": { + "$type": "EditorVisibilityComponent", + "Id": 11525365929370623807 + }, + "Component_[12334620273692642550]": { + "$type": "EditorLockComponent", + "Id": 12334620273692642550 + }, + "Component_[14389735759337977675]": { + "$type": "EditorPendingCompositionComponent", + "Id": 14389735759337977675 + }, + "Component_[16184381538555246534]": { + "$type": "AZ::Render::EditorMeshComponent", + "Id": 16184381538555246534, + "Controller": { + "Configuration": { + "ModelAsset": { + "assetId": { + "guid": "{E14975EF-E676-51A4-B826-3EF59CB645AA}", + "subId": 285127096 + }, + "assetHint": "testdata/objects/cube/cube.azmodel" + } + } + } + }, + "Component_[17962478023087084794]": { + "$type": "SelectionComponent", + "Id": 17962478023087084794 + }, + "Component_[18071675051915092508]": { + "$type": "EditorEntityIconComponent", + "Id": 18071675051915092508 + }, + "Component_[2115498007879087044]": { + "$type": "EditorInspectorComponent", + "Id": 2115498007879087044, + "ComponentOrderEntryArray": [ + { + "ComponentId": 399415038452606756 + }, + { + "ComponentId": 16184381538555246534, + "SortIndex": 1 + }, + { + "ComponentId": 7827190074535394331, + "SortIndex": 2 + } + ] + }, + "Component_[3518973002096080237]": { + "$type": "EditorOnlyEntityComponent", + "Id": 3518973002096080237 + }, + "Component_[399415038452606756]": { + "$type": "{27F1E1A1-8D9D-4C3B-BD3A-AFB9762449C0} TransformComponent", + "Id": 399415038452606756, + "Parent Entity": "ContainerEntity", + "Transform Data": { + "Translate": [ + 7.530143737792969, + -0.00018183141946792603, + 69.34888458251953 + ] + } + }, + "Component_[4564240319609068082]": { + "$type": "EditorEntitySortComponent", + "Id": 4564240319609068082 + }, + "Component_[7827190074535394331]": { + "$type": "EditorMaterialComponent", + "Id": 7827190074535394331, + "Controller": { + "Configuration": { + "materials": [ + { + "Key": { + "materialSlotStableId": 2418540911 + }, + "Value": { + "MaterialAsset": { + "assetId": { + "guid": "{CDA13277-5EAB-5E2A-93F5-B7003597FBCE}" + }, + "assetHint": "materials/presets/pbr/metal_silver.azmaterial" + } + } + } + ] + } + } + }, + "Component_[8092226976542590265]": { + "$type": "EditorDisabledCompositionComponent", + "Id": 8092226976542590265 + } + } + }, + "Entity_[4396215822292]": { + "Id": "Entity_[4396215822292]", + "Name": "Entity1", + "Components": { + "Component_[1057179753323467068]": { + "$type": "EditorMaterialComponent", + "Id": 1057179753323467068, + "Controller": { + "Configuration": { + "materials": [ + { + "Key": { + "materialSlotStableId": 2418540911 + }, + "Value": { + "MaterialAsset": { + "assetId": { + "guid": "{A3F3CD98-1634-5542-AD5A-78E91BE21AE9}" + }, + "assetHint": "materials/presets/pbr/metal_titanium_matte.azmaterial" + } + } + } + ] + } + } + }, + "Component_[11525365929370623807]": { + "$type": "EditorVisibilityComponent", + "Id": 11525365929370623807 + }, + "Component_[12334620273692642550]": { + "$type": "EditorLockComponent", + "Id": 12334620273692642550 + }, + "Component_[14389735759337977675]": { + "$type": "EditorPendingCompositionComponent", + "Id": 14389735759337977675 + }, + "Component_[16184381538555246534]": { + "$type": "AZ::Render::EditorMeshComponent", + "Id": 16184381538555246534, + "Controller": { + "Configuration": { + "ModelAsset": { + "assetId": { + "guid": "{E14975EF-E676-51A4-B826-3EF59CB645AA}", + "subId": 285127096 + }, + "assetHint": "testdata/objects/cube/cube.azmodel" + } + } + } + }, + "Component_[17962478023087084794]": { + "$type": "SelectionComponent", + "Id": 17962478023087084794 + }, + "Component_[18071675051915092508]": { + "$type": "EditorEntityIconComponent", + "Id": 18071675051915092508 + }, + "Component_[2115498007879087044]": { + "$type": "EditorInspectorComponent", + "Id": 2115498007879087044, + "ComponentOrderEntryArray": [ + { + "ComponentId": 399415038452606756 + }, + { + "ComponentId": 16184381538555246534, + "SortIndex": 1 + }, + { + "ComponentId": 1057179753323467068, + "SortIndex": 2 + } + ] + }, + "Component_[3518973002096080237]": { + "$type": "EditorOnlyEntityComponent", + "Id": 3518973002096080237 + }, + "Component_[399415038452606756]": { + "$type": "{27F1E1A1-8D9D-4C3B-BD3A-AFB9762449C0} TransformComponent", + "Id": 399415038452606756, + "Parent Entity": "ContainerEntity", + "Transform Data": { + "Translate": [ + 12.530143737792969, + -0.00018183141946792603, + 94.40913391113281 + ] + } + }, + "Component_[4564240319609068082]": { + "$type": "EditorEntitySortComponent", + "Id": 4564240319609068082 + }, + "Component_[8092226976542590265]": { + "$type": "EditorDisabledCompositionComponent", + "Id": 8092226976542590265 + } + } + }, + "Entity_[4400510789588]": { + "Id": "Entity_[4400510789588]", + "Name": "Entity1", + "Components": { + "Component_[11525365929370623807]": { + "$type": "EditorVisibilityComponent", + "Id": 11525365929370623807 + }, + "Component_[12334620273692642550]": { + "$type": "EditorLockComponent", + "Id": 12334620273692642550 + }, + "Component_[14389735759337977675]": { + "$type": "EditorPendingCompositionComponent", + "Id": 14389735759337977675 + }, + "Component_[16184381538555246534]": { + "$type": "AZ::Render::EditorMeshComponent", + "Id": 16184381538555246534, + "Controller": { + "Configuration": { + "ModelAsset": { + "assetId": { + "guid": "{E14975EF-E676-51A4-B826-3EF59CB645AA}", + "subId": 285127096 + }, + "assetHint": "testdata/objects/cube/cube.azmodel" + } + } + } + }, + "Component_[17962478023087084794]": { + "$type": "SelectionComponent", + "Id": 17962478023087084794 + }, + "Component_[18071675051915092508]": { + "$type": "EditorEntityIconComponent", + "Id": 18071675051915092508 + }, + "Component_[2115498007879087044]": { + "$type": "EditorInspectorComponent", + "Id": 2115498007879087044, + "ComponentOrderEntryArray": [ + { + "ComponentId": 399415038452606756 + }, + { + "ComponentId": 16184381538555246534, + "SortIndex": 1 + }, + { + "ComponentId": 7827190074535394331, + "SortIndex": 2 + } + ] + }, + "Component_[3518973002096080237]": { + "$type": "EditorOnlyEntityComponent", + "Id": 3518973002096080237 + }, + "Component_[399415038452606756]": { + "$type": "{27F1E1A1-8D9D-4C3B-BD3A-AFB9762449C0} TransformComponent", + "Id": 399415038452606756, + "Parent Entity": "ContainerEntity", + "Transform Data": { + "Translate": [ + -17.530563354492188, + -0.00018183141946792603, + 0.0 + ] + } + }, + "Component_[4564240319609068082]": { + "$type": "EditorEntitySortComponent", + "Id": 4564240319609068082 + }, + "Component_[7827190074535394331]": { + "$type": "EditorMaterialComponent", + "Id": 7827190074535394331, + "Controller": { + "Configuration": { + "materials": [ + { + "Key": { + "materialSlotStableId": 2418540911 + }, + "Value": { + "MaterialAsset": { + "assetId": { + "guid": "{A7F03135-ECAD-5440-99DB-E84ABA3D50DA}" + }, + "assetHint": "materials/presets/pbr/metal_iron_polished.azmaterial" + } + } + } + ] + } + } + }, + "Component_[8092226976542590265]": { + "$type": "EditorDisabledCompositionComponent", + "Id": 8092226976542590265 + } + } + }, + "Entity_[4404805756884]": { + "Id": "Entity_[4404805756884]", + "Name": "Entity1", + "Components": { + "Component_[11525365929370623807]": { + "$type": "EditorVisibilityComponent", + "Id": 11525365929370623807 + }, + "Component_[12334620273692642550]": { + "$type": "EditorLockComponent", + "Id": 12334620273692642550 + }, + "Component_[14389735759337977675]": { + "$type": "EditorPendingCompositionComponent", + "Id": 14389735759337977675 + }, + "Component_[16184381538555246534]": { + "$type": "AZ::Render::EditorMeshComponent", + "Id": 16184381538555246534, + "Controller": { + "Configuration": { + "ModelAsset": { + "assetId": { + "guid": "{E14975EF-E676-51A4-B826-3EF59CB645AA}", + "subId": 285127096 + }, + "assetHint": "testdata/objects/cube/cube.azmodel" + } + } + } + }, + "Component_[17962478023087084794]": { + "$type": "SelectionComponent", + "Id": 17962478023087084794 + }, + "Component_[18071675051915092508]": { + "$type": "EditorEntityIconComponent", + "Id": 18071675051915092508 + }, + "Component_[2115498007879087044]": { + "$type": "EditorInspectorComponent", + "Id": 2115498007879087044, + "ComponentOrderEntryArray": [ + { + "ComponentId": 399415038452606756 + }, + { + "ComponentId": 16184381538555246534, + "SortIndex": 1 + }, + { + "ComponentId": 7827190074535394331, + "SortIndex": 2 + } + ] + }, + "Component_[3518973002096080237]": { + "$type": "EditorOnlyEntityComponent", + "Id": 3518973002096080237 + }, + "Component_[399415038452606756]": { + "$type": "{27F1E1A1-8D9D-4C3B-BD3A-AFB9762449C0} TransformComponent", + "Id": 399415038452606756, + "Parent Entity": "ContainerEntity", + "Transform Data": { + "Translate": [ + -17.530563354492188, + -0.00018183141946792603, + 59.873046875 + ] + } + }, + "Component_[4564240319609068082]": { + "$type": "EditorEntitySortComponent", + "Id": 4564240319609068082 + }, + "Component_[7827190074535394331]": { + "$type": "EditorMaterialComponent", + "Id": 7827190074535394331, + "Controller": { + "Configuration": { + "materials": [ + { + "Key": { + "materialSlotStableId": 2418540911 + }, + "Value": { + "MaterialAsset": { + "assetId": { + "guid": "{A7F03135-ECAD-5440-99DB-E84ABA3D50DA}" + }, + "assetHint": "materials/presets/pbr/metal_iron_polished.azmaterial" + } + } + } + ] + } + } + }, + "Component_[8092226976542590265]": { + "$type": "EditorDisabledCompositionComponent", + "Id": 8092226976542590265 + } + } + }, + "Entity_[4409100724180]": { + "Id": "Entity_[4409100724180]", + "Name": "Entity1", + "Components": { + "Component_[11525365929370623807]": { + "$type": "EditorVisibilityComponent", + "Id": 11525365929370623807 + }, + "Component_[12334620273692642550]": { + "$type": "EditorLockComponent", + "Id": 12334620273692642550 + }, + "Component_[14389735759337977675]": { + "$type": "EditorPendingCompositionComponent", + "Id": 14389735759337977675 + }, + "Component_[16184381538555246534]": { + "$type": "AZ::Render::EditorMeshComponent", + "Id": 16184381538555246534, + "Controller": { + "Configuration": { + "ModelAsset": { + "assetId": { + "guid": "{E14975EF-E676-51A4-B826-3EF59CB645AA}", + "subId": 285127096 + }, + "assetHint": "testdata/objects/cube/cube.azmodel" + } + } + } + }, + "Component_[17962478023087084794]": { + "$type": "SelectionComponent", + "Id": 17962478023087084794 + }, + "Component_[18071675051915092508]": { + "$type": "EditorEntityIconComponent", + "Id": 18071675051915092508 + }, + "Component_[2115498007879087044]": { + "$type": "EditorInspectorComponent", + "Id": 2115498007879087044, + "ComponentOrderEntryArray": [ + { + "ComponentId": 399415038452606756 + }, + { + "ComponentId": 16184381538555246534, + "SortIndex": 1 + }, + { + "ComponentId": 7827190074535394331, + "SortIndex": 2 + } + ] + }, + "Component_[3518973002096080237]": { + "$type": "EditorOnlyEntityComponent", + "Id": 3518973002096080237 + }, + "Component_[399415038452606756]": { + "$type": "{27F1E1A1-8D9D-4C3B-BD3A-AFB9762449C0} TransformComponent", + "Id": 399415038452606756, + "Parent Entity": "ContainerEntity", + "Transform Data": { + "Translate": [ + -17.530563354492188, + -0.00018183141946792603, + 84.40655517578125 + ] + } + }, + "Component_[4564240319609068082]": { + "$type": "EditorEntitySortComponent", + "Id": 4564240319609068082 + }, + "Component_[7827190074535394331]": { + "$type": "EditorMaterialComponent", + "Id": 7827190074535394331, + "Controller": { + "Configuration": { + "materials": [ + { + "Key": { + "materialSlotStableId": 2418540911 + }, + "Value": { + "MaterialAsset": { + "assetId": { + "guid": "{892EA944-0325-5FA6-94D7-4AB4FC02A0F5}" + }, + "assetHint": "materials/presets/pbr/metal_iron.azmaterial" + } + } + } + ] + } + } + }, + "Component_[8092226976542590265]": { + "$type": "EditorDisabledCompositionComponent", + "Id": 8092226976542590265 + } + } + }, + "Entity_[4413395691476]": { + "Id": "Entity_[4413395691476]", + "Name": "Entity1", + "Components": { + "Component_[11525365929370623807]": { + "$type": "EditorVisibilityComponent", + "Id": 11525365929370623807 + }, + "Component_[12334620273692642550]": { + "$type": "EditorLockComponent", + "Id": 12334620273692642550 + }, + "Component_[14389735759337977675]": { + "$type": "EditorPendingCompositionComponent", + "Id": 14389735759337977675 + }, + "Component_[16184381538555246534]": { + "$type": "AZ::Render::EditorMeshComponent", + "Id": 16184381538555246534, + "Controller": { + "Configuration": { + "ModelAsset": { + "assetId": { + "guid": "{E14975EF-E676-51A4-B826-3EF59CB645AA}", + "subId": 285127096 + }, + "assetHint": "testdata/objects/cube/cube.azmodel" + } + } + } + }, + "Component_[17962478023087084794]": { + "$type": "SelectionComponent", + "Id": 17962478023087084794 + }, + "Component_[18071675051915092508]": { + "$type": "EditorEntityIconComponent", + "Id": 18071675051915092508 + }, + "Component_[2115498007879087044]": { + "$type": "EditorInspectorComponent", + "Id": 2115498007879087044, + "ComponentOrderEntryArray": [ + { + "ComponentId": 399415038452606756 + }, + { + "ComponentId": 16184381538555246534, + "SortIndex": 1 + }, + { + "ComponentId": 7827190074535394331, + "SortIndex": 2 + } + ] + }, + "Component_[3518973002096080237]": { + "$type": "EditorOnlyEntityComponent", + "Id": 3518973002096080237 + }, + "Component_[399415038452606756]": { + "$type": "{27F1E1A1-8D9D-4C3B-BD3A-AFB9762449C0} TransformComponent", + "Id": 399415038452606756, + "Parent Entity": "ContainerEntity", + "Transform Data": { + "Translate": [ + -27.530563354492188, + -0.00018183141946792603, + 59.873046875 + ] + } + }, + "Component_[4564240319609068082]": { + "$type": "EditorEntitySortComponent", + "Id": 4564240319609068082 + }, + "Component_[7827190074535394331]": { + "$type": "EditorMaterialComponent", + "Id": 7827190074535394331, + "Controller": { + "Configuration": { + "materials": [ + { + "Key": { + "materialSlotStableId": 2418540911 + }, + "Value": { + "MaterialAsset": { + "assetId": { + "guid": "{CF5C7B01-4912-58AE-991A-F25251E505AC}" + }, + "assetHint": "materials/presets/pbr/metal_copper_polished.azmaterial" + } + } + } + ] + } + } + }, + "Component_[8092226976542590265]": { + "$type": "EditorDisabledCompositionComponent", + "Id": 8092226976542590265 + } + } + }, + "Entity_[4417690658772]": { + "Id": "Entity_[4417690658772]", + "Name": "Entity1", + "Components": { + "Component_[11525365929370623807]": { + "$type": "EditorVisibilityComponent", + "Id": 11525365929370623807 + }, + "Component_[12334620273692642550]": { + "$type": "EditorLockComponent", + "Id": 12334620273692642550 + }, + "Component_[14389735759337977675]": { + "$type": "EditorPendingCompositionComponent", + "Id": 14389735759337977675 + }, + "Component_[16184381538555246534]": { + "$type": "AZ::Render::EditorMeshComponent", + "Id": 16184381538555246534, + "Controller": { + "Configuration": { + "ModelAsset": { + "assetId": { + "guid": "{E14975EF-E676-51A4-B826-3EF59CB645AA}", + "subId": 285127096 + }, + "assetHint": "testdata/objects/cube/cube.azmodel" + } + } + } + }, + "Component_[17962478023087084794]": { + "$type": "SelectionComponent", + "Id": 17962478023087084794 + }, + "Component_[18071675051915092508]": { + "$type": "EditorEntityIconComponent", + "Id": 18071675051915092508 + }, + "Component_[2115498007879087044]": { + "$type": "EditorInspectorComponent", + "Id": 2115498007879087044, + "ComponentOrderEntryArray": [ + { + "ComponentId": 399415038452606756 + }, + { + "ComponentId": 16184381538555246534, + "SortIndex": 1 + }, + { + "ComponentId": 7827190074535394331, + "SortIndex": 2 + } + ] + }, + "Component_[3518973002096080237]": { + "$type": "EditorOnlyEntityComponent", + "Id": 3518973002096080237 + }, + "Component_[399415038452606756]": { + "$type": "{27F1E1A1-8D9D-4C3B-BD3A-AFB9762449C0} TransformComponent", + "Id": 399415038452606756, + "Parent Entity": "ContainerEntity", + "Transform Data": { + "Translate": [ + -12.530563354492188, + -0.00018183141946792603, + 64.32462310791016 + ] + } + }, + "Component_[4564240319609068082]": { + "$type": "EditorEntitySortComponent", + "Id": 4564240319609068082 + }, + "Component_[7827190074535394331]": { + "$type": "EditorMaterialComponent", + "Id": 7827190074535394331, + "Controller": { + "Configuration": { + "materials": [ + { + "Key": { + "materialSlotStableId": 2418540911 + }, + "Value": { + "MaterialAsset": { + "assetId": { + "guid": "{F2AD0EBF-7137-58D1-9991-9552FAD41B19}" + }, + "assetHint": "materials/presets/pbr/metal_mercury.azmaterial" + } + } + } + ] + } + } + }, + "Component_[8092226976542590265]": { + "$type": "EditorDisabledCompositionComponent", + "Id": 8092226976542590265 + } + } + }, + "Entity_[4421985626068]": { + "Id": "Entity_[4421985626068]", + "Name": "Entity1", + "Components": { + "Component_[11525365929370623807]": { + "$type": "EditorVisibilityComponent", + "Id": 11525365929370623807 + }, + "Component_[12334620273692642550]": { + "$type": "EditorLockComponent", + "Id": 12334620273692642550 + }, + "Component_[14389735759337977675]": { + "$type": "EditorPendingCompositionComponent", + "Id": 14389735759337977675 + }, + "Component_[16184381538555246534]": { + "$type": "AZ::Render::EditorMeshComponent", + "Id": 16184381538555246534, + "Controller": { + "Configuration": { + "ModelAsset": { + "assetId": { + "guid": "{E14975EF-E676-51A4-B826-3EF59CB645AA}", + "subId": 285127096 + }, + "assetHint": "testdata/objects/cube/cube.azmodel" + } + } + } + }, + "Component_[17962478023087084794]": { + "$type": "SelectionComponent", + "Id": 17962478023087084794 + }, + "Component_[18071675051915092508]": { + "$type": "EditorEntityIconComponent", + "Id": 18071675051915092508 + }, + "Component_[2115498007879087044]": { + "$type": "EditorInspectorComponent", + "Id": 2115498007879087044, + "ComponentOrderEntryArray": [ + { + "ComponentId": 399415038452606756 + }, + { + "ComponentId": 16184381538555246534, + "SortIndex": 1 + }, + { + "ComponentId": 7827190074535394331, + "SortIndex": 2 + } + ] + }, + "Component_[3518973002096080237]": { + "$type": "EditorOnlyEntityComponent", + "Id": 3518973002096080237 + }, + "Component_[399415038452606756]": { + "$type": "{27F1E1A1-8D9D-4C3B-BD3A-AFB9762449C0} TransformComponent", + "Id": 399415038452606756, + "Parent Entity": "ContainerEntity", + "Transform Data": { + "Translate": [ + -42.53056335449219, + -0.00018183141946792603, + 19.50924301147461 + ] + } + }, + "Component_[4564240319609068082]": { + "$type": "EditorEntitySortComponent", + "Id": 4564240319609068082 + }, + "Component_[7827190074535394331]": { + "$type": "EditorMaterialComponent", + "Id": 7827190074535394331, + "Controller": { + "Configuration": { + "materials": [ + { + "Key": { + "materialSlotStableId": 2418540911 + }, + "Value": { + "MaterialAsset": { + "assetId": { + "guid": "{AE350D9F-0000-526D-B49C-4303D687BB86}" + }, + "assetHint": "materials/presets/pbr/metal_brass_matte.azmaterial" + } + } + } + ] + } + } + }, + "Component_[8092226976542590265]": { + "$type": "EditorDisabledCompositionComponent", + "Id": 8092226976542590265 + } + } + }, + "Entity_[4426280593364]": { + "Id": "Entity_[4426280593364]", + "Name": "Entity1", + "Components": { + "Component_[11525365929370623807]": { + "$type": "EditorVisibilityComponent", + "Id": 11525365929370623807 + }, + "Component_[12334620273692642550]": { + "$type": "EditorLockComponent", + "Id": 12334620273692642550 + }, + "Component_[14389735759337977675]": { + "$type": "EditorPendingCompositionComponent", + "Id": 14389735759337977675 + }, + "Component_[16184381538555246534]": { + "$type": "AZ::Render::EditorMeshComponent", + "Id": 16184381538555246534, + "Controller": { + "Configuration": { + "ModelAsset": { + "assetId": { + "guid": "{E14975EF-E676-51A4-B826-3EF59CB645AA}", + "subId": 285127096 + }, + "assetHint": "testdata/objects/cube/cube.azmodel" + } + } + } + }, + "Component_[17962478023087084794]": { + "$type": "SelectionComponent", + "Id": 17962478023087084794 + }, + "Component_[18071675051915092508]": { + "$type": "EditorEntityIconComponent", + "Id": 18071675051915092508 + }, + "Component_[2115498007879087044]": { + "$type": "EditorInspectorComponent", + "Id": 2115498007879087044, + "ComponentOrderEntryArray": [ + { + "ComponentId": 399415038452606756 + }, + { + "ComponentId": 16184381538555246534, + "SortIndex": 1 + }, + { + "ComponentId": 7827190074535394331, + "SortIndex": 2 + } + ] + }, + "Component_[3518973002096080237]": { + "$type": "EditorOnlyEntityComponent", + "Id": 3518973002096080237 + }, + "Component_[399415038452606756]": { + "$type": "{27F1E1A1-8D9D-4C3B-BD3A-AFB9762449C0} TransformComponent", + "Id": 399415038452606756, + "Parent Entity": "ContainerEntity", + "Transform Data": { + "Translate": [ + -2.5305633544921875, + -0.00018183141946792603, + 64.32462310791016 + ] + } + }, + "Component_[4564240319609068082]": { + "$type": "EditorEntitySortComponent", + "Id": 4564240319609068082 + }, + "Component_[7827190074535394331]": { + "$type": "EditorMaterialComponent", + "Id": 7827190074535394331, + "Controller": { + "Configuration": { + "materials": [ + { + "Key": { + "materialSlotStableId": 2418540911 + }, + "Value": { + "MaterialAsset": { + "assetId": { + "guid": "{9187B84B-425F-5D11-B4D7-35BBDB0959D1}" + }, + "assetHint": "materials/presets/pbr/metal_palladium_matte.azmaterial" + } + } + } + ] + } + } + }, + "Component_[8092226976542590265]": { + "$type": "EditorDisabledCompositionComponent", + "Id": 8092226976542590265 + } + } + }, + "Entity_[4430575560660]": { + "Id": "Entity_[4430575560660]", + "Name": "Entity1", + "Components": { + "Component_[11525365929370623807]": { + "$type": "EditorVisibilityComponent", + "Id": 11525365929370623807 + }, + "Component_[12334620273692642550]": { + "$type": "EditorLockComponent", + "Id": 12334620273692642550 + }, + "Component_[14389735759337977675]": { + "$type": "EditorPendingCompositionComponent", + "Id": 14389735759337977675 + }, + "Component_[16184381538555246534]": { + "$type": "AZ::Render::EditorMeshComponent", + "Id": 16184381538555246534, + "Controller": { + "Configuration": { + "ModelAsset": { + "assetId": { + "guid": "{E14975EF-E676-51A4-B826-3EF59CB645AA}", + "subId": 285127096 + }, + "assetHint": "testdata/objects/cube/cube.azmodel" + } + } + } + }, + "Component_[17962478023087084794]": { + "$type": "SelectionComponent", + "Id": 17962478023087084794 + }, + "Component_[18071675051915092508]": { + "$type": "EditorEntityIconComponent", + "Id": 18071675051915092508 + }, + "Component_[2115498007879087044]": { + "$type": "EditorInspectorComponent", + "Id": 2115498007879087044, + "ComponentOrderEntryArray": [ + { + "ComponentId": 399415038452606756 + }, + { + "ComponentId": 16184381538555246534, + "SortIndex": 1 + }, + { + "ComponentId": 7827190074535394331, + "SortIndex": 2 + } + ] + }, + "Component_[3518973002096080237]": { + "$type": "EditorOnlyEntityComponent", + "Id": 3518973002096080237 + }, + "Component_[399415038452606756]": { + "$type": "{27F1E1A1-8D9D-4C3B-BD3A-AFB9762449C0} TransformComponent", + "Id": 399415038452606756, + "Parent Entity": "ContainerEntity", + "Transform Data": { + "Translate": [ + 47.53014373779297, + -0.00018183141946792603, + 79.38228607177734 + ] + } + }, + "Component_[4564240319609068082]": { + "$type": "EditorEntitySortComponent", + "Id": 4564240319609068082 + }, + "Component_[7827190074535394331]": { + "$type": "EditorMaterialComponent", + "Id": 7827190074535394331, + "Controller": { + "Configuration": { + "materials": [ + { + "Key": { + "materialSlotStableId": 2418540911 + }, + "Value": { + "MaterialAsset": { + "assetId": { + "guid": "{970148AC-7258-5EC8-9CE7-F4EF93164D93}" + }, + "assetHint": "materials/presets/pbr/metal_iron_matte.azmaterial" + } + } + } + ] + } + } + }, + "Component_[8092226976542590265]": { + "$type": "EditorDisabledCompositionComponent", + "Id": 8092226976542590265 + } + } + }, + "Entity_[4434870527956]": { + "Id": "Entity_[4434870527956]", + "Name": "Entity1", + "Components": { + "Component_[11525365929370623807]": { + "$type": "EditorVisibilityComponent", + "Id": 11525365929370623807 + }, + "Component_[12334620273692642550]": { + "$type": "EditorLockComponent", + "Id": 12334620273692642550 + }, + "Component_[14389735759337977675]": { + "$type": "EditorPendingCompositionComponent", + "Id": 14389735759337977675 + }, + "Component_[16184381538555246534]": { + "$type": "AZ::Render::EditorMeshComponent", + "Id": 16184381538555246534, + "Controller": { + "Configuration": { + "ModelAsset": { + "assetId": { + "guid": "{E14975EF-E676-51A4-B826-3EF59CB645AA}", + "subId": 285127096 + }, + "assetHint": "testdata/objects/cube/cube.azmodel" + } + } + } + }, + "Component_[17962478023087084794]": { + "$type": "SelectionComponent", + "Id": 17962478023087084794 + }, + "Component_[18071675051915092508]": { + "$type": "EditorEntityIconComponent", + "Id": 18071675051915092508 + }, + "Component_[2115498007879087044]": { + "$type": "EditorInspectorComponent", + "Id": 2115498007879087044, + "ComponentOrderEntryArray": [ + { + "ComponentId": 399415038452606756 + }, + { + "ComponentId": 16184381538555246534, + "SortIndex": 1 + }, + { + "ComponentId": 7827190074535394331, + "SortIndex": 2 + } + ] + }, + "Component_[3518973002096080237]": { + "$type": "EditorOnlyEntityComponent", + "Id": 3518973002096080237 + }, + "Component_[399415038452606756]": { + "$type": "{27F1E1A1-8D9D-4C3B-BD3A-AFB9762449C0} TransformComponent", + "Id": 399415038452606756, + "Parent Entity": "ContainerEntity", + "Transform Data": { + "Translate": [ + -42.53056335449219, + -0.00018183141946792603, + 39.56034851074219 + ] + } + }, + "Component_[4564240319609068082]": { + "$type": "EditorEntitySortComponent", + "Id": 4564240319609068082 + }, + "Component_[7827190074535394331]": { + "$type": "EditorMaterialComponent", + "Id": 7827190074535394331, + "Controller": { + "Configuration": { + "materials": [ + { + "Key": { + "materialSlotStableId": 2418540911 + }, + "Value": { + "MaterialAsset": { + "assetId": { + "guid": "{80E0F2A7-1EE4-597F-80EF-985C65BCE2EB}" + }, + "assetHint": "materials/presets/pbr/metal_brass.azmaterial" + } + } + } + ] + } + } + }, + "Component_[8092226976542590265]": { + "$type": "EditorDisabledCompositionComponent", + "Id": 8092226976542590265 + } + } + }, + "Entity_[4439165495252]": { + "Id": "Entity_[4439165495252]", + "Name": "Entity1", + "Components": { + "Component_[11525365929370623807]": { + "$type": "EditorVisibilityComponent", + "Id": 11525365929370623807 + }, + "Component_[12334620273692642550]": { + "$type": "EditorLockComponent", + "Id": 12334620273692642550 + }, + "Component_[14389735759337977675]": { + "$type": "EditorPendingCompositionComponent", + "Id": 14389735759337977675 + }, + "Component_[16184381538555246534]": { + "$type": "AZ::Render::EditorMeshComponent", + "Id": 16184381538555246534, + "Controller": { + "Configuration": { + "ModelAsset": { + "assetId": { + "guid": "{E14975EF-E676-51A4-B826-3EF59CB645AA}", + "subId": 285127096 + }, + "assetHint": "testdata/objects/cube/cube.azmodel" + } + } + } + }, + "Component_[17962478023087084794]": { + "$type": "SelectionComponent", + "Id": 17962478023087084794 + }, + "Component_[18071675051915092508]": { + "$type": "EditorEntityIconComponent", + "Id": 18071675051915092508 + }, + "Component_[2115498007879087044]": { + "$type": "EditorInspectorComponent", + "Id": 2115498007879087044, + "ComponentOrderEntryArray": [ + { + "ComponentId": 399415038452606756 + }, + { + "ComponentId": 16184381538555246534, + "SortIndex": 1 + }, + { + "ComponentId": 7827190074535394331, + "SortIndex": 2 + } + ] + }, + "Component_[3518973002096080237]": { + "$type": "EditorOnlyEntityComponent", + "Id": 3518973002096080237 + }, + "Component_[399415038452606756]": { + "$type": "{27F1E1A1-8D9D-4C3B-BD3A-AFB9762449C0} TransformComponent", + "Id": 399415038452606756, + "Parent Entity": "ContainerEntity", + "Transform Data": { + "Translate": [ + 42.53014373779297, + -0.00018183141946792603, + 15.057670593261719 + ] + } + }, + "Component_[4564240319609068082]": { + "$type": "EditorEntitySortComponent", + "Id": 4564240319609068082 + }, + "Component_[7827190074535394331]": { + "$type": "EditorMaterialComponent", + "Id": 7827190074535394331, + "Controller": { + "Configuration": { + "materials": [ + { + "Key": { + "materialSlotStableId": 2418540911 + }, + "Value": { + "MaterialAsset": { + "assetId": { + "guid": "{FB4657EB-FB3A-5EC3-A772-DC36D6F733C3}" + }, + "assetHint": "materials/presets/pbr/metal_gold_polished.azmaterial" + } + } + } + ] + } + } + }, + "Component_[8092226976542590265]": { + "$type": "EditorDisabledCompositionComponent", + "Id": 8092226976542590265 + } + } + }, + "Entity_[4443460462548]": { + "Id": "Entity_[4443460462548]", + "Name": "Entity1", + "Components": { + "Component_[11525365929370623807]": { + "$type": "EditorVisibilityComponent", + "Id": 11525365929370623807 + }, + "Component_[12334620273692642550]": { + "$type": "EditorLockComponent", + "Id": 12334620273692642550 + }, + "Component_[14389735759337977675]": { + "$type": "EditorPendingCompositionComponent", + "Id": 14389735759337977675 + }, + "Component_[16184381538555246534]": { + "$type": "AZ::Render::EditorMeshComponent", + "Id": 16184381538555246534, + "Controller": { + "Configuration": { + "ModelAsset": { + "assetId": { + "guid": "{E14975EF-E676-51A4-B826-3EF59CB645AA}", + "subId": 285127096 + }, + "assetHint": "testdata/objects/cube/cube.azmodel" + } + } + } + }, + "Component_[17962478023087084794]": { + "$type": "SelectionComponent", + "Id": 17962478023087084794 + }, + "Component_[18071675051915092508]": { + "$type": "EditorEntityIconComponent", + "Id": 18071675051915092508 + }, + "Component_[2115498007879087044]": { + "$type": "EditorInspectorComponent", + "Id": 2115498007879087044, + "ComponentOrderEntryArray": [ + { + "ComponentId": 399415038452606756 + }, + { + "ComponentId": 16184381538555246534, + "SortIndex": 1 + }, + { + "ComponentId": 7827190074535394331, + "SortIndex": 2 + } + ] + }, + "Component_[3518973002096080237]": { + "$type": "EditorOnlyEntityComponent", + "Id": 3518973002096080237 + }, + "Component_[399415038452606756]": { + "$type": "{27F1E1A1-8D9D-4C3B-BD3A-AFB9762449C0} TransformComponent", + "Id": 399415038452606756, + "Parent Entity": "ContainerEntity", + "Transform Data": { + "Translate": [ + -27.530563354492188, + -0.00018183141946792603, + 105.0152359008789 + ] + } + }, + "Component_[4564240319609068082]": { + "$type": "EditorEntitySortComponent", + "Id": 4564240319609068082 + }, + "Component_[7827190074535394331]": { + "$type": "EditorMaterialComponent", + "Id": 7827190074535394331, + "Controller": { + "Configuration": { + "materials": [ + { + "Key": { + "materialSlotStableId": 2418540911 + }, + "Value": { + "MaterialAsset": { + "assetId": { + "guid": "{CF5C7B01-4912-58AE-991A-F25251E505AC}" + }, + "assetHint": "materials/presets/pbr/metal_copper_polished.azmaterial" + } + } + } + ] + } + } + }, + "Component_[8092226976542590265]": { + "$type": "EditorDisabledCompositionComponent", + "Id": 8092226976542590265 + } + } + }, + "Entity_[4447755429844]": { + "Id": "Entity_[4447755429844]", + "Name": "Entity1", + "Components": { + "Component_[11525365929370623807]": { + "$type": "EditorVisibilityComponent", + "Id": 11525365929370623807 + }, + "Component_[12334620273692642550]": { + "$type": "EditorLockComponent", + "Id": 12334620273692642550 + }, + "Component_[14389735759337977675]": { + "$type": "EditorPendingCompositionComponent", + "Id": 14389735759337977675 + }, + "Component_[16184381538555246534]": { + "$type": "AZ::Render::EditorMeshComponent", + "Id": 16184381538555246534, + "Controller": { + "Configuration": { + "ModelAsset": { + "assetId": { + "guid": "{E14975EF-E676-51A4-B826-3EF59CB645AA}", + "subId": 285127096 + }, + "assetHint": "testdata/objects/cube/cube.azmodel" + } + } + } + }, + "Component_[17962478023087084794]": { + "$type": "SelectionComponent", + "Id": 17962478023087084794 + }, + "Component_[18071675051915092508]": { + "$type": "EditorEntityIconComponent", + "Id": 18071675051915092508 + }, + "Component_[2115498007879087044]": { + "$type": "EditorInspectorComponent", + "Id": 2115498007879087044, + "ComponentOrderEntryArray": [ + { + "ComponentId": 399415038452606756 + }, + { + "ComponentId": 16184381538555246534, + "SortIndex": 1 + }, + { + "ComponentId": 7827190074535394331, + "SortIndex": 2 + } + ] + }, + "Component_[3518973002096080237]": { + "$type": "EditorOnlyEntityComponent", + "Id": 3518973002096080237 + }, + "Component_[399415038452606756]": { + "$type": "{27F1E1A1-8D9D-4C3B-BD3A-AFB9762449C0} TransformComponent", + "Id": 399415038452606756, + "Parent Entity": "ContainerEntity", + "Transform Data": { + "Translate": [ + -2.5305633544921875, + -0.00018183141946792603, + 84.40655517578125 + ] + } + }, + "Component_[4564240319609068082]": { + "$type": "EditorEntitySortComponent", + "Id": 4564240319609068082 + }, + "Component_[7827190074535394331]": { + "$type": "EditorMaterialComponent", + "Id": 7827190074535394331, + "Controller": { + "Configuration": { + "materials": [ + { + "Key": { + "materialSlotStableId": 2418540911 + }, + "Value": { + "MaterialAsset": { + "assetId": { + "guid": "{DC0598ED-1EDD-5B37-892E-E0867621D74C}" + }, + "assetHint": "materials/presets/pbr/metal_palladium.azmaterial" + } + } + } + ] + } + } + }, + "Component_[8092226976542590265]": { + "$type": "EditorDisabledCompositionComponent", + "Id": 8092226976542590265 + } + } + }, + "Entity_[4452050397140]": { + "Id": "Entity_[4452050397140]", + "Name": "Entity1", + "Components": { + "Component_[11525365929370623807]": { + "$type": "EditorVisibilityComponent", + "Id": 11525365929370623807 + }, + "Component_[12334620273692642550]": { + "$type": "EditorLockComponent", + "Id": 12334620273692642550 + }, + "Component_[14389735759337977675]": { + "$type": "EditorPendingCompositionComponent", + "Id": 14389735759337977675 + }, + "Component_[16184381538555246534]": { + "$type": "AZ::Render::EditorMeshComponent", + "Id": 16184381538555246534, + "Controller": { + "Configuration": { + "ModelAsset": { + "assetId": { + "guid": "{E14975EF-E676-51A4-B826-3EF59CB645AA}", + "subId": 285127096 + }, + "assetHint": "testdata/objects/cube/cube.azmodel" + } + } + } + }, + "Component_[17962478023087084794]": { + "$type": "SelectionComponent", + "Id": 17962478023087084794 + }, + "Component_[18071675051915092508]": { + "$type": "EditorEntityIconComponent", + "Id": 18071675051915092508 + }, + "Component_[2115498007879087044]": { + "$type": "EditorInspectorComponent", + "Id": 2115498007879087044, + "ComponentOrderEntryArray": [ + { + "ComponentId": 399415038452606756 + }, + { + "ComponentId": 16184381538555246534, + "SortIndex": 1 + }, + { + "ComponentId": 7827190074535394331, + "SortIndex": 2 + } + ] + }, + "Component_[3518973002096080237]": { + "$type": "EditorOnlyEntityComponent", + "Id": 3518973002096080237 + }, + "Component_[399415038452606756]": { + "$type": "{27F1E1A1-8D9D-4C3B-BD3A-AFB9762449C0} TransformComponent", + "Id": 399415038452606756, + "Parent Entity": "ContainerEntity", + "Transform Data": { + "Translate": [ + 22.53014373779297, + -0.00018183141946792603, + 79.38228607177734 + ] + } + }, + "Component_[4564240319609068082]": { + "$type": "EditorEntitySortComponent", + "Id": 4564240319609068082 + }, + "Component_[7827190074535394331]": { + "$type": "EditorMaterialComponent", + "Id": 7827190074535394331, + "Controller": { + "Configuration": { + "materials": [ + { + "Key": { + "materialSlotStableId": 2418540911 + }, + "Value": { + "MaterialAsset": { + "assetId": { + "guid": "{AE350D9F-0000-526D-B49C-4303D687BB86}" + }, + "assetHint": "materials/presets/pbr/metal_brass_matte.azmaterial" + } + } + } + ] + } + } + }, + "Component_[8092226976542590265]": { + "$type": "EditorDisabledCompositionComponent", + "Id": 8092226976542590265 + } + } + }, + "Entity_[4456345364436]": { + "Id": "Entity_[4456345364436]", + "Name": "Entity1", + "Components": { + "Component_[1057179753323467068]": { + "$type": "EditorMaterialComponent", + "Id": 1057179753323467068, + "Controller": { + "Configuration": { + "materials": [ + { + "Key": { + "materialSlotStableId": 2418540911 + }, + "Value": { + "MaterialAsset": { + "assetId": { + "guid": "{721188E0-B7CC-5D06-8D5D-39AF8ABF2EF9}" + }, + "assetHint": "materials/presets/pbr/metal_titanium.azmaterial" + } + } + } + ] + } + } + }, + "Component_[11525365929370623807]": { + "$type": "EditorVisibilityComponent", + "Id": 11525365929370623807 + }, + "Component_[12334620273692642550]": { + "$type": "EditorLockComponent", + "Id": 12334620273692642550 + }, + "Component_[14389735759337977675]": { + "$type": "EditorPendingCompositionComponent", + "Id": 14389735759337977675 + }, + "Component_[16184381538555246534]": { + "$type": "AZ::Render::EditorMeshComponent", + "Id": 16184381538555246534, + "Controller": { + "Configuration": { + "ModelAsset": { + "assetId": { + "guid": "{E14975EF-E676-51A4-B826-3EF59CB645AA}", + "subId": 285127096 + }, + "assetHint": "testdata/objects/cube/cube.azmodel" + } + } + } + }, + "Component_[17962478023087084794]": { + "$type": "SelectionComponent", + "Id": 17962478023087084794 + }, + "Component_[18071675051915092508]": { + "$type": "EditorEntityIconComponent", + "Id": 18071675051915092508 + }, + "Component_[2115498007879087044]": { + "$type": "EditorInspectorComponent", + "Id": 2115498007879087044, + "ComponentOrderEntryArray": [ + { + "ComponentId": 399415038452606756 + }, + { + "ComponentId": 16184381538555246534, + "SortIndex": 1 + }, + { + "ComponentId": 1057179753323467068, + "SortIndex": 2 + } + ] + }, + "Component_[3518973002096080237]": { + "$type": "EditorOnlyEntityComponent", + "Id": 3518973002096080237 + }, + "Component_[399415038452606756]": { + "$type": "{27F1E1A1-8D9D-4C3B-BD3A-AFB9762449C0} TransformComponent", + "Id": 399415038452606756, + "Parent Entity": "ContainerEntity", + "Transform Data": { + "Translate": [ + 12.530143737792969, + -0.00018183141946792603, + 39.56034851074219 + ] + } + }, + "Component_[4564240319609068082]": { + "$type": "EditorEntitySortComponent", + "Id": 4564240319609068082 + }, + "Component_[8092226976542590265]": { + "$type": "EditorDisabledCompositionComponent", + "Id": 8092226976542590265 + } + } + }, + "Entity_[4460640331732]": { + "Id": "Entity_[4460640331732]", + "Name": "Entity1", + "Components": { + "Component_[11525365929370623807]": { + "$type": "EditorVisibilityComponent", + "Id": 11525365929370623807 + }, + "Component_[12334620273692642550]": { + "$type": "EditorLockComponent", + "Id": 12334620273692642550 + }, + "Component_[14389735759337977675]": { + "$type": "EditorPendingCompositionComponent", + "Id": 14389735759337977675 + }, + "Component_[16184381538555246534]": { + "$type": "AZ::Render::EditorMeshComponent", + "Id": 16184381538555246534, + "Controller": { + "Configuration": { + "ModelAsset": { + "assetId": { + "guid": "{E14975EF-E676-51A4-B826-3EF59CB645AA}", + "subId": 285127096 + }, + "assetHint": "testdata/objects/cube/cube.azmodel" + } + } + } + }, + "Component_[17962478023087084794]": { + "$type": "SelectionComponent", + "Id": 17962478023087084794 + }, + "Component_[18071675051915092508]": { + "$type": "EditorEntityIconComponent", + "Id": 18071675051915092508 + }, + "Component_[2115498007879087044]": { + "$type": "EditorInspectorComponent", + "Id": 2115498007879087044, + "ComponentOrderEntryArray": [ + { + "ComponentId": 399415038452606756 + }, + { + "ComponentId": 16184381538555246534, + "SortIndex": 1 + }, + { + "ComponentId": 7827190074535394331, + "SortIndex": 2 + } + ] + }, + "Component_[3518973002096080237]": { + "$type": "EditorOnlyEntityComponent", + "Id": 3518973002096080237 + }, + "Component_[399415038452606756]": { + "$type": "{27F1E1A1-8D9D-4C3B-BD3A-AFB9762449C0} TransformComponent", + "Id": 399415038452606756, + "Parent Entity": "ContainerEntity", + "Transform Data": { + "Translate": [ + -12.530563354492188, + -0.00018183141946792603, + 84.40655517578125 + ] + } + }, + "Component_[4564240319609068082]": { + "$type": "EditorEntitySortComponent", + "Id": 4564240319609068082 + }, + "Component_[7827190074535394331]": { + "$type": "EditorMaterialComponent", + "Id": 7827190074535394331, + "Controller": { + "Configuration": { + "materials": [ + { + "Key": { + "materialSlotStableId": 2418540911 + }, + "Value": { + "MaterialAsset": { + "assetId": { + "guid": "{F2AD0EBF-7137-58D1-9991-9552FAD41B19}" + }, + "assetHint": "materials/presets/pbr/metal_mercury.azmaterial" + } + } + } + ] + } + } + }, + "Component_[8092226976542590265]": { + "$type": "EditorDisabledCompositionComponent", + "Id": 8092226976542590265 + } + } + }, + "Entity_[4464935299028]": { + "Id": "Entity_[4464935299028]", + "Name": "Entity1", + "Components": { + "Component_[11525365929370623807]": { + "$type": "EditorVisibilityComponent", + "Id": 11525365929370623807 + }, + "Component_[12334620273692642550]": { + "$type": "EditorLockComponent", + "Id": 12334620273692642550 + }, + "Component_[14389735759337977675]": { + "$type": "EditorPendingCompositionComponent", + "Id": 14389735759337977675 + }, + "Component_[16184381538555246534]": { + "$type": "AZ::Render::EditorMeshComponent", + "Id": 16184381538555246534, + "Controller": { + "Configuration": { + "ModelAsset": { + "assetId": { + "guid": "{E14975EF-E676-51A4-B826-3EF59CB645AA}", + "subId": 285127096 + }, + "assetHint": "testdata/objects/cube/cube.azmodel" + } + } + } + }, + "Component_[17962478023087084794]": { + "$type": "SelectionComponent", + "Id": 17962478023087084794 + }, + "Component_[18071675051915092508]": { + "$type": "EditorEntityIconComponent", + "Id": 18071675051915092508 + }, + "Component_[2115498007879087044]": { + "$type": "EditorInspectorComponent", + "Id": 2115498007879087044, + "ComponentOrderEntryArray": [ + { + "ComponentId": 399415038452606756 + }, + { + "ComponentId": 16184381538555246534, + "SortIndex": 1 + }, + { + "ComponentId": 7827190074535394331, + "SortIndex": 2 + } + ] + }, + "Component_[3518973002096080237]": { + "$type": "EditorOnlyEntityComponent", + "Id": 3518973002096080237 + }, + "Component_[399415038452606756]": { + "$type": "{27F1E1A1-8D9D-4C3B-BD3A-AFB9762449C0} TransformComponent", + "Id": 399415038452606756, + "Parent Entity": "ContainerEntity", + "Transform Data": { + "Translate": [ + -32.53056335449219, + -0.00018183141946792603, + 39.56034851074219 + ] + } + }, + "Component_[4564240319609068082]": { + "$type": "EditorEntitySortComponent", + "Id": 4564240319609068082 + }, + "Component_[7827190074535394331]": { + "$type": "EditorMaterialComponent", + "Id": 7827190074535394331, + "Controller": { + "Configuration": { + "materials": [ + { + "Key": { + "materialSlotStableId": 2418540911 + }, + "Value": { + "MaterialAsset": { + "assetId": { + "guid": "{99976D73-6248-5D66-AD15-E8F52B0AFE36}" + }, + "assetHint": "materials/presets/pbr/metal_cobalt.azmaterial" + } + } + } + ] + } + } + }, + "Component_[8092226976542590265]": { + "$type": "EditorDisabledCompositionComponent", + "Id": 8092226976542590265 + } + } + }, + "Entity_[4469230266324]": { + "Id": "Entity_[4469230266324]", + "Name": "Entity1", + "Components": { + "Component_[11525365929370623807]": { + "$type": "EditorVisibilityComponent", + "Id": 11525365929370623807 + }, + "Component_[12334620273692642550]": { + "$type": "EditorLockComponent", + "Id": 12334620273692642550 + }, + "Component_[14389735759337977675]": { + "$type": "EditorPendingCompositionComponent", + "Id": 14389735759337977675 + }, + "Component_[16184381538555246534]": { + "$type": "AZ::Render::EditorMeshComponent", + "Id": 16184381538555246534, + "Controller": { + "Configuration": { + "ModelAsset": { + "assetId": { + "guid": "{E14975EF-E676-51A4-B826-3EF59CB645AA}", + "subId": 285127096 + }, + "assetHint": "testdata/objects/cube/cube.azmodel" + } + } + } + }, + "Component_[17962478023087084794]": { + "$type": "SelectionComponent", + "Id": 17962478023087084794 + }, + "Component_[18071675051915092508]": { + "$type": "EditorEntityIconComponent", + "Id": 18071675051915092508 + }, + "Component_[2115498007879087044]": { + "$type": "EditorInspectorComponent", + "Id": 2115498007879087044, + "ComponentOrderEntryArray": [ + { + "ComponentId": 399415038452606756 + }, + { + "ComponentId": 16184381538555246534, + "SortIndex": 1 + }, + { + "ComponentId": 7827190074535394331, + "SortIndex": 2 + } + ] + }, + "Component_[3518973002096080237]": { + "$type": "EditorOnlyEntityComponent", + "Id": 3518973002096080237 + }, + "Component_[399415038452606756]": { + "$type": "{27F1E1A1-8D9D-4C3B-BD3A-AFB9762449C0} TransformComponent", + "Id": 399415038452606756, + "Parent Entity": "ContainerEntity", + "Transform Data": { + "Translate": [ + -42.53056335449219, + -0.00018183141946792603, + 79.38228607177734 + ] + } + }, + "Component_[4564240319609068082]": { + "$type": "EditorEntitySortComponent", + "Id": 4564240319609068082 + }, + "Component_[7827190074535394331]": { + "$type": "EditorMaterialComponent", + "Id": 7827190074535394331, + "Controller": { + "Configuration": { + "materials": [ + { + "Key": { + "materialSlotStableId": 2418540911 + }, + "Value": { + "MaterialAsset": { + "assetId": { + "guid": "{AE350D9F-0000-526D-B49C-4303D687BB86}" + }, + "assetHint": "materials/presets/pbr/metal_brass_matte.azmaterial" + } + } + } + ] + } + } + }, + "Component_[8092226976542590265]": { + "$type": "EditorDisabledCompositionComponent", + "Id": 8092226976542590265 + } + } + }, + "Entity_[4473525233620]": { + "Id": "Entity_[4473525233620]", + "Name": "Entity1", + "Components": { + "Component_[11525365929370623807]": { + "$type": "EditorVisibilityComponent", + "Id": 11525365929370623807 + }, + "Component_[12334620273692642550]": { + "$type": "EditorLockComponent", + "Id": 12334620273692642550 + }, + "Component_[14389735759337977675]": { + "$type": "EditorPendingCompositionComponent", + "Id": 14389735759337977675 + }, + "Component_[16184381538555246534]": { + "$type": "AZ::Render::EditorMeshComponent", + "Id": 16184381538555246534, + "Controller": { + "Configuration": { + "ModelAsset": { + "assetId": { + "guid": "{E14975EF-E676-51A4-B826-3EF59CB645AA}", + "subId": 285127096 + }, + "assetHint": "testdata/objects/cube/cube.azmodel" + } + } + } + }, + "Component_[17962478023087084794]": { + "$type": "SelectionComponent", + "Id": 17962478023087084794 + }, + "Component_[18071675051915092508]": { + "$type": "EditorEntityIconComponent", + "Id": 18071675051915092508 + }, + "Component_[2115498007879087044]": { + "$type": "EditorInspectorComponent", + "Id": 2115498007879087044, + "ComponentOrderEntryArray": [ + { + "ComponentId": 399415038452606756 + }, + { + "ComponentId": 16184381538555246534, + "SortIndex": 1 + }, + { + "ComponentId": 7827190074535394331, + "SortIndex": 2 + } + ] + }, + "Component_[3518973002096080237]": { + "$type": "EditorOnlyEntityComponent", + "Id": 3518973002096080237 + }, + "Component_[399415038452606756]": { + "$type": "{27F1E1A1-8D9D-4C3B-BD3A-AFB9762449C0} TransformComponent", + "Id": 399415038452606756, + "Parent Entity": "ContainerEntity", + "Transform Data": { + "Translate": [ + 37.53014373779297, + -0.00018183141946792603, + 64.32462310791016 + ] + } + }, + "Component_[4564240319609068082]": { + "$type": "EditorEntitySortComponent", + "Id": 4564240319609068082 + }, + "Component_[7827190074535394331]": { + "$type": "EditorMaterialComponent", + "Id": 7827190074535394331, + "Controller": { + "Configuration": { + "materials": [ + { + "Key": { + "materialSlotStableId": 2418540911 + }, + "Value": { + "MaterialAsset": { + "assetId": { + "guid": "{2D054071-BEF7-53C0-A8C9-E4F026BD8364}" + }, + "assetHint": "materials/presets/pbr/metal_copper_matte.azmaterial" + } + } + } + ] + } + } + }, + "Component_[8092226976542590265]": { + "$type": "EditorDisabledCompositionComponent", + "Id": 8092226976542590265 + } + } + }, + "Entity_[4477820200916]": { + "Id": "Entity_[4477820200916]", + "Name": "Entity1", + "Components": { + "Component_[11525365929370623807]": { + "$type": "EditorVisibilityComponent", + "Id": 11525365929370623807 + }, + "Component_[12334620273692642550]": { + "$type": "EditorLockComponent", + "Id": 12334620273692642550 + }, + "Component_[14389735759337977675]": { + "$type": "EditorPendingCompositionComponent", + "Id": 14389735759337977675 + }, + "Component_[16184381538555246534]": { + "$type": "AZ::Render::EditorMeshComponent", + "Id": 16184381538555246534, + "Controller": { + "Configuration": { + "ModelAsset": { + "assetId": { + "guid": "{E14975EF-E676-51A4-B826-3EF59CB645AA}", + "subId": 285127096 + }, + "assetHint": "testdata/objects/cube/cube.azmodel" + } + } + } + }, + "Component_[17962478023087084794]": { + "$type": "SelectionComponent", + "Id": 17962478023087084794 + }, + "Component_[18071675051915092508]": { + "$type": "EditorEntityIconComponent", + "Id": 18071675051915092508 + }, + "Component_[2115498007879087044]": { + "$type": "EditorInspectorComponent", + "Id": 2115498007879087044, + "ComponentOrderEntryArray": [ + { + "ComponentId": 399415038452606756 + }, + { + "ComponentId": 16184381538555246534, + "SortIndex": 1 + }, + { + "ComponentId": 7827190074535394331, + "SortIndex": 2 + } + ] + }, + "Component_[3518973002096080237]": { + "$type": "EditorOnlyEntityComponent", + "Id": 3518973002096080237 + }, + "Component_[399415038452606756]": { + "$type": "{27F1E1A1-8D9D-4C3B-BD3A-AFB9762449C0} TransformComponent", + "Id": 399415038452606756, + "Parent Entity": "ContainerEntity", + "Transform Data": { + "Translate": [ + -12.530563354492188, + -0.00018183141946792603, + 24.533506393432617 + ] + } + }, + "Component_[4564240319609068082]": { + "$type": "EditorEntitySortComponent", + "Id": 4564240319609068082 + }, + "Component_[7827190074535394331]": { + "$type": "EditorMaterialComponent", + "Id": 7827190074535394331, + "Controller": { + "Configuration": { + "materials": [ + { + "Key": { + "materialSlotStableId": 2418540911 + }, + "Value": { + "MaterialAsset": { + "assetId": { + "guid": "{F2AD0EBF-7137-58D1-9991-9552FAD41B19}" + }, + "assetHint": "materials/presets/pbr/metal_mercury.azmaterial" + } + } + } + ] + } + } + }, + "Component_[8092226976542590265]": { + "$type": "EditorDisabledCompositionComponent", + "Id": 8092226976542590265 + } + } + }, + "Entity_[4482115168212]": { + "Id": "Entity_[4482115168212]", + "Name": "Entity1", + "Components": { + "Component_[11525365929370623807]": { + "$type": "EditorVisibilityComponent", + "Id": 11525365929370623807 + }, + "Component_[12334620273692642550]": { + "$type": "EditorLockComponent", + "Id": 12334620273692642550 + }, + "Component_[14389735759337977675]": { + "$type": "EditorPendingCompositionComponent", + "Id": 14389735759337977675 + }, + "Component_[16184381538555246534]": { + "$type": "AZ::Render::EditorMeshComponent", + "Id": 16184381538555246534, + "Controller": { + "Configuration": { + "ModelAsset": { + "assetId": { + "guid": "{E14975EF-E676-51A4-B826-3EF59CB645AA}", + "subId": 285127096 + }, + "assetHint": "testdata/objects/cube/cube.azmodel" + } + } + } + }, + "Component_[17962478023087084794]": { + "$type": "SelectionComponent", + "Id": 17962478023087084794 + }, + "Component_[18071675051915092508]": { + "$type": "EditorEntityIconComponent", + "Id": 18071675051915092508 + }, + "Component_[2115498007879087044]": { + "$type": "EditorInspectorComponent", + "Id": 2115498007879087044, + "ComponentOrderEntryArray": [ + { + "ComponentId": 399415038452606756 + }, + { + "ComponentId": 16184381538555246534, + "SortIndex": 1 + }, + { + "ComponentId": 7827190074535394331, + "SortIndex": 2 + } + ] + }, + "Component_[3518973002096080237]": { + "$type": "EditorOnlyEntityComponent", + "Id": 3518973002096080237 + }, + "Component_[399415038452606756]": { + "$type": "{27F1E1A1-8D9D-4C3B-BD3A-AFB9762449C0} TransformComponent", + "Id": 399415038452606756, + "Parent Entity": "ContainerEntity", + "Transform Data": { + "Translate": [ + -27.530563354492188, + -0.00018183141946792603, + 99.43339538574219 + ] + } + }, + "Component_[4564240319609068082]": { + "$type": "EditorEntitySortComponent", + "Id": 4564240319609068082 + }, + "Component_[7827190074535394331]": { + "$type": "EditorMaterialComponent", + "Id": 7827190074535394331, + "Controller": { + "Configuration": { + "materials": [ + { + "Key": { + "materialSlotStableId": 2418540911 + }, + "Value": { + "MaterialAsset": { + "assetId": { + "guid": "{E621C5BF-B8E1-55F0-A791-EC960F2FA46F}" + }, + "assetHint": "materials/presets/pbr/metal_copper.azmaterial" + } + } + } + ] + } + } + }, + "Component_[8092226976542590265]": { + "$type": "EditorDisabledCompositionComponent", + "Id": 8092226976542590265 + } + } + }, + "Entity_[4486410135508]": { + "Id": "Entity_[4486410135508]", + "Name": "Entity1", + "Components": { + "Component_[11525365929370623807]": { + "$type": "EditorVisibilityComponent", + "Id": 11525365929370623807 + }, + "Component_[12334620273692642550]": { + "$type": "EditorLockComponent", + "Id": 12334620273692642550 + }, + "Component_[14389735759337977675]": { + "$type": "EditorPendingCompositionComponent", + "Id": 14389735759337977675 + }, + "Component_[16184381538555246534]": { + "$type": "AZ::Render::EditorMeshComponent", + "Id": 16184381538555246534, + "Controller": { + "Configuration": { + "ModelAsset": { + "assetId": { + "guid": "{E14975EF-E676-51A4-B826-3EF59CB645AA}", + "subId": 285127096 + }, + "assetHint": "testdata/objects/cube/cube.azmodel" + } + } + } + }, + "Component_[17962478023087084794]": { + "$type": "SelectionComponent", + "Id": 17962478023087084794 + }, + "Component_[18071675051915092508]": { + "$type": "EditorEntityIconComponent", + "Id": 18071675051915092508 + }, + "Component_[2115498007879087044]": { + "$type": "EditorInspectorComponent", + "Id": 2115498007879087044, + "ComponentOrderEntryArray": [ + { + "ComponentId": 399415038452606756 + }, + { + "ComponentId": 16184381538555246534, + "SortIndex": 1 + }, + { + "ComponentId": 7827190074535394331, + "SortIndex": 2 + } + ] + }, + "Component_[3518973002096080237]": { + "$type": "EditorOnlyEntityComponent", + "Id": 3518973002096080237 + }, + "Component_[399415038452606756]": { + "$type": "{27F1E1A1-8D9D-4C3B-BD3A-AFB9762449C0} TransformComponent", + "Id": 399415038452606756, + "Parent Entity": "ContainerEntity", + "Transform Data": { + "Translate": [ + 47.53014373779297, + -0.00018183141946792603, + 89.95755767822266 + ] + } + }, + "Component_[4564240319609068082]": { + "$type": "EditorEntitySortComponent", + "Id": 4564240319609068082 + }, + "Component_[7827190074535394331]": { + "$type": "EditorMaterialComponent", + "Id": 7827190074535394331, + "Controller": { + "Configuration": { + "materials": [ + { + "Key": { + "materialSlotStableId": 2418540911 + }, + "Value": { + "MaterialAsset": { + "assetId": { + "guid": "{A7F03135-ECAD-5440-99DB-E84ABA3D50DA}" + }, + "assetHint": "materials/presets/pbr/metal_iron_polished.azmaterial" + } + } + } + ] + } + } + }, + "Component_[8092226976542590265]": { + "$type": "EditorDisabledCompositionComponent", + "Id": 8092226976542590265 + } + } + }, + "Entity_[4490705102804]": { + "Id": "Entity_[4490705102804]", + "Name": "Entity1", + "Components": { + "Component_[11525365929370623807]": { + "$type": "EditorVisibilityComponent", + "Id": 11525365929370623807 + }, + "Component_[12334620273692642550]": { + "$type": "EditorLockComponent", + "Id": 12334620273692642550 + }, + "Component_[14389735759337977675]": { + "$type": "EditorPendingCompositionComponent", + "Id": 14389735759337977675 + }, + "Component_[16184381538555246534]": { + "$type": "AZ::Render::EditorMeshComponent", + "Id": 16184381538555246534, + "Controller": { + "Configuration": { + "ModelAsset": { + "assetId": { + "guid": "{E14975EF-E676-51A4-B826-3EF59CB645AA}", + "subId": 285127096 + }, + "assetHint": "testdata/objects/cube/cube.azmodel" + } + } + } + }, + "Component_[17962478023087084794]": { + "$type": "SelectionComponent", + "Id": 17962478023087084794 + }, + "Component_[18071675051915092508]": { + "$type": "EditorEntityIconComponent", + "Id": 18071675051915092508 + }, + "Component_[2115498007879087044]": { + "$type": "EditorInspectorComponent", + "Id": 2115498007879087044, + "ComponentOrderEntryArray": [ + { + "ComponentId": 399415038452606756 + }, + { + "ComponentId": 16184381538555246534, + "SortIndex": 1 + }, + { + "ComponentId": 7827190074535394331, + "SortIndex": 2 + } + ] + }, + "Component_[3518973002096080237]": { + "$type": "EditorOnlyEntityComponent", + "Id": 3518973002096080237 + }, + "Component_[399415038452606756]": { + "$type": "{27F1E1A1-8D9D-4C3B-BD3A-AFB9762449C0} TransformComponent", + "Id": 399415038452606756, + "Parent Entity": "ContainerEntity", + "Transform Data": { + "Translate": [ + -47.53056335449219, + -0.00018183141946792603, + 54.618019104003906 + ] + } + }, + "Component_[4564240319609068082]": { + "$type": "EditorEntitySortComponent", + "Id": 4564240319609068082 + }, + "Component_[7827190074535394331]": { + "$type": "EditorMaterialComponent", + "Id": 7827190074535394331, + "Controller": { + "Configuration": { + "materials": [ + { + "Key": { + "materialSlotStableId": 2418540911 + }, + "Value": { + "MaterialAsset": { + "assetId": { + "guid": "{94CF2BD7-7D09-5577-B1D8-3FF85B15E127}" + }, + "assetHint": "materials/presets/pbr/metal_aluminum.azmaterial" + } + } + } + ] + } + } + }, + "Component_[8092226976542590265]": { + "$type": "EditorDisabledCompositionComponent", + "Id": 8092226976542590265 + } + } + }, + "Entity_[4495000070100]": { + "Id": "Entity_[4495000070100]", + "Name": "Entity1", + "Components": { + "Component_[11525365929370623807]": { + "$type": "EditorVisibilityComponent", + "Id": 11525365929370623807 + }, + "Component_[12334620273692642550]": { + "$type": "EditorLockComponent", + "Id": 12334620273692642550 + }, + "Component_[14389735759337977675]": { + "$type": "EditorPendingCompositionComponent", + "Id": 14389735759337977675 + }, + "Component_[16184381538555246534]": { + "$type": "AZ::Render::EditorMeshComponent", + "Id": 16184381538555246534, + "Controller": { + "Configuration": { + "ModelAsset": { + "assetId": { + "guid": "{E14975EF-E676-51A4-B826-3EF59CB645AA}", + "subId": 285127096 + }, + "assetHint": "testdata/objects/cube/cube.azmodel" + } + } + } + }, + "Component_[17962478023087084794]": { + "$type": "SelectionComponent", + "Id": 17962478023087084794 + }, + "Component_[18071675051915092508]": { + "$type": "EditorEntityIconComponent", + "Id": 18071675051915092508 + }, + "Component_[2115498007879087044]": { + "$type": "EditorInspectorComponent", + "Id": 2115498007879087044, + "ComponentOrderEntryArray": [ + { + "ComponentId": 399415038452606756 + }, + { + "ComponentId": 16184381538555246534, + "SortIndex": 1 + }, + { + "ComponentId": 7827190074535394331, + "SortIndex": 2 + } + ] + }, + "Component_[3518973002096080237]": { + "$type": "EditorOnlyEntityComponent", + "Id": 3518973002096080237 + }, + "Component_[399415038452606756]": { + "$type": "{27F1E1A1-8D9D-4C3B-BD3A-AFB9762449C0} TransformComponent", + "Id": 399415038452606756, + "Parent Entity": "ContainerEntity", + "Transform Data": { + "Translate": [ + 47.53014373779297, + -0.00018183141946792603, + 64.32462310791016 + ] + } + }, + "Component_[4564240319609068082]": { + "$type": "EditorEntitySortComponent", + "Id": 4564240319609068082 + }, + "Component_[7827190074535394331]": { + "$type": "EditorMaterialComponent", + "Id": 7827190074535394331, + "Controller": { + "Configuration": { + "materials": [ + { + "Key": { + "materialSlotStableId": 2418540911 + }, + "Value": { + "MaterialAsset": { + "assetId": { + "guid": "{970148AC-7258-5EC8-9CE7-F4EF93164D93}" + }, + "assetHint": "materials/presets/pbr/metal_iron_matte.azmaterial" + } + } + } + ] + } + } + }, + "Component_[8092226976542590265]": { + "$type": "EditorDisabledCompositionComponent", + "Id": 8092226976542590265 + } + } + }, + "Entity_[4499295037396]": { + "Id": "Entity_[4499295037396]", + "Name": "Entity1", + "Components": { + "Component_[11525365929370623807]": { + "$type": "EditorVisibilityComponent", + "Id": 11525365929370623807 + }, + "Component_[12334620273692642550]": { + "$type": "EditorLockComponent", + "Id": 12334620273692642550 + }, + "Component_[14389735759337977675]": { + "$type": "EditorPendingCompositionComponent", + "Id": 14389735759337977675 + }, + "Component_[16184381538555246534]": { + "$type": "AZ::Render::EditorMeshComponent", + "Id": 16184381538555246534, + "Controller": { + "Configuration": { + "ModelAsset": { + "assetId": { + "guid": "{E14975EF-E676-51A4-B826-3EF59CB645AA}", + "subId": 285127096 + }, + "assetHint": "testdata/objects/cube/cube.azmodel" + } + } + } + }, + "Component_[17962478023087084794]": { + "$type": "SelectionComponent", + "Id": 17962478023087084794 + }, + "Component_[18071675051915092508]": { + "$type": "EditorEntityIconComponent", + "Id": 18071675051915092508 + }, + "Component_[2115498007879087044]": { + "$type": "EditorInspectorComponent", + "Id": 2115498007879087044, + "ComponentOrderEntryArray": [ + { + "ComponentId": 399415038452606756 + }, + { + "ComponentId": 16184381538555246534, + "SortIndex": 1 + }, + { + "ComponentId": 7827190074535394331, + "SortIndex": 2 + } + ] + }, + "Component_[3518973002096080237]": { + "$type": "EditorOnlyEntityComponent", + "Id": 3518973002096080237 + }, + "Component_[399415038452606756]": { + "$type": "{27F1E1A1-8D9D-4C3B-BD3A-AFB9762449C0} TransformComponent", + "Id": 399415038452606756, + "Parent Entity": "ContainerEntity", + "Transform Data": { + "Translate": [ + 7.530143737792969, + -0.00018183141946792603, + 79.38228607177734 + ] + } + }, + "Component_[4564240319609068082]": { + "$type": "EditorEntitySortComponent", + "Id": 4564240319609068082 + }, + "Component_[7827190074535394331]": { + "$type": "EditorMaterialComponent", + "Id": 7827190074535394331, + "Controller": { + "Configuration": { + "materials": [ + { + "Key": { + "materialSlotStableId": 2418540911 + }, + "Value": { + "MaterialAsset": { + "assetId": { + "guid": "{E54E46E7-9FA3-54D7-B5F8-8DCCDF17BC24}" + }, + "assetHint": "materials/presets/pbr/metal_silver_matte.azmaterial" + } + } + } + ] + } + } + }, + "Component_[8092226976542590265]": { + "$type": "EditorDisabledCompositionComponent", + "Id": 8092226976542590265 + } + } + }, + "Entity_[4503590004692]": { + "Id": "Entity_[4503590004692]", + "Name": "Entity1", + "Components": { + "Component_[11525365929370623807]": { + "$type": "EditorVisibilityComponent", + "Id": 11525365929370623807 + }, + "Component_[12334620273692642550]": { + "$type": "EditorLockComponent", + "Id": 12334620273692642550 + }, + "Component_[14389735759337977675]": { + "$type": "EditorPendingCompositionComponent", + "Id": 14389735759337977675 + }, + "Component_[16184381538555246534]": { + "$type": "AZ::Render::EditorMeshComponent", + "Id": 16184381538555246534, + "Controller": { + "Configuration": { + "ModelAsset": { + "assetId": { + "guid": "{E14975EF-E676-51A4-B826-3EF59CB645AA}", + "subId": 285127096 + }, + "assetHint": "testdata/objects/cube/cube.azmodel" + } + } + } + }, + "Component_[17962478023087084794]": { + "$type": "SelectionComponent", + "Id": 17962478023087084794 + }, + "Component_[18071675051915092508]": { + "$type": "EditorEntityIconComponent", + "Id": 18071675051915092508 + }, + "Component_[2115498007879087044]": { + "$type": "EditorInspectorComponent", + "Id": 2115498007879087044, + "ComponentOrderEntryArray": [ + { + "ComponentId": 399415038452606756 + }, + { + "ComponentId": 16184381538555246534, + "SortIndex": 1 + }, + { + "ComponentId": 7827190074535394331, + "SortIndex": 2 + } + ] + }, + "Component_[3518973002096080237]": { + "$type": "EditorOnlyEntityComponent", + "Id": 3518973002096080237 + }, + "Component_[399415038452606756]": { + "$type": "{27F1E1A1-8D9D-4C3B-BD3A-AFB9762449C0} TransformComponent", + "Id": 399415038452606756, + "Parent Entity": "ContainerEntity", + "Transform Data": { + "Translate": [ + 7.530143737792969, + -0.00018183141946792603, + 54.618019104003906 + ] + } + }, + "Component_[4564240319609068082]": { + "$type": "EditorEntitySortComponent", + "Id": 4564240319609068082 + }, + "Component_[7827190074535394331]": { + "$type": "EditorMaterialComponent", + "Id": 7827190074535394331, + "Controller": { + "Configuration": { + "materials": [ + { + "Key": { + "materialSlotStableId": 2418540911 + }, + "Value": { + "MaterialAsset": { + "assetId": { + "guid": "{CDA13277-5EAB-5E2A-93F5-B7003597FBCE}" + }, + "assetHint": "materials/presets/pbr/metal_silver.azmaterial" + } + } + } + ] + } + } + }, + "Component_[8092226976542590265]": { + "$type": "EditorDisabledCompositionComponent", + "Id": 8092226976542590265 + } + } + }, + "Entity_[4507884971988]": { + "Id": "Entity_[4507884971988]", + "Name": "Entity1", + "Components": { + "Component_[11525365929370623807]": { + "$type": "EditorVisibilityComponent", + "Id": 11525365929370623807 + }, + "Component_[12334620273692642550]": { + "$type": "EditorLockComponent", + "Id": 12334620273692642550 + }, + "Component_[14389735759337977675]": { + "$type": "EditorPendingCompositionComponent", + "Id": 14389735759337977675 + }, + "Component_[16184381538555246534]": { + "$type": "AZ::Render::EditorMeshComponent", + "Id": 16184381538555246534, + "Controller": { + "Configuration": { + "ModelAsset": { + "assetId": { + "guid": "{E14975EF-E676-51A4-B826-3EF59CB645AA}", + "subId": 285127096 + }, + "assetHint": "testdata/objects/cube/cube.azmodel" + } + } + } + }, + "Component_[17962478023087084794]": { + "$type": "SelectionComponent", + "Id": 17962478023087084794 + }, + "Component_[18071675051915092508]": { + "$type": "EditorEntityIconComponent", + "Id": 18071675051915092508 + }, + "Component_[2115498007879087044]": { + "$type": "EditorInspectorComponent", + "Id": 2115498007879087044, + "ComponentOrderEntryArray": [ + { + "ComponentId": 399415038452606756 + }, + { + "ComponentId": 16184381538555246534, + "SortIndex": 1 + }, + { + "ComponentId": 7827190074535394331, + "SortIndex": 2 + } + ] + }, + "Component_[3518973002096080237]": { + "$type": "EditorOnlyEntityComponent", + "Id": 3518973002096080237 + }, + "Component_[399415038452606756]": { + "$type": "{27F1E1A1-8D9D-4C3B-BD3A-AFB9762449C0} TransformComponent", + "Id": 399415038452606756, + "Parent Entity": "ContainerEntity", + "Transform Data": { + "Translate": [ + -42.53056335449219, + -0.00018183141946792603, + 109.46680450439453 + ] + } + }, + "Component_[4564240319609068082]": { + "$type": "EditorEntitySortComponent", + "Id": 4564240319609068082 + }, + "Component_[7827190074535394331]": { + "$type": "EditorMaterialComponent", + "Id": 7827190074535394331, + "Controller": { + "Configuration": { + "materials": [ + { + "Key": { + "materialSlotStableId": 2418540911 + }, + "Value": { + "MaterialAsset": { + "assetId": { + "guid": "{AE350D9F-0000-526D-B49C-4303D687BB86}" + }, + "assetHint": "materials/presets/pbr/metal_brass_matte.azmaterial" + } + } + } + ] + } + } + }, + "Component_[8092226976542590265]": { + "$type": "EditorDisabledCompositionComponent", + "Id": 8092226976542590265 + } + } + }, + "Entity_[4512179939284]": { + "Id": "Entity_[4512179939284]", + "Name": "Entity1", + "Components": { + "Component_[11525365929370623807]": { + "$type": "EditorVisibilityComponent", + "Id": 11525365929370623807 + }, + "Component_[12334620273692642550]": { + "$type": "EditorLockComponent", + "Id": 12334620273692642550 + }, + "Component_[14389735759337977675]": { + "$type": "EditorPendingCompositionComponent", + "Id": 14389735759337977675 + }, + "Component_[16184381538555246534]": { + "$type": "AZ::Render::EditorMeshComponent", + "Id": 16184381538555246534, + "Controller": { + "Configuration": { + "ModelAsset": { + "assetId": { + "guid": "{E14975EF-E676-51A4-B826-3EF59CB645AA}", + "subId": 285127096 + }, + "assetHint": "testdata/objects/cube/cube.azmodel" + } + } + } + }, + "Component_[17962478023087084794]": { + "$type": "SelectionComponent", + "Id": 17962478023087084794 + }, + "Component_[18071675051915092508]": { + "$type": "EditorEntityIconComponent", + "Id": 18071675051915092508 + }, + "Component_[2115498007879087044]": { + "$type": "EditorInspectorComponent", + "Id": 2115498007879087044, + "ComponentOrderEntryArray": [ + { + "ComponentId": 399415038452606756 + }, + { + "ComponentId": 16184381538555246534, + "SortIndex": 1 + }, + { + "ComponentId": 7827190074535394331, + "SortIndex": 2 + } + ] + }, + "Component_[3518973002096080237]": { + "$type": "EditorOnlyEntityComponent", + "Id": 3518973002096080237 + }, + "Component_[399415038452606756]": { + "$type": "{27F1E1A1-8D9D-4C3B-BD3A-AFB9762449C0} TransformComponent", + "Id": 399415038452606756, + "Parent Entity": "ContainerEntity", + "Transform Data": { + "Translate": [ + -17.530563354492188, + -0.00018183141946792603, + 45.14218521118164 + ] + } + }, + "Component_[4564240319609068082]": { + "$type": "EditorEntitySortComponent", + "Id": 4564240319609068082 + }, + "Component_[7827190074535394331]": { + "$type": "EditorMaterialComponent", + "Id": 7827190074535394331, + "Controller": { + "Configuration": { + "materials": [ + { + "Key": { + "materialSlotStableId": 2418540911 + }, + "Value": { + "MaterialAsset": { + "assetId": { + "guid": "{A7F03135-ECAD-5440-99DB-E84ABA3D50DA}" + }, + "assetHint": "materials/presets/pbr/metal_iron_polished.azmaterial" + } + } + } + ] + } + } + }, + "Component_[8092226976542590265]": { + "$type": "EditorDisabledCompositionComponent", + "Id": 8092226976542590265 + } + } + }, + "Entity_[4516474906580]": { + "Id": "Entity_[4516474906580]", + "Name": "Entity1", + "Components": { + "Component_[11525365929370623807]": { + "$type": "EditorVisibilityComponent", + "Id": 11525365929370623807 + }, + "Component_[12334620273692642550]": { + "$type": "EditorLockComponent", + "Id": 12334620273692642550 + }, + "Component_[14389735759337977675]": { + "$type": "EditorPendingCompositionComponent", + "Id": 14389735759337977675 + }, + "Component_[16184381538555246534]": { + "$type": "AZ::Render::EditorMeshComponent", + "Id": 16184381538555246534, + "Controller": { + "Configuration": { + "ModelAsset": { + "assetId": { + "guid": "{E14975EF-E676-51A4-B826-3EF59CB645AA}", + "subId": 285127096 + }, + "assetHint": "testdata/objects/cube/cube.azmodel" + } + } + } + }, + "Component_[17962478023087084794]": { + "$type": "SelectionComponent", + "Id": 17962478023087084794 + }, + "Component_[18071675051915092508]": { + "$type": "EditorEntityIconComponent", + "Id": 18071675051915092508 + }, + "Component_[2115498007879087044]": { + "$type": "EditorInspectorComponent", + "Id": 2115498007879087044, + "ComponentOrderEntryArray": [ + { + "ComponentId": 399415038452606756 + }, + { + "ComponentId": 16184381538555246534, + "SortIndex": 1 + }, + { + "ComponentId": 7827190074535394331, + "SortIndex": 2 + } + ] + }, + "Component_[3518973002096080237]": { + "$type": "EditorOnlyEntityComponent", + "Id": 3518973002096080237 + }, + "Component_[399415038452606756]": { + "$type": "{27F1E1A1-8D9D-4C3B-BD3A-AFB9762449C0} TransformComponent", + "Id": 399415038452606756, + "Parent Entity": "ContainerEntity", + "Transform Data": { + "Translate": [ + 42.53014373779297, + -0.00018183141946792603, + 99.43339538574219 + ] + } + }, + "Component_[4564240319609068082]": { + "$type": "EditorEntitySortComponent", + "Id": 4564240319609068082 + }, + "Component_[7827190074535394331]": { + "$type": "EditorMaterialComponent", + "Id": 7827190074535394331, + "Controller": { + "Configuration": { + "materials": [ + { + "Key": { + "materialSlotStableId": 2418540911 + }, + "Value": { + "MaterialAsset": { + "assetId": { + "guid": "{FE52E7C8-064D-506A-9C26-433EB93747DE}" + }, + "assetHint": "materials/presets/pbr/metal_gold.azmaterial" + } + } + } + ] + } + } + }, + "Component_[8092226976542590265]": { + "$type": "EditorDisabledCompositionComponent", + "Id": 8092226976542590265 + } + } + }, + "Entity_[4520769873876]": { + "Id": "Entity_[4520769873876]", + "Name": "Entity1", + "Components": { + "Component_[11525365929370623807]": { + "$type": "EditorVisibilityComponent", + "Id": 11525365929370623807 + }, + "Component_[12334620273692642550]": { + "$type": "EditorLockComponent", + "Id": 12334620273692642550 + }, + "Component_[14389735759337977675]": { + "$type": "EditorPendingCompositionComponent", + "Id": 14389735759337977675 + }, + "Component_[16184381538555246534]": { + "$type": "AZ::Render::EditorMeshComponent", + "Id": 16184381538555246534, + "Controller": { + "Configuration": { + "ModelAsset": { + "assetId": { + "guid": "{E14975EF-E676-51A4-B826-3EF59CB645AA}", + "subId": 285127096 + }, + "assetHint": "testdata/objects/cube/cube.azmodel" + } + } + } + }, + "Component_[17962478023087084794]": { + "$type": "SelectionComponent", + "Id": 17962478023087084794 + }, + "Component_[18071675051915092508]": { + "$type": "EditorEntityIconComponent", + "Id": 18071675051915092508 + }, + "Component_[2115498007879087044]": { + "$type": "EditorInspectorComponent", + "Id": 2115498007879087044, + "ComponentOrderEntryArray": [ + { + "ComponentId": 399415038452606756 + }, + { + "ComponentId": 16184381538555246534, + "SortIndex": 1 + }, + { + "ComponentId": 7827190074535394331, + "SortIndex": 2 + } + ] + }, + "Component_[3518973002096080237]": { + "$type": "EditorOnlyEntityComponent", + "Id": 3518973002096080237 + }, + "Component_[399415038452606756]": { + "$type": "{27F1E1A1-8D9D-4C3B-BD3A-AFB9762449C0} TransformComponent", + "Id": 399415038452606756, + "Parent Entity": "ContainerEntity", + "Transform Data": { + "Translate": [ + -27.530563354492188, + -0.00018183141946792603, + 45.14218521118164 + ] + } + }, + "Component_[4564240319609068082]": { + "$type": "EditorEntitySortComponent", + "Id": 4564240319609068082 + }, + "Component_[7827190074535394331]": { + "$type": "EditorMaterialComponent", + "Id": 7827190074535394331, + "Controller": { + "Configuration": { + "materials": [ + { + "Key": { + "materialSlotStableId": 2418540911 + }, + "Value": { + "MaterialAsset": { + "assetId": { + "guid": "{CF5C7B01-4912-58AE-991A-F25251E505AC}" + }, + "assetHint": "materials/presets/pbr/metal_copper_polished.azmaterial" + } + } + } + ] + } + } + }, + "Component_[8092226976542590265]": { + "$type": "EditorDisabledCompositionComponent", + "Id": 8092226976542590265 + } + } + }, + "Entity_[4525064841172]": { + "Id": "Entity_[4525064841172]", + "Name": "Entity1", + "Components": { + "Component_[11525365929370623807]": { + "$type": "EditorVisibilityComponent", + "Id": 11525365929370623807 + }, + "Component_[12334620273692642550]": { + "$type": "EditorLockComponent", + "Id": 12334620273692642550 + }, + "Component_[14389735759337977675]": { + "$type": "EditorPendingCompositionComponent", + "Id": 14389735759337977675 + }, + "Component_[16184381538555246534]": { + "$type": "AZ::Render::EditorMeshComponent", + "Id": 16184381538555246534, + "Controller": { + "Configuration": { + "ModelAsset": { + "assetId": { + "guid": "{E14975EF-E676-51A4-B826-3EF59CB645AA}", + "subId": 285127096 + }, + "assetHint": "testdata/objects/cube/cube.azmodel" + } + } + } + }, + "Component_[17962478023087084794]": { + "$type": "SelectionComponent", + "Id": 17962478023087084794 + }, + "Component_[18071675051915092508]": { + "$type": "EditorEntityIconComponent", + "Id": 18071675051915092508 + }, + "Component_[2115498007879087044]": { + "$type": "EditorInspectorComponent", + "Id": 2115498007879087044, + "ComponentOrderEntryArray": [ + { + "ComponentId": 399415038452606756 + }, + { + "ComponentId": 16184381538555246534, + "SortIndex": 1 + }, + { + "ComponentId": 7827190074535394331, + "SortIndex": 2 + } + ] + }, + "Component_[3518973002096080237]": { + "$type": "EditorOnlyEntityComponent", + "Id": 3518973002096080237 + }, + "Component_[399415038452606756]": { + "$type": "{27F1E1A1-8D9D-4C3B-BD3A-AFB9762449C0} TransformComponent", + "Id": 399415038452606756, + "Parent Entity": "ContainerEntity", + "Transform Data": { + "Translate": [ + 2.5301437377929688, + -0.00018183141946792603, + 69.34888458251953 + ] + } + }, + "Component_[4564240319609068082]": { + "$type": "EditorEntitySortComponent", + "Id": 4564240319609068082 + }, + "Component_[7827190074535394331]": { + "$type": "EditorMaterialComponent", + "Id": 7827190074535394331, + "Controller": { + "Configuration": { + "materials": [ + { + "Key": { + "materialSlotStableId": 2418540911 + }, + "Value": { + "MaterialAsset": { + "assetId": { + "guid": "{E23FC75B-4142-55F1-B9AE-884826E7EB23}" + }, + "assetHint": "materials/presets/pbr/metal_platinum.azmaterial" + } + } + } + ] + } + } + }, + "Component_[8092226976542590265]": { + "$type": "EditorDisabledCompositionComponent", + "Id": 8092226976542590265 + } + } + }, + "Entity_[4529359808468]": { + "Id": "Entity_[4529359808468]", + "Name": "Entity1", + "Components": { + "Component_[1057179753323467068]": { + "$type": "EditorMaterialComponent", + "Id": 1057179753323467068, + "Controller": { + "Configuration": { + "materials": [ + { + "Key": { + "materialSlotStableId": 2418540911 + }, + "Value": { + "MaterialAsset": { + "assetId": { + "guid": "{3F0DF0C4-5F23-5EB1-B762-7344AFFDC011}" + }, + "assetHint": "materials/presets/pbr/metal_titanium_polished.azmaterial" + } + } + } + ] + } + } + }, + "Component_[11525365929370623807]": { + "$type": "EditorVisibilityComponent", + "Id": 11525365929370623807 + }, + "Component_[12334620273692642550]": { + "$type": "EditorLockComponent", + "Id": 12334620273692642550 + }, + "Component_[14389735759337977675]": { + "$type": "EditorPendingCompositionComponent", + "Id": 14389735759337977675 + }, + "Component_[16184381538555246534]": { + "$type": "AZ::Render::EditorMeshComponent", + "Id": 16184381538555246534, + "Controller": { + "Configuration": { + "ModelAsset": { + "assetId": { + "guid": "{E14975EF-E676-51A4-B826-3EF59CB645AA}", + "subId": 285127096 + }, + "assetHint": "testdata/objects/cube/cube.azmodel" + } + } + } + }, + "Component_[17962478023087084794]": { + "$type": "SelectionComponent", + "Id": 17962478023087084794 + }, + "Component_[18071675051915092508]": { + "$type": "EditorEntityIconComponent", + "Id": 18071675051915092508 + }, + "Component_[2115498007879087044]": { + "$type": "EditorInspectorComponent", + "Id": 2115498007879087044, + "ComponentOrderEntryArray": [ + { + "ComponentId": 399415038452606756 + }, + { + "ComponentId": 16184381538555246534, + "SortIndex": 1 + }, + { + "ComponentId": 1057179753323467068, + "SortIndex": 2 + } + ] + }, + "Component_[3518973002096080237]": { + "$type": "EditorOnlyEntityComponent", + "Id": 3518973002096080237 + }, + "Component_[399415038452606756]": { + "$type": "{27F1E1A1-8D9D-4C3B-BD3A-AFB9762449C0} TransformComponent", + "Id": 399415038452606756, + "Parent Entity": "ContainerEntity", + "Transform Data": { + "Translate": [ + 12.530143737792969, + -0.00018183141946792603, + 59.873046875 + ] + } + }, + "Component_[4564240319609068082]": { + "$type": "EditorEntitySortComponent", + "Id": 4564240319609068082 + }, + "Component_[8092226976542590265]": { + "$type": "EditorDisabledCompositionComponent", + "Id": 8092226976542590265 + } + } + }, + "Entity_[4533654775764]": { + "Id": "Entity_[4533654775764]", + "Name": "Entity1", + "Components": { + "Component_[11525365929370623807]": { + "$type": "EditorVisibilityComponent", + "Id": 11525365929370623807 + }, + "Component_[12334620273692642550]": { + "$type": "EditorLockComponent", + "Id": 12334620273692642550 + }, + "Component_[14389735759337977675]": { + "$type": "EditorPendingCompositionComponent", + "Id": 14389735759337977675 + }, + "Component_[16184381538555246534]": { + "$type": "AZ::Render::EditorMeshComponent", + "Id": 16184381538555246534, + "Controller": { + "Configuration": { + "ModelAsset": { + "assetId": { + "guid": "{E14975EF-E676-51A4-B826-3EF59CB645AA}", + "subId": 285127096 + }, + "assetHint": "testdata/objects/cube/cube.azmodel" + } + } + } + }, + "Component_[17962478023087084794]": { + "$type": "SelectionComponent", + "Id": 17962478023087084794 + }, + "Component_[18071675051915092508]": { + "$type": "EditorEntityIconComponent", + "Id": 18071675051915092508 + }, + "Component_[2115498007879087044]": { + "$type": "EditorInspectorComponent", + "Id": 2115498007879087044, + "ComponentOrderEntryArray": [ + { + "ComponentId": 399415038452606756 + }, + { + "ComponentId": 16184381538555246534, + "SortIndex": 1 + }, + { + "ComponentId": 7827190074535394331, + "SortIndex": 2 + } + ] + }, + "Component_[3518973002096080237]": { + "$type": "EditorOnlyEntityComponent", + "Id": 3518973002096080237 + }, + "Component_[399415038452606756]": { + "$type": "{27F1E1A1-8D9D-4C3B-BD3A-AFB9762449C0} TransformComponent", + "Id": 399415038452606756, + "Parent Entity": "ContainerEntity", + "Transform Data": { + "Translate": [ + -42.53056335449219, + -0.00018183141946792603, + 99.43339538574219 + ] + } + }, + "Component_[4564240319609068082]": { + "$type": "EditorEntitySortComponent", + "Id": 4564240319609068082 + }, + "Component_[7827190074535394331]": { + "$type": "EditorMaterialComponent", + "Id": 7827190074535394331, + "Controller": { + "Configuration": { + "materials": [ + { + "Key": { + "materialSlotStableId": 2418540911 + }, + "Value": { + "MaterialAsset": { + "assetId": { + "guid": "{80E0F2A7-1EE4-597F-80EF-985C65BCE2EB}" + }, + "assetHint": "materials/presets/pbr/metal_brass.azmaterial" + } + } + } + ] + } + } + }, + "Component_[8092226976542590265]": { + "$type": "EditorDisabledCompositionComponent", + "Id": 8092226976542590265 + } + } + }, + "Entity_[4537949743060]": { + "Id": "Entity_[4537949743060]", + "Name": "Entity1", + "Components": { + "Component_[11525365929370623807]": { + "$type": "EditorVisibilityComponent", + "Id": 11525365929370623807 + }, + "Component_[12334620273692642550]": { + "$type": "EditorLockComponent", + "Id": 12334620273692642550 + }, + "Component_[14389735759337977675]": { + "$type": "EditorPendingCompositionComponent", + "Id": 14389735759337977675 + }, + "Component_[16184381538555246534]": { + "$type": "AZ::Render::EditorMeshComponent", + "Id": 16184381538555246534, + "Controller": { + "Configuration": { + "ModelAsset": { + "assetId": { + "guid": "{E14975EF-E676-51A4-B826-3EF59CB645AA}", + "subId": 285127096 + }, + "assetHint": "testdata/objects/cube/cube.azmodel" + } + } + } + }, + "Component_[17962478023087084794]": { + "$type": "SelectionComponent", + "Id": 17962478023087084794 + }, + "Component_[18071675051915092508]": { + "$type": "EditorEntityIconComponent", + "Id": 18071675051915092508 + }, + "Component_[2115498007879087044]": { + "$type": "EditorInspectorComponent", + "Id": 2115498007879087044, + "ComponentOrderEntryArray": [ + { + "ComponentId": 399415038452606756 + }, + { + "ComponentId": 16184381538555246534, + "SortIndex": 1 + }, + { + "ComponentId": 7827190074535394331, + "SortIndex": 2 + } + ] + }, + "Component_[3518973002096080237]": { + "$type": "EditorOnlyEntityComponent", + "Id": 3518973002096080237 + }, + "Component_[399415038452606756]": { + "$type": "{27F1E1A1-8D9D-4C3B-BD3A-AFB9762449C0} TransformComponent", + "Id": 399415038452606756, + "Parent Entity": "ContainerEntity", + "Transform Data": { + "Translate": [ + 27.53014373779297, + -0.00018183141946792603, + 30.08451271057129 + ] + } + }, + "Component_[4564240319609068082]": { + "$type": "EditorEntitySortComponent", + "Id": 4564240319609068082 + }, + "Component_[7827190074535394331]": { + "$type": "EditorMaterialComponent", + "Id": 7827190074535394331, + "Controller": { + "Configuration": { + "materials": [ + { + "Key": { + "materialSlotStableId": 2418540911 + }, + "Value": { + "MaterialAsset": { + "assetId": { + "guid": "{CAF50181-3384-5DF2-9304-C6E48E83C72D}" + }, + "assetHint": "materials/presets/pbr/metal_chrome_polished.azmaterial" + } + } + } + ] + } + } + }, + "Component_[8092226976542590265]": { + "$type": "EditorDisabledCompositionComponent", + "Id": 8092226976542590265 + } + } + }, + "Entity_[4542244710356]": { + "Id": "Entity_[4542244710356]", + "Name": "Entity1", + "Components": { + "Component_[11525365929370623807]": { + "$type": "EditorVisibilityComponent", + "Id": 11525365929370623807 + }, + "Component_[12334620273692642550]": { + "$type": "EditorLockComponent", + "Id": 12334620273692642550 + }, + "Component_[14389735759337977675]": { + "$type": "EditorPendingCompositionComponent", + "Id": 14389735759337977675 + }, + "Component_[16184381538555246534]": { + "$type": "AZ::Render::EditorMeshComponent", + "Id": 16184381538555246534, + "Controller": { + "Configuration": { + "ModelAsset": { + "assetId": { + "guid": "{E14975EF-E676-51A4-B826-3EF59CB645AA}", + "subId": 285127096 + }, + "assetHint": "testdata/objects/cube/cube.azmodel" + } + } + } + }, + "Component_[17962478023087084794]": { + "$type": "SelectionComponent", + "Id": 17962478023087084794 + }, + "Component_[18071675051915092508]": { + "$type": "EditorEntityIconComponent", + "Id": 18071675051915092508 + }, + "Component_[2115498007879087044]": { + "$type": "EditorInspectorComponent", + "Id": 2115498007879087044, + "ComponentOrderEntryArray": [ + { + "ComponentId": 399415038452606756 + }, + { + "ComponentId": 16184381538555246534, + "SortIndex": 1 + }, + { + "ComponentId": 7827190074535394331, + "SortIndex": 2 + } + ] + }, + "Component_[3518973002096080237]": { + "$type": "EditorOnlyEntityComponent", + "Id": 3518973002096080237 + }, + "Component_[399415038452606756]": { + "$type": "{27F1E1A1-8D9D-4C3B-BD3A-AFB9762449C0} TransformComponent", + "Id": 399415038452606756, + "Parent Entity": "ContainerEntity", + "Transform Data": { + "Translate": [ + 17.53014373779297, + -0.00018183141946792603, + 54.618019104003906 + ] + } + }, + "Component_[4564240319609068082]": { + "$type": "EditorEntitySortComponent", + "Id": 4564240319609068082 + }, + "Component_[7827190074535394331]": { + "$type": "EditorMaterialComponent", + "Id": 7827190074535394331, + "Controller": { + "Configuration": { + "materials": [ + { + "Key": {}, + "Value": { + "MaterialAsset": { + "assetId": { + "guid": "{721188E0-B7CC-5D06-8D5D-39AF8ABF2EF9}" + }, + "assetHint": "materials/presets/pbr/metal_titanium.azmaterial" + } + } + }, + { + "Key": { + "materialSlotStableId": 2418540911 + }, + "Value": { + "MaterialAsset": { + "assetId": { + "guid": "{94CF2BD7-7D09-5577-B1D8-3FF85B15E127}" + }, + "assetHint": "materials/presets/pbr/metal_aluminum.azmaterial" + } + } + } + ] + } + } + }, + "Component_[8092226976542590265]": { + "$type": "EditorDisabledCompositionComponent", + "Id": 8092226976542590265 + } + } + }, + "Entity_[4546539677652]": { + "Id": "Entity_[4546539677652]", + "Name": "Entity1", + "Components": { + "Component_[11525365929370623807]": { + "$type": "EditorVisibilityComponent", + "Id": 11525365929370623807 + }, + "Component_[12334620273692642550]": { + "$type": "EditorLockComponent", + "Id": 12334620273692642550 + }, + "Component_[14389735759337977675]": { + "$type": "EditorPendingCompositionComponent", + "Id": 14389735759337977675 + }, + "Component_[16184381538555246534]": { + "$type": "AZ::Render::EditorMeshComponent", + "Id": 16184381538555246534, + "Controller": { + "Configuration": { + "ModelAsset": { + "assetId": { + "guid": "{E14975EF-E676-51A4-B826-3EF59CB645AA}", + "subId": 285127096 + }, + "assetHint": "testdata/objects/cube/cube.azmodel" + } + } + } + }, + "Component_[17962478023087084794]": { + "$type": "SelectionComponent", + "Id": 17962478023087084794 + }, + "Component_[18071675051915092508]": { + "$type": "EditorEntityIconComponent", + "Id": 18071675051915092508 + }, + "Component_[2115498007879087044]": { + "$type": "EditorInspectorComponent", + "Id": 2115498007879087044, + "ComponentOrderEntryArray": [ + { + "ComponentId": 399415038452606756 + }, + { + "ComponentId": 16184381538555246534, + "SortIndex": 1 + }, + { + "ComponentId": 7827190074535394331, + "SortIndex": 2 + } + ] + }, + "Component_[3518973002096080237]": { + "$type": "EditorOnlyEntityComponent", + "Id": 3518973002096080237 + }, + "Component_[399415038452606756]": { + "$type": "{27F1E1A1-8D9D-4C3B-BD3A-AFB9762449C0} TransformComponent", + "Id": 399415038452606756, + "Parent Entity": "ContainerEntity", + "Transform Data": { + "Translate": [ + 27.53014373779297, + -0.00018183141946792603, + 114.4910659790039 + ] + } + }, + "Component_[4564240319609068082]": { + "$type": "EditorEntitySortComponent", + "Id": 4564240319609068082 + }, + "Component_[7827190074535394331]": { + "$type": "EditorMaterialComponent", + "Id": 7827190074535394331, + "Controller": { + "Configuration": { + "materials": [ + { + "Key": { + "materialSlotStableId": 2418540911 + }, + "Value": { + "MaterialAsset": { + "assetId": { + "guid": "{B7C712DC-4839-58BB-B522-A4F120084CF5}" + }, + "assetHint": "materials/presets/pbr/metal_chrome.azmaterial" + } + } + } + ] + } + } + }, + "Component_[8092226976542590265]": { + "$type": "EditorDisabledCompositionComponent", + "Id": 8092226976542590265 + } + } + }, + "Entity_[4550834644948]": { + "Id": "Entity_[4550834644948]", + "Name": "Entity1", + "Components": { + "Component_[11525365929370623807]": { + "$type": "EditorVisibilityComponent", + "Id": 11525365929370623807 + }, + "Component_[12334620273692642550]": { + "$type": "EditorLockComponent", + "Id": 12334620273692642550 + }, + "Component_[14389735759337977675]": { + "$type": "EditorPendingCompositionComponent", + "Id": 14389735759337977675 + }, + "Component_[16184381538555246534]": { + "$type": "AZ::Render::EditorMeshComponent", + "Id": 16184381538555246534, + "Controller": { + "Configuration": { + "ModelAsset": { + "assetId": { + "guid": "{E14975EF-E676-51A4-B826-3EF59CB645AA}", + "subId": 285127096 + }, + "assetHint": "testdata/objects/cube/cube.azmodel" + } + } + } + }, + "Component_[17962478023087084794]": { + "$type": "SelectionComponent", + "Id": 17962478023087084794 + }, + "Component_[18071675051915092508]": { + "$type": "EditorEntityIconComponent", + "Id": 18071675051915092508 + }, + "Component_[2115498007879087044]": { + "$type": "EditorInspectorComponent", + "Id": 2115498007879087044, + "ComponentOrderEntryArray": [ + { + "ComponentId": 399415038452606756 + }, + { + "ComponentId": 16184381538555246534, + "SortIndex": 1 + }, + { + "ComponentId": 7827190074535394331, + "SortIndex": 2 + } + ] + }, + "Component_[3518973002096080237]": { + "$type": "EditorOnlyEntityComponent", + "Id": 3518973002096080237 + }, + "Component_[399415038452606756]": { + "$type": "{27F1E1A1-8D9D-4C3B-BD3A-AFB9762449C0} TransformComponent", + "Id": 399415038452606756, + "Parent Entity": "ContainerEntity", + "Transform Data": { + "Translate": [ + 17.53014373779297, + -0.00018183141946792603, + 39.56034851074219 + ] + } + }, + "Component_[4564240319609068082]": { + "$type": "EditorEntitySortComponent", + "Id": 4564240319609068082 + }, + "Component_[7827190074535394331]": { + "$type": "EditorMaterialComponent", + "Id": 7827190074535394331, + "Controller": { + "Configuration": { + "materials": [ + { + "Key": {}, + "Value": { + "MaterialAsset": { + "assetId": { + "guid": "{721188E0-B7CC-5D06-8D5D-39AF8ABF2EF9}" + }, + "assetHint": "materials/presets/pbr/metal_titanium.azmaterial" + } + } + }, + { + "Key": { + "materialSlotStableId": 2418540911 + }, + "Value": { + "MaterialAsset": { + "assetId": { + "guid": "{94CF2BD7-7D09-5577-B1D8-3FF85B15E127}" + }, + "assetHint": "materials/presets/pbr/metal_aluminum.azmaterial" + } + } + } + ] + } + } + }, + "Component_[8092226976542590265]": { + "$type": "EditorDisabledCompositionComponent", + "Id": 8092226976542590265 + } + } + }, + "Entity_[4555129612244]": { + "Id": "Entity_[4555129612244]", + "Name": "Entity1", + "Components": { + "Component_[11525365929370623807]": { + "$type": "EditorVisibilityComponent", + "Id": 11525365929370623807 + }, + "Component_[12334620273692642550]": { + "$type": "EditorLockComponent", + "Id": 12334620273692642550 + }, + "Component_[14389735759337977675]": { + "$type": "EditorPendingCompositionComponent", + "Id": 14389735759337977675 + }, + "Component_[16184381538555246534]": { + "$type": "AZ::Render::EditorMeshComponent", + "Id": 16184381538555246534, + "Controller": { + "Configuration": { + "ModelAsset": { + "assetId": { + "guid": "{E14975EF-E676-51A4-B826-3EF59CB645AA}", + "subId": 285127096 + }, + "assetHint": "testdata/objects/cube/cube.azmodel" + } + } + } + }, + "Component_[17962478023087084794]": { + "$type": "SelectionComponent", + "Id": 17962478023087084794 + }, + "Component_[18071675051915092508]": { + "$type": "EditorEntityIconComponent", + "Id": 18071675051915092508 + }, + "Component_[2115498007879087044]": { + "$type": "EditorInspectorComponent", + "Id": 2115498007879087044, + "ComponentOrderEntryArray": [ + { + "ComponentId": 399415038452606756 + }, + { + "ComponentId": 16184381538555246534, + "SortIndex": 1 + }, + { + "ComponentId": 7827190074535394331, + "SortIndex": 2 + } + ] + }, + "Component_[3518973002096080237]": { + "$type": "EditorOnlyEntityComponent", + "Id": 3518973002096080237 + }, + "Component_[399415038452606756]": { + "$type": "{27F1E1A1-8D9D-4C3B-BD3A-AFB9762449C0} TransformComponent", + "Id": 399415038452606756, + "Parent Entity": "ContainerEntity", + "Transform Data": { + "Translate": [ + -12.530563354492188, + -0.00018183141946792603, + 105.0152359008789 + ] + } + }, + "Component_[4564240319609068082]": { + "$type": "EditorEntitySortComponent", + "Id": 4564240319609068082 + }, + "Component_[7827190074535394331]": { + "$type": "EditorMaterialComponent", + "Id": 7827190074535394331, + "Controller": { + "Configuration": { + "materials": [ + { + "Key": { + "materialSlotStableId": 2418540911 + }, + "Value": { + "MaterialAsset": { + "assetId": { + "guid": "{F2AD0EBF-7137-58D1-9991-9552FAD41B19}" + }, + "assetHint": "materials/presets/pbr/metal_mercury.azmaterial" + } + } + } + ] + } + } + }, + "Component_[8092226976542590265]": { + "$type": "EditorDisabledCompositionComponent", + "Id": 8092226976542590265 + } + } + }, + "Entity_[4559424579540]": { + "Id": "Entity_[4559424579540]", + "Name": "Entity1", + "Components": { + "Component_[11525365929370623807]": { + "$type": "EditorVisibilityComponent", + "Id": 11525365929370623807 + }, + "Component_[12334620273692642550]": { + "$type": "EditorLockComponent", + "Id": 12334620273692642550 + }, + "Component_[14389735759337977675]": { + "$type": "EditorPendingCompositionComponent", + "Id": 14389735759337977675 + }, + "Component_[16184381538555246534]": { + "$type": "AZ::Render::EditorMeshComponent", + "Id": 16184381538555246534, + "Controller": { + "Configuration": { + "ModelAsset": { + "assetId": { + "guid": "{E14975EF-E676-51A4-B826-3EF59CB645AA}", + "subId": 285127096 + }, + "assetHint": "testdata/objects/cube/cube.azmodel" + } + } + } + }, + "Component_[17962478023087084794]": { + "$type": "SelectionComponent", + "Id": 17962478023087084794 + }, + "Component_[18071675051915092508]": { + "$type": "EditorEntityIconComponent", + "Id": 18071675051915092508 + }, + "Component_[2115498007879087044]": { + "$type": "EditorInspectorComponent", + "Id": 2115498007879087044, + "ComponentOrderEntryArray": [ + { + "ComponentId": 399415038452606756 + }, + { + "ComponentId": 16184381538555246534, + "SortIndex": 1 + }, + { + "ComponentId": 7827190074535394331, + "SortIndex": 2 + } + ] + }, + "Component_[3518973002096080237]": { + "$type": "EditorOnlyEntityComponent", + "Id": 3518973002096080237 + }, + "Component_[399415038452606756]": { + "$type": "{27F1E1A1-8D9D-4C3B-BD3A-AFB9762449C0} TransformComponent", + "Id": 399415038452606756, + "Parent Entity": "ContainerEntity", + "Transform Data": { + "Translate": [ + -42.53056335449219, + -0.00018183141946792603, + 39.56034851074219 + ] + } + }, + "Component_[4564240319609068082]": { + "$type": "EditorEntitySortComponent", + "Id": 4564240319609068082 + }, + "Component_[7827190074535394331]": { + "$type": "EditorMaterialComponent", + "Id": 7827190074535394331, + "Controller": { + "Configuration": { + "materials": [ + { + "Key": { + "materialSlotStableId": 2418540911 + }, + "Value": { + "MaterialAsset": { + "assetId": { + "guid": "{80E0F2A7-1EE4-597F-80EF-985C65BCE2EB}" + }, + "assetHint": "materials/presets/pbr/metal_brass.azmaterial" + } + } + } + ] + } + } + }, + "Component_[8092226976542590265]": { + "$type": "EditorDisabledCompositionComponent", + "Id": 8092226976542590265 + } + } + }, + "Entity_[4563719546836]": { + "Id": "Entity_[4563719546836]", + "Name": "Entity1", + "Components": { + "Component_[11525365929370623807]": { + "$type": "EditorVisibilityComponent", + "Id": 11525365929370623807 + }, + "Component_[12334620273692642550]": { + "$type": "EditorLockComponent", + "Id": 12334620273692642550 + }, + "Component_[14389735759337977675]": { + "$type": "EditorPendingCompositionComponent", + "Id": 14389735759337977675 + }, + "Component_[16184381538555246534]": { + "$type": "AZ::Render::EditorMeshComponent", + "Id": 16184381538555246534, + "Controller": { + "Configuration": { + "ModelAsset": { + "assetId": { + "guid": "{E14975EF-E676-51A4-B826-3EF59CB645AA}", + "subId": 285127096 + }, + "assetHint": "testdata/objects/cube/cube.azmodel" + } + } + } + }, + "Component_[17962478023087084794]": { + "$type": "SelectionComponent", + "Id": 17962478023087084794 + }, + "Component_[18071675051915092508]": { + "$type": "EditorEntityIconComponent", + "Id": 18071675051915092508 + }, + "Component_[2115498007879087044]": { + "$type": "EditorInspectorComponent", + "Id": 2115498007879087044, + "ComponentOrderEntryArray": [ + { + "ComponentId": 399415038452606756 + }, + { + "ComponentId": 16184381538555246534, + "SortIndex": 1 + }, + { + "ComponentId": 7827190074535394331, + "SortIndex": 2 + } + ] + }, + "Component_[3518973002096080237]": { + "$type": "EditorOnlyEntityComponent", + "Id": 3518973002096080237 + }, + "Component_[399415038452606756]": { + "$type": "{27F1E1A1-8D9D-4C3B-BD3A-AFB9762449C0} TransformComponent", + "Id": 399415038452606756, + "Parent Entity": "ContainerEntity", + "Transform Data": { + "Translate": [ + 22.53014373779297, + -0.00018183141946792603, + 105.0152359008789 + ] + } + }, + "Component_[4564240319609068082]": { + "$type": "EditorEntitySortComponent", + "Id": 4564240319609068082 + }, + "Component_[7827190074535394331]": { + "$type": "EditorMaterialComponent", + "Id": 7827190074535394331, + "Controller": { + "Configuration": { + "materials": [ + { + "Key": { + "materialSlotStableId": 2418540911 + }, + "Value": { + "MaterialAsset": { + "assetId": { + "guid": "{FC69F2F8-F73B-5A0C-B8B7-94BAA45780FC}" + }, + "assetHint": "materials/presets/pbr/metal_brass_polished.azmaterial" + } + } + } + ] + } + } + }, + "Component_[8092226976542590265]": { + "$type": "EditorDisabledCompositionComponent", + "Id": 8092226976542590265 + } + } + }, + "Entity_[4568014514132]": { + "Id": "Entity_[4568014514132]", + "Name": "Entity1", + "Components": { + "Component_[11525365929370623807]": { + "$type": "EditorVisibilityComponent", + "Id": 11525365929370623807 + }, + "Component_[12334620273692642550]": { + "$type": "EditorLockComponent", + "Id": 12334620273692642550 + }, + "Component_[14389735759337977675]": { + "$type": "EditorPendingCompositionComponent", + "Id": 14389735759337977675 + }, + "Component_[16184381538555246534]": { + "$type": "AZ::Render::EditorMeshComponent", + "Id": 16184381538555246534, + "Controller": { + "Configuration": { + "ModelAsset": { + "assetId": { + "guid": "{E14975EF-E676-51A4-B826-3EF59CB645AA}", + "subId": 285127096 + }, + "assetHint": "testdata/objects/cube/cube.azmodel" + } + } + } + }, + "Component_[17962478023087084794]": { + "$type": "SelectionComponent", + "Id": 17962478023087084794 + }, + "Component_[18071675051915092508]": { + "$type": "EditorEntityIconComponent", + "Id": 18071675051915092508 + }, + "Component_[2115498007879087044]": { + "$type": "EditorInspectorComponent", + "Id": 2115498007879087044, + "ComponentOrderEntryArray": [ + { + "ComponentId": 399415038452606756 + }, + { + "ComponentId": 16184381538555246534, + "SortIndex": 1 + }, + { + "ComponentId": 7827190074535394331, + "SortIndex": 2 + } + ] + }, + "Component_[3518973002096080237]": { + "$type": "EditorOnlyEntityComponent", + "Id": 3518973002096080237 + }, + "Component_[399415038452606756]": { + "$type": "{27F1E1A1-8D9D-4C3B-BD3A-AFB9762449C0} TransformComponent", + "Id": 399415038452606756, + "Parent Entity": "ContainerEntity", + "Transform Data": { + "Translate": [ + -42.53056335449219, + -0.00018183141946792603, + 9.475835800170898 + ] + } + }, + "Component_[4564240319609068082]": { + "$type": "EditorEntitySortComponent", + "Id": 4564240319609068082 + }, + "Component_[7827190074535394331]": { + "$type": "EditorMaterialComponent", + "Id": 7827190074535394331, + "Controller": { + "Configuration": { + "materials": [ + { + "Key": { + "materialSlotStableId": 2418540911 + }, + "Value": { + "MaterialAsset": { + "assetId": { + "guid": "{80E0F2A7-1EE4-597F-80EF-985C65BCE2EB}" + }, + "assetHint": "materials/presets/pbr/metal_brass.azmaterial" + } + } + } + ] + } + } + }, + "Component_[8092226976542590265]": { + "$type": "EditorDisabledCompositionComponent", + "Id": 8092226976542590265 + } + } + }, + "Entity_[4572309481428]": { + "Id": "Entity_[4572309481428]", + "Name": "Entity1", + "Components": { + "Component_[11525365929370623807]": { + "$type": "EditorVisibilityComponent", + "Id": 11525365929370623807 + }, + "Component_[12334620273692642550]": { + "$type": "EditorLockComponent", + "Id": 12334620273692642550 + }, + "Component_[14389735759337977675]": { + "$type": "EditorPendingCompositionComponent", + "Id": 14389735759337977675 + }, + "Component_[16184381538555246534]": { + "$type": "AZ::Render::EditorMeshComponent", + "Id": 16184381538555246534, + "Controller": { + "Configuration": { + "ModelAsset": { + "assetId": { + "guid": "{E14975EF-E676-51A4-B826-3EF59CB645AA}", + "subId": 285127096 + }, + "assetHint": "testdata/objects/cube/cube.azmodel" + } + } + } + }, + "Component_[17962478023087084794]": { + "$type": "SelectionComponent", + "Id": 17962478023087084794 + }, + "Component_[18071675051915092508]": { + "$type": "EditorEntityIconComponent", + "Id": 18071675051915092508 + }, + "Component_[2115498007879087044]": { + "$type": "EditorInspectorComponent", + "Id": 2115498007879087044, + "ComponentOrderEntryArray": [ + { + "ComponentId": 399415038452606756 + }, + { + "ComponentId": 16184381538555246534, + "SortIndex": 1 + }, + { + "ComponentId": 7827190074535394331, + "SortIndex": 2 + } + ] + }, + "Component_[3518973002096080237]": { + "$type": "EditorOnlyEntityComponent", + "Id": 3518973002096080237 + }, + "Component_[399415038452606756]": { + "$type": "{27F1E1A1-8D9D-4C3B-BD3A-AFB9762449C0} TransformComponent", + "Id": 399415038452606756, + "Parent Entity": "ContainerEntity", + "Transform Data": { + "Translate": [ + -7.5305633544921875, + -0.00018183141946792603, + 84.40655517578125 + ] + } + }, + "Component_[4564240319609068082]": { + "$type": "EditorEntitySortComponent", + "Id": 4564240319609068082 + }, + "Component_[7827190074535394331]": { + "$type": "EditorMaterialComponent", + "Id": 7827190074535394331, + "Controller": { + "Configuration": { + "materials": [ + { + "Key": { + "materialSlotStableId": 2418540911 + }, + "Value": { + "MaterialAsset": { + "assetId": { + "guid": "{DD1E26AE-80FB-5DB6-8786-26D438190A38}" + }, + "assetHint": "materials/presets/pbr/metal_nickel.azmaterial" + } + } + } + ] + } + } + }, + "Component_[8092226976542590265]": { + "$type": "EditorDisabledCompositionComponent", + "Id": 8092226976542590265 + } + } + }, + "Entity_[4576604448724]": { + "Id": "Entity_[4576604448724]", + "Name": "Entity1", + "Components": { + "Component_[11525365929370623807]": { + "$type": "EditorVisibilityComponent", + "Id": 11525365929370623807 + }, + "Component_[12334620273692642550]": { + "$type": "EditorLockComponent", + "Id": 12334620273692642550 + }, + "Component_[14389735759337977675]": { + "$type": "EditorPendingCompositionComponent", + "Id": 14389735759337977675 + }, + "Component_[16184381538555246534]": { + "$type": "AZ::Render::EditorMeshComponent", + "Id": 16184381538555246534, + "Controller": { + "Configuration": { + "ModelAsset": { + "assetId": { + "guid": "{E14975EF-E676-51A4-B826-3EF59CB645AA}", + "subId": 285127096 + }, + "assetHint": "testdata/objects/cube/cube.azmodel" + } + } + } + }, + "Component_[17962478023087084794]": { + "$type": "SelectionComponent", + "Id": 17962478023087084794 + }, + "Component_[18071675051915092508]": { + "$type": "EditorEntityIconComponent", + "Id": 18071675051915092508 + }, + "Component_[2115498007879087044]": { + "$type": "EditorInspectorComponent", + "Id": 2115498007879087044, + "ComponentOrderEntryArray": [ + { + "ComponentId": 399415038452606756 + }, + { + "ComponentId": 16184381538555246534, + "SortIndex": 1 + }, + { + "ComponentId": 7827190074535394331, + "SortIndex": 2 + } + ] + }, + "Component_[3518973002096080237]": { + "$type": "EditorOnlyEntityComponent", + "Id": 3518973002096080237 + }, + "Component_[399415038452606756]": { + "$type": "{27F1E1A1-8D9D-4C3B-BD3A-AFB9762449C0} TransformComponent", + "Id": 399415038452606756, + "Parent Entity": "ContainerEntity", + "Transform Data": { + "Translate": [ + -37.53056335449219, + -0.00018183141946792603, + 0.0 + ] + } + }, + "Component_[4564240319609068082]": { + "$type": "EditorEntitySortComponent", + "Id": 4564240319609068082 + }, + "Component_[7827190074535394331]": { + "$type": "EditorMaterialComponent", + "Id": 7827190074535394331, + "Controller": { + "Configuration": { + "materials": [ + { + "Key": { + "materialSlotStableId": 2418540911 + }, + "Value": { + "MaterialAsset": { + "assetId": { + "guid": "{CAF50181-3384-5DF2-9304-C6E48E83C72D}" + }, + "assetHint": "materials/presets/pbr/metal_chrome_polished.azmaterial" + } + } + } + ] + } + } + }, + "Component_[8092226976542590265]": { + "$type": "EditorDisabledCompositionComponent", + "Id": 8092226976542590265 + } + } + }, + "Entity_[4580899416020]": { + "Id": "Entity_[4580899416020]", + "Name": "Entity1", + "Components": { + "Component_[11525365929370623807]": { + "$type": "EditorVisibilityComponent", + "Id": 11525365929370623807 + }, + "Component_[12334620273692642550]": { + "$type": "EditorLockComponent", + "Id": 12334620273692642550 + }, + "Component_[14389735759337977675]": { + "$type": "EditorPendingCompositionComponent", + "Id": 14389735759337977675 + }, + "Component_[16184381538555246534]": { + "$type": "AZ::Render::EditorMeshComponent", + "Id": 16184381538555246534, + "Controller": { + "Configuration": { + "ModelAsset": { + "assetId": { + "guid": "{E14975EF-E676-51A4-B826-3EF59CB645AA}", + "subId": 285127096 + }, + "assetHint": "testdata/objects/cube/cube.azmodel" + } + } + } + }, + "Component_[17962478023087084794]": { + "$type": "SelectionComponent", + "Id": 17962478023087084794 + }, + "Component_[18071675051915092508]": { + "$type": "EditorEntityIconComponent", + "Id": 18071675051915092508 + }, + "Component_[2115498007879087044]": { + "$type": "EditorInspectorComponent", + "Id": 2115498007879087044, + "ComponentOrderEntryArray": [ + { + "ComponentId": 399415038452606756 + }, + { + "ComponentId": 16184381538555246534, + "SortIndex": 1 + }, + { + "ComponentId": 7827190074535394331, + "SortIndex": 2 + } + ] + }, + "Component_[3518973002096080237]": { + "$type": "EditorOnlyEntityComponent", + "Id": 3518973002096080237 + }, + "Component_[399415038452606756]": { + "$type": "{27F1E1A1-8D9D-4C3B-BD3A-AFB9762449C0} TransformComponent", + "Id": 399415038452606756, + "Parent Entity": "ContainerEntity", + "Transform Data": { + "Translate": [ + -2.5305633544921875, + -0.00018183141946792603, + 105.0152359008789 + ] + } + }, + "Component_[4564240319609068082]": { + "$type": "EditorEntitySortComponent", + "Id": 4564240319609068082 + }, + "Component_[7827190074535394331]": { + "$type": "EditorMaterialComponent", + "Id": 7827190074535394331, + "Controller": { + "Configuration": { + "materials": [ + { + "Key": { + "materialSlotStableId": 2418540911 + }, + "Value": { + "MaterialAsset": { + "assetId": { + "guid": "{D0E9960A-4B31-5136-BAC6-5482B203D3B4}" + }, + "assetHint": "materials/presets/pbr/metal_palladium_polished.azmaterial" + } + } + } + ] + } + } + }, + "Component_[8092226976542590265]": { + "$type": "EditorDisabledCompositionComponent", + "Id": 8092226976542590265 + } + } + }, + "Entity_[4585194383316]": { + "Id": "Entity_[4585194383316]", + "Name": "Entity1", + "Components": { + "Component_[11525365929370623807]": { + "$type": "EditorVisibilityComponent", + "Id": 11525365929370623807 + }, + "Component_[12334620273692642550]": { + "$type": "EditorLockComponent", + "Id": 12334620273692642550 + }, + "Component_[14389735759337977675]": { + "$type": "EditorPendingCompositionComponent", + "Id": 14389735759337977675 + }, + "Component_[16184381538555246534]": { + "$type": "AZ::Render::EditorMeshComponent", + "Id": 16184381538555246534, + "Controller": { + "Configuration": { + "ModelAsset": { + "assetId": { + "guid": "{E14975EF-E676-51A4-B826-3EF59CB645AA}", + "subId": 285127096 + }, + "assetHint": "testdata/objects/cube/cube.azmodel" + } + } + } + }, + "Component_[17962478023087084794]": { + "$type": "SelectionComponent", + "Id": 17962478023087084794 + }, + "Component_[18071675051915092508]": { + "$type": "EditorEntityIconComponent", + "Id": 18071675051915092508 + }, + "Component_[2115498007879087044]": { + "$type": "EditorInspectorComponent", + "Id": 2115498007879087044, + "ComponentOrderEntryArray": [ + { + "ComponentId": 399415038452606756 + }, + { + "ComponentId": 16184381538555246534, + "SortIndex": 1 + }, + { + "ComponentId": 7827190074535394331, + "SortIndex": 2 + } + ] + }, + "Component_[3518973002096080237]": { + "$type": "EditorOnlyEntityComponent", + "Id": 3518973002096080237 + }, + "Component_[399415038452606756]": { + "$type": "{27F1E1A1-8D9D-4C3B-BD3A-AFB9762449C0} TransformComponent", + "Id": 399415038452606756, + "Parent Entity": "ContainerEntity", + "Transform Data": { + "Translate": [ + -12.530563354492188, + -0.00018183141946792603, + 89.95755767822266 + ] + } + }, + "Component_[4564240319609068082]": { + "$type": "EditorEntitySortComponent", + "Id": 4564240319609068082 + }, + "Component_[7827190074535394331]": { + "$type": "EditorMaterialComponent", + "Id": 7827190074535394331, + "Controller": { + "Configuration": { + "materials": [ + { + "Key": { + "materialSlotStableId": 2418540911 + }, + "Value": { + "MaterialAsset": { + "assetId": { + "guid": "{F2AD0EBF-7137-58D1-9991-9552FAD41B19}" + }, + "assetHint": "materials/presets/pbr/metal_mercury.azmaterial" + } + } + } + ] + } + } + }, + "Component_[8092226976542590265]": { + "$type": "EditorDisabledCompositionComponent", + "Id": 8092226976542590265 + } + } + }, + "Entity_[4589489350612]": { + "Id": "Entity_[4589489350612]", + "Name": "Entity1", + "Components": { + "Component_[11525365929370623807]": { + "$type": "EditorVisibilityComponent", + "Id": 11525365929370623807 + }, + "Component_[12334620273692642550]": { + "$type": "EditorLockComponent", + "Id": 12334620273692642550 + }, + "Component_[14389735759337977675]": { + "$type": "EditorPendingCompositionComponent", + "Id": 14389735759337977675 + }, + "Component_[16184381538555246534]": { + "$type": "AZ::Render::EditorMeshComponent", + "Id": 16184381538555246534, + "Controller": { + "Configuration": { + "ModelAsset": { + "assetId": { + "guid": "{E14975EF-E676-51A4-B826-3EF59CB645AA}", + "subId": 285127096 + }, + "assetHint": "testdata/objects/cube/cube.azmodel" + } + } + } + }, + "Component_[17962478023087084794]": { + "$type": "SelectionComponent", + "Id": 17962478023087084794 + }, + "Component_[18071675051915092508]": { + "$type": "EditorEntityIconComponent", + "Id": 18071675051915092508 + }, + "Component_[2115498007879087044]": { + "$type": "EditorInspectorComponent", + "Id": 2115498007879087044, + "ComponentOrderEntryArray": [ + { + "ComponentId": 399415038452606756 + }, + { + "ComponentId": 16184381538555246534, + "SortIndex": 1 + }, + { + "ComponentId": 7827190074535394331, + "SortIndex": 2 + } + ] + }, + "Component_[3518973002096080237]": { + "$type": "EditorOnlyEntityComponent", + "Id": 3518973002096080237 + }, + "Component_[399415038452606756]": { + "$type": "{27F1E1A1-8D9D-4C3B-BD3A-AFB9762449C0} TransformComponent", + "Id": 399415038452606756, + "Parent Entity": "ContainerEntity", + "Transform Data": { + "Translate": [ + -22.530563354492188, + -0.00018183141946792603, + 89.95755767822266 + ] + } + }, + "Component_[4564240319609068082]": { + "$type": "EditorEntitySortComponent", + "Id": 4564240319609068082 + }, + "Component_[7827190074535394331]": { + "$type": "EditorMaterialComponent", + "Id": 7827190074535394331, + "Controller": { + "Configuration": { + "materials": [ + { + "Key": { + "materialSlotStableId": 2418540911 + }, + "Value": { + "MaterialAsset": { + "assetId": { + "guid": "{FB4657EB-FB3A-5EC3-A772-DC36D6F733C3}" + }, + "assetHint": "materials/presets/pbr/metal_gold_polished.azmaterial" + } + } + } + ] + } + } + }, + "Component_[8092226976542590265]": { + "$type": "EditorDisabledCompositionComponent", + "Id": 8092226976542590265 + } + } + }, + "Entity_[4593784317908]": { + "Id": "Entity_[4593784317908]", + "Name": "Entity1", + "Components": { + "Component_[11525365929370623807]": { + "$type": "EditorVisibilityComponent", + "Id": 11525365929370623807 + }, + "Component_[12334620273692642550]": { + "$type": "EditorLockComponent", + "Id": 12334620273692642550 + }, + "Component_[14389735759337977675]": { + "$type": "EditorPendingCompositionComponent", + "Id": 14389735759337977675 + }, + "Component_[16184381538555246534]": { + "$type": "AZ::Render::EditorMeshComponent", + "Id": 16184381538555246534, + "Controller": { + "Configuration": { + "ModelAsset": { + "assetId": { + "guid": "{E14975EF-E676-51A4-B826-3EF59CB645AA}", + "subId": 285127096 + }, + "assetHint": "testdata/objects/cube/cube.azmodel" + } + } + } + }, + "Component_[17962478023087084794]": { + "$type": "SelectionComponent", + "Id": 17962478023087084794 + }, + "Component_[18071675051915092508]": { + "$type": "EditorEntityIconComponent", + "Id": 18071675051915092508 + }, + "Component_[2115498007879087044]": { + "$type": "EditorInspectorComponent", + "Id": 2115498007879087044, + "ComponentOrderEntryArray": [ + { + "ComponentId": 399415038452606756 + }, + { + "ComponentId": 16184381538555246534, + "SortIndex": 1 + }, + { + "ComponentId": 7827190074535394331, + "SortIndex": 2 + } + ] + }, + "Component_[3518973002096080237]": { + "$type": "EditorOnlyEntityComponent", + "Id": 3518973002096080237 + }, + "Component_[399415038452606756]": { + "$type": "{27F1E1A1-8D9D-4C3B-BD3A-AFB9762449C0} TransformComponent", + "Id": 399415038452606756, + "Parent Entity": "ContainerEntity", + "Transform Data": { + "Translate": [ + -17.530563354492188, + -0.00018183141946792603, + 84.40655517578125 + ] + } + }, + "Component_[4564240319609068082]": { + "$type": "EditorEntitySortComponent", + "Id": 4564240319609068082 + }, + "Component_[7827190074535394331]": { + "$type": "EditorMaterialComponent", + "Id": 7827190074535394331, + "Controller": { + "Configuration": { + "materials": [ + { + "Key": { + "materialSlotStableId": 2418540911 + }, + "Value": { + "MaterialAsset": { + "assetId": { + "guid": "{892EA944-0325-5FA6-94D7-4AB4FC02A0F5}" + }, + "assetHint": "materials/presets/pbr/metal_iron.azmaterial" + } + } + } + ] + } + } + }, + "Component_[8092226976542590265]": { + "$type": "EditorDisabledCompositionComponent", + "Id": 8092226976542590265 + } + } + }, + "Entity_[4598079285204]": { + "Id": "Entity_[4598079285204]", + "Name": "Entity1", + "Components": { + "Component_[11525365929370623807]": { + "$type": "EditorVisibilityComponent", + "Id": 11525365929370623807 + }, + "Component_[12334620273692642550]": { + "$type": "EditorLockComponent", + "Id": 12334620273692642550 + }, + "Component_[14389735759337977675]": { + "$type": "EditorPendingCompositionComponent", + "Id": 14389735759337977675 + }, + "Component_[16184381538555246534]": { + "$type": "AZ::Render::EditorMeshComponent", + "Id": 16184381538555246534, + "Controller": { + "Configuration": { + "ModelAsset": { + "assetId": { + "guid": "{E14975EF-E676-51A4-B826-3EF59CB645AA}", + "subId": 285127096 + }, + "assetHint": "testdata/objects/cube/cube.azmodel" + } + } + } + }, + "Component_[17962478023087084794]": { + "$type": "SelectionComponent", + "Id": 17962478023087084794 + }, + "Component_[18071675051915092508]": { + "$type": "EditorEntityIconComponent", + "Id": 18071675051915092508 + }, + "Component_[2115498007879087044]": { + "$type": "EditorInspectorComponent", + "Id": 2115498007879087044, + "ComponentOrderEntryArray": [ + { + "ComponentId": 399415038452606756 + }, + { + "ComponentId": 16184381538555246534, + "SortIndex": 1 + }, + { + "ComponentId": 7827190074535394331, + "SortIndex": 2 + } + ] + }, + "Component_[3518973002096080237]": { + "$type": "EditorOnlyEntityComponent", + "Id": 3518973002096080237 + }, + "Component_[399415038452606756]": { + "$type": "{27F1E1A1-8D9D-4C3B-BD3A-AFB9762449C0} TransformComponent", + "Id": 399415038452606756, + "Parent Entity": "ContainerEntity", + "Transform Data": { + "Translate": [ + 47.53014373779297, + -0.00018183141946792603, + 30.08451271057129 + ] + } + }, + "Component_[4564240319609068082]": { + "$type": "EditorEntitySortComponent", + "Id": 4564240319609068082 + }, + "Component_[7827190074535394331]": { + "$type": "EditorMaterialComponent", + "Id": 7827190074535394331, + "Controller": { + "Configuration": { + "materials": [ + { + "Key": { + "materialSlotStableId": 2418540911 + }, + "Value": { + "MaterialAsset": { + "assetId": { + "guid": "{A7F03135-ECAD-5440-99DB-E84ABA3D50DA}" + }, + "assetHint": "materials/presets/pbr/metal_iron_polished.azmaterial" + } + } + } + ] + } + } + }, + "Component_[8092226976542590265]": { + "$type": "EditorDisabledCompositionComponent", + "Id": 8092226976542590265 + } + } + }, + "Entity_[479205648340]": { + "Id": "Entity_[479205648340]", + "Name": "Entity1", + "Components": { + "Component_[11525365929370623807]": { + "$type": "EditorVisibilityComponent", + "Id": 11525365929370623807 + }, + "Component_[12334620273692642550]": { + "$type": "EditorLockComponent", + "Id": 12334620273692642550 + }, + "Component_[14389735759337977675]": { + "$type": "EditorPendingCompositionComponent", + "Id": 14389735759337977675 + }, + "Component_[16184381538555246534]": { + "$type": "AZ::Render::EditorMeshComponent", + "Id": 16184381538555246534, + "Controller": { + "Configuration": { + "ModelAsset": { + "assetId": { + "guid": "{E14975EF-E676-51A4-B826-3EF59CB645AA}", + "subId": 285127096 + }, + "assetHint": "testdata/objects/cube/cube.azmodel" + } + } + } + }, + "Component_[17962478023087084794]": { + "$type": "SelectionComponent", + "Id": 17962478023087084794 + }, + "Component_[18071675051915092508]": { + "$type": "EditorEntityIconComponent", + "Id": 18071675051915092508 + }, + "Component_[2115498007879087044]": { + "$type": "EditorInspectorComponent", + "Id": 2115498007879087044, + "ComponentOrderEntryArray": [ + { + "ComponentId": 399415038452606756 + }, + { + "ComponentId": 16184381538555246534, + "SortIndex": 1 + }, + { + "ComponentId": 7827190074535394331, + "SortIndex": 2 + } + ] + }, + "Component_[3518973002096080237]": { + "$type": "EditorOnlyEntityComponent", + "Id": 3518973002096080237 + }, + "Component_[399415038452606756]": { + "$type": "{27F1E1A1-8D9D-4C3B-BD3A-AFB9762449C0} TransformComponent", + "Id": 399415038452606756, + "Parent Entity": "ContainerEntity", + "Transform Data": { + "Translate": [ + -2.5305633544921875, + -0.00018183141946792603, + 74.93071746826172 + ] + } + }, + "Component_[4564240319609068082]": { + "$type": "EditorEntitySortComponent", + "Id": 4564240319609068082 + }, + "Component_[7827190074535394331]": { + "$type": "EditorMaterialComponent", + "Id": 7827190074535394331, + "Controller": { + "Configuration": { + "materials": [ + { + "Key": { + "materialSlotStableId": 2418540911 + }, + "Value": { + "MaterialAsset": { + "assetId": { + "guid": "{D0E9960A-4B31-5136-BAC6-5482B203D3B4}" + }, + "assetHint": "materials/presets/pbr/metal_palladium_polished.azmaterial" + } + } + } + ] + } + } + }, + "Component_[8092226976542590265]": { + "$type": "EditorDisabledCompositionComponent", + "Id": 8092226976542590265 + } + } + }, + "Entity_[483500615636]": { + "Id": "Entity_[483500615636]", + "Name": "Entity1", + "Components": { + "Component_[11525365929370623807]": { + "$type": "EditorVisibilityComponent", + "Id": 11525365929370623807 + }, + "Component_[12334620273692642550]": { + "$type": "EditorLockComponent", + "Id": 12334620273692642550 + }, + "Component_[14389735759337977675]": { + "$type": "EditorPendingCompositionComponent", + "Id": 14389735759337977675 + }, + "Component_[16184381538555246534]": { + "$type": "AZ::Render::EditorMeshComponent", + "Id": 16184381538555246534, + "Controller": { + "Configuration": { + "ModelAsset": { + "assetId": { + "guid": "{E14975EF-E676-51A4-B826-3EF59CB645AA}", + "subId": 285127096 + }, + "assetHint": "testdata/objects/cube/cube.azmodel" + } + } + } + }, + "Component_[17962478023087084794]": { + "$type": "SelectionComponent", + "Id": 17962478023087084794 + }, + "Component_[18071675051915092508]": { + "$type": "EditorEntityIconComponent", + "Id": 18071675051915092508 + }, + "Component_[2115498007879087044]": { + "$type": "EditorInspectorComponent", + "Id": 2115498007879087044, + "ComponentOrderEntryArray": [ + { + "ComponentId": 399415038452606756 + }, + { + "ComponentId": 16184381538555246534, + "SortIndex": 1 + }, + { + "ComponentId": 7827190074535394331, + "SortIndex": 2 + } + ] + }, + "Component_[3518973002096080237]": { + "$type": "EditorOnlyEntityComponent", + "Id": 3518973002096080237 + }, + "Component_[399415038452606756]": { + "$type": "{27F1E1A1-8D9D-4C3B-BD3A-AFB9762449C0} TransformComponent", + "Id": 399415038452606756, + "Parent Entity": "ContainerEntity", + "Transform Data": { + "Translate": [ + -2.5305633544921875, + -0.00018183141946792603, + 69.34888458251953 + ] + } + }, + "Component_[4564240319609068082]": { + "$type": "EditorEntitySortComponent", + "Id": 4564240319609068082 + }, + "Component_[7827190074535394331]": { + "$type": "EditorMaterialComponent", + "Id": 7827190074535394331, + "Controller": { + "Configuration": { + "materials": [ + { + "Key": { + "materialSlotStableId": 2418540911 + }, + "Value": { + "MaterialAsset": { + "assetId": { + "guid": "{DC0598ED-1EDD-5B37-892E-E0867621D74C}" + }, + "assetHint": "materials/presets/pbr/metal_palladium.azmaterial" + } + } + } + ] + } + } + }, + "Component_[8092226976542590265]": { + "$type": "EditorDisabledCompositionComponent", + "Id": 8092226976542590265 + } + } + }, + "Entity_[487795582932]": { + "Id": "Entity_[487795582932]", + "Name": "Entity1", + "Components": { + "Component_[11525365929370623807]": { + "$type": "EditorVisibilityComponent", + "Id": 11525365929370623807 + }, + "Component_[12334620273692642550]": { + "$type": "EditorLockComponent", + "Id": 12334620273692642550 + }, + "Component_[14389735759337977675]": { + "$type": "EditorPendingCompositionComponent", + "Id": 14389735759337977675 + }, + "Component_[16184381538555246534]": { + "$type": "AZ::Render::EditorMeshComponent", + "Id": 16184381538555246534, + "Controller": { + "Configuration": { + "ModelAsset": { + "assetId": { + "guid": "{E14975EF-E676-51A4-B826-3EF59CB645AA}", + "subId": 285127096 + }, + "assetHint": "testdata/objects/cube/cube.azmodel" + } + } + } + }, + "Component_[17962478023087084794]": { + "$type": "SelectionComponent", + "Id": 17962478023087084794 + }, + "Component_[18071675051915092508]": { + "$type": "EditorEntityIconComponent", + "Id": 18071675051915092508 + }, + "Component_[2115498007879087044]": { + "$type": "EditorInspectorComponent", + "Id": 2115498007879087044, + "ComponentOrderEntryArray": [ + { + "ComponentId": 399415038452606756 + }, + { + "ComponentId": 16184381538555246534, + "SortIndex": 1 + }, + { + "ComponentId": 7827190074535394331, + "SortIndex": 2 + } + ] + }, + "Component_[3518973002096080237]": { + "$type": "EditorOnlyEntityComponent", + "Id": 3518973002096080237 + }, + "Component_[399415038452606756]": { + "$type": "{27F1E1A1-8D9D-4C3B-BD3A-AFB9762449C0} TransformComponent", + "Id": 399415038452606756, + "Parent Entity": "ContainerEntity", + "Transform Data": { + "Translate": [ + 37.53014373779297, + -0.00018183141946792603, + 74.93071746826172 + ] + } + }, + "Component_[4564240319609068082]": { + "$type": "EditorEntitySortComponent", + "Id": 4564240319609068082 + }, + "Component_[7827190074535394331]": { + "$type": "EditorMaterialComponent", + "Id": 7827190074535394331, + "Controller": { + "Configuration": { + "materials": [ + { + "Key": { + "materialSlotStableId": 2418540911 + }, + "Value": { + "MaterialAsset": { + "assetId": { + "guid": "{CF5C7B01-4912-58AE-991A-F25251E505AC}" + }, + "assetHint": "materials/presets/pbr/metal_copper_polished.azmaterial" + } + } + } + ] + } + } + }, + "Component_[8092226976542590265]": { + "$type": "EditorDisabledCompositionComponent", + "Id": 8092226976542590265 + } + } + }, + "Entity_[492090550228]": { + "Id": "Entity_[492090550228]", + "Name": "Entity1", + "Components": { + "Component_[11525365929370623807]": { + "$type": "EditorVisibilityComponent", + "Id": 11525365929370623807 + }, + "Component_[12334620273692642550]": { + "$type": "EditorLockComponent", + "Id": 12334620273692642550 + }, + "Component_[14389735759337977675]": { + "$type": "EditorPendingCompositionComponent", + "Id": 14389735759337977675 + }, + "Component_[16184381538555246534]": { + "$type": "AZ::Render::EditorMeshComponent", + "Id": 16184381538555246534, + "Controller": { + "Configuration": { + "ModelAsset": { + "assetId": { + "guid": "{E14975EF-E676-51A4-B826-3EF59CB645AA}", + "subId": 285127096 + }, + "assetHint": "testdata/objects/cube/cube.azmodel" + } + } + } + }, + "Component_[17962478023087084794]": { + "$type": "SelectionComponent", + "Id": 17962478023087084794 + }, + "Component_[18071675051915092508]": { + "$type": "EditorEntityIconComponent", + "Id": 18071675051915092508 + }, + "Component_[2115498007879087044]": { + "$type": "EditorInspectorComponent", + "Id": 2115498007879087044, + "ComponentOrderEntryArray": [ + { + "ComponentId": 399415038452606756 + }, + { + "ComponentId": 16184381538555246534, + "SortIndex": 1 + }, + { + "ComponentId": 7827190074535394331, + "SortIndex": 2 + } + ] + }, + "Component_[3518973002096080237]": { + "$type": "EditorOnlyEntityComponent", + "Id": 3518973002096080237 + }, + "Component_[399415038452606756]": { + "$type": "{27F1E1A1-8D9D-4C3B-BD3A-AFB9762449C0} TransformComponent", + "Id": 399415038452606756, + "Parent Entity": "ContainerEntity", + "Transform Data": { + "Translate": [ + -42.53056335449219, + -0.00018183141946792603, + 59.873046875 + ] + } + }, + "Component_[4564240319609068082]": { + "$type": "EditorEntitySortComponent", + "Id": 4564240319609068082 + }, + "Component_[7827190074535394331]": { + "$type": "EditorMaterialComponent", + "Id": 7827190074535394331, + "Controller": { + "Configuration": { + "materials": [ + { + "Key": { + "materialSlotStableId": 2418540911 + }, + "Value": { + "MaterialAsset": { + "assetId": { + "guid": "{FC69F2F8-F73B-5A0C-B8B7-94BAA45780FC}" + }, + "assetHint": "materials/presets/pbr/metal_brass_polished.azmaterial" + } + } + } + ] + } + } + }, + "Component_[8092226976542590265]": { + "$type": "EditorDisabledCompositionComponent", + "Id": 8092226976542590265 + } + } + }, + "Entity_[496385517524]": { + "Id": "Entity_[496385517524]", + "Name": "Entity1", + "Components": { + "Component_[11525365929370623807]": { + "$type": "EditorVisibilityComponent", + "Id": 11525365929370623807 + }, + "Component_[12334620273692642550]": { + "$type": "EditorLockComponent", + "Id": 12334620273692642550 + }, + "Component_[14389735759337977675]": { + "$type": "EditorPendingCompositionComponent", + "Id": 14389735759337977675 + }, + "Component_[16184381538555246534]": { + "$type": "AZ::Render::EditorMeshComponent", + "Id": 16184381538555246534, + "Controller": { + "Configuration": { + "ModelAsset": { + "assetId": { + "guid": "{E14975EF-E676-51A4-B826-3EF59CB645AA}", + "subId": 285127096 + }, + "assetHint": "testdata/objects/cube/cube.azmodel" + } + } + } + }, + "Component_[17962478023087084794]": { + "$type": "SelectionComponent", + "Id": 17962478023087084794 + }, + "Component_[18071675051915092508]": { + "$type": "EditorEntityIconComponent", + "Id": 18071675051915092508 + }, + "Component_[2115498007879087044]": { + "$type": "EditorInspectorComponent", + "Id": 2115498007879087044, + "ComponentOrderEntryArray": [ + { + "ComponentId": 399415038452606756 + }, + { + "ComponentId": 16184381538555246534, + "SortIndex": 1 + }, + { + "ComponentId": 7827190074535394331, + "SortIndex": 2 + } + ] + }, + "Component_[3518973002096080237]": { + "$type": "EditorOnlyEntityComponent", + "Id": 3518973002096080237 + }, + "Component_[399415038452606756]": { + "$type": "{27F1E1A1-8D9D-4C3B-BD3A-AFB9762449C0} TransformComponent", + "Id": 399415038452606756, + "Parent Entity": "ContainerEntity", + "Transform Data": { + "Translate": [ + 37.53014373779297, + -0.00018183141946792603, + 74.93071746826172 + ] + } + }, + "Component_[4564240319609068082]": { + "$type": "EditorEntitySortComponent", + "Id": 4564240319609068082 + }, + "Component_[7827190074535394331]": { + "$type": "EditorMaterialComponent", + "Id": 7827190074535394331, + "Controller": { + "Configuration": { + "materials": [ + { + "Key": { + "materialSlotStableId": 2418540911 + }, + "Value": { + "MaterialAsset": { + "assetId": { + "guid": "{CF5C7B01-4912-58AE-991A-F25251E505AC}" + }, + "assetHint": "materials/presets/pbr/metal_copper_polished.azmaterial" + } + } + } + ] + } + } + }, + "Component_[8092226976542590265]": { + "$type": "EditorDisabledCompositionComponent", + "Id": 8092226976542590265 + } + } + }, + "Entity_[500680484820]": { + "Id": "Entity_[500680484820]", + "Name": "Entity1", + "Components": { + "Component_[11525365929370623807]": { + "$type": "EditorVisibilityComponent", + "Id": 11525365929370623807 + }, + "Component_[12334620273692642550]": { + "$type": "EditorLockComponent", + "Id": 12334620273692642550 + }, + "Component_[14389735759337977675]": { + "$type": "EditorPendingCompositionComponent", + "Id": 14389735759337977675 + }, + "Component_[16184381538555246534]": { + "$type": "AZ::Render::EditorMeshComponent", + "Id": 16184381538555246534, + "Controller": { + "Configuration": { + "ModelAsset": { + "assetId": { + "guid": "{E14975EF-E676-51A4-B826-3EF59CB645AA}", + "subId": 285127096 + }, + "assetHint": "testdata/objects/cube/cube.azmodel" + } + } + } + }, + "Component_[17962478023087084794]": { + "$type": "SelectionComponent", + "Id": 17962478023087084794 + }, + "Component_[18071675051915092508]": { + "$type": "EditorEntityIconComponent", + "Id": 18071675051915092508 + }, + "Component_[2115498007879087044]": { + "$type": "EditorInspectorComponent", + "Id": 2115498007879087044, + "ComponentOrderEntryArray": [ + { + "ComponentId": 399415038452606756 + }, + { + "ComponentId": 16184381538555246534, + "SortIndex": 1 + }, + { + "ComponentId": 7827190074535394331, + "SortIndex": 2 + } + ] + }, + "Component_[3518973002096080237]": { + "$type": "EditorOnlyEntityComponent", + "Id": 3518973002096080237 + }, + "Component_[399415038452606756]": { + "$type": "{27F1E1A1-8D9D-4C3B-BD3A-AFB9762449C0} TransformComponent", + "Id": 399415038452606756, + "Parent Entity": "ContainerEntity", + "Transform Data": { + "Translate": [ + -2.5305633544921875, + -0.00018183141946792603, + 59.873046875 + ] + } + }, + "Component_[4564240319609068082]": { + "$type": "EditorEntitySortComponent", + "Id": 4564240319609068082 + }, + "Component_[7827190074535394331]": { + "$type": "EditorMaterialComponent", + "Id": 7827190074535394331, + "Controller": { + "Configuration": { + "materials": [ + { + "Key": { + "materialSlotStableId": 2418540911 + }, + "Value": { + "MaterialAsset": { + "assetId": { + "guid": "{D0E9960A-4B31-5136-BAC6-5482B203D3B4}" + }, + "assetHint": "materials/presets/pbr/metal_palladium_polished.azmaterial" + } + } + } + ] + } + } + }, + "Component_[8092226976542590265]": { + "$type": "EditorDisabledCompositionComponent", + "Id": 8092226976542590265 + } + } + }, + "Entity_[504975452116]": { + "Id": "Entity_[504975452116]", + "Name": "Entity1", + "Components": { + "Component_[11525365929370623807]": { + "$type": "EditorVisibilityComponent", + "Id": 11525365929370623807 + }, + "Component_[12334620273692642550]": { + "$type": "EditorLockComponent", + "Id": 12334620273692642550 + }, + "Component_[14389735759337977675]": { + "$type": "EditorPendingCompositionComponent", + "Id": 14389735759337977675 + }, + "Component_[16184381538555246534]": { + "$type": "AZ::Render::EditorMeshComponent", + "Id": 16184381538555246534, + "Controller": { + "Configuration": { + "ModelAsset": { + "assetId": { + "guid": "{E14975EF-E676-51A4-B826-3EF59CB645AA}", + "subId": 285127096 + }, + "assetHint": "testdata/objects/cube/cube.azmodel" + } + } + } + }, + "Component_[17962478023087084794]": { + "$type": "SelectionComponent", + "Id": 17962478023087084794 + }, + "Component_[18071675051915092508]": { + "$type": "EditorEntityIconComponent", + "Id": 18071675051915092508 + }, + "Component_[2115498007879087044]": { + "$type": "EditorInspectorComponent", + "Id": 2115498007879087044, + "ComponentOrderEntryArray": [ + { + "ComponentId": 399415038452606756 + }, + { + "ComponentId": 16184381538555246534, + "SortIndex": 1 + }, + { + "ComponentId": 7827190074535394331, + "SortIndex": 2 + } + ] + }, + "Component_[3518973002096080237]": { + "$type": "EditorOnlyEntityComponent", + "Id": 3518973002096080237 + }, + "Component_[399415038452606756]": { + "$type": "{27F1E1A1-8D9D-4C3B-BD3A-AFB9762449C0} TransformComponent", + "Id": 399415038452606756, + "Parent Entity": "ContainerEntity", + "Transform Data": { + "Translate": [ + 32.53014373779297, + -0.00018183141946792603, + 99.43339538574219 + ] + } + }, + "Component_[4564240319609068082]": { + "$type": "EditorEntitySortComponent", + "Id": 4564240319609068082 + }, + "Component_[7827190074535394331]": { + "$type": "EditorMaterialComponent", + "Id": 7827190074535394331, + "Controller": { + "Configuration": { + "materials": [ + { + "Key": { + "materialSlotStableId": 2418540911 + }, + "Value": { + "MaterialAsset": { + "assetId": { + "guid": "{99976D73-6248-5D66-AD15-E8F52B0AFE36}" + }, + "assetHint": "materials/presets/pbr/metal_cobalt.azmaterial" + } + } + } + ] + } + } + }, + "Component_[8092226976542590265]": { + "$type": "EditorDisabledCompositionComponent", + "Id": 8092226976542590265 + } + } + }, + "Entity_[509270419412]": { + "Id": "Entity_[509270419412]", + "Name": "Entity1", + "Components": { + "Component_[11525365929370623807]": { + "$type": "EditorVisibilityComponent", + "Id": 11525365929370623807 + }, + "Component_[12334620273692642550]": { + "$type": "EditorLockComponent", + "Id": 12334620273692642550 + }, + "Component_[14389735759337977675]": { + "$type": "EditorPendingCompositionComponent", + "Id": 14389735759337977675 + }, + "Component_[16184381538555246534]": { + "$type": "AZ::Render::EditorMeshComponent", + "Id": 16184381538555246534, + "Controller": { + "Configuration": { + "ModelAsset": { + "assetId": { + "guid": "{E14975EF-E676-51A4-B826-3EF59CB645AA}", + "subId": 285127096 + }, + "assetHint": "testdata/objects/cube/cube.azmodel" + } + } + } + }, + "Component_[17962478023087084794]": { + "$type": "SelectionComponent", + "Id": 17962478023087084794 + }, + "Component_[18071675051915092508]": { + "$type": "EditorEntityIconComponent", + "Id": 18071675051915092508 + }, + "Component_[2115498007879087044]": { + "$type": "EditorInspectorComponent", + "Id": 2115498007879087044, + "ComponentOrderEntryArray": [ + { + "ComponentId": 399415038452606756 + }, + { + "ComponentId": 16184381538555246534, + "SortIndex": 1 + }, + { + "ComponentId": 7827190074535394331, + "SortIndex": 2 + } + ] + }, + "Component_[3518973002096080237]": { + "$type": "EditorOnlyEntityComponent", + "Id": 3518973002096080237 + }, + "Component_[399415038452606756]": { + "$type": "{27F1E1A1-8D9D-4C3B-BD3A-AFB9762449C0} TransformComponent", + "Id": 399415038452606756, + "Parent Entity": "ContainerEntity", + "Transform Data": { + "Translate": [ + -2.5305633544921875, + -0.00018183141946792603, + 59.873046875 + ] + } + }, + "Component_[4564240319609068082]": { + "$type": "EditorEntitySortComponent", + "Id": 4564240319609068082 + }, + "Component_[7827190074535394331]": { + "$type": "EditorMaterialComponent", + "Id": 7827190074535394331, + "Controller": { + "Configuration": { + "materials": [ + { + "Key": { + "materialSlotStableId": 2418540911 + }, + "Value": { + "MaterialAsset": { + "assetId": { + "guid": "{D0E9960A-4B31-5136-BAC6-5482B203D3B4}" + }, + "assetHint": "materials/presets/pbr/metal_palladium_polished.azmaterial" + } + } + } + ] + } + } + }, + "Component_[8092226976542590265]": { + "$type": "EditorDisabledCompositionComponent", + "Id": 8092226976542590265 + } + } + }, + "Entity_[513565386708]": { + "Id": "Entity_[513565386708]", + "Name": "Entity1", + "Components": { + "Component_[11525365929370623807]": { + "$type": "EditorVisibilityComponent", + "Id": 11525365929370623807 + }, + "Component_[12334620273692642550]": { + "$type": "EditorLockComponent", + "Id": 12334620273692642550 + }, + "Component_[14389735759337977675]": { + "$type": "EditorPendingCompositionComponent", + "Id": 14389735759337977675 + }, + "Component_[16184381538555246534]": { + "$type": "AZ::Render::EditorMeshComponent", + "Id": 16184381538555246534, + "Controller": { + "Configuration": { + "ModelAsset": { + "assetId": { + "guid": "{E14975EF-E676-51A4-B826-3EF59CB645AA}", + "subId": 285127096 + }, + "assetHint": "testdata/objects/cube/cube.azmodel" + } + } + } + }, + "Component_[17962478023087084794]": { + "$type": "SelectionComponent", + "Id": 17962478023087084794 + }, + "Component_[18071675051915092508]": { + "$type": "EditorEntityIconComponent", + "Id": 18071675051915092508 + }, + "Component_[2115498007879087044]": { + "$type": "EditorInspectorComponent", + "Id": 2115498007879087044, + "ComponentOrderEntryArray": [ + { + "ComponentId": 399415038452606756 + }, + { + "ComponentId": 16184381538555246534, + "SortIndex": 1 + }, + { + "ComponentId": 7827190074535394331, + "SortIndex": 2 + } + ] + }, + "Component_[3518973002096080237]": { + "$type": "EditorOnlyEntityComponent", + "Id": 3518973002096080237 + }, + "Component_[399415038452606756]": { + "$type": "{27F1E1A1-8D9D-4C3B-BD3A-AFB9762449C0} TransformComponent", + "Id": 399415038452606756, + "Parent Entity": "ContainerEntity", + "Transform Data": { + "Translate": [ + -22.530563354492188, + -0.00018183141946792603, + 79.38228607177734 + ] + } + }, + "Component_[4564240319609068082]": { + "$type": "EditorEntitySortComponent", + "Id": 4564240319609068082 + }, + "Component_[7827190074535394331]": { + "$type": "EditorMaterialComponent", + "Id": 7827190074535394331, + "Controller": { + "Configuration": { + "materials": [ + { + "Key": { + "materialSlotStableId": 2418540911 + }, + "Value": { + "MaterialAsset": { + "assetId": { + "guid": "{5BC13D95-377E-53EA-9A93-156384BE8B04}" + }, + "assetHint": "materials/presets/pbr/metal_gold_matte.azmaterial" + } + } + } + ] + } + } + }, + "Component_[8092226976542590265]": { + "$type": "EditorDisabledCompositionComponent", + "Id": 8092226976542590265 + } + } + }, + "Entity_[517860354004]": { + "Id": "Entity_[517860354004]", + "Name": "Entity1", + "Components": { + "Component_[11525365929370623807]": { + "$type": "EditorVisibilityComponent", + "Id": 11525365929370623807 + }, + "Component_[12334620273692642550]": { + "$type": "EditorLockComponent", + "Id": 12334620273692642550 + }, + "Component_[14389735759337977675]": { + "$type": "EditorPendingCompositionComponent", + "Id": 14389735759337977675 + }, + "Component_[16184381538555246534]": { + "$type": "AZ::Render::EditorMeshComponent", + "Id": 16184381538555246534, + "Controller": { + "Configuration": { + "ModelAsset": { + "assetId": { + "guid": "{E14975EF-E676-51A4-B826-3EF59CB645AA}", + "subId": 285127096 + }, + "assetHint": "testdata/objects/cube/cube.azmodel" + } + } + } + }, + "Component_[17962478023087084794]": { + "$type": "SelectionComponent", + "Id": 17962478023087084794 + }, + "Component_[18071675051915092508]": { + "$type": "EditorEntityIconComponent", + "Id": 18071675051915092508 + }, + "Component_[2115498007879087044]": { + "$type": "EditorInspectorComponent", + "Id": 2115498007879087044, + "ComponentOrderEntryArray": [ + { + "ComponentId": 399415038452606756 + }, + { + "ComponentId": 16184381538555246534, + "SortIndex": 1 + }, + { + "ComponentId": 7827190074535394331, + "SortIndex": 2 + } + ] + }, + "Component_[3518973002096080237]": { + "$type": "EditorOnlyEntityComponent", + "Id": 3518973002096080237 + }, + "Component_[399415038452606756]": { + "$type": "{27F1E1A1-8D9D-4C3B-BD3A-AFB9762449C0} TransformComponent", + "Id": 399415038452606756, + "Parent Entity": "ContainerEntity", + "Transform Data": { + "Translate": [ + -47.53056335449219, + -0.00018183141946792603, + 64.32462310791016 + ] + } + }, + "Component_[4564240319609068082]": { + "$type": "EditorEntitySortComponent", + "Id": 4564240319609068082 + }, + "Component_[7827190074535394331]": { + "$type": "EditorMaterialComponent", + "Id": 7827190074535394331, + "Controller": { + "Configuration": { + "materials": [ + { + "Key": { + "materialSlotStableId": 2418540911 + }, + "Value": { + "MaterialAsset": { + "assetId": { + "guid": "{549D26B8-881D-569F-AF05-961F36A43F4F}" + }, + "assetHint": "materials/presets/pbr/metal_aluminum_matte.azmaterial" + } + } + } + ] + } + } + }, + "Component_[8092226976542590265]": { + "$type": "EditorDisabledCompositionComponent", + "Id": 8092226976542590265 + } + } + }, + "Entity_[522155321300]": { + "Id": "Entity_[522155321300]", + "Name": "Entity1", + "Components": { + "Component_[11525365929370623807]": { + "$type": "EditorVisibilityComponent", + "Id": 11525365929370623807 + }, + "Component_[12334620273692642550]": { + "$type": "EditorLockComponent", + "Id": 12334620273692642550 + }, + "Component_[14389735759337977675]": { + "$type": "EditorPendingCompositionComponent", + "Id": 14389735759337977675 + }, + "Component_[16184381538555246534]": { + "$type": "AZ::Render::EditorMeshComponent", + "Id": 16184381538555246534, + "Controller": { + "Configuration": { + "ModelAsset": { + "assetId": { + "guid": "{E14975EF-E676-51A4-B826-3EF59CB645AA}", + "subId": 285127096 + }, + "assetHint": "testdata/objects/cube/cube.azmodel" + } + } + } + }, + "Component_[17962478023087084794]": { + "$type": "SelectionComponent", + "Id": 17962478023087084794 + }, + "Component_[18071675051915092508]": { + "$type": "EditorEntityIconComponent", + "Id": 18071675051915092508 + }, + "Component_[2115498007879087044]": { + "$type": "EditorInspectorComponent", + "Id": 2115498007879087044, + "ComponentOrderEntryArray": [ + { + "ComponentId": 399415038452606756 + }, + { + "ComponentId": 16184381538555246534, + "SortIndex": 1 + }, + { + "ComponentId": 7827190074535394331, + "SortIndex": 2 + } + ] + }, + "Component_[3518973002096080237]": { + "$type": "EditorOnlyEntityComponent", + "Id": 3518973002096080237 + }, + "Component_[399415038452606756]": { + "$type": "{27F1E1A1-8D9D-4C3B-BD3A-AFB9762449C0} TransformComponent", + "Id": 399415038452606756, + "Parent Entity": "ContainerEntity", + "Transform Data": { + "Translate": [ + 2.5301437377929688, + -0.00018183141946792603, + 114.4910659790039 + ] + } + }, + "Component_[4564240319609068082]": { + "$type": "EditorEntitySortComponent", + "Id": 4564240319609068082 + }, + "Component_[7827190074535394331]": { + "$type": "EditorMaterialComponent", + "Id": 7827190074535394331, + "Controller": { + "Configuration": { + "materials": [ + { + "Key": { + "materialSlotStableId": 2418540911 + }, + "Value": { + "MaterialAsset": { + "assetId": { + "guid": "{E23FC75B-4142-55F1-B9AE-884826E7EB23}" + }, + "assetHint": "materials/presets/pbr/metal_platinum.azmaterial" + } + } + } + ] + } + } + }, + "Component_[8092226976542590265]": { + "$type": "EditorDisabledCompositionComponent", + "Id": 8092226976542590265 + } + } + }, + "Entity_[526450288596]": { + "Id": "Entity_[526450288596]", + "Name": "Entity1", + "Components": { + "Component_[11525365929370623807]": { + "$type": "EditorVisibilityComponent", + "Id": 11525365929370623807 + }, + "Component_[12334620273692642550]": { + "$type": "EditorLockComponent", + "Id": 12334620273692642550 + }, + "Component_[14389735759337977675]": { + "$type": "EditorPendingCompositionComponent", + "Id": 14389735759337977675 + }, + "Component_[16184381538555246534]": { + "$type": "AZ::Render::EditorMeshComponent", + "Id": 16184381538555246534, + "Controller": { + "Configuration": { + "ModelAsset": { + "assetId": { + "guid": "{E14975EF-E676-51A4-B826-3EF59CB645AA}", + "subId": 285127096 + }, + "assetHint": "testdata/objects/cube/cube.azmodel" + } + } + } + }, + "Component_[17962478023087084794]": { + "$type": "SelectionComponent", + "Id": 17962478023087084794 + }, + "Component_[18071675051915092508]": { + "$type": "EditorEntityIconComponent", + "Id": 18071675051915092508 + }, + "Component_[2115498007879087044]": { + "$type": "EditorInspectorComponent", + "Id": 2115498007879087044, + "ComponentOrderEntryArray": [ + { + "ComponentId": 399415038452606756 + }, + { + "ComponentId": 16184381538555246534, + "SortIndex": 1 + }, + { + "ComponentId": 7827190074535394331, + "SortIndex": 2 + } + ] + }, + "Component_[3518973002096080237]": { + "$type": "EditorOnlyEntityComponent", + "Id": 3518973002096080237 + }, + "Component_[399415038452606756]": { + "$type": "{27F1E1A1-8D9D-4C3B-BD3A-AFB9762449C0} TransformComponent", + "Id": 399415038452606756, + "Parent Entity": "ContainerEntity", + "Transform Data": { + "Translate": [ + 27.53014373779297, + -0.00018183141946792603, + 99.43339538574219 + ] + } + }, + "Component_[4564240319609068082]": { + "$type": "EditorEntitySortComponent", + "Id": 4564240319609068082 + }, + "Component_[7827190074535394331]": { + "$type": "EditorMaterialComponent", + "Id": 7827190074535394331, + "Controller": { + "Configuration": { + "materials": [ + { + "Key": { + "materialSlotStableId": 2418540911 + }, + "Value": { + "MaterialAsset": { + "assetId": { + "guid": "{B7C712DC-4839-58BB-B522-A4F120084CF5}" + }, + "assetHint": "materials/presets/pbr/metal_chrome.azmaterial" + } + } + } + ] + } + } + }, + "Component_[8092226976542590265]": { + "$type": "EditorDisabledCompositionComponent", + "Id": 8092226976542590265 + } + } + }, + "Entity_[530745255892]": { + "Id": "Entity_[530745255892]", + "Name": "Entity1", + "Components": { + "Component_[11525365929370623807]": { + "$type": "EditorVisibilityComponent", + "Id": 11525365929370623807 + }, + "Component_[12334620273692642550]": { + "$type": "EditorLockComponent", + "Id": 12334620273692642550 + }, + "Component_[14389735759337977675]": { + "$type": "EditorPendingCompositionComponent", + "Id": 14389735759337977675 + }, + "Component_[16184381538555246534]": { + "$type": "AZ::Render::EditorMeshComponent", + "Id": 16184381538555246534, + "Controller": { + "Configuration": { + "ModelAsset": { + "assetId": { + "guid": "{E14975EF-E676-51A4-B826-3EF59CB645AA}", + "subId": 285127096 + }, + "assetHint": "testdata/objects/cube/cube.azmodel" + } + } + } + }, + "Component_[17962478023087084794]": { + "$type": "SelectionComponent", + "Id": 17962478023087084794 + }, + "Component_[18071675051915092508]": { + "$type": "EditorEntityIconComponent", + "Id": 18071675051915092508 + }, + "Component_[2115498007879087044]": { + "$type": "EditorInspectorComponent", + "Id": 2115498007879087044, + "ComponentOrderEntryArray": [ + { + "ComponentId": 399415038452606756 + }, + { + "ComponentId": 16184381538555246534, + "SortIndex": 1 + }, + { + "ComponentId": 7827190074535394331, + "SortIndex": 2 + } + ] + }, + "Component_[3518973002096080237]": { + "$type": "EditorOnlyEntityComponent", + "Id": 3518973002096080237 + }, + "Component_[399415038452606756]": { + "$type": "{27F1E1A1-8D9D-4C3B-BD3A-AFB9762449C0} TransformComponent", + "Id": 399415038452606756, + "Parent Entity": "ContainerEntity", + "Transform Data": { + "Translate": [ + -7.5305633544921875, + -0.00018183141946792603, + 69.34888458251953 + ] + } + }, + "Component_[4564240319609068082]": { + "$type": "EditorEntitySortComponent", + "Id": 4564240319609068082 + }, + "Component_[7827190074535394331]": { + "$type": "EditorMaterialComponent", + "Id": 7827190074535394331, + "Controller": { + "Configuration": { + "materials": [ + { + "Key": { + "materialSlotStableId": 2418540911 + }, + "Value": { + "MaterialAsset": { + "assetId": { + "guid": "{DD1E26AE-80FB-5DB6-8786-26D438190A38}" + }, + "assetHint": "materials/presets/pbr/metal_nickel.azmaterial" + } + } + } + ] + } + } + }, + "Component_[8092226976542590265]": { + "$type": "EditorDisabledCompositionComponent", + "Id": 8092226976542590265 + } + } + }, + "Entity_[535040223188]": { + "Id": "Entity_[535040223188]", + "Name": "Entity1", + "Components": { + "Component_[11525365929370623807]": { + "$type": "EditorVisibilityComponent", + "Id": 11525365929370623807 + }, + "Component_[12334620273692642550]": { + "$type": "EditorLockComponent", + "Id": 12334620273692642550 + }, + "Component_[14389735759337977675]": { + "$type": "EditorPendingCompositionComponent", + "Id": 14389735759337977675 + }, + "Component_[16184381538555246534]": { + "$type": "AZ::Render::EditorMeshComponent", + "Id": 16184381538555246534, + "Controller": { + "Configuration": { + "ModelAsset": { + "assetId": { + "guid": "{E14975EF-E676-51A4-B826-3EF59CB645AA}", + "subId": 285127096 + }, + "assetHint": "testdata/objects/cube/cube.azmodel" + } + } + } + }, + "Component_[17962478023087084794]": { + "$type": "SelectionComponent", + "Id": 17962478023087084794 + }, + "Component_[18071675051915092508]": { + "$type": "EditorEntityIconComponent", + "Id": 18071675051915092508 + }, + "Component_[2115498007879087044]": { + "$type": "EditorInspectorComponent", + "Id": 2115498007879087044, + "ComponentOrderEntryArray": [ + { + "ComponentId": 399415038452606756 + }, + { + "ComponentId": 16184381538555246534, + "SortIndex": 1 + }, + { + "ComponentId": 7827190074535394331, + "SortIndex": 2 + } + ] + }, + "Component_[3518973002096080237]": { + "$type": "EditorOnlyEntityComponent", + "Id": 3518973002096080237 + }, + "Component_[399415038452606756]": { + "$type": "{27F1E1A1-8D9D-4C3B-BD3A-AFB9762449C0} TransformComponent", + "Id": 399415038452606756, + "Parent Entity": "ContainerEntity", + "Transform Data": { + "Translate": [ + -37.53056335449219, + -0.00018183141946792603, + 84.40655517578125 + ] + } + }, + "Component_[4564240319609068082]": { + "$type": "EditorEntitySortComponent", + "Id": 4564240319609068082 + }, + "Component_[7827190074535394331]": { + "$type": "EditorMaterialComponent", + "Id": 7827190074535394331, + "Controller": { + "Configuration": { + "materials": [ + { + "Key": { + "materialSlotStableId": 2418540911 + }, + "Value": { + "MaterialAsset": { + "assetId": { + "guid": "{B7C712DC-4839-58BB-B522-A4F120084CF5}" + }, + "assetHint": "materials/presets/pbr/metal_chrome.azmaterial" + } + } + } + ] + } + } + }, + "Component_[8092226976542590265]": { + "$type": "EditorDisabledCompositionComponent", + "Id": 8092226976542590265 + } + } + }, + "Entity_[539335190484]": { + "Id": "Entity_[539335190484]", + "Name": "Entity1", + "Components": { + "Component_[11525365929370623807]": { + "$type": "EditorVisibilityComponent", + "Id": 11525365929370623807 + }, + "Component_[12334620273692642550]": { + "$type": "EditorLockComponent", + "Id": 12334620273692642550 + }, + "Component_[14389735759337977675]": { + "$type": "EditorPendingCompositionComponent", + "Id": 14389735759337977675 + }, + "Component_[16184381538555246534]": { + "$type": "AZ::Render::EditorMeshComponent", + "Id": 16184381538555246534, + "Controller": { + "Configuration": { + "ModelAsset": { + "assetId": { + "guid": "{E14975EF-E676-51A4-B826-3EF59CB645AA}", + "subId": 285127096 + }, + "assetHint": "testdata/objects/cube/cube.azmodel" + } + } + } + }, + "Component_[17962478023087084794]": { + "$type": "SelectionComponent", + "Id": 17962478023087084794 + }, + "Component_[18071675051915092508]": { + "$type": "EditorEntityIconComponent", + "Id": 18071675051915092508 + }, + "Component_[2115498007879087044]": { + "$type": "EditorInspectorComponent", + "Id": 2115498007879087044, + "ComponentOrderEntryArray": [ + { + "ComponentId": 399415038452606756 + }, + { + "ComponentId": 16184381538555246534, + "SortIndex": 1 + }, + { + "ComponentId": 7827190074535394331, + "SortIndex": 2 + } + ] + }, + "Component_[3518973002096080237]": { + "$type": "EditorOnlyEntityComponent", + "Id": 3518973002096080237 + }, + "Component_[399415038452606756]": { + "$type": "{27F1E1A1-8D9D-4C3B-BD3A-AFB9762449C0} TransformComponent", + "Id": 399415038452606756, + "Parent Entity": "ContainerEntity", + "Transform Data": { + "Translate": [ + 22.53014373779297, + -0.00018183141946792603, + 94.40913391113281 + ] + } + }, + "Component_[4564240319609068082]": { + "$type": "EditorEntitySortComponent", + "Id": 4564240319609068082 + }, + "Component_[7827190074535394331]": { + "$type": "EditorMaterialComponent", + "Id": 7827190074535394331, + "Controller": { + "Configuration": { + "materials": [ + { + "Key": { + "materialSlotStableId": 2418540911 + }, + "Value": { + "MaterialAsset": { + "assetId": { + "guid": "{AE350D9F-0000-526D-B49C-4303D687BB86}" + }, + "assetHint": "materials/presets/pbr/metal_brass_matte.azmaterial" + } + } + } + ] + } + } + }, + "Component_[8092226976542590265]": { + "$type": "EditorDisabledCompositionComponent", + "Id": 8092226976542590265 + } + } + }, + "Entity_[543630157780]": { + "Id": "Entity_[543630157780]", + "Name": "Entity1", + "Components": { + "Component_[11525365929370623807]": { + "$type": "EditorVisibilityComponent", + "Id": 11525365929370623807 + }, + "Component_[12334620273692642550]": { + "$type": "EditorLockComponent", + "Id": 12334620273692642550 + }, + "Component_[14389735759337977675]": { + "$type": "EditorPendingCompositionComponent", + "Id": 14389735759337977675 + }, + "Component_[16184381538555246534]": { + "$type": "AZ::Render::EditorMeshComponent", + "Id": 16184381538555246534, + "Controller": { + "Configuration": { + "ModelAsset": { + "assetId": { + "guid": "{E14975EF-E676-51A4-B826-3EF59CB645AA}", + "subId": 285127096 + }, + "assetHint": "testdata/objects/cube/cube.azmodel" + } + } + } + }, + "Component_[17962478023087084794]": { + "$type": "SelectionComponent", + "Id": 17962478023087084794 + }, + "Component_[18071675051915092508]": { + "$type": "EditorEntityIconComponent", + "Id": 18071675051915092508 + }, + "Component_[2115498007879087044]": { + "$type": "EditorInspectorComponent", + "Id": 2115498007879087044, + "ComponentOrderEntryArray": [ + { + "ComponentId": 399415038452606756 + }, + { + "ComponentId": 16184381538555246534, + "SortIndex": 1 + }, + { + "ComponentId": 7827190074535394331, + "SortIndex": 2 + } + ] + }, + "Component_[3518973002096080237]": { + "$type": "EditorOnlyEntityComponent", + "Id": 3518973002096080237 + }, + "Component_[399415038452606756]": { + "$type": "{27F1E1A1-8D9D-4C3B-BD3A-AFB9762449C0} TransformComponent", + "Id": 399415038452606756, + "Parent Entity": "ContainerEntity", + "Transform Data": { + "Translate": [ + -17.530563354492188, + -0.00018183141946792603, + 89.95755767822266 + ] + } + }, + "Component_[4564240319609068082]": { + "$type": "EditorEntitySortComponent", + "Id": 4564240319609068082 + }, + "Component_[7827190074535394331]": { + "$type": "EditorMaterialComponent", + "Id": 7827190074535394331, + "Controller": { + "Configuration": { + "materials": [ + { + "Key": { + "materialSlotStableId": 2418540911 + }, + "Value": { + "MaterialAsset": { + "assetId": { + "guid": "{A7F03135-ECAD-5440-99DB-E84ABA3D50DA}" + }, + "assetHint": "materials/presets/pbr/metal_iron_polished.azmaterial" + } + } + } + ] + } + } + }, + "Component_[8092226976542590265]": { + "$type": "EditorDisabledCompositionComponent", + "Id": 8092226976542590265 + } + } + }, + "Entity_[547925125076]": { + "Id": "Entity_[547925125076]", + "Name": "Entity1", + "Components": { + "Component_[11525365929370623807]": { + "$type": "EditorVisibilityComponent", + "Id": 11525365929370623807 + }, + "Component_[12334620273692642550]": { + "$type": "EditorLockComponent", + "Id": 12334620273692642550 + }, + "Component_[14389735759337977675]": { + "$type": "EditorPendingCompositionComponent", + "Id": 14389735759337977675 + }, + "Component_[16184381538555246534]": { + "$type": "AZ::Render::EditorMeshComponent", + "Id": 16184381538555246534, + "Controller": { + "Configuration": { + "ModelAsset": { + "assetId": { + "guid": "{E14975EF-E676-51A4-B826-3EF59CB645AA}", + "subId": 285127096 + }, + "assetHint": "testdata/objects/cube/cube.azmodel" + } + } + } + }, + "Component_[17962478023087084794]": { + "$type": "SelectionComponent", + "Id": 17962478023087084794 + }, + "Component_[18071675051915092508]": { + "$type": "EditorEntityIconComponent", + "Id": 18071675051915092508 + }, + "Component_[2115498007879087044]": { + "$type": "EditorInspectorComponent", + "Id": 2115498007879087044, + "ComponentOrderEntryArray": [ + { + "ComponentId": 399415038452606756 + }, + { + "ComponentId": 16184381538555246534, + "SortIndex": 1 + }, + { + "ComponentId": 7827190074535394331, + "SortIndex": 2 + } + ] + }, + "Component_[3518973002096080237]": { + "$type": "EditorOnlyEntityComponent", + "Id": 3518973002096080237 + }, + "Component_[399415038452606756]": { + "$type": "{27F1E1A1-8D9D-4C3B-BD3A-AFB9762449C0} TransformComponent", + "Id": 399415038452606756, + "Parent Entity": "ContainerEntity", + "Transform Data": { + "Translate": [ + -27.530563354492188, + -0.00018183141946792603, + 64.32462310791016 + ] + } + }, + "Component_[4564240319609068082]": { + "$type": "EditorEntitySortComponent", + "Id": 4564240319609068082 + }, + "Component_[7827190074535394331]": { + "$type": "EditorMaterialComponent", + "Id": 7827190074535394331, + "Controller": { + "Configuration": { + "materials": [ + { + "Key": { + "materialSlotStableId": 2418540911 + }, + "Value": { + "MaterialAsset": { + "assetId": { + "guid": "{2D054071-BEF7-53C0-A8C9-E4F026BD8364}" + }, + "assetHint": "materials/presets/pbr/metal_copper_matte.azmaterial" + } + } + } + ] + } + } + }, + "Component_[8092226976542590265]": { + "$type": "EditorDisabledCompositionComponent", + "Id": 8092226976542590265 + } + } + }, + "Entity_[552220092372]": { + "Id": "Entity_[552220092372]", + "Name": "Entity1", + "Components": { + "Component_[11525365929370623807]": { + "$type": "EditorVisibilityComponent", + "Id": 11525365929370623807 + }, + "Component_[12334620273692642550]": { + "$type": "EditorLockComponent", + "Id": 12334620273692642550 + }, + "Component_[14389735759337977675]": { + "$type": "EditorPendingCompositionComponent", + "Id": 14389735759337977675 + }, + "Component_[16184381538555246534]": { + "$type": "AZ::Render::EditorMeshComponent", + "Id": 16184381538555246534, + "Controller": { + "Configuration": { + "ModelAsset": { + "assetId": { + "guid": "{E14975EF-E676-51A4-B826-3EF59CB645AA}", + "subId": 285127096 + }, + "assetHint": "testdata/objects/cube/cube.azmodel" + } + } + } + }, + "Component_[17962478023087084794]": { + "$type": "SelectionComponent", + "Id": 17962478023087084794 + }, + "Component_[18071675051915092508]": { + "$type": "EditorEntityIconComponent", + "Id": 18071675051915092508 + }, + "Component_[2115498007879087044]": { + "$type": "EditorInspectorComponent", + "Id": 2115498007879087044, + "ComponentOrderEntryArray": [ + { + "ComponentId": 399415038452606756 + }, + { + "ComponentId": 16184381538555246534, + "SortIndex": 1 + }, + { + "ComponentId": 7827190074535394331, + "SortIndex": 2 + } + ] + }, + "Component_[3518973002096080237]": { + "$type": "EditorOnlyEntityComponent", + "Id": 3518973002096080237 + }, + "Component_[399415038452606756]": { + "$type": "{27F1E1A1-8D9D-4C3B-BD3A-AFB9762449C0} TransformComponent", + "Id": 399415038452606756, + "Parent Entity": "ContainerEntity", + "Transform Data": { + "Translate": [ + 37.53014373779297, + -0.00018183141946792603, + 79.38228607177734 + ] + } + }, + "Component_[4564240319609068082]": { + "$type": "EditorEntitySortComponent", + "Id": 4564240319609068082 + }, + "Component_[7827190074535394331]": { + "$type": "EditorMaterialComponent", + "Id": 7827190074535394331, + "Controller": { + "Configuration": { + "materials": [ + { + "Key": { + "materialSlotStableId": 2418540911 + }, + "Value": { + "MaterialAsset": { + "assetId": { + "guid": "{2D054071-BEF7-53C0-A8C9-E4F026BD8364}" + }, + "assetHint": "materials/presets/pbr/metal_copper_matte.azmaterial" + } + } + } + ] + } + } + }, + "Component_[8092226976542590265]": { + "$type": "EditorDisabledCompositionComponent", + "Id": 8092226976542590265 + } + } + }, + "Entity_[556515059668]": { + "Id": "Entity_[556515059668]", + "Name": "Entity1", + "Components": { + "Component_[11525365929370623807]": { + "$type": "EditorVisibilityComponent", + "Id": 11525365929370623807 + }, + "Component_[12334620273692642550]": { + "$type": "EditorLockComponent", + "Id": 12334620273692642550 + }, + "Component_[14389735759337977675]": { + "$type": "EditorPendingCompositionComponent", + "Id": 14389735759337977675 + }, + "Component_[16184381538555246534]": { + "$type": "AZ::Render::EditorMeshComponent", + "Id": 16184381538555246534, + "Controller": { + "Configuration": { + "ModelAsset": { + "assetId": { + "guid": "{E14975EF-E676-51A4-B826-3EF59CB645AA}", + "subId": 285127096 + }, + "assetHint": "testdata/objects/cube/cube.azmodel" + } + } + } + }, + "Component_[17962478023087084794]": { + "$type": "SelectionComponent", + "Id": 17962478023087084794 + }, + "Component_[18071675051915092508]": { + "$type": "EditorEntityIconComponent", + "Id": 18071675051915092508 + }, + "Component_[2115498007879087044]": { + "$type": "EditorInspectorComponent", + "Id": 2115498007879087044, + "ComponentOrderEntryArray": [ + { + "ComponentId": 399415038452606756 + }, + { + "ComponentId": 16184381538555246534, + "SortIndex": 1 + }, + { + "ComponentId": 7827190074535394331, + "SortIndex": 2 + } + ] + }, + "Component_[3518973002096080237]": { + "$type": "EditorOnlyEntityComponent", + "Id": 3518973002096080237 + }, + "Component_[399415038452606756]": { + "$type": "{27F1E1A1-8D9D-4C3B-BD3A-AFB9762449C0} TransformComponent", + "Id": 399415038452606756, + "Parent Entity": "ContainerEntity", + "Transform Data": { + "Translate": [ + 27.53014373779297, + -0.00018183141946792603, + 105.0152359008789 + ] + } + }, + "Component_[4564240319609068082]": { + "$type": "EditorEntitySortComponent", + "Id": 4564240319609068082 + }, + "Component_[7827190074535394331]": { + "$type": "EditorMaterialComponent", + "Id": 7827190074535394331, + "Controller": { + "Configuration": { + "materials": [ + { + "Key": { + "materialSlotStableId": 2418540911 + }, + "Value": { + "MaterialAsset": { + "assetId": { + "guid": "{CAF50181-3384-5DF2-9304-C6E48E83C72D}" + }, + "assetHint": "materials/presets/pbr/metal_chrome_polished.azmaterial" + } + } + } + ] + } + } + }, + "Component_[8092226976542590265]": { + "$type": "EditorDisabledCompositionComponent", + "Id": 8092226976542590265 + } + } + }, + "Entity_[560810026964]": { + "Id": "Entity_[560810026964]", + "Name": "Entity1", + "Components": { + "Component_[1057179753323467068]": { + "$type": "EditorMaterialComponent", + "Id": 1057179753323467068, + "Controller": { + "Configuration": { + "materials": [ + { + "Key": { + "materialSlotStableId": 2418540911 + }, + "Value": { + "MaterialAsset": { + "assetId": { + "guid": "{A3F3CD98-1634-5542-AD5A-78E91BE21AE9}" + }, + "assetHint": "materials/presets/pbr/metal_titanium_matte.azmaterial" + } + } + } + ] + } + } + }, + "Component_[11525365929370623807]": { + "$type": "EditorVisibilityComponent", + "Id": 11525365929370623807 + }, + "Component_[12334620273692642550]": { + "$type": "EditorLockComponent", + "Id": 12334620273692642550 + }, + "Component_[14389735759337977675]": { + "$type": "EditorPendingCompositionComponent", + "Id": 14389735759337977675 + }, + "Component_[16184381538555246534]": { + "$type": "AZ::Render::EditorMeshComponent", + "Id": 16184381538555246534, + "Controller": { + "Configuration": { + "ModelAsset": { + "assetId": { + "guid": "{E14975EF-E676-51A4-B826-3EF59CB645AA}", + "subId": 285127096 + }, + "assetHint": "testdata/objects/cube/cube.azmodel" + } + } + } + }, + "Component_[17962478023087084794]": { + "$type": "SelectionComponent", + "Id": 17962478023087084794 + }, + "Component_[18071675051915092508]": { + "$type": "EditorEntityIconComponent", + "Id": 18071675051915092508 + }, + "Component_[2115498007879087044]": { + "$type": "EditorInspectorComponent", + "Id": 2115498007879087044, + "ComponentOrderEntryArray": [ + { + "ComponentId": 399415038452606756 + }, + { + "ComponentId": 16184381538555246534, + "SortIndex": 1 + }, + { + "ComponentId": 1057179753323467068, + "SortIndex": 2 + } + ] + }, + "Component_[3518973002096080237]": { + "$type": "EditorOnlyEntityComponent", + "Id": 3518973002096080237 + }, + "Component_[399415038452606756]": { + "$type": "{27F1E1A1-8D9D-4C3B-BD3A-AFB9762449C0} TransformComponent", + "Id": 399415038452606756, + "Parent Entity": "ContainerEntity", + "Transform Data": { + "Translate": [ + 12.530143737792969, + -0.00018183141946792603, + 109.46680450439453 + ] + } + }, + "Component_[4564240319609068082]": { + "$type": "EditorEntitySortComponent", + "Id": 4564240319609068082 + }, + "Component_[8092226976542590265]": { + "$type": "EditorDisabledCompositionComponent", + "Id": 8092226976542590265 + } + } + }, + "Entity_[565104994260]": { + "Id": "Entity_[565104994260]", + "Name": "Entity1", + "Components": { + "Component_[11525365929370623807]": { + "$type": "EditorVisibilityComponent", + "Id": 11525365929370623807 + }, + "Component_[12334620273692642550]": { + "$type": "EditorLockComponent", + "Id": 12334620273692642550 + }, + "Component_[14389735759337977675]": { + "$type": "EditorPendingCompositionComponent", + "Id": 14389735759337977675 + }, + "Component_[16184381538555246534]": { + "$type": "AZ::Render::EditorMeshComponent", + "Id": 16184381538555246534, + "Controller": { + "Configuration": { + "ModelAsset": { + "assetId": { + "guid": "{E14975EF-E676-51A4-B826-3EF59CB645AA}", + "subId": 285127096 + }, + "assetHint": "testdata/objects/cube/cube.azmodel" + } + } + } + }, + "Component_[17962478023087084794]": { + "$type": "SelectionComponent", + "Id": 17962478023087084794 + }, + "Component_[18071675051915092508]": { + "$type": "EditorEntityIconComponent", + "Id": 18071675051915092508 + }, + "Component_[2115498007879087044]": { + "$type": "EditorInspectorComponent", + "Id": 2115498007879087044, + "ComponentOrderEntryArray": [ + { + "ComponentId": 399415038452606756 + }, + { + "ComponentId": 16184381538555246534, + "SortIndex": 1 + }, + { + "ComponentId": 7827190074535394331, + "SortIndex": 2 + } + ] + }, + "Component_[3518973002096080237]": { + "$type": "EditorOnlyEntityComponent", + "Id": 3518973002096080237 + }, + "Component_[399415038452606756]": { + "$type": "{27F1E1A1-8D9D-4C3B-BD3A-AFB9762449C0} TransformComponent", + "Id": 399415038452606756, + "Parent Entity": "ContainerEntity", + "Transform Data": { + "Translate": [ + 37.53014373779297, + -0.00018183141946792603, + 79.38228607177734 + ] + } + }, + "Component_[4564240319609068082]": { + "$type": "EditorEntitySortComponent", + "Id": 4564240319609068082 + }, + "Component_[7827190074535394331]": { + "$type": "EditorMaterialComponent", + "Id": 7827190074535394331, + "Controller": { + "Configuration": { + "materials": [ + { + "Key": { + "materialSlotStableId": 2418540911 + }, + "Value": { + "MaterialAsset": { + "assetId": { + "guid": "{2D054071-BEF7-53C0-A8C9-E4F026BD8364}" + }, + "assetHint": "materials/presets/pbr/metal_copper_matte.azmaterial" + } + } + } + ] + } + } + }, + "Component_[8092226976542590265]": { + "$type": "EditorDisabledCompositionComponent", + "Id": 8092226976542590265 + } + } + }, + "Entity_[569399961556]": { + "Id": "Entity_[569399961556]", + "Name": "Entity1", + "Components": { + "Component_[1057179753323467068]": { + "$type": "EditorMaterialComponent", + "Id": 1057179753323467068, + "Controller": { + "Configuration": { + "materials": [ + { + "Key": { + "materialSlotStableId": 2418540911 + }, + "Value": { + "MaterialAsset": { + "assetId": { + "guid": "{721188E0-B7CC-5D06-8D5D-39AF8ABF2EF9}" + }, + "assetHint": "materials/presets/pbr/metal_titanium.azmaterial" + } + } + } + ] + } + } + }, + "Component_[11525365929370623807]": { + "$type": "EditorVisibilityComponent", + "Id": 11525365929370623807 + }, + "Component_[12334620273692642550]": { + "$type": "EditorLockComponent", + "Id": 12334620273692642550 + }, + "Component_[14389735759337977675]": { + "$type": "EditorPendingCompositionComponent", + "Id": 14389735759337977675 + }, + "Component_[16184381538555246534]": { + "$type": "AZ::Render::EditorMeshComponent", + "Id": 16184381538555246534, + "Controller": { + "Configuration": { + "ModelAsset": { + "assetId": { + "guid": "{E14975EF-E676-51A4-B826-3EF59CB645AA}", + "subId": 285127096 + }, + "assetHint": "testdata/objects/cube/cube.azmodel" + } + } + } + }, + "Component_[17962478023087084794]": { + "$type": "SelectionComponent", + "Id": 17962478023087084794 + }, + "Component_[18071675051915092508]": { + "$type": "EditorEntityIconComponent", + "Id": 18071675051915092508 + }, + "Component_[2115498007879087044]": { + "$type": "EditorInspectorComponent", + "Id": 2115498007879087044, + "ComponentOrderEntryArray": [ + { + "ComponentId": 399415038452606756 + }, + { + "ComponentId": 16184381538555246534, + "SortIndex": 1 + }, + { + "ComponentId": 1057179753323467068, + "SortIndex": 2 + } + ] + }, + "Component_[3518973002096080237]": { + "$type": "EditorOnlyEntityComponent", + "Id": 3518973002096080237 + }, + "Component_[399415038452606756]": { + "$type": "{27F1E1A1-8D9D-4C3B-BD3A-AFB9762449C0} TransformComponent", + "Id": 399415038452606756, + "Parent Entity": "ContainerEntity", + "Transform Data": { + "Translate": [ + 12.530143737792969, + -0.00018183141946792603, + 114.4910659790039 + ] + } + }, + "Component_[4564240319609068082]": { + "$type": "EditorEntitySortComponent", + "Id": 4564240319609068082 + }, + "Component_[8092226976542590265]": { + "$type": "EditorDisabledCompositionComponent", + "Id": 8092226976542590265 + } + } + }, + "Entity_[573694928852]": { + "Id": "Entity_[573694928852]", + "Name": "Entity1", + "Components": { + "Component_[11525365929370623807]": { + "$type": "EditorVisibilityComponent", + "Id": 11525365929370623807 + }, + "Component_[12334620273692642550]": { + "$type": "EditorLockComponent", + "Id": 12334620273692642550 + }, + "Component_[14389735759337977675]": { + "$type": "EditorPendingCompositionComponent", + "Id": 14389735759337977675 + }, + "Component_[16184381538555246534]": { + "$type": "AZ::Render::EditorMeshComponent", + "Id": 16184381538555246534, + "Controller": { + "Configuration": { + "ModelAsset": { + "assetId": { + "guid": "{E14975EF-E676-51A4-B826-3EF59CB645AA}", + "subId": 285127096 + }, + "assetHint": "testdata/objects/cube/cube.azmodel" + } + } + } + }, + "Component_[17962478023087084794]": { + "$type": "SelectionComponent", + "Id": 17962478023087084794 + }, + "Component_[18071675051915092508]": { + "$type": "EditorEntityIconComponent", + "Id": 18071675051915092508 + }, + "Component_[2115498007879087044]": { + "$type": "EditorInspectorComponent", + "Id": 2115498007879087044, + "ComponentOrderEntryArray": [ + { + "ComponentId": 399415038452606756 + }, + { + "ComponentId": 16184381538555246534, + "SortIndex": 1 + }, + { + "ComponentId": 7827190074535394331, + "SortIndex": 2 + } + ] + }, + "Component_[3518973002096080237]": { + "$type": "EditorOnlyEntityComponent", + "Id": 3518973002096080237 + }, + "Component_[399415038452606756]": { + "$type": "{27F1E1A1-8D9D-4C3B-BD3A-AFB9762449C0} TransformComponent", + "Id": 399415038452606756, + "Parent Entity": "ContainerEntity", + "Transform Data": { + "Translate": [ + 42.53014373779297, + -0.00018183141946792603, + 59.873046875 + ] + } + }, + "Component_[4564240319609068082]": { + "$type": "EditorEntitySortComponent", + "Id": 4564240319609068082 + }, + "Component_[7827190074535394331]": { + "$type": "EditorMaterialComponent", + "Id": 7827190074535394331, + "Controller": { + "Configuration": { + "materials": [ + { + "Key": { + "materialSlotStableId": 2418540911 + }, + "Value": { + "MaterialAsset": { + "assetId": { + "guid": "{FB4657EB-FB3A-5EC3-A772-DC36D6F733C3}" + }, + "assetHint": "materials/presets/pbr/metal_gold_polished.azmaterial" + } + } + } + ] + } + } + }, + "Component_[8092226976542590265]": { + "$type": "EditorDisabledCompositionComponent", + "Id": 8092226976542590265 + } + } + }, + "Entity_[577989896148]": { + "Id": "Entity_[577989896148]", + "Name": "Entity1", + "Components": { + "Component_[11525365929370623807]": { + "$type": "EditorVisibilityComponent", + "Id": 11525365929370623807 + }, + "Component_[12334620273692642550]": { + "$type": "EditorLockComponent", + "Id": 12334620273692642550 + }, + "Component_[14389735759337977675]": { + "$type": "EditorPendingCompositionComponent", + "Id": 14389735759337977675 + }, + "Component_[16184381538555246534]": { + "$type": "AZ::Render::EditorMeshComponent", + "Id": 16184381538555246534, + "Controller": { + "Configuration": { + "ModelAsset": { + "assetId": { + "guid": "{E14975EF-E676-51A4-B826-3EF59CB645AA}", + "subId": 285127096 + }, + "assetHint": "testdata/objects/cube/cube.azmodel" + } + } + } + }, + "Component_[17962478023087084794]": { + "$type": "SelectionComponent", + "Id": 17962478023087084794 + }, + "Component_[18071675051915092508]": { + "$type": "EditorEntityIconComponent", + "Id": 18071675051915092508 + }, + "Component_[2115498007879087044]": { + "$type": "EditorInspectorComponent", + "Id": 2115498007879087044, + "ComponentOrderEntryArray": [ + { + "ComponentId": 399415038452606756 + }, + { + "ComponentId": 16184381538555246534, + "SortIndex": 1 + }, + { + "ComponentId": 7827190074535394331, + "SortIndex": 2 + } + ] + }, + "Component_[3518973002096080237]": { + "$type": "EditorOnlyEntityComponent", + "Id": 3518973002096080237 + }, + "Component_[399415038452606756]": { + "$type": "{27F1E1A1-8D9D-4C3B-BD3A-AFB9762449C0} TransformComponent", + "Id": 399415038452606756, + "Parent Entity": "ContainerEntity", + "Transform Data": { + "Translate": [ + -2.5305633544921875, + -0.00018183141946792603, + 114.4910659790039 + ] + } + }, + "Component_[4564240319609068082]": { + "$type": "EditorEntitySortComponent", + "Id": 4564240319609068082 + }, + "Component_[7827190074535394331]": { + "$type": "EditorMaterialComponent", + "Id": 7827190074535394331, + "Controller": { + "Configuration": { + "materials": [ + { + "Key": { + "materialSlotStableId": 2418540911 + }, + "Value": { + "MaterialAsset": { + "assetId": { + "guid": "{DC0598ED-1EDD-5B37-892E-E0867621D74C}" + }, + "assetHint": "materials/presets/pbr/metal_palladium.azmaterial" + } + } + } + ] + } + } + }, + "Component_[8092226976542590265]": { + "$type": "EditorDisabledCompositionComponent", + "Id": 8092226976542590265 + } + } + }, + "Entity_[582284863444]": { + "Id": "Entity_[582284863444]", + "Name": "Entity1", + "Components": { + "Component_[11525365929370623807]": { + "$type": "EditorVisibilityComponent", + "Id": 11525365929370623807 + }, + "Component_[12334620273692642550]": { + "$type": "EditorLockComponent", + "Id": 12334620273692642550 + }, + "Component_[14389735759337977675]": { + "$type": "EditorPendingCompositionComponent", + "Id": 14389735759337977675 + }, + "Component_[16184381538555246534]": { + "$type": "AZ::Render::EditorMeshComponent", + "Id": 16184381538555246534, + "Controller": { + "Configuration": { + "ModelAsset": { + "assetId": { + "guid": "{E14975EF-E676-51A4-B826-3EF59CB645AA}", + "subId": 285127096 + }, + "assetHint": "testdata/objects/cube/cube.azmodel" + } + } + } + }, + "Component_[17962478023087084794]": { + "$type": "SelectionComponent", + "Id": 17962478023087084794 + }, + "Component_[18071675051915092508]": { + "$type": "EditorEntityIconComponent", + "Id": 18071675051915092508 + }, + "Component_[2115498007879087044]": { + "$type": "EditorInspectorComponent", + "Id": 2115498007879087044, + "ComponentOrderEntryArray": [ + { + "ComponentId": 399415038452606756 + }, + { + "ComponentId": 16184381538555246534, + "SortIndex": 1 + }, + { + "ComponentId": 7827190074535394331, + "SortIndex": 2 + } + ] + }, + "Component_[3518973002096080237]": { + "$type": "EditorOnlyEntityComponent", + "Id": 3518973002096080237 + }, + "Component_[399415038452606756]": { + "$type": "{27F1E1A1-8D9D-4C3B-BD3A-AFB9762449C0} TransformComponent", + "Id": 399415038452606756, + "Parent Entity": "ContainerEntity", + "Transform Data": { + "Translate": [ + -32.53056335449219, + -0.00018183141946792603, + 74.93071746826172 + ] + } + }, + "Component_[4564240319609068082]": { + "$type": "EditorEntitySortComponent", + "Id": 4564240319609068082 + }, + "Component_[7827190074535394331]": { + "$type": "EditorMaterialComponent", + "Id": 7827190074535394331, + "Controller": { + "Configuration": { + "materials": [ + { + "Key": { + "materialSlotStableId": 2418540911 + }, + "Value": { + "MaterialAsset": { + "assetId": { + "guid": "{93DF55AE-8D1B-5AD1-A609-05F1BD9F6EA0}" + }, + "assetHint": "materials/presets/pbr/metal_cobalt_polished.azmaterial" + } + } + } + ] + } + } + }, + "Component_[8092226976542590265]": { + "$type": "EditorDisabledCompositionComponent", + "Id": 8092226976542590265 + } + } + }, + "Entity_[586579830740]": { + "Id": "Entity_[586579830740]", + "Name": "Entity1", + "Components": { + "Component_[11525365929370623807]": { + "$type": "EditorVisibilityComponent", + "Id": 11525365929370623807 + }, + "Component_[12334620273692642550]": { + "$type": "EditorLockComponent", + "Id": 12334620273692642550 + }, + "Component_[14389735759337977675]": { + "$type": "EditorPendingCompositionComponent", + "Id": 14389735759337977675 + }, + "Component_[16184381538555246534]": { + "$type": "AZ::Render::EditorMeshComponent", + "Id": 16184381538555246534, + "Controller": { + "Configuration": { + "ModelAsset": { + "assetId": { + "guid": "{E14975EF-E676-51A4-B826-3EF59CB645AA}", + "subId": 285127096 + }, + "assetHint": "testdata/objects/cube/cube.azmodel" + } + } + } + }, + "Component_[17962478023087084794]": { + "$type": "SelectionComponent", + "Id": 17962478023087084794 + }, + "Component_[18071675051915092508]": { + "$type": "EditorEntityIconComponent", + "Id": 18071675051915092508 + }, + "Component_[2115498007879087044]": { + "$type": "EditorInspectorComponent", + "Id": 2115498007879087044, + "ComponentOrderEntryArray": [ + { + "ComponentId": 399415038452606756 + }, + { + "ComponentId": 16184381538555246534, + "SortIndex": 1 + }, + { + "ComponentId": 7827190074535394331, + "SortIndex": 2 + } + ] + }, + "Component_[3518973002096080237]": { + "$type": "EditorOnlyEntityComponent", + "Id": 3518973002096080237 + }, + "Component_[399415038452606756]": { + "$type": "{27F1E1A1-8D9D-4C3B-BD3A-AFB9762449C0} TransformComponent", + "Id": 399415038452606756, + "Parent Entity": "ContainerEntity", + "Transform Data": { + "Translate": [ + -27.530563354492188, + -0.00018183141946792603, + 89.95755767822266 + ] + } + }, + "Component_[4564240319609068082]": { + "$type": "EditorEntitySortComponent", + "Id": 4564240319609068082 + }, + "Component_[7827190074535394331]": { + "$type": "EditorMaterialComponent", + "Id": 7827190074535394331, + "Controller": { + "Configuration": { + "materials": [ + { + "Key": { + "materialSlotStableId": 2418540911 + }, + "Value": { + "MaterialAsset": { + "assetId": { + "guid": "{CF5C7B01-4912-58AE-991A-F25251E505AC}" + }, + "assetHint": "materials/presets/pbr/metal_copper_polished.azmaterial" + } + } + } + ] + } + } + }, + "Component_[8092226976542590265]": { + "$type": "EditorDisabledCompositionComponent", + "Id": 8092226976542590265 + } + } + }, + "Entity_[590874798036]": { + "Id": "Entity_[590874798036]", + "Name": "Entity1", + "Components": { + "Component_[1057179753323467068]": { + "$type": "EditorMaterialComponent", + "Id": 1057179753323467068, + "Controller": { + "Configuration": { + "materials": [ + { + "Key": { + "materialSlotStableId": 2418540911 + }, + "Value": { + "MaterialAsset": { + "assetId": { + "guid": "{A3F3CD98-1634-5542-AD5A-78E91BE21AE9}" + }, + "assetHint": "materials/presets/pbr/metal_titanium_matte.azmaterial" + } + } + } + ] + } + } + }, + "Component_[11525365929370623807]": { + "$type": "EditorVisibilityComponent", + "Id": 11525365929370623807 + }, + "Component_[12334620273692642550]": { + "$type": "EditorLockComponent", + "Id": 12334620273692642550 + }, + "Component_[14389735759337977675]": { + "$type": "EditorPendingCompositionComponent", + "Id": 14389735759337977675 + }, + "Component_[16184381538555246534]": { + "$type": "AZ::Render::EditorMeshComponent", + "Id": 16184381538555246534, + "Controller": { + "Configuration": { + "ModelAsset": { + "assetId": { + "guid": "{E14975EF-E676-51A4-B826-3EF59CB645AA}", + "subId": 285127096 + }, + "assetHint": "testdata/objects/cube/cube.azmodel" + } + } + } + }, + "Component_[17962478023087084794]": { + "$type": "SelectionComponent", + "Id": 17962478023087084794 + }, + "Component_[18071675051915092508]": { + "$type": "EditorEntityIconComponent", + "Id": 18071675051915092508 + }, + "Component_[2115498007879087044]": { + "$type": "EditorInspectorComponent", + "Id": 2115498007879087044, + "ComponentOrderEntryArray": [ + { + "ComponentId": 399415038452606756 + }, + { + "ComponentId": 16184381538555246534, + "SortIndex": 1 + }, + { + "ComponentId": 1057179753323467068, + "SortIndex": 2 + } + ] + }, + "Component_[3518973002096080237]": { + "$type": "EditorOnlyEntityComponent", + "Id": 3518973002096080237 + }, + "Component_[399415038452606756]": { + "$type": "{27F1E1A1-8D9D-4C3B-BD3A-AFB9762449C0} TransformComponent", + "Id": 399415038452606756, + "Parent Entity": "ContainerEntity", + "Transform Data": { + "Translate": [ + 12.530143737792969, + -0.00018183141946792603, + 34.53608703613281 + ] + } + }, + "Component_[4564240319609068082]": { + "$type": "EditorEntitySortComponent", + "Id": 4564240319609068082 + }, + "Component_[8092226976542590265]": { + "$type": "EditorDisabledCompositionComponent", + "Id": 8092226976542590265 + } + } + }, + "Entity_[595169765332]": { + "Id": "Entity_[595169765332]", + "Name": "Entity1", + "Components": { + "Component_[1057179753323467068]": { + "$type": "EditorMaterialComponent", + "Id": 1057179753323467068, + "Controller": { + "Configuration": { + "materials": [ + { + "Key": { + "materialSlotStableId": 2418540911 + }, + "Value": { + "MaterialAsset": { + "assetId": { + "guid": "{721188E0-B7CC-5D06-8D5D-39AF8ABF2EF9}" + }, + "assetHint": "materials/presets/pbr/metal_titanium.azmaterial" + } + } + } + ] + } + } + }, + "Component_[11525365929370623807]": { + "$type": "EditorVisibilityComponent", + "Id": 11525365929370623807 + }, + "Component_[12334620273692642550]": { + "$type": "EditorLockComponent", + "Id": 12334620273692642550 + }, + "Component_[14389735759337977675]": { + "$type": "EditorPendingCompositionComponent", + "Id": 14389735759337977675 + }, + "Component_[16184381538555246534]": { + "$type": "AZ::Render::EditorMeshComponent", + "Id": 16184381538555246534, + "Controller": { + "Configuration": { + "ModelAsset": { + "assetId": { + "guid": "{E14975EF-E676-51A4-B826-3EF59CB645AA}", + "subId": 285127096 + }, + "assetHint": "testdata/objects/cube/cube.azmodel" + } + } + } + }, + "Component_[17962478023087084794]": { + "$type": "SelectionComponent", + "Id": 17962478023087084794 + }, + "Component_[18071675051915092508]": { + "$type": "EditorEntityIconComponent", + "Id": 18071675051915092508 + }, + "Component_[2115498007879087044]": { + "$type": "EditorInspectorComponent", + "Id": 2115498007879087044, + "ComponentOrderEntryArray": [ + { + "ComponentId": 399415038452606756 + }, + { + "ComponentId": 16184381538555246534, + "SortIndex": 1 + }, + { + "ComponentId": 1057179753323467068, + "SortIndex": 2 + } + ] + }, + "Component_[3518973002096080237]": { + "$type": "EditorOnlyEntityComponent", + "Id": 3518973002096080237 + }, + "Component_[399415038452606756]": { + "$type": "{27F1E1A1-8D9D-4C3B-BD3A-AFB9762449C0} TransformComponent", + "Id": 399415038452606756, + "Parent Entity": "ContainerEntity", + "Transform Data": { + "Translate": [ + 12.530143737792969, + -0.00018183141946792603, + 69.34888458251953 + ] + } + }, + "Component_[4564240319609068082]": { + "$type": "EditorEntitySortComponent", + "Id": 4564240319609068082 + }, + "Component_[8092226976542590265]": { + "$type": "EditorDisabledCompositionComponent", + "Id": 8092226976542590265 + } + } + }, + "Entity_[599464732628]": { + "Id": "Entity_[599464732628]", + "Name": "Entity1", + "Components": { + "Component_[11525365929370623807]": { + "$type": "EditorVisibilityComponent", + "Id": 11525365929370623807 + }, + "Component_[12334620273692642550]": { + "$type": "EditorLockComponent", + "Id": 12334620273692642550 + }, + "Component_[14389735759337977675]": { + "$type": "EditorPendingCompositionComponent", + "Id": 14389735759337977675 + }, + "Component_[16184381538555246534]": { + "$type": "AZ::Render::EditorMeshComponent", + "Id": 16184381538555246534, + "Controller": { + "Configuration": { + "ModelAsset": { + "assetId": { + "guid": "{E14975EF-E676-51A4-B826-3EF59CB645AA}", + "subId": 285127096 + }, + "assetHint": "testdata/objects/cube/cube.azmodel" + } + } + } + }, + "Component_[17962478023087084794]": { + "$type": "SelectionComponent", + "Id": 17962478023087084794 + }, + "Component_[18071675051915092508]": { + "$type": "EditorEntityIconComponent", + "Id": 18071675051915092508 + }, + "Component_[2115498007879087044]": { + "$type": "EditorInspectorComponent", + "Id": 2115498007879087044, + "ComponentOrderEntryArray": [ + { + "ComponentId": 399415038452606756 + }, + { + "ComponentId": 16184381538555246534, + "SortIndex": 1 + }, + { + "ComponentId": 7827190074535394331, + "SortIndex": 2 + } + ] + }, + "Component_[3518973002096080237]": { + "$type": "EditorOnlyEntityComponent", + "Id": 3518973002096080237 + }, + "Component_[399415038452606756]": { + "$type": "{27F1E1A1-8D9D-4C3B-BD3A-AFB9762449C0} TransformComponent", + "Id": 399415038452606756, + "Parent Entity": "ContainerEntity", + "Transform Data": { + "Translate": [ + 17.53014373779297, + -0.00018183141946792603, + 59.873046875 + ] + } + }, + "Component_[4564240319609068082]": { + "$type": "EditorEntitySortComponent", + "Id": 4564240319609068082 + }, + "Component_[7827190074535394331]": { + "$type": "EditorMaterialComponent", + "Id": 7827190074535394331, + "Controller": { + "Configuration": { + "materials": [ + { + "Key": {}, + "Value": { + "MaterialAsset": { + "assetId": { + "guid": "{721188E0-B7CC-5D06-8D5D-39AF8ABF2EF9}" + }, + "assetHint": "materials/presets/pbr/metal_titanium.azmaterial" + } + } + }, + { + "Key": { + "materialSlotStableId": 2418540911 + }, + "Value": { + "MaterialAsset": { + "assetId": { + "guid": "{64C1F6A6-6BDA-551A-BE56-1829E5913278}" + }, + "assetHint": "materials/presets/pbr/metal_aluminum_polished.azmaterial" + } + } + } + ] + } + } + }, + "Component_[8092226976542590265]": { + "$type": "EditorDisabledCompositionComponent", + "Id": 8092226976542590265 + } + } + }, + "Entity_[603759699924]": { + "Id": "Entity_[603759699924]", + "Name": "Entity1", + "Components": { + "Component_[11525365929370623807]": { + "$type": "EditorVisibilityComponent", + "Id": 11525365929370623807 + }, + "Component_[12334620273692642550]": { + "$type": "EditorLockComponent", + "Id": 12334620273692642550 + }, + "Component_[14389735759337977675]": { + "$type": "EditorPendingCompositionComponent", + "Id": 14389735759337977675 + }, + "Component_[16184381538555246534]": { + "$type": "AZ::Render::EditorMeshComponent", + "Id": 16184381538555246534, + "Controller": { + "Configuration": { + "ModelAsset": { + "assetId": { + "guid": "{E14975EF-E676-51A4-B826-3EF59CB645AA}", + "subId": 285127096 + }, + "assetHint": "testdata/objects/cube/cube.azmodel" + } + } + } + }, + "Component_[17962478023087084794]": { + "$type": "SelectionComponent", + "Id": 17962478023087084794 + }, + "Component_[18071675051915092508]": { + "$type": "EditorEntityIconComponent", + "Id": 18071675051915092508 + }, + "Component_[2115498007879087044]": { + "$type": "EditorInspectorComponent", + "Id": 2115498007879087044, + "ComponentOrderEntryArray": [ + { + "ComponentId": 399415038452606756 + }, + { + "ComponentId": 16184381538555246534, + "SortIndex": 1 + }, + { + "ComponentId": 7827190074535394331, + "SortIndex": 2 + } + ] + }, + "Component_[3518973002096080237]": { + "$type": "EditorOnlyEntityComponent", + "Id": 3518973002096080237 + }, + "Component_[399415038452606756]": { + "$type": "{27F1E1A1-8D9D-4C3B-BD3A-AFB9762449C0} TransformComponent", + "Id": 399415038452606756, + "Parent Entity": "ContainerEntity", + "Transform Data": { + "Translate": [ + -32.53056335449219, + -0.00018183141946792603, + 94.40913391113281 + ] + } + }, + "Component_[4564240319609068082]": { + "$type": "EditorEntitySortComponent", + "Id": 4564240319609068082 + }, + "Component_[7827190074535394331]": { + "$type": "EditorMaterialComponent", + "Id": 7827190074535394331, + "Controller": { + "Configuration": { + "materials": [ + { + "Key": { + "materialSlotStableId": 2418540911 + }, + "Value": { + "MaterialAsset": { + "assetId": { + "guid": "{C60A39AF-BB76-51BD-9468-A88C9A6F78D7}" + }, + "assetHint": "materials/presets/pbr/metal_cobalt_matte.azmaterial" + } + } + } + ] + } + } + }, + "Component_[8092226976542590265]": { + "$type": "EditorDisabledCompositionComponent", + "Id": 8092226976542590265 + } + } + }, + "Entity_[608054667220]": { + "Id": "Entity_[608054667220]", + "Name": "Entity1", + "Components": { + "Component_[11525365929370623807]": { + "$type": "EditorVisibilityComponent", + "Id": 11525365929370623807 + }, + "Component_[12334620273692642550]": { + "$type": "EditorLockComponent", + "Id": 12334620273692642550 + }, + "Component_[14389735759337977675]": { + "$type": "EditorPendingCompositionComponent", + "Id": 14389735759337977675 + }, + "Component_[16184381538555246534]": { + "$type": "AZ::Render::EditorMeshComponent", + "Id": 16184381538555246534, + "Controller": { + "Configuration": { + "ModelAsset": { + "assetId": { + "guid": "{E14975EF-E676-51A4-B826-3EF59CB645AA}", + "subId": 285127096 + }, + "assetHint": "testdata/objects/cube/cube.azmodel" + } + } + } + }, + "Component_[17962478023087084794]": { + "$type": "SelectionComponent", + "Id": 17962478023087084794 + }, + "Component_[18071675051915092508]": { + "$type": "EditorEntityIconComponent", + "Id": 18071675051915092508 + }, + "Component_[2115498007879087044]": { + "$type": "EditorInspectorComponent", + "Id": 2115498007879087044, + "ComponentOrderEntryArray": [ + { + "ComponentId": 399415038452606756 + }, + { + "ComponentId": 16184381538555246534, + "SortIndex": 1 + }, + { + "ComponentId": 7827190074535394331, + "SortIndex": 2 + } + ] + }, + "Component_[3518973002096080237]": { + "$type": "EditorOnlyEntityComponent", + "Id": 3518973002096080237 + }, + "Component_[399415038452606756]": { + "$type": "{27F1E1A1-8D9D-4C3B-BD3A-AFB9762449C0} TransformComponent", + "Id": 399415038452606756, + "Parent Entity": "ContainerEntity", + "Transform Data": { + "Translate": [ + -2.5305633544921875, + -0.00018183141946792603, + 24.533506393432617 + ] + } + }, + "Component_[4564240319609068082]": { + "$type": "EditorEntitySortComponent", + "Id": 4564240319609068082 + }, + "Component_[7827190074535394331]": { + "$type": "EditorMaterialComponent", + "Id": 7827190074535394331, + "Controller": { + "Configuration": { + "materials": [ + { + "Key": { + "materialSlotStableId": 2418540911 + }, + "Value": { + "MaterialAsset": { + "assetId": { + "guid": "{DC0598ED-1EDD-5B37-892E-E0867621D74C}" + }, + "assetHint": "materials/presets/pbr/metal_palladium.azmaterial" + } + } + } + ] + } + } + }, + "Component_[8092226976542590265]": { + "$type": "EditorDisabledCompositionComponent", + "Id": 8092226976542590265 + } + } + }, + "Entity_[612349634516]": { + "Id": "Entity_[612349634516]", + "Name": "Entity1", + "Components": { + "Component_[11525365929370623807]": { + "$type": "EditorVisibilityComponent", + "Id": 11525365929370623807 + }, + "Component_[12334620273692642550]": { + "$type": "EditorLockComponent", + "Id": 12334620273692642550 + }, + "Component_[14389735759337977675]": { + "$type": "EditorPendingCompositionComponent", + "Id": 14389735759337977675 + }, + "Component_[16184381538555246534]": { + "$type": "AZ::Render::EditorMeshComponent", + "Id": 16184381538555246534, + "Controller": { + "Configuration": { + "ModelAsset": { + "assetId": { + "guid": "{E14975EF-E676-51A4-B826-3EF59CB645AA}", + "subId": 285127096 + }, + "assetHint": "testdata/objects/cube/cube.azmodel" + } + } + } + }, + "Component_[17962478023087084794]": { + "$type": "SelectionComponent", + "Id": 17962478023087084794 + }, + "Component_[18071675051915092508]": { + "$type": "EditorEntityIconComponent", + "Id": 18071675051915092508 + }, + "Component_[2115498007879087044]": { + "$type": "EditorInspectorComponent", + "Id": 2115498007879087044, + "ComponentOrderEntryArray": [ + { + "ComponentId": 399415038452606756 + }, + { + "ComponentId": 16184381538555246534, + "SortIndex": 1 + }, + { + "ComponentId": 7827190074535394331, + "SortIndex": 2 + } + ] + }, + "Component_[3518973002096080237]": { + "$type": "EditorOnlyEntityComponent", + "Id": 3518973002096080237 + }, + "Component_[399415038452606756]": { + "$type": "{27F1E1A1-8D9D-4C3B-BD3A-AFB9762449C0} TransformComponent", + "Id": 399415038452606756, + "Parent Entity": "ContainerEntity", + "Transform Data": { + "Translate": [ + 2.5301437377929688, + -0.00018183141946792603, + 79.38228607177734 + ] + } + }, + "Component_[4564240319609068082]": { + "$type": "EditorEntitySortComponent", + "Id": 4564240319609068082 + }, + "Component_[7827190074535394331]": { + "$type": "EditorMaterialComponent", + "Id": 7827190074535394331, + "Controller": { + "Configuration": { + "materials": [ + { + "Key": { + "materialSlotStableId": 2418540911 + }, + "Value": { + "MaterialAsset": { + "assetId": { + "guid": "{60D4CA04-A2FE-5AE7-B472-694C38D05183}" + }, + "assetHint": "materials/presets/pbr/metal_platinum_matte.azmaterial" + } + } + } + ] + } + } + }, + "Component_[8092226976542590265]": { + "$type": "EditorDisabledCompositionComponent", + "Id": 8092226976542590265 + } + } + }, + "Entity_[616644601812]": { + "Id": "Entity_[616644601812]", + "Name": "Entity1", + "Components": { + "Component_[11525365929370623807]": { + "$type": "EditorVisibilityComponent", + "Id": 11525365929370623807 + }, + "Component_[12334620273692642550]": { + "$type": "EditorLockComponent", + "Id": 12334620273692642550 + }, + "Component_[14389735759337977675]": { + "$type": "EditorPendingCompositionComponent", + "Id": 14389735759337977675 + }, + "Component_[16184381538555246534]": { + "$type": "AZ::Render::EditorMeshComponent", + "Id": 16184381538555246534, + "Controller": { + "Configuration": { + "ModelAsset": { + "assetId": { + "guid": "{E14975EF-E676-51A4-B826-3EF59CB645AA}", + "subId": 285127096 + }, + "assetHint": "testdata/objects/cube/cube.azmodel" + } + } + } + }, + "Component_[17962478023087084794]": { + "$type": "SelectionComponent", + "Id": 17962478023087084794 + }, + "Component_[18071675051915092508]": { + "$type": "EditorEntityIconComponent", + "Id": 18071675051915092508 + }, + "Component_[2115498007879087044]": { + "$type": "EditorInspectorComponent", + "Id": 2115498007879087044, + "ComponentOrderEntryArray": [ + { + "ComponentId": 399415038452606756 + }, + { + "ComponentId": 16184381538555246534, + "SortIndex": 1 + }, + { + "ComponentId": 7827190074535394331, + "SortIndex": 2 + } + ] + }, + "Component_[3518973002096080237]": { + "$type": "EditorOnlyEntityComponent", + "Id": 3518973002096080237 + }, + "Component_[399415038452606756]": { + "$type": "{27F1E1A1-8D9D-4C3B-BD3A-AFB9762449C0} TransformComponent", + "Id": 399415038452606756, + "Parent Entity": "ContainerEntity", + "Transform Data": { + "Translate": [ + -17.530563354492188, + -0.00018183141946792603, + 39.56034851074219 + ] + } + }, + "Component_[4564240319609068082]": { + "$type": "EditorEntitySortComponent", + "Id": 4564240319609068082 + }, + "Component_[7827190074535394331]": { + "$type": "EditorMaterialComponent", + "Id": 7827190074535394331, + "Controller": { + "Configuration": { + "materials": [ + { + "Key": { + "materialSlotStableId": 2418540911 + }, + "Value": { + "MaterialAsset": { + "assetId": { + "guid": "{892EA944-0325-5FA6-94D7-4AB4FC02A0F5}" + }, + "assetHint": "materials/presets/pbr/metal_iron.azmaterial" + } + } + } + ] + } + } + }, + "Component_[8092226976542590265]": { + "$type": "EditorDisabledCompositionComponent", + "Id": 8092226976542590265 + } + } + }, + "Entity_[620939569108]": { + "Id": "Entity_[620939569108]", + "Name": "Entity1", + "Components": { + "Component_[11525365929370623807]": { + "$type": "EditorVisibilityComponent", + "Id": 11525365929370623807 + }, + "Component_[12334620273692642550]": { + "$type": "EditorLockComponent", + "Id": 12334620273692642550 + }, + "Component_[14389735759337977675]": { + "$type": "EditorPendingCompositionComponent", + "Id": 14389735759337977675 + }, + "Component_[16184381538555246534]": { + "$type": "AZ::Render::EditorMeshComponent", + "Id": 16184381538555246534, + "Controller": { + "Configuration": { + "ModelAsset": { + "assetId": { + "guid": "{E14975EF-E676-51A4-B826-3EF59CB645AA}", + "subId": 285127096 + }, + "assetHint": "testdata/objects/cube/cube.azmodel" + } + } + } + }, + "Component_[17962478023087084794]": { + "$type": "SelectionComponent", + "Id": 17962478023087084794 + }, + "Component_[18071675051915092508]": { + "$type": "EditorEntityIconComponent", + "Id": 18071675051915092508 + }, + "Component_[2115498007879087044]": { + "$type": "EditorInspectorComponent", + "Id": 2115498007879087044, + "ComponentOrderEntryArray": [ + { + "ComponentId": 399415038452606756 + }, + { + "ComponentId": 16184381538555246534, + "SortIndex": 1 + }, + { + "ComponentId": 7827190074535394331, + "SortIndex": 2 + } + ] + }, + "Component_[3518973002096080237]": { + "$type": "EditorOnlyEntityComponent", + "Id": 3518973002096080237 + }, + "Component_[399415038452606756]": { + "$type": "{27F1E1A1-8D9D-4C3B-BD3A-AFB9762449C0} TransformComponent", + "Id": 399415038452606756, + "Parent Entity": "ContainerEntity", + "Transform Data": { + "Translate": [ + -47.53056335449219, + -0.00018183141946792603, + 105.0152359008789 + ] + } + }, + "Component_[4564240319609068082]": { + "$type": "EditorEntitySortComponent", + "Id": 4564240319609068082 + }, + "Component_[7827190074535394331]": { + "$type": "EditorMaterialComponent", + "Id": 7827190074535394331, + "Controller": { + "Configuration": { + "materials": [ + { + "Key": { + "materialSlotStableId": 2418540911 + }, + "Value": { + "MaterialAsset": { + "assetId": { + "guid": "{64C1F6A6-6BDA-551A-BE56-1829E5913278}" + }, + "assetHint": "materials/presets/pbr/metal_aluminum_polished.azmaterial" + } + } + } + ] + } + } + }, + "Component_[8092226976542590265]": { + "$type": "EditorDisabledCompositionComponent", + "Id": 8092226976542590265 + } + } + }, + "Entity_[625234536404]": { + "Id": "Entity_[625234536404]", + "Name": "Entity1", + "Components": { + "Component_[11525365929370623807]": { + "$type": "EditorVisibilityComponent", + "Id": 11525365929370623807 + }, + "Component_[12334620273692642550]": { + "$type": "EditorLockComponent", + "Id": 12334620273692642550 + }, + "Component_[14389735759337977675]": { + "$type": "EditorPendingCompositionComponent", + "Id": 14389735759337977675 + }, + "Component_[16184381538555246534]": { + "$type": "AZ::Render::EditorMeshComponent", + "Id": 16184381538555246534, + "Controller": { + "Configuration": { + "ModelAsset": { + "assetId": { + "guid": "{E14975EF-E676-51A4-B826-3EF59CB645AA}", + "subId": 285127096 + }, + "assetHint": "testdata/objects/cube/cube.azmodel" + } + } + } + }, + "Component_[17962478023087084794]": { + "$type": "SelectionComponent", + "Id": 17962478023087084794 + }, + "Component_[18071675051915092508]": { + "$type": "EditorEntityIconComponent", + "Id": 18071675051915092508 + }, + "Component_[2115498007879087044]": { + "$type": "EditorInspectorComponent", + "Id": 2115498007879087044, + "ComponentOrderEntryArray": [ + { + "ComponentId": 399415038452606756 + }, + { + "ComponentId": 16184381538555246534, + "SortIndex": 1 + }, + { + "ComponentId": 7827190074535394331, + "SortIndex": 2 + } + ] + }, + "Component_[3518973002096080237]": { + "$type": "EditorOnlyEntityComponent", + "Id": 3518973002096080237 + }, + "Component_[399415038452606756]": { + "$type": "{27F1E1A1-8D9D-4C3B-BD3A-AFB9762449C0} TransformComponent", + "Id": 399415038452606756, + "Parent Entity": "ContainerEntity", + "Transform Data": { + "Translate": [ + -32.53056335449219, + -0.00018183141946792603, + 54.618019104003906 + ] + } + }, + "Component_[4564240319609068082]": { + "$type": "EditorEntitySortComponent", + "Id": 4564240319609068082 + }, + "Component_[7827190074535394331]": { + "$type": "EditorMaterialComponent", + "Id": 7827190074535394331, + "Controller": { + "Configuration": { + "materials": [ + { + "Key": { + "materialSlotStableId": 2418540911 + }, + "Value": { + "MaterialAsset": { + "assetId": { + "guid": "{99976D73-6248-5D66-AD15-E8F52B0AFE36}" + }, + "assetHint": "materials/presets/pbr/metal_cobalt.azmaterial" + } + } + } + ] + } + } + }, + "Component_[8092226976542590265]": { + "$type": "EditorDisabledCompositionComponent", + "Id": 8092226976542590265 + } + } + }, + "Entity_[629529503700]": { + "Id": "Entity_[629529503700]", + "Name": "Entity1", + "Components": { + "Component_[11525365929370623807]": { + "$type": "EditorVisibilityComponent", + "Id": 11525365929370623807 + }, + "Component_[12334620273692642550]": { + "$type": "EditorLockComponent", + "Id": 12334620273692642550 + }, + "Component_[14389735759337977675]": { + "$type": "EditorPendingCompositionComponent", + "Id": 14389735759337977675 + }, + "Component_[16184381538555246534]": { + "$type": "AZ::Render::EditorMeshComponent", + "Id": 16184381538555246534, + "Controller": { + "Configuration": { + "ModelAsset": { + "assetId": { + "guid": "{E14975EF-E676-51A4-B826-3EF59CB645AA}", + "subId": 285127096 + }, + "assetHint": "testdata/objects/cube/cube.azmodel" + } + } + } + }, + "Component_[17962478023087084794]": { + "$type": "SelectionComponent", + "Id": 17962478023087084794 + }, + "Component_[18071675051915092508]": { + "$type": "EditorEntityIconComponent", + "Id": 18071675051915092508 + }, + "Component_[2115498007879087044]": { + "$type": "EditorInspectorComponent", + "Id": 2115498007879087044, + "ComponentOrderEntryArray": [ + { + "ComponentId": 399415038452606756 + }, + { + "ComponentId": 16184381538555246534, + "SortIndex": 1 + }, + { + "ComponentId": 7827190074535394331, + "SortIndex": 2 + } + ] + }, + "Component_[3518973002096080237]": { + "$type": "EditorOnlyEntityComponent", + "Id": 3518973002096080237 + }, + "Component_[399415038452606756]": { + "$type": "{27F1E1A1-8D9D-4C3B-BD3A-AFB9762449C0} TransformComponent", + "Id": 399415038452606756, + "Parent Entity": "ContainerEntity", + "Transform Data": { + "Translate": [ + -42.53056335449219, + -0.00018183141946792603, + 94.40913391113281 + ] + } + }, + "Component_[4564240319609068082]": { + "$type": "EditorEntitySortComponent", + "Id": 4564240319609068082 + }, + "Component_[7827190074535394331]": { + "$type": "EditorMaterialComponent", + "Id": 7827190074535394331, + "Controller": { + "Configuration": { + "materials": [ + { + "Key": { + "materialSlotStableId": 2418540911 + }, + "Value": { + "MaterialAsset": { + "assetId": { + "guid": "{AE350D9F-0000-526D-B49C-4303D687BB86}" + }, + "assetHint": "materials/presets/pbr/metal_brass_matte.azmaterial" + } + } + } + ] + } + } + }, + "Component_[8092226976542590265]": { + "$type": "EditorDisabledCompositionComponent", + "Id": 8092226976542590265 + } + } + }, + "Entity_[633824470996]": { + "Id": "Entity_[633824470996]", + "Name": "Entity1", + "Components": { + "Component_[11525365929370623807]": { + "$type": "EditorVisibilityComponent", + "Id": 11525365929370623807 + }, + "Component_[12334620273692642550]": { + "$type": "EditorLockComponent", + "Id": 12334620273692642550 + }, + "Component_[14389735759337977675]": { + "$type": "EditorPendingCompositionComponent", + "Id": 14389735759337977675 + }, + "Component_[16184381538555246534]": { + "$type": "AZ::Render::EditorMeshComponent", + "Id": 16184381538555246534, + "Controller": { + "Configuration": { + "ModelAsset": { + "assetId": { + "guid": "{E14975EF-E676-51A4-B826-3EF59CB645AA}", + "subId": 285127096 + }, + "assetHint": "testdata/objects/cube/cube.azmodel" + } + } + } + }, + "Component_[17962478023087084794]": { + "$type": "SelectionComponent", + "Id": 17962478023087084794 + }, + "Component_[18071675051915092508]": { + "$type": "EditorEntityIconComponent", + "Id": 18071675051915092508 + }, + "Component_[2115498007879087044]": { + "$type": "EditorInspectorComponent", + "Id": 2115498007879087044, + "ComponentOrderEntryArray": [ + { + "ComponentId": 399415038452606756 + }, + { + "ComponentId": 16184381538555246534, + "SortIndex": 1 + }, + { + "ComponentId": 7827190074535394331, + "SortIndex": 2 + } + ] + }, + "Component_[3518973002096080237]": { + "$type": "EditorOnlyEntityComponent", + "Id": 3518973002096080237 + }, + "Component_[399415038452606756]": { + "$type": "{27F1E1A1-8D9D-4C3B-BD3A-AFB9762449C0} TransformComponent", + "Id": 399415038452606756, + "Parent Entity": "ContainerEntity", + "Transform Data": { + "Translate": [ + -32.53056335449219, + -0.00018183141946792603, + 30.08451271057129 + ] + } + }, + "Component_[4564240319609068082]": { + "$type": "EditorEntitySortComponent", + "Id": 4564240319609068082 + }, + "Component_[7827190074535394331]": { + "$type": "EditorMaterialComponent", + "Id": 7827190074535394331, + "Controller": { + "Configuration": { + "materials": [ + { + "Key": { + "materialSlotStableId": 2418540911 + }, + "Value": { + "MaterialAsset": { + "assetId": { + "guid": "{93DF55AE-8D1B-5AD1-A609-05F1BD9F6EA0}" + }, + "assetHint": "materials/presets/pbr/metal_cobalt_polished.azmaterial" + } + } + } + ] + } + } + }, + "Component_[8092226976542590265]": { + "$type": "EditorDisabledCompositionComponent", + "Id": 8092226976542590265 + } + } + }, + "Entity_[638119438292]": { + "Id": "Entity_[638119438292]", + "Name": "Entity1", + "Components": { + "Component_[11525365929370623807]": { + "$type": "EditorVisibilityComponent", + "Id": 11525365929370623807 + }, + "Component_[12334620273692642550]": { + "$type": "EditorLockComponent", + "Id": 12334620273692642550 + }, + "Component_[14389735759337977675]": { + "$type": "EditorPendingCompositionComponent", + "Id": 14389735759337977675 + }, + "Component_[16184381538555246534]": { + "$type": "AZ::Render::EditorMeshComponent", + "Id": 16184381538555246534, + "Controller": { + "Configuration": { + "ModelAsset": { + "assetId": { + "guid": "{E14975EF-E676-51A4-B826-3EF59CB645AA}", + "subId": 285127096 + }, + "assetHint": "testdata/objects/cube/cube.azmodel" + } + } + } + }, + "Component_[17962478023087084794]": { + "$type": "SelectionComponent", + "Id": 17962478023087084794 + }, + "Component_[18071675051915092508]": { + "$type": "EditorEntityIconComponent", + "Id": 18071675051915092508 + }, + "Component_[2115498007879087044]": { + "$type": "EditorInspectorComponent", + "Id": 2115498007879087044, + "ComponentOrderEntryArray": [ + { + "ComponentId": 399415038452606756 + }, + { + "ComponentId": 16184381538555246534, + "SortIndex": 1 + }, + { + "ComponentId": 7827190074535394331, + "SortIndex": 2 + } + ] + }, + "Component_[3518973002096080237]": { + "$type": "EditorOnlyEntityComponent", + "Id": 3518973002096080237 + }, + "Component_[399415038452606756]": { + "$type": "{27F1E1A1-8D9D-4C3B-BD3A-AFB9762449C0} TransformComponent", + "Id": 399415038452606756, + "Parent Entity": "ContainerEntity", + "Transform Data": { + "Translate": [ + 27.53014373779297, + -0.00018183141946792603, + 94.40913391113281 + ] + } + }, + "Component_[4564240319609068082]": { + "$type": "EditorEntitySortComponent", + "Id": 4564240319609068082 + }, + "Component_[7827190074535394331]": { + "$type": "EditorMaterialComponent", + "Id": 7827190074535394331, + "Controller": { + "Configuration": { + "materials": [ + { + "Key": { + "materialSlotStableId": 2418540911 + }, + "Value": { + "MaterialAsset": { + "assetId": { + "guid": "{A78EA2FC-688B-5E3A-A7F6-DB413D11D4CF}" + }, + "assetHint": "materials/presets/pbr/metal_chrome_matte.azmaterial" + } + } + } + ] + } + } + }, + "Component_[8092226976542590265]": { + "$type": "EditorDisabledCompositionComponent", + "Id": 8092226976542590265 + } + } + }, + "Entity_[642414405588]": { + "Id": "Entity_[642414405588]", + "Name": "Entity1", + "Components": { + "Component_[11525365929370623807]": { + "$type": "EditorVisibilityComponent", + "Id": 11525365929370623807 + }, + "Component_[12334620273692642550]": { + "$type": "EditorLockComponent", + "Id": 12334620273692642550 + }, + "Component_[14389735759337977675]": { + "$type": "EditorPendingCompositionComponent", + "Id": 14389735759337977675 + }, + "Component_[16184381538555246534]": { + "$type": "AZ::Render::EditorMeshComponent", + "Id": 16184381538555246534, + "Controller": { + "Configuration": { + "ModelAsset": { + "assetId": { + "guid": "{E14975EF-E676-51A4-B826-3EF59CB645AA}", + "subId": 285127096 + }, + "assetHint": "testdata/objects/cube/cube.azmodel" + } + } + } + }, + "Component_[17962478023087084794]": { + "$type": "SelectionComponent", + "Id": 17962478023087084794 + }, + "Component_[18071675051915092508]": { + "$type": "EditorEntityIconComponent", + "Id": 18071675051915092508 + }, + "Component_[2115498007879087044]": { + "$type": "EditorInspectorComponent", + "Id": 2115498007879087044, + "ComponentOrderEntryArray": [ + { + "ComponentId": 399415038452606756 + }, + { + "ComponentId": 16184381538555246534, + "SortIndex": 1 + }, + { + "ComponentId": 7827190074535394331, + "SortIndex": 2 + } + ] + }, + "Component_[3518973002096080237]": { + "$type": "EditorOnlyEntityComponent", + "Id": 3518973002096080237 + }, + "Component_[399415038452606756]": { + "$type": "{27F1E1A1-8D9D-4C3B-BD3A-AFB9762449C0} TransformComponent", + "Id": 399415038452606756, + "Parent Entity": "ContainerEntity", + "Transform Data": { + "Translate": [ + 32.53014373779297, + -0.00018183141946792603, + 89.95755767822266 + ] + } + }, + "Component_[4564240319609068082]": { + "$type": "EditorEntitySortComponent", + "Id": 4564240319609068082 + }, + "Component_[7827190074535394331]": { + "$type": "EditorMaterialComponent", + "Id": 7827190074535394331, + "Controller": { + "Configuration": { + "materials": [ + { + "Key": { + "materialSlotStableId": 2418540911 + }, + "Value": { + "MaterialAsset": { + "assetId": { + "guid": "{93DF55AE-8D1B-5AD1-A609-05F1BD9F6EA0}" + }, + "assetHint": "materials/presets/pbr/metal_cobalt_polished.azmaterial" + } + } + } + ] + } + } + }, + "Component_[8092226976542590265]": { + "$type": "EditorDisabledCompositionComponent", + "Id": 8092226976542590265 + } + } + }, + "Entity_[646709372884]": { + "Id": "Entity_[646709372884]", + "Name": "Entity1", + "Components": { + "Component_[11525365929370623807]": { + "$type": "EditorVisibilityComponent", + "Id": 11525365929370623807 + }, + "Component_[12334620273692642550]": { + "$type": "EditorLockComponent", + "Id": 12334620273692642550 + }, + "Component_[14389735759337977675]": { + "$type": "EditorPendingCompositionComponent", + "Id": 14389735759337977675 + }, + "Component_[16184381538555246534]": { + "$type": "AZ::Render::EditorMeshComponent", + "Id": 16184381538555246534, + "Controller": { + "Configuration": { + "ModelAsset": { + "assetId": { + "guid": "{E14975EF-E676-51A4-B826-3EF59CB645AA}", + "subId": 285127096 + }, + "assetHint": "testdata/objects/cube/cube.azmodel" + } + } + } + }, + "Component_[17962478023087084794]": { + "$type": "SelectionComponent", + "Id": 17962478023087084794 + }, + "Component_[18071675051915092508]": { + "$type": "EditorEntityIconComponent", + "Id": 18071675051915092508 + }, + "Component_[2115498007879087044]": { + "$type": "EditorInspectorComponent", + "Id": 2115498007879087044, + "ComponentOrderEntryArray": [ + { + "ComponentId": 399415038452606756 + }, + { + "ComponentId": 16184381538555246534, + "SortIndex": 1 + }, + { + "ComponentId": 7827190074535394331, + "SortIndex": 2 + } + ] + }, + "Component_[3518973002096080237]": { + "$type": "EditorOnlyEntityComponent", + "Id": 3518973002096080237 + }, + "Component_[399415038452606756]": { + "$type": "{27F1E1A1-8D9D-4C3B-BD3A-AFB9762449C0} TransformComponent", + "Id": 399415038452606756, + "Parent Entity": "ContainerEntity", + "Transform Data": { + "Translate": [ + 27.53014373779297, + -0.00018183141946792603, + 69.34888458251953 + ] + } + }, + "Component_[4564240319609068082]": { + "$type": "EditorEntitySortComponent", + "Id": 4564240319609068082 + }, + "Component_[7827190074535394331]": { + "$type": "EditorMaterialComponent", + "Id": 7827190074535394331, + "Controller": { + "Configuration": { + "materials": [ + { + "Key": { + "materialSlotStableId": 2418540911 + }, + "Value": { + "MaterialAsset": { + "assetId": { + "guid": "{B7C712DC-4839-58BB-B522-A4F120084CF5}" + }, + "assetHint": "materials/presets/pbr/metal_chrome.azmaterial" + } + } + } + ] + } + } + }, + "Component_[8092226976542590265]": { + "$type": "EditorDisabledCompositionComponent", + "Id": 8092226976542590265 + } + } + }, + "Entity_[651004340180]": { + "Id": "Entity_[651004340180]", + "Name": "Entity1", + "Components": { + "Component_[11525365929370623807]": { + "$type": "EditorVisibilityComponent", + "Id": 11525365929370623807 + }, + "Component_[12334620273692642550]": { + "$type": "EditorLockComponent", + "Id": 12334620273692642550 + }, + "Component_[14389735759337977675]": { + "$type": "EditorPendingCompositionComponent", + "Id": 14389735759337977675 + }, + "Component_[16184381538555246534]": { + "$type": "AZ::Render::EditorMeshComponent", + "Id": 16184381538555246534, + "Controller": { + "Configuration": { + "ModelAsset": { + "assetId": { + "guid": "{E14975EF-E676-51A4-B826-3EF59CB645AA}", + "subId": 285127096 + }, + "assetHint": "testdata/objects/cube/cube.azmodel" + } + } + } + }, + "Component_[17962478023087084794]": { + "$type": "SelectionComponent", + "Id": 17962478023087084794 + }, + "Component_[18071675051915092508]": { + "$type": "EditorEntityIconComponent", + "Id": 18071675051915092508 + }, + "Component_[2115498007879087044]": { + "$type": "EditorInspectorComponent", + "Id": 2115498007879087044, + "ComponentOrderEntryArray": [ + { + "ComponentId": 399415038452606756 + }, + { + "ComponentId": 16184381538555246534, + "SortIndex": 1 + }, + { + "ComponentId": 7827190074535394331, + "SortIndex": 2 + } + ] + }, + "Component_[3518973002096080237]": { + "$type": "EditorOnlyEntityComponent", + "Id": 3518973002096080237 + }, + "Component_[399415038452606756]": { + "$type": "{27F1E1A1-8D9D-4C3B-BD3A-AFB9762449C0} TransformComponent", + "Id": 399415038452606756, + "Parent Entity": "ContainerEntity", + "Transform Data": { + "Translate": [ + -17.530563354492188, + -0.00018183141946792603, + 30.08451271057129 + ] + } + }, + "Component_[4564240319609068082]": { + "$type": "EditorEntitySortComponent", + "Id": 4564240319609068082 + }, + "Component_[7827190074535394331]": { + "$type": "EditorMaterialComponent", + "Id": 7827190074535394331, + "Controller": { + "Configuration": { + "materials": [ + { + "Key": { + "materialSlotStableId": 2418540911 + }, + "Value": { + "MaterialAsset": { + "assetId": { + "guid": "{A7F03135-ECAD-5440-99DB-E84ABA3D50DA}" + }, + "assetHint": "materials/presets/pbr/metal_iron_polished.azmaterial" + } + } + } + ] + } + } + }, + "Component_[8092226976542590265]": { + "$type": "EditorDisabledCompositionComponent", + "Id": 8092226976542590265 + } + } + }, + "Entity_[655299307476]": { + "Id": "Entity_[655299307476]", + "Name": "Entity1", + "Components": { + "Component_[11525365929370623807]": { + "$type": "EditorVisibilityComponent", + "Id": 11525365929370623807 + }, + "Component_[12334620273692642550]": { + "$type": "EditorLockComponent", + "Id": 12334620273692642550 + }, + "Component_[14389735759337977675]": { + "$type": "EditorPendingCompositionComponent", + "Id": 14389735759337977675 + }, + "Component_[16184381538555246534]": { + "$type": "AZ::Render::EditorMeshComponent", + "Id": 16184381538555246534, + "Controller": { + "Configuration": { + "ModelAsset": { + "assetId": { + "guid": "{E14975EF-E676-51A4-B826-3EF59CB645AA}", + "subId": 285127096 + }, + "assetHint": "testdata/objects/cube/cube.azmodel" + } + } + } + }, + "Component_[17962478023087084794]": { + "$type": "SelectionComponent", + "Id": 17962478023087084794 + }, + "Component_[18071675051915092508]": { + "$type": "EditorEntityIconComponent", + "Id": 18071675051915092508 + }, + "Component_[2115498007879087044]": { + "$type": "EditorInspectorComponent", + "Id": 2115498007879087044, + "ComponentOrderEntryArray": [ + { + "ComponentId": 399415038452606756 + }, + { + "ComponentId": 16184381538555246534, + "SortIndex": 1 + }, + { + "ComponentId": 7827190074535394331, + "SortIndex": 2 + } + ] + }, + "Component_[3518973002096080237]": { + "$type": "EditorOnlyEntityComponent", + "Id": 3518973002096080237 + }, + "Component_[399415038452606756]": { + "$type": "{27F1E1A1-8D9D-4C3B-BD3A-AFB9762449C0} TransformComponent", + "Id": 399415038452606756, + "Parent Entity": "ContainerEntity", + "Transform Data": { + "Translate": [ + 42.53014373779297, + -0.00018183141946792603, + 69.34888458251953 + ] + } + }, + "Component_[4564240319609068082]": { + "$type": "EditorEntitySortComponent", + "Id": 4564240319609068082 + }, + "Component_[7827190074535394331]": { + "$type": "EditorMaterialComponent", + "Id": 7827190074535394331, + "Controller": { + "Configuration": { + "materials": [ + { + "Key": { + "materialSlotStableId": 2418540911 + }, + "Value": { + "MaterialAsset": { + "assetId": { + "guid": "{FE52E7C8-064D-506A-9C26-433EB93747DE}" + }, + "assetHint": "materials/presets/pbr/metal_gold.azmaterial" + } + } + } + ] + } + } + }, + "Component_[8092226976542590265]": { + "$type": "EditorDisabledCompositionComponent", + "Id": 8092226976542590265 + } + } + }, + "Entity_[659594274772]": { + "Id": "Entity_[659594274772]", + "Name": "Entity1", + "Components": { + "Component_[11525365929370623807]": { + "$type": "EditorVisibilityComponent", + "Id": 11525365929370623807 + }, + "Component_[12334620273692642550]": { + "$type": "EditorLockComponent", + "Id": 12334620273692642550 + }, + "Component_[14389735759337977675]": { + "$type": "EditorPendingCompositionComponent", + "Id": 14389735759337977675 + }, + "Component_[16184381538555246534]": { + "$type": "AZ::Render::EditorMeshComponent", + "Id": 16184381538555246534, + "Controller": { + "Configuration": { + "ModelAsset": { + "assetId": { + "guid": "{E14975EF-E676-51A4-B826-3EF59CB645AA}", + "subId": 285127096 + }, + "assetHint": "testdata/objects/cube/cube.azmodel" + } + } + } + }, + "Component_[17962478023087084794]": { + "$type": "SelectionComponent", + "Id": 17962478023087084794 + }, + "Component_[18071675051915092508]": { + "$type": "EditorEntityIconComponent", + "Id": 18071675051915092508 + }, + "Component_[2115498007879087044]": { + "$type": "EditorInspectorComponent", + "Id": 2115498007879087044, + "ComponentOrderEntryArray": [ + { + "ComponentId": 399415038452606756 + }, + { + "ComponentId": 16184381538555246534, + "SortIndex": 1 + }, + { + "ComponentId": 7827190074535394331, + "SortIndex": 2 + } + ] + }, + "Component_[3518973002096080237]": { + "$type": "EditorOnlyEntityComponent", + "Id": 3518973002096080237 + }, + "Component_[399415038452606756]": { + "$type": "{27F1E1A1-8D9D-4C3B-BD3A-AFB9762449C0} TransformComponent", + "Id": 399415038452606756, + "Parent Entity": "ContainerEntity", + "Transform Data": { + "Translate": [ + 2.5301437377929688, + -0.00018183141946792603, + 34.53608703613281 + ] + } + }, + "Component_[4564240319609068082]": { + "$type": "EditorEntitySortComponent", + "Id": 4564240319609068082 + }, + "Component_[7827190074535394331]": { + "$type": "EditorMaterialComponent", + "Id": 7827190074535394331, + "Controller": { + "Configuration": { + "materials": [ + { + "Key": { + "materialSlotStableId": 2418540911 + }, + "Value": { + "MaterialAsset": { + "assetId": { + "guid": "{60D4CA04-A2FE-5AE7-B472-694C38D05183}" + }, + "assetHint": "materials/presets/pbr/metal_platinum_matte.azmaterial" + } + } + } + ] + } + } + }, + "Component_[8092226976542590265]": { + "$type": "EditorDisabledCompositionComponent", + "Id": 8092226976542590265 + } + } + }, + "Entity_[663889242068]": { + "Id": "Entity_[663889242068]", + "Name": "Entity1", + "Components": { + "Component_[11525365929370623807]": { + "$type": "EditorVisibilityComponent", + "Id": 11525365929370623807 + }, + "Component_[12334620273692642550]": { + "$type": "EditorLockComponent", + "Id": 12334620273692642550 + }, + "Component_[14389735759337977675]": { + "$type": "EditorPendingCompositionComponent", + "Id": 14389735759337977675 + }, + "Component_[16184381538555246534]": { + "$type": "AZ::Render::EditorMeshComponent", + "Id": 16184381538555246534, + "Controller": { + "Configuration": { + "ModelAsset": { + "assetId": { + "guid": "{E14975EF-E676-51A4-B826-3EF59CB645AA}", + "subId": 285127096 + }, + "assetHint": "testdata/objects/cube/cube.azmodel" + } + } + } + }, + "Component_[17962478023087084794]": { + "$type": "SelectionComponent", + "Id": 17962478023087084794 + }, + "Component_[18071675051915092508]": { + "$type": "EditorEntityIconComponent", + "Id": 18071675051915092508 + }, + "Component_[2115498007879087044]": { + "$type": "EditorInspectorComponent", + "Id": 2115498007879087044, + "ComponentOrderEntryArray": [ + { + "ComponentId": 399415038452606756 + }, + { + "ComponentId": 16184381538555246534, + "SortIndex": 1 + }, + { + "ComponentId": 7827190074535394331, + "SortIndex": 2 + } + ] + }, + "Component_[3518973002096080237]": { + "$type": "EditorOnlyEntityComponent", + "Id": 3518973002096080237 + }, + "Component_[399415038452606756]": { + "$type": "{27F1E1A1-8D9D-4C3B-BD3A-AFB9762449C0} TransformComponent", + "Id": 399415038452606756, + "Parent Entity": "ContainerEntity", + "Transform Data": { + "Translate": [ + -17.530563354492188, + -0.00018183141946792603, + 114.4910659790039 + ] + } + }, + "Component_[4564240319609068082]": { + "$type": "EditorEntitySortComponent", + "Id": 4564240319609068082 + }, + "Component_[7827190074535394331]": { + "$type": "EditorMaterialComponent", + "Id": 7827190074535394331, + "Controller": { + "Configuration": { + "materials": [ + { + "Key": { + "materialSlotStableId": 2418540911 + }, + "Value": { + "MaterialAsset": { + "assetId": { + "guid": "{892EA944-0325-5FA6-94D7-4AB4FC02A0F5}" + }, + "assetHint": "materials/presets/pbr/metal_iron.azmaterial" + } + } + } + ] + } + } + }, + "Component_[8092226976542590265]": { + "$type": "EditorDisabledCompositionComponent", + "Id": 8092226976542590265 + } + } + }, + "Entity_[668184209364]": { + "Id": "Entity_[668184209364]", + "Name": "Entity1", + "Components": { + "Component_[11525365929370623807]": { + "$type": "EditorVisibilityComponent", + "Id": 11525365929370623807 + }, + "Component_[12334620273692642550]": { + "$type": "EditorLockComponent", + "Id": 12334620273692642550 + }, + "Component_[14389735759337977675]": { + "$type": "EditorPendingCompositionComponent", + "Id": 14389735759337977675 + }, + "Component_[16184381538555246534]": { + "$type": "AZ::Render::EditorMeshComponent", + "Id": 16184381538555246534, + "Controller": { + "Configuration": { + "ModelAsset": { + "assetId": { + "guid": "{E14975EF-E676-51A4-B826-3EF59CB645AA}", + "subId": 285127096 + }, + "assetHint": "testdata/objects/cube/cube.azmodel" + } + } + } + }, + "Component_[17962478023087084794]": { + "$type": "SelectionComponent", + "Id": 17962478023087084794 + }, + "Component_[18071675051915092508]": { + "$type": "EditorEntityIconComponent", + "Id": 18071675051915092508 + }, + "Component_[2115498007879087044]": { + "$type": "EditorInspectorComponent", + "Id": 2115498007879087044, + "ComponentOrderEntryArray": [ + { + "ComponentId": 399415038452606756 + }, + { + "ComponentId": 16184381538555246534, + "SortIndex": 1 + }, + { + "ComponentId": 7827190074535394331, + "SortIndex": 2 + } + ] + }, + "Component_[3518973002096080237]": { + "$type": "EditorOnlyEntityComponent", + "Id": 3518973002096080237 + }, + "Component_[399415038452606756]": { + "$type": "{27F1E1A1-8D9D-4C3B-BD3A-AFB9762449C0} TransformComponent", + "Id": 399415038452606756, + "Parent Entity": "ContainerEntity", + "Transform Data": { + "Translate": [ + -22.530563354492188, + -0.00018183141946792603, + 9.475835800170898 + ] + } + }, + "Component_[4564240319609068082]": { + "$type": "EditorEntitySortComponent", + "Id": 4564240319609068082 + }, + "Component_[7827190074535394331]": { + "$type": "EditorMaterialComponent", + "Id": 7827190074535394331, + "Controller": { + "Configuration": { + "materials": [ + { + "Key": { + "materialSlotStableId": 2418540911 + }, + "Value": { + "MaterialAsset": { + "assetId": { + "guid": "{FE52E7C8-064D-506A-9C26-433EB93747DE}" + }, + "assetHint": "materials/presets/pbr/metal_gold.azmaterial" + } + } + } + ] + } + } + }, + "Component_[8092226976542590265]": { + "$type": "EditorDisabledCompositionComponent", + "Id": 8092226976542590265 + } + } + }, + "Entity_[672479176660]": { + "Id": "Entity_[672479176660]", + "Name": "Entity1", + "Components": { + "Component_[11525365929370623807]": { + "$type": "EditorVisibilityComponent", + "Id": 11525365929370623807 + }, + "Component_[12334620273692642550]": { + "$type": "EditorLockComponent", + "Id": 12334620273692642550 + }, + "Component_[14389735759337977675]": { + "$type": "EditorPendingCompositionComponent", + "Id": 14389735759337977675 + }, + "Component_[16184381538555246534]": { + "$type": "AZ::Render::EditorMeshComponent", + "Id": 16184381538555246534, + "Controller": { + "Configuration": { + "ModelAsset": { + "assetId": { + "guid": "{E14975EF-E676-51A4-B826-3EF59CB645AA}", + "subId": 285127096 + }, + "assetHint": "testdata/objects/cube/cube.azmodel" + } + } + } + }, + "Component_[17962478023087084794]": { + "$type": "SelectionComponent", + "Id": 17962478023087084794 + }, + "Component_[18071675051915092508]": { + "$type": "EditorEntityIconComponent", + "Id": 18071675051915092508 + }, + "Component_[2115498007879087044]": { + "$type": "EditorInspectorComponent", + "Id": 2115498007879087044, + "ComponentOrderEntryArray": [ + { + "ComponentId": 399415038452606756 + }, + { + "ComponentId": 16184381538555246534, + "SortIndex": 1 + }, + { + "ComponentId": 7827190074535394331, + "SortIndex": 2 + } + ] + }, + "Component_[3518973002096080237]": { + "$type": "EditorOnlyEntityComponent", + "Id": 3518973002096080237 + }, + "Component_[399415038452606756]": { + "$type": "{27F1E1A1-8D9D-4C3B-BD3A-AFB9762449C0} TransformComponent", + "Id": 399415038452606756, + "Parent Entity": "ContainerEntity", + "Transform Data": { + "Translate": [ + 42.53014373779297, + -0.00018183141946792603, + 30.08451271057129 + ] + } + }, + "Component_[4564240319609068082]": { + "$type": "EditorEntitySortComponent", + "Id": 4564240319609068082 + }, + "Component_[7827190074535394331]": { + "$type": "EditorMaterialComponent", + "Id": 7827190074535394331, + "Controller": { + "Configuration": { + "materials": [ + { + "Key": { + "materialSlotStableId": 2418540911 + }, + "Value": { + "MaterialAsset": { + "assetId": { + "guid": "{FB4657EB-FB3A-5EC3-A772-DC36D6F733C3}" + }, + "assetHint": "materials/presets/pbr/metal_gold_polished.azmaterial" + } + } + } + ] + } + } + }, + "Component_[8092226976542590265]": { + "$type": "EditorDisabledCompositionComponent", + "Id": 8092226976542590265 + } + } + }, + "Entity_[676774143956]": { + "Id": "Entity_[676774143956]", + "Name": "Entity1", + "Components": { + "Component_[11525365929370623807]": { + "$type": "EditorVisibilityComponent", + "Id": 11525365929370623807 + }, + "Component_[12334620273692642550]": { + "$type": "EditorLockComponent", + "Id": 12334620273692642550 + }, + "Component_[14389735759337977675]": { + "$type": "EditorPendingCompositionComponent", + "Id": 14389735759337977675 + }, + "Component_[16184381538555246534]": { + "$type": "AZ::Render::EditorMeshComponent", + "Id": 16184381538555246534, + "Controller": { + "Configuration": { + "ModelAsset": { + "assetId": { + "guid": "{E14975EF-E676-51A4-B826-3EF59CB645AA}", + "subId": 285127096 + }, + "assetHint": "testdata/objects/cube/cube.azmodel" + } + } + } + }, + "Component_[17962478023087084794]": { + "$type": "SelectionComponent", + "Id": 17962478023087084794 + }, + "Component_[18071675051915092508]": { + "$type": "EditorEntityIconComponent", + "Id": 18071675051915092508 + }, + "Component_[2115498007879087044]": { + "$type": "EditorInspectorComponent", + "Id": 2115498007879087044, + "ComponentOrderEntryArray": [ + { + "ComponentId": 399415038452606756 + }, + { + "ComponentId": 16184381538555246534, + "SortIndex": 1 + }, + { + "ComponentId": 7827190074535394331, + "SortIndex": 2 + } + ] + }, + "Component_[3518973002096080237]": { + "$type": "EditorOnlyEntityComponent", + "Id": 3518973002096080237 + }, + "Component_[399415038452606756]": { + "$type": "{27F1E1A1-8D9D-4C3B-BD3A-AFB9762449C0} TransformComponent", + "Id": 399415038452606756, + "Parent Entity": "ContainerEntity", + "Transform Data": { + "Translate": [ + 42.53014373779297, + -0.00018183141946792603, + 30.08451271057129 + ] + } + }, + "Component_[4564240319609068082]": { + "$type": "EditorEntitySortComponent", + "Id": 4564240319609068082 + }, + "Component_[7827190074535394331]": { + "$type": "EditorMaterialComponent", + "Id": 7827190074535394331, + "Controller": { + "Configuration": { + "materials": [ + { + "Key": { + "materialSlotStableId": 2418540911 + }, + "Value": { + "MaterialAsset": { + "assetId": { + "guid": "{FB4657EB-FB3A-5EC3-A772-DC36D6F733C3}" + }, + "assetHint": "materials/presets/pbr/metal_gold_polished.azmaterial" + } + } + } + ] + } + } + }, + "Component_[8092226976542590265]": { + "$type": "EditorDisabledCompositionComponent", + "Id": 8092226976542590265 + } + } + }, + "Entity_[681069111252]": { + "Id": "Entity_[681069111252]", + "Name": "Entity1", + "Components": { + "Component_[11525365929370623807]": { + "$type": "EditorVisibilityComponent", + "Id": 11525365929370623807 + }, + "Component_[12334620273692642550]": { + "$type": "EditorLockComponent", + "Id": 12334620273692642550 + }, + "Component_[14389735759337977675]": { + "$type": "EditorPendingCompositionComponent", + "Id": 14389735759337977675 + }, + "Component_[16184381538555246534]": { + "$type": "AZ::Render::EditorMeshComponent", + "Id": 16184381538555246534, + "Controller": { + "Configuration": { + "ModelAsset": { + "assetId": { + "guid": "{E14975EF-E676-51A4-B826-3EF59CB645AA}", + "subId": 285127096 + }, + "assetHint": "testdata/objects/cube/cube.azmodel" + } + } + } + }, + "Component_[17962478023087084794]": { + "$type": "SelectionComponent", + "Id": 17962478023087084794 + }, + "Component_[18071675051915092508]": { + "$type": "EditorEntityIconComponent", + "Id": 18071675051915092508 + }, + "Component_[2115498007879087044]": { + "$type": "EditorInspectorComponent", + "Id": 2115498007879087044, + "ComponentOrderEntryArray": [ + { + "ComponentId": 399415038452606756 + }, + { + "ComponentId": 16184381538555246534, + "SortIndex": 1 + }, + { + "ComponentId": 7827190074535394331, + "SortIndex": 2 + } + ] + }, + "Component_[3518973002096080237]": { + "$type": "EditorOnlyEntityComponent", + "Id": 3518973002096080237 + }, + "Component_[399415038452606756]": { + "$type": "{27F1E1A1-8D9D-4C3B-BD3A-AFB9762449C0} TransformComponent", + "Id": 399415038452606756, + "Parent Entity": "ContainerEntity", + "Transform Data": { + "Translate": [ + 27.53014373779297, + -0.00018183141946792603, + 69.34888458251953 + ] + } + }, + "Component_[4564240319609068082]": { + "$type": "EditorEntitySortComponent", + "Id": 4564240319609068082 + }, + "Component_[7827190074535394331]": { + "$type": "EditorMaterialComponent", + "Id": 7827190074535394331, + "Controller": { + "Configuration": { + "materials": [ + { + "Key": { + "materialSlotStableId": 2418540911 + }, + "Value": { + "MaterialAsset": { + "assetId": { + "guid": "{B7C712DC-4839-58BB-B522-A4F120084CF5}" + }, + "assetHint": "materials/presets/pbr/metal_chrome.azmaterial" + } + } + } + ] + } + } + }, + "Component_[8092226976542590265]": { + "$type": "EditorDisabledCompositionComponent", + "Id": 8092226976542590265 + } + } + }, + "Entity_[685364078548]": { + "Id": "Entity_[685364078548]", + "Name": "Entity1", + "Components": { + "Component_[11525365929370623807]": { + "$type": "EditorVisibilityComponent", + "Id": 11525365929370623807 + }, + "Component_[12334620273692642550]": { + "$type": "EditorLockComponent", + "Id": 12334620273692642550 + }, + "Component_[14389735759337977675]": { + "$type": "EditorPendingCompositionComponent", + "Id": 14389735759337977675 + }, + "Component_[16184381538555246534]": { + "$type": "AZ::Render::EditorMeshComponent", + "Id": 16184381538555246534, + "Controller": { + "Configuration": { + "ModelAsset": { + "assetId": { + "guid": "{E14975EF-E676-51A4-B826-3EF59CB645AA}", + "subId": 285127096 + }, + "assetHint": "testdata/objects/cube/cube.azmodel" + } + } + } + }, + "Component_[17962478023087084794]": { + "$type": "SelectionComponent", + "Id": 17962478023087084794 + }, + "Component_[18071675051915092508]": { + "$type": "EditorEntityIconComponent", + "Id": 18071675051915092508 + }, + "Component_[2115498007879087044]": { + "$type": "EditorInspectorComponent", + "Id": 2115498007879087044, + "ComponentOrderEntryArray": [ + { + "ComponentId": 399415038452606756 + }, + { + "ComponentId": 16184381538555246534, + "SortIndex": 1 + }, + { + "ComponentId": 7827190074535394331, + "SortIndex": 2 + } + ] + }, + "Component_[3518973002096080237]": { + "$type": "EditorOnlyEntityComponent", + "Id": 3518973002096080237 + }, + "Component_[399415038452606756]": { + "$type": "{27F1E1A1-8D9D-4C3B-BD3A-AFB9762449C0} TransformComponent", + "Id": 399415038452606756, + "Parent Entity": "ContainerEntity", + "Transform Data": { + "Translate": [ + -7.5305633544921875, + -0.00018183141946792603, + 24.533506393432617 + ] + } + }, + "Component_[4564240319609068082]": { + "$type": "EditorEntitySortComponent", + "Id": 4564240319609068082 + }, + "Component_[7827190074535394331]": { + "$type": "EditorMaterialComponent", + "Id": 7827190074535394331, + "Controller": { + "Configuration": { + "materials": [ + { + "Key": { + "materialSlotStableId": 2418540911 + }, + "Value": { + "MaterialAsset": { + "assetId": { + "guid": "{DD1E26AE-80FB-5DB6-8786-26D438190A38}" + }, + "assetHint": "materials/presets/pbr/metal_nickel.azmaterial" + } + } + } + ] + } + } + }, + "Component_[8092226976542590265]": { + "$type": "EditorDisabledCompositionComponent", + "Id": 8092226976542590265 + } + } + }, + "Entity_[689659045844]": { + "Id": "Entity_[689659045844]", + "Name": "Entity1", + "Components": { + "Component_[11525365929370623807]": { + "$type": "EditorVisibilityComponent", + "Id": 11525365929370623807 + }, + "Component_[12334620273692642550]": { + "$type": "EditorLockComponent", + "Id": 12334620273692642550 + }, + "Component_[14389735759337977675]": { + "$type": "EditorPendingCompositionComponent", + "Id": 14389735759337977675 + }, + "Component_[16184381538555246534]": { + "$type": "AZ::Render::EditorMeshComponent", + "Id": 16184381538555246534, + "Controller": { + "Configuration": { + "ModelAsset": { + "assetId": { + "guid": "{E14975EF-E676-51A4-B826-3EF59CB645AA}", + "subId": 285127096 + }, + "assetHint": "testdata/objects/cube/cube.azmodel" + } + } + } + }, + "Component_[17962478023087084794]": { + "$type": "SelectionComponent", + "Id": 17962478023087084794 + }, + "Component_[18071675051915092508]": { + "$type": "EditorEntityIconComponent", + "Id": 18071675051915092508 + }, + "Component_[2115498007879087044]": { + "$type": "EditorInspectorComponent", + "Id": 2115498007879087044, + "ComponentOrderEntryArray": [ + { + "ComponentId": 399415038452606756 + }, + { + "ComponentId": 16184381538555246534, + "SortIndex": 1 + }, + { + "ComponentId": 7827190074535394331, + "SortIndex": 2 + } + ] + }, + "Component_[3518973002096080237]": { + "$type": "EditorOnlyEntityComponent", + "Id": 3518973002096080237 + }, + "Component_[399415038452606756]": { + "$type": "{27F1E1A1-8D9D-4C3B-BD3A-AFB9762449C0} TransformComponent", + "Id": 399415038452606756, + "Parent Entity": "ContainerEntity", + "Transform Data": { + "Translate": [ + -32.53056335449219, + -0.00018183141946792603, + 94.40913391113281 + ] + } + }, + "Component_[4564240319609068082]": { + "$type": "EditorEntitySortComponent", + "Id": 4564240319609068082 + }, + "Component_[7827190074535394331]": { + "$type": "EditorMaterialComponent", + "Id": 7827190074535394331, + "Controller": { + "Configuration": { + "materials": [ + { + "Key": { + "materialSlotStableId": 2418540911 + }, + "Value": { + "MaterialAsset": { + "assetId": { + "guid": "{C60A39AF-BB76-51BD-9468-A88C9A6F78D7}" + }, + "assetHint": "materials/presets/pbr/metal_cobalt_matte.azmaterial" + } + } + } + ] + } + } + }, + "Component_[8092226976542590265]": { + "$type": "EditorDisabledCompositionComponent", + "Id": 8092226976542590265 + } + } + }, + "Entity_[693954013140]": { + "Id": "Entity_[693954013140]", + "Name": "Entity1", + "Components": { + "Component_[11525365929370623807]": { + "$type": "EditorVisibilityComponent", + "Id": 11525365929370623807 + }, + "Component_[12334620273692642550]": { + "$type": "EditorLockComponent", + "Id": 12334620273692642550 + }, + "Component_[14389735759337977675]": { + "$type": "EditorPendingCompositionComponent", + "Id": 14389735759337977675 + }, + "Component_[16184381538555246534]": { + "$type": "AZ::Render::EditorMeshComponent", + "Id": 16184381538555246534, + "Controller": { + "Configuration": { + "ModelAsset": { + "assetId": { + "guid": "{E14975EF-E676-51A4-B826-3EF59CB645AA}", + "subId": 285127096 + }, + "assetHint": "testdata/objects/cube/cube.azmodel" + } + } + } + }, + "Component_[17962478023087084794]": { + "$type": "SelectionComponent", + "Id": 17962478023087084794 + }, + "Component_[18071675051915092508]": { + "$type": "EditorEntityIconComponent", + "Id": 18071675051915092508 + }, + "Component_[2115498007879087044]": { + "$type": "EditorInspectorComponent", + "Id": 2115498007879087044, + "ComponentOrderEntryArray": [ + { + "ComponentId": 399415038452606756 + }, + { + "ComponentId": 16184381538555246534, + "SortIndex": 1 + }, + { + "ComponentId": 7827190074535394331, + "SortIndex": 2 + } + ] + }, + "Component_[3518973002096080237]": { + "$type": "EditorOnlyEntityComponent", + "Id": 3518973002096080237 + }, + "Component_[399415038452606756]": { + "$type": "{27F1E1A1-8D9D-4C3B-BD3A-AFB9762449C0} TransformComponent", + "Id": 399415038452606756, + "Parent Entity": "ContainerEntity", + "Transform Data": { + "Translate": [ + 37.53014373779297, + 0.010651908814907074, + 9.51578426361084 + ] + } + }, + "Component_[4564240319609068082]": { + "$type": "EditorEntitySortComponent", + "Id": 4564240319609068082 + }, + "Component_[7827190074535394331]": { + "$type": "EditorMaterialComponent", + "Id": 7827190074535394331, + "Controller": { + "Configuration": { + "materials": [ + { + "Key": { + "materialSlotStableId": 2418540911 + }, + "Value": { + "MaterialAsset": { + "assetId": { + "guid": "{E621C5BF-B8E1-55F0-A791-EC960F2FA46F}" + }, + "assetHint": "materials/presets/pbr/metal_copper.azmaterial" + } + } + } + ] + } + } + }, + "Component_[8092226976542590265]": { + "$type": "EditorDisabledCompositionComponent", + "Id": 8092226976542590265 + } + } + }, + "Entity_[698248980436]": { + "Id": "Entity_[698248980436]", + "Name": "Entity1", + "Components": { + "Component_[11525365929370623807]": { + "$type": "EditorVisibilityComponent", + "Id": 11525365929370623807 + }, + "Component_[12334620273692642550]": { + "$type": "EditorLockComponent", + "Id": 12334620273692642550 + }, + "Component_[14389735759337977675]": { + "$type": "EditorPendingCompositionComponent", + "Id": 14389735759337977675 + }, + "Component_[16184381538555246534]": { + "$type": "AZ::Render::EditorMeshComponent", + "Id": 16184381538555246534, + "Controller": { + "Configuration": { + "ModelAsset": { + "assetId": { + "guid": "{E14975EF-E676-51A4-B826-3EF59CB645AA}", + "subId": 285127096 + }, + "assetHint": "testdata/objects/cube/cube.azmodel" + } + } + } + }, + "Component_[17962478023087084794]": { + "$type": "SelectionComponent", + "Id": 17962478023087084794 + }, + "Component_[18071675051915092508]": { + "$type": "EditorEntityIconComponent", + "Id": 18071675051915092508 + }, + "Component_[2115498007879087044]": { + "$type": "EditorInspectorComponent", + "Id": 2115498007879087044, + "ComponentOrderEntryArray": [ + { + "ComponentId": 399415038452606756 + }, + { + "ComponentId": 16184381538555246534, + "SortIndex": 1 + }, + { + "ComponentId": 7827190074535394331, + "SortIndex": 2 + } + ] + }, + "Component_[3518973002096080237]": { + "$type": "EditorOnlyEntityComponent", + "Id": 3518973002096080237 + }, + "Component_[399415038452606756]": { + "$type": "{27F1E1A1-8D9D-4C3B-BD3A-AFB9762449C0} TransformComponent", + "Id": 399415038452606756, + "Parent Entity": "ContainerEntity", + "Transform Data": { + "Translate": [ + -17.530563354492188, + -0.00018183141946792603, + 79.38228607177734 + ] + } + }, + "Component_[4564240319609068082]": { + "$type": "EditorEntitySortComponent", + "Id": 4564240319609068082 + }, + "Component_[7827190074535394331]": { + "$type": "EditorMaterialComponent", + "Id": 7827190074535394331, + "Controller": { + "Configuration": { + "materials": [ + { + "Key": { + "materialSlotStableId": 2418540911 + }, + "Value": { + "MaterialAsset": { + "assetId": { + "guid": "{970148AC-7258-5EC8-9CE7-F4EF93164D93}" + }, + "assetHint": "materials/presets/pbr/metal_iron_matte.azmaterial" + } + } + } + ] + } + } + }, + "Component_[8092226976542590265]": { + "$type": "EditorDisabledCompositionComponent", + "Id": 8092226976542590265 + } + } + }, + "Entity_[702543947732]": { + "Id": "Entity_[702543947732]", + "Name": "Entity1", + "Components": { + "Component_[11525365929370623807]": { + "$type": "EditorVisibilityComponent", + "Id": 11525365929370623807 + }, + "Component_[12334620273692642550]": { + "$type": "EditorLockComponent", + "Id": 12334620273692642550 + }, + "Component_[14389735759337977675]": { + "$type": "EditorPendingCompositionComponent", + "Id": 14389735759337977675 + }, + "Component_[16184381538555246534]": { + "$type": "AZ::Render::EditorMeshComponent", + "Id": 16184381538555246534, + "Controller": { + "Configuration": { + "ModelAsset": { + "assetId": { + "guid": "{E14975EF-E676-51A4-B826-3EF59CB645AA}", + "subId": 285127096 + }, + "assetHint": "testdata/objects/cube/cube.azmodel" + } + } + } + }, + "Component_[17962478023087084794]": { + "$type": "SelectionComponent", + "Id": 17962478023087084794 + }, + "Component_[18071675051915092508]": { + "$type": "EditorEntityIconComponent", + "Id": 18071675051915092508 + }, + "Component_[2115498007879087044]": { + "$type": "EditorInspectorComponent", + "Id": 2115498007879087044, + "ComponentOrderEntryArray": [ + { + "ComponentId": 399415038452606756 + }, + { + "ComponentId": 16184381538555246534, + "SortIndex": 1 + }, + { + "ComponentId": 7827190074535394331, + "SortIndex": 2 + } + ] + }, + "Component_[3518973002096080237]": { + "$type": "EditorOnlyEntityComponent", + "Id": 3518973002096080237 + }, + "Component_[399415038452606756]": { + "$type": "{27F1E1A1-8D9D-4C3B-BD3A-AFB9762449C0} TransformComponent", + "Id": 399415038452606756, + "Parent Entity": "ContainerEntity", + "Transform Data": { + "Translate": [ + 7.530143737792969, + -0.00018183141946792603, + 19.50924301147461 + ] + } + }, + "Component_[4564240319609068082]": { + "$type": "EditorEntitySortComponent", + "Id": 4564240319609068082 + }, + "Component_[7827190074535394331]": { + "$type": "EditorMaterialComponent", + "Id": 7827190074535394331, + "Controller": { + "Configuration": { + "materials": [ + { + "Key": { + "materialSlotStableId": 2418540911 + }, + "Value": { + "MaterialAsset": { + "assetId": { + "guid": "{E54E46E7-9FA3-54D7-B5F8-8DCCDF17BC24}" + }, + "assetHint": "materials/presets/pbr/metal_silver_matte.azmaterial" + } + } + } + ] + } + } + }, + "Component_[8092226976542590265]": { + "$type": "EditorDisabledCompositionComponent", + "Id": 8092226976542590265 + } + } + }, + "Entity_[706838915028]": { + "Id": "Entity_[706838915028]", + "Name": "Entity1", + "Components": { + "Component_[11525365929370623807]": { + "$type": "EditorVisibilityComponent", + "Id": 11525365929370623807 + }, + "Component_[12334620273692642550]": { + "$type": "EditorLockComponent", + "Id": 12334620273692642550 + }, + "Component_[14389735759337977675]": { + "$type": "EditorPendingCompositionComponent", + "Id": 14389735759337977675 + }, + "Component_[16184381538555246534]": { + "$type": "AZ::Render::EditorMeshComponent", + "Id": 16184381538555246534, + "Controller": { + "Configuration": { + "ModelAsset": { + "assetId": { + "guid": "{E14975EF-E676-51A4-B826-3EF59CB645AA}", + "subId": 285127096 + }, + "assetHint": "testdata/objects/cube/cube.azmodel" + } + } + } + }, + "Component_[17962478023087084794]": { + "$type": "SelectionComponent", + "Id": 17962478023087084794 + }, + "Component_[18071675051915092508]": { + "$type": "EditorEntityIconComponent", + "Id": 18071675051915092508 + }, + "Component_[2115498007879087044]": { + "$type": "EditorInspectorComponent", + "Id": 2115498007879087044, + "ComponentOrderEntryArray": [ + { + "ComponentId": 399415038452606756 + }, + { + "ComponentId": 16184381538555246534, + "SortIndex": 1 + }, + { + "ComponentId": 7827190074535394331, + "SortIndex": 2 + } + ] + }, + "Component_[3518973002096080237]": { + "$type": "EditorOnlyEntityComponent", + "Id": 3518973002096080237 + }, + "Component_[399415038452606756]": { + "$type": "{27F1E1A1-8D9D-4C3B-BD3A-AFB9762449C0} TransformComponent", + "Id": 399415038452606756, + "Parent Entity": "ContainerEntity", + "Transform Data": { + "Translate": [ + -27.530563354492188, + -0.00018183141946792603, + 74.93071746826172 + ] + } + }, + "Component_[4564240319609068082]": { + "$type": "EditorEntitySortComponent", + "Id": 4564240319609068082 + }, + "Component_[7827190074535394331]": { + "$type": "EditorMaterialComponent", + "Id": 7827190074535394331, + "Controller": { + "Configuration": { + "materials": [ + { + "Key": { + "materialSlotStableId": 2418540911 + }, + "Value": { + "MaterialAsset": { + "assetId": { + "guid": "{CF5C7B01-4912-58AE-991A-F25251E505AC}" + }, + "assetHint": "materials/presets/pbr/metal_copper_polished.azmaterial" + } + } + } + ] + } + } + }, + "Component_[8092226976542590265]": { + "$type": "EditorDisabledCompositionComponent", + "Id": 8092226976542590265 + } + } + }, + "Entity_[711133882324]": { + "Id": "Entity_[711133882324]", + "Name": "Entity1", + "Components": { + "Component_[11525365929370623807]": { + "$type": "EditorVisibilityComponent", + "Id": 11525365929370623807 + }, + "Component_[12334620273692642550]": { + "$type": "EditorLockComponent", + "Id": 12334620273692642550 + }, + "Component_[14389735759337977675]": { + "$type": "EditorPendingCompositionComponent", + "Id": 14389735759337977675 + }, + "Component_[16184381538555246534]": { + "$type": "AZ::Render::EditorMeshComponent", + "Id": 16184381538555246534, + "Controller": { + "Configuration": { + "ModelAsset": { + "assetId": { + "guid": "{E14975EF-E676-51A4-B826-3EF59CB645AA}", + "subId": 285127096 + }, + "assetHint": "testdata/objects/cube/cube.azmodel" + } + } + } + }, + "Component_[17962478023087084794]": { + "$type": "SelectionComponent", + "Id": 17962478023087084794 + }, + "Component_[18071675051915092508]": { + "$type": "EditorEntityIconComponent", + "Id": 18071675051915092508 + }, + "Component_[2115498007879087044]": { + "$type": "EditorInspectorComponent", + "Id": 2115498007879087044, + "ComponentOrderEntryArray": [ + { + "ComponentId": 399415038452606756 + }, + { + "ComponentId": 16184381538555246534, + "SortIndex": 1 + }, + { + "ComponentId": 7827190074535394331, + "SortIndex": 2 + } + ] + }, + "Component_[3518973002096080237]": { + "$type": "EditorOnlyEntityComponent", + "Id": 3518973002096080237 + }, + "Component_[399415038452606756]": { + "$type": "{27F1E1A1-8D9D-4C3B-BD3A-AFB9762449C0} TransformComponent", + "Id": 399415038452606756, + "Parent Entity": "ContainerEntity", + "Transform Data": { + "Translate": [ + -22.530563354492188, + -0.00018183141946792603, + 89.95755767822266 + ] + } + }, + "Component_[4564240319609068082]": { + "$type": "EditorEntitySortComponent", + "Id": 4564240319609068082 + }, + "Component_[7827190074535394331]": { + "$type": "EditorMaterialComponent", + "Id": 7827190074535394331, + "Controller": { + "Configuration": { + "materials": [ + { + "Key": { + "materialSlotStableId": 2418540911 + }, + "Value": { + "MaterialAsset": { + "assetId": { + "guid": "{FB4657EB-FB3A-5EC3-A772-DC36D6F733C3}" + }, + "assetHint": "materials/presets/pbr/metal_gold_polished.azmaterial" + } + } + } + ] + } + } + }, + "Component_[8092226976542590265]": { + "$type": "EditorDisabledCompositionComponent", + "Id": 8092226976542590265 + } + } + }, + "Entity_[715428849620]": { + "Id": "Entity_[715428849620]", + "Name": "Entity1", + "Components": { + "Component_[11525365929370623807]": { + "$type": "EditorVisibilityComponent", + "Id": 11525365929370623807 + }, + "Component_[12334620273692642550]": { + "$type": "EditorLockComponent", + "Id": 12334620273692642550 + }, + "Component_[14389735759337977675]": { + "$type": "EditorPendingCompositionComponent", + "Id": 14389735759337977675 + }, + "Component_[16184381538555246534]": { + "$type": "AZ::Render::EditorMeshComponent", + "Id": 16184381538555246534, + "Controller": { + "Configuration": { + "ModelAsset": { + "assetId": { + "guid": "{E14975EF-E676-51A4-B826-3EF59CB645AA}", + "subId": 285127096 + }, + "assetHint": "testdata/objects/cube/cube.azmodel" + } + } + } + }, + "Component_[17962478023087084794]": { + "$type": "SelectionComponent", + "Id": 17962478023087084794 + }, + "Component_[18071675051915092508]": { + "$type": "EditorEntityIconComponent", + "Id": 18071675051915092508 + }, + "Component_[2115498007879087044]": { + "$type": "EditorInspectorComponent", + "Id": 2115498007879087044, + "ComponentOrderEntryArray": [ + { + "ComponentId": 399415038452606756 + }, + { + "ComponentId": 16184381538555246534, + "SortIndex": 1 + }, + { + "ComponentId": 7827190074535394331, + "SortIndex": 2 + } + ] + }, + "Component_[3518973002096080237]": { + "$type": "EditorOnlyEntityComponent", + "Id": 3518973002096080237 + }, + "Component_[399415038452606756]": { + "$type": "{27F1E1A1-8D9D-4C3B-BD3A-AFB9762449C0} TransformComponent", + "Id": 399415038452606756, + "Parent Entity": "ContainerEntity", + "Transform Data": { + "Translate": [ + 42.53014373779297, + -0.00018183141946792603, + 39.56034851074219 + ] + } + }, + "Component_[4564240319609068082]": { + "$type": "EditorEntitySortComponent", + "Id": 4564240319609068082 + }, + "Component_[7827190074535394331]": { + "$type": "EditorMaterialComponent", + "Id": 7827190074535394331, + "Controller": { + "Configuration": { + "materials": [ + { + "Key": { + "materialSlotStableId": 2418540911 + }, + "Value": { + "MaterialAsset": { + "assetId": { + "guid": "{FE52E7C8-064D-506A-9C26-433EB93747DE}" + }, + "assetHint": "materials/presets/pbr/metal_gold.azmaterial" + } + } + } + ] + } + } + }, + "Component_[8092226976542590265]": { + "$type": "EditorDisabledCompositionComponent", + "Id": 8092226976542590265 + } + } + }, + "Entity_[719723816916]": { + "Id": "Entity_[719723816916]", + "Name": "Entity1", + "Components": { + "Component_[11525365929370623807]": { + "$type": "EditorVisibilityComponent", + "Id": 11525365929370623807 + }, + "Component_[12334620273692642550]": { + "$type": "EditorLockComponent", + "Id": 12334620273692642550 + }, + "Component_[14389735759337977675]": { + "$type": "EditorPendingCompositionComponent", + "Id": 14389735759337977675 + }, + "Component_[16184381538555246534]": { + "$type": "AZ::Render::EditorMeshComponent", + "Id": 16184381538555246534, + "Controller": { + "Configuration": { + "ModelAsset": { + "assetId": { + "guid": "{E14975EF-E676-51A4-B826-3EF59CB645AA}", + "subId": 285127096 + }, + "assetHint": "testdata/objects/cube/cube.azmodel" + } + } + } + }, + "Component_[17962478023087084794]": { + "$type": "SelectionComponent", + "Id": 17962478023087084794 + }, + "Component_[18071675051915092508]": { + "$type": "EditorEntityIconComponent", + "Id": 18071675051915092508 + }, + "Component_[2115498007879087044]": { + "$type": "EditorInspectorComponent", + "Id": 2115498007879087044, + "ComponentOrderEntryArray": [ + { + "ComponentId": 399415038452606756 + }, + { + "ComponentId": 16184381538555246534, + "SortIndex": 1 + }, + { + "ComponentId": 7827190074535394331, + "SortIndex": 2 + } + ] + }, + "Component_[3518973002096080237]": { + "$type": "EditorOnlyEntityComponent", + "Id": 3518973002096080237 + }, + "Component_[399415038452606756]": { + "$type": "{27F1E1A1-8D9D-4C3B-BD3A-AFB9762449C0} TransformComponent", + "Id": 399415038452606756, + "Parent Entity": "ContainerEntity", + "Transform Data": { + "Translate": [ + 32.53014373779297, + -0.00018183141946792603, + 114.4910659790039 + ] + } + }, + "Component_[4564240319609068082]": { + "$type": "EditorEntitySortComponent", + "Id": 4564240319609068082 + }, + "Component_[7827190074535394331]": { + "$type": "EditorMaterialComponent", + "Id": 7827190074535394331, + "Controller": { + "Configuration": { + "materials": [ + { + "Key": { + "materialSlotStableId": 2418540911 + }, + "Value": { + "MaterialAsset": { + "assetId": { + "guid": "{99976D73-6248-5D66-AD15-E8F52B0AFE36}" + }, + "assetHint": "materials/presets/pbr/metal_cobalt.azmaterial" + } + } + } + ] + } + } + }, + "Component_[8092226976542590265]": { + "$type": "EditorDisabledCompositionComponent", + "Id": 8092226976542590265 + } + } + }, + "Entity_[724018784212]": { + "Id": "Entity_[724018784212]", + "Name": "Entity1", + "Components": { + "Component_[11525365929370623807]": { + "$type": "EditorVisibilityComponent", + "Id": 11525365929370623807 + }, + "Component_[12334620273692642550]": { + "$type": "EditorLockComponent", + "Id": 12334620273692642550 + }, + "Component_[14389735759337977675]": { + "$type": "EditorPendingCompositionComponent", + "Id": 14389735759337977675 + }, + "Component_[16184381538555246534]": { + "$type": "AZ::Render::EditorMeshComponent", + "Id": 16184381538555246534, + "Controller": { + "Configuration": { + "ModelAsset": { + "assetId": { + "guid": "{E14975EF-E676-51A4-B826-3EF59CB645AA}", + "subId": 285127096 + }, + "assetHint": "testdata/objects/cube/cube.azmodel" + } + } + } + }, + "Component_[17962478023087084794]": { + "$type": "SelectionComponent", + "Id": 17962478023087084794 + }, + "Component_[18071675051915092508]": { + "$type": "EditorEntityIconComponent", + "Id": 18071675051915092508 + }, + "Component_[2115498007879087044]": { + "$type": "EditorInspectorComponent", + "Id": 2115498007879087044, + "ComponentOrderEntryArray": [ + { + "ComponentId": 399415038452606756 + }, + { + "ComponentId": 16184381538555246534, + "SortIndex": 1 + }, + { + "ComponentId": 7827190074535394331, + "SortIndex": 2 + } + ] + }, + "Component_[3518973002096080237]": { + "$type": "EditorOnlyEntityComponent", + "Id": 3518973002096080237 + }, + "Component_[399415038452606756]": { + "$type": "{27F1E1A1-8D9D-4C3B-BD3A-AFB9762449C0} TransformComponent", + "Id": 399415038452606756, + "Parent Entity": "ContainerEntity", + "Transform Data": { + "Translate": [ + -2.5305633544921875, + -0.00018183141946792603, + 45.14218521118164 + ] + } + }, + "Component_[4564240319609068082]": { + "$type": "EditorEntitySortComponent", + "Id": 4564240319609068082 + }, + "Component_[7827190074535394331]": { + "$type": "EditorMaterialComponent", + "Id": 7827190074535394331, + "Controller": { + "Configuration": { + "materials": [ + { + "Key": { + "materialSlotStableId": 2418540911 + }, + "Value": { + "MaterialAsset": { + "assetId": { + "guid": "{D0E9960A-4B31-5136-BAC6-5482B203D3B4}" + }, + "assetHint": "materials/presets/pbr/metal_palladium_polished.azmaterial" + } + } + } + ] + } + } + }, + "Component_[8092226976542590265]": { + "$type": "EditorDisabledCompositionComponent", + "Id": 8092226976542590265 + } + } + }, + "Entity_[728313751508]": { + "Id": "Entity_[728313751508]", + "Name": "Entity1", + "Components": { + "Component_[11525365929370623807]": { + "$type": "EditorVisibilityComponent", + "Id": 11525365929370623807 + }, + "Component_[12334620273692642550]": { + "$type": "EditorLockComponent", + "Id": 12334620273692642550 + }, + "Component_[14389735759337977675]": { + "$type": "EditorPendingCompositionComponent", + "Id": 14389735759337977675 + }, + "Component_[16184381538555246534]": { + "$type": "AZ::Render::EditorMeshComponent", + "Id": 16184381538555246534, + "Controller": { + "Configuration": { + "ModelAsset": { + "assetId": { + "guid": "{E14975EF-E676-51A4-B826-3EF59CB645AA}", + "subId": 285127096 + }, + "assetHint": "testdata/objects/cube/cube.azmodel" + } + } + } + }, + "Component_[17962478023087084794]": { + "$type": "SelectionComponent", + "Id": 17962478023087084794 + }, + "Component_[18071675051915092508]": { + "$type": "EditorEntityIconComponent", + "Id": 18071675051915092508 + }, + "Component_[2115498007879087044]": { + "$type": "EditorInspectorComponent", + "Id": 2115498007879087044, + "ComponentOrderEntryArray": [ + { + "ComponentId": 399415038452606756 + }, + { + "ComponentId": 16184381538555246534, + "SortIndex": 1 + }, + { + "ComponentId": 7827190074535394331, + "SortIndex": 2 + } + ] + }, + "Component_[3518973002096080237]": { + "$type": "EditorOnlyEntityComponent", + "Id": 3518973002096080237 + }, + "Component_[399415038452606756]": { + "$type": "{27F1E1A1-8D9D-4C3B-BD3A-AFB9762449C0} TransformComponent", + "Id": 399415038452606756, + "Parent Entity": "ContainerEntity", + "Transform Data": { + "Translate": [ + 7.530143737792969, + -0.00018183141946792603, + 79.38228607177734 + ] + } + }, + "Component_[4564240319609068082]": { + "$type": "EditorEntitySortComponent", + "Id": 4564240319609068082 + }, + "Component_[7827190074535394331]": { + "$type": "EditorMaterialComponent", + "Id": 7827190074535394331, + "Controller": { + "Configuration": { + "materials": [ + { + "Key": { + "materialSlotStableId": 2418540911 + }, + "Value": { + "MaterialAsset": { + "assetId": { + "guid": "{E54E46E7-9FA3-54D7-B5F8-8DCCDF17BC24}" + }, + "assetHint": "materials/presets/pbr/metal_silver_matte.azmaterial" + } + } + } + ] + } + } + }, + "Component_[8092226976542590265]": { + "$type": "EditorDisabledCompositionComponent", + "Id": 8092226976542590265 + } + } + }, + "Entity_[732608718804]": { + "Id": "Entity_[732608718804]", + "Name": "Entity1", + "Components": { + "Component_[11525365929370623807]": { + "$type": "EditorVisibilityComponent", + "Id": 11525365929370623807 + }, + "Component_[12334620273692642550]": { + "$type": "EditorLockComponent", + "Id": 12334620273692642550 + }, + "Component_[14389735759337977675]": { + "$type": "EditorPendingCompositionComponent", + "Id": 14389735759337977675 + }, + "Component_[16184381538555246534]": { + "$type": "AZ::Render::EditorMeshComponent", + "Id": 16184381538555246534, + "Controller": { + "Configuration": { + "ModelAsset": { + "assetId": { + "guid": "{E14975EF-E676-51A4-B826-3EF59CB645AA}", + "subId": 285127096 + }, + "assetHint": "testdata/objects/cube/cube.azmodel" + } + } + } + }, + "Component_[17962478023087084794]": { + "$type": "SelectionComponent", + "Id": 17962478023087084794 + }, + "Component_[18071675051915092508]": { + "$type": "EditorEntityIconComponent", + "Id": 18071675051915092508 + }, + "Component_[2115498007879087044]": { + "$type": "EditorInspectorComponent", + "Id": 2115498007879087044, + "ComponentOrderEntryArray": [ + { + "ComponentId": 399415038452606756 + }, + { + "ComponentId": 16184381538555246534, + "SortIndex": 1 + }, + { + "ComponentId": 7827190074535394331, + "SortIndex": 2 + } + ] + }, + "Component_[3518973002096080237]": { + "$type": "EditorOnlyEntityComponent", + "Id": 3518973002096080237 + }, + "Component_[399415038452606756]": { + "$type": "{27F1E1A1-8D9D-4C3B-BD3A-AFB9762449C0} TransformComponent", + "Id": 399415038452606756, + "Parent Entity": "ContainerEntity", + "Transform Data": { + "Translate": [ + -32.53056335449219, + -0.00018183141946792603, + 24.533506393432617 + ] + } + }, + "Component_[4564240319609068082]": { + "$type": "EditorEntitySortComponent", + "Id": 4564240319609068082 + }, + "Component_[7827190074535394331]": { + "$type": "EditorMaterialComponent", + "Id": 7827190074535394331, + "Controller": { + "Configuration": { + "materials": [ + { + "Key": { + "materialSlotStableId": 2418540911 + }, + "Value": { + "MaterialAsset": { + "assetId": { + "guid": "{99976D73-6248-5D66-AD15-E8F52B0AFE36}" + }, + "assetHint": "materials/presets/pbr/metal_cobalt.azmaterial" + } + } + } + ] + } + } + }, + "Component_[8092226976542590265]": { + "$type": "EditorDisabledCompositionComponent", + "Id": 8092226976542590265 + } + } + }, + "Entity_[736903686100]": { + "Id": "Entity_[736903686100]", + "Name": "Entity1", + "Components": { + "Component_[11525365929370623807]": { + "$type": "EditorVisibilityComponent", + "Id": 11525365929370623807 + }, + "Component_[12334620273692642550]": { + "$type": "EditorLockComponent", + "Id": 12334620273692642550 + }, + "Component_[14389735759337977675]": { + "$type": "EditorPendingCompositionComponent", + "Id": 14389735759337977675 + }, + "Component_[16184381538555246534]": { + "$type": "AZ::Render::EditorMeshComponent", + "Id": 16184381538555246534, + "Controller": { + "Configuration": { + "ModelAsset": { + "assetId": { + "guid": "{E14975EF-E676-51A4-B826-3EF59CB645AA}", + "subId": 285127096 + }, + "assetHint": "testdata/objects/cube/cube.azmodel" + } + } + } + }, + "Component_[17962478023087084794]": { + "$type": "SelectionComponent", + "Id": 17962478023087084794 + }, + "Component_[18071675051915092508]": { + "$type": "EditorEntityIconComponent", + "Id": 18071675051915092508 + }, + "Component_[2115498007879087044]": { + "$type": "EditorInspectorComponent", + "Id": 2115498007879087044, + "ComponentOrderEntryArray": [ + { + "ComponentId": 399415038452606756 + }, + { + "ComponentId": 16184381538555246534, + "SortIndex": 1 + }, + { + "ComponentId": 7827190074535394331, + "SortIndex": 2 + } + ] + }, + "Component_[3518973002096080237]": { + "$type": "EditorOnlyEntityComponent", + "Id": 3518973002096080237 + }, + "Component_[399415038452606756]": { + "$type": "{27F1E1A1-8D9D-4C3B-BD3A-AFB9762449C0} TransformComponent", + "Id": 399415038452606756, + "Parent Entity": "ContainerEntity", + "Transform Data": { + "Translate": [ + 47.53014373779297, + -0.00018183141946792603, + 30.08451271057129 + ] + } + }, + "Component_[4564240319609068082]": { + "$type": "EditorEntitySortComponent", + "Id": 4564240319609068082 + }, + "Component_[7827190074535394331]": { + "$type": "EditorMaterialComponent", + "Id": 7827190074535394331, + "Controller": { + "Configuration": { + "materials": [ + { + "Key": { + "materialSlotStableId": 2418540911 + }, + "Value": { + "MaterialAsset": { + "assetId": { + "guid": "{A7F03135-ECAD-5440-99DB-E84ABA3D50DA}" + }, + "assetHint": "materials/presets/pbr/metal_iron_polished.azmaterial" + } + } + } + ] + } + } + }, + "Component_[8092226976542590265]": { + "$type": "EditorDisabledCompositionComponent", + "Id": 8092226976542590265 + } + } + }, + "Entity_[741198653396]": { + "Id": "Entity_[741198653396]", + "Name": "Entity1", + "Components": { + "Component_[1057179753323467068]": { + "$type": "EditorMaterialComponent", + "Id": 1057179753323467068, + "Controller": { + "Configuration": { + "materials": [ + { + "Key": { + "materialSlotStableId": 2418540911 + }, + "Value": { + "MaterialAsset": { + "assetId": { + "guid": "{A3F3CD98-1634-5542-AD5A-78E91BE21AE9}" + }, + "assetHint": "materials/presets/pbr/metal_titanium_matte.azmaterial" + } + } + } + ] + } + } + }, + "Component_[11525365929370623807]": { + "$type": "EditorVisibilityComponent", + "Id": 11525365929370623807 + }, + "Component_[12334620273692642550]": { + "$type": "EditorLockComponent", + "Id": 12334620273692642550 + }, + "Component_[14389735759337977675]": { + "$type": "EditorPendingCompositionComponent", + "Id": 14389735759337977675 + }, + "Component_[16184381538555246534]": { + "$type": "AZ::Render::EditorMeshComponent", + "Id": 16184381538555246534, + "Controller": { + "Configuration": { + "ModelAsset": { + "assetId": { + "guid": "{E14975EF-E676-51A4-B826-3EF59CB645AA}", + "subId": 285127096 + }, + "assetHint": "testdata/objects/cube/cube.azmodel" + } + } + } + }, + "Component_[17962478023087084794]": { + "$type": "SelectionComponent", + "Id": 17962478023087084794 + }, + "Component_[18071675051915092508]": { + "$type": "EditorEntityIconComponent", + "Id": 18071675051915092508 + }, + "Component_[2115498007879087044]": { + "$type": "EditorInspectorComponent", + "Id": 2115498007879087044, + "ComponentOrderEntryArray": [ + { + "ComponentId": 399415038452606756 + }, + { + "ComponentId": 16184381538555246534, + "SortIndex": 1 + }, + { + "ComponentId": 1057179753323467068, + "SortIndex": 2 + } + ] + }, + "Component_[3518973002096080237]": { + "$type": "EditorOnlyEntityComponent", + "Id": 3518973002096080237 + }, + "Component_[399415038452606756]": { + "$type": "{27F1E1A1-8D9D-4C3B-BD3A-AFB9762449C0} TransformComponent", + "Id": 399415038452606756, + "Parent Entity": "ContainerEntity", + "Transform Data": { + "Translate": [ + 12.530143737792969, + -0.00018183141946792603, + 79.38228607177734 + ] + } + }, + "Component_[4564240319609068082]": { + "$type": "EditorEntitySortComponent", + "Id": 4564240319609068082 + }, + "Component_[8092226976542590265]": { + "$type": "EditorDisabledCompositionComponent", + "Id": 8092226976542590265 + } + } + }, + "Entity_[745493620692]": { + "Id": "Entity_[745493620692]", + "Name": "Entity1", + "Components": { + "Component_[11525365929370623807]": { + "$type": "EditorVisibilityComponent", + "Id": 11525365929370623807 + }, + "Component_[12334620273692642550]": { + "$type": "EditorLockComponent", + "Id": 12334620273692642550 + }, + "Component_[14389735759337977675]": { + "$type": "EditorPendingCompositionComponent", + "Id": 14389735759337977675 + }, + "Component_[16184381538555246534]": { + "$type": "AZ::Render::EditorMeshComponent", + "Id": 16184381538555246534, + "Controller": { + "Configuration": { + "ModelAsset": { + "assetId": { + "guid": "{E14975EF-E676-51A4-B826-3EF59CB645AA}", + "subId": 285127096 + }, + "assetHint": "testdata/objects/cube/cube.azmodel" + } + } + } + }, + "Component_[17962478023087084794]": { + "$type": "SelectionComponent", + "Id": 17962478023087084794 + }, + "Component_[18071675051915092508]": { + "$type": "EditorEntityIconComponent", + "Id": 18071675051915092508 + }, + "Component_[2115498007879087044]": { + "$type": "EditorInspectorComponent", + "Id": 2115498007879087044, + "ComponentOrderEntryArray": [ + { + "ComponentId": 399415038452606756 + }, + { + "ComponentId": 16184381538555246534, + "SortIndex": 1 + }, + { + "ComponentId": 7827190074535394331, + "SortIndex": 2 + } + ] + }, + "Component_[3518973002096080237]": { + "$type": "EditorOnlyEntityComponent", + "Id": 3518973002096080237 + }, + "Component_[399415038452606756]": { + "$type": "{27F1E1A1-8D9D-4C3B-BD3A-AFB9762449C0} TransformComponent", + "Id": 399415038452606756, + "Parent Entity": "ContainerEntity", + "Transform Data": { + "Translate": [ + -47.53056335449219, + -0.00018183141946792603, + 105.0152359008789 + ] + } + }, + "Component_[4564240319609068082]": { + "$type": "EditorEntitySortComponent", + "Id": 4564240319609068082 + }, + "Component_[7827190074535394331]": { + "$type": "EditorMaterialComponent", + "Id": 7827190074535394331, + "Controller": { + "Configuration": { + "materials": [ + { + "Key": { + "materialSlotStableId": 2418540911 + }, + "Value": { + "MaterialAsset": { + "assetId": { + "guid": "{64C1F6A6-6BDA-551A-BE56-1829E5913278}" + }, + "assetHint": "materials/presets/pbr/metal_aluminum_polished.azmaterial" + } + } + } + ] + } + } + }, + "Component_[8092226976542590265]": { + "$type": "EditorDisabledCompositionComponent", + "Id": 8092226976542590265 + } + } + }, + "Entity_[749788587988]": { + "Id": "Entity_[749788587988]", + "Name": "Entity1", + "Components": { + "Component_[11525365929370623807]": { + "$type": "EditorVisibilityComponent", + "Id": 11525365929370623807 + }, + "Component_[12334620273692642550]": { + "$type": "EditorLockComponent", + "Id": 12334620273692642550 + }, + "Component_[14389735759337977675]": { + "$type": "EditorPendingCompositionComponent", + "Id": 14389735759337977675 + }, + "Component_[16184381538555246534]": { + "$type": "AZ::Render::EditorMeshComponent", + "Id": 16184381538555246534, + "Controller": { + "Configuration": { + "ModelAsset": { + "assetId": { + "guid": "{E14975EF-E676-51A4-B826-3EF59CB645AA}", + "subId": 285127096 + }, + "assetHint": "testdata/objects/cube/cube.azmodel" + } + } + } + }, + "Component_[17962478023087084794]": { + "$type": "SelectionComponent", + "Id": 17962478023087084794 + }, + "Component_[18071675051915092508]": { + "$type": "EditorEntityIconComponent", + "Id": 18071675051915092508 + }, + "Component_[2115498007879087044]": { + "$type": "EditorInspectorComponent", + "Id": 2115498007879087044, + "ComponentOrderEntryArray": [ + { + "ComponentId": 399415038452606756 + }, + { + "ComponentId": 16184381538555246534, + "SortIndex": 1 + }, + { + "ComponentId": 7827190074535394331, + "SortIndex": 2 + } + ] + }, + "Component_[3518973002096080237]": { + "$type": "EditorOnlyEntityComponent", + "Id": 3518973002096080237 + }, + "Component_[399415038452606756]": { + "$type": "{27F1E1A1-8D9D-4C3B-BD3A-AFB9762449C0} TransformComponent", + "Id": 399415038452606756, + "Parent Entity": "ContainerEntity", + "Transform Data": { + "Translate": [ + -32.53056335449219, + -0.00018183141946792603, + 15.057670593261719 + ] + } + }, + "Component_[4564240319609068082]": { + "$type": "EditorEntitySortComponent", + "Id": 4564240319609068082 + }, + "Component_[7827190074535394331]": { + "$type": "EditorMaterialComponent", + "Id": 7827190074535394331, + "Controller": { + "Configuration": { + "materials": [ + { + "Key": { + "materialSlotStableId": 2418540911 + }, + "Value": { + "MaterialAsset": { + "assetId": { + "guid": "{93DF55AE-8D1B-5AD1-A609-05F1BD9F6EA0}" + }, + "assetHint": "materials/presets/pbr/metal_cobalt_polished.azmaterial" + } + } + } + ] + } + } + }, + "Component_[8092226976542590265]": { + "$type": "EditorDisabledCompositionComponent", + "Id": 8092226976542590265 + } + } + }, + "Entity_[754083555284]": { + "Id": "Entity_[754083555284]", + "Name": "Entity1", + "Components": { + "Component_[11525365929370623807]": { + "$type": "EditorVisibilityComponent", + "Id": 11525365929370623807 + }, + "Component_[12334620273692642550]": { + "$type": "EditorLockComponent", + "Id": 12334620273692642550 + }, + "Component_[14389735759337977675]": { + "$type": "EditorPendingCompositionComponent", + "Id": 14389735759337977675 + }, + "Component_[16184381538555246534]": { + "$type": "AZ::Render::EditorMeshComponent", + "Id": 16184381538555246534, + "Controller": { + "Configuration": { + "ModelAsset": { + "assetId": { + "guid": "{E14975EF-E676-51A4-B826-3EF59CB645AA}", + "subId": 285127096 + }, + "assetHint": "testdata/objects/cube/cube.azmodel" + } + } + } + }, + "Component_[17962478023087084794]": { + "$type": "SelectionComponent", + "Id": 17962478023087084794 + }, + "Component_[18071675051915092508]": { + "$type": "EditorEntityIconComponent", + "Id": 18071675051915092508 + }, + "Component_[2115498007879087044]": { + "$type": "EditorInspectorComponent", + "Id": 2115498007879087044, + "ComponentOrderEntryArray": [ + { + "ComponentId": 399415038452606756 + }, + { + "ComponentId": 16184381538555246534, + "SortIndex": 1 + }, + { + "ComponentId": 7827190074535394331, + "SortIndex": 2 + } + ] + }, + "Component_[3518973002096080237]": { + "$type": "EditorOnlyEntityComponent", + "Id": 3518973002096080237 + }, + "Component_[399415038452606756]": { + "$type": "{27F1E1A1-8D9D-4C3B-BD3A-AFB9762449C0} TransformComponent", + "Id": 399415038452606756, + "Parent Entity": "ContainerEntity", + "Transform Data": { + "Translate": [ + 27.53014373779297, + -0.00018183141946792603, + 94.40913391113281 + ] + } + }, + "Component_[4564240319609068082]": { + "$type": "EditorEntitySortComponent", + "Id": 4564240319609068082 + }, + "Component_[7827190074535394331]": { + "$type": "EditorMaterialComponent", + "Id": 7827190074535394331, + "Controller": { + "Configuration": { + "materials": [ + { + "Key": { + "materialSlotStableId": 2418540911 + }, + "Value": { + "MaterialAsset": { + "assetId": { + "guid": "{A78EA2FC-688B-5E3A-A7F6-DB413D11D4CF}" + }, + "assetHint": "materials/presets/pbr/metal_chrome_matte.azmaterial" + } + } + } + ] + } + } + }, + "Component_[8092226976542590265]": { + "$type": "EditorDisabledCompositionComponent", + "Id": 8092226976542590265 + } + } + }, + "Entity_[758378522580]": { + "Id": "Entity_[758378522580]", + "Name": "Entity1", + "Components": { + "Component_[11525365929370623807]": { + "$type": "EditorVisibilityComponent", + "Id": 11525365929370623807 + }, + "Component_[12334620273692642550]": { + "$type": "EditorLockComponent", + "Id": 12334620273692642550 + }, + "Component_[14389735759337977675]": { + "$type": "EditorPendingCompositionComponent", + "Id": 14389735759337977675 + }, + "Component_[16184381538555246534]": { + "$type": "AZ::Render::EditorMeshComponent", + "Id": 16184381538555246534, + "Controller": { + "Configuration": { + "ModelAsset": { + "assetId": { + "guid": "{E14975EF-E676-51A4-B826-3EF59CB645AA}", + "subId": 285127096 + }, + "assetHint": "testdata/objects/cube/cube.azmodel" + } + } + } + }, + "Component_[17962478023087084794]": { + "$type": "SelectionComponent", + "Id": 17962478023087084794 + }, + "Component_[18071675051915092508]": { + "$type": "EditorEntityIconComponent", + "Id": 18071675051915092508 + }, + "Component_[2115498007879087044]": { + "$type": "EditorInspectorComponent", + "Id": 2115498007879087044, + "ComponentOrderEntryArray": [ + { + "ComponentId": 399415038452606756 + }, + { + "ComponentId": 16184381538555246534, + "SortIndex": 1 + }, + { + "ComponentId": 7827190074535394331, + "SortIndex": 2 + } + ] + }, + "Component_[3518973002096080237]": { + "$type": "EditorOnlyEntityComponent", + "Id": 3518973002096080237 + }, + "Component_[399415038452606756]": { + "$type": "{27F1E1A1-8D9D-4C3B-BD3A-AFB9762449C0} TransformComponent", + "Id": 399415038452606756, + "Parent Entity": "ContainerEntity", + "Transform Data": { + "Translate": [ + -47.53056335449219, + -0.00018183141946792603, + 24.533506393432617 + ] + } + }, + "Component_[4564240319609068082]": { + "$type": "EditorEntitySortComponent", + "Id": 4564240319609068082 + }, + "Component_[7827190074535394331]": { + "$type": "EditorMaterialComponent", + "Id": 7827190074535394331, + "Controller": { + "Configuration": { + "materials": [ + { + "Key": { + "materialSlotStableId": 2418540911 + }, + "Value": { + "MaterialAsset": { + "assetId": { + "guid": "{94CF2BD7-7D09-5577-B1D8-3FF85B15E127}" + }, + "assetHint": "materials/presets/pbr/metal_aluminum.azmaterial" + } + } + } + ] + } + } + }, + "Component_[8092226976542590265]": { + "$type": "EditorDisabledCompositionComponent", + "Id": 8092226976542590265 + } + } + }, + "Entity_[762673489876]": { + "Id": "Entity_[762673489876]", + "Name": "Entity1", + "Components": { + "Component_[11525365929370623807]": { + "$type": "EditorVisibilityComponent", + "Id": 11525365929370623807 + }, + "Component_[12334620273692642550]": { + "$type": "EditorLockComponent", + "Id": 12334620273692642550 + }, + "Component_[14389735759337977675]": { + "$type": "EditorPendingCompositionComponent", + "Id": 14389735759337977675 + }, + "Component_[16184381538555246534]": { + "$type": "AZ::Render::EditorMeshComponent", + "Id": 16184381538555246534, + "Controller": { + "Configuration": { + "ModelAsset": { + "assetId": { + "guid": "{E14975EF-E676-51A4-B826-3EF59CB645AA}", + "subId": 285127096 + }, + "assetHint": "testdata/objects/cube/cube.azmodel" + } + } + } + }, + "Component_[17962478023087084794]": { + "$type": "SelectionComponent", + "Id": 17962478023087084794 + }, + "Component_[18071675051915092508]": { + "$type": "EditorEntityIconComponent", + "Id": 18071675051915092508 + }, + "Component_[2115498007879087044]": { + "$type": "EditorInspectorComponent", + "Id": 2115498007879087044, + "ComponentOrderEntryArray": [ + { + "ComponentId": 399415038452606756 + }, + { + "ComponentId": 16184381538555246534, + "SortIndex": 1 + }, + { + "ComponentId": 7827190074535394331, + "SortIndex": 2 + } + ] + }, + "Component_[3518973002096080237]": { + "$type": "EditorOnlyEntityComponent", + "Id": 3518973002096080237 + }, + "Component_[399415038452606756]": { + "$type": "{27F1E1A1-8D9D-4C3B-BD3A-AFB9762449C0} TransformComponent", + "Id": 399415038452606756, + "Parent Entity": "ContainerEntity", + "Transform Data": { + "Translate": [ + 32.53014373779297, + -0.00018183141946792603, + 69.34888458251953 + ] + } + }, + "Component_[4564240319609068082]": { + "$type": "EditorEntitySortComponent", + "Id": 4564240319609068082 + }, + "Component_[7827190074535394331]": { + "$type": "EditorMaterialComponent", + "Id": 7827190074535394331, + "Controller": { + "Configuration": { + "materials": [ + { + "Key": { + "materialSlotStableId": 2418540911 + }, + "Value": { + "MaterialAsset": { + "assetId": { + "guid": "{99976D73-6248-5D66-AD15-E8F52B0AFE36}" + }, + "assetHint": "materials/presets/pbr/metal_cobalt.azmaterial" + } + } + } + ] + } + } + }, + "Component_[8092226976542590265]": { + "$type": "EditorDisabledCompositionComponent", + "Id": 8092226976542590265 + } + } + }, + "Entity_[766968457172]": { + "Id": "Entity_[766968457172]", + "Name": "Entity1", + "Components": { + "Component_[11525365929370623807]": { + "$type": "EditorVisibilityComponent", + "Id": 11525365929370623807 + }, + "Component_[12334620273692642550]": { + "$type": "EditorLockComponent", + "Id": 12334620273692642550 + }, + "Component_[14389735759337977675]": { + "$type": "EditorPendingCompositionComponent", + "Id": 14389735759337977675 + }, + "Component_[16184381538555246534]": { + "$type": "AZ::Render::EditorMeshComponent", + "Id": 16184381538555246534, + "Controller": { + "Configuration": { + "ModelAsset": { + "assetId": { + "guid": "{E14975EF-E676-51A4-B826-3EF59CB645AA}", + "subId": 285127096 + }, + "assetHint": "testdata/objects/cube/cube.azmodel" + } + } + } + }, + "Component_[17962478023087084794]": { + "$type": "SelectionComponent", + "Id": 17962478023087084794 + }, + "Component_[18071675051915092508]": { + "$type": "EditorEntityIconComponent", + "Id": 18071675051915092508 + }, + "Component_[2115498007879087044]": { + "$type": "EditorInspectorComponent", + "Id": 2115498007879087044, + "ComponentOrderEntryArray": [ + { + "ComponentId": 399415038452606756 + }, + { + "ComponentId": 16184381538555246534, + "SortIndex": 1 + }, + { + "ComponentId": 7827190074535394331, + "SortIndex": 2 + } + ] + }, + "Component_[3518973002096080237]": { + "$type": "EditorOnlyEntityComponent", + "Id": 3518973002096080237 + }, + "Component_[399415038452606756]": { + "$type": "{27F1E1A1-8D9D-4C3B-BD3A-AFB9762449C0} TransformComponent", + "Id": 399415038452606756, + "Parent Entity": "ContainerEntity", + "Transform Data": { + "Translate": [ + 42.53014373779297, + -0.00018183141946792603, + 0.0 + ] + } + }, + "Component_[4564240319609068082]": { + "$type": "EditorEntitySortComponent", + "Id": 4564240319609068082 + }, + "Component_[7827190074535394331]": { + "$type": "EditorMaterialComponent", + "Id": 7827190074535394331, + "Controller": { + "Configuration": { + "materials": [ + { + "Key": { + "materialSlotStableId": 2418540911 + }, + "Value": { + "MaterialAsset": { + "assetId": { + "guid": "{FB4657EB-FB3A-5EC3-A772-DC36D6F733C3}" + }, + "assetHint": "materials/presets/pbr/metal_gold_polished.azmaterial" + } + } + } + ] + } + } + }, + "Component_[8092226976542590265]": { + "$type": "EditorDisabledCompositionComponent", + "Id": 8092226976542590265 + } + } + }, + "Entity_[771263424468]": { + "Id": "Entity_[771263424468]", + "Name": "Entity1", + "Components": { + "Component_[11525365929370623807]": { + "$type": "EditorVisibilityComponent", + "Id": 11525365929370623807 + }, + "Component_[12334620273692642550]": { + "$type": "EditorLockComponent", + "Id": 12334620273692642550 + }, + "Component_[14389735759337977675]": { + "$type": "EditorPendingCompositionComponent", + "Id": 14389735759337977675 + }, + "Component_[16184381538555246534]": { + "$type": "AZ::Render::EditorMeshComponent", + "Id": 16184381538555246534, + "Controller": { + "Configuration": { + "ModelAsset": { + "assetId": { + "guid": "{E14975EF-E676-51A4-B826-3EF59CB645AA}", + "subId": 285127096 + }, + "assetHint": "testdata/objects/cube/cube.azmodel" + } + } + } + }, + "Component_[17962478023087084794]": { + "$type": "SelectionComponent", + "Id": 17962478023087084794 + }, + "Component_[18071675051915092508]": { + "$type": "EditorEntityIconComponent", + "Id": 18071675051915092508 + }, + "Component_[2115498007879087044]": { + "$type": "EditorInspectorComponent", + "Id": 2115498007879087044, + "ComponentOrderEntryArray": [ + { + "ComponentId": 399415038452606756 + }, + { + "ComponentId": 16184381538555246534, + "SortIndex": 1 + }, + { + "ComponentId": 7827190074535394331, + "SortIndex": 2 + } + ] + }, + "Component_[3518973002096080237]": { + "$type": "EditorOnlyEntityComponent", + "Id": 3518973002096080237 + }, + "Component_[399415038452606756]": { + "$type": "{27F1E1A1-8D9D-4C3B-BD3A-AFB9762449C0} TransformComponent", + "Id": 399415038452606756, + "Parent Entity": "ContainerEntity", + "Transform Data": { + "Translate": [ + -37.53056335449219, + -0.00018183141946792603, + 59.873046875 + ] + } + }, + "Component_[4564240319609068082]": { + "$type": "EditorEntitySortComponent", + "Id": 4564240319609068082 + }, + "Component_[7827190074535394331]": { + "$type": "EditorMaterialComponent", + "Id": 7827190074535394331, + "Controller": { + "Configuration": { + "materials": [ + { + "Key": { + "materialSlotStableId": 2418540911 + }, + "Value": { + "MaterialAsset": { + "assetId": { + "guid": "{CAF50181-3384-5DF2-9304-C6E48E83C72D}" + }, + "assetHint": "materials/presets/pbr/metal_chrome_polished.azmaterial" + } + } + } + ] + } + } + }, + "Component_[8092226976542590265]": { + "$type": "EditorDisabledCompositionComponent", + "Id": 8092226976542590265 + } + } + }, + "Entity_[775558391764]": { + "Id": "Entity_[775558391764]", + "Name": "Entity1", + "Components": { + "Component_[11525365929370623807]": { + "$type": "EditorVisibilityComponent", + "Id": 11525365929370623807 + }, + "Component_[12334620273692642550]": { + "$type": "EditorLockComponent", + "Id": 12334620273692642550 + }, + "Component_[14389735759337977675]": { + "$type": "EditorPendingCompositionComponent", + "Id": 14389735759337977675 + }, + "Component_[16184381538555246534]": { + "$type": "AZ::Render::EditorMeshComponent", + "Id": 16184381538555246534, + "Controller": { + "Configuration": { + "ModelAsset": { + "assetId": { + "guid": "{E14975EF-E676-51A4-B826-3EF59CB645AA}", + "subId": 285127096 + }, + "assetHint": "testdata/objects/cube/cube.azmodel" + } + } + } + }, + "Component_[17962478023087084794]": { + "$type": "SelectionComponent", + "Id": 17962478023087084794 + }, + "Component_[18071675051915092508]": { + "$type": "EditorEntityIconComponent", + "Id": 18071675051915092508 + }, + "Component_[2115498007879087044]": { + "$type": "EditorInspectorComponent", + "Id": 2115498007879087044, + "ComponentOrderEntryArray": [ + { + "ComponentId": 399415038452606756 + }, + { + "ComponentId": 16184381538555246534, + "SortIndex": 1 + }, + { + "ComponentId": 7827190074535394331, + "SortIndex": 2 + } + ] + }, + "Component_[3518973002096080237]": { + "$type": "EditorOnlyEntityComponent", + "Id": 3518973002096080237 + }, + "Component_[399415038452606756]": { + "$type": "{27F1E1A1-8D9D-4C3B-BD3A-AFB9762449C0} TransformComponent", + "Id": 399415038452606756, + "Parent Entity": "ContainerEntity", + "Transform Data": { + "Translate": [ + 47.53014373779297, + -0.00018183141946792603, + 19.50924301147461 + ] + } + }, + "Component_[4564240319609068082]": { + "$type": "EditorEntitySortComponent", + "Id": 4564240319609068082 + }, + "Component_[7827190074535394331]": { + "$type": "EditorMaterialComponent", + "Id": 7827190074535394331, + "Controller": { + "Configuration": { + "materials": [ + { + "Key": { + "materialSlotStableId": 2418540911 + }, + "Value": { + "MaterialAsset": { + "assetId": { + "guid": "{970148AC-7258-5EC8-9CE7-F4EF93164D93}" + }, + "assetHint": "materials/presets/pbr/metal_iron_matte.azmaterial" + } + } + } + ] + } + } + }, + "Component_[8092226976542590265]": { + "$type": "EditorDisabledCompositionComponent", + "Id": 8092226976542590265 + } + } + }, + "Entity_[779853359060]": { + "Id": "Entity_[779853359060]", + "Name": "Entity1", + "Components": { + "Component_[11525365929370623807]": { + "$type": "EditorVisibilityComponent", + "Id": 11525365929370623807 + }, + "Component_[12334620273692642550]": { + "$type": "EditorLockComponent", + "Id": 12334620273692642550 + }, + "Component_[14389735759337977675]": { + "$type": "EditorPendingCompositionComponent", + "Id": 14389735759337977675 + }, + "Component_[16184381538555246534]": { + "$type": "AZ::Render::EditorMeshComponent", + "Id": 16184381538555246534, + "Controller": { + "Configuration": { + "ModelAsset": { + "assetId": { + "guid": "{E14975EF-E676-51A4-B826-3EF59CB645AA}", + "subId": 285127096 + }, + "assetHint": "testdata/objects/cube/cube.azmodel" + } + } + } + }, + "Component_[17962478023087084794]": { + "$type": "SelectionComponent", + "Id": 17962478023087084794 + }, + "Component_[18071675051915092508]": { + "$type": "EditorEntityIconComponent", + "Id": 18071675051915092508 + }, + "Component_[2115498007879087044]": { + "$type": "EditorInspectorComponent", + "Id": 2115498007879087044, + "ComponentOrderEntryArray": [ + { + "ComponentId": 399415038452606756 + }, + { + "ComponentId": 16184381538555246534, + "SortIndex": 1 + }, + { + "ComponentId": 7827190074535394331, + "SortIndex": 2 + } + ] + }, + "Component_[3518973002096080237]": { + "$type": "EditorOnlyEntityComponent", + "Id": 3518973002096080237 + }, + "Component_[399415038452606756]": { + "$type": "{27F1E1A1-8D9D-4C3B-BD3A-AFB9762449C0} TransformComponent", + "Id": 399415038452606756, + "Parent Entity": "ContainerEntity", + "Transform Data": { + "Translate": [ + -12.530563354492188, + -0.00018183141946792603, + 89.95755767822266 + ] + } + }, + "Component_[4564240319609068082]": { + "$type": "EditorEntitySortComponent", + "Id": 4564240319609068082 + }, + "Component_[7827190074535394331]": { + "$type": "EditorMaterialComponent", + "Id": 7827190074535394331, + "Controller": { + "Configuration": { + "materials": [ + { + "Key": { + "materialSlotStableId": 2418540911 + }, + "Value": { + "MaterialAsset": { + "assetId": { + "guid": "{F2AD0EBF-7137-58D1-9991-9552FAD41B19}" + }, + "assetHint": "materials/presets/pbr/metal_mercury.azmaterial" + } + } + } + ] + } + } + }, + "Component_[8092226976542590265]": { + "$type": "EditorDisabledCompositionComponent", + "Id": 8092226976542590265 + } + } + }, + "Entity_[784148326356]": { + "Id": "Entity_[784148326356]", + "Name": "Entity1", + "Components": { + "Component_[11525365929370623807]": { + "$type": "EditorVisibilityComponent", + "Id": 11525365929370623807 + }, + "Component_[12334620273692642550]": { + "$type": "EditorLockComponent", + "Id": 12334620273692642550 + }, + "Component_[14389735759337977675]": { + "$type": "EditorPendingCompositionComponent", + "Id": 14389735759337977675 + }, + "Component_[16184381538555246534]": { + "$type": "AZ::Render::EditorMeshComponent", + "Id": 16184381538555246534, + "Controller": { + "Configuration": { + "ModelAsset": { + "assetId": { + "guid": "{E14975EF-E676-51A4-B826-3EF59CB645AA}", + "subId": 285127096 + }, + "assetHint": "testdata/objects/cube/cube.azmodel" + } + } + } + }, + "Component_[17962478023087084794]": { + "$type": "SelectionComponent", + "Id": 17962478023087084794 + }, + "Component_[18071675051915092508]": { + "$type": "EditorEntityIconComponent", + "Id": 18071675051915092508 + }, + "Component_[2115498007879087044]": { + "$type": "EditorInspectorComponent", + "Id": 2115498007879087044, + "ComponentOrderEntryArray": [ + { + "ComponentId": 399415038452606756 + }, + { + "ComponentId": 16184381538555246534, + "SortIndex": 1 + }, + { + "ComponentId": 7827190074535394331, + "SortIndex": 2 + } + ] + }, + "Component_[3518973002096080237]": { + "$type": "EditorOnlyEntityComponent", + "Id": 3518973002096080237 + }, + "Component_[399415038452606756]": { + "$type": "{27F1E1A1-8D9D-4C3B-BD3A-AFB9762449C0} TransformComponent", + "Id": 399415038452606756, + "Parent Entity": "ContainerEntity", + "Transform Data": { + "Translate": [ + 27.53014373779297, + -0.00018183141946792603, + 105.0152359008789 + ] + } + }, + "Component_[4564240319609068082]": { + "$type": "EditorEntitySortComponent", + "Id": 4564240319609068082 + }, + "Component_[7827190074535394331]": { + "$type": "EditorMaterialComponent", + "Id": 7827190074535394331, + "Controller": { + "Configuration": { + "materials": [ + { + "Key": { + "materialSlotStableId": 2418540911 + }, + "Value": { + "MaterialAsset": { + "assetId": { + "guid": "{CAF50181-3384-5DF2-9304-C6E48E83C72D}" + }, + "assetHint": "materials/presets/pbr/metal_chrome_polished.azmaterial" + } + } + } + ] + } + } + }, + "Component_[8092226976542590265]": { + "$type": "EditorDisabledCompositionComponent", + "Id": 8092226976542590265 + } + } + }, + "Entity_[788443293652]": { + "Id": "Entity_[788443293652]", + "Name": "Entity1", + "Components": { + "Component_[11525365929370623807]": { + "$type": "EditorVisibilityComponent", + "Id": 11525365929370623807 + }, + "Component_[12334620273692642550]": { + "$type": "EditorLockComponent", + "Id": 12334620273692642550 + }, + "Component_[14389735759337977675]": { + "$type": "EditorPendingCompositionComponent", + "Id": 14389735759337977675 + }, + "Component_[16184381538555246534]": { + "$type": "AZ::Render::EditorMeshComponent", + "Id": 16184381538555246534, + "Controller": { + "Configuration": { + "ModelAsset": { + "assetId": { + "guid": "{E14975EF-E676-51A4-B826-3EF59CB645AA}", + "subId": 285127096 + }, + "assetHint": "testdata/objects/cube/cube.azmodel" + } + } + } + }, + "Component_[17962478023087084794]": { + "$type": "SelectionComponent", + "Id": 17962478023087084794 + }, + "Component_[18071675051915092508]": { + "$type": "EditorEntityIconComponent", + "Id": 18071675051915092508 + }, + "Component_[2115498007879087044]": { + "$type": "EditorInspectorComponent", + "Id": 2115498007879087044, + "ComponentOrderEntryArray": [ + { + "ComponentId": 399415038452606756 + }, + { + "ComponentId": 16184381538555246534, + "SortIndex": 1 + }, + { + "ComponentId": 7827190074535394331, + "SortIndex": 2 + } + ] + }, + "Component_[3518973002096080237]": { + "$type": "EditorOnlyEntityComponent", + "Id": 3518973002096080237 + }, + "Component_[399415038452606756]": { + "$type": "{27F1E1A1-8D9D-4C3B-BD3A-AFB9762449C0} TransformComponent", + "Id": 399415038452606756, + "Parent Entity": "ContainerEntity", + "Transform Data": { + "Translate": [ + -32.53056335449219, + -0.00018183141946792603, + 34.53608703613281 + ] + } + }, + "Component_[4564240319609068082]": { + "$type": "EditorEntitySortComponent", + "Id": 4564240319609068082 + }, + "Component_[7827190074535394331]": { + "$type": "EditorMaterialComponent", + "Id": 7827190074535394331, + "Controller": { + "Configuration": { + "materials": [ + { + "Key": { + "materialSlotStableId": 2418540911 + }, + "Value": { + "MaterialAsset": { + "assetId": { + "guid": "{C60A39AF-BB76-51BD-9468-A88C9A6F78D7}" + }, + "assetHint": "materials/presets/pbr/metal_cobalt_matte.azmaterial" + } + } + } + ] + } + } + }, + "Component_[8092226976542590265]": { + "$type": "EditorDisabledCompositionComponent", + "Id": 8092226976542590265 + } + } + }, + "Entity_[792738260948]": { + "Id": "Entity_[792738260948]", + "Name": "Entity1", + "Components": { + "Component_[11525365929370623807]": { + "$type": "EditorVisibilityComponent", + "Id": 11525365929370623807 + }, + "Component_[12334620273692642550]": { + "$type": "EditorLockComponent", + "Id": 12334620273692642550 + }, + "Component_[14389735759337977675]": { + "$type": "EditorPendingCompositionComponent", + "Id": 14389735759337977675 + }, + "Component_[16184381538555246534]": { + "$type": "AZ::Render::EditorMeshComponent", + "Id": 16184381538555246534, + "Controller": { + "Configuration": { + "ModelAsset": { + "assetId": { + "guid": "{E14975EF-E676-51A4-B826-3EF59CB645AA}", + "subId": 285127096 + }, + "assetHint": "testdata/objects/cube/cube.azmodel" + } + } + } + }, + "Component_[17962478023087084794]": { + "$type": "SelectionComponent", + "Id": 17962478023087084794 + }, + "Component_[18071675051915092508]": { + "$type": "EditorEntityIconComponent", + "Id": 18071675051915092508 + }, + "Component_[2115498007879087044]": { + "$type": "EditorInspectorComponent", + "Id": 2115498007879087044, + "ComponentOrderEntryArray": [ + { + "ComponentId": 399415038452606756 + }, + { + "ComponentId": 16184381538555246534, + "SortIndex": 1 + }, + { + "ComponentId": 7827190074535394331, + "SortIndex": 2 + } + ] + }, + "Component_[3518973002096080237]": { + "$type": "EditorOnlyEntityComponent", + "Id": 3518973002096080237 + }, + "Component_[399415038452606756]": { + "$type": "{27F1E1A1-8D9D-4C3B-BD3A-AFB9762449C0} TransformComponent", + "Id": 399415038452606756, + "Parent Entity": "ContainerEntity", + "Transform Data": { + "Translate": [ + -47.53056335449219, + -0.00018183141946792603, + 39.56034851074219 + ] + } + }, + "Component_[4564240319609068082]": { + "$type": "EditorEntitySortComponent", + "Id": 4564240319609068082 + }, + "Component_[7827190074535394331]": { + "$type": "EditorMaterialComponent", + "Id": 7827190074535394331, + "Controller": { + "Configuration": { + "materials": [ + { + "Key": { + "materialSlotStableId": 2418540911 + }, + "Value": { + "MaterialAsset": { + "assetId": { + "guid": "{94CF2BD7-7D09-5577-B1D8-3FF85B15E127}" + }, + "assetHint": "materials/presets/pbr/metal_aluminum.azmaterial" + } + } + } + ] + } + } + }, + "Component_[8092226976542590265]": { + "$type": "EditorDisabledCompositionComponent", + "Id": 8092226976542590265 + } + } + }, + "Entity_[797033228244]": { + "Id": "Entity_[797033228244]", + "Name": "Entity1", + "Components": { + "Component_[11525365929370623807]": { + "$type": "EditorVisibilityComponent", + "Id": 11525365929370623807 + }, + "Component_[12334620273692642550]": { + "$type": "EditorLockComponent", + "Id": 12334620273692642550 + }, + "Component_[14389735759337977675]": { + "$type": "EditorPendingCompositionComponent", + "Id": 14389735759337977675 + }, + "Component_[16184381538555246534]": { + "$type": "AZ::Render::EditorMeshComponent", + "Id": 16184381538555246534, + "Controller": { + "Configuration": { + "ModelAsset": { + "assetId": { + "guid": "{E14975EF-E676-51A4-B826-3EF59CB645AA}", + "subId": 285127096 + }, + "assetHint": "testdata/objects/cube/cube.azmodel" + } + } + } + }, + "Component_[17962478023087084794]": { + "$type": "SelectionComponent", + "Id": 17962478023087084794 + }, + "Component_[18071675051915092508]": { + "$type": "EditorEntityIconComponent", + "Id": 18071675051915092508 + }, + "Component_[2115498007879087044]": { + "$type": "EditorInspectorComponent", + "Id": 2115498007879087044, + "ComponentOrderEntryArray": [ + { + "ComponentId": 399415038452606756 + }, + { + "ComponentId": 16184381538555246534, + "SortIndex": 1 + }, + { + "ComponentId": 7827190074535394331, + "SortIndex": 2 + } + ] + }, + "Component_[3518973002096080237]": { + "$type": "EditorOnlyEntityComponent", + "Id": 3518973002096080237 + }, + "Component_[399415038452606756]": { + "$type": "{27F1E1A1-8D9D-4C3B-BD3A-AFB9762449C0} TransformComponent", + "Id": 399415038452606756, + "Parent Entity": "ContainerEntity", + "Transform Data": { + "Translate": [ + 37.53014373779297, + 0.010651908814907074, + 114.53101348876953 + ] + } + }, + "Component_[4564240319609068082]": { + "$type": "EditorEntitySortComponent", + "Id": 4564240319609068082 + }, + "Component_[7827190074535394331]": { + "$type": "EditorMaterialComponent", + "Id": 7827190074535394331, + "Controller": { + "Configuration": { + "materials": [ + { + "Key": { + "materialSlotStableId": 2418540911 + }, + "Value": { + "MaterialAsset": { + "assetId": { + "guid": "{E621C5BF-B8E1-55F0-A791-EC960F2FA46F}" + }, + "assetHint": "materials/presets/pbr/metal_copper.azmaterial" + } + } + } + ] + } + } + }, + "Component_[8092226976542590265]": { + "$type": "EditorDisabledCompositionComponent", + "Id": 8092226976542590265 + } + } + }, + "Entity_[801328195540]": { + "Id": "Entity_[801328195540]", + "Name": "Entity1", + "Components": { + "Component_[11525365929370623807]": { + "$type": "EditorVisibilityComponent", + "Id": 11525365929370623807 + }, + "Component_[12334620273692642550]": { + "$type": "EditorLockComponent", + "Id": 12334620273692642550 + }, + "Component_[14389735759337977675]": { + "$type": "EditorPendingCompositionComponent", + "Id": 14389735759337977675 + }, + "Component_[16184381538555246534]": { + "$type": "AZ::Render::EditorMeshComponent", + "Id": 16184381538555246534, + "Controller": { + "Configuration": { + "ModelAsset": { + "assetId": { + "guid": "{E14975EF-E676-51A4-B826-3EF59CB645AA}", + "subId": 285127096 + }, + "assetHint": "testdata/objects/cube/cube.azmodel" + } + } + } + }, + "Component_[17962478023087084794]": { + "$type": "SelectionComponent", + "Id": 17962478023087084794 + }, + "Component_[18071675051915092508]": { + "$type": "EditorEntityIconComponent", + "Id": 18071675051915092508 + }, + "Component_[2115498007879087044]": { + "$type": "EditorInspectorComponent", + "Id": 2115498007879087044, + "ComponentOrderEntryArray": [ + { + "ComponentId": 399415038452606756 + }, + { + "ComponentId": 16184381538555246534, + "SortIndex": 1 + }, + { + "ComponentId": 7827190074535394331, + "SortIndex": 2 + } + ] + }, + "Component_[3518973002096080237]": { + "$type": "EditorOnlyEntityComponent", + "Id": 3518973002096080237 + }, + "Component_[399415038452606756]": { + "$type": "{27F1E1A1-8D9D-4C3B-BD3A-AFB9762449C0} TransformComponent", + "Id": 399415038452606756, + "Parent Entity": "ContainerEntity", + "Transform Data": { + "Translate": [ + 22.53014373779297, + -0.00018183141946792603, + 0.0 + ] + } + }, + "Component_[4564240319609068082]": { + "$type": "EditorEntitySortComponent", + "Id": 4564240319609068082 + }, + "Component_[7827190074535394331]": { + "$type": "EditorMaterialComponent", + "Id": 7827190074535394331, + "Controller": { + "Configuration": { + "materials": [ + { + "Key": { + "materialSlotStableId": 2418540911 + }, + "Value": { + "MaterialAsset": { + "assetId": { + "guid": "{FC69F2F8-F73B-5A0C-B8B7-94BAA45780FC}" + }, + "assetHint": "materials/presets/pbr/metal_brass_polished.azmaterial" + } + } + } + ] + } + } + }, + "Component_[8092226976542590265]": { + "$type": "EditorDisabledCompositionComponent", + "Id": 8092226976542590265 + } + } + }, + "Entity_[805623162836]": { + "Id": "Entity_[805623162836]", + "Name": "Entity1", + "Components": { + "Component_[11525365929370623807]": { + "$type": "EditorVisibilityComponent", + "Id": 11525365929370623807 + }, + "Component_[12334620273692642550]": { + "$type": "EditorLockComponent", + "Id": 12334620273692642550 + }, + "Component_[14389735759337977675]": { + "$type": "EditorPendingCompositionComponent", + "Id": 14389735759337977675 + }, + "Component_[16184381538555246534]": { + "$type": "AZ::Render::EditorMeshComponent", + "Id": 16184381538555246534, + "Controller": { + "Configuration": { + "ModelAsset": { + "assetId": { + "guid": "{E14975EF-E676-51A4-B826-3EF59CB645AA}", + "subId": 285127096 + }, + "assetHint": "testdata/objects/cube/cube.azmodel" + } + } + } + }, + "Component_[17962478023087084794]": { + "$type": "SelectionComponent", + "Id": 17962478023087084794 + }, + "Component_[18071675051915092508]": { + "$type": "EditorEntityIconComponent", + "Id": 18071675051915092508 + }, + "Component_[2115498007879087044]": { + "$type": "EditorInspectorComponent", + "Id": 2115498007879087044, + "ComponentOrderEntryArray": [ + { + "ComponentId": 399415038452606756 + }, + { + "ComponentId": 16184381538555246534, + "SortIndex": 1 + }, + { + "ComponentId": 7827190074535394331, + "SortIndex": 2 + } + ] + }, + "Component_[3518973002096080237]": { + "$type": "EditorOnlyEntityComponent", + "Id": 3518973002096080237 + }, + "Component_[399415038452606756]": { + "$type": "{27F1E1A1-8D9D-4C3B-BD3A-AFB9762449C0} TransformComponent", + "Id": 399415038452606756, + "Parent Entity": "ContainerEntity", + "Transform Data": { + "Translate": [ + 7.530143737792969, + -0.00018183141946792603, + 0.0 + ] + } + }, + "Component_[4564240319609068082]": { + "$type": "EditorEntitySortComponent", + "Id": 4564240319609068082 + }, + "Component_[7827190074535394331]": { + "$type": "EditorMaterialComponent", + "Id": 7827190074535394331, + "Controller": { + "Configuration": { + "materials": [ + { + "Key": { + "materialSlotStableId": 2418540911 + }, + "Value": { + "MaterialAsset": { + "assetId": { + "guid": "{2AC06FA3-7670-542E-8996-DF346AFF1B61}" + }, + "assetHint": "materials/presets/pbr/metal_silver_polished.azmaterial" + } + } + } + ] + } + } + }, + "Component_[8092226976542590265]": { + "$type": "EditorDisabledCompositionComponent", + "Id": 8092226976542590265 + } + } + }, + "Entity_[809918130132]": { + "Id": "Entity_[809918130132]", + "Name": "Entity1", + "Components": { + "Component_[1057179753323467068]": { + "$type": "EditorMaterialComponent", + "Id": 1057179753323467068, + "Controller": { + "Configuration": { + "materials": [ + { + "Key": { + "materialSlotStableId": 2418540911 + }, + "Value": { + "MaterialAsset": { + "assetId": { + "guid": "{721188E0-B7CC-5D06-8D5D-39AF8ABF2EF9}" + }, + "assetHint": "materials/presets/pbr/metal_titanium.azmaterial" + } + } + } + ] + } + } + }, + "Component_[11525365929370623807]": { + "$type": "EditorVisibilityComponent", + "Id": 11525365929370623807 + }, + "Component_[12334620273692642550]": { + "$type": "EditorLockComponent", + "Id": 12334620273692642550 + }, + "Component_[14389735759337977675]": { + "$type": "EditorPendingCompositionComponent", + "Id": 14389735759337977675 + }, + "Component_[16184381538555246534]": { + "$type": "AZ::Render::EditorMeshComponent", + "Id": 16184381538555246534, + "Controller": { + "Configuration": { + "ModelAsset": { + "assetId": { + "guid": "{E14975EF-E676-51A4-B826-3EF59CB645AA}", + "subId": 285127096 + }, + "assetHint": "testdata/objects/cube/cube.azmodel" + } + } + } + }, + "Component_[17962478023087084794]": { + "$type": "SelectionComponent", + "Id": 17962478023087084794 + }, + "Component_[18071675051915092508]": { + "$type": "EditorEntityIconComponent", + "Id": 18071675051915092508 + }, + "Component_[2115498007879087044]": { + "$type": "EditorInspectorComponent", + "Id": 2115498007879087044, + "ComponentOrderEntryArray": [ + { + "ComponentId": 399415038452606756 + }, + { + "ComponentId": 16184381538555246534, + "SortIndex": 1 + }, + { + "ComponentId": 1057179753323467068, + "SortIndex": 2 + } + ] + }, + "Component_[3518973002096080237]": { + "$type": "EditorOnlyEntityComponent", + "Id": 3518973002096080237 + }, + "Component_[399415038452606756]": { + "$type": "{27F1E1A1-8D9D-4C3B-BD3A-AFB9762449C0} TransformComponent", + "Id": 399415038452606756, + "Parent Entity": "ContainerEntity", + "Transform Data": { + "Translate": [ + 12.530143737792969, + -0.00018183141946792603, + 54.618019104003906 + ] + } + }, + "Component_[4564240319609068082]": { + "$type": "EditorEntitySortComponent", + "Id": 4564240319609068082 + }, + "Component_[8092226976542590265]": { + "$type": "EditorDisabledCompositionComponent", + "Id": 8092226976542590265 + } + } + }, + "Entity_[814213097428]": { + "Id": "Entity_[814213097428]", + "Name": "Entity1", + "Components": { + "Component_[11525365929370623807]": { + "$type": "EditorVisibilityComponent", + "Id": 11525365929370623807 + }, + "Component_[12334620273692642550]": { + "$type": "EditorLockComponent", + "Id": 12334620273692642550 + }, + "Component_[14389735759337977675]": { + "$type": "EditorPendingCompositionComponent", + "Id": 14389735759337977675 + }, + "Component_[16184381538555246534]": { + "$type": "AZ::Render::EditorMeshComponent", + "Id": 16184381538555246534, + "Controller": { + "Configuration": { + "ModelAsset": { + "assetId": { + "guid": "{E14975EF-E676-51A4-B826-3EF59CB645AA}", + "subId": 285127096 + }, + "assetHint": "testdata/objects/cube/cube.azmodel" + } + } + } + }, + "Component_[17962478023087084794]": { + "$type": "SelectionComponent", + "Id": 17962478023087084794 + }, + "Component_[18071675051915092508]": { + "$type": "EditorEntityIconComponent", + "Id": 18071675051915092508 + }, + "Component_[2115498007879087044]": { + "$type": "EditorInspectorComponent", + "Id": 2115498007879087044, + "ComponentOrderEntryArray": [ + { + "ComponentId": 399415038452606756 + }, + { + "ComponentId": 16184381538555246534, + "SortIndex": 1 + }, + { + "ComponentId": 7827190074535394331, + "SortIndex": 2 + } + ] + }, + "Component_[3518973002096080237]": { + "$type": "EditorOnlyEntityComponent", + "Id": 3518973002096080237 + }, + "Component_[399415038452606756]": { + "$type": "{27F1E1A1-8D9D-4C3B-BD3A-AFB9762449C0} TransformComponent", + "Id": 399415038452606756, + "Parent Entity": "ContainerEntity", + "Transform Data": { + "Translate": [ + 2.5301437377929688, + -0.00018183141946792603, + 34.53608703613281 + ] + } + }, + "Component_[4564240319609068082]": { + "$type": "EditorEntitySortComponent", + "Id": 4564240319609068082 + }, + "Component_[7827190074535394331]": { + "$type": "EditorMaterialComponent", + "Id": 7827190074535394331, + "Controller": { + "Configuration": { + "materials": [ + { + "Key": { + "materialSlotStableId": 2418540911 + }, + "Value": { + "MaterialAsset": { + "assetId": { + "guid": "{60D4CA04-A2FE-5AE7-B472-694C38D05183}" + }, + "assetHint": "materials/presets/pbr/metal_platinum_matte.azmaterial" + } + } + } + ] + } + } + }, + "Component_[8092226976542590265]": { + "$type": "EditorDisabledCompositionComponent", + "Id": 8092226976542590265 + } + } + }, + "Entity_[818508064724]": { + "Id": "Entity_[818508064724]", + "Name": "Entity1", + "Components": { + "Component_[11525365929370623807]": { + "$type": "EditorVisibilityComponent", + "Id": 11525365929370623807 + }, + "Component_[12334620273692642550]": { + "$type": "EditorLockComponent", + "Id": 12334620273692642550 + }, + "Component_[14389735759337977675]": { + "$type": "EditorPendingCompositionComponent", + "Id": 14389735759337977675 + }, + "Component_[16184381538555246534]": { + "$type": "AZ::Render::EditorMeshComponent", + "Id": 16184381538555246534, + "Controller": { + "Configuration": { + "ModelAsset": { + "assetId": { + "guid": "{E14975EF-E676-51A4-B826-3EF59CB645AA}", + "subId": 285127096 + }, + "assetHint": "testdata/objects/cube/cube.azmodel" + } + } + } + }, + "Component_[17962478023087084794]": { + "$type": "SelectionComponent", + "Id": 17962478023087084794 + }, + "Component_[18071675051915092508]": { + "$type": "EditorEntityIconComponent", + "Id": 18071675051915092508 + }, + "Component_[2115498007879087044]": { + "$type": "EditorInspectorComponent", + "Id": 2115498007879087044, + "ComponentOrderEntryArray": [ + { + "ComponentId": 399415038452606756 + }, + { + "ComponentId": 16184381538555246534, + "SortIndex": 1 + }, + { + "ComponentId": 7827190074535394331, + "SortIndex": 2 + } + ] + }, + "Component_[3518973002096080237]": { + "$type": "EditorOnlyEntityComponent", + "Id": 3518973002096080237 + }, + "Component_[399415038452606756]": { + "$type": "{27F1E1A1-8D9D-4C3B-BD3A-AFB9762449C0} TransformComponent", + "Id": 399415038452606756, + "Parent Entity": "ContainerEntity", + "Transform Data": { + "Translate": [ + 7.530143737792969, + -0.00018183141946792603, + 45.14218521118164 + ] + } + }, + "Component_[4564240319609068082]": { + "$type": "EditorEntitySortComponent", + "Id": 4564240319609068082 + }, + "Component_[7827190074535394331]": { + "$type": "EditorMaterialComponent", + "Id": 7827190074535394331, + "Controller": { + "Configuration": { + "materials": [ + { + "Key": { + "materialSlotStableId": 2418540911 + }, + "Value": { + "MaterialAsset": { + "assetId": { + "guid": "{2AC06FA3-7670-542E-8996-DF346AFF1B61}" + }, + "assetHint": "materials/presets/pbr/metal_silver_polished.azmaterial" + } + } + } + ] + } + } + }, + "Component_[8092226976542590265]": { + "$type": "EditorDisabledCompositionComponent", + "Id": 8092226976542590265 + } + } + }, + "Entity_[822803032020]": { + "Id": "Entity_[822803032020]", + "Name": "Entity1", + "Components": { + "Component_[11525365929370623807]": { + "$type": "EditorVisibilityComponent", + "Id": 11525365929370623807 + }, + "Component_[12334620273692642550]": { + "$type": "EditorLockComponent", + "Id": 12334620273692642550 + }, + "Component_[14389735759337977675]": { + "$type": "EditorPendingCompositionComponent", + "Id": 14389735759337977675 + }, + "Component_[16184381538555246534]": { + "$type": "AZ::Render::EditorMeshComponent", + "Id": 16184381538555246534, + "Controller": { + "Configuration": { + "ModelAsset": { + "assetId": { + "guid": "{E14975EF-E676-51A4-B826-3EF59CB645AA}", + "subId": 285127096 + }, + "assetHint": "testdata/objects/cube/cube.azmodel" + } + } + } + }, + "Component_[17962478023087084794]": { + "$type": "SelectionComponent", + "Id": 17962478023087084794 + }, + "Component_[18071675051915092508]": { + "$type": "EditorEntityIconComponent", + "Id": 18071675051915092508 + }, + "Component_[2115498007879087044]": { + "$type": "EditorInspectorComponent", + "Id": 2115498007879087044, + "ComponentOrderEntryArray": [ + { + "ComponentId": 399415038452606756 + }, + { + "ComponentId": 16184381538555246534, + "SortIndex": 1 + }, + { + "ComponentId": 7827190074535394331, + "SortIndex": 2 + } + ] + }, + "Component_[3518973002096080237]": { + "$type": "EditorOnlyEntityComponent", + "Id": 3518973002096080237 + }, + "Component_[399415038452606756]": { + "$type": "{27F1E1A1-8D9D-4C3B-BD3A-AFB9762449C0} TransformComponent", + "Id": 399415038452606756, + "Parent Entity": "ContainerEntity", + "Transform Data": { + "Translate": [ + -42.53056335449219, + -0.00018183141946792603, + 34.53608703613281 + ] + } + }, + "Component_[4564240319609068082]": { + "$type": "EditorEntitySortComponent", + "Id": 4564240319609068082 + }, + "Component_[7827190074535394331]": { + "$type": "EditorMaterialComponent", + "Id": 7827190074535394331, + "Controller": { + "Configuration": { + "materials": [ + { + "Key": { + "materialSlotStableId": 2418540911 + }, + "Value": { + "MaterialAsset": { + "assetId": { + "guid": "{AE350D9F-0000-526D-B49C-4303D687BB86}" + }, + "assetHint": "materials/presets/pbr/metal_brass_matte.azmaterial" + } + } + } + ] + } + } + }, + "Component_[8092226976542590265]": { + "$type": "EditorDisabledCompositionComponent", + "Id": 8092226976542590265 + } + } + }, + "Entity_[827097999316]": { + "Id": "Entity_[827097999316]", + "Name": "Entity1", + "Components": { + "Component_[11525365929370623807]": { + "$type": "EditorVisibilityComponent", + "Id": 11525365929370623807 + }, + "Component_[12334620273692642550]": { + "$type": "EditorLockComponent", + "Id": 12334620273692642550 + }, + "Component_[14389735759337977675]": { + "$type": "EditorPendingCompositionComponent", + "Id": 14389735759337977675 + }, + "Component_[16184381538555246534]": { + "$type": "AZ::Render::EditorMeshComponent", + "Id": 16184381538555246534, + "Controller": { + "Configuration": { + "ModelAsset": { + "assetId": { + "guid": "{E14975EF-E676-51A4-B826-3EF59CB645AA}", + "subId": 285127096 + }, + "assetHint": "testdata/objects/cube/cube.azmodel" + } + } + } + }, + "Component_[17962478023087084794]": { + "$type": "SelectionComponent", + "Id": 17962478023087084794 + }, + "Component_[18071675051915092508]": { + "$type": "EditorEntityIconComponent", + "Id": 18071675051915092508 + }, + "Component_[2115498007879087044]": { + "$type": "EditorInspectorComponent", + "Id": 2115498007879087044, + "ComponentOrderEntryArray": [ + { + "ComponentId": 399415038452606756 + }, + { + "ComponentId": 16184381538555246534, + "SortIndex": 1 + }, + { + "ComponentId": 7827190074535394331, + "SortIndex": 2 + } + ] + }, + "Component_[3518973002096080237]": { + "$type": "EditorOnlyEntityComponent", + "Id": 3518973002096080237 + }, + "Component_[399415038452606756]": { + "$type": "{27F1E1A1-8D9D-4C3B-BD3A-AFB9762449C0} TransformComponent", + "Id": 399415038452606756, + "Parent Entity": "ContainerEntity", + "Transform Data": { + "Translate": [ + -22.530563354492188, + -0.00018183141946792603, + 69.34888458251953 + ] + } + }, + "Component_[4564240319609068082]": { + "$type": "EditorEntitySortComponent", + "Id": 4564240319609068082 + }, + "Component_[7827190074535394331]": { + "$type": "EditorMaterialComponent", + "Id": 7827190074535394331, + "Controller": { + "Configuration": { + "materials": [ + { + "Key": { + "materialSlotStableId": 2418540911 + }, + "Value": { + "MaterialAsset": { + "assetId": { + "guid": "{FE52E7C8-064D-506A-9C26-433EB93747DE}" + }, + "assetHint": "materials/presets/pbr/metal_gold.azmaterial" + } + } + } + ] + } + } + }, + "Component_[8092226976542590265]": { + "$type": "EditorDisabledCompositionComponent", + "Id": 8092226976542590265 + } + } + }, + "Entity_[831392966612]": { + "Id": "Entity_[831392966612]", + "Name": "Entity1", + "Components": { + "Component_[1057179753323467068]": { + "$type": "EditorMaterialComponent", + "Id": 1057179753323467068, + "Controller": { + "Configuration": { + "materials": [ + { + "Key": { + "materialSlotStableId": 2418540911 + }, + "Value": { + "MaterialAsset": { + "assetId": { + "guid": "{721188E0-B7CC-5D06-8D5D-39AF8ABF2EF9}" + }, + "assetHint": "materials/presets/pbr/metal_titanium.azmaterial" + } + } + } + ] + } + } + }, + "Component_[11525365929370623807]": { + "$type": "EditorVisibilityComponent", + "Id": 11525365929370623807 + }, + "Component_[12334620273692642550]": { + "$type": "EditorLockComponent", + "Id": 12334620273692642550 + }, + "Component_[14389735759337977675]": { + "$type": "EditorPendingCompositionComponent", + "Id": 14389735759337977675 + }, + "Component_[16184381538555246534]": { + "$type": "AZ::Render::EditorMeshComponent", + "Id": 16184381538555246534, + "Controller": { + "Configuration": { + "ModelAsset": { + "assetId": { + "guid": "{E14975EF-E676-51A4-B826-3EF59CB645AA}", + "subId": 285127096 + }, + "assetHint": "testdata/objects/cube/cube.azmodel" + } + } + } + }, + "Component_[17962478023087084794]": { + "$type": "SelectionComponent", + "Id": 17962478023087084794 + }, + "Component_[18071675051915092508]": { + "$type": "EditorEntityIconComponent", + "Id": 18071675051915092508 + }, + "Component_[2115498007879087044]": { + "$type": "EditorInspectorComponent", + "Id": 2115498007879087044, + "ComponentOrderEntryArray": [ + { + "ComponentId": 399415038452606756 + }, + { + "ComponentId": 16184381538555246534, + "SortIndex": 1 + }, + { + "ComponentId": 1057179753323467068, + "SortIndex": 2 + } + ] + }, + "Component_[3518973002096080237]": { + "$type": "EditorOnlyEntityComponent", + "Id": 3518973002096080237 + }, + "Component_[399415038452606756]": { + "$type": "{27F1E1A1-8D9D-4C3B-BD3A-AFB9762449C0} TransformComponent", + "Id": 399415038452606756, + "Parent Entity": "ContainerEntity", + "Transform Data": { + "Translate": [ + 12.530143737792969, + -0.00018183141946792603, + 69.34888458251953 + ] + } + }, + "Component_[4564240319609068082]": { + "$type": "EditorEntitySortComponent", + "Id": 4564240319609068082 + }, + "Component_[8092226976542590265]": { + "$type": "EditorDisabledCompositionComponent", + "Id": 8092226976542590265 + } + } + }, + "Entity_[835687933908]": { + "Id": "Entity_[835687933908]", + "Name": "Entity1", + "Components": { + "Component_[11525365929370623807]": { + "$type": "EditorVisibilityComponent", + "Id": 11525365929370623807 + }, + "Component_[12334620273692642550]": { + "$type": "EditorLockComponent", + "Id": 12334620273692642550 + }, + "Component_[14389735759337977675]": { + "$type": "EditorPendingCompositionComponent", + "Id": 14389735759337977675 + }, + "Component_[16184381538555246534]": { + "$type": "AZ::Render::EditorMeshComponent", + "Id": 16184381538555246534, + "Controller": { + "Configuration": { + "ModelAsset": { + "assetId": { + "guid": "{E14975EF-E676-51A4-B826-3EF59CB645AA}", + "subId": 285127096 + }, + "assetHint": "testdata/objects/cube/cube.azmodel" + } + } + } + }, + "Component_[17962478023087084794]": { + "$type": "SelectionComponent", + "Id": 17962478023087084794 + }, + "Component_[18071675051915092508]": { + "$type": "EditorEntityIconComponent", + "Id": 18071675051915092508 + }, + "Component_[2115498007879087044]": { + "$type": "EditorInspectorComponent", + "Id": 2115498007879087044, + "ComponentOrderEntryArray": [ + { + "ComponentId": 399415038452606756 + }, + { + "ComponentId": 16184381538555246534, + "SortIndex": 1 + }, + { + "ComponentId": 7827190074535394331, + "SortIndex": 2 + } + ] + }, + "Component_[3518973002096080237]": { + "$type": "EditorOnlyEntityComponent", + "Id": 3518973002096080237 + }, + "Component_[399415038452606756]": { + "$type": "{27F1E1A1-8D9D-4C3B-BD3A-AFB9762449C0} TransformComponent", + "Id": 399415038452606756, + "Parent Entity": "ContainerEntity", + "Transform Data": { + "Translate": [ + 32.53014373779297, + -0.00018183141946792603, + 79.38228607177734 + ] + } + }, + "Component_[4564240319609068082]": { + "$type": "EditorEntitySortComponent", + "Id": 4564240319609068082 + }, + "Component_[7827190074535394331]": { + "$type": "EditorMaterialComponent", + "Id": 7827190074535394331, + "Controller": { + "Configuration": { + "materials": [ + { + "Key": { + "materialSlotStableId": 2418540911 + }, + "Value": { + "MaterialAsset": { + "assetId": { + "guid": "{C60A39AF-BB76-51BD-9468-A88C9A6F78D7}" + }, + "assetHint": "materials/presets/pbr/metal_cobalt_matte.azmaterial" + } + } + } + ] + } + } + }, + "Component_[8092226976542590265]": { + "$type": "EditorDisabledCompositionComponent", + "Id": 8092226976542590265 + } + } + }, + "Entity_[839982901204]": { + "Id": "Entity_[839982901204]", + "Name": "Entity1", + "Components": { + "Component_[1057179753323467068]": { + "$type": "EditorMaterialComponent", + "Id": 1057179753323467068, + "Controller": { + "Configuration": { + "materials": [ + { + "Key": { + "materialSlotStableId": 2418540911 + }, + "Value": { + "MaterialAsset": { + "assetId": { + "guid": "{3F0DF0C4-5F23-5EB1-B762-7344AFFDC011}" + }, + "assetHint": "materials/presets/pbr/metal_titanium_polished.azmaterial" + } + } + } + ] + } + } + }, + "Component_[11525365929370623807]": { + "$type": "EditorVisibilityComponent", + "Id": 11525365929370623807 + }, + "Component_[12334620273692642550]": { + "$type": "EditorLockComponent", + "Id": 12334620273692642550 + }, + "Component_[14389735759337977675]": { + "$type": "EditorPendingCompositionComponent", + "Id": 14389735759337977675 + }, + "Component_[16184381538555246534]": { + "$type": "AZ::Render::EditorMeshComponent", + "Id": 16184381538555246534, + "Controller": { + "Configuration": { + "ModelAsset": { + "assetId": { + "guid": "{E14975EF-E676-51A4-B826-3EF59CB645AA}", + "subId": 285127096 + }, + "assetHint": "testdata/objects/cube/cube.azmodel" + } + } + } + }, + "Component_[17962478023087084794]": { + "$type": "SelectionComponent", + "Id": 17962478023087084794 + }, + "Component_[18071675051915092508]": { + "$type": "EditorEntityIconComponent", + "Id": 18071675051915092508 + }, + "Component_[2115498007879087044]": { + "$type": "EditorInspectorComponent", + "Id": 2115498007879087044, + "ComponentOrderEntryArray": [ + { + "ComponentId": 399415038452606756 + }, + { + "ComponentId": 16184381538555246534, + "SortIndex": 1 + }, + { + "ComponentId": 1057179753323467068, + "SortIndex": 2 + } + ] + }, + "Component_[3518973002096080237]": { + "$type": "EditorOnlyEntityComponent", + "Id": 3518973002096080237 + }, + "Component_[399415038452606756]": { + "$type": "{27F1E1A1-8D9D-4C3B-BD3A-AFB9762449C0} TransformComponent", + "Id": 399415038452606756, + "Parent Entity": "ContainerEntity", + "Transform Data": { + "Translate": [ + 12.530143737792969, + -0.00018183141946792603, + 45.14218521118164 + ] + } + }, + "Component_[4564240319609068082]": { + "$type": "EditorEntitySortComponent", + "Id": 4564240319609068082 + }, + "Component_[8092226976542590265]": { + "$type": "EditorDisabledCompositionComponent", + "Id": 8092226976542590265 + } + } + }, + "Entity_[844277868500]": { + "Id": "Entity_[844277868500]", + "Name": "Entity1", + "Components": { + "Component_[11525365929370623807]": { + "$type": "EditorVisibilityComponent", + "Id": 11525365929370623807 + }, + "Component_[12334620273692642550]": { + "$type": "EditorLockComponent", + "Id": 12334620273692642550 + }, + "Component_[14389735759337977675]": { + "$type": "EditorPendingCompositionComponent", + "Id": 14389735759337977675 + }, + "Component_[16184381538555246534]": { + "$type": "AZ::Render::EditorMeshComponent", + "Id": 16184381538555246534, + "Controller": { + "Configuration": { + "ModelAsset": { + "assetId": { + "guid": "{E14975EF-E676-51A4-B826-3EF59CB645AA}", + "subId": 285127096 + }, + "assetHint": "testdata/objects/cube/cube.azmodel" + } + } + } + }, + "Component_[17962478023087084794]": { + "$type": "SelectionComponent", + "Id": 17962478023087084794 + }, + "Component_[18071675051915092508]": { + "$type": "EditorEntityIconComponent", + "Id": 18071675051915092508 + }, + "Component_[2115498007879087044]": { + "$type": "EditorInspectorComponent", + "Id": 2115498007879087044, + "ComponentOrderEntryArray": [ + { + "ComponentId": 399415038452606756 + }, + { + "ComponentId": 16184381538555246534, + "SortIndex": 1 + }, + { + "ComponentId": 7827190074535394331, + "SortIndex": 2 + } + ] + }, + "Component_[3518973002096080237]": { + "$type": "EditorOnlyEntityComponent", + "Id": 3518973002096080237 + }, + "Component_[399415038452606756]": { + "$type": "{27F1E1A1-8D9D-4C3B-BD3A-AFB9762449C0} TransformComponent", + "Id": 399415038452606756, + "Parent Entity": "ContainerEntity", + "Transform Data": { + "Translate": [ + 27.53014373779297, + -0.00018183141946792603, + 84.40655517578125 + ] + } + }, + "Component_[4564240319609068082]": { + "$type": "EditorEntitySortComponent", + "Id": 4564240319609068082 + }, + "Component_[7827190074535394331]": { + "$type": "EditorMaterialComponent", + "Id": 7827190074535394331, + "Controller": { + "Configuration": { + "materials": [ + { + "Key": { + "materialSlotStableId": 2418540911 + }, + "Value": { + "MaterialAsset": { + "assetId": { + "guid": "{B7C712DC-4839-58BB-B522-A4F120084CF5}" + }, + "assetHint": "materials/presets/pbr/metal_chrome.azmaterial" + } + } + } + ] + } + } + }, + "Component_[8092226976542590265]": { + "$type": "EditorDisabledCompositionComponent", + "Id": 8092226976542590265 + } + } + }, + "Entity_[848572835796]": { + "Id": "Entity_[848572835796]", + "Name": "Entity1", + "Components": { + "Component_[11525365929370623807]": { + "$type": "EditorVisibilityComponent", + "Id": 11525365929370623807 + }, + "Component_[12334620273692642550]": { + "$type": "EditorLockComponent", + "Id": 12334620273692642550 + }, + "Component_[14389735759337977675]": { + "$type": "EditorPendingCompositionComponent", + "Id": 14389735759337977675 + }, + "Component_[16184381538555246534]": { + "$type": "AZ::Render::EditorMeshComponent", + "Id": 16184381538555246534, + "Controller": { + "Configuration": { + "ModelAsset": { + "assetId": { + "guid": "{E14975EF-E676-51A4-B826-3EF59CB645AA}", + "subId": 285127096 + }, + "assetHint": "testdata/objects/cube/cube.azmodel" + } + } + } + }, + "Component_[17962478023087084794]": { + "$type": "SelectionComponent", + "Id": 17962478023087084794 + }, + "Component_[18071675051915092508]": { + "$type": "EditorEntityIconComponent", + "Id": 18071675051915092508 + }, + "Component_[2115498007879087044]": { + "$type": "EditorInspectorComponent", + "Id": 2115498007879087044, + "ComponentOrderEntryArray": [ + { + "ComponentId": 399415038452606756 + }, + { + "ComponentId": 16184381538555246534, + "SortIndex": 1 + }, + { + "ComponentId": 7827190074535394331, + "SortIndex": 2 + } + ] + }, + "Component_[3518973002096080237]": { + "$type": "EditorOnlyEntityComponent", + "Id": 3518973002096080237 + }, + "Component_[399415038452606756]": { + "$type": "{27F1E1A1-8D9D-4C3B-BD3A-AFB9762449C0} TransformComponent", + "Id": 399415038452606756, + "Parent Entity": "ContainerEntity", + "Transform Data": { + "Translate": [ + 47.53014373779297, + -0.00018183141946792603, + 9.475835800170898 + ] + } + }, + "Component_[4564240319609068082]": { + "$type": "EditorEntitySortComponent", + "Id": 4564240319609068082 + }, + "Component_[7827190074535394331]": { + "$type": "EditorMaterialComponent", + "Id": 7827190074535394331, + "Controller": { + "Configuration": { + "materials": [ + { + "Key": { + "materialSlotStableId": 2418540911 + }, + "Value": { + "MaterialAsset": { + "assetId": { + "guid": "{892EA944-0325-5FA6-94D7-4AB4FC02A0F5}" + }, + "assetHint": "materials/presets/pbr/metal_iron.azmaterial" + } + } + } + ] + } + } + }, + "Component_[8092226976542590265]": { + "$type": "EditorDisabledCompositionComponent", + "Id": 8092226976542590265 + } + } + }, + "Entity_[852867803092]": { + "Id": "Entity_[852867803092]", + "Name": "Entity1", + "Components": { + "Component_[1057179753323467068]": { + "$type": "EditorMaterialComponent", + "Id": 1057179753323467068, + "Controller": { + "Configuration": { + "materials": [ + { + "Key": { + "materialSlotStableId": 2418540911 + }, + "Value": { + "MaterialAsset": { + "assetId": { + "guid": "{3F0DF0C4-5F23-5EB1-B762-7344AFFDC011}" + }, + "assetHint": "materials/presets/pbr/metal_titanium_polished.azmaterial" + } + } + } + ] + } + } + }, + "Component_[11525365929370623807]": { + "$type": "EditorVisibilityComponent", + "Id": 11525365929370623807 + }, + "Component_[12334620273692642550]": { + "$type": "EditorLockComponent", + "Id": 12334620273692642550 + }, + "Component_[14389735759337977675]": { + "$type": "EditorPendingCompositionComponent", + "Id": 14389735759337977675 + }, + "Component_[16184381538555246534]": { + "$type": "AZ::Render::EditorMeshComponent", + "Id": 16184381538555246534, + "Controller": { + "Configuration": { + "ModelAsset": { + "assetId": { + "guid": "{E14975EF-E676-51A4-B826-3EF59CB645AA}", + "subId": 285127096 + }, + "assetHint": "testdata/objects/cube/cube.azmodel" + } + } + } + }, + "Component_[17962478023087084794]": { + "$type": "SelectionComponent", + "Id": 17962478023087084794 + }, + "Component_[18071675051915092508]": { + "$type": "EditorEntityIconComponent", + "Id": 18071675051915092508 + }, + "Component_[2115498007879087044]": { + "$type": "EditorInspectorComponent", + "Id": 2115498007879087044, + "ComponentOrderEntryArray": [ + { + "ComponentId": 399415038452606756 + }, + { + "ComponentId": 16184381538555246534, + "SortIndex": 1 + }, + { + "ComponentId": 1057179753323467068, + "SortIndex": 2 + } + ] + }, + "Component_[3518973002096080237]": { + "$type": "EditorOnlyEntityComponent", + "Id": 3518973002096080237 + }, + "Component_[399415038452606756]": { + "$type": "{27F1E1A1-8D9D-4C3B-BD3A-AFB9762449C0} TransformComponent", + "Id": 399415038452606756, + "Parent Entity": "ContainerEntity", + "Transform Data": { + "Translate": [ + 12.530143737792969, + -0.00018183141946792603, + 30.08451271057129 + ] + } + }, + "Component_[4564240319609068082]": { + "$type": "EditorEntitySortComponent", + "Id": 4564240319609068082 + }, + "Component_[8092226976542590265]": { + "$type": "EditorDisabledCompositionComponent", + "Id": 8092226976542590265 + } + } + }, + "Entity_[857162770388]": { + "Id": "Entity_[857162770388]", + "Name": "Entity1", + "Components": { + "Component_[11525365929370623807]": { + "$type": "EditorVisibilityComponent", + "Id": 11525365929370623807 + }, + "Component_[12334620273692642550]": { + "$type": "EditorLockComponent", + "Id": 12334620273692642550 + }, + "Component_[14389735759337977675]": { + "$type": "EditorPendingCompositionComponent", + "Id": 14389735759337977675 + }, + "Component_[16184381538555246534]": { + "$type": "AZ::Render::EditorMeshComponent", + "Id": 16184381538555246534, + "Controller": { + "Configuration": { + "ModelAsset": { + "assetId": { + "guid": "{E14975EF-E676-51A4-B826-3EF59CB645AA}", + "subId": 285127096 + }, + "assetHint": "testdata/objects/cube/cube.azmodel" + } + } + } + }, + "Component_[17962478023087084794]": { + "$type": "SelectionComponent", + "Id": 17962478023087084794 + }, + "Component_[18071675051915092508]": { + "$type": "EditorEntityIconComponent", + "Id": 18071675051915092508 + }, + "Component_[2115498007879087044]": { + "$type": "EditorInspectorComponent", + "Id": 2115498007879087044, + "ComponentOrderEntryArray": [ + { + "ComponentId": 399415038452606756 + }, + { + "ComponentId": 16184381538555246534, + "SortIndex": 1 + }, + { + "ComponentId": 7827190074535394331, + "SortIndex": 2 + } + ] + }, + "Component_[3518973002096080237]": { + "$type": "EditorOnlyEntityComponent", + "Id": 3518973002096080237 + }, + "Component_[399415038452606756]": { + "$type": "{27F1E1A1-8D9D-4C3B-BD3A-AFB9762449C0} TransformComponent", + "Id": 399415038452606756, + "Parent Entity": "ContainerEntity", + "Transform Data": { + "Translate": [ + -32.53056335449219, + -0.00018183141946792603, + 9.475835800170898 + ] + } + }, + "Component_[4564240319609068082]": { + "$type": "EditorEntitySortComponent", + "Id": 4564240319609068082 + }, + "Component_[7827190074535394331]": { + "$type": "EditorMaterialComponent", + "Id": 7827190074535394331, + "Controller": { + "Configuration": { + "materials": [ + { + "Key": { + "materialSlotStableId": 2418540911 + }, + "Value": { + "MaterialAsset": { + "assetId": { + "guid": "{99976D73-6248-5D66-AD15-E8F52B0AFE36}" + }, + "assetHint": "materials/presets/pbr/metal_cobalt.azmaterial" + } + } + } + ] + } + } + }, + "Component_[8092226976542590265]": { + "$type": "EditorDisabledCompositionComponent", + "Id": 8092226976542590265 + } + } + }, + "Entity_[861457737684]": { + "Id": "Entity_[861457737684]", + "Name": "Entity1", + "Components": { + "Component_[11525365929370623807]": { + "$type": "EditorVisibilityComponent", + "Id": 11525365929370623807 + }, + "Component_[12334620273692642550]": { + "$type": "EditorLockComponent", + "Id": 12334620273692642550 + }, + "Component_[14389735759337977675]": { + "$type": "EditorPendingCompositionComponent", + "Id": 14389735759337977675 + }, + "Component_[16184381538555246534]": { + "$type": "AZ::Render::EditorMeshComponent", + "Id": 16184381538555246534, + "Controller": { + "Configuration": { + "ModelAsset": { + "assetId": { + "guid": "{E14975EF-E676-51A4-B826-3EF59CB645AA}", + "subId": 285127096 + }, + "assetHint": "testdata/objects/cube/cube.azmodel" + } + } + } + }, + "Component_[17962478023087084794]": { + "$type": "SelectionComponent", + "Id": 17962478023087084794 + }, + "Component_[18071675051915092508]": { + "$type": "EditorEntityIconComponent", + "Id": 18071675051915092508 + }, + "Component_[2115498007879087044]": { + "$type": "EditorInspectorComponent", + "Id": 2115498007879087044, + "ComponentOrderEntryArray": [ + { + "ComponentId": 399415038452606756 + }, + { + "ComponentId": 16184381538555246534, + "SortIndex": 1 + }, + { + "ComponentId": 7827190074535394331, + "SortIndex": 2 + } + ] + }, + "Component_[3518973002096080237]": { + "$type": "EditorOnlyEntityComponent", + "Id": 3518973002096080237 + }, + "Component_[399415038452606756]": { + "$type": "{27F1E1A1-8D9D-4C3B-BD3A-AFB9762449C0} TransformComponent", + "Id": 399415038452606756, + "Parent Entity": "ContainerEntity", + "Transform Data": { + "Translate": [ + 2.5301437377929688, + -0.00018183141946792603, + 89.95755767822266 + ] + } + }, + "Component_[4564240319609068082]": { + "$type": "EditorEntitySortComponent", + "Id": 4564240319609068082 + }, + "Component_[7827190074535394331]": { + "$type": "EditorMaterialComponent", + "Id": 7827190074535394331, + "Controller": { + "Configuration": { + "materials": [ + { + "Key": { + "materialSlotStableId": 2418540911 + }, + "Value": { + "MaterialAsset": { + "assetId": { + "guid": "{79419183-FFCE-5A89-AA16-C2789D81AF75}" + }, + "assetHint": "materials/presets/pbr/metal_platinum_polished.azmaterial" + } + } + } + ] + } + } + }, + "Component_[8092226976542590265]": { + "$type": "EditorDisabledCompositionComponent", + "Id": 8092226976542590265 + } + } + }, + "Entity_[865752704980]": { + "Id": "Entity_[865752704980]", + "Name": "Entity1", + "Components": { + "Component_[11525365929370623807]": { + "$type": "EditorVisibilityComponent", + "Id": 11525365929370623807 + }, + "Component_[12334620273692642550]": { + "$type": "EditorLockComponent", + "Id": 12334620273692642550 + }, + "Component_[14389735759337977675]": { + "$type": "EditorPendingCompositionComponent", + "Id": 14389735759337977675 + }, + "Component_[16184381538555246534]": { + "$type": "AZ::Render::EditorMeshComponent", + "Id": 16184381538555246534, + "Controller": { + "Configuration": { + "ModelAsset": { + "assetId": { + "guid": "{E14975EF-E676-51A4-B826-3EF59CB645AA}", + "subId": 285127096 + }, + "assetHint": "testdata/objects/cube/cube.azmodel" + } + } + } + }, + "Component_[17962478023087084794]": { + "$type": "SelectionComponent", + "Id": 17962478023087084794 + }, + "Component_[18071675051915092508]": { + "$type": "EditorEntityIconComponent", + "Id": 18071675051915092508 + }, + "Component_[2115498007879087044]": { + "$type": "EditorInspectorComponent", + "Id": 2115498007879087044, + "ComponentOrderEntryArray": [ + { + "ComponentId": 399415038452606756 + }, + { + "ComponentId": 16184381538555246534, + "SortIndex": 1 + }, + { + "ComponentId": 7827190074535394331, + "SortIndex": 2 + } + ] + }, + "Component_[3518973002096080237]": { + "$type": "EditorOnlyEntityComponent", + "Id": 3518973002096080237 + }, + "Component_[399415038452606756]": { + "$type": "{27F1E1A1-8D9D-4C3B-BD3A-AFB9762449C0} TransformComponent", + "Id": 399415038452606756, + "Parent Entity": "ContainerEntity", + "Transform Data": { + "Translate": [ + -37.53056335449219, + -0.00018183141946792603, + 64.32462310791016 + ] + } + }, + "Component_[4564240319609068082]": { + "$type": "EditorEntitySortComponent", + "Id": 4564240319609068082 + }, + "Component_[7827190074535394331]": { + "$type": "EditorMaterialComponent", + "Id": 7827190074535394331, + "Controller": { + "Configuration": { + "materials": [ + { + "Key": { + "materialSlotStableId": 2418540911 + }, + "Value": { + "MaterialAsset": { + "assetId": { + "guid": "{A78EA2FC-688B-5E3A-A7F6-DB413D11D4CF}" + }, + "assetHint": "materials/presets/pbr/metal_chrome_matte.azmaterial" + } + } + } + ] + } + } + }, + "Component_[8092226976542590265]": { + "$type": "EditorDisabledCompositionComponent", + "Id": 8092226976542590265 + } + } + }, + "Entity_[870047672276]": { + "Id": "Entity_[870047672276]", + "Name": "Entity1", + "Components": { + "Component_[11525365929370623807]": { + "$type": "EditorVisibilityComponent", + "Id": 11525365929370623807 + }, + "Component_[12334620273692642550]": { + "$type": "EditorLockComponent", + "Id": 12334620273692642550 + }, + "Component_[14389735759337977675]": { + "$type": "EditorPendingCompositionComponent", + "Id": 14389735759337977675 + }, + "Component_[16184381538555246534]": { + "$type": "AZ::Render::EditorMeshComponent", + "Id": 16184381538555246534, + "Controller": { + "Configuration": { + "ModelAsset": { + "assetId": { + "guid": "{E14975EF-E676-51A4-B826-3EF59CB645AA}", + "subId": 285127096 + }, + "assetHint": "testdata/objects/cube/cube.azmodel" + } + } + } + }, + "Component_[17962478023087084794]": { + "$type": "SelectionComponent", + "Id": 17962478023087084794 + }, + "Component_[18071675051915092508]": { + "$type": "EditorEntityIconComponent", + "Id": 18071675051915092508 + }, + "Component_[2115498007879087044]": { + "$type": "EditorInspectorComponent", + "Id": 2115498007879087044, + "ComponentOrderEntryArray": [ + { + "ComponentId": 399415038452606756 + }, + { + "ComponentId": 16184381538555246534, + "SortIndex": 1 + }, + { + "ComponentId": 7827190074535394331, + "SortIndex": 2 + } + ] + }, + "Component_[3518973002096080237]": { + "$type": "EditorOnlyEntityComponent", + "Id": 3518973002096080237 + }, + "Component_[399415038452606756]": { + "$type": "{27F1E1A1-8D9D-4C3B-BD3A-AFB9762449C0} TransformComponent", + "Id": 399415038452606756, + "Parent Entity": "ContainerEntity", + "Transform Data": { + "Translate": [ + -37.53056335449219, + -0.00018183141946792603, + 69.34888458251953 + ] + } + }, + "Component_[4564240319609068082]": { + "$type": "EditorEntitySortComponent", + "Id": 4564240319609068082 + }, + "Component_[7827190074535394331]": { + "$type": "EditorMaterialComponent", + "Id": 7827190074535394331, + "Controller": { + "Configuration": { + "materials": [ + { + "Key": { + "materialSlotStableId": 2418540911 + }, + "Value": { + "MaterialAsset": { + "assetId": { + "guid": "{B7C712DC-4839-58BB-B522-A4F120084CF5}" + }, + "assetHint": "materials/presets/pbr/metal_chrome.azmaterial" + } + } + } + ] + } + } + }, + "Component_[8092226976542590265]": { + "$type": "EditorDisabledCompositionComponent", + "Id": 8092226976542590265 + } + } + }, + "Entity_[874342639572]": { + "Id": "Entity_[874342639572]", + "Name": "Entity1", + "Components": { + "Component_[11525365929370623807]": { + "$type": "EditorVisibilityComponent", + "Id": 11525365929370623807 + }, + "Component_[12334620273692642550]": { + "$type": "EditorLockComponent", + "Id": 12334620273692642550 + }, + "Component_[14389735759337977675]": { + "$type": "EditorPendingCompositionComponent", + "Id": 14389735759337977675 + }, + "Component_[16184381538555246534]": { + "$type": "AZ::Render::EditorMeshComponent", + "Id": 16184381538555246534, + "Controller": { + "Configuration": { + "ModelAsset": { + "assetId": { + "guid": "{E14975EF-E676-51A4-B826-3EF59CB645AA}", + "subId": 285127096 + }, + "assetHint": "testdata/objects/cube/cube.azmodel" + } + } + } + }, + "Component_[17962478023087084794]": { + "$type": "SelectionComponent", + "Id": 17962478023087084794 + }, + "Component_[18071675051915092508]": { + "$type": "EditorEntityIconComponent", + "Id": 18071675051915092508 + }, + "Component_[2115498007879087044]": { + "$type": "EditorInspectorComponent", + "Id": 2115498007879087044, + "ComponentOrderEntryArray": [ + { + "ComponentId": 399415038452606756 + }, + { + "ComponentId": 16184381538555246534, + "SortIndex": 1 + }, + { + "ComponentId": 7827190074535394331, + "SortIndex": 2 + } + ] + }, + "Component_[3518973002096080237]": { + "$type": "EditorOnlyEntityComponent", + "Id": 3518973002096080237 + }, + "Component_[399415038452606756]": { + "$type": "{27F1E1A1-8D9D-4C3B-BD3A-AFB9762449C0} TransformComponent", + "Id": 399415038452606756, + "Parent Entity": "ContainerEntity", + "Transform Data": { + "Translate": [ + -12.530563354492188, + -0.00018183141946792603, + 4.451573371887207 + ] + } + }, + "Component_[4564240319609068082]": { + "$type": "EditorEntitySortComponent", + "Id": 4564240319609068082 + }, + "Component_[7827190074535394331]": { + "$type": "EditorMaterialComponent", + "Id": 7827190074535394331, + "Controller": { + "Configuration": { + "materials": [ + { + "Key": { + "materialSlotStableId": 2418540911 + }, + "Value": { + "MaterialAsset": { + "assetId": { + "guid": "{F2AD0EBF-7137-58D1-9991-9552FAD41B19}" + }, + "assetHint": "materials/presets/pbr/metal_mercury.azmaterial" + } + } + } + ] + } + } + }, + "Component_[8092226976542590265]": { + "$type": "EditorDisabledCompositionComponent", + "Id": 8092226976542590265 + } + } + }, + "Entity_[878637606868]": { + "Id": "Entity_[878637606868]", + "Name": "Entity1", + "Components": { + "Component_[11525365929370623807]": { + "$type": "EditorVisibilityComponent", + "Id": 11525365929370623807 + }, + "Component_[12334620273692642550]": { + "$type": "EditorLockComponent", + "Id": 12334620273692642550 + }, + "Component_[14389735759337977675]": { + "$type": "EditorPendingCompositionComponent", + "Id": 14389735759337977675 + }, + "Component_[16184381538555246534]": { + "$type": "AZ::Render::EditorMeshComponent", + "Id": 16184381538555246534, + "Controller": { + "Configuration": { + "ModelAsset": { + "assetId": { + "guid": "{E14975EF-E676-51A4-B826-3EF59CB645AA}", + "subId": 285127096 + }, + "assetHint": "testdata/objects/cube/cube.azmodel" + } + } + } + }, + "Component_[17962478023087084794]": { + "$type": "SelectionComponent", + "Id": 17962478023087084794 + }, + "Component_[18071675051915092508]": { + "$type": "EditorEntityIconComponent", + "Id": 18071675051915092508 + }, + "Component_[2115498007879087044]": { + "$type": "EditorInspectorComponent", + "Id": 2115498007879087044, + "ComponentOrderEntryArray": [ + { + "ComponentId": 399415038452606756 + }, + { + "ComponentId": 16184381538555246534, + "SortIndex": 1 + }, + { + "ComponentId": 7827190074535394331, + "SortIndex": 2 + } + ] + }, + "Component_[3518973002096080237]": { + "$type": "EditorOnlyEntityComponent", + "Id": 3518973002096080237 + }, + "Component_[399415038452606756]": { + "$type": "{27F1E1A1-8D9D-4C3B-BD3A-AFB9762449C0} TransformComponent", + "Id": 399415038452606756, + "Parent Entity": "ContainerEntity", + "Transform Data": { + "Translate": [ + -7.5305633544921875, + -0.00018183141946792603, + 89.95755767822266 + ] + } + }, + "Component_[4564240319609068082]": { + "$type": "EditorEntitySortComponent", + "Id": 4564240319609068082 + }, + "Component_[7827190074535394331]": { + "$type": "EditorMaterialComponent", + "Id": 7827190074535394331, + "Controller": { + "Configuration": { + "materials": [ + { + "Key": { + "materialSlotStableId": 2418540911 + }, + "Value": { + "MaterialAsset": { + "assetId": { + "guid": "{E66E4343-F45A-536D-AAE1-C4D096420640}" + }, + "assetHint": "materials/presets/pbr/metal_nickel_polished.azmaterial" + } + } + } + ] + } + } + }, + "Component_[8092226976542590265]": { + "$type": "EditorDisabledCompositionComponent", + "Id": 8092226976542590265 + } + } + }, + "Entity_[882932574164]": { + "Id": "Entity_[882932574164]", + "Name": "Entity1", + "Components": { + "Component_[11525365929370623807]": { + "$type": "EditorVisibilityComponent", + "Id": 11525365929370623807 + }, + "Component_[12334620273692642550]": { + "$type": "EditorLockComponent", + "Id": 12334620273692642550 + }, + "Component_[14389735759337977675]": { + "$type": "EditorPendingCompositionComponent", + "Id": 14389735759337977675 + }, + "Component_[16184381538555246534]": { + "$type": "AZ::Render::EditorMeshComponent", + "Id": 16184381538555246534, + "Controller": { + "Configuration": { + "ModelAsset": { + "assetId": { + "guid": "{E14975EF-E676-51A4-B826-3EF59CB645AA}", + "subId": 285127096 + }, + "assetHint": "testdata/objects/cube/cube.azmodel" + } + } + } + }, + "Component_[17962478023087084794]": { + "$type": "SelectionComponent", + "Id": 17962478023087084794 + }, + "Component_[18071675051915092508]": { + "$type": "EditorEntityIconComponent", + "Id": 18071675051915092508 + }, + "Component_[2115498007879087044]": { + "$type": "EditorInspectorComponent", + "Id": 2115498007879087044, + "ComponentOrderEntryArray": [ + { + "ComponentId": 399415038452606756 + }, + { + "ComponentId": 16184381538555246534, + "SortIndex": 1 + }, + { + "ComponentId": 7827190074535394331, + "SortIndex": 2 + } + ] + }, + "Component_[3518973002096080237]": { + "$type": "EditorOnlyEntityComponent", + "Id": 3518973002096080237 + }, + "Component_[399415038452606756]": { + "$type": "{27F1E1A1-8D9D-4C3B-BD3A-AFB9762449C0} TransformComponent", + "Id": 399415038452606756, + "Parent Entity": "ContainerEntity", + "Transform Data": { + "Translate": [ + 17.53014373779297, + -0.00018183141946792603, + 99.43339538574219 + ] + } + }, + "Component_[4564240319609068082]": { + "$type": "EditorEntitySortComponent", + "Id": 4564240319609068082 + }, + "Component_[7827190074535394331]": { + "$type": "EditorMaterialComponent", + "Id": 7827190074535394331, + "Controller": { + "Configuration": { + "materials": [ + { + "Key": {}, + "Value": { + "MaterialAsset": { + "assetId": { + "guid": "{721188E0-B7CC-5D06-8D5D-39AF8ABF2EF9}" + }, + "assetHint": "materials/presets/pbr/metal_titanium.azmaterial" + } + } + }, + { + "Key": { + "materialSlotStableId": 2418540911 + }, + "Value": { + "MaterialAsset": { + "assetId": { + "guid": "{94CF2BD7-7D09-5577-B1D8-3FF85B15E127}" + }, + "assetHint": "materials/presets/pbr/metal_aluminum.azmaterial" + } + } + } + ] + } + } + }, + "Component_[8092226976542590265]": { + "$type": "EditorDisabledCompositionComponent", + "Id": 8092226976542590265 + } + } + }, + "Entity_[887227541460]": { + "Id": "Entity_[887227541460]", + "Name": "Entity1", + "Components": { + "Component_[11525365929370623807]": { + "$type": "EditorVisibilityComponent", + "Id": 11525365929370623807 + }, + "Component_[12334620273692642550]": { + "$type": "EditorLockComponent", + "Id": 12334620273692642550 + }, + "Component_[14389735759337977675]": { + "$type": "EditorPendingCompositionComponent", + "Id": 14389735759337977675 + }, + "Component_[16184381538555246534]": { + "$type": "AZ::Render::EditorMeshComponent", + "Id": 16184381538555246534, + "Controller": { + "Configuration": { + "ModelAsset": { + "assetId": { + "guid": "{E14975EF-E676-51A4-B826-3EF59CB645AA}", + "subId": 285127096 + }, + "assetHint": "testdata/objects/cube/cube.azmodel" + } + } + } + }, + "Component_[17962478023087084794]": { + "$type": "SelectionComponent", + "Id": 17962478023087084794 + }, + "Component_[18071675051915092508]": { + "$type": "EditorEntityIconComponent", + "Id": 18071675051915092508 + }, + "Component_[2115498007879087044]": { + "$type": "EditorInspectorComponent", + "Id": 2115498007879087044, + "ComponentOrderEntryArray": [ + { + "ComponentId": 399415038452606756 + }, + { + "ComponentId": 16184381538555246534, + "SortIndex": 1 + }, + { + "ComponentId": 7827190074535394331, + "SortIndex": 2 + } + ] + }, + "Component_[3518973002096080237]": { + "$type": "EditorOnlyEntityComponent", + "Id": 3518973002096080237 + }, + "Component_[399415038452606756]": { + "$type": "{27F1E1A1-8D9D-4C3B-BD3A-AFB9762449C0} TransformComponent", + "Id": 399415038452606756, + "Parent Entity": "ContainerEntity", + "Transform Data": { + "Translate": [ + 47.53014373779297, + -0.00018183141946792603, + 69.34888458251953 + ] + } + }, + "Component_[4564240319609068082]": { + "$type": "EditorEntitySortComponent", + "Id": 4564240319609068082 + }, + "Component_[7827190074535394331]": { + "$type": "EditorMaterialComponent", + "Id": 7827190074535394331, + "Controller": { + "Configuration": { + "materials": [ + { + "Key": { + "materialSlotStableId": 2418540911 + }, + "Value": { + "MaterialAsset": { + "assetId": { + "guid": "{892EA944-0325-5FA6-94D7-4AB4FC02A0F5}" + }, + "assetHint": "materials/presets/pbr/metal_iron.azmaterial" + } + } + } + ] + } + } + }, + "Component_[8092226976542590265]": { + "$type": "EditorDisabledCompositionComponent", + "Id": 8092226976542590265 + } + } + }, + "Entity_[891522508756]": { + "Id": "Entity_[891522508756]", + "Name": "Entity1", + "Components": { + "Component_[11525365929370623807]": { + "$type": "EditorVisibilityComponent", + "Id": 11525365929370623807 + }, + "Component_[12334620273692642550]": { + "$type": "EditorLockComponent", + "Id": 12334620273692642550 + }, + "Component_[14389735759337977675]": { + "$type": "EditorPendingCompositionComponent", + "Id": 14389735759337977675 + }, + "Component_[16184381538555246534]": { + "$type": "AZ::Render::EditorMeshComponent", + "Id": 16184381538555246534, + "Controller": { + "Configuration": { + "ModelAsset": { + "assetId": { + "guid": "{E14975EF-E676-51A4-B826-3EF59CB645AA}", + "subId": 285127096 + }, + "assetHint": "testdata/objects/cube/cube.azmodel" + } + } + } + }, + "Component_[17962478023087084794]": { + "$type": "SelectionComponent", + "Id": 17962478023087084794 + }, + "Component_[18071675051915092508]": { + "$type": "EditorEntityIconComponent", + "Id": 18071675051915092508 + }, + "Component_[2115498007879087044]": { + "$type": "EditorInspectorComponent", + "Id": 2115498007879087044, + "ComponentOrderEntryArray": [ + { + "ComponentId": 399415038452606756 + }, + { + "ComponentId": 16184381538555246534, + "SortIndex": 1 + }, + { + "ComponentId": 7827190074535394331, + "SortIndex": 2 + } + ] + }, + "Component_[3518973002096080237]": { + "$type": "EditorOnlyEntityComponent", + "Id": 3518973002096080237 + }, + "Component_[399415038452606756]": { + "$type": "{27F1E1A1-8D9D-4C3B-BD3A-AFB9762449C0} TransformComponent", + "Id": 399415038452606756, + "Parent Entity": "ContainerEntity", + "Transform Data": { + "Translate": [ + -7.5305633544921875, + -0.00018183141946792603, + 0.0 + ] + } + }, + "Component_[4564240319609068082]": { + "$type": "EditorEntitySortComponent", + "Id": 4564240319609068082 + }, + "Component_[7827190074535394331]": { + "$type": "EditorMaterialComponent", + "Id": 7827190074535394331, + "Controller": { + "Configuration": { + "materials": [ + { + "Key": { + "materialSlotStableId": 2418540911 + }, + "Value": { + "MaterialAsset": { + "assetId": { + "guid": "{E66E4343-F45A-536D-AAE1-C4D096420640}" + }, + "assetHint": "materials/presets/pbr/metal_nickel_polished.azmaterial" + } + } + } + ] + } + } + }, + "Component_[8092226976542590265]": { + "$type": "EditorDisabledCompositionComponent", + "Id": 8092226976542590265 + } + } + }, + "Entity_[895817476052]": { + "Id": "Entity_[895817476052]", + "Name": "Entity1", + "Components": { + "Component_[11525365929370623807]": { + "$type": "EditorVisibilityComponent", + "Id": 11525365929370623807 + }, + "Component_[12334620273692642550]": { + "$type": "EditorLockComponent", + "Id": 12334620273692642550 + }, + "Component_[14389735759337977675]": { + "$type": "EditorPendingCompositionComponent", + "Id": 14389735759337977675 + }, + "Component_[16184381538555246534]": { + "$type": "AZ::Render::EditorMeshComponent", + "Id": 16184381538555246534, + "Controller": { + "Configuration": { + "ModelAsset": { + "assetId": { + "guid": "{E14975EF-E676-51A4-B826-3EF59CB645AA}", + "subId": 285127096 + }, + "assetHint": "testdata/objects/cube/cube.azmodel" + } + } + } + }, + "Component_[17962478023087084794]": { + "$type": "SelectionComponent", + "Id": 17962478023087084794 + }, + "Component_[18071675051915092508]": { + "$type": "EditorEntityIconComponent", + "Id": 18071675051915092508 + }, + "Component_[2115498007879087044]": { + "$type": "EditorInspectorComponent", + "Id": 2115498007879087044, + "ComponentOrderEntryArray": [ + { + "ComponentId": 399415038452606756 + }, + { + "ComponentId": 16184381538555246534, + "SortIndex": 1 + }, + { + "ComponentId": 7827190074535394331, + "SortIndex": 2 + } + ] + }, + "Component_[3518973002096080237]": { + "$type": "EditorOnlyEntityComponent", + "Id": 3518973002096080237 + }, + "Component_[399415038452606756]": { + "$type": "{27F1E1A1-8D9D-4C3B-BD3A-AFB9762449C0} TransformComponent", + "Id": 399415038452606756, + "Parent Entity": "ContainerEntity", + "Transform Data": { + "Translate": [ + -17.530563354492188, + -0.00018183141946792603, + 109.46680450439453 + ] + } + }, + "Component_[4564240319609068082]": { + "$type": "EditorEntitySortComponent", + "Id": 4564240319609068082 + }, + "Component_[7827190074535394331]": { + "$type": "EditorMaterialComponent", + "Id": 7827190074535394331, + "Controller": { + "Configuration": { + "materials": [ + { + "Key": { + "materialSlotStableId": 2418540911 + }, + "Value": { + "MaterialAsset": { + "assetId": { + "guid": "{970148AC-7258-5EC8-9CE7-F4EF93164D93}" + }, + "assetHint": "materials/presets/pbr/metal_iron_matte.azmaterial" + } + } + } + ] + } + } + }, + "Component_[8092226976542590265]": { + "$type": "EditorDisabledCompositionComponent", + "Id": 8092226976542590265 + } + } + }, + "Entity_[900112443348]": { + "Id": "Entity_[900112443348]", + "Name": "Entity1", + "Components": { + "Component_[11525365929370623807]": { + "$type": "EditorVisibilityComponent", + "Id": 11525365929370623807 + }, + "Component_[12334620273692642550]": { + "$type": "EditorLockComponent", + "Id": 12334620273692642550 + }, + "Component_[14389735759337977675]": { + "$type": "EditorPendingCompositionComponent", + "Id": 14389735759337977675 + }, + "Component_[16184381538555246534]": { + "$type": "AZ::Render::EditorMeshComponent", + "Id": 16184381538555246534, + "Controller": { + "Configuration": { + "ModelAsset": { + "assetId": { + "guid": "{E14975EF-E676-51A4-B826-3EF59CB645AA}", + "subId": 285127096 + }, + "assetHint": "testdata/objects/cube/cube.azmodel" + } + } + } + }, + "Component_[17962478023087084794]": { + "$type": "SelectionComponent", + "Id": 17962478023087084794 + }, + "Component_[18071675051915092508]": { + "$type": "EditorEntityIconComponent", + "Id": 18071675051915092508 + }, + "Component_[2115498007879087044]": { + "$type": "EditorInspectorComponent", + "Id": 2115498007879087044, + "ComponentOrderEntryArray": [ + { + "ComponentId": 399415038452606756 + }, + { + "ComponentId": 16184381538555246534, + "SortIndex": 1 + }, + { + "ComponentId": 7827190074535394331, + "SortIndex": 2 + } + ] + }, + "Component_[3518973002096080237]": { + "$type": "EditorOnlyEntityComponent", + "Id": 3518973002096080237 + }, + "Component_[399415038452606756]": { + "$type": "{27F1E1A1-8D9D-4C3B-BD3A-AFB9762449C0} TransformComponent", + "Id": 399415038452606756, + "Parent Entity": "ContainerEntity", + "Transform Data": { + "Translate": [ + -27.530563354492188, + -0.00018183141946792603, + 34.53608703613281 + ] + } + }, + "Component_[4564240319609068082]": { + "$type": "EditorEntitySortComponent", + "Id": 4564240319609068082 + }, + "Component_[7827190074535394331]": { + "$type": "EditorMaterialComponent", + "Id": 7827190074535394331, + "Controller": { + "Configuration": { + "materials": [ + { + "Key": { + "materialSlotStableId": 2418540911 + }, + "Value": { + "MaterialAsset": { + "assetId": { + "guid": "{2D054071-BEF7-53C0-A8C9-E4F026BD8364}" + }, + "assetHint": "materials/presets/pbr/metal_copper_matte.azmaterial" + } + } + } + ] + } + } + }, + "Component_[8092226976542590265]": { + "$type": "EditorDisabledCompositionComponent", + "Id": 8092226976542590265 + } + } + }, + "Entity_[904407410644]": { + "Id": "Entity_[904407410644]", + "Name": "Entity1", + "Components": { + "Component_[11525365929370623807]": { + "$type": "EditorVisibilityComponent", + "Id": 11525365929370623807 + }, + "Component_[12334620273692642550]": { + "$type": "EditorLockComponent", + "Id": 12334620273692642550 + }, + "Component_[14389735759337977675]": { + "$type": "EditorPendingCompositionComponent", + "Id": 14389735759337977675 + }, + "Component_[16184381538555246534]": { + "$type": "AZ::Render::EditorMeshComponent", + "Id": 16184381538555246534, + "Controller": { + "Configuration": { + "ModelAsset": { + "assetId": { + "guid": "{E14975EF-E676-51A4-B826-3EF59CB645AA}", + "subId": 285127096 + }, + "assetHint": "testdata/objects/cube/cube.azmodel" + } + } + } + }, + "Component_[17962478023087084794]": { + "$type": "SelectionComponent", + "Id": 17962478023087084794 + }, + "Component_[18071675051915092508]": { + "$type": "EditorEntityIconComponent", + "Id": 18071675051915092508 + }, + "Component_[2115498007879087044]": { + "$type": "EditorInspectorComponent", + "Id": 2115498007879087044, + "ComponentOrderEntryArray": [ + { + "ComponentId": 399415038452606756 + }, + { + "ComponentId": 16184381538555246534, + "SortIndex": 1 + }, + { + "ComponentId": 7827190074535394331, + "SortIndex": 2 + } + ] + }, + "Component_[3518973002096080237]": { + "$type": "EditorOnlyEntityComponent", + "Id": 3518973002096080237 + }, + "Component_[399415038452606756]": { + "$type": "{27F1E1A1-8D9D-4C3B-BD3A-AFB9762449C0} TransformComponent", + "Id": 399415038452606756, + "Parent Entity": "ContainerEntity", + "Transform Data": { + "Translate": [ + -32.53056335449219, + -0.00018183141946792603, + 49.593753814697266 + ] + } + }, + "Component_[4564240319609068082]": { + "$type": "EditorEntitySortComponent", + "Id": 4564240319609068082 + }, + "Component_[7827190074535394331]": { + "$type": "EditorMaterialComponent", + "Id": 7827190074535394331, + "Controller": { + "Configuration": { + "materials": [ + { + "Key": { + "materialSlotStableId": 2418540911 + }, + "Value": { + "MaterialAsset": { + "assetId": { + "guid": "{C60A39AF-BB76-51BD-9468-A88C9A6F78D7}" + }, + "assetHint": "materials/presets/pbr/metal_cobalt_matte.azmaterial" + } + } + } + ] + } + } + }, + "Component_[8092226976542590265]": { + "$type": "EditorDisabledCompositionComponent", + "Id": 8092226976542590265 + } + } + }, + "Entity_[908702377940]": { + "Id": "Entity_[908702377940]", + "Name": "Entity1", + "Components": { + "Component_[11525365929370623807]": { + "$type": "EditorVisibilityComponent", + "Id": 11525365929370623807 + }, + "Component_[12334620273692642550]": { + "$type": "EditorLockComponent", + "Id": 12334620273692642550 + }, + "Component_[14389735759337977675]": { + "$type": "EditorPendingCompositionComponent", + "Id": 14389735759337977675 + }, + "Component_[16184381538555246534]": { + "$type": "AZ::Render::EditorMeshComponent", + "Id": 16184381538555246534, + "Controller": { + "Configuration": { + "ModelAsset": { + "assetId": { + "guid": "{E14975EF-E676-51A4-B826-3EF59CB645AA}", + "subId": 285127096 + }, + "assetHint": "testdata/objects/cube/cube.azmodel" + } + } + } + }, + "Component_[17962478023087084794]": { + "$type": "SelectionComponent", + "Id": 17962478023087084794 + }, + "Component_[18071675051915092508]": { + "$type": "EditorEntityIconComponent", + "Id": 18071675051915092508 + }, + "Component_[2115498007879087044]": { + "$type": "EditorInspectorComponent", + "Id": 2115498007879087044, + "ComponentOrderEntryArray": [ + { + "ComponentId": 399415038452606756 + }, + { + "ComponentId": 16184381538555246534, + "SortIndex": 1 + }, + { + "ComponentId": 7827190074535394331, + "SortIndex": 2 + } + ] + }, + "Component_[3518973002096080237]": { + "$type": "EditorOnlyEntityComponent", + "Id": 3518973002096080237 + }, + "Component_[399415038452606756]": { + "$type": "{27F1E1A1-8D9D-4C3B-BD3A-AFB9762449C0} TransformComponent", + "Id": 399415038452606756, + "Parent Entity": "ContainerEntity", + "Transform Data": { + "Translate": [ + -27.530563354492188, + -0.00018183141946792603, + 19.50924301147461 + ] + } + }, + "Component_[4564240319609068082]": { + "$type": "EditorEntitySortComponent", + "Id": 4564240319609068082 + }, + "Component_[7827190074535394331]": { + "$type": "EditorMaterialComponent", + "Id": 7827190074535394331, + "Controller": { + "Configuration": { + "materials": [ + { + "Key": { + "materialSlotStableId": 2418540911 + }, + "Value": { + "MaterialAsset": { + "assetId": { + "guid": "{2D054071-BEF7-53C0-A8C9-E4F026BD8364}" + }, + "assetHint": "materials/presets/pbr/metal_copper_matte.azmaterial" + } + } + } + ] + } + } + }, + "Component_[8092226976542590265]": { + "$type": "EditorDisabledCompositionComponent", + "Id": 8092226976542590265 + } + } + }, + "Entity_[912997345236]": { + "Id": "Entity_[912997345236]", + "Name": "Entity1", + "Components": { + "Component_[11525365929370623807]": { + "$type": "EditorVisibilityComponent", + "Id": 11525365929370623807 + }, + "Component_[12334620273692642550]": { + "$type": "EditorLockComponent", + "Id": 12334620273692642550 + }, + "Component_[14389735759337977675]": { + "$type": "EditorPendingCompositionComponent", + "Id": 14389735759337977675 + }, + "Component_[16184381538555246534]": { + "$type": "AZ::Render::EditorMeshComponent", + "Id": 16184381538555246534, + "Controller": { + "Configuration": { + "ModelAsset": { + "assetId": { + "guid": "{E14975EF-E676-51A4-B826-3EF59CB645AA}", + "subId": 285127096 + }, + "assetHint": "testdata/objects/cube/cube.azmodel" + } + } + } + }, + "Component_[17962478023087084794]": { + "$type": "SelectionComponent", + "Id": 17962478023087084794 + }, + "Component_[18071675051915092508]": { + "$type": "EditorEntityIconComponent", + "Id": 18071675051915092508 + }, + "Component_[2115498007879087044]": { + "$type": "EditorInspectorComponent", + "Id": 2115498007879087044, + "ComponentOrderEntryArray": [ + { + "ComponentId": 399415038452606756 + }, + { + "ComponentId": 16184381538555246534, + "SortIndex": 1 + }, + { + "ComponentId": 7827190074535394331, + "SortIndex": 2 + } + ] + }, + "Component_[3518973002096080237]": { + "$type": "EditorOnlyEntityComponent", + "Id": 3518973002096080237 + }, + "Component_[399415038452606756]": { + "$type": "{27F1E1A1-8D9D-4C3B-BD3A-AFB9762449C0} TransformComponent", + "Id": 399415038452606756, + "Parent Entity": "ContainerEntity", + "Transform Data": { + "Translate": [ + -27.530563354492188, + -0.00018183141946792603, + 94.40913391113281 + ] + } + }, + "Component_[4564240319609068082]": { + "$type": "EditorEntitySortComponent", + "Id": 4564240319609068082 + }, + "Component_[7827190074535394331]": { + "$type": "EditorMaterialComponent", + "Id": 7827190074535394331, + "Controller": { + "Configuration": { + "materials": [ + { + "Key": { + "materialSlotStableId": 2418540911 + }, + "Value": { + "MaterialAsset": { + "assetId": { + "guid": "{2D054071-BEF7-53C0-A8C9-E4F026BD8364}" + }, + "assetHint": "materials/presets/pbr/metal_copper_matte.azmaterial" + } + } + } + ] + } + } + }, + "Component_[8092226976542590265]": { + "$type": "EditorDisabledCompositionComponent", + "Id": 8092226976542590265 + } + } + }, + "Entity_[917292312532]": { + "Id": "Entity_[917292312532]", + "Name": "Entity1", + "Components": { + "Component_[11525365929370623807]": { + "$type": "EditorVisibilityComponent", + "Id": 11525365929370623807 + }, + "Component_[12334620273692642550]": { + "$type": "EditorLockComponent", + "Id": 12334620273692642550 + }, + "Component_[14389735759337977675]": { + "$type": "EditorPendingCompositionComponent", + "Id": 14389735759337977675 + }, + "Component_[16184381538555246534]": { + "$type": "AZ::Render::EditorMeshComponent", + "Id": 16184381538555246534, + "Controller": { + "Configuration": { + "ModelAsset": { + "assetId": { + "guid": "{E14975EF-E676-51A4-B826-3EF59CB645AA}", + "subId": 285127096 + }, + "assetHint": "testdata/objects/cube/cube.azmodel" + } + } + } + }, + "Component_[17962478023087084794]": { + "$type": "SelectionComponent", + "Id": 17962478023087084794 + }, + "Component_[18071675051915092508]": { + "$type": "EditorEntityIconComponent", + "Id": 18071675051915092508 + }, + "Component_[2115498007879087044]": { + "$type": "EditorInspectorComponent", + "Id": 2115498007879087044, + "ComponentOrderEntryArray": [ + { + "ComponentId": 399415038452606756 + }, + { + "ComponentId": 16184381538555246534, + "SortIndex": 1 + }, + { + "ComponentId": 7827190074535394331, + "SortIndex": 2 + } + ] + }, + "Component_[3518973002096080237]": { + "$type": "EditorOnlyEntityComponent", + "Id": 3518973002096080237 + }, + "Component_[399415038452606756]": { + "$type": "{27F1E1A1-8D9D-4C3B-BD3A-AFB9762449C0} TransformComponent", + "Id": 399415038452606756, + "Parent Entity": "ContainerEntity", + "Transform Data": { + "Translate": [ + 37.53014373779297, + -0.00018183141946792603, + 94.40913391113281 + ] + } + }, + "Component_[4564240319609068082]": { + "$type": "EditorEntitySortComponent", + "Id": 4564240319609068082 + }, + "Component_[7827190074535394331]": { + "$type": "EditorMaterialComponent", + "Id": 7827190074535394331, + "Controller": { + "Configuration": { + "materials": [ + { + "Key": { + "materialSlotStableId": 2418540911 + }, + "Value": { + "MaterialAsset": { + "assetId": { + "guid": "{2D054071-BEF7-53C0-A8C9-E4F026BD8364}" + }, + "assetHint": "materials/presets/pbr/metal_copper_matte.azmaterial" + } + } + } + ] + } + } + }, + "Component_[8092226976542590265]": { + "$type": "EditorDisabledCompositionComponent", + "Id": 8092226976542590265 + } + } + }, + "Entity_[921587279828]": { + "Id": "Entity_[921587279828]", + "Name": "Entity1", + "Components": { + "Component_[11525365929370623807]": { + "$type": "EditorVisibilityComponent", + "Id": 11525365929370623807 + }, + "Component_[12334620273692642550]": { + "$type": "EditorLockComponent", + "Id": 12334620273692642550 + }, + "Component_[14389735759337977675]": { + "$type": "EditorPendingCompositionComponent", + "Id": 14389735759337977675 + }, + "Component_[16184381538555246534]": { + "$type": "AZ::Render::EditorMeshComponent", + "Id": 16184381538555246534, + "Controller": { + "Configuration": { + "ModelAsset": { + "assetId": { + "guid": "{E14975EF-E676-51A4-B826-3EF59CB645AA}", + "subId": 285127096 + }, + "assetHint": "testdata/objects/cube/cube.azmodel" + } + } + } + }, + "Component_[17962478023087084794]": { + "$type": "SelectionComponent", + "Id": 17962478023087084794 + }, + "Component_[18071675051915092508]": { + "$type": "EditorEntityIconComponent", + "Id": 18071675051915092508 + }, + "Component_[2115498007879087044]": { + "$type": "EditorInspectorComponent", + "Id": 2115498007879087044, + "ComponentOrderEntryArray": [ + { + "ComponentId": 399415038452606756 + }, + { + "ComponentId": 16184381538555246534, + "SortIndex": 1 + }, + { + "ComponentId": 7827190074535394331, + "SortIndex": 2 + } + ] + }, + "Component_[3518973002096080237]": { + "$type": "EditorOnlyEntityComponent", + "Id": 3518973002096080237 + }, + "Component_[399415038452606756]": { + "$type": "{27F1E1A1-8D9D-4C3B-BD3A-AFB9762449C0} TransformComponent", + "Id": 399415038452606756, + "Parent Entity": "ContainerEntity", + "Transform Data": { + "Translate": [ + -27.530563354492188, + -0.00018183141946792603, + 9.475835800170898 + ] + } + }, + "Component_[4564240319609068082]": { + "$type": "EditorEntitySortComponent", + "Id": 4564240319609068082 + }, + "Component_[7827190074535394331]": { + "$type": "EditorMaterialComponent", + "Id": 7827190074535394331, + "Controller": { + "Configuration": { + "materials": [ + { + "Key": { + "materialSlotStableId": 2418540911 + }, + "Value": { + "MaterialAsset": { + "assetId": { + "guid": "{E621C5BF-B8E1-55F0-A791-EC960F2FA46F}" + }, + "assetHint": "materials/presets/pbr/metal_copper.azmaterial" + } + } + } + ] + } + } + }, + "Component_[8092226976542590265]": { + "$type": "EditorDisabledCompositionComponent", + "Id": 8092226976542590265 + } + } + }, + "Entity_[925882247124]": { + "Id": "Entity_[925882247124]", + "Name": "Entity1", + "Components": { + "Component_[11525365929370623807]": { + "$type": "EditorVisibilityComponent", + "Id": 11525365929370623807 + }, + "Component_[12334620273692642550]": { + "$type": "EditorLockComponent", + "Id": 12334620273692642550 + }, + "Component_[14389735759337977675]": { + "$type": "EditorPendingCompositionComponent", + "Id": 14389735759337977675 + }, + "Component_[16184381538555246534]": { + "$type": "AZ::Render::EditorMeshComponent", + "Id": 16184381538555246534, + "Controller": { + "Configuration": { + "ModelAsset": { + "assetId": { + "guid": "{E14975EF-E676-51A4-B826-3EF59CB645AA}", + "subId": 285127096 + }, + "assetHint": "testdata/objects/cube/cube.azmodel" + } + } + } + }, + "Component_[17962478023087084794]": { + "$type": "SelectionComponent", + "Id": 17962478023087084794 + }, + "Component_[18071675051915092508]": { + "$type": "EditorEntityIconComponent", + "Id": 18071675051915092508 + }, + "Component_[2115498007879087044]": { + "$type": "EditorInspectorComponent", + "Id": 2115498007879087044, + "ComponentOrderEntryArray": [ + { + "ComponentId": 399415038452606756 + }, + { + "ComponentId": 16184381538555246534, + "SortIndex": 1 + }, + { + "ComponentId": 7827190074535394331, + "SortIndex": 2 + } + ] + }, + "Component_[3518973002096080237]": { + "$type": "EditorOnlyEntityComponent", + "Id": 3518973002096080237 + }, + "Component_[399415038452606756]": { + "$type": "{27F1E1A1-8D9D-4C3B-BD3A-AFB9762449C0} TransformComponent", + "Id": 399415038452606756, + "Parent Entity": "ContainerEntity", + "Transform Data": { + "Translate": [ + 17.53014373779297, + -0.00018183141946792603, + 15.057670593261719 + ] + } + }, + "Component_[4564240319609068082]": { + "$type": "EditorEntitySortComponent", + "Id": 4564240319609068082 + }, + "Component_[7827190074535394331]": { + "$type": "EditorMaterialComponent", + "Id": 7827190074535394331, + "Controller": { + "Configuration": { + "materials": [ + { + "Key": {}, + "Value": { + "MaterialAsset": { + "assetId": { + "guid": "{721188E0-B7CC-5D06-8D5D-39AF8ABF2EF9}" + }, + "assetHint": "materials/presets/pbr/metal_titanium.azmaterial" + } + } + }, + { + "Key": { + "materialSlotStableId": 2418540911 + }, + "Value": { + "MaterialAsset": { + "assetId": { + "guid": "{64C1F6A6-6BDA-551A-BE56-1829E5913278}" + }, + "assetHint": "materials/presets/pbr/metal_aluminum_polished.azmaterial" + } + } + } + ] + } + } + }, + "Component_[8092226976542590265]": { + "$type": "EditorDisabledCompositionComponent", + "Id": 8092226976542590265 + } + } + }, + "Entity_[930177214420]": { + "Id": "Entity_[930177214420]", + "Name": "Entity1", + "Components": { + "Component_[11525365929370623807]": { + "$type": "EditorVisibilityComponent", + "Id": 11525365929370623807 + }, + "Component_[12334620273692642550]": { + "$type": "EditorLockComponent", + "Id": 12334620273692642550 + }, + "Component_[14389735759337977675]": { + "$type": "EditorPendingCompositionComponent", + "Id": 14389735759337977675 + }, + "Component_[16184381538555246534]": { + "$type": "AZ::Render::EditorMeshComponent", + "Id": 16184381538555246534, + "Controller": { + "Configuration": { + "ModelAsset": { + "assetId": { + "guid": "{E14975EF-E676-51A4-B826-3EF59CB645AA}", + "subId": 285127096 + }, + "assetHint": "testdata/objects/cube/cube.azmodel" + } + } + } + }, + "Component_[17962478023087084794]": { + "$type": "SelectionComponent", + "Id": 17962478023087084794 + }, + "Component_[18071675051915092508]": { + "$type": "EditorEntityIconComponent", + "Id": 18071675051915092508 + }, + "Component_[2115498007879087044]": { + "$type": "EditorInspectorComponent", + "Id": 2115498007879087044, + "ComponentOrderEntryArray": [ + { + "ComponentId": 399415038452606756 + }, + { + "ComponentId": 16184381538555246534, + "SortIndex": 1 + }, + { + "ComponentId": 7827190074535394331, + "SortIndex": 2 + } + ] + }, + "Component_[3518973002096080237]": { + "$type": "EditorOnlyEntityComponent", + "Id": 3518973002096080237 + }, + "Component_[399415038452606756]": { + "$type": "{27F1E1A1-8D9D-4C3B-BD3A-AFB9762449C0} TransformComponent", + "Id": 399415038452606756, + "Parent Entity": "ContainerEntity", + "Transform Data": { + "Translate": [ + -7.5305633544921875, + -0.00018183141946792603, + 9.475835800170898 + ] + } + }, + "Component_[4564240319609068082]": { + "$type": "EditorEntitySortComponent", + "Id": 4564240319609068082 + }, + "Component_[7827190074535394331]": { + "$type": "EditorMaterialComponent", + "Id": 7827190074535394331, + "Controller": { + "Configuration": { + "materials": [ + { + "Key": { + "materialSlotStableId": 2418540911 + }, + "Value": { + "MaterialAsset": { + "assetId": { + "guid": "{DD1E26AE-80FB-5DB6-8786-26D438190A38}" + }, + "assetHint": "materials/presets/pbr/metal_nickel.azmaterial" + } + } + } + ] + } + } + }, + "Component_[8092226976542590265]": { + "$type": "EditorDisabledCompositionComponent", + "Id": 8092226976542590265 + } + } + }, + "Entity_[934472181716]": { + "Id": "Entity_[934472181716]", + "Name": "Entity1", + "Components": { + "Component_[11525365929370623807]": { + "$type": "EditorVisibilityComponent", + "Id": 11525365929370623807 + }, + "Component_[12334620273692642550]": { + "$type": "EditorLockComponent", + "Id": 12334620273692642550 + }, + "Component_[14389735759337977675]": { + "$type": "EditorPendingCompositionComponent", + "Id": 14389735759337977675 + }, + "Component_[16184381538555246534]": { + "$type": "AZ::Render::EditorMeshComponent", + "Id": 16184381538555246534, + "Controller": { + "Configuration": { + "ModelAsset": { + "assetId": { + "guid": "{E14975EF-E676-51A4-B826-3EF59CB645AA}", + "subId": 285127096 + }, + "assetHint": "testdata/objects/cube/cube.azmodel" + } + } + } + }, + "Component_[17962478023087084794]": { + "$type": "SelectionComponent", + "Id": 17962478023087084794 + }, + "Component_[18071675051915092508]": { + "$type": "EditorEntityIconComponent", + "Id": 18071675051915092508 + }, + "Component_[2115498007879087044]": { + "$type": "EditorInspectorComponent", + "Id": 2115498007879087044, + "ComponentOrderEntryArray": [ + { + "ComponentId": 399415038452606756 + }, + { + "ComponentId": 16184381538555246534, + "SortIndex": 1 + }, + { + "ComponentId": 7827190074535394331, + "SortIndex": 2 + } + ] + }, + "Component_[3518973002096080237]": { + "$type": "EditorOnlyEntityComponent", + "Id": 3518973002096080237 + }, + "Component_[399415038452606756]": { + "$type": "{27F1E1A1-8D9D-4C3B-BD3A-AFB9762449C0} TransformComponent", + "Id": 399415038452606756, + "Parent Entity": "ContainerEntity", + "Transform Data": { + "Translate": [ + 47.53014373779297, + -0.00018183141946792603, + 59.873046875 + ] + } + }, + "Component_[4564240319609068082]": { + "$type": "EditorEntitySortComponent", + "Id": 4564240319609068082 + }, + "Component_[7827190074535394331]": { + "$type": "EditorMaterialComponent", + "Id": 7827190074535394331, + "Controller": { + "Configuration": { + "materials": [ + { + "Key": { + "materialSlotStableId": 2418540911 + }, + "Value": { + "MaterialAsset": { + "assetId": { + "guid": "{A7F03135-ECAD-5440-99DB-E84ABA3D50DA}" + }, + "assetHint": "materials/presets/pbr/metal_iron_polished.azmaterial" + } + } + } + ] + } + } + }, + "Component_[8092226976542590265]": { + "$type": "EditorDisabledCompositionComponent", + "Id": 8092226976542590265 + } + } + }, + "Entity_[938767149012]": { + "Id": "Entity_[938767149012]", + "Name": "Entity1", + "Components": { + "Component_[11525365929370623807]": { + "$type": "EditorVisibilityComponent", + "Id": 11525365929370623807 + }, + "Component_[12334620273692642550]": { + "$type": "EditorLockComponent", + "Id": 12334620273692642550 + }, + "Component_[14389735759337977675]": { + "$type": "EditorPendingCompositionComponent", + "Id": 14389735759337977675 + }, + "Component_[16184381538555246534]": { + "$type": "AZ::Render::EditorMeshComponent", + "Id": 16184381538555246534, + "Controller": { + "Configuration": { + "ModelAsset": { + "assetId": { + "guid": "{E14975EF-E676-51A4-B826-3EF59CB645AA}", + "subId": 285127096 + }, + "assetHint": "testdata/objects/cube/cube.azmodel" + } + } + } + }, + "Component_[17962478023087084794]": { + "$type": "SelectionComponent", + "Id": 17962478023087084794 + }, + "Component_[18071675051915092508]": { + "$type": "EditorEntityIconComponent", + "Id": 18071675051915092508 + }, + "Component_[2115498007879087044]": { + "$type": "EditorInspectorComponent", + "Id": 2115498007879087044, + "ComponentOrderEntryArray": [ + { + "ComponentId": 399415038452606756 + }, + { + "ComponentId": 16184381538555246534, + "SortIndex": 1 + }, + { + "ComponentId": 7827190074535394331, + "SortIndex": 2 + } + ] + }, + "Component_[3518973002096080237]": { + "$type": "EditorOnlyEntityComponent", + "Id": 3518973002096080237 + }, + "Component_[399415038452606756]": { + "$type": "{27F1E1A1-8D9D-4C3B-BD3A-AFB9762449C0} TransformComponent", + "Id": 399415038452606756, + "Parent Entity": "ContainerEntity", + "Transform Data": { + "Translate": [ + 32.53014373779297, + -0.00018183141946792603, + 24.533506393432617 + ] + } + }, + "Component_[4564240319609068082]": { + "$type": "EditorEntitySortComponent", + "Id": 4564240319609068082 + }, + "Component_[7827190074535394331]": { + "$type": "EditorMaterialComponent", + "Id": 7827190074535394331, + "Controller": { + "Configuration": { + "materials": [ + { + "Key": { + "materialSlotStableId": 2418540911 + }, + "Value": { + "MaterialAsset": { + "assetId": { + "guid": "{99976D73-6248-5D66-AD15-E8F52B0AFE36}" + }, + "assetHint": "materials/presets/pbr/metal_cobalt.azmaterial" + } + } + } + ] + } + } + }, + "Component_[8092226976542590265]": { + "$type": "EditorDisabledCompositionComponent", + "Id": 8092226976542590265 + } + } + }, + "Entity_[943062116308]": { + "Id": "Entity_[943062116308]", + "Name": "Entity1", + "Components": { + "Component_[11525365929370623807]": { + "$type": "EditorVisibilityComponent", + "Id": 11525365929370623807 + }, + "Component_[12334620273692642550]": { + "$type": "EditorLockComponent", + "Id": 12334620273692642550 + }, + "Component_[14389735759337977675]": { + "$type": "EditorPendingCompositionComponent", + "Id": 14389735759337977675 + }, + "Component_[16184381538555246534]": { + "$type": "AZ::Render::EditorMeshComponent", + "Id": 16184381538555246534, + "Controller": { + "Configuration": { + "ModelAsset": { + "assetId": { + "guid": "{E14975EF-E676-51A4-B826-3EF59CB645AA}", + "subId": 285127096 + }, + "assetHint": "testdata/objects/cube/cube.azmodel" + } + } + } + }, + "Component_[17962478023087084794]": { + "$type": "SelectionComponent", + "Id": 17962478023087084794 + }, + "Component_[18071675051915092508]": { + "$type": "EditorEntityIconComponent", + "Id": 18071675051915092508 + }, + "Component_[2115498007879087044]": { + "$type": "EditorInspectorComponent", + "Id": 2115498007879087044, + "ComponentOrderEntryArray": [ + { + "ComponentId": 399415038452606756 + }, + { + "ComponentId": 16184381538555246534, + "SortIndex": 1 + }, + { + "ComponentId": 7827190074535394331, + "SortIndex": 2 + } + ] + }, + "Component_[3518973002096080237]": { + "$type": "EditorOnlyEntityComponent", + "Id": 3518973002096080237 + }, + "Component_[399415038452606756]": { + "$type": "{27F1E1A1-8D9D-4C3B-BD3A-AFB9762449C0} TransformComponent", + "Id": 399415038452606756, + "Parent Entity": "ContainerEntity", + "Transform Data": { + "Translate": [ + -22.530563354492188, + -0.00018183141946792603, + 30.08451271057129 + ] + } + }, + "Component_[4564240319609068082]": { + "$type": "EditorEntitySortComponent", + "Id": 4564240319609068082 + }, + "Component_[7827190074535394331]": { + "$type": "EditorMaterialComponent", + "Id": 7827190074535394331, + "Controller": { + "Configuration": { + "materials": [ + { + "Key": { + "materialSlotStableId": 2418540911 + }, + "Value": { + "MaterialAsset": { + "assetId": { + "guid": "{FB4657EB-FB3A-5EC3-A772-DC36D6F733C3}" + }, + "assetHint": "materials/presets/pbr/metal_gold_polished.azmaterial" + } + } + } + ] + } + } + }, + "Component_[8092226976542590265]": { + "$type": "EditorDisabledCompositionComponent", + "Id": 8092226976542590265 + } + } + }, + "Entity_[947357083604]": { + "Id": "Entity_[947357083604]", + "Name": "Entity1", + "Components": { + "Component_[11525365929370623807]": { + "$type": "EditorVisibilityComponent", + "Id": 11525365929370623807 + }, + "Component_[12334620273692642550]": { + "$type": "EditorLockComponent", + "Id": 12334620273692642550 + }, + "Component_[14389735759337977675]": { + "$type": "EditorPendingCompositionComponent", + "Id": 14389735759337977675 + }, + "Component_[16184381538555246534]": { + "$type": "AZ::Render::EditorMeshComponent", + "Id": 16184381538555246534, + "Controller": { + "Configuration": { + "ModelAsset": { + "assetId": { + "guid": "{E14975EF-E676-51A4-B826-3EF59CB645AA}", + "subId": 285127096 + }, + "assetHint": "testdata/objects/cube/cube.azmodel" + } + } + } + }, + "Component_[17962478023087084794]": { + "$type": "SelectionComponent", + "Id": 17962478023087084794 + }, + "Component_[18071675051915092508]": { + "$type": "EditorEntityIconComponent", + "Id": 18071675051915092508 + }, + "Component_[2115498007879087044]": { + "$type": "EditorInspectorComponent", + "Id": 2115498007879087044, + "ComponentOrderEntryArray": [ + { + "ComponentId": 399415038452606756 + }, + { + "ComponentId": 16184381538555246534, + "SortIndex": 1 + }, + { + "ComponentId": 7827190074535394331, + "SortIndex": 2 + } + ] + }, + "Component_[3518973002096080237]": { + "$type": "EditorOnlyEntityComponent", + "Id": 3518973002096080237 + }, + "Component_[399415038452606756]": { + "$type": "{27F1E1A1-8D9D-4C3B-BD3A-AFB9762449C0} TransformComponent", + "Id": 399415038452606756, + "Parent Entity": "ContainerEntity", + "Transform Data": { + "Translate": [ + 7.530143737792969, + -0.00018183141946792603, + 105.0152359008789 + ] + } + }, + "Component_[4564240319609068082]": { + "$type": "EditorEntitySortComponent", + "Id": 4564240319609068082 + }, + "Component_[7827190074535394331]": { + "$type": "EditorMaterialComponent", + "Id": 7827190074535394331, + "Controller": { + "Configuration": { + "materials": [ + { + "Key": { + "materialSlotStableId": 2418540911 + }, + "Value": { + "MaterialAsset": { + "assetId": { + "guid": "{2AC06FA3-7670-542E-8996-DF346AFF1B61}" + }, + "assetHint": "materials/presets/pbr/metal_silver_polished.azmaterial" + } + } + } + ] + } + } + }, + "Component_[8092226976542590265]": { + "$type": "EditorDisabledCompositionComponent", + "Id": 8092226976542590265 + } + } + }, + "Entity_[951652050900]": { + "Id": "Entity_[951652050900]", + "Name": "Entity1", + "Components": { + "Component_[11525365929370623807]": { + "$type": "EditorVisibilityComponent", + "Id": 11525365929370623807 + }, + "Component_[12334620273692642550]": { + "$type": "EditorLockComponent", + "Id": 12334620273692642550 + }, + "Component_[14389735759337977675]": { + "$type": "EditorPendingCompositionComponent", + "Id": 14389735759337977675 + }, + "Component_[16184381538555246534]": { + "$type": "AZ::Render::EditorMeshComponent", + "Id": 16184381538555246534, + "Controller": { + "Configuration": { + "ModelAsset": { + "assetId": { + "guid": "{E14975EF-E676-51A4-B826-3EF59CB645AA}", + "subId": 285127096 + }, + "assetHint": "testdata/objects/cube/cube.azmodel" + } + } + } + }, + "Component_[17962478023087084794]": { + "$type": "SelectionComponent", + "Id": 17962478023087084794 + }, + "Component_[18071675051915092508]": { + "$type": "EditorEntityIconComponent", + "Id": 18071675051915092508 + }, + "Component_[2115498007879087044]": { + "$type": "EditorInspectorComponent", + "Id": 2115498007879087044, + "ComponentOrderEntryArray": [ + { + "ComponentId": 399415038452606756 + }, + { + "ComponentId": 16184381538555246534, + "SortIndex": 1 + }, + { + "ComponentId": 7827190074535394331, + "SortIndex": 2 + } + ] + }, + "Component_[3518973002096080237]": { + "$type": "EditorOnlyEntityComponent", + "Id": 3518973002096080237 + }, + "Component_[399415038452606756]": { + "$type": "{27F1E1A1-8D9D-4C3B-BD3A-AFB9762449C0} TransformComponent", + "Id": 399415038452606756, + "Parent Entity": "ContainerEntity", + "Transform Data": { + "Translate": [ + -32.53056335449219, + -0.00018183141946792603, + 114.4910659790039 + ] + } + }, + "Component_[4564240319609068082]": { + "$type": "EditorEntitySortComponent", + "Id": 4564240319609068082 + }, + "Component_[7827190074535394331]": { + "$type": "EditorMaterialComponent", + "Id": 7827190074535394331, + "Controller": { + "Configuration": { + "materials": [ + { + "Key": { + "materialSlotStableId": 2418540911 + }, + "Value": { + "MaterialAsset": { + "assetId": { + "guid": "{99976D73-6248-5D66-AD15-E8F52B0AFE36}" + }, + "assetHint": "materials/presets/pbr/metal_cobalt.azmaterial" + } + } + } + ] + } + } + }, + "Component_[8092226976542590265]": { + "$type": "EditorDisabledCompositionComponent", + "Id": 8092226976542590265 + } + } + }, + "Entity_[955947018196]": { + "Id": "Entity_[955947018196]", + "Name": "Entity1", + "Components": { + "Component_[11525365929370623807]": { + "$type": "EditorVisibilityComponent", + "Id": 11525365929370623807 + }, + "Component_[12334620273692642550]": { + "$type": "EditorLockComponent", + "Id": 12334620273692642550 + }, + "Component_[14389735759337977675]": { + "$type": "EditorPendingCompositionComponent", + "Id": 14389735759337977675 + }, + "Component_[16184381538555246534]": { + "$type": "AZ::Render::EditorMeshComponent", + "Id": 16184381538555246534, + "Controller": { + "Configuration": { + "ModelAsset": { + "assetId": { + "guid": "{E14975EF-E676-51A4-B826-3EF59CB645AA}", + "subId": 285127096 + }, + "assetHint": "testdata/objects/cube/cube.azmodel" + } + } + } + }, + "Component_[17962478023087084794]": { + "$type": "SelectionComponent", + "Id": 17962478023087084794 + }, + "Component_[18071675051915092508]": { + "$type": "EditorEntityIconComponent", + "Id": 18071675051915092508 + }, + "Component_[2115498007879087044]": { + "$type": "EditorInspectorComponent", + "Id": 2115498007879087044, + "ComponentOrderEntryArray": [ + { + "ComponentId": 399415038452606756 + }, + { + "ComponentId": 16184381538555246534, + "SortIndex": 1 + }, + { + "ComponentId": 7827190074535394331, + "SortIndex": 2 + } + ] + }, + "Component_[3518973002096080237]": { + "$type": "EditorOnlyEntityComponent", + "Id": 3518973002096080237 + }, + "Component_[399415038452606756]": { + "$type": "{27F1E1A1-8D9D-4C3B-BD3A-AFB9762449C0} TransformComponent", + "Id": 399415038452606756, + "Parent Entity": "ContainerEntity", + "Transform Data": { + "Translate": [ + -17.530563354492188, + -0.00018183141946792603, + 19.50924301147461 + ] + } + }, + "Component_[4564240319609068082]": { + "$type": "EditorEntitySortComponent", + "Id": 4564240319609068082 + }, + "Component_[7827190074535394331]": { + "$type": "EditorMaterialComponent", + "Id": 7827190074535394331, + "Controller": { + "Configuration": { + "materials": [ + { + "Key": { + "materialSlotStableId": 2418540911 + }, + "Value": { + "MaterialAsset": { + "assetId": { + "guid": "{970148AC-7258-5EC8-9CE7-F4EF93164D93}" + }, + "assetHint": "materials/presets/pbr/metal_iron_matte.azmaterial" + } + } + } + ] + } + } + }, + "Component_[8092226976542590265]": { + "$type": "EditorDisabledCompositionComponent", + "Id": 8092226976542590265 + } + } + }, + "Entity_[960241985492]": { + "Id": "Entity_[960241985492]", + "Name": "Entity1", + "Components": { + "Component_[11525365929370623807]": { + "$type": "EditorVisibilityComponent", + "Id": 11525365929370623807 + }, + "Component_[12334620273692642550]": { + "$type": "EditorLockComponent", + "Id": 12334620273692642550 + }, + "Component_[14389735759337977675]": { + "$type": "EditorPendingCompositionComponent", + "Id": 14389735759337977675 + }, + "Component_[16184381538555246534]": { + "$type": "AZ::Render::EditorMeshComponent", + "Id": 16184381538555246534, + "Controller": { + "Configuration": { + "ModelAsset": { + "assetId": { + "guid": "{E14975EF-E676-51A4-B826-3EF59CB645AA}", + "subId": 285127096 + }, + "assetHint": "testdata/objects/cube/cube.azmodel" + } + } + } + }, + "Component_[17962478023087084794]": { + "$type": "SelectionComponent", + "Id": 17962478023087084794 + }, + "Component_[18071675051915092508]": { + "$type": "EditorEntityIconComponent", + "Id": 18071675051915092508 + }, + "Component_[2115498007879087044]": { + "$type": "EditorInspectorComponent", + "Id": 2115498007879087044, + "ComponentOrderEntryArray": [ + { + "ComponentId": 399415038452606756 + }, + { + "ComponentId": 16184381538555246534, + "SortIndex": 1 + }, + { + "ComponentId": 7827190074535394331, + "SortIndex": 2 + } + ] + }, + "Component_[3518973002096080237]": { + "$type": "EditorOnlyEntityComponent", + "Id": 3518973002096080237 + }, + "Component_[399415038452606756]": { + "$type": "{27F1E1A1-8D9D-4C3B-BD3A-AFB9762449C0} TransformComponent", + "Id": 399415038452606756, + "Parent Entity": "ContainerEntity", + "Transform Data": { + "Translate": [ + 27.53014373779297, + -0.00018183141946792603, + 49.593753814697266 + ] + } + }, + "Component_[4564240319609068082]": { + "$type": "EditorEntitySortComponent", + "Id": 4564240319609068082 + }, + "Component_[7827190074535394331]": { + "$type": "EditorMaterialComponent", + "Id": 7827190074535394331, + "Controller": { + "Configuration": { + "materials": [ + { + "Key": { + "materialSlotStableId": 2418540911 + }, + "Value": { + "MaterialAsset": { + "assetId": { + "guid": "{A78EA2FC-688B-5E3A-A7F6-DB413D11D4CF}" + }, + "assetHint": "materials/presets/pbr/metal_chrome_matte.azmaterial" + } + } + } + ] + } + } + }, + "Component_[8092226976542590265]": { + "$type": "EditorDisabledCompositionComponent", + "Id": 8092226976542590265 + } + } + }, + "Entity_[964536952788]": { + "Id": "Entity_[964536952788]", + "Name": "Entity1", + "Components": { + "Component_[11525365929370623807]": { + "$type": "EditorVisibilityComponent", + "Id": 11525365929370623807 + }, + "Component_[12334620273692642550]": { + "$type": "EditorLockComponent", + "Id": 12334620273692642550 + }, + "Component_[14389735759337977675]": { + "$type": "EditorPendingCompositionComponent", + "Id": 14389735759337977675 + }, + "Component_[16184381538555246534]": { + "$type": "AZ::Render::EditorMeshComponent", + "Id": 16184381538555246534, + "Controller": { + "Configuration": { + "ModelAsset": { + "assetId": { + "guid": "{E14975EF-E676-51A4-B826-3EF59CB645AA}", + "subId": 285127096 + }, + "assetHint": "testdata/objects/cube/cube.azmodel" + } + } + } + }, + "Component_[17962478023087084794]": { + "$type": "SelectionComponent", + "Id": 17962478023087084794 + }, + "Component_[18071675051915092508]": { + "$type": "EditorEntityIconComponent", + "Id": 18071675051915092508 + }, + "Component_[2115498007879087044]": { + "$type": "EditorInspectorComponent", + "Id": 2115498007879087044, + "ComponentOrderEntryArray": [ + { + "ComponentId": 399415038452606756 + }, + { + "ComponentId": 16184381538555246534, + "SortIndex": 1 + }, + { + "ComponentId": 7827190074535394331, + "SortIndex": 2 + } + ] + }, + "Component_[3518973002096080237]": { + "$type": "EditorOnlyEntityComponent", + "Id": 3518973002096080237 + }, + "Component_[399415038452606756]": { + "$type": "{27F1E1A1-8D9D-4C3B-BD3A-AFB9762449C0} TransformComponent", + "Id": 399415038452606756, + "Parent Entity": "ContainerEntity", + "Transform Data": { + "Translate": [ + -2.5305633544921875, + -0.00018183141946792603, + 19.50924301147461 + ] + } + }, + "Component_[4564240319609068082]": { + "$type": "EditorEntitySortComponent", + "Id": 4564240319609068082 + }, + "Component_[7827190074535394331]": { + "$type": "EditorMaterialComponent", + "Id": 7827190074535394331, + "Controller": { + "Configuration": { + "materials": [ + { + "Key": { + "materialSlotStableId": 2418540911 + }, + "Value": { + "MaterialAsset": { + "assetId": { + "guid": "{9187B84B-425F-5D11-B4D7-35BBDB0959D1}" + }, + "assetHint": "materials/presets/pbr/metal_palladium_matte.azmaterial" + } + } + } + ] + } + } + }, + "Component_[8092226976542590265]": { + "$type": "EditorDisabledCompositionComponent", + "Id": 8092226976542590265 + } + } + }, + "Entity_[968831920084]": { + "Id": "Entity_[968831920084]", + "Name": "Entity1", + "Components": { + "Component_[11525365929370623807]": { + "$type": "EditorVisibilityComponent", + "Id": 11525365929370623807 + }, + "Component_[12334620273692642550]": { + "$type": "EditorLockComponent", + "Id": 12334620273692642550 + }, + "Component_[14389735759337977675]": { + "$type": "EditorPendingCompositionComponent", + "Id": 14389735759337977675 + }, + "Component_[16184381538555246534]": { + "$type": "AZ::Render::EditorMeshComponent", + "Id": 16184381538555246534, + "Controller": { + "Configuration": { + "ModelAsset": { + "assetId": { + "guid": "{E14975EF-E676-51A4-B826-3EF59CB645AA}", + "subId": 285127096 + }, + "assetHint": "testdata/objects/cube/cube.azmodel" + } + } + } + }, + "Component_[17962478023087084794]": { + "$type": "SelectionComponent", + "Id": 17962478023087084794 + }, + "Component_[18071675051915092508]": { + "$type": "EditorEntityIconComponent", + "Id": 18071675051915092508 + }, + "Component_[2115498007879087044]": { + "$type": "EditorInspectorComponent", + "Id": 2115498007879087044, + "ComponentOrderEntryArray": [ + { + "ComponentId": 399415038452606756 + }, + { + "ComponentId": 16184381538555246534, + "SortIndex": 1 + }, + { + "ComponentId": 7827190074535394331, + "SortIndex": 2 + } + ] + }, + "Component_[3518973002096080237]": { + "$type": "EditorOnlyEntityComponent", + "Id": 3518973002096080237 + }, + "Component_[399415038452606756]": { + "$type": "{27F1E1A1-8D9D-4C3B-BD3A-AFB9762449C0} TransformComponent", + "Id": 399415038452606756, + "Parent Entity": "ContainerEntity", + "Transform Data": { + "Translate": [ + 27.53014373779297, + -0.00018183141946792603, + 64.32462310791016 + ] + } + }, + "Component_[4564240319609068082]": { + "$type": "EditorEntitySortComponent", + "Id": 4564240319609068082 + }, + "Component_[7827190074535394331]": { + "$type": "EditorMaterialComponent", + "Id": 7827190074535394331, + "Controller": { + "Configuration": { + "materials": [ + { + "Key": { + "materialSlotStableId": 2418540911 + }, + "Value": { + "MaterialAsset": { + "assetId": { + "guid": "{A78EA2FC-688B-5E3A-A7F6-DB413D11D4CF}" + }, + "assetHint": "materials/presets/pbr/metal_chrome_matte.azmaterial" + } + } + } + ] + } + } + }, + "Component_[8092226976542590265]": { + "$type": "EditorDisabledCompositionComponent", + "Id": 8092226976542590265 + } + } + }, + "Entity_[973126887380]": { + "Id": "Entity_[973126887380]", + "Name": "Entity1", + "Components": { + "Component_[11525365929370623807]": { + "$type": "EditorVisibilityComponent", + "Id": 11525365929370623807 + }, + "Component_[12334620273692642550]": { + "$type": "EditorLockComponent", + "Id": 12334620273692642550 + }, + "Component_[14389735759337977675]": { + "$type": "EditorPendingCompositionComponent", + "Id": 14389735759337977675 + }, + "Component_[16184381538555246534]": { + "$type": "AZ::Render::EditorMeshComponent", + "Id": 16184381538555246534, + "Controller": { + "Configuration": { + "ModelAsset": { + "assetId": { + "guid": "{E14975EF-E676-51A4-B826-3EF59CB645AA}", + "subId": 285127096 + }, + "assetHint": "testdata/objects/cube/cube.azmodel" + } + } + } + }, + "Component_[17962478023087084794]": { + "$type": "SelectionComponent", + "Id": 17962478023087084794 + }, + "Component_[18071675051915092508]": { + "$type": "EditorEntityIconComponent", + "Id": 18071675051915092508 + }, + "Component_[2115498007879087044]": { + "$type": "EditorInspectorComponent", + "Id": 2115498007879087044, + "ComponentOrderEntryArray": [ + { + "ComponentId": 399415038452606756 + }, + { + "ComponentId": 16184381538555246534, + "SortIndex": 1 + }, + { + "ComponentId": 7827190074535394331, + "SortIndex": 2 + } + ] + }, + "Component_[3518973002096080237]": { + "$type": "EditorOnlyEntityComponent", + "Id": 3518973002096080237 + }, + "Component_[399415038452606756]": { + "$type": "{27F1E1A1-8D9D-4C3B-BD3A-AFB9762449C0} TransformComponent", + "Id": 399415038452606756, + "Parent Entity": "ContainerEntity", + "Transform Data": { + "Translate": [ + 37.53014373779297, + -0.00018183141946792603, + 109.46680450439453 + ] + } + }, + "Component_[4564240319609068082]": { + "$type": "EditorEntitySortComponent", + "Id": 4564240319609068082 + }, + "Component_[7827190074535394331]": { + "$type": "EditorMaterialComponent", + "Id": 7827190074535394331, + "Controller": { + "Configuration": { + "materials": [ + { + "Key": { + "materialSlotStableId": 2418540911 + }, + "Value": { + "MaterialAsset": { + "assetId": { + "guid": "{2D054071-BEF7-53C0-A8C9-E4F026BD8364}" + }, + "assetHint": "materials/presets/pbr/metal_copper_matte.azmaterial" + } + } + } + ] + } + } + }, + "Component_[8092226976542590265]": { + "$type": "EditorDisabledCompositionComponent", + "Id": 8092226976542590265 + } + } + }, + "Entity_[977421854676]": { + "Id": "Entity_[977421854676]", + "Name": "Entity1", + "Components": { + "Component_[11525365929370623807]": { + "$type": "EditorVisibilityComponent", + "Id": 11525365929370623807 + }, + "Component_[12334620273692642550]": { + "$type": "EditorLockComponent", + "Id": 12334620273692642550 + }, + "Component_[14389735759337977675]": { + "$type": "EditorPendingCompositionComponent", + "Id": 14389735759337977675 + }, + "Component_[16184381538555246534]": { + "$type": "AZ::Render::EditorMeshComponent", + "Id": 16184381538555246534, + "Controller": { + "Configuration": { + "ModelAsset": { + "assetId": { + "guid": "{E14975EF-E676-51A4-B826-3EF59CB645AA}", + "subId": 285127096 + }, + "assetHint": "testdata/objects/cube/cube.azmodel" + } + } + } + }, + "Component_[17962478023087084794]": { + "$type": "SelectionComponent", + "Id": 17962478023087084794 + }, + "Component_[18071675051915092508]": { + "$type": "EditorEntityIconComponent", + "Id": 18071675051915092508 + }, + "Component_[2115498007879087044]": { + "$type": "EditorInspectorComponent", + "Id": 2115498007879087044, + "ComponentOrderEntryArray": [ + { + "ComponentId": 399415038452606756 + }, + { + "ComponentId": 16184381538555246534, + "SortIndex": 1 + }, + { + "ComponentId": 7827190074535394331, + "SortIndex": 2 + } + ] + }, + "Component_[3518973002096080237]": { + "$type": "EditorOnlyEntityComponent", + "Id": 3518973002096080237 + }, + "Component_[399415038452606756]": { + "$type": "{27F1E1A1-8D9D-4C3B-BD3A-AFB9762449C0} TransformComponent", + "Id": 399415038452606756, + "Parent Entity": "ContainerEntity", + "Transform Data": { + "Translate": [ + 37.53014373779297, + 0.010651908814907074, + 69.38883209228516 + ] + } + }, + "Component_[4564240319609068082]": { + "$type": "EditorEntitySortComponent", + "Id": 4564240319609068082 + }, + "Component_[7827190074535394331]": { + "$type": "EditorMaterialComponent", + "Id": 7827190074535394331, + "Controller": { + "Configuration": { + "materials": [ + { + "Key": { + "materialSlotStableId": 2418540911 + }, + "Value": { + "MaterialAsset": { + "assetId": { + "guid": "{E621C5BF-B8E1-55F0-A791-EC960F2FA46F}" + }, + "assetHint": "materials/presets/pbr/metal_copper.azmaterial" + } + } + } + ] + } + } + }, + "Component_[8092226976542590265]": { + "$type": "EditorDisabledCompositionComponent", + "Id": 8092226976542590265 + } + } + }, + "Entity_[981716821972]": { + "Id": "Entity_[981716821972]", + "Name": "Entity1", + "Components": { + "Component_[11525365929370623807]": { + "$type": "EditorVisibilityComponent", + "Id": 11525365929370623807 + }, + "Component_[12334620273692642550]": { + "$type": "EditorLockComponent", + "Id": 12334620273692642550 + }, + "Component_[14389735759337977675]": { + "$type": "EditorPendingCompositionComponent", + "Id": 14389735759337977675 + }, + "Component_[16184381538555246534]": { + "$type": "AZ::Render::EditorMeshComponent", + "Id": 16184381538555246534, + "Controller": { + "Configuration": { + "ModelAsset": { + "assetId": { + "guid": "{E14975EF-E676-51A4-B826-3EF59CB645AA}", + "subId": 285127096 + }, + "assetHint": "testdata/objects/cube/cube.azmodel" + } + } + } + }, + "Component_[17962478023087084794]": { + "$type": "SelectionComponent", + "Id": 17962478023087084794 + }, + "Component_[18071675051915092508]": { + "$type": "EditorEntityIconComponent", + "Id": 18071675051915092508 + }, + "Component_[2115498007879087044]": { + "$type": "EditorInspectorComponent", + "Id": 2115498007879087044, + "ComponentOrderEntryArray": [ + { + "ComponentId": 399415038452606756 + }, + { + "ComponentId": 16184381538555246534, + "SortIndex": 1 + }, + { + "ComponentId": 7827190074535394331, + "SortIndex": 2 + } + ] + }, + "Component_[3518973002096080237]": { + "$type": "EditorOnlyEntityComponent", + "Id": 3518973002096080237 + }, + "Component_[399415038452606756]": { + "$type": "{27F1E1A1-8D9D-4C3B-BD3A-AFB9762449C0} TransformComponent", + "Id": 399415038452606756, + "Parent Entity": "ContainerEntity", + "Transform Data": { + "Translate": [ + 42.53014373779297, + -0.00018183141946792603, + 99.43339538574219 + ] + } + }, + "Component_[4564240319609068082]": { + "$type": "EditorEntitySortComponent", + "Id": 4564240319609068082 + }, + "Component_[7827190074535394331]": { + "$type": "EditorMaterialComponent", + "Id": 7827190074535394331, + "Controller": { + "Configuration": { + "materials": [ + { + "Key": { + "materialSlotStableId": 2418540911 + }, + "Value": { + "MaterialAsset": { + "assetId": { + "guid": "{FE52E7C8-064D-506A-9C26-433EB93747DE}" + }, + "assetHint": "materials/presets/pbr/metal_gold.azmaterial" + } + } + } + ] + } + } + }, + "Component_[8092226976542590265]": { + "$type": "EditorDisabledCompositionComponent", + "Id": 8092226976542590265 + } + } + }, + "Entity_[986011789268]": { + "Id": "Entity_[986011789268]", + "Name": "Entity1", + "Components": { + "Component_[11525365929370623807]": { + "$type": "EditorVisibilityComponent", + "Id": 11525365929370623807 + }, + "Component_[12334620273692642550]": { + "$type": "EditorLockComponent", + "Id": 12334620273692642550 + }, + "Component_[14389735759337977675]": { + "$type": "EditorPendingCompositionComponent", + "Id": 14389735759337977675 + }, + "Component_[16184381538555246534]": { + "$type": "AZ::Render::EditorMeshComponent", + "Id": 16184381538555246534, + "Controller": { + "Configuration": { + "ModelAsset": { + "assetId": { + "guid": "{E14975EF-E676-51A4-B826-3EF59CB645AA}", + "subId": 285127096 + }, + "assetHint": "testdata/objects/cube/cube.azmodel" + } + } + } + }, + "Component_[17962478023087084794]": { + "$type": "SelectionComponent", + "Id": 17962478023087084794 + }, + "Component_[18071675051915092508]": { + "$type": "EditorEntityIconComponent", + "Id": 18071675051915092508 + }, + "Component_[2115498007879087044]": { + "$type": "EditorInspectorComponent", + "Id": 2115498007879087044, + "ComponentOrderEntryArray": [ + { + "ComponentId": 399415038452606756 + }, + { + "ComponentId": 16184381538555246534, + "SortIndex": 1 + }, + { + "ComponentId": 7827190074535394331, + "SortIndex": 2 + } + ] + }, + "Component_[3518973002096080237]": { + "$type": "EditorOnlyEntityComponent", + "Id": 3518973002096080237 + }, + "Component_[399415038452606756]": { + "$type": "{27F1E1A1-8D9D-4C3B-BD3A-AFB9762449C0} TransformComponent", + "Id": 399415038452606756, + "Parent Entity": "ContainerEntity", + "Transform Data": { + "Translate": [ + 37.53014373779297, + 0.010651908814907074, + 99.47334289550781 + ] + } + }, + "Component_[4564240319609068082]": { + "$type": "EditorEntitySortComponent", + "Id": 4564240319609068082 + }, + "Component_[7827190074535394331]": { + "$type": "EditorMaterialComponent", + "Id": 7827190074535394331, + "Controller": { + "Configuration": { + "materials": [ + { + "Key": { + "materialSlotStableId": 2418540911 + }, + "Value": { + "MaterialAsset": { + "assetId": { + "guid": "{E621C5BF-B8E1-55F0-A791-EC960F2FA46F}" + }, + "assetHint": "materials/presets/pbr/metal_copper.azmaterial" + } + } + } + ] + } + } + }, + "Component_[8092226976542590265]": { + "$type": "EditorDisabledCompositionComponent", + "Id": 8092226976542590265 + } + } + }, + "Entity_[990306756564]": { + "Id": "Entity_[990306756564]", + "Name": "Entity1", + "Components": { + "Component_[11525365929370623807]": { + "$type": "EditorVisibilityComponent", + "Id": 11525365929370623807 + }, + "Component_[12334620273692642550]": { + "$type": "EditorLockComponent", + "Id": 12334620273692642550 + }, + "Component_[14389735759337977675]": { + "$type": "EditorPendingCompositionComponent", + "Id": 14389735759337977675 + }, + "Component_[16184381538555246534]": { + "$type": "AZ::Render::EditorMeshComponent", + "Id": 16184381538555246534, + "Controller": { + "Configuration": { + "ModelAsset": { + "assetId": { + "guid": "{E14975EF-E676-51A4-B826-3EF59CB645AA}", + "subId": 285127096 + }, + "assetHint": "testdata/objects/cube/cube.azmodel" + } + } + } + }, + "Component_[17962478023087084794]": { + "$type": "SelectionComponent", + "Id": 17962478023087084794 + }, + "Component_[18071675051915092508]": { + "$type": "EditorEntityIconComponent", + "Id": 18071675051915092508 + }, + "Component_[2115498007879087044]": { + "$type": "EditorInspectorComponent", + "Id": 2115498007879087044, + "ComponentOrderEntryArray": [ + { + "ComponentId": 399415038452606756 + }, + { + "ComponentId": 16184381538555246534, + "SortIndex": 1 + }, + { + "ComponentId": 7827190074535394331, + "SortIndex": 2 + } + ] + }, + "Component_[3518973002096080237]": { + "$type": "EditorOnlyEntityComponent", + "Id": 3518973002096080237 + }, + "Component_[399415038452606756]": { + "$type": "{27F1E1A1-8D9D-4C3B-BD3A-AFB9762449C0} TransformComponent", + "Id": 399415038452606756, + "Parent Entity": "ContainerEntity", + "Transform Data": { + "Translate": [ + -47.53056335449219, + -0.00018183141946792603, + 49.593753814697266 + ] + } + }, + "Component_[4564240319609068082]": { + "$type": "EditorEntitySortComponent", + "Id": 4564240319609068082 + }, + "Component_[7827190074535394331]": { + "$type": "EditorMaterialComponent", + "Id": 7827190074535394331, + "Controller": { + "Configuration": { + "materials": [ + { + "Key": { + "materialSlotStableId": 2418540911 + }, + "Value": { + "MaterialAsset": { + "assetId": { + "guid": "{549D26B8-881D-569F-AF05-961F36A43F4F}" + }, + "assetHint": "materials/presets/pbr/metal_aluminum_matte.azmaterial" + } + } + } + ] + } + } + }, + "Component_[8092226976542590265]": { + "$type": "EditorDisabledCompositionComponent", + "Id": 8092226976542590265 + } + } + }, + "Entity_[994601723860]": { + "Id": "Entity_[994601723860]", + "Name": "Entity1", + "Components": { + "Component_[11525365929370623807]": { + "$type": "EditorVisibilityComponent", + "Id": 11525365929370623807 + }, + "Component_[12334620273692642550]": { + "$type": "EditorLockComponent", + "Id": 12334620273692642550 + }, + "Component_[14389735759337977675]": { + "$type": "EditorPendingCompositionComponent", + "Id": 14389735759337977675 + }, + "Component_[16184381538555246534]": { + "$type": "AZ::Render::EditorMeshComponent", + "Id": 16184381538555246534, + "Controller": { + "Configuration": { + "ModelAsset": { + "assetId": { + "guid": "{E14975EF-E676-51A4-B826-3EF59CB645AA}", + "subId": 285127096 + }, + "assetHint": "testdata/objects/cube/cube.azmodel" + } + } + } + }, + "Component_[17962478023087084794]": { + "$type": "SelectionComponent", + "Id": 17962478023087084794 + }, + "Component_[18071675051915092508]": { + "$type": "EditorEntityIconComponent", + "Id": 18071675051915092508 + }, + "Component_[2115498007879087044]": { + "$type": "EditorInspectorComponent", + "Id": 2115498007879087044, + "ComponentOrderEntryArray": [ + { + "ComponentId": 399415038452606756 + }, + { + "ComponentId": 16184381538555246534, + "SortIndex": 1 + }, + { + "ComponentId": 7827190074535394331, + "SortIndex": 2 + } + ] + }, + "Component_[3518973002096080237]": { + "$type": "EditorOnlyEntityComponent", + "Id": 3518973002096080237 + }, + "Component_[399415038452606756]": { + "$type": "{27F1E1A1-8D9D-4C3B-BD3A-AFB9762449C0} TransformComponent", + "Id": 399415038452606756, + "Parent Entity": "ContainerEntity", + "Transform Data": { + "Translate": [ + -17.530563354492188, + -0.00018183141946792603, + 54.618019104003906 + ] + } + }, + "Component_[4564240319609068082]": { + "$type": "EditorEntitySortComponent", + "Id": 4564240319609068082 + }, + "Component_[7827190074535394331]": { + "$type": "EditorMaterialComponent", + "Id": 7827190074535394331, + "Controller": { + "Configuration": { + "materials": [ + { + "Key": { + "materialSlotStableId": 2418540911 + }, + "Value": { + "MaterialAsset": { + "assetId": { + "guid": "{892EA944-0325-5FA6-94D7-4AB4FC02A0F5}" + }, + "assetHint": "materials/presets/pbr/metal_iron.azmaterial" + } + } + } + ] + } + } + }, + "Component_[8092226976542590265]": { + "$type": "EditorDisabledCompositionComponent", + "Id": 8092226976542590265 + } + } + }, + "Entity_[998896691156]": { + "Id": "Entity_[998896691156]", + "Name": "Entity1", + "Components": { + "Component_[11525365929370623807]": { + "$type": "EditorVisibilityComponent", + "Id": 11525365929370623807 + }, + "Component_[12334620273692642550]": { + "$type": "EditorLockComponent", + "Id": 12334620273692642550 + }, + "Component_[14389735759337977675]": { + "$type": "EditorPendingCompositionComponent", + "Id": 14389735759337977675 + }, + "Component_[16184381538555246534]": { + "$type": "AZ::Render::EditorMeshComponent", + "Id": 16184381538555246534, + "Controller": { + "Configuration": { + "ModelAsset": { + "assetId": { + "guid": "{E14975EF-E676-51A4-B826-3EF59CB645AA}", + "subId": 285127096 + }, + "assetHint": "testdata/objects/cube/cube.azmodel" + } + } + } + }, + "Component_[17962478023087084794]": { + "$type": "SelectionComponent", + "Id": 17962478023087084794 + }, + "Component_[18071675051915092508]": { + "$type": "EditorEntityIconComponent", + "Id": 18071675051915092508 + }, + "Component_[2115498007879087044]": { + "$type": "EditorInspectorComponent", + "Id": 2115498007879087044, + "ComponentOrderEntryArray": [ + { + "ComponentId": 399415038452606756 + }, + { + "ComponentId": 16184381538555246534, + "SortIndex": 1 + }, + { + "ComponentId": 7827190074535394331, + "SortIndex": 2 + } + ] + }, + "Component_[3518973002096080237]": { + "$type": "EditorOnlyEntityComponent", + "Id": 3518973002096080237 + }, + "Component_[399415038452606756]": { + "$type": "{27F1E1A1-8D9D-4C3B-BD3A-AFB9762449C0} TransformComponent", + "Id": 399415038452606756, + "Parent Entity": "ContainerEntity", + "Transform Data": { + "Translate": [ + -12.530563354492188, + -0.00018183141946792603, + 59.873046875 + ] + } + }, + "Component_[4564240319609068082]": { + "$type": "EditorEntitySortComponent", + "Id": 4564240319609068082 + }, + "Component_[7827190074535394331]": { + "$type": "EditorMaterialComponent", + "Id": 7827190074535394331, + "Controller": { + "Configuration": { + "materials": [ + { + "Key": { + "materialSlotStableId": 2418540911 + }, + "Value": { + "MaterialAsset": { + "assetId": { + "guid": "{F2AD0EBF-7137-58D1-9991-9552FAD41B19}" + }, + "assetHint": "materials/presets/pbr/metal_mercury.azmaterial" + } + } + } + ] + } + } + }, + "Component_[8092226976542590265]": { + "$type": "EditorDisabledCompositionComponent", + "Id": 8092226976542590265 + } + } + } + } +} \ No newline at end of file diff --git a/AutomatedTesting/Prefabs/TestData/Graphics/CubeAluminumPolishedPBR.prefab b/AutomatedTesting/Prefabs/TestData/Graphics/CubeAluminumPolishedPBR.prefab new file mode 100644 index 0000000000..afec89bcc0 --- /dev/null +++ b/AutomatedTesting/Prefabs/TestData/Graphics/CubeAluminumPolishedPBR.prefab @@ -0,0 +1,156 @@ +{ + "ContainerEntity": { + "Id": "ContainerEntity", + "Name": "CubeAluminumPolishedPBR", + "Components": { + "Component_[1006636009791072742]": { + "$type": "{27F1E1A1-8D9D-4C3B-BD3A-AFB9762449C0} TransformComponent", + "Id": 1006636009791072742, + "Parent Entity": "" + }, + "Component_[1076262440422199293]": { + "$type": "EditorEntitySortComponent", + "Id": 1076262440422199293, + "Child Entity Order": [ + "Entity_[1040185651401]" + ] + }, + "Component_[10918235158079012184]": { + "$type": "EditorEntityIconComponent", + "Id": 10918235158079012184 + }, + "Component_[14325323304581185195]": { + "$type": "EditorOnlyEntityComponent", + "Id": 14325323304581185195 + }, + "Component_[15952647410502679667]": { + "$type": "EditorPendingCompositionComponent", + "Id": 15952647410502679667 + }, + "Component_[1646402264018781142]": { + "$type": "EditorVisibilityComponent", + "Id": 1646402264018781142 + }, + "Component_[2017972571432187012]": { + "$type": "EditorInspectorComponent", + "Id": 2017972571432187012 + }, + "Component_[478000835478069459]": { + "$type": "EditorDisabledCompositionComponent", + "Id": 478000835478069459 + }, + "Component_[7132130710158542124]": { + "$type": "EditorPrefabComponent", + "Id": 7132130710158542124 + }, + "Component_[7457311619910333402]": { + "$type": "SelectionComponent", + "Id": 7457311619910333402 + }, + "Component_[8761313808145525748]": { + "$type": "EditorLockComponent", + "Id": 8761313808145525748 + } + } + }, + "Entities": { + "Entity_[1040185651401]": { + "Id": "Entity_[1040185651401]", + "Name": "Entity1", + "Components": { + "Component_[11024839750215572075]": { + "$type": "SelectionComponent", + "Id": 11024839750215572075 + }, + "Component_[11384176886283708819]": { + "$type": "{27F1E1A1-8D9D-4C3B-BD3A-AFB9762449C0} TransformComponent", + "Id": 11384176886283708819, + "Parent Entity": "ContainerEntity" + }, + "Component_[1606410272595503925]": { + "$type": "EditorMaterialComponent", + "Id": 1606410272595503925, + "Controller": { + "Configuration": { + "materials": [ + { + "Key": { + "materialSlotStableId": 2418540911 + }, + "Value": { + "MaterialAsset": { + "assetId": { + "guid": "{64C1F6A6-6BDA-551A-BE56-1829E5913278}" + }, + "assetHint": "materials/presets/pbr/metal_aluminum_polished.azmaterial" + } + } + } + ] + } + } + }, + "Component_[16470114336751653654]": { + "$type": "EditorInspectorComponent", + "Id": 16470114336751653654, + "ComponentOrderEntryArray": [ + { + "ComponentId": 11384176886283708819 + }, + { + "ComponentId": 89717634602996901, + "SortIndex": 1 + }, + { + "ComponentId": 1606410272595503925, + "SortIndex": 2 + } + ] + }, + "Component_[4303036201889516060]": { + "$type": "EditorLockComponent", + "Id": 4303036201889516060 + }, + "Component_[44336138790150350]": { + "$type": "EditorEntitySortComponent", + "Id": 44336138790150350 + }, + "Component_[4558973254917759795]": { + "$type": "EditorDisabledCompositionComponent", + "Id": 4558973254917759795 + }, + "Component_[4674030476408790307]": { + "$type": "EditorPendingCompositionComponent", + "Id": 4674030476408790307 + }, + "Component_[4802851695039968062]": { + "$type": "EditorVisibilityComponent", + "Id": 4802851695039968062 + }, + "Component_[5821006029055754615]": { + "$type": "EditorOnlyEntityComponent", + "Id": 5821006029055754615 + }, + "Component_[8587156575497792590]": { + "$type": "EditorEntityIconComponent", + "Id": 8587156575497792590 + }, + "Component_[89717634602996901]": { + "$type": "AZ::Render::EditorMeshComponent", + "Id": 89717634602996901, + "Controller": { + "Configuration": { + "ModelAsset": { + "assetId": { + "guid": "{E14975EF-E676-51A4-B826-3EF59CB645AA}", + "subId": 285127096 + }, + "assetHint": "testdata/objects/cube/cube.azmodel" + } + } + } + } + } + } + } +} \ No newline at end of file diff --git a/AutomatedTesting/Prefabs/TestData/Graphics/CubeBrassPolishedPBR.prefab b/AutomatedTesting/Prefabs/TestData/Graphics/CubeBrassPolishedPBR.prefab new file mode 100644 index 0000000000..beca9c9dba --- /dev/null +++ b/AutomatedTesting/Prefabs/TestData/Graphics/CubeBrassPolishedPBR.prefab @@ -0,0 +1,156 @@ +{ + "ContainerEntity": { + "Id": "ContainerEntity", + "Name": "CubeBrassPolishedPBR", + "Components": { + "Component_[11392538078593907718]": { + "$type": "EditorVisibilityComponent", + "Id": 11392538078593907718 + }, + "Component_[15271285664593091377]": { + "$type": "EditorPrefabComponent", + "Id": 15271285664593091377 + }, + "Component_[16445950008096288691]": { + "$type": "EditorDisabledCompositionComponent", + "Id": 16445950008096288691 + }, + "Component_[17031759897155285515]": { + "$type": "EditorOnlyEntityComponent", + "Id": 17031759897155285515 + }, + "Component_[17333992135029064645]": { + "$type": "{27F1E1A1-8D9D-4C3B-BD3A-AFB9762449C0} TransformComponent", + "Id": 17333992135029064645, + "Parent Entity": "" + }, + "Component_[2440848159410013062]": { + "$type": "EditorInspectorComponent", + "Id": 2440848159410013062 + }, + "Component_[4872690920600271776]": { + "$type": "EditorEntityIconComponent", + "Id": 4872690920600271776 + }, + "Component_[8105157811055641931]": { + "$type": "SelectionComponent", + "Id": 8105157811055641931 + }, + "Component_[8121804356127130254]": { + "$type": "EditorLockComponent", + "Id": 8121804356127130254 + }, + "Component_[9156467458085058309]": { + "$type": "EditorPendingCompositionComponent", + "Id": 9156467458085058309 + }, + "Component_[998572165026441124]": { + "$type": "EditorEntitySortComponent", + "Id": 998572165026441124, + "Child Entity Order": [ + "Entity_[1169034670281]" + ] + } + } + }, + "Entities": { + "Entity_[1169034670281]": { + "Id": "Entity_[1169034670281]", + "Name": "Entity1", + "Components": { + "Component_[11024839750215572075]": { + "$type": "SelectionComponent", + "Id": 11024839750215572075 + }, + "Component_[11384176886283708819]": { + "$type": "{27F1E1A1-8D9D-4C3B-BD3A-AFB9762449C0} TransformComponent", + "Id": 11384176886283708819, + "Parent Entity": "ContainerEntity" + }, + "Component_[1606410272595503925]": { + "$type": "EditorMaterialComponent", + "Id": 1606410272595503925, + "Controller": { + "Configuration": { + "materials": [ + { + "Key": { + "materialSlotStableId": 2418540911 + }, + "Value": { + "MaterialAsset": { + "assetId": { + "guid": "{FC69F2F8-F73B-5A0C-B8B7-94BAA45780FC}" + }, + "assetHint": "materials/presets/pbr/metal_brass_polished.azmaterial" + } + } + } + ] + } + } + }, + "Component_[16470114336751653654]": { + "$type": "EditorInspectorComponent", + "Id": 16470114336751653654, + "ComponentOrderEntryArray": [ + { + "ComponentId": 11384176886283708819 + }, + { + "ComponentId": 89717634602996901, + "SortIndex": 1 + }, + { + "ComponentId": 1606410272595503925, + "SortIndex": 2 + } + ] + }, + "Component_[4303036201889516060]": { + "$type": "EditorLockComponent", + "Id": 4303036201889516060 + }, + "Component_[44336138790150350]": { + "$type": "EditorEntitySortComponent", + "Id": 44336138790150350 + }, + "Component_[4558973254917759795]": { + "$type": "EditorDisabledCompositionComponent", + "Id": 4558973254917759795 + }, + "Component_[4674030476408790307]": { + "$type": "EditorPendingCompositionComponent", + "Id": 4674030476408790307 + }, + "Component_[4802851695039968062]": { + "$type": "EditorVisibilityComponent", + "Id": 4802851695039968062 + }, + "Component_[5821006029055754615]": { + "$type": "EditorOnlyEntityComponent", + "Id": 5821006029055754615 + }, + "Component_[8587156575497792590]": { + "$type": "EditorEntityIconComponent", + "Id": 8587156575497792590 + }, + "Component_[89717634602996901]": { + "$type": "AZ::Render::EditorMeshComponent", + "Id": 89717634602996901, + "Controller": { + "Configuration": { + "ModelAsset": { + "assetId": { + "guid": "{E14975EF-E676-51A4-B826-3EF59CB645AA}", + "subId": 285127096 + }, + "assetHint": "testdata/objects/cube/cube.azmodel" + } + } + } + } + } + } + } +} \ No newline at end of file diff --git a/AutomatedTesting/Prefabs/TestData/Graphics/CubeChromePolishedPBR.prefab b/AutomatedTesting/Prefabs/TestData/Graphics/CubeChromePolishedPBR.prefab new file mode 100644 index 0000000000..6f933ad666 --- /dev/null +++ b/AutomatedTesting/Prefabs/TestData/Graphics/CubeChromePolishedPBR.prefab @@ -0,0 +1,156 @@ +{ + "ContainerEntity": { + "Id": "ContainerEntity", + "Name": "CubeChromePolishedPBR", + "Components": { + "Component_[10194322458002226643]": { + "$type": "EditorOnlyEntityComponent", + "Id": 10194322458002226643 + }, + "Component_[12036481316264753863]": { + "$type": "EditorVisibilityComponent", + "Id": 12036481316264753863 + }, + "Component_[12378089635489881977]": { + "$type": "EditorInspectorComponent", + "Id": 12378089635489881977 + }, + "Component_[14430665156325163680]": { + "$type": "EditorPendingCompositionComponent", + "Id": 14430665156325163680 + }, + "Component_[15205683346512266293]": { + "$type": "{27F1E1A1-8D9D-4C3B-BD3A-AFB9762449C0} TransformComponent", + "Id": 15205683346512266293, + "Parent Entity": "" + }, + "Component_[16051828087924530008]": { + "$type": "EditorLockComponent", + "Id": 16051828087924530008 + }, + "Component_[3910753277078082783]": { + "$type": "EditorDisabledCompositionComponent", + "Id": 3910753277078082783 + }, + "Component_[4999195701117409226]": { + "$type": "EditorEntityIconComponent", + "Id": 4999195701117409226 + }, + "Component_[5435519106043975119]": { + "$type": "EditorEntitySortComponent", + "Id": 5435519106043975119, + "Child Entity Order": [ + "Entity_[1315063558345]" + ] + }, + "Component_[6762050164377989214]": { + "$type": "EditorPrefabComponent", + "Id": 6762050164377989214 + }, + "Component_[7395721573111063938]": { + "$type": "SelectionComponent", + "Id": 7395721573111063938 + } + } + }, + "Entities": { + "Entity_[1315063558345]": { + "Id": "Entity_[1315063558345]", + "Name": "Entity1", + "Components": { + "Component_[11024839750215572075]": { + "$type": "SelectionComponent", + "Id": 11024839750215572075 + }, + "Component_[11384176886283708819]": { + "$type": "{27F1E1A1-8D9D-4C3B-BD3A-AFB9762449C0} TransformComponent", + "Id": 11384176886283708819, + "Parent Entity": "ContainerEntity" + }, + "Component_[1606410272595503925]": { + "$type": "EditorMaterialComponent", + "Id": 1606410272595503925, + "Controller": { + "Configuration": { + "materials": [ + { + "Key": { + "materialSlotStableId": 2418540911 + }, + "Value": { + "MaterialAsset": { + "assetId": { + "guid": "{CAF50181-3384-5DF2-9304-C6E48E83C72D}" + }, + "assetHint": "materials/presets/pbr/metal_chrome_polished.azmaterial" + } + } + } + ] + } + } + }, + "Component_[16470114336751653654]": { + "$type": "EditorInspectorComponent", + "Id": 16470114336751653654, + "ComponentOrderEntryArray": [ + { + "ComponentId": 11384176886283708819 + }, + { + "ComponentId": 89717634602996901, + "SortIndex": 1 + }, + { + "ComponentId": 1606410272595503925, + "SortIndex": 2 + } + ] + }, + "Component_[4303036201889516060]": { + "$type": "EditorLockComponent", + "Id": 4303036201889516060 + }, + "Component_[44336138790150350]": { + "$type": "EditorEntitySortComponent", + "Id": 44336138790150350 + }, + "Component_[4558973254917759795]": { + "$type": "EditorDisabledCompositionComponent", + "Id": 4558973254917759795 + }, + "Component_[4674030476408790307]": { + "$type": "EditorPendingCompositionComponent", + "Id": 4674030476408790307 + }, + "Component_[4802851695039968062]": { + "$type": "EditorVisibilityComponent", + "Id": 4802851695039968062 + }, + "Component_[5821006029055754615]": { + "$type": "EditorOnlyEntityComponent", + "Id": 5821006029055754615 + }, + "Component_[8587156575497792590]": { + "$type": "EditorEntityIconComponent", + "Id": 8587156575497792590 + }, + "Component_[89717634602996901]": { + "$type": "AZ::Render::EditorMeshComponent", + "Id": 89717634602996901, + "Controller": { + "Configuration": { + "ModelAsset": { + "assetId": { + "guid": "{E14975EF-E676-51A4-B826-3EF59CB645AA}", + "subId": 285127096 + }, + "assetHint": "testdata/objects/cube/cube.azmodel" + } + } + } + } + } + } + } +} \ No newline at end of file diff --git a/AutomatedTesting/Prefabs/TestData/Graphics/CubeCobaltPolishedPBR.prefab b/AutomatedTesting/Prefabs/TestData/Graphics/CubeCobaltPolishedPBR.prefab new file mode 100644 index 0000000000..82ed5264dd --- /dev/null +++ b/AutomatedTesting/Prefabs/TestData/Graphics/CubeCobaltPolishedPBR.prefab @@ -0,0 +1,156 @@ +{ + "ContainerEntity": { + "Id": "ContainerEntity", + "Name": "CubeCobaltPolishedPBR", + "Components": { + "Component_[12811832964126776693]": { + "$type": "{27F1E1A1-8D9D-4C3B-BD3A-AFB9762449C0} TransformComponent", + "Id": 12811832964126776693, + "Parent Entity": "" + }, + "Component_[13295886036381057017]": { + "$type": "EditorPrefabComponent", + "Id": 13295886036381057017 + }, + "Component_[13767840970182343359]": { + "$type": "SelectionComponent", + "Id": 13767840970182343359 + }, + "Component_[16269039178417460408]": { + "$type": "EditorDisabledCompositionComponent", + "Id": 16269039178417460408 + }, + "Component_[16338942903899315753]": { + "$type": "EditorLockComponent", + "Id": 16338942903899315753 + }, + "Component_[16938354010512315058]": { + "$type": "EditorVisibilityComponent", + "Id": 16938354010512315058 + }, + "Component_[18087692989611771228]": { + "$type": "EditorEntitySortComponent", + "Id": 18087692989611771228, + "Child Entity Order": [ + "Entity_[1478272315593]" + ] + }, + "Component_[2408892657833094901]": { + "$type": "EditorInspectorComponent", + "Id": 2408892657833094901 + }, + "Component_[3273159330768091937]": { + "$type": "EditorPendingCompositionComponent", + "Id": 3273159330768091937 + }, + "Component_[8251134042453350781]": { + "$type": "EditorEntityIconComponent", + "Id": 8251134042453350781 + }, + "Component_[9830348537229676775]": { + "$type": "EditorOnlyEntityComponent", + "Id": 9830348537229676775 + } + } + }, + "Entities": { + "Entity_[1478272315593]": { + "Id": "Entity_[1478272315593]", + "Name": "Entity1", + "Components": { + "Component_[11024839750215572075]": { + "$type": "SelectionComponent", + "Id": 11024839750215572075 + }, + "Component_[11384176886283708819]": { + "$type": "{27F1E1A1-8D9D-4C3B-BD3A-AFB9762449C0} TransformComponent", + "Id": 11384176886283708819, + "Parent Entity": "ContainerEntity" + }, + "Component_[1606410272595503925]": { + "$type": "EditorMaterialComponent", + "Id": 1606410272595503925, + "Controller": { + "Configuration": { + "materials": [ + { + "Key": { + "materialSlotStableId": 2418540911 + }, + "Value": { + "MaterialAsset": { + "assetId": { + "guid": "{93DF55AE-8D1B-5AD1-A609-05F1BD9F6EA0}" + }, + "assetHint": "materials/presets/pbr/metal_cobalt_polished.azmaterial" + } + } + } + ] + } + } + }, + "Component_[16470114336751653654]": { + "$type": "EditorInspectorComponent", + "Id": 16470114336751653654, + "ComponentOrderEntryArray": [ + { + "ComponentId": 11384176886283708819 + }, + { + "ComponentId": 89717634602996901, + "SortIndex": 1 + }, + { + "ComponentId": 1606410272595503925, + "SortIndex": 2 + } + ] + }, + "Component_[4303036201889516060]": { + "$type": "EditorLockComponent", + "Id": 4303036201889516060 + }, + "Component_[44336138790150350]": { + "$type": "EditorEntitySortComponent", + "Id": 44336138790150350 + }, + "Component_[4558973254917759795]": { + "$type": "EditorDisabledCompositionComponent", + "Id": 4558973254917759795 + }, + "Component_[4674030476408790307]": { + "$type": "EditorPendingCompositionComponent", + "Id": 4674030476408790307 + }, + "Component_[4802851695039968062]": { + "$type": "EditorVisibilityComponent", + "Id": 4802851695039968062 + }, + "Component_[5821006029055754615]": { + "$type": "EditorOnlyEntityComponent", + "Id": 5821006029055754615 + }, + "Component_[8587156575497792590]": { + "$type": "EditorEntityIconComponent", + "Id": 8587156575497792590 + }, + "Component_[89717634602996901]": { + "$type": "AZ::Render::EditorMeshComponent", + "Id": 89717634602996901, + "Controller": { + "Configuration": { + "ModelAsset": { + "assetId": { + "guid": "{E14975EF-E676-51A4-B826-3EF59CB645AA}", + "subId": 285127096 + }, + "assetHint": "testdata/objects/cube/cube.azmodel" + } + } + } + } + } + } + } +} \ No newline at end of file diff --git a/AutomatedTesting/Prefabs/TestData/Graphics/CubeCopperPolishedPBR.prefab b/AutomatedTesting/Prefabs/TestData/Graphics/CubeCopperPolishedPBR.prefab new file mode 100644 index 0000000000..ca6680593b --- /dev/null +++ b/AutomatedTesting/Prefabs/TestData/Graphics/CubeCopperPolishedPBR.prefab @@ -0,0 +1,156 @@ +{ + "ContainerEntity": { + "Id": "ContainerEntity", + "Name": "CubeCopperPolishedPBR", + "Components": { + "Component_[14120317269315619433]": { + "$type": "SelectionComponent", + "Id": 14120317269315619433 + }, + "Component_[143917687187100454]": { + "$type": "EditorInspectorComponent", + "Id": 143917687187100454 + }, + "Component_[15260876699496078513]": { + "$type": "EditorPrefabComponent", + "Id": 15260876699496078513 + }, + "Component_[1746418914802949089]": { + "$type": "EditorOnlyEntityComponent", + "Id": 1746418914802949089 + }, + "Component_[18443523081045072277]": { + "$type": "EditorPendingCompositionComponent", + "Id": 18443523081045072277 + }, + "Component_[4010874908443542212]": { + "$type": "EditorLockComponent", + "Id": 4010874908443542212 + }, + "Component_[4271734532103635304]": { + "$type": "EditorDisabledCompositionComponent", + "Id": 4271734532103635304 + }, + "Component_[4383829137523954163]": { + "$type": "EditorEntityIconComponent", + "Id": 4383829137523954163 + }, + "Component_[5749675910289562089]": { + "$type": "{27F1E1A1-8D9D-4C3B-BD3A-AFB9762449C0} TransformComponent", + "Id": 5749675910289562089, + "Parent Entity": "" + }, + "Component_[6232920837132171119]": { + "$type": "EditorVisibilityComponent", + "Id": 6232920837132171119 + }, + "Component_[7306146920796854544]": { + "$type": "EditorEntitySortComponent", + "Id": 7306146920796854544, + "Child Entity Order": [ + "Entity_[1658660942025]" + ] + } + } + }, + "Entities": { + "Entity_[1658660942025]": { + "Id": "Entity_[1658660942025]", + "Name": "Entity1", + "Components": { + "Component_[11024839750215572075]": { + "$type": "SelectionComponent", + "Id": 11024839750215572075 + }, + "Component_[11384176886283708819]": { + "$type": "{27F1E1A1-8D9D-4C3B-BD3A-AFB9762449C0} TransformComponent", + "Id": 11384176886283708819, + "Parent Entity": "ContainerEntity" + }, + "Component_[1606410272595503925]": { + "$type": "EditorMaterialComponent", + "Id": 1606410272595503925, + "Controller": { + "Configuration": { + "materials": [ + { + "Key": { + "materialSlotStableId": 2418540911 + }, + "Value": { + "MaterialAsset": { + "assetId": { + "guid": "{CF5C7B01-4912-58AE-991A-F25251E505AC}" + }, + "assetHint": "materials/presets/pbr/metal_copper_polished.azmaterial" + } + } + } + ] + } + } + }, + "Component_[16470114336751653654]": { + "$type": "EditorInspectorComponent", + "Id": 16470114336751653654, + "ComponentOrderEntryArray": [ + { + "ComponentId": 11384176886283708819 + }, + { + "ComponentId": 89717634602996901, + "SortIndex": 1 + }, + { + "ComponentId": 1606410272595503925, + "SortIndex": 2 + } + ] + }, + "Component_[4303036201889516060]": { + "$type": "EditorLockComponent", + "Id": 4303036201889516060 + }, + "Component_[44336138790150350]": { + "$type": "EditorEntitySortComponent", + "Id": 44336138790150350 + }, + "Component_[4558973254917759795]": { + "$type": "EditorDisabledCompositionComponent", + "Id": 4558973254917759795 + }, + "Component_[4674030476408790307]": { + "$type": "EditorPendingCompositionComponent", + "Id": 4674030476408790307 + }, + "Component_[4802851695039968062]": { + "$type": "EditorVisibilityComponent", + "Id": 4802851695039968062 + }, + "Component_[5821006029055754615]": { + "$type": "EditorOnlyEntityComponent", + "Id": 5821006029055754615 + }, + "Component_[8587156575497792590]": { + "$type": "EditorEntityIconComponent", + "Id": 8587156575497792590 + }, + "Component_[89717634602996901]": { + "$type": "AZ::Render::EditorMeshComponent", + "Id": 89717634602996901, + "Controller": { + "Configuration": { + "ModelAsset": { + "assetId": { + "guid": "{E14975EF-E676-51A4-B826-3EF59CB645AA}", + "subId": 285127096 + }, + "assetHint": "testdata/objects/cube/cube.azmodel" + } + } + } + } + } + } + } +} \ No newline at end of file diff --git a/AutomatedTesting/Prefabs/TestData/Graphics/CubeGoldPolishedPBR.prefab b/AutomatedTesting/Prefabs/TestData/Graphics/CubeGoldPolishedPBR.prefab new file mode 100644 index 0000000000..f6b678bb32 --- /dev/null +++ b/AutomatedTesting/Prefabs/TestData/Graphics/CubeGoldPolishedPBR.prefab @@ -0,0 +1,156 @@ +{ + "ContainerEntity": { + "Id": "ContainerEntity", + "Name": "CubeGoldPolishedPBR", + "Components": { + "Component_[10011820011377711118]": { + "$type": "EditorLockComponent", + "Id": 10011820011377711118 + }, + "Component_[10068789746496377466]": { + "$type": "EditorPrefabComponent", + "Id": 10068789746496377466 + }, + "Component_[11570676153379582500]": { + "$type": "{27F1E1A1-8D9D-4C3B-BD3A-AFB9762449C0} TransformComponent", + "Id": 11570676153379582500, + "Parent Entity": "" + }, + "Component_[13003038310843603631]": { + "$type": "EditorVisibilityComponent", + "Id": 13003038310843603631 + }, + "Component_[15807328745370882636]": { + "$type": "SelectionComponent", + "Id": 15807328745370882636 + }, + "Component_[2750440106393392905]": { + "$type": "EditorEntitySortComponent", + "Id": 2750440106393392905, + "Child Entity Order": [ + "Entity_[1856229437641]" + ] + }, + "Component_[2761752922494043610]": { + "$type": "EditorDisabledCompositionComponent", + "Id": 2761752922494043610 + }, + "Component_[3027606009106407466]": { + "$type": "EditorInspectorComponent", + "Id": 3027606009106407466 + }, + "Component_[4326682049246572673]": { + "$type": "EditorPendingCompositionComponent", + "Id": 4326682049246572673 + }, + "Component_[5821381882600148312]": { + "$type": "EditorOnlyEntityComponent", + "Id": 5821381882600148312 + }, + "Component_[6068739143830165037]": { + "$type": "EditorEntityIconComponent", + "Id": 6068739143830165037 + } + } + }, + "Entities": { + "Entity_[1856229437641]": { + "Id": "Entity_[1856229437641]", + "Name": "Entity1", + "Components": { + "Component_[11024839750215572075]": { + "$type": "SelectionComponent", + "Id": 11024839750215572075 + }, + "Component_[11384176886283708819]": { + "$type": "{27F1E1A1-8D9D-4C3B-BD3A-AFB9762449C0} TransformComponent", + "Id": 11384176886283708819, + "Parent Entity": "ContainerEntity" + }, + "Component_[1606410272595503925]": { + "$type": "EditorMaterialComponent", + "Id": 1606410272595503925, + "Controller": { + "Configuration": { + "materials": [ + { + "Key": { + "materialSlotStableId": 2418540911 + }, + "Value": { + "MaterialAsset": { + "assetId": { + "guid": "{FB4657EB-FB3A-5EC3-A772-DC36D6F733C3}" + }, + "assetHint": "materials/presets/pbr/metal_gold_polished.azmaterial" + } + } + } + ] + } + } + }, + "Component_[16470114336751653654]": { + "$type": "EditorInspectorComponent", + "Id": 16470114336751653654, + "ComponentOrderEntryArray": [ + { + "ComponentId": 11384176886283708819 + }, + { + "ComponentId": 89717634602996901, + "SortIndex": 1 + }, + { + "ComponentId": 1606410272595503925, + "SortIndex": 2 + } + ] + }, + "Component_[4303036201889516060]": { + "$type": "EditorLockComponent", + "Id": 4303036201889516060 + }, + "Component_[44336138790150350]": { + "$type": "EditorEntitySortComponent", + "Id": 44336138790150350 + }, + "Component_[4558973254917759795]": { + "$type": "EditorDisabledCompositionComponent", + "Id": 4558973254917759795 + }, + "Component_[4674030476408790307]": { + "$type": "EditorPendingCompositionComponent", + "Id": 4674030476408790307 + }, + "Component_[4802851695039968062]": { + "$type": "EditorVisibilityComponent", + "Id": 4802851695039968062 + }, + "Component_[5821006029055754615]": { + "$type": "EditorOnlyEntityComponent", + "Id": 5821006029055754615 + }, + "Component_[8587156575497792590]": { + "$type": "EditorEntityIconComponent", + "Id": 8587156575497792590 + }, + "Component_[89717634602996901]": { + "$type": "AZ::Render::EditorMeshComponent", + "Id": 89717634602996901, + "Controller": { + "Configuration": { + "ModelAsset": { + "assetId": { + "guid": "{E14975EF-E676-51A4-B826-3EF59CB645AA}", + "subId": 285127096 + }, + "assetHint": "testdata/objects/cube/cube.azmodel" + } + } + } + } + } + } + } +} \ No newline at end of file diff --git a/AutomatedTesting/Prefabs/TestData/Graphics/CubeIronPolishedPBR.prefab b/AutomatedTesting/Prefabs/TestData/Graphics/CubeIronPolishedPBR.prefab new file mode 100644 index 0000000000..f7118b4084 --- /dev/null +++ b/AutomatedTesting/Prefabs/TestData/Graphics/CubeIronPolishedPBR.prefab @@ -0,0 +1,156 @@ +{ + "ContainerEntity": { + "Id": "ContainerEntity", + "Name": "CubeIronPolishedPBR", + "Components": { + "Component_[10744633821142630765]": { + "$type": "EditorOnlyEntityComponent", + "Id": 10744633821142630765 + }, + "Component_[15160812085690623525]": { + "$type": "EditorPrefabComponent", + "Id": 15160812085690623525 + }, + "Component_[17506200912680653288]": { + "$type": "{27F1E1A1-8D9D-4C3B-BD3A-AFB9762449C0} TransformComponent", + "Id": 17506200912680653288, + "Parent Entity": "" + }, + "Component_[1779514216896114299]": { + "$type": "EditorDisabledCompositionComponent", + "Id": 1779514216896114299 + }, + "Component_[2089200513910230823]": { + "$type": "EditorPendingCompositionComponent", + "Id": 2089200513910230823 + }, + "Component_[3904312129158421170]": { + "$type": "EditorEntityIconComponent", + "Id": 3904312129158421170 + }, + "Component_[5126366677360310098]": { + "$type": "EditorVisibilityComponent", + "Id": 5126366677360310098 + }, + "Component_[6443652007083636420]": { + "$type": "EditorEntitySortComponent", + "Id": 6443652007083636420, + "Child Entity Order": [ + "Entity_[2070977802441]" + ] + }, + "Component_[8531209872369121358]": { + "$type": "EditorInspectorComponent", + "Id": 8531209872369121358 + }, + "Component_[8558242753126803571]": { + "$type": "SelectionComponent", + "Id": 8558242753126803571 + }, + "Component_[8938179055081804896]": { + "$type": "EditorLockComponent", + "Id": 8938179055081804896 + } + } + }, + "Entities": { + "Entity_[2070977802441]": { + "Id": "Entity_[2070977802441]", + "Name": "Entity1", + "Components": { + "Component_[11024839750215572075]": { + "$type": "SelectionComponent", + "Id": 11024839750215572075 + }, + "Component_[11384176886283708819]": { + "$type": "{27F1E1A1-8D9D-4C3B-BD3A-AFB9762449C0} TransformComponent", + "Id": 11384176886283708819, + "Parent Entity": "ContainerEntity" + }, + "Component_[1606410272595503925]": { + "$type": "EditorMaterialComponent", + "Id": 1606410272595503925, + "Controller": { + "Configuration": { + "materials": [ + { + "Key": { + "materialSlotStableId": 2418540911 + }, + "Value": { + "MaterialAsset": { + "assetId": { + "guid": "{A7F03135-ECAD-5440-99DB-E84ABA3D50DA}" + }, + "assetHint": "materials/presets/pbr/metal_iron_polished.azmaterial" + } + } + } + ] + } + } + }, + "Component_[16470114336751653654]": { + "$type": "EditorInspectorComponent", + "Id": 16470114336751653654, + "ComponentOrderEntryArray": [ + { + "ComponentId": 11384176886283708819 + }, + { + "ComponentId": 89717634602996901, + "SortIndex": 1 + }, + { + "ComponentId": 1606410272595503925, + "SortIndex": 2 + } + ] + }, + "Component_[4303036201889516060]": { + "$type": "EditorLockComponent", + "Id": 4303036201889516060 + }, + "Component_[44336138790150350]": { + "$type": "EditorEntitySortComponent", + "Id": 44336138790150350 + }, + "Component_[4558973254917759795]": { + "$type": "EditorDisabledCompositionComponent", + "Id": 4558973254917759795 + }, + "Component_[4674030476408790307]": { + "$type": "EditorPendingCompositionComponent", + "Id": 4674030476408790307 + }, + "Component_[4802851695039968062]": { + "$type": "EditorVisibilityComponent", + "Id": 4802851695039968062 + }, + "Component_[5821006029055754615]": { + "$type": "EditorOnlyEntityComponent", + "Id": 5821006029055754615 + }, + "Component_[8587156575497792590]": { + "$type": "EditorEntityIconComponent", + "Id": 8587156575497792590 + }, + "Component_[89717634602996901]": { + "$type": "AZ::Render::EditorMeshComponent", + "Id": 89717634602996901, + "Controller": { + "Configuration": { + "ModelAsset": { + "assetId": { + "guid": "{E14975EF-E676-51A4-B826-3EF59CB645AA}", + "subId": 285127096 + }, + "assetHint": "testdata/objects/cube/cube.azmodel" + } + } + } + } + } + } + } +} \ No newline at end of file diff --git a/AutomatedTesting/Prefabs/TestData/Graphics/CubeMercuryPBR.prefab b/AutomatedTesting/Prefabs/TestData/Graphics/CubeMercuryPBR.prefab new file mode 100644 index 0000000000..2977bff25b --- /dev/null +++ b/AutomatedTesting/Prefabs/TestData/Graphics/CubeMercuryPBR.prefab @@ -0,0 +1,156 @@ +{ + "ContainerEntity": { + "Id": "ContainerEntity", + "Name": "CubeMercuryPBR", + "Components": { + "Component_[11796219437064669544]": { + "$type": "SelectionComponent", + "Id": 11796219437064669544 + }, + "Component_[12551667429170676889]": { + "$type": "EditorPrefabComponent", + "Id": 12551667429170676889 + }, + "Component_[12693460746131498096]": { + "$type": "EditorInspectorComponent", + "Id": 12693460746131498096 + }, + "Component_[14262931207267008977]": { + "$type": "EditorEntityIconComponent", + "Id": 14262931207267008977 + }, + "Component_[18045441039226816973]": { + "$type": "EditorEntitySortComponent", + "Id": 18045441039226816973, + "Child Entity Order": [ + "Entity_[928516501705]" + ] + }, + "Component_[2268958959705742396]": { + "$type": "{27F1E1A1-8D9D-4C3B-BD3A-AFB9762449C0} TransformComponent", + "Id": 2268958959705742396, + "Parent Entity": "" + }, + "Component_[3379321424051234761]": { + "$type": "EditorVisibilityComponent", + "Id": 3379321424051234761 + }, + "Component_[3967973434353405611]": { + "$type": "EditorLockComponent", + "Id": 3967973434353405611 + }, + "Component_[6260092263143569388]": { + "$type": "EditorDisabledCompositionComponent", + "Id": 6260092263143569388 + }, + "Component_[6596926416684557718]": { + "$type": "EditorOnlyEntityComponent", + "Id": 6596926416684557718 + }, + "Component_[9068640134216835201]": { + "$type": "EditorPendingCompositionComponent", + "Id": 9068640134216835201 + } + } + }, + "Entities": { + "Entity_[928516501705]": { + "Id": "Entity_[928516501705]", + "Name": "Entity1", + "Components": { + "Component_[11024839750215572075]": { + "$type": "SelectionComponent", + "Id": 11024839750215572075 + }, + "Component_[11384176886283708819]": { + "$type": "{27F1E1A1-8D9D-4C3B-BD3A-AFB9762449C0} TransformComponent", + "Id": 11384176886283708819, + "Parent Entity": "ContainerEntity" + }, + "Component_[1606410272595503925]": { + "$type": "EditorMaterialComponent", + "Id": 1606410272595503925, + "Controller": { + "Configuration": { + "materials": [ + { + "Key": { + "materialSlotStableId": 2418540911 + }, + "Value": { + "MaterialAsset": { + "assetId": { + "guid": "{F2AD0EBF-7137-58D1-9991-9552FAD41B19}" + }, + "assetHint": "materials/presets/pbr/metal_mercury.azmaterial" + } + } + } + ] + } + } + }, + "Component_[16470114336751653654]": { + "$type": "EditorInspectorComponent", + "Id": 16470114336751653654, + "ComponentOrderEntryArray": [ + { + "ComponentId": 11384176886283708819 + }, + { + "ComponentId": 89717634602996901, + "SortIndex": 1 + }, + { + "ComponentId": 1606410272595503925, + "SortIndex": 2 + } + ] + }, + "Component_[4303036201889516060]": { + "$type": "EditorLockComponent", + "Id": 4303036201889516060 + }, + "Component_[44336138790150350]": { + "$type": "EditorEntitySortComponent", + "Id": 44336138790150350 + }, + "Component_[4558973254917759795]": { + "$type": "EditorDisabledCompositionComponent", + "Id": 4558973254917759795 + }, + "Component_[4674030476408790307]": { + "$type": "EditorPendingCompositionComponent", + "Id": 4674030476408790307 + }, + "Component_[4802851695039968062]": { + "$type": "EditorVisibilityComponent", + "Id": 4802851695039968062 + }, + "Component_[5821006029055754615]": { + "$type": "EditorOnlyEntityComponent", + "Id": 5821006029055754615 + }, + "Component_[8587156575497792590]": { + "$type": "EditorEntityIconComponent", + "Id": 8587156575497792590 + }, + "Component_[89717634602996901]": { + "$type": "AZ::Render::EditorMeshComponent", + "Id": 89717634602996901, + "Controller": { + "Configuration": { + "ModelAsset": { + "assetId": { + "guid": "{E14975EF-E676-51A4-B826-3EF59CB645AA}", + "subId": 285127096 + }, + "assetHint": "testdata/objects/cube/cube.azmodel" + } + } + } + } + } + } + } +} \ No newline at end of file diff --git a/AutomatedTesting/Prefabs/TestData/Graphics/CubeNickelPolishedPBR.prefab b/AutomatedTesting/Prefabs/TestData/Graphics/CubeNickelPolishedPBR.prefab new file mode 100644 index 0000000000..22fa0873b1 --- /dev/null +++ b/AutomatedTesting/Prefabs/TestData/Graphics/CubeNickelPolishedPBR.prefab @@ -0,0 +1,156 @@ +{ + "ContainerEntity": { + "Id": "ContainerEntity", + "Name": "CubeNickelPolishedPBR", + "Components": { + "Component_[10826024012928681054]": { + "$type": "EditorPendingCompositionComponent", + "Id": 10826024012928681054 + }, + "Component_[12821987693261496174]": { + "$type": "{27F1E1A1-8D9D-4C3B-BD3A-AFB9762449C0} TransformComponent", + "Id": 12821987693261496174, + "Parent Entity": "" + }, + "Component_[1347237730046420905]": { + "$type": "EditorDisabledCompositionComponent", + "Id": 1347237730046420905 + }, + "Component_[13962868105035894085]": { + "$type": "EditorInspectorComponent", + "Id": 13962868105035894085 + }, + "Component_[17956955568472089321]": { + "$type": "EditorOnlyEntityComponent", + "Id": 17956955568472089321 + }, + "Component_[1982369816302736367]": { + "$type": "EditorLockComponent", + "Id": 1982369816302736367 + }, + "Component_[2765278216943439310]": { + "$type": "EditorEntityIconComponent", + "Id": 2765278216943439310 + }, + "Component_[2823302329697962266]": { + "$type": "SelectionComponent", + "Id": 2823302329697962266 + }, + "Component_[5490362878017390612]": { + "$type": "EditorVisibilityComponent", + "Id": 5490362878017390612 + }, + "Component_[7468073145776592577]": { + "$type": "EditorEntitySortComponent", + "Id": 7468073145776592577, + "Child Entity Order": [ + "Entity_[2302906036425]" + ] + }, + "Component_[7692885660975737763]": { + "$type": "EditorPrefabComponent", + "Id": 7692885660975737763 + } + } + }, + "Entities": { + "Entity_[2302906036425]": { + "Id": "Entity_[2302906036425]", + "Name": "Entity1", + "Components": { + "Component_[11024839750215572075]": { + "$type": "SelectionComponent", + "Id": 11024839750215572075 + }, + "Component_[11384176886283708819]": { + "$type": "{27F1E1A1-8D9D-4C3B-BD3A-AFB9762449C0} TransformComponent", + "Id": 11384176886283708819, + "Parent Entity": "ContainerEntity" + }, + "Component_[1606410272595503925]": { + "$type": "EditorMaterialComponent", + "Id": 1606410272595503925, + "Controller": { + "Configuration": { + "materials": [ + { + "Key": { + "materialSlotStableId": 2418540911 + }, + "Value": { + "MaterialAsset": { + "assetId": { + "guid": "{E66E4343-F45A-536D-AAE1-C4D096420640}" + }, + "assetHint": "materials/presets/pbr/metal_nickel_polished.azmaterial" + } + } + } + ] + } + } + }, + "Component_[16470114336751653654]": { + "$type": "EditorInspectorComponent", + "Id": 16470114336751653654, + "ComponentOrderEntryArray": [ + { + "ComponentId": 11384176886283708819 + }, + { + "ComponentId": 89717634602996901, + "SortIndex": 1 + }, + { + "ComponentId": 1606410272595503925, + "SortIndex": 2 + } + ] + }, + "Component_[4303036201889516060]": { + "$type": "EditorLockComponent", + "Id": 4303036201889516060 + }, + "Component_[44336138790150350]": { + "$type": "EditorEntitySortComponent", + "Id": 44336138790150350 + }, + "Component_[4558973254917759795]": { + "$type": "EditorDisabledCompositionComponent", + "Id": 4558973254917759795 + }, + "Component_[4674030476408790307]": { + "$type": "EditorPendingCompositionComponent", + "Id": 4674030476408790307 + }, + "Component_[4802851695039968062]": { + "$type": "EditorVisibilityComponent", + "Id": 4802851695039968062 + }, + "Component_[5821006029055754615]": { + "$type": "EditorOnlyEntityComponent", + "Id": 5821006029055754615 + }, + "Component_[8587156575497792590]": { + "$type": "EditorEntityIconComponent", + "Id": 8587156575497792590 + }, + "Component_[89717634602996901]": { + "$type": "AZ::Render::EditorMeshComponent", + "Id": 89717634602996901, + "Controller": { + "Configuration": { + "ModelAsset": { + "assetId": { + "guid": "{E14975EF-E676-51A4-B826-3EF59CB645AA}", + "subId": 285127096 + }, + "assetHint": "testdata/objects/cube/cube.azmodel" + } + } + } + } + } + } + } +} \ No newline at end of file diff --git a/AutomatedTesting/Prefabs/TestData/Graphics/CubePalladiumPolishedPBR.prefab b/AutomatedTesting/Prefabs/TestData/Graphics/CubePalladiumPolishedPBR.prefab new file mode 100644 index 0000000000..ace44a3d34 --- /dev/null +++ b/AutomatedTesting/Prefabs/TestData/Graphics/CubePalladiumPolishedPBR.prefab @@ -0,0 +1,156 @@ +{ + "ContainerEntity": { + "Id": "ContainerEntity", + "Name": "CubePalladiumPolishedPBR", + "Components": { + "Component_[10678536274818457672]": { + "$type": "EditorInspectorComponent", + "Id": 10678536274818457672 + }, + "Component_[12041428694628704247]": { + "$type": "EditorPendingCompositionComponent", + "Id": 12041428694628704247 + }, + "Component_[12143022343588526078]": { + "$type": "EditorDisabledCompositionComponent", + "Id": 12143022343588526078 + }, + "Component_[15178316190409605112]": { + "$type": "EditorVisibilityComponent", + "Id": 15178316190409605112 + }, + "Component_[16012620721047170064]": { + "$type": "{27F1E1A1-8D9D-4C3B-BD3A-AFB9762449C0} TransformComponent", + "Id": 16012620721047170064, + "Parent Entity": "" + }, + "Component_[1646888921009876369]": { + "$type": "EditorPrefabComponent", + "Id": 1646888921009876369 + }, + "Component_[17677550467282239311]": { + "$type": "EditorEntitySortComponent", + "Id": 17677550467282239311, + "Child Entity Order": [ + "Entity_[2552014139593]" + ] + }, + "Component_[4972639499125068141]": { + "$type": "EditorLockComponent", + "Id": 4972639499125068141 + }, + "Component_[5526570610744382545]": { + "$type": "SelectionComponent", + "Id": 5526570610744382545 + }, + "Component_[6509459924043770606]": { + "$type": "EditorOnlyEntityComponent", + "Id": 6509459924043770606 + }, + "Component_[7268409859686144269]": { + "$type": "EditorEntityIconComponent", + "Id": 7268409859686144269 + } + } + }, + "Entities": { + "Entity_[2552014139593]": { + "Id": "Entity_[2552014139593]", + "Name": "Entity1", + "Components": { + "Component_[11024839750215572075]": { + "$type": "SelectionComponent", + "Id": 11024839750215572075 + }, + "Component_[11384176886283708819]": { + "$type": "{27F1E1A1-8D9D-4C3B-BD3A-AFB9762449C0} TransformComponent", + "Id": 11384176886283708819, + "Parent Entity": "ContainerEntity" + }, + "Component_[1606410272595503925]": { + "$type": "EditorMaterialComponent", + "Id": 1606410272595503925, + "Controller": { + "Configuration": { + "materials": [ + { + "Key": { + "materialSlotStableId": 2418540911 + }, + "Value": { + "MaterialAsset": { + "assetId": { + "guid": "{D0E9960A-4B31-5136-BAC6-5482B203D3B4}" + }, + "assetHint": "materials/presets/pbr/metal_palladium_polished.azmaterial" + } + } + } + ] + } + } + }, + "Component_[16470114336751653654]": { + "$type": "EditorInspectorComponent", + "Id": 16470114336751653654, + "ComponentOrderEntryArray": [ + { + "ComponentId": 11384176886283708819 + }, + { + "ComponentId": 89717634602996901, + "SortIndex": 1 + }, + { + "ComponentId": 1606410272595503925, + "SortIndex": 2 + } + ] + }, + "Component_[4303036201889516060]": { + "$type": "EditorLockComponent", + "Id": 4303036201889516060 + }, + "Component_[44336138790150350]": { + "$type": "EditorEntitySortComponent", + "Id": 44336138790150350 + }, + "Component_[4558973254917759795]": { + "$type": "EditorDisabledCompositionComponent", + "Id": 4558973254917759795 + }, + "Component_[4674030476408790307]": { + "$type": "EditorPendingCompositionComponent", + "Id": 4674030476408790307 + }, + "Component_[4802851695039968062]": { + "$type": "EditorVisibilityComponent", + "Id": 4802851695039968062 + }, + "Component_[5821006029055754615]": { + "$type": "EditorOnlyEntityComponent", + "Id": 5821006029055754615 + }, + "Component_[8587156575497792590]": { + "$type": "EditorEntityIconComponent", + "Id": 8587156575497792590 + }, + "Component_[89717634602996901]": { + "$type": "AZ::Render::EditorMeshComponent", + "Id": 89717634602996901, + "Controller": { + "Configuration": { + "ModelAsset": { + "assetId": { + "guid": "{E14975EF-E676-51A4-B826-3EF59CB645AA}", + "subId": 285127096 + }, + "assetHint": "testdata/objects/cube/cube.azmodel" + } + } + } + } + } + } + } +} \ No newline at end of file diff --git a/AutomatedTesting/Prefabs/TestData/Graphics/CubePlatinumPolishedPBR.prefab b/AutomatedTesting/Prefabs/TestData/Graphics/CubePlatinumPolishedPBR.prefab new file mode 100644 index 0000000000..79bc443342 --- /dev/null +++ b/AutomatedTesting/Prefabs/TestData/Graphics/CubePlatinumPolishedPBR.prefab @@ -0,0 +1,156 @@ +{ + "ContainerEntity": { + "Id": "ContainerEntity", + "Name": "CubePlatinumPolishedPBR", + "Components": { + "Component_[12172311178585433096]": { + "$type": "EditorEntityIconComponent", + "Id": 12172311178585433096 + }, + "Component_[14133734575774270778]": { + "$type": "EditorDisabledCompositionComponent", + "Id": 14133734575774270778 + }, + "Component_[1499102502234135899]": { + "$type": "{27F1E1A1-8D9D-4C3B-BD3A-AFB9762449C0} TransformComponent", + "Id": 1499102502234135899, + "Parent Entity": "" + }, + "Component_[17753826932279572795]": { + "$type": "EditorOnlyEntityComponent", + "Id": 17753826932279572795 + }, + "Component_[3472150728361446089]": { + "$type": "EditorPrefabComponent", + "Id": 3472150728361446089 + }, + "Component_[5413614787652013946]": { + "$type": "EditorLockComponent", + "Id": 5413614787652013946 + }, + "Component_[6608132617418028580]": { + "$type": "EditorEntitySortComponent", + "Id": 6608132617418028580, + "Child Entity Order": [ + "Entity_[2818302111945]" + ] + }, + "Component_[6809102061425149362]": { + "$type": "EditorInspectorComponent", + "Id": 6809102061425149362 + }, + "Component_[6916818921856882722]": { + "$type": "EditorPendingCompositionComponent", + "Id": 6916818921856882722 + }, + "Component_[7486700682637381880]": { + "$type": "SelectionComponent", + "Id": 7486700682637381880 + }, + "Component_[7993011597330638847]": { + "$type": "EditorVisibilityComponent", + "Id": 7993011597330638847 + } + } + }, + "Entities": { + "Entity_[2818302111945]": { + "Id": "Entity_[2818302111945]", + "Name": "Entity1", + "Components": { + "Component_[11024839750215572075]": { + "$type": "SelectionComponent", + "Id": 11024839750215572075 + }, + "Component_[11384176886283708819]": { + "$type": "{27F1E1A1-8D9D-4C3B-BD3A-AFB9762449C0} TransformComponent", + "Id": 11384176886283708819, + "Parent Entity": "ContainerEntity" + }, + "Component_[1606410272595503925]": { + "$type": "EditorMaterialComponent", + "Id": 1606410272595503925, + "Controller": { + "Configuration": { + "materials": [ + { + "Key": { + "materialSlotStableId": 2418540911 + }, + "Value": { + "MaterialAsset": { + "assetId": { + "guid": "{79419183-FFCE-5A89-AA16-C2789D81AF75}" + }, + "assetHint": "materials/presets/pbr/metal_platinum_polished.azmaterial" + } + } + } + ] + } + } + }, + "Component_[16470114336751653654]": { + "$type": "EditorInspectorComponent", + "Id": 16470114336751653654, + "ComponentOrderEntryArray": [ + { + "ComponentId": 11384176886283708819 + }, + { + "ComponentId": 89717634602996901, + "SortIndex": 1 + }, + { + "ComponentId": 1606410272595503925, + "SortIndex": 2 + } + ] + }, + "Component_[4303036201889516060]": { + "$type": "EditorLockComponent", + "Id": 4303036201889516060 + }, + "Component_[44336138790150350]": { + "$type": "EditorEntitySortComponent", + "Id": 44336138790150350 + }, + "Component_[4558973254917759795]": { + "$type": "EditorDisabledCompositionComponent", + "Id": 4558973254917759795 + }, + "Component_[4674030476408790307]": { + "$type": "EditorPendingCompositionComponent", + "Id": 4674030476408790307 + }, + "Component_[4802851695039968062]": { + "$type": "EditorVisibilityComponent", + "Id": 4802851695039968062 + }, + "Component_[5821006029055754615]": { + "$type": "EditorOnlyEntityComponent", + "Id": 5821006029055754615 + }, + "Component_[8587156575497792590]": { + "$type": "EditorEntityIconComponent", + "Id": 8587156575497792590 + }, + "Component_[89717634602996901]": { + "$type": "AZ::Render::EditorMeshComponent", + "Id": 89717634602996901, + "Controller": { + "Configuration": { + "ModelAsset": { + "assetId": { + "guid": "{E14975EF-E676-51A4-B826-3EF59CB645AA}", + "subId": 285127096 + }, + "assetHint": "testdata/objects/cube/cube.azmodel" + } + } + } + } + } + } + } +} \ No newline at end of file diff --git a/AutomatedTesting/Prefabs/TestData/Graphics/CubeSilverPolishedPBR.prefab b/AutomatedTesting/Prefabs/TestData/Graphics/CubeSilverPolishedPBR.prefab new file mode 100644 index 0000000000..74a166e09c --- /dev/null +++ b/AutomatedTesting/Prefabs/TestData/Graphics/CubeSilverPolishedPBR.prefab @@ -0,0 +1,156 @@ +{ + "ContainerEntity": { + "Id": "ContainerEntity", + "Name": "CubeSilverPolishedPBR", + "Components": { + "Component_[10846467226799581471]": { + "$type": "EditorPrefabComponent", + "Id": 10846467226799581471 + }, + "Component_[11321068769303258722]": { + "$type": "SelectionComponent", + "Id": 11321068769303258722 + }, + "Component_[14255141886015898000]": { + "$type": "EditorDisabledCompositionComponent", + "Id": 14255141886015898000 + }, + "Component_[14442599743555977836]": { + "$type": "EditorLockComponent", + "Id": 14442599743555977836 + }, + "Component_[15390328167304917483]": { + "$type": "EditorOnlyEntityComponent", + "Id": 15390328167304917483 + }, + "Component_[16667892946203958068]": { + "$type": "EditorInspectorComponent", + "Id": 16667892946203958068 + }, + "Component_[17957849336986334052]": { + "$type": "EditorPendingCompositionComponent", + "Id": 17957849336986334052 + }, + "Component_[18049054501916401618]": { + "$type": "{27F1E1A1-8D9D-4C3B-BD3A-AFB9762449C0} TransformComponent", + "Id": 18049054501916401618, + "Parent Entity": "" + }, + "Component_[362051120594559781]": { + "$type": "EditorVisibilityComponent", + "Id": 362051120594559781 + }, + "Component_[5852346937789040993]": { + "$type": "EditorEntitySortComponent", + "Id": 5852346937789040993, + "Child Entity Order": [ + "Entity_[3101769953481]" + ] + }, + "Component_[7250311833503679341]": { + "$type": "EditorEntityIconComponent", + "Id": 7250311833503679341 + } + } + }, + "Entities": { + "Entity_[3101769953481]": { + "Id": "Entity_[3101769953481]", + "Name": "Entity1", + "Components": { + "Component_[11024839750215572075]": { + "$type": "SelectionComponent", + "Id": 11024839750215572075 + }, + "Component_[11384176886283708819]": { + "$type": "{27F1E1A1-8D9D-4C3B-BD3A-AFB9762449C0} TransformComponent", + "Id": 11384176886283708819, + "Parent Entity": "ContainerEntity" + }, + "Component_[1606410272595503925]": { + "$type": "EditorMaterialComponent", + "Id": 1606410272595503925, + "Controller": { + "Configuration": { + "materials": [ + { + "Key": { + "materialSlotStableId": 2418540911 + }, + "Value": { + "MaterialAsset": { + "assetId": { + "guid": "{2AC06FA3-7670-542E-8996-DF346AFF1B61}" + }, + "assetHint": "materials/presets/pbr/metal_silver_polished.azmaterial" + } + } + } + ] + } + } + }, + "Component_[16470114336751653654]": { + "$type": "EditorInspectorComponent", + "Id": 16470114336751653654, + "ComponentOrderEntryArray": [ + { + "ComponentId": 11384176886283708819 + }, + { + "ComponentId": 89717634602996901, + "SortIndex": 1 + }, + { + "ComponentId": 1606410272595503925, + "SortIndex": 2 + } + ] + }, + "Component_[4303036201889516060]": { + "$type": "EditorLockComponent", + "Id": 4303036201889516060 + }, + "Component_[44336138790150350]": { + "$type": "EditorEntitySortComponent", + "Id": 44336138790150350 + }, + "Component_[4558973254917759795]": { + "$type": "EditorDisabledCompositionComponent", + "Id": 4558973254917759795 + }, + "Component_[4674030476408790307]": { + "$type": "EditorPendingCompositionComponent", + "Id": 4674030476408790307 + }, + "Component_[4802851695039968062]": { + "$type": "EditorVisibilityComponent", + "Id": 4802851695039968062 + }, + "Component_[5821006029055754615]": { + "$type": "EditorOnlyEntityComponent", + "Id": 5821006029055754615 + }, + "Component_[8587156575497792590]": { + "$type": "EditorEntityIconComponent", + "Id": 8587156575497792590 + }, + "Component_[89717634602996901]": { + "$type": "AZ::Render::EditorMeshComponent", + "Id": 89717634602996901, + "Controller": { + "Configuration": { + "ModelAsset": { + "assetId": { + "guid": "{E14975EF-E676-51A4-B826-3EF59CB645AA}", + "subId": 285127096 + }, + "assetHint": "testdata/objects/cube/cube.azmodel" + } + } + } + } + } + } + } +} \ No newline at end of file diff --git a/AutomatedTesting/Prefabs/TestData/Graphics/CubeTitaniumPolishedPBR.prefab b/AutomatedTesting/Prefabs/TestData/Graphics/CubeTitaniumPolishedPBR.prefab new file mode 100644 index 0000000000..c732fee593 --- /dev/null +++ b/AutomatedTesting/Prefabs/TestData/Graphics/CubeTitaniumPolishedPBR.prefab @@ -0,0 +1,156 @@ +{ + "ContainerEntity": { + "Id": "ContainerEntity", + "Name": "CubeTitaniumPolishedPBR", + "Components": { + "Component_[11835136016071721229]": { + "$type": "EditorInspectorComponent", + "Id": 11835136016071721229 + }, + "Component_[14924371629431224666]": { + "$type": "{27F1E1A1-8D9D-4C3B-BD3A-AFB9762449C0} TransformComponent", + "Id": 14924371629431224666, + "Parent Entity": "" + }, + "Component_[15534521734777674027]": { + "$type": "EditorPrefabComponent", + "Id": 15534521734777674027 + }, + "Component_[16612248066971579226]": { + "$type": "SelectionComponent", + "Id": 16612248066971579226 + }, + "Component_[16806731875899878085]": { + "$type": "EditorLockComponent", + "Id": 16806731875899878085 + }, + "Component_[3294763415970396682]": { + "$type": "EditorOnlyEntityComponent", + "Id": 3294763415970396682 + }, + "Component_[3871617444656658973]": { + "$type": "EditorEntitySortComponent", + "Id": 3871617444656658973, + "Child Entity Order": [ + "Entity_[3406712631497]" + ] + }, + "Component_[6604961087017250006]": { + "$type": "EditorEntityIconComponent", + "Id": 6604961087017250006 + }, + "Component_[6721284225512452216]": { + "$type": "EditorDisabledCompositionComponent", + "Id": 6721284225512452216 + }, + "Component_[8673188027501037544]": { + "$type": "EditorPendingCompositionComponent", + "Id": 8673188027501037544 + }, + "Component_[9993323762911548658]": { + "$type": "EditorVisibilityComponent", + "Id": 9993323762911548658 + } + } + }, + "Entities": { + "Entity_[3406712631497]": { + "Id": "Entity_[3406712631497]", + "Name": "Entity1", + "Components": { + "Component_[11024839750215572075]": { + "$type": "SelectionComponent", + "Id": 11024839750215572075 + }, + "Component_[11384176886283708819]": { + "$type": "{27F1E1A1-8D9D-4C3B-BD3A-AFB9762449C0} TransformComponent", + "Id": 11384176886283708819, + "Parent Entity": "ContainerEntity" + }, + "Component_[1606410272595503925]": { + "$type": "EditorMaterialComponent", + "Id": 1606410272595503925, + "Controller": { + "Configuration": { + "materials": [ + { + "Key": { + "materialSlotStableId": 2418540911 + }, + "Value": { + "MaterialAsset": { + "assetId": { + "guid": "{3F0DF0C4-5F23-5EB1-B762-7344AFFDC011}" + }, + "assetHint": "materials/presets/pbr/metal_titanium_polished.azmaterial" + } + } + } + ] + } + } + }, + "Component_[16470114336751653654]": { + "$type": "EditorInspectorComponent", + "Id": 16470114336751653654, + "ComponentOrderEntryArray": [ + { + "ComponentId": 11384176886283708819 + }, + { + "ComponentId": 89717634602996901, + "SortIndex": 1 + }, + { + "ComponentId": 1606410272595503925, + "SortIndex": 2 + } + ] + }, + "Component_[4303036201889516060]": { + "$type": "EditorLockComponent", + "Id": 4303036201889516060 + }, + "Component_[44336138790150350]": { + "$type": "EditorEntitySortComponent", + "Id": 44336138790150350 + }, + "Component_[4558973254917759795]": { + "$type": "EditorDisabledCompositionComponent", + "Id": 4558973254917759795 + }, + "Component_[4674030476408790307]": { + "$type": "EditorPendingCompositionComponent", + "Id": 4674030476408790307 + }, + "Component_[4802851695039968062]": { + "$type": "EditorVisibilityComponent", + "Id": 4802851695039968062 + }, + "Component_[5821006029055754615]": { + "$type": "EditorOnlyEntityComponent", + "Id": 5821006029055754615 + }, + "Component_[8587156575497792590]": { + "$type": "EditorEntityIconComponent", + "Id": 8587156575497792590 + }, + "Component_[89717634602996901]": { + "$type": "AZ::Render::EditorMeshComponent", + "Id": 89717634602996901, + "Controller": { + "Configuration": { + "ModelAsset": { + "assetId": { + "guid": "{E14975EF-E676-51A4-B826-3EF59CB645AA}", + "subId": 285127096 + }, + "assetHint": "testdata/objects/cube/cube.azmodel" + } + } + } + } + } + } + } +} \ No newline at end of file diff --git a/AutomatedTesting/ReflectionProbes/ReflectionProbe_Lion__CA20BB89-1587-4410-80BA-8150CB0EF47B__iblspecularcm512.dds b/AutomatedTesting/ReflectionProbes/ReflectionProbe_Lion__CA20BB89-1587-4410-80BA-8150CB0EF47B__iblspecularcm512.dds new file mode 100644 index 0000000000..86dea1906c --- /dev/null +++ b/AutomatedTesting/ReflectionProbes/ReflectionProbe_Lion__CA20BB89-1587-4410-80BA-8150CB0EF47B__iblspecularcm512.dds @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:d65e361a150417b56fa88ac2171bbef6512f526a15695fdc52a446a7f891c593 +size 50331796 diff --git a/AutomatedTesting/ReflectionProbes/ReflectionProbe_Scene__D245F488-152E-4A3A-898B-FBCF71E4A87A__iblspecularcm256.dds b/AutomatedTesting/ReflectionProbes/ReflectionProbe_Scene__D245F488-152E-4A3A-898B-FBCF71E4A87A__iblspecularcm256.dds new file mode 100644 index 0000000000..536270c531 --- /dev/null +++ b/AutomatedTesting/ReflectionProbes/ReflectionProbe_Scene__D245F488-152E-4A3A-898B-FBCF71E4A87A__iblspecularcm256.dds @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:8c3fbf2f491048ed05ff1ea15728afd2fbc059880d0e61efb8c557cf97ebaae4 +size 50331796 diff --git a/AutomatedTesting/ReflectionProbes/ReflectionProbe_UpperLevel__4DABA7BF-9367-4D95-AA5F-A9BF6BA0F7BE__iblspecularcm512.dds b/AutomatedTesting/ReflectionProbes/ReflectionProbe_UpperLevel__4DABA7BF-9367-4D95-AA5F-A9BF6BA0F7BE__iblspecularcm512.dds new file mode 100644 index 0000000000..bb00476697 --- /dev/null +++ b/AutomatedTesting/ReflectionProbes/ReflectionProbe_UpperLevel__4DABA7BF-9367-4D95-AA5F-A9BF6BA0F7BE__iblspecularcm512.dds @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:9f142022323102e4225afc2f9b44b6631683691d180fdf4586bce34f1fd13a76 +size 50331796 diff --git a/AutomatedTesting/Registry/editorpreferences.setreg b/AutomatedTesting/Registry/editorpreferences.setreg index b338d6acad..e76e04f9ba 100644 --- a/AutomatedTesting/Registry/editorpreferences.setreg +++ b/AutomatedTesting/Registry/editorpreferences.setreg @@ -1,7 +1,7 @@ { "Amazon": { "Preferences": { - "EnablePrefabSystem": false + "EnablePrefabSystem": true } } } \ No newline at end of file diff --git a/AutomatedTesting/TestAssets/RelativeProductPathsNotDependencies.txt b/AutomatedTesting/TestAssets/RelativeProductPathsNotDependencies.txt index d3975ced7c..8084defe84 100644 --- a/AutomatedTesting/TestAssets/RelativeProductPathsNotDependencies.txt +++ b/AutomatedTesting/TestAssets/RelativeProductPathsNotDependencies.txt @@ -2,24 +2,24 @@ These tests are mostly done with files that have a different extension between s The source scan is done first, and will catch files in the source path. Product path searching is resolved using "endsWith" logic. textures/_dev_purple.tif.streamingimage -Back slashes, and project name in the path -pc/textures/_dev_stucco.tif.streamingimage +Back slashes +textures\_dev_stucco.tif.streamingimage Double back slashes textures\\_dev_tan.tif.streamingimage Casing doesn't match TEXTURES/_DEV_WHITE.tif.streamingimage Some files have multiple extensions, this verifies that won't trip up the scanner. textures/_dev_yellow_light.tif.1002.imagemipchain -Path inline textures/milestone2/ama_grey_02.tif.streamingimage test +Path inline textures/_dev_woodland.tif.1002.imagemipchain test Path after=textures/_dev_woodland.tif.streamingimage equal sign Multiple paths on one line -Multiple materials/am_grass1.mtl paths materials/am_rockground.mtl on one line -Path before a UUID -Path materials/floor_tile.mtl before B92667DC-9F5B-5D72-A29D-99219DD9B691 a UUID -Path before an asset ID -Path ui/milestone2menu.uicanvas before an 2ef92b8D044E5C278E2BB1AC0374A4E7:1002 asset ID -Path after a UUID -Path after CEAA362B4E505BCEB827CB92EF40A50E a project.json UUID -Path after an asset ID -Path after {A2482826-053D-5634-A27B-084B1326AAE5}:[1002] an libs/particles/milestone2particles.xml asset ID +Multiple textures/_dev_yellow_light.tif.streamingimage paths textures/_dev_yellow_med.tif.1002.imagemipchain on one line +Path before a UUID for SelfReferenceUUID text file +Path textures/lights/flare01.tif.streamingimage before 33BCEE02-F322-5688-ABEE-534F6058593F a UUID +Path before an asset ID for _dev_red image +Path textures/test_texture_sequence/test_texture_sequence000.png.streamingimage before an 2ef92b8D044E5C278E2BB1AC0374A4E7:1002 asset ID +Path after a UUID for SelfReferenceAssetID text file +Path after 785A05D2-483E-5B43-A2B9-92ACDAE6E938 a textures/test_texture_sequence/test_texture_sequence001.png.streamingimage UUID +Path after an asset ID for _dev_purple image file +Path after {A2482826-053D-5634-A27B-084B1326AAE5}:[1002] an textures/_dev_purple_glass.tif.1002.imagemipchain asset ID diff --git a/AutomatedTesting/TestAssets/RelativeSourcePathsNotDependencies.txt b/AutomatedTesting/TestAssets/RelativeSourcePathsNotDependencies.txt index a5ae046b11..df3bcc896e 100644 --- a/AutomatedTesting/TestAssets/RelativeSourcePathsNotDependencies.txt +++ b/AutomatedTesting/TestAssets/RelativeSourcePathsNotDependencies.txt @@ -3,6 +3,6 @@ TestAssets/RelativeProductPathsNotDependencies.txt Back slashes TestAssets\WildcardScanTest1.txt Casing doesn't match -libs/particles/milestone2PARTICLES.XML -Path inline project.json test +TESTASSETS/ReportONEmISSINGdEPENDENCY.tXT +Path inline TestAssets/InvalidAssetIdNoReport.txt test Path after=textures/_dev_Purple.tif equal sign diff --git a/AutomatedTesting/TestAssets/ValidAssetIdNotDependency.txt b/AutomatedTesting/TestAssets/ValidAssetIdNotDependency.txt index 4cda459232..0b9df7c99d 100644 --- a/AutomatedTesting/TestAssets/ValidAssetIdNotDependency.txt +++ b/AutomatedTesting/TestAssets/ValidAssetIdNotDependency.txt @@ -1,5 +1,7 @@ +File extensions are separated from file names, so the missing dependency scanner doesn't find when scanning, and only finds the asset IDs in this file. + /textures /_dev_Purple . tif, the product ID is for one of the mips. {A2482826-053D-5634-A27B-084B1326AAE5}:[1002] _dev_Red . tif, another mip, different formatting. -2ef92b8D044E5C278E2BB1AC0374A4E7:1003 +2ef92b8D044E5C278E2BB1AC0374A4E7:1000 _dev_White.tif, {D83B36F1-61A6-5001-B191-4D0CE282E236}-1002 asset ID inline. diff --git a/AutomatedTesting/TestAssets/ValidUUIDsNotDependency.txt b/AutomatedTesting/TestAssets/ValidUUIDsNotDependency.txt index 436d6fb628..91c518ef2f 100644 --- a/AutomatedTesting/TestAssets/ValidUUIDsNotDependency.txt +++ b/AutomatedTesting/TestAssets/ValidUUIDsNotDependency.txt @@ -1,18 +1,19 @@ Paths are broken up to avoid having them show up as relative path results. +All references are to other text files in this folder, extensions are omitted to make sure only UUID scanning finds these references. -This is the UUID for Materials / Default / AM_UV_v1_1K_source . png -C67BEA9F-09FF-59AA-A7F0-A52B8F987508 -This is the UUID for libs / particles / milestone2particles . xml. This tests UUIDs without separators. -6BDE282B49C957F7B0714B26579BCA9A -This is the UUID for SelfReferenceUUID.txt. This tests UUIDs with mixed casing. +This is the UUID for InvalidAssetIdNoReport +E68A85B0-131D-5A82-B2D5-BC58EE4062AE +This is the UUID for InvalidRelativePathsNoReport. This tests UUIDs without separators. +B3EF12DD306C520EB0A8A6B0D031A195 +This is the UUID for SelfReferenceUUID. This tests UUIDs with mixed casing. 33bcee02F3225688ABEE534F6058593F -This is a UUID mid-line B076CDDC-14DF-50F4-A5E9-7518ABB3E851, for project . json +This is a UUID mid-line DD587FBE-16C8-5B98-AE3C-A9F8750B2692, for SelfReferencePath -Two UUIDs on the same line -Two UUIDs 345E5C660D6254FF8D0F7C8EE66A2249 mixed on A26C73D1837E5AE59E68F916FA7C3699 the same line +InvalidUUIDNoReport and MaxIteration31Deep +Two UUIDs 837412DF-D05F-576D-81AA-ACF360463749 mixed on 3F642A0FDC825696A70A1DA5709744DF the same line Test UUIDs and Asset IDs mixed on the same line. Relative paths are handled in the relative path tests. -UUID: slices / MuzzleFlash . slice, AssetID: TestsAssets / WildcardScanTest1 . txt -This 747D31D71E62553592226173C49CF97E uuid is on the line with 1CB10C43F3245B93A294C602ADEF95F9:[0] a valid asset ID -UUID: Objects / Lumbertank_turret . cgf, AssetID: TestsAssets / WildcardScanTest2 . txt -This D92C4661C8985E19BD3597CB2318CFA6:[0] uuid is on the line with 37108522F50459499CD6C8D47A960CF1 a valid asset ID +OnlyMatchesCorrectLengthUUIDs and WildcardScanTest1 +This 2545AD8B-1B9B-5F93-859D-D8DC1DC2B480 uuid is on the line with 1CB10C43F3245B93A294C602ADEF95F9:[0] a valid asset ID +RelativeProductPathsNotDependencies and WildcardScanTest2 +This B772953CA08A5D209491530E87D11504:[0] uuid is on the line with D92C4661C8985E19BD3597CB2318CFA6 a valid asset ID diff --git a/AutomatedTesting/TestAssets/test_chunks_builder.py b/AutomatedTesting/TestAssets/test_chunks_builder.py index 2fd1ad9db9..b18902a34c 100755 --- a/AutomatedTesting/TestAssets/test_chunks_builder.py +++ b/AutomatedTesting/TestAssets/test_chunks_builder.py @@ -28,7 +28,7 @@ def update_manifest(scene): meshGroup = sceneManifest.add_mesh_group(chunkName) meshGroup['id'] = '{' + str(uuid.uuid5(uuid.NAMESPACE_DNS, scene.sourceFilename + chunkName)) + '}' sceneManifest.mesh_group_add_comment(meshGroup, 'auto generated by test_chunks_builder') - sceneManifest.mesh_group_set_origin(meshGroup, None, 0, 0, 0, 1.0) + sceneManifest.mesh_group_add_advanced_coordinate_system(meshGroup) for meshIndex in range(len(chunkNameList)): if (activeMeshIndex == meshIndex): sceneManifest.mesh_group_select_node(meshGroup, chunkNameList[meshIndex]) diff --git a/AutomatedTesting/cmake/CompilerSettings.cmake b/AutomatedTesting/cmake/CompilerSettings.cmake new file mode 100644 index 0000000000..60bda1d45b --- /dev/null +++ b/AutomatedTesting/cmake/CompilerSettings.cmake @@ -0,0 +1,13 @@ +# +# Copyright (c) Contributors to the Open 3D Engine Project. +# For complete copyright and license terms please see the LICENSE at the root of this distribution. +# +# SPDX-License-Identifier: Apache-2.0 OR MIT +# +# + +# File to tweak compiler settings before compiler detection happens (before project() is called) +# We dont have PAL enabled at this point, so we can only use pure-CMake variables +if("${CMAKE_HOST_SYSTEM_NAME}" STREQUAL "Linux") + include(cmake/Platform/Linux/CompilerSettings_linux.cmake) +endif() diff --git a/AutomatedTesting/cmake/EngineFinder.cmake b/AutomatedTesting/cmake/EngineFinder.cmake new file mode 100644 index 0000000000..15b96eb8a9 --- /dev/null +++ b/AutomatedTesting/cmake/EngineFinder.cmake @@ -0,0 +1,92 @@ +# {BEGIN_LICENSE} +# +# Copyright (c) Contributors to the Open 3D Engine Project. +# For complete copyright and license terms please see the LICENSE at the root of this distribution. +# +# SPDX-License-Identifier: Apache-2.0 OR MIT +# +# +# {END_LICENSE} +# This file is copied during engine registration. Edits to this file will be lost next +# time a registration happens. + +include_guard() + +# Read the engine name from the project_json file +file(READ ${CMAKE_CURRENT_SOURCE_DIR}/project.json project_json) +set_property(DIRECTORY APPEND PROPERTY CMAKE_CONFIGURE_DEPENDS ${CMAKE_CURRENT_SOURCE_DIR}/project.json) + +string(JSON LY_ENGINE_NAME_TO_USE ERROR_VARIABLE json_error GET ${project_json} engine) +if(json_error) + message(FATAL_ERROR "Unable to read key 'engine' from 'project.json'\nError: ${json_error}") +endif() + +if(CMAKE_MODULE_PATH) + foreach(module_path ${CMAKE_MODULE_PATH}) + if(EXISTS ${module_path}/Findo3de.cmake) + file(READ ${module_path}/../engine.json engine_json) + string(JSON engine_name ERROR_VARIABLE json_error GET ${engine_json} engine_name) + if(json_error) + message(FATAL_ERROR "Unable to read key 'engine_name' from 'engine.json'\nError: ${json_error}") + endif() + if(LY_ENGINE_NAME_TO_USE STREQUAL engine_name) + return() # Engine being forced through CMAKE_MODULE_PATH + endif() + endif() + endforeach() +endif() + +if(DEFINED ENV{USERPROFILE} AND EXISTS $ENV{USERPROFILE}) + set(manifest_path $ENV{USERPROFILE}/.o3de/o3de_manifest.json) # Windows +else() + set(manifest_path $ENV{HOME}/.o3de/o3de_manifest.json) # Unix +endif() + +set(registration_error [=[ +Engine registration is required before configuring a project. +Run 'scripts/o3de register --this-engine' from the engine root. +]=]) + +# Read the ~/.o3de/o3de_manifest.json file and look through the 'engines_path' object. +# Find a key that matches LY_ENGINE_NAME_TO_USE and use that as the engine path. +if(EXISTS ${manifest_path}) + file(READ ${manifest_path} manifest_json) + set_property(DIRECTORY APPEND PROPERTY CMAKE_CONFIGURE_DEPENDS ${manifest_path}) + + string(JSON engines_path_count ERROR_VARIABLE json_error LENGTH ${manifest_json} engines_path) + if(json_error) + message(FATAL_ERROR "Unable to read key 'engines_path' from '${manifest_path}'\nError: ${json_error}\n${registration_error}") + endif() + + string(JSON engines_path_type ERROR_VARIABLE json_error TYPE ${manifest_json} engines_path) + if(json_error OR NOT ${engines_path_type} STREQUAL "OBJECT") + message(FATAL_ERROR "Type of 'engines_path' in '${manifest_path}' is not a JSON Object\nError: ${json_error}") + endif() + + math(EXPR engines_path_count "${engines_path_count}-1") + foreach(engine_path_index RANGE ${engines_path_count}) + string(JSON engine_name ERROR_VARIABLE json_error MEMBER ${manifest_json} engines_path ${engine_path_index}) + if(json_error) + message(FATAL_ERROR "Unable to read 'engines_path/${engine_path_index}' from '${manifest_path}'\nError: ${json_error}") + endif() + + if(LY_ENGINE_NAME_TO_USE STREQUAL engine_name) + string(JSON engine_path ERROR_VARIABLE json_error GET ${manifest_json} engines_path ${engine_name}) + if(json_error) + message(FATAL_ERROR "Unable to read value from 'engines_path/${engine_name}'\nError: ${json_error}") + endif() + + if(engine_path) + list(APPEND CMAKE_MODULE_PATH "${engine_path}/cmake") + return() + endif() + endif() + endforeach() + + message(FATAL_ERROR "The project.json uses engine name '${LY_ENGINE_NAME_TO_USE}' but no engine with that name has been registered.\n${registration_error}") +else() + # If the user is passing CMAKE_MODULE_PATH we assume thats where we will find the engine + if(NOT CMAKE_MODULE_PATH) + message(FATAL_ERROR "O3DE Manifest file not found.\n${registration_error}") + endif() +endif() diff --git a/AutomatedTesting/cmake/Platform/Linux/CompilerSettings_linux.cmake b/AutomatedTesting/cmake/Platform/Linux/CompilerSettings_linux.cmake new file mode 100644 index 0000000000..9bb629c53b --- /dev/null +++ b/AutomatedTesting/cmake/Platform/Linux/CompilerSettings_linux.cmake @@ -0,0 +1,34 @@ +# +# Copyright (c) Contributors to the Open 3D Engine Project. +# For complete copyright and license terms please see the LICENSE at the root of this distribution. +# +# SPDX-License-Identifier: Apache-2.0 OR MIT +# +# + +if(NOT CMAKE_C_COMPILER AND NOT CMAKE_CXX_COMPILER AND NOT "$ENV{CC}" AND NOT "$ENV{CXX}") + set(path_search + /bin + /usr/bin + /usr/local/bin + /sbin + /usr/sbin + /usr/local/sbin + ) + list(TRANSFORM path_search APPEND "/clang-[0-9]*") + file(GLOB clang_versions ${path_search}) + if(clang_versions) + # Find and pick the highest installed version + list(SORT clang_versions COMPARE NATURAL) + list(GET clang_versions 0 clang_higher_version_path) + string(REGEX MATCH "clang-([0-9.]*)" clang_higher_version ${clang_higher_version_path}) + if(CMAKE_MATCH_1) + set(CMAKE_C_COMPILER clang-${CMAKE_MATCH_1}) + set(CMAKE_CXX_COMPILER clang++-${CMAKE_MATCH_1}) + else() + message(FATAL_ERROR "Clang not found, please install clang") + endif() + else() + message(FATAL_ERROR "Clang not found, please install clang") + endif() +endif() diff --git a/AutomatedTesting/project.json b/AutomatedTesting/project.json index 5ee4ee68f8..fc14645d2b 100644 --- a/AutomatedTesting/project.json +++ b/AutomatedTesting/project.json @@ -7,8 +7,10 @@ "android_settings": { "package_name": "com.lumberyard.yourgame", "version_number": 1, - "version_name": "1.0.0.0", + "version_name": "1.0.0", "orientation": "landscape" }, - "engine": "o3de" -} \ No newline at end of file + "engine": "o3de", + "display_name": "AutomatedTesting", + "icon_path": "preview.png" +} diff --git a/CMakeLists.txt b/CMakeLists.txt index e659270f84..f61a9561e8 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -14,6 +14,7 @@ include(cmake/Version.cmake) include(cmake/OutputDirectory.cmake) if(NOT PROJECT_NAME) + include(cmake/CompilerSettings.cmake) project(O3DE LANGUAGES C CXX VERSION ${LY_VERSION_STRING} diff --git a/Code/Editor/2DViewport.cpp b/Code/Editor/2DViewport.cpp index ed810aea29..4d0609907f 100644 --- a/Code/Editor/2DViewport.cpp +++ b/Code/Editor/2DViewport.cpp @@ -234,7 +234,7 @@ void Q2DViewport::UpdateContent(int flags) } ////////////////////////////////////////////////////////////////////////// -void Q2DViewport::OnRButtonDown(Qt::KeyboardModifiers modifiers, const QPoint& point) +void Q2DViewport::OnRButtonDown([[maybe_unused]] Qt::KeyboardModifiers modifiers, const QPoint& point) { if (GetIEditor()->IsInGameMode()) { @@ -246,9 +246,6 @@ void Q2DViewport::OnRButtonDown(Qt::KeyboardModifiers modifiers, const QPoint& p setFocus(); } - // Check Edit Tool. - MouseCallback(eMouseRDown, point, modifiers); - SetCurrentCursor(STD_CURSOR_MOVE, QString()); // Save the mouse down position @@ -273,17 +270,8 @@ void Q2DViewport::OnRButtonUp([[maybe_unused]] Qt::KeyboardModifiers modifiers, } ////////////////////////////////////////////////////////////////////////// -void Q2DViewport::OnMButtonDown(Qt::KeyboardModifiers modifiers, const QPoint& point) +void Q2DViewport::OnMButtonDown([[maybe_unused]] Qt::KeyboardModifiers modifiers, const QPoint& point) { - //////////////////////////////////////////////////////////////////////// - // User pressed the middle mouse button - //////////////////////////////////////////////////////////////////////// - // Check Edit Tool. - if (MouseCallback(eMouseMDown, point, modifiers)) - { - return; - } - // Save the mouse down position m_RMouseDownPos = point; @@ -300,14 +288,8 @@ void Q2DViewport::OnMButtonDown(Qt::KeyboardModifiers modifiers, const QPoint& p } ////////////////////////////////////////////////////////////////////////// -void Q2DViewport::OnMButtonUp(Qt::KeyboardModifiers modifiers, const QPoint& point) +void Q2DViewport::OnMButtonUp([[maybe_unused]] Qt::KeyboardModifiers modifiers, [[maybe_unused]] const QPoint& point) { - // Check Edit Tool. - if (MouseCallback(eMouseMUp, point, modifiers)) - { - return; - } - SetViewMode(NothingMode); ReleaseMouse(); @@ -547,13 +529,6 @@ QPoint Q2DViewport::WorldToView(const Vec3& wp) const QPoint p = QPoint(static_cast(sp.x), static_cast(sp.y)); return p; } -////////////////////////////////////////////////////////////////////////// -QPoint Q2DViewport::WorldToViewParticleEditor(const Vec3& wp, [[maybe_unused]] int width, [[maybe_unused]] int height) const //Eric@conffx implement for the children class of IDisplayViewport -{ - Vec3 sp = m_screenTM.TransformPoint(wp); - QPoint p = QPoint(static_cast(sp.x), static_cast(sp.y)); - return p; -} ////////////////////////////////////////////////////////////////////////// Vec3 Q2DViewport::ViewToWorld(const QPoint& vp, [[maybe_unused]] bool* collideWithTerrain, [[maybe_unused]] bool onlyTerrain, [[maybe_unused]] bool bSkipVegetation, [[maybe_unused]] bool bTestRenderMesh, [[maybe_unused]] bool* collideWithObject) const diff --git a/Code/Editor/2DViewport.h b/Code/Editor/2DViewport.h index 007c1a47d3..e89f4aed34 100644 --- a/Code/Editor/2DViewport.h +++ b/Code/Editor/2DViewport.h @@ -50,8 +50,6 @@ public: //! Map world space position to viewport position. QPoint WorldToView(const Vec3& wp) const override; - QPoint WorldToViewParticleEditor(const Vec3& wp, int width, int height) const override; //Eric@conffx - //! Map viewport position to world space position. Vec3 ViewToWorld(const QPoint& vp, bool* collideWithTerrain = nullptr, bool onlyTerrain = false, bool bSkipVegetation = false, bool bTestRenderMesh = false, bool* collideWithObject = nullptr) const override; //! Map viewport position to world space ray from camera. @@ -64,7 +62,6 @@ public: // ovverided from CViewport. float GetScreenScaleFactor(const Vec3& worldPoint) const override; - float GetScreenScaleFactor([[maybe_unused]] const CCamera& camera, [[maybe_unused]] const Vec3& object_position) override { return 1; } //Eric@conffx // Overrided from CViewport. void OnDragSelectRectangle(const QRect &rect, bool bNormalizeRect = false) override; diff --git a/Code/Editor/AboutDialog.cpp b/Code/Editor/AboutDialog.cpp index c0fd39e1ae..ba086cad5d 100644 --- a/Code/Editor/AboutDialog.cpp +++ b/Code/Editor/AboutDialog.cpp @@ -30,8 +30,6 @@ CAboutDialog::CAboutDialog(QString versionText, QString richTextCopyrightNotice, m_ui->setupUi(this); setWindowFlags(windowFlags() & ~Qt::WindowContextHelpButtonHint); - connect(m_ui->m_transparentAgreement, &QLabel::linkActivated, this, &CAboutDialog::OnCustomerAgreement); - m_ui->m_transparentTrademarks->setText(versionText); m_ui->m_transparentAllRightReserved->setObjectName("copyrightNotice"); @@ -84,9 +82,4 @@ void CAboutDialog::mouseReleaseEvent(QMouseEvent* event) QDialog::mouseReleaseEvent(event); } -void CAboutDialog::OnCustomerAgreement() -{ - QDesktopServices::openUrl(QUrl(QStringLiteral("https://www.o3debinaries.org/license"))); -} - #include diff --git a/Code/Editor/AboutDialog.h b/Code/Editor/AboutDialog.h index db079a6ec7..279d7cd399 100644 --- a/Code/Editor/AboutDialog.h +++ b/Code/Editor/AboutDialog.h @@ -30,8 +30,6 @@ public: private: - void OnCustomerAgreement(); - void mouseReleaseEvent(QMouseEvent* event) override; void paintEvent(QPaintEvent* event) override; diff --git a/Code/Editor/AboutDialog.ui b/Code/Editor/AboutDialog.ui index a6c5bb5d52..a7433c620f 100644 --- a/Code/Editor/AboutDialog.ui +++ b/Code/Editor/AboutDialog.ui @@ -125,7 +125,7 @@ - General Availability + development Qt::AutoText @@ -181,14 +181,17 @@ - + - Terms of Use + <a href="https://www.o3debinaries.org/license">Terms of Use</a> + + + Qt::RichText Qt::AlignLeading|Qt::AlignLeft|Qt::AlignTop - + true @@ -274,11 +277,6 @@ QWidget
qsvgwidget.h
- - ClickableLabel - QLabel -
QtUI/ClickableLabel.h
-
diff --git a/Code/Editor/ActionManager.cpp b/Code/Editor/ActionManager.cpp index ff74a2c208..4cc64a532e 100644 --- a/Code/Editor/ActionManager.cpp +++ b/Code/Editor/ActionManager.cpp @@ -152,15 +152,6 @@ ActionManager::ActionWrapper& ActionManager::ActionWrapper::SetMenu(DynamicMenu* return *this; } -ActionManager::ActionWrapper& ActionManager::ActionWrapper::SetApplyHoverEffect() -{ - // Our standard toolbar icons, when hovered on, get a white color effect. - // But for this to work we need .pngs that look good with this effect, so this only works with the standard toolbars - // and looks very ugly for other toolbars, including toolbars loaded from XML (which just show a white rectangle) - m_action->setProperty("IconHasHoverEffect", true); - return *this; -} - ActionManager::ActionWrapper& ActionManager::ActionWrapper::SetReserved() { m_action->setProperty("Reserved", true); diff --git a/Code/Editor/ActionManager.h b/Code/Editor/ActionManager.h index 8879bdc1fb..58504f860c 100644 --- a/Code/Editor/ActionManager.h +++ b/Code/Editor/ActionManager.h @@ -151,7 +151,6 @@ public: } ActionWrapper& SetMenu(DynamicMenu* menu); - ActionWrapper& SetApplyHoverEffect(); operator QAction*() const { return m_action; diff --git a/Code/Editor/Animation/AnimationBipedBoneNames.cpp b/Code/Editor/Animation/AnimationBipedBoneNames.cpp deleted file mode 100644 index d9f1b845ca..0000000000 --- a/Code/Editor/Animation/AnimationBipedBoneNames.cpp +++ /dev/null @@ -1,33 +0,0 @@ -/* - * Copyright (c) Contributors to the Open 3D Engine Project. - * For complete copyright and license terms please see the LICENSE at the root of this distribution. - * - * SPDX-License-Identifier: Apache-2.0 OR MIT - * - */ - -#include "EditorDefs.h" - -#include "AnimationBipedBoneNames.h" - -namespace EditorAnimationBones -{ - namespace Biped - { - const char* Pelvis = "Bip01 Pelvis"; - const char* Head = "Bip01 Head"; - const char* Weapon = "weapon_bone"; - - const char* LeftEye = "eye_bone_left"; - const char* RightEye = "eye_bone_right"; - - const char* Spine[5] = { "Bip01 Spine", "Bip01 Spine1", "Bip01 Spine2", "Bip01 Spine3", "Bip01 Spine4" }; - const char* Neck[2] = { "Bip01 Neck", "Bip01 Neck1" }; - - const char* LeftHeel = "Bip01 L Heel"; - const char* LeftToe[2] = { "Bip01 L Toe0", "Bip01 L Toe1" }; - - const char* RightHeel = "Bip01 R Heel"; - const char* RightToe[2] = { "Bip01 R Toe0", "Bip01 R Toe1" }; - } -} diff --git a/Code/Editor/Animation/AnimationBipedBoneNames.h b/Code/Editor/Animation/AnimationBipedBoneNames.h deleted file mode 100644 index fdcfff7c82..0000000000 --- a/Code/Editor/Animation/AnimationBipedBoneNames.h +++ /dev/null @@ -1,34 +0,0 @@ -/* - * Copyright (c) Contributors to the Open 3D Engine Project. - * For complete copyright and license terms please see the LICENSE at the root of this distribution. - * - * SPDX-License-Identifier: Apache-2.0 OR MIT - * - */ -#ifndef CRYINCLUDE_EDITOR_ANIMATION_ANIMATIONBIPEDBONENAMES_H -#define CRYINCLUDE_EDITOR_ANIMATION_ANIMATIONBIPEDBONENAMES_H -#pragma once - -namespace EditorAnimationBones -{ - namespace Biped - { - extern const char* Pelvis; - extern const char* Head; - extern const char* Weapon; - - extern const char* Spine[5]; - extern const char* Neck[2]; - - extern const char* LeftEye; - extern const char* RightEye; - - extern const char* LeftHeel; - extern const char* RightHeel; - extern const char* LeftToe[2]; - extern const char* RightToe[2]; - } -} - - -#endif // CRYINCLUDE_EDITOR_ANIMATION_ANIMATIONBIPEDBONENAMES_H diff --git a/Code/Editor/AnimationContext.cpp b/Code/Editor/AnimationContext.cpp index fce1150878..51dd8deefc 100644 --- a/Code/Editor/AnimationContext.cpp +++ b/Code/Editor/AnimationContext.cpp @@ -21,6 +21,8 @@ #include "Include/IObjectManager.h" #include "Objects/EntityObject.h" +#include + ////////////////////////////////////////////////////////////////////////// // Movie Callback. ////////////////////////////////////////////////////////////////////////// @@ -499,25 +501,24 @@ void CAnimationContext::Update() return; } - ITimer* pTimer = GetIEditor()->GetSystem()->GetITimer(); + const AZ::TimeUs frameDeltaTimeUs = AZ::GetSimulationTickDeltaTimeUs(); + const float frameDeltaTime = AZ::TimeUsToSeconds(frameDeltaTimeUs); if (!m_bAutoRecording) { AnimateActiveSequence(); - float dt = pTimer->GetFrameTime(); - m_currTime += dt * m_fTimeScale; + m_currTime += frameDeltaTime * m_fTimeScale; if (!m_recording) { - GetIEditor()->GetMovieSystem()->PreUpdate(dt); - GetIEditor()->GetMovieSystem()->PostUpdate(dt); + GetIEditor()->GetMovieSystem()->PreUpdate(frameDeltaTime); + GetIEditor()->GetMovieSystem()->PostUpdate(frameDeltaTime); } } else { - float dt = pTimer->GetFrameTime(); - m_fRecordingCurrTime += dt * m_fTimeScale; + m_fRecordingCurrTime += frameDeltaTime * m_fTimeScale; if (fabs(m_fRecordingCurrTime - m_currTime) > m_fRecordingTimeStep) { m_currTime += m_fRecordingTimeStep; @@ -644,7 +645,9 @@ void CAnimationContext::OnPostRender() { SAnimContext ac; ac.dt = 0; - ac.fps = GetIEditor()->GetSystem()->GetITimer()->GetFrameRate(); + const AZ::TimeUs frameDeltaTimeUs = AZ::GetSimulationTickDeltaTimeUs(); + const float frameDeltaTime = AZ::TimeUsToSeconds(frameDeltaTimeUs); + ac.fps = 1.0f / frameDeltaTime; ac.time = m_currTime; ac.singleFrame = true; ac.forcePlay = true; @@ -797,7 +800,9 @@ void CAnimationContext::AnimateActiveSequence() SAnimContext ac; ac.dt = 0; - ac.fps = GetIEditor()->GetSystem()->GetITimer()->GetFrameRate(); + const AZ::TimeUs frameDeltaTimeUs = AZ::GetSimulationTickDeltaTimeUs(); + const float frameDeltaTime = AZ::TimeUsToSeconds(frameDeltaTimeUs); + ac.fps = 1.0f / frameDeltaTime; ac.time = m_currTime; ac.singleFrame = true; ac.forcePlay = true; diff --git a/Code/Editor/AssetImporter/AssetImporterManager/AssetImporterManager.cpp b/Code/Editor/AssetImporter/AssetImporterManager/AssetImporterManager.cpp index b721b8759e..baa287e47f 100644 --- a/Code/Editor/AssetImporter/AssetImporterManager/AssetImporterManager.cpp +++ b/Code/Editor/AssetImporter/AssetImporterManager/AssetImporterManager.cpp @@ -140,7 +140,7 @@ bool AssetImporterManager::OnBrowseFiles() bool encounteredCrate = false; QStringList invalidFiles; - for (QString path : fileDialog.selectedFiles()) + for (const QString& path : fileDialog.selectedFiles()) { QString fileName = GetFileName(path); QFileInfo info(path); diff --git a/Code/Editor/AzAssetBrowser/AzAssetBrowserRequestHandler.cpp b/Code/Editor/AzAssetBrowser/AzAssetBrowserRequestHandler.cpp index 1c2be16a3d..6fc10e379a 100644 --- a/Code/Editor/AzAssetBrowser/AzAssetBrowserRequestHandler.cpp +++ b/Code/Editor/AzAssetBrowser/AzAssetBrowserRequestHandler.cpp @@ -199,41 +199,6 @@ namespace AzAssetBrowserRequestHandlerPrivate } } } - - // Helper utility - determines if the thing being dragged is a FBX from the scene import pipeline - // This is important to differentiate. - // when someone drags a MTL file directly into the viewport, even from a FBX, we want to spawn it as a decal - // but when someone drags a FBX that contains MTL files, we want only to spawn the meshes. - // so we have to specifically differentiate here between the mimeData type that contains the source as the root - // (dragging the fbx file itself) - // and one which contains the actual product at its root. - - bool IsDragOfFBX(const QMimeData* mimeData) - { - AZStd::vector entries; - if (!AssetBrowserEntry::FromMimeData(mimeData, entries)) - { - // if mimedata does not even contain entries, no point in proceeding. - return false; - } - - for (auto entry : entries) - { - if (entry->GetEntryType() != AssetBrowserEntry::AssetEntryType::Source) - { - continue; - } - // this is a source file. Is it the filetype we're looking for? - if (SourceAssetBrowserEntry* source = azrtti_cast(entry)) - { - if (AzFramework::StringFunc::Equal(source->GetExtension().c_str(), ".fbx", false)) - { - return true; - } - } - } - return false; - } } AzAssetBrowserRequestHandler::AzAssetBrowserRequestHandler() diff --git a/Code/Editor/BaseLibrary.cpp b/Code/Editor/BaseLibrary.cpp deleted file mode 100644 index 9f26630c2c..0000000000 --- a/Code/Editor/BaseLibrary.cpp +++ /dev/null @@ -1,292 +0,0 @@ -/* - * Copyright (c) Contributors to the Open 3D Engine Project. - * For complete copyright and license terms please see the LICENSE at the root of this distribution. - * - * SPDX-License-Identifier: Apache-2.0 OR MIT - * - */ - - -#include "EditorDefs.h" - -#include "BaseLibrary.h" -#include "BaseLibraryItem.h" -#include "Include/IBaseLibraryManager.h" -#include -#include -#include "Undo/IUndoObject.h" - -////////////////////////////////////////////////////////////////////////// -// Undo functionality for libraries. -////////////////////////////////////////////////////////////////////////// - -class CUndoBaseLibrary - : public IUndoObject -{ -public: - CUndoBaseLibrary(CBaseLibrary* pLib, const QString& description, const QString& selectedItem = QString()) - : m_pLib(pLib) - , m_description(description) - , m_redo(nullptr) - , m_selectedItem(selectedItem) - { - assert(m_pLib); - - m_undo = GetIEditor()->GetSystem()->CreateXmlNode("Undo"); - m_pLib->Serialize(m_undo, false); - } - - QString GetEditorObjectName() override - { - return m_selectedItem; - } - -protected: - int GetSize() override { return sizeof(CUndoBaseLibrary); } - QString GetDescription() override { return m_description; }; - - void Undo(bool bUndo) override - { - if (bUndo) - { - m_redo = GetIEditor()->GetSystem()->CreateXmlNode("Redo"); - m_pLib->Serialize(m_redo, false); - } - m_pLib->Serialize(m_undo, true); - m_pLib->SetModified(); - GetIEditor()->Notify(eNotify_OnDataBaseUpdate); - } - - void Redo() override - { - m_pLib->Serialize(m_redo, true); - m_pLib->SetModified(); - GetIEditor()->Notify(eNotify_OnDataBaseUpdate); - } - -private: - QString m_description; - QString m_selectedItem; - _smart_ptr m_pLib; - XmlNodeRef m_undo; - XmlNodeRef m_redo; -}; - - - - -////////////////////////////////////////////////////////////////////////// -// CBaseLibrary implementation. -////////////////////////////////////////////////////////////////////////// -CBaseLibrary::CBaseLibrary(IBaseLibraryManager* pManager) - : m_pManager(pManager) - , m_bModified(false) - , m_bLevelLib(false) - , m_bNewLibrary(true) -{ -} - -////////////////////////////////////////////////////////////////////////// -CBaseLibrary::~CBaseLibrary() -{ - m_items.clear(); -} - -////////////////////////////////////////////////////////////////////////// -IBaseLibraryManager* CBaseLibrary::GetManager() -{ - return m_pManager; -} - -////////////////////////////////////////////////////////////////////////// -void CBaseLibrary::RemoveAllItems() -{ - AddRef(); - for (int i = 0; i < m_items.size(); i++) - { - // Unregister item in case it was registered. It is ok if it wasn't. This is still safe to call. - m_pManager->UnregisterItem(m_items[i]); - // Clear library item. - m_items[i]->m_library = nullptr; - } - m_items.clear(); - Release(); -} - -////////////////////////////////////////////////////////////////////////// -void CBaseLibrary::SetName(const QString& name) -{ - //the fullname of the items in the library will be changed due to library's name change - //so we need unregistered them and register them after their name changed. - for (int i = 0; i < m_items.size(); i++) - { - m_pManager->UnregisterItem(m_items[i]); - } - - m_name = name; - - for (int i = 0; i < m_items.size(); i++) - { - m_pManager->RegisterItem(m_items[i]); - } - - SetModified(); -} - -////////////////////////////////////////////////////////////////////////// -const QString& CBaseLibrary::GetName() const -{ - return m_name; -} - -////////////////////////////////////////////////////////////////////////// -bool CBaseLibrary::Save() -{ - return true; -} - -////////////////////////////////////////////////////////////////////////// -bool CBaseLibrary::Load(const QString& filename) -{ - m_filename = filename; - SetModified(false); - m_bNewLibrary = false; - return true; -} - -////////////////////////////////////////////////////////////////////////// -void CBaseLibrary::SetModified(bool bModified) -{ - if (bModified != m_bModified) - { - m_bModified = bModified; - emit Modified(bModified); - } -} - -////////////////////////////////////////////////////////////////////////// -void CBaseLibrary::AddItem(IDataBaseItem* item, bool bRegister) -{ - - CBaseLibraryItem* pLibItem = (CBaseLibraryItem*)item; - // Check if item is already assigned to this library. - if (pLibItem->m_library != this) - { - pLibItem->m_library = this; - m_items.push_back(pLibItem); - SetModified(); - if (bRegister) - { - m_pManager->RegisterItem(pLibItem); - } - } -} - -////////////////////////////////////////////////////////////////////////// -IDataBaseItem* CBaseLibrary::GetItem(int index) -{ - assert(index >= 0 && index < m_items.size()); - return m_items[index]; -} - -////////////////////////////////////////////////////////////////////////// -void CBaseLibrary::RemoveItem(IDataBaseItem* item) -{ - - for (int i = 0; i < m_items.size(); i++) - { - if (m_items[i] == item) - { - // Unregister item in case it was registered. It is ok if it wasn't. This is still safe to call. - m_pManager->UnregisterItem(m_items[i]); - m_items.erase(m_items.begin() + i); - SetModified(); - break; - } - } -} - -////////////////////////////////////////////////////////////////////////// -IDataBaseItem* CBaseLibrary::FindItem(const QString& name) -{ - for (int i = 0; i < m_items.size(); i++) - { - if (QString::compare(m_items[i]->GetName(), name, Qt::CaseInsensitive) == 0) - { - return m_items[i]; - } - } - return nullptr; -} - -bool CBaseLibrary::AddLibraryToSourceControl(const QString& fullPathName) const -{ - IEditor* pEditor = GetIEditor(); - IFileUtil* pFileUtil = pEditor ? pEditor->GetFileUtil() : nullptr; - if (pFileUtil) - { - return pFileUtil->CheckoutFile(fullPathName.toUtf8().data(), nullptr); - } - - return false; -} - -bool CBaseLibrary::SaveLibrary(const char* name, bool saveEmptyLibrary) -{ - assert(name != nullptr); - if (name == nullptr) - { - CryFatalError("The library you are attempting to save has no name specified."); - return false; - } - - QString fileName(GetFilename()); - if (fileName.isEmpty() && !saveEmptyLibrary) - { - return false; - } - - fileName = Path::GamePathToFullPath(fileName); - - XmlNodeRef root = GetIEditor()->GetSystem()->CreateXmlNode(name); - Serialize(root, false); - bool bRes = XmlHelpers::SaveXmlNode(GetIEditor()->GetFileUtil(), root, fileName.toUtf8().data()); - if (m_bNewLibrary) - { - AddLibraryToSourceControl(fileName); - m_bNewLibrary = false; - } - if (!bRes) - { - QByteArray filenameUtf8 = fileName.toUtf8(); - AZStd::string strMessage = AZStd::string::format("The file %s is read-only and the save of the library couldn't be performed. Try to remove the \"read-only\" flag or check-out the file and then try again.", filenameUtf8.data()); - CryMessageBox(strMessage.c_str(), "Saving Error", MB_OK | MB_ICONWARNING); - } - return bRes; -} - -//CONFETTI BEGIN -void CBaseLibrary::ChangeItemOrder(CBaseLibraryItem* item, unsigned int newLocation) -{ - std::vector<_smart_ptr > temp; - for (unsigned int i = 0; i < m_items.size(); i++) - { - if (i == newLocation) - { - temp.push_back(_smart_ptr(item)); - } - if (m_items[i] != item) - { - temp.push_back(m_items[i]); - } - } - // If newLocation is greater than the original size, append the item to end of the list - if (newLocation >= m_items.size()) - { - temp.push_back(_smart_ptr(item)); - } - m_items = temp; -} -//CONFETTI END - -#include diff --git a/Code/Editor/BaseLibrary.h b/Code/Editor/BaseLibrary.h deleted file mode 100644 index 55079d3fde..0000000000 --- a/Code/Editor/BaseLibrary.h +++ /dev/null @@ -1,129 +0,0 @@ -/* - * Copyright (c) Contributors to the Open 3D Engine Project. - * For complete copyright and license terms please see the LICENSE at the root of this distribution. - * - * SPDX-License-Identifier: Apache-2.0 OR MIT - * - */ - - -#ifndef CRYINCLUDE_EDITOR_BASELIBRARY_H -#define CRYINCLUDE_EDITOR_BASELIBRARY_H -#pragma once - -#if !defined(Q_MOC_RUN) -#include "Include/IDataBaseLibrary.h" -#include "Include/IBaseLibraryManager.h" -#include "Include/EditorCoreAPI.h" -#include "Util/TRefCountBase.h" - -#include -#endif - -// Ensure we don't try to dllimport when moc includes us -#if defined(Q_MOC_BUILD) && !defined(EDITOR_CORE) -#define EDITOR_CORE -#endif - -/** This a base class for all Libraries used by Editor. -*/ -class EDITOR_CORE_API CBaseLibrary - : public QObject - , public TRefCountBase -{ - Q_OBJECT - -public: - explicit CBaseLibrary(IBaseLibraryManager* pManager); - ~CBaseLibrary(); - - //! Set library name. - virtual void SetName(const QString& name); - //! Get library name. - const QString& GetName() const override; - - //! Set new filename for this library. - virtual bool SetFilename(const QString& filename, [[maybe_unused]] bool checkForUnique = true) { m_filename = filename.toLower(); return true; }; - const QString& GetFilename() const override { return m_filename; }; - - bool Save() override = 0; - bool Load(const QString& filename) override = 0; - void Serialize(XmlNodeRef& node, bool bLoading) override = 0; - - //! Mark library as modified. - void SetModified(bool bModified = true) override; - //! Check if library was modified. - bool IsModified() const override { return m_bModified; }; - - ////////////////////////////////////////////////////////////////////////// - // Working with items. - ////////////////////////////////////////////////////////////////////////// - //! Add a new prototype to library. - void AddItem(IDataBaseItem* item, bool bRegister = true) override; - //! Get number of known prototypes. - int GetItemCount() const override { return static_cast(m_items.size()); } - //! Get prototype by index. - IDataBaseItem* GetItem(int index) override; - - //! Delete item by pointer of item. - void RemoveItem(IDataBaseItem* item) override; - - //! Delete all items from library. - void RemoveAllItems() override; - - //! Find library item by name. - //! Using linear search. - IDataBaseItem* FindItem(const QString& name) override; - - //! Check if this library is local level library. - bool IsLevelLibrary() const override { return m_bLevelLib; }; - - //! Set library to be level library. - void SetLevelLibrary(bool bEnable) override { m_bLevelLib = bEnable; }; - - ////////////////////////////////////////////////////////////////////////// - //! Return manager for this library. - IBaseLibraryManager* GetManager() override; - - // Saves the library with the main tag defined by the parameter name - bool SaveLibrary(const char* name, bool saveEmptyLibrary = false); - - //CONFETTI BEGIN - // Used to change the library item order - void ChangeItemOrder(CBaseLibraryItem* item, unsigned int newLocation) override; - //CONFETTI END - -signals: - void Modified(bool bModified); - -private: - // Add the library to the source control - bool AddLibraryToSourceControl(const QString& fullPathName) const; - -protected: - - //! Name of the library. - QString m_name; - //! Filename of the library. - QString m_filename; - - //! Flag set when library was modified. - bool m_bModified; - - // Flag set when the library is just created and it's not yet saved for the first time. - bool m_bNewLibrary; - - //! Level library is saved within the level .ly file and is local for this level. - bool m_bLevelLib; - - ////////////////////////////////////////////////////////////////////////// - // Manager. - IBaseLibraryManager* m_pManager; - - AZ_PUSH_DISABLE_DLL_EXPORT_MEMBER_WARNING - // Array of all our library items. - std::vector<_smart_ptr > m_items; - AZ_POP_DISABLE_DLL_EXPORT_MEMBER_WARNING -}; - -#endif // CRYINCLUDE_EDITOR_BASELIBRARY_H diff --git a/Code/Editor/BaseLibraryItem.cpp b/Code/Editor/BaseLibraryItem.cpp deleted file mode 100644 index b1fba91fad..0000000000 --- a/Code/Editor/BaseLibraryItem.cpp +++ /dev/null @@ -1,273 +0,0 @@ -/* - * Copyright (c) Contributors to the Open 3D Engine Project. - * For complete copyright and license terms please see the LICENSE at the root of this distribution. - * - * SPDX-License-Identifier: Apache-2.0 OR MIT - * - */ - - -#include "EditorDefs.h" - -#include "BaseLibraryItem.h" -#include "BaseLibrary.h" -#include "BaseLibraryManager.h" -#include "Undo/IUndoObject.h" - -#include - -//undo object for multi-changes inside library item. such as set all variables to default values. -//For example: change particle emitter shape will lead to multiple variable changes -class CUndoBaseLibraryItem - : public IUndoObject -{ -public: - CUndoBaseLibraryItem(IBaseLibraryManager *libMgr, CBaseLibraryItem* libItem, bool ignoreChild) - : m_libMgr(libMgr) - { - assert(libItem); - assert(libMgr); - - m_itemPath = libItem->GetFullName(); - m_description = "Lib item changed: " + m_itemPath; - - //serialize the lib item to undo - m_undoCtx.node = GetIEditor()->GetSystem()->CreateXmlNode("Undo"); - m_undoCtx.bIgnoreChilds = ignoreChild; - m_undoCtx.bLoading = false; //saving - m_undoCtx.bUniqName = false; //don't generate new name - m_undoCtx.bCopyPaste = true; //so it won't override guid - m_undoCtx.bUndo = true; - libItem->Serialize(m_undoCtx); - - //evaluate size - XmlString xmlStr = m_undoCtx.node->getXML(); - m_size = sizeof(CUndoBaseLibraryItem); - m_size += static_cast(xmlStr.GetAllocatedMemory()); - m_size += m_itemPath.length(); - m_size += m_description.length(); - } - - QString GetEditorObjectName() override - { - return m_itemPath; - } - -protected: - int GetSize() override - { - return m_size; - } - - QString GetDescription() override - { - return m_description; - } - - void Undo(bool bUndo) override - { - //find the libItem - IDataBaseItem *libItem = m_libMgr->FindItemByName(m_itemPath); - if (libItem == nullptr) - { - //the undo stack is not reliable any more.. - assert(false); - return; - } - - //save for redo - if (bUndo) - { - m_redoCtx.node = GetIEditor()->GetSystem()->CreateXmlNode("Redo"); - m_redoCtx.bIgnoreChilds = m_undoCtx.bIgnoreChilds; - m_redoCtx.bLoading = false; //saving - m_redoCtx.bUniqName = false; - m_redoCtx.bCopyPaste = true; - m_redoCtx.bUndo = true; - libItem->Serialize(m_redoCtx); - - XmlString xmlStr = m_redoCtx.node->getXML(); - m_size += static_cast(xmlStr.GetAllocatedMemory()); - } - - //load previous saved data - m_undoCtx.bLoading = true; - libItem->Serialize(m_undoCtx); - } - - void Redo() override - { - //find the libItem - IDataBaseItem *libItem = m_libMgr->FindItemByName(m_itemPath); - if (libItem == nullptr || m_redoCtx.node == nullptr) - { - //the undo stack is not reliable any more.. - assert(false); - return; - } - - m_redoCtx.bLoading = true; - libItem->Serialize(m_redoCtx); - } - -private: - QString m_description; - QString m_itemPath; - IDataBaseItem::SerializeContext m_undoCtx; //saved before operation - IDataBaseItem::SerializeContext m_redoCtx; //saved after operation so used for redo - IBaseLibraryManager* m_libMgr; - int m_size; -}; - -////////////////////////////////////////////////////////////////////////// -// CBaseLibraryItem implementation. -////////////////////////////////////////////////////////////////////////// -CBaseLibraryItem::CBaseLibraryItem() -{ - m_library = nullptr; - GenerateId(); - m_bModified = false; -} - -CBaseLibraryItem::~CBaseLibraryItem() -{ -} - -////////////////////////////////////////////////////////////////////////// -QString CBaseLibraryItem::GetFullName() const -{ - QString name; - if (m_library) - { - name = m_library->GetName() + "."; - } - name += m_name; - return name; -} - -////////////////////////////////////////////////////////////////////////// -QString CBaseLibraryItem::GetGroupName() -{ - QString str = GetName(); - int p = str.lastIndexOf('.'); - if (p >= 0) - { - return str.mid(0, p); - } - return ""; -} - -////////////////////////////////////////////////////////////////////////// -QString CBaseLibraryItem::GetShortName() -{ - QString str = GetName(); - int p = str.lastIndexOf('.'); - if (p >= 0) - { - return str.mid(p + 1); - } - p = str.lastIndexOf('/'); - if (p >= 0) - { - return str.mid(p + 1); - } - return str; -} - -////////////////////////////////////////////////////////////////////////// -void CBaseLibraryItem::SetName(const QString& name) -{ - assert(m_library); - if (name == m_name) - { - return; - } - QString oldName = GetFullName(); - m_name = name; - ((CBaseLibraryManager*)m_library->GetManager())->OnRenameItem(this, oldName); -} - -////////////////////////////////////////////////////////////////////////// -const QString& CBaseLibraryItem::GetName() const -{ - return m_name; -} - -////////////////////////////////////////////////////////////////////////// -void CBaseLibraryItem::GenerateId() -{ - GUID guid = AZ::Uuid::CreateRandom(); - SetGUID(guid); -} - -////////////////////////////////////////////////////////////////////////// -void CBaseLibraryItem::SetGUID(REFGUID guid) -{ - if (m_library) - { - ((CBaseLibraryManager*)m_library->GetManager())->RegisterItem(this, guid); - } - m_guid = guid; -} - -////////////////////////////////////////////////////////////////////////// -void CBaseLibraryItem::Serialize(SerializeContext& ctx) -{ - assert(m_library); - - XmlNodeRef node = ctx.node; - if (ctx.bLoading) - { - QString name = m_name; - // Loading - node->getAttr("Name", name); - - if (!ctx.bUniqName) - { - SetName(name); - } - else - { - SetName(GetLibrary()->GetManager()->MakeUniqueItemName(name)); - } - - if (!ctx.bCopyPaste) - { - GUID guid; - if (node->getAttr("Id", guid)) - { - SetGUID(guid); - } - } - } - else - { - // Saving. - node->setAttr("Name", m_name.toUtf8().data()); - node->setAttr("Id", m_guid); - node->setAttr("Library", GetLibrary()->GetName().toUtf8().data()); - } - m_bModified = false; -} - -////////////////////////////////////////////////////////////////////////// -IDataBaseLibrary* CBaseLibraryItem::GetLibrary() const -{ - return m_library; -} - -////////////////////////////////////////////////////////////////////////// -void CBaseLibraryItem::SetLibrary(CBaseLibrary* pLibrary) -{ - m_library = pLibrary; -} - -//! Mark library as modified. -void CBaseLibraryItem::SetModified(bool bModified) -{ - m_bModified = bModified; - if (m_bModified && m_library != nullptr) - { - m_library->SetModified(bModified); - } -} diff --git a/Code/Editor/BaseLibraryItem.h b/Code/Editor/BaseLibraryItem.h deleted file mode 100644 index 53cf0add2b..0000000000 --- a/Code/Editor/BaseLibraryItem.h +++ /dev/null @@ -1,114 +0,0 @@ -/* - * Copyright (c) Contributors to the Open 3D Engine Project. - * For complete copyright and license terms please see the LICENSE at the root of this distribution. - * - * SPDX-License-Identifier: Apache-2.0 OR MIT - * - */ - - -#ifndef CRYINCLUDE_EDITOR_BASELIBRARYITEM_H -#define CRYINCLUDE_EDITOR_BASELIBRARYITEM_H -#pragma once - -#include "Include/IDataBaseItem.h" -#include "BaseLibrary.h" - -#include - -class CBaseLibrary; - -////////////////////////////////////////////////////////////////////////// -AZ_PUSH_DISABLE_DLL_EXPORT_BASECLASS_WARNING -/** Base class for all items contained in BaseLibraray. -*/ -class EDITOR_CORE_API CBaseLibraryItem - : public TRefCountBase -{ - AZ_POP_DISABLE_DLL_EXPORT_BASECLASS_WARNING -public: - CBaseLibraryItem(); - ~CBaseLibraryItem(); - - //! Set item name. - //! Its virtual, in case you want to override it in derrived item. - virtual void SetName(const QString& name); - //! Get item name. - const QString& GetName() const; - - //! Get full item name, including name of library. - //! Name formed by adding dot after name of library - //! eg. library Pickup and item PickupRL form full item name: "Pickups.PickupRL". - QString GetFullName() const; - - //! Get only nameof group from prototype. - QString GetGroupName(); - //! Get short name of prototype without group. - QString GetShortName(); - - //! Return Library this item are contained in. - //! Item can only be at one library. - IDataBaseLibrary* GetLibrary() const; - void SetLibrary(CBaseLibrary* pLibrary); - - ////////////////////////////////////////////////////////////////////////// - //! Serialize library item to archive. - virtual void Serialize(SerializeContext& ctx); - - ////////////////////////////////////////////////////////////////////////// - //! Generate new unique id for this item. - void GenerateId(); - //! Returns GUID of this material. - const GUID& GetGUID() const { return m_guid; } - - //! Mark library as modified. - void SetModified(bool bModified = true); - //! Check if library was modified. - bool IsModified() const { return m_bModified; }; - - //! Returns true if the item is registered, otherwise false - bool IsRegistered() const { return m_bRegistered; }; - - //! Validate item for errors. - virtual void Validate() {}; - - //! Get number of sub childs. - virtual int GetChildCount() const { return 0; } - //! Get sub child by index. - virtual CBaseLibraryItem* GetChild([[maybe_unused]] int index) const { return nullptr; } - - - ////////////////////////////////////////////////////////////////////////// - //! Gathers resources by this item. - virtual void GatherUsedResources([[maybe_unused]] CUsedResources& resources) {}; - - //! Get if stored item is enabled - virtual bool GetIsEnabled() { return true; }; - - - int IsParticleItem = -1; -protected: - void SetGUID(REFGUID guid); - friend class CBaseLibrary; - friend class CBaseLibraryManager; - // Name of this prototype. - QString m_name; - AZ_PUSH_DISABLE_DLL_EXPORT_MEMBER_WARNING - //! Reference to prototype library who contains this prototype. - _smart_ptr m_library; - AZ_POP_DISABLE_DLL_EXPORT_MEMBER_WARNING - - //! Every base library item have unique id. - GUID m_guid; - // True when item modified by editor. - bool m_bModified; - // True when item registered in manager. - bool m_bRegistered = false; -}; - -Q_DECLARE_METATYPE(CBaseLibraryItem*); - -TYPEDEF_AUTOPTR(CBaseLibraryItem); - - -#endif // CRYINCLUDE_EDITOR_BASELIBRARYITEM_H diff --git a/Code/Editor/BaseLibraryManager.cpp b/Code/Editor/BaseLibraryManager.cpp deleted file mode 100644 index 7346ffaf8c..0000000000 --- a/Code/Editor/BaseLibraryManager.cpp +++ /dev/null @@ -1,938 +0,0 @@ -/* - * Copyright (c) Contributors to the Open 3D Engine Project. - * For complete copyright and license terms please see the LICENSE at the root of this distribution. - * - * SPDX-License-Identifier: Apache-2.0 OR MIT - * - */ - - - -#include "EditorDefs.h" - -#include "BaseLibraryManager.h" - -// Editor -#include "BaseLibraryItem.h" -#include "ErrorReport.h" -#include "Undo/IUndoObject.h" - - -/////////////////////////////////////////////////////////////////////////////////////////////////////////////////// -// Undo functionality for Managers, including add library, remove library, and rename library -- Vera, Confetti -//////////////////////////////////////////////////////////////////////////////////////////////////////////////////// - -class CUndoBaseLibraryManager - : public IUndoObject -{ -public: - CUndoBaseLibraryManager(CBaseLibraryManager* pMngr, const QString& description, const QString& modifiedManager = nullptr) - : m_pMngr(pMngr) - , m_description(description) - , m_editorObject(modifiedManager) - { - assert(m_pMngr); - SerializeTo(m_undos); - } - - QString GetEditorObjectName() override - { - return m_editorObject; - } - -protected: - int GetSize() override { return sizeof(CUndoBaseLibraryManager); } - QString GetDescription() override { return m_description; }; - - void Undo(bool bUndo) override - { - if (bUndo) - { - SerializeTo(m_redos); - } - m_pMngr->ClearAll(); - UnserializeFrom(m_undos); - GetIEditor()->Notify(eNotify_OnDataBaseUpdate); - } - - void Redo() override - { - m_pMngr->ClearAll(); - UnserializeFrom(m_redos); - GetIEditor()->Notify(eNotify_OnDataBaseUpdate); - } - -private: - struct LibUndoNode - : public _i_reference_target_t - { - LibUndoNode() - { - node = nullptr; - fileName = ""; - } - XmlNodeRef node; - QString fileName; - }; - - static const char* const LIBRARY_TAG; - static const char* const LEVEL_LIBRARY_TAG; - - void SerializeTo(std::vector<_smart_ptr >& undos) // Save Library Undo - { - undos.clear(); - for (int i = 0; i < m_pMngr->GetLibraryCount(); i++) - { - IDataBaseLibrary* library = m_pMngr->GetLibrary(i); - - const char* tag = library->IsLevelLibrary() ? LEVEL_LIBRARY_TAG : LIBRARY_TAG; - XmlNodeRef node = GetIEditor()->GetSystem()->CreateXmlNode(tag); - QString file = library->GetFilename().isEmpty() ? library->GetFilename() : library->GetName(); - library->Serialize(node, false); - if (node && !file.isEmpty()) - { - _smart_ptr undo = new LibUndoNode(); - undo->fileName = file; - undo->node = node; - undos.push_back(undo); - } - } - } - - void UnserializeFrom(std::vector<_smart_ptr >& undos) // Load Library Undo - { - for (int i = 0; i < undos.size(); i++) - { - _smart_ptr undo = undos[i]; - if (undo->node && !undo->fileName.isEmpty()) - { - //AddLibrary adds a .xml to the end of the library path, this will remove the extra for compatibility - undo->fileName.replace(m_pMngr->GetLibsPath().toLower(), ""); - undo->fileName.replace(".xml", ""); - - const bool isLevelLibrary = (strcmp(undo->node->getTag(), LEVEL_LIBRARY_TAG) == 0); - - IDataBaseLibrary* library = m_pMngr->AddLibrary(undo->fileName, isLevelLibrary); - library->Serialize(undo->node, true); - } - } - } - - - QString m_description; - QString m_editorObject; - CBaseLibraryManager* m_pMngr; - std::vector<_smart_ptr > m_undos; - std::vector<_smart_ptr > m_redos; -}; - -const char* const CUndoBaseLibraryManager::LIBRARY_TAG = "UndoLibrary"; -const char* const CUndoBaseLibraryManager::LEVEL_LIBRARY_TAG = "UndoLevelLibrary"; - - - -////////////////////////////////////////////////////////////////////////// -// CBaseLibraryManager implementation. -////////////////////////////////////////////////////////////////////////// -CBaseLibraryManager::CBaseLibraryManager() -{ - m_bUniqNameMap = false; - m_bUniqGuidMap = true; - GetIEditor()->RegisterNotifyListener(this); -} - -////////////////////////////////////////////////////////////////////////// -CBaseLibraryManager::~CBaseLibraryManager() -{ - ClearAll(); - GetIEditor()->UnregisterNotifyListener(this); -} - -////////////////////////////////////////////////////////////////////////// -void CBaseLibraryManager::ClearAll() -{ - // Delete all items from all libraries. - for (int i = 0; i < m_libs.size(); i++) - { - m_libs[i]->RemoveAllItems(); - } - - // if we will not copy maps locally then destructors of the elements of - // the map will operate on the already invalid map object - // see: - // CBaseLibraryManager::UnregisterItem() - // CBaseLibraryManager::DeleteItem() - // CMaterial::~CMaterial() - - ItemsGUIDMap itemsGuidMap; - ItemsNameMap itemsNameMap; - - { - AZStd::lock_guard lock(m_itemsNameMapMutex); - std::swap(itemsGuidMap, m_itemsGuidMap); - std::swap(itemsNameMap, m_itemsNameMap); - - m_libs.clear(); - } -} - -////////////////////////////////////////////////////////////////////////// -IDataBaseLibrary* CBaseLibraryManager::FindLibrary(const QString& library) -{ - const int index = FindLibraryIndex(library); - return index == -1 ? nullptr : m_libs[index]; -} - -////////////////////////////////////////////////////////////////////////// -int CBaseLibraryManager::FindLibraryIndex(const QString& library) -{ - QString lib = library; - lib.replace('\\', '/'); - for (int i = 0; i < m_libs.size(); i++) - { - QString _lib = m_libs[i]->GetFilename(); - _lib.replace('\\', '/'); - if (QString::compare(lib, m_libs[i]->GetName(), Qt::CaseInsensitive) == 0 || QString::compare(lib, _lib, Qt::CaseInsensitive) == 0) - { - return i; - } - } - return -1; -} - -////////////////////////////////////////////////////////////////////////// -IDataBaseItem* CBaseLibraryManager::FindItem(REFGUID guid) const -{ - CBaseLibraryItem* pMtl = stl::find_in_map(m_itemsGuidMap, guid, nullptr); - return pMtl; -} - -////////////////////////////////////////////////////////////////////////// -void CBaseLibraryManager::SplitFullItemName(const QString& fullItemName, QString& libraryName, QString& itemName) -{ - int p; - p = fullItemName.indexOf('.'); - if (p < 0 || !QString::compare(fullItemName.mid(p + 1), "mtl", Qt::CaseInsensitive)) - { - libraryName = ""; - itemName = fullItemName; - return; - } - libraryName = fullItemName.mid(0, p); - itemName = fullItemName.mid(p + 1); -} - -////////////////////////////////////////////////////////////////////////// -IDataBaseItem* CBaseLibraryManager::FindItemByName(const QString& fullItemName) -{ - AZStd::lock_guard lock(m_itemsNameMapMutex); - return stl::find_in_map(m_itemsNameMap, fullItemName, nullptr); -} - -////////////////////////////////////////////////////////////////////////// -IDataBaseItem* CBaseLibraryManager::LoadItemByName(const QString& fullItemName) -{ - QString libraryName, itemName; - SplitFullItemName(fullItemName, libraryName, itemName); - - if (!FindLibrary(libraryName)) - { - LoadLibrary(MakeFilename(libraryName)); - } - - return FindItemByName(fullItemName); -} - -////////////////////////////////////////////////////////////////////////// -IDataBaseItem* CBaseLibraryManager::FindItemByName(const char* fullItemName) -{ - return FindItemByName(QString(fullItemName)); -} - -////////////////////////////////////////////////////////////////////////// -IDataBaseItem* CBaseLibraryManager::LoadItemByName(const char* fullItemName) -{ - return LoadItemByName(QString(fullItemName)); -} - -////////////////////////////////////////////////////////////////////////// -IDataBaseItem* CBaseLibraryManager::CreateItem(IDataBaseLibrary* pLibrary) -{ - assert(pLibrary); - - // Add item to this library. - TSmartPtr pItem = MakeNewItem(); - pLibrary->AddItem(pItem); - return pItem; -} - -////////////////////////////////////////////////////////////////////////// -void CBaseLibraryManager::DeleteItem(IDataBaseItem* pItem) -{ - assert(pItem); - - UnregisterItem((CBaseLibraryItem*)pItem); - if (pItem->GetLibrary()) - { - pItem->GetLibrary()->RemoveItem(pItem); - } -} - -////////////////////////////////////////////////////////////////////////// -IDataBaseLibrary* CBaseLibraryManager::LoadLibrary(const QString& inFilename, [[maybe_unused]] bool bReload) -{ - if (auto lib = FindLibrary(inFilename)) - { - return lib; - } - - TSmartPtr pLib = MakeNewLibrary(); - if (!pLib->Load(MakeFilename(inFilename))) - { - Error(QObject::tr("Failed to Load Item Library: %1").arg(inFilename).toUtf8().data()); - return nullptr; - } - - m_libs.push_back(pLib); - return pLib; -} - -////////////////////////////////////////////////////////////////////////// -int CBaseLibraryManager::GetModifiedLibraryCount() const -{ - int count = 0; - for (int i = 0; i < m_libs.size(); i++) - { - if (m_libs[i]->IsModified()) - { - count++; - } - } - return count; -} - -////////////////////////////////////////////////////////////////////////// -IDataBaseLibrary* CBaseLibraryManager::AddLibrary(const QString& library, bool bIsLevelLibrary, bool bIsLoading) -{ - // Make a filename from name of library. - QString filename = library; - - if (filename.indexOf(".xml") == -1) // if its already a filename, we don't do anything - { - filename.replace(' ', '_'); - if (!bIsLevelLibrary) - { - filename = MakeFilename(library); - } - else - { - // if its the level library it gets saved in the level and should not be concatenated with any other file name - filename = filename + ".xml"; - } - } - - IDataBaseLibrary* pBaseLib = FindLibrary(library); //library name - if (!pBaseLib) - { - pBaseLib = FindLibrary(filename); //library file name - } - if (pBaseLib) - { - return pBaseLib; - } - - CBaseLibrary* lib = MakeNewLibrary(); - lib->SetName(library); - lib->SetLevelLibrary(bIsLevelLibrary); - lib->SetFilename(filename, !bIsLoading); - // set modified to true, so even empty particle libraries get saved - lib->SetModified(true); - - m_libs.push_back(lib); - return lib; -} - -////////////////////////////////////////////////////////////////////////// -QString CBaseLibraryManager::MakeFilename(const QString& library) -{ - QString filename = library; - filename.replace(' ', '_'); - filename.replace(".xml", ""); - - // make it contain the canonical libs path: - Path::ConvertBackSlashToSlash(filename); - - QString LibsPath(GetLibsPath()); - Path::ConvertBackSlashToSlash(LibsPath); - - if (filename.left(LibsPath.length()).compare(LibsPath, Qt::CaseInsensitive) == 0) - { - filename = filename.mid(LibsPath.length()); - } - - return LibsPath + filename + ".xml"; -} - -////////////////////////////////////////////////////////////////////////// -bool CBaseLibraryManager::IsUniqueFilename(const QString& library) -{ - QString resultPath = MakeFilename(library); - CCryFile xmlFile; - // If we can find a file for the path - return !xmlFile.Open(resultPath.toUtf8().data(), "rb"); -} - -////////////////////////////////////////////////////////////////////////// -void CBaseLibraryManager::DeleteLibrary(const QString& library, bool forceDeleteLevel) -{ - for (int i = 0; i < m_libs.size(); i++) - { - if (QString::compare(library, m_libs[i]->GetName(), Qt::CaseInsensitive) == 0) - { - CBaseLibrary* pLibrary = m_libs[i]; - // Check if not level library, they cannot be deleted. - if (!pLibrary->IsLevelLibrary() || forceDeleteLevel) - { - for (int j = 0; j < pLibrary->GetItemCount(); j++) - { - UnregisterItem((CBaseLibraryItem*)pLibrary->GetItem(j)); - } - pLibrary->RemoveAllItems(); - - if (pLibrary->IsLevelLibrary()) - { - m_pLevelLibrary = nullptr; - } - m_libs.erase(m_libs.begin() + i); - } - break; - } - } -} - -////////////////////////////////////////////////////////////////////////// -IDataBaseLibrary* CBaseLibraryManager::GetLibrary(int index) const -{ - assert(index >= 0 && index < m_libs.size()); - return m_libs[index]; -}; - -////////////////////////////////////////////////////////////////////////// -IDataBaseLibrary* CBaseLibraryManager::GetLevelLibrary() const -{ - IDataBaseLibrary* pLevelLib = nullptr; - - for (int i = 0; i < GetLibraryCount(); i++) - { - if (GetLibrary(i)->IsLevelLibrary()) - { - pLevelLib = GetLibrary(i); - break; - } - } - - - return pLevelLib; -} - -////////////////////////////////////////////////////////////////////////// -void CBaseLibraryManager::SaveAllLibs() -{ - for (int i = 0; i < GetLibraryCount(); i++) - { - // Check if library is modified. - IDataBaseLibrary* pLibrary = GetLibrary(i); - - //Level library is saved when the level is saved - if (pLibrary->IsLevelLibrary()) - { - continue; - } - if (pLibrary->IsModified()) - { - if (pLibrary->Save()) - { - pLibrary->SetModified(false); - } - } - } -} - -////////////////////////////////////////////////////////////////////////// -void CBaseLibraryManager::Serialize(XmlNodeRef& node, bool bLoading) -{ - static const char* const LEVEL_LIBRARY_TAG = "LevelLibrary"; - - QString rootNodeName = GetRootNodeName(); - if (bLoading) - { - XmlNodeRef libs = node->findChild(rootNodeName.toUtf8().data()); - if (libs) - { - for (int i = 0; i < libs->getChildCount(); i++) - { - // Load only library name. - XmlNodeRef libNode = libs->getChild(i); - if (strcmp(libNode->getTag(), LEVEL_LIBRARY_TAG) == 0) - { - if (!m_pLevelLibrary) - { - QString libName; - libNode->getAttr("Name", libName); - m_pLevelLibrary = static_cast(AddLibrary(libName, true)); - } - m_pLevelLibrary->Serialize(libNode, bLoading); - } - else - { - QString libName; - if (libNode->getAttr("Name", libName)) - { - // Load this library. - if (!FindLibrary(libName)) - { - LoadLibrary(MakeFilename(libName)); - } - } - } - } - } - } - else - { - // Save all libraries. - XmlNodeRef libs = node->newChild(rootNodeName.toUtf8().data()); - for (int i = 0; i < GetLibraryCount(); i++) - { - IDataBaseLibrary* pLib = GetLibrary(i); - if (pLib->IsLevelLibrary()) - { - // Level libraries are saved in in level. - XmlNodeRef libNode = libs->newChild(LEVEL_LIBRARY_TAG); - pLib->Serialize(libNode, bLoading); - } - else - { - // Save only library name. - XmlNodeRef libNode = libs->newChild("Library"); - libNode->setAttr("Name", pLib->GetName().toUtf8().data()); - } - } - SaveAllLibs(); - } -} - -////////////////////////////////////////////////////////////////////////// -QString CBaseLibraryManager::MakeUniqueItemName(const QString& srcName, const QString& libName) -{ - // unlikely we'll ever encounter more than 16 - std::vector possibleDuplicates; - possibleDuplicates.reserve(16); - - // search for strings in the database that might have a similar name (ignore case) - IDataBaseItemEnumerator* pEnum = GetItemEnumerator(); - for (IDataBaseItem* pItem = pEnum->GetFirst(); pItem != nullptr; pItem = pEnum->GetNext()) - { - //Check if the item is in the target library first. - IDataBaseLibrary* itemLibrary = pItem->GetLibrary(); - QString itemLibraryName; - if (itemLibrary) - { - itemLibraryName = itemLibrary->GetName(); - } - - // Item is not in the library so there cannot be a naming conflict. - if (!libName.isEmpty() && !itemLibraryName.isEmpty() && itemLibraryName != libName) - { - continue; - } - - const QString& name = pItem->GetName(); - if (name.startsWith(srcName, Qt::CaseInsensitive)) - { - possibleDuplicates.push_back(AZStd::string(name.toUtf8().data())); - } - } - pEnum->Release(); - - if (possibleDuplicates.empty()) - { - return srcName; - } - - std::sort(possibleDuplicates.begin(), possibleDuplicates.end(), [](const AZStd::string& strOne, const AZStd::string& strTwo) - { - // I can assume size sorting since if the length is different, either one of the two strings doesn't - // closely match the string we are trying to duplicate, or it's a bigger number (X1 vs X10) - if (strOne.size() != strTwo.size()) - { - return strOne.size() < strTwo.size(); - } - else - { - return azstricmp(strOne.c_str(), strTwo.c_str()) < 0; - } - } - ); - - int num = 0; - QString returnValue = srcName; - while (num < possibleDuplicates.size() && QString::compare(possibleDuplicates[num].c_str(), returnValue, Qt::CaseInsensitive) == 0) - { - returnValue = QStringLiteral("%1%2%3").arg(srcName).arg("_").arg(num); - ++num; - } - - return returnValue; -} - -////////////////////////////////////////////////////////////////////////// -void CBaseLibraryManager::Validate() -{ - IDataBaseItemEnumerator* pEnum = GetItemEnumerator(); - for (IDataBaseItem* pItem = pEnum->GetFirst(); pItem != nullptr; pItem = pEnum->GetNext()) - { - pItem->Validate(); - } - pEnum->Release(); -} - -////////////////////////////////////////////////////////////////////////// -void CBaseLibraryManager::RegisterItem(CBaseLibraryItem* pItem, REFGUID newGuid) -{ - assert(pItem); - - bool bNotify = false; - - if (m_bUniqGuidMap) - { - bool bNewItem = true; - REFGUID oldGuid = pItem->GetGUID(); - if (!GuidUtil::IsEmpty(oldGuid)) - { - bNewItem = false; - m_itemsGuidMap.erase(oldGuid); - } - if (GuidUtil::IsEmpty(newGuid)) - { - return; - } - CBaseLibraryItem* pOldItem = stl::find_in_map(m_itemsGuidMap, newGuid, nullptr); - if (!pOldItem) - { - pItem->m_guid = newGuid; - m_itemsGuidMap[newGuid] = pItem; - pItem->m_bRegistered = true; - bNotify = true; - } - else - { - if (pOldItem != pItem) - { - ReportDuplicateItem(pItem, pOldItem); - } - } - } - - if (m_bUniqNameMap) - { - QString fullName = pItem->GetFullName(); - if (!pItem->GetName().isEmpty()) - { - CBaseLibraryItem* pOldItem = static_cast(FindItemByName(fullName)); - if (!pOldItem) - { - AZStd::lock_guard lock(m_itemsNameMapMutex); - m_itemsNameMap[fullName] = pItem; - pItem->m_bRegistered = true; - bNotify = true; - } - else - { - if (pOldItem != pItem) - { - ReportDuplicateItem(pItem, pOldItem); - } - } - } - } - - // Notify listeners. - if (bNotify) - { - NotifyItemEvent(pItem, EDB_ITEM_EVENT_ADD); - } -} - -////////////////////////////////////////////////////////////////////////// -void CBaseLibraryManager::RegisterItem(CBaseLibraryItem* pItem) -{ - assert(pItem); - - bool bNotify = false; - - if (m_bUniqGuidMap) - { - if (GuidUtil::IsEmpty(pItem->GetGUID())) - { - return; - } - CBaseLibraryItem* pOldItem = stl::find_in_map(m_itemsGuidMap, pItem->GetGUID(), nullptr); - if (!pOldItem) - { - m_itemsGuidMap[pItem->GetGUID()] = pItem; - pItem->m_bRegistered = true; - bNotify = true; - } - else - { - if (pOldItem != pItem) - { - ReportDuplicateItem(pItem, pOldItem); - } - } - } - - if (m_bUniqNameMap) - { - QString fullName = pItem->GetFullName(); - if (!fullName.isEmpty()) - { - CBaseLibraryItem* pOldItem = static_cast(FindItemByName(fullName)); - if (!pOldItem) - { - AZStd::lock_guard lock(m_itemsNameMapMutex); - m_itemsNameMap[fullName] = pItem; - pItem->m_bRegistered = true; - bNotify = true; - } - else - { - if (pOldItem != pItem) - { - ReportDuplicateItem(pItem, pOldItem); - } - } - } - } - - // Notify listeners. - if (bNotify) - { - NotifyItemEvent(pItem, EDB_ITEM_EVENT_ADD); - } -} - -////////////////////////////////////////////////////////////////////////// -void CBaseLibraryManager::SetRegisteredFlag(CBaseLibraryItem* pItem, bool bFlag) -{ - pItem->m_bRegistered = bFlag; -} - -////////////////////////////////////////////////////////////////////////// -void CBaseLibraryManager::ReportDuplicateItem(CBaseLibraryItem* pItem, CBaseLibraryItem* pOldItem) -{ - QString sLibName; - if (pOldItem->GetLibrary()) - { - sLibName = pOldItem->GetLibrary()->GetName(); - } - CErrorRecord err; - err.pItem = pItem; - err.error = QStringLiteral("Item %1 with duplicate GUID to loaded item %2 ignored").arg(pItem->GetFullName(), pOldItem->GetFullName()); - GetIEditor()->GetErrorReport()->ReportError(err); -} - -////////////////////////////////////////////////////////////////////////// -void CBaseLibraryManager::UnregisterItem(CBaseLibraryItem* pItem) -{ - // Notify listeners. - NotifyItemEvent(pItem, EDB_ITEM_EVENT_DELETE); - - if (!pItem) - { - return; - } - - if (m_bUniqGuidMap) - { - m_itemsGuidMap.erase(pItem->GetGUID()); - } - if (m_bUniqNameMap && !pItem->GetFullName().isEmpty()) - { - AZStd::lock_guard lock(m_itemsNameMapMutex); - auto findIter = m_itemsNameMap.find(pItem->GetFullName()); - if (findIter != m_itemsNameMap.end()) - { - _smart_ptr item = findIter->second; - m_itemsNameMap.erase(findIter); - } - } - - pItem->m_bRegistered = false; -} - -////////////////////////////////////////////////////////////////////////// -QString CBaseLibraryManager::MakeFullItemName(IDataBaseLibrary* pLibrary, const QString& group, const QString& itemName) -{ - assert(pLibrary); - QString name = pLibrary->GetName() + "."; - if (!group.isEmpty()) - { - name += group + "."; - } - name += itemName; - return name; -} - -////////////////////////////////////////////////////////////////////////// -void CBaseLibraryManager::GatherUsedResources(CUsedResources& resources) -{ - IDataBaseItemEnumerator* pEnum = GetItemEnumerator(); - for (IDataBaseItem* pItem = pEnum->GetFirst(); pItem != nullptr; pItem = pEnum->GetNext()) - { - pItem->GatherUsedResources(resources); - } - pEnum->Release(); -} - -////////////////////////////////////////////////////////////////////////// -IDataBaseItemEnumerator* CBaseLibraryManager::GetItemEnumerator() -{ - if (m_bUniqNameMap) - { - return new CDataBaseItemEnumerator(&m_itemsNameMap); - } - else - { - return new CDataBaseItemEnumerator(&m_itemsGuidMap); - } -} - -////////////////////////////////////////////////////////////////////////// -void CBaseLibraryManager::OnEditorNotifyEvent(EEditorNotifyEvent event) -{ - switch (event) - { - case eNotify_OnBeginNewScene: - SetSelectedItem(nullptr); - ClearAll(); - break; - case eNotify_OnBeginSceneOpen: - SetSelectedItem(nullptr); - ClearAll(); - break; - case eNotify_OnCloseScene: - SetSelectedItem(nullptr); - ClearAll(); - break; - } -} - -////////////////////////////////////////////////////////////////////////// -void CBaseLibraryManager::OnRenameItem(CBaseLibraryItem* pItem, const QString& oldName) -{ - m_itemsNameMapMutex.lock(); - if (!oldName.isEmpty()) - { - m_itemsNameMap.erase(oldName); - } - if (!pItem->GetFullName().isEmpty()) - { - m_itemsNameMap[pItem->GetFullName()] = pItem; - } - m_itemsNameMapMutex.unlock(); - - OnItemChanged(pItem); -} - -////////////////////////////////////////////////////////////////////////// -void CBaseLibraryManager::AddListener(IDataBaseManagerListener* pListener) -{ - stl::push_back_unique(m_listeners, pListener); -} - -////////////////////////////////////////////////////////////////////////// -void CBaseLibraryManager::RemoveListener(IDataBaseManagerListener* pListener) -{ - stl::find_and_erase(m_listeners, pListener); -} - -////////////////////////////////////////////////////////////////////////// -void CBaseLibraryManager::NotifyItemEvent(IDataBaseItem* pItem, EDataBaseItemEvent event) -{ - // Notify listeners. - if (!m_listeners.empty()) - { - for (int i = 0; i < m_listeners.size(); i++) - { - m_listeners[i]->OnDataBaseItemEvent(pItem, event); - } - } -} - -////////////////////////////////////////////////////////////////////////// -void CBaseLibraryManager::OnItemChanged(IDataBaseItem* pItem) -{ - NotifyItemEvent(pItem, EDB_ITEM_EVENT_CHANGED); -} - -////////////////////////////////////////////////////////////////////////// -void CBaseLibraryManager::OnUpdateProperties(IDataBaseItem* pItem, bool bRefresh) -{ - NotifyItemEvent(pItem, bRefresh ? EDB_ITEM_EVENT_UPDATE_PROPERTIES - : EDB_ITEM_EVENT_UPDATE_PROPERTIES_NO_EDITOR_REFRESH); -} - -////////////////////////////////////////////////////////////////////////// -void CBaseLibraryManager::SetSelectedItem(IDataBaseItem* pItem) -{ - if (m_pSelectedItem == pItem) - { - return; - } - m_pSelectedItem = (CBaseLibraryItem*)pItem; - NotifyItemEvent(m_pSelectedItem, EDB_ITEM_EVENT_SELECTED); -} - -////////////////////////////////////////////////////////////////////////// -IDataBaseItem* CBaseLibraryManager::GetSelectedItem() const -{ - return m_pSelectedItem; -} - -////////////////////////////////////////////////////////////////////////// -IDataBaseItem* CBaseLibraryManager::GetSelectedParentItem() const -{ - return m_pSelectedParent; -} - -void CBaseLibraryManager::ChangeLibraryOrder(IDataBaseLibrary* lib, unsigned int newLocation) -{ - if (!lib || newLocation >= m_libs.size() || lib == m_libs[newLocation]) - { - return; - } - - for (int i = 0; i < m_libs.size(); i++) - { - if (lib == m_libs[i]) - { - _smart_ptr curLib = m_libs[i]; - m_libs.erase(m_libs.begin() + i); - m_libs.insert(m_libs.begin() + newLocation, curLib); - return; - } - } -} - -bool CBaseLibraryManager::SetLibraryName(CBaseLibrary* lib, const QString& name) -{ - // SetFilename will validate if the name is duplicate with exist libraries. - if (lib->SetFilename(MakeFilename(name))) - { - lib->SetName(name); - return true; - } - return false; -} diff --git a/Code/Editor/BaseLibraryManager.h b/Code/Editor/BaseLibraryManager.h deleted file mode 100644 index 118c7ef1f0..0000000000 --- a/Code/Editor/BaseLibraryManager.h +++ /dev/null @@ -1,226 +0,0 @@ -/* - * Copyright (c) Contributors to the Open 3D Engine Project. - * For complete copyright and license terms please see the LICENSE at the root of this distribution. - * - * SPDX-License-Identifier: Apache-2.0 OR MIT - * - */ - - - -#ifndef CRYINCLUDE_EDITOR_BASELIBRARYMANAGER_H -#define CRYINCLUDE_EDITOR_BASELIBRARYMANAGER_H -#pragma once - -#include "Include/IBaseLibraryManager.h" -#include "Include/IDataBaseItem.h" -#include "Include/IDataBaseLibrary.h" -#include "Include/IDataBaseManager.h" -#include "Util/TRefCountBase.h" -#include "Util/GuidUtil.h" -#include "BaseLibrary.h" -#include "Util/smartptr.h" -#include -#include - -AZ_PUSH_DISABLE_DLL_EXPORT_BASECLASS_WARNING -/** Manages all Libraries and Items. -*/ -class SANDBOX_API CBaseLibraryManager - : public IBaseLibraryManager -{ -AZ_POP_DISABLE_DLL_EXPORT_BASECLASS_WARNING -public: - CBaseLibraryManager(); - ~CBaseLibraryManager(); - - //! Clear all libraries. - void ClearAll() override; - - ////////////////////////////////////////////////////////////////////////// - // IDocListener implementation. - ////////////////////////////////////////////////////////////////////////// - void OnEditorNotifyEvent(EEditorNotifyEvent event) override; - - ////////////////////////////////////////////////////////////////////////// - // Library items. - ////////////////////////////////////////////////////////////////////////// - //! Make a new item in specified library. - IDataBaseItem* CreateItem(IDataBaseLibrary* pLibrary) override; - //! Delete item from library and manager. - void DeleteItem(IDataBaseItem* pItem) override; - - //! Find Item by its GUID. - IDataBaseItem* FindItem(REFGUID guid) const override; - IDataBaseItem* FindItemByName(const QString& fullItemName) override; - IDataBaseItem* LoadItemByName(const QString& fullItemName) override; - virtual IDataBaseItem* FindItemByName(const char* fullItemName); - virtual IDataBaseItem* LoadItemByName(const char* fullItemName); - - IDataBaseItemEnumerator* GetItemEnumerator() override; - - ////////////////////////////////////////////////////////////////////////// - // Set item currently selected. - void SetSelectedItem(IDataBaseItem* pItem) override; - // Get currently selected item. - IDataBaseItem* GetSelectedItem() const override; - IDataBaseItem* GetSelectedParentItem() const override; - - ////////////////////////////////////////////////////////////////////////// - // Libraries. - ////////////////////////////////////////////////////////////////////////// - //! Add Item library. - IDataBaseLibrary* AddLibrary(const QString& library, bool bIsLevelLibrary = false, bool bIsLoading = true) override; - void DeleteLibrary(const QString& library, bool forceDeleteLevel = false) override; - //! Get number of libraries. - int GetLibraryCount() const override { return static_cast(m_libs.size()); }; - //! Get number of modified libraries. - int GetModifiedLibraryCount() const override; - - //! Get Item library by index. - IDataBaseLibrary* GetLibrary(int index) const override; - - //! Get Level Item library. - IDataBaseLibrary* GetLevelLibrary() const override; - - //! Find Items Library by name. - IDataBaseLibrary* FindLibrary(const QString& library) override; - - //! Find Items Library's index by name. - int FindLibraryIndex(const QString& library) override; - - //! Load Items library. - IDataBaseLibrary* LoadLibrary(const QString& filename, bool bReload = false) override; - - //! Save all modified libraries. - void SaveAllLibs() override; - - //! Serialize property manager. - void Serialize(XmlNodeRef& node, bool bLoading) override; - - //! Export items to game. - void Export([[maybe_unused]] XmlNodeRef& node) override {}; - - //! Returns unique name base on input name. - QString MakeUniqueItemName(const QString& name, const QString& libName = "") override; - QString MakeFullItemName(IDataBaseLibrary* pLibrary, const QString& group, const QString& itemName) override; - - //! Root node where this library will be saved. - QString GetRootNodeName() override = 0; - //! Path to libraries in this manager. - QString GetLibsPath() override = 0; - - ////////////////////////////////////////////////////////////////////////// - //! Validate library items for errors. - void Validate() override; - - ////////////////////////////////////////////////////////////////////////// - void GatherUsedResources(CUsedResources& resources) override; - - void AddListener(IDataBaseManagerListener* pListener) override; - void RemoveListener(IDataBaseManagerListener* pListener) override; - - ////////////////////////////////////////////////////////////////////////// - void RegisterItem(CBaseLibraryItem* pItem, REFGUID newGuid) override; - void RegisterItem(CBaseLibraryItem* pItem) override; - void UnregisterItem(CBaseLibraryItem* pItem) override; - - // Only Used internally. - void OnRenameItem(CBaseLibraryItem* pItem, const QString& oldName) override; - - // Called by items to indicated that they have been modified. - // Sends item changed event to listeners. - void OnItemChanged(IDataBaseItem* pItem) override; - void OnUpdateProperties(IDataBaseItem* pItem, bool bRefresh) override; - - QString MakeFilename(const QString& library); - bool IsUniqueFilename(const QString& library) override; - - //CONFETTI BEGIN - // Used to change the library item order - void ChangeLibraryOrder(IDataBaseLibrary* lib, unsigned int newLocation) override; - - bool SetLibraryName(CBaseLibrary* lib, const QString& name) override; - -protected: - void SplitFullItemName(const QString& fullItemName, QString& libraryName, QString& itemName); - void NotifyItemEvent(IDataBaseItem* pItem, EDataBaseItemEvent event); - void SetRegisteredFlag(CBaseLibraryItem* pItem, bool bFlag); - - ////////////////////////////////////////////////////////////////////////// - // Must be overriden. - //! Makes a new Item. - virtual CBaseLibraryItem* MakeNewItem() = 0; - virtual CBaseLibrary* MakeNewLibrary() = 0; - ////////////////////////////////////////////////////////////////////////// - - virtual void ReportDuplicateItem(CBaseLibraryItem* pItem, CBaseLibraryItem* pOldItem); - -protected: - bool m_bUniqGuidMap; - bool m_bUniqNameMap; - - AZ_PUSH_DISABLE_DLL_EXPORT_MEMBER_WARNING - //! Array of all loaded entity items libraries. - std::vector<_smart_ptr > m_libs; - - // There is always one current level library. - TSmartPtr m_pLevelLibrary; - - // GUID to item map. - typedef std::map, guid_less_predicate> ItemsGUIDMap; - ItemsGUIDMap m_itemsGuidMap; - - // Case insensitive name to items map. - typedef std::map, stl::less_stricmp> ItemsNameMap; - ItemsNameMap m_itemsNameMap; - AZStd::mutex m_itemsNameMapMutex; - - std::vector m_listeners; - - // Currently selected item. - _smart_ptr m_pSelectedItem; - _smart_ptr m_pSelectedParent; - AZ_POP_DISABLE_DLL_EXPORT_MEMBER_WARNING -}; - -////////////////////////////////////////////////////////////////////////// -template -class CDataBaseItemEnumerator - : public IDataBaseItemEnumerator -{ - TMap* m_pMap; - typename TMap::iterator m_iterator; - -public: - CDataBaseItemEnumerator(TMap* pMap) - { - assert(pMap); - m_pMap = pMap; - m_iterator = m_pMap->begin(); - } - void Release() override { delete this; }; - IDataBaseItem* GetFirst() override - { - m_iterator = m_pMap->begin(); - if (m_iterator == m_pMap->end()) - { - return 0; - } - return m_iterator->second; - } - IDataBaseItem* GetNext() override - { - if (m_iterator != m_pMap->end()) - { - m_iterator++; - } - if (m_iterator == m_pMap->end()) - { - return 0; - } - return m_iterator->second; - } -}; - -#endif // CRYINCLUDE_EDITOR_BASELIBRARYMANAGER_H diff --git a/Code/Editor/CMakeLists.txt b/Code/Editor/CMakeLists.txt index bdfac373eb..3358b49dce 100644 --- a/Code/Editor/CMakeLists.txt +++ b/Code/Editor/CMakeLists.txt @@ -131,7 +131,7 @@ ly_add_source_properties( PROPERTY COMPILE_DEFINITIONS VALUES O3DE_COPYRIGHT_YEAR=${LY_VERSION_COPYRIGHT_YEAR} - LY_BUILD=${LY_VERSION_BUILD_NUMBER} + LY_VERSION_BUILD_NUMBER=${LY_VERSION_BUILD_NUMBER} ${LY_PAL_TOOLS_DEFINES} ) ly_add_source_properties( @@ -249,38 +249,9 @@ if(PAL_TRAIT_BUILD_TESTS_SUPPORTED) RUNTIME_DEPENDENCIES Gem::LmbrCentral ) + ly_add_googletest( NAME Legacy::EditorLib.Tests ) - ly_add_target( - NAME EditorLib.Camera.Tests ${PAL_TRAIT_TEST_TARGET_TYPE} - NAMESPACE Legacy - FILES_CMAKE - Lib/Tests/Camera/editor_lib_camera_test_files.cmake - INCLUDE_DIRECTORIES - PRIVATE - . - BUILD_DEPENDENCIES - PRIVATE - AZ::AzCore - AZ::AzTest - AZ::AzToolsFramework - AZ::AzTestShared - Legacy::EditorLib - Gem::Camera.Editor - Gem::AtomToolsFramework.Static - RUNTIME_DEPENDENCIES - Legacy::EditorLib - ) - - ly_add_source_properties( - SOURCES Lib/Tests/Camera/test_EditorCamera.cpp - PROPERTY COMPILE_DEFINITIONS - VALUES CAMERA_EDITOR_MODULE="$" - ) - - ly_add_googletest( - NAME Legacy::EditorLib.Camera.Tests - ) endif() diff --git a/Code/Editor/Common/spline_edit-00.png b/Code/Editor/Common/spline_edit-00.png deleted file mode 100644 index 0243becc2b..0000000000 --- a/Code/Editor/Common/spline_edit-00.png +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:58ef978b31b31df9aaf715a0e9b006fde414a17a3ff15a3bf680eaad7418867a -size 364 diff --git a/Code/Editor/Common/spline_edit-01.png b/Code/Editor/Common/spline_edit-01.png deleted file mode 100644 index 4789ee0820..0000000000 --- a/Code/Editor/Common/spline_edit-01.png +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:98a681ec3d89ee57c5d1057fe984dcf8ad45721f47ae4df57fa358fbee85e616 -size 385 diff --git a/Code/Editor/Common/spline_edit-02.png b/Code/Editor/Common/spline_edit-02.png deleted file mode 100644 index 476883a514..0000000000 --- a/Code/Editor/Common/spline_edit-02.png +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:24a2b2c9242a841c20e7815dab0d80a575844055328aea413d28b7283b65a92e -size 386 diff --git a/Code/Editor/Common/spline_edit-03.png b/Code/Editor/Common/spline_edit-03.png deleted file mode 100644 index c1e79719a5..0000000000 --- a/Code/Editor/Common/spline_edit-03.png +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:ce23a276fec849b8f832fab96d3b738793335c27d37ae3813158387f3415b508 -size 377 diff --git a/Code/Editor/Common/spline_edit-04.png b/Code/Editor/Common/spline_edit-04.png deleted file mode 100644 index e9cfb9d79e..0000000000 --- a/Code/Editor/Common/spline_edit-04.png +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:c03befab41765200f4f28dbf1e0b2a702d2244bfa79b0d463f5d58d0a26095fc -size 386 diff --git a/Code/Editor/Common/spline_edit-05.png b/Code/Editor/Common/spline_edit-05.png deleted file mode 100644 index 3046c6008d..0000000000 --- a/Code/Editor/Common/spline_edit-05.png +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:418c3f0f27854b3795841359014d87686a7bf94daf2568d9cfd3ffac22675f69 -size 386 diff --git a/Code/Editor/Common/spline_edit-06.png b/Code/Editor/Common/spline_edit-06.png deleted file mode 100644 index 3c170baa3e..0000000000 --- a/Code/Editor/Common/spline_edit-06.png +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:d3a831f34ac53c9b1f20037290e8a2b62a3cfb8a4f86467591f44fd2a0e3c15b -size 379 diff --git a/Code/Editor/Common/spline_edit-07.png b/Code/Editor/Common/spline_edit-07.png deleted file mode 100644 index 1c87d462ed..0000000000 --- a/Code/Editor/Common/spline_edit-07.png +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:4267102ca7a889c34eff905480a68878d4d56e15bc723a5b0575cd472e259f5d -size 389 diff --git a/Code/Editor/Common/spline_edit-08.png b/Code/Editor/Common/spline_edit-08.png deleted file mode 100644 index 52c436f877..0000000000 --- a/Code/Editor/Common/spline_edit-08.png +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:a0df013dd102b87348fba18b4da5443591309e9c40166d27ae928636924154ea -size 388 diff --git a/Code/Editor/Common/spline_edit-09.png b/Code/Editor/Common/spline_edit-09.png deleted file mode 100644 index 1223730915..0000000000 --- a/Code/Editor/Common/spline_edit-09.png +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:e713076ab5abbbb2cf28da431a339e9905acc790e35295f025aa2e79e1c04141 -size 376 diff --git a/Code/Editor/Common/spline_edit-10.png b/Code/Editor/Common/spline_edit-10.png deleted file mode 100644 index 3b2a27bdbf..0000000000 --- a/Code/Editor/Common/spline_edit-10.png +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:9e5af9d62ceafc3b8a1dfc36772350cd623fcc86c68711b299e143ff133f79b6 -size 387 diff --git a/Code/Editor/Common/spline_edit-11.png b/Code/Editor/Common/spline_edit-11.png deleted file mode 100644 index 7b68ead52b..0000000000 --- a/Code/Editor/Common/spline_edit-11.png +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:17c5fb3d7b87ea87a98934954c721573c641bc44005a34f1e16589d7f39b71e8 -size 409 diff --git a/Code/Editor/Common/spline_edit-12.png b/Code/Editor/Common/spline_edit-12.png deleted file mode 100644 index 3c7abb2182..0000000000 --- a/Code/Editor/Common/spline_edit-12.png +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:6f5c78d9f764b62fb7dcf400c91c1edea9d7f88a426ba513fbf70825c6bcd2ac -size 383 diff --git a/Code/Editor/Common/spline_edit-13.png b/Code/Editor/Common/spline_edit-13.png deleted file mode 100644 index f71a5ec300..0000000000 --- a/Code/Editor/Common/spline_edit-13.png +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:376b549602afffca407525b77c1a9821bf6a0e279792ae2e52fe0a4f7c3c5bd4 -size 364 diff --git a/Code/Editor/Common/spline_edit-14.png b/Code/Editor/Common/spline_edit-14.png deleted file mode 100644 index 4a5f89b089..0000000000 --- a/Code/Editor/Common/spline_edit-14.png +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:e7dc48f8d324b7563b168f27ebde1e00ee2bd11ba462f114a05b297913e285c5 -size 374 diff --git a/Code/Editor/Common/spline_edit-15.png b/Code/Editor/Common/spline_edit-15.png deleted file mode 100644 index 8542318682..0000000000 --- a/Code/Editor/Common/spline_edit-15.png +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:66b73afbd6dba1caaedfaae161b277b460b5198f7fc00bec414530116c567276 -size 375 diff --git a/Code/Editor/Common/spline_edit-16.png b/Code/Editor/Common/spline_edit-16.png deleted file mode 100644 index 6926024cbd..0000000000 --- a/Code/Editor/Common/spline_edit-16.png +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:ae6e6714acf495246f4e59f6e5640f3a4417ea50100d37a116950d2b859aed0c -size 417 diff --git a/Code/Editor/Controls/ConsoleSCBMFC.h b/Code/Editor/Controls/ConsoleSCBMFC.h deleted file mode 100644 index fcf7f71df7..0000000000 --- a/Code/Editor/Controls/ConsoleSCBMFC.h +++ /dev/null @@ -1,111 +0,0 @@ -/* - * Copyright (c) Contributors to the Open 3D Engine Project. - * For complete copyright and license terms please see the LICENSE at the root of this distribution. - * - * SPDX-License-Identifier: Apache-2.0 OR MIT - * - */ - - -#ifndef CRYINCLUDE_EDITOR_CONTROLS_CONSOLESCBMFC_H -#define CRYINCLUDE_EDITOR_CONTROLS_CONSOLESCBMFC_H -#pragma once - -#if !defined(Q_MOC_RUN) -#include -#include -#include - -#include "ConsoleSCB.h" -#endif - -class QMenu; -class ConsoleWidget; -class QFocusEvent; - -namespace Ui { - class ConsoleMFC; -} - -namespace MFC -{ - -struct ConsoleLine -{ - QString text; - bool newLine; -}; -typedef std::deque Lines; - -class ConsoleLineEdit - : public QLineEdit -{ - Q_OBJECT -public: - explicit ConsoleLineEdit(QWidget* parent = nullptr); - -protected: - void mousePressEvent(QMouseEvent* ev) override; - void mouseDoubleClickEvent(QMouseEvent* ev) override; - void keyPressEvent(QKeyEvent* ev) override; - bool event(QEvent* ev) override; - -signals: - void variableEditorRequested(); - void setWindowTitle(const QString&); - -private: - void DisplayHistory(bool bForward); - QStringList m_history; - unsigned int m_historyIndex; - bool m_bReusedHistory; -}; - -class ConsoleTextEdit - : public QTextEdit -{ - Q_OBJECT -public: - explicit ConsoleTextEdit(QWidget* parent = nullptr); -}; - -class CConsoleSCB - : public QWidget -{ - Q_OBJECT -public: - explicit CConsoleSCB(QWidget* parent = nullptr); - ~CConsoleSCB(); - - static void RegisterViewClass(); - void SetInputFocus(); - void AddToConsole(const QString& text, bool bNewLine); - void FlushText(); - void showPopupAndSetTitle(); - QSize sizeHint() const override; - QSize minimumSizeHint() const override; - static CConsoleSCB* GetCreatedInstance(); - - static void AddToPendingLines(const QString& text, bool bNewLine); // call this function instead of AddToConsole() until an instance of CConsoleSCB exists to prevent messages from getting lost - -public Q_SLOTS: - void OnStyleSettingsChanged(); - -private Q_SLOTS: - void showVariableEditor(); - -private: - QScopedPointer ui; - int m_richEditTextLength; - - Lines m_lines; - static Lines s_pendingLines; - - QList m_colorTable; - SEditorSettings::ConsoleColorTheme m_backgroundTheme; -}; - -} // namespace MFC - -#endif // CRYINCLUDE_EDITOR_CONTROLS_CONSOLESCB_H - diff --git a/Code/Editor/Controls/ConsoleSCBMFC.ui b/Code/Editor/Controls/ConsoleSCBMFC.ui deleted file mode 100644 index b9386558ed..0000000000 --- a/Code/Editor/Controls/ConsoleSCBMFC.ui +++ /dev/null @@ -1,132 +0,0 @@ - - - ConsoleMFC - - - - 0 - 0 - 400 - 120 - - - - - 0 - 0 - - - - Console - - - - 0 - - - 0 - - - - - - 0 - 0 - - - - - - - - - - - - 0 - 0 - - - - - 0 - 20 - - - - - 16777215 - 20 - - - - true - - - - - - - 0 - - - 0 - - - - - - 0 - 0 - - - - - 20 - 0 - - - - - 20 - 30 - - - - - 0 - 0 - - - - - - - - - - - - 0 - 0 - - - - - - - - - - - - MFC::ConsoleLineEdit - QLineEdit -
ConsoleSCBMFC.h
-
-
- - - - -
diff --git a/Code/Editor/Controls/HotTrackingTreeCtrl.cpp b/Code/Editor/Controls/HotTrackingTreeCtrl.cpp deleted file mode 100644 index 54152a9fd4..0000000000 --- a/Code/Editor/Controls/HotTrackingTreeCtrl.cpp +++ /dev/null @@ -1,48 +0,0 @@ -/* - * Copyright (c) Contributors to the Open 3D Engine Project. - * For complete copyright and license terms please see the LICENSE at the root of this distribution. - * - * SPDX-License-Identifier: Apache-2.0 OR MIT - * - */ - - -#include "EditorDefs.h" - -#include "HotTrackingTreeCtrl.h" - -// Qt -#include - - -CHotTrackingTreeCtrl::CHotTrackingTreeCtrl(QWidget* parent) - : QTreeWidget(parent) -{ - setMouseTracking(true); - m_hHoverItem = nullptr; -} - -void CHotTrackingTreeCtrl::mouseMoveEvent(QMouseEvent* event) -{ - QTreeWidgetItem* hItem = itemAt(event->pos()); - - if (m_hHoverItem != nullptr) - { - QFont font = m_hHoverItem->font(0); - font.setBold(false); - m_hHoverItem->setFont(0, font); - m_hHoverItem = nullptr; - } - - if (hItem != nullptr) - { - QFont font = hItem->font(0); - font.setBold(true); - hItem->setFont(0, font); - m_hHoverItem = hItem; - } - - QTreeWidget::mouseMoveEvent(event); -} - -#include diff --git a/Code/Editor/Controls/HotTrackingTreeCtrl.h b/Code/Editor/Controls/HotTrackingTreeCtrl.h deleted file mode 100644 index 2ca7e11a91..0000000000 --- a/Code/Editor/Controls/HotTrackingTreeCtrl.h +++ /dev/null @@ -1,33 +0,0 @@ -/* - * Copyright (c) Contributors to the Open 3D Engine Project. - * For complete copyright and license terms please see the LICENSE at the root of this distribution. - * - * SPDX-License-Identifier: Apache-2.0 OR MIT - * - */ - - -#ifndef CRYINCLUDE_EDITOR_CONTROLS_HOTTRACKINGTREECTRL_H -#define CRYINCLUDE_EDITOR_CONTROLS_HOTTRACKINGTREECTRL_H -#pragma once - -#if !defined(Q_MOC_RUN) -#include -#endif - -class CHotTrackingTreeCtrl - : public QTreeWidget -{ - Q_OBJECT - -public: - CHotTrackingTreeCtrl(QWidget* parent = 0); - virtual ~CHotTrackingTreeCtrl(){}; - -protected: - void mouseMoveEvent(QMouseEvent* event) override; - -private: - QTreeWidgetItem* m_hHoverItem; -}; -#endif // CRYINCLUDE_EDITOR_CONTROLS_HOTTRACKINGTREECTRL_H diff --git a/Code/Editor/Controls/ImageListCtrl.cpp b/Code/Editor/Controls/ImageListCtrl.cpp deleted file mode 100644 index 9c8451c2e9..0000000000 --- a/Code/Editor/Controls/ImageListCtrl.cpp +++ /dev/null @@ -1,567 +0,0 @@ -/* - * Copyright (c) Contributors to the Open 3D Engine Project. - * For complete copyright and license terms please see the LICENSE at the root of this distribution. - * - * SPDX-License-Identifier: Apache-2.0 OR MIT - * - */ - - -#include "EditorDefs.h" - -#include "ImageListCtrl.h" - -// Qt -#include -#include - -////////////////////////////////////////////////////////////////////////// -CImageListCtrl::CImageListCtrl(QWidget* parent) - : QAbstractItemView(parent) - , m_itemSize(60, 60) - , m_borderSize(4, 4) - , m_style(DefaultStyle) -{ - setItemDelegate(new QImageListDelegate(this)); - setAutoFillBackground(false); - - QPalette p = palette(); - p.setColor(QPalette::Highlight, QColor(255, 55, 50)); - setPalette(p); - - horizontalScrollBar()->setRange(0, 0); - verticalScrollBar()->setRange(0, 0); -} - -////////////////////////////////////////////////////////////////////////// -CImageListCtrl::~CImageListCtrl() -{ -} - -////////////////////////////////////////////////////////////////////////// -CImageListCtrl::ListStyle CImageListCtrl::Style() const -{ - return m_style; -} - -////////////////////////////////////////////////////////////////////////// -void CImageListCtrl::SetStyle(ListStyle style) -{ - m_style = style; - scheduleDelayedItemsLayout(); -} - -////////////////////////////////////////////////////////////////////////// -const QSize& CImageListCtrl::ItemSize() const -{ - return m_itemSize; -} - -////////////////////////////////////////////////////////////////////////// -void CImageListCtrl::SetItemSize(QSize size) -{ - Q_ASSERT(size.isValid()); - m_itemSize = size; - scheduleDelayedItemsLayout(); -} - -////////////////////////////////////////////////////////////////////////// -const QSize& CImageListCtrl::BorderSize() const -{ - return m_borderSize; -} - -////////////////////////////////////////////////////////////////////////// -void CImageListCtrl::SetBorderSize(QSize size) -{ - Q_ASSERT(size.isValid()); - m_borderSize = size; - scheduleDelayedItemsLayout(); -} - -////////////////////////////////////////////////////////////////////////// -QModelIndexList CImageListCtrl::ItemsInRect(const QRect& rect) const -{ - QModelIndexList list; - - if (!model()) - { - return list; - } - - QHash::const_iterator i; - QHash::const_iterator c = m_geometry.cend(); - for (i = m_geometry.cbegin(); i != c; ++i) - { - if (i.value().intersects(rect)) - { - list << model()->index(i.key(), 0, rootIndex()); - } - } - - return list; -} - -////////////////////////////////////////////////////////////////////////// -void CImageListCtrl::paintEvent(QPaintEvent* event) -{ - QAbstractItemView::paintEvent(event); - - if (!model()) - { - return; - } - - const int rowCount = model()->rowCount(); - - if (m_geometry.isEmpty() && rowCount) - { - updateGeometries(); - } - - QPainter painter(viewport()); - painter.setRenderHints(QPainter::Antialiasing | QPainter::TextAntialiasing); - painter.setBackground(palette().window()); - painter.setFont(font()); - - QStyleOptionViewItem option; - option.palette = palette(); - option.font = font(); - option.fontMetrics = fontMetrics(); - option.decorationAlignment = Qt::AlignCenter; - - const QRect visibleRect(QPoint(horizontalOffset(), verticalOffset()), viewport()->contentsRect().size()); - - painter.translate(-horizontalOffset(), -verticalOffset()); - - for (int r = 0; r < rowCount; ++r) - { - const QModelIndex& index = model()->index(r, 0, rootIndex()); - - option.rect = m_geometry.value(r); - if (!option.rect.intersects(visibleRect)) - { - continue; - } - - option.state = QStyle::State_None; - - if (selectionModel()->isSelected(index)) - { - option.state |= QStyle::State_Selected; - } - - if (currentIndex() == index) - { - option.state |= QStyle::State_HasFocus; - } - - QAbstractItemDelegate* idt = itemDelegate(index); - idt->paint(&painter, option, index); - } -} - -////////////////////////////////////////////////////////////////////////// -void CImageListCtrl::rowsInserted(const QModelIndex& parent, int start, int end) -{ - QAbstractItemView::rowsInserted(parent, start, end); - - if (isVisible()) - { - scheduleDelayedItemsLayout(); - } -} - -////////////////////////////////////////////////////////////////////////// -void CImageListCtrl::updateGeometries() -{ - ClearItemGeometries(); - - if (!model()) - { - return; - } - - const int rowCount = model()->rowCount(); - - const int nPageHorz = viewport()->width(); - const int nPageVert = viewport()->height(); - - if (nPageHorz == 0 || nPageVert == 0 || rowCount <= 0) - { - return; - } - - int x = m_borderSize.width(); - int y = m_borderSize.height(); - - const int nItemWidth = m_itemSize.width() + m_borderSize.width(); - - if (m_style == HorizontalStyle) - { - for (int row = 0; row < rowCount; ++row) - { - m_geometry.insert(row, QRect(QPoint(x, y), m_itemSize)); - x += nItemWidth; - } - - horizontalScrollBar()->setPageStep(viewport()->width()); - horizontalScrollBar()->setRange(0, x - viewport()->width()); - } - else - { - const int nTextHeight = fontMetrics().height(); - const int nItemHeight = m_itemSize.height() + m_borderSize.height() + nTextHeight; - - int nNumOfHorzItems = nPageHorz / nItemWidth; - if (nNumOfHorzItems <= 0) - { - nNumOfHorzItems = 1; - } - - for (int row = 0; row < rowCount; ++row) - { - m_geometry.insert(row, QRect(QPoint(x, y), m_itemSize)); - - if ((row + 1) % nNumOfHorzItems == 0) - { - y += nItemHeight; - x = m_borderSize.width(); - } - else - { - x += nItemWidth; - } - } - - verticalScrollBar()->setPageStep(viewport()->height()); - verticalScrollBar()->setRange(0, (y + nItemHeight) - viewport()->height()); - } -} - -////////////////////////////////////////////////////////////////////////// -QModelIndex CImageListCtrl::indexAt(const QPoint& point) const -{ - if (!model()) - { - return QModelIndex(); - } - - const QPoint p = point + - QPoint(horizontalOffset(), verticalOffset()); - - QHash::const_iterator i; - QHash::const_iterator c = m_geometry.cend(); - for (i = m_geometry.cbegin(); i != c; ++i) - { - if (i.value().contains(p)) - { - return model()->index(i.key(), 0, rootIndex()); - } - } - - return QModelIndex(); -} - -////////////////////////////////////////////////////////////////////////// -void CImageListCtrl::scrollTo(const QModelIndex& index, ScrollHint hint) -{ - if (!index.isValid()) - { - return; - } - - QRect rect = m_geometry.value(index.row()); - - switch (hint) - { - case EnsureVisible: - if (horizontalOffset() > rect.right()) - { - horizontalScrollBar()->setValue(rect.left()); - } - else if ((horizontalOffset() + viewport()->width()) < rect.left()) - { - horizontalScrollBar()->setValue(rect.right() - viewport()->width()); - } - - if (verticalOffset() > rect.bottom()) - { - verticalScrollBar()->setValue(rect.top()); - } - else if ((verticalOffset() + viewport()->height()) < rect.top()) - { - verticalScrollBar()->setValue(rect.bottom() - viewport()->height()); - } - break; - - case PositionAtTop: - horizontalScrollBar()->setValue(rect.left()); - verticalScrollBar()->setValue(rect.top()); - break; - - case PositionAtBottom: - horizontalScrollBar()->setValue(rect.right() - viewport()->width()); - verticalScrollBar()->setValue(rect.bottom() - viewport()->height()); - break; - - case PositionAtCenter: - horizontalScrollBar()->setValue(rect.center().x() - (viewport()->width() / 2)); - verticalScrollBar()->setValue(rect.center().y() - (viewport()->height() / 2)); - break; - } -} - -////////////////////////////////////////////////////////////////////////// -QRect CImageListCtrl::visualRect(const QModelIndex& index) const -{ - if (!index.isValid()) - { - return QRect(); - } - - - if (!m_geometry.contains(index.row())) - { - return QRect(); - } - - return m_geometry.value(index.row()) - .translated(-horizontalOffset(), -verticalOffset()); -} - -////////////////////////////////////////////////////////////////////////// -QRect CImageListCtrl::ItemGeometry(const QModelIndex& index) const -{ - Q_ASSERT(index.model() == model()); - Q_ASSERT(m_geometry.contains(index.row())); - - return m_geometry.value(index.row()); -} - -void CImageListCtrl::SetItemGeometry(const QModelIndex& index, const QRect& rect) -{ - Q_ASSERT(index.model() == model()); - m_geometry.insert(index.row(), rect); - update(rect); -} - -void CImageListCtrl::ClearItemGeometries() -{ - m_geometry.clear(); -} - -////////////////////////////////////////////////////////////////////////// -int CImageListCtrl::horizontalOffset() const -{ - return horizontalScrollBar()->value(); -} - -////////////////////////////////////////////////////////////////////////// -int CImageListCtrl::verticalOffset() const -{ - return verticalScrollBar()->value(); -} - -////////////////////////////////////////////////////////////////////////// -bool CImageListCtrl::isIndexHidden([[maybe_unused]] const QModelIndex& index) const -{ - return false; /* not supported */ -} - -////////////////////////////////////////////////////////////////////////// -QModelIndex CImageListCtrl::moveCursor(CursorAction cursorAction, [[maybe_unused]] Qt::KeyboardModifiers modifiers) -{ - if (!model()) - { - return QModelIndex(); - } - - const int rowCount = model()->rowCount(); - - if (0 == rowCount) - { - return QModelIndex(); - } - - switch (cursorAction) - { - case MoveHome: - return model()->index(0, 0, rootIndex()); - - case MoveEnd: - return model()->index(rowCount - 1, 0, rootIndex()); - - case MovePrevious: - { - QModelIndex current = currentIndex(); - if (current.isValid()) - { - return model()->index((current.row() - 1) % rowCount, 0, rootIndex()); - } - } break; - - case MoveNext: - { - QModelIndex current = currentIndex(); - if (current.isValid()) - { - return model()->index((current.row() + 1) % rowCount, 0, rootIndex()); - } - } break; - - case MoveUp: - case MoveDown: - case MoveLeft: - case MoveRight: - case MovePageUp: - case MovePageDown: - /* TODO */ - break; - } - return QModelIndex(); -} - -////////////////////////////////////////////////////////////////////////// -void CImageListCtrl::setSelection(const QRect& rect, QItemSelectionModel::SelectionFlags flags) -{ - if (!model()) - { - return; - } - - const QRect lrect = - rect.translated(horizontalOffset(), verticalOffset()); - - QHash::const_iterator i; - QHash::const_iterator c = m_geometry.cend(); - for (i = m_geometry.cbegin(); i != c; ++i) - { - if (i.value().intersects(lrect)) - { - selectionModel()->select(model()->index(i.key(), 0, rootIndex()), flags); - } - } -} - -////////////////////////////////////////////////////////////////////////// -QRegion CImageListCtrl::visualRegionForSelection(const QItemSelection& selection) const -{ - QRegion region; - - foreach(const QModelIndex &index, selection.indexes()) - { - region += visualRect(index); - } - - return region; -} - -////////////////////////////////////////////////////////////////////////// -QImageListDelegate::QImageListDelegate(QObject* parent) - : QAbstractItemDelegate(parent) -{ -} - -////////////////////////////////////////////////////////////////////////// -void QImageListDelegate::paint(QPainter* painter, - const QStyleOptionViewItem& option, const QModelIndex& index) const -{ - painter->save(); - - painter->setFont(option.font); - - if (option.rect.isValid()) - { - painter->setClipRect(option.rect); - } - - QRect innerRect = option.rect.adjusted(1, 1, -1, -1); - - QRect textRect(innerRect.left(), innerRect.bottom() - option.fontMetrics.height(), - innerRect.width(), option.fontMetrics.height() + 1); - - /* fill item background */ - - painter->fillRect(option.rect, option.palette.color(QPalette::Base)); - - /* draw image */ - - if (index.data(Qt::DecorationRole).isValid()) - { - const QPixmap& p = index.data(Qt::DecorationRole).value(); - if (p.isNull() || p.size() == QSize(1, 1)) - { - emit InvalidPixmapGenerated(index); - } - else - { - painter->drawPixmap(innerRect, p); - } - } - - /* draw text */ - - const QColor trColor = option.palette.color(QPalette::Shadow); - painter->fillRect(textRect, (option.state & QStyle::State_Selected) ? - trColor.lighter() : trColor); - - if (option.state & QStyle::State_Selected) - { - painter->setPen(QPen(option.palette.color(QPalette::HighlightedText))); - - QFont f = painter->font(); - f.setBold(true); - painter->setFont(f); - } - else - { - painter->setPen(QPen(option.palette.color(QPalette::Text))); - } - - painter->drawText(textRect, index.data(Qt::DisplayRole).toString(), - QTextOption(option.decorationAlignment)); - - painter->setPen(QPen(option.palette.color(QPalette::Shadow))); - painter->drawRect(textRect); - - /* draw border */ - - if (option.state & QStyle::State_Selected) - { - QPen pen(option.palette.color(QPalette::Highlight)); - pen.setWidth(2); - painter->setPen(pen); - painter->drawRect(innerRect); - } - else - { - painter->setPen(QPen(option.palette.color(QPalette::Shadow))); - painter->drawRect(option.rect); - } - - if (option.state & QStyle::State_HasFocus) - { - QPen pen(Qt::DotLine); - pen.setColor(option.palette.color(QPalette::AlternateBase)); - painter->setPen(pen); - painter->drawRect(option.rect); - } - - painter->restore(); -} - -////////////////////////////////////////////////////////////////////////// -QSize QImageListDelegate::sizeHint(const QStyleOptionViewItem& option, - [[maybe_unused]] const QModelIndex& index) const -{ - return option.rect.size(); -} - -////////////////////////////////////////////////////////////////////////// -QVector QImageListDelegate::paintingRoles() const -{ - return QVector() << Qt::DecorationRole << Qt::DisplayRole; -} - -#include diff --git a/Code/Editor/Controls/ImageListCtrl.h b/Code/Editor/Controls/ImageListCtrl.h deleted file mode 100644 index db393c8497..0000000000 --- a/Code/Editor/Controls/ImageListCtrl.h +++ /dev/null @@ -1,97 +0,0 @@ -/* - * Copyright (c) Contributors to the Open 3D Engine Project. - * For complete copyright and license terms please see the LICENSE at the root of this distribution. - * - * SPDX-License-Identifier: Apache-2.0 OR MIT - * - */ - - -#ifndef CRYINCLUDE_EDITOR_CONTROLS_IMAGELISTCTRL_H -#define CRYINCLUDE_EDITOR_CONTROLS_IMAGELISTCTRL_H -#pragma once - -#if !defined(Q_MOC_RUN) -#include - -#include -#endif - -////////////////////////////////////////////////////////////////////////// -// Custom control to display list of images. -////////////////////////////////////////////////////////////////////////// -class CImageListCtrl - : public QAbstractItemView -{ - Q_OBJECT -public: - enum ListStyle - { - DefaultStyle, - HorizontalStyle - }; - -public: - CImageListCtrl(QWidget* parent = nullptr); - ~CImageListCtrl(); - - ListStyle Style() const; - void SetStyle(ListStyle style); - - const QSize& ItemSize() const; - void SetItemSize(QSize size); - - const QSize& BorderSize() const; - void SetBorderSize(QSize size); - - // Get all items inside specified rectangle. - QModelIndexList ItemsInRect(const QRect& rect) const; - - QModelIndex indexAt(const QPoint& point) const override; - void scrollTo(const QModelIndex& index, ScrollHint hint = EnsureVisible) override; - QRect visualRect(const QModelIndex& index) const override; - -protected: - QRect ItemGeometry(const QModelIndex& index) const; - void SetItemGeometry(const QModelIndex& index, const QRect& rect); - void ClearItemGeometries(); - - int horizontalOffset() const override; - int verticalOffset() const override; - bool isIndexHidden(const QModelIndex& index) const override; - QModelIndex moveCursor(CursorAction cursorAction, Qt::KeyboardModifiers modifiers) override; - void setSelection(const QRect& rect, QItemSelectionModel::SelectionFlags flags) override; - QRegion visualRegionForSelection(const QItemSelection& selection) const override; - - void paintEvent(QPaintEvent* event) override; - void rowsInserted(const QModelIndex& parent, int start, int end) override; - - void updateGeometries() override; - -private: - QHash m_geometry; - QSize m_itemSize; - QSize m_borderSize; - ListStyle m_style; -}; - -class QImageListDelegate - : public QAbstractItemDelegate -{ - Q_OBJECT -signals: - void InvalidPixmapGenerated(const QModelIndex& index) const; -public: - QImageListDelegate(QObject* parent = nullptr); - - void paint(QPainter* painter, - const QStyleOptionViewItem& option, - const QModelIndex& index) const override; - - QSize sizeHint(const QStyleOptionViewItem& option, - const QModelIndex& index) const override; - - QVector paintingRoles() const override; -}; - -#endif // CRYINCLUDE_EDITOR_CONTROLS_IMAGELISTCTRL_H diff --git a/Code/Editor/Controls/MultiMonHelper.cpp b/Code/Editor/Controls/MultiMonHelper.cpp deleted file mode 100644 index 5b3ed3a204..0000000000 --- a/Code/Editor/Controls/MultiMonHelper.cpp +++ /dev/null @@ -1,67 +0,0 @@ -/* - * Copyright (c) Contributors to the Open 3D Engine Project. - * For complete copyright and license terms please see the LICENSE at the root of this distribution. - * - * SPDX-License-Identifier: Apache-2.0 OR MIT - * - */ - - -#include "EditorDefs.h" - -#include "MultiMonHelper.h" - -// Qt -#include - -//////////////////////////////////////////////////////////////////////////// -void ClipOrCenterRectToMonitor(QRect *prc, const UINT flags) -{ - const QScreen* currentScreen = nullptr; - QRect rc; - - Q_ASSERT(prc); - - const auto screens = qApp->screens(); - for (auto screen : screens) - { - if (screen->geometry().contains(prc->center())) - { - currentScreen = screen; - break; - } - } - - if (!currentScreen) - { - return; - } - - const int w = prc->width(); - const int h = prc->height(); - - if (flags & MONITOR_WORKAREA) - { - rc = currentScreen->availableGeometry(); - } - else - { - rc = currentScreen->geometry(); - } - - // center or clip the passed rect to the monitor rect - if (flags & MONITOR_CENTER) - { - prc->setLeft(rc.left() + (rc.right() - rc.left() - w) / 2); - prc->setTop(rc.top() + (rc.bottom() - rc.top() - h) / 2); - prc->setRight(prc->left() + w); - prc->setBottom(prc->top() + h); - } - else - { - prc->setLeft(qMax(rc.left(), qMin(rc.right() - w, prc->left()))); - prc->setTop(qMax(rc.top(), qMin(rc.bottom() - h, prc->top()))); - prc->setRight(prc->left() + w); - prc->setBottom(prc->top() + h); - } -} diff --git a/Code/Editor/Controls/MultiMonHelper.h b/Code/Editor/Controls/MultiMonHelper.h deleted file mode 100644 index 54e47bf022..0000000000 --- a/Code/Editor/Controls/MultiMonHelper.h +++ /dev/null @@ -1,44 +0,0 @@ -/* - * Copyright (c) Contributors to the Open 3D Engine Project. - * For complete copyright and license terms please see the LICENSE at the root of this distribution. - * - * SPDX-License-Identifier: Apache-2.0 OR MIT - * - */ - - -#ifndef CRYINCLUDE_EDITOR_CONTROLS_MULTIMONHELPER_H -#define CRYINCLUDE_EDITOR_CONTROLS_MULTIMONHELPER_H -#pragma once - -// Taken from: http://msdn.microsoft.com/en-us/library/dd162826(v=vs.85).aspx -#define MONITOR_CENTER 0x0001 // center rect to monitor -#define MONITOR_CLIP 0x0000 // clip rect to monitor -#define MONITOR_WORKAREA 0x0002 // use monitor work area -#define MONITOR_AREA 0x0000 // use monitor entire area - -// -// ClipOrCenterRectToMonitor -// -// The most common problem apps have when running on a -// multimonitor system is that they "clip" or "pin" windows -// based on the SM_CXSCREEN and SM_CYSCREEN system metrics. -// Because of app compatibility reasons these system metrics -// return the size of the primary monitor. -// -// This shows how you use the multi-monitor functions -// to do the same thing. -// -// params: -// prc : pointer to QRect to modify -// flags : some combination of the MONITOR_* flags above -// -// example: -// -// ClipOrCenterRectToMonitor(&aRect, MONITOR_CLIP | MONITOR_WORKAREA); -// -// Takes parameter pointer to RECT "aRect" and flags MONITOR_CLIP | MONITOR_WORKAREA -// This will modify aRect without resizing it so that it remains within the on-screen boundaries. -void ClipOrCenterRectToMonitor(QRect *prc, const UINT flags); - -#endif // CRYINCLUDE_EDITOR_CONTROLS_MULTIMONHELPER_H diff --git a/Code/Editor/Controls/NumberCtrl.cpp b/Code/Editor/Controls/NumberCtrl.cpp deleted file mode 100644 index 473dd7e4af..0000000000 --- a/Code/Editor/Controls/NumberCtrl.cpp +++ /dev/null @@ -1,143 +0,0 @@ -/* - * Copyright (c) Contributors to the Open 3D Engine Project. - * For complete copyright and license terms please see the LICENSE at the root of this distribution. - * - * SPDX-License-Identifier: Apache-2.0 OR MIT - * - */ - - -#include "EditorDefs.h" - -#include "NumberCtrl.h" - - -QNumberCtrl::QNumberCtrl(QWidget* parent) - : QDoubleSpinBox(parent) - , m_bMouseDown(false) - , m_bDragged(false) - , m_bUndoEnabled(false) - , m_prevValue(0) -{ - connect(this, &QAbstractSpinBox::editingFinished, this, &QNumberCtrl::onEditingFinished); -} - -void QNumberCtrl::changeEvent(QEvent* event) -{ - if (event->type() == QEvent::EnabledChange) - { - setButtonSymbols(isEnabled() ? UpDownArrows : NoButtons); - } - - QDoubleSpinBox::changeEvent(event); -} - - -void QNumberCtrl::SetRange(double newMin, double newMax) -{ - // Avoid setting this value if its close to the current value, because otherwise qt will pump events into the queue to redraw/etc. - if ( (!AZ::IsClose(this->minimum(), newMin, DBL_EPSILON)) || (!AZ::IsClose(this->maximum(), newMax, DBL_EPSILON)) ) - { - setRange(newMin, newMax); - } -} - - -void QNumberCtrl::mousePressEvent(QMouseEvent* event) -{ - if (event->button() == Qt::LeftButton) - { - emit mousePressed(); - - m_bMouseDown = true; - m_bDragged = false; - m_mousePos = event->pos(); - - if (m_bUndoEnabled && !CUndo::IsRecording()) - { - GetIEditor()->BeginUndo(); - } - - emit dragStarted(); - - grabMouse(); - } - - QDoubleSpinBox::mousePressEvent(event); -} - -void QNumberCtrl::mouseReleaseEvent(QMouseEvent* event) -{ - QDoubleSpinBox::mouseReleaseEvent(event); - - if (event->button() == Qt::LeftButton) - { - m_bMouseDown = m_bDragged = false; - - emit valueUpdated(); - emit valueChanged(); - - if (m_bUndoEnabled && CUndo::IsRecording()) - { - GetIEditor()->AcceptUndo(m_undoText); - } - - emit dragFinished(); - - releaseMouse(); - - m_prevValue = value(); - - emit mouseReleased(); - } -} - -void QNumberCtrl::mouseMoveEvent(QMouseEvent* event) -{ - QDoubleSpinBox::mousePressEvent(event); - - if (m_bMouseDown) - { - m_bDragged = true; - - int dy = event->pos().y() - m_mousePos.y(); - setValue(value() - singleStep() * dy); - - emit valueUpdated(); - - m_mousePos = event->pos(); - } -} - -void QNumberCtrl::EnableUndo(const QString& undoText) -{ - m_undoText = undoText; - m_bUndoEnabled = true; -} - -void QNumberCtrl::focusInEvent(QFocusEvent* event) -{ - m_prevValue = value(); - QDoubleSpinBox::focusInEvent(event); -} - -void QNumberCtrl::onEditingFinished() -{ - bool undo = m_bUndoEnabled && !CUndo::IsRecording() && m_prevValue != value(); - if (undo) - { - GetIEditor()->BeginUndo(); - } - - emit valueUpdated(); - emit valueChanged(); - - if (undo) - { - GetIEditor()->AcceptUndo(m_undoText); - } - - m_prevValue = value(); -} - -#include diff --git a/Code/Editor/Controls/NumberCtrl.h b/Code/Editor/Controls/NumberCtrl.h deleted file mode 100644 index 22ee7b867f..0000000000 --- a/Code/Editor/Controls/NumberCtrl.h +++ /dev/null @@ -1,64 +0,0 @@ -/* - * Copyright (c) Contributors to the Open 3D Engine Project. - * For complete copyright and license terms please see the LICENSE at the root of this distribution. - * - * SPDX-License-Identifier: Apache-2.0 OR MIT - * - */ - - -#ifndef CRYINCLUDE_EDITOR_CONTROLS_NUMBERCTRL_H -#define CRYINCLUDE_EDITOR_CONTROLS_NUMBERCTRL_H -#pragma once - -// NumberCtrl.h : header file -// - -#if !defined(Q_MOC_RUN) -#include -#endif - -class QNumberCtrl - : public QDoubleSpinBox -{ - Q_OBJECT - -public: - QNumberCtrl(QWidget* parent = nullptr); - - bool IsDragging() const { return m_bDragged; } - - //! If called will enable undo with given text when control is modified. - void EnableUndo(const QString& undoText); - void SetRange(double newMin, double maxRange); - -Q_SIGNALS: - void dragStarted(); - void dragFinished(); - - void valueUpdated(); - void valueChanged(); - - void mouseReleased(); - void mousePressed(); - -protected: - void changeEvent(QEvent* event) override; - void focusInEvent(QFocusEvent* event) override; - void mousePressEvent(QMouseEvent* event) override; - void mouseMoveEvent(QMouseEvent* event) override; - void mouseReleaseEvent(QMouseEvent* event) override; - -private: - void onEditingFinished(); - void onValueChanged(double d); - - bool m_bMouseDown; - bool m_bDragged; - QPoint m_mousePos; - bool m_bUndoEnabled; - double m_prevValue; - QString m_undoText; -}; - -#endif // CRYINCLUDE_EDITOR_CONTROLS_NUMBERCTRL_H diff --git a/Code/Editor/Controls/ReflectedPropertyControl/ReflectedPropertyCtrl.cpp b/Code/Editor/Controls/ReflectedPropertyControl/ReflectedPropertyCtrl.cpp index 1151137bfc..c5bf6a4d81 100644 --- a/Code/Editor/Controls/ReflectedPropertyControl/ReflectedPropertyCtrl.cpp +++ b/Code/Editor/Controls/ReflectedPropertyControl/ReflectedPropertyCtrl.cpp @@ -671,7 +671,7 @@ AzToolsFramework::PropertyRowWidget* ReflectedPropertyControl::FindPropertyRowWi return nullptr; } const AzToolsFramework::ReflectedPropertyEditor::WidgetList& widgets = m_editor->GetWidgets(); - for (auto instance : widgets) + for (const auto& instance : widgets) { if (instance.second->label() == item->GetPropertyName()) { diff --git a/Code/Editor/Controls/SplineCtrlEx.cpp b/Code/Editor/Controls/SplineCtrlEx.cpp index 1dc2ff19e1..bff75af169 100644 --- a/Code/Editor/Controls/SplineCtrlEx.cpp +++ b/Code/Editor/Controls/SplineCtrlEx.cpp @@ -82,7 +82,6 @@ protected: } int GetSize() override { return sizeof(*this); } - QString GetDescription() override { return "UndoSplineCtrlEx"; }; void Undo(bool bUndo) override { diff --git a/Code/Editor/Controls/TextEditorCtrl.cpp b/Code/Editor/Controls/TextEditorCtrl.cpp deleted file mode 100644 index c372138d80..0000000000 --- a/Code/Editor/Controls/TextEditorCtrl.cpp +++ /dev/null @@ -1,93 +0,0 @@ -/* - * Copyright (c) Contributors to the Open 3D Engine Project. - * For complete copyright and license terms please see the LICENSE at the root of this distribution. - * - * SPDX-License-Identifier: Apache-2.0 OR MIT - * - */ - - -#include "EditorDefs.h" - -#include "TextEditorCtrl.h" - - -// CTextEditorCtrl -CTextEditorCtrl::CTextEditorCtrl(QWidget* pParent) - : QTextEdit(pParent) -{ - m_bModified = true; - - QFont font; - font.setFamily("Courier New"); - font.setFixedPitch(true); - font.setPointSize(10); - setFont(font); - - setLineWrapMode(NoWrap); - - connect(this, &QTextEdit::textChanged, this, &CTextEditorCtrl::OnChange); -} - -CTextEditorCtrl::~CTextEditorCtrl() -{ -} - - -// CTextEditorCtrl message handlers - -void CTextEditorCtrl::LoadFile(const QString& sFileName) -{ - if (m_filename == sFileName) - { - return; - } - - m_filename = sFileName; - - clear(); - - CCryFile file(sFileName.toUtf8().data(), "rb"); - if (file.Open(sFileName.toUtf8().data(), "rb")) - { - size_t length = file.GetLength(); - - QByteArray text; - text.resize(static_cast(length)); - file.ReadRaw(text.data(), length); - - setPlainText(text); - } - - m_bModified = false; -} - -////////////////////////////////////////////////////////////////////////// -void CTextEditorCtrl::SaveFile(const QString& sFileName) -{ - if (sFileName.isEmpty()) - { - return; - } - - if (!CFileUtil::OverwriteFile(sFileName.toUtf8().data())) - { - return; - } - - QFile file(sFileName); - file.open(QFile::WriteOnly); - - file.write(toPlainText().toUtf8()); - - m_bModified = false; -} - -////////////////////////////////////////////////////////////////////////// -void CTextEditorCtrl::OnChange() -{ - - m_bModified = true; -} - -#include diff --git a/Code/Editor/Controls/TextEditorCtrl.h b/Code/Editor/Controls/TextEditorCtrl.h deleted file mode 100644 index e155185f90..0000000000 --- a/Code/Editor/Controls/TextEditorCtrl.h +++ /dev/null @@ -1,42 +0,0 @@ -/* - * Copyright (c) Contributors to the Open 3D Engine Project. - * For complete copyright and license terms please see the LICENSE at the root of this distribution. - * - * SPDX-License-Identifier: Apache-2.0 OR MIT - * - */ - - -#ifndef CRYINCLUDE_EDITOR_CONTROLS_TEXTEDITORCTRL_H -#define CRYINCLUDE_EDITOR_CONTROLS_TEXTEDITORCTRL_H -#pragma once - -// CTextEditorCtrl -#if !defined(Q_MOC_RUN) -#include -#endif - -class CTextEditorCtrl - : public QTextEdit -{ - Q_OBJECT - -public: - CTextEditorCtrl(QWidget* pParent = nullptr); - virtual ~CTextEditorCtrl(); - - void LoadFile(const QString& sFileName); - void SaveFile(const QString& sFileName); - QString GetFilename() const { return m_filename; } - - bool IsModified() const { return m_bModified; } - - //! Must be called after OnChange message. - void OnChange(); - -protected: - QString m_filename; - bool m_bModified; -}; - -#endif // CRYINCLUDE_EDITOR_CONTROLS_TEXTEDITORCTRL_H diff --git a/Code/Editor/Controls/TreeCtrlUtils.h b/Code/Editor/Controls/TreeCtrlUtils.h deleted file mode 100644 index 7498360d2e..0000000000 --- a/Code/Editor/Controls/TreeCtrlUtils.h +++ /dev/null @@ -1,322 +0,0 @@ -/* - * Copyright (c) Contributors to the Open 3D Engine Project. - * For complete copyright and license terms please see the LICENSE at the root of this distribution. - * - * SPDX-License-Identifier: Apache-2.0 OR MIT - * - */ - - -#ifndef CRYINCLUDE_EDITOR_CONTROLS_TREECTRLUTILS_H -#define CRYINCLUDE_EDITOR_CONTROLS_TREECTRLUTILS_H -#pragma once - -#include - -namespace TreeCtrlUtils -{ - template - class TreeItemIterator - : public P - { - public: - typedef P Traits; - - //iterator traits, required by STL - typedef ptrdiff_t difference_type; - typedef HTREEITEM value_type; - typedef HTREEITEM* pointer; - typedef HTREEITEM& reference; - typedef std::forward_iterator_tag iterator_category; - - TreeItemIterator() - : pCtrl(0) - , hItem(0) {} - explicit TreeItemIterator(const P& traits) - : P(traits) - , pCtrl(0) - , hItem(0) {} - TreeItemIterator(const TreeItemIterator& other) - : P(other) - , pCtrl(other.pCtrl) - , hItem(other.hItem) {} - TreeItemIterator(CTreeCtrl* pCtrl, HTREEITEM hItem) - : pCtrl(pCtrl) - , hItem(hItem) {} - TreeItemIterator(CTreeCtrl* pCtrl, HTREEITEM hItem, const P& traits) - : P(traits) - , pCtrl(pCtrl) - , hItem(hItem) {} - - HTREEITEM operator*() {return hItem; } - bool operator==(const TreeItemIterator& other) const {return pCtrl == other.pCtrl && hItem == other.hItem; } - bool operator!=(const TreeItemIterator& other) const {return pCtrl != other.pCtrl || hItem != other.hItem; } - - TreeItemIterator& operator++() - { - HTREEITEM hNextItem = 0; - if (RecurseToChildren(hItem)) - { - hNextItem = (pCtrl ? pCtrl->GetChildItem(hItem) : 0); - } - while (pCtrl && hItem && !hNextItem) - { - hNextItem = pCtrl->GetNextSiblingItem(hItem); - if (!hNextItem) - { - hItem = pCtrl->GetParentItem(hItem); - } - } - hItem = hNextItem; - - return *this; - } - - TreeItemIterator operator++(int) {TreeItemIterator old = *this; ++(*this); return old; } - - CTreeCtrl* pCtrl; - HTREEITEM hItem; - }; - - class NonRecursiveTreeItemIteratorTraits - { - public: - bool RecurseToChildren(HTREEITEM hItem) {return false; } - }; - typedef TreeItemIterator NonRecursiveTreeItemIterator; - - class RecursiveTreeItemIteratorTraits - { - public: - bool RecurseToChildren(HTREEITEM hItem) {return true; } - }; - typedef TreeItemIterator RecursiveTreeItemIterator; - - inline RecursiveTreeItemIterator BeginTreeItemsRecursive(CTreeCtrl* pCtrl, HTREEITEM hItem = 0) - { - if (hItem == 0) - { - hItem = (pCtrl ? pCtrl->GetRootItem() : 0); - } - return RecursiveTreeItemIterator(pCtrl, hItem); - } - - inline RecursiveTreeItemIterator EndTreeItemsRecursive(CTreeCtrl* pCtrl, HTREEITEM hItem = 0) - { - HTREEITEM hEndItem = 0; - HTREEITEM hParent = hItem; - do - { - if (hParent) - { - hEndItem = pCtrl->GetNextSiblingItem(hParent); - } - hParent = (pCtrl && hParent ? pCtrl->GetParentItem(hParent) : 0); - } - while (hParent && !hEndItem); - return RecursiveTreeItemIterator(pCtrl, hEndItem); - } - - inline NonRecursiveTreeItemIterator BeginTreeItemsNonRecursive(CTreeCtrl* pCtrl, HTREEITEM hItem = 0) - { - if (hItem == 0) - { - hItem = (pCtrl ? pCtrl->GetRootItem() : 0); - } - if (hItem) - { - hItem = pCtrl->GetChildItem(hItem); - } - return NonRecursiveTreeItemIterator(pCtrl, hItem); - } - - inline NonRecursiveTreeItemIterator EndTreeItemsNonRecursive(CTreeCtrl* pCtrl, HTREEITEM hItem = 0) - { - HTREEITEM hEndItem = 0; - HTREEITEM hParent = 0; - while (hParent && !hEndItem) - { - hParent = (pCtrl && hItem ? pCtrl->GetParentItem(hItem) : 0); - if (hParent) - { - hEndItem = pCtrl->GetNextSiblingItem(hParent); - } - } - return NonRecursiveTreeItemIterator(pCtrl, hEndItem); - } - - template - class TreeItemDataIterator - { - public: - typedef T Type; - typedef TreeItemIterator

InternalIterator; - - //iterator traits, required by STL - typedef ptrdiff_t difference_type; - typedef Type* value_type; - typedef Type** pointer; - typedef Type*& reference; - typedef std::forward_iterator_tag iterator_category; - - TreeItemDataIterator() {} - TreeItemDataIterator(const TreeItemDataIterator& other) - : iterator(other.iterator) {AdvanceToValidIterator(); } - explicit TreeItemDataIterator(const InternalIterator& iterator) - : iterator(iterator) {AdvanceToValidIterator(); } - - Type* operator*() {return reinterpret_cast(iterator.pCtrl->GetItemData(iterator.hItem)); } - bool operator==(const TreeItemDataIterator& other) const {return iterator == other.iterator; } - bool operator!=(const TreeItemDataIterator& other) const {return iterator != other.iterator; } - - HTREEITEM GetTreeItem() {return iterator.hItem; } - - TreeItemDataIterator& operator++() - { - ++iterator; - AdvanceToValidIterator(); - return *this; - } - - TreeItemDataIterator operator++(int) {TreeItemDataIterator old = *this; ++(*this); return old; } - - private: - void AdvanceToValidIterator() - { - while (iterator.pCtrl && iterator.hItem && !iterator.pCtrl->GetItemData(iterator.hItem)) - { - ++iterator; - } - } - - InternalIterator iterator; - }; - - template - class RecursiveItemDataIteratorType - { - public: typedef TreeItemDataIterator type; - }; - template - inline TreeItemDataIterator BeginTreeItemDataRecursive(CTreeCtrl* pCtrl, HTREEITEM hItem = 0) - { - return TreeItemDataIterator(BeginTreeItemsRecursive(pCtrl, hItem)); - } - - template - inline TreeItemDataIterator EndTreeItemDataRecursive(CTreeCtrl* pCtrl, HTREEITEM hItem = 0) - { - return TreeItemDataIterator(EndTreeItemsRecursive(pCtrl, hItem)); - } - - template - class NonRecursiveItemDataIteratorType - { - typedef TreeItemDataIterator type; - }; - template - inline TreeItemDataIterator BeginTreeItemDataNonRecursive(CTreeCtrl* pCtrl, HTREEITEM hItem = 0) - { - return TreeItemDataIterator(BeginTreeItemsNonRecursive(pCtrl, hItem)); - } - - template - inline TreeItemDataIterator EndTreeItemDataNonRecursive(CTreeCtrl* pCtrl, HTREEITEM hItem = 0) - { - return TreeItemDataIterator(EndTreeItemsNonRecursive(pCtrl, hItem)); - } - - class SelectedTreeItemIterator - { - public: - SelectedTreeItemIterator() - : pCtrl(0) - , hItem(0) {} - SelectedTreeItemIterator(const SelectedTreeItemIterator& other) - : pCtrl(other.pCtrl) - , hItem(other.hItem) {} - SelectedTreeItemIterator(CXTTreeCtrl* pCtrl, HTREEITEM hItem) - : pCtrl(pCtrl) - , hItem(hItem) {} - - HTREEITEM operator*() {return hItem; } - bool operator==(const SelectedTreeItemIterator& other) const {return pCtrl == other.pCtrl && hItem == other.hItem; } - bool operator!=(const SelectedTreeItemIterator& other) const {return pCtrl != other.pCtrl || hItem != other.hItem; } - - SelectedTreeItemIterator& operator++() - { - hItem = (pCtrl ? pCtrl->GetNextSelectedItem(hItem) : 0); - - return *this; - } - - SelectedTreeItemIterator operator++(int) {SelectedTreeItemIterator old = *this; ++(*this); return old; } - - CXTTreeCtrl* pCtrl; - HTREEITEM hItem; - }; - - SelectedTreeItemIterator BeginSelectedTreeItems(CXTTreeCtrl* pCtrl) - { - return SelectedTreeItemIterator(pCtrl, (pCtrl ? pCtrl->GetFirstSelectedItem() : 0)); - } - - SelectedTreeItemIterator EndSelectedTreeItems(CXTTreeCtrl* pCtrl) - { - return SelectedTreeItemIterator(pCtrl, 0); - } - - template - class SelectedTreeItemDataIterator - { - public: - typedef T Type; - typedef SelectedTreeItemIterator InternalIterator; - - SelectedTreeItemDataIterator() {} - SelectedTreeItemDataIterator(const SelectedTreeItemDataIterator& other) - : iterator(other.iterator) {AdvanceToValidIterator(); } - explicit SelectedTreeItemDataIterator(const InternalIterator& iterator) - : iterator(iterator) {AdvanceToValidIterator(); } - - Type* operator*() {return reinterpret_cast(iterator.pCtrl->GetItemData(iterator.hItem)); } - bool operator==(const SelectedTreeItemDataIterator& other) const {return iterator == other.iterator; } - bool operator!=(const SelectedTreeItemDataIterator& other) const {return iterator != other.iterator; } - - HTREEITEM GetTreeItem() {return iterator.hItem; } - - SelectedTreeItemDataIterator& operator++() - { - ++iterator; - AdvanceToValidIterator(); - return *this; - } - - SelectedTreeItemDataIterator operator++(int) {SelectedTreeItemDataIterator old = *this; ++(*this); return old; } - - private: - void AdvanceToValidIterator() - { - while (iterator.pCtrl && iterator.hItem && !iterator.pCtrl->GetItemData(iterator.hItem)) - { - ++iterator; - } - } - - InternalIterator iterator; - }; - - template - SelectedTreeItemDataIterator BeginSelectedTreeItemData(CXTTreeCtrl* pCtrl) - { - return SelectedTreeItemDataIterator(BeginSelectedTreeItems(pCtrl)); - } - - template - SelectedTreeItemDataIterator EndSelectedTreeItemData(CXTTreeCtrl* pCtrl) - { - return SelectedTreeItemDataIterator(EndSelectedTreeItems(pCtrl)); - } -} - -#endif // CRYINCLUDE_EDITOR_CONTROLS_TREECTRLUTILS_H diff --git a/Code/Editor/Core/LevelEditorMenuHandler.cpp b/Code/Editor/Core/LevelEditorMenuHandler.cpp index 70aff10f87..05f06c87aa 100644 --- a/Code/Editor/Core/LevelEditorMenuHandler.cpp +++ b/Code/Editor/Core/LevelEditorMenuHandler.cpp @@ -104,6 +104,11 @@ namespace } } + // Currently (December 13, 2021), this function is only used by slice editor code. + // When the slice editor is not enabled, there are no references to the + // HideActionWhileEntitiesDeselected function, causing a compiler warning and + // subsequently a build error. +#ifdef ENABLE_SLICE_EDITOR void HideActionWhileEntitiesDeselected(QAction* action, EEditorNotifyEvent editorNotifyEvent) { if (action == nullptr) @@ -127,6 +132,7 @@ namespace break; } } +#endif void DisableActionWhileInSimMode(QAction* action, EEditorNotifyEvent editorNotifyEvent) { @@ -374,7 +380,6 @@ QMenu* LevelEditorMenuHandler::CreateFileMenu() { DisableActionWhileLevelChanges(fileOpenSlice, e); })); -#endif // Save Selected Slice auto saveSelectedSlice = fileMenu.AddAction(ID_FILE_SAVE_SELECTED_SLICE); @@ -391,7 +396,7 @@ QMenu* LevelEditorMenuHandler::CreateFileMenu() { HideActionWhileEntitiesDeselected(saveSliceToRoot, e); })); - +#endif // Open Recent m_mostRecentLevelsMenu = fileMenu.AddMenu(tr("Open Recent")); connect(m_mostRecentLevelsMenu, &QMenu::aboutToShow, this, &LevelEditorMenuHandler::UpdateMRUFiles); @@ -439,9 +444,10 @@ QMenu* LevelEditorMenuHandler::CreateFileMenu() // Show Log File fileMenu.AddAction(ID_FILE_EDITLOGFILE); +#ifdef ENABLE_SLICE_EDITOR fileMenu.AddSeparator(); - fileMenu.AddAction(ID_FILE_RESAVESLICES); +#endif fileMenu.AddSeparator(); @@ -538,6 +544,7 @@ void LevelEditorMenuHandler::PopulateEditMenu(ActionManager::MenuWrapper& editMe auto snapMenu = modifyMenu.AddMenu(tr("Snap")); snapMenu.AddAction(AzToolsFramework::SnapAngle); + snapMenu.AddAction(AzToolsFramework::SnapToGrid); auto transformModeMenu = modifyMenu.AddMenu(tr("Transform Mode")); transformModeMenu.AddAction(AzToolsFramework::EditModeMove); @@ -723,7 +730,8 @@ QMenu* LevelEditorMenuHandler::CreateViewMenu() // MISSING AVIRECORDER viewportViewsMenuWrapper.AddSeparator(); - viewportViewsMenuWrapper.AddAction(ID_DISPLAY_SHOWHELPERS); + viewportViewsMenuWrapper.AddAction(AzToolsFramework::Helpers); + viewportViewsMenuWrapper.AddAction(AzToolsFramework::Icons); // Refresh Style viewMenu.AddAction(ID_SKINS_REFRESH); diff --git a/Code/Editor/CryEdit.cpp b/Code/Editor/CryEdit.cpp index c5c3acd2f6..1c4e22b99e 100644 --- a/Code/Editor/CryEdit.cpp +++ b/Code/Editor/CryEdit.cpp @@ -33,6 +33,7 @@ AZ_POP_DISABLE_WARNING #include #include #include +#include #include // Aws Native SDK @@ -80,7 +81,6 @@ AZ_POP_DISABLE_WARNING #include // CryCommon -#include #include // Editor @@ -371,10 +371,8 @@ void CCryEditApp::RegisterActionHandlers() ON_COMMAND(ID_EDIT_FETCH, OnEditFetch) ON_COMMAND(ID_FILE_EXPORTTOGAMENOSURFACETEXTURE, OnFileExportToGameNoSurfaceTexture) ON_COMMAND(ID_VIEW_SWITCHTOGAME, OnViewSwitchToGame) - MainWindow::instance()->GetActionManager()->RegisterActionHandler(ID_VIEW_SWITCHTOGAME_FULLSCREEN, [this]() { - ed_previewGameInFullscreen_once = true; - OnViewSwitchToGame(); - }); + ON_COMMAND(ID_VIEW_SWITCHTOGAME_VIEWPORT, OnViewSwitchToGame) + ON_COMMAND(ID_VIEW_SWITCHTOGAME_FULLSCREEN, OnViewSwitchToGameFullScreen) ON_COMMAND(ID_MOVE_OBJECT, OnMoveObject) ON_COMMAND(ID_RENAME_OBJ, OnRenameObj) ON_COMMAND(ID_UNDO, OnUndo) @@ -382,13 +380,13 @@ void CCryEditApp::RegisterActionHandlers() ON_COMMAND(ID_IMPORT_ASSET, OnOpenAssetImporter) ON_COMMAND(ID_EDIT_LEVELDATA, OnEditLevelData) ON_COMMAND(ID_FILE_EDITLOGFILE, OnFileEditLogFile) - ON_COMMAND(ID_FILE_RESAVESLICES, OnFileResaveSlices) ON_COMMAND(ID_FILE_EDITEDITORINI, OnFileEditEditorini) ON_COMMAND(ID_PREFERENCES, OnPreferences) ON_COMMAND(ID_REDO, OnRedo) ON_COMMAND(ID_TOOLBAR_WIDGET_REDO, OnRedo) ON_COMMAND(ID_FILE_OPEN_LEVEL, OnOpenLevel) #ifdef ENABLE_SLICE_EDITOR + ON_COMMAND(ID_FILE_RESAVESLICES, OnFileResaveSlices) ON_COMMAND(ID_FILE_NEW_SLICE, OnCreateSlice) ON_COMMAND(ID_FILE_OPEN_SLICE, OnOpenSlice) #endif @@ -447,7 +445,6 @@ void CCryEditApp::RegisterActionHandlers() ON_COMMAND(ID_OPEN_ASSET_BROWSER, OnOpenAssetBrowserView) ON_COMMAND(ID_OPEN_AUDIO_CONTROLS_BROWSER, OnOpenAudioControlsEditor) - ON_COMMAND(ID_DISPLAY_SHOWHELPERS, OnShowHelpers) ON_COMMAND(ID_OPEN_TRACKVIEW, OnOpenTrackView) ON_COMMAND(ID_OPEN_UICANVASEDITOR, OnOpenUICanvasEditor) @@ -548,7 +545,6 @@ public: { "BatchMode", m_bConsoleMode }, { "NullRenderer", m_bNullRenderer }, { "devmode", m_bDeveloperMode }, - { "VTUNE", dummy }, { "runpython", m_bRunPythonScript }, { "runpythontest", m_bRunPythonTestScript }, { "version", m_bShowVersionInfo }, @@ -915,13 +911,9 @@ namespace QWidget* g_splashScreen = nullptr; } -QString FormatVersion(const SFileVersion& v) +QString FormatVersion([[maybe_unused]] const SFileVersion& v) { -#if defined(LY_BUILD) - return QObject::tr("Version %1.%2.%3.%4 - Build %5").arg(v[3]).arg(v[2]).arg(v[1]).arg(v[0]).arg(LY_BUILD); -#else - return QObject::tr("Version %1.%2.%3.%4").arg(v[3]).arg(v[2]).arg(v[1]).arg(v[0]); -#endif + return QObject::tr("Version %1").arg(LY_VERSION_BUILD_NUMBER); } QString FormatRichTextCopyrightNotice() @@ -1360,18 +1352,27 @@ void CCryEditApp::CompileCriticalAssets() const } } assetsInQueueNotifcation.BusDisconnect(); + + // Signal the "CriticalAssetsCompiled" lifecycle event + // Also reload the "assetcatalog.xml" if it exists + if (auto settingsRegistry = AZ::SettingsRegistry::Get(); settingsRegistry != nullptr) + { + AZ::ComponentApplicationLifecycle::SignalEvent(*settingsRegistry, "CriticalAssetsCompiled", R"({})"); + // Reload the assetcatalog.xml at this point again + // Start Monitoring Asset changes over the network and load the AssetCatalog + auto LoadCatalog = [settingsRegistry](AZ::Data::AssetCatalogRequests* assetCatalogRequests) + { + if (AZ::IO::FixedMaxPath assetCatalogPath; + settingsRegistry->Get(assetCatalogPath.Native(), AZ::SettingsRegistryMergeUtils::FilePathKey_CacheRootFolder)) + { + assetCatalogPath /= "assetcatalog.xml"; + assetCatalogRequests->LoadCatalog(assetCatalogPath.c_str()); + } + }; + AZ::Data::AssetCatalogRequestBus::Broadcast(AZStd::move(LoadCatalog)); + } + CCryEditApp::OutputStartupMessage(QString("Asset Processor is now ready.")); - - // VERY early on, as soon as we can, request that the asset system make sure the following assets take priority over others, - // so that by the time we ask for them there is a greater likelihood that they're already good to go. - // these can be loaded later but are still important: - AzFramework::AssetSystemRequestBus::Broadcast(&AzFramework::AssetSystem::AssetSystemRequests::EscalateAssetBySearchTerm, "/texturemsg/"); - AzFramework::AssetSystemRequestBus::Broadcast(&AzFramework::AssetSystem::AssetSystemRequests::EscalateAssetBySearchTerm, "engineassets/materials"); - AzFramework::AssetSystemRequestBus::Broadcast(&AzFramework::AssetSystem::AssetSystemRequests::EscalateAssetBySearchTerm, "engineassets/geomcaches"); - AzFramework::AssetSystemRequestBus::Broadcast(&AzFramework::AssetSystem::AssetSystemRequests::EscalateAssetBySearchTerm, "engineassets/objects"); - - // some are specifically extra important and will cause issues if missing completely: - AzFramework::AssetSystemRequestBus::Broadcast(&AzFramework::AssetSystem::AssetSystemRequests::CompileAssetSync, "engineassets/objects/default.cgf"); } bool CCryEditApp::ConnectToAssetProcessor() const @@ -1687,7 +1688,7 @@ bool CCryEditApp::InitInstance() return false; } - if (AZ::SettingsRegistryInterface* settingsRegistry = AZ::SettingsRegistry::Get()) + if (auto settingsRegistry = AZ::SettingsRegistry::Get(); settingsRegistry != nullptr) { AZ::ComponentApplicationLifecycle::SignalEvent(*settingsRegistry, "LegacySystemInterfaceCreated", R"({})"); } @@ -2585,6 +2586,12 @@ void CCryEditApp::OnViewSwitchToGame() GetIEditor()->SetInGameMode(inGame); } +void CCryEditApp::OnViewSwitchToGameFullScreen() +{ + ed_previewGameInFullscreen_once = true; + OnViewSwitchToGame(); +} + ////////////////////////////////////////////////////////////////////////// void CCryEditApp::OnExportSelectedObjects() { @@ -2628,12 +2635,6 @@ void CCryEditApp::OnUpdateSelected(QAction* action) action->setEnabled(!GetIEditor()->GetSelection()->IsEmpty()); } -void CCryEditApp::OnShowHelpers() -{ - GetIEditor()->GetDisplaySettings()->DisplayHelpers(!GetIEditor()->GetDisplaySettings()->IsDisplayHelpers()); - GetIEditor()->Notify(eNotify_OnDisplayRenderUpdate); -} - ////////////////////////////////////////////////////////////////////////// void CCryEditApp::OnEditLevelData() { @@ -2647,6 +2648,7 @@ void CCryEditApp::OnFileEditLogFile() CFileUtil::EditTextFile(CLogFile::GetLogFileName(), 0, IFileUtil::FILE_TYPE_SCRIPT); } +#ifdef ENABLE_SLICE_EDITOR void CCryEditApp::OnFileResaveSlices() { AZStd::vector sliceAssetInfos; @@ -2777,6 +2779,7 @@ void CCryEditApp::OnFileResaveSlices() } } +#endif ////////////////////////////////////////////////////////////////////////// void CCryEditApp::OnFileEditEditorini() @@ -2821,14 +2824,11 @@ void CCryEditApp::OpenProjectManager(const AZStd::string& screen) { // provide the current project path for in case we want to update the project AZ::IO::FixedMaxPathString projectPath = AZ::Utils::GetProjectPath(); -#if !AZ_TRAIT_OS_PLATFORM_APPLE && !AZ_TRAIT_OS_USE_WINDOWS_FILE_PATHS - const char* argumentQuoteString = R"(")"; -#else - const char* argumentQuoteString = R"(\")"; -#endif - const AZStd::string commandLineOptions = AZStd::string::format(R"( --screen %s --project-path %s%s%s)", - screen.c_str(), - argumentQuoteString, projectPath.c_str(), argumentQuoteString); + + const AZStd::vector commandLineOptions { + "--screen", screen, + "--project-path", AZStd::string::format(R"("%s")", projectPath.c_str()) }; + bool launchSuccess = AzFramework::ProjectManager::LaunchProjectManager(commandLineOptions); if (!launchSuccess) { @@ -3828,7 +3828,8 @@ void CCryEditApp::OnOpenQuickAccessBar() } QRect geo = m_pQuickAccessBar->geometry(); - geo.moveCenter(MainWindow::instance()->geometry().center()); + auto mainWindow = MainWindow::instance(); + geo.moveCenter(mainWindow->mapToGlobal(mainWindow->geometry().center())); m_pQuickAccessBar->setGeometry(geo); m_pQuickAccessBar->setVisible(true); m_pQuickAccessBar->setFocus(); @@ -3974,9 +3975,8 @@ void CCryEditApp::OpenLUAEditor(const char* files) } } - const char* engineRoot = nullptr; - AzFramework::ApplicationRequests::Bus::BroadcastResult(engineRoot, &AzFramework::ApplicationRequests::GetEngineRoot); - AZ_Assert(engineRoot != nullptr, "Unable to communicate to AzFramework::ApplicationRequests::Bus"); + AZ::IO::FixedMaxPathString engineRoot = AZ::Utils::GetEnginePath(); + AZ_Assert(!engineRoot.empty(), "Unable to query Engine Path"); AZStd::string_view exePath; AZ::ComponentApplicationBus::BroadcastResult(exePath, &AZ::ComponentApplicationRequests::GetExecutableFolder); @@ -3995,7 +3995,7 @@ void CCryEditApp::OpenLUAEditor(const char* files) #endif "%s", argumentQuoteString, aznumeric_cast(exePath.size()), exePath.data(), argumentQuoteString); - AZStd::string processArgs = AZStd::string::format("%s -engine-path \"%s\"", args.c_str(), engineRoot); + AZStd::string processArgs = AZStd::string::format("%s -engine-path \"%s\"", args.c_str(), engineRoot.c_str()); StartProcessDetached(process.c_str(), processArgs.c_str()); } @@ -4028,7 +4028,7 @@ void CCryEditApp::OnError(AzFramework::AssetSystem::AssetSystemErrors error) break; } - CryMessageBox(errorMessage.c_str(), "Error", MB_OK | MB_ICONERROR | MB_SETFOREGROUND); + QMessageBox::critical(nullptr,"Error",errorMessage.c_str()); } void CCryEditApp::OnOpenProceduralMaterialEditor() @@ -4196,6 +4196,8 @@ extern "C" int AZ_DLL_EXPORT CryEditMain(int argc, char* argv[]) "\nThis could be because of incorrectly configured components, or missing required gems." "\nSee other errors for more details."); + AzToolsFramework::EditorEventsBus::Broadcast(&AzToolsFramework::EditorEvents::NotifyEditorInitialized); + if (didCryEditStart) { app->EnableOnIdle(); diff --git a/Code/Editor/CryEdit.h b/Code/Editor/CryEdit.h index 53ee8f1905..97fcde8f34 100644 --- a/Code/Editor/CryEdit.h +++ b/Code/Editor/CryEdit.h @@ -212,6 +212,7 @@ public: void OnEditFetch(); void OnFileExportToGameNoSurfaceTexture(); void OnViewSwitchToGame(); + void OnViewSwitchToGameFullScreen(); void OnViewDeploy(); void DeleteSelectedEntities(bool includeDescendants); void OnMoveObject(); @@ -236,7 +237,6 @@ public: void OnSyncPlayerUpdate(QAction* action); void OnResourcesReduceworkingset(); void OnDummyCommand() {}; - void OnShowHelpers(); void OnFileSave(); void OnUpdateDocumentReady(QAction* action); void OnUpdateFileOpen(QAction* action); diff --git a/Code/Editor/CryEditDoc.cpp b/Code/Editor/CryEditDoc.cpp index 4944c3bff5..3bcba4d5e0 100644 --- a/Code/Editor/CryEditDoc.cpp +++ b/Code/Editor/CryEditDoc.cpp @@ -19,6 +19,7 @@ #include #include #include +#include #include #include @@ -50,7 +51,6 @@ #include "GameExporter.h" #include "MainWindow.h" #include "LevelFileDialog.h" -#include "StatObjBus.h" #include "Undo/Undo.h" #include @@ -60,15 +60,6 @@ #include #include // for LmbrCentral::EditorLightComponentRequestBus -//#define PROFILE_LOADING_WITH_VTUNE - -// profilers api. -//#include "pure.h" -#ifdef PROFILE_LOADING_WITH_VTUNE -#include "C:\Program Files\Intel\Vtune\Analyzer\Include\VTuneApi.h" -#pragma comment(lib,"C:\\Program Files\\Intel\\Vtune\\Analyzer\\Lib\\VTuneApi.lib") -#endif - static const char* kAutoBackupFolder = "_autobackup"; static const char* kHoldFolder = "$tmp_hold"; // conform to the ignored file types $tmp[0-9]*_ regex static const char* kSaveBackupFolder = "_savebackup"; @@ -254,9 +245,6 @@ void CCryEditDoc::DeleteContents() EBUS_EVENT(AzToolsFramework::EditorEntityContextRequestBus, ResetEditorContext); - // [LY-90904] move this to the EditorVegetationManager component - InstanceStatObjEventBus::Broadcast(&InstanceStatObjEventBus::Events::ReleaseData); - ////////////////////////////////////////////////////////////////////////// // Clear all undo info. ////////////////////////////////////////////////////////////////////////// @@ -316,8 +304,6 @@ void CCryEditDoc::Save(TDocMultiArchive& arrXmlAr) // Fog settings /////////////////////////////////////////////////////// SerializeFogSettings((*arrXmlAr[DMAS_GENERAL])); - - SerializeNameSelection((*arrXmlAr[DMAS_GENERAL])); } } AfterSave(); @@ -408,9 +394,6 @@ void CCryEditDoc::Load(TDocMultiArchive& arrXmlAr, const QString& szFilename) int t0 = GetTickCount(); -#ifdef PROFILE_LOADING_WITH_VTUNE - VTResume(); -#endif // Load level-specific audio data. AZStd::string levelFileName{ fileName.toUtf8().constData() }; AZStd::to_lower(levelFileName.begin(), levelFileName.end()); @@ -466,12 +449,6 @@ void CCryEditDoc::Load(TDocMultiArchive& arrXmlAr, const QString& szFilename) } } - if (!isPrefabEnabled) - { - // Name Selection groups - SerializeNameSelection((*arrXmlAr[DMAS_GENERAL])); - } - { CAutoLogTime logtime("Post Load"); @@ -484,10 +461,6 @@ void CCryEditDoc::Load(TDocMultiArchive& arrXmlAr, const QString& szFilename) CSurfaceTypeValidator().Validate(); -#ifdef PROFILE_LOADING_WITH_VTUNE - VTPause(); -#endif - LogLoadTime(GetTickCount() - t0); // Loaded with success, remove event from log file GetIEditor()->GetSettingsManager()->UnregisterEvent(loadEvent); @@ -610,16 +583,6 @@ void CCryEditDoc::SerializeFogSettings(CXmlArchive& xmlAr) } } -void CCryEditDoc::SerializeNameSelection(CXmlArchive& xmlAr) -{ - IObjectManager* pObjManager = GetIEditor()->GetObjectManager(); - - if (pObjManager) - { - pObjManager->SerializeNameSelection(xmlAr.root, xmlAr.bLoading); - } -} - void CCryEditDoc::SetModifiedModules(EModifiedModule eModifiedModule, bool boSet) { if (!boSet) @@ -765,7 +728,9 @@ bool CCryEditDoc::OnOpenDocument(const QString& lpszPathName) bool CCryEditDoc::BeforeOpenDocument(const QString& lpszPathName, TOpenDocContext& context) { - CTimeValue loading_start_time = gEnv->pTimer->GetAsyncTime(); + const AZ::TimeMs timeMs = AZ::GetRealElapsedTimeMs(); + const double timeSec = AZ::TimeMsToSecondsDouble(timeMs); + const CTimeValue loading_start_time(timeSec); bool usePrefabSystemForLevels = false; AzFramework::ApplicationRequests::Bus::BroadcastResult( @@ -806,7 +771,7 @@ bool CCryEditDoc::BeforeOpenDocument(const QString& lpszPathName, TOpenDocContex bool CCryEditDoc::DoOpenDocument(TOpenDocContext& context) { - CTimeValue& loading_start_time = context.loading_start_time; + const CTimeValue& loading_start_time = context.loading_start_time; bool isPrefabEnabled = false; AzFramework::ApplicationRequests::Bus::BroadcastResult(isPrefabEnabled, &AzFramework::ApplicationRequests::IsPrefabSystemEnabled); @@ -876,7 +841,9 @@ bool CCryEditDoc::DoOpenDocument(TOpenDocContext& context) StartStreamingLoad(); - CTimeValue loading_end_time = gEnv->pTimer->GetAsyncTime(); + const AZ::TimeMs timeMs = AZ::GetRealElapsedTimeMs(); + const double timeSec = AZ::TimeMsToSecondsDouble(timeMs); + const CTimeValue loading_end_time(timeSec); CLogFile::FormatLine("-----------------------------------------------------------"); CLogFile::FormatLine("Successfully opened document %s", context.absoluteLevelPath.toUtf8().data()); @@ -1139,7 +1106,7 @@ bool CCryEditDoc::SaveLevel(const QString& filename) const QString oldLevelPattern = QDir(oldLevelFolder).absoluteFilePath("*.*"); const QString oldLevelName = Path::GetFile(GetLevelPathName()); const QString oldLevelXml = Path::ReplaceExtension(oldLevelName, "xml"); - AZ::IO::ArchiveFileIterator findHandle = pIPak->FindFirst(oldLevelPattern.toUtf8().data(), AZ::IO::IArchive::eFileSearchType_AllowOnDiskAndInZips); + AZ::IO::ArchiveFileIterator findHandle = pIPak->FindFirst(oldLevelPattern.toUtf8().data(), AZ::IO::FileSearchLocation::Any); if (findHandle) { do diff --git a/Code/Editor/CryEditDoc.h b/Code/Editor/CryEditDoc.h index e64bdb1308..f7e97d308e 100644 --- a/Code/Editor/CryEditDoc.h +++ b/Code/Editor/CryEditDoc.h @@ -24,7 +24,6 @@ #include #endif -class CClouds; struct LightingSettings; struct IVariable; struct ICVar; @@ -124,7 +123,6 @@ public: // Create from serialization only const char* GetTemporaryLevelName() const; void DeleteTemporaryLevel(); - CClouds* GetClouds() { return m_pClouds; } void SetWaterColor(const QColor& col) { m_waterColor = col; } QColor GetWaterColor() const { return m_waterColor; } XmlNodeRef& GetFogTemplate() { return m_fogTemplate; } @@ -163,7 +161,6 @@ protected: bool LoadEntitiesFromSlice(const QString& sliceFile); void SerializeFogSettings(CXmlArchive& xmlAr); virtual void SerializeViewSettings(CXmlArchive& xmlAr); - void SerializeNameSelection(CXmlArchive& xmlAr); void LogLoadTime(int time) const; struct TSaveDocContext @@ -195,7 +192,6 @@ protected: QColor m_waterColor = QColor(0, 0, 255); XmlNodeRef m_fogTemplate; XmlNodeRef m_environmentTemplate; - CClouds* m_pClouds; std::list m_listeners; bool m_bDocumentReady = false; ICVar* doc_validate_surface_types = nullptr; diff --git a/Code/Editor/Dialogs/PythonScriptsDialog.cpp b/Code/Editor/Dialogs/PythonScriptsDialog.cpp index 35047947ac..06b1acdbc8 100644 --- a/Code/Editor/Dialogs/PythonScriptsDialog.cpp +++ b/Code/Editor/Dialogs/PythonScriptsDialog.cpp @@ -40,10 +40,10 @@ AZ_POP_DISABLE_DLL_EXPORT_MEMBER_WARNING namespace { // File name extension for python files - const QString s_kPythonFileNameSpec = "*.py"; + const QString s_kPythonFileNameSpec("*.py"); // Tree root element name - const QString s_kRootElementName = "Python Scripts"; + const QString s_kRootElementName("Python Scripts"); } ////////////////////////////////////////////////////////////////////////// diff --git a/Code/Editor/DisplaySettings.cpp b/Code/Editor/DisplaySettings.cpp index ed4ca180b4..bfeac3e37f 100644 --- a/Code/Editor/DisplaySettings.cpp +++ b/Code/Editor/DisplaySettings.cpp @@ -68,8 +68,6 @@ void CDisplaySettings::SetObjectHideMask(int hideMask) m_objectHideMask = hideMask; gSettings.objectHideMask = m_objectHideMask; - - GetIEditor()->Notify(eNotify_OnDisplayRenderUpdate); }; ////////////////////////////////////////////////////////////////////////// diff --git a/Code/Editor/EditMode/DeepSelection.cpp b/Code/Editor/EditMode/DeepSelection.cpp deleted file mode 100644 index 3e232a230c..0000000000 --- a/Code/Editor/EditMode/DeepSelection.cpp +++ /dev/null @@ -1,138 +0,0 @@ -/* - * Copyright (c) Contributors to the Open 3D Engine Project. - * For complete copyright and license terms please see the LICENSE at the root of this distribution. - * - * SPDX-License-Identifier: Apache-2.0 OR MIT - * - */ - - -#include "EditorDefs.h" - -#include "DeepSelection.h" - -// Editor -#include "Objects/BaseObject.h" - - -//! Functor for sorting selected objects on deep selection mode. -struct NearDistance -{ - NearDistance(){} - bool operator()(const CDeepSelection::RayHitObject& lhs, const CDeepSelection::RayHitObject& rhs) const - { - return lhs.distance < rhs.distance; - } -}; - -//----------------------------------------------------------------------------- -CDeepSelection::CDeepSelection() - : m_Mode(DSM_NONE) - , m_previousMode(DSM_NONE) - , m_CandidateObjectCount(0) - , m_CurrentSelectedPos(-1) -{ - m_LastPickPoint = QPoint(-1, -1); -} - -//----------------------------------------------------------------------------- -CDeepSelection::~CDeepSelection() -{ -} - -//----------------------------------------------------------------------------- -void CDeepSelection::Reset(bool bResetLastPick) -{ - for (int i = 0; i < m_CandidateObjectCount; ++i) - { - m_RayHitObjects[i].object->ClearFlags(OBJFLAG_NO_HITTEST); - } - - m_CandidateObjectCount = 0; - m_CurrentSelectedPos = -1; - - m_RayHitObjects.clear(); - - if (bResetLastPick) - { - m_LastPickPoint = QPoint(-1, -1); - } -} - -//----------------------------------------------------------------------------- -void CDeepSelection::AddObject(float distance, CBaseObject* pObj) -{ - m_RayHitObjects.push_back(RayHitObject(distance, pObj)); -} - -//----------------------------------------------------------------------------- -bool CDeepSelection::OnCycling (const QPoint& pt) -{ - QPoint diff = m_LastPickPoint - pt; - LONG epsilon = 2; - m_LastPickPoint = pt; - - if (abs(diff.x()) < epsilon && abs(diff.y()) < epsilon) - { - return true; - } - else - { - return false; - } -} - -//----------------------------------------------------------------------------- -void CDeepSelection::ExcludeHitTest(int except) -{ - int nExcept = except % m_CandidateObjectCount; - - for (int i = 0; i < m_CandidateObjectCount; ++i) - { - m_RayHitObjects[i].object->SetFlags(OBJFLAG_NO_HITTEST); - } - - m_RayHitObjects[nExcept].object->ClearFlags(OBJFLAG_NO_HITTEST); -} - -//----------------------------------------------------------------------------- -int CDeepSelection::CollectCandidate(float fMinDistance, float fRange) -{ - m_CandidateObjectCount = 0; - - if (!m_RayHitObjects.empty()) - { - std::sort(m_RayHitObjects.begin(), m_RayHitObjects.end(), NearDistance()); - - for (std::vector::iterator itr = m_RayHitObjects.begin(); - itr != m_RayHitObjects.end(); ++itr) - { - if (itr->distance - fMinDistance < fRange) - { - ++m_CandidateObjectCount; - } - else - { - break; - } - } - } - - return m_CandidateObjectCount; -} - -//----------------------------------------------------------------------------- -CBaseObject* CDeepSelection::GetCandidateObject(int index) -{ - m_CurrentSelectedPos = index % m_CandidateObjectCount; - - return m_RayHitObjects[m_CurrentSelectedPos].object; -} - -//----------------------------------------------------------------------------- -//! -void CDeepSelection::SetMode(EDeepSelectionMode mode) -{ - m_previousMode = m_Mode; - m_Mode = mode; -} diff --git a/Code/Editor/EditMode/DeepSelection.h b/Code/Editor/EditMode/DeepSelection.h deleted file mode 100644 index b6f652abc5..0000000000 --- a/Code/Editor/EditMode/DeepSelection.h +++ /dev/null @@ -1,87 +0,0 @@ -/* - * Copyright (c) Contributors to the Open 3D Engine Project. - * For complete copyright and license terms please see the LICENSE at the root of this distribution. - * - * SPDX-License-Identifier: Apache-2.0 OR MIT - * - */ - - -// Description : Deep Selection Header - - -#ifndef CRYINCLUDE_EDITOR_EDITMODE_DEEPSELECTION_H -#define CRYINCLUDE_EDITOR_EDITMODE_DEEPSELECTION_H -#pragma once - -class CBaseObject; - -//! Deep Selection -//! Additional output information of HitContext on using "deep selection mode". -//! At the deep selection mode, it supports second selection pass for easy -//! selection on crowded area with two different method. -//! One is to show pop menu of candidate objects list. Another is the cyclic -//! selection on pick clicking. -class CDeepSelection - : public _i_reference_target_t -{ -public: - //! Deep Selection Mode Definition - enum EDeepSelectionMode - { - DSM_NONE = 0, // Not using deep selection. - DSM_POP = 1, // Deep selection mode with pop context menu. - DSM_CYCLE = 2 // Deep selection mode with cyclic selection on each clinking same point. - }; - - //! Subclass for container of the selected object with hit distance. - struct RayHitObject - { - RayHitObject(float dist, CBaseObject* pObj) - : distance(dist) - , object(pObj) - { - } - - float distance; - CBaseObject* object; - }; - - //! Constructor - CDeepSelection(); - virtual ~CDeepSelection(); - - void Reset(bool bResetLastPick = false); - void AddObject(float distance, CBaseObject* pObj); - //! Check if clicking point is same position with last position, - //! to decide whether to continue cycling mode. - bool OnCycling (const QPoint& pt); - //! All objects in list are excluded for hitting test except one, current selection. - void ExcludeHitTest(int except); - void SetMode(EDeepSelectionMode mode); - inline EDeepSelectionMode GetMode() const { return m_Mode; } - inline EDeepSelectionMode GetPreviousMode() const { return m_previousMode; } - //! Collect object in the deep selection range. The distance from the minimum - //! distance is less than deep selection range. - int CollectCandidate(float fMinDistance, float fRange); - //! Return the candidate object in index position, then it is to be current - //! selection position. - CBaseObject* GetCandidateObject(int index); - //! Return the current selection position that is update in "GetCandidateObject" - //! function call. - inline int GetCurrentSelectPos() const { return m_CurrentSelectedPos; } - //! Return the number of objects in the deep selection range. - inline int GetCandidateObjectCount() const { return m_CandidateObjectCount; } - -private: - //! Current mode - EDeepSelectionMode m_Mode; - EDeepSelectionMode m_previousMode; - //! Last picking point to check whether cyclic selection continue. - QPoint m_LastPickPoint; - //! List of the selected objects with ray hitting - std::vector m_RayHitObjects; - int m_CandidateObjectCount; - int m_CurrentSelectedPos; -}; -#endif // CRYINCLUDE_EDITOR_EDITMODE_DEEPSELECTION_H diff --git a/Code/Editor/EditorDefs.h b/Code/Editor/EditorDefs.h index 4115e8433a..97c03b2b45 100644 --- a/Code/Editor/EditorDefs.h +++ b/Code/Editor/EditorDefs.h @@ -105,7 +105,6 @@ #include #include #include -#include #include #include diff --git a/Code/Editor/EditorEnvironment.cpp b/Code/Editor/EditorEnvironment.cpp index 463fec8d08..2d675275ec 100644 --- a/Code/Editor/EditorEnvironment.cpp +++ b/Code/Editor/EditorEnvironment.cpp @@ -17,7 +17,7 @@ void SetEditorEnvironment(SSystemGlobalEnvironment* pEnv) void AttachEditorAZEnvironment(AZ::EnvironmentInstance azEnv) { - AZ::Environment::Attach(azEnv, true); + AZ::Environment::Attach(azEnv); } void DetachEditorAZEnvironment() diff --git a/Code/Editor/EditorModularViewportCameraComposer.cpp b/Code/Editor/EditorModularViewportCameraComposer.cpp index ce4a0a2e33..3f66468584 100644 --- a/Code/Editor/EditorModularViewportCameraComposer.cpp +++ b/Code/Editor/EditorModularViewportCameraComposer.cpp @@ -13,9 +13,32 @@ #include #include #include +#include #include #include +AZ_CVAR( + bool, + ed_cameraPinDefaultOrbit, + true, + nullptr, + AZ::ConsoleFunctorFlags::Null, + "Sets whether the default orbit point moves with the camera or not"); +AZ_CVAR( + bool, + ed_cameraDefaultOrbitAxesOrtho, + true, + nullptr, + AZ::ConsoleFunctorFlags::Null, + "Sets whether to draw the default orbit point as orthographic or not"); +AZ_CVAR( + float, + ed_cameraDefaultOrbitFadeDuration, + 0.5f, + nullptr, + AZ::ConsoleFunctorFlags::Null, + "Sets how long the default orbit point should take to appear and disappear"); + namespace SandboxEditor { static AzFramework::TranslateCameraInputChannelIds BuildTranslateCameraInputChannelIds() @@ -122,6 +145,15 @@ namespace SandboxEditor } }; + const auto trackingTransform = [viewportId = m_viewportId] + { + bool tracking = false; + AtomToolsFramework::ModularViewportCameraControllerRequestBus::EventResult( + tracking, viewportId, &AtomToolsFramework::ModularViewportCameraControllerRequestBus::Events::IsTrackingTransform); + + return tracking; + }; + m_firstPersonRotateCamera = AZStd::make_shared(SandboxEditor::CameraFreeLookChannelId()); m_firstPersonRotateCamera->m_rotateSpeedFn = [] @@ -129,6 +161,11 @@ namespace SandboxEditor return SandboxEditor::CameraRotateSpeed(); }; + m_firstPersonRotateCamera->m_constrainPitch = [trackingTransform] + { + return !trackingTransform(); + }; + // default behavior is to hide the cursor but this can be disabled (useful for remote desktop) // note: See CaptureCursorLook in the Settings Registry m_firstPersonRotateCamera->SetActivationBeganFn(hideCursor); @@ -174,7 +211,7 @@ namespace SandboxEditor return SandboxEditor::CameraScrollSpeed(); }; - const auto pivotFn = [] + const auto pivotFn = []() -> AZStd::optional { // use the manipulator transform as the pivot point AZStd::optional entityPivot; @@ -187,8 +224,7 @@ namespace SandboxEditor return entityPivot->GetTranslation(); } - // otherwise just use the identity - return AZ::Vector3::CreateZero(); + return AZStd::nullopt; }; m_firstPersonFocusCamera = @@ -199,9 +235,26 @@ namespace SandboxEditor m_orbitCamera = AZStd::make_shared(SandboxEditor::CameraOrbitChannelId()); m_orbitCamera->SetPivotFn( - [pivotFn]([[maybe_unused]] const AZ::Vector3& position, [[maybe_unused]] const AZ::Vector3& direction) + [this, pivotFn](const AZ::Vector3& position, const AZ::Vector3& direction) { - return pivotFn(); + // return the pivot + if (auto pivot = pivotFn()) + { + return pivot.value(); + } + + // start ticking and drawing (for the default pivot) + AZ::TickBus::Handler::BusConnect(); + AzFramework::ViewportDebugDisplayEventBus::Handler::BusConnect(AzToolsFramework::GetEntityContextId()); + + m_defaultOrbiting = true; + // calculate the default orbit point + if (!ed_cameraPinDefaultOrbit || m_orbitCamera->Beginning()) + { + m_defaultOrbitPoint = position + direction * SandboxEditor::CameraDefaultOrbitDistance(); + } + + return m_defaultOrbitPoint; }); m_orbitRotateCamera = AZStd::make_shared(SandboxEditor::CameraOrbitLookChannelId()); @@ -216,6 +269,11 @@ namespace SandboxEditor return SandboxEditor::CameraOrbitYawRotationInverted(); }; + m_orbitRotateCamera->m_constrainPitch = [trackingTransform] + { + return !trackingTransform(); + }; + m_orbitTranslateCamera = AZStd::make_shared( translateCameraInputChannelIds, AzFramework::LookTranslation, AzFramework::TranslateOffsetOrbit); @@ -298,12 +356,78 @@ namespace SandboxEditor AZ::TransformBus::EventResult(worldFromLocal, viewEntityId, &AZ::TransformBus::Events::GetWorldTM); AtomToolsFramework::ModularViewportCameraControllerRequestBus::Event( - m_viewportId, &AtomToolsFramework::ModularViewportCameraControllerRequestBus::Events::SetReferenceFrame, worldFromLocal); + m_viewportId, &AtomToolsFramework::ModularViewportCameraControllerRequestBus::Events::StartTrackingTransform, + worldFromLocal); } else { AtomToolsFramework::ModularViewportCameraControllerRequestBus::Event( - m_viewportId, &AtomToolsFramework::ModularViewportCameraControllerRequestBus::Events::ClearReferenceFrame); + m_viewportId, &AtomToolsFramework::ModularViewportCameraControllerRequestBus::Events::StopTrackingTransform); } } + + void EditorModularViewportCameraComposer::OnTick(const float deltaTime, [[maybe_unused]] AZ::ScriptTimePoint time) + { + const float delta = [duration = &ed_cameraDefaultOrbitFadeDuration, deltaTime] + { + if (*duration == 0.0f) + { + return 1.0f; + } + return deltaTime / *duration; + }(); + + if (m_defaultOrbiting) + { + m_defaultOrbitOpacity = AZStd::min(m_defaultOrbitOpacity + delta, 1.0f); + } + else + { + m_defaultOrbitOpacity = AZStd::max(m_defaultOrbitOpacity - delta, 0.0f); + if (m_defaultOrbitOpacity == 0.0f) + { + AZ::TickBus::Handler::BusDisconnect(); + AzFramework::ViewportDebugDisplayEventBus::Handler::BusDisconnect(); + } + } + + m_defaultOrbiting = false; + } + + static void DrawTransformAxis( + AzFramework::DebugDisplayRequests& display, + const AzFramework::CameraState& cameraState, + const AZ::Vector3& pivot, + const float axisLength, + const float alpha) + { + const int prevState = display.GetState(); + + display.DepthWriteOff(); + display.DepthTestOff(); + display.CullOff(); + + const float orthoScale = + ed_cameraDefaultOrbitAxesOrtho ? AzToolsFramework::CalculateScreenToWorldMultiplier(pivot, cameraState) : 1.0f; + + display.SetColor(AZ::Color::CreateFromVector3AndFloat(AZ::Colors::Red.GetAsVector3(), alpha)); + display.DrawLine(pivot, pivot + AZ::Vector3::CreateAxisX() * axisLength * orthoScale); + display.SetColor(AZ::Color::CreateFromVector3AndFloat(AZ::Colors::LawnGreen.GetAsVector3(), alpha)); + display.DrawLine(pivot, pivot + AZ::Vector3::CreateAxisY() * axisLength * orthoScale); + display.SetColor(AZ::Color::CreateFromVector3AndFloat(AZ::Colors::Blue.GetAsVector3(), alpha)); + display.DrawLine(pivot, pivot + AZ::Vector3::CreateAxisZ() * axisLength * orthoScale); + + display.DepthWriteOn(); + display.DepthTestOn(); + display.CullOn(); + + display.SetState(prevState); + } + + void EditorModularViewportCameraComposer::DisplayViewport( + [[maybe_unused]] const AzFramework::ViewportInfo& viewportInfo, AzFramework::DebugDisplayRequests& debugDisplay) + { + DrawTransformAxis( + debugDisplay, AzToolsFramework::GetCameraState(viewportInfo.m_viewportId), m_defaultOrbitPoint, 1.0f, m_defaultOrbitOpacity); + } } // namespace SandboxEditor diff --git a/Code/Editor/EditorModularViewportCameraComposer.h b/Code/Editor/EditorModularViewportCameraComposer.h index 9cfd6f3554..6cd5df533c 100644 --- a/Code/Editor/EditorModularViewportCameraComposer.h +++ b/Code/Editor/EditorModularViewportCameraComposer.h @@ -9,6 +9,8 @@ #pragma once #include +#include +#include #include #include #include @@ -20,6 +22,8 @@ namespace SandboxEditor class EditorModularViewportCameraComposer : private EditorModularViewportCameraComposerNotificationBus::Handler , private Camera::EditorCameraNotificationBus::Handler + , private AzFramework::ViewportDebugDisplayEventBus::Handler + , private AZ::TickBus::Handler { public: SANDBOX_API explicit EditorModularViewportCameraComposer(AzFramework::ViewportId viewportId); @@ -29,6 +33,12 @@ namespace SandboxEditor SANDBOX_API AZStd::shared_ptr CreateModularViewportCameraController(); private: + // AzFramework::ViewportDebugDisplayEventBus overrides ... + void DisplayViewport(const AzFramework::ViewportInfo& viewportInfo, AzFramework::DebugDisplayRequests& debugDisplay) override; + + // AZ::TickBus overrides ... + void OnTick(float deltaTime, AZ::ScriptTimePoint time) override; + //! Setup all internal camera inputs. void SetupCameras(); @@ -52,5 +62,9 @@ namespace SandboxEditor AZStd::shared_ptr m_orbitFocusCamera; AzFramework::ViewportId m_viewportId; + + float m_defaultOrbitOpacity = 0.0f; //!< The default orbit axes opacity (to fade in and out). + AZ::Vector3 m_defaultOrbitPoint = AZ::Vector3::CreateZero(); //!< The orbit point to use when no entity is selected. + bool m_defaultOrbiting = false; //!< Is the camera default orbiting (orbiting when there's no selected entity). }; } // namespace SandboxEditor diff --git a/Code/Editor/EditorPanelUtils.cpp b/Code/Editor/EditorPanelUtils.cpp deleted file mode 100644 index a270de5978..0000000000 --- a/Code/Editor/EditorPanelUtils.cpp +++ /dev/null @@ -1,542 +0,0 @@ -/* - * Copyright (c) Contributors to the Open 3D Engine Project. - * For complete copyright and license terms please see the LICENSE at the root of this distribution. - * - * SPDX-License-Identifier: Apache-2.0 OR MIT - * - */ - - - -#include "EditorDefs.h" - -#include "EditorPanelUtils.h" - -#include - -// Qt -#include -#include -#include - -// Editor -#include "IEditorPanelUtils.h" -#include "Objects/EntityObject.h" -#include "CryEditDoc.h" -#include "ViewManager.h" -#include "Controls/QToolTipWidget.h" -#include "Objects/SelectionGroup.h" - - - -#ifndef PI -#define PI 3.14159265358979323f -#endif - - -struct ToolTip -{ - bool isValid; - QString title; - QString content; - QString specialContent; - QString disabledContent; -}; - -// internal implementation for better compile times - should also never be used externally, use IParticleEditorUtils interface for that. -class CEditorPanelUtils_Impl - : public IEditorPanelUtils -{ -public: - void SetViewportDragOperation(void(* dropCallback)(CViewport* viewport, int dragPointX, int dragPointY, void* custom), void* custom) override - { - for (int i = 0; i < GetIEditor()->GetViewManager()->GetViewCount(); i++) - { - GetIEditor()->GetViewManager()->GetView(i)->SetGlobalDropCallback(dropCallback, custom); - } - } - -public: - - int PreviewWindow_GetDisplaySettingsDebugFlags(CDisplaySettings* settings) override - { - CRY_ASSERT(settings); - return settings->GetDebugFlags(); - } - - void PreviewWindow_SetDisplaySettingsDebugFlags(CDisplaySettings* settings, int flags) override - { - CRY_ASSERT(settings); - settings->SetDebugFlags(flags); - } - -protected: - QVector hotkeys; - bool m_hotkeysAreEnabled; -public: - - bool HotKey_Import() override - { - QVector > keys; - QString filepath = QFileDialog::getOpenFileName(nullptr, "Select shortcut configuration to load", - QString(), "HotKey Config Files (*.hkxml)"); - QFile file(filepath); - if (!file.open(QIODevice::ReadOnly)) - { - return false; - } - QXmlStreamReader stream(&file); - bool result = true; - - while (!stream.isEndDocument()) - { - if (stream.isStartElement()) - { - if (stream.name() == "HotKey") - { - QPair key; - QXmlStreamAttributes att = stream.attributes(); - for (QXmlStreamAttribute attr : att) - { - if (attr.name().compare(QLatin1String("path"), Qt::CaseInsensitive) == 0) - { - key.first = attr.value().toString(); - } - if (attr.name().compare(QLatin1String("sequence"), Qt::CaseInsensitive) == 0) - { - key.second = attr.value().toString(); - } - } - if (!key.first.isEmpty()) - { - keys.push_back(key); // we allow blank key sequences for unassigned shortcuts - } - else - { - result = false; //but not blank paths! - } - } - } - stream.readNext(); - } - file.close(); - - if (result) - { - HotKey_BuildDefaults(); - for (QPair key : keys) - { - for (int j = 0; j < hotkeys.count(); j++) - { - if (hotkeys[j].path.compare(key.first, Qt::CaseInsensitive) == 0) - { - hotkeys[j].SetPath(key.first.toStdString().c_str()); - hotkeys[j].SetSequenceFromString(key.second.toStdString().c_str()); - } - } - } - } - return result; - } - - void HotKey_Export() override - { - auto settingDir = AZ::IO::FixedMaxPath(AZ::Utils::GetEnginePath()) / "Editor" / "Plugins" / "ParticleEditorPlugin" / "settings"; - QString filepath = QFileDialog::getSaveFileName(nullptr, "Select shortcut configuration to load", settingDir.c_str(), "HotKey Config Files (*.hkxml)"); - QFile file(filepath); - if (!file.open(QIODevice::WriteOnly)) - { - return; - } - - QXmlStreamWriter stream(&file); - stream.setAutoFormatting(true); - stream.writeStartDocument(); - stream.writeStartElement("HotKeys"); - - for (HotKey key : hotkeys) - { - stream.writeStartElement("HotKey"); - stream.writeAttribute("path", key.path); - stream.writeAttribute("sequence", key.sequence.toString()); - stream.writeEndElement(); - } - stream.writeEndElement(); - stream.writeEndDocument(); - file.close(); - } - - QKeySequence HotKey_GetShortcut(const char* path) override - { - for (HotKey combo : hotkeys) - { - if (combo.IsMatch(path)) - { - return combo.sequence; - } - } - return QKeySequence(); - } - - bool HotKey_IsPressed(const QKeyEvent* event, const char* path) override - { - if (!m_hotkeysAreEnabled) - { - return false; - } - unsigned int keyInt = 0; - //Capture any modifiers - Qt::KeyboardModifiers modifiers = QApplication::keyboardModifiers(); - if (modifiers & Qt::ShiftModifier) - { - keyInt += Qt::SHIFT; - } - if (modifiers & Qt::ControlModifier) - { - keyInt += Qt::CTRL; - } - if (modifiers & Qt::AltModifier) - { - keyInt += Qt::ALT; - } - if (modifiers & Qt::MetaModifier) - { - keyInt += Qt::META; - } - //Capture any key - keyInt += event->key(); - - QString t0 = QKeySequence(keyInt).toString(); - QString t1 = HotKey_GetShortcut(path).toString(); - - //if strings match then shortcut is pressed - if (t1.compare(t0, Qt::CaseInsensitive) == 0) - { - return true; - } - return false; - } - - bool HotKey_IsPressed(const QShortcutEvent* event, const char* path) override - { - if (!m_hotkeysAreEnabled) - { - return false; - } - - QString t0 = event->key().toString(); - QString t1 = HotKey_GetShortcut(path).toString(); - - //if strings match then shortcut is pressed - if (t1.compare(t0, Qt::CaseInsensitive) == 0) - { - return true; - } - return false; - } - - bool HotKey_LoadExisting() override - { - QSettings settings("O3DE", "O3DE"); - QString group = "Hotkeys/"; - - HotKey_BuildDefaults(); - - int size = settings.beginReadArray(group); - - for (int i = 0; i < size; i++) - { - settings.setArrayIndex(i); - QPair hotkey; - hotkey.first = settings.value("name").toString(); - hotkey.second = settings.value("keySequence").toString(); - if (!hotkey.first.isEmpty()) - { - for (int j = 0; j < hotkeys.count(); j++) - { - if (hotkeys[j].path.compare(hotkey.first, Qt::CaseInsensitive) == 0) - { - hotkeys[j].SetPath(hotkey.first.toStdString().c_str()); - hotkeys[j].SetSequenceFromString(hotkey.second.toStdString().c_str()); - } - } - } - } - - settings.endArray(); - if (hotkeys.isEmpty()) - { - return false; - } - return true; - } - - void HotKey_SaveCurrent() override - { - QSettings settings("O3DE", "O3DE"); - QString group = "Hotkeys/"; - settings.remove("Hotkeys/"); - settings.sync(); - settings.beginWriteArray(group); - int saveIndex = 0; - for (HotKey key : hotkeys) - { - if (!key.path.isEmpty()) - { - settings.setArrayIndex(saveIndex++); - settings.setValue("name", key.path); - settings.setValue("keySequence", key.sequence.toString()); - } - } - settings.endArray(); - settings.sync(); - } - - void HotKey_BuildDefaults() override - { - m_hotkeysAreEnabled = true; - QVector > keys; - while (hotkeys.count() > 0) - { - hotkeys.takeAt(0); - } - - //MENU SELECTION SHORTCUTS//////////////////////////////////////////////// - keys.push_back(QPair("Menus.File Menu", "Alt+F")); - keys.push_back(QPair("Menus.Edit Menu", "Alt+E")); - keys.push_back(QPair("Menus.View Menu", "Alt+V")); - //FILE MENU SHORTCUTS///////////////////////////////////////////////////// - keys.push_back(QPair("File Menu.Create new emitter", "Ctrl+N")); - keys.push_back(QPair("File Menu.Create new library", "Ctrl+Shift+N")); - keys.push_back(QPair("File Menu.Create new folder", "")); - keys.push_back(QPair("File Menu.Import", "Ctrl+I")); - keys.push_back(QPair("File Menu.Import level library", "Ctrl+Shift+I")); - keys.push_back(QPair("File Menu.Save", "Ctrl+S")); - keys.push_back(QPair("File Menu.Close", "Ctrl+Q")); - //EDIT MENU SHORTCUTS///////////////////////////////////////////////////// - keys.push_back(QPair("Edit Menu.Copy", "Ctrl+C")); - keys.push_back(QPair("Edit Menu.Paste", "Ctrl+V")); - keys.push_back(QPair("Edit Menu.Duplicate", "Ctrl+D")); - keys.push_back(QPair("Edit Menu.Undo", "Ctrl+Z")); - keys.push_back(QPair("Edit Menu.Redo", "Ctrl+Shift+Z")); - keys.push_back(QPair("Edit Menu.Group", "Ctrl+G")); - keys.push_back(QPair("Edit Menu.Ungroup", "Ctrl+Shift+G")); - keys.push_back(QPair("Edit Menu.Rename", "Ctrl+R")); - keys.push_back(QPair("Edit Menu.Reset", "")); - keys.push_back(QPair("Edit Menu.Edit Hotkeys", "")); - keys.push_back(QPair("Edit Menu.Assign to selected", "Ctrl+Space")); - keys.push_back(QPair("Edit Menu.Insert Comment", "Ctrl+Alt+M")); - keys.push_back(QPair("Edit Menu.Enable/Disable Emitter", "Ctrl+E")); - keys.push_back(QPair("File Menu.Enable All", "")); - keys.push_back(QPair("File Menu.Disable All", "")); - keys.push_back(QPair("Edit Menu.Delete", "Del")); - //VIEW MENU SHORTCUTS///////////////////////////////////////////////////// - keys.push_back(QPair("View Menu.Reset Layout", "")); - //PLAYBACK CONTROL//////////////////////////////////////////////////////// - keys.push_back(QPair("Previewer.Play/Pause Toggle", "Space")); - keys.push_back(QPair("Previewer.Step forward through time", "c")); - keys.push_back(QPair("Previewer.Loop Toggle", "z")); - keys.push_back(QPair("Previewer.Reset Playback", "x")); - keys.push_back(QPair("Previewer.Focus", "Ctrl+F")); - keys.push_back(QPair("Previewer.Zoom In", "w")); - keys.push_back(QPair("Previewer.Zoom Out", "s")); - keys.push_back(QPair("Previewer.Pan Left", "a")); - keys.push_back(QPair("Previewer.Pan Right", "d")); - - for (QPair key : keys) - { - unsigned int index = hotkeys.count(); - hotkeys.push_back(HotKey()); - hotkeys[index].SetPath(key.first.toStdString().c_str()); - hotkeys[index].SetSequenceFromString(key.second.toStdString().c_str()); - } - } - - void HotKey_SetKeys(QVector keys) override - { - hotkeys = keys; - } - - QVector HotKey_GetKeys() override - { - return hotkeys; - } - - QString HotKey_GetPressedHotkey(const QKeyEvent* event) override - { - if (!m_hotkeysAreEnabled) - { - return ""; - } - for (HotKey key : hotkeys) - { - if (HotKey_IsPressed(event, key.path.toUtf8())) - { - return key.path; - } - } - return ""; - } - QString HotKey_GetPressedHotkey(const QShortcutEvent* event) override - { - if (!m_hotkeysAreEnabled) - { - return ""; - } - for (HotKey key : hotkeys) - { - if (HotKey_IsPressed(event, key.path.toUtf8())) - { - return key.path; - } - } - return ""; - } - //building the default hotkey list re-enables hotkeys - //do not use this when rebuilding the default list is a possibility. - void HotKey_SetEnabled(bool val) override - { - m_hotkeysAreEnabled = val; - } - - bool HotKey_IsEnabled() const override - { - return m_hotkeysAreEnabled; - } - -protected: - QMap m_tooltips; - - void ToolTip_ParseNode(XmlNodeRef node) - { - if (QString(node->getTag()).compare("tooltip", Qt::CaseInsensitive) != 0) - { - unsigned int childCount = node->getChildCount(); - - for (unsigned int i = 0; i < childCount; i++) - { - ToolTip_ParseNode(node->getChild(i)); - } - } - - QString title = node->getAttr("title"); - QString content = node->getAttr("content"); - QString specialContent = node->getAttr("special_content"); - QString disabledContent = node->getAttr("disabled_content"); - - QMap::iterator itr = m_tooltips.insert(node->getAttr("path"), ToolTip()); - itr->isValid = true; - itr->title = title; - itr->content = content; - itr->specialContent = specialContent; - itr->disabledContent = disabledContent; - - unsigned int childCount = node->getChildCount(); - - for (unsigned int i = 0; i < childCount; i++) - { - ToolTip_ParseNode(node->getChild(i)); - } - } - - ToolTip GetToolTip(QString path) - { - if (m_tooltips.contains(path)) - { - return m_tooltips[path]; - } - ToolTip temp; - temp.isValid = false; - return temp; - } - -public: - void ToolTip_LoadConfigXML(QString filepath) override - { - XmlNodeRef node = GetIEditor()->GetSystem()->LoadXmlFromFile(filepath.toStdString().c_str()); - ToolTip_ParseNode(node); - } - - void ToolTip_BuildFromConfig(IQToolTip* tooltip, QString path, QString option, QString optionalData = "", bool isEnabled = true) override - { - AZ_Assert(tooltip, "tooltip cannot be null"); - - QString title = ToolTip_GetTitle(path, option); - QString content = ToolTip_GetContent(path, option); - QString specialContent = ToolTip_GetSpecialContentType(path, option); - QString disabledContent = ToolTip_GetDisabledContent(path, option); - - // Even if these items are empty, we set them anyway to clear out any data that was left over from when the tooltip was used for a different object. - tooltip->SetTitle(title); - tooltip->SetContent(content); - - //this only handles simple creation...if you need complex call this then add specials separate - if (!specialContent.contains("::")) - { - tooltip->AddSpecialContent(specialContent, optionalData); - } - - if (!isEnabled) // If disabled, add disabled value - { - tooltip->AppendContent(disabledContent); - } - } - - QString ToolTip_GetTitle(QString path, QString option) override - { - if (!option.isEmpty() && GetToolTip(path + "." + option).isValid) - { - return GetToolTip(path + "." + option).title; - } - if (!option.isEmpty() && GetToolTip("Options." + option).isValid) - { - return GetToolTip("Options." + option).title; - } - return GetToolTip(path).title; - } - - QString ToolTip_GetContent(QString path, QString option) override - { - if (!option.isEmpty() && GetToolTip(path + "." + option).isValid) - { - return GetToolTip(path + "." + option).content; - } - if (!option.isEmpty() && GetToolTip("Options." + option).isValid) - { - return GetToolTip("Options." + option).content; - } - return GetToolTip(path).content; - } - - QString ToolTip_GetSpecialContentType(QString path, QString option) override - { - if (!option.isEmpty() && GetToolTip(path + "." + option).isValid) - { - return GetToolTip(path + "." + option).specialContent; - } - if (!option.isEmpty() && GetToolTip("Options." + option).isValid) - { - return GetToolTip("Options." + option).specialContent; - } - return GetToolTip(path).specialContent; - } - - QString ToolTip_GetDisabledContent(QString path, QString option) override - { - if (!option.isEmpty() && GetToolTip(path + "." + option).isValid) - { - return GetToolTip(path + "." + option).disabledContent; - } - if (!option.isEmpty() && GetToolTip("Options." + option).isValid) - { - return GetToolTip("Options." + option).disabledContent; - } - return GetToolTip(path).disabledContent; - } -}; - -IEditorPanelUtils* CreateEditorPanelUtils() -{ - return new CEditorPanelUtils_Impl(); -} - diff --git a/Code/Editor/EditorPanelUtils.h b/Code/Editor/EditorPanelUtils.h deleted file mode 100644 index 6ac15ebfc9..0000000000 --- a/Code/Editor/EditorPanelUtils.h +++ /dev/null @@ -1,16 +0,0 @@ -/* - * Copyright (c) Contributors to the Open 3D Engine Project. - * For complete copyright and license terms please see the LICENSE at the root of this distribution. - * - * SPDX-License-Identifier: Apache-2.0 OR MIT - * - */ -// Copyright 2015 Amazon.com, Inc. or its affiliates. All Rights Reserved. -#ifndef CRYINCLUDE_CRYEDITOR_EDITORPANELUTILS_H -#define CRYINCLUDE_CRYEDITOR_EDITORPANELUTILS_H -#pragma once - -struct IEditorPanelUtils; -IEditorPanelUtils* CreateEditorPanelUtils(); - -#endif diff --git a/Code/Editor/EditorPreferencesDialog.cpp b/Code/Editor/EditorPreferencesDialog.cpp index a1859b0f14..665daf52a8 100644 --- a/Code/Editor/EditorPreferencesDialog.cpp +++ b/Code/Editor/EditorPreferencesDialog.cpp @@ -112,6 +112,31 @@ void EditorPreferencesDialog::showEvent(QShowEvent* event) QDialog::showEvent(event); } +void WidgetHandleKeyPressEvent(QWidget* widget, QKeyEvent* event) +{ + // If the enter key is pressed during any text input, the dialog box will close + // making it inconvenient to do multiple edits. This routine captures the + // Key_Enter or Key_Return and clears the focus to give a visible cue that + // editing of that field has finished and then doesn't propogate it. + if (event->key() != Qt::Key::Key_Enter && event->key() != Qt::Key::Key_Return) + { + QApplication::sendEvent(widget, event); + } + else + { + if (QWidget* editWidget = QApplication::focusWidget()) + { + editWidget->clearFocus(); + } + } +} + + +void EditorPreferencesDialog::keyPressEvent(QKeyEvent* event) +{ + WidgetHandleKeyPressEvent(this, event); +} + void EditorPreferencesDialog::OnTreeCurrentItemChanged() { QTreeWidgetItem* currentItem = ui->pageTree->currentItem(); diff --git a/Code/Editor/EditorPreferencesDialog.h b/Code/Editor/EditorPreferencesDialog.h index 64f44d7ab5..a3f05ad00d 100644 --- a/Code/Editor/EditorPreferencesDialog.h +++ b/Code/Editor/EditorPreferencesDialog.h @@ -19,6 +19,8 @@ namespace Ui class EditorPreferencesTreeWidgetItem; +void WidgetHandleKeyPressEvent(QWidget* widget, QKeyEvent* event); + class EditorPreferencesDialog : public QDialog , public AzToolsFramework::IPropertyEditorNotify @@ -36,6 +38,7 @@ public: protected: void showEvent(QShowEvent* event) override; + void keyPressEvent(QKeyEvent* event) override; private: void CreateImages(); diff --git a/Code/Editor/EditorPreferencesPageAWS.cpp b/Code/Editor/EditorPreferencesPageAWS.cpp index 68a9d6889f..9279dce7bc 100644 --- a/Code/Editor/EditorPreferencesPageAWS.cpp +++ b/Code/Editor/EditorPreferencesPageAWS.cpp @@ -28,7 +28,7 @@ void CEditorPreferencesPage_AWS::Reflect(AZ::SerializeContext& serialize) if (editContext) { editContext->Class("Options", "") - ->DataElement(AZ::Edit::UIHandlers::CheckBox, &UsageOptions::m_awsAttributionEnabled, "Allow O3DE to send information about your use of AWS Core Gem to AWS", + ->DataElement(AZ::Edit::UIHandlers::CheckBox, &UsageOptions::m_awsAttributionEnabled, "Allow O3DE to send information about your use of AWS Core Gem to AWS", ""); editContext->Class("AWS Preferences", "AWS Preferences") diff --git a/Code/Editor/EditorPreferencesPageViewportCamera.cpp b/Code/Editor/EditorPreferencesPageViewportCamera.cpp index 2f6e6b1b9d..c81eac0414 100644 --- a/Code/Editor/EditorPreferencesPageViewportCamera.cpp +++ b/Code/Editor/EditorPreferencesPageViewportCamera.cpp @@ -61,7 +61,7 @@ static AZStd::vector GetEditorInputNames() void CEditorPreferencesPage_ViewportCamera::Reflect(AZ::SerializeContext& serialize) { serialize.Class() - ->Version(3) + ->Version(4) ->Field("TranslateSpeed", &CameraMovementSettings::m_translateSpeed) ->Field("RotateSpeed", &CameraMovementSettings::m_rotateSpeed) ->Field("BoostMultiplier", &CameraMovementSettings::m_boostMultiplier) @@ -76,9 +76,8 @@ void CEditorPreferencesPage_ViewportCamera::Reflect(AZ::SerializeContext& serial ->Field("OrbitYawRotationInverted", &CameraMovementSettings::m_orbitYawRotationInverted) ->Field("PanInvertedX", &CameraMovementSettings::m_panInvertedX) ->Field("PanInvertedY", &CameraMovementSettings::m_panInvertedY) - ->Field("DefaultPositionX", &CameraMovementSettings::m_defaultCameraPositionX) - ->Field("DefaultPositionY", &CameraMovementSettings::m_defaultCameraPositionY) - ->Field("DefaultPositionZ", &CameraMovementSettings::m_defaultCameraPositionZ); + ->Field("DefaultPosition", &CameraMovementSettings::m_defaultPosition) + ->Field("DefaultOrbitDistance", &CameraMovementSettings::m_defaultOrbitDistance); serialize.Class() ->Version(2) @@ -159,14 +158,12 @@ void CEditorPreferencesPage_ViewportCamera::Reflect(AZ::SerializeContext& serial AZ::Edit::UIHandlers::CheckBox, &CameraMovementSettings::m_captureCursorLook, "Camera Capture Look Cursor", "Should the cursor be captured (hidden) while performing free look") ->DataElement( - AZ::Edit::UIHandlers::SpinBox, &CameraMovementSettings::m_defaultCameraPositionX, "Default X Camera Position", - "Default X Camera Position when a level is opened") + AZ::Edit::UIHandlers::Vector3, &CameraMovementSettings::m_defaultPosition, "Default Camera Position", + "Default Camera Position when a level is first opened") ->DataElement( - AZ::Edit::UIHandlers::SpinBox, &CameraMovementSettings::m_defaultCameraPositionY, "Default Y Camera Position", - "Default Y Camera Position when a level is opened") - ->DataElement( - AZ::Edit::UIHandlers::SpinBox, &CameraMovementSettings::m_defaultCameraPositionZ, "Default Z Camera Position", - "Default Z Camera Position when a level is opened"); + AZ::Edit::UIHandlers::SpinBox, &CameraMovementSettings::m_defaultOrbitDistance, "Default Orbit Distance", + "The default distance to orbit about when there is no entity selected") + ->Attribute(AZ::Edit::Attributes::Min, minValue); editContext->Class("Camera Input Settings", "") ->DataElement( @@ -283,12 +280,8 @@ void CEditorPreferencesPage_ViewportCamera::OnApply() SandboxEditor::SetCameraOrbitYawRotationInverted(m_cameraMovementSettings.m_orbitYawRotationInverted); SandboxEditor::SetCameraPanInvertedX(m_cameraMovementSettings.m_panInvertedX); SandboxEditor::SetCameraPanInvertedY(m_cameraMovementSettings.m_panInvertedY); - SandboxEditor::SetDefaultCameraEditorPosition( - AZ::Vector3( - m_cameraMovementSettings.m_defaultCameraPositionX, - m_cameraMovementSettings.m_defaultCameraPositionY, - m_cameraMovementSettings.m_defaultCameraPositionZ - )); + SandboxEditor::SetCameraDefaultEditorPosition(m_cameraMovementSettings.m_defaultPosition); + SandboxEditor::SetCameraDefaultOrbitDistance(m_cameraMovementSettings.m_defaultOrbitDistance); SandboxEditor::SetCameraTranslateForwardChannelId(m_cameraInputSettings.m_translateForwardChannelId); SandboxEditor::SetCameraTranslateBackwardChannelId(m_cameraInputSettings.m_translateBackwardChannelId); @@ -325,11 +318,8 @@ void CEditorPreferencesPage_ViewportCamera::InitializeSettings() m_cameraMovementSettings.m_orbitYawRotationInverted = SandboxEditor::CameraOrbitYawRotationInverted(); m_cameraMovementSettings.m_panInvertedX = SandboxEditor::CameraPanInvertedX(); m_cameraMovementSettings.m_panInvertedY = SandboxEditor::CameraPanInvertedY(); - - AZ::Vector3 defaultCameraPosition = SandboxEditor::DefaultEditorCameraPosition(); - m_cameraMovementSettings.m_defaultCameraPositionX = defaultCameraPosition.GetX(); - m_cameraMovementSettings.m_defaultCameraPositionY = defaultCameraPosition.GetY(); - m_cameraMovementSettings.m_defaultCameraPositionZ = defaultCameraPosition.GetZ(); + m_cameraMovementSettings.m_defaultPosition = SandboxEditor::CameraDefaultEditorPosition(); + m_cameraMovementSettings.m_defaultOrbitDistance = SandboxEditor::CameraDefaultOrbitDistance(); m_cameraInputSettings.m_translateForwardChannelId = SandboxEditor::CameraTranslateForwardChannelId().GetName(); m_cameraInputSettings.m_translateBackwardChannelId = SandboxEditor::CameraTranslateBackwardChannelId().GetName(); diff --git a/Code/Editor/EditorPreferencesPageViewportCamera.h b/Code/Editor/EditorPreferencesPageViewportCamera.h index a2705bfd24..41816de51c 100644 --- a/Code/Editor/EditorPreferencesPageViewportCamera.h +++ b/Code/Editor/EditorPreferencesPageViewportCamera.h @@ -9,9 +9,12 @@ #pragma once #include "Include/IPreferencesPage.h" + +#include #include #include #include + #include inline AZ::Crc32 EditorPropertyVisibility(const bool enabled) @@ -43,6 +46,7 @@ private: { AZ_TYPE_INFO(CameraMovementSettings, "{60B8C07E-5F48-4171-A50B-F45558B5CCA1}") + AZ::Vector3 m_defaultPosition; float m_translateSpeed; float m_rotateSpeed; float m_scrollSpeed; @@ -50,16 +54,14 @@ private: float m_panSpeed; float m_boostMultiplier; float m_rotateSmoothness; - bool m_rotateSmoothing; float m_translateSmoothness; - bool m_translateSmoothing; + float m_defaultOrbitDistance; bool m_captureCursorLook; bool m_orbitYawRotationInverted; bool m_panInvertedX; bool m_panInvertedY; - float m_defaultCameraPositionX; - float m_defaultCameraPositionY; - float m_defaultCameraPositionZ; + bool m_rotateSmoothing; + bool m_translateSmoothing; AZ::Crc32 RotateSmoothingVisibility() const { diff --git a/Code/Editor/EditorPreferencesPageViewportManipulator.cpp b/Code/Editor/EditorPreferencesPageViewportManipulator.cpp index ea00d6a7f0..32e0e5b573 100644 --- a/Code/Editor/EditorPreferencesPageViewportManipulator.cpp +++ b/Code/Editor/EditorPreferencesPageViewportManipulator.cpp @@ -10,6 +10,8 @@ #include "EditorPreferencesPageViewportManipulator.h" +#include + // Editor #include "EditorViewportSettings.h" #include "Settings.h" @@ -19,7 +21,17 @@ void CEditorPreferencesPage_ViewportManipulator::Reflect(AZ::SerializeContext& s serialize.Class() ->Version(1) ->Field("LineBoundWidth", &Manipulators::m_manipulatorLineBoundWidth) - ->Field("CircleBoundWidth", &Manipulators::m_manipulatorCircleBoundWidth); + ->Field("CircleBoundWidth", &Manipulators::m_manipulatorCircleBoundWidth) + ->Field("LinearManipulatorAxisLength", &Manipulators::m_linearManipulatorAxisLength) + ->Field("PlanarManipulatorAxisLength", &Manipulators::m_planarManipulatorAxisLength) + ->Field("SurfaceManipulatorRadius", &Manipulators::m_surfaceManipulatorRadius) + ->Field("SurfaceManipulatorOpacity", &Manipulators::m_surfaceManipulatorOpacity) + ->Field("LinearManipulatorConeLength", &Manipulators::m_linearManipulatorConeLength) + ->Field("LinearManipulatorConeRadius", &Manipulators::m_linearManipulatorConeRadius) + ->Field("ScaleManipulatorBoxHalfExtent", &Manipulators::m_scaleManipulatorBoxHalfExtent) + ->Field("RotationManipulatorRadius", &Manipulators::m_rotationManipulatorRadius) + ->Field("ManipulatorViewBaseScale", &Manipulators::m_manipulatorViewBaseScale) + ->Field("FlipManipulatorAxesTowardsView", &Manipulators::m_flipManipulatorAxesTowardsView); serialize.Class()->Version(2)->Field( "Manipulators", &CEditorPreferencesPage_ViewportManipulator::m_manipulators); @@ -36,7 +48,55 @@ void CEditorPreferencesPage_ViewportManipulator::Reflect(AZ::SerializeContext& s AZ::Edit::UIHandlers::SpinBox, &Manipulators::m_manipulatorCircleBoundWidth, "Circle Bound Width", "Manipulator Circle Bound Width") ->Attribute(AZ::Edit::Attributes::Min, 0.001f) - ->Attribute(AZ::Edit::Attributes::Max, 2.0f); + ->Attribute(AZ::Edit::Attributes::Max, 2.0f) + ->DataElement( + AZ::Edit::UIHandlers::SpinBox, &Manipulators::m_linearManipulatorAxisLength, "Linear Manipulator Axis Length", + "Length of default Linear Manipulator (for Translation and Scale Manipulators)") + ->Attribute(AZ::Edit::Attributes::Min, 0.1f) + ->Attribute(AZ::Edit::Attributes::Max, 5.0f) + ->DataElement( + AZ::Edit::UIHandlers::SpinBox, &Manipulators::m_planarManipulatorAxisLength, "Planar Manipulator Axis Length", + "Length of default Planar Manipulator (for Translation Manipulators)") + ->Attribute(AZ::Edit::Attributes::Min, 0.1f) + ->Attribute(AZ::Edit::Attributes::Max, 5.0f) + ->DataElement( + AZ::Edit::UIHandlers::SpinBox, &Manipulators::m_surfaceManipulatorRadius, "Surface Manipulator Radius", + "Radius of default Surface Manipulator (for Translation Manipulators)") + ->Attribute(AZ::Edit::Attributes::Min, 0.05f) + ->Attribute(AZ::Edit::Attributes::Max, 1.0f) + ->DataElement( + AZ::Edit::UIHandlers::SpinBox, &Manipulators::m_surfaceManipulatorOpacity, "Surface Manipulator Opacity", + "Opacity of default Surface Manipulator (for Translation Manipulators)") + ->Attribute(AZ::Edit::Attributes::Min, 0.01f) + ->Attribute(AZ::Edit::Attributes::Max, 1.0f) + ->DataElement( + AZ::Edit::UIHandlers::SpinBox, &Manipulators::m_linearManipulatorConeLength, "Linear Manipulator Cone Length", + "Length of cone for default Linear Manipulator (for Translation Manipulators)") + ->Attribute(AZ::Edit::Attributes::Min, 0.05f) + ->Attribute(AZ::Edit::Attributes::Max, 1.0f) + ->DataElement( + AZ::Edit::UIHandlers::SpinBox, &Manipulators::m_linearManipulatorConeRadius, "Linear Manipulator Cone Radius", + "Radius of cone for default Linear Manipulator (for Translation Manipulators)") + ->Attribute(AZ::Edit::Attributes::Min, 0.05f) + ->Attribute(AZ::Edit::Attributes::Max, 0.5f) + ->DataElement( + AZ::Edit::UIHandlers::SpinBox, &Manipulators::m_scaleManipulatorBoxHalfExtent, "Scale Manipulator Box Half Extent", + "Half extent of box for default Scale Manipulator") + ->Attribute(AZ::Edit::Attributes::Min, 0.05f) + ->Attribute(AZ::Edit::Attributes::Max, 1.0f) + ->DataElement( + AZ::Edit::UIHandlers::SpinBox, &Manipulators::m_rotationManipulatorRadius, "Rotation Manipulator Radius", + "Radius of default Angular Manipulators (for Rotation Manipulators)") + ->Attribute(AZ::Edit::Attributes::Min, 0.5f) + ->Attribute(AZ::Edit::Attributes::Max, 5.0f) + ->DataElement( + AZ::Edit::UIHandlers::SpinBox, &Manipulators::m_manipulatorViewBaseScale, "Manipulator View Base Scale", + "The base scale to apply to all Manipulator Views (default is 1.0)") + ->Attribute(AZ::Edit::Attributes::Min, 0.5f) + ->Attribute(AZ::Edit::Attributes::Max, 2.0f) + ->DataElement( + AZ::Edit::UIHandlers::CheckBox, &Manipulators::m_flipManipulatorAxesTowardsView, "Flip Manipulator Axes Towards View", + "Determines whether Planar and Linear Manipulators should switch to face the view (camera) in the Editor"); editContext ->Class("Manipulator Viewport Preferences", "Manipulator Viewport Preferences") @@ -82,10 +142,32 @@ void CEditorPreferencesPage_ViewportManipulator::OnApply() { SandboxEditor::SetManipulatorLineBoundWidth(m_manipulators.m_manipulatorLineBoundWidth); SandboxEditor::SetManipulatorCircleBoundWidth(m_manipulators.m_manipulatorCircleBoundWidth); + + AzToolsFramework::SetLinearManipulatorAxisLength(m_manipulators.m_linearManipulatorAxisLength); + AzToolsFramework::SetPlanarManipulatorAxisLength(m_manipulators.m_planarManipulatorAxisLength); + AzToolsFramework::SetSurfaceManipulatorRadius(m_manipulators.m_surfaceManipulatorRadius); + AzToolsFramework::SetSurfaceManipulatorOpacity(m_manipulators.m_surfaceManipulatorOpacity); + AzToolsFramework::SetLinearManipulatorConeLength(m_manipulators.m_linearManipulatorConeLength); + AzToolsFramework::SetLinearManipulatorConeRadius(m_manipulators.m_linearManipulatorConeRadius); + AzToolsFramework::SetScaleManipulatorBoxHalfExtent(m_manipulators.m_scaleManipulatorBoxHalfExtent); + AzToolsFramework::SetRotationManipulatorRadius(m_manipulators.m_rotationManipulatorRadius); + AzToolsFramework::SetFlipManipulatorAxesTowardsView(m_manipulators.m_flipManipulatorAxesTowardsView); + AzToolsFramework::SetManipulatorViewBaseScale(m_manipulators.m_manipulatorViewBaseScale); } void CEditorPreferencesPage_ViewportManipulator::InitializeSettings() { m_manipulators.m_manipulatorLineBoundWidth = SandboxEditor::ManipulatorLineBoundWidth(); m_manipulators.m_manipulatorCircleBoundWidth = SandboxEditor::ManipulatorCircleBoundWidth(); + + m_manipulators.m_linearManipulatorAxisLength = AzToolsFramework::LinearManipulatorAxisLength(); + m_manipulators.m_planarManipulatorAxisLength = AzToolsFramework::PlanarManipulatorAxisLength(); + m_manipulators.m_surfaceManipulatorRadius = AzToolsFramework::SurfaceManipulatorRadius(); + m_manipulators.m_surfaceManipulatorOpacity = AzToolsFramework::SurfaceManipulatorOpacity(); + m_manipulators.m_linearManipulatorConeLength = AzToolsFramework::LinearManipulatorConeLength(); + m_manipulators.m_linearManipulatorConeRadius = AzToolsFramework::LinearManipulatorConeRadius(); + m_manipulators.m_scaleManipulatorBoxHalfExtent = AzToolsFramework::ScaleManipulatorBoxHalfExtent(); + m_manipulators.m_rotationManipulatorRadius = AzToolsFramework::RotationManipulatorRadius(); + m_manipulators.m_flipManipulatorAxesTowardsView = AzToolsFramework::FlipManipulatorAxesTowardsView(); + m_manipulators.m_manipulatorViewBaseScale = AzToolsFramework::ManipulatorViewBaseScale(); } diff --git a/Code/Editor/EditorPreferencesPageViewportManipulator.h b/Code/Editor/EditorPreferencesPageViewportManipulator.h index 93db6a7035..eb76cec2c5 100644 --- a/Code/Editor/EditorPreferencesPageViewportManipulator.h +++ b/Code/Editor/EditorPreferencesPageViewportManipulator.h @@ -41,6 +41,16 @@ private: float m_manipulatorLineBoundWidth = 0.0f; float m_manipulatorCircleBoundWidth = 0.0f; + float m_linearManipulatorAxisLength = 0.0f; + float m_planarManipulatorAxisLength = 0.0f; + float m_surfaceManipulatorRadius = 0.0f; + float m_surfaceManipulatorOpacity = 0.0f; + float m_linearManipulatorConeLength = 0.0f; + float m_linearManipulatorConeRadius = 0.0f; + float m_scaleManipulatorBoxHalfExtent = 0.0f; + float m_rotationManipulatorRadius = 0.0f; + float m_manipulatorViewBaseScale = 0.0f; + bool m_flipManipulatorAxesTowardsView = false; }; Manipulators m_manipulators; diff --git a/Code/Editor/EditorViewportSettings.cpp b/Code/Editor/EditorViewportSettings.cpp index 8f2be1de6c..e06b9696e1 100644 --- a/Code/Editor/EditorViewportSettings.cpp +++ b/Code/Editor/EditorViewportSettings.cpp @@ -12,6 +12,7 @@ #include #include #include +#include namespace SandboxEditor { @@ -38,6 +39,7 @@ namespace SandboxEditor constexpr AZStd::string_view CameraTranslateSmoothingSetting = "/Amazon/Preferences/Editor/Camera/TranslateSmoothing"; constexpr AZStd::string_view CameraRotateSmoothingSetting = "/Amazon/Preferences/Editor/Camera/RotateSmoothing"; constexpr AZStd::string_view CameraCaptureCursorLookSetting = "/Amazon/Preferences/Editor/Camera/CaptureCursorLook"; + constexpr AZStd::string_view CameraDefaultOrbitDistanceSetting = "/Amazon/Preferences/Editor/Camera/DefaultOrbitDistance"; constexpr AZStd::string_view CameraTranslateForwardIdSetting = "/Amazon/Preferences/Editor/Camera/CameraTranslateForwardId"; constexpr AZStd::string_view CameraTranslateBackwardIdSetting = "/Amazon/Preferences/Editor/Camera/CameraTranslateBackwardId"; constexpr AZStd::string_view CameraTranslateLeftIdSetting = "/Amazon/Preferences/Editor/Camera/CameraTranslateLeftId"; @@ -56,31 +58,6 @@ namespace SandboxEditor constexpr AZStd::string_view CameraDefaultStartingPositionY = "/Amazon/Preferences/Editor/Camera/DefaultStartingPosition/y"; constexpr AZStd::string_view CameraDefaultStartingPositionZ = "/Amazon/Preferences/Editor/Camera/DefaultStartingPosition/z"; - template - void SetRegistry(const AZStd::string_view setting, T&& value) - { - if (auto* registry = AZ::SettingsRegistry::Get()) - { - registry->Set(setting, AZStd::forward(value)); - } - } - - template - AZStd::remove_cvref_t GetRegistry(const AZStd::string_view setting, T&& defaultValue) - { - AZStd::remove_cvref_t value = AZStd::forward(defaultValue); - if (const auto* registry = AZ::SettingsRegistry::Get()) - { - T potentialValue; - if (registry->Get(potentialValue, setting)) - { - value = AZStd::move(potentialValue); - } - } - - return value; - } - struct EditorViewportSettingsCallbacksImpl : public EditorViewportSettingsCallbacks { EditorViewportSettingsCallbacksImpl() @@ -114,392 +91,412 @@ namespace SandboxEditor return AZStd::make_unique(); } - AZ::Vector3 DefaultEditorCameraPosition() + AZ::Vector3 CameraDefaultEditorPosition() { - float xPosition = aznumeric_cast(GetRegistry(CameraDefaultStartingPositionX, 0.0)); - float yPosition = aznumeric_cast(GetRegistry(CameraDefaultStartingPositionY, -10.0)); - float zPosition = aznumeric_cast(GetRegistry(CameraDefaultStartingPositionZ, 4.0)); - return AZ::Vector3(xPosition, yPosition, zPosition); + return AZ::Vector3( + aznumeric_cast(AzToolsFramework::GetRegistry(CameraDefaultStartingPositionX, 0.0)), + aznumeric_cast(AzToolsFramework::GetRegistry(CameraDefaultStartingPositionY, -10.0)), + aznumeric_cast(AzToolsFramework::GetRegistry(CameraDefaultStartingPositionZ, 4.0))); } - void SetDefaultCameraEditorPosition(const AZ::Vector3 defaultCameraPosition) + void SetCameraDefaultEditorPosition(const AZ::Vector3& defaultCameraPosition) { - SetRegistry(CameraDefaultStartingPositionX, defaultCameraPosition.GetX()); - SetRegistry(CameraDefaultStartingPositionY, defaultCameraPosition.GetY()); - SetRegistry(CameraDefaultStartingPositionZ, defaultCameraPosition.GetZ()); + AzToolsFramework::SetRegistry(CameraDefaultStartingPositionX, defaultCameraPosition.GetX()); + AzToolsFramework::SetRegistry(CameraDefaultStartingPositionY, defaultCameraPosition.GetY()); + AzToolsFramework::SetRegistry(CameraDefaultStartingPositionZ, defaultCameraPosition.GetZ()); } AZ::u64 MaxItemsShownInAssetBrowserSearch() { - return GetRegistry(AssetBrowserMaxItemsShownInSearchSetting, aznumeric_cast(50)); + return AzToolsFramework::GetRegistry(AssetBrowserMaxItemsShownInSearchSetting, aznumeric_cast(50)); } void SetMaxItemsShownInAssetBrowserSearch(const AZ::u64 numberOfItemsShown) { - SetRegistry(AssetBrowserMaxItemsShownInSearchSetting, numberOfItemsShown); + AzToolsFramework::SetRegistry(AssetBrowserMaxItemsShownInSearchSetting, numberOfItemsShown); } bool GridSnappingEnabled() { - return GetRegistry(GridSnappingSetting, false); + return AzToolsFramework::GetRegistry(GridSnappingSetting, false); } void SetGridSnapping(const bool enabled) { - SetRegistry(GridSnappingSetting, enabled); + AzToolsFramework::SetRegistry(GridSnappingSetting, enabled); } float GridSnappingSize() { - return aznumeric_cast(GetRegistry(GridSizeSetting, 0.1)); + return aznumeric_cast(AzToolsFramework::GetRegistry(GridSizeSetting, 0.1)); } void SetGridSnappingSize(const float size) { - SetRegistry(GridSizeSetting, size); + AzToolsFramework::SetRegistry(GridSizeSetting, size); } bool AngleSnappingEnabled() { - return GetRegistry(AngleSnappingSetting, false); + return AzToolsFramework::GetRegistry(AngleSnappingSetting, false); } void SetAngleSnapping(const bool enabled) { - SetRegistry(AngleSnappingSetting, enabled); + AzToolsFramework::SetRegistry(AngleSnappingSetting, enabled); } float AngleSnappingSize() { - return aznumeric_cast(GetRegistry(AngleSizeSetting, 5.0)); + return aznumeric_cast(AzToolsFramework::GetRegistry(AngleSizeSetting, 5.0)); } void SetAngleSnappingSize(const float size) { - SetRegistry(AngleSizeSetting, size); + AzToolsFramework::SetRegistry(AngleSizeSetting, size); } bool ShowingGrid() { - return GetRegistry(ShowGridSetting, false); + return AzToolsFramework::GetRegistry(ShowGridSetting, false); } void SetShowingGrid(const bool showing) { - SetRegistry(ShowGridSetting, showing); + AzToolsFramework::SetRegistry(ShowGridSetting, showing); } bool StickySelectEnabled() { - return GetRegistry(StickySelectSetting, false); + return AzToolsFramework::GetRegistry(StickySelectSetting, false); } void SetStickySelectEnabled(const bool enabled) { - SetRegistry(StickySelectSetting, enabled); + AzToolsFramework::SetRegistry(StickySelectSetting, enabled); } float ManipulatorLineBoundWidth() { - return aznumeric_cast(GetRegistry(ManipulatorLineBoundWidthSetting, 0.1)); + return aznumeric_cast(AzToolsFramework::GetRegistry(ManipulatorLineBoundWidthSetting, 0.1)); } void SetManipulatorLineBoundWidth(const float lineBoundWidth) { - SetRegistry(ManipulatorLineBoundWidthSetting, lineBoundWidth); + AzToolsFramework::SetRegistry(ManipulatorLineBoundWidthSetting, lineBoundWidth); } float ManipulatorCircleBoundWidth() { - return aznumeric_cast(GetRegistry(ManipulatorCircleBoundWidthSetting, 0.1)); + return aznumeric_cast(AzToolsFramework::GetRegistry(ManipulatorCircleBoundWidthSetting, 0.1)); } void SetManipulatorCircleBoundWidth(const float circleBoundWidth) { - SetRegistry(ManipulatorCircleBoundWidthSetting, circleBoundWidth); + AzToolsFramework::SetRegistry(ManipulatorCircleBoundWidthSetting, circleBoundWidth); } float CameraTranslateSpeed() { - return aznumeric_cast(GetRegistry(CameraTranslateSpeedSetting, 10.0)); + return aznumeric_cast(AzToolsFramework::GetRegistry(CameraTranslateSpeedSetting, 10.0)); } void SetCameraTranslateSpeed(const float speed) { - SetRegistry(CameraTranslateSpeedSetting, speed); + AzToolsFramework::SetRegistry(CameraTranslateSpeedSetting, speed); } float CameraBoostMultiplier() { - return aznumeric_cast(GetRegistry(CameraBoostMultiplierSetting, 3.0)); + return aznumeric_cast(AzToolsFramework::GetRegistry(CameraBoostMultiplierSetting, 3.0)); } void SetCameraBoostMultiplier(const float multiplier) { - SetRegistry(CameraBoostMultiplierSetting, multiplier); + AzToolsFramework::SetRegistry(CameraBoostMultiplierSetting, multiplier); } float CameraRotateSpeed() { - return aznumeric_cast(GetRegistry(CameraRotateSpeedSetting, 0.005)); + return aznumeric_cast(AzToolsFramework::GetRegistry(CameraRotateSpeedSetting, 0.005)); } void SetCameraRotateSpeed(const float speed) { - SetRegistry(CameraRotateSpeedSetting, speed); + AzToolsFramework::SetRegistry(CameraRotateSpeedSetting, speed); } float CameraScrollSpeed() { - return aznumeric_cast(GetRegistry(CameraScrollSpeedSetting, 0.02)); + return aznumeric_cast(AzToolsFramework::GetRegistry(CameraScrollSpeedSetting, 0.02)); } void SetCameraScrollSpeed(const float speed) { - SetRegistry(CameraScrollSpeedSetting, speed); + AzToolsFramework::SetRegistry(CameraScrollSpeedSetting, speed); } float CameraDollyMotionSpeed() { - return aznumeric_cast(GetRegistry(CameraDollyMotionSpeedSetting, 0.01)); + return aznumeric_cast(AzToolsFramework::GetRegistry(CameraDollyMotionSpeedSetting, 0.01)); } void SetCameraDollyMotionSpeed(const float speed) { - SetRegistry(CameraDollyMotionSpeedSetting, speed); + AzToolsFramework::SetRegistry(CameraDollyMotionSpeedSetting, speed); } bool CameraOrbitYawRotationInverted() { - return GetRegistry(CameraOrbitYawRotationInvertedSetting, false); + return AzToolsFramework::GetRegistry(CameraOrbitYawRotationInvertedSetting, false); } void SetCameraOrbitYawRotationInverted(const bool inverted) { - SetRegistry(CameraOrbitYawRotationInvertedSetting, inverted); + AzToolsFramework::SetRegistry(CameraOrbitYawRotationInvertedSetting, inverted); } bool CameraPanInvertedX() { - return GetRegistry(CameraPanInvertedXSetting, true); + return AzToolsFramework::GetRegistry(CameraPanInvertedXSetting, true); } void SetCameraPanInvertedX(const bool inverted) { - SetRegistry(CameraPanInvertedXSetting, inverted); + AzToolsFramework::SetRegistry(CameraPanInvertedXSetting, inverted); } bool CameraPanInvertedY() { - return GetRegistry(CameraPanInvertedYSetting, true); + return AzToolsFramework::GetRegistry(CameraPanInvertedYSetting, true); } void SetCameraPanInvertedY(const bool inverted) { - SetRegistry(CameraPanInvertedYSetting, inverted); + AzToolsFramework::SetRegistry(CameraPanInvertedYSetting, inverted); } float CameraPanSpeed() { - return aznumeric_cast(GetRegistry(CameraPanSpeedSetting, 0.01)); + return aznumeric_cast(AzToolsFramework::GetRegistry(CameraPanSpeedSetting, 0.01)); } void SetCameraPanSpeed(float speed) { - SetRegistry(CameraPanSpeedSetting, speed); + AzToolsFramework::SetRegistry(CameraPanSpeedSetting, speed); } float CameraRotateSmoothness() { - return aznumeric_cast(GetRegistry(CameraRotateSmoothnessSetting, 5.0)); + return aznumeric_cast(AzToolsFramework::GetRegistry(CameraRotateSmoothnessSetting, 5.0)); } void SetCameraRotateSmoothness(const float smoothness) { - SetRegistry(CameraRotateSmoothnessSetting, smoothness); + AzToolsFramework::SetRegistry(CameraRotateSmoothnessSetting, smoothness); } float CameraTranslateSmoothness() { - return aznumeric_cast(GetRegistry(CameraTranslateSmoothnessSetting, 5.0)); + return aznumeric_cast(AzToolsFramework::GetRegistry(CameraTranslateSmoothnessSetting, 5.0)); } void SetCameraTranslateSmoothness(const float smoothness) { - SetRegistry(CameraTranslateSmoothnessSetting, smoothness); + AzToolsFramework::SetRegistry(CameraTranslateSmoothnessSetting, smoothness); } bool CameraRotateSmoothingEnabled() { - return GetRegistry(CameraRotateSmoothingSetting, true); + return AzToolsFramework::GetRegistry(CameraRotateSmoothingSetting, true); } void SetCameraRotateSmoothingEnabled(const bool enabled) { - SetRegistry(CameraRotateSmoothingSetting, enabled); + AzToolsFramework::SetRegistry(CameraRotateSmoothingSetting, enabled); } bool CameraTranslateSmoothingEnabled() { - return GetRegistry(CameraTranslateSmoothingSetting, true); + return AzToolsFramework::GetRegistry(CameraTranslateSmoothingSetting, true); } void SetCameraTranslateSmoothingEnabled(const bool enabled) { - SetRegistry(CameraTranslateSmoothingSetting, enabled); + AzToolsFramework::SetRegistry(CameraTranslateSmoothingSetting, enabled); } bool CameraCaptureCursorForLook() { - return GetRegistry(CameraCaptureCursorLookSetting, true); + return AzToolsFramework::GetRegistry(CameraCaptureCursorLookSetting, true); } void SetCameraCaptureCursorForLook(const bool capture) { - SetRegistry(CameraCaptureCursorLookSetting, capture); + AzToolsFramework::SetRegistry(CameraCaptureCursorLookSetting, capture); + } + + float CameraDefaultOrbitDistance() + { + return aznumeric_cast(AzToolsFramework::GetRegistry(CameraDefaultOrbitDistanceSetting, 20.0)); + } + + void SetCameraDefaultOrbitDistance(const float distance) + { + AzToolsFramework::SetRegistry(CameraDefaultOrbitDistanceSetting, distance); } AzFramework::InputChannelId CameraTranslateForwardChannelId() { return AzFramework::InputChannelId( - GetRegistry(CameraTranslateForwardIdSetting, AZStd::string("keyboard_key_alphanumeric_W")).c_str()); + AzToolsFramework::GetRegistry(CameraTranslateForwardIdSetting, AZStd::string("keyboard_key_alphanumeric_W")).c_str()); } void SetCameraTranslateForwardChannelId(AZStd::string_view cameraTranslateForwardId) { - SetRegistry(CameraTranslateForwardIdSetting, cameraTranslateForwardId); + AzToolsFramework::SetRegistry(CameraTranslateForwardIdSetting, cameraTranslateForwardId); } AzFramework::InputChannelId CameraTranslateBackwardChannelId() { return AzFramework::InputChannelId( - GetRegistry(CameraTranslateBackwardIdSetting, AZStd::string("keyboard_key_alphanumeric_S")).c_str()); + AzToolsFramework::GetRegistry(CameraTranslateBackwardIdSetting, AZStd::string("keyboard_key_alphanumeric_S")).c_str()); } void SetCameraTranslateBackwardChannelId(AZStd::string_view cameraTranslateBackwardId) { - SetRegistry(CameraTranslateBackwardIdSetting, cameraTranslateBackwardId); + AzToolsFramework::SetRegistry(CameraTranslateBackwardIdSetting, cameraTranslateBackwardId); } AzFramework::InputChannelId CameraTranslateLeftChannelId() { - return AzFramework::InputChannelId(GetRegistry(CameraTranslateLeftIdSetting, AZStd::string("keyboard_key_alphanumeric_A")).c_str()); + return AzFramework::InputChannelId( + AzToolsFramework::GetRegistry(CameraTranslateLeftIdSetting, AZStd::string("keyboard_key_alphanumeric_A")).c_str()); } void SetCameraTranslateLeftChannelId(AZStd::string_view cameraTranslateLeftId) { - SetRegistry(CameraTranslateLeftIdSetting, cameraTranslateLeftId); + AzToolsFramework::SetRegistry(CameraTranslateLeftIdSetting, cameraTranslateLeftId); } AzFramework::InputChannelId CameraTranslateRightChannelId() { return AzFramework::InputChannelId( - GetRegistry(CameraTranslateRightIdSetting, AZStd::string("keyboard_key_alphanumeric_D")).c_str()); + AzToolsFramework::GetRegistry(CameraTranslateRightIdSetting, AZStd::string("keyboard_key_alphanumeric_D")).c_str()); } void SetCameraTranslateRightChannelId(AZStd::string_view cameraTranslateRightId) { - SetRegistry(CameraTranslateRightIdSetting, cameraTranslateRightId); + AzToolsFramework::SetRegistry(CameraTranslateRightIdSetting, cameraTranslateRightId); } AzFramework::InputChannelId CameraTranslateUpChannelId() { - return AzFramework::InputChannelId(GetRegistry(CameraTranslateUpIdSetting, AZStd::string("keyboard_key_alphanumeric_E")).c_str()); + return AzFramework::InputChannelId( + AzToolsFramework::GetRegistry(CameraTranslateUpIdSetting, AZStd::string("keyboard_key_alphanumeric_E")).c_str()); } void SetCameraTranslateUpChannelId(AZStd::string_view cameraTranslateUpId) { - SetRegistry(CameraTranslateUpIdSetting, cameraTranslateUpId); + AzToolsFramework::SetRegistry(CameraTranslateUpIdSetting, cameraTranslateUpId); } AzFramework::InputChannelId CameraTranslateDownChannelId() { - return AzFramework::InputChannelId(GetRegistry(CameraTranslateDownIdSetting, AZStd::string("keyboard_key_alphanumeric_Q")).c_str()); + return AzFramework::InputChannelId( + AzToolsFramework::GetRegistry(CameraTranslateDownIdSetting, AZStd::string("keyboard_key_alphanumeric_Q")).c_str()); } void SetCameraTranslateDownChannelId(AZStd::string_view cameraTranslateDownId) { - SetRegistry(CameraTranslateDownIdSetting, cameraTranslateDownId); + AzToolsFramework::SetRegistry(CameraTranslateDownIdSetting, cameraTranslateDownId); } AzFramework::InputChannelId CameraTranslateBoostChannelId() { return AzFramework::InputChannelId( - GetRegistry(CameraTranslateBoostIdSetting, AZStd::string("keyboard_key_modifier_shift_l")).c_str()); + AzToolsFramework::GetRegistry(CameraTranslateBoostIdSetting, AZStd::string("keyboard_key_modifier_shift_l")).c_str()); } void SetCameraTranslateBoostChannelId(AZStd::string_view cameraTranslateBoostId) { - SetRegistry(CameraTranslateBoostIdSetting, cameraTranslateBoostId); + AzToolsFramework::SetRegistry(CameraTranslateBoostIdSetting, cameraTranslateBoostId); } AzFramework::InputChannelId CameraOrbitChannelId() { - return AzFramework::InputChannelId(GetRegistry(CameraOrbitIdSetting, AZStd::string("keyboard_key_modifier_alt_l")).c_str()); + return AzFramework::InputChannelId( + AzToolsFramework::GetRegistry(CameraOrbitIdSetting, AZStd::string("keyboard_key_modifier_alt_l")).c_str()); } void SetCameraOrbitChannelId(AZStd::string_view cameraOrbitId) { - SetRegistry(CameraOrbitIdSetting, cameraOrbitId); + AzToolsFramework::SetRegistry(CameraOrbitIdSetting, cameraOrbitId); } AzFramework::InputChannelId CameraFreeLookChannelId() { - return AzFramework::InputChannelId(GetRegistry(CameraFreeLookIdSetting, AZStd::string("mouse_button_right")).c_str()); + return AzFramework::InputChannelId( + AzToolsFramework::GetRegistry(CameraFreeLookIdSetting, AZStd::string("mouse_button_right")).c_str()); } void SetCameraFreeLookChannelId(AZStd::string_view cameraFreeLookId) { - SetRegistry(CameraFreeLookIdSetting, cameraFreeLookId); + AzToolsFramework::SetRegistry(CameraFreeLookIdSetting, cameraFreeLookId); } AzFramework::InputChannelId CameraFreePanChannelId() { - return AzFramework::InputChannelId(GetRegistry(CameraFreePanIdSetting, AZStd::string("mouse_button_middle")).c_str()); + return AzFramework::InputChannelId( + AzToolsFramework::GetRegistry(CameraFreePanIdSetting, AZStd::string("mouse_button_middle")).c_str()); } void SetCameraFreePanChannelId(AZStd::string_view cameraFreePanId) { - SetRegistry(CameraFreePanIdSetting, cameraFreePanId); + AzToolsFramework::SetRegistry(CameraFreePanIdSetting, cameraFreePanId); } AzFramework::InputChannelId CameraOrbitLookChannelId() { - return AzFramework::InputChannelId(GetRegistry(CameraOrbitLookIdSetting, AZStd::string("mouse_button_left")).c_str()); + return AzFramework::InputChannelId( + AzToolsFramework::GetRegistry(CameraOrbitLookIdSetting, AZStd::string("mouse_button_left")).c_str()); } void SetCameraOrbitLookChannelId(AZStd::string_view cameraOrbitLookId) { - SetRegistry(CameraOrbitLookIdSetting, cameraOrbitLookId); + AzToolsFramework::SetRegistry(CameraOrbitLookIdSetting, cameraOrbitLookId); } AzFramework::InputChannelId CameraOrbitDollyChannelId() { - return AzFramework::InputChannelId(GetRegistry(CameraOrbitDollyIdSetting, AZStd::string("mouse_button_right")).c_str()); + return AzFramework::InputChannelId( + AzToolsFramework::GetRegistry(CameraOrbitDollyIdSetting, AZStd::string("mouse_button_right")).c_str()); } void SetCameraOrbitDollyChannelId(AZStd::string_view cameraOrbitDollyId) { - SetRegistry(CameraOrbitDollyIdSetting, cameraOrbitDollyId); + AzToolsFramework::SetRegistry(CameraOrbitDollyIdSetting, cameraOrbitDollyId); } AzFramework::InputChannelId CameraOrbitPanChannelId() { - return AzFramework::InputChannelId(GetRegistry(CameraOrbitPanIdSetting, AZStd::string("mouse_button_middle")).c_str()); + return AzFramework::InputChannelId( + AzToolsFramework::GetRegistry(CameraOrbitPanIdSetting, AZStd::string("mouse_button_middle")).c_str()); } void SetCameraOrbitPanChannelId(AZStd::string_view cameraOrbitPanId) { - SetRegistry(CameraOrbitPanIdSetting, cameraOrbitPanId); + AzToolsFramework::SetRegistry(CameraOrbitPanIdSetting, cameraOrbitPanId); } AzFramework::InputChannelId CameraFocusChannelId() { - return AzFramework::InputChannelId(GetRegistry(CameraFocusIdSetting, AZStd::string("keyboard_key_alphanumeric_X")).c_str()); + return AzFramework::InputChannelId( + AzToolsFramework::GetRegistry(CameraFocusIdSetting, AZStd::string("keyboard_key_alphanumeric_X")).c_str()); } void SetCameraFocusChannelId(AZStd::string_view cameraFocusId) { - SetRegistry(CameraFocusIdSetting, cameraFocusId); + AzToolsFramework::SetRegistry(CameraFocusIdSetting, cameraFocusId); } } // namespace SandboxEditor diff --git a/Code/Editor/EditorViewportSettings.h b/Code/Editor/EditorViewportSettings.h index 9c3f0a46e5..fe1253ed0c 100644 --- a/Code/Editor/EditorViewportSettings.h +++ b/Code/Editor/EditorViewportSettings.h @@ -33,9 +33,6 @@ namespace SandboxEditor //! event will fire when a value in the settings registry (editorpreferences.setreg) is modified. SANDBOX_API AZStd::unique_ptr CreateEditorViewportSettingsCallbacks(); - SANDBOX_API AZ::Vector3 DefaultEditorCameraPosition(); - SANDBOX_API void SetDefaultCameraEditorPosition(AZ::Vector3 defaultCameraPosition); - SANDBOX_API AZ::u64 MaxItemsShownInAssetBrowserSearch(); SANDBOX_API void SetMaxItemsShownInAssetBrowserSearch(AZ::u64 numberOfItemsShown); @@ -105,6 +102,12 @@ namespace SandboxEditor SANDBOX_API bool CameraCaptureCursorForLook(); SANDBOX_API void SetCameraCaptureCursorForLook(bool capture); + SANDBOX_API AZ::Vector3 CameraDefaultEditorPosition(); + SANDBOX_API void SetCameraDefaultEditorPosition(const AZ::Vector3& position); + + SANDBOX_API float CameraDefaultOrbitDistance(); + SANDBOX_API void SetCameraDefaultOrbitDistance(float distance); + SANDBOX_API AzFramework::InputChannelId CameraTranslateForwardChannelId(); SANDBOX_API void SetCameraTranslateForwardChannelId(AZStd::string_view cameraTranslateForwardId); diff --git a/Code/Editor/EditorViewportWidget.cpp b/Code/Editor/EditorViewportWidget.cpp index c7814cc842..828812fb7e 100644 --- a/Code/Editor/EditorViewportWidget.cpp +++ b/Code/Editor/EditorViewportWidget.cpp @@ -43,16 +43,17 @@ // AzToolsFramework #include +#include +#include #include +#include #include #include -#include // AtomToolsFramework #include // CryCommon -#include #include // AzFramework @@ -97,9 +98,6 @@ #include -#include -#include - AZ_CVAR( bool, ed_visibility_logTiming, false, nullptr, AZ::ConsoleFunctorFlags::Null, "Output the timing of the new IVisibilitySystem query"); @@ -298,13 +296,9 @@ AzToolsFramework::ViewportInteraction::MousePick EditorViewportWidget::BuildMous { AzToolsFramework::ViewportInteraction::MousePick mousePick; mousePick.m_screenCoordinates = AzToolsFramework::ViewportInteraction::ScreenPointFromQPoint(point); - if (const auto& ray = m_renderViewport->ViewportScreenToWorldRay(mousePick.m_screenCoordinates); - ray.has_value()) - { - mousePick.m_rayOrigin = ray.value().origin; - mousePick.m_rayDirection = ray.value().direction; - } - + const auto[origin, direction] = m_renderViewport->ViewportScreenToWorldRay(mousePick.m_screenCoordinates); + mousePick.m_rayOrigin = origin; + mousePick.m_rayDirection = direction; return mousePick; } @@ -460,9 +454,6 @@ void EditorViewportWidget::Update() // Render { - // TODO: Move out this logic to a controller and refactor to work with Atom - ProcessRenderLisneters(m_displayContext); - m_displayContext.Flush2D(); // Post Render Callback @@ -479,7 +470,7 @@ void EditorViewportWidget::Update() { auto start = std::chrono::steady_clock::now(); - m_entityVisibilityQuery.UpdateVisibility(GetCameraState()); + m_entityVisibilityQuery.UpdateVisibility(m_renderViewport->GetCameraState()); if (ed_visibility_logTiming) { @@ -555,22 +546,6 @@ void EditorViewportWidget::OnEditorNotifyEvent(EEditorNotifyEvent event) // this should only occur for the main viewport and no others. ShowCursor(); - // If the user has selected game mode, enable outputting to any attached HMD and properly size the context - // to the resolution specified by the VR device. - if (gSettings.bEnableGameModeVR) - { - const AZ::VR::HMDDeviceInfo* deviceInfo = nullptr; - EBUS_EVENT_RESULT(deviceInfo, AZ::VR::HMDDeviceRequestBus, GetDeviceInfo); - AZ_Warning("Render Viewport", deviceInfo, "No VR device detected"); - - if (deviceInfo) - { - // Note: This may also need to adjust the viewport size - SetActiveWindow(); - SetFocus(); - SetSelected(true); - } - } SetCurrentCursor(STD_CURSOR_GAME); if (ShouldPreviewFullscreen()) @@ -619,9 +594,9 @@ void EditorViewportWidget::OnEditorNotifyEvent(EEditorNotifyEvent event) break; case eNotify_OnEndNewScene: - PopDisableRendering(); - { + PopDisableRendering(); + Matrix34 viewTM; viewTM.SetIdentity(); @@ -637,9 +612,9 @@ void EditorViewportWidget::OnEditorNotifyEvent(EEditorNotifyEvent event) break; case eNotify_OnEndTerrainCreate: - PopDisableRendering(); - { + PopDisableRendering(); + Matrix34 viewTM; viewTM.SetIdentity(); @@ -688,13 +663,7 @@ void EditorViewportWidget::OnBeginPrepareRender() RenderAll(); // Draw 2D helpers. -#ifdef LYSHINE_ATOM_TODO - TransformationMatrices backupSceneMatrices; -#endif m_debugDisplay->DepthTestOff(); -#ifdef LYSHINE_ATOM_TODO - m_renderer->Set2DMode(m_rcClient.right(), m_rcClient.bottom(), backupSceneMatrices); -#endif auto prevState = m_debugDisplay->GetState(); m_debugDisplay->SetState(e_Mode3D | e_AlphaBlended | e_FillModeSolid | e_CullModeBack | e_DepthWriteOn | e_DepthTestOn); @@ -737,7 +706,7 @@ void EditorViewportWidget::RenderAll() m_debugDisplay->DepthTestOff(); m_manipulatorManager->DrawManipulators( - *m_debugDisplay, GetCameraState(), + *m_debugDisplay, m_renderViewport->GetCameraState(), BuildMouseInteractionInternal( AztfVi::MouseButtons(AztfVi::TranslateMouseButtons(QGuiApplication::mouseButtons())), keyboardModifiers, BuildMousePick(WidgetToViewport(mapFromGlobal(QCursor::pos()))))); @@ -901,48 +870,11 @@ void EditorViewportWidget::OnMenuSelectCurrentCamera() } } -AzFramework::CameraState EditorViewportWidget::GetCameraState() -{ - return m_renderViewport->GetCameraState(); -} - -AZ::Vector3 EditorViewportWidget::PickTerrain(const AzFramework::ScreenPoint& point) -{ - return LYVec3ToAZVec3(ViewToWorld(AzToolsFramework::ViewportInteraction::QPointFromScreenPoint(point), nullptr, true)); -} - -AZ::EntityId EditorViewportWidget::PickEntity(const AzFramework::ScreenPoint& point) -{ - AZ::EntityId entityId; - HitContext hitInfo; - hitInfo.view = this; - if (HitTest(AzToolsFramework::ViewportInteraction::QPointFromScreenPoint(point), hitInfo)) - { - if (hitInfo.object && (hitInfo.object->GetType() == OBJTYPE_AZENTITY)) - { - auto entityObject = static_cast(hitInfo.object); - entityId = entityObject->GetAssociatedEntityId(); - } - } - - return entityId; -} - -float EditorViewportWidget::TerrainHeight(const AZ::Vector2& position) -{ - return GetIEditor()->GetTerrainElevation(position.GetX(), position.GetY()); -} - void EditorViewportWidget::FindVisibleEntities(AZStd::vector& visibleEntitiesOut) { visibleEntitiesOut.assign(m_entityVisibilityQuery.Begin(), m_entityVisibilityQuery.End()); } -AzFramework::ScreenPoint EditorViewportWidget::ViewportWorldToScreen(const AZ::Vector3& worldPosition) -{ - return m_renderViewport->ViewportWorldToScreen(worldPosition); -} - QWidget* EditorViewportWidget::GetWidgetForViewportContextMenu() { return this; @@ -1032,6 +964,7 @@ void EditorViewportWidget::ConnectViewportInteractionRequestBus() AzToolsFramework::ViewportInteraction::MainEditorViewportInteractionRequestBus::Handler::BusConnect(GetViewportId()); AzToolsFramework::ViewportInteraction::EditorEntityViewportInteractionRequestBus::Handler::BusConnect(GetViewportId()); m_viewportUi.ConnectViewportUiBus(GetViewportId()); + AzFramework::ViewportBorderRequestBus::Handler::BusConnect(GetViewportId()); AzFramework::InputSystemCursorConstraintRequestBus::Handler::BusConnect(); } @@ -1040,6 +973,7 @@ void EditorViewportWidget::DisconnectViewportInteractionRequestBus() { AzFramework::InputSystemCursorConstraintRequestBus::Handler::BusDisconnect(); + AzFramework::ViewportBorderRequestBus::Handler::BusDisconnect(); m_viewportUi.DisconnectViewportUiBus(); AzToolsFramework::ViewportInteraction::EditorEntityViewportInteractionRequestBus::Handler::BusDisconnect(); AzToolsFramework::ViewportInteraction::MainEditorViewportInteractionRequestBus::Handler::BusDisconnect(); @@ -1124,7 +1058,9 @@ void EditorViewportWidget::OnTitleMenu(QMenu* menu) action = menu->addAction(tr("Create camera entity from current view")); connect(action, &QAction::triggered, this, &EditorViewportWidget::OnMenuCreateCameraEntityFromCurrentView); - if (!gameEngine || !gameEngine->IsLevelLoaded()) + const auto prefabEditorEntityOwnershipInterface = AZ::Interface::Get(); + if (!gameEngine || !gameEngine->IsLevelLoaded() || + (prefabEditorEntityOwnershipInterface && !prefabEditorEntityOwnershipInterface->IsRootPrefabAssigned())) { action->setEnabled(false); action->setToolTip(tr(AZ::ViewportHelpers::TextCantCreateCameraNoLevel)); @@ -1648,16 +1584,15 @@ void EditorViewportWidget::RenderSelectedRegion() Vec3 EditorViewportWidget::WorldToView3D(const Vec3& wp, [[maybe_unused]] int nFlags) const { Vec3 out(0, 0, 0); - float x, y, z; + float x, y; - ProjectToScreen(wp.x, wp.y, wp.z, &x, &y, &z); - if (_finite(x) && _finite(y) && _finite(z)) + ProjectToScreen(wp.x, wp.y, wp.z, &x, &y); + if (_finite(x) && _finite(y)) { out.x = (x / 100) * m_rcClient.width(); out.y = (y / 100) * m_rcClient.height(); out.x /= static_cast(QHighDpiScaling::factor(windowHandle()->screen())); out.y /= static_cast(QHighDpiScaling::factor(windowHandle()->screen())); - out.z = z; } return out; } @@ -1667,24 +1602,6 @@ QPoint EditorViewportWidget::WorldToView(const Vec3& wp) const { return AzToolsFramework::ViewportInteraction::QPointFromScreenPoint(m_renderViewport->ViewportWorldToScreen(LYVec3ToAZVec3(wp))); } -////////////////////////////////////////////////////////////////////////// -QPoint EditorViewportWidget::WorldToViewParticleEditor(const Vec3& wp, int width, int height) const -{ - QPoint p; - float x, y, z; - - ProjectToScreen(wp.x, wp.y, wp.z, &x, &y, &z); - if (_finite(x) || _finite(y)) - { - p.rx() = static_cast((x / 100) * width); - p.ry() = static_cast((y / 100) * height); - } - else - { - QPoint(0, 0); - } - return p; -} ////////////////////////////////////////////////////////////////////////// Vec3 EditorViewportWidget::ViewToWorld( @@ -1700,20 +1617,16 @@ Vec3 EditorViewportWidget::ViewToWorld( AZ_UNUSED(collideWithObject); auto ray = m_renderViewport->ViewportScreenToWorldRay(AzToolsFramework::ViewportInteraction::ScreenPointFromQPoint(vp)); - if (!ray.has_value()) - { - return Vec3(0, 0, 0); - } const float maxDistance = 10000.f; - Vec3 v = AZVec3ToLYVec3(ray.value().direction) * maxDistance; + Vec3 v = AZVec3ToLYVec3(ray.m_direction) * maxDistance; if (!_finite(v.x) || !_finite(v.y) || !_finite(v.z)) { return Vec3(0, 0, 0); } - Vec3 colp = AZVec3ToLYVec3(ray.value().origin) + 0.002f * v; + Vec3 colp = AZVec3ToLYVec3(ray.m_origin) + 0.002f * v; return colp; } @@ -1752,21 +1665,19 @@ bool EditorViewportWidget::RayRenderMeshIntersection(IRenderMesh* pRenderMesh, c return bRes;*/ } -void EditorViewportWidget::UnProjectFromScreen(float sx, float sy, float sz, float* px, float* py, float* pz) const +void EditorViewportWidget::UnProjectFromScreen(float sx, float sy, float* px, float* py, float* pz) const { - AZ::Vector3 wp; - wp = m_renderViewport->ViewportScreenToWorld(AzFramework::ScreenPoint{(int)sx, m_rcClient.bottom() - ((int)sy)}, sz).value_or(wp); + const AZ::Vector3 wp = m_renderViewport->ViewportScreenToWorld(AzFramework::ScreenPoint{(int)sx, m_rcClient.bottom() - ((int)sy)}); *px = wp.GetX(); *py = wp.GetY(); *pz = wp.GetZ(); } -void EditorViewportWidget::ProjectToScreen(float ptx, float pty, float ptz, float* sx, float* sy, float* sz) const +void EditorViewportWidget::ProjectToScreen(float ptx, float pty, float ptz, float* sx, float* sy) const { AzFramework::ScreenPoint screenPosition = m_renderViewport->ViewportWorldToScreen(AZ::Vector3{ptx, pty, ptz}); *sx = static_cast(screenPosition.m_x); *sy = static_cast(screenPosition.m_y); - *sz = 0.f; } ////////////////////////////////////////////////////////////////////////// @@ -1776,32 +1687,22 @@ void EditorViewportWidget::ViewToWorldRay(const QPoint& vp, Vec3& raySrc, Vec3& Vec3 pos0, pos1; float wx, wy, wz; - UnProjectFromScreen(static_cast(vp.x()), static_cast(rc.bottom() - vp.y()), 0.0f, &wx, &wy, &wz); - if (!_finite(wx) || !_finite(wy) || !_finite(wz)) - { - return; - } - if (fabs(wx) > 1000000 || fabs(wy) > 1000000 || fabs(wz) > 1000000) - { - return; - } - pos0(wx, wy, wz); - UnProjectFromScreen(static_cast(vp.x()), static_cast(rc.bottom() - vp.y()), 1.0f, &wx, &wy, &wz); - if (!_finite(wx) || !_finite(wy) || !_finite(wz)) - { - return; - } - if (fabs(wx) > 1000000 || fabs(wy) > 1000000 || fabs(wz) > 1000000) - { - return; - } - pos1(wx, wy, wz); + UnProjectFromScreen(static_cast(vp.x()), static_cast(rc.bottom() - vp.y()), &wx, &wy, &wz); - Vec3 v = (pos1 - pos0); - v = v.GetNormalized(); + if (!_finite(wx) || !_finite(wy) || !_finite(wz)) + { + return; + } + + if (fabs(wx) > 1000000 || fabs(wy) > 1000000 || fabs(wz) > 1000000) + { + return; + } + + pos0(wx, wy, wz); raySrc = pos0; - rayDir = v; + rayDir = (pos0 - AZVec3ToLYVec3(m_renderViewport->GetCameraState().m_position)).GetNormalized(); } ////////////////////////////////////////////////////////////////////////// @@ -1810,13 +1711,6 @@ float EditorViewportWidget::GetScreenScaleFactor([[maybe_unused]] const Vec3& wo AZ_Error("CryLegacy", false, "EditorViewportWidget::GetScreenScaleFactor not implemented"); return 1.f; } -////////////////////////////////////////////////////////////////////////// -float EditorViewportWidget::GetScreenScaleFactor(const CCamera& camera, const Vec3& object_position) -{ - Vec3 camPos = camera.GetPosition(); - float dist = camPos.GetDistance(object_position); - return dist; -} ////////////////////////////////////////////////////////////////////////// bool EditorViewportWidget::CheckRespondToInput() const @@ -1837,7 +1731,6 @@ bool EditorViewportWidget::CheckRespondToInput() const ////////////////////////////////////////////////////////////////////////// bool EditorViewportWidget::HitTest(const QPoint& point, HitContext& hitInfo) { - hitInfo.camera = nullptr; hitInfo.pExcludedObject = GetCameraObject(); return QtViewport::HitTest(point, hitInfo); } @@ -2016,10 +1909,6 @@ void EditorViewportWidget::SetDefaultCamera() GetViewManager()->SetCameraObjectId(GUID_NULL); SetName(m_defaultViewName); - // Set the default Editor Camera position. - m_defaultViewTM.SetTranslation(Vec3(m_editorViewportSettings.DefaultEditorCameraPosition())); - SetViewTM(m_defaultViewTM); - // Synchronize the configured editor viewport FOV to the default camera if (m_viewPane) { @@ -2036,6 +1925,10 @@ void EditorViewportWidget::SetDefaultCamera() atomViewportRequests->PushView(contextName, m_defaultView); } + // Set the default Editor Camera position. + m_defaultViewTM.SetTranslation(Vec3(m_editorViewportSettings.DefaultEditorCameraPosition())); + SetViewTM(m_defaultViewTM); + PostCameraSet(); } @@ -2211,7 +2104,7 @@ bool EditorViewportWidget::GetActiveCameraState(AzFramework::CameraState& camera { if (m_pPrimaryViewport == this) { - cameraState = GetCameraState(); + cameraState = m_renderViewport->GetCameraState(); return true; } @@ -2358,10 +2251,10 @@ void* EditorViewportWidget::GetSystemCursorConstraintWindow() const return systemCursorConstrained ? renderOverlayHWND() : nullptr; } -void EditorViewportWidget::BuildDragDropContext(AzQtComponents::ViewportDragContext& context, const QPoint& pt) +void EditorViewportWidget::BuildDragDropContext( + AzQtComponents::ViewportDragContext& context, const AzFramework::ViewportId viewportId, const QPoint& point) { - const auto scaledPoint = WidgetToViewport(pt); - QtViewport::BuildDragDropContext(context, scaledPoint); + QtViewport::BuildDragDropContext(context, viewportId, point); } void EditorViewportWidget::RestoreViewportAfterGameMode() @@ -2522,7 +2415,17 @@ bool EditorViewportSettings::StickySelectEnabled() const AZ::Vector3 EditorViewportSettings::DefaultEditorCameraPosition() const { - return SandboxEditor::DefaultEditorCameraPosition(); + return SandboxEditor::CameraDefaultEditorPosition(); +} + +bool EditorViewportSettings::IconsVisible() const +{ + return AzToolsFramework::IconsVisible(); +} + +bool EditorViewportSettings::HelpersVisible() const +{ + return AzToolsFramework::HelpersVisible(); } AZ_CVAR_EXTERNED(bool, ed_previewGameInFullscreen_once); @@ -2542,12 +2445,6 @@ bool EditorViewportWidget::ShouldPreviewFullscreen() const return false; } - // Not supported in VR - if (gSettings.bEnableGameModeVR) - { - return false; - } - // If level not loaded, don't preview in fullscreen (preview shouldn't work at all without a level, but it does) if (auto ge = GetIEditor()->GetGameEngine()) { @@ -2636,4 +2533,25 @@ void EditorViewportWidget::StopFullscreenPreview() // Show the main window MainWindow::instance()->show(); } + +AZStd::optional EditorViewportWidget::GetViewportBorderPadding() const +{ + if (auto viewportEditorModeTracker = AZ::Interface::Get()) + { + auto viewportEditorModes = viewportEditorModeTracker->GetViewportEditorModes({ AzToolsFramework::GetEntityContextId() }); + if (viewportEditorModes->IsModeActive(AzToolsFramework::ViewportEditorMode::Focus) || + viewportEditorModes->IsModeActive(AzToolsFramework::ViewportEditorMode::Component)) + { + AzFramework::ViewportBorderPadding viewportBorderPadding = {}; + viewportBorderPadding.m_top = AzToolsFramework::ViewportUi::ViewportUiTopBorderSize; + viewportBorderPadding.m_left = AzToolsFramework::ViewportUi::ViewportUiLeftRightBottomBorderSize; + viewportBorderPadding.m_right = AzToolsFramework::ViewportUi::ViewportUiLeftRightBottomBorderSize; + viewportBorderPadding.m_bottom = AzToolsFramework::ViewportUi::ViewportUiLeftRightBottomBorderSize; + return viewportBorderPadding; + } + } + + return AZStd::nullopt; +} + #include diff --git a/Code/Editor/EditorViewportWidget.h b/Code/Editor/EditorViewportWidget.h index 68ea48c7f5..83ca655326 100644 --- a/Code/Editor/EditorViewportWidget.h +++ b/Code/Editor/EditorViewportWidget.h @@ -10,7 +10,6 @@ #pragma once #if !defined(Q_MOC_RUN) -#include #include @@ -38,6 +37,7 @@ #include #include +#include // forward declarations. class CBaseObject; @@ -79,6 +79,8 @@ struct EditorViewportSettings : public AzToolsFramework::ViewportInteraction::Vi float ManipulatorCircleBoundWidth() const override; bool StickySelectEnabled() const override; AZ::Vector3 DefaultEditorCameraPosition() const override; + bool IconsVisible() const override; + bool HelpersVisible() const override; }; // EditorViewportWidget window @@ -86,6 +88,7 @@ AZ_PUSH_DISABLE_DLL_EXPORT_BASECLASS_WARNING AZ_PUSH_DISABLE_DLL_EXPORT_MEMBER_WARNING class SANDBOX_API EditorViewportWidget final : public QtViewport + , public AzFramework::ViewportBorderRequestBus::Handler , private IEditorNotifyListener , private IUndoManagerListener , private Camera::EditorCameraRequestBus::Handler @@ -120,6 +123,9 @@ public: void SetFOV(float fov) override; float GetFOV() const override; + // AzFramework::ViewportBorderRequestBus overrides ... + AZStd::optional GetViewportBorderPadding() const override; + private: //////////////////////////////////////////////////////////////////////// // Private types ... @@ -161,13 +167,11 @@ private: Qt::MouseButtons buttons, Qt::KeyboardModifiers modifiers, const QPoint& point) override; void SetViewportId(int id) override; QPoint WorldToView(const Vec3& wp) const override; - QPoint WorldToViewParticleEditor(const Vec3& wp, int width, int height) const override; Vec3 WorldToView3D(const Vec3& wp, int nFlags = 0) const override; Vec3 ViewToWorld(const QPoint& vp, bool* collideWithTerrain = nullptr, bool onlyTerrain = false, bool bSkipVegetation = false, bool bTestRenderMesh = false, bool* collideWithObject = nullptr) const override; void ViewToWorldRay(const QPoint& vp, Vec3& raySrc, Vec3& rayDir) const override; Vec3 ViewToWorldNormal(const QPoint& vp, bool onlyTerrain, bool bTestRenderMesh = false) override; float GetScreenScaleFactor(const Vec3& worldPoint) const override; - float GetScreenScaleFactor(const CCamera& camera, const Vec3& object_position) override; float GetAspectRatio() const override; bool HitTest(const QPoint& point, HitContext& hitInfo) override; bool IsBoundsVisible(const AABB& box) const override; @@ -203,9 +207,6 @@ private: void* GetSystemCursorConstraintWindow() const override; // AzToolsFramework::MainEditorViewportInteractionRequestBus overrides ... - AZ::EntityId PickEntity(const AzFramework::ScreenPoint& point) override; - AZ::Vector3 PickTerrain(const AzFramework::ScreenPoint& point) override; - float TerrainHeight(const AZ::Vector2& position) override; bool ShowingWorldSpace() override; QWidget* GetWidgetForViewportContextMenu() override; @@ -270,7 +271,8 @@ private: bool CheckRespondToInput() const; - void BuildDragDropContext(AzQtComponents::ViewportDragContext& context, const QPoint& pt) override; + void BuildDragDropContext( + AzQtComponents::ViewportDragContext& context, AzFramework::ViewportId viewportId, const QPoint& point) override; void SetAsActiveViewport(); void PushDisableRendering(); @@ -291,9 +293,6 @@ private: // This switches the active camera to the next one in the list of (default, all custom cams). void CycleCamera(); - AzFramework::CameraState GetCameraState(); - AzFramework::ScreenPoint ViewportWorldToScreen(const AZ::Vector3& worldPosition); - QPoint WidgetToViewport(const QPoint& point) const; QPoint ViewportToWidget(const QPoint& point) const; QSize WidgetToViewport(const QSize& size) const; @@ -301,8 +300,8 @@ private: const DisplayContext& GetDisplayContext() const { return m_displayContext; } CBaseObject* GetCameraObject() const; - void UnProjectFromScreen(float sx, float sy, float sz, float* px, float* py, float* pz) const; - void ProjectToScreen(float ptx, float pty, float ptz, float* sx, float* sy, float* sz) const; + void UnProjectFromScreen(float sx, float sy, float* px, float* py, float* pz) const; + void ProjectToScreen(float ptx, float pty, float ptz, float* sx, float* sy) const; AZ::RPI::ViewPtr GetCurrentAtomView() const; diff --git a/Code/Editor/ErrorRecorder.cpp b/Code/Editor/ErrorRecorder.cpp index 999dab323c..253e103527 100644 --- a/Code/Editor/ErrorRecorder.cpp +++ b/Code/Editor/ErrorRecorder.cpp @@ -7,7 +7,6 @@ */ #include "EditorDefs.h" #include "ErrorRecorder.h" -#include "BaseLibraryItem.h" #include "Include/IErrorReport.h" diff --git a/Code/Editor/ErrorRecorder.h b/Code/Editor/ErrorRecorder.h index e4b3706a16..beacc3f0e5 100644 --- a/Code/Editor/ErrorRecorder.h +++ b/Code/Editor/ErrorRecorder.h @@ -14,6 +14,8 @@ #define CRYINCLUDE_EDITOR_CORE_ERRORRECORDER_H #pragma once +#include "Include/EditorCoreAPI.h" + ////////////////////////////////////////////////////////////////////////// //! Automatic class to record and display error. class EDITOR_CORE_API CErrorsRecorder diff --git a/Code/Editor/ErrorReport.cpp b/Code/Editor/ErrorReport.cpp index 4fd7d41a96..f93ea7606d 100644 --- a/Code/Editor/ErrorReport.cpp +++ b/Code/Editor/ErrorReport.cpp @@ -67,24 +67,6 @@ QString CErrorRecord::GetErrorText() const { str += QString("\t "); } - if (pItem) - { - switch (pItem->GetType()) - { - case EDB_TYPE_MATERIAL: - str += QString("\t Material=\""); - break; - case EDB_TYPE_PARTICLE: - str += QString("\t Particle=\""); - break; - case EDB_TYPE_MUSIC: - str += QString("\t Music=\""); - break; - default: - str += QString("\t Item=\""); - } - str += pItem->GetFullName() + "\""; - } if (pObject) { str += QString("\t Object=\"") + pObject->GetName() + "\""; @@ -101,7 +83,6 @@ CErrorReport::CErrorReport() m_bImmediateMode = true; m_bShowErrors = true; m_pObject = nullptr; - m_pItem = nullptr; m_pParticle = nullptr; } @@ -140,10 +121,6 @@ void CErrorReport::ReportError(CErrorRecord& err) { err.pObject = m_pObject; } - else if (err.pItem == nullptr && m_pItem != nullptr) - { - err.pItem = m_pItem; - } m_errors.push_back(err); } bNoRecurse = false; @@ -255,12 +232,6 @@ void CErrorReport::SetCurrentValidatorObject(CBaseObject* pObject) m_pObject = pObject; } -////////////////////////////////////////////////////////////////////////// -void CErrorReport::SetCurrentValidatorItem(CBaseLibraryItem* pItem) -{ - m_pItem = pItem; -} - ////////////////////////////////////////////////////////////////////////// void CErrorReport::SetCurrentFile(const QString& file) { diff --git a/Code/Editor/ErrorReport.h b/Code/Editor/ErrorReport.h index 3b9a860301..98d230e383 100644 --- a/Code/Editor/ErrorReport.h +++ b/Code/Editor/ErrorReport.h @@ -17,8 +17,11 @@ // forward declarations. class CParticleItem; -#include "BaseLibraryItem.h" +#include +#include + #include "Objects/BaseObject.h" +#include "Include/EditorCoreAPI.h" #include "Include/IErrorReport.h" #include "ErrorRecorder.h" @@ -56,16 +59,13 @@ public: int count; //! Object that caused this error. _smart_ptr pObject; - //! Library Item that caused this error. - _smart_ptr pItem; int flags; CErrorRecord(CBaseObject* object, ESeverity _severity, const QString& _error, int _flags = 0, int _count = 0, - CBaseLibraryItem* item = 0, EValidatorModule _module = VALIDATOR_MODULE_EDITOR) + EValidatorModule _module = VALIDATOR_MODULE_EDITOR) : severity(_severity) , module(_module) , pObject(object) - , pItem(item) , flags(_flags) , count(_count) , error(_error) @@ -77,7 +77,6 @@ public: severity = ESEVERITY_WARNING; module = VALIDATOR_MODULE_EDITOR; pObject = 0; - pItem = 0; flags = 0; count = 0; } @@ -116,8 +115,6 @@ public: //! Assign current Object to which new reported warnings are assigned. void SetCurrentValidatorObject(CBaseObject* pObject); - //! Assign current Item to which new reported warnings are assigned. - void SetCurrentValidatorItem(CBaseLibraryItem* pItem); //! Assign current filename. void SetCurrentFile(const QString& file); @@ -127,7 +124,6 @@ private: bool m_bImmediateMode; bool m_bShowErrors; _smart_ptr m_pObject; - _smart_ptr m_pItem; CParticleItem* m_pParticle; QString m_currentFilename; }; diff --git a/Code/Editor/ErrorReportDialog.cpp b/Code/Editor/ErrorReportDialog.cpp index 2d551d6c8b..bbeede79ef 100644 --- a/Code/Editor/ErrorReportDialog.cpp +++ b/Code/Editor/ErrorReportDialog.cpp @@ -362,10 +362,6 @@ void CErrorReportDialog::CopyToClipboard() { str += QString::fromLatin1(" [Object: %1]").arg(pRecord->pObject->GetName()); } - if (pRecord->pItem) - { - str += QString::fromLatin1(" [Material: %1]").arg(pRecord->pItem->GetName()); - } str += QString::fromLatin1("\r\n"); } } diff --git a/Code/Editor/ErrorReportTableModel.cpp b/Code/Editor/ErrorReportTableModel.cpp index f5dce1a86d..923991bb62 100644 --- a/Code/Editor/ErrorReportTableModel.cpp +++ b/Code/Editor/ErrorReportTableModel.cpp @@ -149,11 +149,7 @@ QVariant CErrorReportTableModel::data(const CErrorRecord& record, int column, in case ColumnFile: return record.file; case ColumnObject: - if (record.pItem) - { - return record.pItem->GetFullName(); - } - else if (record.pObject) + if (record.pObject) { return record.pObject->GetName(); } diff --git a/Code/Editor/Export/ExportManager.cpp b/Code/Editor/Export/ExportManager.cpp index 5527aa6ce6..b27b7e0387 100644 --- a/Code/Editor/Export/ExportManager.cpp +++ b/Code/Editor/Export/ExportManager.cpp @@ -35,20 +35,8 @@ #include "Resource.h" #include "Plugins/ComponentEntityEditorPlugin/Objects/ComponentEntityObject.h" -#include -#include - namespace { - inline Export::Vector3D Vec3ToVector3D(const Vec3& vec) - { - Export::Vector3D ret; - ret.x = vec.x; - ret.y = vec.y; - ret.z = vec.z; - return ret; - } - const float kTangentDelta = 0.01f; const float kAspectRatio = 1.777778f; const int kReserveCount = 7; // x,y,z,rot_x,rot_y,rot_z,fov @@ -106,22 +94,22 @@ void Export::CData::Clear() // CExportManager CExportManager::CExportManager() : m_isPrecaching(false) - , m_pBaseObj(nullptr) - , m_FBXBakedExportFPS(0.0f) , m_fScale(100.0f) + , m_bAnimationExport(false) + , m_pBaseObj(nullptr) , // this scale is used by CryEngine RC - m_bAnimationExport(false) + m_FBXBakedExportFPS(0.0f) , m_bExportLocalCoords(false) + , m_bExportOnlyPrimaryCamera(false) , m_numberOfExportFrames(0) , m_pivotEntityObject(nullptr) , m_bBakedKeysSequenceExport(true) , m_animTimeExportPrimarySequenceCurrentTime(0.0f) , m_animKeyTimeExport(true) , m_soundKeyTimeExport(true) - , m_bExportOnlyPrimaryCamera(false) { - RegisterExporter(new COBJExporter()); - RegisterExporter(new COCMExporter()); + CExportManager::RegisterExporter(new COBJExporter()); + CExportManager::RegisterExporter(new COCMExporter()); } @@ -313,203 +301,6 @@ void CExportManager::AddEntityAnimationData(AZ::EntityId entityId) ProcessEntityAnimationTrack(entityId, pObj, AnimParamType::Rotation); } - -void CExportManager::AddMesh(Export::CObject* pObj, const IIndexedMesh* pIndMesh, Matrix34A* pTm) -{ - if (m_isPrecaching || !pObj) - { - return; - } - - pObj->m_MeshHash = reinterpret_cast(pIndMesh); - IIndexedMesh::SMeshDescription meshDesc; - pIndMesh->GetMeshDescription(meshDesc); - - // if we have subset of meshes we need to duplicate vertices, - // keep transformation of submesh, - // and store new offset for indices - int newOffsetIndex = pObj->GetVertexCount(); - - if (meshDesc.m_nVertCount) - { - pObj->m_vertices.reserve(meshDesc.m_nVertCount + newOffsetIndex); - pObj->m_normals.reserve(meshDesc.m_nVertCount + newOffsetIndex); - } - - for (int v = 0; v < meshDesc.m_nVertCount; ++v) - { - Vec3 n = meshDesc.m_pNorms[v].GetN(); - Vec3 tmp = (meshDesc.m_pVerts ? meshDesc.m_pVerts[v] : meshDesc.m_pVertsF16[v].ToVec3()); - if (pTm) - { - tmp = pTm->TransformPoint(tmp); - } - - pObj->m_vertices.push_back(Vec3ToVector3D(tmp * m_fScale)); - pObj->m_normals.push_back(Vec3ToVector3D(n)); - } - - if (meshDesc.m_nCoorCount) - { - pObj->m_texCoords.reserve(meshDesc.m_nCoorCount + newOffsetIndex); - } - - for (int v = 0; v < meshDesc.m_nCoorCount; ++v) - { - Vec2 uv = meshDesc.m_pTexCoord[v].GetUV(); - uv.y = 1.0f - uv.y; - pObj->m_texCoords.push_back({uv.x,uv.y}); - } - - if (pIndMesh->GetSubSetCount() && !(pIndMesh->GetSubSetCount() == 1 && pIndMesh->GetSubSet(0).nNumIndices == 0)) - { - for (int i = 0; i < pIndMesh->GetSubSetCount(); ++i) - { - Export::CMesh* pMesh = new Export::CMesh(); - - const SMeshSubset& sms = pIndMesh->GetSubSet(i); - const vtx_idx* pIndices = &meshDesc.m_pIndices[sms.nFirstIndexId]; - int nTris = sms.nNumIndices / 3; - pMesh->m_faces.reserve(nTris); - for (int f = 0; f < nTris; ++f) - { - Export::Face face; - face.idx[0] = *(pIndices++) + newOffsetIndex; - face.idx[1] = *(pIndices++) + newOffsetIndex; - face.idx[2] = *(pIndices++) + newOffsetIndex; - pMesh->m_faces.push_back(face); - } - - pObj->m_meshes.push_back(pMesh); - } - } - else - { - Export::CMesh* pMesh = new Export::CMesh(); - if (meshDesc.m_nFaceCount == 0 && meshDesc.m_nIndexCount != 0 && meshDesc.m_pIndices != nullptr) - { - const vtx_idx* pIndices = &meshDesc.m_pIndices[0]; - int nTris = meshDesc.m_nIndexCount / 3; - pMesh->m_faces.reserve(nTris); - for (int f = 0; f < nTris; ++f) - { - Export::Face face; - face.idx[0] = *(pIndices++) + newOffsetIndex; - face.idx[1] = *(pIndices++) + newOffsetIndex; - face.idx[2] = *(pIndices++) + newOffsetIndex; - pMesh->m_faces.push_back(face); - } - } - else - { - pMesh->m_faces.reserve(meshDesc.m_nFaceCount); - for (int f = 0; f < meshDesc.m_nFaceCount; ++f) - { - Export::Face face; - face.idx[0] = meshDesc.m_pFaces[f].v[0]; - face.idx[1] = meshDesc.m_pFaces[f].v[1]; - face.idx[2] = meshDesc.m_pFaces[f].v[2]; - pMesh->m_faces.push_back(face); - } - } - - pObj->m_meshes.push_back(pMesh); - } -} - - -bool CExportManager::AddStatObj(Export::CObject* pObj, IStatObj* pStatObj, Matrix34A* pTm) -{ - IIndexedMesh* pIndMesh = nullptr; - - if (pStatObj->GetSubObjectCount()) - { - for (int i = 0; i < pStatObj->GetSubObjectCount(); i++) - { - IStatObj::SSubObject* pSubObj = pStatObj->GetSubObject(i); - if (pSubObj && pSubObj->nType == STATIC_SUB_OBJECT_MESH && pSubObj->pStatObj) - { - pIndMesh = nullptr; - if (m_isOccluder) - { - if (pSubObj->pStatObj->GetLodObject(2)) - { - pIndMesh = pSubObj->pStatObj->GetLodObject(2)->GetIndexedMesh(true); - } - if (!pIndMesh && pSubObj->pStatObj->GetLodObject(1)) - { - pIndMesh = pSubObj->pStatObj->GetLodObject(1)->GetIndexedMesh(true); - } - } - if (!pIndMesh) - { - pIndMesh = pSubObj->pStatObj->GetIndexedMesh(true); - } - if (pIndMesh) - { - AddMesh(pObj, pIndMesh, pTm); - } - } - } - } - - if (!pIndMesh) - { - if (m_isOccluder) - { - if (pStatObj->GetLodObject(2)) - { - pIndMesh = pStatObj->GetLodObject(2)->GetIndexedMesh(true); - } - if (!pIndMesh && pStatObj->GetLodObject(1)) - { - pIndMesh = pStatObj->GetLodObject(1)->GetIndexedMesh(true); - } - } - if (!pIndMesh) - { - pIndMesh = pStatObj->GetIndexedMesh(true); - } - if (pIndMesh) - { - AddMesh(pObj, pIndMesh, pTm); - } - } - - return true; -} - -bool CExportManager::AddMeshes(Export::CObject* pObj) -{ - if (m_pBaseObj->GetType() == OBJTYPE_AZENTITY) - { - CEntityObject* pEntityObject = (CEntityObject*)m_pBaseObj; - IRenderNode* pEngineNode = pEntityObject->GetEngineNode(); - - if (pEngineNode) - { - if (!m_isPrecaching) - { - for (int i = 0; i < pEngineNode->GetSlotCount(); ++i) - { - Matrix34A tm; - IStatObj* pStatObj = pEngineNode->GetEntityStatObj(i, 0, &tm); - if (pStatObj) - { - Matrix34A objTM = m_pBaseObj->GetWorldTM(); - objTM.Invert(); - tm = objTM * tm; - AddStatObj(pObj, pStatObj, &tm); - } - } - } - } - } - - return true; -} - - bool CExportManager::AddObject(CBaseObject* pBaseObj) { if (m_isOccluder) @@ -531,7 +322,6 @@ bool CExportManager::AddObject(CBaseObject* pBaseObj) if (m_isPrecaching) { - AddMeshes(nullptr); return true; } @@ -542,7 +332,6 @@ bool CExportManager::AddObject(CBaseObject* pBaseObj) m_objectMap[pBaseObj] = int(m_data.m_objects.size() - 1); - AddMeshes(pObj); m_pBaseObj = nullptr; return true; @@ -1227,15 +1016,6 @@ bool CExportManager::ImportFromFile(const char* filename) return bRet; } -bool CExportManager::ExportSingleStatObj(IStatObj* pStatObj, const char* filename) -{ - Export::CObject* pObj = new Export::CObject(Path::GetFileName(filename).toUtf8().data()); - AddStatObj(pObj, pStatObj); - m_data.m_objects.push_back(pObj); - ExportToFile(filename, true); - return true; -} - void CExportManager::SaveNodeKeysTimeToXML() { CTrackViewSequence* pSequence = GetIEditor()->GetAnimation()->GetSequence(); diff --git a/Code/Editor/Export/ExportManager.h b/Code/Editor/Export/ExportManager.h index 14318be957..6908bcf0f7 100644 --- a/Code/Editor/Export/ExportManager.h +++ b/Code/Editor/Export/ExportManager.h @@ -139,18 +139,11 @@ public: bool ImportFromFile(const char* filename); const Export::CData& GetData() const {return m_data; }; - //! Exports the stat obj to the obj file specified - //! returns true if succeeded, otherwise false - bool ExportSingleStatObj(IStatObj* pStatObj, const char* filename) override; - void SetBakedKeysSequenceExport(bool bBaked){m_bBakedKeysSequenceExport = bBaked; }; void SaveNodeKeysTimeToXML(); private: - void AddMesh(Export::CObject* pObj, const IIndexedMesh* pIndMesh, Matrix34A* pTm = nullptr); - bool AddStatObj(Export::CObject* pObj, IStatObj* pStatObj, Matrix34A* pTm = nullptr); - bool AddMeshes(Export::CObject* pObj); bool AddObject(CBaseObject* pBaseObj); void SolveHierarchy(); diff --git a/Code/Editor/GameEngine.cpp b/Code/Editor/GameEngine.cpp index 5f3545e593..db4c587f54 100644 --- a/Code/Editor/GameEngine.cpp +++ b/Code/Editor/GameEngine.cpp @@ -35,7 +35,6 @@ // CryCommon #include -#include #include // Editor @@ -49,9 +48,6 @@ #include "Include/IObjectManager.h" #include "ActionManager.h" -// Including this too early will result in a linker error -#include - // Implementation of System Callback structure. struct SSystemUserCallback : public ISystemUserCallback @@ -160,20 +156,20 @@ struct SSystemUserCallback } } - int ShowMessage(const char* text, const char* caption, unsigned int uType) override + void ShowMessage(const char* text, const char* caption, unsigned int uType) override { if (CCryEditApp::instance()->IsInAutotestMode()) { - return IDOK; + return; } const UINT kMessageBoxButtonMask = 0x000f; if (!GetIEditor()->IsInGameMode() && (uType == 0 || uType == MB_OK || !(uType & kMessageBoxButtonMask))) { static_cast(GetIEditor())->AddErrorMessage(text, caption); - return IDOK; + return; } - return CryMessageBox(text, caption, uType); + CryMessageBox(text, caption, uType); } void OnSplashScreenDone() @@ -242,8 +238,7 @@ private: AZ_PUSH_DISABLE_WARNING(4273, "-Wunknown-warning-option") CGameEngine::CGameEngine() - : m_gameDll(nullptr) - , m_bIgnoreUpdates(false) + : m_bIgnoreUpdates(false) , m_ePendingGameMode(ePGM_NotPending) , m_modalWindowDismisser(nullptr) AZ_POP_DISABLE_WARNING @@ -253,7 +248,7 @@ AZ_POP_DISABLE_WARNING m_bInGameMode = false; m_bSimulationMode = false; m_bSyncPlayerPosition = true; - m_hSystemHandle = nullptr; + m_hSystemHandle.reset(nullptr); m_bJustCreated = false; m_levelName = "Untitled"; m_levelExtension = EditorUtils::LevelFile::GetDefaultFileExtension(); @@ -268,18 +263,10 @@ AZ_POP_DISABLE_WARNING GetIEditor()->UnregisterNotifyListener(this); m_pISystem->GetIMovieSystem()->SetCallback(nullptr); - if (m_gameDll) - { - CryFreeLibrary(m_gameDll); - } - delete m_pISystem; m_pISystem = nullptr; - if (m_hSystemHandle) - { - CryFreeLibrary(m_hSystemHandle); - } + m_hSystemHandle.reset(nullptr); delete m_pSystemUserCallback; } @@ -347,18 +334,19 @@ AZ::Outcome CGameEngine::Init( HWND hwndForInputSystem) { m_pSystemUserCallback = new SSystemUserCallback(logo); - m_hSystemHandle = CryLoadLibraryDefName("CrySystem"); - if (!m_hSystemHandle) + constexpr const char* crySystemLibraryName = AZ_TRAIT_OS_DYNAMIC_LIBRARY_PREFIX "CrySystem" AZ_TRAIT_OS_DYNAMIC_LIBRARY_EXTENSION; + + m_hSystemHandle = AZ::DynamicModuleHandle::Create(crySystemLibraryName); + if (!m_hSystemHandle->Load(true)) { - auto errorMessage = AZStd::string::format("%s Loading Failed", CryLibraryDefName("CrySystem")); + auto errorMessage = AZStd::string::format("%s Loading Failed", crySystemLibraryName); Error(errorMessage.c_str()); return AZ::Failure(errorMessage); } PFNCREATESYSTEMINTERFACE pfnCreateSystemInterface = - (PFNCREATESYSTEMINTERFACE)CryGetProcAddress(m_hSystemHandle, "CreateSystemInterface"); - + m_hSystemHandle->GetFunction("CreateSystemInterface"); SSystemInitParams sip; @@ -454,7 +442,7 @@ AZ::Outcome CGameEngine::Init( REGISTER_COMMAND("quit", CGameEngine::HandleQuitRequest, VF_RESTRICTEDMODE, "Quit/Shutdown the engine"); EBUS_EVENT(CrySystemEventBus, OnCryEditorInitialized); - + return AZ::Success(); } @@ -477,7 +465,7 @@ void CGameEngine::SetLevelPath(const QString& path) const char* oldExtension = EditorUtils::LevelFile::GetOldCryFileExtension(); const char* defaultExtension = EditorUtils::LevelFile::GetDefaultFileExtension(); - // Store off if + // Store off if if (QFileInfo(path + oldExtension).exists()) { m_levelExtension = oldExtension; @@ -606,13 +594,6 @@ void CGameEngine::SwitchToInEditor() // Enable accelerators. GetIEditor()->EnableAcceleratos(true); - - // reset UI system - if (gEnv->pLyShine) - { - gEnv->pLyShine->Reset(); - } - // [Anton] - order changed, see comments for CGameEngine::SetSimulationMode //! Send event to switch out of game. GetIEditor()->GetObjectManager()->SendEvent(EVENT_OUTOFGAME); @@ -833,7 +814,7 @@ void CGameEngine::Update() if (gEnv->pSystem) { gEnv->pSystem->UpdatePreTickBus(); - componentApplication->Tick(gEnv->pTimer->GetFrameTime(ITimer::ETIMER_GAME)); + componentApplication->Tick(); gEnv->pSystem->UpdatePostTickBus(); } @@ -849,7 +830,7 @@ void CGameEngine::Update() unsigned int updateFlags = ESYSUPDATE_EDITOR; GetIEditor()->GetAnimation()->Update(); GetIEditor()->GetSystem()->UpdatePreTickBus(updateFlags); - componentApplication->Tick(gEnv->pTimer->GetFrameTime(ITimer::ETIMER_GAME)); + componentApplication->Tick(); GetIEditor()->GetSystem()->UpdatePostTickBus(updateFlags); } } diff --git a/Code/Editor/GameEngine.h b/Code/Editor/GameEngine.h index 4d183cc38e..5a77fc2fb1 100644 --- a/Code/Editor/GameEngine.h +++ b/Code/Editor/GameEngine.h @@ -8,17 +8,11 @@ // Description : The game engine for editor - - -#ifndef CRYINCLUDE_EDITOR_GAMEENGINE_H -#define CRYINCLUDE_EDITOR_GAMEENGINE_H - #pragma once #if !defined(Q_MOC_RUN) #include #include "LogFile.h" -#include "CryListenerSet.h" #include "Util/ModalWindowDismisser.h" #endif @@ -28,6 +22,8 @@ struct IInitializeUIInfo; #include #include +#include + class ThreadedOnErrorHandler : public QObject { Q_OBJECT @@ -124,11 +120,6 @@ public: return s_pakModifyMutex; } - inline HMODULE GetGameModule() const - { - return m_gameDll; - } - private: void SetGameMode(bool inGame); void SwitchToInGame(); @@ -150,8 +141,7 @@ private: AZ_PUSH_DISABLE_DLL_EXPORT_MEMBER_WARNING Matrix34 m_playerViewTM; struct SSystemUserCallback* m_pSystemUserCallback; - HMODULE m_hSystemHandle; - HMODULE m_gameDll; + AZStd::unique_ptr m_hSystemHandle; enum EPendingGameMode { ePGM_NotPending, @@ -163,5 +153,3 @@ private: AZ_POP_DISABLE_DLL_EXPORT_MEMBER_WARNING }; - -#endif // CRYINCLUDE_EDITOR_GAMEENGINE_H diff --git a/Code/Editor/GameExporter.cpp b/Code/Editor/GameExporter.cpp index ae1095b03a..a768861b90 100644 --- a/Code/Editor/GameExporter.cpp +++ b/Code/Editor/GameExporter.cpp @@ -146,13 +146,11 @@ bool CGameExporter::Export(unsigned int flags, [[maybe_unused]] EEndian eExportE exportSuccessful = false; } - if (exportSuccessful) + if (exportSuccessful && m_bAutoExportMode) { - if (m_bAutoExportMode) - { - // Remove read-only flags. - CrySetFileAttributes(m_levelPak.m_sPath.toUtf8().data(), FILE_ATTRIBUTE_NORMAL); - } + // Remove read-only flags. + auto perms = QFile::permissions(m_levelPak.m_sPath) | QFile::Permission::WriteOwner; + QFile::setPermissions(m_levelPak.m_sPath, perms); } ////////////////////////////////////////////////////////////////////////// diff --git a/Code/Editor/Geometry/TriMesh.cpp b/Code/Editor/Geometry/TriMesh.cpp deleted file mode 100644 index efc201095d..0000000000 --- a/Code/Editor/Geometry/TriMesh.cpp +++ /dev/null @@ -1,587 +0,0 @@ -/* - * Copyright (c) Contributors to the Open 3D Engine Project. - * For complete copyright and license terms please see the LICENSE at the root of this distribution. - * - * SPDX-License-Identifier: Apache-2.0 OR MIT - * - */ - - -#include "EditorDefs.h" - -#include "TriMesh.h" - -// Editor -#include "Util/fastlib.h" -#include "Objects/SubObjSelection.h" - - -////////////////////////////////////////////////////////////////////////// -CTriMesh::CTriMesh() -{ - pFaces = nullptr; - pVertices = nullptr; - pWSVertices = nullptr; - pUV = nullptr; - pColors = nullptr; - pEdges = nullptr; - pWeights = nullptr; - - nFacesCount = 0; - nVertCount = 0; - nUVCount = 0; - nEdgeCount = 0; - - selectionType = SO_ELEM_NONE; - - memset(m_streamSize, 0, sizeof(m_streamSize)); - memset(m_streamSel, 0, sizeof(m_streamSel)); - streamSelMask = 0; - - m_streamSel[VERTICES] = &vertSel; - m_streamSel[EDGES] = &edgeSel; - m_streamSel[FACES] = &faceSel; -} - -////////////////////////////////////////////////////////////////////////// -CTriMesh::~CTriMesh() -{ - free(pFaces); - free(pEdges); - free(pVertices); - free(pUV); - free(pColors); - free(pWSVertices); - free(pWeights); -} - -// Set stream size. -void CTriMesh::ReallocStream(int stream, int nNewCount) -{ - assert(stream >= 0 && stream < LAST_STREAM); - if (stream < 0 || stream >= LAST_STREAM) - { - return; - } - if (m_streamSize[stream] == nNewCount) - { - return; // Stream already have required size. - } - void* pStream = nullptr; - int nElementSize = 0; - GetStreamInfo(stream, pStream, nElementSize); - pStream = ReAllocElements(pStream, nNewCount, nElementSize); - m_streamSize[stream] = nNewCount; - - switch (stream) - { - case VERTICES: - pVertices = (CTriVertex*)pStream; - nVertCount = nNewCount; - vertSel.resize(nNewCount); - break; - case FACES: - pFaces = (CTriFace*)pStream; - nFacesCount = nNewCount; - faceSel.resize(nNewCount); - break; - case EDGES: - pEdges = (CTriEdge*)pStream; - nEdgeCount = nNewCount; - edgeSel.resize(nNewCount); - break; - case TEXCOORDS: - pUV = (SMeshTexCoord*)pStream; - nUVCount = nNewCount; - break; - case COLORS: - pColors = (SMeshColor*)pStream; - break; - case WEIGHTS: - pWeights = (float*)pStream; - break; - case LINES: - pLines = (CTriLine*)pStream; - break; - case WS_POSITIONS: - pWSVertices = (Vec3*)pStream; - break; - default: - assert(0); // unknown stream. - } - m_streamSize[stream] = nNewCount; -} - -// Set stream size. -void CTriMesh::GetStreamInfo(int stream, void*& pStream, int& nElementSize) const -{ - assert(stream >= 0 && stream < LAST_STREAM); - switch (stream) - { - case VERTICES: - pStream = pVertices; - nElementSize = sizeof(CTriVertex); - break; - case FACES: - pStream = pFaces; - nElementSize = sizeof(CTriFace); - break; - case EDGES: - pStream = pEdges; - nElementSize = sizeof(CTriEdge); - break; - case TEXCOORDS: - pStream = pUV; - nElementSize = sizeof(SMeshTexCoord); - break; - case COLORS: - pStream = pColors; - nElementSize = sizeof(SMeshColor); - break; - case WEIGHTS: - pStream = pWeights; - nElementSize = sizeof(float); - break; - case LINES: - pStream = pLines; - nElementSize = sizeof(CTriLine); - break; - case WS_POSITIONS: - pStream = pWSVertices; - nElementSize = sizeof(Vec3); - break; - default: - assert(0); // unknown stream. - } -} - -////////////////////////////////////////////////////////////////////////// -void* CTriMesh::ReAllocElements(void* old_ptr, int new_elem_num, int size_of_element) -{ - return realloc(old_ptr, new_elem_num * size_of_element); -} - -///////////////////////////////////////////////////////////////////////////////////// -inline int FindVertexInHash(const Vec3& vPosToFind, const CTriVertex* pVectors, std::vector& hash, float fEpsilon) -{ - for (uint32 i = 0; i < hash.size(); i++) - { - const Vec3& v0 = pVectors[hash[i]].pos; - const Vec3& v1 = vPosToFind; - if (fabsf(v0.y - v1.y) < fEpsilon && fabsf(v0.x - v1.x) < fEpsilon && fabsf(v0.z - v1.z) < fEpsilon) - { - return hash[i]; - } - } - return -1; -} - -///////////////////////////////////////////////////////////////////////////////////// -inline int FindTexCoordInHash(const SMeshTexCoord& coordToFind, const SMeshTexCoord* pCoords, std::vector& hash, float fEpsilon) -{ - for (uint32 i = 0; i < hash.size(); i++) - { - const SMeshTexCoord& t0 = pCoords[hash[i]]; - const SMeshTexCoord& t1 = coordToFind; - - if (t0.IsEquivalent(t1, fEpsilon)) - { - return hash[i]; - } - } - return -1; -} - - -////////////////////////////////////////////////////////////////////////// -void CTriMesh::SharePositions() -{ - float fEpsilon = 0.0001f; - float fHashScale = 256.0f / MAX(bbox.GetSize().GetLength(), fEpsilon); - std::vector arrHashTable[256]; - - CTriVertex* pNewVerts = new CTriVertex[GetVertexCount()]; - SMeshColor* pNewColors = nullptr; - if (pColors) - { - pNewColors = new SMeshColor[GetVertexCount()]; - } - - int nLastIndex = 0; - for (int f = 0; f < GetFacesCount(); f++) - { - CTriFace& face = pFaces[f]; - for (int i = 0; i < 3; i++) - { - const Vec3& v = pVertices[face.v[i]].pos; - uint8 nHash = static_cast(RoundFloatToInt((v.x + v.y + v.z) * fHashScale)); - - int find = FindVertexInHash(v, pNewVerts, arrHashTable[nHash], fEpsilon); - if (find < 0) - { - pNewVerts[nLastIndex] = pVertices[face.v[i]]; - if (pColors) - { - pNewColors[nLastIndex] = pColors[face.v[i]]; - } - face.v[i] = nLastIndex; - // Reserve some space already. - arrHashTable[nHash].reserve(100); - arrHashTable[nHash].push_back(nLastIndex); - nLastIndex++; - } - else - { - face.v[i] = find; - } - } - } - - SetVertexCount(nLastIndex); - memcpy(pVertices, pNewVerts, nLastIndex * sizeof(CTriVertex)); - delete []pNewVerts; - - if (pColors) - { - SetColorsCount(nLastIndex); - memcpy(pColors, pNewColors, nLastIndex * sizeof(SMeshColor)); - delete []pNewColors; - } -} - -////////////////////////////////////////////////////////////////////////// -void CTriMesh::ShareUV() -{ - float fEpsilon = 0.0001f; - float fHashScale = 256.0f; - std::vector arrHashTable[256]; - - SMeshTexCoord* pNewUV = new SMeshTexCoord[GetUVCount()]; - - int nLastIndex = 0; - for (int f = 0; f < GetFacesCount(); f++) - { - CTriFace& face = pFaces[f]; - for (int i = 0; i < 3; i++) - { - const Vec2 uv = pUV[face.uv[i]].GetUV(); - uint8 nHash = static_cast(RoundFloatToInt((uv.x + uv.y) * fHashScale)); - - int find = FindTexCoordInHash(pUV[face.uv[i]], pNewUV, arrHashTable[nHash], fEpsilon); - if (find < 0) - { - pNewUV[nLastIndex] = pUV[face.uv[i]]; - face.uv[i] = nLastIndex; - arrHashTable[nHash].reserve(100); - arrHashTable[nHash].push_back(nLastIndex); - nLastIndex++; - } - else - { - face.uv[i] = find; - } - } - } - - SetUVCount(nLastIndex); - memcpy(pUV, pNewUV, nLastIndex * sizeof(SMeshTexCoord)); - delete []pNewUV; -} - -////////////////////////////////////////////////////////////////////////// -void CTriMesh::CalcFaceNormals() -{ - for (int i = 0; i < nFacesCount; i++) - { - CTriFace& face = pFaces[i]; - Vec3 p1 = pVertices[face.v[0]].pos; - Vec3 p2 = pVertices[face.v[1]].pos; - Vec3 p3 = pVertices[face.v[2]].pos; - face.normal = (p2 - p1).Cross(p3 - p1); - face.normal.Normalize(); - } -} - -#define TEX_EPS 0.001f -#define VER_EPS 0.001f - -////////////////////////////////////////////////////////////////////////// -void CTriMesh::CopyStream(CTriMesh& fromMesh, int stream) -{ - void* pTrgStream = nullptr; - void* pSrcStream = nullptr; - int nElemSize = 0; - fromMesh.GetStreamInfo(stream, pSrcStream, nElemSize); - if (pSrcStream) - { - ReallocStream(stream, fromMesh.GetStreamSize(stream)); - GetStreamInfo(stream, pTrgStream, nElemSize); - memcpy(pTrgStream, pSrcStream, nElemSize * fromMesh.GetStreamSize(stream)); - } -} - -////////////////////////////////////////////////////////////////////////// -void CTriMesh::Copy(CTriMesh& fromMesh, int nCopyFlags) -{ - streamSelMask = fromMesh.streamSelMask; - - if (nCopyFlags & COPY_VERTICES) - { - CopyStream(fromMesh, VERTICES); - } - if (nCopyFlags & COPY_FACES) - { - CopyStream(fromMesh, FACES); - } - if (nCopyFlags & COPY_EDGES) - { - CopyStream(fromMesh, EDGES); - } - if (nCopyFlags & COPY_TEXCOORDS) - { - CopyStream(fromMesh, TEXCOORDS); - } - if (nCopyFlags & COPY_COLORS) - { - CopyStream(fromMesh, COLORS); - } - if (nCopyFlags & COPY_WEIGHTS) - { - CopyStream(fromMesh, WEIGHTS); - } - if (nCopyFlags & COPY_LINES) - { - CopyStream(fromMesh, LINES); - } - - if (nCopyFlags & COPY_VERT_SEL) - { - vertSel = fromMesh.vertSel; - } - if (nCopyFlags & COPY_EDGE_SEL) - { - edgeSel = fromMesh.edgeSel; - } - if (nCopyFlags & COPY_FACE_SEL) - { - faceSel = fromMesh.faceSel; - } -} - -////////////////////////////////////////////////////////////////////////// -void CTriMesh::UpdateEdges() -{ - SetEdgeCount(GetFacesCount() * 3); - - std::map edgemap; - - int nEdges = 0; - for (int i = 0; i < GetFacesCount(); i++) - { - CTriFace& face = pFaces[i]; - for (int j = 0; j < 3; j++) - { - int v0 = j; - int v1 = (j != 2) ? j + 1 : 0; - CTriEdge edge; - edge.flags = 0; - - // First vertex index must always be smaller. - if (face.v[v0] < face.v[v1]) - { - edge.v[0] = face.v[v0]; - edge.v[1] = face.v[v1]; - } - else - { - edge.v[0] = face.v[v1]; - edge.v[1] = face.v[v0]; - } - edge.face[0] = i; - edge.face[1] = -1; - int nedge = stl::find_in_map(edgemap, edge, -1); - if (nedge >= 0) - { - // Assign this face as a second member of the edge. - if (pEdges[nedge].face[1] < 0) - { - pEdges[nedge].face[1] = i; - } - - face.edge[j] = nedge; - } - else - { - edgemap[edge] = nEdges; - pEdges[nEdges] = edge; - face.edge[j] = nEdges; - nEdges++; - } - } - } - - SetEdgeCount(nEdges); -} - -////////////////////////////////////////////////////////////////////////// -void CTriMesh::SoftSelection(const SSubObjSelOptions& options) -{ - int i; - int nVerts = GetVertexCount(); - CTriVertex* pVerts = pVertices; - - for (i = 0; i < nVerts; i++) - { - if (pWeights[i] == 1.0f) - { - const Vec3& vp = pVerts[i].pos; - for (int j = 0; j < nVerts; j++) - { - if (pWeights[j] != 1.0f) - { - if (vp.IsEquivalent(pVerts[j].pos, options.fSoftSelFalloff)) - { - float fDist = vp.GetDistance(pVerts[j].pos); - if (fDist < options.fSoftSelFalloff) - { - float fWeight = 1.0f - (fDist / options.fSoftSelFalloff); - if (fWeight > pWeights[j]) - { - pWeights[j] = fWeight; - } - } - } - } - } - } - } -} - -////////////////////////////////////////////////////////////////////////// -bool CTriMesh::UpdateSelection() -{ - bool bAnySelected = false; - if (selectionType == SO_ELEM_VERTEX) - { - for (int i = 0; i < GetVertexCount(); i++) - { - if (vertSel[i]) - { - bAnySelected = true; - pWeights[i] = 1.0f; - } - else - { - pWeights[i] = 0; - } - } - } - if (selectionType == SO_ELEM_EDGE) - { - // Clear weights. - for (int i = 0; i < GetVertexCount(); i++) - { - pWeights[i] = 0; - } - - for (int i = 0; i < GetEdgeCount(); i++) - { - if (edgeSel[i]) - { - bAnySelected = true; - CTriEdge& edge = pEdges[i]; - for (int j = 0; j < 2; j++) - { - pWeights[edge.v[j]] = 1.0f; - } - } - } - } - else if (selectionType == SO_ELEM_FACE) - { - // Clear weights. - for (int i = 0; i < GetVertexCount(); i++) - { - pWeights[i] = 0; - } - - for (int i = 0; i < GetFacesCount(); i++) - { - if (faceSel[i]) - { - bAnySelected = true; - CTriFace& face = pFaces[i]; - for (int j = 0; j < 3; j++) - { - pWeights[face.v[j]] = 1.0f; - } - } - } - } - return bAnySelected; -} - - -////////////////////////////////////////////////////////////////////////// -bool CTriMesh::ClearSelection() -{ - bool bWasSelected = false; - // Remove all selections. - int i; - for (i = 0; i < GetVertexCount(); i++) - { - pWeights[i] = 0; - } - streamSelMask = 0; - for (int ii = 0; ii < LAST_STREAM; ii++) - { - if (m_streamSel[ii] && !m_streamSel[ii]->is_zero()) - { - bWasSelected = true; - m_streamSel[ii]->clear(); - } - } - return bWasSelected; -} - -////////////////////////////////////////////////////////////////////////// -void CTriMesh::GetEdgesByVertex(MeshElementsArray& inVertices, MeshElementsArray& outEdges) -{ - // Brute force algorithm using binary search. - // for every edge check if edge vertex is inside inVertices array. - std::sort(inVertices.begin(), inVertices.end()); - for (int i = 0; i < GetEdgeCount(); i++) - { - if (stl::binary_find(inVertices.begin(), inVertices.end(), static_cast(pEdges[i].v[0])) != inVertices.end()) - { - outEdges.push_back(i); - } - else if (stl::binary_find(inVertices.begin(), inVertices.end(), static_cast(pEdges[i].v[1])) != inVertices.end()) - { - outEdges.push_back(i); - } - } -} - -////////////////////////////////////////////////////////////////////////// -void CTriMesh::GetFacesByVertex(MeshElementsArray& inVertices, MeshElementsArray& outFaces) -{ - // Brute force algorithm using binary search. - // for every face check if face vertex is inside inVertices array. - std::sort(inVertices.begin(), inVertices.end()); - for (int i = 0; i < GetFacesCount(); i++) - { - if (stl::binary_find(inVertices.begin(), inVertices.end(), static_cast(pFaces[i].v[0])) != inVertices.end()) - { - outFaces.push_back(i); - } - else if (stl::binary_find(inVertices.begin(), inVertices.end(), static_cast(pFaces[i].v[1])) != inVertices.end()) - { - outFaces.push_back(i); - } - else if (stl::binary_find(inVertices.begin(), inVertices.end(), static_cast(pFaces[i].v[2])) != inVertices.end()) - { - outFaces.push_back(i); - } - } -} diff --git a/Code/Editor/Geometry/TriMesh.h b/Code/Editor/Geometry/TriMesh.h deleted file mode 100644 index a6c58b8f9d..0000000000 --- a/Code/Editor/Geometry/TriMesh.h +++ /dev/null @@ -1,238 +0,0 @@ -/* - * Copyright (c) Contributors to the Open 3D Engine Project. - * For complete copyright and license terms please see the LICENSE at the root of this distribution. - * - * SPDX-License-Identifier: Apache-2.0 OR MIT - * - */ - - -#ifndef CRYINCLUDE_EDITOR_GEOMETRY_TRIMESH_H -#define CRYINCLUDE_EDITOR_GEOMETRY_TRIMESH_H -#pragma once - -#include -#include "Util/bitarray.h" - -struct SSubObjSelOptions; - -typedef std::vector MeshElementsArray; - -////////////////////////////////////////////////////////////////////////// -// Vertex used in the TriMesh. -////////////////////////////////////////////////////////////////////////// -struct CTriVertex -{ - Vec3 pos; - //float weight; // Selection weight in 0-1 range. -}; - -////////////////////////////////////////////////////////////////////////// -// Triangle face used by the Triangle mesh. -////////////////////////////////////////////////////////////////////////// -struct CTriFace -{ - uint32 v[3]; // Indices to vertices array. - uint32 uv[3]; // Indices to texture coordinates array. - Vec3 n[3]; // Vertex normals at face vertices. - Vec3 normal; // Face normal. - uint32 edge[3]; // Indices to the face edges. - unsigned char MatID; // Index of face sub material. - unsigned char flags; // see ETriMeshFlags -}; - -////////////////////////////////////////////////////////////////////////// -// Mesh edge. -////////////////////////////////////////////////////////////////////////// -struct CTriEdge -{ - uint32 v[2]; // Indices to edge vertices. - int face[2]; // Indices to edge faces (-1 if no face). - uint32 flags; // see ETriMeshFlags - - CTriEdge() {} - bool operator==(const CTriEdge& edge) const - { - if ((v[0] == edge.v[0] && v[1] == edge.v[1]) || - (v[0] == edge.v[1] && v[1] == edge.v[0])) - { - return true; - } - return false; - } - bool operator!=(const CTriEdge& edge) const { return !(*this == edge); } - bool operator<(const CTriEdge& edge) const { return (*(uint64*)v < *(uint64*)edge.v); } - bool operator>(const CTriEdge& edge) const { return (*(uint64*)v > *(uint64*)edge.v); } -}; - -////////////////////////////////////////////////////////////////////////// -// Mesh line. -////////////////////////////////////////////////////////////////////////// -struct CTriLine -{ - uint32 v[2]; // Indices to edge vertices. - - CTriLine() {} - bool operator==(const CTriLine& edge) const - { - if ((v[0] == edge.v[0] && v[1] == edge.v[1]) || - (v[0] == edge.v[1] && v[1] == edge.v[0])) - { - return true; - } - return false; - } - bool operator!=(const CTriLine& edge) const { return !(*this == edge); } - bool operator<(const CTriLine& edge) const { return (*(uint64*)v < *(uint64*)edge.v); } - bool operator>(const CTriLine& edge) const { return (*(uint64*)v > *(uint64*)edge.v); } -}; - -////////////////////////////////////////////////////////////////////////// -struct CTriMeshPoly -{ - std::vector v; // Indices to vertices array. - std::vector uv; // Indices to texture coordinates array. - std::vector n; // Vertex normals at face vertices. - Vec3 normal; // Polygon normal. - uint32 edge[3]; // Indices to the face edges. - unsigned char MatID; // Index of face sub material. - unsigned char flags; // optional flags. -}; - -////////////////////////////////////////////////////////////////////////// -// CTriMesh is used in the Editor as a general purpose editable triangle mesh. -////////////////////////////////////////////////////////////////////////// -class CTriMesh -{ -public: - enum EStream - { - VERTICES, - FACES, - EDGES, - TEXCOORDS, - COLORS, - WEIGHTS, - LINES, - WS_POSITIONS, - LAST_STREAM, - }; - enum ECopyFlags - { - COPY_VERTICES = BIT(1), - COPY_FACES = BIT(2), - COPY_EDGES = BIT(3), - COPY_TEXCOORDS = BIT(4), - COPY_COLORS = BIT(5), - COPY_VERT_SEL = BIT(6), - COPY_EDGE_SEL = BIT(7), - COPY_FACE_SEL = BIT(8), - COPY_WEIGHTS = BIT(9), - COPY_LINES = BIT(10), - COPY_ALL = 0xFFFF, - }; - // geometry data - CTriFace* pFaces; - CTriEdge* pEdges; - CTriVertex* pVertices; - SMeshTexCoord* pUV; - SMeshColor* pColors; // If allocated same size as pVerts array. - Vec3* pWSVertices; // World space vertices. - float* pWeights; - CTriLine* pLines; - - int nFacesCount; - int nVertCount; - int nUVCount; - int nEdgeCount; - int nLinesCount; - - AABB bbox; - - ////////////////////////////////////////////////////////////////////////// - // Selections. - ////////////////////////////////////////////////////////////////////////// - CBitArray vertSel; - CBitArray edgeSel; - CBitArray faceSel; - // Every bit of the selection mask correspond to a stream, if bit is set this stream have some elements selected - int streamSelMask; - - // Selection element type. - // see ESubObjElementType - int selectionType; - - ////////////////////////////////////////////////////////////////////////// - // Vertices of the front facing triangles. - CBitArray frontFacingVerts; - - ////////////////////////////////////////////////////////////////////////// - // Functions. - ////////////////////////////////////////////////////////////////////////// - CTriMesh(); - ~CTriMesh(); - - int GetFacesCount() const { return nFacesCount; } - int GetVertexCount() const { return nVertCount; } - int GetUVCount() const { return nUVCount; } - int GetEdgeCount() const { return nEdgeCount; } - int GetLinesCount() const { return nLinesCount; } - - ////////////////////////////////////////////////////////////////////////// - void SetFacesCount(int nNewCount) { ReallocStream(FACES, nNewCount); } - void SetVertexCount(int nNewCount) - { - ReallocStream(VERTICES, nNewCount); - if (pColors) - { - ReallocStream(COLORS, nNewCount); - } - ReallocStream(WEIGHTS, nNewCount); - } - void SetColorsCount(int nNewCount) { ReallocStream(COLORS, nNewCount); } - void SetUVCount(int nNewCount) { ReallocStream(TEXCOORDS, nNewCount); } - void SetEdgeCount(int nNewCount) { ReallocStream(EDGES, nNewCount); } - void SetLinesCount(int nNewCount) { ReallocStream(LINES, nNewCount); } - - void ReallocStream(int stream, int nNewCount); - void GetStreamInfo(int stream, void*& pStream, int& nElementSize) const; - int GetStreamSize(int stream) const { return m_streamSize[stream]; }; - - // Calculate per face normal. - void CalcFaceNormals(); - - ////////////////////////////////////////////////////////////////////////// - // Welding functions. - ////////////////////////////////////////////////////////////////////////// - void SharePositions(); - void ShareUV(); - ////////////////////////////////////////////////////////////////////////// - // Recreate edges of the mesh. - void UpdateEdges(); - - void Copy(CTriMesh& fromMesh, int nCopyFlags = COPY_ALL); - - ////////////////////////////////////////////////////////////////////////// - // Sub-object selection specific methods. - ////////////////////////////////////////////////////////////////////////// - // Return true if something is selected. - bool UpdateSelection(); - // Clear all selections, return true if something was selected. - bool ClearSelection(); - void SoftSelection(const SSubObjSelOptions& options); - CBitArray* GetStreamSelection(int nStream) { return m_streamSel[nStream]; }; - // Returns true if specified stream have any selected elements. - bool StreamHaveSelection(int nStream) { return streamSelMask & (1 << nStream); } - void GetEdgesByVertex(MeshElementsArray& inVertices, MeshElementsArray& outEdges); - void GetFacesByVertex(MeshElementsArray& inVertices, MeshElementsArray& outFaces); - -private: - void* ReAllocElements(void* old_ptr, int new_elem_num, int size_of_element); - void CopyStream(CTriMesh& fromMesh, int stream); - - // For internal use. - int m_streamSize[LAST_STREAM]; - CBitArray* m_streamSel[LAST_STREAM]; -}; - -#endif // CRYINCLUDE_EDITOR_GEOMETRY_TRIMESH_H diff --git a/Code/Editor/GotoPositionDlg.cpp b/Code/Editor/GotoPositionDlg.cpp index 84d149de58..37f55f19ea 100644 --- a/Code/Editor/GotoPositionDlg.cpp +++ b/Code/Editor/GotoPositionDlg.cpp @@ -6,7 +6,6 @@ * */ - #include "GotoPositionDlg.h" #include "EditorDefs.h" @@ -25,6 +24,17 @@ AZ_PUSH_DISABLE_DLL_EXPORT_MEMBER_WARNING #include AZ_POP_DISABLE_DLL_EXPORT_MEMBER_WARNING +void GotoPositionPitchConstraints::DeterminePitchRange(const AngleRangeConfigureFn& configurePitchRangeFn) const +{ + const auto [pitchMinRadians, pitchMaxRadians] = AzFramework::CameraPitchMinMaxRadians(); + configurePitchRangeFn(AZ::RadToDeg(pitchMinRadians), AZ::RadToDeg(pitchMaxRadians)); +} + +float GotoPositionPitchConstraints::PitchClampedRadians(float pitchDegrees) const +{ + return AzFramework::ClampPitchRotation(AZ::DegToRad(pitchDegrees)); +} + GotoPositionDialog::GotoPositionDialog(QWidget* parent) : QDialog(parent) , m_ui(new Ui::GotoPositionDialog) @@ -55,20 +65,23 @@ void GotoPositionDialog::OnInitDialog() const auto yawDegrees = AZ::RadToDeg(cameraRotation.GetZ()); // position - m_ui->m_dymX->setRange(-64000.0, 64000.0); + const double CameraPositionExtent = 64000.0; + m_ui->m_dymX->setRange(-CameraPositionExtent, CameraPositionExtent); m_ui->m_dymX->setValue(cameraTranslation.GetX()); - - m_ui->m_dymY->setRange(-64000.0, 64000.0); + m_ui->m_dymY->setRange(-CameraPositionExtent, CameraPositionExtent); m_ui->m_dymY->setValue(cameraTranslation.GetY()); - - m_ui->m_dymZ->setRange(-64000.0, 64000.0); + m_ui->m_dymZ->setRange(-CameraPositionExtent, CameraPositionExtent); m_ui->m_dymZ->setValue(cameraTranslation.GetZ()); // rotation - m_ui->m_dymAnglePitch->setRange(-180.0, 180.0); + m_gotoPositionPitchConstraints.DeterminePitchRange( + [this](const float minPitchDegrees, const float maxPitchDegrees) + { + m_ui->m_dymAnglePitch->setRange(minPitchDegrees, maxPitchDegrees); + }); m_ui->m_dymAnglePitch->setValue(pitchDegrees); - m_ui->m_dymAngleYaw->setRange(-180.0, 180.0); + m_ui->m_dymAngleYaw->setRange(-360, 360); m_ui->m_dymAngleYaw->setValue(yawDegrees); // ensure the goto button is highlighted correctly. @@ -108,12 +121,13 @@ void GotoPositionDialog::OnUpdateNumbers() void GotoPositionDialog::accept() { - SandboxEditor::InterpolateDefaultViewportCameraToTransform( - AZ::Vector3( - aznumeric_cast(m_ui->m_dymX->value()), aznumeric_cast(m_ui->m_dymY->value()), - aznumeric_cast(m_ui->m_dymZ->value())), - AZ::DegToRad(aznumeric_cast(m_ui->m_dymAnglePitch->value())), - AZ::DegToRad(aznumeric_cast(m_ui->m_dymAngleYaw->value()))); + const auto position = AZ::Vector3( + aznumeric_cast(m_ui->m_dymX->value()), aznumeric_cast(m_ui->m_dymY->value()), + aznumeric_cast(m_ui->m_dymZ->value())); + const auto pitchRadians = m_gotoPositionPitchConstraints.PitchClampedRadians(aznumeric_cast(m_ui->m_dymAnglePitch->value())); + const auto yawRadians = AZ::DegToRad(aznumeric_cast(m_ui->m_dymAngleYaw->value())); + + SandboxEditor::InterpolateDefaultViewportCameraToTransform(position, pitchRadians, yawRadians); QDialog::accept(); } diff --git a/Code/Editor/GotoPositionDlg.h b/Code/Editor/GotoPositionDlg.h index ef46b9cbc8..5b627fcebb 100644 --- a/Code/Editor/GotoPositionDlg.h +++ b/Code/Editor/GotoPositionDlg.h @@ -6,21 +6,33 @@ * */ - #pragma once #if !defined(Q_MOC_RUN) #include #endif +#include + +#include + namespace Ui { class GotoPositionDialog; } +//! Utility to deal with ensuring camera pitch values are in the expected range. +struct GotoPositionPitchConstraints +{ + using AngleRangeConfigureFn = AZStd::function; + //! Notify a callback with the min and max camera pitch constraints (no tolerance included). + SANDBOX_API void DeterminePitchRange(const AngleRangeConfigureFn& configurePitchRangeFn) const; + //! Returns the clamped pitch value (including tolerance with range extents). + SANDBOX_API float PitchClampedRadians(float pitchDegrees) const; +}; + //! GotoPositionDialog for setting camera position and rotation. -class GotoPositionDialog - : public QDialog +class GotoPositionDialog : public QDialog { Q_OBJECT @@ -39,5 +51,6 @@ public: QString m_transform; private: + GotoPositionPitchConstraints m_gotoPositionPitchConstraints; QScopedPointer m_ui; }; diff --git a/Code/Editor/IEditor.h b/Code/Editor/IEditor.h index 7c49819d83..90f1b63f55 100644 --- a/Code/Editor/IEditor.h +++ b/Code/Editor/IEditor.h @@ -44,7 +44,6 @@ class CMusicManager; struct IEditorParticleManager; class CEAXPresetManager; class CErrorReport; -class CBaseLibraryItem; class ICommandManager; class CEditorCommandManager; class CHyperGraphManager; @@ -52,10 +51,7 @@ class CConsoleSynchronization; class CUIEnumsDatabase; struct ISourceControl; struct IEditorClassFactory; -struct IDataBaseItem; struct ITransformManipulator; -struct IDataBaseManager; -class IFacialEditor; class CDialog; #if defined(AZ_PLATFORM_WINDOWS) class C3DConnexionDriver; @@ -69,7 +65,6 @@ class CSelectionTreeManager; struct SEditorSettings; class CGameExporter; class IAWSResourceManager; -struct IEditorPanelUtils; namespace WinWidget { @@ -83,8 +78,6 @@ struct IEventLoopHook; struct IErrorReport; // Vladimir@conffx struct IFileUtil; // Vladimir@conffx struct IEditorLog; // Vladimir@conffx -struct IEditorMaterialManager; // Vladimir@conffx -struct IBaseLibraryManager; // Vladimir@conffx struct IImageUtil; // Vladimir@conffx struct IEditorParticleUtils; // Leroy@conffx struct ILogFile; // Vladimir@conffx @@ -168,8 +161,6 @@ enum EEditorNotifyEvent eNotify_OnVegetationObjectSelection, // When vegetation objects selection change. eNotify_OnVegetationPanelUpdate, // When vegetation objects selection change. - eNotify_OnDisplayRenderUpdate, // Sent when editor finish terrain texture generation. - eNotify_OnDataBaseUpdate, // DataBase Library was modified. eNotify_OnLayerImportBegin, //layer import was started @@ -508,8 +499,6 @@ struct IEditor virtual CBaseObject* NewObject(const char* typeName, const char* fileName = "", const char* name = "", float x = 0.0f, float y = 0.0f, float z = 0.0f, bool modifyDoc = true) = 0; //! Delete object virtual void DeleteObject(CBaseObject* obj) = 0; - //! Clone object - virtual CBaseObject* CloneObject(CBaseObject* obj) = 0; //! Get current selection group virtual CSelectionGroup* GetSelection() = 0; virtual CBaseObject* GetSelectedObject() = 0; @@ -524,14 +513,8 @@ struct IEditor //! Get access to object manager. virtual struct IObjectManager* GetObjectManager() = 0; virtual CSettingsManager* GetSettingsManager() = 0; - //! Get DB manager that own items of specified type. - virtual IDataBaseManager* GetDBItemManager(EDataBaseItemType itemType) = 0; - virtual IBaseLibraryManager* GetMaterialManagerLibrary() = 0; // Vladimir@conffx - virtual IEditorMaterialManager* GetIEditorMaterialManager() = 0; // Vladimir@Conffx //! Returns IconManager. virtual IIconManager* GetIconManager() = 0; - //! Get Panel Editor Utilities - virtual IEditorPanelUtils* GetEditorPanelUtils() = 0; //! Get Music Manager. virtual CMusicManager* GetMusicManager() = 0; virtual float GetTerrainElevation(float x, float y) = 0; diff --git a/Code/Editor/IEditorImpl.cpp b/Code/Editor/IEditorImpl.cpp index 66c64d5bef..38006c6fca 100644 --- a/Code/Editor/IEditorImpl.cpp +++ b/Code/Editor/IEditorImpl.cpp @@ -81,9 +81,6 @@ AZ_POP_DISABLE_WARNING // AWSNativeSDK #include -#include "IEditorPanelUtils.h" -#include "EditorPanelUtils.h" - #include "Core/QtEditorApplication.h" // for Editor::EditorQtApplication static CCryEditDoc * theDocument; @@ -143,7 +140,6 @@ CEditorImpl::CEditorImpl() , m_QtApplication(static_cast(qApp)) , m_pImageUtil(nullptr) , m_pLogFile(nullptr) - , m_panelEditorUtils(nullptr) { // note that this is a call into EditorCore.dll, which stores the g_pEditorPointer for all shared modules that share EditorCore.dll // this means that they don't need to do SetIEditor(...) themselves and its available immediately @@ -167,8 +163,6 @@ CEditorImpl::CEditorImpl() m_pDisplaySettings->LoadRegistry(); m_pPluginManager = new CPluginManager; - m_panelEditorUtils = CreateEditorPanelUtils(); - m_pObjectManager = new CObjectManager; m_pViewManager = new CViewManager; m_pIconManager = new CIconManager; @@ -301,8 +295,6 @@ CEditorImpl::~CEditorImpl() SAFE_DELETE(m_pViewManager) SAFE_DELETE(m_pObjectManager) // relies on prefab manager - SAFE_DELETE(m_panelEditorUtils); - // some plugins may be exporter - this must be above plugin manager delete. SAFE_DELETE(m_pExportManager); @@ -397,11 +389,6 @@ void CEditorImpl::Update() // Make sure this is not called recursively m_bUpdates = false; - //@FIXME: Restore this latter. - //if (GetGameEngine() && GetGameEngine()->IsLevelLoaded()) - { - m_pObjectManager->Update(); - } if (IsInPreviewMode()) { SetModifiedFlag(false); @@ -687,13 +674,6 @@ void CEditorImpl::DeleteObject(CBaseObject* obj) GetObjectManager()->DeleteObject(obj); } -CBaseObject* CEditorImpl::CloneObject(CBaseObject* obj) -{ - SetModifiedFlag(); - GetIEditor()->SetModifiedModule(eModifiedBrushes); - return GetObjectManager()->CloneObject(obj); -} - CBaseObject* CEditorImpl::GetSelectedObject() { if (m_pObjectManager->GetSelection()->GetCount() != 1) @@ -912,11 +892,6 @@ void CEditorImpl::CloseView(const GUID& classId) } } -IDataBaseManager* CEditorImpl::GetDBItemManager([[maybe_unused]] EDataBaseItemType itemType) -{ - return nullptr; -} - bool CEditorImpl::SelectColor(QColor& color, QWidget* parent) { const AZ::Color c = AzQtComponents::fromQColor(color); @@ -1457,7 +1432,7 @@ ISourceControl* CEditorImpl::GetSourceControl() { IClassDesc* pClass = classes[i]; ISourceControl* pSCM = nullptr; - HRESULT hRes = pClass->QueryInterface(__uuidof(ISourceControl), (void**)&pSCM); + HRESULT hRes = pClass->QueryInterface(__az_uuidof(ISourceControl), (void**)&pSCM); if (!FAILED(hRes) && pSCM) { m_pSourceControl = pSCM; @@ -1644,18 +1619,6 @@ SEditorSettings* CEditorImpl::GetEditorSettings() return &gSettings; } -// Vladimir@Conffx -IBaseLibraryManager* CEditorImpl::GetMaterialManagerLibrary() -{ - return nullptr; -} - -// Vladimir@Conffx -IEditorMaterialManager* CEditorImpl::GetIEditorMaterialManager() -{ - return nullptr; -} - IImageUtil* CEditorImpl::GetImageUtil() { return m_pImageUtil; @@ -1670,8 +1633,3 @@ void CEditorImpl::DestroyQMimeData(QMimeData* data) const { delete data; } - -IEditorPanelUtils* CEditorImpl::GetEditorPanelUtils() -{ - return m_panelEditorUtils; -} diff --git a/Code/Editor/IEditorImpl.h b/Code/Editor/IEditorImpl.h index 26701edec2..7867912941 100644 --- a/Code/Editor/IEditorImpl.h +++ b/Code/Editor/IEditorImpl.h @@ -141,7 +141,6 @@ public: const SGizmoParameters& GetGlobalGizmoParameters() override; CBaseObject* NewObject(const char* typeName, const char* fileName = "", const char* name = "", float x = 0.0f, float y = 0.0f, float z = 0.0f, bool modifyDoc = true) override; void DeleteObject(CBaseObject* obj) override; - CBaseObject* CloneObject(CBaseObject* obj) override; IObjectManager* GetObjectManager() override; // This will return a null pointer if CrySystem is not loaded before // Global Sandbox Settings are loaded from the registry before CrySystem @@ -158,7 +157,6 @@ public: void LockSelection(bool bLock) override; bool IsSelectionLocked() override; - IDataBaseManager* GetDBItemManager(EDataBaseItemType itemType) override; CMusicManager* GetMusicManager() override { return m_pMusicManager; }; IEditorFileMonitor* GetFileMonitor() override; @@ -295,11 +293,8 @@ public: void RegisterObjectContextMenuExtension(TContextMenuExtensionFunc func) override; SSystemGlobalEnvironment* GetEnv() override; - IBaseLibraryManager* GetMaterialManagerLibrary() override; // Vladimir@Conffx - IEditorMaterialManager* GetIEditorMaterialManager() override; // Vladimir@Conffx IImageUtil* GetImageUtil() override; // Vladimir@conffx SEditorSettings* GetEditorSettings() override; - IEditorPanelUtils* GetEditorPanelUtils() override; ILogFile* GetLogFile() override { return m_pLogFile; } void UnloadPlugins() override; @@ -357,7 +352,6 @@ protected: CErrorsDlg* m_pErrorsDlg; //! Source control interface. ISourceControl* m_pSourceControl; - IEditorPanelUtils* m_panelEditorUtils; CSelectionTreeManager* m_pSelectionTreeManager; diff --git a/Code/Editor/IEditorPanelUtils.h b/Code/Editor/IEditorPanelUtils.h deleted file mode 100644 index 4649213ae7..0000000000 --- a/Code/Editor/IEditorPanelUtils.h +++ /dev/null @@ -1,131 +0,0 @@ -/* - * Copyright (c) Contributors to the Open 3D Engine Project. - * For complete copyright and license terms please see the LICENSE at the root of this distribution. - * - * SPDX-License-Identifier: Apache-2.0 OR MIT - */ - -#ifndef CRYINCLUDE_CRYEDITOR_IPANELEDITORUTILS_H -#define CRYINCLUDE_CRYEDITOR_IPANELEDITORUTILS_H -#pragma once - -#include "Cry_Vector3.h" - -#include "DisplaySettings.h" -#include "Include/IDisplayViewport.h" -#include "Include/IIconManager.h" -#include -#include -#include -#include - -class CBaseObject; -class CViewport; -class IQToolTip; - -struct HotKey -{ - HotKey() - : path("") - , sequence(QKeySequence()) - { - } - void CopyFrom(const HotKey& other) - { - path = other.path; - sequence = other.sequence; - } - void SetPath(const char* _path) - { - path = QString(_path); - } - void SetSequenceFromString(const char* _sequence) - { - sequence = QKeySequence::fromString(_sequence); - } - void SetSequence(const QKeySequence& other) - { - sequence = other; - } - bool IsMatch(QString _path) - { - return path.compare(_path, Qt::CaseInsensitive) == 0; - } - bool IsMatch(QKeySequence _sequence) - { - return sequence.matches(_sequence); - } - bool operator < (const HotKey& other) const - { - //split the paths into lists compare per level - QStringList m_categories = path.split('.'); - QStringList o_categories = other.path.split('.'); - int m_catSize = m_categories.size(); - int o_catSize = o_categories.size(); - int size = (m_catSize < o_catSize) ? m_catSize : o_catSize; - - //sort categories to keep them together - for (int i = 0; i < size; i++) - { - if (m_categories[i] < o_categories[i]) - { - return true; - } - if (m_categories[i] > o_categories[i]) - { - return false; - } - } - //if comparing a category and a item in that category the category is < item - return m_catSize > o_catSize; - } - QKeySequence sequence; - QString path; -}; - -struct IEditorPanelUtils -{ - virtual ~IEditorPanelUtils() {} - virtual void SetViewportDragOperation(void(*)(CViewport* viewport, int dragPointX, int dragPointY, void* custom), void* custom) = 0; - - //PREVIEW WINDOW UTILS//////////////////////////////////////////////////// - virtual int PreviewWindow_GetDisplaySettingsDebugFlags(CDisplaySettings* settings) = 0; - virtual void PreviewWindow_SetDisplaySettingsDebugFlags(CDisplaySettings* settings, int flags) = 0; - - //HOTKEY UTILS//////////////////////////////////////////////////////////// - virtual bool HotKey_Import() = 0; - virtual void HotKey_Export() = 0; - virtual QKeySequence HotKey_GetShortcut(const char* path) = 0; - virtual bool HotKey_IsPressed(const QKeyEvent* event, const char* path) = 0; - virtual bool HotKey_IsPressed(const QShortcutEvent* event, const char* path) = 0; - virtual bool HotKey_LoadExisting() = 0; - virtual void HotKey_SaveCurrent() = 0; - virtual void HotKey_BuildDefaults() = 0; - virtual void HotKey_SetKeys(QVector keys) = 0; - virtual QVector HotKey_GetKeys() = 0; - virtual QString HotKey_GetPressedHotkey(const QKeyEvent* event) = 0; - virtual QString HotKey_GetPressedHotkey(const QShortcutEvent* event) = 0; - virtual void HotKey_SetEnabled(bool val) = 0; - virtual bool HotKey_IsEnabled() const = 0; - - //TOOLTIP UTILS/////////////////////////////////////////////////////////// - - //! Loads a table of tooltip configuration data from an xml file. - virtual void ToolTip_LoadConfigXML(QString filepath) = 0; - - //! Initializes a QToolTipWidget from loaded configuration data (see ToolTip_LoadConfigXML()) - //! \param tooltip Will be initialized using loaded configuration data - //! \param path Variable serialization path. Will be used as the key for looking up data in the configuration table. (ex: "Rotation.Rotation_Rate_X") - //! \param option Name of a sub-option of the variable specified by "path". (ex: "Emitter_Strength" will look up the tooltip data for "Rotation.Rotation_Rate_X.Emitter_Strength") - //! \param optionalData The argument to be used with "special_content" feature. See ToolTip_GetSpecialContentType() and QToolTipWidget::AddSpecialContent(). - //! \param isEnabled If false, the tooltip will indicate the reason why the widget is disabled. - virtual void ToolTip_BuildFromConfig(IQToolTip* tooltip, QString path, QString option, QString optionalData = "", bool isEnabled = true) = 0; - - virtual QString ToolTip_GetTitle(QString path, QString option = "") = 0; - virtual QString ToolTip_GetContent(QString path, QString option = "") = 0; - virtual QString ToolTip_GetSpecialContentType(QString path, QString option = "") = 0; - virtual QString ToolTip_GetDisabledContent(QString path, QString option = "") = 0; -}; - - -#endif diff --git a/Code/Editor/IconManager.cpp b/Code/Editor/IconManager.cpp index 820213bbd9..a9d31aef7b 100644 --- a/Code/Editor/IconManager.cpp +++ b/Code/Editor/IconManager.cpp @@ -21,8 +21,6 @@ #include "Util/Image.h" #include "Util/ImageUtil.h" -#include - #define HELPER_MATERIAL "Objects/Helper" namespace @@ -38,7 +36,6 @@ namespace CIconManager::CIconManager() { ZeroStruct(m_icons); - ZeroStruct(m_objects); } ////////////////////////////////////////////////////////////////////////// @@ -61,13 +58,7 @@ void CIconManager::Done() void CIconManager::Reset() { // Do not unload objects. but clears them. - int i; - for (i = 0; i < sizeof(m_objects) / sizeof(m_objects[0]); i++) - { - delete m_objects[i]; - m_objects[i] = nullptr; - } - for (i = 0; i < eIcon_COUNT; i++) + for (int i = 0; i < eIcon_COUNT; i++) { m_icons[i] = 0; } @@ -110,12 +101,6 @@ int CIconManager::GetIconTexture(EIcon icon) return m_icons[icon]; } -////////////////////////////////////////////////////////////////////////// -IStatObj* CIconManager::GetObject(EStatObject) -{ - return nullptr; -} - ////////////////////////////////////////////////////////////////////////// QImage* CIconManager::GetIconBitmap(const char* filename, bool& bHaveAlpha, uint32 effects /*=0*/) { diff --git a/Code/Editor/IconManager.h b/Code/Editor/IconManager.h index 7183f036ed..7e9be63665 100644 --- a/Code/Editor/IconManager.h +++ b/Code/Editor/IconManager.h @@ -8,11 +8,6 @@ // Description : Manages Textures used by Icon. - - -#ifndef CRYINCLUDE_EDITOR_ICONMANAGER_H -#define CRYINCLUDE_EDITOR_ICONMANAGER_H - #pragma once #include "Include/IIconManager.h" // for IIconManager @@ -31,7 +26,7 @@ class CIconManager public: // Construction CIconManager(); - ~CIconManager(); + ~CIconManager() override; void Init(); void Done(); @@ -41,8 +36,6 @@ public: // Operations virtual int GetIconTexture(EIcon icon); - - virtual IStatObj* GetObject(EStatObject object); virtual int GetIconTexture(const char* iconName); ////////////////////////////////////////////////////////////////////////// @@ -61,7 +54,6 @@ public: private: StdMap m_textures; - IStatObj* m_objects[eStatObject_COUNT]; int m_icons[eIcon_COUNT]; ////////////////////////////////////////////////////////////////////////// @@ -70,5 +62,3 @@ private: typedef std::map IconsMap; IconsMap m_iconBitmapsMap; }; - -#endif // CRYINCLUDE_EDITOR_ICONMANAGER_H diff --git a/Code/Editor/Include/HitContext.h b/Code/Editor/Include/HitContext.h index 186124555f..b49117bb60 100644 --- a/Code/Editor/Include/HitContext.h +++ b/Code/Editor/Include/HitContext.h @@ -17,9 +17,7 @@ class CGizmo; class CBaseObject; struct IDisplayViewport; -class CDeepSelection; struct AABB; -class CCamera; #include #include @@ -68,8 +66,6 @@ struct HitContext QRect rect; //! Optional limiting bounding box for hit testing. AABB* bounds; - //! Optional camera for culling perspective viewports. - CCamera* camera; //! Testing performed in 2D viewport. bool b2DViewport; @@ -108,8 +104,6 @@ struct HitContext CBaseObject* object; //! gizmo object that have been hit. CGizmo* gizmo; - //! for deep selection mode - CDeepSelection* pDeepSelection; //! For linking tool const char* name; //! true if this hit was from the object icon @@ -120,7 +114,6 @@ struct HitContext rect = QRect(); b2DViewport = false; view = 0; - camera = 0; point2d = QPoint(); axis = 0; distanceTolerance = 0; @@ -135,7 +128,6 @@ struct HitContext bIgnoreAxis = false; bOnlyGizmo = false; bUseSelectionHelpers = false; - pDeepSelection = 0; name = nullptr; iconHit = false; } diff --git a/Code/Editor/Include/IAnimationCompressionManager.h b/Code/Editor/Include/IAnimationCompressionManager.h deleted file mode 100644 index 64cebf620a..0000000000 --- a/Code/Editor/Include/IAnimationCompressionManager.h +++ /dev/null @@ -1,20 +0,0 @@ -/* - * Copyright (c) Contributors to the Open 3D Engine Project. - * For complete copyright and license terms please see the LICENSE at the root of this distribution. - * - * SPDX-License-Identifier: Apache-2.0 OR MIT - * - */ - - -#ifndef CRYINCLUDE_EDITOR_INCLUDE_IANIMATIONCOMPRESSIONMANAGER_H -#define CRYINCLUDE_EDITOR_INCLUDE_IANIMATIONCOMPRESSIONMANAGER_H -#pragma once - -struct IAnimationCompressionManager -{ - virtual bool IsEnabled() const = 0; - virtual void UpdateLocalAnimations() = 0; -}; - -#endif // CRYINCLUDE_EDITOR_INCLUDE_IANIMATIONCOMPRESSIONMANAGER_H diff --git a/Code/Editor/Include/IAssetItem.h b/Code/Editor/Include/IAssetItem.h deleted file mode 100644 index ff80331af5..0000000000 --- a/Code/Editor/Include/IAssetItem.h +++ /dev/null @@ -1,433 +0,0 @@ -/* - * Copyright (c) Contributors to the Open 3D Engine Project. - * For complete copyright and license terms please see the LICENSE at the root of this distribution. - * - * SPDX-License-Identifier: Apache-2.0 OR MIT - * - */ - - -// Description : Standard interface for asset display in the asset browser, -// this header should be used to create plugins. -// The method Release of this interface should NOT be called. -// Instead, the FreeData from the database (from IAssetItemDatabase) should -// be used as it will safely release all the items from the database. -// It is still possible to call the release method, but this is not the -// recomended method, specially for usage outside of the plugins because there -// is no guarantee that a the asset will be properly removed from the database -// manager. - -#ifndef CRYINCLUDE_EDITOR_INCLUDE_IASSETITEM_H -#define CRYINCLUDE_EDITOR_INCLUDE_IASSETITEM_H -#pragma once - -struct IAssetItemDatabase; - -namespace AssetViewer -{ - // Used in GetAssetFieldValue for each asset type to check if field name is the right one - inline bool IsFieldName(const char* pIncomingFieldName, const char* pFieldName) - { - return !strncmp(pIncomingFieldName, pFieldName, strlen(pIncomingFieldName)); - } -} - -// Description: -// This interface allows the programmer to extend asset display types visible in the asset browser. -struct IAssetItem - : public IUnknown -{ - DEFINE_UUID(0x04F20346, 0x2EC3, 0x43f2, 0xBD, 0xA1, 0x2C, 0x0B, 0x97, 0x76, 0xF3, 0x84); - - // The supported asset flags - enum EAssetFlags - { - // asset is visible in the database for filtering and sorting (not asset view control related) - eFlag_Visible = BIT(0), - // the asset is loaded - eFlag_Loaded = BIT(1), - // the asset is loaded - eFlag_Cached = BIT(2), - // the asset is selected in a selection set - eFlag_Selected = BIT(3), - // this asset is invalid, no thumb is shown/available - eFlag_Invalid = BIT(4), - // this asset has some errors/warnings, in the asset browser it will show some blinking/red elements - // and the user can check out the errors. Error text will be fetched using GetAssetFieldValue( "errors", &someStringVar ) - eFlag_HasErrors = BIT(5), - // this flag is set when the asset is rendering its contents using GDI, and not the engine's rendering capabilities - // (this flags is used as hint for the preview tool, which will use a double-buffer canvas if this flag is set, - // and send a memory HDC to the OnBeginPreview method, for drawing of the asset) - eFlag_UseGdiRendering = BIT(6), - // set if this asset is draggable into the render viewports, and can be created there - eFlag_CanBeDraggedInViewports = BIT(7), - // set if this asset can be moved after creation, otherwise the asset instance will just be created where user clicked - eFlag_CanBeMovedAfterDroppedIntoViewport = BIT(8), - // the asset thumbnail image is loaded - eFlag_ThumbnailLoaded = BIT(9), - // the asset thumbnail image is loaded - eFlag_UsedInLevel = BIT(10) - }; - - // Asset field name and field values map - typedef std::map < QString/*fieldName*/, QString/*value*/ > TAssetFieldValuesMap; - // Dependency category names and corresponding files map, example: "Textures"=>{ "foam.dds","water.dds","normal.dds" } - typedef std::map < QString/*dependencyCategory*/, std::set/*dependency filenames*/ > TAssetDependenciesMap; - - virtual ~IAssetItem() { - } - - // Description: - // Get the hash number/key used for database thumbnail and info records management - virtual uint32 GetHash() const = 0; - // Description: - // Set the hash number/key used for database thumbnail and info records management - virtual void SetHash(uint32 hash) = 0; - // Description: - // Get the owner database for this asset - // Return Value: - // The owner database for this asset - // See Also: - // SetOwnerDatabase() - virtual IAssetItemDatabase* GetOwnerDatabase() const = 0; - // Description: - // Set the owner database for this asset - // Arguments: - // piOwnerDisplayDatabase - the owner database - // See Also: - // GetOwnerDatabase() - virtual void SetOwnerDatabase(IAssetItemDatabase* pOwnerDisplayDatabase) = 0; - // Description: - // Get the asset's dependency files / objects - // Return Value: - // The vector with filenames which this asset is dependent upon, ex.: ["Textures"].(vector of textures) - virtual const TAssetDependenciesMap& GetDependencies() const = 0; - // Description: - // Set the file size of this asset in bytes - // Arguments: - // aSize - size of the file in bytes - // See Also: - // GetFileSize() - virtual void SetFileSize(quint64 aSize) = 0; - // Description: - // Get the file size of this asset in bytes - // Return Value: - // The file size of this asset in bytes - // See Also: - // SetFileSize() - virtual quint64 GetFileSize() const = 0; - // Description: - // Set asset filename (extension included and no path) - // Arguments: - // pName - the asset filename (extension included and no path) - // See Also: - // GetFilename() - virtual void SetFilename(const char* pName) = 0; - // Description: - // Get asset filename (extension included and no path) - // Return Value: - // The asset filename (extension included and no path) - // See Also: - // SetFilename() - virtual QString GetFilename() const = 0; - // Description: - // Set the asset's relative path - // Arguments: - // pName - file's relative path - // See Also: - // GetRelativePath() - virtual void SetRelativePath(const char* pName) = 0; - // Description: - // Get the asset's relative path - // Return Value: - // The asset's relative path - // See Also: - // SetRelativePath() - virtual QString GetRelativePath() const = 0; - // Description: - // Set the file extension ( dot(s) must be included ) - // Arguments: - // pExt - the file's extension - // See Also: - // GetFileExtension() - virtual void SetFileExtension(const char* pExt) = 0; - // Description: - // Get the file extension ( dot(s) included ) - // Return Value: - // The file extension ( dot(s) included ) - // See Also: - // SetFileExtension() - virtual QString GetFileExtension() const = 0; - // Description: - // Get the asset flags, with values from IAssetItem::EAssetFlags - // Return Value: - // The asset flags, with values from IAssetItem::EAssetFlags - // See Also: - // SetFlags(), SetFlag(), IsFlagSet() - virtual UINT GetFlags() const = 0; - // Description: - // Set the asset flags - // Arguments: - // aFlags - flags, OR-ed values from IAssetItem::EAssetFlags - // See Also: - // GetFlags(), SetFlag(), IsFlagSet() - virtual void SetFlags(UINT aFlags) = 0; - // Description: - // Set/clear a single flag bit for the asset - // Arguments: - // aFlag - the flag to set/clear, with values from IAssetItem::EAssetFlags - // See Also: - // GetFlags(), SetFlags(), IsFlagSet() - virtual void SetFlag(EAssetFlags aFlag, bool bSet = true) = 0; - // Description: - // Check if a specified flag is set - // Arguments: - // aFlag - the flag to check, with values from IAssetItem::EAssetFlags - // Return Value: - // True if the flag is set - // See Also: - // GetFlags(), SetFlags(), SetFlag() - virtual bool IsFlagSet(EAssetFlags aFlag) const = 0; - // Description: - // Set this asset's index; used in sorting, selections, and to know where an asset is in the current list - // Arguments: - // aIndex - the asset's index - // See Also: - // GetIndex() - virtual void SetIndex(UINT aIndex) = 0; - // Description: - // Get the asset's index in the current list - // Return Value: - // The asset's index in the current list - // See Also: - // SetIndex() - virtual UINT GetIndex() const = 0; - // Description: - // Get the asset's field raw data value into a user location, you must check the field's type ( from asset item's owner database ) - // before using this function and send the correct pointer to destination according to the type ( int8, float32, string, etc. ) - // Arguments: - // pFieldName - the asset field name to query the value for - // pDest - the destination variable address, must be the same type as the field type - // Return Value: - // True if the asset field name is found and the value is returned correctly - // See Also: - // SetAssetFieldValue() - virtual QVariant GetAssetFieldValue(const char* pFieldName) const = 0; - // Description: - // Set the asset's field raw data value from a user location, you must check the field's type ( from asset item's owner database ) - // before using this function and send the correct pointer to source according to the type ( int8, float32, string, etc. ) - // Arguments: - // pFieldName - the asset field name to set the value for - // pSrc - the source variable address, must be the same type as the field type - // Return Value: - // True if the asset field name is found and the value is set correctly - // See Also: - // GetAssetFieldValue() - virtual bool SetAssetFieldValue(const char* pFieldName, void* pSrc) = 0; - // Description: - // Get the drawing rectangle for the asset's thumb ( absolute viewer canvas location ) - // Arguments: - // rstDrawingRectangle - destination location to set with the asset's thumbnail rectangle location - // See Also: - // SetDrawingRectangle() - virtual void GetDrawingRectangle(QRect& rstDrawingRectangle) const = 0; - // Description: - // Set the drawing rectangle for the asset's thumb ( absolute viewer canvas location ) - // Arguments: - // crstDrawingRectangle - source to set the asset's thumbnail rectangle - // See Also: - // GetDrawingRectangle() - virtual void SetDrawingRectangle(const QRect& crstDrawingRectangle) = 0; - // Description: - // Checks if the given 2D point is inside the asset's thumb rectangle - // Arguments: - // nX - mouse pointer position on X axis, relative to the asset viewer control - // nY - mouse pointer position on Y axis, relative to the asset viewer control - // Return Value: - // True if the given 2D point is inside the asset's thumb rectangle - // See Also: - // HitTest(CRect) - virtual bool HitTest(int nX, int nY) const = 0; - // Description: - // Checks if the given rectangle intersects the asset thumb's rectangle - // Arguments: - // nX - mouse pointer position on X axis, relative to the asset viewer control - // nY - mouse pointer position on Y axis, relative to the asset viewer control - // Return Value: - // True if the given rectangle intersects the asset thumb's rectangle - // See Also: - // HitTest(int nX,int nY) - virtual bool HitTest(const QRect& roTestRect) const = 0; - // Description: - // When user drags this asset item into a viewport, this method is called when the dragging operation ends - // and the mouse button is released, for the asset to return an instance of the asset object to be placed in the level - // Arguments: - // aX - instance's X position component in world coordinates - // aY - instance's Y position component in world coordinates - // aZ - instance's Z position component in world coordinates - // Return Value: - // The newly created asset instance (Example: BrushObject*) - // See Also: - // MoveInstanceInViewport() - virtual void* CreateInstanceInViewport(float aX, float aY, float aZ) = 0; - // Description: - // When the mouse button is released after level object creation, the user now can move the mouse - // and move the asset instance in the 3D world - // Arguments: - // pDraggedObject - the actual entity or brush object (CBaseObject* usually) to be moved around with the mouse - // returned by the CreateInstanceInViewport() - // aNewX - the new X world coordinates of the asset instance - // aNewY - the new Y world coordinates of the asset instance - // aNewZ - the new Z world coordinates of the asset instance - // Return Value: - // True if asset instance was moved properly - // See Also: - // CreateInstanceInViewport() - virtual bool MoveInstanceInViewport(const void* pDraggedObject, float aNewX, float aNewY, float aNewZ) = 0; - // Description: - // This will be called when the user presses ESCAPE key when dragging the asset in the viewport, you must delete the given object - // because the creation was aborted - // Arguments: - // pDraggedObject - the asset instance to be deleted ( you must cast to the needed type, and delete it properly ) - // See Also: - // CreateInstanceInViewport() - virtual void AbortCreateInstanceInViewport(const void* pDraggedObject) = 0; - // Description: - // This method is used to cache/load asset's data, so it can be previewed/rendered - // Return Value: - // True if the asset was successfully cached - // See Also: - // UnCache() - virtual bool Cache() = 0; - // Description: - // This method is used to force cache/load asset's data, so it can be previewed/rendered - // Return Value: - // True if the asset was successfully forced cached - // See Also: - // UnCache(), Cache() - virtual bool ForceCache() = 0; - // Description: - // This method is used to load the thumbnail image of the asset - // Return Value: - // True if thumb loaded ok - // See Also: - // UnloadThumbnail() - virtual bool LoadThumbnail() = 0; - // Description: - // This method is used to unload the thumbnail image of the asset - // See Also: - // LoadThumbnail() - virtual void UnloadThumbnail() = 0; - // Description: - // This is called when the asset starts to be previewed in full detail, so here you can load the whole asset, in fine detail - // ( textures are fully loaded, models etc. ). It is called once, when the Preview dialog is shown - // Arguments: - // hPreviewWnd - the window handle of the quick preview dialog - // hMemDC - the memory DC used to render assets that can render themselves in the DC, otherwise they will render in the dialog's HWND - // See Also: - // OnEndPreview(), GetCustomPreviewPanelHeader() - virtual void OnBeginPreview(QWidget* hPreviewWnd) = 0; - // Description: - // Called when the Preview dialog is closed, you may release the detail asset data here - // See Also: - // OnBeginPreview(), GetCustomPreviewPanelHeader() - virtual void OnEndPreview() = 0; - // Description: - // If the asset has a special preview panel with utility controls, to be placed at the top of the Preview window, it can return an child dialog window - // otherwise it can return nullptr, if no panel is available - // Arguments: - // pParentWnd - a valid CDialog*, or nullptr - // Return Value: - // A valid child dialog window handle, if this asset wants to have a custom panel in the top side of the Asset Preview window, - // otherwise it can return nullptr, if no panel is available - // See Also: - // OnBeginPreview(), OnEndPreview() - virtual QWidget* GetCustomPreviewPanelHeader(QWidget* pParentWnd) = 0; - virtual QWidget* GetCustomPreviewPanelFooter(QWidget* pParentWnd) = 0; - // Description: - // Used when dragging/rotate/zoom a model, or other asset that can support preview - // Arguments: - // hRenderWindow - the rendering window handle - // rstViewport - the viewport rectangle - // aMouseX - the render window relative mouse pointer X coordinate - // aMouseY - the render window relative mouse pointer Y coordinate - // aMouseDeltaX - the X coordinate delta between two mouse movements - // aMouseDeltaY - the Y coordinate delta between two mouse movements - // aMouseWheelDelta - the mouse wheel scroll delta/step - // aKeyFlags - the key flags, see WM_LBUTTONUP - // See Also: - // OnPreviewRenderKeyEvent() - virtual void PreviewRender( - QWidget* hRenderWindow, - const QRect& rstViewport, - int aMouseX = 0, int aMouseY = 0, - int aMouseDeltaX = 0, int aMouseDeltaY = 0, - int aMouseWheelDelta = 0, UINT aKeyFlags = 0) = 0; - // Description: - // This is called when the user manipulates the assets in interactive render and a key is pressed ( with down or up state ) - // Arguments: - // bKeyDown - true if this is a WM_KEYDOWN event, else it is a WM_KEYUP event - // aChar - the char/key code pressed/released - // aKeyFlags - the key flags, compatible with WM_KEYDOWN/UP events - // See Also: - // InteractiveRender() - virtual void OnPreviewRenderKeyEvent(bool bKeyDown, UINT aChar, UINT aKeyFlags) = 0; - // Description: - // Called when user clicked once on the thumb image - // Arguments: - // point - mouse coordinates relative to the thumbnail rectangle - // aKeyFlags - the key flags, see WM_LBUTTONDOWN - // See Also: - // OnThumbDblClick() - virtual void OnThumbClick(const QPoint& point, Qt::MouseButtons buttons, Qt::KeyboardModifiers modifiers) = 0; - // Description: - // Called when user double clicked on the thumb image - // Arguments: - // point - mouse coordinates relative to the thumbnail rectangle - // aKeyFlags - the key flags, see WM_LBUTTONDOWN - // See Also: - // OnThumbClick() - //! called when user clicked twice on the thumb image - virtual void OnThumbDblClick(const QPoint& point, Qt::MouseButtons buttons, Qt::KeyboardModifiers modifiers) = 0; - // Description: - // Draw the cached thumb bitmap only, if any, no other kind of rendering - // Arguments: - // hDC - the destination DC, where to draw the thumb - // rRect - the destination rectangle - // Return Value: - // True if drawing of the thumbnail was done OK - // See Also: - // Render() - virtual bool DrawThumbImage(QPainter* painter, const QRect& rRect) = 0; - // Description: - // Writes asset info to a XML node. - // This is needed to save cached info as a persistent XML file for the next run of the editor. - // Arguments: - // node - An XML node to contain the info - // See Also: - // FromXML() - virtual void ToXML(XmlNodeRef& node) const = 0; - // Description: - // Gets asset info from a XML node. - // This is needed to get the asset info from previous runs of the editor without re-caching it. - // Arguments: - // node - An XML node that contains info for this asset - // See Also: - // ToXML() - virtual void FromXML(const XmlNodeRef& node) = 0; - - // From IUnknown - virtual HRESULT STDMETHODCALLTYPE QueryInterface([[maybe_unused]] const IID& riid, [[maybe_unused]] void** ppvObject) - { - return E_NOINTERFACE; - }; - virtual ULONG STDMETHODCALLTYPE AddRef() - { - return 0; - }; - virtual ULONG STDMETHODCALLTYPE Release() - { - return 0; - }; -}; -#endif // CRYINCLUDE_EDITOR_INCLUDE_IASSETITEM_H diff --git a/Code/Editor/Include/IAssetItemDatabase.h b/Code/Editor/Include/IAssetItemDatabase.h deleted file mode 100644 index 39fd60e8c6..0000000000 --- a/Code/Editor/Include/IAssetItemDatabase.h +++ /dev/null @@ -1,259 +0,0 @@ -/* - * Copyright (c) Contributors to the Open 3D Engine Project. - * For complete copyright and license terms please see the LICENSE at the root of this distribution. - * - * SPDX-License-Identifier: Apache-2.0 OR MIT - * - */ - - -// Description : Standard interface for asset database creators used to -// create an asset plugin for the asset browser -// The category of the plugin must be Asset Item DB - - -#ifndef CRYINCLUDE_EDITOR_INCLUDE_IASSETITEMDATABASE_H -#define CRYINCLUDE_EDITOR_INCLUDE_IASSETITEMDATABASE_H -#pragma once -struct IAssetItem; -struct IAssetViewer; - -class QString; -class QStringList; - -// Description: -// This struct keeps the info, filter and sorting settings for an asset field -struct SAssetField -{ - // the condition for the current filter on the field - enum EAssetFilterCondition - { - eCondition_Any = 0, - // string conditions - // this also supports '*' and '?' as wildcards inside text - eCondition_Contains, - // this filter will search the target for at least one of the words specified - // ( ex: filter: "water car moon" , field value : "the_great_moon.dds", this will pass the test - // it also supports '*' and '?' as wildcards inside words text - eCondition_ContainsOneOfTheWords, - eCondition_StartsWith, - eCondition_EndsWith, - // string & numerical conditions - eCondition_Equal, - eCondition_Greater, - eCondition_Less, - eCondition_GreaterOrEqual, - eCondition_LessOrEqual, - eCondition_Not, - eCondition_InsideRange - }; - - // the asset field type - enum EAssetFieldType - { - eType_None = 0, - eType_Bool, - eType_Int8, - eType_Int16, - eType_Int32, - eType_Int64, - eType_Float, - eType_Double, - eType_String - }; - - // used when a field can have different specific values - typedef QStringList TFieldEnumValues; - - SAssetField( - const char* pFieldName = "", - const char* pDisplayName = "Unnamed field", - EAssetFieldType aFieldType = eType_None, - UINT aColumnWidth = 50, - bool bVisibleInUI = true, - bool bReadOnly = true) - { - m_fieldName = pFieldName; - m_displayName = pDisplayName; - m_fieldType = aFieldType; - m_filterCondition = eCondition_Equal; - m_bUseEnumValues = false; - m_bReadOnly = bReadOnly; - m_listColumnWidth = aColumnWidth; - m_bFieldVisibleInUI = bVisibleInUI; - m_bPostFilter = false; - - SetupEnumValues(); - } - - void SetupEnumValues() - { - m_bUseEnumValues = true; - - if (m_fieldType == eType_Bool) - { - m_enumValues.clear(); - m_enumValues.push_back("Yes"); - m_enumValues.push_back("No"); - } - } - - // the field's display name, used in UI - QString m_displayName, - // the field internal name, used in C++ code - m_fieldName, - // the current filter value, if its empty "" then no filter is applied - m_filterValue, - // the field's max value, valid when the field's filter condition is eAssertFilterCondition_InsideRange - m_maxFilterValue, - // the name of the database holding this field, used in Asset Browser preset editor, if its "" then the field - // is common to all current databases - m_parentDatabaseName; - // is this field visible in the UI ? - bool m_bFieldVisibleInUI, - // if true, then you cannot modify this field of an asset item, only use it - m_bReadOnly, - // this field filter is applied after the other filters - m_bPostFilter; - // the field data type - EAssetFieldType m_fieldType; - // the filter's condition - EAssetFilterCondition m_filterCondition; - // use the enum list values to choose a value for the field ? - bool m_bUseEnumValues; - // this map is used when asset field has m_bUseEnumValues on true, - // choose a value for the field from this list in the UI - TFieldEnumValues m_enumValues; - // recommended list column width - unsigned int m_listColumnWidth; -}; - -struct SFieldFiltersPreset -{ - QString presetName2; - QStringList checkedDatabaseNames; - bool bUsedInLevel; - std::vector fields; -}; - -// Description: -// This interface allows the programmer to extend asset display types -// visible in the asset browser. -struct IAssetItemDatabase - : public IUnknown -{ - DEFINE_UUID(0xFB09B039, 0x1D9D, 0x4057, 0xA5, 0xF0, 0xAA, 0x3C, 0x7B, 0x97, 0xAE, 0xA8) - - typedef std::vector TAssetFields; - typedef std::map < QString/*field name*/, SAssetField > TAssetFieldFiltersMap; - typedef std::map < QString/*asset filename*/, IAssetItem* > TFilenameAssetMap; - typedef AZStd::function MetaDataChangeListener; - - // Description: - // Refresh the database by scanning the folders/paks for files, does not load the files, only filename and filesize are fetched - virtual void Refresh() = 0; - // Description: - // Fills the asset meta data from the loaded xml meta data DB. - // Arguments: - // db - the database XML node from where to cache the info - virtual void PrecacheFieldsInfoFromFileDB(const XmlNodeRef& db) = 0; - // Description: - // Return all assets loaded/scanned by this database - // Return Value: - // The assets map reference (filename-asset) - virtual TFilenameAssetMap& GetAssets() = 0; - // Description: - // Get an asset item by its filename - // Return Value: - // A single asset from the database given the filename - virtual IAssetItem* GetAsset(const char* pAssetFilename) = 0; - // Description: - // Return the asset fields this database's items support - // Return Value: - // The asset fields vector reference - virtual TAssetFields& GetAssetFields() = 0; - // Description: - // Return an asset field object pointer by the field internal name - // Arguments: - // pFieldName - the internal field's name (ex: "filename", "relativepath") - // Return Value: - // The asset field object pointer - virtual SAssetField* GetAssetFieldByName(const char* pFieldName) = 0; - // Description: - // Get the database name - // Return Value: - // Returns the database name, ex: "Textures" - virtual const char* GetDatabaseName() const = 0; - // Description: - // Get the database supported file name extension(s) - // Return Value: - // Returns the supported extensions, separated by comma, ex: "tga,bmp,dds" - virtual const char* GetSupportedExtensions() const = 0; - // Description: - // Free the database internal data structures - virtual void FreeData() = 0; - // Description: - // Apply filters to this database which will set/unset the IAssetItem::eAssetFlag_Visible of each asset, based - // on the given field filters - // Arguments: - // rFieldFilters - a reference to the field filters map (fieldname-field) - // See Also: - // ClearFilters() - virtual void ApplyFilters(const TAssetFieldFiltersMap& rFieldFilters) = 0; - // Description: - // Clear the current filters, by setting the IAssetItem::eAssetFlag_Visible of each asset to true - // See Also: - // ApplyFilters() - virtual void ClearFilters() = 0; - virtual QWidget* CreateDbFilterDialog(QWidget* pParent, IAssetViewer* pViewerCtrl) = 0; - virtual void UpdateDbFilterDialogUI(QWidget* pDlg) = 0; - virtual void OnAssetBrowserOpen() = 0; - virtual void OnAssetBrowserClose() = 0; - // Description: - // Gets the filename for saving new cached asset info. - // Return Value: - // A file name to save new transactions to the persistent asset info DB - // See Also: - // CAssetInfoFileDB, IAssetItem::ToXML(), IAssetItem::FromXML() - virtual const char* GetTransactionFilename() const = 0; - // Description: - // Adds a callback to be called when the meta data of this asset changed. - // Arguments: - // callBack - A functor to be added - // Return Value: - // True if successful, false otherwise. - // See Also: - // RemoveMetaDataChangeListener() - virtual bool AddMetaDataChangeListener(MetaDataChangeListener callBack) = 0; - // Description: - // Removes a callback from the list of meta data change listeners. - // Arguments: - // callBack - A functor to be removed - // Return Value: - // True if successful, false otherwise. - // See Also: - // AddMetaDataCHangeListener() - virtual bool RemoveMetaDataChangeListener(MetaDataChangeListener callBack) = 0; - // Description: - // The method that should be called when the meta data of an asset item changes to notify all listeners - // Arguments: - // pAssetItem - An asset item whose meta data have changed - // See Also: - // AddMetaDataCHangeListener(), RemoveMetaDataChangeListener() - virtual void OnMetaDataChange(const IAssetItem* pAssetItem) = 0; - - //! from IUnknown - virtual HRESULT STDMETHODCALLTYPE QueryInterface([[maybe_unused]] REFIID riid, [[maybe_unused]] void** ppvObject) - { - return E_NOINTERFACE; - }; - virtual ULONG STDMETHODCALLTYPE AddRef() - { - return 0; - }; - virtual ULONG STDMETHODCALLTYPE Release() - { - return 0; - }; -}; -#endif // CRYINCLUDE_EDITOR_INCLUDE_IASSETITEMDATABASE_H diff --git a/Code/Editor/Include/IAssetViewer.h b/Code/Editor/Include/IAssetViewer.h deleted file mode 100644 index 488ee8e508..0000000000 --- a/Code/Editor/Include/IAssetViewer.h +++ /dev/null @@ -1,46 +0,0 @@ -/* - * Copyright (c) Contributors to the Open 3D Engine Project. - * For complete copyright and license terms please see the LICENSE at the root of this distribution. - * - * SPDX-License-Identifier: Apache-2.0 OR MIT - * - */ - - -// Description : This file declares a control which objective is to display -// multiple assets allowing selection and preview of such things -// It also handles scrolling and changes in the thumbnail display size - - -#ifndef CRYINCLUDE_EDITOR_INCLUDE_IASSETVIEWER_H -#define CRYINCLUDE_EDITOR_INCLUDE_IASSETVIEWER_H -#pragma once -#include "IObservable.h" -#include "IAssetItemDatabase.h" - -struct IAssetItem; -struct IAssetItemDatabase; - -// Description: -// Observer for the asset viewer events -struct IAssetViewerObserver -{ - virtual void OnChangeStatusBarInfo(UINT nSelectedItems, UINT nVisibleItems, UINT nTotalItems) {}; - virtual void OnSelectionChanged() {}; - virtual void OnChangedPreviewedAsset(IAssetItem* pAsset) {}; - virtual void OnAssetDblClick(IAssetItem* pAsset) {}; - virtual void OnAssetFilterChanged() {}; -}; - -// Description: -// The asset viewer interface for the asset database plugins to use -struct IAssetViewer -{ - DEFINE_OBSERVABLE_PURE_METHODS(IAssetViewerObserver); - - virtual HWND GetRenderWindow() = 0; - virtual void ApplyFilters(const IAssetItemDatabase::TAssetFieldFiltersMap& rFieldFilters) = 0; - virtual const IAssetItemDatabase::TAssetFieldFiltersMap& GetCurrentFilters() = 0; - virtual void ClearFilters() = 0; -}; -#endif // CRYINCLUDE_EDITOR_INCLUDE_IASSETVIEWER_H diff --git a/Code/Editor/Include/IBaseLibraryManager.h b/Code/Editor/Include/IBaseLibraryManager.h deleted file mode 100644 index 4116b573fa..0000000000 --- a/Code/Editor/Include/IBaseLibraryManager.h +++ /dev/null @@ -1,143 +0,0 @@ -/* - * Copyright (c) Contributors to the Open 3D Engine Project. - * For complete copyright and license terms please see the LICENSE at the root of this distribution. - * - * SPDX-License-Identifier: Apache-2.0 OR MIT - * - */ -#ifndef CRYINCLUDE_EDITOR_INCLUDE_IBASELIBRARYMANAGER_H -#define CRYINCLUDE_EDITOR_INCLUDE_IBASELIBRARYMANAGER_H -#pragma once - -#include -#include "Include/IDataBaseItem.h" -#include "Include/IDataBaseLibrary.h" -#include "Include/IDataBaseManager.h" -#include "Util/TRefCountBase.h" - -class CBaseLibraryItem; -class CBaseLibrary; - -struct IBaseLibraryManager - : public TRefCountBase - , public IEditorNotifyListener -{ - //! Clear all libraries. - virtual void ClearAll() = 0; - - ////////////////////////////////////////////////////////////////////////// - // IDocListener implementation. - ////////////////////////////////////////////////////////////////////////// - virtual void OnEditorNotifyEvent(EEditorNotifyEvent event) = 0; - - ////////////////////////////////////////////////////////////////////////// - // Library items. - ////////////////////////////////////////////////////////////////////////// - //! Make a new item in specified library. - virtual IDataBaseItem* CreateItem(IDataBaseLibrary* pLibrary) = 0; - //! Delete item from library and manager. - virtual void DeleteItem(IDataBaseItem* pItem) = 0; - - //! Find Item by its GUID. - virtual IDataBaseItem* FindItem(REFGUID guid) const = 0; - virtual IDataBaseItem* FindItemByName(const QString& fullItemName) = 0; - virtual IDataBaseItem* LoadItemByName(const QString& fullItemName) = 0; - - virtual IDataBaseItemEnumerator* GetItemEnumerator() = 0; - - ////////////////////////////////////////////////////////////////////////// - // Set item currently selected. - virtual void SetSelectedItem(IDataBaseItem* pItem) = 0; - // Get currently selected item. - virtual IDataBaseItem* GetSelectedItem() const = 0; - virtual IDataBaseItem* GetSelectedParentItem() const = 0; - - ////////////////////////////////////////////////////////////////////////// - // Libraries. - ////////////////////////////////////////////////////////////////////////// - //! Add Item library. - virtual IDataBaseLibrary* AddLibrary(const QString& library, bool isLevelLibrary = false, bool bIsLoading = true) = 0; - virtual void DeleteLibrary(const QString& library, bool forceDeleteLevel = false) = 0; - //! Get number of libraries. - virtual int GetLibraryCount() const = 0; - //! Get number of modified libraries. - virtual int GetModifiedLibraryCount() const = 0; - - //! Get Item library by index. - virtual IDataBaseLibrary* GetLibrary(int index) const = 0; - - //! Get Level Item library. - virtual IDataBaseLibrary* GetLevelLibrary() const = 0; - - //! Find Items Library by name. - virtual IDataBaseLibrary* FindLibrary(const QString& library) = 0; - - //! Find the Library's index by name. - virtual int FindLibraryIndex(const QString& library) = 0; - - //! Load Items library. -#ifdef LoadLibrary -#undef LoadLibrary -#endif - virtual IDataBaseLibrary* LoadLibrary(const QString& filename, bool bReload = false) = 0; - - //! Save all modified libraries. - virtual void SaveAllLibs() = 0; - - //! Serialize property manager. - virtual void Serialize(XmlNodeRef& node, bool bLoading) = 0; - - //! Export items to game. - virtual void Export(XmlNodeRef& node) = 0; - - //! Returns unique name base on input name. - // Vera@conffx, add LibName parameter so we could make an unique name depends on input library. - // Arguments: - // - name: name of the item - // - libName: The library of the item. Given the library name, the function will return a unique name in the library - // Default value "": The function will ignore the library name and return a unique name in the manager - virtual QString MakeUniqueItemName(const QString& name, const QString& libName = "") = 0; - virtual QString MakeFullItemName(IDataBaseLibrary* pLibrary, const QString& group, const QString& itemName) = 0; - - //! Root node where this library will be saved. - virtual QString GetRootNodeName() = 0; - //! Path to libraries in this manager. - virtual QString GetLibsPath() = 0; - - ////////////////////////////////////////////////////////////////////////// - //! Validate library items for errors. - virtual void Validate() = 0; - - ////////////////////////////////////////////////////////////////////////// - virtual void GatherUsedResources(CUsedResources& resources) = 0; - - virtual void AddListener(IDataBaseManagerListener* pListener) = 0; - virtual void RemoveListener(IDataBaseManagerListener* pListener) = 0; - - ////////////////////////////////////////////////////////////////////////// - virtual void RegisterItem(CBaseLibraryItem* pItem, REFGUID newGuid) = 0; - virtual void RegisterItem(CBaseLibraryItem* pItem) = 0; - virtual void UnregisterItem(CBaseLibraryItem* pItem) = 0; - - // Only Used internally. - virtual void OnRenameItem(CBaseLibraryItem* pItem, const QString& oldName) = 0; - - // Called by items to indicated that they have been modified. - // Sends item changed event to listeners. - virtual void OnItemChanged(IDataBaseItem* pItem) = 0; - virtual void OnUpdateProperties(IDataBaseItem* pItem, bool bRefresh) = 0; - - //CONFETTI BEGIN - // Used to change the library item order - virtual void ChangeLibraryOrder(IDataBaseLibrary* lib, unsigned int newLocation) = 0; - // simplifies the library renaming process - virtual bool SetLibraryName(CBaseLibrary* lib, const QString& name) = 0; - - - //Check if the file name is unique. - //Params: library: library name. NOT the file path. - virtual bool IsUniqueFilename(const QString& library) = 0; - //CONFETTI END -}; - -#endif // CRYINCLUDE_EDITOR_INCLUDE_IBASELIBRARYMANAGER_H diff --git a/Code/Editor/Include/IConsoleConnectivity.h b/Code/Editor/Include/IConsoleConnectivity.h deleted file mode 100644 index 0f5e9bf35c..0000000000 --- a/Code/Editor/Include/IConsoleConnectivity.h +++ /dev/null @@ -1,85 +0,0 @@ -/* - * Copyright (c) Contributors to the Open 3D Engine Project. - * For complete copyright and license terms please see the LICENSE at the root of this distribution. - * - * SPDX-License-Identifier: Apache-2.0 OR MIT - * - */ - - -// Description : Standard interface for console connectivity plugins. - - -#ifndef CRYINCLUDE_EDITOR_INCLUDE_ICONSOLECONNECTIVITY_H -#define CRYINCLUDE_EDITOR_INCLUDE_ICONSOLECONNECTIVITY_H -#pragma once - - -////////////////////////////////////////////////////////////////////////// -// Description -// This interface provide access to the console connectivity -// functionality. -////////////////////////////////////////////////////////////////////////// -struct IConsoleConnectivity - : public IUnknown -{ - DEFINE_UUID(0x4DAA85E1, 0x8498, 0x402f, 0x9B, 0x85, 0x7F, 0x62, 0x9D, 0x76, 0x79, 0x8A); - - ////////////////////////////////////////////////////////////////////////// - //TODO: Must add the useful interface here. - ////////////////////////////////////////////////////////////////////////// - - // Description: - // Checks if a development console is connected to the development PC. - // See Also: - // Arguments: - // Nothing - // Return: - // bool - true if it is connected, false otherwise. - virtual bool IsConnectedToConsole() = 0; - - // Description: - // Send a file from the specified local filename to the console platform creating the full path - // as required so it can copy to the remote filename. - // See Also: - // Nothing - // Arguments: - // szLocalFileName - is the local filename from which you want to copy the file. - // szRemoteFilename - is the full path and filename to where you want to copy the file. - // Return: - // bool - true if the copy succeeded, false otherwise. - virtual bool SendFile(const char* szLocalFileName, const char* szRemoteFilename) = 0; - - // Description: - // Notifies to the console that a file has been changed, typically uploaded. - // This will be usually called after a SendFile (see above) call, so that the - // system running on the console may decide what to do with this new file. - // Typically the system will have to load or reloads this new file. - // See Also: - // SendFile - // Arguments: - // szRemoteFilename - is the full path and filename in the console of the changed - // file. - // Return: - // bool - true if succeeded sending the notification, false otherwise. - virtual bool NotifyFileChange(const char* szRemoteFilename) = 0; - - - // Description: - // Gets the the title IP for the connected console . - // Arguments: - // dwConsoleAddressPlaceholder - is the pointer to the placeholder of the variable - // which will contain the title IP of the console. - // Return: - // bool - true if dwConsoleAddressPlaceholder now contains the IP address, else false. - virtual bool GetConsoleAddress(DWORD* dwConsoleAddressPlaceholder) = 0; - ////////////////////////////////////////////////////////////////////////// - // IUnknown - ////////////////////////////////////////////////////////////////////////// - virtual HRESULT STDMETHODCALLTYPE QueryInterface(REFIID riid, void** ppvObject) { return E_NOINTERFACE; }; - virtual ULONG STDMETHODCALLTYPE AddRef() { return 0; }; - virtual ULONG STDMETHODCALLTYPE Release() { return 0; }; - ////////////////////////////////////////////////////////////////////////// -}; - -#endif // CRYINCLUDE_EDITOR_INCLUDE_ICONSOLECONNECTIVITY_H diff --git a/Code/Editor/Include/IDataBaseItem.h b/Code/Editor/Include/IDataBaseItem.h deleted file mode 100644 index 6be5f49c2d..0000000000 --- a/Code/Editor/Include/IDataBaseItem.h +++ /dev/null @@ -1,92 +0,0 @@ -/* - * Copyright (c) Contributors to the Open 3D Engine Project. - * For complete copyright and license terms please see the LICENSE at the root of this distribution. - * - * SPDX-License-Identifier: Apache-2.0 OR MIT - * - */ - - -#ifndef CRYINCLUDE_EDITOR_INCLUDE_IDATABASEITEM_H -#define CRYINCLUDE_EDITOR_INCLUDE_IDATABASEITEM_H -#pragma once - -#include -#include - -struct IDataBaseLibrary; -class CUsedResources; - -////////////////////////////////////////////////////////////////////////// -/** Base class for all items contained in BaseLibraray. -*/ -struct IDataBaseItem -{ - struct SerializeContext - { - XmlNodeRef node; - bool bUndo; - bool bLoading; - bool bCopyPaste; - bool bIgnoreChilds; - bool bUniqName; - SerializeContext() - : node(0) - , bLoading(false) - , bCopyPaste(false) - , bIgnoreChilds(false) - , bUniqName(false) - , bUndo(false) {}; - SerializeContext(XmlNodeRef _node, bool bLoad) - : node(_node) - , bLoading(bLoad) - , bCopyPaste(false) - , bIgnoreChilds(false) - , bUniqName(false) - , bUndo(false) {}; - SerializeContext(const SerializeContext& ctx) - : node(ctx.node) - , bLoading(ctx.bLoading) - , bCopyPaste(ctx.bCopyPaste) - , bIgnoreChilds(ctx.bIgnoreChilds) - , bUniqName(ctx.bUniqName) - , bUndo(ctx.bUndo) {}; - }; - - virtual EDataBaseItemType GetType() const = 0; - - //! Return Library this item are contained in. - //! Item can only be at one library. - virtual IDataBaseLibrary* GetLibrary() const = 0; - - //! Change item name. - virtual void SetName(const QString& name) = 0; - //! Get item name. - virtual const QString& GetName() const = 0; - - //! Get full item name, including name of library. - //! Name formed by adding dot after name of library - //! eg. library Pickup and item PickupRL form full item name: "Pickups.PickupRL". - virtual QString GetFullName() const = 0; - - //! Get only nameof group from prototype. - virtual QString GetGroupName() = 0; - //! Get short name of prototype without group. - virtual QString GetShortName() = 0; - - //! Serialize library item to archive. - virtual void Serialize(SerializeContext& ctx) = 0; - - //! Generate new unique id for this item. - virtual void GenerateId() = 0; - //! Returns GUID of this material. - virtual const GUID& GetGUID() const = 0; - - //! Validate item for errors. - virtual void Validate() {}; - - //! Gathers resources by this item. - virtual void GatherUsedResources([[maybe_unused]] CUsedResources& resources) {}; -}; - -#endif // CRYINCLUDE_EDITOR_INCLUDE_IDATABASEITEM_H diff --git a/Code/Editor/Include/IDataBaseLibrary.h b/Code/Editor/Include/IDataBaseLibrary.h deleted file mode 100644 index 75437d93e2..0000000000 --- a/Code/Editor/Include/IDataBaseLibrary.h +++ /dev/null @@ -1,118 +0,0 @@ -/* - * Copyright (c) Contributors to the Open 3D Engine Project. - * For complete copyright and license terms please see the LICENSE at the root of this distribution. - * - * SPDX-License-Identifier: Apache-2.0 OR MIT - * - */ - - -#ifndef CRYINCLUDE_EDITOR_INCLUDE_IDATABASELIBRARY_H -#define CRYINCLUDE_EDITOR_INCLUDE_IDATABASELIBRARY_H -#pragma once - - -struct IDataBaseManager; -struct IDataBaseItem; - -class QString; -class XmlNodeRef; - -////////////////////////////////////////////////////////////////////////// -// Description: -// Interface to access specific library of editor data base. -// Ex. Archetype library, Material Library. -// See Also: -// IDataBaseItem,IDataBaseManager -////////////////////////////////////////////////////////////////////////// -struct IDataBaseLibrary -{ - // Description: - // Return IDataBaseManager interface to the manager for items stored in this library. - virtual IDataBaseManager* GetManager() = 0; - - // Description: - // Return library name. - virtual const QString& GetName() const = 0; - - // Description: - // Return filename where this library is stored. - virtual const QString& GetFilename() const = 0; - - // Description: - // Save contents of library to file. - virtual bool Save() = 0; - - // Description: - // Load library from file. - // Arguments: - // filename - Full specified library filename (relative to root game folder). - virtual bool Load(const QString& filename) = 0; - - // Description: - // Serialize library parameters and items to/from XML node. - virtual void Serialize(XmlNodeRef& node, bool bLoading) = 0; - - // Description: - // Marks library as modified, indicates that some item in library was modified. - virtual void SetModified(bool bModified = true) = 0; - - // Description: - // Check if library parameters or any items where modified. - // If any item was modified library may need saving before closing editor. - virtual bool IsModified() const = 0; - - // Description: - // Check if this library is not shared and internal to current level. - virtual bool IsLevelLibrary() const = 0; - - // Description: - // Make this library accessible only from current Level. (not shared) - virtual void SetLevelLibrary(bool bEnable) = 0; - - // Description: - // Associate a new item with the library. - // Watch out if item was already in another library. - virtual void AddItem(IDataBaseItem* pItem, bool bRegister = true) = 0; - - // Description: - // Return number of items in library. - virtual int GetItemCount() const = 0; - - // Description: - // Get item by index. - // See Also: - // GetItemCount - // Arguments: - // index - Index from 0 to GetItemCount() - virtual IDataBaseItem* GetItem(int index) = 0; - - // Description: - // Remove item from library, does not destroy item, - // only unliks it from this library, to delete item use IDataBaseManager. - // See Also: - // AddItem - virtual void RemoveItem(IDataBaseItem* item) = 0; - - // Description: - // Remove all items from library, does not destroy items, - // only unliks them from this library, to delete item use IDataBaseManager. - // See Also: - // RemoveItem,AddItem - virtual void RemoveAllItems() = 0; - - // Description: - // Find item in library by name. - // This function usually uses linear search so it is not particularry fast. - // See Also: - // GetItem - virtual IDataBaseItem* FindItem(const QString& name) = 0; - - - //CONFETTI BEGIN - // Used to change the library item order - virtual void ChangeItemOrder(CBaseLibraryItem* item, unsigned int newLocation) = 0; - //CONFETTI END -}; - -#endif // CRYINCLUDE_EDITOR_INCLUDE_IDATABASELIBRARY_H diff --git a/Code/Editor/Include/IDataBaseManager.h b/Code/Editor/Include/IDataBaseManager.h deleted file mode 100644 index 3d701d51fc..0000000000 --- a/Code/Editor/Include/IDataBaseManager.h +++ /dev/null @@ -1,134 +0,0 @@ -/* - * Copyright (c) Contributors to the Open 3D Engine Project. - * For complete copyright and license terms please see the LICENSE at the root of this distribution. - * - * SPDX-License-Identifier: Apache-2.0 OR MIT - * - */ - - -#ifndef CRYINCLUDE_EDITOR_INCLUDE_IDATABASEMANAGER_H -#define CRYINCLUDE_EDITOR_INCLUDE_IDATABASEMANAGER_H -#pragma once - -#include - -struct IDataBaseItem; -struct IDataBaseLibrary; -class CUsedResources; - -enum EDataBaseItemEvent -{ - EDB_ITEM_EVENT_ADD, - EDB_ITEM_EVENT_DELETE, - EDB_ITEM_EVENT_CHANGED, - EDB_ITEM_EVENT_SELECTED, - EDB_ITEM_EVENT_UPDATE_PROPERTIES, - EDB_ITEM_EVENT_UPDATE_PROPERTIES_NO_EDITOR_REFRESH -}; - -////////////////////////////////////////////////////////////////////////// -// Description: -// Callback class to intercept item creation and deletion events. -////////////////////////////////////////////////////////////////////////// -struct IDataBaseManagerListener -{ - virtual void OnDataBaseItemEvent(IDataBaseItem* pItem, EDataBaseItemEvent event) = 0; -}; - -////////////////////////////////////////////////////////////////////////// -// Description: -// his interface is used to enumerate al items registered to the database manager. -////////////////////////////////////////////////////////////////////////// -struct IDataBaseItemEnumerator -{ - virtual ~IDataBaseItemEnumerator() = default; - - virtual void Release() = 0; - virtual IDataBaseItem* GetFirst() = 0; - virtual IDataBaseItem* GetNext() = 0; -}; - -////////////////////////////////////////////////////////////////////////// -// -// Interface to the collection of all items or specific type -// in data base libraries. -// -////////////////////////////////////////////////////////////////////////// -struct IDataBaseManager -{ - //! Clear all libraries. - virtual void ClearAll() = 0; - - ////////////////////////////////////////////////////////////////////////// - // Library items. - ////////////////////////////////////////////////////////////////////////// - //! Make a new item in specified library. - virtual IDataBaseItem* CreateItem(IDataBaseLibrary* pLibrary) = 0; - //! Delete item from library and manager. - virtual void DeleteItem(IDataBaseItem* pItem) = 0; - - //! Find Item by its GUID. - virtual IDataBaseItem* FindItem(REFGUID guid) const = 0; - virtual IDataBaseItem* FindItemByName(const QString& fullItemName) = 0; - - virtual IDataBaseItemEnumerator* GetItemEnumerator() = 0; - - // Select one item in DB. - virtual void SetSelectedItem(IDataBaseItem* pItem) = 0; - - ////////////////////////////////////////////////////////////////////////// - // Libraries. - ////////////////////////////////////////////////////////////////////////// - //! Add Item library. Set isLevelLibrary to true if its the "level" library which gets saved inside the level - virtual IDataBaseLibrary* AddLibrary(const QString& library, bool isLevelLibrary = false, bool bIsLoading = true) = 0; - virtual void DeleteLibrary(const QString& library, bool forceDeleteLibrary = false) = 0; - //! Get number of libraries. - virtual int GetLibraryCount() const = 0; - //! Get Item library by index. - virtual IDataBaseLibrary* GetLibrary(int index) const = 0; - - //! Find Items Library by name. - virtual IDataBaseLibrary* FindLibrary(const QString& library) = 0; - - //! Load Items library. -#ifdef LoadLibrary -#undef LoadLibrary -#endif - virtual IDataBaseLibrary* LoadLibrary(const QString& filename, bool bReload = false) = 0; - - //! Save all modified libraries. - virtual void SaveAllLibs() = 0; - - //! Serialize property manager. - virtual void Serialize(XmlNodeRef& node, bool bLoading) = 0; - - //! Export items to game. - virtual void Export([[maybe_unused]] XmlNodeRef& node) {}; - - //! Returns unique name base on input name. - virtual QString MakeUniqueItemName(const QString& name, const QString& libName = "") = 0; - virtual QString MakeFullItemName(IDataBaseLibrary* pLibrary, const QString& group, const QString& itemName) = 0; - - //! Root node where this library will be saved. - virtual QString GetRootNodeName() = 0; - //! Path to libraries in this manager. - virtual QString GetLibsPath() = 0; - - ////////////////////////////////////////////////////////////////////////// - //! Validate library items for errors. - virtual void Validate() = 0; - - // Description: - // Collects names of all resource files used by managed items. - // Arguments: - // resources - Structure where all filenames are collected. - virtual void GatherUsedResources(CUsedResources& resources) = 0; - - ////////////////////////////////////////////////////////////////////////// - // Register listeners. - virtual void AddListener(IDataBaseManagerListener* pListener) = 0; - virtual void RemoveListener(IDataBaseManagerListener* pListener) = 0; -}; - -#endif // CRYINCLUDE_EDITOR_INCLUDE_IDATABASEMANAGER_H diff --git a/Code/Editor/Include/IDisplayViewport.h b/Code/Editor/Include/IDisplayViewport.h index c7dff33e50..2dab2802c7 100644 --- a/Code/Editor/Include/IDisplayViewport.h +++ b/Code/Editor/Include/IDisplayViewport.h @@ -6,15 +6,11 @@ * */ - -#ifndef CRYINCLUDE_EDITOR_INCLUDE_IDISPLAYVIEWPORT_H -#define CRYINCLUDE_EDITOR_INCLUDE_IDISPLAYVIEWPORT_H #pragma once struct DisplayContext; class CBaseObjectsCache; class QPoint; -class CCamera; struct AABB; class CViewport; @@ -23,8 +19,6 @@ struct IDisplayViewport { virtual void Update() = 0; virtual float GetScreenScaleFactor(const Vec3& position) const = 0; - virtual float GetScreenScaleFactor(const CCamera& camera, const Vec3& object_position) = 0; - virtual bool HitTestLine(const Vec3& lineP1, const Vec3& lineP2, const QPoint& hitpoint, int pixelRadius, float* pToCameraDistance = 0) const = 0; /** * Gets the distance of the point on screen to the line defined by the two points, converted to screenspace. @@ -47,16 +41,12 @@ struct IDisplayViewport virtual const Matrix34& GetViewTM() const = 0; virtual const Matrix34& GetScreenTM() const = 0; virtual QPoint WorldToView(const Vec3& worldPoint) const = 0; - virtual QPoint WorldToViewParticleEditor(const Vec3& worldPoint, int width, int height) const = 0; virtual Vec3 WorldToView3D(const Vec3& worldPoint, int flags = 0) const = 0; virtual Vec3 ViewToWorld(const QPoint& vp, bool* collideWithTerrain = nullptr, bool onlyTerrain = false, bool bSkipVegetation = false, bool bTestRenderMesh = false, bool* collideWithObject = nullptr) const = 0; virtual void ViewToWorldRay(const QPoint& vp, Vec3& raySrc, Vec3& rayDir) const = 0; - virtual float GetGridStep() const = 0; virtual void setRay(QPoint& vp, Vec3& raySrc, Vec3& rayDir) = 0; - virtual void setHitcontext(QPoint& vp, Vec3& raySrc, Vec3& rayDir) = 0; virtual float GetAspectRatio() const = 0; - virtual const ::Plane* GetConstructionPlane() const = 0; virtual bool IsBoundsVisible(const AABB& box) const = 0; @@ -65,5 +55,3 @@ struct IDisplayViewport virtual CViewport *asCViewport() { return nullptr; } }; - -#endif // CRYINCLUDE_EDITOR_INCLUDE_IDISPLAYVIEWPORT_H diff --git a/Code/Editor/Include/IEditorClassFactory.h b/Code/Editor/Include/IEditorClassFactory.h index dd47f803e2..6c85192436 100644 --- a/Code/Editor/Include/IEditorClassFactory.h +++ b/Code/Editor/Include/IEditorClassFactory.h @@ -31,10 +31,7 @@ struct IUnknown }; #endif -#ifdef __uuidof -#undef __uuidof -#endif -#define __uuidof(T) T::uuid() +#define __az_uuidof(T) T::uuid() #if defined(AZ_PLATFORM_LINUX) || defined(AZ_PLATFORM_MAC) @@ -107,7 +104,7 @@ struct IClassDesc template HRESULT STDMETHODCALLTYPE QueryInterface(Q** pp) { - return QueryInterface(__uuidof(Q), (void**)pp); + return QueryInterface(__az_uuidof(Q), (void**)pp); } ////////////////////////////////////////////////////////////////////////// diff --git a/Code/Editor/Include/IEditorMaterial.h b/Code/Editor/Include/IEditorMaterial.h deleted file mode 100644 index 329b0ae53f..0000000000 --- a/Code/Editor/Include/IEditorMaterial.h +++ /dev/null @@ -1,20 +0,0 @@ -/* - * Copyright (c) Contributors to the Open 3D Engine Project. - * For complete copyright and license terms please see the LICENSE at the root of this distribution. - * - * SPDX-License-Identifier: Apache-2.0 OR MIT - * - */ -#pragma once - - -#include "BaseLibraryItem.h" -#include - -struct IEditorMaterial - : public CBaseLibraryItem -{ - virtual int GetFlags() const = 0; - virtual IMaterial* GetMatInfo(bool bUseExistingEngineMaterial = false) = 0; - virtual void DisableHighlightForFrame() = 0; -}; diff --git a/Code/Editor/Include/IEditorMaterialManager.h b/Code/Editor/Include/IEditorMaterialManager.h deleted file mode 100644 index d76ec32829..0000000000 --- a/Code/Editor/Include/IEditorMaterialManager.h +++ /dev/null @@ -1,25 +0,0 @@ -/* - * Copyright (c) Contributors to the Open 3D Engine Project. - * For complete copyright and license terms please see the LICENSE at the root of this distribution. - * - * SPDX-License-Identifier: Apache-2.0 OR MIT - * - */ -#ifndef CRYINCLUDE_EDITOR_MATERIAL_IEDITORMATERIALMANAGER_H -#define CRYINCLUDE_EDITOR_MATERIAL_IEDITORMATERIALMANAGER_H -#pragma once - -#define MATERIAL_FILE_EXT ".mtl" -#define DCC_MATERIAL_FILE_EXT ".dccmtl" -#define MATERIALS_PATH "materials/" - -#include -#include - - -struct IEditorMaterialManager -{ - virtual void GotoMaterial(IMaterial* pMaterial) = 0; -}; - -#endif // CRYINCLUDE_EDITOR_MATERIAL_MATERIALMANAGER_H diff --git a/Code/Editor/Include/IErrorReport.h b/Code/Editor/Include/IErrorReport.h index 7bf00d6973..c409dbc7dd 100644 --- a/Code/Editor/Include/IErrorReport.h +++ b/Code/Editor/Include/IErrorReport.h @@ -14,7 +14,6 @@ // forward declarations. class CParticleItem; class CBaseObject; -class CBaseLibraryItem; class CErrorRecord; class QString; @@ -52,9 +51,6 @@ struct IErrorReport //! Assign current Object to which new reported warnings are assigned. virtual void SetCurrentValidatorObject(CBaseObject* pObject) = 0; - //! Assign current Item to which new reported warnings are assigned. - virtual void SetCurrentValidatorItem(CBaseLibraryItem* pItem) = 0; - //! Assign current filename. virtual void SetCurrentFile(const QString& file) = 0; }; diff --git a/Code/Editor/Include/IExportManager.h b/Code/Editor/Include/IExportManager.h index ea802134b6..ce79e52e15 100644 --- a/Code/Editor/Include/IExportManager.h +++ b/Code/Editor/Include/IExportManager.h @@ -8,14 +8,9 @@ // Description : Export geometry interfaces - - -#ifndef CRYINCLUDE_EDITOR_INCLUDE_IEXPORTMANAGER_H -#define CRYINCLUDE_EDITOR_INCLUDE_IEXPORTMANAGER_H #pragma once #define EXP_NAMESIZE 32 -struct IStatObj; enum class AnimParamType; namespace Export @@ -178,18 +173,10 @@ struct IExporter virtual void Release() = 0; }; - - // IExportManager: interface to export manager struct IExportManager { //! Register exporter //! return true if succeed, otherwise false virtual bool RegisterExporter(IExporter* pExporter) = 0; - - virtual bool ExportSingleStatObj(IStatObj* pStatObj, const char* filename) = 0; }; - - - -#endif // CRYINCLUDE_EDITOR_INCLUDE_IEXPORTMANAGER_H diff --git a/Code/Editor/Include/IFacialEditor.h b/Code/Editor/Include/IFacialEditor.h deleted file mode 100644 index 5dfa9ab03f..0000000000 --- a/Code/Editor/Include/IFacialEditor.h +++ /dev/null @@ -1,43 +0,0 @@ -/* - * Copyright (c) Contributors to the Open 3D Engine Project. - * For complete copyright and license terms please see the LICENSE at the root of this distribution. - * - * SPDX-License-Identifier: Apache-2.0 OR MIT - * - */ - - -#ifndef CRYINCLUDE_EDITOR_INCLUDE_IFACIALEDITOR_H -#define CRYINCLUDE_EDITOR_INCLUDE_IFACIALEDITOR_H -#pragma once - - -class IFacialEditor -{ -public: - enum EyeType - { - EYE_LEFT, - EYE_RIGHT - }; - - virtual int GetNumMorphTargets() const = 0; - virtual const char* GetMorphTargetName(int index) const = 0; - virtual void PreviewEffector(int index, float value) = 0; - virtual void ClearAllPreviewEffectors() = 0; - virtual void SetForcedNeckRotation(const Quat& rotation) = 0; - virtual void SetForcedEyeRotation(const Quat& rotation, EyeType eye) = 0; - virtual int GetJoystickCount() const = 0; - virtual const char* GetJoystickName(int joystickIndex) const = 0; - virtual void SetJoystickPosition(int joystickIndex, float x, float y) = 0; - virtual void GetJoystickPosition(int joystickIndex, float& x, float& y) const = 0; - virtual void LoadJoystickFile(const char* filename) = 0; - virtual void LoadCharacter(const char* filename) = 0; - virtual void LoadSequence(const char* filename) = 0; - virtual void SetVideoFrameResolution(int width, int height, int bpp) = 0; - virtual int GetVideoFramePitch() = 0; - virtual void* GetVideoFrameBits() = 0; - virtual void ShowVideoFramePane() = 0; -}; - -#endif // CRYINCLUDE_EDITOR_INCLUDE_IFACIALEDITOR_H diff --git a/Code/Editor/Include/IFileUtil.h b/Code/Editor/Include/IFileUtil.h index e179f892d9..ea2fe1f1a3 100644 --- a/Code/Editor/Include/IFileUtil.h +++ b/Code/Editor/Include/IFileUtil.h @@ -60,7 +60,6 @@ struct IFileUtil EFILE_TYPE_GEOMETRY, EFILE_TYPE_TEXTURE, EFILE_TYPE_SOUND, - EFILE_TYPE_GEOMCACHE, EFILE_TYPE_LAST, }; @@ -114,14 +113,9 @@ struct IFileUtil virtual void ShowInExplorer(const QString& path) = 0; - virtual bool CompileLuaFile(const char* luaFilename) = 0; virtual bool ExtractFile(QString& file, bool bMsgBoxAskForExtraction = true, const char* pDestinationFilename = nullptr) = 0; - virtual void EditTextFile(const char* txtFile, int line = 0, ETextFileType fileType = FILE_TYPE_SCRIPT) = 0; virtual void EditTextureFile(const char* txtureFile, bool bUseGameFolder) = 0; - //! dcc filename calculation and extraction sub-routines - virtual bool CalculateDccFilename(const QString& assetFilename, QString& dccFilename) = 0; - //! Reformat filter string for (MFC) CFileDialog style file filtering virtual void FormatFilterString(QString& filter) = 0; diff --git a/Code/Editor/Include/IIconManager.h b/Code/Editor/Include/IIconManager.h index 4925e47ae8..2407ea31bd 100644 --- a/Code/Editor/Include/IIconManager.h +++ b/Code/Editor/Include/IIconManager.h @@ -6,12 +6,8 @@ * */ - -#ifndef CRYINCLUDE_EDITOR_INCLUDE_IICONMANAGER_H -#define CRYINCLUDE_EDITOR_INCLUDE_IICONMANAGER_H #pragma once -struct IStatObj; struct IMaterial; class CBitmap; @@ -56,12 +52,9 @@ enum EIconEffect struct IIconManager { virtual ~IIconManager() = default; - virtual IStatObj* GetObject(EStatObject object) = 0; virtual int GetIconTexture(EIcon icon) = 0; virtual int GetIconTexture(const char* iconName) = 0; virtual QImage* GetIconBitmap(const char* filename, bool& haveAlpha, uint32 effects = 0) = 0; // Register an Icon for the specific command virtual void RegisterCommandIcon([[maybe_unused]] const char* filename, [[maybe_unused]] int nCommandId) {} }; - -#endif // CRYINCLUDE_EDITOR_INCLUDE_IICONMANAGER_H diff --git a/Code/Editor/Include/IObjectManager.h b/Code/Editor/Include/IObjectManager.h index 0a7bc8dcca..b612bcb80c 100644 --- a/Code/Editor/Include/IObjectManager.h +++ b/Code/Editor/Include/IObjectManager.h @@ -5,10 +5,6 @@ * SPDX-License-Identifier: Apache-2.0 OR MIT * */ - - -#ifndef CRYINCLUDE_EDITOR_INCLUDE_IOBJECTMANAGER_H -#define CRYINCLUDE_EDITOR_INCLUDE_IOBJECTMANAGER_H #pragma once #include @@ -29,32 +25,15 @@ class CObjectArchive; class CViewport; struct HitContext; enum class ImageRotationDegrees; -struct IStatObj; class CBaseObject; class XmlNodeRef; #include "ObjectEvent.h" -enum SerializeFlags -{ - SERIALIZE_ALL = 0, - SERIALIZE_ONLY_SHARED = 1, - SERIALIZE_ONLY_NOTSHARED = 2, -}; - ////////////////////////////////////////////////////////////////////////// typedef std::vector CBaseObjectsArray; typedef std::pair< bool(CALLBACK*)(CBaseObject const&, void*), void* > BaseObjectFilterFunctor; -struct IObjectSelectCallback -{ - //! Called when object is selected. - //! Return true if selection should proceed, or false to abort object selection. - virtual bool OnSelectObject(CBaseObject* obj) = 0; - //! Return true if object can be selected. - virtual bool CanSelectObject(CBaseObject* obj) = 0; -}; - ////////////////////////////////////////////////////////////////////////// // // Interface to access editor objects scene graph. @@ -78,10 +57,6 @@ public: virtual void DeleteObject(CBaseObject* obj) = 0; virtual void DeleteSelection(CSelectionGroup* pSelection) = 0; virtual void DeleteAllObjects() = 0; - virtual CBaseObject* CloneObject(CBaseObject* obj) = 0; - - virtual void BeginEditParams(CBaseObject* obj, int flags) = 0; - virtual void EndEditParams(int flags = 0) = 0; //! Get number of objects manager by ObjectManager (not contain sub objects of groups). virtual int GetObjectCount() const = 0; @@ -90,27 +65,9 @@ public: //! @param layer if 0 get objects for all layers, or layer to get objects from. virtual void GetObjects(CBaseObjectsArray& objects) const = 0; - //! Get array of objects that pass the filter. - //! @param filter The filter functor, return true if you want to get the certain obj, return false if want to skip it. - virtual void GetObjects(CBaseObjectsArray& objects, BaseObjectFilterFunctor const& filter) const = 0; - //! Display objects on specified display context. virtual void Display(DisplayContext& dc) = 0; - //! Called when selecting without selection helpers - this is needed since - //! the visible object cache is normally not updated when not displaying helpers. - virtual void ForceUpdateVisibleObjectCache(DisplayContext& dc) = 0; - - //! Check intersection with objects. - //! Find intersection with nearest to ray origin object hit by ray. - //! If distance tollerance is specified certain relaxation applied on collision test. - //! @return true if hit any object, and fills hitInfo structure. - virtual bool HitTest(HitContext& hitInfo) = 0; - - //! Check intersection with an object. - //! @return true if hit, and fills hitInfo structure. - virtual bool HitTestObject(CBaseObject* obj, HitContext& hc) = 0; - //! Gets a radius to be used for hit tests on the axis helpers, like the transform gizmo. //! @return the axis helper hit radius. virtual int GetAxisHelperHitRadius() const = 0; @@ -137,59 +94,18 @@ public: //! Find objects which intersect with a given AABB. virtual void FindObjectsInAABB(const AABB& aabb, std::vector& result) const = 0; - ////////////////////////////////////////////////////////////////////////// - // Operations on objects. - ////////////////////////////////////////////////////////////////////////// - //! Makes object visible or invisible. - virtual void HideObject(CBaseObject* obj, bool hide) = 0; - //! Shows the last hidden object based on hidden ID - virtual void ShowLastHiddenObject() = 0; - //! Freeze object, making it unselectable. - virtual void FreezeObject(CBaseObject* obj, bool freeze) = 0; - //! Unhide all hidden objects. - virtual void UnhideAll() = 0; - //! Unfreeze all frozen objects. - virtual void UnfreezeAll() = 0; - ////////////////////////////////////////////////////////////////////////// // Object Selection. ////////////////////////////////////////////////////////////////////////// virtual bool SelectObject(CBaseObject* obj, bool bUseMask = true) = 0; virtual void UnselectObject(CBaseObject* obj) = 0; - //! Select objects within specified distance from given position. - //! Return number of selected objects. - virtual int SelectObjects(const AABB& box, bool bUnselect = false) = 0; - - virtual void SelectEntities(std::set& s) = 0; - - virtual int MoveObjects(const AABB& box, const Vec3& offset, ImageRotationDegrees rotation, bool bIsCopy = false) = 0; - - //! Selects/Unselects all objects within 2d rectangle in given viewport. - virtual void SelectObjectsInRect(CViewport* view, const QRect& rect, bool bSelect) = 0; - virtual void FindObjectsInRect(CViewport* view, const QRect& rect, std::vector& guids) = 0; - //! Clear default selection set. //! @Return number of objects removed from selection. virtual int ClearSelection() = 0; - //! Deselect all current selected objects and selects object that were unselected. - //! @Return number of selected objects. - virtual int InvertSelection() = 0; - //! Get current selection. virtual CSelectionGroup* GetSelection() const = 0; - //! Get named selection. - virtual CSelectionGroup* GetSelection(const QString& name) const = 0; - // Get selection group names - virtual void GetNameSelectionStrings(QStringList& names) = 0; - //! Change name of current selection group. - //! And store it in list. - virtual void NameSelection(const QString& name) = 0; - //! Set one of name selections as current selection. - virtual void SetSelection(const QString& name) = 0; - //! Removes one of named selections. - virtual void RemoveSelection(const QString& name) = 0; //! Delete all objects in current selection group. virtual void DeleteSelection() = 0; @@ -198,54 +114,11 @@ public: virtual QString GenerateUniqueObjectName(const QString& typeName) = 0; //! Register object name in object manager, needed for generating uniq names. virtual void RegisterObjectName(const QString& name) = 0; - //! Enable/Disable generating of unique object names (Enabled by default). - //! Return previous value. - virtual bool EnableUniqObjectNames(bool bEnable) = 0; //! Find object class by name. virtual CObjectClassDesc* FindClass(const QString& className) = 0; - virtual void GetClassCategories(QStringList& categories) = 0; - virtual void GetClassCategoryToolClassNamePairs(std::vector< std::pair >& categoryToolClassNamePairs) = 0; - virtual void GetClassTypes(const QString& category, QStringList& types) = 0; - - //! Export objects to xml. - //! When onlyShared is true ony objects with shared flags exported, overwise only not shared object exported. - virtual void Export(const QString& levelPath, XmlNodeRef& rootNode, bool onlyShared) = 0; - //! Export only entities to xml. - virtual void ExportEntities(XmlNodeRef& rootNode) = 0; - - //! Serialize Objects in manager to specified XML Node. - //! @param flags Can be one of SerializeFlags. - virtual void Serialize(XmlNodeRef& rootNode, bool bLoading, int flags = SERIALIZE_ALL) = 0; - virtual void SerializeNameSelection(XmlNodeRef& rootNode, bool bLoading) = 0; - - //! Load objects from object archive. - //! @param bSelect if set newly loaded object will be selected. - virtual void LoadObjects(CObjectArchive& ar, bool bSelect) = 0; virtual void ChangeObjectId(REFGUID oldId, REFGUID newId) = 0; - virtual bool IsDuplicateObjectName(const QString& newName) const = 0; - virtual void ShowDuplicationMsgWarning(CBaseObject* obj, const QString& newName, bool bShowMsgBox) const = 0; - virtual void ChangeObjectName(CBaseObject* obj, const QString& newName) = 0; - - //! while loading PreFabs we need to force this IDs - //! to force always the same IDs, on each load. - //! needed for RAM-maps assignments - virtual uint32 ForceID() const = 0; - virtual void ForceID(uint32 FID) = 0; - - //! Convert object of one type to object of another type. - //! Original object is deleted. - virtual bool ConvertToType(CBaseObject* pObject, const QString& typeName) = 0; - - //! Set new selection callback. - //! @return previous selection callback. - virtual IObjectSelectCallback* SetSelectCallback(IObjectSelectCallback* callback) = 0; - - // Enables/Disables creating of game objects. - virtual void SetCreateGameObject(bool enable) = 0; - //! Return true if objects loaded from xml should immidiatly create game objects associated with them. - virtual bool IsCreateGameObjects() const = 0; virtual IGizmoManager* GetGizmoManager() = 0; @@ -253,34 +126,9 @@ public: //! Invalidate visibily settings of objects. virtual void InvalidateVisibleList() = 0; - ////////////////////////////////////////////////////////////////////////// - // ObjectManager notification Callbacks. - ////////////////////////////////////////////////////////////////////////// - virtual void AddObjectEventListener(EventListener* listener) = 0; - virtual void RemoveObjectEventListener(EventListener* listener) = 0; - - ////////////////////////////////////////////////////////////////////////// - // Used to indicate starting and ending of objects loading. - ////////////////////////////////////////////////////////////////////////// - virtual void StartObjectsLoading(int numObjects) = 0; - virtual void EndObjectsLoading() = 0; - ////////////////////////////////////////////////////////////////////////// // Gathers all resources used by all objects. virtual void GatherUsedResources(CUsedResources& resources) = 0; virtual bool IsLightClass(CBaseObject* pObject) = 0; - - virtual void FindAndRenameProperty2(const char* property2Name, const QString& oldValue, const QString& newValue) = 0; - virtual void FindAndRenameProperty2If(const char* property2Name, const QString& oldValue, const QString& newValue, const char* otherProperty2Name, const QString& otherValue) = 0; - - virtual bool IsReloading() const = 0; - - // Set bSkipUpdate to true if you want to skip update objects on the idle loop. - virtual void SetSkipUpdate(bool bSkipUpdate) = 0; - - virtual void SetExportingLevel(bool bExporting) = 0; - virtual bool IsExportingLevelInprogress() const = 0; }; - -#endif // CRYINCLUDE_EDITOR_INCLUDE_IOBJECTMANAGER_H diff --git a/Code/Editor/Include/IRenderListener.h b/Code/Editor/Include/IRenderListener.h deleted file mode 100644 index 892a42b701..0000000000 --- a/Code/Editor/Include/IRenderListener.h +++ /dev/null @@ -1,29 +0,0 @@ -/* - * Copyright (c) Contributors to the Open 3D Engine Project. - * For complete copyright and license terms please see the LICENSE at the root of this distribution. - * - * SPDX-License-Identifier: Apache-2.0 OR MIT - * - */ - - -// Description : Interface for rendering custom 3D elements in the main -// render viewport. Particularly usefull for debug geometries. - - -#ifndef CRYINCLUDE_EDITOR_INCLUDE_IRENDERLISTENER_H -#define CRYINCLUDE_EDITOR_INCLUDE_IRENDERLISTENER_H -#pragma once - - -struct DisplayContext; - -struct IRenderListener - : public IUnknown -{ - DEFINE_UUID(0x8D52F857, 0x1027, 0x4346, 0xAC, 0x7B, 0xF6, 0x20, 0xDA, 0x7C, 0xCE, 0x42) - - virtual void Render(DisplayContext& rDisplayContext) = 0; -}; - -#endif // CRYINCLUDE_EDITOR_INCLUDE_IRENDERLISTENER_H diff --git a/Code/Editor/Include/ITextureDatabaseUpdater.h b/Code/Editor/Include/ITextureDatabaseUpdater.h deleted file mode 100644 index 4482135b47..0000000000 --- a/Code/Editor/Include/ITextureDatabaseUpdater.h +++ /dev/null @@ -1,38 +0,0 @@ -/* - * Copyright (c) Contributors to the Open 3D Engine Project. - * For complete copyright and license terms please see the LICENSE at the root of this distribution. - * - * SPDX-License-Identifier: Apache-2.0 OR MIT - * - */ - - -// Description : This file declares the interface used by the texture viewer -// and (implemented first implemented by the Texture Database Creator) to -// syncronize their threads. A thread interace could be useful there. - -#ifndef CRYINCLUDE_EDITOR_INCLUDE_ITEXTUREDATABASEUPDATER_H -#define CRYINCLUDE_EDITOR_INCLUDE_ITEXTUREDATABASEUPDATER_H -#pragma once - - -class CTextureDatabaseItem; - -struct ITextureDatabaseUpdater -{ -public: - ////////////////////////////////////////////////////////////////////////// - // Thread control - virtual void NotifyShutDown() = 0; - virtual void Lock() = 0; - virtual void Unlock() = 0; - virtual void WaitForThread() = 0; - ////////////////////////////////////////////////////////////////////////// - - ////////////////////////////////////////////////////////////////////////// - // Data access - virtual CTextureDatabaseItem* GetItem(const char* szAddItem) = 0; - ////////////////////////////////////////////////////////////////////////// -}; - -#endif // CRYINCLUDE_EDITOR_INCLUDE_ITEXTUREDATABASEUPDATER_H diff --git a/Code/Editor/Include/IViewPane.h b/Code/Editor/Include/IViewPane.h index b4a25a87a9..f2425fb954 100644 --- a/Code/Editor/Include/IViewPane.h +++ b/Code/Editor/Include/IViewPane.h @@ -60,7 +60,7 @@ struct IViewPaneClass ////////////////////////////////////////////////////////////////////////// HRESULT STDMETHODCALLTYPE QueryInterface(const IID& riid, void** ppvObj) { - if (riid == __uuidof(IViewPaneClass)) + if (riid == __az_uuidof(IViewPaneClass)) { *ppvObj = this; return S_OK; diff --git a/Code/Editor/Include/ObjectEvent.h b/Code/Editor/Include/ObjectEvent.h index e59bca6111..a117a8f8f1 100644 --- a/Code/Editor/Include/ObjectEvent.h +++ b/Code/Editor/Include/ObjectEvent.h @@ -14,7 +14,6 @@ //! Standart objects types. enum ObjectType { - OBJTYPE_DUMMY = 1 << 20, OBJTYPE_AZENTITY = 1 << 21, }; diff --git a/Code/Editor/LayoutWnd.cpp b/Code/Editor/LayoutWnd.cpp index aa2a008844..ea125ca3d4 100644 --- a/Code/Editor/LayoutWnd.cpp +++ b/Code/Editor/LayoutWnd.cpp @@ -487,7 +487,6 @@ bool CLayoutWnd::LoadConfig() CreateLayout((EViewLayout)layout, false); - bool bRebindViewports = false; if (m_splitWnd) { const QString str = settings.value("Viewports").toString(); @@ -498,14 +497,12 @@ bool CLayoutWnd::LoadConfig() { break; } - bRebindViewports = true; if (!resToken.isEmpty()) { m_viewType[nIndex] = resToken; } nIndex++; } - ; } BindViewports(); diff --git a/Code/Editor/Lib/Tests/Camera/editor_lib_camera_test_files.cmake b/Code/Editor/Lib/Tests/Camera/editor_lib_camera_test_files.cmake deleted file mode 100644 index 69d3e37f2d..0000000000 --- a/Code/Editor/Lib/Tests/Camera/editor_lib_camera_test_files.cmake +++ /dev/null @@ -1,11 +0,0 @@ -# -# Copyright (c) Contributors to the Open 3D Engine Project. -# For complete copyright and license terms please see the LICENSE at the root of this distribution. -# -# SPDX-License-Identifier: Apache-2.0 OR MIT -# -# - -set(FILES - test_EditorCamera.cpp -) diff --git a/Code/Editor/Lib/Tests/Camera/test_EditorCamera.cpp b/Code/Editor/Lib/Tests/Camera/test_EditorCamera.cpp index 1a44d43370..0dcda3be33 100644 --- a/Code/Editor/Lib/Tests/Camera/test_EditorCamera.cpp +++ b/Code/Editor/Lib/Tests/Camera/test_EditorCamera.cpp @@ -15,45 +15,39 @@ #include #include +#include + namespace UnitTest { - class EditorCameraTestEnvironment : public AZ::Test::GemTestEnvironment - { - // AZ::Test::GemTestEnvironment overrides ... - void AddGemsAndComponents() override; - }; - - void EditorCameraTestEnvironment::AddGemsAndComponents() - { - AddDynamicModulePaths({ CAMERA_EDITOR_MODULE }); - AddComponentDescriptors({ AzToolsFramework::Components::TransformComponent::CreateDescriptor() }); - } - class EditorCameraFixture : public ::testing::Test { public: + AZ::ComponentApplication* m_application = nullptr; AtomToolsFramework::ModularCameraViewportContext* m_cameraViewportContextView = nullptr; AZStd::unique_ptr m_editorModularViewportCameraComposer; - AZStd::unique_ptr m_editorLibHandle; AzFramework::ViewportControllerListPtr m_controllerList; - AZStd::unique_ptr m_entity; + AZ::Entity* m_entity = nullptr; + AZ::ComponentDescriptor* m_transformComponent = nullptr; - static const AzFramework::ViewportId TestViewportId; + static inline constexpr AzFramework::ViewportId TestViewportId = 2345; + static inline constexpr float HalfInterpolateToTransformDuration = + AtomToolsFramework::ModularViewportCameraControllerRequests::InterpolateToTransformDuration * 0.5f; void SetUp() override { - m_editorLibHandle = AZ::DynamicModuleHandle::Create("EditorLib"); - [[maybe_unused]] const bool loaded = m_editorLibHandle->Load(true); - AZ_Assert(loaded, "EditorLib could not be loaded"); + m_application = aznew AZ::ComponentApplication; + AZ::ComponentApplication::Descriptor appDesc; + m_entity = m_application->Create(appDesc); + m_transformComponent = AzToolsFramework::Components::TransformComponent::CreateDescriptor(); + m_application->RegisterComponentDescriptor(m_transformComponent); - m_controllerList = AZStd::make_shared(); - m_controllerList->RegisterViewportContext(TestViewportId); - - m_entity = AZStd::make_unique(); m_entity->Init(); m_entity->CreateComponent(); m_entity->Activate(); + m_controllerList = AZStd::make_shared(); + m_controllerList->RegisterViewportContext(TestViewportId); + m_editorModularViewportCameraComposer = AZStd::make_unique(TestViewportId); auto controller = m_editorModularViewportCameraComposer->CreateModularViewportCameraController(); @@ -72,13 +66,20 @@ namespace UnitTest { m_editorModularViewportCameraComposer.reset(); m_cameraViewportContextView = nullptr; - m_entity.reset(); - m_editorLibHandle = {}; + + if (m_application) + { + m_application->UnregisterComponentDescriptor(m_transformComponent); + delete m_transformComponent; + m_transformComponent = nullptr; + + m_application->Destroy(); + delete m_application; + m_application = nullptr; + } } }; - const AzFramework::ViewportId EditorCameraFixture::TestViewportId = AzFramework::ViewportId(1337); - TEST_F(EditorCameraFixture, ModularViewportCameraControllerReferenceFrameUpdatedWhenViewportEntityisChanged) { // Given @@ -92,8 +93,8 @@ namespace UnitTest &Camera::EditorCameraNotificationBus::Events::OnViewportViewEntityChanged, m_entity->GetId()); // ensure the viewport updates after the viewport view entity change - const float deltaTime = 1.0f / 60.0f; - m_controllerList->UpdateViewport({ TestViewportId, AzFramework::FloatSeconds(deltaTime), AZ::ScriptTimePoint() }); + // note: do a large step to ensure smoothing finishes (e.g. not 1.0f/60.0f) + m_controllerList->UpdateViewport({ TestViewportId, AzFramework::FloatSeconds(2.0f), AZ::ScriptTimePoint() }); // retrieve updated camera transform const AZ::Transform cameraTransform = m_cameraViewportContextView->GetCameraTransform(); @@ -103,61 +104,40 @@ namespace UnitTest EXPECT_THAT(cameraTransform, IsClose(entityTransform)); } - TEST_F(EditorCameraFixture, ReferenceFrameRemainsIdentityAfterExternalCameraTransformChangeWhenNotSet) + TEST_F(EditorCameraFixture, TrackingTransformIsTrueAfterTransformIsTracked) { - // Given - m_cameraViewportContextView->SetCameraTransform(AZ::Transform::CreateTranslation(AZ::Vector3(10.0f, 20.0f, 30.0f))); + // Given/When + const AZ::Transform referenceFrame = AZ::Transform::CreateFromQuaternionAndTranslation( + AZ::Quaternion::CreateRotationX(AZ::DegToRad(90.0f)), AZ::Vector3(1.0f, 2.0f, 3.0f)); + AtomToolsFramework::ModularViewportCameraControllerRequestBus::Event( + TestViewportId, &AtomToolsFramework::ModularViewportCameraControllerRequestBus::Events::StartTrackingTransform, referenceFrame); - // When - AZ::Transform referenceFrame = AZ::Transform::CreateTranslation(AZ::Vector3(1.0f, 2.0f, 3.0f)); + bool trackingTransform = false; AtomToolsFramework::ModularViewportCameraControllerRequestBus::EventResult( - referenceFrame, TestViewportId, &AtomToolsFramework::ModularViewportCameraControllerRequestBus::Events::GetReferenceFrame); + trackingTransform, TestViewportId, &AtomToolsFramework::ModularViewportCameraControllerRequestBus::Events::IsTrackingTransform); // Then - // reference frame is still the identity - EXPECT_THAT(referenceFrame, IsClose(AZ::Transform::CreateIdentity())); + EXPECT_THAT(trackingTransform, ::testing::IsTrue()); } - TEST_F(EditorCameraFixture, ExternalCameraTransformChangeWhenReferenceFrameIsSetUpdatesReferenceFrame) + TEST_F(EditorCameraFixture, TrackingTransformIsFalseAfterTransformIsStoppedBeingTracked) { // Given const AZ::Transform referenceFrame = AZ::Transform::CreateFromQuaternionAndTranslation( AZ::Quaternion::CreateRotationX(AZ::DegToRad(90.0f)), AZ::Vector3(1.0f, 2.0f, 3.0f)); AtomToolsFramework::ModularViewportCameraControllerRequestBus::Event( - TestViewportId, &AtomToolsFramework::ModularViewportCameraControllerRequestBus::Events::SetReferenceFrame, referenceFrame); - - const AZ::Transform nextTransform = AZ::Transform::CreateTranslation(AZ::Vector3(10.0f, 20.0f, 30.0f)); - m_cameraViewportContextView->SetCameraTransform(nextTransform); - - // When - AZ::Transform currentReferenceFrame = AZ::Transform::CreateTranslation(AZ::Vector3(1.0f, 2.0f, 3.0f)); - AtomToolsFramework::ModularViewportCameraControllerRequestBus::EventResult( - currentReferenceFrame, TestViewportId, - &AtomToolsFramework::ModularViewportCameraControllerRequestBus::Events::GetReferenceFrame); - - // Then - EXPECT_THAT(currentReferenceFrame, IsClose(nextTransform)); - } - - TEST_F(EditorCameraFixture, ReferenceFrameReturnedToIdentityAfterClear) - { - // Given - const AZ::Transform referenceFrame = AZ::Transform::CreateFromQuaternionAndTranslation( - AZ::Quaternion::CreateRotationX(AZ::DegToRad(90.0f)), AZ::Vector3(1.0f, 2.0f, 3.0f)); - AtomToolsFramework::ModularViewportCameraControllerRequestBus::Event( - TestViewportId, &AtomToolsFramework::ModularViewportCameraControllerRequestBus::Events::SetReferenceFrame, referenceFrame); + TestViewportId, &AtomToolsFramework::ModularViewportCameraControllerRequestBus::Events::StartTrackingTransform, referenceFrame); // When AtomToolsFramework::ModularViewportCameraControllerRequestBus::Event( - TestViewportId, &AtomToolsFramework::ModularViewportCameraControllerRequestBus::Events::ClearReferenceFrame); - - AZ::Transform currentReferenceFrame = AZ::Transform::CreateTranslation(AZ::Vector3(1.0f, 2.0f, 3.0f)); - AtomToolsFramework::ModularViewportCameraControllerRequestBus::EventResult( - currentReferenceFrame, TestViewportId, - &AtomToolsFramework::ModularViewportCameraControllerRequestBus::Events::GetReferenceFrame); + TestViewportId, &AtomToolsFramework::ModularViewportCameraControllerRequestBus::Events::StopTrackingTransform); // Then - EXPECT_THAT(currentReferenceFrame, IsClose(AZ::Transform::CreateIdentity())); + bool trackingTransform = false; + AtomToolsFramework::ModularViewportCameraControllerRequestBus::EventResult( + trackingTransform, TestViewportId, &AtomToolsFramework::ModularViewportCameraControllerRequestBus::Events::IsTrackingTransform); + + EXPECT_THAT(trackingTransform, ::testing::IsFalse()); } TEST_F(EditorCameraFixture, InterpolateToTransform) @@ -170,8 +150,10 @@ namespace UnitTest transformToInterpolateTo); // simulate interpolation - m_controllerList->UpdateViewport({ TestViewportId, AzFramework::FloatSeconds(0.5f), AZ::ScriptTimePoint() }); - m_controllerList->UpdateViewport({ TestViewportId, AzFramework::FloatSeconds(0.5f), AZ::ScriptTimePoint() }); + m_controllerList->UpdateViewport( + { TestViewportId, AzFramework::FloatSeconds(HalfInterpolateToTransformDuration), AZ::ScriptTimePoint() }); + m_controllerList->UpdateViewport( + { TestViewportId, AzFramework::FloatSeconds(HalfInterpolateToTransformDuration), AZ::ScriptTimePoint() }); const auto finalTransform = m_cameraViewportContextView->GetCameraTransform(); @@ -185,7 +167,7 @@ namespace UnitTest const AZ::Transform referenceFrame = AZ::Transform::CreateFromQuaternionAndTranslation( AZ::Quaternion::CreateRotationX(AZ::DegToRad(90.0f)), AZ::Vector3(1.0f, 2.0f, 3.0f)); AtomToolsFramework::ModularViewportCameraControllerRequestBus::Event( - TestViewportId, &AtomToolsFramework::ModularViewportCameraControllerRequestBus::Events::SetReferenceFrame, referenceFrame); + TestViewportId, &AtomToolsFramework::ModularViewportCameraControllerRequestBus::Events::StartTrackingTransform, referenceFrame); AZ::Transform transformToInterpolateTo = AZ::Transform::CreateFromQuaternionAndTranslation( AZ::Quaternion::CreateRotationZ(AZ::DegToRad(90.0f)), AZ::Vector3(20.0f, 40.0f, 60.0f)); @@ -196,30 +178,116 @@ namespace UnitTest transformToInterpolateTo); // simulate interpolation - m_controllerList->UpdateViewport({ TestViewportId, AzFramework::FloatSeconds(0.5f), AZ::ScriptTimePoint() }); - m_controllerList->UpdateViewport({ TestViewportId, AzFramework::FloatSeconds(0.5f), AZ::ScriptTimePoint() }); - - AZ::Transform currentReferenceFrame = AZ::Transform::CreateTranslation(AZ::Vector3(1.0f, 2.0f, 3.0f)); - AtomToolsFramework::ModularViewportCameraControllerRequestBus::EventResult( - currentReferenceFrame, TestViewportId, - &AtomToolsFramework::ModularViewportCameraControllerRequestBus::Events::GetReferenceFrame); + m_controllerList->UpdateViewport( + { TestViewportId, AzFramework::FloatSeconds(HalfInterpolateToTransformDuration), AZ::ScriptTimePoint() }); + m_controllerList->UpdateViewport( + { TestViewportId, AzFramework::FloatSeconds(HalfInterpolateToTransformDuration), AZ::ScriptTimePoint() }); const auto finalTransform = m_cameraViewportContextView->GetCameraTransform(); // Then EXPECT_THAT(finalTransform, IsClose(transformToInterpolateTo)); - EXPECT_THAT(currentReferenceFrame, IsClose(AZ::Transform::CreateIdentity())); + } + + TEST_F(EditorCameraFixture, BeginningCameraInterpolationReturnsTrue) + { + // Given/When + bool interpolationBegan = false; + AtomToolsFramework::ModularViewportCameraControllerRequestBus::EventResult( + interpolationBegan, TestViewportId, + &AtomToolsFramework::ModularViewportCameraControllerRequestBus::Events::InterpolateToTransform, + AZ::Transform::CreateTranslation(AZ::Vector3(10.0f, 10.0f, 10.0f))); + + // Then + EXPECT_THAT(interpolationBegan, ::testing::IsTrue()); + } + + TEST_F(EditorCameraFixture, CameraInterpolationDoesNotBeginDuringAnExistingInterpolation) + { + // Given/When + bool initialInterpolationBegan = false; + AtomToolsFramework::ModularViewportCameraControllerRequestBus::EventResult( + initialInterpolationBegan, TestViewportId, + &AtomToolsFramework::ModularViewportCameraControllerRequestBus::Events::InterpolateToTransform, + AZ::Transform::CreateTranslation(AZ::Vector3(10.0f, 10.0f, 10.0f))); + + m_controllerList->UpdateViewport( + { TestViewportId, AzFramework::FloatSeconds(HalfInterpolateToTransformDuration), AZ::ScriptTimePoint() }); + + bool nextInterpolationBegan = true; + AtomToolsFramework::ModularViewportCameraControllerRequestBus::EventResult( + nextInterpolationBegan, TestViewportId, + &AtomToolsFramework::ModularViewportCameraControllerRequestBus::Events::InterpolateToTransform, + AZ::Transform::CreateTranslation(AZ::Vector3(10.0f, 10.0f, 10.0f))); + + bool interpolating = false; + AtomToolsFramework::ModularViewportCameraControllerRequestBus::EventResult( + interpolating, TestViewportId, &AtomToolsFramework::ModularViewportCameraControllerRequestBus::Events::IsInterpolating); + + // Then + EXPECT_THAT(initialInterpolationBegan, ::testing::IsTrue()); + EXPECT_THAT(nextInterpolationBegan, ::testing::IsFalse()); + EXPECT_THAT(interpolating, ::testing::IsTrue()); + } + + TEST_F(EditorCameraFixture, CameraInterpolationCanBeginAfterAnInterpolationCompletes) + { + // Given/When + bool initialInterpolationBegan = false; + AtomToolsFramework::ModularViewportCameraControllerRequestBus::EventResult( + initialInterpolationBegan, TestViewportId, + &AtomToolsFramework::ModularViewportCameraControllerRequestBus::Events::InterpolateToTransform, + AZ::Transform::CreateTranslation(AZ::Vector3(10.0f, 10.0f, 10.0f))); + + m_controllerList->UpdateViewport( + { TestViewportId, + AzFramework::FloatSeconds(AtomToolsFramework::ModularViewportCameraControllerRequests::InterpolateToTransformDuration + 0.5f), + AZ::ScriptTimePoint() }); + + bool interpolating = true; + AtomToolsFramework::ModularViewportCameraControllerRequestBus::EventResult( + interpolating, TestViewportId, &AtomToolsFramework::ModularViewportCameraControllerRequestBus::Events::IsInterpolating); + + bool nextInterpolationBegan = false; + AtomToolsFramework::ModularViewportCameraControllerRequestBus::EventResult( + nextInterpolationBegan, TestViewportId, + &AtomToolsFramework::ModularViewportCameraControllerRequestBus::Events::InterpolateToTransform, + AZ::Transform::CreateTranslation(AZ::Vector3(10.0f, 10.0f, 10.0f))); + + // Then + EXPECT_THAT(initialInterpolationBegan, ::testing::IsTrue()); + EXPECT_THAT(interpolating, ::testing::IsFalse()); + EXPECT_THAT(nextInterpolationBegan, ::testing::IsTrue()); + } + + TEST(GotoPositionPitchConstraints, GoToPositionPitchIsSetToPlusOrMinusNinetyDegrees) + { + float minPitch = 0.0f; + float maxPitch = 0.0f; + + GotoPositionPitchConstraints m_gotoPositionContraints; + m_gotoPositionContraints.DeterminePitchRange( + [&minPitch, &maxPitch](const float minPitchDegrees, const float maxPitchDegrees) + { + minPitch = minPitchDegrees; + maxPitch = maxPitchDegrees; + }); + + using ::testing::FloatNear; + EXPECT_THAT(minPitch, FloatNear(-90.0f, AZ::Constants::FloatEpsilon)); + EXPECT_THAT(maxPitch, FloatNear(90.0f, AZ::Constants::FloatEpsilon)); + } + + TEST(GotoPositionPitchConstraints, GoToPositionPitchClampsFinalPitchValueWithTolerance) + { + const auto [expectedMinPitchRadians, expectedMaxPitchRadians] = AzFramework::CameraPitchMinMaxRadiansWithTolerance(); + + GotoPositionPitchConstraints m_gotoPositionContraints; + const float minClampedPitchRadians = m_gotoPositionContraints.PitchClampedRadians(-90.0f); + const float maxClampedPitchRadians = m_gotoPositionContraints.PitchClampedRadians(90.0f); + + using ::testing::FloatNear; + EXPECT_THAT(minClampedPitchRadians, FloatNear(expectedMinPitchRadians, AZ::Constants::FloatEpsilon)); + EXPECT_THAT(maxClampedPitchRadians, FloatNear(expectedMaxPitchRadians, AZ::Constants::FloatEpsilon)); } } // namespace UnitTest - -// required to support running integration tests with the Camera Gem -AZTEST_EXPORT int AZ_UNIT_TEST_HOOK_NAME(int argc, char** argv) -{ - ::testing::InitGoogleMock(&argc, argv); - AZ::Test::printUnusedParametersWarning(argc, argv); - AZ::Test::addTestEnvironments({ new UnitTest::EditorCameraTestEnvironment() }); - int result = RUN_ALL_TESTS(); - return result; -} - -IMPLEMENT_TEST_EXECUTABLE_MAIN(); diff --git a/Code/Editor/Lib/Tests/IEditorMock.h b/Code/Editor/Lib/Tests/IEditorMock.h index 390ffebe79..aaee34c2c6 100644 --- a/Code/Editor/Lib/Tests/IEditorMock.h +++ b/Code/Editor/Lib/Tests/IEditorMock.h @@ -85,9 +85,6 @@ public: MOCK_METHOD0(IsSelectionLocked, bool()); MOCK_METHOD0(GetObjectManager, struct IObjectManager* ()); MOCK_METHOD0(GetSettingsManager, CSettingsManager* ()); - MOCK_METHOD1(GetDBItemManager, IDataBaseManager* (EDataBaseItemType)); - MOCK_METHOD0(GetMaterialManagerLibrary, IBaseLibraryManager* ()); - MOCK_METHOD0(GetIEditorMaterialManager, IEditorMaterialManager* ()); MOCK_METHOD0(GetIconManager, IIconManager* ()); MOCK_METHOD0(GetMusicManager, CMusicManager* ()); MOCK_METHOD2(GetTerrainElevation, float(float , float )); @@ -187,6 +184,5 @@ public: MOCK_METHOD0(UnloadPlugins, void()); MOCK_METHOD0(LoadPlugins, void()); MOCK_METHOD1(GetSearchPath, QString(EEditorPathName)); - MOCK_METHOD0(GetEditorPanelUtils, IEditorPanelUtils* ()); }; diff --git a/Code/Editor/Lib/Tests/test_ClickableLabel.cpp b/Code/Editor/Lib/Tests/test_ClickableLabel.cpp deleted file mode 100644 index 905e91b64c..0000000000 --- a/Code/Editor/Lib/Tests/test_ClickableLabel.cpp +++ /dev/null @@ -1,58 +0,0 @@ -/* - * Copyright (c) Contributors to the Open 3D Engine Project. - * For complete copyright and license terms please see the LICENSE at the root of this distribution. - * - * SPDX-License-Identifier: Apache-2.0 OR MIT - * - */ - -#include "EditorDefs.h" -#include -#include -#include - -#include - -using namespace AZ; -using namespace ::testing; - -namespace UnitTest -{ - class TestingClickableLabel - : public testing::Test - { - public: - ClickableLabel m_clickableLabel; - }; - - TEST_F(TestingClickableLabel, CursorDoesNotUpdateWhileDisabled) - { - m_clickableLabel.setEnabled(false); - - QApplication::setOverrideCursor(QCursor(Qt::BlankCursor)); - QEnterEvent enterEvent{ QPointF(), QPointF(), QPointF() }; - QApplication::sendEvent(&m_clickableLabel, &enterEvent); - - const Qt::CursorShape cursorShape = QApplication::overrideCursor()->shape(); - EXPECT_THAT(cursorShape, Ne(Qt::PointingHandCursor)); - EXPECT_THAT(cursorShape, Eq(Qt::BlankCursor)); - } - - TEST_F(TestingClickableLabel, DoesNotRespondToDblClickWhileDisabled) - { - m_clickableLabel.setEnabled(false); - - bool linkActivated = false; - QObject::connect(&m_clickableLabel, &QLabel::linkActivated, [&linkActivated]() - { - linkActivated = true; - }); - - QMouseEvent mouseEvent { - QEvent::MouseButtonDblClick, QPointF(), - Qt::LeftButton, Qt::LeftButton, Qt::NoModifier }; - QApplication::sendEvent(&m_clickableLabel, &mouseEvent); - - EXPECT_THAT(linkActivated, Eq(false)); - } -} // namespace UnitTest diff --git a/Code/Editor/Lib/Tests/test_CryEditDocPythonBindings.cpp b/Code/Editor/Lib/Tests/test_CryEditDocPythonBindings.cpp index f4e029cb7a..5bab9cb24b 100644 --- a/Code/Editor/Lib/Tests/test_CryEditDocPythonBindings.cpp +++ b/Code/Editor/Lib/Tests/test_CryEditDocPythonBindings.cpp @@ -11,6 +11,7 @@ #include #include #include +#include #include #include @@ -22,7 +23,7 @@ namespace CryEditDocPythonBindingsUnitTests { class CryEditDocPythonBindingsFixture - : public testing::Test + : public ::UnitTest::ScopedAllocatorSetupFixture { public: AzToolsFramework::ToolsApplication m_app; @@ -30,7 +31,6 @@ namespace CryEditDocPythonBindingsUnitTests void SetUp() override { AzFramework::Application::Descriptor appDesc; - appDesc.m_enableDrilling = false; m_app.Start(appDesc); // Without this, the user settings component would attempt to save on finalize/shutdown. Since the file is diff --git a/Code/Editor/Lib/Tests/test_CryEditPythonBindings.cpp b/Code/Editor/Lib/Tests/test_CryEditPythonBindings.cpp index 30afa07304..5246fcdee5 100644 --- a/Code/Editor/Lib/Tests/test_CryEditPythonBindings.cpp +++ b/Code/Editor/Lib/Tests/test_CryEditPythonBindings.cpp @@ -11,6 +11,7 @@ #include #include #include +#include #include #include @@ -24,7 +25,7 @@ namespace CryEditPythonBindingsUnitTests { class CryEditPythonBindingsFixture - : public testing::Test + : public ::UnitTest::ScopedAllocatorSetupFixture { public: AzToolsFramework::ToolsApplication m_app; @@ -32,7 +33,6 @@ namespace CryEditPythonBindingsUnitTests void SetUp() override { AzFramework::Application::Descriptor appDesc; - appDesc.m_enableDrilling = false; m_app.Start(appDesc); // Without this, the user settings component would attempt to save on finalize/shutdown. Since the file is diff --git a/Code/Editor/Lib/Tests/test_DisplaySettingsPythonBindings.cpp b/Code/Editor/Lib/Tests/test_DisplaySettingsPythonBindings.cpp index e6af0bdeff..fd65634d4e 100644 --- a/Code/Editor/Lib/Tests/test_DisplaySettingsPythonBindings.cpp +++ b/Code/Editor/Lib/Tests/test_DisplaySettingsPythonBindings.cpp @@ -11,6 +11,8 @@ #include #include #include +#include +#include #include #include @@ -22,7 +24,7 @@ namespace DisplaySettingsPythonBindingsUnitTests { class DisplaySettingsPythonBindingsFixture - : public testing::Test + : public ::UnitTest::ScopedAllocatorSetupFixture { public: AzToolsFramework::ToolsApplication m_app; @@ -30,7 +32,6 @@ namespace DisplaySettingsPythonBindingsUnitTests void SetUp() override { AzFramework::Application::Descriptor appDesc; - appDesc.m_enableDrilling = false; m_app.Start(appDesc); m_app.RegisterComponentDescriptor(AzToolsFramework::DisplaySettingsPythonFuncsHandler::CreateDescriptor()); @@ -52,7 +53,7 @@ namespace DisplaySettingsPythonBindingsUnitTests } class DisplaySettingsComponentFixture - : public testing::Test + : public ::UnitTest::ScopedAllocatorSetupFixture { public: AzToolsFramework::ToolsApplication m_app; @@ -60,10 +61,14 @@ namespace DisplaySettingsPythonBindingsUnitTests void SetUp() override { AzFramework::Application::Descriptor appDesc; - appDesc.m_enableDrilling = false; m_app.Start(appDesc); m_app.RegisterComponentDescriptor(AzToolsFramework::DisplaySettingsComponent::CreateDescriptor()); + + // Without this, the user settings component would attempt to save on finalize/shutdown. Since the file is + // shared across the whole engine, if multiple tests are run in parallel, the saving could cause a crash + // in the unit tests. + AZ::UserSettingsComponentRequestBus::Broadcast(&AZ::UserSettingsComponentRequests::DisableSaveOnFinalize); } void TearDown() override diff --git a/Code/Editor/Lib/Tests/test_EditorPythonBindings.cpp b/Code/Editor/Lib/Tests/test_EditorPythonBindings.cpp index 1006c339ee..49b65f7ffc 100644 --- a/Code/Editor/Lib/Tests/test_EditorPythonBindings.cpp +++ b/Code/Editor/Lib/Tests/test_EditorPythonBindings.cpp @@ -12,6 +12,7 @@ #include #include #include +#include #include #include @@ -25,7 +26,6 @@ #include #include #include -#include #include #include "IEditorMock.h" @@ -80,7 +80,7 @@ namespace EditorPythonBindingsUnitTests }; class EditorPythonBindingsFixture - : public testing::Test + : public ::UnitTest::ScopedAllocatorSetupFixture { public: AzToolsFramework::ToolsApplication m_app; @@ -88,7 +88,6 @@ namespace EditorPythonBindingsUnitTests void SetUp() override { AzFramework::Application::Descriptor appDesc; - appDesc.m_enableDrilling = false; m_app.Start(appDesc); // Without this, the user settings component would attempt to save on finalize/shutdown. Since the file is diff --git a/Code/Editor/Lib/Tests/test_EditorUtils.cpp b/Code/Editor/Lib/Tests/test_EditorUtils.cpp index 3556757ae3..c0515a77ad 100644 --- a/Code/Editor/Lib/Tests/test_EditorUtils.cpp +++ b/Code/Editor/Lib/Tests/test_EditorUtils.cpp @@ -11,6 +11,7 @@ #include #include #include +#include namespace EditorUtilsTest { @@ -39,7 +40,7 @@ namespace EditorUtilsTest class TestWarningAbsorber - : public testing::Test + : public ::UnitTest::ScopedAllocatorSetupFixture { }; diff --git a/Code/Editor/Lib/Tests/test_Main.cpp b/Code/Editor/Lib/Tests/test_Main.cpp index 6250c540db..91369ee8b6 100644 --- a/Code/Editor/Lib/Tests/test_Main.cpp +++ b/Code/Editor/Lib/Tests/test_Main.cpp @@ -9,12 +9,13 @@ #include "EditorDefs.h" #include #include +#include #include #include class EditorLibTestEnvironment - : public AZ::Test::ITestEnvironment + : public ::UnitTest::TraceBusHook { public: ~EditorLibTestEnvironment() override = default; @@ -22,16 +23,20 @@ public: protected: void SetupEnvironment() override { + ::UnitTest::TraceBusHook::SetupEnvironment(); + AZ::Environment::Create(nullptr); - AttachEditorAZEnvironment(AZ::Environment::GetInstance()); AZ::AllocatorInstance::Create(); + AttachEditorAZEnvironment(AZ::Environment::GetInstance()); } void TeardownEnvironment() override { - AZ::AllocatorInstance::Destroy(); DetachEditorAZEnvironment(); + AZ::AllocatorInstance::Destroy(); AZ::Environment::Destroy(); + + ::UnitTest::TraceBusHook::TeardownEnvironment(); } }; diff --git a/Code/Editor/Lib/Tests/test_MainWindowPythonBindings.cpp b/Code/Editor/Lib/Tests/test_MainWindowPythonBindings.cpp index 3963ae990f..e3268704bc 100644 --- a/Code/Editor/Lib/Tests/test_MainWindowPythonBindings.cpp +++ b/Code/Editor/Lib/Tests/test_MainWindowPythonBindings.cpp @@ -12,6 +12,7 @@ #include #include #include +#include #include #include @@ -22,7 +23,7 @@ namespace MainWindowPythonBindingsUnitTests { class MainWindowPythonBindingsFixture - : public testing::Test + : public ::UnitTest::ScopedAllocatorSetupFixture { public: AzToolsFramework::ToolsApplication m_app; @@ -30,7 +31,6 @@ namespace MainWindowPythonBindingsUnitTests void SetUp() override { AzFramework::Application::Descriptor appDesc; - appDesc.m_enableDrilling = false; m_app.Start(appDesc); // Without this, the user settings component would attempt to save on finalize/shutdown. Since the file is diff --git a/Code/Editor/Lib/Tests/test_ModularViewportCameraController.cpp b/Code/Editor/Lib/Tests/test_ModularViewportCameraController.cpp index 275df11784..67d89ad967 100644 --- a/Code/Editor/Lib/Tests/test_ModularViewportCameraController.cpp +++ b/Code/Editor/Lib/Tests/test_ModularViewportCameraController.cpp @@ -9,7 +9,7 @@ #include #include #include -#include +#include #include #include #include @@ -74,7 +74,7 @@ namespace UnitTest class ModularViewportCameraControllerFixture : public AllocatorsTestFixture { public: - static const AzFramework::ViewportId TestViewportId; + static inline constexpr AzFramework::ViewportId TestViewportId = 1234; void SetUp() override { @@ -146,6 +146,17 @@ namespace UnitTest controller->SetCameraPropsBuilderCallback( [](AzFramework::CameraProps& cameraProps) { + // note: rotateSmoothness is also used for roll (not related to camera input directly) + cameraProps.m_rotateSmoothnessFn = [] + { + return 5.0f; + }; + + cameraProps.m_translateSmoothnessFn = [] + { + return 5.0f; + }; + cameraProps.m_rotateSmoothingEnabledFn = [] { return false; @@ -209,8 +220,6 @@ namespace UnitTest AZStd::unique_ptr m_editorModularViewportCameraComposer; }; - const AzFramework::ViewportId ModularViewportCameraControllerFixture::TestViewportId = AzFramework::ViewportId(0); - TEST_F(ModularViewportCameraControllerFixture, MouseMovementDoesNotAccumulateExcessiveDriftInModularViewportCameraWithVaryingDeltaTime) { SandboxEditor::SetCameraCaptureCursorForLook(false); @@ -380,6 +389,7 @@ namespace UnitTest m_controllerList->UpdateViewport({ TestViewportId, AzFramework::FloatSeconds(deltaTime), AZ::ScriptTimePoint() }); QTest::mouseRelease(m_rootWidget.get(), Qt::MouseButton::RightButton, Qt::NoModifier, start + mouseDelta); + m_controllerList->UpdateViewport({ TestViewportId, AzFramework::FloatSeconds(deltaTime), AZ::ScriptTimePoint() }); // update the position of the widget const auto offset = QPoint(500, 500); diff --git a/Code/Editor/Lib/Tests/test_ObjectManagerPythonBindings.cpp b/Code/Editor/Lib/Tests/test_ObjectManagerPythonBindings.cpp index 39a89670ef..6766b6a1fa 100644 --- a/Code/Editor/Lib/Tests/test_ObjectManagerPythonBindings.cpp +++ b/Code/Editor/Lib/Tests/test_ObjectManagerPythonBindings.cpp @@ -12,6 +12,7 @@ #include #include #include +#include #include #include @@ -22,7 +23,7 @@ namespace ObjectManagerPythonBindingsUnitTests { class ObjectManagerPythonBindingsFixture - : public testing::Test + : public ::UnitTest::ScopedAllocatorSetupFixture { public: AzToolsFramework::ToolsApplication m_app; @@ -30,7 +31,6 @@ namespace ObjectManagerPythonBindingsUnitTests void SetUp() override { AzFramework::Application::Descriptor appDesc; - appDesc.m_enableDrilling = false; m_app.Start(appDesc); // Without this, the user settings component would attempt to save on finalize/shutdown. Since the file is @@ -63,16 +63,6 @@ namespace ObjectManagerPythonBindingsUnitTests EXPECT_TRUE(behaviorContext->m_methods.find("get_selection_center") != behaviorContext->m_methods.end()); EXPECT_TRUE(behaviorContext->m_methods.find("get_selection_aabb") != behaviorContext->m_methods.end()); - EXPECT_TRUE(behaviorContext->m_methods.find("hide_object") != behaviorContext->m_methods.end()); - EXPECT_TRUE(behaviorContext->m_methods.find("is_object_hidden") != behaviorContext->m_methods.end()); - EXPECT_TRUE(behaviorContext->m_methods.find("unhide_object") != behaviorContext->m_methods.end()); - EXPECT_TRUE(behaviorContext->m_methods.find("hide_all_objects") != behaviorContext->m_methods.end()); - EXPECT_TRUE(behaviorContext->m_methods.find("unhide_all_objects") != behaviorContext->m_methods.end()); - - EXPECT_TRUE(behaviorContext->m_methods.find("freeze_object") != behaviorContext->m_methods.end()); - EXPECT_TRUE(behaviorContext->m_methods.find("is_object_frozen") != behaviorContext->m_methods.end()); - EXPECT_TRUE(behaviorContext->m_methods.find("unfreeze_object") != behaviorContext->m_methods.end()); - EXPECT_TRUE(behaviorContext->m_methods.find("delete_object") != behaviorContext->m_methods.end()); EXPECT_TRUE(behaviorContext->m_methods.find("delete_selected") != behaviorContext->m_methods.end()); diff --git a/Code/Editor/Lib/Tests/test_TerrainHoleToolPythonBindings.cpp b/Code/Editor/Lib/Tests/test_TerrainHoleToolPythonBindings.cpp index e163004d75..fc292b1f52 100644 --- a/Code/Editor/Lib/Tests/test_TerrainHoleToolPythonBindings.cpp +++ b/Code/Editor/Lib/Tests/test_TerrainHoleToolPythonBindings.cpp @@ -23,7 +23,7 @@ namespace TerrainFuncsUnitTests { class TerrainHoleToolPythonBindingsFixture - : public testing::Test + : public UnitTest::ScopedAllocatorSetupFixture { public: AzToolsFramework::ToolsApplication m_app; @@ -31,7 +31,6 @@ namespace TerrainFuncsUnitTests void SetUp() override { AzFramework::Application::Descriptor appDesc; - appDesc.m_enableDrilling = false; m_app.Start(appDesc); // Without this, the user settings component would attempt to save on finalize/shutdown. Since the file is diff --git a/Code/Editor/Lib/Tests/test_TerrainLayerPythonBindings.cpp b/Code/Editor/Lib/Tests/test_TerrainLayerPythonBindings.cpp index ad7baa44a5..3296572ed2 100644 --- a/Code/Editor/Lib/Tests/test_TerrainLayerPythonBindings.cpp +++ b/Code/Editor/Lib/Tests/test_TerrainLayerPythonBindings.cpp @@ -23,7 +23,7 @@ namespace TerrainFuncsUnitTests { class TerrainLayerPythonBindingsFixture - : public testing::Test + : public UnitTest::ScopedAllocatorSetupFixture { public: AzToolsFramework::ToolsApplication m_app; @@ -31,7 +31,6 @@ namespace TerrainFuncsUnitTests void SetUp() override { AzFramework::Application::Descriptor appDesc; - appDesc.m_enableDrilling = false; m_app.Start(appDesc); // Without this, the user settings component would attempt to save on finalize/shutdown. Since the file is diff --git a/Code/Editor/Lib/Tests/test_TerrainModifyPythonBindings.cpp b/Code/Editor/Lib/Tests/test_TerrainModifyPythonBindings.cpp index 166e4c0be5..37afbe5f37 100644 --- a/Code/Editor/Lib/Tests/test_TerrainModifyPythonBindings.cpp +++ b/Code/Editor/Lib/Tests/test_TerrainModifyPythonBindings.cpp @@ -22,7 +22,7 @@ namespace TerrainModifyPythonBindingsUnitTests { class TerrainModifyPythonBindingsFixture - : public testing::Test + : public UnitTest::ScopedAllocatorSetupFixture { public: AzToolsFramework::ToolsApplication m_app; @@ -30,7 +30,6 @@ namespace TerrainModifyPythonBindingsUnitTests void SetUp() override { AzFramework::Application::Descriptor appDesc; - appDesc.m_enableDrilling = false; m_app.Start(appDesc); // Without this, the user settings component would attempt to save on finalize/shutdown. Since the file is diff --git a/Code/Editor/Lib/Tests/test_TerrainPainterPythonBindings.cpp b/Code/Editor/Lib/Tests/test_TerrainPainterPythonBindings.cpp index 7a2cf786cd..3281da8078 100644 --- a/Code/Editor/Lib/Tests/test_TerrainPainterPythonBindings.cpp +++ b/Code/Editor/Lib/Tests/test_TerrainPainterPythonBindings.cpp @@ -23,7 +23,7 @@ namespace TerrainFuncsUnitTests { class TerrainPainterPythonBindingsFixture - : public testing::Test + : public UnitTest::ScopedAllocatorSetupFixture { public: AzToolsFramework::ToolsApplication m_app; @@ -31,7 +31,6 @@ namespace TerrainFuncsUnitTests void SetUp() override { AzFramework::Application::Descriptor appDesc; - appDesc.m_enableDrilling = false; m_app.Start(appDesc); // Without this, the user settings component would attempt to save on finalize/shutdown. Since the file is diff --git a/Code/Editor/Lib/Tests/test_TerrainPythonBindings.cpp b/Code/Editor/Lib/Tests/test_TerrainPythonBindings.cpp index 6a0df6b62a..786158afb3 100644 --- a/Code/Editor/Lib/Tests/test_TerrainPythonBindings.cpp +++ b/Code/Editor/Lib/Tests/test_TerrainPythonBindings.cpp @@ -23,7 +23,7 @@ namespace TerrainFuncsUnitTests { class TerrainPythonBindingsFixture - : public testing::Test + : public UnitTest::ScopedAllocatorSetupFixture { public: AzToolsFramework::ToolsApplication m_app; @@ -31,7 +31,6 @@ namespace TerrainFuncsUnitTests void SetUp() override { AzFramework::Application::Descriptor appDesc; - appDesc.m_enableDrilling = false; m_app.Start(appDesc); // Without this, the user settings component would attempt to save on finalize/shutdown. Since the file is diff --git a/Code/Editor/Lib/Tests/test_TerrainTexturePythonBindings.cpp b/Code/Editor/Lib/Tests/test_TerrainTexturePythonBindings.cpp index 23d30c0b82..7bd81772e1 100644 --- a/Code/Editor/Lib/Tests/test_TerrainTexturePythonBindings.cpp +++ b/Code/Editor/Lib/Tests/test_TerrainTexturePythonBindings.cpp @@ -23,7 +23,7 @@ namespace TerrainFuncsUnitTests { class TerrainTexturePythonBindingsFixture - : public testing::Test + : public UnitTest::ScopedAllocatorSetupFixture { public: AzToolsFramework::ToolsApplication m_app; @@ -31,7 +31,6 @@ namespace TerrainFuncsUnitTests void SetUp() override { AzFramework::Application::Descriptor appDesc; - appDesc.m_enableDrilling = false; m_app.Start(appDesc); // Without this, the user settings component would attempt to save on finalize/shutdown. Since the file is diff --git a/Code/Editor/Lib/Tests/test_TrackViewPythonBindings.cpp b/Code/Editor/Lib/Tests/test_TrackViewPythonBindings.cpp index 191596f4ae..558bdaaabc 100644 --- a/Code/Editor/Lib/Tests/test_TrackViewPythonBindings.cpp +++ b/Code/Editor/Lib/Tests/test_TrackViewPythonBindings.cpp @@ -12,6 +12,7 @@ #include #include #include +#include #include #include @@ -22,7 +23,7 @@ namespace TrackViewPythonBindingsUnitTests { class TrackViewPythonBindingsFixture - : public testing::Test + : public UnitTest::ScopedAllocatorSetupFixture { public: AzToolsFramework::ToolsApplication m_app; @@ -30,7 +31,6 @@ namespace TrackViewPythonBindingsUnitTests void SetUp() override { AzFramework::Application::Descriptor appDesc; - appDesc.m_enableDrilling = false; m_app.Start(appDesc); // Without this, the user settings component would attempt to save on finalize/shutdown. Since the file is @@ -82,7 +82,7 @@ namespace TrackViewPythonBindingsUnitTests } class TrackViewComponentFixture - : public testing::Test + : public UnitTest::ScopedAllocatorSetupFixture { public: AzToolsFramework::ToolsApplication m_app; @@ -90,10 +90,12 @@ namespace TrackViewPythonBindingsUnitTests void SetUp() override { AzFramework::Application::Descriptor appDesc; - appDesc.m_enableDrilling = false; m_app.Start(appDesc); m_app.RegisterComponentDescriptor(AzToolsFramework::TrackViewComponent::CreateDescriptor()); + + // Disable saving global user settings to prevent failure due to detecting file updates + AZ::UserSettingsComponentRequestBus::Broadcast(&AZ::UserSettingsComponentRequests::DisableSaveOnFinalize); } void TearDown() override diff --git a/Code/Editor/Lib/Tests/test_ViewPanePythonBindings.cpp b/Code/Editor/Lib/Tests/test_ViewPanePythonBindings.cpp index 88ce6d5767..047cea3aad 100644 --- a/Code/Editor/Lib/Tests/test_ViewPanePythonBindings.cpp +++ b/Code/Editor/Lib/Tests/test_ViewPanePythonBindings.cpp @@ -11,6 +11,7 @@ #include #include #include +#include #include #include @@ -22,7 +23,7 @@ namespace ViewPaneFuncsUnitTests { class ViewPanePythonBindingsFixture - : public testing::Test + : public ::UnitTest::ScopedAllocatorSetupFixture { public: AzToolsFramework::ToolsApplication m_app; @@ -30,7 +31,6 @@ namespace ViewPaneFuncsUnitTests void SetUp() override { AzFramework::Application::Descriptor appDesc; - appDesc.m_enableDrilling = false; m_app.Start(appDesc); // Without this, the user settings component would attempt to save on finalize/shutdown. Since the file is diff --git a/Code/Editor/Lib/Tests/test_ViewportManipulatorController.cpp b/Code/Editor/Lib/Tests/test_ViewportManipulatorController.cpp index 63e59ea940..473ddd81f7 100644 --- a/Code/Editor/Lib/Tests/test_ViewportManipulatorController.cpp +++ b/Code/Editor/Lib/Tests/test_ViewportManipulatorController.cpp @@ -8,10 +8,11 @@ #include #include -#include +#include #include #include #include +#include namespace UnitTest { @@ -77,14 +78,15 @@ namespace UnitTest class ViewportManipulatorControllerFixture : public AllocatorsTestFixture { public: - static const AzFramework::ViewportId TestViewportId; + static inline constexpr AzFramework::ViewportId TestViewportId = 1234; + static inline const QSize WidgetSize = QSize(1920, 1080); void SetUp() override { AllocatorsTestFixture::SetUp(); m_rootWidget = AZStd::make_unique(); - m_rootWidget->setFixedSize(QSize(100, 100)); + m_rootWidget->setFixedSize(WidgetSize); QApplication::setActiveWindow(m_rootWidget.get()); m_controllerList = AZStd::make_shared(); @@ -111,8 +113,6 @@ namespace UnitTest AZStd::unique_ptr m_inputChannelMapper; }; - const AzFramework::ViewportId ViewportManipulatorControllerFixture::TestViewportId = AzFramework::ViewportId(0); - TEST_F(ViewportManipulatorControllerFixture, AnEventIsNotPropagatedToTheViewportWhenAManipulatorHandlesItFirst) { // forward input events to our controller list @@ -227,4 +227,74 @@ namespace UnitTest // the key was released (cleared) EXPECT_TRUE(endedEvent); } + + TEST_F(ViewportManipulatorControllerFixture, DoubleClickIsNotRegisteredIfMouseDeltaHasMovedMoreThanDeadzoneInClickInterval) + { + AzFramework::NativeWindowHandle nativeWindowHandle = nullptr; + + // forward input events to our controller list + QObject::connect( + m_inputChannelMapper.get(), &AzToolsFramework::QtEventToAzInputMapper::InputChannelUpdated, m_rootWidget.get(), + [this, nativeWindowHandle](const AzFramework::InputChannel* inputChannel, [[maybe_unused]] QEvent* event) + { + m_controllerList->HandleInputChannelEvent( + AzFramework::ViewportControllerInputEvent{ TestViewportId, nativeWindowHandle, *inputChannel }); + }); + + ::testing::NiceMock mockWindowRequests; + mockWindowRequests.Connect(nativeWindowHandle); + + using ::testing::Return; + // note: WindowRequests is used internally by ViewportManipulatorController + ON_CALL(mockWindowRequests, GetClientAreaSize()) + .WillByDefault(Return(AzFramework::WindowSize(WidgetSize.width(), WidgetSize.height()))); + + EditorInteractionViewportSelectionFake editorInteractionViewportFake; + editorInteractionViewportFake.m_internalHandleMouseManipulatorInteraction = [](const MouseInteractionEvent&) + { + // report the event was not handled (manipulator was not interacted with) + return false; + }; + + bool doubleClickDetected = false; + editorInteractionViewportFake.m_internalHandleMouseViewportInteraction = + [&doubleClickDetected](const MouseInteractionEvent& mouseInteractionEvent) + { + // ensure no double click event is detected with the given inputs below + if (mouseInteractionEvent.m_mouseEvent == AzToolsFramework::ViewportInteraction::MouseEvent::DoubleClick) + { + doubleClickDetected = true; + } + + return true; + }; + + editorInteractionViewportFake.Connect(); + + m_controllerList->Add(AZStd::make_shared()); + + // simulate a click, move, click + MouseMove(m_rootWidget.get(), QPoint(0, 0), QPoint(10, 10)); + MousePressAndMove(m_rootWidget.get(), QPoint(10, 10), QPoint(0, 0), Qt::MouseButton::LeftButton); + QTest::mouseRelease(m_rootWidget.get(), Qt::MouseButton::LeftButton, Qt::KeyboardModifier::NoModifier, QPoint(10, 10)); + MouseMove(m_rootWidget.get(), QPoint(10, 10), QPoint(20, 20)); + MousePressAndMove(m_rootWidget.get(), QPoint(20, 20), QPoint(0, 0), Qt::MouseButton::LeftButton); + QTest::mouseRelease(m_rootWidget.get(), Qt::MouseButton::LeftButton, Qt::KeyboardModifier::NoModifier, QPoint(20, 20)); + + // ensure no double click was detected + EXPECT_FALSE(doubleClickDetected); + + // simulate double click (sanity check it still is detected correctly with no movement) + MouseMove(m_rootWidget.get(), QPoint(0, 0), QPoint(10, 10)); + MousePressAndMove(m_rootWidget.get(), QPoint(10, 10), QPoint(0, 0), Qt::MouseButton::LeftButton); + QTest::mouseRelease(m_rootWidget.get(), Qt::MouseButton::LeftButton, Qt::KeyboardModifier::NoModifier, QPoint(10, 10)); + MousePressAndMove(m_rootWidget.get(), QPoint(10, 10), QPoint(0, 0), Qt::MouseButton::LeftButton); + QTest::mouseRelease(m_rootWidget.get(), Qt::MouseButton::LeftButton, Qt::KeyboardModifier::NoModifier, QPoint(10, 10)); + + // ensure a double click was detected + EXPECT_TRUE(doubleClickDetected); + + mockWindowRequests.Disconnect(); + editorInteractionViewportFake.Disconnect(); + } } // namespace UnitTest diff --git a/Code/Editor/Lib/Tests/test_ViewportTitleDlgPythonBindings.cpp b/Code/Editor/Lib/Tests/test_ViewportTitleDlgPythonBindings.cpp index c3d6be1fdd..c3f7fe35f5 100644 --- a/Code/Editor/Lib/Tests/test_ViewportTitleDlgPythonBindings.cpp +++ b/Code/Editor/Lib/Tests/test_ViewportTitleDlgPythonBindings.cpp @@ -12,6 +12,7 @@ #include #include #include +#include #include #include @@ -22,7 +23,7 @@ namespace ViewportTitleDlgFuncsUnitTests { class ViewportTitleDlgPythonBindingsFixture - : public testing::Test + : public UnitTest::ScopedAllocatorSetupFixture { public: AzToolsFramework::ToolsApplication m_app; @@ -30,7 +31,6 @@ namespace ViewportTitleDlgFuncsUnitTests void SetUp() override { AzFramework::Application::Descriptor appDesc; - appDesc.m_enableDrilling = false; m_app.Start(appDesc); // Without this, the user settings component would attempt to save on finalize/shutdown. Since the file is diff --git a/Code/Editor/LightmapCompiler/SimpleTriangleRasterizer.cpp b/Code/Editor/LightmapCompiler/SimpleTriangleRasterizer.cpp deleted file mode 100644 index 736465cac1..0000000000 --- a/Code/Editor/LightmapCompiler/SimpleTriangleRasterizer.cpp +++ /dev/null @@ -1,506 +0,0 @@ -/* - * Copyright (c) Contributors to the Open 3D Engine Project. - * For complete copyright and license terms please see the LICENSE at the root of this distribution. - * - * SPDX-License-Identifier: Apache-2.0 OR MIT - * - */ - - -#include "EditorDefs.h" - -#include "SimpleTriangleRasterizer.h" - -#include - -#if !defined FLT_MAX -#define FLT_MAX 3.402823466e+38F -#endif - -void CSimpleTriangleRasterizer::lambertHorizlineConservative(float fx1, float fx2, int yy, IRasterizeSink* inpSink) -{ - int x1 = (int)floorf(fx1 + 0.25f), x2 = (int)floorf(fx2 + .75f); - - if (x1 < m_iMinX) - { - x1 = m_iMinX; - } - if (x2 > m_iMaxX + 1) - { - x2 = m_iMaxX + 1; - } - if (x1 > m_iMaxX + 1) - { - x1 = m_iMaxX + 1; - } - if (x2 < m_iMinX) - { - x2 = m_iMinX; - } - - - inpSink->Line(fx1, fx2, x1, x2, yy); -} - -void CSimpleTriangleRasterizer::lambertHorizlineSubpixelCorrect(float fx1, float fx2, int yy, IRasterizeSink* inpSink) -{ - int x1 = (int)floorf(fx1 + 0.5f), x2 = (int)floorf(fx2 + 0.5f); - // int x1=(int)floorf(fx1*1023.f/1024.f+1.f),x2=(int)floorf(fx2*1023.f/1024.f+1.f); - - if (x1 < m_iMinX) - { - x1 = m_iMinX; - } - if (x2 > m_iMaxX) - { - x2 = m_iMaxX; - } - if (x1 > m_iMaxX) - { - x1 = m_iMaxX; - } - if (x2 < m_iMinX) - { - x2 = m_iMinX; - } - - inpSink->Line(fx1, fx2, x1, x2, yy); -} - -// optimizable -void CSimpleTriangleRasterizer::CopyAndSortY(const float infX[3], const float infY[3], float outfX[3], float outfY[3]) -{ - outfX[0] = infX[0]; - outfY[0] = infY[0]; - outfX[1] = infX[1]; - outfY[1] = infY[1]; - outfX[2] = infX[2]; - outfY[2] = infY[2]; - - // Sort the coordinates, so that (x[1], y[1]) becomes the highest coord - float tmp; - - if (outfY[0] > outfY[1]) - { - if (outfY[1] > outfY[2]) - { - tmp = outfY[0]; - outfY[0] = outfY[1]; - outfY[1] = tmp; - tmp = outfX[0]; - outfX[0] = outfX[1]; - outfX[1] = tmp; - tmp = outfY[1]; - outfY[1] = outfY[2]; - outfY[2] = tmp; - tmp = outfX[1]; - outfX[1] = outfX[2]; - outfX[2] = tmp; - - if (outfY[0] > outfY[1]) - { - tmp = outfY[0]; - outfY[0] = outfY[1]; - outfY[1] = tmp; - tmp = outfX[0]; - outfX[0] = outfX[1]; - outfX[1] = tmp; - } - } - else - { - tmp = outfY[0]; - outfY[0] = outfY[1]; - outfY[1] = tmp; - tmp = outfX[0]; - outfX[0] = outfX[1]; - outfX[1] = tmp; - - if (outfY[1] > outfY[2]) - { - tmp = outfY[1]; - outfY[1] = outfY[2]; - outfY[2] = tmp; - tmp = outfX[1]; - outfX[1] = outfX[2]; - outfX[2] = tmp; - } - } - } - else - { - if (outfY[1] > outfY[2]) - { - tmp = outfY[1]; - outfY[1] = outfY[2]; - outfY[2] = tmp; - tmp = outfX[1]; - outfX[1] = outfX[2]; - outfX[2] = tmp; - - if (outfY[0] > outfY[1]) - { - tmp = outfY[0]; - outfY[0] = outfY[1]; - outfY[1] = tmp; - tmp = outfX[0]; - outfX[0] = outfX[1]; - outfX[1] = tmp; - } - } - } -} - -void CSimpleTriangleRasterizer::CallbackFillRectConservative(float _x[3], float _y[3], IRasterizeSink* inpSink) -{ - inpSink->Triangle(m_iMinY); - - float fMinX = (std::min)(_x[0], (std::min)(_x[1], _x[2])); - float fMaxX = (std::max)(_x[0], (std::max)(_x[1], _x[2])); - float fMinY = (std::min)(_y[0], (std::min)(_y[1], _y[2])); - float fMaxY = (std::max)(_y[0], (std::max)(_y[1], _y[2])); - - int iMinX = (std::max)(m_iMinX, (int)floorf(fMinX)); - int iMaxX = (std::min)(m_iMaxX + 1, (int)ceilf(fMaxX)); - int iMinY = (std::max)(m_iMinY, (int)floorf(fMinY)); - int iMaxY = (std::min)(m_iMaxY + 1, (int)ceilf(fMaxY)); - - for (int y = iMinY; y < iMaxY; y++) - { - inpSink->Line(fMinX, fMaxX, iMinX, iMaxX, y); - } -} - - - - -void CSimpleTriangleRasterizer::CallbackFillConservative(float _x[3], float _y[3], IRasterizeSink* inpSink) -{ - float x[3], y[3]; - - CopyAndSortY(_x, _y, x, y); - - // Calculate interpolation steps - float fX1toX2step = 0.0f; - float fX1toX3step = 0.0f; - float fX2toX3step = 0.0f; - if (fabsf(y[1] - y[0]) > FLT_EPSILON) - { - fX1toX2step = (x[1] - x[0]) / (float)(y[1] - y[0]); - } - if (fabsf(y[2] - y[0]) > FLT_EPSILON) - { - fX1toX3step = (x[2] - x[0]) / (float)(y[2] - y[0]); - } - if (fabsf(y[2] - y[1]) > FLT_EPSILON) - { - fX2toX3step = (x[2] - x[1]) / (float)(y[2] - y[1]); - } - - float fX1toX2 = x[0], fX1toX3 = x[0], fX2toX3 = x[1]; - bool bFirstLine = true; - bool bTriangleCallDone = false; - - // Go through the scanlines of the triangle - int yy = (int)floorf(y[0]); // was floor - - for (; yy <= (int)floorf(y[2]); yy++) - // for(yy=m_iMinY; yy<=m_iMaxY; yy++) // juhu - { - float fSubPixelYStart = 0.0f, fSubPixelYEnd = 1.0f; - float start, end; - - // first line - if (bFirstLine) - { - fSubPixelYStart = y[0] - floorf(y[0]); - start = x[0]; - end = x[0]; - bFirstLine = false; - } - else - { - // top part without middle corner line - if (yy <= (int)floorf(y[1])) - { - start = (std::min)(fX1toX2, fX1toX3); - end = (std::max)(fX1toX2, fX1toX3); - } - else - { - start = (std::min)(fX2toX3, fX1toX3); - end = (std::max)(fX2toX3, fX1toX3); - } - } - - // middle corner line - if (yy == (int)floorf(y[1])) - { - fSubPixelYEnd = y[1] - floorf(y[1]); - - fX1toX3 += fX1toX3step * (fSubPixelYEnd - fSubPixelYStart); - start = (std::min)(start, fX1toX3); - end = (std::max)(end, fX1toX3); - start = (std::min)(start, x[1]); - end = (std::max)(end, x[1]); - - fSubPixelYStart = fSubPixelYEnd; - fSubPixelYEnd = 1.0f; - } - - // last line - if (yy == (int)floorf(y[2])) - { - start = (std::min)(start, x[2]); - end = (std::max)(end, x[2]); - } - else - { - // top part without middle corner line - if (yy < (int)floorf(y[1])) - { - fX1toX2 += fX1toX2step * (fSubPixelYEnd - fSubPixelYStart); - start = (std::min)(start, fX1toX2); - end = (std::max)(end, fX1toX2); - } - else - { - fX2toX3 += fX2toX3step * (fSubPixelYEnd - fSubPixelYStart); - start = (std::min)(start, fX2toX3); - end = (std::max)(end, fX2toX3); - } - - fX1toX3 += fX1toX3step * (fSubPixelYEnd - fSubPixelYStart); - start = (std::min)(start, fX1toX3); - end = (std::max)(end, fX1toX3); - } - - if (yy >= m_iMinY && yy <= m_iMaxY) - { - if (!bTriangleCallDone) - { - inpSink->Triangle(yy); - bTriangleCallDone = true; - } - - lambertHorizlineConservative(start, end, yy, inpSink); - } - } -} - - - -void CSimpleTriangleRasterizer::CallbackFillSubpixelCorrect(float _x[3], float _y[3], IRasterizeSink* inpSink) -{ - float x[3], y[3]; - - CopyAndSortY(_x, _y, x, y); - - if (fabs(y[0] - floorf(y[0])) < FLT_EPSILON) - { - y[0] -= FLT_EPSILON; - } - - // Calculate interpolation steps - float fX1toX2step = 0.0f; - float fX1toX3step = 0.0f; - float fX2toX3step = 0.0f; - if (fabsf(y[1] - y[0]) > FLT_EPSILON) - { - fX1toX2step = (x[1] - x[0]) / (y[1] - y[0]); - } - if (fabsf(y[2] - y[0]) > FLT_EPSILON) - { - fX1toX3step = (x[2] - x[0]) / (y[2] - y[0]); - } - if (fabsf(y[2] - y[1]) > FLT_EPSILON) - { - fX2toX3step = (x[2] - x[1]) / (y[2] - y[1]); - } - - float fX1toX2 = x[0], fX1toX3 = x[0], fX2toX3 = x[1]; - bool bFirstLine = true; - bool bTriangleCallDone = false; - - y[0] -= 0.5f; - y[1] -= 0.5f; - y[2] -= 0.5f; - // y[0]=y[0]*1023.f/1024.f+1.f; - // y[1]=y[1]*1023.f/1024.f+1.f; - // y[2]=y[2]*1023.f/1024.f+1.f; - - for (int yy = (int)floorf(y[0]); yy <= (int)floorf(y[2]); yy++) - { - float fSubPixelYStart = 0.0f, fSubPixelYEnd = 1.0f; - float start, end; - - // first line - if (bFirstLine) - { - fSubPixelYStart = y[0] - floorf(y[0]); - start = x[0]; - end = x[0]; - bFirstLine = false; - } - else - { - // top part without middle corner line - if (yy <= (int)floorf(y[1])) - { - start = (std::min)(fX1toX2, fX1toX3); - end = (std::max)(fX1toX2, fX1toX3); - } - else - { - start = (std::min)(fX2toX3, fX1toX3); - end = (std::max)(fX2toX3, fX1toX3); - } - } - - // middle corner line - if (yy == (int)floorf(y[1])) - { - fSubPixelYEnd = y[1] - floorf(y[1]); - - fX1toX3 += fX1toX3step * (fSubPixelYEnd - fSubPixelYStart); - - fSubPixelYStart = fSubPixelYEnd; - fSubPixelYEnd = 1.0f; - } - - // last line - if (yy != (int)floorf(y[2])) - { - // top part without middle corner line - if (yy < (int)floorf(y[1])) - { - fX1toX2 += fX1toX2step * (fSubPixelYEnd - fSubPixelYStart); - } - else - { - fX2toX3 += fX2toX3step * (fSubPixelYEnd - fSubPixelYStart); - } - - fX1toX3 += fX1toX3step * (fSubPixelYEnd - fSubPixelYStart); - } - - if (start != end) - { - if (yy >= m_iMinY && yy <= m_iMaxY) - { - if (!bTriangleCallDone) - { - inpSink->Triangle(yy); - bTriangleCallDone = true; - } - - lambertHorizlineSubpixelCorrect(start, end, yy, inpSink); - } - } - } -} - - - - -// shrink triangle by n pixel, optimizable -void CSimpleTriangleRasterizer::ShrinkTriangle(float inoutfX[3], float inoutfY[3], float infAmount) -{ - float fX[3] = { inoutfX[0], inoutfX[1], inoutfX[2] }; - float fY[3] = { inoutfY[0], inoutfY[1], inoutfY[2] }; - - /* - // move edge to opposing vertex - float dx,dy,fLength; - - for(int a=0;a<3;a++) - { - int b=a+1;if(b>=3)b=0; - int c=b+1;if(c>=3)c=0; - - dx=fX[a]-(fX[b]+fX[c])*0.5f; - dy=fY[a]-(fY[b]+fY[c])*0.5f; - fLength=(float)sqrt(dx*dx+dy*dy); - if(fLength>1.0f) - { - dx/=fLength;dy/=fLength; - inoutfX[b]+=dx;inoutfY[b]+=dy; - inoutfX[c]+=dx;inoutfY[c]+=dy; - } - } - */ - - /* - // move vertex to opposing edge - float dx,dy,fLength; - - for(int a=0;a<3;a++) - { - int b=a+1;if(b>=3)b=0; - int c=b+1;if(c>=3)c=0; - - dx=fX[a]-(fX[b]+fX[c])*0.5f; - dy=fY[a]-(fY[b]+fY[c])*0.5f; - fLength=(float)sqrt(dx*dx+dy*dy); - if(fLength>1.0f) - { - dx/=fLength;dy/=fLength; - inoutfX[a]-=dx;inoutfY[a]-=dy; - } - } - */ - - // move vertex to get edges shifted perpendicular for 1 unit - for (int a = 0; a < 3; a++) - { - float dx1, dy1, dx2, dy2, fLength; - - int b = a + 1; - if (b >= 3) - { - b = 0; - } - int c = b + 1; - if (c >= 3) - { - c = 0; - } - - dx1 = fX[b] - fX[a]; - dy1 = fY[b] - fY[a]; - fLength = (float)sqrt(dx1 * dx1 + dy1 * dy1); - if (infAmount > 0) - { - if (fLength < infAmount) - { - continue; - } - } - if (fLength == 0.0f) - { - continue; - } - dx1 /= fLength; - dy1 /= fLength; - - dx2 = fX[c] - fX[a]; - dy2 = fY[c] - fY[a]; - fLength = (float)sqrt(dx2 * dx2 + dy2 * dy2); - if (infAmount > 0) - { - if (fLength < infAmount) - { - continue; - } - } - if (fLength == 0.0f) - { - continue; - } - dx2 /= fLength; - dy2 /= fLength; - - inoutfX[a] += (dx1 + dx2) * infAmount; - inoutfY[a] += (dy1 + dy2) * infAmount; - } -} diff --git a/Code/Editor/LightmapCompiler/SimpleTriangleRasterizer.h b/Code/Editor/LightmapCompiler/SimpleTriangleRasterizer.h deleted file mode 100644 index bcfdd7b6da..0000000000 --- a/Code/Editor/LightmapCompiler/SimpleTriangleRasterizer.h +++ /dev/null @@ -1,181 +0,0 @@ -/* - * Copyright (c) Contributors to the Open 3D Engine Project. - * For complete copyright and license terms please see the LICENSE at the root of this distribution. - * - * SPDX-License-Identifier: Apache-2.0 OR MIT - * - */ - - -#ifndef CRYINCLUDE_EDITOR_LIGHTMAPCOMPILER_SIMPLETRIANGLERASTERIZER_H -#define CRYINCLUDE_EDITOR_LIGHTMAPCOMPILER_SIMPLETRIANGLERASTERIZER_H -#pragma once - -class CSimpleTriangleRasterizer -{ -public: - - class IRasterizeSink - { - public: - - //! is called once per triangel for the first possible visible line - //! /param iniStartY - virtual void Triangle([[maybe_unused]] const int iniStartY) - { - } - - //! callback function - //! /param infXLeft included - not clipped against left and reight border - //! /param infXRight excluded - not clipped against left and reight border - //! /param iniXLeft included - //! /param iniXRight excluded - //! /param iniY - virtual void Line(const float infXLeft, const float infXRight, - const int iniXLeft, const int iniXRight, const int iniY) = 0; - }; - - typedef unsigned long DWORD; - - // ----------------------------------------------------- - - //! implementation sink sample - class CDWORDFlatFill - : public IRasterizeSink - { - public: - - //! constructor - CDWORDFlatFill(DWORD* inpBuffer, const DWORD indwPitchInPixels, DWORD indwValue) - { - m_dwValue = indwValue; - m_pBuffer = inpBuffer; - m_dwPitchInPixels = indwPitchInPixels; - } - - virtual void Triangle(const int iniY) - { - m_pBufferLine = &m_pBuffer[iniY * m_dwPitchInPixels]; - } - - virtual void Line([[maybe_unused]] const float infXLeft, [[maybe_unused]] const float infXRight, - const int iniLeft, const int iniRight, [[maybe_unused]] const int iniY) - { - DWORD* mem = &m_pBufferLine[iniLeft]; - - for (int x = iniLeft; x < iniRight; x++) - { - *mem++ = m_dwValue; - } - - m_pBufferLine += m_dwPitchInPixels; - } - - private: - DWORD m_dwValue; //!< fill value - DWORD* m_pBufferLine; //!< to get rid of the multiplication per line - - DWORD m_dwPitchInPixels; //!< in DWORDS, not in Bytes - DWORD* m_pBuffer; //!< pointer to the buffer - }; - - // ----------------------------------------------------- - - //! constructor - //! /param iniWidth excluded - //! /param iniHeight excluded - CSimpleTriangleRasterizer(const int iniWidth, const int iniHeight) - { - m_iMinX = 0; - m_iMinY = 0; - m_iMaxX = iniWidth - 1; - m_iMaxY = iniHeight - 1; - } - /* - //! constructor - //! /param iniMinX included - //! /param iniMinY included - //! /param iniMaxX included - //! /param iniMaxY included - CSimpleTriangleRasterizer( const int iniMinX, const int iniMinY, const int iniMaxX, const int iniMaxY ) - { - m_iMinX=iniMinX; - m_iMinY=iniMinY; - m_iMaxX=iniMaxX; - m_iMaxY=iniMaxY; - } - */ - //! simple triangle filler with clipping (optimizable), not subpixel correct - //! /param pBuffer pointer o the color buffer - //! /param indwWidth width of the color buffer - //! /param indwHeight height of the color buffer - //! /param x array of the x coordiantes of the three vertices - //! /param y array of the x coordiantes of the three vertices - //! /param indwValue value of the triangle - void DWORDFlatFill(DWORD* inpBuffer, const DWORD indwPitchInPixels, float x[3], float y[3], DWORD indwValue, bool inbConservative) - { - CDWORDFlatFill pix(inpBuffer, indwPitchInPixels, indwValue); - - if (inbConservative) - { - CallbackFillConservative(x, y, &pix); - } - else - { - CallbackFillSubpixelCorrect(x, y, &pix); - } - } - - // Rectangle around triangle - more stable - use for debugging purpose - void CallbackFillRectConservative(float x[3], float y[3], IRasterizeSink * inpSink); - - - //! subpixel correct triangle filler (conservative or not conservative) - //! \param pBuffer pointe to the DWORD - //! \param indwWidth width of the buffer pBuffer pointes to - //! \param indwHeight height of the buffer pBuffer pointes to - //! \param x array of the x coordiantes of the three vertices - //! \param y array of the x coordiantes of the three vertices - //! \param inpSink pointer to the sink interface (is called per triangle and per triangle line) - void CallbackFillConservative(float x[3], float y[3], IRasterizeSink * inpSink); - - //! subpixel correct triangle filler (conservative or not conservative) - //! \param pBuffer pointe to the DWORD - //! \param indwWidth width of the buffer pBuffer pointes to - //! \param indwHeight height of the buffer pBuffer pointes to - //! \param x array of the x coordiantes of the three vertices - //! \param y array of the x coordiantes of the three vertices - //! \param inpSink pointer to the sink interface (is called per triangle and per triangle line) - void CallbackFillSubpixelCorrect(float x[3], float y[3], IRasterizeSink * inpSink); - - //! - //! /param inoutfX - //! /param inoutfY - //! /param infAmount could be positive or negative - static void ShrinkTriangle(float inoutfX[3], float inoutfY[3], float infAmount); - -private: - - // Clipping Rect; - - int m_iMinX; //!< minimum x value included - int m_iMinY; //!< minimum y value included - int m_iMaxX; //!< maximum x value included - int m_iMaxY; //!< maximum x value included - - void lambertHorizlineConservative(float fx1, float fx2, int y, IRasterizeSink* inpSink); - void lambertHorizlineSubpixelCorrect(float fx1, float fx2, int y, IRasterizeSink* inpSink); - void CopyAndSortY(const float infX[3], const float infY[3], float outfX[3], float outfY[3]); -}; - - -// extension ideas: -// * callback with coverage mask (possible non ordered sampling) -// * z-buffer behaviour -// * gouraud shading -// * texture mapping with nearest/bicubic/bilinear filter -// * further primitives: thick line, ellipse -// * build a template version -// * - -#endif // CRYINCLUDE_EDITOR_LIGHTMAPCOMPILER_SIMPLETRIANGLERASTERIZER_H diff --git a/Code/Editor/LyViewPaneNames.h b/Code/Editor/LyViewPaneNames.h index 1761235f4b..5b32b66741 100644 --- a/Code/Editor/LyViewPaneNames.h +++ b/Code/Editor/LyViewPaneNames.h @@ -44,7 +44,7 @@ namespace LyViewPane static const char* const SubstanceEditor = "Substance Editor"; static const char* const VegetationEditor = "Vegetation Editor"; static const char* const LandscapeCanvas = "Landscape Canvas"; - static const char* const AnimationEditor = "EMotion FX Animation Editor (PREVIEW)"; + static const char* const AnimationEditor = "EMotion FX Animation Editor"; static const char* const PhysXConfigurationEditor = "PhysX Configuration (PREVIEW)"; static const char* const SliceRelationships = "Slice Relationship View (PREVIEW)"; diff --git a/Code/Editor/MainStatusBar.cpp b/Code/Editor/MainStatusBar.cpp index acc7f664df..65502eaba5 100644 --- a/Code/Editor/MainStatusBar.cpp +++ b/Code/Editor/MainStatusBar.cpp @@ -27,7 +27,6 @@ // Editor #include "MainStatusBarItems.h" -#include "CryLibrary.h" #include "ProcessInfo.h" diff --git a/Code/Editor/MainWindow.cpp b/Code/Editor/MainWindow.cpp index ed72cd9170..bbebac96a3 100644 --- a/Code/Editor/MainWindow.cpp +++ b/Code/Editor/MainWindow.cpp @@ -47,6 +47,7 @@ AZ_POP_DISABLE_WARNING #include #include #include +#include #include // AzQtComponents @@ -445,11 +446,11 @@ void MainWindow::Initialize() { m_viewPaneManager->SetMainWindow(m_viewPaneHost, &m_settings, /*unused*/ QByteArray()); + InitActions(); + RegisterStdViewClasses(); InitCentralWidget(); - InitActions(); - // load toolbars ("shelves") and macros GetIEditor()->GetToolBoxManager()->Load(m_actionManager); @@ -519,7 +520,7 @@ MainWindow* MainWindow::instance() void MainWindow::closeEvent(QCloseEvent* event) { - gSettings.Save(); + gSettings.Save(true); AzFramework::SystemCursorState currentCursorState; bool isInGameMode = false; @@ -576,7 +577,6 @@ void MainWindow::closeEvent(QCloseEvent* event) } // Close all edit panels. GetIEditor()->ClearSelection(); - GetIEditor()->GetObjectManager()->EndEditParams(); // force clean up of all deferred deletes, so that we don't have any issues with windows from plugins not being deleted yet qApp->sendPostedEvents(nullptr, QEvent::DeferredDelete); @@ -643,11 +643,11 @@ void MainWindow::InitActions() .SetStatusTip(tr("Create a new slice")); am->AddAction(ID_FILE_OPEN_SLICE, tr("Open Slice...")) .SetStatusTip(tr("Open an existing slice")); -#endif am->AddAction(ID_FILE_SAVE_SELECTED_SLICE, tr("Save selected slice")).SetShortcut(tr("Alt+S")) .SetStatusTip(tr("Save the selected slice to the first level root")); am->AddAction(ID_FILE_SAVE_SLICE_TO_ROOT, tr("Save Slice to root")).SetShortcut(tr("Ctrl+Alt+S")) .SetStatusTip(tr("Save the selected slice to the top level root")); +#endif am->AddAction(ID_FILE_SAVE_LEVEL, tr("&Save")) .SetShortcut(tr("Ctrl+S")) .SetReserved() @@ -677,7 +677,9 @@ void MainWindow::InitActions() .RegisterUpdateCallback(cryEdit, &CCryEditApp::OnUpdateSelected); am->AddAction(ID_FILE_EXPORTOCCLUSIONMESH, tr("Export Occlusion Mesh")); am->AddAction(ID_FILE_EDITLOGFILE, tr("Show Log File")); +#ifdef ENABLE_SLICE_EDITOR am->AddAction(ID_FILE_RESAVESLICES, tr("Resave All Slices")); +#endif am->AddAction(ID_FILE_PROJECT_MANAGER_SETTINGS, tr("Edit Project Settings...")); am->AddAction(ID_FILE_PROJECT_MANAGER_NEW, tr("New Project...")); am->AddAction(ID_FILE_PROJECT_MANAGER_OPEN, tr("Open Project...")); @@ -708,14 +710,10 @@ void MainWindow::InitActions() .SetShortcut(QKeySequence::Undo) .SetReserved() .SetStatusTip(tr("Undo last operation")) - //.SetMenu(new QMenu("FIXME")) - .SetApplyHoverEffect() .RegisterUpdateCallback(cryEdit, &CCryEditApp::OnUpdateUndo); am->AddAction(ID_REDO, tr("&Redo")) .SetShortcut(AzQtComponents::RedoKeySequence) .SetReserved() - //.SetMenu(new QMenu("FIXME")) - .SetApplyHoverEffect() .SetStatusTip(tr("Redo last undo operation")) .RegisterUpdateCallback(cryEdit, &CCryEditApp::OnUpdateRedo); @@ -731,7 +729,6 @@ void MainWindow::InitActions() // Modify actions am->AddAction(AzToolsFramework::EditModeMove, tr("Move")) .SetIcon(Style::icon("Move")) - .SetApplyHoverEffect() .SetShortcut(tr("1")) .SetToolTip(tr("Move (1)")) .SetCheckable(true) @@ -757,7 +754,6 @@ void MainWindow::InitActions() }); am->AddAction(AzToolsFramework::EditModeRotate, tr("Rotate")) .SetIcon(Style::icon("Translate")) - .SetApplyHoverEffect() .SetShortcut(tr("2")) .SetToolTip(tr("Rotate (2)")) .SetCheckable(true) @@ -783,7 +779,6 @@ void MainWindow::InitActions() }); am->AddAction(AzToolsFramework::EditModeScale, tr("Scale")) .SetIcon(Style::icon("Scale")) - .SetApplyHoverEffect() .SetShortcut(tr("3")) .SetToolTip(tr("Scale (3)")) .SetCheckable(true) @@ -806,29 +801,40 @@ void MainWindow::InitActions() EditorTransformComponentSelectionRequests::Mode::Scale); }); - am->AddAction(AzToolsFramework::SnapToGrid, tr("Snap to grid")) + am->AddAction(AzToolsFramework::SnapToGrid, tr("Grid snapping")) .SetIcon(Style::icon("Grid")) - .SetApplyHoverEffect() + .SetStatusTip(tr("Toggle grid snapping")) .SetShortcut(tr("G")) - .SetToolTip(tr("Snap to grid (G)")) - .SetStatusTip(tr("Toggles snap to grid")) .SetCheckable(true) - .RegisterUpdateCallback([](QAction* action) { - Q_ASSERT(action->isCheckable()); - action->setChecked(SandboxEditor::GridSnappingEnabled()); - }) - .Connect(&QAction::triggered, []() { SandboxEditor::SetGridSnapping(!SandboxEditor::GridSnappingEnabled()); }); + .RegisterUpdateCallback( + [](QAction* action) + { + Q_ASSERT(action->isCheckable()); + action->setChecked(SandboxEditor::GridSnappingEnabled()); + }) + .Connect( + &QAction::triggered, + [] + { + SandboxEditor::SetGridSnapping(!SandboxEditor::GridSnappingEnabled()); + }); - am->AddAction(AzToolsFramework::SnapAngle, tr("Snap angle")) + am->AddAction(AzToolsFramework::SnapAngle, tr("Angle snapping")) .SetIcon(Style::icon("Angle")) - .SetApplyHoverEffect() - .SetStatusTip(tr("Snap angle")) + .SetStatusTip(tr("Toggle angle snapping")) .SetCheckable(true) - .RegisterUpdateCallback([](QAction* action) { - Q_ASSERT(action->isCheckable()); - action->setChecked(SandboxEditor::AngleSnappingEnabled()); - }) - .Connect(&QAction::triggered, []() { SandboxEditor::SetAngleSnapping(!SandboxEditor::AngleSnappingEnabled()); }); + .RegisterUpdateCallback( + [](QAction* action) + { + Q_ASSERT(action->isCheckable()); + action->setChecked(SandboxEditor::AngleSnappingEnabled()); + }) + .Connect( + &QAction::triggered, + [] + { + SandboxEditor::SetAngleSnapping(!SandboxEditor::AngleSnappingEnabled()); + }); // Display actions am->AddAction(ID_SWITCHCAMERA_DEFAULTCAMERA, tr("Default Camera")).SetCheckable(true) @@ -928,9 +934,41 @@ void MainWindow::InitActions() .SetStatusTip(tr("Cycle 2D Viewport")) .RegisterUpdateCallback(cryEdit, &CCryEditApp::OnUpdateNonGameMode); #endif - am->AddAction(ID_DISPLAY_SHOWHELPERS, tr("Show/Hide Helpers")) + am->AddAction(AzToolsFramework::Helpers, tr("Show Helpers")) .SetShortcut(tr("Shift+Space")) - .SetToolTip(tr("Show/Hide Helpers (Shift+Space)")); + .SetToolTip(tr("Show/Hide Helpers (Shift+Space)")) + .SetCheckable(true) + .RegisterUpdateCallback( + [](QAction* action) + { + Q_ASSERT(action->isCheckable()); + action->setChecked(AzToolsFramework::HelpersVisible()); + }) + .Connect( + &QAction::triggered, + []() + { + AzToolsFramework::SetHelpersVisible(!AzToolsFramework::HelpersVisible()); + AzToolsFramework::ViewportInteraction::ViewportSettingsNotificationBus::Broadcast( + &AzToolsFramework::ViewportInteraction::ViewportSettingNotifications::OnDrawHelpersChanged, + AzToolsFramework::HelpersVisible()); + }); + am->AddAction(AzToolsFramework::Icons, tr("Show Icons")) + .SetShortcut(tr("Ctrl+Space")) + .SetToolTip(tr("Show/Hide Icons (Ctrl+Space)")) + .SetCheckable(true) + .RegisterUpdateCallback( + [](QAction* action) + { + Q_ASSERT(action->isCheckable()); + action->setChecked(AzToolsFramework::IconsVisible()); + }) + .Connect( + &QAction::triggered, + []() + { + AzToolsFramework::SetIconsVisible(!AzToolsFramework::IconsVisible()); + }); // Audio actions am->AddAction(ID_SOUND_STOPALLSOUNDS, tr("Stop All Sounds")) @@ -939,29 +977,28 @@ void MainWindow::InitActions() .Connect(&QAction::triggered, this, &MainWindow::OnRefreshAudioSystem); // Game actions - am->AddAction(ID_VIEW_SWITCHTOGAME, tr("Play &Game")) + am->AddAction(ID_VIEW_SWITCHTOGAME, tr("Play Game")) .SetIcon(QIcon(":/stylesheet/img/UI20/toolbar/Play.svg")) + .SetToolTip(tr("Play Game")) + .SetStatusTip(tr("Activate the game input mode")) + .SetCheckable(true) + .RegisterUpdateCallback(cryEdit, &CCryEditApp::OnUpdatePlayGame); + am->AddAction(ID_VIEW_SWITCHTOGAME_VIEWPORT, tr("Play Game")) .SetShortcut(tr("Ctrl+G")) .SetToolTip(tr("Play Game (Ctrl+G)")) .SetStatusTip(tr("Activate the game input mode")) - .SetApplyHoverEffect() - .SetCheckable(true) .RegisterUpdateCallback(cryEdit, &CCryEditApp::OnUpdatePlayGame); - am->AddAction(ID_VIEW_SWITCHTOGAME_FULLSCREEN, tr("Play &Game (Maximized)")) + am->AddAction(ID_VIEW_SWITCHTOGAME_FULLSCREEN, tr("Play Game (Maximized)")) .SetShortcut(tr("Ctrl+Shift+G")) .SetStatusTip(tr("Activate the game input mode (maximized)")) - .SetIcon(Style::icon("Play")) - .SetApplyHoverEffect() - .SetCheckable(true); + .RegisterUpdateCallback(cryEdit, &CCryEditApp::OnUpdatePlayGame); am->AddAction(ID_TOOLBAR_WIDGET_PLAYCONSOLE_LABEL, tr("Play Controls")) .SetText(tr("Play Controls")); am->AddAction(ID_SWITCH_PHYSICS, tr("Simulate")) .SetIcon(QIcon(":/stylesheet/img/UI20/toolbar/Simulate_Physics.svg")) .SetShortcut(tr("Ctrl+P")) .SetToolTip(tr("Simulate (Ctrl+P)")) - .SetCheckable(true) .SetStatusTip(tr("Enable processing of Physics and AI.")) - .SetApplyHoverEffect() .SetCheckable(true) .RegisterUpdateCallback(cryEdit, &CCryEditApp::OnSwitchPhysicsUpdate); am->AddAction(ID_GAME_SYNCPLAYER, tr("Move Player and Camera Separately")).SetCheckable(true) @@ -1051,8 +1088,7 @@ void MainWindow::InitActions() // Editors Toolbar actions am->AddAction(ID_OPEN_ASSET_BROWSER, tr("Asset browser")) - .SetToolTip(tr("Open Asset Browser")) - .SetApplyHoverEffect(); + .SetToolTip(tr("Open Asset Browser")); AZ::EBusReduceResult> emfxEnabled(false); using AnimationRequestBus = AzToolsFramework::EditorAnimationSystemRequestsBus; @@ -1061,9 +1097,8 @@ void MainWindow::InitActions() if (emfxEnabled.value) { QAction* action = am->AddAction(ID_OPEN_EMOTIONFX_EDITOR, tr("Animation Editor")) - .SetToolTip(tr("Open Animation Editor (PREVIEW)")) - .SetIcon(QIcon(":/EMotionFX/EMFX_icon_32x32.png")) - .SetApplyHoverEffect(); + .SetToolTip(tr("Open Animation Editor")) + .SetIcon(QIcon(":/EMotionFX/EMFX_icon_32x32.png")); QObject::connect(action, &QAction::triggered, this, []() { QtViewPaneManager::instance()->OpenPane(LyViewPane::AnimationEditor); }); @@ -1071,12 +1106,10 @@ void MainWindow::InitActions() am->AddAction(ID_OPEN_AUDIO_CONTROLS_BROWSER, tr("Audio Controls Editor")) .SetToolTip(tr("Open Audio Controls Editor")) - .SetIcon(Style::icon("Audio")) - .SetApplyHoverEffect(); + .SetIcon(Style::icon("Audio")); am->AddAction(ID_OPEN_UICANVASEDITOR, tr(LyViewPane::UiEditor)) - .SetToolTip(tr("Open UI Editor")) - .SetApplyHoverEffect(); + .SetToolTip(tr("Open UI Editor")); // Edit Mode Toolbar Actions am->AddAction(IDC_SELECTION_MASK, tr("Selected Object Types")); @@ -1089,12 +1122,10 @@ void MainWindow::InitActions() // Object Toolbar Actions am->AddAction(ID_GOTO_SELECTED, tr("Go to selected object")) .SetIcon(Style::icon("select_object")) - .SetApplyHoverEffect() .Connect(&QAction::triggered, this, &MainWindow::OnGotoSelected); // Misc Toolbar Actions - am->AddAction(ID_OPEN_SUBSTANCE_EDITOR, tr("Open Substance Editor")) - .SetApplyHoverEffect(); + am->AddAction(ID_OPEN_SUBSTANCE_EDITOR, tr("Open Substance Editor")); } void MainWindow::InitToolActionHandlers() @@ -1266,7 +1297,9 @@ void MainWindow::OnGameModeChanged(bool inGameMode) // block signals on the switch to game actions before setting the checked state, as // setting the checked state triggers the action, which will re-enter this function // and result in an infinite loop - AZStd::vector actions = { m_actionManager->GetAction(ID_VIEW_SWITCHTOGAME), m_actionManager->GetAction(ID_VIEW_SWITCHTOGAME_FULLSCREEN) }; + AZStd::vector actions = { m_actionManager->GetAction(ID_VIEW_SWITCHTOGAME_VIEWPORT), + m_actionManager->GetAction(ID_VIEW_SWITCHTOGAME_FULLSCREEN), + m_actionManager->GetAction(ID_VIEW_SWITCHTOGAME)}; for (auto action : actions) { action->blockSignals(true); diff --git a/Code/Editor/MainWindow.qrc b/Code/Editor/MainWindow.qrc index 4506a4a2a8..c68e05ef41 100644 --- a/Code/Editor/MainWindow.qrc +++ b/Code/Editor/MainWindow.qrc @@ -166,7 +166,6 @@ arhitype_tree_01.png arhitype_tree_02.png arhitype_tree_03.png - water.png bmp00005_00.png bmp00005_01.png bmp00005_02.png diff --git a/Code/Editor/NewLevelDialog.cpp b/Code/Editor/NewLevelDialog.cpp index c773acdb6f..a97eb30f57 100644 --- a/Code/Editor/NewLevelDialog.cpp +++ b/Code/Editor/NewLevelDialog.cpp @@ -115,7 +115,6 @@ CNewLevelDialog::~CNewLevelDialog() void CNewLevelDialog::OnStartup() { UpdateData(false); - setFocus(); } void CNewLevelDialog::UpdateData(bool fromUi) diff --git a/Code/Editor/NewLevelDialog.ui b/Code/Editor/NewLevelDialog.ui index 14227fbb53..93a88dc897 100644 --- a/Code/Editor/NewLevelDialog.ui +++ b/Code/Editor/NewLevelDialog.ui @@ -133,6 +133,9 @@ 1 + + LEVEL + diff --git a/Code/Editor/Objects/AxisGizmo.cpp b/Code/Editor/Objects/AxisGizmo.cpp index a603b2615d..7215853854 100644 --- a/Code/Editor/Objects/AxisGizmo.cpp +++ b/Code/Editor/Objects/AxisGizmo.cpp @@ -329,7 +329,6 @@ bool CAxisGizmo::MouseCallback(CViewport* view, EMouseEvent event, QPoint& point hc.b2DViewport = view->GetType() != ET_ViewportCamera; hc.point2d = point; view->ViewToWorldRay(point, hc.raySrc, hc.rayDir); - bool bHit = false; if (HitTest(hc)) { switch (hc.manipulatorMode) @@ -344,7 +343,6 @@ bool CAxisGizmo::MouseCallback(CViewport* view, EMouseEvent event, QPoint& point view->SetCurrentCursor(STD_CURSOR_SCALE); break; } - bHit = true; } } } diff --git a/Code/Editor/Objects/BaseObject.cpp b/Code/Editor/Objects/BaseObject.cpp index 4ae01faddf..86840789dd 100644 --- a/Code/Editor/Objects/BaseObject.cpp +++ b/Code/Editor/Objects/BaseObject.cpp @@ -33,8 +33,6 @@ #include "ViewManager.h" #include "IEditorImpl.h" #include "GameEngine.h" -#include -#include // To use the Andrew's algorithm in order to make convex hull from the points, this header is needed. #include "Util/GeometryUtil.h" @@ -53,18 +51,16 @@ class CUndoBaseObject : public IUndoObject { public: - CUndoBaseObject(CBaseObject* pObj, const char* undoDescription); + CUndoBaseObject(CBaseObject* pObj); protected: int GetSize() override { return sizeof(*this); } - QString GetDescription() override { return m_undoDescription; }; QString GetObjectName() override; void Undo(bool bUndo) override; void Redo() override; protected: - QString m_undoDescription; GUID m_guid; XmlNodeRef m_undo; XmlNodeRef m_redo; @@ -77,11 +73,10 @@ class CUndoBaseObjectMinimal : public IUndoObject { public: - CUndoBaseObjectMinimal(CBaseObject* obj, const char* undoDescription, int flags); + CUndoBaseObjectMinimal(CBaseObject* obj, int flags); protected: int GetSize() override { return sizeof(*this); } - QString GetDescription() override { return m_undoDescription; }; QString GetObjectName() override; void Undo(bool bUndo) override; @@ -101,7 +96,6 @@ private: void SetTransformsFromState(CBaseObject* pObject, const StateStruct& state, bool bUndo); GUID m_guid; - QString m_undoDescription; StateStruct m_undoState; StateStruct m_redoState; }; @@ -167,7 +161,6 @@ private: } int GetSize() override { return sizeof(CUndoAttachBaseObject); } - QString GetDescription() override { return "Attachment Changed"; } GUID m_attachedObjectGUID; GUID m_parentObjectGUID; @@ -176,11 +169,10 @@ private: }; ////////////////////////////////////////////////////////////////////////// -CUndoBaseObject::CUndoBaseObject(CBaseObject* obj, const char* undoDescription) +CUndoBaseObject::CUndoBaseObject(CBaseObject* obj) { // Stores the current state of this object. assert(obj != 0); - m_undoDescription = undoDescription; m_guid = obj->GetId(); m_redo = nullptr; @@ -254,11 +246,10 @@ void CUndoBaseObject::Redo() } ////////////////////////////////////////////////////////////////////////// -CUndoBaseObjectMinimal::CUndoBaseObjectMinimal(CBaseObject* pObj, const char* undoDescription, [[maybe_unused]] int flags) +CUndoBaseObjectMinimal::CUndoBaseObjectMinimal(CBaseObject* pObj, [[maybe_unused]] int flags) { // Stores the current state of this object. assert(pObj != nullptr); - m_undoDescription = undoDescription; m_guid = pObj->GetId(); ZeroStruct(m_redoState); @@ -287,7 +278,7 @@ QString CUndoBaseObjectMinimal::GetObjectName() void CUndoBaseObjectMinimal::Undo(bool bUndo) { CBaseObject* pObject = GetIEditor()->GetObjectManager()->FindObject(m_guid); - if (!pObject || pObject->GetType() == OBJTYPE_DUMMY) + if (!pObject) { return; } @@ -316,7 +307,7 @@ void CUndoBaseObjectMinimal::Undo(bool bUndo) void CUndoBaseObjectMinimal::Redo() { CBaseObject* pObject = GetIEditor()->GetObjectManager()->FindObject(m_guid); - if (!pObject || pObject->GetType() == OBJTYPE_DUMMY) + if (!pObject) { return; } @@ -382,7 +373,6 @@ CBaseObject::CBaseObject() , m_rotate(IDENTITY) , m_scale(1, 1, 1) , m_guid(GUID_NULL) - , m_floorNumber(-1) , m_flags(0) , m_nTextureIcon(0) , m_color(QColor(255, 255, 255)) @@ -398,11 +388,9 @@ CBaseObject::CBaseObject() , m_bMatrixInWorldSpace(false) , m_bMatrixValid(false) , m_bWorldBoxValid(false) - , m_nMaterialLayersMask(0) , m_nMinSpec(0) , m_vDrawIconPos(0, 0, 0) , m_nIconFlags(0) - , m_hideOrder(CBaseObject::s_invalidHiddenID) { m_worldBounds.min.Set(0, 0, 0); m_worldBounds.max.Set(0, 0, 0); @@ -431,7 +419,6 @@ bool CBaseObject::Init([[maybe_unused]] IEditor* ie, CBaseObject* prev, [[maybe_ SetLocalTM(prev->GetPos(), prev->GetRotation(), prev->GetScale()); SetArea(prev->GetArea()); SetColor(prev->GetColor()); - m_nMaterialLayersMask = prev->m_nMaterialLayersMask; SetMinSpec(prev->GetMinSpec(), false); // Copy all basic variables. @@ -488,7 +475,7 @@ void CBaseObject::SetName(const QString& name) return; } - StoreUndo("Name"); + StoreUndo(); // Notification is expensive and not required if this is during construction. bool notify = (!m_name.isEmpty()); @@ -500,7 +487,6 @@ void CBaseObject::SetName(const QString& name) if (notify) { NotifyListeners(ON_RENAME); - static_cast(GetIEditor()->GetObjectManager())->NotifyObjectListeners(this, ON_RENAME); } } @@ -529,47 +515,6 @@ const QString& CBaseObject::GetName() const return m_name; } -////////////////////////////////////////////////////////////////////////// -QString CBaseObject::GetWarningsText() const -{ - QString warnings; - - if (gSettings.viewports.bShowScaleWarnings) - { - const EScaleWarningLevel scaleWarningLevel = GetScaleWarningLevel(); - if (scaleWarningLevel == eScaleWarningLevel_Rescaled) - { - warnings += "\\n Warning: Object Scale is not 100%."; - } - else if (scaleWarningLevel == eScaleWarningLevel_RescaledNonUniform) - { - warnings += "\\n Warning: Object has non-uniform scale."; - } - } - - if (gSettings.viewports.bShowRotationWarnings) - { - const ERotationWarningLevel rotationWarningLevel = GetRotationWarningLevel(); - - if (rotationWarningLevel == eRotationWarningLevel_Rotated) - { - warnings += "\\n Warning: Object is rotated."; - } - else if (rotationWarningLevel == eRotationWarningLevel_RotatedNonRectangular) - { - warnings += "\\n Warning: Object is rotated non-orthogonally."; - } - } - - return warnings; -} - -////////////////////////////////////////////////////////////////////////// -bool CBaseObject::IsSameClass(CBaseObject* obj) -{ - return GetClassDesc() == obj->GetClassDesc(); -} - ////////////////////////////////////////////////////////////////////////// bool CBaseObject::SetPos(const Vec3& pos, int flags) { @@ -615,7 +560,7 @@ bool CBaseObject::SetPos(const Vec3& pos, int flags) ////////////////////////////////////////////////////////////////////////// if (!bPositionDelegated && (flags & eObjectUpdateFlags_RestoreUndo) == 0 && (flags & eObjectUpdateFlags_Animated) == 0) { - StoreUndo("Position", true, flags); + StoreUndo(true, flags); } if (!bPositionDelegated) @@ -659,7 +604,7 @@ bool CBaseObject::SetRotation(const Quat& rotate, int flags) if (!bRotationDelegated && (flags & eObjectUpdateFlags_RestoreUndo) == 0 && (flags & eObjectUpdateFlags_Animated) == 0) { - StoreUndo("Rotate", true, flags); + StoreUndo(true, flags); } if (!bRotationDelegated) @@ -704,7 +649,7 @@ bool CBaseObject::SetScale(const Vec3& scale, int flags) if (!bScaleDelegated && (flags & eObjectUpdateFlags_RestoreUndo) == 0 && (flags & eObjectUpdateFlags_Animated) == 0) { - StoreUndo("Scale", true, flags); + StoreUndo(true, flags); } if (!bScaleDelegated) @@ -763,7 +708,7 @@ void CBaseObject::ChangeColor(const QColor& color) return; } - StoreUndo("Color", true); + StoreUndo(true); SetColor(color); SetModified(false); @@ -783,7 +728,7 @@ void CBaseObject::SetArea(float area) return; } - StoreUndo("Area", true); + StoreUndo(true); m_flattenArea = area; SetModified(false); @@ -953,14 +898,8 @@ void CBaseObject::DrawTextureIcon(DisplayContext& dc, [[maybe_unused]] const Vec } ////////////////////////////////////////////////////////////////////////// -void CBaseObject::DrawWarningIcons(DisplayContext& dc, const Vec3& pos) +void CBaseObject::DrawWarningIcons(DisplayContext& dc, const Vec3&) { - // Don't draw warning icons if they are beyond draw distance - if ((dc.camera->GetPosition() - pos).GetLength() > gSettings.viewports.fWarningIconsDrawDistance) - { - return; - } - if (gSettings.viewports.bShowIcons || gSettings.viewports.bShowSizeBasedIcons) { const int warningIconSizeX = OBJECT_TEXTURE_ICON_SIZEX / 2; @@ -1010,11 +949,8 @@ void CBaseObject::DrawLabel(DisplayContext& dc, const Vec3& pos, const QColor& l labelColor = QColor(0, 0, 0); } - float camDist = dc.camera->GetPosition().GetDistance(pos); - float maxDist = dc.settings->GetLabelsDistance(); - if (camDist < dc.settings->GetLabelsDistance() || (dc.flags & DISPLAY_SELECTION_HELPERS)) + if (dc.flags & DISPLAY_SELECTION_HELPERS) { - float range = maxDist / 2.0f; Vec3 c(static_cast(labelColor.redF()), static_cast(labelColor.greenF()), static_cast(labelColor.redF())); if (IsSelected()) { @@ -1032,10 +968,6 @@ void CBaseObject::DrawLabel(DisplayContext& dc, const Vec3& pos, const QColor& l col[1] = c.y; col[2] = c.z; } - else if (camDist > range) - { - col[3] = col[3] * (1.0f - (camDist - range) / range); - } dc.SetColor(col[0], col[1], col[2], col[3] * alpha); dc.DrawTextLabel(pos, size, GetName().toUtf8().data()); @@ -1196,74 +1128,6 @@ bool CBaseObject::CanBeDrawn(const DisplayContext& dc, bool& outDisplaySelection return bResult; } -////////////////////////////////////////////////////////////////////////// -bool CBaseObject::IsInCameraView(const CCamera& camera) -{ - AABB bbox; - GetBoundBox(bbox); - return (camera.IsAABBVisible_F(AABB(bbox.min, bbox.max))); -} - -////////////////////////////////////////////////////////////////////////// -float CBaseObject::GetCameraVisRatio(const CCamera& camera) -{ - AABB bbox; - GetBoundBox(bbox); - - static const float defaultVisRatio = 1000.0f; - - const float objectHeightSq = max(1.0f, (bbox.max - bbox.min).GetLengthSquared()); - const float camdistSq = (bbox.min - camera.GetPosition()).GetLengthSquared(); - float visRatio = defaultVisRatio; - if (camdistSq > FLT_EPSILON) - { - visRatio = objectHeightSq / camdistSq; - } - - return visRatio; -} - -////////////////////////////////////////////////////////////////////////// -int CBaseObject::MouseCreateCallback(CViewport* view, EMouseEvent event, QPoint& point, int flags) -{ - AZ_PROFILE_FUNCTION(Editor); - - if (event == eMouseMove || event == eMouseLDown) - { - Vec3 pos; - if (GetIEditor()->GetAxisConstrains() != AXIS_TERRAIN) - { - pos = view->MapViewToCP(point); - } - else - { - // Snap to terrain. - bool hitTerrain; - pos = view->ViewToWorld(point, &hitTerrain); - if (hitTerrain) - { - pos.z = GetIEditor()->GetTerrainElevation(pos.x, pos.y) + 1.0f; - } - pos = view->SnapToGrid(pos); - } - SetPos(pos); - - if (event == eMouseLDown) - { - return MOUSECREATE_OK; - } - } - - if (event == eMouseWheel) - { - float angle = 1; - Quat rot = GetRotation(); - rot.SetRotationXYZ(Ang3(0.f, 0.f, rot.GetRotZ() + DEG2RAD(flags > 0 ? angle * (-1) : angle))); - SetRotation(rot); - } - return MOUSECREATE_CONTINUE; -} - ////////////////////////////////////////////////////////////////////////// void CBaseObject::OnEvent(ObjectEvent event) { @@ -1277,18 +1141,13 @@ void CBaseObject::OnEvent(ObjectEvent event) ////////////////////////////////////////////////////////////////////////// -void CBaseObject::SetShared([[maybe_unused]] bool bShared) -{ -} - -////////////////////////////////////////////////////////////////////////// -void CBaseObject::SetHidden(bool bHidden, uint64 hiddenID, bool bAnimated) +void CBaseObject::SetHidden(bool bHidden, bool bAnimated) { if (CheckFlags(OBJFLAG_HIDDEN) != bHidden) { if (!bAnimated) { - StoreUndo("Hide Object"); + StoreUndo(); } if (bHidden) @@ -1300,7 +1159,6 @@ void CBaseObject::SetHidden(bool bHidden, uint64 hiddenID, bool bAnimated) ClearFlags(OBJFLAG_HIDDEN); } - m_hideOrder = hiddenID; UpdateVisibility(!IsHidden()); } } @@ -1310,7 +1168,7 @@ void CBaseObject::SetFrozen(bool bFrozen) { if (CheckFlags(OBJFLAG_FROZEN) != bFrozen) { - StoreUndo("Freeze Object"); + StoreUndo(); if (bFrozen) { SetFlags(OBJFLAG_FROZEN); @@ -1396,14 +1254,6 @@ void CBaseObject::Serialize(CObjectArchive& ar) if (ar.bLoading) { // Loading. - if (ar.ShouldResetInternalMembers()) - { - m_flags = 0; - m_flattenArea = 0.0f; - m_nMinSpec = 0; - m_scale.Set(1.0f, 1.0f, 1.0f); - } - int flags = 0; int oldFlags = m_flags; @@ -1443,7 +1293,6 @@ void CBaseObject::Serialize(CObjectArchive& ar) xmlNode->getAttr("LookAt", lookatId); xmlNode->getAttr("Material", mtlName); xmlNode->getAttr("MinSpec", nMinSpec); - xmlNode->getAttr("FloorNumber", m_floorNumber); if (nMinSpec <= CONFIG_VERYHIGH_SPEC) // Ignore invalid values. { @@ -1507,18 +1356,6 @@ void CBaseObject::Serialize(CObjectArchive& ar) SetModified(false); ////////////////////////////////////////////////////////////////////////// - - if (ar.bUndo) - { - // If we are selected update UI Panel. - xmlNode->getAttr("HideOrder", m_hideOrder); - } - - // We reseted the min spec and deserialized it so set it internally - if (ar.ShouldResetInternalMembers()) - { - SetMinSpec(m_nMinSpec); - } } else { @@ -1530,7 +1367,6 @@ void CBaseObject::Serialize(CObjectArchive& ar) xmlNode->setAttr("Id", m_guid); xmlNode->setAttr("Name", GetName().toUtf8().data()); - xmlNode->setAttr("HideOrder", m_hideOrder); if (m_parent) { @@ -1547,8 +1383,6 @@ void CBaseObject::Serialize(CObjectArchive& ar) xmlNode->setAttr("Pos", GetPos()); } - xmlNode->setAttr("FloorNumber", m_floorNumber); - xmlNode->setAttr("Rotate", m_rotate); if (!IsEquivalent(GetScale(), Vec3(1, 1, 1), 0)) @@ -1641,13 +1475,8 @@ CBaseObject* CBaseObject::FindObject(REFGUID id) const } ////////////////////////////////////////////////////////////////////////// -void CBaseObject::StoreUndo(const char* UndoDescription, bool minimal, int flags) +void CBaseObject::StoreUndo(bool minimal, int flags) { - if (m_objType == OBJTYPE_DUMMY) - { - return; - } - // Don't use Sandbox undo for AZ entities, except for the move & scale tools, which rely on it. const bool isGizmoTool = 0 != (flags & (eObjectUpdateFlags_MoveTool | eObjectUpdateFlags_ScaleTool | eObjectUpdateFlags_UserInput)); if (!isGizmoTool && 0 != (m_flags & OBJFLAG_DONT_SAVE)) @@ -1659,28 +1488,18 @@ void CBaseObject::StoreUndo(const char* UndoDescription, bool minimal, int flags { if (minimal) { - CUndo::Record(new CUndoBaseObjectMinimal(this, UndoDescription, flags)); + CUndo::Record(new CUndoBaseObjectMinimal(this, flags)); } else { - CUndo::Record(new CUndoBaseObject(this, UndoDescription)); + CUndo::Record(new CUndoBaseObject(this)); } } } -////////////////////////////////////////////////////////////////////////// -bool CBaseObject::IsCreateGameObjects() const -{ - return GetObjectManager()->IsCreateGameObjects(); -} - ////////////////////////////////////////////////////////////////////////// QString CBaseObject::GetTypeName() const { - if (m_objType == OBJTYPE_DUMMY) - { - return ""; - } QString className = m_classDesc->ClassName(); QString subClassName = strstr(className.toUtf8().data(), "::"); if (subClassName.isEmpty()) @@ -1689,7 +1508,7 @@ QString CBaseObject::GetTypeName() const } QString name; - name.append(className.mid(0, className.length() - subClassName.length())); + name.append(className.midRef(0, className.length() - subClassName.length())); return name; } @@ -1941,85 +1760,6 @@ bool CBaseObject::HitTestRect(HitContext& hc) return bHit; } -////////////////////////////////////////////////////////////////////////// -bool CBaseObject::HitHelperTest(HitContext& hc) -{ - return HitHelperAtTest(hc, GetWorldPos()); -} - -////////////////////////////////////////////////////////////////////////// -bool CBaseObject::HitHelperAtTest(HitContext& hc, const Vec3& pos) -{ - AZ_PROFILE_FUNCTION(Editor); - - bool bResult = false; - - if (m_nTextureIcon && (gSettings.viewports.bShowIcons || gSettings.viewports.bShowSizeBasedIcons) && !hc.bUseSelectionHelpers) - { - int iconSizeX = OBJECT_TEXTURE_ICON_SIZEX; - int iconSizeY = OBJECT_TEXTURE_ICON_SIZEY; - - if (gSettings.viewports.bDistanceScaleIcons) - { - float fScreenScale = hc.view->GetScreenScaleFactor(pos); - - iconSizeX = static_cast(static_cast(iconSizeX) * OBJECT_TEXTURE_ICON_SCALE / fScreenScale); - iconSizeY = static_cast(static_cast(iconSizeY) * OBJECT_TEXTURE_ICON_SCALE / fScreenScale); - } - - // Hit Test icon of this object. - Vec3 testPos = pos; - int y0 = -(iconSizeY / 2); - int y1 = +(iconSizeY / 2); - if (CheckFlags(OBJFLAG_SHOW_ICONONTOP)) - { - Vec3 objectPos = GetWorldPos(); - - AABB box; - GetBoundBox(box); - testPos.z = (pos.z - objectPos.z) + box.max.z; - y0 = -(iconSizeY); - y1 = 0; - } - QPoint pnt = hc.view->WorldToView(testPos); - - if (hc.point2d.x() >= pnt.x() - (iconSizeX / 2) && hc.point2d.x() <= pnt.x() + (iconSizeX / 2) && - hc.point2d.y() >= pnt.y() + y0 && hc.point2d.y() <= pnt.y() + y1) - { - hc.dist = hc.raySrc.GetDistance(testPos) - 0.2f; - hc.iconHit = true; - bResult = true; - } - } - else if (hc.bUseSelectionHelpers) - { - // Check potentially children first - bResult = HitHelperTestForChildObjects(hc); - - // If no hit check this object - if (!bResult) - { - // Hit test helper. - Vec3 w = pos - hc.raySrc; - w = hc.rayDir.Cross(w); - float d = w.GetLengthSquared(); - - static const float screenScaleToRadiusFactor = 0.008f; - const float radius = hc.view->GetScreenScaleFactor(pos) * screenScaleToRadiusFactor; - const float pickDistance = hc.raySrc.GetDistance(pos); - if (d < radius * radius + hc.distanceTolerance && hc.dist >= pickDistance) - { - hc.dist = pickDistance; - hc.object = this; - bResult = true; - } - } - } - - - return bResult; -} - ////////////////////////////////////////////////////////////////////////// CBaseObject* CBaseObject::GetChild(size_t const i) const { @@ -2027,47 +1767,6 @@ CBaseObject* CBaseObject::GetChild(size_t const i) const return m_childs[i]; } -////////////////////////////////////////////////////////////////////////// -bool CBaseObject::IsChildOf(CBaseObject* node) -{ - CBaseObject* p = m_parent; - while (p && p != node) - { - p = p->m_parent; - } - if (p == node) - { - return true; - } - return false; -} - -////////////////////////////////////////////////////////////////////////// - - -////////////////////////////////////////////////////////////////////////// -void CBaseObject::CloneChildren(CBaseObject* pFromObject) -{ - if (pFromObject == nullptr) - { - return; - } - - for (size_t i = 0, nChildCount(pFromObject->GetChildCount()); i < nChildCount; ++i) - { - CBaseObject* pFromChildObject = pFromObject->GetChild(i); - - CBaseObject* pChildClone = GetObjectManager()->CloneObject(pFromChildObject); - if (pChildClone == nullptr) - { - continue; - } - - pChildClone->CloneChildren(pFromChildObject); - AddMember(pChildClone, false); - } -} - ////////////////////////////////////////////////////////////////////////// void CBaseObject::AttachChild(CBaseObject* child, bool bKeepPos) { @@ -2084,7 +1783,6 @@ void CBaseObject::AttachChild(CBaseObject* child, bool bKeepPos) return; } - static_cast(GetObjectManager())->NotifyObjectListeners(child, ON_PREATTACHED); child->NotifyListeners(bKeepPos ? ON_PREATTACHEDKEEPXFORM : ON_PREATTACHED); pTransformDelegate = m_pTransformDelegate; @@ -2129,7 +1827,6 @@ void CBaseObject::AttachChild(CBaseObject* child, bool bKeepPos) m_pTransformDelegate = pTransformDelegate; child->m_pTransformDelegate = pChildTransformDelegate; - static_cast(GetObjectManager())->NotifyObjectListeners(child, ON_ATTACHED); child->NotifyListeners(ON_ATTACHED); NotifyListeners(ON_CHILDATTACHED); @@ -2167,7 +1864,6 @@ void CBaseObject::DetachThis(bool bKeepPos) { CScopedSuspendUndo suspendUndo; - static_cast(GetObjectManager())->NotifyObjectListeners(this, ON_PREDETACHED); NotifyListeners(bKeepPos ? ON_PREDETACHEDKEEPXFORM : ON_PREDETACHED); pTransformDelegate = m_pTransformDelegate; @@ -2198,7 +1894,6 @@ void CBaseObject::DetachThis(bool bKeepPos) SetTransformDelegate(pTransformDelegate); - static_cast(GetObjectManager())->NotifyObjectListeners(this, ON_DETACHED); NotifyListeners(ON_DETACHED); } } @@ -2302,12 +1997,6 @@ Matrix34 CBaseObject::GetParentAttachPointWorldTM() const return Matrix34(IDENTITY); } -////////////////////////////////////////////////////////////////////////// -bool CBaseObject::IsParentAttachmentValid() const -{ - return true; -} - ////////////////////////////////////////////////////////////////////////// void CBaseObject::InvalidateTM([[maybe_unused]] int flags) { @@ -2458,7 +2147,7 @@ void CBaseObject::SetLookAt(CBaseObject* target) return; } - StoreUndo("Change LookAt"); + StoreUndo(); if (m_lookat) { @@ -2583,63 +2272,6 @@ void CBaseObject::Validate(IErrorReport* report) ////////////////////////////////////////////////////////////////////////// }; -////////////////////////////////////////////////////////////////////////// -Ang3 CBaseObject::GetWorldAngles() const -{ - if (m_scale == Vec3(1, 1, 1)) - { - Quat q = Quat(GetWorldTM()); - Ang3 angles = RAD2DEG(Ang3::GetAnglesXYZ(Matrix33(q))); - return angles; - } - else - { - Matrix34 tm = GetWorldTM(); - tm.OrthonormalizeFast(); - Quat q = Quat(tm); - Ang3 angles = RAD2DEG(Ang3::GetAnglesXYZ(Matrix33(q))); - return angles; - } -}; - -////////////////////////////////////////////////////////////////////////// -void CBaseObject::PostClone(CBaseObject* pFromObject, CObjectCloneContext& ctx) -{ - CBaseObject* pFromParent = pFromObject->GetParent(); - if (pFromParent) - { - SetFloorNumber(pFromObject->GetFloorNumber()); - - CBaseObject* pFromParentInContext = ctx.FindClone(pFromParent); - if (pFromParentInContext) - { - pFromParentInContext->AddMember(this, false); - } - else - { - pFromParent->AddMember(this, false); - } - } - if (pFromObject->ShouldCloneChildren()) - { - for (int i = 0; i < pFromObject->GetChildCount(); i++) - { - CBaseObject* pChildObject = pFromObject->GetChild(i); - CBaseObject* pClonedChild = GetObjectManager()->CloneObject(pChildObject); - ctx.AddClone(pChildObject, pClonedChild); - } - for (int i = 0; i < pFromObject->GetChildCount(); i++) - { - CBaseObject* pChildObject = pFromObject->GetChild(i); - CBaseObject* pClonedChild = ctx.FindClone(pChildObject); - if (pClonedChild) - { - pClonedChild->PostClone(pChildObject, ctx); - } - } - } -} - ////////////////////////////////////////////////////////////////////////// void CBaseObject::GatherUsedResources(CUsedResources& resources) { @@ -2675,79 +2307,6 @@ void CBaseObject::SetMinSpec(uint32 nSpec, bool bSetChildren) } } -////////////////////////////////////////////////////////////////////////// -void CBaseObject::OnPropertyChanged(IVariable*) -{ -} - -////////////////////////////////////////////////////////////////////////// -void CBaseObject::OnMultiSelPropertyChanged(IVariable*) -{ -} - -////////////////////////////////////////////////////////////////////////// -void CBaseObject::OnMenuShowInAssetBrowser() -{ - if (!IsSelected()) - { - CUndo undo("Select Object"); - GetIEditor()->GetObjectManager()->ClearSelection(); - GetIEditor()->SelectObject(this); - } - - GetIEditor()->ExecuteCommand("asset_browser.show_viewport_selection"); -} - -////////////////////////////////////////////////////////////////////////// -void CBaseObject::OnContextMenu(QMenu* menu) -{ - if (!menu->isEmpty()) - { - menu->addSeparator(); - } - CUsedResources resources; - GatherUsedResources(resources); - - static_cast(GetIEditor())->OnObjectContextMenuOpened(menu, this); -} - -////////////////////////////////////////////////////////////////////////// -bool CBaseObject::IntersectRayMesh(const Vec3& raySrc, const Vec3& rayDir, SRayHitInfo& outHitInfo) const -{ - const float fRenderMeshTestDistance = 0.2f; - IRenderNode* pRenderNode = GetEngineNode(); - if (!pRenderNode) - { - return false; - } - - Matrix34 worldTM; - IStatObj* pStatObj = pRenderNode->GetEntityStatObj(0, 0, &worldTM); - if (!pStatObj) - { - return false; - } - - // transform decal into object space - Matrix34 worldTM_Inverted = worldTM.GetInverted(); - Matrix33 worldRot(worldTM_Inverted); - worldRot.Transpose(); - // put hit direction into the object space - Vec3 vRayDir = rayDir.GetNormalized() * worldRot; - // put hit position into the object space - Vec3 vHitPos = worldTM_Inverted.TransformPoint(raySrc); - Vec3 vLineP1 = vHitPos - vRayDir * fRenderMeshTestDistance; - - memset(&outHitInfo, 0, sizeof(outHitInfo)); - outHitInfo.inReferencePoint = vHitPos; - outHitInfo.inRay.origin = vLineP1; - outHitInfo.inRay.direction = vRayDir; - outHitInfo.bInFirstHit = false; - outHitInfo.bUseCache = false; - - return pStatObj->RayIntersection(outHitInfo, nullptr); -} - ////////////////////////////////////////////////////////////////////////// EScaleWarningLevel CBaseObject::GetScaleWarningLevel() const { diff --git a/Code/Editor/Objects/BaseObject.h b/Code/Editor/Objects/BaseObject.h index 3865696ecb..f78755e81d 100644 --- a/Code/Editor/Objects/BaseObject.h +++ b/Code/Editor/Objects/BaseObject.h @@ -35,8 +35,6 @@ struct SSubObjSelectionModifyContext; struct SRayHitInfo; class CPopupMenuItem; class QMenu; -struct IRenderNode; -struct IStatObj; ////////////////////////////////////////////////////////////////////////// typedef _smart_ptr CBaseObjectPtr; @@ -119,15 +117,6 @@ enum ObjectFlags #define ERF_GET_WRITABLE(flags) (flags) -////////////////////////////////////////////////////////////////////////// -//! This flags passed to CBaseObject::BeginEditParams method. -enum ObjectEditFlags -{ - OBJECT_CREATE = 0x001, - OBJECT_EDIT = 0x002, - OBJECT_COLLAPSE_OBJECTPANEL = 0x004 -}; - ////////////////////////////////////////////////////////////////////////// //! Return values from CBaseObject::MouseCreateCallback method. enum MouseCreateResult @@ -137,19 +126,6 @@ enum MouseCreateResult MOUSECREATE_OK, //!< Accept this object. }; -////////////////////////////////////////////////////////////////////////// -// Interface to the object create with the mouse callback. -////////////////////////////////////////////////////////////////////////// -struct IMouseCreateCallback -{ - virtual void Release() = 0; - virtual MouseCreateResult OnMouseEvent(CViewport* view, EMouseEvent event, QPoint& point, int flags) = 0; - // Some process of creation need to be able to be displayed such as creation for custom solid. - virtual void Display([[maybe_unused]] DisplayContext& dc){} - // Called after accepting an object to see if new object creation mode should be continued. - virtual bool ContinueCreation() = 0; -}; - // Flags used for object interaction enum EObjectUpdateFlags { @@ -261,22 +237,11 @@ public: /** Check if both object are of same class. */ - virtual bool IsSameClass(CBaseObject* obj); - virtual void SetDefaultType() { m_objType = OBJTYPE_DUMMY; }; virtual ObjectType GetType() const { - if (m_objType == OBJTYPE_DUMMY) - { - return m_objType; - } - else - { - return m_classDesc->GetObjectType(); - } + return m_classDesc->GetObjectType(); }; - // const char* GetTypeName() const { return m_classDesc->ClassName(); }; QString GetTypeName() const; - virtual QString GetTypeDescription() const { return m_classDesc->ClassName(); }; ////////////////////////////////////////////////////////////////////////// // Flags. @@ -289,8 +254,6 @@ public: // Hidden ID ////////////////////////////////////////////////////////////////////////// static const uint64 s_invalidHiddenID = 0; - uint64 GetHideOrder() const { return m_hideOrder; } - void SetHideOrder(uint64 newID) { m_hideOrder = newID; } //! Returns true if object hidden. bool IsHidden() const; @@ -307,26 +270,19 @@ public: virtual bool IsSelectable() const; // Return texture icon. - bool HaveTextureIcon() const { return m_nTextureIcon != 0; }; int GetTextureIcon() const { return m_nTextureIcon; } void SetTextureIcon(int nTexIcon) { m_nTextureIcon = nTexIcon; } - //! Set shared between missions flag. - virtual void SetShared(bool bShared); //! Set object hidden status. - virtual void SetHidden(bool bHidden, uint64 hiddenId = CBaseObject::s_invalidHiddenID, bool bAnimated = false); + virtual void SetHidden(bool bHidden, bool bAnimated = false); //! Set object frozen status. virtual void SetFrozen(bool bFrozen); //! Set object selected status. virtual void SetSelected(bool bSelect); - //! Return associated 3DEngine render node - virtual IRenderNode* GetEngineNode() const { return nullptr; }; //! Set object highlighted (Note: not selected) virtual void SetHighlight(bool bHighlight); //! Check if object is highlighted. bool IsHighlighted() const { return CheckFlags(OBJFLAG_HIGHLIGHT); } - //! Check if object can have measurement axises. - virtual bool HasMeasurementAxis() const { return true; } //! Check if the object is isolated when the editor is in Isolation Mode virtual bool IsIsolated() const { return false; } @@ -345,8 +301,6 @@ public: ////////////////////////////////////////////////////////////////////////// //! Get name of object. const QString& GetName() const; - virtual QString GetComment() const { return QString(); } - virtual QString GetWarningsText() const; //! Change name of object. virtual void SetName(const QString& name); @@ -376,10 +330,6 @@ public: //! Get object scale. const Vec3 GetScale() const; - virtual bool StartScaling() { return false; } - virtual bool GetUntransformedScale([[maybe_unused]] Vec3& scale) const { return false; } - virtual bool TransformScale([[maybe_unused]] const Vec3& scale) { return false; } - //! Set flatten area. void SetArea(float area); float GetArea() const { return m_flattenArea; }; @@ -397,8 +347,6 @@ public: // CHILDS ////////////////////////////////////////////////////////////////////////// - //! Return true if node have childs. - bool HaveChilds() const { return !m_childs.empty(); } //! Return true if have attached childs. size_t GetChildCount() const { return m_childs.size(); } @@ -406,10 +354,6 @@ public: CBaseObject* GetChild(size_t const i) const; //! Return parent node if exist. CBaseObject* GetParent() const { return m_parent; }; - //! Scans hierarchy up to determine if we child of specified node. - virtual bool IsChildOf(CBaseObject* node); - //! Clone Children - void CloneChildren(CBaseObject* pFromObject); //! Attach new child node. //! @param bKeepPos if true Child node will keep its world space position. virtual void AttachChild(CBaseObject* child, bool bKeepPos = true); @@ -422,8 +366,6 @@ public: virtual void DetachAll(bool bKeepPos = true); // Detach this node from parent. virtual void DetachThis(bool bKeepPos = true); - // Returns the link parent. - virtual CBaseObject* GetLinkParent() const { return GetParent(); } ////////////////////////////////////////////////////////////////////////// // MATRIX @@ -437,15 +379,11 @@ public: // Gets matrix of parent attachment point virtual Matrix34 GetParentAttachPointWorldTM() const; - // Checks if the attachment point is valid - virtual bool IsParentAttachmentValid() const; - //! Set position in world space. virtual void SetWorldPos(const Vec3& pos, int flags = 0); //! Get position in world space. Vec3 GetWorldPos() const { return GetWorldTM().GetTranslation(); }; - Ang3 GetWorldAngles() const; //! Set xform of object given in world space. virtual void SetWorldTM(const Matrix34& tm, int flags = 0); @@ -460,12 +398,6 @@ public: // Interface to be implemented in plugins. ////////////////////////////////////////////////////////////////////////// - //! Called when object is being created (use GetMouseCreateCallback for more advanced mouse creation callback). - virtual int MouseCreateCallback(CViewport* view, EMouseEvent event, QPoint& point, int flags); - // Return pointer to the callback object used when creating object by the mouse. - // If this function return nullptr MouseCreateCallback method will be used instead. - virtual IMouseCreateCallback* GetMouseCreateCallback() { return nullptr; }; - //! Draw object to specified viewport. virtual void Display([[maybe_unused]] DisplayContext& disp) {} @@ -477,10 +409,6 @@ public: //! Return true if was hit. virtual bool HitTestRect(HitContext& hc); - //! Perform intersection testing of this object based on its icon helper. - //! Return true if was hit. - virtual bool HitHelperTest(HitContext& hc); - //! Get bounding box of object in world coordinate space. virtual void GetBoundBox(AABB& box); @@ -500,8 +428,6 @@ public: //! @param bUndo true if loading or saving data for Undo/Redo purposes. virtual void Serialize(CObjectArchive& ar); - //// Pre load called before serialize after all objects where completly loaded. - //virtual void PreLoad( CObjectArchive &ar ) {}; // Post load called after all objects where completely loaded. virtual void PostLoad([[maybe_unused]] CObjectArchive& ar) {}; @@ -513,9 +439,6 @@ public: //! Override in derived classes, to handle specific events. virtual void OnEvent(ObjectEvent event); - //! Generate dynamic context menu for the object - virtual void OnContextMenu(QMenu* menu); - ////////////////////////////////////////////////////////////////////////// // LookAt Target. ////////////////////////////////////////////////////////////////////////// @@ -523,13 +446,11 @@ public: CBaseObject* GetLookAt() const { return m_lookat; }; //! Returns true if this object is a look-at target. bool IsLookAtTarget() const; - CBaseObject* GetLookAtSource() const { return m_lookatSource; }; - IObjectManager* GetObjectManager() const; //! Store undo information for this object. - void StoreUndo(const char* undoDescription, bool minimal = false, int flags = 0); + void StoreUndo(bool minimal = false, int flags = 0); //! Add event listener callback. void AddEventListener(EventListener* listener); @@ -548,52 +469,21 @@ public: //! Check if specified object is very similar to this one. virtual bool IsSimilarObject(CBaseObject* pObject); - ////////////////////////////////////////////////////////////////////////// - // Material Layers Mask. - ////////////////////////////////////////////////////////////////////////// - virtual void SetMaterialLayersMask(uint32 nLayersMask) { m_nMaterialLayersMask = nLayersMask; } - uint32 GetMaterialLayersMask() const { return m_nMaterialLayersMask; }; - ////////////////////////////////////////////////////////////////////////// // Object minimal usage spec (All/Low/Medium/High) ////////////////////////////////////////////////////////////////////////// uint32 GetMinSpec() const { return m_nMinSpec; } virtual void SetMinSpec(uint32 nSpec, bool bSetChildren = true); - ////////////////////////////////////////////////////////////////////////// - // SubObj selection. - ////////////////////////////////////////////////////////////////////////// - // Return true if object support selecting of this sub object element type. - virtual bool StartSubObjSelection([[maybe_unused]] int elemType) { return false; }; - virtual void EndSubObjectSelection() {}; - virtual void ModifySubObjSelection([[maybe_unused]] SSubObjSelectionModifyContext& modCtx) {}; - virtual void AcceptSubObjectModify() {}; - //! In This function variables of the object must be initialized. virtual void InitVariables() {}; - ////////////////////////////////////////////////////////////////////////// - // Procedural Floor Management. - ////////////////////////////////////////////////////////////////////////// - int GetFloorNumber() const { return m_floorNumber; }; - void SetFloorNumber(int floorNumber) { m_floorNumber = floorNumber; }; - - virtual void OnPropertyChanged(IVariable*); - virtual void OnMultiSelPropertyChanged(IVariable*); - //! Draw a reddish highlight indicating its budget usage. virtual void DrawBudgetUsage(DisplayContext& dc, const QColor& color); - bool IntersectRayMesh(const Vec3& raySrc, const Vec3& rayDir, SRayHitInfo& outHitInfo) const; - - virtual void EditTags([[maybe_unused]] bool alwaysTag) {} - virtual bool SupportsEditTags() const { return false; } - bool CanBeHightlighted() const; bool IsSkipSelectionHelper() const; - virtual IStatObj* GetIStatObj() { return nullptr; } - // Invalidates cached transformation matrix. // nWhyFlags - Flags that indicate the reason for matrix invalidation. virtual void InvalidateTM(int nWhyFlags); @@ -612,26 +502,14 @@ protected: //! Optional file parameter specify initial object or script for this object. virtual bool Init(IEditor* ie, CBaseObject* prev, const QString& file); - ////////////////////////////////////////////////////////////////////////// - //! Must be called after cloning the object on clone of object. - //! This will make sure object references are cloned correctly. - virtual void PostClone(CBaseObject* pFromObject, CObjectCloneContext& ctx); - //! Must be implemented by derived class to create game related objects. virtual bool CreateGameObject() { return true; }; - //! If true, all attached chilren will be cloned when the parent object is cloned. - virtual bool ShouldCloneChildren() const { return true; } - /** Called when object is about to be deleted. - All Game resources should be freed in this function. + All Game resources should be freed in this function. */ virtual void Done(); - /** Change current id of object. - */ - //virtual void SetId( uint32 objectId ) { m_id = objectId; }; - //! Call this to delete an object. virtual void DeleteThis() = 0; @@ -674,11 +552,6 @@ protected: //! Returns if the object can be drawn, and if its selection helper should also be drawn. bool CanBeDrawn(const DisplayContext& dc, bool& outDisplaySelectionHelper) const; - //! Returns if object is in the camera view. - virtual bool IsInCameraView(const CCamera& camera); - //! Returns vis ratio of object in camera - virtual float GetCameraVisRatio(const CCamera& camera); - // Do basic intersection tests virtual bool IntersectRectBounds(const AABB& bbox); virtual bool IntersectRayBounds(const Ray& ray); @@ -687,17 +560,11 @@ protected: // Function can be used by derived classes. bool HitTestRectBounds(HitContext& hc, const AABB& box); - // Do helper hit testing as specific location. - bool HitHelperAtTest(HitContext& hc, const Vec3& pos); - // Do helper hit testing taking child objects into account (e.g. opened prefab) virtual bool HitHelperTestForChildObjects([[maybe_unused]] HitContext& hc) { return false; } CBaseObject* FindObject(REFGUID id) const; - // Returns true if game objects should be created. - bool IsCreateGameObjects() const; - // Helper gizmo functions. void AddGizmo(CGizmo* gizmo); void RemoveGizmo(CGizmo* gizmo); @@ -708,14 +575,6 @@ protected: //! Only used by ObjectManager. bool IsPotentiallyVisible() const; - ////////////////////////////////////////////////////////////////////////// - // May be overridden in derived classes to handle helpers scaling. - ////////////////////////////////////////////////////////////////////////// - virtual void SetHelperScale([[maybe_unused]] float scale) {}; - virtual float GetHelperScale() { return 1.0f; }; - - void SetNameInternal(const QString& name) { m_name = name; } - void SetDrawTextureIconProperties(DisplayContext& dc, const Vec3& pos, float alpha = 1.0f, int texIconFlags = 0); const Vec3& GetTextureIconDrawPos(){ return m_vDrawIconPos; }; int GetTextureIconFlags(){ return m_nIconFlags; }; @@ -737,8 +596,6 @@ private: friend class CObjectArchive; friend class CSelectionGroup; - void OnMenuShowInAssetBrowser(); - //! Set class description for this object, //! Only called once after creation by ObjectManager. void SetClassDesc(CObjectClassDesc* classDesc); @@ -746,9 +603,6 @@ private: EScaleWarningLevel GetScaleWarningLevel() const; ERotationWarningLevel GetRotationWarningLevel() const; - // auto resolving - void OnMtlResolved(uint32 id, bool success, const char* orgName, const char* newName); - bool IsInSelectionBox() const { return m_bInSelectionBox; } void SetId(REFGUID guid) { m_guid = guid; } @@ -771,13 +625,10 @@ private: //! Unique object Id. GUID m_guid; - // floor number of object if procedural object flag is set - int m_floorNumber; - //! Flags of this object. int m_flags; - // Id of the texture icon for this object. + //! Id of the texture icon for this object. int m_nTextureIcon; //! Display color. @@ -828,13 +679,10 @@ private: mutable uint32 m_bMatrixValid : 1; mutable uint32 m_bWorldBoxValid : 1; uint32 m_bInSelectionBox : 1; - uint32 m_nMaterialLayersMask : 8; uint32 m_nMinSpec : 8; Vec3 m_vDrawIconPos; AZ_POP_DISABLE_DLL_EXPORT_MEMBER_WARNING - - uint64 m_hideOrder; }; Q_DECLARE_METATYPE(CBaseObject*) diff --git a/Code/Editor/Objects/DisplayContext.h b/Code/Editor/Objects/DisplayContext.h index 0f0f0e665a..8f54be78fe 100644 --- a/Code/Editor/Objects/DisplayContext.h +++ b/Code/Editor/Objects/DisplayContext.h @@ -31,7 +31,6 @@ struct IRenderer; struct IRenderAuxGeom; struct IIconManager; class CDisplaySettings; -class CCamera; class QPoint; enum DisplayFlags @@ -66,7 +65,6 @@ struct SANDBOX_API DisplayContext IDisplayViewport* view; IRenderAuxGeom* pRenderAuxGeom; IIconManager* pIconManager; - CCamera* camera; AZ_PUSH_DISABLE_DLL_EXPORT_MEMBER_WARNING AABB box; // Bounding box of volume that need to be repainted. AZ_POP_DISABLE_DLL_EXPORT_MEMBER_WARNING @@ -83,11 +81,38 @@ struct SANDBOX_API DisplayContext // Draw functions ////////////////////////////////////////////////////////////////////////// //! Set current materialc color. - void SetColor(float r, float g, float b, float a = 1) { m_color4b = ColorB(static_cast(r * 255.0f), static_cast(g * 255.0f), static_cast(b * 255.0f), static_cast(a * 255.0f)); }; - void SetColor(const Vec3& color, float a = 1) { m_color4b = ColorB(static_cast(color.x * 255.0f), static_cast(color.y * 255.0f), static_cast(color.z * 255.0f), static_cast(a * 255.0f)); }; - void SetColor(const QColor& rgb, float a) { m_color4b = ColorB(static_cast(rgb.red()), static_cast(rgb.green()), static_cast(rgb.blue()), static_cast(a * 255.0f)); }; - void SetColor(const QColor& color) { m_color4b = ColorB(static_cast(color.red()), static_cast(color.green()), static_cast(color.blue()), static_cast(color.alpha())); }; - void SetColor(const ColorB& color) { m_color4b = color; }; + void SetColor(float r, float g, float b, float a = 1) + { + m_color4b = ColorB( + static_cast(r * 255.0f), static_cast(g * 255.0f), static_cast(b * 255.0f), static_cast(a * 255.0f)); + }; + void SetColor(const Vec3& color, float a = 1) + { + m_color4b = ColorB( + static_cast(color.x * 255.0f), static_cast(color.y * 255.0f), static_cast(color.z * 255.0f), + static_cast(a * 255.0f)); + }; + void SetColor(const AZ::Vector3& color, float a = 1) + { + m_color4b = ColorB( + static_cast(color.GetX() * 255.0f), static_cast(color.GetY() * 255.0f), static_cast(color.GetZ() * 255.0f), + static_cast(a * 255.0f)); + }; + void SetColor(const QColor& rgb, float a) + { + m_color4b = ColorB( + static_cast(rgb.red()), static_cast(rgb.green()), static_cast(rgb.blue()), static_cast(a * 255.0f)); + }; + void SetColor(const QColor& color) + { + m_color4b = ColorB( + static_cast(color.red()), static_cast(color.green()), static_cast(color.blue()), + static_cast(color.alpha())); + }; + void SetColor(const ColorB& color) + { + m_color4b = color; + }; void SetAlpha(float a = 1) { m_color4b.a = static_cast(a * 255.0f); }; ColorB GetColor() const { return m_color4b; } @@ -110,6 +135,7 @@ struct SANDBOX_API DisplayContext void DrawTrianglesIndexed(const AZStd::vector& vertices, const AZStd::vector& indices, const ColorB& color); // Draw wireframe box. void DrawWireBox(const Vec3& min, const Vec3& max); + void DrawWireBox(const AZ::Vector3& min, const AZ::Vector3& max); // Draw filled box void DrawSolidBox(const Vec3& min, const Vec3& max); void DrawSolidOBB(const Vec3& center, const Vec3& axisX, const Vec3& axisY, const Vec3& axisZ, const Vec3& halfExtents); diff --git a/Code/Editor/Objects/DisplayContextShared.inl b/Code/Editor/Objects/DisplayContextShared.inl index df0b1f82a1..1fbd2ef7b6 100644 --- a/Code/Editor/Objects/DisplayContextShared.inl +++ b/Code/Editor/Objects/DisplayContextShared.inl @@ -225,6 +225,12 @@ void DisplayContext::DrawWireBox(const Vec3& min, const Vec3& max) pRenderAuxGeom->DrawAABB(AABB(min, max), m_matrixStack[m_currentMatrix], false, m_color4b, eBBD_Faceted); } +void DisplayContext::DrawWireBox(const AZ::Vector3& min, const AZ::Vector3& max) +{ + pRenderAuxGeom->DrawAABB( + AABB(Vec3(min.GetX(), min.GetY(), min.GetZ()), Vec3(max.GetX(), max.GetY(), max.GetZ())), + m_matrixStack[m_currentMatrix], false, m_color4b, eBBD_Faceted); +} ////////////////////////////////////////////////////////////////////////// void DisplayContext::DrawSolidBox(const Vec3& min, const Vec3& max) { @@ -1138,10 +1144,6 @@ bool DisplayContext::IsVisible(const AABB& bounds) return true; } } - else - { - return camera->IsAABBVisible_F(AABB(bounds.min, bounds.max)); - } return false; } diff --git a/Code/Editor/Objects/EntityObject.cpp b/Code/Editor/Objects/EntityObject.cpp index 6e2354998c..86512377c6 100644 --- a/Code/Editor/Objects/EntityObject.cpp +++ b/Code/Editor/Objects/EntityObject.cpp @@ -28,8 +28,7 @@ #include "HitContext.h" #include "Objects/SelectionGroup.h" -#include -#include +static constexpr int VIEW_DISTANCE_MULTIPLIER_MAX = 100; ////////////////////////////////////////////////////////////////////////// //! Undo Entity Link @@ -58,7 +57,6 @@ public: protected: void Release() override { delete this; }; int GetSize() override { return sizeof(*this); }; // Return size of xml state. - QString GetDescription() override { return "Entity Link"; }; QString GetObjectName() override{ return ""; }; void Undo([[maybe_unused]] bool bUndo) override @@ -139,7 +137,6 @@ private: } int GetSize() override { return sizeof(CUndoAttachEntity); } - QString GetDescription() override { return "Attachment Changed"; } GUID m_attachedEntityGUID; CEntityObject::EAttachmentType m_attachmentType; @@ -151,8 +148,6 @@ private: // CBase implementation. ////////////////////////////////////////////////////////////////////////// -float CEntityObject::m_helperScale = 1; - namespace { CEntityObject* s_pPropertyPanelEntityObject = nullptr; @@ -163,12 +158,9 @@ namespace ////////////////////////////////////////////////////////////////////////// CEntityObject::CEntityObject() - : m_listeners(1) { m_bLoadFailed = false; - m_visualObject = nullptr; - m_box.min.Set(0, 0, 0); m_box.max.Set(0, 0, 0); @@ -223,7 +215,7 @@ CEntityObject::CEntityObject() mv_ratioLOD = 100; mv_viewDistanceMultiplier = 1.0f; mv_ratioLOD.SetLimits(0, 255); - mv_viewDistanceMultiplier.SetLimits(0.0f, IRenderNode::VIEW_DISTANCE_MULTIPLIER_MAX); + mv_viewDistanceMultiplier.SetLimits(0.0f, VIEW_DISTANCE_MULTIPLIER_MAX); m_physicsState = nullptr; @@ -247,7 +239,6 @@ CEntityObject::CEntityObject() m_onSetCallbacksCache.emplace_back([this](IVariable* var) { OnProjectInAllDirsChange(var); }); m_onSetCallbacksCache.emplace_back([this](IVariable* var) { OnProjectorFOVChange(var); }); m_onSetCallbacksCache.emplace_back([this](IVariable* var) { OnProjectorTextureChange(var); }); - m_onSetCallbacksCache.emplace_back([this](IVariable* var) { OnPropertyChange(var); }); m_onSetCallbacksCache.emplace_back([this](IVariable* var) { OnRadiusChange(var); }); } @@ -295,11 +286,6 @@ void CEntityObject::Done() ReleaseEventTargets(); RemoveAllEntityLinks(); - for (CListenerSet::Notifier notifier(m_listeners); notifier.IsValid(); notifier.Next()) - { - notifier->OnDone(); - } - CBaseObject::Done(); } @@ -365,12 +351,6 @@ void CEntityObject::SetTransformDelegate(ITransformDelegate* pTransformDelegate) ResetCallbacks(); } -////////////////////////////////////////////////////////////////////////// -bool CEntityObject::IsSameClass(CBaseObject* obj) -{ - return (GetClassDesc() == obj->GetClassDesc()); -} - ////////////////////////////////////////////////////////////////////////// bool CEntityObject::ConvertFromObject(CBaseObject* object) { @@ -458,33 +438,10 @@ bool CEntityObject::HitTest(HitContext& hc) return false; } -////////////////////////////////////////////////////////////////////////// -bool CEntityObject::HitHelperTest(HitContext& hc) -{ - bool bResult = CBaseObject::HitHelperTest(hc); - if (bResult) - { - hc.object = this; - } - - return bResult; -} - ////////////////////////////////////////////////////////////////////////// bool CEntityObject::HitTestRect(HitContext& hc) { - bool bResult = false; - - if (m_visualObject && !gSettings.viewports.bShowIcons && !gSettings.viewports.bShowSizeBasedIcons) - { - AABB box; - box.SetTransformedAABB(GetWorldTM(), m_visualObject->GetAABB()); - bResult = HitTestRectBounds(hc, box); - } - else - { - bResult = CBaseObject::HitTestRect(hc); - } + bool bResult = CBaseObject::HitTestRect(hc); if (bResult) { @@ -494,42 +451,6 @@ bool CEntityObject::HitTestRect(HitContext& hc) return bResult; } -////////////////////////////////////////////////////////////////////////// -int CEntityObject::MouseCreateCallback(CViewport* view, EMouseEvent event, QPoint& point, int flags) -{ - AZ_PROFILE_FUNCTION(Entity); - - if (event == eMouseMove || event == eMouseLDown) - { - Vec3 pos; - // Rise Entity above ground on Bounding box amount. - if (GetIEditor()->GetAxisConstrains() != AXIS_TERRAIN) - { - pos = view->MapViewToCP(point); - } - else - { - // Snap to terrain. - bool hitTerrain; - pos = view->ViewToWorld(point, &hitTerrain); - if (hitTerrain) - { - pos.z = GetIEditor()->GetTerrainElevation(pos.x, pos.y); - pos.z = pos.z - m_box.min.z; - } - pos = view->SnapToGrid(pos); - } - SetPos(pos); - - if (event == eMouseLDown) - { - return MOUSECREATE_OK; - } - return MOUSECREATE_CONTINUE; - } - return CBaseObject::MouseCreateCallback(view, event, point, flags); -} - ////////////////////////////////////////////////////////////////////////// IVariable* CEntityObject::FindVariableInSubBlock(CVarBlockPtr& properties, IVariable* pSubBlockVar, const char* pVarName) { @@ -592,11 +513,11 @@ void CEntityObject::AdjustLightProperties(CVarBlockPtr& properties, const char* if (IVariable* pCastShadowVarLegacy = FindVariableInSubBlock(properties, pSubBlockVar, "bCastShadow")) { pCastShadowVarLegacy->SetFlags(pCastShadowVarLegacy->GetFlags() | IVariable::UI_INVISIBLE); - - if (pCastShadowVarLegacy->GetDisplayValue()[0] != '0') + const QString zeroPrefix("0"); + if (!pCastShadowVarLegacy->GetDisplayValue().startsWith(zeroPrefix)) { bCastShadowLegacy = true; - pCastShadowVarLegacy->SetDisplayValue("0"); + pCastShadowVarLegacy->SetDisplayValue(zeroPrefix); } } @@ -680,11 +601,6 @@ void CEntityObject::SetName(const QString& name) CBaseObject::SetName(name); - CListenerSet listeners = m_listeners; - for (CListenerSet::Notifier notifier(listeners); notifier.IsValid(); notifier.Next()) - { - notifier->OnNameChanged(name.toUtf8().data()); - } } ////////////////////////////////////////////////////////////////////////// @@ -697,19 +613,6 @@ void CEntityObject::SetSelected(bool bSelect) UpdateLightProperty(); } - for (CListenerSet::Notifier notifier(m_listeners); notifier.IsValid(); notifier.Next()) - { - notifier->OnSelectionChanged(bSelect); - } -} - -////////////////////////////////////////////////////////////////////////// -void CEntityObject::OnPropertyChange([[maybe_unused]] IVariable* var) -{ - if (s_ignorePropertiesUpdate) - { - return; - } } template @@ -941,11 +844,9 @@ void CEntityObject::Serialize(CObjectArchive& ar) m_eventTargets.emplace_back(AZStd::move(et)); if (targetId != GUID_NULL) { - using namespace AZStd::placeholders; ar.SetResolveCallback( this, targetId, - [this](CBaseObject* object, unsigned int index) { ResolveEventTarget(object, index); }, - i); + [this,i](CBaseObject* object) { ResolveEventTarget(object, i); }); } } } @@ -956,11 +857,7 @@ void CEntityObject::Serialize(CObjectArchive& ar) QString attachmentType; xmlNode->getAttr("AttachmentType", attachmentType); - if (attachmentType == "GeomCacheNode") - { - m_attachmentType = eAT_GeomCacheNode; - } - else if (attachmentType == "CharacterBone") + if (attachmentType == "CharacterBone") { m_attachmentType = eAT_CharacterBone; } @@ -987,11 +884,7 @@ void CEntityObject::Serialize(CObjectArchive& ar) { if (m_attachmentType != eAT_Pivot) { - if (m_attachmentType == eAT_GeomCacheNode) - { - xmlNode->setAttr("AttachmentType", "GeomCacheNode"); - } - else if (m_attachmentType == eAT_CharacterBone) + if (m_attachmentType == eAT_CharacterBone) { xmlNode->setAttr("AttachmentType", "CharacterBone"); } @@ -1091,11 +984,7 @@ XmlNodeRef CEntityObject::Export([[maybe_unused]] const QString& levelPath, XmlN objNode->setAttr("ParentId", parentEntity->GetEntityId()); if (m_attachmentType != eAT_Pivot) { - if (m_attachmentType == eAT_GeomCacheNode) - { - objNode->setAttr("AttachmentType", "GeomCacheNode"); - } - else if (m_attachmentType == eAT_CharacterBone) + if (m_attachmentType == eAT_CharacterBone) { objNode->setAttr("AttachmentType", "CharacterBone"); } @@ -1166,12 +1055,6 @@ XmlNodeRef CEntityObject::Export([[maybe_unused]] const QString& levelPath, XmlN objNode->setAttr("MinSpec", ( uint32 )GetMinSpec()); } - uint32 nMtlLayersMask = GetMaterialLayersMask(); - if (nMtlLayersMask != 0) - { - objNode->setAttr("MatLayersMask", nMtlLayersMask); - } - if (mv_hiddenInGame) { objNode->setAttr("HiddenInGame", true); @@ -1268,11 +1151,6 @@ void CEntityObject::OnEvent(ObjectEvent event) case EVENT_CONFIG_SPEC_CHANGE: { - IObjectManager* objMan = GetIEditor()->GetObjectManager(); - if (objMan && objMan->IsLightClass(this)) - { - OnPropertyChange(nullptr); - } break; } default: @@ -1362,56 +1240,6 @@ QString CEntityObject::GetLightAnimation() const return ""; } -////////////////////////////////////////////////////////////////////////// -void CEntityObject::PostClone(CBaseObject* pFromObject, CObjectCloneContext& ctx) -{ - CBaseObject::PostClone(pFromObject, ctx); - - CEntityObject* pFromEntity = ( CEntityObject* )pFromObject; - // Clone event targets. - if (!pFromEntity->m_eventTargets.empty()) - { - size_t numTargets = pFromEntity->m_eventTargets.size(); - for (size_t i = 0; i < numTargets; i++) - { - CEntityEventTarget& et = pFromEntity->m_eventTargets[i]; - CBaseObject* pClonedTarget = ctx.FindClone(et.target); - if (!pClonedTarget) - { - pClonedTarget = et.target; // If target not cloned, link to original target. - } - - // Add cloned event. - AddEventTarget(pClonedTarget, et.event, et.sourceEvent, true); - } - } - - // Clone links. - if (!pFromEntity->m_links.empty()) - { - int numTargets = static_cast(pFromEntity->m_links.size()); - for (int i = 0; i < numTargets; i++) - { - CEntityLink& et = pFromEntity->m_links[i]; - CBaseObject* pClonedTarget = ctx.FindClone(et.target); - if (!pClonedTarget) - { - pClonedTarget = et.target; // If target not cloned, link to original target. - } - - // Add cloned event. - if (pClonedTarget) - { - AddEntityLink(et.name, pClonedTarget->GetId()); - } - else - { - AddEntityLink(et.name, GUID_NULL); - } - } - } -} - ////////////////////////////////////////////////////////////////////////// void CEntityObject::ResolveEventTarget(CBaseObject* object, unsigned int index) { @@ -1566,7 +1394,7 @@ void CEntityObject::OnObjectEvent(CBaseObject* target, int event) ////////////////////////////////////////////////////////////////////////// int CEntityObject::AddEventTarget(CBaseObject* target, const QString& event, const QString& sourceEvent, [[maybe_unused]] bool bUpdateScript) { - StoreUndo("Add EventTarget"); + StoreUndo(); CEntityEventTarget et; et.target = target; et.event = event; @@ -1600,7 +1428,7 @@ void CEntityObject::RemoveEventTarget(int index, [[maybe_unused]] bool bUpdateSc { if (index >= 0 && index < m_eventTargets.size()) { - StoreUndo("Remove EventTarget"); + StoreUndo(); if (m_eventTargets[index].pLineGizmo) { @@ -1636,7 +1464,7 @@ int CEntityObject::AddEntityLink(const QString& name, GUID targetEntityId) } } - StoreUndo("Add EntityLink"); + StoreUndo(); CLineGizmo* pLineGizmo = nullptr; @@ -1684,7 +1512,7 @@ void CEntityObject::RemoveEntityLink(int index) if (index >= 0 && index < m_links.size()) { CEntityLink& link = m_links[index]; - StoreUndo("Remove EntityLink"); + StoreUndo(); if (link.pLineGizmo) { @@ -1707,7 +1535,7 @@ void CEntityObject::RenameEntityLink(int index, const QString& newName) { if (index >= 0 && index < m_links.size()) { - StoreUndo("Rename EntityLink"); + StoreUndo(); if (m_links[index].pLineGizmo) { @@ -1854,18 +1682,6 @@ void CEntityObject::OnLoadFailed() GetIEditor()->GetErrorReport()->ReportError(err); } -////////////////////////////////////////////////////////////////////////// -void CEntityObject::SetHelperScale(float scale) -{ - m_helperScale = scale; -} - -////////////////////////////////////////////////////////////////////////// -float CEntityObject::GetHelperScale() -{ - return m_helperScale; -} - ////////////////////////////////////////////////////////////////////////// //! Analyze errors for this object. void CEntityObject::Validate(IErrorReport* report) @@ -1913,19 +1729,6 @@ bool CEntityObject::IsSimilarObject(CBaseObject* pObject) return false; } -////////////////////////////////////////////////////////////////////////// -void CEntityObject::OnContextMenu(QMenu* pMenu) -{ - if (!pMenu->isEmpty()) - { - pMenu->addSeparator(); - } - - // Events - - CBaseObject::OnContextMenu(pMenu); -} - ////////////////////////////////////////////////////////////////////////// void CEntityObject::PreInitLightProperty() { @@ -2183,16 +1986,6 @@ void CEntityObject::StoreUndoEntityLink(CSelectionGroup* pGroup) } } -void CEntityObject::RegisterListener(IEntityObjectListener* pListener) -{ - m_listeners.Add(pListener); -} - -void CEntityObject::UnregisterListener(IEntityObjectListener* pListener) -{ - m_listeners.Remove(pListener); -} - template T CEntityObject::GetEntityProperty(const char* pName, T defaultvalue) const { diff --git a/Code/Editor/Objects/EntityObject.h b/Code/Editor/Objects/EntityObject.h index dcc6ff7b22..c6b7e4ce2d 100644 --- a/Code/Editor/Objects/EntityObject.h +++ b/Code/Editor/Objects/EntityObject.h @@ -16,10 +16,7 @@ #include "BaseObject.h" #include "IMovieSystem.h" -#include "IEntityObjectListener.h" #include "Gizmo.h" -#include "CryListenerSet.h" -#include "StatObjBus.h" #include #endif @@ -30,6 +27,7 @@ #define CLASS_ENVIRONMENT_LIGHT "EnvironmentLight" class CEntityObject; +class CSelectionGroup; class QMenu; /*! @@ -81,11 +79,6 @@ public: ////////////////////////////////////////////////////////////////////////// // Overrides from CBaseObject. ////////////////////////////////////////////////////////////////////////// - //! Return type name of Entity. - QString GetTypeDescription() const override { return GetEntityClass(); }; - - ////////////////////////////////////////////////////////////////////////// - bool IsSameClass(CBaseObject* obj) override; bool Init(IEditor* ie, CBaseObject* prev, const QString& file) override; void InitVariables() override; @@ -102,16 +95,12 @@ public: void SetEntityPropertyFloat(const char* name, float value); void SetEntityPropertyString(const char* name, const QString& value); - int MouseCreateCallback(CViewport* view, EMouseEvent event, QPoint& point, int flags) override; - void OnContextMenu(QMenu* menu) override; - void SetName(const QString& name) override; void SetSelected(bool bSelect) override; void GetLocalBounds(AABB& box) override; bool HitTest(HitContext& hc) override; - bool HitHelperTest(HitContext& hc) override; bool HitTestRect(HitContext& hc) override; void UpdateVisibility(bool bVisible) override; bool ConvertFromObject(CBaseObject* object) override; @@ -131,7 +120,6 @@ public: enum EAttachmentType { eAT_Pivot, - eAT_GeomCacheNode, eAT_CharacterBone, }; @@ -140,14 +128,9 @@ public: EAttachmentType GetAttachType() const { return m_attachmentType; } QString GetAttachTarget() const { return m_attachmentTarget; } - void SetHelperScale(float scale) override; - float GetHelperScale() override; - void GatherUsedResources(CUsedResources& resources) override; bool IsSimilarObject(CBaseObject* pObject) override; - bool HasMeasurementAxis() const override { return false; } - bool IsIsolated() const override { return false; } ////////////////////////////////////////////////////////////////////////// @@ -221,20 +204,12 @@ public: static void StoreUndoEntityLink(CSelectionGroup* pGroup); - void RegisterListener(IEntityObjectListener* pListener); - void UnregisterListener(IEntityObjectListener* pListener); - protected: template void SetEntityProperty(const char* name, T value); template T GetEntityProperty(const char* name, T defaultvalue) const; - ////////////////////////////////////////////////////////////////////////// - //! Must be called after cloning the object on clone of object. - //! This will make sure object references are cloned correctly. - void PostClone(CBaseObject* pFromObject, CObjectCloneContext& ctx) override; - //! Draw default object items. void DrawProjectorPyramid(DisplayContext& dc, float dist); void DrawProjectorFrustum(DisplayContext& dc, Vec2 size, float dist); @@ -243,10 +218,6 @@ protected: CVarBlock* CloneProperties(CVarBlock* srcProperties); - ////////////////////////////////////////////////////////////////////////// - //! Callback called when one of entity properties have been modified. - void OnPropertyChange(IVariable* var); - ////////////////////////////////////////////////////////////////////////// void OnObjectEvent(CBaseObject* target, int event) override; void ResolveEventTarget(CBaseObject* object, unsigned int index); @@ -328,7 +299,6 @@ protected: // Used for light entities float m_projectorFOV; - IStatObj* m_visualObject; AABB m_box; ////////////////////////////////////////////////////////////////////////// @@ -389,8 +359,6 @@ protected: XmlNodeRef m_physicsState; AZ_POP_DISABLE_DLL_EXPORT_MEMBER_WARNING - static float m_helperScale; - EAttachmentType m_attachmentType; bool m_bEnableReload; @@ -434,7 +402,6 @@ private: void ForceVariableUpdate(); AZ_PUSH_DISABLE_DLL_EXPORT_MEMBER_WARNING - CListenerSet m_listeners; std::vector< std::pair > m_callbacks; AZStd::fixed_vector< IVariable::OnSetCallback, VariableCallbackIndex::Count > m_onSetCallbacksCache; AZ_POP_DISABLE_DLL_EXPORT_MEMBER_WARNING diff --git a/Code/Editor/Objects/IEntityObjectListener.h b/Code/Editor/Objects/IEntityObjectListener.h deleted file mode 100644 index 9072a837d0..0000000000 --- a/Code/Editor/Objects/IEntityObjectListener.h +++ /dev/null @@ -1,20 +0,0 @@ -/* - * Copyright (c) Contributors to the Open 3D Engine Project. - * For complete copyright and license terms please see the LICENSE at the root of this distribution. - * - * SPDX-License-Identifier: Apache-2.0 OR MIT - * - */ - -#pragma once - -class IEntityObjectListener -{ -public: - virtual ~IEntityObjectListener() = default; - - virtual void OnNameChanged(const char* pName) = 0; - virtual void OnSelectionChanged(const bool bSelected) = 0; - virtual void OnDone() = 0; -}; - diff --git a/Code/Editor/Objects/LineGizmo.cpp b/Code/Editor/Objects/LineGizmo.cpp index 31ea341f5b..991f449cd6 100644 --- a/Code/Editor/Objects/LineGizmo.cpp +++ b/Code/Editor/Objects/LineGizmo.cpp @@ -98,16 +98,8 @@ void CLineGizmo::Display(DisplayContext& dc) Vec3 pos = 0.5f * (m_point[0] + m_point[1]); //dc.renderer->DrawLabelEx( p3+Vec3(0,0,0.3f),1.2f,col,true,true,m_name ); - float camDist = dc.camera->GetPosition().GetDistance(pos); - float maxDist = dc.settings->GetLabelsDistance(); - if (camDist < dc.settings->GetLabelsDistance()) { - float range = maxDist / 2.0f; float col[4] = { m_color[0].r, m_color[0].g, m_color[0].b, m_color[0].a }; - if (camDist > range) - { - col[3] = col[3] * (1.0f - (camDist - range) / range); - } dc.SetColor(col[0], col[1], col[2], col[3]); dc.DrawTextLabel(pos + Vec3(0, 0, 0.2f), 1.2f, m_name.toUtf8().data()); } diff --git a/Code/Editor/Objects/ObjectLoader.cpp b/Code/Editor/Objects/ObjectLoader.cpp index 9596265bb9..63ac4c93af 100644 --- a/Code/Editor/Objects/ObjectLoader.cpp +++ b/Code/Editor/Objects/ObjectLoader.cpp @@ -28,19 +28,12 @@ CObjectArchive::CObjectArchive(IObjectManager* objMan, XmlNodeRef xmlRoot, bool m_nFlags = 0; node = xmlRoot; m_pCurrentErrorReport = GetIEditor()->GetErrorReport(); - m_pGeometryPak = nullptr; - m_pCurrentObject = nullptr; m_bNeedResolveObjects = false; - m_bProgressBarEnabled = true; } ////////////////////////////////////////////////////////////////////////// CObjectArchive::~CObjectArchive() { - if (m_pGeometryPak) - { - delete m_pGeometryPak; - } // Always make sure objects are resolved when loading from archive. if (bLoading && m_bNeedResolveObjects) { @@ -74,31 +67,6 @@ void CObjectArchive::SetResolveCallback(CBaseObject* fromObject, REFGUID objectI } } -////////////////////////////////////////////////////////////////////////// -void CObjectArchive::SetResolveCallback(CBaseObject* fromObject, REFGUID objectId, ResolveObjRefFunctor2 func, uint32 userData) -{ - if (objectId == GUID_NULL) - { - func(0, userData); - return; - } - - CBaseObject* object = m_objectManager->FindObject(objectId); - if (object && !(m_nFlags & eObjectLoader_MakeNewIDs)) - { - // Object is already resolved. immidiatly call callback. - func(object, userData); - } - else - { - Callback cb; - cb.fromObject = fromObject; - cb.func2 = func; - cb.userData = userData; - m_resolveCallbacks.insert(Callbacks::value_type(objectId, cb)); - } -} - ////////////////////////////////////////////////////////////////////////// GUID CObjectArchive::ResolveID(REFGUID id) { @@ -117,10 +85,7 @@ void CObjectArchive::ResolveObjects() { CWaitProgress wait("Loading Objects", false); - if (m_bProgressBarEnabled) - { - wait.Start(); - } + wait.Start(); GetIEditor()->SuspendUndo(); ////////////////////////////////////////////////////////////////////////// @@ -129,10 +94,7 @@ void CObjectArchive::ResolveObjects() int numObj = static_cast(m_loadedObjects.size()); for (i = 0; i < numObj; i++) { - if (m_bProgressBarEnabled) - { - wait.Step((i * 100) / numObj); - } + wait.Step((i * 100) / numObj); SLoadedObjectInfo& obj = m_loadedObjects[i]; m_pCurrentErrorReport->SetCurrentValidatorObject(obj.pObject); @@ -204,30 +166,20 @@ void CObjectArchive::ResolveObjects() { (cb.func1)(object); } - if (cb.func2) - { - (cb.func2)(object, cb.userData); - } } m_resolveCallbacks.clear(); ////////////////////////////////////////////////////////////////////////// { CWaitProgress wait("Creating Objects", false); - if (m_bProgressBarEnabled) - { - wait.Start(); - } + wait.Start(); ////////////////////////////////////////////////////////////////////////// // Serialize All Objects from XML. ////////////////////////////////////////////////////////////////////////// int numObj = static_cast(m_loadedObjects.size()); for (i = 0; i < numObj; i++) { - if (m_bProgressBarEnabled) - { - wait.Step((i * 100) / numObj); - } + wait.Step((i * 100) / numObj); SLoadedObjectInfo& obj = m_loadedObjects[i]; m_pCurrentErrorReport->SetCurrentValidatorObject(obj.pObject); @@ -258,8 +210,6 @@ void CObjectArchive::ResolveObjects() m_bNeedResolveObjects = false; m_pCurrentErrorReport->SetCurrentValidatorObject(nullptr); - m_sequenceIdRemap.clear(); - m_pendingIds.clear(); } ////////////////////////////////////////////////////////////////////////// @@ -272,7 +222,6 @@ void CObjectArchive::SaveObject(CBaseObject* pObject) if (m_savedObjects.find(pObject) == m_savedObjects.end()) { - m_pCurrentObject = pObject; m_savedObjects.insert(pObject); // If this object was not saved before. XmlNodeRef objNode = node->newChild("Object"); @@ -307,45 +256,6 @@ CBaseObject* CObjectArchive::LoadObject(const XmlNodeRef& objNode, CBaseObject* return pObject; } -////////////////////////////////////////////////////////////////////////// -void CObjectArchive::LoadObjects(XmlNodeRef& rootObjectsNode) -{ - int numObjects = rootObjectsNode->getChildCount(); - for (int i = 0; i < numObjects; i++) - { - XmlNodeRef objNode = rootObjectsNode->getChild(i); - LoadObject(objNode, nullptr); - } -} - -////////////////////////////////////////////////////////////////////////// -void CObjectArchive::ReportError(CErrorRecord& err) -{ - if (m_pCurrentErrorReport) - { - m_pCurrentErrorReport->ReportError(err); - } -} - -////////////////////////////////////////////////////////////////////////// -void CObjectArchive::SetErrorReport(CErrorReport* errReport) -{ - if (errReport) - { - m_pCurrentErrorReport = errReport; - } - else - { - m_pCurrentErrorReport = GetIEditor()->GetErrorReport(); - } -} - -////////////////////////////////////////////////////////////////////////// -void CObjectArchive::ShowErrors() -{ - GetIEditor()->GetErrorReport()->Display(); -} - ////////////////////////////////////////////////////////////////////////// void CObjectArchive::MakeNewIds(bool bEnable) { @@ -359,70 +269,8 @@ void CObjectArchive::MakeNewIds(bool bEnable) } } -////////////////////////////////////////////////////////////////////////// -void CObjectArchive::SetShouldResetInternalMembers(bool reset) -{ - if (reset) - { - m_nFlags |= eObjectLoader_ResetInternalMembers; - } - else - { - m_nFlags &= ~(eObjectLoader_ResetInternalMembers); - } -} - ////////////////////////////////////////////////////////////////////////// void CObjectArchive::RemapID(REFGUID oldId, REFGUID newId) { m_IdRemap[oldId] = newId; } - -////////////////////////////////////////////////////////////////////////// -CPakFile* CObjectArchive::GetGeometryPak(const char* sFilename) -{ - if (m_pGeometryPak) - { - return m_pGeometryPak; - } - m_pGeometryPak = new CPakFile; - m_pGeometryPak->Open(sFilename); - return m_pGeometryPak; -} - -////////////////////////////////////////////////////////////////////////// -CBaseObject* CObjectArchive::GetCurrentObject() -{ - return m_pCurrentObject; -} - -////////////////////////////////////////////////////////////////////////// -void CObjectArchive::AddSequenceIdMapping(uint32 oldId, uint32 newId) -{ - assert(oldId != newId); - assert(GetIEditor()->GetMovieSystem()->FindSequenceById(oldId) || stl::find(m_pendingIds, oldId)); - assert(GetIEditor()->GetMovieSystem()->FindSequenceById(newId) == nullptr); - assert(stl::find(m_pendingIds, newId) == false); - m_sequenceIdRemap[oldId] = newId; - m_pendingIds.push_back(newId); -} - -////////////////////////////////////////////////////////////////////////// -uint32 CObjectArchive::RemapSequenceId(uint32 id) const -{ - std::map::const_iterator itr = m_sequenceIdRemap.find(id); - if (itr == m_sequenceIdRemap.end()) - { - return id; - } - else - { - return itr->second; - } -} - -////////////////////////////////////////////////////////////////////////// -bool CObjectArchive::IsAmongPendingIds(uint32 id) const -{ - return stl::find(m_pendingIds, id); -} diff --git a/Code/Editor/Objects/ObjectLoader.h b/Code/Editor/Objects/ObjectLoader.h index a491e50da0..fa576fa983 100644 --- a/Code/Editor/Objects/ObjectLoader.h +++ b/Code/Editor/Objects/ObjectLoader.h @@ -6,18 +6,15 @@ * */ - -#ifndef CRYINCLUDE_EDITOR_OBJECTS_OBJECTLOADER_H -#define CRYINCLUDE_EDITOR_OBJECTS_OBJECTLOADER_H #pragma once #include "Util/GuidUtil.h" #include "ErrorReport.h" +#include -#include +#include -class CPakFile; class CErrorRecord; struct IObjectManager; @@ -43,63 +40,27 @@ AZ_POP_DISABLE_DLL_EXPORT_BASECLASS_WARNING //! Resolve callback with only one parameter of CBaseObject. typedef AZStd::function ResolveObjRefFunctor1; - //! Resolve callback with two parameters one is pointer to CBaseObject and second use data integer. - typedef AZStd::function ResolveObjRefFunctor2; - - /** Register Object id. - @param objectId Original object id from the file. - @param realObjectId Changed object id. - */ - //void RegisterObjectId( int objectId,int realObjectId ); // Return object ID remapped after loading. GUID ResolveID(REFGUID id); //! Set object resolve callback, it will be called once object with specified Id is loaded. void SetResolveCallback(CBaseObject* fromObject, REFGUID objectId, ResolveObjRefFunctor1 func); - //! Set object resolve callback, it will be called once object with specified Id is loaded. - void SetResolveCallback(CBaseObject* fromObject, REFGUID objectId, ResolveObjRefFunctor2 func, uint32 userData); //! Resolve all object ids and call callbacks on resolved objects. void ResolveObjects(); // Save object to archive. void SaveObject(CBaseObject* pObject); - //! Load multiple objects from archive. - void LoadObjects(XmlNodeRef& rootObjectsNode); - //! Load one object from archive. CBaseObject* LoadObject(const XmlNodeRef& objNode, CBaseObject* pPrevObject = nullptr); - ////////////////////////////////////////////////////////////////////////// - int GetLoadedObjectsCount() { return static_cast(m_loadedObjects.size()); } - CBaseObject* GetLoadedObject(int nIndex) const { return m_loadedObjects[nIndex].pObject; } - //! If true new loaded objects will be assigned new GUIDs. void MakeNewIds(bool bEnable); //! Remap object ids. void RemapID(REFGUID oldId, REFGUID newId); - //! Report error during loading. - void ReportError(CErrorRecord& err); - //! Assigner different error report class. - void SetErrorReport(CErrorReport* errReport); - //! Display collected error reports. - void ShowErrors(); - - void EnableProgressBar(bool bEnable) { m_bProgressBarEnabled = bEnable; }; - - CPakFile* GetGeometryPak(const char* sFilename); - CBaseObject* GetCurrentObject(); - - void AddSequenceIdMapping(uint32 oldId, uint32 newId); - uint32 RemapSequenceId(uint32 id) const; - bool IsAmongPendingIds(uint32 id) const; - - void SetShouldResetInternalMembers(bool reset); - bool ShouldResetInternalMembers() const { return m_nFlags & eObjectLoader_ResetInternalMembers; } - private: struct SLoadedObjectInfo { @@ -110,22 +71,19 @@ private: bool operator <(const SLoadedObjectInfo& oi) const { return nSortOrder < oi.nSortOrder; } }; - IObjectManager* m_objectManager; struct Callback { ResolveObjRefFunctor1 func1; - ResolveObjRefFunctor2 func2; - uint32 userData; _smart_ptr fromObject; - Callback() { func1 = 0; func2 = 0; userData = 0; }; + Callback() { func1 = 0; } }; typedef std::multimap Callbacks; AZ_PUSH_DISABLE_DLL_EXPORT_MEMBER_WARNING Callbacks m_resolveCallbacks; // Set of all saved objects to this archive. - typedef std::set<_smart_ptr > ObjectsSet; + typedef AZStd::set<_smart_ptr > ObjectsSet; ObjectsSet m_savedObjects; //typedef std::multimap > OrderedObjects; @@ -138,20 +96,11 @@ private: enum EObjectLoaderFlags { eObjectLoader_MakeNewIDs = 0x0001, // If true new loaded objects will be assigned new GUIDs. - eObjectLoader_ResetInternalMembers = 0x0004, // In case we are deserializing and we would like to wipe all previous state }; int m_nFlags; IErrorReport* m_pCurrentErrorReport; - CPakFile* m_pGeometryPak; - CBaseObject* m_pCurrentObject; bool m_bNeedResolveObjects; - bool m_bProgressBarEnabled; - // This table is used when there is any collision of ids while importing TrackView sequences. - std::map m_sequenceIdRemap; - std::vector m_pendingIds; AZ_POP_DISABLE_DLL_EXPORT_MEMBER_WARNING }; - -#endif // CRYINCLUDE_EDITOR_OBJECTS_OBJECTLOADER_H diff --git a/Code/Editor/Objects/ObjectManager.cpp b/Code/Editor/Objects/ObjectManager.cpp index ee7e9a8e96..06233d4dd2 100644 --- a/Code/Editor/Objects/ObjectManager.cpp +++ b/Code/Editor/Objects/ObjectManager.cpp @@ -26,7 +26,6 @@ #include "Util/Image.h" #include "ObjectManagerLegacyUndo.h" #include "Include/HitContext.h" -#include "EditMode/DeepSelection.h" #include "Plugins/ComponentEntityEditorPlugin/Objects/ComponentEntityObject.h" #include @@ -50,7 +49,7 @@ public: GUID guid; public: - virtual ~CXMLObjectClassDesc() = default; + virtual ~CXMLObjectClassDesc() = default; REFGUID ClassID() override { return guid; @@ -81,60 +80,27 @@ CObjectManager* g_pObjectManager = nullptr; ////////////////////////////////////////////////////////////////////////// CObjectManager::CObjectManager() - : m_lastHideMask(0) - , m_maxObjectViewDistRatio(0.00001f) - , m_currSelection(&m_defaultSelection) - , m_nLastSelCount(0) + : m_currSelection(&m_defaultSelection) , m_bSelectionChanged(false) - , m_selectCallback(nullptr) - , m_currEditObject(nullptr) - , m_bSingleSelection(false) - , m_createGameObjects(true) - , m_bGenUniqObjectNames(true) , m_gizmoManager(new CGizmoManager()) - , m_pLoadProgress(nullptr) - , m_loadedObjects(0) - , m_totalObjectsToLoad(0) , m_bExiting(false) , m_isUpdateVisibilityList(false) , m_currentHideCount(CBaseObject::s_invalidHiddenID) - , m_bInReloading(false) - , m_bSkipObjectUpdate(false) - , m_bLevelExporting(false) { g_pObjectManager = this; - RegisterObjectClasses(); - m_objectsByName.reserve(1024); - LoadRegistry(); } ////////////////////////////////////////////////////////////////////////// CObjectManager::~CObjectManager() { m_bExiting = true; - SaveRegistry(); DeleteAllObjects(); delete m_gizmoManager; } -////////////////////////////////////////////////////////////////////////// -void CObjectManager::RegisterObjectClasses() -{ - LoadRegistry(); -} - -////////////////////////////////////////////////////////////////////////// -void CObjectManager::SaveRegistry() -{ -} - -void CObjectManager::LoadRegistry() -{ -} - ////////////////////////////////////////////////////////////////////////// CBaseObject* CObjectManager::NewObject(CObjectClassDesc* cls, CBaseObject* prev, const QString& file, const char* newObjectName) { @@ -186,17 +152,6 @@ CBaseObject* CObjectManager::NewObject(CObjectClassDesc* cls, CBaseObject* prev, if (obj->GetType() != OBJTYPE_AZENTITY) { GetIEditor()->RecordUndo(new CUndoBaseObjectNew(obj)); - - // check for script entities - const char* scriptClassName = ""; - CEntityObject* entityObj = qobject_cast(obj); - QByteArray entityClass; // Leave it outside of the if. Otherwise buffer is deleted. - if (entityObj) - { - entityClass = entityObj->GetEntityClass().toUtf8(); - scriptClassName = entityClass.data(); - } - } } @@ -318,12 +273,6 @@ CBaseObject* CObjectManager::NewObject(CObjectArchive& ar, CBaseObject* pUndoObj } } - m_loadedObjects++; - if (m_pLoadProgress && m_totalObjectsToLoad > 0) - { - m_pLoadProgress->Step((m_loadedObjects * 100) / m_totalObjectsToLoad); - } - return pObject; } @@ -351,10 +300,6 @@ CBaseObject* CObjectManager::NewObject(const QString& typeName, CBaseObject* pre void CObjectManager::DeleteObject(CBaseObject* obj) { AZ_PROFILE_FUNCTION(Editor); - if (m_currEditObject == obj) - { - EndEditParams(); - } if (!obj) { @@ -367,7 +312,6 @@ void CObjectManager::DeleteObject(CBaseObject* obj) return; } - NotifyObjectListeners(obj, CBaseObject::ON_PREDELETE); obj->NotifyListeners(CBaseObject::ON_PREDELETE); // Must be after object DetachAll to support restoring Parent/Child relations. @@ -377,7 +321,7 @@ void CObjectManager::DeleteObject(CBaseObject* obj) // Store undo for all child objects. for (int i = 0; i < obj->GetChildCount(); i++) { - obj->GetChild(i)->StoreUndo("DeleteParent"); + obj->GetChild(i)->StoreUndo(); } CUndo::Record(new CUndoBaseObjectDelete(obj)); } @@ -388,8 +332,6 @@ void CObjectManager::DeleteObject(CBaseObject* obj) obj->Done(); - NotifyObjectListeners(obj, CBaseObject::ON_DELETE); - RemoveObject(obj); } @@ -462,22 +404,10 @@ void CObjectManager::DeleteAllObjects() { AZ_PROFILE_FUNCTION(Editor); - EndEditParams(); - ClearSelection(); - int i; InvalidateVisibleList(); - // Delete all selection groups. - std::vector sel; - stl::map_to_vector(m_selections, sel); - for (i = 0; i < sel.size(); i++) - { - delete sel[i]; - } - m_selections.clear(); - TBaseObjects objectsHolder; GetAllObjects(objectsHolder); @@ -485,7 +415,7 @@ void CObjectManager::DeleteAllObjects() m_objects.clear(); m_objectsByName.clear(); - for (i = 0; i < objectsHolder.size(); i++) + for (int i = 0; i < objectsHolder.size(); i++) { objectsHolder[i]->Done(); } @@ -499,17 +429,6 @@ void CObjectManager::DeleteAllObjects() m_animatedAttachedEntities.clear(); } -CBaseObject* CObjectManager::CloneObject(CBaseObject* obj) -{ - AZ_PROFILE_FUNCTION(Editor); - assert(obj); - //CRuntimeClass *cls = obj->GetRuntimeClass(); - //CBaseObject *clone = (CBaseObject*)cls->CreateObject(); - //clone->CloneCopy( obj ); - CBaseObject* clone = NewObject(obj->GetClassDesc(), obj); - return clone; -} - ////////////////////////////////////////////////////////////////////////// CBaseObject* CObjectManager::FindObject(REFGUID guid) const { @@ -608,7 +527,7 @@ bool CObjectManager::AddObject(CBaseObject* obj) if (CEntityObject* entityObj = qobject_cast(obj)) { CEntityObject::EAttachmentType attachType = entityObj->GetAttachType(); - if (attachType == CEntityObject::EAttachmentType::eAT_GeomCacheNode || attachType == CEntityObject::EAttachmentType::eAT_CharacterBone) + if (attachType == CEntityObject::EAttachmentType::eAT_CharacterBone) { m_animatedAttachedEntities.insert(entityObj); } @@ -620,7 +539,6 @@ bool CObjectManager::AddObject(CBaseObject* obj) RegisterObjectName(obj->GetName()); InvalidateVisibleList(); - NotifyObjectListeners(obj, CBaseObject::ON_ADD); return true; } @@ -641,12 +559,6 @@ void CObjectManager::RemoveObject(CBaseObject* obj) // Remove this object from selection groups. m_currSelection->RemoveObject(obj); - std::vector sel; - stl::map_to_vector(m_selections, sel); - for (int i = 0; i < sel.size(); i++) - { - sel[i]->RemoveObject(obj); - } m_objectsByName.erase(AZ::Crc32(obj->GetName().toUtf8().data(), obj->GetName().toUtf8().count(), true)); @@ -674,54 +586,7 @@ void CObjectManager::ChangeObjectId(REFGUID oldGuid, REFGUID newGuid) CBaseObjectPtr pRemappedObject = (*it).second; pRemappedObject->SetId(newGuid); m_objects.erase(it); - m_objects.insert(std::make_pair(newGuid, pRemappedObject)); - } -} - -////////////////////////////////////////////////////////////////////////// -void CObjectManager::ShowDuplicationMsgWarning(CBaseObject* obj, const QString& newName, bool bShowMsgBox) const -{ - CBaseObject* pExisting = FindObject(newName); - if (pExisting) - { - QString sRenameWarning = QObject::tr("%1 \"%2\" was NOT renamed to \"%3\" because %4 with the same name already exists.") - .arg(obj->GetClassDesc()->ClassName()) - .arg(obj->GetName()) - .arg(newName) - .arg(pExisting->GetClassDesc()->ClassName() - ); - - // If id is taken. - CryWarning(VALIDATOR_MODULE_EDITOR, VALIDATOR_WARNING, "%s", sRenameWarning.toUtf8().data()); - - if (bShowMsgBox) - { - QMessageBox::critical(QApplication::activeWindow(), QString(), sRenameWarning); - } - } -} - -////////////////////////////////////////////////////////////////////////// -void CObjectManager::ChangeObjectName(CBaseObject* obj, const QString& newName) -{ - assert(obj); - - if (newName != obj->GetName()) - { - if (IsDuplicateObjectName(newName)) - { - return; - } - - // Remove previous name from map - const AZ::Crc32 oldNameCrc(obj->GetName().toUtf8().data(), obj->GetName().count(), true); - m_objectsByName.erase(oldNameCrc); - - obj->SetName(newName); - - // Add new name to map - const AZ::Crc32 nameCrc(newName.toUtf8().data(), newName.count(), true); - m_objectsByName[nameCrc] = obj; + m_objects.insert(AZStd::make_pair(newGuid, pRemappedObject)); } } @@ -742,28 +607,9 @@ void CObjectManager::GetObjects(CBaseObjectsArray& objects) const } } -void CObjectManager::GetObjects(CBaseObjectsArray& objects, BaseObjectFilterFunctor const& filter) const -{ - objects.clear(); - objects.reserve(m_objects.size()); - for (Objects::const_iterator it = m_objects.begin(); it != m_objects.end(); ++it) - { - assert(it->second); - if (filter.first(*it->second, filter.second)) - { - objects.push_back(it->second); - } - } -} - ////////////////////////////////////////////////////////////////////////// void CObjectManager::SendEvent(ObjectEvent event) { - if (event == EVENT_RELOAD_ENTITY) - { - m_bInReloading = true; - } - for (Objects::iterator it = m_objects.begin(); it != m_objects.end(); ++it) { CBaseObject* obj = it->second; @@ -772,7 +618,6 @@ void CObjectManager::SendEvent(ObjectEvent event) if (event == EVENT_RELOAD_ENTITY) { - m_bInReloading = false; GetIEditor()->Notify(eNotify_OnReloadTrackView); } } @@ -792,93 +637,6 @@ void CObjectManager::SendEvent(ObjectEvent event, const AABB& bounds) } } -////////////////////////////////////////////////////////////////////////// -void CObjectManager::Update() -{ - if (m_bSkipObjectUpdate) - { - return; - } - - QWidget* prevActiveWindow = QApplication::activeWindow(); - - // Restore focus if it changed. - if (prevActiveWindow && QApplication::activeWindow() != prevActiveWindow) - { - prevActiveWindow->setFocus(); - } -} - -////////////////////////////////////////////////////////////////////////// -void CObjectManager::HideObject(CBaseObject* obj, bool hide) -{ - assert(obj != 0); - if (hide) - { - obj->SetHidden(hide, ++m_currentHideCount); - } - else - { - obj->SetHidden(false); - } - InvalidateVisibleList(); -} - -void CObjectManager::ShowLastHiddenObject() -{ - uint64 mostRecentID = CBaseObject::s_invalidHiddenID; - CBaseObject* mostRecentObject = nullptr; - for (auto it : m_objects) - { - CBaseObject* obj = it.second; - - uint64 hiddenID = obj->GetHideOrder(); - - if (hiddenID > mostRecentID) - { - mostRecentID = hiddenID; - mostRecentObject = obj; - } - } - - if (mostRecentObject != nullptr) - { - mostRecentObject->SetHidden(false); - } -} - -////////////////////////////////////////////////////////////////////////// -void CObjectManager::UnhideAll() -{ - for (Objects::iterator it = m_objects.begin(); it != m_objects.end(); ++it) - { - CBaseObject* obj = it->second; - obj->SetHidden(false); - } - - InvalidateVisibleList(); -} - -////////////////////////////////////////////////////////////////////////// -void CObjectManager::FreezeObject(CBaseObject* obj, bool freeze) -{ - assert(obj != 0); - // Remove object from main object set and put it to hidden set. - obj->SetFrozen(freeze); - InvalidateVisibleList(); -} - -////////////////////////////////////////////////////////////////////////// -void CObjectManager::UnfreezeAll() -{ - for (Objects::iterator it = m_objects.begin(); it != m_objects.end(); ++it) - { - CBaseObject* obj = it->second; - obj->SetFrozen(false); - } - InvalidateVisibleList(); -} - ////////////////////////////////////////////////////////////////////////// bool CObjectManager::SelectObject(CBaseObject* obj, bool bUseMask) { @@ -894,14 +652,6 @@ bool CObjectManager::SelectObject(CBaseObject* obj, bool bUseMask) return false; } - if (m_selectCallback) - { - if (!m_selectCallback->OnSelectObject(obj)) - { - return true; - } - } - m_currSelection->AddObject(obj); // while in ComponentMode we never explicitly change selection (the entity will always be selected). @@ -921,14 +671,6 @@ bool CObjectManager::SelectObject(CBaseObject* obj, bool bUseMask) return true; } -void CObjectManager::SelectEntities(std::set& s) -{ - for (std::set::iterator it = s.begin(), end = s.end(); it != end; ++it) - { - SelectObject(*it); - } -} - void CObjectManager::UnselectObject(CBaseObject* obj) { // while in ComponentMode we never explicitly change selection (the entity will always be selected). @@ -947,139 +689,6 @@ void CObjectManager::UnselectObject(CBaseObject* obj) m_currSelection->RemoveObject(obj); } -CSelectionGroup* CObjectManager::GetSelection(const QString& name) const -{ - CSelectionGroup* selection = stl::find_in_map(m_selections, name, (CSelectionGroup*)nullptr); - return selection; -} - -void CObjectManager::GetNameSelectionStrings(QStringList& names) -{ - for (TNameSelectionMap::iterator it = m_selections.begin(); it != m_selections.end(); ++it) - { - names.push_back(it->first); - } -} - -void CObjectManager::NameSelection(const QString& name) -{ - if (m_currSelection->IsEmpty()) - { - return; - } - - CSelectionGroup* selection = stl::find_in_map(m_selections, name, (CSelectionGroup*)nullptr); - if (selection) - { - assert(selection != 0); - // Check if trying to rename itself to the same name. - if (selection == m_currSelection) - { - return; - } - m_selections.erase(name); - delete selection; - } - selection = new CSelectionGroup; - selection->Copy(*m_currSelection); - selection->SetName(name); - m_selections[name] = selection; - m_currSelection = selection; - m_defaultSelection.RemoveAll(); -} - -void CObjectManager::SerializeNameSelection(XmlNodeRef& rootNode, bool bLoading) -{ - if (!rootNode) - { - return; - } - - _smart_ptr tmpGroup(nullptr); - - QString selRootStr("NameSelection"); - QString selNodeStr("NameSelectionNode"); - QString selNodeNameStr("name"); - QString idStr("id"); - QString objAttrStr("obj"); - - XmlNodeRef startNode = rootNode->findChild(selRootStr.toUtf8().data()); - - if (bLoading) - { - m_selections.erase(m_selections.begin(), m_selections.end()); - - if (startNode) - { - for (int selNodeNo = 0; selNodeNo < startNode->getChildCount(); ++selNodeNo) - { - XmlNodeRef selNode = startNode->getChild(selNodeNo); - tmpGroup = new CSelectionGroup; - - for (int objIDNodeNo = 0; objIDNodeNo < selNode->getChildCount(); ++objIDNodeNo) - { - GUID curID = GUID_NULL; - XmlNodeRef idNode = selNode->getChild(objIDNodeNo); - if (!idNode->getAttr(idStr.toUtf8().data(), curID)) - { - continue; - } - - if (curID != GUID_NULL) - { - if (GetIEditor()->GetObjectManager()->FindObject(curID)) - { - tmpGroup->AddObject(GetIEditor()->GetObjectManager()->FindObject(curID)); - } - } - } - - if (tmpGroup->GetCount() > 0) - { - QString nameStr; - if (!selNode->getAttr(selNodeNameStr.toUtf8().data(), nameStr)) - { - continue; - } - tmpGroup->SetName(nameStr); - m_selections[nameStr] = tmpGroup; - } - } - } - } - else - { - startNode = rootNode->newChild(selRootStr.toUtf8().data()); - CSelectionGroup* objSelection = nullptr; - - for (TNameSelectionMap::iterator it = m_selections.begin(); it != m_selections.end(); ++it) - { - XmlNodeRef selectionNameNode = startNode->newChild(selNodeStr.toUtf8().data()); - selectionNameNode->setAttr(selNodeNameStr.toUtf8().data(), it->first.toUtf8().data()); - objSelection = it->second; - - if (!objSelection) - { - continue; - } - - if (objSelection->GetCount() == 0) - { - continue; - } - - for (int i = 0; i < objSelection->GetCount(); ++i) - { - if (objSelection->GetObject(i)) - { - XmlNodeRef objNode = selectionNameNode->newChild(objAttrStr.toUtf8().data()); - objNode->setAttr(idStr.toUtf8().data(), GuidUtil::ToString(objSelection->GetObject(i)->GetId())); - } - } - } - } -} - ////////////////////////////////////////////////////////////////////////// int CObjectManager::ClearSelection() { @@ -1133,63 +742,6 @@ int CObjectManager::ClearSelection() return numSel; } -////////////////////////////////////////////////////////////////////////// -int CObjectManager::InvertSelection() -{ - AZ_PROFILE_FUNCTION(Editor); - - int selCount = 0; - // iterate all objects. - for (Objects::const_iterator it = m_objects.begin(); it != m_objects.end(); ++it) - { - CBaseObject* pObj = it->second; - if (pObj->IsSelected()) - { - UnselectObject(pObj); - } - else - { - if (SelectObject(pObj)) - { - selCount++; - } - } - } - return selCount; -} - -void CObjectManager::SetSelection(const QString& name) -{ - AZ_PROFILE_FUNCTION(Editor); - CSelectionGroup* selection = stl::find_in_map(m_selections, name, (CSelectionGroup*)nullptr); - if (selection) - { - UnselectCurrent(); - assert(selection != 0); - m_currSelection = selection; - SelectCurrent(); - } -} - -void CObjectManager::RemoveSelection(const QString& name) -{ - AZ_PROFILE_FUNCTION(Editor); - - QString selName = name; - CSelectionGroup* selection = stl::find_in_map(m_selections, name, (CSelectionGroup*)nullptr); - if (selection) - { - if (selection == m_currSelection) - { - UnselectCurrent(); - m_currSelection = &m_defaultSelection; - m_defaultSelection.RemoveAll(); - } - delete selection; - m_selections.erase(selName); - } -} - void CObjectManager::SelectCurrent() { AZ_PROFILE_FUNCTION(Editor); @@ -1261,157 +813,7 @@ void CObjectManager::Display(DisplayContext& dc) } } -void CObjectManager::ForceUpdateVisibleObjectCache([[maybe_unused]] DisplayContext& dc) -{ - AZ_Assert(false, "CObjectManager::ForceUpdateVisibleObjectCache is legacy/deprecated and should not be used."); -} - -void CObjectManager::FindDisplayableObjects([[maybe_unused]] DisplayContext& dc, [[maybe_unused]] bool bDisplay) -{ - AZ_Assert(false, "CObjectManager::FindDisplayableObjects is legacy/deprecated and should not be used."); -} - -void CObjectManager::BeginEditParams(CBaseObject* obj, int flags) -{ - assert(obj != 0); - if (obj == m_currEditObject) - { - return; - } - - if (GetSelection()->GetCount() > 1) - { - return; - } - - QWidget* prevActiveWindow = QApplication::activeWindow(); - - if (m_currEditObject) - { - //if (obj->GetClassDesc() != m_currEditObject->GetClassDesc()) - if (!obj->IsSameClass(m_currEditObject)) - { - EndEditParams(flags); - } - } - - m_currEditObject = obj; - - if (flags & OBJECT_CREATE) - { - // Unselect all other objects. - ClearSelection(); - // Select this object. - SelectObject(obj, false); - } - - m_bSingleSelection = true; - - // Restore focus if it changed. - // OBJECT_EDIT is used by the EntityOutliner when items are selected. Using it here to prevent shifting focus to the EntityInspector on select. - if (!(flags & OBJECT_EDIT) && prevActiveWindow && QApplication::activeWindow() != prevActiveWindow) - { - prevActiveWindow->setFocus(); - } -} - -void CObjectManager::EndEditParams([[maybe_unused]] int flags) -{ - m_bSingleSelection = false; - m_currEditObject = nullptr; - //m_bSelectionChanged = false; // don't need to clear for ungroup -} - -//! Select objects within specified distance from given position. -int CObjectManager::SelectObjects(const AABB& box, bool bUnselect) -{ - AZ_PROFILE_FUNCTION(Editor); - int numSel = 0; - - AABB objBounds; - for (Objects::iterator it = m_objects.begin(); it != m_objects.end(); ++it) - { - CBaseObject* obj = it->second; - - if (obj->IsHidden()) - { - continue; - } - - obj->GetBoundBox(objBounds); - if (box.IsIntersectBox(objBounds)) - { - numSel++; - if (!bUnselect) - { - SelectObject(obj); - } - else - { - UnselectObject(obj); - } - } - } - return numSel; -} - ////////////////////////////////////////////////////////////////////////// -int CObjectManager::MoveObjects(const AABB& box, const Vec3& offset, ImageRotationDegrees rotation, [[maybe_unused]] bool bIsCopy) -{ - AABB objBounds; - - Vec3 src = (box.min + box.max) / 2; - Vec3 dst = src + offset; - float alpha = 0.0f; - switch (rotation) - { - case ImageRotationDegrees::Rotate90: - alpha = gf_halfPI; - break; - case ImageRotationDegrees::Rotate180: - alpha = gf_PI; - break; - case ImageRotationDegrees::Rotate270: - alpha = gf_PI + gf_halfPI; - break; - default: - break; - } - - float cosa = cos(alpha); - float sina = sin(alpha); - - for (Objects::iterator it = m_objects.begin(); it != m_objects.end(); ++it) - { - CBaseObject* obj = it->second; - - if (obj->GetParent()) - { - continue; - } - - obj->GetBoundBox(objBounds); - if (box.IsIntersectBox(objBounds)) - { - if (rotation == ImageRotationDegrees::Rotate0) - { - obj->SetPos(obj->GetPos() - src + dst); - } - else - { - Vec3 pos = obj->GetPos() - src; - Vec3 newPos(pos); - newPos.x = cosa * pos.x - sina * pos.y; - newPos.y = sina * pos.x + cosa * pos.y; - obj->SetPos(newPos + dst); - Quat q; - obj->SetRotation(q.CreateRotationZ(alpha) * obj->GetRotation()); - } - } - } - return 0; -} - bool CObjectManager::IsObjectDeletionAllowed(CBaseObject* pObject) { if (!pObject) @@ -1442,99 +844,12 @@ void CObjectManager::DeleteSelection() objects.AddObject(m_currSelection->GetObject(i)); } - RemoveSelection(m_currSelection->GetName()); m_currSelection = &m_defaultSelection; m_defaultSelection.RemoveAll(); DeleteSelection(&objects); } -////////////////////////////////////////////////////////////////////////// -bool CObjectManager::HitTestObject(CBaseObject* obj, HitContext& hc) -{ - AZ_PROFILE_FUNCTION(Editor); - - if (obj->IsFrozen()) - { - return false; - } - - if (obj->IsHidden()) - { - return false; - } - - // This object is rejected by deep selection. - if (obj->CheckFlags(OBJFLAG_NO_HITTEST)) - { - return false; - } - - ObjectType objType = obj->GetType(); - - // Check if this object type is masked for selection. - if (!(objType & gSettings.objectSelectMask)) - { - return false; - } - - const bool bSelectionHelperHit = obj->HitHelperTest(hc); - - if (hc.bUseSelectionHelpers && !bSelectionHelperHit) - { - return false; - } - - if (!bSelectionHelperHit) - { - // Fast checking. - if (hc.camera && !obj->IsInCameraView(*hc.camera)) - { - return false; - } - else if (hc.bounds && !obj->IntersectRectBounds(*hc.bounds)) - { - return false; - } - - // Do 2D space testing. - if (hc.nSubObjFlags == 0) - { - Ray ray(hc.raySrc, hc.rayDir); - if (!obj->IntersectRayBounds(ray)) - { - return false; - } - } - else if (!obj->HitTestRect(hc)) - { - return false; - } - } - - return (bSelectionHelperHit || obj->HitTest(hc)); -} - -////////////////////////////////////////////////////////////////////////// -bool CObjectManager::HitTest([[maybe_unused]] HitContext& hitInfo) -{ - AZ_Assert(false, "CObjectManager::HitTest is legacy/deprecated and should not be used."); - return false; -} - -void CObjectManager::FindObjectsInRect( - [[maybe_unused]] CViewport* view, [[maybe_unused]] const QRect& rect, [[maybe_unused]] std::vector& guids) -{ - AZ_Assert(false, "CObjectManager::FindObjectsInRect is legacy/deprecated and should not be used."); -} - -////////////////////////////////////////////////////////////////////////// -void CObjectManager::SelectObjectsInRect( - [[maybe_unused]] CViewport* view, [[maybe_unused]] const QRect& rect, [[maybe_unused]] bool bSelect) -{ - AZ_Assert(false, "CObjectManager::SelectObjectsInRect is legacy/deprecated and should not be used."); -} - ////////////////////////////////////////////////////////////////////////// uint16 FindPossibleObjectNameNumber(std::set& numberSet) { @@ -1585,50 +900,9 @@ void CObjectManager::RegisterObjectName(const QString& name) } } -////////////////////////////////////////////////////////////////////////// -void CObjectManager::UpdateRegisterObjectName(const QString& name) -{ - // Remove all numbers from the end of typename. - QString typeName = name; - int nameLen = typeName.length(); - int len = nameLen; - - while (len > 0 && typeName[len - 1].isDigit()) - { - len--; - } - - typeName = typeName.left(len); - - uint16 num = 1; - if (len < nameLen) - { - num = (uint16)atoi((const char*)name.toUtf8().data() + len) + 0; - } - - NameNumbersMap::iterator it = m_nameNumbersMap.find(typeName); - - if (it != m_nameNumbersMap.end()) - { - if (it->second.end() != it->second.find(num)) - { - it->second.erase(num); - if (it->second.empty()) - { - m_nameNumbersMap.erase(it); - } - } - } -} - ////////////////////////////////////////////////////////////////////////// QString CObjectManager::GenerateUniqueObjectName(const QString& theTypeName) { - if (!m_bGenUniqObjectNames) - { - return theTypeName; - } - QString typeName = theTypeName; const int subIndex = theTypeName.indexOf("::"); if (subIndex != -1 && subIndex > typeName.length() - 2) @@ -1663,14 +937,6 @@ QString CObjectManager::GenerateUniqueObjectName(const QString& theTypeName) return str; } -////////////////////////////////////////////////////////////////////////// -bool CObjectManager::EnableUniqObjectNames(bool bEnable) -{ - bool bPrev = m_bGenUniqObjectNames; - m_bGenUniqObjectNames = bEnable; - return bPrev; -} - ////////////////////////////////////////////////////////////////////////// CObjectClassDesc* CObjectManager::FindClass(const QString& className) { @@ -1682,64 +948,6 @@ CObjectClassDesc* CObjectManager::FindClass(const QString& className) return nullptr; } -////////////////////////////////////////////////////////////////////////// -void CObjectManager::GetClassCategories(QStringList& categories) -{ - std::vector classes; - CClassFactory::Instance()->GetClassesBySystemID(ESYSTEM_CLASS_OBJECT, classes); - std::set cset; - for (int i = 0; i < classes.size(); i++) - { - QString category = classes[i]->Category(); - if (!category.isEmpty()) - { - cset.insert(category); - } - } - categories.clear(); - categories.reserve(static_cast(cset.size())); - for (std::set::iterator cit = cset.begin(); cit != cset.end(); ++cit) - { - categories.push_back(*cit); - } -} - -void CObjectManager::GetClassCategoryToolClassNamePairs(std::vector< std::pair >& categoryToolClassNamePairs) -{ - std::vector classes; - CClassFactory::Instance()->GetClassesBySystemID(ESYSTEM_CLASS_OBJECT, classes); - std::set< std::pair > cset; - for (int i = 0; i < classes.size(); i++) - { - QString category = classes[i]->Category(); - QString toolClassName = ((CObjectClassDesc*)classes[i])->GetToolClassName(); - if (!category.isEmpty()) - { - cset.insert(std::pair(category, toolClassName)); - } - } - categoryToolClassNamePairs.clear(); - categoryToolClassNamePairs.reserve(cset.size()); - for (std::set< std::pair >::iterator cit = cset.begin(); cit != cset.end(); ++cit) - { - categoryToolClassNamePairs.push_back(*cit); - } -} - -void CObjectManager::GetClassTypes(const QString& category, QStringList& types) -{ - std::vector classes; - CClassFactory::Instance()->GetClassesBySystemID(ESYSTEM_CLASS_OBJECT, classes); - for (int i = 0; i < classes.size(); i++) - { - QString cat = classes[i]->Category(); - if (QString::compare(cat, category, Qt::CaseInsensitive) == 0 && classes[i]->IsEnabled()) - { - types.push_back(classes[i]->ClassName()); - } - } -} - ////////////////////////////////////////////////////////////////////////// void CObjectManager::RegisterClassTemplate(const XmlNodeRef& templ) { @@ -1804,181 +1012,6 @@ void CObjectManager::RegisterCVars() "Adjust the hit radius used for axis helpers, like the transform gizmo."); } -////////////////////////////////////////////////////////////////////////// -void CObjectManager::Serialize(XmlNodeRef& xmlNode, bool bLoading, int flags) -{ - if (!xmlNode) - { - return; - } - - if (bLoading) - { - m_loadedObjects = 0; - - if (flags == SERIALIZE_ONLY_NOTSHARED) - { - DeleteNotSharedObjects(); - } - else if (flags == SERIALIZE_ONLY_SHARED) - { - DeleteSharedObjects(); - } - else - { - DeleteAllObjects(); - } - - - XmlNodeRef root = xmlNode->findChild("Objects"); - - int totalObjects = 0; - - if (root) - { - root->getAttr("NumObjects", totalObjects); - } - - - StartObjectsLoading(totalObjects); - - CObjectArchive ar(this, xmlNode, true); - - // Loading. - if (root) - { - ar.node = root; - LoadObjects(ar, false); - } - EndObjectsLoading(); - } - else - { - // Saving. - XmlNodeRef root = xmlNode->newChild("Objects"); - - CObjectArchive ar(this, root, false); - - // Save all objects to XML. - for (Objects::iterator it = m_objects.begin(); it != m_objects.end(); ++it) - { - CBaseObject* obj = it->second; - - if (obj->CheckFlags(OBJFLAG_DONT_SAVE)) - { - continue; - } - - if ((flags == SERIALIZE_ONLY_SHARED) && !obj->CheckFlags(OBJFLAG_SHARED)) - { - continue; - } - else if ((flags == SERIALIZE_ONLY_NOTSHARED) && obj->CheckFlags(OBJFLAG_SHARED)) - { - continue; - } - - XmlNodeRef objNode = root->newChild("Object"); - ar.node = objNode; - obj->Serialize(ar); - } - } -} - -////////////////////////////////////////////////////////////////////////// -void CObjectManager::LoadObjects(CObjectArchive& objectArchive, bool bSelect) -{ - m_bLoadingObjects = true; - - XmlNodeRef objectsNode = objectArchive.node; - int numObjects = objectsNode->getChildCount(); - for (int i = 0; i < numObjects; i++) - { - objectArchive.node = objectsNode->getChild(i); - CBaseObject* obj = objectArchive.LoadObject(objectsNode->getChild(i)); - if (obj && bSelect) - { - SelectObject(obj); - } - } - EndObjectsLoading(); // End progress bar, here, Resolve objects have his own. - objectArchive.ResolveObjects(); - - InvalidateVisibleList(); - - m_bLoadingObjects = false; -} - -////////////////////////////////////////////////////////////////////////// -void CObjectManager::Export(const QString& levelPath, XmlNodeRef& rootNode, bool onlyShared) -{ - // Clear export files. - QFile::remove(QStringLiteral("%1TagPoints.ini").arg(levelPath)); - QFile::remove(QStringLiteral("%1Volumes.ini").arg(levelPath)); - - // Save all objects to XML. - for (Objects::iterator it = m_objects.begin(); it != m_objects.end(); ++it) - { - CBaseObject* obj = it->second; - // Export Only shared objects. - if ((obj->CheckFlags(OBJFLAG_SHARED) && onlyShared) || - (!obj->CheckFlags(OBJFLAG_SHARED) && !onlyShared)) - { - obj->Export(levelPath, rootNode); - } - } -} - -////////////////////////////////////////////////////////////////////////// -void CObjectManager::ExportEntities(XmlNodeRef& rootNode) -{ - // Save all objects to XML. - for (Objects::iterator it = m_objects.begin(); it != m_objects.end(); ++it) - { - CBaseObject* obj = it->second; - if (qobject_cast(obj)) - { - obj->Export("", rootNode); - } - } -} - -void CObjectManager::DeleteNotSharedObjects() -{ - TBaseObjects objects; - GetAllObjects(objects); - for (int i = 0; i < objects.size(); i++) - { - CBaseObject* obj = objects[i]; - if (!obj->CheckFlags(OBJFLAG_SHARED)) - { - DeleteObject(obj); - } - } -} - -void CObjectManager::DeleteSharedObjects() -{ - TBaseObjects objects; - GetAllObjects(objects); - for (int i = 0; i < objects.size(); i++) - { - CBaseObject* obj = objects[i]; - if (obj->CheckFlags(OBJFLAG_SHARED)) - { - DeleteObject(obj); - } - } -} - -////////////////////////////////////////////////////////////////////////// -IObjectSelectCallback* CObjectManager::SetSelectCallback(IObjectSelectCallback* callback) -{ - IObjectSelectCallback* prev = m_selectCallback; - m_selectCallback = callback; - return prev; -} - ////////////////////////////////////////////////////////////////////////// void CObjectManager::InvalidateVisibleList() { @@ -2020,27 +1053,6 @@ void CObjectManager::UpdateVisibilityList() m_isUpdateVisibilityList = false; } -////////////////////////////////////////////////////////////////////////// -bool CObjectManager::ConvertToType(CBaseObject* pObject, const QString& typeName) -{ - QString message = QString("Convert ") + pObject->GetName() + " to " + typeName; - CUndo undo(message.toUtf8().data()); - - CBaseObjectPtr pNewObject = GetIEditor()->NewObject(typeName.toUtf8().data()); - if (pNewObject) - { - if (pNewObject->ConvertFromObject(pObject)) - { - DeleteObject(pObject); - return true; - } - DeleteObject(pNewObject); - } - - Log((message + " is failed.").toUtf8().data()); - return false; -} - ////////////////////////////////////////////////////////////////////////// void CObjectManager::SetObjectSelected(CBaseObject* pObject, bool bSelect) { @@ -2069,69 +1081,6 @@ void CObjectManager::SetObjectSelected(CBaseObject* pObject, bool bSelect) m_gizmoManager->AddGizmo(new CAxisGizmo(pObject)); } } - - if (bSelect) - { - NotifyObjectListeners(pObject, CBaseObject::ON_SELECT); - } - else - { - NotifyObjectListeners(pObject, CBaseObject::ON_UNSELECT); - } -} - -////////////////////////////////////////////////////////////////////////// -void CObjectManager::HideTransformManipulators() -{ - m_gizmoManager->DeleteAllTransformManipulators(); -} - -////////////////////////////////////////////////////////////////////////// -////////////////////////////////////////////////////////////////////////// -void CObjectManager::AddObjectEventListener(EventListener* listener) -{ - stl::push_back_unique(m_objectEventListeners, listener); -} - -////////////////////////////////////////////////////////////////////////// -void CObjectManager::RemoveObjectEventListener(EventListener* listener) -{ - stl::find_and_erase(m_objectEventListeners, listener); -} - -////////////////////////////////////////////////////////////////////////// -void CObjectManager::NotifyObjectListeners(CBaseObject* pObject, CBaseObject::EObjectListenerEvent event) -{ - std::list::iterator next; - for (std::list::iterator it = m_objectEventListeners.begin(); it != m_objectEventListeners.end(); it = next) - { - next = it; - ++next; - // Call listener callback. - (*it)->OnObjectEvent(pObject, event); - } -} - -////////////////////////////////////////////////////////////////////////// -void CObjectManager::StartObjectsLoading(int numObjects) -{ - if (m_pLoadProgress) - { - return; - } - m_pLoadProgress = new CWaitProgress("Loading Objects"); - m_totalObjectsToLoad = numObjects; - m_loadedObjects = 0; -} - -////////////////////////////////////////////////////////////////////////// -void CObjectManager::EndObjectsLoading() -{ - if (m_pLoadProgress) - { - delete m_pLoadProgress; - } - m_pLoadProgress = nullptr; } ////////////////////////////////////////////////////////////////////////// @@ -2179,130 +1128,6 @@ bool CObjectManager::IsLightClass(CBaseObject* pObject) return false; } -void CObjectManager::FindAndRenameProperty2(const char* property2Name, const QString& oldValue, const QString& newValue) -{ - CBaseObjectsArray objects; - GetObjects(objects); - - for (size_t i = 0, n = objects.size(); i < n; ++i) - { - CBaseObject* pObject = objects[i]; - if (qobject_cast(pObject)) - { - CEntityObject* pEntity = static_cast(pObject); - CVarBlock* pProperties2 = pEntity->GetProperties2(); - if (pProperties2) - { - IVariable* pVariable = pProperties2->FindVariable(property2Name); - if (pVariable) - { - QString sValue; - pVariable->Get(sValue); - if (sValue == oldValue) - { - pEntity->StoreUndo("Rename Property2"); - - pVariable->Set(newValue); - } - } - } - } - } -} - -void CObjectManager::FindAndRenameProperty2If(const char* property2Name, const QString& oldValue, const QString& newValue, const char* otherProperty2Name, const QString& otherValue) -{ - CBaseObjectsArray objects; - GetObjects(objects); - - for (size_t i = 0, n = objects.size(); i < n; ++i) - { - CBaseObject* pObject = objects[i]; - if (qobject_cast(pObject)) - { - CEntityObject* pEntity = static_cast(pObject); - CVarBlock* pProperties2 = pEntity->GetProperties2(); - if (pProperties2) - { - IVariable* pVariable = pProperties2->FindVariable(property2Name); - IVariable* pOtherVariable = pProperties2->FindVariable(otherProperty2Name); - if (pVariable && pOtherVariable) - { - QString sValue; - pVariable->Get(sValue); - - QString sOtherValue; - pOtherVariable->Get(sOtherValue); - - if ((sValue == oldValue) && (sOtherValue == otherValue)) - { - pEntity->StoreUndo("Rename Property2 If"); - - pVariable->Set(newValue); - } - } - } - } - } -} - -////////////////////////////////////////////////////////////////////////// -void CObjectManager::HitTestObjectAgainstRect(CBaseObject* pObj, CViewport* view, HitContext hc, std::vector& guids) -{ - if (!pObj->IsSelectable()) - { - return; - } - - AABB box; - - // Retrieve world space bound box. - pObj->GetBoundBox(box); - - // Check if object visible in viewport. - if (!view->IsBoundsVisible(box)) - { - return; - } - - if (pObj->HitTestRect(hc)) - { - stl::push_back_unique(guids, pObj->GetId()); - } -} - -////////////////////////////////////////////////////////////////////////// -void CObjectManager::SelectObjectInRect(CBaseObject* pObj, CViewport* view, HitContext hc, bool bSelect) -{ - if (!pObj->IsSelectable()) - { - return; - } - - AABB box; - - // Retrieve world space bound box. - pObj->GetBoundBox(box); - - // Check if object visible in viewport. - if (!view->IsBoundsVisible(box)) - { - return; - } - - if (pObj->HitTestRect(hc)) - { - if (bSelect) - { - SelectObject(pObj); - } - else - { - UnselectObject(pObj); - } - } -} - ////////////////////////////////////////////////////////////////////////// namespace { @@ -2382,93 +1207,6 @@ namespace } } - bool PyIsObjectHidden(const char* objName) - { - CBaseObject* pObject = GetIEditor()->GetObjectManager()->FindObject(objName); - if (!pObject) - { - throw std::logic_error((QString("\"") + objName + "\" is an invalid object name.").toUtf8().data()); - } - return pObject->IsHidden(); - } - - void PyHideAllObjects() - { - CBaseObjectsArray baseObjects; - GetIEditor()->GetObjectManager()->GetObjects(baseObjects); - - if (baseObjects.size() <= 0) - { - throw std::logic_error("Objects not found."); - } - - CUndo undo("Hide All Objects"); - for (int i = 0; i < baseObjects.size(); i++) - { - GetIEditor()->GetObjectManager()->HideObject(baseObjects[i], true); - } - } - - void PyUnHideAllObjects() - { - CUndo undo("Unhide All Objects"); - GetIEditor()->GetObjectManager()->UnhideAll(); - } - - void PyHideObject(const char* objName) - { - CUndo undo("Hide Object"); - - CBaseObject* pObject = GetIEditor()->GetObjectManager()->FindObject(objName); - if (pObject) - { - GetIEditor()->GetObjectManager()->HideObject(pObject, true); - } - } - - void PyUnhideObject(const char* objName) - { - CUndo undo("Unhide Object"); - - CBaseObject* pObject = GetIEditor()->GetObjectManager()->FindObject(objName); - if (pObject) - { - GetIEditor()->GetObjectManager()->HideObject(pObject, false); - } - } - - void PyFreezeObject(const char* objName) - { - CUndo undo("Freeze Object"); - - CBaseObject* pObject = GetIEditor()->GetObjectManager()->FindObject(objName); - if (pObject) - { - GetIEditor()->GetObjectManager()->FreezeObject(pObject, true); - } - } - - void PyUnfreezeObject(const char* objName) - { - CUndo undo("Unfreeze Object"); - - CBaseObject* pObject = GetIEditor()->GetObjectManager()->FindObject(objName); - if (pObject) - { - GetIEditor()->GetObjectManager()->FreezeObject(pObject, false); - } - } - - bool PyIsObjectFrozen(const char* objName) - { - CBaseObject* pObject = GetIEditor()->GetObjectManager()->FindObject(objName); - if (!pObject) - { - throw std::logic_error((QString("\"") + objName + "\" is an invalid object name.").toUtf8().data()); - } - return pObject->IsFrozen(); - } - void PyDeleteObject(const char* objName) { CUndo undo("Delete Object"); @@ -2656,16 +1394,6 @@ namespace AzToolsFramework addLegacyGeneral(behaviorContext->Method("get_selection_center", PyGetSelectionCenter, nullptr, "Returns the center point of the selection group.")); addLegacyGeneral(behaviorContext->Method("get_selection_aabb", PyGetSelectionAABB, nullptr, "Returns the aabb of the selection group.")); - addLegacyGeneral(behaviorContext->Method("hide_object", PyHideObject, nullptr, "Hides a specified object.")); - addLegacyGeneral(behaviorContext->Method("is_object_hidden", PyIsObjectHidden, nullptr, "Checks if object is hidden and returns a bool value.")); - addLegacyGeneral(behaviorContext->Method("unhide_object", PyUnhideObject, nullptr, "Unhides a specified object.")); - addLegacyGeneral(behaviorContext->Method("hide_all_objects", PyHideAllObjects, nullptr, "Hides all objects.")); - addLegacyGeneral(behaviorContext->Method("unhide_all_objects", PyUnHideAllObjects, nullptr, "Unhides all objects.")); - - addLegacyGeneral(behaviorContext->Method("freeze_object", PyFreezeObject, nullptr, "Freezes a specified object.")); - addLegacyGeneral(behaviorContext->Method("is_object_frozen", PyIsObjectFrozen, nullptr, "Checks if object is frozen and returns a bool value.")); - addLegacyGeneral(behaviorContext->Method("unfreeze_object", PyUnfreezeObject, nullptr, "Unfreezes a specified object.")); - addLegacyGeneral(behaviorContext->Method("delete_object", PyDeleteObject, nullptr, "Deletes a specified object.")); addLegacyGeneral(behaviorContext->Method("delete_selected", PyDeleteSelected, nullptr, "Deletes selected object(s).")); diff --git a/Code/Editor/Objects/ObjectManager.h b/Code/Editor/Objects/ObjectManager.h index 7389dfa6a1..fb16c2fec3 100644 --- a/Code/Editor/Objects/ObjectManager.h +++ b/Code/Editor/Objects/ObjectManager.h @@ -8,10 +8,6 @@ // Description : ObjectManager definition. - - -#ifndef CRYINCLUDE_EDITOR_OBJECTS_OBJECTMANAGER_H -#define CRYINCLUDE_EDITOR_OBJECTS_OBJECTMANAGER_H #pragma once #include "IObjectManager.h" @@ -42,12 +38,10 @@ public: CObjectManagerLevelIsExporting() { AZ::ObjectManagerEventBus::Broadcast(&AZ::ObjectManagerEventBus::Events::OnExportingStarting); - GetIEditor()->GetObjectManager()->SetExportingLevel(true); } ~CObjectManagerLevelIsExporting() { - GetIEditor()->GetObjectManager()->SetExportingLevel(false); AZ::ObjectManagerEventBus::Broadcast(&AZ::ObjectManagerEventBus::Events::OnExportingFinished); } }; @@ -66,20 +60,12 @@ public: CObjectManager(); ~CObjectManager(); - void RegisterObjectClasses(); - CBaseObject* NewObject(CObjectClassDesc* cls, CBaseObject* prev = 0, const QString& file = "", const char* newObjectName = nullptr) override; CBaseObject* NewObject(const QString& typeName, CBaseObject* prev = 0, const QString& file = "", const char* newEntityName = nullptr) override; void DeleteObject(CBaseObject* obj) override; void DeleteSelection(CSelectionGroup* pSelection) override; void DeleteAllObjects() override; - CBaseObject* CloneObject(CBaseObject* obj) override; - - void BeginEditParams(CBaseObject* obj, int flags) override; - void EndEditParams(int flags = 0) override; - // Hides all transform manipulators. - void HideTransformManipulators(); //! Get number of objects manager by ObjectManager (not contain sub objects of groups). int GetObjectCount() const override; @@ -88,30 +74,9 @@ public: //! @param layer if 0 get objects for all layers, or layer to get objects from. void GetObjects(CBaseObjectsArray& objects) const override; - //! Get array of objects that pass the filter. - //! @param filter The filter functor, return true if you want to get the certain obj, return false if want to skip it. - void GetObjects(CBaseObjectsArray& objects, BaseObjectFilterFunctor const& filter) const override; - - //! Update objects. - void Update(); - //! Display objects on display context. void Display(DisplayContext& dc) override; - //! Called when selecting without selection helpers - this is needed since - //! the visible object cache is normally not updated when not displaying helpers. - void ForceUpdateVisibleObjectCache(DisplayContext& dc) override; - - //! Check intersection with objects. - //! Find intersection with nearest to ray origin object hit by ray. - //! If distance tollerance is specified certain relaxation applied on collision test. - //! @return true if hit any object, and fills hitInfo structure. - bool HitTest(HitContext& hitInfo) override; - - //! Check intersection with an object. - //! @return true if hit, and fills hitInfo structure. - bool HitTestObject(CBaseObject* obj, HitContext& hc) override; - //! Send event to all objects. //! Will cause OnEvent handler to be called on all objects. void SendEvent(ObjectEvent event) override; @@ -134,76 +99,28 @@ public: //! Find objects which intersect with a given AABB. void FindObjectsInAABB(const AABB& aabb, std::vector& result) const override; - ////////////////////////////////////////////////////////////////////////// - // Operations on objects. - ////////////////////////////////////////////////////////////////////////// - //! Makes object visible or invisible. - void HideObject(CBaseObject* obj, bool hide) override; - //! Shows the last hidden object based on hidden ID - void ShowLastHiddenObject() override; - //! Freeze object, making it unselectable. - void FreezeObject(CBaseObject* obj, bool freeze) override; - //! Unhide all hidden objects. - void UnhideAll() override; - //! Unfreeze all frozen objects. - void UnfreezeAll() override; - ////////////////////////////////////////////////////////////////////////// // Object Selection. ////////////////////////////////////////////////////////////////////////// bool SelectObject(CBaseObject* obj, bool bUseMask = true) override; void UnselectObject(CBaseObject* obj) override; - //! Select objects within specified distance from given position. - //! Return number of selected objects. - int SelectObjects(const AABB& box, bool bUnselect = false) override; - - void SelectEntities(std::set& s) override; - - int MoveObjects(const AABB& box, const Vec3& offset, ImageRotationDegrees rotation, bool bIsCopy = false) override; - - //! Selects/Unselects all objects within 2d rectangle in given viewport. - void SelectObjectsInRect(CViewport* view, const QRect& rect, bool bSelect) override; - void FindObjectsInRect(CViewport* view, const QRect& rect, std::vector& guids) override; - //! Clear default selection set. //! @Return number of objects removed from selection. int ClearSelection() override; - //! Deselect all current selected objects and selects object that were unselected. - //! @Return number of selected objects. - int InvertSelection() override; - //! Get current selection. CSelectionGroup* GetSelection() const override { return m_currSelection; }; - //! Get named selection. - CSelectionGroup* GetSelection(const QString& name) const override; - // Get selection group names - void GetNameSelectionStrings(QStringList& names) override; - //! Change name of current selection group. - //! And store it in list. - void NameSelection(const QString& name) override; - //! Set one of name selections as current selection. - void SetSelection(const QString& name) override; - void RemoveSelection(const QString& name) override; bool IsObjectDeletionAllowed(CBaseObject* pObject); //! Delete all objects in selection group. void DeleteSelection() override; - uint32 ForceID() const override{return m_ForceID; } - void ForceID(uint32 FID) override{m_ForceID = FID; } - //! Generates uniq name base on type name of object. QString GenerateUniqueObjectName(const QString& typeName) override; //! Register object name in object manager, needed for generating uniq names. void RegisterObjectName(const QString& name) override; - //! Decrease name number and remove if it was last in object manager, needed for generating uniq names. - void UpdateRegisterObjectName(const QString& name); - //! Enable/Disable generating of unique object names (Enabled by default). - //! Return previous value. - bool EnableUniqObjectNames(bool bEnable) override; //! Register XML template of runtime class. void RegisterClassTemplate(const XmlNodeRef& templ); @@ -215,52 +132,10 @@ public: //! Find object class by name. CObjectClassDesc* FindClass(const QString& className) override; - void GetClassCategories(QStringList& categories) override; - void GetClassCategoryToolClassNamePairs(std::vector< std::pair >& categoryToolClassNamePairs) override; - void GetClassTypes(const QString& category, QStringList& types) override; - - //! Export objects to xml. - //! When onlyShared is true ony objects with shared flags exported, overwise only not shared object exported. - void Export(const QString& levelPath, XmlNodeRef& rootNode, bool onlyShared) override; - void ExportEntities(XmlNodeRef& rootNode) override; - - //! Serialize Objects in manager to specified XML Node. - //! @param flags Can be one of SerializeFlags. - void Serialize(XmlNodeRef& rootNode, bool bLoading, int flags = SERIALIZE_ALL) override; - - void SerializeNameSelection(XmlNodeRef& rootNode, bool bLoading) override; - - //! Load objects from object archive. - //! @param bSelect if set newly loaded object will be selected. - void LoadObjects(CObjectArchive& ar, bool bSelect) override; - - //! Delete from Object manager all objects without SHARED flag. - void DeleteNotSharedObjects(); - //! Delete from Object manager all objects with SHARED flag. - void DeleteSharedObjects(); bool AddObject(CBaseObject* obj); void RemoveObject(CBaseObject* obj); void ChangeObjectId(REFGUID oldId, REFGUID newId) override; - bool IsDuplicateObjectName(const QString& newName) const override - { - return FindObject(newName) ? true : false; - } - void ShowDuplicationMsgWarning(CBaseObject* obj, const QString& newName, bool bShowMsgBox) const override; - void ChangeObjectName(CBaseObject* obj, const QString& newName) override; - - //! Convert object of one type to object of another type. - //! Original object is deleted. - bool ConvertToType(CBaseObject* pObject, const QString& typeName) override; - - //! Set new selection callback. - //! @return previous selection callback. - IObjectSelectCallback* SetSelectCallback(IObjectSelectCallback* callback) override; - - // Enables/Disables creating of game objects. - void SetCreateGameObject(bool enable) override { m_createGameObjects = enable; }; - //! Return true if objects loaded from xml should immidiatly create game objects associated with them. - bool IsCreateGameObjects() const override { return m_createGameObjects; }; ////////////////////////////////////////////////////////////////////////// //! Get access to gizmo manager. @@ -270,33 +145,12 @@ public: //! Invalidate visibily settings of objects. void InvalidateVisibleList() override; - ////////////////////////////////////////////////////////////////////////// - // ObjectManager notification Callbacks. - ////////////////////////////////////////////////////////////////////////// - void AddObjectEventListener(EventListener* listener) override; - void RemoveObjectEventListener(EventListener* listener) override; - - ////////////////////////////////////////////////////////////////////////// - // Used to indicate starting and ending of objects loading. - ////////////////////////////////////////////////////////////////////////// - void StartObjectsLoading(int numObjects) override; - void EndObjectsLoading() override; - ////////////////////////////////////////////////////////////////////////// // Gathers all resources used by all objects. void GatherUsedResources(CUsedResources& resources) override; bool IsLightClass(CBaseObject* pObject) override; - virtual void FindAndRenameProperty2(const char* property2Name, const QString& oldValue, const QString& newValue) override; - virtual void FindAndRenameProperty2If(const char* property2Name, const QString& oldValue, const QString& newValue, const char* otherProperty2Name, const QString& otherValue) override; - - bool IsReloading() const override { return m_bInReloading; } - void SetSkipUpdate(bool bSkipUpdate) override { m_bSkipObjectUpdate = bSkipUpdate; } - - void SetExportingLevel(bool bExporting) override { m_bLevelExporting = bExporting; } - bool IsExportingLevelInprogress() const override { return m_bLevelExporting; } - int GetAxisHelperHitRadius() const override { return m_axisHelperHitRadius; } private: @@ -317,29 +171,12 @@ private: void SelectCurrent(); void SetObjectSelected(CBaseObject* pObject, bool bSelect); - // Recursive functions potentially taking into child objects into account - void SelectObjectInRect(CBaseObject* pObj, CViewport* view, HitContext hc, bool bSelect); - void HitTestObjectAgainstRect(CBaseObject* pObj, CViewport* view, HitContext hc, std::vector& guids); - - void SaveRegistry(); - void LoadRegistry(); - - void NotifyObjectListeners(CBaseObject* pObject, CBaseObject::EObjectListenerEvent event); - - void FindDisplayableObjects(DisplayContext& dc, bool bDisplay); - private: - typedef std::map Objects; + typedef AZStd::map Objects; Objects m_objects; - typedef std::unordered_map ObjectsByNameCrc; + typedef AZStd::unordered_map ObjectsByNameCrc; ObjectsByNameCrc m_objectsByName; - typedef std::map TNameSelectionMap; - TNameSelectionMap m_selections; - - //! Used for forcing IDs of "GetEditorObjectID" of PreFabs, as they used to have random IDs on each load - uint32 m_ForceID; - //! Array of currently visible objects. TBaseObjects m_visibleObjects; @@ -349,16 +186,11 @@ private: unsigned int m_lastComputedVisibility = 0; // when the object manager itself last updated visibility (since it also has a cache) int m_lastHideMask = 0; - float m_maxObjectViewDistRatio; - ////////////////////////////////////////////////////////////////////////// // Selection. //! Current selection group. CSelectionGroup* m_currSelection; - int m_nLastSelCount; bool m_bSelectionChanged; - IObjectSelectCallback* m_selectCallback; - bool m_bLoadingObjects; // True while performing a select or deselect operation on more than one object. // Prevents individual undo/redo commands for every object, allowing bulk undo/redo @@ -367,20 +199,9 @@ private: //! Default selection. CSelectionGroup m_defaultSelection; - CBaseObjectPtr m_currEditObject; - bool m_bSingleSelection; - - bool m_createGameObjects; - bool m_bGenUniqObjectNames; - // Object manager also handles Gizmo manager. CGizmoManager* m_gizmoManager; - ////////////////////////////////////////////////////////////////////////// - // Loading progress. - CWaitProgress* m_pLoadProgress; - int m_loadedObjects; - int m_totalObjectsToLoad; ////////////////////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////////////////// @@ -389,10 +210,6 @@ private: typedef std::map, stl::less_stricmp > NameNumbersMap; NameNumbersMap m_nameNumbersMap; - ////////////////////////////////////////////////////////////////////////// - // Listeners. - std::list m_objectEventListeners; - bool m_bExiting; std::unordered_set m_animatedAttachedEntities; @@ -401,10 +218,6 @@ private: uint64 m_currentHideCount; - bool m_bInReloading; - bool m_bSkipObjectUpdate; - bool m_bLevelExporting; - int m_axisHelperHitRadius = 20; }; @@ -426,4 +239,3 @@ namespace AzToolsFramework } // namespace AzToolsFramework -#endif // CRYINCLUDE_EDITOR_OBJECTS_OBJECTMANAGER_H diff --git a/Code/Editor/Objects/ObjectManagerLegacyUndo.h b/Code/Editor/Objects/ObjectManagerLegacyUndo.h index 721d188171..29dc2aa4ae 100644 --- a/Code/Editor/Objects/ObjectManagerLegacyUndo.h +++ b/Code/Editor/Objects/ObjectManagerLegacyUndo.h @@ -24,12 +24,11 @@ public: CUndoBaseObjectNew(CBaseObject* object); protected: - virtual int GetSize() override { return sizeof(*this); }; // Return size of xml state. - virtual QString GetDescription() override { return "New BaseObject"; }; - virtual QString GetObjectName() override { return m_object->GetName(); }; + int GetSize() override { return sizeof(*this); } // Return size of xml state. + QString GetObjectName() override { return m_object->GetName(); } - virtual void Undo(bool bUndo) override; - virtual void Redo() override; + void Undo(bool bUndo) override; + void Redo() override; private: CBaseObjectPtr m_object; @@ -47,12 +46,11 @@ public: CUndoBaseObjectDelete(CBaseObject* object); protected: - virtual int GetSize() override { return sizeof(*this); }; // Return size of xml state. - virtual QString GetDescription() override { return "Delete BaseObject"; }; - virtual QString GetObjectName() override { return m_object->GetName(); }; + int GetSize() override { return sizeof(*this); } // Return size of xml state. + QString GetObjectName() override { return m_object->GetName(); } - virtual void Undo(bool bUndo) override; - virtual void Redo() override; + void Undo(bool bUndo) override; + void Redo() override; private: CBaseObjectPtr m_object; @@ -73,20 +71,19 @@ public: * This Undo command can be used for either Legacy or Component Entities, though for * performance reasons Component Entities are typically undone using CUndoBaseObjectBulkSelect * - * @param pObj The object to perform the undo/redo operation on. + * @param object The object to perform the undo/redo operation on. * @param isSelect This is true if you are trying to undo a select operation, and false if * trying to undo a deselect operation */ CUndoBaseObjectSelect(CBaseObject* object, bool isSelect); protected: - virtual void Release() override { delete this; }; - virtual int GetSize() override { return sizeof(*this); }; // Return size of xml state. - virtual QString GetDescription() override { return "Select Object"; }; - virtual QString GetObjectName() override; + void Release() override { delete this; } + int GetSize() override { return sizeof(*this); } // Return size of xml state. + QString GetObjectName() override; - virtual void Undo(bool bUndo) override; - virtual void Redo() override; + void Undo(bool bUndo) override; + void Redo() override; private: GUID m_guid; @@ -116,7 +113,6 @@ public: protected: int GetSize() override { return sizeof(*this); } // Return size of xml state. - QString GetDescription() override { return QObject::tr("Select Objects"); } /* * Deselects the objects @@ -153,7 +149,6 @@ public: protected: int GetSize() override { return sizeof(*this); } // Return size of xml state. - QString GetDescription() override { return QObject::tr("Select Objects"); } void Undo(bool bUndo) override; diff --git a/Code/Editor/Objects/SelectionGroup.cpp b/Code/Editor/Objects/SelectionGroup.cpp index 06d881d607..95a3cc7b14 100644 --- a/Code/Editor/Objects/SelectionGroup.cpp +++ b/Code/Editor/Objects/SelectionGroup.cpp @@ -18,8 +18,6 @@ #include "ViewManager.h" #include "Include/IObjectManager.h" -#include - ////////////////////////////////////////////////////////////////////////// CSelectionGroup::CSelectionGroup() : m_ref(1) @@ -226,7 +224,6 @@ void CSelectionGroup::Move(const Vec3& offset, EMoveSelectionFlag moveFlag, [[ma m_bVertexSnapped = false; FilterParents(); - Vec3 newPos; bool bValidFollowGeometryMode(true); if (point.x() == -1 || point.y() == -1) @@ -234,8 +231,6 @@ void CSelectionGroup::Move(const Vec3& offset, EMoveSelectionFlag moveFlag, [[ma bValidFollowGeometryMode = false; } - SRayHitInfo pickedInfo; - if (moveFlag == eMS_FollowGeometryPosNorm) { if (m_LastestMoveSelectionFlag != eMS_FollowGeometryPosNorm) @@ -249,6 +244,8 @@ void CSelectionGroup::Move(const Vec3& offset, EMoveSelectionFlag moveFlag, [[ma } m_LastestMoveSelectionFlag = moveFlag; + Vec3 zeroPickedInfo_vHitNormal; + Vec3 zeroPickedInfo_vHitPos; for (int i = 0; i < GetFilteredCount(); i++) { @@ -264,16 +261,15 @@ void CSelectionGroup::Move(const Vec3& offset, EMoveSelectionFlag moveFlag, [[ma Vec3 zaxis = m_LastestMovedObjectRot * Vec3(0, 0, 1); zaxis.Normalize(); Quat nq; - nq.SetRotationV0V1(zaxis, pickedInfo.vHitNormal); - obj->SetPos(pickedInfo.vHitPos); + nq.SetRotationV0V1(zaxis, zeroPickedInfo_vHitNormal); + obj->SetPos(zeroPickedInfo_vHitPos); obj->SetRotation(nq * m_LastestMovedObjectRot); continue; } - Matrix34 wtm = obj->GetWorldTM(); + const Matrix34 &wtm = obj->GetWorldTM(); Vec3 wp = wtm.GetTranslation(); - - newPos = wp + offset; + Vec3 newPos = wp + offset; if (moveFlag == eMS_FollowTerrain) { // Make sure object keeps it height. @@ -465,17 +461,6 @@ void CSelectionGroup::SetScale(const Vec3& scale, int referenceCoordSys) Scale(relScale, referenceCoordSys); } - -void CSelectionGroup::StartScaling() -{ - for (int i = 0; i < GetFilteredCount(); i++) - { - CBaseObject* obj = GetFilteredObject(i); - obj->StartScaling(); - } -} - - ////////////////////////////////////////////////////////////////////////// void CSelectionGroup::Align() { @@ -533,45 +518,6 @@ void CSelectionGroup::ResetTransformation() } } -////////////////////////////////////////////////////////////////////////// -void CSelectionGroup::Clone(CSelectionGroup& newGroup) -{ - IObjectManager* pObjMan = GetIEditor()->GetObjectManager(); - assert(pObjMan); - - int i; - CObjectCloneContext cloneContext; - - FilterParents(); - - ////////////////////////////////////////////////////////////////////////// - // Clone every object. - for (i = 0; i < GetFilteredCount(); i++) - { - CBaseObject* pFromObject = GetFilteredObject(i); - CBaseObject* newObj = pObjMan->CloneObject(pFromObject); - if (!newObj) // can be null, e.g. sequence can't be cloned - { - continue; - } - - cloneContext.AddClone(pFromObject, newObj); - newGroup.AddObject(newObj); - } - - ////////////////////////////////////////////////////////////////////////// - // Only after everything was cloned, call PostClone on all cloned objects. - for (i = 0; i < newGroup.GetCount(); ++i) - { - CBaseObject* pFromObject = GetFilteredObject(i); - CBaseObject* pClonedObject = newGroup.GetObject(i); - if (pClonedObject) - { - pClonedObject->PostClone(pFromObject, cloneContext); - } - } -} - ////////////////////////////////////////////////////////////////////////// void CSelectionGroup::SendEvent(ObjectEvent event) { diff --git a/Code/Editor/Objects/SelectionGroup.h b/Code/Editor/Objects/SelectionGroup.h index 600bce5f26..8d979d23be 100644 --- a/Code/Editor/Objects/SelectionGroup.h +++ b/Code/Editor/Objects/SelectionGroup.h @@ -98,7 +98,6 @@ public: //! Resets rotation and scale to identity and (1.0f, 1.0f, 1.0f) void ResetTransformation(); //! Scale objects in selection by given scale. - void StartScaling(); void Scale(const Vec3& scale, int referenceCoordSys); void SetScale(const Vec3& scale, int referenceCoordSys); //! Align objects in selection to surface normal @@ -106,11 +105,6 @@ public: //! Very special method to move contents of a voxel. void MoveContent(const Vec3& offset); - ////////////////////////////////////////////////////////////////////////// - //! Clone objects in this group and add cloned objects to new selection group. - //! Only topmost parent objects will be added to this selection group. - void Clone(CSelectionGroup& newGroup); - // Send event to all objects in selection group. void SendEvent(ObjectEvent event); diff --git a/Code/Editor/Platform/Linux/Editor/Core/QtEditorApplication_linux.cpp b/Code/Editor/Platform/Linux/Editor/Core/QtEditorApplication_linux.cpp index ad5e57479b..8ba152a9f9 100644 --- a/Code/Editor/Platform/Linux/Editor/Core/QtEditorApplication_linux.cpp +++ b/Code/Editor/Platform/Linux/Editor/Core/QtEditorApplication_linux.cpp @@ -10,6 +10,8 @@ #ifdef PAL_TRAIT_LINUX_WINDOW_MANAGER_XCB #include +#include +#include #endif namespace Editor @@ -23,16 +25,34 @@ namespace Editor return nullptr; } + xcb_connection_t* EditorQtApplicationXcb::GetXcbConnectionFromQt() + { + QPlatformNativeInterface* native = platformNativeInterface(); + AZ_Warning("EditorQtApplicationXcb", native, "Unable to retrieve the native platform interface"); + if (!native) + { + return nullptr; + } + return reinterpret_cast(native->nativeResourceForIntegration(QByteArray("connection"))); + } + + void EditorQtApplicationXcb::OnStartPlayInEditor() + { + auto* interface = AzFramework::XcbConnectionManagerInterface::Get(); + interface->SetEnableXInput(GetXcbConnectionFromQt(), true); + } + + void EditorQtApplicationXcb::OnStopPlayInEditor() + { + auto* interface = AzFramework::XcbConnectionManagerInterface::Get(); + interface->SetEnableXInput(GetXcbConnectionFromQt(), false); + } + bool EditorQtApplicationXcb::nativeEventFilter([[maybe_unused]] const QByteArray& eventType, void* message, long*) { if (GetIEditor()->IsInGameMode()) { #ifdef PAL_TRAIT_LINUX_WINDOW_MANAGER_XCB - // We need to handle RAW Input events in a separate loop. This is a workaround to enable XInput2 RAW Inputs using Editor mode. - // TODO To have this call here might be not be perfect. - AzFramework::XcbEventHandlerBus::Broadcast(&AzFramework::XcbEventHandler::PollSpecialEvents); - - // Now handle the rest of the events. AzFramework::XcbEventHandlerBus::Broadcast( &AzFramework::XcbEventHandler::HandleXcbEvent, static_cast(message)); #endif diff --git a/Code/Editor/Platform/Linux/Editor/Core/QtEditorApplication_linux.h b/Code/Editor/Platform/Linux/Editor/Core/QtEditorApplication_linux.h index 8c145c3aa7..109ae1742b 100644 --- a/Code/Editor/Platform/Linux/Editor/Core/QtEditorApplication_linux.h +++ b/Code/Editor/Platform/Linux/Editor/Core/QtEditorApplication_linux.h @@ -6,19 +6,35 @@ * */ +#if !defined(Q_MOC_RUN) #include +#include +#endif + +using xcb_connection_t = struct xcb_connection_t; namespace Editor { - class EditorQtApplicationXcb : public EditorQtApplication + class EditorQtApplicationXcb + : public EditorQtApplication + , public AzToolsFramework::EditorEntityContextNotificationBus::Handler { Q_OBJECT public: EditorQtApplicationXcb(int& argc, char** argv) : EditorQtApplication(argc, argv) { + // Connect bus to listen for OnStart/StopPlayInEditor events + AzToolsFramework::EditorEntityContextNotificationBus::Handler::BusConnect(); } + xcb_connection_t* GetXcbConnectionFromQt(); + + /////////////////////////////////////////////////////////////////////// + // AzToolsFramework::EditorEntityContextNotificationBus overrides + void OnStartPlayInEditor() override; + void OnStopPlayInEditor() override; + // QAbstractNativeEventFilter: bool nativeEventFilter(const QByteArray& eventType, void* message, long* result) override; }; diff --git a/Code/Editor/Plugin.cpp b/Code/Editor/Plugin.cpp index 4f6fe0279d..16c386e31c 100644 --- a/Code/Editor/Plugin.cpp +++ b/Code/Editor/Plugin.cpp @@ -14,6 +14,7 @@ // Editor #include "Include/IViewPane.h" +#include CClassFactory* CClassFactory::s_pInstance = nullptr; CAutoRegisterClassHelper* CAutoRegisterClassHelper::s_pFirst = nullptr; @@ -79,7 +80,7 @@ void CClassFactory::RegisterClass(IClassDesc* pClassDesc) existingUUIDString, findByGuid->second->ClassName().toUtf8().data()); - CryMessageBox(errorMessageBuffer, "Invalid class registration - Duplicate UUID", MB_OK); + QMessageBox::critical(nullptr,"Invalid class registration - Duplicate UUID",QString::fromLatin1(errorMessageBuffer)); return; } @@ -107,7 +108,7 @@ void CClassFactory::RegisterClass(IClassDesc* pClassDesc) newUUIDString, existingUUIDString); - CryMessageBox(errorMessageBuffer, "Invalid class registration - Duplicate Class Name", MB_OK); + QMessageBox::critical(nullptr, "Invalid class registration - Duplicate Class Name", QString::fromLatin1(errorMessageBuffer)); return; } @@ -154,7 +155,7 @@ IViewPaneClass* CClassFactory::FindViewPaneClassByTitle(const char* pPaneTitle) { IViewPaneClass* viewPane = nullptr; IClassDesc* desc = m_classes[i]; - if (SUCCEEDED(desc->QueryInterface(__uuidof(IViewPaneClass), (void**)&viewPane))) + if (SUCCEEDED(desc->QueryInterface(__az_uuidof(IViewPaneClass), (void**)&viewPane))) { if (QString::compare(viewPane->GetPaneTitle(), pPaneTitle) == 0) { diff --git a/Code/Editor/Plugins/ComponentEntityEditorPlugin/Objects/ComponentEntityObject.cpp b/Code/Editor/Plugins/ComponentEntityEditorPlugin/Objects/ComponentEntityObject.cpp index 8957b6ced6..fbb700723b 100644 --- a/Code/Editor/Plugins/ComponentEntityEditorPlugin/Objects/ComponentEntityObject.cpp +++ b/Code/Editor/Plugins/ComponentEntityEditorPlugin/Objects/ComponentEntityObject.cpp @@ -36,7 +36,6 @@ #include #include #include -#include #include #include @@ -48,14 +47,12 @@ /** * Scalars for icon drawing behavior. */ -static const int s_kIconSize = 36; /// Icon display size (in pixels) - CComponentEntityObject::CComponentEntityObject() - : m_hasIcon(false) + : m_accentType(AzToolsFramework::EntityAccentType::None) + , m_hasIcon(false) , m_entityIconVisible(false) , m_iconOnlyHitTest(false) , m_drawAccents(true) - , m_accentType(AzToolsFramework::EntityAccentType::None) , m_isIsolated(false) , m_iconTexture(nullptr) { @@ -243,7 +240,7 @@ void CComponentEntityObject::SetSelected(bool bSelect) } bool anySelected = false; - + AzToolsFramework::ToolsApplicationRequestBus::BroadcastResult(anySelected, &AzToolsFramework::ToolsApplicationRequests::AreAnyEntitiesSelected); if (!anySelected) @@ -266,18 +263,6 @@ void CComponentEntityObject::SetHighlight(bool bHighlight) } } -IRenderNode* CComponentEntityObject::GetEngineNode() const -{ - // It's possible for AZ::Entities to have multiple IRenderNodes. - // However, the editor currently expects a single IRenderNode per "editor object". - // Therefore, return the highest priority handler. - if (auto* renderNodeHandler = LmbrCentral::RenderNodeRequestBus::FindFirstHandler(m_entityId)) - { - return renderNodeHandler->GetRenderNode(); - } - return nullptr; -} - void CComponentEntityObject::OnEntityNameChanged(const AZStd::string& name) { if (m_nameReentryGuard) @@ -331,14 +316,6 @@ void CComponentEntityObject::DetachThis(bool /*bKeepPos*/) } } -CBaseObject* CComponentEntityObject::GetLinkParent() const -{ - AZ::EntityId parentId; - EBUS_EVENT_ID_RESULT(parentId, m_entityId, AZ::TransformBus, GetParentId); - - return CComponentEntityObject::FindObjectForEntity(parentId); -} - bool CComponentEntityObject::IsFrozen() const { return CheckFlags(OBJFLAG_FROZEN); @@ -358,16 +335,6 @@ void CComponentEntityObject::OnEntityLockChanged(bool locked) CEntityObject::SetFrozen(locked); } -void CComponentEntityObject::SetHidden( - bool bHidden, [[maybe_unused]] uint64 hiddenId /*=CBaseObject::s_invalidHiddenID*/, [[maybe_unused]] bool bAnimated /*=false*/) -{ - if (m_visibilityFlagReentryGuard) - { - EditorActionScope flagChange(m_visibilityFlagReentryGuard); - AzToolsFramework::SetEntityVisibility(m_entityId, !bHidden); - } -} - void CComponentEntityObject::OnEntityVisibilityChanged(bool visible) { CEntityObject::SetHidden(!visible); @@ -612,66 +579,6 @@ void CComponentEntityObject::OnTransformChanged([[maybe_unused]] const AZ::Trans } } -int CComponentEntityObject::MouseCreateCallback(CViewport* view, EMouseEvent event, QPoint& point, int flags) -{ - if (event == eMouseMove || event == eMouseLDown) - { - Vec3 pos; - if (GetIEditor()->GetAxisConstrains() != AXIS_TERRAIN) - { - pos = view->MapViewToCP(point); - } - else - { - // Snap to terrain. - bool hitTerrain; - pos = view->ViewToWorld(point, &hitTerrain); - if (hitTerrain) - { - pos.z = GetIEditor()->GetTerrainElevation(pos.x, pos.y); - } - pos = view->SnapToGrid(pos); - } - - pos = view->SnapToGrid(pos); - SetPos(pos); - - if (event == eMouseLDown) - { - return MOUSECREATE_OK; - } - - return MOUSECREATE_CONTINUE; - } - - return CBaseObject::MouseCreateCallback(view, event, point, flags); -} - -bool CComponentEntityObject::HitHelperTest(HitContext& hc) -{ - bool hit = CEntityObject::HitHelperTest(hc); - if (!hit && m_entityId.IsValid()) - { - // Pick against icon in screen space. - if (IsEntityIconVisible()) - { - const QPoint entityScreenPos = hc.view->WorldToView(GetWorldPos()); - const float screenPosX = static_cast(entityScreenPos.x()); - const float screenPosY = static_cast(entityScreenPos.y()); - const float iconRange = static_cast(s_kIconSize / 2); - - if ((hc.point2d.x() >= screenPosX - iconRange && hc.point2d.x() <= screenPosX + iconRange) - && (hc.point2d.y() >= screenPosY - iconRange && hc.point2d.y() <= screenPosY + iconRange)) - { - hc.dist = hc.raySrc.GetDistance(GetWorldPos()); - hc.iconHit = true; - return true; - } - } - } - return hit; -} - bool CComponentEntityObject::HitTest(HitContext& hc) { AZ_PROFILE_FUNCTION(Entity); @@ -907,11 +814,6 @@ void CComponentEntityObject::DrawDefault(DisplayContext& dc, const QColor& label DrawAccent(dc); } -IStatObj* CComponentEntityObject::GetIStatObj() -{ - return nullptr; -} - bool CComponentEntityObject::IsIsolated() const { return m_isIsolated; @@ -952,11 +854,6 @@ void CComponentEntityObject::SetWorldPos(const Vec3& pos, int flags) CEntityObject::SetWorldPos(pos, flags); } -void CComponentEntityObject::OnContextMenu(QMenu* /*pMenu*/) -{ - // Deliberately bypass the base class implementation (CEntityObject::OnContextMenu()). -} - void CComponentEntityObject::SetupEntityIcon() { bool hideIconInViewport = false; diff --git a/Code/Editor/Plugins/ComponentEntityEditorPlugin/Objects/ComponentEntityObject.h b/Code/Editor/Plugins/ComponentEntityEditorPlugin/Objects/ComponentEntityObject.h index bb19f4d77e..7ccea8da84 100644 --- a/Code/Editor/Plugins/ComponentEntityEditorPlugin/Objects/ComponentEntityObject.h +++ b/Code/Editor/Plugins/ComponentEntityEditorPlugin/Objects/ComponentEntityObject.h @@ -56,27 +56,21 @@ public: bool SetScale(const Vec3& scale, int flags) override; void InvalidateTM(int nWhyFlags) override; void Display(DisplayContext& disp) override; - void OnContextMenu(QMenu* pMenu) override; - int MouseCreateCallback(CViewport* view, EMouseEvent event, QPoint& point, int flags) override; - bool HitHelperTest(HitContext& hc) override; bool HitTest(HitContext& hc) override; void GetLocalBounds(AABB& box) override; void GetBoundBox(AABB& box) override; void SetName(const QString& name) override; bool IsFrozen() const override; void SetFrozen(bool bFrozen) override; - void SetHidden(bool bHidden, uint64 hiddenId = CBaseObject::s_invalidHiddenID, bool bAnimated = false) override; void SetSelected(bool bSelect) override; void SetHighlight(bool bHighlight) override; - IRenderNode* GetEngineNode() const override; void AttachChild(CBaseObject* child, bool bKeepPos = true) override; void DetachAll(bool bKeepPos = true) override; void DetachThis(bool bKeepPos = true) override; - CBaseObject* GetLinkParent() const override; XmlNodeRef Export(const QString& levelPath, XmlNodeRef& xmlNode) override; void DeleteEntity() override; void DrawDefault(DisplayContext& dc, const QColor& labelColor = QColor(255, 255, 255)) override; - IStatObj* GetIStatObj() override; + bool IsIsolated() const override; bool IsSelected() const override; bool IsSelectable() const override; @@ -88,12 +82,6 @@ public: // Component entity highlighting (accenting) is taken care of elsewhere void DrawHighlight(DisplayContext& /*dc*/) override {}; - // Don't auto-clone children. Cloning happens in groups with reference fixups, - // and individually selected objercts should be cloned as individuals. - bool ShouldCloneChildren() const override { return false; } - - - ////////////////////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////////////////// diff --git a/Code/Editor/Plugins/ComponentEntityEditorPlugin/SandboxIntegration.cpp b/Code/Editor/Plugins/ComponentEntityEditorPlugin/SandboxIntegration.cpp index 5b849dcbe7..69b195d243 100644 --- a/Code/Editor/Plugins/ComponentEntityEditorPlugin/SandboxIntegration.cpp +++ b/Code/Editor/Plugins/ComponentEntityEditorPlugin/SandboxIntegration.cpp @@ -10,7 +10,6 @@ #include #include #include -#include #include #include #include @@ -38,9 +37,11 @@ #include #include #include +#include #include #include #include +#include #include #include #include @@ -56,6 +57,7 @@ #include #include #include +#include #include #include @@ -207,6 +209,9 @@ void SandboxIntegrationManager::Setup() m_editorEntityAPI = AZ::Interface::Get(); AZ_Assert(m_editorEntityAPI, "SandboxIntegrationManager requires an EditorEntityAPI instance to be present on Setup()."); + m_readOnlyEntityPublicInterface = AZ::Interface::Get(); + AZ_Assert(m_readOnlyEntityPublicInterface, "SandboxIntegrationManager requires an ReadOnlyEntityPublicInterface instance to be present on Setup()."); + AzToolsFramework::Layers::EditorLayerComponentNotificationBus::Handler::BusConnect(); } @@ -446,7 +451,7 @@ void SandboxIntegrationManager::OnEndUndo(const char* label, bool changed) // Add the undo only after we know it's got a legit change, we can't remove undos from the cry undo system so we do it here instead of OnBeginUndo if (changed && CUndo::IsRecording()) { - CUndo::Record(new CToolsApplicationUndoLink(label)); + CUndo::Record(new CToolsApplicationUndoLink()); } if (m_startedUndoRecordingNestingLevel) { @@ -497,13 +502,11 @@ void SandboxIntegrationManager::EntityParentChanged( // before finally being saved, it will result in all of those layers saving, too. AZ::EntityId oldAncestor = oldParentId; - bool wasNotInLayer = false; AZ::EntityId oldLayer; do { if (!oldAncestor.IsValid()) { - wasNotInLayer = true; break; } @@ -529,13 +532,11 @@ void SandboxIntegrationManager::EntityParentChanged( AZ::EntityId newAncestor = newParentId; - bool isGoingToRootScene = false; AZ::EntityId newLayer; do { if (!newAncestor.IsValid()) { - isGoingToRootScene = true; break; } @@ -642,6 +643,9 @@ void SandboxIntegrationManager::PopulateEditorGlobalContextMenu(QMenu* menu, con AzToolsFramework::EntityIdList selected; GetSelectedOrHighlightedEntities(selected); + bool prefabSystemEnabled = false; + AzFramework::ApplicationRequests::Bus::BroadcastResult(prefabSystemEnabled, &AzFramework::ApplicationRequests::IsPrefabSystemEnabled); + QAction* action = nullptr; // when nothing is selected, entity is created at root level @@ -658,18 +662,22 @@ void SandboxIntegrationManager::PopulateEditorGlobalContextMenu(QMenu* menu, con // when a single entity is selected, entity is created as its child else if (selected.size() == 1) { - action = menu->addAction(QObject::tr("Create entity")); - QObject::connect( - action, &QAction::triggered, action, - [selected] - { - EBUS_EVENT(AzToolsFramework::EditorRequests::Bus, CreateNewEntityAsChild, selected.front()); - }); + AZ::EntityId selectedEntityId = selected.front(); + bool selectedEntityIsReadOnly = m_readOnlyEntityPublicInterface->IsReadOnly(selectedEntityId); + auto containerEntityInterface = AZ::Interface::Get(); + if (!prefabSystemEnabled || (containerEntityInterface && containerEntityInterface->IsContainerOpen(selectedEntityId) && !selectedEntityIsReadOnly)) + { + action = menu->addAction(QObject::tr("Create entity")); + QObject::connect( + action, &QAction::triggered, action, + [selectedEntityId] + { + AzToolsFramework::EditorRequestBus::Broadcast(&AzToolsFramework::EditorRequestBus::Handler::CreateNewEntityAsChild, selectedEntityId); + } + ); + } } - bool prefabSystemEnabled = false; - AzFramework::ApplicationRequests::Bus::BroadcastResult(prefabSystemEnabled, &AzFramework::ApplicationRequests::IsPrefabSystemEnabled); - if (!prefabSystemEnabled) { menu->addSeparator(); @@ -689,11 +697,27 @@ void SandboxIntegrationManager::PopulateEditorGlobalContextMenu(QMenu* menu, con SetupSliceContextMenu(menu); } - action = menu->addAction(QObject::tr("Duplicate")); - QObject::connect(action, &QAction::triggered, action, [this] { ContextMenu_Duplicate(); }); - if (selected.size() == 0) + if (!selected.empty()) { - action->setDisabled(true); + // Don't allow duplication if any of the selected entities are direct desendants of a read-only entity + bool selectionContainsDescendantOfReadOnlyEntity = false; + for (const auto& entityId : selected) + { + AZ::EntityId parentEntityId; + AZ::TransformBus::EventResult(parentEntityId, entityId, &AZ::TransformBus::Events::GetParentId); + + if (parentEntityId.IsValid() && m_readOnlyEntityPublicInterface->IsReadOnly(parentEntityId)) + { + selectionContainsDescendantOfReadOnlyEntity = true; + break; + } + } + + if (!selectionContainsDescendantOfReadOnlyEntity) + { + action = menu->addAction(QObject::tr("Duplicate")); + QObject::connect(action, &QAction::triggered, action, [this] { ContextMenu_Duplicate(); }); + } } if (!prefabSystemEnabled) @@ -1388,13 +1412,13 @@ void SandboxIntegrationManager::ContextMenu_NewEntity() { AZ::Vector3 worldPosition = AZ::Vector3::CreateZero(); - CViewport* view = GetIEditor()->GetViewManager()->GetGameViewport(); // If we don't have a viewport active to aid in placement, the object // will be created at the origin. - if (view) + if (CViewport* view = GetIEditor()->GetViewManager()->GetGameViewport()) { - const QPoint viewPoint(static_cast(m_contextMenuViewPoint.GetX()), static_cast(m_contextMenuViewPoint.GetY())); - worldPosition = view->GetHitLocation(viewPoint); + worldPosition = AzToolsFramework::FindClosestPickIntersection( + view->GetViewportId(), AzFramework::ScreenPointFromVector2(m_contextMenuViewPoint), AzToolsFramework::EditorPickRayLength, + AzToolsFramework::GetDefaultEntityPlacementDistance()); } CreateNewEntityAtPosition(worldPosition); @@ -1669,6 +1693,12 @@ void SandboxIntegrationManager::GoToEntitiesInViewports(const AzToolsFramework:: if (auto viewportContext = viewportContextManager->GetViewportContextById(viewIndex)) { const AZ::Transform cameraTransform = viewportContext->GetCameraTransform(); + // do not attempt to interpolate to where we currently are + if (cameraTransform.GetTranslation().IsClose(center)) + { + continue; + } + const AZ::Vector3 forward = (center - cameraTransform.GetTranslation()).GetNormalized(); // move camera 25% further back than required @@ -1956,8 +1986,3 @@ void SandboxIntegrationManager::BrowseForAssets(AssetSelectionModel& selection) { AssetBrowserComponentRequestBus::Broadcast(&AssetBrowserComponentRequests::PickAssets, selection, GetMainWindow()); } - -bool SandboxIntegrationManager::DisplayHelpersVisible() -{ - return GetIEditor()->GetDisplaySettings()->IsDisplayHelpers(); -} diff --git a/Code/Editor/Plugins/ComponentEntityEditorPlugin/SandboxIntegration.h b/Code/Editor/Plugins/ComponentEntityEditorPlugin/SandboxIntegration.h index 9afa944438..c58f019c85 100644 --- a/Code/Editor/Plugins/ComponentEntityEditorPlugin/SandboxIntegration.h +++ b/Code/Editor/Plugins/ComponentEntityEditorPlugin/SandboxIntegration.h @@ -76,6 +76,7 @@ namespace AzToolsFramework { class EditorEntityAPI; class EditorEntityUiInterface; + class ReadOnlyEntityPublicInterface; namespace AssetBrowser { @@ -164,7 +165,6 @@ private: void InstantiateSliceFromAssetId(const AZ::Data::AssetId& assetId) override; void ClearRedoStack() override; int GetIconTextureIdFromEntityIconPath(const AZStd::string& entityIconPath) override; - bool DisplayHelpersVisible() override; ////////////////////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////////////////// @@ -295,6 +295,7 @@ private: AzToolsFramework::EditorEntityUiInterface* m_editorEntityUiInterface = nullptr; AzToolsFramework::Prefab::PrefabIntegrationInterface* m_prefabIntegrationInterface = nullptr; AzToolsFramework::EditorEntityAPI* m_editorEntityAPI = nullptr; + AzToolsFramework::ReadOnlyEntityPublicInterface* m_readOnlyEntityPublicInterface = nullptr; // Overrides UI styling and behavior for Layer Entities AzToolsFramework::LayerUiHandler m_layerUiOverrideHandler; @@ -306,8 +307,7 @@ class CToolsApplicationUndoLink { public: - CToolsApplicationUndoLink(const char* description) - : m_description(description) + CToolsApplicationUndoLink() { } @@ -316,11 +316,6 @@ public: return 0; } - QString GetDescription() override - { - return m_description.c_str(); - } - void Undo(bool bUndo = true) override { // Always run the undo even if the flag was set to false, that just means that undo wasn't expressly desired, but can be used in cases of canceling the current super undo. @@ -354,8 +349,6 @@ public: w->setFocus(Qt::OtherFocusReason); } } - - AZStd::string m_description; }; #endif // CRYINCLUDE_COMPONENTENTITYEDITORPLUGIN_SANDBOXINTEGRATION_H diff --git a/Code/Editor/Plugins/ComponentEntityEditorPlugin/UI/AssetCatalogModel.cpp b/Code/Editor/Plugins/ComponentEntityEditorPlugin/UI/AssetCatalogModel.cpp index df8d6db4a8..60fda239dc 100644 --- a/Code/Editor/Plugins/ComponentEntityEditorPlugin/UI/AssetCatalogModel.cpp +++ b/Code/Editor/Plugins/ComponentEntityEditorPlugin/UI/AssetCatalogModel.cpp @@ -18,7 +18,6 @@ #include #include -#include #include #include @@ -136,14 +135,6 @@ AssetCatalogModel::AssetCatalogModel(QObject* parent) } } - // Special cases for SimpleAssets. If these get full-fledged AssetData types, these cases can be removed. - QString textureExtensions = LmbrCentral::TextureAsset::GetFileFilter(); - m_extensionToAssetType.insert(AZStd::make_pair(textureExtensions.replace("*", "").replace(" ", "").toStdString().c_str(), AZStd::vector { AZ::AzTypeInfo::Uuid() })); - QString materialExtensions = LmbrCentral::MaterialAsset::GetFileFilter(); - m_extensionToAssetType.insert(AZStd::make_pair(materialExtensions.replace("*", "").replace(" ", "").toStdString().c_str(), AZStd::vector { AZ::AzTypeInfo::Uuid() })); - QString dccMaterialExtensions = LmbrCentral::DccMaterialAsset::GetFileFilter(); - m_extensionToAssetType.insert(AZStd::make_pair(dccMaterialExtensions.replace("*", "").replace(" ", "").toStdString().c_str(), AZStd::vector { AZ::AzTypeInfo::Uuid() })); - AZ::SerializeContext* serializeContext = nullptr; EBUS_EVENT_RESULT(serializeContext, AZ::ComponentApplicationBus, GetSerializeContext); AZ_Assert(serializeContext, "Failed to acquire application serialize context."); diff --git a/Code/Editor/Plugins/ComponentEntityEditorPlugin/UI/Outliner/EntityOutliner.qss b/Code/Editor/Plugins/ComponentEntityEditorPlugin/UI/Outliner/EntityOutliner.qss index de35f91678..a7d3949527 100644 --- a/Code/Editor/Plugins/ComponentEntityEditorPlugin/UI/Outliner/EntityOutliner.qss +++ b/Code/Editor/Plugins/ComponentEntityEditorPlugin/UI/Outliner/EntityOutliner.qss @@ -11,7 +11,6 @@ OutlinerWidget #m_display_options { qproperty-icon: url(:/Menu/menu.svg); qproperty-iconSize: 16px 16px; - qproperty-flat: true; } OutlinerWidget QWidget[PulseHighlight="true"] diff --git a/Code/Editor/Plugins/ComponentEntityEditorPlugin/UI/Outliner/OutlinerListModel.cpp b/Code/Editor/Plugins/ComponentEntityEditorPlugin/UI/Outliner/OutlinerListModel.cpp index c25248d4f6..08d79adcf5 100644 --- a/Code/Editor/Plugins/ComponentEntityEditorPlugin/UI/Outliner/OutlinerListModel.cpp +++ b/Code/Editor/Plugins/ComponentEntityEditorPlugin/UI/Outliner/OutlinerListModel.cpp @@ -2640,7 +2640,7 @@ QSize OutlinerItemDelegate::sizeHint(const QStyleOptionViewItem& option, const Q m_cachedBoundingRectOfTallCharacter = QRect(); }; - QTimer::singleShot(0, resetFunction); + QTimer::singleShot(0, this, resetFunction); } // And add 8 to it gives the outliner roughly the visible spacing we're looking for. diff --git a/Code/Editor/Plugins/ComponentEntityEditorPlugin/UI/Outliner/OutlinerWidget.cpp b/Code/Editor/Plugins/ComponentEntityEditorPlugin/UI/Outliner/OutlinerWidget.cpp index 803deb3509..15bdfa9bf2 100644 --- a/Code/Editor/Plugins/ComponentEntityEditorPlugin/UI/Outliner/OutlinerWidget.cpp +++ b/Code/Editor/Plugins/ComponentEntityEditorPlugin/UI/Outliner/OutlinerWidget.cpp @@ -121,6 +121,18 @@ namespace SortEntityChildrenRecursively(childId, comparer); } } + + QModelIndex nextIndexForTree(bool direction, OutlinerTreeView *tree, QModelIndex current) + { + if (direction) + { + return tree->indexAbove(current); + } + else + { + return tree->indexBelow(current); + } + } } OutlinerWidget::OutlinerWidget(QWidget* pParent, Qt::WindowFlags flags) @@ -891,9 +903,7 @@ void OutlinerWidget::DoSelectSliceRootNextToSelection(bool isTraversalUpwards) return; } - AZStd::function getNextIdxFunction = - AZStd::bind(isTraversalUpwards ? &QTreeView::indexAbove : &QTreeView::indexBelow, treeView, AZStd::placeholders::_1); - QModelIndex nextIdx = getNextIdxFunction(currentIdx); + QModelIndex nextIdx = nextIndexForTree(isTraversalUpwards,treeView,currentIdx); bool foundSliceRoot = false; while (nextIdx.isValid() && !foundSliceRoot) @@ -904,7 +914,7 @@ void OutlinerWidget::DoSelectSliceRootNextToSelection(bool isTraversalUpwards) AzToolsFramework::ToolsApplicationRequestBus::BroadcastResult( foundSliceRoot, &AzToolsFramework::ToolsApplicationRequests::IsSliceRootEntity, currentEntityId); - nextIdx = getNextIdxFunction(currentIdx); + nextIdx = nextIndexForTree(isTraversalUpwards, treeView, currentIdx); } if (foundSliceRoot) @@ -934,13 +944,10 @@ void OutlinerWidget::DoSelectEdgeSliceRoot(bool shouldSelectTopMostSlice) } QModelIndex currentIdx; - AZStd::function getNextIdxFunction; + if (shouldSelectTopMostSlice) { currentIdx = itemModel->index(0, OutlinerListModel::ColumnName); - - getNextIdxFunction = - AZStd::bind(&QTreeView::indexBelow, treeView, AZStd::placeholders::_1); } else { @@ -949,9 +956,6 @@ void OutlinerWidget::DoSelectEdgeSliceRoot(bool shouldSelectTopMostSlice) { currentIdx = itemModel->index(itemModel->rowCount(currentIdx) - 1, OutlinerListModel::ColumnName, currentIdx); } - - getNextIdxFunction = - AZStd::bind(&QTreeView::indexAbove, treeView, AZStd::placeholders::_1); } QModelIndex nextIdx = currentIdx; @@ -964,7 +968,7 @@ void OutlinerWidget::DoSelectEdgeSliceRoot(bool shouldSelectTopMostSlice) AzToolsFramework::ToolsApplicationRequestBus::BroadcastResult( foundSliceRoot, &AzToolsFramework::ToolsApplicationRequests::IsSliceRootEntity, currentEntityId); - nextIdx = getNextIdxFunction(currentIdx); + nextIdx = nextIndexForTree(shouldSelectTopMostSlice,treeView,currentIdx); } while (nextIdx.isValid() && !foundSliceRoot); if (foundSliceRoot) @@ -1277,6 +1281,8 @@ void OutlinerWidget::OnSearchTextChanged(const QString& activeTextFilter) m_listModel->SearchStringChanged(filterString); m_proxyModel->UpdateFilter(); + + m_gui->m_objectTree->expandAll(); } void OutlinerWidget::OnFilterChanged(const AzQtComponents::SearchTypeFilterList& activeTypeFilters) @@ -1416,7 +1422,10 @@ void OutlinerWidget::SortContent() } m_entitiesToSort.clear(); - auto comparer = AZStd::bind(&CompareEntitiesForSorting, AZStd::placeholders::_1, AZStd::placeholders::_2, m_sortMode); + auto comparer = [sortMode = m_sortMode](AZ::EntityId left, AZ::EntityId right) -> bool + { + return CompareEntitiesForSorting(left, right, sortMode); + }; for (const AZ::EntityId& entityId : parentsToSort) { SortEntityChildren(entityId, comparer); @@ -1433,7 +1442,10 @@ void OutlinerWidget::OnSortModeChanged(EntityOutliner::DisplaySortMode sortMode) if (sortMode != EntityOutliner::DisplaySortMode::Manually) { AZ_PROFILE_FUNCTION(AzToolsFramework); - auto comparer = AZStd::bind(&CompareEntitiesForSorting, AZStd::placeholders::_1, AZStd::placeholders::_2, sortMode); + auto comparer = [sortMode = m_sortMode](AZ::EntityId left, AZ::EntityId right) -> bool + { + return CompareEntitiesForSorting(left, right, sortMode); + }; SortEntityChildrenRecursively(AZ::EntityId(), comparer); } diff --git a/Code/Editor/Plugins/EditorCommon/editorcommon_files.cmake b/Code/Editor/Plugins/EditorCommon/editorcommon_files.cmake index c1f1a531e8..1c6efbdf2c 100644 --- a/Code/Editor/Plugins/EditorCommon/editorcommon_files.cmake +++ b/Code/Editor/Plugins/EditorCommon/editorcommon_files.cmake @@ -13,7 +13,6 @@ set(FILES EditorCommonAPI.h ActionOutput.h ActionOutput.cpp - UiEditorDLLBus.h DockTitleBarWidget.cpp DockTitleBarWidget.h SaveUtilities/AsyncSaveRunner.h diff --git a/Code/Editor/Plugins/PerforcePlugin/PerforceSourceControl.h b/Code/Editor/Plugins/PerforcePlugin/PerforceSourceControl.h index ec06fdc82a..794dca0f86 100644 --- a/Code/Editor/Plugins/PerforcePlugin/PerforceSourceControl.h +++ b/Code/Editor/Plugins/PerforcePlugin/PerforceSourceControl.h @@ -49,7 +49,7 @@ public: // from IUnknown HRESULT STDMETHODCALLTYPE QueryInterface(const IID& riid, void** ppvObj) { - if (riid == __uuidof(ISourceControl) /* && m_pIntegrator*/) + if (riid == __az_uuidof(ISourceControl) /* && m_pIntegrator*/) { *ppvObj = this; return S_OK; diff --git a/Code/Editor/PreferencesStdPages.cpp b/Code/Editor/PreferencesStdPages.cpp index 1dd40702a7..77b912a44e 100644 --- a/Code/Editor/PreferencesStdPages.cpp +++ b/Code/Editor/PreferencesStdPages.cpp @@ -50,7 +50,7 @@ CStdPreferencesClassDesc::CStdPreferencesClassDesc() HRESULT CStdPreferencesClassDesc::QueryInterface(const IID& riid, void** ppvObj) { - if (riid == __uuidof(IPreferencesPageCreator)) + if (riid == __az_uuidof(IPreferencesPageCreator)) { *ppvObj = (IPreferencesPageCreator*)this; return S_OK; diff --git a/Code/Editor/QtUI/ClickableLabel.cpp b/Code/Editor/QtUI/ClickableLabel.cpp deleted file mode 100644 index b0694e5f18..0000000000 --- a/Code/Editor/QtUI/ClickableLabel.cpp +++ /dev/null @@ -1,101 +0,0 @@ -/* - * Copyright (c) Contributors to the Open 3D Engine Project. - * For complete copyright and license terms please see the LICENSE at the root of this distribution. - * - * SPDX-License-Identifier: Apache-2.0 OR MIT - * - */ -#include "EditorDefs.h" - -#include "ClickableLabel.h" - - -ClickableLabel::ClickableLabel(const QString& text, QWidget* parent) - : QLabel(parent) - , m_text(text) - , m_showDecoration(false) -{ - setTextFormat(Qt::RichText); - setTextInteractionFlags(Qt::TextBrowserInteraction); -} - -ClickableLabel::ClickableLabel(QWidget* parent) - : QLabel(parent) - , m_showDecoration(false) -{ - setTextFormat(Qt::RichText); - setTextInteractionFlags(Qt::TextBrowserInteraction); -} - -void ClickableLabel::showEvent([[maybe_unused]] QShowEvent* event) -{ - updateFormatting(false); -} - -void ClickableLabel::enterEvent(QEvent* ev) -{ - if (!isEnabled()) - { - return; - } - - updateFormatting(true); - QApplication::setOverrideCursor(QCursor(Qt::PointingHandCursor)); - QLabel::enterEvent(ev); -} - -void ClickableLabel::leaveEvent(QEvent* ev) -{ - if (!isEnabled()) - { - return; - } - - updateFormatting(false); - QApplication::restoreOverrideCursor(); - QLabel::leaveEvent(ev); -} - -void ClickableLabel::setText(const QString& text) -{ - m_text = text; - QLabel::setText(text); - updateFormatting(false); -} - -void ClickableLabel::setShowDecoration(bool b) -{ - m_showDecoration = b; - updateFormatting(false); -} - -void ClickableLabel::updateFormatting(bool mouseOver) -{ - //FIXME: this should be done differently. Using a style sheet would be easiest. - - QColor c = palette().color(QPalette::WindowText); - if (mouseOver || m_showDecoration) - { - QLabel::setText(QString(R"(%2)").arg(c.name(), m_text)); - } - else - { - QLabel::setText(m_text); - } -} - -bool ClickableLabel::event(QEvent* e) -{ - if (isEnabled()) - { - if (e->type() == QEvent::MouseButtonDblClick) - { - emit linkActivated(QString()); - return true; //ignore - } - } - - return QLabel::event(e); -} - -#include diff --git a/Code/Editor/QtUI/ClickableLabel.h b/Code/Editor/QtUI/ClickableLabel.h deleted file mode 100644 index 2b14676eae..0000000000 --- a/Code/Editor/QtUI/ClickableLabel.h +++ /dev/null @@ -1,39 +0,0 @@ -/* - * Copyright (c) Contributors to the Open 3D Engine Project. - * For complete copyright and license terms please see the LICENSE at the root of this distribution. - * - * SPDX-License-Identifier: Apache-2.0 OR MIT - * - */ -#pragma once -#ifndef CRYINCLUDE_EDITORCOMMON_CLICKABLELABEL_H -#define CRYINCLUDE_EDITORCOMMON_CLICKABLELABEL_H - -#if !defined(Q_MOC_RUN) -#include -#endif - -class SANDBOX_API ClickableLabel - : public QLabel -{ - Q_OBJECT -public: - explicit ClickableLabel(const QString& text, QWidget* parent = nullptr); - explicit ClickableLabel(QWidget* parent = nullptr); - bool event(QEvent* e) override; - - void setText(const QString& text); - void setShowDecoration(bool b); - -protected: - void showEvent(QShowEvent* event) override; - void enterEvent(QEvent* ev) override; - void leaveEvent(QEvent* ev) override; - -private: - void updateFormatting(bool mouseOver); - QString m_text; - bool m_showDecoration; -}; - -#endif diff --git a/Code/Editor/Resource.h b/Code/Editor/Resource.h index b3640fac70..ef72bfc9be 100644 --- a/Code/Editor/Resource.h +++ b/Code/Editor/Resource.h @@ -104,6 +104,7 @@ #define ID_FILE_EXPORTTOGAMENOSURFACETEXTURE 33473 #define ID_VIEW_SWITCHTOGAME 33477 #define ID_VIEW_SWITCHTOGAME_FULLSCREEN 33478 +#define ID_VIEW_SWITCHTOGAME_VIEWPORT 33479 #define ID_MOVE_OBJECT 33481 #define ID_RENAME_OBJ 33483 #define ID_FETCH 33496 @@ -190,13 +191,11 @@ #define ID_BRUSH_CSGSUBSTRUCT 33837 #define ID_MATERIAL_PICKTOOL 33842 #define ID_MODIFY_AIPOINT_PICKIMPASSLINK 33865 -#define ID_DISPLAY_SHOWHELPERS 33871 #define ID_FILE_EXPORTSELECTION 33875 #define ID_EDIT_PASTE_WITH_LINKS 33893 #define ID_FILE_EXPORT_TERRAINAREA 33904 #define ID_FILE_EXPORT_TERRAINAREAWITHOBJECTS 33910 #define ID_FILE_EXPORT_SELECTEDOBJECTS 33911 -#define ID_TERRAIN_TIMEOFDAY 33912 #define ID_SPLINE_PREVIOUS_KEY 33916 #define ID_SPLINE_NEXT_KEY 33917 #define ID_SPLINE_FLATTEN_ALL 33918 @@ -290,7 +289,6 @@ #define ID_TV_TRACKS_TOOLBAR_LAST 35183 // for up to 100 "Add Tracks..." dynamically added Track View Track buttons #define ID_OPEN_TERRAIN_EDITOR 36007 #define ID_OPEN_UICANVASEDITOR 36010 -#define ID_TERRAIN_TIMEOFDAYBUTTON 36011 #define ID_OPEN_TERRAINTEXTURE_EDITOR 36012 #define ID_SKINS_REFRESH 36014 #define ID_FILE_GENERATETERRAIN 36016 diff --git a/Code/Editor/Settings.cpp b/Code/Editor/Settings.cpp index d548cffb52..acb48c3545 100644 --- a/Code/Editor/Settings.cpp +++ b/Code/Editor/Settings.cpp @@ -112,8 +112,6 @@ SEditorSettings::SEditorSettings() m_showCircularDependencyError = true; bAutoloadLastLevelAtStartup = false; bMuteAudio = false; - bEnableGameModeVR = false; - objectHideMask = 0; objectSelectMask = 0xFFFFFFFF; // Initially all selectable. @@ -473,7 +471,7 @@ void SEditorSettings::LoadValue(const char* sSection, const char* sKey, ESystemC } ////////////////////////////////////////////////////////////////////////// -void SEditorSettings::Save() +void SEditorSettings::Save(bool isEditorClosing) { QString strStringPlaceholder; @@ -640,14 +638,16 @@ void SEditorSettings::Save() // --- Settings Registry values // Prefab System UI - AzFramework::ApplicationRequests::Bus::Broadcast( - &AzFramework::ApplicationRequests::SetPrefabSystemEnabled, prefabSystem); + AzFramework::ApplicationRequests::Bus::Broadcast(&AzFramework::ApplicationRequests::SetPrefabSystemEnabled, prefabSystem); AzToolsFramework::Prefab::PrefabLoaderInterface* prefabLoaderInterface = AZ::Interface::Get(); prefabLoaderInterface->SetSaveAllPrefabsPreference(levelSaveSettings.saveAllPrefabsPreference); - SaveSettingsRegistryFile(); + if (!isEditorClosing) + { + SaveSettingsRegistryFile(); + } } ////////////////////////////////////////////////////////////////////////// diff --git a/Code/Editor/Settings.h b/Code/Editor/Settings.h index 426d2300d3..9276d9b715 100644 --- a/Code/Editor/Settings.h +++ b/Code/Editor/Settings.h @@ -267,7 +267,7 @@ struct SANDBOX_API SEditorSettings AZ_POP_DISABLE_DLL_EXPORT_BASECLASS_WARNING SEditorSettings(); ~SEditorSettings() = default; - void Save(); + void Save(bool isEditorClosing = false); void Load(); void LoadCloudSettings(); @@ -305,7 +305,6 @@ AZ_POP_DISABLE_DLL_EXPORT_BASECLASS_WARNING bool m_showCircularDependencyError; bool bAutoloadLastLevelAtStartup; bool bMuteAudio; - bool bEnableGameModeVR; //! Speed of camera movement. float cameraMoveSpeed; diff --git a/Code/Editor/StartupLogoDialog.ui b/Code/Editor/StartupLogoDialog.ui index c0b8115cb0..cbc596f53a 100644 --- a/Code/Editor/StartupLogoDialog.ui +++ b/Code/Editor/StartupLogoDialog.ui @@ -103,7 +103,7 @@ - General Availability + development diff --git a/Code/Editor/TimeOfDay/main-00.png b/Code/Editor/TimeOfDay/main-00.png deleted file mode 100644 index 2c44fec541..0000000000 --- a/Code/Editor/TimeOfDay/main-00.png +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:5201dbba6c8114914ed680b04b72a5e18e22c0519a514bcccdc7ae8d32670b4e -size 993 diff --git a/Code/Editor/TimeOfDay/main-01.png b/Code/Editor/TimeOfDay/main-01.png deleted file mode 100644 index 5cc1bf33d8..0000000000 --- a/Code/Editor/TimeOfDay/main-01.png +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:48a7250ad41c5e298079ddd13910b58baca2ef592defcc162ccc9df542d28905 -size 981 diff --git a/Code/Editor/TimeOfDay/main-02.png b/Code/Editor/TimeOfDay/main-02.png deleted file mode 100644 index b7d90648a3..0000000000 --- a/Code/Editor/TimeOfDay/main-02.png +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:98b9e9abcc54b4f3e6903ad74bb50f364bfe4c8cd9fedc9653a6603d64a1ee0a -size 838 diff --git a/Code/Editor/TimeOfDay/main-03.png b/Code/Editor/TimeOfDay/main-03.png deleted file mode 100644 index e073dbf60b..0000000000 --- a/Code/Editor/TimeOfDay/main-03.png +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:1199c834fc8de69f9d7c76e8c7fbd84e9b92713b9f07b513137085e5089432cb -size 857 diff --git a/Code/Editor/TimeOfDay/main-04.png b/Code/Editor/TimeOfDay/main-04.png deleted file mode 100644 index 6049dbfe18..0000000000 --- a/Code/Editor/TimeOfDay/main-04.png +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:79b44be1dbe5518e06dc8c8823d00462136d39ffe60a32ef4f64dc0712654d33 -size 646 diff --git a/Code/Editor/TimeOfDay/main-05.png b/Code/Editor/TimeOfDay/main-05.png deleted file mode 100644 index 054419f39a..0000000000 --- a/Code/Editor/TimeOfDay/main-05.png +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:6ea7450c1a278570e2a1dba3a8b4d7d4e5f0d054e8371139ebdb5220c405d355 -size 537 diff --git a/Code/Editor/TimeOfDay/main-06.png b/Code/Editor/TimeOfDay/main-06.png deleted file mode 100644 index 35f8afdae2..0000000000 --- a/Code/Editor/TimeOfDay/main-06.png +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:bc73f0720f2ff877aff5c6646938b7fc509a69d92e766fecb9fa010eecadee7b -size 606 diff --git a/Code/Editor/TimeOfDay/main-07.png b/Code/Editor/TimeOfDay/main-07.png deleted file mode 100644 index aca9597355..0000000000 --- a/Code/Editor/TimeOfDay/main-07.png +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:e63519ed54fc19a4b4a2a38cb2c5f148b7404ac614d4aab039b71fee64cd7425 -size 569 diff --git a/Code/Editor/TimeOfDay/main-08.png b/Code/Editor/TimeOfDay/main-08.png deleted file mode 100644 index abeb114fc2..0000000000 --- a/Code/Editor/TimeOfDay/main-08.png +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:8742cad4b8f8f5bba59abb9cc028db84de222ed8b393398f6837fea16bb4a1d8 -size 563 diff --git a/Code/Editor/TimeOfDay/main-09.png b/Code/Editor/TimeOfDay/main-09.png deleted file mode 100644 index cc77b8c9e2..0000000000 --- a/Code/Editor/TimeOfDay/main-09.png +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:ef85628301b4edc4f858f0988e4f072772be3feb92d27a2ec33b72a27bcee7ff -size 583 diff --git a/Code/Editor/TimeOfDay/main-10.png b/Code/Editor/TimeOfDay/main-10.png deleted file mode 100644 index dc463c6497..0000000000 --- a/Code/Editor/TimeOfDay/main-10.png +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:d17bfbdee6d37566b241adf64241ef47b62145aaac3e9e8f9691d1fb866b5fcb -size 717 diff --git a/Code/Editor/TimeOfDay/main-11.png b/Code/Editor/TimeOfDay/main-11.png deleted file mode 100644 index d686ab18c8..0000000000 --- a/Code/Editor/TimeOfDay/main-11.png +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:98b629abf927bcea41d8857b1761d12a37836471d7106b2f5210337c0ace0d9c -size 1103 diff --git a/Code/Editor/TimeOfDay/main-12.png b/Code/Editor/TimeOfDay/main-12.png deleted file mode 100644 index 069510ab24..0000000000 --- a/Code/Editor/TimeOfDay/main-12.png +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:e949111b33e28834995807cab30ecb58d988a81a2d58fa166117962c85b8e149 -size 849 diff --git a/Code/Editor/ToolbarManager.cpp b/Code/Editor/ToolbarManager.cpp index 00b7992ef0..6b610d23ce 100644 --- a/Code/Editor/ToolbarManager.cpp +++ b/Code/Editor/ToolbarManager.cpp @@ -590,6 +590,16 @@ AmazonToolbar ToolbarManager::GetObjectToolbar() const return t; } +QMenu* ToolbarManager::CreatePlayButtonMenu() const +{ + QMenu* playButtonMenu = new QMenu("Play Game"); + + playButtonMenu->addAction(m_actionManager->GetAction(ID_VIEW_SWITCHTOGAME_VIEWPORT)); + playButtonMenu->addAction(m_actionManager->GetAction(ID_VIEW_SWITCHTOGAME_FULLSCREEN)); + + return playButtonMenu; +} + AmazonToolbar ToolbarManager::GetPlayConsoleToolbar() const { AmazonToolbar t = AmazonToolbar("PlayConsole", QObject::tr("Play Controls")); @@ -598,8 +608,17 @@ AmazonToolbar ToolbarManager::GetPlayConsoleToolbar() const t.AddAction(ID_TOOLBAR_WIDGET_SPACER_RIGHT, ORIGINAL_TOOLBAR_VERSION); t.AddAction(ID_TOOLBAR_SEPARATOR, ORIGINAL_TOOLBAR_VERSION); t.AddAction(ID_TOOLBAR_WIDGET_PLAYCONSOLE_LABEL, ORIGINAL_TOOLBAR_VERSION); - t.AddAction(ID_VIEW_SWITCHTOGAME, TOOLBARS_WITH_PLAY_GAME); - t.AddAction(ID_VIEW_SWITCHTOGAME_FULLSCREEN, TOOLBARS_WITH_PLAY_GAME); + + QAction* playAction = m_actionManager->GetAction(ID_VIEW_SWITCHTOGAME); + QToolButton* playButton = new QToolButton(t.Toolbar()); + + QMenu* menu = CreatePlayButtonMenu(); + menu->setParent(t.Toolbar()); + playAction->setMenu(menu); + + playButton->setDefaultAction(playAction); + t.AddWidget(playButton, ID_VIEW_SWITCHTOGAME, ORIGINAL_TOOLBAR_VERSION); + t.AddAction(ID_TOOLBAR_SEPARATOR, ORIGINAL_TOOLBAR_VERSION); t.AddAction(ID_SWITCH_PHYSICS, TOOLBARS_WITH_PLAY_GAME); return t; @@ -728,7 +747,14 @@ void AmazonToolbar::SetActionsOnInternalToolbar(ActionManager* actionManager) { if (actionManager->HasAction(actionId)) { - m_toolbar->addAction(actionManager->GetAction(actionId)); + if (actionData.widget != nullptr) + { + m_toolbar->addWidget(actionData.widget); + } + else + { + m_toolbar->addAction(actionManager->GetAction(actionId)); + } } } } @@ -1367,7 +1393,12 @@ void AmazonToolbar::InstantiateToolbar(QMainWindow* mainWindow, ToolbarManager* void AmazonToolbar::AddAction(int actionId, int toolbarVersionAdded) { - m_actions.push_back({ actionId, toolbarVersionAdded }); + AddWidget(nullptr, actionId, toolbarVersionAdded); +} + +void AmazonToolbar::AddWidget(QWidget* widget, int actionId, int toolbarVersionAdded) +{ + m_actions.push_back({ actionId, toolbarVersionAdded, widget }); } void AmazonToolbar::Clear() diff --git a/Code/Editor/ToolbarManager.h b/Code/Editor/ToolbarManager.h index be537533b6..ae6b0c7296 100644 --- a/Code/Editor/ToolbarManager.h +++ b/Code/Editor/ToolbarManager.h @@ -87,6 +87,7 @@ public: const QString& GetTranslatedName() const { return m_translatedName; } void AddAction(int actionId, int toolbarVersionAdded = 0); + void AddWidget(QWidget* widget, int actionId, int toolbarVersionAdded = 0); QToolBar* Toolbar() const { return m_toolbar; } @@ -117,6 +118,7 @@ private: { int actionId; int toolbarVersionAdded; + QWidget* widget; bool operator ==(const AmazonToolbar::ActionData& other) const { @@ -133,7 +135,9 @@ private: class AmazonToolBarExpanderWatcher; class ToolbarManager + : public QObject { + Q_OBJECT public: explicit ToolbarManager(ActionManager* actionManager, MainWindow* mainWindow); ~ToolbarManager(); @@ -178,6 +182,8 @@ private: void UpdateAllowedAreas(QToolBar* toolbar); bool IsDirty(const AmazonToolbar& toolbar) const; + QMenu* CreatePlayButtonMenu() const; + const AmazonToolbar* FindDefaultToolbar(const QString& toolbarName) const; AmazonToolbar* FindToolbar(const QString& toolbarName); diff --git a/Code/Editor/TrackView/AtomOutputFrameCapture.cpp b/Code/Editor/TrackView/AtomOutputFrameCapture.cpp index 94451e6914..5943e3c2d7 100644 --- a/Code/Editor/TrackView/AtomOutputFrameCapture.cpp +++ b/Code/Editor/TrackView/AtomOutputFrameCapture.cpp @@ -13,6 +13,7 @@ #include #include #include +#include #include #include #include @@ -47,18 +48,42 @@ namespace TrackView AZ::Name viewName = AZ::Name("MainCamera"); m_view = AZ::RPI::View::CreateView(viewName, AZ::RPI::View::UsageCamera); m_renderPipeline->SetDefaultView(m_view); + m_targetView = scene.GetDefaultRenderPipeline()->GetDefaultView(); + if (AZ::Render::PostProcessFeatureProcessor* fp = scene.GetFeatureProcessor()) + { + // This will be set again to mimic the active camera in UpdateView + fp->SetViewAlias(m_view, m_targetView); + } } void AtomOutputFrameCapture::DestroyPipeline(AZ::RPI::Scene& scene) { + if (AZ::Render::PostProcessFeatureProcessor* fp = scene.GetFeatureProcessor()) + { + // Remove view alias introduced in CreatePipeline and UpdateView + fp->RemoveViewAlias(m_view); + } scene.RemoveRenderPipeline(m_renderPipeline->GetId()); m_passHierarchy.clear(); m_renderPipeline.reset(); m_view.reset(); + m_targetView.reset(); } - void AtomOutputFrameCapture::UpdateView(const AZ::Matrix3x4& cameraTransform, const AZ::Matrix4x4& cameraProjection) + void AtomOutputFrameCapture::UpdateView(const AZ::Matrix3x4& cameraTransform, const AZ::Matrix4x4& cameraProjection, const AZ::RPI::ViewPtr targetView) { + if (targetView && targetView != m_targetView) + { + if (AZ::RPI::Scene* scene = SceneFromGameEntityContext()) + { + if (AZ::Render::PostProcessFeatureProcessor* fp = scene->GetFeatureProcessor()) + { + fp->SetViewAlias(m_view, targetView); + m_targetView = targetView; + } + } + } + m_view->SetCameraTransform(cameraTransform); m_view->SetViewToClipMatrix(cameraProjection); } diff --git a/Code/Editor/TrackView/AtomOutputFrameCapture.h b/Code/Editor/TrackView/AtomOutputFrameCapture.h index 2686a81c99..4719ab08e5 100644 --- a/Code/Editor/TrackView/AtomOutputFrameCapture.h +++ b/Code/Editor/TrackView/AtomOutputFrameCapture.h @@ -39,11 +39,12 @@ namespace TrackView CaptureFinishedCallback captureFinishedCallback); //! Update the internal view that is associated with the created pipeline. - void UpdateView(const AZ::Matrix3x4& cameraTransform, const AZ::Matrix4x4& cameraProjection); + void UpdateView(const AZ::Matrix3x4& cameraTransform, const AZ::Matrix4x4& cameraProjection, const AZ::RPI::ViewPtr targetView = nullptr); private: AZ::RPI::RenderPipelinePtr m_renderPipeline; //!< The internal render pipeline. AZ::RPI::ViewPtr m_view; //!< The view associated with the render pipeline. + AZ::RPI::ViewPtr m_targetView; //!< The view that this render pipeline will mimic. AZStd::vector m_passHierarchy; //!< Pass hierarchy (includes pipelineName and CopyToSwapChain). CaptureFinishedCallback m_captureFinishedCallback; //!< Stored callback called from OnCaptureFinished. diff --git a/Code/Editor/TrackView/SequenceBatchRenderDialog.cpp b/Code/Editor/TrackView/SequenceBatchRenderDialog.cpp index d7901e338a..a796a8ce37 100644 --- a/Code/Editor/TrackView/SequenceBatchRenderDialog.cpp +++ b/Code/Editor/TrackView/SequenceBatchRenderDialog.cpp @@ -16,6 +16,7 @@ #include #include +#include // Qt #include @@ -91,9 +92,12 @@ namespace static void UpdateAtomOutputFrameCaptureView(TrackView::AtomOutputFrameCapture& atomOutputFrameCapture, const int width, const int height) { const AZ::EntityId activeCameraEntityId = TrackView::ActiveCameraEntityId(); + AZ::RPI::ViewPtr view = nullptr; + AZ::RPI::ViewProviderBus::EventResult(view, activeCameraEntityId, &AZ::RPI::ViewProvider::GetView); atomOutputFrameCapture.UpdateView( TrackView::TransformFromEntityId(activeCameraEntityId), - TrackView::ProjectionFromCameraEntityId(activeCameraEntityId, static_cast(width), static_cast(height))); + TrackView::ProjectionFromCameraEntityId(activeCameraEntityId, aznumeric_cast(width), aznumeric_cast(height)), + view); } CSequenceBatchRenderDialog::CSequenceBatchRenderDialog(float fps, QWidget* pParent /* = nullptr */) diff --git a/Code/Editor/TrackView/SoundKeyUIControls.cpp b/Code/Editor/TrackView/SoundKeyUIControls.cpp index 8c18b58aed..f001937e82 100644 --- a/Code/Editor/TrackView/SoundKeyUIControls.cpp +++ b/Code/Editor/TrackView/SoundKeyUIControls.cpp @@ -108,18 +108,15 @@ void CSoundKeyUIControls::OnUIChange(IVariable* pVar, CTrackViewKeyBundle& selec { ISoundKey soundKey; keyHandle.GetKey(&soundKey); - bool bChangedSoundFile = false; if (pVar == mv_startTrigger.GetVar()) { QString sFilename = mv_startTrigger; - bChangedSoundFile = sFilename != soundKey.sStartTrigger.c_str(); soundKey.sStartTrigger = sFilename.toUtf8().data(); } else if (pVar == mv_stopTrigger.GetVar()) { QString sFilename = mv_stopTrigger; - bChangedSoundFile = sFilename != soundKey.sStopTrigger.c_str(); soundKey.sStopTrigger = sFilename.toUtf8().data(); } diff --git a/Code/Editor/TrackView/TrackViewDopeSheetBase.cpp b/Code/Editor/TrackView/TrackViewDopeSheetBase.cpp index a14da0ae09..2907bebdb4 100644 --- a/Code/Editor/TrackView/TrackViewDopeSheetBase.cpp +++ b/Code/Editor/TrackView/TrackViewDopeSheetBase.cpp @@ -2233,7 +2233,6 @@ void CTrackViewDopeSheetBase::AddKeys(const QPoint& point, const bool bTryAddKey if (pTrack && inRange) { - bool keyCreated = false; if (bTryAddKeysInGroup && pNode->GetParentNode()) // Add keys in group { CTrackViewTrackBundle tracksInGroup = pNode->GetTracksByParam(pTrack->GetParameterType()); @@ -2248,8 +2247,6 @@ void CTrackViewDopeSheetBase::AddKeys(const QPoint& point, const bool bTryAddKey AzToolsFramework::ScopedUndoBatch undoBatch("Create Key"); pCurrTrack->CreateKey(keyTime); undoBatch.MarkEntityDirty(sequence->GetSequenceComponentEntityId()); - - keyCreated = true; } } else // A compound track @@ -2262,8 +2259,6 @@ void CTrackViewDopeSheetBase::AddKeys(const QPoint& point, const bool bTryAddKey AzToolsFramework::ScopedUndoBatch undoBatch("Create Key"); pSubTrack->CreateKey(keyTime); undoBatch.MarkEntityDirty(sequence->GetSequenceComponentEntityId()); - - keyCreated = true; } } } @@ -2276,15 +2271,13 @@ void CTrackViewDopeSheetBase::AddKeys(const QPoint& point, const bool bTryAddKey AzToolsFramework::ScopedUndoBatch undoBatch("Create Key"); pTrack->CreateKey(keyTime); undoBatch.MarkEntityDirty(sequence->GetSequenceComponentEntityId()); - - keyCreated = true; } } else // A compound track { if (pTrack->GetValueType() == AnimValueType::RGB) { - keyCreated = CreateColorKey(pTrack, keyTime); + CreateColorKey(pTrack, keyTime); } else { @@ -2295,7 +2288,6 @@ void CTrackViewDopeSheetBase::AddKeys(const QPoint& point, const bool bTryAddKey if (IsOkToAddKeyHere(pSubTrack, keyTime)) { pSubTrack->CreateKey(keyTime); - keyCreated = true; } } undoBatch.MarkEntityDirty(sequence->GetSequenceComponentEntityId()); @@ -2617,7 +2609,6 @@ void CTrackViewDopeSheetBase::DrawSelectTrack(const Range& timeRange, QPainter* void CTrackViewDopeSheetBase::DrawBoolTrack(const Range& timeRange, QPainter* painter, CTrackViewTrack* pTrack, const QRect& rc) { int x0 = TimeToClient(timeRange.start); - float t0 = timeRange.start; const QBrush prevBrush = painter->brush(); painter->setBrush(m_visibilityBrush); @@ -2648,7 +2639,6 @@ void CTrackViewDopeSheetBase::DrawBoolTrack(const Range& timeRange, QPainter* pa painter->fillRect(QRect(QPoint(x0, rc.top() + 4), QPoint(x, rc.bottom() - 4)), gradient); } - t0 = time; x0 = x; } int x = TimeToClient(timeRange.end); diff --git a/Code/Editor/TrackView/TrackViewKeyPropertiesDlg.cpp b/Code/Editor/TrackView/TrackViewKeyPropertiesDlg.cpp index 2fd46b0fc5..a17d92ac0a 100644 --- a/Code/Editor/TrackView/TrackViewKeyPropertiesDlg.cpp +++ b/Code/Editor/TrackView/TrackViewKeyPropertiesDlg.cpp @@ -198,7 +198,6 @@ void CTrackViewKeyPropertiesDlg::OnKeySelectionChanged(CTrackViewSequence* seque m_wndProps->setEnabled(false); m_wndTrackProps->setEnabled(false); - bool bAssigned = false; if (selectedKeys.GetKeyCount() > 0 && selectedKeys.AreAllKeysOfSameType()) { CTrackViewTrack* pTrack = selectedKeys.GetKey(0).GetTrack(); @@ -215,12 +214,6 @@ void CTrackViewKeyPropertiesDlg::OnKeySelectionChanged(CTrackViewSequence* seque { AddVars(m_keyControls[i]); } - - if (m_keyControls[i]->OnKeySelectionChange(selectedKeys)) - { - bAssigned = true; - } - break; } } diff --git a/Code/Editor/TrackView/TrackViewSequence.h b/Code/Editor/TrackView/TrackViewSequence.h index a392ad00f9..8f686af0cb 100644 --- a/Code/Editor/TrackView/TrackViewSequence.h +++ b/Code/Editor/TrackView/TrackViewSequence.h @@ -11,6 +11,7 @@ #define CRYINCLUDE_EDITOR_TRACKVIEW_TRACKVIEWSEQUENCE_H #pragma once +#include #include "IMovieSystem.h" #include diff --git a/Code/Editor/TrackView/TrackViewSequenceManager.cpp b/Code/Editor/TrackView/TrackViewSequenceManager.cpp index d7c1e3c709..515af4df38 100644 --- a/Code/Editor/TrackView/TrackViewSequenceManager.cpp +++ b/Code/Editor/TrackView/TrackViewSequenceManager.cpp @@ -408,20 +408,6 @@ void CTrackViewSequenceManager::OnSequenceRemoved(CTrackViewSequence* sequence) } } -//////////////////////////////////////////////////////////////////////////// -void CTrackViewSequenceManager::OnDataBaseItemEvent([[maybe_unused]] IDataBaseItem* pItem, EDataBaseItemEvent event) -{ - if (event != EDataBaseItemEvent::EDB_ITEM_EVENT_ADD) - { - const size_t numSequences = m_sequences.size(); - - for (size_t i = 0; i < numSequences; ++i) - { - m_sequences[i]->UpdateDynamicParams(); - } - } -} - //////////////////////////////////////////////////////////////////////////// CTrackViewAnimNodeBundle CTrackViewSequenceManager::GetAllRelatedAnimNodes(const AZ::EntityId entityId) const { diff --git a/Code/Editor/TrackView/TrackViewSequenceManager.h b/Code/Editor/TrackView/TrackViewSequenceManager.h index 1474323dc6..6c65a7f1a9 100644 --- a/Code/Editor/TrackView/TrackViewSequenceManager.h +++ b/Code/Editor/TrackView/TrackViewSequenceManager.h @@ -13,13 +13,11 @@ #include "TrackViewSequence.h" -#include "IDataBaseManager.h" #include class CTrackViewSequenceManager : public IEditorNotifyListener - , public IDataBaseManagerListener , public ITrackViewSequenceManager , public AZ::EntitySystemBus::Handler { @@ -65,8 +63,6 @@ private: void OnSequenceAdded(CTrackViewSequence* pSequence); void OnSequenceRemoved(CTrackViewSequence* pSequence); - void OnDataBaseItemEvent(IDataBaseItem* pItem, EDataBaseItemEvent event) override; - // AZ::EntitySystemBus void OnEntityNameChanged(const AZ::EntityId& entityId, const AZStd::string& name) override; void OnEntityDestruction(const AZ::EntityId& entityId) override; diff --git a/Code/Editor/TrackView/TrackViewSplineCtrl.cpp b/Code/Editor/TrackView/TrackViewSplineCtrl.cpp index 352f2f3699..b80818db0d 100644 --- a/Code/Editor/TrackView/TrackViewSplineCtrl.cpp +++ b/Code/Editor/TrackView/TrackViewSplineCtrl.cpp @@ -57,7 +57,6 @@ protected: } int GetSize() override { return sizeof(*this); } - QString GetDescription() override { return "UndoTrackViewSplineCtrl"; }; void Undo(bool bUndo) override { diff --git a/Code/Editor/TrackView/TrackViewUndo.h b/Code/Editor/TrackView/TrackViewUndo.h index ff5964ec7f..7f3b4737a1 100644 --- a/Code/Editor/TrackView/TrackViewUndo.h +++ b/Code/Editor/TrackView/TrackViewUndo.h @@ -6,9 +6,6 @@ * */ - -#ifndef CRYINCLUDE_EDITOR_TRACKVIEW_TRACKVIEWUNDO_H -#define CRYINCLUDE_EDITOR_TRACKVIEW_TRACKVIEWUNDO_H #pragma once #include "TrackViewTrack.h" @@ -27,11 +24,10 @@ public: CUndoComponentEntityTrackObject(CTrackViewTrack* track); protected: - virtual int GetSize() override { return sizeof(*this); } - virtual QString GetDescription() override { return "Undo Component Entity Track Modify"; }; + int GetSize() override { return sizeof(*this); } - virtual void Undo(bool bUndo) override; - virtual void Redo() override; + void Undo(bool bUndo) override; + void Redo() override; private: @@ -50,5 +46,3 @@ private: CTrackViewTrackMemento m_undo; CTrackViewTrackMemento m_redo; }; - -#endif // CRYINCLUDE_EDITOR_TRACKVIEW_TRACKVIEWUNDO_H diff --git a/Code/Editor/Undo/IUndoObject.h b/Code/Editor/Undo/IUndoObject.h index 47d853dd9a..3791b76d48 100644 --- a/Code/Editor/Undo/IUndoObject.h +++ b/Code/Editor/Undo/IUndoObject.h @@ -8,10 +8,6 @@ // Description : Interface for implementation of IUndo objects. - - -#ifndef CRYINCLUDE_EDITOR_UNDO_IUNDOOBJECT_H -#define CRYINCLUDE_EDITOR_UNDO_IUNDOOBJECT_H #pragma once #include @@ -26,8 +22,6 @@ struct IUndoObject virtual void Release() { delete this; }; //! Return size of this Undo object. virtual int GetSize() = 0; - //! Return description of this Undo object. - virtual QString GetDescription() = 0; //! Undo this object. //! @param bUndo If true this operation called in response to Undo operation. @@ -37,14 +31,5 @@ struct IUndoObject virtual void Redo() = 0; // Returns the name of undo object - virtual QString GetObjectName(){ return QString(); }; - - // Returns the name of related editor object. - // Ex: For a undo action which would modify value for var "Emitter Strength" of emitter "Level.example", - // this function will return emitter name "Level.example" - Vera, Confetti - virtual QString GetEditorObjectName() { return QString(); }; - - virtual bool IsChanged([[maybe_unused]] unsigned int& compareValue) const { return false; } + virtual QString GetObjectName(){ return QString(); } }; - -#endif // CRYINCLUDE_EDITOR_UNDO_IUNDOOBJECT_H diff --git a/Code/Editor/Util/FileUtil.cpp b/Code/Editor/Util/FileUtil.cpp index baca69d628..ce2d399dcc 100644 --- a/Code/Editor/Util/FileUtil.cpp +++ b/Code/Editor/Util/FileUtil.cpp @@ -23,9 +23,9 @@ // AzCore #include #include +#include // AzFramework -#include // AzQtComponents #include @@ -42,8 +42,6 @@ #include "CheckOutDialog.h" #include "ISourceControl.h" #include "Dialogs/Generic/UserOptions.h" -#include "IAssetItem.h" -#include "IAssetItemDatabase.h" #include "Include/IObjectManager.h" #include "UsedResources.h" #include "Objects/BaseObject.h" @@ -54,92 +52,14 @@ #include #endif -bool CFileUtil::s_singleFileDlgPref[IFileUtil::EFILE_TYPE_LAST] = { true, true, true, true, true }; -bool CFileUtil::s_multiFileDlgPref[IFileUtil::EFILE_TYPE_LAST] = { true, true, true, true, true }; +bool CFileUtil::s_singleFileDlgPref[IFileUtil::EFILE_TYPE_LAST] = { true, true, true, true }; +bool CFileUtil::s_multiFileDlgPref[IFileUtil::EFILE_TYPE_LAST] = { true, true, true, true }; CAutoRestorePrimaryCDRoot::~CAutoRestorePrimaryCDRoot() { QDir::setCurrent(GetIEditor()->GetPrimaryCDFolder()); } -bool CFileUtil::CompileLuaFile(const char* luaFilename) -{ - QString luaFile = luaFilename; - - if (luaFile.isEmpty()) - { - return false; - } - - // Check if this file is in Archive. - { - CCryFile file; - if (file.Open(luaFilename, "rb")) - { - // Check if in pack. - if (file.IsInPak()) - { - return true; - } - } - } - - luaFile = Path::GamePathToFullPath(luaFilename); - - // First try compiling script and see if it have any errors. - QString LuaCompiler; - QString CompilerOutput; - - // Create the filepath of the lua compiler - QString szExeFileName = qApp->applicationFilePath(); - QString exePath = Path::GetPath(szExeFileName); - -#if defined(AZ_PLATFORM_WINDOWS) - const char* luaCompiler = "LuaCompiler.exe"; -#else - const char* luaCompiler = "lua"; -#endif - LuaCompiler = Path::AddPathSlash(exePath) + luaCompiler + " "; - - AZStd::string path = luaFile.toUtf8().data(); - EBUS_EVENT(AzFramework::ApplicationRequests::Bus, NormalizePath, path); - - QString finalPath = path.c_str(); - finalPath = "\"" + finalPath + "\""; - - // Add the name of the Lua file - QString cmdLine = LuaCompiler + finalPath; - - // Execute the compiler and capture the output - if (!GetIEditor()->ExecuteConsoleApp(cmdLine, CompilerOutput)) - { - QMessageBox::critical(QApplication::activeWindow(), QString(), QObject::tr("Error while executing '%1', make sure the file is in" \ - " your Primary CD folder !").arg(luaCompiler)); - return false; - } - - // Check return string - if (!CompilerOutput.isEmpty()) - { - // Errors while compiling file. - - // Show output from Lua compiler - if (QMessageBox::critical(QApplication::activeWindow(), QObject::tr("Lua Compiler"), - QObject::tr("Error output from Lua compiler:\r\n%1\r\nDo you want to edit the file ?").arg(CompilerOutput), QMessageBox::Yes | QMessageBox::No) == QMessageBox::Yes) - { - int line = 0; - int index = CompilerOutput.indexOf("at line"); - if (index >= 0) - { - azsscanf(CompilerOutput.mid(index).toUtf8().data(), "at line %d", &line); - } - // Open the Lua file for editing - EditTextFile(luaFile.toUtf8().data(), line); - } - return false; - } - return true; -} ////////////////////////////////////////////////////////////////////////// bool CFileUtil::ExtractFile(QString& file, bool bMsgBoxAskForExtraction, const char* pDestinationFilename) { @@ -205,7 +125,7 @@ void CFileUtil::EditTextFile(const char* txtFile, int line, IFileUtil::ETextFile { QString file = txtFile; - QString fullPathName = Path::GamePathToFullPath(file); + QString fullPathName = Path::GamePathToFullPath(file); ExtractFile(fullPathName); QString cmd(fullPathName); #if defined (AZ_PLATFORM_WINDOWS) @@ -301,164 +221,6 @@ void CFileUtil::EditTextureFile(const char* textureFile, [[maybe_unused]] bool b } } -////////////////////////////////////////////////////////////////////////// -bool CFileUtil::EditMayaFile(const char* filepath, const bool bExtractFromPak, const bool bUseGameFolder) -{ - QString dosFilepath = PathUtil::ToDosPath(filepath).c_str(); - if (bExtractFromPak) - { - ExtractFile(dosFilepath); - } - - if (bUseGameFolder) - { - const QString sGameFolder = Path::GetEditingGameDataFolder().c_str(); - int nLength = sGameFolder.toUtf8().count(); - if (azstrnicmp(filepath, sGameFolder.toUtf8().data(), nLength) != 0) - { - dosFilepath = sGameFolder + '\\' + filepath; - } - - dosFilepath = PathUtil::ToDosPath(dosFilepath.toUtf8().data()).c_str(); - } - - const char* engineRoot; - EBUS_EVENT_RESULT(engineRoot, AzFramework::ApplicationRequests::Bus, GetEngineRoot); - - const QString fullPath = QString(engineRoot) + '\\' + dosFilepath; - - if (gSettings.animEditor.isEmpty()) - { - AzQtComponents::ShowFileOnDesktop(fullPath); - } - else - { - if (!QProcess::startDetached(gSettings.animEditor, { fullPath })) - { - CryMessageBox("Can't open the file. You can specify a source editor in Sandbox Preferences or create an association in Windows.", "Cannot open file!", MB_OK | MB_ICONERROR); - } - } - return true; -} - -////////////////////////////////////////////////////////////////////////// -bool CFileUtil::EditFile(const char* filePath, const bool bExtrackFromPak, const bool bUseGameFolder) -{ - QString extension = filePath; - extension.remove(0, extension.lastIndexOf('.')); - - if (extension.compare(".ma") == 0) - { - return EditMayaFile(filePath, bExtrackFromPak, bUseGameFolder); - } - else if ((extension.compare(".bspace") == 0) || (extension.compare(".comb") == 0)) - { - EditTextFile(filePath, 0, IFileUtil::FILE_TYPE_BSPACE); - return true; - } - - return false; -} - -////////////////////////////////////////////////////////////////////////// -bool CFileUtil::CalculateDccFilename(const QString& assetFilename, QString& dccFilename) -{ - if (ExtractDccFilenameFromAssetDatabase(assetFilename, dccFilename)) - { - return true; - } - - if (ExtractDccFilenameUsingNamingConventions(assetFilename, dccFilename)) - { - return true; - } - - GetIEditor()->GetEnv()->pLog->LogError("Failed to find psd file for texture: '%s'", assetFilename.toUtf8().data()); - return false; -} - -////////////////////////////////////////////////////////////////////////// -bool CFileUtil::ExtractDccFilenameFromAssetDatabase(const QString& assetFilename, QString& dccFilename) -{ - IAssetItemDatabase* pCurrentDatabaseInterface = nullptr; - std::vector assetDatabasePlugins; - IEditorClassFactory* pClassFactory = GetIEditor()->GetClassFactory(); - pClassFactory->GetClassesByCategory("Asset Item DB", assetDatabasePlugins); - - for (size_t i = 0; i < assetDatabasePlugins.size(); ++i) - { - if (assetDatabasePlugins[i]->QueryInterface(__uuidof(IAssetItemDatabase), (void**)&pCurrentDatabaseInterface) == S_OK) - { - if (!pCurrentDatabaseInterface) - { - continue; - } - - QString assetDatabaseDccFilename; - IAssetItem* pAssetItem = pCurrentDatabaseInterface->GetAsset(assetFilename.toUtf8().data()); - if (pAssetItem) - { - if ((pAssetItem->GetFlags() & IAssetItem::eFlag_Cached)) - { - QVariant v = pAssetItem->GetAssetFieldValue("dccfilename"); - assetDatabaseDccFilename = v.toString(); - if (!v.isNull()) - { - dccFilename = assetDatabaseDccFilename; - dccFilename = Path::GetRelativePath(dccFilename, false); - - uint32 attr = CFileUtil::GetAttributes(dccFilename.toUtf8().data()); - - if (CFileUtil::FileExists(dccFilename)) - { - return true; - } - else if (GetIEditor()->IsSourceControlAvailable() && (attr & SCC_FILE_ATTRIBUTE_MANAGED)) - { - return CFileUtil::GetLatestFromSourceControl(dccFilename.toUtf8().data()); - } - } - } - } - } - } - return false; -} - -////////////////////////////////////////////////////////////////////////// -bool CFileUtil::ExtractDccFilenameUsingNamingConventions(const QString& assetFilename, QString& dccFilename) -{ - //else to try find it by naming conventions - QString tempStr = assetFilename; - int foundSplit = -1; - if ((foundSplit = tempStr.lastIndexOf('.')) > 0) - { - QString first = tempStr.mid(0, foundSplit); - tempStr = first + ".psd"; - } - if (CFileUtil::FileExists(tempStr)) - { - dccFilename = tempStr; - return true; - } - - //else try to find it by replacing post fix _ with .psd - tempStr = assetFilename; - foundSplit = -1; - if ((foundSplit = tempStr.lastIndexOf('_')) > 0) - { - QString first = tempStr.mid(0, foundSplit); - tempStr = first + ".psd"; - } - if (CFileUtil::FileExists(tempStr)) - { - dccFilename = tempStr; - return true; - } - - return false; -} - ////////////////////////////////////////////////////////////////////////// void CFileUtil::FormatFilterString(QString& filter) { diff --git a/Code/Editor/Util/FileUtil.h b/Code/Editor/Util/FileUtil.h index 5820c32081..a4ff5009a2 100644 --- a/Code/Editor/Util/FileUtil.h +++ b/Code/Editor/Util/FileUtil.h @@ -25,17 +25,9 @@ public: static void ShowInExplorer(const QString& path); - // Try to compile the given lua file: returns true if compilation succeeded, false on failure. - static bool CompileLuaFile(const char* luaFilename); - static bool ExtractFile(QString& file, bool bMsgBoxAskForExtraction = true, const char* pDestinationFilename = nullptr); static void EditTextFile(const char* txtFile, int line = 0, IFileUtil::ETextFileType fileType = IFileUtil::FILE_TYPE_SCRIPT); static void EditTextureFile(const char* txtureFile, bool bUseGameFolder); - static bool EditMayaFile(const char* mayaFile, const bool bExtractFromPak, const bool bUseGameFolder); - static bool EditFile(const char* filePath, const bool bExtrackFromPak, const bool bUseGameFolder); - - //! dcc filename calculation and extraction sub-routines - static bool CalculateDccFilename(const QString& assetFilename, QString& dccFilename); //! Reformat filter string for (MFC) CFileDialog style file filtering static void FormatFilterString(QString& filter); @@ -160,9 +152,6 @@ private: // Keep this variant of this method private! pIsSelected is captured in a lambda, and so requires menu use exec() and never use show() static void PopulateQMenu(QWidget* caller, QMenu* menu, AZStd::string_view fullGamePath, bool* pIsSelected); - - static bool ExtractDccFilenameFromAssetDatabase(const QString& assetFilename, QString& dccFilename); - static bool ExtractDccFilenameUsingNamingConventions(const QString& assetFilename, QString& dccFilename); }; class CAutoRestorePrimaryCDRoot diff --git a/Code/Editor/Util/FileUtil_impl.cpp b/Code/Editor/Util/FileUtil_impl.cpp index 0dd3a0ca87..31e3532f33 100644 --- a/Code/Editor/Util/FileUtil_impl.cpp +++ b/Code/Editor/Util/FileUtil_impl.cpp @@ -20,31 +20,16 @@ void CFileUtil_impl::ShowInExplorer(const QString& path) CFileUtil::ShowInExplorer(path); } -bool CFileUtil_impl::CompileLuaFile(const char* luaFilename) -{ - return CFileUtil::CompileLuaFile(luaFilename); -} - bool CFileUtil_impl::ExtractFile(QString& file, bool bMsgBoxAskForExtraction, const char* pDestinationFilename) { return CFileUtil::ExtractFile(file, bMsgBoxAskForExtraction, pDestinationFilename); } -void CFileUtil_impl::EditTextFile(const char* txtFile, int line, ETextFileType fileType) -{ - CFileUtil::EditTextFile(txtFile, line, fileType); -} - void CFileUtil_impl::EditTextureFile(const char* txtureFile, bool bUseGameFolder) { CFileUtil::EditTextureFile(txtureFile, bUseGameFolder); } -bool CFileUtil_impl::CalculateDccFilename(const QString& assetFilename, QString& dccFilename) -{ - return CFileUtil::CalculateDccFilename(assetFilename, dccFilename); -} - void CFileUtil_impl::FormatFilterString(QString& filter) { CFileUtil::FormatFilterString(filter); diff --git a/Code/Editor/Util/FileUtil_impl.h b/Code/Editor/Util/FileUtil_impl.h index 04d9e829b9..3c8e138dab 100644 --- a/Code/Editor/Util/FileUtil_impl.h +++ b/Code/Editor/Util/FileUtil_impl.h @@ -36,14 +36,9 @@ public: void ShowInExplorer(const QString& path) override; - bool CompileLuaFile(const char* luaFilename) override; bool ExtractFile(QString& file, bool bMsgBoxAskForExtraction = true, const char* pDestinationFilename = nullptr) override; - void EditTextFile(const char* txtFile, int line = 0, ETextFileType fileType = FILE_TYPE_SCRIPT) override; void EditTextureFile(const char* txtureFile, bool bUseGameFolder) override; - //! dcc filename calculation and extraction sub-routines - bool CalculateDccFilename(const QString& assetFilename, QString& dccFilename) override; - //! Reformat filter string for (MFC) CFileDialog style file filtering void FormatFilterString(QString& filter) override; diff --git a/Code/Editor/Util/Image.cpp b/Code/Editor/Util/Image.cpp index 773bfa93d2..8b26f54075 100644 --- a/Code/Editor/Util/Image.cpp +++ b/Code/Editor/Util/Image.cpp @@ -75,17 +75,16 @@ void CImageEx::ReverseUpDown() } uint32* pPixData = GetData(); - uint32* pReversePix = new uint32[GetWidth() * GetHeight()]; - - for (int i = GetHeight() - 1, i2 = 0; i >= 0; i--, i2++) + const int height = GetHeight(); + const int width = GetWidth(); + for (int i = 0; i < height / 2; i++) { - for (int k = 0; k < GetWidth(); k++) + for (int j = 0; j < width; j++) { - pReversePix[i2 * GetWidth() + k] = pPixData[i * GetWidth() + k]; + AZStd::swap(pPixData[i * width + j], pPixData[(height - 1 - i) * width + j]); } } - Attach(pReversePix, GetWidth(), GetHeight()); } void CImageEx::FillAlpha(unsigned char value) diff --git a/Code/Editor/Util/ImageGif.cpp b/Code/Editor/Util/ImageGif.cpp index 67c5911344..336584b959 100644 --- a/Code/Editor/Util/ImageGif.cpp +++ b/Code/Editor/Util/ImageGif.cpp @@ -197,11 +197,9 @@ bool CImageGif::Load(const QString& fileName, CImageEx& outImage) return false; } - int numcols; unsigned char ch, ch1; uint8* ptr1; int i; - short transparency = -1; TImage outImageIndex; @@ -246,7 +244,6 @@ bool CImageGif::Load(const QString& fileName, CImageEx& outImage) HasColormap = ((ch & COLORMAPMASK) ? true : false); BitsPerPixel = (ch & 7) + 1; - numcols = ColorMapSize = 1 << BitsPerPixel; BitMask = ColorMapSize - 1; Background = NEXTBYTE; /* background color... not used. */ @@ -290,10 +287,6 @@ bool CImageGif::Load(const QString& fileName, CImageEx& outImage) { case GRAPHIC_EXT: ch = NEXTBYTE; - if (ptr[0] & 0x1) - { - transparency = ptr[3]; /* transparent color index */ - } ptr += ch; break; case PLAINTEXT_EXT: @@ -317,9 +310,6 @@ bool CImageGif::Load(const QString& fileName, CImageEx& outImage) } } - //if (transparency >= 0) - //mfSet_transparency(transparency); - /* Now read in values from the image descriptor */ ch = NEXTBYTE; diff --git a/Code/Editor/Util/KDTree.cpp b/Code/Editor/Util/KDTree.cpp deleted file mode 100644 index af06a58c9f..0000000000 --- a/Code/Editor/Util/KDTree.cpp +++ /dev/null @@ -1,572 +0,0 @@ -/* - * Copyright (c) Contributors to the Open 3D Engine Project. - * For complete copyright and license terms please see the LICENSE at the root of this distribution. - * - * SPDX-License-Identifier: Apache-2.0 OR MIT - * - */ - -#include "EditorDefs.h" - -#include "KDTree.h" - -#include - -class KDTreeNode -{ -public: - KDTreeNode() - { - pChildren[0] = nullptr; - pChildren[1] = nullptr; - pVertexIndices = nullptr; - } - ~KDTreeNode() - { - if (!IsLeaf()) - { - if (pChildren[0]) - { - delete pChildren[0]; - } - if (pChildren[1]) - { - delete pChildren[1]; - } - } - else if (GetVertexBufferSize() > 1) - { - if (pVertexIndices) - { - delete [] pVertexIndices; - } - } - } - uint32 GetVertexBufferSize() const - { - return nVertexIndexBufferSize; - } - float GetSplitPos() const - { - return splitPos; - } - void SetSplitPos(float pos) - { - splitPos = pos; - } - CKDTree::ESplitAxis GetSplitAxis() const - { - if (splitAxis == 0) - { - return CKDTree::eSA_X; - } - if (splitAxis == 1) - { - return CKDTree::eSA_Y; - } - if (splitAxis == 2) - { - return CKDTree::eSA_Z; - } - return CKDTree::eSA_Invalid; - } - void SetSplitAxis(const CKDTree::ESplitAxis& axis) - { - splitAxis = axis; - } - bool IsLeaf() const - { - return pChildren[0] == nullptr && pChildren[1] == nullptr; - } - KDTreeNode* GetChild(uint32 nIndex) const - { - if (nIndex > 1) - { - return nullptr; - } - return pChildren[nIndex]; - } - void SetChild(uint32 nIndex, KDTreeNode* pNode) - { - if (nIndex > 1) - { - return; - } - if (pChildren[nIndex]) - { - delete pChildren[nIndex]; - } - pChildren[nIndex] = pNode; - } - const AABB& GetBoundBox() - { - return boundbox; - } - void SetBoundBox(const AABB& aabb) - { - boundbox = aabb; - } - void SetVertexIndexBuffer(std::vector& vertexInfos) - { - nVertexIndexBufferSize = (uint32)vertexInfos.size(); - if (nVertexIndexBufferSize == 0) - { - return; - } - if (nVertexIndexBufferSize == 1) - { - oneIndex = vertexInfos[0]; - } - else - { - pVertexIndices = new uint32[nVertexIndexBufferSize]; - memcpy(pVertexIndices, &vertexInfos[0], sizeof(uint32) * nVertexIndexBufferSize); - } - } - uint32 GetVertexIndex(uint32 nIndex) const - { - if (GetVertexBufferSize() == 1) - { - return oneIndex & 0x00FFFFFF; - } - - return pVertexIndices[nIndex] & 0x00FFFFFF; - } - uint32 GetObjIndex(uint32 nIndex) const - { - if (GetVertexBufferSize() == 1) - { - return (oneIndex & 0xFF000000) >> 24; - } - - return (pVertexIndices[nIndex] & 0xFF000000) >> 24; - } - -private: - union - { - float splitPos; // Interior - uint32 oneIndex; // Leaf - uint32* pVertexIndices; // Leaf : high 8bits - object index, low 24bits - vertex index - }; - union - { - uint32 splitAxis; // Interior - uint32 nVertexIndexBufferSize; // Leaf - }; - AABB boundbox; // Both - KDTreeNode* pChildren[2]; // Interior -}; - -CKDTree::ESplitAxis SearchForBestSplitAxis(const AABB& aabb) -{ - float xsize = aabb.max.x - aabb.min.x; - float ysize = aabb.max.y - aabb.min.y; - float zsize = aabb.max.z - aabb.min.z; - - CKDTree::ESplitAxis axis; - if (xsize > ysize && xsize > zsize) - { - axis = CKDTree::eSA_X; - } - else if (ysize > zsize && ysize > xsize) - { - axis = CKDTree::eSA_Y; - } - else - { - axis = CKDTree::eSA_Z; - } - - return axis; -} - -bool SearchForBestSplitPos(CKDTree::ESplitAxis axis, const std::vector& statObjList, std::vector& indices, float& outBestSplitPos) -{ - if (axis != CKDTree::eSA_X && axis != CKDTree::eSA_Y && axis != CKDTree::eSA_Z) - { - return false; - } - - outBestSplitPos = 0; - - int nSizeOfIndices = static_cast(indices.size()); - - for (int i = 0; i < nSizeOfIndices; ++i) - { - int nObjIndex = (indices[i] & 0xFF000000) >> 24; - int nVertexIndex = (indices[i] & 0xFFFFFF); - - const CKDTree::SStatObj* pObj = &statObjList[nObjIndex]; - - const IIndexedMesh* pMesh = pObj->pStatObj->GetIndexedMesh(); - if (pMesh == nullptr) - { - continue; - } - - IIndexedMesh::SMeshDescription meshDesc; - pMesh->GetMeshDescription(meshDesc); - - if (meshDesc.m_pVerts) - { - outBestSplitPos += pObj->tm.TransformPoint(meshDesc.m_pVerts[nVertexIndex])[axis]; - } - else if (meshDesc.m_pVertsF16) - { - outBestSplitPos += pObj->tm.TransformPoint(meshDesc.m_pVertsF16[nVertexIndex].ToVec3())[axis]; - } - } - - outBestSplitPos /= nSizeOfIndices; - - return true; -} - -struct SSplitInfo -{ - AABB aboveBoundbox; - std::vector aboveIndices; - AABB belowBoundbox; - std::vector belowIndices; -}; - -bool SplitNode(const std::vector& statObjList, const AABB& boundbox, const std::vector& indices, CKDTree::ESplitAxis splitAxis, float splitPos, SSplitInfo& outInfo) -{ - if (splitAxis != CKDTree::eSA_X && splitAxis != CKDTree::eSA_Y && splitAxis != CKDTree::eSA_Z) - { - return false; - } - - outInfo.aboveBoundbox = boundbox; - outInfo.belowBoundbox = boundbox; - - outInfo.aboveBoundbox.max[splitAxis] = splitPos; - outInfo.belowBoundbox.min[splitAxis] = splitPos; - - uint32 iIndexSize = (uint32)indices.size(); - outInfo.aboveIndices.reserve(iIndexSize); - outInfo.belowIndices.reserve(iIndexSize); - - for (uint32 i = 0; i < iIndexSize; ++i) - { - int nObjIndex = (indices[i] & 0xFF000000) >> 24; - int nVertexIndex = indices[i] & 0xFFFFFF; - - const CKDTree::SStatObj* pObj = &statObjList[nObjIndex]; - - const IIndexedMesh* pMesh = pObj->pStatObj->GetIndexedMesh(); - if (pMesh == nullptr) - { - return false; - } - - IIndexedMesh::SMeshDescription meshDesc; - pMesh->GetMeshDescription(meshDesc); - - Vec3 vPos; - if (meshDesc.m_pVerts) - { - vPos = pObj->tm.TransformPoint(meshDesc.m_pVerts[nVertexIndex]); - } - else if (meshDesc.m_pVertsF16) - { - vPos = pObj->tm.TransformPoint(meshDesc.m_pVertsF16[nVertexIndex].ToVec3()); - } - else - { - continue; - } - - if (vPos[splitAxis] < splitPos) - { - outInfo.aboveIndices.push_back(indices[i]); - assert(outInfo.aboveBoundbox.IsContainPoint(vPos)); - } - else - { - outInfo.belowIndices.push_back(indices[i]); - assert(outInfo.belowBoundbox.IsContainPoint(vPos)); - } - } - - return true; -} - -CKDTree::CKDTree() -{ - m_pRootNode = nullptr; -} - -CKDTree::~CKDTree() -{ - if (m_pRootNode) - { - delete m_pRootNode; - } -} - -bool CKDTree::Build(IStatObj* pStatObj) -{ - if (pStatObj == nullptr) - { - return false; - } - - m_StatObjectList.clear(); - - if (pStatObj->GetIndexedMesh(true)) - { - SStatObj rootObj; - rootObj.tm.SetIdentity(); - rootObj.pStatObj = pStatObj; - m_StatObjectList.push_back(rootObj); - } - - ConstructStatObjList(pStatObj, Matrix34::CreateIdentity()); - - AABB entireBoundBox; - entireBoundBox.Reset(); - - std::vector indices; - for (int i = 0, iStatObjSize = static_cast(m_StatObjectList.size()); i < iStatObjSize; ++i) - { - IIndexedMesh* pMesh = m_StatObjectList[i].pStatObj->GetIndexedMesh(true); - if (pMesh == nullptr) - { - continue; - } - - IIndexedMesh::SMeshDescription meshDesc; - pMesh->GetMeshDescription(meshDesc); - - for (int k = 0; k < meshDesc.m_nVertCount; ++k) - { - entireBoundBox.Add(m_StatObjectList[i].tm.TransformPoint(meshDesc.m_pVerts[k])); - indices.push_back((i << 24) | k); - } - } - - if (m_pRootNode) - { - delete m_pRootNode; - } - - m_pRootNode = new KDTreeNode; - BuildRecursively(m_pRootNode, entireBoundBox, indices); - - return true; -} - -void CKDTree::BuildRecursively(KDTreeNode* pNode, const AABB& boundbox, std::vector& indices) const -{ - pNode->SetBoundBox(boundbox); - - if (indices.size() <= s_MinimumVertexSizeInLeafNode) - { - pNode->SetVertexIndexBuffer(indices); - return; - } - - ESplitAxis splitAxis = SearchForBestSplitAxis(boundbox); - float splitPos(0); - SearchForBestSplitPos(splitAxis, m_StatObjectList, indices, splitPos); - pNode->SetSplitAxis(splitAxis); - pNode->SetSplitPos(splitPos); - - SSplitInfo splitInfo; - if (!SplitNode(m_StatObjectList, boundbox, indices, splitAxis, splitPos, splitInfo)) - { - return; - } - - if (splitInfo.aboveIndices.empty() || splitInfo.belowIndices.empty()) - { - pNode->SetVertexIndexBuffer(indices); - return; - } - - KDTreeNode* pChild0 = new KDTreeNode; - KDTreeNode* pChild1 = new KDTreeNode; - - pNode->SetChild(0, pChild0); - pNode->SetChild(1, pChild1); - - BuildRecursively(pChild0, splitInfo.aboveBoundbox, splitInfo.aboveIndices); - BuildRecursively(pChild1, splitInfo.belowBoundbox, splitInfo.belowIndices); -} - -void CKDTree::ConstructStatObjList(IStatObj* pStatObj, const Matrix34& matParent) -{ - if (pStatObj == nullptr) - { - return; - } - for (int i = 0, nChildObjSize(pStatObj->GetSubObjectCount()); i < nChildObjSize; ++i) - { - IStatObj::SSubObject* pSubObj = pStatObj->GetSubObject(i); - SStatObj s; - s.tm = matParent * pSubObj->localTM; - if (pSubObj->pStatObj && pSubObj->pStatObj->GetIndexedMesh(true)) - { - s.pStatObj = pSubObj->pStatObj; - m_StatObjectList.push_back(s); - } - ConstructStatObjList(pSubObj->pStatObj, s.tm); - } -} - -bool CKDTree::FindNearestVertex(const Vec3& raySrc, const Vec3& rayDir, float vVertexBoxSize, const Vec3& localCameraPos, Vec3& outPos, Vec3& vOutHitPosOnCube) const -{ - return FindNearestVertexRecursively(m_pRootNode, raySrc, rayDir, vVertexBoxSize, localCameraPos, outPos, vOutHitPosOnCube); -} - -AABB GetNodeBoundBox(KDTreeNode* pNode, float vVertexBoxSize, const Vec3& localCameraPos) -{ - AABB nodeAABB = pNode->GetBoundBox(); - float fScreenFactorMin = localCameraPos.GetDistance(nodeAABB.min); - Vec3 vBoundBoxMin(fScreenFactorMin * vVertexBoxSize, fScreenFactorMin * vVertexBoxSize, fScreenFactorMin * vVertexBoxSize); - float fScreenFactorMax = localCameraPos.GetDistance(nodeAABB.max); - Vec3 vBoundBoxMax(fScreenFactorMax * vVertexBoxSize, fScreenFactorMax * vVertexBoxSize, fScreenFactorMax * vVertexBoxSize); - nodeAABB.min -= vBoundBoxMin; - nodeAABB.max += vBoundBoxMax; - return nodeAABB; -} - -bool CKDTree::FindNearestVertexRecursively(KDTreeNode* pNode, const Vec3& raySrc, const Vec3& rayDir, float vVertexBoxSize, const Vec3& localCameraPos, Vec3& outPos, Vec3& vOutHitPosOnCube) const -{ - if (!pNode) - { - return false; - } - - Vec3 vHitPos; - AABB nodeAABB = GetNodeBoundBox(pNode, vVertexBoxSize, localCameraPos); - if (!pNode->GetBoundBox().IsContainPoint(raySrc) && !Intersect::Ray_AABB(raySrc, rayDir, nodeAABB, vHitPos)) - { - return false; - } - - if (pNode->IsLeaf()) - { - if (m_StatObjectList.empty()) - { - return false; - } - - uint32 nVBuffSize = pNode->GetVertexBufferSize(); - if (nVBuffSize == 0) - { - return false; - } - - float fNearestDist = 3e10f; - - for (uint32 i = 0; i < nVBuffSize; ++i) - { - uint32 nVertexIndex = pNode->GetVertexIndex(i); - uint32 nObjIndex = pNode->GetObjIndex(i); - - assert(nObjIndex < m_StatObjectList.size()); - - const SStatObj* pStatObjInfo = &(m_StatObjectList[nObjIndex]); - - IIndexedMesh* pMesh = m_StatObjectList[nObjIndex].pStatObj->GetIndexedMesh(); - if (pMesh == nullptr) - { - continue; - } - - IIndexedMesh::SMeshDescription meshDesc; - pMesh->GetMeshDescription(meshDesc); - - Vec3 vCandidatePos(0, 0, 0); - if (meshDesc.m_pVerts) - { - vCandidatePos = pStatObjInfo->tm.TransformPoint(meshDesc.m_pVerts[nVertexIndex]); - } - else if (meshDesc.m_pVertsF16) - { - vCandidatePos = pStatObjInfo->tm.TransformPoint(meshDesc.m_pVertsF16[nVertexIndex].ToVec3()); - } - else - { - continue; - } - - float fScreenFactor = localCameraPos.GetDistance(vCandidatePos); - Vec3 vBoundBox(fScreenFactor * vVertexBoxSize, fScreenFactor * vVertexBoxSize, fScreenFactor * vVertexBoxSize); - - Vec3 vHitPosOnCube; - if (Intersect::Ray_AABB(raySrc, rayDir, AABB(vCandidatePos - vBoundBox, vCandidatePos + vBoundBox), vHitPosOnCube)) - { - float fDist = vHitPosOnCube.GetDistance(raySrc); - if (fDist < fNearestDist) - { - fNearestDist = fDist; - outPos = vCandidatePos; - vOutHitPosOnCube = vHitPosOnCube; - } - } - } - - if (fNearestDist < 3e10f) - { - return true; - } - - return false; - } - - Vec3 vNearestPos0, vNearestPos0OnCube; - Vec3 vNearestPos1, vNearestPos1OnCube; - bool bFoundChild0 = FindNearestVertexRecursively(pNode->GetChild(0), raySrc, rayDir, vVertexBoxSize, localCameraPos, vNearestPos0, vNearestPos0OnCube); - bool bFoundChild1 = FindNearestVertexRecursively(pNode->GetChild(1), raySrc, rayDir, vVertexBoxSize, localCameraPos, vNearestPos1, vNearestPos1OnCube); - - if (bFoundChild0 && bFoundChild1) - { - float fDist0 = raySrc.GetDistance(vNearestPos0OnCube); - float fDist1 = raySrc.GetDistance(vNearestPos1OnCube); - if (fDist0 < fDist1) - { - outPos = vNearestPos0; - vOutHitPosOnCube = vNearestPos0OnCube; - } - else - { - outPos = vNearestPos1; - vOutHitPosOnCube = vNearestPos1OnCube; - } - } - else if (bFoundChild0 && !bFoundChild1) - { - outPos = vNearestPos0; - vOutHitPosOnCube = vNearestPos0OnCube; - } - else if (!bFoundChild0 && bFoundChild1) - { - outPos = vNearestPos1; - vOutHitPosOnCube = vNearestPos1OnCube; - } - - return bFoundChild0 || bFoundChild1; -} - -void CKDTree::GetPenetratedBoxes(const Vec3& raySrc, const Vec3& rayDir, std::vector& outBoxes) -{ - GetPenetratedBoxesRecursively(m_pRootNode, raySrc, rayDir, outBoxes); -} - -void CKDTree::GetPenetratedBoxesRecursively(KDTreeNode* pNode, const Vec3& raySrc, const Vec3& rayDir, std::vector& outBoxes) -{ - Vec3 vHitPos; - if (!pNode || (!pNode->GetBoundBox().IsContainPoint(raySrc) && !Intersect::Ray_AABB(raySrc, rayDir, pNode->GetBoundBox(), vHitPos))) - { - return; - } - - outBoxes.push_back(pNode->GetBoundBox()); - - GetPenetratedBoxesRecursively(pNode->GetChild(0), raySrc, rayDir, outBoxes); - GetPenetratedBoxesRecursively(pNode->GetChild(1), raySrc, rayDir, outBoxes); -} diff --git a/Code/Editor/Util/KDTree.h b/Code/Editor/Util/KDTree.h deleted file mode 100644 index df25a9ded7..0000000000 --- a/Code/Editor/Util/KDTree.h +++ /dev/null @@ -1,57 +0,0 @@ -/* - * Copyright (c) Contributors to the Open 3D Engine Project. - * For complete copyright and license terms please see the LICENSE at the root of this distribution. - * - * SPDX-License-Identifier: Apache-2.0 OR MIT - * - */ - - -#ifndef CRYINCLUDE_EDITOR_UTIL_KDTREE_H -#define CRYINCLUDE_EDITOR_UTIL_KDTREE_H -#pragma once - -struct IStatObj; - -class KDTreeNode; - -class CKDTree -{ -public: - - CKDTree(); - ~CKDTree(); - - bool Build(IStatObj* pStatObj); - bool FindNearestVertex(const Vec3& raySrc, const Vec3& rayDir, float vVertexBoxSize, const Vec3& localCameraPos, Vec3& outPos, Vec3& vOutHitPosOnCube) const; - void GetPenetratedBoxes(const Vec3& raySrc, const Vec3& rayDir, std::vector& outBoxes); - - enum ESplitAxis - { - eSA_X = 0, - eSA_Y, - eSA_Z, - eSA_Invalid - }; - - struct SStatObj - { - Matrix34 tm; - IStatObj* pStatObj; - }; - -private: - - void BuildRecursively(KDTreeNode* pNode, const AABB& boundbox, std::vector& indices) const; - bool FindNearestVertexRecursively(KDTreeNode* pNode, const Vec3& raySrc, const Vec3& rayDir, float vVertexBoxSize, const Vec3& localCameraPos, Vec3& outPos, Vec3& vOutHitPosOnCube) const; - void GetPenetratedBoxesRecursively(KDTreeNode* pNode, const Vec3& raySrc, const Vec3& rayDir, std::vector& outBoxes); - void ConstructStatObjList(IStatObj* pStatObj, const Matrix34& matParent); - - static const int s_MinimumVertexSizeInLeafNode = 4; - -private: - - KDTreeNode* m_pRootNode; - std::vector m_StatObjectList; -}; -#endif // CRYINCLUDE_EDITOR_UTIL_KDTREE_H diff --git a/Code/Editor/Util/PathUtil.cpp b/Code/Editor/Util/PathUtil.cpp index ca3481ddae..8b745ee1bc 100644 --- a/Code/Editor/Util/PathUtil.cpp +++ b/Code/Editor/Util/PathUtil.cpp @@ -14,7 +14,6 @@ #include #include #include // for ebus events -#include #include #include @@ -175,9 +174,8 @@ namespace Path ////////////////////////////////////////////////////////////////////////// QString GetEngineRootPath() { - const char* engineRoot; - EBUS_EVENT_RESULT(engineRoot, AzFramework::ApplicationRequests::Bus, GetEngineRoot); - return QString(engineRoot); + const AZ::IO::FixedMaxPathString engineRoot = AZ::Utils::GetEnginePath(); + return QString::fromUtf8(engineRoot.c_str(), static_cast(engineRoot.size())); } ////////////////////////////////////////////////////////////////////////// diff --git a/Code/Editor/Util/XmlArchive.cpp b/Code/Editor/Util/XmlArchive.cpp index 3a965fb239..72999efdf4 100644 --- a/Code/Editor/Util/XmlArchive.cpp +++ b/Code/Editor/Util/XmlArchive.cpp @@ -16,102 +16,6 @@ ////////////////////////////////////////////////////////////////////////// // CXmlArchive -bool CXmlArchive::Load(const QString& file) -{ - bLoading = true; - - char filename[AZ_MAX_PATH_LEN] = { 0 }; - AZ::IO::FileIOBase::GetInstance()->ResolvePath(file.toUtf8().data(), filename, AZ_MAX_PATH_LEN); - - QFile cFile(filename); - if (!cFile.open(QFile::ReadOnly)) - { - CLogFile::FormatLine("Warning: Loading of %s failed", filename); - return false; - } - CArchive ar(&cFile, CArchive::load); - - QString str; - ar >> str; - - root = XmlHelpers::LoadXmlFromBuffer(str.toUtf8().data(), str.toUtf8().length()); - if (!root) - { - // If we didn't extract valid XML, attempt to check the header to see if we're dealing with an improperly serialized archive - // When deserializing QStrings, we use readStringLength in EditorUtils, which mimics MFC's decoding. - // In this encoding, the length is first read as an unsigned 8-bit value, if that is 0xFF then the next two bytes are read - // If the 16 bit uint is 0xFFFF, then the next four bytes are read, etc. up to a final 64 bit value. - - // In 1.09, there was a bug in which we'd serialize out the 32-bit length improperly like so: - // 0xFF 0xFF 0x00 <4 byte proper length> - - // Note that the header could also historically start with 0xFF 0xFF 0xFE to indicate wide strings prior to the length data - // but we don't have to deal with that here as the broken version of the code never prepended this - cFile.seek(0); - quint8 len8; - ar >> len8; - - quint16 len16; - ar >> len16; - - // Possible bad header, attempt to read 32 bit length. - if (len8 == 0xff && len16 == 0xff) - { - // This version of operator<< only serialized out UTF8 strings up to 32 bits of length, no need to 64-bit check or do wchar. - quint32 len32; - ar >> len32; - - str = QString::fromUtf8(cFile.read(len32)); - root = XmlHelpers::LoadXmlFromBuffer(str.toUtf8().data(), str.toUtf8().length()); - } - - if (!root) - { - CLogFile::FormatLine("Warning: Loading of %s failed", filename); - return false; - } - } - - const bool loaded = pNamedData->Serialize(ar); - if (!loaded) - { - CLogFile::FormatLine("Error: Can't load xml file: '%s'! File corrupted. Binary file possibly was corrupted by Source Control if it was marked like text format.", filename); - return false; - } - - return true; -} - -////////////////////////////////////////////////////////////////////////// -void CXmlArchive::Save(const QString& file) -{ - char filename[AZ_MAX_PATH_LEN] = { 0 }; - AZ::IO::FileIOBase::GetInstance()->ResolvePath(file.toUtf8().data(), filename, AZ_MAX_PATH_LEN); - - bLoading = false; - if (!root) - { - return; - } - - QFile cFile(filename); - // Open the file for writing, create it if needed - if (!cFile.open(QFile::WriteOnly)) - { - CLogFile::FormatLine("Warning: Saving of %s failed", filename); - return; - } - // Create the archive object - CArchive ar(&cFile, CArchive::store); - - _smart_ptr pXmlStrData = root->getXMLData(5000000); - - // Need convert to QString for CArchive::operator<< - QString str = pXmlStrData->GetString(); - ar << str; - - pNamedData->Serialize(ar); -} ////////////////////////////////////////////////////////////////////////// bool CXmlArchive::SaveToPak([[maybe_unused]] const QString& levelPath, CPakFile& pakFile) diff --git a/Code/Editor/Util/XmlArchive.h b/Code/Editor/Util/XmlArchive.h index 3d45a7a2e6..e7de4c5be8 100644 --- a/Code/Editor/Util/XmlArchive.h +++ b/Code/Editor/Util/XmlArchive.h @@ -60,9 +60,6 @@ public: return *this; } - bool Load(const QString& file); - void Save(const QString& file); - //! Save XML Archive to pak file. //! @return true if saved. bool SaveToPak(const QString& levelPath, CPakFile& pakFile); diff --git a/Code/Editor/Viewport.cpp b/Code/Editor/Viewport.cpp index c8f2e268d9..dcf86abb02 100644 --- a/Code/Editor/Viewport.cpp +++ b/Code/Editor/Viewport.cpp @@ -17,22 +17,22 @@ // AzQtComponents #include +// AzToolsFramework #include -#include #include +#include // Editor +#include "Editor/Plugins/ComponentEntityEditorPlugin/SandboxIntegration.h" #include "ViewManager.h" #include "Include/ITransformManipulator.h" #include "Include/HitContext.h" #include "Objects/ObjectManager.h" #include "Util/3DConnexionDriver.h" #include "PluginManager.h" -#include "Include/IRenderListener.h" #include "GameEngine.h" #include "Settings.h" - #ifdef LoadCursor #undef LoadCursor #endif @@ -41,13 +41,14 @@ // Viewport drag and drop support ////////////////////////////////////////////////////////////////////// -void QtViewport::BuildDragDropContext(AzQtComponents::ViewportDragContext& context, const QPoint& pt) +void QtViewport::BuildDragDropContext( + AzQtComponents::ViewportDragContext& context, const AzFramework::ViewportId viewportId, const QPoint& point) { - context.m_hitLocation = AZ::Vector3::CreateZero(); - context.m_hitLocation = GetHitLocation(pt); + context.m_hitLocation = AzToolsFramework::FindClosestPickIntersection( + viewportId, AzToolsFramework::ViewportInteraction::ScreenPointFromQPoint(point), AzToolsFramework::EditorPickRayLength, + AzToolsFramework::GetDefaultEntityPlacementDistance()); } - void QtViewport::dragEnterEvent(QDragEnterEvent* event) { if (!GetIEditor()->GetGameEngine()->IsLevelLoaded()) @@ -66,7 +67,7 @@ void QtViewport::dragEnterEvent(QDragEnterEvent* event) // new bus-based way of doing it (install a listener!) using namespace AzQtComponents; ViewportDragContext context; - BuildDragDropContext(context, event->pos()); + BuildDragDropContext(context, GetViewportId(), event->pos()); DragAndDropEventsBus::Event(DragAndDropContexts::EditorViewport, &DragAndDropEvents::DragEnter, event, context); } } @@ -89,7 +90,7 @@ void QtViewport::dragMoveEvent(QDragMoveEvent* event) // new bus-based way of doing it (install a listener!) using namespace AzQtComponents; ViewportDragContext context; - BuildDragDropContext(context, event->pos()); + BuildDragDropContext(context, GetViewportId(), event->pos()); DragAndDropEventsBus::Event(DragAndDropContexts::EditorViewport, &DragAndDropEvents::DragMove, event, context); } } @@ -112,7 +113,7 @@ void QtViewport::dropEvent(QDropEvent* event) { // new bus-based way of doing it (install a listener!) ViewportDragContext context; - BuildDragDropContext(context, event->pos()); + BuildDragDropContext(context, GetViewportId(), event->pos()); DragAndDropEventsBus::Event(DragAndDropContexts::EditorViewport, &DragAndDropEvents::Drop, event, context); } } @@ -225,61 +226,6 @@ void QtViewport::GetDimensions(int* pWidth, int* pHeight) const } } -////////////////////////////////////////////////////////////////////////// -void QtViewport::RegisterRenderListener(IRenderListener* piListener) -{ -#ifdef _DEBUG - size_t nCount(0); - size_t nTotal(0); - - nTotal = m_cRenderListeners.size(); - for (nCount = 0; nCount < nTotal; ++nCount) - { - if (m_cRenderListeners[nCount] == piListener) - { - assert(!"Registered the same RenderListener multiple times."); - break; - } - } -#endif //_DEBUG - m_cRenderListeners.push_back(piListener); -} - -////////////////////////////////////////////////////////////////////////// -bool QtViewport::UnregisterRenderListener(IRenderListener* piListener) -{ - size_t nCount(0); - size_t nTotal(0); - - nTotal = m_cRenderListeners.size(); - for (nCount = 0; nCount < nTotal; ++nCount) - { - if (m_cRenderListeners[nCount] == piListener) - { - m_cRenderListeners.erase(m_cRenderListeners.begin() + nCount); - return true; - } - } - return false; -} - -////////////////////////////////////////////////////////////////////////// -bool QtViewport::IsRenderListenerRegistered(IRenderListener* piListener) -{ - size_t nCount(0); - size_t nTotal(0); - - nTotal = m_cRenderListeners.size(); - for (nCount = 0; nCount < nTotal; ++nCount) - { - if (m_cRenderListeners[nCount] == piListener) - { - return true; - } - } - return false; -} - ////////////////////////////////////////////////////////////////////////// void QtViewport::AddPostRenderer(IPostRenderer* pPostRenderer) { @@ -340,13 +286,6 @@ void QtViewport::resizeEvent(QResizeEvent* event) Update(); } -////////////////////////////////////////////////////////////////////////// -void QtViewport::leaveEvent(QEvent* event) -{ - QWidget::leaveEvent(event); - MouseCallback(eMouseLeave, QPoint(), Qt::KeyboardModifiers(), Qt::MouseButtons()); -} - ////////////////////////////////////////////////////////////////////////// void QtViewport::paintEvent([[maybe_unused]] QPaintEvent* event) { @@ -581,63 +520,7 @@ void QtViewport::keyReleaseEvent(QKeyEvent* event) OnKeyUp(nativeKey, 1, event->nativeModifiers()); } -////////////////////////////////////////////////////////////////////////// -void QtViewport::OnLButtonDown(Qt::KeyboardModifiers modifiers, const QPoint& point) -{ - // Save the mouse down position - m_cMouseDownPos = point; - if (MouseCallback(eMouseLDown, point, modifiers)) - { - return; - } -} - -////////////////////////////////////////////////////////////////////////// -void QtViewport::OnLButtonUp(Qt::KeyboardModifiers modifiers, const QPoint& point) -{ - // Check Edit Tool. - MouseCallback(eMouseLUp, point, modifiers); -} -////////////////////////////////////////////////////////////////////////// -void QtViewport::OnRButtonDown(Qt::KeyboardModifiers modifiers, const QPoint& point) -{ - MouseCallback(eMouseRDown, point, modifiers); -} - -////////////////////////////////////////////////////////////////////////// -void QtViewport::OnRButtonUp(Qt::KeyboardModifiers modifiers, const QPoint& point) -{ - MouseCallback(eMouseRUp, point, modifiers); -} - -////////////////////////////////////////////////////////////////////////// -void QtViewport::OnMButtonDown(Qt::KeyboardModifiers modifiers, const QPoint& point) -{ - // Check Edit Tool. - MouseCallback(eMouseMDown, point, modifiers); -} - -////////////////////////////////////////////////////////////////////////// -void QtViewport::OnMButtonUp(Qt::KeyboardModifiers modifiers, const QPoint& point) -{ - // Move the viewer to the mouse location. - // Check Edit Tool. - MouseCallback(eMouseMUp, point, modifiers); -} - -////////////////////////////////////////////////////////////////////////// -void QtViewport::OnMButtonDblClk(Qt::KeyboardModifiers modifiers, const QPoint& point) -{ - MouseCallback(eMouseMDblClick, point, modifiers); -} - - -////////////////////////////////////////////////////////////////////////// -void QtViewport::OnMouseMove(Qt::KeyboardModifiers modifiers, Qt::MouseButtons buttons, const QPoint& point) -{ - MouseCallback(eMouseMove, point, modifiers, buttons); -} ////////////////////////////////////////////////////////////////////////// void QtViewport::OnSetCursor() @@ -696,44 +579,6 @@ void QtViewport::OnDragSelectRectangle(const QRect& rect, bool bNormalizeRect) GetIEditor()->SetStatusText(szNewStatusText); } -////////////////////////////////////////////////////////////////////////// -void QtViewport::OnLButtonDblClk(Qt::KeyboardModifiers modifiers, const QPoint& point) -{ - if (GetIEditor()->IsInGameMode()) - { - // Ignore double clicks while in game. - return; - } - - MouseCallback(eMouseLDblClick, point, modifiers); -} - -////////////////////////////////////////////////////////////////////////// -void QtViewport::OnRButtonDblClk(Qt::KeyboardModifiers modifiers, const QPoint& point) -{ - MouseCallback(eMouseRDblClick, point, modifiers); -} - -////////////////////////////////////////////////////////////////////////// -void QtViewport::OnKeyDown([[maybe_unused]] UINT nChar, [[maybe_unused]] UINT nRepCnt, [[maybe_unused]] UINT nFlags) -{ - if (GetIEditor()->IsInGameMode()) - { - // Ignore key downs while in game. - return; - } -} - -////////////////////////////////////////////////////////////////////////// -void QtViewport::OnKeyUp([[maybe_unused]] UINT nChar, [[maybe_unused]] UINT nRepCnt, [[maybe_unused]] UINT nFlags) -{ - if (GetIEditor()->IsInGameMode()) - { - // Ignore key downs while in game. - return; - } -} - ////////////////////////////////////////////////////////////////////////// void QtViewport::SetCurrentCursor(const QCursor& hCursor, const QString& cursorString) { @@ -1119,29 +964,6 @@ bool QtViewport::HitTest(const QPoint& point, HitContext& hitInfo) return false; } -AZ::Vector3 QtViewport::GetHitLocation(const QPoint& point) -{ - Vec3 pos = Vec3(ZERO); - HitContext hit; - if (HitTest(point, hit)) - { - pos = hit.raySrc + hit.rayDir * hit.dist; - pos = SnapToGrid(pos); - } - else - { - bool hitTerrain; - pos = ViewToWorld(point, &hitTerrain); - if (hitTerrain) - { - pos.z = GetIEditor()->GetTerrainElevation(pos.x, pos.y); - } - pos = SnapToGrid(pos); - } - - return AZ::Vector3(pos.x, pos.y, pos.z); -} - ////////////////////////////////////////////////////////////////////////// void QtViewport::SetZoomFactor(float fZoomFactor) { @@ -1168,11 +990,6 @@ Vec3 QtViewport::SnapToGrid(const Vec3& vec) return vec; } -float QtViewport::GetGridStep() const -{ - return 0.0f; -} - ////////////////////////////////////////////////////////////////////////// void QtViewport::BeginUndo() { @@ -1227,30 +1044,6 @@ bool QtViewport::IsBoundsVisible([[maybe_unused]] const AABB& box) const return true; } -////////////////////////////////////////////////////////////////////////// -bool QtViewport::HitTestLine(const Vec3& lineP1, const Vec3& lineP2, const QPoint& hitpoint, int pixelRadius, float* pToCameraDistance) const -{ - float dist = GetDistanceToLine(lineP1, lineP2, hitpoint); - if (dist <= pixelRadius) - { - if (pToCameraDistance) - { - Vec3 raySrc, rayDir; - ViewToWorldRay(hitpoint, raySrc, rayDir); - Vec3 rayTrg = raySrc + rayDir * 10000.0f; - - Vec3 pa, pb; - float mua, mub; - LineLineIntersect(lineP1, lineP2, raySrc, rayTrg, pa, pb, mua, mub); - *pToCameraDistance = mub; - } - - return true; - } - - return false; -} - ////////////////////////////////////////////////////////////////////////// float QtViewport::GetDistanceToLine(const Vec3& lineP1, const Vec3& lineP2, const QPoint& point) const { @@ -1315,98 +1108,71 @@ bool QtViewport::GetAdvancedSelectModeFlag() return m_bAdvancedSelectMode; } -////////////////////////////////////////////////////////////////////////// -bool QtViewport::MouseCallback(EMouseEvent event, const QPoint& point, Qt::KeyboardModifiers modifiers, Qt::MouseButtons buttons) -{ - AZ_PROFILE_FUNCTION(Editor); - - // Ignore any mouse events in game mode. - if (GetIEditor()->IsInGameMode()) - { - return true; - } - - // We must ignore mouse events when we are in the middle of an assert. - // Reason: If we have an assert called from an engine module under the editor, if we call this function, - // it may call the engine again and cause a deadlock. - // Concrete example: CryPhysics called from Trackview causing an assert, and moving the cursor over the viewport - // would cause the editor to freeze as it calls CryPhysics again for a raycast while it didn't release the lock. - if (gEnv->pSystem->IsAssertDialogVisible()) - { - return true; - } - - ////////////////////////////////////////////////////////////////////////// - // Hit test gizmo objects. - ////////////////////////////////////////////////////////////////////////// - bool bAltClick = (modifiers & Qt::AltModifier); - bool bCtrlClick = (modifiers & Qt::ControlModifier); - bool bShiftClick = (modifiers & Qt::ShiftModifier); - - int flags = (bCtrlClick ? MK_CONTROL : 0) | - (bShiftClick ? MK_SHIFT : 0) | - ((buttons& Qt::LeftButton) ? MK_LBUTTON : 0) | - ((buttons& Qt::MiddleButton) ? MK_MBUTTON : 0) | - ((buttons& Qt::RightButton) ? MK_RBUTTON : 0); - - switch (event) - { - case eMouseMove: - - if (m_nLastUpdateFrame == m_nLastMouseMoveFrame) - { - // If mouse move event generated in the same frame, ignore it. - return false; - } - m_nLastMouseMoveFrame = m_nLastUpdateFrame; - - // Skip the marker position update if anything is selected, since it is only used - // by the info bar which doesn't show the marker when there is an active selection. - // This helps a performance issue when calling ViewToWorld (which calls RayWorldIntersection) - // on every mouse movement becomes very expensive in scenes with large amounts of entities. - CSelectionGroup* selection = GetIEditor()->GetSelection(); - if (!(buttons & Qt::RightButton) /* && m_nLastUpdateFrame != m_nLastMouseMoveFrame*/ && (selection && selection->IsEmpty())) - { - //m_nLastMouseMoveFrame = m_nLastUpdateFrame; - Vec3 pos = ViewToWorld(point); - GetIEditor()->SetMarkerPosition(pos); - } - break; - } - - QPoint tempPoint(point.x(), point.y()); - - ////////////////////////////////////////////////////////////////////////// - // Handle viewport manipulators. - ////////////////////////////////////////////////////////////////////////// - if (!bAltClick) - { - ITransformManipulator* pManipulator = GetIEditor()->GetTransformManipulator(); - if (pManipulator) - { - if (pManipulator->MouseCallback(this, event, tempPoint, flags)) - { - return true; - } - } - } - - return false; -} -////////////////////////////////////////////////////////////////////////// -void QtViewport::ProcessRenderLisneters(DisplayContext& rstDisplayContext) -{ - size_t nCount(0); - size_t nTotal(0); - - nTotal = m_cRenderListeners.size(); - for (nCount = 0; nCount < nTotal; ++nCount) - { - m_cRenderListeners[nCount]->Render(rstDisplayContext); - } -} ////////////////////////////////////////////////////////////////////////// #if defined(AZ_PLATFORM_WINDOWS) +// Note: Both CreateAnglesYPR and CreateOrientationYPR were copied verbatim from Cry_Camera.h which has been removed. +// +// Description +//

+//   x-YAW
+//   y-PITCH (negative=looking down / positive=looking up)
+//   z-ROLL
+//   
+// Note: If we are looking along the z-axis, its not possible to specify the x and z-angle +inline Ang3 CreateAnglesYPR(const Matrix33& m) +{ + assert(m.IsOrthonormal()); + float l = Vec3(m.m01, m.m11, 0.0f).GetLength(); + if (l > 0.0001) + { + return Ang3(atan2f(-m.m01 / l, m.m11 / l), atan2f(m.m21, l), atan2f(-m.m20 / l, m.m22 / l)); + } + else + { + return Ang3(0, atan2f(m.m21, l), 0); + } +} + +// Description +// This function builds a 3x3 orientation matrix using YPR-angles +// Rotation order for the orientation-matrix is Z-X-Y. (Zaxis=YAW / Xaxis=PITCH / Yaxis=ROLL) +// +//
+//  COORDINATE-SYSTEM
+//
+//  z-axis
+//    ^
+//    |
+//    |  y-axis
+//    |  /
+//    | /
+//    |/
+//    +--------------->   x-axis
+// 
+// +// Example: +// Matrix33 orientation=CreateOrientationYPR( Ang3(1,2,3) ); +inline Matrix33 CreateOrientationYPR(const Ang3& ypr) +{ + f32 sz, cz; + sincos_tpl(ypr.x, &sz, &cz); //Zaxis = YAW + f32 sx, cx; + sincos_tpl(ypr.y, &sx, &cx); //Xaxis = PITCH + f32 sy, cy; + sincos_tpl(ypr.z, &sy, &cy); //Yaxis = ROLL + Matrix33 c; + c.m00 = cy * cz - sy * sz * sx; + c.m01 = -sz * cx; + c.m02 = sy * cz + cy * sz * sx; + c.m10 = cy * sz + sy * sx * cz; + c.m11 = cz * cx; + c.m12 = sy * sz - cy * sx * cz; + c.m20 = -sy * cx; + c.m21 = sx; + c.m22 = cy * cx; + return c; +} + void QtViewport::OnRawInput([[maybe_unused]] UINT wParam, HRAWINPUT lParam) { static C3DConnexionDriver* p3DConnexionDriver = 0; @@ -1450,12 +1216,12 @@ void QtViewport::OnRawInput([[maybe_unused]] UINT wParam, HRAWINPUT lParam) t *= sys_scale3DMouseTranslation->GetFVal(); float as = 0.001f * gSettings.cameraMoveSpeed; - Ang3 ypr = CCamera::CreateAnglesYPR(Matrix33(viewTM)); + Ang3 ypr = CreateAnglesYPR(Matrix33(viewTM)); ypr.x += -all6DOFs[5] * as * fScaleYPR; ypr.y = AZStd::clamp(ypr.y + all6DOFs[3] * as * fScaleYPR, -1.5f, 1.5f); // to keep rotation in reasonable range ypr.z = 0; // to have camera always upward - viewTM = Matrix34(CCamera::CreateOrientationYPR(ypr), viewTM.GetTranslation()); + viewTM = Matrix34(CreateOrientationYPR(ypr), viewTM.GetTranslation()); viewTM = viewTM * Matrix34::CreateTranslationMat(t); SetViewTM(viewTM); @@ -1470,6 +1236,7 @@ float QtViewport::GetFOV() const { return gSettings.viewports.fDefaultFov; } + ////////////////////////////////////////////////////////////////////////// void QtViewport::setRay(QPoint& vp, Vec3& raySrc, Vec3& rayDir) { @@ -1477,12 +1244,5 @@ void QtViewport::setRay(QPoint& vp, Vec3& raySrc, Vec3& rayDir) m_raySrc = raySrc; m_rayDir = rayDir; } -//////////////////////////////////////////////////////////////////////// -void QtViewport::setHitcontext(QPoint& vp, Vec3& raySrc, Vec3& rayDir) -{ - vp = m_vp; - raySrc = m_raySrc; - rayDir = m_rayDir; -} #include diff --git a/Code/Editor/Viewport.h b/Code/Editor/Viewport.h index 7f8ccc4c4f..d992eb4cb0 100644 --- a/Code/Editor/Viewport.h +++ b/Code/Editor/Viewport.h @@ -6,13 +6,12 @@ * */ - // Description : interface for the CViewport class. - #pragma once #if !defined(Q_MOC_RUN) +#include #include #include #include @@ -44,10 +43,8 @@ class CLayoutViewPane; class CViewManager; class CBaseObjectsCache; struct HitContext; -struct IRenderListener; class CImageEx; class QMenu; -struct IDataBaseItem; /** Type of viewport. */ @@ -106,10 +103,6 @@ public: //! Access to view manager. CViewManager* GetViewManager() const { return m_viewManager; }; - virtual void RegisterRenderListener(IRenderListener* piListener) = 0; - virtual bool UnregisterRenderListener(IRenderListener* piListener) = 0; - virtual bool IsRenderListenerRegistered(IRenderListener* piListener) = 0; - virtual void AddPostRenderer(IPostRenderer* pPostRenderer) = 0; virtual bool RemovePostRenderer(IPostRenderer* pPostRenderer) = 0; @@ -201,7 +194,6 @@ public: //! Performs hit testing of 2d point in view to find which object hit. virtual bool HitTest(const QPoint& point, HitContext& hitInfo) = 0; - virtual AZ::Vector3 GetHitLocation(const QPoint& point) = 0; virtual void MakeConstructionPlane(int axis) = 0; @@ -232,8 +224,6 @@ public: // Drag and drop support on viewports. // To be overrided in derived classes. ////////////////////////////////////////////////////////////////////////// - virtual bool CanDrop([[maybe_unused]] const QPoint& point, [[maybe_unused]] IDataBaseItem* pItem) { return false; }; - virtual void Drop([[maybe_unused]] const QPoint& point, [[maybe_unused]] IDataBaseItem* pItem) {}; virtual void SetGlobalDropCallback(DropCallback dropCallback, void* dropCallbackCustom) { m_dropCallback = dropCallback; @@ -396,7 +386,6 @@ public: //! Snap any given 3D world position to grid lines if snap is enabled. Vec3 SnapToGrid(const Vec3& vec) override; - float GetGridStep() const override; //! Returns the screen scale factor for a point given in world coordinates. //! This factor gives the width in world-space units at the point's distance of the viewport. @@ -432,11 +421,6 @@ public: //! Performs hit testing of 2d point in view to find which object hit. bool HitTest(const QPoint& point, HitContext& hitInfo) override; - AZ::Vector3 GetHitLocation(const QPoint& point) override; - - //! Do 2D hit testing of line in world space. - // pToCameraDistance is an optional output parameter in which distance from the camera to the line is returned. - bool HitTestLine(const Vec3& lineP1, const Vec3& lineP2, const QPoint& hitpoint, int pixelRadius, float* pToCameraDistance = 0) const override; float GetDistanceToLine(const Vec3& lineP1, const Vec3& lineP2, const QPoint& point) const override; @@ -444,9 +428,6 @@ public: bool GetAdvancedSelectModeFlag() override; void GetPerpendicularAxis(EAxis* pAxis, bool* pIs2D) const override; - const ::Plane* GetConstructionPlane() const override { return &m_constructionPlane; } - - ////////////////////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////////////////// //! Set construction plane from given position construction matrix refrence coord system and axis settings. @@ -491,10 +472,6 @@ public: void ResetCursor() override; void SetSupplementaryCursorStr(const QString& str) override; - void RegisterRenderListener(IRenderListener* piListener) override; - bool UnregisterRenderListener(IRenderListener* piListener) override; - bool IsRenderListenerRegistered(IRenderListener* piListener) override; - void AddPostRenderer(IPostRenderer* pPostRenderer) override; bool RemovePostRenderer(IPostRenderer* pPostRenderer) override; @@ -502,7 +479,7 @@ public: void ReleaseMouse() override { m_mouseCaptured = false; QWidget::releaseMouse(); } void setRay(QPoint& vp, Vec3& raySrc, Vec3& rayDir) override; - void setHitcontext(QPoint& vp, Vec3& raySrc, Vec3& rayDir) override; + QPoint m_vp; AZ_PUSH_DISABLE_DLL_EXPORT_MEMBER_WARNING Vec3 m_raySrc; @@ -522,11 +499,6 @@ protected: void setRenderOverlayVisible(bool); bool isRenderOverlayVisible() const; - // called to process mouse callback inside the viewport. - virtual bool MouseCallback(EMouseEvent event, const QPoint& point, Qt::KeyboardModifiers modifiers, Qt::MouseButtons buttons = Qt::NoButton); - - void ProcessRenderLisneters(DisplayContext& rstDisplayContext); - void mousePressEvent(QMouseEvent* event) override; void mouseReleaseEvent(QMouseEvent* event) override; void mouseDoubleClickEvent(QMouseEvent* event) override; @@ -535,29 +507,29 @@ protected: void keyPressEvent(QKeyEvent* event) override; void keyReleaseEvent(QKeyEvent* event) override; void resizeEvent(QResizeEvent* event) override; - void leaveEvent(QEvent* event) override; - void paintEvent(QPaintEvent* event) override; - virtual void OnMouseMove(Qt::KeyboardModifiers modifiers, Qt::MouseButtons buttons, const QPoint& point); - virtual void OnMouseWheel(Qt::KeyboardModifiers modifiers, short zDelta, const QPoint& pt); - virtual void OnLButtonDown(Qt::KeyboardModifiers modifiers, const QPoint& point); - virtual void OnLButtonUp(Qt::KeyboardModifiers modifiers, const QPoint& point); - virtual void OnRButtonDown(Qt::KeyboardModifiers modifiers, const QPoint& point); - virtual void OnRButtonUp(Qt::KeyboardModifiers modifiers, const QPoint& point); - virtual void OnMButtonDblClk(Qt::KeyboardModifiers modifiers, const QPoint& point); - virtual void OnMButtonDown(Qt::KeyboardModifiers modifiers, const QPoint& point); - virtual void OnMButtonUp(Qt::KeyboardModifiers modifiers, const QPoint& point); - virtual void OnLButtonDblClk(Qt::KeyboardModifiers modifiers, const QPoint& point); - virtual void OnRButtonDblClk(Qt::KeyboardModifiers modifiers, const QPoint& point); - virtual void OnKeyDown(UINT nChar, UINT nRepCnt, UINT nFlags); - virtual void OnKeyUp(UINT nChar, UINT nRepCnt, UINT nFlags); + virtual void OnMouseMove(Qt::KeyboardModifiers, Qt::MouseButtons, const QPoint&) {} + virtual void OnMouseWheel(Qt::KeyboardModifiers, short zDelta, const QPoint&); + virtual void OnLButtonDown(Qt::KeyboardModifiers, const QPoint&) {} + virtual void OnLButtonUp(Qt::KeyboardModifiers, const QPoint&) {} + virtual void OnRButtonDown(Qt::KeyboardModifiers, const QPoint&) {} + virtual void OnRButtonUp(Qt::KeyboardModifiers, const QPoint&) {} + virtual void OnMButtonDblClk(Qt::KeyboardModifiers, const QPoint&) {} + virtual void OnMButtonDown(Qt::KeyboardModifiers, const QPoint&) {} + virtual void OnMButtonUp(Qt::KeyboardModifiers, const QPoint&) {} + virtual void OnLButtonDblClk(Qt::KeyboardModifiers, const QPoint&) {} + virtual void OnRButtonDblClk(Qt::KeyboardModifiers, const QPoint&) {} + virtual void OnKeyDown([[maybe_unused]] UINT nChar, [[maybe_unused]] UINT nRepCnt, [[maybe_unused]] UINT nFlags) {} + virtual void OnKeyUp([[maybe_unused]] UINT nChar, [[maybe_unused]] UINT nRepCnt, [[maybe_unused]] UINT nFlags) {} #if defined(AZ_PLATFORM_WINDOWS) void OnRawInput(UINT wParam, HRAWINPUT lParam); #endif void OnSetCursor(); - virtual void BuildDragDropContext(AzQtComponents::ViewportDragContext& context, const QPoint& pt); + virtual void BuildDragDropContext( + AzQtComponents::ViewportDragContext& context, AzFramework::ViewportId viewportId, const QPoint& point); + void dragEnterEvent(QDragEnterEvent* event) override; void dragMoveEvent(QDragMoveEvent* event) override; void dragLeaveEvent(QDragLeaveEvent* event) override; @@ -614,8 +586,6 @@ protected: // Same construction matrix is shared by all viewports. Matrix34 m_constructionMatrix[LAST_COORD_SYSTEM]; - std::vector m_cRenderListeners; - typedef std::vector<_smart_ptr > PostRenderers; PostRenderers m_postRenderers; AZ_POP_DISABLE_DLL_EXPORT_MEMBER_WARNING diff --git a/Code/Editor/ViewportManipulatorController.cpp b/Code/Editor/ViewportManipulatorController.cpp index 1766945541..9879a84b62 100644 --- a/Code/Editor/ViewportManipulatorController.cpp +++ b/Code/Editor/ViewportManipulatorController.cpp @@ -8,13 +8,15 @@ #include "ViewportManipulatorController.h" +#include +#include +#include +#include +#include +#include #include #include -#include -#include -#include -#include -#include +#include #include @@ -87,8 +89,14 @@ namespace SandboxEditor } using InteractionBus = AzToolsFramework::EditorInteractionSystemViewportSelectionRequestBus; - using namespace AzToolsFramework::ViewportInteraction; using AzFramework::InputChannel; + using AzToolsFramework::ViewportInteraction::KeyboardModifier; + using AzToolsFramework::ViewportInteraction::MouseButton; + using AzToolsFramework::ViewportInteraction::MouseEvent; + using AzToolsFramework::ViewportInteraction::MouseInteraction; + using AzToolsFramework::ViewportInteraction::MouseInteractionEvent; + using AzToolsFramework::ViewportInteraction::ProjectedViewportRay; + using AzToolsFramework::ViewportInteraction::ViewportInteractionRequestBus; bool interactionHandled = false; float wheelDelta = 0.0f; @@ -117,16 +125,13 @@ namespace SandboxEditor aznumeric_cast(position->m_normalizedPosition.GetX() * windowSize.m_width), aznumeric_cast(position->m_normalizedPosition.GetY() * windowSize.m_height)); - m_mouseInteraction.m_mousePick.m_screenCoordinates = screenPoint; - AZStd::optional ray; + ProjectedViewportRay ray{}; ViewportInteractionRequestBus::EventResult( ray, GetViewportId(), &ViewportInteractionRequestBus::Events::ViewportScreenToWorldRay, screenPoint); - if (ray.has_value()) - { - m_mouseInteraction.m_mousePick.m_rayOrigin = ray.value().origin; - m_mouseInteraction.m_mousePick.m_rayDirection = ray.value().direction; - } + m_mouseInteraction.m_mousePick.m_rayOrigin = ray.m_origin; + m_mouseInteraction.m_mousePick.m_rayDirection = ray.m_direction; + m_mouseInteraction.m_mousePick.m_screenCoordinates = screenPoint; } eventType = MouseEvent::Move; @@ -152,7 +157,7 @@ namespace SandboxEditor // Only insert the double click timing once we're done processing events, to avoid a false IsDoubleClick positive if (finishedProcessingEvents) { - m_pendingDoubleClicks[mouseButton] = m_curTime; + m_pendingDoubleClicks[mouseButton] = { m_currentTime, m_mouseInteraction.m_mousePick.m_screenCoordinates }; } eventType = MouseEvent::Down; } @@ -160,8 +165,8 @@ namespace SandboxEditor else if (state == InputChannel::State::Ended) { // If we've actually logged a mouse down event, forward a mouse up event. - // This prevents corner cases like the context menu thinking it should be opened even though no one clicked in this viewport, - // due to RenderViewportWidget ensuring all controllers get InputChannel::State::Ended events. + // This prevents corner cases like the context menu thinking it should be opened even though no one clicked in this + // viewport, due to RenderViewportWidget ensuring all controllers get InputChannel::State::Ended events. if (m_mouseInteraction.m_mouseButtons.m_mouseButtons & mouseButtonValue) { // Erase the button from our state if we're done processing events. @@ -246,17 +251,22 @@ namespace SandboxEditor void ViewportManipulatorControllerInstance::UpdateViewport(const AzFramework::ViewportControllerUpdateEvent& event) { - m_curTime = event.m_time; + m_currentTime = event.m_time; } bool ViewportManipulatorControllerInstance::IsDoubleClick(AzToolsFramework::ViewportInteraction::MouseButton button) const { - auto clickIt = m_pendingDoubleClicks.find(button); - if (clickIt == m_pendingDoubleClicks.end()) + if (auto clickIt = m_pendingDoubleClicks.find(button); clickIt != m_pendingDoubleClicks.end()) { - return false; + const double doubleClickThresholdMilliseconds = qApp->doubleClickInterval(); + const bool insideTimeThreshold = + (m_currentTime.GetMilliseconds() - clickIt->second.m_time.GetMilliseconds()) < doubleClickThresholdMilliseconds; + const bool insideDistanceThreshold = + AzFramework::ScreenVectorLength(clickIt->second.m_position - m_mouseInteraction.m_mousePick.m_screenCoordinates) < + AzFramework::DefaultMouseMoveDeadZone; + return insideTimeThreshold && insideDistanceThreshold; } - const double doubleClickThresholdMilliseconds = qApp->doubleClickInterval(); - return (m_curTime.GetMilliseconds() - clickIt->second.GetMilliseconds()) < doubleClickThresholdMilliseconds; + + return false; } -} //namespace SandboxEditor +} // namespace SandboxEditor diff --git a/Code/Editor/ViewportManipulatorController.h b/Code/Editor/ViewportManipulatorController.h index d551eb3647..b9c359a544 100644 --- a/Code/Editor/ViewportManipulatorController.h +++ b/Code/Editor/ViewportManipulatorController.h @@ -39,8 +39,16 @@ namespace SandboxEditor static bool IsMouseMove(const AzFramework::InputChannel& inputChannel); static AzToolsFramework::ViewportInteraction::KeyboardModifier GetKeyboardModifier(const AzFramework::InputChannel& inputChannel); + //! Represents the time and location of a click. + struct ClickEvent + { + AZ::ScriptTimePoint m_time; + AzFramework::ScreenPoint m_position; + }; + AzToolsFramework::ViewportInteraction::MouseInteraction m_mouseInteraction; - AZStd::unordered_map m_pendingDoubleClicks; - AZ::ScriptTimePoint m_curTime; + AZStd::unordered_map m_pendingDoubleClicks; + + AZ::ScriptTimePoint m_currentTime; }; } // namespace SandboxEditor diff --git a/Code/Editor/ViewportTitleDlg.cpp b/Code/Editor/ViewportTitleDlg.cpp index 75d16e9a40..90aa044d25 100644 --- a/Code/Editor/ViewportTitleDlg.cpp +++ b/Code/Editor/ViewportTitleDlg.cpp @@ -6,7 +6,6 @@ * */ - // Description : CViewportTitleDlg implementation file #if !defined(Q_MOC_RUN) @@ -15,6 +14,7 @@ #include "ViewportTitleDlg.h" // Qt +#include #include #include @@ -42,38 +42,21 @@ #include #include #include +#include +#include +#include #include AZ_PUSH_DISABLE_DLL_EXPORT_MEMBER_WARNING #include "ui_ViewportTitleDlg.h" AZ_POP_DISABLE_DLL_EXPORT_MEMBER_WARNING -#endif //!defined(Q_MOC_RUN) +#endif //! defined(Q_MOC_RUN) + +static constexpr int MiniumOverflowMenuWidth = 200; // CViewportTitleDlg dialog -inline namespace Helpers -{ - void ToggleHelpers() - { - const bool newValue = !GetIEditor()->GetDisplaySettings()->IsDisplayHelpers(); - GetIEditor()->GetDisplaySettings()->DisplayHelpers(newValue); - GetIEditor()->Notify(eNotify_OnDisplayRenderUpdate); - - if (newValue == false) - { - GetIEditor()->GetObjectManager()->SendEvent(EVENT_HIDE_HELPER); - } - AzToolsFramework::ViewportInteraction::ViewportSettingsNotificationBus::Broadcast( - &AzToolsFramework::ViewportInteraction::ViewportSettingNotifications::OnDrawHelpersChanged, newValue); - } - - bool IsHelpersShown() - { - return GetIEditor()->GetDisplaySettings()->IsDisplayHelpers(); - } -} - namespace { class CViewportTitleDlgDisplayInfoHelper @@ -98,7 +81,7 @@ namespace emit ViewportInfoStatusUpdated(static_cast(state)); } }; -} //end anonymous namespace +} // end anonymous namespace CViewportTitleDlg::CViewportTitleDlg(QWidget* pParent) : QWidget(pParent) @@ -138,14 +121,11 @@ CViewportTitleDlg::CViewportTitleDlg(QWidget* pParent) connect(this, &CViewportTitleDlg::ActionTriggered, MainWindow::instance()->GetActionManager(), &ActionManager::ActionTriggered); - AZ::VR::VREventBus::Handler::BusConnect(); - OnInitDialog(); } CViewportTitleDlg::~CViewportTitleDlg() { - AZ::VR::VREventBus::Handler::BusDisconnect(); GetISystem()->GetISystemEventDispatcher()->RemoveListener(this); GetIEditor()->UnregisterNotifyListener(this); @@ -218,36 +198,119 @@ void CViewportTitleDlg::SetupViewportInformationMenu() m_ui->m_debugInformationMenu->setMenu(GetViewportInformationMenu()); connect(m_ui->m_debugInformationMenu, &QToolButton::clicked, this, &CViewportTitleDlg::OnToggleDisplayInfo); m_ui->m_debugInformationMenu->setPopupMode(QToolButton::MenuButtonPopup); - } void CViewportTitleDlg::SetupHelpersButton() { - connect(m_ui->m_helpers, &QToolButton::clicked, this, &CViewportTitleDlg::OnToggleHelpers); - m_ui->m_helpers->setChecked(Helpers::IsHelpersShown()); + if (m_helpersMenu == nullptr) + { + m_helpersMenu = new QMenu("Helpers State", this); + + auto helperAction = MainWindow::instance()->GetActionManager()->GetAction(AzToolsFramework::Helpers); + connect( + helperAction, &QAction::triggered, this, + [this] + { + m_ui->m_helpers->setChecked(AzToolsFramework::HelpersVisible() || AzToolsFramework::IconsVisible()); + }); + + auto iconAction = MainWindow::instance()->GetActionManager()->GetAction(AzToolsFramework::Icons); + connect( + iconAction, &QAction::triggered, this, + [this] + { + m_ui->m_helpers->setChecked(AzToolsFramework::HelpersVisible() || AzToolsFramework::IconsVisible()); + }); + + m_helpersAction = new QAction(tr("Helpers"), m_helpersMenu); + m_helpersAction->setCheckable(true); + connect( + m_helpersAction, &QAction::triggered, this, + [helperAction] + { + helperAction->trigger(); + }); + + m_iconsAction = new QAction(tr("Icons"), m_helpersMenu); + m_iconsAction->setCheckable(true); + connect( + m_iconsAction, &QAction::triggered, this, + [iconAction] + { + iconAction->trigger(); + }); + + m_helpersMenu->addAction(m_helpersAction); + m_helpersMenu->addAction(m_iconsAction); + + connect( + m_helpersMenu, &QMenu::aboutToShow, this, + [this] + { + m_helpersAction->setChecked(AzToolsFramework::HelpersVisible()); + m_iconsAction->setChecked(AzToolsFramework::IconsVisible()); + }); + + m_ui->m_helpers->setCheckable(true); + m_ui->m_helpers->setMenu(m_helpersMenu); + m_ui->m_helpers->setPopupMode(QToolButton::InstantPopup); + } + + m_ui->m_helpers->setChecked(AzToolsFramework::HelpersVisible() || AzToolsFramework::IconsVisible()); } void CViewportTitleDlg::SetupOverflowMenu() { - // Setup the overflow menu - QMenu* overFlowMenu = new QMenu(this); + // simple override of QMenu that does not respond to keyboard events + // note: this prevents the menu from being prematurely closed + class IgnoreKeyboardMenu : public QMenu + { + public: + IgnoreKeyboardMenu(QWidget *parent = nullptr) : QMenu(parent) + { + } - m_audioMuteAction = new QAction("Mute Audio", overFlowMenu); + private: + void keyPressEvent(QKeyEvent* event) override + { + // regular escape key handling + if (event->key() == Qt::Key_Escape) + { + QMenu::keyPressEvent(event); + } + } + }; + + // setup the overflow menu + auto* overflowMenu = new IgnoreKeyboardMenu(this); + overflowMenu->setMinimumWidth(MiniumOverflowMenuWidth); + + m_audioMuteAction = new QAction("Mute Audio", overflowMenu); connect(m_audioMuteAction, &QAction::triggered, this, &CViewportTitleDlg::OnBnClickedMuteAudio); - overFlowMenu->addAction(m_audioMuteAction); + overflowMenu->addAction(m_audioMuteAction); - m_enableVRAction = new QAction("Enable VR Preview", overFlowMenu); - connect(m_enableVRAction, &QAction::triggered, this, &CViewportTitleDlg::OnBnClickedEnableVR); - overFlowMenu->addAction(m_enableVRAction); + overflowMenu->addSeparator(); - overFlowMenu->addSeparator(); + m_enableGridSnappingCheckBox = new QCheckBox("Enable Grid Snapping", overflowMenu); + AzQtComponents::CheckBox::applyToggleSwitchStyle(m_enableGridSnappingCheckBox); + auto gridSnappingWidgetAction = new QWidgetAction(overflowMenu); + gridSnappingWidgetAction->setDefaultWidget(m_enableGridSnappingCheckBox); + connect(m_enableGridSnappingCheckBox, &QCheckBox::stateChanged, this, &CViewportTitleDlg::OnGridSnappingToggled); + overflowMenu->addAction(gridSnappingWidgetAction); - m_enableGridSnappingAction = new QAction("Enable Grid Snapping", overFlowMenu); - connect(m_enableGridSnappingAction, &QAction::triggered, this, &CViewportTitleDlg::OnGridSnappingToggled); - m_enableGridSnappingAction->setCheckable(true); - overFlowMenu->addAction(m_enableGridSnappingAction); + m_enableGridVisualizationCheckBox = new QCheckBox("Show Grid", overflowMenu); + AzQtComponents::CheckBox::applyToggleSwitchStyle(m_enableGridVisualizationCheckBox); + auto gridVisualizationWidgetAction = new QWidgetAction(overflowMenu); + gridVisualizationWidgetAction->setDefaultWidget(m_enableGridVisualizationCheckBox); + connect( + m_enableGridVisualizationCheckBox, &QCheckBox::stateChanged, + [](const int state) + { + SandboxEditor::SetShowingGrid(state == Qt::Checked); + }); + overflowMenu->addAction(gridVisualizationWidgetAction); - m_gridSizeActionWidget = new QWidgetAction(overFlowMenu); + m_gridSizeActionWidget = new QWidgetAction(overflowMenu); m_gridSpinBox = new AzQtComponents::DoubleSpinBox(); m_gridSpinBox->setValue(SandboxEditor::GridSnappingSize()); m_gridSpinBox->setMinimum(1e-2f); @@ -257,44 +320,51 @@ void CViewportTitleDlg::SetupOverflowMenu() m_gridSpinBox, QOverload::of(&AzQtComponents::DoubleSpinBox::valueChanged), this, &CViewportTitleDlg::OnGridSpinBoxChanged); m_gridSizeActionWidget->setDefaultWidget(m_gridSpinBox); - overFlowMenu->addAction(m_gridSizeActionWidget); + overflowMenu->addAction(m_gridSizeActionWidget); - overFlowMenu->addSeparator(); + overflowMenu->addSeparator(); - m_enableAngleSnappingAction = new QAction("Enable Angle Snapping", overFlowMenu); - connect(m_enableAngleSnappingAction, &QAction::triggered, this, &CViewportTitleDlg::OnAngleSnappingToggled); - m_enableAngleSnappingAction->setCheckable(true); - overFlowMenu->addAction(m_enableAngleSnappingAction); + m_enableAngleSnappingCheckBox = new QCheckBox("Enable Angle Snapping", overflowMenu); + AzQtComponents::CheckBox::applyToggleSwitchStyle(m_enableAngleSnappingCheckBox); + auto angleSnappingWidgetAction = new QWidgetAction(overflowMenu); + angleSnappingWidgetAction->setDefaultWidget(m_enableAngleSnappingCheckBox); + connect(m_enableAngleSnappingCheckBox, &QCheckBox::stateChanged, this, &CViewportTitleDlg::OnAngleSnappingToggled); + overflowMenu->addAction(angleSnappingWidgetAction); - m_angleSizeActionWidget = new QWidgetAction(overFlowMenu); + m_angleSizeActionWidget = new QWidgetAction(overflowMenu); m_angleSpinBox = new AzQtComponents::DoubleSpinBox(); m_angleSpinBox->setValue(SandboxEditor::AngleSnappingSize()); m_angleSpinBox->setMinimum(1e-2f); - m_angleSpinBox->setToolTip(tr("Angle Snapping")); + m_angleSpinBox->setToolTip(tr("Angle size")); QObject::connect( m_angleSpinBox, QOverload::of(&AzQtComponents::DoubleSpinBox::valueChanged), this, &CViewportTitleDlg::OnAngleSpinBoxChanged); m_angleSizeActionWidget->setDefaultWidget(m_angleSpinBox); - overFlowMenu->addAction(m_angleSizeActionWidget); + overflowMenu->addAction(m_angleSizeActionWidget); - m_ui->m_overflowBtn->setMenu(overFlowMenu); + m_ui->m_overflowBtn->setMenu(overflowMenu); m_ui->m_overflowBtn->setPopupMode(QToolButton::InstantPopup); - connect(overFlowMenu, &QMenu::aboutToShow, this, &CViewportTitleDlg::UpdateOverFlowMenuState); + connect(overflowMenu, &QMenu::aboutToShow, this, &CViewportTitleDlg::UpdateOverFlowMenuState); UpdateMuteActionText(); } - ////////////////////////////////////////////////////////////////////////// void CViewportTitleDlg::SetViewPane(CLayoutViewPane* pViewPane) { if (m_pViewPane) + { m_pViewPane->disconnect(this); + } + m_pViewPane = pViewPane; + if (m_pViewPane) + { connect(this, &QWidget::customContextMenuRequested, m_pViewPane, &CLayoutViewPane::ShowTitleMenu); + } } ////////////////////////////////////////////////////////////////////////// @@ -305,16 +375,6 @@ void CViewportTitleDlg::OnInitDialog() connect(displayInfoHelper, &CViewportTitleDlgDisplayInfoHelper::ViewportInfoStatusUpdated, this, &CViewportTitleDlg::UpdateDisplayInfo); UpdateDisplayInfo(); - // This is here just in case this class hasn't been created before - // a VR headset was initialized - m_enableVRAction->setEnabled(false); - if (AZ::VR::HMDDeviceRequestBus::GetTotalNumOfEventHandlers() != 0) - { - m_enableVRAction->setEnabled(true); - } - - AZ::VR::VREventBus::Handler::BusConnect(); - QFontMetrics metrics({}); int width = static_cast(metrics.boundingRect("-9999.99").width() * m_fieldWidthMultiplier); @@ -335,7 +395,6 @@ void CViewportTitleDlg::OnInitDialog() m_ui->m_prefabFocusPath->hide(); m_ui->m_prefabFocusBackButton->hide(); } - } ////////////////////////////////////////////////////////////////////////// @@ -353,13 +412,6 @@ void CViewportTitleDlg::OnMaximize() } } -////////////////////////////////////////////////////////////////////////// -void CViewportTitleDlg::OnToggleHelpers() -{ - Helpers::ToggleHelpers(); - m_ui->m_helpers->setChecked(Helpers::IsHelpersShown()); -} - void CViewportTitleDlg::SetNoViewportInfo() { AZ::AtomBridge::AtomViewportInfoDisplayRequestBus::Broadcast( @@ -384,7 +436,6 @@ void CViewportTitleDlg::SetCompactViewportInfo() &AZ::AtomBridge::AtomViewportInfoDisplayRequestBus::Events::SetDisplayState, AZ::AtomBridge::ViewportInfoDisplayState::CompactInfo); } - ////////////////////////////////////////////////////////////////////////// void CViewportTitleDlg::UpdateDisplayInfo() { @@ -800,9 +851,6 @@ void CViewportTitleDlg::OnEditorNotifyEvent(EEditorNotifyEvent event) { switch (event) { - case eNotify_OnDisplayRenderUpdate: - m_ui->m_helpers->setChecked(Helpers::IsHelpersShown()); - break; case eNotify_OnBeginGameMode: case eNotify_OnEndGameMode: UpdateMuteActionText(); @@ -931,23 +979,6 @@ void CViewportTitleDlg::UpdateMuteActionText() } } -void CViewportTitleDlg::OnHMDInitialized() -{ - m_enableVRAction->setEnabled(true); -} - -void CViewportTitleDlg::OnHMDShutdown() -{ - m_enableVRAction->setEnabled(false); -} - -void CViewportTitleDlg::OnBnClickedEnableVR() -{ - gSettings.bEnableGameModeVR = !gSettings.bEnableGameModeVR; - - m_enableVRAction->setText(gSettings.bEnableGameModeVR ? tr("Disable VR Preview") : tr("Enable VR Preview")); -} - inline double Round(double fVal, double fStep) { if (fStep > 0.f) @@ -992,63 +1023,63 @@ void CViewportTitleDlg::CheckForCameraSpeedUpdate() } } -void CViewportTitleDlg::OnGridSnappingToggled() +void CViewportTitleDlg::OnGridSnappingToggled(const int state) { - m_gridSizeActionWidget->setEnabled(m_enableGridSnappingAction->isChecked()); + m_gridSizeActionWidget->setEnabled(state == Qt::Checked); + m_enableGridVisualizationCheckBox->setEnabled(state == Qt::Checked); MainWindow::instance()->GetActionManager()->GetAction(AzToolsFramework::SnapToGrid)->trigger(); } -void CViewportTitleDlg::OnAngleSnappingToggled() +void CViewportTitleDlg::OnAngleSnappingToggled(const int state) { - m_angleSizeActionWidget->setEnabled(m_enableAngleSnappingAction->isChecked()); + m_angleSizeActionWidget->setEnabled(state == Qt::Checked); MainWindow::instance()->GetActionManager()->GetAction(AzToolsFramework::SnapAngle)->trigger(); } -void CViewportTitleDlg::OnGridSpinBoxChanged(double value) +void CViewportTitleDlg::OnGridSpinBoxChanged(const double value) { - SandboxEditor::SetGridSnappingSize(static_cast(value)); + SandboxEditor::SetGridSnappingSize(aznumeric_cast(value)); } -void CViewportTitleDlg::OnAngleSpinBoxChanged(double value) +void CViewportTitleDlg::OnAngleSpinBoxChanged(const double value) { - SandboxEditor::SetAngleSnappingSize(static_cast(value)); + SandboxEditor::SetAngleSnappingSize(aznumeric_cast(value)); } void CViewportTitleDlg::UpdateOverFlowMenuState() { - bool gridSnappingActive = MainWindow::instance()->GetActionManager()->GetAction(AzToolsFramework::SnapToGrid)->isChecked(); + const bool gridSnappingActive = MainWindow::instance()->GetActionManager()->GetAction(AzToolsFramework::SnapToGrid)->isChecked(); { - QSignalBlocker signalBlocker(m_enableGridSnappingAction); - m_enableGridSnappingAction->setChecked(gridSnappingActive); + QSignalBlocker signalBlocker(m_enableGridSnappingCheckBox); + m_enableGridSnappingCheckBox->setChecked(gridSnappingActive); } m_gridSizeActionWidget->setEnabled(gridSnappingActive); - bool angleSnappingActive = MainWindow::instance()->GetActionManager()->GetAction(AzToolsFramework::SnapAngle)->isChecked(); + const bool angleSnappingActive = MainWindow::instance()->GetActionManager()->GetAction(AzToolsFramework::SnapAngle)->isChecked(); { - QSignalBlocker signalBlocker(m_enableAngleSnappingAction); - m_enableAngleSnappingAction->setChecked(angleSnappingActive); + QSignalBlocker signalBlocker(m_enableAngleSnappingCheckBox); + m_enableAngleSnappingCheckBox->setChecked(angleSnappingActive); } m_angleSizeActionWidget->setEnabled(angleSnappingActive); + + { + QSignalBlocker signalBlocker(m_enableGridVisualizationCheckBox); + m_enableGridVisualizationCheckBox->setChecked(SandboxEditor::ShowingGrid()); + } } -namespace + namespace { void PyToggleHelpers() { - GetIEditor()->GetDisplaySettings()->DisplayHelpers(!GetIEditor()->GetDisplaySettings()->IsDisplayHelpers()); - GetIEditor()->Notify(eNotify_OnDisplayRenderUpdate); - - if (GetIEditor()->GetDisplaySettings()->IsDisplayHelpers() == false) - { - GetIEditor()->GetObjectManager()->SendEvent(EVENT_HIDE_HELPER); - } + AzToolsFramework::SetHelpersVisible(!AzToolsFramework::HelpersVisible()); } bool PyIsHelpersShown() { - return GetIEditor()->GetDisplaySettings()->IsDisplayHelpers(); + return AzToolsFramework::HelpersVisible(); } -} +} // namespace namespace AzToolsFramework { @@ -1063,11 +1094,12 @@ namespace AzToolsFramework ->Attribute(AZ::Script::Attributes::Category, "Legacy/Editor") ->Attribute(AZ::Script::Attributes::Module, "legacy.general"); }; + addLegacyGeneral(behaviorContext->Method("toggle_helpers", PyToggleHelpers, nullptr, "Toggles the display of helpers.")); addLegacyGeneral(behaviorContext->Method("is_helpers_shown", PyIsHelpersShown, nullptr, "Gets the display state of helpers.")); } } -} +} // namespace AzToolsFramework #include "ViewportTitleDlg.moc" #include diff --git a/Code/Editor/ViewportTitleDlg.h b/Code/Editor/ViewportTitleDlg.h index 6996fe7750..b8da7f20ea 100644 --- a/Code/Editor/ViewportTitleDlg.h +++ b/Code/Editor/ViewportTitleDlg.h @@ -22,7 +22,6 @@ #include #include -#include #endif // CViewportTitleDlg dialog @@ -44,7 +43,6 @@ class CViewportTitleDlg : public QWidget , public IEditorNotifyListener , public ISystemEventListener - , public AZ::VR::VREventBus::Handler { Q_OBJECT public: @@ -82,16 +80,8 @@ protected: void OnSystemEvent(ESystemEvent event, UINT_PTR wparam, UINT_PTR lparam) override; void OnMaximize(); - void OnToggleHelpers(); void UpdateDisplayInfo(); - ////////////////////////////////////////////////////////////////////////// - /// VR Event Bus Implementation - ////////////////////////////////////////////////////////////////////////// - void OnHMDInitialized() override; - void OnHMDShutdown() override; - ////////////////////////////////////////////////////////////////////////// - void SetupCameraDropdownMenu(); void SetupResolutionDropdownMenu(); void SetupViewportInformationMenu(); @@ -140,7 +130,6 @@ protected: void OnBnClickedGotoPosition(); void OnBnClickedMuteAudio(); - void OnBnClickedEnableVR(); void UpdateMuteActionText(); @@ -151,8 +140,8 @@ protected: void CheckForCameraSpeedUpdate(); - void OnGridSnappingToggled(); - void OnAngleSnappingToggled(); + void OnGridSnappingToggled(int state); + void OnAngleSnappingToggled(int state); void OnGridSpinBoxChanged(double value); void OnAngleSpinBoxChanged(double value); @@ -163,14 +152,17 @@ protected: QMenu* m_aspectMenu = nullptr; QMenu* m_resolutionMenu = nullptr; QMenu* m_viewportInformationMenu = nullptr; + QMenu* m_helpersMenu = nullptr; + QAction* m_helpersAction = nullptr; + QAction* m_iconsAction = nullptr; QAction* m_noInformationAction = nullptr; QAction* m_normalInformationAction = nullptr; QAction* m_fullInformationAction = nullptr; QAction* m_compactInformationAction = nullptr; QAction* m_audioMuteAction = nullptr; - QAction* m_enableVRAction = nullptr; - QAction* m_enableGridSnappingAction = nullptr; - QAction* m_enableAngleSnappingAction = nullptr; + QCheckBox* m_enableGridSnappingCheckBox = nullptr; + QCheckBox* m_enableGridVisualizationCheckBox = nullptr; + QCheckBox* m_enableAngleSnappingCheckBox = nullptr; QComboBox* m_cameraSpeed = nullptr; AzQtComponents::DoubleSpinBox* m_gridSpinBox = nullptr; AzQtComponents::DoubleSpinBox* m_angleSpinBox = nullptr; @@ -184,7 +176,7 @@ protected: namespace AzToolsFramework { - //! A component to reflect scriptable commands for the Editor + //! A component to reflect scriptable commands for the Editor. class ViewportTitleDlgPythonFuncsHandler : public AZ::Component { diff --git a/Code/Editor/WelcomeScreen/WelcomeScreenDialog.cpp b/Code/Editor/WelcomeScreen/WelcomeScreenDialog.cpp index 17f576b5ee..89dfcaffd1 100644 --- a/Code/Editor/WelcomeScreen/WelcomeScreenDialog.cpp +++ b/Code/Editor/WelcomeScreen/WelcomeScreenDialog.cpp @@ -25,8 +25,6 @@ #include -// AzFramework -#include // AzToolsFramework #include @@ -173,9 +171,6 @@ void WelcomeScreenDialog::SetRecentFileList(RecentFileList* pList) m_pRecentList = pList; - const char* engineRoot; - EBUS_EVENT_RESULT(engineRoot, AzFramework::ApplicationRequests::Bus, GetEngineRoot); - auto projectPath = AZ::Utils::GetProjectPath(); QString gamePath{projectPath.c_str()}; Path::ConvertSlashToBackSlash(gamePath); diff --git a/Code/Editor/editor_core_files.cmake b/Code/Editor/editor_core_files.cmake index 53dd8d79a5..1f0a5a3618 100644 --- a/Code/Editor/editor_core_files.cmake +++ b/Code/Editor/editor_core_files.cmake @@ -7,17 +7,12 @@ # set(FILES - BaseLibrary.h - BaseLibraryItem.h UsedResources.h UIEnumsDatabase.h Include/EditorCoreAPI.cpp Include/IErrorReport.h - Include/IBaseLibraryManager.h Include/IFileUtil.h Include/EditorCoreAPI.h - Include/IEditorMaterial.h - Include/IEditorMaterialManager.h Include/IImageUtil.h Controls/ReflectedPropertyControl/ReflectedPropertyCtrl.qrc Controls/ReflectedPropertyControl/ReflectedPropertyCtrl.cpp @@ -35,8 +30,6 @@ set(FILES Controls/QBitmapPreviewDialogImp.h Controls/QToolTipWidget.h Controls/QToolTipWidget.cpp - BaseLibraryItem.cpp - BaseLibrary.cpp UsedResources.cpp UIEnumsDatabase.cpp LyViewPaneNames.h diff --git a/Code/Editor/editor_lib_files.cmake b/Code/Editor/editor_lib_files.cmake index 47b69765ba..345a8e15e1 100644 --- a/Code/Editor/editor_lib_files.cmake +++ b/Code/Editor/editor_lib_files.cmake @@ -269,14 +269,7 @@ set(FILES LevelTreeModel.h Include/Command.h Include/HitContext.h - Include/IAnimationCompressionManager.h - Include/IAssetItem.h - Include/IAssetItemDatabase.h Include/ICommandManager.h - Include/IConsoleConnectivity.h - Include/IDataBaseItem.h - Include/IDataBaseLibrary.h - Include/IDataBaseManager.h Include/IDisplayViewport.h Include/IEditorClassFactory.h Include/IEventLoopHook.h @@ -288,17 +281,13 @@ set(FILES Include/IObjectManager.h Include/IPlugin.h Include/IPreferencesPage.h - Include/IRenderListener.h Include/ISourceControl.h - Include/ITextureDatabaseUpdater.h Include/ITransformManipulator.h Include/IViewPane.h Include/ObjectEvent.h Util/AffineParts.cpp Objects/BaseObject.cpp Objects/BaseObject.h - Animation/AnimationBipedBoneNames.cpp - Animation/AnimationBipedBoneNames.h AnimationContext.cpp AnimationContext.h AzAssetBrowser/AzAssetBrowserRequestHandler.cpp @@ -336,23 +325,12 @@ set(FILES Controls/ConsoleSCB.qrc Controls/FolderTreeCtrl.cpp Controls/FolderTreeCtrl.h - Controls/HotTrackingTreeCtrl.cpp - Controls/HotTrackingTreeCtrl.h Controls/ImageHistogramCtrl.cpp Controls/ImageHistogramCtrl.h - Controls/ImageListCtrl.cpp - Controls/ImageListCtrl.h - Controls/MultiMonHelper.cpp - Controls/MultiMonHelper.h - Controls/NumberCtrl.cpp - Controls/NumberCtrl.h - Controls/NumberCtrl.h Controls/SplineCtrl.cpp Controls/SplineCtrl.h Controls/SplineCtrlEx.cpp Controls/SplineCtrlEx.h - Controls/TextEditorCtrl.cpp - Controls/TextEditorCtrl.h Controls/TimelineCtrl.cpp Controls/TimelineCtrl.h Controls/WndGridHelper.h @@ -385,9 +363,6 @@ set(FILES ActionManager.h ShortcutDispatcher.cpp ShortcutDispatcher.h - BaseLibraryManager.cpp - BaseLibraryItem.h - BaseLibraryManager.h CheckOutDialog.cpp CheckOutDialog.h CheckOutDialog.ui @@ -470,25 +445,20 @@ set(FILES GameResourcesExporter.cpp GameExporter.h GameResourcesExporter.h - Geometry/TriMesh.cpp - Geometry/TriMesh.h AboutDialog.h AboutDialog.ui DocMultiArchive.h - EditMode/DeepSelection.h FBXExporterDialog.h FileTypeUtils.h GridUtils.h IObservable.h IPostRenderer.h - LightmapCompiler/SimpleTriangleRasterizer.h ToolBox.h TrackViewNewSequenceDialog.h UndoConfigSpec.h UndoViewPosition.h UndoViewRotation.h Util/GeometryUtil.h - Util/KDTree.h WipFeaturesDlg.h WipFeaturesDlg.ui WipFeaturesDlg.qrc @@ -499,7 +469,6 @@ set(FILES Objects/ClassDesc.cpp Objects/ClassDesc.h Objects/DisplayContextShared.inl - Objects/IEntityObjectListener.h Objects/SelectionGroup.cpp Objects/SelectionGroup.h Objects/SubObjSelection.cpp @@ -528,8 +497,6 @@ set(FILES PythonEditorFuncs.h QtUI/QCollapsibleGroupBox.h QtUI/QCollapsibleGroupBox.cpp - QtUI/ClickableLabel.h - QtUI/ClickableLabel.cpp QtUI/PixmapLabelPreview.h QtUI/PixmapLabelPreview.cpp QtUI/WaitCursor.h @@ -576,11 +543,9 @@ set(FILES AboutDialog.cpp ErrorReportTableModel.h ErrorReportTableModel.cpp - EditMode/DeepSelection.cpp FBXExporterDialog.cpp FBXExporterDialog.ui FileTypeUtils.cpp - LightmapCompiler/SimpleTriangleRasterizer.cpp ToolBox.cpp TrackViewNewSequenceDialog.cpp TrackViewNewSequenceDialog.ui @@ -710,7 +675,6 @@ set(FILES Util/GuidUtil.cpp Util/GuidUtil.h Util/IObservable.h - Util/KDTree.cpp Util/Mailer.h Util/NamedData.cpp Util/NamedData.h @@ -803,9 +767,6 @@ set(FILES ViewportTitleDlg.h EditorEnvironment.cpp EditorEnvironment.h - IEditorPanelUtils.h - EditorPanelUtils.h - EditorPanelUtils.cpp ) diff --git a/Code/Editor/editor_lib_test_files.cmake b/Code/Editor/editor_lib_test_files.cmake index 2ae3d22c19..5b66357c41 100644 --- a/Code/Editor/editor_lib_test_files.cmake +++ b/Code/Editor/editor_lib_test_files.cmake @@ -8,7 +8,6 @@ set(FILES Lib/Tests/IEditorMock.h - Lib/Tests/test_ClickableLabel.cpp Lib/Tests/test_CryEditPythonBindings.cpp Lib/Tests/test_CryEditDocPythonBindings.cpp Lib/Tests/test_EditorPythonBindings.cpp @@ -22,6 +21,7 @@ set(FILES Lib/Tests/test_DisplaySettingsPythonBindings.cpp Lib/Tests/test_ViewportManipulatorController.cpp Lib/Tests/test_ModularViewportCameraController.cpp + Lib/Tests/Camera/test_EditorCamera.cpp DisplaySettingsPythonFuncs.cpp DisplaySettingsPythonFuncs.h ) diff --git a/Code/Editor/water.png b/Code/Editor/water.png deleted file mode 100644 index 342dee81e3..0000000000 --- a/Code/Editor/water.png +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:4abde33fa9c29e927e403e275979536e7defbb6476eb375e85f847396645953f -size 41419 diff --git a/Code/Framework/AtomCore/Tests/Main.cpp b/Code/Framework/AtomCore/Tests/Main.cpp index 29ef408551..728624d427 100644 --- a/Code/Framework/AtomCore/Tests/Main.cpp +++ b/Code/Framework/AtomCore/Tests/Main.cpp @@ -7,7 +7,6 @@ */ -#include #include #include #include @@ -38,7 +37,7 @@ namespace AZ using namespace AZ; // Handle asserts -class TraceDrillerHook +class TestEnvironmentHook : public AZ::Test::ITestEnvironment , public UnitTest::TraceBusRedirector { @@ -58,5 +57,5 @@ public: } }; -AZ_UNIT_TEST_HOOK(new TraceDrillerHook()); +AZ_UNIT_TEST_HOOK(new TestEnvironmentHook()); diff --git a/Code/Framework/AzCore/AzCore/Asset/AssetCommon.cpp b/Code/Framework/AzCore/AzCore/Asset/AssetCommon.cpp index fdc3053b5c..bf3ad20768 100644 --- a/Code/Framework/AzCore/AzCore/Asset/AssetCommon.cpp +++ b/Code/Framework/AzCore/AzCore/Asset/AssetCommon.cpp @@ -14,453 +14,450 @@ #include #include -namespace AZ +namespace AZ::Data { - namespace Data + AssetFilterInfo::AssetFilterInfo(const AssetId& id, const AssetType& assetType, AssetLoadBehavior loadBehavior) + : m_assetId(id) + , m_assetType(assetType) + , m_loadBehavior(loadBehavior) { - AssetFilterInfo::AssetFilterInfo(const AssetId& id, const AssetType& assetType, AssetLoadBehavior loadBehavior) - : m_assetId(id) - , m_assetType(assetType) - , m_loadBehavior(loadBehavior) + } + + AssetFilterInfo::AssetFilterInfo(const Asset& asset) + : m_assetId(asset.GetId()) + , m_assetType(asset.GetType()) + , m_loadBehavior(asset.GetAutoLoadBehavior()) + { + } + + + AssetId AssetId::CreateString(AZStd::string_view input) + { + size_t separatorIdx = input.find(':'); + if (separatorIdx == AZStd::string_view::npos) { + return AssetId(); } - AssetFilterInfo::AssetFilterInfo(const Asset& asset) - : m_assetId(asset.GetId()) - , m_assetType(asset.GetType()) - , m_loadBehavior(asset.GetAutoLoadBehavior()) + AssetId assetId; + assetId.m_guid = Uuid::CreateString(input.data(), separatorIdx); + if (assetId.m_guid.IsNull()) { + return AssetId(); } + assetId.m_subId = strtoul(&input[separatorIdx + 1], nullptr, 16); - AssetId AssetId::CreateString(AZStd::string_view input) + return assetId; + } + + void AssetId::Reflect(AZ::ReflectContext* context) + { + if (SerializeContext* serializeContext = azrtti_cast(context)) { - size_t separatorIdx = input.find(':'); - if (separatorIdx == AZStd::string_view::npos) - { - return AssetId(); - } - - AssetId assetId; - assetId.m_guid = Uuid::CreateString(input.data(), separatorIdx); - if (assetId.m_guid.IsNull()) - { - return AssetId(); - } - - assetId.m_subId = strtoul(&input[separatorIdx + 1], nullptr, 16); - - return assetId; + serializeContext->Class() + ->Version(1) + ->Field("guid", &Data::AssetId::m_guid) + ->Field("subId", &Data::AssetId::m_subId) + ; } - void AssetId::Reflect(AZ::ReflectContext* context) + if (BehaviorContext* behaviorContext = azrtti_cast(context)) { - if (SerializeContext* serializeContext = azrtti_cast(context)) - { - serializeContext->Class() - ->Version(1) - ->Field("guid", &Data::AssetId::m_guid) - ->Field("subId", &Data::AssetId::m_subId) - ; - } + behaviorContext->Class() + ->Attribute(AZ::Script::Attributes::Scope, AZ::Script::Attributes::ScopeFlags::Common) + ->Attribute(AZ::Script::Attributes::Category, "Asset") + ->Attribute(AZ::Script::Attributes::Module, "asset") + ->Constructor() + ->Constructor() + ->Method("CreateString", &Data::AssetId::CreateString) + ->Method("IsValid", &Data::AssetId::IsValid) + ->Attribute(AZ::Script::Attributes::Alias, "is_valid") + ->Method("ToString", [](const Data::AssetId* self) { return self->ToString(); }) + ->Attribute(AZ::Script::Attributes::Alias, "to_string") + ->Method("IsEqual", [](const Data::AssetId& self, const Data::AssetId& other) { return self == other; }) + ->Attribute(AZ::Script::Attributes::Alias, "is_equal") + ->Attribute(AZ::Script::Attributes::Operator, AZ::Script::Attributes::OperatorType::Equal) + ; - if (BehaviorContext* behaviorContext = azrtti_cast(context)) - { - behaviorContext->Class() - ->Attribute(AZ::Script::Attributes::Scope, AZ::Script::Attributes::ScopeFlags::Common) - ->Attribute(AZ::Script::Attributes::Category, "Asset") - ->Attribute(AZ::Script::Attributes::Module, "asset") - ->Constructor() - ->Constructor() - ->Method("CreateString", &Data::AssetId::CreateString) - ->Method("IsValid", &Data::AssetId::IsValid) - ->Attribute(AZ::Script::Attributes::Alias, "is_valid") - ->Method("ToString", [](const Data::AssetId* self) { return self->ToString(); }) - ->Attribute(AZ::Script::Attributes::Alias, "to_string") - ->Method("IsEqual", [](const Data::AssetId& self, const Data::AssetId& other) { return self == other; }) - ->Attribute(AZ::Script::Attributes::Alias, "is_equal") - ->Attribute(AZ::Script::Attributes::Operator, AZ::Script::Attributes::OperatorType::Equal) - ; + behaviorContext->Class() + ->Attribute(AZ::Script::Attributes::Scope, AZ::Script::Attributes::ScopeFlags::Common) + ->Attribute(AZ::Script::Attributes::Category, "Asset") + ->Attribute(AZ::Script::Attributes::Module, "asset") + ->Property("assetId", BehaviorValueGetter(&Data::AssetInfo::m_assetId), nullptr) + ->Property("assetType", BehaviorValueGetter(&Data::AssetInfo::m_assetType), nullptr) + ->Property("sizeBytes", BehaviorValueGetter(&Data::AssetInfo::m_sizeBytes), nullptr) + ->Property("relativePath", BehaviorValueGetter(&Data::AssetInfo::m_relativePath), nullptr) + ; + } + } - behaviorContext->Class() - ->Attribute(AZ::Script::Attributes::Scope, AZ::Script::Attributes::ScopeFlags::Common) - ->Attribute(AZ::Script::Attributes::Category, "Asset") - ->Attribute(AZ::Script::Attributes::Module, "asset") - ->Property("assetId", BehaviorValueGetter(&Data::AssetInfo::m_assetId), nullptr) - ->Property("assetType", BehaviorValueGetter(&Data::AssetInfo::m_assetType), nullptr) - ->Property("sizeBytes", BehaviorValueGetter(&Data::AssetInfo::m_sizeBytes), nullptr) - ->Property("relativePath", BehaviorValueGetter(&Data::AssetInfo::m_relativePath), nullptr) - ; - } + namespace AssetInternal + { + Asset FindOrCreateAsset(const AssetId& id, const AssetType& type, AssetLoadBehavior assetReferenceLoadBehavior) + { + return AssetManager::Instance().FindOrCreateAsset(id, type, assetReferenceLoadBehavior); } - namespace AssetInternal + Asset GetAsset(const AssetId& id, const AssetType& type, AssetLoadBehavior assetReferenceLoadBehavior, + const AssetLoadParameters& loadParams) { - Asset FindOrCreateAsset(const AssetId& id, const AssetType& type, AssetLoadBehavior assetReferenceLoadBehavior) - { - return AssetManager::Instance().FindOrCreateAsset(id, type, assetReferenceLoadBehavior); - } - - Asset GetAsset(const AssetId& id, const AssetType& type, AssetLoadBehavior assetReferenceLoadBehavior, - const AssetLoadParameters& loadParams) - { - return AssetManager::Instance().GetAsset(id, type, assetReferenceLoadBehavior, loadParams); - } - - AssetData::AssetStatus BlockUntilLoadComplete(const Asset& asset) - { - return AssetManager::Instance().BlockUntilLoadComplete(asset); - } - - void UpdateAssetInfo(AssetId& id, AZStd::string& assetHint) - { - // it is possible that the assetID given is legacy / old and we have a new assetId we can use instead for it. - // in that case, upgrade the AssetID to the new one, so that future saves are in the new format. - // this function should only be invoked if the feature is turned on in the asset manager as it can be (slightly) expensive - - if ((!AssetManager::IsReady()) || (!AssetManager::Instance().GetAssetInfoUpgradingEnabled())) - { - return; - } - - AZ::Data::AssetInfo assetInfo; - AZ::Data::AssetCatalogRequestBus::BroadcastResult(assetInfo, &AZ::Data::AssetCatalogRequests::GetAssetInfoById, id); - if (assetInfo.m_assetId.IsValid()) - { - id = assetInfo.m_assetId; - if (!assetInfo.m_relativePath.empty()) - { - assetHint = assetInfo.m_relativePath; - } - } - } - - bool ReloadAsset(AssetData* assetData, AssetLoadBehavior assetReferenceLoadBehavior) - { - AssetManager::Instance().ReloadAsset(assetData->GetId(), assetReferenceLoadBehavior); - return true; - } - - bool SaveAsset(AssetData* assetData, AssetLoadBehavior assetReferenceLoadBehavior) - { - AssetManager::Instance().SaveAsset({ assetData, assetReferenceLoadBehavior }); - return true; - } - - Asset GetAssetData(const AssetId& id, AssetLoadBehavior assetReferenceLoadBehavior) - { - if (AssetManager::IsReady()) - { - AZStd::lock_guard assetLock(AssetManager::Instance().m_assetMutex); - auto it = AssetManager::Instance().m_assets.find(id); - if (it != AssetManager::Instance().m_assets.end()) - { - return { it->second, assetReferenceLoadBehavior }; - } - } - return {}; - } - - AssetId ResolveAssetId(const AssetId& id) - { - AZ::Data::AssetInfo assetInfo; - AZ::Data::AssetCatalogRequestBus::BroadcastResult(assetInfo, &AZ::Data::AssetCatalogRequests::GetAssetInfoById, id); - if (assetInfo.m_assetId.IsValid()) - { - return assetInfo.m_assetId; - } - else - { - return id; - } - - } + return AssetManager::Instance().GetAsset(id, type, assetReferenceLoadBehavior, loadParams); } - AssetData::~AssetData() + AssetData::AssetStatus BlockUntilLoadComplete(const Asset& asset) { - UnregisterWithHandler(); + return AssetManager::Instance().BlockUntilLoadComplete(asset); } - void AssetData::Reflect(AZ::ReflectContext* context) + void UpdateAssetInfo(AssetId& id, AZStd::string& assetHint) { - if (SerializeContext* serializeContext = azrtti_cast(context)) + // it is possible that the assetID given is legacy / old and we have a new assetId we can use instead for it. + // in that case, upgrade the AssetID to the new one, so that future saves are in the new format. + // this function should only be invoked if the feature is turned on in the asset manager as it can be (slightly) expensive + + if ((!AssetManager::IsReady()) || (!AssetManager::Instance().GetAssetInfoUpgradingEnabled())) { - serializeContext->Class() - ->Version(1) - ; - } - - if (BehaviorContext* behaviorContext = azrtti_cast(context)) - { - behaviorContext->Class("AssetData") - ->Attribute(AZ::Script::Attributes::Scope, AZ::Script::Attributes::ScopeFlags::Common) - ->Attribute(AZ::Script::Attributes::Category, "Asset") - ->Attribute(AZ::Script::Attributes::Module, "asset") - ->Method("IsReady", &AssetData::IsReady) - ->Attribute(AZ::Script::Attributes::Alias, "is_ready") - ->Method("IsError", &AssetData::IsError) - ->Attribute(AZ::Script::Attributes::Alias, "is_error") - ->Method("IsLoading", &AssetData::IsLoading) - ->Attribute(AZ::Script::Attributes::Alias, "is_loading") - ->Method("GetId", &AssetData::GetId) - ->Attribute(AZ::Script::Attributes::Alias, "get_id") - ->Method("GetUseCount", &AssetData::GetUseCount) - ->Attribute(AZ::Script::Attributes::Alias, "get_use_count") - ; - } - } - - void AssetData::Acquire() - { - AZ_Assert(m_useCount >= 0, "AssetData has been deleted"); - - AcquireWeak(); - ++m_useCount; - } - - void AssetData::Release() - { - AZ_Assert(m_useCount > 0, "Usecount is already 0!"); - - if (m_useCount.fetch_sub(1) == 1) - { - if (AssetManager::IsReady()) - { - AssetManager::Instance().OnAssetUnused(this); - } - else - { - AZ_Assert(false, "Attempting to release asset after AssetManager has been destroyed!"); - } - } - - ReleaseWeak(); - } - - void AssetData::AcquireWeak() - { - AZ_Assert(m_useCount >= 0, "AssetData has been deleted"); - ++m_weakUseCount; - } - - void AssetData::ReleaseWeak() - { - AZ_Assert(m_weakUseCount > 0, "WeakUseCount is already 0"); - - AssetId assetId = m_assetId; - int creationToken = m_creationToken; - AssetType assetType = GetType(); - bool removeFromHash = IsRegisterReadonlyAndShareable(); - // default creation token implies that the asset was not created by the asset manager and therefore it cannot be in the asset map. - removeFromHash = creationToken == s_defaultCreationToken ? false : removeFromHash; - - if (m_weakUseCount.fetch_sub(1) == 1) - { - if (AssetManager::IsReady()) - { - AssetManager::Instance().ReleaseAsset(this, assetId, assetType, removeFromHash, creationToken); - } - else - { - AZ_Assert(false, "Attempting to release asset after AssetManager has been destroyed!"); - } - } - } - - bool AssetData::IsLoading(bool includeQueued) const - { - auto curStatus = GetStatus(); - return(curStatus == AssetStatus::Loading || curStatus == AssetStatus::LoadedPreReady || curStatus==AssetStatus::StreamReady || - (includeQueued && curStatus == AssetStatus::Queued)); - } - - void AssetData::RegisterWithHandler(AssetHandler* handler) - { - if (!handler) - { - AZ_Error("AssetData", false, "No handler to register with"); return; } - m_registeredHandler = handler; - } - void AssetData::UnregisterWithHandler() - { - if (m_registeredHandler) + AZ::Data::AssetInfo assetInfo; + AZ::Data::AssetCatalogRequestBus::BroadcastResult(assetInfo, &AZ::Data::AssetCatalogRequests::GetAssetInfoById, id); + if (assetInfo.m_assetId.IsValid()) { - m_registeredHandler = nullptr; - } - } - - bool AssetData::GetFlag(const AssetDataFlags& checkFlag) const - { - return m_flags[aznumeric_cast(checkFlag)]; - } - - void AssetData::SetFlag(const AssetDataFlags& checkFlag, bool setValue) - { - m_flags.set(aznumeric_cast(checkFlag), setValue); - } - - bool AssetData::GetRequeue() const - { - return GetFlag(AssetDataFlags::Requeue); - } - void AssetData::SetRequeue(bool requeue) - { - SetFlag(AssetDataFlags::Requeue, requeue); - } - - void AssetBusCallbacks::SetCallbacks(const AssetReadyCB& readyCB, const AssetMovedCB& movedCB, const AssetReloadedCB& reloadedCB, - const AssetSavedCB& savedCB, const AssetUnloadedCB& unloadedCB, const AssetErrorCB& errorCB, const AssetCanceledCB& cancelCB) - { - m_onAssetReadyCB = readyCB; - m_onAssetMovedCB = movedCB; - m_onAssetReloadedCB = reloadedCB; - m_onAssetSavedCB = savedCB; - m_onAssetUnloadedCB = unloadedCB; - m_onAssetErrorCB = errorCB; - m_onAssetCanceledCB = cancelCB; - } - - void AssetBusCallbacks::ClearCallbacks() - { - SetCallbacks(AssetBusCallbacks::AssetReadyCB(), - AssetBusCallbacks::AssetMovedCB(), - AssetBusCallbacks::AssetReloadedCB(), - AssetBusCallbacks::AssetSavedCB(), - AssetBusCallbacks::AssetUnloadedCB(), - AssetBusCallbacks::AssetErrorCB(), - AssetBusCallbacks::AssetCanceledCB()); - } - - - void AssetBusCallbacks::SetOnAssetReadyCallback(const AssetReadyCB& readyCB) - { - m_onAssetReadyCB = readyCB; - } - - void AssetBusCallbacks::SetOnAssetMovedCallback(const AssetMovedCB& movedCB) - { - m_onAssetMovedCB = movedCB; - } - - void AssetBusCallbacks::SetOnAssetReloadedCallback(const AssetReloadedCB& reloadedCB) - { - m_onAssetReloadedCB = reloadedCB; - } - - void AssetBusCallbacks::SetOnAssetSavedCallback(const AssetSavedCB& savedCB) - { - m_onAssetSavedCB = savedCB; - } - - void AssetBusCallbacks::SetOnAssetUnloadedCallback(const AssetUnloadedCB& unloadedCB) - { - m_onAssetUnloadedCB = unloadedCB; - } - - void AssetBusCallbacks::SetOnAssetErrorCallback(const AssetErrorCB& errorCB) - { - m_onAssetErrorCB = errorCB; - } - - void AssetBusCallbacks::SetOnAssetCanceledCallback(const AssetCanceledCB& cancelCB) - { - m_onAssetCanceledCB = cancelCB; - } - - void AssetBusCallbacks::OnAssetReady(Asset asset) - { - if (m_onAssetReadyCB) - { - m_onAssetReadyCB(asset, *this); - } - } - - void AssetBusCallbacks::OnAssetMoved(Asset asset, void* oldDataPointer) - { - if (m_onAssetMovedCB) - { - m_onAssetMovedCB(asset, oldDataPointer, *this); - } - } - - void AssetBusCallbacks::OnAssetReloaded(Asset asset) - { - if (m_onAssetReloadedCB) - { - m_onAssetReloadedCB(asset, *this); - } - } - - void AssetBusCallbacks::OnAssetSaved(Asset asset, bool isSuccessful) - { - if (m_onAssetSavedCB) - { - m_onAssetSavedCB(asset, isSuccessful, *this); - } - } - - void AssetBusCallbacks::OnAssetUnloaded(const AssetId assetId, const AssetType assetType) - { - if (m_onAssetUnloadedCB) - { - m_onAssetUnloadedCB(assetId, assetType, *this); - } - } - - void AssetBusCallbacks::OnAssetError(Asset asset) - { - if (m_onAssetErrorCB) - { - m_onAssetErrorCB(asset, *this); - } - } - - void AssetBusCallbacks::OnAssetCanceled(const AssetId assetId) - { - if (m_onAssetCanceledCB) - { - m_onAssetCanceledCB(assetId, *this); - } - } - - /*static*/ bool AssetFilterNoAssetLoading([[maybe_unused]] const AssetFilterInfo& filterInfo) - { - return false; - } - namespace ProductDependencyInfo - { - AZ::Data::AssetLoadBehavior LoadBehaviorFromFlags(const ProductDependencyFlags& dependencyFlags) - { - AZ::u8 loadBehaviorValue = 0; - for (AZ::u8 thisFlag = aznumeric_cast(ProductDependencyFlagBits::LoadBehaviorLow); - thisFlag <= aznumeric_cast(ProductDependencyFlagBits::LoadBehaviorHigh); ++thisFlag) + id = assetInfo.m_assetId; + if (!assetInfo.m_relativePath.empty()) { - if (dependencyFlags[thisFlag]) - { - loadBehaviorValue |= (1 << thisFlag); - } + assetHint = assetInfo.m_relativePath; } - return static_cast(loadBehaviorValue); - } - - ProductDependencyFlags CreateFlags(AZ::Data::AssetLoadBehavior autoLoadBehavior) - { - AZ::Data::ProductDependencyInfo::ProductDependencyFlags returnFlags; - AZ::u8 loadBehavior = aznumeric_caster(autoLoadBehavior); - for (AZ::u8 thisFlag = aznumeric_cast(ProductDependencyFlagBits::LoadBehaviorLow); - thisFlag <= aznumeric_cast(ProductDependencyFlagBits::LoadBehaviorHigh); ++thisFlag) - { - if (loadBehavior & (1 << thisFlag)) - { - returnFlags[thisFlag] = true; - } - } - return returnFlags; } } - } // namespace Data -} // namespace AZ + + bool ReloadAsset(AssetData* assetData, AssetLoadBehavior assetReferenceLoadBehavior) + { + AssetManager::Instance().ReloadAsset(assetData->GetId(), assetReferenceLoadBehavior); + return true; + } + + bool SaveAsset(AssetData* assetData, AssetLoadBehavior assetReferenceLoadBehavior) + { + AssetManager::Instance().SaveAsset({ assetData, assetReferenceLoadBehavior }); + return true; + } + + Asset GetAssetData(const AssetId& id, AssetLoadBehavior assetReferenceLoadBehavior) + { + if (AssetManager::IsReady()) + { + AZStd::lock_guard assetLock(AssetManager::Instance().m_assetMutex); + auto it = AssetManager::Instance().m_assets.find(id); + if (it != AssetManager::Instance().m_assets.end()) + { + return { it->second, assetReferenceLoadBehavior }; + } + } + return {}; + } + + AssetId ResolveAssetId(const AssetId& id) + { + AZ::Data::AssetInfo assetInfo; + AZ::Data::AssetCatalogRequestBus::BroadcastResult(assetInfo, &AZ::Data::AssetCatalogRequests::GetAssetInfoById, id); + if (assetInfo.m_assetId.IsValid()) + { + return assetInfo.m_assetId; + } + else + { + return id; + } + + } + } + + AssetData::~AssetData() + { + UnregisterWithHandler(); + } + + void AssetData::Reflect(AZ::ReflectContext* context) + { + if (SerializeContext* serializeContext = azrtti_cast(context)) + { + serializeContext->Class() + ->Version(1) + ; + } + + if (BehaviorContext* behaviorContext = azrtti_cast(context)) + { + behaviorContext->Class("AssetData") + ->Attribute(AZ::Script::Attributes::Scope, AZ::Script::Attributes::ScopeFlags::Common) + ->Attribute(AZ::Script::Attributes::Category, "Asset") + ->Attribute(AZ::Script::Attributes::Module, "asset") + ->Method("IsReady", &AssetData::IsReady) + ->Attribute(AZ::Script::Attributes::Alias, "is_ready") + ->Method("IsError", &AssetData::IsError) + ->Attribute(AZ::Script::Attributes::Alias, "is_error") + ->Method("IsLoading", &AssetData::IsLoading) + ->Attribute(AZ::Script::Attributes::Alias, "is_loading") + ->Method("GetId", &AssetData::GetId) + ->Attribute(AZ::Script::Attributes::Alias, "get_id") + ->Method("GetUseCount", &AssetData::GetUseCount) + ->Attribute(AZ::Script::Attributes::Alias, "get_use_count") + ; + } + } + + void AssetData::Acquire() + { + AZ_Assert(m_useCount >= 0, "AssetData has been deleted"); + + AcquireWeak(); + ++m_useCount; + } + + void AssetData::Release() + { + AZ_Assert(m_useCount > 0, "Usecount is already 0!"); + + if (m_useCount.fetch_sub(1) == 1) + { + if (AssetManager::IsReady()) + { + AssetManager::Instance().OnAssetUnused(this); + } + else + { + AZ_Assert(false, "Attempting to release asset after AssetManager has been destroyed!"); + } + } + + ReleaseWeak(); + } + + void AssetData::AcquireWeak() + { + AZ_Assert(m_useCount >= 0, "AssetData has been deleted"); + ++m_weakUseCount; + } + + void AssetData::ReleaseWeak() + { + AZ_Assert(m_weakUseCount > 0, "WeakUseCount is already 0"); + + AssetId assetId = m_assetId; + int creationToken = m_creationToken; + AssetType assetType = GetType(); + bool removeFromHash = IsRegisterReadonlyAndShareable(); + // default creation token implies that the asset was not created by the asset manager and therefore it cannot be in the asset map. + removeFromHash = creationToken == s_defaultCreationToken ? false : removeFromHash; + + if (m_weakUseCount.fetch_sub(1) == 1) + { + if (AssetManager::IsReady()) + { + AssetManager::Instance().ReleaseAsset(this, assetId, assetType, removeFromHash, creationToken); + } + else + { + AZ_Assert(false, "Attempting to release asset after AssetManager has been destroyed!"); + } + } + } + + bool AssetData::IsLoading(bool includeQueued) const + { + auto curStatus = GetStatus(); + return(curStatus == AssetStatus::Loading || curStatus == AssetStatus::LoadedPreReady || curStatus==AssetStatus::StreamReady || + (includeQueued && curStatus == AssetStatus::Queued)); + } + + void AssetData::RegisterWithHandler(AssetHandler* handler) + { + if (!handler) + { + AZ_Error("AssetData", false, "No handler to register with"); + return; + } + m_registeredHandler = handler; + } + + void AssetData::UnregisterWithHandler() + { + if (m_registeredHandler) + { + m_registeredHandler = nullptr; + } + } + + bool AssetData::GetFlag(const AssetDataFlags& checkFlag) const + { + return m_flags[aznumeric_cast(checkFlag)]; + } + + void AssetData::SetFlag(const AssetDataFlags& checkFlag, bool setValue) + { + m_flags.set(aznumeric_cast(checkFlag), setValue); + } + + bool AssetData::GetRequeue() const + { + return GetFlag(AssetDataFlags::Requeue); + } + void AssetData::SetRequeue(bool requeue) + { + SetFlag(AssetDataFlags::Requeue, requeue); + } + + void AssetBusCallbacks::SetCallbacks(const AssetReadyCB& readyCB, const AssetMovedCB& movedCB, const AssetReloadedCB& reloadedCB, + const AssetSavedCB& savedCB, const AssetUnloadedCB& unloadedCB, const AssetErrorCB& errorCB, const AssetCanceledCB& cancelCB) + { + m_onAssetReadyCB = readyCB; + m_onAssetMovedCB = movedCB; + m_onAssetReloadedCB = reloadedCB; + m_onAssetSavedCB = savedCB; + m_onAssetUnloadedCB = unloadedCB; + m_onAssetErrorCB = errorCB; + m_onAssetCanceledCB = cancelCB; + } + + void AssetBusCallbacks::ClearCallbacks() + { + SetCallbacks(AssetBusCallbacks::AssetReadyCB(), + AssetBusCallbacks::AssetMovedCB(), + AssetBusCallbacks::AssetReloadedCB(), + AssetBusCallbacks::AssetSavedCB(), + AssetBusCallbacks::AssetUnloadedCB(), + AssetBusCallbacks::AssetErrorCB(), + AssetBusCallbacks::AssetCanceledCB()); + } + + + void AssetBusCallbacks::SetOnAssetReadyCallback(const AssetReadyCB& readyCB) + { + m_onAssetReadyCB = readyCB; + } + + void AssetBusCallbacks::SetOnAssetMovedCallback(const AssetMovedCB& movedCB) + { + m_onAssetMovedCB = movedCB; + } + + void AssetBusCallbacks::SetOnAssetReloadedCallback(const AssetReloadedCB& reloadedCB) + { + m_onAssetReloadedCB = reloadedCB; + } + + void AssetBusCallbacks::SetOnAssetSavedCallback(const AssetSavedCB& savedCB) + { + m_onAssetSavedCB = savedCB; + } + + void AssetBusCallbacks::SetOnAssetUnloadedCallback(const AssetUnloadedCB& unloadedCB) + { + m_onAssetUnloadedCB = unloadedCB; + } + + void AssetBusCallbacks::SetOnAssetErrorCallback(const AssetErrorCB& errorCB) + { + m_onAssetErrorCB = errorCB; + } + + void AssetBusCallbacks::SetOnAssetCanceledCallback(const AssetCanceledCB& cancelCB) + { + m_onAssetCanceledCB = cancelCB; + } + + void AssetBusCallbacks::OnAssetReady(Asset asset) + { + if (m_onAssetReadyCB) + { + m_onAssetReadyCB(asset, *this); + } + } + + void AssetBusCallbacks::OnAssetMoved(Asset asset, void* oldDataPointer) + { + if (m_onAssetMovedCB) + { + m_onAssetMovedCB(asset, oldDataPointer, *this); + } + } + + void AssetBusCallbacks::OnAssetReloaded(Asset asset) + { + if (m_onAssetReloadedCB) + { + m_onAssetReloadedCB(asset, *this); + } + } + + void AssetBusCallbacks::OnAssetSaved(Asset asset, bool isSuccessful) + { + if (m_onAssetSavedCB) + { + m_onAssetSavedCB(asset, isSuccessful, *this); + } + } + + void AssetBusCallbacks::OnAssetUnloaded(const AssetId assetId, const AssetType assetType) + { + if (m_onAssetUnloadedCB) + { + m_onAssetUnloadedCB(assetId, assetType, *this); + } + } + + void AssetBusCallbacks::OnAssetError(Asset asset) + { + if (m_onAssetErrorCB) + { + m_onAssetErrorCB(asset, *this); + } + } + + void AssetBusCallbacks::OnAssetCanceled(const AssetId assetId) + { + if (m_onAssetCanceledCB) + { + m_onAssetCanceledCB(assetId, *this); + } + } + + /*static*/ bool AssetFilterNoAssetLoading([[maybe_unused]] const AssetFilterInfo& filterInfo) + { + return false; + } + namespace ProductDependencyInfo + { + AZ::Data::AssetLoadBehavior LoadBehaviorFromFlags(const ProductDependencyFlags& dependencyFlags) + { + AZ::u8 loadBehaviorValue = 0; + for (AZ::u8 thisFlag = aznumeric_cast(ProductDependencyFlagBits::LoadBehaviorLow); + thisFlag <= aznumeric_cast(ProductDependencyFlagBits::LoadBehaviorHigh); ++thisFlag) + { + if (dependencyFlags[thisFlag]) + { + loadBehaviorValue |= (1 << thisFlag); + } + } + return static_cast(loadBehaviorValue); + } + + ProductDependencyFlags CreateFlags(AZ::Data::AssetLoadBehavior autoLoadBehavior) + { + AZ::Data::ProductDependencyInfo::ProductDependencyFlags returnFlags; + AZ::u8 loadBehavior = aznumeric_caster(autoLoadBehavior); + for (AZ::u8 thisFlag = aznumeric_cast(ProductDependencyFlagBits::LoadBehaviorLow); + thisFlag <= aznumeric_cast(ProductDependencyFlagBits::LoadBehaviorHigh); ++thisFlag) + { + if (loadBehavior & (1 << thisFlag)) + { + returnFlags[thisFlag] = true; + } + } + return returnFlags; + } + } +} // namespace AZ::Data diff --git a/Code/Framework/AzCore/AzCore/Asset/AssetCommon.h b/Code/Framework/AzCore/AzCore/Asset/AssetCommon.h index 0c8e5209ca..e4d2c7612e 100644 --- a/Code/Framework/AzCore/AzCore/Asset/AssetCommon.h +++ b/Code/Framework/AzCore/AzCore/Asset/AssetCommon.h @@ -19,7 +19,6 @@ #include #include #include -#include #include namespace AZ @@ -169,7 +168,7 @@ namespace AZ virtual bool IsRegisterReadonlyAndShareable() { return true; } /** - * Override this function to control automatic reload behavior. + * Override this function to control automatic reload behavior. * By default, the asset will reload automatically. * Return false to disable automatic reload. Potential use cases include: * 1, If an asset is dependent on a parent asset(i.e.both assets need to be reloaded as a group) the parent asset can explicitly reload the child. @@ -201,10 +200,10 @@ namespace AZ AssetHandler* m_registeredHandler{ nullptr }; - // This is used to identify a unique asset and should only be set by the asset manager + // This is used to identify a unique asset and should only be set by the asset manager // and therefore does not need to be atomic. // All shared copy of an asset should have the same identifier and therefore - // should not be modified while making copy of an existing asset. + // should not be modified while making copy of an existing asset. int m_creationToken = s_defaultCreationToken; // General purpose flags that should only be accessed within the asset mutex AZStd::bitset<32> m_flags; @@ -325,13 +324,13 @@ namespace AZ T& operator*() const { - AZ_Assert(m_assetData, "Asset is not loaded"); + AZ_Assert(m_assetData, "Asset %s (%s) is not loaded", m_assetId.ToString().c_str(), m_assetHint.c_str()); return *Get(); } T* operator->() const { - AZ_Assert(m_assetData, "Asset is not loaded"); + AZ_Assert(m_assetData, "Asset %s (%s) is not loaded", m_assetId.ToString().c_str(), m_assetHint.c_str()); return Get(); } @@ -431,7 +430,7 @@ namespace AZ */ void UpgradeAssetInfo(); - /** + /** * for debugging purposes - creates a string that represents the assets id, subid, hint, and name. * You should use this function for any time you want to show the full details of an asset in a log message * as it will always produce a consistent output string. By convention, don't surround the output of this call @@ -556,16 +555,24 @@ namespace AZ Asset assetData(AssetInternal::GetAssetData(actualId, AZ::Data::AssetLoadBehavior::Default)); if (assetData) { - auto curStatus = assetData->GetStatus(); + auto isReady = assetData->GetStatus() == AssetData::AssetStatus::Ready; bool isError = assetData->IsError(); - connectLock.unlock(); - if (curStatus == AssetData::AssetStatus::Ready) + + if (isReady || isError) { - handler->OnAssetReady(assetData); - } - else if (isError) - { - handler->OnAssetError(assetData); + connectLock.unlock(); + + if (isReady) + { + handler->OnAssetReady(assetData); + } + else if (isError) + { + handler->OnAssetError(assetData); + } + + // Lock the mutex again since some destructors will be modifying the context afterwards + connectLock.lock(); } } } @@ -573,33 +580,32 @@ namespace AZ template using ConnectionPolicy = AssetConnectionPolicy; - using EventProcessingPolicy = Debug::AssetTrackingEventProcessingPolicy<>; ////////////////////////////////////////////////////////////////////////// virtual ~AssetEvents() {} /// Called when an asset is loaded, patched and ready to be used. virtual void OnAssetReady(Asset asset) { (void)asset; } - + /// Called when an asset has been moved (usually due to de-fragmentation/compaction), if possible the only data pointer is provided otherwise NULL. virtual void OnAssetMoved(Asset asset, void* oldDataPointer) { (void)asset; (void)oldDataPointer; } - + /// Called before an asset reload has started. virtual void OnAssetPreReload(Asset asset) { (void)asset; } - + /// Called when an asset has been reloaded (usually in tool mode and loose more). It should not be called in final build. virtual void OnAssetReloaded(Asset asset) { (void)asset; } - + /// Called when an asset failed to reload. virtual void OnAssetReloadError(Asset asset) { (void)asset; } - + /// Called when an asset has been saved. In general most assets can't be saved (in a game) so make sure you check the flag. virtual void OnAssetSaved(Asset asset, bool isSuccessful) { (void)asset; (void)isSuccessful; } - + /// Called when an asset is unloaded. virtual void OnAssetUnloaded(const AssetId assetId, const AssetType assetType) { (void)assetId; (void)assetType; } - - /** + + /** * Called when an error happened with an asset. When this message is received the asset should be considered broken by default. * Note that this can happen when the asset errors during load, but also happens when the asset is missing (not in catalog etc.) * in the case of an asset that is completely missing, the Asset passed in here will have no hint or other information about @@ -1088,7 +1094,7 @@ namespace AZ // if we are a different asset (or being swapped with a empty) then we just swap as usual. AZStd::swap(m_assetHint, rhs.m_assetHint); } - + } //========================================================================= @@ -1212,7 +1218,7 @@ namespace AZ /// Indiscriminately skips all asset references. bool AssetFilterNoAssetLoading(const AssetFilterInfo& filterInfo); - // Shared ProductDependency concepts between AP and LY + // Shared ProductDependency concepts between AP and LY namespace ProductDependencyInfo { //! Corresponds to all ProductDependencyFlags, not just LoadBehaviors diff --git a/Code/Framework/AzCore/AzCore/Asset/AssetContainer.cpp b/Code/Framework/AzCore/AzCore/Asset/AssetContainer.cpp index ce15c7bc4e..bab161fc0a 100644 --- a/Code/Framework/AzCore/AzCore/Asset/AssetContainer.cpp +++ b/Code/Framework/AzCore/AzCore/Asset/AssetContainer.cpp @@ -11,466 +11,469 @@ #include #include -namespace AZ +namespace AZ::Data { - namespace Data + AssetContainer::AssetContainer(Asset rootAsset, const AssetLoadParameters& loadParams) { - AssetContainer::AssetContainer(Asset rootAsset, const AssetLoadParameters& loadParams) - { - m_rootAsset = AssetInternal::WeakAsset(rootAsset); - m_containerAssetId = m_rootAsset.GetId(); + m_rootAsset = AssetInternal::WeakAsset(rootAsset); + m_containerAssetId = m_rootAsset.GetId(); - AddDependentAssets(rootAsset, loadParams); + AddDependentAssets(rootAsset, loadParams); + } + + AssetContainer::~AssetContainer() + { + // Validate that if the AssetManager is performing normal processing duties, the AssetContainer is only destroyed once all + // dependent asset loads have completed. + if (AssetManager::IsReady() && !AssetManager::Instance().ShouldCancelAllActiveJobs()) + { + AZ_Assert(m_waitingCount == 0, "Container destroyed while dependent assets are still loading. The dependent assets may " + "end up in a perpetual loading state if there is no top-level container signalling the completion of the full load."); } - AssetContainer::~AssetContainer() - { - // Validate that if the AssetManager is performing normal processing duties, the AssetContainer is only destroyed once all - // dependent asset loads have completed. - if (AssetManager::IsReady() && !AssetManager::Instance().ShouldCancelAllActiveJobs()) - { - AZ_Assert(m_waitingCount == 0, "Container destroyed while dependent assets are still loading. The dependent assets may " - "end up in a perpetual loading state if there is no top-level container signalling the completion of the full load."); - } + AssetBus::MultiHandler::BusDisconnect(); + AssetLoadBus::MultiHandler::BusDisconnect(); + } - AssetBus::MultiHandler::BusDisconnect(); - AssetLoadBus::MultiHandler::BusDisconnect(); + AZStd::vector>> AssetContainer::CreateAndQueueDependentAssets( + const AZStd::vector& dependencyInfoList, const AssetLoadParameters& loadParamsCopyWithNoLoadingFilter) + { + AZStd::vector>> dependencyAssets; + + for (auto& thisInfo : dependencyInfoList) + { + auto dependentAsset = AssetManager::Instance().FindOrCreateAsset( + thisInfo.m_assetId, thisInfo.m_assetType, AZ::Data::AssetLoadBehavior::Default); + + if (!dependentAsset || !dependentAsset.GetId().IsValid()) + { + AZ_Warning("AssetContainer", false, "Dependency Asset %s (%s) was not found\n", + thisInfo.m_assetId.ToString().c_str(), thisInfo.m_relativePath.c_str()); + RemoveWaitingAsset(thisInfo.m_assetId); + continue; + } + dependencyAssets.emplace_back(thisInfo, AZStd::move(dependentAsset)); } - void AssetContainer::AddDependentAssets(Asset rootAsset, const AssetLoadParameters& loadParams) + // Queue the loading of all of the dependent assets before loading the root asset. + for (auto& [dependentAssetInfo, dependentAsset] : dependencyAssets) { - AssetId rootAssetId = rootAsset.GetId(); - AssetType rootAssetType = rootAsset.GetType(); + // Queue each asset to load. + auto queuedDependentAsset = AssetManager::Instance().GetAssetInternal( + dependentAsset.GetId(), dependentAsset.GetType(), + AZ::Data::AssetLoadBehavior::Default, loadParamsCopyWithNoLoadingFilter, + dependentAssetInfo, HasPreloads(dependentAsset.GetId())); - // Every asset we're going to be waiting on a load for - the root and all valid dependencies - AZStd::vector waitingList; - waitingList.push_back(rootAssetId); + // Verify that the returned asset reference matches the one that we found or created and queued to load. + AZ_Assert(dependentAsset == queuedDependentAsset, "GetAssetInternal returned an unexpected asset reference for Asset %s", + dependentAsset.GetId().ToString().c_str()); + } - // Every asset dependency that we're aware of, whether or not it gets filtered out by the asset filter callback. - // This will be used at the point that asset references get serialized in to see whether or not we've received any - // unexpected assets that didn't appear in our asset catalog dependency list that need to be loaded anyways. - AZStd::vector handledAssetDependencyList; + return dependencyAssets; + } - // Cached AssetInfo to save another lookup inside Assetmanager - AZStd::vector dependencyInfoList; - Outcome, AZStd::string> getDependenciesResult = Failure(AZStd::string()); + void AssetContainer::AddDependentAssets(Asset rootAsset, const AssetLoadParameters& loadParams) + { + AssetId rootAssetId = rootAsset.GetId(); + AssetType rootAssetType = rootAsset.GetType(); - // Track preloads in an additional list - they're in our waiting/dependencyInfo lists as well, but preloads require us to - // suppress emitting "AssetReady" until everything we care about in this context is ready - PreloadAssetListType preloadDependencies; - if (loadParams.m_dependencyRules == AssetDependencyLoadRules::UseLoadBehavior) - { - AZStd::unordered_set noloadDependencies; - AssetCatalogRequestBus::BroadcastResult(getDependenciesResult, &AssetCatalogRequestBus::Events::GetLoadBehaviorProductDependencies, - rootAssetId, noloadDependencies, preloadDependencies); - if (!noloadDependencies.empty()) - { - AZStd::lock_guard dependencyLock(m_dependencyMutex); - m_unloadedDependencies.insert(noloadDependencies.begin(), noloadDependencies.end()); - } - } - else if (loadParams.m_dependencyRules == AssetDependencyLoadRules::LoadAll) - { - AssetCatalogRequestBus::BroadcastResult(getDependenciesResult, &AssetCatalogRequestBus::Events::GetAllProductDependencies, rootAssetId); - } - // Do as much validation of dependencies as we can before the AddWaitingAssets and GetAsset calls for dependencies below - if (getDependenciesResult.IsSuccess()) - { - for (const auto& thisAsset : getDependenciesResult.GetValue()) - { - AssetInfo assetInfo; - AssetCatalogRequestBus::BroadcastResult(assetInfo, &AssetCatalogRequestBus::Events::GetAssetInfoById, thisAsset.m_assetId); + // Every asset we're going to be waiting on a load for - the root and all valid dependencies + AZStd::vector waitingList; + waitingList.push_back(rootAssetId); - // No matter whether or not the asset dependency is valid, loaded, or filtered out, mark it as successfully handled. - // When we encounter the asset reference during serialization, we will know that it should intentionally be skipped. - // Otherwise, it would be treated as a missing dependency and assert. - handledAssetDependencyList.emplace_back(thisAsset.m_assetId); + // Every asset dependency that we're aware of, whether or not it gets filtered out by the asset filter callback. + // This will be used at the point that asset references get serialized in to see whether or not we've received any + // unexpected assets that didn't appear in our asset catalog dependency list that need to be loaded anyways. + AZStd::vector handledAssetDependencyList; - if (!assetInfo.m_assetId.IsValid()) - { - // Handlers may just not currently be around for a given asset type so we only warn here - AZ_Warning("AssetContainer", false, "Asset %s (%s) references/depends on asset %s which does not exist in the catalog and cannot be loaded.", - rootAsset.GetHint().c_str(), - rootAssetId.ToString().c_str(), - thisAsset.m_assetId.ToString().c_str()); - m_invalidDependencies++; - continue; - } - if (assetInfo.m_assetId == rootAssetId) - { - // Circular dependencies in our graph need to be raised as errors as they could cause problems elsewhere - AZ_Error("AssetContainer", false, "Circular dependency found under asset %s", rootAssetId.ToString().c_str()); - m_invalidDependencies++; - continue; - } - if (!AssetManager::Instance().GetHandler(assetInfo.m_assetType)) - { - // Handlers may just not currently be around for a given asset type so we only warn here - m_invalidDependencies++; - continue; - } - if (loadParams.m_assetLoadFilterCB) - { - if (!loadParams.m_assetLoadFilterCB({thisAsset.m_assetId, assetInfo.m_assetType, - AZ::Data::ProductDependencyInfo::LoadBehaviorFromFlags(thisAsset.m_flags) })) - { - continue; - } - } - dependencyInfoList.push_back(assetInfo); - } - } - for (auto& thisInfo : dependencyInfoList) - { - waitingList.push_back(thisInfo.m_assetId); - } + // Cached AssetInfo to save another lookup inside Assetmanager + AZStd::vector dependencyInfoList; + Outcome, AZStd::string> getDependenciesResult = Failure(AZStd::string()); - // Add waiting assets ahead of time to hear signals for any which may already be loading - AddWaitingAssets(waitingList); - SetupPreloadLists(move(preloadDependencies), rootAssetId); - - auto loadParamsCopyWithNoLoadingFilter = loadParams; - - // All asset dependencies below the root asset should be provided by the asset catalog, and therefore should *not* - // get triggered to load when the asset reference is serialized in. However, it's useful to detect, warn, and handle - // the case where the asset dependencies are NOT set up correctly. - loadParamsCopyWithNoLoadingFilter.m_assetLoadFilterCB = [handledAssetDependencyList](const AssetFilterInfo& filterInfo) - { - // NoLoad dependencies should always get filtered out and not loaded. - if (filterInfo.m_loadBehavior == AZ::Data::AssetLoadBehavior::NoLoad) - { - return false; - } - - // In the normal case, the dependent asset appears in the handled asset list, and we should return false so that - // the asset isn't attempted to be loaded, since the asset will already be triggered to get loaded or was possibly - // already filtered out by the load filter callback. - // In the error case, the asset dependencies haven't been produced by the builder correctly, so assets - // have shown up that the asset container hasn't triggered to load and isn't listening for. Assert that this case - // has happened so that the builder for this asset type can be fixed. - // Ideally we would proceed forward and load them by returning "true", but the triggered load would use this lambda - // function as the asset load filter for that load as well, which isn't correct. If we ever want to support that - // behavior, we would need to rework the way filters work as well as the code in AssetSerializer.cpp to pass down - // the loadParams.m_assetLoadFilterCB that was passed into the AddDependentAssets() methods to use as the dependent - // asset filter instead of this lambda function. - AZ_UNUSED(handledAssetDependencyList); // Prevent unused warning in release builds - AZ_Assert(AZStd::find(handledAssetDependencyList.begin(), handledAssetDependencyList.end(), filterInfo.m_assetId) != - handledAssetDependencyList.end(), - "Dependent Asset ID (%s) is expected to load, but the Asset Catalog has no dependency recorded. " - "Examine the asset builder for the asset relying on this to ensure it is generating the correct dependencies.", - filterInfo.m_assetId.ToString().c_str()); - - // The dependent asset should have already been created and at least queued to load prior to reaching this point. - // The asset serializer needs to get a successful result from FindAsset(), or else our asset reference will fail - // to point to the asset data once it is loaded. - if (!Data::AssetManager::Instance().FindAsset(filterInfo.m_assetId, AZ::Data::AssetLoadBehavior::Default)) - { - AZ_Assert(!Data::AssetManager::Instance().FindAsset(filterInfo.m_assetId, AZ::Data::AssetLoadBehavior::Default), - "Dependent Asset ID (%s) can't be found in the AssetManager, which means the asset referencing it has probably " - "started loading before the dependent asset has been queued to load. Verify that the asset dependencies have " - "been created correctly for the parent asset.", - filterInfo.m_assetId.ToString().c_str()); - } - - return false; - }; - - // This will contain the list of dependent assets that have been created (or found) and queued to load. - // We also keep a copy of the AssetInfo structure as a small optimization to avoid a redundant lookup in GetAssetInternal. - AZStd::vector>> dependencyAssets; - - // Make sure all the dependencies are created first before we try to load them. - // Since we've set the load filter to not load dependencies, we need to ensure all the assets are created beforehand - // so the dependencies can be hooked up as soon as each asset gets serialized in, even if they start getting serialized - // while we're still in the middle of triggering all of the asset loads below. - for (auto& thisInfo : dependencyInfoList) - { - auto dependentAsset = AssetManager::Instance().FindOrCreateAsset( - thisInfo.m_assetId, thisInfo.m_assetType, AZ::Data::AssetLoadBehavior::Default); - - if (!dependentAsset || !dependentAsset.GetId().IsValid()) - { - AZ_Warning("AssetContainer", false, "Dependency Asset %s (%s) was not found\n", - thisInfo.m_assetId.ToString().c_str(), thisInfo.m_relativePath.c_str()); - RemoveWaitingAsset(thisInfo.m_assetId); - continue; - } - dependencyAssets.emplace_back(thisInfo, AZStd::move(dependentAsset)); - } - - // Queue the loading of all of the dependent assets before loading the root asset. - for (auto& [dependentAssetInfo, dependentAsset] : dependencyAssets) - { - // Queue each asset to load. - auto queuedDependentAsset = AssetManager::Instance().GetAssetInternal( - dependentAsset.GetId(), dependentAsset.GetType(), - AZ::Data::AssetLoadBehavior::Default, loadParamsCopyWithNoLoadingFilter, - dependentAssetInfo, HasPreloads(dependentAsset.GetId())); - - // Verify that the returned asset reference matches the one that we found or created and queued to load. - AZ_Assert(dependentAsset == queuedDependentAsset, "GetAssetInternal returned an unexpected asset reference for Asset %s", - dependentAsset.GetId().ToString().c_str()); - } - - // Add all of the queued dependent assets as dependencies + // Track preloads in an additional list - they're in our waiting/dependencyInfo lists as well, but preloads require us to + // suppress emitting "AssetReady" until everything we care about in this context is ready + PreloadAssetListType preloadDependencies; + if (loadParams.m_dependencyRules == AssetDependencyLoadRules::UseLoadBehavior) + { + AZStd::unordered_set noloadDependencies; + AssetCatalogRequestBus::BroadcastResult(getDependenciesResult, &AssetCatalogRequestBus::Events::GetLoadBehaviorProductDependencies, + rootAssetId, noloadDependencies, preloadDependencies); + if (!noloadDependencies.empty()) { AZStd::lock_guard dependencyLock(m_dependencyMutex); - for (auto& [dependentAssetInfo, dependentAsset] : dependencyAssets) + m_unloadedDependencies.insert(noloadDependencies.begin(), noloadDependencies.end()); + } + } + else if (loadParams.m_dependencyRules == AssetDependencyLoadRules::LoadAll) + { + AssetCatalogRequestBus::BroadcastResult(getDependenciesResult, &AssetCatalogRequestBus::Events::GetAllProductDependencies, rootAssetId); + } + // Do as much validation of dependencies as we can before the AddWaitingAssets and GetAsset calls for dependencies below + if (getDependenciesResult.IsSuccess()) + { + for (const auto& thisAsset : getDependenciesResult.GetValue()) + { + AssetInfo assetInfo; + AssetCatalogRequestBus::BroadcastResult(assetInfo, &AssetCatalogRequestBus::Events::GetAssetInfoById, thisAsset.m_assetId); + + // No matter whether or not the asset dependency is valid, loaded, or filtered out, mark it as successfully handled. + // When we encounter the asset reference during serialization, we will know that it should intentionally be skipped. + // Otherwise, it would be treated as a missing dependency and assert. + handledAssetDependencyList.emplace_back(thisAsset.m_assetId); + + if (!assetInfo.m_assetId.IsValid()) { - AddDependency(AZStd::move(dependentAsset)); + // Handlers may just not currently be around for a given asset type so we only warn here + AZ_Warning("AssetContainer", false, "Asset %s (%s) references/depends on asset %s which does not exist in the catalog and cannot be loaded.", + rootAsset.GetHint().c_str(), + rootAssetId.ToString().c_str(), + thisAsset.m_assetId.ToString().c_str()); + m_invalidDependencies++; + continue; } + if (assetInfo.m_assetId == rootAssetId) + { + // Circular dependencies in our graph need to be raised as errors as they could cause problems elsewhere + AZ_Error("AssetContainer", false, "Circular dependency found under asset %s", rootAssetId.ToString().c_str()); + m_invalidDependencies++; + continue; + } + if (!AssetManager::Instance().GetHandler(assetInfo.m_assetType)) + { + // Handlers may just not currently be around for a given asset type so we only warn here + m_invalidDependencies++; + continue; + } + if (loadParams.m_assetLoadFilterCB) + { + if (!loadParams.m_assetLoadFilterCB({thisAsset.m_assetId, assetInfo.m_assetType, + AZ::Data::ProductDependencyInfo::LoadBehaviorFromFlags(thisAsset.m_flags) })) + { + continue; + } + } + dependencyInfoList.push_back(assetInfo); + } + } + for (auto& thisInfo : dependencyInfoList) + { + waitingList.push_back(thisInfo.m_assetId); + } + + // Add waiting assets ahead of time to hear signals for any which may already be loading + AddWaitingAssets(waitingList); + SetupPreloadLists(move(preloadDependencies), rootAssetId); + + auto loadParamsCopyWithNoLoadingFilter = loadParams; + + // All asset dependencies below the root asset should be provided by the asset catalog, and therefore should *not* + // get triggered to load when the asset reference is serialized in. However, it's useful to detect, warn, and handle + // the case where the asset dependencies are NOT set up correctly. + loadParamsCopyWithNoLoadingFilter.m_assetLoadFilterCB = [handledAssetDependencyList](const AssetFilterInfo& filterInfo) + { + // NoLoad dependencies should always get filtered out and not loaded. + if (filterInfo.m_loadBehavior == AZ::Data::AssetLoadBehavior::NoLoad) + { + return false; } - // Finally, after creating and queueing the dependent assets, queue the root asset. This is saved until last to ensure that - // it doesn't have any chance of serializing in until after all the dependent assets have been queued for loading and have - // been added to the list of dependencies. - auto thisAsset = AssetManager::Instance().GetAssetInternal(rootAssetId, rootAssetType, rootAsset.GetAutoLoadBehavior(), - loadParamsCopyWithNoLoadingFilter, AssetInfo(), HasPreloads(rootAssetId)); + // In the normal case, the dependent asset appears in the handled asset list, and we should return false so that + // the asset isn't attempted to be loaded, since the asset will already be triggered to get loaded or was possibly + // already filtered out by the load filter callback. + // In the error case, the asset dependencies haven't been produced by the builder correctly, so assets + // have shown up that the asset container hasn't triggered to load and isn't listening for. Assert that this case + // has happened so that the builder for this asset type can be fixed. + // Ideally we would proceed forward and load them by returning "true", but the triggered load would use this lambda + // function as the asset load filter for that load as well, which isn't correct. If we ever want to support that + // behavior, we would need to rework the way filters work as well as the code in AssetSerializer.cpp to pass down + // the loadParams.m_assetLoadFilterCB that was passed into the AddDependentAssets() methods to use as the dependent + // asset filter instead of this lambda function. + AZ_UNUSED(handledAssetDependencyList); // Prevent unused warning in release builds + AZ_Assert(AZStd::find(handledAssetDependencyList.begin(), handledAssetDependencyList.end(), filterInfo.m_assetId) != + handledAssetDependencyList.end(), + "Dependent Asset ID (%s) is expected to load, but the Asset Catalog has no dependency recorded. " + "Examine the asset builder for the asset relying on this to ensure it is generating the correct dependencies.", + filterInfo.m_assetId.ToString().c_str()); - if (!thisAsset) + // The dependent asset should have already been created and at least queued to load prior to reaching this point. + // The asset serializer needs to get a successful result from FindAsset(), or else our asset reference will fail + // to point to the asset data once it is loaded. + if (!Data::AssetManager::Instance().FindAsset(filterInfo.m_assetId, AZ::Data::AssetLoadBehavior::Default)) { - AZ_Assert(false, "Root asset with id %s failed to load, asset container is invalid.", - rootAssetId.ToString().c_str()); - ClearWaitingAssets(); - // initComplete remains false, because we have failed to initialize successfully. + AZ_Assert(!Data::AssetManager::Instance().FindAsset(filterInfo.m_assetId, AZ::Data::AssetLoadBehavior::Default), + "Dependent Asset ID (%s) can't be found in the AssetManager, which means the asset referencing it has probably " + "started loading before the dependent asset has been queued to load. Verify that the asset dependencies have " + "been created correctly for the parent asset.", + filterInfo.m_assetId.ToString().c_str()); + } + + return false; + }; + + // This will contain the list of dependent assets that have been created (or found) and queued to load. + // We also keep a copy of the AssetInfo structure as a small optimization to avoid a redundant lookup in GetAssetInternal. + AZStd::vector>> dependencyAssets; + + // Make sure all the dependencies are created first before we try to load them. + // Since we've set the load filter to not load dependencies, we need to ensure all the assets are created beforehand + // so the dependencies can be hooked up as soon as each asset gets serialized in, even if they start getting serialized + // while we're still in the middle of triggering all of the asset loads below. + dependencyAssets = CreateAndQueueDependentAssets(dependencyInfoList, loadParamsCopyWithNoLoadingFilter); + + // Add all of the queued dependent assets as dependencies + { + AZStd::lock_guard dependencyLock(m_dependencyMutex); + for (auto& [dependentAssetInfo, dependentAsset] : dependencyAssets) + { + AddDependency(AZStd::move(dependentAsset)); + } + } + + // Finally, after creating and queueing the dependent assets, queue the root asset. This is saved until last to ensure that + // it doesn't have any chance of serializing in until after all the dependent assets have been queued for loading and have + // been added to the list of dependencies. + auto thisAsset = AssetManager::Instance().GetAssetInternal(rootAssetId, rootAssetType, rootAsset.GetAutoLoadBehavior(), + loadParamsCopyWithNoLoadingFilter, AssetInfo(), HasPreloads(rootAssetId)); + + if (!thisAsset) + { + AZ_Assert(false, "Root asset with id %s failed to load, asset container is invalid.", + rootAssetId.ToString().c_str()); + ClearWaitingAssets(); + // initComplete remains false, because we have failed to initialize successfully. + return; + } + + m_initComplete = true; + + // *After* setting initComplete to true, check to see if the assets are already ready. + // This check needs to wait until after setting initComplete because if they *are* ready, we want the final call to + // RemoveWaitingAsset to trigger the OnAssetContainerReady/Canceled event. If we call CheckReady() *before* setting + // initComplete, if all the assets are ready, the event will never get triggered. + CheckReady(); + } + + bool AssetContainer::IsReady() const + { + return (m_rootAsset && m_waitingCount == 0); + } + + bool AssetContainer::IsLoading() const + { + return (m_rootAsset || m_waitingCount); + } + + bool AssetContainer::IsValid() const + { + return (m_containerAssetId.IsValid() && m_initComplete && m_rootAsset); + } + + void AssetContainer::CheckReady() + { + if (!m_dependencies.empty()) + { + for (auto& [assetId, dependentAsset] : m_dependencies) + { + if (dependentAsset->IsReady() || dependentAsset->IsError()) + { + HandleReadyAsset(dependentAsset); + } + } + } + if (auto asset = m_rootAsset.GetStrongReference(); asset.IsReady() || asset.IsError()) + { + HandleReadyAsset(asset); + } + } + + Asset AssetContainer::GetRootAsset() + { + return m_rootAsset.GetStrongReference(); + } + + AssetId AssetContainer::GetContainerAssetId() + { + return m_containerAssetId; + } + + void AssetContainer::ClearRootAsset() + { + AssetId rootId = m_rootAsset.GetId(); + + { + AZStd::lock_guard preloadGuard(m_preloadMutex); + + // Erase the entry in the preloadWaitList for the root asset if one exists. + m_preloadWaitList.erase(rootId); + + // It's possible that the root asset has preload dependencies, so make sure to check the preload list and remove + // the entry for the root asset if it has one. + auto rootAssetPreloadIter = m_preloadList.find(rootId); + if (rootAssetPreloadIter != m_preloadList.end()) + { + // Since the root asset has a preload list, that means the preload wait list will also have references to the + // root asset. (The preload wait list is a list of assets waiting on a preload asset to finish) Clear those + // out as well. + auto waitAssetSet = rootAssetPreloadIter->second; + for (auto& waitId : waitAssetSet) + { + auto waitAssetIter = m_preloadWaitList.find(waitId); + if (waitAssetIter != m_preloadWaitList.end()) + { + waitAssetIter->second.erase(rootId); + } + } + + m_preloadList.erase(rootAssetPreloadIter); + } + } + + // Clear out the root asset before removing it from the waiting list to ensure that we trigger an "OnAssetContainerCanceled" + // event instead of "OnAssetContainerReady". + m_rootAsset = {}; + RemoveWaitingAsset(rootId); + + } + + void AssetContainer::AddDependency(const Asset& newDependency) + { + m_dependencies[newDependency->GetId()] = newDependency; + } + void AssetContainer::AddDependency(Asset&& newDependency) + { + m_dependencies[newDependency->GetId()] = AZStd::move(newDependency); + } + + void AssetContainer::OnAssetReady(Asset asset) + { + HandleReadyAsset(asset); + } + + void AssetContainer::OnAssetError(Asset asset) + { + AZ_Warning("AssetContainer", false, "Error loading asset %s", asset->GetId().ToString().c_str()); + HandleReadyAsset(asset); + } + + void AssetContainer::HandleReadyAsset(Asset asset) + { + // Wait until we've finished initialization before allowing this + // If a ready event happens before we've gotten all the maps/structures set up, there may be some missing data + // which can lead to a crash + // We'll go through and check the ready status of every dependency immediately after finishing initialization anyway + if (m_initComplete) + { + RemoveFromAllWaitingPreloads(asset->GetId()); + RemoveWaitingAsset(asset->GetId()); + } + } + + void AssetContainer::OnAssetDataLoaded(Asset asset) + { + // Remove only from this asset's waiting list. Anything else should + // listen for OnAssetReady as the true signal. This is essentially removing the + // "marker" we placed in SetupPreloads that we need to wait for our own data + RemoveFromWaitingPreloads(asset->GetId(), asset->GetId()); + } + + void AssetContainer::RemoveFromWaitingPreloads(const AssetId& waiterId, const AssetId& preloadID) + { + { + AZStd::lock_guard preloadGuard(m_preloadMutex); + + auto remainingPreloadIter = m_preloadList.find(waiterId); + if (remainingPreloadIter == m_preloadList.end()) + { + // If we got here without an entry on the preload list, it probably means this asset was triggered to load multiple + // times, some with dependencies and some without. To ensure that we don't disturb the loads that expect the + // dependencies, just silently return and don't treat the asset as finished loading. We'll rely on the other load + // to send an OnAssetReady() whenever its expected dependencies are met. return; } - - m_initComplete = true; - - // *After* setting initComplete to true, check to see if the assets are already ready. - // This check needs to wait until after setting initComplete because if they *are* ready, we want the final call to - // RemoveWaitingAsset to trigger the OnAssetContainerReady/Canceled event. If we call CheckReady() *before* setting - // initComplete, if all the assets are ready, the event will never get triggered. - CheckReady(); - } - - bool AssetContainer::IsReady() const - { - return (m_rootAsset && m_waitingCount == 0); - } - - bool AssetContainer::IsLoading() const - { - return (m_rootAsset || m_waitingCount); - } - - bool AssetContainer::IsValid() const - { - return (m_containerAssetId.IsValid() && m_initComplete && m_rootAsset); - } - - void AssetContainer::CheckReady() - { - if (!m_dependencies.empty()) + if (!remainingPreloadIter->second.erase(preloadID)) { - for (auto& [assetId, dependentAsset] : m_dependencies) - { - if (dependentAsset->IsReady() || dependentAsset->IsError()) - { - HandleReadyAsset(dependentAsset); - } - } + AZ_Warning("AssetContainer", !m_initComplete, "Couldn't remove %s from waiting list of %s", preloadID.ToString().c_str(), waiterId.ToString().c_str()); + return; } - if (auto asset = m_rootAsset.GetStrongReference(); asset.IsReady() || asset.IsError()) + if (!remainingPreloadIter->second.empty()) { - HandleReadyAsset(asset); + return; } } + auto thisAsset = GetAssetData(waiterId); + AssetManager::Instance().ValidateAndPostLoad(thisAsset, true, false, nullptr); + } - Asset AssetContainer::GetRootAsset() + void AssetContainer::RemoveFromAllWaitingPreloads(const AssetId& thisId) + { + AZStd::unordered_set checkList; { - return m_rootAsset.GetStrongReference(); - } - - AssetId AssetContainer::GetContainerAssetId() - { - return m_containerAssetId; - } - - void AssetContainer::ClearRootAsset() - { - AssetId rootId = m_rootAsset.GetId(); - - { - AZStd::lock_guard preloadGuard(m_preloadMutex); - - // Erase the entry in the preloadWaitList for the root asset if one exists. - m_preloadWaitList.erase(rootId); - - // It's possible that the root asset has preload dependencies, so make sure to check the preload list and remove - // the entry for the root asset if it has one. - auto rootAssetPreloadIter = m_preloadList.find(rootId); - if (rootAssetPreloadIter != m_preloadList.end()) - { - // Since the root asset has a preload list, that means the preload wait list will also have references to the - // root asset. (The preload wait list is a list of assets waiting on a preload asset to finish) Clear those - // out as well. - auto waitAssetSet = rootAssetPreloadIter->second; - for (auto& waitId : waitAssetSet) - { - auto waitAssetIter = m_preloadWaitList.find(waitId); - if (waitAssetIter != m_preloadWaitList.end()) - { - waitAssetIter->second.erase(rootId); - } - } - - m_preloadList.erase(rootAssetPreloadIter); - } - } - - // Clear out the root asset before removing it from the waiting list to ensure that we trigger an "OnAssetContainerCanceled" - // event instead of "OnAssetContainerReady". - m_rootAsset = {}; - RemoveWaitingAsset(rootId); - - } - - void AssetContainer::AddDependency(const Asset& newDependency) - { - m_dependencies[newDependency->GetId()] = newDependency; - } - void AssetContainer::AddDependency(Asset&& newDependency) - { - m_dependencies[newDependency->GetId()] = AZStd::move(newDependency); - } - - void AssetContainer::OnAssetReady(Asset asset) - { - HandleReadyAsset(asset); - } - - void AssetContainer::OnAssetError(Asset asset) - { - AZ_Warning("AssetContainer", false, "Error loading asset %s", asset->GetId().ToString().c_str()); - HandleReadyAsset(asset); - } - - void AssetContainer::HandleReadyAsset(Asset asset) - { - RemoveFromAllWaitingPreloads(asset->GetId()); - RemoveWaitingAsset(asset->GetId()); - } - - void AssetContainer::OnAssetDataLoaded(Asset asset) - { - // Remove only from this asset's waiting list. Anything else should - // listen for OnAssetReady as the true signal. This is essentially removing the - // "marker" we placed in SetupPreloads that we need to wait for our own data - RemoveFromWaitingPreloads(asset->GetId(), asset->GetId()); - } - - void AssetContainer::RemoveFromWaitingPreloads(const AssetId& waiterId, const AssetId& preloadID) - { - { - AZStd::lock_guard preloadGuard(m_preloadMutex); - - auto remainingPreloadIter = m_preloadList.find(waiterId); - if (remainingPreloadIter == m_preloadList.end()) - { - // If we got here without an entry on the preload list, it probably means this asset was triggered to load multiple - // times, some with dependencies and some without. To ensure that we don't disturb the loads that expect the - // dependencies, just silently return and don't treat the asset as finished loading. We'll rely on the other load - // to send an OnAssetReady() whenever its expected dependencies are met. - return; - } - if (!remainingPreloadIter->second.erase(preloadID)) - { - AZ_Warning("AssetContainer", !m_initComplete, "Couldn't remove %s from waiting list of %s", preloadID.ToString().c_str(), waiterId.ToString().c_str()); - return; - } - if (!remainingPreloadIter->second.empty()) - { - return; - } - } - auto thisAsset = GetAssetData(waiterId); - AssetManager::Instance().ValidateAndPostLoad(thisAsset, true, false, nullptr); - } - - void AssetContainer::RemoveFromAllWaitingPreloads(const AssetId& thisId) - { - AZStd::unordered_set checkList; - { - AZStd::lock_guard preloadGuard(m_preloadMutex); - - auto waitingList = m_preloadWaitList.find(thisId); - if (waitingList != m_preloadWaitList.end()) - { - checkList = move(waitingList->second); - m_preloadWaitList.erase(waitingList); - } - } - for (auto& thisDepId : checkList) - { - if (thisDepId != thisId) - { - RemoveFromWaitingPreloads(thisDepId, thisId); - } - } - } - - void AssetContainer::ClearWaitingAssets() - { - AZStd::lock_guard lock(m_readyMutex); - m_waitingCount = 0; - for (auto& thisAsset : m_waitingAssets) - { - AssetBus::MultiHandler::BusDisconnect(thisAsset); - } - m_waitingAssets.clear(); - } - - void AssetContainer::ListWaitingAssets() const - { -#if defined(AZ_ENABLE_TRACING) - AZStd::lock_guard lock(m_readyMutex); - AZ_TracePrintf("AssetContainer", "Waiting on assets:\n"); - for (auto& thisAsset : m_waitingAssets) - { - AZ_TracePrintf("AssetContainer", " %s\n",thisAsset.ToString().c_str()); - } -#endif - } - - void AssetContainer::ListWaitingPreloads([[maybe_unused]] const AssetId& assetId) const - { -#if defined(AZ_ENABLE_TRACING) AZStd::lock_guard preloadGuard(m_preloadMutex); - auto preloadEntry = m_preloadList.find(assetId); - if (preloadEntry != m_preloadList.end()) + + auto waitingList = m_preloadWaitList.find(thisId); + if (waitingList != m_preloadWaitList.end()) { - AZ_TracePrintf("AssetContainer", "%s waiting on preloads : \n",assetId.ToString().c_str()); - for (auto& thisId : preloadEntry->second) - { - AZ_TracePrintf("AssetContainer", " %s\n",thisId.ToString().c_str()); - } + checkList = move(waitingList->second); + m_preloadWaitList.erase(waitingList); } - else + } + for (auto& thisDepId : checkList) + { + if (thisDepId != thisId) { - AZ_TracePrintf("AssetContainer", "%s isn't waiting on any preloads:\n", assetId.ToString().c_str()); + RemoveFromWaitingPreloads(thisDepId, thisId); } + } + } + + void AssetContainer::ClearWaitingAssets() + { + AZStd::lock_guard lock(m_readyMutex); + m_waitingCount = 0; + for (auto& thisAsset : m_waitingAssets) + { + AssetBus::MultiHandler::BusDisconnect(thisAsset); + } + m_waitingAssets.clear(); + } + + void AssetContainer::ListWaitingAssets() const + { +#if defined(AZ_ENABLE_TRACING) + AZStd::lock_guard lock(m_readyMutex); + AZ_TracePrintf("AssetContainer", "Waiting on assets:\n"); + for (auto& thisAsset : m_waitingAssets) + { + AZ_TracePrintf("AssetContainer", " %s\n",thisAsset.ToString().c_str()); + } #endif - } + } - void AssetContainer::AddWaitingAssets(const AZStd::vector& assetList) + void AssetContainer::ListWaitingPreloads([[maybe_unused]] const AssetId& assetId) const + { +#if defined(AZ_ENABLE_TRACING) + AZStd::lock_guard preloadGuard(m_preloadMutex); + auto preloadEntry = m_preloadList.find(assetId); + if (preloadEntry != m_preloadList.end()) { - AZStd::lock_guard lock(m_readyMutex); - for (auto& thisAsset : assetList) + AZ_TracePrintf("AssetContainer", "%s waiting on preloads : \n",assetId.ToString().c_str()); + for (auto& thisId : preloadEntry->second) { - if (m_waitingAssets.insert(thisAsset).second) - { - ++m_waitingCount; - AssetBus::MultiHandler::BusConnect(thisAsset); - AssetLoadBus::MultiHandler::BusConnect(thisAsset); - } + AZ_TracePrintf("AssetContainer", " %s\n",thisId.ToString().c_str()); } } - - void AssetContainer::AddWaitingAsset(const AssetId& thisAsset) + else + { + AZ_TracePrintf("AssetContainer", "%s isn't waiting on any preloads:\n", assetId.ToString().c_str()); + } +#endif + } + + void AssetContainer::AddWaitingAssets(const AZStd::vector& assetList) + { + AZStd::lock_guard lock(m_readyMutex); + for (auto& thisAsset : assetList) { - AZStd::lock_guard lock(m_readyMutex); if (m_waitingAssets.insert(thisAsset).second) { ++m_waitingCount; @@ -478,196 +481,207 @@ namespace AZ AssetLoadBus::MultiHandler::BusConnect(thisAsset); } } + } - void AssetContainer::RemoveWaitingAsset(const AssetId& thisAsset) + void AssetContainer::AddWaitingAsset(const AssetId& thisAsset) + { + AZStd::lock_guard lock(m_readyMutex); + if (m_waitingAssets.insert(thisAsset).second) { - bool allReady{ false }; - { - bool disconnectEbus = false; + ++m_waitingCount; + AssetBus::MultiHandler::BusConnect(thisAsset); + AssetLoadBus::MultiHandler::BusConnect(thisAsset); + } + } - { // Intentionally limiting lock scope - AZStd::lock_guard lock(m_readyMutex); - // If we're trying to remove something already removed, just ignore it - if (m_waitingAssets.erase(thisAsset)) - { - m_waitingCount -= 1; - disconnectEbus = true; + void AssetContainer::RemoveWaitingAsset(const AssetId& thisAsset) + { + bool allReady{ false }; + { + bool disconnectEbus = false; - } - if (m_waitingAssets.empty()) - { - allReady = true; - } - } - - if(disconnectEbus) + { // Intentionally limiting lock scope + AZStd::lock_guard lock(m_readyMutex); + // If we're trying to remove something already removed, just ignore it + if (m_waitingAssets.erase(thisAsset)) { - AssetBus::MultiHandler::BusDisconnect(thisAsset); - AssetLoadBus::MultiHandler::BusDisconnect(thisAsset); + m_waitingCount -= 1; + disconnectEbus = true; + + } + if (m_waitingAssets.empty()) + { + allReady = true; } } - // If there are no assets left to be loaded, trigger the final AssetContainer notification (ready or canceled). - // We guard against prematurely sending it (m_initComplete) because it's possible for assets to get removed from our waiting - // list *while* we're still building up the list, so the list would appear to be empty too soon. - // We also guard against sending it multiple times (m_finalNotificationSent), because in some error conditions, it may be - // possible to try to remove the same asset multiple times, which if it's the last asset, it could trigger multiple - // notifications. - if (allReady && m_initComplete && !m_finalNotificationSent) + if(disconnectEbus) { - m_finalNotificationSent = true; - if (m_rootAsset) - { - AssetManagerBus::Broadcast(&AssetManagerBus::Events::OnAssetContainerReady, this); - } - else - { - AssetManagerBus::Broadcast(&AssetManagerBus::Events::OnAssetContainerCanceled, this); - } + AssetBus::MultiHandler::BusDisconnect(thisAsset); + AssetLoadBus::MultiHandler::BusDisconnect(thisAsset); } } - AssetContainer::operator bool() const + // If there are no assets left to be loaded, trigger the final AssetContainer notification (ready or canceled). + // We guard against prematurely sending it (m_initComplete) because it's possible for assets to get removed from our waiting + // list *while* we're still building up the list, so the list would appear to be empty too soon. + // We also guard against sending it multiple times (m_finalNotificationSent), because in some error conditions, it may be + // possible to try to remove the same asset multiple times, which if it's the last asset, it could trigger multiple + // notifications. + if (allReady && m_initComplete && !m_finalNotificationSent) { - return m_rootAsset ? true : false; - } - - const AssetContainer::DependencyList& AssetContainer::GetDependencies() const - { - return m_dependencies; - } - - const AZStd::unordered_set& AssetContainer::GetUnloadedDependencies() const - { - return m_unloadedDependencies; - } - - void AssetContainer::SetupPreloadLists(PreloadAssetListType&& preloadList, const AssetId& rootAssetId) - { - if (!preloadList.empty()) + m_finalNotificationSent = true; + if (m_rootAsset) { - // This method can be entered as additional NoLoad dependency groups are loaded - the container could - // be in the middle of loading so we need to grab both mutexes. - AZStd::scoped_lock lock(m_readyMutex, m_preloadMutex); + AssetManagerBus::Broadcast(&AssetManagerBus::Events::OnAssetContainerReady, this); + } + else + { + AssetManagerBus::Broadcast(&AssetManagerBus::Events::OnAssetContainerCanceled, this); + } + } + } - for (auto thisListPair = preloadList.begin(); thisListPair != preloadList.end();) + AssetContainer::operator bool() const + { + return m_rootAsset ? true : false; + } + + const AssetContainer::DependencyList& AssetContainer::GetDependencies() const + { + return m_dependencies; + } + + const AZStd::unordered_set& AssetContainer::GetUnloadedDependencies() const + { + return m_unloadedDependencies; + } + + void AssetContainer::SetupPreloadLists(PreloadAssetListType&& preloadList, const AssetId& rootAssetId) + { + if (!preloadList.empty()) + { + // This method can be entered as additional NoLoad dependency groups are loaded - the container could + // be in the middle of loading so we need to grab both mutexes. + AZStd::scoped_lock lock(m_readyMutex, m_preloadMutex); + + for (auto thisListPair = preloadList.begin(); thisListPair != preloadList.end();) + { + // We only should add ourselves if we have another valid preload we're waiting on + bool foundAsset{ false }; + // It's possible this set of preload dependencies was culled out by lack of asset handler + // Or filtering rules. This is not an error, we should just remove it from the list of + // Preloads we're waiting on + if (!m_waitingAssets.count(thisListPair->first)) { - // We only should add ourselves if we have another valid preload we're waiting on - bool foundAsset{ false }; - // It's possible this set of preload dependencies was culled out by lack of asset handler - // Or filtering rules. This is not an error, we should just remove it from the list of - // Preloads we're waiting on - if (!m_waitingAssets.count(thisListPair->first)) + thisListPair = preloadList.erase(thisListPair); + continue; + } + for (auto thisAsset = thisListPair->second.begin(); thisAsset != thisListPair->second.end();) + { + // These are data errors. We'll emit the error but carry on. The container + // will load the assets but won't/can't create a circular preload dependency chain + if (*thisAsset == rootAssetId) { - thisListPair = preloadList.erase(thisListPair); + AZ_Error("AssetContainer", false, "Circular preload dependency found - %s has a preload" + "dependency back to root %s\n", + thisListPair->first.ToString().c_str(), + rootAssetId.ToString().c_str()); + thisAsset = thisListPair->second.erase(thisAsset); continue; } - for (auto thisAsset = thisListPair->second.begin(); thisAsset != thisListPair->second.end();) + else if (*thisAsset == thisListPair->first) { - // These are data errors. We'll emit the error but carry on. The container - // will load the assets but won't/can't create a circular preload dependency chain - if (*thisAsset == rootAssetId) - { - AZ_Error("AssetContainer", false, "Circular preload dependency found - %s has a preload" - "dependency back to root %s\n", - thisListPair->first.ToString().c_str(), - rootAssetId.ToString().c_str()); - thisAsset = thisListPair->second.erase(thisAsset); - continue; - } - else if (*thisAsset == thisListPair->first) - { - AZ_Error("AssetContainer", false, "Circular preload dependency found - Root asset %s has a preload" - "dependency on %s which depends back back to itself\n", - rootAssetId.ToString().c_str(), - thisListPair->first.ToString().c_str()); - thisAsset = thisListPair->second.erase(thisAsset); - continue; - } - else if (m_preloadWaitList.count(thisListPair->first) && m_preloadWaitList[thisListPair->first].count(*thisAsset)) - { - AZ_Error("AssetContainer", false, "Circular dependency found - Root asset %s has a preload" - "dependency on %s which has a circular dependency with %s\n", - rootAssetId.ToString().c_str(), - thisListPair->first.ToString().c_str(), - thisAsset->ToString().c_str()); - thisAsset = thisListPair->second.erase(thisAsset); - continue; - } - else if (m_waitingAssets.count(*thisAsset)) - { - foundAsset = true; - m_preloadWaitList[*thisAsset].insert(thisListPair->first); - ++thisAsset; - } - else - { - // This particular preload dependency of this asset was culled - // similar to the case above this can be due to no established asset handler - // or filtering rules. We'll just erase the entry because we're not loading this - thisAsset = thisListPair->second.erase(thisAsset); - continue; - } + AZ_Error("AssetContainer", false, "Circular preload dependency found - Root asset %s has a preload" + "dependency on %s which depends back back to itself\n", + rootAssetId.ToString().c_str(), + thisListPair->first.ToString().c_str()); + thisAsset = thisListPair->second.erase(thisAsset); + continue; } - if (foundAsset) + else if (m_preloadWaitList.count(thisListPair->first) && m_preloadWaitList[thisListPair->first].count(*thisAsset)) { - // We've established that this asset has at least one preload dependency it needs to wait on - // so we additionally add the waiting asset as its own preload so all of our "waiting assets" - // are managed in the same list. We can't consider this asset to be "ready" until all - // of its preloads are ready and it has been loaded. It will request an OnAssetDataLoaded - // notification from AssetManager rather than an OnAssetReady because of these additional dependencies. - thisListPair->second.insert(thisListPair->first); - m_preloadWaitList[thisListPair->first].insert(thisListPair->first); + AZ_Error("AssetContainer", false, "Circular dependency found - Root asset %s has a preload" + "dependency on %s which has a circular dependency with %s\n", + rootAssetId.ToString().c_str(), + thisListPair->first.ToString().c_str(), + thisAsset->ToString().c_str()); + thisAsset = thisListPair->second.erase(thisAsset); + continue; + } + else if (m_waitingAssets.count(*thisAsset)) + { + foundAsset = true; + m_preloadWaitList[*thisAsset].insert(thisListPair->first); + ++thisAsset; + } + else + { + // This particular preload dependency of this asset was culled + // similar to the case above this can be due to no established asset handler + // or filtering rules. We'll just erase the entry because we're not loading this + thisAsset = thisListPair->second.erase(thisAsset); + continue; } - ++thisListPair; } - for(auto& thisList : preloadList) + if (foundAsset) { - // Only save the entry to the final preload list if it has at least one dependent asset still remaining after - // the checks above. - if (!thisList.second.empty()) - { - m_preloadList[thisList.first].insert(thisList.second.begin(), thisList.second.end()); - } + // We've established that this asset has at least one preload dependency it needs to wait on + // so we additionally add the waiting asset as its own preload so all of our "waiting assets" + // are managed in the same list. We can't consider this asset to be "ready" until all + // of its preloads are ready and it has been loaded. It will request an OnAssetDataLoaded + // notification from AssetManager rather than an OnAssetReady because of these additional dependencies. + thisListPair->second.insert(thisListPair->first); + m_preloadWaitList[thisListPair->first].insert(thisListPair->first); + } + ++thisListPair; + } + for(auto& thisList : preloadList) + { + // Only save the entry to the final preload list if it has at least one dependent asset still remaining after + // the checks above. + if (!thisList.second.empty()) + { + m_preloadList[thisList.first].insert(thisList.second.begin(), thisList.second.end()); } } } + } - bool AssetContainer::HasPreloads(const AssetId& assetId) const + bool AssetContainer::HasPreloads(const AssetId& assetId) const + { + AZStd::lock_guard preloadGuard(m_preloadMutex); + auto preloadEntry = m_preloadList.find(assetId); + if (preloadEntry != m_preloadList.end()) { - AZStd::lock_guard preloadGuard(m_preloadMutex); - auto preloadEntry = m_preloadList.find(assetId); - if (preloadEntry != m_preloadList.end()) - { - return !preloadEntry->second.empty(); - } - return false; + return !preloadEntry->second.empty(); } + return false; + } - Asset AssetContainer::GetAssetData(const AssetId& assetId) const + Asset AssetContainer::GetAssetData(const AssetId& assetId) const + { + AZStd::lock_guard dependenciesGuard(m_dependencyMutex); + if (auto rootAsset = m_rootAsset.GetStrongReference(); rootAsset.GetId() == assetId) { - AZStd::lock_guard dependenciesGuard(m_dependencyMutex); - if (auto rootAsset = m_rootAsset.GetStrongReference(); rootAsset.GetId() == assetId) - { - return rootAsset; - } - auto dependencyIter = m_dependencies.find(assetId); - if (dependencyIter != m_dependencies.end()) - { - return dependencyIter->second; - } - AZ_Warning("AssetContainer", false, "Asset %s not found in container", assetId.ToString().c_str()); - return {}; + return rootAsset; } + auto dependencyIter = m_dependencies.find(assetId); + if (dependencyIter != m_dependencies.end()) + { + return dependencyIter->second; + } + AZ_Warning("AssetContainer", false, "Asset %s not found in container", assetId.ToString().c_str()); + return {}; + } - int AssetContainer::GetNumWaitingDependencies() const - { - return m_waitingCount.load(); - } + int AssetContainer::GetNumWaitingDependencies() const + { + return m_waitingCount.load(); + } - int AssetContainer::GetInvalidDependencies() const - { - return m_invalidDependencies.load(); - } - } // namespace Data -} // namespace AZ + int AssetContainer::GetInvalidDependencies() const + { + return m_invalidDependencies.load(); + } +} // namespace AZ::Data diff --git a/Code/Framework/AzCore/AzCore/Asset/AssetContainer.h b/Code/Framework/AzCore/AzCore/Asset/AssetContainer.h index e0091d678f..a05343ed0b 100644 --- a/Code/Framework/AzCore/AzCore/Asset/AssetContainer.h +++ b/Code/Framework/AzCore/AzCore/Asset/AssetContainer.h @@ -24,8 +24,8 @@ namespace AZ // AssetContainer loads an asset and all of its dependencies as a collection which is parallellized as much as possible. // With the container, the data will all load in parallel. Dependent asset loads will still obey the expected rules - // where PreLoad assets will emit OnAssetReady before the parent does, and QueueLoad assets will emit OnAssetReady in - // no guaranteed order. However, the OnAssetContainerReady signals will not emit until all PreLoad and QueueLoad assets + // where PreLoad assets will emit OnAssetReady before the parent does, and QueueLoad assets will emit OnAssetReady in + // no guaranteed order. However, the OnAssetContainerReady signals will not emit until all PreLoad and QueueLoad assets // are ready. NoLoad dependencies are not loaded by default but can be loaded along with their dependencies using the // same rules as above by using the LoadAll dependency rule. class AssetContainer : @@ -36,7 +36,7 @@ namespace AZ AZ_CLASS_ALLOCATOR(AssetContainer, SystemAllocator, 0); AssetContainer() = default; - + AssetContainer(Asset asset, const AssetLoadParameters& loadParams); ~AssetContainer(); @@ -81,6 +81,10 @@ namespace AZ // AssetLoadBus void OnAssetDataLoaded(AZ::Data::Asset asset) override; protected: + + virtual AZStd::vector>> CreateAndQueueDependentAssets( + const AZStd::vector& dependencyInfoList, const AssetLoadParameters& loadParamsCopyWithNoLoadingFilter); + // Waiting assets are those which have not yet signalled ready. In the case of PreLoad dependencies the data may have completed the load cycle but // the Assets aren't considered "Ready" yet if there are PreLoad dependencies still loading and will still be in the list until the point that asset and // All of its preload dependencies have been loaded, when it signals OnAssetReady @@ -97,7 +101,7 @@ namespace AZ void AddDependency(Asset&& addDependency); // Add a "graph section" to our list of dependencies. This checks the catalog for all Pre and Queue load assets which are dependents of the requested asset and kicks off loads - // NoLoads which are encounted are placed in another list and can be loaded on demand with the LoadDependency call. + // NoLoads which are encounted are placed in another list and can be loaded on demand with the LoadDependency call. void AddDependentAssets(Asset rootAsset, const AssetLoadParameters& loadParams); // If "PreLoad" assets are found in the graph these are cached and tracked with both OnAssetReady and OnAssetDataLoaded messages. @@ -117,7 +121,7 @@ namespace AZ // duringInit if we're coming from the checkReady method - containers that start ready don't need to signal void HandleReadyAsset(AZ::Data::Asset asset); - // Optimization to save the lookup in the dependencies map + // Optimization to save the lookup in the dependencies map AssetInternal::WeakAsset m_rootAsset; // The root asset id is stored here semi-redundantly on initialization so that we can still refer to it even if the @@ -136,7 +140,7 @@ namespace AZ AZStd::atomic_bool m_finalNotificationSent{false}; mutable AZStd::recursive_mutex m_preloadMutex; - // AssetId -> List of assets it is still waiting on + // AssetId -> List of assets it is still waiting on PreloadAssetListType m_preloadList; // AssetId -> List of assets waiting on it diff --git a/Code/Framework/AzCore/AzCore/Asset/AssetDataStream.cpp b/Code/Framework/AzCore/AzCore/Asset/AssetDataStream.cpp index 305ec0617b..4794b04626 100644 --- a/Code/Framework/AzCore/AzCore/Asset/AssetDataStream.cpp +++ b/Code/Framework/AzCore/AzCore/Asset/AssetDataStream.cpp @@ -83,7 +83,7 @@ namespace AZ::Data AZ_PROFILE_SCOPE(AzCore, "AZ::Data::LoadAssetDataStreamCallback %s", m_filePath.c_str()); - // Get the results + // Get the results auto streamer = AZ::Interface::Get(); AZ::u64 bytesRead = 0; streamer->GetReadRequestResult(fileHandle, m_buffer, bytesRead, diff --git a/Code/Framework/AzCore/AzCore/Asset/AssetDataStream.h b/Code/Framework/AzCore/AzCore/Asset/AssetDataStream.h index 62f5808207..79822c8db2 100644 --- a/Code/Framework/AzCore/AzCore/Asset/AssetDataStream.h +++ b/Code/Framework/AzCore/AzCore/Asset/AssetDataStream.h @@ -70,6 +70,9 @@ namespace AZ::Data const char* GetFilename() const override { return m_filePath.c_str(); } + AZStd::chrono::milliseconds GetStreamingDeadline() const { return m_curDeadline; } + AZ::IO::IStreamerTypes::Priority GetStreamingPriority() const { return m_curPriority; } + // AssetDataStream specific APIs //! Whether or not all data has been loaded. @@ -97,7 +100,7 @@ namespace AZ::Data //! The path and file name of the asset being loaded AZStd::string m_filePath; - //! The offset into the file to start loading at. + //! The offset into the file to start loading at. size_t m_fileOffset{ 0 }; //! The amount of data that's expected to be loaded. diff --git a/Code/Framework/AzCore/AzCore/Asset/AssetJsonSerializer.cpp b/Code/Framework/AzCore/AzCore/Asset/AssetJsonSerializer.cpp index 3fa3b39ca5..0d28036646 100644 --- a/Code/Framework/AzCore/AzCore/Asset/AssetJsonSerializer.cpp +++ b/Code/Framework/AzCore/AzCore/Asset/AssetJsonSerializer.cpp @@ -12,207 +12,204 @@ #include #include -namespace AZ +namespace AZ::Data { - namespace Data + AZ_CLASS_ALLOCATOR_IMPL(AssetJsonSerializer, SystemAllocator, 0); + + JsonSerializationResult::Result AssetJsonSerializer::Load(void* outputValue, const Uuid& /*outputValueTypeId*/, + const rapidjson::Value& inputValue, JsonDeserializerContext& context) { - AZ_CLASS_ALLOCATOR_IMPL(AssetJsonSerializer, SystemAllocator, 0); + namespace JSR = JsonSerializationResult; - JsonSerializationResult::Result AssetJsonSerializer::Load(void* outputValue, const Uuid& /*outputValueTypeId*/, - const rapidjson::Value& inputValue, JsonDeserializerContext& context) + switch (inputValue.GetType()) { - namespace JSR = JsonSerializationResult; + case rapidjson::kObjectType: + return LoadAsset(outputValue, inputValue, context); + case rapidjson::kArrayType: // fall through + case rapidjson::kNullType: // fall through + case rapidjson::kStringType: // fall through + case rapidjson::kFalseType: // fall through + case rapidjson::kTrueType: // fall through + case rapidjson::kNumberType: + return context.Report(JSR::Tasks::ReadField, JSR::Outcomes::Unsupported, + "Unsupported type. Asset can only be read from an object."); - switch (inputValue.GetType()) + default: + return context.Report(JSR::Tasks::ReadField, JSR::Outcomes::Unknown, "Unknown json type encountered for Asset."); + } + } + + JsonSerializationResult::Result AssetJsonSerializer::Store(rapidjson::Value& outputValue, const void* inputValue, + const void* defaultValue, const Uuid& /*valueTypeId*/, JsonSerializerContext& context) + { + namespace JSR = JsonSerializationResult; + + const Asset* instance = reinterpret_cast*>(inputValue); + const Asset* defaultInstance = reinterpret_cast*>(defaultValue); + + JSR::ResultCode result(JSR::Tasks::WriteValue); + { + ScopedContextPath subPathId(context, "m_assetId"); + const auto* id = &instance->GetId(); + const auto* defaultId = defaultInstance ? &defaultInstance->GetId() : nullptr; + rapidjson::Value assetIdValue; + result = ContinueStoring(assetIdValue, id, defaultId, azrtti_typeid(), context); + if (result.GetOutcome() == JSR::Outcomes::Success || result.GetOutcome() == JSR::Outcomes::PartialDefaults) { - case rapidjson::kObjectType: - return LoadAsset(outputValue, inputValue, context); - case rapidjson::kArrayType: // fall through - case rapidjson::kNullType: // fall through - case rapidjson::kStringType: // fall through - case rapidjson::kFalseType: // fall through - case rapidjson::kTrueType: // fall through - case rapidjson::kNumberType: - return context.Report(JSR::Tasks::ReadField, JSR::Outcomes::Unsupported, - "Unsupported type. Asset can only be read from an object."); - - default: - return context.Report(JSR::Tasks::ReadField, JSR::Outcomes::Unknown, "Unknown json type encountered for Asset."); + if (!outputValue.IsObject()) + { + outputValue.SetObject(); + } + outputValue.AddMember(rapidjson::StringRef("assetId"), AZStd::move(assetIdValue), context.GetJsonAllocator()); } } - JsonSerializationResult::Result AssetJsonSerializer::Store(rapidjson::Value& outputValue, const void* inputValue, - const void* defaultValue, const Uuid& /*valueTypeId*/, JsonSerializerContext& context) { - namespace JSR = JsonSerializationResult; + const AZ::Data::AssetLoadBehavior autoLoadBehavior = instance->GetAutoLoadBehavior(); + const AZ::Data::AssetLoadBehavior defaultAutoLoadBehavior = defaultInstance ? + defaultInstance->GetAutoLoadBehavior() : AZ::Data::AssetLoadBehavior::Default; - const Asset* instance = reinterpret_cast*>(inputValue); - const Asset* defaultInstance = reinterpret_cast*>(defaultValue); - - JSR::ResultCode result(JSR::Tasks::WriteValue); - { - ScopedContextPath subPathId(context, "m_assetId"); - const auto* id = &instance->GetId(); - const auto* defaultId = defaultInstance ? &defaultInstance->GetId() : nullptr; - rapidjson::Value assetIdValue; - result = ContinueStoring(assetIdValue, id, defaultId, azrtti_typeid(), context); - if (result.GetOutcome() == JSR::Outcomes::Success || result.GetOutcome() == JSR::Outcomes::PartialDefaults) - { - if (!outputValue.IsObject()) - { - outputValue.SetObject(); - } - outputValue.AddMember(rapidjson::StringRef("assetId"), AZStd::move(assetIdValue), context.GetJsonAllocator()); - } - } - - { - const AZ::Data::AssetLoadBehavior autoLoadBehavior = instance->GetAutoLoadBehavior(); - const AZ::Data::AssetLoadBehavior defaultAutoLoadBehavior = defaultInstance ? - defaultInstance->GetAutoLoadBehavior() : AZ::Data::AssetLoadBehavior::Default; - - result.Combine( - ContinueStoringToJsonObjectField(outputValue, "loadBehavior", - &autoLoadBehavior, &defaultAutoLoadBehavior, - azrtti_typeid(), context)); - } - - { - ScopedContextPath subPathHint(context, "m_assetHint"); - const AZStd::string* hint = &instance->GetHint(); - const AZStd::string defaultHint; - rapidjson::Value assetHintValue; - JSR::ResultCode resultHint = ContinueStoring(assetHintValue, hint, &defaultHint, azrtti_typeid(), context); - if (resultHint.GetOutcome() == JSR::Outcomes::Success || resultHint.GetOutcome() == JSR::Outcomes::PartialDefaults) - { - if (!outputValue.IsObject()) - { - outputValue.SetObject(); - } - outputValue.AddMember(rapidjson::StringRef("assetHint"), AZStd::move(assetHintValue), context.GetJsonAllocator()); - } - result.Combine(resultHint); - } - - return context.Report(result, - result.GetProcessing() == JSR::Processing::Completed ? "Successfully stored Asset." : "Failed to store Asset."); + result.Combine( + ContinueStoringToJsonObjectField(outputValue, "loadBehavior", + &autoLoadBehavior, &defaultAutoLoadBehavior, + azrtti_typeid(), context)); } - JsonSerializationResult::Result AssetJsonSerializer::LoadAsset(void* outputValue, const rapidjson::Value& inputValue, - JsonDeserializerContext& context) { - namespace JSR = JsonSerializationResult; - - Asset* instance = reinterpret_cast*>(outputValue); - AssetId id; - JSR::ResultCode result(JSR::Tasks::ReadField); - - SerializedAssetTracker* assetTracker = - context.GetMetadata().Find(); - + ScopedContextPath subPathHint(context, "m_assetHint"); + const AZStd::string* hint = &instance->GetHint(); + const AZStd::string defaultHint; + rapidjson::Value assetHintValue; + JSR::ResultCode resultHint = ContinueStoring(assetHintValue, hint, &defaultHint, azrtti_typeid(), context); + if (resultHint.GetOutcome() == JSR::Outcomes::Success || resultHint.GetOutcome() == JSR::Outcomes::PartialDefaults) { - Data::AssetLoadBehavior loadBehavior = instance->GetAutoLoadBehavior(); - - result = - ContinueLoadingFromJsonObjectField(&loadBehavior, - azrtti_typeid(), - inputValue, "loadBehavior", context); - - instance->SetAutoLoadBehavior(loadBehavior); + if (!outputValue.IsObject()) + { + outputValue.SetObject(); + } + outputValue.AddMember(rapidjson::StringRef("assetHint"), AZStd::move(assetHintValue), context.GetJsonAllocator()); } + result.Combine(resultHint); + } - auto it = inputValue.FindMember("assetId"); - if (it != inputValue.MemberEnd()) + return context.Report(result, + result.GetProcessing() == JSR::Processing::Completed ? "Successfully stored Asset." : "Failed to store Asset."); + } + + JsonSerializationResult::Result AssetJsonSerializer::LoadAsset(void* outputValue, const rapidjson::Value& inputValue, + JsonDeserializerContext& context) + { + namespace JSR = JsonSerializationResult; + + Asset* instance = reinterpret_cast*>(outputValue); + AssetId id; + JSR::ResultCode result(JSR::Tasks::ReadField); + + SerializedAssetTracker* assetTracker = + context.GetMetadata().Find(); + + { + Data::AssetLoadBehavior loadBehavior = instance->GetAutoLoadBehavior(); + + result = + ContinueLoadingFromJsonObjectField(&loadBehavior, + azrtti_typeid(), + inputValue, "loadBehavior", context); + + instance->SetAutoLoadBehavior(loadBehavior); + } + + auto it = inputValue.FindMember("assetId"); + if (it != inputValue.MemberEnd()) + { + ScopedContextPath subPath(context, "assetId"); + result.Combine(ContinueLoading(&id, azrtti_typeid(), it->value, context)); + if (!id.m_guid.IsNull()) { - ScopedContextPath subPath(context, "assetId"); - result.Combine(ContinueLoading(&id, azrtti_typeid(), it->value, context)); - if (!id.m_guid.IsNull()) + *instance = AssetManager::Instance().FindOrCreateAsset(id, instance->GetType(), instance->GetAutoLoadBehavior()); + if (!instance->GetId().IsValid()) { - *instance = AssetManager::Instance().FindOrCreateAsset(id, instance->GetType(), instance->GetAutoLoadBehavior()); - if (!instance->GetId().IsValid()) - { - // If the asset failed to be created, FindOrCreateAsset returns an asset instance with a null - // id. To preserve the asset id in the source json, reset the asset to an empty one, but with - // the right id. - const auto loadBehavior = instance->GetAutoLoadBehavior(); - *instance = Asset(id, instance->GetType()); - instance->SetAutoLoadBehavior(loadBehavior); - } + // If the asset failed to be created, FindOrCreateAsset returns an asset instance with a null + // id. To preserve the asset id in the source json, reset the asset to an empty one, but with + // the right id. + const auto loadBehavior = instance->GetAutoLoadBehavior(); + *instance = Asset(id, instance->GetType()); + instance->SetAutoLoadBehavior(loadBehavior); + } - result.Combine(context.Report(result, "Successfully created Asset with id.")); - } - else if (result.GetProcessing() == JSR::Processing::Completed) - { - result.Combine(context.Report(JSR::Tasks::ReadField, JSR::Outcomes::DefaultsUsed, - "Null Asset created.")); - } - else - { - result.Combine(context.Report(result, "Failed to retrieve asset id for Asset.")); - } + result.Combine(context.Report(result, "Successfully created Asset with id.")); + } + else if (result.GetProcessing() == JSR::Processing::Completed) + { + result.Combine(context.Report(JSR::Tasks::ReadField, JSR::Outcomes::DefaultsUsed, + "Null Asset created.")); } else { - result.Combine(context.Report(JSR::Tasks::ReadField, JSR::Outcomes::DefaultsUsed, - "The asset id is missing, so there's not enough information to create an Asset.")); - } - - it = inputValue.FindMember("assetHint"); - if (it != inputValue.MemberEnd()) - { - ScopedContextPath subPath(context, "assetHint"); - AZStd::string hint; - result.Combine(ContinueLoading(&hint, azrtti_typeid(), it->value, context)); - instance->SetHint(AZStd::move(hint)); - } - else - { - result.Combine(context.Report(JSR::Tasks::ReadField, JSR::Outcomes::DefaultsUsed, - "The asset hint is missing for Asset, so it will be left empty.")); - } - - if (assetTracker) - { - assetTracker->FixUpAsset(*instance); - assetTracker->AddAsset(*instance); - } - - bool success = result.GetOutcome() <= JSR::Outcomes::PartialSkip; - bool defaulted = result.GetOutcome() == JSR::Outcomes::DefaultsUsed || result.GetOutcome() == JSR::Outcomes::PartialDefaults; - AZStd::string_view message = - success ? "Successfully loaded information and created instance of Asset." : - defaulted ? "A default id was provided for Asset, so no instance could be created." : - "Not enough information was available to create an instance of Asset or data was corrupted."; - return context.Report(result, message); - } - - void SerializedAssetTracker::SetAssetFixUp(AssetFixUp assetFixUpCallback) - { - m_assetFixUpCallback = AZStd::move(assetFixUpCallback); - } - - void SerializedAssetTracker::FixUpAsset(Asset& asset) - { - if (m_assetFixUpCallback) - { - m_assetFixUpCallback(asset); + result.Combine(context.Report(result, "Failed to retrieve asset id for Asset.")); } } - - void SerializedAssetTracker::AddAsset(Asset asset) + else { - m_serializedAssets.emplace_back(asset); + result.Combine(context.Report(JSR::Tasks::ReadField, JSR::Outcomes::DefaultsUsed, + "The asset id is missing, so there's not enough information to create an Asset.")); } - const AZStd::vector>& SerializedAssetTracker::GetTrackedAssets() const + it = inputValue.FindMember("assetHint"); + if (it != inputValue.MemberEnd()) { - return m_serializedAssets; + ScopedContextPath subPath(context, "assetHint"); + AZStd::string hint; + result.Combine(ContinueLoading(&hint, azrtti_typeid(), it->value, context)); + instance->SetHint(AZStd::move(hint)); + } + else + { + result.Combine(context.Report(JSR::Tasks::ReadField, JSR::Outcomes::DefaultsUsed, + "The asset hint is missing for Asset, so it will be left empty.")); } - AZStd::vector>& SerializedAssetTracker::GetTrackedAssets() + if (assetTracker) { - return m_serializedAssets; + assetTracker->FixUpAsset(*instance); + assetTracker->AddAsset(*instance); } - } // namespace Data -} // namespace AZ + bool success = result.GetOutcome() <= JSR::Outcomes::PartialSkip; + bool defaulted = result.GetOutcome() == JSR::Outcomes::DefaultsUsed || result.GetOutcome() == JSR::Outcomes::PartialDefaults; + AZStd::string_view message = + success ? "Successfully loaded information and created instance of Asset." : + defaulted ? "A default id was provided for Asset, so no instance could be created." : + "Not enough information was available to create an instance of Asset or data was corrupted."; + return context.Report(result, message); + } + + void SerializedAssetTracker::SetAssetFixUp(AssetFixUp assetFixUpCallback) + { + m_assetFixUpCallback = AZStd::move(assetFixUpCallback); + } + + void SerializedAssetTracker::FixUpAsset(Asset& asset) + { + if (m_assetFixUpCallback) + { + m_assetFixUpCallback(asset); + } + } + + void SerializedAssetTracker::AddAsset(Asset asset) + { + m_serializedAssets.emplace_back(asset); + } + + const AZStd::vector>& SerializedAssetTracker::GetTrackedAssets() const + { + return m_serializedAssets; + } + + AZStd::vector>& SerializedAssetTracker::GetTrackedAssets() + { + return m_serializedAssets; + } + +} // namespace AZ::Data diff --git a/Code/Framework/AzCore/AzCore/Asset/AssetManager.cpp b/Code/Framework/AzCore/AzCore/Asset/AssetManager.cpp index 06bb0b0cac..afe3330bd3 100644 --- a/Code/Framework/AzCore/AzCore/Asset/AssetManager.cpp +++ b/Code/Framework/AzCore/AzCore/Asset/AssetManager.cpp @@ -10,7 +10,6 @@ #include #include #include -#include #include #include #include @@ -27,2165 +26,2162 @@ #include #include -namespace AZ +namespace AZ::Data { - namespace Data + AZ_CVAR(bool, cl_assetLoadWarningEnable, false, nullptr, AZ::ConsoleFunctorFlags::Null, + "Enable warnings that show when AssetHandler::LoadAssetData has exceeded the time set in cl_assetLoadWarningMsThreshold."); + AZ_CVAR(uint32_t, cl_assetLoadWarningMsThreshold, 100, nullptr, AZ::ConsoleFunctorFlags::Null, + "Number of milliseconds that AssetHandler::LoadAssetData can execute for before printing a warning."); + AZ_CVAR(int, cl_assetLoadDelay, 0, nullptr, AZ::ConsoleFunctorFlags::Null, + "Number of milliseconds to artifically delay an asset load."); + AZ_CVAR(bool, cl_assetLoadError, false, nullptr, AZ::ConsoleFunctorFlags::Null, + "Enable failure of all asset loads."); + + static constexpr char kAssetDBInstanceVarName[] = "AssetDatabaseInstance"; + + /* + * This is the base class for Async AssetDatabase jobs + */ + class AssetDatabaseAsyncJob + : public AssetDatabaseJob + , public Job { - AZ_CVAR(bool, cl_assetLoadWarningEnable, false, nullptr, AZ::ConsoleFunctorFlags::Null, - "Enable warnings that show when AssetHandler::LoadAssetData has exceeded the time set in cl_assetLoadWarningMsThreshold."); - AZ_CVAR(uint32_t, cl_assetLoadWarningMsThreshold, 100, nullptr, AZ::ConsoleFunctorFlags::Null, - "Number of milliseconds that AssetHandler::LoadAssetData can execute for before printing a warning."); - AZ_CVAR(int, cl_assetLoadDelay, 0, nullptr, AZ::ConsoleFunctorFlags::Null, - "Number of milliseconds to artifically delay an asset load."); - AZ_CVAR(bool, cl_assetLoadError, false, nullptr, AZ::ConsoleFunctorFlags::Null, - "Enable failure of all asset loads."); - - static constexpr char kAssetDBInstanceVarName[] = "AssetDatabaseInstance"; - - /* - * This is the base class for Async AssetDatabase jobs - */ - class AssetDatabaseAsyncJob - : public AssetDatabaseJob - , public Job + public: + AssetDatabaseAsyncJob(JobContext* jobContext, bool deleteWhenDone, AssetManager* owner, const Asset& asset, AssetHandler* assetHandler) + : AssetDatabaseJob(owner, asset, assetHandler) + , Job(deleteWhenDone, jobContext) { - public: - AssetDatabaseAsyncJob(JobContext* jobContext, bool deleteWhenDone, AssetManager* owner, const Asset& asset, AssetHandler* assetHandler) - : AssetDatabaseJob(owner, asset, assetHandler) - , Job(deleteWhenDone, jobContext) - { - } + } - ~AssetDatabaseAsyncJob() override - { - } - }; - - /** - * Internally allows threads blocking on asset loads to be notified on load completion. - */ - class BlockingAssetLoadEvents - : public EBusTraits + ~AssetDatabaseAsyncJob() override { - public: - ////////////////////////////////////////////////////////////////////////// - // EBusTraits overrides - static const AZ::EBusAddressPolicy AddressPolicy = AZ::EBusAddressPolicy::ById; - using BusIdType = AssetId; - using MutexType = AZStd::recursive_mutex; - - template - struct AssetJobConnectionPolicy - : public EBusConnectionPolicy - { - static void Connect(typename Bus::BusPtr& busPtr, typename Bus::Context& context, typename Bus::HandlerNode& handler, typename Bus::Context::ConnectLockGuard& connectLock, const typename Bus::BusIdType& id = 0) - { - typename Bus::BusIdType actualId = AssetInternal::ResolveAssetId(id); - EBusConnectionPolicy::Connect(busPtr, context, handler, connectLock, actualId); - - // If the asset is loaded or failed already, deliver the status update immediately - // Note that we check IsReady here, ReadyPreNotify must be tested because there is - // a small gap between ReadyPreNotify and Ready where the callback could be missed. - // Also note because the Asset<> reference isn't passed around anywhere, it doesn't matter - // what the AssetLoadBehavior is set to, as it will never make it back to any callers. - Asset assetData(AssetInternal::GetAssetData(actualId, AssetLoadBehavior::Default)); - if (assetData) - { - if (assetData->IsReady() || assetData->IsError()) - { - connectLock.unlock(); - handler->OnLoadComplete(); - } - } - } - }; - - template - using ConnectionPolicy = AssetJobConnectionPolicy; - - virtual void OnLoadComplete() = 0; - virtual void OnLoadCanceled(AssetId assetId) = 0; - }; - - using BlockingAssetLoadBus = EBus; - - /* - * This class processes async AssetDatabase load jobs - */ - class LoadAssetJob - : public AssetDatabaseAsyncJob - { - public: - AZ_CLASS_ALLOCATOR(LoadAssetJob, ThreadPoolAllocator, 0); - - LoadAssetJob(AssetManager* owner, const Asset& asset, - AZStd::shared_ptr dataStream, bool isReload, AZ::IO::IStreamerTypes::RequestStatus requestState, - AssetHandler* handler, const AssetLoadParameters& loadParams, bool signalLoaded) - : AssetDatabaseAsyncJob(JobContext::GetGlobalContext(), true, owner, asset, handler) - , m_dataStream(dataStream) - , m_isReload(isReload) - , m_requestState(requestState) - , m_loadParams(loadParams) - , m_signalLoaded(signalLoaded) - { - AZ_Assert(m_dataStream, "Data stream pointer received through the callback from AZ::IO::Streamer is invalid."); - - AZ_Assert((m_requestState == AZ::IO::IStreamerTypes::RequestStatus::Completed) - || (m_requestState == AZ::IO::IStreamerTypes::RequestStatus::Canceled) - || (m_requestState == AZ::IO::IStreamerTypes::RequestStatus::Failed), - "AssetManager::LoadAssetJob was called with an unexpected streamer state: %i", m_requestState); - } - - ~LoadAssetJob() override - { - } - - void Process() override - { - Asset asset = m_asset.GetStrongReference(); - - // Verify that we didn't somehow get here after the Asset Manager has finished shutting down. - AZ_Assert(AssetManager::IsReady(), "Asset Manager shutdown didn't clean up pending asset loads properly."); - if (!AssetManager::IsReady()) - { - return; - } - - bool shouldCancel = m_owner->ShouldCancelAllActiveJobs() - || !asset // No outstanding references, so cancel the load - || m_requestState == AZ::IO::IStreamerTypes::RequestStatus::Canceled; - - if (shouldCancel) - { - BlockingAssetLoadBus::Event(m_asset.GetId(), &BlockingAssetLoadBus::Events::OnLoadCanceled, m_asset.GetId()); - AssetManagerBus::Broadcast(&AssetManagerBus::Events::OnAssetCanceled, m_asset.GetId()); - } - else - { - - AZ_PROFILE_SCOPE(AzCore, "AZ::Data::LoadAssetJob::Process: %s", - asset.GetHint().c_str()); - - AZ_ASSET_ATTACH_TO_SCOPE(this); - - if (m_owner->ValidateAndRegisterAssetLoading(asset)) - { - LoadAndSignal(asset); - } - } - } - - void LoadAndSignal(Asset& asset) - { - const bool loadSucceeded = LoadData(); - - if (m_signalLoaded && loadSucceeded) - { - AZ_Assert(!m_isReload, "OnAssetDataLoaded signal isn't supported for asset reloads."); - // This asset has preload dependencies, we need to evaluate whether they're all ready before calling PostLoad - AssetLoadBus::Event(asset.GetId(), &AssetLoadBus::Events::OnAssetDataLoaded, asset); - } - else - { - // As long as we don't need to signal preload dependencies, just finish the load whether or not it was successful. - m_owner->PostLoad(asset, loadSucceeded, m_isReload, m_assetHandler); - } - } - - bool LoadData() - { - Asset asset = m_asset.GetStrongReference(); - - if(cl_assetLoadDelay > 0) - { - AZ_PROFILE_SCOPE(AzCore, "LoadData suspended"); - AZStd::this_thread::sleep_for(AZStd::chrono::milliseconds(cl_assetLoadDelay)); - } - - AZ_ASSET_NAMED_SCOPE(asset.GetHint().c_str()); - bool loadedSuccessfully = false; - - if (!cl_assetLoadError && m_requestState == AZ::IO::IStreamerTypes::RequestStatus::Completed) - { - if (m_dataStream->IsFullyLoaded()) - { - AssetHandler::LoadResult result = - m_assetHandler->LoadAssetDataFromStream(asset, m_dataStream, m_loadParams.m_assetLoadFilterCB); - loadedSuccessfully = (result == AssetHandler::LoadResult::LoadComplete); - } - } - - return loadedSuccessfully; - } - - private: - AZStd::shared_ptr m_dataStream; - AssetLoadParameters m_loadParams{}; - AZ::IO::IStreamerTypes::RequestStatus m_requestState{ AZ::IO::IStreamerTypes::RequestStatus::Pending}; - bool m_isReload{ false }; - bool m_signalLoaded{ false }; - }; - - - /** - * Utility class to wait when a blocking load is requested for an asset that's already loading asynchronously. - * Uses the BlockingAssetLoadBus to detect completion, and a semaphore to signal it. - */ - - class WaitForAsset - : public BlockingAssetLoadBus::Handler - { - public: - AZ_CLASS_ALLOCATOR(WaitForAsset, ThreadPoolAllocator, 0); - - - WaitForAsset(const Asset& assetToWaitFor, bool shouldDispatchEvents) - : m_assetData(assetToWaitFor) - , m_shouldDispatchEvents(shouldDispatchEvents) - { - // Track all blocking requests with the AssetManager. This enables load jobs to potentially get routed - // to the thread that's currently blocking waiting on the load job to complete. - AssetManager::Instance().AddBlockingRequest(m_assetData.GetId(), this); - } - - ~WaitForAsset() override - { - // Stop tracking the blocking request, which will ensure that load jobs won't be provided to this instance - // for processing. - AssetManager::Instance().RemoveBlockingRequest(m_assetData.GetId(), this); - - // It shouldn't be possible to destroy a blocking load request before the load job that it's blocked on - // has been processed, so assert if it ever happens, but make sure to process it just in case. - if (m_loadJob) - { - // (If a valid case is ever found where this can occur, it should be safe to remove the assert) - AZ_Assert(false, "Blocking load request is being deleted before it could process the blocking load."); - ProcessLoadJob(); - } - } - - // Provides a blocked load with a LoadJob to process while it's blocking. - // Returns true if it can be queued, false if it can't. - bool QueueAssetLoadJob(LoadAssetJob* loadJob) - { - if(m_shouldDispatchEvents) - { - // Any load job that is going to be dispatching events should not accept additional work since dispatching events - // can lead to more code that's blocking on an asset load which prevents us from finishing the dispatch - // and doing the assigned work. - // Specifically, if dispatching leads to a second block call, the load job will be assigned to the first block call, - // which will never be completed until the second block call is finished. If both blocks are on the same asset, - // we end up deadlocked. - return false; - } - - AZStd::scoped_lock mutexLock(m_loadJobMutex); - - AZ_Assert(!m_loadJob, "Trying to process multiple load jobs for the same asset with the same blocking handler."); - if (!m_loadJob) - { - m_loadJob = loadJob; - m_waitEvent.release(); - return true; - } - - return false; - } - - void OnLoadComplete() override - { - Finish(); - } - - void OnLoadCanceled([[maybe_unused]] const AssetId assetId) override - { - Finish(); - } - - void WaitUntilReady() - { - BusConnect(m_assetData.GetId()); - - Wait(); - - BusDisconnect(m_assetData.GetId()); - } - - protected: - void Wait() - { - AZ_PROFILE_SCOPE(AzCore, "WaitForAsset - %s", m_assetData.GetHint().c_str()); - - // Continue to loop until the load completes. (Most of the time in the loop will be spent in a thread-blocking state) - while (!m_loadCompleted) - { - if (m_shouldDispatchEvents) - { - // The event will wake up either when the load finishes, a load job is queued for processing, or every - // N milliseconds to see if it should dispatch events. - constexpr int MaxWaitBetweenDispatchMs = 1; - while (!m_waitEvent.try_acquire_for(AZStd::chrono::milliseconds(MaxWaitBetweenDispatchMs))) - { - AssetManager::Instance().DispatchEvents(); - } - } - else - { - - // Don't wake up until a load job is queued for processing or the load is entirely finished. - m_waitEvent.acquire(); - } - - // Check to see if any load jobs have been provided for this thread to process. - // (Load jobs will attempt to reuse blocked threads before spinning off new job threads) - ProcessLoadJob(); - } - - // Pump the AssetBus function queue once more after the load has completed in case additional - // functions have been queued between the last call to DispatchEvents and the completion - // of the current load job - if (m_shouldDispatchEvents) - { - AssetManager::Instance().DispatchEvents(); - } - } - - void Finish() - { - AZ_PROFILE_FUNCTION(AzCore); - m_loadCompleted = true; - m_waitEvent.release(); - } - - bool ProcessLoadJob() - { - AZStd::scoped_lock mutexLock(m_loadJobMutex); - bool jobProcessed = false; - - if (m_loadJob) - { - m_loadJob->Process(); - if (m_loadJob->IsAutoDelete()) - { - delete m_loadJob; - } - m_loadJob = nullptr; - jobProcessed = true; - } - - return jobProcessed; - } - - Asset m_assetData; - AZStd::binary_semaphore m_waitEvent; - const bool m_shouldDispatchEvents{ false }; - LoadAssetJob* m_loadJob{ nullptr }; - AZStd::mutex m_loadJobMutex; - AZStd::atomic_bool m_loadCompleted{ false }; - }; - - - /* - * This class processes async AssetDatabase save jobs - */ - class SaveAssetJob - : public AssetDatabaseAsyncJob - { - public: - AZ_CLASS_ALLOCATOR(SaveAssetJob, ThreadPoolAllocator, 0); - - SaveAssetJob(JobContext* jobContext, AssetManager* owner, const Asset& asset, AssetHandler* assetHandler) - : AssetDatabaseAsyncJob(jobContext, true, owner, asset, assetHandler) - { - } - - ~SaveAssetJob() override - { - } - - void Process() override - { - SaveAsset(); - } - - void SaveAsset() - { - auto asset = m_asset.GetStrongReference(); - AZ_PROFILE_FUNCTION(AzCore); - bool isSaved = false; - AssetStreamInfo saveInfo = m_owner->GetSaveStreamInfoForAsset(asset.GetId(), asset.GetType()); - if (saveInfo.IsValid()) - { - IO::FileIOStream stream(saveInfo.m_streamName.c_str(), saveInfo.m_streamFlags); - stream.Seek(saveInfo.m_dataOffset, IO::GenericStream::SeekMode::ST_SEEK_BEGIN); - isSaved = m_assetHandler->SaveAssetData(asset, &stream); - } - // queue broadcast message for delivery on game thread - AssetBus::QueueEvent(asset.GetId(), &AssetBus::Events::OnAssetSaved, asset, isSaved); - } - }; + } + }; + /** + * Internally allows threads blocking on asset loads to be notified on load completion. + */ + class BlockingAssetLoadEvents + : public EBusTraits + { + public: ////////////////////////////////////////////////////////////////////////// - // Globals - EnvironmentVariable AssetManager::s_assetDB = nullptr; - ////////////////////////////////////////////////////////////////////////// + // EBusTraits overrides + static const AZ::EBusAddressPolicy AddressPolicy = AZ::EBusAddressPolicy::ById; + using BusIdType = AssetId; + using MutexType = AZStd::recursive_mutex; - //========================================================================= - // AssetDatabaseJob - // [4/3/2014] - //========================================================================= - AssetDatabaseJob::AssetDatabaseJob(AssetManager* owner, const Asset& asset, AssetHandler* assetHandler) + template + struct AssetJobConnectionPolicy + : public EBusConnectionPolicy { - m_owner = owner; - m_asset = AssetInternal::WeakAsset(asset); - m_assetHandler = assetHandler; - owner->AddJob(this); - } - - //========================================================================= - // ~AssetDatabaseJob - // [4/3/2014] - //========================================================================= - AssetDatabaseJob::~AssetDatabaseJob() - { - // Make sure that the asset reference is cleared out prior to removing the job registration. - // It's possible that clearing this reference will trigger the cleanup code for the asset, so if we wait for the - // destructor to clear it *after* the RemoveJob call, then HasActiveJobsOrStreamerRequests() will be able to return - // false even though the job is still executing asset-related code. - m_asset = {}; - m_owner->RemoveJob(this); - } - - //========================================================================= - // Create - // [6/12/2012] - //========================================================================= - bool AssetManager::Create(const Descriptor& desc) - { - AZ_Assert(!s_assetDB || !s_assetDB.Get(), "AssetManager already created!"); - - if (!s_assetDB) + static void Connect(typename Bus::BusPtr& busPtr, typename Bus::Context& context, typename Bus::HandlerNode& handler, typename Bus::Context::ConnectLockGuard& connectLock, const typename Bus::BusIdType& id = 0) { - s_assetDB = Environment::CreateVariable(kAssetDBInstanceVarName); - } - if (!s_assetDB.Get()) - { - s_assetDB.Set(aznew AssetManager(desc)); - } + typename Bus::BusIdType actualId = AssetInternal::ResolveAssetId(id); + EBusConnectionPolicy::Connect(busPtr, context, handler, connectLock, actualId); - return true; - } - - //========================================================================= - // Destroy - // [6/12/2012] - //========================================================================= - void AssetManager::Destroy() - { - AZ_Assert(s_assetDB, "AssetManager not created!"); - delete (*s_assetDB); - *s_assetDB = nullptr; - } - - //========================================================================= - // IsReady - //========================================================================= - bool AssetManager::IsReady() - { - if (!s_assetDB) - { - s_assetDB = Environment::FindVariable(kAssetDBInstanceVarName); - } - - return s_assetDB && *s_assetDB; - } - - //========================================================================= - // Instance - //========================================================================= - AssetManager& AssetManager::Instance() - { - if (!s_assetDB) - { - s_assetDB = Environment::FindVariable(kAssetDBInstanceVarName); - } - - AZ_Assert(s_assetDB && *s_assetDB, "AssetManager not created!"); - return *(*s_assetDB); - } - - bool AssetManager::SetInstance(AssetManager* assetManager) - { - if (!s_assetDB) - { - s_assetDB = Environment::CreateVariable(kAssetDBInstanceVarName); - } - - // The old instance needs to be null or else it will leak on the assignment. - AZ_Assert(!(*s_assetDB), - "AssetManager::SetInstance was called without first destroying the old instance and setting it to nullptr. " - "This will cause the previous AssetManager instance to leak." ); - - (*s_assetDB) = assetManager; - return true; - } - - //========================================================================= - // AssetDatabase - // [6/12/2012] - //========================================================================= - AssetManager::AssetManager(const AssetManager::Descriptor& desc) - : m_mainThreadId(AZStd::this_thread::get_id()) - , m_debugAssetEvents(AZ::Interface::Get()) - { - (void)desc; - - AssetManagerBus::Handler::BusConnect(); - } - - //========================================================================= - // ~AssetManager - // [6/12/2012] - //========================================================================= - AssetManager::~AssetManager() - { - PrepareShutDown(); - - // Acquire the asset lock to make sure nobody else is trying to do anything fancy with assets - AZStd::scoped_lock assetLock(m_assetMutex); - - while (!m_handlers.empty()) - { - AssetHandlerMap::iterator it = m_handlers.begin(); - AssetHandler* handler = it->second; - UnregisterHandler(handler); - delete handler; - } - - AssetManagerBus::Handler::BusDisconnect(); - } - - //========================================================================= - // DispatchEvents - // [04/02/2014] - //========================================================================= - void AssetManager::DispatchEvents() - { - AZ_PROFILE_FUNCTION(AzCore); - AssetManagerNotificationBus::Broadcast(&AssetManagerNotificationBus::Events::OnAssetEventsDispatchBegin); - while (AssetBus::QueuedEventCount()) - { - AssetBus::ExecuteQueuedEvents(); - } - AssetManagerNotificationBus::Broadcast(&AssetManagerNotificationBus::Events::OnAssetEventsDispatchEnd); - } - - //========================================================================= - void AssetManager::SetAssetInfoUpgradingEnabled(bool enable) - { - m_assetInfoUpgradingEnabled = enable; - } - - bool AssetManager::GetAssetInfoUpgradingEnabled() const - { -#if defined(_RELEASE) - // in release ("FINAL") builds, we never do this. - return false; -#else - return m_assetInfoUpgradingEnabled; -#endif - } - - bool AssetManager::ShouldCancelAllActiveJobs() const - { - return m_cancelAllActiveJobs; - } - - void AssetManager::SetParallelDependentLoadingEnabled(bool enable) - { - m_enableParallelDependentLoading = enable; - } - - bool AssetManager::GetParallelDependentLoadingEnabled() const - { - return m_enableParallelDependentLoading; - } - - void AssetManager::PrepareShutDown() - { - m_cancelAllActiveJobs = true; - - // We want to ensure that no active load jobs are in flight and - // therefore we need to wait till all jobs have completed. Please note that jobs get deleted automatically once they complete. - WaitForActiveJobsAndStreamerRequestsToFinish(); - - m_ownedAssetContainerLookup.clear(); - m_ownedAssetContainers.clear(); - m_assetContainers.clear(); - - // Ensure that there are no queued events on the AssetBus - DispatchEvents(); - } - - void AssetManager::WaitForActiveJobsAndStreamerRequestsToFinish() - { - while (HasActiveJobsOrStreamerRequests()) - { - DispatchEvents(); - AZStd::this_thread::yield(); - } - } - - //========================================================================= - // RegisterHandler - // [7/9/2014] - //========================================================================= - void AssetManager::RegisterHandler(AssetHandler* handler, const AssetType& assetType) - { - AZ_Error("AssetDatabase", handler != nullptr, "Attempting to register a null asset handler!"); - if (handler) - { - if (m_handlers.insert(AZStd::make_pair(assetType, handler)).second) + // If the asset is loaded or failed already, deliver the status update immediately + // Note that we check IsReady here, ReadyPreNotify must be tested because there is + // a small gap between ReadyPreNotify and Ready where the callback could be missed. + // Also note because the Asset<> reference isn't passed around anywhere, it doesn't matter + // what the AssetLoadBehavior is set to, as it will never make it back to any callers. + Asset assetData(AssetInternal::GetAssetData(actualId, AssetLoadBehavior::Default)); + if (assetData) { - handler->m_nHandledTypes++; - } - else - { - AZ_Error("AssetDatabase", false, "Asset type %s already has a handler registered! New registration ignored!", assetType.ToString().c_str()); - } - } - } - - //========================================================================= - // UnregisterHandler - // [7/9/2014] - //========================================================================= - void AssetManager::UnregisterHandler(AssetHandler* handler) - { - AZ_Error("AssetDatabase", handler != nullptr, "Attempting to unregister a null asset handler!"); - if (handler) - { - for (AssetHandlerMap::iterator it = m_handlers.begin(); it != m_handlers.end(); /*++it*/) - { - if (it->second == handler) + if (assetData->IsReady() || assetData->IsError()) { - // When unregistering asset handlers, it's possible that there are still some load jobs that have "finished" but - // haven't destroyed themselves yet by the time the asset handler gets unregistered. LoadAssetJob contains a weak - // asset reference that doesn't clear until the job is destroyed, which happens *after* the OnAssetReady - // notification is triggered. If the thread gets swapped out between the OnAssetReady and the job destruction, - // the job will still be holding onto an asset reference for this asset handler, and it will trigger the - // error below. To ensure that this case doesn't happen, we will instead call - // WaitForActiveJobsAndStreamerRequestsToFinish() to make sure that any in-process jobs have completely cleaned - // themselves up before proceeding forward. - // One example of this pattern occurs in unit tests, where the test loads an asset, validates it, destroys the - // asset, and unregisters the handler, all in rapid succession. This would extremely infrequently - // (~1 per 5000 runs) trigger the error case if we didn't wait for the jobs to finish here. - WaitForActiveJobsAndStreamerRequestsToFinish(); - - { - // this scope is used to control the scope of the lock. - AZStd::lock_guard assetLock(m_assetMutex); - for (const auto &assetEntry : m_assets) - { - // is the handler that handles this type, this handler we're removing? - if (assetEntry.second->m_registeredHandler == handler) - { - AZ_Error("AssetManager", false, "Asset handler for %s is being removed, when assetid %s is still loaded!\n", - assetEntry.second->GetType().ToString().c_str(), - assetEntry.second->GetId().ToString().c_str()); // this will write the name IF AVAILABLE - assetEntry.second->UnregisterWithHandler(); - } - } - } - it = m_handlers.erase(it); - handler->m_nHandledTypes--; - } - else - { - ++it; + connectLock.unlock(); + handler->OnLoadComplete(); } } } + }; + + template + using ConnectionPolicy = AssetJobConnectionPolicy; + + virtual void OnLoadComplete() = 0; + virtual void OnLoadCanceled(AssetId assetId) = 0; + }; + + using BlockingAssetLoadBus = EBus; + + /* + * This class processes async AssetDatabase load jobs + */ + class LoadAssetJob + : public AssetDatabaseAsyncJob + { + public: + AZ_CLASS_ALLOCATOR(LoadAssetJob, ThreadPoolAllocator, 0); + + LoadAssetJob(AssetManager* owner, const Asset& asset, + AZStd::shared_ptr dataStream, bool isReload, AZ::IO::IStreamerTypes::RequestStatus requestState, + AssetHandler* handler, const AssetLoadParameters& loadParams, bool signalLoaded) + : AssetDatabaseAsyncJob(JobContext::GetGlobalContext(), true, owner, asset, handler) + , m_dataStream(dataStream) + , m_isReload(isReload) + , m_requestState(requestState) + , m_loadParams(loadParams) + , m_signalLoaded(signalLoaded) + { + AZ_Assert(m_dataStream, "Data stream pointer received through the callback from AZ::IO::Streamer is invalid."); + + AZ_Assert((m_requestState == AZ::IO::IStreamerTypes::RequestStatus::Completed) + || (m_requestState == AZ::IO::IStreamerTypes::RequestStatus::Canceled) + || (m_requestState == AZ::IO::IStreamerTypes::RequestStatus::Failed), + "AssetManager::LoadAssetJob was called with an unexpected streamer state: %i", m_requestState); } - //========================================================================= - // RegisterCatalog - // [8/27/2012] - //========================================================================= - void AssetManager::RegisterCatalog(AssetCatalog* catalog, const AssetType& assetType) + ~LoadAssetJob() override { - AZ_Error("AssetDatabase", catalog != nullptr, "Attempting to register a null catalog!"); - if (catalog) - { - AZStd::scoped_lock l(m_catalogMutex); - if (m_catalogs.insert(AZStd::make_pair(assetType, catalog)).second == false) - { - AZ_Error("AssetDatabase", false, "Asset type %s already has a catalog registered! New registration ignored!", assetType.ToString().c_str()); - } - } } - //========================================================================= - // UnregisterCatalog - // [8/27/2012] - //========================================================================= - void AssetManager::UnregisterCatalog(AssetCatalog* catalog) + void Process() override { - AZ_Error("AssetDatabase", catalog != nullptr, "Attempting to unregister a null catalog!"); - if (catalog) - { - AZStd::scoped_lock l(m_catalogMutex); - for (AssetCatalogMap::iterator iter = m_catalogs.begin(); iter != m_catalogs.end(); ) - { - if (iter->second == catalog) - { - iter = m_catalogs.erase(iter); - } - else - { - ++iter; - } + Asset asset = m_asset.GetStrongReference(); - } - } - } - - //========================================================================= - // GetHandledAssetTypes - // [6/27/2016] - //========================================================================= - void AssetManager::GetHandledAssetTypes(AssetCatalog* catalog, AZStd::vector& assetTypes) - { - for (AssetCatalogMap::iterator iter = m_catalogs.begin(); iter != m_catalogs.end(); iter++) - { - if (iter->second == catalog) - { - assetTypes.push_back(iter->first); - } - } - } - - void AssetManager::SuspendAssetRelease() - { - ++m_suspendAssetRelease; - } - - void AssetManager::ResumeAssetRelease() - { - if(--m_suspendAssetRelease != 0) + // Verify that we didn't somehow get here after the Asset Manager has finished shutting down. + AZ_Assert(AssetManager::IsReady(), "Asset Manager shutdown didn't clean up pending asset loads properly."); + if (!AssetManager::IsReady()) { return; } - AZStd::scoped_lock assetLock(m_assetMutex); - // First, release any containers that were loading this asset - for (auto asset = m_assets.begin();asset != m_assets.end();) + bool shouldCancel = m_owner->ShouldCancelAllActiveJobs() + || !asset // No outstanding references, so cancel the load + || m_requestState == AZ::IO::IStreamerTypes::RequestStatus::Canceled; + + if (shouldCancel) { - if (asset->second->m_useCount == 0) + BlockingAssetLoadBus::Event(m_asset.GetId(), &BlockingAssetLoadBus::Events::OnLoadCanceled, m_asset.GetId()); + AssetManagerBus::Broadcast(&AssetManagerBus::Events::OnAssetCanceled, m_asset.GetId()); + } + else + { + + AZ_PROFILE_SCOPE(AzCore, "AZ::Data::LoadAssetJob::Process: %s", + asset.GetHint().c_str()); + + if (m_owner->ValidateAndRegisterAssetLoading(asset)) { - auto releaseAsset = asset->second; - ++asset; - ReleaseAssetContainersForAsset(releaseAsset); + LoadAndSignal(asset); + } + } + } + + void LoadAndSignal(Asset& asset) + { + const bool loadSucceeded = LoadData(); + + if (m_signalLoaded && loadSucceeded) + { + AZ_Assert(!m_isReload, "OnAssetDataLoaded signal isn't supported for asset reloads."); + // This asset has preload dependencies, we need to evaluate whether they're all ready before calling PostLoad + AssetLoadBus::Event(asset.GetId(), &AssetLoadBus::Events::OnAssetDataLoaded, asset); + } + else + { + // As long as we don't need to signal preload dependencies, just finish the load whether or not it was successful. + m_owner->PostLoad(asset, loadSucceeded, m_isReload, m_assetHandler); + } + } + + bool LoadData() + { + Asset asset = m_asset.GetStrongReference(); + + if(cl_assetLoadDelay > 0) + { + AZ_PROFILE_SCOPE(AzCore, "LoadData suspended"); + AZStd::this_thread::sleep_for(AZStd::chrono::milliseconds(cl_assetLoadDelay)); + } + + bool loadedSuccessfully = false; + + if (!cl_assetLoadError && m_requestState == AZ::IO::IStreamerTypes::RequestStatus::Completed) + { + if (m_dataStream->IsFullyLoaded()) + { + AssetHandler::LoadResult result = + m_assetHandler->LoadAssetDataFromStream(asset, m_dataStream, m_loadParams.m_assetLoadFilterCB); + loadedSuccessfully = (result == AssetHandler::LoadResult::LoadComplete); + } + } + + return loadedSuccessfully; + } + + private: + AZStd::shared_ptr m_dataStream; + AssetLoadParameters m_loadParams{}; + AZ::IO::IStreamerTypes::RequestStatus m_requestState{ AZ::IO::IStreamerTypes::RequestStatus::Pending}; + bool m_isReload{ false }; + bool m_signalLoaded{ false }; + }; + + + /** + * Utility class to wait when a blocking load is requested for an asset that's already loading asynchronously. + * Uses the BlockingAssetLoadBus to detect completion, and a semaphore to signal it. + */ + + class WaitForAsset + : public BlockingAssetLoadBus::Handler + { + public: + AZ_CLASS_ALLOCATOR(WaitForAsset, ThreadPoolAllocator, 0); + + + WaitForAsset(const Asset& assetToWaitFor, bool shouldDispatchEvents) + : m_assetData(assetToWaitFor) + , m_shouldDispatchEvents(shouldDispatchEvents) + { + // Track all blocking requests with the AssetManager. This enables load jobs to potentially get routed + // to the thread that's currently blocking waiting on the load job to complete. + AssetManager::Instance().AddBlockingRequest(m_assetData.GetId(), this); + } + + ~WaitForAsset() override + { + // Stop tracking the blocking request, which will ensure that load jobs won't be provided to this instance + // for processing. + AssetManager::Instance().RemoveBlockingRequest(m_assetData.GetId(), this); + + // It shouldn't be possible to destroy a blocking load request before the load job that it's blocked on + // has been processed, so assert if it ever happens, but make sure to process it just in case. + if (m_loadJob) + { + // (If a valid case is ever found where this can occur, it should be safe to remove the assert) + AZ_Assert(false, "Blocking load request is being deleted before it could process the blocking load."); + ProcessLoadJob(); + } + } + + // Provides a blocked load with a LoadJob to process while it's blocking. + // Returns true if it can be queued, false if it can't. + bool QueueAssetLoadJob(LoadAssetJob* loadJob) + { + if(m_shouldDispatchEvents) + { + // Any load job that is going to be dispatching events should not accept additional work since dispatching events + // can lead to more code that's blocking on an asset load which prevents us from finishing the dispatch + // and doing the assigned work. + // Specifically, if dispatching leads to a second block call, the load job will be assigned to the first block call, + // which will never be completed until the second block call is finished. If both blocks are on the same asset, + // we end up deadlocked. + return false; + } + + AZStd::scoped_lock mutexLock(m_loadJobMutex); + + AZ_Assert(!m_loadJob, "Trying to process multiple load jobs for the same asset with the same blocking handler."); + if (!m_loadJob) + { + m_loadJob = loadJob; + m_waitEvent.release(); + return true; + } + + return false; + } + + void OnLoadComplete() override + { + Finish(); + } + + void OnLoadCanceled([[maybe_unused]] const AssetId assetId) override + { + Finish(); + } + + void WaitUntilReady() + { + BusConnect(m_assetData.GetId()); + + Wait(); + + BusDisconnect(m_assetData.GetId()); + } + + protected: + void Wait() + { + AZ_PROFILE_SCOPE(AzCore, "WaitForAsset - %s", m_assetData.GetHint().c_str()); + + // Continue to loop until the load completes. (Most of the time in the loop will be spent in a thread-blocking state) + while (!m_loadCompleted) + { + if (m_shouldDispatchEvents) + { + // The event will wake up either when the load finishes, a load job is queued for processing, or every + // N milliseconds to see if it should dispatch events. + constexpr int MaxWaitBetweenDispatchMs = 1; + while (!m_waitEvent.try_acquire_for(AZStd::chrono::milliseconds(MaxWaitBetweenDispatchMs))) + { + AssetManager::Instance().DispatchEvents(); + } } else { - ++asset; + + // Don't wake up until a load job is queued for processing or the load is entirely finished. + m_waitEvent.acquire(); } + + // Check to see if any load jobs have been provided for this thread to process. + // (Load jobs will attempt to reuse blocked threads before spinning off new job threads) + ProcessLoadJob(); } - // Second, release the assets themselves - - AZStd::vector assetsToRelease; - - for(auto&& asset : m_assets) + // Pump the AssetBus function queue once more after the load has completed in case additional + // functions have been queued between the last call to DispatchEvents and the completion + // of the current load job + if (m_shouldDispatchEvents) { - if(asset.second->m_weakUseCount == 0) + AssetManager::Instance().DispatchEvents(); + } + } + + void Finish() + { + AZ_PROFILE_FUNCTION(AzCore); + m_loadCompleted = true; + m_waitEvent.release(); + } + + bool ProcessLoadJob() + { + AZStd::scoped_lock mutexLock(m_loadJobMutex); + bool jobProcessed = false; + + if (m_loadJob) + { + m_loadJob->Process(); + if (m_loadJob->IsAutoDelete()) { - // Keep a separate list of assets to release, because releasing them will modify the m_assets list that we're - // currently looping on. - assetsToRelease.push_back(asset.second); + delete m_loadJob; + } + m_loadJob = nullptr; + jobProcessed = true; + } + + return jobProcessed; + } + + Asset m_assetData; + AZStd::binary_semaphore m_waitEvent; + const bool m_shouldDispatchEvents{ false }; + LoadAssetJob* m_loadJob{ nullptr }; + AZStd::mutex m_loadJobMutex; + AZStd::atomic_bool m_loadCompleted{ false }; + }; + + + /* + * This class processes async AssetDatabase save jobs + */ + class SaveAssetJob + : public AssetDatabaseAsyncJob + { + public: + AZ_CLASS_ALLOCATOR(SaveAssetJob, ThreadPoolAllocator, 0); + + SaveAssetJob(JobContext* jobContext, AssetManager* owner, const Asset& asset, AssetHandler* assetHandler) + : AssetDatabaseAsyncJob(jobContext, true, owner, asset, assetHandler) + { + } + + ~SaveAssetJob() override + { + } + + void Process() override + { + SaveAsset(); + } + + void SaveAsset() + { + auto asset = m_asset.GetStrongReference(); + AZ_PROFILE_FUNCTION(AzCore); + bool isSaved = false; + AssetStreamInfo saveInfo = m_owner->GetSaveStreamInfoForAsset(asset.GetId(), asset.GetType()); + if (saveInfo.IsValid()) + { + IO::FileIOStream stream(saveInfo.m_streamName.c_str(), saveInfo.m_streamFlags); + stream.Seek(saveInfo.m_dataOffset, IO::GenericStream::SeekMode::ST_SEEK_BEGIN); + isSaved = m_assetHandler->SaveAssetData(asset, &stream); + } + // queue broadcast message for delivery on game thread + AssetBus::QueueEvent(asset.GetId(), &AssetBus::Events::OnAssetSaved, asset, isSaved); + } + }; + + ////////////////////////////////////////////////////////////////////////// + // Globals + EnvironmentVariable AssetManager::s_assetDB = nullptr; + ////////////////////////////////////////////////////////////////////////// + + //========================================================================= + // AssetDatabaseJob + // [4/3/2014] + //========================================================================= + AssetDatabaseJob::AssetDatabaseJob(AssetManager* owner, const Asset& asset, AssetHandler* assetHandler) + { + m_owner = owner; + m_asset = AssetInternal::WeakAsset(asset); + m_assetHandler = assetHandler; + owner->AddJob(this); + } + + //========================================================================= + // ~AssetDatabaseJob + // [4/3/2014] + //========================================================================= + AssetDatabaseJob::~AssetDatabaseJob() + { + // Make sure that the asset reference is cleared out prior to removing the job registration. + // It's possible that clearing this reference will trigger the cleanup code for the asset, so if we wait for the + // destructor to clear it *after* the RemoveJob call, then HasActiveJobsOrStreamerRequests() will be able to return + // false even though the job is still executing asset-related code. + m_asset = {}; + m_owner->RemoveJob(this); + } + + //========================================================================= + // Create + // [6/12/2012] + //========================================================================= + bool AssetManager::Create(const Descriptor& desc) + { + AZ_Assert(!s_assetDB || !s_assetDB.Get(), "AssetManager already created!"); + + if (!s_assetDB) + { + s_assetDB = Environment::CreateVariable(kAssetDBInstanceVarName); + } + if (!s_assetDB.Get()) + { + s_assetDB.Set(aznew AssetManager(desc)); + } + + return true; + } + + //========================================================================= + // Destroy + // [6/12/2012] + //========================================================================= + void AssetManager::Destroy() + { + AZ_Assert(s_assetDB, "AssetManager not created!"); + delete (*s_assetDB); + *s_assetDB = nullptr; + } + + //========================================================================= + // IsReady + //========================================================================= + bool AssetManager::IsReady() + { + if (!s_assetDB) + { + s_assetDB = Environment::FindVariable(kAssetDBInstanceVarName); + } + + return s_assetDB && *s_assetDB; + } + + //========================================================================= + // Instance + //========================================================================= + AssetManager& AssetManager::Instance() + { + if (!s_assetDB) + { + s_assetDB = Environment::FindVariable(kAssetDBInstanceVarName); + } + + AZ_Assert(s_assetDB && *s_assetDB, "AssetManager not created!"); + return *(*s_assetDB); + } + + bool AssetManager::SetInstance(AssetManager* assetManager) + { + if (!s_assetDB) + { + s_assetDB = Environment::CreateVariable(kAssetDBInstanceVarName); + } + + // The old instance needs to be null or else it will leak on the assignment. + AZ_Assert(!(*s_assetDB), + "AssetManager::SetInstance was called without first destroying the old instance and setting it to nullptr. " + "This will cause the previous AssetManager instance to leak." ); + + (*s_assetDB) = assetManager; + return true; + } + + //========================================================================= + // AssetDatabase + // [6/12/2012] + //========================================================================= + AssetManager::AssetManager(const AssetManager::Descriptor& desc) + : m_mainThreadId(AZStd::this_thread::get_id()) + , m_debugAssetEvents(AZ::Interface::Get()) + { + (void)desc; + + AssetManagerBus::Handler::BusConnect(); + } + + //========================================================================= + // ~AssetManager + // [6/12/2012] + //========================================================================= + AssetManager::~AssetManager() + { + PrepareShutDown(); + + // Acquire the asset lock to make sure nobody else is trying to do anything fancy with assets + AZStd::scoped_lock assetLock(m_assetMutex); + + while (!m_handlers.empty()) + { + AssetHandlerMap::iterator it = m_handlers.begin(); + AssetHandler* handler = it->second; + UnregisterHandler(handler); + delete handler; + } + + AssetManagerBus::Handler::BusDisconnect(); + } + + //========================================================================= + // DispatchEvents + // [04/02/2014] + //========================================================================= + void AssetManager::DispatchEvents() + { + AZ_PROFILE_FUNCTION(AzCore); + AssetManagerNotificationBus::Broadcast(&AssetManagerNotificationBus::Events::OnAssetEventsDispatchBegin); + while (AssetBus::QueuedEventCount()) + { + AssetBus::ExecuteQueuedEvents(); + } + AssetManagerNotificationBus::Broadcast(&AssetManagerNotificationBus::Events::OnAssetEventsDispatchEnd); + } + + //========================================================================= + void AssetManager::SetAssetInfoUpgradingEnabled(bool enable) + { + m_assetInfoUpgradingEnabled = enable; + } + + bool AssetManager::GetAssetInfoUpgradingEnabled() const + { +#if defined(_RELEASE) + // in release ("FINAL") builds, we never do this. + return false; +#else + return m_assetInfoUpgradingEnabled; +#endif + } + + bool AssetManager::ShouldCancelAllActiveJobs() const + { + return m_cancelAllActiveJobs; + } + + void AssetManager::SetParallelDependentLoadingEnabled(bool enable) + { + m_enableParallelDependentLoading = enable; + } + + bool AssetManager::GetParallelDependentLoadingEnabled() const + { + return m_enableParallelDependentLoading; + } + + void AssetManager::PrepareShutDown() + { + m_cancelAllActiveJobs = true; + + // We want to ensure that no active load jobs are in flight and + // therefore we need to wait till all jobs have completed. Please note that jobs get deleted automatically once they complete. + WaitForActiveJobsAndStreamerRequestsToFinish(); + + m_ownedAssetContainerLookup.clear(); + m_ownedAssetContainers.clear(); + m_assetContainers.clear(); + + // Ensure that there are no queued events on the AssetBus + DispatchEvents(); + } + + void AssetManager::WaitForActiveJobsAndStreamerRequestsToFinish() + { + while (HasActiveJobsOrStreamerRequests()) + { + DispatchEvents(); + AZStd::this_thread::yield(); + } + } + + //========================================================================= + // RegisterHandler + // [7/9/2014] + //========================================================================= + void AssetManager::RegisterHandler(AssetHandler* handler, const AssetType& assetType) + { + AZ_Error("AssetDatabase", handler != nullptr, "Attempting to register a null asset handler!"); + if (handler) + { + if (m_handlers.insert(AZStd::make_pair(assetType, handler)).second) + { + handler->m_nHandledTypes++; + } + else + { + AZ_Error("AssetDatabase", false, "Asset type %s already has a handler registered! New registration ignored!", assetType.ToString().c_str()); + } + } + } + + //========================================================================= + // UnregisterHandler + // [7/9/2014] + //========================================================================= + void AssetManager::UnregisterHandler(AssetHandler* handler) + { + AZ_Error("AssetDatabase", handler != nullptr, "Attempting to unregister a null asset handler!"); + if (handler) + { + for (AssetHandlerMap::iterator it = m_handlers.begin(); it != m_handlers.end(); /*++it*/) + { + if (it->second == handler) + { + // When unregistering asset handlers, it's possible that there are still some load jobs that have "finished" but + // haven't destroyed themselves yet by the time the asset handler gets unregistered. LoadAssetJob contains a weak + // asset reference that doesn't clear until the job is destroyed, which happens *after* the OnAssetReady + // notification is triggered. If the thread gets swapped out between the OnAssetReady and the job destruction, + // the job will still be holding onto an asset reference for this asset handler, and it will trigger the + // error below. To ensure that this case doesn't happen, we will instead call + // WaitForActiveJobsAndStreamerRequestsToFinish() to make sure that any in-process jobs have completely cleaned + // themselves up before proceeding forward. + // One example of this pattern occurs in unit tests, where the test loads an asset, validates it, destroys the + // asset, and unregisters the handler, all in rapid succession. This would extremely infrequently + // (~1 per 5000 runs) trigger the error case if we didn't wait for the jobs to finish here. + WaitForActiveJobsAndStreamerRequestsToFinish(); + + { + // this scope is used to control the scope of the lock. + AZStd::lock_guard assetLock(m_assetMutex); + for (const auto &assetEntry : m_assets) + { + // is the handler that handles this type, this handler we're removing? + if (assetEntry.second->m_registeredHandler == handler) + { + AZ_Error("AssetManager", false, "Asset handler for %s is being removed, when assetid %s is still loaded!\n", + assetEntry.second->GetType().ToString().c_str(), + assetEntry.second->GetId().ToString().c_str()); // this will write the name IF AVAILABLE + assetEntry.second->UnregisterWithHandler(); + } + } + } + it = m_handlers.erase(it); + handler->m_nHandledTypes--; + } + else + { + ++it; } } + } + } - for(auto&& asset : assetsToRelease) + //========================================================================= + // RegisterCatalog + // [8/27/2012] + //========================================================================= + void AssetManager::RegisterCatalog(AssetCatalog* catalog, const AssetType& assetType) + { + AZ_Error("AssetDatabase", catalog != nullptr, "Attempting to register a null catalog!"); + if (catalog) + { + AZStd::scoped_lock l(m_catalogMutex); + if (m_catalogs.insert(AZStd::make_pair(assetType, catalog)).second == false) { - bool removeFromHash = asset->IsRegisterReadonlyAndShareable(); - // default creation token implies that the asset was not created by the asset manager and therefore it cannot be in the asset map. - removeFromHash = asset->m_creationToken == s_defaultCreationToken ? false : removeFromHash; + AZ_Error("AssetDatabase", false, "Asset type %s already has a catalog registered! New registration ignored!", assetType.ToString().c_str()); + } + } + } - ReleaseAsset(asset, asset->GetId(), asset->GetType(), removeFromHash, asset->m_creationToken); + //========================================================================= + // UnregisterCatalog + // [8/27/2012] + //========================================================================= + void AssetManager::UnregisterCatalog(AssetCatalog* catalog) + { + AZ_Error("AssetDatabase", catalog != nullptr, "Attempting to unregister a null catalog!"); + if (catalog) + { + AZStd::scoped_lock l(m_catalogMutex); + for (AssetCatalogMap::iterator iter = m_catalogs.begin(); iter != m_catalogs.end(); ) + { + if (iter->second == catalog) + { + iter = m_catalogs.erase(iter); + } + else + { + ++iter; + } + + } + } + } + + //========================================================================= + // GetHandledAssetTypes + // [6/27/2016] + //========================================================================= + void AssetManager::GetHandledAssetTypes(AssetCatalog* catalog, AZStd::vector& assetTypes) + { + for (AssetCatalogMap::iterator iter = m_catalogs.begin(); iter != m_catalogs.end(); iter++) + { + if (iter->second == catalog) + { + assetTypes.push_back(iter->first); + } + } + } + + void AssetManager::SuspendAssetRelease() + { + ++m_suspendAssetRelease; + } + + void AssetManager::ResumeAssetRelease() + { + if(--m_suspendAssetRelease != 0) + { + return; + } + + AZStd::scoped_lock assetLock(m_assetMutex); + // First, release any containers that were loading this asset + for (auto asset = m_assets.begin();asset != m_assets.end();) + { + if (asset->second->m_useCount == 0) + { + auto releaseAsset = asset->second; + ++asset; + ReleaseAssetContainersForAsset(releaseAsset); + } + else + { + ++asset; } } - AssetData::AssetStatus AssetManager::BlockUntilLoadComplete(const Asset& asset) + // Second, release the assets themselves + + AZStd::vector assetsToRelease; + + for(auto&& asset : m_assets) { - if(asset.GetStatus() == AssetData::AssetStatus::NotLoaded) + if(asset.second->m_weakUseCount == 0) { - AZ_Error("AssetManager", false, "BlockUntilLoadComplete must be called after an asset has been queued for load. Asset %s (%s) is not queued for load", - asset.GetHint().c_str(), asset.GetId().ToString().c_str()); + // Keep a separate list of assets to release, because releasing them will modify the m_assets list that we're + // currently looping on. + assetsToRelease.push_back(asset.second); } - else if(!asset.IsReady()) - { - // If this is the main thread we'll need to call DispatchEvents to make sure the events we're waiting on actually fire - // since the main thread is typically responsible for calling DispatchEvents elsewhere - const bool shouldDispatch = AZStd::this_thread::get_id() == m_mainThreadId; - - // Wait for the asset and all queued dependencies to finish loading. - WaitForAsset blockingWait(asset, shouldDispatch); - - blockingWait.WaitUntilReady(); - } - - return asset.GetStatus(); } - //========================================================================= - // FindAsset - //========================================================================= - Asset AssetManager::FindAsset(const AssetId& assetId, AssetLoadBehavior assetReferenceLoadBehavior) + for(auto&& asset : assetsToRelease) { - // Look up the asset id in the catalog, and use the result of that instead. - // If assetId is a legacy id, assetInfo.m_assetId will be the canonical id. Otherwise, assetInfo.m_assetID == assetId. - // This is because only canonical ids are stored in m_assets (see below). - // Only do the look up if upgrading is enabled - AZ::Data::AssetInfo assetInfo; - if (GetAssetInfoUpgradingEnabled()) + bool removeFromHash = asset->IsRegisterReadonlyAndShareable(); + // default creation token implies that the asset was not created by the asset manager and therefore it cannot be in the asset map. + removeFromHash = asset->m_creationToken == s_defaultCreationToken ? false : removeFromHash; + + ReleaseAsset(asset, asset->GetId(), asset->GetType(), removeFromHash, asset->m_creationToken); + } + } + + AssetData::AssetStatus AssetManager::BlockUntilLoadComplete(const Asset& asset) + { + if(asset.GetStatus() == AssetData::AssetStatus::NotLoaded) + { + AZ_Error("AssetManager", false, "BlockUntilLoadComplete must be called after an asset has been queued for load. Asset %s (%s) is not queued for load", + asset.GetHint().c_str(), asset.GetId().ToString().c_str()); + } + else if(!asset.IsReady()) + { + // If this is the main thread we'll need to call DispatchEvents to make sure the events we're waiting on actually fire + // since the main thread is typically responsible for calling DispatchEvents elsewhere + const bool shouldDispatch = AZStd::this_thread::get_id() == m_mainThreadId; + + // Wait for the asset and all queued dependencies to finish loading. + WaitForAsset blockingWait(asset, shouldDispatch); + + blockingWait.WaitUntilReady(); + } + + return asset.GetStatus(); + } + + //========================================================================= + // FindAsset + //========================================================================= + Asset AssetManager::FindAsset(const AssetId& assetId, AssetLoadBehavior assetReferenceLoadBehavior) + { + // Look up the asset id in the catalog, and use the result of that instead. + // If assetId is a legacy id, assetInfo.m_assetId will be the canonical id. Otherwise, assetInfo.m_assetID == assetId. + // This is because only canonical ids are stored in m_assets (see below). + // Only do the look up if upgrading is enabled + AZ::Data::AssetInfo assetInfo; + if (GetAssetInfoUpgradingEnabled()) + { + AssetCatalogRequestBus::BroadcastResult(assetInfo, &AssetCatalogRequestBus::Events::GetAssetInfoById, assetId); + } + + // If the catalog is not available, use the original assetId + const AssetId& assetToFind(assetInfo.m_assetId.IsValid() ? assetInfo.m_assetId : assetId); + + AZStd::scoped_lock assetLock(m_assetMutex); + AssetMap::iterator it = m_assets.find(assetToFind); + if (it != m_assets.end()) + { + Asset asset(assetReferenceLoadBehavior); + asset.SetData(it->second); + + return asset; + } + return Asset(assetReferenceLoadBehavior); + } + + AZStd::pair GetEffectiveDeadlineAndPriority( + const AssetHandler& handler, AssetType assetType, const AssetLoadParameters& loadParams) + { + AZStd::chrono::milliseconds deadline; + AZ::IO::IStreamerTypes::Priority priority; + + handler.GetDefaultAssetLoadPriority(assetType, deadline, priority); + + if (loadParams.m_deadline) + { + deadline = loadParams.m_deadline.value(); + } + + if (loadParams.m_priority) + { + priority = loadParams.m_priority.value(); + } + + return make_pair(deadline, priority); + } + + //========================================================================= + // GetAsset + // [6/19/2012] + //========================================================================= + Asset AssetManager::GetAsset(const AssetId& assetId, const AssetType& assetType, AssetLoadBehavior assetReferenceLoadBehavior, const AssetLoadParameters& loadParams) + { + // If parallel dependent loads are disabled, just try to load the requested asset directly, and let it trigger + // dependent loads as they're encountered. + // Parallel dependent loads are disabled during asset building because there is no guarantee that dependency information + // will be available and complete until after all assets are finished building. + if(!GetParallelDependentLoadingEnabled()) + { + return GetAssetInternal(assetId, assetType, assetReferenceLoadBehavior, loadParams); + } + + // Otherwise, use Asset Containers to load all dependent assets in parallel. + + Asset asset = FindOrCreateAsset(assetId, assetType, assetReferenceLoadBehavior); + + if(!asset || (!loadParams.m_reloadMissingDependencies && asset.IsReady())) + { + // If the asset is already ready, just return it and skip the container + return AZStd::move(asset); + } + + auto container = GetAssetContainer(asset, loadParams); + + AZStd::scoped_lock lock(m_assetContainerMutex); + + m_ownedAssetContainers.insert({ container.get(), container }); + + // Only insert a new entry into m_ownedAssetContainerLookup if one doesn't already exist for this container. + // Because it's a multimap, it is possible to add duplicate entries by mistake. + bool entryExists = false; + auto rangeItr = m_ownedAssetContainerLookup.equal_range(assetId); + for (auto itr = rangeItr.first; itr != rangeItr.second; ++itr) + { + if (itr->second == container.get()) + { + entryExists = true; + break; + } + } + + // Entry for this container doesn't exist yet, so add it. + if (!entryExists) + { + m_ownedAssetContainerLookup.insert({ assetId, container.get() }); + } + + return asset; + } + + Asset AssetManager::GetAssetInternal(const AssetId& assetId, [[maybe_unused]] const AssetType& assetType, + AssetLoadBehavior assetReferenceLoadBehavior, const AssetLoadParameters& loadParams, AssetInfo assetInfo /*= () */, bool signalLoaded /*= false */) + { + AZ_PROFILE_FUNCTION(AzCore); + + AZ_Error("AssetDatabase", assetId.IsValid(), "GetAsset called with invalid asset Id."); + AZ_Error("AssetDatabase", !assetType.IsNull(), "GetAsset called with invalid asset type."); + bool assetMissing = false; + + { + AZ_PROFILE_SCOPE(AzCore, "GetAsset: GetAssetInfo"); + + // Attempt to look up asset info from catalog + // This is so that when assetId is a legacy id, we're operating on the canonical id anyway + if (!assetInfo.m_assetId.IsValid()) { AssetCatalogRequestBus::BroadcastResult(assetInfo, &AssetCatalogRequestBus::Events::GetAssetInfoById, assetId); } - // If the catalog is not available, use the original assetId - const AssetId& assetToFind(assetInfo.m_assetId.IsValid() ? assetInfo.m_assetId : assetId); + // If the asset was found in the catalog, ensure the type infos match + if (assetInfo.m_assetId.IsValid()) + { + AZ_Warning("AssetManager", assetInfo.m_assetType == assetType, + "Requested asset id %s with type %s, but type is actually %s.", + assetId.ToString().c_str(), assetType.ToString().c_str(), + assetInfo.m_assetType.ToString().c_str()); + } + else + { + AZ_Warning("AssetManager", false, "GetAsset called for asset which does not exist in asset catalog and cannot be loaded. Asset may be missing, not processed or moved. AssetId: %s", + assetId.ToString().c_str()); + // If asset not found, use the id and type given. We will create a valid asset, but it will likely get an error + // status below if the asset handler doesn't reroute it to a default asset. + assetInfo.m_assetId = assetId; + assetInfo.m_assetType = assetType; + assetMissing = true; + } + } + + AZ_PROFILE_SCOPE(AzCore, "GetAsset: %s", assetInfo.m_relativePath.c_str()); + + AZStd::shared_ptr dataStream; + AssetStreamInfo loadInfo; + bool triggerAssetErrorNotification = false; + bool wasUnloaded = false; + AssetHandler* handler = nullptr; + AssetData* assetData = nullptr; + Asset asset; // Used to hold a reference while job is dispatched and while outside of the assetMutex lock. + + // Control the scope of the assetMutex lock + { AZStd::scoped_lock assetLock(m_assetMutex); - AssetMap::iterator it = m_assets.find(assetToFind); - if (it != m_assets.end()) + bool isNewEntry = false; + + // check if asset already exists { - Asset asset(assetReferenceLoadBehavior); - asset.SetData(it->second); + AZ_PROFILE_SCOPE(AzCore, "GetAsset: FindAsset"); - return asset; - } - return Asset(assetReferenceLoadBehavior); - } - - AZStd::pair GetEffectiveDeadlineAndPriority( - const AssetHandler& handler, AssetType assetType, const AssetLoadParameters& loadParams) - { - AZStd::chrono::milliseconds deadline; - AZ::IO::IStreamerTypes::Priority priority; - - handler.GetDefaultAssetLoadPriority(assetType, deadline, priority); - - if (loadParams.m_deadline) - { - deadline = loadParams.m_deadline.value(); - } - - if (loadParams.m_priority) - { - priority = loadParams.m_priority.value(); - } - - return make_pair(deadline, priority); - } - - //========================================================================= - // GetAsset - // [6/19/2012] - //========================================================================= - Asset AssetManager::GetAsset(const AssetId& assetId, const AssetType& assetType, AssetLoadBehavior assetReferenceLoadBehavior, const AssetLoadParameters& loadParams) - { - // If parallel dependent loads are disabled, just try to load the requested asset directly, and let it trigger - // dependent loads as they're encountered. - // Parallel dependent loads are disabled during asset building because there is no guarantee that dependency information - // will be available and complete until after all assets are finished building. - if(!GetParallelDependentLoadingEnabled()) - { - return GetAssetInternal(assetId, assetType, assetReferenceLoadBehavior, loadParams); - } - - // Otherwise, use Asset Containers to load all dependent assets in parallel. - - Asset asset = FindOrCreateAsset(assetId, assetType, assetReferenceLoadBehavior); - - if(!asset || (!loadParams.m_reloadMissingDependencies && asset.IsReady())) - { - // If the asset is already ready, just return it and skip the container - return AZStd::move(asset); - } - - auto container = GetAssetContainer(asset, loadParams); - - AZStd::scoped_lock lock(m_assetContainerMutex); - - m_ownedAssetContainers.insert({ container.get(), container }); - - // Only insert a new entry into m_ownedAssetContainerLookup if one doesn't already exist for this container. - // Because it's a multimap, it is possible to add duplicate entries by mistake. - bool entryExists = false; - auto rangeItr = m_ownedAssetContainerLookup.equal_range(assetId); - for (auto itr = rangeItr.first; itr != rangeItr.second; ++itr) - { - if (itr->second == container.get()) + AssetMap::iterator it = m_assets.find(assetInfo.m_assetId); + if (it != m_assets.end()) { - entryExists = true; - break; - } - } - - // Entry for this container doesn't exist yet, so add it. - if (!entryExists) - { - m_ownedAssetContainerLookup.insert({ assetId, container.get() }); - } - - return asset; - } - - Asset AssetManager::GetAssetInternal(const AssetId& assetId, [[maybe_unused]] const AssetType& assetType, - AssetLoadBehavior assetReferenceLoadBehavior, const AssetLoadParameters& loadParams, AssetInfo assetInfo /*= () */, bool signalLoaded /*= false */) - { - AZ_PROFILE_FUNCTION(AzCore); - - AZ_Error("AssetDatabase", assetId.IsValid(), "GetAsset called with invalid asset Id."); - AZ_Error("AssetDatabase", !assetType.IsNull(), "GetAsset called with invalid asset type."); - bool assetMissing = false; - - { - AZ_PROFILE_SCOPE(AzCore, "GetAsset: GetAssetInfo"); - - // Attempt to look up asset info from catalog - // This is so that when assetId is a legacy id, we're operating on the canonical id anyway - if (!assetInfo.m_assetId.IsValid()) - { - AssetCatalogRequestBus::BroadcastResult(assetInfo, &AssetCatalogRequestBus::Events::GetAssetInfoById, assetId); - } - - // If the asset was found in the catalog, ensure the type infos match - if (assetInfo.m_assetId.IsValid()) - { - AZ_Warning("AssetManager", assetInfo.m_assetType == assetType, - "Requested asset id %s with type %s, but type is actually %s.", - assetId.ToString().c_str(), assetType.ToString().c_str(), - assetInfo.m_assetType.ToString().c_str()); + assetData = it->second; + asset.SetData(assetData); } else { - AZ_Warning("AssetManager", false, "GetAsset called for asset which does not exist in asset catalog and cannot be loaded. Asset may be missing, not processed or moved. AssetId: %s", - assetId.ToString().c_str()); - - // If asset not found, use the id and type given. We will create a valid asset, but it will likely get an error - // status below if the asset handler doesn't reroute it to a default asset. - assetInfo.m_assetId = assetId; - assetInfo.m_assetType = assetType; - assetMissing = true; + isNewEntry = true; } } - AZ_PROFILE_SCOPE(AzCore, "GetAsset: %s", assetInfo.m_relativePath.c_str()); - AZ_ASSET_NAMED_SCOPE("GetAsset: %s", assetInfo.m_relativePath.c_str()); - - AZStd::shared_ptr dataStream; - AssetStreamInfo loadInfo; - bool triggerAssetErrorNotification = false; - bool wasUnloaded = false; - AssetHandler* handler = nullptr; - AssetData* assetData = nullptr; - Asset asset; // Used to hold a reference while job is dispatched and while outside of the assetMutex lock. - - // Control the scope of the assetMutex lock { - AZStd::scoped_lock assetLock(m_assetMutex); - bool isNewEntry = false; + AZ_PROFILE_SCOPE(AzCore, "GetAsset: FindAssetHandler"); - // check if asset already exists + // find the asset type handler + AssetHandlerMap::iterator handlerIt = m_handlers.find(assetInfo.m_assetType); + AZ_Error("AssetDatabase", handlerIt != m_handlers.end(), "No handler was registered for this asset [type:%s id:%s]!", + assetInfo.m_assetType.ToString().c_str(), assetInfo.m_assetId.ToString().c_str()); + if (handlerIt != m_handlers.end()) { - AZ_PROFILE_SCOPE(AzCore, "GetAsset: FindAsset"); - - AssetMap::iterator it = m_assets.find(assetInfo.m_assetId); - if (it != m_assets.end()) + // Create the asset ptr and insert it into our asset map. + handler = handlerIt->second; + if (isNewEntry) { - assetData = it->second; - asset.SetData(assetData); - } - else - { - isNewEntry = true; - } - } + AZ_PROFILE_SCOPE(AzCore, "GetAsset: CreateAsset"); - { - AZ_PROFILE_SCOPE(AzCore, "GetAsset: FindAssetHandler"); - - // find the asset type handler - AssetHandlerMap::iterator handlerIt = m_handlers.find(assetInfo.m_assetType); - AZ_Error("AssetDatabase", handlerIt != m_handlers.end(), "No handler was registered for this asset [type:%s id:%s]!", - assetInfo.m_assetType.ToString().c_str(), assetInfo.m_assetId.ToString().c_str()); - if (handlerIt != m_handlers.end()) - { - // Create the asset ptr and insert it into our asset map. - handler = handlerIt->second; - if (isNewEntry) + assetData = handler->CreateAsset(assetInfo.m_assetId, assetInfo.m_assetType); + if (assetData) { - AZ_PROFILE_SCOPE(AzCore, "GetAsset: CreateAsset"); - - assetData = handler->CreateAsset(assetInfo.m_assetId, assetInfo.m_assetType); - if (assetData) - { - assetData->m_assetId = assetInfo.m_assetId; - assetData->m_creationToken = ++m_creationTokenGenerator; - assetData->RegisterWithHandler(handler); - asset.SetData(assetData); - } - else - { - AZ_Error("AssetDatabase", false, "Failed to create asset with (id=%s, type=%s)", - assetInfo.m_assetId.ToString().c_str(), - assetInfo.m_assetType.ToString().c_str()); - } - } - } - } - - if (assetData) - { - if (isNewEntry && assetData->IsRegisterReadonlyAndShareable()) - { - AZ_PROFILE_SCOPE(AzCore, "GetAsset: RegisterAsset"); - m_assets.insert(AZStd::make_pair(assetInfo.m_assetId, assetData)); - } - if (assetData->GetStatus() == AssetData::AssetStatus::NotLoaded) - { - assetData->m_status = AssetData::AssetStatus::Queued; - UpdateDebugStatus(asset); - loadInfo = GetModifiedLoadStreamInfoForAsset(asset, handler); - wasUnloaded = true; - - if (loadInfo.IsValid()) - { - // Create the AssetDataStream instance here so it can claim an asset reference inside the lock (for a total - // count of 2 before starting the load), otherwise the refcount will be 1, and the load could be canceled - // before it is started, which creates state consistency issues. - - dataStream = AZStd::make_shared(handler->GetAssetBufferAllocator()); + assetData->m_assetId = assetInfo.m_assetId; + assetData->m_creationToken = ++m_creationTokenGenerator; + assetData->RegisterWithHandler(handler); + asset.SetData(assetData); } else { - // Asset creation was successful, but asset loading isn't, so trigger the OnAssetError notification - triggerAssetErrorNotification = true; + AZ_Error("AssetDatabase", false, "Failed to create asset with (id=%s, type=%s)", + assetInfo.m_assetId.ToString().c_str(), + assetInfo.m_assetType.ToString().c_str()); } } } } - if (!assetInfo.m_relativePath.empty()) + if (assetData) { - asset.m_assetHint = assetInfo.m_relativePath; - } - - asset.SetAutoLoadBehavior(assetReferenceLoadBehavior); - - // We delay queueing the async file I/O until we release m_assetMutex - if (dataStream) - { - AZ_Assert(loadInfo.IsValid(), "Expected valid stream info when dataStream is valid."); - constexpr bool isReload = false; - QueueAsyncStreamLoad(asset, dataStream, loadInfo, isReload, - handler, loadParams, signalLoaded); - } - else - { - AZ_Assert(!loadInfo.IsValid(), "Expected invalid stream info when dataStream is invalid."); - - if(!wasUnloaded && assetData && assetData->GetStatus() == AssetData::AssetStatus::Queued) + if (isNewEntry && assetData->IsRegisterReadonlyAndShareable()) { - auto&& [deadline, priority] = GetEffectiveDeadlineAndPriority(*handler, assetData->GetType(), loadParams); - - RescheduleStreamerRequest(assetData->GetId(), deadline, priority); + AZ_PROFILE_SCOPE(AzCore, "GetAsset: RegisterAsset"); + m_assets.insert(AZStd::make_pair(assetInfo.m_assetId, assetData)); } - - if (triggerAssetErrorNotification) + if (assetData->GetStatus() == AssetData::AssetStatus::NotLoaded) { - // If the asset was missing from the catalog, we already printed an error, so we can skip printing this one. - if (!assetMissing) + assetData->m_status = AssetData::AssetStatus::Queued; + UpdateDebugStatus(asset); + loadInfo = GetModifiedLoadStreamInfoForAsset(asset, handler); + wasUnloaded = true; + + if (loadInfo.IsValid()) { - AZ_Error("AssetDatabase", false, "Failed to retrieve required information for asset %s (%s)", - assetInfo.m_assetId.ToString().c_str(), - assetInfo.m_relativePath.empty() ? "" : assetInfo.m_relativePath.c_str()); - } + // Create the AssetDataStream instance here so it can claim an asset reference inside the lock (for a total + // count of 2 before starting the load), otherwise the refcount will be 1, and the load could be canceled + // before it is started, which creates state consistency issues. - PostLoad(asset, false, false, handler); - } - } - - return asset; - } - - void AssetManager::UpdateDebugStatus(const AZ::Data::Asset& asset) - { - if(!m_debugAssetEvents) - { - m_debugAssetEvents = AZ::Interface::Get(); - } - - if(m_debugAssetEvents) - { - m_debugAssetEvents->AssetStatusUpdate(asset.GetId(), asset.GetStatus()); - } - } - - Asset AssetManager::FindOrCreateAsset(const AssetId& assetId, const AssetType& assetType, AssetLoadBehavior assetReferenceLoadBehavior) - { - AZStd::scoped_lock asset_lock(m_assetMutex); - - Asset asset = FindAsset(assetId, assetReferenceLoadBehavior); - - if (!asset) - { - asset = CreateAsset(assetId, assetType, assetReferenceLoadBehavior); - } - - return asset; - } - - //========================================================================= - // CreateAsset - // [8/31/2012] - //========================================================================= - Asset AssetManager::CreateAsset(const AssetId& assetId, const AssetType& assetType, AssetLoadBehavior assetReferenceLoadBehavior) - { - AZStd::scoped_lock asset_lock(m_assetMutex); - - // check if asset already exist - AssetMap::iterator it = m_assets.find(assetId); - if (it == m_assets.end()) - { - // find the asset type handler - AssetHandlerMap::iterator handlerIt = m_handlers.find(assetType); - AZ_Error("AssetDatabase", handlerIt != m_handlers.end(), "No handler was registered for this asset (id=%s, type=%s)!", assetId.ToString().c_str(), assetType.ToString().c_str()); - if (handlerIt != m_handlers.end()) - { - // Create the asset ptr - AssetHandler* handler = handlerIt->second; - auto assetData = handler->CreateAsset(assetId, assetType); - AZ_Error("AssetDatabase", assetData, "Failed to create asset with (id=%s, type=%s)", assetId.ToString().c_str(), assetType.ToString().c_str()); - if (assetData) - { - assetData->m_assetId = assetId; - assetData->m_creationToken = ++m_creationTokenGenerator; - assetData->RegisterWithHandler(handler); - if (assetData->IsRegisterReadonlyAndShareable()) - { - m_assets.insert(AZStd::make_pair(assetId, assetData)); - } - - Asset asset(assetReferenceLoadBehavior); - asset.SetData(assetData); - - return asset; - } - } - } - else - { - AZ_Error("AssetDatabase", false, "Asset (id=%s, type=%s) already exists in the database! Asset not created!", assetId.ToString().c_str(), assetType.ToString().c_str()); - } - return Asset(assetReferenceLoadBehavior); - } - - //========================================================================= - // ReleaseAsset - //========================================================================= - void AssetManager::ReleaseAsset(AssetData* asset, AssetId assetId, AssetType assetType, bool removeAssetFromHash, int creationToken) - { - AZ_Assert(asset, "Cannot release NULL AssetPtr!"); - - if(m_suspendAssetRelease) - { - return; - } - - bool wasInAssetsHash = false; // We do support assets that are not registered in the asset manager (with the same ID too). - bool destroyAsset = false; - - if (removeAssetFromHash) - { - AZStd::scoped_lock asset_lock(m_assetMutex); - AssetMap::iterator it = m_assets.find(assetId); - // need to check the count again in here in case - // someone was trying to get the asset on another thread - // Set it to -1 so only this thread will attempt to clean up the cache and delete the asset - int expectedRefCount = 0; - // if the assetId is not in the map or if the identifierId - // do not match it implies that the asset has been already destroyed. - // if the usecount is non zero it implies that we cannot destroy this asset. - if (it != m_assets.end() && it->second->m_creationToken == creationToken && it->second->m_weakUseCount.compare_exchange_strong(expectedRefCount, -1)) - { - wasInAssetsHash = true; - m_assets.erase(it); - destroyAsset = true; - } - } - else - { - // if an asset is not shareable, it implies that that asset is not in the map - // and therefore once its ref count goes to zero it cannot go back up again and therefore we can safely destroy it - destroyAsset = true; - } - - // We have to separate the code which was removing the asset from the m_asset map while being locked, but then actually destroy the asset - // while the lock is not held since destroying the asset while holding the lock can cause a deadlock. - if (destroyAsset) - { - if(m_debugAssetEvents) - { - m_debugAssetEvents->ReleaseAsset(assetId); - } - - // find the asset type handler - AssetHandlerMap::iterator handlerIt = m_handlers.find(assetType); - if (handlerIt != m_handlers.end()) - { - AssetHandler* handler = handlerIt->second; - if (asset) - { - handler->DestroyAsset(asset); - - if (wasInAssetsHash) - { - AssetBus::QueueEvent(assetId, &AssetBus::Events::OnAssetUnloaded, assetId, assetType); - } - } - } - else - { - AZ_Assert(false, "No handler was registered for asset of type %s but it was still in the AssetManager as %s", assetType.ToString().c_str(), asset->GetId().ToString().c_str()); - } - } - } - - void AssetManager::OnAssetUnused(AssetData* asset) - { - // If we're currently suspending asset releases, don't get rid of the asset containers either. - if (m_suspendAssetRelease) - { - return; - } - - ReleaseAssetContainersForAsset(asset); - } - - void AssetManager::ReleaseAssetContainersForAsset(AssetData* asset) - { - // Release any containers that were loading this asset - AZStd::scoped_lock lock(m_assetContainerMutex); - - AssetId assetId = asset->GetId(); - - auto rangeItr = m_ownedAssetContainerLookup.equal_range(assetId); - - for (auto itr = rangeItr.first; itr != rangeItr.second;) - { - AZ_Assert(itr->second->GetContainerAssetId() == assetId, - "Asset container is incorrectly associated with the asset being destroyed."); - itr->second->ClearRootAsset(); - - // Only remove owned asset containers if they aren't currently loading. - // If they *are* currently loading, removing them could cause dependent asset loads that were triggered to - // remain in a perpetual loading state. Instead, leave the containers for now, they will get removed during - // the OnAssetContainerReady callback. - if (!itr->second->IsLoading()) - { - m_ownedAssetContainers.erase(itr->second); - itr = m_ownedAssetContainerLookup.erase(itr); - } - else - { - ++itr; - } - } - } - - //========================================================================= - // SaveAsset - // [9/13/2012] - //========================================================================= - void AssetManager::SaveAsset(const Asset& asset) - { - AssetHandler* handler; - { - // find the asset type handler - AssetHandlerMap::iterator handlerIt = m_handlers.find(asset.GetType()); - AZ_Assert(handlerIt != m_handlers.end(), "No handler was registered for this asset [type:%s id:%s]!", asset.GetType().ToString().c_str(), asset.GetId().ToString().c_str()); - handler = handlerIt->second; - } - - // start the data saving - SaveAssetJob* saveJob = aznew SaveAssetJob(JobContext::GetGlobalContext(), this, asset, handler); - saveJob->Start(); - } - - //========================================================================= - // ReloadAsset - //========================================================================= - void AssetManager::ReloadAsset(const AssetId& assetId, AssetLoadBehavior assetReferenceLoadBehavior, bool isAutoReload) - { - AZStd::scoped_lock assetLock(m_assetMutex); - auto assetIter = m_assets.find(assetId); - - if (assetIter == m_assets.end() || assetIter->second->IsLoading()) - { - // Only existing assets can be reloaded. - return; - } - - auto reloadIter = m_reloads.find(assetId); - if (reloadIter != m_reloads.end()) - { - auto curStatus = reloadIter->second.GetData()->GetStatus(); - // We don't need another reload if we're in "Queued" state because that reload has not actually begun yet. - // If it is in Loading state we want to pass by and allow the new assetData to be created and start the new reload - // As the current load could already be stale - if (curStatus == AssetData::AssetStatus::Queued) - { - return; - } - else if (curStatus == AssetData::AssetStatus::Loading || curStatus == AssetData::AssetStatus::StreamReady) - { - // Don't flood the tick bus - this value will be checked when the asset load completes - reloadIter->second->SetRequeue(true); - return; - } - } - - AssetData* newAssetData = nullptr; - AssetHandler* handler = nullptr; - - bool preventAutoReload = isAutoReload && assetIter->second && !assetIter->second->HandleAutoReload(); - - // when Asset's constructor is called (the one that takes an AssetData), it updates the AssetID - // of the Asset to be the real latest canonical assetId of the asset, so we cache that here instead of have it happen - // implicitly and repeatedly for anything we call. - Asset currentAsset(assetIter->second, AZ::Data::AssetLoadBehavior::Default); - - if (!assetIter->second->IsRegisterReadonlyAndShareable() && !preventAutoReload) - { - // Reloading an "instance asset" is basically a no-op. - // We'll simply notify users to reload the asset. - AssetBus::QueueFunction(&AssetManager::NotifyAssetReloaded, this, currentAsset); - return; - } - else - { - AssetBus::QueueFunction(&AssetManager::NotifyAssetPreReload, this, currentAsset); - } - - // Current AssetData has requested not to be auto reloaded - if (preventAutoReload) - { - return; - } - - // Resolve the asset handler and allocate new data for the reload. - { - AssetHandlerMap::iterator handlerIt = m_handlers.find(currentAsset.GetType()); - AZ_Assert(handlerIt != m_handlers.end(), "No handler was registered for this asset [type:%s id:%s]!", - currentAsset.GetType().ToString().c_str(), currentAsset.GetId().ToString().c_str()); - handler = handlerIt->second; - - newAssetData = handler->CreateAsset(currentAsset.GetId(), currentAsset.GetType()); - if (newAssetData) - { - newAssetData->m_assetId = currentAsset.GetId(); - newAssetData->RegisterWithHandler(handler); - } - } - - if (newAssetData) - { - // For reloaded assets, we need to hold an internal reference to ensure the data - // isn't immediately destroyed. Since reloads are not a shipping feature, we'll - // hold this reference indefinitely, but we'll only hold the most recent one for - // a given asset Id. - - newAssetData->m_status = AssetData::AssetStatus::Queued; - Asset newAsset(newAssetData, assetReferenceLoadBehavior); - - m_reloads[newAsset.GetId()] = newAsset; - - UpdateDebugStatus(newAsset); - - AZStd::shared_ptr dataStream; - AssetStreamInfo loadInfo = GetModifiedLoadStreamInfoForAsset(newAsset, handler); - constexpr bool isReload = true; - if (loadInfo.IsValid()) - { - // Create the AssetDataStream instance here so it can claim an asset reference inside the lock (for a total - // count of 2 before starting the load), otherwise the refcount will be 1, and the load could be canceled - // before it is started, which creates state consistency issues. - - dataStream = AZStd::make_shared(handler->GetAssetBufferAllocator()); - if (dataStream) - { - // Currently there isn't a clear use case for needing to adjust priority for reloads so the default load priority is used - constexpr bool signalLoaded = false; // this is a reload, so don't signal dependent-asset loads - QueueAsyncStreamLoad(newAsset, dataStream, loadInfo, isReload, - handler, {}, signalLoaded); + dataStream = AZStd::make_shared(handler->GetAssetBufferAllocator()); } else { - AZ_Assert(false, "Failed to create dataStream to reload asset %s (%s)", - newAsset.GetId().ToString().c_str(), - newAsset.GetHint().c_str()); + // Asset creation was successful, but asset loading isn't, so trigger the OnAssetError notification + triggerAssetErrorNotification = true; } } - else + } + } + + if (!assetInfo.m_relativePath.empty()) + { + asset.m_assetHint = assetInfo.m_relativePath; + } + + asset.SetAutoLoadBehavior(assetReferenceLoadBehavior); + + // We delay queueing the async file I/O until we release m_assetMutex + if (dataStream) + { + AZ_Assert(loadInfo.IsValid(), "Expected valid stream info when dataStream is valid."); + constexpr bool isReload = false; + QueueAsyncStreamLoad(asset, dataStream, loadInfo, isReload, + handler, loadParams, signalLoaded); + } + else + { + AZ_Assert(!loadInfo.IsValid(), "Expected invalid stream info when dataStream is invalid."); + + if(!wasUnloaded && assetData && assetData->GetStatus() == AssetData::AssetStatus::Queued) + { + auto&& [deadline, priority] = GetEffectiveDeadlineAndPriority(*handler, assetData->GetType(), loadParams); + + RescheduleStreamerRequest(assetData->GetId(), deadline, priority); + } + + if (triggerAssetErrorNotification) + { + // If the asset was missing from the catalog, we already printed an error, so we can skip printing this one. + if (!assetMissing) { - // Asset creation was successful, but asset loading isn't, so trigger the OnAssetError notification AZ_Error("AssetDatabase", false, "Failed to retrieve required information for asset %s (%s)", - newAsset.GetId().ToString().c_str(), - newAsset.GetHint().c_str()); - - constexpr bool loadSucceeded = false; - AssetManager::Instance().PostLoad(newAsset, loadSucceeded, isReload, handler); + assetInfo.m_assetId.ToString().c_str(), + assetInfo.m_relativePath.empty() ? "" : assetInfo.m_relativePath.c_str()); } + PostLoad(asset, false, false, handler); } } - //========================================================================= - // ReloadAssetFromData - //========================================================================= - void AssetManager::ReloadAssetFromData(const Asset& asset) + return asset; + } + + void AssetManager::UpdateDebugStatus(const AZ::Data::Asset& asset) + { + if(!m_debugAssetEvents) { - bool shouldAssignAssetData = false; - - { - AZ_Assert(asset.Get(), "Asset data for reload is missing."); - AZStd::scoped_lock assetLock(m_assetMutex); - AZ_Assert( - m_assets.find(asset.GetId()) != m_assets.end(), - "Unable to reload asset %s because it's not in the AssetManager's asset list.", asset.ToString().c_str()); - AZ_Assert( - m_assets.find(asset.GetId()) == m_assets.end() || - asset->RTTI_GetType() == m_assets.find(asset.GetId())->second->RTTI_GetType(), - "New and old data types are mismatched!"); - - auto found = m_assets.find(asset.GetId()); - if ((found == m_assets.end()) || (asset->RTTI_GetType() != found->second->RTTI_GetType())) - { - return; // this will just lead to crashes down the line and the above asserts cover this. - } - - AssetData* newData = asset.Get(); - - if (found->second != newData) - { - // Notify users that we are about to change asset - AssetBus::Event(asset.GetId(), &AssetBus::Events::OnAssetPreReload, asset); - - // Resolve the asset handler and account for the new asset instance. - { - [[maybe_unused]] AssetHandlerMap::iterator handlerIt = m_handlers.find(newData->GetType()); - AZ_Assert( - handlerIt != m_handlers.end(), "No handler was registered for this asset [type:%s id:%s]!", - newData->GetType().ToString().c_str(), newData->GetId().ToString().c_str()); - } - - shouldAssignAssetData = true; - } - } - - // We specifically perform this outside of the m_assetMutex lock so that the lock isn't held at the point that - // OnAssetReload is triggered inside of AssignAssetData. Otherwise, we open up a high potential for deadlocks. - if (shouldAssignAssetData) - { - AssignAssetData(asset); - } + m_debugAssetEvents = AZ::Interface::Get(); } - //========================================================================= - // GetHandler - //========================================================================= - AssetHandler* AssetManager::GetHandler(const AssetType& assetType) + if(m_debugAssetEvents) { - auto handlerEntry = m_handlers.find(assetType); - if (handlerEntry != m_handlers.end()) - { - return handlerEntry->second; - } - return nullptr; + m_debugAssetEvents->AssetStatusUpdate(asset.GetId(), asset.GetStatus()); + } + } + + Asset AssetManager::FindOrCreateAsset(const AssetId& assetId, const AssetType& assetType, AssetLoadBehavior assetReferenceLoadBehavior) + { + AZStd::scoped_lock asset_lock(m_assetMutex); + + Asset asset = FindAsset(assetId, assetReferenceLoadBehavior); + + if (!asset) + { + asset = CreateAsset(assetId, assetType, assetReferenceLoadBehavior); } - //========================================================================= - // AssignAssetData - //========================================================================= - void AssetManager::AssignAssetData(const Asset& asset) + return asset; + } + + //========================================================================= + // CreateAsset + // [8/31/2012] + //========================================================================= + Asset AssetManager::CreateAsset(const AssetId& assetId, const AssetType& assetType, AssetLoadBehavior assetReferenceLoadBehavior) + { + AZStd::scoped_lock asset_lock(m_assetMutex); + + // check if asset already exist + AssetMap::iterator it = m_assets.find(assetId); + if (it == m_assets.end()) { - AZ_Assert(asset.Get(), "Reloaded data is missing!"); - - const AssetId& assetId = asset.GetId(); - - asset->m_status = AssetData::AssetStatus::Ready; - UpdateDebugStatus(asset); - - if (asset->IsRegisterReadonlyAndShareable()) + // find the asset type handler + AssetHandlerMap::iterator handlerIt = m_handlers.find(assetType); + AZ_Error("AssetDatabase", handlerIt != m_handlers.end(), "No handler was registered for this asset (id=%s, type=%s)!", assetId.ToString().c_str(), assetType.ToString().c_str()); + if (handlerIt != m_handlers.end()) { - bool requeue{ false }; + // Create the asset ptr + AssetHandler* handler = handlerIt->second; + auto assetData = handler->CreateAsset(assetId, assetType); + AZ_Error("AssetDatabase", assetData, "Failed to create asset with (id=%s, type=%s)", assetId.ToString().c_str(), assetType.ToString().c_str()); + if (assetData) { - AZStd::scoped_lock assetLock(m_assetMutex); - auto found = m_assets.find(assetId); - AZ_Assert(found == m_assets.end() || asset.Get()->RTTI_GetType() == found->second->RTTI_GetType(), - "New and old data types are mismatched!"); - - // if we are here it implies that we have two assets with the same asset id, and we are - // trying to replace the old asset with the new asset which was not created using the asset manager system. - // In this scenario if any other system have cached the old asset then the asset wont be destroyed - // because of creation token mismatch when it's ref count finally goes to zero. Since the old asset is not shareable anymore - // manually setting the creationToken to default creation token will ensure that the asset is destroyed correctly. - asset.m_assetData->m_creationToken = ++m_creationTokenGenerator; - if (found != m_assets.end()) + assetData->m_assetId = assetId; + assetData->m_creationToken = ++m_creationTokenGenerator; + assetData->RegisterWithHandler(handler); + if (assetData->IsRegisterReadonlyAndShareable()) { - found->second->m_creationToken = AZ::Data::s_defaultCreationToken; + m_assets.insert(AZStd::make_pair(assetId, assetData)); } - // Held references to old data are retained, but replace the entry in the DB for future requests. - // Fire an OnAssetReloaded message so listeners can react to the new data. - m_assets[assetId] = asset.Get(); + Asset asset(assetReferenceLoadBehavior); + asset.SetData(assetData); - // Release the reload reference. - auto reloadInfo = m_reloads.find(assetId); - if (reloadInfo != m_reloads.end()) - { - requeue = reloadInfo->second->GetRequeue(); - m_reloads.erase(reloadInfo); - } + return asset; } - // Call reloaded before we can call ReloadAsset below to preserve order - AssetBus::Event(assetId, &AssetBus::Events::OnAssetReloaded, asset); - // Release the lock before we call reload - if (requeue) + } + } + else + { + AZ_Error("AssetDatabase", false, "Asset (id=%s, type=%s) already exists in the database! Asset not created!", assetId.ToString().c_str(), assetType.ToString().c_str()); + } + return Asset(assetReferenceLoadBehavior); + } + + //========================================================================= + // ReleaseAsset + //========================================================================= + void AssetManager::ReleaseAsset(AssetData* asset, AssetId assetId, AssetType assetType, bool removeAssetFromHash, int creationToken) + { + AZ_Assert(asset, "Cannot release NULL AssetPtr!"); + + if(m_suspendAssetRelease) + { + return; + } + + bool wasInAssetsHash = false; // We do support assets that are not registered in the asset manager (with the same ID too). + bool destroyAsset = false; + + if (removeAssetFromHash) + { + AZStd::scoped_lock asset_lock(m_assetMutex); + AssetMap::iterator it = m_assets.find(assetId); + // need to check the count again in here in case + // someone was trying to get the asset on another thread + // Set it to -1 so only this thread will attempt to clean up the cache and delete the asset + int expectedRefCount = 0; + // if the assetId is not in the map or if the identifierId + // do not match it implies that the asset has been already destroyed. + // if the usecount is non zero it implies that we cannot destroy this asset. + if (it != m_assets.end() && it->second->m_creationToken == creationToken && it->second->m_weakUseCount.compare_exchange_strong(expectedRefCount, -1)) + { + wasInAssetsHash = true; + m_assets.erase(it); + destroyAsset = true; + } + } + else + { + // if an asset is not shareable, it implies that that asset is not in the map + // and therefore once its ref count goes to zero it cannot go back up again and therefore we can safely destroy it + destroyAsset = true; + } + + // We have to separate the code which was removing the asset from the m_asset map while being locked, but then actually destroy the asset + // while the lock is not held since destroying the asset while holding the lock can cause a deadlock. + if (destroyAsset) + { + if(m_debugAssetEvents) + { + m_debugAssetEvents->ReleaseAsset(assetId); + } + + // find the asset type handler + AssetHandlerMap::iterator handlerIt = m_handlers.find(assetType); + if (handlerIt != m_handlers.end()) + { + AssetHandler* handler = handlerIt->second; + if (asset) { - ReloadAsset(assetId, asset.GetAutoLoadBehavior()); + handler->DestroyAsset(asset); + + if (wasInAssetsHash) + { + AssetBus::QueueEvent(assetId, &AssetBus::Events::OnAssetUnloaded, assetId, assetType); + } } } else { - AssetBus::Event(assetId, &AssetBus::Events::OnAssetReloaded, asset); + AZ_Assert(false, "No handler was registered for asset of type %s but it was still in the AssetManager as %s", assetType.ToString().c_str(), asset->GetId().ToString().c_str()); + } + } + } + + void AssetManager::OnAssetUnused(AssetData* asset) + { + // If we're currently suspending asset releases, don't get rid of the asset containers either. + if (m_suspendAssetRelease) + { + return; + } + + ReleaseAssetContainersForAsset(asset); + } + + void AssetManager::ReleaseAssetContainersForAsset(AssetData* asset) + { + // Release any containers that were loading this asset + AZStd::scoped_lock lock(m_assetContainerMutex); + + AssetId assetId = asset->GetId(); + + auto rangeItr = m_ownedAssetContainerLookup.equal_range(assetId); + + for (auto itr = rangeItr.first; itr != rangeItr.second;) + { + AZ_Assert(itr->second->GetContainerAssetId() == assetId, + "Asset container is incorrectly associated with the asset being destroyed."); + itr->second->ClearRootAsset(); + + // Only remove owned asset containers if they aren't currently loading. + // If they *are* currently loading, removing them could cause dependent asset loads that were triggered to + // remain in a perpetual loading state. Instead, leave the containers for now, they will get removed during + // the OnAssetContainerReady callback. + if (!itr->second->IsLoading()) + { + m_ownedAssetContainers.erase(itr->second); + itr = m_ownedAssetContainerLookup.erase(itr); + } + else + { + ++itr; + } + } + } + + //========================================================================= + // SaveAsset + // [9/13/2012] + //========================================================================= + void AssetManager::SaveAsset(const Asset& asset) + { + AssetHandler* handler; + { + // find the asset type handler + AssetHandlerMap::iterator handlerIt = m_handlers.find(asset.GetType()); + AZ_Assert(handlerIt != m_handlers.end(), "No handler was registered for this asset [type:%s id:%s]!", asset.GetType().ToString().c_str(), asset.GetId().ToString().c_str()); + handler = handlerIt->second; + } + + // start the data saving + SaveAssetJob* saveJob = aznew SaveAssetJob(JobContext::GetGlobalContext(), this, asset, handler); + saveJob->Start(); + } + + //========================================================================= + // ReloadAsset + //========================================================================= + void AssetManager::ReloadAsset(const AssetId& assetId, AssetLoadBehavior assetReferenceLoadBehavior, bool isAutoReload) + { + AZStd::scoped_lock assetLock(m_assetMutex); + auto assetIter = m_assets.find(assetId); + + if (assetIter == m_assets.end() || assetIter->second->IsLoading()) + { + // Only existing assets can be reloaded. + return; + } + + auto reloadIter = m_reloads.find(assetId); + if (reloadIter != m_reloads.end()) + { + auto curStatus = reloadIter->second.GetData()->GetStatus(); + // We don't need another reload if we're in "Queued" state because that reload has not actually begun yet. + // If it is in Loading state we want to pass by and allow the new assetData to be created and start the new reload + // As the current load could already be stale + if (curStatus == AssetData::AssetStatus::Queued) + { + return; + } + else if (curStatus == AssetData::AssetStatus::Loading || curStatus == AssetData::AssetStatus::StreamReady) + { + // Don't flood the tick bus - this value will be checked when the asset load completes + reloadIter->second->SetRequeue(true); + return; } } - //========================================================================= - // GetModifiedLoadStreamInfoForAsset - //========================================================================= - AssetStreamInfo AssetManager::GetModifiedLoadStreamInfoForAsset(const Asset& asset, AssetHandler* handler) + AssetData* newAssetData = nullptr; + AssetHandler* handler = nullptr; + + bool preventAutoReload = isAutoReload && assetIter->second && !assetIter->second->HandleAutoReload(); + + // when Asset's constructor is called (the one that takes an AssetData), it updates the AssetID + // of the Asset to be the real latest canonical assetId of the asset, so we cache that here instead of have it happen + // implicitly and repeatedly for anything we call. + Asset currentAsset(assetIter->second, AZ::Data::AssetLoadBehavior::Default); + + if (!assetIter->second->IsRegisterReadonlyAndShareable() && !preventAutoReload) { - AssetStreamInfo loadInfo = GetLoadStreamInfoForAsset(asset.GetId(), asset.GetType()); - if (!loadInfo.IsValid()) - { - // opportunity for handler to do default substitution: - AZ::Data::AssetId fallbackId = handler->AssetMissingInCatalog(asset); - if (fallbackId.IsValid()) - { - loadInfo = GetLoadStreamInfoForAsset(fallbackId, asset.GetType()); - } - } - - // Give the handler an opportunity to modify any of the load info before creating the dataStream. - handler->GetCustomAssetStreamInfoForLoad(loadInfo); - - return loadInfo; + // Reloading an "instance asset" is basically a no-op. + // We'll simply notify users to reload the asset. + AssetBus::QueueFunction(&AssetManager::NotifyAssetReloaded, this, currentAsset); + return; + } + else + { + AssetBus::QueueFunction(&AssetManager::NotifyAssetPreReload, this, currentAsset); } - //========================================================================= - // QueueAsyncStreamLoad - //========================================================================= - void AssetManager::QueueAsyncStreamLoad(Asset asset, AZStd::shared_ptr dataStream, - const AZ::Data::AssetStreamInfo& streamInfo, bool isReload, - AssetHandler* handler, const AssetLoadParameters& loadParams, bool signalLoaded) + // Current AssetData has requested not to be auto reloaded + if (preventAutoReload) { - AZ_PROFILE_FUNCTION(AzCore); + return; + } - // Set up the callback that will process the asset data once the raw file load is finished. - // The callback is declared as mutable so that we can clear weakAsset within the callback. The refcount in weakAsset - // can trigger an AssetManager::ReleaseAsset call. If this occurs during lambda cleanup, it could happen at any time - // on the file streamer thread as streamer requests get recycled, including during (or after) AssetManager shutdown. - // By controlling when the refcount is changed, we can ensure that it occurs while the AssetManager is still active. - auto assetDataStreamCallback = [this, loadParams, handler, dataStream, signalLoaded, isReload, - weakAsset = AssetInternal::WeakAsset(asset)] - (AZ::IO::IStreamerTypes::RequestStatus status) mutable + // Resolve the asset handler and allocate new data for the reload. + { + AssetHandlerMap::iterator handlerIt = m_handlers.find(currentAsset.GetType()); + AZ_Assert(handlerIt != m_handlers.end(), "No handler was registered for this asset [type:%s id:%s]!", + currentAsset.GetType().ToString().c_str(), currentAsset.GetId().ToString().c_str()); + handler = handlerIt->second; + + newAssetData = handler->CreateAsset(currentAsset.GetId(), currentAsset.GetType()); + if (newAssetData) { - auto assetId = weakAsset.GetId(); + newAssetData->m_assetId = currentAsset.GetId(); + newAssetData->RegisterWithHandler(handler); + } + } - Asset loadingAsset = weakAsset.GetStrongReference(); + if (newAssetData) + { + // For reloaded assets, we need to hold an internal reference to ensure the data + // isn't immediately destroyed. Since reloads are not a shipping feature, we'll + // hold this reference indefinitely, but we'll only hold the most recent one for + // a given asset Id. - if (loadingAsset) + newAssetData->m_status = AssetData::AssetStatus::Queued; + Asset newAsset(newAssetData, assetReferenceLoadBehavior); + + m_reloads[newAsset.GetId()] = newAsset; + + UpdateDebugStatus(newAsset); + + AZStd::shared_ptr dataStream; + AssetStreamInfo loadInfo = GetModifiedLoadStreamInfoForAsset(newAsset, handler); + constexpr bool isReload = true; + if (loadInfo.IsValid()) + { + // Create the AssetDataStream instance here so it can claim an asset reference inside the lock (for a total + // count of 2 before starting the load), otherwise the refcount will be 1, and the load could be canceled + // before it is started, which creates state consistency issues. + + dataStream = AZStd::make_shared(handler->GetAssetBufferAllocator()); + if (dataStream) { - AZ_PROFILE_SCOPE(AzCore, "AZ::Data::LoadAssetStreamerCallback %s", - loadingAsset.GetHint().c_str()); - { - AZStd::scoped_lock assetLock(m_assetMutex); - AssetData* data = loadingAsset.Get(); - if (data->GetStatus() != AssetData::AssetStatus::Queued) - { - AZ_Warning("AssetManager", false, "Asset %s no longer in Queued state, abandoning load", loadingAsset.GetId().ToString().c_str()); - return; - } - data->m_status = AssetData::AssetStatus::StreamReady; - } - - // The callback from AZ Streamer blocks the streaming thread until this function completes. To minimize the overhead, - // do the majority of the work in a separate job. - auto loadJob = aznew LoadAssetJob(this, loadingAsset, - dataStream, isReload, status, handler, loadParams, signalLoaded); - - bool jobQueued = false; - - // If there's already an active blocking request waiting for this load to complete, let that thread handle - // the load itself instead of consuming a second thread. - { - AZStd::scoped_lock requestLock(m_activeBlockingRequestMutex); - auto range = m_activeBlockingRequests.equal_range(assetId); - for(auto blockingRequest = range.first; blockingRequest != range.second; ++blockingRequest) - { - if(blockingRequest->second->QueueAssetLoadJob(loadJob)) - { - jobQueued = true; - break; - } - } - } - - if (!jobQueued) - { - loadJob->Start(); - } + // Currently there isn't a clear use case for needing to adjust priority for reloads so the default load priority is used + constexpr bool signalLoaded = false; // this is a reload, so don't signal dependent-asset loads + QueueAsyncStreamLoad(newAsset, dataStream, loadInfo, isReload, + handler, {}, signalLoaded); } else { - BlockingAssetLoadBus::Event(assetId, &BlockingAssetLoadBus::Events::OnLoadCanceled, assetId); - AssetManagerBus::Broadcast(&AssetManagerBus::Events::OnAssetCanceled, assetId); + AZ_Assert(false, "Failed to create dataStream to reload asset %s (%s)", + newAsset.GetId().ToString().c_str(), + newAsset.GetHint().c_str()); + } + } + else + { + // Asset creation was successful, but asset loading isn't, so trigger the OnAssetError notification + AZ_Error("AssetDatabase", false, "Failed to retrieve required information for asset %s (%s)", + newAsset.GetId().ToString().c_str(), + newAsset.GetHint().c_str()); + + constexpr bool loadSucceeded = false; + AssetManager::Instance().PostLoad(newAsset, loadSucceeded, isReload, handler); + } + + } + } + + //========================================================================= + // ReloadAssetFromData + //========================================================================= + void AssetManager::ReloadAssetFromData(const Asset& asset) + { + bool shouldAssignAssetData = false; + + { + AZ_Assert(asset.Get(), "Asset data for reload is missing."); + AZStd::scoped_lock assetLock(m_assetMutex); + AZ_Assert( + m_assets.find(asset.GetId()) != m_assets.end(), + "Unable to reload asset %s because it's not in the AssetManager's asset list.", asset.ToString().c_str()); + AZ_Assert( + m_assets.find(asset.GetId()) == m_assets.end() || + asset->RTTI_GetType() == m_assets.find(asset.GetId())->second->RTTI_GetType(), + "New and old data types are mismatched!"); + + auto found = m_assets.find(asset.GetId()); + if ((found == m_assets.end()) || (asset->RTTI_GetType() != found->second->RTTI_GetType())) + { + return; // this will just lead to crashes down the line and the above asserts cover this. + } + + AssetData* newData = asset.Get(); + + if (found->second != newData) + { + // Notify users that we are about to change asset + AssetBus::Event(asset.GetId(), &AssetBus::Events::OnAssetPreReload, asset); + + // Resolve the asset handler and account for the new asset instance. + { + [[maybe_unused]] AssetHandlerMap::iterator handlerIt = m_handlers.find(newData->GetType()); + AZ_Assert( + handlerIt != m_handlers.end(), "No handler was registered for this asset [type:%s id:%s]!", + newData->GetType().ToString().c_str(), newData->GetId().ToString().c_str()); } - // *After* the loadJob has been created, clear our asset references and remove the active streamer requests. - // This needs to happen after the loadJob creation to ensure that on AssetManager shutdown, there are no brief - // windows in which requests and/or jobs are still active after we've removed our tracking of the requests and jobs. - - // Also, if the asset references don't get cleared until after the callback completes, or at some indeterminate later - // time when the File Streamer cleans up the file requests (for the weakAsset lambda parameter), then it's possible that - // they will trigger a ReleaseAsset call sometime after the AssetManager has begun to shut down, which can lead to - // race conditions. - - weakAsset = {}; - loadingAsset.Reset(); - RemoveActiveStreamerRequest(assetId); - }; - - auto&& [deadline, priority] = GetEffectiveDeadlineAndPriority(*handler, asset.GetType(), loadParams); - - // Track the load request and queue the asset data stream load. - AddActiveStreamerRequest(asset.GetId(), dataStream); - dataStream->Open( - streamInfo.m_streamName, - streamInfo.m_dataOffset, - streamInfo.m_dataLen, - deadline, priority, assetDataStreamCallback); + shouldAssignAssetData = true; + } } - //========================================================================= - // NotifyAssetReady - //========================================================================= - void AssetManager::NotifyAssetReady(Asset asset) - { - AssetData* data = asset.Get(); - AZ_Assert(data, "NotifyAssetReady: asset is missing info!"); - data->m_status = AssetData::AssetStatus::Ready; - - AssetBus::Event(asset.GetId(), &AssetBus::Events::OnAssetReady, asset); - } - - //========================================================================= - // NotifyAssetPreReload - //========================================================================= - void AssetManager::NotifyAssetPreReload(Asset asset) - { - AssetBus::Event(asset.GetId(), &AssetBus::Events::OnAssetPreReload, asset); - } - - //========================================================================= - // NotifyAssetReloaded - //========================================================================= - void AssetManager::NotifyAssetReloaded(Asset asset) + // We specifically perform this outside of the m_assetMutex lock so that the lock isn't held at the point that + // OnAssetReload is triggered inside of AssignAssetData. Otherwise, we open up a high potential for deadlocks. + if (shouldAssignAssetData) { AssignAssetData(asset); } + } - //========================================================================= - // NotifyAssetReloaded - //========================================================================= - void AssetManager::NotifyAssetReloadError(Asset asset) + //========================================================================= + // GetHandler + //========================================================================= + AssetHandler* AssetManager::GetHandler(const AssetType& assetType) + { + auto handlerEntry = m_handlers.find(assetType); + if (handlerEntry != m_handlers.end()) { - // Failed reloads have no side effects. Just notify observers (error reporting, etc). + return handlerEntry->second; + } + return nullptr; + } + + //========================================================================= + // AssignAssetData + //========================================================================= + void AssetManager::AssignAssetData(const Asset& asset) + { + AZ_Assert(asset.Get(), "Reloaded data is missing!"); + + const AssetId& assetId = asset.GetId(); + + asset->m_status = AssetData::AssetStatus::Ready; + UpdateDebugStatus(asset); + + if (asset->IsRegisterReadonlyAndShareable()) + { + bool requeue{ false }; { - AZStd::lock_guard assetLock(m_assetMutex); - m_reloads.erase(asset.GetId()); - } - AssetBus::Event(asset.GetId(), &AssetBus::Events::OnAssetReloadError, asset); - } - - //========================================================================= - // NotifyAssetError - //========================================================================= - void AssetManager::NotifyAssetError(Asset asset) - { - asset.Get()->m_status = AssetData::AssetStatus::Error; - AssetBus::Event(asset.GetId(), &AssetBus::Events::OnAssetError, asset); - } - - void AssetManager::NotifyAssetCanceled(AssetId assetId) - { - AssetBus::Event(assetId, &AssetBus::Events::OnAssetCanceled, assetId); - } - - void AssetManager::NotifyAssetContainerReady(Asset asset) - { - AssetBus::Event(asset.GetId(), &AssetBus::Events::OnAssetContainerReady, asset); - } - - //========================================================================= - // AddJob - // [04/02/2014] - //========================================================================= - void AssetManager::AddJob(AssetDatabaseJob* job) - { - AZStd::scoped_lock assetLock(m_activeJobOrRequestMutex); - - m_activeJobs.push_back(*job); - } - - //========================================================================= - // ValidateAndRegisterAssetLoading - //========================================================================= - bool AssetManager::ValidateAndRegisterAssetLoading(const Asset& asset) - { - AssetData* data = asset.Get(); - { - AZStd::scoped_lock assetLock(m_assetMutex); - if (data) + auto found = m_assets.find(assetId); + AZ_Assert(found == m_assets.end() || asset.Get()->RTTI_GetType() == found->second->RTTI_GetType(), + "New and old data types are mismatched!"); + + // if we are here it implies that we have two assets with the same asset id, and we are + // trying to replace the old asset with the new asset which was not created using the asset manager system. + // In this scenario if any other system have cached the old asset then the asset wont be destroyed + // because of creation token mismatch when it's ref count finally goes to zero. Since the old asset is not shareable anymore + // manually setting the creationToken to default creation token will ensure that the asset is destroyed correctly. + asset.m_assetData->m_creationToken = ++m_creationTokenGenerator; + if (found != m_assets.end()) { - // The purpose of this function is to validate this asset is still in a StreamReady - // and only then continue the load. We change status to loading if everything - // is expected which the blocking RegisterAssetLoading call does not do because it - // is already in loading status - if (data->GetStatus() != AssetData::AssetStatus::StreamReady) - { - // Something else has attempted to load this asset - return false; - } - data->m_status = AssetData::AssetStatus::Loading; - UpdateDebugStatus(asset); + found->second->m_creationToken = AZ::Data::s_defaultCreationToken; + } + + // Held references to old data are retained, but replace the entry in the DB for future requests. + // Fire an OnAssetReloaded message so listeners can react to the new data. + m_assets[assetId] = asset.Get(); + + // Release the reload reference. + auto reloadInfo = m_reloads.find(assetId); + if (reloadInfo != m_reloads.end()) + { + requeue = reloadInfo->second->GetRequeue(); + m_reloads.erase(reloadInfo); } } + // Call reloaded before we can call ReloadAsset below to preserve order + AssetBus::Event(assetId, &AssetBus::Events::OnAssetReloaded, asset); + // Release the lock before we call reload + if (requeue) + { + ReloadAsset(assetId, asset.GetAutoLoadBehavior()); + } + } + else + { + AssetBus::Event(assetId, &AssetBus::Events::OnAssetReloaded, asset); + } + } - return true; + //========================================================================= + // GetModifiedLoadStreamInfoForAsset + //========================================================================= + AssetStreamInfo AssetManager::GetModifiedLoadStreamInfoForAsset(const Asset& asset, AssetHandler* handler) + { + AssetStreamInfo loadInfo = GetLoadStreamInfoForAsset(asset.GetId(), asset.GetType()); + if (!loadInfo.IsValid()) + { + // opportunity for handler to do default substitution: + AZ::Data::AssetId fallbackId = handler->AssetMissingInCatalog(asset); + if (fallbackId.IsValid()) + { + loadInfo = GetLoadStreamInfoForAsset(fallbackId, asset.GetType()); + } } - //========================================================================= - // RegisterAssetLoading - //========================================================================= - void AssetManager::RegisterAssetLoading(const Asset& asset) - { - AZ_PROFILE_FUNCTION(AzCore); + // Give the handler an opportunity to modify any of the load info before creating the dataStream. + handler->GetCustomAssetStreamInfoForLoad(loadInfo); - AssetData* data = asset.Get(); + return loadInfo; + } + + //========================================================================= + // QueueAsyncStreamLoad + //========================================================================= + void AssetManager::QueueAsyncStreamLoad(Asset asset, AZStd::shared_ptr dataStream, + const AZ::Data::AssetStreamInfo& streamInfo, bool isReload, + AssetHandler* handler, const AssetLoadParameters& loadParams, bool signalLoaded) + { + AZ_PROFILE_FUNCTION(AzCore); + + // Set up the callback that will process the asset data once the raw file load is finished. + // The callback is declared as mutable so that we can clear weakAsset within the callback. The refcount in weakAsset + // can trigger an AssetManager::ReleaseAsset call. If this occurs during lambda cleanup, it could happen at any time + // on the file streamer thread as streamer requests get recycled, including during (or after) AssetManager shutdown. + // By controlling when the refcount is changed, we can ensure that it occurs while the AssetManager is still active. + auto assetDataStreamCallback = [this, loadParams, handler, dataStream, signalLoaded, isReload, + weakAsset = AssetInternal::WeakAsset(asset)] + (AZ::IO::IStreamerTypes::RequestStatus status) mutable + { + auto assetId = weakAsset.GetId(); + + Asset loadingAsset = weakAsset.GetStrongReference(); + + if (loadingAsset) + { + AZ_PROFILE_SCOPE(AzCore, "AZ::Data::LoadAssetStreamerCallback %s", + loadingAsset.GetHint().c_str()); + { + AZStd::scoped_lock assetLock(m_assetMutex); + AssetData* data = loadingAsset.Get(); + if (data->GetStatus() != AssetData::AssetStatus::Queued) + { + AZ_Warning("AssetManager", false, "Asset %s no longer in Queued state, abandoning load", loadingAsset.GetId().ToString().c_str()); + return; + } + data->m_status = AssetData::AssetStatus::StreamReady; + } + + // The callback from AZ Streamer blocks the streaming thread until this function completes. To minimize the overhead, + // do the majority of the work in a separate job. + auto loadJob = aznew LoadAssetJob(this, loadingAsset, + dataStream, isReload, status, handler, loadParams, signalLoaded); + + bool jobQueued = false; + + // If there's already an active blocking request waiting for this load to complete, let that thread handle + // the load itself instead of consuming a second thread. + { + AZStd::scoped_lock requestLock(m_activeBlockingRequestMutex); + auto range = m_activeBlockingRequests.equal_range(assetId); + for(auto blockingRequest = range.first; blockingRequest != range.second; ++blockingRequest) + { + if(blockingRequest->second->QueueAssetLoadJob(loadJob)) + { + jobQueued = true; + break; + } + } + } + + if (!jobQueued) + { + loadJob->Start(); + } + } + else + { + BlockingAssetLoadBus::Event(assetId, &BlockingAssetLoadBus::Events::OnLoadCanceled, assetId); + AssetManagerBus::Broadcast(&AssetManagerBus::Events::OnAssetCanceled, assetId); + } + + // *After* the loadJob has been created, clear our asset references and remove the active streamer requests. + // This needs to happen after the loadJob creation to ensure that on AssetManager shutdown, there are no brief + // windows in which requests and/or jobs are still active after we've removed our tracking of the requests and jobs. + + // Also, if the asset references don't get cleared until after the callback completes, or at some indeterminate later + // time when the File Streamer cleans up the file requests (for the weakAsset lambda parameter), then it's possible that + // they will trigger a ReleaseAsset call sometime after the AssetManager has begun to shut down, which can lead to + // race conditions. + + // Make sure the streamer request is removed first before the asset is released + // If the asset is released first it could lead to a race condition where another thread starts loading the asset + // again and attempts to add a new streamer request with the same ID before the old one has been removed, causing + // that load request to fail + RemoveActiveStreamerRequest(assetId); + weakAsset = {}; + loadingAsset.Reset(); + }; + + auto&& [deadline, priority] = GetEffectiveDeadlineAndPriority(*handler, asset.GetType(), loadParams); + + // Track the load request and queue the asset data stream load. + AddActiveStreamerRequest(asset.GetId(), dataStream); + dataStream->Open( + streamInfo.m_streamName, + streamInfo.m_dataOffset, + streamInfo.m_dataLen, + deadline, priority, assetDataStreamCallback); + } + + //========================================================================= + // NotifyAssetReady + //========================================================================= + void AssetManager::NotifyAssetReady(Asset asset) + { + AssetData* data = asset.Get(); + AZ_Assert(data, "NotifyAssetReady: asset is missing info!"); + data->m_status = AssetData::AssetStatus::Ready; + + AssetBus::Event(asset.GetId(), &AssetBus::Events::OnAssetReady, asset); + } + + //========================================================================= + // NotifyAssetPreReload + //========================================================================= + void AssetManager::NotifyAssetPreReload(Asset asset) + { + AssetBus::Event(asset.GetId(), &AssetBus::Events::OnAssetPreReload, asset); + } + + //========================================================================= + // NotifyAssetReloaded + //========================================================================= + void AssetManager::NotifyAssetReloaded(Asset asset) + { + AssignAssetData(asset); + } + + //========================================================================= + // NotifyAssetReloaded + //========================================================================= + void AssetManager::NotifyAssetReloadError(Asset asset) + { + // Failed reloads have no side effects. Just notify observers (error reporting, etc). + { + AZStd::lock_guard assetLock(m_assetMutex); + m_reloads.erase(asset.GetId()); + } + AssetBus::Event(asset.GetId(), &AssetBus::Events::OnAssetReloadError, asset); + } + + //========================================================================= + // NotifyAssetError + //========================================================================= + void AssetManager::NotifyAssetError(Asset asset) + { + asset.Get()->m_status = AssetData::AssetStatus::Error; + AssetBus::Event(asset.GetId(), &AssetBus::Events::OnAssetError, asset); + } + + void AssetManager::NotifyAssetCanceled(AssetId assetId) + { + AssetBus::Event(assetId, &AssetBus::Events::OnAssetCanceled, assetId); + } + + void AssetManager::NotifyAssetContainerReady(Asset asset) + { + AssetBus::Event(asset.GetId(), &AssetBus::Events::OnAssetContainerReady, asset); + } + + //========================================================================= + // AddJob + // [04/02/2014] + //========================================================================= + void AssetManager::AddJob(AssetDatabaseJob* job) + { + AZStd::scoped_lock assetLock(m_activeJobOrRequestMutex); + + m_activeJobs.push_back(*job); + } + + //========================================================================= + // ValidateAndRegisterAssetLoading + //========================================================================= + bool AssetManager::ValidateAndRegisterAssetLoading(const Asset& asset) + { + AssetData* data = asset.Get(); + { + + AZStd::scoped_lock assetLock(m_assetMutex); if (data) { + // The purpose of this function is to validate this asset is still in a StreamReady + // and only then continue the load. We change status to loading if everything + // is expected which the blocking RegisterAssetLoading call does not do because it + // is already in loading status + if (data->GetStatus() != AssetData::AssetStatus::StreamReady) + { + // Something else has attempted to load this asset + return false; + } data->m_status = AssetData::AssetStatus::Loading; UpdateDebugStatus(asset); } } - //========================================================================= - // UnregisterAssetLoadingByThread - //========================================================================= - void AssetManager::UnregisterAssetLoading([[maybe_unused]] const Asset& asset) + return true; + } + + //========================================================================= + // RegisterAssetLoading + //========================================================================= + void AssetManager::RegisterAssetLoading(const Asset& asset) + { + AZ_PROFILE_FUNCTION(AzCore); + + AssetData* data = asset.Get(); + if (data) { - AZ_PROFILE_FUNCTION(AzCore); - } - - //========================================================================= - // RemoveJob - // [04/02/2014] - //========================================================================= - void AssetManager::RemoveJob(AssetDatabaseJob* job) - { - AZStd::scoped_lock assetLock(m_activeJobOrRequestMutex); - - m_activeJobs.erase(*job); - } - - //========================================================================= - // AddActiveStreamerRequest - //========================================================================= - void AssetManager::AddActiveStreamerRequest(AssetId assetId, AZStd::shared_ptr readRequest) - { - AZStd::scoped_lock assetLock(m_activeJobOrRequestMutex); - - // Track the request to allow for manual cancellation and for validating completion before AssetManager shutdown - [[maybe_unused]] auto inserted = - m_activeAssetDataStreamRequests.insert(AZStd::make_pair(assetId, readRequest)); - AZ_Assert(inserted.second, "Failed to insert streaming request into map for later retrieval by asset."); - - } - - void AssetManager::RescheduleStreamerRequest(AssetId assetId, AZStd::chrono::milliseconds newDeadline, AZ::IO::IStreamerTypes::Priority newPriority) - { - AZStd::scoped_lock lock(m_activeJobOrRequestMutex); - - auto iterator = m_activeAssetDataStreamRequests.find(assetId); - - if (iterator != m_activeAssetDataStreamRequests.end()) - { - iterator->second->Reschedule(newDeadline, newPriority); - } - } - - //========================================================================= - // RemoveActiveStreamerRequest - //========================================================================= - void AssetManager::RemoveActiveStreamerRequest(AssetId assetData) - { - AZStd::scoped_lock assetLock(m_activeJobOrRequestMutex); - m_activeAssetDataStreamRequests.erase(assetData); - } - - //========================================================================= - // HasActiveJobsOrStreamerRequests - //========================================================================= - bool AssetManager::HasActiveJobsOrStreamerRequests() - { - AZStd::scoped_lock assetLock(m_activeJobOrRequestMutex); - - return (!(m_activeJobs.empty() && m_activeAssetDataStreamRequests.empty())); - } - - //========================================================================= - // AddBlockingRequest - //========================================================================= - void AssetManager::AddBlockingRequest(AssetId assetId, WaitForAsset* blockingRequest) - { - AZStd::scoped_lock requestLock(m_activeBlockingRequestMutex); - - [[maybe_unused]] auto inserted = m_activeBlockingRequests.insert(AZStd::make_pair(assetId, blockingRequest)); - AZ_Assert(inserted.second, "Failed to track blocking request for asset %s", assetId.ToString().c_str()); - } - - //========================================================================= - // RemoveBlockingRequest - //========================================================================= - void AssetManager::RemoveBlockingRequest(AssetId assetId, WaitForAsset* blockingRequest) - { - AZStd::scoped_lock requestLock(m_activeBlockingRequestMutex); - [[maybe_unused]] bool requestFound = false; - for (auto assetIdIterator = m_activeBlockingRequests.find(assetId); assetIdIterator != m_activeBlockingRequests.end(); ) - { - if (assetIdIterator->second == blockingRequest) - { - m_activeBlockingRequests.erase(assetIdIterator); - requestFound = true; - break; - } - else - { - assetIdIterator++; - } - } - - AZ_Assert(requestFound, "Failed to erase blocking request for asset %s", assetId.ToString().c_str()); - } - - - //========================================================================= - // GetLoadStreamInfoForAsset() - // [04/04/2014] - //========================================================================= - AssetStreamInfo AssetManager::GetLoadStreamInfoForAsset(const AssetId& assetId, const AssetType& assetType) - { - AZStd::scoped_lock catalogLock(m_catalogMutex); - AssetCatalogMap::iterator catIt = m_catalogs.find(assetType); - if (catIt == m_catalogs.end()) - { - AZ_Error("Asset", false, "Asset [type:%s id:%s] with this type doesn't have a catalog!", assetType.template ToString().c_str(), assetId.ToString().c_str()); - return AssetStreamInfo(); - } - return catIt->second->GetStreamInfoForLoad(assetId, assetType); - } - - //========================================================================= - // GetSaveStreamInfoForAsset() - // [04/04/2014] - //========================================================================= - AssetStreamInfo AssetManager::GetSaveStreamInfoForAsset(const AssetId& assetId, const AssetType& assetType) - { - AZStd::scoped_lock catalogLock(m_catalogMutex); - AssetCatalogMap::iterator catIt = m_catalogs.find(assetType); - if (catIt == m_catalogs.end()) - { - AZ_Error("Asset", false, "Asset [type:%s id:%s] with this type doesn't have a catalog!", assetType.template ToString().c_str(), assetId.ToString().c_str()); - return AssetStreamInfo(); - } - return catIt->second->GetStreamInfoForSave(assetId, assetType); - } - - //========================================================================= - // OnAssetReady - // [04/02/2014] - //========================================================================= - void AssetManager::OnAssetReady(const Asset& asset) - { - AZ_Assert(asset.Get(), "OnAssetReady fired for an asset with no data."); - - // Set status immediately from within the AssetManagerBus dispatch, so it's committed before anyone is notified (e.g. job to job, via AssetJobBus). - asset.Get()->m_status = AssetData::AssetStatus::ReadyPreNotify; + data->m_status = AssetData::AssetStatus::Loading; UpdateDebugStatus(asset); - - // Queue broadcast message for delivery on game thread. - AssetBus::QueueFunction(&AssetManager::NotifyAssetReady, this, Asset(asset)); } + } - //========================================================================= - // OnAssetError - //========================================================================= - void AssetManager::OnAssetError(const Asset& asset) + //========================================================================= + // UnregisterAssetLoadingByThread + //========================================================================= + void AssetManager::UnregisterAssetLoading([[maybe_unused]] const Asset& asset) + { + AZ_PROFILE_FUNCTION(AzCore); + } + + //========================================================================= + // RemoveJob + // [04/02/2014] + //========================================================================= + void AssetManager::RemoveJob(AssetDatabaseJob* job) + { + AZStd::scoped_lock assetLock(m_activeJobOrRequestMutex); + + m_activeJobs.erase(*job); + } + + //========================================================================= + // AddActiveStreamerRequest + //========================================================================= + void AssetManager::AddActiveStreamerRequest(AssetId assetId, AZStd::shared_ptr readRequest) + { + AZStd::scoped_lock assetLock(m_activeJobOrRequestMutex); + + // Track the request to allow for manual cancellation and for validating completion before AssetManager shutdown + [[maybe_unused]] auto inserted = + m_activeAssetDataStreamRequests.insert(AZStd::make_pair(assetId, readRequest)); + AZ_Assert(inserted.second, "Failed to insert streaming request into map for later retrieval by asset."); + + } + + void AssetManager::RescheduleStreamerRequest(AssetId assetId, AZStd::chrono::milliseconds newDeadline, AZ::IO::IStreamerTypes::Priority newPriority) + { + AZStd::scoped_lock lock(m_activeJobOrRequestMutex); + + auto iterator = m_activeAssetDataStreamRequests.find(assetId); + + if (iterator != m_activeAssetDataStreamRequests.end()) { - // Set status immediately from within the AssetManagerBus dispatch, so it's committed before anyone is notified (e.g. job to job, via AssetJobBus). - asset.Get()->m_status = AssetData::AssetStatus::Error; - UpdateDebugStatus(asset); - - // Queue broadcast message for delivery on game thread. - AssetBus::QueueFunction(&AssetManager::NotifyAssetError, this, Asset(asset)); + iterator->second->Reschedule(newDeadline, newPriority); } + } - void AssetManager::OnAssetCanceled(AssetId assetId) + //========================================================================= + // RemoveActiveStreamerRequest + //========================================================================= + void AssetManager::RemoveActiveStreamerRequest(AssetId assetData) + { + AZStd::scoped_lock assetLock(m_activeJobOrRequestMutex); + m_activeAssetDataStreamRequests.erase(assetData); + } + + //========================================================================= + // HasActiveJobsOrStreamerRequests + //========================================================================= + bool AssetManager::HasActiveJobsOrStreamerRequests() + { + AZStd::scoped_lock assetLock(m_activeJobOrRequestMutex); + + return (!(m_activeJobs.empty() && m_activeAssetDataStreamRequests.empty())); + } + + //========================================================================= + // AddBlockingRequest + //========================================================================= + void AssetManager::AddBlockingRequest(AssetId assetId, WaitForAsset* blockingRequest) + { + AZStd::scoped_lock requestLock(m_activeBlockingRequestMutex); + + [[maybe_unused]] auto inserted = m_activeBlockingRequests.insert(AZStd::make_pair(assetId, blockingRequest)); + AZ_Assert(inserted.second, "Failed to track blocking request for asset %s", assetId.ToString().c_str()); + } + + //========================================================================= + // RemoveBlockingRequest + //========================================================================= + void AssetManager::RemoveBlockingRequest(AssetId assetId, WaitForAsset* blockingRequest) + { + AZStd::scoped_lock requestLock(m_activeBlockingRequestMutex); + [[maybe_unused]] bool requestFound = false; + for (auto assetIdIterator = m_activeBlockingRequests.find(assetId); assetIdIterator != m_activeBlockingRequests.end(); ) { - // Queue broadcast message for delivery on game thread. - AssetBus::QueueFunction(&AssetManager::NotifyAssetCanceled, this, assetId); - } - - void AssetManager::ReleaseOwnedAssetContainer(AssetContainer* assetContainer) - { - AZ_Assert(assetContainer, "Trying to release a null assetContainer pointer!"); - AZStd::scoped_lock lock(m_assetContainerMutex); - auto rangeItr = m_ownedAssetContainerLookup.equal_range(assetContainer->GetContainerAssetId()); - - for (auto itr = rangeItr.first; itr != rangeItr.second; ++itr) + if (assetIdIterator->second == blockingRequest) { - if (itr->second == assetContainer) - { - m_ownedAssetContainerLookup.erase(itr); - break; - } - } - - m_ownedAssetContainers.erase(assetContainer); - } - - void AssetManager::OnAssetContainerReady(AssetContainer* assetContainer) - { - AssetBus::QueueFunction([this, assetContainer, asset = assetContainer->GetRootAsset()]() - { - NotifyAssetContainerReady(asset); - ReleaseOwnedAssetContainer(assetContainer); - }); - } - - void AssetManager::OnAssetContainerCanceled(AssetContainer* assetContainer) - { - AssetBus::QueueFunction([this, assetContainer]() - { - ReleaseOwnedAssetContainer(assetContainer); - }); - } - - //========================================================================= - // OnAssetReloaded - //========================================================================= - void AssetManager::OnAssetReloaded(const Asset& asset) - { - // Queue broadcast message for delivery on game thread. - AssetBus::QueueFunction(&AssetManager::NotifyAssetReloaded, this, Asset(asset)); - } - - //========================================================================= - // OnAssetReloadError - //========================================================================= - void AssetManager::OnAssetReloadError(const Asset& asset) - { - // Queue broadcast message for delivery on game thread. - AssetBus::QueueFunction(&AssetManager::NotifyAssetReloadError, this, Asset(asset)); - } - - - //========================================================================= - // AssetHandler - // [04/03/2014] - //========================================================================= - AssetHandler::AssetHandler() - : m_nHandledTypes(0) - { - } - - //========================================================================= - // ~AssetHandler - // [04/03/2014] - //========================================================================= - AssetHandler::~AssetHandler() - { - if (m_nHandledTypes > 0) - { - AssetManager::Instance().UnregisterHandler(this); - } - - AZ_Error("AssetDatabase", m_nHandledTypes == 0, "Asset handler is being destroyed but there are still %d asset types being handled by it!", (int)m_nHandledTypes); - } - - //========================================================================= - // LoadAssetDataFromStream - //========================================================================= - AssetHandler::LoadResult AssetHandler::LoadAssetDataFromStream( - const Asset& asset, - AZStd::shared_ptr stream, - const AssetFilterCB& assetLoadFilterCB) - { - AZ_PROFILE_SCOPE(AzCore, "AssetHandler::LoadAssetData - %s", asset.GetHint().c_str()); - -#ifdef AZ_ENABLE_TRACING - auto start = AZStd::chrono::system_clock::now(); -#endif - - LoadResult result = LoadAssetData(asset, stream, assetLoadFilterCB); - -#ifdef AZ_ENABLE_TRACING - auto loadMs = AZStd::chrono::duration_cast( - AZStd::chrono::system_clock::now() - start); - AZ_Warning("AssetDatabase", (!cl_assetLoadWarningEnable) || - loadMs <= AZStd::chrono::milliseconds(cl_assetLoadWarningMsThreshold), - "Load time threshold exceeded: LoadAssetData call for %s took %" PRId64 " ms", - asset.GetHint().c_str(), loadMs.count()); -#endif - - return result; - } - - //========================================================================= - // InitAsset - // [04/03/2014] - //========================================================================= - void AssetHandler::InitAsset(const Asset& asset, bool loadStageSucceeded, bool isReload) - { - if (loadStageSucceeded) - { - if (isReload) - { - AssetManagerBus::Broadcast(&AssetManagerBus::Events::OnAssetReloaded, asset); - } - else - { - AssetManagerBus::Broadcast(&AssetManagerBus::Events::OnAssetReady, asset); - } + m_activeBlockingRequests.erase(assetIdIterator); + requestFound = true; + break; } else { - if (!isReload) - { - AssetManagerBus::Broadcast(&AssetManagerBus::Events::OnAssetError, asset); - } - else - { - AssetManagerBus::Broadcast(&AssetManagerBus::Events::OnAssetReloadError, asset); - } + assetIdIterator++; } } - void AssetManager::ValidateAndPostLoad(AZ::Data::Asset& asset, bool loadSucceeded, - bool isReload, AZ::Data::AssetHandler* assetHandler) + AZ_Assert(requestFound, "Failed to erase blocking request for asset %s", assetId.ToString().c_str()); + } + + + //========================================================================= + // GetLoadStreamInfoForAsset() + // [04/04/2014] + //========================================================================= + AssetStreamInfo AssetManager::GetLoadStreamInfoForAsset(const AssetId& assetId, const AssetType& assetType) + { + AZStd::scoped_lock catalogLock(m_catalogMutex); + AssetCatalogMap::iterator catIt = m_catalogs.find(assetType); + if (catIt == m_catalogs.end()) { + AZ_Error("Asset", false, "Asset [type:%s id:%s] with this type doesn't have a catalog!", assetType.template ToString().c_str(), assetId.ToString().c_str()); + return AssetStreamInfo(); + } + return catIt->second->GetStreamInfoForLoad(assetId, assetType); + } + + //========================================================================= + // GetSaveStreamInfoForAsset() + // [04/04/2014] + //========================================================================= + AssetStreamInfo AssetManager::GetSaveStreamInfoForAsset(const AssetId& assetId, const AssetType& assetType) + { + AZStd::scoped_lock catalogLock(m_catalogMutex); + AssetCatalogMap::iterator catIt = m_catalogs.find(assetType); + if (catIt == m_catalogs.end()) + { + AZ_Error("Asset", false, "Asset [type:%s id:%s] with this type doesn't have a catalog!", assetType.template ToString().c_str(), assetId.ToString().c_str()); + return AssetStreamInfo(); + } + return catIt->second->GetStreamInfoForSave(assetId, assetType); + } + + //========================================================================= + // OnAssetReady + // [04/02/2014] + //========================================================================= + void AssetManager::OnAssetReady(const Asset& asset) + { + AZ_Assert(asset.Get(), "OnAssetReady fired for an asset with no data."); + + // Set status immediately from within the AssetManagerBus dispatch, so it's committed before anyone is notified (e.g. job to job, via AssetJobBus). + asset.Get()->m_status = AssetData::AssetStatus::ReadyPreNotify; + UpdateDebugStatus(asset); + + // Queue broadcast message for delivery on game thread. + AssetBus::QueueFunction(&AssetManager::NotifyAssetReady, this, Asset(asset)); + } + + //========================================================================= + // OnAssetError + //========================================================================= + void AssetManager::OnAssetError(const Asset& asset) + { + // Set status immediately from within the AssetManagerBus dispatch, so it's committed before anyone is notified (e.g. job to job, via AssetJobBus). + asset.Get()->m_status = AssetData::AssetStatus::Error; + UpdateDebugStatus(asset); + + // Queue broadcast message for delivery on game thread. + AssetBus::QueueFunction(&AssetManager::NotifyAssetError, this, Asset(asset)); + } + + void AssetManager::OnAssetCanceled(AssetId assetId) + { + // Queue broadcast message for delivery on game thread. + AssetBus::QueueFunction(&AssetManager::NotifyAssetCanceled, this, assetId); + } + + void AssetManager::ReleaseOwnedAssetContainer(AssetContainer* assetContainer) + { + AZ_Assert(assetContainer, "Trying to release a null assetContainer pointer!"); + AZStd::scoped_lock lock(m_assetContainerMutex); + auto rangeItr = m_ownedAssetContainerLookup.equal_range(assetContainer->GetContainerAssetId()); + + for (auto itr = rangeItr.first; itr != rangeItr.second; ++itr) + { + if (itr->second == assetContainer) { - // We may need to revalidate that this asset hasn't already passed through postLoad - AZStd::scoped_lock assetLock(m_assetMutex); - if (asset->IsReady() || asset->m_status == AssetData::AssetStatus::LoadedPreReady) - { - return; - } - asset->m_status = AssetData::AssetStatus::LoadedPreReady; - UpdateDebugStatus(asset); + m_ownedAssetContainerLookup.erase(itr); + break; } - PostLoad(asset, loadSucceeded, isReload, assetHandler); } - void AssetManager::PostLoad(AZ::Data::Asset& asset, bool loadSucceeded, - bool isReload, AZ::Data::AssetHandler* assetHandler) - { - AZ_PROFILE_FUNCTION(AzCore); - if (!assetHandler) - { - assetHandler = GetHandler(asset.GetType()); - } + m_ownedAssetContainers.erase(assetContainer); + } - if (assetHandler) + void AssetManager::OnAssetContainerReady(AssetContainer* assetContainer) + { + AssetBus::QueueFunction([this, assetContainer, asset = assetContainer->GetRootAsset()]() + { + NotifyAssetContainerReady(asset); + ReleaseOwnedAssetContainer(assetContainer); + }); + } + + void AssetManager::OnAssetContainerCanceled(AssetContainer* assetContainer) + { + AssetBus::QueueFunction([this, assetContainer]() + { + ReleaseOwnedAssetContainer(assetContainer); + }); + } + + //========================================================================= + // OnAssetReloaded + //========================================================================= + void AssetManager::OnAssetReloaded(const Asset& asset) + { + // Queue broadcast message for delivery on game thread. + AssetBus::QueueFunction(&AssetManager::NotifyAssetReloaded, this, Asset(asset)); + } + + //========================================================================= + // OnAssetReloadError + //========================================================================= + void AssetManager::OnAssetReloadError(const Asset& asset) + { + // Queue broadcast message for delivery on game thread. + AssetBus::QueueFunction(&AssetManager::NotifyAssetReloadError, this, Asset(asset)); + } + + + //========================================================================= + // AssetHandler + // [04/03/2014] + //========================================================================= + AssetHandler::AssetHandler() + : m_nHandledTypes(0) + { + } + + //========================================================================= + // ~AssetHandler + // [04/03/2014] + //========================================================================= + AssetHandler::~AssetHandler() + { + if (m_nHandledTypes > 0) + { + AssetManager::Instance().UnregisterHandler(this); + } + + AZ_Error("AssetDatabase", m_nHandledTypes == 0, "Asset handler is being destroyed but there are still %d asset types being handled by it!", (int)m_nHandledTypes); + } + + //========================================================================= + // LoadAssetDataFromStream + //========================================================================= + AssetHandler::LoadResult AssetHandler::LoadAssetDataFromStream( + const Asset& asset, + AZStd::shared_ptr stream, + const AssetFilterCB& assetLoadFilterCB) + { + AZ_PROFILE_SCOPE(AzCore, "AssetHandler::LoadAssetData - %s", asset.GetHint().c_str()); + +#ifdef AZ_ENABLE_TRACING + auto start = AZStd::chrono::system_clock::now(); +#endif + + LoadResult result = LoadAssetData(asset, stream, assetLoadFilterCB); + +#ifdef AZ_ENABLE_TRACING + auto loadMs = AZStd::chrono::duration_cast( + AZStd::chrono::system_clock::now() - start); + AZ_Warning("AssetDatabase", (!cl_assetLoadWarningEnable) || + loadMs <= AZStd::chrono::milliseconds(cl_assetLoadWarningMsThreshold), + "Load time threshold exceeded: LoadAssetData call for %s took %" PRId64 " ms", + asset.GetHint().c_str(), loadMs.count()); +#endif + + return result; + } + + //========================================================================= + // InitAsset + // [04/03/2014] + //========================================================================= + void AssetHandler::InitAsset(const Asset& asset, bool loadStageSucceeded, bool isReload) + { + if (loadStageSucceeded) + { + if (isReload) { - // Queue the result for dispatch to main thread. - assetHandler->InitAsset(asset, loadSucceeded, isReload); + AssetManagerBus::Broadcast(&AssetManagerBus::Events::OnAssetReloaded, asset); } else { - AZ_Warning("AssetManager", false, "Couldn't find handler for asset %s (%s)", asset.GetId().ToString().c_str(), asset.GetHint().c_str()); + AssetManagerBus::Broadcast(&AssetManagerBus::Events::OnAssetReady, asset); } + } + else + { + if (!isReload) + { + AssetManagerBus::Broadcast(&AssetManagerBus::Events::OnAssetError, asset); + } + else + { + AssetManagerBus::Broadcast(&AssetManagerBus::Events::OnAssetReloadError, asset); + } + } + } - // Notify any dependent jobs. - BlockingAssetLoadBus::Event(asset.GetId(), &BlockingAssetLoadBus::Events::OnLoadComplete); + void AssetManager::ValidateAndPostLoad(AZ::Data::Asset& asset, bool loadSucceeded, + bool isReload, AZ::Data::AssetHandler* assetHandler) + { + { + // We may need to revalidate that this asset hasn't already passed through postLoad + AZStd::scoped_lock assetLock(m_assetMutex); + if (asset->IsReady() || asset->m_status == AssetData::AssetStatus::LoadedPreReady) + { + return; + } + asset->m_status = AssetData::AssetStatus::LoadedPreReady; + UpdateDebugStatus(asset); + } + PostLoad(asset, loadSucceeded, isReload, assetHandler); + } - UnregisterAssetLoading(asset); + void AssetManager::PostLoad(AZ::Data::Asset& asset, bool loadSucceeded, + bool isReload, AZ::Data::AssetHandler* assetHandler) + { + AZ_PROFILE_FUNCTION(AzCore); + if (!assetHandler) + { + assetHandler = GetHandler(asset.GetType()); } - AZStd::shared_ptr AssetManager::GetAssetContainer(Asset asset, const AssetLoadParameters& loadParams) + if (assetHandler) { - // If we're doing a custom load through a filter just hand back a one off container - if (loadParams.m_assetLoadFilterCB) - { - return CreateAssetContainer(asset, loadParams); - } + // Queue the result for dispatch to main thread. + assetHandler->InitAsset(asset, loadSucceeded, isReload); + } + else + { + AZ_Warning("AssetManager", false, "Couldn't find handler for asset %s (%s)", asset.GetId().ToString().c_str(), asset.GetHint().c_str()); + } - AZStd::scoped_lock containerLock(m_assetContainerMutex); - AssetContainerKey containerKey{ asset.GetId(), loadParams }; + // Notify any dependent jobs. + BlockingAssetLoadBus::Event(asset.GetId(), &BlockingAssetLoadBus::Events::OnLoadComplete); - auto curIter = m_assetContainers.find(containerKey); - if (curIter != m_assetContainers.end()) + UnregisterAssetLoading(asset); + } + + AZStd::shared_ptr AssetManager::GetAssetContainer(Asset asset, const AssetLoadParameters& loadParams) + { + // If we're doing a custom load through a filter just hand back a one off container + if (loadParams.m_assetLoadFilterCB) + { + return CreateAssetContainer(asset, loadParams); + } + + AZStd::scoped_lock containerLock(m_assetContainerMutex); + AssetContainerKey containerKey{ asset.GetId(), loadParams }; + + auto curIter = m_assetContainers.find(containerKey); + if (curIter != m_assetContainers.end()) + { + auto newRef = curIter->second.lock(); + if (newRef && newRef->IsValid()) { - auto newRef = curIter->second.lock(); - if (newRef && newRef->IsValid()) - { - return newRef; - } - auto newContainer = CreateAssetContainer(asset, loadParams); - curIter->second = newContainer; - return newContainer; + return newRef; } auto newContainer = CreateAssetContainer(asset, loadParams); - - m_assetContainers.insert({ containerKey, newContainer }); - + curIter->second = newContainer; return newContainer; } + auto newContainer = CreateAssetContainer(asset, loadParams); - AZStd::shared_ptr AssetManager::CreateAssetContainer(Asset asset, const AssetLoadParameters& loadParams) const - { - return AZStd::shared_ptr( aznew AssetContainer(AZStd::move(asset), loadParams)); - } - } // namespace Data -} // namespace AZ + m_assetContainers.insert({ containerKey, newContainer }); + + return newContainer; + } + + AZStd::shared_ptr AssetManager::CreateAssetContainer(Asset asset, const AssetLoadParameters& loadParams) const + { + return AZStd::shared_ptr( aznew AssetContainer(AZStd::move(asset), loadParams)); + } +} // namespace AZ::Data size_t AZStd::hash::operator()(const AZ::Data::AssetContainerKey& obj) const { diff --git a/Code/Framework/AzCore/AzCore/Asset/AssetManager.h b/Code/Framework/AzCore/AzCore/Asset/AssetManager.h index f109bb278c..9666d434c1 100644 --- a/Code/Framework/AzCore/AzCore/Asset/AssetManager.h +++ b/Code/Framework/AzCore/AzCore/Asset/AssetManager.h @@ -169,14 +169,14 @@ namespace AZ /// Register handler with the system for a particular asset type. /// A handler should be registered for each asset type it handles. /// Please note that all the handlers are registered just once during app startup from the main thread - /// and therefore this is not a thread safe method and should not be invoked from different threads. + /// and therefore this is not a thread safe method and should not be invoked from different threads. void RegisterHandler(AssetHandler* handler, const AssetType& assetType); /// Unregister handler from the asset system. /// Please note that all the handlers are unregistered just once during app shutdown from the main thread /// and therefore this is not a thread safe method and should not be invoked from different threads. void UnregisterHandler(AssetHandler* handler); // @} - + // @{ Asset catalog management /// Register a catalog with the system for a particular asset type. /// A catalog should be registered for each asset type it is responsible for. @@ -295,7 +295,7 @@ namespace AZ /** * Old 'legacy' assetIds and asset hints can be automatically replaced with new ones during deserialize / assignment. * This operation can be somewhat costly, and its only useful if the program subsequently re-saves the files its loading so that - * the asset hints and assetIds actually persist. Thus, it can be disabled in situations where you know you are not going to be + * the asset hints and assetIds actually persist. Thus, it can be disabled in situations where you know you are not going to be * saving over or creating new source files (for example builders/background apps) * By default, it is enabled. */ @@ -316,7 +316,7 @@ namespace AZ * This method must be invoked before you start unregistering handlers manually and shutting down the asset manager. * This method ensures that all jobs in flight are either canceled or completed. * This method is automatically called in the destructor but if you are unregistering handlers manually, - * you must invoke it yourself. + * you must invoke it yourself. */ void PrepareShutDown(); @@ -366,7 +366,7 @@ namespace AZ /** * Creates a new shared AssetContainer with an optional loadFilter * **/ - AZStd::shared_ptr CreateAssetContainer(Asset asset, const AssetLoadParameters& loadParams = AssetLoadParameters{}) const; + virtual AZStd::shared_ptr CreateAssetContainer(Asset asset, const AssetLoadParameters& loadParams = AssetLoadParameters{}) const; /** @@ -452,7 +452,7 @@ namespace AZ // Variant of RegisterAssetLoading used for jobs which have been queued and need to verify the status of the asset - // before loading in order to prevent cases where a load is queued, then a blocking load goes through, then the queued + // before loading in order to prevent cases where a load is queued, then a blocking load goes through, then the queued // load is processed. This validation step leaves the loaded (And potentially modified) data as is in that case. bool ValidateAndRegisterAssetLoading(const Asset& asset); @@ -482,7 +482,7 @@ namespace AZ * the blocking. That will result in a single thread deadlock. * * If you need to queue work, the logic needs to be similar to this: - * + * AssetHandler::LoadResult MyAssetHandler::LoadAssetData(const Asset& asset, AZStd::shared_ptr stream, const AZ::Data::AssetFilterCB& assetLoadFilterCB) { @@ -496,13 +496,13 @@ namespace AZ } else { - // queue job to load asset in thread identified by m_loadingThreadId + // queue job to load asset in thread identified by m_loadingThreadId auto* queuedJob = QueueLoadingOnOtherThread(...); // block waiting for queued job to complete queuedJob->BlockUntilComplete(); } - + . . . @@ -525,7 +525,7 @@ namespace AZ //! Result from LoadAssetData - it either finished loading, didn't finish and is waiting for more data, or had an error. enum class LoadResult : u8 { - + Error, // The provided data failed to load correctly MoreDataRequired, // The provided data loaded correctly, but more data is required to finish the asset load LoadComplete // The provided data loaded correctly, and the asset has been created diff --git a/Code/Framework/AzCore/AzCore/Asset/AssetManagerBus.h b/Code/Framework/AzCore/AzCore/Asset/AssetManagerBus.h index f76ea19589..44707645d0 100644 --- a/Code/Framework/AzCore/AzCore/Asset/AssetManagerBus.h +++ b/Code/Framework/AzCore/AzCore/Asset/AssetManagerBus.h @@ -10,6 +10,7 @@ #include #include +#include #include #include #include @@ -129,7 +130,8 @@ namespace AZ /// Remove a catalog from our delta list and rebuild the catalog from remaining items virtual bool RemoveDeltaCatalog(AZStd::shared_ptr /*deltaCatalog*/) { return true; } /// Creates a manifest with the given DeltaCatalog name - virtual bool CreateBundleManifest(const AZStd::string& /*deltaCatalogPath*/, const AZStd::vector& /*dependentBundleNames*/, const AZStd::string& /*fileDirectory*/, int /*bundleVersion*/, const AZStd::vector& /*levelDirs*/) { return false; } + virtual bool CreateBundleManifest(const AZStd::string& /*deltaCatalogPath*/, const AZStd::vector& /*dependentBundleNames*/, + const AZStd::string& /*fileDirectory*/, int /*bundleVersion*/, const AZStd::vector& /*levelDirs*/) { return false; } /// Creates an instance of a registry containing info for just the specified files, and writes it out to a file at the specified path virtual bool CreateDeltaCatalog(const AZStd::vector& /*files*/, const AZStd::string& /*filePath*/) { return false; } diff --git a/Code/Framework/AzCore/AzCore/AzCoreModule.cpp b/Code/Framework/AzCore/AzCore/AzCoreModule.cpp index 67123ed826..e7e87559b0 100644 --- a/Code/Framework/AzCore/AzCore/AzCoreModule.cpp +++ b/Code/Framework/AzCore/AzCore/AzCoreModule.cpp @@ -19,7 +19,6 @@ #include #include #include -#include #include #include #include @@ -40,7 +39,6 @@ namespace AZ SliceComponent::CreateDescriptor(), SliceSystemComponent::CreateDescriptor(), SliceMetadataInfoComponent::CreateDescriptor(), - TimeSystemComponent::CreateDescriptor(), LoggerSystemComponent::CreateDescriptor(), EventSchedulerSystemComponent::CreateDescriptor(), TaskGraphSystemComponent::CreateDescriptor(), @@ -59,7 +57,6 @@ namespace AZ { return AZ::ComponentTypeList { - azrtti_typeid(), azrtti_typeid(), azrtti_typeid(), azrtti_typeid(), diff --git a/Code/Framework/AzCore/AzCore/Component/ComponentApplication.cpp b/Code/Framework/AzCore/AzCore/Component/ComponentApplication.cpp index df8db79db0..693b2f1648 100644 --- a/Code/Framework/AzCore/AzCore/Component/ComponentApplication.cpp +++ b/Code/Framework/AzCore/AzCore/Component/ComponentApplication.cpp @@ -45,12 +45,9 @@ #include #include +#include #include -#include -#include -#include -#include #include #include @@ -72,6 +69,7 @@ #include #include +#include static void PrintEntityName(const AZ::ConsoleCommandContainer& arguments) { @@ -154,7 +152,6 @@ namespace AZ m_reservedDebug = 0; m_recordingMode = Debug::AllocationRecords::RECORD_STACK_IF_NO_FILE_LINE; m_stackRecordLevels = 5; - m_enableDrilling = false; m_useOverrunDetection = false; m_useMalloc = false; } @@ -214,7 +211,6 @@ namespace AZ // Update old Project path before attempting to merge in new Settings Registry values in order to prevent recursive calls m_oldProjectPath = newProjectPath; - // Merge the project.json file into settings registry under ProjectSettingsRootKey path. // Update all the runtime file paths based on the new "project_path" value. AZ::SettingsRegistryMergeUtils::MergeSettingsToRegistry_AddRuntimeFilePaths(m_registry); } @@ -327,7 +323,6 @@ namespace AZ ->Field("blockSize", &Descriptor::m_memoryBlocksByteSize) ->Field("reservedOS", &Descriptor::m_reservedOS) ->Field("reservedDebug", &Descriptor::m_reservedDebug) - ->Field("enableDrilling", &Descriptor::m_enableDrilling) ->Field("useOverrunDetection", &Descriptor::m_useOverrunDetection) ->Field("useMalloc", &Descriptor::m_useMalloc) ->Field("allocatorRemappings", &Descriptor::m_allocatorRemappings) @@ -366,7 +361,6 @@ namespace AZ ->Attribute(Edit::Attributes::Step, &Descriptor::m_pageSize) ->DataElement(Edit::UIHandlers::SpinBox, &Descriptor::m_reservedOS, "OS reserved memory", "System memory reserved for OS (used only when 'Allocate all memory at startup' is true)") ->DataElement(Edit::UIHandlers::SpinBox, &Descriptor::m_reservedDebug, "Memory reserved for debugger", "System memory reserved for Debug allocator, like memory tracking (used only when 'Allocate all memory at startup' is true)") - ->DataElement(Edit::UIHandlers::CheckBox, &Descriptor::m_enableDrilling, "Enable Driller", "Enable Drilling support for the application (ignored in Release builds)") ->DataElement(Edit::UIHandlers::CheckBox, &Descriptor::m_useOverrunDetection, "Use Overrun Detection", "Use the overrun detection memory manager (only available on some platforms, ignored in Release builds)") ->DataElement(Edit::UIHandlers::CheckBox, &Descriptor::m_useMalloc, "Use Malloc", "Use malloc for memory allocations (for memory debugging only, ignored in Release builds)") ; @@ -417,6 +411,7 @@ namespace AZ ComponentApplication::ComponentApplication(int argC, char** argV) : m_eventLogger{} + , m_timeSystem(AZStd::make_unique()) { if (Interface::Get() == nullptr) { @@ -484,19 +479,11 @@ namespace AZ // Merge Command Line arguments constexpr bool executeRegDumpCommands = false; - SettingsRegistryMergeUtils::MergeSettingsToRegistry_CommandLine(*m_settingsRegistry, m_commandLine, executeRegDumpCommands); - - // Query for the Executable Path using OS specific functions - CalculateExecutablePath(); - - // Determine the path to the engine - CalculateEngineRoot(); - - // If the current platform returns an engaged optional from Utils::GetDefaultAppRootPath(), that is used - // for the application root. - CalculateAppRoot(); +#if defined(AZ_DEBUG_BUILD) || defined(AZ_PROFILE_BUILD) + // Skip over merging the User Registry in non-debug and profile configurations SettingsRegistryMergeUtils::MergeSettingsToRegistry_O3deUserRegistry(*m_settingsRegistry, AZ_TRAIT_OS_PLATFORM_CODENAME, {}); +#endif SettingsRegistryMergeUtils::MergeSettingsToRegistry_CommandLine(*m_settingsRegistry, m_commandLine, executeRegDumpCommands); SettingsRegistryMergeUtils::MergeSettingsToRegistry_AddRuntimeFilePaths(*m_settingsRegistry); @@ -585,7 +572,6 @@ namespace AZ DestroyAllocator(); } - void ReportBadEngineRoot() { AZStd::string errorMessage = {"Unable to determine a valid path to the engine.\n" @@ -615,7 +601,8 @@ namespace AZ { AZ_Assert(!m_isStarted, "Component application already started!"); - if (m_engineRoot.empty()) + using Type = AZ::SettingsRegistryInterface::Type; + if (m_settingsRegistry->GetType(SettingsRegistryMergeUtils::FilePathKey_EngineRootFolder) == Type::NoType) { ReportBadEngineRoot(); return nullptr; @@ -687,7 +674,6 @@ namespace AZ ComponentApplicationBus::Handler::BusConnect(); - m_currentTime = AZStd::chrono::system_clock::now(); TickRequestBus::Handler::BusConnect(); #if defined(AZ_ENABLE_DEBUG_TOOLS) @@ -1181,6 +1167,24 @@ namespace AZ return ReflectionEnvironment::GetReflectionManager() ? ReflectionEnvironment::GetReflectionManager()->GetReflectContext() : nullptr; } + /// Returns the path to the engine. + + const char* ComponentApplication::GetEngineRoot() const + { + static IO::FixedMaxPathString engineRoot; + engineRoot.clear(); + m_settingsRegistry->Get(engineRoot, SettingsRegistryMergeUtils::FilePathKey_EngineRootFolder); + return engineRoot.c_str(); + } + + const char* ComponentApplication::GetExecutableFolder() const + { + static IO::FixedMaxPathString exeFolder; + exeFolder.clear(); + m_settingsRegistry->Get(exeFolder, SettingsRegistryMergeUtils::FilePathKey_BinaryFolder); + return exeFolder.c_str(); + } + //========================================================================= // CreateReflectionManager //========================================================================= @@ -1405,31 +1409,23 @@ namespace AZ #endif } - void ComponentApplication::Tick(float deltaOverride /*= -1.f*/) + void ComponentApplication::Tick() { + AZ_PROFILE_SCOPE(System, "Component application simulation tick"); + { - AZ_PROFILE_SCOPE(System, "Component application simulation tick"); - - AZStd::chrono::system_clock::time_point now = AZStd::chrono::system_clock::now(); - - m_deltaTime = 0.0f; - - if (now >= m_currentTime) - { - AZStd::chrono::duration delta = now - m_currentTime; - m_deltaTime = deltaOverride >= 0.f ? deltaOverride : delta.count(); - } - - { - AZ_PROFILE_SCOPE(AzCore, "ComponentApplication::Tick:ExecuteQueuedEvents"); - TickBus::ExecuteQueuedEvents(); - } - m_currentTime = now; - { - AZ_PROFILE_SCOPE(AzCore, "ComponentApplication::Tick:OnTick"); - EBUS_EVENT(TickBus, OnTick, m_deltaTime, ScriptTimePoint(now)); - } + AZ_PROFILE_SCOPE(AzCore, "ComponentApplication::Tick:ExecuteQueuedEvents"); + TickBus::ExecuteQueuedEvents(); } + + { + AZ_PROFILE_SCOPE(AzCore, "ComponentApplication::Tick:OnTick"); + const AZ::TimeUs deltaTimeUs = m_timeSystem->AdvanceTickDeltaTimes(); + const float deltaTimeSeconds = AZ::TimeUsToSeconds(deltaTimeUs); + AZ::TickBus::Broadcast(&TickEvents::OnTick, deltaTimeSeconds, GetTimeAtCurrentTick()); + } + + m_timeSystem->ApplyTickRateLimiterIfNeeded(); } void ComponentApplication::TickSystem() @@ -1486,27 +1482,6 @@ namespace AZ } } - //========================================================================= - // CalculateExecutablePath - //========================================================================= - void ComponentApplication::CalculateExecutablePath() - { - m_exeDirectory = Utils::GetExecutableDirectory(); - } - - void ComponentApplication::CalculateAppRoot() - { - if (AZStd::optional appRootPath = Utils::GetDefaultAppRootPath(); appRootPath) - { - m_appRoot = AZStd::move(*appRootPath); - } - } - - void ComponentApplication::CalculateEngineRoot() - { - m_engineRoot = AZ::SettingsRegistryMergeUtils::FindEngineRoot(*m_settingsRegistry).Native(); - } - void ComponentApplication::ResolveModulePath([[maybe_unused]] AZ::OSString& modulePath) { // No special parsing of the Module Path is done by the Component Application anymore @@ -1532,13 +1507,10 @@ namespace AZ appType.m_maskValue = AZ::ApplicationTypeQuery::Masks::Invalid; } - //========================================================================= - // GetFrameTime - // [1/22/2016] - //========================================================================= float ComponentApplication::GetTickDeltaTime() { - return m_deltaTime; + const AZ::TimeUs gameTickTime = m_timeSystem->GetSimulationTickDeltaTimeUs(); + return AZ::TimeUsToSeconds(gameTickTime); } //========================================================================= @@ -1547,7 +1519,8 @@ namespace AZ //========================================================================= ScriptTimePoint ComponentApplication::GetTimeAtCurrentTick() { - return ScriptTimePoint(m_currentTime); + const AZ::TimeUs lastGameTickTime = m_timeSystem->GetLastSimulationTickTime(); + return ScriptTimePoint(AZ::TimeUsToChrono(lastGameTickTime)); } //========================================================================= @@ -1570,7 +1543,7 @@ namespace AZ // reflect name dictionary. Name::Reflect(context); // reflect path - IO::PathReflection::Reflect(context); + IO::PathReflect(context); // reflect the SettingsRegistryInterface, SettignsRegistryImpl and the global Settings Registry // instance (AZ::SettingsRegistry::Get()) into the Behavior Context diff --git a/Code/Framework/AzCore/AzCore/Component/ComponentApplication.h b/Code/Framework/AzCore/AzCore/Component/ComponentApplication.h index 6df93aff4e..d53b8e1a4e 100644 --- a/Code/Framework/AzCore/AzCore/Component/ComponentApplication.h +++ b/Code/Framework/AzCore/AzCore/Component/ComponentApplication.h @@ -30,16 +30,17 @@ #include #include + namespace AZ { class BehaviorContext; class IConsole; class Module; class ModuleManager; + class TimeSystem; } namespace AZ::Debug { - class DrillerManager; class LocalFileEventLogger; } @@ -141,7 +142,6 @@ namespace AZ AZ::u64 m_reservedDebug; //!< Reserved memory for Debugging (allocation,etc.). Used only when m_grabAllMemory is set to true. (default: 0) Debug::AllocationRecords::Mode m_recordingMode; //!< When to record stack traces (default: AZ::Debug::AllocationRecords::RECORD_STACK_IF_NO_FILE_LINE) AZ::u64 m_stackRecordLevels; //!< If stack recording is enabled, how many stack levels to record. (default: 5) - bool m_enableDrilling; //!< True to enabled drilling support for the application. RegisterDrillers will be called. Ignored in release. (default: true) bool m_useOverrunDetection; //!< True to use the overrun detection memory management scheme. Only available on some platforms; greatly increases memory consumption. bool m_useMalloc; //!< True to use malloc instead of the internal memory manager. Intended for debugging purposes only. @@ -221,13 +221,10 @@ namespace AZ BehaviorContext* GetBehaviorContext() override; /// Returns the json registration context that has been registered with the app, if there is one. JsonRegistrationContext* GetJsonRegistrationContext() override; - /// Returns the working root folder that has been registered with the app, if there is one. - /// It's expected that derived applications will implement an application root. - const char* GetAppRoot() const override { return m_appRoot.c_str(); } /// Returns the path to the engine. - const char* GetEngineRoot() const override { return m_engineRoot.c_str(); } + const char* GetEngineRoot() const override; /// Returns the path to the folder the executable is in. - const char* GetExecutableFolder() const override { return m_exeDirectory.c_str(); } + const char* GetExecutableFolder() const override; ////////////////////////////////////////////////////////////////////////// /// TickRequestBus @@ -240,7 +237,7 @@ namespace AZ /** * Ticks all components using the \ref AZ::TickBus during simulation time. May not tick if the application is not active (i.e. not in focus) */ - virtual void Tick(float deltaOverride = -1.f); + virtual void Tick(); /** * Ticks all using the \ref AZ::SystemTickBus at all times. Should always tick even if the application is not active. @@ -352,15 +349,6 @@ namespace AZ /// Adds system components requested by modules and the application to the system entity. void AddRequiredSystemComponents(AZ::Entity* systemEntity); - /// Calculates the directory the application executable comes from. - void CalculateExecutablePath(); - - /// Calculates the root directory of the engine. - void CalculateEngineRoot(); - - /// Deprecated: The term "AppRoot" has no meaning - void CalculateAppRoot(); - template static void NormalizePath(Iterator begin, Iterator end, bool doLowercase = true) { @@ -371,8 +359,6 @@ namespace AZ } } - AZStd::chrono::system_clock::time_point m_currentTime{ AZStd::chrono::system_clock::time_point::max() }; - float m_deltaTime{ 0.0f }; AZStd::unique_ptr m_moduleManager; AZStd::unique_ptr m_settingsRegistry; EntityAddedEvent m_entityAddedEvent; @@ -388,14 +374,13 @@ namespace AZ void* m_fixedMemoryBlock{ nullptr }; //!< Pointer to the memory block allocator, so we can free it OnDestroy. IAllocatorAllocate* m_osAllocator{ nullptr }; EntitySetType m_entities; - AZ::IO::FixedMaxPath m_exeDirectory; - AZ::IO::FixedMaxPath m_engineRoot; - AZ::IO::FixedMaxPath m_appRoot; AZ::SettingsRegistryInterface::NotifyEventHandler m_projectPathChangedHandler; AZ::SettingsRegistryInterface::NotifyEventHandler m_projectNameChangedHandler; AZ::SettingsRegistryInterface::NotifyEventHandler m_commandLineUpdatedHandler; + AZStd::unique_ptr m_timeSystem; + // ConsoleFunctorHandle is responsible for unregistering the Settings Registry Console // from the m_console member when it goes out of scope AZ::SettingsRegistryConsoleUtils::ConsoleFunctorHandle m_settingsRegistryConsoleFunctors; diff --git a/Code/Framework/AzCore/AzCore/Component/ComponentApplicationBus.h b/Code/Framework/AzCore/AzCore/Component/ComponentApplicationBus.h index 0c0977384a..10f35d6e00 100644 --- a/Code/Framework/AzCore/AzCore/Component/ComponentApplicationBus.h +++ b/Code/Framework/AzCore/AzCore/Component/ComponentApplicationBus.h @@ -37,11 +37,6 @@ namespace AZ class ComponentFactoryInterface; } - namespace Debug - { - class DrillerManager; - } - struct ApplicationTypeQuery { bool IsEditor() const; @@ -175,10 +170,6 @@ namespace AZ //! the serializers used by the best-effort json serialization. virtual class JsonRegistrationContext* GetJsonRegistrationContext() = 0; - //! Gets the name of the working root folder that was registered with the app. - //! @return a pointer to the name of the app's root folder, if a root folder was registered. - virtual const char* GetAppRoot() const = 0; - //! Gets the path of the working engine folder that the app is a part of. //! @return a pointer to the engine path. virtual const char* GetEngineRoot() const = 0; diff --git a/Code/Framework/AzCore/AzCore/Component/Entity.cpp b/Code/Framework/AzCore/AzCore/Component/Entity.cpp index 0fe201d448..c5cda98f2c 100644 --- a/Code/Framework/AzCore/AzCore/Component/Entity.cpp +++ b/Code/Framework/AzCore/AzCore/Component/Entity.cpp @@ -811,12 +811,12 @@ namespace AZ if (behaviorContext) { behaviorContext->Class() - ->Attribute(AZ::Script::Attributes::ExcludeFrom, AZ::Script::Attributes::ExcludeFlags::All) + ->Attribute(AZ::Script::Attributes::ExcludeFrom, AZ::Script::Attributes::ExcludeFlags::ListOnly) ->Attribute(AZ::Script::Attributes::Storage, AZ::Script::Attributes::StorageType::Value) ->Attribute(AZ::Script::Attributes::Scope, AZ::Script::Attributes::ScopeFlags::Common) ->Attribute(AZ::Script::Attributes::Module, "entity") ->Method("IsValid", &EntityId::IsValid) - ->Attribute(AZ::Script::Attributes::ExcludeFrom, AZ::Script::Attributes::ExcludeFlags::All) + ->Attribute(AZ::Script::Attributes::ExcludeFrom, AZ::Script::Attributes::ExcludeFlags::ListOnly) ->Method("ToString", &EntityId::ToString) ->Attribute(AZ::Script::Attributes::Operator, AZ::Script::Attributes::OperatorType::ToString) ->Attribute(AZ::Script::Attributes::ExcludeFrom, AZ::Script::Attributes::ExcludeFlags::All) diff --git a/Code/Framework/AzCore/AzCore/Component/EntityUtils.cpp b/Code/Framework/AzCore/AzCore/Component/EntityUtils.cpp index fcc8cd6424..54e40c1fc0 100644 --- a/Code/Framework/AzCore/AzCore/Component/EntityUtils.cpp +++ b/Code/Framework/AzCore/AzCore/Component/EntityUtils.cpp @@ -10,292 +10,289 @@ #include #include -namespace AZ +namespace AZ::EntityUtils { - namespace EntityUtils + //========================================================================= + // Reflect + //========================================================================= + void Reflect(ReflectContext* context) { - //========================================================================= - // Reflect - //========================================================================= - void Reflect(ReflectContext* context) + if (auto serializeContext = azrtti_cast(context)) { - if (auto serializeContext = azrtti_cast(context)) + serializeContext->Class()-> + Version(1)-> + Field("Entities", &SerializableEntityContainer::m_entities); + } + } + + struct StackDataType + { + const SerializeContext::ClassData* m_classData; + const SerializeContext::ClassElement* m_elementData; + void* m_dataPtr; + bool m_isModifiedContainer; + }; + + //========================================================================= + // EnumerateEntityIds + //========================================================================= + void EnumerateEntityIds(const void* classPtr, const Uuid& classUuid, const EntityIdVisitor& visitor, SerializeContext* context) + { + AZ_PROFILE_FUNCTION(AzCore); + + if (!context) + { + context = GetApplicationSerializeContext(); + if (!context) { - serializeContext->Class()-> - Version(1)-> - Field("Entities", &SerializableEntityContainer::m_entities); + AZ_Error("Serialization", false, "No serialize context provided! Failed to get component application default serialize context! ComponentApp is not started or input serialize context should not be null!"); + return; } } + AZStd::vector parentStack; + parentStack.reserve(30); + auto beginCB = [ &](void* ptr, const SerializeContext::ClassData* classData, const SerializeContext::ClassElement* elementData) -> bool + { + (void)elementData; - struct StackDataType + if (classData->m_typeId == SerializeTypeInfo::GetUuid()) + { + // determine if this is entity ref or just entityId (please refer to the function documentation for more info) + bool isEntityId = false; + if (!parentStack.empty() && parentStack.back()->m_typeId == SerializeTypeInfo::GetUuid()) + { + // our parent in the entity (currently entity has only one EntityId member, but we can check the offset for future proof + AZ_Assert(elementData && strcmp(elementData->m_name, "Id") == 0, "class Entity, should have only ONE EntityId member, the actual entity id!"); + isEntityId = true; + } + + EntityId* entityIdPtr = (elementData->m_flags & SerializeContext::ClassElement::FLG_POINTER) ? + *reinterpret_cast(ptr) : reinterpret_cast(ptr); + visitor(*entityIdPtr, isEntityId, elementData); + } + + parentStack.push_back(classData); + return true; + }; + + auto endCB = [ &]() -> bool + { + parentStack.pop_back(); + return true; + }; + + SerializeContext::EnumerateInstanceCallContext callContext( + beginCB, + endCB, + context, + SerializeContext::ENUM_ACCESS_FOR_READ, + nullptr + ); + + context->EnumerateInstanceConst( + &callContext, + classPtr, + classUuid, + nullptr, + nullptr + ); + } + + //========================================================================= + // GetApplicationSerializeContext + //========================================================================= + SerializeContext* GetApplicationSerializeContext() + { + SerializeContext* context = nullptr; + EBUS_EVENT_RESULT(context, ComponentApplicationBus, GetSerializeContext); + return context; + } + + //========================================================================= + // FindFirstDerivedComponent + //========================================================================= + Component* FindFirstDerivedComponent(const Entity* entity, const Uuid& typeId) + { + for (AZ::Component* component : entity->GetComponents()) { - const SerializeContext::ClassData* m_classData; - const SerializeContext::ClassElement* m_elementData; - void* m_dataPtr; - bool m_isModifiedContainer; + if (azrtti_istypeof(typeId, component)) + { + return component; + } + } + return nullptr; + } + + Component* FindFirstDerivedComponent(EntityId entityId, const Uuid& typeId) + { + Entity* entity{}; + ComponentApplicationBus::BroadcastResult(entity, &ComponentApplicationRequests::FindEntity, entityId); + return entity ? FindFirstDerivedComponent(entity, typeId) : nullptr; + } + + //========================================================================= + // FindDerivedComponents + //========================================================================= + Entity::ComponentArrayType FindDerivedComponents(const Entity* entity, const Uuid& typeId) + { + Entity::ComponentArrayType result; + for (AZ::Component* component : entity->GetComponents()) + { + if (azrtti_istypeof(typeId, component)) + { + result.push_back(component); + } + } + return result; + } + + Entity::ComponentArrayType FindDerivedComponents(EntityId entityId, const Uuid& typeId) + { + Entity* entity{}; + ComponentApplicationBus::BroadcastResult(entity, &ComponentApplicationRequests::FindEntity, entityId); + return entity ? FindDerivedComponents(entity, typeId) : Entity::ComponentArrayType(); + } + + bool EnumerateBaseRecursive(SerializeContext* context, const EnumerateBaseRecursiveVisitor& baseClassVisitor, const TypeId& typeToExamine) + { + AZ_Assert(context, "CheckDeclaresSerializeBaseClass called with no serialize context."); + if (!context) + { + return false; + } + + AZStd::fixed_vector knownBaseClasses = { typeToExamine }; // avoid allocating heap here if possible. 64 types are 64*sizeof(Uuid) which is only 1k. + bool foundBaseClass = false; + auto enumerateBaseVisitor = [&baseClassVisitor, &knownBaseClasses](const AZ::SerializeContext::ClassData* classData, const TypeId& examineTypeId) + { + if (!classData) + { + return false; + } + + if (AZStd::find(knownBaseClasses.begin(), knownBaseClasses.end(), classData->m_typeId) == knownBaseClasses.end()) + { + if (knownBaseClasses.size() == 64) + { + // this should be pretty unlikely since a single class would have to have many other classes in its heirarchy + // and it'd all have to be basically in one layer, as we are popping as we explore. + AZ_WarningOnce("EntityUtils", false, "While trying to find a base class, all available slots were consumed. consider increasing the size of knownBaseClasses.\n"); + // we cannot continue any further, assume we did not find it. + return false; + } + knownBaseClasses.push_back(classData->m_typeId); + } + + return baseClassVisitor(classData, examineTypeId); }; - //========================================================================= - // EnumerateEntityIds - //========================================================================= - void EnumerateEntityIds(const void* classPtr, const Uuid& classUuid, const EntityIdVisitor& visitor, SerializeContext* context) + while (!knownBaseClasses.empty() && !foundBaseClass) { - AZ_PROFILE_FUNCTION(AzCore); + TypeId toExamine = knownBaseClasses.back(); + knownBaseClasses.pop_back(); - if (!context) - { - context = GetApplicationSerializeContext(); - if (!context) - { - AZ_Error("Serialization", false, "No serialize context provided! Failed to get component application default serialize context! ComponentApp is not started or input serialize context should not be null!"); - return; - } - } - AZStd::vector parentStack; - parentStack.reserve(30); - auto beginCB = [ &](void* ptr, const SerializeContext::ClassData* classData, const SerializeContext::ClassElement* elementData) -> bool - { - (void)elementData; - - if (classData->m_typeId == SerializeTypeInfo::GetUuid()) - { - // determine if this is entity ref or just entityId (please refer to the function documentation for more info) - bool isEntityId = false; - if (!parentStack.empty() && parentStack.back()->m_typeId == SerializeTypeInfo::GetUuid()) - { - // our parent in the entity (currently entity has only one EntityId member, but we can check the offset for future proof - AZ_Assert(elementData && strcmp(elementData->m_name, "Id") == 0, "class Entity, should have only ONE EntityId member, the actual entity id!"); - isEntityId = true; - } - - EntityId* entityIdPtr = (elementData->m_flags & SerializeContext::ClassElement::FLG_POINTER) ? - *reinterpret_cast(ptr) : reinterpret_cast(ptr); - visitor(*entityIdPtr, isEntityId, elementData); - } - - parentStack.push_back(classData); - return true; - }; - - auto endCB = [ &]() -> bool - { - parentStack.pop_back(); - return true; - }; - - SerializeContext::EnumerateInstanceCallContext callContext( - beginCB, - endCB, - context, - SerializeContext::ENUM_ACCESS_FOR_READ, - nullptr - ); - - context->EnumerateInstanceConst( - &callContext, - classPtr, - classUuid, - nullptr, - nullptr - ); + context->EnumerateBase(enumerateBaseVisitor, toExamine); } - //========================================================================= - // GetApplicationSerializeContext - //========================================================================= - SerializeContext* GetApplicationSerializeContext() - { - SerializeContext* context = nullptr; - EBUS_EVENT_RESULT(context, ComponentApplicationBus, GetSerializeContext); - return context; - } + return foundBaseClass; + } - //========================================================================= - // FindFirstDerivedComponent - //========================================================================= - Component* FindFirstDerivedComponent(const Entity* entity, const Uuid& typeId) + bool CheckIfClassIsDeprecated(SerializeContext* context, const TypeId& typeToExamine) + { + bool isDeprecated = false; + auto classVisitorFn = [&isDeprecated](const AZ::SerializeContext::ClassData* classData, const TypeId& /*rttiBase*/) { - for (AZ::Component* component : entity->GetComponents()) - { - if (azrtti_istypeof(typeId, component)) - { - return component; - } - } - return nullptr; - } - - Component* FindFirstDerivedComponent(EntityId entityId, const Uuid& typeId) - { - Entity* entity{}; - ComponentApplicationBus::BroadcastResult(entity, &ComponentApplicationRequests::FindEntity, entityId); - return entity ? FindFirstDerivedComponent(entity, typeId) : nullptr; - } - - //========================================================================= - // FindDerivedComponents - //========================================================================= - Entity::ComponentArrayType FindDerivedComponents(const Entity* entity, const Uuid& typeId) - { - Entity::ComponentArrayType result; - for (AZ::Component* component : entity->GetComponents()) - { - if (azrtti_istypeof(typeId, component)) - { - result.push_back(component); - } - } - return result; - } - - Entity::ComponentArrayType FindDerivedComponents(EntityId entityId, const Uuid& typeId) - { - Entity* entity{}; - ComponentApplicationBus::BroadcastResult(entity, &ComponentApplicationRequests::FindEntity, entityId); - return entity ? FindDerivedComponents(entity, typeId) : Entity::ComponentArrayType(); - } - - bool EnumerateBaseRecursive(SerializeContext* context, const EnumerateBaseRecursiveVisitor& baseClassVisitor, const TypeId& typeToExamine) - { - AZ_Assert(context, "CheckDeclaresSerializeBaseClass called with no serialize context."); - if (!context) + // Stop iterating once we stop receiving SerializeContext::ClassData*. + if (!classData) { return false; } - AZStd::fixed_vector knownBaseClasses = { typeToExamine }; // avoid allocating heap here if possible. 64 types are 64*sizeof(Uuid) which is only 1k. - bool foundBaseClass = false; - auto enumerateBaseVisitor = [&baseClassVisitor, &knownBaseClasses](const AZ::SerializeContext::ClassData* classData, const TypeId& examineTypeId) - { - if (!classData) - { - return false; - } - - if (AZStd::find(knownBaseClasses.begin(), knownBaseClasses.end(), classData->m_typeId) == knownBaseClasses.end()) - { - if (knownBaseClasses.size() == 64) - { - // this should be pretty unlikely since a single class would have to have many other classes in its heirarchy - // and it'd all have to be basically in one layer, as we are popping as we explore. - AZ_WarningOnce("EntityUtils", false, "While trying to find a base class, all available slots were consumed. consider increasing the size of knownBaseClasses.\n"); - // we cannot continue any further, assume we did not find it. - return false; - } - knownBaseClasses.push_back(classData->m_typeId); - } - - return baseClassVisitor(classData, examineTypeId); - }; - - while (!knownBaseClasses.empty() && !foundBaseClass) - { - TypeId toExamine = knownBaseClasses.back(); - knownBaseClasses.pop_back(); - - context->EnumerateBase(enumerateBaseVisitor, toExamine); - } - - return foundBaseClass; - } - - bool CheckIfClassIsDeprecated(SerializeContext* context, const TypeId& typeToExamine) - { - bool isDeprecated = false; - auto classVisitorFn = [&isDeprecated](const AZ::SerializeContext::ClassData* classData, const TypeId& /*rttiBase*/) - { - // Stop iterating once we stop receiving SerializeContext::ClassData*. - if (!classData) - { - return false; - } - - // Stop iterating if we've found that the class is deprecated - if (classData->IsDeprecated()) - { - isDeprecated = true; - return false; - } - - return true; // keep iterating - }; - - // Check if the type is deprecated - const AZ::SerializeContext::ClassData* classData = context->FindClassData(typeToExamine); + // Stop iterating if we've found that the class is deprecated if (classData->IsDeprecated()) { - return true; - } - - // Check if any of its bases are deprecated - EnumerateBaseRecursive(context, classVisitorFn, typeToExamine); - - return isDeprecated; - } - - bool CheckDeclaresSerializeBaseClass(SerializeContext* context, const TypeId& typeToFind, const TypeId& typeToExamine) - { - AZ_Assert(context, "CheckDeclaresSerializeBaseClass called with no serialize context."); - if (!context) - { + isDeprecated = true; return false; } - bool foundBaseClass = false; - auto baseClassVisitorFn = [&typeToFind, &foundBaseClass](const AZ::SerializeContext::ClassData* reflectedBase, const TypeId& /*rttiBase*/) - { - if (!reflectedBase) - { - foundBaseClass = false; - return false; // stop iterating - } + return true; // keep iterating + }; - foundBaseClass = (reflectedBase->m_typeId == typeToFind); - if (foundBaseClass) - { - return false; // we have a base, stop iterating - } - - return true; // keep iterating - }; - - EnumerateBaseRecursive(context, baseClassVisitorFn, typeToExamine); - - return foundBaseClass; - } - - bool RemoveDuplicateServicesOfAndAfterIterator( - const ComponentDescriptor::DependencyArrayType::iterator& iterator, - ComponentDescriptor::DependencyArrayType& providedServiceArray, - const Entity* entity) + // Check if the type is deprecated + const AZ::SerializeContext::ClassData* classData = context->FindClassData(typeToExamine); + if (classData->IsDeprecated()) { - // Build types that strip out AZ_Warnings will complain that entity is unused without this. - (void)entity; - if (iterator == providedServiceArray.end()) - { - return false; - } - - bool duplicateFound = false; - - for (ComponentDescriptor::DependencyArrayType::iterator duplicateCheckIter = AZStd::next(iterator); - duplicateCheckIter != providedServiceArray.end();) - { - if (*iterator == *duplicateCheckIter) - { - AZ_Warning("Entity", false, "Duplicate service %d found on entity %s [%s]", - *duplicateCheckIter, - entity ? entity->GetName().c_str() : "Entity not provided", - entity ? entity->GetId().ToString().c_str() : ""); - duplicateCheckIter = providedServiceArray.erase(duplicateCheckIter); - duplicateFound = true; - } - else - { - ++duplicateCheckIter; - } - } - return duplicateFound; + return true; } - } // namespace EntityUtils -} // namespace AZ + + // Check if any of its bases are deprecated + EnumerateBaseRecursive(context, classVisitorFn, typeToExamine); + + return isDeprecated; + } + + bool CheckDeclaresSerializeBaseClass(SerializeContext* context, const TypeId& typeToFind, const TypeId& typeToExamine) + { + AZ_Assert(context, "CheckDeclaresSerializeBaseClass called with no serialize context."); + if (!context) + { + return false; + } + + bool foundBaseClass = false; + auto baseClassVisitorFn = [&typeToFind, &foundBaseClass](const AZ::SerializeContext::ClassData* reflectedBase, const TypeId& /*rttiBase*/) + { + if (!reflectedBase) + { + foundBaseClass = false; + return false; // stop iterating + } + + foundBaseClass = (reflectedBase->m_typeId == typeToFind); + if (foundBaseClass) + { + return false; // we have a base, stop iterating + } + + return true; // keep iterating + }; + + EnumerateBaseRecursive(context, baseClassVisitorFn, typeToExamine); + + return foundBaseClass; + } + + bool RemoveDuplicateServicesOfAndAfterIterator( + const ComponentDescriptor::DependencyArrayType::iterator& iterator, + ComponentDescriptor::DependencyArrayType& providedServiceArray, + const Entity* entity) + { + // Build types that strip out AZ_Warnings will complain that entity is unused without this. + (void)entity; + if (iterator == providedServiceArray.end()) + { + return false; + } + + bool duplicateFound = false; + + for (ComponentDescriptor::DependencyArrayType::iterator duplicateCheckIter = AZStd::next(iterator); + duplicateCheckIter != providedServiceArray.end();) + { + if (*iterator == *duplicateCheckIter) + { + AZ_Warning("Entity", false, "Duplicate service %d found on entity %s [%s]", + *duplicateCheckIter, + entity ? entity->GetName().c_str() : "Entity not provided", + entity ? entity->GetId().ToString().c_str() : ""); + duplicateCheckIter = providedServiceArray.erase(duplicateCheckIter); + duplicateFound = true; + } + else + { + ++duplicateCheckIter; + } + } + return duplicateFound; + } +} // namespace AZ::EntityUtils diff --git a/Code/Framework/AzCore/AzCore/Component/TickBus.h b/Code/Framework/AzCore/AzCore/Component/TickBus.h index e65efb93f2..1b588f41cc 100644 --- a/Code/Framework/AzCore/AzCore/Component/TickBus.h +++ b/Code/Framework/AzCore/AzCore/Component/TickBus.h @@ -16,7 +16,6 @@ #define AZCORE_COMPONENT_TICK_BUS_H #include -#include #include #include // For TickBus thread events. #include @@ -112,10 +111,6 @@ namespace AZ AZ_FORCE_INLINE bool operator()(TickEvents* left, TickEvents* right) const { return left->GetTickOrder() < right->GetTickOrder(); } }; - /** - * Enable tick bus to work with the AssetTracking - */ - using EventProcessingPolicy = Debug::AssetTrackingEventProcessingPolicy<>; ////////////////////////////////////////////////////////////////////////// /** @@ -217,10 +212,6 @@ namespace AZ */ typedef AZStd::mutex EventQueueMutexType; - /** - * Enable tick bus to work with the AssetTracking - */ - using EventProcessingPolicy = Debug::AssetTrackingEventProcessingPolicy<>; ////////////////////////////////////////////////////////////////////////// /** diff --git a/Code/Framework/AzCore/AzCore/Compression/zstd_compression.cpp b/Code/Framework/AzCore/AzCore/Compression/zstd_compression.cpp index 9db59bc781..ecab62d123 100644 --- a/Code/Framework/AzCore/AzCore/Compression/zstd_compression.cpp +++ b/Code/Framework/AzCore/AzCore/Compression/zstd_compression.cpp @@ -57,6 +57,7 @@ void ZStd::StartCompressor(unsigned int compressionLevel) ZSTD_customMem customAlloc; customAlloc.customAlloc = reinterpret_cast(&AllocateMem); customAlloc.customFree = &FreeMem; + customAlloc.opaque = nullptr; AZ_UNUSED(compressionLevel); m_streamCompression = (ZSTD_createCStream_advanced(customAlloc)); diff --git a/Code/Framework/AzCore/AzCore/Console/Console.cpp b/Code/Framework/AzCore/AzCore/Console/Console.cpp index d6781e1370..ff7a08e127 100644 --- a/Code/Framework/AzCore/AzCore/Console/Console.cpp +++ b/Code/Framework/AzCore/AzCore/Console/Console.cpp @@ -243,7 +243,7 @@ namespace AZ if (StringFunc::StartsWith(curr->m_name, command, false)) { - AZLOG_INFO("- %s : %s\n", curr->m_name, curr->m_desc); + AZLOG_INFO("- %s : %s", curr->m_name, curr->m_desc); if (commandSubset.size() < MaxConsoleCommandPlusArgsLength) { @@ -433,29 +433,29 @@ namespace AZ { if ((curr->GetFlags() & requiredSet) != requiredSet) { - AZLOG_WARN("%s failed required set flag check\n", curr->m_name); + AZLOG_WARN("%s failed required set flag check", curr->m_name); continue; } if ((curr->GetFlags() & requiredClear) != ConsoleFunctorFlags::Null) { - AZLOG_WARN("%s failed required clear flag check\n", curr->m_name); + AZLOG_WARN("%s failed required clear flag check", curr->m_name); continue; } if ((curr->GetFlags() & ConsoleFunctorFlags::IsCheat) != ConsoleFunctorFlags::Null) { - AZLOG_WARN("%s is marked as a cheat\n", curr->m_name); + AZLOG_WARN("%s is marked as a cheat", curr->m_name); } if ((curr->GetFlags() & ConsoleFunctorFlags::IsDeprecated) != ConsoleFunctorFlags::Null) { - AZLOG_WARN("%s is marked as deprecated\n", curr->m_name); + AZLOG_WARN("%s is marked as deprecated", curr->m_name); } if ((curr->GetFlags() & ConsoleFunctorFlags::NeedsReload) != ConsoleFunctorFlags::Null) { - AZLOG_WARN("Changes to %s will only take effect after level reload\n", curr->m_name); + AZLOG_WARN("Changes to %s will only take effect after level reload", curr->m_name); } // Letting this intentionally fall-through, since in editor we can register common variables multiple times @@ -468,7 +468,7 @@ namespace AZ { CVarFixedString value; curr->GetValue(value); - AZLOG_INFO("> %s : %s\n", curr->GetName(), value.empty() ? "" : value.c_str()); + AZLOG_INFO("> %s : %s", curr->GetName(), value.empty() ? "" : value.c_str()); } flags = curr->GetFlags(); } diff --git a/Code/Framework/AzCore/AzCore/Console/ConsoleDataWrapper.inl b/Code/Framework/AzCore/AzCore/Console/ConsoleDataWrapper.inl index 46774f23b2..b3a59d287d 100644 --- a/Code/Framework/AzCore/AzCore/Console/ConsoleDataWrapper.inl +++ b/Code/Framework/AzCore/AzCore/Console/ConsoleDataWrapper.inl @@ -32,7 +32,16 @@ namespace AZ template inline void ConsoleDataWrapper::operator =(const BASE_TYPE& rhs) { + const BASE_TYPE currentValue = this->m_value; + // Do the value assignment outside new value check. + // Client code can supply a type for m_value that overrides the operator= function and trigger side effects + // in the operator= function body. Doing the assignment outside the value change check avoids those side + // effects not being triggered because AzCore believes the value wouldn't change. this->m_value = rhs; + if (currentValue != rhs) + { + InvokeCallback(); + } } template diff --git a/Code/Framework/AzCore/AzCore/Console/LoggerSystemComponent.cpp b/Code/Framework/AzCore/AzCore/Console/LoggerSystemComponent.cpp index 4d00443186..2794dfdc40 100644 --- a/Code/Framework/AzCore/AzCore/Console/LoggerSystemComponent.cpp +++ b/Code/Framework/AzCore/AzCore/Console/LoggerSystemComponent.cpp @@ -119,25 +119,21 @@ namespace AZ void LoggerSystemComponent::LogInternalV(LogLevel level, const char* format, const char* file, const char* function, int32_t line, va_list args) { constexpr AZStd::size_t MaxLogBufferSize = 1000; - char buffer[MaxLogBufferSize]; + auto buffer = AZStd::fixed_string::format_arg(format, args); + m_logEvent.Signal(level, buffer.c_str(), file, function, line); + buffer += '\n'; - const AZStd::size_t length = azvsnprintf(buffer, MaxLogBufferSize, format, args); - buffer[AZStd::min(length + 1, MaxLogBufferSize - 1)] = '\0'; - m_logEvent.Signal(level, buffer, file, function, line); - - // Force a new-line before calling the AZ::Debug::Trace functions, as they assume a newline is present - buffer[AZStd::min(length + 1, MaxLogBufferSize - 2)] = '\n'; switch (level) { case LogLevel::Warn: - AZ_Warning("Logger", true, buffer); + AZ_Warning("Logger", true, buffer.c_str()); break; case LogLevel::Error: - AZ_Error("Logger", true, buffer); + AZ_Error("Logger", true, buffer.c_str()); break; default: // Catch all else with trace - AZ::Debug::Trace::Output("Logger", buffer); + AZ::Debug::Trace::Output("Logger", buffer.c_str()); break; } } diff --git a/Code/Framework/AzCore/AzCore/DOM/Backends/JSON/JsonBackend.h b/Code/Framework/AzCore/AzCore/DOM/Backends/JSON/JsonBackend.h new file mode 100644 index 0000000000..1023796f61 --- /dev/null +++ b/Code/Framework/AzCore/AzCore/DOM/Backends/JSON/JsonBackend.h @@ -0,0 +1,43 @@ +/* + * Copyright (c) Contributors to the Open 3D Engine Project. + * For complete copyright and license terms please see the LICENSE at the root of this distribution. + * + * SPDX-License-Identifier: Apache-2.0 OR MIT + * + */ + +#pragma once + +#include +#include +#include + +namespace AZ::Dom +{ + //! A DOM backend for serializing and deserializing JSON <=> UTF-8 text + //! \param ParseFlags Controls how deserialized JSON is parsed. + //! \param WriteFormat Controls how serialized JSON is formatted. + template< + Json::ParseFlags ParseFlags = Json::ParseFlags::ParseComments, + Json::OutputFormatting WriteFormat = Json::OutputFormatting::PrettyPrintedJson> + class JsonBackend final : public Backend + { + public: + Visitor::Result ReadFromBuffer(const char* buffer, size_t size, AZ::Dom::Lifetime lifetime, Visitor& visitor) override + { + return Json::VisitSerializedJson({ buffer, size }, lifetime, visitor); + } + + Visitor::Result ReadFromBufferInPlace(char* buffer, [[maybe_unused]] AZStd::optional size, Visitor& visitor) override + { + return Json::VisitSerializedJsonInPlace(buffer, visitor); + } + + Visitor::Result WriteToBuffer(AZStd::string& buffer, WriteCallback callback) + { + AZ::IO::ByteContainerStream stream{ &buffer }; + AZStd::unique_ptr visitor = Json::CreateJsonStreamWriter(stream, WriteFormat); + return callback(*visitor); + } + }; +} // namespace AZ::Dom diff --git a/Code/Framework/AzCore/AzCore/DOM/Backends/JSON/JsonSerializationUtils.cpp b/Code/Framework/AzCore/AzCore/DOM/Backends/JSON/JsonSerializationUtils.cpp new file mode 100644 index 0000000000..17f9bfea54 --- /dev/null +++ b/Code/Framework/AzCore/AzCore/DOM/Backends/JSON/JsonSerializationUtils.cpp @@ -0,0 +1,582 @@ +/* + * Copyright (c) Contributors to the Open 3D Engine Project. + * For complete copyright and license terms please see the LICENSE at the root of this distribution. + * + * SPDX-License-Identifier: Apache-2.0 OR MIT + * + */ + +#include + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +namespace AZ::Dom::Json +{ + // + // class RapidJsonValueWriter + // + RapidJsonValueWriter::RapidJsonValueWriter(rapidjson::Value& outputValue, rapidjson::Value::AllocatorType& allocator) + : m_result(outputValue) + , m_allocator(allocator) + { + } + + VisitorFlags RapidJsonValueWriter::GetVisitorFlags() const + { + return VisitorFlags::SupportsRawKeys | VisitorFlags::SupportsArrays | VisitorFlags::SupportsObjects; + } + + Visitor::Result RapidJsonValueWriter::Null() + { + CurrentValue().SetNull(); + return FinishWrite(); + } + + Visitor::Result RapidJsonValueWriter::Bool(bool value) + { + CurrentValue().SetBool(value); + return FinishWrite(); + } + + Visitor::Result RapidJsonValueWriter::Int64(AZ::s64 value) + { + CurrentValue().SetInt64(value); + return FinishWrite(); + } + + Visitor::Result RapidJsonValueWriter::Uint64(AZ::u64 value) + { + CurrentValue().SetUint64(value); + return FinishWrite(); + } + + Visitor::Result RapidJsonValueWriter::Double(double value) + { + CurrentValue().SetDouble(value); + return FinishWrite(); + } + + Visitor::Result RapidJsonValueWriter::String(AZStd::string_view value, Lifetime lifetime) + { + if (lifetime == Lifetime::Temporary) + { + CurrentValue().SetString(value.data(), aznumeric_cast(value.length()), m_allocator); + } + else + { + CurrentValue().SetString(value.data(), aznumeric_cast(value.length())); + } + return FinishWrite(); + } + + Visitor::Result RapidJsonValueWriter::StartObject() + { + CurrentValue().SetObject(); + + const bool isObject = true; + m_entryStack.emplace_front(isObject, CurrentValue()); + return VisitorSuccess(); + } + + Visitor::Result RapidJsonValueWriter::EndObject(AZ::u64 attributeCount) + { + if (m_entryStack.empty()) + { + return VisitorFailure(VisitorErrorCode::InternalError, "EndObject called without a matching BeginObject call"); + } + + const ValueInfo& frontEntry = m_entryStack.front(); + if (!frontEntry.m_isObject) + { + return VisitorFailure(VisitorErrorCode::InternalError, "Expected EndArray and received EndObject instead"); + } + + if (frontEntry.m_entryCount != attributeCount) + { + return VisitorFailure( + VisitorErrorCode::InternalError, + AZStd::string::format( + "EndObject: Expected %llu attributes but received %llu attributes instead", attributeCount, + frontEntry.m_entryCount)); + } + + m_entryStack.pop_front(); + return FinishWrite(); + } + + Visitor::Result RapidJsonValueWriter::Key(AZ::Name key) + { + return RawKey(key.GetStringView(), Lifetime::Persistent); + } + + Visitor::Result RapidJsonValueWriter::RawKey(AZStd::string_view key, Lifetime lifetime) + { + AZ_Assert(!m_entryStack.empty(), "Attempmted to push a key with no object"); + AZ_Assert(m_entryStack.front().m_isObject, "Attempted to push a key to an array"); + if (lifetime == Lifetime::Persistent) + { + m_entryStack.front().m_key.SetString(key.data(), aznumeric_cast(key.size())); + } + else + { + m_entryStack.front().m_key.SetString(key.data(), aznumeric_cast(key.size()), m_allocator); + } + return VisitorSuccess(); + } + + Visitor::Result RapidJsonValueWriter::StartArray() + { + CurrentValue().SetArray(); + + const bool isObject = false; + m_entryStack.emplace_front(isObject, CurrentValue()); + return VisitorSuccess(); + } + + Visitor::Result RapidJsonValueWriter::EndArray(AZ::u64 elementCount) + { + if (m_entryStack.empty()) + { + return VisitorFailure(VisitorErrorCode::InternalError, "EndArray called without a matching BeginArray call"); + } + + const ValueInfo& frontEntry = m_entryStack.front(); + if (frontEntry.m_isObject) + { + return VisitorFailure(VisitorErrorCode::InternalError, "Expected EndObject and received EndArray instead"); + } + + if (frontEntry.m_entryCount != elementCount) + { + return VisitorFailure( + VisitorErrorCode::InternalError, + AZStd::string::format( + "EndArray: Expected %llu elements but received %llu elements instead", elementCount, frontEntry.m_entryCount)); + } + + m_entryStack.pop_front(); + return FinishWrite(); + } + + Visitor::Result RapidJsonValueWriter::FinishWrite() + { + if (m_entryStack.empty()) + { + return VisitorSuccess(); + } + + // Retrieve the top value of the stack and replace it with a null value + rapidjson::Value value; + m_entryStack.front().m_value.Swap(value); + ValueInfo& newEntry = m_entryStack.front(); + ++newEntry.m_entryCount; + + if (newEntry.m_key.IsString()) + { + newEntry.m_container.AddMember(m_entryStack.front().m_key.Move(), AZStd::move(value), m_allocator); + newEntry.m_key.SetNull(); + } + else + { + newEntry.m_container.PushBack(AZStd::move(value), m_allocator); + } + + return VisitorSuccess(); + } + + rapidjson::Value& RapidJsonValueWriter::CurrentValue() + { + if (m_entryStack.empty()) + { + return m_result; + } + return m_entryStack.front().m_value; + } + + RapidJsonValueWriter::ValueInfo::ValueInfo(bool isObject, rapidjson::Value& container) + : m_isObject(isObject) + , m_container(container) + { + } + + // + // class StreamWriter + // + // Visitor that writes to a rapidjson::Writer + template + class StreamWriter : public Visitor + { + public: + StreamWriter(AZ::IO::GenericStream* stream) + : m_streamWriter(stream) + , m_writer(Writer(m_streamWriter)) + { + } + + VisitorFlags GetVisitorFlags() const override + { + return VisitorFlags::SupportsRawKeys | VisitorFlags::SupportsArrays | VisitorFlags::SupportsObjects; + } + + Result Null() override + { + return CheckWrite(m_writer.Null()); + } + + Result Bool(bool value) override + { + return CheckWrite(m_writer.Bool(value)); + } + + Result Int64(AZ::s64 value) override + { + return CheckWrite(m_writer.Int64(value)); + } + + Result Uint64(AZ::u64 value) override + { + return CheckWrite(m_writer.Uint64(value)); + } + + Result Double(double value) override + { + return CheckWrite(m_writer.Double(value)); + } + + Result String(AZStd::string_view value, Lifetime lifetime) override + { + const bool shouldCopy = lifetime == Lifetime::Temporary; + return CheckWrite(m_writer.String(value.data(), aznumeric_cast(value.size()), shouldCopy)); + } + + Result StartObject() override + { + return CheckWrite(m_writer.StartObject()); + } + + Result EndObject(AZ::u64 attributeCount) override + { + return CheckWrite(m_writer.EndObject(aznumeric_cast(attributeCount))); + } + + Result Key(AZ::Name key) override + { + return RawKey(key.GetStringView(), Lifetime::Persistent); + } + + Result RawKey(AZStd::string_view key, Lifetime lifetime) override + { + const bool shouldCopy = lifetime == Lifetime::Temporary; + return CheckWrite(m_writer.Key(key.data(), aznumeric_cast(key.size()), shouldCopy)); + } + + Result StartArray() override + { + return CheckWrite(m_writer.StartArray()); + } + + Result EndArray(AZ::u64 elementCount) override + { + return CheckWrite(m_writer.EndArray(aznumeric_cast(elementCount))); + } + + private: + Result CheckWrite(bool writeSucceeded) + { + if (writeSucceeded) + { + return VisitorSuccess(); + } + else + { + return VisitorFailure(VisitorErrorCode::InternalError, "Failed to write JSON"); + } + } + + AZ::IO::RapidJSONStreamWriter m_streamWriter; + Writer m_writer; + }; + + // + // struct JsonReadHandler + // + RapidJsonReadHandler::RapidJsonReadHandler(Visitor* visitor, Lifetime stringLifetime) + : m_visitor(visitor) + , m_stringLifetime(stringLifetime) + , m_outcome(AZ::Success()) + { + } + + bool RapidJsonReadHandler::Null() + { + return CheckResult(m_visitor->Null()); + } + + bool RapidJsonReadHandler::Bool(bool b) + { + return CheckResult(m_visitor->Bool(b)); + } + + bool RapidJsonReadHandler::Int(int i) + { + return CheckResult(m_visitor->Int64(aznumeric_cast(i))); + } + + bool RapidJsonReadHandler::Uint(unsigned i) + { + return CheckResult(m_visitor->Uint64(aznumeric_cast(i))); + } + + bool RapidJsonReadHandler::Int64(int64_t i) + { + return CheckResult(m_visitor->Int64(i)); + } + + bool RapidJsonReadHandler::Uint64(uint64_t i) + { + return CheckResult(m_visitor->Uint64(i)); + } + + bool RapidJsonReadHandler::Double(double d) + { + return CheckResult(m_visitor->Double(d)); + } + + bool RapidJsonReadHandler::RawNumber( + [[maybe_unused]] const char* str, [[maybe_unused]] rapidjson::SizeType length, [[maybe_unused]] bool copy) + { + AZ_Assert(false, "Raw numbers are unsupported in the rapidjson DOM backend"); + return false; + } + + bool RapidJsonReadHandler::String(const char* str, rapidjson::SizeType length, bool copy) + { + const Lifetime lifetime = copy ? m_stringLifetime : Lifetime::Temporary; + return CheckResult(m_visitor->String(AZStd::string_view(str, length), lifetime)); + } + + bool RapidJsonReadHandler::StartObject() + { + return CheckResult(m_visitor->StartObject()); + } + + bool RapidJsonReadHandler::Key(const char* str, rapidjson::SizeType length, [[maybe_unused]] bool copy) + { + AZStd::string_view key = AZStd::string_view(str, length); + if (!m_visitor->SupportsRawKeys()) + { + m_visitor->Key(AZ::Name(key)); + } + const Lifetime lifetime = copy ? m_stringLifetime : Lifetime::Temporary; + return CheckResult(m_visitor->RawKey(key, lifetime)); + } + + bool RapidJsonReadHandler::EndObject([[maybe_unused]] rapidjson::SizeType memberCount) + { + return CheckResult(m_visitor->EndObject(memberCount)); + } + + bool RapidJsonReadHandler::StartArray() + { + return CheckResult(m_visitor->StartArray()); + } + + bool RapidJsonReadHandler::EndArray([[maybe_unused]] rapidjson::SizeType elementCount) + { + return CheckResult(m_visitor->EndArray(elementCount)); + } + + Visitor::Result&& RapidJsonReadHandler::TakeOutcome() + { + return AZStd::move(m_outcome); + } + + bool RapidJsonReadHandler::CheckResult(Visitor::Result result) + { + if (result.IsSuccess()) + { + return true; + } + else + { + m_outcome = AZStd::move(result); + return false; + } + } + + // + // Serialized JSON util functions + // + AZStd::unique_ptr CreateJsonStreamWriter(AZ::IO::GenericStream& stream, OutputFormatting format) + { + if (format == OutputFormatting::MinifiedJson) + { + using WriterType = rapidjson::Writer; + return AZStd::make_unique>(&stream); + } + else + { + using WriterType = rapidjson::PrettyWriter; + return AZStd::make_unique>(&stream); + } + } + + // + // In-memory rapidjson util functions + // + AZ::Outcome WriteToRapidJsonDocument(Backend::WriteCallback writeCallback) + { + rapidjson::Document document; + RapidJsonValueWriter writer(document, document.GetAllocator()); + auto result = writeCallback(writer); + if (!result.IsSuccess()) + { + return AZ::Failure(result.TakeError().FormatVisitorErrorMessage()); + } + return AZ::Success(AZStd::move(document)); + } + + Visitor::Result WriteToRapidJsonValue( + rapidjson::Value& value, rapidjson::Value::AllocatorType& allocator, Backend::WriteCallback writeCallback) + { + RapidJsonValueWriter writer(value, allocator); + return writeCallback(writer); + } + + Visitor::Result VisitRapidJsonValue(const rapidjson::Value& value, Visitor& visitor, Lifetime lifetime) + { + struct EndArrayMarker + { + }; + struct EndObjectMarker + { + }; + + // Processing stack consists of values comprised of one of a: + // - rapidjson::Value to process + // - EndArrayMarker or EndObjectMarker denoting the end of an array or object + // - string denoting a key at the beginning of a key/value pair + using Entry = AZStd::variant; + AZStd::stack entryStack; + AZStd::stack entryCountStack; + entryStack.push(&value); + + while (!entryStack.empty()) + { + const Entry currentEntry = entryStack.top(); + entryStack.pop(); + + Visitor::Result result = AZ::Success(); + + AZStd::visit( + [&visitor, &entryStack, &entryCountStack, &result, lifetime](auto&& arg) + { + using Alternative = AZStd::decay_t; + if constexpr (AZStd::is_same_v) + { + const rapidjson::Value& currentValue = *arg; + if (!entryCountStack.empty()) + { + ++entryCountStack.top(); + } + + switch (currentValue.GetType()) + { + case rapidjson::kNullType: + result = visitor.Null(); + break; + case rapidjson::kFalseType: + result = visitor.Bool(false); + break; + case rapidjson::kTrueType: + result = visitor.Bool(true); + break; + case rapidjson::kObjectType: + entryStack.push(EndObjectMarker{}); + entryCountStack.push(0); + result = visitor.StartObject(); + for (auto it = currentValue.MemberEnd(); it != currentValue.MemberBegin(); --it) + { + auto entry = (it - 1); + const AZStd::string_view key( + entry->name.GetString(), aznumeric_cast(entry->name.GetStringLength())); + entryStack.push(&entry->value); + entryStack.push(key); + } + break; + case rapidjson::kArrayType: + entryStack.push(EndArrayMarker{}); + entryCountStack.push(0); + result = visitor.StartArray(); + for (auto it = currentValue.End(); it != currentValue.Begin(); --it) + { + auto entry = (it - 1); + entryStack.push(entry); + } + break; + case rapidjson::kStringType: + result = visitor.String( + AZStd::string_view(currentValue.GetString(), aznumeric_cast(currentValue.GetStringLength())), + lifetime); + break; + case rapidjson::kNumberType: + if (currentValue.IsFloat() || currentValue.IsDouble()) + { + result = visitor.Double(currentValue.GetDouble()); + } + else if (currentValue.IsInt64() || currentValue.IsInt()) + { + result = visitor.Int64(currentValue.GetInt64()); + } + else + { + result = visitor.Uint64(currentValue.GetUint64()); + } + break; + default: + result = AZ::Failure(VisitorError(VisitorErrorCode::InvalidData, "Value with invalid type specified")); + } + } + else if constexpr (AZStd::is_same_v) + { + result = visitor.EndArray(entryCountStack.top()); + entryCountStack.pop(); + } + else if constexpr (AZStd::is_same_v) + { + result = visitor.EndObject(entryCountStack.top()); + entryCountStack.pop(); + } + else if constexpr (AZStd::is_same_v) + { + if (visitor.SupportsRawKeys()) + { + visitor.RawKey(arg, lifetime); + } + else + { + visitor.Key(AZ::Name(arg)); + } + } + }, + currentEntry); + + if (!result.IsSuccess()) + { + return result; + } + } + + return AZ::Success(); + } +} // namespace AZ::Dom::Json diff --git a/Code/Framework/AzCore/AzCore/DOM/Backends/JSON/JsonSerializationUtils.h b/Code/Framework/AzCore/AzCore/DOM/Backends/JSON/JsonSerializationUtils.h new file mode 100644 index 0000000000..af0955dcfe --- /dev/null +++ b/Code/Framework/AzCore/AzCore/DOM/Backends/JSON/JsonSerializationUtils.h @@ -0,0 +1,256 @@ +/* + * Copyright (c) Contributors to the Open 3D Engine Project. + * For complete copyright and license terms please see the LICENSE at the root of this distribution. + * + * SPDX-License-Identifier: Apache-2.0 OR MIT + * + */ + +#pragma once + +#include +#include +#include +#include +#include +#include +#include +#include + +namespace AZ::Dom::Json +{ + //! Specifies how JSON should be formatted when serialized. + enum class OutputFormatting + { + MinifiedJson, //!< Formats JSON in compact minified form, focusing on minimizing output size. + PrettyPrintedJson, //!< Formats JSON in a pretty printed form, focusing on legibility to readers. + }; + + //! Specifies parsing behavior when deserializing JSON. + enum class ParseFlags : int + { + Null = 0, + StopWhenDone = rapidjson::kParseStopWhenDoneFlag, + FullFloatingPointPrecision = rapidjson::kParseFullPrecisionFlag, + ParseComments = rapidjson::kParseCommentsFlag, + ParseNumbersAsStrings = rapidjson::kParseNumbersAsStringsFlag, + ParseTrailingCommas = rapidjson::kParseTrailingCommasFlag, + ParseNanAndInfinity = rapidjson::kParseNanAndInfFlag, + ParseEscapedApostrophies = rapidjson::kParseEscapedApostropheFlag, + }; + + AZ_DEFINE_ENUM_BITWISE_OPERATORS(ParseFlags); + + //! Visitor that feeds into a rapidjson::Value + class RapidJsonValueWriter final : public Visitor + { + public: + RapidJsonValueWriter(rapidjson::Value& outputValue, rapidjson::Value::AllocatorType& allocator); + + VisitorFlags GetVisitorFlags() const override; + Result Null() override; + Result Bool(bool value) override; + Result Int64(AZ::s64 value) override; + Result Uint64(AZ::u64 value) override; + Result Double(double value) override; + + Result String(AZStd::string_view value, Lifetime lifetime) override; + Result StartObject() override; + Result EndObject(AZ::u64 attributeCount) override; + Result Key(AZ::Name key) override; + Result RawKey(AZStd::string_view key, Lifetime lifetime) override; + Result StartArray() override; + Result EndArray(AZ::u64 elementCount) override; + + private: + Result FinishWrite(); + rapidjson::Value& CurrentValue(); + + struct ValueInfo + { + ValueInfo(bool isObject, rapidjson::Value& container); + + rapidjson::Value m_key; + rapidjson::Value m_value; + rapidjson::Value& m_container; + AZ::u64 m_entryCount = 0; + bool m_isObject; + }; + + rapidjson::Value& m_result; + rapidjson::Value::AllocatorType& m_allocator; + AZStd::deque m_entryStack; + }; + + //! Handler for a rapidjson::Reader that translates reads into an AZ::Dom::Visitor + struct RapidJsonReadHandler + { + public: + RapidJsonReadHandler(Visitor* visitor, Lifetime stringLifetime); + + bool Null(); + bool Bool(bool b); + bool Int(int i); + bool Uint(unsigned i); + bool Int64(int64_t i); + bool Uint64(uint64_t i); + bool Double(double d); + bool RawNumber(const char* str, rapidjson::SizeType length, bool copy); + bool String(const char* str, rapidjson::SizeType length, bool copy); + bool StartObject(); + bool Key(const char* str, rapidjson::SizeType length, bool copy); + bool EndObject(rapidjson::SizeType memberCount); + bool StartArray(); + bool EndArray(rapidjson::SizeType elementCount); + Visitor::Result&& TakeOutcome(); + + private: + bool CheckResult(Visitor::Result result); + + Visitor::Result m_outcome; + Visitor* m_visitor; + Lifetime m_stringLifetime; + }; + + //! rapidjson stream wrapper for AZStd::string suitable for in-situ parsing + //! Faster than rapidjson::MemoryStream for reading from AZStd::string / AZStd::string_view (because it requires a null terminator) + //! \note This needs to be inlined for performance reasons. + struct NullDelimitedStringStream + { + using Ch = char; //(buffer.data()); + m_begin = m_cursor; + } + + AZ_FORCE_INLINE char Peek() const + { + return *m_cursor; + } + + AZ_FORCE_INLINE char Take() + { + return *m_cursor++; + } + + AZ_FORCE_INLINE size_t Tell() const + { + return static_cast(m_cursor - m_begin); + } + + AZ_FORCE_INLINE char* PutBegin() + { + m_write = m_cursor; + return m_cursor; + } + + AZ_FORCE_INLINE void Put(char c) + { + (*m_write++) = c; + } + + AZ_FORCE_INLINE void Flush() + { + } + + AZ_FORCE_INLINE size_t PutEnd(char* begin) + { + return m_write - begin; + } + + AZ_FORCE_INLINE const char* Peek4() const + { + AZ_Assert(false, "Not implemented, encoding is hard-coded to UTF-8"); + return m_cursor; + } + + char* m_cursor; //!< Current read position. + char* m_write; //!< Current write position. + const char* m_begin; //!< Head of string. + }; + + //! Creates a Visitor that will write serialized JSON to the specified stream. + //! \param stream The stream the visitor will write to. + //! \param format The format to write in. + //! \return A Visitor that will write to stream when visited. + AZStd::unique_ptr CreateJsonStreamWriter( + AZ::IO::GenericStream& stream, OutputFormatting format = OutputFormatting::PrettyPrintedJson); + //! Reads serialized JSON from a string and applies it to a visitor. + //! \param buffer The UTF-8 serialized JSON to read. + //! \param lifetime Specifies the lifetime of the specified buffer. If the string specified by buffer might be deallocated, + //! ensure Lifetime::Temporary is specified. + //! \param visitor The visitor to visit with the JSON buffer's contents. + //! \param parseFlags (template) Settings for adjusting parser behavior. + //! \return The aggregate result specifying whether the visitor operations were successful. + template + Visitor::Result VisitSerializedJson(AZStd::string_view buffer, Lifetime lifetime, Visitor& visitor); + + //! Reads serialized JSON from a string in-place and applies it to a visitor. + //! \param buffer The UTF-8 serialized JSON to read. This buffer will be modified as part of the deserialization process to + //! apply null terminators. + //! \param visitor The visitor to visit with the JSON buffer's contents. The strings provided to the visitor will only + //! be valid for the lifetime of buffer. + //! \param parseFlags (template) Settings for adjusting parser behavior. + //! \return The aggregate result specifying whether the visitor operations were successful. + template + Visitor::Result VisitSerializedJsonInPlace(char* buffer, Visitor& visitor); + + //! Takes a visitor specified by a callback and produces a rapidjson::Document. + //! \param writeCallback A callback specifying a visitor to accept to build the resulting document. + //! \return An outcome with either the rapidjson::Document or an error message. + AZ::Outcome WriteToRapidJsonDocument(Backend::WriteCallback writeCallback); + //! Takes a visitor specified by a callback and reads them into a rapidjson::Value. + //! \param value The value to read into, its contents will be overridden. + //! \param allocator The allocator to use when performing rapidjson allocations (generally provded by the rapidjson::Document). + //! \param writeCallback A callback specifying a visitor to accept to build the resulting document. + //! \return An outcome with either the rapidjson::Document or an error message. + Visitor::Result WriteToRapidJsonValue( + rapidjson::Value& value, rapidjson::Value::AllocatorType& allocator, Backend::WriteCallback writeCallback); + //! Accepts a visitor with the contents of a rapidjson::Value. + //! \param value The rapidjson::Value to apply to visitor. + //! \param visitor The visitor to receive the contents of value. + //! \param lifetime The lifetime to specify for visiting strings. If the rapidjson::Value might be destroyed or changed + //! before the visitor is finished using these values, Lifetime::Temporary should be specified. + //! \return The aggregate result specifying whether the visitor operations were successful. + Visitor::Result VisitRapidJsonValue(const rapidjson::Value& value, Visitor& visitor, Lifetime lifetime); + + template + Visitor::Result VisitSerializedJson(AZStd::string_view buffer, Lifetime lifetime, Visitor& visitor) + { + rapidjson::Reader reader; + RapidJsonReadHandler handler(&visitor, lifetime); + + // If the string is null terminated, we can use the faster AzStringStream path - otherwise we fall back on rapidjson::MemoryStream + if (buffer.data()[buffer.size()] == '\0') + { + NullDelimitedStringStream stream(buffer); + reader.Parse(parseFlags)>(stream, handler); + } + else + { + rapidjson::MemoryStream stream(buffer.data(), buffer.size()); + reader.Parse(parseFlags)>(stream, handler); + } + return handler.TakeOutcome(); + } + + template + Visitor::Result VisitSerializedJsonInPlace(char* buffer, Visitor& visitor) + { + rapidjson::Reader reader; + NullDelimitedStringStream stream(buffer); + RapidJsonReadHandler handler(&visitor, Lifetime::Persistent); + + reader.Parse(parseFlags) | rapidjson::kParseInsituFlag>(stream, handler); + return handler.TakeOutcome(); + } +} // namespace AZ::Dom::Json diff --git a/Code/Framework/AzCore/AzCore/DOM/DomBackend.cpp b/Code/Framework/AzCore/AzCore/DOM/DomBackend.cpp new file mode 100644 index 0000000000..b29c0be231 --- /dev/null +++ b/Code/Framework/AzCore/AzCore/DOM/DomBackend.cpp @@ -0,0 +1,17 @@ +/* + * Copyright (c) Contributors to the Open 3D Engine Project. + * For complete copyright and license terms please see the LICENSE at the root of this distribution. + * + * SPDX-License-Identifier: Apache-2.0 OR MIT + * + */ + +#include + +namespace AZ::Dom +{ + Visitor::Result Backend::ReadFromBufferInPlace(char* buffer, AZStd::optional size, Visitor& visitor) + { + return ReadFromBuffer(buffer, size.value_or(strlen(buffer)), AZ::Dom::Lifetime::Persistent, visitor); + } +} // namespace AZ::Dom diff --git a/Code/Framework/AzCore/AzCore/DOM/DomBackend.h b/Code/Framework/AzCore/AzCore/DOM/DomBackend.h new file mode 100644 index 0000000000..2e4ccf8f3e --- /dev/null +++ b/Code/Framework/AzCore/AzCore/DOM/DomBackend.h @@ -0,0 +1,44 @@ +/* + * Copyright (c) Contributors to the Open 3D Engine Project. + * For complete copyright and license terms please see the LICENSE at the root of this distribution. + * + * SPDX-License-Identifier: Apache-2.0 OR MIT + * + */ + +#pragma once + +#include +#include +#include +#include +#include +#include + +namespace AZ::Dom +{ + //! Backends are registered centrally and used to transition DOM formats to and from a textual format. + class Backend + { + public: + virtual ~Backend() = default; + + //! Attempt to read this format from the given buffer into the target Visitor. + virtual Visitor::Result ReadFromBuffer( + const char* buffer, size_t size, AZ::Dom::Lifetime lifetime, Visitor& visitor) = 0; + //! Attempt to read this format from a mutable string into the target Visitor. This enables some backends to + //! parse without making additional string allocations. + //! This string must be null terminated. + //! This string may be modified and read in place without being copied, so when calling this please ensure that: + //! - The string won't be deallocated until the visitor no longer needs the values and + //! - The string is safe to modify in place. + //! The base implementation simply calls ReadFromBuffer. + virtual Visitor::Result ReadFromBufferInPlace(char* buffer, AZStd::optional size, Visitor& visitor); + + //! A callback that accepts a Visitor, making DOM calls to inform the serializer, and returns an + //! aggregate error code to indicate whether or not the operation succeeded. + using WriteCallback = AZStd::function; + //! Attempt to write a value to the specified string using a write callback. + virtual Visitor::Result WriteToBuffer(AZStd::string& buffer, WriteCallback callback) = 0; + }; +} // namespace AZ::Dom diff --git a/Code/Framework/AzCore/AzCore/DOM/DomUtils.cpp b/Code/Framework/AzCore/AzCore/DOM/DomUtils.cpp new file mode 100644 index 0000000000..9751b9cecc --- /dev/null +++ b/Code/Framework/AzCore/AzCore/DOM/DomUtils.cpp @@ -0,0 +1,24 @@ +/* + * Copyright (c) Contributors to the Open 3D Engine Project. + * For complete copyright and license terms please see the LICENSE at the root of this distribution. + * + * SPDX-License-Identifier: Apache-2.0 OR MIT + * + */ + +#include + +#include + +namespace AZ::Dom::Utils +{ + Visitor::Result ReadFromString(Backend& backend, AZStd::string_view string, AZ::Dom::Lifetime lifetime, Visitor& visitor) + { + return backend.ReadFromBuffer(string.data(), string.length(), lifetime, visitor); + } + + Visitor::Result ReadFromStringInPlace(Backend& backend, AZStd::string& string, Visitor& visitor) + { + return backend.ReadFromBufferInPlace(string.data(), string.size(), visitor); + } +} diff --git a/Code/Framework/AzCore/AzCore/DOM/DomUtils.h b/Code/Framework/AzCore/AzCore/DOM/DomUtils.h new file mode 100644 index 0000000000..84a6eb5687 --- /dev/null +++ b/Code/Framework/AzCore/AzCore/DOM/DomUtils.h @@ -0,0 +1,17 @@ +/* + * Copyright (c) Contributors to the Open 3D Engine Project. + * For complete copyright and license terms please see the LICENSE at the root of this distribution. + * + * SPDX-License-Identifier: Apache-2.0 OR MIT + * + */ + +#pragma once + +#include + +namespace AZ::Dom::Utils +{ + Visitor::Result ReadFromString(Backend& backend, AZStd::string_view string, AZ::Dom::Lifetime lifetime, Visitor& visitor); + Visitor::Result ReadFromStringInPlace(Backend& backend, AZStd::string& string, Visitor& visitor); +} // namespace AZ::Dom::Utils diff --git a/Code/Framework/AzCore/AzCore/DOM/DomVisitor.cpp b/Code/Framework/AzCore/AzCore/DOM/DomVisitor.cpp index 5d66bb6ac5..ad314da385 100644 --- a/Code/Framework/AzCore/AzCore/DOM/DomVisitor.cpp +++ b/Code/Framework/AzCore/AzCore/DOM/DomVisitor.cpp @@ -8,7 +8,7 @@ #include -namespace AZ::DOM +namespace AZ::Dom { const char* VisitorError::CodeToString(VisitorErrorCode code) { @@ -236,4 +236,4 @@ namespace AZ::DOM { return (GetVisitorFlags() & VisitorFlags::SupportsOpaqueValues) != VisitorFlags::Null; } -} // namespace AZ::DOM +} // namespace AZ::Dom diff --git a/Code/Framework/AzCore/AzCore/DOM/DomVisitor.h b/Code/Framework/AzCore/AzCore/DOM/DomVisitor.h index 584cfce4ed..bbe78131c3 100644 --- a/Code/Framework/AzCore/AzCore/DOM/DomVisitor.h +++ b/Code/Framework/AzCore/AzCore/DOM/DomVisitor.h @@ -13,11 +13,11 @@ #include #include -namespace AZ::DOM +namespace AZ::Dom { // // Lifetime enum - // + // //! Specifies the period in which a reference value will still be alive and safe to read. enum class Lifetime { @@ -30,7 +30,7 @@ namespace AZ::DOM // // VisitorErrorCode enum - // + // //! Error code specifying the reason a Visitor operation failed. enum class VisitorErrorCode { @@ -75,7 +75,7 @@ namespace AZ::DOM }; //! A type alias for opaque DOM types that aren't meant to be serializable. - //! /see VisitorInterface::OpaqueValue + //! \see VisitorInterface::OpaqueValue using OpaqueType = AZStd::any; // @@ -116,7 +116,7 @@ namespace AZ::DOM //! - \ref Double: 64 bit double precision float //! - \ref Null: sentinel "empty" type with no value representation //! - \ref String: UTF8 encoded string - //! - \ref Object: an ordered container of key/value pairs where keys are AZ::Names and values may be any DOM type + //! - \ref Object: an ordered container of key/value pairs where keys are \ref AZ::Name and values may be any DOM type //! (including Object) //! - \ref Array: an ordered container of values, in which values are any DOM value type (including Array) //! - \ref Node: a container @@ -144,17 +144,17 @@ namespace AZ::DOM //! Raw (\see VisitorFlags::SupportsRawValues) and opaque values (\see VisitorFlags::SupportsOpaqueValues) //! are disallowed by default, as their handling is intended to be implementation-specific. virtual VisitorFlags GetVisitorFlags() const; - //! /see VisitorFlags::SupportsRawValues + //! \see VisitorFlags::SupportsRawValues bool SupportsRawValues() const; - //! /see VisitorFlags::SupportsRawKeys + //! \see VisitorFlags::SupportsRawKeys bool SupportsRawKeys() const; - //! /see VisitorFlags::SupportsObjects + //! \see VisitorFlags::SupportsObjects bool SupportsObjects() const; - //! /see VisitorFlags::SupportsArrays + //! \see VisitorFlags::SupportsArrays bool SupportsArrays() const; - //! /see VisitorFlags::SupportsNodes + //! \see VisitorFlags::SupportsNodes bool SupportsNodes() const; - //! /see VisitorFlags::SupportsOpaqueValues + //! \see VisitorFlags::SupportsOpaqueValues bool SupportsOpaqueValues() const; //! Operates on an empty null value. @@ -231,7 +231,8 @@ namespace AZ::DOM static Result VisitorFailure(VisitorErrorCode code, AZStd::string additionalInfo); //! Helper method, constructs a failure \ref Result with the specified error. static Result VisitorFailure(VisitorError error); + //! Helper method, constructs a success \ref Result. static Result VisitorSuccess(); }; -} // namespace AZ::DOM +} // namespace AZ::Dom diff --git a/Code/Framework/AzCore/AzCore/Debug/AssetTracking.cpp b/Code/Framework/AzCore/AzCore/Debug/AssetTracking.cpp deleted file mode 100644 index 3cb895c992..0000000000 --- a/Code/Framework/AzCore/AzCore/Debug/AssetTracking.cpp +++ /dev/null @@ -1,336 +0,0 @@ -/* - * Copyright (c) Contributors to the Open 3D Engine Project. - * For complete copyright and license terms please see the LICENSE at the root of this distribution. - * - * SPDX-License-Identifier: Apache-2.0 OR MIT - * - */ - -#include "AssetTracking.h" - -#include -#include -#include -#include -#include - -namespace AZ -{ - namespace Debug - { - namespace - { - struct AssetTreeNode; - - // Per-thread data that needs to be stored. - struct ThreadData - { - AZStd::vector m_currentAssetStack; - }; - - // Access thread data through a virtual function to ensure that the same thread-local data is being shared across DLLs. - // Otherwise, the thread_local variables are replicated across DLLs that link the AzCore library, and you'll get a - // different version in each module. - class ThreadDataProvider - { - public: - virtual ThreadData& GetThreadData() = 0; - }; - } - - class AssetTrackingImpl final : - public ThreadDataProvider - { - public: - AZ_TYPE_INFO(AssetTrackingImpl, "{01E2A099-3523-40BE-80E0-E0ADD861BEE1}"); - AZ_CLASS_ALLOCATOR(AssetTrackingImpl, OSAllocator, 0); - - AssetTrackingImpl(AssetTreeBase* assetTree, AssetAllocationTableBase* allocationTable); - ~AssetTrackingImpl(); - - void AssetBegin(const char* id, const char* file, int line); - void AssetAttach(void* otherAllocation, const char* file, int line); - void AssetEnd(); - - ThreadData& GetThreadData() override; - - private: - static EnvironmentVariable& GetEnvironmentVariable(); - static AssetTrackingImpl* GetSharedInstance(); - static ThreadData& GetSharedThreadData(); - - using PrimaryAssets = AZStd::unordered_map, AZStd::equal_to, AZStdAssetTrackingAllocator>; - using ThreadData = ThreadData; - using mutex_type = AZStd::mutex; - using lock_type = AZStd::lock_guard; - - mutex_type m_mutex; - PrimaryAssets m_primaryAssets; - AssetTreeNodeBase* m_assetRoot = nullptr; - AssetAllocationTableBase* m_allocationTable = nullptr; - bool m_performingAnalysis = false; - - friend class AssetTracking; - friend class AssetTracking::Scope; - }; - - } -} - -/////////////////////////////////////////////////////////////////////////////// -// AssetTrackingImpl methods -/////////////////////////////////////////////////////////////////////////////// - -namespace AZ -{ - namespace Debug - { - AssetTrackingImpl::AssetTrackingImpl(AssetTreeBase* assetTree, AssetAllocationTableBase* allocationTable) : - m_assetRoot(&assetTree->GetRoot()), - m_allocationTable(allocationTable) - { - AZ_Assert(!GetSharedInstance(), "Only one AssetTrackingImpl can exist!"); - - GetEnvironmentVariable().Set(this); - AllocatorManager::Instance().EnterProfilingMode(); - } - - AssetTrackingImpl::~AssetTrackingImpl() - { - AllocatorManager::Instance().ExitProfilingMode(); - GetEnvironmentVariable().Reset(); - } - - void AssetTrackingImpl::AssetBegin(const char* id, const char* file, int line) - { - // In the future it may be desirable to organize assets based on where in code the asset was entered into. - // For now these are ignored. - AZ_UNUSED(file); - AZ_UNUSED(line); - - using namespace Internal; - - AssetTrackingId assetId(id); - auto& threadData = GetSharedThreadData(); - AssetTreeNodeBase* parentAsset = threadData.m_currentAssetStack.empty() ? nullptr : threadData.m_currentAssetStack.back(); - AssetTreeNodeBase* childAsset; - AssetPrimaryInfo* assetPrimaryInfo; - - if (!parentAsset) - { - parentAsset = m_assetRoot; - } - - { - lock_type lock(m_mutex); - - // Locate or create the primary record for this asset - auto primaryItr = m_primaryAssets.find(assetId); - - if (primaryItr != m_primaryAssets.end()) - { - assetPrimaryInfo = &primaryItr->second; - } - else - { - auto insertResult = m_primaryAssets.emplace(assetId, AssetPrimaryInfo()); - assetPrimaryInfo = &insertResult.first->second; - assetPrimaryInfo->m_id = &insertResult.first->first; - } - - // Add this asset to the stack for this thread's context - childAsset = parentAsset->FindOrAddChild(assetId, assetPrimaryInfo); - } - - threadData.m_currentAssetStack.push_back(childAsset); - } - - void AssetTrackingImpl::AssetAttach(void* otherAllocation, const char* file, int line) - { - AZ_UNUSED(file); - AZ_UNUSED(line); - - using namespace Internal; - - AssetTreeNodeBase* assetInfo = m_allocationTable->FindAllocation(otherAllocation); - - // We will push back a nullptr if there is no asset, this is necessary to balance the call to AssetEnd() - GetSharedThreadData().m_currentAssetStack.push_back(assetInfo); - } - - void AssetTrackingImpl::AssetEnd() - { - AZ_Assert(!GetSharedThreadData().m_currentAssetStack.empty(), "AssetEnd() called without matching AssetBegin() or AssetAttach. Use the AZ_ASSET_NAMED_SCOPE and AZ_ASSET_ATTACH_TO_SCOPE macros to avoid this!"); - GetSharedThreadData().m_currentAssetStack.pop_back(); - } - - AssetTrackingImpl* AssetTrackingImpl::GetSharedInstance() - { - auto environmentVariable = GetEnvironmentVariable(); - - if(environmentVariable) - { - return *environmentVariable; - } - - return nullptr; - } - - ThreadData& AssetTrackingImpl::GetSharedThreadData() - { - // Cast to the base type so our virtual call doesn't get optimized away. We require GetThreadData() to be executed in the same DLL every time. - return static_cast(GetSharedInstance())->GetThreadData(); - } - - AssetTrackingImpl::ThreadData& AssetTrackingImpl::GetThreadData() - { - static thread_local ThreadData* data = nullptr; - static thread_local typename AZStd::aligned_storage_t storage; - - if (!data) - { - data = new (&storage) ThreadData; - } - - return *data; - } - - EnvironmentVariable& AssetTrackingImpl::GetEnvironmentVariable() - { - static EnvironmentVariable assetTrackingImpl = Environment::CreateVariable(AzTypeInfo::Name()); - - return assetTrackingImpl; - } - - /////////////////////////////////////////////////////////////////////////////// - // AssetTracking::Scope functions - /////////////////////////////////////////////////////////////////////////////// - - AssetTracking::Scope AssetTracking::Scope::ScopeFromAssetId(const char* file, int line, const char* fmt, ...) - { - if (auto impl = AssetTrackingImpl::GetSharedInstance()) - { - static const int BUFFER_SIZE = 1024; - - char buffer[BUFFER_SIZE]; - va_list args; - va_start(args, fmt); - azvsnprintf(buffer, BUFFER_SIZE, fmt, args); - va_end(args); - - impl->AssetBegin(buffer, file, line); - } - - return Scope(); - } - - AssetTracking::Scope AssetTracking::Scope::ScopeFromAttachment(void* attachTo, const char* file, int line) - { - if (auto impl = AssetTrackingImpl::GetSharedInstance()) - { - impl->AssetAttach(attachTo, file, line); - } - - return Scope(); - } - - AssetTracking::Scope::~Scope() - { - if (auto impl = AssetTrackingImpl::GetSharedInstance()) - { - impl->AssetEnd(); - } - } - - AssetTracking::Scope::Scope() - { - } - - /////////////////////////////////////////////////////////////////////////////// - // AssetTracking functions - /////////////////////////////////////////////////////////////////////////////// - - void AssetTracking::EnterScopeByAssetId(const char* file, int line, const char* fmt, ...) - { - if (auto impl = AssetTrackingImpl::GetSharedInstance()) - { - static const int BUFFER_SIZE = 1024; - - char buffer[BUFFER_SIZE]; - va_list args; - va_start(args, fmt); - azvsnprintf(buffer, BUFFER_SIZE, fmt, args); - va_end(args); - - impl->AssetBegin(buffer, file, line); - } - } - - void AssetTracking::EnterScopeByAttachment(void* attachTo, const char* file, int line) - { - if (auto impl = AssetTrackingImpl::GetSharedInstance()) - { - impl->AssetAttach(attachTo, file, line); - } - } - - void AssetTracking::ExitScope() - { - if (auto impl = AssetTrackingImpl::GetSharedInstance()) - { - impl->AssetEnd(); - } - } - - const char* AssetTracking::GetDebugScope() - { - // Output debug information about the current asset scope in the current thread. - // Do not use in production code. -#ifndef RELEASE - static const int BUFFER_SIZE = 1024; - static char buffer[BUFFER_SIZE]; - const auto& assetStack = AssetTrackingImpl::GetSharedInstance()->GetThreadData().m_currentAssetStack; - - if (assetStack.empty()) - { - azsnprintf(buffer, BUFFER_SIZE, ""); - } - else - { - char* pos = buffer; - for (auto itr = assetStack.rbegin(); itr != assetStack.rend(); ++itr) - { - pos += azsnprintf(pos, BUFFER_SIZE - (pos - buffer), "%s\n", (*itr)->GetAssetPrimaryInfo()->m_id->m_id.c_str()); - - if (pos >= buffer + BUFFER_SIZE) - { - break; - } - } - } - - return buffer; -#else - return ""; -#endif - } - - AssetTracking::AssetTracking(AssetTreeBase* assetTree, AssetAllocationTableBase* allocationTable) - { - m_impl.reset(aznew AssetTrackingImpl(assetTree, allocationTable)); - } - - AssetTracking::~AssetTracking() - { - } - - AssetTreeNodeBase* AssetTracking::GetCurrentThreadAsset() const - { - const auto& assetStack = m_impl->GetThreadData().m_currentAssetStack; - AssetTreeNodeBase* result = assetStack.empty() ? nullptr : assetStack.back(); - - return result; - } - } - -} // namespace AzFramework diff --git a/Code/Framework/AzCore/AzCore/Debug/AssetTracking.h b/Code/Framework/AzCore/AzCore/Debug/AssetTracking.h deleted file mode 100644 index 615634c05a..0000000000 --- a/Code/Framework/AzCore/AzCore/Debug/AssetTracking.h +++ /dev/null @@ -1,131 +0,0 @@ -/* - * Copyright (c) Contributors to the Open 3D Engine Project. - * For complete copyright and license terms please see the LICENSE at the root of this distribution. - * - * SPDX-License-Identifier: Apache-2.0 OR MIT - * - */ - -#pragma once - -#include -#include -#include - -#ifndef AZ_TRACK_ASSET_SCOPES -// You may manually uncomment this to enable asset tracking. -//# define AZ_TRACK_ASSET_SCOPES -#endif - -#if !defined(AZ_TRACK_ASSET_SCOPES) -// Default to enabling asset tracking when memory tracking is enabled -# define AZ_TRACK_ASSET_SCOPES -#endif - - -#ifdef AZ_TRACK_ASSET_SCOPES -#define AZ_ASSET_SCOPE_VARIABLE_NAME(line) AZ_JOIN(_az_assettracking_scope_, line) - -/////////////////////////////////////////////////////////////////////////////// -// Preferred macros to use at the top of a scope you want to to track asset memory for. -/////////////////////////////////////////////////////////////////////////////// - -// Creates a new scope with a name, usually the name of an asset being loaded. (This may be a format-string, e.g. "Foo: %s", bar.c_str()) -# define AZ_ASSET_NAMED_SCOPE(...) AZ::Debug::AssetTracking::Scope AZ_ASSET_SCOPE_VARIABLE_NAME(__LINE__) (AZ::Debug::AssetTracking::Scope::ScopeFromAssetId(__FILE__, __LINE__, __VA_ARGS__)) - -// Attempts to enter an existing scope that already owns some other allocation. -# define AZ_ASSET_ATTACH_TO_SCOPE(other) AZ::Debug::AssetTracking::Scope AZ_ASSET_SCOPE_VARIABLE_NAME(__LINE__) (AZ::Debug::AssetTracking::Scope::ScopeFromAttachment((other), __FILE__, __LINE__)) - -/////////////////////////////////////////////////////////////////////////////// -// Optional macros to manually enter and exit a scope. -// It is the responsibility of the user to make sure every call to AZ_ASSET_ENTER_SCOPE_* is matched by a corresponding call to AZ_ASSET_EXIT_SCOPE. -/////////////////////////////////////////////////////////////////////////////// -# define AZ_ASSET_ENTER_SCOPE_BY_ASSET_ID(...) AZ::Debug::AssetTracking::EnterScopeByAssetId(__FILE__, __LINE__, __VA_ARGS__) -# define AZ_ASSET_ENTER_SCOPE_BY_ATTACHMENT(other) AZ::Debug::AssetTracking::EnterScopeByAttachment((other), __FILE__, __LINE__) -# define AZ_ASSET_EXIT_SCOPE AZ::Debug::AssetTracking::ExitScope() - -#else -# define AZ_ASSET_NAMED_SCOPE(...) (void)0 -# define AZ_ASSET_ATTACH_TO_SCOPE(other) (void)0 - -# define AZ_ASSET_ENTER_SCOPE_BY_ASSET_ID(...) (void)0 -# define AZ_ASSET_ENTER_SCOPE_BY_ATTACHMENT(other) (void)0 -# define AZ_ASSET_EXIT_SCOPE (void)0 - -#endif - -namespace AZ -{ - class ReflectContext; - - namespace Debug - { - class AssetTrackingImpl; - class AssetTreeBase; - class AssetTreeNodeBase; - class AssetAllocationTableBase; - - class AssetTracking - { - public: - AZ_TYPE_INFO(AssetTracking, "{D4335180-09A2-415A-8B50-9B734E7CE1E6}"); - AZ_CLASS_ALLOCATOR(AssetTracking, OSAllocator, 0); - - // Provide RAII method for entering and exiting scopes. - // Generally you will want to use the macros at the top of this file rather than instantiating this object directly. - class Scope - { - public: - static Scope ScopeFromAssetId(const char* file, int line, const char* fmt, ...); - static Scope ScopeFromAttachment(void* attachTo, const char* file, int line); - - Scope(Scope&&) = default; - ~Scope(); - - private: - Scope(); - }; - - // Generally you will want to use the macros at the top of this file rather than calling these functions directly. - static void EnterScopeByAssetId(const char* file, int line, const char* fmt, ...); - static void EnterScopeByAttachment(void* attachTo, const char* file, int line); - static void ExitScope(); - static const char* GetDebugScope(); - - AssetTracking(AssetTreeBase* assetTree, AssetAllocationTableBase* allocationTable); - ~AssetTracking(); - - AssetTreeNodeBase* GetCurrentThreadAsset() const; - - private: - AZStd::unique_ptr m_impl; - }; - - // An EBus processing policy that attempts to attach to an existing scope before calling a handler. - // - // Use this on EBuses where you want the callees to track asset memory during their event handlers. - // This will work so long as the callees were themselves allocated inside an existing asset scope. - // - // May be added to an existing EBus with the following code: - // using EventProcessingPolicy = Debug::AssetTrackingEventProcessingPolicy; - // - template - struct AssetTrackingEventProcessingPolicy - { - template - static void CallResult(Results& results, Function&& func, Interface&& iface, InputArgs&&... args) - { - AZ_ASSET_ATTACH_TO_SCOPE(iface); - Parent::CallResult(results, AZStd::forward(func), AZStd::forward(iface), AZStd::forward(args)...); - } - - template - static void Call(Function&& func, Interface&& iface, InputArgs&&... args) - { - AZ_ASSET_ATTACH_TO_SCOPE(iface); - Parent::Call(AZStd::forward(func), AZStd::forward(iface), AZStd::forward(args)...); - } - }; - } - -} // namespace AzFramework diff --git a/Code/Framework/AzCore/AzCore/Debug/AssetTrackingTypes.h b/Code/Framework/AzCore/AzCore/Debug/AssetTrackingTypes.h deleted file mode 100644 index f538c516c3..0000000000 --- a/Code/Framework/AzCore/AzCore/Debug/AssetTrackingTypes.h +++ /dev/null @@ -1,120 +0,0 @@ -/* - * Copyright (c) Contributors to the Open 3D Engine Project. - * For complete copyright and license terms please see the LICENSE at the root of this distribution. - * - * SPDX-License-Identifier: Apache-2.0 OR MIT - * - */ - -#pragma once - -#include -#include -#include - -namespace AZ -{ - namespace Debug - { - struct AssetTrackingId; - } -} - -namespace AZStd -{ - // Declare hash specializations for types that need them; implementations will have to come after the classes are fully defined - template<> - struct hash - { - size_t operator()(const AZ::Debug::AssetTrackingId& id) const; - }; -} - -namespace AZ -{ - namespace Debug - { - class AssetTrackingImpl; - - // Custom allocator for the Analyzer that doesn't go through profiling tools and cannot be overridden - class AssetTrackingAllocator : public AZ::SimpleSchemaAllocator - { - public: - AZ_TYPE_INFO(AssetTrackingAllocator, "{F6C08E92-559C-4153-9620-6A8491F78F10}"); - - using Base = AZ::SimpleSchemaAllocator; - using Descriptor = Base::Descriptor; - - AssetTrackingAllocator() - : Base("AssetTrackingAllocator", "Allocator for the AssetTracking") - { - DisableOverriding(); - } - }; - - using AZStdAssetTrackingAllocator = AZ::AZStdAlloc; - using AssetTrackingString = AZStd::basic_string, AZStdAssetTrackingAllocator>; - - template - using AssetTrackingMap = AZStd::unordered_map, AZStd::equal_to, AZStdAssetTrackingAllocator>; - - - // ID for an asset that is hashable. - // Currently only contains one string identifier, but we may want to store a more sophisticated ID in the future. - struct AssetTrackingId - { - AssetTrackingId(const char* id) : m_id(id) - { - } - - bool operator==(const AssetTrackingId& other) const - { - return m_id == other.m_id; - } - - AssetTrackingString m_id; - }; - - // Primary information about an asset. - // Currently just contains the ID of the asset, but in the future may carry additional information about that asset (such as where in code it was initialized). - struct AssetPrimaryInfo - { - const AssetTrackingId* m_id; - }; - - // Base class for a node in the asset tree. Implemented by the template AssetTreeNode<>. - class AssetTreeNodeBase - { - public: - virtual ~AssetTreeNodeBase() = default; - virtual const AssetPrimaryInfo* GetAssetPrimaryInfo() const = 0; - virtual AssetTreeNodeBase* FindOrAddChild(const AssetTrackingId& id, const AssetPrimaryInfo* info) = 0; - }; - - // Base class for an asset tree. Implemented by the template AssetTree<>. - class AssetTreeBase - { - public: - virtual ~AssetTreeBase() = default; - virtual AssetTreeNodeBase& GetRoot() = 0; - }; - - // Base class for an asset allocation table. Implemented by the template AssetAllocationTable<>. - class AssetAllocationTableBase - { - public: - virtual ~AssetAllocationTableBase() = default; - virtual AssetTreeNodeBase* FindAllocation(void* ptr) const = 0; - }; - } -} - -/////////////////////////////////////////////////////////////////////////////// -// Hash functions for map support -/////////////////////////////////////////////////////////////////////////////// - -inline size_t AZStd::hash::operator()(const AZ::Debug::AssetTrackingId& info) const -{ - return AZStd::hash()(info.m_id); -} - diff --git a/Code/Framework/AzCore/AzCore/Debug/AssetTrackingTypesImpl.h b/Code/Framework/AzCore/AzCore/Debug/AssetTrackingTypesImpl.h deleted file mode 100644 index eac809c406..0000000000 --- a/Code/Framework/AzCore/AzCore/Debug/AssetTrackingTypesImpl.h +++ /dev/null @@ -1,174 +0,0 @@ -/* - * Copyright (c) Contributors to the Open 3D Engine Project. - * For complete copyright and license terms please see the LICENSE at the root of this distribution. - * - * SPDX-License-Identifier: Apache-2.0 OR MIT - * - */ - -#pragma once - -#include - -#include - -namespace AZ -{ - namespace Debug - { - // A node in the current asset state tree. - // Each thread maintains a stack of currently in-scope assets. As this stack changes the asset tree forms. - // The same asset may appear in multiple places in the tree, e.g. if asset A is a common asset loaded by both asset B and asset C, the tree may look like: - // Root -> B -> A - // \--> C -> A - template - class AssetTreeNode : public AssetTreeNodeBase - { - public: - AssetTreeNode(const AssetPrimaryInfo* primaryInfo = nullptr, AssetTreeNode* parent = nullptr) : - m_primaryinfo(primaryInfo), - m_parent(parent) - { - } - - ~AssetTreeNode() override = default; - - const AssetPrimaryInfo* GetAssetPrimaryInfo() const override - { - return m_primaryinfo; - } - - AssetTreeNodeBase* FindOrAddChild(const AssetTrackingId& id, const AssetPrimaryInfo* info) override - { - AssetTreeNodeBase* result = nullptr; - auto childItr = m_children.find(id); - - if (childItr != m_children.end()) - { - result = &childItr->second; - } - else - { - auto childResult = m_children.emplace(id, AssetTreeNode(info, this)); - result = &childResult.first->second; - } - - return result; - } - - - using AssetMap = AssetTrackingMap; - - const AssetPrimaryInfo* m_primaryinfo; - AssetTreeNode* m_parent; - AssetMap m_children; - AssetDataT m_data; - }; - - template - class AssetTree : public AssetTreeBase - { - public: - ~AssetTree() override = default; - - AssetTreeNodeBase& GetRoot() override - { - return m_rootAssets; - } - - using NodeType = AssetTreeNode; - - NodeType m_rootAssets; - }; - - - template - struct AllocationRecord - { - AssetTreeNodeBase* m_asset; - uint32_t m_size; - AllocationDataT m_data; - }; - - - template - class AllocationTable : public AssetAllocationTableBase - { - public: - using RecordType = AllocationRecord; - using AllocationReverseMap = AZStd::map, AZStdAssetTrackingAllocator>; - using mutex_type = AZStd::mutex; - using lock_type = AZStd::lock_guard; - - AllocationTable(mutex_type& mutex) : m_mutex(mutex) - { - } - ~AllocationTable() override = default; - - AssetTreeNodeBase* FindAllocation(void* ptr) const override - { - // Note that ptr is not guaranteed to have an exact entry in the map. For instance, ptr may point to a member of the original object that was allocated, or - // ptr may be a different "this" pointer in the case of multiple inheritance. - // - // To solve this, we use lower_bound() and check to see if ptr falls in the range of the nearest allocation. Our map uses AZStd::greater instead of - // AZStd::less as its sorting function, and thus sorts largest-to-smallest instead of smallest-to-largest. This causes lower_bound() to return the first - // iterator that is not greater than otherAllocation, i.e. less than or equal to ptr. - lock_type lock(m_mutex); - auto itr = m_allocationTable.lower_bound(ptr); - AssetTreeNodeBase* result = nullptr; - - if (itr != m_allocationTable.end()) - { - // Check if otherAllocation is within the size range of the allocation we found - if (reinterpret_cast(ptr) <= reinterpret_cast(itr->first) + itr->second.m_size) - { - result = itr->second.m_asset; - } - } - - return result; - } - - void ReallocateAllocation(void* prevAddress, void* newAddress, size_t newByteSize) - { - lock_type lock(m_mutex); - auto itr = m_allocationTable.find(prevAddress); - - if (itr != m_allocationTable.end()) - { - RecordType newAllocation = itr->second; - newAllocation.m_size = (uint32_t)newByteSize; - - m_allocationTable.erase(itr); - m_allocationTable.emplace(newAddress, AZStd::move(newAllocation)); - } - } - - void ResizeAllocation(void* address, size_t newSize) - { - // Resize an existing allocation if we can find it - lock_type lock(m_mutex); - auto itr = m_allocationTable.find(address); - - if (itr != m_allocationTable.end()) - { - itr->second.m_size = (uint32_t)newSize; - } - } - - AllocationReverseMap& Get() - { - return m_allocationTable; - } - - const AllocationReverseMap& Get() const - { - return m_allocationTable; - } - - private: - AllocationReverseMap m_allocationTable; - mutex_type& m_mutex; - }; - } -} diff --git a/Code/Framework/AzCore/AzCore/Debug/EventTrace.cpp b/Code/Framework/AzCore/AzCore/Debug/EventTrace.cpp deleted file mode 100644 index 88a78de031..0000000000 --- a/Code/Framework/AzCore/AzCore/Debug/EventTrace.cpp +++ /dev/null @@ -1,29 +0,0 @@ -/* - * Copyright (c) Contributors to the Open 3D Engine Project. - * For complete copyright and license terms please see the LICENSE at the root of this distribution. - * - * SPDX-License-Identifier: Apache-2.0 OR MIT - * - */ - -#include -#include -#include -#include - -namespace AZ -{ - namespace Debug - { - EventTrace::ScopedSlice::ScopedSlice(const char* name, const char* category) - : m_Name(name) - , m_Category(category) - , m_Time(AZStd::GetTimeNowMicroSecond()) - {} - - EventTrace::ScopedSlice::~ScopedSlice() - { - EventTraceDrillerBus::TryQueueBroadcast(&EventTraceDrillerInterface::RecordSlice, m_Name, m_Category, AZStd::this_thread::get_id(), m_Time, (uint32_t)(AZStd::GetTimeNowMicroSecond() - m_Time)); - } - } -} diff --git a/Code/Framework/AzCore/AzCore/Debug/EventTrace.h b/Code/Framework/AzCore/AzCore/Debug/EventTrace.h deleted file mode 100644 index 1bc7ee20a6..0000000000 --- a/Code/Framework/AzCore/AzCore/Debug/EventTrace.h +++ /dev/null @@ -1,43 +0,0 @@ -/* - * Copyright (c) Contributors to the Open 3D Engine Project. - * For complete copyright and license terms please see the LICENSE at the root of this distribution. - * - * SPDX-License-Identifier: Apache-2.0 OR MIT - * - */ - -#pragma once - -#include -#include -#include - -namespace AZStd -{ - struct thread_id; -} - -namespace AZ -{ - namespace Debug - { - namespace EventTrace - { - class ScopedSlice - { - public: - ScopedSlice(const char* name, const char* category); - ~ScopedSlice(); - - private: - const char* m_Name; - const char* m_Category; - u64 m_Time; - }; - } - } -} - -#define AZ_TRACE_METHOD_NAME_CATEGORY(name, category) -#define AZ_TRACE_METHOD_NAME(name) AZ_TRACE_METHOD_NAME_CATEGORY(name, "") -#define AZ_TRACE_METHOD() AZ_TRACE_METHOD_NAME(AZ_FUNCTION_SIGNATURE) diff --git a/Code/Framework/AzCore/AzCore/Debug/EventTraceDriller.cpp b/Code/Framework/AzCore/AzCore/Debug/EventTraceDriller.cpp deleted file mode 100644 index 658021b018..0000000000 --- a/Code/Framework/AzCore/AzCore/Debug/EventTraceDriller.cpp +++ /dev/null @@ -1,161 +0,0 @@ -/* - * Copyright (c) Contributors to the Open 3D Engine Project. - * For complete copyright and license terms please see the LICENSE at the root of this distribution. - * - * SPDX-License-Identifier: Apache-2.0 OR MIT - * - */ - -#include -#include -#include -#include - -namespace AZ -{ - namespace Debug - { - namespace Crc - { - const u32 EventTraceDriller = AZ_CRC("EventTraceDriller", 0xf7aeae55); - const u32 Slice = AZ_CRC("Slice", 0x3dae78a5); - const u32 ThreadInfo = AZ_CRC("ThreadInfo", 0x89bf78be); - const u32 Name = AZ_CRC("Name", 0x5e237e06); - const u32 Category = AZ_CRC("Category", 0x064c19c1); - const u32 ThreadId = AZ_CRC("ThreadId", 0xd0fd9043); - const u32 Timestamp = AZ_CRC("Timestamp", 0xa5d6e63e); - const u32 Duration = AZ_CRC("Duration", 0x865f80c0); - const u32 Instant = AZ_CRC("Instant", 0x0e9047ad); - } - - EventTraceDriller::EventTraceDriller() - { - EventTraceDrillerSetupBus::Handler::BusConnect(); - AZStd::ThreadDrillerEventBus::Handler::BusConnect(); - } - - EventTraceDriller::~EventTraceDriller() - { - AZStd::ThreadDrillerEventBus::Handler::BusDisconnect(); - EventTraceDrillerSetupBus::Handler::BusDisconnect(); - } - - void EventTraceDriller::Start(const Param* params, int numParams) - { - (void)params; - (void)numParams; - - EventTraceDrillerBus::Handler::BusConnect(); - TickBus::Handler::BusConnect(); - - EventTraceDrillerBus::AllowFunctionQueuing(true); - } - - void EventTraceDriller::Stop() - { - EventTraceDrillerBus::AllowFunctionQueuing(false); - EventTraceDrillerBus::ClearQueuedEvents(); - - EventTraceDrillerBus::Handler::BusDisconnect(); - TickBus::Handler::BusDisconnect(); - } - - void EventTraceDriller::OnTick(float deltaTime, ScriptTimePoint time) - { - (void)deltaTime; - (void)time; - - AZ_TRACE_METHOD(); - RecordThreads(); - EventTraceDrillerBus::ExecuteQueuedEvents(); - } - - void EventTraceDriller::SetThreadName(const AZStd::thread_id& id, const char* name) - { - AZStd::lock_guard lock(m_ThreadMutex); - m_Threads[(size_t)id.m_id] = ThreadData{ name }; - } - - void EventTraceDriller::OnThreadEnter(const AZStd::thread::id& id, const AZStd::thread_desc* desc) - { - if (desc && desc->m_name) - { - SetThreadName(id, desc->m_name); - } - } - - void EventTraceDriller::OnThreadExit(const AZStd::thread::id& id) - { - AZStd::lock_guard lock(m_ThreadMutex); - m_Threads.erase((size_t)id.m_id); - } - - void EventTraceDriller::RecordThreads() - { - if (m_output && m_Threads.size()) - { - // Main bus mutex guards m_output. - auto& context = EventTraceDrillerBus::GetOrCreateContext(); - - AZStd::scoped_lock lock(context.m_contextMutex, m_ThreadMutex); - for (const auto& keyValue : m_Threads) - { - m_output->BeginTag(Crc::EventTraceDriller); - m_output->BeginTag(Crc::ThreadInfo); - m_output->Write(Crc::ThreadId, keyValue.first); - m_output->Write(Crc::Name, keyValue.second.name); - m_output->EndTag(Crc::ThreadInfo); - m_output->EndTag(Crc::EventTraceDriller); - } - } - } - - void EventTraceDriller::RecordSlice( - const char* name, - const char* category, - const AZStd::thread_id threadId, - AZ::u64 timestamp, - AZ::u32 duration) - { - m_output->BeginTag(Crc::EventTraceDriller); - m_output->BeginTag(Crc::Slice); - m_output->Write(Crc::Name, name); - m_output->Write(Crc::Category, category); - m_output->Write(Crc::ThreadId, (size_t)threadId.m_id); - m_output->Write(Crc::Timestamp, timestamp); - m_output->Write(Crc::Duration, std::max(duration, 1u)); - m_output->EndTag(Crc::Slice); - m_output->EndTag(Crc::EventTraceDriller); - } - - void EventTraceDriller::RecordInstantGlobal( - const char* name, - const char* category, - AZ::u64 timestamp) - { - m_output->BeginTag(Crc::EventTraceDriller); - m_output->BeginTag(Crc::Instant); - m_output->Write(Crc::Name, name); - m_output->Write(Crc::Category, category); - m_output->Write(Crc::Timestamp, timestamp); - m_output->EndTag(Crc::Instant); - m_output->EndTag(Crc::EventTraceDriller); - } - - void EventTraceDriller::RecordInstantThread( - const char* name, - const char* category, - const AZStd::thread_id threadId, - AZ::u64 timestamp) - { - m_output->BeginTag(Crc::EventTraceDriller); - m_output->BeginTag(Crc::Instant); - m_output->Write(Crc::Name, name); - m_output->Write(Crc::Category, category); - m_output->Write(Crc::ThreadId, (size_t)threadId.m_id); - m_output->Write(Crc::Timestamp, timestamp); - m_output->EndTag(Crc::Instant); - m_output->EndTag(Crc::EventTraceDriller); - } - } -} diff --git a/Code/Framework/AzCore/AzCore/Debug/EventTraceDriller.h b/Code/Framework/AzCore/AzCore/Debug/EventTraceDriller.h deleted file mode 100644 index fee71147ca..0000000000 --- a/Code/Framework/AzCore/AzCore/Debug/EventTraceDriller.h +++ /dev/null @@ -1,87 +0,0 @@ -/* - * Copyright (c) Contributors to the Open 3D Engine Project. - * For complete copyright and license terms please see the LICENSE at the root of this distribution. - * - * SPDX-License-Identifier: Apache-2.0 OR MIT - * - */ - -#pragma once - -#include -#include -#include -#include -#include - -namespace AZ -{ - namespace Debug - { - class EventTraceDriller - : public Driller - , public EventTraceDrillerBus::Handler - , public EventTraceDrillerSetupBus::Handler - , public AZStd::ThreadDrillerEventBus::Handler - , public AZ::TickBus::Handler - { - public: - AZ_CLASS_ALLOCATOR(EventTraceDriller, OSAllocator, 0) - - EventTraceDriller(); - virtual ~EventTraceDriller(); - - private: - // Driller - ////////////////////////////////////////////////////////////////////////// - const char* GroupName() const override { return "SystemDrillers"; } - const char* GetName() const override { return "EventTraceDriller"; } - const char* GetDescription() const override { return "Handles timed events for a Chrome Tracing."; } - void Start(const Param* params = NULL, int numParams = 0) override; - void Stop() override; - - // ThreadBus - ////////////////////////////////////////////////////////////////////////// - void OnThreadEnter(const AZStd::thread::id& id, const AZStd::thread_desc* desc) override; - void OnThreadExit(const AZStd::thread::id& id) override; - - // TickBus - ////////////////////////////////////////////////////////////////////////// - void OnTick(float deltaTime, ScriptTimePoint time) override; - - // EventTraceDrillerSetupBus - ////////////////////////////////////////////////////////////////////////// - void SetThreadName(const AZStd::thread_id& threadId, const char* name) override; - - // EventTraceDrillerBus - ////////////////////////////////////////////////////////////////////////// - void RecordSlice( - const char* name, - const char* category, - const AZStd::thread_id threadId, - AZ::u64 timestamp, - AZ::u32 duration) override; - - void RecordInstantGlobal( - const char* name, - const char* category, - AZ::u64 timestamp) override; - - void RecordInstantThread( - const char* name, - const char* category, - const AZStd::thread_id threadId, - AZ::u64 timestamp) override; - - void RecordThreads(); - - struct ThreadData - { - AZStd::string name; - }; - - AZStd::recursive_mutex m_ThreadMutex; - AZStd::unordered_map, AZStd::equal_to, OSStdAllocator> m_Threads; - }; - } -} // namespace AZ diff --git a/Code/Framework/AzCore/AzCore/Debug/EventTraceDrillerBus.h b/Code/Framework/AzCore/AzCore/Debug/EventTraceDrillerBus.h deleted file mode 100644 index c588559088..0000000000 --- a/Code/Framework/AzCore/AzCore/Debug/EventTraceDrillerBus.h +++ /dev/null @@ -1,81 +0,0 @@ -/* - * Copyright (c) Contributors to the Open 3D Engine Project. - * For complete copyright and license terms please see the LICENSE at the root of this distribution. - * - * SPDX-License-Identifier: Apache-2.0 OR MIT - * - */ -#pragma once - -#include -#include -#include - -namespace AZStd -{ - struct thread_id; -} - -namespace AZ -{ - namespace Debug - { - class EventTraceDrillerInterface - : public DrillerEBusTraits - { - public: - ////////////////////////////////////////////////////////////////////////// - // EBusTraits overrides - static const AZ::EBusHandlerPolicy HandlerPolicy = AZ::EBusHandlerPolicy::Single; - static const bool EnableEventQueue = true; - static const bool EventQueueingActiveByDefault = false; - ////////////////////////////////////////////////////////////////////////// - - virtual ~EventTraceDrillerInterface() {} - - virtual void RecordSlice( - const char* name, - const char* category, - const AZStd::thread_id threadId, - AZ::u64 timestamp, - AZ::u32 duration) = 0; - - virtual void RecordInstantThread( - const char* name, - const char* category, - const AZStd::thread_id threadId, - AZ::u64 timestamp) = 0; - - virtual void RecordInstantGlobal( - const char* name, - const char* category, - AZ::u64 timestamp) = 0; - }; - - typedef AZ::EBus EventTraceDrillerBus; - - class EventTraceDrillerSetupInterface - : public DrillerEBusTraits - { - public: - ////////////////////////////////////////////////////////////////////////// - // EBusTraits overrides - static const AZ::EBusHandlerPolicy HandlerPolicy = AZ::EBusHandlerPolicy::Single; - ////////////////////////////////////////////////////////////////////////// - - virtual ~EventTraceDrillerSetupInterface() {} - - virtual void SetThreadName(const AZStd::thread_id& threadId, const char* name) = 0; - }; - - typedef AZ::EBus EventTraceDrillerSetupBus; - } -} - -#define AZ_TRACE_INSTANT_GLOBAL_CATEGORY(name, category) \ - EBUS_QUEUE_EVENT(AZ::Debug::EventTraceDrillerBus, RecordInstantGlobal, name, category, AZStd::GetTimeNowMicroSecond()) -#define AZ_TRACE_INSTANT_GLOBAL(name) AZ_TRACE_INSTANT_GLOBAL_CATEGORY(name, "") - -#define AZ_TRACE_INSTANT_THREAD_CATEGORY(name, category) \ - EBUS_QUEUE_EVENT(AZ::Debug::EventTraceDrillerBus, RecordInstantThread, name, category, AZStd::this_thread::get_id(), AZStd::GetTimeNowMicroSecond()) -#define AZ_TRACE_INSTANT_THREAD(name) AZ_TRACE_INSTANT_THREAD_CATEGORY(name, "") diff --git a/Code/Framework/AzCore/AzCore/Debug/MemoryProfiler.h b/Code/Framework/AzCore/AzCore/Debug/MemoryProfiler.h index 5b22e20c60..827f00134d 100644 --- a/Code/Framework/AzCore/AzCore/Debug/MemoryProfiler.h +++ b/Code/Framework/AzCore/AzCore/Debug/MemoryProfiler.h @@ -8,7 +8,7 @@ #pragma once #ifndef AZ_PROFILE_MEMORY_ALLOC -// No other profiler has defined the performance markers AZ_PROFILE_MEMORY_ALLOC (and friends), fall back to a Driller implementation (currently empty) +// No other profiler has defined the performance markers AZ_PROFILE_MEMORY_ALLOC (and friends), fall back to current implementation (empty) # define AZ_PROFILE_MEMORY_ALLOC(category, address, size, context) # define AZ_PROFILE_MEMORY_ALLOC_EX(category, filename, lineNumber, address, size, context) # define AZ_PROFILE_MEMORY_FREE(category, address) diff --git a/Code/Framework/AzCore/AzCore/Debug/Trace.cpp b/Code/Framework/AzCore/AzCore/Debug/Trace.cpp index b9e4003500..74f27481c1 100644 --- a/Code/Framework/AzCore/AzCore/Debug/Trace.cpp +++ b/Code/Framework/AzCore/AzCore/Debug/Trace.cpp @@ -12,7 +12,6 @@ #include #include -#include #include #include @@ -78,6 +77,7 @@ namespace AZ::Debug constexpr LogLevel DefaultLogLevel = LogLevel::Info; AZ_CVAR_SCOPED(int, bg_traceLogLevel, DefaultLogLevel, nullptr, ConsoleFunctorFlags::Null, "Enable trace message logging in release mode. 0=disabled, 1=errors, 2=warnings, 3=info."); + AZ_CVAR_SCOPED(bool, bg_alwaysShowCallstack, false, nullptr, ConsoleFunctorFlags::Null, "Force stack trace output without allowing ebus interception."); /** * If any listener returns true, store the result so we don't outputs detailed information. @@ -275,10 +275,15 @@ namespace AZ::Debug logger->Flush(); // Flush as an assert may indicate a crash is imminent. } - EBUS_EVENT(TraceMessageDrillerBus, OnPreAssert, fileName, line, funcName, message); - TraceMessageResult result; EBUS_EVENT_RESULT(result, TraceMessageBus, OnPreAssert, fileName, line, funcName, message); + + if (bg_alwaysShowCallstack) + { + // If we're always showing the callstack, print it now before there's any chance of an ebus handler interrupting + PrintCallstack(g_dbgSystemWnd, 1); + } + if (result.m_value) { g_alreadyHandlingAssertOrFatal = false; @@ -294,7 +299,6 @@ namespace AZ::Debug azstrcat(message, g_maxMessageLength, "\n"); Output(g_dbgSystemWnd, message); - EBUS_EVENT(TraceMessageDrillerBus, OnAssert, message); EBUS_EVENT_RESULT(result, TraceMessageBus, OnAssert, message); if (result.m_value) { @@ -304,7 +308,10 @@ namespace AZ::Debug } Output(g_dbgSystemWnd, "------------------------------------------------\n"); - PrintCallstack(g_dbgSystemWnd, 1); + if (!bg_alwaysShowCallstack) + { + PrintCallstack(g_dbgSystemWnd, 1); + } Output(g_dbgSystemWnd, "==================================================================\n"); char dialogBoxText[g_maxMessageLength]; @@ -394,8 +401,6 @@ namespace AZ::Debug logger->RecordStringEvent(ErrorEventId, message); } - EBUS_EVENT(TraceMessageDrillerBus, OnPreError, window, fileName, line, funcName, message); - TraceMessageResult result; EBUS_EVENT_RESULT(result, TraceMessageBus, OnPreError, window, fileName, line, funcName, message); if (result.m_value) @@ -410,7 +415,6 @@ namespace AZ::Debug azstrcat(message, g_maxMessageLength, "\n"); Output(window, message); - EBUS_EVENT(TraceMessageDrillerBus, OnError, window, message); EBUS_EVENT_RESULT(result, TraceMessageBus, OnError, window, message); Output(window, "==================================================================\n"); if (result.m_value) @@ -446,8 +450,6 @@ namespace AZ::Debug logger->RecordStringEvent(WarningEventId, message); } - EBUS_EVENT(TraceMessageDrillerBus, OnPreWarning, window, fileName, line, funcName, message); - TraceMessageResult result; EBUS_EVENT_RESULT(result, TraceMessageBus, OnPreWarning, window, fileName, line, funcName, message); if (result.m_value) @@ -461,7 +463,6 @@ namespace AZ::Debug azstrcat(message, g_maxMessageLength, "\n"); Output(window, message); - EBUS_EVENT(TraceMessageDrillerBus, OnWarning, window, message); EBUS_EVENT_RESULT(result, TraceMessageBus, OnWarning, window, message); Output(window, "==================================================================\n"); } @@ -490,8 +491,6 @@ namespace AZ::Debug logger->RecordStringEvent(PrintfEventId, message); } - EBUS_EVENT(TraceMessageDrillerBus, OnPrintf, window, message); - TraceMessageResult result; EBUS_EVENT_RESULT(result, TraceMessageBus, OnPrintf, window, message); if (result.m_value) @@ -520,7 +519,6 @@ namespace AZ::Debug // only call into Ebusses if we are not in a recursive-exception situation as that // would likely just lead to even more exceptions. - EBUS_EVENT(TraceMessageDrillerBus, OnOutput, window, message); TraceMessageResult result; EBUS_EVENT_RESULT(result, TraceMessageBus, OnOutput, window, message); if (result.m_value) @@ -529,6 +527,16 @@ namespace AZ::Debug } } + RawOutput(window, message); + } + + void Trace::RawOutput(const char* window, const char* message) + { + if (!window) + { + window = g_dbgSystemWnd; + } + // printf on Windows platforms seem to have a buffer length limit of 4096 characters // Therefore fwrite is used directly to write the window and message to stdout AZStd::string_view windowView{ window }; @@ -572,9 +580,19 @@ namespace AZ::Debug } azstrcat(lines[i], AZ_ARRAY_SIZE(lines[i]), "\n"); + // Use Output instead of AZ_Printf to be consistent with the exception output code and avoid // this accidentally being suppressed as a normal message - Output(window, lines[i]); + + if (bg_alwaysShowCallstack) + { + // Use Raw Output as this cannot be suppressed + RawOutput(window, lines[i]); + } + else + { + Output(window, lines[i]); + } } } } diff --git a/Code/Framework/AzCore/AzCore/Debug/Trace.h b/Code/Framework/AzCore/AzCore/Debug/Trace.h index 507ba48e53..fe33bf1b9c 100644 --- a/Code/Framework/AzCore/AzCore/Debug/Trace.h +++ b/Code/Framework/AzCore/AzCore/Debug/Trace.h @@ -73,6 +73,9 @@ namespace AZ static void Output(const char* window, const char* message); + /// Called by output to handle the actual output, does not interact with ebus or allow interception + static void RawOutput(const char* window, const char* message); + static void PrintCallstack(const char* window, unsigned int suppressCount = 0, void* nativeContext = 0); /// PEXCEPTION_POINTERS on Windows, always NULL on other platforms diff --git a/Code/Framework/AzCore/AzCore/Debug/TraceMessagesDriller.cpp b/Code/Framework/AzCore/AzCore/Debug/TraceMessagesDriller.cpp deleted file mode 100644 index 7e9e5b146e..0000000000 --- a/Code/Framework/AzCore/AzCore/Debug/TraceMessagesDriller.cpp +++ /dev/null @@ -1,102 +0,0 @@ -/* - * Copyright (c) Contributors to the Open 3D Engine Project. - * For complete copyright and license terms please see the LICENSE at the root of this distribution. - * - * SPDX-License-Identifier: Apache-2.0 OR MIT - * - */ - -#include -#include - -namespace AZ -{ - namespace Debug - { - //========================================================================= - // Start - // [2/6/2013] - //========================================================================= - void TraceMessagesDriller::Start(const Param* params, int numParams) - { - (void)params; - (void)numParams; - BusConnect(); - } - - //========================================================================= - // Stop - // [2/6/2013] - //========================================================================= - void TraceMessagesDriller::Stop() - { - BusDisconnect(); - } - - //========================================================================= - // OnAssert - // [2/6/2013] - //========================================================================= - void TraceMessagesDriller::OnAssert(const char* message) - { - // Not sure if we can really capture assert since the code will stop executing very soon. - m_output->BeginTag(AZ_CRC("TraceMessagesDriller", 0xa61d1b00)); - m_output->Write(AZ_CRC("OnAssert", 0xb74db4ce), message); - m_output->EndTag(AZ_CRC("TraceMessagesDriller", 0xa61d1b00)); - } - - //========================================================================= - // OnException - // [2/6/2013] - //========================================================================= - void TraceMessagesDriller::OnException(const char* message) - { - // Not sure if we can really capture exception since the code will stop executing very soon. - m_output->BeginTag(AZ_CRC("TraceMessagesDriller", 0xa61d1b00)); - m_output->Write(AZ_CRC("OnException", 0xfe457d12), message); - m_output->EndTag(AZ_CRC("TraceMessagesDriller", 0xa61d1b00)); - } - - //========================================================================= - // OnError - // [2/6/2013] - //========================================================================= - void TraceMessagesDriller::OnError(const char* window, const char* message) - { - m_output->BeginTag(AZ_CRC("TraceMessagesDriller", 0xa61d1b00)); - m_output->BeginTag(AZ_CRC("OnError", 0x4993c634)); - m_output->Write(AZ_CRC("Window", 0x8be4f9dd), window); - m_output->Write(AZ_CRC("Message", 0xb6bd307f), message); - m_output->EndTag(AZ_CRC("OnError", 0x4993c634)); - m_output->EndTag(AZ_CRC("TraceMessagesDriller", 0xa61d1b00)); - } - - //========================================================================= - // OnWarning - // [2/6/2013] - //========================================================================= - void TraceMessagesDriller::OnWarning(const char* window, const char* message) - { - m_output->BeginTag(AZ_CRC("TraceMessagesDriller", 0xa61d1b00)); - m_output->BeginTag(AZ_CRC("OnWarning", 0x7d90abea)); - m_output->Write(AZ_CRC("Window", 0x8be4f9dd), window); - m_output->Write(AZ_CRC("Message", 0xb6bd307f), message); - m_output->EndTag(AZ_CRC("OnWarning", 0x7d90abea)); - m_output->EndTag(AZ_CRC("TraceMessagesDriller", 0xa61d1b00)); - } - - //========================================================================= - // OnPrintf - // [2/6/2013] - //========================================================================= - void TraceMessagesDriller::OnPrintf(const char* window, const char* message) - { - m_output->BeginTag(AZ_CRC("TraceMessagesDriller", 0xa61d1b00)); - m_output->BeginTag(AZ_CRC("OnPrintf", 0xd4b5c294)); - m_output->Write(AZ_CRC("Window", 0x8be4f9dd), window); - m_output->Write(AZ_CRC("Message", 0xb6bd307f), message); - m_output->EndTag(AZ_CRC("OnPrintf", 0xd4b5c294)); - m_output->EndTag(AZ_CRC("TraceMessagesDriller", 0xa61d1b00)); - } - } // namespace Debug -} // namespace AZ diff --git a/Code/Framework/AzCore/AzCore/Debug/TraceMessagesDriller.h b/Code/Framework/AzCore/AzCore/Debug/TraceMessagesDriller.h deleted file mode 100644 index 32726931fc..0000000000 --- a/Code/Framework/AzCore/AzCore/Debug/TraceMessagesDriller.h +++ /dev/null @@ -1,49 +0,0 @@ -/* - * Copyright (c) Contributors to the Open 3D Engine Project. - * For complete copyright and license terms please see the LICENSE at the root of this distribution. - * - * SPDX-License-Identifier: Apache-2.0 OR MIT - * - */ - -#pragma once - -#include -#include - -namespace AZ -{ - namespace Debug - { - /** - * Trace messages driller class - */ - class TraceMessagesDriller - : public Driller - , public TraceMessageDrillerBus::Handler - { - public: - AZ_CLASS_ALLOCATOR(TraceMessagesDriller, OSAllocator, 0) - - protected: - ////////////////////////////////////////////////////////////////////////// - // Driller - const char* GroupName() const override { return "SystemDrillers"; } - const char* GetName() const override { return "TraceMessagesDriller"; } - const char* GetDescription() const override { return "Handles all system messages like Assert, Exception, Error, Warning, Printf, etc."; } - void Start(const Param* params = NULL, int numParams = 0) override; - void Stop() override; - ////////////////////////////////////////////////////////////////////////// - - ////////////////////////////////////////////////////////////////////////// - // TraceMessagesDrillerBus - /// Triggered when a AZ_Assert failed. This is terminating event! (the code will break, crash). - void OnAssert(const char* message) override; - void OnException(const char* message) override; - void OnError(const char* window, const char* message) override; - void OnWarning(const char* window, const char* message) override; - void OnPrintf(const char* window, const char* message) override; - ////////////////////////////////////////////////////////////////////////// - }; - } // namespace Debug -} // namespace AZ diff --git a/Code/Framework/AzCore/AzCore/Debug/TraceMessagesDrillerBus.h b/Code/Framework/AzCore/AzCore/Debug/TraceMessagesDrillerBus.h deleted file mode 100644 index 6230f4af21..0000000000 --- a/Code/Framework/AzCore/AzCore/Debug/TraceMessagesDrillerBus.h +++ /dev/null @@ -1,53 +0,0 @@ -/* - * Copyright (c) Contributors to the Open 3D Engine Project. - * For complete copyright and license terms please see the LICENSE at the root of this distribution. - * - * SPDX-License-Identifier: Apache-2.0 OR MIT - * - */ - -#pragma once - -#include - -namespace AZ -{ - namespace Debug - { - /** - * Trace messages event handle. - * All messages are optional (they have default implementation) and you can handle only one at a time. - * Driller messages are similar to TraceMessages, but do not provide a return value, - * as we only care about collecting driller messages, not operating on them. - * - * We use a driller bus so all messages are sending in exclusive matter no other driller messages - * can be triggered at that moment, so we already preserve the calling order. You can assume - * all access code in the driller framework in guarded. You can manually lock the driller mutex are you - * use by using \ref AZ::Debug::DrillerEBusMutex. - */ - class TraceMessageDrillerEvents - : public DrillerEBusTraits - { - public: - virtual ~TraceMessageDrillerEvents() {} - - /// Triggered when a AZ_Assert failed. This is terminating event! (the code will break, crash). - virtual void OnPreAssert(const char* /*fileName*/, int /*line*/, const char* /*func*/, const char* /*message*/) {} - virtual void OnAssert(const char* /*message*/) {} - virtual void OnException(const char* /*message*/) {} - virtual void OnPreError(const char* /*window*/, const char* /*fileName*/, int /*line*/, const char* /*func*/, const char* /*message*/) {} - virtual void OnError(const char* /*window*/, const char* /*message*/) {} - virtual void OnPreWarning(const char* /*window*/, const char* /*fileName*/, int /*line*/, const char* /*func*/, const char* /*message*/) {} - virtual void OnWarning(const char* /*window*/, const char* /*message*/) {} - virtual void OnPrintf(const char* /*window*/, const char* /*message*/) {} - /** - * All trace functions you output to anything. So if you want to handle all the output this is the place. - * You are not given the choice to disable the system output as if you listen at that level you can't make - * that decision. Otherwise we can trigger an assert without even one line of message send to the console/debugger. - */ - virtual void OnOutput(const char* /*window*/, const char* /*message*/) {} - }; - - typedef AZ::EBus TraceMessageDrillerBus; - } // namespace Debug -} // namespace AZ diff --git a/Code/Framework/AzCore/AzCore/Debug/TraceReflection.cpp b/Code/Framework/AzCore/AzCore/Debug/TraceReflection.cpp index debbea5235..329a709994 100644 --- a/Code/Framework/AzCore/AzCore/Debug/TraceReflection.cpp +++ b/Code/Framework/AzCore/AzCore/Debug/TraceReflection.cpp @@ -12,283 +12,280 @@ #include #include -namespace AZ +namespace AZ::Debug { - namespace Debug + //! Trace Message Event Handler for Automation. + //! Since TraceMessageBus will be called from multiple threads and + //! python interpreter is single threaded, all the bus calls are + //! queued into a list and called at the end of the frame in the main thread. + //! @note this class is not using the usual AZ_EBUS_BEHAVIOR_BINDER + //! macro as the signature needs to be changed to connect to Tick bus. + class TraceMessageBusHandler + : public AZ::Debug::TraceMessageBus::Handler + , public AZ::BehaviorEBusHandler + , public AZ::TickBus::Handler { - //! Trace Message Event Handler for Automation. - //! Since TraceMessageBus will be called from multiple threads and - //! python interpreter is single threaded, all the bus calls are - //! queued into a list and called at the end of the frame in the main thread. - //! @note this class is not using the usual AZ_EBUS_BEHAVIOR_BINDER - //! macro as the signature needs to be changed to connect to Tick bus. - class TraceMessageBusHandler - : public AZ::Debug::TraceMessageBus::Handler - , public AZ::BehaviorEBusHandler - , public AZ::TickBus::Handler + public: + AZ_CLASS_ALLOCATOR(TraceMessageBusHandler, AZ::SystemAllocator, 0); + AZ_RTTI(TraceMessageBusHandler, "{5CDBAF09-5EB0-48AC-B327-2AF8601BB550}", AZ::BehaviorEBusHandler); + + TraceMessageBusHandler(); + + using EventFunctionsParameterPack = AZStd::Internal::pack_traits_arg_sequence< + decltype(&TraceMessageBusHandler::OnPreAssert), + decltype(&TraceMessageBusHandler::OnPreError), + decltype(&TraceMessageBusHandler::OnPreWarning), + decltype(&TraceMessageBusHandler::OnAssert), + decltype(&TraceMessageBusHandler::OnError), + decltype(&TraceMessageBusHandler::OnWarning), + decltype(&TraceMessageBusHandler::OnException), + decltype(&TraceMessageBusHandler::OnPrintf), + decltype(&TraceMessageBusHandler::OnOutput) + >; + + enum { - public: - AZ_CLASS_ALLOCATOR(TraceMessageBusHandler, AZ::SystemAllocator, 0); - AZ_RTTI(TraceMessageBusHandler, "{5CDBAF09-5EB0-48AC-B327-2AF8601BB550}", AZ::BehaviorEBusHandler); - - TraceMessageBusHandler(); - - using EventFunctionsParameterPack = AZStd::Internal::pack_traits_arg_sequence< - decltype(&TraceMessageBusHandler::OnPreAssert), - decltype(&TraceMessageBusHandler::OnPreError), - decltype(&TraceMessageBusHandler::OnPreWarning), - decltype(&TraceMessageBusHandler::OnAssert), - decltype(&TraceMessageBusHandler::OnError), - decltype(&TraceMessageBusHandler::OnWarning), - decltype(&TraceMessageBusHandler::OnException), - decltype(&TraceMessageBusHandler::OnPrintf), - decltype(&TraceMessageBusHandler::OnOutput) - >; - - enum - { - FN_OnPreAssert = 0, - FN_OnPreError, - FN_OnPreWarning, - FN_OnAssert, - FN_OnError, - FN_OnWarning, - FN_OnException, - FN_OnPrintf, - FN_OnOutput, - FN_MAX - }; - - static inline constexpr const char* m_functionNames[FN_MAX] = - { - "OnPreAssert", - "OnPreError", - "OnPreWarning", - "OnAssert", - "OnError", - "OnWarning", - "OnException", - "OnPrintf", - "OnOutput" - }; - - // AZ::BehaviorEBusHandler overrides... - int GetFunctionIndex(const char* functionName) const override; - void Disconnect() override; - bool Connect(AZ::BehaviorValueParameter* id = nullptr) override; - bool IsConnected() override; - bool IsConnectedId(AZ::BehaviorValueParameter* id) override; - - // TraceMessageBus - /* - * Note: Since at editor runtime there is already have a handler, for automation (OnPreAssert, OnPreWarning, OnPreWarning) - * must be used instead of (OnAssert, OnWarning, OnError) - */ - bool OnPreAssert(const char* fileName, int line, const char* func, const char* message) override; - bool OnPreError(const char* window, const char* fileName, int line, const char* func, const char* message) override; - bool OnPreWarning(const char* window, const char* fileName, int line, const char* func, const char* message) override; - bool OnAssert(const char* message) override; - bool OnError(const char* window, const char* message) override; - bool OnWarning(const char* window, const char* message) override; - bool OnException(const char* message) override; - bool OnPrintf(const char* window, const char* message) override; - bool OnOutput(const char* window, const char* message) override; - - // AZ::TickBus::Handler overrides ... - void OnTick(float deltaTime, AZ::ScriptTimePoint time) override; - int GetTickOrder() override; - - private: - void QueueMessageCall(AZStd::function messageCall); - void FlushMessageCalls(); - - AZStd::list> m_messageCalls; - AZStd::mutex m_messageCallsLock; + FN_OnPreAssert = 0, + FN_OnPreError, + FN_OnPreWarning, + FN_OnAssert, + FN_OnError, + FN_OnWarning, + FN_OnException, + FN_OnPrintf, + FN_OnOutput, + FN_MAX }; - TraceMessageBusHandler::TraceMessageBusHandler() + static inline constexpr const char* m_functionNames[FN_MAX] = { - m_events.resize(FN_MAX); + "OnPreAssert", + "OnPreError", + "OnPreWarning", + "OnAssert", + "OnError", + "OnWarning", + "OnException", + "OnPrintf", + "OnOutput" + }; - SetEvent(&TraceMessageBusHandler::OnPreAssert, m_functionNames[FN_OnPreAssert]); - SetEvent(&TraceMessageBusHandler::OnPreError, m_functionNames[FN_OnPreError]); - SetEvent(&TraceMessageBusHandler::OnPreWarning, m_functionNames[FN_OnPreWarning]); - SetEvent(&TraceMessageBusHandler::OnAssert, m_functionNames[FN_OnAssert]); - SetEvent(&TraceMessageBusHandler::OnError, m_functionNames[FN_OnError]); - SetEvent(&TraceMessageBusHandler::OnWarning, m_functionNames[FN_OnWarning]); - SetEvent(&TraceMessageBusHandler::OnException, m_functionNames[FN_OnException]); - SetEvent(&TraceMessageBusHandler::OnPrintf, m_functionNames[FN_OnPrintf]); - SetEvent(&TraceMessageBusHandler::OnOutput, m_functionNames[FN_OnOutput]); - } + // AZ::BehaviorEBusHandler overrides... + int GetFunctionIndex(const char* functionName) const override; + void Disconnect() override; + bool Connect(AZ::BehaviorValueParameter* id = nullptr) override; + bool IsConnected() override; + bool IsConnectedId(AZ::BehaviorValueParameter* id) override; - int TraceMessageBusHandler::GetFunctionIndex(const char* functionName) const + // TraceMessageBus + /* + * Note: Since at editor runtime there is already have a handler, for automation (OnPreAssert, OnPreWarning, OnPreWarning) + * must be used instead of (OnAssert, OnWarning, OnError) + */ + bool OnPreAssert(const char* fileName, int line, const char* func, const char* message) override; + bool OnPreError(const char* window, const char* fileName, int line, const char* func, const char* message) override; + bool OnPreWarning(const char* window, const char* fileName, int line, const char* func, const char* message) override; + bool OnAssert(const char* message) override; + bool OnError(const char* window, const char* message) override; + bool OnWarning(const char* window, const char* message) override; + bool OnException(const char* message) override; + bool OnPrintf(const char* window, const char* message) override; + bool OnOutput(const char* window, const char* message) override; + + // AZ::TickBus::Handler overrides ... + void OnTick(float deltaTime, AZ::ScriptTimePoint time) override; + int GetTickOrder() override; + + private: + void QueueMessageCall(AZStd::function messageCall); + void FlushMessageCalls(); + + AZStd::list> m_messageCalls; + AZStd::mutex m_messageCallsLock; + }; + + TraceMessageBusHandler::TraceMessageBusHandler() + { + m_events.resize(FN_MAX); + + SetEvent(&TraceMessageBusHandler::OnPreAssert, m_functionNames[FN_OnPreAssert]); + SetEvent(&TraceMessageBusHandler::OnPreError, m_functionNames[FN_OnPreError]); + SetEvent(&TraceMessageBusHandler::OnPreWarning, m_functionNames[FN_OnPreWarning]); + SetEvent(&TraceMessageBusHandler::OnAssert, m_functionNames[FN_OnAssert]); + SetEvent(&TraceMessageBusHandler::OnError, m_functionNames[FN_OnError]); + SetEvent(&TraceMessageBusHandler::OnWarning, m_functionNames[FN_OnWarning]); + SetEvent(&TraceMessageBusHandler::OnException, m_functionNames[FN_OnException]); + SetEvent(&TraceMessageBusHandler::OnPrintf, m_functionNames[FN_OnPrintf]); + SetEvent(&TraceMessageBusHandler::OnOutput, m_functionNames[FN_OnOutput]); + } + + int TraceMessageBusHandler::GetFunctionIndex(const char* functionName) const + { + for (int i = 0; i < FN_MAX; ++i) { - for (int i = 0; i < FN_MAX; ++i) + if (azstricmp(functionName, m_functionNames[i]) == 0) { - if (azstricmp(functionName, m_functionNames[i]) == 0) - { - return i; - } + return i; } - return -1; } + return -1; + } - void TraceMessageBusHandler::Disconnect() + void TraceMessageBusHandler::Disconnect() + { + AZ::Debug::TraceMessageBus::Handler::BusDisconnect(); + AZ::TickBus::Handler::BusDisconnect(); + } + + bool TraceMessageBusHandler::Connect(AZ::BehaviorValueParameter* id) + { + AZ::TickBus::Handler::BusConnect(); + return AZ::Internal::EBusConnector::Connect(this, id); + } + + bool TraceMessageBusHandler::IsConnected() + { + return AZ::Internal::EBusConnector::IsConnected(this); + } + + bool TraceMessageBusHandler::IsConnectedId(AZ::BehaviorValueParameter* id) + { + return AZ::Internal::EBusConnector::IsConnectedId(this, id); + } + + ////////////////////////////////////////////////////////////////////////// + // TraceMessageBusHandler Implementation + inline bool TraceMessageBusHandler::OnPreAssert(const char* fileName, int line, const char* func, const char* message) + { + QueueMessageCall( + [this, fileNameString = AZStd::string(fileName), line, funcString = AZStd::string(func), messageString = AZStd::string(message)]() { - AZ::Debug::TraceMessageBus::Handler::BusDisconnect(); - AZ::TickBus::Handler::BusDisconnect(); - } + Call(FN_OnPreAssert, fileNameString.c_str(), line, funcString.c_str(), messageString.c_str()); + }); + return false; + } - bool TraceMessageBusHandler::Connect(AZ::BehaviorValueParameter* id) + inline bool TraceMessageBusHandler::OnPreError(const char* window, const char* fileName, int line, const char* func, const char* message) + { + QueueMessageCall( + [this, windowString = AZStd::string(window), fileNameString = AZStd::string(fileName), line, funcString = AZStd::string(func), messageString = AZStd::string(message)]() { - AZ::TickBus::Handler::BusConnect(); - return AZ::Internal::EBusConnector::Connect(this, id); - } + Call(FN_OnPreError, windowString.c_str(), fileNameString.c_str(), line, funcString.c_str(), messageString.c_str()); + }); + return false; + } - bool TraceMessageBusHandler::IsConnected() + inline bool TraceMessageBusHandler::OnPreWarning(const char* window, const char* fileName, int line, const char* func, const char* message) + { + QueueMessageCall( + [this, windowString = AZStd::string(window), fileNameString = AZStd::string(fileName), line, funcString = AZStd::string(func), messageString = AZStd::string(message)]() { - return AZ::Internal::EBusConnector::IsConnected(this); - } + return Call(FN_OnPreWarning, windowString.c_str(), fileNameString.c_str(), line, funcString.c_str(), messageString.c_str()); + }); + return false; + } - bool TraceMessageBusHandler::IsConnectedId(AZ::BehaviorValueParameter* id) + inline bool TraceMessageBusHandler::OnAssert(const char* message) + { + QueueMessageCall( + [this, messageString = AZStd::string(message)]() { - return AZ::Internal::EBusConnector::IsConnectedId(this, id); - } + return Call(FN_OnAssert, messageString.c_str()); + }); + return false; + } - ////////////////////////////////////////////////////////////////////////// - // TraceMessageBusHandler Implementation - inline bool TraceMessageBusHandler::OnPreAssert(const char* fileName, int line, const char* func, const char* message) + inline bool TraceMessageBusHandler::OnError(const char* window, const char* message) + { + QueueMessageCall( + [this, windowString = AZStd::string(window), messageString = AZStd::string(message)]() { - QueueMessageCall( - [this, fileNameString = AZStd::string(fileName), line, funcString = AZStd::string(func), messageString = AZStd::string(message)]() - { - Call(FN_OnPreAssert, fileNameString.c_str(), line, funcString.c_str(), messageString.c_str()); - }); - return false; - } + return Call(FN_OnError, windowString.c_str(), messageString.c_str()); + }); + return false; + } - inline bool TraceMessageBusHandler::OnPreError(const char* window, const char* fileName, int line, const char* func, const char* message) + inline bool TraceMessageBusHandler::OnWarning(const char* window, const char* message) + { + QueueMessageCall( + [this, windowString = AZStd::string(window), messageString = AZStd::string(message)]() { - QueueMessageCall( - [this, windowString = AZStd::string(window), fileNameString = AZStd::string(fileName), line, funcString = AZStd::string(func), messageString = AZStd::string(message)]() - { - Call(FN_OnPreError, windowString.c_str(), fileNameString.c_str(), line, funcString.c_str(), messageString.c_str()); - }); - return false; - } + return Call(FN_OnWarning, windowString.c_str(), messageString.c_str()); + }); + return false; + } - inline bool TraceMessageBusHandler::OnPreWarning(const char* window, const char* fileName, int line, const char* func, const char* message) + inline bool TraceMessageBusHandler::OnException(const char* message) + { + QueueMessageCall( + [this, messageString = AZStd::string(message)]() { - QueueMessageCall( - [this, windowString = AZStd::string(window), fileNameString = AZStd::string(fileName), line, funcString = AZStd::string(func), messageString = AZStd::string(message)]() - { - return Call(FN_OnPreWarning, windowString.c_str(), fileNameString.c_str(), line, funcString.c_str(), messageString.c_str()); - }); - return false; - } + return Call(FN_OnException, messageString.c_str()); + }); + return false; + } - inline bool TraceMessageBusHandler::OnAssert(const char* message) + inline bool TraceMessageBusHandler::OnPrintf(const char* window, const char* message) + { + QueueMessageCall( + [this, windowString = AZStd::string(window), messageString = AZStd::string(message)]() { - QueueMessageCall( - [this, messageString = AZStd::string(message)]() - { - return Call(FN_OnAssert, messageString.c_str()); - }); - return false; - } + return Call(FN_OnPrintf, windowString.c_str(), messageString.c_str()); + }); + return false; + } - inline bool TraceMessageBusHandler::OnError(const char* window, const char* message) + inline bool TraceMessageBusHandler::OnOutput(const char* window, const char* message) + { + QueueMessageCall( + [this, windowString = AZStd::string(window), messageString = AZStd::string(message)]() { - QueueMessageCall( - [this, windowString = AZStd::string(window), messageString = AZStd::string(message)]() - { - return Call(FN_OnError, windowString.c_str(), messageString.c_str()); - }); - return false; - } + return Call(FN_OnOutput, windowString.c_str(), messageString.c_str()); + }); + return false; + } - inline bool TraceMessageBusHandler::OnWarning(const char* window, const char* message) - { - QueueMessageCall( - [this, windowString = AZStd::string(window), messageString = AZStd::string(message)]() - { - return Call(FN_OnWarning, windowString.c_str(), messageString.c_str()); - }); - return false; - } + void TraceMessageBusHandler::OnTick( + [[maybe_unused]] float deltaTime, + [[maybe_unused]] AZ::ScriptTimePoint time) + { + FlushMessageCalls(); + } - inline bool TraceMessageBusHandler::OnException(const char* message) - { - QueueMessageCall( - [this, messageString = AZStd::string(message)]() - { - return Call(FN_OnException, messageString.c_str()); - }); - return false; - } + int TraceMessageBusHandler::GetTickOrder() + { + return AZ::TICK_LAST; + } - inline bool TraceMessageBusHandler::OnPrintf(const char* window, const char* message) - { - QueueMessageCall( - [this, windowString = AZStd::string(window), messageString = AZStd::string(message)]() - { - return Call(FN_OnPrintf, windowString.c_str(), messageString.c_str()); - }); - return false; - } + void TraceMessageBusHandler::QueueMessageCall(AZStd::function messageCall) + { + AZStd::lock_guard lock(m_messageCallsLock); + m_messageCalls.emplace_back(messageCall); + } - inline bool TraceMessageBusHandler::OnOutput(const char* window, const char* message) - { - QueueMessageCall( - [this, windowString = AZStd::string(window), messageString = AZStd::string(message)]() - { - return Call(FN_OnOutput, windowString.c_str(), messageString.c_str()); - }); - return false; - } - - void TraceMessageBusHandler::OnTick( - [[maybe_unused]] float deltaTime, - [[maybe_unused]] AZ::ScriptTimePoint time) - { - FlushMessageCalls(); - } - - int TraceMessageBusHandler::GetTickOrder() - { - return AZ::TICK_LAST; - } - - void TraceMessageBusHandler::QueueMessageCall(AZStd::function messageCall) + void TraceMessageBusHandler::FlushMessageCalls() + { + AZStd::list> messageCalls; { AZStd::lock_guard lock(m_messageCallsLock); - m_messageCalls.push_back(messageCall); + m_messageCalls.swap(messageCalls); // Move calls to a new list to release the lock as soon as possible } - void TraceMessageBusHandler::FlushMessageCalls() + for (auto& messageCall : messageCalls) { - AZStd::list> messageCalls; - { - AZStd::lock_guard lock(m_messageCallsLock); - m_messageCalls.swap(messageCalls); // Move calls to a new list to release the lock as soon as possible - } - - for (auto& messageCall : messageCalls) - { - messageCall(); - } - } - - void TraceReflect(ReflectContext* context) - { - if (BehaviorContext* behaviorContext = azrtti_cast(context)) - { - behaviorContext->EBus("TraceMessageBus") - ->Attribute(AZ::Script::Attributes::Module, "debug") - ->Attribute(AZ::Script::Attributes::Scope, AZ::Script::Attributes::ScopeFlags::Automation) - ->Handler() - ; - } + messageCall(); } } -} + + void TraceReflect(ReflectContext* context) + { + if (BehaviorContext* behaviorContext = azrtti_cast(context)) + { + behaviorContext->EBus("TraceMessageBus") + ->Attribute(AZ::Script::Attributes::Module, "debug") + ->Attribute(AZ::Script::Attributes::Scope, AZ::Script::Attributes::ScopeFlags::Automation) + ->Handler() + ; + } + } +} // namespace AZ::Debug diff --git a/Code/Framework/AzCore/AzCore/Driller/DefaultStringPool.h b/Code/Framework/AzCore/AzCore/Driller/DefaultStringPool.h deleted file mode 100644 index 630061f089..0000000000 --- a/Code/Framework/AzCore/AzCore/Driller/DefaultStringPool.h +++ /dev/null @@ -1,125 +0,0 @@ -/* - * Copyright (c) Contributors to the Open 3D Engine Project. - * For complete copyright and license terms please see the LICENSE at the root of this distribution. - * - * SPDX-License-Identifier: Apache-2.0 OR MIT - * - */ -#ifndef AZCORE_DRILLER_DEFAULT_STRING_POOL_H -#define AZCORE_DRILLER_DEFAULT_STRING_POOL_H - -#include - -#include -#include - -namespace AZ -{ - namespace Debug - { - template - struct unordered_map - { - typedef AZStd::unordered_map, AZStd::equal_to, OSStdAllocator> type; - }; - - template - struct unordered_set - { - typedef AZStd::unordered_set, AZStd::equal_to, OSStdAllocator> type; - }; - - /** - * Default implementation of a string pool. - */ - class DrillerDefaultStringPool - : public DrillerStringPool - { - public: - virtual ~DrillerDefaultStringPool() - { - Reset(); - } - - typedef unordered_map::type CrcToStringMapType; - typedef unordered_set::type OwnedStringsMapType; - - /** - * Add a copy of the string to the pool. If we return true the string was added otherwise it was already in the bool. - * In both cases the crc32 of the string and the pointer to the shared copy is returned (optional for poolStringAddress)! - */ - virtual bool InsertCopy(const char* string, unsigned int length, AZ::u32& crc32, const char** poolStringAddress = nullptr) - { - crc32 = AZ::Crc32(string, length); - CrcToStringMapType::pair_iter_bool insertIt = m_crcToStringMap.insert_key(crc32); - if (insertIt.second) - { - char* newString = reinterpret_cast(azmalloc(length + 1, 1, AZ::OSAllocator)); - memcpy(newString, string, length); - newString[length] = '\0'; // terminate - m_ownedStrings.insert(newString); - insertIt.first->second = newString; - } - if (poolStringAddress) - { - *poolStringAddress = insertIt.first->second; - } - return insertIt.second; - } - - /** - * Same as the InsertCopy above without actually coping the string into the pool. The pool assumes that - * none of the strings added to the pool will be deleted. - */ - virtual bool Insert(const char* string, unsigned int length, AZ::u32& crc32) - { - crc32 = AZ::Crc32(string, length); - return m_crcToStringMap.insert(AZStd::make_pair(crc32, string)).second; - } - - /// Finds a string in the pool by crc32. - virtual const char* Find(AZ::u32 crc32) - { - CrcToStringMapType::iterator it = m_crcToStringMap.find(crc32); - if (it != m_crcToStringMap.end()) - { - return it->second; - } - return NULL; - } - - virtual void Erase(AZ::u32 crc32) - { - CrcToStringMapType::iterator it = m_crcToStringMap.find(crc32); - if (it != m_crcToStringMap.end()) - { - OwnedStringsMapType::iterator ownerIt = m_ownedStrings.find(it->second); - if (ownerIt != m_ownedStrings.end()) - { - azfree(const_cast(it->second), AZ::OSAllocator); - m_ownedStrings.erase(ownerIt); - } - m_crcToStringMap.erase(it); - } - } - - virtual void Reset() - { - for (OwnedStringsMapType::iterator it = m_ownedStrings.begin(); it != m_ownedStrings.end(); ++it) - { - azfree(const_cast(*it), AZ::OSAllocator); - } - m_crcToStringMap.clear(); - m_ownedStrings.clear(); - } - protected: - CrcToStringMapType m_crcToStringMap; - OwnedStringsMapType m_ownedStrings; - }; - } // namespace Debug -} // namespace AZ - -#endif // AZCORE_DRILLER_DEFAULT_STRING_POOL_H -#pragma once - - diff --git a/Code/Framework/AzCore/AzCore/Driller/Driller.cpp b/Code/Framework/AzCore/AzCore/Driller/Driller.cpp deleted file mode 100644 index 41abd7793e..0000000000 --- a/Code/Framework/AzCore/AzCore/Driller/Driller.cpp +++ /dev/null @@ -1,304 +0,0 @@ -/* - * Copyright (c) Contributors to the Open 3D Engine Project. - * For complete copyright and license terms please see the LICENSE at the root of this distribution. - * - * SPDX-License-Identifier: Apache-2.0 OR MIT - * - */ - -#include -#include - -#include -#include -#include - - -namespace AZ -{ - namespace Debug - { - class DrillerManagerImpl - : public DrillerManager - { - public: - AZ_CLASS_ALLOCATOR(DrillerManagerImpl, OSAllocator, 0); - - typedef forward_list::type SessionListType; - SessionListType m_sessions; - typedef vector::type DrillerArrayType; - DrillerArrayType m_drillers; - - ~DrillerManagerImpl() override; - - void Register(Driller* factory) override; - void Unregister(Driller* factory) override; - - void FrameUpdate() override; - - DrillerSession* Start(DrillerOutputStream& output, const DrillerListType& drillerList, int numFrames = -1) override; - void Stop(DrillerSession* session) override; - - int GetNumDrillers() const override { return static_cast(m_drillers.size()); } - Driller* GetDriller(int index) override { return m_drillers[index]; } - }; - - ////////////////////////////////////////////////////////////////////////// - // Driller - - //========================================================================= - // Register - // [3/17/2011] - //========================================================================= - AZ::u32 Driller::GetId() const - { - return AZ::Crc32(GetName()); - } - - ////////////////////////////////////////////////////////////////////////// - - ////////////////////////////////////////////////////////////////////////// - // Driller Manager - - //========================================================================= - // Register - // [3/17/2011] - //========================================================================= - DrillerManager* DrillerManager::Create(/*const Descriptor& desc*/) - { - const bool createAllocator = !AZ::AllocatorInstance::IsReady(); - if (createAllocator) - { - AZ::AllocatorInstance::Create(); - } - - DrillerManagerImpl* impl = aznew DrillerManagerImpl; - impl->m_ownsOSAllocator = createAllocator; - return impl; - } - - //========================================================================= - // Register - // [3/17/2011] - //========================================================================= - void DrillerManager::Destroy(DrillerManager* manager) - { - const bool allocatorCreated = manager->m_ownsOSAllocator; - delete manager; - if (allocatorCreated) - { - AZ::AllocatorInstance::Destroy(); - } - } - - ////////////////////////////////////////////////////////////////////////// - - ////////////////////////////////////////////////////////////////////////// - // DrillerManagerImpl - - //========================================================================= - // ~DrillerManagerImpl - // [3/17/2011] - //========================================================================= - DrillerManagerImpl::~DrillerManagerImpl() - { - while (!m_sessions.empty()) - { - Stop(&m_sessions.front()); - } - - while (!m_drillers.empty()) - { - Driller* driller = m_drillers[0]; - Unregister(driller); - delete driller; - } - } - - //========================================================================= - // Register - // [3/17/2011] - //========================================================================= - void - DrillerManagerImpl::Register(Driller* driller) - { - AZ_Assert(driller, "You must provide a valid factory!"); - for (size_t i = 0; i < m_drillers.size(); ++i) - { - if (m_drillers[i]->GetId() == driller->GetId()) - { - AZ_Error("Debug", false, "Driller with id %08x has already been registered! You can't have two factory instances for the same driller type", driller->GetId()); - return; - } - } - m_drillers.push_back(driller); - } - - //========================================================================= - // Unregister - // [3/17/2011] - //========================================================================= - void - DrillerManagerImpl::Unregister(Driller* driller) - { - AZ_Assert(driller, "You must provide a valid factory!"); - for (DrillerArrayType::iterator iter = m_drillers.begin(); iter != m_drillers.end(); ++iter) - { - if ((*iter)->GetId() == driller->GetId()) - { - m_drillers.erase(iter); - return; - } - } - - AZ_Error("Debug", false, "Failed to find driller factory with id %08x", driller->GetId()); - } - - //========================================================================= - // FrameUpdate - // [3/17/2011] - //========================================================================= - void - DrillerManagerImpl::FrameUpdate() - { - if (m_sessions.empty()) - { - return; - } - - AZStd::lock_guard lock(DrillerEBusMutex::GetMutex()); ///< Make sure no driller is writing to the stream - for (SessionListType::iterator sessionIter = m_sessions.begin(); sessionIter != m_sessions.end(); ) - { - DrillerSession& s = *sessionIter; - - // tick the drillers directly if they care. - for (size_t i = 0; i < s.drillers.size(); ++i) - { - s.drillers[i]->Update(); - } - - s.output->EndTag(AZ_CRC("Frame", 0xb5f83ccd)); - - s.output->OnEndOfFrame(); - - s.curFrame++; - - if (s.numFrames != -1) - { - if (s.curFrame == s.numFrames) - { - Stop(&s); - continue; - } - } - - s.output->BeginTag(AZ_CRC("Frame", 0xb5f83ccd)); - s.output->Write(AZ_CRC("FrameNum", 0x85a1a919), s.curFrame); - - ++sessionIter; - } - } - - //========================================================================= - // Start - // [3/17/2011] - //========================================================================= - DrillerSession* - DrillerManagerImpl::Start(DrillerOutputStream& output, const DrillerListType& drillerList, int numFrames) - { - if (drillerList.empty()) - { - return nullptr; - } - - m_sessions.push_back(); - DrillerSession& s = m_sessions.back(); - s.curFrame = 0; - s.numFrames = numFrames; - s.output = &output; - - s.output->WriteHeader(); // first write the header in the stream - - s.output->BeginTag(AZ_CRC("StartData", 0xecf3f53f)); - s.output->Write(AZ_CRC("Platform", 0x3952d0cb), (unsigned int)g_currentPlatform); - for (DrillerListType::const_iterator iDriller = drillerList.begin(); iDriller != drillerList.end(); ++iDriller) - { - const DrillerInfo& di = *iDriller; - s.output->BeginTag(AZ_CRC("Driller", 0xa6e1fb73)); - s.output->Write(AZ_CRC("Name", 0x5e237e06), di.id); - for (int iParam = 0; iParam < (int)di.params.size(); ++iParam) - { - s.output->BeginTag(AZ_CRC("Param", 0xa4fa7c89)); - s.output->Write(AZ_CRC("Name", 0x5e237e06), di.params[iParam].name); - s.output->Write(AZ_CRC("Description", 0x6de44026), di.params[iParam].desc); - s.output->Write(AZ_CRC("Type", 0x8cde5729), di.params[iParam].type); - s.output->Write(AZ_CRC("Value", 0x1d775834), di.params[iParam].value); - s.output->EndTag(AZ_CRC("Param", 0xa4fa7c89)); - } - s.output->EndTag(AZ_CRC("Driller", 0xa6e1fb73)); - } - s.output->EndTag(AZ_CRC("StartData", 0xecf3f53f)); - - s.output->BeginTag(AZ_CRC("Frame", 0xb5f83ccd)); - s.output->Write(AZ_CRC("FrameNum", 0x85a1a919), s.curFrame); - - { - AZStd::lock_guard lock(DrillerEBusMutex::GetMutex()); ///< Make sure no driller is writing to the stream - for (DrillerListType::const_iterator iDriller = drillerList.begin(); iDriller != drillerList.end(); ++iDriller) - { - Driller* driller = nullptr; - const DrillerInfo& di = *iDriller; - for (size_t iDesc = 0; iDesc < m_drillers.size(); ++iDesc) - { - if (m_drillers[iDesc]->GetId() == di.id) - { - driller = m_drillers[iDesc]; - AZ_Assert(driller->m_output == nullptr, "Driller with id %08x is already have an output stream %p (currently we support only 1 at a time)", di.id, driller->m_output); - driller->m_output = &output; - driller->Start(di.params.data(), static_cast(di.params.size())); - s.drillers.push_back(driller); - break; - } - } - AZ_Warning("Driller", driller != nullptr, "We can't start a driller with id %d!", di.id); - } - } - return &s; - } - - - //========================================================================= - // Stop - // [3/17/2011] - //========================================================================= - void - DrillerManagerImpl::Stop(DrillerSession* session) - { - SessionListType::iterator iter; - for (iter = m_sessions.begin(); iter != m_sessions.end(); ++iter) - { - if (&*iter == session) - { - break; - } - } - - AZ_Assert(iter != m_sessions.end(), "We did not find session ID 0x%08x in the list!", session); - if (iter != m_sessions.end()) - { - DrillerSession& s = *session; - - { - AZStd::lock_guard lock(DrillerEBusMutex::GetMutex()); - for (size_t i = 0; i < s.drillers.size(); ++i) - { - s.drillers[i]->Stop(); - s.drillers[i]->m_output = nullptr; - } - } - s.output->EndTag(AZ_CRC("Frame", 0xb5f83ccd)); - m_sessions.erase(iter); - } - } - } // namespace Debug -} // namespace AZ diff --git a/Code/Framework/AzCore/AzCore/Driller/Driller.h b/Code/Framework/AzCore/AzCore/Driller/Driller.h deleted file mode 100644 index bb2178e51f..0000000000 --- a/Code/Framework/AzCore/AzCore/Driller/Driller.h +++ /dev/null @@ -1,141 +0,0 @@ -/* - * Copyright (c) Contributors to the Open 3D Engine Project. - * For complete copyright and license terms please see the LICENSE at the root of this distribution. - * - * SPDX-License-Identifier: Apache-2.0 OR MIT - * - */ -#ifndef AZCORE_DRILLER_H -#define AZCORE_DRILLER_H - -#include -namespace AZStd -{ - class mutex; -} -namespace AZ -{ - namespace Debug - { - class DrillerOutputStream; - - /** - * Driller base class. Every driller should inherit from this class. - * When a driller is need to start outputting data - * the DrillerManager will call Driller::Start() so the driller - * can output the initial state for all reported entities. - * The same applies for the Stop. - * Depending on the type of your driller you might choose to collect state - * even before the driller has started. This of course should be a fast as - * possible, as we don't want to burden engine systems and it's highly recommended - * that you use configuration parameters to change that behavior as not all drillers - * are used on a daily basis. - * All drillers should use DebugAllocators (AZ_CLASS_ALLOCATOR(Driller,OSAllocator,0)) - * and they should use 'aznew' to create one, as by default if you don't unregister a - * a driller, the manager will use "delete" to delete them. - * - * IMPORTANT: Driller systems works OUTSIDE engine systems, you should NOT use SystemAllocator or any other engine systems - * as they might be drilled or not available at the moment. - */ - class Driller - { - friend class DrillerManagerImpl; - - public: - struct Param - { - enum Type - { - PT_BOOL, - PT_INT, - PT_FLOAT - }; - const char* desc; - u32 name; - int type; - int value; - }; - - Driller() - : m_output(NULL) {} - virtual ~Driller() {} - - /// Returns the driller ID Crc32 of the name (Crc32(GetName()) - AZ::u32 GetId() const; - /// Driller group name, used only for organizational purpose - virtual const char* GroupName() const = 0; - /// Unique name of the Driller, driller ID is the Crc of the name - virtual const char* GetName() const = 0; - virtual const char* GetDescription() const = 0; - // @{ Managing the list of supported driller parameters. - virtual int GetNumParams() const { return 0; } - virtual const Param* GetParam(int index) const { (void)index; return NULL; } - - protected: - Driller& operator=(const Driller&); - - /// Called by DrillerManager - virtual void Start(const Param* params = NULL, int numParams = 0) { (void)params; (void)numParams; } - /// Called by DrillerManager - virtual void Stop() {} - /// Called every frame by DrillerManger (while the driller is started) - virtual void Update() {} - - DrillerOutputStream* m_output; ///< Session output stream. - }; - - /** - * Stores the information while an active - * driller(s) session is running. - */ - struct DrillerSession - { - int numFrames; - int curFrame; - typedef vector::type DrillerArrayType; - DrillerArrayType drillers; - DrillerOutputStream* output; - }; - - /** - * Driller manager will manage all active driller sessions and driller factories. Generally you will never - * need more than one driller manger. - * IMPORTANT: Driller systems works OUTSIDE engine systems, you should NOT use SystemAllocator or any other engine systems - * as they might be drilled or not available at the moment. - */ - class DrillerManager - { - friend class DrillerRemoteServer; - public: - struct DrillerInfo - { - AZ::u32 id; - vector::type params; - }; - typedef forward_list::type DrillerListType; - - virtual ~DrillerManager() {} - - static DrillerManager* Create(/*const Descriptor& desc*/); - static void Destroy(DrillerManager* manager); - - virtual void Register(Driller* driller) = 0; - virtual void Unregister(Driller* driller) = 0; - - virtual void FrameUpdate() = 0; - - virtual DrillerSession* Start(DrillerOutputStream& output, const DrillerListType& drillerList, int numFrames = -1) = 0; - virtual void Stop(DrillerSession* session) = 0; - - virtual int GetNumDrillers() const = 0; - virtual Driller* GetDriller(int index) = 0; - - private: - // If the manager created the allocator, it should destroy it when it gets destroyed - bool m_ownsOSAllocator = false; - }; - } -} - -#endif // AZCORE_DRILLER_H -#pragma once diff --git a/Code/Framework/AzCore/AzCore/Driller/DrillerBus.cpp b/Code/Framework/AzCore/AzCore/Driller/DrillerBus.cpp deleted file mode 100644 index 163db8a68b..0000000000 --- a/Code/Framework/AzCore/AzCore/Driller/DrillerBus.cpp +++ /dev/null @@ -1,68 +0,0 @@ -/* - * Copyright (c) Contributors to the Open 3D Engine Project. - * For complete copyright and license terms please see the LICENSE at the root of this distribution. - * - * SPDX-License-Identifier: Apache-2.0 OR MIT - * - */ - -#include - -#include -#include -#include - -namespace AZ -{ - namespace Debug - { - ////////////////////////////////////////////////////////////////////////// - // Globals - // We need to synchronize all driller evens, so we have proper order, and access to the data - // We use a global mutex which should be used for all driller operations. - // The mutex is held in an environment variable so it works across DLLs. - EnvironmentVariable s_drillerGlobalMutex; - ////////////////////////////////////////////////////////////////////////// - - - //========================================================================= - // lock - // [4/11/2011] - //========================================================================= - void DrillerEBusMutex::lock() - { - GetMutex().lock(); - } - - //========================================================================= - // try_lock - // [4/11/2011] - //========================================================================= - bool DrillerEBusMutex::try_lock() - { - return GetMutex().try_lock(); - } - - //========================================================================= - // unlock - // [4/11/2011] - //========================================================================= - void DrillerEBusMutex::unlock() - { - GetMutex().unlock(); - } - - //========================================================================= - // unlock - // [4/11/2011] - //========================================================================= - AZStd::recursive_mutex& DrillerEBusMutex::GetMutex() - { - if (!s_drillerGlobalMutex) - { - s_drillerGlobalMutex = Environment::CreateVariable(AZ_FUNCTION_SIGNATURE); - } - return *s_drillerGlobalMutex; - } - } // namespace Debug -} // namespace AZ diff --git a/Code/Framework/AzCore/AzCore/Driller/DrillerBus.h b/Code/Framework/AzCore/AzCore/Driller/DrillerBus.h deleted file mode 100644 index 4c625f007d..0000000000 --- a/Code/Framework/AzCore/AzCore/Driller/DrillerBus.h +++ /dev/null @@ -1,52 +0,0 @@ -/* - * Copyright (c) Contributors to the Open 3D Engine Project. - * For complete copyright and license terms please see the LICENSE at the root of this distribution. - * - * SPDX-License-Identifier: Apache-2.0 OR MIT - * - */ -#ifndef AZCORE_DRILLER_BUS_H -#define AZCORE_DRILLER_BUS_H - -#include -#include -#include - -namespace AZStd -{ - class mutex; -} - -namespace AZ -{ - namespace Debug - { - class DrillerEBusMutex - { - public: - typedef AZStd::recursive_mutex MutexType; - - static MutexType& GetMutex(); - void lock(); - bool try_lock(); - void unlock(); - }; - - /** - * Specialization of the EBusTraits for a driller bus. We make sure - * all allocation are made using DebugAllocation (so no engine systems are involved). - * In addition we make sure all driller buses use the same Mutex to synchronize data across - * threads (so all events came in order all the time), they are still executed in the context of - * the thread. - */ - struct DrillerEBusTraits - : public AZ::EBusTraits - { - typedef DrillerEBusMutex MutexType; - typedef OSStdAllocator AllocatorType; - }; - } -} - -#endif // AZCORE_DRILLER_BUS_H -#pragma once diff --git a/Code/Framework/AzCore/AzCore/Driller/DrillerRootHandler.h b/Code/Framework/AzCore/AzCore/Driller/DrillerRootHandler.h deleted file mode 100644 index 6a12c0cb8b..0000000000 --- a/Code/Framework/AzCore/AzCore/Driller/DrillerRootHandler.h +++ /dev/null @@ -1,170 +0,0 @@ -/* - * Copyright (c) Contributors to the Open 3D Engine Project. - * For complete copyright and license terms please see the LICENSE at the root of this distribution. - * - * SPDX-License-Identifier: Apache-2.0 OR MIT - * - */ -#ifndef AZCORE_DRILLER_ROOT_HANDLER_H -#define AZCORE_DRILLER_ROOT_HANDLER_H - -#include -#include - -namespace AZ -{ - namespace Debug - { - // Please check DrillerRootHandler class... this is the one for direct use. - - /** - * Handler for the tag. - */ - class DrillerDrillerdataHandler - : public DrillerHandlerParser - { - public: - class ParamHandler - : public DrillerHandlerParser - { - public: - virtual void OnData(const DrillerSAXParser::Data& dataNode) - { - if (dataNode.m_name == AZ_CRC("Name", 0x5e237e06)) - { - dataNode.Read(m_param->name); - } - else if (dataNode.m_name == AZ_CRC("Description", 0x6de44026)) - { - m_param->desc = NULL; // ignored - } - else if (dataNode.m_name == AZ_CRC("Type", 0x8cde5729)) - { - dataNode.Read(m_param->type); - } - else if (dataNode.m_name == AZ_CRC("Value", 0x1d775834)) - { - dataNode.Read(m_param->value); - } - } - Driller::Param* m_param; - }; - - virtual DrillerHandlerParser* OnEnterTag(u32 tagName) - { - if (tagName == AZ_CRC("Param", 0xa4fa7c89)) - { - m_drillerInfo->params.push_back(); - m_paramHandler.m_param = &m_drillerInfo->params.back(); - return &m_paramHandler; - } - return NULL; - } - - virtual void OnData(const DrillerSAXParser::Data& dataNode) - { - if (dataNode.m_name == AZ_CRC("Name", 0x5e237e06)) - { - dataNode.Read(m_drillerInfo->id); - } - } - - DrillerManager::DrillerInfo* m_drillerInfo; - ParamHandler m_paramHandler; - }; - - - /** - * Handler for the tag - */ - class DrillerStartdataHandler - : public DrillerHandlerParser - { - public: - virtual DrillerHandlerParser* OnEnterTag(u32 tagName) - { - if (tagName == AZ_CRC("Driller", 0xa6e1fb73)) - { - m_drillers.push_back(); - m_drillerDataHandler.m_drillerInfo = &m_drillers.back(); - return &m_drillerDataHandler; - } - return NULL; - } - virtual void OnData(const DrillerSAXParser::Data& dataNode) - { - if (dataNode.m_name == AZ_CRC("Platform", 0x3952d0cb)) - { - dataNode.Read(m_platform); - } - } - - unsigned int m_platform; - DrillerManager::DrillerListType m_drillers; - DrillerDrillerdataHandler m_drillerDataHandler; - }; - - /** - * Handler for the tag - */ - template - class FrameHandler - : public DrillerHandlerParser - { - public: - FrameHandler() - : DrillerHandlerParser(DrillerContainer::s_isWarnOnMissingDrillers) - , m_currentFrame(-1) {} - - virtual DrillerHandlerParser* OnEnterTag(u32 tagName) { return m_drillersContainer.FindDrillerHandler(tagName); } - virtual void OnData(const DrillerSAXParser::Data& dataNode) - { - if (dataNode.m_name == AZ_CRC("FrameNum", 0x85a1a919)) - { - dataNode.Read(m_currentFrame); - } - } - DrillerContainer m_drillersContainer; - int m_currentFrame; - }; - - /** - * Use this class a input parameter to DrillerSAXParserHandler::DrillerSAXParserHandler(). It will handle all root level - * tags for a standard driller input stream stream. - * - * DrillerContainer should comply to the following requirements: - * - default constructible - * - has a static const bool s_isWarnOnMissingDrillers member to indicate if you want to - * trigger a warning when a driller is not found in the class. - * - implement a function DrillerHandlerParser* DrillerContainer::FindDrillerHandler(u32 drillerName) - * - */ - template - class DrillerRootHandler - : public DrillerHandlerParser - { - public: - DrillerContainer* GetDrillerContainer() { return m_frameHandler.m_drillersContainer; } - - virtual DrillerHandlerParser* OnEnterTag(u32 tagName) - { - if (tagName == AZ_CRC("StartData", 0xecf3f53f)) - { - return &m_drillerSessionInfo; - } - if (tagName == AZ_CRC("Frame", 0xb5f83ccd)) - { - return &m_frameHandler; - } - return NULL; - } - DrillerStartdataHandler m_drillerSessionInfo; - FrameHandler m_frameHandler; - }; - } // namespace Debug -} // namespace AZ - -#endif // AZCORE_DRILLER_ROOT_HANDLER_H -#pragma once - - diff --git a/Code/Framework/AzCore/AzCore/Driller/Stream.cpp b/Code/Framework/AzCore/AzCore/Driller/Stream.cpp deleted file mode 100644 index 14e983b09c..0000000000 --- a/Code/Framework/AzCore/AzCore/Driller/Stream.cpp +++ /dev/null @@ -1,896 +0,0 @@ -/* - * Copyright (c) Contributors to the Open 3D Engine Project. - * For complete copyright and license terms please see the LICENSE at the root of this distribution. - * - * SPDX-License-Identifier: Apache-2.0 OR MIT - * - */ - -#include - -#include -#include -#include -#include -#include - -#include - -#if !defined(AZCORE_EXCLUDE_ZLIB) -# define AZ_FILE_STREAM_COMPRESSION -#endif // AZCORE_EXCLUDE_ZLIB - -#if defined(AZ_FILE_STREAM_COMPRESSION) -# include -#endif // AZ_FILE_STREAM_COMPRESSION - -namespace AZ -{ - namespace Debug - { - ////////////////////////////////////////////////////////////////////////// - ////////////////////////////////////////////////////////////////////////// - // Driller output stream - ////////////////////////////////////////////////////////////////////////// - ////////////////////////////////////////////////////////////////////////// - void DrillerOutputStream::Write(u32 name, const AZ::Vector3& v) - { - float data[4]; - unsigned int dataSize = 3 * sizeof(float); - v.StoreToFloat4(data); - StreamEntry de; - de.name = name; - de.sizeAndFlags = dataSize; - WriteBinary(de); - WriteBinary(data, dataSize); - } - void DrillerOutputStream::Write(u32 name, const AZ::Vector4& v) - { - float data[4]; - unsigned int dataSize = 4 * sizeof(float); - v.StoreToFloat4(data); - StreamEntry de; - de.name = name; - de.sizeAndFlags = dataSize; - WriteBinary(de); - WriteBinary(data, dataSize); - } - void DrillerOutputStream::Write(u32 name, const AZ::Aabb& aabb) - { - float data[7]; - unsigned int dataSize = 6 * sizeof(float); - aabb.GetMin().StoreToFloat4(data); - aabb.GetMax().StoreToFloat4(&data[3]); - StreamEntry de; - de.name = name; - de.sizeAndFlags = dataSize; - WriteBinary(de); - WriteBinary(data, dataSize); - } - void DrillerOutputStream::Write(u32 name, const AZ::Obb& obb) - { - float data[10]; - unsigned int dataSize = 10 * sizeof(float); // position (Vector3), rotation (Quaternion) and halfLengths (Vector3) - obb.GetPosition().StoreToFloat3(data); - obb.GetRotation().StoreToFloat4(&data[3]); - obb.GetHalfLengths().StoreToFloat3(&data[7]); - StreamEntry de; - de.name = name; - de.sizeAndFlags = dataSize; - WriteBinary(de); - WriteBinary(data, dataSize); - } - void DrillerOutputStream::Write(u32 name, const AZ::Transform& tm) - { - float data[12]; - unsigned int dataSize = 12 * sizeof(float); - const Matrix3x4 matrix3x4 = Matrix3x4::CreateFromTransform(tm); - matrix3x4.StoreToRowMajorFloat12(data); - StreamEntry de; - de.name = name; - de.sizeAndFlags = dataSize; - WriteBinary(de); - WriteBinary(data, dataSize); - } - void DrillerOutputStream::Write(u32 name, const AZ::Matrix3x3& tm) - { - float data[9]; - unsigned int dataSize = 9 * sizeof(float); - tm.StoreToRowMajorFloat9(data); - StreamEntry de; - de.name = name; - de.sizeAndFlags = dataSize; - WriteBinary(de); - WriteBinary(data, dataSize); - } - void DrillerOutputStream::Write(u32 name, const AZ::Matrix4x4& tm) - { - float data[16]; - unsigned int dataSize = 16 * sizeof(float); - tm.StoreToRowMajorFloat16(data); - StreamEntry de; - de.name = name; - de.sizeAndFlags = dataSize; - WriteBinary(de); - WriteBinary(data, dataSize); - } - void DrillerOutputStream::Write(u32 name, const AZ::Quaternion& tm) - { - float data[4]; - unsigned int dataSize = 4 * sizeof(float); - tm.StoreToFloat4(data); - StreamEntry de; - de.name = name; - de.sizeAndFlags = dataSize; - WriteBinary(de); - WriteBinary(data, dataSize); - } - void DrillerOutputStream::Write(u32 name, const AZ::Plane& plane) - { - Write(name, plane.GetPlaneEquationCoefficients()); - } - void DrillerOutputStream::WriteHeader() - { - StreamHeader sh; // StreamHeader should be endianess independent. - WriteBinary(&sh, sizeof(sh)); - } - - void DrillerOutputStream::WriteTimeUTC(u32 name) - { - AZStd::sys_time_t now = AZStd::GetTimeUTCMilliSecond(); - Write(name, now); - } - - void DrillerOutputStream::WriteTimeMicrosecond(u32 name) - { - AZStd::sys_time_t now = AZStd::GetTimeNowMicroSecond(); - Write(name, now); - } - - ////////////////////////////////////////////////////////////////////////// - ////////////////////////////////////////////////////////////////////////// - // Driller Input Stream - ////////////////////////////////////////////////////////////////////////// - ////////////////////////////////////////////////////////////////////////// - bool DrillerInputStream::ReadHeader() - { - DrillerOutputStream::StreamHeader sh; // StreamHeader should be endianess independent. - unsigned int numRead = ReadBinary(&sh, sizeof(sh)); - (void)numRead; - AZ_Error("IO", numRead == sizeof(sh), "We should have atleast %d bytes in the stream to read the header!", sizeof(sh)); - if (numRead != sizeof(sh)) - { - return false; - } - m_isEndianSwap = AZ::IsBigEndian(static_cast(sh.platform)) != AZ::IsBigEndian(AZ::g_currentPlatform); - return true; - } - - ////////////////////////////////////////////////////////////////////////// - ////////////////////////////////////////////////////////////////////////// - // Driller file stream - ////////////////////////////////////////////////////////////////////////// - ////////////////////////////////////////////////////////////////////////// - //========================================================================= - // DrillerOutputFileStream::DrillerOutputFileStream - // [3/23/2011] - //========================================================================= - DrillerOutputFileStream::DrillerOutputFileStream() - { -#if defined(AZ_FILE_STREAM_COMPRESSION) - m_zlib = azcreate(ZLib, (&AllocatorInstance::GetAllocator()), OSAllocator); - m_zlib->StartCompressor(2); -#endif - } - - //========================================================================= - // DrillerOutputFileStream::~DrillerOutputFileStream - // [3/23/2011] - //========================================================================= - DrillerOutputFileStream::~DrillerOutputFileStream() - { -#if defined(AZ_FILE_STREAM_COMPRESSION) - azdestroy(m_zlib, OSAllocator); -#endif - } - - //========================================================================= - // DrillerOutputFileStream::Open - // [3/23/2011] - //========================================================================= - bool DrillerOutputFileStream::Open(const char* fileName, int mode, int platformFlags) - { - if (IO::SystemFile::Open(fileName, mode, platformFlags)) - { - m_dataBuffer.reserve(100 * 1024); -#if defined(AZ_FILE_STREAM_COMPRESSION) - // // Enable optional: encode the file in the same format as the streamer so they are interchangeable - // IO::CompressorHeader ch; - // ch.SetAZCS(); - // ch.m_compressorId = IO::CompressorZLib::TypeId(); - // ch.m_uncompressedSize = 0; // will be updated later - // AZStd::endian_swap(ch.m_compressorId); - // AZStd::endian_swap(ch.m_uncompressedSize); - // IO::SystemFile::Write(&ch,sizeof(ch)); - // IO::CompressorZLibHeader zlibHdr; - // zlibHdr.m_numSeekPoints = 0; - // IO::SystemFile::Write(&zlibHdr,sizeof(zlibHdr)); -#endif - return true; - } - return false; - } - - //========================================================================= - // DrillerOutputFileStream::Close - // [3/23/2011] - //========================================================================= - void DrillerOutputFileStream::Close() - { - unsigned int dataSizeInBuffer = static_cast(m_dataBuffer.size()); - { -#if defined(AZ_FILE_STREAM_COMPRESSION) - unsigned int minCompressBufferSize = m_zlib->GetMinCompressedBufferSize(dataSizeInBuffer); - if (m_compressionBuffer.size() < minCompressBufferSize) // grow compression buffer if needed - { - m_compressionBuffer.clear(); - m_compressionBuffer.resize(minCompressBufferSize); - } - unsigned int compressedSize; - do - { - compressedSize = m_zlib->Compress(m_dataBuffer.data(), dataSizeInBuffer, m_compressionBuffer.data(), (unsigned)m_compressionBuffer.size(), ZLib::FT_FINISH); - if (compressedSize) - { - IO::SystemFile::Write(m_compressionBuffer.data(), compressedSize); - } - } while (compressedSize > 0); - m_zlib->ResetCompressor(); -#else - if (dataSizeInBuffer) - { - IO::SystemFile::Write(m_dataBuffer.data(), m_dataBuffer.size()); - } -#endif - m_dataBuffer.clear(); - } - IO::SystemFile::Close(); - } - //========================================================================= - // DrillerOutputFileStream::WriteBinary - // [3/23/2011] - //========================================================================= - void DrillerOutputFileStream::WriteBinary(const void* data, unsigned int dataSize) - { - size_t dataSizeInBuffer = m_dataBuffer.size(); - if (dataSizeInBuffer + dataSize > m_dataBuffer.capacity()) - { - if (dataSizeInBuffer > 0) - { -#if defined(AZ_FILE_STREAM_COMPRESSION) - // we need to flush the data - unsigned int dataToCompress = static_cast(dataSizeInBuffer); - unsigned int minCompressBufferSize = m_zlib->GetMinCompressedBufferSize(dataToCompress); - if (m_compressionBuffer.size() < minCompressBufferSize) // grow compression buffer if needed - { - m_compressionBuffer.clear(); - m_compressionBuffer.resize(minCompressBufferSize); - } - while (dataToCompress > 0) - { - unsigned int compressedSize = m_zlib->Compress(m_dataBuffer.data(), dataToCompress, m_compressionBuffer.data(), (unsigned)m_compressionBuffer.size()); - if (compressedSize) - { - IO::SystemFile::Write(m_compressionBuffer.data(), compressedSize); - } - } -#else - IO::SystemFile::Write(m_dataBuffer.data(), m_dataBuffer.size()); -#endif - m_dataBuffer.clear(); - } - } - m_dataBuffer.insert(m_dataBuffer.end(), reinterpret_cast(data), reinterpret_cast(data) + dataSize); - } - - ////////////////////////////////////////////////////////////////////////// - ////////////////////////////////////////////////////////////////////////// - // Driller file input stream - ////////////////////////////////////////////////////////////////////////// - ////////////////////////////////////////////////////////////////////////// - - //========================================================================= - // DrillerInputFileStream::DrillerInputFileStream - // [3/23/2011] - //========================================================================= - DrillerInputFileStream::DrillerInputFileStream() - { -#if defined(AZ_FILE_STREAM_COMPRESSION) - m_zlib = azcreate(ZLib, (&AllocatorInstance::GetAllocator()), OSAllocator); - m_zlib->StartDecompressor(); -#endif - } - - //========================================================================= - // DrillerInputFileStream::DrillerInputFileStream - // [3/23/2011] - //========================================================================= - DrillerInputFileStream::~DrillerInputFileStream() - { -#if defined(AZ_FILE_STREAM_COMPRESSION) - azdestroy(m_zlib, OSAllocator); -#endif - } - - //========================================================================= - // DrillerInputFileStream::Open - // [3/23/2011] - //========================================================================= - bool DrillerInputFileStream::Open(const char* fileName, int mode, int platformFlags) - { - if (IO::SystemFile::Open(fileName, mode, platformFlags)) - { - DrillerOutputStream::StreamHeader sh; -#if defined(AZ_FILE_STREAM_COMPRESSION) - // TODO: optional encode the file in the same format as the streamer so they are interchangeable -#endif - // first read the header of the stream file. - return ReadHeader(); - } - return false; - } - //========================================================================= - // DrillerInputFileStream::ReadBinary - // [3/23/2011] - //========================================================================= - unsigned int DrillerInputFileStream::ReadBinary(void* data, unsigned int maxDataSize) - { - // make sure the compressed buffer if full enough... - size_t dataToLoad = maxDataSize * 2; - m_compressedData.reserve(dataToLoad); - while (m_compressedData.size() < dataToLoad) - { - unsigned char buffer[10 * 1024]; - IO::SystemFile::SizeType bytesRead = Read(AZ_ARRAY_SIZE(buffer), buffer); - if (bytesRead > 0) - { - m_compressedData.insert(m_compressedData.end(), (unsigned char*)buffer, buffer + bytesRead); - } - if (bytesRead < AZ_ARRAY_SIZE(buffer)) - { - break; - } - } -#if defined(AZ_FILE_STREAM_COMPRESSION) - unsigned int dataSize = maxDataSize; - unsigned int bytesProcessed = m_zlib->Decompress(m_compressedData.data(), (unsigned)m_compressedData.size(), data, dataSize); - unsigned int readSize = maxDataSize - dataSize; // Zlib::Decompress decrements the dataSize parameter by the amount uncompressed -#else - unsigned int bytesProcessed = AZStd::GetMin((unsigned int)m_compressedData.size(), maxDataSize); - unsigned int readSize = bytesProcessed; - memcpy(data, m_compressedData.data(), readSize); -#endif - m_compressedData.erase(m_compressedData.begin(), m_compressedData.begin() + bytesProcessed); - return readSize; - } - - //========================================================================= - // DrillerInputFileStream::Close - // [3/23/2011] - //========================================================================= - void DrillerInputFileStream::Close() - { -#if defined(AZ_FILE_STREAM_COMPRESSION) - if (m_zlib) - { - m_zlib->ResetDecompressor(); - } -#endif // AZ_FILE_STREAM_COMPRESSION - AZ::IO::SystemFile::Close(); - } - - ////////////////////////////////////////////////////////////////////////// - ////////////////////////////////////////////////////////////////////////// - // DrillerSAXParser - ////////////////////////////////////////////////////////////////////////// - ////////////////////////////////////////////////////////////////////////// - //========================================================================= - // DrillerSAXParser - // [3/23/2011] - //========================================================================= - DrillerSAXParser::DrillerSAXParser(const TagCallbackType& tcb, const DataCallbackType& dcb) - : m_tagCallback(tcb) - , m_dataCallback(dcb) - { - } - - //========================================================================= - // ProcessStream - // [3/23/2011] - //========================================================================= - void - DrillerSAXParser::ProcessStream(DrillerInputStream& stream) - { - static const int processChunkSize = 15 * 1024; - char buffer[processChunkSize]; - unsigned int dataSize; - bool isEndianSwap = stream.IsEndianSwap(); - while ((dataSize = stream.ReadBinary(buffer, processChunkSize)) > 0) - { - char* dataStart = buffer; - char* dataEnd = dataStart + dataSize; - bool dataInBuffer = false; - if (!m_buffer.empty()) - { - m_buffer.insert(m_buffer.end(), dataStart, dataEnd); - dataStart = m_buffer.data(); - dataEnd = dataStart + m_buffer.size(); - dataInBuffer = true; - } - const int entrySize = sizeof(DrillerOutputStream::StreamEntry); - while (dataStart != dataEnd) - { - if ((dataEnd - dataStart) < entrySize) // we need at least one entry to proceed - { - // not enough data to process, buffer it. - if (!dataInBuffer) - { - m_buffer.insert(m_buffer.end(), dataStart, dataEnd); - } - break; - } - - DrillerOutputStream::StreamEntry* se = reinterpret_cast(dataStart); - if (isEndianSwap) - { - // endian swap - AZStd::endian_swap(se->name); - AZStd::endian_swap(se->sizeAndFlags); - } - - u32 dataType = (se->sizeAndFlags & DrillerOutputStream::StreamEntry::dataInternalMask) >> DrillerOutputStream::StreamEntry::dataInternalShift; - u32 value = se->sizeAndFlags & DrillerOutputStream::StreamEntry::dataSizeMask; - Data de; - de.m_name = se->name; - de.m_stringPool = stream.GetStringPool(); - de.m_isPooledString = false; - de.m_isPooledStringCrc32 = false; - switch (dataType) - { - case DrillerOutputStream::StreamEntry::INT_TAG: - { - bool isStart = (value != 0); - m_tagCallback(se->name, isStart); - dataStart += entrySize; - } break; - case DrillerOutputStream::StreamEntry::INT_DATA_U8: - { - u8 value8 = static_cast(value); - de.m_data = &value8; - de.m_dataSize = 1; - de.m_isEndianSwap = false; - m_dataCallback(de); - dataStart += entrySize; - } break; - case DrillerOutputStream::StreamEntry::INT_DATA_U16: - { - u16 value16 = static_cast(value); - de.m_data = &value16; - de.m_dataSize = 2; - de.m_isEndianSwap = false; - m_dataCallback(de); - dataStart += entrySize; - } break; - case DrillerOutputStream::StreamEntry::INT_DATA_U29: - { - de.m_data = &value; - de.m_dataSize = 4; - de.m_isEndianSwap = false; - m_dataCallback(de); - dataStart += entrySize; - } break; - case DrillerOutputStream::StreamEntry::INT_POOLED_STRING: - { - unsigned int userDataSize = value; - if ((userDataSize + entrySize) <= (unsigned)(dataEnd - dataStart)) - { - // Add string to the pool - AZ_Assert(de.m_stringPool != nullptr, "We require a string pool to parse this stream"); - AZ::u32 crc32; - const char* stringPtr; - dataStart += entrySize; - de.m_stringPool->InsertCopy(reinterpret_cast(dataStart), userDataSize, crc32, &stringPtr); - de.m_dataSize = userDataSize; - de.m_isEndianSwap = isEndianSwap; - de.m_isPooledString = true; - de.m_data = const_cast(static_cast(stringPtr)); - m_dataCallback(de); - dataStart += userDataSize; - } - else - { - // we can't process data right now add it to the buffer (if we have not done that already) - if (!dataInBuffer) - { - m_buffer.insert(m_buffer.end(), dataStart, dataEnd); - } - dataEnd = dataStart; // exit the loop - } - } break; - case DrillerOutputStream::StreamEntry::INT_POOLED_STRING_CRC32: - { - de.m_isPooledStringCrc32 = true; - AZ_Assert(value == 4, "The data size for a pooled string crc32 should be 4 bytes!"); - } // continue to INT_SIZE - case DrillerOutputStream::StreamEntry::INT_SIZE: - { - unsigned int userDataSize = value; - if ((userDataSize + entrySize) <= (unsigned)(dataEnd - dataStart)) // do we have all the date we need to process... - { - dataStart += entrySize; - de.m_data = dataStart; - de.m_dataSize = userDataSize; - de.m_isEndianSwap = isEndianSwap; - m_dataCallback(de); - dataStart += userDataSize; - } - else - { - // we can't process data right now add it to the buffer (if we have not done that already) - if (!dataInBuffer) - { - m_buffer.insert(m_buffer.end(), dataStart, dataEnd); - } - dataEnd = dataStart; // exit the loop - } - } break; - default: - { - AZ_Error("DrillerSAXParser",false,"Encounted unknown symbol (%i) while processing stream (%s). Aborting stream.\n",dataType, stream.GetIdentifier()); - - // If we can't process anything, we want to just escape the loop, to avoid spinning infinitely - dataEnd = dataStart; - } break; - } - } - if (dataInBuffer) // if the data was in the buffer remove the processed data! - { - m_buffer.erase(m_buffer.begin(), m_buffer.begin() + (dataStart - m_buffer.data())); - } - } - } - - void DrillerSAXParser::Data::Read(AZ::Vector3& v) const - { - AZ_Assert(m_dataSize == sizeof(float) * 3, "We are expecting 3 floats for Vector3 element 0x%08x with size %d bytes", m_name, m_dataSize); - float* data = reinterpret_cast(m_data); - if (m_isEndianSwap) - { - AZStd::endian_swap(data, data + 3); - m_isEndianSwap = false; - } - v = Vector3::CreateFromFloat3(data); - } - void DrillerSAXParser::Data::Read(AZ::Vector4& v) const - { - AZ_Assert(m_dataSize == sizeof(float) * 4, "We are expecting 4 floats for Vector4 element 0x%08x with size %d bytes", m_name, m_dataSize); - float* data = reinterpret_cast(m_data); - if (m_isEndianSwap) - { - AZStd::endian_swap(data, data + 4); - m_isEndianSwap = false; - } - v = Vector4::CreateFromFloat4(data); - } - void DrillerSAXParser::Data::Read(AZ::Aabb& aabb) const - { - AZ_Assert(m_dataSize == sizeof(float) * 6, "We are expecting 6 floats for Aabb element 0x%08x with size %d bytes", m_name, m_dataSize); - float* data = reinterpret_cast(m_data); - if (m_isEndianSwap) - { - AZStd::endian_swap(data, data + 6); - m_isEndianSwap = false; - } - Vector3 min = Vector3::CreateFromFloat3(data); - Vector3 max = Vector3::CreateFromFloat3(&data[3]); - aabb = Aabb::CreateFromMinMax(min, max); - } - void DrillerSAXParser::Data::Read(AZ::Obb& obb) const - { - AZ_Assert(m_dataSize == sizeof(float) * 10, "We are expecting 10 floats for Obb element 0x%08x with size %d bytes", m_name, m_dataSize); - float* data = reinterpret_cast(m_data); - if (m_isEndianSwap) - { - AZStd::endian_swap(data, data + 10); - m_isEndianSwap = false; - } - Vector3 position = Vector3::CreateFromFloat3(data); - Quaternion rotation = Quaternion::CreateFromFloat4(&data[3]); - Vector3 halfLengths = Vector3::CreateFromFloat3(&data[7]); - obb = Obb::CreateFromPositionRotationAndHalfLengths(position, rotation, halfLengths); - } - void DrillerSAXParser::Data::Read(AZ::Transform& tm) const - { - AZ_Assert(m_dataSize == sizeof(float) * 12, "We are expecting 12 floats for Transform element 0x%08x with size %d bytes", m_name, m_dataSize); - float* data = reinterpret_cast(m_data); - if (m_isEndianSwap) - { - AZStd::endian_swap(data, data + 12); - m_isEndianSwap = false; - } - const Matrix3x4 matrix3x4 = Matrix3x4::CreateFromRowMajorFloat12(data); - tm = Transform::CreateFromMatrix3x4(matrix3x4); - } - void DrillerSAXParser::Data::Read(AZ::Matrix3x3& tm) const - { - AZ_Assert(m_dataSize == sizeof(float) * 9, "We are expecting 9 floats for Matrix3x3 element 0x%08x with size %d bytes", m_name, m_dataSize); - float* data = reinterpret_cast(m_data); - if (m_isEndianSwap) - { - AZStd::endian_swap(data, data + 9); - m_isEndianSwap = false; - } - tm = Matrix3x3::CreateFromRowMajorFloat9(data); - } - void DrillerSAXParser::Data::Read(AZ::Matrix4x4& tm) const - { - AZ_Assert(m_dataSize == sizeof(float) * 16, "We are expecting 16 floats for Matrix4x4 element 0x%08x with size %d bytes", m_name, m_dataSize); - float* data = reinterpret_cast(m_data); - if (m_isEndianSwap) - { - AZStd::endian_swap(data, data + 16); - m_isEndianSwap = false; - } - tm = Matrix4x4::CreateFromRowMajorFloat16(data); - } - void DrillerSAXParser::Data::Read(AZ::Quaternion& tm) const - { - AZ_Assert(m_dataSize == sizeof(float) * 4, "We are expecting 4 floats for Quaternion element 0x%08x with size %d bytes", m_name, m_dataSize); - float* data = reinterpret_cast(m_data); - if (m_isEndianSwap) - { - AZStd::endian_swap(data, data + 4); - m_isEndianSwap = false; - } - tm = Quaternion::CreateFromFloat4(data); - } - void DrillerSAXParser::Data::Read(AZ::Plane& plane) const - { - AZ::Vector4 coeff; - Read(coeff); - plane = Plane::CreateFromCoefficients(coeff.GetX(), coeff.GetY(), coeff.GetZ(), coeff.GetW()); - } - - const char* DrillerSAXParser::Data::PrepareString(unsigned int& stringLength) const - { - const char* srcData = reinterpret_cast(m_data); - stringLength = m_dataSize; - if (m_stringPool) - { - AZ::u32 crc32; - const char* stringPtr; - if (m_isPooledStringCrc32) - { - crc32 = *reinterpret_cast(m_data); - if (m_isEndianSwap) - { - AZStd::endian_swap(crc32); - } - stringPtr = m_stringPool->Find(crc32); - AZ_Assert(stringPtr != nullptr, "Failed to find string with id 0x%08x in the string pool, proper stream read is impossible!", crc32); - stringLength = static_cast(strlen(stringPtr)); - } - else if (m_isPooledString) - { - stringPtr = srcData; // already stored in the pool just transfer the pointer - } - else - { - // Store copy of the string in the pool to save memory (keep only one reference of the string). - m_stringPool->InsertCopy(reinterpret_cast(srcData), stringLength, crc32, &stringPtr); - } - srcData = stringPtr; - } - else - { - AZ_Assert(m_isPooledString == false && m_isPooledStringCrc32 == false, "This stream requires using of a string pool as the string is send only once and afterwards only the Crc32 is used!"); - } - return srcData; - } - - ////////////////////////////////////////////////////////////////////////// - ////////////////////////////////////////////////////////////////////////// - // DrillerDOMParser - ////////////////////////////////////////////////////////////////////////// - ////////////////////////////////////////////////////////////////////////// - - //========================================================================= - // Node::GetTag - // [1/23/2013] - //========================================================================= - const DrillerDOMParser::Node* DrillerDOMParser::Node::GetTag(u32 tagName) const - { - const Node* tagNode = nullptr; - for (Node::NodeListType::const_iterator i = m_tags.begin(); i != m_tags.end(); ++i) - { - if ((*i).m_name == tagName) - { - tagNode = &*i; - break; - } - } - return tagNode; - } - - //========================================================================= - // Node::GetData - // [3/23/2011] - //========================================================================= - const DrillerDOMParser::Data* DrillerDOMParser::Node::GetData(u32 dataName) const - { - const Data* dataNode = nullptr; - for (Node::DataListType::const_iterator i = m_data.begin(); i != m_data.end(); ++i) - { - if (i->m_name == dataName) - { - dataNode = &*i; - break; - } - } - return dataNode; - } - - //========================================================================= - // DrillerDOMParser - // [3/23/2011] - //========================================================================= - DrillerDOMParser::DrillerDOMParser(bool isPersistentInputData) - : DrillerSAXParser(TagCallbackType(this, &DrillerDOMParser::OnTag), DataCallbackType(this, &DrillerDOMParser::OnData)) - , m_isPersistentInputData(isPersistentInputData) - { - m_root.m_name = 0; - m_root.m_parent = nullptr; - m_topNode = &m_root; - } - static int g_numFree = 0; - //========================================================================= - // ~DrillerDOMParser - // [3/23/2011] - //========================================================================= - DrillerDOMParser::~DrillerDOMParser() - { - DeleteNode(m_root); - } - - //========================================================================= - // OnTag - // [3/23/2011] - //========================================================================= - void - DrillerDOMParser::OnTag(AZ::u32 name, bool isOpen) - { - if (isOpen) - { - m_topNode->m_tags.push_back(); - Node& node = m_topNode->m_tags.back(); - node.m_name = name; - node.m_parent = m_topNode; - - m_topNode = &node; - } - else - { - AZ_Assert(m_topNode->m_name == name, "We have opened tag with name 0x%08x and closing with name 0x%08x", m_topNode->m_name, name); - m_topNode = m_topNode->m_parent; - } - } - //========================================================================= - // OnData - // [3/23/2011] - //========================================================================= - void - DrillerDOMParser::OnData(const Data& data) - { - Data de = data; - if (!m_isPersistentInputData) - { - de.m_data = azmalloc(data.m_dataSize, 1, OSAllocator); - memcpy(const_cast(de.m_data), data.m_data, data.m_dataSize); - } - m_topNode->m_data.push_back(de); - } - //========================================================================= - // DeleteNode - // [3/23/2011] - //========================================================================= - void - DrillerDOMParser::DeleteNode(Node& node) - { - if (!m_isPersistentInputData) - { - for (Node::DataListType::iterator iter = node.m_data.begin(); iter != node.m_data.end(); ++iter) - { - azfree(iter->m_data, OSAllocator, iter->m_dataSize); - ++g_numFree; - } - node.m_data.clear(); - } - for (Node::NodeListType::iterator iter = node.m_tags.begin(); iter != node.m_tags.end(); ++iter) - { - DeleteNode(*iter); - } - node.m_tags.clear(); - } - - ////////////////////////////////////////////////////////////////////////// - ////////////////////////////////////////////////////////////////////////// - // DrillerSAXParserHandler - ////////////////////////////////////////////////////////////////////////// - ////////////////////////////////////////////////////////////////////////// - - //========================================================================= - // DrillerSAXParserHandler - // [3/14/2013] - //========================================================================= - DrillerSAXParserHandler::DrillerSAXParserHandler(DrillerHandlerParser* rootHandler) - : DrillerSAXParser(TagCallbackType(this, &DrillerSAXParserHandler::OnTag), DataCallbackType(this, &DrillerSAXParserHandler::OnData)) - { - // Push the root element - m_stack.push_back(rootHandler); - } - - //========================================================================= - // OnTag - // [3/14/2013] - //========================================================================= - void DrillerSAXParserHandler::OnTag(u32 name, bool isOpen) - { - if (m_stack.size() == 0) - { - return; - } - - DrillerHandlerParser* childHandler = nullptr; - DrillerHandlerParser* currentHandler = m_stack.back(); - if (isOpen) - { - if (currentHandler != nullptr) - { - childHandler = currentHandler->OnEnterTag(name); - AZ_Warning("Driller", !currentHandler->IsWarnOnUnsupportedTags() || childHandler != nullptr, "Could not find handler for tag 0x%08x", name); - } - m_stack.push_back(childHandler); - } - else - { - m_stack.pop_back(); - if (m_stack.size() > 0) - { - DrillerHandlerParser* parentHandler = m_stack.back(); - if (parentHandler) - { - parentHandler->OnExitTag(currentHandler, name); - } - } - } - } - - //========================================================================= - // OnData - // [3/14/2013] - //========================================================================= - void DrillerSAXParserHandler::OnData(const DrillerSAXParser::Data& data) - { - if (m_stack.size() == 0) - { - return; - } - - DrillerHandlerParser* currentHandler = m_stack.back(); - if (currentHandler) - { - currentHandler->OnData(data); - } - } - } // namespace Debug -} // namespace AZ diff --git a/Code/Framework/AzCore/AzCore/Driller/Stream.h b/Code/Framework/AzCore/AzCore/Driller/Stream.h deleted file mode 100644 index 5efa416ef4..0000000000 --- a/Code/Framework/AzCore/AzCore/Driller/Stream.h +++ /dev/null @@ -1,848 +0,0 @@ -/* - * Copyright (c) Contributors to the Open 3D Engine Project. - * For complete copyright and license terms please see the LICENSE at the root of this distribution. - * - * SPDX-License-Identifier: Apache-2.0 OR MIT - * - */ -#ifndef AZCORE_DRILLER_STREAM_H -#define AZCORE_DRILLER_STREAM_H - -#include - -#include -#include -#include -#include -#include - -#include // for the Driller direct file stream -#include -#include - -namespace AZ -{ - class Vector3; - class Vector4; - class Aabb; - class Obb; - class Transform; - class Matrix3x3; - class Matrix4x4; - class Quaternion; - class Plane; - class ZLib; - - namespace IO - { - class Stream; - } - - namespace Debug - { - template - struct vector - { - typedef AZStd::vector type; - }; - - template - struct forward_list - { - typedef AZStd::forward_list type; - }; - - /** - * Interface for a string pool which can be used by input/output streams to avoid storing multiple copies of the same - * string in the stream. Of course this comes at the bookkeeping cost of the table. - */ - class DrillerStringPool - { - public: - virtual ~DrillerStringPool() {} - - /** - * Add a copy of the string to the pool. If we return true the string was added otherwise it was already in the bool. - * In both cases the crc32 of the string and the pointer to the shared copy is returned (optional for poolStringAddress)! - */ - virtual bool InsertCopy(const char* string, unsigned int length, AZ::u32& crc32, const char** poolStringAddress = NULL) = 0; - - /** - * Same as the InsertCopy above without actually coping the string into the pool. The pool assumes that - * none of the strings added to the pool will be deleted. - */ - virtual bool Insert(const char* string, unsigned int length, AZ::u32& crc32) = 0; - - /// Finds a string in the pool by crc32. - virtual const char* Find(AZ::u32 crc32) = 0; - - virtual void Erase(AZ::u32 crc32) = 0; - - /// Clears all the strings in the pool, make sure you don't reference any strings before you call that function. - virtual void Reset() = 0; - }; - - /** - * - */ - class DrillerOutputStream - { - protected: - friend class DrillerManagerImpl; - friend class DrillerSAXParser; - struct StreamEntry - { - enum InternalDataSize // max 8 values as we use 3 bit to store them - { - INT_SIZE = 0, ///< No internal data, we store the data size. IMPORTANT: INT_SIZE should be 0 the code makes assumptions based on that - INT_TAG, ///< True if this entry is tag - INT_DATA_U8, ///< Internal data u8 stored (1 byte) - INT_DATA_U16, ///< Internal data u16 stored (2 bytes) - INT_DATA_U29, ///< Internal data u32 stored (4 bytes) for which we use only the first 29 bits. - INT_POOLED_STRING_CRC32, ///< Data size should be 4 bytes crc32 that a string CRC and it require string pool. - INT_POOLED_STRING, ///< This data contains a string which should be inserted in the string pool. - }; - static const u32 dataSizeMask = 0x1fffffff; - static const u32 dataInternalMask = 0xE0000000; - static const u32 dataInternalShift = 29; - - u32 name; ///< data or tag name - u32 sizeAndFlags; ///< - }; - - template - struct IntergralType; - - template - struct IntergralType - { - static void Write(DrillerOutputStream& stream, u32 name, const T& data) - { - StreamEntry de; - de.name = name; - de.sizeAndFlags = (u32)(StreamEntry::INT_DATA_U8) << StreamEntry::dataInternalShift; - de.sizeAndFlags |= *reinterpret_cast(&data); - stream.WriteBinary(de); - } - }; - template - struct IntergralType - { - static void Write(DrillerOutputStream& stream, u32 name, const T& data) - { - StreamEntry de; - de.name = name; - de.sizeAndFlags = (u32)(StreamEntry::INT_DATA_U16) << StreamEntry::dataInternalShift; - de.sizeAndFlags |= *reinterpret_cast(&data); - stream.WriteBinary(de); - } - }; - template - struct IntergralType - { - static void Write(DrillerOutputStream& stream, u32 name, const T& data) - { - StreamEntry de; - de.name = name; - const u32* uintData = reinterpret_cast(&data); - if (((*uintData) & StreamEntry::dataSizeMask) == *uintData) // check if we can store it internally - { - de.sizeAndFlags = (u32)(StreamEntry::INT_DATA_U29) << StreamEntry::dataInternalShift; - de.sizeAndFlags |= *uintData; - stream.WriteBinary(de); - } - else - { - de.sizeAndFlags = 4; - stream.WriteBinary(de); - stream.WriteBinary(&data, de.sizeAndFlags); - } - } - }; - template - struct IntergralType - { - static void Write(DrillerOutputStream& stream, u32 name, const T& data) - { - StreamEntry de; - de.name = name; - const u64* uintData = reinterpret_cast(&data); - if (((*uintData) & static_cast(StreamEntry::dataSizeMask)) == *uintData) // check if we can store it internally - { - de.sizeAndFlags = (u32)(StreamEntry::INT_DATA_U29) << StreamEntry::dataInternalShift; - de.sizeAndFlags |= static_cast(*uintData); - stream.WriteBinary(de); - } - else - { - de.sizeAndFlags = 8; - stream.WriteBinary(de); - stream.WriteBinary(&data, de.sizeAndFlags); - } - } - }; - template - struct IntergralType - { - static void Write(DrillerOutputStream& stream, u32 name, const T* pointer) - { - size_t id = reinterpret_cast(pointer); - IntergralType::Write(stream, name, id); - } - }; - - public: - /** - * Each stream with start with this header, before anything else. - */ - struct StreamHeader - { - StreamHeader() - : platform((u8)g_currentPlatform) {} - u8 platform; - }; - - DrillerOutputStream(DrillerStringPool* stringPool = NULL) - : m_stringPool(stringPool) { } - virtual ~DrillerOutputStream() {} - - ////////////////////////////////////////////////////////////////////////// - // Write - inline void BeginTag(u32 name) - { - StreamEntry de; - de.name = name; - de.sizeAndFlags = (u32)(StreamEntry::INT_TAG) << StreamEntry::dataInternalShift; - de.sizeAndFlags |= 1; // true - open tag - WriteBinary(de); - } - inline void EndTag(u32 name) - { - StreamEntry de; - de.name = name; - de.sizeAndFlags = (u32)(StreamEntry::INT_TAG) << StreamEntry::dataInternalShift; - WriteBinary(de); - } - - ////////////////////////////////////////////////////////////////////////// - // Generic - template - inline void Write(u32 name, const T& data) - { - // User should handle non specialized non integral types. - IntergralType::value || AZStd::is_enum::value>::Write(*this, name, data); - } - - ////////////////////////////////////////////////////////////////////////// - // Binary and strings - inline void Write(u32 name, const void* data, unsigned int dataSize) - { - StreamEntry de; - de.name = name; - de.sizeAndFlags = dataSize; - WriteBinary(de); - WriteBinary(data, dataSize); - } - inline void Write(u32 name, const char* string, bool isCopyString = true) - { - StreamEntry de; - de.name = name; - de.sizeAndFlags = static_cast(strlen(string)); - AZ_Assert(de.sizeAndFlags <= StreamEntry::dataSizeMask, "Invalid string length! String is too long, length is limited to %u bytes!", StreamEntry::dataSizeMask); - ; - if (m_stringPool) - { - AZ::u32 crc; - bool isInserted = isCopyString ? m_stringPool->InsertCopy(string, de.sizeAndFlags, crc) : m_stringPool->Insert(string, de.sizeAndFlags, crc); - if (!isInserted) // if already inserted, it means it's in the stream, so store the crc only. - { - de.sizeAndFlags = (u32)(StreamEntry::INT_POOLED_STRING_CRC32) << StreamEntry::dataInternalShift; - de.sizeAndFlags |= sizeof(crc); - WriteBinary(de); - WriteBinary(&crc, sizeof(crc)); - } - else - { - AZ::u32 stringSize = de.sizeAndFlags; - de.sizeAndFlags |= (u32)(StreamEntry::INT_POOLED_STRING) << StreamEntry::dataInternalShift; - WriteBinary(de); - WriteBinary(string, stringSize); - } - } - else - { - WriteBinary(de); - WriteBinary(string, de.sizeAndFlags); - } - } - template - inline void Write(u32 name, const AZStd::basic_string& str, bool isCopyString = true) - { - StreamEntry de; - de.name = name; - de.sizeAndFlags = static_cast(str.size()); - AZ_Assert(de.sizeAndFlags <= StreamEntry::dataSizeMask, "Invalid string length! String is too long, length is limited to %u bytes!", StreamEntry::dataSizeMask); - if (m_stringPool) - { - AZ::u32 crc; - bool isInserted = isCopyString ? m_stringPool->InsertCopy(str.c_str(), de.sizeAndFlags, crc) : m_stringPool->Insert(str.c_str(), de.sizeAndFlags, crc); - if (!isInserted) // if already inserted, it means it's in the stream, so store the crc only. - { - de.sizeAndFlags = (u32)(StreamEntry::INT_POOLED_STRING_CRC32) << StreamEntry::dataInternalShift; - de.sizeAndFlags |= sizeof(crc); - WriteBinary(de); - WriteBinary(&crc, sizeof(crc)); - } - else - { - AZ::u32 stringSize = de.sizeAndFlags; - de.sizeAndFlags |= (u32)(StreamEntry::INT_POOLED_STRING) << StreamEntry::dataInternalShift; - WriteBinary(de); - WriteBinary(str.data(), stringSize); - } - } - else - { - WriteBinary(de); - WriteBinary(str.data(), de.sizeAndFlags); - } - } - - template - inline void Write(u32 name, const AZStd::basic_string& str) - { - StreamEntry de; - de.name = name; - de.sizeAndFlags = static_cast(str.size()); - AZ_Assert(de.sizeAndFlags <= StreamEntry::dataSizeMask, "Invalid string length! String is too long, length is limited to %u bytes!", StreamEntry::dataSizeMask); - WriteBinary(de); - WriteBinary(str.data(), de.sizeAndFlags * sizeof(AZStd::wstring::value_type)); - } - - ////////////////////////////////////////////////////////////////////////// - // math types - inline void Write(u32 name, float f) - { - Write(name, &f, static_cast(sizeof(float))); - } - inline void Write(u32 name, double d) - { - Write(name, &d, static_cast(sizeof(double))); - } - - void Write(u32 name, const AZ::Vector3& v); - void Write(u32 name, const AZ::Vector4& v); - void Write(u32 name, const AZ::Aabb& aabb); - void Write(u32 name, const AZ::Obb& obb); - void Write(u32 name, const AZ::Transform& tm); - void Write(u32 name, const AZ::Matrix3x3& tm); - void Write(u32 name, const AZ::Matrix4x4& tm); - void Write(u32 name, const AZ::Quaternion& tm); - void Write(u32 name, const AZ::Plane& plane); - - ////////////////////////////////////////////////////////////////////////// - // containers - template - inline void Write(u32 name, InputIterator first, InputIterator last) - { - // we can specialize for contiguous_iterator_tag so have only 1 write for all elements - size_t numElements = AZStd::distance(first, last); - size_t elementSize = sizeof(typename AZStd::iterator_traits::value_type); - unsigned int dataSize = static_cast(numElements * elementSize); - StreamEntry de; - de.name = name; - de.sizeAndFlags = dataSize; - AZ_Assert(dataSize < StreamEntry::dataSizeMask, "Invalid data size, size is limited to %d bytes!", StreamEntry::dataSizeMask - 1); - WriteBinary(de); - //WriteBinary(data,dataSize); for contiguous_iterator_tag - for (; first != last; ++first) - { - WriteBinary(&*first, static_cast(elementSize)); - } - } - ////////////////////////////////////////////////////////////////////////// - - ////////////////////////////////////////////////////////////////////////// - // Raw data to the output - template - inline void WriteBinary(const T& data) - { - WriteBinary(&data, sizeof(T)); - } - - virtual void WriteBinary(const void* data, unsigned int dataSize) = 0; - ////////////////////////////////////////////////////////////////////////// - - /** - * Write a time stamp (AZStd::sys_time_t) in millisecond since 1970/01/01 00:00:00 UTC. - * On older windows this function can have ~15 ms resolution, in such cases use \ref GetTimeNowMicroSecond - */ - void WriteTimeUTC(u32 name); - - /** - * Write a time stamp (AZStd::sys_time_t) in micriseconds. This function is inaccurate for long periods but it has ms resolution. - * For long periods use \ref WriteTimeUTC. - */ - void WriteTimeMicrosecond(u32 name); - - /// Called when the driller is moving on the next frame, so you can flush you current buffer to network/disk. - virtual void OnEndOfFrame() {} - - /// Sets the string pool used for this stream. To disable the pool just set it to NULL. - void SetStringPool(DrillerStringPool* stringPool) { m_stringPool = stringPool; } - - protected: - /// Write the Stream header structure (should be endianess independent). - void WriteHeader(); - - DrillerStringPool* m_stringPool; ///< Optional pointer to a string pool. - }; - - /** - * For efficiency all data read functions are placed with the parsers. - */ - class DrillerInputStream - { - public: - DrillerInputStream(DrillerStringPool* stringPool = NULL) - : m_isEndianSwap(false) - , m_stringPool(stringPool) {} - virtual ~DrillerInputStream() {} - - bool IsEndianSwap() const { return m_isEndianSwap; } - /// Reads binary data from a stream to to maxDataSize. Returns 0 if no more data. - virtual unsigned int ReadBinary(void* data, unsigned int maxDataSize) = 0; - - /// Sets the string pool used for this stream. To disable the pool just set it to NULL. - void SetStringPool(DrillerStringPool* stringPool) { m_stringPool = stringPool; } - DrillerStringPool* GetStringPool() const { return m_stringPool; } - - void SetIdentifier(const char* identifier) { m_streamIdentifier = identifier; } - const char* GetIdentifier() const { return m_streamIdentifier.c_str(); } - - protected: - /// Read the Stream header structure - bool ReadHeader(); - - bool m_isEndianSwap; - DrillerStringPool* m_stringPool; ///< Optional pointer to a string pool. - AZStd::string m_streamIdentifier; - }; - - /** - * Outputs all stream data into a memory buffer. It will grow automatically. - */ - class DrillerOutputMemoryStream - : public DrillerOutputStream - { - protected: - vector::type m_data; - public: - AZ_CLASS_ALLOCATOR(DrillerOutputMemoryStream, OSAllocator, 0) - DrillerOutputMemoryStream(size_t memorySize = 2048) { m_data.reserve(memorySize); } - const unsigned char* GetData() const { return m_data.data(); } - unsigned int GetDataSize() const { return static_cast(m_data.size()); } - inline void Reset() { m_data.clear(); } - void WriteBinary(const void* data, unsigned int dataSize) override - { - m_data.insert(m_data.end(), reinterpret_cast(data), reinterpret_cast(data) + dataSize); - } - }; - /** - * Reads data from a memory stream. Data is NOT copied and must be persistent while we are using it. - */ - class DrillerInputMemoryStream - : public DrillerInputStream - { - const unsigned char* m_data; - const unsigned char* m_dataEnd; - - public: - AZ_CLASS_ALLOCATOR(DrillerInputMemoryStream, OSAllocator, 0) - DrillerInputMemoryStream(const char* streamIdentifier = "", const void* data = nullptr, unsigned int dataSize = 0) - : DrillerInputStream() - , m_data(nullptr) - , m_dataEnd(nullptr) - { - if (data != nullptr) - { - SetData(streamIdentifier, data, dataSize); - } - } - - void SetData(const char* streamIdentifier, const void* data, unsigned int dataSize) - { - SetIdentifier(streamIdentifier); - - AZ_Assert(data != nullptr && dataSize > 0, "We must have a valid pointer %p and data size %d !", data, dataSize); - if (m_data == nullptr) // this is the first data chuck, read the platform - { - m_data = reinterpret_cast(data); - m_dataEnd = m_data + dataSize; - ReadHeader(); - } - else - { - m_data = reinterpret_cast(data); - m_dataEnd = m_data + dataSize; - } - } - - unsigned int GetDataLeft() const { return static_cast(m_dataEnd - m_data); } - unsigned int ReadBinary(void* data, unsigned int maxDataSize) override - { - AZ_Assert(m_data != nullptr, "You must call SetData function, before you can read data!"); - AZ_Assert(data != nullptr && maxDataSize > 0, "We must have a valid pointer and max data size!"); - unsigned int dataToCopy = AZStd::GetMin(static_cast(m_dataEnd - m_data), maxDataSize); - if (dataToCopy) - { - memcpy(data, m_data, dataToCopy); - } - m_data += dataToCopy; - return dataToCopy; - } - }; - - /** - * Outputs driller data to a file (buffered) - * IMPORTANT: We provide direct IO classes (instead trough Streamer), because the driller - * framework should NOT use engine systems (for example imagine we are drilling the Streamer, using it to - * write the drilled data will invalidate all the results as the streamer is unaware which data is driller data and which not) - */ - class DrillerOutputFileStream - : public IO::SystemFile - , public DrillerOutputStream - { - ZLib* m_zlib; - vector::type m_compressionBuffer; - vector::type m_dataBuffer; - public: - AZ_CLASS_ALLOCATOR(DrillerOutputFileStream, OSAllocator, 0) - DrillerOutputFileStream(); - ~DrillerOutputFileStream(); - bool Open(const char* fileName, int mode, int platformFlags = 0); - void Close(); - - void WriteBinary(const void* data, unsigned int dataSize) override; - }; - - /** - * Reads driller data from a file. - */ - class DrillerInputFileStream - : public AZ::IO::SystemFile - , public DrillerInputStream - { - ZLib* m_zlib; - vector::type m_compressedData; - public: - AZ_CLASS_ALLOCATOR(DrillerInputFileStream, OSAllocator, 0) - DrillerInputFileStream(); - ~DrillerInputFileStream(); - bool Open(const char* fileName, int mode, int platformFlags = 0); - unsigned int ReadBinary(void* data, unsigned int maxDataSize) override; - void Close(); - }; - - /** - * SAX like stream parser for driller data. We can stream the data - * and we will trigger events as tags and data (attributes) arrive. We use less memory this way. - * \note SAX is used as reference name, we are NOT trying to compatible with - * any specs. (not that SAX has specs) - * IMPORTANT: All data callbacks (tag and data) are called in the order they were at store. You can - * use this order as event index. - */ - class DrillerSAXParser - { - public: - struct Data - { - u32 m_name; ///< Crc name of the data entry. - void* m_data; ///< Pointer to copy if the loaded data. - unsigned int m_dataSize; ///< Data size in bytes. - mutable bool m_isEndianSwap; ///< True if the user will need to swap the endian when he access the data. We swap the data is the storage so we can read it multiple times without swap. - DrillerStringPool* m_stringPool; ///< Pointer to optional data string pool. - bool m_isPooledString; ///< True if we have a pooled string (stored in the stringPool already). - bool m_isPooledStringCrc32; ///< True is we have stored a crc32 (4 bytes) which refers to a string from the String Pool. - - ////////////////////////////////////////////////////////////////////////// - // Generic - template - inline void Read(T& t) const - { - static_assert(AZStd::is_pod::value, "T must be plain-old-data"); - - AZ_Assert(sizeof(t) >= m_dataSize, "You are about to lose some data, this is wrong."); - if (m_dataSize == sizeof(t)) - { - // do a memcpy as alignment might be required for some data types! This is not performance critical as we usually load drill files on x86/x64 - // which doesn't care about alignment. - memcpy(&t, m_data, m_dataSize); - } - else - { - AZ_Assert(AZStd::is_pointer::value || AZStd::is_integral::value, "We support extending only for integral types, float and pointers up to 8 bytes!"); - - if (AZStd::is_signed::value) - { - switch (m_dataSize) - { - case 1: - t = static_cast(*reinterpret_cast(m_data)); - break; - case 2: - t = static_cast(*reinterpret_cast(m_data)); - break; - case 4: - t = static_cast(*reinterpret_cast(m_data)); - break; - default: - AZ_Assert(false, "Source data size unsupported... we can extend only 1,2,4 bytes into 2,4,8 bytes integrals"); - } - } - else - { - switch (m_dataSize) - { - case 1: - t = static_cast(*reinterpret_cast(m_data)); - break; - case 2: - t = static_cast(*reinterpret_cast(m_data)); - break; - case 4: - t = static_cast(*reinterpret_cast(m_data)); - break; - default: - AZ_Assert(false, "Source data size unsupported... we can extend only 1,2,4 bytes into 2,4,8 bytes integrals"); - } - } - } - if (m_isEndianSwap) - { - AZStd::endian_swap(t); - } - } - - inline void Read(bool& b) const - { - u8* data = reinterpret_cast(m_data); - b = false; - for (unsigned int i = 0; i < m_dataSize; ++i) - { - if (data[i] != 0) - { - b = true; - return; - } - } - } - ////////////////////////////////////////////////////////////////////////// - // Binary and strings - inline unsigned int Read(void* buffer, unsigned int bufferSize) const - { - unsigned int dataToCopy = AZStd::GetMin(m_dataSize, bufferSize); - memcpy(buffer, m_data, dataToCopy); - // no data swap - return dataToCopy; - } - // a call avilable only when we use a string pool, it will return the pointer of string in the pool, so you don't need to copy it or do any fancy procedures. - inline const char* ReadPooledString() const - { - AZ_Assert(m_stringPool != nullptr, "This read type is supported only when we use string pool!"); - unsigned int srcDataSize; - return PrepareString(srcDataSize); - } - inline unsigned int Read(char* string, unsigned int maxNumChars) const - { - unsigned int srcDataSize; - const char* srcData = PrepareString(srcDataSize); - unsigned int dataToCopy = AZStd::GetMin(maxNumChars - 1, srcDataSize); - memcpy(string, srcData, dataToCopy); - string[dataToCopy] = '\0'; - return dataToCopy; - } - template - inline unsigned int Read(AZStd::basic_string& str) const - { - unsigned int srcDataSize; - const char* srcData = PrepareString(srcDataSize); - str = AZStd::basic_string(static_cast(srcData), srcDataSize); - return m_dataSize; - } - template - inline unsigned int Read(AZStd::basic_string& str) const - { - // wstring pooling not supported yet - str = AZStd::basic_string(static_cast(m_data), m_dataSize / 2); - if (m_isEndianSwap) - { - AZStd::endian_swap(str.begin(), str.end()); - } - return m_dataSize; - } - - ////////////////////////////////////////////////////////////////////////// - // math types - void Read(AZ::Vector3& v) const; - void Read(AZ::Vector4& v) const; - void Read(AZ::Aabb& aabb) const; - void Read(AZ::Obb& obb) const; - void Read(AZ::Transform& tm) const; - void Read(AZ::Matrix3x3& tm) const; - void Read(AZ::Matrix4x4& tm) const; - void Read(AZ::Quaternion& tm) const; - void Read(AZ::Plane& plane) const; - - ////////////////////////////////////////////////////////////////////////// - // containers - template - inline void Read(AZStd::insert_iterator& iter) const - { - typedef typename AZStd::insert_iterator InsertIterator; - // we can specialize for contiguous_iterator_tag so have only 1 write for all elements - const size_t elementSize = sizeof(InsertIterator::container_type::value_type); - size_t numElements = m_dataSize / elementSize; - AZ_Assert(m_dataSize % elementSize == 0, "Stored elements size doesn't match the read parameters!"); - Data elementEntry = *this; - elementEntry.m_dataSize = elementSize; - char* dataPtr = reinterpret_cast(m_data); - for (size_t i = 0; i < numElements; ++i, ++iter) - { - typename InsertIterator::container_type::value_type value; - elementEntry.m_data = dataPtr; - Read(elementEntry, value); - iter = value; - dataPtr += elementSize; - } - } - ////////////////////////////////////////////////////////////////////////// - private: - const char* PrepareString(unsigned int& stringLength) const; - }; - - typedef AZStd::delegate TagCallbackType; - typedef AZStd::delegate DataCallbackType; - - AZ_CLASS_ALLOCATOR(DrillerSAXParser, OSAllocator, 0) - DrillerSAXParser(const TagCallbackType& tcb, const DataCallbackType& dcb); - /// Processes an input stream until all data is consumed (read returns 0 bytes). - void ProcessStream(DrillerInputStream& stream); - protected: - - typedef vector::type BufferType; - BufferType m_buffer; - TagCallbackType m_tagCallback; - DataCallbackType m_dataCallback; - }; - - /** - * DOM like parser, we will load the entire stream in memory (ProcessStream function). - * Depending on the data size this can be very memory consuming. - * \note DOM is used as reference we are NOT compliant with the DOM specs in any way. - * IMPORTANT: All data is stored (for parsing) in the same order the events occurred - * or the remote machine. Each next tad or data was recorded in the way. You can use - * this as an event index. - */ - class DrillerDOMParser - : public DrillerSAXParser - { - public: - struct Node - { - typedef forward_list::type DataListType; - typedef forward_list::type NodeListType; - - u32 m_name; - Node* m_parent; - DataListType m_data; - NodeListType m_tags; - - /// Return a pointer to the first tag with specific name. - const Node* GetTag(u32 tagName) const; - /// Returns pointer to the first data entry with specific name. NULL if not data has been found. - const Data* GetData(u32 dataName) const; - /// Returns pointer to the first data entry with specific name. If it can't be found it will assert - const Data* GetDataRequired(u32 dataName) const - { - const Data* dataNode = GetData(dataName); - AZ_Assert(dataNode != NULL, "Data node in tag 0x%08x with name 0x%08x is required but missing!", m_name, dataName); - return dataNode; - } - }; - - AZ_CLASS_ALLOCATOR(DrillerDOMParser, OSAllocator, 0) - - DrillerDOMParser(bool isPersistentInputData = false); - ~DrillerDOMParser(); - /// return true if we are at top level of the tree and we can parse the data safely (there may be still more data, but it's top level only). - bool CanParse() const { return m_topNode == &m_root; } - - const Node* GetRootNode() const { return &m_root; } - protected: - Node m_root; - Node* m_topNode; - bool m_isPersistentInputData; ///< true if data that we process is persistent so we don't need to copy it internally, false otherwise. - - void OnTag(u32 name, bool isOpen); - void OnData(const Data& data); - void DeleteNode(Node& node); - }; - - /** - * Base class for handling a Tag with a specific name. Handlers are kept in a hierarchy - * with one required by DrillerSAXParserHandler to be able to handle tags at a root - * level for the driller data stream. - */ - class DrillerHandlerParser - { - public: - DrillerHandlerParser(bool isWarnOnUnsupportedTags = true) - : m_isWarnOnUnsupportedTags(isWarnOnUnsupportedTags) {} - - virtual ~DrillerHandlerParser() {} - /// Enumerate all the child tags that we support for the tag we are handling. If the tag is not know you should return NULL - virtual DrillerHandlerParser* OnEnterTag(u32 tagName) { (void)tagName; return NULL; } - /// Exit tag you are not required to implement this, we always exist tags in order FILO. - virtual void OnExitTag(DrillerHandlerParser* handler, u32 tagName) { (void)handler; (void)tagName; } - /// Handle that data for the tag we are handling. - virtual void OnData(const DrillerSAXParser::Data& dataNode) { (void)dataNode; } - /// Return the warning state on unsupported tags (sometime you might want to warn usually) and sometimes not (if you load newer drills, etc.) - inline bool IsWarnOnUnsupportedTags() const { return m_isWarnOnUnsupportedTags; } - - protected: - bool m_isWarnOnUnsupportedTags; - }; - - /** - * Processes a driller driller and dispatches the data based on the - * the DrillerHandlerParser (handlers) and their ability to handle specific tags. - * If a tag is NOT found as a child of the current one it will display a warning with the tag name - * (useless it's allowed by DrillerHandlerParser::IsWarnOnUnsupportedTags) and process the stream - * is a safe manner by skipping all the data and tags we can't handle. - */ - class DrillerSAXParserHandler - : public DrillerSAXParser - { - public: - AZ_CLASS_ALLOCATOR(DrillerSAXParserHandler, OSAllocator, 0) - - DrillerSAXParserHandler(DrillerHandlerParser* rootHandler); - - protected: - - /// Called from DrillerSAXParser when we have an open tag. - void OnTag(u32 name, bool isOpen); - /// Called from DrillerSAXParser when we have data, which will be forwarded to the handler. - void OnData(const DrillerSAXParser::Data& data); - - typedef vector::type DrillerHandlerStackType; - DrillerHandlerStackType m_stack; - }; - } // namespace Debug -} // namespace AZ - -#endif // AZCORE_DRILLER_STREAM_H -#pragma once - - diff --git a/Code/Framework/AzCore/AzCore/EBus/EventSchedulerSystemComponent.cpp b/Code/Framework/AzCore/AzCore/EBus/EventSchedulerSystemComponent.cpp index 3cdc3fc461..dd92b340c5 100644 --- a/Code/Framework/AzCore/AzCore/EBus/EventSchedulerSystemComponent.cpp +++ b/Code/Framework/AzCore/AzCore/EBus/EventSchedulerSystemComponent.cpp @@ -60,7 +60,7 @@ namespace AZ void EventSchedulerSystemComponent::OnTick([[maybe_unused]] float deltaTime, [[maybe_unused]] AZ::ScriptTimePoint time) { - TimeMs startTime = GetElapsedTimeMs(); + TimeMs startTime = AZ::GetElapsedTimeMs(); bool usingTimeslice = bg_maxScheduledEventProcessTimeMs != TimeMs{ 0 }; while (!m_queue.empty()) @@ -76,7 +76,7 @@ namespace AZ while (!m_pendingQueue.empty()) { - if (usingTimeslice && (GetElapsedTimeMs() - startTime > bg_maxScheduledEventProcessTimeMs)) + if (usingTimeslice && (AZ::GetElapsedTimeMs() - startTime > bg_maxScheduledEventProcessTimeMs)) { AZLOG_WARN("Failed to trigger all pending scheduled events, %u events remain on the pending queue", aznumeric_cast(m_pendingQueue.size())); break; @@ -103,7 +103,7 @@ namespace AZ durationMs = TimeMs{ 0 }; } - TimeMs currentMilliseconds = GetElapsedTimeMs(); + TimeMs currentMilliseconds = AZ::GetElapsedTimeMs(); if (timedEvent->m_handle == nullptr) { timedEvent->m_handle = AllocateHandle(); @@ -122,7 +122,7 @@ namespace AZ durationMs = TimeMs{ 0 }; } - TimeMs currentMilliseconds = GetElapsedTimeMs(); + TimeMs currentMilliseconds = AZ::GetElapsedTimeMs(); ScheduledEvent* timedEvent = AllocateManagedEvent(callback, eventName); const bool ownsScheduledEvent = true; *(timedEvent->m_handle) = ScheduledEventHandle(TimeMs(currentMilliseconds + durationMs), durationMs, timedEvent, ownsScheduledEvent); diff --git a/Code/Framework/AzCore/AzCore/EBus/ScheduledEvent.cpp b/Code/Framework/AzCore/AzCore/EBus/ScheduledEvent.cpp index 8e496c3dbc..41230958e4 100644 --- a/Code/Framework/AzCore/AzCore/EBus/ScheduledEvent.cpp +++ b/Code/Framework/AzCore/AzCore/EBus/ScheduledEvent.cpp @@ -76,7 +76,7 @@ namespace AZ TimeMs ScheduledEvent::TimeInQueueMs() const { - return GetElapsedTimeMs() - m_timeInserted; + return AZ::GetElapsedTimeMs() - m_timeInserted; } TimeMs ScheduledEvent::RemainingTimeInQueueMs() const diff --git a/Code/Framework/AzCore/AzCore/IO/CompressionBus.cpp b/Code/Framework/AzCore/AzCore/IO/CompressionBus.cpp index fb9f8841a2..7878ec6e9e 100644 --- a/Code/Framework/AzCore/AzCore/IO/CompressionBus.cpp +++ b/Code/Framework/AzCore/AzCore/IO/CompressionBus.cpp @@ -8,38 +8,35 @@ #include -namespace AZ +namespace AZ::IO { - namespace IO + CompressionInfo::CompressionInfo(CompressionInfo&& rhs) { - CompressionInfo::CompressionInfo(CompressionInfo&& rhs) - { - *this = AZStd::move(rhs); - } + *this = AZStd::move(rhs); + } - CompressionInfo& CompressionInfo::operator=(CompressionInfo&& rhs) - { - m_decompressor = AZStd::move(rhs.m_decompressor); - m_archiveFilename = AZStd::move(rhs.m_archiveFilename); - m_compressionTag = rhs.m_compressionTag; - m_offset = rhs.m_offset; - m_compressedSize = rhs.m_compressedSize; - m_uncompressedSize = rhs.m_uncompressedSize; - m_conflictResolution = rhs.m_conflictResolution; - m_isCompressed = rhs.m_isCompressed; - m_isSharedPak = rhs.m_isSharedPak; + CompressionInfo& CompressionInfo::operator=(CompressionInfo&& rhs) + { + m_decompressor = AZStd::move(rhs.m_decompressor); + m_archiveFilename = AZStd::move(rhs.m_archiveFilename); + m_compressionTag = rhs.m_compressionTag; + m_offset = rhs.m_offset; + m_compressedSize = rhs.m_compressedSize; + m_uncompressedSize = rhs.m_uncompressedSize; + m_conflictResolution = rhs.m_conflictResolution; + m_isCompressed = rhs.m_isCompressed; + m_isSharedPak = rhs.m_isSharedPak; - return *this; - } + return *this; + } - namespace CompressionUtils + namespace CompressionUtils + { + bool FindCompressionInfo(CompressionInfo& info, const AZStd::string_view filename) { - bool FindCompressionInfo(CompressionInfo& info, const AZStd::string_view filename) - { - bool result = false; - CompressionBus::Broadcast(&CompressionBus::Events::FindCompressionInfo, result, info, filename); - return result; - } + bool result = false; + CompressionBus::Broadcast(&CompressionBus::Events::FindCompressionInfo, result, info, filename); + return result; } } -} +} // namespace AZ::IO diff --git a/Code/Framework/AzCore/AzCore/IO/Compressor.cpp b/Code/Framework/AzCore/AzCore/IO/Compressor.cpp index e223730ce8..16527422ad 100644 --- a/Code/Framework/AzCore/AzCore/IO/Compressor.cpp +++ b/Code/Framework/AzCore/AzCore/IO/Compressor.cpp @@ -10,32 +10,29 @@ #include #include -namespace AZ +namespace AZ::IO { - namespace IO + //========================================================================= + // WriteHeaderAndData + // [12/13/2012] + //========================================================================= + bool Compressor::WriteHeaderAndData(CompressorStream* compressorStream) { - //========================================================================= - // WriteHeaderAndData - // [12/13/2012] - //========================================================================= - bool Compressor::WriteHeaderAndData(CompressorStream* compressorStream) + AZ_Assert(compressorStream->CanWrite(), "Stream is not open for write!"); + AZ_Assert(compressorStream->GetCompressorData(), "Stream doesn't have attached compressor, call WriteCompressed first!"); + AZ_Assert(compressorStream->GetCompressorData()->m_compressor == this, "Invalid compressor data! Data belongs to a different compressor"); + CompressorHeader header; + header.SetAZCS(); + header.m_compressorId = GetTypeId(); + header.m_uncompressedSize = compressorStream->GetCompressorData()->m_uncompressedSize; + AZStd::endian_swap(header.m_compressorId); + AZStd::endian_swap(header.m_uncompressedSize); + GenericStream* baseStream = compressorStream->GetWrappedStream(); + if (baseStream->WriteAtOffset(sizeof(CompressorHeader), &header, 0U) == sizeof(CompressorHeader)) { - AZ_Assert(compressorStream->CanWrite(), "Stream is not open for write!"); - AZ_Assert(compressorStream->GetCompressorData(), "Stream doesn't have attached compressor, call WriteCompressed first!"); - AZ_Assert(compressorStream->GetCompressorData()->m_compressor == this, "Invalid compressor data! Data belongs to a different compressor"); - CompressorHeader header; - header.SetAZCS(); - header.m_compressorId = GetTypeId(); - header.m_uncompressedSize = compressorStream->GetCompressorData()->m_uncompressedSize; - AZStd::endian_swap(header.m_compressorId); - AZStd::endian_swap(header.m_uncompressedSize); - GenericStream* baseStream = compressorStream->GetWrappedStream(); - if (baseStream->WriteAtOffset(sizeof(CompressorHeader), &header, 0U) == sizeof(CompressorHeader)) - { - return true; - } - - return false; + return true; } - } // namespace IO -} // namespace AZ + + return false; + } +} // namespace AZ::IO diff --git a/Code/Framework/AzCore/AzCore/IO/Compressor.h b/Code/Framework/AzCore/AzCore/IO/Compressor.h index 9b910a0ea4..340366d82f 100644 --- a/Code/Framework/AzCore/AzCore/IO/Compressor.h +++ b/Code/Framework/AzCore/AzCore/IO/Compressor.h @@ -5,74 +5,67 @@ * SPDX-License-Identifier: Apache-2.0 OR MIT * */ -#ifndef AZCORE_IO_COMPRESSOR_H -#define AZCORE_IO_COMPRESSOR_H +#pragma once #include -namespace AZ +namespace AZ::IO { - namespace IO + class CompressorStream; + + /** + * Compressor/Decompressor base interface. + * Used for all stream compressors. + */ + class Compressor { - class CompressorStream; + public: + typedef AZ::u64 SizeType; + static const int m_maxHeaderSize = 4096; /// When we open a stream to check if it's compressed we read the first m_maxHeaderSize bytes. - /** - * Compressor/Decompressor base interface. - * Used for all stream compressors. - */ - class Compressor - { - public: - typedef AZ::u64 SizeType; - static const int m_maxHeaderSize = 4096; /// When we open a stream to check if it's compressed we read the first m_maxHeaderSize bytes. + virtual ~Compressor() {} + /// Return compressor type id. + virtual AZ::u32 GetTypeId() const = 0; + /// Called when we open a stream to Read for the first time. Data contains the first. dataSize <= m_maxHeaderSize. + virtual bool ReadHeaderAndData(CompressorStream* stream, AZ::u8* data, unsigned int dataSize) = 0; + /// Called when we are about to start writing to a compressed stream. (Must be called first to write compressor header) + virtual bool WriteHeaderAndData(CompressorStream* stream); + /// Forwarded function from the Device when we from a compressed stream. + virtual SizeType Read(CompressorStream* stream, SizeType byteSize, SizeType offset, void* buffer) = 0; + /// Forwarded function from the Device when we write to a compressed stream. + virtual SizeType Write(CompressorStream* stream, SizeType byteSize, const void* data, SizeType offset = SizeType(-1)) = 0; + /// Write a seek point. + virtual bool WriteSeekPoint(CompressorStream* stream) { (void)stream; return false; } + /// Initializes Compressor for writing data. + virtual bool StartCompressor(CompressorStream* stream, int compressionLevel, SizeType autoSeekDataSize) { (void)stream; (void)compressionLevel; (void)autoSeekDataSize; return false; } + /// Called just before we close the stream. All compression data will be flushed and finalized. (You can't add data afterwards). + virtual bool Close(CompressorStream* stream) = 0; + }; - virtual ~Compressor() {} - /// Return compressor type id. - virtual AZ::u32 GetTypeId() const = 0; - /// Called when we open a stream to Read for the first time. Data contains the first. dataSize <= m_maxHeaderSize. - virtual bool ReadHeaderAndData(CompressorStream* stream, AZ::u8* data, unsigned int dataSize) = 0; - /// Called when we are about to start writing to a compressed stream. (Must be called first to write compressor header) - virtual bool WriteHeaderAndData(CompressorStream* stream); - /// Forwarded function from the Device when we from a compressed stream. - virtual SizeType Read(CompressorStream* stream, SizeType byteSize, SizeType offset, void* buffer) = 0; - /// Forwarded function from the Device when we write to a compressed stream. - virtual SizeType Write(CompressorStream* stream, SizeType byteSize, const void* data, SizeType offset = SizeType(-1)) = 0; - /// Write a seek point. - virtual bool WriteSeekPoint(CompressorStream* stream) { (void)stream; return false; } - /// Initializes Compressor for writing data. - virtual bool StartCompressor(CompressorStream* stream, int compressionLevel, SizeType autoSeekDataSize) { (void)stream; (void)compressionLevel; (void)autoSeekDataSize; return false; } - /// Called just before we close the stream. All compression data will be flushed and finalized. (You can't add data afterwards). - virtual bool Close(CompressorStream* stream) = 0; - }; + /** + * Base compressor data assigned for all compressors. + */ + class CompressorData + { + public: + virtual ~CompressorData() {} - /** - * Base compressor data assigned for all compressors. - */ - class CompressorData - { - public: - virtual ~CompressorData() {} + Compressor* m_compressor; + AZ::u64 m_uncompressedSize; + }; - Compressor* m_compressor; - AZ::u64 m_uncompressedSize; - }; + /** + * All data is stored in network order (big endian). + */ + struct CompressorHeader + { + CompressorHeader() { m_azcs[0] = 0; m_azcs[1] = 0; m_azcs[2] = 0; m_azcs[3] = 0; } - /** - * All data is stored in network order (big endian). - */ - struct CompressorHeader - { - CompressorHeader() { m_azcs[0] = 0; m_azcs[1] = 0; m_azcs[2] = 0; m_azcs[3] = 0; } + bool IsValid() const { return (m_azcs[0] == 'A' && m_azcs[1] == 'Z' && m_azcs[2] == 'C' && m_azcs[3] == 'S'); } + void SetAZCS() { m_azcs[0] = 'A'; m_azcs[1] = 'Z'; m_azcs[2] = 'C'; m_azcs[3] = 'S'; } - inline bool IsValid() const { return (m_azcs[0] == 'A' && m_azcs[1] == 'Z' && m_azcs[2] == 'C' && m_azcs[3] == 'S'); } - void SetAZCS() { m_azcs[0] = 'A'; m_azcs[1] = 'Z'; m_azcs[2] = 'C'; m_azcs[3] = 'S'; } - - char m_azcs[4]; ///< String contains 'AZCS' AmaZon Compressed Stream - AZ::u32 m_compressorId; ///< Compression method. - AZ::u64 m_uncompressedSize; ///< Uncompressed file size. - }; - } // namespace IO -} // namespace AZ - -#endif // AZCORE_IO_COMPRESSOR_H -#pragma once + char m_azcs[4]; ///< String contains 'AZCS' AmaZon Compressed Stream + AZ::u32 m_compressorId; ///< Compression method. + AZ::u64 m_uncompressedSize; ///< Uncompressed file size. + }; +} // namespace AZ::IO diff --git a/Code/Framework/AzCore/AzCore/IO/CompressorStream.cpp b/Code/Framework/AzCore/AzCore/IO/CompressorStream.cpp index 6f82cc428d..a1012ee404 100644 --- a/Code/Framework/AzCore/AzCore/IO/CompressorStream.cpp +++ b/Code/Framework/AzCore/AzCore/IO/CompressorStream.cpp @@ -15,9 +15,7 @@ #include #include -namespace AZ -{ -namespace IO +namespace AZ::IO { /*! \brief Constructs a compressor stream using the supplied filename and OpenFlags to open a file on disk @@ -300,7 +298,4 @@ Compressor* CompressorStream::CreateCompressor(AZ::u32 compressorId) return m_compressor.get(); } -} // namespace IO -} // namespace AZ - - +} // namespace AZ::IO diff --git a/Code/Framework/AzCore/AzCore/IO/CompressorZLib.cpp b/Code/Framework/AzCore/AzCore/IO/CompressorZLib.cpp index f973c0e95a..03a218dbfe 100644 --- a/Code/Framework/AzCore/AzCore/IO/CompressorZLib.cpp +++ b/Code/Framework/AzCore/AzCore/IO/CompressorZLib.cpp @@ -13,543 +13,540 @@ #include #include -namespace AZ +namespace AZ::IO { - namespace IO + //========================================================================= + // CompressorZLib + // [12/13/2012] + //========================================================================= + CompressorZLib::CompressorZLib(unsigned int decompressionCachePerStream, unsigned int dataBufferSize) + : m_lastReadStream(nullptr) + , m_lastReadStreamOffset(0) + , m_lastReadStreamSize(0) + , m_compressedDataBuffer(nullptr) + , m_compressedDataBufferSize(dataBufferSize) + , m_compressedDataBufferUseCount(0) + , m_decompressionCachePerStream(decompressionCachePerStream) + { - //========================================================================= - // CompressorZLib - // [12/13/2012] - //========================================================================= - CompressorZLib::CompressorZLib(unsigned int decompressionCachePerStream, unsigned int dataBufferSize) - : m_lastReadStream(nullptr) - , m_lastReadStreamOffset(0) - , m_lastReadStreamSize(0) - , m_compressedDataBuffer(nullptr) - , m_compressedDataBufferSize(dataBufferSize) - , m_compressedDataBufferUseCount(0) - , m_decompressionCachePerStream(decompressionCachePerStream) + AZ_Assert((dataBufferSize % (32 * 1024)) == 0, "Data buffer size %d must be multiple of 32 KB!", dataBufferSize); + AZ_Assert((decompressionCachePerStream % (32 * 1024)) == 0, "Decompress cache size %d must be multiple of 32 KB!", decompressionCachePerStream); + } + //========================================================================= + // !CompressorZLib + // [12/13/2012] + //========================================================================= + CompressorZLib::~CompressorZLib() + { + AZ_Warning("IO", m_compressedDataBufferUseCount == 0, "CompressorZLib has it's data buffer still referenced, it means that %d compressed streams have NOT closed! Freeing data...", m_compressedDataBufferUseCount); + while (m_compressedDataBufferUseCount) { - AZ_Assert((dataBufferSize % (32 * 1024)) == 0, "Data buffer size %d must be multiple of 32 KB!", dataBufferSize); - AZ_Assert((decompressionCachePerStream % (32 * 1024)) == 0, "Decompress cache size %d must be multiple of 32 KB!", decompressionCachePerStream); + ReleaseDataBuffer(); } + } - //========================================================================= - // !CompressorZLib - // [12/13/2012] - //========================================================================= - CompressorZLib::~CompressorZLib() + //========================================================================= + // GetTypeId + // [12/13/2012] + //========================================================================= + AZ::u32 CompressorZLib::TypeId() + { + return AZ_CRC("ZLib", 0x73887d3a); + } + + //========================================================================= + // ReadHeaderAndData + // [12/13/2012] + //========================================================================= + bool CompressorZLib::ReadHeaderAndData(CompressorStream* stream, AZ::u8* data, unsigned int dataSize) + { + if (stream->GetCompressorData() != nullptr) // we already have compressor data { - AZ_Warning("IO", m_compressedDataBufferUseCount == 0, "CompressorZLib has it's data buffer still referenced, it means that %d compressed streams have NOT closed! Freeing data...", m_compressedDataBufferUseCount); - while (m_compressedDataBufferUseCount) - { - ReleaseDataBuffer(); - } - } - - //========================================================================= - // GetTypeId - // [12/13/2012] - //========================================================================= - AZ::u32 CompressorZLib::TypeId() - { - return AZ_CRC("ZLib", 0x73887d3a); - } - - //========================================================================= - // ReadHeaderAndData - // [12/13/2012] - //========================================================================= - bool CompressorZLib::ReadHeaderAndData(CompressorStream* stream, AZ::u8* data, unsigned int dataSize) - { - if (stream->GetCompressorData() != nullptr) // we already have compressor data - { - return false; - } - - // Read the ZLib header should be after the default compression header... - // We should not be in this function otherwise. - if (dataSize < sizeof(CompressorZLibHeader) + sizeof(ZLib::Header)) - { - AZ_Assert(false, "We did not read enough data, we have only %d bytes left in the buffer and we need %d!", dataSize, sizeof(CompressorZLibHeader) + sizeof(ZLib::Header)); - return false; - } - - AcquireDataBuffer(); - - CompressorZLibHeader* hdr = reinterpret_cast(data); - AZStd::endian_swap(hdr->m_numSeekPoints); - dataSize -= sizeof(CompressorZLibHeader); - data += sizeof(CompressorZLibHeader); - - CompressorZLibData* zlibData = aznew CompressorZLibData; - zlibData->m_compressor = this; - zlibData->m_uncompressedSize = 0; - zlibData->m_zlibHeader = *reinterpret_cast(data); - dataSize -= sizeof(zlibData->m_zlibHeader); - data += sizeof(zlibData->m_zlibHeader); - zlibData->m_decompressNextOffset = sizeof(CompressorHeader) + sizeof(CompressorZLibHeader) + sizeof(ZLib::Header); // start after the headers - - AZ_Assert(hdr->m_numSeekPoints > 0, "We should have at least one seek point for the entire stream!"); - - // go the end of the file and read all sync points. - SizeType compressedFileEnd = stream->GetLength(); - if (compressedFileEnd == 0) - { - delete zlibData; - return false; - } - - zlibData->m_seekPoints.resize(hdr->m_numSeekPoints); - SizeType dataToRead = sizeof(CompressorZLibSeekPoint) * static_cast(hdr->m_numSeekPoints); - SizeType seekPointOffset = compressedFileEnd - dataToRead; - AZ_Assert(seekPointOffset <= compressedFileEnd, "We have an invalid archive, this is impossible!"); - GenericStream* baseStream = stream->GetWrappedStream(); - if (baseStream->ReadAtOffset(dataToRead, zlibData->m_seekPoints.data(), seekPointOffset) != dataToRead) - { - delete zlibData; - return false; - } - for (size_t i = 0; i < zlibData->m_seekPoints.size(); ++i) - { - AZStd::endian_swap(zlibData->m_seekPoints[i].m_compressedOffset); - AZStd::endian_swap(zlibData->m_seekPoints[i].m_uncompressedOffset); - } - - if (m_decompressionCachePerStream) - { - zlibData->m_decompressedCache = reinterpret_cast(azmalloc(m_decompressionCachePerStream, m_CompressedDataBufferAlignment, AZ::SystemAllocator, "CompressorZLib")); - } - - zlibData->m_decompressLastOffset = seekPointOffset; // set the start address of the seek points as the last valid read address for the compressed stream. - - zlibData->m_zlib.StartDecompressor(&zlibData->m_zlibHeader); - - stream->SetCompressorData(zlibData); - - return true; - } - - //========================================================================= - // WriteHeaderAndData - // [12/13/2012] - //========================================================================= - bool CompressorZLib::WriteHeaderAndData(CompressorStream* stream) - { - if (!Compressor::WriteHeaderAndData(stream)) - { - return false; - } - - CompressorZLibData* compressorData = static_cast(stream->GetCompressorData()); - CompressorZLibHeader header; - header.m_numSeekPoints = static_cast(compressorData->m_seekPoints.size()); - AZStd::endian_swap(header.m_numSeekPoints); - GenericStream* baseStream = stream->GetWrappedStream(); - if (baseStream->WriteAtOffset(sizeof(header), &header, sizeof(CompressorHeader)) == sizeof(header)) - { - return true; - } - return false; } - //========================================================================= - // FillFromDecompressCache - // [12/14/2012] - //========================================================================= - inline CompressorZLib::SizeType CompressorZLib::FillFromDecompressCache(CompressorZLibData* zlibData, void*& buffer, SizeType& byteSize, SizeType& offset) + // Read the ZLib header should be after the default compression header... + // We should not be in this function otherwise. + if (dataSize < sizeof(CompressorZLibHeader) + sizeof(ZLib::Header)) { - SizeType firstOffsetInCache = zlibData->m_decompressedCacheOffset; - SizeType lastOffsetInCache = firstOffsetInCache + zlibData->m_decompressedCacheDataSize; - SizeType firstDataOffset = offset; - SizeType lastDataOffset = offset + byteSize; - SizeType numCopied = 0; - if (firstOffsetInCache < lastDataOffset && lastOffsetInCache > firstDataOffset) // check if there is data in the cache - { - size_t copyOffsetStart = 0; - size_t copyOffsetEnd = zlibData->m_decompressedCacheDataSize; - - size_t bufferCopyOffset = 0; - - if (firstOffsetInCache < firstDataOffset) - { - copyOffsetStart = static_cast(firstDataOffset - firstOffsetInCache); - } - else - { - bufferCopyOffset = static_cast(firstOffsetInCache - firstDataOffset); - } - - if (lastOffsetInCache >= lastDataOffset) - { - copyOffsetEnd -= static_cast(lastOffsetInCache - lastDataOffset); - } - else if (bufferCopyOffset > 0) // the cache block is in the middle of the data, we can't use it (since we need to split buffer request into 2) - { - return 0; - } - - numCopied = copyOffsetEnd - copyOffsetStart; - memcpy(static_cast(buffer) + bufferCopyOffset, zlibData->m_decompressedCache + copyOffsetStart, static_cast(numCopied)); - - // adjust pointers and sizes - byteSize -= numCopied; - if (bufferCopyOffset == 0) - { - // copied in the start - buffer = reinterpret_cast(buffer) + numCopied; - offset += numCopied; - } - } - - return numCopied; + AZ_Assert(false, "We did not read enough data, we have only %d bytes left in the buffer and we need %d!", dataSize, sizeof(CompressorZLibHeader) + sizeof(ZLib::Header)); + return false; } - //========================================================================= - // FillFromCompressedCache - // [12/17/2012] - //========================================================================= - inline CompressorZLib::SizeType CompressorZLib::FillCompressedBuffer(CompressorStream* stream) + AcquireDataBuffer(); + + CompressorZLibHeader* hdr = reinterpret_cast(data); + AZStd::endian_swap(hdr->m_numSeekPoints); + dataSize -= sizeof(CompressorZLibHeader); + data += sizeof(CompressorZLibHeader); + + CompressorZLibData* zlibData = aznew CompressorZLibData; + zlibData->m_compressor = this; + zlibData->m_uncompressedSize = 0; + zlibData->m_zlibHeader = *reinterpret_cast(data); + dataSize -= sizeof(zlibData->m_zlibHeader); + data += sizeof(zlibData->m_zlibHeader); + zlibData->m_decompressNextOffset = sizeof(CompressorHeader) + sizeof(CompressorZLibHeader) + sizeof(ZLib::Header); // start after the headers + + AZ_Assert(hdr->m_numSeekPoints > 0, "We should have at least one seek point for the entire stream!"); + + // go the end of the file and read all sync points. + SizeType compressedFileEnd = stream->GetLength(); + if (compressedFileEnd == 0) { - CompressorZLibData* zlibData = static_cast(stream->GetCompressorData()); - SizeType dataFromBuffer = 0; - if (stream == m_lastReadStream) // if the buffer is filled with data from the current stream, try to reuse - { - if (zlibData->m_decompressNextOffset > m_lastReadStreamOffset) - { - SizeType offsetInCache = zlibData->m_decompressNextOffset - m_lastReadStreamOffset; - if (offsetInCache < m_lastReadStreamSize) // last check if there is data overlap - { - // copy the usable part at the start of the - SizeType toMove = m_lastReadStreamSize - offsetInCache; - memmove(m_compressedDataBuffer, &m_compressedDataBuffer[static_cast(offsetInCache)], static_cast(toMove)); - dataFromBuffer += toMove; - } - } - } - - SizeType toReadFromStream = m_compressedDataBufferSize - dataFromBuffer; - SizeType readOffset = zlibData->m_decompressNextOffset + dataFromBuffer; - if (readOffset + toReadFromStream > zlibData->m_decompressLastOffset) - { - // don't read pass the end - AZ_Assert(readOffset <= zlibData->m_decompressLastOffset, "Read offset should always be before the end of stream!"); - toReadFromStream = zlibData->m_decompressLastOffset - readOffset; - } - - SizeType numReadFromStream = 0; - if (toReadFromStream) // if we did not reuse the whole buffer, read some data from the stream - { - GenericStream* baseStream = stream->GetWrappedStream(); - numReadFromStream = baseStream->ReadAtOffset(toReadFromStream, &m_compressedDataBuffer[static_cast(dataFromBuffer)], readOffset); - } - - // update what's actually in the read data buffer. - m_lastReadStream = stream; - m_lastReadStreamOffset = zlibData->m_decompressNextOffset; - m_lastReadStreamSize = dataFromBuffer + numReadFromStream; - return m_lastReadStreamSize; + delete zlibData; + return false; } - /** - * Helper class to find the best seek point for a specific offset. - */ - struct CompareUpper + zlibData->m_seekPoints.resize(hdr->m_numSeekPoints); + SizeType dataToRead = sizeof(CompressorZLibSeekPoint) * static_cast(hdr->m_numSeekPoints); + SizeType seekPointOffset = compressedFileEnd - dataToRead; + AZ_Assert(seekPointOffset <= compressedFileEnd, "We have an invalid archive, this is impossible!"); + GenericStream* baseStream = stream->GetWrappedStream(); + if (baseStream->ReadAtOffset(dataToRead, zlibData->m_seekPoints.data(), seekPointOffset) != dataToRead) { - inline bool operator()(const AZ::u64& offset, const CompressorZLibSeekPoint& sp) const {return offset < sp.m_uncompressedOffset; } - }; - - //========================================================================= - // Read - // [12/13/2012] - //========================================================================= - CompressorZLib::SizeType CompressorZLib::Read(CompressorStream* stream, SizeType byteSize, SizeType offset, void* buffer) + delete zlibData; + return false; + } + for (size_t i = 0; i < zlibData->m_seekPoints.size(); ++i) { - AZ_Assert(stream->GetCompressorData(), "This stream doesn't have decompression enabled!"); - CompressorZLibData* zlibData = static_cast(stream->GetCompressorData()); - AZ_Assert(!zlibData->m_zlib.IsCompressorStarted(), "You can't read/decompress while writing a compressed stream %s!"); + AZStd::endian_swap(zlibData->m_seekPoints[i].m_compressedOffset); + AZStd::endian_swap(zlibData->m_seekPoints[i].m_uncompressedOffset); + } - // check if the request can be finished from the decompressed cache - SizeType numRead = FillFromDecompressCache(zlibData, buffer, byteSize, offset); - if (byteSize == 0) // are we done + if (m_decompressionCachePerStream) + { + zlibData->m_decompressedCache = reinterpret_cast(azmalloc(m_decompressionCachePerStream, m_CompressedDataBufferAlignment, AZ::SystemAllocator, "CompressorZLib")); + } + + zlibData->m_decompressLastOffset = seekPointOffset; // set the start address of the seek points as the last valid read address for the compressed stream. + + zlibData->m_zlib.StartDecompressor(&zlibData->m_zlibHeader); + + stream->SetCompressorData(zlibData); + + return true; + } + + //========================================================================= + // WriteHeaderAndData + // [12/13/2012] + //========================================================================= + bool CompressorZLib::WriteHeaderAndData(CompressorStream* stream) + { + if (!Compressor::WriteHeaderAndData(stream)) + { + return false; + } + + CompressorZLibData* compressorData = static_cast(stream->GetCompressorData()); + CompressorZLibHeader header; + header.m_numSeekPoints = static_cast(compressorData->m_seekPoints.size()); + AZStd::endian_swap(header.m_numSeekPoints); + GenericStream* baseStream = stream->GetWrappedStream(); + if (baseStream->WriteAtOffset(sizeof(header), &header, sizeof(CompressorHeader)) == sizeof(header)) + { + return true; + } + + return false; + } + + //========================================================================= + // FillFromDecompressCache + // [12/14/2012] + //========================================================================= + inline CompressorZLib::SizeType CompressorZLib::FillFromDecompressCache(CompressorZLibData* zlibData, void*& buffer, SizeType& byteSize, SizeType& offset) + { + SizeType firstOffsetInCache = zlibData->m_decompressedCacheOffset; + SizeType lastOffsetInCache = firstOffsetInCache + zlibData->m_decompressedCacheDataSize; + SizeType firstDataOffset = offset; + SizeType lastDataOffset = offset + byteSize; + SizeType numCopied = 0; + if (firstOffsetInCache < lastDataOffset && lastOffsetInCache > firstDataOffset) // check if there is data in the cache + { + size_t copyOffsetStart = 0; + size_t copyOffsetEnd = zlibData->m_decompressedCacheDataSize; + + size_t bufferCopyOffset = 0; + + if (firstOffsetInCache < firstDataOffset) { - return numRead; + copyOffsetStart = static_cast(firstDataOffset - firstOffsetInCache); + } + else + { + bufferCopyOffset = static_cast(firstOffsetInCache - firstDataOffset); } - // find the best seek point for current offset - CompressorZLibData::SeekPointArray::iterator it = AZStd::upper_bound(zlibData->m_seekPoints.begin(), zlibData->m_seekPoints.end(), offset, CompareUpper()); - AZ_Assert(it != zlibData->m_seekPoints.begin(), "This should be impossible, we should always have a valid seek point at 0 offset!"); - const CompressorZLibSeekPoint& bestSeekPoint = *(--it); // get the previous (so it includes the current offset) - - // if read is continuous continue with decompression - bool isJumpToSeekPoint = false; - SizeType lastOffsetInCache = zlibData->m_decompressedCacheOffset + zlibData->m_decompressedCacheDataSize; - if (bestSeekPoint.m_uncompressedOffset > lastOffsetInCache) // if the best seek point is forward, jump forward to it. + if (lastOffsetInCache >= lastDataOffset) { - isJumpToSeekPoint = true; + copyOffsetEnd -= static_cast(lastOffsetInCache - lastDataOffset); } - else if (offset < lastOffsetInCache) // if the seek point is in the past and the requested offset is not in the cache jump back to it. + else if (bufferCopyOffset > 0) // the cache block is in the middle of the data, we can't use it (since we need to split buffer request into 2) { - isJumpToSeekPoint = true; + return 0; } - if (isJumpToSeekPoint) - { - zlibData->m_decompressNextOffset = bestSeekPoint.m_compressedOffset; // set next read point - zlibData->m_decompressedCacheOffset = bestSeekPoint.m_uncompressedOffset; // set uncompressed offset - zlibData->m_decompressedCacheDataSize = 0; // invalidate the cache - zlibData->m_zlib.ResetDecompressor(&zlibData->m_zlibHeader); // reset decompressor and setup the header. - } + numCopied = copyOffsetEnd - copyOffsetStart; + memcpy(static_cast(buffer) + bufferCopyOffset, zlibData->m_decompressedCache + copyOffsetStart, static_cast(numCopied)); - // decompress and move forward until the request is done - while (byteSize > 0) + // adjust pointers and sizes + byteSize -= numCopied; + if (bufferCopyOffset == 0) { - // fill buffer with compressed data - SizeType compressedDataSize = FillCompressedBuffer(stream); - if (compressedDataSize == 0) + // copied in the start + buffer = reinterpret_cast(buffer) + numCopied; + offset += numCopied; + } + } + + return numCopied; + } + + //========================================================================= + // FillFromCompressedCache + // [12/17/2012] + //========================================================================= + inline CompressorZLib::SizeType CompressorZLib::FillCompressedBuffer(CompressorStream* stream) + { + CompressorZLibData* zlibData = static_cast(stream->GetCompressorData()); + SizeType dataFromBuffer = 0; + if (stream == m_lastReadStream) // if the buffer is filled with data from the current stream, try to reuse + { + if (zlibData->m_decompressNextOffset > m_lastReadStreamOffset) + { + SizeType offsetInCache = zlibData->m_decompressNextOffset - m_lastReadStreamOffset; + if (offsetInCache < m_lastReadStreamSize) // last check if there is data overlap { - return numRead; // we are done reading and obviously we did not managed to read all data + // copy the usable part at the start of the + SizeType toMove = m_lastReadStreamSize - offsetInCache; + memmove(m_compressedDataBuffer, &m_compressedDataBuffer[static_cast(offsetInCache)], static_cast(toMove)); + dataFromBuffer += toMove; } - unsigned int processedCompressedData = 0; - while (byteSize > 0 && processedCompressedData < compressedDataSize) // decompressed data either until we are done with the request (byteSize == 0) or we need to fill the compression buffer again. - { - // if we have data in the cache move to the next offset, we always move forward by default. - zlibData->m_decompressedCacheOffset += zlibData->m_decompressedCacheDataSize; - - // decompress in the cache buffer - u32 availDecompressedCacheSize = m_decompressionCachePerStream; // reset buffer size - unsigned int processed = zlibData->m_zlib.Decompress(&m_compressedDataBuffer[processedCompressedData], static_cast(compressedDataSize) - processedCompressedData, zlibData->m_decompressedCache, availDecompressedCacheSize); - zlibData->m_decompressedCacheDataSize = m_decompressionCachePerStream - availDecompressedCacheSize; - if (processed == 0) - { - break; // we processed everything we could, load more compressed data. - } - processedCompressedData += processed; - // fill what we can from the cache - numRead += FillFromDecompressCache(zlibData, buffer, byteSize, offset); - } - // update next read position the the compressed stream - zlibData->m_decompressNextOffset += processedCompressedData; } + } + + SizeType toReadFromStream = m_compressedDataBufferSize - dataFromBuffer; + SizeType readOffset = zlibData->m_decompressNextOffset + dataFromBuffer; + if (readOffset + toReadFromStream > zlibData->m_decompressLastOffset) + { + // don't read pass the end + AZ_Assert(readOffset <= zlibData->m_decompressLastOffset, "Read offset should always be before the end of stream!"); + toReadFromStream = zlibData->m_decompressLastOffset - readOffset; + } + + SizeType numReadFromStream = 0; + if (toReadFromStream) // if we did not reuse the whole buffer, read some data from the stream + { + GenericStream* baseStream = stream->GetWrappedStream(); + numReadFromStream = baseStream->ReadAtOffset(toReadFromStream, &m_compressedDataBuffer[static_cast(dataFromBuffer)], readOffset); + } + + // update what's actually in the read data buffer. + m_lastReadStream = stream; + m_lastReadStreamOffset = zlibData->m_decompressNextOffset; + m_lastReadStreamSize = dataFromBuffer + numReadFromStream; + return m_lastReadStreamSize; + } + + /** + * Helper class to find the best seek point for a specific offset. + */ + struct CompareUpper + { + inline bool operator()(const AZ::u64& offset, const CompressorZLibSeekPoint& sp) const {return offset < sp.m_uncompressedOffset; } + }; + + //========================================================================= + // Read + // [12/13/2012] + //========================================================================= + CompressorZLib::SizeType CompressorZLib::Read(CompressorStream* stream, SizeType byteSize, SizeType offset, void* buffer) + { + AZ_Assert(stream->GetCompressorData(), "This stream doesn't have decompression enabled!"); + CompressorZLibData* zlibData = static_cast(stream->GetCompressorData()); + AZ_Assert(!zlibData->m_zlib.IsCompressorStarted(), "You can't read/decompress while writing a compressed stream %s!"); + + // check if the request can be finished from the decompressed cache + SizeType numRead = FillFromDecompressCache(zlibData, buffer, byteSize, offset); + if (byteSize == 0) // are we done + { return numRead; } - //========================================================================= - // Write - // [12/13/2012] - //========================================================================= - CompressorZLib::SizeType CompressorZLib::Write(CompressorStream* stream, SizeType byteSize, const void* data, SizeType offset) + // find the best seek point for current offset + CompressorZLibData::SeekPointArray::iterator it = AZStd::upper_bound(zlibData->m_seekPoints.begin(), zlibData->m_seekPoints.end(), offset, CompareUpper()); + AZ_Assert(it != zlibData->m_seekPoints.begin(), "This should be impossible, we should always have a valid seek point at 0 offset!"); + const CompressorZLibSeekPoint& bestSeekPoint = *(--it); // get the previous (so it includes the current offset) + + // if read is continuous continue with decompression + bool isJumpToSeekPoint = false; + SizeType lastOffsetInCache = zlibData->m_decompressedCacheOffset + zlibData->m_decompressedCacheDataSize; + if (bestSeekPoint.m_uncompressedOffset > lastOffsetInCache) // if the best seek point is forward, jump forward to it. { - (void)offset; + isJumpToSeekPoint = true; + } + else if (offset < lastOffsetInCache) // if the seek point is in the past and the requested offset is not in the cache jump back to it. + { + isJumpToSeekPoint = true; + } - AZ_Assert(stream && stream->GetCompressorData(), "This stream doesn't have compression enabled! Call Stream::WriteCompressed after you create the file!"); - AZ_Assert(offset == SizeType(-1) || offset == stream->GetCurPos(), "We can write compressed data only at the end of the stream!"); + if (isJumpToSeekPoint) + { + zlibData->m_decompressNextOffset = bestSeekPoint.m_compressedOffset; // set next read point + zlibData->m_decompressedCacheOffset = bestSeekPoint.m_uncompressedOffset; // set uncompressed offset + zlibData->m_decompressedCacheDataSize = 0; // invalidate the cache + zlibData->m_zlib.ResetDecompressor(&zlibData->m_zlibHeader); // reset decompressor and setup the header. + } - m_lastReadStream = nullptr; // invalidate last read position, otherwise m_dataBuffer will be corrupted (as we are about to write in it). - - CompressorZLibData* zlibData = static_cast(stream->GetCompressorData()); - AZ_Assert(!zlibData->m_zlib.IsDecompressorStarted(), "You can't write while reading/decompressing a compressed stream!"); - - const u8* bytes = reinterpret_cast(data); - unsigned int dataToCompress = static_cast(byteSize); - while (dataToCompress != 0) + // decompress and move forward until the request is done + while (byteSize > 0) + { + // fill buffer with compressed data + SizeType compressedDataSize = FillCompressedBuffer(stream); + if (compressedDataSize == 0) { - unsigned int oldDataToCompress = dataToCompress; - unsigned int compressedSize = zlibData->m_zlib.Compress(bytes, dataToCompress, m_compressedDataBuffer, m_compressedDataBufferSize); - if (compressedSize) - { - GenericStream* baseStream = stream->GetWrappedStream(); - SizeType numWritten = baseStream->Write(compressedSize, m_compressedDataBuffer); - if (numWritten != compressedSize) - { - return numWritten; // error we could not write all data - } - } - bytes += oldDataToCompress - dataToCompress; + return numRead; // we are done reading and obviously we did not managed to read all data } - zlibData->m_uncompressedSize += byteSize; - - if (zlibData->m_autoSeekSize > 0) + unsigned int processedCompressedData = 0; + while (byteSize > 0 && processedCompressedData < compressedDataSize) // decompressed data either until we are done with the request (byteSize == 0) or we need to fill the compression buffer again. { - // insert a seek point if needed. - if (zlibData->m_seekPoints.empty()) + // if we have data in the cache move to the next offset, we always move forward by default. + zlibData->m_decompressedCacheOffset += zlibData->m_decompressedCacheDataSize; + + // decompress in the cache buffer + u32 availDecompressedCacheSize = m_decompressionCachePerStream; // reset buffer size + unsigned int processed = zlibData->m_zlib.Decompress(&m_compressedDataBuffer[processedCompressedData], static_cast(compressedDataSize) - processedCompressedData, zlibData->m_decompressedCache, availDecompressedCacheSize); + zlibData->m_decompressedCacheDataSize = m_decompressionCachePerStream - availDecompressedCacheSize; + if (processed == 0) { - if (zlibData->m_uncompressedSize >= zlibData->m_autoSeekSize) - { - WriteSeekPoint(stream); - } + break; // we processed everything we could, load more compressed data. } - else if ((zlibData->m_uncompressedSize - zlibData->m_seekPoints.back().m_uncompressedOffset) > zlibData->m_autoSeekSize) + processedCompressedData += processed; + // fill what we can from the cache + numRead += FillFromDecompressCache(zlibData, buffer, byteSize, offset); + } + // update next read position the the compressed stream + zlibData->m_decompressNextOffset += processedCompressedData; + } + return numRead; + } + + //========================================================================= + // Write + // [12/13/2012] + //========================================================================= + CompressorZLib::SizeType CompressorZLib::Write(CompressorStream* stream, SizeType byteSize, const void* data, SizeType offset) + { + (void)offset; + + AZ_Assert(stream && stream->GetCompressorData(), "This stream doesn't have compression enabled! Call Stream::WriteCompressed after you create the file!"); + AZ_Assert(offset == SizeType(-1) || offset == stream->GetCurPos(), "We can write compressed data only at the end of the stream!"); + + m_lastReadStream = nullptr; // invalidate last read position, otherwise m_dataBuffer will be corrupted (as we are about to write in it). + + CompressorZLibData* zlibData = static_cast(stream->GetCompressorData()); + AZ_Assert(!zlibData->m_zlib.IsDecompressorStarted(), "You can't write while reading/decompressing a compressed stream!"); + + const u8* bytes = reinterpret_cast(data); + unsigned int dataToCompress = static_cast(byteSize); + while (dataToCompress != 0) + { + unsigned int oldDataToCompress = dataToCompress; + unsigned int compressedSize = zlibData->m_zlib.Compress(bytes, dataToCompress, m_compressedDataBuffer, m_compressedDataBufferSize); + if (compressedSize) + { + GenericStream* baseStream = stream->GetWrappedStream(); + SizeType numWritten = baseStream->Write(compressedSize, m_compressedDataBuffer); + if (numWritten != compressedSize) + { + return numWritten; // error we could not write all data + } + } + bytes += oldDataToCompress - dataToCompress; + } + zlibData->m_uncompressedSize += byteSize; + + if (zlibData->m_autoSeekSize > 0) + { + // insert a seek point if needed. + if (zlibData->m_seekPoints.empty()) + { + if (zlibData->m_uncompressedSize >= zlibData->m_autoSeekSize) { WriteSeekPoint(stream); } } - return byteSize; + else if ((zlibData->m_uncompressedSize - zlibData->m_seekPoints.back().m_uncompressedOffset) > zlibData->m_autoSeekSize) + { + WriteSeekPoint(stream); + } } + return byteSize; + } - //========================================================================= - // WriteSeekPoint - // [12/13/2012] - //========================================================================= - bool CompressorZLib::WriteSeekPoint(CompressorStream* stream) + //========================================================================= + // WriteSeekPoint + // [12/13/2012] + //========================================================================= + bool CompressorZLib::WriteSeekPoint(CompressorStream* stream) + { + AZ_Assert(stream && stream->GetCompressorData(), "This stream doesn't have compression enabled! Call Stream::WriteCompressed after you create the file!"); + CompressorZLibData* zlibData = static_cast(stream->GetCompressorData()); + + m_lastReadStream = nullptr; // invalidate last read position, otherwise m_dataBuffer will be corrupted (as we are about to write in it). + + unsigned int compressedSize; + unsigned int dataToCompress = 0; + do { - AZ_Assert(stream && stream->GetCompressorData(), "This stream doesn't have compression enabled! Call Stream::WriteCompressed after you create the file!"); - CompressorZLibData* zlibData = static_cast(stream->GetCompressorData()); + compressedSize = zlibData->m_zlib.Compress(nullptr, dataToCompress, m_compressedDataBuffer, m_compressedDataBufferSize, ZLib::FT_FULL_FLUSH); + if (compressedSize) + { + GenericStream* baseStream = stream->GetWrappedStream(); + SizeType numWritten = baseStream->Write(compressedSize, m_compressedDataBuffer); + if (numWritten != compressedSize) + { + return false; // error we wrote less than than requested! + } + } + } while (dataToCompress != 0); + CompressorZLibSeekPoint sp; + sp.m_compressedOffset = stream->GetLength(); + sp.m_uncompressedOffset = zlibData->m_uncompressedSize; + zlibData->m_seekPoints.push_back(sp); + return true; + } + + //========================================================================= + // StartCompressor + // [12/13/2012] + //========================================================================= + bool CompressorZLib::StartCompressor(CompressorStream* stream, int compressionLevel, SizeType autoSeekDataSize) + { + AZ_Assert(stream && stream->GetCompressorData() == nullptr, "Stream has compressor already enabled!"); + + AcquireDataBuffer(); + + CompressorZLibData* zlibData = aznew CompressorZLibData; + zlibData->m_compressor = this; + zlibData->m_zlibHeader = 0; // not used for compression + zlibData->m_uncompressedSize = 0; + zlibData->m_autoSeekSize = autoSeekDataSize; + compressionLevel = AZ::GetClamp(compressionLevel, 1, 9); // remap to zlib levels + + zlibData->m_zlib.StartCompressor(compressionLevel); + + stream->SetCompressorData(zlibData); + + if (WriteHeaderAndData(stream)) + { + // add the first and always present seek point at the start of the compressed stream + CompressorZLibSeekPoint sp; + sp.m_compressedOffset = sizeof(CompressorHeader) + sizeof(CompressorZLibHeader) + sizeof(zlibData->m_zlibHeader); + sp.m_uncompressedOffset = 0; + zlibData->m_seekPoints.push_back(sp); + return true; + } + return false; + } + + //========================================================================= + // Close + // [12/13/2012] + //========================================================================= + bool CompressorZLib::Close(CompressorStream* stream) + { + AZ_Assert(stream->IsOpen(), "Stream is not open to be closed!"); + + CompressorZLibData* zlibData = static_cast(stream->GetCompressorData()); + GenericStream* baseStream = stream->GetWrappedStream(); + + bool result = true; + if (zlibData->m_zlib.IsCompressorStarted()) + { m_lastReadStream = nullptr; // invalidate last read position, otherwise m_dataBuffer will be corrupted (as we are about to write in it). + // flush all compressed data unsigned int compressedSize; unsigned int dataToCompress = 0; do { - compressedSize = zlibData->m_zlib.Compress(nullptr, dataToCompress, m_compressedDataBuffer, m_compressedDataBufferSize, ZLib::FT_FULL_FLUSH); + compressedSize = zlibData->m_zlib.Compress(nullptr, dataToCompress, m_compressedDataBuffer, m_compressedDataBufferSize, ZLib::FT_FINISH); if (compressedSize) { - GenericStream* baseStream = stream->GetWrappedStream(); - SizeType numWritten = baseStream->Write(compressedSize, m_compressedDataBuffer); - if (numWritten != compressedSize) - { - return false; // error we wrote less than than requested! - } + baseStream->Write(compressedSize, m_compressedDataBuffer); } } while (dataToCompress != 0); - CompressorZLibSeekPoint sp; - sp.m_compressedOffset = stream->GetLength(); - sp.m_uncompressedOffset = zlibData->m_uncompressedSize; - zlibData->m_seekPoints.push_back(sp); - return true; - } - - //========================================================================= - // StartCompressor - // [12/13/2012] - //========================================================================= - bool CompressorZLib::StartCompressor(CompressorStream* stream, int compressionLevel, SizeType autoSeekDataSize) - { - AZ_Assert(stream && stream->GetCompressorData() == nullptr, "Stream has compressor already enabled!"); - - AcquireDataBuffer(); - - CompressorZLibData* zlibData = aznew CompressorZLibData; - zlibData->m_compressor = this; - zlibData->m_zlibHeader = 0; // not used for compression - zlibData->m_uncompressedSize = 0; - zlibData->m_autoSeekSize = autoSeekDataSize; - compressionLevel = AZ::GetClamp(compressionLevel, 1, 9); // remap to zlib levels - - zlibData->m_zlib.StartCompressor(compressionLevel); - - stream->SetCompressorData(zlibData); - - if (WriteHeaderAndData(stream)) + result = WriteHeaderAndData(stream); + if (result) { - // add the first and always present seek point at the start of the compressed stream - CompressorZLibSeekPoint sp; - sp.m_compressedOffset = sizeof(CompressorHeader) + sizeof(CompressorZLibHeader) + sizeof(zlibData->m_zlibHeader); - sp.m_uncompressedOffset = 0; - zlibData->m_seekPoints.push_back(sp); - return true; - } - return false; - } - - //========================================================================= - // Close - // [12/13/2012] - //========================================================================= - bool CompressorZLib::Close(CompressorStream* stream) - { - AZ_Assert(stream->IsOpen(), "Stream is not open to be closed!"); - - CompressorZLibData* zlibData = static_cast(stream->GetCompressorData()); - GenericStream* baseStream = stream->GetWrappedStream(); - - bool result = true; - if (zlibData->m_zlib.IsCompressorStarted()) - { - m_lastReadStream = nullptr; // invalidate last read position, otherwise m_dataBuffer will be corrupted (as we are about to write in it). - - // flush all compressed data - unsigned int compressedSize; - unsigned int dataToCompress = 0; - do + // now write the seek points and the end of the file + for (size_t i = 0; i < zlibData->m_seekPoints.size(); ++i) { - compressedSize = zlibData->m_zlib.Compress(nullptr, dataToCompress, m_compressedDataBuffer, m_compressedDataBufferSize, ZLib::FT_FINISH); - if (compressedSize) - { - baseStream->Write(compressedSize, m_compressedDataBuffer); - } - } while (dataToCompress != 0); - - result = WriteHeaderAndData(stream); - if (result) - { - // now write the seek points and the end of the file - for (size_t i = 0; i < zlibData->m_seekPoints.size(); ++i) - { - AZStd::endian_swap(zlibData->m_seekPoints[i].m_compressedOffset); - AZStd::endian_swap(zlibData->m_seekPoints[i].m_uncompressedOffset); - } - SizeType dataToWrite = zlibData->m_seekPoints.size() * sizeof(CompressorZLibSeekPoint); - baseStream->Seek(0U, GenericStream::SeekMode::ST_SEEK_END); - result = (baseStream->Write(dataToWrite, zlibData->m_seekPoints.data()) == dataToWrite); + AZStd::endian_swap(zlibData->m_seekPoints[i].m_compressedOffset); + AZStd::endian_swap(zlibData->m_seekPoints[i].m_uncompressedOffset); } + SizeType dataToWrite = zlibData->m_seekPoints.size() * sizeof(CompressorZLibSeekPoint); + baseStream->Seek(0U, GenericStream::SeekMode::ST_SEEK_END); + result = (baseStream->Write(dataToWrite, zlibData->m_seekPoints.data()) == dataToWrite); } - else - { - if (m_lastReadStream == stream) - { - m_lastReadStream = nullptr; // invalidate the data in m_dataBuffer if it was from the current stream. - } - } - - // if we have decompressor cache delete it - if (zlibData->m_decompressedCache) - { - azfree(zlibData->m_decompressedCache, AZ::SystemAllocator, m_decompressionCachePerStream, m_CompressedDataBufferAlignment); - } - - ReleaseDataBuffer(); - - // last step reset strream compressor data. - stream->SetCompressorData(nullptr); - return result; } - - //========================================================================= - // AcquireDataBuffer - // [2/27/2013] - //========================================================================= - void CompressorZLib::AcquireDataBuffer() + else { - if (m_compressedDataBuffer == nullptr) + if (m_lastReadStream == stream) { - AZ_Assert(m_compressedDataBufferUseCount == 0, "Buffer usecount should be 0 if the buffer is NULL"); - m_compressedDataBuffer = reinterpret_cast(azmalloc(m_compressedDataBufferSize, m_CompressedDataBufferAlignment, AZ::SystemAllocator, "CompressorZLib")); - m_lastReadStream = nullptr; // reset the cache info in the m_dataBuffer + m_lastReadStream = nullptr; // invalidate the data in m_dataBuffer if it was from the current stream. } - ++m_compressedDataBufferUseCount; } - //========================================================================= - // ReleaseDataBuffer - // [2/27/2013] - //========================================================================= - void CompressorZLib::ReleaseDataBuffer() + // if we have decompressor cache delete it + if (zlibData->m_decompressedCache) { - --m_compressedDataBufferUseCount; - if (m_compressedDataBufferUseCount == 0) - { - AZ_Assert(m_compressedDataBuffer != nullptr, "Invalid data buffer! We should have a non null pointer!"); - azfree(m_compressedDataBuffer, AZ::SystemAllocator, m_compressedDataBufferSize, m_CompressedDataBufferAlignment); - m_compressedDataBuffer = nullptr; - m_lastReadStream = nullptr; // reset the cache info in the m_dataBuffer - } + azfree(zlibData->m_decompressedCache, AZ::SystemAllocator, m_decompressionCachePerStream, m_CompressedDataBufferAlignment); } - } // namespace IO -} // namespace AZ + + ReleaseDataBuffer(); + + // last step reset strream compressor data. + stream->SetCompressorData(nullptr); + return result; + } + + //========================================================================= + // AcquireDataBuffer + // [2/27/2013] + //========================================================================= + void CompressorZLib::AcquireDataBuffer() + { + if (m_compressedDataBuffer == nullptr) + { + AZ_Assert(m_compressedDataBufferUseCount == 0, "Buffer usecount should be 0 if the buffer is NULL"); + m_compressedDataBuffer = reinterpret_cast(azmalloc(m_compressedDataBufferSize, m_CompressedDataBufferAlignment, AZ::SystemAllocator, "CompressorZLib")); + m_lastReadStream = nullptr; // reset the cache info in the m_dataBuffer + } + ++m_compressedDataBufferUseCount; + } + + //========================================================================= + // ReleaseDataBuffer + // [2/27/2013] + //========================================================================= + void CompressorZLib::ReleaseDataBuffer() + { + --m_compressedDataBufferUseCount; + if (m_compressedDataBufferUseCount == 0) + { + AZ_Assert(m_compressedDataBuffer != nullptr, "Invalid data buffer! We should have a non null pointer!"); + azfree(m_compressedDataBuffer, AZ::SystemAllocator, m_compressedDataBufferSize, m_CompressedDataBufferAlignment); + m_compressedDataBuffer = nullptr; + m_lastReadStream = nullptr; // reset the cache info in the m_dataBuffer + } + } +} // namespace AZ::IO #endif // #if !defined(AZCORE_EXCLUDE_ZLIB) diff --git a/Code/Framework/AzCore/AzCore/IO/CompressorZStd.cpp b/Code/Framework/AzCore/AzCore/IO/CompressorZStd.cpp index b1631d2d22..91f380d73b 100644 --- a/Code/Framework/AzCore/AzCore/IO/CompressorZStd.cpp +++ b/Code/Framework/AzCore/AzCore/IO/CompressorZStd.cpp @@ -14,478 +14,475 @@ #include #include -namespace AZ +namespace AZ::IO { - namespace IO + CompressorZStd::CompressorZStd(unsigned int decompressionCachePerStream, unsigned int dataBufferSize) + : m_compressedDataBufferSize(dataBufferSize) + , m_decompressionCachePerStream(decompressionCachePerStream) + { - CompressorZStd::CompressorZStd(unsigned int decompressionCachePerStream, unsigned int dataBufferSize) - : m_compressedDataBufferSize(dataBufferSize) - , m_decompressionCachePerStream(decompressionCachePerStream) + AZ_Assert((dataBufferSize % (32 * 1024)) == 0, "Data buffer size %d must be multiple of 32 KB.", dataBufferSize); + AZ_Assert((decompressionCachePerStream % (32 * 1024)) == 0, "Decompress cache size %d must be multiple of 32 KB.", decompressionCachePerStream); + } + CompressorZStd::~CompressorZStd() + { + AZ_Warning("IO", m_compressedDataBufferUseCount == 0, "CompressorZStd has it's data buffer still referenced, it means that %d compressed streams have NOT closed. Freeing data...", m_compressedDataBufferUseCount); + while (m_compressedDataBufferUseCount) { - AZ_Assert((dataBufferSize % (32 * 1024)) == 0, "Data buffer size %d must be multiple of 32 KB.", dataBufferSize); - AZ_Assert((decompressionCachePerStream % (32 * 1024)) == 0, "Decompress cache size %d must be multiple of 32 KB.", decompressionCachePerStream); + ReleaseDataBuffer(); } + } - CompressorZStd::~CompressorZStd() + AZ::u32 CompressorZStd::TypeId() + { + return AZ_CRC("ZStd", 0x72fd505e); + } + + bool CompressorZStd::ReadHeaderAndData(CompressorStream* stream, AZ::u8* data, unsigned int dataSize) + { + if (stream->GetCompressorData() != nullptr) // we already have compressor data { - AZ_Warning("IO", m_compressedDataBufferUseCount == 0, "CompressorZStd has it's data buffer still referenced, it means that %d compressed streams have NOT closed. Freeing data...", m_compressedDataBufferUseCount); - while (m_compressedDataBufferUseCount) - { - ReleaseDataBuffer(); - } - } - - AZ::u32 CompressorZStd::TypeId() - { - return AZ_CRC("ZStd", 0x72fd505e); - } - - bool CompressorZStd::ReadHeaderAndData(CompressorStream* stream, AZ::u8* data, unsigned int dataSize) - { - if (stream->GetCompressorData() != nullptr) // we already have compressor data - { - return false; - } - - // Read the ZStd header should be after the default compression header... - // We should not be in this function otherwise. - if (dataSize < sizeof(CompressorZStdHeader) + sizeof(ZStd::Header)) - { - AZ_Error("CompressorZStd", false, "We did not read enough data, we have only %d bytes left in the buffer and we need %d.", dataSize, sizeof(CompressorZStdHeader) + sizeof(ZStd::Header)); - return false; - } - - AcquireDataBuffer(); - - CompressorZStdHeader* hdr = reinterpret_cast(data); - dataSize -= sizeof(CompressorZStdHeader); - data += sizeof(CompressorZStdHeader); - - AZStd::unique_ptr zstdData = AZStd::make_unique(); - zstdData->m_compressor = this; - zstdData->m_uncompressedSize = 0; - zstdData->m_zstdHeader = *reinterpret_cast(data); - dataSize -= sizeof(zstdData->m_zstdHeader); - data += sizeof(zstdData->m_zstdHeader); - zstdData->m_decompressNextOffset = sizeof(CompressorHeader) + sizeof(CompressorZStdHeader) + sizeof(ZStd::Header); // start after the headers - - AZ_Error("CompressorZStd", hdr->m_numSeekPoints > 0, "We should have at least one seek point for the entire stream."); - - // go the end of the file and read all sync points. - SizeType compressedFileEnd = stream->GetLength(); - if (compressedFileEnd == 0) - { - return false; - } - - zstdData->m_seekPoints.resize(hdr->m_numSeekPoints); - SizeType dataToRead = sizeof(CompressorZStdSeekPoint) * static_cast(hdr->m_numSeekPoints); - SizeType seekPointOffset = compressedFileEnd - dataToRead; - - if (seekPointOffset > compressedFileEnd) - { - AZ_Error("CompressorZStd", false, "We have an invalid archive, this is impossible."); - return false; - } - - GenericStream* baseStream = stream->GetWrappedStream(); - if (baseStream->ReadAtOffset(dataToRead, zstdData->m_seekPoints.data(), seekPointOffset) != dataToRead) - { - return false; - } - - if (m_decompressionCachePerStream) - { - zstdData->m_decompressedCache = reinterpret_cast(azmalloc(m_decompressionCachePerStream, m_CompressedDataBufferAlignment, AZ::SystemAllocator, "CompressorZStd")); - } - - zstdData->m_decompressLastOffset = seekPointOffset; // set the start address of the seek points as the last valid read address for the compressed stream. - - zstdData->m_zstd.StartDecompressor(); - - stream->SetCompressorData(zstdData.release()); - - return true; - } - - bool CompressorZStd::WriteHeaderAndData(CompressorStream* stream) - { - if (!Compressor::WriteHeaderAndData(stream)) - { - return false; - } - - CompressorZStdData* compressorData = static_cast(stream->GetCompressorData()); - CompressorZStdHeader header; - header.m_numSeekPoints = aznumeric_caster(compressorData->m_seekPoints.size()); - GenericStream* baseStream = stream->GetWrappedStream(); - if (baseStream->WriteAtOffset(sizeof(header), &header, sizeof(CompressorHeader)) == sizeof(header)) - { - return true; - } - return false; } - inline CompressorZStd::SizeType CompressorZStd::FillFromDecompressCache(CompressorZStdData* zstdData, void*& buffer, SizeType& byteSize, SizeType& offset) + // Read the ZStd header should be after the default compression header... + // We should not be in this function otherwise. + if (dataSize < sizeof(CompressorZStdHeader) + sizeof(ZStd::Header)) { - SizeType firstOffsetInCache = zstdData->m_decompressedCacheOffset; - SizeType lastOffsetInCache = firstOffsetInCache + zstdData->m_decompressedCacheDataSize; - SizeType firstDataOffset = offset; - SizeType lastDataOffset = offset + byteSize; - SizeType numCopied = 0; - if (firstOffsetInCache < lastDataOffset && lastOffsetInCache >= firstDataOffset) // check if there is data in the cache - { - size_t copyOffsetStart = 0; - size_t copyOffsetEnd = zstdData->m_decompressedCacheDataSize; - - size_t bufferCopyOffset = 0; - - if (firstOffsetInCache < firstDataOffset) - { - copyOffsetStart = aznumeric_caster(firstDataOffset - firstOffsetInCache); - } - else - { - bufferCopyOffset = aznumeric_caster(firstOffsetInCache - firstDataOffset); - } - - if (lastOffsetInCache >= lastDataOffset) - { - copyOffsetEnd -= static_cast(lastOffsetInCache - lastDataOffset); - } - else if (bufferCopyOffset > 0) // the cache block is in the middle of the data, we can't use it (since we need to split buffer request into 2) - { - return 0; - } - - numCopied = copyOffsetEnd - copyOffsetStart; - memcpy(static_cast(buffer) + bufferCopyOffset, zstdData->m_decompressedCache + copyOffsetStart, static_cast(numCopied)); - - // adjust pointers and sizes - byteSize -= numCopied; - if (bufferCopyOffset == 0) - { - // copied in the start - buffer = reinterpret_cast(buffer) + numCopied; - offset += numCopied; - } - } - - return numCopied; + AZ_Error("CompressorZStd", false, "We did not read enough data, we have only %d bytes left in the buffer and we need %d.", dataSize, sizeof(CompressorZStdHeader) + sizeof(ZStd::Header)); + return false; } - inline CompressorZStd::SizeType CompressorZStd::FillCompressedBuffer(CompressorStream* stream) + AcquireDataBuffer(); + + CompressorZStdHeader* hdr = reinterpret_cast(data); + dataSize -= sizeof(CompressorZStdHeader); + data += sizeof(CompressorZStdHeader); + + AZStd::unique_ptr zstdData = AZStd::make_unique(); + zstdData->m_compressor = this; + zstdData->m_uncompressedSize = 0; + zstdData->m_zstdHeader = *reinterpret_cast(data); + dataSize -= sizeof(zstdData->m_zstdHeader); + data += sizeof(zstdData->m_zstdHeader); + zstdData->m_decompressNextOffset = sizeof(CompressorHeader) + sizeof(CompressorZStdHeader) + sizeof(ZStd::Header); // start after the headers + + AZ_Error("CompressorZStd", hdr->m_numSeekPoints > 0, "We should have at least one seek point for the entire stream."); + + // go the end of the file and read all sync points. + SizeType compressedFileEnd = stream->GetLength(); + if (compressedFileEnd == 0) { - CompressorZStdData* zstdData = static_cast(stream->GetCompressorData()); - SizeType dataFromBuffer = 0; - if (stream == m_lastReadStream) // if the buffer is filled with data from the current stream, try to reuse - { - if (zstdData->m_decompressNextOffset > m_lastReadStreamOffset) - { - SizeType offsetInCache = zstdData->m_decompressNextOffset - m_lastReadStreamOffset; - if (offsetInCache < m_lastReadStreamSize) // last check if there is data overlap - { - // copy the usable part at the start of the buffer - SizeType toMove = m_lastReadStreamSize - offsetInCache; - memcpy(m_compressedDataBuffer, &m_compressedDataBuffer[static_cast(offsetInCache)], static_cast(toMove)); - dataFromBuffer += toMove; - } - } - } - - SizeType toReadFromStream = m_compressedDataBufferSize - dataFromBuffer; - SizeType readOffset = zstdData->m_decompressNextOffset + dataFromBuffer; - if (readOffset + toReadFromStream > zstdData->m_decompressLastOffset) - { - // don't read past the end - AZ_Assert(readOffset <= zstdData->m_decompressLastOffset, "Read offset should always be before the end of stream."); - toReadFromStream = zstdData->m_decompressLastOffset - readOffset; - } - - SizeType numReadFromStream = 0; - if (toReadFromStream) // if we did not reuse the whole buffer, read some data from the stream - { - GenericStream* baseStream = stream->GetWrappedStream(); - numReadFromStream = baseStream->ReadAtOffset(toReadFromStream, &m_compressedDataBuffer[static_cast(dataFromBuffer)], readOffset); - } - - // update what's actually in the read data buffer. - m_lastReadStream = stream; - m_lastReadStreamOffset = zstdData->m_decompressNextOffset; - m_lastReadStreamSize = dataFromBuffer + numReadFromStream; - return m_lastReadStreamSize; + return false; } - struct ZStdCompareUpper + zstdData->m_seekPoints.resize(hdr->m_numSeekPoints); + SizeType dataToRead = sizeof(CompressorZStdSeekPoint) * static_cast(hdr->m_numSeekPoints); + SizeType seekPointOffset = compressedFileEnd - dataToRead; + + if (seekPointOffset > compressedFileEnd) { - bool operator()(const AZ::u64& offset, const CompressorZStdSeekPoint& sp) const - { - return offset < sp.m_uncompressedOffset; - } - }; + AZ_Error("CompressorZStd", false, "We have an invalid archive, this is impossible."); + return false; + } - CompressorZStd::SizeType CompressorZStd::Read(CompressorStream* stream, SizeType byteSize, SizeType offset, void* buffer) + GenericStream* baseStream = stream->GetWrappedStream(); + if (baseStream->ReadAtOffset(dataToRead, zstdData->m_seekPoints.data(), seekPointOffset) != dataToRead) { - AZ_Assert(stream->GetCompressorData(), "This stream doesn't have decompression enabled."); - CompressorZStdData* zstdData = static_cast(stream->GetCompressorData()); - AZ_Assert(!zstdData->m_zstd.IsCompressorStarted(), "You can't read/decompress while writing a compressed stream %s."); + return false; + } - // check if the request can be finished from the decompressed cache - SizeType numRead = FillFromDecompressCache(zstdData, buffer, byteSize, offset); - if (byteSize == 0) // are we done + if (m_decompressionCachePerStream) + { + zstdData->m_decompressedCache = reinterpret_cast(azmalloc(m_decompressionCachePerStream, m_CompressedDataBufferAlignment, AZ::SystemAllocator, "CompressorZStd")); + } + + zstdData->m_decompressLastOffset = seekPointOffset; // set the start address of the seek points as the last valid read address for the compressed stream. + + zstdData->m_zstd.StartDecompressor(); + + stream->SetCompressorData(zstdData.release()); + + return true; + } + + bool CompressorZStd::WriteHeaderAndData(CompressorStream* stream) + { + if (!Compressor::WriteHeaderAndData(stream)) + { + return false; + } + + CompressorZStdData* compressorData = static_cast(stream->GetCompressorData()); + CompressorZStdHeader header; + header.m_numSeekPoints = aznumeric_caster(compressorData->m_seekPoints.size()); + GenericStream* baseStream = stream->GetWrappedStream(); + if (baseStream->WriteAtOffset(sizeof(header), &header, sizeof(CompressorHeader)) == sizeof(header)) + { + return true; + } + + return false; + } + + inline CompressorZStd::SizeType CompressorZStd::FillFromDecompressCache(CompressorZStdData* zstdData, void*& buffer, SizeType& byteSize, SizeType& offset) + { + SizeType firstOffsetInCache = zstdData->m_decompressedCacheOffset; + SizeType lastOffsetInCache = firstOffsetInCache + zstdData->m_decompressedCacheDataSize; + SizeType firstDataOffset = offset; + SizeType lastDataOffset = offset + byteSize; + SizeType numCopied = 0; + if (firstOffsetInCache < lastDataOffset && lastOffsetInCache >= firstDataOffset) // check if there is data in the cache + { + size_t copyOffsetStart = 0; + size_t copyOffsetEnd = zstdData->m_decompressedCacheDataSize; + + size_t bufferCopyOffset = 0; + + if (firstOffsetInCache < firstDataOffset) { - return numRead; + copyOffsetStart = aznumeric_caster(firstDataOffset - firstOffsetInCache); + } + else + { + bufferCopyOffset = aznumeric_caster(firstOffsetInCache - firstDataOffset); } - // find the best seek point for current offset - CompressorZStdData::SeekPointArray::iterator it = AZStd::upper_bound(zstdData->m_seekPoints.begin(), zstdData->m_seekPoints.end(), offset, ZStdCompareUpper()); - AZ_Assert(it != zstdData->m_seekPoints.begin(), "This should be impossible, we should always have a valid seek point at 0 offset."); - const CompressorZStdSeekPoint& bestSeekPoint = *(--it); // get the previous (so it includes the current offset) - - // if read is continuous continue with decompression - bool isJumpToSeekPoint = false; - SizeType lastOffsetInCache = zstdData->m_decompressedCacheOffset + zstdData->m_decompressedCacheDataSize; - if (bestSeekPoint.m_uncompressedOffset > lastOffsetInCache) // if the best seek point is forward, jump forward to it. + if (lastOffsetInCache >= lastDataOffset) { - isJumpToSeekPoint = true; + copyOffsetEnd -= static_cast(lastOffsetInCache - lastDataOffset); } - else if (offset < lastOffsetInCache) // if the seek point is in the past and the requested offset is not in the cache jump back to it. + else if (bufferCopyOffset > 0) // the cache block is in the middle of the data, we can't use it (since we need to split buffer request into 2) { - isJumpToSeekPoint = true; + return 0; } - if (isJumpToSeekPoint) - { - zstdData->m_decompressNextOffset = bestSeekPoint.m_compressedOffset; // set next read point - zstdData->m_decompressedCacheOffset = bestSeekPoint.m_uncompressedOffset; // set uncompressed offset - zstdData->m_decompressedCacheDataSize = 0; // invalidate the cache - zstdData->m_zstd.ResetDecompressor(&zstdData->m_zstdHeader); // reset decompressor and setup the header. - } + numCopied = copyOffsetEnd - copyOffsetStart; + memcpy(static_cast(buffer) + bufferCopyOffset, zstdData->m_decompressedCache + copyOffsetStart, static_cast(numCopied)); - // decompress and move forward until the request is done - while (byteSize > 0) + // adjust pointers and sizes + byteSize -= numCopied; + if (bufferCopyOffset == 0) { - // fill buffer with compressed data - SizeType compressedDataSize = FillCompressedBuffer(stream); - if (compressedDataSize == 0) + // copied in the start + buffer = reinterpret_cast(buffer) + numCopied; + offset += numCopied; + } + } + + return numCopied; + } + + inline CompressorZStd::SizeType CompressorZStd::FillCompressedBuffer(CompressorStream* stream) + { + CompressorZStdData* zstdData = static_cast(stream->GetCompressorData()); + SizeType dataFromBuffer = 0; + if (stream == m_lastReadStream) // if the buffer is filled with data from the current stream, try to reuse + { + if (zstdData->m_decompressNextOffset > m_lastReadStreamOffset) + { + SizeType offsetInCache = zstdData->m_decompressNextOffset - m_lastReadStreamOffset; + if (offsetInCache < m_lastReadStreamSize) // last check if there is data overlap { - return numRead; // we are done reading and obviously we did not managed to read all data + // copy the usable part at the start of the buffer + SizeType toMove = m_lastReadStreamSize - offsetInCache; + memcpy(m_compressedDataBuffer, &m_compressedDataBuffer[static_cast(offsetInCache)], static_cast(toMove)); + dataFromBuffer += toMove; } - unsigned int processedCompressedData = 0; - while (byteSize > 0 && processedCompressedData < compressedDataSize) // decompressed data either until we are done with the request (byteSize == 0) or we need to fill the compression buffer again. - { - // if we have data in the cache move to the next offset, we always move forward by default. - zstdData->m_decompressedCacheOffset += zstdData->m_decompressedCacheDataSize; - - // decompress in the cache buffer - u32 availDecompressedCacheSize = m_decompressionCachePerStream; // reset buffer size - size_t nextBlockSize; - unsigned int processed = zstdData->m_zstd.Decompress(&m_compressedDataBuffer[processedCompressedData], - static_cast(compressedDataSize) - processedCompressedData, - zstdData->m_decompressedCache, - availDecompressedCacheSize, - &nextBlockSize); - zstdData->m_decompressedCacheDataSize = m_decompressionCachePerStream - availDecompressedCacheSize; - if (processed == 0) - { - break; // we processed everything we could, load more compressed data. - } - processedCompressedData += processed; - // fill what we can from the cache - numRead += FillFromDecompressCache(zstdData, buffer, byteSize, offset); - } - // update next read position the the compressed stream - zstdData->m_decompressNextOffset += processedCompressedData; } + } + + SizeType toReadFromStream = m_compressedDataBufferSize - dataFromBuffer; + SizeType readOffset = zstdData->m_decompressNextOffset + dataFromBuffer; + if (readOffset + toReadFromStream > zstdData->m_decompressLastOffset) + { + // don't read past the end + AZ_Assert(readOffset <= zstdData->m_decompressLastOffset, "Read offset should always be before the end of stream."); + toReadFromStream = zstdData->m_decompressLastOffset - readOffset; + } + + SizeType numReadFromStream = 0; + if (toReadFromStream) // if we did not reuse the whole buffer, read some data from the stream + { + GenericStream* baseStream = stream->GetWrappedStream(); + numReadFromStream = baseStream->ReadAtOffset(toReadFromStream, &m_compressedDataBuffer[static_cast(dataFromBuffer)], readOffset); + } + + // update what's actually in the read data buffer. + m_lastReadStream = stream; + m_lastReadStreamOffset = zstdData->m_decompressNextOffset; + m_lastReadStreamSize = dataFromBuffer + numReadFromStream; + return m_lastReadStreamSize; + } + + struct ZStdCompareUpper + { + bool operator()(const AZ::u64& offset, const CompressorZStdSeekPoint& sp) const + { + return offset < sp.m_uncompressedOffset; + } + }; + + CompressorZStd::SizeType CompressorZStd::Read(CompressorStream* stream, SizeType byteSize, SizeType offset, void* buffer) + { + AZ_Assert(stream->GetCompressorData(), "This stream doesn't have decompression enabled."); + CompressorZStdData* zstdData = static_cast(stream->GetCompressorData()); + AZ_Assert(!zstdData->m_zstd.IsCompressorStarted(), "You can't read/decompress while writing a compressed stream %s."); + + // check if the request can be finished from the decompressed cache + SizeType numRead = FillFromDecompressCache(zstdData, buffer, byteSize, offset); + if (byteSize == 0) // are we done + { return numRead; } - CompressorZStd::SizeType CompressorZStd::Write(CompressorStream* stream, SizeType byteSize, const void* data, SizeType offset) + // find the best seek point for current offset + CompressorZStdData::SeekPointArray::iterator it = AZStd::upper_bound(zstdData->m_seekPoints.begin(), zstdData->m_seekPoints.end(), offset, ZStdCompareUpper()); + AZ_Assert(it != zstdData->m_seekPoints.begin(), "This should be impossible, we should always have a valid seek point at 0 offset."); + const CompressorZStdSeekPoint& bestSeekPoint = *(--it); // get the previous (so it includes the current offset) + + // if read is continuous continue with decompression + bool isJumpToSeekPoint = false; + SizeType lastOffsetInCache = zstdData->m_decompressedCacheOffset + zstdData->m_decompressedCacheDataSize; + if (bestSeekPoint.m_uncompressedOffset > lastOffsetInCache) // if the best seek point is forward, jump forward to it. { - AZ_UNUSED(offset); + isJumpToSeekPoint = true; + } + else if (offset < lastOffsetInCache) // if the seek point is in the past and the requested offset is not in the cache jump back to it. + { + isJumpToSeekPoint = true; + } - AZ_Assert(stream && stream->GetCompressorData(), "This stream doesn't have compression enabled. Call Stream::WriteCompressed after you create the file."); - AZ_Assert(offset == SizeType(-1) || offset == stream->GetCurPos(), "We can write compressed data only at the end of the stream."); + if (isJumpToSeekPoint) + { + zstdData->m_decompressNextOffset = bestSeekPoint.m_compressedOffset; // set next read point + zstdData->m_decompressedCacheOffset = bestSeekPoint.m_uncompressedOffset; // set uncompressed offset + zstdData->m_decompressedCacheDataSize = 0; // invalidate the cache + zstdData->m_zstd.ResetDecompressor(&zstdData->m_zstdHeader); // reset decompressor and setup the header. + } - m_lastReadStream = nullptr; // invalidate last read position, otherwise m_dataBuffer will be corrupted (as we are about to write in it). - - CompressorZStdData* zstdData = static_cast(stream->GetCompressorData()); - AZ_Assert(!zstdData->m_zstd.IsDecompressorStarted(), "You can't write while reading/decompressing a compressed stream."); - - const u8* bytes = reinterpret_cast(data); - unsigned int dataToCompress = aznumeric_caster(byteSize); - while (dataToCompress != 0) + // decompress and move forward until the request is done + while (byteSize > 0) + { + // fill buffer with compressed data + SizeType compressedDataSize = FillCompressedBuffer(stream); + if (compressedDataSize == 0) { - unsigned int oldDataToCompress = dataToCompress; - unsigned int compressedSize = zstdData->m_zstd.Compress(bytes, dataToCompress, m_compressedDataBuffer, m_compressedDataBufferSize); - if (compressedSize) - { - GenericStream* baseStream = stream->GetWrappedStream(); - SizeType numWritten = baseStream->Write(compressedSize, m_compressedDataBuffer); - if (numWritten != compressedSize) - { - return numWritten; // error we could not write all data - } - } - bytes += oldDataToCompress - dataToCompress; + return numRead; // we are done reading and obviously we did not managed to read all data } - zstdData->m_uncompressedSize += byteSize; - - if (zstdData->m_autoSeekSize > 0) + unsigned int processedCompressedData = 0; + while (byteSize > 0 && processedCompressedData < compressedDataSize) // decompressed data either until we are done with the request (byteSize == 0) or we need to fill the compression buffer again. { - // insert a seek point if needed. - if (zstdData->m_seekPoints.empty()) + // if we have data in the cache move to the next offset, we always move forward by default. + zstdData->m_decompressedCacheOffset += zstdData->m_decompressedCacheDataSize; + + // decompress in the cache buffer + u32 availDecompressedCacheSize = m_decompressionCachePerStream; // reset buffer size + size_t nextBlockSize; + unsigned int processed = zstdData->m_zstd.Decompress(&m_compressedDataBuffer[processedCompressedData], + static_cast(compressedDataSize) - processedCompressedData, + zstdData->m_decompressedCache, + availDecompressedCacheSize, + &nextBlockSize); + zstdData->m_decompressedCacheDataSize = m_decompressionCachePerStream - availDecompressedCacheSize; + if (processed == 0) { - if (zstdData->m_uncompressedSize >= zstdData->m_autoSeekSize) - { - WriteSeekPoint(stream); - } + break; // we processed everything we could, load more compressed data. } - else if ((zstdData->m_uncompressedSize - zstdData->m_seekPoints.back().m_uncompressedOffset) > zstdData->m_autoSeekSize) + processedCompressedData += processed; + // fill what we can from the cache + numRead += FillFromDecompressCache(zstdData, buffer, byteSize, offset); + } + // update next read position the the compressed stream + zstdData->m_decompressNextOffset += processedCompressedData; + } + return numRead; + } + + CompressorZStd::SizeType CompressorZStd::Write(CompressorStream* stream, SizeType byteSize, const void* data, SizeType offset) + { + AZ_UNUSED(offset); + + AZ_Assert(stream && stream->GetCompressorData(), "This stream doesn't have compression enabled. Call Stream::WriteCompressed after you create the file."); + AZ_Assert(offset == SizeType(-1) || offset == stream->GetCurPos(), "We can write compressed data only at the end of the stream."); + + m_lastReadStream = nullptr; // invalidate last read position, otherwise m_dataBuffer will be corrupted (as we are about to write in it). + + CompressorZStdData* zstdData = static_cast(stream->GetCompressorData()); + AZ_Assert(!zstdData->m_zstd.IsDecompressorStarted(), "You can't write while reading/decompressing a compressed stream."); + + const u8* bytes = reinterpret_cast(data); + unsigned int dataToCompress = aznumeric_caster(byteSize); + while (dataToCompress != 0) + { + unsigned int oldDataToCompress = dataToCompress; + unsigned int compressedSize = zstdData->m_zstd.Compress(bytes, dataToCompress, m_compressedDataBuffer, m_compressedDataBufferSize); + if (compressedSize) + { + GenericStream* baseStream = stream->GetWrappedStream(); + SizeType numWritten = baseStream->Write(compressedSize, m_compressedDataBuffer); + if (numWritten != compressedSize) + { + return numWritten; // error we could not write all data + } + } + bytes += oldDataToCompress - dataToCompress; + } + zstdData->m_uncompressedSize += byteSize; + + if (zstdData->m_autoSeekSize > 0) + { + // insert a seek point if needed. + if (zstdData->m_seekPoints.empty()) + { + if (zstdData->m_uncompressedSize >= zstdData->m_autoSeekSize) { WriteSeekPoint(stream); } } - return byteSize; + else if ((zstdData->m_uncompressedSize - zstdData->m_seekPoints.back().m_uncompressedOffset) > zstdData->m_autoSeekSize) + { + WriteSeekPoint(stream); + } } + return byteSize; + } - bool CompressorZStd::WriteSeekPoint(CompressorStream* stream) + bool CompressorZStd::WriteSeekPoint(CompressorStream* stream) + { + AZ_Assert(stream && stream->GetCompressorData(), "This stream doesn't have compression enabled. Call Stream::WriteCompressed after you create the file."); + CompressorZStdData* zstdData = static_cast(stream->GetCompressorData()); + + m_lastReadStream = nullptr; // invalidate last read position, otherwise m_dataBuffer will be corrupted (as we are about to write in it). + + unsigned int compressedSize; + unsigned int dataToCompress = 0; + do { - AZ_Assert(stream && stream->GetCompressorData(), "This stream doesn't have compression enabled. Call Stream::WriteCompressed after you create the file."); - CompressorZStdData* zstdData = static_cast(stream->GetCompressorData()); + compressedSize = zstdData->m_zstd.Compress(nullptr, dataToCompress, m_compressedDataBuffer, m_compressedDataBufferSize, ZStd::FT_FULL_FLUSH); + if (compressedSize) + { + GenericStream* baseStream = stream->GetWrappedStream(); + SizeType numWritten = baseStream->Write(compressedSize, m_compressedDataBuffer); + if (numWritten != compressedSize) + { + return false; // error we wrote less than than requested! + } + } + } while (dataToCompress != 0); + CompressorZStdSeekPoint sp; + sp.m_compressedOffset = stream->GetLength(); + sp.m_uncompressedOffset = zstdData->m_uncompressedSize; + zstdData->m_seekPoints.push_back(sp); + return true; + } + + bool CompressorZStd::StartCompressor(CompressorStream* stream, int compressionLevel, SizeType autoSeekDataSize) + { + AZ_Assert(stream && !stream->GetCompressorData(), "Stream has compressor already enabled."); + + AcquireDataBuffer(); + + CompressorZStdData* zstdData = aznew CompressorZStdData; + zstdData->m_compressor = this; + zstdData->m_zstdHeader = 0; // not used for compression + zstdData->m_uncompressedSize = 0; + zstdData->m_autoSeekSize = autoSeekDataSize; + compressionLevel = AZ::GetClamp(compressionLevel, 1, 9); // remap to zlib levels + + zstdData->m_zstd.StartCompressor(compressionLevel); + + stream->SetCompressorData(zstdData); + + if (WriteHeaderAndData(stream)) + { + // add the first and always present seek point at the start of the compressed stream + CompressorZStdSeekPoint sp; + sp.m_compressedOffset = sizeof(CompressorHeader) + sizeof(CompressorZStdHeader) + sizeof(zstdData->m_zstdHeader); + sp.m_uncompressedOffset = 0; + zstdData->m_seekPoints.push_back(sp); + return true; + } + return false; + } + + bool CompressorZStd::Close(CompressorStream* stream) + { + AZ_Assert(stream->IsOpen(), "Stream is not open to be closed."); + + CompressorZStdData* zstdData = static_cast(stream->GetCompressorData()); + GenericStream* baseStream = stream->GetWrappedStream(); + + bool result = true; + if (zstdData->m_zstd.IsCompressorStarted()) + { m_lastReadStream = nullptr; // invalidate last read position, otherwise m_dataBuffer will be corrupted (as we are about to write in it). + // flush all compressed data unsigned int compressedSize; unsigned int dataToCompress = 0; do { - compressedSize = zstdData->m_zstd.Compress(nullptr, dataToCompress, m_compressedDataBuffer, m_compressedDataBufferSize, ZStd::FT_FULL_FLUSH); + compressedSize = zstdData->m_zstd.Compress(nullptr, dataToCompress, m_compressedDataBuffer, m_compressedDataBufferSize, ZStd::FT_FINISH); if (compressedSize) { - GenericStream* baseStream = stream->GetWrappedStream(); - SizeType numWritten = baseStream->Write(compressedSize, m_compressedDataBuffer); - if (numWritten != compressedSize) - { - return false; // error we wrote less than than requested! - } + baseStream->Write(compressedSize, m_compressedDataBuffer); } } while (dataToCompress != 0); - CompressorZStdSeekPoint sp; - sp.m_compressedOffset = stream->GetLength(); - sp.m_uncompressedOffset = zstdData->m_uncompressedSize; - zstdData->m_seekPoints.push_back(sp); - return true; + result = WriteHeaderAndData(stream); + if (result) + { + SizeType dataToWrite = zstdData->m_seekPoints.size() * sizeof(CompressorZStdSeekPoint); + baseStream->Seek(0U, GenericStream::SeekMode::ST_SEEK_END); + result = (baseStream->Write(dataToWrite, zstdData->m_seekPoints.data()) == dataToWrite); + } } - - bool CompressorZStd::StartCompressor(CompressorStream* stream, int compressionLevel, SizeType autoSeekDataSize) + else { - AZ_Assert(stream && !stream->GetCompressorData(), "Stream has compressor already enabled."); - - AcquireDataBuffer(); - - CompressorZStdData* zstdData = aznew CompressorZStdData; - zstdData->m_compressor = this; - zstdData->m_zstdHeader = 0; // not used for compression - zstdData->m_uncompressedSize = 0; - zstdData->m_autoSeekSize = autoSeekDataSize; - compressionLevel = AZ::GetClamp(compressionLevel, 1, 9); // remap to zlib levels - - zstdData->m_zstd.StartCompressor(compressionLevel); - - stream->SetCompressorData(zstdData); - - if (WriteHeaderAndData(stream)) + if (m_lastReadStream == stream) { - // add the first and always present seek point at the start of the compressed stream - CompressorZStdSeekPoint sp; - sp.m_compressedOffset = sizeof(CompressorHeader) + sizeof(CompressorZStdHeader) + sizeof(zstdData->m_zstdHeader); - sp.m_uncompressedOffset = 0; - zstdData->m_seekPoints.push_back(sp); - return true; + m_lastReadStream = nullptr; // invalidate the data in m_dataBuffer if it was from the current stream. } - return false; } - bool CompressorZStd::Close(CompressorStream* stream) + // if we have decompressor cache delete it + if (zstdData->m_decompressedCache) { - AZ_Assert(stream->IsOpen(), "Stream is not open to be closed."); - - CompressorZStdData* zstdData = static_cast(stream->GetCompressorData()); - GenericStream* baseStream = stream->GetWrappedStream(); - - bool result = true; - if (zstdData->m_zstd.IsCompressorStarted()) - { - m_lastReadStream = nullptr; // invalidate last read position, otherwise m_dataBuffer will be corrupted (as we are about to write in it). - - // flush all compressed data - unsigned int compressedSize; - unsigned int dataToCompress = 0; - do - { - compressedSize = zstdData->m_zstd.Compress(nullptr, dataToCompress, m_compressedDataBuffer, m_compressedDataBufferSize, ZStd::FT_FINISH); - if (compressedSize) - { - baseStream->Write(compressedSize, m_compressedDataBuffer); - } - } while (dataToCompress != 0); - - result = WriteHeaderAndData(stream); - if (result) - { - SizeType dataToWrite = zstdData->m_seekPoints.size() * sizeof(CompressorZStdSeekPoint); - baseStream->Seek(0U, GenericStream::SeekMode::ST_SEEK_END); - result = (baseStream->Write(dataToWrite, zstdData->m_seekPoints.data()) == dataToWrite); - } - } - else - { - if (m_lastReadStream == stream) - { - m_lastReadStream = nullptr; // invalidate the data in m_dataBuffer if it was from the current stream. - } - } - - // if we have decompressor cache delete it - if (zstdData->m_decompressedCache) - { - azfree(zstdData->m_decompressedCache, AZ::SystemAllocator, m_decompressionCachePerStream, m_CompressedDataBufferAlignment); - } - - ReleaseDataBuffer(); - - // last step reset strream compressor data. - stream->SetCompressorData(nullptr); - return result; + azfree(zstdData->m_decompressedCache, AZ::SystemAllocator, m_decompressionCachePerStream, m_CompressedDataBufferAlignment); } - void CompressorZStd::AcquireDataBuffer() + ReleaseDataBuffer(); + + // last step reset strream compressor data. + stream->SetCompressorData(nullptr); + return result; + } + + void CompressorZStd::AcquireDataBuffer() + { + if (m_compressedDataBuffer == nullptr) { - if (m_compressedDataBuffer == nullptr) - { - AZ_Assert(m_compressedDataBufferUseCount == 0, "Buffer usecount should be 0 if the buffer is NULL"); - m_compressedDataBuffer = reinterpret_cast(azmalloc(m_compressedDataBufferSize, m_CompressedDataBufferAlignment, AZ::SystemAllocator, "CompressorZStd")); - m_lastReadStream = nullptr; // reset the cache info in the m_dataBuffer - } - ++m_compressedDataBufferUseCount; + AZ_Assert(m_compressedDataBufferUseCount == 0, "Buffer usecount should be 0 if the buffer is NULL"); + m_compressedDataBuffer = reinterpret_cast(azmalloc(m_compressedDataBufferSize, m_CompressedDataBufferAlignment, AZ::SystemAllocator, "CompressorZStd")); + m_lastReadStream = nullptr; // reset the cache info in the m_dataBuffer } + ++m_compressedDataBufferUseCount; + } - void CompressorZStd::ReleaseDataBuffer() + void CompressorZStd::ReleaseDataBuffer() + { + --m_compressedDataBufferUseCount; + if (m_compressedDataBufferUseCount == 0) { - --m_compressedDataBufferUseCount; - if (m_compressedDataBufferUseCount == 0) - { - AZ_Assert(m_compressedDataBuffer, "Invalid data buffer. We should have a non null pointer."); - azfree(m_compressedDataBuffer, AZ::SystemAllocator, m_compressedDataBufferSize, m_CompressedDataBufferAlignment); - m_compressedDataBuffer = nullptr; - m_lastReadStream = nullptr; // reset the cache info in the m_dataBuffer - } + AZ_Assert(m_compressedDataBuffer, "Invalid data buffer. We should have a non null pointer."); + azfree(m_compressedDataBuffer, AZ::SystemAllocator, m_compressedDataBufferSize, m_CompressedDataBufferAlignment); + m_compressedDataBuffer = nullptr; + m_lastReadStream = nullptr; // reset the cache info in the m_dataBuffer } - } // namespace IO -} // namespace AZ + } +} // namespace AZ::IO #endif // #if !defined(AZCORE_EXCLUDE_ZSTD) diff --git a/Code/Framework/AzCore/AzCore/IO/FileIO.cpp b/Code/Framework/AzCore/AzCore/IO/FileIO.cpp index 837aca8d84..3522187131 100644 --- a/Code/Framework/AzCore/AzCore/IO/FileIO.cpp +++ b/Code/Framework/AzCore/AzCore/IO/FileIO.cpp @@ -21,485 +21,482 @@ # define SEEK_END 2 /* Set file pointer to EOF plus "offset" */ #endif -namespace AZ +namespace AZ::IO { - namespace IO + static EnvironmentVariable g_fileIOInstance; + static EnvironmentVariable g_directFileIOInstance; + static const char* s_EngineFileIOName = "EngineFileIO"; + static const char* s_DirectFileIOName = "DirectFileIO"; + + FileIOBase* FileIOBase::GetInstance() { - static EnvironmentVariable g_fileIOInstance; - static EnvironmentVariable g_directFileIOInstance; - static const char* s_EngineFileIOName = "EngineFileIO"; - static const char* s_DirectFileIOName = "DirectFileIO"; - - FileIOBase* FileIOBase::GetInstance() + if (!g_fileIOInstance) { - if (!g_fileIOInstance) - { - g_fileIOInstance = Environment::FindVariable(s_EngineFileIOName); - } - - return g_fileIOInstance ? (*g_fileIOInstance) : nullptr; + g_fileIOInstance = Environment::FindVariable(s_EngineFileIOName); } - void FileIOBase::SetInstance(FileIOBase* instance) + return g_fileIOInstance ? (*g_fileIOInstance) : nullptr; + } + + void FileIOBase::SetInstance(FileIOBase* instance) + { + if (!g_fileIOInstance) { - if (!g_fileIOInstance) - { - g_fileIOInstance = Environment::CreateVariable(s_EngineFileIOName); - (*g_fileIOInstance) = nullptr; - } - - // at this point we're guaranteed to have g_fileIOInstance. Its value might be null. - - if ((instance) && (g_fileIOInstance) && (*g_fileIOInstance)) - { - AZ_Error("FileIO", false, "FileIOBase::SetInstance was called without first destroying the old instance and setting it to nullptr"); - } - - (*g_fileIOInstance) = instance; + g_fileIOInstance = Environment::CreateVariable(s_EngineFileIOName); + (*g_fileIOInstance) = nullptr; } - FileIOBase* FileIOBase::GetDirectInstance() + // at this point we're guaranteed to have g_fileIOInstance. Its value might be null. + + if ((instance) && (g_fileIOInstance) && (*g_fileIOInstance)) { - if (!g_directFileIOInstance) - { - g_directFileIOInstance = Environment::FindVariable(s_DirectFileIOName); - } - - // for backwards compatibilty, return the regular instance if this is not attached - if (!g_directFileIOInstance) - { - return GetInstance(); - } - - return g_directFileIOInstance ? (*g_directFileIOInstance) : nullptr; + AZ_Error("FileIO", false, "FileIOBase::SetInstance was called without first destroying the old instance and setting it to nullptr"); } - void FileIOBase::SetDirectInstance(FileIOBase* instance) + (*g_fileIOInstance) = instance; + } + + FileIOBase* FileIOBase::GetDirectInstance() + { + if (!g_directFileIOInstance) { - if (!g_directFileIOInstance) - { - g_directFileIOInstance = Environment::CreateVariable(s_DirectFileIOName); - (*g_directFileIOInstance) = nullptr; - } - - // at this point we're guaranteed to have g_directFileIOInstance. Its value might be null. - - if ((instance) && (g_directFileIOInstance) && (*g_directFileIOInstance)) - { - AZ_Error("FileIO", false, "FileIOBase::SetDirectInstance was called without first destroying the old instance and setting it to nullptr"); - } - - (*g_directFileIOInstance) = instance; + g_directFileIOInstance = Environment::FindVariable(s_DirectFileIOName); } - AZStd::optional FileIOBase::ConvertToAlias(const AZ::IO::PathView& path) const + // for backwards compatibilty, return the regular instance if this is not attached + if (!g_directFileIOInstance) { - AZ::IO::FixedMaxPath convertedPath; - if (ConvertToAlias(convertedPath, path)) - { - return convertedPath; - } - - return AZStd::nullopt; + return GetInstance(); } - AZStd::optional FileIOBase::ResolvePath(const AZ::IO::PathView& path) const - { - AZ::IO::FixedMaxPath resolvedPath; - if (ResolvePath(resolvedPath, path)) - { - return resolvedPath; - } + return g_directFileIOInstance ? (*g_directFileIOInstance) : nullptr; + } - return AZStd::nullopt; + void FileIOBase::SetDirectInstance(FileIOBase* instance) + { + if (!g_directFileIOInstance) + { + g_directFileIOInstance = Environment::CreateVariable(s_DirectFileIOName); + (*g_directFileIOInstance) = nullptr; } - SeekType GetSeekTypeFromFSeekMode(int mode) - { - switch (mode) - { - case SEEK_SET: - return SeekType::SeekFromStart; - case SEEK_CUR: - return SeekType::SeekFromCurrent; - case SEEK_END: - return SeekType::SeekFromEnd; - } + // at this point we're guaranteed to have g_directFileIOInstance. Its value might be null. - // Must have some default, hitting here means some random int mode + if ((instance) && (g_directFileIOInstance) && (*g_directFileIOInstance)) + { + AZ_Error("FileIO", false, "FileIOBase::SetDirectInstance was called without first destroying the old instance and setting it to nullptr"); + } + + (*g_directFileIOInstance) = instance; + } + + AZStd::optional FileIOBase::ConvertToAlias(const AZ::IO::PathView& path) const + { + AZ::IO::FixedMaxPath convertedPath; + if (ConvertToAlias(convertedPath, path)) + { + return convertedPath; + } + + return AZStd::nullopt; + } + + AZStd::optional FileIOBase::ResolvePath(const AZ::IO::PathView& path) const + { + AZ::IO::FixedMaxPath resolvedPath; + if (ResolvePath(resolvedPath, path)) + { + return resolvedPath; + } + + return AZStd::nullopt; + } + + SeekType GetSeekTypeFromFSeekMode(int mode) + { + switch (mode) + { + case SEEK_SET: return SeekType::SeekFromStart; + case SEEK_CUR: + return SeekType::SeekFromCurrent; + case SEEK_END: + return SeekType::SeekFromEnd; } - int GetFSeekModeFromSeekType(SeekType type) - { - switch (type) - { - case SeekType::SeekFromStart: - return SEEK_SET; - case SeekType::SeekFromCurrent: - return SEEK_CUR; - case SeekType::SeekFromEnd: - return SEEK_END; - } + // Must have some default, hitting here means some random int mode + return SeekType::SeekFromStart; + } + int GetFSeekModeFromSeekType(SeekType type) + { + switch (type) + { + case SeekType::SeekFromStart: return SEEK_SET; + case SeekType::SeekFromCurrent: + return SEEK_CUR; + case SeekType::SeekFromEnd: + return SEEK_END; } - void UpdateOpenModeForReading(OpenMode& openMode) + return SEEK_SET; + } + + void UpdateOpenModeForReading(OpenMode& openMode) + { + if (AnyFlag(openMode & OpenMode::ModeRead)) { - if (AnyFlag(openMode & OpenMode::ModeRead)) + if (AnyFlag(openMode & OpenMode::ModeText)) { - if (AnyFlag(openMode & OpenMode::ModeText)) - { - OpenMode extraModes = openMode & (OpenMode::ModeUpdate | OpenMode::ModeAppend); - openMode = OpenMode::ModeRead | OpenMode::ModeBinary | extraModes; - } - else if (!AnyFlag(openMode & OpenMode::ModeBinary)) - { - // if you haven't supplied any flag, supply binary - openMode = openMode | OpenMode::ModeBinary; - } + OpenMode extraModes = openMode & (OpenMode::ModeUpdate | OpenMode::ModeAppend); + openMode = OpenMode::ModeRead | OpenMode::ModeBinary | extraModes; + } + else if (!AnyFlag(openMode & OpenMode::ModeBinary)) + { + // if you haven't supplied any flag, supply binary + openMode = openMode | OpenMode::ModeBinary; } } + } - OpenMode GetOpenModeFromStringMode(const char* mode) + OpenMode GetOpenModeFromStringMode(const char* mode) + { + OpenMode openMode = OpenMode::Invalid; + + if (strstr(mode, "w")) { - OpenMode openMode = OpenMode::Invalid; - - if (strstr(mode, "w")) - { - openMode |= OpenMode::ModeWrite; - } - - if (strstr(mode, "r")) - { - openMode |= OpenMode::ModeRead; - } - - if (strstr(mode, "a")) - { - openMode |= OpenMode::ModeAppend; - } - - if (strstr(mode, "b")) - { - openMode |= OpenMode::ModeBinary; - } - - if (strstr(mode, "t")) - { - openMode |= OpenMode::ModeText; - } - - if (strstr(mode, "+")) - { - openMode |= OpenMode::ModeUpdate; - } - - UpdateOpenModeForReading(openMode); - - return openMode; + openMode |= OpenMode::ModeWrite; } - const char* GetStringModeFromOpenMode(OpenMode mode) + if (strstr(mode, "r")) { - UpdateOpenModeForReading(mode); - // Append is highest priority, followed by write and then read - // APPEND - if (AnyFlag(mode & OpenMode::ModeAppend)) + openMode |= OpenMode::ModeRead; + } + + if (strstr(mode, "a")) + { + openMode |= OpenMode::ModeAppend; + } + + if (strstr(mode, "b")) + { + openMode |= OpenMode::ModeBinary; + } + + if (strstr(mode, "t")) + { + openMode |= OpenMode::ModeText; + } + + if (strstr(mode, "+")) + { + openMode |= OpenMode::ModeUpdate; + } + + UpdateOpenModeForReading(openMode); + + return openMode; + } + + const char* GetStringModeFromOpenMode(OpenMode mode) + { + UpdateOpenModeForReading(mode); + // Append is highest priority, followed by write and then read + // APPEND + if (AnyFlag(mode & OpenMode::ModeAppend)) + { + if (AnyFlag(mode & OpenMode::ModeUpdate)) { - if (AnyFlag(mode & OpenMode::ModeUpdate)) - { - if (AnyFlag(mode & OpenMode::ModeBinary)) - { - return "a+b"; - } - if (AnyFlag(mode & OpenMode::ModeText)) - { - return "a+t"; - } - return "a+"; - } if (AnyFlag(mode & OpenMode::ModeBinary)) { - return "ab"; + return "a+b"; } if (AnyFlag(mode & OpenMode::ModeText)) { - return "at"; + return "a+t"; } - return "a"; + return "a+"; } - - // WRITE - if (AnyFlag(mode & OpenMode::ModeWrite)) + if (AnyFlag(mode & OpenMode::ModeBinary)) + { + return "ab"; + } + if (AnyFlag(mode & OpenMode::ModeText)) + { + return "at"; + } + return "a"; + } + + // WRITE + if (AnyFlag(mode & OpenMode::ModeWrite)) + { + if (AnyFlag(mode & OpenMode::ModeUpdate)) { - if (AnyFlag(mode & OpenMode::ModeUpdate)) - { - if (AnyFlag(mode & OpenMode::ModeBinary)) - { - return "w+b"; - } - if (AnyFlag(mode & OpenMode::ModeText)) - { - return "w+t"; - } - return "w+"; - } if (AnyFlag(mode & OpenMode::ModeBinary)) { - return "wb"; + return "w+b"; } if (AnyFlag(mode & OpenMode::ModeText)) { - return "wt"; + return "w+t"; } - return "w"; + return "w+"; } - - // READ - if (AnyFlag(mode & OpenMode::ModeRead)) + if (AnyFlag(mode & OpenMode::ModeBinary)) + { + return "wb"; + } + if (AnyFlag(mode & OpenMode::ModeText)) + { + return "wt"; + } + return "w"; + } + + // READ + if (AnyFlag(mode & OpenMode::ModeRead)) + { + if (AnyFlag(mode & OpenMode::ModeUpdate)) { - if (AnyFlag(mode & OpenMode::ModeUpdate)) - { - if (AnyFlag(mode & OpenMode::ModeBinary)) - { - return "r+b"; - } - if (AnyFlag(mode & OpenMode::ModeText)) - { - return "r+t"; - } - return "r+"; - } if (AnyFlag(mode & OpenMode::ModeBinary)) { - return "rb"; + return "r+b"; } if (AnyFlag(mode & OpenMode::ModeText)) { - return "rt"; + return "r+t"; } - return "r"; + return "r+"; } - - // Bad open mode passed in - AZ_Error("FileIO", false, "A bad open mode was sent to GetStringModeFromOpenMode()"); - return ""; + if (AnyFlag(mode & OpenMode::ModeBinary)) + { + return "rb"; + } + if (AnyFlag(mode & OpenMode::ModeText)) + { + return "rt"; + } + return "r"; } - bool NameMatchesFilter(const char* name, const char* filter) + // Bad open mode passed in + AZ_Error("FileIO", false, "A bad open mode was sent to GetStringModeFromOpenMode()"); + return ""; + } + + bool NameMatchesFilter(const char* name, const char* filter) + { + return AZStd::wildcard_match(filter, name); + } + + FileIOStream::FileIOStream() + : m_handle(InvalidHandle) + , m_mode(OpenMode::Invalid) + , m_ownsHandle(true) + { + + } + + FileIOStream::FileIOStream(HandleType fileHandle, AZ::IO::OpenMode mode, bool ownsHandle) + : m_handle(fileHandle) + , m_mode(mode) + , m_ownsHandle(ownsHandle) + { + + FileIOBase* fileIO = FileIOBase::GetInstance(); + AZ_Assert(fileIO, "FileIO is not initialized."); + AZStd::array resolvedPath{ {0} }; + fileIO->GetFilename(m_handle, resolvedPath.data(), resolvedPath.size() - 1); + m_filename = resolvedPath.data(); + } + + FileIOStream::FileIOStream(const char* path, AZ::IO::OpenMode mode, bool errorOnFailure) + : m_handle(InvalidHandle) + , m_mode(mode) + , m_errorOnFailure(errorOnFailure) + { + Open(path, mode); + } + + FileIOStream::~FileIOStream() + { + if (m_ownsHandle) { - return AZStd::wildcard_match(filter, name); + Close(); } + } - FileIOStream::FileIOStream() - : m_handle(InvalidHandle) - , m_mode(OpenMode::Invalid) - , m_ownsHandle(true) + bool FileIOStream::Open(const char* path, OpenMode mode) + { + AZ_Assert(FileIOBase::GetInstance(), "FileIO is not initialized."); + FileIOBase* fileIO = FileIOBase::GetInstance(); + + Close(); + + const Result result = fileIO->Open(path, mode, m_handle); + m_ownsHandle = IsOpen(); + m_mode = mode; + + if (IsOpen()) { - - } - - FileIOStream::FileIOStream(HandleType fileHandle, AZ::IO::OpenMode mode, bool ownsHandle) - : m_handle(fileHandle) - , m_mode(mode) - , m_ownsHandle(ownsHandle) - { - - FileIOBase* fileIO = FileIOBase::GetInstance(); - AZ_Assert(fileIO, "FileIO is not initialized."); + // Not using supplied path parameter as it may be unresolved AZStd::array resolvedPath{ {0} }; fileIO->GetFilename(m_handle, resolvedPath.data(), resolvedPath.size() - 1); m_filename = resolvedPath.data(); } - - FileIOStream::FileIOStream(const char* path, AZ::IO::OpenMode mode, bool errorOnFailure) - : m_handle(InvalidHandle) - , m_mode(mode) - , m_errorOnFailure(errorOnFailure) + else { - Open(path, mode); + // remember the file name so you can try again with ReOpen + m_filename = path; } - FileIOStream::~FileIOStream() - { - if (m_ownsHandle) - { - Close(); - } - } + AZ_PROFILE_INTERVAL_START_COLORED(AzCore, &m_filename, 0xff0000ff, "FileIO: %s", m_filename.c_str()); + return result; + } - bool FileIOStream::Open(const char* path, OpenMode mode) + bool FileIOStream::ReOpen() + { + Close(); + return (m_mode != OpenMode::Invalid) ? Open(m_filename.data(), m_mode) : false; + } + + void FileIOStream::Close() + { + if (m_handle != InvalidHandle) { AZ_Assert(FileIOBase::GetInstance(), "FileIO is not initialized."); - FileIOBase* fileIO = FileIOBase::GetInstance(); - Close(); - - const Result result = fileIO->Open(path, mode, m_handle); - m_ownsHandle = IsOpen(); - m_mode = mode; - - if (IsOpen()) - { - // Not using supplied path parameter as it may be unresolved - AZStd::array resolvedPath{ {0} }; - fileIO->GetFilename(m_handle, resolvedPath.data(), resolvedPath.size() - 1); - m_filename = resolvedPath.data(); - } - else - { - // remember the file name so you can try again with ReOpen - m_filename = path; - } - - AZ_PROFILE_INTERVAL_START_COLORED(AzCore, &m_filename, 0xff0000ff, "FileIO: %s", m_filename.c_str()); - return result; + FileIOBase::GetInstance()->Close(m_handle); + m_handle = InvalidHandle; + m_ownsHandle = false; + AZ_PROFILE_INTERVAL_END(AzCore, &m_filename); } + } - bool FileIOStream::ReOpen() + bool FileIOStream::IsOpen() const + { + return (m_handle != InvalidHandle); + } + + /*! + \brief Retrieves underlying FileIO Handle from file stream + \return HandleType + */ + HandleType FileIOStream::GetHandle() const + { + return m_handle; + } + + /*! + \brief Retrieves filename + \return const char* + */ + const char* FileIOStream::GetFilename() const + { + return m_filename.data(); + } + + /*! + \brief Retrieves OpenMode flags used to open this file + \return OpenMode + */ + AZ::IO::OpenMode FileIOStream::GetModeFlags() const + { + return m_mode; + } + + bool FileIOStream::CanSeek() const + { + return true; + } + + bool FileIOStream::CanRead() const + { + return (m_mode & (OpenMode::ModeRead | OpenMode::ModeUpdate)) != OpenMode::Invalid; + } + + bool FileIOStream::CanWrite() const + { + return (m_mode & (OpenMode::ModeWrite | OpenMode::ModeAppend | OpenMode::ModeUpdate)) != OpenMode::Invalid; + } + + void FileIOStream::Seek(OffsetType bytes, SeekMode mode) + { + AZ_Assert(FileIOBase::GetInstance(), "FileIO is not initialized."); + AZ_Assert(IsOpen(), "Cannot seek on a FileIOStream that is not open."); + + SeekType seekType = SeekType::SeekFromCurrent; + switch (mode) { - Close(); - return (m_mode != OpenMode::Invalid) ? Open(m_filename.data(), m_mode) : false; + case GenericStream::ST_SEEK_BEGIN: + seekType = SeekType::SeekFromStart; + break; + case GenericStream::ST_SEEK_CUR: + seekType = SeekType::SeekFromCurrent; + break; + case GenericStream::ST_SEEK_END: + seekType = SeekType::SeekFromEnd; + break; + default: + seekType = SeekType::SeekFromCurrent; + break; } - void FileIOStream::Close() + const Result result = FileIOBase::GetInstance()->Seek(m_handle, static_cast(bytes), seekType); + (void)result; + AZ_Error("FileIOStream", result.GetResultCode() == ResultCode::Success, "Seek failed."); + } + + SizeType FileIOStream::Read(SizeType bytes, void* oBuffer) + { + AZ_Assert(FileIOBase::GetInstance(), "FileIO is not initialized."); + AZ_Assert(IsOpen(), "Cannot read from a FileIOStream that is not open."); + + AZ::u64 bytesRead = 0; + const Result result = FileIOBase::GetInstance()->Read(m_handle, oBuffer, bytes, m_errorOnFailure, &bytesRead); + (void)result; + AZ_Error("FileIOStream", result.GetResultCode() == ResultCode::Success, "Read failed in file %s.", m_filename.empty() ? "NULL" : m_filename.c_str()); + return static_cast(bytesRead); + } + + SizeType FileIOStream::Write(SizeType bytes, const void* iBuffer) + { + AZ_Assert(FileIOBase::GetInstance(), "FileIO is not initialized."); + AZ_Assert(IsOpen(), "Cannot write to a FileIOStream that is not open."); + + AZ::u64 bytesWritten = 0; + const Result result = FileIOBase::GetInstance()->Write(m_handle, iBuffer, bytes, &bytesWritten); + (void)result; + AZ_Error("FileIOStream", result.GetResultCode() == ResultCode::Success, "Write failed."); + return static_cast(bytesWritten); + } + + SizeType FileIOStream::GetCurPos() const + { + AZ_Assert(FileIOBase::GetInstance(), "FileIO is not initialized."); + AZ_Assert(IsOpen(), "Cannot use a FileIOStream that is not open."); + + AZ::u64 currentPosition = 0; + const Result result = FileIOBase::GetInstance()->Tell(m_handle, currentPosition); + (void)result; + AZ_Error("FileIOStream", result.GetResultCode() == ResultCode::Success, "GetCurPos failed."); + return static_cast(currentPosition); + } + + SizeType FileIOStream::GetLength() const + { + AZ_Assert(FileIOBase::GetInstance(), "FileIO is not initialized."); + AZ_Assert(IsOpen(), "Cannot use a FileIOStream that is not open."); + + SizeType fileLengthBytes = 0; + if (!FileIOBase::GetInstance()->Size(m_handle, fileLengthBytes)) { - if (m_handle != InvalidHandle) - { - AZ_Assert(FileIOBase::GetInstance(), "FileIO is not initialized."); - - FileIOBase::GetInstance()->Close(m_handle); - m_handle = InvalidHandle; - m_ownsHandle = false; - AZ_PROFILE_INTERVAL_END(AzCore, &m_filename); - } + AZ_Error("FileIOStream", false, "GetLength failed."); } - bool FileIOStream::IsOpen() const - { - return (m_handle != InvalidHandle); - } + return fileLengthBytes; + } - /*! - \brief Retrieves underlying FileIO Handle from file stream - \return HandleType - */ - HandleType FileIOStream::GetHandle() const - { - return m_handle; - } - - /*! - \brief Retrieves filename - \return const char* - */ - const char* FileIOStream::GetFilename() const - { - return m_filename.data(); - } - - /*! - \brief Retrieves OpenMode flags used to open this file - \return OpenMode - */ - AZ::IO::OpenMode FileIOStream::GetModeFlags() const - { - return m_mode; - } - - bool FileIOStream::CanSeek() const - { - return true; - } - - bool FileIOStream::CanRead() const - { - return (m_mode & (OpenMode::ModeRead | OpenMode::ModeUpdate)) != OpenMode::Invalid; - } - - bool FileIOStream::CanWrite() const - { - return (m_mode & (OpenMode::ModeWrite | OpenMode::ModeAppend | OpenMode::ModeUpdate)) != OpenMode::Invalid; - } - - void FileIOStream::Seek(OffsetType bytes, SeekMode mode) - { - AZ_Assert(FileIOBase::GetInstance(), "FileIO is not initialized."); - AZ_Assert(IsOpen(), "Cannot seek on a FileIOStream that is not open."); - - SeekType seekType = SeekType::SeekFromCurrent; - switch (mode) - { - case GenericStream::ST_SEEK_BEGIN: - seekType = SeekType::SeekFromStart; - break; - case GenericStream::ST_SEEK_CUR: - seekType = SeekType::SeekFromCurrent; - break; - case GenericStream::ST_SEEK_END: - seekType = SeekType::SeekFromEnd; - break; - default: - seekType = SeekType::SeekFromCurrent; - break; - } - - const Result result = FileIOBase::GetInstance()->Seek(m_handle, static_cast(bytes), seekType); - (void)result; - AZ_Error("FileIOStream", result.GetResultCode() == ResultCode::Success, "Seek failed."); - } - - SizeType FileIOStream::Read(SizeType bytes, void* oBuffer) - { - AZ_Assert(FileIOBase::GetInstance(), "FileIO is not initialized."); - AZ_Assert(IsOpen(), "Cannot read from a FileIOStream that is not open."); - - AZ::u64 bytesRead = 0; - const Result result = FileIOBase::GetInstance()->Read(m_handle, oBuffer, bytes, m_errorOnFailure, &bytesRead); - (void)result; - AZ_Error("FileIOStream", result.GetResultCode() == ResultCode::Success, "Read failed in file %s.", m_filename.empty() ? "NULL" : m_filename.c_str()); - return static_cast(bytesRead); - } - - SizeType FileIOStream::Write(SizeType bytes, const void* iBuffer) - { - AZ_Assert(FileIOBase::GetInstance(), "FileIO is not initialized."); - AZ_Assert(IsOpen(), "Cannot write to a FileIOStream that is not open."); - - AZ::u64 bytesWritten = 0; - const Result result = FileIOBase::GetInstance()->Write(m_handle, iBuffer, bytes, &bytesWritten); - (void)result; - AZ_Error("FileIOStream", result.GetResultCode() == ResultCode::Success, "Write failed."); - return static_cast(bytesWritten); - } - - SizeType FileIOStream::GetCurPos() const - { - AZ_Assert(FileIOBase::GetInstance(), "FileIO is not initialized."); - AZ_Assert(IsOpen(), "Cannot use a FileIOStream that is not open."); - - AZ::u64 currentPosition = 0; - const Result result = FileIOBase::GetInstance()->Tell(m_handle, currentPosition); - (void)result; - AZ_Error("FileIOStream", result.GetResultCode() == ResultCode::Success, "GetCurPos failed."); - return static_cast(currentPosition); - } - - SizeType FileIOStream::GetLength() const - { - AZ_Assert(FileIOBase::GetInstance(), "FileIO is not initialized."); - AZ_Assert(IsOpen(), "Cannot use a FileIOStream that is not open."); - - SizeType fileLengthBytes = 0; - if (!FileIOBase::GetInstance()->Size(m_handle, fileLengthBytes)) - { - AZ_Error("FileIOStream", false, "GetLength failed."); - } - - return fileLengthBytes; - } - - } // namespace IO -} // namespace AZ +} // namespace AZ::IO diff --git a/Code/Framework/AzCore/AzCore/IO/FileIOEventBus.h b/Code/Framework/AzCore/AzCore/IO/FileIOEventBus.h deleted file mode 100644 index ba8fef9a7b..0000000000 --- a/Code/Framework/AzCore/AzCore/IO/FileIOEventBus.h +++ /dev/null @@ -1,72 +0,0 @@ -/* - * Copyright (c) Contributors to the Open 3D Engine Project. - * For complete copyright and license terms please see the LICENSE at the root of this distribution. - * - * SPDX-License-Identifier: Apache-2.0 OR MIT - * - */ -#ifndef AZCORE_SYSTEM_FILE_BUS_H -#define AZCORE_SYSTEM_FILE_BUS_H - -#include -#include -#include - -namespace AZ -{ - namespace IO - { - /** - * File IO interface. All events return true if we executed the - * specific operation and no other code will be executed. If we return false - * the normal code for the specific event will be executed. - * IMPORTANT: We support multiple listeners with the idea that many systems can listen - * for event. This interface allows to actually perform the operations, in such cases make - * sure only one of the listeners provides this service (otherwise depending on registration - * order service providers may change) - * IMPORTANT: We don't provide any sync for the FileIOBus. We do that for a couple of reasons. - * 1. If you will handle file IO youself or keeptrack of statistics you code will most likely already do that - * 2. It is NOT safe to BusConnect/BusDisconnect while the FileIO is in use (this is why you should connect in advance) - * otherwise if you provide service you can end up connecting in a middle of reads/writes/etc. - */ - class FileIO - : public AZ::EBusTraits - { - public: - virtual ~FileIO() {} - virtual bool OnOpen(SystemFile& file, const char* fileName, int mode, int platformFlags, bool& isFileOpened) = 0; - virtual bool OnClose(SystemFile& file) = 0; - virtual bool OnSeek(SystemFile& file, SystemFile::SizeType offset, SystemFile::SeekMode mode) = 0; - virtual bool OnRead(SystemFile& file, SystemFile::SizeType byteSize, void* buffer, SystemFile::SizeType& numRead) = 0; - virtual bool OnWrite(SystemFile& file, const void* buffer, SystemFile::SizeType byteSize, SystemFile::SizeType& numWritten) = 0; - }; - - typedef AZ::EBus FileIOBus; - - /** - * Interface for handling file io events. All events are syncronized - */ - class FileIOEvents - : public AZ::EBusTraits - { - public: - virtual ~FileIOEvents() {} - - ////////////////////////////////////////////////////////////////////////// - // EBusTraits overrides - //TODO rbbaklov or zolniery look into why a recursive lock was not needed previously - typedef AZStd::recursive_mutex MutexType; //< make sure all file events are thread safe as they will called from many threads - ////////////////////////////////////////////////////////////////////////// - - /** - * You will either have a file (SystemFile) pointer or fileName pointer to the file name. - * \param fileName is provided when there is NO SystemFile object (when you call static functions). - */ - virtual void OnError(const SystemFile* file, const char* fileName, int errorCode) = 0; - }; - - typedef AZ::EBus FileIOEventBus; - } -} -#endif // AZCORE_SYSTEM_FILE_BUS_H -#pragma once diff --git a/Code/Framework/AzCore/AzCore/IO/IOUtils.cpp b/Code/Framework/AzCore/AzCore/IO/IOUtils.cpp index 1e3a31f8ab..222a36ef70 100644 --- a/Code/Framework/AzCore/AzCore/IO/IOUtils.cpp +++ b/Code/Framework/AzCore/AzCore/IO/IOUtils.cpp @@ -10,69 +10,64 @@ #include #include /// this_thread sleep_for. -namespace AZ +namespace AZ::IO { - namespace IO - { - int TranslateOpenModeToSystemFileMode(const char* path, OpenMode mode) + int TranslateOpenModeToSystemFileMode(const char* path, OpenMode mode) + { + int systemFileMode = 0; + bool read = AnyFlag(mode & OpenMode::ModeRead) || AnyFlag(mode & OpenMode::ModeUpdate); + bool write = AnyFlag(mode & OpenMode::ModeWrite) || AnyFlag(mode & OpenMode::ModeUpdate) || AnyFlag(mode & OpenMode::ModeAppend); + if (write) { - int systemFileMode = 0; - bool read = AnyFlag(mode & OpenMode::ModeRead) || AnyFlag(mode & OpenMode::ModeUpdate); - bool write = AnyFlag(mode & OpenMode::ModeWrite) || AnyFlag(mode & OpenMode::ModeUpdate) || AnyFlag(mode & OpenMode::ModeAppend); - if (write) + // If writing the file, create the file in all cases (except r+) + if (!SystemFile::Exists(path) && !(AnyFlag(mode & OpenMode::ModeRead) && AnyFlag(mode & OpenMode::ModeUpdate))) { - // If writing the file, create the file in all cases (except r+) - if (!SystemFile::Exists(path) && !(AnyFlag(mode & OpenMode::ModeRead) && AnyFlag(mode & OpenMode::ModeUpdate))) - { - // LocalFileIO creates by default - systemFileMode |= SystemFile::SF_OPEN_CREATE; - } - - if (AnyFlag(mode & OpenMode::ModeCreatePath)) - { - systemFileMode |= SystemFile::SF_OPEN_CREATE_PATH; - } - - // If appending, append. - if (AnyFlag(mode & OpenMode::ModeAppend)) - { - systemFileMode |= SystemFile::SF_OPEN_APPEND; - } - // If writing and not appending, empty the file - else if (AnyFlag(mode & OpenMode::ModeWrite)) - { - systemFileMode |= SystemFile::SF_OPEN_TRUNCATE; - } - - // If reading, set read/write, otherwise just write - if (read) - { - systemFileMode |= SystemFile::SF_OPEN_READ_WRITE; - } - else - { - systemFileMode |= SystemFile::SF_OPEN_WRITE_ONLY; - } - } - else if (read) - { - systemFileMode |= SystemFile::SF_OPEN_READ_ONLY; + // LocalFileIO creates by default + systemFileMode |= SystemFile::SF_OPEN_CREATE; } - return systemFileMode; + if (AnyFlag(mode & OpenMode::ModeCreatePath)) + { + systemFileMode |= SystemFile::SF_OPEN_CREATE_PATH; + } + + // If appending, append. + if (AnyFlag(mode & OpenMode::ModeAppend)) + { + systemFileMode |= SystemFile::SF_OPEN_APPEND; + } + // If writing and not appending, empty the file + else if (AnyFlag(mode & OpenMode::ModeWrite)) + { + systemFileMode |= SystemFile::SF_OPEN_TRUNCATE; + } + + // If reading, set read/write, otherwise just write + if (read) + { + systemFileMode |= SystemFile::SF_OPEN_READ_WRITE; + } + else + { + systemFileMode |= SystemFile::SF_OPEN_WRITE_ONLY; + } + } + else if (read) + { + systemFileMode |= SystemFile::SF_OPEN_READ_ONLY; } - bool RetryOpenStream(FileIOStream& stream, int numRetries, int delayBetweenRetry) + return systemFileMode; + } + + bool RetryOpenStream(FileIOStream& stream, int numRetries, int delayBetweenRetry) + { + while ((!stream.IsOpen()) && (numRetries > 0)) { - while ((!stream.IsOpen()) && (numRetries > 0)) - { - numRetries--; - AZStd::this_thread::sleep_for(AZStd::chrono::milliseconds(delayBetweenRetry)); - stream.ReOpen(); - } - return stream.IsOpen(); + numRetries--; + AZStd::this_thread::sleep_for(AZStd::chrono::milliseconds(delayBetweenRetry)); + stream.ReOpen(); } - } // namespace IO -} // namespace AZ - - + return stream.IsOpen(); + } +} // namespace AZ::IO diff --git a/Code/Framework/AzCore/AzCore/IO/Path/Path.cpp b/Code/Framework/AzCore/AzCore/IO/Path/Path.cpp index 637945db35..6e4dfdaa63 100644 --- a/Code/Framework/AzCore/AzCore/IO/Path/Path.cpp +++ b/Code/Framework/AzCore/AzCore/IO/Path/Path.cpp @@ -50,13 +50,4 @@ namespace AZ::IO const PathIterator& rhs); template bool operator!=(const PathIterator& lhs, const PathIterator& rhs); - - void PathReflection::Reflect(AZ::ReflectContext* context) - { - if (auto* serializeContext = azrtti_cast(context)) - { - serializeContext->Class() - ->Field("m_path", &AZ::IO::Path::m_path); - } - } } diff --git a/Code/Framework/AzCore/AzCore/IO/Path/Path.h b/Code/Framework/AzCore/AzCore/IO/Path/Path.h index 3b5c224957..7f89809294 100644 --- a/Code/Framework/AzCore/AzCore/IO/Path/Path.h +++ b/Code/Framework/AzCore/AzCore/IO/Path/Path.h @@ -78,7 +78,8 @@ namespace AZ::IO // native format observers //! Returns string_view stored within the PathView - constexpr AZStd::string_view Native() const noexcept; + constexpr const AZStd::string_view& Native() const noexcept; + constexpr AZStd::string_view& Native() noexcept; //! Conversion operator to retrieve string_view stored within the PathView constexpr explicit operator AZStd::string_view() const noexcept; @@ -321,7 +322,6 @@ namespace AZ::IO using const_iterator = const PathIterator; using iterator = const_iterator; friend PathIterator; - friend struct PathReflection; // constructors and destructor constexpr BasicPath() = default; @@ -484,6 +484,7 @@ namespace AZ::IO // as_posix //! Replicates the behavior of the Python pathlib as_posix method //! by replacing the Windows Path Separator with the Posix Path Seperator + constexpr string_type AsPosix() const; AZStd::string StringAsPosix() const; constexpr AZStd::fixed_string FixedMaxPathStringAsPosix() const noexcept; @@ -665,6 +666,7 @@ namespace AZ::IO namespace AZ { AZ_TYPE_INFO_SPECIALIZE(AZ::IO::Path, "{88E0A40F-3085-4CAB-8B11-EF5A2659C71A}"); + AZ_TYPE_INFO_SPECIALIZE(AZ::IO::FixedMaxPath, "{FA6CA49F-376A-417C-9767-DD50744DF203}"); } namespace AZ::IO diff --git a/Code/Framework/AzCore/AzCore/IO/Path/Path.inl b/Code/Framework/AzCore/AzCore/IO/Path/Path.inl index 1d654c1502..0dc1799528 100644 --- a/Code/Framework/AzCore/AzCore/IO/Path/Path.inl +++ b/Code/Framework/AzCore/AzCore/IO/Path/Path.inl @@ -101,7 +101,11 @@ namespace AZ::IO } // native format observers - constexpr auto PathView::Native() const noexcept -> AZStd::string_view + constexpr auto PathView::Native() const noexcept -> const AZStd::string_view& + { + return m_path; + } + constexpr auto PathView::Native() noexcept -> AZStd::string_view& { return m_path; } @@ -1039,6 +1043,13 @@ namespace AZ::IO // as_posix // Returns a copy of the path with the path separators converted to PosixPathSeparator template + constexpr auto BasicPath::AsPosix() const -> string_type + { + string_type resultPath(m_path.begin(), m_path.end()); + AZStd::replace(resultPath.begin(), resultPath.end(), WindowsPathSeparator, PosixPathSeparator); + return resultPath; + } + template AZStd::string BasicPath::StringAsPosix() const { AZStd::string resultPath(m_path.begin(), m_path.end()); diff --git a/Code/Framework/AzCore/AzCore/IO/Path/PathReflect.cpp b/Code/Framework/AzCore/AzCore/IO/Path/PathReflect.cpp new file mode 100644 index 0000000000..1d0cdba66c --- /dev/null +++ b/Code/Framework/AzCore/AzCore/IO/Path/PathReflect.cpp @@ -0,0 +1,83 @@ +/* + * Copyright (c) Contributors to the Open 3D Engine Project. + * For complete copyright and license terms please see the LICENSE at the root of this distribution. + * + * SPDX-License-Identifier: Apache-2.0 OR MIT + * + */ + +#include +#include +#include +#include +#include + +namespace AZ::IO +{ + template + struct PathSerializer + : public SerializeContext::IDataSerializer + { + public: + /// Convert binary data to text + size_t DataToText(IO::GenericStream& in, IO::GenericStream& out, bool) override + { + PathType outPath; + outPath.Native().resize_no_construct(in.GetLength()); + in.Read(outPath.Native().size(), outPath.Native().data()); + + return static_cast(out.Write(outPath.Native().size(), outPath.Native().c_str())); + } + + size_t TextToData(const char* text, unsigned int, IO::GenericStream& stream, bool) override + { + return static_cast(stream.Write(strlen(text), reinterpret_cast(text))); + } + + size_t Save(const void* classPtr, IO::GenericStream& stream, bool) override + { + /// Save paths out using the PosixPathSeparator + auto posixPathString{ reinterpret_cast(classPtr)->AsPosix() }; + return static_cast(stream.Write(posixPathString.size(), posixPathString.c_str())); + } + + bool Load(void* classPtr, IO::GenericStream& stream, unsigned int, bool) override + { + // Normalize the path load + auto path = reinterpret_cast(classPtr); + + path->Native().resize_no_construct(stream.GetLength()); + stream.Read(path->Native().size(), path->Native().data()); + *path = path->LexicallyNormal(); + + return true; + } + + bool CompareValueData(const void* lhs, const void* rhs) override + { + return SerializeContext::EqualityCompareHelper::CompareValues(lhs, rhs); + } + }; + + void PathReflect(AZ::ReflectContext* context) + { + if (auto serializeContext = azrtti_cast(context); serializeContext != nullptr) + { + serializeContext->Class() + ->Serializer(AZ::SerializeContext::IDataSerializerPtr{ new PathSerializer{}, + AZ::SerializeContext::IDataSerializer::CreateDefaultDeleteDeleter() }) + ; + + serializeContext->Class() + ->Serializer(AZ::SerializeContext::IDataSerializerPtr{ new PathSerializer{}, + AZ::SerializeContext::IDataSerializer::CreateDefaultDeleteDeleter() }) + ; + } + else if (auto jsonContext = azrtti_cast(context)) + { + jsonContext->Serializer() + ->HandlesType() + ->HandlesType(); + } + } +} diff --git a/Code/Framework/AzCore/AzCore/IO/Path/PathReflect.h b/Code/Framework/AzCore/AzCore/IO/Path/PathReflect.h new file mode 100644 index 0000000000..3076895026 --- /dev/null +++ b/Code/Framework/AzCore/AzCore/IO/Path/PathReflect.h @@ -0,0 +1,19 @@ +/* + * Copyright (c) Contributors to the Open 3D Engine Project. + * For complete copyright and license terms please see the LICENSE at the root of this distribution. + * + * SPDX-License-Identifier: Apache-2.0 OR MIT + * + */ + +#pragma once + +namespace AZ +{ + class ReflectContext; +} + +namespace AZ::IO +{ + void PathReflect(AZ::ReflectContext* context); +} diff --git a/Code/Framework/AzCore/AzCore/IO/Path/Path_fwd.h b/Code/Framework/AzCore/AzCore/IO/Path/Path_fwd.h index cb61bd5887..c4fce5e1b7 100644 --- a/Code/Framework/AzCore/AzCore/IO/Path/Path_fwd.h +++ b/Code/Framework/AzCore/AzCore/IO/Path/Path_fwd.h @@ -57,11 +57,6 @@ namespace AZ::IO // It depends on the path type template class PathIterator; - - struct PathReflection - { - static void Reflect(AZ::ReflectContext* context); - }; } namespace AZStd diff --git a/Code/Framework/AzCore/AzCore/IO/Streamer/BlockCache.cpp b/Code/Framework/AzCore/AzCore/IO/Streamer/BlockCache.cpp index e838324408..6c873f3050 100644 --- a/Code/Framework/AzCore/AzCore/IO/Streamer/BlockCache.cpp +++ b/Code/Framework/AzCore/AzCore/IO/Streamer/BlockCache.cpp @@ -15,736 +15,733 @@ #include #include -namespace AZ +namespace AZ::IO { - namespace IO + AZStd::shared_ptr BlockCacheConfig::AddStreamStackEntry( + const HardwareInformation& hardware, AZStd::shared_ptr parent) { - AZStd::shared_ptr BlockCacheConfig::AddStreamStackEntry( - const HardwareInformation& hardware, AZStd::shared_ptr parent) + size_t blockSize; + switch (m_blockSize) { - size_t blockSize; - switch (m_blockSize) - { - case BlockSize::MaxTransfer: - blockSize = hardware.m_maxTransfer; - break; - case BlockSize::MemoryAlignment: - blockSize = hardware.m_maxPhysicalSectorSize; - break; - case BlockSize::SizeAlignment: - blockSize = hardware.m_maxLogicalSectorSize; - break; - default: - blockSize = m_blockSize; - break; - } - - u32 cacheSize = static_cast(m_cacheSizeMib * 1_mib); - if (blockSize * 2 > cacheSize) - { - AZ_Warning("Streamer", false, "Size (%u) for BlockCache isn't big enough to hold at least two cache blocks of size (%zu). " - "The cache size will be increased to fit 2 cache blocks.", cacheSize, blockSize); - cacheSize = aznumeric_caster(blockSize * 2); - } - - auto stackEntry = AZStd::make_shared( - cacheSize, aznumeric_cast(blockSize), aznumeric_cast(hardware.m_maxPhysicalSectorSize), false); - stackEntry->SetNext(AZStd::move(parent)); - return stackEntry; + case BlockSize::MaxTransfer: + blockSize = hardware.m_maxTransfer; + break; + case BlockSize::MemoryAlignment: + blockSize = hardware.m_maxPhysicalSectorSize; + break; + case BlockSize::SizeAlignment: + blockSize = hardware.m_maxLogicalSectorSize; + break; + default: + blockSize = m_blockSize; + break; } - void BlockCacheConfig::Reflect(AZ::ReflectContext* context) + u32 cacheSize = static_cast(m_cacheSizeMib * 1_mib); + if (blockSize * 2 > cacheSize) { - if (auto serializeContext = azrtti_cast(context); serializeContext != nullptr) - { - serializeContext->Enum() - ->Version(1) - ->Value("MaxTransfer", BlockSize::MaxTransfer) - ->Value("MemoryAlignment", BlockSize::MemoryAlignment) - ->Value("SizeAlignment", BlockSize::SizeAlignment); - - serializeContext->Class() - ->Version(1) - ->Field("CacheSizeMib", &BlockCacheConfig::m_cacheSizeMib) - ->Field("BlockSize", &BlockCacheConfig::m_blockSize); - } + AZ_Warning("Streamer", false, "Size (%u) for BlockCache isn't big enough to hold at least two cache blocks of size (%zu). " + "The cache size will be increased to fit 2 cache blocks.", cacheSize, blockSize); + cacheSize = aznumeric_caster(blockSize * 2); } - static constexpr char CacheHitRateName[] = "Cache hit rate"; - static constexpr char CacheableName[] = "Cacheable"; + auto stackEntry = AZStd::make_shared( + cacheSize, aznumeric_cast(blockSize), aznumeric_cast(hardware.m_maxPhysicalSectorSize), false); + stackEntry->SetNext(AZStd::move(parent)); + return stackEntry; + } - void BlockCache::Section::Prefix(const Section& section) + void BlockCacheConfig::Reflect(AZ::ReflectContext* context) + { + if (auto serializeContext = azrtti_cast(context); serializeContext != nullptr) { - AZ_Assert(section.m_used, "Trying to prefix an unused section"); - AZ_Assert(!m_wait && !section.m_wait, "Can't merge two section that are already waiting for data to be loaded."); + serializeContext->Enum() + ->Version(1) + ->Value("MaxTransfer", BlockSize::MaxTransfer) + ->Value("MemoryAlignment", BlockSize::MemoryAlignment) + ->Value("SizeAlignment", BlockSize::SizeAlignment); - if (m_used) + serializeContext->Class() + ->Version(1) + ->Field("CacheSizeMib", &BlockCacheConfig::m_cacheSizeMib) + ->Field("BlockSize", &BlockCacheConfig::m_blockSize); + } + } + + static constexpr char CacheHitRateName[] = "Cache hit rate"; + static constexpr char CacheableName[] = "Cacheable"; + + void BlockCache::Section::Prefix(const Section& section) + { + AZ_Assert(section.m_used, "Trying to prefix an unused section"); + AZ_Assert(!m_wait && !section.m_wait, "Can't merge two section that are already waiting for data to be loaded."); + + if (m_used) + { + AZ_Assert(m_blockOffset == 0, "Unable to add a block cache to this one as this block requires an offset upon completion."); + + AZ_Assert(section.m_readOffset < m_readOffset, "The block that's being merged needs to come before this block."); + m_readOffset = section.m_readOffset + section.m_blockOffset; // Remove any alignment that might have been added. + m_readSize += section.m_readSize - section.m_blockOffset; + + AZ_Assert(section.m_output < m_output, "The block that's being merged needs to come before this block."); + m_output = section.m_output; + m_copySize += section.m_copySize; + } + else + { + m_used = true; + m_readOffset = section.m_readOffset + section.m_blockOffset; + m_readSize = section.m_readSize - section.m_blockOffset; + m_output = section.m_output; + m_copySize = section.m_copySize; + } + m_blockOffset = 0; // Two merged sections do not support caching. + } + + BlockCache::BlockCache(u64 cacheSize, u32 blockSize, u32 alignment, bool onlyEpilogWrites) + : StreamStackEntry("Block cache") + , m_alignment(alignment) + , m_onlyEpilogWrites(onlyEpilogWrites) + { + AZ_Assert(IStreamerTypes::IsPowerOf2(alignment), "Alignment needs to be a power of 2."); + AZ_Assert(IStreamerTypes::IsAlignedTo(blockSize, alignment), "Block size needs to be a multiple of the alignment."); + + m_numBlocks = aznumeric_caster(cacheSize / blockSize); + m_cacheSize = cacheSize - (cacheSize % blockSize); // Only use the amount needed for the cache. + m_blockSize = blockSize; + if (m_numBlocks == 1) + { + m_onlyEpilogWrites = true; + } + + m_cache = reinterpret_cast(AZ::AllocatorInstance::Get().Allocate( + m_cacheSize, alignment, 0, "AZ::IO::Streamer BlockCache", __FILE__, __LINE__)); + m_cachedPaths = AZStd::unique_ptr(new RequestPath[m_numBlocks]); + m_cachedOffsets = AZStd::unique_ptr(new u64[m_numBlocks]); + m_blockLastTouched = AZStd::unique_ptr(new TimePoint[m_numBlocks]); + m_inFlightRequests = AZStd::unique_ptr(new FileRequest*[m_numBlocks]); + + ResetCache(); + } + + BlockCache::~BlockCache() + { + AZ::AllocatorInstance::Get().DeAllocate(m_cache, m_cacheSize, m_alignment); + } + + void BlockCache::QueueRequest(FileRequest* request) + { + AZ_Assert(request, "QueueRequest was provided a null request."); + + AZStd::visit([this, request](auto&& args) + { + using Command = AZStd::decay_t; + if constexpr (AZStd::is_same_v) { - AZ_Assert(m_blockOffset == 0, "Unable to add a block cache to this one as this block requires an offset upon completion."); - - AZ_Assert(section.m_readOffset < m_readOffset, "The block that's being merged needs to come before this block."); - m_readOffset = section.m_readOffset + section.m_blockOffset; // Remove any alignment that might have been added. - m_readSize += section.m_readSize - section.m_blockOffset; - - AZ_Assert(section.m_output < m_output, "The block that's being merged needs to come before this block."); - m_output = section.m_output; - m_copySize += section.m_copySize; + ReadFile(request, args); + return; } else { - m_used = true; - m_readOffset = section.m_readOffset + section.m_blockOffset; - m_readSize = section.m_readSize - section.m_blockOffset; - m_output = section.m_output; - m_copySize = section.m_copySize; - } - m_blockOffset = 0; // Two merged sections do not support caching. - } - - BlockCache::BlockCache(u64 cacheSize, u32 blockSize, u32 alignment, bool onlyEpilogWrites) - : StreamStackEntry("Block cache") - , m_alignment(alignment) - , m_onlyEpilogWrites(onlyEpilogWrites) - { - AZ_Assert(IStreamerTypes::IsPowerOf2(alignment), "Alignment needs to be a power of 2."); - AZ_Assert(IStreamerTypes::IsAlignedTo(blockSize, alignment), "Block size needs to be a multiple of the alignment."); - - m_numBlocks = aznumeric_caster(cacheSize / blockSize); - m_cacheSize = cacheSize - (cacheSize % blockSize); // Only use the amount needed for the cache. - m_blockSize = blockSize; - if (m_numBlocks == 1) - { - m_onlyEpilogWrites = true; - } - - m_cache = reinterpret_cast(AZ::AllocatorInstance::Get().Allocate( - m_cacheSize, alignment, 0, "AZ::IO::Streamer BlockCache", __FILE__, __LINE__)); - m_cachedPaths = AZStd::unique_ptr(new RequestPath[m_numBlocks]); - m_cachedOffsets = AZStd::unique_ptr(new u64[m_numBlocks]); - m_blockLastTouched = AZStd::unique_ptr(new TimePoint[m_numBlocks]); - m_inFlightRequests = AZStd::unique_ptr(new FileRequest*[m_numBlocks]); - - ResetCache(); - } - - BlockCache::~BlockCache() - { - AZ::AllocatorInstance::Get().DeAllocate(m_cache, m_cacheSize, m_alignment); - } - - void BlockCache::QueueRequest(FileRequest* request) - { - AZ_Assert(request, "QueueRequest was provided a null request."); - - AZStd::visit([this, request](auto&& args) - { - using Command = AZStd::decay_t; - if constexpr (AZStd::is_same_v) + if constexpr (AZStd::is_same_v) { - ReadFile(request, args); + FlushCache(args.m_path); + } + else if constexpr (AZStd::is_same_v) + { + FlushEntireCache(); + } + StreamStackEntry::QueueRequest(request); + } + }, request->GetCommand()); + } + + bool BlockCache::ExecuteRequests() + { + size_t delayedCount = m_delayedSections.size(); + + bool delayedRequestProcessed = false; + for (size_t i = 0; i < delayedCount; ++i) + { + Section& delayed = m_delayedSections.front(); + AZ_Assert(delayed.m_parent, "Delayed section doesn't have a reference to the original request."); + auto data = AZStd::get_if(&delayed.m_parent->GetCommand()); + AZ_Assert(data, "A request in the delayed queue of the BlockCache didn't have a parent with read data."); + // This call can add the same section to the back of the queue if there's not + // enough space. Because of this the entry needs to be removed from the delayed + // list no matter what the result is of ServiceFromCache. + if (ServiceFromCache(delayed.m_parent, delayed, data->m_path, data->m_sharedRead) != CacheResult::Delayed) + { + delayedRequestProcessed = true; + } + m_delayedSections.pop_front(); + } + bool nextResult = StreamStackEntry::ExecuteRequests(); + return nextResult || delayedRequestProcessed; + } + + void BlockCache::UpdateStatus(Status& status) const + { + StreamStackEntry::UpdateStatus(status); + s32 numAvailableSlots = CalculateAvailableRequestSlots(); + status.m_numAvailableSlots = AZStd::min(status.m_numAvailableSlots, numAvailableSlots); + status.m_isIdle = status.m_isIdle && + static_cast(numAvailableSlots) == m_numBlocks && + m_delayedSections.empty(); + } + + void BlockCache::UpdateCompletionEstimates(AZStd::chrono::system_clock::time_point now, AZStd::vector& internalPending, + StreamerContext::PreparedQueue::iterator pendingBegin, StreamerContext::PreparedQueue::iterator pendingEnd) + { + // Have the stack downstream estimate the completion time for the requests that are waiting for a slot to execute in. + AddDelayedRequests(internalPending); + + StreamStackEntry::UpdateCompletionEstimates(now, internalPending, pendingBegin, pendingEnd); + + // The in-flight requests don't have to be updated because the subdivided request will bubble up in order so the final + // write will be the latest completion time. Requests that have a wait on another request though will need to be update + // as the estimation of the in-flight request needs to be copied to the wait request to get an accurate prediction. + UpdatePendingRequestEstimations(); + + // Technically here the wait commands for the delayed sections should be updated as well, but it's the parent that's interesting, + // not the wait so don't waste cycles updating the wait. + } + + void BlockCache::AddDelayedRequests(AZStd::vector& internalPending) + { + for (auto& section : m_delayedSections) + { + internalPending.push_back(section.m_parent); + } + } + + void BlockCache::UpdatePendingRequestEstimations() + { + for (auto it : m_pendingRequests) + { + Section& section = it.second; + AZ_Assert(section.m_cacheBlockIndex != s_fileNotCached, "An in-flight cache section doesn't have a cache block associated with it."); + AZ_Assert(m_inFlightRequests[section.m_cacheBlockIndex], + "Cache block %i is reported as being in-flight but has no request.", section.m_cacheBlockIndex); + if (section.m_wait) + { + AZ_Assert(section.m_parent, "A cache section with a wait request pending is missing a parent to wait on."); + auto largestTime = AZStd::max(section.m_parent->GetEstimatedCompletion(), it.first->GetEstimatedCompletion()); + section.m_wait->SetEstimatedCompletion(largestTime); + } + } + } + + void BlockCache::ReadFile(FileRequest* request, FileRequest::ReadData& data) + { + if (!m_next) + { + request->SetStatus(IStreamerTypes::RequestStatus::Failed); + m_context->MarkRequestAsCompleted(request); + return; + } + + auto continueReadFile = [this, request](FileRequest& fileSizeRequest) + { + AZ_PROFILE_FUNCTION(AzCore); + AZ_Assert(m_numMetaDataRetrievalInProgress > 0, + "More requests have completed meta data retrieval in the Block Cache than were requested."); + m_numMetaDataRetrievalInProgress--; + if (fileSizeRequest.GetStatus() == IStreamerTypes::RequestStatus::Completed) + { + auto& requestInfo = AZStd::get(fileSizeRequest.GetCommand()); + if (requestInfo.m_found) + { + ContinueReadFile(request, requestInfo.m_fileSize); return; } - else + } + // Couldn't find the file size so don't try to split and pass the request to the next entry in the stack. + StreamStackEntry::QueueRequest(request); + }; + m_numMetaDataRetrievalInProgress++; + FileRequest* fileSizeRequest = m_context->GetNewInternalRequest(); + fileSizeRequest->CreateFileMetaDataRetrieval(data.m_path); + fileSizeRequest->SetCompletionCallback(AZStd::move(continueReadFile)); + StreamStackEntry::QueueRequest(fileSizeRequest); + } + void BlockCache::ContinueReadFile(FileRequest* request, u64 fileLength) + { + Section prolog; + Section main; + Section epilog; + + auto& data = AZStd::get(request->GetCommand()); + + if (!SplitRequest(prolog, main, epilog, data.m_path, fileLength, data.m_offset, data.m_size, + reinterpret_cast(data.m_output))) + { + m_context->MarkRequestAsCompleted(request); + return; + } + + if (prolog.m_used || epilog.m_used) + { + m_cacheableStat.PushSample(1.0); + Statistic::PlotImmediate(m_name, CacheableName, m_cacheableStat.GetMostRecentSample()); + } + else + { + // Nothing to cache so simply forward the call to the next entry in the stack for direct reading. + m_cacheableStat.PushSample(0.0); + Statistic::PlotImmediate(m_name, CacheableName, m_cacheableStat.GetMostRecentSample()); + m_next->QueueRequest(request); + return; + } + + bool fullyCached = true; + if (prolog.m_used) + { + if (m_onlyEpilogWrites && (main.m_used || epilog.m_used)) + { + // Only the epilog is allowed to write to the cache, but a previous read could + // still have cached the prolog, so check the cache and use the data if it's there + // otherwise merge the section with the main section to have the data read. + if (ReadFromCache(request, prolog, data.m_path) == CacheResult::CacheMiss) { - if constexpr (AZStd::is_same_v) - { - FlushCache(args.m_path); - } - else if constexpr (AZStd::is_same_v) - { - FlushEntireCache(); - } - StreamStackEntry::QueueRequest(request); - } - }, request->GetCommand()); - } - - bool BlockCache::ExecuteRequests() - { - size_t delayedCount = m_delayedSections.size(); - - bool delayedRequestProcessed = false; - for (size_t i = 0; i < delayedCount; ++i) - { - Section& delayed = m_delayedSections.front(); - AZ_Assert(delayed.m_parent, "Delayed section doesn't have a reference to the original request."); - auto data = AZStd::get_if(&delayed.m_parent->GetCommand()); - AZ_Assert(data, "A request in the delayed queue of the BlockCache didn't have a parent with read data."); - // This call can add the same section to the back of the queue if there's not - // enough space. Because of this the entry needs to be removed from the delayed - // list no matter what the result is of ServiceFromCache. - if (ServiceFromCache(delayed.m_parent, delayed, data->m_path, data->m_sharedRead) != CacheResult::Delayed) - { - delayedRequestProcessed = true; - } - m_delayedSections.pop_front(); - } - bool nextResult = StreamStackEntry::ExecuteRequests(); - return nextResult || delayedRequestProcessed; - } - - void BlockCache::UpdateStatus(Status& status) const - { - StreamStackEntry::UpdateStatus(status); - s32 numAvailableSlots = CalculateAvailableRequestSlots(); - status.m_numAvailableSlots = AZStd::min(status.m_numAvailableSlots, numAvailableSlots); - status.m_isIdle = status.m_isIdle && - static_cast(numAvailableSlots) == m_numBlocks && - m_delayedSections.empty(); - } - - void BlockCache::UpdateCompletionEstimates(AZStd::chrono::system_clock::time_point now, AZStd::vector& internalPending, - StreamerContext::PreparedQueue::iterator pendingBegin, StreamerContext::PreparedQueue::iterator pendingEnd) - { - // Have the stack downstream estimate the completion time for the requests that are waiting for a slot to execute in. - AddDelayedRequests(internalPending); - - StreamStackEntry::UpdateCompletionEstimates(now, internalPending, pendingBegin, pendingEnd); - - // The in-flight requests don't have to be updated because the subdivided request will bubble up in order so the final - // write will be the latest completion time. Requests that have a wait on another request though will need to be update - // as the estimation of the in-flight request needs to be copied to the wait request to get an accurate prediction. - UpdatePendingRequestEstimations(); - - // Technically here the wait commands for the delayed sections should be updated as well, but it's the parent that's interesting, - // not the wait so don't waste cycles updating the wait. - } - - void BlockCache::AddDelayedRequests(AZStd::vector& internalPending) - { - for (auto& section : m_delayedSections) - { - internalPending.push_back(section.m_parent); - } - } - - void BlockCache::UpdatePendingRequestEstimations() - { - for (auto it : m_pendingRequests) - { - Section& section = it.second; - AZ_Assert(section.m_cacheBlockIndex != s_fileNotCached, "An in-flight cache section doesn't have a cache block associated with it."); - AZ_Assert(m_inFlightRequests[section.m_cacheBlockIndex], - "Cache block %i is reported as being in-flight but has no request.", section.m_cacheBlockIndex); - if (section.m_wait) - { - AZ_Assert(section.m_parent, "A cache section with a wait request pending is missing a parent to wait on."); - auto largestTime = AZStd::max(section.m_parent->GetEstimatedCompletion(), it.first->GetEstimatedCompletion()); - section.m_wait->SetEstimatedCompletion(largestTime); - } - } - } - - void BlockCache::ReadFile(FileRequest* request, FileRequest::ReadData& data) - { - if (!m_next) - { - request->SetStatus(IStreamerTypes::RequestStatus::Failed); - m_context->MarkRequestAsCompleted(request); - return; - } - - auto continueReadFile = [this, request](FileRequest& fileSizeRequest) - { - AZ_PROFILE_FUNCTION(AzCore); - AZ_Assert(m_numMetaDataRetrievalInProgress > 0, - "More requests have completed meta data retrieval in the Block Cache than were requested."); - m_numMetaDataRetrievalInProgress--; - if (fileSizeRequest.GetStatus() == IStreamerTypes::RequestStatus::Completed) - { - auto& requestInfo = AZStd::get(fileSizeRequest.GetCommand()); - if (requestInfo.m_found) - { - ContinueReadFile(request, requestInfo.m_fileSize); - return; - } - } - // Couldn't find the file size so don't try to split and pass the request to the next entry in the stack. - StreamStackEntry::QueueRequest(request); - }; - m_numMetaDataRetrievalInProgress++; - FileRequest* fileSizeRequest = m_context->GetNewInternalRequest(); - fileSizeRequest->CreateFileMetaDataRetrieval(data.m_path); - fileSizeRequest->SetCompletionCallback(AZStd::move(continueReadFile)); - StreamStackEntry::QueueRequest(fileSizeRequest); - } - void BlockCache::ContinueReadFile(FileRequest* request, u64 fileLength) - { - Section prolog; - Section main; - Section epilog; - - auto& data = AZStd::get(request->GetCommand()); - - if (!SplitRequest(prolog, main, epilog, data.m_path, fileLength, data.m_offset, data.m_size, - reinterpret_cast(data.m_output))) - { - m_context->MarkRequestAsCompleted(request); - return; - } - - if (prolog.m_used || epilog.m_used) - { - m_cacheableStat.PushSample(1.0); - Statistic::PlotImmediate(m_name, CacheableName, m_cacheableStat.GetMostRecentSample()); - } - else - { - // Nothing to cache so simply forward the call to the next entry in the stack for direct reading. - m_cacheableStat.PushSample(0.0); - Statistic::PlotImmediate(m_name, CacheableName, m_cacheableStat.GetMostRecentSample()); - m_next->QueueRequest(request); - return; - } - - bool fullyCached = true; - if (prolog.m_used) - { - if (m_onlyEpilogWrites && (main.m_used || epilog.m_used)) - { - // Only the epilog is allowed to write to the cache, but a previous read could - // still have cached the prolog, so check the cache and use the data if it's there - // otherwise merge the section with the main section to have the data read. - if (ReadFromCache(request, prolog, data.m_path) == CacheResult::CacheMiss) - { - // The data isn't cached so put the prolog in front of the main section - // so it's read in one read request. If main wasn't used, prefixing the prolog - // will cause it to be filled in and used. - main.Prefix(prolog); - m_hitRateStat.PushSample(0.0); - Statistic::PlotImmediate(m_name, CacheHitRateName, m_hitRateStat.GetMostRecentSample()); - } - else - { - m_hitRateStat.PushSample(1.0); - Statistic::PlotImmediate(m_name, CacheHitRateName, m_hitRateStat.GetMostRecentSample()); - } + // The data isn't cached so put the prolog in front of the main section + // so it's read in one read request. If main wasn't used, prefixing the prolog + // will cause it to be filled in and used. + main.Prefix(prolog); + m_hitRateStat.PushSample(0.0); + Statistic::PlotImmediate(m_name, CacheHitRateName, m_hitRateStat.GetMostRecentSample()); } else { - // If m_onlyEpilogWrites is set but main and epilog are not filled in, it means that - // the request was so small it fits in one cache block, in which case the prolog and - // epilog are practically the same. Or this code is reached because both prolog and - // epilog are allowed to write. - bool readFromCache = (ServiceFromCache(request, prolog, data.m_path, data.m_sharedRead) == CacheResult::ReadFromCache); - fullyCached = readFromCache && fullyCached; - - m_hitRateStat.PushSample(readFromCache ? 1.0 : 0.0); + m_hitRateStat.PushSample(1.0); Statistic::PlotImmediate(m_name, CacheHitRateName, m_hitRateStat.GetMostRecentSample()); } } - - if (main.m_used) + else { - FileRequest* mainRequest = m_context->GetNewInternalRequest(); - // No need for a callback as there's nothing to do after the read has been completed. - mainRequest->CreateRead(request, main.m_output, main.m_readSize, data.m_path, - main.m_readOffset, main.m_readSize, data.m_sharedRead); - m_next->QueueRequest(mainRequest); - fullyCached = false; - } - - if (epilog.m_used) - { - bool readFromCache = (ServiceFromCache(request, epilog, data.m_path, data.m_sharedRead) == CacheResult::ReadFromCache); + // If m_onlyEpilogWrites is set but main and epilog are not filled in, it means that + // the request was so small it fits in one cache block, in which case the prolog and + // epilog are practically the same. Or this code is reached because both prolog and + // epilog are allowed to write. + bool readFromCache = (ServiceFromCache(request, prolog, data.m_path, data.m_sharedRead) == CacheResult::ReadFromCache); fullyCached = readFromCache && fullyCached; m_hitRateStat.PushSample(readFromCache ? 1.0 : 0.0); Statistic::PlotImmediate(m_name, CacheHitRateName, m_hitRateStat.GetMostRecentSample()); } + } - if (fullyCached) + if (main.m_used) + { + FileRequest* mainRequest = m_context->GetNewInternalRequest(); + // No need for a callback as there's nothing to do after the read has been completed. + mainRequest->CreateRead(request, main.m_output, main.m_readSize, data.m_path, + main.m_readOffset, main.m_readSize, data.m_sharedRead); + m_next->QueueRequest(mainRequest); + fullyCached = false; + } + + if (epilog.m_used) + { + bool readFromCache = (ServiceFromCache(request, epilog, data.m_path, data.m_sharedRead) == CacheResult::ReadFromCache); + fullyCached = readFromCache && fullyCached; + + m_hitRateStat.PushSample(readFromCache ? 1.0 : 0.0); + Statistic::PlotImmediate(m_name, CacheHitRateName, m_hitRateStat.GetMostRecentSample()); + } + + if (fullyCached) + { + request->SetStatus(IStreamerTypes::RequestStatus::Completed); + m_context->MarkRequestAsCompleted(request); + } + } + + void BlockCache::FlushCache(const RequestPath& filePath) + { + for (u32 i = 0; i < m_numBlocks; ++i) + { + if (m_cachedPaths[i] == filePath) { - request->SetStatus(IStreamerTypes::RequestStatus::Completed); - m_context->MarkRequestAsCompleted(request); + ResetCacheEntry(i); } } + } - void BlockCache::FlushCache(const RequestPath& filePath) + void BlockCache::FlushEntireCache() + { + ResetCache(); + } + + void BlockCache::CollectStatistics(AZStd::vector& statistics) const + { + statistics.push_back(Statistic::CreatePercentage(m_name, CacheHitRateName, CalculateHitRatePercentage())); + statistics.push_back(Statistic::CreatePercentage(m_name, CacheableName, CalculateCacheableRatePercentage())); + statistics.push_back(Statistic::CreateInteger(m_name, "Available slots", CalculateAvailableRequestSlots())); + + StreamStackEntry::CollectStatistics(statistics); + } + + double BlockCache::CalculateHitRatePercentage() const + { + return m_hitRateStat.GetAverage(); + } + + double BlockCache::CalculateCacheableRatePercentage() const + { + return m_cacheableStat.GetAverage(); + } + + s32 BlockCache::CalculateAvailableRequestSlots() const + { + return aznumeric_cast(m_numBlocks) - m_numInFlightRequests - m_numMetaDataRetrievalInProgress - + aznumeric_cast(m_delayedSections.size()); + } + + BlockCache::CacheResult BlockCache::ReadFromCache(FileRequest* request, Section& section, const RequestPath& filePath) + { + u32 cacheLocation = FindInCache(filePath, section.m_readOffset); + if (cacheLocation != s_fileNotCached) { - for (u32 i = 0; i < m_numBlocks; ++i) - { - if (m_cachedPaths[i] == filePath) - { - ResetCacheEntry(i); - } - } + return ReadFromCache(request, section, cacheLocation); } - - void BlockCache::FlushEntireCache() + else { - ResetCache(); + return CacheResult::CacheMiss; } + } - void BlockCache::CollectStatistics(AZStd::vector& statistics) const + BlockCache::CacheResult BlockCache::ReadFromCache(FileRequest* request, Section& section, u32 cacheBlock) + { + if (!IsCacheBlockInFlight(cacheBlock)) { - statistics.push_back(Statistic::CreatePercentage(m_name, CacheHitRateName, CalculateHitRatePercentage())); - statistics.push_back(Statistic::CreatePercentage(m_name, CacheableName, CalculateCacheableRatePercentage())); - statistics.push_back(Statistic::CreateInteger(m_name, "Available slots", CalculateAvailableRequestSlots())); - - StreamStackEntry::CollectStatistics(statistics); + TouchBlock(cacheBlock); + memcpy(section.m_output, GetCacheBlockData(cacheBlock) + section.m_blockOffset, section.m_copySize); + return CacheResult::ReadFromCache; } - - double BlockCache::CalculateHitRatePercentage() const + else { - return m_hitRateStat.GetAverage(); + AZ_Assert(section.m_wait == nullptr, "A wait request has to be set on a block cache section, but one has already been assigned."); + FileRequest* wait = m_context->GetNewInternalRequest(); + wait->CreateWait(request); + section.m_cacheBlockIndex = cacheBlock; + section.m_parent = request; + section.m_wait = wait; + m_pendingRequests.emplace(m_inFlightRequests[cacheBlock], section); + return CacheResult::Queued; } + } - double BlockCache::CalculateCacheableRatePercentage() const - { - return m_cacheableStat.GetAverage(); - } + BlockCache::CacheResult BlockCache::ServiceFromCache( + FileRequest* request, Section& section, const RequestPath& filePath, bool sharedRead) + { + AZ_Assert(m_next, "ServiceFromCache in BlockCache was called when the cache doesn't have a way to read files."); - s32 BlockCache::CalculateAvailableRequestSlots() const + u32 cacheLocation = FindInCache(filePath, section.m_readOffset); + if (cacheLocation == s_fileNotCached) { - return aznumeric_cast(m_numBlocks) - m_numInFlightRequests - m_numMetaDataRetrievalInProgress - - aznumeric_cast(m_delayedSections.size()); - } + m_hitRateStat.PushSample(0.0); + Statistic::PlotImmediate(m_name, CacheHitRateName, m_hitRateStat.GetMostRecentSample()); - BlockCache::CacheResult BlockCache::ReadFromCache(FileRequest* request, Section& section, const RequestPath& filePath) - { - u32 cacheLocation = FindInCache(filePath, section.m_readOffset); + section.m_parent = request; + cacheLocation = RecycleOldestBlock(filePath, section.m_readOffset); if (cacheLocation != s_fileNotCached) { - return ReadFromCache(request, section, cacheLocation); - } - else - { - return CacheResult::CacheMiss; - } - } + FileRequest* readRequest = m_context->GetNewInternalRequest(); + readRequest->CreateRead(request, GetCacheBlockData(cacheLocation), m_blockSize, filePath, section.m_readOffset, + section.m_readSize, sharedRead); + readRequest->SetCompletionCallback([this](FileRequest& request) + { + AZ_PROFILE_FUNCTION(AzCore); + CompleteRead(request); + }); + section.m_cacheBlockIndex = cacheLocation; + m_inFlightRequests[cacheLocation] = readRequest; + m_numInFlightRequests++; - BlockCache::CacheResult BlockCache::ReadFromCache(FileRequest* request, Section& section, u32 cacheBlock) - { - if (!IsCacheBlockInFlight(cacheBlock)) - { - TouchBlock(cacheBlock); - memcpy(section.m_output, GetCacheBlockData(cacheBlock) + section.m_blockOffset, section.m_copySize); - return CacheResult::ReadFromCache; - } - else - { - AZ_Assert(section.m_wait == nullptr, "A wait request has to be set on a block cache section, but one has already been assigned."); - FileRequest* wait = m_context->GetNewInternalRequest(); - wait->CreateWait(request); - section.m_cacheBlockIndex = cacheBlock; - section.m_parent = request; - section.m_wait = wait; - m_pendingRequests.emplace(m_inFlightRequests[cacheBlock], section); + // If set, this is the wait added by the delay. + if (section.m_wait) + { + m_context->MarkRequestAsCompleted(section.m_wait); + section.m_wait = nullptr; + } + + m_pendingRequests.emplace(readRequest, section); + m_next->QueueRequest(readRequest); return CacheResult::Queued; } - } - - BlockCache::CacheResult BlockCache::ServiceFromCache( - FileRequest* request, Section& section, const RequestPath& filePath, bool sharedRead) - { - AZ_Assert(m_next, "ServiceFromCache in BlockCache was called when the cache doesn't have a way to read files."); - - u32 cacheLocation = FindInCache(filePath, section.m_readOffset); - if (cacheLocation == s_fileNotCached) - { - m_hitRateStat.PushSample(0.0); - Statistic::PlotImmediate(m_name, CacheHitRateName, m_hitRateStat.GetMostRecentSample()); - - section.m_parent = request; - cacheLocation = RecycleOldestBlock(filePath, section.m_readOffset); - if (cacheLocation != s_fileNotCached) - { - FileRequest* readRequest = m_context->GetNewInternalRequest(); - readRequest->CreateRead(request, GetCacheBlockData(cacheLocation), m_blockSize, filePath, section.m_readOffset, - section.m_readSize, sharedRead); - readRequest->SetCompletionCallback([this](FileRequest& request) - { - AZ_PROFILE_FUNCTION(AzCore); - CompleteRead(request); - }); - section.m_cacheBlockIndex = cacheLocation; - m_inFlightRequests[cacheLocation] = readRequest; - m_numInFlightRequests++; - - // If set, this is the wait added by the delay. - if (section.m_wait) - { - m_context->MarkRequestAsCompleted(section.m_wait); - section.m_wait = nullptr; - } - - m_pendingRequests.emplace(readRequest, section); - m_next->QueueRequest(readRequest); - return CacheResult::Queued; - } - else - { - // There's no more space in the cache to store this request to. This is because there are more in-flight requests than - // there are slots in the cache. Delay the request until there's a slot available but add a wait for the section to - // make sure the request can't complete if some parts are read. - if (!section.m_wait) - { - section.m_wait = m_context->GetNewInternalRequest(); - section.m_wait->CreateWait(request); - } - m_delayedSections.push_back(section); - return CacheResult::Delayed; - } - } else { - // If set, this is the wait added by the delay when the cache was full. - if (section.m_wait) + // There's no more space in the cache to store this request to. This is because there are more in-flight requests than + // there are slots in the cache. Delay the request until there's a slot available but add a wait for the section to + // make sure the request can't complete if some parts are read. + if (!section.m_wait) { - m_context->MarkRequestAsCompleted(section.m_wait); - section.m_wait = nullptr; + section.m_wait = m_context->GetNewInternalRequest(); + section.m_wait->CreateWait(request); } - - m_hitRateStat.PushSample(1.0); - Statistic::PlotImmediate(m_name, CacheHitRateName, m_hitRateStat.GetMostRecentSample()); - - return ReadFromCache(request, section, cacheLocation); + m_delayedSections.push_back(section); + return CacheResult::Delayed; } } - - void BlockCache::CompleteRead(FileRequest& request) + else { - auto requestInfo = m_pendingRequests.equal_range(&request); - AZ_Assert(requestInfo.first != requestInfo.second, "Block cache was asked to complete a file request it never queued."); - - IStreamerTypes::RequestStatus requestStatus = request.GetStatus(); - bool requestWasSuccessful = requestStatus == IStreamerTypes::RequestStatus::Completed; - u32 cacheBlockIndex = requestInfo.first->second.m_cacheBlockIndex; - - for (auto it = requestInfo.first; it != requestInfo.second; ++it) + // If set, this is the wait added by the delay when the cache was full. + if (section.m_wait) { - Section& section = it->second; - AZ_Assert(section.m_cacheBlockIndex == cacheBlockIndex, - "Section associated with the file request is referencing the incorrect cache block (%u vs %u).", cacheBlockIndex, section.m_cacheBlockIndex); - if (section.m_wait) - { - section.m_wait->SetStatus(requestStatus); - m_context->MarkRequestAsCompleted(section.m_wait); - section.m_wait = nullptr; - } + m_context->MarkRequestAsCompleted(section.m_wait); + section.m_wait = nullptr; + } - if (requestWasSuccessful) - { - memcpy(section.m_output, GetCacheBlockData(cacheBlockIndex) + section.m_blockOffset, section.m_copySize); - } + m_hitRateStat.PushSample(1.0); + Statistic::PlotImmediate(m_name, CacheHitRateName, m_hitRateStat.GetMostRecentSample()); + + return ReadFromCache(request, section, cacheLocation); + } + } + + void BlockCache::CompleteRead(FileRequest& request) + { + auto requestInfo = m_pendingRequests.equal_range(&request); + AZ_Assert(requestInfo.first != requestInfo.second, "Block cache was asked to complete a file request it never queued."); + + IStreamerTypes::RequestStatus requestStatus = request.GetStatus(); + bool requestWasSuccessful = requestStatus == IStreamerTypes::RequestStatus::Completed; + u32 cacheBlockIndex = requestInfo.first->second.m_cacheBlockIndex; + + for (auto it = requestInfo.first; it != requestInfo.second; ++it) + { + Section& section = it->second; + AZ_Assert(section.m_cacheBlockIndex == cacheBlockIndex, + "Section associated with the file request is referencing the incorrect cache block (%u vs %u).", cacheBlockIndex, section.m_cacheBlockIndex); + if (section.m_wait) + { + section.m_wait->SetStatus(requestStatus); + m_context->MarkRequestAsCompleted(section.m_wait); + section.m_wait = nullptr; } if (requestWasSuccessful) { - TouchBlock(cacheBlockIndex); - m_inFlightRequests[cacheBlockIndex] = nullptr; + memcpy(section.m_output, GetCacheBlockData(cacheBlockIndex) + section.m_blockOffset, section.m_copySize); } - else - { - ResetCacheEntry(cacheBlockIndex); - } - AZ_Assert(m_numInFlightRequests > 0, "Clearing out an in-flight request, but there shouldn't be any in flight according to records."); - m_numInFlightRequests--; - m_pendingRequests.erase(&request); } - bool BlockCache::SplitRequest(Section& prolog, Section& main, Section& epilog, - [[maybe_unused]] const RequestPath& filePath, u64 fileLength, - u64 offset, u64 size, u8* buffer) const + if (requestWasSuccessful) { - AZ_Assert(offset + size <= fileLength, "File at path '%s' is being read past the end of the file.", filePath.GetRelativePath()); + TouchBlock(cacheBlockIndex); + m_inFlightRequests[cacheBlockIndex] = nullptr; + } + else + { + ResetCacheEntry(cacheBlockIndex); + } + AZ_Assert(m_numInFlightRequests > 0, "Clearing out an in-flight request, but there shouldn't be any in flight according to records."); + m_numInFlightRequests--; + m_pendingRequests.erase(&request); + } - // - // Prolog - // This looks at the request and sees if there's anything in front of the file that should be cached. This also - // deals with the situation where the entire file request fits inside the cache which could mean there's data - // left after the file as well that could be cached. - // - u64 roundedOffsetStart = AZ_SIZE_ALIGN_DOWN(offset, aznumeric_cast(m_blockSize)); - - u64 blockReadSizeStart = AZStd::min(fileLength - roundedOffsetStart, aznumeric_cast(m_blockSize)); - // Check if the request is on the left edge of the cache block, which means there's nothing in front of it - // that could be cached. - if (roundedOffsetStart == offset) - { - if (offset + size >= fileLength) - { - // The entire (remainder) of the file is read so there's nothing to cache - main.m_readOffset = offset; - main.m_readSize = size; - main.m_output = buffer; - main.m_used = true; - return true; - } - else if (size < blockReadSizeStart) - { - // The entire request fits inside a single cache block, but there's more file to read. - prolog.m_readOffset = offset; - prolog.m_readSize = blockReadSizeStart; - prolog.m_blockOffset = 0; - prolog.m_output = buffer; - prolog.m_copySize = size; - prolog.m_used = true; - return true; - } - // In any other case it means that the entire block would be read so caching has no effect. - } - else - { - // There is a portion of the file before that's not requested so always cache this block. - const u64 blockOffset = offset - roundedOffsetStart; - prolog.m_readOffset = roundedOffsetStart; - prolog.m_blockOffset = blockOffset; - prolog.m_output = buffer; - prolog.m_used = true; + bool BlockCache::SplitRequest(Section& prolog, Section& main, Section& epilog, + [[maybe_unused]] const RequestPath& filePath, u64 fileLength, + u64 offset, u64 size, u8* buffer) const + { + AZ_Assert(offset + size <= fileLength, "File at path '%s' is being read past the end of the file.", filePath.GetRelativePath()); - const bool isEntirelyInCache = blockOffset + size <= blockReadSizeStart; - if (isEntirelyInCache) - { - // The read size is already clamped to the file size above when blockReadSizeStart is set. - AZ_Assert(roundedOffsetStart + blockReadSizeStart <= fileLength, - "Read size in block cache was set to %llu but this is beyond the file length of %llu.", - roundedOffsetStart + blockReadSizeStart, fileLength); - prolog.m_readSize = blockReadSizeStart; - prolog.m_copySize = size; + // + // Prolog + // This looks at the request and sees if there's anything in front of the file that should be cached. This also + // deals with the situation where the entire file request fits inside the cache which could mean there's data + // left after the file as well that could be cached. + // + u64 roundedOffsetStart = AZ_SIZE_ALIGN_DOWN(offset, aznumeric_cast(m_blockSize)); - // There won't be anything else coming after this so continue reading. - return true; - } - else - { - prolog.m_readSize = blockReadSizeStart; - prolog.m_copySize = blockReadSizeStart - blockOffset; - } - } - - - // - // Epilog - // Since the prolog already takes care of the situation where the file fits entirely in the cache the epilog is - // much simpler as it only has to look at the case where there is more file after the request to read for caching. - // - u64 roundedOffsetEnd = AZ_SIZE_ALIGN_DOWN(offset + size, aznumeric_cast(m_blockSize)); - u64 copySize = offset + size - roundedOffsetEnd; - u64 blockReadSizeEnd = m_blockSize; - if ((roundedOffsetEnd + blockReadSizeEnd) > fileLength) + u64 blockReadSizeStart = AZStd::min(fileLength - roundedOffsetStart, aznumeric_cast(m_blockSize)); + // Check if the request is on the left edge of the cache block, which means there's nothing in front of it + // that could be cached. + if (roundedOffsetStart == offset) + { + if (offset + size >= fileLength) { - blockReadSizeEnd = fileLength - roundedOffsetEnd; - } - - // If the read doesn't align with the edge of the cache - if (copySize != 0 && copySize < blockReadSizeEnd) - { - epilog.m_readOffset = roundedOffsetEnd; - epilog.m_readSize = blockReadSizeEnd; - epilog.m_blockOffset = 0; - epilog.m_output = buffer + (roundedOffsetEnd - offset); - epilog.m_copySize = copySize; - epilog.m_used = true; - } - - // - // Main - // If this point is reached there's potentially a block between the prolog and epilog that can be directly read. - // - u64 adjustedOffset = offset; - if (prolog.m_used) - { - adjustedOffset += prolog.m_copySize; - size -= prolog.m_copySize; - } - if (epilog.m_used) - { - size -= epilog.m_copySize; - } - AZ_Assert(IStreamerTypes::IsAlignedTo(adjustedOffset, m_blockSize), - "The adjustments made by the prolog should guarantee the offset is aligned to a cache block."); - if (size != 0) - { - main.m_readOffset = adjustedOffset; + // The entire (remainder) of the file is read so there's nothing to cache + main.m_readOffset = offset; main.m_readSize = size; - main.m_output = buffer + (adjustedOffset - offset); + main.m_output = buffer; main.m_used = true; + return true; } - - return true; - } - - u8* BlockCache::GetCacheBlockData(u32 index) - { - AZ_Assert(index < m_numBlocks, "Index for touch a cache entry in the BlockCache is out of bounds."); - return m_cache + (index * m_blockSize); - } - - void BlockCache::TouchBlock(u32 index) - { - AZ_Assert(index < m_numBlocks, "Index for touch a cache entry in the BlockCache is out of bounds."); - m_blockLastTouched[index] = AZStd::chrono::high_resolution_clock::now(); - } - - u32 BlockCache::RecycleOldestBlock(const RequestPath& filePath, u64 offset) - { - AZ_Assert((offset & (m_blockSize - 1)) == 0, "The offset used to recycle a block cache needs to be a multiple of the block size."); - - // Find the oldest cache block. - TimePoint oldest = m_blockLastTouched[0]; - u32 oldestIndex = 0; - for (u32 i = 1; i < m_numBlocks; ++i) + else if (size < blockReadSizeStart) { - if (m_blockLastTouched[i] < oldest && !m_inFlightRequests[i]) - { - oldest = m_blockLastTouched[i]; - oldestIndex = i; - } + // The entire request fits inside a single cache block, but there's more file to read. + prolog.m_readOffset = offset; + prolog.m_readSize = blockReadSizeStart; + prolog.m_blockOffset = 0; + prolog.m_output = buffer; + prolog.m_copySize = size; + prolog.m_used = true; + return true; } + // In any other case it means that the entire block would be read so caching has no effect. + } + else + { + // There is a portion of the file before that's not requested so always cache this block. + const u64 blockOffset = offset - roundedOffsetStart; + prolog.m_readOffset = roundedOffsetStart; + prolog.m_blockOffset = blockOffset; + prolog.m_output = buffer; + prolog.m_used = true; - if (!IsCacheBlockInFlight(oldestIndex)) + const bool isEntirelyInCache = blockOffset + size <= blockReadSizeStart; + if (isEntirelyInCache) { - // Recycle the block. - m_cachedPaths[oldestIndex] = filePath; - m_cachedOffsets[oldestIndex] = offset; - TouchBlock(oldestIndex); - return oldestIndex; + // The read size is already clamped to the file size above when blockReadSizeStart is set. + AZ_Assert(roundedOffsetStart + blockReadSizeStart <= fileLength, + "Read size in block cache was set to %llu but this is beyond the file length of %llu.", + roundedOffsetStart + blockReadSizeStart, fileLength); + prolog.m_readSize = blockReadSizeStart; + prolog.m_copySize = size; + + // There won't be anything else coming after this so continue reading. + return true; } else { - return s_fileNotCached; + prolog.m_readSize = blockReadSizeStart; + prolog.m_copySize = blockReadSizeStart - blockOffset; } } - u32 BlockCache::FindInCache(const RequestPath& filePath, u64 offset) const - { - AZ_Assert((offset & (m_blockSize - 1)) == 0, "The offset used to find a block in the block cache needs to be a multiple of the block size."); - for (u32 i = 0; i < m_numBlocks; ++i) - { - if (m_cachedPaths[i] == filePath && m_cachedOffsets[i] == offset) - { - return i; - } - } + // + // Epilog + // Since the prolog already takes care of the situation where the file fits entirely in the cache the epilog is + // much simpler as it only has to look at the case where there is more file after the request to read for caching. + // + u64 roundedOffsetEnd = AZ_SIZE_ALIGN_DOWN(offset + size, aznumeric_cast(m_blockSize)); + u64 copySize = offset + size - roundedOffsetEnd; + u64 blockReadSizeEnd = m_blockSize; + if ((roundedOffsetEnd + blockReadSizeEnd) > fileLength) + { + blockReadSizeEnd = fileLength - roundedOffsetEnd; + } + + // If the read doesn't align with the edge of the cache + if (copySize != 0 && copySize < blockReadSizeEnd) + { + epilog.m_readOffset = roundedOffsetEnd; + epilog.m_readSize = blockReadSizeEnd; + epilog.m_blockOffset = 0; + epilog.m_output = buffer + (roundedOffsetEnd - offset); + epilog.m_copySize = copySize; + epilog.m_used = true; + } + + // + // Main + // If this point is reached there's potentially a block between the prolog and epilog that can be directly read. + // + u64 adjustedOffset = offset; + if (prolog.m_used) + { + adjustedOffset += prolog.m_copySize; + size -= prolog.m_copySize; + } + if (epilog.m_used) + { + size -= epilog.m_copySize; + } + AZ_Assert(IStreamerTypes::IsAlignedTo(adjustedOffset, m_blockSize), + "The adjustments made by the prolog should guarantee the offset is aligned to a cache block."); + if (size != 0) + { + main.m_readOffset = adjustedOffset; + main.m_readSize = size; + main.m_output = buffer + (adjustedOffset - offset); + main.m_used = true; + } + + return true; + } + + u8* BlockCache::GetCacheBlockData(u32 index) + { + AZ_Assert(index < m_numBlocks, "Index for touch a cache entry in the BlockCache is out of bounds."); + return m_cache + (index * m_blockSize); + } + + void BlockCache::TouchBlock(u32 index) + { + AZ_Assert(index < m_numBlocks, "Index for touch a cache entry in the BlockCache is out of bounds."); + m_blockLastTouched[index] = AZStd::chrono::high_resolution_clock::now(); + } + + u32 BlockCache::RecycleOldestBlock(const RequestPath& filePath, u64 offset) + { + AZ_Assert((offset & (m_blockSize - 1)) == 0, "The offset used to recycle a block cache needs to be a multiple of the block size."); + + // Find the oldest cache block. + TimePoint oldest = m_blockLastTouched[0]; + u32 oldestIndex = 0; + for (u32 i = 1; i < m_numBlocks; ++i) + { + if (m_blockLastTouched[i] < oldest && !m_inFlightRequests[i]) + { + oldest = m_blockLastTouched[i]; + oldestIndex = i; + } + } + + if (!IsCacheBlockInFlight(oldestIndex)) + { + // Recycle the block. + m_cachedPaths[oldestIndex] = filePath; + m_cachedOffsets[oldestIndex] = offset; + TouchBlock(oldestIndex); + return oldestIndex; + } + else + { return s_fileNotCached; } + } - bool BlockCache::IsCacheBlockInFlight(u32 index) const + u32 BlockCache::FindInCache(const RequestPath& filePath, u64 offset) const + { + AZ_Assert((offset & (m_blockSize - 1)) == 0, "The offset used to find a block in the block cache needs to be a multiple of the block size."); + for (u32 i = 0; i < m_numBlocks; ++i) { - AZ_Assert(index < m_numBlocks, "Index for checking if a cache block is in flight is out of bounds."); - return m_inFlightRequests[index] != nullptr; - } - - void BlockCache::ResetCacheEntry(u32 index) - { - AZ_Assert(index < m_numBlocks, "Index for resetting a cache entry in the BlockCache is out of bounds."); - - m_cachedPaths[index].Clear(); - m_cachedOffsets[index] = 0; - m_blockLastTouched[index] = TimePoint::min(); - m_inFlightRequests[index] = nullptr; - } - - void BlockCache::ResetCache() - { - for (u32 i = 0; i < m_numBlocks; ++i) + if (m_cachedPaths[i] == filePath && m_cachedOffsets[i] == offset) { - ResetCacheEntry(i); + return i; } - m_numInFlightRequests = 0; } - } // namespace IO -} // namespace AZ + + return s_fileNotCached; + } + + bool BlockCache::IsCacheBlockInFlight(u32 index) const + { + AZ_Assert(index < m_numBlocks, "Index for checking if a cache block is in flight is out of bounds."); + return m_inFlightRequests[index] != nullptr; + } + + void BlockCache::ResetCacheEntry(u32 index) + { + AZ_Assert(index < m_numBlocks, "Index for resetting a cache entry in the BlockCache is out of bounds."); + + m_cachedPaths[index].Clear(); + m_cachedOffsets[index] = 0; + m_blockLastTouched[index] = TimePoint::min(); + m_inFlightRequests[index] = nullptr; + } + + void BlockCache::ResetCache() + { + for (u32 i = 0; i < m_numBlocks; ++i) + { + ResetCacheEntry(i); + } + m_numInFlightRequests = 0; + } +} // namespace AZ::IO diff --git a/Code/Framework/AzCore/AzCore/IO/Streamer/BlockCache.h b/Code/Framework/AzCore/AzCore/IO/Streamer/BlockCache.h index 209721f9d9..90fb7ea193 100644 --- a/Code/Framework/AzCore/AzCore/IO/Streamer/BlockCache.h +++ b/Code/Framework/AzCore/AzCore/IO/Streamer/BlockCache.h @@ -19,144 +19,144 @@ #include #include +namespace AZ::IO +{ + struct BlockCacheConfig final : + public IStreamerStackConfig + { + AZ_RTTI(AZ::IO::BlockCacheConfig, "{70120525-88A4-40B6-A75B-BAA7E8FD77F3}", IStreamerStackConfig); + AZ_CLASS_ALLOCATOR(BlockCacheConfig, AZ::SystemAllocator, 0); + + ~BlockCacheConfig() override = default; + AZStd::shared_ptr AddStreamStackEntry( + const HardwareInformation& hardware, AZStd::shared_ptr parent) override; + static void Reflect(AZ::ReflectContext* context); + + //! Dynamic options for the blocks size. + //! It's possible to set static sizes or use the names from this enum to have AZ::IO::Streamer automatically fill in the sizes. + //! Fixed sizes are set through the Settings Registry with "BlockSize": 524288, while dynamic values are set like + //! "BlockSize": "MemoryAlignment". In the latter case AZ::IO::Streamer will use the available hardware information and fill + //! in the actual value. + enum BlockSize : u32 + { + MaxTransfer = AZStd::numeric_limits::max(), //!< The largest possible block size. + MemoryAlignment = MaxTransfer - 1, //!< The size of the minimal memory requirement of the storage device. + SizeAlignment = MemoryAlignment - 1 //!< The minimal read size required by the storage device. + }; + + //! The overall size of the cache in megabytes. + u32 m_cacheSizeMib{ 8 }; + //! The size of the individual blocks inside the cache. + BlockSize m_blockSize{ BlockSize::MemoryAlignment }; + }; + + class BlockCache + : public StreamStackEntry + { + public: + BlockCache(u64 cacheSize, u32 blockSize, u32 alignment, bool onlyEpilogWrites); + BlockCache(BlockCache&& rhs) = delete; + BlockCache(const BlockCache& rhs) = delete; + ~BlockCache() override; + + BlockCache& operator=(BlockCache&& rhs) = delete; + BlockCache& operator=(const BlockCache& rhs) = delete; + + void QueueRequest(FileRequest* request) override; + bool ExecuteRequests() override; + + void UpdateStatus(Status& status) const override; + void UpdateCompletionEstimates(AZStd::chrono::system_clock::time_point now, AZStd::vector& internalPending, + StreamerContext::PreparedQueue::iterator pendingBegin, StreamerContext::PreparedQueue::iterator pendingEnd) override; + void AddDelayedRequests(AZStd::vector& internalPending); + void UpdatePendingRequestEstimations(); + + void FlushCache(const RequestPath& filePath); + void FlushEntireCache(); + + void CollectStatistics(AZStd::vector& statistics) const override; + + double CalculateHitRatePercentage() const; + double CalculateCacheableRatePercentage() const; + s32 CalculateAvailableRequestSlots() const; + + protected: + static constexpr u32 s_fileNotCached = static_cast(-1); + + enum class CacheResult + { + ReadFromCache, //!< Data was found in the cache and reused. + CacheMiss, //!< Data wasn't found in the cache and no sub request was queued. + Queued, //!< A sub request was created or appended and queued for processing on the next entry in the streamer stack. + Delayed //!< There's no more room to queue a new request, so delay the request until a slot becomes available. + }; + + struct Section + { + u8* m_output{ nullptr }; //!< The buffer to write the data to. + FileRequest* m_parent{ nullptr }; //!< If set, the file request that is split up by this section. + FileRequest* m_wait{ nullptr }; //!< If set, this contains a "wait"-operation that blocks an operation chain from continuing until this section has been loaded. + u64 m_readOffset{ 0 }; //!< Offset into the file to start reading from. + u64 m_readSize{ 0 }; //!< Number of bytes to read from file. + u64 m_blockOffset{ 0 }; //!< Offset into the cache block to start copying from. + u64 m_copySize{ 0 }; //!< Number of bytes to copy from cache. + u32 m_cacheBlockIndex{ s_fileNotCached }; //!< If assigned, the index of the cache block assigned to this section. + bool m_used{ false }; //!< Whether or not this section is used in further processing. + + // Add the provided section in front of this one. + void Prefix(const Section& section); + }; + + using TimePoint = AZStd::chrono::system_clock::time_point; + + void ReadFile(FileRequest* request, FileRequest::ReadData& data); + void ContinueReadFile(FileRequest* request, u64 fileLength); + CacheResult ReadFromCache(FileRequest* request, Section& section, const RequestPath& filePath); + CacheResult ReadFromCache(FileRequest* request, Section& section, u32 cacheBlock); + CacheResult ServiceFromCache(FileRequest* request, Section& section, const RequestPath& filePath, bool sharedRead); + void CompleteRead(FileRequest& request); + bool SplitRequest(Section& prolog, Section& main, Section& epilog, const RequestPath& filePath, u64 fileLength, + u64 offset, u64 size, u8* buffer) const; + + u8* GetCacheBlockData(u32 index); + void TouchBlock(u32 index); + AZ::u32 RecycleOldestBlock(const RequestPath& filePath, u64 offset); + u32 FindInCache(const RequestPath& filePath, u64 offset) const; + bool IsCacheBlockInFlight(u32 index) const; + void ResetCacheEntry(u32 index); + void ResetCache(); + + //! Map of the file requests that are being processed and the sections of the parent requests they'll complete. + AZStd::unordered_multimap m_pendingRequests; + //! List of file sections that were delayed because the cache was full. + AZStd::deque
m_delayedSections; + + AZ::Statistics::RunningStatistic m_hitRateStat; + AZ::Statistics::RunningStatistic m_cacheableStat; + + u8* m_cache; + u64 m_cacheSize; + u32 m_blockSize; + u32 m_alignment; + u32 m_numBlocks; + s32 m_numInFlightRequests{ 0 }; + //! The file path associated with a cache block. + AZStd::unique_ptr m_cachedPaths; // Array of m_numBlocks size. + //! The offset into the file the cache blocks starts at. + AZStd::unique_ptr m_cachedOffsets; // Array of m_numBlocks size. + //! The last time the cache block was read from. + AZStd::unique_ptr m_blockLastTouched; // Array of m_numBlocks size. + //! The file request that's currently read data into the cache block. If null, the block has been read. + AZStd::unique_ptr m_inFlightRequests; // Array of m_numbBlocks size. + + //! The number of requests waiting for meta data to be retrieved. + s32 m_numMetaDataRetrievalInProgress{ 0 }; + //! Whether or not only the epilog ever writes to the cache. + bool m_onlyEpilogWrites; + }; +} // namespace AZ::IO + namespace AZ { - namespace IO - { - struct BlockCacheConfig final : - public IStreamerStackConfig - { - AZ_RTTI(AZ::IO::BlockCacheConfig, "{70120525-88A4-40B6-A75B-BAA7E8FD77F3}", IStreamerStackConfig); - AZ_CLASS_ALLOCATOR(BlockCacheConfig, AZ::SystemAllocator, 0); - - ~BlockCacheConfig() override = default; - AZStd::shared_ptr AddStreamStackEntry( - const HardwareInformation& hardware, AZStd::shared_ptr parent) override; - static void Reflect(AZ::ReflectContext* context); - - //! Dynamic options for the blocks size. - //! It's possible to set static sizes or use the names from this enum to have AZ::IO::Streamer automatically fill in the sizes. - //! Fixed sizes are set through the Settings Registry with "BlockSize": 524288, while dynamic values are set like - //! "BlockSize": "MemoryAlignment". In the latter case AZ::IO::Streamer will use the available hardware information and fill - //! in the actual value. - enum BlockSize : u32 - { - MaxTransfer = AZStd::numeric_limits::max(), //!< The largest possible block size. - MemoryAlignment = MaxTransfer - 1, //!< The size of the minimal memory requirement of the storage device. - SizeAlignment = MemoryAlignment - 1 //!< The minimal read size required by the storage device. - }; - - //! The overall size of the cache in megabytes. - u32 m_cacheSizeMib{ 8 }; - //! The size of the individual blocks inside the cache. - BlockSize m_blockSize{ BlockSize::MemoryAlignment }; - }; - - class BlockCache - : public StreamStackEntry - { - public: - BlockCache(u64 cacheSize, u32 blockSize, u32 alignment, bool onlyEpilogWrites); - BlockCache(BlockCache&& rhs) = delete; - BlockCache(const BlockCache& rhs) = delete; - ~BlockCache() override; - - BlockCache& operator=(BlockCache&& rhs) = delete; - BlockCache& operator=(const BlockCache& rhs) = delete; - - void QueueRequest(FileRequest* request) override; - bool ExecuteRequests() override; - - void UpdateStatus(Status& status) const override; - void UpdateCompletionEstimates(AZStd::chrono::system_clock::time_point now, AZStd::vector& internalPending, - StreamerContext::PreparedQueue::iterator pendingBegin, StreamerContext::PreparedQueue::iterator pendingEnd) override; - void AddDelayedRequests(AZStd::vector& internalPending); - void UpdatePendingRequestEstimations(); - - void FlushCache(const RequestPath& filePath); - void FlushEntireCache(); - - void CollectStatistics(AZStd::vector& statistics) const override; - - double CalculateHitRatePercentage() const; - double CalculateCacheableRatePercentage() const; - s32 CalculateAvailableRequestSlots() const; - - protected: - static constexpr u32 s_fileNotCached = static_cast(-1); - - enum class CacheResult - { - ReadFromCache, //!< Data was found in the cache and reused. - CacheMiss, //!< Data wasn't found in the cache and no sub request was queued. - Queued, //!< A sub request was created or appended and queued for processing on the next entry in the streamer stack. - Delayed //!< There's no more room to queue a new request, so delay the request until a slot becomes available. - }; - - struct Section - { - u8* m_output{ nullptr }; //!< The buffer to write the data to. - FileRequest* m_parent{ nullptr }; //!< If set, the file request that is split up by this section. - FileRequest* m_wait{ nullptr }; //!< If set, this contains a "wait"-operation that blocks an operation chain from continuing until this section has been loaded. - u64 m_readOffset{ 0 }; //!< Offset into the file to start reading from. - u64 m_readSize{ 0 }; //!< Number of bytes to read from file. - u64 m_blockOffset{ 0 }; //!< Offset into the cache block to start copying from. - u64 m_copySize{ 0 }; //!< Number of bytes to copy from cache. - u32 m_cacheBlockIndex{ s_fileNotCached }; //!< If assigned, the index of the cache block assigned to this section. - bool m_used{ false }; //!< Whether or not this section is used in further processing. - - // Add the provided section in front of this one. - void Prefix(const Section& section); - }; - - using TimePoint = AZStd::chrono::system_clock::time_point; - - void ReadFile(FileRequest* request, FileRequest::ReadData& data); - void ContinueReadFile(FileRequest* request, u64 fileLength); - CacheResult ReadFromCache(FileRequest* request, Section& section, const RequestPath& filePath); - CacheResult ReadFromCache(FileRequest* request, Section& section, u32 cacheBlock); - CacheResult ServiceFromCache(FileRequest* request, Section& section, const RequestPath& filePath, bool sharedRead); - void CompleteRead(FileRequest& request); - bool SplitRequest(Section& prolog, Section& main, Section& epilog, const RequestPath& filePath, u64 fileLength, - u64 offset, u64 size, u8* buffer) const; - - u8* GetCacheBlockData(u32 index); - void TouchBlock(u32 index); - AZ::u32 RecycleOldestBlock(const RequestPath& filePath, u64 offset); - u32 FindInCache(const RequestPath& filePath, u64 offset) const; - bool IsCacheBlockInFlight(u32 index) const; - void ResetCacheEntry(u32 index); - void ResetCache(); - - //! Map of the file requests that are being processed and the sections of the parent requests they'll complete. - AZStd::unordered_multimap m_pendingRequests; - //! List of file sections that were delayed because the cache was full. - AZStd::deque
m_delayedSections; - - AZ::Statistics::RunningStatistic m_hitRateStat; - AZ::Statistics::RunningStatistic m_cacheableStat; - - u8* m_cache; - u64 m_cacheSize; - u32 m_blockSize; - u32 m_alignment; - u32 m_numBlocks; - s32 m_numInFlightRequests{ 0 }; - //! The file path associated with a cache block. - AZStd::unique_ptr m_cachedPaths; // Array of m_numBlocks size. - //! The offset into the file the cache blocks starts at. - AZStd::unique_ptr m_cachedOffsets; // Array of m_numBlocks size. - //! The last time the cache block was read from. - AZStd::unique_ptr m_blockLastTouched; // Array of m_numBlocks size. - //! The file request that's currently read data into the cache block. If null, the block has been read. - AZStd::unique_ptr m_inFlightRequests; // Array of m_numbBlocks size. - - //! The number of requests waiting for meta data to be retrieved. - s32 m_numMetaDataRetrievalInProgress{ 0 }; - //! Whether or not only the epilog ever writes to the cache. - bool m_onlyEpilogWrites; - }; - } // namespace IO - AZ_TYPE_INFO_SPECIALIZE(AZ::IO::BlockCacheConfig::BlockSize, "{5D4D597D-4605-462D-A27D-8046115C5381}"); } // namespace AZ diff --git a/Code/Framework/AzCore/AzCore/IO/Streamer/DedicatedCache.cpp b/Code/Framework/AzCore/AzCore/IO/Streamer/DedicatedCache.cpp index e0e512e21f..b80a1ea724 100644 --- a/Code/Framework/AzCore/AzCore/IO/Streamer/DedicatedCache.cpp +++ b/Code/Framework/AzCore/AzCore/IO/Streamer/DedicatedCache.cpp @@ -12,320 +12,317 @@ #include #include -namespace AZ +namespace AZ::IO { - namespace IO + AZStd::shared_ptr DedicatedCacheConfig::AddStreamStackEntry( + const HardwareInformation& hardware, AZStd::shared_ptr parent) { - AZStd::shared_ptr DedicatedCacheConfig::AddStreamStackEntry( - const HardwareInformation& hardware, AZStd::shared_ptr parent) + size_t blockSize; + switch (m_blockSize) { - size_t blockSize; - switch (m_blockSize) + case BlockCacheConfig::BlockSize::MaxTransfer: + blockSize = hardware.m_maxTransfer; + break; + case BlockCacheConfig::BlockSize::MemoryAlignment: + blockSize = hardware.m_maxPhysicalSectorSize; + break; + case BlockCacheConfig::BlockSize::SizeAlignment: + blockSize = hardware.m_maxLogicalSectorSize; + break; + default: + blockSize = m_blockSize; + break; + } + + u32 cacheSize = static_cast(m_cacheSizeMib * 1_mib); + if (blockSize > cacheSize) + { + AZ_Warning("Streamer", false, "Size (%u) for DedicatedCache isn't big enough to hold at least one cache blocks of size (%zu). " + "The cache size will be increased to fit one cache block.", cacheSize, blockSize); + cacheSize = aznumeric_caster(blockSize); + } + + auto stackEntry = AZStd::make_shared( + cacheSize, aznumeric_cast(blockSize), aznumeric_cast(hardware.m_maxPhysicalSectorSize), m_writeOnlyEpilog); + stackEntry->SetNext(AZStd::move(parent)); + return stackEntry; + } + + void DedicatedCacheConfig::Reflect(AZ::ReflectContext* context) + { + if (auto serializeContext = azrtti_cast(context); serializeContext != nullptr) + { + serializeContext->Class() + ->Version(1) + ->Field("CacheSizeMib", &DedicatedCacheConfig::m_cacheSizeMib) + ->Field("BlockSize", &DedicatedCacheConfig::m_blockSize) + ->Field("WriteOnlyEpilog", &DedicatedCacheConfig::m_writeOnlyEpilog); + } + } + + + + // + // DedicatedCache + // + + DedicatedCache::DedicatedCache(u64 cacheSize, u32 blockSize, u32 alignment, bool onlyEpilogWrites) + : StreamStackEntry("Dedicated cache") + , m_cacheSize(cacheSize) + , m_alignment(alignment) + , m_blockSize(blockSize) + , m_onlyEpilogWrites(onlyEpilogWrites) + { + } + + void DedicatedCache::SetNext(AZStd::shared_ptr next) + { + m_next = AZStd::move(next); + for (AZStd::unique_ptr& cache : m_cachedFileCaches) + { + cache->SetNext(m_next); + } + } + + void DedicatedCache::SetContext(StreamerContext& context) + { + StreamStackEntry::SetContext(context); + for (AZStd::unique_ptr& cache : m_cachedFileCaches) + { + cache->SetContext(context); + } + } + + void DedicatedCache::PrepareRequest(FileRequest* request) + { + AZ_Assert(request, "PrepareRequest was provided a null request."); + + // Claim the requests so other entries can't claim it and make updates. + AZStd::visit([this, request](auto&& args) + { + using Command = AZStd::decay_t; + if constexpr (AZStd::is_same_v) { - case BlockCacheConfig::BlockSize::MaxTransfer: - blockSize = hardware.m_maxTransfer; - break; - case BlockCacheConfig::BlockSize::MemoryAlignment: - blockSize = hardware.m_maxPhysicalSectorSize; - break; - case BlockCacheConfig::BlockSize::SizeAlignment: - blockSize = hardware.m_maxLogicalSectorSize; - break; - default: - blockSize = m_blockSize; - break; + args.m_range = FileRange::CreateRangeForEntireFile(); + m_context->PushPreparedRequest(request); } - - u32 cacheSize = static_cast(m_cacheSizeMib * 1_mib); - if (blockSize > cacheSize) + else if constexpr (AZStd::is_same_v) { - AZ_Warning("Streamer", false, "Size (%u) for DedicatedCache isn't big enough to hold at least one cache blocks of size (%zu). " - "The cache size will be increased to fit one cache block.", cacheSize, blockSize); - cacheSize = aznumeric_caster(blockSize); - } - - auto stackEntry = AZStd::make_shared( - cacheSize, aznumeric_cast(blockSize), aznumeric_cast(hardware.m_maxPhysicalSectorSize), m_writeOnlyEpilog); - stackEntry->SetNext(AZStd::move(parent)); - return stackEntry; - } - - void DedicatedCacheConfig::Reflect(AZ::ReflectContext* context) - { - if (auto serializeContext = azrtti_cast(context); serializeContext != nullptr) - { - serializeContext->Class() - ->Version(1) - ->Field("CacheSizeMib", &DedicatedCacheConfig::m_cacheSizeMib) - ->Field("BlockSize", &DedicatedCacheConfig::m_blockSize) - ->Field("WriteOnlyEpilog", &DedicatedCacheConfig::m_writeOnlyEpilog); - } - } - - - - // - // DedicatedCache - // - - DedicatedCache::DedicatedCache(u64 cacheSize, u32 blockSize, u32 alignment, bool onlyEpilogWrites) - : StreamStackEntry("Dedicated cache") - , m_cacheSize(cacheSize) - , m_alignment(alignment) - , m_blockSize(blockSize) - , m_onlyEpilogWrites(onlyEpilogWrites) - { - } - - void DedicatedCache::SetNext(AZStd::shared_ptr next) - { - m_next = AZStd::move(next); - for (AZStd::unique_ptr& cache : m_cachedFileCaches) - { - cache->SetNext(m_next); - } - } - - void DedicatedCache::SetContext(StreamerContext& context) - { - StreamStackEntry::SetContext(context); - for (AZStd::unique_ptr& cache : m_cachedFileCaches) - { - cache->SetContext(context); - } - } - - void DedicatedCache::PrepareRequest(FileRequest* request) - { - AZ_Assert(request, "PrepareRequest was provided a null request."); - - // Claim the requests so other entries can't claim it and make updates. - AZStd::visit([this, request](auto&& args) - { - using Command = AZStd::decay_t; - if constexpr (AZStd::is_same_v) - { - args.m_range = FileRange::CreateRangeForEntireFile(); - m_context->PushPreparedRequest(request); - } - else if constexpr (AZStd::is_same_v) - { - args.m_range = FileRange::CreateRangeForEntireFile(); - m_context->PushPreparedRequest(request); - } - else - { - StreamStackEntry::PrepareRequest(request); - } - }, request->GetCommand()); - } - - void DedicatedCache::QueueRequest(FileRequest* request) - { - AZ_Assert(request, "QueueRequest was provided a null request."); - - AZStd::visit([this, request](auto&& args) - { - using Command = AZStd::decay_t; - if constexpr (AZStd::is_same_v) - { - ReadFile(request, args); - return; - } - else if constexpr (AZStd::is_same_v) - { - CreateDedicatedCache(request, args); - return; - } - else if constexpr (AZStd::is_same_v) - { - DestroyDedicatedCache(request, args); - return; - } - else - { - if constexpr (AZStd::is_same_v) - { - FlushCache(args.m_path); - } - else if constexpr (AZStd::is_same_v) - { - FlushEntireCache(); - } - StreamStackEntry::QueueRequest(request); - } - }, request->GetCommand()); - } - - bool DedicatedCache::ExecuteRequests() - { - bool hasProcessedRequest = false; - for (AZStd::unique_ptr& cache : m_cachedFileCaches) - { - hasProcessedRequest = cache->ExecuteRequests() || hasProcessedRequest; - } - return StreamStackEntry::ExecuteRequests() || hasProcessedRequest; - } - - void DedicatedCache::UpdateStatus(Status& status) const - { - // Available slots are not updated because the dedicated caches are often - // small and specific to a tiny subset of files that are loaded. It would therefore - // return a small number of slots that would needlessly hamper streaming as it doesn't - // apply to the majority of files. - - bool isIdle = true; - for (auto& cache : m_cachedFileCaches) - { - Status blockStatus; - cache->UpdateStatus(blockStatus); - isIdle = isIdle && blockStatus.m_isIdle; - } - status.m_isIdle = status.m_isIdle && isIdle; - StreamStackEntry::UpdateStatus(status); - } - - void DedicatedCache::UpdateCompletionEstimates(AZStd::chrono::system_clock::time_point now, - AZStd::vector& internalPending, StreamerContext::PreparedQueue::iterator pendingBegin, - StreamerContext::PreparedQueue::iterator pendingEnd) - { - for (auto& cache : m_cachedFileCaches) - { - cache->AddDelayedRequests(internalPending); - } - - StreamStackEntry::UpdateCompletionEstimates(now, internalPending, pendingBegin, pendingEnd); - - for (auto& cache : m_cachedFileCaches) - { - cache->UpdatePendingRequestEstimations(); - } - } - - void DedicatedCache::ReadFile(FileRequest* request, FileRequest::ReadData& data) - { - size_t index = FindCache(data.m_path, data.m_offset); - if (index == s_fileNotFound) - { - m_usagePercentageStat.PushSample(0.0); - if (m_next) - { - m_next->QueueRequest(request); - } + args.m_range = FileRange::CreateRangeForEntireFile(); + m_context->PushPreparedRequest(request); } else { - m_usagePercentageStat.PushSample(1.0); - BlockCache& cache = *m_cachedFileCaches[index]; - cache.QueueRequest(request); -#if AZ_STREAMER_ADD_EXTRA_PROFILING_INFO - m_overallHitRateStat.PushSample(cache.CalculateHitRatePercentage()); - m_overallCacheableRateStat.PushSample(cache.CalculateCacheableRatePercentage()); -#endif + StreamStackEntry::PrepareRequest(request); } - } + }, request->GetCommand()); + } - void DedicatedCache::FlushCache(const RequestPath& filePath) + void DedicatedCache::QueueRequest(FileRequest* request) + { + AZ_Assert(request, "QueueRequest was provided a null request."); + + AZStd::visit([this, request](auto&& args) { - size_t count = m_cachedFileNames.size(); - for (size_t i = 0; i < count; ++i) + using Command = AZStd::decay_t; + if constexpr (AZStd::is_same_v) { - if (m_cachedFileNames[i] == filePath) - { - // Flush the entire block cache as it's entirely dedicated to the found file. - m_cachedFileCaches[i]->FlushEntireCache(); - } + ReadFile(request, args); + return; } - } - - void DedicatedCache::FlushEntireCache() - { - for (AZStd::unique_ptr& cache : m_cachedFileCaches) + else if constexpr (AZStd::is_same_v) { - cache->FlushEntireCache(); + CreateDedicatedCache(request, args); + return; } - } - - void DedicatedCache::CollectStatistics(AZStd::vector& statistics) const - { - statistics.push_back(Statistic::CreatePercentage(m_name, "Reads from dedicated cache", m_usagePercentageStat.GetAverage())); -#if AZ_STREAMER_ADD_EXTRA_PROFILING_INFO - statistics.push_back(Statistic::CreatePercentage(m_name, "Overall cacheable rate", m_overallCacheableRateStat.GetAverage())); - statistics.push_back(Statistic::CreatePercentage(m_name, "Overall hit rate", m_overallHitRateStat.GetAverage())); -#endif - statistics.push_back(Statistic::CreateInteger(m_name, "Num dedicated caches", aznumeric_caster(m_cachedFileNames.size()))); - StreamStackEntry::CollectStatistics(statistics); - } - - void DedicatedCache::CreateDedicatedCache(FileRequest* request, FileRequest::CreateDedicatedCacheData& data) - { - size_t index = FindCache(data.m_path, data.m_range); - if (index == s_fileNotFound) + else if constexpr (AZStd::is_same_v) { - index = m_cachedFileCaches.size(); - m_cachedFileNames.push_back(data.m_path); - m_cachedFileRanges.push_back(data.m_range); - m_cachedFileCaches.push_back(AZStd::make_unique(m_cacheSize, m_blockSize, m_alignment, m_onlyEpilogWrites)); - m_cachedFileCaches[index]->SetNext(m_next); - m_cachedFileCaches[index]->SetContext(*m_context); - m_cachedFileRefCounts.push_back(1); + DestroyDedicatedCache(request, args); + return; } else { - ++m_cachedFileRefCounts[index]; + if constexpr (AZStd::is_same_v) + { + FlushCache(args.m_path); + } + else if constexpr (AZStd::is_same_v) + { + FlushEntireCache(); + } + StreamStackEntry::QueueRequest(request); } - request->SetStatus(IStreamerTypes::RequestStatus::Completed); - m_context->MarkRequestAsCompleted(request); + }, request->GetCommand()); + } + + bool DedicatedCache::ExecuteRequests() + { + bool hasProcessedRequest = false; + for (AZStd::unique_ptr& cache : m_cachedFileCaches) + { + hasProcessedRequest = cache->ExecuteRequests() || hasProcessedRequest; + } + return StreamStackEntry::ExecuteRequests() || hasProcessedRequest; + } + + void DedicatedCache::UpdateStatus(Status& status) const + { + // Available slots are not updated because the dedicated caches are often + // small and specific to a tiny subset of files that are loaded. It would therefore + // return a small number of slots that would needlessly hamper streaming as it doesn't + // apply to the majority of files. + + bool isIdle = true; + for (auto& cache : m_cachedFileCaches) + { + Status blockStatus; + cache->UpdateStatus(blockStatus); + isIdle = isIdle && blockStatus.m_isIdle; + } + status.m_isIdle = status.m_isIdle && isIdle; + StreamStackEntry::UpdateStatus(status); + } + + void DedicatedCache::UpdateCompletionEstimates(AZStd::chrono::system_clock::time_point now, + AZStd::vector& internalPending, StreamerContext::PreparedQueue::iterator pendingBegin, + StreamerContext::PreparedQueue::iterator pendingEnd) + { + for (auto& cache : m_cachedFileCaches) + { + cache->AddDelayedRequests(internalPending); } - void DedicatedCache::DestroyDedicatedCache(FileRequest* request, FileRequest::DestroyDedicatedCacheData& data) - { - size_t index = FindCache(data.m_path, data.m_range); - if (index != s_fileNotFound) - { - if (m_cachedFileRefCounts[index] > 0) - { - --m_cachedFileRefCounts[index]; - if (m_cachedFileRefCounts[index] == 0) - { - m_cachedFileNames.erase(m_cachedFileNames.begin() + index); - m_cachedFileRanges.erase(m_cachedFileRanges.begin() + index); - m_cachedFileCaches.erase(m_cachedFileCaches.begin() + index); - m_cachedFileRefCounts.erase(m_cachedFileRefCounts.begin() + index); - } - request->SetStatus(IStreamerTypes::RequestStatus::Completed); - m_context->MarkRequestAsCompleted(request); - return; - } - } - request->SetStatus(IStreamerTypes::RequestStatus::Failed); - m_context->MarkRequestAsCompleted(request); - } + StreamStackEntry::UpdateCompletionEstimates(now, internalPending, pendingBegin, pendingEnd); - size_t DedicatedCache::FindCache(const RequestPath& filename, FileRange range) + for (auto& cache : m_cachedFileCaches) { - size_t count = m_cachedFileNames.size(); - for (size_t i = 0; i < count; ++i) - { - if (m_cachedFileNames[i] == filename && m_cachedFileRanges[i] == range) - { - return i; - } - } - return s_fileNotFound; + cache->UpdatePendingRequestEstimations(); } + } - size_t DedicatedCache::FindCache(const RequestPath& filename, u64 offset) + void DedicatedCache::ReadFile(FileRequest* request, FileRequest::ReadData& data) + { + size_t index = FindCache(data.m_path, data.m_offset); + if (index == s_fileNotFound) { - size_t count = m_cachedFileNames.size(); - for (size_t i = 0; i < count; ++i) + m_usagePercentageStat.PushSample(0.0); + if (m_next) { - if (m_cachedFileNames[i] == filename && m_cachedFileRanges[i].IsInRange(offset)) - { - return i; - } + m_next->QueueRequest(request); } - return s_fileNotFound; } - } // namespace IO -} // namespace AZ + else + { + m_usagePercentageStat.PushSample(1.0); + BlockCache& cache = *m_cachedFileCaches[index]; + cache.QueueRequest(request); +#if AZ_STREAMER_ADD_EXTRA_PROFILING_INFO + m_overallHitRateStat.PushSample(cache.CalculateHitRatePercentage()); + m_overallCacheableRateStat.PushSample(cache.CalculateCacheableRatePercentage()); +#endif + } + } + + void DedicatedCache::FlushCache(const RequestPath& filePath) + { + size_t count = m_cachedFileNames.size(); + for (size_t i = 0; i < count; ++i) + { + if (m_cachedFileNames[i] == filePath) + { + // Flush the entire block cache as it's entirely dedicated to the found file. + m_cachedFileCaches[i]->FlushEntireCache(); + } + } + } + + void DedicatedCache::FlushEntireCache() + { + for (AZStd::unique_ptr& cache : m_cachedFileCaches) + { + cache->FlushEntireCache(); + } + } + + void DedicatedCache::CollectStatistics(AZStd::vector& statistics) const + { + statistics.push_back(Statistic::CreatePercentage(m_name, "Reads from dedicated cache", m_usagePercentageStat.GetAverage())); +#if AZ_STREAMER_ADD_EXTRA_PROFILING_INFO + statistics.push_back(Statistic::CreatePercentage(m_name, "Overall cacheable rate", m_overallCacheableRateStat.GetAverage())); + statistics.push_back(Statistic::CreatePercentage(m_name, "Overall hit rate", m_overallHitRateStat.GetAverage())); +#endif + statistics.push_back(Statistic::CreateInteger(m_name, "Num dedicated caches", aznumeric_caster(m_cachedFileNames.size()))); + StreamStackEntry::CollectStatistics(statistics); + } + + void DedicatedCache::CreateDedicatedCache(FileRequest* request, FileRequest::CreateDedicatedCacheData& data) + { + size_t index = FindCache(data.m_path, data.m_range); + if (index == s_fileNotFound) + { + index = m_cachedFileCaches.size(); + m_cachedFileNames.push_back(data.m_path); + m_cachedFileRanges.push_back(data.m_range); + m_cachedFileCaches.push_back(AZStd::make_unique(m_cacheSize, m_blockSize, m_alignment, m_onlyEpilogWrites)); + m_cachedFileCaches[index]->SetNext(m_next); + m_cachedFileCaches[index]->SetContext(*m_context); + m_cachedFileRefCounts.push_back(1); + } + else + { + ++m_cachedFileRefCounts[index]; + } + request->SetStatus(IStreamerTypes::RequestStatus::Completed); + m_context->MarkRequestAsCompleted(request); + } + + void DedicatedCache::DestroyDedicatedCache(FileRequest* request, FileRequest::DestroyDedicatedCacheData& data) + { + size_t index = FindCache(data.m_path, data.m_range); + if (index != s_fileNotFound) + { + if (m_cachedFileRefCounts[index] > 0) + { + --m_cachedFileRefCounts[index]; + if (m_cachedFileRefCounts[index] == 0) + { + m_cachedFileNames.erase(m_cachedFileNames.begin() + index); + m_cachedFileRanges.erase(m_cachedFileRanges.begin() + index); + m_cachedFileCaches.erase(m_cachedFileCaches.begin() + index); + m_cachedFileRefCounts.erase(m_cachedFileRefCounts.begin() + index); + } + request->SetStatus(IStreamerTypes::RequestStatus::Completed); + m_context->MarkRequestAsCompleted(request); + return; + } + } + request->SetStatus(IStreamerTypes::RequestStatus::Failed); + m_context->MarkRequestAsCompleted(request); + } + + size_t DedicatedCache::FindCache(const RequestPath& filename, FileRange range) + { + size_t count = m_cachedFileNames.size(); + for (size_t i = 0; i < count; ++i) + { + if (m_cachedFileNames[i] == filename && m_cachedFileRanges[i] == range) + { + return i; + } + } + return s_fileNotFound; + } + + size_t DedicatedCache::FindCache(const RequestPath& filename, u64 offset) + { + size_t count = m_cachedFileNames.size(); + for (size_t i = 0; i < count; ++i) + { + if (m_cachedFileNames[i] == filename && m_cachedFileRanges[i].IsInRange(offset)) + { + return i; + } + } + return s_fileNotFound; + } +} // namespace AZ::IO diff --git a/Code/Framework/AzCore/AzCore/IO/Streamer/DedicatedCache.h b/Code/Framework/AzCore/AzCore/IO/Streamer/DedicatedCache.h index 84ec091eaa..0ef2d879d3 100644 --- a/Code/Framework/AzCore/AzCore/IO/Streamer/DedicatedCache.h +++ b/Code/Framework/AzCore/AzCore/IO/Streamer/DedicatedCache.h @@ -18,77 +18,74 @@ #include #include -namespace AZ +namespace AZ::IO { - namespace IO + struct DedicatedCacheConfig final : + public IStreamerStackConfig { - struct DedicatedCacheConfig final : - public IStreamerStackConfig - { - AZ_RTTI(AZ::IO::DedicatedCacheConfig, "{DF0F6029-02B0-464C-9846-524654335BCC}", IStreamerStackConfig); - AZ_CLASS_ALLOCATOR(DedicatedCacheConfig, AZ::SystemAllocator, 0); + AZ_RTTI(AZ::IO::DedicatedCacheConfig, "{DF0F6029-02B0-464C-9846-524654335BCC}", IStreamerStackConfig); + AZ_CLASS_ALLOCATOR(DedicatedCacheConfig, AZ::SystemAllocator, 0); - ~DedicatedCacheConfig() override = default; - AZStd::shared_ptr AddStreamStackEntry( - const HardwareInformation& hardware, AZStd::shared_ptr parent) override; - static void Reflect(AZ::ReflectContext* context); + ~DedicatedCacheConfig() override = default; + AZStd::shared_ptr AddStreamStackEntry( + const HardwareInformation& hardware, AZStd::shared_ptr parent) override; + static void Reflect(AZ::ReflectContext* context); - //! The size of the individual blocks inside the cache. - BlockCacheConfig::BlockSize m_blockSize{ BlockCacheConfig::BlockSize::MemoryAlignment }; - //! The overall size of the cache in megabytes. - u32 m_cacheSizeMib{ 8 }; - //! If true, only the epilog is written otherwise the prolog and epilog are written. In either case both prolog and epilog are read. - //! For uses of the cache that read mostly sequentially this flag should be set to true. If reads are more random than it's better - //! to set this flag to false. - bool m_writeOnlyEpilog{ true }; - }; + //! The size of the individual blocks inside the cache. + BlockCacheConfig::BlockSize m_blockSize{ BlockCacheConfig::BlockSize::MemoryAlignment }; + //! The overall size of the cache in megabytes. + u32 m_cacheSizeMib{ 8 }; + //! If true, only the epilog is written otherwise the prolog and epilog are written. In either case both prolog and epilog are read. + //! For uses of the cache that read mostly sequentially this flag should be set to true. If reads are more random than it's better + //! to set this flag to false. + bool m_writeOnlyEpilog{ true }; + }; - class DedicatedCache - : public StreamStackEntry - { - public: - DedicatedCache(u64 cacheSize, u32 blockSize, u32 alignment, bool onlyEpilogWrites); - - void SetNext(AZStd::shared_ptr next) override; - void SetContext(StreamerContext& context) override; + class DedicatedCache + : public StreamStackEntry + { + public: + DedicatedCache(u64 cacheSize, u32 blockSize, u32 alignment, bool onlyEpilogWrites); - void PrepareRequest(FileRequest* request) override; - void QueueRequest(FileRequest* request) override; - bool ExecuteRequests() override; + void SetNext(AZStd::shared_ptr next) override; + void SetContext(StreamerContext& context) override; - void UpdateStatus(Status& status) const override; + void PrepareRequest(FileRequest* request) override; + void QueueRequest(FileRequest* request) override; + bool ExecuteRequests() override; - void UpdateCompletionEstimates(AZStd::chrono::system_clock::time_point now, AZStd::vector& internalPending, - StreamerContext::PreparedQueue::iterator pendingBegin, StreamerContext::PreparedQueue::iterator pendingEnd) override; + void UpdateStatus(Status& status) const override; - void CollectStatistics(AZStd::vector& statistics) const override; + void UpdateCompletionEstimates(AZStd::chrono::system_clock::time_point now, AZStd::vector& internalPending, + StreamerContext::PreparedQueue::iterator pendingBegin, StreamerContext::PreparedQueue::iterator pendingEnd) override; - private: - void CreateDedicatedCache(FileRequest* request, FileRequest::CreateDedicatedCacheData& data); - void DestroyDedicatedCache(FileRequest* request, FileRequest::DestroyDedicatedCacheData& data); + void CollectStatistics(AZStd::vector& statistics) const override; - void ReadFile(FileRequest* request, FileRequest::ReadData& data); - size_t FindCache(const RequestPath& filename, FileRange range); - size_t FindCache(const RequestPath& filename, u64 offset); + private: + void CreateDedicatedCache(FileRequest* request, FileRequest::CreateDedicatedCacheData& data); + void DestroyDedicatedCache(FileRequest* request, FileRequest::DestroyDedicatedCacheData& data); - void FlushCache(const RequestPath& filePath); - void FlushEntireCache(); + void ReadFile(FileRequest* request, FileRequest::ReadData& data); + size_t FindCache(const RequestPath& filename, FileRange range); + size_t FindCache(const RequestPath& filename, u64 offset); - AZStd::vector m_cachedFileNames; - AZStd::vector m_cachedFileRanges; - AZStd::vector> m_cachedFileCaches; - AZStd::vector m_cachedFileRefCounts; + void FlushCache(const RequestPath& filePath); + void FlushEntireCache(); - AZ::Statistics::RunningStatistic m_usagePercentageStat; + AZStd::vector m_cachedFileNames; + AZStd::vector m_cachedFileRanges; + AZStd::vector> m_cachedFileCaches; + AZStd::vector m_cachedFileRefCounts; + + AZ::Statistics::RunningStatistic m_usagePercentageStat; #if AZ_STREAMER_ADD_EXTRA_PROFILING_INFO - AZ::Statistics::RunningStatistic m_overallHitRateStat; - AZ::Statistics::RunningStatistic m_overallCacheableRateStat; + AZ::Statistics::RunningStatistic m_overallHitRateStat; + AZ::Statistics::RunningStatistic m_overallCacheableRateStat; #endif - u64 m_cacheSize; - u32 m_alignment; - u32 m_blockSize; - bool m_onlyEpilogWrites; - }; - } // namespace IO -} // namespace AZ + u64 m_cacheSize; + u32 m_alignment; + u32 m_blockSize; + bool m_onlyEpilogWrites; + }; +} // namespace AZ::IO diff --git a/Code/Framework/AzCore/AzCore/IO/Streamer/FileRange.cpp b/Code/Framework/AzCore/AzCore/IO/Streamer/FileRange.cpp index df4f77b722..3a568d3f47 100644 --- a/Code/Framework/AzCore/AzCore/IO/Streamer/FileRange.cpp +++ b/Code/Framework/AzCore/AzCore/IO/Streamer/FileRange.cpp @@ -8,104 +8,101 @@ #include -namespace AZ +namespace AZ::IO { - namespace IO + FileRange FileRange::CreateRange(u64 offset, u64 size) { - FileRange FileRange::CreateRange(u64 offset, u64 size) - { - FileRange result; - result.m_hasOffsetEndSet = true; - result.m_isEntireFile = false; - result.m_offsetBegin = offset; - result.m_offsetEnd = offset + size; - return result; - } + FileRange result; + result.m_hasOffsetEndSet = true; + result.m_isEntireFile = false; + result.m_offsetBegin = offset; + result.m_offsetEnd = offset + size; + return result; + } - FileRange FileRange::CreateRangeForEntireFile() - { - FileRange result; - result.m_hasOffsetEndSet = false; - result.m_isEntireFile = true; - result.m_offsetBegin = 0; - result.m_offsetEnd = (static_cast(1) << 63) - 1; - return result; - } + FileRange FileRange::CreateRangeForEntireFile() + { + FileRange result; + result.m_hasOffsetEndSet = false; + result.m_isEntireFile = true; + result.m_offsetBegin = 0; + result.m_offsetEnd = (static_cast(1) << 63) - 1; + return result; + } - FileRange FileRange::CreateRangeForEntireFile(u64 fileSize) - { - FileRange result; - result.m_hasOffsetEndSet = true; - result.m_isEntireFile = true; - result.m_offsetBegin = 0; - result.m_offsetEnd = fileSize; - return result; - } + FileRange FileRange::CreateRangeForEntireFile(u64 fileSize) + { + FileRange result; + result.m_hasOffsetEndSet = true; + result.m_isEntireFile = true; + result.m_offsetBegin = 0; + result.m_offsetEnd = fileSize; + return result; + } - FileRange::FileRange() - : m_isEntireFile(false) - , m_offsetBegin(0) - , m_hasOffsetEndSet(false) - , m_offsetEnd(0) - { - } + FileRange::FileRange() + : m_isEntireFile(false) + , m_offsetBegin(0) + , m_hasOffsetEndSet(false) + , m_offsetEnd(0) + { + } - bool FileRange::operator==(const FileRange& rhs) const + bool FileRange::operator==(const FileRange& rhs) const + { + if (m_isEntireFile) { - if (m_isEntireFile) - { - return rhs.m_isEntireFile && m_offsetBegin == rhs.m_offsetBegin; - } - else - { - return m_offsetBegin == rhs.m_offsetBegin && m_offsetEnd == rhs.m_offsetEnd; - } + return rhs.m_isEntireFile && m_offsetBegin == rhs.m_offsetBegin; } + else + { + return m_offsetBegin == rhs.m_offsetBegin && m_offsetEnd == rhs.m_offsetEnd; + } + } - bool FileRange::operator!=(const FileRange& rhs) const + bool FileRange::operator!=(const FileRange& rhs) const + { + if (m_isEntireFile) { - if (m_isEntireFile) - { - return !rhs.m_isEntireFile || m_offsetBegin != rhs.m_offsetBegin; - } - else - { - return m_offsetBegin != rhs.m_offsetBegin || m_offsetEnd != rhs.m_offsetEnd; - } + return !rhs.m_isEntireFile || m_offsetBegin != rhs.m_offsetBegin; } + else + { + return m_offsetBegin != rhs.m_offsetBegin || m_offsetEnd != rhs.m_offsetEnd; + } + } - bool FileRange::IsEntireFile() const - { - return m_isEntireFile != 0; - } + bool FileRange::IsEntireFile() const + { + return m_isEntireFile != 0; + } - bool FileRange::IsSizeKnown() const - { - // m_hasOffsetEndSet being zero has the special meaning that the file size has not - // specifically been set yet. - return m_hasOffsetEndSet != 0; - } + bool FileRange::IsSizeKnown() const + { + // m_hasOffsetEndSet being zero has the special meaning that the file size has not + // specifically been set yet. + return m_hasOffsetEndSet != 0; + } - bool FileRange::IsInRange(u64 offset) const - { - return m_offsetBegin <= offset && offset < m_offsetEnd; - } + bool FileRange::IsInRange(u64 offset) const + { + return m_offsetBegin <= offset && offset < m_offsetEnd; + } - u64 FileRange::GetOffset() const - { - return m_offsetBegin; - } + u64 FileRange::GetOffset() const + { + return m_offsetBegin; + } - u64 FileRange::GetSize() const - { - AZ_Assert(m_hasOffsetEndSet, "Calling GetSize on a FileRange that doesn't have a size specified."); - return m_offsetEnd - m_offsetBegin; - } + u64 FileRange::GetSize() const + { + AZ_Assert(m_hasOffsetEndSet, "Calling GetSize on a FileRange that doesn't have a size specified."); + return m_offsetEnd - m_offsetBegin; + } - u64 FileRange::GetEndPoint() const - { - AZ_Assert(m_hasOffsetEndSet, "Calling GetEndPoint on a FileRange that doesn't have an end offset specified."); - return m_offsetEnd; - } - } // namespace IO -} // namesapce AZ + u64 FileRange::GetEndPoint() const + { + AZ_Assert(m_hasOffsetEndSet, "Calling GetEndPoint on a FileRange that doesn't have an end offset specified."); + return m_offsetEnd; + } +} // namespace AZ::IO diff --git a/Code/Framework/AzCore/AzCore/IO/Streamer/FileRequest.cpp b/Code/Framework/AzCore/AzCore/IO/Streamer/FileRequest.cpp index 7b9cde76d3..fc05b77b36 100644 --- a/Code/Framework/AzCore/AzCore/IO/Streamer/FileRequest.cpp +++ b/Code/Framework/AzCore/AzCore/IO/Streamer/FileRequest.cpp @@ -12,469 +12,466 @@ #include #include -namespace AZ +namespace AZ::IO { - namespace IO + // + // Command structures. + // + + FileRequest::ExternalRequestData::ExternalRequestData(FileRequestPtr&& request) + : m_request(AZStd::move(request)) + {} + + FileRequest::RequestPathStoreData::RequestPathStoreData(RequestPath path) + : m_path(AZStd::move(path)) + {} + + FileRequest::ReadRequestData::ReadRequestData(RequestPath path, void* output, u64 outputSize, u64 offset, u64 size, + AZStd::chrono::system_clock::time_point deadline, IStreamerTypes::Priority priority) + : m_path(AZStd::move(path)) + , m_allocator(nullptr) + , m_deadline(deadline) + , m_output(output) + , m_outputSize(outputSize) + , m_offset(offset) + , m_size(size) + , m_priority(priority) + , m_memoryType(IStreamerTypes::MemoryType::ReadWrite) // Only generic memory can be assigned externally. + {} + + FileRequest::ReadRequestData::ReadRequestData(RequestPath path, IStreamerTypes::RequestMemoryAllocator* allocator, + u64 offset, u64 size, AZStd::chrono::system_clock::time_point deadline, IStreamerTypes::Priority priority) + : m_path(AZStd::move(path)) + , m_allocator(allocator) + , m_deadline(deadline) + , m_output(nullptr) + , m_outputSize(0) + , m_offset(offset) + , m_size(size) + , m_priority(priority) + , m_memoryType(IStreamerTypes::MemoryType::ReadWrite) // Only generic memory can be assigned externally. + {} + + FileRequest::ReadRequestData::~ReadRequestData() { - // - // Command structures. - // - - FileRequest::ExternalRequestData::ExternalRequestData(FileRequestPtr&& request) - : m_request(AZStd::move(request)) - {} - - FileRequest::RequestPathStoreData::RequestPathStoreData(RequestPath path) - : m_path(AZStd::move(path)) - {} - - FileRequest::ReadRequestData::ReadRequestData(RequestPath path, void* output, u64 outputSize, u64 offset, u64 size, - AZStd::chrono::system_clock::time_point deadline, IStreamerTypes::Priority priority) - : m_path(AZStd::move(path)) - , m_allocator(nullptr) - , m_deadline(deadline) - , m_output(output) - , m_outputSize(outputSize) - , m_offset(offset) - , m_size(size) - , m_priority(priority) - , m_memoryType(IStreamerTypes::MemoryType::ReadWrite) // Only generic memory can be assigned externally. - {} - - FileRequest::ReadRequestData::ReadRequestData(RequestPath path, IStreamerTypes::RequestMemoryAllocator* allocator, - u64 offset, u64 size, AZStd::chrono::system_clock::time_point deadline, IStreamerTypes::Priority priority) - : m_path(AZStd::move(path)) - , m_allocator(allocator) - , m_deadline(deadline) - , m_output(nullptr) - , m_outputSize(0) - , m_offset(offset) - , m_size(size) - , m_priority(priority) - , m_memoryType(IStreamerTypes::MemoryType::ReadWrite) // Only generic memory can be assigned externally. - {} - - FileRequest::ReadRequestData::~ReadRequestData() + if (m_allocator != nullptr) { - if (m_allocator != nullptr) + if (m_output != nullptr) { - if (m_output != nullptr) - { - m_allocator->Release(m_output); - } - m_allocator->UnlockAllocator(); + m_allocator->Release(m_output); } + m_allocator->UnlockAllocator(); } + } - FileRequest::ReadData::ReadData(void* output, u64 outputSize, const RequestPath& path, u64 offset, u64 size, bool sharedRead) - : m_output(output) - , m_outputSize(outputSize) - , m_path(path) - , m_offset(offset) - , m_size(size) - , m_sharedRead(sharedRead) - {} + FileRequest::ReadData::ReadData(void* output, u64 outputSize, const RequestPath& path, u64 offset, u64 size, bool sharedRead) + : m_output(output) + , m_outputSize(outputSize) + , m_path(path) + , m_offset(offset) + , m_size(size) + , m_sharedRead(sharedRead) + {} - FileRequest::CompressedReadData::CompressedReadData(CompressionInfo&& compressionInfo, void* output, u64 readOffset, u64 readSize) - : m_compressionInfo(AZStd::move(compressionInfo)) - , m_output(output) - , m_readOffset(readOffset) - , m_readSize(readSize) - {} + FileRequest::CompressedReadData::CompressedReadData(CompressionInfo&& compressionInfo, void* output, u64 readOffset, u64 readSize) + : m_compressionInfo(AZStd::move(compressionInfo)) + , m_output(output) + , m_readOffset(readOffset) + , m_readSize(readSize) + {} - FileRequest::FileExistsCheckData::FileExistsCheckData(const RequestPath& path) - : m_path(path) - {} + FileRequest::FileExistsCheckData::FileExistsCheckData(const RequestPath& path) + : m_path(path) + {} - FileRequest::FileMetaDataRetrievalData::FileMetaDataRetrievalData(const RequestPath& path) - : m_path(path) - {} + FileRequest::FileMetaDataRetrievalData::FileMetaDataRetrievalData(const RequestPath& path) + : m_path(path) + {} - FileRequest::CancelData::CancelData(FileRequestPtr target) - : m_target(AZStd::move(target)) - {} + FileRequest::CancelData::CancelData(FileRequestPtr target) + : m_target(AZStd::move(target)) + {} - FileRequest::FlushData::FlushData(RequestPath path) - : m_path(AZStd::move(path)) - {} + FileRequest::FlushData::FlushData(RequestPath path) + : m_path(AZStd::move(path)) + {} - FileRequest::RescheduleData::RescheduleData(FileRequestPtr target, AZStd::chrono::system_clock::time_point newDeadline, - IStreamerTypes::Priority newPriority) - : m_target(AZStd::move(target)) - , m_newDeadline(newDeadline) - , m_newPriority(newPriority) - {} + FileRequest::RescheduleData::RescheduleData(FileRequestPtr target, AZStd::chrono::system_clock::time_point newDeadline, + IStreamerTypes::Priority newPriority) + : m_target(AZStd::move(target)) + , m_newDeadline(newDeadline) + , m_newPriority(newPriority) + {} - FileRequest::CreateDedicatedCacheData::CreateDedicatedCacheData(RequestPath path, const FileRange& range) - : m_path(AZStd::move(path)) - , m_range(range) - {} + FileRequest::CreateDedicatedCacheData::CreateDedicatedCacheData(RequestPath path, const FileRange& range) + : m_path(AZStd::move(path)) + , m_range(range) + {} - FileRequest::DestroyDedicatedCacheData::DestroyDedicatedCacheData(RequestPath path, const FileRange& range) - : m_path(AZStd::move(path)) - , m_range(range) - {} + FileRequest::DestroyDedicatedCacheData::DestroyDedicatedCacheData(RequestPath path, const FileRange& range) + : m_path(AZStd::move(path)) + , m_range(range) + {} - FileRequest::ReportData::ReportData(ReportType reportType) - : m_reportType(reportType) - {} + FileRequest::ReportData::ReportData(ReportType reportType) + : m_reportType(reportType) + {} - FileRequest::CustomData::CustomData(AZStd::any data, bool failWhenUnhandled) - : m_data(AZStd::move(data)) - , m_failWhenUnhandled(failWhenUnhandled) - {} + FileRequest::CustomData::CustomData(AZStd::any data, bool failWhenUnhandled) + : m_data(AZStd::move(data)) + , m_failWhenUnhandled(failWhenUnhandled) + {} - // - // FileRequest - // + // + // FileRequest + // - FileRequest::FileRequest(Usage usage) - : m_usage(usage) + FileRequest::FileRequest(Usage usage) + : m_usage(usage) + { + Reset(); + } + + FileRequest::~FileRequest() + { + Reset(); + } + + void FileRequest::CreateRequestLink(FileRequestPtr&& request) + { + AZ_Assert(AZStd::holds_alternative(m_command), + "Attempting to set FileRequest to 'RequestLink', but another task was already assigned."); + m_parent = request->m_request.m_parent; + request->m_request.m_parent = this; + m_dependencies++; + m_command.emplace(AZStd::move(request)); + } + + void FileRequest::CreateRequestPathStore(FileRequest* parent, RequestPath path) + { + AZ_Assert(AZStd::holds_alternative(m_command), + "Attempting to set FileRequest to 'CreateRequestPathStore', but another task was already assigned."); + m_command.emplace(AZStd::move(path)); + SetOptionalParent(parent); + } + + void FileRequest::CreateReadRequest(RequestPath path, void* output, u64 outputSize, u64 offset, u64 size, + AZStd::chrono::system_clock::time_point deadline, IStreamerTypes::Priority priority) + { + AZ_Assert(AZStd::holds_alternative(m_command), + "Attempting to set FileRequest to 'ReadRequest', but another task was already assigned."); + m_command.emplace(AZStd::move(path), output, outputSize, offset, size, deadline, priority); + } + + void FileRequest::CreateReadRequest(RequestPath path, IStreamerTypes::RequestMemoryAllocator* allocator, u64 offset, u64 size, + AZStd::chrono::system_clock::time_point deadline, IStreamerTypes::Priority priority) + { + AZ_Assert(AZStd::holds_alternative(m_command), + "Attempting to set FileRequest to 'ReadRequest', but another task was already assigned."); + m_command.emplace(AZStd::move(path), allocator, offset, size, deadline, priority); + } + + void FileRequest::CreateRead(FileRequest* parent, void* output, u64 outputSize, const RequestPath& path, + u64 offset, u64 size, bool sharedRead) + { + AZ_Assert(AZStd::holds_alternative(m_command), + "Attempting to set FileRequest to 'Read', but another task was already assigned."); + m_command.emplace(output, outputSize, AZStd::move(path), offset, size, sharedRead); + SetOptionalParent(parent); + } + + void FileRequest::CreateCompressedRead(FileRequest* parent, const CompressionInfo& compressionInfo, + void* output, u64 readOffset, u64 readSize) + { + CreateCompressedRead(parent, CompressionInfo(compressionInfo), output, readOffset, readSize); + } + + void FileRequest::CreateCompressedRead(FileRequest* parent, CompressionInfo&& compressionInfo, + void* output, u64 readOffset, u64 readSize) + { + AZ_Assert(AZStd::holds_alternative(m_command), + "Attempting to set FileRequest to 'CompressedRead', but another task was already assigned."); + m_command.emplace(AZStd::move(compressionInfo), output, readOffset, readSize); + SetOptionalParent(parent); + } + + void FileRequest::CreateWait(FileRequest* parent) + { + AZ_Assert(AZStd::holds_alternative(m_command), + "Attempting to set FileRequest to 'Wait', but another task was already assigned."); + m_command.emplace(); + SetOptionalParent(parent); + } + + void FileRequest::CreateFileExistsCheck(const RequestPath& path) + { + AZ_Assert(AZStd::holds_alternative(m_command), + "Attempting to set FileRequest to 'FileExistsCheck', but another task was already assigned."); + m_command.emplace(path); + } + + void FileRequest::CreateFileMetaDataRetrieval(const RequestPath& path) + { + AZ_Assert(AZStd::holds_alternative(m_command), + "Attempting to set FileRequest to 'FileMetaDataRetrieval', but another task was already assigned."); + m_command.emplace(path); + } + + void FileRequest::CreateCancel(FileRequestPtr target) + { + AZ_Assert(AZStd::holds_alternative(m_command), + "Attempting to set FileRequest to 'Cancel', but another task was already assigned."); + m_command.emplace(AZStd::move(target)); + } + + void FileRequest::CreateReschedule(FileRequestPtr target, AZStd::chrono::system_clock::time_point newDeadline, + IStreamerTypes::Priority newPriority) + { + AZ_Assert(AZStd::holds_alternative(m_command), + "Attempting to set FileRequest to 'Reschedule', but another task was already assigned."); + m_command.emplace(AZStd::move(target), newDeadline, newPriority); + } + + void FileRequest::CreateFlush(RequestPath path) + { + AZ_Assert(AZStd::holds_alternative(m_command), + "Attempting to set FileRequest to 'Flush', but another task was already assigned."); + m_command.emplace(AZStd::move(path)); + } + + void FileRequest::CreateFlushAll() + { + AZ_Assert(AZStd::holds_alternative(m_command), + "Attempting to set FileRequest to 'FlushAll', but another task was already assigned."); + m_command.emplace(); + } + + void FileRequest::CreateDedicatedCacheCreation(RequestPath path, const FileRange& range, FileRequest* parent) + { + AZ_Assert(AZStd::holds_alternative(m_command), + "Attempting to set FileRequest to 'CreateDedicateCache', but another task was already assigned."); + m_command.emplace(AZStd::move(path), range); + SetOptionalParent(parent); + } + + void FileRequest::CreateDedicatedCacheDestruction(RequestPath path, const FileRange& range, FileRequest* parent) + { + AZ_Assert(AZStd::holds_alternative(m_command), + "Attempting to set FileRequest to 'DestroyDedicateCache', but another task was already assigned."); + m_command.emplace(AZStd::move(path), range); + SetOptionalParent(parent); + } + + void FileRequest::CreateReport(ReportData::ReportType reportType) + { + AZ_Assert(AZStd::holds_alternative(m_command), + "Attempting to set FileRequest to 'Report', but another task was already assigned."); + m_command.emplace(reportType); + } + + void FileRequest::CreateCustom(AZStd::any data, bool failWhenUnhandled, FileRequest* parent) + { + AZ_Assert(AZStd::holds_alternative(m_command), + "Attempting to set FileRequest to 'Custom', but another task was already assigned."); + m_command.emplace(AZStd::move(data), failWhenUnhandled); + SetOptionalParent(parent); + } + + void FileRequest::SetCompletionCallback(OnCompletionCallback callback) + { + m_onCompletion = AZStd::move(callback); + } + + FileRequest::CommandVariant& FileRequest::GetCommand() + { + return m_command; + } + + const FileRequest::CommandVariant& FileRequest::GetCommand() const + { + return m_command; + } + + IStreamerTypes::RequestStatus FileRequest::GetStatus() const + { + return m_status; + } + + void FileRequest::SetStatus(IStreamerTypes::RequestStatus newStatus) + { + IStreamerTypes::RequestStatus currentStatus = m_status; + switch (newStatus) { - Reset(); - } - - FileRequest::~FileRequest() - { - Reset(); - } - - void FileRequest::CreateRequestLink(FileRequestPtr&& request) - { - AZ_Assert(AZStd::holds_alternative(m_command), - "Attempting to set FileRequest to 'RequestLink', but another task was already assigned."); - m_parent = request->m_request.m_parent; - request->m_request.m_parent = this; - m_dependencies++; - m_command.emplace(AZStd::move(request)); - } - - void FileRequest::CreateRequestPathStore(FileRequest* parent, RequestPath path) - { - AZ_Assert(AZStd::holds_alternative(m_command), - "Attempting to set FileRequest to 'CreateRequestPathStore', but another task was already assigned."); - m_command.emplace(AZStd::move(path)); - SetOptionalParent(parent); - } - - void FileRequest::CreateReadRequest(RequestPath path, void* output, u64 outputSize, u64 offset, u64 size, - AZStd::chrono::system_clock::time_point deadline, IStreamerTypes::Priority priority) - { - AZ_Assert(AZStd::holds_alternative(m_command), - "Attempting to set FileRequest to 'ReadRequest', but another task was already assigned."); - m_command.emplace(AZStd::move(path), output, outputSize, offset, size, deadline, priority); - } - - void FileRequest::CreateReadRequest(RequestPath path, IStreamerTypes::RequestMemoryAllocator* allocator, u64 offset, u64 size, - AZStd::chrono::system_clock::time_point deadline, IStreamerTypes::Priority priority) - { - AZ_Assert(AZStd::holds_alternative(m_command), - "Attempting to set FileRequest to 'ReadRequest', but another task was already assigned."); - m_command.emplace(AZStd::move(path), allocator, offset, size, deadline, priority); - } - - void FileRequest::CreateRead(FileRequest* parent, void* output, u64 outputSize, const RequestPath& path, - u64 offset, u64 size, bool sharedRead) - { - AZ_Assert(AZStd::holds_alternative(m_command), - "Attempting to set FileRequest to 'Read', but another task was already assigned."); - m_command.emplace(output, outputSize, AZStd::move(path), offset, size, sharedRead); - SetOptionalParent(parent); - } - - void FileRequest::CreateCompressedRead(FileRequest* parent, const CompressionInfo& compressionInfo, - void* output, u64 readOffset, u64 readSize) - { - CreateCompressedRead(parent, CompressionInfo(compressionInfo), output, readOffset, readSize); - } - - void FileRequest::CreateCompressedRead(FileRequest* parent, CompressionInfo&& compressionInfo, - void* output, u64 readOffset, u64 readSize) - { - AZ_Assert(AZStd::holds_alternative(m_command), - "Attempting to set FileRequest to 'CompressedRead', but another task was already assigned."); - m_command.emplace(AZStd::move(compressionInfo), output, readOffset, readSize); - SetOptionalParent(parent); - } - - void FileRequest::CreateWait(FileRequest* parent) - { - AZ_Assert(AZStd::holds_alternative(m_command), - "Attempting to set FileRequest to 'Wait', but another task was already assigned."); - m_command.emplace(); - SetOptionalParent(parent); - } - - void FileRequest::CreateFileExistsCheck(const RequestPath& path) - { - AZ_Assert(AZStd::holds_alternative(m_command), - "Attempting to set FileRequest to 'FileExistsCheck', but another task was already assigned."); - m_command.emplace(path); - } - - void FileRequest::CreateFileMetaDataRetrieval(const RequestPath& path) - { - AZ_Assert(AZStd::holds_alternative(m_command), - "Attempting to set FileRequest to 'FileMetaDataRetrieval', but another task was already assigned."); - m_command.emplace(path); - } - - void FileRequest::CreateCancel(FileRequestPtr target) - { - AZ_Assert(AZStd::holds_alternative(m_command), - "Attempting to set FileRequest to 'Cancel', but another task was already assigned."); - m_command.emplace(AZStd::move(target)); - } - - void FileRequest::CreateReschedule(FileRequestPtr target, AZStd::chrono::system_clock::time_point newDeadline, - IStreamerTypes::Priority newPriority) - { - AZ_Assert(AZStd::holds_alternative(m_command), - "Attempting to set FileRequest to 'Reschedule', but another task was already assigned."); - m_command.emplace(AZStd::move(target), newDeadline, newPriority); - } - - void FileRequest::CreateFlush(RequestPath path) - { - AZ_Assert(AZStd::holds_alternative(m_command), - "Attempting to set FileRequest to 'Flush', but another task was already assigned."); - m_command.emplace(AZStd::move(path)); - } - - void FileRequest::CreateFlushAll() - { - AZ_Assert(AZStd::holds_alternative(m_command), - "Attempting to set FileRequest to 'FlushAll', but another task was already assigned."); - m_command.emplace(); - } - - void FileRequest::CreateDedicatedCacheCreation(RequestPath path, const FileRange& range, FileRequest* parent) - { - AZ_Assert(AZStd::holds_alternative(m_command), - "Attempting to set FileRequest to 'CreateDedicateCache', but another task was already assigned."); - m_command.emplace(AZStd::move(path), range); - SetOptionalParent(parent); - } - - void FileRequest::CreateDedicatedCacheDestruction(RequestPath path, const FileRange& range, FileRequest* parent) - { - AZ_Assert(AZStd::holds_alternative(m_command), - "Attempting to set FileRequest to 'DestroyDedicateCache', but another task was already assigned."); - m_command.emplace(AZStd::move(path), range); - SetOptionalParent(parent); - } - - void FileRequest::CreateReport(ReportData::ReportType reportType) - { - AZ_Assert(AZStd::holds_alternative(m_command), - "Attempting to set FileRequest to 'Report', but another task was already assigned."); - m_command.emplace(reportType); - } - - void FileRequest::CreateCustom(AZStd::any data, bool failWhenUnhandled, FileRequest* parent) - { - AZ_Assert(AZStd::holds_alternative(m_command), - "Attempting to set FileRequest to 'Custom', but another task was already assigned."); - m_command.emplace(AZStd::move(data), failWhenUnhandled); - SetOptionalParent(parent); - } - - void FileRequest::SetCompletionCallback(OnCompletionCallback callback) - { - m_onCompletion = AZStd::move(callback); - } - - FileRequest::CommandVariant& FileRequest::GetCommand() - { - return m_command; - } - - const FileRequest::CommandVariant& FileRequest::GetCommand() const - { - return m_command; - } - - IStreamerTypes::RequestStatus FileRequest::GetStatus() const - { - return m_status; - } - - void FileRequest::SetStatus(IStreamerTypes::RequestStatus newStatus) - { - IStreamerTypes::RequestStatus currentStatus = m_status; - switch (newStatus) + case IStreamerTypes::RequestStatus::Pending: + [[fallthrough]]; + case IStreamerTypes::RequestStatus::Queued: + [[fallthrough]]; + case IStreamerTypes::RequestStatus::Processing: + if (currentStatus == IStreamerTypes::RequestStatus::Failed || + currentStatus == IStreamerTypes::RequestStatus::Canceled || + currentStatus == IStreamerTypes::RequestStatus::Completed) { - case IStreamerTypes::RequestStatus::Pending: - [[fallthrough]]; - case IStreamerTypes::RequestStatus::Queued: - [[fallthrough]]; - case IStreamerTypes::RequestStatus::Processing: - if (currentStatus == IStreamerTypes::RequestStatus::Failed || - currentStatus == IStreamerTypes::RequestStatus::Canceled || - currentStatus == IStreamerTypes::RequestStatus::Completed) - { - return; - } - break; - case IStreamerTypes::RequestStatus::Completed: - if (currentStatus == IStreamerTypes::RequestStatus::Failed || currentStatus == IStreamerTypes::RequestStatus::Canceled) - { - return; - } - break; - case IStreamerTypes::RequestStatus::Canceled: - if (currentStatus == IStreamerTypes::RequestStatus::Failed || currentStatus == IStreamerTypes::RequestStatus::Completed) - { - return; - } - break; - case IStreamerTypes::RequestStatus::Failed: - [[fallthrough]]; - default: - break; + return; } - m_status = newStatus; - } - - FileRequest* FileRequest::GetParent() - { - return m_parent; - } - - const FileRequest* FileRequest::GetParent() const - { - return m_parent; - } - - size_t FileRequest::GetNumDependencies() const - { - return m_dependencies; - } - - bool FileRequest::FailsWhenUnhandled() const - { - return AZStd::visit([](auto&& args) + break; + case IStreamerTypes::RequestStatus::Completed: + if (currentStatus == IStreamerTypes::RequestStatus::Failed || currentStatus == IStreamerTypes::RequestStatus::Canceled) { - using Command = AZStd::decay_t; - if constexpr (AZStd::is_same_v) - { - AZ_Assert(false, - "Request does not contain a valid command. It may have been reset already or was never assigned a command."); - return true; - } - else if constexpr (AZStd::is_same_v) - { - return args.m_failWhenUnhandled; - } - else - { - return Command::s_failWhenUnhandled; - } - }, m_command); - } - - void FileRequest::Reset() - { - m_command = AZStd::monostate{}; - m_onCompletion = &OnCompletionPlaceholder; - m_estimatedCompletion = AZStd::chrono::system_clock::time_point(); - m_parent = nullptr; - m_status = IStreamerTypes::RequestStatus::Pending; - m_dependencies = 0; - } - - void FileRequest::SetOptionalParent(FileRequest* parent) - { - if (parent) - { - m_parent = parent; - AZ_Assert(parent->m_dependencies < std::numeric_limitsm_dependencies)>::max(), - "A file request dependency was added, but the parent can't have any more dependencies."); - ++parent->m_dependencies; + return; } - } - - bool FileRequest::WorksOn(FileRequestPtr& request) const - { - const FileRequest* current = this; - while (current) + break; + case IStreamerTypes::RequestStatus::Canceled: + if (currentStatus == IStreamerTypes::RequestStatus::Failed || currentStatus == IStreamerTypes::RequestStatus::Completed) { - auto* link = AZStd::get_if(¤t->m_command); - if (!link) - { - current = current->m_parent; - } - else - { - return link->m_request == request; - } + return; } - return false; + break; + case IStreamerTypes::RequestStatus::Failed: + [[fallthrough]]; + default: + break; } + m_status = newStatus; + } - size_t FileRequest::GetPendingId() const - { - return m_pendingId; - } + FileRequest* FileRequest::GetParent() + { + return m_parent; + } - void FileRequest::SetEstimatedCompletion(AZStd::chrono::system_clock::time_point time) + const FileRequest* FileRequest::GetParent() const + { + return m_parent; + } + + size_t FileRequest::GetNumDependencies() const + { + return m_dependencies; + } + + bool FileRequest::FailsWhenUnhandled() const + { + return AZStd::visit([](auto&& args) { - FileRequest* current = this; - do + using Command = AZStd::decay_t; + if constexpr (AZStd::is_same_v) + { + AZ_Assert(false, + "Request does not contain a valid command. It may have been reset already or was never assigned a command."); + return true; + } + else if constexpr (AZStd::is_same_v) + { + return args.m_failWhenUnhandled; + } + else + { + return Command::s_failWhenUnhandled; + } + }, m_command); + } + + void FileRequest::Reset() + { + m_command = AZStd::monostate{}; + m_onCompletion = &OnCompletionPlaceholder; + m_estimatedCompletion = AZStd::chrono::system_clock::time_point(); + m_parent = nullptr; + m_status = IStreamerTypes::RequestStatus::Pending; + m_dependencies = 0; + } + + void FileRequest::SetOptionalParent(FileRequest* parent) + { + if (parent) + { + m_parent = parent; + AZ_Assert(parent->m_dependencies < std::numeric_limitsm_dependencies)>::max(), + "A file request dependency was added, but the parent can't have any more dependencies."); + ++parent->m_dependencies; + } + } + + bool FileRequest::WorksOn(FileRequestPtr& request) const + { + const FileRequest* current = this; + while (current) + { + auto* link = AZStd::get_if(¤t->m_command); + if (!link) { - current->m_estimatedCompletion = time; current = current->m_parent; - } while (current); - } - - AZStd::chrono::system_clock::time_point FileRequest::GetEstimatedCompletion() const - { - return m_estimatedCompletion; - } - - // - // ExternalFileRequest - // - - ExternalFileRequest::ExternalFileRequest(StreamerContext* owner) - : m_request(FileRequest::Usage::External) - , m_owner(owner) - { - } - - void ExternalFileRequest::add_ref() - { - m_refCount++; - } - - void ExternalFileRequest::release() - { - if (--m_refCount == 0) + } + else { - AZ_Assert(m_owner, "No owning context set for the file request."); - m_owner->RecycleRequest(this); + return link->m_request == request; } } + return false; + } - bool operator==(const FileRequestHandle& lhs, const FileRequestPtr& rhs) - { - return lhs.m_request == &rhs->m_request; - } + size_t FileRequest::GetPendingId() const + { + return m_pendingId; + } - bool operator==(const FileRequestPtr& lhs, const FileRequestHandle& rhs) + void FileRequest::SetEstimatedCompletion(AZStd::chrono::system_clock::time_point time) + { + FileRequest* current = this; + do { - return rhs == lhs; - } + current->m_estimatedCompletion = time; + current = current->m_parent; + } while (current); + } - bool operator!=(const FileRequestHandle& lhs, const FileRequestPtr& rhs) - { - return !(lhs == rhs); - } + AZStd::chrono::system_clock::time_point FileRequest::GetEstimatedCompletion() const + { + return m_estimatedCompletion; + } - bool operator!=(const FileRequestPtr& lhs, const FileRequestHandle& rhs) + // + // ExternalFileRequest + // + + ExternalFileRequest::ExternalFileRequest(StreamerContext* owner) + : m_request(FileRequest::Usage::External) + , m_owner(owner) + { + } + + void ExternalFileRequest::add_ref() + { + m_refCount++; + } + + void ExternalFileRequest::release() + { + if (--m_refCount == 0) { - return !(rhs == lhs); + AZ_Assert(m_owner, "No owning context set for the file request."); + m_owner->RecycleRequest(this); } - } // namespace IO -} // namespace AZ + } + + bool operator==(const FileRequestHandle& lhs, const FileRequestPtr& rhs) + { + return lhs.m_request == &rhs->m_request; + } + + bool operator==(const FileRequestPtr& lhs, const FileRequestHandle& rhs) + { + return rhs == lhs; + } + + bool operator!=(const FileRequestHandle& lhs, const FileRequestPtr& rhs) + { + return !(lhs == rhs); + } + + bool operator!=(const FileRequestPtr& lhs, const FileRequestHandle& rhs) + { + return !(rhs == lhs); + } +} // namespace AZ::IO diff --git a/Code/Framework/AzCore/AzCore/IO/Streamer/FileRequest.h b/Code/Framework/AzCore/AzCore/IO/Streamer/FileRequest.h index 387884d781..dd4dad2387 100644 --- a/Code/Framework/AzCore/AzCore/IO/Streamer/FileRequest.h +++ b/Code/Framework/AzCore/AzCore/IO/Streamer/FileRequest.h @@ -21,403 +21,401 @@ #include #include -namespace AZ +namespace AZ::IO { - namespace IO + class StreamStackEntry; + class ExternalFileRequest; + + using FileRequestPtr = AZStd::intrusive_ptr; + + class FileRequest final { - class StreamStackEntry; - class ExternalFileRequest; + public: + inline constexpr static AZStd::chrono::system_clock::time_point s_noDeadlineTime = AZStd::chrono::system_clock::time_point::max(); - using FileRequestPtr = AZStd::intrusive_ptr; - - class FileRequest final + friend class StreamerContext; + friend class ExternalFileRequest; + + //! Stores a reference to the external request so it stays alive while the request is being processed. + //! This is needed because Streamer supports fire-and-forget requests since completion can be handled by + //! registering a callback. + struct ExternalRequestData { - public: - inline constexpr static AZStd::chrono::system_clock::time_point s_noDeadlineTime = AZStd::chrono::system_clock::time_point::max(); + inline constexpr static IStreamerTypes::Priority s_orderPriority = IStreamerTypes::s_priorityMedium; + inline constexpr static bool s_failWhenUnhandled = true; - friend class StreamerContext; - friend class ExternalFileRequest; + explicit ExternalRequestData(FileRequestPtr&& request); - //! Stores a reference to the external request so it stays alive while the request is being processed. - //! This is needed because Streamer supports fire-and-forget requests since completion can be handled by - //! registering a callback. - struct ExternalRequestData - { - inline constexpr static IStreamerTypes::Priority s_orderPriority = IStreamerTypes::s_priorityMedium; - inline constexpr static bool s_failWhenUnhandled = true; + FileRequestPtr m_request; //!< The request that was send to Streamer. + }; - explicit ExternalRequestData(FileRequestPtr&& request); - - FileRequestPtr m_request; //!< The request that was send to Streamer. - }; + //! Stores an instance of a RequestPath. To reduce copying instances of a RequestPath functions that + //! need a path take them by reference to the original request. In some cases a path originates from + //! within in the stack and temporary storage is needed. This struct allows for that temporary storage + //! so it can be safely referenced later. + struct RequestPathStoreData + { + inline constexpr static IStreamerTypes::Priority s_orderPriority = IStreamerTypes::s_priorityMedium; + inline constexpr static bool s_failWhenUnhandled = true; - //! Stores an instance of a RequestPath. To reduce copying instances of a RequestPath functions that - //! need a path take them by reference to the original request. In some cases a path originates from - //! within in the stack and temporary storage is needed. This struct allows for that temporary storage - //! so it can be safely referenced later. - struct RequestPathStoreData - { - inline constexpr static IStreamerTypes::Priority s_orderPriority = IStreamerTypes::s_priorityMedium; - inline constexpr static bool s_failWhenUnhandled = true; + explicit RequestPathStoreData(RequestPath path); - explicit RequestPathStoreData(RequestPath path); + RequestPath m_path; + }; - RequestPath m_path; - }; + //! Request to read data. This is an untranslated request and holds a relative path. The Scheduler + //! will translate this to the appropriate ReadData or CompressedReadData. + struct ReadRequestData + { + inline constexpr static IStreamerTypes::Priority s_orderPriority = IStreamerTypes::s_priorityMedium; + inline constexpr static bool s_failWhenUnhandled = true; - //! Request to read data. This is an untranslated request and holds a relative path. The Scheduler - //! will translate this to the appropriate ReadData or CompressedReadData. - struct ReadRequestData - { - inline constexpr static IStreamerTypes::Priority s_orderPriority = IStreamerTypes::s_priorityMedium; - inline constexpr static bool s_failWhenUnhandled = true; - - ReadRequestData(RequestPath path, void* output, u64 outputSize, u64 offset, u64 size, - AZStd::chrono::system_clock::time_point deadline, IStreamerTypes::Priority priority); - ReadRequestData(RequestPath path, IStreamerTypes::RequestMemoryAllocator* allocator, u64 offset, u64 size, - AZStd::chrono::system_clock::time_point deadline, IStreamerTypes::Priority priority); - ~ReadRequestData(); - - RequestPath m_path; //!< Relative path to the target file. - IStreamerTypes::RequestMemoryAllocator* m_allocator; //!< Allocator used to manage the memory for this request. - AZStd::chrono::system_clock::time_point m_deadline; //!< Time by which this request should have been completed. - void* m_output; //!< The memory address assigned (during processing) to store the read data to. - u64 m_outputSize; //!< The memory size of the addressed used to store the read data. - u64 m_offset; //!< The offset in bytes into the file. - u64 m_size; //!< The number of bytes to read from the file. - IStreamerTypes::Priority m_priority; //!< Priority used for ordering requests. This is used when requests have the same deadline. - IStreamerTypes::MemoryType m_memoryType; //!< The type of memory provided by the allocator if used. - }; - - //! Request to read data. This is a translated request and holds an absolute path and has been - //! resolved to the archive file if needed. - struct ReadData - { - inline constexpr static IStreamerTypes::Priority s_orderPriority = IStreamerTypes::s_priorityMedium; - inline constexpr static bool s_failWhenUnhandled = true; - - ReadData(void* output, u64 outputSize, const RequestPath& path, u64 offset, u64 size, bool sharedRead); - - const RequestPath& m_path; //!< The path to the file that contains the requested data. - void* m_output; //!< Target output to write the read data to. - u64 m_outputSize; //!< Size of memory m_output points to. This needs to be at least as big as m_size, but can be bigger. - u64 m_offset; //!< The offset in bytes into the file. - u64 m_size; //!< The number of bytes to read from the file. - bool m_sharedRead; //!< True if other code will be reading from the file or the stack entry can exclusively lock. - }; - - //! Request to read and decompress data. - struct CompressedReadData - { - inline constexpr static IStreamerTypes::Priority s_orderPriority = IStreamerTypes::s_priorityMedium; - inline constexpr static bool s_failWhenUnhandled = true; - - CompressedReadData(CompressionInfo&& compressionInfo, void* output, u64 readOffset, u64 readSize); - - CompressionInfo m_compressionInfo; - void* m_output; //!< Target output to write the read data to. - u64 m_readOffset; //!< The offset into the decompressed to start copying from. - u64 m_readSize; //!< Number of bytes to read from the decompressed file. - }; - - //! Holds the progress of an operation chain until this request is explicitly completed. - struct WaitData - { - inline constexpr static IStreamerTypes::Priority s_orderPriority = IStreamerTypes::s_priorityMedium; - inline constexpr static bool s_failWhenUnhandled = true; - }; - - //! Checks to see if any node in the stack can find a file at the provided path. - struct FileExistsCheckData - { - inline constexpr static IStreamerTypes::Priority s_orderPriority = IStreamerTypes::s_priorityHigh; - inline constexpr static bool s_failWhenUnhandled = false; - - explicit FileExistsCheckData(const RequestPath& path); - - const RequestPath& m_path; - bool m_found{ false }; - }; - - //! Searches for a file in the stack and retrieves the meta data. This may be slower than a file exists - //! check. - struct FileMetaDataRetrievalData - { - inline constexpr static IStreamerTypes::Priority s_orderPriority = IStreamerTypes::s_priorityHigh; - inline constexpr static bool s_failWhenUnhandled = false; - - explicit FileMetaDataRetrievalData(const RequestPath& path); - - const RequestPath& m_path; - u64 m_fileSize{ 0 }; - bool m_found{ false }; - }; - - //! Cancels a request in the stream stack, if possible. - struct CancelData - { - inline constexpr static IStreamerTypes::Priority s_orderPriority = IStreamerTypes::s_priorityHighest; - inline constexpr static bool s_failWhenUnhandled = false; - - explicit CancelData(FileRequestPtr target); - - FileRequestPtr m_target; //!< The request that will be canceled. - }; - - //! Updates the priority and deadline of a request that has not been queued yet. - struct RescheduleData - { - inline constexpr static IStreamerTypes::Priority s_orderPriority = IStreamerTypes::s_priorityHigh; - inline constexpr static bool s_failWhenUnhandled = false; - - RescheduleData(FileRequestPtr target, AZStd::chrono::system_clock::time_point newDeadline, IStreamerTypes::Priority newPriority); - - FileRequestPtr m_target; //!< The request that will be rescheduled. - AZStd::chrono::system_clock::time_point m_newDeadline; //!< The new deadline for the request. - IStreamerTypes::Priority m_newPriority; //!< The new priority for the request. - }; - - //! Flushes all references to the provided file in the streaming stack. - struct FlushData - { - inline constexpr static IStreamerTypes::Priority s_orderPriority = IStreamerTypes::s_priorityHigh; - inline constexpr static bool s_failWhenUnhandled = false; - - explicit FlushData(RequestPath path); - - RequestPath m_path; - }; - - //! Flushes all caches in the streaming stack. - struct FlushAllData - { - inline constexpr static IStreamerTypes::Priority s_orderPriority = IStreamerTypes::s_priorityHigh; - inline constexpr static bool s_failWhenUnhandled = false; - }; - - //! Creates a cache dedicated to a single file. This is best used for files where blocks are read from - //! periodically such as audio banks of video files. - struct CreateDedicatedCacheData - { - inline constexpr static IStreamerTypes::Priority s_orderPriority = IStreamerTypes::s_priorityHigh; - inline constexpr static bool s_failWhenUnhandled = false; - - CreateDedicatedCacheData(RequestPath path, const FileRange& range); - - RequestPath m_path; - FileRange m_range; - }; - - //! Destroys a cache dedicated to a single file that was previously created by CreateDedicatedCache - struct DestroyDedicatedCacheData - { - inline constexpr static IStreamerTypes::Priority s_orderPriority = IStreamerTypes::s_priorityHigh; - inline constexpr static bool s_failWhenUnhandled = false; - - DestroyDedicatedCacheData(RequestPath path, const FileRange& range); - - RequestPath m_path; - FileRange m_range; - }; - - struct ReportData - { - inline constexpr static IStreamerTypes::Priority s_orderPriority = IStreamerTypes::s_priorityLow; - inline constexpr static bool s_failWhenUnhandled = false; - - enum class ReportType - { - FileLocks - }; - - explicit ReportData(ReportType reportType); - - ReportType m_reportType; - }; - - //! Data for a custom command. This can be used by nodes added extensions that need data that can't be stored - //! in the already provided data. - struct CustomData - { - inline constexpr static IStreamerTypes::Priority s_orderPriority = IStreamerTypes::s_priorityMedium; - - CustomData(AZStd::any data, bool failWhenUnhandled); - - AZStd::any m_data; //!< The data for the custom request. - bool m_failWhenUnhandled; //!< Whether or not the request is marked as failed or success when no node process it. - }; - - using CommandVariant = AZStd::variant; - using OnCompletionCallback = AZStd::function; - - AZ_CLASS_ALLOCATOR(FileRequest, SystemAllocator, 0); - - enum class Usage : u8 - { - Internal, - External - }; - - void CreateRequestLink(FileRequestPtr&& request); - void CreateRequestPathStore(FileRequest* parent, RequestPath path); - void CreateReadRequest(RequestPath path, void* output, u64 outputSize, u64 offset, u64 size, + ReadRequestData(RequestPath path, void* output, u64 outputSize, u64 offset, u64 size, AZStd::chrono::system_clock::time_point deadline, IStreamerTypes::Priority priority); - void CreateReadRequest(RequestPath path, IStreamerTypes::RequestMemoryAllocator* allocator, u64 offset, u64 size, + ReadRequestData(RequestPath path, IStreamerTypes::RequestMemoryAllocator* allocator, u64 offset, u64 size, AZStd::chrono::system_clock::time_point deadline, IStreamerTypes::Priority priority); - void CreateRead(FileRequest* parent, void* output, u64 outputSize, const RequestPath& path, u64 offset, u64 size, bool sharedRead = false); - void CreateCompressedRead(FileRequest* parent, const CompressionInfo& compressionInfo, void* output, - u64 readOffset, u64 readSize); - void CreateCompressedRead(FileRequest* parent, CompressionInfo&& compressionInfo, void* output, - u64 readOffset, u64 readSize); - void CreateWait(FileRequest* parent); - void CreateFileExistsCheck(const RequestPath& path); - void CreateFileMetaDataRetrieval(const RequestPath& path); - void CreateCancel(FileRequestPtr target); - void CreateReschedule(FileRequestPtr target, AZStd::chrono::system_clock::time_point newDeadline, IStreamerTypes::Priority newPriority); - void CreateFlush(RequestPath path); - void CreateFlushAll(); - void CreateDedicatedCacheCreation(RequestPath path, const FileRange& range = {}, FileRequest* parent = nullptr); - void CreateDedicatedCacheDestruction(RequestPath path, const FileRange& range = {}, FileRequest* parent = nullptr); - void CreateReport(ReportData::ReportType reportType); - void CreateCustom(AZStd::any data, bool failWhenUnhandled = true, FileRequest* parent = nullptr); + ~ReadRequestData(); - void SetCompletionCallback(OnCompletionCallback callback); - - CommandVariant& GetCommand(); - const CommandVariant& GetCommand() const; - - IStreamerTypes::RequestStatus GetStatus() const; - void SetStatus(IStreamerTypes::RequestStatus newStatus); - FileRequest* GetParent(); - const FileRequest* GetParent() const; - size_t GetNumDependencies() const; - static constexpr size_t GetMaxNumDependencies(); - //! Whether or not this request should fail if no node in the chain has picked up the request. - bool FailsWhenUnhandled() const; - - //! Checks the chain of request for the provided command. Returns the command if found, otherwise null. - template T* GetCommandFromChain(); - //! Checks the chain of request for the provided command. Returns the command if found, otherwise null. - template const T* GetCommandFromChain() const; - - //! Determines if this request is contributing to the external request. - bool WorksOn(FileRequestPtr& request) const; - - //! Returns the id that's assigned to the request when it was added to the pending queue. - //! The id will always increment so a smaller id means it was originally queued earlier. - size_t GetPendingId() const; - - //! Set the estimated completion time for this request and it's immediate parent. The general approach - //! to getting the final estimation is to bubble up the estimation, with ever entry in the stack adding - //! it's own additional delay. - void SetEstimatedCompletion(AZStd::chrono::system_clock::time_point time); - AZStd::chrono::system_clock::time_point GetEstimatedCompletion() const; - - private: - explicit FileRequest(Usage usage = Usage::Internal); - ~FileRequest(); - - void Reset(); - void SetOptionalParent(FileRequest* parent); - - inline static void OnCompletionPlaceholder(const FileRequest& /*request*/) {} - - //! Command and parameters for the request. - CommandVariant m_command; - - //! Status of the request. - AZStd::atomic m_status{ IStreamerTypes::RequestStatus::Pending }; - - //! Called once the request has completed. This will always be called from the Streamer thread - //! and thread safety is the responsibility of called function. When assigning a lambda avoid - //! capturing a FileRequestPtr by value as this will cause a circular reference which causes - //! the FileRequestPtr to never be released and causes a memory leak. This call will - //! block the main Streamer thread until it returns so callbacks should be kept short. If - //! a longer running task is needed consider using a job to do the work. - OnCompletionCallback m_onCompletion; - - //! Estimated time this request will complete. This is an estimation and depends on many - //! factors which can cause it to change drastically from moment to moment. - AZStd::chrono::system_clock::time_point m_estimatedCompletion; - - //! The file request that has a dependency on this one. This can be null if there are no - //! other request depending on this one to complete. - FileRequest* m_parent{ nullptr }; - - //! Id assigned when the request is added to the pending queue. - size_t m_pendingId{ 0 }; - - //! The number of dependent file request that need to complete before this one is done. - u16 m_dependencies{ 0 }; - - //! Internal request. If this is true the request is created inside the streaming stack and never - //! leaves it. If true it will automatically be maintained by the scheduler, if false than it's - //! up to the owner to recycle this request. - Usage m_usage{ Usage::Internal }; - - //! Whether or not this request is currently in a recycle bin. This allows detecting double deletes. - bool m_inRecycleBin{ false }; + RequestPath m_path; //!< Relative path to the target file. + IStreamerTypes::RequestMemoryAllocator* m_allocator; //!< Allocator used to manage the memory for this request. + AZStd::chrono::system_clock::time_point m_deadline; //!< Time by which this request should have been completed. + void* m_output; //!< The memory address assigned (during processing) to store the read data to. + u64 m_outputSize; //!< The memory size of the addressed used to store the read data. + u64 m_offset; //!< The offset in bytes into the file. + u64 m_size; //!< The number of bytes to read from the file. + IStreamerTypes::Priority m_priority; //!< Priority used for ordering requests. This is used when requests have the same deadline. + IStreamerTypes::MemoryType m_memoryType; //!< The type of memory provided by the allocator if used. }; - class StreamerContext; - class FileRequestHandle; - - //! ExternalFileRequest is a wrapper around the FileRequest so it's safe to use outside the - //! Streaming Stack. The main differences are that ExternalFileRequest is used in a thread-safe - //! context and it doesn't get automatically destroyed upon completion. Instead intrusive_ptr is - //! used to handle clean up. - class ExternalFileRequest final + //! Request to read data. This is a translated request and holds an absolute path and has been + //! resolved to the archive file if needed. + struct ReadData { - friend struct AZStd::IntrusivePtrCountPolicy; - friend class FileRequestHandle; - friend class FileRequest; - friend class Streamer; - friend class StreamerContext; - friend class Scheduler; - friend class Device; - friend bool operator==(const FileRequestHandle& lhs, const FileRequestPtr& rhs); + inline constexpr static IStreamerTypes::Priority s_orderPriority = IStreamerTypes::s_priorityMedium; + inline constexpr static bool s_failWhenUnhandled = true; - public: - AZ_CLASS_ALLOCATOR(ExternalFileRequest, SystemAllocator, 0); + ReadData(void* output, u64 outputSize, const RequestPath& path, u64 offset, u64 size, bool sharedRead); - explicit ExternalFileRequest(StreamerContext* owner); - - private: - void add_ref(); - void release(); - - FileRequest m_request; - AZStd::atomic_uint64_t m_refCount{ 0 }; - StreamerContext* m_owner; + const RequestPath& m_path; //!< The path to the file that contains the requested data. + void* m_output; //!< Target output to write the read data to. + u64 m_outputSize; //!< Size of memory m_output points to. This needs to be at least as big as m_size, but can be bigger. + u64 m_offset; //!< The offset in bytes into the file. + u64 m_size; //!< The number of bytes to read from the file. + bool m_sharedRead; //!< True if other code will be reading from the file or the stack entry can exclusively lock. }; - class FileRequestHandle + //! Request to read and decompress data. + struct CompressedReadData { - public: - friend class Streamer; - friend bool operator==(const FileRequestHandle& lhs, const FileRequestPtr& rhs); + inline constexpr static IStreamerTypes::Priority s_orderPriority = IStreamerTypes::s_priorityMedium; + inline constexpr static bool s_failWhenUnhandled = true; - // Intentional cast operator. - FileRequestHandle(FileRequest& request) - : m_request(&request) - {} + CompressedReadData(CompressionInfo&& compressionInfo, void* output, u64 readOffset, u64 readSize); - // Intentional cast operator. - FileRequestHandle(const FileRequestPtr& request) - : m_request(request ? &request->m_request : nullptr) - {} - - private: - FileRequest* m_request; + CompressionInfo m_compressionInfo; + void* m_output; //!< Target output to write the read data to. + u64 m_readOffset; //!< The offset into the decompressed to start copying from. + u64 m_readSize; //!< Number of bytes to read from the decompressed file. }; - bool operator==(const FileRequestHandle& lhs, const FileRequestPtr& rhs); - bool operator==(const FileRequestPtr& lhs, const FileRequestHandle& rhs); - bool operator!=(const FileRequestHandle& lhs, const FileRequestPtr& rhs); - bool operator!=(const FileRequestPtr& lhs, const FileRequestHandle& rhs); - } // namespace IO -} // namespace AZ + //! Holds the progress of an operation chain until this request is explicitly completed. + struct WaitData + { + inline constexpr static IStreamerTypes::Priority s_orderPriority = IStreamerTypes::s_priorityMedium; + inline constexpr static bool s_failWhenUnhandled = true; + }; + + //! Checks to see if any node in the stack can find a file at the provided path. + struct FileExistsCheckData + { + inline constexpr static IStreamerTypes::Priority s_orderPriority = IStreamerTypes::s_priorityHigh; + inline constexpr static bool s_failWhenUnhandled = false; + + explicit FileExistsCheckData(const RequestPath& path); + + const RequestPath& m_path; + bool m_found{ false }; + }; + + //! Searches for a file in the stack and retrieves the meta data. This may be slower than a file exists + //! check. + struct FileMetaDataRetrievalData + { + inline constexpr static IStreamerTypes::Priority s_orderPriority = IStreamerTypes::s_priorityHigh; + inline constexpr static bool s_failWhenUnhandled = false; + + explicit FileMetaDataRetrievalData(const RequestPath& path); + + const RequestPath& m_path; + u64 m_fileSize{ 0 }; + bool m_found{ false }; + }; + + //! Cancels a request in the stream stack, if possible. + struct CancelData + { + inline constexpr static IStreamerTypes::Priority s_orderPriority = IStreamerTypes::s_priorityHighest; + inline constexpr static bool s_failWhenUnhandled = false; + + explicit CancelData(FileRequestPtr target); + + FileRequestPtr m_target; //!< The request that will be canceled. + }; + + //! Updates the priority and deadline of a request that has not been queued yet. + struct RescheduleData + { + inline constexpr static IStreamerTypes::Priority s_orderPriority = IStreamerTypes::s_priorityHigh; + inline constexpr static bool s_failWhenUnhandled = false; + + RescheduleData(FileRequestPtr target, AZStd::chrono::system_clock::time_point newDeadline, IStreamerTypes::Priority newPriority); + + FileRequestPtr m_target; //!< The request that will be rescheduled. + AZStd::chrono::system_clock::time_point m_newDeadline; //!< The new deadline for the request. + IStreamerTypes::Priority m_newPriority; //!< The new priority for the request. + }; + + //! Flushes all references to the provided file in the streaming stack. + struct FlushData + { + inline constexpr static IStreamerTypes::Priority s_orderPriority = IStreamerTypes::s_priorityHigh; + inline constexpr static bool s_failWhenUnhandled = false; + + explicit FlushData(RequestPath path); + + RequestPath m_path; + }; + + //! Flushes all caches in the streaming stack. + struct FlushAllData + { + inline constexpr static IStreamerTypes::Priority s_orderPriority = IStreamerTypes::s_priorityHigh; + inline constexpr static bool s_failWhenUnhandled = false; + }; + + //! Creates a cache dedicated to a single file. This is best used for files where blocks are read from + //! periodically such as audio banks of video files. + struct CreateDedicatedCacheData + { + inline constexpr static IStreamerTypes::Priority s_orderPriority = IStreamerTypes::s_priorityHigh; + inline constexpr static bool s_failWhenUnhandled = false; + + CreateDedicatedCacheData(RequestPath path, const FileRange& range); + + RequestPath m_path; + FileRange m_range; + }; + + //! Destroys a cache dedicated to a single file that was previously created by CreateDedicatedCache + struct DestroyDedicatedCacheData + { + inline constexpr static IStreamerTypes::Priority s_orderPriority = IStreamerTypes::s_priorityHigh; + inline constexpr static bool s_failWhenUnhandled = false; + + DestroyDedicatedCacheData(RequestPath path, const FileRange& range); + + RequestPath m_path; + FileRange m_range; + }; + + struct ReportData + { + inline constexpr static IStreamerTypes::Priority s_orderPriority = IStreamerTypes::s_priorityLow; + inline constexpr static bool s_failWhenUnhandled = false; + + enum class ReportType + { + FileLocks + }; + + explicit ReportData(ReportType reportType); + + ReportType m_reportType; + }; + + //! Data for a custom command. This can be used by nodes added extensions that need data that can't be stored + //! in the already provided data. + struct CustomData + { + inline constexpr static IStreamerTypes::Priority s_orderPriority = IStreamerTypes::s_priorityMedium; + + CustomData(AZStd::any data, bool failWhenUnhandled); + + AZStd::any m_data; //!< The data for the custom request. + bool m_failWhenUnhandled; //!< Whether or not the request is marked as failed or success when no node process it. + }; + + using CommandVariant = AZStd::variant; + using OnCompletionCallback = AZStd::function; + + AZ_CLASS_ALLOCATOR(FileRequest, SystemAllocator, 0); + + enum class Usage : u8 + { + Internal, + External + }; + + void CreateRequestLink(FileRequestPtr&& request); + void CreateRequestPathStore(FileRequest* parent, RequestPath path); + void CreateReadRequest(RequestPath path, void* output, u64 outputSize, u64 offset, u64 size, + AZStd::chrono::system_clock::time_point deadline, IStreamerTypes::Priority priority); + void CreateReadRequest(RequestPath path, IStreamerTypes::RequestMemoryAllocator* allocator, u64 offset, u64 size, + AZStd::chrono::system_clock::time_point deadline, IStreamerTypes::Priority priority); + void CreateRead(FileRequest* parent, void* output, u64 outputSize, const RequestPath& path, u64 offset, u64 size, bool sharedRead = false); + void CreateCompressedRead(FileRequest* parent, const CompressionInfo& compressionInfo, void* output, + u64 readOffset, u64 readSize); + void CreateCompressedRead(FileRequest* parent, CompressionInfo&& compressionInfo, void* output, + u64 readOffset, u64 readSize); + void CreateWait(FileRequest* parent); + void CreateFileExistsCheck(const RequestPath& path); + void CreateFileMetaDataRetrieval(const RequestPath& path); + void CreateCancel(FileRequestPtr target); + void CreateReschedule(FileRequestPtr target, AZStd::chrono::system_clock::time_point newDeadline, IStreamerTypes::Priority newPriority); + void CreateFlush(RequestPath path); + void CreateFlushAll(); + void CreateDedicatedCacheCreation(RequestPath path, const FileRange& range = {}, FileRequest* parent = nullptr); + void CreateDedicatedCacheDestruction(RequestPath path, const FileRange& range = {}, FileRequest* parent = nullptr); + void CreateReport(ReportData::ReportType reportType); + void CreateCustom(AZStd::any data, bool failWhenUnhandled = true, FileRequest* parent = nullptr); + + void SetCompletionCallback(OnCompletionCallback callback); + + CommandVariant& GetCommand(); + const CommandVariant& GetCommand() const; + + IStreamerTypes::RequestStatus GetStatus() const; + void SetStatus(IStreamerTypes::RequestStatus newStatus); + FileRequest* GetParent(); + const FileRequest* GetParent() const; + size_t GetNumDependencies() const; + static constexpr size_t GetMaxNumDependencies(); + //! Whether or not this request should fail if no node in the chain has picked up the request. + bool FailsWhenUnhandled() const; + + //! Checks the chain of request for the provided command. Returns the command if found, otherwise null. + template T* GetCommandFromChain(); + //! Checks the chain of request for the provided command. Returns the command if found, otherwise null. + template const T* GetCommandFromChain() const; + + //! Determines if this request is contributing to the external request. + bool WorksOn(FileRequestPtr& request) const; + + //! Returns the id that's assigned to the request when it was added to the pending queue. + //! The id will always increment so a smaller id means it was originally queued earlier. + size_t GetPendingId() const; + + //! Set the estimated completion time for this request and it's immediate parent. The general approach + //! to getting the final estimation is to bubble up the estimation, with ever entry in the stack adding + //! it's own additional delay. + void SetEstimatedCompletion(AZStd::chrono::system_clock::time_point time); + AZStd::chrono::system_clock::time_point GetEstimatedCompletion() const; + + private: + explicit FileRequest(Usage usage = Usage::Internal); + ~FileRequest(); + + void Reset(); + void SetOptionalParent(FileRequest* parent); + + inline static void OnCompletionPlaceholder(const FileRequest& /*request*/) {} + + //! Command and parameters for the request. + CommandVariant m_command; + + //! Status of the request. + AZStd::atomic m_status{ IStreamerTypes::RequestStatus::Pending }; + + //! Called once the request has completed. This will always be called from the Streamer thread + //! and thread safety is the responsibility of called function. When assigning a lambda avoid + //! capturing a FileRequestPtr by value as this will cause a circular reference which causes + //! the FileRequestPtr to never be released and causes a memory leak. This call will + //! block the main Streamer thread until it returns so callbacks should be kept short. If + //! a longer running task is needed consider using a job to do the work. + OnCompletionCallback m_onCompletion; + + //! Estimated time this request will complete. This is an estimation and depends on many + //! factors which can cause it to change drastically from moment to moment. + AZStd::chrono::system_clock::time_point m_estimatedCompletion; + + //! The file request that has a dependency on this one. This can be null if there are no + //! other request depending on this one to complete. + FileRequest* m_parent{ nullptr }; + + //! Id assigned when the request is added to the pending queue. + size_t m_pendingId{ 0 }; + + //! The number of dependent file request that need to complete before this one is done. + u16 m_dependencies{ 0 }; + + //! Internal request. If this is true the request is created inside the streaming stack and never + //! leaves it. If true it will automatically be maintained by the scheduler, if false than it's + //! up to the owner to recycle this request. + Usage m_usage{ Usage::Internal }; + + //! Whether or not this request is currently in a recycle bin. This allows detecting double deletes. + bool m_inRecycleBin{ false }; + }; + + class StreamerContext; + class FileRequestHandle; + + //! ExternalFileRequest is a wrapper around the FileRequest so it's safe to use outside the + //! Streaming Stack. The main differences are that ExternalFileRequest is used in a thread-safe + //! context and it doesn't get automatically destroyed upon completion. Instead intrusive_ptr is + //! used to handle clean up. + class ExternalFileRequest final + { + friend struct AZStd::IntrusivePtrCountPolicy; + friend class FileRequestHandle; + friend class FileRequest; + friend class Streamer; + friend class StreamerContext; + friend class Scheduler; + friend class Device; + friend bool operator==(const FileRequestHandle& lhs, const FileRequestPtr& rhs); + + public: + AZ_CLASS_ALLOCATOR(ExternalFileRequest, SystemAllocator, 0); + + explicit ExternalFileRequest(StreamerContext* owner); + + private: + void add_ref(); + void release(); + + FileRequest m_request; + AZStd::atomic_uint64_t m_refCount{ 0 }; + StreamerContext* m_owner; + }; + + class FileRequestHandle + { + public: + friend class Streamer; + friend bool operator==(const FileRequestHandle& lhs, const FileRequestPtr& rhs); + + // Intentional cast operator. + FileRequestHandle(FileRequest& request) + : m_request(&request) + {} + + // Intentional cast operator. + FileRequestHandle(const FileRequestPtr& request) + : m_request(request ? &request->m_request : nullptr) + {} + + private: + FileRequest* m_request; + }; + + bool operator==(const FileRequestHandle& lhs, const FileRequestPtr& rhs); + bool operator==(const FileRequestPtr& lhs, const FileRequestHandle& rhs); + bool operator!=(const FileRequestHandle& lhs, const FileRequestPtr& rhs); + bool operator!=(const FileRequestPtr& lhs, const FileRequestHandle& rhs); + +} // namespace AZ::IO #include diff --git a/Code/Framework/AzCore/AzCore/IO/Streamer/FullFileDecompressor.cpp b/Code/Framework/AzCore/AzCore/IO/Streamer/FullFileDecompressor.cpp index 6427571f10..723a5d62c8 100644 --- a/Code/Framework/AzCore/AzCore/IO/Streamer/FullFileDecompressor.cpp +++ b/Code/Framework/AzCore/AzCore/IO/Streamer/FullFileDecompressor.cpp @@ -21,719 +21,717 @@ #include #include -namespace AZ +namespace AZ::IO { - namespace IO + AZStd::shared_ptr FullFileDecompressorConfig::AddStreamStackEntry( + const HardwareInformation& hardware, AZStd::shared_ptr parent) { - AZStd::shared_ptr FullFileDecompressorConfig::AddStreamStackEntry( - const HardwareInformation& hardware, AZStd::shared_ptr parent) - { - auto stackEntry = AZStd::make_shared( - m_maxNumReads, m_maxNumJobs, aznumeric_caster(hardware.m_maxPhysicalSectorSize)); - stackEntry->SetNext(AZStd::move(parent)); - return stackEntry; - } + auto stackEntry = AZStd::make_shared( + m_maxNumReads, m_maxNumJobs, aznumeric_caster(hardware.m_maxPhysicalSectorSize)); + stackEntry->SetNext(AZStd::move(parent)); + return stackEntry; + } - void FullFileDecompressorConfig::Reflect(AZ::ReflectContext* context) + void FullFileDecompressorConfig::Reflect(AZ::ReflectContext* context) + { + if (auto serializeContext = azrtti_cast(context); serializeContext != nullptr) { - if (auto serializeContext = azrtti_cast(context); serializeContext != nullptr) - { - serializeContext->Class() - ->Version(1) - ->Field("MaxNumReads", &FullFileDecompressorConfig::m_maxNumReads) - ->Field("MaxNumJobs", &FullFileDecompressorConfig::m_maxNumJobs); - } + serializeContext->Class() + ->Version(1) + ->Field("MaxNumReads", &FullFileDecompressorConfig::m_maxNumReads) + ->Field("MaxNumJobs", &FullFileDecompressorConfig::m_maxNumJobs); } + } #if AZ_STREAMER_ADD_EXTRA_PROFILING_INFO - static constexpr char DecompBoundName[] = "Decompression bound"; - static constexpr char ReadBoundName[] = "Read bound"; + static constexpr char DecompBoundName[] = "Decompression bound"; + static constexpr char ReadBoundName[] = "Read bound"; #endif // AZ_STREAMER_ADD_EXTRA_PROFILING_INFO - bool FullFileDecompressor::DecompressionInformation::IsProcessing() const + bool FullFileDecompressor::DecompressionInformation::IsProcessing() const + { + return !!m_compressedData; + } + + FullFileDecompressor::FullFileDecompressor(u32 maxNumReads, u32 maxNumJobs, u32 alignment) + : StreamStackEntry("Full file decompressor") + , m_maxNumReads(maxNumReads) + , m_maxNumJobs(maxNumJobs) + , m_alignment(alignment) + { + JobManagerDesc jobDesc; + jobDesc.m_jobManagerName = "Full File Decompressor"; + u32 numThreads = AZ::GetMin(maxNumJobs, AZStd::thread::hardware_concurrency()); + for (u32 i = 0; i < numThreads; ++i) { - return !!m_compressedData; + jobDesc.m_workerThreads.push_back(JobManagerThreadDesc()); } - - FullFileDecompressor::FullFileDecompressor(u32 maxNumReads, u32 maxNumJobs, u32 alignment) - : StreamStackEntry("Full file decompressor") - , m_maxNumReads(maxNumReads) - , m_maxNumJobs(maxNumJobs) - , m_alignment(alignment) + m_decompressionJobManager = AZStd::make_unique(jobDesc); + m_decompressionjobContext = AZStd::make_unique(*m_decompressionJobManager); + + m_processingJobs = AZStd::make_unique(maxNumJobs); + + m_readBuffers = AZStd::make_unique(maxNumReads); + m_readRequests = AZStd::make_unique(maxNumReads); + m_readBufferStatus = AZStd::make_unique(maxNumReads); + for (u32 i = 0; i < maxNumReads; ++i) { - JobManagerDesc jobDesc; - u32 numThreads = AZ::GetMin(maxNumJobs, AZStd::thread::hardware_concurrency()); - for (u32 i = 0; i < numThreads; ++i) - { - jobDesc.m_workerThreads.push_back(JobManagerThreadDesc()); - } - m_decompressionJobManager = AZStd::make_unique(jobDesc); - m_decompressionjobContext = AZStd::make_unique(*m_decompressionJobManager); - - m_processingJobs = AZStd::make_unique(maxNumJobs); - - m_readBuffers = AZStd::make_unique(maxNumReads); - m_readRequests = AZStd::make_unique(maxNumReads); - m_readBufferStatus = AZStd::make_unique(maxNumReads); - for (u32 i = 0; i < maxNumReads; ++i) - { - m_readBufferStatus[i] = ReadBufferStatus::Unused; - } - - // Add initial dummy values to the stats to avoid division by zero later on and avoid needing branches. - m_bytesDecompressed.PushEntry(1); - m_decompressionDurationMicroSec.PushEntry(1); + m_readBufferStatus[i] = ReadBufferStatus::Unused; } - void FullFileDecompressor::PrepareRequest(FileRequest* request) - { - AZ_Assert(request, "PrepareRequest was provided a null request."); + // Add initial dummy values to the stats to avoid division by zero later on and avoid needing branches. + m_bytesDecompressed.PushEntry(1); + m_decompressionDurationMicroSec.PushEntry(1); + } - AZStd::visit([this, request](auto&& args) + void FullFileDecompressor::PrepareRequest(FileRequest* request) + { + AZ_Assert(request, "PrepareRequest was provided a null request."); + + AZStd::visit([this, request](auto&& args) + { + using Command = AZStd::decay_t; + if constexpr (AZStd::is_same_v) { - using Command = AZStd::decay_t; - if constexpr (AZStd::is_same_v) - { - PrepareReadRequest(request, args); - } - else if constexpr (AZStd::is_same_v || - AZStd::is_same_v) - { - PrepareDedicatedCache(request, args.m_path); - } - else - { - StreamStackEntry::PrepareRequest(request); - } - }, request->GetCommand()); + PrepareReadRequest(request, args); + } + else if constexpr (AZStd::is_same_v || + AZStd::is_same_v) + { + PrepareDedicatedCache(request, args.m_path); + } + else + { + StreamStackEntry::PrepareRequest(request); + } + }, request->GetCommand()); + } + + void FullFileDecompressor::QueueRequest(FileRequest* request) + { + AZ_Assert(request, "QueueRequest was provided a null request."); + + AZStd::visit([this, request](auto&& args) + { + using Command = AZStd::decay_t; + if constexpr (AZStd::is_same_v) + { + m_pendingReads.push_back(request); + } + else if constexpr (AZStd::is_same_v) + { + m_pendingFileExistChecks.push_back(request); + } + else + { + StreamStackEntry::QueueRequest(request); + } + }, request->GetCommand()); + } + + bool FullFileDecompressor::ExecuteRequests() + { + bool result = false; + // First queue jobs as this might open up new read slots. + if (m_numInFlightReads > 0 && m_numRunningJobs < m_maxNumJobs) + { + result = StartDecompressions(); } - void FullFileDecompressor::QueueRequest(FileRequest* request) + // Queue as many new reads as possible. + while (!m_pendingReads.empty() && m_numInFlightReads < m_maxNumReads) { - AZ_Assert(request, "QueueRequest was provided a null request."); - - AZStd::visit([this, request](auto&& args) - { - using Command = AZStd::decay_t; - if constexpr (AZStd::is_same_v) - { - m_pendingReads.push_back(request); - } - else if constexpr (AZStd::is_same_v) - { - m_pendingFileExistChecks.push_back(request); - } - else - { - StreamStackEntry::QueueRequest(request); - } - }, request->GetCommand()); + StartArchiveRead(m_pendingReads.front()); + m_pendingReads.pop_front(); + result = true; } - bool FullFileDecompressor::ExecuteRequests() + // If nothing else happened and there is at least one pending file exist check request, run one of those. + if (!result && !m_pendingFileExistChecks.empty()) { - bool result = false; - // First queue jobs as this might open up new read slots. - if (m_numInFlightReads > 0 && m_numRunningJobs < m_maxNumJobs) - { - result = StartDecompressions(); - } - - // Queue as many new reads as possible. - while (!m_pendingReads.empty() && m_numInFlightReads < m_maxNumReads) - { - StartArchiveRead(m_pendingReads.front()); - m_pendingReads.pop_front(); - result = true; - } - - // If nothing else happened and there is at least one pending file exist check request, run one of those. - if (!result && !m_pendingFileExistChecks.empty()) - { - FileExistsCheck(m_pendingFileExistChecks.front()); - m_pendingFileExistChecks.pop_front(); - result = true; - } + FileExistsCheck(m_pendingFileExistChecks.front()); + m_pendingFileExistChecks.pop_front(); + result = true; + } #if AZ_STREAMER_ADD_EXTRA_PROFILING_INFO - bool allPendingDecompression = true; - bool allReading = true; - for (u32 i = 0; i < m_maxNumReads; ++i) - { - allPendingDecompression = - allPendingDecompression && (m_readBufferStatus[i] == ReadBufferStatus::PendingDecompression); - allReading = - allReading && (m_readBufferStatus[i] == ReadBufferStatus::ReadInFlight); - } + bool allPendingDecompression = true; + bool allReading = true; + for (u32 i = 0; i < m_maxNumReads; ++i) + { + allPendingDecompression = + allPendingDecompression && (m_readBufferStatus[i] == ReadBufferStatus::PendingDecompression); + allReading = + allReading && (m_readBufferStatus[i] == ReadBufferStatus::ReadInFlight); + } - m_decompressionBoundStat.PushSample(allPendingDecompression ? 1.0 : 0.0); - Statistic::PlotImmediate(m_name, DecompBoundName, m_decompressionBoundStat.GetMostRecentSample()); + m_decompressionBoundStat.PushSample(allPendingDecompression ? 1.0 : 0.0); + Statistic::PlotImmediate(m_name, DecompBoundName, m_decompressionBoundStat.GetMostRecentSample()); - m_readBoundStat.PushSample(allReading && (m_numRunningJobs < m_maxNumJobs) ? 1.0 : 0.0); - Statistic::PlotImmediate(m_name, ReadBoundName, m_readBoundStat.GetMostRecentSample()); + m_readBoundStat.PushSample(allReading && (m_numRunningJobs < m_maxNumJobs) ? 1.0 : 0.0); + Statistic::PlotImmediate(m_name, ReadBoundName, m_readBoundStat.GetMostRecentSample()); #endif - return StreamStackEntry::ExecuteRequests() || result; - } + return StreamStackEntry::ExecuteRequests() || result; + } - void FullFileDecompressor::UpdateStatus(Status& status) const + void FullFileDecompressor::UpdateStatus(Status& status) const + { + StreamStackEntry::UpdateStatus(status); + s32 numAvailableSlots = aznumeric_cast(m_maxNumReads - m_numInFlightReads); + status.m_numAvailableSlots = AZStd::min(status.m_numAvailableSlots, numAvailableSlots); + status.m_isIdle = status.m_isIdle && IsIdle(); + } + + void FullFileDecompressor::UpdateCompletionEstimates(AZStd::chrono::system_clock::time_point now, AZStd::vector& internalPending, + StreamerContext::PreparedQueue::iterator pendingBegin, StreamerContext::PreparedQueue::iterator pendingEnd) + { + // Create predictions for all pending requests. Some will be further processed after this. + AZStd::reverse_copy(m_pendingFileExistChecks.begin(), m_pendingFileExistChecks.end(), AZStd::back_inserter(internalPending)); + AZStd::reverse_copy(m_pendingReads.begin(), m_pendingReads.end(), AZStd::back_inserter(internalPending)); + + StreamStackEntry::UpdateCompletionEstimates(now, internalPending, pendingBegin, pendingEnd); + + double totalBytesDecompressed = aznumeric_caster(m_bytesDecompressed.GetTotal()); + double totalDecompressionDuration = aznumeric_caster(m_decompressionDurationMicroSec.GetTotal()); + AZStd::chrono::microseconds cumulativeDelay = AZStd::chrono::microseconds::max(); + + // Check the number of jobs that are processing. + for (u32 i = 0; i < m_maxNumJobs; ++i) { - StreamStackEntry::UpdateStatus(status); - s32 numAvailableSlots = aznumeric_cast(m_maxNumReads - m_numInFlightReads); - status.m_numAvailableSlots = AZStd::min(status.m_numAvailableSlots, numAvailableSlots); - status.m_isIdle = status.m_isIdle && IsIdle(); - } - - void FullFileDecompressor::UpdateCompletionEstimates(AZStd::chrono::system_clock::time_point now, AZStd::vector& internalPending, - StreamerContext::PreparedQueue::iterator pendingBegin, StreamerContext::PreparedQueue::iterator pendingEnd) - { - // Create predictions for all pending requests. Some will be further processed after this. - AZStd::reverse_copy(m_pendingFileExistChecks.begin(), m_pendingFileExistChecks.end(), AZStd::back_inserter(internalPending)); - AZStd::reverse_copy(m_pendingReads.begin(), m_pendingReads.end(), AZStd::back_inserter(internalPending)); - - StreamStackEntry::UpdateCompletionEstimates(now, internalPending, pendingBegin, pendingEnd); - - double totalBytesDecompressed = aznumeric_caster(m_bytesDecompressed.GetTotal()); - double totalDecompressionDuration = aznumeric_caster(m_decompressionDurationMicroSec.GetTotal()); - AZStd::chrono::microseconds cumulativeDelay = AZStd::chrono::microseconds::max(); - - // Check the number of jobs that are processing. - for (u32 i = 0; i < m_maxNumJobs; ++i) + if (m_processingJobs[i].IsProcessing()) { - if (m_processingJobs[i].IsProcessing()) - { - FileRequest* compressedRequest = m_processingJobs[i].m_waitRequest->GetParent(); - AZ_Assert(compressedRequest, "A wait request attached to FullFileDecompressor was completed but didn't have a parent compressed request."); - auto data = AZStd::get_if(&compressedRequest->GetCommand()); - AZ_Assert(data, "Compressed request in the decompression queue in FullFileDecompressor didn't contain compression read data."); - - size_t bytesToDecompress = data->m_compressionInfo.m_compressedSize; - auto decompressionDuration = AZStd::chrono::microseconds( - aznumeric_cast((bytesToDecompress * totalDecompressionDuration) / totalBytesDecompressed)); - auto timeInProcessing = now - m_processingJobs[i].m_jobStartTime; - auto timeLeft = decompressionDuration > timeInProcessing ? decompressionDuration - timeInProcessing : AZStd::chrono::microseconds(0); - // Get the shortest time as this indicates the next decompression to become available. - cumulativeDelay = AZStd::min(timeLeft, cumulativeDelay); - m_processingJobs[i].m_waitRequest->SetEstimatedCompletion(now + timeLeft); - } - } - if (cumulativeDelay == AZStd::chrono::microseconds::max()) - { - cumulativeDelay = AZStd::chrono::microseconds(0); - } - - // Next update all reads that are in flight. These will have an estimation for the read to complete, but will then be queued - // for decompression, so add the time needed decompression. Assume that decompression happens in parallel. - AZStd::chrono::microseconds decompressionDelay = - AZStd::chrono::microseconds(aznumeric_cast(m_decompressionJobDelayMicroSec.CalculateAverage())); - AZStd::chrono::microseconds smallestDecompressionDuration = AZStd::chrono::microseconds::max(); - for (u32 i = 0; i < m_maxNumReads; ++i) - { - AZStd::chrono::system_clock::time_point baseTime; - switch (m_readBufferStatus[i]) - { - case ReadBufferStatus::Unused: - continue; - case ReadBufferStatus::ReadInFlight: - // Internal read requests can start and complete but pending finalization before they're ever scheduled in which case - // the estimated time is not set. - baseTime = m_readRequests[i]->GetEstimatedCompletion(); - if (baseTime == AZStd::chrono::system_clock::time_point()) - { - baseTime = now; - } - break; - case ReadBufferStatus::PendingDecompression: - baseTime = now; - break; - default: - AZ_Assert(false, "Unsupported buffer type: %i.", m_readBufferStatus[i]); - continue; - } - - baseTime += cumulativeDelay; // Delay until the first decompression slot becomes available. - baseTime += decompressionDelay; // The average time it takes for the job system to pick up the decompression job. - - // Calculate the amount of time it will take to decompress the data. - FileRequest* compressedRequest = m_readRequests[i]->GetParent(); + FileRequest* compressedRequest = m_processingJobs[i].m_waitRequest->GetParent(); + AZ_Assert(compressedRequest, "A wait request attached to FullFileDecompressor was completed but didn't have a parent compressed request."); auto data = AZStd::get_if(&compressedRequest->GetCommand()); - + AZ_Assert(data, "Compressed request in the decompression queue in FullFileDecompressor didn't contain compression read data."); + size_t bytesToDecompress = data->m_compressionInfo.m_compressedSize; auto decompressionDuration = AZStd::chrono::microseconds( aznumeric_cast((bytesToDecompress * totalDecompressionDuration) / totalBytesDecompressed)); - smallestDecompressionDuration = AZStd::min(smallestDecompressionDuration, decompressionDuration); - baseTime += decompressionDuration; - - m_readRequests[i]->SetEstimatedCompletion(baseTime); - } - if (smallestDecompressionDuration != AZStd::chrono::microseconds::max()) - { - cumulativeDelay += smallestDecompressionDuration; // Time after which the decompression jobs and pending reads have completed. - } - - // For all internally pending compressed reads add the decompression time. The read time will have already been added downstream. - // Because this call will go from the top of the stack to the bottom, but estimation is calculated from the bottom to the top, this - // list should be processed in reverse order. - for (auto pendingIt = internalPending.rbegin(); pendingIt != internalPending.rend(); ++pendingIt) - { - EstimateCompressedReadRequest(*pendingIt, cumulativeDelay, decompressionDelay, - totalDecompressionDuration, totalBytesDecompressed); - } - - // Finally add a prediction for all the requests that are waiting to be queued. - for (auto requestIt = pendingBegin; requestIt != pendingEnd; ++requestIt) - { - EstimateCompressedReadRequest(*requestIt, cumulativeDelay, decompressionDelay, - totalDecompressionDuration, totalBytesDecompressed); + auto timeInProcessing = now - m_processingJobs[i].m_jobStartTime; + auto timeLeft = decompressionDuration > timeInProcessing ? decompressionDuration - timeInProcessing : AZStd::chrono::microseconds(0); + // Get the shortest time as this indicates the next decompression to become available. + cumulativeDelay = AZStd::min(timeLeft, cumulativeDelay); + m_processingJobs[i].m_waitRequest->SetEstimatedCompletion(now + timeLeft); } } - - void FullFileDecompressor::EstimateCompressedReadRequest(FileRequest* request, AZStd::chrono::microseconds& cumulativeDelay, - AZStd::chrono::microseconds decompressionDelay, double totalDecompressionDurationUs, double totalBytesDecompressed) const + if (cumulativeDelay == AZStd::chrono::microseconds::max()) { - auto data = AZStd::get_if(&request->GetCommand()); - if (data) - { - AZStd::chrono::microseconds processingTime = decompressionDelay; - size_t bytesToDecompress = data->m_compressionInfo.m_compressedSize; - processingTime += AZStd::chrono::microseconds( - aznumeric_cast((bytesToDecompress * totalDecompressionDurationUs) / totalBytesDecompressed)); - - cumulativeDelay += processingTime; - request->SetEstimatedCompletion(request->GetEstimatedCompletion() + processingTime); - } + cumulativeDelay = AZStd::chrono::microseconds(0); } - void FullFileDecompressor::CollectStatistics(AZStd::vector& statistics) const + // Next update all reads that are in flight. These will have an estimation for the read to complete, but will then be queued + // for decompression, so add the time needed decompression. Assume that decompression happens in parallel. + AZStd::chrono::microseconds decompressionDelay = + AZStd::chrono::microseconds(aznumeric_cast(m_decompressionJobDelayMicroSec.CalculateAverage())); + AZStd::chrono::microseconds smallestDecompressionDuration = AZStd::chrono::microseconds::max(); + for (u32 i = 0; i < m_maxNumReads; ++i) { - constexpr double bytesToMB = 1.0 / (1024.0 * 1024.0); - constexpr double usToSec = 1.0 / (1000.0 * 1000.0); - constexpr double usToMs = 1.0 / 1000.0; - - if (m_bytesDecompressed.GetNumRecorded() > 1) // There's always a default added. + AZStd::chrono::system_clock::time_point baseTime; + switch (m_readBufferStatus[i]) { - //It only makes sense to add decompression statistics when reading from PAK files. - statistics.push_back(Statistic::CreateInteger(m_name, "Available decompression slots", m_maxNumJobs - m_numRunningJobs)); - statistics.push_back(Statistic::CreateInteger(m_name, "Available read slots", m_maxNumReads - m_numInFlightReads)); - statistics.push_back(Statistic::CreateInteger(m_name, "Pending decompression", m_numPendingDecompression)); - statistics.push_back(Statistic::CreateFloat(m_name, "Buffer memory (MB)", m_memoryUsage * bytesToMB)); + case ReadBufferStatus::Unused: + continue; + case ReadBufferStatus::ReadInFlight: + // Internal read requests can start and complete but pending finalization before they're ever scheduled in which case + // the estimated time is not set. + baseTime = m_readRequests[i]->GetEstimatedCompletion(); + if (baseTime == AZStd::chrono::system_clock::time_point()) + { + baseTime = now; + } + break; + case ReadBufferStatus::PendingDecompression: + baseTime = now; + break; + default: + AZ_Assert(false, "Unsupported buffer type: %i.", m_readBufferStatus[i]); + continue; + } - double averageJobStartDelay = m_decompressionJobDelayMicroSec.CalculateAverage() * usToMs; - statistics.push_back(Statistic::CreateFloat(m_name, "Decompression job delay (avg. ms)", averageJobStartDelay)); + baseTime += cumulativeDelay; // Delay until the first decompression slot becomes available. + baseTime += decompressionDelay; // The average time it takes for the job system to pick up the decompression job. - double totalBytesDecompressedMB = m_bytesDecompressed.GetTotal() * bytesToMB; - double totalDecompressionTimeSec = m_decompressionDurationMicroSec.GetTotal() * usToSec; - statistics.push_back(Statistic::CreateFloat(m_name, "Decompression Speed per job (avg. mbps)", totalBytesDecompressedMB / totalDecompressionTimeSec)); + // Calculate the amount of time it will take to decompress the data. + FileRequest* compressedRequest = m_readRequests[i]->GetParent(); + auto data = AZStd::get_if(&compressedRequest->GetCommand()); + + size_t bytesToDecompress = data->m_compressionInfo.m_compressedSize; + auto decompressionDuration = AZStd::chrono::microseconds( + aznumeric_cast((bytesToDecompress * totalDecompressionDuration) / totalBytesDecompressed)); + smallestDecompressionDuration = AZStd::min(smallestDecompressionDuration, decompressionDuration); + baseTime += decompressionDuration; + + m_readRequests[i]->SetEstimatedCompletion(baseTime); + } + if (smallestDecompressionDuration != AZStd::chrono::microseconds::max()) + { + cumulativeDelay += smallestDecompressionDuration; // Time after which the decompression jobs and pending reads have completed. + } + + // For all internally pending compressed reads add the decompression time. The read time will have already been added downstream. + // Because this call will go from the top of the stack to the bottom, but estimation is calculated from the bottom to the top, this + // list should be processed in reverse order. + for (auto pendingIt = internalPending.rbegin(); pendingIt != internalPending.rend(); ++pendingIt) + { + EstimateCompressedReadRequest(*pendingIt, cumulativeDelay, decompressionDelay, + totalDecompressionDuration, totalBytesDecompressed); + } + + // Finally add a prediction for all the requests that are waiting to be queued. + for (auto requestIt = pendingBegin; requestIt != pendingEnd; ++requestIt) + { + EstimateCompressedReadRequest(*requestIt, cumulativeDelay, decompressionDelay, + totalDecompressionDuration, totalBytesDecompressed); + } + } + + void FullFileDecompressor::EstimateCompressedReadRequest(FileRequest* request, AZStd::chrono::microseconds& cumulativeDelay, + AZStd::chrono::microseconds decompressionDelay, double totalDecompressionDurationUs, double totalBytesDecompressed) const + { + auto data = AZStd::get_if(&request->GetCommand()); + if (data) + { + AZStd::chrono::microseconds processingTime = decompressionDelay; + size_t bytesToDecompress = data->m_compressionInfo.m_compressedSize; + processingTime += AZStd::chrono::microseconds( + aznumeric_cast((bytesToDecompress * totalDecompressionDurationUs) / totalBytesDecompressed)); + + cumulativeDelay += processingTime; + request->SetEstimatedCompletion(request->GetEstimatedCompletion() + processingTime); + } + } + + void FullFileDecompressor::CollectStatistics(AZStd::vector& statistics) const + { + constexpr double bytesToMB = 1.0 / (1024.0 * 1024.0); + constexpr double usToSec = 1.0 / (1000.0 * 1000.0); + constexpr double usToMs = 1.0 / 1000.0; + + if (m_bytesDecompressed.GetNumRecorded() > 1) // There's always a default added. + { + //It only makes sense to add decompression statistics when reading from PAK files. + statistics.push_back(Statistic::CreateInteger(m_name, "Available decompression slots", m_maxNumJobs - m_numRunningJobs)); + statistics.push_back(Statistic::CreateInteger(m_name, "Available read slots", m_maxNumReads - m_numInFlightReads)); + statistics.push_back(Statistic::CreateInteger(m_name, "Pending decompression", m_numPendingDecompression)); + statistics.push_back(Statistic::CreateFloat(m_name, "Buffer memory (MB)", m_memoryUsage * bytesToMB)); + + double averageJobStartDelay = m_decompressionJobDelayMicroSec.CalculateAverage() * usToMs; + statistics.push_back(Statistic::CreateFloat(m_name, "Decompression job delay (avg. ms)", averageJobStartDelay)); + + double totalBytesDecompressedMB = m_bytesDecompressed.GetTotal() * bytesToMB; + double totalDecompressionTimeSec = m_decompressionDurationMicroSec.GetTotal() * usToSec; + statistics.push_back(Statistic::CreateFloat(m_name, "Decompression Speed per job (avg. mbps)", totalBytesDecompressedMB / totalDecompressionTimeSec)); #if AZ_STREAMER_ADD_EXTRA_PROFILING_INFO - statistics.push_back(Statistic::CreatePercentage(m_name, DecompBoundName, m_decompressionBoundStat.GetAverage())); - statistics.push_back(Statistic::CreatePercentage(m_name, ReadBoundName, m_readBoundStat.GetAverage())); + statistics.push_back(Statistic::CreatePercentage(m_name, DecompBoundName, m_decompressionBoundStat.GetAverage())); + statistics.push_back(Statistic::CreatePercentage(m_name, ReadBoundName, m_readBoundStat.GetAverage())); #endif - } - - StreamStackEntry::CollectStatistics(statistics); } - bool FullFileDecompressor::IsIdle() const - { - return - m_pendingReads.empty() && - m_pendingFileExistChecks.empty() && - m_numInFlightReads == 0 && - m_numPendingDecompression == 0 && - m_numRunningJobs == 0; - } + StreamStackEntry::CollectStatistics(statistics); + } - void FullFileDecompressor::PrepareReadRequest(FileRequest* request, FileRequest::ReadRequestData& data) + bool FullFileDecompressor::IsIdle() const + { + return + m_pendingReads.empty() && + m_pendingFileExistChecks.empty() && + m_numInFlightReads == 0 && + m_numPendingDecompression == 0 && + m_numRunningJobs == 0; + } + + void FullFileDecompressor::PrepareReadRequest(FileRequest* request, FileRequest::ReadRequestData& data) + { + CompressionInfo info; + if (CompressionUtils::FindCompressionInfo(info, data.m_path.GetRelativePath())) { - CompressionInfo info; - if (CompressionUtils::FindCompressionInfo(info, data.m_path.GetRelativePath())) + FileRequest* nextRequest = m_context->GetNewInternalRequest(); + if (info.m_isCompressed) { - FileRequest* nextRequest = m_context->GetNewInternalRequest(); - if (info.m_isCompressed) - { - AZ_Assert(info.m_decompressor, - "FullFileDecompressor::PrepareRequest found a compressed file, but no decompressor to decompress with."); - nextRequest->CreateCompressedRead(request, AZStd::move(info), data.m_output, data.m_offset, data.m_size); - } - else - { - FileRequest* pathStorageRequest = m_context->GetNewInternalRequest(); - pathStorageRequest->CreateRequestPathStore(request, AZStd::move(info.m_archiveFilename)); - auto& pathStorage = AZStd::get(pathStorageRequest->GetCommand()); - - nextRequest->CreateRead(pathStorageRequest, data.m_output, data.m_outputSize, pathStorage.m_path, - info.m_offset + data.m_offset, data.m_size, info.m_isSharedPak); - } - - if (info.m_conflictResolution == ConflictResolution::PreferFile) - { - auto callback = [this, nextRequest](const FileRequest& checkRequest) - { - AZ_PROFILE_FUNCTION(AzCore); - auto check = AZStd::get_if(&checkRequest.GetCommand()); - AZ_Assert(check, - "Callback in FullFileDecompressor::PrepareReadRequest expected FileExistsCheck but got another command."); - if (check->m_found) - { - FileRequest* originalRequest = m_context->RejectRequest(nextRequest); - if (AZStd::holds_alternative(originalRequest->GetCommand())) - { - originalRequest = m_context->RejectRequest(originalRequest); - } - StreamStackEntry::PrepareRequest(originalRequest); - } - else - { - m_context->PushPreparedRequest(nextRequest); - } - }; - FileRequest* fileCheckRequest = m_context->GetNewInternalRequest(); - fileCheckRequest->CreateFileExistsCheck(data.m_path); - fileCheckRequest->SetCompletionCallback(AZStd::move(callback)); - StreamStackEntry::QueueRequest(fileCheckRequest); - } - else - { - m_context->PushPreparedRequest(nextRequest); - } + AZ_Assert(info.m_decompressor, + "FullFileDecompressor::PrepareRequest found a compressed file, but no decompressor to decompress with."); + nextRequest->CreateCompressedRead(request, AZStd::move(info), data.m_output, data.m_offset, data.m_size); } else { - StreamStackEntry::PrepareRequest(request); - } - } + FileRequest* pathStorageRequest = m_context->GetNewInternalRequest(); + pathStorageRequest->CreateRequestPathStore(request, AZStd::move(info.m_archiveFilename)); + auto& pathStorage = AZStd::get(pathStorageRequest->GetCommand()); - void FullFileDecompressor::PrepareDedicatedCache(FileRequest* request, const RequestPath& path) - { - CompressionInfo info; - if (CompressionUtils::FindCompressionInfo(info, path.GetRelativePath())) + nextRequest->CreateRead(pathStorageRequest, data.m_output, data.m_outputSize, pathStorage.m_path, + info.m_offset + data.m_offset, data.m_size, info.m_isSharedPak); + } + + if (info.m_conflictResolution == ConflictResolution::PreferFile) { - FileRequest* nextRequest = m_context->GetNewInternalRequest(); - AZStd::visit([request, &info, nextRequest](auto&& args) + auto callback = [this, nextRequest](const FileRequest& checkRequest) { - using Command = AZStd::decay_t; - if constexpr (AZStd::is_same_v) + AZ_PROFILE_FUNCTION(AzCore); + auto check = AZStd::get_if(&checkRequest.GetCommand()); + AZ_Assert(check, + "Callback in FullFileDecompressor::PrepareReadRequest expected FileExistsCheck but got another command."); + if (check->m_found) { - nextRequest->CreateDedicatedCacheCreation(AZStd::move(info.m_archiveFilename), - FileRange::CreateRange(info.m_offset, info.m_compressedSize), request); - } - else if constexpr (AZStd::is_same_v) - { - nextRequest->CreateDedicatedCacheDestruction(AZStd::move(info.m_archiveFilename), - FileRange::CreateRange(info.m_offset, info.m_compressedSize), request); - } - }, request->GetCommand()); - - if (info.m_conflictResolution == ConflictResolution::PreferFile) - { - auto callback = [this, nextRequest](const FileRequest& checkRequest) - { - AZ_PROFILE_FUNCTION(AzCore); - auto check = AZStd::get_if(&checkRequest.GetCommand()); - AZ_Assert(check, - "Callback in FullFileDecompressor::PrepareDedicatedCache expected FileExistsCheck but got another command."); - if (check->m_found) + FileRequest* originalRequest = m_context->RejectRequest(nextRequest); + if (AZStd::holds_alternative(originalRequest->GetCommand())) { - FileRequest* originalRequest = nextRequest->GetParent(); - m_context->RejectRequest(nextRequest); - StreamStackEntry::PrepareRequest(originalRequest); + originalRequest = m_context->RejectRequest(originalRequest); } - else - { - m_context->PushPreparedRequest(nextRequest); - } - }; - FileRequest* fileCheckRequest = m_context->GetNewInternalRequest(); - fileCheckRequest->CreateFileExistsCheck(path); - fileCheckRequest->SetCompletionCallback(AZStd::move(callback)); - StreamStackEntry::QueueRequest(fileCheckRequest); - } - else - { - m_context->PushPreparedRequest(nextRequest); - } - } - else - { - StreamStackEntry::PrepareRequest(request); - } - } - - void FullFileDecompressor::FileExistsCheck(FileRequest* checkRequest) - { - auto& fileCheckRequest = AZStd::get(checkRequest->GetCommand()); - CompressionInfo info; - if (CompressionUtils::FindCompressionInfo(info, fileCheckRequest.m_path.GetRelativePath())) - { - fileCheckRequest.m_found = true; - } - else - { - // The file isn't in the archive but might still exist as a loose file, so let the next node have a shot. - StreamStackEntry::QueueRequest(checkRequest); - } - } - - void FullFileDecompressor::StartArchiveRead(FileRequest* compressedReadRequest) - { - if (!m_next) - { - compressedReadRequest->SetStatus(IStreamerTypes::RequestStatus::Failed); - m_context->MarkRequestAsCompleted(compressedReadRequest); - return; - } - - for (u32 i = 0; i < m_maxNumReads; ++i) - { - if (m_readBufferStatus[i] == ReadBufferStatus::Unused) - { - auto data = AZStd::get_if(&compressedReadRequest->GetCommand()); - AZ_Assert(data, "Compressed request that's starting a read in FullFileDecompressor didn't contain compression read data."); - AZ_Assert(data->m_compressionInfo.m_decompressor, - "FileRequest for FullFileDecompressor is missing a decompression callback."); - - CompressionInfo& info = data->m_compressionInfo; - AZ_Assert(info.m_decompressor, "FullFileDecompressor is planning to a queue a request for reading but couldn't find a decompressor."); - - // The buffer is aligned down but the offset is not corrected. If the offset was adjusted it would mean the same data is read - // multiple times and negates the block cache's ability to detect these cases. By still adjusting it means that the reads between - // the BlockCache's prolog and epilog are read into aligned buffers. - size_t offsetAdjustment = info.m_offset - AZ_SIZE_ALIGN_DOWN(info.m_offset, aznumeric_cast(m_alignment)); - size_t bufferSize = AZ_SIZE_ALIGN_UP((info.m_compressedSize + offsetAdjustment), aznumeric_cast(m_alignment)); - m_readBuffers[i] = reinterpret_cast(AZ::AllocatorInstance::Get().Allocate( - bufferSize, m_alignment, 0, "AZ::IO::Streamer FullFileDecompressor", __FILE__, __LINE__)); - m_memoryUsage += bufferSize; - - FileRequest* archiveReadRequest = m_context->GetNewInternalRequest(); - archiveReadRequest->CreateRead(compressedReadRequest, m_readBuffers[i] + offsetAdjustment, bufferSize, info.m_archiveFilename, - info.m_offset, info.m_compressedSize, info.m_isSharedPak); - archiveReadRequest->SetCompletionCallback( - [this, readSlot = i](FileRequest& request) - { - AZ_PROFILE_FUNCTION(AzCore); - FinishArchiveRead(&request, readSlot); - }); - m_next->QueueRequest(archiveReadRequest); - - m_readRequests[i] = archiveReadRequest; - m_readBufferStatus[i] = ReadBufferStatus::ReadInFlight; - - AZ_Assert(m_numInFlightReads < m_maxNumReads, - "A FileRequest was queued for reading in FullFileDecompressor, but there's no slots available."); - m_numInFlightReads++; - - return; - } - } - AZ_Assert(false, "%u of %u read slots are use in the FullFileDecompressor, but no empty slot was found.", m_numInFlightReads, m_maxNumReads); - } - - void FullFileDecompressor::FinishArchiveRead(FileRequest* readRequest, u32 readSlot) - { - AZ_Assert(m_readRequests[readSlot] == readRequest, - "Request in the archive read slot isn't the same as request that's being completed."); - - FileRequest* compressedRequest = readRequest->GetParent(); - AZ_Assert(compressedRequest, "Read requests started by FullFileDecompressor is missing a parent request."); - - if (readRequest->GetStatus() == IStreamerTypes::RequestStatus::Completed) - { - m_readBufferStatus[readSlot] = ReadBufferStatus::PendingDecompression; - ++m_numPendingDecompression; - - // Add this wait so the compressed request isn't fully completed yet as only the read part is done. The - // job thread will finish this wait, which in turn will trigger this function again on the main streaming thread. - FileRequest* waitRequest = m_context->GetNewInternalRequest(); - waitRequest->CreateWait(compressedRequest); - m_readRequests[readSlot] = waitRequest; - } - else - { - auto data = AZStd::get_if(&compressedRequest->GetCommand()); - AZ_Assert(data, "Compressed request in FullFileDecompressor that finished unsuccessfully didn't contain compression read data."); - CompressionInfo& info = data->m_compressionInfo; - size_t offsetAdjustment = info.m_offset - AZ_SIZE_ALIGN_DOWN(info.m_offset, aznumeric_cast(m_alignment)); - size_t bufferSize = AZ_SIZE_ALIGN_UP((info.m_compressedSize + offsetAdjustment), aznumeric_cast(m_alignment)); - m_memoryUsage -= bufferSize; - - if (m_readBuffers[readSlot] != nullptr) - { - AZ::AllocatorInstance::Get().DeAllocate(m_readBuffers[readSlot], bufferSize, m_alignment); - m_readBuffers[readSlot] = nullptr; - } - m_readRequests[readSlot] = nullptr; - m_readBufferStatus[readSlot] = ReadBufferStatus::Unused; - AZ_Assert(m_numInFlightReads > 0, - "Trying to decrement a read request after it was canceled or failed in FullFileDecompressor, " - "but no read requests are supposed to be queued."); - m_numInFlightReads--; - } - } - - bool FullFileDecompressor::StartDecompressions() - { - bool queuedJobs = false; - u32 jobSlot = 0; - for (u32 readSlot = 0; readSlot < m_maxNumReads; ++readSlot) - { - // Find completed read. - if (m_readBufferStatus[readSlot] != ReadBufferStatus::PendingDecompression) - { - continue; - } - - // Find decompression slot - for (; jobSlot < m_maxNumJobs; ++jobSlot) - { - if (m_processingJobs[jobSlot].IsProcessing()) - { - continue; - } - - FileRequest* waitRequest = m_readRequests[readSlot]; - AZ_Assert(AZStd::holds_alternative(waitRequest->GetCommand()), - "File request waiting for decompression wasn't marked as being a wait operation."); - FileRequest* compressedRequest = waitRequest->GetParent(); - AZ_Assert(compressedRequest, "Read requests started by FullFileDecompressor is missing a parent request."); - - waitRequest->SetCompletionCallback([this, jobSlot](FileRequest& request) - { - AZ_PROFILE_FUNCTION(AzCore); - FinishDecompression(&request, jobSlot); - }); - - DecompressionInformation& info = m_processingJobs[jobSlot]; - info.m_waitRequest = waitRequest; - info.m_queueStartTime = AZStd::chrono::high_resolution_clock::now(); - info.m_jobStartTime = info.m_queueStartTime; // Set these to the same in case the scheduler requests an update before the job has started. - info.m_compressedData = m_readBuffers[readSlot]; // Transfer ownership of the pointer. - m_readBuffers[readSlot] = nullptr; - - AZ::Job* decompressionJob; - auto data = AZStd::get_if(&compressedRequest->GetCommand()); - AZ_Assert(data, "Compressed request in FullFileDecompressor that's starting decompression didn't contain compression read data."); - AZ_Assert(data->m_compressionInfo.m_decompressor, "FullFileDecompressor is queuing a decompression job but couldn't find a decompressor."); - - info.m_alignmentOffset = aznumeric_caster(data->m_compressionInfo.m_offset - - AZ_SIZE_ALIGN_DOWN(data->m_compressionInfo.m_offset, aznumeric_cast(m_alignment))); - - if (data->m_readOffset == 0 && data->m_readSize == data->m_compressionInfo.m_uncompressedSize) - { - auto job = [this, &info]() - { - FullDecompression(m_context, info); - }; - decompressionJob = AZ::CreateJobFunction(job, true, m_decompressionjobContext.get()); + StreamStackEntry::PrepareRequest(originalRequest); } else { - m_memoryUsage += data->m_compressionInfo.m_uncompressedSize; - auto job = [this, &info]() - { - PartialDecompression(m_context, info); - }; - decompressionJob = AZ::CreateJobFunction(job, true, m_decompressionjobContext.get()); + m_context->PushPreparedRequest(nextRequest); } - --m_numPendingDecompression; - ++m_numRunningJobs; - decompressionJob->Start(); - - m_readRequests[readSlot] = nullptr; - m_readBufferStatus[readSlot] = ReadBufferStatus::Unused; - AZ_Assert(m_numInFlightReads > 0, "Trying to decrement a read request after it's queued for decompression in FullFileDecompressor, but no read requests are supposed to be queued."); - m_numInFlightReads--; - - queuedJobs = true; - break; - } - - if (m_numInFlightReads == 0 || m_numRunningJobs == m_maxNumJobs) - { - return queuedJobs; - } + }; + FileRequest* fileCheckRequest = m_context->GetNewInternalRequest(); + fileCheckRequest->CreateFileExistsCheck(data.m_path); + fileCheckRequest->SetCompletionCallback(AZStd::move(callback)); + StreamStackEntry::QueueRequest(fileCheckRequest); } - return queuedJobs; + else + { + m_context->PushPreparedRequest(nextRequest); + } + } + else + { + StreamStackEntry::PrepareRequest(request); + } + } + + void FullFileDecompressor::PrepareDedicatedCache(FileRequest* request, const RequestPath& path) + { + CompressionInfo info; + if (CompressionUtils::FindCompressionInfo(info, path.GetRelativePath())) + { + FileRequest* nextRequest = m_context->GetNewInternalRequest(); + AZStd::visit([request, &info, nextRequest](auto&& args) + { + using Command = AZStd::decay_t; + if constexpr (AZStd::is_same_v) + { + nextRequest->CreateDedicatedCacheCreation(AZStd::move(info.m_archiveFilename), + FileRange::CreateRange(info.m_offset, info.m_compressedSize), request); + } + else if constexpr (AZStd::is_same_v) + { + nextRequest->CreateDedicatedCacheDestruction(AZStd::move(info.m_archiveFilename), + FileRange::CreateRange(info.m_offset, info.m_compressedSize), request); + } + }, request->GetCommand()); + + if (info.m_conflictResolution == ConflictResolution::PreferFile) + { + auto callback = [this, nextRequest](const FileRequest& checkRequest) + { + AZ_PROFILE_FUNCTION(AzCore); + auto check = AZStd::get_if(&checkRequest.GetCommand()); + AZ_Assert(check, + "Callback in FullFileDecompressor::PrepareDedicatedCache expected FileExistsCheck but got another command."); + if (check->m_found) + { + FileRequest* originalRequest = nextRequest->GetParent(); + m_context->RejectRequest(nextRequest); + StreamStackEntry::PrepareRequest(originalRequest); + } + else + { + m_context->PushPreparedRequest(nextRequest); + } + }; + FileRequest* fileCheckRequest = m_context->GetNewInternalRequest(); + fileCheckRequest->CreateFileExistsCheck(path); + fileCheckRequest->SetCompletionCallback(AZStd::move(callback)); + StreamStackEntry::QueueRequest(fileCheckRequest); + } + else + { + m_context->PushPreparedRequest(nextRequest); + } + } + else + { + StreamStackEntry::PrepareRequest(request); + } + } + + void FullFileDecompressor::FileExistsCheck(FileRequest* checkRequest) + { + auto& fileCheckRequest = AZStd::get(checkRequest->GetCommand()); + CompressionInfo info; + if (CompressionUtils::FindCompressionInfo(info, fileCheckRequest.m_path.GetRelativePath())) + { + fileCheckRequest.m_found = true; + } + else + { + // The file isn't in the archive but might still exist as a loose file, so let the next node have a shot. + StreamStackEntry::QueueRequest(checkRequest); + } + } + + void FullFileDecompressor::StartArchiveRead(FileRequest* compressedReadRequest) + { + if (!m_next) + { + compressedReadRequest->SetStatus(IStreamerTypes::RequestStatus::Failed); + m_context->MarkRequestAsCompleted(compressedReadRequest); + return; } - void FullFileDecompressor::FinishDecompression([[maybe_unused]] FileRequest* waitRequest, u32 jobSlot) + for (u32 i = 0; i < m_maxNumReads; ++i) { - DecompressionInformation& jobInfo = m_processingJobs[jobSlot]; - AZ_Assert(jobInfo.m_waitRequest == waitRequest, "Job slot didn't contain the expected wait request."); + if (m_readBufferStatus[i] == ReadBufferStatus::Unused) + { + auto data = AZStd::get_if(&compressedReadRequest->GetCommand()); + AZ_Assert(data, "Compressed request that's starting a read in FullFileDecompressor didn't contain compression read data."); + AZ_Assert(data->m_compressionInfo.m_decompressor, + "FileRequest for FullFileDecompressor is missing a decompression callback."); - auto endTime = AZStd::chrono::high_resolution_clock::now(); + CompressionInfo& info = data->m_compressionInfo; + AZ_Assert(info.m_decompressor, "FullFileDecompressor is planning to a queue a request for reading but couldn't find a decompressor."); - FileRequest* compressedRequest = jobInfo.m_waitRequest->GetParent(); - AZ_Assert(compressedRequest, "A wait request attached to FullFileDecompressor was completed but didn't have a parent compressed request."); + // The buffer is aligned down but the offset is not corrected. If the offset was adjusted it would mean the same data is read + // multiple times and negates the block cache's ability to detect these cases. By still adjusting it means that the reads between + // the BlockCache's prolog and epilog are read into aligned buffers. + size_t offsetAdjustment = info.m_offset - AZ_SIZE_ALIGN_DOWN(info.m_offset, aznumeric_cast(m_alignment)); + size_t bufferSize = AZ_SIZE_ALIGN_UP((info.m_compressedSize + offsetAdjustment), aznumeric_cast(m_alignment)); + m_readBuffers[i] = reinterpret_cast(AZ::AllocatorInstance::Get().Allocate( + bufferSize, m_alignment, 0, "AZ::IO::Streamer FullFileDecompressor", __FILE__, __LINE__)); + m_memoryUsage += bufferSize; + + FileRequest* archiveReadRequest = m_context->GetNewInternalRequest(); + archiveReadRequest->CreateRead(compressedReadRequest, m_readBuffers[i] + offsetAdjustment, bufferSize, info.m_archiveFilename, + info.m_offset, info.m_compressedSize, info.m_isSharedPak); + archiveReadRequest->SetCompletionCallback( + [this, readSlot = i](FileRequest& request) + { + AZ_PROFILE_FUNCTION(AzCore); + FinishArchiveRead(&request, readSlot); + }); + m_next->QueueRequest(archiveReadRequest); + + m_readRequests[i] = archiveReadRequest; + m_readBufferStatus[i] = ReadBufferStatus::ReadInFlight; + + AZ_Assert(m_numInFlightReads < m_maxNumReads, + "A FileRequest was queued for reading in FullFileDecompressor, but there's no slots available."); + m_numInFlightReads++; + + return; + } + } + AZ_Assert(false, "%u of %u read slots are use in the FullFileDecompressor, but no empty slot was found.", m_numInFlightReads, m_maxNumReads); + } + + void FullFileDecompressor::FinishArchiveRead(FileRequest* readRequest, u32 readSlot) + { + AZ_Assert(m_readRequests[readSlot] == readRequest, + "Request in the archive read slot isn't the same as request that's being completed."); + + FileRequest* compressedRequest = readRequest->GetParent(); + AZ_Assert(compressedRequest, "Read requests started by FullFileDecompressor is missing a parent request."); + + if (readRequest->GetStatus() == IStreamerTypes::RequestStatus::Completed) + { + m_readBufferStatus[readSlot] = ReadBufferStatus::PendingDecompression; + ++m_numPendingDecompression; + + // Add this wait so the compressed request isn't fully completed yet as only the read part is done. The + // job thread will finish this wait, which in turn will trigger this function again on the main streaming thread. + FileRequest* waitRequest = m_context->GetNewInternalRequest(); + waitRequest->CreateWait(compressedRequest); + m_readRequests[readSlot] = waitRequest; + } + else + { auto data = AZStd::get_if(&compressedRequest->GetCommand()); - AZ_Assert(data, "Compressed request in FullFileDecompressor that completed decompression didn't contain compression read data."); + AZ_Assert(data, "Compressed request in FullFileDecompressor that finished unsuccessfully didn't contain compression read data."); CompressionInfo& info = data->m_compressionInfo; size_t offsetAdjustment = info.m_offset - AZ_SIZE_ALIGN_DOWN(info.m_offset, aznumeric_cast(m_alignment)); size_t bufferSize = AZ_SIZE_ALIGN_UP((info.m_compressedSize + offsetAdjustment), aznumeric_cast(m_alignment)); m_memoryUsage -= bufferSize; - if (data->m_readOffset != 0 || data->m_readSize != data->m_compressionInfo.m_uncompressedSize) + + if (m_readBuffers[readSlot] != nullptr) { - m_memoryUsage -= data->m_compressionInfo.m_uncompressedSize; + AZ::AllocatorInstance::Get().DeAllocate(m_readBuffers[readSlot], bufferSize, m_alignment); + m_readBuffers[readSlot] = nullptr; + } + m_readRequests[readSlot] = nullptr; + m_readBufferStatus[readSlot] = ReadBufferStatus::Unused; + AZ_Assert(m_numInFlightReads > 0, + "Trying to decrement a read request after it was canceled or failed in FullFileDecompressor, " + "but no read requests are supposed to be queued."); + m_numInFlightReads--; + } + } + + bool FullFileDecompressor::StartDecompressions() + { + bool queuedJobs = false; + u32 jobSlot = 0; + for (u32 readSlot = 0; readSlot < m_maxNumReads; ++readSlot) + { + // Find completed read. + if (m_readBufferStatus[readSlot] != ReadBufferStatus::PendingDecompression) + { + continue; } - m_decompressionJobDelayMicroSec.PushEntry(AZStd::chrono::duration_cast( - jobInfo.m_jobStartTime - jobInfo.m_queueStartTime).count()); - m_decompressionDurationMicroSec.PushEntry(AZStd::chrono::duration_cast( - endTime - jobInfo.m_jobStartTime).count()); - m_bytesDecompressed.PushEntry(data->m_compressionInfo.m_compressedSize); + // Find decompression slot + for (; jobSlot < m_maxNumJobs; ++jobSlot) + { + if (m_processingJobs[jobSlot].IsProcessing()) + { + continue; + } - AZ::AllocatorInstance::Get().DeAllocate(jobInfo.m_compressedData, bufferSize, m_alignment); - jobInfo.m_compressedData = nullptr; - AZ_Assert(m_numRunningJobs > 0, "About to complete a decompression job, but the internal count doesn't see a running job."); - --m_numRunningJobs; - return; + FileRequest* waitRequest = m_readRequests[readSlot]; + AZ_Assert(AZStd::holds_alternative(waitRequest->GetCommand()), + "File request waiting for decompression wasn't marked as being a wait operation."); + FileRequest* compressedRequest = waitRequest->GetParent(); + AZ_Assert(compressedRequest, "Read requests started by FullFileDecompressor is missing a parent request."); + + waitRequest->SetCompletionCallback([this, jobSlot](FileRequest& request) + { + AZ_PROFILE_FUNCTION(AzCore); + FinishDecompression(&request, jobSlot); + }); + + DecompressionInformation& info = m_processingJobs[jobSlot]; + info.m_waitRequest = waitRequest; + info.m_queueStartTime = AZStd::chrono::high_resolution_clock::now(); + info.m_jobStartTime = info.m_queueStartTime; // Set these to the same in case the scheduler requests an update before the job has started. + info.m_compressedData = m_readBuffers[readSlot]; // Transfer ownership of the pointer. + m_readBuffers[readSlot] = nullptr; + + AZ::Job* decompressionJob; + auto data = AZStd::get_if(&compressedRequest->GetCommand()); + AZ_Assert(data, "Compressed request in FullFileDecompressor that's starting decompression didn't contain compression read data."); + AZ_Assert(data->m_compressionInfo.m_decompressor, "FullFileDecompressor is queuing a decompression job but couldn't find a decompressor."); + + info.m_alignmentOffset = aznumeric_caster(data->m_compressionInfo.m_offset - + AZ_SIZE_ALIGN_DOWN(data->m_compressionInfo.m_offset, aznumeric_cast(m_alignment))); + + if (data->m_readOffset == 0 && data->m_readSize == data->m_compressionInfo.m_uncompressedSize) + { + auto job = [this, &info]() + { + FullDecompression(m_context, info); + }; + decompressionJob = AZ::CreateJobFunction(job, true, m_decompressionjobContext.get()); + } + else + { + m_memoryUsage += data->m_compressionInfo.m_uncompressedSize; + auto job = [this, &info]() + { + PartialDecompression(m_context, info); + }; + decompressionJob = AZ::CreateJobFunction(job, true, m_decompressionjobContext.get()); + } + --m_numPendingDecompression; + ++m_numRunningJobs; + decompressionJob->Start(); + + m_readRequests[readSlot] = nullptr; + m_readBufferStatus[readSlot] = ReadBufferStatus::Unused; + AZ_Assert(m_numInFlightReads > 0, "Trying to decrement a read request after it's queued for decompression in FullFileDecompressor, but no read requests are supposed to be queued."); + m_numInFlightReads--; + + queuedJobs = true; + break; + } + + if (m_numInFlightReads == 0 || m_numRunningJobs == m_maxNumJobs) + { + return queuedJobs; + } } + return queuedJobs; + } - void FullFileDecompressor::FullDecompression(StreamerContext* context, DecompressionInformation& info) + void FullFileDecompressor::FinishDecompression([[maybe_unused]] FileRequest* waitRequest, u32 jobSlot) + { + DecompressionInformation& jobInfo = m_processingJobs[jobSlot]; + AZ_Assert(jobInfo.m_waitRequest == waitRequest, "Job slot didn't contain the expected wait request."); + + auto endTime = AZStd::chrono::high_resolution_clock::now(); + + FileRequest* compressedRequest = jobInfo.m_waitRequest->GetParent(); + AZ_Assert(compressedRequest, "A wait request attached to FullFileDecompressor was completed but didn't have a parent compressed request."); + auto data = AZStd::get_if(&compressedRequest->GetCommand()); + AZ_Assert(data, "Compressed request in FullFileDecompressor that completed decompression didn't contain compression read data."); + CompressionInfo& info = data->m_compressionInfo; + size_t offsetAdjustment = info.m_offset - AZ_SIZE_ALIGN_DOWN(info.m_offset, aznumeric_cast(m_alignment)); + size_t bufferSize = AZ_SIZE_ALIGN_UP((info.m_compressedSize + offsetAdjustment), aznumeric_cast(m_alignment)); + m_memoryUsage -= bufferSize; + if (data->m_readOffset != 0 || data->m_readSize != data->m_compressionInfo.m_uncompressedSize) { - info.m_jobStartTime = AZStd::chrono::high_resolution_clock::now(); - - FileRequest* compressedRequest = info.m_waitRequest->GetParent(); - AZ_Assert(compressedRequest, "A wait request attached to FullFileDecompressor was completed but didn't have a parent compressed request."); - auto request = AZStd::get_if(&compressedRequest->GetCommand()); - AZ_Assert(request, "Compressed request in FullFileDecompressor that's running full decompression didn't contain compression read data."); - CompressionInfo& compressionInfo = request->m_compressionInfo; - AZ_Assert(compressionInfo.m_decompressor, "Full decompressor job started, but there's no decompressor callback assigned."); - - AZ_Assert(request->m_readOffset == 0, "FullFileDecompressor is doing a full decompression on a file request with an offset (%zu).", - request->m_readOffset); - AZ_Assert(compressionInfo.m_uncompressedSize == request->m_readSize, - "FullFileDecompressor is doing a full decompression, but the target buffer size (%llu) doesn't match the decompressed size (%zu).", - request->m_readSize, compressionInfo.m_uncompressedSize); - - bool success = compressionInfo.m_decompressor(compressionInfo, info.m_compressedData + info.m_alignmentOffset, - compressionInfo.m_compressedSize, request->m_output, compressionInfo.m_uncompressedSize); - info.m_waitRequest->SetStatus(success ? IStreamerTypes::RequestStatus::Completed : IStreamerTypes::RequestStatus::Failed); - - context->MarkRequestAsCompleted(info.m_waitRequest); - context->WakeUpSchedulingThread(); + m_memoryUsage -= data->m_compressionInfo.m_uncompressedSize; } - void FullFileDecompressor::PartialDecompression(StreamerContext* context, DecompressionInformation& info) - { - info.m_jobStartTime = AZStd::chrono::high_resolution_clock::now(); + m_decompressionJobDelayMicroSec.PushEntry(AZStd::chrono::duration_cast( + jobInfo.m_jobStartTime - jobInfo.m_queueStartTime).count()); + m_decompressionDurationMicroSec.PushEntry(AZStd::chrono::duration_cast( + endTime - jobInfo.m_jobStartTime).count()); + m_bytesDecompressed.PushEntry(data->m_compressionInfo.m_compressedSize); - FileRequest* compressedRequest = info.m_waitRequest->GetParent(); - AZ_Assert(compressedRequest, "A wait request attached to FullFileDecompressor was completed but didn't have a parent compressed request."); - auto request = AZStd::get_if(&compressedRequest->GetCommand()); - AZ_Assert(request, "Compressed request in FullFileDecompressor that's running partial decompression didn't contain compression read data."); - CompressionInfo& compressionInfo = request->m_compressionInfo; - AZ_Assert(compressionInfo.m_decompressor, "Partial decompressor job started, but there's no decompressor callback assigned."); + AZ::AllocatorInstance::Get().DeAllocate(jobInfo.m_compressedData, bufferSize, m_alignment); + jobInfo.m_compressedData = nullptr; + AZ_Assert(m_numRunningJobs > 0, "About to complete a decompression job, but the internal count doesn't see a running job."); + --m_numRunningJobs; + return; + } - AZStd::unique_ptr decompressionBuffer = AZStd::unique_ptr(new u8[compressionInfo.m_uncompressedSize]); - bool success = compressionInfo.m_decompressor(compressionInfo, info.m_compressedData + info.m_alignmentOffset, - compressionInfo.m_compressedSize, decompressionBuffer.get(), compressionInfo.m_uncompressedSize); - info.m_waitRequest->SetStatus(success ? IStreamerTypes::RequestStatus::Completed : IStreamerTypes::RequestStatus::Failed); - - memcpy(request->m_output, decompressionBuffer.get() + request->m_readOffset, request->m_readSize); + void FullFileDecompressor::FullDecompression(StreamerContext* context, DecompressionInformation& info) + { + info.m_jobStartTime = AZStd::chrono::high_resolution_clock::now(); - context->MarkRequestAsCompleted(info.m_waitRequest); - context->WakeUpSchedulingThread(); - } - } // namespace IO -} // namespace AZ + FileRequest* compressedRequest = info.m_waitRequest->GetParent(); + AZ_Assert(compressedRequest, "A wait request attached to FullFileDecompressor was completed but didn't have a parent compressed request."); + auto request = AZStd::get_if(&compressedRequest->GetCommand()); + AZ_Assert(request, "Compressed request in FullFileDecompressor that's running full decompression didn't contain compression read data."); + CompressionInfo& compressionInfo = request->m_compressionInfo; + AZ_Assert(compressionInfo.m_decompressor, "Full decompressor job started, but there's no decompressor callback assigned."); + + AZ_Assert(request->m_readOffset == 0, "FullFileDecompressor is doing a full decompression on a file request with an offset (%zu).", + request->m_readOffset); + AZ_Assert(compressionInfo.m_uncompressedSize == request->m_readSize, + "FullFileDecompressor is doing a full decompression, but the target buffer size (%llu) doesn't match the decompressed size (%zu).", + request->m_readSize, compressionInfo.m_uncompressedSize); + + bool success = compressionInfo.m_decompressor(compressionInfo, info.m_compressedData + info.m_alignmentOffset, + compressionInfo.m_compressedSize, request->m_output, compressionInfo.m_uncompressedSize); + info.m_waitRequest->SetStatus(success ? IStreamerTypes::RequestStatus::Completed : IStreamerTypes::RequestStatus::Failed); + + context->MarkRequestAsCompleted(info.m_waitRequest); + context->WakeUpSchedulingThread(); + } + + void FullFileDecompressor::PartialDecompression(StreamerContext* context, DecompressionInformation& info) + { + info.m_jobStartTime = AZStd::chrono::high_resolution_clock::now(); + + FileRequest* compressedRequest = info.m_waitRequest->GetParent(); + AZ_Assert(compressedRequest, "A wait request attached to FullFileDecompressor was completed but didn't have a parent compressed request."); + auto request = AZStd::get_if(&compressedRequest->GetCommand()); + AZ_Assert(request, "Compressed request in FullFileDecompressor that's running partial decompression didn't contain compression read data."); + CompressionInfo& compressionInfo = request->m_compressionInfo; + AZ_Assert(compressionInfo.m_decompressor, "Partial decompressor job started, but there's no decompressor callback assigned."); + + AZStd::unique_ptr decompressionBuffer = AZStd::unique_ptr(new u8[compressionInfo.m_uncompressedSize]); + bool success = compressionInfo.m_decompressor(compressionInfo, info.m_compressedData + info.m_alignmentOffset, + compressionInfo.m_compressedSize, decompressionBuffer.get(), compressionInfo.m_uncompressedSize); + info.m_waitRequest->SetStatus(success ? IStreamerTypes::RequestStatus::Completed : IStreamerTypes::RequestStatus::Failed); + + memcpy(request->m_output, decompressionBuffer.get() + request->m_readOffset, request->m_readSize); + + context->MarkRequestAsCompleted(info.m_waitRequest); + context->WakeUpSchedulingThread(); + } +} // namespace AZ::IO diff --git a/Code/Framework/AzCore/AzCore/IO/Streamer/FullFileDecompressor.h b/Code/Framework/AzCore/AzCore/IO/Streamer/FullFileDecompressor.h index e06aeecb22..d9bd68f1a1 100644 --- a/Code/Framework/AzCore/AzCore/IO/Streamer/FullFileDecompressor.h +++ b/Code/Framework/AzCore/AzCore/IO/Streamer/FullFileDecompressor.h @@ -19,118 +19,115 @@ #include #include -namespace AZ +namespace AZ::IO { - namespace IO + struct FullFileDecompressorConfig final : + public IStreamerStackConfig { - struct FullFileDecompressorConfig final : - public IStreamerStackConfig + AZ_RTTI(AZ::IO::FullFileDecompressorConfig, "{C96B7EC1-8C73-4493-A7CB-66F5D550FC3A}", IStreamerStackConfig); + AZ_CLASS_ALLOCATOR(FullFileDecompressorConfig, AZ::SystemAllocator, 0); + + ~FullFileDecompressorConfig() override = default; + AZStd::shared_ptr AddStreamStackEntry( + const HardwareInformation& hardware, AZStd::shared_ptr parent) override; + static void Reflect(AZ::ReflectContext* context); + + //! Maximum number of reads that are kept in flight. + u32 m_maxNumReads{ 2 }; + //! Maximum number of decompression jobs that can run simultaneously. + u32 m_maxNumJobs{ 2 }; + }; + + //! Entry in the streaming stack that decompresses files from an archive that are stored + //! as single files and without equally distributed seek points. + //! Because the target archive has compressed the entire file, it needs to be decompressed + //! completely, so even if the file is partially read, it needs to be fully loaded. This + //! also means that there's no upper limit to the memory so every decompression job will + //! need to allocate memory as a temporary buffer (in-place decompression is not supported). + //! Finally, the lack of an upper limit also means that the duration of the decompression job + //! can vary largely so a dedicated job system is used to decompress on to avoid blocking + //! the main job system from working. + class FullFileDecompressor + : public StreamStackEntry + { + public: + FullFileDecompressor(u32 maxNumReads, u32 maxNumJobs, u32 alignment); + ~FullFileDecompressor() override = default; + + void PrepareRequest(FileRequest* request) override; + void QueueRequest(FileRequest* request) override; + bool ExecuteRequests() override; + + void UpdateStatus(Status& status) const override; + void UpdateCompletionEstimates(AZStd::chrono::system_clock::time_point now, AZStd::vector& internalPending, + StreamerContext::PreparedQueue::iterator pendingBegin, StreamerContext::PreparedQueue::iterator pendingEnd) override; + + void CollectStatistics(AZStd::vector& statistics) const override; + + private: + using Buffer = u8*; + + enum class ReadBufferStatus : uint8_t { - AZ_RTTI(AZ::IO::FullFileDecompressorConfig, "{C96B7EC1-8C73-4493-A7CB-66F5D550FC3A}", IStreamerStackConfig); - AZ_CLASS_ALLOCATOR(FullFileDecompressorConfig, AZ::SystemAllocator, 0); - - ~FullFileDecompressorConfig() override = default; - AZStd::shared_ptr AddStreamStackEntry( - const HardwareInformation& hardware, AZStd::shared_ptr parent) override; - static void Reflect(AZ::ReflectContext* context); - - //! Maximum number of reads that are kept in flight. - u32 m_maxNumReads{ 2 }; - //! Maximum number of decompression jobs that can run simultaneously. - u32 m_maxNumJobs{ 2 }; + Unused, + ReadInFlight, + PendingDecompression }; - //! Entry in the streaming stack that decompresses files from an archive that are stored - //! as single files and without equally distributed seek points. - //! Because the target archive has compressed the entire file, it needs to be decompressed - //! completely, so even if the file is partially read, it needs to be fully loaded. This - //! also means that there's no upper limit to the memory so every decompression job will - //! need to allocate memory as a temporary buffer (in-place decompression is not supported). - //! Finally, the lack of an upper limit also means that the duration of the decompression job - //! can vary largely so a dedicated job system is used to decompress on to avoid blocking - //! the main job system from working. - class FullFileDecompressor - : public StreamStackEntry + struct DecompressionInformation { - public: - FullFileDecompressor(u32 maxNumReads, u32 maxNumJobs, u32 alignment); - ~FullFileDecompressor() override = default; + bool IsProcessing() const; - void PrepareRequest(FileRequest* request) override; - void QueueRequest(FileRequest* request) override; - bool ExecuteRequests() override; - - void UpdateStatus(Status& status) const override; - void UpdateCompletionEstimates(AZStd::chrono::system_clock::time_point now, AZStd::vector& internalPending, - StreamerContext::PreparedQueue::iterator pendingBegin, StreamerContext::PreparedQueue::iterator pendingEnd) override; - - void CollectStatistics(AZStd::vector& statistics) const override; + AZStd::chrono::high_resolution_clock::time_point m_queueStartTime; + AZStd::chrono::high_resolution_clock::time_point m_jobStartTime; + Buffer m_compressedData{ nullptr }; + FileRequest* m_waitRequest{ nullptr }; + u32 m_alignmentOffset{ 0 }; + }; - private: - using Buffer = u8*; + bool IsIdle() const; - enum class ReadBufferStatus : uint8_t - { - Unused, - ReadInFlight, - PendingDecompression - }; + void PrepareReadRequest(FileRequest* request, FileRequest::ReadRequestData& data); + void PrepareDedicatedCache(FileRequest* request, const RequestPath& path); + void FileExistsCheck(FileRequest* checkRequest); - struct DecompressionInformation - { - bool IsProcessing() const; + void EstimateCompressedReadRequest(FileRequest* request, AZStd::chrono::microseconds& cumulativeDelay, + AZStd::chrono::microseconds decompressionDelay, double totalDecompressionDurationUs, double totalBytesDecompressed) const; - AZStd::chrono::high_resolution_clock::time_point m_queueStartTime; - AZStd::chrono::high_resolution_clock::time_point m_jobStartTime; - Buffer m_compressedData{ nullptr }; - FileRequest* m_waitRequest{ nullptr }; - u32 m_alignmentOffset{ 0 }; - }; + void StartArchiveRead(FileRequest* compressedReadRequest); + void FinishArchiveRead(FileRequest* readRequest, u32 readSlot); + bool StartDecompressions(); + void FinishDecompression(FileRequest* waitRequest, u32 jobSlot); - bool IsIdle() const; + static void FullDecompression(StreamerContext* context, DecompressionInformation& info); + static void PartialDecompression(StreamerContext* context, DecompressionInformation& info); - void PrepareReadRequest(FileRequest* request, FileRequest::ReadRequestData& data); - void PrepareDedicatedCache(FileRequest* request, const RequestPath& path); - void FileExistsCheck(FileRequest* checkRequest); + AZStd::deque m_pendingReads; + AZStd::deque m_pendingFileExistChecks; - void EstimateCompressedReadRequest(FileRequest* request, AZStd::chrono::microseconds& cumulativeDelay, - AZStd::chrono::microseconds decompressionDelay, double totalDecompressionDurationUs, double totalBytesDecompressed) const; - - void StartArchiveRead(FileRequest* compressedReadRequest); - void FinishArchiveRead(FileRequest* readRequest, u32 readSlot); - bool StartDecompressions(); - void FinishDecompression(FileRequest* waitRequest, u32 jobSlot); - - static void FullDecompression(StreamerContext* context, DecompressionInformation& info); - static void PartialDecompression(StreamerContext* context, DecompressionInformation& info); - - AZStd::deque m_pendingReads; - AZStd::deque m_pendingFileExistChecks; - - AverageWindow m_decompressionJobDelayMicroSec; - AverageWindow m_decompressionDurationMicroSec; - AverageWindow m_bytesDecompressed; + AverageWindow m_decompressionJobDelayMicroSec; + AverageWindow m_decompressionDurationMicroSec; + AverageWindow m_bytesDecompressed; #if AZ_STREAMER_ADD_EXTRA_PROFILING_INFO - AZ::Statistics::RunningStatistic m_decompressionBoundStat; - AZ::Statistics::RunningStatistic m_readBoundStat; + AZ::Statistics::RunningStatistic m_decompressionBoundStat; + AZ::Statistics::RunningStatistic m_readBoundStat; #endif - AZStd::unique_ptr m_readBuffers; - // Nullptr if not reading, the read request if reading the file and the wait request for decompression when waiting on decompression. - AZStd::unique_ptr m_readRequests; - AZStd::unique_ptr m_readBufferStatus; - - AZStd::unique_ptr m_processingJobs; - AZStd::unique_ptr m_decompressionJobManager; - AZStd::unique_ptr m_decompressionjobContext; + AZStd::unique_ptr m_readBuffers; + // Nullptr if not reading, the read request if reading the file and the wait request for decompression when waiting on decompression. + AZStd::unique_ptr m_readRequests; + AZStd::unique_ptr m_readBufferStatus; - size_t m_memoryUsage{ 0 }; //!< Amount of memory used for buffers by the decompressor. - u32 m_maxNumReads{ 2 }; - u32 m_numInFlightReads{ 0 }; - u32 m_numPendingDecompression{ 0 }; - u32 m_maxNumJobs{ 1 }; - u32 m_numRunningJobs{ 0 }; - u32 m_alignment{ 0 }; - }; - } // namespace IO -} // namespace AZ + AZStd::unique_ptr m_processingJobs; + AZStd::unique_ptr m_decompressionJobManager; + AZStd::unique_ptr m_decompressionjobContext; + + size_t m_memoryUsage{ 0 }; //!< Amount of memory used for buffers by the decompressor. + u32 m_maxNumReads{ 2 }; + u32 m_numInFlightReads{ 0 }; + u32 m_numPendingDecompression{ 0 }; + u32 m_maxNumJobs{ 1 }; + u32 m_numRunningJobs{ 0 }; + u32 m_alignment{ 0 }; + }; +} // namespace AZ::IO diff --git a/Code/Framework/AzCore/AzCore/IO/Streamer/ReadSplitter.cpp b/Code/Framework/AzCore/AzCore/IO/Streamer/ReadSplitter.cpp index 00c1c63933..a952e31a93 100644 --- a/Code/Framework/AzCore/AzCore/IO/Streamer/ReadSplitter.cpp +++ b/Code/Framework/AzCore/AzCore/IO/Streamer/ReadSplitter.cpp @@ -14,376 +14,373 @@ #include #include -namespace AZ +namespace AZ::IO { - namespace IO + AZStd::shared_ptr ReadSplitterConfig::AddStreamStackEntry( + const HardwareInformation& hardware, AZStd::shared_ptr parent) { - AZStd::shared_ptr ReadSplitterConfig::AddStreamStackEntry( - const HardwareInformation& hardware, AZStd::shared_ptr parent) + size_t splitSize; + switch (m_splitSize) { - size_t splitSize; - switch (m_splitSize) - { - case SplitSize::MaxTransfer: - splitSize = hardware.m_maxTransfer; - break; - case SplitSize::MemoryAlignment: - splitSize = hardware.m_maxPhysicalSectorSize; - break; - default: - splitSize = m_splitSize; - break; - } - - size_t bufferSize = m_bufferSizeMib * 1_mib; - if (bufferSize < splitSize) - { - AZ_Warning("Streamer", false, "The buffer size for the Read Splitter is smaller than the individual split size. " - "It will be increased to fit at least one split."); - bufferSize = splitSize; - } - - auto stackEntry = AZStd::make_shared( - splitSize, - aznumeric_caster(hardware.m_maxPhysicalSectorSize), - aznumeric_caster(hardware.m_maxLogicalSectorSize), - bufferSize, m_adjustOffset, m_splitAlignedRequests); - stackEntry->SetNext(AZStd::move(parent)); - return stackEntry; + case SplitSize::MaxTransfer: + splitSize = hardware.m_maxTransfer; + break; + case SplitSize::MemoryAlignment: + splitSize = hardware.m_maxPhysicalSectorSize; + break; + default: + splitSize = m_splitSize; + break; } - void ReadSplitterConfig::Reflect(AZ::ReflectContext* context) + size_t bufferSize = m_bufferSizeMib * 1_mib; + if (bufferSize < splitSize) { - if (auto serializeContext = azrtti_cast(context); serializeContext != nullptr) - { - serializeContext->Enum() - ->Version(1) - ->Value("MaxTransfer", SplitSize::MaxTransfer) - ->Value("MemoryAlignment", SplitSize::MemoryAlignment); - - serializeContext->Class() - ->Version(1) - ->Field("BufferSizeMib", &ReadSplitterConfig::m_bufferSizeMib) - ->Field("SplitSize", &ReadSplitterConfig::m_splitSize) - ->Field("AdjustOffset", &ReadSplitterConfig::m_adjustOffset) - ->Field("SplitAlignedRequests", &ReadSplitterConfig::m_splitAlignedRequests); - } + AZ_Warning("Streamer", false, "The buffer size for the Read Splitter is smaller than the individual split size. " + "It will be increased to fit at least one split."); + bufferSize = splitSize; } - static constexpr char AvgNumSubReadsName[] = "Avg. num sub reads"; - static constexpr char AlignedReadsName[] = "Aligned reads"; - static constexpr char NumAvailableBufferSlotsName[] = "Num available buffer slots"; - static constexpr char NumPendingReadsName[] = "Num pending reads"; + auto stackEntry = AZStd::make_shared( + splitSize, + aznumeric_caster(hardware.m_maxPhysicalSectorSize), + aznumeric_caster(hardware.m_maxLogicalSectorSize), + bufferSize, m_adjustOffset, m_splitAlignedRequests); + stackEntry->SetNext(AZStd::move(parent)); + return stackEntry; + } - ReadSplitter::ReadSplitter(u64 maxReadSize, u32 memoryAlignment, u32 sizeAlignment, size_t bufferSize, - bool adjustOffset, bool splitAlignedRequests) - : StreamStackEntry("Read splitter") - , m_buffer(nullptr) - , m_bufferSize(bufferSize) - , m_maxReadSize(maxReadSize) - , m_memoryAlignment(memoryAlignment) - , m_sizeAlignment(sizeAlignment) - , m_adjustOffset(adjustOffset) - , m_splitAlignedRequests(splitAlignedRequests) + void ReadSplitterConfig::Reflect(AZ::ReflectContext* context) + { + if (auto serializeContext = azrtti_cast(context); serializeContext != nullptr) { - AZ_Assert(IStreamerTypes::IsPowerOf2(memoryAlignment), "Memory alignment needs to be a power of 2"); - AZ_Assert(IStreamerTypes::IsPowerOf2(sizeAlignment), "Size alignment needs to be a power of 2"); - AZ_Assert(IStreamerTypes::IsAlignedTo(maxReadSize, sizeAlignment), - "Maximum read size isn't aligned to a multiple of the size alignment."); + serializeContext->Enum() + ->Version(1) + ->Value("MaxTransfer", SplitSize::MaxTransfer) + ->Value("MemoryAlignment", SplitSize::MemoryAlignment); - size_t numBufferSlots = bufferSize / maxReadSize; - // Don't divide the reads up in more sub-reads than there are dependencies available. - numBufferSlots = AZStd::min(numBufferSlots, FileRequest::GetMaxNumDependencies()); - m_bufferCopyInformation = AZStd::unique_ptr(new BufferCopyInformation[numBufferSlots]); - m_availableBufferSlots.reserve(numBufferSlots); - for (u32 i = aznumeric_caster(numBufferSlots); i > 0; --i) - { - m_availableBufferSlots.push_back(i - 1); - } + serializeContext->Class() + ->Version(1) + ->Field("BufferSizeMib", &ReadSplitterConfig::m_bufferSizeMib) + ->Field("SplitSize", &ReadSplitterConfig::m_splitSize) + ->Field("AdjustOffset", &ReadSplitterConfig::m_adjustOffset) + ->Field("SplitAlignedRequests", &ReadSplitterConfig::m_splitAlignedRequests); + } + } + + static constexpr char AvgNumSubReadsName[] = "Avg. num sub reads"; + static constexpr char AlignedReadsName[] = "Aligned reads"; + static constexpr char NumAvailableBufferSlotsName[] = "Num available buffer slots"; + static constexpr char NumPendingReadsName[] = "Num pending reads"; + + ReadSplitter::ReadSplitter(u64 maxReadSize, u32 memoryAlignment, u32 sizeAlignment, size_t bufferSize, + bool adjustOffset, bool splitAlignedRequests) + : StreamStackEntry("Read splitter") + , m_buffer(nullptr) + , m_bufferSize(bufferSize) + , m_maxReadSize(maxReadSize) + , m_memoryAlignment(memoryAlignment) + , m_sizeAlignment(sizeAlignment) + , m_adjustOffset(adjustOffset) + , m_splitAlignedRequests(splitAlignedRequests) + { + AZ_Assert(IStreamerTypes::IsPowerOf2(memoryAlignment), "Memory alignment needs to be a power of 2"); + AZ_Assert(IStreamerTypes::IsPowerOf2(sizeAlignment), "Size alignment needs to be a power of 2"); + AZ_Assert(IStreamerTypes::IsAlignedTo(maxReadSize, sizeAlignment), + "Maximum read size isn't aligned to a multiple of the size alignment."); + + size_t numBufferSlots = bufferSize / maxReadSize; + // Don't divide the reads up in more sub-reads than there are dependencies available. + numBufferSlots = AZStd::min(numBufferSlots, FileRequest::GetMaxNumDependencies()); + m_bufferCopyInformation = AZStd::unique_ptr(new BufferCopyInformation[numBufferSlots]); + m_availableBufferSlots.reserve(numBufferSlots); + for (u32 i = aznumeric_caster(numBufferSlots); i > 0; --i) + { + m_availableBufferSlots.push_back(i - 1); + } + } + + ReadSplitter::~ReadSplitter() + { + if (m_buffer) + { + AZ::AllocatorInstance::Get().DeAllocate(m_buffer, m_bufferSize, m_memoryAlignment); + } + } + + void ReadSplitter::QueueRequest(FileRequest* request) + { + AZ_Assert(request, "QueueRequest was provided a null request."); + if (!m_next) + { + request->SetStatus(IStreamerTypes::RequestStatus::Failed); + m_context->MarkRequestAsCompleted(request); + return; } - ReadSplitter::~ReadSplitter() + auto data = AZStd::get_if(&request->GetCommand()); + if (data == nullptr) { - if (m_buffer) - { - AZ::AllocatorInstance::Get().DeAllocate(m_buffer, m_bufferSize, m_memoryAlignment); - } + StreamStackEntry::QueueRequest(request); + return; } - void ReadSplitter::QueueRequest(FileRequest* request) - { - AZ_Assert(request, "QueueRequest was provided a null request."); - if (!m_next) - { - request->SetStatus(IStreamerTypes::RequestStatus::Failed); - m_context->MarkRequestAsCompleted(request); - return; - } + m_averageNumSubReadsStat.PushSample(aznumeric_cast((data->m_size / m_maxReadSize) + 1)); + Statistic::PlotImmediate(m_name, AvgNumSubReadsName, m_averageNumSubReadsStat.GetMostRecentSample()); - auto data = AZStd::get_if(&request->GetCommand()); - if (data == nullptr) + bool isAligned = IStreamerTypes::IsAlignedTo(data->m_output, m_memoryAlignment); + if (m_adjustOffset) + { + isAligned = isAligned && IStreamerTypes::IsAlignedTo(data->m_offset, m_sizeAlignment); + } + + if (isAligned || m_bufferSize == 0) + { + m_alignedReadsStat.PushSample(isAligned ? 1.0 : 0.0); + if (!m_splitAlignedRequests) { StreamStackEntry::QueueRequest(request); - return; - } - - m_averageNumSubReadsStat.PushSample(aznumeric_cast((data->m_size / m_maxReadSize) + 1)); - Statistic::PlotImmediate(m_name, AvgNumSubReadsName, m_averageNumSubReadsStat.GetMostRecentSample()); - - bool isAligned = IStreamerTypes::IsAlignedTo(data->m_output, m_memoryAlignment); - if (m_adjustOffset) - { - isAligned = isAligned && IStreamerTypes::IsAlignedTo(data->m_offset, m_sizeAlignment); - } - - if (isAligned || m_bufferSize == 0) - { - m_alignedReadsStat.PushSample(isAligned ? 1.0 : 0.0); - if (!m_splitAlignedRequests) - { - StreamStackEntry::QueueRequest(request); - } - else - { - QueueAlignedRead(request); - } } else { - m_alignedReadsStat.PushSample(0.0); - InitializeBuffer(); - QueueBufferedRead(request); + QueueAlignedRead(request); } } - - void ReadSplitter::QueueAlignedRead(FileRequest* request) + else { - auto data = AZStd::get_if(&request->GetCommand()); - AZ_Assert(data != nullptr, "Provided request to queue by the Read Splitter did not contain a read command."); + m_alignedReadsStat.PushSample(0.0); + InitializeBuffer(); + QueueBufferedRead(request); + } + } - if (data->m_size <= m_maxReadSize) - { - StreamStackEntry::QueueRequest(request); - return; - } + void ReadSplitter::QueueAlignedRead(FileRequest* request) + { + auto data = AZStd::get_if(&request->GetCommand()); + AZ_Assert(data != nullptr, "Provided request to queue by the Read Splitter did not contain a read command."); - PendingRead pendingRead; - pendingRead.m_request = request; - pendingRead.m_output = reinterpret_cast(data->m_output); - pendingRead.m_outputSize = data->m_outputSize; - pendingRead.m_readSize = data->m_size; - pendingRead.m_offset = data->m_offset; - pendingRead.m_isBuffered = false; - - if (!m_pendingReads.empty()) - { - m_pendingReads.push_back(pendingRead); - return; - } - - if (!QueueAlignedRead(pendingRead)) - { - m_pendingReads.push_back(pendingRead); - } + if (data->m_size <= m_maxReadSize) + { + StreamStackEntry::QueueRequest(request); + return; } - bool ReadSplitter::QueueAlignedRead(PendingRead& pending) + PendingRead pendingRead; + pendingRead.m_request = request; + pendingRead.m_output = reinterpret_cast(data->m_output); + pendingRead.m_outputSize = data->m_outputSize; + pendingRead.m_readSize = data->m_size; + pendingRead.m_offset = data->m_offset; + pendingRead.m_isBuffered = false; + + if (!m_pendingReads.empty()) { - auto data = AZStd::get_if(&pending.m_request->GetCommand()); - AZ_Assert(data != nullptr, "Provided request to queue by the Read Splitter did not contain a read command."); + m_pendingReads.push_back(pendingRead); + return; + } - while (pending.m_readSize > 0) + if (!QueueAlignedRead(pendingRead)) + { + m_pendingReads.push_back(pendingRead); + } + } + + bool ReadSplitter::QueueAlignedRead(PendingRead& pending) + { + auto data = AZStd::get_if(&pending.m_request->GetCommand()); + AZ_Assert(data != nullptr, "Provided request to queue by the Read Splitter did not contain a read command."); + + while (pending.m_readSize > 0) + { + if (pending.m_request->GetNumDependencies() >= FileRequest::GetMaxNumDependencies()) { - if (pending.m_request->GetNumDependencies() >= FileRequest::GetMaxNumDependencies()) + // Add a wait to make sure the read request isn't completed if all sub-reads completed before + // the ReadSplitter has had a chance to add new sub-reads to complete the read. + if (pending.m_wait == nullptr) { - // Add a wait to make sure the read request isn't completed if all sub-reads completed before - // the ReadSplitter has had a chance to add new sub-reads to complete the read. - if (pending.m_wait == nullptr) - { - pending.m_wait = m_context->GetNewInternalRequest(); - pending.m_wait->CreateWait(pending.m_request); - } - return false; + pending.m_wait = m_context->GetNewInternalRequest(); + pending.m_wait->CreateWait(pending.m_request); } + return false; + } - u64 readSize = m_maxReadSize; - size_t bufferSize = m_maxReadSize; - if (pending.m_readSize < m_maxReadSize) + u64 readSize = m_maxReadSize; + size_t bufferSize = m_maxReadSize; + if (pending.m_readSize < m_maxReadSize) + { + readSize = pending.m_readSize; + // This will be the last read so give the remainder of the output buffer to the final request. + bufferSize = pending.m_outputSize; + } + + FileRequest* subRequest = m_context->GetNewInternalRequest(); + subRequest->CreateRead(pending.m_request, pending.m_output, bufferSize, data->m_path, pending.m_offset, readSize, data->m_sharedRead); + subRequest->SetCompletionCallback([this](FileRequest&) { - readSize = pending.m_readSize; - // This will be the last read so give the remainder of the output buffer to the final request. - bufferSize = pending.m_outputSize; + AZ_PROFILE_FUNCTION(AzCore); + QueuePendingRequest(); + }); + m_next->QueueRequest(subRequest); + + pending.m_offset += readSize; + pending.m_readSize -= readSize; + pending.m_outputSize -= bufferSize; + pending.m_output += readSize; + } + if (pending.m_wait != nullptr) + { + m_context->MarkRequestAsCompleted(pending.m_wait); + pending.m_wait = nullptr; + } + return true; + } + + void ReadSplitter::QueueBufferedRead(FileRequest* request) + { + auto data = AZStd::get_if(&request->GetCommand()); + AZ_Assert(data != nullptr, "Provided request to queue by the Read Splitter did not contain a read command."); + + PendingRead pendingRead; + pendingRead.m_request = request; + pendingRead.m_output = reinterpret_cast(data->m_output); + pendingRead.m_outputSize = data->m_outputSize; + pendingRead.m_readSize = data->m_size; + pendingRead.m_offset = data->m_offset; + pendingRead.m_isBuffered = true; + + if (!m_pendingReads.empty()) + { + m_pendingReads.push_back(pendingRead); + return; + } + + if (!QueueBufferedRead(pendingRead)) + { + m_pendingReads.push_back(pendingRead); + } + } + + bool ReadSplitter::QueueBufferedRead(PendingRead& pending) + { + auto data = AZStd::get_if(&pending.m_request->GetCommand()); + AZ_Assert(data != nullptr, "Provided request to queue by the Read Splitter did not contain a read command."); + + while (pending.m_readSize > 0) + { + if (!m_availableBufferSlots.empty()) + { + u32 bufferSlot = m_availableBufferSlots.back(); + m_availableBufferSlots.pop_back(); + + u64 readSize; + u64 copySize; + u64 offset; + BufferCopyInformation& copyInfo = m_bufferCopyInformation[bufferSlot]; + copyInfo.m_target = pending.m_output; + + if (m_adjustOffset) + { + offset = AZ_SIZE_ALIGN_DOWN(pending.m_offset, aznumeric_cast(m_sizeAlignment)); + size_t bufferOffset = pending.m_offset - offset; + copyInfo.m_bufferOffset = bufferOffset; + readSize = AZStd::min(pending.m_readSize + bufferOffset, m_maxReadSize); + copySize = readSize - bufferOffset; } - + else + { + offset = pending.m_offset; + readSize = AZStd::min(pending.m_readSize, m_maxReadSize); + copySize = readSize; + } + AZ_Assert(readSize <= m_maxReadSize, "Read size %llu in read splitter exceeds the maximum split size of %llu.", + readSize, m_maxReadSize); + copyInfo.m_size = copySize; + FileRequest* subRequest = m_context->GetNewInternalRequest(); - subRequest->CreateRead(pending.m_request, pending.m_output, bufferSize, data->m_path, pending.m_offset, readSize, data->m_sharedRead); - subRequest->SetCompletionCallback([this](FileRequest&) + subRequest->CreateRead(pending.m_request, GetBufferSlot(bufferSlot), m_maxReadSize, data->m_path, + offset, readSize, data->m_sharedRead); + subRequest->SetCompletionCallback([this, bufferSlot]([[maybe_unused]] FileRequest& request) { AZ_PROFILE_FUNCTION(AzCore); + + BufferCopyInformation& copyInfo = m_bufferCopyInformation[bufferSlot]; + memcpy(copyInfo.m_target, GetBufferSlot(bufferSlot) + copyInfo.m_bufferOffset, copyInfo.m_size); + m_availableBufferSlots.push_back(bufferSlot); + QueuePendingRequest(); }); m_next->QueueRequest(subRequest); - pending.m_offset += readSize; - pending.m_readSize -= readSize; - pending.m_outputSize -= bufferSize; - pending.m_output += readSize; + pending.m_offset += copySize; + pending.m_readSize -= copySize; + pending.m_outputSize -= copySize; + pending.m_output += copySize; } - if (pending.m_wait != nullptr) + else { - m_context->MarkRequestAsCompleted(pending.m_wait); - pending.m_wait = nullptr; - } - return true; - } - - void ReadSplitter::QueueBufferedRead(FileRequest* request) - { - auto data = AZStd::get_if(&request->GetCommand()); - AZ_Assert(data != nullptr, "Provided request to queue by the Read Splitter did not contain a read command."); - - PendingRead pendingRead; - pendingRead.m_request = request; - pendingRead.m_output = reinterpret_cast(data->m_output); - pendingRead.m_outputSize = data->m_outputSize; - pendingRead.m_readSize = data->m_size; - pendingRead.m_offset = data->m_offset; - pendingRead.m_isBuffered = true; - - if (!m_pendingReads.empty()) - { - m_pendingReads.push_back(pendingRead); - return; - } - - if (!QueueBufferedRead(pendingRead)) - { - m_pendingReads.push_back(pendingRead); - } - } - - bool ReadSplitter::QueueBufferedRead(PendingRead& pending) - { - auto data = AZStd::get_if(&pending.m_request->GetCommand()); - AZ_Assert(data != nullptr, "Provided request to queue by the Read Splitter did not contain a read command."); - - while (pending.m_readSize > 0) - { - if (!m_availableBufferSlots.empty()) + // Add a wait to make sure the read request isn't completed if all sub-reads completed before + // the ReadSplitter has had a chance to add new sub-reads to complete the read. + if (pending.m_wait == nullptr) { - u32 bufferSlot = m_availableBufferSlots.back(); - m_availableBufferSlots.pop_back(); - - u64 readSize; - u64 copySize; - u64 offset; - BufferCopyInformation& copyInfo = m_bufferCopyInformation[bufferSlot]; - copyInfo.m_target = pending.m_output; - - if (m_adjustOffset) - { - offset = AZ_SIZE_ALIGN_DOWN(pending.m_offset, aznumeric_cast(m_sizeAlignment)); - size_t bufferOffset = pending.m_offset - offset; - copyInfo.m_bufferOffset = bufferOffset; - readSize = AZStd::min(pending.m_readSize + bufferOffset, m_maxReadSize); - copySize = readSize - bufferOffset; - } - else - { - offset = pending.m_offset; - readSize = AZStd::min(pending.m_readSize, m_maxReadSize); - copySize = readSize; - } - AZ_Assert(readSize <= m_maxReadSize, "Read size %llu in read splitter exceeds the maximum split size of %llu.", - readSize, m_maxReadSize); - copyInfo.m_size = copySize; - - FileRequest* subRequest = m_context->GetNewInternalRequest(); - subRequest->CreateRead(pending.m_request, GetBufferSlot(bufferSlot), m_maxReadSize, data->m_path, - offset, readSize, data->m_sharedRead); - subRequest->SetCompletionCallback([this, bufferSlot]([[maybe_unused]] FileRequest& request) - { - AZ_PROFILE_FUNCTION(AzCore); - - BufferCopyInformation& copyInfo = m_bufferCopyInformation[bufferSlot]; - memcpy(copyInfo.m_target, GetBufferSlot(bufferSlot) + copyInfo.m_bufferOffset, copyInfo.m_size); - m_availableBufferSlots.push_back(bufferSlot); - - QueuePendingRequest(); - }); - m_next->QueueRequest(subRequest); - - pending.m_offset += copySize; - pending.m_readSize -= copySize; - pending.m_outputSize -= copySize; - pending.m_output += copySize; - } - else - { - // Add a wait to make sure the read request isn't completed if all sub-reads completed before - // the ReadSplitter has had a chance to add new sub-reads to complete the read. - if (pending.m_wait == nullptr) - { - pending.m_wait = m_context->GetNewInternalRequest(); - pending.m_wait->CreateWait(pending.m_request); - } - return false; + pending.m_wait = m_context->GetNewInternalRequest(); + pending.m_wait->CreateWait(pending.m_request); } + return false; } - if (pending.m_wait != nullptr) + } + if (pending.m_wait != nullptr) + { + m_context->MarkRequestAsCompleted(pending.m_wait); + pending.m_wait = nullptr; + } + return true; + } + + void ReadSplitter::QueuePendingRequest() + { + if (!m_pendingReads.empty()) + { + PendingRead& pendingRead = m_pendingReads.front(); + if (pendingRead.m_isBuffered ? QueueBufferedRead(pendingRead) : QueueAlignedRead(pendingRead)) { - m_context->MarkRequestAsCompleted(pending.m_wait); - pending.m_wait = nullptr; - } - return true; - } - - void ReadSplitter::QueuePendingRequest() - { - if (!m_pendingReads.empty()) - { - PendingRead& pendingRead = m_pendingReads.front(); - if (pendingRead.m_isBuffered ? QueueBufferedRead(pendingRead) : QueueAlignedRead(pendingRead)) - { - m_pendingReads.pop_front(); - } + m_pendingReads.pop_front(); } } + } - void ReadSplitter::UpdateStatus(Status& status) const + void ReadSplitter::UpdateStatus(Status& status) const + { + StreamStackEntry::UpdateStatus(status); + if (m_bufferSize > 0) { - StreamStackEntry::UpdateStatus(status); - if (m_bufferSize > 0) - { - s32 numAvailableSlots = aznumeric_cast(m_availableBufferSlots.size()); - status.m_numAvailableSlots = AZStd::min(status.m_numAvailableSlots, numAvailableSlots); - status.m_isIdle = status.m_isIdle && m_pendingReads.empty(); - } + s32 numAvailableSlots = aznumeric_cast(m_availableBufferSlots.size()); + status.m_numAvailableSlots = AZStd::min(status.m_numAvailableSlots, numAvailableSlots); + status.m_isIdle = status.m_isIdle && m_pendingReads.empty(); } + } - void ReadSplitter::CollectStatistics(AZStd::vector& statistics) const - { - statistics.push_back(Statistic::CreateFloat(m_name, AvgNumSubReadsName, m_averageNumSubReadsStat.GetAverage())); - statistics.push_back(Statistic::CreatePercentage(m_name, AlignedReadsName, m_alignedReadsStat.GetAverage())); - statistics.push_back(Statistic::CreateInteger(m_name, NumAvailableBufferSlotsName, aznumeric_caster(m_availableBufferSlots.size()))); - statistics.push_back(Statistic::CreateInteger(m_name, NumPendingReadsName, aznumeric_caster(m_pendingReads.size()))); - StreamStackEntry::CollectStatistics(statistics); - } + void ReadSplitter::CollectStatistics(AZStd::vector& statistics) const + { + statistics.push_back(Statistic::CreateFloat(m_name, AvgNumSubReadsName, m_averageNumSubReadsStat.GetAverage())); + statistics.push_back(Statistic::CreatePercentage(m_name, AlignedReadsName, m_alignedReadsStat.GetAverage())); + statistics.push_back(Statistic::CreateInteger(m_name, NumAvailableBufferSlotsName, aznumeric_caster(m_availableBufferSlots.size()))); + statistics.push_back(Statistic::CreateInteger(m_name, NumPendingReadsName, aznumeric_caster(m_pendingReads.size()))); + StreamStackEntry::CollectStatistics(statistics); + } - void ReadSplitter::InitializeBuffer() + void ReadSplitter::InitializeBuffer() + { + // Lazy initialization to avoid allocating memory if it's not needed. + if (m_bufferSize != 0 && m_buffer == nullptr) { - // Lazy initialization to avoid allocating memory if it's not needed. - if (m_bufferSize != 0 && m_buffer == nullptr) - { - m_buffer = reinterpret_cast(AZ::AllocatorInstance::Get().Allocate( - m_bufferSize, m_memoryAlignment, 0, "AZ::IO::Streamer ReadSplitter", __FILE__, __LINE__)); - } + m_buffer = reinterpret_cast(AZ::AllocatorInstance::Get().Allocate( + m_bufferSize, m_memoryAlignment, 0, "AZ::IO::Streamer ReadSplitter", __FILE__, __LINE__)); } + } - u8* ReadSplitter::GetBufferSlot(size_t index) - { - AZ_Assert(m_buffer != nullptr, "A buffer slot was requested by the Read Splitter before the buffer was initialized."); - return m_buffer + (index * m_maxReadSize); - } - } // namespace IO -} // namesapce AZ + u8* ReadSplitter::GetBufferSlot(size_t index) + { + AZ_Assert(m_buffer != nullptr, "A buffer slot was requested by the Read Splitter before the buffer was initialized."); + return m_buffer + (index * m_maxReadSize); + } +} // namespace AZ::IO diff --git a/Code/Framework/AzCore/AzCore/IO/Streamer/Scheduler.cpp b/Code/Framework/AzCore/AzCore/IO/Streamer/Scheduler.cpp index 9ee0fefc99..fe1d5a5eda 100644 --- a/Code/Framework/AzCore/AzCore/IO/Streamer/Scheduler.cpp +++ b/Code/Framework/AzCore/AzCore/IO/Streamer/Scheduler.cpp @@ -227,7 +227,7 @@ namespace AZ::IO { auto parentReadRequest = next->GetCommandFromChain(); AZ_Assert(parentReadRequest != nullptr, "The issued read request can't be found for the (compressed) read command."); - + size_t size = parentReadRequest->m_size; if (parentReadRequest->m_output == nullptr) { @@ -266,7 +266,7 @@ namespace AZ::IO m_processingStartTime = AZStd::chrono::system_clock::now(); } #endif - + if constexpr (AZStd::is_same_v) { m_threadData.m_lastFilePath = args.m_path; @@ -411,7 +411,7 @@ namespace AZ::IO ++pendingIt; } } - + m_threadData.m_streamStack->QueueRequest(request); } diff --git a/Code/Framework/AzCore/AzCore/IO/Streamer/Scheduler.h b/Code/Framework/AzCore/AzCore/IO/Streamer/Scheduler.h index f9780ef411..053a57d332 100644 --- a/Code/Framework/AzCore/AzCore/IO/Streamer/Scheduler.h +++ b/Code/Framework/AzCore/AzCore/IO/Streamer/Scheduler.h @@ -23,7 +23,7 @@ namespace AZ::IO { class FileRequest; - + class Scheduler final { public: @@ -63,7 +63,7 @@ namespace AZ::IO void Thread_ProcessTillIdle(); void Thread_ProcessCancelRequest(FileRequest* request, FileRequest::CancelData& data); void Thread_ProcessRescheduleRequest(FileRequest* request, FileRequest::RescheduleData& data); - + enum class Order { FirstRequest, //< The first request is the most important to process next. diff --git a/Code/Framework/AzCore/AzCore/IO/Streamer/StorageDrive.cpp b/Code/Framework/AzCore/AzCore/IO/Streamer/StorageDrive.cpp index 6f33c0a216..cfd191b68f 100644 --- a/Code/Framework/AzCore/AzCore/IO/Streamer/StorageDrive.cpp +++ b/Code/Framework/AzCore/AzCore/IO/Streamer/StorageDrive.cpp @@ -16,454 +16,451 @@ #include #include -namespace AZ +namespace AZ::IO { - namespace IO + AZStd::shared_ptr StorageDriveConfig::AddStreamStackEntry( + [[maybe_unused]] const HardwareInformation& hardware, [[maybe_unused]] AZStd::shared_ptr parent) { - AZStd::shared_ptr StorageDriveConfig::AddStreamStackEntry( - [[maybe_unused]] const HardwareInformation& hardware, [[maybe_unused]] AZStd::shared_ptr parent) - { - return AZStd::make_shared(m_maxFileHandles); - } + return AZStd::make_shared(m_maxFileHandles); + } - void StorageDriveConfig::Reflect(AZ::ReflectContext* context) + void StorageDriveConfig::Reflect(AZ::ReflectContext* context) + { + if (auto serializeContext = azrtti_cast(context); serializeContext != nullptr) { - if (auto serializeContext = azrtti_cast(context); serializeContext != nullptr) + serializeContext->Class() + ->Version(1) + ->Field("MaxFileHandles", &StorageDriveConfig::m_maxFileHandles); + } + } + + const AZStd::chrono::microseconds StorageDrive::s_averageSeekTime = + AZStd::chrono::milliseconds(9) + // Common average seek time for desktop hdd drives. + AZStd::chrono::milliseconds(3); // Rotational latency for a 7200RPM disk + + StorageDrive::StorageDrive(u32 maxFileHandles) + : StreamStackEntry("Storage drive (generic)") + { + m_fileLastUsed.resize(maxFileHandles, AZStd::chrono::system_clock::time_point::min()); + m_filePaths.resize(maxFileHandles); + m_fileHandles.resize(maxFileHandles); + + // Add initial dummy values to the stats to avoid division by zero later on and avoid needing branches. + m_readSizeAverage.PushEntry(1); + m_readTimeAverage.PushEntry(AZStd::chrono::microseconds(1)); + } + + void StorageDrive::SetNext(AZStd::shared_ptr /*next*/) + { + AZ_Assert(false, "StorageDrive isn't allowed to have a node to forward requests to."); + } + + void StorageDrive::PrepareRequest(FileRequest* request) + { + AZ_PROFILE_FUNCTION(AzCore); + AZ_Assert(request, "PrepareRequest was provided a null request."); + + if (AZStd::holds_alternative(request->GetCommand())) + { + auto& readRequest = AZStd::get(request->GetCommand()); + + FileRequest* read = m_context->GetNewInternalRequest(); + read->CreateRead(request, readRequest.m_output, readRequest.m_outputSize, readRequest.m_path, + readRequest.m_offset, readRequest.m_size); + m_context->PushPreparedRequest(read); + return; + } + StreamStackEntry::PrepareRequest(request); + } + + void StorageDrive::QueueRequest(FileRequest* request) + { + AZ_Assert(request, "QueueRequest was provided a null request."); + AZStd::visit([this, request](auto&& args) + { + using Command = AZStd::decay_t; + if constexpr (AZStd::is_same_v || + AZStd::is_same_v || + AZStd::is_same_v) { - serializeContext->Class() - ->Version(1) - ->Field("MaxFileHandles", &StorageDriveConfig::m_maxFileHandles); - } - } - - const AZStd::chrono::microseconds StorageDrive::s_averageSeekTime = - AZStd::chrono::milliseconds(9) + // Common average seek time for desktop hdd drives. - AZStd::chrono::milliseconds(3); // Rotational latency for a 7200RPM disk - - StorageDrive::StorageDrive(u32 maxFileHandles) - : StreamStackEntry("Storage drive (generic)") - { - m_fileLastUsed.resize(maxFileHandles, AZStd::chrono::system_clock::time_point::min()); - m_filePaths.resize(maxFileHandles); - m_fileHandles.resize(maxFileHandles); - - // Add initial dummy values to the stats to avoid division by zero later on and avoid needing branches. - m_readSizeAverage.PushEntry(1); - m_readTimeAverage.PushEntry(AZStd::chrono::microseconds(1)); - } - - void StorageDrive::SetNext(AZStd::shared_ptr /*next*/) - { - AZ_Assert(false, "StorageDrive isn't allowed to have a node to forward requests to."); - } - - void StorageDrive::PrepareRequest(FileRequest* request) - { - AZ_PROFILE_FUNCTION(AzCore); - AZ_Assert(request, "PrepareRequest was provided a null request."); - - if (AZStd::holds_alternative(request->GetCommand())) - { - auto& readRequest = AZStd::get(request->GetCommand()); - - FileRequest* read = m_context->GetNewInternalRequest(); - read->CreateRead(request, readRequest.m_output, readRequest.m_outputSize, readRequest.m_path, - readRequest.m_offset, readRequest.m_size); - m_context->PushPreparedRequest(read); + m_pendingRequests.push_back(request); return; } - StreamStackEntry::PrepareRequest(request); - } + else if constexpr (AZStd::is_same_v) + { + CancelRequest(request, args.m_target); + return; + } + else + { + if constexpr (AZStd::is_same_v) + { + FlushCache(args.m_path); + } + else if constexpr (AZStd::is_same_v) + { + FlushEntireCache(); + } + else if constexpr (AZStd::is_same_v) + { + Report(args); + } + StreamStackEntry::QueueRequest(request); + } + }, request->GetCommand()); + } - void StorageDrive::QueueRequest(FileRequest* request) + bool StorageDrive::ExecuteRequests() + { + if (!m_pendingRequests.empty()) { - AZ_Assert(request, "QueueRequest was provided a null request."); + FileRequest* request = m_pendingRequests.front(); AZStd::visit([this, request](auto&& args) - { - using Command = AZStd::decay_t; - if constexpr (AZStd::is_same_v || - AZStd::is_same_v || - AZStd::is_same_v) - { - m_pendingRequests.push_back(request); - return; - } - else if constexpr (AZStd::is_same_v) - { - CancelRequest(request, args.m_target); - return; - } - else - { - if constexpr (AZStd::is_same_v) - { - FlushCache(args.m_path); - } - else if constexpr (AZStd::is_same_v) - { - FlushEntireCache(); - } - else if constexpr (AZStd::is_same_v) - { - Report(args); - } - StreamStackEntry::QueueRequest(request); - } - }, request->GetCommand()); - } - - bool StorageDrive::ExecuteRequests() - { - if (!m_pendingRequests.empty()) - { - FileRequest* request = m_pendingRequests.front(); - AZStd::visit([this, request](auto&& args) - { - using Command = AZStd::decay_t; - if constexpr (AZStd::is_same_v) - { - ReadFile(request); - } - else if constexpr (AZStd::is_same_v) - { - FileExistsRequest(request); - } - else if constexpr (AZStd::is_same_v) - { - FileMetaDataRetrievalRequest(request); - } - }, request->GetCommand()); - m_pendingRequests.pop_front(); - return true; - } - else - { - return false; - } - } - - void StorageDrive::UpdateStatus(Status& status) const - { - // Only participate if there are actually any reads done. - if (m_fileOpenCloseTimeAverage.GetNumRecorded() > 0) - { - s32 availableSlots = s_maxRequests - aznumeric_cast(m_pendingRequests.size()); - StreamStackEntry::UpdateStatus(status); - status.m_numAvailableSlots = AZStd::min(status.m_numAvailableSlots, availableSlots); - status.m_isIdle = status.m_isIdle && m_pendingRequests.empty(); - } - else - { - status.m_numAvailableSlots = AZStd::min(status.m_numAvailableSlots, s_maxRequests); - } - } - - void StorageDrive::UpdateCompletionEstimates(AZStd::chrono::system_clock::time_point now, - AZStd::vector& internalPending, StreamerContext::PreparedQueue::iterator pendingBegin, - StreamerContext::PreparedQueue::iterator pendingEnd) - { - StreamStackEntry::UpdateCompletionEstimates(now, internalPending, pendingBegin, pendingEnd); - - const RequestPath* activeFile = nullptr; - if (m_activeCacheSlot != s_fileNotFound) - { - activeFile = &m_filePaths[m_activeCacheSlot]; - } - u64 activeOffset = m_activeOffset; - - // Estimate requests in this stack entry. - for (FileRequest* request : m_pendingRequests) - { - EstimateCompletionTimeForRequest(request, now, activeFile, activeOffset); - } - - // Estimate internally pending requests. Because this call will go from the top of the stack to the bottom, - // but estimation is calculated from the bottom to the top, this list should be processed in reverse order. - for (auto requestIt = internalPending.rbegin(); requestIt != internalPending.rend(); ++requestIt) - { - EstimateCompletionTimeForRequest(*requestIt, now, activeFile, activeOffset); - } - - // Estimate pending requests that have not been queued yet. - for (auto requestIt = pendingBegin; requestIt != pendingEnd; ++requestIt) - { - EstimateCompletionTimeForRequest(*requestIt, now, activeFile, activeOffset); - } - } - - void StorageDrive::EstimateCompletionTimeForRequest(FileRequest* request, AZStd::chrono::system_clock::time_point& startTime, - const RequestPath*& activeFile, u64& activeOffset) const - { - u64 readSize = 0; - u64 offset = 0; - const RequestPath* targetFile = nullptr; - - AZStd::visit([&](auto&& args) { using Command = AZStd::decay_t; if constexpr (AZStd::is_same_v) { - targetFile = &args.m_path; - readSize = args.m_size; - offset = args.m_offset; - } - else if constexpr (AZStd::is_same_v) - { - targetFile = &args.m_compressionInfo.m_archiveFilename; - readSize = args.m_compressionInfo.m_compressedSize; - offset = args.m_compressionInfo.m_offset; + ReadFile(request); } else if constexpr (AZStd::is_same_v) { - readSize = 0; - AZStd::chrono::microseconds averageTime = m_getFileExistsTimeAverage.CalculateAverage(); - startTime += averageTime; + FileExistsRequest(request); } else if constexpr (AZStd::is_same_v) { - readSize = 0; - AZStd::chrono::microseconds averageTime = m_getFileMetaDataTimeAverage.CalculateAverage(); - startTime += averageTime; + FileMetaDataRetrievalRequest(request); } }, request->GetCommand()); + m_pendingRequests.pop_front(); + return true; + } + else + { + return false; + } + } - if (readSize > 0) - { - if (activeFile && activeFile != targetFile) - { - if (FindFileInCache(*targetFile) == s_fileNotFound) - { - AZStd::chrono::microseconds fileOpenCloseTimeAverage = m_fileOpenCloseTimeAverage.CalculateAverage(); - startTime += fileOpenCloseTimeAverage; - } - startTime += s_averageSeekTime; - activeOffset = std::numeric_limits::max(); - } - else if (activeOffset != offset) - { - startTime += s_averageSeekTime; - } + void StorageDrive::UpdateStatus(Status& status) const + { + // Only participate if there are actually any reads done. + if (m_fileOpenCloseTimeAverage.GetNumRecorded() > 0) + { + s32 availableSlots = s_maxRequests - aznumeric_cast(m_pendingRequests.size()); + StreamStackEntry::UpdateStatus(status); + status.m_numAvailableSlots = AZStd::min(status.m_numAvailableSlots, availableSlots); + status.m_isIdle = status.m_isIdle && m_pendingRequests.empty(); + } + else + { + status.m_numAvailableSlots = AZStd::min(status.m_numAvailableSlots, s_maxRequests); + } + } - u64 totalBytesRead = m_readSizeAverage.GetTotal(); - double totalReadTimeUSec = aznumeric_caster(m_readTimeAverage.GetTotal().count()); - startTime += AZStd::chrono::microseconds(aznumeric_cast((readSize * totalReadTimeUSec) / totalBytesRead)); - activeOffset = offset + readSize; - } - request->SetEstimatedCompletion(startTime); + void StorageDrive::UpdateCompletionEstimates(AZStd::chrono::system_clock::time_point now, + AZStd::vector& internalPending, StreamerContext::PreparedQueue::iterator pendingBegin, + StreamerContext::PreparedQueue::iterator pendingEnd) + { + StreamStackEntry::UpdateCompletionEstimates(now, internalPending, pendingBegin, pendingEnd); + + const RequestPath* activeFile = nullptr; + if (m_activeCacheSlot != s_fileNotFound) + { + activeFile = &m_filePaths[m_activeCacheSlot]; + } + u64 activeOffset = m_activeOffset; + + // Estimate requests in this stack entry. + for (FileRequest* request : m_pendingRequests) + { + EstimateCompletionTimeForRequest(request, now, activeFile, activeOffset); } - void StorageDrive::ReadFile(FileRequest* request) + // Estimate internally pending requests. Because this call will go from the top of the stack to the bottom, + // but estimation is calculated from the bottom to the top, this list should be processed in reverse order. + for (auto requestIt = internalPending.rbegin(); requestIt != internalPending.rend(); ++requestIt) { - AZ_PROFILE_FUNCTION(AzCore); - - auto data = AZStd::get_if(&request->GetCommand()); - AZ_Assert(data, "FileRequest queued on StorageDrive to be read didn't contain read data."); - - SystemFile* file = nullptr; - - // If the file is already open, use that file handle and update it's last touched time. - size_t cacheIndex = FindFileInCache(data->m_path); - if (cacheIndex != s_fileNotFound) - { - file = m_fileHandles[cacheIndex].get(); - m_fileLastUsed[cacheIndex] = AZStd::chrono::high_resolution_clock::now(); - } - - // If the file is not open, eject the entry from the cache that hasn't been used for the longest time - // and open the file for reading. - if (!file) - { - AZStd::chrono::system_clock::time_point oldest = m_fileLastUsed[0]; - cacheIndex = 0; - size_t numFiles = m_filePaths.size(); - for (size_t i = 1; i < numFiles; ++i) - { - if (m_fileLastUsed[i] < oldest) - { - oldest = m_fileLastUsed[i]; - cacheIndex = i; - } - } - - TIMED_AVERAGE_WINDOW_SCOPE(m_fileOpenCloseTimeAverage); - AZStd::unique_ptr newFile = AZStd::make_unique(); - bool isOpen = newFile->Open(data->m_path.GetAbsolutePath(), SystemFile::OpenMode::SF_OPEN_READ_ONLY); - if (!isOpen) - { - request->SetStatus(IStreamerTypes::RequestStatus::Failed); - m_context->MarkRequestAsCompleted(request); - return; - } - - file = newFile.get(); - m_fileLastUsed[cacheIndex] = AZStd::chrono::high_resolution_clock::now(); - m_fileHandles[cacheIndex] = AZStd::move(newFile); - m_filePaths[cacheIndex] = data->m_path; - } - - AZ_Assert(file, "While searching for file '%s' StorageDevice::ReadFile failed to detect a problem.", data->m_path.GetRelativePath()); - u64 bytesRead = 0; - { - TIMED_AVERAGE_WINDOW_SCOPE(m_readTimeAverage); - if (file->Tell() != data->m_offset) - { - file->Seek(data->m_offset, SystemFile::SeekMode::SF_SEEK_BEGIN); - } - bytesRead = file->Read(data->m_size, data->m_output); - } - m_readSizeAverage.PushEntry(bytesRead); - - m_activeCacheSlot = cacheIndex; - m_activeOffset = data->m_offset + bytesRead; - - request->SetStatus(bytesRead == data->m_size ? IStreamerTypes::RequestStatus::Completed : IStreamerTypes::RequestStatus::Failed); - m_context->MarkRequestAsCompleted(request); + EstimateCompletionTimeForRequest(*requestIt, now, activeFile, activeOffset); } - void StorageDrive::CancelRequest(FileRequest* cancelRequest, FileRequestPtr& target) + // Estimate pending requests that have not been queued yet. + for (auto requestIt = pendingBegin; requestIt != pendingEnd; ++requestIt) { - for (auto it = m_pendingRequests.begin(); it != m_pendingRequests.end();) + EstimateCompletionTimeForRequest(*requestIt, now, activeFile, activeOffset); + } + } + + void StorageDrive::EstimateCompletionTimeForRequest(FileRequest* request, AZStd::chrono::system_clock::time_point& startTime, + const RequestPath*& activeFile, u64& activeOffset) const + { + u64 readSize = 0; + u64 offset = 0; + const RequestPath* targetFile = nullptr; + + AZStd::visit([&](auto&& args) + { + using Command = AZStd::decay_t; + if constexpr (AZStd::is_same_v) { - if ((*it)->WorksOn(target)) - { - (*it)->SetStatus(IStreamerTypes::RequestStatus::Canceled); - m_context->MarkRequestAsCompleted(*it); - it = m_pendingRequests.erase(it); - } - else - { - ++it; - } + targetFile = &args.m_path; + readSize = args.m_size; + offset = args.m_offset; } - cancelRequest->SetStatus(IStreamerTypes::RequestStatus::Completed); - m_context->MarkRequestAsCompleted(cancelRequest); + else if constexpr (AZStd::is_same_v) + { + targetFile = &args.m_compressionInfo.m_archiveFilename; + readSize = args.m_compressionInfo.m_compressedSize; + offset = args.m_compressionInfo.m_offset; + } + else if constexpr (AZStd::is_same_v) + { + readSize = 0; + AZStd::chrono::microseconds averageTime = m_getFileExistsTimeAverage.CalculateAverage(); + startTime += averageTime; + } + else if constexpr (AZStd::is_same_v) + { + readSize = 0; + AZStd::chrono::microseconds averageTime = m_getFileMetaDataTimeAverage.CalculateAverage(); + startTime += averageTime; + } + }, request->GetCommand()); + + if (readSize > 0) + { + if (activeFile && activeFile != targetFile) + { + if (FindFileInCache(*targetFile) == s_fileNotFound) + { + AZStd::chrono::microseconds fileOpenCloseTimeAverage = m_fileOpenCloseTimeAverage.CalculateAverage(); + startTime += fileOpenCloseTimeAverage; + } + startTime += s_averageSeekTime; + activeOffset = std::numeric_limits::max(); + } + else if (activeOffset != offset) + { + startTime += s_averageSeekTime; + } + + u64 totalBytesRead = m_readSizeAverage.GetTotal(); + double totalReadTimeUSec = aznumeric_caster(m_readTimeAverage.GetTotal().count()); + startTime += AZStd::chrono::microseconds(aznumeric_cast((readSize * totalReadTimeUSec) / totalBytesRead)); + activeOffset = offset + readSize; + } + request->SetEstimatedCompletion(startTime); + } + + void StorageDrive::ReadFile(FileRequest* request) + { + AZ_PROFILE_FUNCTION(AzCore); + + auto data = AZStd::get_if(&request->GetCommand()); + AZ_Assert(data, "FileRequest queued on StorageDrive to be read didn't contain read data."); + + SystemFile* file = nullptr; + + // If the file is already open, use that file handle and update it's last touched time. + size_t cacheIndex = FindFileInCache(data->m_path); + if (cacheIndex != s_fileNotFound) + { + file = m_fileHandles[cacheIndex].get(); + m_fileLastUsed[cacheIndex] = AZStd::chrono::high_resolution_clock::now(); } - void StorageDrive::FileExistsRequest(FileRequest* request) + // If the file is not open, eject the entry from the cache that hasn't been used for the longest time + // and open the file for reading. + if (!file) { - AZ_PROFILE_FUNCTION(AzCore); - TIMED_AVERAGE_WINDOW_SCOPE(m_getFileExistsTimeAverage); - - auto& fileExists = AZStd::get(request->GetCommand()); - size_t cacheIndex = FindFileInCache(fileExists.m_path); - if (cacheIndex != s_fileNotFound) + AZStd::chrono::system_clock::time_point oldest = m_fileLastUsed[0]; + cacheIndex = 0; + size_t numFiles = m_filePaths.size(); + for (size_t i = 1; i < numFiles; ++i) { - fileExists.m_found = true; + if (m_fileLastUsed[i] < oldest) + { + oldest = m_fileLastUsed[i]; + cacheIndex = i; + } + } + + TIMED_AVERAGE_WINDOW_SCOPE(m_fileOpenCloseTimeAverage); + AZStd::unique_ptr newFile = AZStd::make_unique(); + bool isOpen = newFile->Open(data->m_path.GetAbsolutePath(), SystemFile::OpenMode::SF_OPEN_READ_ONLY); + if (!isOpen) + { + request->SetStatus(IStreamerTypes::RequestStatus::Failed); + m_context->MarkRequestAsCompleted(request); + return; + } + + file = newFile.get(); + m_fileLastUsed[cacheIndex] = AZStd::chrono::high_resolution_clock::now(); + m_fileHandles[cacheIndex] = AZStd::move(newFile); + m_filePaths[cacheIndex] = data->m_path; + } + + AZ_Assert(file, "While searching for file '%s' StorageDevice::ReadFile failed to detect a problem.", data->m_path.GetRelativePath()); + u64 bytesRead = 0; + { + TIMED_AVERAGE_WINDOW_SCOPE(m_readTimeAverage); + if (file->Tell() != data->m_offset) + { + file->Seek(data->m_offset, SystemFile::SeekMode::SF_SEEK_BEGIN); + } + bytesRead = file->Read(data->m_size, data->m_output); + } + m_readSizeAverage.PushEntry(bytesRead); + + m_activeCacheSlot = cacheIndex; + m_activeOffset = data->m_offset + bytesRead; + + request->SetStatus(bytesRead == data->m_size ? IStreamerTypes::RequestStatus::Completed : IStreamerTypes::RequestStatus::Failed); + m_context->MarkRequestAsCompleted(request); + } + + void StorageDrive::CancelRequest(FileRequest* cancelRequest, FileRequestPtr& target) + { + for (auto it = m_pendingRequests.begin(); it != m_pendingRequests.end();) + { + if ((*it)->WorksOn(target)) + { + (*it)->SetStatus(IStreamerTypes::RequestStatus::Canceled); + m_context->MarkRequestAsCompleted(*it); + it = m_pendingRequests.erase(it); } else { - fileExists.m_found = SystemFile::Exists(fileExists.m_path.GetAbsolutePath()); + ++it; } - m_context->MarkRequestAsCompleted(request); } + cancelRequest->SetStatus(IStreamerTypes::RequestStatus::Completed); + m_context->MarkRequestAsCompleted(cancelRequest); + } - void StorageDrive::FileMetaDataRetrievalRequest(FileRequest* request) + void StorageDrive::FileExistsRequest(FileRequest* request) + { + AZ_PROFILE_FUNCTION(AzCore); + TIMED_AVERAGE_WINDOW_SCOPE(m_getFileExistsTimeAverage); + + auto& fileExists = AZStd::get(request->GetCommand()); + size_t cacheIndex = FindFileInCache(fileExists.m_path); + if (cacheIndex != s_fileNotFound) { - AZ_PROFILE_FUNCTION(AzCore); - TIMED_AVERAGE_WINDOW_SCOPE(m_getFileMetaDataTimeAverage); + fileExists.m_found = true; + } + else + { + fileExists.m_found = SystemFile::Exists(fileExists.m_path.GetAbsolutePath()); + } + m_context->MarkRequestAsCompleted(request); + } - auto& command = AZStd::get(request->GetCommand()); - // If the file is already open, use the file handle which usually is cheaper than asking for the file by name. - size_t cacheIndex = FindFileInCache(command.m_path); - if (cacheIndex != s_fileNotFound) + void StorageDrive::FileMetaDataRetrievalRequest(FileRequest* request) + { + AZ_PROFILE_FUNCTION(AzCore); + TIMED_AVERAGE_WINDOW_SCOPE(m_getFileMetaDataTimeAverage); + + auto& command = AZStd::get(request->GetCommand()); + // If the file is already open, use the file handle which usually is cheaper than asking for the file by name. + size_t cacheIndex = FindFileInCache(command.m_path); + if (cacheIndex != s_fileNotFound) + { + AZ_Assert(m_fileHandles[cacheIndex], + "File path '%s' doesn't have an associated file handle.", m_filePaths[cacheIndex].GetRelativePath()); + command.m_fileSize = m_fileHandles[cacheIndex]->Length(); + command.m_found = true; + request->SetStatus(IStreamerTypes::RequestStatus::Completed); + } + else + { + // The file is not open yet, so try to get the file size by name. + u64 size = SystemFile::Length(command.m_path.GetAbsolutePath()); + if (size != 0) // SystemFile::Length doesn't allow telling a zero-sized file apart from a invalid path. { - AZ_Assert(m_fileHandles[cacheIndex], - "File path '%s' doesn't have an associated file handle.", m_filePaths[cacheIndex].GetRelativePath()); - command.m_fileSize = m_fileHandles[cacheIndex]->Length(); + command.m_fileSize = size; command.m_found = true; request->SetStatus(IStreamerTypes::RequestStatus::Completed); } else { - // The file is not open yet, so try to get the file size by name. - u64 size = SystemFile::Length(command.m_path.GetAbsolutePath()); - if (size != 0) // SystemFile::Length doesn't allow telling a zero-sized file apart from a invalid path. + request->SetStatus(IStreamerTypes::RequestStatus::Failed); + } + } + + m_context->MarkRequestAsCompleted(request); + } + + void StorageDrive::FlushCache(const RequestPath& filePath) + { + size_t cacheIndex = FindFileInCache(filePath); + if (cacheIndex != s_fileNotFound) + { + m_fileLastUsed[cacheIndex] = AZStd::chrono::system_clock::time_point(); + m_fileHandles[cacheIndex].reset(); + m_filePaths[cacheIndex].Clear(); + } + } + + void StorageDrive::FlushEntireCache() + { + size_t numFiles = m_filePaths.size(); + for (size_t i = 0; i < numFiles; ++i) + { + m_fileLastUsed[i] = AZStd::chrono::system_clock::time_point(); + m_fileHandles[i].reset(); + m_filePaths[i].Clear(); + } + } + + size_t StorageDrive::FindFileInCache(const RequestPath& filePath) const + { + size_t numFiles = m_filePaths.size(); + for (size_t i = 0; i < numFiles; ++i) + { + if (m_filePaths[i] == filePath) + { + return i; + } + } + return s_fileNotFound; + } + + void StorageDrive::CollectStatistics(AZStd::vector& statistics) const + { + constexpr double bytesToMB = (1024.0 * 1024.0); + using DoubleSeconds = AZStd::chrono::duration; + + double totalBytesReadMB = m_readSizeAverage.GetTotal() / bytesToMB; + double totalReadTimeSec = AZStd::chrono::duration_cast(m_readTimeAverage.GetTotal()).count(); + if (m_readSizeAverage.GetTotal() > 1) // A default value is always added. + { + statistics.push_back(Statistic::CreateFloat(m_name, "Read Speed (avg. mbps)", totalBytesReadMB / totalReadTimeSec)); + } + + if (m_fileOpenCloseTimeAverage.GetNumRecorded() > 0) + { + statistics.push_back(Statistic::CreateInteger(m_name, "File Open & Close (avg. us)", m_fileOpenCloseTimeAverage.CalculateAverage().count())); + statistics.push_back(Statistic::CreateInteger(m_name, "Get file exists (avg. us)", m_getFileExistsTimeAverage.CalculateAverage().count())); + statistics.push_back(Statistic::CreateInteger(m_name, "Get file meta data (avg. us)", m_getFileMetaDataTimeAverage.CalculateAverage().count())); + statistics.push_back(Statistic::CreateInteger(m_name, "Available slots", s64{ s_maxRequests } - m_pendingRequests.size())); + } + } + + void StorageDrive::Report(const FileRequest::ReportData& data) const + { + switch (data.m_reportType) + { + case FileRequest::ReportData::ReportType::FileLocks: + for (u32 i = 0; i < m_fileHandles.size(); ++i) + { + if (m_fileHandles[i] != nullptr) { - command.m_fileSize = size; - command.m_found = true; - request->SetStatus(IStreamerTypes::RequestStatus::Completed); - } - else - { - request->SetStatus(IStreamerTypes::RequestStatus::Failed); + AZ_Printf("Streamer", "File lock in %s : '%s'.\n", m_name.c_str(), m_filePaths[i].GetRelativePath()); } } - - m_context->MarkRequestAsCompleted(request); + break; + default: + break; } - - void StorageDrive::FlushCache(const RequestPath& filePath) - { - size_t cacheIndex = FindFileInCache(filePath); - if (cacheIndex != s_fileNotFound) - { - m_fileLastUsed[cacheIndex] = AZStd::chrono::system_clock::time_point(); - m_fileHandles[cacheIndex].reset(); - m_filePaths[cacheIndex].Clear(); - } - } - - void StorageDrive::FlushEntireCache() - { - size_t numFiles = m_filePaths.size(); - for (size_t i = 0; i < numFiles; ++i) - { - m_fileLastUsed[i] = AZStd::chrono::system_clock::time_point(); - m_fileHandles[i].reset(); - m_filePaths[i].Clear(); - } - } - - size_t StorageDrive::FindFileInCache(const RequestPath& filePath) const - { - size_t numFiles = m_filePaths.size(); - for (size_t i = 0; i < numFiles; ++i) - { - if (m_filePaths[i] == filePath) - { - return i; - } - } - return s_fileNotFound; - } - - void StorageDrive::CollectStatistics(AZStd::vector& statistics) const - { - constexpr double bytesToMB = (1024.0 * 1024.0); - using DoubleSeconds = AZStd::chrono::duration; - - double totalBytesReadMB = m_readSizeAverage.GetTotal() / bytesToMB; - double totalReadTimeSec = AZStd::chrono::duration_cast(m_readTimeAverage.GetTotal()).count(); - if (m_readSizeAverage.GetTotal() > 1) // A default value is always added. - { - statistics.push_back(Statistic::CreateFloat(m_name, "Read Speed (avg. mbps)", totalBytesReadMB / totalReadTimeSec)); - } - - if (m_fileOpenCloseTimeAverage.GetNumRecorded() > 0) - { - statistics.push_back(Statistic::CreateInteger(m_name, "File Open & Close (avg. us)", m_fileOpenCloseTimeAverage.CalculateAverage().count())); - statistics.push_back(Statistic::CreateInteger(m_name, "Get file exists (avg. us)", m_getFileExistsTimeAverage.CalculateAverage().count())); - statistics.push_back(Statistic::CreateInteger(m_name, "Get file meta data (avg. us)", m_getFileMetaDataTimeAverage.CalculateAverage().count())); - statistics.push_back(Statistic::CreateInteger(m_name, "Available slots", s64{ s_maxRequests } - m_pendingRequests.size())); - } - } - - void StorageDrive::Report(const FileRequest::ReportData& data) const - { - switch (data.m_reportType) - { - case FileRequest::ReportData::ReportType::FileLocks: - for (u32 i = 0; i < m_fileHandles.size(); ++i) - { - if (m_fileHandles[i] != nullptr) - { - AZ_Printf("Streamer", "File lock in %s : '%s'.\n", m_name.c_str(), m_filePaths[i].GetRelativePath()); - } - } - break; - default: - break; - } - } - } // namespace IO -} // namespace AZ + } +} // namespace AZ::IO diff --git a/Code/Framework/AzCore/AzCore/IO/Streamer/StorageDrive.h b/Code/Framework/AzCore/AzCore/IO/Streamer/StorageDrive.h index 8028f9e8b6..d90b31eeec 100644 --- a/Code/Framework/AzCore/AzCore/IO/Streamer/StorageDrive.h +++ b/Code/Framework/AzCore/AzCore/IO/Streamer/StorageDrive.h @@ -16,85 +16,82 @@ #include #include -namespace AZ +namespace AZ::IO { - namespace IO + struct StorageDriveConfig final : + public IStreamerStackConfig { - struct StorageDriveConfig final : - public IStreamerStackConfig - { - AZ_RTTI(AZ::IO::StorageDriveConfig, "{3D568902-6C09-4E9E-A4DB-8B561481D298}", IStreamerStackConfig); - AZ_CLASS_ALLOCATOR(StorageDriveConfig, AZ::SystemAllocator, 0); + AZ_RTTI(AZ::IO::StorageDriveConfig, "{3D568902-6C09-4E9E-A4DB-8B561481D298}", IStreamerStackConfig); + AZ_CLASS_ALLOCATOR(StorageDriveConfig, AZ::SystemAllocator, 0); - ~StorageDriveConfig() override = default; - AZStd::shared_ptr AddStreamStackEntry( - const HardwareInformation& hardware, AZStd::shared_ptr parent) override; - static void Reflect(AZ::ReflectContext* context); + ~StorageDriveConfig() override = default; + AZStd::shared_ptr AddStreamStackEntry( + const HardwareInformation& hardware, AZStd::shared_ptr parent) override; + static void Reflect(AZ::ReflectContext* context); - u32 m_maxFileHandles{1024}; - }; + u32 m_maxFileHandles{1024}; + }; - //! Platform agnostic version of a storage drive, such as hdd, ssd, dvd, etc. - //! This stream stack entry is responsible for accessing a storage drive to - //! retrieve file information and data. - //! This entry is designed as a catch-all for any reads that weren't handled - //! by platform specific implementations or the virtual file system. It should - //! by the last entry in the stack as it will not forward calls to the next entry. - class StorageDrive - : public StreamStackEntry - { - public: - explicit StorageDrive(u32 maxFileHandles); - ~StorageDrive() override = default; + //! Platform agnostic version of a storage drive, such as hdd, ssd, dvd, etc. + //! This stream stack entry is responsible for accessing a storage drive to + //! retrieve file information and data. + //! This entry is designed as a catch-all for any reads that weren't handled + //! by platform specific implementations or the virtual file system. It should + //! by the last entry in the stack as it will not forward calls to the next entry. + class StorageDrive + : public StreamStackEntry + { + public: + explicit StorageDrive(u32 maxFileHandles); + ~StorageDrive() override = default; - void SetNext(AZStd::shared_ptr next) override; + void SetNext(AZStd::shared_ptr next) override; - void PrepareRequest(FileRequest* request) override; - void QueueRequest(FileRequest* request) override; - bool ExecuteRequests() override; + void PrepareRequest(FileRequest* request) override; + void QueueRequest(FileRequest* request) override; + bool ExecuteRequests() override; - void UpdateStatus(Status& status) const override; - void UpdateCompletionEstimates(AZStd::chrono::system_clock::time_point now, AZStd::vector& internalPending, - StreamerContext::PreparedQueue::iterator pendingBegin, StreamerContext::PreparedQueue::iterator pendingEnd) override; + void UpdateStatus(Status& status) const override; + void UpdateCompletionEstimates(AZStd::chrono::system_clock::time_point now, AZStd::vector& internalPending, + StreamerContext::PreparedQueue::iterator pendingBegin, StreamerContext::PreparedQueue::iterator pendingEnd) override; - void CollectStatistics(AZStd::vector& statistics) const override; + void CollectStatistics(AZStd::vector& statistics) const override; - protected: - static const AZStd::chrono::microseconds s_averageSeekTime; - static constexpr s32 s_maxRequests = 1; + protected: + static const AZStd::chrono::microseconds s_averageSeekTime; + static constexpr s32 s_maxRequests = 1; - size_t FindFileInCache(const RequestPath& filePath) const; - void ReadFile(FileRequest* request); - void CancelRequest(FileRequest* cancelRequest, FileRequestPtr& target); - void FileExistsRequest(FileRequest* request); - void FileMetaDataRetrievalRequest(FileRequest* request); - void FlushCache(const RequestPath& filePath); - void FlushEntireCache(); + size_t FindFileInCache(const RequestPath& filePath) const; + void ReadFile(FileRequest* request); + void CancelRequest(FileRequest* cancelRequest, FileRequestPtr& target); + void FileExistsRequest(FileRequest* request); + void FileMetaDataRetrievalRequest(FileRequest* request); + void FlushCache(const RequestPath& filePath); + void FlushEntireCache(); - void EstimateCompletionTimeForRequest(FileRequest* request, AZStd::chrono::system_clock::time_point& startTime, - const RequestPath*& activeFile, u64& activeOffset) const; + void EstimateCompletionTimeForRequest(FileRequest* request, AZStd::chrono::system_clock::time_point& startTime, + const RequestPath*& activeFile, u64& activeOffset) const; - void Report(const FileRequest::ReportData& data) const; + void Report(const FileRequest::ReportData& data) const; - TimedAverageWindow m_fileOpenCloseTimeAverage; - TimedAverageWindow m_getFileExistsTimeAverage; - TimedAverageWindow m_getFileMetaDataTimeAverage; - TimedAverageWindow m_readTimeAverage; - AverageWindow m_readSizeAverage; - //! File requests that are queued for processing. - AZStd::deque m_pendingRequests; + TimedAverageWindow m_fileOpenCloseTimeAverage; + TimedAverageWindow m_getFileExistsTimeAverage; + TimedAverageWindow m_getFileMetaDataTimeAverage; + TimedAverageWindow m_readTimeAverage; + AverageWindow m_readSizeAverage; + //! File requests that are queued for processing. + AZStd::deque m_pendingRequests; - //! The last time a file handle was used to access a file. The handle is stored in m_fileHandles. - AZStd::vector m_fileLastUsed; - //! The file path to the file handle. The handle is stored in m_fileHandles. - AZStd::vector m_filePaths; - //! A list of file handles that's being cached in case they're needed again in the future. - AZStd::vector> m_fileHandles; + //! The last time a file handle was used to access a file. The handle is stored in m_fileHandles. + AZStd::vector m_fileLastUsed; + //! The file path to the file handle. The handle is stored in m_fileHandles. + AZStd::vector m_filePaths; + //! A list of file handles that's being cached in case they're needed again in the future. + AZStd::vector> m_fileHandles; - //! The offset into the file that's cached by the active cache slot. - u64 m_activeOffset = 0; - //! The index into m_fileHandles for the file that's currently being read. - size_t m_activeCacheSlot = s_fileNotFound; - }; - } // namespace IO -} // namespace AZ + //! The offset into the file that's cached by the active cache slot. + u64 m_activeOffset = 0; + //! The index into m_fileHandles for the file that's currently being read. + size_t m_activeCacheSlot = s_fileNotFound; + }; +} // namespace AZ::IO diff --git a/Code/Framework/AzCore/AzCore/IO/Streamer/Streamer.cpp b/Code/Framework/AzCore/AzCore/IO/Streamer/Streamer.cpp index e634f2eac8..e4976f7d1c 100644 --- a/Code/Framework/AzCore/AzCore/IO/Streamer/Streamer.cpp +++ b/Code/Framework/AzCore/AzCore/IO/Streamer/Streamer.cpp @@ -219,7 +219,7 @@ namespace AZ::IO { AZ_Assert(HasRequestCompleted(request), "Claiming memory from a read request that's still in progress. " "This can lead to crashing if data is still being streamed to the request's buffer."); - // The caller has claimed the buffer and is now responsible for clearing it. + // The caller has claimed the buffer and is now responsible for clearing it. readRequest->m_allocator->UnlockAllocator(); readRequest->m_allocator = nullptr; } @@ -293,7 +293,7 @@ namespace AZ::IO request->m_request.CreateReport(reportType); return request; } - + Streamer::Streamer(const AZStd::thread_desc& threadDesc, AZStd::unique_ptr streamStack) : m_streamStack(AZStd::move(streamStack)) { diff --git a/Code/Framework/AzCore/AzCore/IO/Streamer/StreamerContext.h b/Code/Framework/AzCore/AzCore/IO/Streamer/StreamerContext.h index bb5f448a33..356eb7ddac 100644 --- a/Code/Framework/AzCore/AzCore/IO/Streamer/StreamerContext.h +++ b/Code/Framework/AzCore/AzCore/IO/Streamer/StreamerContext.h @@ -17,116 +17,113 @@ #include #include -namespace AZ +namespace AZ::IO { - namespace IO + class StreamerContext { - class StreamerContext - { - public: - using PreparedQueue = AZStd::deque; + public: + using PreparedQueue = AZStd::deque; - ~StreamerContext(); + ~StreamerContext(); - //! Gets a new file request, either by creating a new instance or - //! picking one from the recycle bin. This version should only be used - //! by nodes on the streaming stack as it's not thread safe, but faster. - //! The scheduler will automatically recycle these requests. - FileRequest* GetNewInternalRequest(); - //! Gets a new file request, either by creating a new instance or - //! picking one from the recycle bin. This version is for use by - //! any system outside the stream stack and is thread safe. Once the - //! reference count in the request hits zero it will automatically be recycled. - FileRequestPtr GetNewExternalRequest(); - //! Gets a batch of new file requests, either by creating new instances or - //! picking from the recycle bin. This version is for use by - //! any system outside the stream stack and is thread safe. The owner - //! needs to manually recycle these requests once they're done. Requests - //! with a reference count of zero will automatically be recycled. - //! If multiple requests need to be create this is preferable as it only locks the - //! recycle bin once. - void GetNewExternalRequestBatch(AZStd::vector& requests, size_t count); + //! Gets a new file request, either by creating a new instance or + //! picking one from the recycle bin. This version should only be used + //! by nodes on the streaming stack as it's not thread safe, but faster. + //! The scheduler will automatically recycle these requests. + FileRequest* GetNewInternalRequest(); + //! Gets a new file request, either by creating a new instance or + //! picking one from the recycle bin. This version is for use by + //! any system outside the stream stack and is thread safe. Once the + //! reference count in the request hits zero it will automatically be recycled. + FileRequestPtr GetNewExternalRequest(); + //! Gets a batch of new file requests, either by creating new instances or + //! picking from the recycle bin. This version is for use by + //! any system outside the stream stack and is thread safe. The owner + //! needs to manually recycle these requests once they're done. Requests + //! with a reference count of zero will automatically be recycled. + //! If multiple requests need to be create this is preferable as it only locks the + //! recycle bin once. + void GetNewExternalRequestBatch(AZStd::vector& requests, size_t count); - //! Gets the number of prepared requests. Prepared requests are requests - //! that are ready to be queued up for further processing. - size_t GetNumPreparedRequests() const; - //! Gets the next prepared request that should be queued. Prepared requests - //! are requests that are ready to be queued up for further processing. - FileRequest* PopPreparedRequest(); - //! Adds a prepared request for later queuing and processing. - void PushPreparedRequest(FileRequest* request); - //! Gets the prepared requests that are queued to be processed. - PreparedQueue& GetPreparedRequests(); - //! Gets the prepared requests that are queued to be processed. - const PreparedQueue& GetPreparedRequests() const; + //! Gets the number of prepared requests. Prepared requests are requests + //! that are ready to be queued up for further processing. + size_t GetNumPreparedRequests() const; + //! Gets the next prepared request that should be queued. Prepared requests + //! are requests that are ready to be queued up for further processing. + FileRequest* PopPreparedRequest(); + //! Adds a prepared request for later queuing and processing. + void PushPreparedRequest(FileRequest* request); + //! Gets the prepared requests that are queued to be processed. + PreparedQueue& GetPreparedRequests(); + //! Gets the prepared requests that are queued to be processed. + const PreparedQueue& GetPreparedRequests() const; - //! Marks a request as completed so the main thread in Streamer can close it out. - //! This can be safely called from multiple threads. - void MarkRequestAsCompleted(FileRequest* request); - //! Rejects a request by removing it from the chain and recycling it. - //! Only requests without children can be rejected. If the rejected request has a parent it might need to be processed - //! further. - //! @param request The request to remove and recycle. - //! @return The parent request of the rejected request or null if there was no parent. - FileRequest* RejectRequest(FileRequest* request); - //! Adds an old request to the recycle bin so it can be reused later. - void RecycleRequest(FileRequest* request); - //! Adds an old external request to the recycle bin so it can be reused later. - void RecycleRequest(ExternalFileRequest* request); + //! Marks a request as completed so the main thread in Streamer can close it out. + //! This can be safely called from multiple threads. + void MarkRequestAsCompleted(FileRequest* request); + //! Rejects a request by removing it from the chain and recycling it. + //! Only requests without children can be rejected. If the rejected request has a parent it might need to be processed + //! further. + //! @param request The request to remove and recycle. + //! @return The parent request of the rejected request or null if there was no parent. + FileRequest* RejectRequest(FileRequest* request); + //! Adds an old request to the recycle bin so it can be reused later. + void RecycleRequest(FileRequest* request); + //! Adds an old external request to the recycle bin so it can be reused later. + void RecycleRequest(ExternalFileRequest* request); - //! Does the FinalizeRequest callback where appropriate and does some bookkeeping to finalize requests. - //! @return True if any requests were finalized, otherwise false. - bool FinalizeCompletedRequests(); + //! Does the FinalizeRequest callback where appropriate and does some bookkeeping to finalize requests. + //! @return True if any requests were finalized, otherwise false. + bool FinalizeCompletedRequests(); - //! Causes the main thread for streamer to wake up and process any pending requests. If the thread - //! is already awake, nothing happens. - void WakeUpSchedulingThread(); - //! If there's no pending messages this will cause the main thread for streamer to go to sleep. - void SuspendSchedulingThread(); - //! Returns the native primitive(s) used to suspend and wake up the scheduling thread and possibly other threads. - AZ::Platform::StreamerContextThreadSync& GetStreamerThreadSynchronizer(); + //! Causes the main thread for streamer to wake up and process any pending requests. If the thread + //! is already awake, nothing happens. + void WakeUpSchedulingThread(); + //! If there's no pending messages this will cause the main thread for streamer to go to sleep. + void SuspendSchedulingThread(); + //! Returns the native primitive(s) used to suspend and wake up the scheduling thread and possibly other threads. + AZ::Platform::StreamerContextThreadSync& GetStreamerThreadSynchronizer(); - //! Collects statistics recorded during processing. This will only return statistics for the - //! context. Use the CollectStatistics on AZ::IO::Streamer to get all statistics. - void CollectStatistics(AZStd::vector& statistics); + //! Collects statistics recorded during processing. This will only return statistics for the + //! context. Use the CollectStatistics on AZ::IO::Streamer to get all statistics. + void CollectStatistics(AZStd::vector& statistics); - private: - //! Gets a new FileRequestPtr. This version is for internal use only and is not thread-safe. - //! This will be called by GetNewExternalRequest or GetNewExternalRequestBatch which are responsible - //! for managing the lock to the recycle bin. - FileRequestPtr GetNewExternalRequestUnguarded(); + private: + //! Gets a new FileRequestPtr. This version is for internal use only and is not thread-safe. + //! This will be called by GetNewExternalRequest or GetNewExternalRequestBatch which are responsible + //! for managing the lock to the recycle bin. + FileRequestPtr GetNewExternalRequestUnguarded(); - inline static constexpr size_t s_initialRecycleBinSize = 64; + inline static constexpr size_t s_initialRecycleBinSize = 64; - AZStd::mutex m_externalRecycleBinGuard; - AZStd::vector m_externalRecycleBin; - AZStd::vector m_internalRecycleBin; - - // The completion is guarded so other threads can perform async IO and safely mark requests as completed. - AZStd::recursive_mutex m_completedGuard; - AZStd::queue m_completed; + AZStd::mutex m_externalRecycleBinGuard; + AZStd::vector m_externalRecycleBin; + AZStd::vector m_internalRecycleBin; - // The prepared request queue is not guarded and should only be called from the main Streamer thread. - PreparedQueue m_preparedRequests; + // The completion is guarded so other threads can perform async IO and safely mark requests as completed. + AZStd::recursive_mutex m_completedGuard; + AZStd::queue m_completed; + + // The prepared request queue is not guarded and should only be called from the main Streamer thread. + PreparedQueue m_preparedRequests; #if AZ_STREAMER_ADD_EXTRA_PROFILING_INFO - //! By how much time the prediction was off. This mostly covers the latter part of scheduling, which - //! gets more precise the closer the request gets to completion. - AZ::Statistics::RunningStatistic m_predictionAccuracyUsStat; + //! By how much time the prediction was off. This mostly covers the latter part of scheduling, which + //! gets more precise the closer the request gets to completion. + AZ::Statistics::RunningStatistic m_predictionAccuracyUsStat; - //! Tracks the percentage of requests with late predictions where the request completed earlier than expected, - //! versus the requests that completed later than predicted. - AZ::Statistics::RunningStatistic m_latePredictionsPercentageStat; + //! Tracks the percentage of requests with late predictions where the request completed earlier than expected, + //! versus the requests that completed later than predicted. + AZ::Statistics::RunningStatistic m_latePredictionsPercentageStat; - //! Percentage of requests that missed their deadline. If percentage is too high it can indicate that - //! there are too many file requests or the deadlines for requests are too tight. - AZ::Statistics::RunningStatistic m_missedDeadlinePercentageStat; + //! Percentage of requests that missed their deadline. If percentage is too high it can indicate that + //! there are too many file requests or the deadlines for requests are too tight. + AZ::Statistics::RunningStatistic m_missedDeadlinePercentageStat; #endif // AZ_STREAMER_ADD_EXTRA_PROFILING_INFO - //! Platform-specific synchronization object used to suspend the Streamer thread and wake it up to resume procesing. - AZ::Platform::StreamerContextThreadSync m_threadSync; + //! Platform-specific synchronization object used to suspend the Streamer thread and wake it up to resume procesing. + AZ::Platform::StreamerContextThreadSync m_threadSync; - size_t m_pendingIdCounter{ 0 }; - }; - } // namespace IO -} // namespace AZ + size_t m_pendingIdCounter{ 0 }; + }; +} // namespace AZ::IO diff --git a/Code/Framework/AzCore/AzCore/IO/SystemFile.cpp b/Code/Framework/AzCore/AzCore/IO/SystemFile.cpp index ac12a59609..12f4003144 100644 --- a/Code/Framework/AzCore/AzCore/IO/SystemFile.cpp +++ b/Code/Framework/AzCore/AzCore/IO/SystemFile.cpp @@ -8,7 +8,6 @@ #include #include -#include #include #include @@ -101,7 +100,6 @@ bool SystemFile::Open(const char* fileName, int mode, int platformFlags) { if (strlen(fileName) > m_fileName.max_size()) { - EBUS_EVENT(FileIOEventBus, OnError, this, nullptr, 0); return false; } @@ -109,17 +107,6 @@ bool SystemFile::Open(const char* fileName, int mode, int platformFlags) m_fileName = fileName; } - if (FileIOBus::HasHandlers()) - { - bool isOpen = false; - bool isHandled = false; - EBUS_EVENT_RESULT(isHandled, FileIOBus, OnOpen, *this, m_fileName.c_str(), mode, platformFlags, isOpen); - if (isHandled) - { - return isOpen; - } - } - AZ_Assert(!IsOpen(), "This file (%s) is already open!", m_fileName.c_str()); return PlatformOpen(mode, platformFlags); @@ -133,31 +120,11 @@ bool SystemFile::ReOpen(int mode, int platformFlags) void SystemFile::Close() { - if (FileIOBus::HasHandlers()) - { - bool isHandled = false; - EBUS_EVENT_RESULT(isHandled, FileIOBus, OnClose, *this); - if (isHandled) - { - return; - } - } - PlatformClose(); } void SystemFile::Seek(SeekSizeType offset, SeekMode mode) { - if (FileIOBus::HasHandlers()) - { - bool isHandled = false; - EBUS_EVENT_RESULT(isHandled, FileIOBus, OnSeek, *this, offset, mode); - if (isHandled) - { - return; - } - } - Platform::Seek(m_handle, this, offset, mode); } @@ -178,33 +145,11 @@ AZ::u64 SystemFile::ModificationTime() SystemFile::SizeType SystemFile::Read(SizeType byteSize, void* buffer) { - if (FileIOBus::HasHandlers()) - { - SizeType numRead = 0; - bool isHandled = false; - EBUS_EVENT_RESULT(isHandled, FileIOBus, OnRead, *this, byteSize, buffer, numRead); - if (isHandled) - { - return numRead; - } - } - return Platform::Read(m_handle, this, byteSize, buffer); } SystemFile::SizeType SystemFile::Write(const void* buffer, SizeType byteSize) { - if (FileIOBus::HasHandlers()) - { - SizeType numWritten = 0; - bool isHandled = false; - EBUS_EVENT_RESULT(isHandled, FileIOBus, OnWrite, *this, buffer, byteSize, numWritten); - if (isHandled) - { - return numWritten; - } - } - return Platform::Write(m_handle, this, buffer, byteSize); } diff --git a/Code/Framework/AzCore/AzCore/IPC/SharedMemory.cpp b/Code/Framework/AzCore/AzCore/IPC/SharedMemory.cpp index af73ab4936..c3fa69a205 100644 --- a/Code/Framework/AzCore/AzCore/IPC/SharedMemory.cpp +++ b/Code/Framework/AzCore/AzCore/IPC/SharedMemory.cpp @@ -13,23 +13,18 @@ #include -namespace AZ +namespace AZ::Internal { - namespace Internal + struct RingData { - struct RingData - { - AZ::u32 m_readOffset; - AZ::u32 m_writeOffset; - AZ::u32 m_startOffset; - AZ::u32 m_endOffset; - AZ::u32 m_dataToRead; - AZ::u8 m_pad[32 - sizeof(AZStd::spin_mutex)]; - }; - } // namespace Internal -} // namespace AZ - - + AZ::u32 m_readOffset; + AZ::u32 m_writeOffset; + AZ::u32 m_startOffset; + AZ::u32 m_endOffset; + AZ::u32 m_dataToRead; + AZ::u8 m_pad[32 - sizeof(AZStd::spin_mutex)]; + }; +} // namespace AZ::Internal using namespace AZ; diff --git a/Code/Framework/AzCore/AzCore/Interface/Interface.h b/Code/Framework/AzCore/AzCore/Interface/Interface.h index 8664e2905f..8f72cfa109 100644 --- a/Code/Framework/AzCore/AzCore/Interface/Interface.h +++ b/Code/Framework/AzCore/AzCore/Interface/Interface.h @@ -109,6 +109,7 @@ namespace AZ */ static EnvironmentVariable s_instance; static AZStd::shared_mutex s_mutex; + static bool s_instanceAssigned; }; template @@ -117,6 +118,9 @@ namespace AZ template AZStd::shared_mutex Interface::s_mutex; + template + bool Interface::s_instanceAssigned; + template void Interface::Register(T* type) { @@ -135,18 +139,19 @@ namespace AZ AZStd::unique_lock lock(s_mutex); s_instance = Environment::CreateVariable(GetVariableName()); s_instance.Get() = type; + s_instanceAssigned = true; } template void Interface::Unregister(T* type) { - if (!s_instance || !s_instance.Get()) + if (!s_instanceAssigned) { AZ_Assert(false, "Interface '%s' not registered on this module!", AzTypeInfo::Name()); return; } - if (s_instance.Get() != type) + if (s_instance && s_instance.Get() != type) { AZ_Assert(false, "Interface '%s' is not the same instance that was registered! [Expected '%p', Found '%p']", AzTypeInfo::Name(), type, s_instance.Get()); return; @@ -156,6 +161,7 @@ namespace AZ AZStd::unique_lock lock(s_mutex); *s_instance = nullptr; s_instance.Reset(); + s_instanceAssigned = false; } template @@ -165,9 +171,9 @@ namespace AZ // This is the fast path which won't block. { AZStd::shared_lock lock(s_mutex); - if (s_instance) + if (s_instanceAssigned) { - return s_instance.Get(); + return s_instance ? s_instance.Get() : nullptr; } } @@ -175,6 +181,7 @@ namespace AZ // take the full lock and request it. AZStd::unique_lock lock(s_mutex); s_instance = Environment::FindVariable(GetVariableName()); + s_instanceAssigned = true; return s_instance ? s_instance.Get() : nullptr; } diff --git a/Code/Framework/AzCore/AzCore/Jobs/Internal/JobManagerWorkStealing.cpp b/Code/Framework/AzCore/AzCore/Jobs/Internal/JobManagerWorkStealing.cpp index 230bf959f6..ce8455d9a1 100644 --- a/Code/Framework/AzCore/AzCore/Jobs/Internal/JobManagerWorkStealing.cpp +++ b/Code/Framework/AzCore/AzCore/Jobs/Internal/JobManagerWorkStealing.cpp @@ -14,6 +14,7 @@ #include #include #include +#include #include @@ -83,7 +84,7 @@ AZ_THREAD_LOCAL JobManagerWorkStealing::ThreadInfo* JobManagerWorkStealing::m_cu JobManagerWorkStealing::JobManagerWorkStealing(const JobManagerDesc& desc) : m_isAsynchronous(!desc.m_workerThreads.empty()) - , m_workerThreads(AZStd::move(CreateWorkerThreads(desc.m_workerThreads))) + , m_workerThreads(AZStd::move(CreateWorkerThreads(desc))) { //allow workers to begin processing after they have all been created, needed to wait since they may access each others queues m_initSemaphore.release(static_cast(desc.m_workerThreads.size())); @@ -457,8 +458,6 @@ void JobManagerWorkStealing::ProcessJobsInternal(ThreadInfo* info, Job* suspende else { //attempt to steal a job from another thread's queue - AZ_PROFILE_SCOPE(AzCore, "JobManagerWorkStealing::ProcessJobsInternal:WorkStealing"); - unsigned int numStealAttempts = 0; const unsigned int maxStealAttempts = (unsigned int)m_workerThreads.size() * 3; //try every thread a few times before giving up while (!job) @@ -620,8 +619,9 @@ JobManagerWorkStealing::ThreadInfo* JobManagerWorkStealing::FindCurrentThreadInf return info; } -JobManagerWorkStealing::ThreadList JobManagerWorkStealing::CreateWorkerThreads(const JobManagerDesc::DescList& workerDescList) +JobManagerWorkStealing::ThreadList JobManagerWorkStealing::CreateWorkerThreads(const JobManagerDesc& jmDesc) { + const JobManagerDesc::DescList& workerDescList = jmDesc.m_workerThreads; ThreadList workerThreads(workerDescList.size()); m_threads.reserve(workerDescList.size()); @@ -634,8 +634,12 @@ JobManagerWorkStealing::ThreadList JobManagerWorkStealing::CreateWorkerThreads(c info->m_owningManager = this; info->m_workerId = iThread; + AZStd::fixed_string<128> threadName = AZStd::fixed_string<128>::format( + "%s worker thread %d", + jmDesc.m_jobManagerName[0] != '\0' ? jmDesc.m_jobManagerName : "AZ JobManager", + iThread); AZStd::thread_desc threadDesc; - threadDesc.m_name = "AZ JobManager worker thread"; + threadDesc.m_name = threadName.c_str(); threadDesc.m_cpuId = desc.m_cpuId; threadDesc.m_priority = desc.m_priority; if (desc.m_stackSize != 0) diff --git a/Code/Framework/AzCore/AzCore/Jobs/Internal/JobManagerWorkStealing.h b/Code/Framework/AzCore/AzCore/Jobs/Internal/JobManagerWorkStealing.h index 55de872d86..734c166d6a 100644 --- a/Code/Framework/AzCore/AzCore/Jobs/Internal/JobManagerWorkStealing.h +++ b/Code/Framework/AzCore/AzCore/Jobs/Internal/JobManagerWorkStealing.h @@ -115,7 +115,7 @@ namespace AZ void ProcessJobsAssist(ThreadInfo* info, Job* suspendedJob, AZStd::atomic* notifyFlag); void ProcessJobsSynchronous(ThreadInfo* info, Job* suspendedJob, AZStd::atomic* notifyFlag); void ProcessJobsInternal(ThreadInfo* info, Job* suspendedJob, AZStd::atomic* notifyFlag); - ThreadList CreateWorkerThreads(const JobManagerDesc::DescList& workerDescList); + ThreadList CreateWorkerThreads(const JobManagerDesc& jmDesc); #ifndef AZ_MONOLITHIC_BUILD ThreadInfo* CrossModuleFindAndSetWorkerThreadInfo() const; #endif diff --git a/Code/Framework/AzCore/AzCore/Jobs/JobManagerComponent.cpp b/Code/Framework/AzCore/AzCore/Jobs/JobManagerComponent.cpp index 6f5ccc93e4..009b6b19dc 100644 --- a/Code/Framework/AzCore/AzCore/Jobs/JobManagerComponent.cpp +++ b/Code/Framework/AzCore/AzCore/Jobs/JobManagerComponent.cpp @@ -24,7 +24,7 @@ AZ_CVAR(float, cl_jobThreadsConcurrencyRatio, 0.6f, nullptr, AZ::ConsoleFunctorFlags::Null, "Legacy Job system multiplier on the number of hw threads the machine creates at initialization"); AZ_CVAR(uint32_t, cl_jobThreadsNumReserved, 2, nullptr, AZ::ConsoleFunctorFlags::Null, "Legacy Job system number of hardware threads that are reserved for O3DE system threads"); -AZ_CVAR(uint32_t, cl_jobThreadsMinNumber, 2, nullptr, AZ::ConsoleFunctorFlags::Null, "Legacy Job system minimum number of worker threads to create after scaling the number of hw threads"); +AZ_CVAR(uint32_t, cl_jobThreadsMinNumber, 3, nullptr, AZ::ConsoleFunctorFlags::Null, "Legacy Job system minimum number of worker threads to create after scaling the number of hw threads"); namespace AZ { @@ -51,16 +51,18 @@ namespace AZ JobManagerBus::Handler::BusConnect(); JobManagerDesc desc; + desc.m_jobManagerName = "Default JobManager"; JobManagerThreadDesc threadDesc; int numberOfWorkerThreads = m_numberOfWorkerThreads; if (numberOfWorkerThreads <= 0) // spawn default number of threads { + #if (AZ_TRAIT_THREAD_NUM_JOB_MANAGER_WORKER_THREADS) + numberOfWorkerThreads = AZ_TRAIT_THREAD_NUM_JOB_MANAGER_WORKER_THREADS; + #else uint32_t scaledHardwareThreads = Threading::CalcNumWorkerThreads(cl_jobThreadsConcurrencyRatio, cl_jobThreadsMinNumber, cl_jobThreadsNumReserved); numberOfWorkerThreads = AZ::GetMin(static_cast(desc.m_workerThreads.capacity()), scaledHardwareThreads); - #if (AZ_TRAIT_MAX_JOB_MANAGER_WORKER_THREADS) - numberOfWorkerThreads = AZ::GetMin(numberOfWorkerThreads, AZ_TRAIT_MAX_JOB_MANAGER_WORKER_THREADS); - #endif // (AZ_TRAIT_MAX_JOB_MANAGER_WORKER_THREADS) + #endif // (AZ_TRAIT_THREAD_NUM_JOB_MANAGER_WORKER_THREADS) } threadDesc.m_cpuId = AFFINITY_MASK_USERTHREADS; diff --git a/Code/Framework/AzCore/AzCore/Jobs/JobManagerDesc.h b/Code/Framework/AzCore/AzCore/Jobs/JobManagerDesc.h index 94f84f27b3..b2156291bc 100644 --- a/Code/Framework/AzCore/AzCore/Jobs/JobManagerDesc.h +++ b/Code/Framework/AzCore/AzCore/Jobs/JobManagerDesc.h @@ -51,6 +51,8 @@ namespace AZ { JobManagerDesc() {} + const char* m_jobManagerName = ""; + using DescList = AZStd::fixed_vector; DescList m_workerThreads; ///< List of worker threads to create }; diff --git a/Code/Framework/AzCore/AzCore/Math/Aabb.cpp b/Code/Framework/AzCore/AzCore/Math/Aabb.cpp index 80b7b88659..f9786c312b 100644 --- a/Code/Framework/AzCore/AzCore/Math/Aabb.cpp +++ b/Code/Framework/AzCore/AzCore/Math/Aabb.cpp @@ -94,7 +94,7 @@ namespace AZ behaviorContext->Class() ->Attribute(AZ::Script::Attributes::Scope, AZ::Script::Attributes::ScopeFlags::Common) ->Attribute(AZ::Script::Attributes::Module, "math") - ->Attribute(AZ::Script::Attributes::ExcludeFrom, AZ::Script::Attributes::ExcludeFlags::All) + ->Attribute(AZ::Script::Attributes::ExcludeFrom, AZ::Script::Attributes::ExcludeFlags::ListOnly) ->Attribute(AZ::Script::Attributes::Storage, AZ::Script::Attributes::StorageType::Value) ->Attribute(AZ::Script::Attributes::GenericConstructorOverride, &AabbDefaultConstructor) ->Property("min", &Aabb::GetMin, &Aabb::SetMin) @@ -112,46 +112,46 @@ namespace AZ ->Method("GetCenter", &Aabb::GetCenter) ->Method("Set", &Aabb::Set) ->Attribute(AZ::Script::Attributes::MethodOverride, &AabbSetGeneric) - ->Attribute(AZ::Script::Attributes::ExcludeFrom, AZ::Script::Attributes::ExcludeFlags::All) + ->Attribute(AZ::Script::Attributes::ExcludeFrom, AZ::Script::Attributes::ExcludeFlags::ListOnly) ->Method("CreateFromObb", &Aabb::CreateFromObb) ->Method("GetXExtent", &Aabb::GetXExtent) ->Method("GetYExtent", &Aabb::GetYExtent) ->Method("GetZExtent", &Aabb::GetZExtent) ->Method("GetAsSphere", &Aabb::GetAsSphere, nullptr, "() -> Vector3(center) and float(radius)") ->Attribute(AZ::Script::Attributes::MethodOverride, &AabbGetAsSphereMultipleReturn) - ->Attribute(AZ::Script::Attributes::ExcludeFrom, AZ::Script::Attributes::ExcludeFlags::All) + ->Attribute(AZ::Script::Attributes::ExcludeFrom, AZ::Script::Attributes::ExcludeFlags::ListOnly) ->Method("Contains", &Aabb::Contains, nullptr, "const Vector3& or const Aabb&") ->Attribute(AZ::Script::Attributes::MethodOverride, &AabbContainsGeneric) ->Method("ContainsVector3", &Aabb::Contains, nullptr, "const Vector3&") ->Attribute(AZ::Script::Attributes::Ignore, 0) // ignore for script since we already got the generic contains above ->Method("Overlaps", &Aabb::Overlaps) ->Method("Expand", &Aabb::Expand) - ->Attribute(AZ::Script::Attributes::ExcludeFrom, AZ::Script::Attributes::ExcludeFlags::All) + ->Attribute(AZ::Script::Attributes::ExcludeFrom, AZ::Script::Attributes::ExcludeFlags::ListOnly) ->Method("GetExpanded", &Aabb::GetExpanded) ->Method("AddPoint", &Aabb::AddPoint) - ->Attribute(AZ::Script::Attributes::ExcludeFrom, AZ::Script::Attributes::ExcludeFlags::All) + ->Attribute(AZ::Script::Attributes::ExcludeFrom, AZ::Script::Attributes::ExcludeFlags::ListOnly) ->Method("AddAabb", &Aabb::AddAabb) - ->Attribute(AZ::Script::Attributes::ExcludeFrom, AZ::Script::Attributes::ExcludeFlags::All) + ->Attribute(AZ::Script::Attributes::ExcludeFrom, AZ::Script::Attributes::ExcludeFlags::ListOnly) ->Method("GetDistance", &Aabb::GetDistance) ->Method("GetClamped", &Aabb::GetClamped) ->Method("Clamp", &Aabb::Clamp) - ->Attribute(AZ::Script::Attributes::ExcludeFrom, AZ::Script::Attributes::ExcludeFlags::All) + ->Attribute(AZ::Script::Attributes::ExcludeFrom, AZ::Script::Attributes::ExcludeFlags::ListOnly) ->Method("SetNull", &Aabb::SetNull) - ->Attribute(AZ::Script::Attributes::ExcludeFrom, AZ::Script::Attributes::ExcludeFlags::All) + ->Attribute(AZ::Script::Attributes::ExcludeFrom, AZ::Script::Attributes::ExcludeFlags::ListOnly) ->Method("Translate", &Aabb::Translate) - ->Attribute(AZ::Script::Attributes::ExcludeFrom, AZ::Script::Attributes::ExcludeFlags::All) + ->Attribute(AZ::Script::Attributes::ExcludeFrom, AZ::Script::Attributes::ExcludeFlags::ListOnly) ->Method("GetTranslated", &Aabb::GetTranslated) ->Method("GetSurfaceArea", &Aabb::GetSurfaceArea) ->Method("GetTransformedObb", static_cast(&Aabb::GetTransformedObb)) ->Method("GetTransformedAabb", static_cast(&Aabb::GetTransformedAabb)) ->Method("ApplyTransform", &Aabb::ApplyTransform) - ->Attribute(AZ::Script::Attributes::ExcludeFrom, AZ::Script::Attributes::ExcludeFlags::All) + ->Attribute(AZ::Script::Attributes::ExcludeFrom, AZ::Script::Attributes::ExcludeFlags::ListOnly) ->Method("Clone", [](const Aabb& rhs) -> Aabb { return rhs; }) - ->Attribute(AZ::Script::Attributes::ExcludeFrom, AZ::Script::Attributes::ExcludeFlags::All) + ->Attribute(AZ::Script::Attributes::ExcludeFrom, AZ::Script::Attributes::ExcludeFlags::ListOnly) ->Method("IsFinite", &Aabb::IsFinite) ->Method("Equal", &Aabb::operator==) ->Attribute(AZ::Script::Attributes::Operator, AZ::Script::Attributes::OperatorType::Equal) - ->Attribute(AZ::Script::Attributes::ExcludeFrom, AZ::Script::Attributes::ExcludeFlags::All); + ->Attribute(AZ::Script::Attributes::ExcludeFrom, AZ::Script::Attributes::ExcludeFlags::ListOnly); } } diff --git a/Code/Framework/AzCore/AzCore/Math/Color.cpp b/Code/Framework/AzCore/AzCore/Math/Color.cpp index 8a24b4ed7a..0339771076 100644 --- a/Code/Framework/AzCore/AzCore/Math/Color.cpp +++ b/Code/Framework/AzCore/AzCore/Math/Color.cpp @@ -237,7 +237,7 @@ namespace AZ behaviorContext->Class()-> Attribute(AZ::Script::Attributes::Scope, AZ::Script::Attributes::ScopeFlags::Common)-> Attribute(AZ::Script::Attributes::Module, "math")-> - Attribute(AZ::Script::Attributes::ExcludeFrom, AZ::Script::Attributes::ExcludeFlags::All)-> + Attribute(AZ::Script::Attributes::ExcludeFrom, AZ::Script::Attributes::ExcludeFlags::ListOnly)-> Attribute(AZ::Script::Attributes::Storage, AZ::Script::Attributes::StorageType::Value)-> Constructor()-> Constructor()-> diff --git a/Code/Framework/AzCore/AzCore/Math/Crc.h b/Code/Framework/AzCore/AzCore/Math/Crc.h index 9ba2a83139..c71339e92e 100644 --- a/Code/Framework/AzCore/AzCore/Math/Crc.h +++ b/Code/Framework/AzCore/AzCore/Math/Crc.h @@ -16,7 +16,7 @@ // // When AZ_CRC("My string") is used by default it will map to AZ::Crc32("My string"). // We do have a pro-processor program which will precompute the crc for you and -// transform that macro to AZ_CRC("My string",0xabcdef00) this will expand to just 0xabcdef00. +// transform that macro to AZ_CRC("My string", 0x18fbd270) this will expand to just 0x18fbd270. // This will remove completely the "My string" from your executable, it will add it to a database and so on. // WHen you want to update the string, just change the string. // If you don't run the precompile step the code should still run fine, except it will be slower, @@ -24,7 +24,7 @@ // a constant expression. // For example // switch(id) { -// case AZ_CRC("My string",0xabcdef00): {} break; // this will compile fine +// case AZ_CRC("My string",0x18fbd270): {} break; // this will compile fine // case AZ_CRC("My string"): {} break; // this will cause "error C2051: case expression not constant" // } // So it's you choice what you do, depending on your needs. diff --git a/Code/Framework/AzCore/AzCore/Math/Geometry2DUtils.cpp b/Code/Framework/AzCore/AzCore/Math/Geometry2DUtils.cpp index 47a7e0a2db..912794a518 100644 --- a/Code/Framework/AzCore/AzCore/Math/Geometry2DUtils.cpp +++ b/Code/Framework/AzCore/AzCore/Math/Geometry2DUtils.cpp @@ -8,138 +8,135 @@ #include -namespace AZ +namespace AZ::Geometry2DUtils { - namespace Geometry2DUtils + float ShortestDistanceSqPointSegment(const Vector2& point, const Vector2& segmentStart, const Vector2& segmentEnd, + float epsilon) { - float ShortestDistanceSqPointSegment(const Vector2& point, const Vector2& segmentStart, const Vector2& segmentEnd, - float epsilon) + const AZ::Vector2 segmentVector = segmentEnd - segmentStart; + + // check if the line degenerates to a point + const float segmentLengthSq = segmentVector.GetLengthSq(); + if (segmentLengthSq < epsilon * epsilon) { - const AZ::Vector2 segmentVector = segmentEnd - segmentStart; - - // check if the line degenerates to a point - const float segmentLengthSq = segmentVector.GetLengthSq(); - if (segmentLengthSq < epsilon * epsilon) - { - return (point - segmentStart).GetLengthSq(); - } - - // if the point projects on to the line segment then the shortest distance is the perpendicular - const float projection = (point - segmentStart).Dot(segmentVector); - if (projection >= 0.0f && projection <= segmentLengthSq) - { - const Vector2 perpendicular = (point - segmentStart - projection / segmentLengthSq * segmentVector); - return perpendicular.GetLengthSq(); - } - - // otherwise the point must be closest to one of the end points of the segment - return GetMin( - (point - segmentStart).GetLengthSq(), - (point - segmentEnd).GetLengthSq()); + return (point - segmentStart).GetLengthSq(); } - float Signed2DTriangleArea(const Vector2& a, const Vector2& b, const Vector2& c) + // if the point projects on to the line segment then the shortest distance is the perpendicular + const float projection = (point - segmentStart).Dot(segmentVector); + if (projection >= 0.0f && projection <= segmentLengthSq) { - return 0.5f * ((a.GetX() - c.GetX()) * (b.GetY() - c.GetY()) - (a.GetY() - c.GetY()) * (b.GetX() - c.GetX())); + const Vector2 perpendicular = (point - segmentStart - projection / segmentLengthSq * segmentVector); + return perpendicular.GetLengthSq(); } - float ShortestDistanceSqSegmentSegment( - const Vector2& segment1Start, const Vector2& segment1End, - const Vector2& segment2Start, const Vector2& segment2End) + // otherwise the point must be closest to one of the end points of the segment + return GetMin( + (point - segmentStart).GetLengthSq(), + (point - segmentEnd).GetLengthSq()); + } + + float Signed2DTriangleArea(const Vector2& a, const Vector2& b, const Vector2& c) + { + return 0.5f * ((a.GetX() - c.GetX()) * (b.GetY() - c.GetY()) - (a.GetY() - c.GetY()) * (b.GetX() - c.GetX())); + } + + float ShortestDistanceSqSegmentSegment( + const Vector2& segment1Start, const Vector2& segment1End, + const Vector2& segment2Start, const Vector2& segment2End) + { + // if the segments cross, then the distance is zero + + // if the two ends of segment 2 are on different sides of segment 1, then these two triangles will have + // different winding orders (see Real-Time Collision Detection, Christer Ericson, ISBN 978-1558607323, + // Chapter 5.1.9.1) + const float area1 = Signed2DTriangleArea(segment1Start, segment1End, segment2End); + const float area2 = Signed2DTriangleArea(segment1Start, segment1End, segment2Start); + if (area1 * area2 < 0.0f) { - // if the segments cross, then the distance is zero - - // if the two ends of segment 2 are on different sides of segment 1, then these two triangles will have - // different winding orders (see Real-Time Collision Detection, Christer Ericson, ISBN 978-1558607323, - // Chapter 5.1.9.1) - const float area1 = Signed2DTriangleArea(segment1Start, segment1End, segment2End); - const float area2 = Signed2DTriangleArea(segment1Start, segment1End, segment2Start); - if (area1 * area2 < 0.0f) + // similarly we can check if the two ends of segment 1 are on different sides of segment 2 + const float area3 = Signed2DTriangleArea(segment2Start, segment2End, segment1Start); + const float area4 = area3 + area2 - area1; + if (area3 * area4 < 0.0f) { - // similarly we can check if the two ends of segment 1 are on different sides of segment 2 - const float area3 = Signed2DTriangleArea(segment2Start, segment2End, segment1Start); - const float area4 = area3 + area2 - area1; - if (area3 * area4 < 0.0f) - { - return 0.0f; - } + return 0.0f; } - - // otherwise the shortest distance must be between one of the segment end points and the other segment - return GetMin( - GetMin( - ShortestDistanceSqPointSegment(segment1Start, segment2Start, segment2End), - ShortestDistanceSqPointSegment(segment1End, segment2Start, segment2End)), - GetMin( - ShortestDistanceSqPointSegment(segment2Start, segment1Start, segment1End), - ShortestDistanceSqPointSegment(segment2End, segment1Start, segment1End)) - ); } - bool IsSimplePolygon(const AZStd::vector& vertices, float epsilon) + // otherwise the shortest distance must be between one of the segment end points and the other segment + return GetMin( + GetMin( + ShortestDistanceSqPointSegment(segment1Start, segment2Start, segment2End), + ShortestDistanceSqPointSegment(segment1End, segment2Start, segment2End)), + GetMin( + ShortestDistanceSqPointSegment(segment2Start, segment1Start, segment1End), + ShortestDistanceSqPointSegment(segment2End, segment1Start, segment1End)) + ); + } + + bool IsSimplePolygon(const AZStd::vector& vertices, float epsilon) + { + // note that this implementation is quadratic in the number of vertices + // if it becomes a bottleneck, there are approaches which are O(n log n), e.g. the Bentley-Ottmann algorithm + + const size_t vertexCount = vertices.size(); + + if (vertexCount < 3) { - // note that this implementation is quadratic in the number of vertices - // if it becomes a bottleneck, there are approaches which are O(n log n), e.g. the Bentley-Ottmann algorithm - - const size_t vertexCount = vertices.size(); - - if (vertexCount < 3) - { - return false; - } - - if (vertexCount == 3) - { - return true; - } - - const float epsilonSq = epsilon * epsilon; - - for (size_t i = 0; i < vertexCount; ++i) - { - // make it easy to nicely wrap indices - const size_t safeIndex = i + vertexCount; - - const size_t endIndex = (safeIndex - 1) % vertexCount; - const size_t beginIndex = (safeIndex + 2) % vertexCount; - - for (size_t j = beginIndex; j != endIndex; j = (j + 1) % vertexCount) - { - const float distSq = ShortestDistanceSqSegmentSegment( - vertices[i], - vertices[(i + 1) % vertexCount], - vertices[j], - vertices[(j + 1) % vertexCount] - ); - - if (distSq < epsilonSq) - { - return false; - } - } - } + return false; + } + if (vertexCount == 3) + { return true; } - bool IsConvex(const AZStd::vector& vertices) + const float epsilonSq = epsilon * epsilon; + + for (size_t i = 0; i < vertexCount; ++i) { - const size_t vertexCount = vertices.size(); + // make it easy to nicely wrap indices + const size_t safeIndex = i + vertexCount; - if (vertexCount < 3) - { - return false; - } + const size_t endIndex = (safeIndex - 1) % vertexCount; + const size_t beginIndex = (safeIndex + 2) % vertexCount; - for (size_t i = 0; i < vertexCount; ++i) + for (size_t j = beginIndex; j != endIndex; j = (j + 1) % vertexCount) { - if (Signed2DTriangleArea(vertices[i], vertices[(i + 1) % vertexCount], vertices[(i + 2) % vertexCount]) < 0.0f) + const float distSq = ShortestDistanceSqSegmentSegment( + vertices[i], + vertices[(i + 1) % vertexCount], + vertices[j], + vertices[(j + 1) % vertexCount] + ); + + if (distSq < epsilonSq) { return false; } } - - return true; } - } // namespace Geometry2DUtils -} // namespace AZ + + return true; + } + + bool IsConvex(const AZStd::vector& vertices) + { + const size_t vertexCount = vertices.size(); + + if (vertexCount < 3) + { + return false; + } + + for (size_t i = 0; i < vertexCount; ++i) + { + if (Signed2DTriangleArea(vertices[i], vertices[(i + 1) % vertexCount], vertices[(i + 2) % vertexCount]) < 0.0f) + { + return false; + } + } + + return true; + } +} // namespace AZ::Geometry2DUtils diff --git a/Code/Framework/AzCore/AzCore/Math/IntersectSegment.cpp b/Code/Framework/AzCore/AzCore/Math/IntersectSegment.cpp index 5d13acc34c..4f143cde53 100644 --- a/Code/Framework/AzCore/AzCore/Math/IntersectSegment.cpp +++ b/Code/Framework/AzCore/AzCore/Math/IntersectSegment.cpp @@ -8,778 +8,936 @@ #include -using namespace AZ; -using namespace Intersect; - -//========================================================================= -// IntersectSegmentTriangleCCW -// [10/21/2009] -//========================================================================= -bool Intersect::IntersectSegmentTriangleCCW( - const Vector3& p, const Vector3& q, const Vector3& a, const Vector3& b, const Vector3& c, - /*float &u, float &v, float &w,*/ Vector3& normal, float& t) +namespace AZ { - float v, w; // comment this and enable input params if we need the barycentric coordinates - - Vector3 ab = b - a; - Vector3 ac = c - a; - Vector3 qp = p - q; - - // Compute triangle normal. Can be pre-calculated/cached if - // intersecting multiple segments against the same triangle - normal = ab.Cross(ac); // Right hand CCW - - // Compute denominator d. If d <= 0, segment is parallel to or points - // away from triangle, so exit early - float d = qp.Dot(normal); - if (d <= 0.0f) + //========================================================================= + // IntersectSegmentTriangleCCW + // [10/21/2009] + //========================================================================= + bool Intersect::IntersectSegmentTriangleCCW( + const Vector3& p, + const Vector3& q, + const Vector3& a, + const Vector3& b, + const Vector3& c, + /*float &u, float &v, float &w,*/ Vector3& normal, + float& t) { - return false; - } + float v, w; // comment this and enable input params if we need the barycentric coordinates - // Compute intersection t value of pq with plane of triangle. A ray - // intersects iff 0 <= t. Segment intersects iff 0 <= t <= 1. Delay - // dividing by d until intersection has been found to pierce triangle - Vector3 ap = p - a; - t = ap.Dot(normal); + Vector3 ab = b - a; + Vector3 ac = c - a; + Vector3 qp = p - q; - // range segment check t[0,1] (it this case [0,d]) - if (t < 0.0f || t > d) - { - return false; - } + // Compute triangle normal. Can be pre-calculated/cached if + // intersecting multiple segments against the same triangle + normal = ab.Cross(ac); // Right hand CCW - // Compute barycentric coordinate components and test if within bounds - Vector3 e = qp.Cross(ap); - v = ac.Dot(e); - if (v < 0.0f || v > d) - { - return false; - } - w = -ab.Dot(e); - if (w < 0.0f || v + w > d) - { - return false; - } - - // Segment/ray intersects triangle. Perform delayed division and - // compute the last barycentric coordinate component - float ood = 1.0f / d; - t *= ood; - /*v *= ood; - w *= ood; - u = 1.0f - v - w;*/ - - normal.Normalize(); - - return true; -} - -//========================================================================= -// IntersectSegmentTriangle -// [10/21/2009] -//========================================================================= -bool -Intersect::IntersectSegmentTriangle( - const Vector3& p, const Vector3& q, const Vector3& a, const Vector3& b, const Vector3& c, - /*float &u, float &v, float &w,*/ Vector3& normal, float& t) -{ - float v, w; // comment this and enable input params if we need the barycentric coordinates - - Vector3 ab = b - a; - Vector3 ac = c - a; - Vector3 qp = p - q; - Vector3 ap = p - a; - - // Compute triangle normal. Can be pre-calculated or cached if - // intersecting multiple segments against the same triangle - normal = ab.Cross(ac); // Right hand CCW - - // Compute denominator d. If d <= 0, segment is parallel to or points - // away from triangle, so exit early - float d = qp.Dot(normal); - Vector3 e; - if (d > Constants::FloatEpsilon) - { - // the normal is on the right side - e = qp.Cross(ap); - } - else - { - normal = -normal; - - // so either have a parallel ray or our normal is flipped - if (d >= -Constants::FloatEpsilon) + // Compute denominator d. If d <= 0, segment is parallel to or points + // away from triangle, so exit early + float d = qp.Dot(normal); + if (d <= 0.0f) { - return false; // parallel - } - d = -d; - e = ap.Cross(qp); - } - - // Compute intersection t value of pq with plane of triangle. A ray - // intersects iff 0 <= t. Segment intersects iff 0 <= t <= 1. Delay - // dividing by d until intersection has been found to pierce triangle - t = ap.Dot(normal); - - // range segment check t[0,1] (it this case [0,d]) - if (t < 0.0f || t > d) - { - return false; - } - - // Compute barycentric coordinate components and test if within bounds - v = ac.Dot(e); - if (v < 0.0f || v > d) - { - return false; - } - w = -ab.Dot(e); - if (w < 0.0f || v + w > d) - { - return false; - } - - // Segment/ray intersects the triangle. Perform delayed division and - // compute the last barycentric coordinate component - float ood = 1.0f / d; - t *= ood; - //v *= ood; - //w *= ood; - //u = 1.0f - v - w; - - normal.Normalize(); - - return true; -} - -//========================================================================= -// TestSegmentAABBOrigin -// [10/21/2009] -//========================================================================= -bool -AZ::Intersect::TestSegmentAABBOrigin(const Vector3& midPoint, const Vector3& halfVector, const Vector3& aabbExtends) -{ - const Vector3 EPSILON(0.001f); // \todo this is slow load move to a const - Vector3 absHalfVector = halfVector.GetAbs(); - Vector3 absMidpoint = midPoint.GetAbs(); - Vector3 absHalfMidpoint = absHalfVector + aabbExtends; - - // Try world coordinate axes as separating axes - if (!absMidpoint.IsLessEqualThan(absHalfMidpoint)) - { - return false; - } - - // Add in an epsilon term to counteract arithmetic errors when segment is - // (near) parallel to a coordinate axis (see text for detail) - absHalfVector += EPSILON; - - // Try cross products of segment direction vector with coordinate axes - Vector3 absMDCross = midPoint.Cross(halfVector).GetAbs(); - //Vector3 eaDCross = absHalfVector.Cross(aabbExtends); - float ex = aabbExtends.GetX(); - float ey = aabbExtends.GetY(); - float ez = aabbExtends.GetZ(); - float adx = absHalfVector.GetX(); - float ady = absHalfVector.GetY(); - float adz = absHalfVector.GetZ(); - - Vector3 ead(ey * adz + ez * ady, ex * adz + ez * adx, ex * ady + ey * adx); - if (!absMDCross.IsLessEqualThan(ead)) - { - return false; - } - - // No separating axis found; segment must be overlapping AABB - return true; -} - - -//========================================================================= -// IntersectRayAABB -// [10/21/2009] -//========================================================================= -RayAABBIsectTypes -AZ::Intersect::IntersectRayAABB( - const Vector3& rayStart, const Vector3& dir, const Vector3& dirRCP, const Aabb& aabb, - float& tStart, float& tEnd, Vector3& startNormal /*, Vector3& inter*/) -{ - // we don't need to test with all 6 normals (just 3) - - const float eps = 0.0001f; // \todo move to constant - float tmin = 0.0f; // set to -RR_FLT_MAX to get first hit on line - float tmax = std::numeric_limits::max(); // set to max distance ray can travel (for segment) - - const Vector3& aabbMin = aabb.GetMin(); - const Vector3& aabbMax = aabb.GetMax(); - - // we unroll manually because there is no way to get in efficient way vectors for - // each axis while getting it as a index - Vector3 time1 = (aabbMin - rayStart) * dirRCP; - Vector3 time2 = (aabbMax - rayStart) * dirRCP; - - // X - if (std::fabs(dir.GetX()) < eps) - { - // Ray is parallel to slab. No hit if origin not within slab - if (rayStart.GetX() < aabbMin.GetX() || rayStart.GetX() > aabbMax.GetX()) - { - return ISECT_RAY_AABB_NONE; - } - } - else - { - // Compute intersection t value of ray with near and far plane of slab - float t1 = time1.GetX(); - float t2 = time2.GetX(); - float nSign = -1.0f; - - // Make t1 be intersection with near plane, t2 with far plane - if (t1 > t2) - { - AZStd::swap(t1, t2); - nSign = 1.0f; + return false; } - // Compute the intersection of slab intersections intervals - if (tmin < t1) - { - tmin = t1; + // Compute intersection t value of pq with plane of triangle. A ray + // intersects iff 0 <= t. Segment intersects iff 0 <= t <= 1. Delay + // dividing by d until intersection has been found to pierce triangle + Vector3 ap = p - a; + t = ap.Dot(normal); - startNormal.Set(nSign, 0.0f, 0.0f); + // range segment check t[0,1] (it this case [0,d]) + if (t < 0.0f || t > d) + { + return false; } - tmax = AZ::GetMin(tmax, t2); - - // Exit with no collision as soon as slab intersection becomes empty - if (tmin > tmax) + // Compute barycentric coordinate components and test if within bounds + Vector3 e = qp.Cross(ap); + v = ac.Dot(e); + if (v < 0.0f || v > d) { - return ISECT_RAY_AABB_NONE; + return false; } - } - - // Y - if (std::fabs(dir.GetY()) < eps) - { - // Ray is parallel to slab. No hit if origin not within slab - if (rayStart.GetY() < aabbMin.GetY() || rayStart.GetY() > aabbMax.GetY()) + w = -ab.Dot(e); + if (w < 0.0f || v + w > d) { - return ISECT_RAY_AABB_NONE; - } - } - else - { - // Compute intersection t value of ray with near and far plane of slab - float t1 = time1.GetY(); - float t2 = time2.GetY(); - float nSign = -1.0f; - - // Make t1 be intersection with near plane, t2 with far plane - if (t1 > t2) - { - AZStd::swap(t1, t2); - nSign = 1.0f; + return false; } - // Compute the intersection of slab intersections intervals - if (tmin < t1) - { - tmin = t1; + // Segment/ray intersects triangle. Perform delayed division and + // compute the last barycentric coordinate component + float ood = 1.0f / d; + t *= ood; + /*v *= ood; + w *= ood; + u = 1.0f - v - w;*/ - startNormal.Set(0.0f, nSign, 0.0f); + normal.Normalize(); + + return true; + } + + //========================================================================= + // IntersectSegmentTriangle + // [10/21/2009] + //========================================================================= + bool Intersect::IntersectSegmentTriangle( + const Vector3& p, + const Vector3& q, + const Vector3& a, + const Vector3& b, + const Vector3& c, + /*float &u, float &v, float &w,*/ Vector3& normal, + float& t) + { + float v, w; // comment this and enable input params if we need the barycentric coordinates + + Vector3 ab = b - a; + Vector3 ac = c - a; + Vector3 qp = p - q; + Vector3 ap = p - a; + + // Compute triangle normal. Can be pre-calculated or cached if + // intersecting multiple segments against the same triangle + normal = ab.Cross(ac); // Right hand CCW + + // Compute denominator d. If d <= 0, segment is parallel to or points + // away from triangle, so exit early + float d = qp.Dot(normal); + Vector3 e; + if (d > Constants::FloatEpsilon) + { + // the normal is on the right side + e = qp.Cross(ap); } - - tmax = AZ::GetMin(tmax, t2); - - // Exit with no collision as soon as slab intersection becomes empty - if (tmin > tmax) + else { - return ISECT_RAY_AABB_NONE; - } - } + normal = -normal; - // Z - if (std::fabs(dir.GetZ()) < eps) - { - // Ray is parallel to slab. No hit if origin not within slab - if (rayStart.GetZ() < aabbMin.GetZ() || rayStart.GetZ() > aabbMax.GetZ()) - { - return ISECT_RAY_AABB_NONE; - } - } - else - { - // Compute intersection t value of ray with near and far plane of slab - float t1 = time1.GetZ(); - float t2 = time2.GetZ(); - float nSign = -1.0f; - - // Make t1 be intersection with near plane, t2 with far plane - if (t1 > t2) - { - AZStd::swap(t1, t2); - nSign = 1.0f; - } - - // Compute the intersection of slab intersections intervals - if (tmin < t1) - { - tmin = t1; - - startNormal.Set(0.0f, 0.0f, nSign); - } - - tmax = AZ::GetMin(tmax, t2); - - // Exit with no collision as soon as slab intersection becomes empty - if (tmin > tmax) - { - return ISECT_RAY_AABB_NONE; - } - } - - tStart = tmin; - tEnd = tmax; - - if (tmin == 0.0f) // no intersect if the segments starts inside or coincident the aabb - { - return ISECT_RAY_AABB_SA_INSIDE; - } - - // Ray intersects all 3 slabs. Return point (q) and intersection t value (tmin) - //inter = rayStart + dir * tmin; - return ISECT_RAY_AABB_ISECT; -} - -//========================================================================= -// IntersectRayAABB2 -// [2/18/2011] -//========================================================================= -RayAABBIsectTypes -AZ::Intersect::IntersectRayAABB2(const Vector3& rayStart, const Vector3& dirRCP, const Aabb& aabb, float& start, float& end) -{ - float tmin, tmax, tymin, tymax, tzmin, tzmax; - Vector3 vZero = Vector3::CreateZero(); - - Vector3 min = (Vector3::CreateSelectCmpGreaterEqual(dirRCP, vZero, aabb.GetMin(), aabb.GetMax()) - rayStart) * dirRCP; - Vector3 max = (Vector3::CreateSelectCmpGreaterEqual(dirRCP, vZero, aabb.GetMax(), aabb.GetMin()) - rayStart) * dirRCP; - - tmin = min.GetX(); - tmax = max.GetX(); - tymin = min.GetY(); - tymax = max.GetY(); - - if (tmin > tymax || tymin > tmax) - { - return ISECT_RAY_AABB_NONE; - } - - if (tymin > tmin) - { - tmin = tymin; - } - - if (tymax < tmax) - { - tmax = tymax; - } - - tzmin = min.GetZ(); - tzmax = max.GetZ(); - - if (tmin > tzmax || tzmin > tmax) - { - return ISECT_RAY_AABB_NONE; - } - - if (tzmin > tmin) - { - tmin = tzmin; - } - if (tzmax < tmax) - { - tmax = tzmax; - } - - start = tmin; - end = tmax; - - return ISECT_RAY_AABB_ISECT; -} - -bool AZ::Intersect::IntersectRayDisk( - const Vector3& rayOrigin, const Vector3& rayDir, const Vector3& diskCenter, const float diskRadius, const Vector3& diskNormal, float& t) -{ - // First intersect with the plane of the disk - float planeIntersectionDistance; - int intersectionCount = IntersectRayPlane(rayOrigin, rayDir, diskCenter, diskNormal, planeIntersectionDistance); - if (intersectionCount == 1) - { - // If the plane intersection point is inside the disk radius, then it intersected the disk. - Vector3 pointOnPlane = rayOrigin + rayDir * planeIntersectionDistance; - if (pointOnPlane.GetDistance(diskCenter) < diskRadius) - { - t = planeIntersectionDistance; - return true; - } - } - return false; -} - -// Reference: Real-Time Collision Detection - 5.3.7 Intersecting Ray or Segment Against Cylinder, and the book's errata. -int AZ::Intersect::IntersectRayCappedCylinder( - const Vector3& rayOrigin, const Vector3& rayDir, - const Vector3& cylinderEnd1, const Vector3& cylinderDir, - float cylinderHeight, float cylinderRadius, float &t1, float &t2) -{ - // dr = rayDir - // dc = cylinderDir - // r = cylinderRadius - // Vector3 cylinderEnd2 = cylinderEnd1 + cylinderHeight * cylinderDir; - Vector3 m = rayOrigin - cylinderEnd1; // vector from cylinderEnd1 to rayOrigin - float dcm = cylinderDir.Dot(m); // projection of m on cylinderDir - float dcdr = cylinderDir.Dot(rayDir); // projection of rayDir on cylinderDir - float drm = rayDir.Dot(m); // projection of m on rayDir - float r2 = cylinderRadius * cylinderRadius; - - if (dcm < 0.0f && dcdr <= 0.0f) - { - return 0; // rayOrigin is outside cylinderEnd1 and rayDir is pointing away from cylinderEnd1 - } - if (dcm > cylinderHeight && dcdr >= 0.0f) - { - return 0; // rayOrigin is outside cylinderEnd2 and rayDir is pointing away from cylinderEnd2 - } - - // point RP on the ray: RP(t) = rayOrigin + t * rayDir - // point CP on the cylinder surface: |(CP - cylinderEnd1) - cylinderDir.Dot(cp - cylinderEnd1) * cylinderDir|^2 = cylinderRadius^2 - // substitute RP(t) for CP: a*t^2 + 2b*t + c = 0, solving for t = [-2b +/- sqrt(4b^2 - 4ac)] / 2a - float a = 1.0f - dcdr * dcdr; // always greater than or equal to 0 - float b = drm - dcm * dcdr; - float c = m.Dot(m) - dcm * dcm - r2; - - const float EPSILON = 0.00001f; - - if (fabsf(a) < EPSILON) // the ray is parallel to the cylinder - { - if (c > EPSILON) // the ray is outside the cylinder - { - return 0; - } - else if (dcm < 0.0f) // the ray origin is on cylinderEnd1 side and ray is pointing to cylinderEnd2 - { - t1 = -dcm; - t2 = -dcm + cylinderHeight; - return 2; - } - else if (dcm > cylinderHeight) // the ray origin is on cylinderEnd2 side and ray is pointing to cylinderEnd1 - { - t1 = dcm - cylinderHeight; - t2 = dcm; - return 2; - } - else // (dcm > 0.0f && dcm < cylinderHeight) // the ray origin is inside the cylinder - { - if (dcdr > 0.0f) // the ray is pointing to cylinderEnd2 + // so either have a parallel ray or our normal is flipped + if (d >= -Constants::FloatEpsilon) { - t1 = cylinderHeight - dcm; - return 1; + return false; // parallel } - else if (dcdr < 0.0f) // the ray is pointing to cylinderEnd1 + d = -d; + e = ap.Cross(qp); + } + + // Compute intersection t value of pq with plane of triangle. A ray + // intersects iff 0 <= t. Segment intersects iff 0 <= t <= 1. Delay + // dividing by d until intersection has been found to pierce triangle + t = ap.Dot(normal); + + // range segment check t[0,1] (it this case [0,d]) + if (t < 0.0f || t > d) + { + return false; + } + + // Compute barycentric coordinate components and test if within bounds + v = ac.Dot(e); + if (v < 0.0f || v > d) + { + return false; + } + w = -ab.Dot(e); + if (w < 0.0f || v + w > d) + { + return false; + } + + // Segment/ray intersects the triangle. Perform delayed division and + // compute the last barycentric coordinate component + float ood = 1.0f / d; + t *= ood; + // v *= ood; + // w *= ood; + // u = 1.0f - v - w; + + normal.Normalize(); + + return true; + } + + //========================================================================= + // TestSegmentAABBOrigin + // [10/21/2009] + //========================================================================= + bool Intersect::TestSegmentAABBOrigin(const Vector3& midPoint, const Vector3& halfVector, const Vector3& aabbExtends) + { + const Vector3 EPSILON(0.001f); // \todo this is slow load move to a const + Vector3 absHalfVector = halfVector.GetAbs(); + Vector3 absMidpoint = midPoint.GetAbs(); + Vector3 absHalfMidpoint = absHalfVector + aabbExtends; + + // Try world coordinate axes as separating axes + if (!absMidpoint.IsLessEqualThan(absHalfMidpoint)) + { + return false; + } + + // Add in an epsilon term to counteract arithmetic errors when segment is + // (near) parallel to a coordinate axis (see text for detail) + absHalfVector += EPSILON; + + // Try cross products of segment direction vector with coordinate axes + Vector3 absMDCross = midPoint.Cross(halfVector).GetAbs(); + // Vector3 eaDCross = absHalfVector.Cross(aabbExtends); + float ex = aabbExtends.GetX(); + float ey = aabbExtends.GetY(); + float ez = aabbExtends.GetZ(); + float adx = absHalfVector.GetX(); + float ady = absHalfVector.GetY(); + float adz = absHalfVector.GetZ(); + + Vector3 ead(ey * adz + ez * ady, ex * adz + ez * adx, ex * ady + ey * adx); + if (!absMDCross.IsLessEqualThan(ead)) + { + return false; + } + + // No separating axis found; segment must be overlapping AABB + return true; + } + + //========================================================================= + // IntersectRayAABB + // [10/21/2009] + //========================================================================= + Intersect::RayAABBIsectTypes Intersect::IntersectRayAABB( + const Vector3& rayStart, + const Vector3& dir, + const Vector3& dirRCP, + const Aabb& aabb, + float& tStart, + float& tEnd, + Vector3& startNormal /*, Vector3& inter*/) + { + // we don't need to test with all 6 normals (just 3) + + const float eps = 0.0001f; // \todo move to constant + float tmin = 0.0f; // set to -RR_FLT_MAX to get first hit on line + float tmax = std::numeric_limits::max(); // set to max distance ray can travel (for segment) + + const Vector3& aabbMin = aabb.GetMin(); + const Vector3& aabbMax = aabb.GetMax(); + + // we unroll manually because there is no way to get in efficient way vectors for + // each axis while getting it as a index + Vector3 time1 = (aabbMin - rayStart) * dirRCP; + Vector3 time2 = (aabbMax - rayStart) * dirRCP; + + // X + if (std::fabs(dir.GetX()) < eps) + { + // Ray is parallel to slab. No hit if origin not within slab + if (rayStart.GetX() < aabbMin.GetX() || rayStart.GetX() > aabbMax.GetX()) { - t2 = dcm; - return 1; + return ISECT_RAY_AABB_NONE; } - else // impossible in theory + } + else + { + // Compute intersection t value of ray with near and far plane of slab + float t1 = time1.GetX(); + float t2 = time2.GetX(); + float nSign = -1.0f; + + // Make t1 be intersection with near plane, t2 with far plane + if (t1 > t2) + { + AZStd::swap(t1, t2); + nSign = 1.0f; + } + + // Compute the intersection of slab intersections intervals + if (tmin < t1) + { + tmin = t1; + + startNormal.Set(nSign, 0.0f, 0.0f); + } + + tmax = AZ::GetMin(tmax, t2); + + // Exit with no collision as soon as slab intersection becomes empty + if (tmin > tmax) + { + return ISECT_RAY_AABB_NONE; + } + } + + // Y + if (std::fabs(dir.GetY()) < eps) + { + // Ray is parallel to slab. No hit if origin not within slab + if (rayStart.GetY() < aabbMin.GetY() || rayStart.GetY() > aabbMax.GetY()) + { + return ISECT_RAY_AABB_NONE; + } + } + else + { + // Compute intersection t value of ray with near and far plane of slab + float t1 = time1.GetY(); + float t2 = time2.GetY(); + float nSign = -1.0f; + + // Make t1 be intersection with near plane, t2 with far plane + if (t1 > t2) + { + AZStd::swap(t1, t2); + nSign = 1.0f; + } + + // Compute the intersection of slab intersections intervals + if (tmin < t1) + { + tmin = t1; + + startNormal.Set(0.0f, nSign, 0.0f); + } + + tmax = AZ::GetMin(tmax, t2); + + // Exit with no collision as soon as slab intersection becomes empty + if (tmin > tmax) + { + return ISECT_RAY_AABB_NONE; + } + } + + // Z + if (std::fabs(dir.GetZ()) < eps) + { + // Ray is parallel to slab. No hit if origin not within slab + if (rayStart.GetZ() < aabbMin.GetZ() || rayStart.GetZ() > aabbMax.GetZ()) + { + return ISECT_RAY_AABB_NONE; + } + } + else + { + // Compute intersection t value of ray with near and far plane of slab + float t1 = time1.GetZ(); + float t2 = time2.GetZ(); + float nSign = -1.0f; + + // Make t1 be intersection with near plane, t2 with far plane + if (t1 > t2) + { + AZStd::swap(t1, t2); + nSign = 1.0f; + } + + // Compute the intersection of slab intersections intervals + if (tmin < t1) + { + tmin = t1; + + startNormal.Set(0.0f, 0.0f, nSign); + } + + tmax = AZ::GetMin(tmax, t2); + + // Exit with no collision as soon as slab intersection becomes empty + if (tmin > tmax) + { + return ISECT_RAY_AABB_NONE; + } + } + + tStart = tmin; + tEnd = tmax; + + if (tmin == 0.0f) // no intersect if the segments starts inside or coincident the aabb + { + return ISECT_RAY_AABB_SA_INSIDE; + } + + // Ray intersects all 3 slabs. Return point (q) and intersection t value (tmin) + // inter = rayStart + dir * tmin; + return ISECT_RAY_AABB_ISECT; + } + + //========================================================================= + // IntersectRayAABB2 + // [2/18/2011] + //========================================================================= + Intersect::RayAABBIsectTypes Intersect::IntersectRayAABB2( + const Vector3& rayStart, const Vector3& dirRCP, const Aabb& aabb, float& start, float& end) + { + float tmin, tmax, tymin, tymax, tzmin, tzmax; + Vector3 vZero = Vector3::CreateZero(); + + Vector3 min = (Vector3::CreateSelectCmpGreaterEqual(dirRCP, vZero, aabb.GetMin(), aabb.GetMax()) - rayStart) * dirRCP; + Vector3 max = (Vector3::CreateSelectCmpGreaterEqual(dirRCP, vZero, aabb.GetMax(), aabb.GetMin()) - rayStart) * dirRCP; + + tmin = min.GetX(); + tmax = max.GetX(); + tymin = min.GetY(); + tymax = max.GetY(); + + if (tmin > tymax || tymin > tmax) + { + return ISECT_RAY_AABB_NONE; + } + + if (tymin > tmin) + { + tmin = tymin; + } + + if (tymax < tmax) + { + tmax = tymax; + } + + tzmin = min.GetZ(); + tzmax = max.GetZ(); + + if (tmin > tzmax || tzmin > tmax) + { + return ISECT_RAY_AABB_NONE; + } + + if (tzmin > tmin) + { + tmin = tzmin; + } + if (tzmax < tmax) + { + tmax = tzmax; + } + + start = tmin; + end = tmax; + + return ISECT_RAY_AABB_ISECT; + } + + bool Intersect::IntersectRayDisk( + const Vector3& rayOrigin, + const Vector3& rayDir, + const Vector3& diskCenter, + const float diskRadius, + const Vector3& diskNormal, + float& t) + { + // First intersect with the plane of the disk + float planeIntersectionDistance; + int intersectionCount = IntersectRayPlane(rayOrigin, rayDir, diskCenter, diskNormal, planeIntersectionDistance); + if (intersectionCount == 1) + { + // If the plane intersection point is inside the disk radius, then it intersected the disk. + Vector3 pointOnPlane = rayOrigin + rayDir * planeIntersectionDistance; + if (pointOnPlane.GetDistance(diskCenter) < diskRadius) + { + t = planeIntersectionDistance; + return true; + } + } + return false; + } + + // Reference: Real-Time Collision Detection - 5.3.7 Intersecting Ray or Segment Against Cylinder, and the book's errata. + int Intersect::IntersectRayCappedCylinder( + const Vector3& rayOrigin, + const Vector3& rayDir, + const Vector3& cylinderEnd1, + const Vector3& cylinderDir, + float cylinderHeight, + float cylinderRadius, + float& t1, + float& t2) + { + // dr = rayDir + // dc = cylinderDir + // r = cylinderRadius + // Vector3 cylinderEnd2 = cylinderEnd1 + cylinderHeight * cylinderDir; + Vector3 m = rayOrigin - cylinderEnd1; // vector from cylinderEnd1 to rayOrigin + float dcm = cylinderDir.Dot(m); // projection of m on cylinderDir + float dcdr = cylinderDir.Dot(rayDir); // projection of rayDir on cylinderDir + float drm = rayDir.Dot(m); // projection of m on rayDir + float r2 = cylinderRadius * cylinderRadius; + + if (dcm < 0.0f && dcdr <= 0.0f) + { + return 0; // rayOrigin is outside cylinderEnd1 and rayDir is pointing away from cylinderEnd1 + } + if (dcm > cylinderHeight && dcdr >= 0.0f) + { + return 0; // rayOrigin is outside cylinderEnd2 and rayDir is pointing away from cylinderEnd2 + } + + // point RP on the ray: RP(t) = rayOrigin + t * rayDir + // point CP on the cylinder surface: |(CP - cylinderEnd1) - cylinderDir.Dot(cp - cylinderEnd1) * cylinderDir|^2 = cylinderRadius^2 + // substitute RP(t) for CP: a*t^2 + 2b*t + c = 0, solving for t = [-2b +/- sqrt(4b^2 - 4ac)] / 2a + float a = 1.0f - dcdr * dcdr; // always greater than or equal to 0 + float b = drm - dcm * dcdr; + float c = m.Dot(m) - dcm * dcm - r2; + + const float EPSILON = 0.00001f; + + if (fabsf(a) < EPSILON) // the ray is parallel to the cylinder + { + if (c > EPSILON) // the ray is outside the cylinder { return 0; } + else if (dcm < 0.0f) // the ray origin is on cylinderEnd1 side and ray is pointing to cylinderEnd2 + { + t1 = -dcm; + t2 = -dcm + cylinderHeight; + return 2; + } + else if (dcm > cylinderHeight) // the ray origin is on cylinderEnd2 side and ray is pointing to cylinderEnd1 + { + t1 = dcm - cylinderHeight; + t2 = dcm; + return 2; + } + else // (dcm > 0.0f && dcm < cylinderHeight) // the ray origin is inside the cylinder + { + if (dcdr > 0.0f) // the ray is pointing to cylinderEnd2 + { + t1 = cylinderHeight - dcm; + return 1; + } + else if (dcdr < 0.0f) // the ray is pointing to cylinderEnd1 + { + t2 = dcm; + return 1; + } + else // impossible in theory + { + return 0; + } + } } - } - float discr = b * b - a * c; - if (discr < 0.0f) - { - return 0; - } - - float sqrt_discr = sqrt(discr); - float tt1 = (-b - sqrt_discr) / a; - float tt2 = (-b + sqrt_discr) / a; - - if (tt2 < 0.0f) // both intersections are behind the ray origin - { - return 0; - } - - // Vector3 AP2 = (rayOrigin + tt2 * rayDir) - cylinderEnd1; // vector from cylinderEnd1 to the intersecting point of parameter tt2 - // float s2 = cylinderDir.Dot(AP2); - float s2 = dcm + tt2 * dcdr; - - if (discr < EPSILON) // tt1 == tt2 - { - if (s2 >= 0.0f && s2 <= cylinderHeight) - { - t1 = tt1; - return 1; - } - } - - // Vector3 AP1 = (rayOrigin + tt1 * rayDir) - cylinderEnd1; // vector from cylinderEnd1 to the intersecting point of parameter tt1 - // float s1 = cylinderDir.Dot(AP1); - float s1 = dcm + tt1 * dcdr; - - if (s1 < 0.0f) // intersecting point of parameter tt1 is outside on cylinderEnd1 side - { - if (s2 < 0.0f) // intersecting point of parameter tt2 is outside on cylinderEnd1 side + float discr = b * b - a * c; + if (discr < 0.0f) { return 0; } - else if (s2 == 0.0f) // ray touching the brim of the cylinderEnd1 + + float sqrt_discr = sqrt(discr); + float tt1 = (-b - sqrt_discr) / a; + float tt2 = (-b + sqrt_discr) / a; + + if (tt2 < 0.0f) // both intersections are behind the ray origin { - t1 = tt2; - return 1; + return 0; } - else + + // Vector3 AP2 = (rayOrigin + tt2 * rayDir) - cylinderEnd1; // vector from cylinderEnd1 to the intersecting point of parameter tt2 + // float s2 = cylinderDir.Dot(AP2); + float s2 = dcm + tt2 * dcdr; + + if (discr < EPSILON) // tt1 == tt2 { - if (s2 > cylinderHeight) // intersecting point of parameter tt2 is outside on cylinderEnd2 side + if (s2 >= 0.0f && s2 <= cylinderHeight) { - // t2 can be computed from the equation: dot(rayOrigin + t2 * rayDir - cylinderEnd1, cylinderDir) = cylinderHeight - t2 = (cylinderHeight - dcm) / dcdr; + t1 = tt1; + return 1; } - else + } + + // Vector3 AP1 = (rayOrigin + tt1 * rayDir) - cylinderEnd1; // vector from cylinderEnd1 to the intersecting point of parameter tt1 + // float s1 = cylinderDir.Dot(AP1); + float s1 = dcm + tt1 * dcdr; + + if (s1 < 0.0f) // intersecting point of parameter tt1 is outside on cylinderEnd1 side + { + if (s2 < 0.0f) // intersecting point of parameter tt2 is outside on cylinderEnd1 side { - t2 = tt2; + return 0; } - if (dcm > 0.0f) // ray origin inside cylinder + else if (s2 == 0.0f) // ray touching the brim of the cylinderEnd1 { - t1 = t2; + t1 = tt2; return 1; } else { - // t1 can be computed from the equation: dot(rayOrigin + t1 * rayDir - cylinderEnd1, cylinderDir) = 0 - t1 = -dcm / dcdr; - return 2; + if (s2 > cylinderHeight) // intersecting point of parameter tt2 is outside on cylinderEnd2 side + { + // t2 can be computed from the equation: dot(rayOrigin + t2 * rayDir - cylinderEnd1, cylinderDir) = cylinderHeight + t2 = (cylinderHeight - dcm) / dcdr; + } + else + { + t2 = tt2; + } + if (dcm > 0.0f) // ray origin inside cylinder + { + t1 = t2; + return 1; + } + else + { + // t1 can be computed from the equation: dot(rayOrigin + t1 * rayDir - cylinderEnd1, cylinderDir) = 0 + t1 = -dcm / dcdr; + return 2; + } } } - } - else if (s1 > cylinderHeight) // intersecting point of parameter tt1 is outside on cylinderEnd2 side - { - if (s2 > cylinderHeight) // intersecting point of parameter tt2 is outside on cylinderEnd2 side + else if (s1 > cylinderHeight) // intersecting point of parameter tt1 is outside on cylinderEnd2 side { - return 0; + if (s2 > cylinderHeight) // intersecting point of parameter tt2 is outside on cylinderEnd2 side + { + return 0; + } + else if (s2 == cylinderHeight) + { + t1 = tt2; + return 1; + } + else + { + if (s2 < 0.0f) + { + t2 = -dcm / dcdr; + } + else + { + t2 = tt2; + } + if (dcm < cylinderHeight) + { + t1 = t2; + return 1; + } + else + { + t1 = (cylinderHeight - dcm) / dcdr; + return 2; + } + } } - else if (s2 == cylinderHeight) - { - t1 = tt2; - return 1; - } - else + else // intersecting point of parameter tt1 is in between two cylinder ends { if (s2 < 0.0f) { t2 = -dcm / dcdr; } + else if (s2 > cylinderHeight) + { + t2 = (cylinderHeight - dcm) / dcdr; + } else { t2 = tt2; } - if (dcm < cylinderHeight) + if (tt1 > 0.0f) + { + t1 = tt1; + return 2; + } + else { t1 = t2; return 1; } - else - { - t1 = (cylinderHeight - dcm) / dcdr; - return 2; - } } } - else // intersecting point of parameter tt1 is in between two cylinder ends + + int Intersect::IntersectRayCone( + const Vector3& rayOrigin, + const Vector3& rayDir, + const Vector3& coneApex, + const Vector3& coneDir, + float coneHeight, + float coneBaseRadius, + float& t1, + float& t2) { - if (s2 < 0.0f) + // Q = rayOrgin, A = coneApex + Vector3 AQ = rayOrigin - coneApex; + float m = coneDir.Dot(AQ); // projection of m on cylinderDir + float k = coneDir.Dot(rayDir); // projection of rayDir on cylinderDir + + if (m < 0.0f && k <= 0.0f) { - t2 = -dcm / dcdr; + // rayOrigin is outside the cone on coneApex side and rayDir is pointing away + return 0; } - else if (s2 > cylinderHeight) - { - t2 = (cylinderHeight - dcm) / dcdr; - } - else - { - t2 = tt2; - } - if (tt1 > 0.0f) - { - t1 = tt1; - return 2; - } - else - { - t1 = t2; - return 1; - } - } -} - -int AZ::Intersect::IntersectRayCone( - const Vector3& rayOrigin, const Vector3& rayDir, - const Vector3& coneApex, const Vector3& coneDir, float coneHeight, - float coneBaseRadius, float& t1, float& t2) -{ - // Q = rayOrgin, A = coneApex - Vector3 AQ = rayOrigin - coneApex; - float m = coneDir.Dot(AQ); // projection of m on cylinderDir - float k = coneDir.Dot(rayDir); // projection of rayDir on cylinderDir - - if (m < 0.0f && k <= 0.0f) - { - // rayOrigin is outside the cone on coneApex side and rayDir is pointing away - return 0; - } - if (m > coneHeight && k >= 0.0f) - { - // rayOrigin is outside the cone on coneBase side and rayDir is pointing away - return 0; - } - - float r2 = coneBaseRadius * coneBaseRadius; - float h2 = coneHeight * coneHeight; - - float m2 = m * m; - float k2 = k * k; - float q2 = AQ.Dot(AQ); - - float n = rayDir.Dot(AQ); - - const float EPSILON = 0.00001f; - - // point RP on the ray: RP(t) = rayOrigin + t * rayDir - // point CP on the cone surface: similar triangle property - // |dot(CP - A, coneDir) * coneDir| / coneHeight = |(CP - A) - (dot(CP - A, coneDir) * coneDir)| coneRadius - // substitute RP(t) for CP: a*t^2 + 2b*t + c = 0, solving for t - float a = (r2 + h2) * k2 - h2; - float b = (r2 + h2) * m * k - h2 * n; - float c = (r2 + h2) * m2 - h2 * q2; - - float discriminant = b * b - a * c; - if (discriminant < -EPSILON) - { - return 0; - } - discriminant = AZ::GetMax(discriminant, 0.0f); - - if (fabsf(a) < EPSILON) // the ray is parallel to the cone surface's tangent line - { - if (b < EPSILON && fabsf(c) < EPSILON) // ray overlapping with cone surface - { - t1 = rayDir.Dot(coneApex - rayOrigin); - } - else // ray has only one intersecting point with the cone - { - t1 = -c / (2 * b); - } - - t2 = (coneHeight - m) / k; // t2 can be computed from the equation: dot(Q + t2 * rayDir - A, coneDir) = coneHeight - - if (t1 < 0.0f && t2 < 0.0f) + if (m > coneHeight && k >= 0.0f) { + // rayOrigin is outside the cone on coneBase side and rayDir is pointing away return 0; } - if (fabsf(t1 - t2) < EPSILON) // the ray intersects the brim of the circumference of the cone base - { - return 1; - } + float r2 = coneBaseRadius * coneBaseRadius; + float h2 = coneHeight * coneHeight; - float s1 = m + t1 * k; // coneDir.Dot(rayOrigin + t1 * rayDir - coneApex); - if (s1 < 0.0f || s1 > coneHeight) + float m2 = m * m; + float k2 = k * k; + float q2 = AQ.Dot(AQ); + + float n = rayDir.Dot(AQ); + + const float EPSILON = 0.00001f; + + // point RP on the ray: RP(t) = rayOrigin + t * rayDir + // point CP on the cone surface: similar triangle property + // |dot(CP - A, coneDir) * coneDir| / coneHeight = |(CP - A) - (dot(CP - A, coneDir) * coneDir)| coneRadius + // substitute RP(t) for CP: a*t^2 + 2b*t + c = 0, solving for t + float a = (r2 + h2) * k2 - h2; + float b = (r2 + h2) * m * k - h2 * n; + float c = (r2 + h2) * m2 - h2 * q2; + + float discriminant = b * b - a * c; + if (discriminant < -EPSILON) { return 0; } - else + discriminant = AZ::GetMax(discriminant, 0.0f); + + if (fabsf(a) < EPSILON) // the ray is parallel to the cone surface's tangent line { - if (k < 0.0f) // ray shooting from base to apex + if (b < EPSILON && fabsf(c) < EPSILON) // ray overlapping with cone surface { - if (m >= coneHeight) // ray origin outside cone - { - float temp = t1; - t1 = t2; - t2 = temp; - return 2; - } - else if (t1 >= 0.0f) // ray origin inside cone - { - t1 = t2; - return 1; - } - else - { - return 0; - } + t1 = rayDir.Dot(coneApex - rayOrigin); + } + else // ray has only one intersecting point with the cone + { + t1 = -c / (2 * b); + } + + t2 = (coneHeight - m) / k; // t2 can be computed from the equation: dot(Q + t2 * rayDir - A, coneDir) = coneHeight + + if (t1 < 0.0f && t2 < 0.0f) + { + return 0; + } + + if (fabsf(t1 - t2) < EPSILON) // the ray intersects the brim of the circumference of the cone base + { + return 1; + } + + float s1 = m + t1 * k; // coneDir.Dot(rayOrigin + t1 * rayDir - coneApex); + if (s1 < 0.0f || s1 > coneHeight) + { + return 0; } else { - if (m > coneHeight) + if (k < 0.0f) // ray shooting from base to apex { - return 0; - } - if (t1 >= 0.0f) // ray origin outside cone - { - return 2; - } - else - { - t1 = t2; - return 1; - } - } - } - } - - if (discriminant < EPSILON) // two intersecting points coincide - { - if (fabsf(n * n - q2) < EPSILON) // the ray is through the apex - { - float cosineA2 = h2 / (r2 + h2); - float cosineAQ2 = cosineA2 * q2; - - if (m2 > cosineAQ2) // the ray origin is inside the cone or its mirroring counterpart - { - if (m <= 0.0f) // the ray origin outside the cone on the apex side, shooting towards the base - { - t1 = -b / a; - t2 = (coneHeight - m) / k; - return 2; - } - else if (m >= coneHeight) // the ray origin is outside the cone on the base side, shooting towards towards the apex - { - t1 = (coneHeight - m) / k; - t2 = -b / a; - return 2; - } - else - { - if (k > 0.0f) // the ray origin is inside the cone, shooting towards the base + if (m >= coneHeight) // ray origin outside cone { - t1 = (coneHeight - m) / k; + float temp = t1; + t1 = t2; + t2 = temp; + return 2; + } + else if (t1 >= 0.0f) // ray origin inside cone + { + t1 = t2; return 1; } - else // the ray origin is inside the cone, shooting towards the apex + else + { + return 0; + } + } + else + { + if (m > coneHeight) + { + return 0; + } + if (t1 >= 0.0f) // ray origin outside cone + { + return 2; + } + else + { + t1 = t2; + return 1; + } + } + } + } + + if (discriminant < EPSILON) // two intersecting points coincide + { + if (fabsf(n * n - q2) < EPSILON) // the ray is through the apex + { + float cosineA2 = h2 / (r2 + h2); + float cosineAQ2 = cosineA2 * q2; + + if (m2 > cosineAQ2) // the ray origin is inside the cone or its mirroring counterpart + { + if (m <= 0.0f) // the ray origin outside the cone on the apex side, shooting towards the base { t1 = -b / a; + t2 = (coneHeight - m) / k; + return 2; + } + else if (m >= coneHeight) // the ray origin is outside the cone on the base side, shooting towards towards the apex + { + t1 = (coneHeight - m) / k; + t2 = -b / a; + return 2; + } + else + { + if (k > 0.0f) // the ray origin is inside the cone, shooting towards the base + { + t1 = (coneHeight - m) / k; + return 1; + } + else // the ray origin is inside the cone, shooting towards the apex + { + t1 = -b / a; + return 1; + } + } + } + else // the ray origin is outside the cone + { + t1 = -b / a; + if (t1 > 0.0f) + { return 1; } + else + { + return 0; + } } } - else // the ray origin is outside the cone + else // the ray is touching the cone surface but not through the apex { t1 = -b / a; if (t1 > 0.0f) { + float s1 = m + t1 * k; // projection length of the line segment from the apex to intersection_t1 onto the coneDir + if (s1 >= 0.0f && s1 <= coneHeight) + { + return 1; + } + } + return 0; + } + } + + float sqrtDiscr = sqrt(discriminant); + float tt1 = (-b - sqrtDiscr) / a; + float tt2 = (-b + sqrtDiscr) / a; + + /* Test s1 and s2 to see the positions of the intersecting points relative to the cylinder's two ends. */ + + // s1 = coneDir.Dot(rayOrigin + tt1 * rayDir - coneApex), which expands into the following + float s1 = m + tt1 * k; + // s2 = coneDir.Dot(rayOrigin + tt2 * rayDir - coneApex), which expands into the following + float s2 = m + tt2 * k; + + if (s1 < 0.0f) + { + if (s2 < 0.0f || s2 > coneHeight) + { + return 0; + } + else + { + if (tt2 >= 0.0f) // ray origin outside cone + { + t1 = tt2; + t2 = (coneHeight - m) / k; + return 2; + } + else if (m > coneHeight) // ray origin outside cone on the base side, the + { + return 0; + } + else + { + t1 = (coneHeight - m) / k; + return 1; + } + } + } + else if (s1 > coneHeight) + { + if (s2 < 0.0f || s2 > coneHeight) + { + return 0; + } + else + { + if (tt2 < 0.0f) + { + return 0; + } + else if (m >= coneHeight) + { + t1 = (coneHeight - m) / k; + t2 = tt2; + return 2; + } + else // ray origin inside cone + { + t1 = tt2; + return 1; + } + } + } + else + { + if (s2 < 0.0f) + { + if (m >= coneHeight) + { + t1 = (coneHeight - m) / k; + t2 = tt1; + return 2; + } + else if (tt1 >= 0.0f) // ray origin inside cone + { + t1 = tt1; + return 1; + } + else + { + return 0; + } + } + else if (s2 > coneHeight) + { + if (tt1 >= 0.0f) + { + t1 = tt1; + t2 = (coneHeight - m) / k; + return 2; + } + else if (m <= coneHeight) + { + t1 = (coneHeight - m) / k; + return 1; + } + else + { + return 0; + } + } + else + { + if (tt1 >= 0.0f) + { + t1 = tt1; + t2 = tt2; + return 2; + } + else if (tt2 >= 0.0f) + { + t1 = tt2; return 1; } else @@ -788,778 +946,670 @@ int AZ::Intersect::IntersectRayCone( } } } - else // the ray is touching the cone surface but not through the apex + } + + int Intersect::IntersectRayPlane( + const Vector3& rayOrigin, const Vector3& rayDir, const Vector3& planePos, const Vector3& planeNormal, float& t) + { + // (rayOrigin + t * rayDir - planePos).dot(planeNormal) = 0 + + const float EPSILON = 0.00001f; + + float n = rayDir.Dot(planeNormal); + if (fabsf(n) < EPSILON) { - t1 = -b / a; - if (t1 > 0.0f) - { - float s1 = m + t1 * k; // projection length of the line segment from the apex to intersection_t1 onto the coneDir - if (s1 >= 0.0f && s1 <= coneHeight) - { - return 1; - } - } return 0; } - } - - float sqrtDiscr = sqrt(discriminant); - float tt1 = (-b - sqrtDiscr) / a; - float tt2 = (-b + sqrtDiscr) / a; - /* Test s1 and s2 to see the positions of the intersecting points relative to the cylinder's two ends. */ - - // s1 = coneDir.Dot(rayOrigin + tt1 * rayDir - coneApex), which expands into the following - float s1 = m + tt1 * k; - // s2 = coneDir.Dot(rayOrigin + tt2 * rayDir - coneApex), which expands into the following - float s2 = m + tt2 * k; - - if (s1 < 0.0f) - { - if (s2 < 0.0f || s2 > coneHeight) + t = planeNormal.Dot(planePos - rayOrigin) / n; + if (t < 0.0f) { return 0; } else { - if (tt2 >= 0.0f) // ray origin outside cone - { - t1 = tt2; - t2 = (coneHeight - m) / k; - return 2; - } - else if (m > coneHeight) // ray origin outside cone on the base side, the - { - return 0; - } - else - { - t1 = (coneHeight - m) / k; - return 1; - } + return 1; } } - else if (s1 > coneHeight) + + int Intersect::IntersectRayQuad( + const Vector3& rayOrigin, + const Vector3& rayDir, + const Vector3& vertexA, + const Vector3& vertexB, + const Vector3& vertexC, + const Vector3& vertexD, + float& t) { - if (s2 < 0.0f || s2 > coneHeight ) + const float EPSILON = 0.0001f; + + Vector3 AC = vertexC - vertexA; + Vector3 AB = vertexB - vertexA; + Vector3 QA = vertexA - rayOrigin; + + Vector3 triN = AB.Cross(AC); // the normal of the triangle ABC + float dn = rayDir.Dot(triN); + + // Early-out if ray is facing away from ABC triangle + if (dn * triN.Dot(QA) < 0) { return 0; } - else + + Vector3 E = rayDir.Cross(QA); + float dnAbs = 0.0f; + + if (dn < -EPSILON) // vertices have counter-clock wise winding when looking at the quad from rayOrigin { - if (tt2 < 0.0f) - { - return 0; - } - else if (m >= coneHeight) - { - t1 = (coneHeight - m) / k; - t2 = tt2; - return 2; - } - else // ray origin inside cone - { - t1 = tt2; - return 1; - } + dnAbs = -dn; } - } - else - { - if (s2 < 0.0f) + else if (dn > EPSILON) { - if (m >= coneHeight) - { - t1 = (coneHeight - m) / k; - t2 = tt1; - return 2; - } - else if (tt1 >= 0.0f) // ray origin inside cone - { - t1 = tt1; - return 1; - } - else + E = -E; + dnAbs = dn; + } + else // the ray is parallel to the quad plane + { + return 0; + } + + // compute barycentric coordinates + float v = E.Dot(AC); + + if (v >= 0.0f && v < dnAbs) + { + float w = -E.Dot(AB); + if (w < 0.0f || v + w > dnAbs) { return 0; } } - else if (s2 > coneHeight) + else if (v < 0.0f && v > -dnAbs) { - if (tt1 >= 0.0f) - { - t1 = tt1; - t2 = (coneHeight - m) / k; - return 2; - } - else if (m <= coneHeight) - { - t1 = (coneHeight - m) / k; - return 1; - } - else + Vector3 DA = vertexA - vertexD; + float w = E.Dot(DA); + if (w > 0.0f || v + w < -dnAbs) // v, w are negative { return 0; } } else { - if (tt1 >= 0.0f) - { - t1 = tt1; - t2 = tt2; - return 2; - } - else if (tt2 >= 0.0f) - { - t1 = tt2; - return 1; - } - else - { - return 0; - } + return 0; } - } -} -int AZ::Intersect::IntersectRayPlane(const Vector3& rayOrigin, const Vector3& rayDir, const Vector3& planePos, const Vector3& planeNormal, float& t) -{ - // (rayOrigin + t * rayDir - planePos).dot(planeNormal) = 0 - - const float EPSILON = 0.00001f; - - float n = rayDir.Dot(planeNormal); - if (fabsf(n) < EPSILON) - { - return 0; - } - - t = planeNormal.Dot(planePos - rayOrigin) / n; - if (t < 0.0f) - { - return 0; - } - else - { + t = triN.Dot(QA) / dn; return 1; } -} -int AZ::Intersect::IntersectRayQuad( - const Vector3& rayOrigin, const Vector3& rayDir, const Vector3& vertexA, - const Vector3& vertexB, const Vector3& vertexC, const Vector3& vertexD, float& t) -{ - const float EPSILON = 0.0001f; - - Vector3 AC = vertexC - vertexA; - Vector3 AB = vertexB - vertexA; - Vector3 QA = vertexA - rayOrigin; - - Vector3 triN = AB.Cross(AC); // the normal of the triangle ABC - float dn = rayDir.Dot(triN); - - // Early-out if ray is facing away from ABC triangle - if (dn * triN.Dot(QA) < 0) + // reference: Real-Time Collision Detection, 5.3.3 Intersecting Ray or Segment Against Box + bool Intersect::IntersectRayBox( + const Vector3& rayOrigin, + const Vector3& rayDir, + const Vector3& boxCenter, + const Vector3& boxAxis1, + const Vector3& boxAxis2, + const Vector3& boxAxis3, + float boxHalfExtent1, + float boxHalfExtent2, + float boxHalfExtent3, + float& t) { - return 0; - } + const float EPSILON = 0.00001f; - Vector3 E = rayDir.Cross(QA); - float dnAbs = 0.0f; + float tmin = 0.0f; // the nearest to the ray origin + float tmax = AZ::Constants::FloatMax; // the farthest from the ray origin - if (dn < -EPSILON) // vertices have counter-clock wise winding when looking at the quad from rayOrigin - { - dnAbs = -dn; - } - else if (dn > EPSILON) - { - E = -E; - dnAbs = dn; - } - else // the ray is parallel to the quad plane - { - return 0; - } + Vector3 P = boxCenter - rayOrigin; // precomputed variable for calculating the vector from rayOrigin to a point on each box facet + Vector3 QAp; // vector from rayOrigin to the center of the facet of boxAxis + Vector3 QAn; // vector from rayOrigin to the center of the facet of -boxAxis + float tp = 0.0f; + float tn = 0.0f; + bool isRayOriginInsideBox = true; - // compute barycentric coordinates - float v = E.Dot(AC); + /* Test the slab_1 formed by the planes with normals boxAxis1 and -boxAxis1. */ - if (v >= 0.0f && v < dnAbs) - { - float w = -E.Dot(AB); - if (w < 0.0f || v + w > dnAbs) + Vector3 axis1 = boxHalfExtent1 * boxAxis1; + + QAp = P + axis1; + tp = QAp.Dot(boxAxis1); + + QAn = P - axis1; + tn = -QAn.Dot(boxAxis1); + + float n = rayDir.Dot(boxAxis1); + if (fabsf(n) < EPSILON) { - return 0; - } - } - else if (v < 0.0f && v > -dnAbs) - { - Vector3 DA = vertexA - vertexD; - float w = E.Dot(DA); - if (w > 0.0f || v + w < -dnAbs) // v, w are negative - { - return 0; - } - } - else - { - return 0; - } - - t = triN.Dot(QA) / dn; - return 1; -} - -// reference: Real-Time Collision Detection, 5.3.3 Intersecting Ray or Segment Against Box -bool AZ::Intersect::IntersectRayBox( - const Vector3& rayOrigin, const Vector3& rayDir, const Vector3& boxCenter, const Vector3& boxAxis1, - const Vector3& boxAxis2, const Vector3& boxAxis3, float boxHalfExtent1, float boxHalfExtent2, float boxHalfExtent3, float& t) -{ - const float EPSILON = 0.00001f; - - float tmin = 0.0f; // the nearest to the ray origin - float tmax = AZ::Constants::FloatMax; // the farthest from the ray origin - - Vector3 P = boxCenter - rayOrigin; // precomputed variable for calculating the vector from rayOrigin to a point on each box facet - Vector3 QAp; // vector from rayOrigin to the center of the facet of boxAxis - Vector3 QAn; // vector from rayOrigin to the center of the facet of -boxAxis - float tp = 0.0f; - float tn = 0.0f; - bool isRayOriginInsideBox = true; - - /* Test the slab_1 formed by the planes with normals boxAxis1 and -boxAxis1. */ - - Vector3 axis1 = boxHalfExtent1 * boxAxis1; - - QAp = P + axis1; - tp = QAp.Dot(boxAxis1); - - QAn = P - axis1; - tn = -QAn.Dot(boxAxis1); - - float n = rayDir.Dot(boxAxis1); - if (fabsf(n) < EPSILON) - { - // If the ray is parallel to the slab and the ray origin is outside, return no intersection. - if (tp < 0.0f || tn < 0.0f) - { - return false; - } - } - else - { - if (tp < 0.0f || tn < 0.0f) - { - isRayOriginInsideBox = false; - } - - float div = 1.0f / n; - float t1 = tp * div; - float t2 = tn * (-div); - if (t1 > t2) - { - AZStd::swap(t1, t2); - } - tmin = AZ::GetMax(tmin, t1); - tmax = AZ::GetMin(tmax, t2); - if (tmin > tmax) - { - return false; - } - } - - /* test the slab_2 formed by plane with normals boxAxis2 and -boxAxis2 */ - - Vector3 axis2 = boxHalfExtent2 * boxAxis2; - - QAp = P + axis2; - tp = QAp.Dot(boxAxis2); - - QAn = P - axis2; - tn = -QAn.Dot(boxAxis2); - - n = rayDir.Dot(boxAxis2); - if (fabsf(n) < EPSILON) - { - // If the ray is parallel to the slab and the ray origin is outside, return no intersection. - if (tp < 0.0f || tn < 0.0f) - { - return false; - } - } - else - { - if (tp < 0.0f || tn < 0.0f) - { - isRayOriginInsideBox = false; - } - - float div = 1.0f / n; - float t1 = tp * div; - float t2 = tn * (-div); - if (t1 > t2) - { - AZStd::swap(t1, t2); - } - tmin = AZ::GetMax(tmin, t1); - tmax = AZ::GetMin(tmax, t2); - if (tmin > tmax) - { - return false; - } - } - - /* test the slab_3 formed by plane with normals boxAxis3 and -boxAxis3 */ - - Vector3 axis3 = boxHalfExtent3 * boxAxis3; - - QAp = P + axis3; - tp = QAp.Dot(boxAxis3); - - QAn = P - axis3; - tn = -QAn.Dot(boxAxis3); - - n = rayDir.Dot(boxAxis3); - if (fabsf(n) < EPSILON) - { - // If the ray is parallel to the slab and the ray origin is outside, return no intersection. - if (tp < 0.0f || tn < 0.0f) - { - return false; - } - } - else - { - if (tp < 0.0f || tn < 0.0f) - { - isRayOriginInsideBox = false; - } - - float div = 1.0f / n; - float t1 = tp * div; - float t2 = tn * (-div); - if (t1 > t2) - { - AZStd::swap(t1, t2); - } - tmin = AZ::GetMax(tmin, t1); - tmax = AZ::GetMin(tmax, t2); - if (tmin > tmax) - { - return false; - } - } - - t = (isRayOriginInsideBox ? tmax : tmin); - return true; -} - -bool AZ::Intersect::IntersectRayObb(const Vector3& rayOrigin, const Vector3& rayDir, const Obb& obb, float& t) -{ - return AZ::Intersect::IntersectRayBox(rayOrigin, rayDir, obb.GetPosition(), - obb.GetAxisX(), obb.GetAxisY(), obb.GetAxisZ(), - obb.GetHalfLengthX(), obb.GetHalfLengthY(), obb.GetHalfLengthZ(), t); -} - -//========================================================================= -// IntersectSegmentCylinder -// [10/21/2009] -//========================================================================= -CylinderIsectTypes -AZ::Intersect::IntersectSegmentCylinder( - const Vector3& sa, const Vector3& dir, const Vector3& p, const Vector3& q, const float r, float& t) -{ - const float epsilon = 0.001f; - Vector3 d = q - p; // can be cached - Vector3 m = sa - p; // -"- - Vector3 n = /*sb - sa*/ dir; // -"- - - float md = m.Dot(d); - float nd = n.Dot(d); - float dd = d.Dot(d); - - // Test if segment fully outside either endcap of cylinder - if (md < 0.0f && md + nd < 0.0f) - { - return RR_ISECT_RAY_CYL_NONE; // Segment outside 'p' side of cylinder - } - if (md > dd && md + nd > dd) - { - return RR_ISECT_RAY_CYL_NONE; // Segment outside 'q' side of cylinder - } - float nn = n.Dot(n); - float mn = m.Dot(n); - float a = dd * nn - nd * nd; - float k = m.Dot(m) - r * r; - float c = dd * k - md * md; - if (std::fabs(a) < epsilon) - { - // Segment runs parallel to cylinder axis - if (c > 0.0f) - { - return RR_ISECT_RAY_CYL_NONE; // 'a' and thus the segment lie outside cylinder - } - // Now known that segment intersects cylinder; figure out how it intersects - if (md < 0.0f) - { - t = -mn / nn; // Intersect segment against 'p' endcap - return RR_ISECT_RAY_CYL_P_SIDE; - } - else if (md > dd) - { - t = (nd - mn) / nn; // Intersect segment against 'q' endcap - return RR_ISECT_RAY_CYL_Q_SIDE; + // If the ray is parallel to the slab and the ray origin is outside, return no intersection. + if (tp < 0.0f || tn < 0.0f) + { + return false; + } } else { - // 'a' lies inside cylinder - t = 0.0f; - return RR_ISECT_RAY_CYL_SA_INSIDE; - } - } - float b = dd * mn - nd * md; - float discr = b * b - a * c; - if (discr < 0.0f) - { - return RR_ISECT_RAY_CYL_NONE; // No real roots; no intersection - } - t = (-b - Sqrt(discr)) / a; - CylinderIsectTypes result = RR_ISECT_RAY_CYL_PQ; // default along the PQ segment + if (tp < 0.0f || tn < 0.0f) + { + isRayOriginInsideBox = false; + } - if (md + t * nd < 0.0f) - { - // Intersection outside cylinder on 'p' side - if (nd <= 0.0f) - { - return RR_ISECT_RAY_CYL_NONE; // Segment pointing away from endcap + float div = 1.0f / n; + float t1 = tp * div; + float t2 = tn * (-div); + if (t1 > t2) + { + AZStd::swap(t1, t2); + } + tmin = AZ::GetMax(tmin, t1); + tmax = AZ::GetMin(tmax, t2); + if (tmin > tmax) + { + return false; + } } - float t0 = -md / nd; - // Keep intersection if Dot(S(t) - p, S(t) - p) <= r^2 - if (k + t0 * (2.0f * mn + t0 * nn) <= 0.0f) + + /* test the slab_2 formed by plane with normals boxAxis2 and -boxAxis2 */ + + Vector3 axis2 = boxHalfExtent2 * boxAxis2; + + QAp = P + axis2; + tp = QAp.Dot(boxAxis2); + + QAn = P - axis2; + tn = -QAn.Dot(boxAxis2); + + n = rayDir.Dot(boxAxis2); + if (fabsf(n) < EPSILON) { - // if( t0 < 0.0f ) t0 = 0.0f; // it's inside the cylinder - t = t0; - result = RR_ISECT_RAY_CYL_P_SIDE; + // If the ray is parallel to the slab and the ray origin is outside, return no intersection. + if (tp < 0.0f || tn < 0.0f) + { + return false; + } } else { - return RR_ISECT_RAY_CYL_NONE; + if (tp < 0.0f || tn < 0.0f) + { + isRayOriginInsideBox = false; + } + + float div = 1.0f / n; + float t1 = tp * div; + float t2 = tn * (-div); + if (t1 > t2) + { + AZStd::swap(t1, t2); + } + tmin = AZ::GetMax(tmin, t1); + tmax = AZ::GetMin(tmax, t2); + if (tmin > tmax) + { + return false; + } } - } - else if (md + t * nd > dd) - { - // Intersection outside cylinder on 'q' side - if (nd >= 0.0f) + + /* test the slab_3 formed by plane with normals boxAxis3 and -boxAxis3 */ + + Vector3 axis3 = boxHalfExtent3 * boxAxis3; + + QAp = P + axis3; + tp = QAp.Dot(boxAxis3); + + QAn = P - axis3; + tn = -QAn.Dot(boxAxis3); + + n = rayDir.Dot(boxAxis3); + if (fabsf(n) < EPSILON) { - return RR_ISECT_RAY_CYL_NONE; // Segment pointing away from endcap - } - float t0 = (dd - md) / nd; - // Keep intersection if Dot(S(t) - q, S(t) - q) <= r^2 - if (k + dd - 2.0f * md + t0 * (2.0f * (mn - nd) + t0 * nn) <= 0.0f) - { - // if( t0 < 0.0f ) t0 = 0.0f; // it's inside the cylinder - t = t0; - result = RR_ISECT_RAY_CYL_Q_SIDE; + // If the ray is parallel to the slab and the ray origin is outside, return no intersection. + if (tp < 0.0f || tn < 0.0f) + { + return false; + } } else { - return RR_ISECT_RAY_CYL_NONE; + if (tp < 0.0f || tn < 0.0f) + { + isRayOriginInsideBox = false; + } + + float div = 1.0f / n; + float t1 = tp * div; + float t2 = tn * (-div); + if (t1 > t2) + { + AZStd::swap(t1, t2); + } + tmin = AZ::GetMax(tmin, t1); + tmax = AZ::GetMin(tmax, t2); + if (tmin > tmax) + { + return false; + } } + + t = (isRayOriginInsideBox ? tmax : tmin); + return true; } - // Segment intersects cylinder between the end-caps; t is correct - if (t > 1.0f) + bool Intersect::IntersectRayObb(const Vector3& rayOrigin, const Vector3& rayDir, const Obb& obb, float& t) { - return RR_ISECT_RAY_CYL_NONE; // Intersection lies outside segment + return Intersect::IntersectRayBox( + rayOrigin, rayDir, obb.GetPosition(), obb.GetAxisX(), obb.GetAxisY(), obb.GetAxisZ(), obb.GetHalfLengthX(), + obb.GetHalfLengthY(), obb.GetHalfLengthZ(), t); } - else if (t < 0.0f) + + //========================================================================= + // IntersectSegmentCylinder + // [10/21/2009] + //========================================================================= + Intersect::CylinderIsectTypes Intersect::IntersectSegmentCylinder( + const Vector3& sa, const Vector3& dir, const Vector3& p, const Vector3& q, const float r, float& t) { - if (c <= 0.0f) + const float epsilon = 0.001f; + Vector3 d = q - p; // can be cached + Vector3 m = sa - p; // -"- + Vector3 n = /*sb - sa*/ dir; // -"- + + float md = m.Dot(d); + float nd = n.Dot(d); + float dd = d.Dot(d); + + // Test if segment fully outside either endcap of cylinder + if (md < 0.0f && md + nd < 0.0f) { - t = 0.0f; - return RR_ISECT_RAY_CYL_SA_INSIDE; // Segment starts inside + return RR_ISECT_RAY_CYL_NONE; // Segment outside 'p' side of cylinder } - else + if (md > dd && md + nd > dd) + { + return RR_ISECT_RAY_CYL_NONE; // Segment outside 'q' side of cylinder + } + float nn = n.Dot(n); + float mn = m.Dot(n); + float a = dd * nn - nd * nd; + float k = m.Dot(m) - r * r; + float c = dd * k - md * md; + if (std::fabs(a) < epsilon) + { + // Segment runs parallel to cylinder axis + if (c > 0.0f) + { + return RR_ISECT_RAY_CYL_NONE; // 'a' and thus the segment lie outside cylinder + } + // Now known that segment intersects cylinder; figure out how it intersects + if (md < 0.0f) + { + t = -mn / nn; // Intersect segment against 'p' endcap + return RR_ISECT_RAY_CYL_P_SIDE; + } + else if (md > dd) + { + t = (nd - mn) / nn; // Intersect segment against 'q' endcap + return RR_ISECT_RAY_CYL_Q_SIDE; + } + else + { + // 'a' lies inside cylinder + t = 0.0f; + return RR_ISECT_RAY_CYL_SA_INSIDE; + } + } + float b = dd * mn - nd * md; + float discr = b * b - a * c; + if (discr < 0.0f) + { + return RR_ISECT_RAY_CYL_NONE; // No real roots; no intersection + } + t = (-b - Sqrt(discr)) / a; + CylinderIsectTypes result = RR_ISECT_RAY_CYL_PQ; // default along the PQ segment + + if (md + t * nd < 0.0f) + { + // Intersection outside cylinder on 'p' side + if (nd <= 0.0f) + { + return RR_ISECT_RAY_CYL_NONE; // Segment pointing away from endcap + } + float t0 = -md / nd; + // Keep intersection if Dot(S(t) - p, S(t) - p) <= r^2 + if (k + t0 * (2.0f * mn + t0 * nn) <= 0.0f) + { + // if( t0 < 0.0f ) t0 = 0.0f; // it's inside the cylinder + t = t0; + result = RR_ISECT_RAY_CYL_P_SIDE; + } + else + { + return RR_ISECT_RAY_CYL_NONE; + } + } + else if (md + t * nd > dd) + { + // Intersection outside cylinder on 'q' side + if (nd >= 0.0f) + { + return RR_ISECT_RAY_CYL_NONE; // Segment pointing away from endcap + } + float t0 = (dd - md) / nd; + // Keep intersection if Dot(S(t) - q, S(t) - q) <= r^2 + if (k + dd - 2.0f * md + t0 * (2.0f * (mn - nd) + t0 * nn) <= 0.0f) + { + // if( t0 < 0.0f ) t0 = 0.0f; // it's inside the cylinder + t = t0; + result = RR_ISECT_RAY_CYL_Q_SIDE; + } + else + { + return RR_ISECT_RAY_CYL_NONE; + } + } + + // Segment intersects cylinder between the end-caps; t is correct + if (t > 1.0f) { return RR_ISECT_RAY_CYL_NONE; // Intersection lies outside segment } - } - else - { - return result; - } -} -//========================================================================= -// IntersectSegmentCapsule -// [10/21/2009] -//========================================================================= -CapsuleIsectTypes -AZ::Intersect::IntersectSegmentCapsule(const Vector3& sa, const Vector3& dir, const Vector3& p, const Vector3& q, const float r, float& t) -{ - int result = IntersectSegmentCylinder(sa, dir, p, q, r, t); - - if (result == RR_ISECT_RAY_CYL_SA_INSIDE) - { - return ISECT_RAY_CAPSULE_SA_INSIDE; - } - - if (result == RR_ISECT_RAY_CYL_PQ) - { - return ISECT_RAY_CAPSULE_PQ; - } - - Vector3 dirNorm = dir; - float len = dirNorm.NormalizeWithLength(); - - // check spheres - float timeLenTop, timeLenBottom; - int resultTop = IntersectRaySphere(sa, dirNorm, p, r, timeLenTop); - if (resultTop == ISECT_RAY_SPHERE_SA_INSIDE) - { - return ISECT_RAY_CAPSULE_SA_INSIDE; - } - int resultBottom = IntersectRaySphere(sa, dirNorm, q, r, timeLenBottom); - if (resultBottom == ISECT_RAY_SPHERE_SA_INSIDE) - { - return ISECT_RAY_CAPSULE_SA_INSIDE; - } - - if (resultTop == ISECT_RAY_SPHERE_ISECT) - { - if (resultBottom == ISECT_RAY_SPHERE_ISECT) + else if (t < 0.0f) { - // if we intersect both spheres pick the closest one - if (timeLenTop < timeLenBottom) + if (c <= 0.0f) + { + t = 0.0f; + return RR_ISECT_RAY_CYL_SA_INSIDE; // Segment starts inside + } + else + { + return RR_ISECT_RAY_CYL_NONE; // Intersection lies outside segment + } + } + else + { + return result; + } + } + //========================================================================= + // IntersectSegmentCapsule + // [10/21/2009] + //========================================================================= + Intersect::CapsuleIsectTypes Intersect::IntersectSegmentCapsule( + const Vector3& sa, const Vector3& dir, const Vector3& p, const Vector3& q, const float r, float& t) + { + int result = IntersectSegmentCylinder(sa, dir, p, q, r, t); + + if (result == RR_ISECT_RAY_CYL_SA_INSIDE) + { + return ISECT_RAY_CAPSULE_SA_INSIDE; + } + + if (result == RR_ISECT_RAY_CYL_PQ) + { + return ISECT_RAY_CAPSULE_PQ; + } + + Vector3 dirNorm = dir; + float len = dirNorm.NormalizeWithLength(); + + // check spheres + float timeLenTop, timeLenBottom; + int resultTop = IntersectRaySphere(sa, dirNorm, p, r, timeLenTop); + if (resultTop == ISECT_RAY_SPHERE_SA_INSIDE) + { + return ISECT_RAY_CAPSULE_SA_INSIDE; + } + int resultBottom = IntersectRaySphere(sa, dirNorm, q, r, timeLenBottom); + if (resultBottom == ISECT_RAY_SPHERE_SA_INSIDE) + { + return ISECT_RAY_CAPSULE_SA_INSIDE; + } + + if (resultTop == ISECT_RAY_SPHERE_ISECT) + { + if (resultBottom == ISECT_RAY_SPHERE_ISECT) + { + // if we intersect both spheres pick the closest one + if (timeLenTop < timeLenBottom) + { + t = timeLenTop / len; + return ISECT_RAY_CAPSULE_P_SIDE; + } + else + { + t = timeLenBottom / len; + return ISECT_RAY_CAPSULE_Q_SIDE; + } + } + else { t = timeLenTop / len; return ISECT_RAY_CAPSULE_P_SIDE; } - else - { - t = timeLenBottom / len; - return ISECT_RAY_CAPSULE_Q_SIDE; - } } - else + + if (resultBottom == ISECT_RAY_SPHERE_ISECT) { - t = timeLenTop / len; - return ISECT_RAY_CAPSULE_P_SIDE; + t = timeLenBottom / len; + return ISECT_RAY_CAPSULE_Q_SIDE; } + + return ISECT_RAY_CAPSULE_NONE; } - if (resultBottom == ISECT_RAY_SPHERE_ISECT) + //========================================================================= + // IntersectSegmentPolyhedron + // [10/21/2009] + //========================================================================= + bool Intersect::IntersectSegmentPolyhedron( + const Vector3& sa, + const Vector3& dir, + const Plane p[], + int numPlanes, + float& tfirst, + float& tlast, + int& iFirstPlane, + int& iLastPlane) { - t = timeLenBottom / len; - return ISECT_RAY_CAPSULE_Q_SIDE; - } - - return ISECT_RAY_CAPSULE_NONE; -} - -//========================================================================= -// IntersectSegmentPolyhedron -// [10/21/2009] -//========================================================================= -bool -AZ::Intersect::IntersectSegmentPolyhedron( - const Vector3& sa, const Vector3& dir, const Plane p[], int numPlanes, - float& tfirst, float& tlast, int& iFirstPlane, int& iLastPlane) -{ - // Compute direction vector for the segment - Vector3 d = /*b - a*/ dir; - // Set initial interval to being the whole segment. For a ray, tlast should be - // set to +RR_FLT_MAX. For a line, additionally tfirst should be set to -RR_FLT_MAX - tfirst = 0.0f; - tlast = 1.0f; - iFirstPlane = -1; - iLastPlane = -1; - // Intersect segment against each plane - for (int i = 0; i < numPlanes; i++) - { - const Vector4& plane = p[i].GetPlaneEquationCoefficients(); - - float denom = plane.Dot3(d); - // don't forget we store -D in the plane - float dist = (-plane.GetW()) - plane.Dot3(sa); - // Test if segment runs parallel to the plane - if (denom == 0.0f) + // Compute direction vector for the segment + Vector3 d = /*b - a*/ dir; + // Set initial interval to being the whole segment. For a ray, tlast should be + // set to +RR_FLT_MAX. For a line, additionally tfirst should be set to -RR_FLT_MAX + tfirst = 0.0f; + tlast = 1.0f; + iFirstPlane = -1; + iLastPlane = -1; + // Intersect segment against each plane + for (int i = 0; i < numPlanes; i++) { - // If so, return "no intersection" if segment lies outside plane - if (dist < 0.0f) + const Vector4& plane = p[i].GetPlaneEquationCoefficients(); + + float denom = plane.Dot3(d); + // don't forget we store -D in the plane + float dist = (-plane.GetW()) - plane.Dot3(sa); + // Test if segment runs parallel to the plane + if (denom == 0.0f) { - return false; - } - } - else - { - // Compute parameterized t value for intersection with current plane - float t = dist / denom; - if (denom < 0.0f) - { - // When entering half space, update tfirst if t is larger - if (t > tfirst) + // If so, return "no intersection" if segment lies outside plane + if (dist < 0.0f) { - tfirst = t; - iFirstPlane = i; + return false; } } else { - // When exiting half space, update tlast if t is smaller - if (t < tlast) + // Compute parameterized t value for intersection with current plane + float t = dist / denom; + if (denom < 0.0f) { - tlast = t; - iLastPlane = i; + // When entering half space, update tfirst if t is larger + if (t > tfirst) + { + tfirst = t; + iFirstPlane = i; + } + } + else + { + // When exiting half space, update tlast if t is smaller + if (t < tlast) + { + tlast = t; + iLastPlane = i; + } + } + + // Exit with "no intersection" if intersection becomes empty + if (tfirst > tlast) + { + return false; } } - - // Exit with "no intersection" if intersection becomes empty - if (tfirst > tlast) - { - return false; - } } - } - //DBG_Assert(iFirstPlane!=-1&&iLastPlane!=-1,("We have some bad border case to have only one plane, fix this function!")); - if (iFirstPlane == -1 && iLastPlane == -1) - { - return false; - } - - // A nonzero logical intersection, so the segment intersects the polyhedron - return true; -} - -//========================================================================= -// ClosestSegmentSegment -// [10/21/2009] -//========================================================================= -void -AZ::Intersect::ClosestSegmentSegment( - const Vector3& segment1Start, const Vector3& segment1End, - const Vector3& segment2Start, const Vector3& segment2End, - float& segment1Proportion, float& segment2Proportion, - Vector3& closestPointSegment1, Vector3& closestPointSegment2, - float epsilon) -{ - const Vector3 segment1 = segment1End - segment1Start; - const Vector3 segment2 = segment2End - segment2Start; - const Vector3 segmentStartsVector = segment1Start - segment2Start; - const float segment1LengthSquared = segment1.Dot(segment1); - const float segment2LengthSquared = segment2.Dot(segment2); - - // Check if both segments degenerate into points - if (segment1LengthSquared <= epsilon && segment2LengthSquared <= epsilon) - { - segment1Proportion = 0.0f; - segment2Proportion = 0.0f; - closestPointSegment1 = segment1Start; - closestPointSegment2 = segment2Start; - return; - } - - float projSegment2SegmentStarts = segment2.Dot(segmentStartsVector); - - // Check if segment 1 degenerates into a point - if (segment1LengthSquared <= epsilon) - { - segment1Proportion = 0.0f; - segment2Proportion = AZ::GetClamp(projSegment2SegmentStarts / segment2LengthSquared, 0.0f, 1.0f); - } - else - { - float projSegment1SegmentStarts = segment1.Dot(segmentStartsVector); - // Check if segment 2 degenerates into a point - if (segment2LengthSquared <= epsilon) + // DBG_Assert(iFirstPlane!=-1&&iLastPlane!=-1,("We have some bad border case to have only one plane, fix this function!")); + if (iFirstPlane == -1 && iLastPlane == -1) { - segment1Proportion = AZ::GetClamp(-projSegment1SegmentStarts / segment1LengthSquared, 0.0f, 1.0f); + return false; + } + + // A nonzero logical intersection, so the segment intersects the polyhedron + return true; + } + + //========================================================================= + // ClosestSegmentSegment + // [10/21/2009] + //========================================================================= + void Intersect::ClosestSegmentSegment( + const Vector3& segment1Start, + const Vector3& segment1End, + const Vector3& segment2Start, + const Vector3& segment2End, + float& segment1Proportion, + float& segment2Proportion, + Vector3& closestPointSegment1, + Vector3& closestPointSegment2, + float epsilon) + { + const Vector3 segment1 = segment1End - segment1Start; + const Vector3 segment2 = segment2End - segment2Start; + const Vector3 segmentStartsVector = segment1Start - segment2Start; + const float segment1LengthSquared = segment1.Dot(segment1); + const float segment2LengthSquared = segment2.Dot(segment2); + + // Check if both segments degenerate into points + if (segment1LengthSquared <= epsilon && segment2LengthSquared <= epsilon) + { + segment1Proportion = 0.0f; segment2Proportion = 0.0f; + closestPointSegment1 = segment1Start; + closestPointSegment2 = segment2Start; + return; + } + + float projSegment2SegmentStarts = segment2.Dot(segmentStartsVector); + + // Check if segment 1 degenerates into a point + if (segment1LengthSquared <= epsilon) + { + segment1Proportion = 0.0f; + segment2Proportion = AZ::GetClamp(projSegment2SegmentStarts / segment2LengthSquared, 0.0f, 1.0f); } else { - // The general non-degenerate case starts here - float projSegment1Segment2 = segment1.Dot(segment2); - float denom = segment1LengthSquared * segment2LengthSquared - projSegment1Segment2 * projSegment1Segment2; // Always nonnegative - - // If segments not parallel, compute closest point on segment1 to segment2, and - // clamp to segment1. Else pick arbitrary segment1Proportion (here 0) - if (denom != 0.0f) + float projSegment1SegmentStarts = segment1.Dot(segmentStartsVector); + // Check if segment 2 degenerates into a point + if (segment2LengthSquared <= epsilon) { - segment1Proportion = AZ::GetClamp((projSegment1Segment2 * projSegment2SegmentStarts - projSegment1SegmentStarts * segment2LengthSquared) / denom, 0.0f, 1.0f); + segment1Proportion = AZ::GetClamp(-projSegment1SegmentStarts / segment1LengthSquared, 0.0f, 1.0f); + segment2Proportion = 0.0f; } else { - segment1Proportion = 0.0f; - } + // The general non-degenerate case starts here + float projSegment1Segment2 = segment1.Dot(segment2); + float denom = + segment1LengthSquared * segment2LengthSquared - projSegment1Segment2 * projSegment1Segment2; // Always nonnegative - // Compute point on segment2 closest to segment1 using - segment2Proportion = (projSegment1Segment2 * segment1Proportion + projSegment2SegmentStarts) / segment2LengthSquared; + // If segments not parallel, compute closest point on segment1 to segment2, and + // clamp to segment1. Else pick arbitrary segment1Proportion (here 0) + if (denom != 0.0f) + { + segment1Proportion = AZ::GetClamp( + (projSegment1Segment2 * projSegment2SegmentStarts - projSegment1SegmentStarts * segment2LengthSquared) / denom, + 0.0f, 1.0f); + } + else + { + segment1Proportion = 0.0f; + } - // If segment2Proportion in [0,1] done. Else clamp segment2Proportion, recompute segment1Proportion for the new value of segment2Proportion - // and clamp segment1Proportion to [0, 1] - if (segment2Proportion < 0.0f) - { - segment2Proportion = 0.0f; - segment1Proportion = AZ::GetClamp(-projSegment1SegmentStarts / segment1LengthSquared, 0.0f, 1.0f); - } - else if (segment2Proportion > 1.0f) - { - segment2Proportion = 1.0f; - segment1Proportion = AZ::GetClamp((projSegment1Segment2 - projSegment1SegmentStarts) / segment1LengthSquared, 0.0f, 1.0f); + // Compute point on segment2 closest to segment1 using + segment2Proportion = (projSegment1Segment2 * segment1Proportion + projSegment2SegmentStarts) / segment2LengthSquared; + + // If segment2Proportion in [0,1] done. Else clamp segment2Proportion, recompute segment1Proportion for the new value of + // segment2Proportion and clamp segment1Proportion to [0, 1] + if (segment2Proportion < 0.0f) + { + segment2Proportion = 0.0f; + segment1Proportion = AZ::GetClamp(-projSegment1SegmentStarts / segment1LengthSquared, 0.0f, 1.0f); + } + else if (segment2Proportion > 1.0f) + { + segment2Proportion = 1.0f; + segment1Proportion = + AZ::GetClamp((projSegment1Segment2 - projSegment1SegmentStarts) / segment1LengthSquared, 0.0f, 1.0f); + } } } + + closestPointSegment1 = segment1Start + segment1 * segment1Proportion; + closestPointSegment2 = segment2Start + segment2 * segment2Proportion; } - closestPointSegment1 = segment1Start + segment1 * segment1Proportion; - closestPointSegment2 = segment2Start + segment2 * segment2Proportion; -} - -void AZ::Intersect::ClosestSegmentSegment( - const Vector3& segment1Start, const Vector3& segment1End, - const Vector3& segment2Start, const Vector3& segment2End, - Vector3& closestPointSegment1, Vector3& closestPointSegment2, - float epsilon) -{ - float proportion1, proportion2; - AZ::Intersect::ClosestSegmentSegment( - segment1Start, segment1End, - segment2Start, segment2End, - proportion1, proportion2, - closestPointSegment1, closestPointSegment2, epsilon); -} - -void AZ::Intersect::ClosestPointSegment( - const Vector3& point, const Vector3& segmentStart, const Vector3& segmentEnd, - float& proportion, Vector3& closestPointOnSegment) -{ - Vector3 segment = segmentEnd - segmentStart; - // Project point onto segment, but deferring divide by segment.Dot(segment) - proportion = (point - segmentStart).Dot(segment); - if (proportion <= 0.0f) + void Intersect::ClosestSegmentSegment( + const Vector3& segment1Start, + const Vector3& segment1End, + const Vector3& segment2Start, + const Vector3& segment2End, + Vector3& closestPointSegment1, + Vector3& closestPointSegment2, + float epsilon) { - // Point projects outside the [segmentStart, segmentEnd] interval, on the segmentStart side, clamp to segmentStart - proportion = 0.0f; - closestPointOnSegment = segmentStart; + float proportion1, proportion2; + Intersect::ClosestSegmentSegment( + segment1Start, segment1End, segment2Start, segment2End, proportion1, proportion2, closestPointSegment1, closestPointSegment2, + epsilon); } - else + + void Intersect::ClosestPointSegment( + const Vector3& point, const Vector3& segmentStart, const Vector3& segmentEnd, float& proportion, Vector3& closestPointOnSegment) { - float segmentLengthSquared = segment.Dot(segment); - if (proportion >= segmentLengthSquared) + Vector3 segment = segmentEnd - segmentStart; + // Project point onto segment, but deferring divide by segment.Dot(segment) + proportion = (point - segmentStart).Dot(segment); + if (proportion <= 0.0f) { - // Point projects outside the [segmentStart, segmentEnd] interval, on the segmentEnd side, clamp to segmentEnd - proportion = 1.0f; - closestPointOnSegment = segmentEnd; + // Point projects outside the [segmentStart, segmentEnd] interval, on the segmentStart side, clamp to segmentStart + proportion = 0.0f; + closestPointOnSegment = segmentStart; } else { - // Point projects inside the [segmentStart, segmentEnd] interval, must do deferred divide now - proportion = proportion / segmentLengthSquared; - closestPointOnSegment = segmentStart + (proportion * segment); + float segmentLengthSquared = segment.Dot(segment); + if (proportion >= segmentLengthSquared) + { + // Point projects outside the [segmentStart, segmentEnd] interval, on the segmentEnd side, clamp to segmentEnd + proportion = 1.0f; + closestPointOnSegment = segmentEnd; + } + else + { + // Point projects inside the [segmentStart, segmentEnd] interval, must do deferred divide now + proportion = proportion / segmentLengthSquared; + closestPointOnSegment = segmentStart + (proportion * segment); + } } } -} #if 0 ////////////////////////////////////////////////////////////////////////// @@ -2121,3 +2171,5 @@ namespace test } ////////////////////////////////////////////////////////////////////////// #endif + +} // namespace AZ diff --git a/Code/Framework/AzCore/AzCore/Math/Matrix3x3.cpp b/Code/Framework/AzCore/AzCore/Math/Matrix3x3.cpp index 02afcab523..46d4843546 100644 --- a/Code/Framework/AzCore/AzCore/Math/Matrix3x3.cpp +++ b/Code/Framework/AzCore/AzCore/Math/Matrix3x3.cpp @@ -260,7 +260,7 @@ namespace AZ behaviorContext->Class()-> Attribute(Script::Attributes::Scope, Script::Attributes::ScopeFlags::Common)-> Attribute(Script::Attributes::Module, "math")-> - Attribute(Script::Attributes::ExcludeFrom, Script::Attributes::ExcludeFlags::All)-> + Attribute(Script::Attributes::ExcludeFrom, Script::Attributes::ExcludeFlags::ListOnly)-> Attribute(Script::Attributes::Storage, Script::Attributes::StorageType::Value)-> Attribute(AZ::Script::Attributes::ConstructorOverride, &Internal::Matrix3x3ScriptConstructor)-> Attribute(Script::Attributes::GenericConstructorOverride, &Internal::Matrix3x3DefaultConstructor)-> diff --git a/Code/Framework/AzCore/AzCore/Math/Matrix3x4.cpp b/Code/Framework/AzCore/AzCore/Math/Matrix3x4.cpp index 6d79c4c068..78da9e76d2 100644 --- a/Code/Framework/AzCore/AzCore/Math/Matrix3x4.cpp +++ b/Code/Framework/AzCore/AzCore/Math/Matrix3x4.cpp @@ -351,7 +351,8 @@ namespace AZ ->Method("CreateFromMatrix3x3AndTranslation", &Matrix3x4::CreateFromMatrix3x3AndTranslation) ->Method("CreateScale", &Matrix3x4::CreateScale) ->Method("CreateDiagonal", &Matrix3x4::CreateDiagonal) - ->Method("CreateTranslation", &Matrix3x4::CreateTranslation); + ->Method("CreateTranslation", &Matrix3x4::CreateTranslation) + ->Method("UnsafeCreateFromMatrix4x4", &Matrix3x4::UnsafeCreateFromMatrix4x4); } } diff --git a/Code/Framework/AzCore/AzCore/Math/Matrix3x4.h b/Code/Framework/AzCore/AzCore/Math/Matrix3x4.h index 60a88df686..25653627ea 100644 --- a/Code/Framework/AzCore/AzCore/Math/Matrix3x4.h +++ b/Code/Framework/AzCore/AzCore/Math/Matrix3x4.h @@ -90,6 +90,9 @@ namespace AZ //! Constructs from a Matrix3x3 and a translation. static Matrix3x4 CreateFromMatrix3x3AndTranslation(const Matrix3x3& matrix3x3, const Vector3& translation); + //! Constructs from a Matrix4x4. + static Matrix3x4 UnsafeCreateFromMatrix4x4(const Matrix4x4& matrix4x4); + //! Constructs from a Transform. static Matrix3x4 CreateFromTransform(const Transform& transform); @@ -227,7 +230,7 @@ namespace AZ Matrix3x4& operator+=(const Matrix3x4& rhs); //! @} - //! Operator for matrix-matrix substraction. + //! Operator for matrix-matrix subtraction. //! @{ [[nodiscard]] Matrix3x4 operator-(const Matrix3x4& rhs) const; Matrix3x4& operator-=(const Matrix3x4& rhs); @@ -266,6 +269,9 @@ namespace AZ //! Post-multiplies the matrix by a vector, using only the 3x3 part of the matrix. [[nodiscard]] Vector3 TransformVector(const Vector3& rhs) const; + //! Post-multiplies the matrix by a point, using the rotation and translation part of the matrix. + [[nodiscard]] Vector3 TransformPoint(const Vector3& rhs) const; + //! Gets the result of transposing the 3x3 part of the matrix, setting the translation part to zero. [[nodiscard]] Matrix3x4 GetTranspose() const; diff --git a/Code/Framework/AzCore/AzCore/Math/Matrix3x4.inl b/Code/Framework/AzCore/AzCore/Math/Matrix3x4.inl index 2f127221ab..d1367cd26c 100644 --- a/Code/Framework/AzCore/AzCore/Math/Matrix3x4.inl +++ b/Code/Framework/AzCore/AzCore/Math/Matrix3x4.inl @@ -203,6 +203,16 @@ namespace AZ } + AZ_MATH_INLINE Matrix3x4 Matrix3x4::UnsafeCreateFromMatrix4x4(const Matrix4x4& matrix4x4) + { + Matrix3x4 result; + result.SetRow(0, matrix4x4.GetRow(0)); + result.SetRow(1, matrix4x4.GetRow(1)); + result.SetRow(2, matrix4x4.GetRow(2)); + return result; + } + + AZ_MATH_INLINE Matrix3x4 Matrix3x4::CreateScale(const Vector3& scale) { return CreateDiagonal(scale); @@ -609,6 +619,12 @@ namespace AZ } + AZ_MATH_INLINE Vector3 Matrix3x4::TransformPoint(const Vector3& rhs) const + { + return Multiply3x3(rhs) + GetTranslation(); + } + + AZ_MATH_INLINE Matrix3x4 Matrix3x4::GetTranspose() const { Matrix3x4 result; diff --git a/Code/Framework/AzCore/AzCore/Math/Matrix4x4.cpp b/Code/Framework/AzCore/AzCore/Math/Matrix4x4.cpp index ccfba0fc4e..6a5784690d 100644 --- a/Code/Framework/AzCore/AzCore/Math/Matrix4x4.cpp +++ b/Code/Framework/AzCore/AzCore/Math/Matrix4x4.cpp @@ -280,7 +280,7 @@ namespace AZ behaviorContext->Class()-> Attribute(Script::Attributes::Scope, Script::Attributes::ScopeFlags::Common)-> Attribute(Script::Attributes::Module, "math")-> - Attribute(Script::Attributes::ExcludeFrom, Script::Attributes::ExcludeFlags::All)-> + Attribute(Script::Attributes::ExcludeFrom, Script::Attributes::ExcludeFlags::ListOnly)-> Attribute(Script::Attributes::Storage, Script::Attributes::StorageType::Value)-> Attribute(Script::Attributes::GenericConstructorOverride, &Internal::Matrix4x4DefaultConstructor)-> Property("basisX", &Matrix4x4::GetBasisX, &Matrix4x4::SetBasisX)-> diff --git a/Code/Framework/AzCore/AzCore/Math/Obb.cpp b/Code/Framework/AzCore/AzCore/Math/Obb.cpp index 8b223a6e43..03e3722309 100644 --- a/Code/Framework/AzCore/AzCore/Math/Obb.cpp +++ b/Code/Framework/AzCore/AzCore/Math/Obb.cpp @@ -69,7 +69,7 @@ namespace AZ if (behaviorContext) { behaviorContext->Class()-> - Attribute(Script::Attributes::ExcludeFrom, Script::Attributes::ExcludeFlags::All)-> + Attribute(Script::Attributes::ExcludeFrom, Script::Attributes::ExcludeFlags::ListOnly)-> Attribute(Script::Attributes::Storage, Script::Attributes::StorageType::Value)-> Attribute(Script::Attributes::GenericConstructorOverride, &Internal::ObbDefaultConstructor)-> Property("position", &Obb::GetPosition, &Obb::SetPosition)-> diff --git a/Code/Framework/AzCore/AzCore/Math/Plane.cpp b/Code/Framework/AzCore/AzCore/Math/Plane.cpp index cde82c4bed..dced975543 100644 --- a/Code/Framework/AzCore/AzCore/Math/Plane.cpp +++ b/Code/Framework/AzCore/AzCore/Math/Plane.cpp @@ -142,7 +142,7 @@ namespace AZ if (behaviorContext) { behaviorContext->Class()-> - Attribute(AZ::Script::Attributes::ExcludeFrom, AZ::Script::Attributes::ExcludeFlags::All)-> + Attribute(AZ::Script::Attributes::ExcludeFrom, AZ::Script::Attributes::ExcludeFlags::ListOnly)-> Attribute(AZ::Script::Attributes::Storage, AZ::Script::Attributes::StorageType::Value)-> Attribute(AZ::Script::Attributes::GenericConstructorOverride, &Internal::PlaneDefaultConstructor)-> Method("ToString", &Internal::PlaneToString)-> diff --git a/Code/Framework/AzCore/AzCore/Math/Plane.inl b/Code/Framework/AzCore/AzCore/Math/Plane.inl index f33d356312..22c449dc6f 100644 --- a/Code/Framework/AzCore/AzCore/Math/Plane.inl +++ b/Code/Framework/AzCore/AzCore/Math/Plane.inl @@ -19,6 +19,7 @@ namespace AZ AZ_MATH_INLINE Plane Plane::CreateFromNormalAndPoint(const Vector3& normal, const Vector3& point) { + AZ_MATH_ASSERT(normal.IsNormalized(), "This normal is not normalized"); return Plane(Simd::Vec4::ConstructPlane(normal.GetSimdValue(), point.GetSimdValue())); } @@ -65,18 +66,21 @@ namespace AZ AZ_MATH_INLINE void Plane::Set(const Vector3& normal, float d) { + AZ_MATH_ASSERT(normal.IsNormalized(), "This normal is not normalized"); m_plane.Set(normal, d); } AZ_MATH_INLINE void Plane::Set(float a, float b, float c, float d) { + AZ_MATH_ASSERT(Vector3(a, b, c).IsNormalized(), "This normal is not normalized"); m_plane.Set(a, b, c, d); } AZ_MATH_INLINE void Plane::SetNormal(const Vector3& normal) { + AZ_MATH_ASSERT(normal.IsNormalized(), "This normal is not normalized"); m_plane.SetX(normal.GetX()); m_plane.SetY(normal.GetY()); m_plane.SetZ(normal.GetZ()); diff --git a/Code/Framework/AzCore/AzCore/Math/Quaternion.cpp b/Code/Framework/AzCore/AzCore/Math/Quaternion.cpp index 8b5d9e9321..fac70bd05a 100644 --- a/Code/Framework/AzCore/AzCore/Math/Quaternion.cpp +++ b/Code/Framework/AzCore/AzCore/Math/Quaternion.cpp @@ -170,7 +170,7 @@ namespace AZ behaviorContext->Class()-> Attribute(AZ::Script::Attributes::Scope, AZ::Script::Attributes::ScopeFlags::Common)-> Attribute(AZ::Script::Attributes::Module, "math")-> - Attribute(AZ::Script::Attributes::ExcludeFrom, AZ::Script::Attributes::ExcludeFlags::All)-> + Attribute(AZ::Script::Attributes::ExcludeFrom, AZ::Script::Attributes::ExcludeFlags::ListOnly)-> Constructor()-> Constructor()-> Attribute(AZ::Script::Attributes::Storage, AZ::Script::Attributes::StorageType::Value)-> @@ -254,13 +254,13 @@ namespace AZ Method("CreateFromMatrix3x3", &Quaternion::CreateFromMatrix3x3)-> Method("CreateFromMatrix4x4", &Quaternion::CreateFromMatrix4x4)-> Method("CreateFromAxisAngle", &Quaternion::CreateFromAxisAngle)-> + Method("CreateFromScaledAxisAngle", &Quaternion::CreateFromScaledAxisAngle)-> Method("CreateShortestArc", &Quaternion::CreateShortestArc)-> Method("CreateFromEulerAnglesDegrees", &Quaternion::CreateFromEulerAnglesDegrees) ; } } - Quaternion Quaternion::CreateFromMatrix3x3(const Matrix3x3& m) { return CreateFromBasis(m.GetBasisX(), m.GetBasisY(), m.GetBasisZ()); @@ -430,4 +430,24 @@ namespace AZ outAngle = 0.0f; } } + + + Vector3 Quaternion::ConvertToScaledAxisAngle() const + { + // Take the log of the quaternion to convert it to the exponential map + // and multiply it by 2.0 to bring it into the scaled axis-angle representation. + const AZ::Vector3 imaginary = GetImaginary(); + const float length = imaginary.GetLength(); + if (length < AZ::Constants::FloatEpsilon) + { + return imaginary * 2.0f; + } + else + { + const float halfAngle = acosf(AZ::GetClamp(GetW(), -1.0f, 1.0f)); + + // Multiply by 2.0 to convert the half angle into the full one. + return halfAngle * 2.0f * (imaginary / length); + } + } } diff --git a/Code/Framework/AzCore/AzCore/Math/Quaternion.h b/Code/Framework/AzCore/AzCore/Math/Quaternion.h index f2c266ed3e..ad454aab4f 100644 --- a/Code/Framework/AzCore/AzCore/Math/Quaternion.h +++ b/Code/Framework/AzCore/AzCore/Math/Quaternion.h @@ -54,11 +54,11 @@ namespace AZ //! Sets components using a Vector3 for the imaginary part and a float for the real part. static Quaternion CreateFromVector3AndValue(const Vector3& v, float w); - //! Sets the quaternion to be a rotation around a specified axis. + //! Sets the quaternion to be a rotation around a specified axis in radians. //! @{ - static Quaternion CreateRotationX(float angle); - static Quaternion CreateRotationY(float angle); - static Quaternion CreateRotationZ(float angle); + static Quaternion CreateRotationX(float angleInRadians); + static Quaternion CreateRotationY(float angleInRadians); + static Quaternion CreateRotationZ(float angleInRadians); //! @} //! Creates a quaternion from a Matrix3x3 @@ -77,6 +77,9 @@ namespace AZ static Quaternion CreateFromAxisAngle(const Vector3& axis, float angle); + //! Create a quaternion from a scaled axis-angle representation. + static Quaternion CreateFromScaledAxisAngle(const Vector3& scaledAxisAngle); + static Quaternion CreateShortestArc(const Vector3& v1, const Vector3& v2); //! Creates a quaternion using rotation in degrees about the axes. First rotated about the X axis, followed by the Y axis, then the Z axis. @@ -165,6 +168,14 @@ namespace AZ float NormalizeWithLengthEstimate(); //! @} + //! Get the shortest equivalent of the rotation. + //! In case the w component of the quaternion is negative the rotation is > 180° and taking the longer path. + //! The quaternion will be inverted in that case to take the shortest path of rotation. + //! @{ + Quaternion GetShortestEquivalent() const; + void ShortestEquivalent(); + //! @} + //! Linearly interpolate towards a destination quaternion. //! @param[in] dest The quaternion to interpolate towards. //! @param[in] t Normalized interpolation value where 0.0 represents the current and 1.0 the destination value. @@ -231,6 +242,9 @@ namespace AZ //! @param[out] outAngle A float rotation angle around the axis in radians. void ConvertToAxisAngle(Vector3& outAxis, float& outAngle) const; + //! Convert the quaternion into scaled axis-angle representation. + Vector3 ConvertToScaledAxisAngle() const; + //! Returns the imaginary (X/Y/Z) portion of the quaternion. Vector3 GetImaginary() const; diff --git a/Code/Framework/AzCore/AzCore/Math/Quaternion.inl b/Code/Framework/AzCore/AzCore/Math/Quaternion.inl index 82cd9078fa..bd51a90fca 100644 --- a/Code/Framework/AzCore/AzCore/Math/Quaternion.inl +++ b/Code/Framework/AzCore/AzCore/Math/Quaternion.inl @@ -73,27 +73,27 @@ namespace AZ } - AZ_MATH_INLINE Quaternion Quaternion::CreateRotationX(float angle) + AZ_MATH_INLINE Quaternion Quaternion::CreateRotationX(float angleInRadians) { - const float halfAngle = 0.5f * angle; + const float halfAngle = 0.5f * angleInRadians; float sin, cos; SinCos(halfAngle, sin, cos); return Quaternion(sin, 0.0f, 0.0f, cos); } - AZ_MATH_INLINE Quaternion Quaternion::CreateRotationY(float angle) + AZ_MATH_INLINE Quaternion Quaternion::CreateRotationY(float angleInRadians) { - const float halfAngle = 0.5f * angle; + const float halfAngle = 0.5f * angleInRadians; float sin, cos; SinCos(halfAngle, sin, cos); return Quaternion(0.0f, sin, 0.0f, cos); } - AZ_MATH_INLINE Quaternion Quaternion::CreateRotationZ(float angle) + AZ_MATH_INLINE Quaternion Quaternion::CreateRotationZ(float angleInRadians) { - const float halfAngle = 0.5f * angle; + const float halfAngle = 0.5f * angleInRadians; float sin, cos; SinCos(halfAngle, sin, cos); return Quaternion(0.0f, 0.0f, sin, cos); @@ -109,6 +109,24 @@ namespace AZ } + AZ_MATH_INLINE Quaternion Quaternion::CreateFromScaledAxisAngle(const Vector3& scaledAxisAngle) + { + const AZ::Vector3 exponentialMap = scaledAxisAngle / 2.0f; + const float halfAngle = exponentialMap.GetLength(); + + if (halfAngle < AZ::Constants::FloatEpsilon) + { + return AZ::Quaternion::CreateFromVector3AndValue(exponentialMap, 1.0f).GetNormalized(); + } + else + { + float sin, cos; + SinCos(halfAngle, sin, cos); + return AZ::Quaternion::CreateFromVector3AndValue((sin / halfAngle) * exponentialMap, cos); + } + } + + AZ_MATH_INLINE void Quaternion::StoreToFloat4(float* values) const { Simd::Vec4::StoreUnaligned(values, m_value); @@ -327,6 +345,23 @@ namespace AZ } + AZ_MATH_INLINE Quaternion Quaternion::GetShortestEquivalent() const + { + if (GetW() < 0.0f) + { + return -(*this); + } + + return *this; + } + + + AZ_MATH_INLINE void Quaternion::ShortestEquivalent() + { + *this = GetShortestEquivalent(); + } + + AZ_MATH_INLINE Quaternion Quaternion::Lerp(const Quaternion& dest, float t) const { if (Dot(dest) >= 0.0f) diff --git a/Code/Framework/AzCore/AzCore/Math/Sfmt.cpp b/Code/Framework/AzCore/AzCore/Math/Sfmt.cpp index 66404a9b3f..96c1a6a420 100644 --- a/Code/Framework/AzCore/AzCore/Math/Sfmt.cpp +++ b/Code/Framework/AzCore/AzCore/Math/Sfmt.cpp @@ -9,372 +9,366 @@ #include #include -#include #include +#include #include // for memset -namespace AZ +namespace AZ::SfmtInternal { - namespace SfmtInternal - { - static const int N32 = N * 4; - static const int N64 = N * 2; - static const int POS1 = 122; - static const int SL1 = 18; - static const int SR1 = 11; - static const int SL2 = 1; - static const int SR2 = 1; - static const unsigned int MSK1 = 0xdfffffefU; - static const unsigned int MSK2 = 0xddfecb7fU; - static const unsigned int MSK3 = 0xbffaffffU; - static const unsigned int MSK4 = 0xbffffff6U; - static const unsigned int PARITY1 = 0x00000001U; - static const unsigned int PARITY2 = 0x00000000U; - static const unsigned int PARITY3 = 0x00000000U; - static const unsigned int PARITY4 = 0x13c9e684U; + static const int N32 = N * 4; + static const int N64 = N * 2; + static const int POS1 = 122; + static const int SL1 = 18; + static const int SR1 = 11; + static const int SL2 = 1; + static const int SR2 = 1; + static const unsigned int MSK1 = 0xdfffffefU; + static const unsigned int MSK2 = 0xddfecb7fU; + static const unsigned int MSK3 = 0xbffaffffU; + static const unsigned int MSK4 = 0xbffffff6U; + static const unsigned int PARITY1 = 0x00000001U; + static const unsigned int PARITY2 = 0x00000000U; + static const unsigned int PARITY3 = 0x00000000U; + static const unsigned int PARITY4 = 0x13c9e684U; - /** a parity check vector which certificate the period of 2^{MEXP} */ - static unsigned int parity[4] = {PARITY1, PARITY2, PARITY3, PARITY4}; + /** a parity check vector which certificate the period of 2^{MEXP} */ + static unsigned int parity[4] = { PARITY1, PARITY2, PARITY3, PARITY4 }; #ifdef ONLY64 -# define idxof(_i) (_i ^ 1) +#define idxof(_i) (_i ^ 1) #else -# define idxof(_i) _i +#define idxof(_i) _i #endif // ONLY64 - #if AZ_TRAIT_USE_PLATFORM_SIMD_SSE - /** - * This function represents the recursion formula. - * @param a a 128-bit part of the internal state array - * @param b a 128-bit part of the internal state array - * @param c a 128-bit part of the internal state array - * @param d a 128-bit part of the internal state array - * @param mask 128-bit mask - * @return output - */ - AZ_FORCE_INLINE static Simd::Vec4::Int32Type simd_recursion(Simd::Vec4::Int32Type* a, Simd::Vec4::Int32Type* b, Simd::Vec4::Int32Type c, Simd::Vec4::Int32Type d, Simd::Vec4::Int32Type mask) + /** + * This function represents the recursion formula. + * @param a a 128-bit part of the internal state array + * @param b a 128-bit part of the internal state array + * @param c a 128-bit part of the internal state array + * @param d a 128-bit part of the internal state array + * @param mask 128-bit mask + * @return output + */ + AZ_FORCE_INLINE static Simd::Vec4::Int32Type simd_recursion( + Simd::Vec4::Int32Type* a, Simd::Vec4::Int32Type* b, Simd::Vec4::Int32Type c, Simd::Vec4::Int32Type d, Simd::Vec4::Int32Type mask) + { + Simd::Vec4::Int32Type v, x, y, z; + x = *a; + y = _mm_srli_epi32(*b, SR1); + z = _mm_srli_si128(c, SR2); + v = _mm_slli_epi32(d, SL1); + z = Simd::Vec4::Xor(z, x); + z = Simd::Vec4::Xor(z, v); + x = _mm_slli_si128(x, SL2); + y = Simd::Vec4::And(y, mask); + z = Simd::Vec4::Xor(z, x); + z = Simd::Vec4::Xor(z, y); + return z; + } + + /** + * This function fills the internal state array with pseudorandom + * integers. + */ + inline void gen_rand_all(Sfmt& g) + { + int i; + Simd::Vec4::Int32Type r, r1, r2, mask; + mask = Simd::Vec4::LoadImmediate((int32_t)MSK4, (int32_t)MSK3, (int32_t)MSK2, (int32_t)MSK1); + + r1 = Simd::Vec4::LoadAligned((const int32_t*)&g.m_sfmt[N - 2].si); + r2 = Simd::Vec4::LoadAligned((const int32_t*)&g.m_sfmt[N - 1].si); + for (i = 0; i < N - POS1; i++) { - Simd::Vec4::Int32Type v, x, y, z; - x = *a; - y = _mm_srli_epi32(*b, SR1); - z = _mm_srli_si128(c, SR2); - v = _mm_slli_epi32(d, SL1); - z = Simd::Vec4::Xor(z, x); - z = Simd::Vec4::Xor(z, v); - x = _mm_slli_si128(x, SL2); - y = Simd::Vec4::And(y, mask); - z = Simd::Vec4::Xor(z, x); - z = Simd::Vec4::Xor(z, y); - return z; + r = simd_recursion(&g.m_sfmt[i].si, &g.m_sfmt[i + POS1].si, r1, r2, mask); + Simd::Vec4::StoreAligned((int32_t*)&g.m_sfmt[i].si, r); + r1 = r2; + r2 = r; } - - /** - * This function fills the internal state array with pseudorandom - * integers. - */ - inline void gen_rand_all(Sfmt& g) + for (; i < N; i++) { - int i; - Simd::Vec4::Int32Type r, r1, r2, mask; - mask = Simd::Vec4::LoadImmediate((int32_t)MSK4, (int32_t)MSK3, (int32_t)MSK2, (int32_t)MSK1); - - r1 = Simd::Vec4::LoadAligned((const int32_t*)&g.m_sfmt[N - 2].si); - r2 = Simd::Vec4::LoadAligned((const int32_t*)&g.m_sfmt[N - 1].si); - for (i = 0; i < N - POS1; i++) - { - r = simd_recursion(&g.m_sfmt[i].si, &g.m_sfmt[i + POS1].si, r1, r2, mask); - Simd::Vec4::StoreAligned((int32_t*)&g.m_sfmt[i].si, r); - r1 = r2; - r2 = r; - } - for (; i < N; i++) - { - r = simd_recursion(&g.m_sfmt[i].si, &g.m_sfmt[i + POS1 - N].si, r1, r2, mask); - Simd::Vec4::StoreAligned((int32_t*)&g.m_sfmt[i].si, r); - r1 = r2; - r2 = r; - } + r = simd_recursion(&g.m_sfmt[i].si, &g.m_sfmt[i + POS1 - N].si, r1, r2, mask); + Simd::Vec4::StoreAligned((int32_t*)&g.m_sfmt[i].si, r); + r1 = r2; + r2 = r; } + } - /** - * This function fills the user-specified array with pseudorandom - * integers. - * - * @param array an 128-bit array to be filled by pseudorandom numbers. - * @param size number of 128-bit pesudorandom numbers to be generated. - */ - inline void gen_rand_array(Sfmt& g, w128_t* array, int size) + /** + * This function fills the user-specified array with pseudorandom + * integers. + * + * @param array an 128-bit array to be filled by pseudorandom numbers. + * @param size number of 128-bit pesudorandom numbers to be generated. + */ + inline void gen_rand_array(Sfmt& g, w128_t* array, int size) + { + int i, j; + Simd::Vec4::Int32Type r, r1, r2, mask; + mask = Simd::Vec4::LoadImmediate((int32_t)MSK4, (int32_t)MSK3, (int32_t)MSK2, (int32_t)MSK1); + + r1 = Simd::Vec4::LoadAligned((const int32_t*)&g.m_sfmt[N - 2].si); + r2 = Simd::Vec4::LoadAligned((const int32_t*)&g.m_sfmt[N - 1].si); + for (i = 0; i < N - POS1; i++) { - int i, j; - Simd::Vec4::Int32Type r, r1, r2, mask; - mask = Simd::Vec4::LoadImmediate((int32_t)MSK4, (int32_t)MSK3, (int32_t)MSK2, (int32_t)MSK1); - - r1 = Simd::Vec4::LoadAligned((const int32_t*)&g.m_sfmt[N - 2].si); - r2 = Simd::Vec4::LoadAligned((const int32_t*)&g.m_sfmt[N - 1].si); - for (i = 0; i < N - POS1; i++) - { - r = simd_recursion(&g.m_sfmt[i].si, &g.m_sfmt[i + POS1].si, r1, r2, mask); - Simd::Vec4::StoreAligned((int32_t*)&array[i].si, r); - r1 = r2; - r2 = r; - } - for (; i < N; i++) - { - r = simd_recursion(&g.m_sfmt[i].si, &array[i + POS1 - N].si, r1, r2, mask); - Simd::Vec4::StoreAligned((int32_t*)&array[i].si, r); - r1 = r2; - r2 = r; - } - /* main loop */ - for (; i < size - N; i++) - { - r = simd_recursion(&array[i - N].si, &array[i + POS1 - N].si, r1, r2, mask); - Simd::Vec4::StoreAligned((int32_t*)&array[i].si, r); - r1 = r2; - r2 = r; - } - for (j = 0; j < 2 * N - size; j++) - { - r = Simd::Vec4::LoadAligned((const int32_t*)&array[j + size - N].si); - Simd::Vec4::StoreAligned((int32_t*)&g.m_sfmt[j].si, r); - } - for (; i < size; i++) - { - r = simd_recursion(&array[i - N].si, &array[i + POS1 - N].si, r1, r2, mask); - Simd::Vec4::StoreAligned((int32_t*)&array[i].si, r); - Simd::Vec4::StoreAligned((int32_t*)&g.m_sfmt[j++].si, r); - r1 = r2; - r2 = r; - } + r = simd_recursion(&g.m_sfmt[i].si, &g.m_sfmt[i + POS1].si, r1, r2, mask); + Simd::Vec4::StoreAligned((int32_t*)&array[i].si, r); + r1 = r2; + r2 = r; } + for (; i < N; i++) + { + r = simd_recursion(&g.m_sfmt[i].si, &array[i + POS1 - N].si, r1, r2, mask); + Simd::Vec4::StoreAligned((int32_t*)&array[i].si, r); + r1 = r2; + r2 = r; + } + /* main loop */ + for (; i < size - N; i++) + { + r = simd_recursion(&array[i - N].si, &array[i + POS1 - N].si, r1, r2, mask); + Simd::Vec4::StoreAligned((int32_t*)&array[i].si, r); + r1 = r2; + r2 = r; + } + for (j = 0; j < 2 * N - size; j++) + { + r = Simd::Vec4::LoadAligned((const int32_t*)&array[j + size - N].si); + Simd::Vec4::StoreAligned((int32_t*)&g.m_sfmt[j].si, r); + } + for (; i < size; i++) + { + r = simd_recursion(&array[i - N].si, &array[i + POS1 - N].si, r1, r2, mask); + Simd::Vec4::StoreAligned((int32_t*)&array[i].si, r); + Simd::Vec4::StoreAligned((int32_t*)&g.m_sfmt[j++].si, r); + r1 = r2; + r2 = r; + } + } #else - inline void rshift128(w128_t* out, w128_t const* in, int shift) + inline void rshift128(w128_t* out, w128_t const* in, int shift) + { + AZ::u64 th, tl, oh, ol; +#ifdef ONLY64 + th = ((AZ::u64)in->u[2] << 32) | ((AZ::u64)in->u[3]); + tl = ((AZ::u64)in->u[0] << 32) | ((AZ::u64)in->u[1]); + + oh = th >> (shift * 8); + ol = tl >> (shift * 8); + ol |= th << (64 - shift * 8); + out->u[0] = (AZ::u32)(ol >> 32); + out->u[1] = (AZ::u32)ol; + out->u[2] = (AZ::u32)(oh >> 32); + out->u[3] = (AZ::u32)oh; +#else + th = ((AZ::u64)in->u[3] << 32) | ((AZ::u64)in->u[2]); + tl = ((AZ::u64)in->u[1] << 32) | ((AZ::u64)in->u[0]); + + oh = th >> (shift * 8); + ol = tl >> (shift * 8); + ol |= th << (64 - shift * 8); + out->u[1] = (AZ::u32)(ol >> 32); + out->u[0] = (AZ::u32)ol; + out->u[3] = (AZ::u32)(oh >> 32); + out->u[2] = (AZ::u32)oh; +#endif + } + + inline void lshift128(w128_t* out, w128_t const* in, int shift) + { + AZ::u64 th, tl, oh, ol; +#ifdef ONLY64 + th = ((AZ::u64)in->u[2] << 32) | ((AZ::u64)in->u[3]); + tl = ((AZ::u64)in->u[0] << 32) | ((AZ::u64)in->u[1]); + + oh = th << (shift * 8); + ol = tl << (shift * 8); + oh |= tl >> (64 - shift * 8); + out->u[0] = (AZ::u32)(ol >> 32); + out->u[1] = (AZ::u32)ol; + out->u[2] = (AZ::u32)(oh >> 32); + out->u[3] = (AZ::u32)oh; +#else + th = ((AZ::u64)in->u[3] << 32) | ((AZ::u64)in->u[2]); + tl = ((AZ::u64)in->u[1] << 32) | ((AZ::u64)in->u[0]); + + oh = th << (shift * 8); + ol = tl << (shift * 8); + oh |= tl >> (64 - shift * 8); + out->u[1] = (AZ::u32)(ol >> 32); + out->u[0] = (AZ::u32)ol; + out->u[3] = (AZ::u32)(oh >> 32); + out->u[2] = (AZ::u32)oh; +#endif + } + + inline void do_recursion(w128_t* r, w128_t* a, w128_t* b, w128_t* c, w128_t* d) + { + w128_t x; + w128_t y; + lshift128(&x, a, SL2); + rshift128(&y, c, SR2); +#ifdef ONLY64 + r->u[0] = a->u[0] ^ x.u[0] ^ ((b->u[0] >> SR1) & MSK2) ^ y.u[0] ^ (d->u[0] << SL1); + r->u[1] = a->u[1] ^ x.u[1] ^ ((b->u[1] >> SR1) & MSK1) ^ y.u[1] ^ (d->u[1] << SL1); + r->u[2] = a->u[2] ^ x.u[2] ^ ((b->u[2] >> SR1) & MSK4) ^ y.u[2] ^ (d->u[2] << SL1); + r->u[3] = a->u[3] ^ x.u[3] ^ ((b->u[3] >> SR1) & MSK3) ^ y.u[3] ^ (d->u[3] << SL1); +#else + r->u[0] = a->u[0] ^ x.u[0] ^ ((b->u[0] >> SR1) & MSK1) ^ y.u[0] ^ (d->u[0] << SL1); + r->u[1] = a->u[1] ^ x.u[1] ^ ((b->u[1] >> SR1) & MSK2) ^ y.u[1] ^ (d->u[1] << SL1); + r->u[2] = a->u[2] ^ x.u[2] ^ ((b->u[2] >> SR1) & MSK3) ^ y.u[2] ^ (d->u[2] << SL1); + r->u[3] = a->u[3] ^ x.u[3] ^ ((b->u[3] >> SR1) & MSK4) ^ y.u[3] ^ (d->u[3] << SL1); +#endif + } + /** + * This function fills the internal state array with pseudorandom + * integers. + */ + inline void gen_rand_all(Sfmt& g) + { + int i; + w128_t *r1, *r2; + + r1 = &g.m_sfmt[N - 2]; + r2 = &g.m_sfmt[N - 1]; + for (i = 0; i < N - POS1; i++) { - AZ::u64 th, tl, oh, ol; - #ifdef ONLY64 - th = ((AZ::u64)in->u[2] << 32) | ((AZ::u64)in->u[3]); - tl = ((AZ::u64)in->u[0] << 32) | ((AZ::u64)in->u[1]); - - oh = th >> (shift * 8); - ol = tl >> (shift * 8); - ol |= th << (64 - shift * 8); - out->u[0] = (AZ::u32)(ol >> 32); - out->u[1] = (AZ::u32)ol; - out->u[2] = (AZ::u32)(oh >> 32); - out->u[3] = (AZ::u32)oh; - #else - th = ((AZ::u64)in->u[3] << 32) | ((AZ::u64)in->u[2]); - tl = ((AZ::u64)in->u[1] << 32) | ((AZ::u64)in->u[0]); - - oh = th >> (shift * 8); - ol = tl >> (shift * 8); - ol |= th << (64 - shift * 8); - out->u[1] = (AZ::u32)(ol >> 32); - out->u[0] = (AZ::u32)ol; - out->u[3] = (AZ::u32)(oh >> 32); - out->u[2] = (AZ::u32)oh; - #endif + do_recursion(&g.m_sfmt[i], &g.m_sfmt[i], &g.m_sfmt[i + POS1], r1, r2); + r1 = r2; + r2 = &g.m_sfmt[i]; } - - inline void lshift128(w128_t* out, w128_t const* in, int shift) + for (; i < N; i++) { - AZ::u64 th, tl, oh, ol; - #ifdef ONLY64 - th = ((AZ::u64)in->u[2] << 32) | ((AZ::u64)in->u[3]); - tl = ((AZ::u64)in->u[0] << 32) | ((AZ::u64)in->u[1]); - - oh = th << (shift * 8); - ol = tl << (shift * 8); - oh |= tl >> (64 - shift * 8); - out->u[0] = (AZ::u32)(ol >> 32); - out->u[1] = (AZ::u32)ol; - out->u[2] = (AZ::u32)(oh >> 32); - out->u[3] = (AZ::u32)oh; - #else - th = ((AZ::u64)in->u[3] << 32) | ((AZ::u64)in->u[2]); - tl = ((AZ::u64)in->u[1] << 32) | ((AZ::u64)in->u[0]); - - oh = th << (shift * 8); - ol = tl << (shift * 8); - oh |= tl >> (64 - shift * 8); - out->u[1] = (AZ::u32)(ol >> 32); - out->u[0] = (AZ::u32)ol; - out->u[3] = (AZ::u32)(oh >> 32); - out->u[2] = (AZ::u32)oh; - #endif + do_recursion(&g.m_sfmt[i], &g.m_sfmt[i], &g.m_sfmt[i + POS1 - N], r1, r2); + r1 = r2; + r2 = &g.m_sfmt[i]; } + } - inline void do_recursion(w128_t* r, w128_t* a, w128_t* b, w128_t* c, w128_t* d) + /** + * This function fills the user-specified array with pseudorandom + * integers. + * + * @param array an 128-bit array to be filled by pseudorandom numbers. + * @param size number of 128-bit pseudorandom numbers to be generated. + */ + inline void gen_rand_array(Sfmt& g, w128_t* array, int size) + { + int i, j; + w128_t *r1, *r2; + + r1 = &g.m_sfmt[N - 2]; + r2 = &g.m_sfmt[N - 1]; + for (i = 0; i < N - POS1; i++) { - w128_t x; - w128_t y; - lshift128(&x, a, SL2); - rshift128(&y, c, SR2); - #ifdef ONLY64 - r->u[0] = a->u[0] ^ x.u[0] ^ ((b->u[0] >> SR1) & MSK2) ^ y.u[0] ^ (d->u[0] << SL1); - r->u[1] = a->u[1] ^ x.u[1] ^ ((b->u[1] >> SR1) & MSK1) ^ y.u[1] ^ (d->u[1] << SL1); - r->u[2] = a->u[2] ^ x.u[2] ^ ((b->u[2] >> SR1) & MSK4) ^ y.u[2] ^ (d->u[2] << SL1); - r->u[3] = a->u[3] ^ x.u[3] ^ ((b->u[3] >> SR1) & MSK3) ^ y.u[3] ^ (d->u[3] << SL1); - #else - r->u[0] = a->u[0] ^ x.u[0] ^ ((b->u[0] >> SR1) & MSK1) ^ y.u[0] ^ (d->u[0] << SL1); - r->u[1] = a->u[1] ^ x.u[1] ^ ((b->u[1] >> SR1) & MSK2) ^ y.u[1] ^ (d->u[1] << SL1); - r->u[2] = a->u[2] ^ x.u[2] ^ ((b->u[2] >> SR1) & MSK3) ^ y.u[2] ^ (d->u[2] << SL1); - r->u[3] = a->u[3] ^ x.u[3] ^ ((b->u[3] >> SR1) & MSK4) ^ y.u[3] ^ (d->u[3] << SL1); - #endif + do_recursion(&array[i], &g.m_sfmt[i], &g.m_sfmt[i + POS1], r1, r2); + r1 = r2; + r2 = &array[i]; } - /** - * This function fills the internal state array with pseudorandom - * integers. - */ - inline void gen_rand_all(Sfmt& g) + for (; i < N; i++) { - int i; - w128_t* r1, * r2; - - r1 = &g.m_sfmt[N - 2]; - r2 = &g.m_sfmt[N - 1]; - for (i = 0; i < N - POS1; i++) - { - do_recursion(&g.m_sfmt[i], &g.m_sfmt[i], &g.m_sfmt[i + POS1], r1, r2); - r1 = r2; - r2 = &g.m_sfmt[i]; - } - for (; i < N; i++) - { - do_recursion(&g.m_sfmt[i], &g.m_sfmt[i], &g.m_sfmt[i + POS1 - N], r1, r2); - r1 = r2; - r2 = &g.m_sfmt[i]; - } + do_recursion(&array[i], &g.m_sfmt[i], &array[i + POS1 - N], r1, r2); + r1 = r2; + r2 = &array[i]; } - - /** - * This function fills the user-specified array with pseudorandom - * integers. - * - * @param array an 128-bit array to be filled by pseudorandom numbers. - * @param size number of 128-bit pseudorandom numbers to be generated. - */ - inline void gen_rand_array(Sfmt& g, w128_t* array, int size) + for (; i < size - N; i++) { - int i, j; - w128_t* r1, * r2; - - r1 = &g.m_sfmt[N - 2]; - r2 = &g.m_sfmt[N - 1]; - for (i = 0; i < N - POS1; i++) - { - do_recursion(&array[i], &g.m_sfmt[i], &g.m_sfmt[i + POS1], r1, r2); - r1 = r2; - r2 = &array[i]; - } - for (; i < N; i++) - { - do_recursion(&array[i], &g.m_sfmt[i], &array[i + POS1 - N], r1, r2); - r1 = r2; - r2 = &array[i]; - } - for (; i < size - N; i++) - { - do_recursion(&array[i], &array[i - N], &array[i + POS1 - N], r1, r2); - r1 = r2; - r2 = &array[i]; - } - for (j = 0; j < 2 * N - size; j++) - { - g.m_sfmt[j] = array[j + size - N]; - } - for (; i < size; i++, j++) - { - do_recursion(&array[i], &array[i - N], &array[i + POS1 - N], r1, r2); - r1 = r2; - r2 = &array[i]; - g.m_sfmt[j] = array[i]; - } + do_recursion(&array[i], &array[i - N], &array[i + POS1 - N], r1, r2); + r1 = r2; + r2 = &array[i]; } + for (j = 0; j < 2 * N - size; j++) + { + g.m_sfmt[j] = array[j + size - N]; + } + for (; i < size; i++, j++) + { + do_recursion(&array[i], &array[i - N], &array[i + POS1 - N], r1, r2); + r1 = r2; + r2 = &array[i]; + g.m_sfmt[j] = array[i]; + } + } #endif - } // SmftInternal -} // AZ - - -using namespace AZ; +} // namespace AZ::SfmtInternal ////////////////////////////////////////////////////////////////////////// // Statics ////////////////////////////////////////////////////////////////////////// - -static EnvironmentVariable s_sfmt; -static const char* s_globalSfmtName = "GlobalSfmt"; - -Sfmt& Sfmt::GetInstance() +namespace AZ { - if (!s_sfmt) + static EnvironmentVariable s_sfmt; + static const char* s_globalSfmtName = "GlobalSfmt"; + + Sfmt& Sfmt::GetInstance() { - s_sfmt = AZ::Environment::FindVariable(s_globalSfmtName); if (!s_sfmt) { - Sfmt::Create(); + s_sfmt = AZ::Environment::FindVariable(s_globalSfmtName); + if (!s_sfmt) + { + Sfmt::Create(); + } + } + + return s_sfmt.Get(); + } + + void Sfmt::Create() + { + if (!s_sfmt) + { + s_sfmt = AZ::Environment::CreateVariable(s_globalSfmtName); } } - return s_sfmt.Get(); -} - -void Sfmt::Create() -{ - if (!s_sfmt) + void Sfmt::Destroy() { - s_sfmt = AZ::Environment::CreateVariable(s_globalSfmtName); + s_sfmt.Reset(); } -} -void Sfmt::Destroy() -{ - s_sfmt.Reset(); -} + //========================================================================= + // Sfmt + // [4/10/2012] + //========================================================================= + Sfmt::Sfmt() + { + m_psfmt32 = &m_sfmt[0].u[0]; + m_psfmt64 = reinterpret_cast(m_psfmt32); -//========================================================================= -// Sfmt -// [4/10/2012] -//========================================================================= -Sfmt::Sfmt() -{ - m_psfmt32 = &m_sfmt[0].u[0]; - m_psfmt64 = reinterpret_cast(m_psfmt32); + Seed(); + } - Seed(); -} + //========================================================================= + // Seed + // [4/10/2012] + //========================================================================= + Sfmt::Sfmt(AZ::u32* keys, int numKeys) + { + m_psfmt32 = &m_sfmt[0].u[0]; + m_psfmt64 = reinterpret_cast(m_psfmt32); -//========================================================================= -// Seed -// [4/10/2012] -//========================================================================= -Sfmt::Sfmt(AZ::u32* keys, int numKeys) -{ - m_psfmt32 = &m_sfmt[0].u[0]; - m_psfmt64 = reinterpret_cast(m_psfmt32); + Seed(keys, numKeys); + } - Seed(keys, numKeys); -} - -//========================================================================= -// Seed -// [4/10/2012] -//========================================================================= -void -Sfmt::Seed() -{ - // buffer with random values - AZ::u32 buffer[32]; - BetterPseudoRandom rnd; - bool result = rnd.GetRandom(buffer, sizeof(buffer)); - (void)result; - AZ_Warning("System", result, "Failed to seed properly the Smft generator!"); - Seed(buffer, AZ_ARRAY_SIZE(buffer)); -} + //========================================================================= + // Seed + // [4/10/2012] + //========================================================================= + void Sfmt::Seed() + { + // buffer with random values + AZ::u32 buffer[32]; + BetterPseudoRandom rnd; + bool result = rnd.GetRandom(buffer, sizeof(buffer)); + (void)result; + AZ_Warning("System", result, "Failed to seed properly the Smft generator!"); + Seed(buffer, AZ_ARRAY_SIZE(buffer)); + } /** * This function represents a function used in the initialization @@ -392,226 +386,222 @@ Sfmt::Seed() */ #define azsfmt_func2(x) ((x ^ (x >> 27)) * (AZ::u32)1566083941UL) -//========================================================================= -// Seed -// [4/10/2012] -//========================================================================= -void -Sfmt::Seed(AZ::u32* keys, int numKeys) -{ - using SfmtInternal::N; - using SfmtInternal::N32; - int i, j, count; - AZ::u32 r; - int lag; - int mid; - int size = N * 4; + //========================================================================= + // Seed + // [4/10/2012] + //========================================================================= + void Sfmt::Seed(AZ::u32* keys, int numKeys) + { + using SfmtInternal::N; + using SfmtInternal::N32; + int i, j, count; + AZ::u32 r; + int lag; + int mid; + int size = N * 4; - if (size >= 623) - { - lag = 11; - } - else if (size >= 68) - { - lag = 7; - } - else if (size >= 39) - { - lag = 5; - } - else - { - lag = 3; - } - mid = (size - lag) / 2; + if (size >= 623) + { + lag = 11; + } + else if (size >= 68) + { + lag = 7; + } + else if (size >= 39) + { + lag = 5; + } + else + { + lag = 3; + } + mid = (size - lag) / 2; - memset(m_sfmt, 0x8b, sizeof(m_sfmt)); - if (numKeys + 1 > SfmtInternal::N32) - { - count = numKeys + 1; - } - else - { - count = N32; - } - r = azsfmt_func1((m_psfmt32[idxof(0)] ^ m_psfmt32[idxof(mid)] ^ m_psfmt32[idxof(N32 - 1)])); - m_psfmt32[idxof(mid)] += r; - r += numKeys; - m_psfmt32[idxof(mid + lag)] += r; - m_psfmt32[idxof(0)] = r; + memset(m_sfmt, 0x8b, sizeof(m_sfmt)); + if (numKeys + 1 > SfmtInternal::N32) + { + count = numKeys + 1; + } + else + { + count = N32; + } + r = azsfmt_func1((m_psfmt32[idxof(0)] ^ m_psfmt32[idxof(mid)] ^ m_psfmt32[idxof(N32 - 1)])); + m_psfmt32[idxof(mid)] += r; + r += numKeys; + m_psfmt32[idxof(mid + lag)] += r; + m_psfmt32[idxof(0)] = r; - count--; - for (i = 1, j = 0; (j < count) && (j < numKeys); j++) - { - r = azsfmt_func1((m_psfmt32[idxof(i)] ^ m_psfmt32[idxof((i + mid) % N32)] ^ m_psfmt32[idxof((i + N32 - 1) % N32)])); - m_psfmt32[idxof((i + mid) % N32)] += r; - r += keys[j] + i; - m_psfmt32[idxof((i + mid + lag) % N32)] += r; - m_psfmt32[idxof(i)] = r; - i = (i + 1) % N32; - } - for (; j < count; j++) - { - r = azsfmt_func1((m_psfmt32[idxof(i)] ^ m_psfmt32[idxof((i + mid) % N32)] ^ m_psfmt32[idxof((i + N32 - 1) % N32)])); - m_psfmt32[idxof((i + mid) % N32)] += r; - r += i; - m_psfmt32[idxof((i + mid + lag) % N32)] += r; - m_psfmt32[idxof(i)] = r; - i = (i + 1) % N32; - } - for (j = 0; j < N32; j++) - { - r = azsfmt_func2((m_psfmt32[idxof(i)] + m_psfmt32[idxof((i + mid) % N32)] + m_psfmt32[idxof((i + N32 - 1) % N32)])); - m_psfmt32[idxof((i + mid) % N32)] ^= r; - r -= i; - m_psfmt32[idxof((i + mid + lag) % N32)] ^= r; - m_psfmt32[idxof(i)] = r; - i = (i + 1) % N32; - } + count--; + for (i = 1, j = 0; (j < count) && (j < numKeys); j++) + { + r = azsfmt_func1((m_psfmt32[idxof(i)] ^ m_psfmt32[idxof((i + mid) % N32)] ^ m_psfmt32[idxof((i + N32 - 1) % N32)])); + m_psfmt32[idxof((i + mid) % N32)] += r; + r += keys[j] + i; + m_psfmt32[idxof((i + mid + lag) % N32)] += r; + m_psfmt32[idxof(i)] = r; + i = (i + 1) % N32; + } + for (; j < count; j++) + { + r = azsfmt_func1((m_psfmt32[idxof(i)] ^ m_psfmt32[idxof((i + mid) % N32)] ^ m_psfmt32[idxof((i + N32 - 1) % N32)])); + m_psfmt32[idxof((i + mid) % N32)] += r; + r += i; + m_psfmt32[idxof((i + mid + lag) % N32)] += r; + m_psfmt32[idxof(i)] = r; + i = (i + 1) % N32; + } + for (j = 0; j < N32; j++) + { + r = azsfmt_func2((m_psfmt32[idxof(i)] + m_psfmt32[idxof((i + mid) % N32)] + m_psfmt32[idxof((i + N32 - 1) % N32)])); + m_psfmt32[idxof((i + mid) % N32)] ^= r; + r -= i; + m_psfmt32[idxof((i + mid + lag) % N32)] ^= r; + m_psfmt32[idxof(i)] = r; + i = (i + 1) % N32; + } - m_index = N32; - PeriodCertification(); -} + m_index = N32; + PeriodCertification(); + } #undef azsfmt_func1 #undef azsfmt_func2 -//========================================================================= -// PeriodCertification -// [4/10/2012] -//========================================================================= -void -Sfmt::PeriodCertification() -{ - int inner = 0; - int i, j; - AZ::u32 work; + //========================================================================= + // PeriodCertification + // [4/10/2012] + //========================================================================= + void Sfmt::PeriodCertification() + { + int inner = 0; + int i, j; + AZ::u32 work; - for (i = 0; i < 4; i++) - { - inner ^= m_psfmt32[idxof(i)] & SfmtInternal::parity[i]; - } - for (i = 16; i > 0; i >>= 1) - { - inner ^= inner >> i; - } - inner &= 1; - /* check OK */ - if (inner == 1) - { - return; - } - /* check NG, and modification */ - for (i = 0; i < 4; i++) - { - work = 1; - for (j = 0; j < 32; j++) + for (i = 0; i < 4; i++) { - if ((work & SfmtInternal::parity[i]) != 0) + inner ^= m_psfmt32[idxof(i)] & SfmtInternal::parity[i]; + } + for (i = 16; i > 0; i >>= 1) + { + inner ^= inner >> i; + } + inner &= 1; + /* check OK */ + if (inner == 1) + { + return; + } + /* check NG, and modification */ + for (i = 0; i < 4; i++) + { + work = 1; + for (j = 0; j < 32; j++) { - m_psfmt32[idxof(i)] ^= work; - return; + if ((work & SfmtInternal::parity[i]) != 0) + { + m_psfmt32[idxof(i)] ^= work; + return; + } + work = work << 1; } - work = work << 1; } } -} -//========================================================================= -// Rand32 -// [4/10/2012] -//========================================================================= -AZ::u32 Sfmt::Rand32() -{ - int index = m_index.fetch_add(1); - if (index >= SfmtInternal::N32) + //========================================================================= + // Rand32 + // [4/10/2012] + //========================================================================= + AZ::u32 Sfmt::Rand32() { - AZStd::lock_guard lock(m_generationMutex); - // if this thread is the one that sets m_index to 0, then this thread - // does the generation - index += 1; // compare against the result of fetch_add(1) above - if (m_index.compare_exchange_strong(index, 0)) + int index = m_index.fetch_add(1); + if (index >= SfmtInternal::N32) { - SfmtInternal::gen_rand_all(*this); + AZStd::lock_guard lock(m_generationMutex); + // if this thread is the one that sets m_index to 0, then this thread + // does the generation + index += 1; // compare against the result of fetch_add(1) above + if (m_index.compare_exchange_strong(index, 0)) + { + SfmtInternal::gen_rand_all(*this); + } + // try again, with the new table + return Rand32(); } - // try again, with the new table - return Rand32(); + return m_psfmt32[index]; } - return m_psfmt32[index]; -} -//========================================================================= -// Rand64 -// [4/10/2012] -//========================================================================= -AZ::u64 Sfmt::Rand64() -{ - int index = m_index.fetch_add(2); - if (index >= (SfmtInternal::N32 - 1)) + //========================================================================= + // Rand64 + // [4/10/2012] + //========================================================================= + AZ::u64 Sfmt::Rand64() { - AZStd::lock_guard lock(m_generationMutex); - // if this thread is the one that sets m_index to 0, then this thread - // does the generation - index += 2; // compare against the result of fetch_add(2) above - if (m_index.compare_exchange_strong(index, 0)) + int index = m_index.fetch_add(2); + if (index >= (SfmtInternal::N32 - 1)) { - SfmtInternal::gen_rand_all(*this); + AZStd::lock_guard lock(m_generationMutex); + // if this thread is the one that sets m_index to 0, then this thread + // does the generation + index += 2; // compare against the result of fetch_add(2) above + if (m_index.compare_exchange_strong(index, 0)) + { + SfmtInternal::gen_rand_all(*this); + } + // try again, with the new table + return Rand64(); } - // try again, with the new table - return Rand64(); + + AZ::u64 r; + r = m_psfmt64[index / 2]; + return r; } - AZ::u64 r; - r = m_psfmt64[index / 2]; - return r; -} + //========================================================================= + // FillArray32 + // [4/10/2012] + //========================================================================= + void Sfmt::FillArray32(AZ::u32* array, int size) + { + AZ_MATH_ASSERT(m_index == SfmtInternal::N32, "Invalid m_index! Reinitialize!"); + AZ_MATH_ASSERT(size % 4 == 0, "Size must be multiple of 4!"); + AZ_MATH_ASSERT(size >= SfmtInternal::N32, "Size must be bigger than %d GetMinArray32Size()!", SfmtInternal::N32); -//========================================================================= -// FillArray32 -// [4/10/2012] -//========================================================================= -void -Sfmt::FillArray32(AZ::u32* array, int size) -{ - AZ_MATH_ASSERT(m_index == SfmtInternal::N32, "Invalid m_index! Reinitialize!"); - AZ_MATH_ASSERT(size % 4 == 0, "Size must be multiple of 4!"); - AZ_MATH_ASSERT(size >= SfmtInternal::N32, "Size must be bigger than %d GetMinArray32Size()!", SfmtInternal::N32); + SfmtInternal::gen_rand_array(*this, (SfmtInternal::w128_t*)array, size / 4); + m_index = SfmtInternal::N32; + } - SfmtInternal::gen_rand_array(*this, (SfmtInternal::w128_t*)array, size / 4); - m_index = SfmtInternal::N32; -} + //========================================================================= + // FillArray64 + // [4/10/2012] + //========================================================================= + void Sfmt::FillArray64(AZ::u64* array, int size) + { + AZ_MATH_ASSERT(m_index == SfmtInternal::N32, "Invalid m_index! Reinitialize!"); + AZ_MATH_ASSERT(size % 4 == 0, "Size must be multiple of 4!"); + AZ_MATH_ASSERT(size >= SfmtInternal::N64, "Size must be bigger than %d GetMinArray64Size()!", SfmtInternal::N64); -//========================================================================= -// FillArray64 -// [4/10/2012] -//========================================================================= -void -Sfmt::FillArray64(AZ::u64* array, int size) -{ - AZ_MATH_ASSERT(m_index == SfmtInternal::N32, "Invalid m_index! Reinitialize!"); - AZ_MATH_ASSERT(size % 4 == 0, "Size must be multiple of 4!"); - AZ_MATH_ASSERT(size >= SfmtInternal::N64, "Size must be bigger than %d GetMinArray64Size()!", SfmtInternal::N64); + SfmtInternal::gen_rand_array(*this, (SfmtInternal::w128_t*)array, size / 2); + m_index = SfmtInternal::N32; + } - SfmtInternal::gen_rand_array(*this, (SfmtInternal::w128_t*)array, size / 2); - m_index = SfmtInternal::N32; -} + //========================================================================= + // GetMinArray32Size + // [4/10/2012] + //========================================================================= + int Sfmt::GetMinArray32Size() const + { + return SfmtInternal::N32; + } -//========================================================================= -// GetMinArray32Size -// [4/10/2012] -//========================================================================= -int -Sfmt::GetMinArray32Size() const -{ - return SfmtInternal::N32; -} + //========================================================================= + // GetMinArray64Size + // [4/10/2012] + //========================================================================= + int Sfmt::GetMinArray64Size() const + { + return SfmtInternal::N64; + } -//========================================================================= -// GetMinArray64Size -// [4/10/2012] -//========================================================================= -int -Sfmt::GetMinArray64Size() const -{ - return SfmtInternal::N64; -} +} // namespace AZ diff --git a/Code/Framework/AzCore/AzCore/Math/Spline.cpp b/Code/Framework/AzCore/AzCore/Math/Spline.cpp index b4fc6dc1f8..71f428fe99 100644 --- a/Code/Framework/AzCore/AzCore/Math/Spline.cpp +++ b/Code/Framework/AzCore/AzCore/Math/Spline.cpp @@ -98,7 +98,7 @@ namespace AZ if (BehaviorContext* behaviorContext = azrtti_cast(context)) { behaviorContext->Class()-> - Attribute(AZ::Script::Attributes::ExcludeFrom, AZ::Script::Attributes::ExcludeFlags::List)-> + Attribute(AZ::Script::Attributes::ExcludeFrom, AZ::Script::Attributes::ExcludeFlags::ListOnly)-> Constructor()-> Attribute(Script::Attributes::Storage, Script::Attributes::StorageType::Value)-> Attribute(Script::Attributes::ConstructorOverride, &Internal::SplineAddressScriptConstructor)-> @@ -118,7 +118,7 @@ namespace AZ Property("rayDistance", [](RaySplineQueryResult* thisPtr) { return thisPtr->m_rayDistance; }, nullptr); behaviorContext->Class()-> - Attribute(AZ::Script::Attributes::ExcludeFrom, AZ::Script::Attributes::ExcludeFlags::List)-> + Attribute(AZ::Script::Attributes::ExcludeFrom, AZ::Script::Attributes::ExcludeFlags::ListOnly)-> Attribute(Script::Attributes::Storage, Script::Attributes::StorageType::RuntimeOwn)-> Method("GetNearestAddressRay", &Spline::GetNearestAddressRay)-> Method("GetNearestAddressPosition", &Spline::GetNearestAddressPosition)-> diff --git a/Code/Framework/AzCore/AzCore/Math/Transform.cpp b/Code/Framework/AzCore/AzCore/Math/Transform.cpp index 1701820bae..4e80d0e29a 100644 --- a/Code/Framework/AzCore/AzCore/Math/Transform.cpp +++ b/Code/Framework/AzCore/AzCore/Math/Transform.cpp @@ -293,7 +293,7 @@ namespace AZ behaviorContext->Class()-> Attribute(Script::Attributes::Scope, Script::Attributes::ScopeFlags::Common)-> Attribute(Script::Attributes::Module, "math")-> - Attribute(Script::Attributes::ExcludeFrom, Script::Attributes::ExcludeFlags::All)-> + Attribute(Script::Attributes::ExcludeFrom, Script::Attributes::ExcludeFlags::ListOnly)-> Attribute(Script::Attributes::Storage, Script::Attributes::StorageType::Value)-> Attribute(Script::Attributes::GenericConstructorOverride, &Internal::TransformDefaultConstructor)-> Constructor()-> @@ -312,35 +312,35 @@ namespace AZ Attribute(Script::Attributes::Ignore, 0)-> // ignore for script since we already got the generic multiply above Method("MultiplyTransform", &Transform::operator*)-> Attribute(Script::Attributes::Ignore, 0)-> // ignore for script since we already got the generic multiply above - Attribute(Script::Attributes::ExcludeFrom, Script::Attributes::ExcludeFlags::All)-> + Attribute(Script::Attributes::ExcludeFrom, Script::Attributes::ExcludeFlags::ListOnly)-> Method("Equal", &Transform::operator==)-> Attribute(Script::Attributes::Operator, Script::Attributes::OperatorType::Equal)-> - Attribute(Script::Attributes::ExcludeFrom, Script::Attributes::ExcludeFlags::All)-> + Attribute(Script::Attributes::ExcludeFrom, Script::Attributes::ExcludeFlags::ListOnly)-> Method("Clone", [](const Transform& rhs) -> Transform { return rhs; })-> - Attribute(Script::Attributes::ExcludeFrom, Script::Attributes::ExcludeFlags::All)-> + Attribute(Script::Attributes::ExcludeFrom, Script::Attributes::ExcludeFlags::ListOnly)-> Method("GetTranslation", &Transform::GetTranslation)-> Method("GetBasisAndTranslation", &Transform::GetBasisAndTranslation)-> Attribute(Script::Attributes::MethodOverride, &Internal::TransformGetBasisAndTranslationMultipleReturn)-> - Attribute(Script::Attributes::ExcludeFrom, Script::Attributes::ExcludeFlags::All)-> + Attribute(Script::Attributes::ExcludeFrom, Script::Attributes::ExcludeFlags::ListOnly)-> Method("TransformVector", &Transform::TransformVector)-> - Attribute(Script::Attributes::ExcludeFrom, Script::Attributes::ExcludeFlags::All)-> + Attribute(Script::Attributes::ExcludeFrom, Script::Attributes::ExcludeFlags::ListOnly)-> Method("SetTranslation", &Transform::SetTranslation)-> Attribute(Script::Attributes::MethodOverride, &Internal::TransformSetTranslationGeneric)-> - Attribute(Script::Attributes::ExcludeFrom, Script::Attributes::ExcludeFlags::All)-> + Attribute(Script::Attributes::ExcludeFrom, Script::Attributes::ExcludeFlags::ListOnly)-> Method("GetRotation", &Transform::GetRotation)-> Method("SetRotation", &Transform::SetRotation)-> Method("GetUniformScale", &Transform::GetUniformScale)-> Method("SetUniformScale", &Transform::SetUniformScale)-> Method("ExtractUniformScale", &Transform::ExtractUniformScale)-> - Attribute(Script::Attributes::ExcludeFrom, Script::Attributes::ExcludeFlags::All)-> + Attribute(Script::Attributes::ExcludeFrom, Script::Attributes::ExcludeFlags::ListOnly)-> Method("MultiplyByUniformScale", &Transform::MultiplyByUniformScale)-> Method("GetInverse", &Transform::GetInverse)-> Method("Invert", &Transform::Invert)-> - Attribute(Script::Attributes::ExcludeFrom, Script::Attributes::ExcludeFlags::All)-> + Attribute(Script::Attributes::ExcludeFrom, Script::Attributes::ExcludeFlags::ListOnly)-> Method("IsOrthogonal", &Transform::IsOrthogonal, behaviorContext->MakeDefaultValues(Constants::Tolerance))-> Method("GetOrthogonalized", &Transform::GetOrthogonalized)-> Method("Orthogonalize", &Transform::Orthogonalize)-> - Attribute(Script::Attributes::ExcludeFrom, Script::Attributes::ExcludeFlags::All)-> + Attribute(Script::Attributes::ExcludeFrom, Script::Attributes::ExcludeFlags::ListOnly)-> Method("IsClose", &Transform::IsClose, behaviorContext->MakeDefaultValues(Constants::Tolerance))-> Method("IsFinite", &Transform::IsFinite)-> Method("CreateIdentity", &Transform::CreateIdentity)-> diff --git a/Code/Framework/AzCore/AzCore/Math/Uuid.h b/Code/Framework/AzCore/AzCore/Math/Uuid.h index 6b77e7ec3e..eeacb04877 100644 --- a/Code/Framework/AzCore/AzCore/Math/Uuid.h +++ b/Code/Framework/AzCore/AzCore/Math/Uuid.h @@ -45,7 +45,7 @@ namespace AZ static constexpr int ValidUuidStringLength = 32; /// Number of characters (data only, no extra formatting) in a valid UUID string static const size_t MaxStringBuffer = 39; /// 32 Uuid + 4 dashes + 2 brackets + 1 terminate - Uuid() {} + Uuid() = default; Uuid(const char* string, size_t stringLength = 0) { *this = CreateString(string, stringLength); } static Uuid CreateNull(); diff --git a/Code/Framework/AzCore/AzCore/Math/Vector2.cpp b/Code/Framework/AzCore/AzCore/Math/Vector2.cpp index 0e236b8b1f..d2d3d2a58d 100644 --- a/Code/Framework/AzCore/AzCore/Math/Vector2.cpp +++ b/Code/Framework/AzCore/AzCore/Math/Vector2.cpp @@ -191,7 +191,7 @@ namespace AZ behaviorContext->Class()-> Attribute(Script::Attributes::Scope, Script::Attributes::ScopeFlags::Common)-> Attribute(Script::Attributes::Module, "math")-> - Attribute(Script::Attributes::ExcludeFrom, Script::Attributes::ExcludeFlags::All)-> + Attribute(Script::Attributes::ExcludeFrom, Script::Attributes::ExcludeFlags::ListOnly)-> Constructor()-> Constructor()-> Attribute(Script::Attributes::Storage, Script::Attributes::StorageType::Value)-> diff --git a/Code/Framework/AzCore/AzCore/Math/Vector2.h b/Code/Framework/AzCore/AzCore/Math/Vector2.h index 7c37d74135..91eb61d6c8 100644 --- a/Code/Framework/AzCore/AzCore/Math/Vector2.h +++ b/Code/Framework/AzCore/AzCore/Math/Vector2.h @@ -30,7 +30,7 @@ namespace AZ Vector2() = default; - Vector2(const Vector2& v); + Vector2(const Vector2& v) = default; //! Constructs vector with all components set to the same specified value. explicit Vector2(float x); diff --git a/Code/Framework/AzCore/AzCore/Math/Vector2.inl b/Code/Framework/AzCore/AzCore/Math/Vector2.inl index 086be2bbc3..9691dd3a5c 100644 --- a/Code/Framework/AzCore/AzCore/Math/Vector2.inl +++ b/Code/Framework/AzCore/AzCore/Math/Vector2.inl @@ -8,13 +8,6 @@ namespace AZ { - AZ_MATH_INLINE Vector2::Vector2(const Vector2& v) - : m_value(v.m_value) - { - ; - } - - AZ_MATH_INLINE Vector2::Vector2(float x) : m_value(Simd::Vec2::Splat(x)) { diff --git a/Code/Framework/AzCore/AzCore/Math/Vector3.cpp b/Code/Framework/AzCore/AzCore/Math/Vector3.cpp index d82aa32f7d..04041c6604 100644 --- a/Code/Framework/AzCore/AzCore/Math/Vector3.cpp +++ b/Code/Framework/AzCore/AzCore/Math/Vector3.cpp @@ -206,7 +206,7 @@ namespace AZ behaviorContext->Class()-> Attribute(Script::Attributes::Scope, Script::Attributes::ScopeFlags::Common)-> Attribute(Script::Attributes::Module, "math")-> - Attribute(Script::Attributes::ExcludeFrom, Script::Attributes::ExcludeFlags::All)-> + Attribute(Script::Attributes::ExcludeFrom, Script::Attributes::ExcludeFlags::ListOnly)-> Constructor()-> Constructor()-> Attribute(Script::Attributes::Storage, Script::Attributes::StorageType::Value)-> diff --git a/Code/Framework/AzCore/AzCore/Math/Vector3.h b/Code/Framework/AzCore/AzCore/Math/Vector3.h index 821dc8292c..6b7c53266d 100644 --- a/Code/Framework/AzCore/AzCore/Math/Vector3.h +++ b/Code/Framework/AzCore/AzCore/Math/Vector3.h @@ -100,7 +100,7 @@ namespace AZ void Set(float x, float y, float z); //! Sets components from an array of 3 floats in xyz order. - void Set(float values[]); + void Set(const float values[]); //! Indexed access using operator(), just for convenience. float operator()(int32_t index) const; diff --git a/Code/Framework/AzCore/AzCore/Math/Vector3.inl b/Code/Framework/AzCore/AzCore/Math/Vector3.inl index 879ade38cf..6371c688b8 100644 --- a/Code/Framework/AzCore/AzCore/Math/Vector3.inl +++ b/Code/Framework/AzCore/AzCore/Math/Vector3.inl @@ -186,7 +186,7 @@ namespace AZ } - AZ_MATH_INLINE void Vector3::Set(float values[]) + AZ_MATH_INLINE void Vector3::Set(const float values[]) { m_value = Simd::Vec3::LoadImmediate(values[0], values[1], values[2]); } diff --git a/Code/Framework/AzCore/AzCore/Math/Vector4.cpp b/Code/Framework/AzCore/AzCore/Math/Vector4.cpp index 20126a8b64..1dc6d5d1fe 100644 --- a/Code/Framework/AzCore/AzCore/Math/Vector4.cpp +++ b/Code/Framework/AzCore/AzCore/Math/Vector4.cpp @@ -215,7 +215,7 @@ namespace AZ behaviorContext->Class()-> Attribute(Script::Attributes::Scope, Script::Attributes::ScopeFlags::Common)-> Attribute(Script::Attributes::Module, "math")-> - Attribute(Script::Attributes::ExcludeFrom, Script::Attributes::ExcludeFlags::All)-> + Attribute(Script::Attributes::ExcludeFrom, Script::Attributes::ExcludeFlags::ListOnly)-> Constructor()-> Constructor()-> Attribute(Script::Attributes::Storage, Script::Attributes::StorageType::Value)-> diff --git a/Code/Framework/AzCore/AzCore/Memory/AllocationRecords.cpp b/Code/Framework/AzCore/AzCore/Memory/AllocationRecords.cpp index b55b2db768..2b2f752b06 100644 --- a/Code/Framework/AzCore/AzCore/Memory/AllocationRecords.cpp +++ b/Code/Framework/AzCore/AzCore/Memory/AllocationRecords.cpp @@ -9,497 +9,522 @@ #include #include #include -#include #include #include +#include #include -using namespace AZ; -using namespace AZ::Debug; - -// Many PC tools break with alloc/free size mismatches when the memory guard is enabled. Disable for now -//#define ENABLE_MEMORY_GUARD - -//========================================================================= -// AllocationRecords -// [9/16/2009] -//========================================================================= -AllocationRecords::AllocationRecords(unsigned char stackRecordLevels, bool isMemoryGuard, bool isMarkUnallocatedMemory, const char* allocatorName) - : m_mode(AllocatorManager::Instance().m_defaultTrackingRecordMode) - , m_isAutoIntegrityCheck(false) - , m_isMarkUnallocatedMemory(isMarkUnallocatedMemory) - , m_saveNames(false) - , m_decodeImmediately(false) - , m_numStackLevels(stackRecordLevels) - , m_requestedAllocs(0) - , m_requestedBytes(0) - , m_requestedBytesPeak(0) - , m_allocatorName(allocatorName) +namespace AZ::Debug { + // Many PC tools break with alloc/free size mismatches when the memory guard is enabled. Disable for now + //#define ENABLE_MEMORY_GUARD + + //========================================================================= + // AllocationRecords + // [9/16/2009] + //========================================================================= + AllocationRecords::AllocationRecords( + unsigned char stackRecordLevels, [[maybe_unused]] bool isMemoryGuard, bool isMarkUnallocatedMemory, const char* allocatorName) + : m_mode(AllocatorManager::Instance().m_defaultTrackingRecordMode) + , m_isAutoIntegrityCheck(false) + , m_isMarkUnallocatedMemory(isMarkUnallocatedMemory) + , m_saveNames(false) + , m_decodeImmediately(false) + , m_numStackLevels(stackRecordLevels) #if defined(ENABLE_MEMORY_GUARD) - m_memoryGuardSize = isMemoryGuard ? sizeof(Debug::GuardValue) : 0; + , m_memoryGuardSize(isMemoryGuard ? sizeof(Debug::GuardValue) : 0) #else - (void)isMemoryGuard; - m_memoryGuardSize = 0; + , m_memoryGuardSize(0) #endif -#if AZ_TRAIT_OS_HAS_CRITICAL_SECTION_SPIN_COUNT - SetCriticalSectionSpinCount(DrillerEBusMutex::GetMutex().native_handle(), 4000); -#endif - // preallocate some buckets - //m_records.rehash(20000); -}; - -//========================================================================= -// ~AllocationRecords -// [9/16/2009] -//========================================================================= -AllocationRecords::~AllocationRecords() -{ - if (!AllocatorManager::Instance().m_isAllocatorLeaking) + , m_requestedAllocs(0) + , m_requestedBytes(0) + , m_requestedBytesPeak(0) + , m_allocatorName(allocatorName) { - // dump all allocation (we should not have any at this point). - bool includeNameAndFilename = (m_saveNames || m_mode == RECORD_FULL); - EnumerateAllocations(PrintAllocationsCB(true, includeNameAndFilename)); - AZ_Error("Memory", m_records.empty(), "We still have %d allocations on record! They must be freed prior to destroy!", m_records.size()); - } -} - -//========================================================================= -// lock -// [9/16/2009] -//========================================================================= -void -AllocationRecords::lock() -{ - DrillerEBusMutex::GetMutex().lock(); -} - -//========================================================================= -// try_lock -// [9/16/2009] -//========================================================================= -bool AllocationRecords::try_lock() -{ - return DrillerEBusMutex::GetMutex().try_lock(); -} - -//========================================================================= -// unlock -// [9/16/2009] -//========================================================================= -void -AllocationRecords::unlock() -{ - DrillerEBusMutex::GetMutex().unlock(); -} - -//========================================================================= -// RegisterAllocation -// [9/11/2009] -//========================================================================= -const AllocationInfo* -AllocationRecords::RegisterAllocation(void* address, size_t byteSize, size_t alignment, const char* name, const char* fileName, int lineNum, unsigned int stackSuppressCount) -{ - (void)stackSuppressCount; - if (m_mode == RECORD_NO_RECORDS) - { - return nullptr; - } - if (address == nullptr) - { - return nullptr; } - // memory guard - if (m_memoryGuardSize == sizeof(Debug::GuardValue)) + //========================================================================= + // ~AllocationRecords + // [9/16/2009] + //========================================================================= + AllocationRecords::~AllocationRecords() { - if (m_isAutoIntegrityCheck) + if (!AllocatorManager::Instance().m_isAllocatorLeaking) { - IntegrityCheckNoLock(); + // dump all allocation (we should not have any at this point). + bool includeNameAndFilename = (m_saveNames || m_mode == RECORD_FULL); + EnumerateAllocations(PrintAllocationsCB(true, includeNameAndFilename)); + AZ_Error( + "Memory", m_records.empty(), "We still have %d allocations on record! They must be freed prior to destroy!", + m_records.size()); + } + } + + //========================================================================= + // lock + // [9/16/2009] + //========================================================================= + void AllocationRecords::lock() + { + m_recordsMutex.lock(); + } + + //========================================================================= + // try_lock + // [9/16/2009] + //========================================================================= + bool AllocationRecords::try_lock() + { + return m_recordsMutex.try_lock(); + } + + //========================================================================= + // unlock + // [9/16/2009] + //========================================================================= + void AllocationRecords::unlock() + { + m_recordsMutex.unlock(); + } + + //========================================================================= + // RegisterAllocation + // [9/11/2009] + //========================================================================= + const AllocationInfo* AllocationRecords::RegisterAllocation( + void* address, + size_t byteSize, + size_t alignment, + const char* name, + const char* fileName, + int lineNum, + unsigned int stackSuppressCount) + { + (void)stackSuppressCount; + if (m_mode == RECORD_NO_RECORDS) + { + return nullptr; + } + if (address == nullptr) + { + return nullptr; } - AZ_Assert(byteSize>sizeof(Debug::GuardValue), "Did you forget to add the extra MemoryGuardSize() bytes?"); - byteSize -= sizeof(Debug::GuardValue); - new(reinterpret_cast(address)+byteSize) Debug::GuardValue(); - } - - Debug::AllocationRecordsType::pair_iter_bool iterBool = m_records.insert_key(address); - - if (!iterBool.second) - { - // If that memory address was already registered, print the stack trace of the previous registration - PrintAllocationsCB(true, (m_saveNames || m_mode == RECORD_FULL))(address, iterBool.first->second, m_numStackLevels); - AZ_Assert(iterBool.second, "Memory address 0x%p is already allocated and in the records!", address); - } - - Debug::AllocationInfo& ai = iterBool.first->second; - ai.m_byteSize = byteSize; - ai.m_alignment = static_cast(alignment); - if ((m_saveNames || m_mode == RECORD_FULL) && name && fileName) - { - // In RECORD_FULL mode or when specifically enabled in app descriptor with - // m_allocationRecordsSaveNames, we allocate our own memory to save off name and fileName. - // When testing for memory leaks, on process shutdown AllocationRecords::~AllocationRecords - // gets called to enumerate the remaining (leaked) allocations. Unfortunately, any names - // referenced in dynamic module memory whose modules are unloaded won't be valid - // references anymore and we won't get useful information from the enumeration print. - // This code block ensures we keep our name/fileName valid for when we need it. - const size_t nameLength = strlen(name); - const size_t fileNameLength = strlen(fileName); - const size_t totalLength = nameLength + fileNameLength + 2; // + 2 for terminating null characters - ai.m_namesBlock = m_records.get_allocator().allocate(totalLength, 1); - ai.m_namesBlockSize = totalLength; - char* savedName = reinterpret_cast(ai.m_namesBlock); - char* savedFileName = savedName + nameLength + 1; - memcpy(reinterpret_cast(savedName), reinterpret_cast(name), nameLength + 1); - memcpy(reinterpret_cast(savedFileName), reinterpret_cast(fileName), fileNameLength + 1); - ai.m_name = savedName; - ai.m_fileName = savedFileName; - } - else - { - ai.m_name = name; - ai.m_fileName = fileName; - ai.m_namesBlock = nullptr; - ai.m_namesBlockSize = 0; - } - ai.m_lineNum = lineNum; - ai.m_timeStamp = AZStd::GetTimeNowMicroSecond(); - - // if we don't have a fileName,lineNum record the stack or if the user requested it. - if ((fileName == nullptr && m_mode == RECORD_STACK_IF_NO_FILE_LINE) || m_mode == RECORD_FULL) - { - ai.m_stackFrames = m_numStackLevels ? reinterpret_cast(m_records.get_allocator().allocate(sizeof(AZ::Debug::StackFrame)*m_numStackLevels, 1)) : nullptr; - if (ai.m_stackFrames) + // memory guard + if (m_memoryGuardSize == sizeof(Debug::GuardValue)) { - Debug::StackRecorder::Record(ai.m_stackFrames, m_numStackLevels, stackSuppressCount + 1); - - if (m_decodeImmediately) + if (m_isAutoIntegrityCheck) { - // OPTIONAL DEBUGGING CODE - enable in app descriptor m_allocationRecordsAttemptDecodeImmediately - // This is optionally-enabled code for tracking down memory allocations - // that fail to be decoded. DecodeFrames() typically runs at the end of - // your application when leaks were found. Sometimes you have stack prints - // full of "(module-name not available)" and "(function-name not available)" - // that are not actionable. If you have those, enable this code. It'll slow - // down your process significantly because for every allocation recorded - // we get the stack trace on the spot. Put a breakpoint in DecodeFrames() - // at the "(module-name not available)" and "(function-name not available)" - // locations and now at the moment those allocations happen you'll have the - // full stack trace available and the ability to debug what could be causing it + IntegrityCheck(); + } + + AZ_Assert(byteSize > sizeof(Debug::GuardValue), "Did you forget to add the extra MemoryGuardSize() bytes?"); + byteSize -= sizeof(Debug::GuardValue); + new (reinterpret_cast(address) + byteSize) Debug::GuardValue(); + } + + Debug::AllocationRecordsType::pair_iter_bool iterBool; + { + AZStd::scoped_lock lock(m_recordsMutex); + iterBool = m_records.insert_key(address); + } + + if (!iterBool.second) + { + // If that memory address was already registered, print the stack trace of the previous registration + PrintAllocationsCB(true, (m_saveNames || m_mode == RECORD_FULL))(address, iterBool.first->second, m_numStackLevels); + AZ_Assert(iterBool.second, "Memory address 0x%p is already allocated and in the records!", address); + } + + Debug::AllocationInfo& ai = iterBool.first->second; + ai.m_byteSize = byteSize; + ai.m_alignment = static_cast(alignment); + if ((m_saveNames || m_mode == RECORD_FULL) && name && fileName) + { + // In RECORD_FULL mode or when specifically enabled in app descriptor with + // m_allocationRecordsSaveNames, we allocate our own memory to save off name and fileName. + // When testing for memory leaks, on process shutdown AllocationRecords::~AllocationRecords + // gets called to enumerate the remaining (leaked) allocations. Unfortunately, any names + // referenced in dynamic module memory whose modules are unloaded won't be valid + // references anymore and we won't get useful information from the enumeration print. + // This code block ensures we keep our name/fileName valid for when we need it. + const size_t nameLength = strlen(name); + const size_t fileNameLength = strlen(fileName); + const size_t totalLength = nameLength + fileNameLength + 2; // + 2 for terminating null characters + ai.m_namesBlock = m_records.get_allocator().allocate(totalLength, 1); + ai.m_namesBlockSize = totalLength; + char* savedName = reinterpret_cast(ai.m_namesBlock); + char* savedFileName = savedName + nameLength + 1; + memcpy(reinterpret_cast(savedName), reinterpret_cast(name), nameLength + 1); + memcpy(reinterpret_cast(savedFileName), reinterpret_cast(fileName), fileNameLength + 1); + ai.m_name = savedName; + ai.m_fileName = savedFileName; + } + else + { + ai.m_name = name; + ai.m_fileName = fileName; + ai.m_namesBlock = nullptr; + ai.m_namesBlockSize = 0; + } + ai.m_lineNum = lineNum; + ai.m_timeStamp = AZStd::GetTimeNowMicroSecond(); + + // if we don't have a fileName,lineNum record the stack or if the user requested it. + if ((fileName == nullptr && m_mode == RECORD_STACK_IF_NO_FILE_LINE) || m_mode == RECORD_FULL) + { + ai.m_stackFrames = m_numStackLevels ? reinterpret_cast(m_records.get_allocator().allocate( + sizeof(AZ::Debug::StackFrame) * m_numStackLevels, 1)) + : nullptr; + if (ai.m_stackFrames) + { + Debug::StackRecorder::Record(ai.m_stackFrames, m_numStackLevels, stackSuppressCount + 1); + + if (m_decodeImmediately) { - const unsigned char decodeStep = 40; - Debug::SymbolStorage::StackLine lines[decodeStep]; - unsigned char iFrame = 0; - unsigned char numStackLevels = m_numStackLevels; - while (numStackLevels > 0) + // OPTIONAL DEBUGGING CODE - enable in app descriptor m_allocationRecordsAttemptDecodeImmediately + // This is optionally-enabled code for tracking down memory allocations + // that fail to be decoded. DecodeFrames() typically runs at the end of + // your application when leaks were found. Sometimes you have stack prints + // full of "(module-name not available)" and "(function-name not available)" + // that are not actionable. If you have those, enable this code. It'll slow + // down your process significantly because for every allocation recorded + // we get the stack trace on the spot. Put a breakpoint in DecodeFrames() + // at the "(module-name not available)" and "(function-name not available)" + // locations and now at the moment those allocations happen you'll have the + // full stack trace available and the ability to debug what could be causing it { - unsigned char numToDecode = AZStd::GetMin(decodeStep, numStackLevels); - Debug::SymbolStorage::DecodeFrames(&ai.m_stackFrames[iFrame], numToDecode, lines); - numStackLevels -= numToDecode; - iFrame += numToDecode; + const unsigned char decodeStep = 40; + Debug::SymbolStorage::StackLine lines[decodeStep]; + unsigned char iFrame = 0; + unsigned char numStackLevels = m_numStackLevels; + while (numStackLevels > 0) + { + unsigned char numToDecode = AZStd::GetMin(decodeStep, numStackLevels); + Debug::SymbolStorage::DecodeFrames(&ai.m_stackFrames[iFrame], numToDecode, lines); + numStackLevels -= numToDecode; + iFrame += numToDecode; + } } } } } - } - AllocatorManager::Instance().DebugBreak(address, ai); + AllocatorManager::Instance().DebugBreak(address, ai); - // statistics - m_requestedBytes += byteSize; - m_requestedBytesPeak = AZStd::GetMax(m_requestedBytesPeak, m_requestedBytes); - ++m_requestedAllocs; + // statistics + m_requestedBytes += byteSize; - return &ai; -} - -//========================================================================= -// UnregisterAllocation -// [9/11/2009] -//========================================================================= -void -AllocationRecords::UnregisterAllocation(void* address, size_t byteSize, size_t alignment, AllocationInfo* info) -{ - if (m_mode == RECORD_NO_RECORDS) - { - return; - } - if (address == nullptr) - { - return; - } - - Debug::AllocationRecordsType::iterator iter = m_records.find(address); - - // We cannot assert if an allocation does not exist because our allocators start up way before the driller is started and the Allocator Records would be created. - // It is currently impossible to actually track all allocations that happen before a certain point - //AZ_Assert(iter!=m_records.end(), "Could not find address 0x%p in the allocator!", address); - if (iter == m_records.end()) - { - return; - } - AllocatorManager::Instance().DebugBreak(address, iter->second); - - (void)byteSize; - (void)alignment; - AZ_Assert(byteSize==0||byteSize==iter->second.m_byteSize, "Mismatched byteSize at deallocation! You supplied an invalid value!"); - AZ_Assert(alignment==0||alignment==iter->second.m_alignment, "Mismatched alignment at deallocation! You supplied an invalid value!"); - - // statistics - m_requestedBytes -= iter->second.m_byteSize; - -#if defined(ENABLE_MEMORY_GUARD) - // memory guard - if (m_memoryGuardSize == sizeof(Debug::GuardValue)) - { - if (m_isAutoIntegrityCheck) + size_t currentRequestedBytePeak; + size_t newRequestedBytePeak; + do { - // full integrity check - IntegrityCheckNoLock(); + currentRequestedBytePeak = m_requestedBytesPeak.load(std::memory_order::memory_order_relaxed); + newRequestedBytePeak = AZStd::GetMax(currentRequestedBytePeak, m_requestedBytes.load(std::memory_order::memory_order_relaxed)); + } while (!m_requestedBytesPeak.compare_exchange_weak(currentRequestedBytePeak, newRequestedBytePeak)); + + ++m_requestedAllocs; + + return &ai; + } + + //========================================================================= + // UnregisterAllocation + // [9/11/2009] + //========================================================================= + void AllocationRecords::UnregisterAllocation(void* address, size_t byteSize, size_t alignment, AllocationInfo* info) + { + if (m_mode == RECORD_NO_RECORDS) + { + return; } - else + if (address == nullptr) { - // check current allocation - char* guardAddress = reinterpret_cast(address)+iter->second.m_byteSize; - Debug::GuardValue* guard = reinterpret_cast(guardAddress); - if (!guard->Validate()) + return; + } + + AllocationInfo allocationInfo; + { + AZStd::scoped_lock lock(m_recordsMutex); + Debug::AllocationRecordsType::iterator iter = m_records.find(address); + // We cannot assert if an allocation does not exist because allocations may have been made before tracking was enabled. + // It is currently impossible to actually track all allocations that happen before a certain point + // AZ_Assert(iter!=m_records.end(), "Could not find address 0x%p in the allocator!", address); + if (iter == m_records.end()) { - AZ_Printf("Memory", "Memory stomp located at address %p, part of allocation:", guardAddress); - PrintAllocationsCB printAlloc(true); - printAlloc(address, iter->second, m_numStackLevels); - AZ_Assert(false, "MEMORY STOMP DETECTED!!!"); + return; } - guard->~GuardValue(); - } - } -#endif + allocationInfo = iter->second; + m_records.erase(iter); - // delete allocation record - if (iter->second.m_namesBlock) - { - m_records.get_allocator().deallocate(iter->second.m_namesBlock, iter->second.m_namesBlockSize, 1); - iter->second.m_namesBlock = nullptr; - iter->second.m_namesBlockSize = 0; - iter->second.m_name = nullptr; - iter->second.m_fileName = nullptr; - } - if (iter->second.m_stackFrames) - { - m_records.get_allocator().deallocate(iter->second.m_stackFrames, sizeof(AZ::Debug::StackFrame)*m_numStackLevels, 1); - iter->second.m_stackFrames = nullptr; - } - - if (info) - { - *info = iter->second; - } - - m_records.erase(iter); - - // try to be more aggressive and keep the memory footprint low. - // \todo store the load factor at the last rehash to avoid unnecessary rehash - if (m_records.load_factor()<0.9f) - { - m_records.rehash(0); - } - - // if requested set memory to a specific value. - if (m_isMarkUnallocatedMemory) - { - memset(address, GetUnallocatedMarkValue(), byteSize); - } -} - -//========================================================================= -// ResizeAllocation -// [9/20/2009] -//========================================================================= -void -AllocationRecords::ResizeAllocation(void* address, size_t newSize) -{ - if (m_mode == RECORD_NO_RECORDS) - { - return; - } - - Debug::AllocationRecordsType::iterator iter = m_records.find(address); - AZ_Assert(iter!=m_records.end(), "Could not find address 0x%p in the allocator!", address); - AllocatorManager::Instance().DebugBreak(address, iter->second); - -#if defined(ENABLE_MEMORY_GUARD) - if (m_memoryGuardSize == sizeof(Debug::GuardValue)) - { - if (m_isAutoIntegrityCheck) - { - // full integrity check - IntegrityCheckNoLock(); - } - else - { - // check memory guard - char* guardAddress = reinterpret_cast(address)+iter->second.m_byteSize; - Debug::GuardValue* guard = reinterpret_cast(guardAddress); - if (!guard->Validate()) + // try to be more aggressive and keep the memory footprint low. + // \todo store the load factor at the last rehash to avoid unnecessary rehash + if (m_records.load_factor() < 0.9f) { - AZ_Printf("Memory", "Memory stomp located at address %p, part of allocation:", guardAddress); - PrintAllocationsCB printAlloc(true); - printAlloc(address, iter->second, m_numStackLevels); - AZ_Assert(false, "MEMORY STOMP DETECTED!!!"); + m_records.rehash(0); } - guard->~GuardValue(); } - // init the new memory guard - newSize -= sizeof(Debug::GuardValue); - new(reinterpret_cast(address)+newSize) Debug::GuardValue(); - } -#endif - // statistics - m_requestedBytes -= iter->second.m_byteSize; - m_requestedBytes += newSize; - m_requestedBytesPeak = AZStd::GetMax(m_requestedBytesPeak, m_requestedBytes); - ++m_requestedAllocs; + AllocatorManager::Instance().DebugBreak(address, allocationInfo); - // update allocation size - iter->second.m_byteSize = newSize; -} + (void)byteSize; + (void)alignment; + AZ_Assert( + byteSize == 0 || byteSize == allocationInfo.m_byteSize, "Mismatched byteSize at deallocation! You supplied an invalid value!"); + AZ_Assert( + alignment == 0 || alignment == allocationInfo.m_alignment, + "Mismatched alignment at deallocation! You supplied an invalid value!"); -//========================================================================= -// EnumerateAllocations -// [9/29/2009] -//========================================================================= -void -AllocationRecords::SetMode(Mode mode) -{ - DrillerEBusMutex::GetMutex().lock(); + // statistics + m_requestedBytes -= allocationInfo.m_byteSize; - if (mode==RECORD_NO_RECORDS) - { - m_records.clear(); - m_requestedBytes = 0; - m_requestedBytesPeak = 0; - m_requestedAllocs = 0; - } - - AZ_Warning("Memory", m_mode!=RECORD_NO_RECORDS||mode==RECORD_NO_RECORDS, "Records recording was disabled and now it's enabled! You might get assert when you free memory, if a you have allocations which were not recorded!"); - - m_mode = mode; - - DrillerEBusMutex::GetMutex().unlock(); -} - -//========================================================================= -// EnumerateAllocations -// [9/29/2009] -//========================================================================= -void -AllocationRecords::EnumerateAllocations(AllocationInfoCBType cb) -{ - DrillerEBusMutex::GetMutex().lock(); - // enumerate all allocations and stop if requested. - // Since allocations can change during the iteration (code that prints out the records could allocate, which will - // mutate m_records), we are going to make a copy and iterate the copy. - const Debug::AllocationRecordsType recordsCopy = m_records; - for (Debug::AllocationRecordsType::const_iterator iter = recordsCopy.begin(); iter != recordsCopy.end(); ++iter) - { - if (!cb(iter->first, iter->second, m_numStackLevels)) - { - break; - } - } - DrillerEBusMutex::GetMutex().unlock(); -} - -//========================================================================= -// IntegrityCheck -// [9/9/2011] -//========================================================================= -void -AllocationRecords::IntegrityCheck() const -{ - if (m_memoryGuardSize == sizeof(Debug::GuardValue)) - { - DrillerEBusMutex::GetMutex().lock(); - - IntegrityCheckNoLock(); - - DrillerEBusMutex::GetMutex().unlock(); - } -} - -//========================================================================= -// IntegrityCheckNoLock -// [9/13/2011] -//========================================================================= -void -AllocationRecords::IntegrityCheckNoLock() const -{ #if defined(ENABLE_MEMORY_GUARD) - for (Debug::AllocationRecordsType::const_iterator iter = m_records.begin(); iter != m_records.end(); ++iter) - { - // check memory guard - const char* guardAddress = reinterpret_cast(iter->first)+ iter->second.m_byteSize; - if (!reinterpret_cast(guardAddress)->Validate()) + // memory guard + if (m_memoryGuardSize == sizeof(Debug::GuardValue)) { - // We have to turn off the integrity check at this point if we want to succesfully report the memory - // stomp we just found. If we don't turn this off, the printf just winds off the stack as each memory - // allocation done therein recurses this same code. - *const_cast(&m_isAutoIntegrityCheck) = false; - AZ_Printf("Memory", "Memory stomp located at address %p, part of allocation:", guardAddress); - PrintAllocationsCB printAlloc(true); - printAlloc(iter->first, iter->second, m_numStackLevels); - AZ_Error("Memory", false, "MEMORY STOMP DETECTED!!!"); - } - } -#endif -} - -//========================================================================= -// operator() -// [9/29/2009] -//========================================================================= -bool -PrintAllocationsCB::operator()(void* address, const AllocationInfo& info, unsigned char numStackLevels) -{ - if (m_includeNameAndFilename && info.m_name) - { - AZ_Printf("Memory", "Allocation Name: \"%s\" Addr: 0%p Size: %d Alignment: %d\n", info.m_name, address, info.m_byteSize, info.m_alignment); - } - else - { - AZ_Printf("Memory", "Allocation Addr: 0%p Size: %d Alignment: %d\n", address, info.m_byteSize, info.m_alignment); - } - - if (m_isDetailed) - { - if (!info.m_stackFrames) - { - AZ_Printf("Memory", " %s (%d)\n", info.m_fileName, info.m_lineNum); - } - else - { - // Allocation callstack - const unsigned char decodeStep = 40; - Debug::SymbolStorage::StackLine lines[decodeStep]; - unsigned char iFrame = 0; - while (numStackLevels>0) + if (m_isAutoIntegrityCheck) { - unsigned char numToDecode = AZStd::GetMin(decodeStep, numStackLevels); - Debug::SymbolStorage::DecodeFrames(&info.m_stackFrames[iFrame], numToDecode, lines); - for (unsigned char i = 0; i < numToDecode; ++i) + // full integrity check + IntegrityCheck(); + } + else + { + // check current allocation + char* guardAddress = reinterpret_cast(address) + allocationInfo.m_byteSize; + Debug::GuardValue* guard = reinterpret_cast(guardAddress); + if (!guard->Validate()) { - if (info.m_stackFrames[iFrame+i].IsValid()) - { - AZ_Printf("Memory", " %s\n", lines[i]); - } + AZ_Printf("Memory", "Memory stomp located at address %p, part of allocation:", guardAddress); + PrintAllocationsCB printAlloc(true); + printAlloc(address, allocationInfo, m_numStackLevels); + AZ_Assert(false, "MEMORY STOMP DETECTED!!!"); } - numStackLevels -= numToDecode; - iFrame += numToDecode; + guard->~GuardValue(); + } + } +#endif + + // delete allocation record + if (allocationInfo.m_namesBlock) + { + m_records.get_allocator().deallocate(allocationInfo.m_namesBlock, allocationInfo.m_namesBlockSize, 1); + allocationInfo.m_namesBlock = nullptr; + allocationInfo.m_namesBlockSize = 0; + allocationInfo.m_name = nullptr; + allocationInfo.m_fileName = nullptr; + } + if (allocationInfo.m_stackFrames) + { + m_records.get_allocator().deallocate(allocationInfo.m_stackFrames, sizeof(AZ::Debug::StackFrame) * m_numStackLevels, 1); + allocationInfo.m_stackFrames = nullptr; + } + + if (info) + { + *info = allocationInfo; + } + + // if requested set memory to a specific value. + if (m_isMarkUnallocatedMemory) + { + memset(address, GetUnallocatedMarkValue(), byteSize); + } + } + + //========================================================================= + // ResizeAllocation + // [9/20/2009] + //========================================================================= + void AllocationRecords::ResizeAllocation(void* address, size_t newSize) + { + if (m_mode == RECORD_NO_RECORDS) + { + return; + } + + AllocationInfo* allocationInfo; + { + AZStd::scoped_lock lock(m_recordsMutex); + Debug::AllocationRecordsType::iterator iter = m_records.find(address); + AZ_Assert(iter != m_records.end(), "Could not find address 0x%p in the allocator!", address); + allocationInfo = &iter->second; + } + AllocatorManager::Instance().DebugBreak(address, *allocationInfo); + +#if defined(ENABLE_MEMORY_GUARD) + if (m_memoryGuardSize == sizeof(Debug::GuardValue)) + { + if (m_isAutoIntegrityCheck) + { + // full integrity check + IntegrityCheck(); + } + else + { + // check memory guard + char* guardAddress = reinterpret_cast(address) + allocationInfo->m_byteSize; + Debug::GuardValue* guard = reinterpret_cast(guardAddress); + if (!guard->Validate()) + { + AZ_Printf("Memory", "Memory stomp located at address %p, part of allocation:", guardAddress); + PrintAllocationsCB printAlloc(true); + printAlloc(address, iter->second, m_numStackLevels); + AZ_Assert(false, "MEMORY STOMP DETECTED!!!"); + } + guard->~GuardValue(); + } + // init the new memory guard + newSize -= sizeof(Debug::GuardValue); + new (reinterpret_cast(address) + newSize) Debug::GuardValue(); + } +#endif + + // statistics + m_requestedBytes -= allocationInfo->m_byteSize; + m_requestedBytes += newSize; + size_t currentRequestedBytePeak; + size_t newRequestedBytePeak; + do + { + currentRequestedBytePeak = m_requestedBytesPeak.load(std::memory_order::memory_order_relaxed); + newRequestedBytePeak = AZStd::GetMax(currentRequestedBytePeak, m_requestedBytes.load(std::memory_order::memory_order_relaxed)); + } while (!m_requestedBytesPeak.compare_exchange_weak(currentRequestedBytePeak, newRequestedBytePeak)); + ++m_requestedAllocs; + + // update allocation size + allocationInfo->m_byteSize = newSize; + } + + //========================================================================= + // EnumerateAllocations + // [9/29/2009] + //========================================================================= + void AllocationRecords::SetMode(Mode mode) + { + if (mode == RECORD_NO_RECORDS) + { + { + AZStd::scoped_lock lock(m_recordsMutex); + m_records.clear(); + } + m_requestedBytes = 0; + m_requestedBytesPeak = 0; + m_requestedAllocs = 0; + } + + AZ_Warning( + "Memory", m_mode != RECORD_NO_RECORDS || mode == RECORD_NO_RECORDS, + "Records recording was disabled and now it's enabled! You might get assert when you free memory, if a you have allocations " + "which were not recorded!"); + + m_mode = mode; + } + + //========================================================================= + // EnumerateAllocations + // [9/29/2009] + //========================================================================= + void AllocationRecords::EnumerateAllocations(AllocationInfoCBType cb) + { + // enumerate all allocations and stop if requested. + // Since allocations can change during the iteration (code that prints out the records could allocate, which will + // mutate m_records), we are going to make a copy and iterate the copy. + Debug::AllocationRecordsType recordsCopy; + { + AZStd::scoped_lock lock(m_recordsMutex); + recordsCopy = m_records; + } + for (Debug::AllocationRecordsType::const_iterator iter = recordsCopy.begin(); iter != recordsCopy.end(); ++iter) + { + if (!cb(iter->first, iter->second, m_numStackLevels)) + { + break; } } } - return true; // continue enumerating -} + + //========================================================================= + // IntegrityCheck + // [9/9/2011] + //========================================================================= + void AllocationRecords::IntegrityCheck() const + { +#if defined(ENABLE_MEMORY_GUARD) + if (m_memoryGuardSize == sizeof(Debug::GuardValue)) + { + Debug::AllocationRecordsType recordsCopy; + { + AZStd::scoped_lock lock(m_recordsMutex); + recordsCopy = m_records; + } + for (Debug::AllocationRecordsType::const_iterator iter = recordsCopy.begin(); iter != recordsCopy.end(); ++iter) + { + // check memory guard + const char* guardAddress = reinterpret_cast(iter->first) + iter->second.m_byteSize; + if (!reinterpret_cast(guardAddress)->Validate()) + { + // We have to turn off the integrity check at this point if we want to succesfully report the memory + // stomp we just found. If we don't turn this off, the printf just winds off the stack as each memory + // allocation done therein recurses this same code. + *const_cast(&m_isAutoIntegrityCheck) = false; + AZ_Printf("Memory", "Memory stomp located at address %p, part of allocation:", guardAddress); + PrintAllocationsCB printAlloc(true); + printAlloc(iter->first, iter->second, m_numStackLevels); + AZ_Error("Memory", false, "MEMORY STOMP DETECTED!!!"); + } + } + } +#endif + } + + //========================================================================= + // operator() + // [9/29/2009] + //========================================================================= + bool PrintAllocationsCB::operator()(void* address, const AllocationInfo& info, unsigned char numStackLevels) + { + if (m_includeNameAndFilename && info.m_name) + { + AZ_Printf( + "Memory", "Allocation Name: \"%s\" Addr: 0%p Size: %d Alignment: %d\n", info.m_name, address, info.m_byteSize, + info.m_alignment); + } + else + { + AZ_Printf("Memory", "Allocation Addr: 0%p Size: %d Alignment: %d\n", address, info.m_byteSize, info.m_alignment); + } + + if (m_isDetailed) + { + if (!info.m_stackFrames) + { + AZ_Printf("Memory", " %s (%d)\n", info.m_fileName, info.m_lineNum); + } + else + { + // Allocation callstack + const unsigned char decodeStep = 40; + Debug::SymbolStorage::StackLine lines[decodeStep]; + unsigned char iFrame = 0; + while (numStackLevels > 0) + { + unsigned char numToDecode = AZStd::GetMin(decodeStep, numStackLevels); + Debug::SymbolStorage::DecodeFrames(&info.m_stackFrames[iFrame], numToDecode, lines); + for (unsigned char i = 0; i < numToDecode; ++i) + { + if (info.m_stackFrames[iFrame + i].IsValid()) + { + AZ_Printf("Memory", " %s\n", lines[i]); + } + } + numStackLevels -= numToDecode; + iFrame += numToDecode; + } + } + } + return true; // continue enumerating + } + +} // namespace AZ::Debug diff --git a/Code/Framework/AzCore/AzCore/Memory/AllocationRecords.h b/Code/Framework/AzCore/AzCore/Memory/AllocationRecords.h index 709e16174d..3f998b0bbd 100644 --- a/Code/Framework/AzCore/AzCore/Memory/AllocationRecords.h +++ b/Code/Framework/AzCore/AzCore/Memory/AllocationRecords.h @@ -120,10 +120,9 @@ namespace AZ */ class AllocationRecords { - friend class MemoryDriller; + public: AZ_CLASS_ALLOCATOR(AllocationRecords, OSAllocator, 0); - public: enum Mode : int { RECORD_NO_RECORDS, ///< Never record any information. @@ -178,7 +177,7 @@ namespace AZ /// Returns peak of requested memory. IMPORTANT: This is user requested memory! Any allocator overhead is NOT included. size_t RequestedBytesPeak() const { return m_requestedBytesPeak; } /// Reset the peak allocation to the current requested memory. - void ResetPeakBytes() { m_requestedBytesPeak = m_requestedBytes; } + void ResetPeakBytes() { m_requestedBytesPeak.store(m_requestedBytes); } /// Return requested user bytes. IMPORTANT: This is user requested memory! Any allocator overhead is NOT included. size_t RequestedBytes() const { return m_requestedBytes; } /// Returns total number of requested allocations. @@ -186,8 +185,6 @@ namespace AZ const char* GetAllocatorName() const { return m_allocatorName; } - protected: - // @{ Allocation tracking management - we assume this functions are called with the lock locked. const AllocationInfo* RegisterAllocation(void* address, size_t byteSize, size_t alignment, const char* name, const char* fileName, int lineNum, unsigned int stackSuppressCount); void UnregisterAllocation(void* address, size_t byteSize, size_t alignment, AllocationInfo* info); @@ -195,9 +192,9 @@ namespace AZ void ResizeAllocation(void* address, size_t newSize); // @} - void IntegrityCheckNoLock() const; - + protected: Debug::AllocationRecordsType m_records; + AZStd::spin_mutex m_recordsMutex; Mode m_mode; bool m_isAutoIntegrityCheck; bool m_isMarkUnallocatedMemory; ///< True if we want to set value 0xcd in unallocated memory. @@ -205,9 +202,9 @@ namespace AZ bool m_decodeImmediately; unsigned char m_numStackLevels; unsigned int m_memoryGuardSize; - size_t m_requestedAllocs; - size_t m_requestedBytes; - size_t m_requestedBytesPeak; + AZStd::atomic m_requestedAllocs; + AZStd::atomic m_requestedBytes; + AZStd::atomic m_requestedBytesPeak; const char* m_allocatorName; }; diff --git a/Code/Framework/AzCore/AzCore/Memory/AllocatorBase.cpp b/Code/Framework/AzCore/AzCore/Memory/AllocatorBase.cpp index e450f12bcf..c2bf9fe45c 100644 --- a/Code/Framework/AzCore/AzCore/Memory/AllocatorBase.cpp +++ b/Code/Framework/AzCore/AzCore/Memory/AllocatorBase.cpp @@ -8,193 +8,362 @@ #include #include -#include -using namespace AZ; +#define RECORDING_ENABLED 0 -AllocatorBase::AllocatorBase(IAllocatorAllocate* allocationSource, const char* name, const char* desc) : - IAllocator(allocationSource), - m_name(name), - m_desc(desc) +#if RECORDING_ENABLED + +#include +#include +#include +#include + +namespace { -} - -AllocatorBase::~AllocatorBase() -{ - AZ_Assert(!m_isReady, "Allocator %s (%s) is being destructed without first having gone through proper calls to PreDestroy() and Destroy(). Use AllocatorInstance<> for global allocators or AllocatorWrapper<> for local allocators.", m_name, m_desc); -} - -const char* AllocatorBase::GetName() const -{ - return m_name; -} - -const char* AllocatorBase::GetDescription() const -{ - return m_desc; -} - -IAllocatorAllocate* AllocatorBase::GetSchema() -{ - return nullptr; -} - -Debug::AllocationRecords* AllocatorBase::GetRecords() -{ - return m_records; -} - -void AllocatorBase::SetRecords(Debug::AllocationRecords* records) -{ - m_records = records; - m_memoryGuardSize = records ? records->MemoryGuardSize() : 0; -} - -bool AllocatorBase::IsReady() const -{ - return m_isReady; -} - -bool AllocatorBase::CanBeOverridden() const -{ - return m_canBeOverridden; -} - -void AllocatorBase::PostCreate() -{ - if (m_registrationEnabled) + class DebugAllocator { - if (AZ::Environment::IsReady()) + public: + using pointer_type = void*; + using size_type = AZStd::size_t; + using difference_type = AZStd::ptrdiff_t; + using allow_memory_leaks = AZStd::false_type; ///< Regular allocators should not leak. + + AZ_FORCE_INLINE pointer_type allocate(size_t byteSize, size_t alignment, int = 0) { - AllocatorManager::Instance().RegisterAllocator(this); + return AZ_OS_MALLOC(byteSize, alignment); + } + AZ_FORCE_INLINE size_type resize(pointer_type, size_type) + { + return 0; + } + AZ_FORCE_INLINE void deallocate(pointer_type ptr, size_type, size_type) + { + AZ_OS_FREE(ptr); + } + }; + + #pragma pack(push, 1) + struct alignas(1) AllocatorOperation + { + enum OperationType : size_t + { + ALLOCATE, + DEALLOCATE + }; + OperationType m_type: 1; + size_t m_size : 28; // Can represent up to 256Mb requests + size_t m_alignment : 7; // Can represent up to 128 alignment + size_t m_recordId : 28; // Can represent up to 256M simultaneous requests, we reuse ids + }; + #pragma pack(pop) + static_assert(sizeof(AllocatorOperation) == 8); + + static AZStd::mutex s_operationsMutex = {}; + + static constexpr size_t s_maxNumberOfAllocationsToRecord = 16384; + static size_t s_numberOfAllocationsRecorded = 0; + static constexpr size_t s_allocationOperationCount = 5 * 1024; + static AZStd::array s_operations = {}; + static uint64_t s_operationCounter = 0; + + static unsigned int s_nextRecordId = 1; + using AllocatorOperationByAddress = AZStd::unordered_map, DebugAllocator>; + static AllocatorOperationByAddress s_allocatorOperationByAddress; + using AvailableRecordIds = AZStd::vector; + AvailableRecordIds s_availableRecordIds; + + void RecordAllocatorOperation(AllocatorOperation::OperationType type, void* ptr, size_t size = 0, size_t alignment = 0) + { + AZStd::scoped_lock lock(s_operationsMutex); + if (s_operationCounter == s_allocationOperationCount) + { + AZ::IO::SystemFile file; + int mode = AZ::IO::SystemFile::OpenMode::SF_OPEN_APPEND | AZ::IO::SystemFile::OpenMode::SF_OPEN_WRITE_ONLY; + if (!file.Exists("memoryrecordings.bin")) + { + mode |= AZ::IO::SystemFile::OpenMode::SF_OPEN_CREATE; + } + file.Open("memoryrecordings.bin", mode); + if (file.IsOpen()) + { + file.Write(&s_operations, sizeof(AllocatorOperation) * s_allocationOperationCount); + file.Close(); + } + s_operationCounter = 0; + } + AllocatorOperation& operation = s_operations[s_operationCounter++]; + operation.m_type = type; + if (type == AllocatorOperation::OperationType::ALLOCATE) + { + if (s_numberOfAllocationsRecorded > s_maxNumberOfAllocationsToRecord) + { + // reached limit of allocations, dont record anymore + --s_operationCounter; + return; + } + ++s_numberOfAllocationsRecorded; + operation.m_size = size; + operation.m_alignment = alignment; + unsigned int recordId = 0; + if (!s_availableRecordIds.empty()) + { + recordId = s_availableRecordIds.back(); + s_availableRecordIds.pop_back(); + } + else + { + recordId = s_nextRecordId; + ++s_nextRecordId; + } + operation.m_recordId = recordId; + auto it = s_allocatorOperationByAddress.emplace(ptr, operation); + if (!it.second) + { + // double alloc or resize, leave the current record and return the id + operation = it.first->second; + s_availableRecordIds.emplace_back(recordId); + } } else { - AllocatorManager::PreRegisterAllocator(this); + if (ptr == nullptr) + { + // common scenario, just record the operation + operation.m_size = 0; + operation.m_alignment = 0; + operation.m_recordId = 0; // recordId = 0 will flag this case + } + else + { + auto it = s_allocatorOperationByAddress.find(ptr); + if (it != s_allocatorOperationByAddress.end()) + { + operation.m_size = it->second.m_size; + operation.m_alignment = it->second.m_alignment; + operation.m_recordId = it->second.m_recordId; + s_availableRecordIds.push_back(it->second.m_recordId); + s_allocatorOperationByAddress.erase(it); + } + else + { + // just dont record this operation + --s_operationCounter; + } + } } + } - -#if PLATFORM_MEMORY_INSTRUMENTATION_ENABLED - m_platformMemoryInstrumentationGroupId = AZ::PlatformMemoryInstrumentation::GetNextGroupId(); - AZ::PlatformMemoryInstrumentation::RegisterGroup(m_platformMemoryInstrumentationGroupId, GetDescription(), AZ::PlatformMemoryInstrumentation::m_groupRoot); +} #endif - m_isReady = true; -} - -void AllocatorBase::PreDestroy() +namespace AZ { - if (m_registrationEnabled && AZ::AllocatorManager::IsReady()) + AllocatorBase::AllocatorBase(IAllocatorAllocate* allocationSource, const char* name, const char* desc) + : IAllocator(allocationSource) + , m_name(name) + , m_desc(desc) { - AllocatorManager::Instance().UnRegisterAllocator(this); } - m_isReady = false; -} + AllocatorBase::~AllocatorBase() + { + AZ_Assert( + !m_isReady, + "Allocator %s (%s) is being destructed without first having gone through proper calls to PreDestroy() and Destroy(). Use " + "AllocatorInstance<> for global allocators or AllocatorWrapper<> for local allocators.", + m_name, m_desc); + } -void AllocatorBase::SetLazilyCreated(bool lazy) -{ - m_isLazilyCreated = lazy; -} + const char* AllocatorBase::GetName() const + { + return m_name; + } -bool AllocatorBase::IsLazilyCreated() const -{ - return m_isLazilyCreated; -} + const char* AllocatorBase::GetDescription() const + { + return m_desc; + } -void AllocatorBase::SetProfilingActive(bool active) -{ - m_isProfilingActive = active; -} + IAllocatorAllocate* AllocatorBase::GetSchema() + { + return nullptr; + } -bool AllocatorBase::IsProfilingActive() const -{ - return m_isProfilingActive; -} + Debug::AllocationRecords* AllocatorBase::GetRecords() + { + return m_records; + } -void AllocatorBase::DisableOverriding() -{ - m_canBeOverridden = false; -} + void AllocatorBase::SetRecords(Debug::AllocationRecords* records) + { + m_records = records; + m_memoryGuardSize = records ? records->MemoryGuardSize() : 0; + } -void AllocatorBase::DisableRegistration() -{ - m_registrationEnabled = false; -} + bool AllocatorBase::IsReady() const + { + return m_isReady; + } -void AllocatorBase::ProfileAllocation(void* ptr, size_t byteSize, size_t alignment, const char* name, const char* fileName, int lineNum, int suppressStackRecord) -{ + bool AllocatorBase::CanBeOverridden() const + { + return m_canBeOverridden; + } + + void AllocatorBase::PostCreate() + { + if (m_registrationEnabled) + { + if (AZ::Environment::IsReady()) + { + AllocatorManager::Instance().RegisterAllocator(this); + } + else + { + AllocatorManager::PreRegisterAllocator(this); + } + } + + const auto debugConfig = GetDebugConfig(); + if (!debugConfig.m_excludeFromDebugging) + { + SetRecords(aznew Debug::AllocationRecords( + (unsigned char)debugConfig.m_stackRecordLevels, debugConfig.m_usesMemoryGuards, debugConfig.m_marksUnallocatedMemory, + GetName())); + } + + m_isReady = true; + } + + void AllocatorBase::PreDestroy() + { + Debug::AllocationRecords* allocatorRecords = GetRecords(); + if (allocatorRecords) + { + delete allocatorRecords; + SetRecords(nullptr); + } + + if (m_registrationEnabled && AZ::AllocatorManager::IsReady()) + { + AllocatorManager::Instance().UnRegisterAllocator(this); + } + + m_isReady = false; + } + + void AllocatorBase::SetLazilyCreated(bool lazy) + { + m_isLazilyCreated = lazy; + } + + bool AllocatorBase::IsLazilyCreated() const + { + return m_isLazilyCreated; + } + + void AllocatorBase::SetProfilingActive(bool active) + { + m_isProfilingActive = active; + } + + bool AllocatorBase::IsProfilingActive() const + { + return m_isProfilingActive; + } + + void AllocatorBase::DisableOverriding() + { + m_canBeOverridden = false; + } + + void AllocatorBase::DisableRegistration() + { + m_registrationEnabled = false; + } + + void AllocatorBase::ProfileAllocation( + void* ptr, size_t byteSize, size_t alignment, const char* name, const char* fileName, int lineNum, int suppressStackRecord) + { #if defined(AZ_HAS_VARIADIC_TEMPLATES) && defined(AZ_DEBUG_BUILD) - ++suppressStackRecord; // one more for the fact the ebus is a function + ++suppressStackRecord; // one more for the fact the ebus is a function #endif // AZ_HAS_VARIADIC_TEMPLATES - if (m_isProfilingActive) - { -#if PLATFORM_MEMORY_INSTRUMENTATION_ENABLED - AZ::PlatformMemoryInstrumentation::Alloc(ptr, byteSize, 0, m_platformMemoryInstrumentationGroupId); -#else - EBUS_EVENT(AZ::Debug::MemoryDrillerBus, RegisterAllocation, this, ptr, byteSize, alignment, name, fileName, lineNum, suppressStackRecord); + if (m_isProfilingActive) + { + auto records = GetRecords(); + if (records) + { + records->RegisterAllocation(ptr, byteSize, alignment, name, fileName, lineNum, suppressStackRecord + 1); + } + } + +#if RECORDING_ENABLED + RecordAllocatorOperation(AllocatorOperation::ALLOCATE, ptr, byteSize, alignment); #endif } -} -void AllocatorBase::ProfileDeallocation(void* ptr, size_t byteSize, size_t alignment, Debug::AllocationInfo* info) -{ - if (m_isProfilingActive) + void AllocatorBase::ProfileDeallocation(void* ptr, size_t byteSize, size_t alignment, Debug::AllocationInfo* info) { -#if PLATFORM_MEMORY_INSTRUMENTATION_ENABLED - AZ::PlatformMemoryInstrumentation::Free(ptr); -#else - EBUS_EVENT(AZ::Debug::MemoryDrillerBus, UnregisterAllocation, this, ptr, byteSize, alignment, info); + if (m_isProfilingActive) + { + auto records = GetRecords(); + if (records) + { + records->UnregisterAllocation(ptr, byteSize, alignment, info); + } + } +#if RECORDING_ENABLED + RecordAllocatorOperation(AllocatorOperation::DEALLOCATE, ptr, byteSize, alignment); #endif } -} -void AllocatorBase::ProfileReallocationBegin(void* ptr, size_t newSize) -{ - if (m_isProfilingActive) + void AllocatorBase::ProfileReallocationBegin([[maybe_unused]] void* ptr, [[maybe_unused]] size_t newSize) { -#if PLATFORM_MEMORY_INSTRUMENTATION_ENABLED - AZ::PlatformMemoryInstrumentation::ReallocBegin(ptr, newSize, m_platformMemoryInstrumentationGroupId); -#else - // Driller API intensionally not called, only End is required. - AZ_UNUSED(ptr); - AZ_UNUSED(newSize); + } + + void AllocatorBase::ProfileReallocationEnd(void* ptr, void* newPtr, size_t newSize, size_t newAlignment) + { + if (m_isProfilingActive) + { + Debug::AllocationInfo info; + ProfileDeallocation(ptr, 0, 0, &info); + ProfileAllocation(newPtr, newSize, newAlignment, info.m_name, info.m_fileName, info.m_lineNum, 0); + } +#if RECORDING_ENABLED + RecordAllocatorOperation(AllocatorOperation::DEALLOCATE, ptr); + RecordAllocatorOperation(AllocatorOperation::ALLOCATE, newPtr, newSize, newAlignment); #endif } -} -void AllocatorBase::ProfileReallocationEnd(void* ptr, void* newPtr, size_t newSize, size_t newAlignment) -{ - if (m_isProfilingActive) + void AllocatorBase::ProfileReallocation(void* ptr, void* newPtr, size_t newSize, size_t newAlignment) { -#if PLATFORM_MEMORY_INSTRUMENTATION_ENABLED - AZ::PlatformMemoryInstrumentation::ReallocEnd(newPtr, newSize, 0); -#else - EBUS_EVENT(AZ::Debug::MemoryDrillerBus, ReallocateAllocation, this, ptr, newPtr, newSize, newAlignment); + ProfileReallocationEnd(ptr, newPtr, newSize, newAlignment); + } + + void AllocatorBase::ProfileResize(void* ptr, size_t newSize) + { + if (newSize && m_isProfilingActive) + { + auto records = GetRecords(); + if (records) + { + records->ResizeAllocation(ptr, newSize); + } + } +#if RECORDING_ENABLED + RecordAllocatorOperation(AllocatorOperation::ALLOCATE, ptr, newSize); #endif } -} -void AllocatorBase::ProfileReallocation(void* ptr, void* newPtr, size_t newSize, size_t newAlignment) -{ - ProfileReallocationEnd(ptr, newPtr, newSize, newAlignment); -} - -void AllocatorBase::ProfileResize(void* ptr, size_t newSize) -{ - if (newSize && m_isProfilingActive) + bool AllocatorBase::OnOutOfMemory(size_t byteSize, size_t alignment, int flags, const char* name, const char* fileName, int lineNum) { - EBUS_EVENT(AZ::Debug::MemoryDrillerBus, ResizeAllocation, this, ptr, newSize); + if (AllocatorManager::IsReady() && AllocatorManager::Instance().m_outOfMemoryListener) + { + AllocatorManager::Instance().m_outOfMemoryListener(this, byteSize, alignment, flags, name, fileName, lineNum); + return true; + } + return false; } -} -bool AllocatorBase::OnOutOfMemory(size_t byteSize, size_t alignment, int flags, const char* name, const char* fileName, int lineNum) -{ - if (AllocatorManager::IsReady() && AllocatorManager::Instance().m_outOfMemoryListener) - { - AllocatorManager::Instance().m_outOfMemoryListener(this, byteSize, alignment, flags, name, fileName, lineNum); - return true; - } - return false; -} +} // namespace AZ diff --git a/Code/Framework/AzCore/AzCore/Memory/AllocatorBase.h b/Code/Framework/AzCore/AzCore/Memory/AllocatorBase.h index 0502c25e5d..8f8a17e470 100644 --- a/Code/Framework/AzCore/AzCore/Memory/AllocatorBase.h +++ b/Code/Framework/AzCore/AzCore/Memory/AllocatorBase.h @@ -8,7 +8,6 @@ #pragma once #include -#include namespace AZ { @@ -103,16 +102,13 @@ namespace AZ const char* m_name = nullptr; const char* m_desc = nullptr; - Debug::AllocationRecords* m_records = nullptr; // Cached pointer to allocation records. Works together with the MemoryDriller. + Debug::AllocationRecords* m_records = nullptr; // Cached pointer to allocation records size_t m_memoryGuardSize = 0; bool m_isLazilyCreated = false; bool m_isProfilingActive = false; bool m_isReady = false; bool m_canBeOverridden = true; bool m_registrationEnabled = true; -#if PLATFORM_MEMORY_INSTRUMENTATION_ENABLED - uint16_t m_platformMemoryInstrumentationGroupId = 0; -#endif }; namespace Internal { diff --git a/Code/Framework/AzCore/AzCore/Memory/AllocatorManager.cpp b/Code/Framework/AzCore/AzCore/Memory/AllocatorManager.cpp index 3c09b4cae6..70ac813972 100644 --- a/Code/Framework/AzCore/AzCore/Memory/AllocatorManager.cpp +++ b/Code/Framework/AzCore/AzCore/Memory/AllocatorManager.cpp @@ -14,50 +14,47 @@ #include #include #include -#include #include #include #include -using namespace AZ; - #if !defined(RELEASE) && !defined(AZCORE_MEMORY_ENABLE_OVERRIDES) # define AZCORE_MEMORY_ENABLE_OVERRIDES #endif -namespace AZ +namespace AZ::Internal { - namespace Internal + struct AMStringHasher { - struct AMStringHasher + using is_transparent = void; + template + size_t operator()(const ConvertibleToStringView& key) { - using is_transparent = void; - template - size_t operator()(const ConvertibleToStringView& key) - { - return AZStd::hash{}(key); - } - }; - using AMString = AZStd::basic_string, AZStdIAllocator>; - using AllocatorNameMap = AZStd::unordered_map, AZStdIAllocator>; - using AllocatorRemappings = AZStd::unordered_map, AZStdIAllocator>; + return AZStd::hash{}(key); + } + }; + using AMString = AZStd::basic_string, AZStdIAllocator>; + using AllocatorNameMap = AZStd::unordered_map, AZStdIAllocator>; + using AllocatorRemappings = AZStd::unordered_map, AZStdIAllocator>; - // For allocators that are created before we have an environment, we keep some module-local data for them so that we can register them - // properly once the environment is attached. - struct PreEnvironmentAttachData - { - static const int MAX_UNREGISTERED_ALLOCATORS = 8; - AZStd::mutex m_mutex; - MallocSchema m_mallocSchema; - IAllocator* m_unregisteredAllocators[MAX_UNREGISTERED_ALLOCATORS]; - int m_unregisteredAllocatorCount = 0; - }; + // For allocators that are created before we have an environment, we keep some module-local data for them so that we can register them + // properly once the environment is attached. + struct PreEnvironmentAttachData + { + static const int MAX_UNREGISTERED_ALLOCATORS = 8; + AZStd::mutex m_mutex; + MallocSchema m_mallocSchema; + IAllocator* m_unregisteredAllocators[MAX_UNREGISTERED_ALLOCATORS]; + int m_unregisteredAllocatorCount = 0; + }; - } } -struct AZ::AllocatorManager::InternalData +namespace AZ +{ + +struct AllocatorManager::InternalData { explicit InternalData(const AZStdIAllocator& alloc) : m_allocatorMap(alloc) @@ -69,13 +66,13 @@ struct AZ::AllocatorManager::InternalData Internal::AllocatorRemappings m_remappingsReverse; }; -static AZ::EnvironmentVariable s_allocManager = nullptr; +static EnvironmentVariable s_allocManager = nullptr; static AllocatorManager* s_allocManagerDebug = nullptr; // For easier viewing in crash dumps /// Returns a module-local instance of data to use for allocators that are created before the environment is attached. -static AZ::Internal::PreEnvironmentAttachData& GetPreEnvironmentAttachData() +static Internal::PreEnvironmentAttachData& GetPreEnvironmentAttachData() { - static AZ::Internal::PreEnvironmentAttachData s_data; + static Internal::PreEnvironmentAttachData s_data; return s_data; } @@ -131,7 +128,7 @@ AllocatorManager& AllocatorManager::Instance() if (!s_allocManager) { AZ_Assert(Environment::IsReady(), "Environment must be ready before calling Instance()"); - s_allocManager = AZ::Environment::CreateVariable(AZ_CRC("AZ::AllocatorManager::s_allocManager", 0x6bdd908c)); + s_allocManager = Environment::CreateVariable(AZ_CRC_CE("AZ::AllocatorManager::s_allocManager")); // Register any allocators that were created in this module before we attached to the environment auto& data = GetPreEnvironmentAttachData(); @@ -156,9 +153,9 @@ AllocatorManager& AllocatorManager::Instance() ////////////////////////////////////////////////////////////////////////// // Create malloc schema using custom AZ_OS_MALLOC allocator. -AZ::MallocSchema* AllocatorManager::CreateMallocSchema() +MallocSchema* AllocatorManager::CreateMallocSchema() { - return static_cast(new(AZ_OS_MALLOC(sizeof(AZ::MallocSchema), alignof(AZ::MallocSchema))) AZ::MallocSchema()); + return static_cast(new(AZ_OS_MALLOC(sizeof(MallocSchema), alignof(MallocSchema))) MallocSchema()); } @@ -168,7 +165,7 @@ AZ::MallocSchema* AllocatorManager::CreateMallocSchema() //========================================================================= AllocatorManager::AllocatorManager() : m_profilingRefcount(0) - , m_mallocSchema(CreateMallocSchema(), [](AZ::MallocSchema* schema) + , m_mallocSchema(CreateMallocSchema(), [](MallocSchema* schema) { if (schema) { @@ -182,7 +179,7 @@ AllocatorManager::AllocatorManager() m_numAllocators = 0; m_isAllocatorLeaking = false; m_configurationFinalized = false; - m_defaultTrackingRecordMode = AZ::Debug::AllocationRecords::RECORD_NO_RECORDS; + m_defaultTrackingRecordMode = Debug::AllocationRecords::RECORD_NO_RECORDS; m_data = new (m_mallocSchema->Allocate(sizeof(InternalData), AZStd::alignment_of::value, 0)) InternalData(AZStdIAllocator(m_mallocSchema.get())); } @@ -217,8 +214,6 @@ AllocatorManager::RegisterAllocator(class IAllocator* alloc) #ifdef AZCORE_MEMORY_ENABLE_OVERRIDES ConfigureAllocatorOverrides(alloc); #endif - - EBUS_EVENT(Debug::MemoryDrillerBus, RegisterAllocator, alloc); } //========================================================================= @@ -321,11 +316,6 @@ AllocatorManager::UnRegisterAllocator(class IAllocator* alloc) { AZStd::lock_guard lock(m_allocatorListMutex); - if (alloc->GetRecords()) - { - EBUS_EVENT(Debug::MemoryDrillerBus, UnregisterAllocator, alloc); - } - for (int i = 0; i < m_numAllocators; ++i) { if (m_allocators[i] == alloc) @@ -411,12 +401,12 @@ AllocatorManager::RemoveOutOfMemoryListener() // [9/16/2011] //========================================================================= void -AllocatorManager::SetTrackingMode(AZ::Debug::AllocationRecords::Mode mode) +AllocatorManager::SetTrackingMode(Debug::AllocationRecords::Mode mode) { AZStd::lock_guard lock(m_allocatorListMutex); for (int i = 0; i < m_numAllocators; ++i) { - AZ::Debug::AllocationRecords* records = m_allocators[i]->GetRecords(); + Debug::AllocationRecords* records = m_allocators[i]->GetRecords(); if (records) { records->SetMode(mode); @@ -595,31 +585,31 @@ void AllocatorManager::GetAllocatorStats(size_t& allocatedBytes, size_t& capacit AZStd::lock_guard lock(m_allocatorListMutex); const int allocatorCount = GetNumAllocators(); - AZStd::unordered_map existingAllocators; - AZStd::unordered_map sourcesToAllocators; + AZStd::unordered_map existingAllocators; + AZStd::unordered_map sourcesToAllocators; // Build a mapping of original allocator sources to their allocators for (int i = 0; i < allocatorCount; ++i) { - AZ::IAllocator* allocator = GetAllocator(i); + IAllocator* allocator = GetAllocator(i); sourcesToAllocators.emplace(allocator->GetOriginalAllocationSource(), allocator); } for (int i = 0; i < allocatorCount; ++i) { - AZ::IAllocator* allocator = GetAllocator(i); - AZ::IAllocatorAllocate* source = allocator->GetAllocationSource(); - AZ::IAllocatorAllocate* originalSource = allocator->GetOriginalAllocationSource(); - AZ::IAllocatorAllocate* schema = allocator->GetSchema(); - AZ::IAllocator* alias = (source != originalSource) ? sourcesToAllocators[source] : nullptr; + IAllocator* allocator = GetAllocator(i); + IAllocatorAllocate* source = allocator->GetAllocationSource(); + IAllocatorAllocate* originalSource = allocator->GetOriginalAllocationSource(); + IAllocatorAllocate* schema = allocator->GetSchema(); + IAllocator* alias = (source != originalSource) ? sourcesToAllocators[source] : nullptr; if (schema && !alias) { // Check to see if this allocator's source maps to another allocator // Need to check both the schema and the allocator itself, as either one might be used as the alias depending on how it's implemented - AZStd::array checkAllocators = { { schema, allocator->GetAllocationSource() } }; + AZStd::array checkAllocators = { { schema, allocator->GetAllocationSource() } }; - for (AZ::IAllocatorAllocate* check : checkAllocators) + for (IAllocatorAllocate* check : checkAllocators) { auto existing = existingAllocators.emplace(check, allocator); @@ -631,7 +621,7 @@ void AllocatorManager::GetAllocatorStats(size_t& allocatedBytes, size_t& capacit } } - static const AZ::IAllocator* OS_ALLOCATOR = &AZ::AllocatorInstance::GetAllocator(); + static const IAllocator* OS_ALLOCATOR = &AllocatorInstance::GetAllocator(); size_t sourceAllocatedBytes = source->NumAllocatedBytes(); size_t sourceCapacityBytes = source->Capacity(); @@ -742,3 +732,5 @@ AllocatorManager::DebugBreak(void* address, const Debug::AllocationInfo& info) } } } + +} // namespace AZ diff --git a/Code/Framework/AzCore/AzCore/Memory/AllocatorOverrideShim.cpp b/Code/Framework/AzCore/AzCore/Memory/AllocatorOverrideShim.cpp index 154d59edd3..e4928e83c5 100644 --- a/Code/Framework/AzCore/AzCore/Memory/AllocatorOverrideShim.cpp +++ b/Code/Framework/AzCore/AzCore/Memory/AllocatorOverrideShim.cpp @@ -8,223 +8,220 @@ #include -namespace AZ +namespace AZ::Internal { - namespace Internal + AllocatorOverrideShim* AllocatorOverrideShim::Create(IAllocator* owningAllocator, IAllocatorAllocate* shimAllocationSource) { - AllocatorOverrideShim* AllocatorOverrideShim::Create(IAllocator* owningAllocator, IAllocatorAllocate* shimAllocationSource) + void* memory = shimAllocationSource->Allocate(sizeof(AllocatorOverrideShim), AZStd::alignment_of::value, 0); + auto result = new (memory) AllocatorOverrideShim(owningAllocator, shimAllocationSource); + return result; + } + + void AllocatorOverrideShim::Destroy(AllocatorOverrideShim* source) + { + auto shimAllocationSource = source->m_shimAllocationSource; + source->~AllocatorOverrideShim(); + shimAllocationSource->DeAllocate(source); + } + + AllocatorOverrideShim::AllocatorOverrideShim(IAllocator* owningAllocator, IAllocatorAllocate* shimAllocationSource) + : m_owningAllocator(owningAllocator) + , m_source(owningAllocator->GetOriginalAllocationSource()) + , m_overridingSource(owningAllocator->GetOriginalAllocationSource()) + , m_shimAllocationSource(shimAllocationSource) + , m_records(typename AllocationSet::hasher(), typename AllocationSet::key_eq(), StdAllocationSrc(shimAllocationSource)) + { + } + + void AllocatorOverrideShim::SetOverride(IAllocatorAllocate* source) + { + m_overridingSource = source; + } + + IAllocatorAllocate* AllocatorOverrideShim::GetOverride() const + { + return m_overridingSource; + } + + bool AllocatorOverrideShim::IsOverridden() const + { + return m_source != m_overridingSource; + } + + bool AllocatorOverrideShim::HasOrphanedAllocations() const + { + return !m_records.empty(); + } + + void AllocatorOverrideShim::SetFinalizedConfiguration() + { + m_finalizedConfiguration = true; + } + + typename AllocatorOverrideShim::pointer_type AllocatorOverrideShim::Allocate(size_type byteSize, size_type alignment, int flags, const char* name, const char* fileName, int lineNum, unsigned int suppressStackRecord) + { + pointer_type ptr = m_overridingSource->Allocate(byteSize, alignment, flags, name, fileName, lineNum, suppressStackRecord); + + if (!IsOverridden()) { - void* memory = shimAllocationSource->Allocate(sizeof(AllocatorOverrideShim), AZStd::alignment_of::value, 0); - auto result = new (memory) AllocatorOverrideShim(owningAllocator, shimAllocationSource); - return result; + lock_type lock(m_mutex); + m_records.insert(ptr); // Record in case we need to orphan this allocation later } - void AllocatorOverrideShim::Destroy(AllocatorOverrideShim* source) + return ptr; + } + + void AllocatorOverrideShim::DeAllocate(pointer_type ptr, size_type byteSize, size_type alignment) + { + IAllocatorAllocate* source = m_overridingSource; + bool destroy = false; + { - auto shimAllocationSource = source->m_shimAllocationSource; - source->~AllocatorOverrideShim(); - shimAllocationSource->DeAllocate(source); + lock_type lock(m_mutex); + + // Check to see if this came from a prior allocation source + if (m_records.erase(ptr) && IsOverridden()) + { + source = m_source; + + if (m_records.empty() && m_finalizedConfiguration) + { + // All orphaned records are gone; we are no longer needed + m_owningAllocator->SetAllocationSource(m_overridingSource); + destroy = true; // Must destroy outside the lock + } + } } - AllocatorOverrideShim::AllocatorOverrideShim(IAllocator* owningAllocator, IAllocatorAllocate* shimAllocationSource) - : m_owningAllocator(owningAllocator) - , m_source(owningAllocator->GetOriginalAllocationSource()) - , m_overridingSource(owningAllocator->GetOriginalAllocationSource()) - , m_shimAllocationSource(shimAllocationSource) - , m_records(typename AllocationSet::hasher(), typename AllocationSet::key_eq(), StdAllocationSrc(shimAllocationSource)) + source->DeAllocate(ptr, byteSize, alignment); + + if (destroy) { + Destroy(this); + } + } + + typename AllocatorOverrideShim::size_type AllocatorOverrideShim::Resize(pointer_type ptr, size_type newSize) + { + IAllocatorAllocate* source = m_overridingSource; + + if (IsOverridden()) + { + // Determine who owns the allocation + lock_type lock(m_mutex); + + if (m_records.count(ptr)) + { + source = m_source; + } } - void AllocatorOverrideShim::SetOverride(IAllocatorAllocate* source) + size_t result = source->Resize(ptr, newSize); + + return result; + } + + typename AllocatorOverrideShim::pointer_type AllocatorOverrideShim::ReAllocate(pointer_type ptr, size_type newSize, size_type newAlignment) + { + pointer_type newPtr = nullptr; + bool useOverride = true; + bool destroy = false; + + if (IsOverridden()) { - m_overridingSource = source; + lock_type lock(m_mutex); + + if (m_records.erase(ptr)) + { + // An old allocation needs to be transferred to the new, overriding allocator. + useOverride = false; // We'll do the reallocation here + size_t oldSize = m_source->AllocationSize(ptr); + + if (newSize) + { + newPtr = m_overridingSource->Allocate(newSize, newAlignment, 0); + memcpy(newPtr, ptr, AZStd::min(newSize, oldSize)); + } + + m_source->DeAllocate(ptr, oldSize); + + if (m_records.empty() && m_finalizedConfiguration) + { + // All orphaned records are gone; we are no longer needed + m_owningAllocator->SetAllocationSource(m_overridingSource); + destroy = true; // Must destroy outside the lock + } + } } - IAllocatorAllocate* AllocatorOverrideShim::GetOverride() const + if (useOverride) { - return m_overridingSource; - } - - bool AllocatorOverrideShim::IsOverridden() const - { - return m_source != m_overridingSource; - } - - bool AllocatorOverrideShim::HasOrphanedAllocations() const - { - return !m_records.empty(); - } - - void AllocatorOverrideShim::SetFinalizedConfiguration() - { - m_finalizedConfiguration = true; - } - - typename AllocatorOverrideShim::pointer_type AllocatorOverrideShim::Allocate(size_type byteSize, size_type alignment, int flags, const char* name, const char* fileName, int lineNum, unsigned int suppressStackRecord) - { - pointer_type ptr = m_overridingSource->Allocate(byteSize, alignment, flags, name, fileName, lineNum, suppressStackRecord); + // Default behavior, we weren't deleting an old allocation + newPtr = m_overridingSource->ReAllocate(ptr, newSize, newAlignment); if (!IsOverridden()) { + // Still need to do bookkeeping if we haven't been overridden yet lock_type lock(m_mutex); - m_records.insert(ptr); // Record in case we need to orphan this allocation later - } - - return ptr; - } - - void AllocatorOverrideShim::DeAllocate(pointer_type ptr, size_type byteSize, size_type alignment) - { - IAllocatorAllocate* source = m_overridingSource; - bool destroy = false; - - { - lock_type lock(m_mutex); - - // Check to see if this came from a prior allocation source - if (m_records.erase(ptr) && IsOverridden()) - { - source = m_source; - - if (m_records.empty() && m_finalizedConfiguration) - { - // All orphaned records are gone; we are no longer needed - m_owningAllocator->SetAllocationSource(m_overridingSource); - destroy = true; // Must destroy outside the lock - } - } - } - - source->DeAllocate(ptr, byteSize, alignment); - - if (destroy) - { - Destroy(this); + m_records.erase(ptr); + m_records.insert(newPtr); } } - typename AllocatorOverrideShim::size_type AllocatorOverrideShim::Resize(pointer_type ptr, size_type newSize) + if (destroy) { - IAllocatorAllocate* source = m_overridingSource; - - if (IsOverridden()) - { - // Determine who owns the allocation - lock_type lock(m_mutex); - - if (m_records.count(ptr)) - { - source = m_source; - } - } - - size_t result = source->Resize(ptr, newSize); - - return result; - } - - typename AllocatorOverrideShim::pointer_type AllocatorOverrideShim::ReAllocate(pointer_type ptr, size_type newSize, size_type newAlignment) - { - pointer_type newPtr = nullptr; - bool useOverride = true; - bool destroy = false; - - if (IsOverridden()) - { - lock_type lock(m_mutex); - - if (m_records.erase(ptr)) - { - // An old allocation needs to be transferred to the new, overriding allocator. - useOverride = false; // We'll do the reallocation here - size_t oldSize = m_source->AllocationSize(ptr); - - if (newSize) - { - newPtr = m_overridingSource->Allocate(newSize, newAlignment, 0); - memcpy(newPtr, ptr, AZStd::min(newSize, oldSize)); - } - - m_source->DeAllocate(ptr, oldSize); - - if (m_records.empty() && m_finalizedConfiguration) - { - // All orphaned records are gone; we are no longer needed - m_owningAllocator->SetAllocationSource(m_overridingSource); - destroy = true; // Must destroy outside the lock - } - } - } - - if (useOverride) - { - // Default behavior, we weren't deleting an old allocation - newPtr = m_overridingSource->ReAllocate(ptr, newSize, newAlignment); - - if (!IsOverridden()) - { - // Still need to do bookkeeping if we haven't been overridden yet - lock_type lock(m_mutex); - m_records.erase(ptr); - m_records.insert(newPtr); - } - } - - if (destroy) - { - Destroy(this); - } - - return newPtr; - } - - typename AllocatorOverrideShim::size_type AllocatorOverrideShim::AllocationSize(pointer_type ptr) - { - IAllocatorAllocate* source = m_overridingSource; - - if (IsOverridden()) - { - // Determine who owns the allocation - lock_type lock(m_mutex); - - if (m_records.count(ptr)) - { - source = m_source; - } - } - - return source->AllocationSize(ptr); - } - - void AllocatorOverrideShim::GarbageCollect() - { - m_source->GarbageCollect(); - } - - typename AllocatorOverrideShim::size_type AllocatorOverrideShim::NumAllocatedBytes() const - { - return m_source->NumAllocatedBytes(); - } - - typename AllocatorOverrideShim::size_type AllocatorOverrideShim::Capacity() const - { - return m_source->Capacity(); - } - - typename AllocatorOverrideShim::size_type AllocatorOverrideShim::GetMaxAllocationSize() const - { - return m_source->GetMaxAllocationSize(); - } - - auto AllocatorOverrideShim::GetMaxContiguousAllocationSize() const -> size_type - { - return m_source->GetMaxContiguousAllocationSize(); - } - - IAllocatorAllocate* AllocatorOverrideShim::GetSubAllocator() - { - return m_source->GetSubAllocator(); + Destroy(this); } + return newPtr; } -} + + typename AllocatorOverrideShim::size_type AllocatorOverrideShim::AllocationSize(pointer_type ptr) + { + IAllocatorAllocate* source = m_overridingSource; + + if (IsOverridden()) + { + // Determine who owns the allocation + lock_type lock(m_mutex); + + if (m_records.count(ptr)) + { + source = m_source; + } + } + + return source->AllocationSize(ptr); + } + + void AllocatorOverrideShim::GarbageCollect() + { + m_source->GarbageCollect(); + } + + typename AllocatorOverrideShim::size_type AllocatorOverrideShim::NumAllocatedBytes() const + { + return m_source->NumAllocatedBytes(); + } + + typename AllocatorOverrideShim::size_type AllocatorOverrideShim::Capacity() const + { + return m_source->Capacity(); + } + + typename AllocatorOverrideShim::size_type AllocatorOverrideShim::GetMaxAllocationSize() const + { + return m_source->GetMaxAllocationSize(); + } + + auto AllocatorOverrideShim::GetMaxContiguousAllocationSize() const -> size_type + { + return m_source->GetMaxContiguousAllocationSize(); + } + + IAllocatorAllocate* AllocatorOverrideShim::GetSubAllocator() + { + return m_source->GetSubAllocator(); + } + +} // namespace AZ::Internal diff --git a/Code/Framework/AzCore/AzCore/Memory/BestFitExternalMapAllocator.cpp b/Code/Framework/AzCore/AzCore/Memory/BestFitExternalMapAllocator.cpp index ca414df4b5..d55ca8b695 100644 --- a/Code/Framework/AzCore/AzCore/Memory/BestFitExternalMapAllocator.cpp +++ b/Code/Framework/AzCore/AzCore/Memory/BestFitExternalMapAllocator.cpp @@ -10,195 +10,185 @@ #include #include -#include #include -using namespace AZ; - -//========================================================================= -// BestFitExternalMapAllocator -// [1/28/2011] -//========================================================================= -BestFitExternalMapAllocator::BestFitExternalMapAllocator() - : AllocatorBase(this, "BestFitExternalMapAllocator", "Best fit allocator with external tracking storage!") - , m_schema(nullptr) -{} - -//========================================================================= -// Create -// [1/28/2011] -//========================================================================= -bool -BestFitExternalMapAllocator::Create(const Descriptor& desc) +namespace AZ { - AZ_Assert(IsReady() == false, "BestFitExternalMapAllocator was already created!"); - if (IsReady()) + //========================================================================= + // BestFitExternalMapAllocator + // [1/28/2011] + //========================================================================= + BestFitExternalMapAllocator::BestFitExternalMapAllocator() + : AllocatorBase(this, "BestFitExternalMapAllocator", "Best fit allocator with external tracking storage!") + , m_schema(nullptr) { - return false; } - bool isReady = true; - - m_desc = desc; - BestFitExternalMapSchema::Descriptor schemaDesc; - schemaDesc.m_mapAllocator = desc.m_mapAllocator; - schemaDesc.m_memoryBlock = desc.m_memoryBlock; - schemaDesc.m_memoryBlockByteSize = desc.m_memoryBlockByteSize; - - m_schema = azcreate(BestFitExternalMapSchema, (schemaDesc), SystemAllocator); - if (m_schema == nullptr) + //========================================================================= + // Create + // [1/28/2011] + //========================================================================= + bool BestFitExternalMapAllocator::Create(const Descriptor& desc) { - isReady = false; - } - - return isReady; -} - -//========================================================================= -// Destroy -// [1/28/2011] -//========================================================================= -void -BestFitExternalMapAllocator::Destroy() -{ - azdestroy(m_schema, SystemAllocator); - m_schema = nullptr; -} - -AllocatorDebugConfig BestFitExternalMapAllocator::GetDebugConfig() -{ - return AllocatorDebugConfig() - .ExcludeFromDebugging(!m_desc.m_allocationRecords) - .StackRecordLevels(m_desc.m_stackRecordLevels) - .MarksUnallocatedMemory(false) - .UsesMemoryGuards(false); -} - -//========================================================================= -// Allocate -// [1/28/2011] -//========================================================================= -BestFitExternalMapAllocator::pointer_type -BestFitExternalMapAllocator::Allocate(size_type byteSize, size_type alignment, int flags, const char* name, const char* fileName, int lineNum, unsigned int suppressStackRecord) -{ - (void)suppressStackRecord; - - AZ_Assert(byteSize > 0, "You can not allocate 0 bytes!"); - AZ_Assert((alignment & (alignment - 1)) == 0, "Alignment must be power of 2!"); - byteSize = MemorySizeAdjustedUp(byteSize); - - BestFitExternalMapAllocator::pointer_type address = m_schema->Allocate(byteSize, alignment, flags); - if (address == nullptr) - { - if (!OnOutOfMemory(byteSize, alignment, flags, name, fileName, lineNum)) + AZ_Assert(IsReady() == false, "BestFitExternalMapAllocator was already created!"); + if (IsReady()) { - if (GetRecords()) - { - EBUS_EVENT(Debug::MemoryDrillerBus, DumpAllAllocations); - } + return false; } + + bool isReady = true; + + m_desc = desc; + BestFitExternalMapSchema::Descriptor schemaDesc; + schemaDesc.m_mapAllocator = desc.m_mapAllocator; + schemaDesc.m_memoryBlock = desc.m_memoryBlock; + schemaDesc.m_memoryBlockByteSize = desc.m_memoryBlockByteSize; + + m_schema = azcreate(BestFitExternalMapSchema, (schemaDesc), SystemAllocator); + if (m_schema == nullptr) + { + isReady = false; + } + + return isReady; } - AZ_Assert(address != nullptr, "BestFitExternalMapAllocator: Failed to allocate %d bytes aligned on %d (flags: 0x%08x) %s : %s (%d)!", byteSize, alignment, flags, name ? name : "(no name)", fileName ? fileName : "(no file name)", lineNum); - AZ_MEMORY_PROFILE(ProfileAllocation(address, byteSize, alignment, name, fileName, lineNum, suppressStackRecord + 1)); + //========================================================================= + // Destroy + // [1/28/2011] + //========================================================================= + void BestFitExternalMapAllocator::Destroy() + { + azdestroy(m_schema, SystemAllocator); + m_schema = nullptr; + } - return address; -} + AllocatorDebugConfig BestFitExternalMapAllocator::GetDebugConfig() + { + return AllocatorDebugConfig() + .ExcludeFromDebugging(!m_desc.m_allocationRecords) + .StackRecordLevels(m_desc.m_stackRecordLevels) + .MarksUnallocatedMemory(false) + .UsesMemoryGuards(false); + } -//========================================================================= -// DeAllocate -// [1/28/2011] -//========================================================================= -void -BestFitExternalMapAllocator::DeAllocate(pointer_type ptr, size_type byteSize, size_type alignment) -{ - byteSize = MemorySizeAdjustedUp(byteSize); - AZ_MEMORY_PROFILE(ProfileDeallocation(ptr, byteSize, alignment, nullptr)); + //========================================================================= + // Allocate + // [1/28/2011] + //========================================================================= + BestFitExternalMapAllocator::pointer_type BestFitExternalMapAllocator::Allocate( + size_type byteSize, + size_type alignment, + int flags, + [[maybe_unused]] const char* name, + [[maybe_unused]] const char* fileName, + [[maybe_unused]] int lineNum, + unsigned int suppressStackRecord) + { + (void)suppressStackRecord; - (void)byteSize; - (void)alignment; - m_schema->DeAllocate(ptr); -} + AZ_Assert(byteSize > 0, "You can not allocate 0 bytes!"); + AZ_Assert((alignment & (alignment - 1)) == 0, "Alignment must be power of 2!"); + byteSize = MemorySizeAdjustedUp(byteSize); -//========================================================================= -// Resize -// [1/28/2011] -//========================================================================= -BestFitExternalMapAllocator::size_type -BestFitExternalMapAllocator::Resize(pointer_type ptr, size_type newSize) -{ - (void)ptr; - (void)newSize; - /* todo */ - return 0; -} + BestFitExternalMapAllocator::pointer_type address = m_schema->Allocate(byteSize, alignment, flags); + AZ_Assert( + address != nullptr, "BestFitExternalMapAllocator: Failed to allocate %d bytes aligned on %d (flags: 0x%08x) %s : %s (%d)!", + byteSize, alignment, flags, name ? name : "(no name)", fileName ? fileName : "(no file name)", lineNum); + AZ_MEMORY_PROFILE(ProfileAllocation(address, byteSize, alignment, name, fileName, lineNum, suppressStackRecord + 1)); -//========================================================================= -// ReAllocate -// [9/13/2011] -//========================================================================= -BestFitExternalMapAllocator::pointer_type -BestFitExternalMapAllocator::ReAllocate(pointer_type ptr, size_type newSize, size_type newAlignment) -{ - (void)ptr; - (void)newSize; - (void)newAlignment; - AZ_Assert(false, "Not supported!"); - return nullptr; -} + return address; + } -//========================================================================= -// AllocationSize -// [1/28/2011] -//========================================================================= -BestFitExternalMapAllocator::size_type -BestFitExternalMapAllocator::AllocationSize(pointer_type ptr) -{ - return MemorySizeAdjustedDown(m_schema->AllocationSize(ptr)); -} + //========================================================================= + // DeAllocate + // [1/28/2011] + //========================================================================= + void BestFitExternalMapAllocator::DeAllocate(pointer_type ptr, size_type byteSize, size_type alignment) + { + byteSize = MemorySizeAdjustedUp(byteSize); + AZ_MEMORY_PROFILE(ProfileDeallocation(ptr, byteSize, alignment, nullptr)); -//========================================================================= -// NumAllocatedBytes -// [1/28/2011] -//========================================================================= -BestFitExternalMapAllocator::size_type -BestFitExternalMapAllocator::NumAllocatedBytes() const -{ - return m_schema->NumAllocatedBytes(); -} + (void)byteSize; + (void)alignment; + m_schema->DeAllocate(ptr); + } -//========================================================================= -// Capacity -// [1/28/2011] -//========================================================================= -BestFitExternalMapAllocator::size_type -BestFitExternalMapAllocator::Capacity() const -{ - return m_schema->Capacity(); -} + //========================================================================= + // Resize + // [1/28/2011] + //========================================================================= + BestFitExternalMapAllocator::size_type BestFitExternalMapAllocator::Resize(pointer_type ptr, size_type newSize) + { + (void)ptr; + (void)newSize; + /* todo */ + return 0; + } -//========================================================================= -// GetMaxAllocationSize -// [1/28/2011] -//========================================================================= -BestFitExternalMapAllocator::size_type -BestFitExternalMapAllocator::GetMaxAllocationSize() const -{ - return m_schema->GetMaxAllocationSize(); -} + //========================================================================= + // ReAllocate + // [9/13/2011] + //========================================================================= + BestFitExternalMapAllocator::pointer_type BestFitExternalMapAllocator::ReAllocate( + pointer_type ptr, size_type newSize, size_type newAlignment) + { + (void)ptr; + (void)newSize; + (void)newAlignment; + AZ_Assert(false, "Not supported!"); + return nullptr; + } -auto BestFitExternalMapAllocator::GetMaxContiguousAllocationSize() const -> size_type -{ - return m_schema->GetMaxContiguousAllocationSize(); -} + //========================================================================= + // AllocationSize + // [1/28/2011] + //========================================================================= + BestFitExternalMapAllocator::size_type BestFitExternalMapAllocator::AllocationSize(pointer_type ptr) + { + return MemorySizeAdjustedDown(m_schema->AllocationSize(ptr)); + } -//========================================================================= -// GetSubAllocator -// [1/28/2011] -//========================================================================= -IAllocatorAllocate* -BestFitExternalMapAllocator::GetSubAllocator() -{ - return m_schema->GetSubAllocator(); -} + //========================================================================= + // NumAllocatedBytes + // [1/28/2011] + //========================================================================= + BestFitExternalMapAllocator::size_type BestFitExternalMapAllocator::NumAllocatedBytes() const + { + return m_schema->NumAllocatedBytes(); + } + + //========================================================================= + // Capacity + // [1/28/2011] + //========================================================================= + BestFitExternalMapAllocator::size_type BestFitExternalMapAllocator::Capacity() const + { + return m_schema->Capacity(); + } + + //========================================================================= + // GetMaxAllocationSize + // [1/28/2011] + //========================================================================= + BestFitExternalMapAllocator::size_type BestFitExternalMapAllocator::GetMaxAllocationSize() const + { + return m_schema->GetMaxAllocationSize(); + } + + auto BestFitExternalMapAllocator::GetMaxContiguousAllocationSize() const -> size_type + { + return m_schema->GetMaxContiguousAllocationSize(); + } + + //========================================================================= + // GetSubAllocator + // [1/28/2011] + //========================================================================= + IAllocatorAllocate* BestFitExternalMapAllocator::GetSubAllocator() + { + return m_schema->GetSubAllocator(); + } + +} // namespace AZ diff --git a/Code/Framework/AzCore/AzCore/Memory/BestFitExternalMapAllocator.h b/Code/Framework/AzCore/AzCore/Memory/BestFitExternalMapAllocator.h index 17425625b7..90e2056d65 100644 --- a/Code/Framework/AzCore/AzCore/Memory/BestFitExternalMapAllocator.h +++ b/Code/Framework/AzCore/AzCore/Memory/BestFitExternalMapAllocator.h @@ -5,8 +5,7 @@ * SPDX-License-Identifier: Apache-2.0 OR MIT * */ -#ifndef AZ_BEST_FIT_EXT_MAP_ALLOCATOR_H -#define AZ_BEST_FIT_EXT_MAP_ALLOCATOR_H +#pragma once #include @@ -76,7 +75,3 @@ namespace AZ }; } -#endif // AZ_BEST_FIT_EXT_MAP_ALLOCATOR_H -#pragma once - - diff --git a/Code/Framework/AzCore/AzCore/Memory/BestFitExternalMapSchema.cpp b/Code/Framework/AzCore/AzCore/Memory/BestFitExternalMapSchema.cpp index 715ecd221e..841f36f58a 100644 --- a/Code/Framework/AzCore/AzCore/Memory/BestFitExternalMapSchema.cpp +++ b/Code/Framework/AzCore/AzCore/Memory/BestFitExternalMapSchema.cpp @@ -9,194 +9,199 @@ #include #include -using namespace AZ; - -//========================================================================= -// BestFitExternalMapSchema -// [1/28/2011] -//========================================================================= -BestFitExternalMapSchema::BestFitExternalMapSchema(const Descriptor& desc) - : m_desc(desc) - , m_used(0) - , m_freeChunksMap(FreeMapType::key_compare(), AZStdIAllocator(desc.m_mapAllocator != nullptr ? desc.m_mapAllocator : &AllocatorInstance::Get())) - , m_allocChunksMap(AllocMapType::hasher(), AllocMapType::key_eq(), AZStdIAllocator(desc.m_mapAllocator != nullptr ? desc.m_mapAllocator : &AllocatorInstance::Get())) +namespace AZ { - if (m_desc.m_mapAllocator == nullptr) + //========================================================================= + // BestFitExternalMapSchema + // [1/28/2011] + //========================================================================= + BestFitExternalMapSchema::BestFitExternalMapSchema(const Descriptor& desc) + : m_desc(desc) + , m_used(0) + , m_freeChunksMap( + FreeMapType::key_compare(), + AZStdIAllocator(desc.m_mapAllocator != nullptr ? desc.m_mapAllocator : &AllocatorInstance::Get())) + , m_allocChunksMap( + AllocMapType::hasher(), + AllocMapType::key_eq(), + AZStdIAllocator(desc.m_mapAllocator != nullptr ? desc.m_mapAllocator : &AllocatorInstance::Get())) { - m_desc.m_mapAllocator = &AllocatorInstance::Get(); // used as our sub allocator - } - AZ_Assert(m_desc.m_memoryBlockByteSize > 0, "You must provide memory block size!"); - AZ_Assert(m_desc.m_memoryBlock != nullptr, "You must provide memory block allocated as you with!"); - //if( m_desc.m_memoryBlock == NULL) there is no point to automate this cause we need to flag this memory special, otherwise there is no point to use this allocator at all - // m_desc.m_memoryBlock = azmalloc(SystemAllocator,m_desc.m_memoryBlockByteSize,16); - m_freeChunksMap.insert(AZStd::make_pair(m_desc.m_memoryBlockByteSize, reinterpret_cast(m_desc.m_memoryBlock))); -} - -//========================================================================= -// Allocate -// [1/28/2011] -//========================================================================= -BestFitExternalMapSchema::pointer_type -BestFitExternalMapSchema::Allocate(size_type byteSize, size_type alignment, int flags) -{ - (void)flags; - char* address = nullptr; - AZ_Assert(alignment > 0 && (alignment & (alignment - 1)) == 0, "Alignment must be >0 and power of 2!"); - for (int i = 0; i < 2; ++i) // max 2 attempts to allocate - { - FreeMapType::iterator iter = m_freeChunksMap.find(byteSize); - size_t blockSize = 0; - char* blockAddress = nullptr; - size_t preAllocBlockSize = 0; - while (iter != m_freeChunksMap.end()) + if (m_desc.m_mapAllocator == nullptr) { - blockSize = iter->first; - blockAddress = iter->second; - char* alignedAddr = PointerAlignUp(blockAddress, alignment); - preAllocBlockSize = alignedAddr - blockAddress; - if (preAllocBlockSize + byteSize <= blockSize) - { - m_freeChunksMap.erase(iter); // we have our allocation - m_used += byteSize; - address = alignedAddr; - m_allocChunksMap.insert(AZStd::make_pair(address, byteSize)); - break; - } - ++iter; + m_desc.m_mapAllocator = &AllocatorInstance::Get(); // used as our sub allocator } - if (address != nullptr) + AZ_Assert(m_desc.m_memoryBlockByteSize > 0, "You must provide memory block size!"); + AZ_Assert(m_desc.m_memoryBlock != nullptr, "You must provide memory block allocated as you with!"); + // if( m_desc.m_memoryBlock == NULL) there is no point to automate this cause we need to flag this memory special, otherwise there + // is no point to use this allocator at all + // m_desc.m_memoryBlock = azmalloc(SystemAllocator,m_desc.m_memoryBlockByteSize,16); + m_freeChunksMap.insert(AZStd::make_pair(m_desc.m_memoryBlockByteSize, reinterpret_cast(m_desc.m_memoryBlock))); + } + + //========================================================================= + // Allocate + // [1/28/2011] + //========================================================================= + BestFitExternalMapSchema::pointer_type BestFitExternalMapSchema::Allocate(size_type byteSize, size_type alignment, int flags) + { + (void)flags; + char* address = nullptr; + AZ_Assert(alignment > 0 && (alignment & (alignment - 1)) == 0, "Alignment must be >0 and power of 2!"); + for (int i = 0; i < 2; ++i) // max 2 attempts to allocate { - // split blocks - if (preAllocBlockSize) // if we have a block before the alignment + FreeMapType::iterator iter = m_freeChunksMap.find(byteSize); + size_t blockSize = 0; + char* blockAddress = nullptr; + size_t preAllocBlockSize = 0; + while (iter != m_freeChunksMap.end()) { - m_freeChunksMap.insert(AZStd::make_pair(preAllocBlockSize, blockAddress)); - } - size_t postAllocBlockSize = blockSize - preAllocBlockSize - byteSize; - if (postAllocBlockSize) - { - m_freeChunksMap.insert(AZStd::make_pair(postAllocBlockSize, address + byteSize)); - } - - break; - } - else - { - GarbageCollect(); - } - } - return address; -} - -//========================================================================= -// DeAllocate -// [1/28/2011] -//========================================================================= -void -BestFitExternalMapSchema::DeAllocate(pointer_type ptr) -{ - if (ptr == nullptr) - { - return; - } - AllocMapType::iterator iter = m_allocChunksMap.find(reinterpret_cast(ptr)); - if (iter != m_allocChunksMap.end()) - { - m_used -= iter->second; - m_freeChunksMap.insert(AZStd::make_pair(iter->second, iter->first)); - m_allocChunksMap.erase(iter); - } -} - -//========================================================================= -// AllocationSize -// [1/28/2011] -//========================================================================= -BestFitExternalMapSchema::size_type -BestFitExternalMapSchema::AllocationSize(pointer_type ptr) -{ - AllocMapType::iterator iter = m_allocChunksMap.find(reinterpret_cast(ptr)); - if (iter != m_allocChunksMap.end()) - { - return iter->second; - } - return 0; -} - -//========================================================================= -// GetMaxAllocationSize -// [1/28/2011] -//========================================================================= -BestFitExternalMapSchema::size_type -BestFitExternalMapSchema::GetMaxAllocationSize() const -{ - if (!m_freeChunksMap.empty()) - { - return m_freeChunksMap.rbegin()->first; - } - return 0; -} - -auto BestFitExternalMapSchema::GetMaxContiguousAllocationSize() const -> size_type -{ - // Return the maximum size of any single allocation - return AZ_CORE_MAX_ALLOCATOR_SIZE; -} - -//========================================================================= -// GarbageCollect -// [1/28/2011] -//========================================================================= -void -BestFitExternalMapSchema::GarbageCollect() -{ - for (FreeMapType::iterator curBlock = m_freeChunksMap.begin(); curBlock != m_freeChunksMap.end(); ) - { - char* curStart = curBlock->second; - char* curEnd = curStart + curBlock->first; - bool isMerge = false; - for (FreeMapType::iterator nextBlock = curBlock++; nextBlock != m_freeChunksMap.end(); ) - { - char* nextStart = nextBlock->second; - char* nextEnd = nextStart + nextBlock->first; - if (curStart == nextEnd) - { - // merge - size_t newBlockSize = curBlock->first + nextBlock->first; - char* newBlockAddress = nextStart; - m_freeChunksMap.erase(nextBlock); - FreeMapType::iterator toErase = curBlock; - ++curBlock; - m_freeChunksMap.erase(toErase); - FreeMapType::iterator newBlock = m_freeChunksMap.insert(AZStd::make_pair(newBlockSize, newBlockAddress)).first; - if (curBlock != m_freeChunksMap.end() && newBlockSize < curBlock->first) // if the newBlock in before the next in the list, update next in the list to current + blockSize = iter->first; + blockAddress = iter->second; + char* alignedAddr = PointerAlignUp(blockAddress, alignment); + preAllocBlockSize = alignedAddr - blockAddress; + if (preAllocBlockSize + byteSize <= blockSize) { - curBlock = newBlock; + m_freeChunksMap.erase(iter); // we have our allocation + m_used += byteSize; + address = alignedAddr; + m_allocChunksMap.insert(AZStd::make_pair(address, byteSize)); + break; } - isMerge = true; - break; + ++iter; } - else if (curEnd == nextStart) + if (address != nullptr) { - // merge - size_t newBlockSize = curBlock->first + nextBlock->first; - char* newBlockAddress = curStart; - m_freeChunksMap.erase(nextBlock); - FreeMapType::iterator toErase = curBlock; - ++curBlock; - m_freeChunksMap.erase(toErase); - FreeMapType::iterator newBlock = m_freeChunksMap.insert(AZStd::make_pair(newBlockSize, newBlockAddress)).first; - if (curBlock != m_freeChunksMap.end() && newBlockSize < curBlock->first) // if the newBlock in before the next in the list, update next in the list to current + // split blocks + if (preAllocBlockSize) // if we have a block before the alignment { - curBlock = newBlock; + m_freeChunksMap.insert(AZStd::make_pair(preAllocBlockSize, blockAddress)); } - isMerge = true; + size_t postAllocBlockSize = blockSize - preAllocBlockSize - byteSize; + if (postAllocBlockSize) + { + m_freeChunksMap.insert(AZStd::make_pair(postAllocBlockSize, address + byteSize)); + } + break; } - ++nextBlock; + else + { + GarbageCollect(); + } } - if (!isMerge) + return address; + } + + //========================================================================= + // DeAllocate + // [1/28/2011] + //========================================================================= + void BestFitExternalMapSchema::DeAllocate(pointer_type ptr) + { + if (ptr == nullptr) { - ++curBlock; + return; + } + AllocMapType::iterator iter = m_allocChunksMap.find(reinterpret_cast(ptr)); + if (iter != m_allocChunksMap.end()) + { + m_used -= iter->second; + m_freeChunksMap.insert(AZStd::make_pair(iter->second, iter->first)); + m_allocChunksMap.erase(iter); } } -} + + //========================================================================= + // AllocationSize + // [1/28/2011] + //========================================================================= + BestFitExternalMapSchema::size_type BestFitExternalMapSchema::AllocationSize(pointer_type ptr) + { + AllocMapType::iterator iter = m_allocChunksMap.find(reinterpret_cast(ptr)); + if (iter != m_allocChunksMap.end()) + { + return iter->second; + } + return 0; + } + + //========================================================================= + // GetMaxAllocationSize + // [1/28/2011] + //========================================================================= + BestFitExternalMapSchema::size_type BestFitExternalMapSchema::GetMaxAllocationSize() const + { + if (!m_freeChunksMap.empty()) + { + return m_freeChunksMap.rbegin()->first; + } + return 0; + } + + auto BestFitExternalMapSchema::GetMaxContiguousAllocationSize() const -> size_type + { + // Return the maximum size of any single allocation + return AZ_CORE_MAX_ALLOCATOR_SIZE; + } + + //========================================================================= + // GarbageCollect + // [1/28/2011] + //========================================================================= + void BestFitExternalMapSchema::GarbageCollect() + { + for (FreeMapType::iterator curBlock = m_freeChunksMap.begin(); curBlock != m_freeChunksMap.end();) + { + char* curStart = curBlock->second; + char* curEnd = curStart + curBlock->first; + bool isMerge = false; + for (FreeMapType::iterator nextBlock = curBlock++; nextBlock != m_freeChunksMap.end();) + { + char* nextStart = nextBlock->second; + char* nextEnd = nextStart + nextBlock->first; + if (curStart == nextEnd) + { + // merge + size_t newBlockSize = curBlock->first + nextBlock->first; + char* newBlockAddress = nextStart; + m_freeChunksMap.erase(nextBlock); + FreeMapType::iterator toErase = curBlock; + ++curBlock; + m_freeChunksMap.erase(toErase); + FreeMapType::iterator newBlock = m_freeChunksMap.insert(AZStd::make_pair(newBlockSize, newBlockAddress)).first; + // if the newBlock in before the next in the list, update next in the list to current + if (curBlock != m_freeChunksMap.end() && newBlockSize < curBlock->first) + { + curBlock = newBlock; + } + isMerge = true; + break; + } + else if (curEnd == nextStart) + { + // merge + size_t newBlockSize = curBlock->first + nextBlock->first; + char* newBlockAddress = curStart; + m_freeChunksMap.erase(nextBlock); + FreeMapType::iterator toErase = curBlock; + ++curBlock; + m_freeChunksMap.erase(toErase); + FreeMapType::iterator newBlock = m_freeChunksMap.insert(AZStd::make_pair(newBlockSize, newBlockAddress)).first; + // if the newBlock in before the next in the list, update next in the list to current + if (curBlock != m_freeChunksMap.end() && newBlockSize < curBlock->first) + { + curBlock = newBlock; + } + isMerge = true; + break; + } + ++nextBlock; + } + if (!isMerge) + { + ++curBlock; + } + } + } + +} // namespace AZ diff --git a/Code/Framework/AzCore/AzCore/Memory/BestFitExternalMapSchema.h b/Code/Framework/AzCore/AzCore/Memory/BestFitExternalMapSchema.h index eaab614593..0055a86ee2 100644 --- a/Code/Framework/AzCore/AzCore/Memory/BestFitExternalMapSchema.h +++ b/Code/Framework/AzCore/AzCore/Memory/BestFitExternalMapSchema.h @@ -5,8 +5,7 @@ * SPDX-License-Identifier: Apache-2.0 OR MIT * */ -#ifndef AZ_BEST_FIT_EXT_MAP_ALLOCATION_SCHEME_H -#define AZ_BEST_FIT_EXT_MAP_ALLOCATION_SCHEME_H +#pragma once #include #include @@ -77,8 +76,3 @@ namespace AZ AllocMapType m_allocChunksMap; }; } - -#endif // AZ_BEST_FIT_EXT_MAP_ALLOCATION_SCHEME_H -#pragma once - - diff --git a/Code/Framework/AzCore/AzCore/Memory/HeapSchema.cpp b/Code/Framework/AzCore/AzCore/Memory/HeapSchema.cpp index aceafa1b28..1f0fc59a97 100644 --- a/Code/Framework/AzCore/AzCore/Memory/HeapSchema.cpp +++ b/Code/Framework/AzCore/AzCore/Memory/HeapSchema.cpp @@ -115,6 +115,7 @@ namespace AZ m_ownMemoryBlock[i] = false; } + AZ_Assert(m_desc.m_numMemoryBlocks > 0, "At least one memory block is required"); for (int i = 0; i < m_desc.m_numMemoryBlocks; ++i) { if (m_desc.m_memoryBlocks[i] == nullptr) // Allocate memory block if requested! @@ -131,17 +132,6 @@ namespace AZ m_capacity += m_desc.m_memoryBlocksByteSize[i]; } - - if (m_desc.m_numMemoryBlocks == 0) - { - // Create default memory space if we can to serve for default allocations - m_memSpaces[0] = AZDLMalloc::create_mspace(0, m_desc.m_isMultithreadAlloc); - if (m_memSpaces[0]) - { - AZDLMalloc::mspace_az_set_expandable(m_memSpaces[0], true); - m_capacity = Platform::GetHeapCapacity(); - } - } } HeapSchema::~HeapSchema() diff --git a/Code/Framework/AzCore/AzCore/Memory/HeapSchema.h b/Code/Framework/AzCore/AzCore/Memory/HeapSchema.h index f72ae31057..3a7716a127 100644 --- a/Code/Framework/AzCore/AzCore/Memory/HeapSchema.h +++ b/Code/Framework/AzCore/AzCore/Memory/HeapSchema.h @@ -32,17 +32,11 @@ namespace AZ */ struct Descriptor { - Descriptor() - : m_numMemoryBlocks(0) - , m_isMultithreadAlloc(true) - {} - - static const int m_memoryBlockAlignment = 64 * 1024; static const int m_maxNumBlocks = 5; - int m_numMemoryBlocks; ///< Number of memory blocks to use. - void* m_memoryBlocks[m_maxNumBlocks]; ///< Pointers to provided memory blocks or NULL if you want the system to allocate them for you with the System Allocator. - size_t m_memoryBlocksByteSize[m_maxNumBlocks]; ///< Sizes of different memory blocks, if m_memoryBlock is 0 the block will be allocated for you with the System Allocator. - bool m_isMultithreadAlloc; ///< Set to true to enable multi threading safe allocation. + int m_numMemoryBlocks = 1; ///< Number of memory blocks to use. + void* m_memoryBlocks[m_maxNumBlocks] = {}; ///< Pointers to provided memory blocks or NULL if you want the system to allocate them for you with the System Allocator. + size_t m_memoryBlocksByteSize[m_maxNumBlocks] = {4 * 1024}; ///< Sizes of different memory blocks, if m_memoryBlock is 0 the block will be allocated for you with the System Allocator. + bool m_isMultithreadAlloc = true; ///< Set to true to enable multi threading safe allocation. }; HeapSchema(const Descriptor& desc); diff --git a/Code/Framework/AzCore/AzCore/Memory/HphaSchema.cpp b/Code/Framework/AzCore/AzCore/Memory/HphaSchema.cpp index 6af8f201c2..6e40ccd8cd 100644 --- a/Code/Framework/AzCore/AzCore/Memory/HphaSchema.cpp +++ b/Code/Framework/AzCore/AzCore/Memory/HphaSchema.cpp @@ -140,8 +140,8 @@ namespace AZ { class const_iterator; class iterator { - typedef T& reference; - typedef T* pointer; + using reference = T&; + using pointer = T*; friend class const_iterator; T* mPtr; public: @@ -171,8 +171,8 @@ namespace AZ { class const_iterator { - typedef const T& reference; - typedef const T* pointer; + using reference = const T &; + using pointer = const T *; const T* mPtr; public: const_iterator() @@ -327,7 +327,7 @@ namespace AZ { uint64_t mSizeAndFlags; public: - typedef block_header* block_ptr; + using block_ptr = block_header *; size_t size() const { return mSizeAndFlags & ~BL_FLAG_MASK; } block_ptr next() const {return (block_ptr)((char*)mem() + size()); } block_ptr prev() const {return mPrev; } @@ -415,7 +415,7 @@ namespace AZ { void dec_ref() { HPPA_ASSERT(mUseCount > 0); mUseCount--; } bool check_marker(size_t marker) const { return mMarker == (marker ^ ((size_t)this)); } }; - typedef intrusive_list page_list; + using page_list = intrusive_list; class bucket { page_list mPageList; diff --git a/Code/Framework/AzCore/AzCore/Memory/IAllocator.h b/Code/Framework/AzCore/AzCore/Memory/IAllocator.h index 1aa4cf70f5..532335e50b 100644 --- a/Code/Framework/AzCore/AzCore/Memory/IAllocator.h +++ b/Code/Framework/AzCore/AzCore/Memory/IAllocator.h @@ -14,7 +14,6 @@ namespace AZ namespace Debug { class AllocationRecords; - class MemoryDriller; } namespace AllocatorStorage @@ -83,7 +82,7 @@ namespace AZ /// Sets the number of entries to omit from the top of the callstack when recording stack traces. AllocatorDebugConfig& StackRecordLevels(int levels) { m_stackRecordLevels = levels; return *this; } - /// Set to true if this allocator should not have its records recorded and analyzed by systems like the MemoryDriller. + /// Set to true if this allocator should not have its records recorded and analyzed. AllocatorDebugConfig& ExcludeFromDebugging(bool exclude = true) { m_excludeFromDebugging = exclude; return *this; } /// Set to true if this allocator expands allocations with guard sections to detect overruns. @@ -207,8 +206,6 @@ namespace AZ template friend class AllocatorWrapper; - - friend class Debug::MemoryDriller; }; } diff --git a/Code/Framework/AzCore/AzCore/Memory/MallocSchema.cpp b/Code/Framework/AzCore/AzCore/Memory/MallocSchema.cpp index 76a71e0f08..9aa31cd8b6 100644 --- a/Code/Framework/AzCore/AzCore/Memory/MallocSchema.cpp +++ b/Code/Framework/AzCore/AzCore/Memory/MallocSchema.cpp @@ -11,149 +11,168 @@ #include #include +namespace AZ::Internal +{ + struct Header + { + uint32_t offset; + uint32_t size; + }; +} // namespace AZ::Internal + namespace AZ { - namespace Internal + //--------------------------------------------------------------------- + // MallocSchema methods + //--------------------------------------------------------------------- + + MallocSchema::MallocSchema(const Descriptor& desc) + : m_bytesAllocated(0) { - struct Header + if (desc.m_useAZMalloc) { - uint32_t offset; - uint32_t size; - }; + static const int DEFAULT_ALIGNMENT = sizeof(void*) * 2; // Default malloc alignment + + m_mallocFn = [](size_t byteSize) + { + return AZ_OS_MALLOC(byteSize, DEFAULT_ALIGNMENT); + }; + m_freeFn = [](void* ptr) + { + AZ_OS_FREE(ptr); + }; + } + else + { + m_mallocFn = &malloc; + m_freeFn = &free; + } } -} -//--------------------------------------------------------------------- -// MallocSchema methods -//--------------------------------------------------------------------- - -AZ::MallocSchema::MallocSchema(const Descriptor& desc) : - m_bytesAllocated(0) -{ - if (desc.m_useAZMalloc) + MallocSchema::~MallocSchema() { - static const int DEFAULT_ALIGNMENT = sizeof(void*) * 2; // Default malloc alignment - - m_mallocFn = [](size_t byteSize) { return AZ_OS_MALLOC(byteSize, DEFAULT_ALIGNMENT); }; - m_freeFn = [](void* ptr) { AZ_OS_FREE(ptr); }; } - else + + MallocSchema::pointer_type MallocSchema::Allocate( + size_type byteSize, + size_type alignment, + int flags, + const char* name, + const char* fileName, + int lineNum, + unsigned int suppressStackRecord) { - m_mallocFn = &malloc; - m_freeFn = &free; + (void)flags; + (void)name; + (void)fileName; + (void)lineNum; + (void)suppressStackRecord; + + if (!byteSize) + { + return nullptr; + } + + if (alignment == 0) + { + alignment = sizeof(void*) * 2; // Default malloc alignment + } + + AZ_Assert(byteSize < 0x100000000ull, "Malloc allocator only allocates up to 4GB"); + + size_type required = byteSize + sizeof(Internal::Header) + + ((alignment > sizeof(double)) + ? alignment + : 0); // Malloc will align to a minimum boundary for native objects, so we only pad if aligning to a large value + void* data = (*m_mallocFn)(required); + void* result = PointerAlignUp(reinterpret_cast(reinterpret_cast(data) + sizeof(Internal::Header)), alignment); + Internal::Header* header = PointerAlignDown( + (Internal::Header*)(reinterpret_cast(result) - sizeof(Internal::Header)), AZStd::alignment_of::value); + + header->offset = static_cast(reinterpret_cast(result) - reinterpret_cast(data)); + header->size = static_cast(byteSize); + m_bytesAllocated += byteSize; + + return result; } -} -AZ::MallocSchema::~MallocSchema() -{ -} + void MallocSchema::DeAllocate(pointer_type ptr, size_type byteSize, size_type alignment) + { + (void)byteSize; + (void)alignment; -AZ::MallocSchema::pointer_type AZ::MallocSchema::Allocate(size_type byteSize, size_type alignment, int flags, const char* name, const char* fileName, int lineNum, unsigned int suppressStackRecord) -{ - (void)flags; - (void)name; - (void)fileName; - (void)lineNum; - (void)suppressStackRecord; + if (!ptr) + { + return; + } - if (!byteSize) + Internal::Header* header = PointerAlignDown( + reinterpret_cast(reinterpret_cast(ptr) - sizeof(Internal::Header)), + AZStd::alignment_of::value); + void* freePtr = reinterpret_cast(reinterpret_cast(ptr) - static_cast(header->offset)); + + m_bytesAllocated -= header->size; + (*m_freeFn)(freePtr); + } + + MallocSchema::pointer_type MallocSchema::ReAllocate(pointer_type ptr, size_type newSize, size_type newAlignment) + { + void* newPtr = Allocate(newSize, newAlignment, 0); + size_t oldSize = AllocationSize(ptr); + + memcpy(newPtr, ptr, AZStd::min(oldSize, newSize)); + DeAllocate(ptr, 0, 0); + + return newPtr; + } + + MallocSchema::size_type MallocSchema::Resize(pointer_type ptr, size_type newSize) + { + (void)ptr; + (void)newSize; + + return 0; + } + + MallocSchema::size_type MallocSchema::AllocationSize(pointer_type ptr) + { + if (!ptr) + { + return 0; + } + Internal::Header* header = PointerAlignDown( + reinterpret_cast(reinterpret_cast(ptr) - sizeof(Internal::Header)), + AZStd::alignment_of::value); + return header->size; + } + + MallocSchema::size_type MallocSchema::NumAllocatedBytes() const + { + return m_bytesAllocated; + } + + MallocSchema::size_type MallocSchema::Capacity() const + { + return 0; + } + + MallocSchema::size_type MallocSchema::GetMaxAllocationSize() const + { + return 0xFFFFFFFFull; + } + + MallocSchema::size_type MallocSchema::GetMaxContiguousAllocationSize() const + { + return AZ_CORE_MAX_ALLOCATOR_SIZE; + } + + IAllocatorAllocate* MallocSchema::GetSubAllocator() { return nullptr; } - if (alignment == 0) + void MallocSchema::GarbageCollect() { - alignment = sizeof(void*) * 2; // Default malloc alignment } - AZ_Assert(byteSize < 0x100000000ull, "Malloc allocator only allocates up to 4GB"); - - size_type required = byteSize + sizeof(Internal::Header) + ((alignment > sizeof(double)) ? alignment : 0); // Malloc will align to a minimum boundary for native objects, so we only pad if aligning to a large value - void* data = (*m_mallocFn)(required); - void* result = PointerAlignUp(reinterpret_cast(reinterpret_cast(data) + sizeof(Internal::Header)), alignment); - Internal::Header* header = PointerAlignDown((Internal::Header*)(reinterpret_cast(result) - sizeof(Internal::Header)), AZStd::alignment_of::value); - - header->offset = static_cast(reinterpret_cast(result) - reinterpret_cast(data)); - header->size = static_cast(byteSize); - m_bytesAllocated += byteSize; - - return result; -} - -void AZ::MallocSchema::DeAllocate(pointer_type ptr, size_type byteSize, size_type alignment) -{ - (void)byteSize; - (void)alignment; - - if (!ptr) - { - return; - } - - Internal::Header* header = PointerAlignDown(reinterpret_cast(reinterpret_cast(ptr) - sizeof(Internal::Header)), AZStd::alignment_of::value); - void* freePtr = reinterpret_cast(reinterpret_cast(ptr) - static_cast(header->offset)); - - m_bytesAllocated -= header->size; - (*m_freeFn)(freePtr); -} - -AZ::MallocSchema::pointer_type AZ::MallocSchema::ReAllocate(pointer_type ptr, size_type newSize, size_type newAlignment) -{ - void* newPtr = Allocate(newSize, newAlignment, 0); - size_t oldSize = AllocationSize(ptr); - - memcpy(newPtr, ptr, AZStd::min(oldSize, newSize)); - DeAllocate(ptr, 0, 0); - - return newPtr; -} - -AZ::MallocSchema::size_type AZ::MallocSchema::Resize(pointer_type ptr, size_type newSize) -{ - (void)ptr; - (void)newSize; - - return 0; -} - -AZ::MallocSchema::size_type AZ::MallocSchema::AllocationSize(pointer_type ptr) -{ - size_type result = 0; - - if (ptr) - { - Internal::Header* header = PointerAlignDown(reinterpret_cast(reinterpret_cast(ptr) - sizeof(Internal::Header)), AZStd::alignment_of::value); - result = header->size; - } - - return result; -} - -AZ::MallocSchema::size_type AZ::MallocSchema::NumAllocatedBytes() const -{ - return m_bytesAllocated; -} - -AZ::MallocSchema::size_type AZ::MallocSchema::Capacity() const -{ - return 0; -} - -AZ::MallocSchema::size_type AZ::MallocSchema::GetMaxAllocationSize() const -{ - return 0xFFFFFFFFull; -} - -AZ::MallocSchema::size_type AZ::MallocSchema::GetMaxContiguousAllocationSize() const -{ - return AZ_CORE_MAX_ALLOCATOR_SIZE; -} - -AZ::IAllocatorAllocate* AZ::MallocSchema::GetSubAllocator() -{ - return nullptr; -} - -void AZ::MallocSchema::GarbageCollect() -{ -} +} // namespace AZ diff --git a/Code/Framework/AzCore/AzCore/Memory/MemoryDriller.cpp b/Code/Framework/AzCore/AzCore/Memory/MemoryDriller.cpp deleted file mode 100644 index 2ea25c3397..0000000000 --- a/Code/Framework/AzCore/AzCore/Memory/MemoryDriller.cpp +++ /dev/null @@ -1,294 +0,0 @@ -/* - * Copyright (c) Contributors to the Open 3D Engine Project. - * For complete copyright and license terms please see the LICENSE at the root of this distribution. - * - * SPDX-License-Identifier: Apache-2.0 OR MIT - * - */ - -#include -#include - -#include -#include - -#include -#include - -namespace AZ -{ - namespace Debug - { - //========================================================================= - // MemoryDriller - // [2/6/2013] - //========================================================================= - MemoryDriller::MemoryDriller(const Descriptor& desc) - { - (void)desc; - BusConnect(); - - AllocatorManager::Instance().EnterProfilingMode(); - - { - // Register all allocators that were created before the driller existed - auto allocatorLock = AllocatorManager::Instance().LockAllocators(); - - for (int i = 0; i < AllocatorManager::Instance().GetNumAllocators(); ++i) - { - IAllocator* allocator = AllocatorManager::Instance().GetAllocator(i); - RegisterAllocator(allocator); - } - } - } - - //========================================================================= - // ~MemoryDriller - // [2/6/2013] - //========================================================================= - MemoryDriller::~MemoryDriller() - { - BusDisconnect(); - AllocatorManager::Instance().ExitProfilingMode(); - } - - //========================================================================= - // Start - // [2/6/2013] - //========================================================================= - void MemoryDriller::Start(const Param* params, int numParams) - { - (void)params; - (void)numParams; - - // dump current allocations for all allocators with tracking - auto allocatorLock = AllocatorManager::Instance().LockAllocators(); - for (int i = 0; i < AllocatorManager::Instance().GetNumAllocators(); ++i) - { - IAllocator* allocator = AllocatorManager::Instance().GetAllocator(i); - if (auto records = allocator->GetRecords()) - { - RegisterAllocatorOutput(allocator); - const AllocationRecordsType& allocMap = records->GetMap(); - for (AllocationRecordsType::const_iterator allocIt = allocMap.begin(); allocIt != allocMap.end(); ++allocIt) - { - RegisterAllocationOutput(allocator, allocIt->first, &allocIt->second); - } - } - } - } - - //========================================================================= - // Stop - // [2/6/2013] - //========================================================================= - void MemoryDriller::Stop() - { - } - - //========================================================================= - // RegisterAllocator - // [2/6/2013] - //========================================================================= - void MemoryDriller::RegisterAllocator(IAllocator* allocator) - { - // Ignore if our allocator is already registered - if (allocator->GetRecords() != nullptr) - { - return; - } - - auto debugConfig = allocator->GetDebugConfig(); - - if (!debugConfig.m_excludeFromDebugging) - { - allocator->SetRecords(aznew Debug::AllocationRecords((unsigned char)debugConfig.m_stackRecordLevels, debugConfig.m_usesMemoryGuards, debugConfig.m_marksUnallocatedMemory, allocator->GetName())); - - m_allAllocatorRecords.push_back(allocator->GetRecords()); - - if (m_output == nullptr) - { - return; // we have no active output - } - RegisterAllocatorOutput(allocator); - } - } - //========================================================================= - // RegisterAllocatorOutput - // [2/6/2013] - //========================================================================= - void MemoryDriller::RegisterAllocatorOutput(IAllocator* allocator) - { - auto records = allocator->GetRecords(); - m_output->BeginTag(AZ_CRC("MemoryDriller", 0x1b31269d)); - m_output->BeginTag(AZ_CRC("RegisterAllocator", 0x19f08114)); - m_output->Write(AZ_CRC("Name", 0x5e237e06), allocator->GetName()); - m_output->Write(AZ_CRC("Id", 0xbf396750), allocator); - m_output->Write(AZ_CRC("Capacity", 0xb5e8b174), allocator->GetAllocationSource()->Capacity()); - m_output->Write(AZ_CRC("RecordsId", 0x7caaca88), records); - if (records) - { - m_output->Write(AZ_CRC("RecordsMode", 0x764c147a), (char)records->GetMode()); - m_output->Write(AZ_CRC("NumStackLevels", 0xad9cff15), records->GetNumStackLevels()); - } - m_output->EndTag(AZ_CRC("RegisterAllocator", 0x19f08114)); - m_output->EndTag(AZ_CRC("MemoryDriller", 0x1b31269d)); - } - - //========================================================================= - // UnregisterAllocator - // [2/6/2013] - //========================================================================= - void MemoryDriller::UnregisterAllocator(IAllocator* allocator) - { - auto allocatorRecords = allocator->GetRecords(); - AZ_Assert(allocatorRecords, "This allocator is not registered with the memory driller!"); - for (auto records : m_allAllocatorRecords) - { - if (records == allocatorRecords) - { - m_allAllocatorRecords.remove(records); - break; - } - } - delete allocatorRecords; - allocator->SetRecords(nullptr); - - if (m_output == nullptr) - { - return; // we have no active output - } - m_output->BeginTag(AZ_CRC("MemoryDriller", 0x1b31269d)); - m_output->Write(AZ_CRC("UnregisterAllocator", 0xb2b54f93), allocator); - m_output->EndTag(AZ_CRC("MemoryDriller", 0x1b31269d)); - } - - //========================================================================= - // RegisterAllocation - // [2/6/2013] - //========================================================================= - void MemoryDriller::RegisterAllocation(IAllocator* allocator, void* address, size_t byteSize, size_t alignment, const char* name, const char* fileName, int lineNum, unsigned int stackSuppressCount) - { - auto records = allocator->GetRecords(); - if (records) - { - const AllocationInfo* info = records->RegisterAllocation(address, byteSize, alignment, name, fileName, lineNum, stackSuppressCount + 1); - if (m_output == nullptr) - { - return; // we have no active output - } - RegisterAllocationOutput(allocator, address, info); - } - } - - //========================================================================= - // RegisterAllocationOutput - // [2/6/2013] - //========================================================================= - void MemoryDriller::RegisterAllocationOutput(IAllocator* allocator, void* address, const AllocationInfo* info) - { - auto records = allocator->GetRecords(); - m_output->BeginTag(AZ_CRC("MemoryDriller", 0x1b31269d)); - m_output->BeginTag(AZ_CRC("RegisterAllocation", 0x992a9780)); - m_output->Write(AZ_CRC("RecordsId", 0x7caaca88), records); - m_output->Write(AZ_CRC("Address", 0x0d4e6f81), address); - if (info) - { - if (info->m_name) - { - m_output->Write(AZ_CRC("Name", 0x5e237e06), info->m_name); - } - m_output->Write(AZ_CRC("Alignment", 0x2cce1e5c), info->m_alignment); - m_output->Write(AZ_CRC("Size", 0xf7c0246a), info->m_byteSize); - if (info->m_fileName) - { - m_output->Write(AZ_CRC("FileName", 0x3c0be965), info->m_fileName); - m_output->Write(AZ_CRC("FileLine", 0xb33c2395), info->m_lineNum); - } - // copy the stack frames directly, resolving the stack should happen later as this is a SLOW procedure. - if (info->m_stackFrames) - { - m_output->Write(AZ_CRC("Stack", 0x41a87b6a), info->m_stackFrames, info->m_stackFrames + records->GetNumStackLevels()); - } - } - m_output->EndTag(AZ_CRC("RegisterAllocation", 0x992a9780)); - m_output->EndTag(AZ_CRC("MemoryDriller", 0x1b31269d)); - } - - //========================================================================= - // UnRegisterAllocation - // [2/6/2013] - //========================================================================= - void MemoryDriller::UnregisterAllocation(IAllocator* allocator, void* address, size_t byteSize, size_t alignment, AllocationInfo* info) - { - auto records = allocator->GetRecords(); - if (records) - { - records->UnregisterAllocation(address, byteSize, alignment, info); - - if (m_output == nullptr) - { - return; // we have no active output - } - m_output->BeginTag(AZ_CRC("MemoryDriller", 0x1b31269d)); - m_output->BeginTag(AZ_CRC("UnRegisterAllocation", 0xea5dc4cd)); - m_output->Write(AZ_CRC("RecordsId", 0x7caaca88), records); - m_output->Write(AZ_CRC("Address", 0x0d4e6f81), address); - m_output->EndTag(AZ_CRC("UnRegisterAllocation", 0xea5dc4cd)); - m_output->EndTag(AZ_CRC("MemoryDriller", 0x1b31269d)); - } - } - - //========================================================================= - // ReallocateAllocation - // [10/1/2018] - //========================================================================= - void MemoryDriller::ReallocateAllocation(IAllocator* allocator, void* prevAddress, void* newAddress, size_t newByteSize, size_t newAlignment) - { - AllocationInfo info; - UnregisterAllocation(allocator, prevAddress, 0, 0, &info); - RegisterAllocation(allocator, newAddress, newByteSize, newAlignment, info.m_name, info.m_fileName, info.m_lineNum, 0); - } - - //========================================================================= - // ResizeAllocation - // [2/6/2013] - //========================================================================= - void MemoryDriller::ResizeAllocation(IAllocator* allocator, void* address, size_t newSize) - { - auto records = allocator->GetRecords(); - if (records) - { - records->ResizeAllocation(address, newSize); - - if (m_output == nullptr) - { - return; // we have no active output - } - m_output->BeginTag(AZ_CRC("MemoryDriller", 0x1b31269d)); - m_output->BeginTag(AZ_CRC("ResizeAllocation", 0x8a9c78dc)); - m_output->Write(AZ_CRC("RecordsId", 0x7caaca88), records); - m_output->Write(AZ_CRC("Address", 0x0d4e6f81), address); - m_output->Write(AZ_CRC("Size", 0xf7c0246a), newSize); - m_output->EndTag(AZ_CRC("ResizeAllocation", 0x8a9c78dc)); - m_output->EndTag(AZ_CRC("MemoryDriller", 0x1b31269d)); - } - } - - void MemoryDriller::DumpAllAllocations() - { - // Create a copy so allocations done during the printing dont end up affecting the container - const AZStd::list allocationRecords = m_allAllocatorRecords; - - for (auto records : allocationRecords) - { - // Skip if we have had no allocations made - if (records->RequestedAllocs()) - { - records->EnumerateAllocations(AZ::Debug::PrintAllocationsCB(true, true)); - } - } - } - - }// namespace Debug -} // namespace AZ diff --git a/Code/Framework/AzCore/AzCore/Memory/MemoryDriller.h b/Code/Framework/AzCore/AzCore/Memory/MemoryDriller.h deleted file mode 100644 index 9bcbc85217..0000000000 --- a/Code/Framework/AzCore/AzCore/Memory/MemoryDriller.h +++ /dev/null @@ -1,71 +0,0 @@ -/* - * Copyright (c) Contributors to the Open 3D Engine Project. - * For complete copyright and license terms please see the LICENSE at the root of this distribution. - * - * SPDX-License-Identifier: Apache-2.0 OR MIT - * - */ -#ifndef AZCORE_MEMORY_DRILLER_H -#define AZCORE_MEMORY_DRILLER_H 1 - -#include -#include - -namespace AZ -{ - namespace Debug - { - struct StackFrame; - - /** - * Trace messages driller class - */ - class MemoryDriller - : public Driller - , public MemoryDrillerBus::Handler - { - public: - AZ_CLASS_ALLOCATOR(MemoryDriller, OSAllocator, 0) - - // TODO: Centralized settings for memory tracking. - struct Descriptor - { - }; - - MemoryDriller(const Descriptor& desc = Descriptor()); - ~MemoryDriller(); - - protected: - ////////////////////////////////////////////////////////////////////////// - // Driller - const char* GroupName() const override { return "SystemDrillers"; } - const char* GetName() const override { return "MemoryDriller"; } - const char* GetDescription() const override { return "Reports all allocators and memory allocations."; } - void Start(const Param* params = NULL, int numParams = 0) override; - void Stop() override; - ////////////////////////////////////////////////////////////////////////// - - ////////////////////////////////////////////////////////////////////////// - // MemoryDrillerBus - void RegisterAllocator(IAllocator* allocator) override; - void UnregisterAllocator(IAllocator* allocator) override; - - void RegisterAllocation(IAllocator* allocator, void* address, size_t byteSize, size_t alignment, const char* name, const char* fileName, int lineNum, unsigned int stackSuppressCount) override; - void UnregisterAllocation(IAllocator* allocator, void* address, size_t byteSize, size_t alignment, AllocationInfo* info) override; - void ReallocateAllocation(IAllocator* allocator, void* prevAddress, void* newAddress, size_t newByteSize, size_t newAlignment) override; - void ResizeAllocation(IAllocator* allocator, void* address, size_t newSize) override; - - void DumpAllAllocations() override; - ////////////////////////////////////////////////////////////////////////// - - void RegisterAllocatorOutput(IAllocator* allocator); - void RegisterAllocationOutput(IAllocator* allocator, void* address, const AllocationInfo* info); - private: - // Store a list of all of our allocator records so we can dump them all without having to know about the allocators - AZStd::list m_allAllocatorRecords; - }; - } // namespace Debug -} // namespace AZ - -#endif // AZCORE_MEMORY_DRILLER_H -#pragma once diff --git a/Code/Framework/AzCore/AzCore/Memory/MemoryDrillerBus.h b/Code/Framework/AzCore/AzCore/Memory/MemoryDrillerBus.h deleted file mode 100644 index 43a31af006..0000000000 --- a/Code/Framework/AzCore/AzCore/Memory/MemoryDrillerBus.h +++ /dev/null @@ -1,52 +0,0 @@ -/* - * Copyright (c) Contributors to the Open 3D Engine Project. - * For complete copyright and license terms please see the LICENSE at the root of this distribution. - * - * SPDX-License-Identifier: Apache-2.0 OR MIT - * - */ -#ifndef AZCORE_MEMORY_DRILLER_BUS_H -#define AZCORE_MEMORY_DRILLER_BUS_H 1 - -#include - -namespace AZ -{ - class IAllocator; - namespace Debug - { - //class AllocationRecords; - struct AllocationInfo; - - /** - * Memory allocations driller message. - * - * We use a driller bus so all messages are sending in exclusive matter no other driller messages - * can be triggered at that moment, so we already preserve the calling order. You can assume - * all access code in the driller framework in guarded. You can manually lock the driller mutex are you - * use by using \ref AZ::Debug::DrillerEBusMutex. - */ - class MemoryDrillerMessages - : public AZ::Debug::DrillerEBusTraits - { - public: - virtual ~MemoryDrillerMessages() {} - - /// Register allocation (with customizable tracking settings - TODO: we should centralize this settings and remove them from here) - virtual void RegisterAllocator(IAllocator* allocator) = 0; - virtual void UnregisterAllocator(IAllocator* allocator) = 0; - - virtual void RegisterAllocation(IAllocator* allocator, void* address, size_t byteSize, size_t alignment, const char* name, const char* fileName, int lineNum, unsigned int stackSuppressCount) = 0; - virtual void UnregisterAllocation(IAllocator* allocator, void* address, size_t byteSize, size_t alignment, AllocationInfo* info) = 0; - virtual void ReallocateAllocation(IAllocator* allocator, void* prevAddress, void* newAddress, size_t newByteSize, size_t newAlignment) = 0; - virtual void ResizeAllocation(IAllocator* allocator, void* address, size_t newSize) = 0; - - virtual void DumpAllAllocations() = 0; - }; - - typedef AZ::EBus MemoryDrillerBus; - } // namespace Debug -} // namespace AZ - -#endif // AZCORE_MEMORY_DRILLER_BUS_H -#pragma once diff --git a/Code/Framework/AzCore/AzCore/Memory/OSAllocator.h b/Code/Framework/AzCore/AzCore/Memory/OSAllocator.h index b327cf6349..3a8080483b 100644 --- a/Code/Framework/AzCore/AzCore/Memory/OSAllocator.h +++ b/Code/Framework/AzCore/AzCore/Memory/OSAllocator.h @@ -20,7 +20,7 @@ namespace AZ * OS allocator should be used for direct OS allocations (C heap) * It's memory usage is NOT tracked. If you don't create this allocator, it will be implicitly * created by the SystemAllocator when it is needed. In addition this allocator is used for - * debug data (like drillers, memory trackng, etc.) + * debug data (like memory tracking, etc.) */ class OSAllocator : public AllocatorBase diff --git a/Code/Framework/AzCore/AzCore/Memory/PlatformMemoryInstrumentation.h b/Code/Framework/AzCore/AzCore/Memory/PlatformMemoryInstrumentation.h deleted file mode 100644 index bc6499566d..0000000000 --- a/Code/Framework/AzCore/AzCore/Memory/PlatformMemoryInstrumentation.h +++ /dev/null @@ -1,42 +0,0 @@ -/* - * Copyright (c) Contributors to the Open 3D Engine Project. - * For complete copyright and license terms please see the LICENSE at the root of this distribution. - * - * SPDX-License-Identifier: Apache-2.0 OR MIT - * - */ -#pragma once - -#include - -#if AZ_TRAIT_OS_MEMORY_INSTRUMENTATION && !defined(_RELEASE) -#define PLATFORM_MEMORY_INSTRUMENTATION_ENABLED 1 -#else -#define PLATFORM_MEMORY_INSTRUMENTATION_ENABLED 0 -#endif - -#if PLATFORM_MEMORY_INSTRUMENTATION_ENABLED - -#include -#include - -namespace AZ -{ - /** - * PlatformMemoryInstrumentation - Abstraction layer for platform specific memory instrumentation. - */ - class PlatformMemoryInstrumentation - { - public: - static uint16_t GetNextGroupId() { return m_nextGroupId++; }; - static void RegisterGroup(uint16_t id, const char* name, uint16_t parentGroup); - static void Alloc(const void* ptr, uint64_t size, uint32_t padding, uint16_t group); - static void Free(const void* ptr); - static void ReallocBegin(const void* origPtr, uint64_t size, uint16_t group); - static void ReallocEnd(const void* newPtr, uint64_t size, uint32_t padding); - static const uint16_t m_groupRoot; - static uint16_t m_nextGroupId; - }; -} - -#endif // PLATFORM_MEMORY_INSTRUMENTATION_ENABLED diff --git a/Code/Framework/AzCore/AzCore/Memory/PoolAllocator.h b/Code/Framework/AzCore/AzCore/Memory/PoolAllocator.h index 72418b3d6e..a03f7b5b92 100644 --- a/Code/Framework/AzCore/AzCore/Memory/PoolAllocator.h +++ b/Code/Framework/AzCore/AzCore/Memory/PoolAllocator.h @@ -12,9 +12,6 @@ #include #include -#include - - namespace AZ { template diff --git a/Code/Framework/AzCore/AzCore/Memory/PoolSchema.cpp b/Code/Framework/AzCore/AzCore/Memory/PoolSchema.cpp index 0bef6b7d28..c57cfea222 100644 --- a/Code/Framework/AzCore/AzCore/Memory/PoolSchema.cpp +++ b/Code/Framework/AzCore/AzCore/Memory/PoolSchema.cpp @@ -27,34 +27,34 @@ namespace AZ ////////////////////////////////////////////////////////////////////////// // Pool Allocation algorithm /** - * Pool Allocation algorithm implementation. Used in both PoolAllocator and ThreadPoolAllocator. - */ + * Pool Allocation algorithm implementation. Used in both PoolAllocator and ThreadPoolAllocator. + */ template class PoolAllocation { public: AZ_CLASS_ALLOCATOR(PoolAllocation, SystemAllocator, 0) - typedef typename Allocator::Page PageType; - typedef typename Allocator::Bucket BucketType; + using PageType = typename Allocator::Page; + using BucketType = typename Allocator::Bucket; PoolAllocation(Allocator* alloc, size_t pageSize, size_t minAllocationSize, size_t maxAllocationSize); virtual ~PoolAllocation(); - void* Allocate(size_t byteSize, size_t alignment); - void DeAllocate(void* ptr); - size_t AllocationSize(void* ptr); + void* Allocate(size_t byteSize, size_t alignment); + void DeAllocate(void* ptr); + size_t AllocationSize(void* ptr); // if isForceFreeAllPages is true we will free all pages even if they have allocations in them. - void GarbageCollect(bool isForceFreeAllPages = false); + void GarbageCollect(bool isForceFreeAllPages = false); - Allocator* m_allocator; - size_t m_pageSize; - size_t m_minAllocationShift; - size_t m_minAllocationSize; - size_t m_maxAllocationSize; - size_t m_numBuckets; - BucketType* m_buckets; - size_t m_numBytesAllocated; + Allocator* m_allocator; + size_t m_pageSize; + size_t m_minAllocationShift; + size_t m_minAllocationSize; + size_t m_maxAllocationSize; + size_t m_numBuckets; + BucketType* m_buckets; + size_t m_numBytesAllocated; }; /** @@ -68,28 +68,27 @@ namespace AZ PoolSchemaImpl(const PoolSchema::Descriptor& desc); ~PoolSchemaImpl(); - PoolSchema::pointer_type Allocate(PoolSchema::size_type byteSize, PoolSchema::size_type alignment, int flags = 0); - void DeAllocate(PoolSchema::pointer_type ptr); - PoolSchema::size_type AllocationSize(PoolSchema::pointer_type ptr); + PoolSchema::pointer_type Allocate(PoolSchema::size_type byteSize, PoolSchema::size_type alignment, int flags = 0); + void DeAllocate(PoolSchema::pointer_type ptr); + PoolSchema::size_type AllocationSize(PoolSchema::pointer_type ptr); /** - * We allocate memory for pools in pages. Page is a information struct - * located at the end of the allocated page. When it's in the at the end - * we can usually hide it's size in the free bytes left from the pagesize/poolsize. - * \note IMPORTANT pages are aligned on the page size, this way can find quickly which - * pool the pointer belongs to. - */ - struct Page - : public AZStd::intrusive_list_node + * We allocate memory for pools in pages. Page is a information struct + * located at the end of the allocated page. When it's in the at the end + * we can usually hide it's size in the free bytes left from the pagesize/poolsize. + * \note IMPORTANT pages are aligned on the page size, this way can find quickly which + * pool the pointer belongs to. + */ + struct Page : public AZStd::intrusive_list_node { - struct FakeNode - : public AZStd::intrusive_slist_node - {}; + struct FakeNode : public AZStd::intrusive_slist_node + { + }; void SetupFreeList(size_t elementSize, size_t pageDataBlockSize); /// We just use a free list of nodes which we cast to the pool type. - typedef AZStd::intrusive_slist > FreeListType; + using FreeListType = AZStd::intrusive_slist>; FreeListType m_freeList; u32 m_bin; @@ -99,22 +98,22 @@ namespace AZ }; /** - * A bucket has a list of pages used with the specific pool size. - */ + * A bucket has a list of pages used with the specific pool size. + */ struct Bucket { - typedef AZStd::intrusive_list > PageListType; - PageListType m_pages; + using PageListType = AZStd::intrusive_list>; + PageListType m_pages; }; // Functions used by PoolAllocation template AZ_INLINE Page* PopFreePage(); - AZ_INLINE void PushFreePage(Page* page); - void GarbageCollect(); - inline bool IsInStaticBlock(Page* page) + AZ_INLINE void PushFreePage(Page* page); + void GarbageCollect(); + inline bool IsInStaticBlock(Page* page) { const char* staticBlockStart = reinterpret_cast(m_staticDataBlock); - const char* staticBlockEnd = staticBlockStart + m_numStaticPages*m_pageSize; + const char* staticBlockEnd = staticBlockStart + m_numStaticPages * m_pageSize; const char* pageAddress = reinterpret_cast(page); // all pages are the same size so we either in or out, no need to check the pageAddressEnd if (pageAddress >= staticBlockStart && pageAddress < staticBlockEnd) @@ -126,21 +125,22 @@ namespace AZ return false; } } - inline Page* ConstructPage(size_t elementSize) + inline Page* ConstructPage(size_t elementSize) { AZ_Assert(m_isDynamic, "We run out of static pages (%d) and this is a static allocator!", m_numStaticPages); // We store the page struct at the end of the block char* memBlock; - memBlock = reinterpret_cast(m_pageAllocator->Allocate(m_pageSize, m_pageSize, 0, "AZSystem::PoolSchemaImpl::ConstructPage", __FILE__, __LINE__)); + memBlock = reinterpret_cast( + m_pageAllocator->Allocate(m_pageSize, m_pageSize, 0, "AZSystem::PoolSchemaImpl::ConstructPage", __FILE__, __LINE__)); size_t pageDataSize = m_pageSize - sizeof(Page); - Page* page = new(memBlock+pageDataSize)Page(); + Page* page = new (memBlock + pageDataSize) Page(); page->SetupFreeList(elementSize, pageDataSize); page->m_elementSize = static_cast(elementSize); page->m_maxNumElements = static_cast(pageDataSize / elementSize); return page; } - inline void FreePage(Page* page) + inline void FreePage(Page* page) { // TODO: It's optional if we want to check the guard value for corruption, since we are not going // to use this memory. Yet it might be useful to catch bugs. @@ -150,9 +150,9 @@ namespace AZ m_pageAllocator->DeAllocate(memBlock); } - inline Page* PageFromAddress(void* address) + inline Page* PageFromAddress(void* address) { - char* memBlock = reinterpret_cast(reinterpret_cast(address) & ~(m_pageSize-1)); + char* memBlock = reinterpret_cast(reinterpret_cast(address) & ~(m_pageSize - 1)); memBlock += m_pageSize - sizeof(Page); Page* page = reinterpret_cast(memBlock); if (!page->m_magic.Validate()) @@ -162,19 +162,19 @@ namespace AZ return page; } - typedef PoolAllocation AllocatorType; - IAllocatorAllocate* m_pageAllocator; - AllocatorType m_allocator; - void* m_staticDataBlock; - unsigned int m_numStaticPages; - bool m_isDynamic; - size_t m_pageSize; - Bucket::PageListType m_freePages; + using AllocatorType = PoolAllocation; + IAllocatorAllocate* m_pageAllocator; + AllocatorType m_allocator; + void* m_staticDataBlock; + unsigned int m_numStaticPages; + bool m_isDynamic; + size_t m_pageSize; + Bucket::PageListType m_freePages; }; /** - * Thread safe pool allocator. - */ + * Thread safe pool allocator. + */ class ThreadPoolSchemaImpl { public: @@ -183,27 +183,29 @@ namespace AZ /** * Specialized \ref PoolAllocator::Page page for lock free allocator. */ - struct Page - : public AZStd::intrusive_list_node + struct Page : public AZStd::intrusive_list_node { Page(ThreadPoolData* threadData) - : m_threadData(threadData) {} + : m_threadData(threadData) + { + } - struct FakeNode - : public AZStd::intrusive_slist_node - {}; + struct FakeNode : public AZStd::intrusive_slist_node + { + }; // Fake Lock Free node used when we delete an element from another thread. - struct FakeNodeLF - : public AZStd::lock_free_intrusive_stack_node{}; + struct FakeNodeLF : public AZStd::lock_free_intrusive_stack_node + { + }; void SetupFreeList(size_t elementSize, size_t pageDataBlockSize); /// We just use a free list of nodes which we cast to the pool type. - typedef AZStd::intrusive_slist > FreeListType; + using FreeListType = AZStd::intrusive_slist>; FreeListType m_freeList; - AZStd::lock_free_intrusive_stack_node m_lfStack; ///< Lock Free stack node - struct ThreadPoolData* m_threadData; ///< The thread data that own's the page. + AZStd::lock_free_intrusive_stack_node m_lfStack; ///< Lock Free stack node + struct ThreadPoolData* m_threadData; ///< The thread data that own's the page. u32 m_bin; Debug::Magic32 m_magic; u32 m_elementSize; @@ -211,31 +213,34 @@ namespace AZ }; /** - * A bucket has a list of pages used with the specific pool size. - */ + * A bucket has a list of pages used with the specific pool size. + */ struct Bucket { - typedef AZStd::intrusive_list > PageListType; - PageListType m_pages; + using PageListType = AZStd::intrusive_list>; + PageListType m_pages; }; - ThreadPoolSchemaImpl(const ThreadPoolSchema::Descriptor& desc, ThreadPoolSchema::GetThreadPoolData threadPoolGetter, ThreadPoolSchema::SetThreadPoolData threadPoolSetter); + ThreadPoolSchemaImpl( + const ThreadPoolSchema::Descriptor& desc, + ThreadPoolSchema::GetThreadPoolData threadPoolGetter, + ThreadPoolSchema::SetThreadPoolData threadPoolSetter); ~ThreadPoolSchemaImpl(); - ThreadPoolSchema::pointer_type Allocate(ThreadPoolSchema::size_type byteSize, ThreadPoolSchema::size_type alignment, int flags = 0); - void DeAllocate(ThreadPoolSchema::pointer_type ptr); - ThreadPoolSchema::size_type AllocationSize(ThreadPoolSchema::pointer_type ptr); + ThreadPoolSchema::pointer_type Allocate(ThreadPoolSchema::size_type byteSize, ThreadPoolSchema::size_type alignment, int flags = 0); + void DeAllocate(ThreadPoolSchema::pointer_type ptr); + ThreadPoolSchema::size_type AllocationSize(ThreadPoolSchema::pointer_type ptr); /// Return unused memory to the OS. Don't call this too often because you will force unnecessary allocations. - void GarbageCollect(); + void GarbageCollect(); ////////////////////////////////////////////////////////////////////////// // Functions used by PoolAllocation template AZ_INLINE Page* PopFreePage(); - AZ_INLINE void PushFreePage(Page* page); - inline bool IsInStaticBlock(Page* page) + AZ_INLINE void PushFreePage(Page* page); + inline bool IsInStaticBlock(Page* page) { const char* staticBlockStart = reinterpret_cast(m_staticDataBlock); - const char* staticBlockEnd = staticBlockStart + m_numStaticPages*m_pageSize; + const char* staticBlockEnd = staticBlockStart + m_numStaticPages * m_pageSize; const char* pageAddress = reinterpret_cast(page); // all pages are the same size so we either in or out, no need to check the pageAddressEnd if (pageAddress > staticBlockStart && pageAddress < staticBlockEnd) @@ -247,33 +252,34 @@ namespace AZ return false; } } - inline Page* ConstructPage(size_t elementSize) + inline Page* ConstructPage(size_t elementSize) { AZ_Assert(m_isDynamic, "We run out of static pages (%d) and this is a static allocator!", m_numStaticPages); // We store the page struct at the end of the block char* memBlock; - memBlock = reinterpret_cast(m_pageAllocator->Allocate(m_pageSize, m_pageSize, 0, "AZSystem::ThreadPoolSchema::ConstructPage", __FILE__, __LINE__)); + memBlock = reinterpret_cast( + m_pageAllocator->Allocate(m_pageSize, m_pageSize, 0, "AZSystem::ThreadPoolSchema::ConstructPage", __FILE__, __LINE__)); size_t pageDataSize = m_pageSize - sizeof(Page); - Page* page = new(memBlock+pageDataSize)Page(m_threadPoolGetter()); + Page* page = new (memBlock + pageDataSize) Page(m_threadPoolGetter()); page->SetupFreeList(elementSize, pageDataSize); page->m_elementSize = static_cast(elementSize); page->m_maxNumElements = static_cast(pageDataSize / elementSize); return page; } - inline void FreePage(Page* page) + inline void FreePage(Page* page) { // TODO: It's optional if we want to check the guard value for corruption, since we are not going // to use this memory. Yet it might be useful to catch bugs. // We store the page struct at the end of the block char* memBlock = reinterpret_cast(page) - m_pageSize + sizeof(Page); - page->~Page(); // destroy the page + page->~Page(); // destroy the page m_pageAllocator->DeAllocate(memBlock); } - inline Page* PageFromAddress(void* address) + inline Page* PageFromAddress(void* address) { - char* memBlock = reinterpret_cast(reinterpret_cast(address) & ~static_cast(m_pageSize-1)); + char* memBlock = reinterpret_cast(reinterpret_cast(address) & ~static_cast(m_pageSize - 1)); memBlock += m_pageSize - sizeof(Page); Page* page = reinterpret_cast(memBlock); if (!page->m_magic.Validate()) @@ -291,19 +297,19 @@ namespace AZ ThreadPoolSchema::SetThreadPoolData m_threadPoolSetter; // Fox X64 we push/pop pages using the m_mutex to sync. Pages are - typedef Bucket::PageListType FreePagesType; - FreePagesType m_freePages; - AZStd::vector m_threads; ///< Array with all separate thread data. Used to traverse end free elements. + using FreePagesType = Bucket::PageListType; + FreePagesType m_freePages; + AZStd::vector m_threads; ///< Array with all separate thread data. Used to traverse end free elements. - IAllocatorAllocate* m_pageAllocator; - void* m_staticDataBlock; - size_t m_numStaticPages; - size_t m_pageSize; - size_t m_minAllocationSize; - size_t m_maxAllocationSize; - bool m_isDynamic; + IAllocatorAllocate* m_pageAllocator; + void* m_staticDataBlock; + size_t m_numStaticPages; + size_t m_pageSize; + size_t m_minAllocationSize; + size_t m_maxAllocationSize; + bool m_isDynamic; // TODO rbbaklov Changed to recursive_mutex from mutex for Linux support. - AZStd::recursive_mutex m_mutex; + AZStd::recursive_mutex m_mutex; }; struct ThreadPoolData @@ -313,1092 +319,1090 @@ namespace AZ ThreadPoolData(ThreadPoolSchemaImpl* alloc, size_t pageSize, size_t minAllocationSize, size_t maxAllocationSize); ~ThreadPoolData(); - typedef PoolAllocation AllocatorType; + using AllocatorType = PoolAllocation; /** - * Stack with freed elements from other threads. We don't need stamped stack since the ABA problem can not - * happen here. We push from many threads and pop from only one (we don't push from it). - */ - typedef AZStd::lock_free_intrusive_stack > FreedElementsStack; + * Stack with freed elements from other threads. We don't need stamped stack since the ABA problem can not + * happen here. We push from many threads and pop from only one (we don't push from it). + */ + using FreedElementsStack = AZStd::lock_free_intrusive_stack< + ThreadPoolSchemaImpl::Page::FakeNodeLF, + AZStd::lock_free_intrusive_stack_base_hook>; - AllocatorType m_allocator; - FreedElementsStack m_freedElements; + AllocatorType m_allocator; + FreedElementsStack m_freedElements; }; -} +} // namespace AZ -using namespace AZ; - -//========================================================================= -// PoolAllocation -// [9/09/2009] -//========================================================================= -template -PoolAllocation::PoolAllocation(Allocator* alloc, size_t pageSize, size_t minAllocationSize, size_t maxAllocationSize) - : m_allocator(alloc) - , m_pageSize(pageSize) - , m_numBytesAllocated(0) +namespace AZ { - AZ_Assert(alloc->m_pageAllocator, "We need the page allocator setup!"); - AZ_Assert(pageSize >= maxAllocationSize * 4, "We need to fit at least 4 objects in a pool! Increase your page size! Page %d MaxAllocationSize %d",pageSize,maxAllocationSize); - AZ_Assert(minAllocationSize == maxAllocationSize || ((minAllocationSize)&(minAllocationSize - 1)) == 0, "Min allocation should be either equal to max allocation size or power of two"); - - m_minAllocationSize = AZ::GetMax(minAllocationSize, size_t(8)); - m_maxAllocationSize = AZ::GetMax(maxAllocationSize, minAllocationSize); - - m_minAllocationShift = 0; - for (size_t i = 1; i < sizeof(unsigned int)*8; i++) + //========================================================================= + // PoolAllocation + // [9/09/2009] + //========================================================================= + template + PoolAllocation::PoolAllocation(Allocator* alloc, size_t pageSize, size_t minAllocationSize, size_t maxAllocationSize) + : m_allocator(alloc) + , m_pageSize(pageSize) + , m_numBytesAllocated(0) { - if (m_minAllocationSize >> i == 0) + AZ_Assert(alloc->m_pageAllocator, "We need the page allocator setup!"); + AZ_Assert( + pageSize >= maxAllocationSize * 4, + "We need to fit at least 4 objects in a pool! Increase your page size! Page %d MaxAllocationSize %d", pageSize, + maxAllocationSize); + AZ_Assert( + minAllocationSize == maxAllocationSize || ((minAllocationSize) & (minAllocationSize - 1)) == 0, + "Min allocation should be either equal to max allocation size or power of two"); + + m_minAllocationSize = AZ::GetMax(minAllocationSize, size_t(8)); + m_maxAllocationSize = AZ::GetMax(maxAllocationSize, minAllocationSize); + + m_minAllocationShift = 0; + for (size_t i = 1; i < sizeof(unsigned int) * 8; i++) { - m_minAllocationShift = i-1; - break; - } - } - - AZ_Assert(m_maxAllocationSize % m_minAllocationSize == 0, "You need to be able to divide m_maxAllocationSize (%d) / m_minAllocationSize (%d) without fraction!", m_maxAllocationSize, m_minAllocationSize); - m_numBuckets = m_maxAllocationSize / m_minAllocationSize; - AZ_Assert(m_numBuckets <= 0xffff, "You can't have more than 65535 number of buckets! We need to increase the index size!"); - m_buckets = reinterpret_cast(alloc->m_pageAllocator->Allocate(sizeof(BucketType)*m_numBuckets, AZStd::alignment_of::value)); - for (size_t i = 0; i < m_numBuckets; ++i) - { - new(m_buckets + i)BucketType(); - } -} - -//========================================================================= -// ~PoolAllocation -// [9/09/2009] -//========================================================================= -template -PoolAllocation::~PoolAllocation() -{ - GarbageCollect(true); - - for (size_t i = 0; i < m_numBuckets; ++i) - { - m_buckets[i].~BucketType(); - } - m_allocator->m_pageAllocator->DeAllocate(m_buckets, sizeof(BucketType) * m_numBuckets); -} - -//========================================================================= -// Allocate -// [9/09/2009] -//========================================================================= -template -AZ_INLINE void* -PoolAllocation::Allocate(size_t byteSize, size_t alignment) -{ - AZ_Assert(byteSize>0, "You can not allocate 0 bytes!"); - AZ_Assert(alignment>0&&(alignment&(alignment-1))==0, "Alignment must be >0 and power of 2!"); - - // pad the size to the min allocation size. - byteSize = AZ::SizeAlignUp(byteSize, m_minAllocationSize); - byteSize = AZ::SizeAlignUp(byteSize, alignment); - - if (byteSize > m_maxAllocationSize) - { - AZ_Assert(false, "Allocation size (%d) is too big (max: %d) for pools!", byteSize, m_maxAllocationSize); - return nullptr; - } - - u32 bucketIndex = static_cast((byteSize >> m_minAllocationShift)-1); - BucketType& bucket = m_buckets[bucketIndex]; - PageType* page = nullptr; - if (!bucket.m_pages.empty()) - { - page = &bucket.m_pages.front(); - - // check if we have free slot in the page - if (page->m_freeList.empty()) - { - page = nullptr; - } - else if (page->m_freeList.size()==1) - { - // if we have only 1 free slot this allocation will - // fill the page, so put in on the back - bucket.m_pages.pop_front(); - bucket.m_pages.push_back(*page); - } - } - if (!page) - { - page = m_allocator->PopFreePage(); - if (page) - { - // We have any pages available on free page stack. - if (page->m_bin != bucketIndex) // if this page was used the same bucket we are ready to roll. + if (m_minAllocationSize >> i == 0) { - size_t elementSize = byteSize; - size_t pageDataSize = m_pageSize - sizeof(PageType); - page->SetupFreeList(elementSize, pageDataSize); - page->m_bin = bucketIndex; - page->m_elementSize = static_cast(elementSize); - page->m_maxNumElements = static_cast(pageDataSize / elementSize); + m_minAllocationShift = i - 1; + break; } } - else + + AZ_Assert( + m_maxAllocationSize % m_minAllocationSize == 0, + "You need to be able to divide m_maxAllocationSize (%d) / m_minAllocationSize (%d) without fraction!", m_maxAllocationSize, + m_minAllocationSize); + m_numBuckets = m_maxAllocationSize / m_minAllocationSize; + AZ_Assert(m_numBuckets <= 0xffff, "You can't have more than 65535 number of buckets! We need to increase the index size!"); + m_buckets = reinterpret_cast( + alloc->m_pageAllocator->Allocate(sizeof(BucketType) * m_numBuckets, AZStd::alignment_of::value)); + for (size_t i = 0; i < m_numBuckets; ++i) { - // We need to align each page on it's size, this way we can quickly find which page the pointer belongs to. - page = m_allocator->ConstructPage(byteSize); - page->m_bin = bucketIndex; + new (m_buckets + i) BucketType(); } - bucket.m_pages.push_front(*page); } - // The data address and the fake node address are shared. - void* address = &page->m_freeList.front(); - page->m_freeList.pop_front(); - - m_numBytesAllocated += byteSize; - - return address; -} - -//========================================================================= -// DeAllocate -// [9/09/2009] -//========================================================================= -template -AZ_INLINE void -PoolAllocation::DeAllocate(void* ptr) -{ - PageType* page = m_allocator->PageFromAddress(ptr); - if (page==nullptr) + //========================================================================= + // ~PoolAllocation + // [9/09/2009] + //========================================================================= + template + PoolAllocation::~PoolAllocation() { - AZ_Error("Memory", false, "Address 0x%08x is not in the ThreadPool!", ptr); - return; - } + GarbageCollect(true); - // (pageSize - info struct at the end) / (element size) - size_t maxElementsPerBucket = page->m_maxNumElements; - - size_t numFreeNodes = page->m_freeList.size(); - typename PageType::FakeNode* node = new(ptr) typename PageType::FakeNode(); - page->m_freeList.push_front(*node); - - if (numFreeNodes==0) - { - // if the page was full before sort at the front - BucketType& bucket = m_buckets[page->m_bin]; - bucket.m_pages.erase(*page); - bucket.m_pages.push_front(*page); - } - else if (numFreeNodes == maxElementsPerBucket-1) - { - // push to the list of free pages - BucketType& bucket = m_buckets[page->m_bin]; - PageType* frontPage = &bucket.m_pages.front(); - if (frontPage != page) + for (size_t i = 0; i < m_numBuckets; ++i) { - bucket.m_pages.erase(*page); - // check if the front page is full if so push the free page to the front otherwise push - // push it on the free pages list so it can be reused by other bins. - if (frontPage->m_freeList.empty()) + m_buckets[i].~BucketType(); + } + m_allocator->m_pageAllocator->DeAllocate(m_buckets, sizeof(BucketType) * m_numBuckets); + } + + //========================================================================= + // Allocate + // [9/09/2009] + //========================================================================= + template + AZ_INLINE void* PoolAllocation::Allocate(size_t byteSize, size_t alignment) + { + AZ_Assert(byteSize > 0, "You can not allocate 0 bytes!"); + AZ_Assert(alignment > 0 && (alignment & (alignment - 1)) == 0, "Alignment must be >0 and power of 2!"); + + // pad the size to the min allocation size. + byteSize = AZ::SizeAlignUp(byteSize, m_minAllocationSize); + byteSize = AZ::SizeAlignUp(byteSize, alignment); + + if (byteSize > m_maxAllocationSize) + { + AZ_Assert(false, "Allocation size (%d) is too big (max: %d) for pools!", byteSize, m_maxAllocationSize); + return nullptr; + } + + u32 bucketIndex = static_cast((byteSize >> m_minAllocationShift) - 1); + BucketType& bucket = m_buckets[bucketIndex]; + PageType* page = nullptr; + if (!bucket.m_pages.empty()) + { + page = &bucket.m_pages.front(); + + // check if we have free slot in the page + if (page->m_freeList.empty()) { - bucket.m_pages.push_front(*page); + page = nullptr; + } + else if (page->m_freeList.size() == 1) + { + // if we have only 1 free slot this allocation will + // fill the page, so put in on the back + bucket.m_pages.pop_front(); + bucket.m_pages.push_back(*page); + } + } + if (!page) + { + page = m_allocator->PopFreePage(); + if (page) + { + // We have any pages available on free page stack. + if (page->m_bin != bucketIndex) // if this page was used the same bucket we are ready to roll. + { + size_t elementSize = byteSize; + size_t pageDataSize = m_pageSize - sizeof(PageType); + page->SetupFreeList(elementSize, pageDataSize); + page->m_bin = bucketIndex; + page->m_elementSize = static_cast(elementSize); + page->m_maxNumElements = static_cast(pageDataSize / elementSize); + } } else { - m_allocator->PushFreePage(page); + // We need to align each page on it's size, this way we can quickly find which page the pointer belongs to. + page = m_allocator->ConstructPage(byteSize); + page->m_bin = bucketIndex; } + bucket.m_pages.push_front(*page); } - else if (frontPage->m_next != nullptr) + + // The data address and the fake node address are shared. + void* address = &page->m_freeList.front(); + page->m_freeList.pop_front(); + + m_numBytesAllocated += byteSize; + + return address; + } + + //========================================================================= + // DeAllocate + // [9/09/2009] + //========================================================================= + template + AZ_INLINE void PoolAllocation::DeAllocate(void* ptr) + { + PageType* page = m_allocator->PageFromAddress(ptr); + if (page == nullptr) { - // if the next page has free slots free the current page - if (frontPage->m_next->m_freeList.size() < maxElementsPerBucket) + AZ_Error("Memory", false, "Address 0x%08x is not in the ThreadPool!", ptr); + return; + } + + // (pageSize - info struct at the end) / (element size) + size_t maxElementsPerBucket = page->m_maxNumElements; + + size_t numFreeNodes = page->m_freeList.size(); + typename PageType::FakeNode* node = new (ptr) typename PageType::FakeNode(); + page->m_freeList.push_front(*node); + + if (numFreeNodes == 0) + { + // if the page was full before sort at the front + BucketType& bucket = m_buckets[page->m_bin]; + bucket.m_pages.erase(*page); + bucket.m_pages.push_front(*page); + } + else if (numFreeNodes == maxElementsPerBucket - 1) + { + // push to the list of free pages + BucketType& bucket = m_buckets[page->m_bin]; + PageType* frontPage = &bucket.m_pages.front(); + if (frontPage != page) { bucket.m_pages.erase(*page); - m_allocator->PushFreePage(page); - } - } - } - - m_numBytesAllocated -= page->m_elementSize; -} - -//========================================================================= -// AllocationSize -// [11/22/2010] -//========================================================================= -template -AZ_INLINE size_t -PoolAllocation::AllocationSize(void* ptr) -{ - PageType* page = m_allocator->PageFromAddress(ptr); - size_t elementSize; - if (page) - { - elementSize = page->m_elementSize; - } - else - { - elementSize = 0; - } - - return elementSize; -} - -//========================================================================= -// GarbageCollect -// [3/1/2012] -//========================================================================= -template -AZ_INLINE void -PoolAllocation::GarbageCollect(bool isForceFreeAllPages) -{ - // Free empty pages in the buckets (or better be empty) - for (unsigned int i = 0; i < (unsigned int)m_numBuckets; ++i) - { - // (pageSize - info struct at the end) / (element size) - size_t maxElementsPerBucket = (m_pageSize - sizeof(PageType)) / ((i+1) << m_minAllocationShift); - - typename BucketType::PageListType& pages = m_buckets[i].m_pages; - while (!pages.empty()) - { - PageType& page = pages.front(); - pages.pop_front(); - if (page.m_freeList.size()==maxElementsPerBucket || isForceFreeAllPages) - { - if (!m_allocator->IsInStaticBlock(&page)) + // check if the front page is full if so push the free page to the front otherwise push + // push it on the free pages list so it can be reused by other bins. + if (frontPage->m_freeList.empty()) { - m_allocator->FreePage(&page); + bucket.m_pages.push_front(*page); } else { - m_allocator->PushFreePage(&page); + m_allocator->PushFreePage(page); + } + } + else if (frontPage->m_next != nullptr) + { + // if the next page has free slots free the current page + if (frontPage->m_next->m_freeList.size() < maxElementsPerBucket) + { + bucket.m_pages.erase(*page); + m_allocator->PushFreePage(page); + } + } + } + + m_numBytesAllocated -= page->m_elementSize; + } + + //========================================================================= + // AllocationSize + // [11/22/2010] + //========================================================================= + template + AZ_INLINE size_t PoolAllocation::AllocationSize(void* ptr) + { + PageType* page = m_allocator->PageFromAddress(ptr); + size_t elementSize; + if (page) + { + elementSize = page->m_elementSize; + } + else + { + elementSize = 0; + } + + return elementSize; + } + + //========================================================================= + // GarbageCollect + // [3/1/2012] + //========================================================================= + template + AZ_INLINE void PoolAllocation::GarbageCollect(bool isForceFreeAllPages) + { + // Free empty pages in the buckets (or better be empty) + for (unsigned int i = 0; i < (unsigned int)m_numBuckets; ++i) + { + // (pageSize - info struct at the end) / (element size) + size_t maxElementsPerBucket = (m_pageSize - sizeof(PageType)) / ((i + 1) << m_minAllocationShift); + + typename BucketType::PageListType& pages = m_buckets[i].m_pages; + while (!pages.empty()) + { + PageType& page = pages.front(); + pages.pop_front(); + if (page.m_freeList.size() == maxElementsPerBucket || isForceFreeAllPages) + { + if (!m_allocator->IsInStaticBlock(&page)) + { + m_allocator->FreePage(&page); + } + else + { + m_allocator->PushFreePage(&page); + } } } } } -} -////////////////////////////////////////////////////////////////////////// -////////////////////////////////////////////////////////////////////////// -// PollAllocator -////////////////////////////////////////////////////////////////////////// -////////////////////////////////////////////////////////////////////////// + ////////////////////////////////////////////////////////////////////////// + ////////////////////////////////////////////////////////////////////////// + // PollAllocator + ////////////////////////////////////////////////////////////////////////// + ////////////////////////////////////////////////////////////////////////// -//========================================================================= -// PoolSchema -// [9/15/2009] -//========================================================================= -PoolSchema::PoolSchema(const Descriptor& desc) - : m_impl(nullptr) -{ - (void)desc; // ignored here, applied in Create() -} - -//========================================================================= -// ~PoolSchema -// [9/15/2009] -//========================================================================= -PoolSchema::~PoolSchema() -{ - AZ_Assert(m_impl==nullptr, "You did not destroy the pool schema!"); - delete m_impl; -} - -//========================================================================= -// Create -// [9/15/2009] -//========================================================================= -bool PoolSchema::Create(const Descriptor& desc) -{ - AZ_Assert(m_impl==nullptr, "PoolSchema already created!"); - if (m_impl == nullptr) + //========================================================================= + // PoolSchema + // [9/15/2009] + //========================================================================= + PoolSchema::PoolSchema(const Descriptor& desc) + : m_impl(nullptr) { - m_impl = aznew PoolSchemaImpl(desc); + (void)desc; // ignored here, applied in Create() } - return (m_impl!=nullptr); -} -//========================================================================= -// ~Destroy -// [9/15/2009] -//========================================================================= -bool PoolSchema::Destroy() -{ - delete m_impl; - m_impl = nullptr; - return true; -} - -//========================================================================= -// Allocate -// [9/15/2009] -//========================================================================= -PoolSchema::pointer_type -PoolSchema::Allocate(size_type byteSize, size_type alignment, int flags, const char* name, const char* fileName, int lineNum, unsigned int suppressStackRecord) -{ - (void)flags; - (void)name; - (void)fileName; - (void)lineNum; - (void)suppressStackRecord; - return m_impl->Allocate(byteSize, alignment); -} - -//========================================================================= -// DeAllocate -// [9/15/2009] -//========================================================================= -void -PoolSchema::DeAllocate(pointer_type ptr, size_type byteSize, size_type alignment) -{ - (void)byteSize; - (void)alignment; - m_impl->DeAllocate(ptr); -} - -//========================================================================= -// Resize -// [10/14/2018] -//========================================================================= -PoolSchema::size_type -PoolSchema::Resize(pointer_type ptr, size_type newSize) -{ - (void)ptr; - (void)newSize; - return 0; // unsupported -} - -//========================================================================= -// ReAllocate -// [10/14/2018] -//========================================================================= -PoolSchema::pointer_type -PoolSchema::ReAllocate(pointer_type ptr, size_type newSize, size_type newAlignment) -{ - (void)ptr; - (void)newSize; - (void)newAlignment; - AZ_Assert(false, "unsupported"); - - return ptr; -} - -//========================================================================= -// AllocationSize -// [11/22/2010] -//========================================================================= -PoolSchema::size_type -PoolSchema::AllocationSize(pointer_type ptr) -{ - return m_impl->AllocationSize(ptr); -} - -//========================================================================= -// DeAllocate -// [9/15/2009] -//========================================================================= -void -PoolSchema::GarbageCollect() -{ - // External requests for garbage collection may come from any thread, and the - // garbage collection operation isn't threadsafe, which can lead to crashes. - // - // Due to the low memory consumption of this allocator in practice on Dragonfly - // (~3kb) it makes sense to not bother with garbage collection and leave it to - // occur exclusively in the destruction of the allocator. - // - // TODO: A better solution needs to be found for integrating back into mainline - // Open 3D Engine. - //m_impl->GarbageCollect(); -} - -auto PoolSchema::GetMaxContiguousAllocationSize() const -> size_type -{ - return m_impl->m_allocator.m_maxAllocationSize; -} - -//========================================================================= -// NumAllocatedBytes -// [11/1/2010] -//========================================================================= -PoolSchema::size_type -PoolSchema::NumAllocatedBytes() const -{ - return m_impl->m_allocator.m_numBytesAllocated; -} - -//========================================================================= -// Capacity -// [11/1/2010] -//========================================================================= -PoolSchema::size_type -PoolSchema::Capacity() const -{ - return m_impl->m_numStaticPages * m_impl->m_pageSize; -} - -//========================================================================= -// GetPageAllocator -// [11/17/2010] -//========================================================================= -IAllocatorAllocate* -PoolSchema::GetSubAllocator() -{ - return m_impl->m_pageAllocator; -} - - -////////////////////////////////////////////////////////////////////////// -////////////////////////////////////////////////////////////////////////// -// PollAllocator Implementation -////////////////////////////////////////////////////////////////////////// -////////////////////////////////////////////////////////////////////////// - -//========================================================================= -// PoolSchemaImpl -// [9/15/2009] -//========================================================================= -PoolSchemaImpl::PoolSchemaImpl(const PoolSchema::Descriptor& desc) - : m_pageAllocator(desc.m_pageAllocator ? desc.m_pageAllocator : &AllocatorInstance::Get()) - , m_allocator(this, desc.m_pageSize, desc.m_minAllocationSize, desc.m_maxAllocationSize) - , m_staticDataBlock(nullptr) - , m_numStaticPages(desc.m_numStaticPages) - , m_isDynamic(desc.m_isDynamic) - , m_pageSize(desc.m_pageSize) -{ - if (m_numStaticPages) + //========================================================================= + // ~PoolSchema + // [9/15/2009] + //========================================================================= + PoolSchema::~PoolSchema() { - // We store the page struct at the end of the block - char* memBlock = reinterpret_cast(m_pageAllocator->Allocate(m_pageSize*m_numStaticPages, m_pageSize, 0, "AZSystem::PoolAllocation::Page static array", __FILE__, __LINE__)); - m_staticDataBlock = memBlock; - size_t pageDataSize = m_pageSize - sizeof(Page); - for (unsigned int i = 0; i < m_numStaticPages; ++i) + AZ_Assert(m_impl == nullptr, "You did not destroy the pool schema!"); + delete m_impl; + } + + //========================================================================= + // Create + // [9/15/2009] + //========================================================================= + bool PoolSchema::Create(const Descriptor& desc) + { + AZ_Assert(m_impl == nullptr, "PoolSchema already created!"); + if (m_impl == nullptr) { - Page* page = new(memBlock+pageDataSize)Page(); - page->m_bin = 0xffffffff; - page->m_elementSize = 0; - page->m_maxNumElements = 0; - PushFreePage(page); - memBlock += m_pageSize; + m_impl = aznew PoolSchemaImpl(desc); + } + return (m_impl != nullptr); + } + + //========================================================================= + // ~Destroy + // [9/15/2009] + //========================================================================= + bool PoolSchema::Destroy() + { + delete m_impl; + m_impl = nullptr; + return true; + } + + //========================================================================= + // Allocate + // [9/15/2009] + //========================================================================= + PoolSchema::pointer_type PoolSchema::Allocate( + size_type byteSize, + size_type alignment, + int flags, + const char* name, + const char* fileName, + int lineNum, + unsigned int suppressStackRecord) + { + (void)flags; + (void)name; + (void)fileName; + (void)lineNum; + (void)suppressStackRecord; + return m_impl->Allocate(byteSize, alignment); + } + + //========================================================================= + // DeAllocate + // [9/15/2009] + //========================================================================= + void PoolSchema::DeAllocate(pointer_type ptr, size_type byteSize, size_type alignment) + { + (void)byteSize; + (void)alignment; + m_impl->DeAllocate(ptr); + } + + //========================================================================= + // Resize + // [10/14/2018] + //========================================================================= + PoolSchema::size_type PoolSchema::Resize(pointer_type ptr, size_type newSize) + { + (void)ptr; + (void)newSize; + return 0; // unsupported + } + + //========================================================================= + // ReAllocate + // [10/14/2018] + //========================================================================= + PoolSchema::pointer_type PoolSchema::ReAllocate(pointer_type ptr, size_type newSize, size_type newAlignment) + { + (void)ptr; + (void)newSize; + (void)newAlignment; + AZ_Assert(false, "unsupported"); + + return ptr; + } + + //========================================================================= + // AllocationSize + // [11/22/2010] + //========================================================================= + PoolSchema::size_type PoolSchema::AllocationSize(pointer_type ptr) + { + return m_impl->AllocationSize(ptr); + } + + //========================================================================= + // DeAllocate + // [9/15/2009] + //========================================================================= + void PoolSchema::GarbageCollect() + { + // External requests for garbage collection may come from any thread, and the + // garbage collection operation isn't threadsafe, which can lead to crashes. + // + // Due to the low memory consumption of this allocator in practice on Dragonfly + // (~3kb) it makes sense to not bother with garbage collection and leave it to + // occur exclusively in the destruction of the allocator. + // + // TODO: A better solution needs to be found for integrating back into mainline + // Open 3D Engine. + // m_impl->GarbageCollect(); + } + + auto PoolSchema::GetMaxContiguousAllocationSize() const -> size_type + { + return m_impl->m_allocator.m_maxAllocationSize; + } + + //========================================================================= + // NumAllocatedBytes + // [11/1/2010] + //========================================================================= + PoolSchema::size_type PoolSchema::NumAllocatedBytes() const + { + return m_impl->m_allocator.m_numBytesAllocated; + } + + //========================================================================= + // Capacity + // [11/1/2010] + //========================================================================= + PoolSchema::size_type PoolSchema::Capacity() const + { + return m_impl->m_numStaticPages * m_impl->m_pageSize; + } + + //========================================================================= + // GetPageAllocator + // [11/17/2010] + //========================================================================= + IAllocatorAllocate* PoolSchema::GetSubAllocator() + { + return m_impl->m_pageAllocator; + } + + ////////////////////////////////////////////////////////////////////////// + ////////////////////////////////////////////////////////////////////////// + // PollAllocator Implementation + ////////////////////////////////////////////////////////////////////////// + ////////////////////////////////////////////////////////////////////////// + + //========================================================================= + // PoolSchemaImpl + // [9/15/2009] + //========================================================================= + PoolSchemaImpl::PoolSchemaImpl(const PoolSchema::Descriptor& desc) + : m_pageAllocator(desc.m_pageAllocator ? desc.m_pageAllocator : &AllocatorInstance::Get()) + , m_allocator(this, desc.m_pageSize, desc.m_minAllocationSize, desc.m_maxAllocationSize) + , m_staticDataBlock(nullptr) + , m_numStaticPages(desc.m_numStaticPages) + , m_isDynamic(desc.m_isDynamic) + , m_pageSize(desc.m_pageSize) + { + if (m_numStaticPages) + { + // We store the page struct at the end of the block + char* memBlock = reinterpret_cast(m_pageAllocator->Allocate( + m_pageSize * m_numStaticPages, m_pageSize, 0, "AZSystem::PoolAllocation::Page static array", __FILE__, __LINE__)); + m_staticDataBlock = memBlock; + size_t pageDataSize = m_pageSize - sizeof(Page); + for (unsigned int i = 0; i < m_numStaticPages; ++i) + { + Page* page = new (memBlock + pageDataSize) Page(); + page->m_bin = 0xffffffff; + page->m_elementSize = 0; + page->m_maxNumElements = 0; + PushFreePage(page); + memBlock += m_pageSize; + } } } -} -//========================================================================= -// ~PoolSchemaImpl -// [9/15/2009] -//========================================================================= -PoolSchemaImpl::~PoolSchemaImpl() -{ - // Force free all pages - m_allocator.GarbageCollect(true); - - // Free all unused memory - GarbageCollect(); - - if (m_staticDataBlock) + //========================================================================= + // ~PoolSchemaImpl + // [9/15/2009] + //========================================================================= + PoolSchemaImpl::~PoolSchemaImpl() { - while (!m_freePages.empty()) + // Force free all pages + m_allocator.GarbageCollect(true); + + // Free all unused memory + GarbageCollect(); + + if (m_staticDataBlock) { - Page* page = &m_freePages.front(); - (void)page; - m_freePages.pop_front(); - AZ_Assert(IsInStaticBlock(page), "All dynamic pages should be deleted by now!"); - } - ; - - char* memBlock = reinterpret_cast(m_staticDataBlock); - size_t pageDataSize = m_pageSize - sizeof(Page); - for (unsigned int i = 0; i < m_numStaticPages; ++i) - { - Page* page = reinterpret_cast(memBlock+pageDataSize); - page->~Page(); - memBlock += m_pageSize; - } - m_pageAllocator->DeAllocate(m_staticDataBlock); - } -} - -//========================================================================= -// Allocate -// [9/15/2009] -//========================================================================= -PoolSchema::pointer_type -PoolSchemaImpl::Allocate(PoolSchema::size_type byteSize, PoolSchema::size_type alignment, int flags) -{ - //AZ_Warning("Memory",m_ownerThread==AZStd::this_thread::get_id(),"You can't allocation from a different context/thread, use ThreadPoolAllocator!"); - (void)flags; - void* address = m_allocator.Allocate(byteSize, alignment); - return address; -} - -//========================================================================= -// DeAllocate -// [9/15/2009] -//========================================================================= -void -PoolSchemaImpl::DeAllocate(PoolSchema::pointer_type ptr) -{ - //AZ_Warning("Memory",m_ownerThread==AZStd::this_thread::get_id(),"You can't deallocate from a different context/thread, use ThreadPoolAllocator!"); - m_allocator.DeAllocate(ptr); -} - -//========================================================================= -// AllocationSize -// [11/22/2010] -//========================================================================= -PoolSchema::size_type -PoolSchemaImpl::AllocationSize(PoolSchema::pointer_type ptr) -{ - //AZ_Warning("Memory",m_ownerThread==AZStd::this_thread::get_id(),"You can't use PoolAllocator from a different context/thread, use ThreadPoolAllocator!"); - return m_allocator.AllocationSize(ptr); -} - -//========================================================================= -// Pop -// [9/15/2009] -//========================================================================= -AZ_FORCE_INLINE PoolSchemaImpl::Page* -PoolSchemaImpl::PopFreePage() -{ - Page* page = nullptr; - if (!m_freePages.empty()) - { - page = &m_freePages.front(); - m_freePages.pop_front(); - } - return page; -} - -//========================================================================= -// Push -// [9/15/2009] -//========================================================================= -AZ_INLINE void -PoolSchemaImpl::PushFreePage(Page* page) -{ - m_freePages.push_front(*page); -} - -//========================================================================= -// PurgePages -// [9/11/2009] -//========================================================================= -void -PoolSchemaImpl::GarbageCollect() -{ - //if( m_ownerThread == AZStd::this_thread::get_id() ) - { - if (m_isDynamic) - { - m_allocator.GarbageCollect(); - - Bucket::PageListType staticPages; while (!m_freePages.empty()) { Page* page = &m_freePages.front(); + (void)page; m_freePages.pop_front(); - if (IsInStaticBlock(page)) - { - staticPages.push_front(*page); - } - else - { - FreePage(page); - } - } + AZ_Assert(IsInStaticBlock(page), "All dynamic pages should be deleted by now!"); + }; - while (!staticPages.empty()) + char* memBlock = reinterpret_cast(m_staticDataBlock); + size_t pageDataSize = m_pageSize - sizeof(Page); + for (unsigned int i = 0; i < m_numStaticPages; ++i) { - Page* page = &staticPages.front(); - staticPages.pop_front(); - m_freePages.push_front(*page); + Page* page = reinterpret_cast(memBlock + pageDataSize); + page->~Page(); + memBlock += m_pageSize; } - } - } -} - -//========================================================================= -// SetupFreeList -// [9/09/2009] -//========================================================================= -AZ_FORCE_INLINE void -PoolSchemaImpl::Page::SetupFreeList(size_t elementSize, size_t pageDataBlockSize) -{ - char* pageData = reinterpret_cast(this) - pageDataBlockSize; - m_freeList.clear(); - // setup free list - size_t numElements = pageDataBlockSize / elementSize; - for (unsigned int i = 0; i < numElements; ++i) - { - char* address = pageData+i*elementSize; - Page::FakeNode* node = new(address) Page::FakeNode(); - m_freeList.push_back(*node); - } -} - -////////////////////////////////////////////////////////////////////////// -////////////////////////////////////////////////////////////////////////// -// ThreadPoolSchema -////////////////////////////////////////////////////////////////////////// -////////////////////////////////////////////////////////////////////////// - -//========================================================================= -// ThreadPoolSchema -// [9/15/2009] -//========================================================================= -ThreadPoolSchema::ThreadPoolSchema(GetThreadPoolData getThreadPoolData, SetThreadPoolData setThreadPoolData) - : m_impl(nullptr) - , m_threadPoolGetter(getThreadPoolData) - , m_threadPoolSetter(setThreadPoolData) -{ -} - -//========================================================================= -// ~ThreadPoolSchema -// [9/15/2009] -//========================================================================= -ThreadPoolSchema::~ThreadPoolSchema() -{ - AZ_Assert(m_impl==nullptr, "You did not destroy the thread pool schema!"); - delete m_impl; -} - -//========================================================================= -// Create -// [9/15/2009] -//========================================================================= -bool ThreadPoolSchema::Create(const Descriptor& desc) -{ - AZ_Assert(m_impl==nullptr, "PoolSchema already created!"); - if (m_impl == nullptr) - { - m_impl = aznew ThreadPoolSchemaImpl(desc, m_threadPoolGetter, m_threadPoolSetter); - } - return (m_impl!=nullptr); -} - -//========================================================================= -// Destroy -// [9/15/2009] -//========================================================================= -bool ThreadPoolSchema::Destroy() -{ - delete m_impl; - m_impl = nullptr; - return true; -} -//========================================================================= -// Allocate -// [9/15/2009] -//========================================================================= -ThreadPoolSchema::pointer_type -ThreadPoolSchema::Allocate(size_type byteSize, size_type alignment, int flags, const char* name, const char* fileName, int lineNum, unsigned int suppressStackRecord) -{ - (void)flags; - (void)name; - (void)fileName; - (void)lineNum; - (void)suppressStackRecord; - return m_impl->Allocate(byteSize, alignment); -} - -//========================================================================= -// DeAllocate -// [9/15/2009] -//========================================================================= -void -ThreadPoolSchema::DeAllocate(pointer_type ptr, size_type byteSize, size_type alignment) -{ - (void)byteSize; - (void)alignment; - m_impl->DeAllocate(ptr); -} - -//========================================================================= -// Resize -// [10/14/2018] -//========================================================================= -ThreadPoolSchema::size_type -ThreadPoolSchema::Resize(pointer_type ptr, size_type newSize) -{ - (void)ptr; - (void)newSize; - return 0; // unsupported -} - -//========================================================================= -// ReAllocate -// [10/14/2018] -//========================================================================= -ThreadPoolSchema::pointer_type -ThreadPoolSchema::ReAllocate(pointer_type ptr, size_type newSize, size_type newAlignment) -{ - (void)ptr; - (void)newSize; - (void)newAlignment; - AZ_Assert(false, "unsupported"); - - return ptr; -} - -//========================================================================= -// AllocationSize -// [11/22/2010] -//========================================================================= -ThreadPoolSchema::size_type -ThreadPoolSchema::AllocationSize(pointer_type ptr) -{ - return m_impl->AllocationSize(ptr); -} - -//========================================================================= -// DeAllocate -// [9/15/2009] -//========================================================================= -void -ThreadPoolSchema::GarbageCollect() -{ - m_impl->GarbageCollect(); -} - -auto ThreadPoolSchema::GetMaxContiguousAllocationSize() const -> size_type -{ - return m_impl->m_maxAllocationSize; -} - -//========================================================================= -// NumAllocatedBytes -// [11/1/2010] -//========================================================================= -ThreadPoolSchema::size_type -ThreadPoolSchema::NumAllocatedBytes() const -{ - size_type bytesAllocated = 0; - { - AZStd::lock_guard lock(m_impl->m_mutex); - for (size_t i = 0; i < m_impl->m_threads.size(); ++i) - { - bytesAllocated += m_impl->m_threads[i]->m_allocator.m_numBytesAllocated; - } - } - return bytesAllocated; -} - -//========================================================================= -// Capacity -// [11/1/2010] -//========================================================================= -ThreadPoolSchema::size_type -ThreadPoolSchema::Capacity() const -{ - return m_impl->m_numStaticPages * m_impl->m_pageSize; -} - -//========================================================================= -// GetPageAllocator -// [11/17/2010] -//========================================================================= -IAllocatorAllocate* -ThreadPoolSchema::GetSubAllocator() -{ - return m_impl->m_pageAllocator; -} - - -//========================================================================= -// ThreadPoolSchemaImpl -// [9/15/2009] -//========================================================================= -ThreadPoolSchemaImpl::ThreadPoolSchemaImpl(const ThreadPoolSchema::Descriptor& desc, ThreadPoolSchema::GetThreadPoolData threadPoolGetter, ThreadPoolSchema::SetThreadPoolData threadPoolSetter) - : m_threadPoolGetter(threadPoolGetter) - , m_threadPoolSetter(threadPoolSetter) - , m_pageAllocator(desc.m_pageAllocator) - , m_staticDataBlock(nullptr) - , m_numStaticPages(desc.m_numStaticPages) - , m_pageSize(desc.m_pageSize) - , m_minAllocationSize(desc.m_minAllocationSize) - , m_maxAllocationSize(desc.m_maxAllocationSize) - , m_isDynamic(desc.m_isDynamic) -{ -# if AZ_TRAIT_OS_HAS_CRITICAL_SECTION_SPIN_COUNT - // In memory allocation case (usually tools) we might have high contention, - // using spin lock will improve performance. - SetCriticalSectionSpinCount(m_mutex.native_handle(), 4000); -# endif - - if (m_pageAllocator == nullptr) - { - m_pageAllocator = &AllocatorInstance::Get(); // use the SystemAllocator if no page allocator is provided - } - if (m_numStaticPages) - { - // We store the page struct at the end of the block - char* memBlock = reinterpret_cast(m_pageAllocator->Allocate(m_pageSize*m_numStaticPages, m_pageSize, 0, "AZSystem::ThreadPoolSchemaImpl::Page static array", __FILE__, __LINE__)); - m_staticDataBlock = memBlock; - size_t pageDataSize = m_pageSize - sizeof(Page); - for (unsigned int i = 0; i < m_numStaticPages; ++i) - { - Page* page = new(memBlock+pageDataSize)Page(m_threadPoolGetter()); - page->m_bin = 0xffffffff; - PushFreePage(page); - memBlock += m_pageSize; - } - } -} - -//========================================================================= -// ~ThreadPoolSchemaImpl -// [9/15/2009] -//========================================================================= -ThreadPoolSchemaImpl::~ThreadPoolSchemaImpl() -{ - // clean up all the thread data. - // IMPORTANT: We assume/rely that all threads (except the calling one) are or will - // destroyed before you create another instance of the pool allocation. - // This should generally be ok since the all allocators are singletons. - { - AZStd::lock_guard lock(m_mutex); - if (!m_threads.empty()) - { - for (size_t i = 0; i < m_threads.size(); ++i) - { - if (m_threads[i]) - { - // Force free all pages - delete m_threads[i]; - } - } - - /// reset the variable for the owner thread. - m_threadPoolSetter(nullptr); + m_pageAllocator->DeAllocate(m_staticDataBlock); } } - GarbageCollect(); - - if (m_staticDataBlock) + //========================================================================= + // Allocate + // [9/15/2009] + //========================================================================= + PoolSchema::pointer_type PoolSchemaImpl::Allocate(PoolSchema::size_type byteSize, PoolSchema::size_type alignment, int flags) { - Page* page; - { - AZStd::lock_guard lock(m_mutex); - while (!m_freePages.empty()) - { - page = &m_freePages.front(); - m_freePages.pop_front(); - AZ_Assert(IsInStaticBlock(page), "All dynamic pages should be free by now!"); - } - } - - char* memBlock = reinterpret_cast(m_staticDataBlock); - size_t pageDataSize = m_pageSize - sizeof(Page); - for (unsigned int i = 0; i < m_numStaticPages; ++i) - { - page = reinterpret_cast(memBlock+pageDataSize); - page->~Page(); - memBlock += m_pageSize; - } - m_pageAllocator->DeAllocate(m_staticDataBlock); - } -} - -//========================================================================= -// Allocate -// [9/15/2009] -//========================================================================= -ThreadPoolSchema::pointer_type -ThreadPoolSchemaImpl::Allocate(ThreadPoolSchema::size_type byteSize, ThreadPoolSchema::size_type alignment, int flags) -{ - (void)flags; - - ThreadPoolData* threadData = m_threadPoolGetter(); - - if (threadData == nullptr) - { - threadData = aznew ThreadPoolData(this, m_pageSize, m_minAllocationSize, m_maxAllocationSize); - m_threadPoolSetter(threadData); - { - AZStd::lock_guard lock(m_mutex); - m_threads.push_back(threadData); - } - } - else - { - // deallocate elements if they were freed from other threads - Page::FakeNodeLF* fakeLFNode; - while ((fakeLFNode = threadData->m_freedElements.pop())!=nullptr) - { - threadData->m_allocator.DeAllocate(fakeLFNode); - } + // AZ_Warning("Memory",m_ownerThread==AZStd::this_thread::get_id(),"You can't allocation from a different context/thread, use + // ThreadPoolAllocator!"); + (void)flags; + void* address = m_allocator.Allocate(byteSize, alignment); + return address; } - return threadData->m_allocator.Allocate(byteSize, alignment); -} + //========================================================================= + // DeAllocate + // [9/15/2009] + //========================================================================= + void PoolSchemaImpl::DeAllocate(PoolSchema::pointer_type ptr) + { + // AZ_Warning("Memory",m_ownerThread==AZStd::this_thread::get_id(),"You can't deallocate from a different context/thread, use + // ThreadPoolAllocator!"); + m_allocator.DeAllocate(ptr); + } -//========================================================================= -// DeAllocate -// [9/15/2009] -//========================================================================= -void -ThreadPoolSchemaImpl::DeAllocate(ThreadPoolSchema::pointer_type ptr) -{ - Page* page = PageFromAddress(ptr); - if (page==nullptr) + //========================================================================= + // AllocationSize + // [11/22/2010] + //========================================================================= + PoolSchema::size_type PoolSchemaImpl::AllocationSize(PoolSchema::pointer_type ptr) { - AZ_Error("Memory", false, "Address 0x%08x is not in the ThreadPool!", ptr); - return; + // AZ_Warning("Memory",m_ownerThread==AZStd::this_thread::get_id(),"You can't use PoolAllocator from a different context/thread, use + // ThreadPoolAllocator!"); + return m_allocator.AllocationSize(ptr); } - AZ_Assert(page->m_threadData!=nullptr, ("We must have valid page thread data for the page!")); - ThreadPoolData* threadData = m_threadPoolGetter(); - if (threadData == page->m_threadData) - { - // we can free here - threadData->m_allocator.DeAllocate(ptr); - } - else - { - // push this element to be deleted from it's own thread! - // cast the pointer to a fake lock free node - Page::FakeNodeLF* fakeLFNode = reinterpret_cast(ptr); -#ifdef AZ_DEBUG_BUILD - // we need to reset the fakeLFNode because we share the memory. - // otherwise we will assert the node is in the list - fakeLFNode->m_next = 0; -#endif - page->m_threadData->m_freedElements.push(*fakeLFNode); - } -} -//========================================================================= -// AllocationSize -// [11/22/2010] -//========================================================================= -ThreadPoolSchema::size_type -ThreadPoolSchemaImpl::AllocationSize(ThreadPoolSchema::pointer_type ptr) -{ - Page* page = PageFromAddress(ptr); - if (page==nullptr) + //========================================================================= + // Pop + // [9/15/2009] + //========================================================================= + AZ_FORCE_INLINE PoolSchemaImpl::Page* PoolSchemaImpl::PopFreePage() { - return 0; - } - AZ_Assert(page->m_threadData!=nullptr, ("We must have valid page thread data for the page!")); - return page->m_threadData->m_allocator.AllocationSize(ptr); -} - -//========================================================================= -// PopFreePage -// [9/15/2009] -//========================================================================= -AZ_INLINE ThreadPoolSchemaImpl::Page* -ThreadPoolSchemaImpl::PopFreePage() -{ - Page* page; - { - AZStd::lock_guard lock(m_mutex); - if (m_freePages.empty()) - { - page = nullptr; - } - else + Page* page = nullptr; + if (!m_freePages.empty()) { page = &m_freePages.front(); m_freePages.pop_front(); } + return page; } - if (page) - { -# ifdef AZ_DEBUG_BUILD - AZ_Assert(page->m_threadData == 0, "If we stored the free page properly we should have null here!"); -# endif - // store the current thread data, used when we free elements - page->m_threadData = m_threadPoolGetter(); - } - return page; -} -//========================================================================= -// PushFreePage -// [9/15/2009] -//========================================================================= -AZ_INLINE void -ThreadPoolSchemaImpl::PushFreePage(Page* page) -{ -#ifdef AZ_DEBUG_BUILD - page->m_threadData = 0; -#endif + //========================================================================= + // Push + // [9/15/2009] + //========================================================================= + AZ_INLINE void PoolSchemaImpl::PushFreePage(Page* page) { - AZStd::lock_guard lock(m_mutex); m_freePages.push_front(*page); } -} -//========================================================================= -// GarbageCollect -// [9/15/2009] -//========================================================================= -void -ThreadPoolSchemaImpl::GarbageCollect() -{ - if (!m_isDynamic) + //========================================================================= + // PurgePages + // [9/11/2009] + //========================================================================= + void PoolSchemaImpl::GarbageCollect() { - return; // we have the memory statically allocated, can't collect garbage. + // if( m_ownerThread == AZStd::this_thread::get_id() ) + { + if (m_isDynamic) + { + m_allocator.GarbageCollect(); + + Bucket::PageListType staticPages; + while (!m_freePages.empty()) + { + Page* page = &m_freePages.front(); + m_freePages.pop_front(); + if (IsInStaticBlock(page)) + { + staticPages.push_front(*page); + } + else + { + FreePage(page); + } + } + + while (!staticPages.empty()) + { + Page* page = &staticPages.front(); + staticPages.pop_front(); + m_freePages.push_front(*page); + } + } + } } - FreePagesType staticPages; - AZStd::lock_guard lock(m_mutex); - while (!m_freePages.empty()) + //========================================================================= + // SetupFreeList + // [9/09/2009] + //========================================================================= + AZ_FORCE_INLINE void PoolSchemaImpl::Page::SetupFreeList(size_t elementSize, size_t pageDataBlockSize) { - Page* page = &m_freePages.front(); - m_freePages.pop_front(); - if (IsInStaticBlock(page)) + char* pageData = reinterpret_cast(this) - pageDataBlockSize; + m_freeList.clear(); + // setup free list + size_t numElements = pageDataBlockSize / elementSize; + for (unsigned int i = 0; i < numElements; ++i) { - staticPages.push_front(*page); + char* address = pageData + i * elementSize; + Page::FakeNode* node = new (address) Page::FakeNode(); + m_freeList.push_back(*node); + } + } + + ////////////////////////////////////////////////////////////////////////// + ////////////////////////////////////////////////////////////////////////// + // ThreadPoolSchema + ////////////////////////////////////////////////////////////////////////// + ////////////////////////////////////////////////////////////////////////// + + //========================================================================= + // ThreadPoolSchema + // [9/15/2009] + //========================================================================= + ThreadPoolSchema::ThreadPoolSchema(GetThreadPoolData getThreadPoolData, SetThreadPoolData setThreadPoolData) + : m_impl(nullptr) + , m_threadPoolGetter(getThreadPoolData) + , m_threadPoolSetter(setThreadPoolData) + { + } + + //========================================================================= + // ~ThreadPoolSchema + // [9/15/2009] + //========================================================================= + ThreadPoolSchema::~ThreadPoolSchema() + { + AZ_Assert(m_impl == nullptr, "You did not destroy the thread pool schema!"); + delete m_impl; + } + + //========================================================================= + // Create + // [9/15/2009] + //========================================================================= + bool ThreadPoolSchema::Create(const Descriptor& desc) + { + AZ_Assert(m_impl == nullptr, "PoolSchema already created!"); + if (m_impl == nullptr) + { + m_impl = aznew ThreadPoolSchemaImpl(desc, m_threadPoolGetter, m_threadPoolSetter); + } + return (m_impl != nullptr); + } + + //========================================================================= + // Destroy + // [9/15/2009] + //========================================================================= + bool ThreadPoolSchema::Destroy() + { + delete m_impl; + m_impl = nullptr; + return true; + } + //========================================================================= + // Allocate + // [9/15/2009] + //========================================================================= + ThreadPoolSchema::pointer_type ThreadPoolSchema::Allocate( + size_type byteSize, + size_type alignment, + int flags, + const char* name, + const char* fileName, + int lineNum, + unsigned int suppressStackRecord) + { + (void)flags; + (void)name; + (void)fileName; + (void)lineNum; + (void)suppressStackRecord; + return m_impl->Allocate(byteSize, alignment); + } + + //========================================================================= + // DeAllocate + // [9/15/2009] + //========================================================================= + void ThreadPoolSchema::DeAllocate(pointer_type ptr, size_type byteSize, size_type alignment) + { + (void)byteSize; + (void)alignment; + m_impl->DeAllocate(ptr); + } + + //========================================================================= + // Resize + // [10/14/2018] + //========================================================================= + ThreadPoolSchema::size_type ThreadPoolSchema::Resize(pointer_type ptr, size_type newSize) + { + (void)ptr; + (void)newSize; + return 0; // unsupported + } + + //========================================================================= + // ReAllocate + // [10/14/2018] + //========================================================================= + ThreadPoolSchema::pointer_type ThreadPoolSchema::ReAllocate(pointer_type ptr, size_type newSize, size_type newAlignment) + { + (void)ptr; + (void)newSize; + (void)newAlignment; + AZ_Assert(false, "unsupported"); + + return ptr; + } + + //========================================================================= + // AllocationSize + // [11/22/2010] + //========================================================================= + ThreadPoolSchema::size_type ThreadPoolSchema::AllocationSize(pointer_type ptr) + { + return m_impl->AllocationSize(ptr); + } + + //========================================================================= + // DeAllocate + // [9/15/2009] + //========================================================================= + void ThreadPoolSchema::GarbageCollect() + { + m_impl->GarbageCollect(); + } + + auto ThreadPoolSchema::GetMaxContiguousAllocationSize() const -> size_type + { + return m_impl->m_maxAllocationSize; + } + + //========================================================================= + // NumAllocatedBytes + // [11/1/2010] + //========================================================================= + ThreadPoolSchema::size_type ThreadPoolSchema::NumAllocatedBytes() const + { + size_type bytesAllocated = 0; + { + AZStd::lock_guard lock(m_impl->m_mutex); + for (size_t i = 0; i < m_impl->m_threads.size(); ++i) + { + bytesAllocated += m_impl->m_threads[i]->m_allocator.m_numBytesAllocated; + } + } + return bytesAllocated; + } + + //========================================================================= + // Capacity + // [11/1/2010] + //========================================================================= + ThreadPoolSchema::size_type ThreadPoolSchema::Capacity() const + { + return m_impl->m_numStaticPages * m_impl->m_pageSize; + } + + //========================================================================= + // GetPageAllocator + // [11/17/2010] + //========================================================================= + IAllocatorAllocate* ThreadPoolSchema::GetSubAllocator() + { + return m_impl->m_pageAllocator; + } + + //========================================================================= + // ThreadPoolSchemaImpl + // [9/15/2009] + //========================================================================= + ThreadPoolSchemaImpl::ThreadPoolSchemaImpl( + const ThreadPoolSchema::Descriptor& desc, + ThreadPoolSchema::GetThreadPoolData threadPoolGetter, + ThreadPoolSchema::SetThreadPoolData threadPoolSetter) + : m_threadPoolGetter(threadPoolGetter) + , m_threadPoolSetter(threadPoolSetter) + , m_pageAllocator(desc.m_pageAllocator) + , m_staticDataBlock(nullptr) + , m_numStaticPages(desc.m_numStaticPages) + , m_pageSize(desc.m_pageSize) + , m_minAllocationSize(desc.m_minAllocationSize) + , m_maxAllocationSize(desc.m_maxAllocationSize) + , m_isDynamic(desc.m_isDynamic) + { +#if AZ_TRAIT_OS_HAS_CRITICAL_SECTION_SPIN_COUNT + // In memory allocation case (usually tools) we might have high contention, + // using spin lock will improve performance. + SetCriticalSectionSpinCount(m_mutex.native_handle(), 4000); +#endif + + if (m_pageAllocator == nullptr) + { + m_pageAllocator = &AllocatorInstance::Get(); // use the SystemAllocator if no page allocator is provided + } + if (m_numStaticPages) + { + // We store the page struct at the end of the block + char* memBlock = reinterpret_cast(m_pageAllocator->Allocate( + m_pageSize * m_numStaticPages, m_pageSize, 0, "AZSystem::ThreadPoolSchemaImpl::Page static array", __FILE__, __LINE__)); + m_staticDataBlock = memBlock; + size_t pageDataSize = m_pageSize - sizeof(Page); + for (unsigned int i = 0; i < m_numStaticPages; ++i) + { + Page* page = new (memBlock + pageDataSize) Page(m_threadPoolGetter()); + page->m_bin = 0xffffffff; + PushFreePage(page); + memBlock += m_pageSize; + } + } + } + + //========================================================================= + // ~ThreadPoolSchemaImpl + // [9/15/2009] + //========================================================================= + ThreadPoolSchemaImpl::~ThreadPoolSchemaImpl() + { + // clean up all the thread data. + // IMPORTANT: We assume/rely that all threads (except the calling one) are or will + // destroyed before you create another instance of the pool allocation. + // This should generally be ok since the all allocators are singletons. + { + AZStd::lock_guard lock(m_mutex); + if (!m_threads.empty()) + { + for (size_t i = 0; i < m_threads.size(); ++i) + { + if (m_threads[i]) + { + // Force free all pages + delete m_threads[i]; + } + } + + /// reset the variable for the owner thread. + m_threadPoolSetter(nullptr); + } + } + + GarbageCollect(); + + if (m_staticDataBlock) + { + Page* page; + { + AZStd::lock_guard lock(m_mutex); + while (!m_freePages.empty()) + { + page = &m_freePages.front(); + m_freePages.pop_front(); + AZ_Assert(IsInStaticBlock(page), "All dynamic pages should be free by now!"); + } + } + + char* memBlock = reinterpret_cast(m_staticDataBlock); + size_t pageDataSize = m_pageSize - sizeof(Page); + for (unsigned int i = 0; i < m_numStaticPages; ++i) + { + page = reinterpret_cast(memBlock + pageDataSize); + page->~Page(); + memBlock += m_pageSize; + } + m_pageAllocator->DeAllocate(m_staticDataBlock); + } + } + + //========================================================================= + // Allocate + // [9/15/2009] + //========================================================================= + ThreadPoolSchema::pointer_type ThreadPoolSchemaImpl::Allocate( + ThreadPoolSchema::size_type byteSize, ThreadPoolSchema::size_type alignment, int flags) + { + (void)flags; + + ThreadPoolData* threadData = m_threadPoolGetter(); + + if (threadData == nullptr) + { + threadData = aznew ThreadPoolData(this, m_pageSize, m_minAllocationSize, m_maxAllocationSize); + m_threadPoolSetter(threadData); + { + AZStd::lock_guard lock(m_mutex); + m_threads.push_back(threadData); + } } else { - FreePage(page); + // deallocate elements if they were freed from other threads + Page::FakeNodeLF* fakeLFNode; + while ((fakeLFNode = threadData->m_freedElements.pop()) != nullptr) + { + threadData->m_allocator.DeAllocate(fakeLFNode); + } + } + + return threadData->m_allocator.Allocate(byteSize, alignment); + } + + //========================================================================= + // DeAllocate + // [9/15/2009] + //========================================================================= + void ThreadPoolSchemaImpl::DeAllocate(ThreadPoolSchema::pointer_type ptr) + { + Page* page = PageFromAddress(ptr); + if (page == nullptr) + { + AZ_Error("Memory", false, "Address 0x%08x is not in the ThreadPool!", ptr); + return; + } + AZ_Assert(page->m_threadData != nullptr, ("We must have valid page thread data for the page!")); + ThreadPoolData* threadData = m_threadPoolGetter(); + if (threadData == page->m_threadData) + { + // we can free here + threadData->m_allocator.DeAllocate(ptr); + } + else + { + // push this element to be deleted from it's own thread! + // cast the pointer to a fake lock free node + Page::FakeNodeLF* fakeLFNode = reinterpret_cast(ptr); +#ifdef AZ_DEBUG_BUILD + // we need to reset the fakeLFNode because we share the memory. + // otherwise we will assert the node is in the list + fakeLFNode->m_next = 0; +#endif + page->m_threadData->m_freedElements.push(*fakeLFNode); } } - while (!staticPages.empty()) - { - Page* page = &staticPages.front(); - staticPages.pop_front(); - m_freePages.push_front(*page); - } -} -//========================================================================= -// SetupFreeList -// [9/15/2009] -//========================================================================= -inline void -ThreadPoolSchemaImpl::Page::SetupFreeList(size_t elementSize, size_t pageDataBlockSize) -{ - char* pageData = reinterpret_cast(this) - pageDataBlockSize; - m_freeList.clear(); - // setup free list - size_t numElements = pageDataBlockSize / elementSize; - for (size_t i = 0; i < numElements; ++i) + //========================================================================= + // AllocationSize + // [11/22/2010] + //========================================================================= + ThreadPoolSchema::size_type ThreadPoolSchemaImpl::AllocationSize(ThreadPoolSchema::pointer_type ptr) { - char* address = pageData+i*elementSize; - Page::FakeNode* node = new(address) Page::FakeNode(); - m_freeList.push_back(*node); + Page* page = PageFromAddress(ptr); + if (page == nullptr) + { + return 0; + } + AZ_Assert(page->m_threadData != nullptr, ("We must have valid page thread data for the page!")); + return page->m_threadData->m_allocator.AllocationSize(ptr); } -} -//========================================================================= -// ThreadPoolData::ThreadPoolData -// [9/15/2009] -//========================================================================= -ThreadPoolData::ThreadPoolData(ThreadPoolSchemaImpl* alloc, size_t pageSize, size_t minAllocationSize, size_t maxAllocationSize) - : m_allocator(alloc, pageSize, minAllocationSize, maxAllocationSize) -{} - -//========================================================================= -// ThreadPoolData::~ThreadPoolData -// [9/15/2009] -//========================================================================= -ThreadPoolData::~ThreadPoolData() -{ - // deallocate elements if they were freed from other threads - ThreadPoolSchemaImpl::Page::FakeNodeLF* fakeLFNode; - while ((fakeLFNode = m_freedElements.pop())!=nullptr) + //========================================================================= + // PopFreePage + // [9/15/2009] + //========================================================================= + AZ_INLINE ThreadPoolSchemaImpl::Page* ThreadPoolSchemaImpl::PopFreePage() { - m_allocator.DeAllocate(fakeLFNode); + Page* page; + { + AZStd::lock_guard lock(m_mutex); + if (m_freePages.empty()) + { + page = nullptr; + } + else + { + page = &m_freePages.front(); + m_freePages.pop_front(); + } + } + if (page) + { +#ifdef AZ_DEBUG_BUILD + AZ_Assert(page->m_threadData == 0, "If we stored the free page properly we should have null here!"); +#endif + // store the current thread data, used when we free elements + page->m_threadData = m_threadPoolGetter(); + } + return page; } -} + + //========================================================================= + // PushFreePage + // [9/15/2009] + //========================================================================= + AZ_INLINE void ThreadPoolSchemaImpl::PushFreePage(Page* page) + { +#ifdef AZ_DEBUG_BUILD + page->m_threadData = 0; +#endif + { + AZStd::lock_guard lock(m_mutex); + m_freePages.push_front(*page); + } + } + + //========================================================================= + // GarbageCollect + // [9/15/2009] + //========================================================================= + void ThreadPoolSchemaImpl::GarbageCollect() + { + if (!m_isDynamic) + { + return; // we have the memory statically allocated, can't collect garbage. + } + + FreePagesType staticPages; + AZStd::lock_guard lock(m_mutex); + while (!m_freePages.empty()) + { + Page* page = &m_freePages.front(); + m_freePages.pop_front(); + if (IsInStaticBlock(page)) + { + staticPages.push_front(*page); + } + else + { + FreePage(page); + } + } + while (!staticPages.empty()) + { + Page* page = &staticPages.front(); + staticPages.pop_front(); + m_freePages.push_front(*page); + } + } + + //========================================================================= + // SetupFreeList + // [9/15/2009] + //========================================================================= + inline void ThreadPoolSchemaImpl::Page::SetupFreeList(size_t elementSize, size_t pageDataBlockSize) + { + char* pageData = reinterpret_cast(this) - pageDataBlockSize; + m_freeList.clear(); + // setup free list + size_t numElements = pageDataBlockSize / elementSize; + for (size_t i = 0; i < numElements; ++i) + { + char* address = pageData + i * elementSize; + Page::FakeNode* node = new (address) Page::FakeNode(); + m_freeList.push_back(*node); + } + } + + //========================================================================= + // ThreadPoolData::ThreadPoolData + // [9/15/2009] + //========================================================================= + ThreadPoolData::ThreadPoolData(ThreadPoolSchemaImpl* alloc, size_t pageSize, size_t minAllocationSize, size_t maxAllocationSize) + : m_allocator(alloc, pageSize, minAllocationSize, maxAllocationSize) + { + } + + //========================================================================= + // ThreadPoolData::~ThreadPoolData + // [9/15/2009] + //========================================================================= + ThreadPoolData::~ThreadPoolData() + { + // deallocate elements if they were freed from other threads + ThreadPoolSchemaImpl::Page::FakeNodeLF* fakeLFNode; + while ((fakeLFNode = m_freedElements.pop()) != nullptr) + { + m_allocator.DeAllocate(fakeLFNode); + } + } + +} // namespace AZ diff --git a/Code/Framework/AzCore/AzCore/Memory/PoolSchema.h b/Code/Framework/AzCore/AzCore/Memory/PoolSchema.h index cfc5e3ea07..ef38dcf24f 100644 --- a/Code/Framework/AzCore/AzCore/Memory/PoolSchema.h +++ b/Code/Framework/AzCore/AzCore/Memory/PoolSchema.h @@ -5,8 +5,7 @@ * SPDX-License-Identifier: Apache-2.0 OR MIT * */ -#ifndef AZ_POOL_ALLOCATION_SCHEME_H -#define AZ_POOL_ALLOCATION_SCHEME_H +#pragma once #include @@ -164,8 +163,3 @@ namespace AZ template AZ_THREAD_LOCAL ThreadPoolData* ThreadPoolSchemaHelper::m_threadData = 0; } - -#endif // AZ_POOL_ALLOCATION_SCHEME_H -#pragma once - - diff --git a/Code/Framework/AzCore/AzCore/Memory/SystemAllocator.cpp b/Code/Framework/AzCore/AzCore/Memory/SystemAllocator.cpp index 8c84338fd0..41099f7a38 100644 --- a/Code/Framework/AzCore/AzCore/Memory/SystemAllocator.cpp +++ b/Code/Framework/AzCore/AzCore/Memory/SystemAllocator.cpp @@ -11,7 +11,6 @@ #include #include -#include #include @@ -19,307 +18,289 @@ #define AZCORE_SYSTEM_ALLOCATOR_HPHA 1 #define AZCORE_SYSTEM_ALLOCATOR_MALLOC 2 -#define AZCORE_SYSTEM_ALLOCATOR_HEAP 3 #if !defined(AZCORE_SYSTEM_ALLOCATOR) - // define the default - #define AZCORE_SYSTEM_ALLOCATOR AZCORE_SYSTEM_ALLOCATOR_HPHA +// define the default +#define AZCORE_SYSTEM_ALLOCATOR AZCORE_SYSTEM_ALLOCATOR_HPHA #endif #if AZCORE_SYSTEM_ALLOCATOR == AZCORE_SYSTEM_ALLOCATOR_HPHA #include #elif AZCORE_SYSTEM_ALLOCATOR == AZCORE_SYSTEM_ALLOCATOR_MALLOC #include -#elif AZCORE_SYSTEM_ALLOCATOR == AZCORE_SYSTEM_ALLOCATOR_HEAP - #include #else #error "Invalid allocator selected for SystemAllocator" #endif - -using namespace AZ; - -////////////////////////////////////////////////////////////////////////// -// Globals - we use global storage for the first memory schema, since we can't use dynamic memory! -static bool g_isSystemSchemaUsed = false; +namespace AZ +{ + ////////////////////////////////////////////////////////////////////////// + // Globals - we use global storage for the first memory schema, since we can't use dynamic memory! + static bool g_isSystemSchemaUsed = false; #if AZCORE_SYSTEM_ALLOCATOR == AZCORE_SYSTEM_ALLOCATOR_HPHA static AZStd::aligned_storage::value>::type g_systemSchema; #elif AZCORE_SYSTEM_ALLOCATOR == AZCORE_SYSTEM_ALLOCATOR_MALLOC static AZStd::aligned_storage::value>::type g_systemSchema; -#elif AZCORE_SYSTEM_ALLOCATOR == AZCORE_SYSTEM_ALLOCATOR_HEAP - static AZStd::aligned_storage::value>::type g_systemSchema; #endif -////////////////////////////////////////////////////////////////////////// + ////////////////////////////////////////////////////////////////////////// -//========================================================================= -// SystemAllocator -// [9/2/2009] -//========================================================================= -SystemAllocator::SystemAllocator() - : AllocatorBase(this, "SystemAllocator", "Fundamental generic memory allocator") - , m_isCustom(false) - , m_allocator(nullptr) - , m_ownsOSAllocator(false) -{ -} - -//========================================================================= -// ~SystemAllocator -//========================================================================= -SystemAllocator::~SystemAllocator() -{ - if (IsReady()) + //========================================================================= + // SystemAllocator + // [9/2/2009] + //========================================================================= + SystemAllocator::SystemAllocator() + : AllocatorBase(this, "SystemAllocator", "Fundamental generic memory allocator") + , m_isCustom(false) + , m_allocator(nullptr) + , m_ownsOSAllocator(false) { - Destroy(); - } -} - -//========================================================================= -// ~Create -// [9/2/2009] -//========================================================================= -bool -SystemAllocator::Create(const Descriptor& desc) -{ - AZ_Assert(IsReady() == false, "System allocator was already created!"); - if (IsReady()) - { - return false; } - m_desc = desc; - - if (!AllocatorInstance::IsReady()) + //========================================================================= + // ~SystemAllocator + //========================================================================= + SystemAllocator::~SystemAllocator() { - m_ownsOSAllocator = true; - AllocatorInstance::Create(); - } - bool isReady = false; - if (desc.m_custom) - { - m_isCustom = true; - m_allocator = desc.m_custom; - isReady = true; - } - else - { - m_isCustom = false; -#if AZCORE_SYSTEM_ALLOCATOR == AZCORE_SYSTEM_ALLOCATOR_HPHA - HphaSchema::Descriptor heapDesc; - heapDesc.m_pageSize = desc.m_heap.m_pageSize; - heapDesc.m_poolPageSize = desc.m_heap.m_poolPageSize; - AZ_Assert(desc.m_heap.m_numFixedMemoryBlocks <= 1, "We support max1 memory block at the moment!"); - if (desc.m_heap.m_numFixedMemoryBlocks > 0) + if (IsReady()) { - heapDesc.m_fixedMemoryBlock = desc.m_heap.m_fixedMemoryBlocks[0]; - heapDesc.m_fixedMemoryBlockByteSize = desc.m_heap.m_fixedMemoryBlocksByteSize[0]; + Destroy(); } - heapDesc.m_subAllocator = desc.m_heap.m_subAllocator; - heapDesc.m_isPoolAllocations = desc.m_heap.m_isPoolAllocations; - // Fix SystemAllocator from growing in small chunks - heapDesc.m_systemChunkSize = desc.m_heap.m_systemChunkSize; -#elif AZCORE_SYSTEM_ALLOCATOR == AZCORE_SYSTEM_ALLOCATOR_MALLOC - MallocSchema::Descriptor heapDesc; -#elif AZCORE_SYSTEM_ALLOCATOR == AZCORE_SYSTEM_ALLOCATOR_HEAP - HeapSchema::Descriptor heapDesc; - memcpy(heapDesc.m_memoryBlocks, desc.m_heap.m_memoryBlocks, sizeof(heapDesc.m_memoryBlocks)); - memcpy(heapDesc.m_memoryBlocksByteSize, desc.m_heap.m_memoryBlocksByteSize, sizeof(heapDesc.m_memoryBlocksByteSize)); - heapDesc.m_numMemoryBlocks = desc.m_heap.m_numMemoryBlocks; -#endif - if (&AllocatorInstance::Get() == this) // if we are the system allocator - { - AZ_Assert(!g_isSystemSchemaUsed, "AZ::SystemAllocator MUST be created first! It's the source of all allocations!"); + } -#if AZCORE_SYSTEM_ALLOCATOR == AZCORE_SYSTEM_ALLOCATOR_HPHA - m_allocator = new(&g_systemSchema)HphaSchema(heapDesc); -#elif AZCORE_SYSTEM_ALLOCATOR == AZCORE_SYSTEM_ALLOCATOR_MALLOC - m_allocator = new(&g_systemSchema)MallocSchema(heapDesc); -#elif AZCORE_SYSTEM_ALLOCATOR == AZCORE_SYSTEM_ALLOCATOR_HEAP - m_allocator = new(&g_systemSchema)HeapSchema(heapDesc); -#endif - g_isSystemSchemaUsed = true; + //========================================================================= + // ~Create + // [9/2/2009] + //========================================================================= + bool SystemAllocator::Create(const Descriptor& desc) + { + AZ_Assert(IsReady() == false, "System allocator was already created!"); + if (IsReady()) + { + return false; + } + + m_desc = desc; + + if (!AllocatorInstance::IsReady()) + { + m_ownsOSAllocator = true; + AllocatorInstance::Create(); + } + bool isReady = false; + if (desc.m_custom) + { + m_isCustom = true; + m_allocator = desc.m_custom; isReady = true; } else { - // this class should be inheriting from SystemAllocator - AZ_Assert(AllocatorInstance::IsReady(), "System allocator must be created before any other allocator! They allocate from it."); + m_isCustom = false; +#if AZCORE_SYSTEM_ALLOCATOR == AZCORE_SYSTEM_ALLOCATOR_HPHA + HphaSchema::Descriptor heapDesc; + heapDesc.m_pageSize = desc.m_heap.m_pageSize; + heapDesc.m_poolPageSize = desc.m_heap.m_poolPageSize; + AZ_Assert(desc.m_heap.m_numFixedMemoryBlocks <= 1, "We support max1 memory block at the moment!"); + if (desc.m_heap.m_numFixedMemoryBlocks > 0) + { + heapDesc.m_fixedMemoryBlock = desc.m_heap.m_fixedMemoryBlocks[0]; + heapDesc.m_fixedMemoryBlockByteSize = desc.m_heap.m_fixedMemoryBlocksByteSize[0]; + } + heapDesc.m_subAllocator = desc.m_heap.m_subAllocator; + heapDesc.m_isPoolAllocations = desc.m_heap.m_isPoolAllocations; + // Fix SystemAllocator from growing in small chunks + heapDesc.m_systemChunkSize = desc.m_heap.m_systemChunkSize; +#elif AZCORE_SYSTEM_ALLOCATOR == AZCORE_SYSTEM_ALLOCATOR_MALLOC + MallocSchema::Descriptor heapDesc; +#endif + if (&AllocatorInstance::Get() == this) // if we are the system allocator + { + AZ_Assert(!g_isSystemSchemaUsed, "AZ::SystemAllocator MUST be created first! It's the source of all allocations!"); #if AZCORE_SYSTEM_ALLOCATOR == AZCORE_SYSTEM_ALLOCATOR_HPHA - m_allocator = azcreate(HphaSchema, (heapDesc), SystemAllocator); + m_allocator = new (&g_systemSchema) HphaSchema(heapDesc); #elif AZCORE_SYSTEM_ALLOCATOR == AZCORE_SYSTEM_ALLOCATOR_MALLOC - m_allocator = azcreate(MallocSchema, (heapDesc), SystemAllocator); -#elif AZCORE_SYSTEM_ALLOCATOR == AZCORE_SYSTEM_ALLOCATOR_HEAP - m_allocator = azcreate(HeapSchema, (heapDesc), SystemAllocator); + m_allocator = new (&g_systemSchema) MallocSchema(heapDesc); #endif - if (m_allocator == nullptr) - { - isReady = false; + g_isSystemSchemaUsed = true; + isReady = true; } else { - isReady = true; - } - } - } + // this class should be inheriting from SystemAllocator + AZ_Assert( + AllocatorInstance::IsReady(), + "System allocator must be created before any other allocator! They allocate from it."); - return isReady; -} - -//========================================================================= -// Allocate -// [9/2/2009] -//========================================================================= -void -SystemAllocator::Destroy() -{ - if (g_isSystemSchemaUsed) - { - int dummy; - (void)dummy; - } - - if (!m_isCustom) - { - if ((void*)m_allocator == (void*)&g_systemSchema) - { #if AZCORE_SYSTEM_ALLOCATOR == AZCORE_SYSTEM_ALLOCATOR_HPHA - static_cast(m_allocator)->~HphaSchema(); + m_allocator = azcreate(HphaSchema, (heapDesc), SystemAllocator); #elif AZCORE_SYSTEM_ALLOCATOR == AZCORE_SYSTEM_ALLOCATOR_MALLOC - static_cast(m_allocator)->~MallocSchema(); -#elif AZCORE_SYSTEM_ALLOCATOR == AZCORE_SYSTEM_ALLOCATOR_HEAP - static_cast(m_allocator)->~HeapSchema(); + m_allocator = azcreate(MallocSchema, (heapDesc), SystemAllocator); #endif - g_isSystemSchemaUsed = false; - } - else - { - azdestroy(m_allocator); - } - } - - if (m_ownsOSAllocator) - { - AllocatorInstance::Destroy(); - m_ownsOSAllocator = false; - } -} - -AllocatorDebugConfig SystemAllocator::GetDebugConfig() -{ - return AllocatorDebugConfig() - .StackRecordLevels(m_desc.m_stackRecordLevels) - .UsesMemoryGuards(!m_isCustom) - .MarksUnallocatedMemory(!m_isCustom) - .ExcludeFromDebugging(!m_desc.m_allocationRecords); -} - -IAllocatorAllocate* SystemAllocator::GetSchema() -{ - return m_allocator; -} - -//========================================================================= -// Allocate -// [9/2/2009] -//========================================================================= -SystemAllocator::pointer_type -SystemAllocator::Allocate(size_type byteSize, size_type alignment, int flags, const char* name, const char* fileName, int lineNum, unsigned int suppressStackRecord) -{ - if (byteSize == 0) - { - return nullptr; - } - AZ_Assert(byteSize > 0, "You can not allocate 0 bytes!"); - AZ_Assert((alignment & (alignment - 1)) == 0, "Alignment must be power of 2!"); - - byteSize = MemorySizeAdjustedUp(byteSize); - SystemAllocator::pointer_type address = m_allocator->Allocate(byteSize, alignment, flags, name, fileName, lineNum, suppressStackRecord + 1); - - if (address == nullptr) - { - // Free all memory we can and try again! - AllocatorManager::Instance().GarbageCollect(); - - address = m_allocator->Allocate(byteSize, alignment, flags, name, fileName, lineNum, suppressStackRecord + 1); - } - - if (address == nullptr) - { - byteSize = MemorySizeAdjustedDown(byteSize); // restore original size - - if (!OnOutOfMemory(byteSize, alignment, flags, name, fileName, lineNum)) - { - if (GetRecords()) - { - EBUS_EVENT(Debug::MemoryDrillerBus, DumpAllAllocations); + if (m_allocator == nullptr) + { + isReady = false; + } + else + { + isReady = true; + } } } + + return isReady; } - AZ_Assert(address != nullptr, "SystemAllocator: Failed to allocate %d bytes aligned on %d (flags: 0x%08x) %s : %s (%d)!", byteSize, alignment, flags, name ? name : "(no name)", fileName ? fileName : "(no file name)", lineNum); + //========================================================================= + // Allocate + // [9/2/2009] + //========================================================================= + void SystemAllocator::Destroy() + { + if (g_isSystemSchemaUsed) + { + int dummy; + (void)dummy; + } - AZ_PROFILE_MEMORY_ALLOC_EX(MemoryReserved, fileName, lineNum, address, byteSize, name); - AZ_MEMORY_PROFILE(ProfileAllocation(address, byteSize, alignment, name, fileName, lineNum, suppressStackRecord + 1)); + if (!m_isCustom) + { + if ((void*)m_allocator == (void*)&g_systemSchema) + { +#if AZCORE_SYSTEM_ALLOCATOR == AZCORE_SYSTEM_ALLOCATOR_HPHA + static_cast(m_allocator)->~HphaSchema(); +#elif AZCORE_SYSTEM_ALLOCATOR == AZCORE_SYSTEM_ALLOCATOR_MALLOC + static_cast(m_allocator)->~MallocSchema(); +#endif + g_isSystemSchemaUsed = false; + } + else + { + azdestroy(m_allocator); + } + } - return address; -} + if (m_ownsOSAllocator) + { + AllocatorInstance::Destroy(); + m_ownsOSAllocator = false; + } + } -//========================================================================= -// DeAllocate -// [9/2/2009] -//========================================================================= -void -SystemAllocator::DeAllocate(pointer_type ptr, size_type byteSize, size_type alignment) -{ - byteSize = MemorySizeAdjustedUp(byteSize); - AZ_PROFILE_MEMORY_FREE(MemoryReserved, ptr); - AZ_MEMORY_PROFILE(ProfileDeallocation(ptr, byteSize, alignment, nullptr)); - m_allocator->DeAllocate(ptr, byteSize, alignment); -} + AllocatorDebugConfig SystemAllocator::GetDebugConfig() + { + return AllocatorDebugConfig() + .StackRecordLevels(m_desc.m_stackRecordLevels) + .UsesMemoryGuards(!m_isCustom) + .MarksUnallocatedMemory(!m_isCustom) + .ExcludeFromDebugging(!m_desc.m_allocationRecords); + } -//========================================================================= -// ReAllocate -// [9/13/2011] -//========================================================================= -SystemAllocator::pointer_type -SystemAllocator::ReAllocate(pointer_type ptr, size_type newSize, size_type newAlignment) -{ - newSize = MemorySizeAdjustedUp(newSize); + IAllocatorAllocate* SystemAllocator::GetSchema() + { + return m_allocator; + } - AZ_MEMORY_PROFILE(ProfileReallocationBegin(ptr, newSize)); - AZ_PROFILE_MEMORY_FREE(MemoryReserved, ptr); - pointer_type newAddress = m_allocator->ReAllocate(ptr, newSize, newAlignment); - AZ_PROFILE_MEMORY_ALLOC(MemoryReserved, newAddress, newSize, "SystemAllocator realloc"); - AZ_MEMORY_PROFILE(ProfileReallocationEnd(ptr, newAddress, newSize, newAlignment)); + //========================================================================= + // Allocate + // [9/2/2009] + //========================================================================= + SystemAllocator::pointer_type SystemAllocator::Allocate( + size_type byteSize, + size_type alignment, + int flags, + const char* name, + const char* fileName, + int lineNum, + unsigned int suppressStackRecord) + { + if (byteSize == 0) + { + return nullptr; + } + AZ_Assert(byteSize > 0, "You can not allocate 0 bytes!"); + AZ_Assert((alignment & (alignment - 1)) == 0, "Alignment must be power of 2!"); - return newAddress; -} + byteSize = MemorySizeAdjustedUp(byteSize); + SystemAllocator::pointer_type address = + m_allocator->Allocate(byteSize, alignment, flags, name, fileName, lineNum, suppressStackRecord + 1); -//========================================================================= -// Resize -// [8/12/2011] -//========================================================================= -SystemAllocator::size_type -SystemAllocator::Resize(pointer_type ptr, size_type newSize) -{ - newSize = MemorySizeAdjustedUp(newSize); - size_type resizedSize = m_allocator->Resize(ptr, newSize); + if (address == nullptr) + { + // Free all memory we can and try again! + AllocatorManager::Instance().GarbageCollect(); - AZ_MEMORY_PROFILE(ProfileResize(ptr, resizedSize)); + address = m_allocator->Allocate(byteSize, alignment, flags, name, fileName, lineNum, suppressStackRecord + 1); + } - return MemorySizeAdjustedDown(resizedSize); -} + if (address == nullptr) + { + byteSize = MemorySizeAdjustedDown(byteSize); // restore original size + } -//========================================================================= -// -// [8/12/2011] -//========================================================================= -SystemAllocator::size_type -SystemAllocator::AllocationSize(pointer_type ptr) -{ - size_type allocSize = MemorySizeAdjustedDown(m_allocator->AllocationSize(ptr)); + AZ_Assert( + address != nullptr, "SystemAllocator: Failed to allocate %d bytes aligned on %d (flags: 0x%08x) %s : %s (%d)!", byteSize, + alignment, flags, name ? name : "(no name)", fileName ? fileName : "(no file name)", lineNum); - return allocSize; -} + AZ_PROFILE_MEMORY_ALLOC_EX(MemoryReserved, fileName, lineNum, address, byteSize, name); + AZ_MEMORY_PROFILE(ProfileAllocation(address, byteSize, alignment, name, fileName, lineNum, suppressStackRecord + 1)); + + return address; + } + + //========================================================================= + // DeAllocate + // [9/2/2009] + //========================================================================= + void SystemAllocator::DeAllocate(pointer_type ptr, size_type byteSize, size_type alignment) + { + byteSize = MemorySizeAdjustedUp(byteSize); + AZ_PROFILE_MEMORY_FREE(MemoryReserved, ptr); + AZ_MEMORY_PROFILE(ProfileDeallocation(ptr, byteSize, alignment, nullptr)); + m_allocator->DeAllocate(ptr, byteSize, alignment); + } + + //========================================================================= + // ReAllocate + // [9/13/2011] + //========================================================================= + SystemAllocator::pointer_type SystemAllocator::ReAllocate(pointer_type ptr, size_type newSize, size_type newAlignment) + { + newSize = MemorySizeAdjustedUp(newSize); + + AZ_MEMORY_PROFILE(ProfileReallocationBegin(ptr, newSize)); + AZ_PROFILE_MEMORY_FREE(MemoryReserved, ptr); + pointer_type newAddress = m_allocator->ReAllocate(ptr, newSize, newAlignment); + AZ_PROFILE_MEMORY_ALLOC(MemoryReserved, newAddress, newSize, "SystemAllocator realloc"); + AZ_MEMORY_PROFILE(ProfileReallocationEnd(ptr, newAddress, newSize, newAlignment)); + + return newAddress; + } + + //========================================================================= + // Resize + // [8/12/2011] + //========================================================================= + SystemAllocator::size_type SystemAllocator::Resize(pointer_type ptr, size_type newSize) + { + newSize = MemorySizeAdjustedUp(newSize); + size_type resizedSize = m_allocator->Resize(ptr, newSize); + + AZ_MEMORY_PROFILE(ProfileResize(ptr, resizedSize)); + + return MemorySizeAdjustedDown(resizedSize); + } + + //========================================================================= + // + // [8/12/2011] + //========================================================================= + SystemAllocator::size_type SystemAllocator::AllocationSize(pointer_type ptr) + { + size_type allocSize = MemorySizeAdjustedDown(m_allocator->AllocationSize(ptr)); + + return allocSize; + } + +} // namespace AZ diff --git a/Code/Framework/AzCore/AzCore/Memory/SystemAllocator.h b/Code/Framework/AzCore/AzCore/Memory/SystemAllocator.h index c02ada5843..c730b8dde6 100644 --- a/Code/Framework/AzCore/AzCore/Memory/SystemAllocator.h +++ b/Code/Framework/AzCore/AzCore/Memory/SystemAllocator.h @@ -5,8 +5,7 @@ * SPDX-License-Identifier: Apache-2.0 OR MIT * */ -#ifndef AZCORE_SYS_ALLOCATOR_H -#define AZCORE_SYS_ALLOCATOR_H +#pragma once #include @@ -120,7 +119,5 @@ namespace AZ }; } -#endif // AZCORE_SYS_ALLOCATOR_H -#pragma once diff --git a/Code/Framework/AzCore/AzCore/Module/Environment.cpp b/Code/Framework/AzCore/AzCore/Module/Environment.cpp index 71da948a35..790af730bf 100644 --- a/Code/Framework/AzCore/AzCore/Module/Environment.cpp +++ b/Code/Framework/AzCore/AzCore/Module/Environment.cpp @@ -24,10 +24,10 @@ namespace AZ class OSStdAllocator { public: - typedef void* pointer_type; - typedef AZStd::size_t size_type; - typedef AZStd::ptrdiff_t difference_type; - typedef AZStd::false_type allow_memory_leaks; ///< Regular allocators should not leak. + using pointer_type = void *; + using size_type = AZStd::size_t; + using difference_type = AZStd::ptrdiff_t; + using allow_memory_leaks = AZStd::false_type; ///< Regular allocators should not leak. OSStdAllocator(Environment::AllocatorInterface* allocator) : m_name("GlobalEnvironmentAllocator") @@ -122,7 +122,7 @@ namespace AZ : public EnvironmentInterface { public: - typedef AZStd::unordered_map, AZStd::equal_to, OSStdAllocator> MapType; + using MapType = AZStd::unordered_map, AZStd::equal_to, OSStdAllocator>; static EnvironmentInterface* Get(); static void Attach(EnvironmentInstance sourceEnvironment, bool useAsGetFallback); diff --git a/Code/Framework/AzCore/AzCore/Module/Internal/ModuleManagerSearchPathTool.cpp b/Code/Framework/AzCore/AzCore/Module/Internal/ModuleManagerSearchPathTool.cpp index 10aa9904a3..0797fef93f 100644 --- a/Code/Framework/AzCore/AzCore/Module/Internal/ModuleManagerSearchPathTool.cpp +++ b/Code/Framework/AzCore/AzCore/Module/Internal/ModuleManagerSearchPathTool.cpp @@ -10,21 +10,18 @@ #include #include -namespace AZ +namespace AZ::Internal { - namespace Internal + AZ::OSString ModuleManagerSearchPathTool::GetModuleDirectory(const AZ::DynamicModuleDescriptor& moduleDesc) { - AZ::OSString ModuleManagerSearchPathTool::GetModuleDirectory(const AZ::DynamicModuleDescriptor& moduleDesc) + // For each module that is loaded, attempt to set the module's folder as a path for dependent module resolution + AZ::OSString modulePath = moduleDesc.m_dynamicLibraryPath; + AZ::ComponentApplicationBus::Broadcast(&AZ::ComponentApplicationBus::Events::ResolveModulePath, modulePath); + auto lastPathSep = modulePath.find_last_of(AZ_TRAIT_OS_PATH_SEPARATOR); + if (lastPathSep != modulePath.npos) { - // For each module that is loaded, attempt to set the module's folder as a path for dependent module resolution - AZ::OSString modulePath = moduleDesc.m_dynamicLibraryPath; - AZ::ComponentApplicationBus::Broadcast(&AZ::ComponentApplicationBus::Events::ResolveModulePath, modulePath); - auto lastPathSep = modulePath.find_last_of(AZ_TRAIT_OS_PATH_SEPARATOR); - if (lastPathSep != modulePath.npos) - { - modulePath = modulePath.substr(0, lastPathSep); - } - return modulePath; + modulePath = modulePath.substr(0, lastPathSep); } - } // namespace Internal -} // namespace AZ + return modulePath; + } +} // namespace AZ::Internal diff --git a/Code/Framework/AzCore/AzCore/Name/Internal/NameData.cpp b/Code/Framework/AzCore/AzCore/Name/Internal/NameData.cpp index 574b0bcc7e..69bead11ac 100644 --- a/Code/Framework/AzCore/AzCore/Name/Internal/NameData.cpp +++ b/Code/Framework/AzCore/AzCore/Name/Internal/NameData.cpp @@ -9,45 +9,41 @@ #include #include -namespace AZ +namespace AZ::Internal { - namespace Internal + NameData::NameData(AZStd::string&& name, Hash hash) + : m_name{AZStd::move(name)} + , m_hash{hash} + {} + + AZStd::string_view NameData::GetName() const { - NameData::NameData(AZStd::string&& name, Hash hash) - : m_name{AZStd::move(name)} - , m_hash{hash} - {} + return m_name; + } - AZStd::string_view NameData::GetName() const - { - return m_name; - } + NameData::Hash NameData::GetHash() const + { + return m_hash; + } - NameData::Hash NameData::GetHash() const - { - return m_hash; - } + void NameData::add_ref() + { + AZ_Assert(m_useCount >= 0, "NameData has been deleted"); + ++m_useCount; + } - void NameData::add_ref() + void NameData::release() + { + // this could be released after we decrement the counter, therefore we will + // base the release on the hash which is stable + Hash hash = m_hash; + AZ_Assert(m_useCount > 0, "m_useCount is already 0!"); + if (m_useCount.fetch_sub(1) == 1) { - AZ_Assert(m_useCount >= 0, "NameData has been deleted"); - ++m_useCount; - } - - void NameData::release() - { - // this could be released after we decrement the counter, therefore we will - // base the release on the hash which is stable - Hash hash = m_hash; - AZ_Assert(m_useCount > 0, "m_useCount is already 0!"); - if (m_useCount.fetch_sub(1) == 1) + if (AZ::NameDictionary::IsReady()) { - if (AZ::NameDictionary::IsReady()) - { - AZ::NameDictionary::Instance().TryReleaseName(hash); - } + AZ::NameDictionary::Instance().TryReleaseName(hash); } } } -} - +} // namespace AZ::Internal diff --git a/Code/Framework/AzCore/AzCore/Name/NameDictionary.cpp b/Code/Framework/AzCore/AzCore/Name/NameDictionary.cpp index 3047a2894e..1b39eb81bd 100644 --- a/Code/Framework/AzCore/AzCore/Name/NameDictionary.cpp +++ b/Code/Framework/AzCore/AzCore/Name/NameDictionary.cpp @@ -32,7 +32,12 @@ namespace AZ if (!s_instance) { - s_instance = AZ::Environment::CreateVariable(NameDictionaryInstanceName); + // Because the NameDictionary allocates memory using the AZ::Allocator and it is created + // in the executable memory space, it's ownership cannot be transferred to other module memory spaces + // Otherwise this could cause the the NameDictionary to be destroyed in static de-init + // after the AZ::Allocators have been destroyed + // Therefore we supply the isTransferOwnership value of false using CreateVariableEx + s_instance = AZ::Environment::CreateVariableEx(NameDictionaryInstanceName, true, false); } } @@ -50,7 +55,12 @@ namespace AZ if (!s_instance) { - s_instance = Environment::FindVariable(NameDictionaryInstanceName); + // Because the NameDictionary allocates memory using the AZ::Allocator and it is created + // in the executable memory space, it's ownership cannot be transferred to other module memory spaces + // Otherwise this could cause the the NameDictionary to be destroyed in static de-init + // after the AZ::Allocators have been destroyed + // Therefore we supply the isTransferOwnership value of false using CreateVariableEx + s_instance = AZ::Environment::CreateVariableEx(NameDictionaryInstanceName, true, false); } return s_instance.IsConstructed(); diff --git a/Code/Framework/AzCore/AzCore/Platform.cpp b/Code/Framework/AzCore/AzCore/Platform.cpp index ad345f65e8..0defef826e 100644 --- a/Code/Framework/AzCore/AzCore/Platform.cpp +++ b/Code/Framework/AzCore/AzCore/Platform.cpp @@ -8,19 +8,16 @@ #include -namespace AZ +namespace AZ::Platform { - namespace Platform - { - MachineId s_machineId = MachineId(0); + MachineId s_machineId = MachineId(0); - void SetLocalMachineId(AZ::u32 machineId) + void SetLocalMachineId(AZ::u32 machineId) + { + AZ_Assert(machineId != 0, "0 machine ID is reserved!"); + if (s_machineId != 0) { - AZ_Assert(machineId != 0, "0 machine ID is reserved!"); - if (s_machineId != 0) - { - s_machineId = machineId; - } + s_machineId = machineId; } } -} +} // namespace AZ::Platform diff --git a/Code/Framework/AzCore/AzCore/PlatformDef.h b/Code/Framework/AzCore/AzCore/PlatformDef.h index 8d28d27959..7f00f7e90e 100644 --- a/Code/Framework/AzCore/AzCore/PlatformDef.h +++ b/Code/Framework/AzCore/AzCore/PlatformDef.h @@ -149,3 +149,79 @@ #if !defined(AZ_COMMAND_LINE_LEN) # define AZ_COMMAND_LINE_LEN 2048 #endif + +#include +#include +#include +#include +#include + +// First check if the feature if is_constant_evaluated is available via the feature test macro +// https://en.cppreference.com/w/User:D41D8CD98F/feature_testing_macros#C.2B.2B20 +#if __cpp_lib_is_constant_evaluated + #define az_builtin_is_constant_evaluated() std::is_constant_evaluated() +#endif + +// Next check if there is a __builtin_is_constant_evaluated that can be used +// This works on MSVC 19.28+ toolsets when using C++17, as well as +// clang 9.0.0+ when using C++17. +// Finally it works on gcc 9.0+ when using C++17 +#if !defined(az_builtin_is_constant_evaluated) + #if defined(__has_builtin) + #if __has_builtin(__builtin_is_constant_evaluated) + #define az_builtin_is_constant_evaluated() __builtin_is_constant_evaluated() + #define az_has_builtin_is_constant_evaluated() true + #endif + #elif AZ_COMPILER_MSVC >= 1928 + #define az_builtin_is_constant_evaluated() __builtin_is_constant_evaluated() + #define az_has_builtin_is_constant_evaluated() true + #elif AZ_COMPILER_GCC + #define az_builtin_is_constant_evaluated() __builtin_is_constant_evaluated() + #define az_has_builtin_is_constant_evaluated() true + #endif +#endif + +// In this case no support for the determining whether an operation is occuring +// at compile time is supported so assume that evaluation is always occuring at compile time +// in order to make sure the "safe" operation is being performed +#if !defined(az_builtin_is_constant_evaluated) + namespace AZ::Internal + { + constexpr bool builtin_is_constant_evaluated() + { + return true; + } + } + #define az_builtin_is_constant_evaluated() AZ::Internal::builtin_is_constant_evaluated() + #define az_has_builtin_is_constant_evaluated() false +#endif + +// define builtin functions used by char_traits class for efficient compile time and runtime +// operations +#if defined(__has_builtin) + #if __has_builtin(__builtin_memcpy) + #define az_has_builtin_memcpy true + #endif + #if __has_builtin(__builtin_wmemcpy) + #define az_has_builtin_wmemcpy true + #endif + #if __has_builtin(__builtin_memmove) + #define az_has_builtin_memmove true + #endif + #if __has_builtin(__builtin_wmemmove) + #define az_has_builtin_wmemmove true + #endif +#endif + +#if !defined(az_has_builtin_memcpy) + #define az_has_builtin_memcpy false +#endif +#if !defined(az_has_builtin_wmemcpy) + #define az_has_builtin_wmemcpy false +#endif +#if !defined(az_has_builtin_memmove) + #define az_has_builtin_memmove false +#endif +#if !defined(az_has_builtin_wmemmove) + #define az_has_builtin_wmemmove false +#endif diff --git a/Code/Framework/AzCore/AzCore/RTTI/BehaviorContextUtilities.cpp b/Code/Framework/AzCore/AzCore/RTTI/BehaviorContextUtilities.cpp index 6fb03073b0..5632c258c3 100644 --- a/Code/Framework/AzCore/AzCore/RTTI/BehaviorContextUtilities.cpp +++ b/Code/Framework/AzCore/AzCore/RTTI/BehaviorContextUtilities.cpp @@ -117,9 +117,9 @@ namespace AZ if (!explicitOverloads.m_overloads.empty()) { - for (auto methodAndClass : explicitOverloads.m_overloads) + for (const auto& methodAndClass : explicitOverloads.m_overloads) { - overloads.push_back({ methodAndClass.first, methodAndClass.second }); + overloads.emplace_back(methodAndClass.first, methodAndClass.second); } } else @@ -128,7 +128,7 @@ namespace AZ do { - overloads.push_back({ overload, behaviorClass }); + overloads.emplace_back(overload, behaviorClass); overload = overload->m_overload; } while (overload); diff --git a/Code/Framework/AzCore/AzCore/Script/ScriptContext.cpp b/Code/Framework/AzCore/AzCore/Script/ScriptContext.cpp index b03d413507..64822684da 100644 --- a/Code/Framework/AzCore/AzCore/Script/ScriptContext.cpp +++ b/Code/Framework/AzCore/AzCore/Script/ScriptContext.cpp @@ -1424,7 +1424,8 @@ namespace AZ } } -using namespace AZ; +namespace AZ +{ #ifndef AZ_USE_CUSTOM_SCRIPT_BIND @@ -2254,6 +2255,7 @@ LUA_API const Node* lua_getDummyNode() } #endif // AZ_USE_CUSTOM_SCRIPT_BIND +} // namespace AZ ////////////////////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////////////////// @@ -3408,7 +3410,14 @@ LUA_API const Node* lua_getDummyNode() const BehaviorParameter* arg = method->GetArgument(iArg); BehaviorClass* argClass = nullptr; LuaLoadFromStack fromStack = FromLuaStack(context, arg, argClass); - AZ_Assert(fromStack, "Argument %s for Method %s doesn't have support to be converted to Lua!", arg->m_name, method->m_name.c_str()); + AZ_Assert(fromStack, + "The argument type: %s for method: %s is not serialized and/or reflected for scripting.\n" + "Make sure %s is added to the SerializeContext and reflected to the BehaviorContext\n" + "For example, verify these two exist and are being called in a Reflect function:\n" + "serializeContext->Class<%s>();\n" + "behaviorContext->Class<%s>();\n" + "%s will not be available for scripting unless these requirements are met." + , arg->m_name, method->m_name.c_str(), arg->m_name, arg->m_name, arg->m_name, method->m_name.c_str()); m_fromLua.push_back(AZStd::make_pair(fromStack, argClass)); } @@ -5066,13 +5075,26 @@ LUA_API const Node* lua_getDummyNode() // Check all constructors if they have use ScriptDataContext and if so choose this one if (!customConstructorMethod) { + int overrideIndex = -1; + AZ::AttributeReader(nullptr, FindAttribute + ( Script::Attributes::DefaultConstructorOverrideIndex, behaviorClass->m_attributes)).Read(overrideIndex); + + int methodIndex = 0; for (BehaviorMethod* method : behaviorClass->m_constructors) { + if (methodIndex == overrideIndex) + { + customConstructorMethod = method; + break; + } + if (method->GetNumArguments() && method->GetArgument(method->GetNumArguments() - 1)->m_typeId == AZ::AzTypeInfo::Uuid()) { customConstructorMethod = method; break; } + + ++methodIndex; } } @@ -5805,7 +5827,6 @@ LUA_API const Node* lua_getDummyNode() AllocatorWrapper m_luaAllocator; AZStd::thread::id m_ownerThreadId; // Check if Lua methods (including EBus handlers) are called from background threads. }; - } // namespace AZ ScriptContext::ScriptContext(ScriptContextId id, IAllocatorAllocate* allocator, lua_State* nativeContext) { @@ -6096,5 +6117,6 @@ LUA_API const Node* lua_getDummyNode() { return m_impl->ConstructScriptProperty(sdc, valueIndex, name, restrictToPropertyArrays); } +} // namespace AZ #undef AZ_DBG_NAME_FIXER diff --git a/Code/Framework/AzCore/AzCore/Script/ScriptContext.h b/Code/Framework/AzCore/AzCore/Script/ScriptContext.h index bb63a9368d..5a7fca704f 100644 --- a/Code/Framework/AzCore/AzCore/Script/ScriptContext.h +++ b/Code/Framework/AzCore/AzCore/Script/ScriptContext.h @@ -5,8 +5,7 @@ * SPDX-License-Identifier: Apache-2.0 OR MIT * */ -#ifndef AZCORE_SCRIPT_CONTEXT_H -#define AZCORE_SCRIPT_CONTEXT_H +#pragma once #include #include @@ -1032,4 +1031,3 @@ namespace AZ } } // namespace AZ -#endif // AZCORE_SCRIPT_CONTEXT_H diff --git a/Code/Framework/AzCore/AzCore/Script/ScriptContextAttributes.h b/Code/Framework/AzCore/AzCore/Script/ScriptContextAttributes.h index 9807f0af39..e238289ef5 100644 --- a/Code/Framework/AzCore/AzCore/Script/ScriptContextAttributes.h +++ b/Code/Framework/AzCore/AzCore/Script/ScriptContextAttributes.h @@ -21,6 +21,7 @@ namespace AZ static constexpr AZ::Crc32 ClassNameOverride = AZ_CRC_CE("ScriptClassNameOverride"); ///< Provide a custom name for script reflection, that doesn't match the behavior Context name static constexpr AZ::Crc32 MethodOverride = AZ_CRC_CE("ScriptFunctionOverride"); ///< Use a custom function in the attribute instead of the function static constexpr AZ::Crc32 ConstructorOverride = AZ_CRC_CE("ConstructorOverride"); ///< You can provide a custom constructor to be called when created from Lua script + static constexpr AZ::Crc32 DefaultConstructorOverrideIndex = AZ_CRC_CE("DefaultConstructorOverrideIndex"); ///< Use a different class constructor as the default constructor in Lua static constexpr AZ::Crc32 EventHandlerCreationFunction = AZ_CRC_CE("EventHandlerCreationFunction"); ///< helps create a handler for any script target so that script functions can be used for AZ::Event signals static constexpr AZ::Crc32 GenericConstructorOverride = AZ_CRC_CE("GenericConstructorOverride"); ///< You can provide a custom constructor to be called when creating a script static constexpr AZ::Crc32 ReaderWriterOverride = AZ_CRC_CE("ReaderWriterOverride"); ///< paired with \ref ScriptContext::CustomReaderWriter allows you to customize read/write to Lua VM diff --git a/Code/Framework/AzCore/AzCore/Script/ScriptContextDebug.cpp b/Code/Framework/AzCore/AzCore/Script/ScriptContextDebug.cpp index e28a289c9e..698c5a0043 100644 --- a/Code/Framework/AzCore/AzCore/Script/ScriptContextDebug.cpp +++ b/Code/Framework/AzCore/AzCore/Script/ScriptContextDebug.cpp @@ -25,10 +25,8 @@ extern "C" { namespace AZ { + void LuaHook(lua_State* l, lua_Debug* ar); -} - -using namespace AZ; /** * A temp class that will override the current script context error handler and store the error (without any messages) @@ -105,6 +103,8 @@ void ScriptContextDebug::ConnectHook() void ScriptContextDebug::DisconnectHook() { lua_sethook(m_context.NativeContext(), nullptr, 0, 0); + m_currentStackLevel = -1; + m_stepStackLevel = -1; } //========================================================================= @@ -597,7 +597,7 @@ static ScriptContextDebug::BreakpointId MakeBreakpointId(const char* sourceName, // LuaHook // [6/28/2012] //========================================================================= -void AZ::LuaHook(lua_State* l, lua_Debug* ar) +void LuaHook(lua_State* l, lua_Debug* ar) { // Read contexts lua_rawgeti(l, LUA_REGISTRYINDEX, AZ_LUA_SCRIPT_CONTEXT_REF); @@ -651,6 +651,11 @@ void AZ::LuaHook(lua_State* l, lua_Debug* ar) context->PopCallstack(); } context->m_currentStackLevel--; + + if (context->m_currentStackLevel == -1) + { + context->m_stepStackLevel = -1; + } } else if (ar->event == LUA_HOOKLINE) { @@ -731,7 +736,7 @@ void AZ::LuaHook(lua_State* l, lua_Debug* ar) //} } - if (doBreak) + if (doBreak && bp->m_lineNumber > 0) { context->m_luaDebug = ar; context->m_breakCallback(context, bp); @@ -1536,4 +1541,6 @@ ScriptContextDebug::SetValue(const DebugValue& sourceValue) return true; } +} // namespace AZ + #endif // #if !defined(AZCORE_EXCLUDE_LUA) diff --git a/Code/Framework/AzCore/AzCore/Script/ScriptContextDebug.h b/Code/Framework/AzCore/AzCore/Script/ScriptContextDebug.h index a8f0ba643c..a1d73352c4 100644 --- a/Code/Framework/AzCore/AzCore/Script/ScriptContextDebug.h +++ b/Code/Framework/AzCore/AzCore/Script/ScriptContextDebug.h @@ -5,8 +5,7 @@ * SPDX-License-Identifier: Apache-2.0 OR MIT * */ -#ifndef AZCORE_SCRIPT_CONTEXT_DEBUG_H -#define AZCORE_SCRIPT_CONTEXT_DEBUG_H +#pragma once #include #include @@ -213,6 +212,3 @@ namespace AZ ScriptContext& m_context; }; } - -#endif // AZCORE_SCRIPT_CONTEXT_DEBUG_H -#pragma once diff --git a/Code/Framework/AzCore/AzCore/Script/ScriptSystemComponent.cpp b/Code/Framework/AzCore/AzCore/Script/ScriptSystemComponent.cpp index 3b2aebdee6..32081afce7 100644 --- a/Code/Framework/AzCore/AzCore/Script/ScriptSystemComponent.cpp +++ b/Code/Framework/AzCore/AzCore/Script/ScriptSystemComponent.cpp @@ -31,7 +31,8 @@ #include #include -using namespace AZ; +namespace AZ +{ /** * Script lifecycle: @@ -44,8 +45,7 @@ using namespace AZ; * If the script was loaded by a ScriptComponent, Load will be called once reload is complete. */ -namespace -{ +namespace LocalTU_ScriptSystemComponent { // Called when a module has already been loaded static int LuaRequireLoadedModule(lua_State* l) { @@ -54,8 +54,10 @@ namespace return 1; } + } + //========================================================================= // ScriptSystemComponent // [5/29/2012] @@ -170,61 +172,77 @@ ScriptContext* ScriptSystemComponent::AddContext(ScriptContext* context, int ga ScriptContext* ScriptSystemComponent::AddContextWithId(ScriptContextId id) { AZ_Assert(m_contexts.empty() || id != ScriptContextIds::DefaultScriptContextId, "Default script context ID is reserved! Please provide a Unique context ID for you ScriptContext!"); - if (GetContext(id) == nullptr) + if (GetContext(id) != nullptr) { - m_contexts.emplace_back(); - ContextContainer& cc = m_contexts.back(); - cc.m_context = aznew ScriptContext(id); - cc.m_isOwner = true; - cc.m_garbageCollectorSteps = m_defaultGarbageCollectorSteps; - - cc.m_context->SetRequireHook(AZStd::bind(&ScriptSystemComponent::DefaultRequireHook, this, AZStd::placeholders::_1, AZStd::placeholders::_2, AZStd::placeholders::_3)); - - if (id != ScriptContextIds::CryScriptContextId) + return nullptr; + } + m_contexts.emplace_back(); + ContextContainer& cc = m_contexts.back(); + cc.m_context = aznew ScriptContext(id); + cc.m_isOwner = true; + cc.m_garbageCollectorSteps = m_defaultGarbageCollectorSteps; + cc.m_context->SetRequireHook( + [this](lua_State* lua, ScriptContext* context, const char* module) -> int { - // Reflect script classes - ComponentApplication* app = nullptr; - EBUS_EVENT_RESULT(app, ComponentApplicationBus, GetApplication); - if (app && app->GetDescriptor().m_enableScriptReflection) + return DefaultRequireHook(lua, context, module); + }); + + if (id != ScriptContextIds::CryScriptContextId) + { + // Reflect script classes + ComponentApplication* app = nullptr; + EBUS_EVENT_RESULT(app, ComponentApplicationBus, GetApplication); + if (app && app->GetDescriptor().m_enableScriptReflection) + { + if (app->GetBehaviorContext()) { - if (app->GetBehaviorContext()) - { - cc.m_context->BindTo(app->GetBehaviorContext()); - } - else - { - AZ_Error("Script", false, "We are asked to enabled scripting, but the Applicaion has no BehaviorContext! Scripting relies on BehaviorContext!"); - } + cc.m_context->BindTo(app->GetBehaviorContext()); + } + else + { + AZ_Error("Script", false, "We are asked to enabled scripting, but the Applicaion has no BehaviorContext! Scripting relies on BehaviorContext!"); } } - - return cc.m_context; } - return nullptr; + return cc.m_context; } void ScriptSystemComponent::RestoreDefaultRequireHook(ScriptContextId id) { - if (auto context = GetContext(id)) + auto context = GetContext(id); + if (!context) { - for (auto& inMemoryModule : m_inMemoryModules) - { - ClearAssetReferences(inMemoryModule.second->GetId()); - } - - m_inMemoryModules.clear(); - context->SetRequireHook(AZStd::bind(&ScriptSystemComponent::DefaultRequireHook, this, AZStd::placeholders::_1, AZStd::placeholders::_2, AZStd::placeholders::_3)); + return; } + + for (auto& inMemoryModule : m_inMemoryModules) + { + ClearAssetReferences(inMemoryModule.second->GetId()); + } + + m_inMemoryModules.clear(); + context->SetRequireHook( + [this](lua_State* lua, ScriptContext* context, const char* module) -> int + { + return DefaultRequireHook(lua, context, module); + }); } void ScriptSystemComponent::UseInMemoryRequireHook(const InMemoryScriptModules& modules, ScriptContextId id) { - if (auto context = GetContext(id)) + auto context = GetContext(id); + if (nullptr == context) { - m_inMemoryModules = modules; - context->SetRequireHook(AZStd::bind(&ScriptSystemComponent::InMemoryRequireHook, this, AZStd::placeholders::_1, AZStd::placeholders::_2, AZStd::placeholders::_3)); + return; } + + m_inMemoryModules = modules; + context->SetRequireHook( + [this](lua_State* lua, ScriptContext* context, const char* module) -> int + { + return InMemoryRequireHook(lua, context, module); + }); } //========================================================================= @@ -463,7 +481,7 @@ int ScriptSystemComponent::DefaultRequireHook(lua_State* lua, ScriptContext* con scriptIt->second.m_scriptNames.emplace(module); // Push the value to a closure that will just return it lua_rawgeti(lua, LUA_REGISTRYINDEX, scriptIt->second.m_tableReference); - lua_pushcclosure(lua, LuaRequireLoadedModule, 1); + lua_pushcclosure(lua, LocalTU_ScriptSystemComponent::LuaRequireLoadedModule, 1); // If asset reference already populated, just return now. Otherwise, capture reference if (scriptIt->second.m_scriptAsset.GetId().IsValid()) @@ -503,7 +521,7 @@ int ScriptSystemComponent::DefaultRequireHook(lua_State* lua, ScriptContext* con } // Push function returning the result - lua_pushcclosure(lua, LuaRequireLoadedModule, 1); + lua_pushcclosure(lua, LocalTU_ScriptSystemComponent::LuaRequireLoadedModule, 1); // Set asset reference on the loaded script scriptIt = container->m_loadedScripts.find(scriptId.m_guid); @@ -549,7 +567,7 @@ int ScriptSystemComponent::InMemoryRequireHook(lua_State* lua, ScriptContext* co scriptIt->second.m_scriptNames.emplace(module); // Push the value to a closure that will just return it lua_rawgeti(lua, LUA_REGISTRYINDEX, scriptIt->second.m_tableReference); - lua_pushcclosure(lua, LuaRequireLoadedModule, 1); + lua_pushcclosure(lua, LocalTU_ScriptSystemComponent::LuaRequireLoadedModule, 1); // If asset reference already populated, just return now. Otherwise, capture reference if (scriptIt->second.m_scriptAsset.GetId().IsValid()) @@ -575,7 +593,7 @@ int ScriptSystemComponent::InMemoryRequireHook(lua_State* lua, ScriptContext* co } // Push function returning the result - lua_pushcclosure(lua, LuaRequireLoadedModule, 1); + lua_pushcclosure(lua, LocalTU_ScriptSystemComponent::LuaRequireLoadedModule, 1); // Set asset reference on the loaded script scriptIt = container->m_loadedScripts.find(scriptId.m_guid); @@ -980,4 +998,5 @@ void ScriptSystemComponent::Reflect(ReflectContext* reflection) } } +} // namespace AZ #endif // #if !defined(AZCORE_EXCLUDE_LUA) diff --git a/Code/Framework/AzCore/AzCore/Script/ScriptSystemComponent.h b/Code/Framework/AzCore/AzCore/Script/ScriptSystemComponent.h index eb2e968a95..a7b1245546 100644 --- a/Code/Framework/AzCore/AzCore/Script/ScriptSystemComponent.h +++ b/Code/Framework/AzCore/AzCore/Script/ScriptSystemComponent.h @@ -5,8 +5,7 @@ * SPDX-License-Identifier: Apache-2.0 OR MIT * */ -#ifndef AZCORE_SCRIPT_SYSTEM_COMPONENT_H -#define AZCORE_SCRIPT_SYSTEM_COMPONENT_H +#pragma once #include #include @@ -182,6 +181,3 @@ namespace AZ void OnAssetReloaded(Data::Asset asset) override; }; } - -#endif // AZCORE_SCRIPT_SYSTEM_COMPONENT_H -#pragma once diff --git a/Code/Framework/AzCore/AzCore/ScriptCanvas/ScriptCanvasOnDemandNames.cpp b/Code/Framework/AzCore/AzCore/ScriptCanvas/ScriptCanvasOnDemandNames.cpp index b0d141bba9..d0bea11432 100644 --- a/Code/Framework/AzCore/AzCore/ScriptCanvas/ScriptCanvasOnDemandNames.cpp +++ b/Code/Framework/AzCore/AzCore/ScriptCanvas/ScriptCanvasOnDemandNames.cpp @@ -28,133 +28,130 @@ #include #include -namespace AZ +namespace AZ::ScriptCanvasOnDemandReflection { - namespace ScriptCanvasOnDemandReflection + // the use of this might have to come at the end of on demand reflection...instead of instantly + // basically, it required that dependent classes are reflected first, I'm not sure they are yet. + AZStd::string GetPrettyNameForAZTypeId(AZ::BehaviorContext& context, AZ::Uuid typeId) { - // the use of this might have to come at the end of on demand reflection...instead of instantly - // basically, it required that dependent classes are reflected first, I'm not sure they are yet. - AZStd::string GetPrettyNameForAZTypeId(AZ::BehaviorContext& context, AZ::Uuid typeId) + // return capitalized versions of what we need, otherwise just the regular name + // then strip all the stuff + if (typeId == azrtti_typeid()) { - // return capitalized versions of what we need, otherwise just the regular name - // then strip all the stuff - if (typeId == azrtti_typeid()) + return "AABB"; + } + else if (typeId == azrtti_typeid()) + { + return "Boolean"; + } + else if (typeId == azrtti_typeid()) + { + return "Color"; + } + else if (typeId == azrtti_typeid()) + { + return "CRC"; + } + else if (typeId == azrtti_typeid()) + { + return "EntityId"; + } + else if (typeId == azrtti_typeid()) + { + return "Matrix3x3"; + } + else if (typeId == azrtti_typeid()) + { + return "Matrix4x4"; + } + else if (typeId == azrtti_typeid()) + { + return "Number:s8"; + } + else if (typeId == azrtti_typeid()) + { + return "Number:s16"; + } + else if (typeId == azrtti_typeid()) + { + return "Number:s32"; + } + else if (typeId == azrtti_typeid()) + { + return "Number:s64"; + } + else if (typeId == azrtti_typeid()) + { + return "Number:u8"; + } + else if (typeId == azrtti_typeid()) + { + return "Number:u16"; + } + else if (typeId == azrtti_typeid()) + { + return "Number:u32"; + } + else if (typeId == azrtti_typeid()) + { + return "Number:u64"; + } + else if (typeId == azrtti_typeid()) + { + return "Number:float"; + } + else if (typeId == azrtti_typeid()) + { + return "Number"; + } + else if (typeId == azrtti_typeid()) + { + return "OBB"; + } + else if (typeId == azrtti_typeid()) + { + return "Plane"; + } + else if (typeId == azrtti_typeid()) + { + return "Quaternion"; + } + else if (typeId == azrtti_typeid() || typeId == azrtti_typeid()) + { + return "String"; + } + else if (typeId == azrtti_typeid()) + { + return "Transform"; + } + else if (typeId == azrtti_typeid()) + { + return "Vector2"; + } + else if (typeId == azrtti_typeid()) + { + return "Vector3"; + } + else if (typeId == azrtti_typeid()) + { + return "Vector4"; + } + else + { + auto bcClassIter = context.m_typeToClassMap.find(typeId); + if (bcClassIter != context.m_typeToClassMap.end()) { - return "AABB"; - } - else if (typeId == azrtti_typeid()) - { - return "Boolean"; - } - else if (typeId == azrtti_typeid()) - { - return "Color"; - } - else if (typeId == azrtti_typeid()) - { - return "CRC"; - } - else if (typeId == azrtti_typeid()) - { - return "EntityId"; - } - else if (typeId == azrtti_typeid()) - { - return "Matrix3x3"; - } - else if (typeId == azrtti_typeid()) - { - return "Matrix4x4"; - } - else if (typeId == azrtti_typeid()) - { - return "Number:s8"; - } - else if (typeId == azrtti_typeid()) - { - return "Number:s16"; - } - else if (typeId == azrtti_typeid()) - { - return "Number:s32"; - } - else if (typeId == azrtti_typeid()) - { - return "Number:s64"; - } - else if (typeId == azrtti_typeid()) - { - return "Number:u8"; - } - else if (typeId == azrtti_typeid()) - { - return "Number:u16"; - } - else if (typeId == azrtti_typeid()) - { - return "Number:u32"; - } - else if (typeId == azrtti_typeid()) - { - return "Number:u64"; - } - else if (typeId == azrtti_typeid()) - { - return "Number:float"; - } - else if (typeId == azrtti_typeid()) - { - return "Number"; - } - else if (typeId == azrtti_typeid()) - { - return "OBB"; - } - else if (typeId == azrtti_typeid()) - { - return "Plane"; - } - else if (typeId == azrtti_typeid()) - { - return "Quaternion"; - } - else if (typeId == azrtti_typeid() || typeId == azrtti_typeid()) - { - return "String"; - } - else if (typeId == azrtti_typeid()) - { - return "Transform"; - } - else if (typeId == azrtti_typeid()) - { - return "Vector2"; - } - else if (typeId == azrtti_typeid()) - { - return "Vector3"; - } - else if (typeId == azrtti_typeid()) - { - return "Vector4"; + const AZ::BehaviorClass& bcClass = *(bcClassIter->second); + AZStd::string uglyName = bcClass.m_name; + AZ::StringFunc::Replace(uglyName, "AZStd::", "", true); + AZ::StringFunc::Replace(uglyName, "AZ::", "", true); + AZ::StringFunc::Replace(uglyName, "::", ".", true); + return uglyName; } else { - auto bcClassIter = context.m_typeToClassMap.find(typeId); - if (bcClassIter != context.m_typeToClassMap.end()) - { - const AZ::BehaviorClass& bcClass = *(bcClassIter->second); - AZStd::string uglyName = bcClass.m_name; - AZ::StringFunc::Replace(uglyName, "AZStd::", "", true); - AZ::StringFunc::Replace(uglyName, "AZ::", "", true); - AZ::StringFunc::Replace(uglyName, "::", ".", true); - return uglyName; - } - else - { - return "Invalid"; - } + return "Invalid"; } } - } // namespace ScriptCanvasOnDemandReflection -} // namespace AZ + } +} // namespace AZ::ScriptCanvasOnDemandReflection diff --git a/Code/Framework/AzCore/AzCore/Serialization/AZStdContainers.inl b/Code/Framework/AzCore/AzCore/Serialization/AZStdContainers.inl index bae79a6fe7..a633af22da 100644 --- a/Code/Framework/AzCore/AzCore/Serialization/AZStdContainers.inl +++ b/Code/Framework/AzCore/AzCore/Serialization/AZStdContainers.inl @@ -54,12 +54,8 @@ namespace AZStd namespace AZ { - //template - //class ScriptProperty; - namespace Internal { - template void SetupClassElementFromType(SerializeContext::ClassElement& classElement) { @@ -86,15 +82,14 @@ namespace AZ { auto uuid = AzTypeInfo::Uuid(); - using ContainerType = AttributeContainerType; - classElement.m_attributes.emplace_back(AZ_CRC("EnumType", 0xb177e1b5), CreateModuleAttribute(AZStd::move(uuid))); + classElement.m_attributes.emplace_back(AZ_CRC("EnumType", 0xb177e1b5), CreateModuleAttribute(AZStd::move(uuid))); } } template AZStd::enable_if_t::value> InitializeDefaultIfPodType(T& t) { - t = {}; + t = T{}; } template @@ -648,7 +643,6 @@ namespace AZ // Register our key type within an lvalue to rvalue wrapper as an attribute AZ::TypeId uuid = azrtti_typeid(); - using ContainerType = AttributeContainerType; /** * This should technically bind the reference value from the GetCurrentSerializeContextModule() call @@ -658,7 +652,7 @@ namespace AZ */ m_classElement.m_attributes.set_allocator(AZStdFunctorAllocator([]() -> IAllocatorAllocate& { return GetCurrentSerializeContextModule().GetAllocator(); })); - m_classElement.m_attributes.emplace_back(AZ_CRC("KeyType", 0x15bc5303), CreateModuleAttribute(AZStd::move(uuid))); + m_classElement.m_attributes.emplace_back(AZ_CRC("KeyType", 0x15bc5303), CreateModuleAttribute(AZStd::move(uuid))); } // Reflect our wrapped key and value types to serializeContext so that may later be used diff --git a/Code/Framework/AzCore/AzCore/Serialization/DataOverlayProviderMsgs.cpp b/Code/Framework/AzCore/AzCore/Serialization/DataOverlayProviderMsgs.cpp index 37f4623301..58f86bf831 100644 --- a/Code/Framework/AzCore/AzCore/Serialization/DataOverlayProviderMsgs.cpp +++ b/Code/Framework/AzCore/AzCore/Serialization/DataOverlayProviderMsgs.cpp @@ -19,8 +19,11 @@ namespace AZ nodeStack.push_back(m_dataContainer); SerializeContext::EnumerateInstanceCallContext callContext( - AZStd::bind(&DataOverlayTarget::ElementBegin, this, &nodeStack, AZStd::placeholders::_1, AZStd::placeholders::_2, AZStd::placeholders::_3), - AZStd::bind(&DataOverlayTarget::ElementEnd, this, &nodeStack), + [this, &nodeStack](void* instancePointer, const SerializeContext::ClassData* classData, const SerializeContext::ClassElement* classElement)->bool + { + return ElementBegin(&nodeStack, instancePointer, classData, classElement); + }, + [this, &nodeStack]()->bool { return ElementEnd(&nodeStack); }, m_sc, SerializeContext::ENUM_ACCESS_FOR_READ, m_errorLogger diff --git a/Code/Framework/AzCore/AzCore/Serialization/DataPatch.cpp b/Code/Framework/AzCore/AzCore/Serialization/DataPatch.cpp index 6f1635148c..d27a5005b4 100644 --- a/Code/Framework/AzCore/AzCore/Serialization/DataPatch.cpp +++ b/Code/Framework/AzCore/AzCore/Serialization/DataPatch.cpp @@ -36,7 +36,7 @@ namespace AZ class DataNode { public: - typedef AZStd::list ChildDataNodes; + using ChildDataNodes = AZStd::list; DataNode() { @@ -148,25 +148,28 @@ namespace AZ m_root.Reset(); m_currentNode = nullptr; - if (m_context && rootClassPtr) + if (!m_context || !rootClassPtr) { - SerializeContext::EnumerateInstanceCallContext callContext( - AZStd::bind(&DataNodeTree::BeginNode, this, AZStd::placeholders::_1, AZStd::placeholders::_2, AZStd::placeholders::_3), - AZStd::bind(&DataNodeTree::EndNode, this), - m_context, - SerializeContext::ENUM_ACCESS_FOR_READ, - nullptr - ); - - m_context->EnumerateInstanceConst( - &callContext, - rootClassPtr, - rootClassId, - nullptr, - nullptr - ); + return; } + SerializeContext::EnumerateInstanceCallContext callContext( + [this](void* instancePointer, const SerializeContext::ClassData* classData, const SerializeContext::ClassElement* classElement)->bool + { + return BeginNode(instancePointer, classData, classElement); + }, + [this]()->bool { return EndNode(); }, + m_context, + SerializeContext::ENUM_ACCESS_FOR_READ, + nullptr + ); + m_context->EnumerateInstanceConst( + &callContext, + rootClassPtr, + rootClassId, + nullptr, + nullptr + ); m_currentNode = nullptr; } diff --git a/Code/Framework/AzCore/AzCore/Serialization/EditContext.cpp b/Code/Framework/AzCore/AzCore/Serialization/EditContext.cpp index d0c433df16..8a4688d748 100644 --- a/Code/Framework/AzCore/AzCore/Serialization/EditContext.cpp +++ b/Code/Framework/AzCore/AzCore/Serialization/EditContext.cpp @@ -34,7 +34,7 @@ namespace AZ } classIt->ClearElements(); } - for (auto enumIt : m_enumData) + for (auto& enumIt : m_enumData) { enumIt.second.ClearAttributes(); } @@ -103,7 +103,7 @@ namespace AZ //========================================================================= void ElementData::ClearAttributes() { - for (auto attrib : m_attributes) + for (auto& attrib : m_attributes) { delete attrib.second; } diff --git a/Code/Framework/AzCore/AzCore/Serialization/EditContextConstants.inl b/Code/Framework/AzCore/AzCore/Serialization/EditContextConstants.inl index 4f8c67f058..27f27dd6dd 100644 --- a/Code/Framework/AzCore/AzCore/Serialization/EditContextConstants.inl +++ b/Code/Framework/AzCore/AzCore/Serialization/EditContextConstants.inl @@ -133,6 +133,8 @@ namespace AZ const static AZ::Crc32 AllowClearAsset = AZ_CRC("AllowClearAsset", 0x24827182); // Show the name of the asset that was produced from the source asset const static AZ::Crc32 ShowProductAssetFileName = AZ_CRC("ShowProductAssetFileName"); + //! Regular expression pattern filter for source files + const static AZ::Crc32 SourceAssetFilterPattern = AZ_CRC_CE("SourceAssetFilterPattern"); //! Component icon attributes const static AZ::Crc32 Icon = AZ_CRC("Icon", 0x659429db); diff --git a/Code/Framework/AzCore/AzCore/Serialization/Json/BaseJsonSerializer.cpp b/Code/Framework/AzCore/AzCore/Serialization/Json/BaseJsonSerializer.cpp index 7309955a1c..4f5657a328 100644 --- a/Code/Framework/AzCore/AzCore/Serialization/Json/BaseJsonSerializer.cpp +++ b/Code/Framework/AzCore/AzCore/Serialization/Json/BaseJsonSerializer.cpp @@ -204,6 +204,22 @@ namespace AZ // BaseJsonSerializer // + JsonSerializationResult::Result BaseJsonSerializer::Load(void* outputValue, const Uuid& outputValueTypeId, const rapidjson::Value& inputValue, + JsonDeserializerContext& context) + { + JsonSerializationResult::ResultCode result(JsonSerializationResult::Tasks::ReadField); + result.Combine(ContinueLoading(outputValue, outputValueTypeId, inputValue, context, ContinuationFlags::IgnoreTypeSerializer)); + return context.Report(result, "Ignoring custom serialization during load"); + } + + JsonSerializationResult::Result BaseJsonSerializer::Store(rapidjson::Value& outputValue, const void* inputValue, const void* defaultValue, + const Uuid& valueTypeId, JsonSerializerContext& context) + { + JsonSerializationResult::ResultCode result(JsonSerializationResult::Tasks::WriteValue); + result.Combine(ContinueStoring(outputValue, inputValue, defaultValue, valueTypeId, context, ContinuationFlags::IgnoreTypeSerializer)); + return context.Report(result, "Ignoring custom serialization during store"); + } + BaseJsonSerializer::OperationFlags BaseJsonSerializer::GetOperationsFlags() const { return OperationFlags::None; diff --git a/Code/Framework/AzCore/AzCore/Serialization/Json/BaseJsonSerializer.h b/Code/Framework/AzCore/AzCore/Serialization/Json/BaseJsonSerializer.h index 7d2af01c16..4e8f545367 100644 --- a/Code/Framework/AzCore/AzCore/Serialization/Json/BaseJsonSerializer.h +++ b/Code/Framework/AzCore/AzCore/Serialization/Json/BaseJsonSerializer.h @@ -180,13 +180,16 @@ namespace AZ //! Transforms the data from the rapidjson Value to outputValue, if the conversion is possible and supported. //! The serializer is responsible for casting to the proper type and safely writing to the outputValue memory. + //! \note The default implementation is to load the object ignoring a custom serializers for the type, which allows for custom serializers + //! to modify the object after all default loading has occurred. virtual JsonSerializationResult::Result Load(void* outputValue, const Uuid& outputValueTypeId, const rapidjson::Value& inputValue, - JsonDeserializerContext& context) = 0; + JsonDeserializerContext& context); //! Write the input value to a rapidjson value if the default value is not null and doesn't match the input value, otherwise //! an error is returned and sets the rapidjson value to a null value. + //! \note The default implementation is to store the object ignoring custom serializers. virtual JsonSerializationResult::Result Store(rapidjson::Value& outputValue, const void* inputValue, const void* defaultValue, - const Uuid& valueTypeId, JsonSerializerContext& context) = 0; + const Uuid& valueTypeId, JsonSerializerContext& context); //! Returns the operation flags which tells the Json Serialization how this custom json serializer can be used. virtual OperationFlags GetOperationsFlags() const; diff --git a/Code/Framework/AzCore/AzCore/Serialization/Json/JsonDeserializer.cpp b/Code/Framework/AzCore/AzCore/Serialization/Json/JsonDeserializer.cpp index a741294544..4e80d9ba69 100644 --- a/Code/Framework/AzCore/AzCore/Serialization/Json/JsonDeserializer.cpp +++ b/Code/Framework/AzCore/AzCore/Serialization/Json/JsonDeserializer.cpp @@ -759,6 +759,7 @@ namespace AZ else { typeIdResult.m_determination = JsonDeserializer::TypeIdDetermination::FailedToDetermine; + typeIdResult.m_typeId = Uuid::CreateNull(); } } else if (input.IsString()) @@ -768,6 +769,7 @@ namespace AZ else { typeIdResult.m_determination = JsonDeserializer::TypeIdDetermination::FailedToDetermine; + typeIdResult.m_typeId = Uuid::CreateNull(); } switch (typeIdResult.m_determination) diff --git a/Code/Framework/AzCore/AzCore/Serialization/Json/JsonSerializationResult.cpp b/Code/Framework/AzCore/AzCore/Serialization/Json/JsonSerializationResult.cpp index 822c1c43d5..16bad5a466 100644 --- a/Code/Framework/AzCore/AzCore/Serialization/Json/JsonSerializationResult.cpp +++ b/Code/Framework/AzCore/AzCore/Serialization/Json/JsonSerializationResult.cpp @@ -10,265 +10,264 @@ #include #include -namespace AZ +namespace AZ::JsonSerializationResult::Internal { - namespace JsonSerializationResult + template + void AppendToString(AZ::JsonSerializationResult::ResultCode code, + StringType& target, AZStd::string_view path) { - namespace Internal + if (code.GetTask() == static_cast(0)) { - template - void AppendToString(AZ::JsonSerializationResult::ResultCode code, - StringType& target, AZStd::string_view path) - { - if (code.GetTask() == static_cast(0)) - { - target.append("The result code wasn't initialized"); - return; - } - - target.append("The operation "); - switch (code.GetProcessing()) - { - case Processing::Halted: - target.append("has halted during "); - break; - case Processing::Altered: - target.append("has taken an alternative approach for "); - break; - case Processing::PartialAlter: - target.append("has taken a partially alternative approach for "); - break; - case Processing::Completed: - target.append("has completed "); - break; - default: - target.append("has unknown processing status for "); - break; - } - - switch (code.GetTask()) - { - case Tasks::RetrieveInfo: - target.append("a retrieve info operation "); - break; - case Tasks::CreateDefault: - target.append("a create default operation "); - break; - case Tasks::Convert: - target.append("a convert operation "); - break; - case Tasks::ReadField: - target.append("a read field operation "); - break; - case Tasks::WriteValue: - target.append("a write value operation "); - break; - case Tasks::Merge: - target.append("a merge operation "); - break; - case Tasks::CreatePatch: - target.append("a create patch operation "); - break; - case Tasks::Import: - target.append("an import operation"); - break; - default: - target.append("an unknown operation "); - break; - } - - if (!path.empty()) - { - target.append("for '"); - target.append(path.begin(), path.end()); - target.append("' "); - } - - switch (code.GetOutcome()) - { - case Outcomes::Success: - target.append("which resulted in success"); - break; - case Outcomes::DefaultsUsed: - target.append("by using only default values"); - break; - case Outcomes::PartialDefaults: - target.append("by using one or more default values"); - break; - case Outcomes::Skipped: - target.append("because a field or value was skipped"); - break; - case Outcomes::PartialSkip: - target.append("because one or more fields or values were skipped"); - break; - case Outcomes::Unavailable: - target.append("because the target was unavailable"); - break; - case Outcomes::Unsupported: - target.append("because the action was unsupported"); - break; - case Outcomes::TypeMismatch: - target.append("because the source and target are unrelated types"); - break; - case Outcomes::TestFailed: - target.append("because a test against a value failed"); - break; - case Outcomes::Missing: - target.append("because a required field or value was missing"); - break; - case Outcomes::Invalid: - target.append("because a field or element has an invalid value"); - break; - case Outcomes::Unknown: - target.append("because information was missing"); - break; - case Outcomes::Catastrophic: - target.append("because a catastrophic issue was encountered"); - break; - default: - break; - } - } - } // namespace JsonSerializationResultInternal - - ResultCode::ResultCode(Tasks task) - : m_code(0) - { - m_options.m_task = task; + target.append("The result code wasn't initialized"); + return; } - ResultCode::ResultCode(uint32_t code) - : m_code(code) - {} - - ResultCode::ResultCode(Tasks task, Outcomes outcome) + target.append("The operation "); + switch (code.GetProcessing()) { - m_options.m_task = task; - switch (outcome) - { - case Outcomes::Success: // fall through - case Outcomes::Skipped: // fall through - case Outcomes::PartialSkip: // fall through - case Outcomes::DefaultsUsed: // fall through - case Outcomes::PartialDefaults: - m_options.m_processing = Processing::Completed; - break; - case Outcomes::Unavailable: // fall through - case Outcomes::Unsupported: - m_options.m_processing = Processing::Altered; - break; - case Outcomes::TypeMismatch: // fall through - case Outcomes::TestFailed: // fall through - case Outcomes::Missing: // fall through - case Outcomes::Invalid: // fall through - case Outcomes::Unknown: // fall through - case Outcomes::Catastrophic: // fall through - default: - m_options.m_processing = Processing::Halted; - break; - } - m_options.m_outcome = outcome; + case Processing::Halted: + target.append("has halted during "); + break; + case Processing::Altered: + target.append("has taken an alternative approach for "); + break; + case Processing::PartialAlter: + target.append("has taken a partially alternative approach for "); + break; + case Processing::Completed: + target.append("has completed "); + break; + default: + target.append("has unknown processing status for "); + break; } - bool ResultCode::HasDoneWork() const + switch (code.GetTask()) { - return m_options.m_outcome != static_cast(0); + case Tasks::RetrieveInfo: + target.append("a retrieve info operation "); + break; + case Tasks::CreateDefault: + target.append("a create default operation "); + break; + case Tasks::Convert: + target.append("a convert operation "); + break; + case Tasks::ReadField: + target.append("a read field operation "); + break; + case Tasks::WriteValue: + target.append("a write value operation "); + break; + case Tasks::Merge: + target.append("a merge operation "); + break; + case Tasks::CreatePatch: + target.append("a create patch operation "); + break; + case Tasks::Import: + target.append("an import operation"); + break; + default: + target.append("an unknown operation "); + break; } - ResultCode& ResultCode::Combine(ResultCode other) + if (!path.empty()) { - *this = Combine(*this, other); - return *this; + target.append("for '"); + target.append(path.begin(), path.end()); + target.append("' "); } - ResultCode& ResultCode::Combine(const Result& other) + switch (code.GetOutcome()) { - *this = Combine(*this, other.GetResultCode()); - return *this; + case Outcomes::Success: + target.append("which resulted in success"); + break; + case Outcomes::DefaultsUsed: + target.append("by using only default values"); + break; + case Outcomes::PartialDefaults: + target.append("by using one or more default values"); + break; + case Outcomes::Skipped: + target.append("because a field or value was skipped"); + break; + case Outcomes::PartialSkip: + target.append("because one or more fields or values were skipped"); + break; + case Outcomes::Unavailable: + target.append("because the target was unavailable"); + break; + case Outcomes::Unsupported: + target.append("because the action was unsupported"); + break; + case Outcomes::TypeMismatch: + target.append("because the source and target are unrelated types"); + break; + case Outcomes::TestFailed: + target.append("because a test against a value failed"); + break; + case Outcomes::Missing: + target.append("because a required field or value was missing"); + break; + case Outcomes::Invalid: + target.append("because a field or element has an invalid value"); + break; + case Outcomes::Unknown: + target.append("because information was missing"); + break; + case Outcomes::Catastrophic: + target.append("because a catastrophic issue was encountered"); + break; + default: + break; } + } +} // namespace AZ::JsonSerializationResult::Internal - ResultCode ResultCode::Combine(ResultCode lhs, ResultCode rhs) +namespace AZ::JsonSerializationResult +{ + + ResultCode::ResultCode(Tasks task) + : m_code(0) + { + m_options.m_task = task; + } + + ResultCode::ResultCode(uint32_t code) + : m_code(code) + {} + + ResultCode::ResultCode(Tasks task, Outcomes outcome) + { + m_options.m_task = task; + switch (outcome) { - ResultCode result = ResultCode(AZStd::max(lhs.m_code, rhs.m_code)); - - if ((lhs.m_options.m_outcome == Outcomes::Success && rhs.m_options.m_outcome == Outcomes::DefaultsUsed) || - (lhs.m_options.m_outcome == Outcomes::DefaultsUsed && rhs.m_options.m_outcome == Outcomes::Success)) - { - result.m_options.m_outcome = Outcomes::PartialDefaults; - } - else if ((lhs.m_options.m_outcome == Outcomes::Success && rhs.m_options.m_outcome == Outcomes::Skipped) || - (lhs.m_options.m_outcome == Outcomes::Skipped && rhs.m_options.m_outcome == Outcomes::Success)) - { - result.m_options.m_outcome = Outcomes::PartialSkip; - } - - if ((lhs.m_options.m_processing == Processing::Completed && rhs.m_options.m_processing == Processing::Altered) || - (lhs.m_options.m_processing == Processing::Altered && rhs.m_options.m_processing == Processing::Completed)) - { - result.m_options.m_processing = Processing::PartialAlter; - } - - return result; + case Outcomes::Success: // fall through + case Outcomes::Skipped: // fall through + case Outcomes::PartialSkip: // fall through + case Outcomes::DefaultsUsed: // fall through + case Outcomes::PartialDefaults: + m_options.m_processing = Processing::Completed; + break; + case Outcomes::Unavailable: // fall through + case Outcomes::Unsupported: + m_options.m_processing = Processing::Altered; + break; + case Outcomes::TypeMismatch: // fall through + case Outcomes::TestFailed: // fall through + case Outcomes::Missing: // fall through + case Outcomes::Invalid: // fall through + case Outcomes::Unknown: // fall through + case Outcomes::Catastrophic: // fall through + default: + m_options.m_processing = Processing::Halted; + break; } + m_options.m_outcome = outcome; + } - Tasks ResultCode::GetTask() const + bool ResultCode::HasDoneWork() const + { + return m_options.m_outcome != static_cast(0); + } + + ResultCode& ResultCode::Combine(ResultCode other) + { + *this = Combine(*this, other); + return *this; + } + + ResultCode& ResultCode::Combine(const Result& other) + { + *this = Combine(*this, other.GetResultCode()); + return *this; + } + + ResultCode ResultCode::Combine(ResultCode lhs, ResultCode rhs) + { + ResultCode result = ResultCode(AZStd::max(lhs.m_code, rhs.m_code)); + + if ((lhs.m_options.m_outcome == Outcomes::Success && rhs.m_options.m_outcome == Outcomes::DefaultsUsed) || + (lhs.m_options.m_outcome == Outcomes::DefaultsUsed && rhs.m_options.m_outcome == Outcomes::Success)) { - return m_options.m_task; + result.m_options.m_outcome = Outcomes::PartialDefaults; } - - Processing ResultCode::GetProcessing() const + else if ((lhs.m_options.m_outcome == Outcomes::Success && rhs.m_options.m_outcome == Outcomes::Skipped) || + (lhs.m_options.m_outcome == Outcomes::Skipped && rhs.m_options.m_outcome == Outcomes::Success)) { - return m_options.m_processing == static_cast(0) ? - Processing::Completed : m_options.m_processing; + result.m_options.m_outcome = Outcomes::PartialSkip; } - Outcomes ResultCode::GetOutcome() const + if ((lhs.m_options.m_processing == Processing::Completed && rhs.m_options.m_processing == Processing::Altered) || + (lhs.m_options.m_processing == Processing::Altered && rhs.m_options.m_processing == Processing::Completed)) { - return m_options.m_outcome == static_cast(0) ? - Outcomes::DefaultsUsed : m_options.m_outcome; + result.m_options.m_processing = Processing::PartialAlter; } - void ResultCode::AppendToString(AZ::OSString& target, AZStd::string_view path) const - { - Internal::AppendToString(*this, target, path); - } + return result; + } - void ResultCode::AppendToString(AZStd::string& target, AZStd::string_view path) const - { - Internal::AppendToString(*this, target, path); - } + Tasks ResultCode::GetTask() const + { + return m_options.m_task; + } - AZStd::string ResultCode::ToString(AZStd::string_view path) const - { - AZStd::string result; - AppendToString(result, path); - return result; - } + Processing ResultCode::GetProcessing() const + { + return m_options.m_processing == static_cast(0) ? + Processing::Completed : m_options.m_processing; + } - AZ::OSString ResultCode::ToOSString(AZStd::string_view path) const - { - AZ::OSString result; - AppendToString(result, path); - return result; - } + Outcomes ResultCode::GetOutcome() const + { + return m_options.m_outcome == static_cast(0) ? + Outcomes::DefaultsUsed : m_options.m_outcome; + } + + void ResultCode::AppendToString(AZ::OSString& target, AZStd::string_view path) const + { + Internal::AppendToString(*this, target, path); + } + + void ResultCode::AppendToString(AZStd::string& target, AZStd::string_view path) const + { + Internal::AppendToString(*this, target, path); + } + + AZStd::string ResultCode::ToString(AZStd::string_view path) const + { + AZStd::string result; + AppendToString(result, path); + return result; + } + + AZ::OSString ResultCode::ToOSString(AZStd::string_view path) const + { + AZ::OSString result; + AppendToString(result, path); + return result; + } - Result::Result(const JsonIssueCallback& callback, AZStd::string_view message, ResultCode result, AZStd::string_view path) - : m_result(callback(message, result, path)) - {} + Result::Result(const JsonIssueCallback& callback, AZStd::string_view message, ResultCode result, AZStd::string_view path) + : m_result(callback(message, result, path)) + {} - Result::Result(const JsonIssueCallback& callback, AZStd::string_view message, Tasks task, Outcomes outcome, AZStd::string_view path) - : m_result(callback(message, ResultCode(task, outcome), path)) - {} + Result::Result(const JsonIssueCallback& callback, AZStd::string_view message, Tasks task, Outcomes outcome, AZStd::string_view path) + : m_result(callback(message, ResultCode(task, outcome), path)) + {} - Result::operator ResultCode() const - { - return m_result; - } + Result::operator ResultCode() const + { + return m_result; + } - ResultCode Result::GetResultCode() const - { - return m_result; - } - } // namespace JsonSerializationResult -} // namespace AZ + ResultCode Result::GetResultCode() const + { + return m_result; + } + +} // namespace AZ::JsonSerializationResult diff --git a/Code/Framework/AzCore/AzCore/Serialization/Json/JsonSerializer.cpp b/Code/Framework/AzCore/AzCore/Serialization/Json/JsonSerializer.cpp index 8b6c1d154c..46cc0443da 100644 --- a/Code/Framework/AzCore/AzCore/Serialization/Json/JsonSerializer.cpp +++ b/Code/Framework/AzCore/AzCore/Serialization/Json/JsonSerializer.cpp @@ -150,7 +150,7 @@ namespace AZ { // Not using InsertTypeId here to avoid needing to create the temporary value and swap it in that call. node.AddMember(rapidjson::StringRef(JsonSerialization::TypeIdFieldIdentifier), - StoreTypeName(classData, context), context.GetJsonAllocator()); + StoreTypeName(classData, classData.m_typeId, context), context.GetJsonAllocator()); result = ResultCode(Tasks::WriteValue, Outcomes::Success); } return result.Combine(StoreClass(node, object, defaultObject, classData, context)); @@ -531,7 +531,7 @@ namespace AZ return ResolvePointerResult::ContinueProcessing; } - rapidjson::Value JsonSerializer::StoreTypeName(const SerializeContext::ClassData& classData, JsonSerializerContext& context) + rapidjson::Value JsonSerializer::StoreTypeName(const SerializeContext::ClassData& classData, const Uuid& typeId, JsonSerializerContext& context) { rapidjson::Value result; AZStd::vector ids = context.GetSerializeContext()->FindClassId(Crc32(classData.m_name)); @@ -544,7 +544,7 @@ namespace AZ // Only write the Uuid for the class if there are multiple classes sharing the same name. // In this case it wouldn't be enough to determine which class needs to be used. The // class name is still added as a comment for be friendlier for users to read. - AZStd::string fullName = classData.m_typeId.ToString(); + AZStd::string fullName = typeId.ToString(); fullName += ' '; fullName += classData.m_name; result.SetString(fullName.c_str(), aznumeric_caster(fullName.size()), context.GetJsonAllocator()); @@ -560,7 +560,7 @@ namespace AZ const SerializeContext::ClassData* data = context.GetSerializeContext()->FindClassData(typeId); if (data) { - output = JsonSerializer::StoreTypeName(*data, context); + output = JsonSerializer::StoreTypeName(*data, typeId, context); return context.Report(Tasks::WriteValue, Outcomes::Success, "Type id successfully stored to json value."); } else @@ -580,7 +580,7 @@ namespace AZ { rapidjson::Value insertedObject(rapidjson::kObjectType); insertedObject.AddMember( - rapidjson::StringRef(JsonSerialization::TypeIdFieldIdentifier), StoreTypeName(classData, context), + rapidjson::StringRef(JsonSerialization::TypeIdFieldIdentifier), StoreTypeName(classData, classData.m_typeId, context), context.GetJsonAllocator()); for (auto& element : output.GetObject()) diff --git a/Code/Framework/AzCore/AzCore/Serialization/Json/JsonSerializer.h b/Code/Framework/AzCore/AzCore/Serialization/Json/JsonSerializer.h index 22dd768ec5..0b72fca529 100644 --- a/Code/Framework/AzCore/AzCore/Serialization/Json/JsonSerializer.h +++ b/Code/Framework/AzCore/AzCore/Serialization/Json/JsonSerializer.h @@ -79,7 +79,7 @@ namespace AZ const void*& object, const void*& defaultObject, AZStd::any& defaultObjectStorage, const SerializeContext::ClassData*& elementClassData, const AZ::IRttiHelper& rtti, JsonSerializerContext& context); - static rapidjson::Value StoreTypeName(const SerializeContext::ClassData& classData, JsonSerializerContext& context); + static rapidjson::Value StoreTypeName(const SerializeContext::ClassData& classData, const Uuid& typeId, JsonSerializerContext& context); static JsonSerializationResult::ResultCode StoreTypeName(rapidjson::Value& output, const Uuid& typeId, JsonSerializerContext& context); diff --git a/Code/Framework/AzCore/AzCore/Serialization/Json/JsonSystemComponent.cpp b/Code/Framework/AzCore/AzCore/Serialization/Json/JsonSystemComponent.cpp index da02e70181..0ba44e4e61 100644 --- a/Code/Framework/AzCore/AzCore/Serialization/Json/JsonSystemComponent.cpp +++ b/Code/Framework/AzCore/AzCore/Serialization/Json/JsonSystemComponent.cpp @@ -104,6 +104,8 @@ namespace AZ ->HandlesType(); jsonContext->Serializer() ->HandlesType(); + jsonContext->Serializer() + ->HandlesType(); MathReflect(jsonContext); } diff --git a/Code/Framework/AzCore/AzCore/Serialization/Json/JsonUtils.cpp b/Code/Framework/AzCore/AzCore/Serialization/Json/JsonUtils.cpp index 1a4e7b3e80..6d7edb0716 100644 --- a/Code/Framework/AzCore/AzCore/Serialization/Json/JsonUtils.cpp +++ b/Code/Framework/AzCore/AzCore/Serialization/Json/JsonUtils.cpp @@ -24,438 +24,435 @@ #include -namespace AZ +namespace AZ::JsonSerializationUtils { - namespace JsonSerializationUtils + static const char* FileTypeTag = "Type"; + static const char* FileType = "JsonSerialization"; + static const char* VersionTag = "Version"; + static const char* ClassNameTag = "ClassName"; + static const char* ClassDataTag = "ClassData"; + + AZ::Outcome WriteJsonString(const rapidjson::Document& document, AZStd::string& jsonText, WriteJsonSettings settings) { - static const char* FileTypeTag = "Type"; - static const char* FileType = "JsonSerialization"; - static const char* VersionTag = "Version"; - static const char* ClassNameTag = "ClassName"; - static const char* ClassDataTag = "ClassData"; + AZ::IO::ByteContainerStream stream{&jsonText}; + return WriteJsonStream(document, stream, settings); + } - AZ::Outcome WriteJsonString(const rapidjson::Document& document, AZStd::string& jsonText, WriteJsonSettings settings) + AZ::Outcome WriteJsonFile(const rapidjson::Document& document, AZStd::string_view filePath, WriteJsonSettings settings) + { + // Write the json into memory first and then write the file, rather than passing a file stream to rapidjson. + // This should avoid creating a large number of micro-writes to the file. + AZStd::string fileContent; + auto outcome = WriteJsonString(document, fileContent, settings); + if (!outcome.IsSuccess()) { - AZ::IO::ByteContainerStream stream{&jsonText}; - return WriteJsonStream(document, stream, settings); + return outcome; } - AZ::Outcome WriteJsonFile(const rapidjson::Document& document, AZStd::string_view filePath, WriteJsonSettings settings) - { - // Write the json into memory first and then write the file, rather than passing a file stream to rapidjson. - // This should avoid creating a large number of micro-writes to the file. - AZStd::string fileContent; - auto outcome = WriteJsonString(document, fileContent, settings); - if (!outcome.IsSuccess()) - { - return outcome; - } + return AZ::Utils::WriteFile(fileContent, filePath); + } - return AZ::Utils::WriteFile(fileContent, filePath); + AZ::Outcome WriteJsonStream(const rapidjson::Document& document, IO::GenericStream& stream, WriteJsonSettings settings) + { + AZ::IO::RapidJSONStreamWriter jsonStreamWriter(&stream); + + rapidjson::PrettyWriter writer(jsonStreamWriter); + + if (settings.m_maxDecimalPlaces >= 0) + { + writer.SetMaxDecimalPlaces(settings.m_maxDecimalPlaces); } - AZ::Outcome WriteJsonStream(const rapidjson::Document& document, IO::GenericStream& stream, WriteJsonSettings settings) + if (document.Accept(writer)) { - AZ::IO::RapidJSONStreamWriter jsonStreamWriter(&stream); + return AZ::Success(); + } + else + { + return AZ::Failure(AZStd::string{"Json Writer failed"}); + } + } - rapidjson::PrettyWriter writer(jsonStreamWriter); - - if (settings.m_maxDecimalPlaces >= 0) - { - writer.SetMaxDecimalPlaces(settings.m_maxDecimalPlaces); - } - - if (document.Accept(writer)) - { - return AZ::Success(); - } - else - { - return AZ::Failure(AZStd::string{"Json Writer failed"}); - } + AZ::Outcome SaveObjectToStreamByType(const void* objectPtr, const Uuid& classId, IO::GenericStream& stream, + const void* defaultObjectPtr, const JsonSerializerSettings* settings) + { + if (!stream.CanWrite()) + { + return AZ::Failure(AZStd::string("The GenericStream can't be written to")); } - AZ::Outcome SaveObjectToStreamByType(const void* objectPtr, const Uuid& classId, IO::GenericStream& stream, - const void* defaultObjectPtr, const JsonSerializerSettings* settings) + JsonSerializerSettings saveSettings; + if (settings) { - if (!stream.CanWrite()) - { - return AZ::Failure(AZStd::string("The GenericStream can't be written to")); - } + saveSettings = *settings; + } - JsonSerializerSettings saveSettings; - if (settings) - { - saveSettings = *settings; - } - - AZ::SerializeContext* serializeContext = saveSettings.m_serializeContext; + AZ::SerializeContext* serializeContext = saveSettings.m_serializeContext; + if (!serializeContext) + { + AZ::ComponentApplicationBus::BroadcastResult(serializeContext, &AZ::ComponentApplicationBus::Events::GetSerializeContext); if (!serializeContext) { - AZ::ComponentApplicationBus::BroadcastResult(serializeContext, &AZ::ComponentApplicationBus::Events::GetSerializeContext); - if (!serializeContext) - { - return AZ::Failure(AZStd::string::format("Need SerializeContext for saving")); - } - saveSettings.m_serializeContext = serializeContext; + return AZ::Failure(AZStd::string::format("Need SerializeContext for saving")); } - - rapidjson::Document jsonDocument; - jsonDocument.SetObject(); - jsonDocument.AddMember(rapidjson::StringRef(FileTypeTag), rapidjson::StringRef(FileType), jsonDocument.GetAllocator()); - - rapidjson::Value serializedObject; - - JsonSerializationResult::ResultCode jsonResult = JsonSerialization::Store(serializedObject, jsonDocument.GetAllocator(), - objectPtr, defaultObjectPtr, classId, saveSettings); - - if (jsonResult.GetProcessing() != JsonSerializationResult::Processing::Completed) - { - return AZ::Failure(jsonResult.ToString("")); - } - - const SerializeContext::ClassData* classData = serializeContext->FindClassData(classId); - - jsonDocument.AddMember(rapidjson::StringRef(VersionTag), 1, jsonDocument.GetAllocator()); - jsonDocument.AddMember(rapidjson::StringRef(ClassNameTag), rapidjson::StringRef(classData->m_name), jsonDocument.GetAllocator()); - jsonDocument.AddMember(rapidjson::StringRef(ClassDataTag), AZStd::move(serializedObject), jsonDocument.GetAllocator()); - - AZ::IO::RapidJSONStreamWriter jsonStreamWriter(&stream); - rapidjson::PrettyWriter writer(jsonStreamWriter); - bool jsonWriteResult = jsonDocument.Accept(writer); - if (!jsonWriteResult) - { - return AZ::Failure(AZStd::string::format("Unable to write class %s with json serialization format'", - classId.ToString().data())); - } - - return AZ::Success(); + saveSettings.m_serializeContext = serializeContext; } - AZ::Outcome SaveObjectToFileByType(const void* classPtr, const Uuid& classId, const AZStd::string& filePath, - const void* defaultClassPtr, const JsonSerializerSettings* settings) + rapidjson::Document jsonDocument; + jsonDocument.SetObject(); + jsonDocument.AddMember(rapidjson::StringRef(FileTypeTag), rapidjson::StringRef(FileType), jsonDocument.GetAllocator()); + + rapidjson::Value serializedObject; + + JsonSerializationResult::ResultCode jsonResult = JsonSerialization::Store(serializedObject, jsonDocument.GetAllocator(), + objectPtr, defaultObjectPtr, classId, saveSettings); + + if (jsonResult.GetProcessing() != JsonSerializationResult::Processing::Completed) { - AZStd::vector buffer; - buffer.reserve(1024); - AZ::IO::ByteContainerStream > byteStream(&buffer); - auto saveResult = SaveObjectToStreamByType(classPtr, classId, byteStream, defaultClassPtr, settings); - if (saveResult.IsSuccess()) - { - AZ::IO::FileIOStream outputFileStream; - if (!outputFileStream.Open(filePath.c_str(), AZ::IO::OpenMode::ModeWrite | AZ::IO::OpenMode::ModeCreatePath | AZ::IO::OpenMode::ModeText)) - { - return AZ::Failure(AZStd::string::format("Error opening file '%s' for writing", filePath.c_str())); - } - outputFileStream.Write(buffer.size(), buffer.data()); - } - return saveResult; + return AZ::Failure(jsonResult.ToString("")); } - // Helper function to check whether the load outcome was success (for loading json serialization file) - bool WasLoadSuccess(JsonSerializationResult::Outcomes outcome) - { - return (outcome == JsonSerializationResult::Outcomes::Success - || outcome == JsonSerializationResult::Outcomes::DefaultsUsed - || outcome == JsonSerializationResult::Outcomes::PartialDefaults); - } - - AZ::Outcome PrepareDeserializerSettings(const JsonDeserializerSettings* inputSettings, JsonDeserializerSettings& returnSettings - , AZStd::string& deserializeError) - { - if (inputSettings) - { - returnSettings = *inputSettings; - } + const SerializeContext::ClassData* classData = serializeContext->FindClassData(classId); + jsonDocument.AddMember(rapidjson::StringRef(VersionTag), 1, jsonDocument.GetAllocator()); + jsonDocument.AddMember(rapidjson::StringRef(ClassNameTag), rapidjson::StringRef(classData->m_name), jsonDocument.GetAllocator()); + jsonDocument.AddMember(rapidjson::StringRef(ClassDataTag), AZStd::move(serializedObject), jsonDocument.GetAllocator()); + + AZ::IO::RapidJSONStreamWriter jsonStreamWriter(&stream); + rapidjson::PrettyWriter writer(jsonStreamWriter); + bool jsonWriteResult = jsonDocument.Accept(writer); + if (!jsonWriteResult) + { + return AZ::Failure(AZStd::string::format("Unable to write class %s with json serialization format'", + classId.ToString().data())); + } + + return AZ::Success(); + } + + AZ::Outcome SaveObjectToFileByType(const void* classPtr, const Uuid& classId, const AZStd::string& filePath, + const void* defaultClassPtr, const JsonSerializerSettings* settings) + { + AZStd::vector buffer; + buffer.reserve(1024); + AZ::IO::ByteContainerStream > byteStream(&buffer); + auto saveResult = SaveObjectToStreamByType(classPtr, classId, byteStream, defaultClassPtr, settings); + if (saveResult.IsSuccess()) + { + AZ::IO::FileIOStream outputFileStream; + if (!outputFileStream.Open(filePath.c_str(), AZ::IO::OpenMode::ModeWrite | AZ::IO::OpenMode::ModeCreatePath | AZ::IO::OpenMode::ModeText)) + { + return AZ::Failure(AZStd::string::format("Error opening file '%s' for writing", filePath.c_str())); + } + outputFileStream.Write(buffer.size(), buffer.data()); + } + return saveResult; + } + + // Helper function to check whether the load outcome was success (for loading json serialization file) + bool WasLoadSuccess(JsonSerializationResult::Outcomes outcome) + { + return (outcome == JsonSerializationResult::Outcomes::Success + || outcome == JsonSerializationResult::Outcomes::DefaultsUsed + || outcome == JsonSerializationResult::Outcomes::PartialDefaults); + } + + AZ::Outcome PrepareDeserializerSettings(const JsonDeserializerSettings* inputSettings, JsonDeserializerSettings& returnSettings + , AZStd::string& deserializeError) + { + if (inputSettings) + { + returnSettings = *inputSettings; + } + + if (!returnSettings.m_serializeContext) + { + AZ::ComponentApplicationBus::BroadcastResult(returnSettings.m_serializeContext, &AZ::ComponentApplicationBus::Events::GetSerializeContext); if (!returnSettings.m_serializeContext) { - AZ::ComponentApplicationBus::BroadcastResult(returnSettings.m_serializeContext, &AZ::ComponentApplicationBus::Events::GetSerializeContext); - if (!returnSettings.m_serializeContext) + return AZ::Failure(AZStd::string("Need SerializeContext for loading")); + } + } + + // Report unused data field as error by default + auto reporting = returnSettings.m_reporting; + auto issueReportingCallback = [&deserializeError, reporting](AZStd::string_view message, JsonSerializationResult::ResultCode result, AZStd::string_view target) -> JsonSerializationResult::ResultCode + { + using namespace JsonSerializationResult; + + if (!WasLoadSuccess(result.GetOutcome())) + { + // This if is a hack around fault in the JSON serialization system + // Jira: LY-106587 + if (message != "No part of the string could be interpreted as a uuid.") { - return AZ::Failure(AZStd::string("Need SerializeContext for loading")); + deserializeError.append(message); + deserializeError.append(AZStd::string::format(" '%s' \n", target.data())); } } - // Report unused data field as error by default - auto reporting = returnSettings.m_reporting; - auto issueReportingCallback = [&deserializeError, reporting](AZStd::string_view message, JsonSerializationResult::ResultCode result, AZStd::string_view target) -> JsonSerializationResult::ResultCode + if (reporting) { - using namespace JsonSerializationResult; + result = reporting(message, result, target); + } - if (!WasLoadSuccess(result.GetOutcome())) - { - // This if is a hack around fault in the JSON serialization system - // Jira: LY-106587 - if (message != "No part of the string could be interpreted as a uuid.") - { - deserializeError.append(message); - deserializeError.append(AZStd::string::format(" '%s' \n", target.data())); - } - } + return result; + }; - if (reporting) - { - result = reporting(message, result, target); - } + returnSettings.m_reporting = issueReportingCallback; - return result; - }; + return AZ::Success(); + } - returnSettings.m_reporting = issueReportingCallback; - return AZ::Success(); + AZ::Outcome ReadJsonString(AZStd::string_view jsonText) + { + if (jsonText.empty()) + { + return AZ::Failure(AZStd::string("Failed to parse JSON: input string is empty.")); } - - AZ::Outcome ReadJsonString(AZStd::string_view jsonText) + rapidjson::Document jsonDocument; + jsonDocument.Parse(jsonText.data(), jsonText.size()); + if (jsonDocument.HasParseError()) { - if (jsonText.empty()) + size_t lineNumber = 1; + + const size_t errorOffset = jsonDocument.GetErrorOffset(); + for (size_t searchOffset = jsonText.find('\n'); + searchOffset < errorOffset && searchOffset < AZStd::string::npos; + searchOffset = jsonText.find('\n', searchOffset + 1)) { - return AZ::Failure(AZStd::string("Failed to parse JSON: input string is empty.")); + lineNumber++; } - rapidjson::Document jsonDocument; - jsonDocument.Parse(jsonText.data(), jsonText.size()); - if (jsonDocument.HasParseError()) - { - size_t lineNumber = 1; + return AZ::Failure(AZStd::string::format("JSON parse error at line %zu: %s", lineNumber, rapidjson::GetParseError_En(jsonDocument.GetParseError()))); + } + else + { + return AZ::Success(AZStd::move(jsonDocument)); + } + } - const size_t errorOffset = jsonDocument.GetErrorOffset(); - for (size_t searchOffset = jsonText.find('\n'); - searchOffset < errorOffset && searchOffset < AZStd::string::npos; - searchOffset = jsonText.find('\n', searchOffset + 1)) - { - lineNumber++; - } - - return AZ::Failure(AZStd::string::format("JSON parse error at line %zu: %s", lineNumber, rapidjson::GetParseError_En(jsonDocument.GetParseError()))); - } - else - { - return AZ::Success(AZStd::move(jsonDocument)); - } + AZ::Outcome ReadJsonStream(IO::GenericStream& stream) + { + IO::SizeType length = stream.GetLength(); + + AZStd::vector memoryBuffer; + memoryBuffer.resize_no_construct(static_cast::size_type>(static_cast::size_type>(length) + 1)); + + IO::SizeType bytesRead = stream.Read(length, memoryBuffer.data()); + if (bytesRead != length) + { + return AZ::Failure(AZStd::string{"Cannot to read input stream."}); } - AZ::Outcome ReadJsonStream(IO::GenericStream& stream) + memoryBuffer.back() = 0; + + return ReadJsonString(AZStd::string_view{memoryBuffer.data(), memoryBuffer.size()}); + } + + AZ::Outcome ReadJsonFile(AZStd::string_view filePath, size_t maxFileSize) + { + // Read into memory first and then parse the json, rather than passing a file stream to rapidjson. + // This should avoid creating a large number of micro-reads from the file. + + auto readResult = AZ::Utils::ReadFile(filePath, maxFileSize); + if(!readResult.IsSuccess()) { - IO::SizeType length = stream.GetLength(); - - AZStd::vector memoryBuffer; - memoryBuffer.resize_no_construct(static_cast::size_type>(static_cast::size_type>(length) + 1)); - - IO::SizeType bytesRead = stream.Read(length, memoryBuffer.data()); - if (bytesRead != length) - { - return AZ::Failure(AZStd::string{"Cannot to read input stream."}); - } - - memoryBuffer.back() = 0; - - return ReadJsonString(AZStd::string_view{memoryBuffer.data(), memoryBuffer.size()}); + return AZ::Failure(readResult.GetError()); } - AZ::Outcome ReadJsonFile(AZStd::string_view filePath, size_t maxFileSize) + AZStd::string jsonContent = readResult.TakeValue(); + + auto result = ReadJsonString(jsonContent); + if (!result.IsSuccess()) { - // Read into memory first and then parse the json, rather than passing a file stream to rapidjson. - // This should avoid creating a large number of micro-reads from the file. + return AZ::Failure(AZStd::string::format("Failed to load '%.*s'. %s", AZ_STRING_ARG(filePath), result.GetError().c_str())); + } + else + { + return result; + } + } - auto readResult = AZ::Utils::ReadFile(filePath, maxFileSize); - if(!readResult.IsSuccess()) - { - return AZ::Failure(readResult.GetError()); - } - - AZStd::string jsonContent = readResult.TakeValue(); - - auto result = ReadJsonString(jsonContent); - if (!result.IsSuccess()) - { - return AZ::Failure(AZStd::string::format("Failed to load '%.*s'. %s", AZ_STRING_ARG(filePath), result.GetError().c_str())); - } - else - { - return result; - } + // Helper function to validate the JSON is structured with the standard header for a generic class + AZ::Outcome ValidateJsonClassHeader(const rapidjson::Document& jsonDocument) + { + auto typeItr = jsonDocument.FindMember(FileTypeTag); + if (typeItr == jsonDocument.MemberEnd() || !typeItr->value.IsString() || azstricmp(typeItr->value.GetString(), FileType) != 0) + { + return AZ::Failure(AZStd::string::format("Not a valid JsonSerialization file")); } - // Helper function to validate the JSON is structured with the standard header for a generic class - AZ::Outcome ValidateJsonClassHeader(const rapidjson::Document& jsonDocument) + auto nameItr = jsonDocument.FindMember(ClassNameTag); + if (nameItr == jsonDocument.MemberEnd() || !nameItr->value.IsString()) { - auto typeItr = jsonDocument.FindMember(FileTypeTag); - if (typeItr == jsonDocument.MemberEnd() || !typeItr->value.IsString() || azstricmp(typeItr->value.GetString(), FileType) != 0) - { - return AZ::Failure(AZStd::string::format("Not a valid JsonSerialization file")); - } - - auto nameItr = jsonDocument.FindMember(ClassNameTag); - if (nameItr == jsonDocument.MemberEnd() || !nameItr->value.IsString()) - { - return AZ::Failure(AZStd::string::format("File should contain ClassName")); - } - - auto dataItr = jsonDocument.FindMember(ClassDataTag); - // data can be empty but it should be an object - if (dataItr != jsonDocument.MemberEnd() && !dataItr->value.IsObject()) - { - return AZ::Failure(AZStd::string::format("ClassData should be an object")); - } - - return AZ::Success(); + return AZ::Failure(AZStd::string::format("File should contain ClassName")); } - AZ::Outcome LoadObjectFromStringByType(void* objectToLoad, const Uuid& classId, AZStd::string_view stream, - const JsonDeserializerSettings* settings) + auto dataItr = jsonDocument.FindMember(ClassDataTag); + // data can be empty but it should be an object + if (dataItr != jsonDocument.MemberEnd() && !dataItr->value.IsObject()) { - JsonDeserializerSettings loadSettings; - AZStd::string deserializeErrors; - auto prepare = PrepareDeserializerSettings(settings, loadSettings, deserializeErrors); - if (!prepare.IsSuccess()) - { - return AZ::Failure(prepare.GetError()); - } + return AZ::Failure(AZStd::string::format("ClassData should be an object")); + } - auto parseResult = ReadJsonString(stream); - if (!parseResult.IsSuccess()) - { - return AZ::Failure(parseResult.GetError()); - } + return AZ::Success(); + } - const rapidjson::Document& jsonDocument = parseResult.GetValue(); + AZ::Outcome LoadObjectFromStringByType(void* objectToLoad, const Uuid& classId, AZStd::string_view stream, + const JsonDeserializerSettings* settings) + { + JsonDeserializerSettings loadSettings; + AZStd::string deserializeErrors; + auto prepare = PrepareDeserializerSettings(settings, loadSettings, deserializeErrors); + if (!prepare.IsSuccess()) + { + return AZ::Failure(prepare.GetError()); + } - auto validateResult = ValidateJsonClassHeader(jsonDocument); - if (!validateResult.IsSuccess()) - { - return AZ::Failure(validateResult.GetError()); - } + auto parseResult = ReadJsonString(stream); + if (!parseResult.IsSuccess()) + { + return AZ::Failure(parseResult.GetError()); + } - const char* className = jsonDocument.FindMember(ClassNameTag)->value.GetString(); + const rapidjson::Document& jsonDocument = parseResult.GetValue(); - // validate class name - auto classData = loadSettings.m_serializeContext->FindClassData(classId); - if (!classData) - { - return AZ::Failure(AZStd::string::format("Try to load class from Id %s", classId.ToString().c_str())); - } + auto validateResult = ValidateJsonClassHeader(jsonDocument); + if (!validateResult.IsSuccess()) + { + return AZ::Failure(validateResult.GetError()); + } - if (azstricmp(classData->m_name, className) != 0) - { - return AZ::Failure(AZStd::string::format("Try to load class %s from class %s data", classData->m_name, className)); - } + const char* className = jsonDocument.FindMember(ClassNameTag)->value.GetString(); - JsonSerializationResult::ResultCode result = JsonSerialization::Load(objectToLoad, classId, jsonDocument.FindMember(ClassDataTag)->value, loadSettings); + // validate class name + auto classData = loadSettings.m_serializeContext->FindClassData(classId); + if (!classData) + { + return AZ::Failure(AZStd::string::format("Try to load class from Id %s", classId.ToString().c_str())); + } + + if (azstricmp(classData->m_name, className) != 0) + { + return AZ::Failure(AZStd::string::format("Try to load class %s from class %s data", classData->m_name, className)); + } + + JsonSerializationResult::ResultCode result = JsonSerialization::Load(objectToLoad, classId, jsonDocument.FindMember(ClassDataTag)->value, loadSettings); + + if (!WasLoadSuccess(result.GetOutcome()) || !deserializeErrors.empty()) + { + return AZ::Failure(deserializeErrors); + } + + return AZ::Success(); + } + + AZ::Outcome LoadObjectFromStreamByType(void* objectToLoad, const Uuid& classId, IO::GenericStream& stream, + const JsonDeserializerSettings* settings) + { + JsonDeserializerSettings loadSettings; + AZStd::string deserializeErrors; + auto prepare = PrepareDeserializerSettings(settings, loadSettings, deserializeErrors); + if (!prepare.IsSuccess()) + { + return AZ::Failure(prepare.GetError()); + } + + auto parseResult = ReadJsonStream(stream); + if (!parseResult.IsSuccess()) + { + return AZ::Failure(parseResult.GetError()); + } + + const rapidjson::Document& jsonDocument = parseResult.GetValue(); + + auto validateResult = ValidateJsonClassHeader(jsonDocument); + if (!validateResult.IsSuccess()) + { + return AZ::Failure(validateResult.GetError()); + } + + const char* className = jsonDocument.FindMember(ClassNameTag)->value.GetString(); + + // validate class name + auto classData = loadSettings.m_serializeContext->FindClassData(classId); + if (!classData) + { + return AZ::Failure(AZStd::string::format("Try to load class from Id %s", classId.ToString().c_str())); + } + + if (azstricmp(classData->m_name, className) != 0) + { + return AZ::Failure(AZStd::string::format("Try to load class %s from class %s data", classData->m_name, className)); + } + + JsonSerializationResult::ResultCode result = JsonSerialization::Load(objectToLoad, classId, jsonDocument.FindMember(ClassDataTag)->value, loadSettings); + + if (!WasLoadSuccess(result.GetOutcome()) || !deserializeErrors.empty()) + { + return AZ::Failure(deserializeErrors); + } + + return AZ::Success(); + } + + AZ::Outcome LoadAnyObjectFromStream(IO::GenericStream& stream, const JsonDeserializerSettings* settings) + { + JsonDeserializerSettings loadSettings; + AZStd::string deserializeErrors; + auto prepare = PrepareDeserializerSettings(settings, loadSettings, deserializeErrors); + if (!prepare.IsSuccess()) + { + return AZ::Failure(prepare.GetError()); + } + + auto parseResult = ReadJsonStream(stream); + if (!parseResult.IsSuccess()) + { + return AZ::Failure(parseResult.GetError()); + } + + const rapidjson::Document& jsonDocument = parseResult.GetValue(); + + auto validateResult = ValidateJsonClassHeader(jsonDocument); + if (!parseResult.IsSuccess()) + { + return AZ::Failure(parseResult.GetError()); + } + + const char* className = jsonDocument.FindMember(ClassNameTag)->value.GetString(); + AZStd::vector ids = loadSettings.m_serializeContext->FindClassId(AZ::Crc32(className)); + + // Load with first found class id + if (ids.size() >= 1) + { + auto classId = ids[0]; + AZStd::any anyData = loadSettings.m_serializeContext->CreateAny(classId); + auto& objectData = jsonDocument.FindMember(ClassDataTag)->value; + JsonSerializationResult::ResultCode result = JsonSerialization::Load(AZStd::any_cast(&anyData), classId, objectData, loadSettings); if (!WasLoadSuccess(result.GetOutcome()) || !deserializeErrors.empty()) { return AZ::Failure(deserializeErrors); } - return AZ::Success(); + return AZ::Success(anyData); } - AZ::Outcome LoadObjectFromStreamByType(void* objectToLoad, const Uuid& classId, IO::GenericStream& stream, - const JsonDeserializerSettings* settings) + return AZ::Failure(AZStd::string::format("Can't find serialize context for class %s", className)); + } + + AZ::Outcome LoadAnyObjectFromFile(const AZStd::string& filePath, const JsonDeserializerSettings* settings) + { + AZ::IO::FileIOStream inputFileStream; + if (!inputFileStream.Open(filePath.c_str(), AZ::IO::OpenMode::ModeRead | AZ::IO::OpenMode::ModeText)) { - JsonDeserializerSettings loadSettings; - AZStd::string deserializeErrors; - auto prepare = PrepareDeserializerSettings(settings, loadSettings, deserializeErrors); - if (!prepare.IsSuccess()) - { - return AZ::Failure(prepare.GetError()); - } - - auto parseResult = ReadJsonStream(stream); - if (!parseResult.IsSuccess()) - { - return AZ::Failure(parseResult.GetError()); - } - - const rapidjson::Document& jsonDocument = parseResult.GetValue(); - - auto validateResult = ValidateJsonClassHeader(jsonDocument); - if (!validateResult.IsSuccess()) - { - return AZ::Failure(validateResult.GetError()); - } - - const char* className = jsonDocument.FindMember(ClassNameTag)->value.GetString(); - - // validate class name - auto classData = loadSettings.m_serializeContext->FindClassData(classId); - if (!classData) - { - return AZ::Failure(AZStd::string::format("Try to load class from Id %s", classId.ToString().c_str())); - } - - if (azstricmp(classData->m_name, className) != 0) - { - return AZ::Failure(AZStd::string::format("Try to load class %s from class %s data", classData->m_name, className)); - } - - JsonSerializationResult::ResultCode result = JsonSerialization::Load(objectToLoad, classId, jsonDocument.FindMember(ClassDataTag)->value, loadSettings); - - if (!WasLoadSuccess(result.GetOutcome()) || !deserializeErrors.empty()) - { - return AZ::Failure(deserializeErrors); - } - - return AZ::Success(); - } - - AZ::Outcome LoadAnyObjectFromStream(IO::GenericStream& stream, const JsonDeserializerSettings* settings) - { - JsonDeserializerSettings loadSettings; - AZStd::string deserializeErrors; - auto prepare = PrepareDeserializerSettings(settings, loadSettings, deserializeErrors); - if (!prepare.IsSuccess()) - { - return AZ::Failure(prepare.GetError()); - } - - auto parseResult = ReadJsonStream(stream); - if (!parseResult.IsSuccess()) - { - return AZ::Failure(parseResult.GetError()); - } - - const rapidjson::Document& jsonDocument = parseResult.GetValue(); - - auto validateResult = ValidateJsonClassHeader(jsonDocument); - if (!parseResult.IsSuccess()) - { - return AZ::Failure(parseResult.GetError()); - } - - const char* className = jsonDocument.FindMember(ClassNameTag)->value.GetString(); - AZStd::vector ids = loadSettings.m_serializeContext->FindClassId(AZ::Crc32(className)); - - // Load with first found class id - if (ids.size() >= 1) - { - auto classId = ids[0]; - AZStd::any anyData = loadSettings.m_serializeContext->CreateAny(classId); - auto& objectData = jsonDocument.FindMember(ClassDataTag)->value; - JsonSerializationResult::ResultCode result = JsonSerialization::Load(AZStd::any_cast(&anyData), classId, objectData, loadSettings); - - if (!WasLoadSuccess(result.GetOutcome()) || !deserializeErrors.empty()) - { - return AZ::Failure(deserializeErrors); - } - - return AZ::Success(anyData); - } - - return AZ::Failure(AZStd::string::format("Can't find serialize context for class %s", className)); + return AZ::Failure(AZStd::string::format("Error opening file '%s' for reading", filePath.c_str())); } + return LoadAnyObjectFromStream(inputFileStream, settings); + } - AZ::Outcome LoadAnyObjectFromFile(const AZStd::string& filePath, const JsonDeserializerSettings* settings) - { - AZ::IO::FileIOStream inputFileStream; - if (!inputFileStream.Open(filePath.c_str(), AZ::IO::OpenMode::ModeRead | AZ::IO::OpenMode::ModeText)) - { - return AZ::Failure(AZStd::string::format("Error opening file '%s' for reading", filePath.c_str())); - } - return LoadAnyObjectFromStream(inputFileStream, settings); - } - - } // namespace JsonSerializationUtils -} // namespace AZ +} // namespace AZ::JsonSerializationUtils diff --git a/Code/Framework/AzCore/AzCore/Serialization/Json/PathSerializer.cpp b/Code/Framework/AzCore/AzCore/Serialization/Json/PathSerializer.cpp new file mode 100644 index 0000000000..7c057730e8 --- /dev/null +++ b/Code/Framework/AzCore/AzCore/Serialization/Json/PathSerializer.cpp @@ -0,0 +1,127 @@ +/* + * Copyright (c) Contributors to the Open 3D Engine Project. + * For complete copyright and license terms please see the LICENSE at the root of this distribution. + * + * SPDX-License-Identifier: Apache-2.0 OR MIT + * + */ + +#include +#include +#include +#include +#include +#include +#include + +namespace AZ::JsonPathSerializerInternal +{ + template + static JsonSerializationResult::Result Load(PathType* pathValue, const rapidjson::Value& inputValue, + JsonDeserializerContext& context) + { + namespace JSR = JsonSerializationResult; // Used remove name conflicts in AzCore in uber builds. + + AZ_Assert(pathValue, "Expected a valid pointer to load from json value."); + + switch (inputValue.GetType()) + { + case rapidjson::kArrayType: + case rapidjson::kObjectType: + case rapidjson::kFalseType: + case rapidjson::kTrueType: + case rapidjson::kNumberType: + [[fallthrough]]; + case rapidjson::kNullType: + return context.Report(JSR::Tasks::ReadField, JSR::Outcomes::Unsupported, + "Unsupported type. String values can't be read from arrays, objects or null."); + case rapidjson::kStringType: + { + size_t pathLength = inputValue.GetStringLength(); + if (pathLength <= pathValue->Native().max_size()) + { + *pathValue = PathType(AZStd::string_view(inputValue.GetString(), pathLength)).LexicallyNormal(); + return context.Report(JSR::Tasks::ReadField, JSR::Outcomes::Success, "Successfully read path."); + } + using UuidString = AZStd::fixed_string; + using ErrorString = AZStd::fixed_string<256>; + return context.Report(JsonSerializationResult::Tasks::ReadField, JSR::Outcomes::Invalid, + ErrorString::format("Json string value is too large to fit within path type %s. It needs to be less than %zu code points", + azrtti_typeid().template ToString().c_str(), pathValue->Native().max_size())); + } + default: + return context.Report(JSR::Tasks::ReadField, JSR::Outcomes::Unknown, "Unknown json type encountered for string value."); + } + } + template + static JsonSerializationResult::Result StoreWithDefault(rapidjson::Value& outputValue, const PathType* pathValue, + const PathType* defaultPathValue, JsonSerializerContext& context) + { + namespace JSR = JsonSerializationResult; // Removes name conflicts in AzCore in uber builds. + + if (context.ShouldKeepDefaults() || defaultPathValue == nullptr || *pathValue != *defaultPathValue) + { + auto posixPathString = pathValue->AsPosix(); + outputValue.SetString(posixPathString.c_str(), aznumeric_caster(posixPathString.size()), context.GetJsonAllocator()); + return context.Report(JSR::Tasks::WriteValue, JSR::Outcomes::Success, "Path successfully stored."); + } + + return context.Report(JSR::Tasks::WriteValue, JSR::Outcomes::DefaultsUsed, "Default Path used."); + } +} + +namespace AZ +{ + AZ_CLASS_ALLOCATOR_IMPL(JsonPathSerializer, SystemAllocator, 0); + + JsonSerializationResult::Result JsonPathSerializer::Load(void* outputValue, const Uuid& outputValueTypeId, + const rapidjson::Value& inputValue, JsonDeserializerContext& context) + { + if (outputValueTypeId == azrtti_typeid()) + { + return JsonPathSerializerInternal::Load(reinterpret_cast(outputValue), inputValue, + context); + } + else if (outputValueTypeId == azrtti_typeid()) + { + return JsonPathSerializerInternal::Load(reinterpret_cast(outputValue), inputValue, + context); + } + + using UuidString = AZStd::fixed_string; + auto errorTypeIdString = outputValueTypeId.ToString(); + AZ_Assert(false, "Unable to serialize json string" + " to a path of type %s", errorTypeIdString.c_str()); + + using ErrorString = AZStd::fixed_string<256>; + return context.Report(JsonSerializationResult::Tasks::ReadField, JsonSerializationResult::Outcomes::TypeMismatch, + ErrorString::format("Output value type ID %s is not a valid Path type", errorTypeIdString.c_str())); + } + + JsonSerializationResult::Result JsonPathSerializer::Store(rapidjson::Value& outputValue, const void* inputValue, + const void* defaultValue, const Uuid& valueTypeId, JsonSerializerContext& context) + { + if (valueTypeId == azrtti_typeid()) + { + return JsonPathSerializerInternal::StoreWithDefault(outputValue, + reinterpret_cast(inputValue), + reinterpret_cast(defaultValue), context); + } + else if (valueTypeId == azrtti_typeid()) + { + return JsonPathSerializerInternal::StoreWithDefault(outputValue, + reinterpret_cast(inputValue), + reinterpret_cast(defaultValue), context); + } + + using UuidString = AZStd::fixed_string; + auto errorTypeIdString = valueTypeId.ToString(); + AZ_Assert(false, "Unable to serialize path type %s to a json string", + errorTypeIdString.c_str()); + + using ErrorString = AZStd::fixed_string<256>; + return context.Report(JsonSerializationResult::Tasks::WriteValue, JsonSerializationResult::Outcomes::TypeMismatch, + ErrorString::format("Input value type ID %s is not a valid Path type", errorTypeIdString.c_str())); + } + +} // namespace AZ diff --git a/Code/Framework/AzCore/AzCore/Serialization/Json/PathSerializer.h b/Code/Framework/AzCore/AzCore/Serialization/Json/PathSerializer.h new file mode 100644 index 0000000000..609a489ec4 --- /dev/null +++ b/Code/Framework/AzCore/AzCore/Serialization/Json/PathSerializer.h @@ -0,0 +1,26 @@ +/* + * Copyright (c) Contributors to the Open 3D Engine Project. + * For complete copyright and license terms please see the LICENSE at the root of this distribution. + * + * SPDX-License-Identifier: Apache-2.0 OR MIT + * + */ + +#pragma once + +#include + +namespace AZ +{ + class JsonPathSerializer + : public BaseJsonSerializer + { + public: + AZ_RTTI(JsonPathSerializer, "{F6FBA901-07E0-4F03-A0B6-72A9A6CE1E96}", BaseJsonSerializer); + AZ_CLASS_ALLOCATOR_DECL; + JsonSerializationResult::Result Load(void* outputValue, const Uuid& outputValueTypeId, const rapidjson::Value& inputValue, + JsonDeserializerContext& context) override; + JsonSerializationResult::Result Store(rapidjson::Value& outputValue, const void* inputValue, const void* defaultValue, + const Uuid& valueTypeId, JsonSerializerContext& context) override; + }; +} // namespace AZ diff --git a/Code/Framework/AzCore/AzCore/Serialization/Json/RegistrationContext.h b/Code/Framework/AzCore/AzCore/Serialization/Json/RegistrationContext.h index dd10e2bff6..202efd3749 100644 --- a/Code/Framework/AzCore/AzCore/Serialization/Json/RegistrationContext.h +++ b/Code/Framework/AzCore/AzCore/Serialization/Json/RegistrationContext.h @@ -45,9 +45,8 @@ namespace AZ } else { - SerializerMap::const_iterator serializerIter = m_jsonSerializers.find(typeId); - AZ_Assert(serializerIter != m_jsonSerializers.end(), "Attempting to unregister a serializer that has not been registered yet with typeid %s", typeId.ToString().c_str()); - m_jsonSerializers.erase(serializerIter); + [[maybe_unused]] size_t erased = m_jsonSerializers.erase(typeId); + AZ_Assert(erased == 1, "Attempting to unregister a serializer that has not been registered yet with typeid %s", typeId.ToString().c_str()); return SerializerBuilder(this, m_jsonSerializers.end()); } } diff --git a/Code/Framework/AzCore/AzCore/Serialization/Json/UnsupportedTypesSerializer.cpp b/Code/Framework/AzCore/AzCore/Serialization/Json/UnsupportedTypesSerializer.cpp index 2392ff435f..ad1839f974 100644 --- a/Code/Framework/AzCore/AzCore/Serialization/Json/UnsupportedTypesSerializer.cpp +++ b/Code/Framework/AzCore/AzCore/Serialization/Json/UnsupportedTypesSerializer.cpp @@ -15,6 +15,7 @@ namespace AZ AZ_CLASS_ALLOCATOR_IMPL(JsonAnySerializer, SystemAllocator, 0); AZ_CLASS_ALLOCATOR_IMPL(JsonVariantSerializer, SystemAllocator, 0); AZ_CLASS_ALLOCATOR_IMPL(JsonOptionalSerializer, SystemAllocator, 0); + AZ_CLASS_ALLOCATOR_IMPL(JsonBitsetSerializer, SystemAllocator, 0); JsonSerializationResult::Result JsonUnsupportedTypesSerializer::Load(void*, const Uuid&, const rapidjson::Value&, JsonDeserializerContext& context) @@ -49,4 +50,10 @@ namespace AZ return "The Json Serialization doesn't support AZStd::optional by design. No JSON format has yet been found that wasn't deemed too " "complex or overly verbose."; } + + AZStd::string_view JsonBitsetSerializer::GetMessage() const + { + return "The Json Serialization doesn't support AZStd::bitset by design. No JSON format has yet been found that is content creator " + "friendly i.e., easy to comprehend the intent."; + } } // namespace AZ diff --git a/Code/Framework/AzCore/AzCore/Serialization/Json/UnsupportedTypesSerializer.h b/Code/Framework/AzCore/AzCore/Serialization/Json/UnsupportedTypesSerializer.h index d913289d3d..fdcac4c761 100644 --- a/Code/Framework/AzCore/AzCore/Serialization/Json/UnsupportedTypesSerializer.h +++ b/Code/Framework/AzCore/AzCore/Serialization/Json/UnsupportedTypesSerializer.h @@ -65,4 +65,14 @@ namespace AZ protected: AZStd::string_view GetMessage() const override; }; + + class JsonBitsetSerializer : public JsonUnsupportedTypesSerializer + { + public: + AZ_RTTI(JsonBitsetSerializer, "{10CE969D-D69E-4B3F-8593-069736F8F705}", JsonUnsupportedTypesSerializer); + AZ_CLASS_ALLOCATOR_DECL; + + protected: + AZStd::string_view GetMessage() const override; + }; } // namespace AZ diff --git a/Code/Framework/AzCore/AzCore/Serialization/ObjectStream.cpp b/Code/Framework/AzCore/AzCore/Serialization/ObjectStream.cpp index 746c80f3ea..ac44ac150c 100644 --- a/Code/Framework/AzCore/AzCore/Serialization/ObjectStream.cpp +++ b/Code/Framework/AzCore/AzCore/Serialization/ObjectStream.cpp @@ -1050,7 +1050,7 @@ namespace AZ } m_xmlNode = next; - Uuid specializedId; + Uuid specializedId = Uuid::CreateNull(); // now parse the node rapidxml::xml_attribute* attr = m_xmlNode->first_attribute(); while (attr) @@ -1643,12 +1643,15 @@ namespace AZ m_writeElementResultStack.push_back(WriteElement(ptr, classData, classElement)); return m_writeElementResultStack.back(); }; - auto closeElementCB = [this, classData]() + auto closeElementCB = [this, classTypeId = classData->m_typeId]() { if (m_writeElementResultStack.empty()) { - AZ_UNUSED(classData); // Prevent unused warning in release builds - AZ_Error("Serialize", false, "CloseElement is attempted to be called without a corresponding WriteElement when writing class %s", classData->m_name); + // ClassData could be dangling pointer if it was unreflected by the ObjectStreamWriteOverrideCB + // So use the classTypeId instead + AZ_UNUSED(classTypeId); + AZ_Error("Serialize", false, "CloseElement is attempted to be called without a corresponding WriteElement when writing class %s", + classTypeId.ToString>().c_str()); return true; } if (m_writeElementResultStack.back()) @@ -1665,16 +1668,14 @@ namespace AZ SerializeContext::ENUM_ACCESS_FOR_READ, &m_errorLogger ); - ObjectStreamWriteOverrideCB writeCB; - if (objectStreamWriteOverrideCB.Read(writeCB)) + if (objectStreamWriteOverrideCB.Invoke(callContext, objectPtr, *classData, classElement)) { - writeCB(callContext, objectPtr, *classData, classElement); return false; } else { auto objectStreamError = AZStd::string::format("Unable to invoke ObjectStream Write Element Override for class element %s of class data %s", - classElement->m_name ? classElement->m_name : "", classData->m_name); + classElement && classElement->m_name ? classElement->m_name : "", classData->m_name); m_errorLogger.ReportError(objectStreamError.c_str()); } } diff --git a/Code/Framework/AzCore/AzCore/Serialization/SerializationUtils.cpp b/Code/Framework/AzCore/AzCore/Serialization/SerializationUtils.cpp index 37eacd940e..8439ff8e2c 100644 --- a/Code/Framework/AzCore/AzCore/Serialization/SerializationUtils.cpp +++ b/Code/Framework/AzCore/AzCore/Serialization/SerializationUtils.cpp @@ -18,502 +18,499 @@ #include -namespace AZ +namespace AZ::Utils { - namespace Utils + bool LoadObjectFromStreamInPlace(IO::GenericStream& stream, AZ::SerializeContext* context, const SerializeContext::ClassData* objectClassData, void* targetPointer, const FilterDescriptor& filterDesc) { - bool LoadObjectFromStreamInPlace(IO::GenericStream& stream, AZ::SerializeContext* context, const SerializeContext::ClassData* objectClassData, void* targetPointer, const FilterDescriptor& filterDesc) + AZ_PROFILE_FUNCTION(AzCore); + + AZ_Assert(objectClassData, "Class data is required."); + + if (!context) { - AZ_PROFILE_FUNCTION(AzCore); - - AZ_Assert(objectClassData, "Class data is required."); - - if (!context) - { - EBUS_EVENT_RESULT(context, ComponentApplicationBus, GetSerializeContext); - AZ_Assert(context, "No serialize context"); - } - - if (!context) - { - return false; - } - - AZ_Assert(targetPointer, "You must provide a target pointer"); - - bool foundSuccess = false; - using CreationCallback = AZStd::function; - auto handler = [&targetPointer, objectClassData, &foundSuccess](void** instance, const SerializeContext::ClassData** classData, const Uuid& classId, SerializeContext* context) - { - void* convertibleInstance{}; - if (objectClassData->ConvertFromType(convertibleInstance, classId, targetPointer, *context)) - { - foundSuccess = true; - if (instance) - { - // The ObjectStream will ask us for the address of the target to load into, so provide it. - *instance = convertibleInstance; - } - if (classData) - { - // The ObjectStream will ask us for the class data of the target being loaded into, so provide it if needed. - // This allows us to load directly into a generic object (templated containers, strings, etc). - *classData = objectClassData; - } - } - }; - bool readSuccess = ObjectStream::LoadBlocking(&stream, *context, ObjectStream::ClassReadyCB(), filterDesc, CreationCallback(handler, AZ::OSStdAllocator())); - - AZ_Warning("Serialization", readSuccess, "LoadObjectFromStreamInPlace: Stream did not deserialize correctly"); - AZ_Warning("Serialization", foundSuccess, "LoadObjectFromStreamInPlace: Did not find the expected type in the stream"); - - return readSuccess && foundSuccess; + EBUS_EVENT_RESULT(context, ComponentApplicationBus, GetSerializeContext); + AZ_Assert(context, "No serialize context"); } - bool LoadObjectFromStreamInPlace(IO::GenericStream& stream, AZ::SerializeContext* context, const Uuid& targetClassId, void* targetPointer, const FilterDescriptor& filterDesc) + if (!context) { - AZ_PROFILE_FUNCTION(AzCore); - - if (!context) - { - EBUS_EVENT_RESULT(context, ComponentApplicationBus, GetSerializeContext); - AZ_Assert(context, "No serialize context"); - } - - if (!context) - { - return false; - } - - const SerializeContext::ClassData* classData = context->FindClassData(targetClassId); - if (!classData) - { - AZ_Error("Serialization", false, - "Unable to locate class data for uuid \"%s\". This object cannot be serialized as a root element. " - "Make sure the Uuid is valid, or if this is a generic type, use the override that takes a ClassData pointer instead.", - targetClassId.ToString().c_str()); - return false; - } - - return LoadObjectFromStreamInPlace(stream, context, classData, targetPointer, filterDesc); - } - - bool LoadObjectFromFileInPlace(const AZStd::string& filePath, const Uuid& targetClassId, void* destination, AZ::SerializeContext* context /*= nullptr*/, const FilterDescriptor& filterDesc /*= FilterDescriptor()*/) - { - AZ::IO::FileIOStream fileStream; - if (!fileStream.Open(filePath.c_str(), IO::OpenMode::ModeRead | IO::OpenMode::ModeBinary)) - { - return false; - } - - return LoadObjectFromStreamInPlace(fileStream, context, targetClassId, destination, filterDesc); - } - - void* LoadObjectFromStream(IO::GenericStream& stream, AZ::SerializeContext* context, const Uuid* targetClassId, const FilterDescriptor& filterDesc) - { - AZ_PROFILE_FUNCTION(AzCore); - - if (!context) - { - EBUS_EVENT_RESULT(context, ComponentApplicationBus, GetSerializeContext); - AZ_Assert(context, "No serialize context"); - } - - if (!context) - { - return nullptr; - } - - void* loadedInstance = nullptr; - bool success = ObjectStream::LoadBlocking(&stream, *context, - [&loadedInstance, targetClassId](void* classPtr, const Uuid& classId, const SerializeContext* serializeContext) - { - if (targetClassId) - { - void* instance = serializeContext->DownCast(classPtr, classId, *targetClassId); - - // Given a valid object - if (instance) - { - AZ_Assert(!loadedInstance, "loadedInstance must be NULL, otherwise we are being invoked with multiple valid objects"); - loadedInstance = instance; - return; - } - } - else - { - if (!loadedInstance) - { - loadedInstance = classPtr; - return; - } - } - - auto classData = serializeContext->FindClassData(classId); - if (classData && classData->m_factory) - { - classData->m_factory->Destroy(classPtr); - } - }, - filterDesc, - ObjectStream::InplaceLoadRootInfoCB() - ); - - if (!success) - { - return nullptr; - } - - return loadedInstance; - } - - void* LoadObjectFromFile(const AZStd::string& filePath, const Uuid& targetClassId, SerializeContext* context, const FilterDescriptor& filterDesc, int /*platformFlags*/) - { - AZ_PROFILE_FUNCTION(AzCore); - - AZ::IO::FileIOStream fileStream; - if (!fileStream.Open(filePath.c_str(), IO::OpenMode::ModeRead | IO::OpenMode::ModeBinary)) - { - return nullptr; - } - - void* loadedObject = LoadObjectFromStream(fileStream, context, &targetClassId, filterDesc); - return loadedObject; - } - - bool SaveObjectToStream(IO::GenericStream& stream, DataStream::StreamType streamType, const void* classPtr, const Uuid& classId, SerializeContext* context, const SerializeContext::ClassData* classData) - { - AZ_PROFILE_FUNCTION(AzCore); - - if (!context) - { - EBUS_EVENT_RESULT(context, ComponentApplicationBus, GetSerializeContext); - - if(!context) - { - AZ_Assert(false, "No serialize context"); - return false; - } - } - - if (!classPtr) - { - AZ_Assert(false, "SaveObjectToStream: classPtr is null, object cannot be serialized."); - return false; - } - - AZ::ObjectStream* objectStream = AZ::ObjectStream::Create(&stream, *context, streamType); - if (!objectStream) - { - return false; - } - - if (!objectStream->WriteClass(classPtr, classId, classData)) - { - objectStream->Finalize(); - return false; - } - - if (!objectStream->Finalize()) - { - return false; - } - - return true; - } - - bool SaveStreamToFile(const AZStd::string& filePath, const AZStd::vector& streamData, int platformFlags) - { - AZ::IO::FileIOBase* fileIo = AZ::IO::FileIOBase::GetInstance(); - AZ::IO::FixedMaxPathString resolvedPath; - if (fileIo == nullptr || !fileIo->ResolvePath(filePath.c_str(), resolvedPath.data(), resolvedPath.capacity() + 1)) - { - resolvedPath = filePath; - } - if (AZ::IO::SystemFile fileHandle; fileHandle.Open(resolvedPath.c_str(), - AZ::IO::SystemFile::SF_OPEN_CREATE | AZ::IO::SystemFile::SF_OPEN_CREATE_PATH | AZ::IO::SystemFile::SF_OPEN_WRITE_ONLY, - platformFlags)) - { - AZ::IO::SizeType bytesWritten = fileHandle.Write(streamData.data(), streamData.size()); - return bytesWritten == streamData.size(); - } - return false; } - bool SaveObjectToFile(const AZStd::string& filePath, DataStream::StreamType fileType, const void* classPtr, const Uuid& classId, SerializeContext* context, int platformFlags) - { - AZ_PROFILE_FUNCTION(AzCore); + AZ_Assert(targetPointer, "You must provide a target pointer"); - // \note This is ok for tools, but we should use the streamer to write objects directly (no memory store) - AZStd::vector dstData; - AZ::IO::ByteContainerStream > dstByteStream(&dstData); - - if (!SaveObjectToStream(dstByteStream, fileType, classPtr, classId, context)) + bool foundSuccess = false; + using CreationCallback = AZStd::function; + auto handler = [&targetPointer, objectClassData, &foundSuccess](void** instance, const SerializeContext::ClassData** classData, const Uuid& classId, SerializeContext* context) { - return false; - } - - return SaveStreamToFile(filePath, dstData, platformFlags); - } - - /*! - \brief Finds any descendant DataElementNodes of the @classElement which match each Crc32 values in the supplied elementCrcQueue - \param context SerializeContext used for looking up ClassData - \param classElement Top level DataElementNode to begin comparison each the Crc32 queue - \param elementCrcQueue Container of Crc32 values in the order in which DataElementNodes should be matched as the DataElementNode tree is traversed - \return Vector of valid pointers to DataElementNodes which match the entire element Crc32 queue - */ - AZStd::vector FindDescendantElements(AZ::SerializeContext& context, AZ::SerializeContext::DataElementNode& classElement, - const AZStd::vector& elementCrcQueue) - { - AZStd::vector dataElementNodes; - FindDescendantElements(context, classElement, dataElementNodes, elementCrcQueue.begin(), elementCrcQueue.end()); - - return dataElementNodes; - } - - /*! - \brief Finds any descendant DataElementNodes of the @classElement which match each Crc32 values in the supplied elementCrcQueue - \param context SerializeContext used for looking up ClassData - \param classElement The current DataElementNode which will be compared against be to current top Crc32 value in the Crc32 queue - \param dataElementNodes[out] Array to populate with a DataElementNode which was found by matching all Crc32 values in the Crc32 queue - \param first The current front of the Crc32 queue - \param last The end of the Crc32 queue - */ - void FindDescendantElements(AZ::SerializeContext& context, AZ::SerializeContext::DataElementNode& classElement, - AZStd::vector& dataElementNodes, AZStd::vector::const_iterator first, AZStd::vector::const_iterator last) - { - if (first == last) - { - return; - } - - for (int i = 0; i < classElement.GetNumSubElements(); ++i) - { - auto& childElement = classElement.GetSubElement(i); - if (*first == AZ::Crc32(childElement.GetName())) + void* convertibleInstance{}; + if (objectClassData->ConvertFromType(convertibleInstance, classId, targetPointer, *context)) { - if (AZStd::distance(first, last) == 1) + foundSuccess = true; + if (instance) { - dataElementNodes.push_back(&childElement); + // The ObjectStream will ask us for the address of the target to load into, so provide it. + *instance = convertibleInstance; + } + if (classData) + { + // The ObjectStream will ask us for the class data of the target being loaded into, so provide it if needed. + // This allows us to load directly into a generic object (templated containers, strings, etc). + *classData = objectClassData; + } + } + }; + bool readSuccess = ObjectStream::LoadBlocking(&stream, *context, ObjectStream::ClassReadyCB(), filterDesc, CreationCallback(handler, AZ::OSStdAllocator())); + + AZ_Warning("Serialization", readSuccess, "LoadObjectFromStreamInPlace: Stream did not deserialize correctly"); + AZ_Warning("Serialization", foundSuccess, "LoadObjectFromStreamInPlace: Did not find the expected type in the stream"); + + return readSuccess && foundSuccess; + } + + bool LoadObjectFromStreamInPlace(IO::GenericStream& stream, AZ::SerializeContext* context, const Uuid& targetClassId, void* targetPointer, const FilterDescriptor& filterDesc) + { + AZ_PROFILE_FUNCTION(AzCore); + + if (!context) + { + EBUS_EVENT_RESULT(context, ComponentApplicationBus, GetSerializeContext); + AZ_Assert(context, "No serialize context"); + } + + if (!context) + { + return false; + } + + const SerializeContext::ClassData* classData = context->FindClassData(targetClassId); + if (!classData) + { + AZ_Error("Serialization", false, + "Unable to locate class data for uuid \"%s\". This object cannot be serialized as a root element. " + "Make sure the Uuid is valid, or if this is a generic type, use the override that takes a ClassData pointer instead.", + targetClassId.ToString().c_str()); + return false; + } + + return LoadObjectFromStreamInPlace(stream, context, classData, targetPointer, filterDesc); + } + + bool LoadObjectFromFileInPlace(const AZStd::string& filePath, const Uuid& targetClassId, void* destination, AZ::SerializeContext* context /*= nullptr*/, const FilterDescriptor& filterDesc /*= FilterDescriptor()*/) + { + AZ::IO::FileIOStream fileStream; + if (!fileStream.Open(filePath.c_str(), IO::OpenMode::ModeRead | IO::OpenMode::ModeBinary)) + { + return false; + } + + return LoadObjectFromStreamInPlace(fileStream, context, targetClassId, destination, filterDesc); + } + + void* LoadObjectFromStream(IO::GenericStream& stream, AZ::SerializeContext* context, const Uuid* targetClassId, const FilterDescriptor& filterDesc) + { + AZ_PROFILE_FUNCTION(AzCore); + + if (!context) + { + EBUS_EVENT_RESULT(context, ComponentApplicationBus, GetSerializeContext); + AZ_Assert(context, "No serialize context"); + } + + if (!context) + { + return nullptr; + } + + void* loadedInstance = nullptr; + bool success = ObjectStream::LoadBlocking(&stream, *context, + [&loadedInstance, targetClassId](void* classPtr, const Uuid& classId, const SerializeContext* serializeContext) + { + if (targetClassId) + { + void* instance = serializeContext->DownCast(classPtr, classId, *targetClassId); + + // Given a valid object + if (instance) + { + AZ_Assert(!loadedInstance, "loadedInstance must be NULL, otherwise we are being invoked with multiple valid objects"); + loadedInstance = instance; + return; + } } else { - FindDescendantElements(context, childElement, dataElementNodes, AZStd::next(first), last); - } - } - } - } - - bool IsVectorContainerType(const AZ::Uuid& type) - { - AZ::SerializeContext* serializeContext = nullptr; - AZ::ComponentApplicationBus::BroadcastResult(serializeContext, &AZ::ComponentApplicationRequests::GetSerializeContext); - - if (serializeContext) - { - AZ::TypeId containerTypeId = type; - - if (GenericClassInfo* classInfo = serializeContext->FindGenericClassInfo(type)) - { - // This type is a container - containerTypeId = classInfo->GetGenericTypeId(); - } - - if (containerTypeId == AZ::GetGenericClassInfoVectorTypeId() - || containerTypeId == AZ::GetGenericClassInfoFixedVectorTypeId() - || containerTypeId == AZ::GetGenericClassInfoArrayTypeId() - ) - { - return true; - } - } - - return false; - } - - bool IsSetContainerType(const AZ::Uuid& type) - { - AZ::SerializeContext* serializeContext = nullptr; - AZ::ComponentApplicationBus::BroadcastResult(serializeContext, &AZ::ComponentApplicationRequests::GetSerializeContext); - - if (serializeContext) - { - AZ::TypeId containerTypeId = type; - - if (GenericClassInfo* classInfo = serializeContext->FindGenericClassInfo(type)) - { - // This type is a container - containerTypeId = classInfo->GetGenericTypeId(); - } - - if (containerTypeId == AZ::GetGenericClassSetTypeId() - || containerTypeId == AZ::GetGenericClassUnorderedSetTypeId() - ) - { - return true; - } - } - - return false; - } - - - bool IsMapContainerType(const AZ::Uuid& type) - { - AZ::SerializeContext* serializeContext = nullptr; - AZ::ComponentApplicationBus::BroadcastResult(serializeContext, &AZ::ComponentApplicationRequests::GetSerializeContext); - - if (serializeContext) - { - AZ::Uuid containerTypeId = type; - - if (GenericClassInfo* classInfo = serializeContext->FindGenericClassInfo(type)) - { - containerTypeId = classInfo->GetGenericTypeId(); - } - - if (containerTypeId == AZ::GetGenericClassMapTypeId() - || containerTypeId == AZ::GetGenericClassUnorderedMapTypeId() - ) - { - return true; - } - } - - return false; - } - - bool IsContainerType(const AZ::Uuid& type) - { - return IsVectorContainerType(type) || IsSetContainerType(type) || IsMapContainerType(type); - } - - AZStd::vector GetContainedTypes(const AZ::Uuid& type) - { - AZStd::vector types; - - AZ::SerializeContext* serializeContext = nullptr; - AZ::ComponentApplicationBus::BroadcastResult(serializeContext, &AZ::ComponentApplicationRequests::GetSerializeContext); - - if (serializeContext) - { - if (GenericClassInfo* classInfo = serializeContext->FindGenericClassInfo(type)) - { - for (int i = 0; i < classInfo->GetNumTemplatedArguments(); ++i) - { - types.push_back(classInfo->GetTemplatedTypeId(i)); - } - } - } - - return types; - } - - bool IsOutcomeType(const AZ::Uuid& type) - { - AZ::SerializeContext* serializeContext = nullptr; - AZ::ComponentApplicationBus::BroadcastResult(serializeContext, &AZ::ComponentApplicationRequests::GetSerializeContext); - - if (serializeContext) - { - GenericClassInfo* classInfo = serializeContext->FindGenericClassInfo(type); - return classInfo && classInfo->GetGenericTypeId() == AZ::GetGenericOutcomeTypeId(); - } - - return false; - } - - bool IsPairContainerType(const AZ::Uuid& type) - { - AZ::SerializeContext* serializeContext = nullptr; - AZ::ComponentApplicationBus::BroadcastResult(serializeContext, &AZ::ComponentApplicationRequests::GetSerializeContext); - - if (serializeContext) - { - AZ::Uuid containerTypeId = type; - - if (GenericClassInfo* classInfo = serializeContext->FindGenericClassInfo(type)) - { - containerTypeId = classInfo->GetGenericTypeId(); - } - - if (containerTypeId == AZ::GetGenericClassPairTypeId()) - { - return true; - } - } - - return false; - } - - AZ::TypeId GetGenericContainerType(const AZ::TypeId& type) - { - AZ::SerializeContext* serializeContext = nullptr; - AZ::ComponentApplicationBus::BroadcastResult(serializeContext, &AZ::ComponentApplicationRequests::GetSerializeContext); - - if (serializeContext) - { - if (GenericClassInfo* classInfo = serializeContext->FindGenericClassInfo(type)) - { - // This type is a container - return classInfo->GetGenericTypeId(); - } - } - - return azrtti_typeid(); - } - - bool IsGenericContainerType(const AZ::TypeId& type) - { - return IsContainerType(type) && GetGenericContainerType(type) == azrtti_typeid(); - } - - AZStd::pair GetOutcomeTypes(const AZ::Uuid& type) - { - AZStd::vector types; - - AZ::SerializeContext* serializeContext = nullptr; - AZ::ComponentApplicationBus::BroadcastResult(serializeContext, &AZ::ComponentApplicationRequests::GetSerializeContext); - - if (serializeContext) - { - if (GenericClassInfo* classInfo = serializeContext->FindGenericClassInfo(type)) - { - AZ_Assert(classInfo->GetNumTemplatedArguments() == 2, "Outcome template arguments must be 2, even if void, void"); - return AZStd::make_pair(classInfo->GetTemplatedTypeId(0), classInfo->GetTemplatedTypeId(1)); - } - } - - return AZStd::make_pair(azrtti_typeid(), azrtti_typeid()); - } - - void* ResolvePointer(void* ptr, const SerializeContext::ClassElement& classElement, const SerializeContext& context) - { - if (classElement.m_flags & SerializeContext::ClassElement::FLG_POINTER) - { - // In the case of pointer-to-pointer, we'll deference. - ptr = *(void**)(ptr); - - // Pointer-to-pointer fields may be base class / polymorphic, so cast pointer to actual type, - // safe for passing as 'this' to member functions. - if (ptr && classElement.m_azRtti) - { - Uuid actualClassId = classElement.m_azRtti->GetActualUuid(ptr); - if (actualClassId != classElement.m_typeId) - { - const SerializeContext::ClassData* classData = context.FindClassData(actualClassId); - if (classData) + if (!loadedInstance) { - ptr = classElement.m_azRtti->Cast(ptr, classData->m_azRtti->GetTypeId()); + loadedInstance = classPtr; + return; } } - } - } - return ptr; + auto classData = serializeContext->FindClassData(classId); + if (classData && classData->m_factory) + { + classData->m_factory->Destroy(classPtr); + } + }, + filterDesc, + ObjectStream::InplaceLoadRootInfoCB() + ); + + if (!success) + { + return nullptr; } - } // namespace Utils -} // namespace AZ + return loadedInstance; + } + + void* LoadObjectFromFile(const AZStd::string& filePath, const Uuid& targetClassId, SerializeContext* context, const FilterDescriptor& filterDesc, int /*platformFlags*/) + { + AZ_PROFILE_FUNCTION(AzCore); + + AZ::IO::FileIOStream fileStream; + if (!fileStream.Open(filePath.c_str(), IO::OpenMode::ModeRead | IO::OpenMode::ModeBinary)) + { + return nullptr; + } + + void* loadedObject = LoadObjectFromStream(fileStream, context, &targetClassId, filterDesc); + return loadedObject; + } + + bool SaveObjectToStream(IO::GenericStream& stream, DataStream::StreamType streamType, const void* classPtr, const Uuid& classId, SerializeContext* context, const SerializeContext::ClassData* classData) + { + AZ_PROFILE_FUNCTION(AzCore); + + if (!context) + { + EBUS_EVENT_RESULT(context, ComponentApplicationBus, GetSerializeContext); + + if(!context) + { + AZ_Assert(false, "No serialize context"); + return false; + } + } + + if (!classPtr) + { + AZ_Assert(false, "SaveObjectToStream: classPtr is null, object cannot be serialized."); + return false; + } + + AZ::ObjectStream* objectStream = AZ::ObjectStream::Create(&stream, *context, streamType); + if (!objectStream) + { + return false; + } + + if (!objectStream->WriteClass(classPtr, classId, classData)) + { + objectStream->Finalize(); + return false; + } + + if (!objectStream->Finalize()) + { + return false; + } + + return true; + } + + bool SaveStreamToFile(const AZStd::string& filePath, const AZStd::vector& streamData, int platformFlags) + { + AZ::IO::FileIOBase* fileIo = AZ::IO::FileIOBase::GetInstance(); + AZ::IO::FixedMaxPathString resolvedPath; + if (fileIo == nullptr || !fileIo->ResolvePath(filePath.c_str(), resolvedPath.data(), resolvedPath.capacity() + 1)) + { + resolvedPath = filePath; + } + if (AZ::IO::SystemFile fileHandle; fileHandle.Open(resolvedPath.c_str(), + AZ::IO::SystemFile::SF_OPEN_CREATE | AZ::IO::SystemFile::SF_OPEN_CREATE_PATH | AZ::IO::SystemFile::SF_OPEN_WRITE_ONLY, + platformFlags)) + { + AZ::IO::SizeType bytesWritten = fileHandle.Write(streamData.data(), streamData.size()); + return bytesWritten == streamData.size(); + } + + return false; + } + + bool SaveObjectToFile(const AZStd::string& filePath, DataStream::StreamType fileType, const void* classPtr, const Uuid& classId, SerializeContext* context, int platformFlags) + { + AZ_PROFILE_FUNCTION(AzCore); + + // \note This is ok for tools, but we should use the streamer to write objects directly (no memory store) + AZStd::vector dstData; + AZ::IO::ByteContainerStream > dstByteStream(&dstData); + + if (!SaveObjectToStream(dstByteStream, fileType, classPtr, classId, context)) + { + return false; + } + + return SaveStreamToFile(filePath, dstData, platformFlags); + } + + /*! + \brief Finds any descendant DataElementNodes of the @classElement which match each Crc32 values in the supplied elementCrcQueue + \param context SerializeContext used for looking up ClassData + \param classElement Top level DataElementNode to begin comparison each the Crc32 queue + \param elementCrcQueue Container of Crc32 values in the order in which DataElementNodes should be matched as the DataElementNode tree is traversed + \return Vector of valid pointers to DataElementNodes which match the entire element Crc32 queue + */ + AZStd::vector FindDescendantElements(AZ::SerializeContext& context, AZ::SerializeContext::DataElementNode& classElement, + const AZStd::vector& elementCrcQueue) + { + AZStd::vector dataElementNodes; + FindDescendantElements(context, classElement, dataElementNodes, elementCrcQueue.begin(), elementCrcQueue.end()); + + return dataElementNodes; + } + + /*! + \brief Finds any descendant DataElementNodes of the @classElement which match each Crc32 values in the supplied elementCrcQueue + \param context SerializeContext used for looking up ClassData + \param classElement The current DataElementNode which will be compared against be to current top Crc32 value in the Crc32 queue + \param dataElementNodes[out] Array to populate with a DataElementNode which was found by matching all Crc32 values in the Crc32 queue + \param first The current front of the Crc32 queue + \param last The end of the Crc32 queue + */ + void FindDescendantElements(AZ::SerializeContext& context, AZ::SerializeContext::DataElementNode& classElement, + AZStd::vector& dataElementNodes, AZStd::vector::const_iterator first, AZStd::vector::const_iterator last) + { + if (first == last) + { + return; + } + + for (int i = 0; i < classElement.GetNumSubElements(); ++i) + { + auto& childElement = classElement.GetSubElement(i); + if (*first == AZ::Crc32(childElement.GetName())) + { + if (AZStd::distance(first, last) == 1) + { + dataElementNodes.push_back(&childElement); + } + else + { + FindDescendantElements(context, childElement, dataElementNodes, AZStd::next(first), last); + } + } + } + } + + bool IsVectorContainerType(const AZ::Uuid& type) + { + AZ::SerializeContext* serializeContext = nullptr; + AZ::ComponentApplicationBus::BroadcastResult(serializeContext, &AZ::ComponentApplicationRequests::GetSerializeContext); + + if (serializeContext) + { + AZ::TypeId containerTypeId = type; + + if (GenericClassInfo* classInfo = serializeContext->FindGenericClassInfo(type)) + { + // This type is a container + containerTypeId = classInfo->GetGenericTypeId(); + } + + if (containerTypeId == AZ::GetGenericClassInfoVectorTypeId() + || containerTypeId == AZ::GetGenericClassInfoFixedVectorTypeId() + || containerTypeId == AZ::GetGenericClassInfoArrayTypeId() + ) + { + return true; + } + } + + return false; + } + + bool IsSetContainerType(const AZ::Uuid& type) + { + AZ::SerializeContext* serializeContext = nullptr; + AZ::ComponentApplicationBus::BroadcastResult(serializeContext, &AZ::ComponentApplicationRequests::GetSerializeContext); + + if (serializeContext) + { + AZ::TypeId containerTypeId = type; + + if (GenericClassInfo* classInfo = serializeContext->FindGenericClassInfo(type)) + { + // This type is a container + containerTypeId = classInfo->GetGenericTypeId(); + } + + if (containerTypeId == AZ::GetGenericClassSetTypeId() + || containerTypeId == AZ::GetGenericClassUnorderedSetTypeId() + ) + { + return true; + } + } + + return false; + } + + + bool IsMapContainerType(const AZ::Uuid& type) + { + AZ::SerializeContext* serializeContext = nullptr; + AZ::ComponentApplicationBus::BroadcastResult(serializeContext, &AZ::ComponentApplicationRequests::GetSerializeContext); + + if (serializeContext) + { + AZ::Uuid containerTypeId = type; + + if (GenericClassInfo* classInfo = serializeContext->FindGenericClassInfo(type)) + { + containerTypeId = classInfo->GetGenericTypeId(); + } + + if (containerTypeId == AZ::GetGenericClassMapTypeId() + || containerTypeId == AZ::GetGenericClassUnorderedMapTypeId() + ) + { + return true; + } + } + + return false; + } + + bool IsContainerType(const AZ::Uuid& type) + { + return IsVectorContainerType(type) || IsSetContainerType(type) || IsMapContainerType(type); + } + + AZStd::vector GetContainedTypes(const AZ::Uuid& type) + { + AZStd::vector types; + + AZ::SerializeContext* serializeContext = nullptr; + AZ::ComponentApplicationBus::BroadcastResult(serializeContext, &AZ::ComponentApplicationRequests::GetSerializeContext); + + if (serializeContext) + { + if (GenericClassInfo* classInfo = serializeContext->FindGenericClassInfo(type)) + { + for (int i = 0; i < classInfo->GetNumTemplatedArguments(); ++i) + { + types.push_back(classInfo->GetTemplatedTypeId(i)); + } + } + } + + return types; + } + + bool IsOutcomeType(const AZ::Uuid& type) + { + AZ::SerializeContext* serializeContext = nullptr; + AZ::ComponentApplicationBus::BroadcastResult(serializeContext, &AZ::ComponentApplicationRequests::GetSerializeContext); + + if (serializeContext) + { + GenericClassInfo* classInfo = serializeContext->FindGenericClassInfo(type); + return classInfo && classInfo->GetGenericTypeId() == AZ::GetGenericOutcomeTypeId(); + } + + return false; + } + + bool IsPairContainerType(const AZ::Uuid& type) + { + AZ::SerializeContext* serializeContext = nullptr; + AZ::ComponentApplicationBus::BroadcastResult(serializeContext, &AZ::ComponentApplicationRequests::GetSerializeContext); + + if (serializeContext) + { + AZ::Uuid containerTypeId = type; + + if (GenericClassInfo* classInfo = serializeContext->FindGenericClassInfo(type)) + { + containerTypeId = classInfo->GetGenericTypeId(); + } + + if (containerTypeId == AZ::GetGenericClassPairTypeId()) + { + return true; + } + } + + return false; + } + + AZ::TypeId GetGenericContainerType(const AZ::TypeId& type) + { + AZ::SerializeContext* serializeContext = nullptr; + AZ::ComponentApplicationBus::BroadcastResult(serializeContext, &AZ::ComponentApplicationRequests::GetSerializeContext); + + if (serializeContext) + { + if (GenericClassInfo* classInfo = serializeContext->FindGenericClassInfo(type)) + { + // This type is a container + return classInfo->GetGenericTypeId(); + } + } + + return azrtti_typeid(); + } + + bool IsGenericContainerType(const AZ::TypeId& type) + { + return IsContainerType(type) && GetGenericContainerType(type) == azrtti_typeid(); + } + + AZStd::pair GetOutcomeTypes(const AZ::Uuid& type) + { + AZStd::vector types; + + AZ::SerializeContext* serializeContext = nullptr; + AZ::ComponentApplicationBus::BroadcastResult(serializeContext, &AZ::ComponentApplicationRequests::GetSerializeContext); + + if (serializeContext) + { + if (GenericClassInfo* classInfo = serializeContext->FindGenericClassInfo(type)) + { + AZ_Assert(classInfo->GetNumTemplatedArguments() == 2, "Outcome template arguments must be 2, even if void, void"); + return AZStd::make_pair(classInfo->GetTemplatedTypeId(0), classInfo->GetTemplatedTypeId(1)); + } + } + + return AZStd::make_pair(azrtti_typeid(), azrtti_typeid()); + } + + void* ResolvePointer(void* ptr, const SerializeContext::ClassElement& classElement, const SerializeContext& context) + { + if (classElement.m_flags & SerializeContext::ClassElement::FLG_POINTER) + { + // In the case of pointer-to-pointer, we'll deference. + ptr = *(void**)(ptr); + + // Pointer-to-pointer fields may be base class / polymorphic, so cast pointer to actual type, + // safe for passing as 'this' to member functions. + if (ptr && classElement.m_azRtti) + { + Uuid actualClassId = classElement.m_azRtti->GetActualUuid(ptr); + if (actualClassId != classElement.m_typeId) + { + const SerializeContext::ClassData* classData = context.FindClassData(actualClassId); + if (classData) + { + ptr = classElement.m_azRtti->Cast(ptr, classData->m_azRtti->GetTypeId()); + } + } + } + } + + return ptr; + } + +} // namespace AZ::Utils diff --git a/Code/Framework/AzCore/AzCore/Serialization/SerializeContext.cpp b/Code/Framework/AzCore/AzCore/Serialization/SerializeContext.cpp index 81546f4f28..ff0ad571f7 100644 --- a/Code/Framework/AzCore/AzCore/Serialization/SerializeContext.cpp +++ b/Code/Framework/AzCore/AzCore/Serialization/SerializeContext.cpp @@ -2065,11 +2065,15 @@ namespace AZ } EnumerateInstanceCallContext callContext( - AZStd::bind(&SerializeContext::BeginCloneElement, this, AZStd::placeholders::_1, AZStd::placeholders::_2, AZStd::placeholders::_3, &cloneData, &m_errorLogger, &scratchBuffer), - AZStd::bind(&SerializeContext::EndCloneElement, this, &cloneData), - this, - SerializeContext::ENUM_ACCESS_FOR_READ, - &m_errorLogger); + [&](void* ptr, const ClassData* classData, const ClassElement* elementData) -> bool + { + return BeginCloneElement(ptr, classData, elementData, &cloneData, &m_errorLogger, &scratchBuffer); + }, + [&]() -> bool + { + return EndCloneElement(&cloneData); + }, + this, SerializeContext::ENUM_ACCESS_FOR_READ, &m_errorLogger); EnumerateInstance( &callContext @@ -2098,19 +2102,17 @@ namespace AZ if (ptr) { EnumerateInstanceCallContext callContext( - AZStd::bind(&SerializeContext::BeginCloneElementInplace, this, dest, AZStd::placeholders::_1, AZStd::placeholders::_2, AZStd::placeholders::_3, &cloneData, &m_errorLogger, &scratchBuffer), - AZStd::bind(&SerializeContext::EndCloneElement, this, &cloneData), - this, - SerializeContext::ENUM_ACCESS_FOR_READ, - &m_errorLogger); + [&](void* ptr, const ClassData* classData, const ClassElement* elementData) -> bool + { + return BeginCloneElementInplace(dest, ptr, classData, elementData, &cloneData, &m_errorLogger, &scratchBuffer); + }, + [&]() -> bool + { + return EndCloneElement(&cloneData); + }, + this, SerializeContext::ENUM_ACCESS_FOR_READ, &m_errorLogger); - EnumerateInstance( - &callContext - , const_cast(ptr) - , classId - , nullptr - , nullptr - ); + EnumerateInstance(&callContext, const_cast(ptr), classId, nullptr, nullptr); } } @@ -2941,14 +2943,10 @@ namespace AZ { m_errorHandler = errorHandler ? errorHandler : &m_defaultErrorHandler; - m_elementCallback = AZStd::bind(static_cast(&SerializeContext::EnumerateInstance) - , m_context - , this - , AZStd::placeholders::_1 - , AZStd::placeholders::_2 - , AZStd::placeholders::_3 - , AZStd::placeholders::_4 - ); + m_elementCallback = [this](void* ptr, const Uuid& classId, const ClassData* classData, const ClassElement* classElement)->bool + { + return m_context->EnumerateInstance(this, ptr, classId, classData, classElement); + }; } //========================================================================= diff --git a/Code/Framework/AzCore/AzCore/Serialization/SerializeContext.h b/Code/Framework/AzCore/AzCore/Serialization/SerializeContext.h index a37780029e..bf96bcdb9a 100644 --- a/Code/Framework/AzCore/AzCore/Serialization/SerializeContext.h +++ b/Code/Framework/AzCore/AzCore/Serialization/SerializeContext.h @@ -90,7 +90,7 @@ namespace AZ using AttributePtr = AZStd::shared_ptr; using AttributeSharedPair = AZStd::pair; - template + template > AttributePtr CreateModuleAttribute(T&& attrValue); /** @@ -540,6 +540,7 @@ namespace AZ */ struct ClassElement { + AZ_TYPE_INFO(ClassElement, "{7D386902-A1D9-4525-8284-F68435FE1D05}"); enum Flags { FLG_POINTER = (1 << 0), ///< Element is stored as pointer (it's not a value). @@ -563,22 +564,22 @@ namespace AZ void ClearAttributes(); Attribute* FindAttribute(AttributeId attributeId) const; - const char* m_name; ///< Used in XML output and debugging purposes - u32 m_nameCrc; ///< CRC32 of m_name - Uuid m_typeId; - size_t m_dataSize; - size_t m_offset; + const char* m_name{ "" }; ///< Used in XML output and debugging purposes + u32 m_nameCrc{}; ///< CRC32 of m_name + Uuid m_typeId = AZ::TypeId::CreateNull(); + size_t m_dataSize{}; + size_t m_offset{}; - IRttiHelper* m_azRtti; ///< Interface used to support RTTI. + IRttiHelper* m_azRtti{}; ///< Interface used to support RTTI. GenericClassInfo* m_genericClassInfo = nullptr; ///< Valid when the generic class is set. So you don't search for the actual type in the class register. - Edit::ElementData* m_editData; ///< Pointer to edit data (generated by EditContext). + Edit::ElementData* m_editData{}; ///< Pointer to edit data (generated by EditContext). AZStd::vector m_attributes{ AZStdFunctorAllocator([]() -> IAllocatorAllocate& { return AZ::AllocatorInstance::Get(); }) }; ///< Attributes attached to ClassElement. Lambda is required here as AZStdFunctorAllocator expects a function pointer ///< that returns an IAllocatorAllocate& and the AZ::AllocatorInstance::Get returns an AZ::SystemAllocator& /// which while it inherits from IAllocatorAllocate, does not work as function pointers do not support covariant return types AttributeOwnership m_attributeOwnership = AttributeOwnership::Parent; - int m_flags; ///< + int m_flags{}; ///< }; typedef AZStd::vector ClassElementArray; @@ -589,6 +590,8 @@ namespace AZ class ClassData { public: + AZ_TYPE_INFO(ClassData, "{20EB8E2E-D807-4039-84E2-CE37D7647CD4}"); + ClassData(); ~ClassData() { ClearAttributes(); } ClassData(ClassData&&) = default; @@ -1040,6 +1043,7 @@ namespace AZ */ struct EnumerateInstanceCallContext { + AZ_TYPE_INFO(EnumerateInstanceCallContext, "{FCC1DB4B-72BD-4D78-9C23-C84B91589D33}"); EnumerateInstanceCallContext(const BeginElemEnumCB& beginElemCB, const EndElemEnumCB& endElemCB, const SerializeContext* context, unsigned int accessflags, ErrorHandler* errorHandler); BeginElemEnumCB m_beginElemCB; ///< Optional callback when entering an element's hierarchy. @@ -2539,7 +2543,7 @@ namespace AZ /// associated with current module /// @param attrValue value to store within the attribute /// @param ContainerType second parameter which is used for function parameter deduction - template + template AttributePtr CreateModuleAttribute(T&& attrValue) { IAllocatorAllocate& moduleAllocator = GetCurrentSerializeContextModule().GetAllocator(); diff --git a/Code/Framework/AzCore/AzCore/Serialization/std/VariantReflection.inl b/Code/Framework/AzCore/AzCore/Serialization/std/VariantReflection.inl index 70972bb846..06d4f76c80 100644 --- a/Code/Framework/AzCore/AzCore/Serialization/std/VariantReflection.inl +++ b/Code/Framework/AzCore/AzCore/Serialization/std/VariantReflection.inl @@ -433,9 +433,7 @@ namespace AZ m_classData.m_attributes.set_allocator(AZStd::move(dllAllocator)); // Create the ObjectStreamWriteOverrideCB in the current module - using ContainerType = AttributeData>; - m_classData.m_attributes.emplace_back(AZ_CRC("ObjectStreamWriteElementOverride", 0x35eb659f), CreateModuleAttribute(&ObjectStreamWriter)); + m_classData.m_attributes.emplace_back(AZ_CRC("ObjectStreamWriteElementOverride", 0x35eb659f), CreateModuleAttribute(&ObjectStreamWriter)); } SerializeContext::ClassData* GetClassData() override diff --git a/Code/Framework/AzCore/AzCore/Settings/SettingsRegistryConsoleUtils.cpp b/Code/Framework/AzCore/AzCore/Settings/SettingsRegistryConsoleUtils.cpp index 7a8ab85ce3..e5f87f4e7f 100644 --- a/Code/Framework/AzCore/AzCore/Settings/SettingsRegistryConsoleUtils.cpp +++ b/Code/Framework/AzCore/AzCore/Settings/SettingsRegistryConsoleUtils.cpp @@ -9,6 +9,7 @@ #include #include #include +#include #include #include #include @@ -36,7 +37,7 @@ namespace AZ::SettingsRegistryConsoleUtils combinedKeyValueCommand.c_str()); AZ::Debug::Trace::Output("SettingsRegistry", setOutput.c_str()); } - }; + } static void ConsoleRemoveSettingsRegistryValue(SettingsRegistryInterface& settingsRegistry, const ConsoleCommandContainer& commandArgs) { @@ -57,7 +58,7 @@ namespace AZ::SettingsRegistryConsoleUtils AZ::Debug::Trace::Output("SettingsRegistry", removeOutput.c_str()); } } - }; + } static void ConsoleDumpSettingsRegistryValue(SettingsRegistryInterface& settingsRegistry, const ConsoleCommandContainer& commandArgs) { @@ -88,13 +89,39 @@ namespace AZ::SettingsRegistryConsoleUtils } AZ::Debug::Trace::Output("SettingsRegistry", outputString.c_str()); - }; + } static void ConsoleDumpAllSettingsRegistryValues(SettingsRegistryInterface& settingsRegistry, [[maybe_unused]] const ConsoleCommandContainer& commandArgs) { ConsoleDumpSettingsRegistryValue(settingsRegistry, { "" }); - }; + } + + static void ConsoleMergeFileToSettingsRegistry(SettingsRegistryInterface& settingsRegistry, const ConsoleCommandContainer& commandArgs) + { + if (commandArgs.empty()) + { + AZ_Error("SettingsRegistryConsoleUtils", false, "Command %s requires a argument to locate json file to merge", + SettingsRegistryMergeFile); + return; + } + + auto commandArgumentsIter = commandArgs.begin(); + // Extract the JSON pointer path from the argument list + AZStd::string_view filePath{ *commandArgumentsIter++ }; + AZ::SettingsRegistryInterface::FixedValueString jsonAnchorPath; + AZ::StringFunc::Join(jsonAnchorPath, commandArgumentsIter, commandArgs.end(), ' '); + + const auto mergeFormat = AZ::IO::PathView(filePath).Extension() != ".setregpatch" ? AZ::SettingsRegistryInterface::Format::JsonMergePatch : AZ::SettingsRegistryInterface::Format::JsonPatch; + if (settingsRegistry.MergeSettingsFile(filePath, mergeFormat, jsonAnchorPath)) + { + const auto mergeFileOutput = AZ::SettingsRegistryInterface::FixedValueString::format( + R"(Merged json file "%*.s" anchored to json path "%s" into the global settings registry)" "\n", + AZ_STRING_ARG(filePath), jsonAnchorPath.c_str()); + AZ::Debug::Trace::Output("SettingsRegistry", mergeFileOutput.c_str()); + } + } + [[nodiscard]] ConsoleFunctorHandle RegisterAzConsoleCommands(SettingsRegistryInterface& registry, AZ::IConsole& azConsole) { @@ -115,6 +142,11 @@ namespace AZ::SettingsRegistryConsoleUtils resultHandle.m_consoleFunctors.emplace_back(azConsole, SettingsRegistryDumpAll, R"(Dumps all values from the global settings registry)" "\n", ConsoleFunctorFlags::Null, AZ::TypeId::CreateNull(), registry, &ConsoleDumpAllSettingsRegistryValues); + resultHandle.m_consoleFunctors.emplace_back(azConsole, SettingsRegistryMergeFile, + R"(Merges File into the global settings registry)" "\n" + R"(@param file-path - path to JSON formatted file to merge)" "\n" + R"(@param anchor-path - JSON path to anchor merge operation. Defaults to "")" "\n", + ConsoleFunctorFlags::Null, AZ::TypeId::CreateNull(), registry, &ConsoleMergeFileToSettingsRegistry); return resultHandle; } diff --git a/Code/Framework/AzCore/AzCore/Settings/SettingsRegistryConsoleUtils.h b/Code/Framework/AzCore/AzCore/Settings/SettingsRegistryConsoleUtils.h index ba0d552dde..2e37431839 100644 --- a/Code/Framework/AzCore/AzCore/Settings/SettingsRegistryConsoleUtils.h +++ b/Code/Framework/AzCore/AzCore/Settings/SettingsRegistryConsoleUtils.h @@ -14,15 +14,16 @@ namespace AZ::SettingsRegistryConsoleUtils { - //! Only 4 console command are registered for the settings registry - //! "regset", "regremove", "regdump", "regdumpall" + //! The following console command are registered for the settings registry + //! "regset", "regremove", "regdump", "regdumpall", "regset-file" //! The value should be increased if more commands are needed - inline constexpr size_t MaxSettingsRegistryConsoleFunctors = 4; + inline constexpr size_t MaxSettingsRegistryConsoleFunctors = 5; inline constexpr const char* SettingsRegistrySet = "sr_regset"; inline constexpr const char* SettingsRegistryRemove = "sr_regremove"; inline constexpr const char* SettingsRegistryDump = "sr_regdump"; inline constexpr const char* SettingsRegistryDumpAll = "sr_regdumpall"; + inline constexpr const char* SettingsRegistryMergeFile = "sr_regset_file"; // RAII structure which owns the instances of the Settings Registry Console commands // registered with an AZ Console @@ -51,6 +52,10 @@ namespace AZ::SettingsRegistryConsoleUtils //! //! "sr_regdumpall" accepts 0 arguments and dumps the entire settings registry //! NOTE: this might result in a large amount of output to the console + //! + //! "sr_regset_file" accepts 1 or 2 arguments - [] + //! Merges the json formatted file into the settings registry underneath the root anchor "" + //! or if supplied [[nodiscard]] ConsoleFunctorHandle RegisterAzConsoleCommands(SettingsRegistryInterface& registry, AZ::IConsole& azConsole); } diff --git a/Code/Framework/AzCore/AzCore/Settings/SettingsRegistryImpl.cpp b/Code/Framework/AzCore/AzCore/Settings/SettingsRegistryImpl.cpp index cbf25c29d4..43c8a64b93 100644 --- a/Code/Framework/AzCore/AzCore/Settings/SettingsRegistryImpl.cpp +++ b/Code/Framework/AzCore/AzCore/Settings/SettingsRegistryImpl.cpp @@ -327,7 +327,7 @@ namespace AZ while (!localNotifierQueue.empty()) { - for (SignalNotifierArgs notifierArgs : localNotifierQueue) + for (const SignalNotifierArgs& notifierArgs : localNotifierQueue) { localNotifierEvent.Signal(notifierArgs.m_jsonPath, notifierArgs.m_type); } diff --git a/Code/Framework/AzCore/AzCore/Settings/SettingsRegistryMergeUtils.cpp b/Code/Framework/AzCore/AzCore/Settings/SettingsRegistryMergeUtils.cpp index 5458a3fadf..eed0112ad1 100644 --- a/Code/Framework/AzCore/AzCore/Settings/SettingsRegistryMergeUtils.cpp +++ b/Code/Framework/AzCore/AzCore/Settings/SettingsRegistryMergeUtils.cpp @@ -19,9 +19,6 @@ #include #include #include -#include -#include -#include #include #include @@ -29,6 +26,8 @@ namespace AZ::Internal { + static constexpr const char* ProductCacheDirectoryName = "Cache"; + AZ::SettingsRegistryInterface::FixedValueString GetEngineMonikerForProject( SettingsRegistryInterface& settingsRegistry, const AZ::IO::FixedMaxPath& projectJsonPath) { @@ -228,19 +227,20 @@ namespace AZ::Internal namespace AZ::SettingsRegistryMergeUtils { - constexpr AZStd::string_view InternalScanUpEngineRootKey{ "/O3DE/Settings/Internal/engine_root_scan_up_path" }; - constexpr AZStd::string_view InternalScanUpProjectRootKey{ "/O3DE/Settings/Internal/project_root_scan_up_path" }; - AZ::IO::FixedMaxPath FindEngineRoot(SettingsRegistryInterface& settingsRegistry) { + static constexpr AZStd::string_view InternalScanUpEngineRootKey{ "/O3DE/Runtime/Internal/engine_root_scan_up_path" }; + using FixedValueString = SettingsRegistryInterface::FixedValueString; + using Type = SettingsRegistryInterface::Type; + AZ::IO::FixedMaxPath engineRoot; // This is the 'external' engine root key, as in passed from command-line or .setreg files. - auto engineRootKey = SettingsRegistryInterface::FixedValueString::format("%s/engine_path", BootstrapSettingsRootKey); + constexpr auto engineRootKey = FixedValueString(BootstrapSettingsRootKey) + "/engine_path"; // Step 1 Run the scan upwards logic once to find the location of the engine.json if it exist // Once this step is run the {InternalScanUpEngineRootKey} is set in the Settings Registry // to have this scan logic only run once InternalScanUpEngineRootKey the supplied registry - if (settingsRegistry.GetType(InternalScanUpEngineRootKey) == SettingsRegistryInterface::Type::NoType) + if (settingsRegistry.GetType(InternalScanUpEngineRootKey) == Type::NoType) { // We can scan up from exe directory to find engine.json, use that for engine root if it exists. engineRoot = Internal::ScanUpRootLocator("engine.json"); @@ -263,7 +263,8 @@ namespace AZ::SettingsRegistryMergeUtils // Step 3 locate the project root and attempt to find the engine root using the registered engine // for the project in the project.json file - AZ::IO::FixedMaxPath projectRoot = FindProjectRoot(settingsRegistry); + AZ::IO::FixedMaxPath projectRoot; + settingsRegistry.Get(projectRoot.Native(), FilePathKey_ProjectPath); if (projectRoot.empty()) { return {}; @@ -283,14 +284,18 @@ namespace AZ::SettingsRegistryMergeUtils AZ::IO::FixedMaxPath FindProjectRoot(SettingsRegistryInterface& settingsRegistry) { - AZ::IO::FixedMaxPath projectRoot; - const auto projectRootKey = SettingsRegistryInterface::FixedValueString::format("%s/project_path", BootstrapSettingsRootKey); + static constexpr AZStd::string_view InternalScanUpProjectRootKey{ "/O3DE/Runtime/Internal/project_root_scan_up_path" }; + using FixedValueString = SettingsRegistryInterface::FixedValueString; + using Type = SettingsRegistryInterface::Type; - // Step 1 Run the scan upwards logic once to find the location of the project.json if it exist + AZ::IO::FixedMaxPath projectRoot; + constexpr auto projectRootKey = FixedValueString(BootstrapSettingsRootKey) + "/project_path"; + + // Step 1 Run the scan upwards logic once to find the location of the closest ancestor project.json // Once this step is run the {InternalScanUpProjectRootKey} is set in the Settings Registry // to have this scan logic only run once for the supplied registry // SettingsRegistryInterface::GetType is used to check if a key is set - if (settingsRegistry.GetType(InternalScanUpProjectRootKey) == SettingsRegistryInterface::Type::NoType) + if (settingsRegistry.GetType(InternalScanUpProjectRootKey) == Type::NoType) { projectRoot = Internal::ScanUpRootLocator("project.json"); // Set the {InternalScanUpProjectRootKey} to make sure this code path isn't called again for this settings registry @@ -305,19 +310,129 @@ namespace AZ::SettingsRegistryMergeUtils } // Step 2 Check the project-path key - // This is the project path root key, as in passed from command-line or .setreg files. - if (settingsRegistry.Get(projectRoot.Native(), projectRootKey)) + // This is the project path root key, as passed from command-line or *.setreg files. + settingsRegistry.Get(projectRoot.Native(), projectRootKey); + return projectRoot; + } + + //! The algorithm that is used to find the project cache is as follows + //! 1. The "{BootstrapSettingsRootKey}/project_cache_path" is checked for the path + //! 2. Otherwise append the ProductCacheDirectoryName constant to the + static AZ::IO::FixedMaxPath FindProjectCachePath(SettingsRegistryInterface& settingsRegistry, const AZ::IO::FixedMaxPath& projectPath) + { + using FixedValueString = SettingsRegistryInterface::FixedValueString; + + constexpr auto projectCachePathKey = FixedValueString(BootstrapSettingsRootKey) + "/project_cache_path"; + + // Step 1 Check the project-cache-path key + if (AZ::IO::FixedMaxPath projectCachePath; settingsRegistry.Get(projectCachePath.Native(), projectCachePathKey)) { - return projectRoot; + return projectCachePath; } - // Step 3 Check for a "Cache" directory by scanning upwards from the executable directory - if (auto candidateRoot = Internal::ScanUpRootLocator("Cache"); - !candidateRoot.empty() && AZ::IO::SystemFile::IsDirectory(candidateRoot.c_str())) + // Step 2 Append the "Cache" directory to the project-path + return projectPath / Internal::ProductCacheDirectoryName; + } + + //! Set the user directory with the provided path or using /user as default + static AZ::IO::FixedMaxPath FindProjectUserPath(SettingsRegistryInterface& settingsRegistry, + const AZ::IO::FixedMaxPath& projectPath) + { + using FixedValueString = SettingsRegistryInterface::FixedValueString; + + // User: root - same as the @user@ alias, this is the starting path for transient data and log files. + constexpr auto projectUserPathKey = FixedValueString(BootstrapSettingsRootKey) + "/project_user_path"; + + // Step 1 Check the project-user-path key + if (AZ::IO::FixedMaxPath projectUserPath; settingsRegistry.Get(projectUserPath.Native(), projectUserPathKey)) { - projectRoot = AZStd::move(candidateRoot); + return projectUserPath; + } + + // Step 2 Append the "User" directory to the project-path + return projectPath / "user"; + } + + //! Set the log directory using the settings registry path or using /log as default + static AZ::IO::FixedMaxPath FindProjectLogPath(SettingsRegistryInterface& settingsRegistry, + const AZ::IO::FixedMaxPath& projectUserPath) + { + using FixedValueString = SettingsRegistryInterface::FixedValueString; + + // User: root - same as the @log@ alias, this is the starting path for transient data and log files. + constexpr auto projectLogPathKey = FixedValueString(BootstrapSettingsRootKey) + "/project_log_path"; + + // Step 1 Check the project-user-path key + if (AZ::IO::FixedMaxPath projectLogPath; settingsRegistry.Get(projectLogPath.Native(), projectLogPathKey)) + { + return projectLogPath; + } + + // Step 2 Append the "Log" directory to the project-user-path + return projectUserPath / "log"; + } + + // check for a default write storage path, fall back to the if not + static AZ::IO::FixedMaxPath FindDevWriteStoragePath(const AZ::IO::FixedMaxPath& projectUserPath) + { + AZStd::optional devWriteStorage = Utils::GetDevWriteStoragePath(); + return devWriteStorage.has_value() ? *devWriteStorage : projectUserPath; + } + + // check for the project build path, which is a relative path from the project root + // that specifies where the build directory is located + static void SetProjectBuildPath(SettingsRegistryInterface& settingsRegistry, + const AZ::IO::FixedMaxPath& projectPath) + { + if (AZ::IO::FixedMaxPath projectBuildPath; settingsRegistry.Get(projectBuildPath.Native(), ProjectBuildPath)) + { + settingsRegistry.Remove(FilePathKey_ProjectBuildPath); + settingsRegistry.Remove(FilePathKey_ProjectConfigurationBinPath); + AZ::IO::FixedMaxPath buildConfigurationPath = (projectPath / projectBuildPath).LexicallyNormal(); + if (IO::SystemFile::Exists(buildConfigurationPath.c_str())) + { + settingsRegistry.Set(FilePathKey_ProjectBuildPath, buildConfigurationPath.Native()); + } + + // Add the specific build configuration paths to the Settings Registry + // First try /bin/$ and if that path doesn't exist + // try /bin/$/$ + buildConfigurationPath /= "bin"; + if (IO::SystemFile::Exists((buildConfigurationPath / AZ_BUILD_CONFIGURATION_TYPE).c_str())) + { + settingsRegistry.Set(FilePathKey_ProjectConfigurationBinPath, + (buildConfigurationPath / AZ_BUILD_CONFIGURATION_TYPE).Native()); + } + else if (IO::SystemFile::Exists((buildConfigurationPath / AZ_TRAIT_OS_PLATFORM_CODENAME / AZ_BUILD_CONFIGURATION_TYPE).c_str())) + { + settingsRegistry.Set(FilePathKey_ProjectConfigurationBinPath, + (buildConfigurationPath / AZ_TRAIT_OS_PLATFORM_CODENAME / AZ_BUILD_CONFIGURATION_TYPE).Native()); + } + } + } + + // Sets the project name within the Settings Registry by looking up the "project_name" + // within the project.json file + static void SetProjectName(SettingsRegistryInterface& settingsRegistry, + const AZ::IO::FixedMaxPath& projectPath) + { + using FixedValueString = SettingsRegistryInterface::FixedValueString; + // Project name - if it was set via merging project.json use that value, otherwise use the project path's folder name. + constexpr auto projectNameKey = FixedValueString(ProjectSettingsRootKey) + "/project_name"; + + // Read the project name from the project.json file if it exists + if (AZ::IO::FixedMaxPath projectJsonPath = projectPath / "project.json"; + AZ::IO::SystemFile::Exists(projectJsonPath.c_str())) + { + settingsRegistry.MergeSettingsFile(projectJsonPath.Native(), + AZ::SettingsRegistryInterface::Format::JsonMergePatch, AZ::SettingsRegistryMergeUtils::ProjectSettingsRootKey); + } + // If a project name isn't set the default will be set to the final path segment of the project path + if (FixedValueString projectName; !settingsRegistry.Get(projectName, projectNameKey)) + { + projectName = projectPath.Filename().Native(); + settingsRegistry.Set(projectNameKey, projectName); } - return projectRoot; } AZStd::string_view ConfigParserSettings::DefaultCommentPrefixFilter(AZStd::string_view line) @@ -397,7 +512,7 @@ namespace AZ::SettingsRegistryMergeUtils bool MergeSettingsToRegistry_ConfigFile(SettingsRegistryInterface& registry, AZStd::string_view filePath, const ConfigParserSettings& configParserSettings) { - auto configPath = FindEngineRoot(registry) / filePath; + auto configPath = FindProjectRoot(registry) / filePath; IO::FileReader configFile; bool configFileOpened{}; switch (configParserSettings.m_fileReaderClass) @@ -542,19 +657,78 @@ namespace AZ::SettingsRegistryMergeUtils void MergeSettingsToRegistry_AddRuntimeFilePaths(SettingsRegistryInterface& registry) { using FixedValueString = AZ::SettingsRegistryInterface::FixedValueString; - // Binary folder - AZ::IO::FixedMaxPath path = AZ::Utils::GetExecutableDirectory(); - registry.Set(FilePathKey_BinaryFolder, path.LexicallyNormal().Native()); - // Engine root folder - corresponds to the @engroot@ and @engroot@ aliases - AZ::IO::FixedMaxPath engineRoot = FindEngineRoot(registry); - registry.Set(FilePathKey_EngineRootFolder, engineRoot.LexicallyNormal().Native()); + // Binary folder - corresponds to the @exefolder@ alias + AZ::IO::FixedMaxPath exePath = AZ::Utils::GetExecutableDirectory(); + registry.Set(FilePathKey_BinaryFolder, exePath.LexicallyNormal().Native()); - auto projectPathKey = FixedValueString::format("%s/project_path", BootstrapSettingsRootKey); - SettingsRegistryInterface::FixedValueString projectPathValue; - if (registry.Get(projectPathValue, projectPathKey)) + // Project path - corresponds to the @projectroot@ alias + // NOTE: We make the project-path in the BootstrapSettingsRootKey absolute first + + AZ::IO::FixedMaxPath projectPath = FindProjectRoot(registry); + if ([[maybe_unused]] constexpr auto projectPathKey = FixedValueString(BootstrapSettingsRootKey) + "/project_path"; + !projectPath.empty()) { - // Cache folder + if (projectPath.IsRelative()) + { + if (auto projectAbsPath = AZ::Utils::ConvertToAbsolutePath(projectPath.Native()); + projectAbsPath.has_value()) + { + projectPath = AZStd::move(*projectAbsPath); + } + } + + projectPath = projectPath.LexicallyNormal(); + AZ_Warning("SettingsRegistryMergeUtils", AZ::IO::SystemFile::Exists(projectPath.c_str()), + R"(Project path "%s" does not exist. Is the "%.*s" registry setting set to a valid absolute path?)" + , projectPath.c_str(), AZ_STRING_ARG(projectPathKey)); + + registry.Set(FilePathKey_ProjectPath, projectPath.Native()); + } + else + { + AZ_TracePrintf("SettingsRegistryMergeUtils", + R"(Project path isn't set in the Settings Registry at "%.*s".)" + " Project-related filepaths will be set relative to the executable directory\n", + AZ_STRING_ARG(projectPathKey)); + projectPath = exePath; + registry.Set(FilePathKey_ProjectPath, exePath.Native()); + } + + // Engine root folder - corresponds to the @engroot@ alias + AZ::IO::FixedMaxPath engineRoot = FindEngineRoot(registry); + if (!engineRoot.empty()) + { + if (engineRoot.IsRelative()) + { + if (auto engineRootAbsPath = AZ::Utils::ConvertToAbsolutePath(engineRoot.Native()); + engineRootAbsPath.has_value()) + { + engineRoot = AZStd::move(*engineRootAbsPath); + } + } + + engineRoot = engineRoot.LexicallyNormal(); + registry.Set(FilePathKey_EngineRootFolder, engineRoot.Native()); + } + + // Cache folder + AZ::IO::FixedMaxPath projectCachePath = FindProjectCachePath(registry, projectPath).LexicallyNormal(); + if (!projectCachePath.empty()) + { + if (projectCachePath.IsRelative()) + { + if (auto projectCacheAbsPath = AZ::Utils::ConvertToAbsolutePath(projectCachePath.Native()); + projectCacheAbsPath.has_value()) + { + projectCachePath = AZStd::move(*projectCacheAbsPath); + } + } + + projectCachePath = projectCachePath.LexicallyNormal(); + registry.Set(FilePathKey_CacheProjectRootFolder, projectCachePath.Native()); + + // Cache/ folder // Get the name of the asset platform assigned by the bootstrap. First check for platform version such as "windows_assets" // and if that's missing just get "assets". FixedValueString assetPlatform; @@ -570,124 +744,67 @@ namespace AZ::SettingsRegistryMergeUtils assetPlatform = AZ::OSPlatformToDefaultAssetPlatform(AZ_TRAIT_OS_PLATFORM_CODENAME); } - // Project path - corresponds to the @projectroot@ alias - // NOTE: Here we append to engineRoot, but if projectPathValue is absolute then engineRoot is discarded. - path = engineRoot / projectPathValue; - - AZ_Warning("SettingsRegistryMergeUtils", AZ::IO::SystemFile::Exists(path.c_str()), - R"(Project path "%s" does not exist. Is the "%.*s" registry setting set to valid absolute path?)" - , path.c_str(), aznumeric_cast(projectPathKey.size()), projectPathKey.data()); - - AZ::IO::FixedMaxPath normalizedProjectPath = path.LexicallyNormal(); - registry.Set(FilePathKey_ProjectPath, normalizedProjectPath.Native()); - - // Set the user directory with the provided path or using project/user as default - auto projectUserPathKey = FixedValueString::format("%s/project_user_path", BootstrapSettingsRootKey); - AZ::IO::FixedMaxPath projectUserPath; - if (!registry.Get(projectUserPath.Native(), projectUserPathKey)) - { - projectUserPath = (normalizedProjectPath / "user").LexicallyNormal(); - } - registry.Set(FilePathKey_ProjectUserPath, projectUserPath.Native()); - - // Set the log directory with the provided path or using project/user/log as default - auto projectLogPathKey = FixedValueString::format("%s/project_log_path", BootstrapSettingsRootKey); - AZ::IO::FixedMaxPath projectLogPath; - if (!registry.Get(projectLogPath.Native(), projectLogPathKey)) - { - projectLogPath = (projectUserPath / "log").LexicallyNormal(); - } - registry.Set(FilePathKey_ProjectLogPath, projectLogPath.Native()); - - // check for a default write storage path, fall back to the project's user/ directory if not - AZStd::optional devWriteStorage = Utils::GetDevWriteStoragePath(); - registry.Set(FilePathKey_DevWriteStorage, devWriteStorage.has_value() - ? devWriteStorage.value() - : projectUserPath.Native()); - - // Set the project in-memory build path if the ProjectBuildPath key has been supplied - if (AZ::IO::FixedMaxPath projectBuildPath; registry.Get(projectBuildPath.Native(), ProjectBuildPath)) - { - registry.Remove(FilePathKey_ProjectBuildPath); - registry.Remove(FilePathKey_ProjectConfigurationBinPath); - AZ::IO::FixedMaxPath buildConfigurationPath = normalizedProjectPath / projectBuildPath; - if (IO::SystemFile::Exists(buildConfigurationPath.c_str())) - { - registry.Set(FilePathKey_ProjectBuildPath, buildConfigurationPath.LexicallyNormal().Native()); - } - - // Add the specific build configuration paths to the Settings Registry - // First try /bin/$ and if that path doesn't exist - // try /bin/$/$ - buildConfigurationPath /= "bin"; - if (IO::SystemFile::Exists((buildConfigurationPath / AZ_BUILD_CONFIGURATION_TYPE).c_str())) - { - registry.Set(FilePathKey_ProjectConfigurationBinPath, - (buildConfigurationPath / AZ_BUILD_CONFIGURATION_TYPE).LexicallyNormal().Native()); - } - else if (IO::SystemFile::Exists((buildConfigurationPath / AZ_TRAIT_OS_PLATFORM_CODENAME / AZ_BUILD_CONFIGURATION_TYPE).c_str())) - { - registry.Set(FilePathKey_ProjectConfigurationBinPath, - (buildConfigurationPath / AZ_TRAIT_OS_PLATFORM_CODENAME / AZ_BUILD_CONFIGURATION_TYPE).LexicallyNormal().Native()); - } - - } - - // Project name - if it was set via merging project.json use that value, otherwise use the project path's folder name. - constexpr auto projectNameKey = - FixedValueString(AZ::SettingsRegistryMergeUtils::ProjectSettingsRootKey) - + "/project_name"; - - // Read the project name from the project.json file if it exists - if (AZ::IO::FixedMaxPath projectJsonPath = normalizedProjectPath / "project.json"; - AZ::IO::SystemFile::Exists(projectJsonPath.c_str())) - { - registry.MergeSettingsFile(projectJsonPath.Native(), - AZ::SettingsRegistryInterface::Format::JsonMergePatch, AZ::SettingsRegistryMergeUtils::ProjectSettingsRootKey); - } - if (FixedValueString projectName; !registry.Get(projectName, projectNameKey)) - { - projectName = path.Filename().Native(); - registry.Set(projectNameKey, projectName); - } - - // Cache folders - sets up various paths in registry for the cache. - // Make sure the asset platform is set before setting these cache paths. + // Make sure the asset platform is set before setting cache path for the asset platform. if (!assetPlatform.empty()) { - // Cache: project root - no corresponding fileIO alias, but this is where the asset database lives. - // A registry override is accepted using the "project_cache_path" key. - auto projectCacheRootOverrideKey = FixedValueString::format("%s/project_cache_path", BootstrapSettingsRootKey); - // Clear path to make sure that the `project_cache_path` value isn't concatenated to the project path - path.clear(); - if (registry.Get(path.Native(), projectCacheRootOverrideKey)) - { - registry.Set(FilePathKey_CacheProjectRootFolder, path.LexicallyNormal().Native()); - path /= assetPlatform; - registry.Set(FilePathKey_CacheRootFolder, path.LexicallyNormal().Native()); - } - else - { - // Cache: root - same as the @products@ alias, this is the starting path for cache files. - path = normalizedProjectPath / "Cache"; - registry.Set(FilePathKey_CacheProjectRootFolder, path.LexicallyNormal().Native()); - path /= assetPlatform; - registry.Set(FilePathKey_CacheRootFolder, path.LexicallyNormal().Native()); - } + registry.Set(FilePathKey_CacheRootFolder, (projectCachePath / assetPlatform).Native()); } } - else + + // User folder + AZ::IO::FixedMaxPath projectUserPath = FindProjectUserPath(registry, projectPath); + if (!projectUserPath.empty()) { - // Set the default ProjectUserPath to the /user directory - registry.Set(FilePathKey_ProjectUserPath, (engineRoot / "user").LexicallyNormal().Native()); - AZ_TracePrintf("SettingsRegistryMergeUtils", - R"(Project path isn't set in the Settings Registry at "%.*s". Project-related filepaths will not be set)" "\n", - aznumeric_cast(projectPathKey.size()), projectPathKey.data()); + if (projectUserPath.IsRelative()) + { + if (auto projectUserAbsPath = AZ::Utils::ConvertToAbsolutePath(projectUserPath.Native()); + projectUserAbsPath.has_value()) + { + projectUserPath = AZStd::move(*projectUserAbsPath); + } + } + + projectUserPath = projectUserPath.LexicallyNormal(); + registry.Set(FilePathKey_ProjectUserPath, projectUserPath.Native()); } + // Log folder + if (AZ::IO::FixedMaxPath projectLogPath = FindProjectLogPath(registry, projectUserPath); !projectLogPath.empty()) + { + if (projectLogPath.IsRelative()) + { + if (auto projectLogAbsPath = AZ::Utils::ConvertToAbsolutePath(projectLogPath.Native())) + { + projectLogPath = AZStd::move(*projectLogAbsPath); + } + } + + projectLogPath = projectLogPath.LexicallyNormal(); + registry.Set(FilePathKey_ProjectLogPath, projectLogPath.Native()); + } + + // Developer Write Storage folder + if (AZ::IO::FixedMaxPath devWriteStoragePath = FindDevWriteStoragePath(projectUserPath); !devWriteStoragePath.empty()) + { + if (devWriteStoragePath.IsRelative()) + { + if (auto devWriteStorageAbsPath = AZ::Utils::ConvertToAbsolutePath(devWriteStoragePath.Native())) + { + devWriteStoragePath = AZStd::move(*devWriteStorageAbsPath); + } + } + + devWriteStoragePath = devWriteStoragePath.LexicallyNormal(); + registry.Set(FilePathKey_DevWriteStorage, devWriteStoragePath.Native()); + } + + // Set the project in-memory build path if the ProjectBuildPath key has been supplied + SetProjectBuildPath(registry, projectPath); + // Set the project name using the "project_name" key + SetProjectName(registry, projectPath); + #if !AZ_TRAIT_OS_IS_HOST_OS_PLATFORM // Setup the cache, user, and log paths to platform specific locations when running on non-host platforms - path = engineRoot; if (AZStd::optional nonHostCacheRoot = Utils::GetDefaultAppRootPath(); nonHostCacheRoot) { @@ -696,25 +813,25 @@ namespace AZ::SettingsRegistryMergeUtils } else { - registry.Set(FilePathKey_CacheProjectRootFolder, path.LexicallyNormal().Native()); - registry.Set(FilePathKey_CacheRootFolder, path.LexicallyNormal().Native()); + registry.Set(FilePathKey_CacheProjectRootFolder, projectPath.Native()); + registry.Set(FilePathKey_CacheRootFolder, projectPath.Native()); } if (AZStd::optional devWriteStorage = Utils::GetDevWriteStoragePath(); devWriteStorage) { - const AZ::IO::FixedMaxPath devWriteStoragePath(*devWriteStorage); - registry.Set(FilePathKey_DevWriteStorage, devWriteStoragePath.LexicallyNormal().Native()); - registry.Set(FilePathKey_ProjectUserPath, (devWriteStoragePath / "user").LexicallyNormal().Native()); - registry.Set(FilePathKey_ProjectLogPath, (devWriteStoragePath / "user/log").LexicallyNormal().Native()); + const auto devWriteStoragePath = AZ::IO::PathView(*devWriteStorage).LexicallyNormal(); + registry.Set(FilePathKey_DevWriteStorage, devWriteStoragePath.Native()); + registry.Set(FilePathKey_ProjectUserPath, (devWriteStoragePath / "user").Native()); + registry.Set(FilePathKey_ProjectLogPath, (devWriteStoragePath / "user" / "log").Native()); } else { - registry.Set(FilePathKey_DevWriteStorage, path.LexicallyNormal().Native()); - registry.Set(FilePathKey_ProjectUserPath, (path / "user").LexicallyNormal().Native()); - registry.Set(FilePathKey_ProjectLogPath, (path / "user/log").LexicallyNormal().Native()); - } -#endif // AZ_TRAIT_OS_IS_HOST_OS_PLATFORM + registry.Set(FilePathKey_DevWriteStorage, projectPath.Native()); + registry.Set(FilePathKey_ProjectUserPath, (projectPath / "user").Native()); + registry.Set(FilePathKey_ProjectLogPath, (projectPath / "user" / "log").Native()); } +#endif // AZ_TRAIT_OS_IS_HOST_OS_PLATFORM +} void MergeSettingsToRegistry_TargetBuildDependencyRegistry(SettingsRegistryInterface& registry, const AZStd::string_view platform, const SettingsRegistryInterface::Specializations& specializations, AZStd::vector* scratchBuffer) @@ -863,7 +980,7 @@ namespace AZ::SettingsRegistryMergeUtils // code in the loop makes calls that mutates the `commandLine` instance, invalidating the iterators. Making a copy // ensures that the iterators remain valid. // NOLINTNEXTLINE(performance-unnecessary-value-param) - void MergeSettingsToRegistry_CommandLine(SettingsRegistryInterface& registry, AZ::CommandLine commandLine, bool executeCommands) + void MergeSettingsToRegistry_CommandLine(SettingsRegistryInterface& registry, AZ::CommandLine commandLine, bool executeRegdumpCommands) { // Iterate over all the command line options in order to parse the --regset and --regremove // arguments in the order they were supplied @@ -878,18 +995,44 @@ namespace AZ::SettingsRegistryMergeUtils continue; } } + else if (commandArgument.m_option == "regset-file") + { + AZStd::string_view fileArg(commandArgument.m_value); + AZStd::string_view jsonAnchorPath; + // double colons is treated as the separator for an anchor path + // single colon cannot be used as it is used in Windows paths + if (auto anchorPathIndex = AZ::StringFunc::Find(fileArg, "::"); + anchorPathIndex != AZStd::string_view::npos) + { + jsonAnchorPath = fileArg.substr(anchorPathIndex + 2); + fileArg = fileArg.substr(0, anchorPathIndex); + } + if (!fileArg.empty()) + { + AZ::IO::PathView filePath(fileArg); + const auto mergeFormat = filePath.Extension() != ".setregpatch" + ? AZ::SettingsRegistryInterface::Format::JsonMergePatch + : AZ::SettingsRegistryInterface::Format::JsonPatch; + if (!registry.MergeSettingsFile(filePath.Native(), mergeFormat, jsonAnchorPath)) + { + AZ_Warning("SettingsRegistryMergeUtils", false, R"(Merging of file "%.*s" to the Settings Registry has failed at anchor "%.*s".)", + AZ_STRING_ARG(filePath.Native()), AZ_STRING_ARG(jsonAnchorPath)); + continue; + } + } + } else if (commandArgument.m_option == "regremove") { if (!registry.Remove(commandArgument.m_value)) { AZ_Warning("SettingsRegistryMergeUtils", false, "Unable to remove value at JSON Pointer %s for --regremove.", - commandArgument.m_value.data()); + commandArgument.m_value.c_str()); continue; } } } - if (executeCommands) + if (executeRegdumpCommands) { constexpr bool prettifyOutput = true; const size_t regdumpSwitchValues = commandLine.GetNumSwitchValues("regdump"); diff --git a/Code/Framework/AzCore/AzCore/Settings/SettingsRegistryMergeUtils.h b/Code/Framework/AzCore/AzCore/Settings/SettingsRegistryMergeUtils.h index daa64c0343..56eec91813 100644 --- a/Code/Framework/AzCore/AzCore/Settings/SettingsRegistryMergeUtils.h +++ b/Code/Framework/AzCore/AzCore/Settings/SettingsRegistryMergeUtils.h @@ -87,9 +87,9 @@ namespace AZ::SettingsRegistryMergeUtils AZ::IO::FixedMaxPath FindEngineRoot(SettingsRegistryInterface& settingsRegistry); //! The algorithm that is used to find the project root is as follows - //! 1. The first time this function is it performs a upward scan for a project.json file from - //! the executable directory and if found stores that path to an internal key. - //! In the same step it injects the path into the front of list of command line parameters + //! 1. The first time this function runs it performs an upward scan for a "project.json" file from + //! the executable directory and stores that path into an internal key. + //! In the same step it injects the path into the back of the command line parameters //! using the --regset="{BootstrapSettingsRootKey}/project_path=" value //! 2. Next the "{BootstrapSettingsRootKey}/project_path" is checked to see if it has a project path set //! diff --git a/Code/Framework/AzCore/AzCore/Slice/SliceAssetHandler.cpp b/Code/Framework/AzCore/AzCore/Slice/SliceAssetHandler.cpp index 551ca1258d..a942d0c9f1 100644 --- a/Code/Framework/AzCore/AzCore/Slice/SliceAssetHandler.cpp +++ b/Code/Framework/AzCore/AzCore/Slice/SliceAssetHandler.cpp @@ -13,7 +13,6 @@ #include #include #include -#include namespace AZ { diff --git a/Code/Framework/AzCore/AzCore/Slice/SliceComponent.cpp b/Code/Framework/AzCore/AzCore/Slice/SliceComponent.cpp index 0b410369f0..ca89e95162 100644 --- a/Code/Framework/AzCore/AzCore/Slice/SliceComponent.cpp +++ b/Code/Framework/AzCore/AzCore/Slice/SliceComponent.cpp @@ -840,7 +840,7 @@ namespace AZ } SliceComponent::SliceInstance* SliceComponent::SliceReference::CreateInstanceFromExistingEntities(AZStd::vector& entities, - const EntityIdToEntityIdMap assetToLiveIdMap, + const EntityIdToEntityIdMap& assetToLiveIdMap, SliceInstanceId sliceInstanceId) { AZ_PROFILE_FUNCTION(AzCore); diff --git a/Code/Framework/AzCore/AzCore/Slice/SliceComponent.h b/Code/Framework/AzCore/AzCore/Slice/SliceComponent.h index 7a66167a96..ae4ec155c7 100644 --- a/Code/Framework/AzCore/AzCore/Slice/SliceComponent.h +++ b/Code/Framework/AzCore/AzCore/Slice/SliceComponent.h @@ -443,7 +443,7 @@ namespace AZ * @return A pointer to the newly created slice instance. Returns nullptr on error or if the SliceComponent is not instantiated. */ SliceInstance* CreateInstanceFromExistingEntities(AZStd::vector& entities, - const EntityIdToEntityIdMap assetToLiveIdMap, + const EntityIdToEntityIdMap& assetToLiveIdMap, SliceInstanceId sliceInstanceId = SliceInstanceId::CreateRandom()); /** diff --git a/Code/Framework/AzCore/AzCore/Socket/AzSocket.cpp b/Code/Framework/AzCore/AzCore/Socket/AzSocket.cpp index f15c288ad8..71c0aeea6d 100644 --- a/Code/Framework/AzCore/AzCore/Socket/AzSocket.cpp +++ b/Code/Framework/AzCore/AzCore/Socket/AzSocket.cpp @@ -8,77 +8,74 @@ #include -namespace AZ +namespace AZ::AzSock { - namespace AzSock + AzSocketAddress::AzSocketAddress() { - AzSocketAddress::AzSocketAddress() - { - Reset(); - } - - AzSocketAddress& AzSocketAddress::operator=(const AZSOCKADDR& addr) - { - m_sockAddr = *reinterpret_cast(&addr); - return *this; - } - - bool AzSocketAddress::operator==(const AzSocketAddress& rhs) const - { - return m_sockAddr.sin_family == rhs.m_sockAddr.sin_family - && m_sockAddr.sin_addr.s_addr == rhs.m_sockAddr.sin_addr.s_addr - && m_sockAddr.sin_port == rhs.m_sockAddr.sin_port; - } - - const AZSOCKADDR* AzSocketAddress::GetTargetAddress() const - { - return reinterpret_cast(&m_sockAddr); - } - - AZStd::string AzSocketAddress::GetIP() const - { - char ip[INET_ADDRSTRLEN]; - inet_ntop(AF_INET, const_cast(&m_sockAddr.sin_addr), ip, AZ_ARRAY_SIZE(ip)); - return AZStd::string(ip); - } - - AZStd::string AzSocketAddress::GetAddress() const - { - char ip[INET_ADDRSTRLEN]; - inet_ntop(AF_INET, const_cast(&m_sockAddr.sin_addr), ip, AZ_ARRAY_SIZE(ip)); - return AZStd::string::format("%s:%d", ip, AZ::AzSock::NetToHostShort(m_sockAddr.sin_port)); - } - - AZ::u16 AzSocketAddress::GetAddrPort() const - { - return AZ::AzSock::NetToHostShort(m_sockAddr.sin_port); - } - - void AzSocketAddress::SetAddrPort(AZ::u16 port) - { - m_sockAddr.sin_port = AZ::AzSock::HostToNetShort(port); - } - - bool AzSocketAddress::SetAddress(const AZStd::string& ip, AZ::u16 port) - { - AZ_Assert(!ip.empty(), "Invalid address string!"); - Reset(); - return AZ::AzSock::ResolveAddress(ip, port, m_sockAddr); - } - - bool AzSocketAddress::SetAddress(AZ::u32 ip, AZ::u16 port) - { - Reset(); - m_sockAddr.sin_addr.s_addr = AZ::AzSock::HostToNetLong(ip); - m_sockAddr.sin_port = AZ::AzSock::HostToNetShort(port); - return true; - } - - void AzSocketAddress::Reset() - { - memset(&m_sockAddr, 0, sizeof(m_sockAddr)); - m_sockAddr.sin_family = AF_INET; - m_sockAddr.sin_addr.s_addr = INADDR_ANY; - } + Reset(); } -} + + AzSocketAddress& AzSocketAddress::operator=(const AZSOCKADDR& addr) + { + m_sockAddr = *reinterpret_cast(&addr); + return *this; + } + + bool AzSocketAddress::operator==(const AzSocketAddress& rhs) const + { + return m_sockAddr.sin_family == rhs.m_sockAddr.sin_family + && m_sockAddr.sin_addr.s_addr == rhs.m_sockAddr.sin_addr.s_addr + && m_sockAddr.sin_port == rhs.m_sockAddr.sin_port; + } + + const AZSOCKADDR* AzSocketAddress::GetTargetAddress() const + { + return reinterpret_cast(&m_sockAddr); + } + + AZStd::string AzSocketAddress::GetIP() const + { + char ip[INET_ADDRSTRLEN]; + inet_ntop(AF_INET, const_cast(&m_sockAddr.sin_addr), ip, AZ_ARRAY_SIZE(ip)); + return AZStd::string(ip); + } + + AZStd::string AzSocketAddress::GetAddress() const + { + char ip[INET_ADDRSTRLEN]; + inet_ntop(AF_INET, const_cast(&m_sockAddr.sin_addr), ip, AZ_ARRAY_SIZE(ip)); + return AZStd::string::format("%s:%d", ip, AZ::AzSock::NetToHostShort(m_sockAddr.sin_port)); + } + + AZ::u16 AzSocketAddress::GetAddrPort() const + { + return AZ::AzSock::NetToHostShort(m_sockAddr.sin_port); + } + + void AzSocketAddress::SetAddrPort(AZ::u16 port) + { + m_sockAddr.sin_port = AZ::AzSock::HostToNetShort(port); + } + + bool AzSocketAddress::SetAddress(const AZStd::string& ip, AZ::u16 port) + { + AZ_Assert(!ip.empty(), "Invalid address string!"); + Reset(); + return AZ::AzSock::ResolveAddress(ip, port, m_sockAddr); + } + + bool AzSocketAddress::SetAddress(AZ::u32 ip, AZ::u16 port) + { + Reset(); + m_sockAddr.sin_addr.s_addr = AZ::AzSock::HostToNetLong(ip); + m_sockAddr.sin_port = AZ::AzSock::HostToNetShort(port); + return true; + } + + void AzSocketAddress::Reset() + { + memset(&m_sockAddr, 0, sizeof(m_sockAddr)); + m_sockAddr.sin_family = AF_INET; + m_sockAddr.sin_addr.s_addr = INADDR_ANY; + } +} // namespace AZ::AzSock diff --git a/Code/Framework/AzCore/AzCore/Statistics/RunningStatistic.cpp b/Code/Framework/AzCore/AzCore/Statistics/RunningStatistic.cpp index 47f85c8309..3093d38a10 100644 --- a/Code/Framework/AzCore/AzCore/Statistics/RunningStatistic.cpp +++ b/Code/Framework/AzCore/AzCore/Statistics/RunningStatistic.cpp @@ -10,66 +10,63 @@ #include "RunningStatistic.h" -namespace AZ +namespace AZ::Statistics { - namespace Statistics + void RunningStatistic::Reset() { - void RunningStatistic::Reset() + m_numSamples = 0; + m_mostRecentSample = 0.0; + m_minimum = 0.0; + m_maximum = 0.0; + m_sum = 0.0; + m_average = 0.0; + m_varianceTracking = 0.0; + } + + void RunningStatistic::PushSample(double value) + { + m_numSamples++; + m_mostRecentSample = value; + m_sum += value; + + if (m_numSamples == 1) { - m_numSamples = 0; - m_mostRecentSample = 0.0; - m_minimum = 0.0; - m_maximum = 0.0; - m_sum = 0.0; - m_average = 0.0; - m_varianceTracking = 0.0; + m_minimum = value; + m_maximum = value; + m_average = value; + return; } - void RunningStatistic::PushSample(double value) + if (value < m_minimum) { - m_numSamples++; - m_mostRecentSample = value; - m_sum += value; - - if (m_numSamples == 1) - { - m_minimum = value; - m_maximum = value; - m_average = value; - return; - } - - if (value < m_minimum) - { - m_minimum = value; - } - else if (value > m_maximum) - { - m_maximum = value; - } - - //See header notes and references to understand this way of calculating - //running average & variance. - const double newAverage = m_average + (value - m_average) / m_numSamples; - m_varianceTracking = m_varianceTracking + (value - m_average)*(value - newAverage); - - m_average = newAverage; + m_minimum = value; + } + else if (value > m_maximum) + { + m_maximum = value; } - double RunningStatistic::GetVariance(VarianceType varianceType) const - { - if (m_numSamples > 1) - { - const AZ::u64 varianceDivisor = (varianceType == VarianceType::S) ? m_numSamples - 1 : m_numSamples; - return m_varianceTracking / varianceDivisor; - } - return 0.0; - } + //See header notes and references to understand this way of calculating + //running average & variance. + const double newAverage = m_average + (value - m_average) / m_numSamples; + m_varianceTracking = m_varianceTracking + (value - m_average)*(value - newAverage); - double RunningStatistic::GetStdev(VarianceType varianceType) const + m_average = newAverage; + } + + double RunningStatistic::GetVariance(VarianceType varianceType) const + { + if (m_numSamples > 1) { - return sqrt(GetVariance(varianceType)); + const AZ::u64 varianceDivisor = (varianceType == VarianceType::S) ? m_numSamples - 1 : m_numSamples; + return m_varianceTracking / varianceDivisor; } - - }//namespace Statistics -}//namespace AZ + return 0.0; + } + + double RunningStatistic::GetStdev(VarianceType varianceType) const + { + return sqrt(GetVariance(varianceType)); + } + +} // namespace AZ::Statistics diff --git a/Code/Framework/AzCore/AzCore/Statistics/StatisticalProfilerProxy.h b/Code/Framework/AzCore/AzCore/Statistics/StatisticalProfilerProxy.h index 278b2ecc98..7fae0ca354 100644 --- a/Code/Framework/AzCore/AzCore/Statistics/StatisticalProfilerProxy.h +++ b/Code/Framework/AzCore/AzCore/Statistics/StatisticalProfilerProxy.h @@ -157,6 +157,22 @@ namespace AZ::Statistics } } + void GetAllStatistics(AZStd::vector& stats) + { + for (auto& iter : m_profilers) + { + iter.second.m_profiler.GetStatsManager().GetAllStatistics(stats); + } + } + + void GetAllStatisticsOfUnits(AZStd::vector& stats, const char* units) + { + for (auto& iter : m_profilers) + { + iter.second.m_profiler.GetStatsManager().GetAllStatisticsOfUnits(stats, units); + } + } + private: struct ProfilerInfo { diff --git a/Code/Framework/AzCore/AzCore/Statistics/StatisticalProfilerProxySystemComponent.cpp b/Code/Framework/AzCore/AzCore/Statistics/StatisticalProfilerProxySystemComponent.cpp index 00bb97b745..ef87307624 100644 --- a/Code/Framework/AzCore/AzCore/Statistics/StatisticalProfilerProxySystemComponent.cpp +++ b/Code/Framework/AzCore/AzCore/Statistics/StatisticalProfilerProxySystemComponent.cpp @@ -12,55 +12,52 @@ #include "StatisticalProfilerProxySystemComponent.h" //////////////////////////////////////////////////////////////////////////////////////////////////// -namespace AZ +namespace AZ::Statistics { - namespace Statistics + StatisticalProfilerProxy* StatisticalProfilerProxy::TimedScope::m_profilerProxy = nullptr; + + //////////////////////////////////////////////////////////////////////////////////////////////// + void StatisticalProfilerProxySystemComponent::Reflect(AZ::ReflectContext* context) { - StatisticalProfilerProxy* StatisticalProfilerProxy::TimedScope::m_profilerProxy = nullptr; - - //////////////////////////////////////////////////////////////////////////////////////////////// - void StatisticalProfilerProxySystemComponent::Reflect(AZ::ReflectContext* context) + if (AZ::SerializeContext* serializeContext = azrtti_cast(context)) { - if (AZ::SerializeContext* serializeContext = azrtti_cast(context)) - { - serializeContext->Class() - ->Version(1); - } + serializeContext->Class() + ->Version(1); } + } - //////////////////////////////////////////////////////////////////////////////////////////////// - void StatisticalProfilerProxySystemComponent::GetProvidedServices(AZ::ComponentDescriptor::DependencyArrayType& provided) - { - provided.push_back(AZ_CRC("StatisticalProfilerService", 0x20066f73)); - } + //////////////////////////////////////////////////////////////////////////////////////////////// + void StatisticalProfilerProxySystemComponent::GetProvidedServices(AZ::ComponentDescriptor::DependencyArrayType& provided) + { + provided.push_back(AZ_CRC("StatisticalProfilerService", 0x20066f73)); + } - //////////////////////////////////////////////////////////////////////////////////////////////// - void StatisticalProfilerProxySystemComponent::GetIncompatibleServices(AZ::ComponentDescriptor::DependencyArrayType& incompatible) - { - incompatible.push_back(AZ_CRC("StatisticalProfilerService", 0x20066f73)); - } + //////////////////////////////////////////////////////////////////////////////////////////////// + void StatisticalProfilerProxySystemComponent::GetIncompatibleServices(AZ::ComponentDescriptor::DependencyArrayType& incompatible) + { + incompatible.push_back(AZ_CRC("StatisticalProfilerService", 0x20066f73)); + } - //////////////////////////////////////////////////////////////////////////////////////////////// - StatisticalProfilerProxySystemComponent::StatisticalProfilerProxySystemComponent() - : m_StatisticalProfilerProxy(nullptr) - { - } + //////////////////////////////////////////////////////////////////////////////////////////////// + StatisticalProfilerProxySystemComponent::StatisticalProfilerProxySystemComponent() + : m_StatisticalProfilerProxy(nullptr) + { + } - //////////////////////////////////////////////////////////////////////////////////////////////// - StatisticalProfilerProxySystemComponent::~StatisticalProfilerProxySystemComponent() - { - } + //////////////////////////////////////////////////////////////////////////////////////////////// + StatisticalProfilerProxySystemComponent::~StatisticalProfilerProxySystemComponent() + { + } - //////////////////////////////////////////////////////////////////////////////////////////////// - void StatisticalProfilerProxySystemComponent::Activate() - { - m_StatisticalProfilerProxy = new StatisticalProfilerProxy; - } + //////////////////////////////////////////////////////////////////////////////////////////////// + void StatisticalProfilerProxySystemComponent::Activate() + { + m_StatisticalProfilerProxy = new StatisticalProfilerProxy; + } - //////////////////////////////////////////////////////////////////////////////////////////////// - void StatisticalProfilerProxySystemComponent::Deactivate() - { - delete m_StatisticalProfilerProxy; - } - } //namespace Statistics -} // namespace AZ + //////////////////////////////////////////////////////////////////////////////////////////////// + void StatisticalProfilerProxySystemComponent::Deactivate() + { + delete m_StatisticalProfilerProxy; + } +} // namespace AZ::Statistics diff --git a/Code/Framework/AzCore/AzCore/Statistics/StatisticsManager.h b/Code/Framework/AzCore/AzCore/Statistics/StatisticsManager.h index 5984701f4e..dc97de40c1 100644 --- a/Code/Framework/AzCore/AzCore/Statistics/StatisticsManager.h +++ b/Code/Framework/AzCore/AzCore/Statistics/StatisticsManager.h @@ -56,13 +56,25 @@ namespace AZ void GetAllStatistics(AZStd::vector& vector) { - for (auto const& it : m_statistics) + for (const auto& it : m_statistics) { NamedRunningStatistic* stat = it.second; vector.push_back(stat); } } + void GetAllStatisticsOfUnits(AZStd::vector& vector, const char* units) + { + for (const auto& it : m_statistics) + { + NamedRunningStatistic* stat = it.second; + if (stat->GetUnits() == units) + { + vector.push_back(stat); + } + } + } + //! Helper method to apply units to statistics with empty units string. AZ::u32 ApplyUnits(const AZStd::string& units) { diff --git a/Code/Framework/AzCore/AzCore/StringFunc/StringFunc.cpp b/Code/Framework/AzCore/AzCore/StringFunc/StringFunc.cpp index ff30291a70..8405424f7d 100644 --- a/Code/Framework/AzCore/AzCore/StringFunc/StringFunc.cpp +++ b/Code/Framework/AzCore/AzCore/StringFunc/StringFunc.cpp @@ -416,2147 +416,2155 @@ namespace AZ::StringFunc::Internal } -namespace AZ +namespace AZ::StringFunc { - namespace StringFunc + AZStd::string_view LStrip(AZStd::string_view in, AZStd::string_view stripCharacters) { - AZStd::string_view LStrip(AZStd::string_view in, AZStd::string_view stripCharacters) + if (size_t pos = in.find_first_not_of(stripCharacters); pos != AZStd::string_view::npos) { - if (size_t pos = in.find_first_not_of(stripCharacters); pos != AZStd::string_view::npos) - { - return in.substr(pos); - } + return in.substr(pos); + } - return {}; - }; + return {}; + }; - AZStd::string_view RStrip(AZStd::string_view in, AZStd::string_view stripCharacters) + AZStd::string_view RStrip(AZStd::string_view in, AZStd::string_view stripCharacters) + { + if (size_t pos = in.find_last_not_of(stripCharacters); pos != AZStd::string_view::npos) { - if (size_t pos = in.find_last_not_of(stripCharacters); pos != AZStd::string_view::npos) - { - return in.substr(0, pos < in.size() ? pos + 1 : pos); - } + return in.substr(0, pos < in.size() ? pos + 1 : pos); + } - return {}; - }; + return {}; + }; - AZStd::string_view StripEnds(AZStd::string_view in, AZStd::string_view stripCharacters) + AZStd::string_view StripEnds(AZStd::string_view in, AZStd::string_view stripCharacters) + { + return LStrip(RStrip(in, stripCharacters), stripCharacters); + }; + + bool Equal(const char* inA, const char* inB, bool bCaseSensitive /*= false*/, size_t n /*= 0*/) + { + if (!inA || !inB) { - return LStrip(RStrip(in, stripCharacters), stripCharacters); - }; + return false; + } - bool Equal(const char* inA, const char* inB, bool bCaseSensitive /*= false*/, size_t n /*= 0*/) + if (inA == inB) { - if (!inA || !inB) - { - return false; - } + return true; + } - if (inA == inB) + if (bCaseSensitive) + { + if (n) { - return true; - } - - if (bCaseSensitive) - { - if (n) - { - return !strncmp(inA, inB, n); - } - else - { - return !strcmp(inA, inB); - } + return !strncmp(inA, inB, n); } else { - if (n) - { - return !azstrnicmp(inA, inB, n); - } - else - { - return !azstricmp(inA, inB); - } + return !strcmp(inA, inB); } } - bool Equal(AZStd::string_view inA, AZStd::string_view inB, bool bCaseSensitive) + else { - const size_t maxCharsToCompare = inA.size(); - - return inA.size() == inB.size() && (bCaseSensitive - ? strncmp(inA.data(), inB.data(), maxCharsToCompare) == 0 - : azstrnicmp(inA.data(), inB.data(), maxCharsToCompare) == 0); - } - - bool StartsWith(AZStd::string_view sourceValue, AZStd::string_view prefixValue, bool bCaseSensitive) - { - return sourceValue.size() >= prefixValue.size() - && Equal(sourceValue.data(), prefixValue.data(), bCaseSensitive, prefixValue.size()); - } - - bool EndsWith(AZStd::string_view sourceValue, AZStd::string_view suffixValue, bool bCaseSensitive) - { - return sourceValue.size() >= suffixValue.size() - && Equal(sourceValue.substr(sourceValue.size() - suffixValue.size(), AZStd::string_view::npos).data(), suffixValue.data(), bCaseSensitive, suffixValue.size()); - } - - bool Contains(AZStd::string_view in, char ch, bool bCaseSensitive) - { - return Find(in, ch, 0, false, bCaseSensitive) != AZStd::string_view::npos; - } - bool Contains(AZStd::string_view in, AZStd::string_view sv, bool bCaseSensitive) - { - return Find(in, sv, 0, false, bCaseSensitive) != AZStd::string_view::npos; - } - - size_t Find(AZStd::string_view in, char c, size_t pos /*= 0*/, bool bReverse /*= false*/, bool bCaseSensitive /*= false*/) - { - if (in.empty()) + if (n) { - return AZStd::string::npos; + return !azstrnicmp(inA, inB, n); } - - if (pos == AZStd::string::npos) + else { - pos = 0; + return !azstricmp(inA, inB); } + } + } + bool Equal(AZStd::string_view inA, AZStd::string_view inB, bool bCaseSensitive) + { + const size_t maxCharsToCompare = inA.size(); - size_t inLen = in.size(); - if (inLen < pos) - { - return AZStd::string::npos; - } + return inA.size() == inB.size() && (bCaseSensitive + ? strncmp(inA.data(), inB.data(), maxCharsToCompare) == 0 + : azstrnicmp(inA.data(), inB.data(), maxCharsToCompare) == 0); + } + bool StartsWith(AZStd::string_view sourceValue, AZStd::string_view prefixValue, bool bCaseSensitive) + { + return sourceValue.size() >= prefixValue.size() + && Equal(sourceValue.data(), prefixValue.data(), bCaseSensitive, prefixValue.size()); + } + + bool EndsWith(AZStd::string_view sourceValue, AZStd::string_view suffixValue, bool bCaseSensitive) + { + return sourceValue.size() >= suffixValue.size() + && Equal(sourceValue.substr(sourceValue.size() - suffixValue.size(), AZStd::string_view::npos).data(), suffixValue.data(), bCaseSensitive, suffixValue.size()); + } + + bool Contains(AZStd::string_view in, char ch, bool bCaseSensitive) + { + return Find(in, ch, 0, false, bCaseSensitive) != AZStd::string_view::npos; + } + bool Contains(AZStd::string_view in, AZStd::string_view sv, bool bCaseSensitive) + { + return Find(in, sv, 0, false, bCaseSensitive) != AZStd::string_view::npos; + } + + size_t Find(AZStd::string_view in, char c, size_t pos /*= 0*/, bool bReverse /*= false*/, bool bCaseSensitive /*= false*/) + { + if (in.empty()) + { + return AZStd::string::npos; + } + + if (pos == AZStd::string::npos) + { + pos = 0; + } + + size_t inLen = in.size(); + if (inLen < pos) + { + return AZStd::string::npos; + } + + if (!bCaseSensitive) + { + c = (char)tolower(c); + } + + if (bReverse) + { + pos = inLen - pos - 1; + } + + char character; + + do + { if (!bCaseSensitive) { - c = (char)tolower(c); + character = (char)tolower(in[pos]); + } + else + { + character = in[pos]; + } + + if (character == c) + { + return pos; } if (bReverse) { - pos = inLen - pos - 1; + pos = pos > 0 ? pos-1 : pos; } - - char character; - - do + else { - if (!bCaseSensitive) - { - character = (char)tolower(in[pos]); - } - else - { - character = in[pos]; - } + pos++; + } + } while (bReverse ? pos : character != '\0'); - if (character == c) - { - return pos; - } + return AZStd::string::npos; + } - if (bReverse) - { - pos = pos > 0 ? pos-1 : pos; - } - else - { - pos++; - } - } while (bReverse ? pos : character != '\0'); + size_t Find(AZStd::string_view in, AZStd::string_view s, size_t offset /*= 0*/, bool bReverse /*= false*/, bool bCaseSensitive /*= false*/) + { + // Formally an empty string matches at the offset if it is <= to the size of the input string + if (s.empty() && offset <= in.size()) + { + return offset; + } + if (in.empty()) + { return AZStd::string::npos; } - size_t Find(AZStd::string_view in, AZStd::string_view s, size_t offset /*= 0*/, bool bReverse /*= false*/, bool bCaseSensitive /*= false*/) + const size_t inlen = in.size(); + const size_t slen = s.size(); + + if (offset == AZStd::string::npos) { - // Formally an empty string matches at the offset if it is <= to the size of the input string - if (s.empty() && offset <= in.size()) + offset = 0; + } + + if (offset + slen > inlen) + { + return AZStd::string::npos; + } + + const char* pCur; + + if (bReverse) + { + // Start at the end (- pos) + pCur = in.data() + inlen - slen - offset; + } + else + { + // Start at the beginning (+ pos) + pCur = in.data() + offset; + } + + do + { + if (bCaseSensitive) { - return offset; + if (!strncmp(pCur, s.data(), slen)) + { + return static_cast(pCur - in.data()); + } } - - if (in.empty()) + else { - return AZStd::string::npos; + if (!azstrnicmp(pCur, s.data(), slen)) + { + return static_cast(pCur - in.data()); + } } - const size_t inlen = in.size(); - const size_t slen = s.size(); - - if (offset == AZStd::string::npos) - { - offset = 0; - } - - if (offset + slen > inlen) - { - return AZStd::string::npos; - } - - const char* pCur; - if (bReverse) { - // Start at the end (- pos) - pCur = in.data() + inlen - slen - offset; + pCur--; } else { - // Start at the beginning (+ pos) - pCur = in.data() + offset; + pCur++; + } + } while (bReverse ? pCur >= in.data() : pCur - in.data() <= static_cast(inlen)); + + return AZStd::string::npos; + } + + char FirstCharacter(const char* in) + { + if (!in) + { + return '\0'; + } + if (in[0] == '\n') + { + return '\0'; + } + return in[0]; + } + + char LastCharacter(const char* in) + { + if (!in) + { + return '\0'; + } + size_t len = strlen(in); + if (!len) + { + return '\0'; + } + return in[len - 1]; + } + + AZStd::string& Append(AZStd::string& inout, const char s) + { + return inout.append(1, s); + } + + AZStd::string& Append(AZStd::string& inout, const char* str) + { + if (!str) + { + return inout; + } + return inout.append(str); + } + + AZStd::string& Prepend(AZStd::string& inout, const char s) + { + return inout.insert((size_t)0, 1, s); + } + + AZStd::string& Prepend(AZStd::string& inout, const char* str) + { + if (!str) + { + return inout; + } + return inout.insert(0, str); + } + + AZStd::string& LChop(AZStd::string& inout, size_t num) + { + return Internal::LChop(inout, num); + } + + AZStd::string_view LChop(AZStd::string_view in, size_t num) + { + return Internal::LChop(in, num); + } + + AZStd::string& RChop(AZStd::string& inout, size_t num) + { + return Internal::RChop(inout, num); + } + + AZStd::string_view RChop(AZStd::string_view in, size_t num) + { + return Internal::RChop(in, num); + } + + AZStd::string& LKeep(AZStd::string& inout, size_t pos, bool bKeepPosCharacter) + { + return Internal::LKeep(inout, pos, bKeepPosCharacter); + } + + AZStd::string& RKeep(AZStd::string& inout, size_t pos, bool bKeepPosCharacter) + { + return Internal::RKeep(inout, pos, bKeepPosCharacter); + } + + bool Replace(AZStd::string& inout, const char replaceA, const char withB, bool bCaseSensitive, bool bReplaceFirst, bool bReplaceLast) + { + return Internal::Replace(inout, replaceA, withB, bCaseSensitive, bReplaceFirst, bReplaceLast); + } + + bool Replace(AZStd::string& inout, const char* replaceA, const char* withB, bool bCaseSensitive, bool bReplaceFirst, bool bReplaceLast) + { + return Internal::Replace(inout, replaceA, withB, bCaseSensitive, bReplaceFirst, bReplaceLast); + } + + bool Strip(AZStd::string& inout, const char stripCharacter, bool bCaseSensitive, bool bStripBeginning, bool bStripEnding) + { + return Internal::Strip(inout, stripCharacter, bCaseSensitive, bStripBeginning, bStripEnding); + } + + bool Strip(AZStd::string& inout, const char* stripCharacters, bool bCaseSensitive, bool bStripBeginning, bool bStripEnding) + { + return Internal::Strip(inout, stripCharacters, bCaseSensitive, bStripBeginning, bStripEnding); + } + + AZStd::string& TrimWhiteSpace(AZStd::string& value, bool leading, bool trailing) + { + static const char* trimmable = " \t\r\n"; + if (value.length() > 0) + { + if (leading) + { + value.erase(0, value.find_first_not_of(trimmable)); + } + if (trailing) + { + value.erase(value.find_last_not_of(trimmable) + 1); + } + } + return value; + } + + void Tokenize(AZStd::string_view in, AZStd::vector& tokens, const char delimiter, bool keepEmptyStrings, bool keepSpaceStrings) + { + return Tokenize(in, tokens, { &delimiter, 1 }, keepEmptyStrings, keepSpaceStrings); + } + + void Tokenize(AZStd::string_view in, AZStd::vector& tokens, AZStd::string_view delimiters, bool keepEmptyStrings, bool keepSpaceStrings) + { + auto insertVisitor = [&tokens](AZStd::string_view token) + { + tokens.push_back(token); + }; + return TokenizeVisitor(in, insertVisitor, delimiters, keepEmptyStrings, keepSpaceStrings); + } + + void TokenizeVisitor(AZStd::string_view in, const TokenVisitor& tokenVisitor, const char delimiter, bool keepEmptyStrings, bool keepSpaceStrings) + { + return TokenizeVisitor(in, tokenVisitor, { &delimiter, 1 }, keepEmptyStrings, keepSpaceStrings); + } + + void TokenizeVisitor(AZStd::string_view in, const TokenVisitor& tokenVisitor, AZStd::string_view delimiters, + bool keepEmptyStrings, bool keepSpaceStrings) + { + if (delimiters.empty() || in.empty()) + { + return; + } + + while (AZStd::optional nextToken = TokenizeNext(in, delimiters)) + { + bool bIsEmpty = nextToken->empty(); + bool bIsSpaces = false; + if (!bIsEmpty) + { + AZStd::string_view strippedNextToken = StripEnds(*nextToken, " "); + bIsSpaces = strippedNextToken.empty(); } - do + if ((bIsEmpty && keepEmptyStrings) || + (bIsSpaces && keepSpaceStrings) || + (!bIsSpaces && !bIsEmpty)) { - if (bCaseSensitive) + tokenVisitor(*nextToken); + } + } + } + + void TokenizeVisitorReverse(AZStd::string_view in, const TokenVisitor& tokenVisitor, const char delimiter, bool keepEmptyStrings, bool keepSpaceStrings) + { + return TokenizeVisitorReverse(in, tokenVisitor, { &delimiter, 1 }, keepEmptyStrings, keepSpaceStrings); + } + + void TokenizeVisitorReverse(AZStd::string_view in, const TokenVisitor& tokenVisitor, AZStd::string_view delimiters, + bool keepEmptyStrings, bool keepSpaceStrings) + { + if (delimiters.empty() || in.empty()) + { + return; + } + + while (AZStd::optional nextToken = TokenizeLast(in, delimiters)) + { + bool bIsEmpty = nextToken->empty(); + bool bIsSpaces = false; + if (!bIsEmpty) + { + AZStd::string_view strippedNextToken = StripEnds(*nextToken, " "); + bIsSpaces = strippedNextToken.empty(); + } + + if ((bIsEmpty && keepEmptyStrings) || + (bIsSpaces && keepSpaceStrings) || + (!bIsSpaces && !bIsEmpty)) + { + tokenVisitor(*nextToken); + } + } + } + + AZStd::optional TokenizeNext(AZStd::string_view& inout, const char delimiter) + { + return TokenizeNext(inout, { &delimiter, 1 }); + } + AZStd::optional TokenizeNext(AZStd::string_view& inout, AZStd::string_view delimiters) + { + if (delimiters.empty() || inout.empty()) + { + return AZStd::nullopt; + } + + AZStd::string_view resultToken; + if (size_t pos = inout.find_first_of(delimiters); pos == AZStd::string_view::npos) + { + // The delimiter has not been found, a new view containing the entire + // string will be returned and the input parameter will be set to empty + resultToken.swap(inout); + } + else + { + resultToken = { inout.data(), pos }; + // Strip off all previous characters before the delimiter plus + // the delimiter itself from the input view + inout.remove_prefix(pos + 1); + } + + return resultToken; + } + + AZStd::optional TokenizeLast(AZStd::string_view& inout, const char delimiter) + { + return TokenizeLast(inout, { &delimiter, 1 }); + } + AZStd::optional TokenizeLast(AZStd::string_view& inout, AZStd::string_view delimiters) + { + if (delimiters.empty() || inout.empty()) + { + return AZStd::nullopt; + } + + AZStd::string_view resultToken; + if (size_t pos = inout.find_last_of(delimiters); pos == AZStd::string_view::npos) + { + // The delimiter has not been found, a new view containing the entire + // string will be returned and the input parameter will be set to empty + resultToken.swap(inout); + } + else + { + resultToken = inout.substr(pos + 1); + // Strip off all previous characters before the delimiter plus + // the delimiter itself from the input view + inout = inout.substr(0, pos); + } + + return resultToken; + } + + bool FindFirstOf(AZStd::string_view inString, size_t offset, const AZStd::vector& searchStrings, uint32_t& outIndex, size_t& outOffset) + { + bool found = false; + + outIndex = 0; + outOffset = AZStd::string::npos; + for (int32_t i = 0; i < searchStrings.size(); ++i) + { + const AZStd::string& search = searchStrings[i]; + + size_t entry = inString.find(search, offset); + if (entry != AZStd::string::npos) + { + if (!found || (entry < outOffset)) { - if (!strncmp(pCur, s.data(), slen)) - { - return static_cast(pCur - in.data()); - } - } - else - { - if (!azstrnicmp(pCur, s.data(), slen)) - { - return static_cast(pCur - in.data()); - } - } - - if (bReverse) - { - pCur--; - } - else - { - pCur++; - } - } while (bReverse ? pCur >= in.data() : pCur - in.data() <= static_cast(inlen)); - - return AZStd::string::npos; - } - - char FirstCharacter(const char* in) - { - if (!in) - { - return '\0'; - } - if (in[0] == '\n') - { - return '\0'; - } - return in[0]; - } - - char LastCharacter(const char* in) - { - if (!in) - { - return '\0'; - } - size_t len = strlen(in); - if (!len) - { - return '\0'; - } - return in[len - 1]; - } - - AZStd::string& Append(AZStd::string& inout, const char s) - { - return inout.append(1, s); - } - - AZStd::string& Append(AZStd::string& inout, const char* str) - { - if (!str) - { - return inout; - } - return inout.append(str); - } - - AZStd::string& Prepend(AZStd::string& inout, const char s) - { - return inout.insert((size_t)0, 1, s); - } - - AZStd::string& Prepend(AZStd::string& inout, const char* str) - { - if (!str) - { - return inout; - } - return inout.insert(0, str); - } - - AZStd::string& LChop(AZStd::string& inout, size_t num) - { - return Internal::LChop(inout, num); - } - - AZStd::string_view LChop(AZStd::string_view in, size_t num) - { - return Internal::LChop(in, num); - } - - AZStd::string& RChop(AZStd::string& inout, size_t num) - { - return Internal::RChop(inout, num); - } - - AZStd::string_view RChop(AZStd::string_view in, size_t num) - { - return Internal::RChop(in, num); - } - - AZStd::string& LKeep(AZStd::string& inout, size_t pos, bool bKeepPosCharacter) - { - return Internal::LKeep(inout, pos, bKeepPosCharacter); - } - - AZStd::string& RKeep(AZStd::string& inout, size_t pos, bool bKeepPosCharacter) - { - return Internal::RKeep(inout, pos, bKeepPosCharacter); - } - - bool Replace(AZStd::string& inout, const char replaceA, const char withB, bool bCaseSensitive, bool bReplaceFirst, bool bReplaceLast) - { - return Internal::Replace(inout, replaceA, withB, bCaseSensitive, bReplaceFirst, bReplaceLast); - } - - bool Replace(AZStd::string& inout, const char* replaceA, const char* withB, bool bCaseSensitive, bool bReplaceFirst, bool bReplaceLast) - { - return Internal::Replace(inout, replaceA, withB, bCaseSensitive, bReplaceFirst, bReplaceLast); - } - - bool Strip(AZStd::string& inout, const char stripCharacter, bool bCaseSensitive, bool bStripBeginning, bool bStripEnding) - { - return Internal::Strip(inout, stripCharacter, bCaseSensitive, bStripBeginning, bStripEnding); - } - - bool Strip(AZStd::string& inout, const char* stripCharacters, bool bCaseSensitive, bool bStripBeginning, bool bStripEnding) - { - return Internal::Strip(inout, stripCharacters, bCaseSensitive, bStripBeginning, bStripEnding); - } - - AZStd::string& TrimWhiteSpace(AZStd::string& value, bool leading, bool trailing) - { - static const char* trimmable = " \t\r\n"; - if (value.length() > 0) - { - if (leading) - { - value.erase(0, value.find_first_not_of(trimmable)); - } - if (trailing) - { - value.erase(value.find_last_not_of(trimmable) + 1); - } - } - return value; - } - - void Tokenize(AZStd::string_view in, AZStd::vector& tokens, const char delimiter, bool keepEmptyStrings, bool keepSpaceStrings) - { - return Tokenize(in, tokens, { &delimiter, 1 }, keepEmptyStrings, keepSpaceStrings); - } - - void Tokenize(AZStd::string_view in, AZStd::vector& tokens, AZStd::string_view delimiters, bool keepEmptyStrings, bool keepSpaceStrings) - { - auto insertVisitor = [&tokens](AZStd::string_view token) - { - tokens.push_back(token); - }; - return TokenizeVisitor(in, insertVisitor, delimiters, keepEmptyStrings, keepSpaceStrings); - } - - void TokenizeVisitor(AZStd::string_view in, const TokenVisitor& tokenVisitor, const char delimiter, bool keepEmptyStrings, bool keepSpaceStrings) - { - return TokenizeVisitor(in, tokenVisitor, { &delimiter, 1 }, keepEmptyStrings, keepSpaceStrings); - } - - void TokenizeVisitor(AZStd::string_view in, const TokenVisitor& tokenVisitor, AZStd::string_view delimiters, - bool keepEmptyStrings, bool keepSpaceStrings) - { - if (delimiters.empty() || in.empty()) - { - return; - } - - while (AZStd::optional nextToken = TokenizeNext(in, delimiters)) - { - bool bIsEmpty = nextToken->empty(); - bool bIsSpaces = false; - if (!bIsEmpty) - { - AZStd::string_view strippedNextToken = StripEnds(*nextToken, " "); - bIsSpaces = strippedNextToken.empty(); - } - - if ((bIsEmpty && keepEmptyStrings) || - (bIsSpaces && keepSpaceStrings) || - (!bIsSpaces && !bIsEmpty)) - { - tokenVisitor(*nextToken); + found = true; + outIndex = i; + outOffset = entry; } } } - void TokenizeVisitorReverse(AZStd::string_view in, const TokenVisitor& tokenVisitor, const char delimiter, bool keepEmptyStrings, bool keepSpaceStrings) + return found; + } + + void Tokenize(AZStd::string_view input, AZStd::vector& tokens, const AZStd::vector& delimiters, bool keepEmptyStrings /*= false*/, bool keepSpaceStrings /*= false*/) + { + if (input.empty()) { - return TokenizeVisitorReverse(in, tokenVisitor, { &delimiter, 1 }, keepEmptyStrings, keepSpaceStrings); + return; } - void TokenizeVisitorReverse(AZStd::string_view in, const TokenVisitor& tokenVisitor, AZStd::string_view delimiters, - bool keepEmptyStrings, bool keepSpaceStrings) + size_t offset = 0; + for (;;) { - if (delimiters.empty() || in.empty()) + uint32_t nextMatch = 0; + size_t nextOffset = offset; + if (!FindFirstOf(input, offset, delimiters, nextMatch, nextOffset)) { - return; + // No more occurrences of a separator, consume whatever is left and exit + tokens.push_back(input.substr(offset)); + break; } - while (AZStd::optional nextToken = TokenizeLast(in, delimiters)) + // Take the substring, not including the separator, and increment our offset + AZStd::string nextSubstring = input.substr(offset, nextOffset - offset); + if (keepEmptyStrings || keepSpaceStrings || !nextSubstring.empty()) { - bool bIsEmpty = nextToken->empty(); - bool bIsSpaces = false; - if (!bIsEmpty) - { - AZStd::string_view strippedNextToken = StripEnds(*nextToken, " "); - bIsSpaces = strippedNextToken.empty(); - } - - if ((bIsEmpty && keepEmptyStrings) || - (bIsSpaces && keepSpaceStrings) || - (!bIsSpaces && !bIsEmpty)) - { - tokenVisitor(*nextToken); - } + tokens.push_back(nextSubstring); } + + offset = nextOffset + delimiters[nextMatch].size(); } + } - AZStd::optional TokenizeNext(AZStd::string_view& inout, const char delimiter) + int ToInt(const char* in) + { + if (!in) { - return TokenizeNext(inout, { &delimiter, 1 }); + return 0; } - AZStd::optional TokenizeNext(AZStd::string_view& inout, AZStd::string_view delimiters) + return atoi(in); + } + + bool LooksLikeInt(const char* in, int* pInt /*=nullptr*/) + { + if (!in) { - if (delimiters.empty() || inout.empty()) - { - return AZStd::nullopt; - } - - AZStd::string_view resultToken; - if (size_t pos = inout.find_first_of(delimiters); pos == AZStd::string_view::npos) - { - // The delimiter has not been found, a new view containing the entire - // string will be returned and the input parameter will be set to empty - resultToken.swap(inout); - } - else - { - resultToken = { inout.data(), pos }; - // Strip off all previous characters before the delimiter plus - // the delimiter itself from the input view - inout.remove_prefix(pos + 1); - } - - return resultToken; - } - - AZStd::optional TokenizeLast(AZStd::string_view& inout, const char delimiter) - { - return TokenizeLast(inout, { &delimiter, 1 }); - } - AZStd::optional TokenizeLast(AZStd::string_view& inout, AZStd::string_view delimiters) - { - if (delimiters.empty() || inout.empty()) - { - return AZStd::nullopt; - } - - AZStd::string_view resultToken; - if (size_t pos = inout.find_last_of(delimiters); pos == AZStd::string_view::npos) - { - // The delimiter has not been found, a new view containing the entire - // string will be returned and the input parameter will be set to empty - resultToken.swap(inout); - } - else - { - resultToken = inout.substr(pos + 1); - // Strip off all previous characters before the delimiter plus - // the delimiter itself from the input view - inout = inout.substr(0, pos); - } - - return resultToken; - } - - bool FindFirstOf(AZStd::string_view inString, size_t offset, const AZStd::vector& searchStrings, uint32_t& outIndex, size_t& outOffset) - { - bool found = false; - - outIndex = 0; - outOffset = AZStd::string::npos; - for (int32_t i = 0; i < searchStrings.size(); ++i) - { - const AZStd::string& search = searchStrings[i]; - - size_t entry = inString.find(search, offset); - if (entry != AZStd::string::npos) - { - if (!found || (entry < outOffset)) - { - found = true; - outIndex = i; - outOffset = entry; - } - } - } - - return found; - } - - void Tokenize(AZStd::string_view input, AZStd::vector& tokens, const AZStd::vector& delimiters, bool keepEmptyStrings /*= false*/, bool keepSpaceStrings /*= false*/) - { - if (input.empty()) - { - return; - } - - size_t offset = 0; - for (;;) - { - uint32_t nextMatch = 0; - size_t nextOffset = offset; - if (!FindFirstOf(input, offset, delimiters, nextMatch, nextOffset)) - { - // No more occurrences of a separator, consume whatever is left and exit - tokens.push_back(input.substr(offset)); - break; - } - - // Take the substring, not including the separator, and increment our offset - AZStd::string nextSubstring = input.substr(offset, nextOffset - offset); - if (keepEmptyStrings || keepSpaceStrings || !nextSubstring.empty()) - { - tokens.push_back(nextSubstring); - } - - offset = nextOffset + delimiters[nextMatch].size(); - } - } - - int ToInt(const char* in) - { - if (!in) - { - return 0; - } - return atoi(in); - } - - bool LooksLikeInt(const char* in, int* pInt /*=nullptr*/) - { - if (!in) - { - return false; - } - - //if pos is past then end of the string false - size_t len = strlen(in); - if (!len)//must at least 1 characters to work with "1" - { - return false; - } - - const char* pStr = in; - - size_t countNeg = 0; - while (*pStr != '\0' && - (isdigit(*pStr) || - *pStr == '-')) - { - if (*pStr == '-') - { - countNeg++; - } - pStr++; - } - - if (*pStr == '\0' && - countNeg < 2) - { - if (pInt) - { - *pInt = ToInt(in); - } - - return true; - } return false; } - double ToDouble(const char* in) + //if pos is past then end of the string false + size_t len = strlen(in); + if (!len)//must at least 1 characters to work with "1" { - if (!in) - { - return 0.; - } - return atof(in); - } - - bool LooksLikeDouble(const char* in, double* pDouble) - { - if (!in) - { - return false; - } - - size_t len = strlen(in); - if (len < 2)//must have at least 2 characters to work with "1." - { - return false; - } - - const char* pStr = in; - - size_t countDot = 0; - size_t countNeg = 0; - while (*pStr != '\0' && - (isdigit(*pStr) || - (*pStr == '-' || - *pStr == '.'))) - { - if (*pStr == '.') - { - countDot++; - } - if (*pStr == '-') - { - countNeg++; - } - pStr++; - } - - if (*pStr == '\0' && - countDot == 1 && - countNeg < 2) - { - if (pDouble) - { - *pDouble = ToDouble(in); - } - - return true; - } - return false; } - float ToFloat(const char* in) + const char* pStr = in; + + size_t countNeg = 0; + while (*pStr != '\0' && + (isdigit(*pStr) || + *pStr == '-')) { - if (!in) + if (*pStr == '-') { - return 0.f; + countNeg++; } - return (float)atof(in); + pStr++; } - bool LooksLikeFloat(const char* in, float* pFloat /* = nullptr */) + if (*pStr == '\0' && + countNeg < 2) { - bool result = false; - - if (pFloat) + if (pInt) { - double doubleValue = 0.0; - result = LooksLikeDouble(in, &doubleValue); - - (*pFloat) = aznumeric_cast(doubleValue); - } - else - { - result = LooksLikeDouble(in); + *pInt = ToInt(in); } - return result; + return true; } + return false; + } - bool ToBool(const char* in) + double ToDouble(const char* in) + { + if (!in) + { + return 0.; + } + return atof(in); + } + + bool LooksLikeDouble(const char* in, double* pDouble) + { + if (!in) { - bool boolValue = false; - if (LooksLikeBool(in, &boolValue)) - { - return boolValue; - } return false; } - bool LooksLikeBool(const char* in, bool* pBool /* = nullptr */) + size_t len = strlen(in); + if (len < 2)//must have at least 2 characters to work with "1." { - if (!in) - { - return false; - } - - if (!azstricmp(in, "true") || !azstricmp(in, "1")) - { - if (pBool) - { - *pBool = true; - } - return true; - } - - if (!azstricmp(in, "false") || !azstricmp(in, "0")) - { - if (pBool) - { - *pBool = false; - } - return true; - } - return false; } - template - bool LooksLikeVectorHelper(const char* in, VECTOR_TYPE* outVector) - { - AZStd::vector tokens; - Tokenize(in, tokens, ',', false, true); - if (tokens.size() == ELEMENT_COUNT) - { - float vectorValues[4] = { 0.0f, 0.0f, 0.0f, 0.0f }; + const char* pStr = in; + size_t countDot = 0; + size_t countNeg = 0; + while (*pStr != '\0' && + (isdigit(*pStr) || + (*pStr == '-' || + *pStr == '.'))) + { + if (*pStr == '.') + { + countDot++; + } + if (*pStr == '-') + { + countNeg++; + } + pStr++; + } + + if (*pStr == '\0' && + countDot == 1 && + countNeg < 2) + { + if (pDouble) + { + *pDouble = ToDouble(in); + } + + return true; + } + + return false; + } + + float ToFloat(const char* in) + { + if (!in) + { + return 0.f; + } + return (float)atof(in); + } + + bool LooksLikeFloat(const char* in, float* pFloat /* = nullptr */) + { + bool result = false; + + if (pFloat) + { + double doubleValue = 0.0; + result = LooksLikeDouble(in, &doubleValue); + + (*pFloat) = aznumeric_cast(doubleValue); + } + else + { + result = LooksLikeDouble(in); + } + + return result; + } + + bool ToBool(const char* in) + { + bool boolValue = false; + if (LooksLikeBool(in, &boolValue)) + { + return boolValue; + } + return false; + } + + bool LooksLikeBool(const char* in, bool* pBool /* = nullptr */) + { + if (!in) + { + return false; + } + + if (!azstricmp(in, "true") || !azstricmp(in, "1")) + { + if (pBool) + { + *pBool = true; + } + return true; + } + + if (!azstricmp(in, "false") || !azstricmp(in, "0")) + { + if (pBool) + { + *pBool = false; + } + return true; + } + + return false; + } + + template + bool LooksLikeVectorHelper(const char* in, VECTOR_TYPE* outVector) + { + AZStd::vector tokens; + Tokenize(in, tokens, ',', false, true); + if (tokens.size() == ELEMENT_COUNT) + { + float vectorValues[4] = { 0.0f, 0.0f, 0.0f, 0.0f }; + + for (uint32_t element = 0; element < ELEMENT_COUNT; ++element) + { + if (!LooksLikeFloat(tokens[element].c_str(), outVector ? &vectorValues[element] : nullptr)) + { + return false; + } + } + + if (outVector) + { for (uint32_t element = 0; element < ELEMENT_COUNT; ++element) { - if (!LooksLikeFloat(tokens[element].c_str(), outVector ? &vectorValues[element] : nullptr)) - { - return false; - } + outVector->SetElement(element, vectorValues[element]); } - - if (outVector) - { - for (uint32_t element = 0; element < ELEMENT_COUNT; ++element) - { - outVector->SetElement(element, vectorValues[element]); - } - } - - return true; } - return false; - } - - bool LooksLikeVector2(const char* in, AZ::Vector2* outVector) - { - return LooksLikeVectorHelper(in, outVector); - } - - AZ::Vector2 ToVector2(const char* in) - { - AZ::Vector2 vector; - LooksLikeVector2(in, &vector); - return vector; - } - - bool LooksLikeVector3(const char* in, AZ::Vector3* outVector) - { - return LooksLikeVectorHelper(in, outVector); - } - - AZ::Vector3 ToVector3(const char* in) - { - AZ::Vector3 vector; - LooksLikeVector3(in, &vector); - return vector; - } - - bool LooksLikeVector4(const char* in, AZ::Vector4* outVector) - { - return LooksLikeVectorHelper(in, outVector); - } - - AZ::Vector4 ToVector4(const char* in) - { - AZ::Vector4 vector; - LooksLikeVector4(in, &vector); - return vector; - } - - bool ToHexDump(const char* in, AZStd::string& out) - { - struct TInline - { - static void ByteToHex(char* pszHex, unsigned char bValue) - { - pszHex[0] = bValue / 16; - - if (pszHex[0] < 10) - { - pszHex[0] += '0'; - } - else - { - pszHex[0] -= 10; - pszHex[0] += 'A'; - } - - pszHex[1] = bValue % 16; - - if (pszHex[1] < 10) - { - pszHex[1] += '0'; - } - else - { - pszHex[1] -= 10; - pszHex[1] += 'A'; - } - } - }; - - size_t len = strlen(in); - if (len < 1) //must be at least 1 character to work with - { - return false; - } - - size_t nBytes = len; - - char* pszData = reinterpret_cast(azmalloc((nBytes * 2) + 1)); - - for (size_t ii = 0; ii < nBytes; ++ii) - { - TInline::ByteToHex(&pszData[ii * 2], in[ii]); - } - - pszData[nBytes * 2] = 0x00; - out = pszData; - azfree(pszData); - return true; } - bool FromHexDump(const char* in, AZStd::string& out) + return false; + } + + bool LooksLikeVector2(const char* in, AZ::Vector2* outVector) + { + return LooksLikeVectorHelper(in, outVector); + } + + AZ::Vector2 ToVector2(const char* in) + { + AZ::Vector2 vector; + LooksLikeVector2(in, &vector); + return vector; + } + + bool LooksLikeVector3(const char* in, AZ::Vector3* outVector) + { + return LooksLikeVectorHelper(in, outVector); + } + + AZ::Vector3 ToVector3(const char* in) + { + AZ::Vector3 vector; + LooksLikeVector3(in, &vector); + return vector; + } + + bool LooksLikeVector4(const char* in, AZ::Vector4* outVector) + { + return LooksLikeVectorHelper(in, outVector); + } + + AZ::Vector4 ToVector4(const char* in) + { + AZ::Vector4 vector; + LooksLikeVector4(in, &vector); + return vector; + } + + bool ToHexDump(const char* in, AZStd::string& out) + { + struct TInline { - struct TInline + static void ByteToHex(char* pszHex, unsigned char bValue) { - static unsigned char HexToByte(const char* pszHex) + pszHex[0] = bValue / 16; + + if (pszHex[0] < 10) { - unsigned char bHigh = 0; - unsigned char bLow = 0; - - if ((pszHex[0] >= '0') && (pszHex[0] <= '9')) - { - bHigh = pszHex[0] - '0'; - } - else if ((pszHex[0] >= 'A') && (pszHex[0] <= 'F')) - { - bHigh = (pszHex[0] - 'A') + 10; - } - - bHigh = bHigh << 4; - - if ((pszHex[1] >= '0') && (pszHex[1] <= '9')) - { - bLow = pszHex[1] - '0'; - } - else if ((pszHex[1] >= 'A') && (pszHex[1] <= 'F')) - { - bLow = (pszHex[1] - 'A') + 10; - } - - return bHigh | bLow; - } - }; - - size_t len = strlen(in); - if (len < 2) //must be at least 2 characters to work with - { - return false; - } - - size_t nBytes = len / 2; - char* pszData = reinterpret_cast(azmalloc(nBytes + 1)); - - for (size_t ii = 0; ii < nBytes; ++ii) - { - pszData[ii] = TInline::HexToByte(&in[ii * 2]); - } - - pszData[nBytes] = 0x00; - out = pszData; - azfree(pszData); - - return true; - } - - namespace NumberFormatting - { - int GroupDigits(char* buffer, size_t bufferSize, size_t decimalPosHint, char digitSeparator, char decimalSeparator, int groupingSize, int firstGroupingSize) - { - static const int MAX_SEPARATORS = 16; - - AZ_Assert(buffer, "Null string buffer"); - AZ_Assert(bufferSize > decimalPosHint, "Decimal position %lu cannot be located beyond bufferSize %lu", decimalPosHint, bufferSize); - AZ_Assert(groupingSize > 0, "Grouping size must be a positive integer"); - - int numberEndPos = 0; - int stringEndPos = 0; - - if (decimalPosHint > 0 && decimalPosHint < (bufferSize - 1) && buffer[decimalPosHint] == decimalSeparator) - { - // Assume the number ends at the supplied location - numberEndPos = (int)decimalPosHint; - stringEndPos = numberEndPos + (int)strnlen(buffer + numberEndPos, bufferSize - numberEndPos); + pszHex[0] += '0'; } else { - // Search for the final digit or separator while obtaining the string length - int lastDigitSeenPos = 0; - - while (stringEndPos < bufferSize) - { - char c = buffer[stringEndPos]; - - if (!c) - { - break; - } - else if (c == decimalSeparator) - { - // End the number if there's a decimal - numberEndPos = stringEndPos; - } - else if (numberEndPos <= 0 && c >= '0' && c <= '9') - { - // Otherwise keep track of where the last digit we've seen is - lastDigitSeenPos = stringEndPos; - } - - stringEndPos++; - } - - if (numberEndPos <= 0) - { - if (lastDigitSeenPos > 0) - { - // No decimal, so use the last seen digit as the end of the number - numberEndPos = lastDigitSeenPos + 1; - } - else - { - // No digits, no decimals, therefore no change in the string - return stringEndPos; - } - } + pszHex[0] -= 10; + pszHex[0] += 'A'; } - if (firstGroupingSize <= 0) + pszHex[1] = bValue % 16; + + if (pszHex[1] < 10) { - firstGroupingSize = groupingSize; + pszHex[1] += '0'; + } + else + { + pszHex[1] -= 10; + pszHex[1] += 'A'; + } + } + }; + + size_t len = strlen(in); + if (len < 1) //must be at least 1 character to work with + { + return false; + } + + size_t nBytes = len; + + char* pszData = reinterpret_cast(azmalloc((nBytes * 2) + 1)); + + for (size_t ii = 0; ii < nBytes; ++ii) + { + TInline::ByteToHex(&pszData[ii * 2], in[ii]); + } + + pszData[nBytes * 2] = 0x00; + out = pszData; + azfree(pszData); + + return true; + } + + bool FromHexDump(const char* in, AZStd::string& out) + { + struct TInline + { + static unsigned char HexToByte(const char* pszHex) + { + unsigned char bHigh = 0; + unsigned char bLow = 0; + + if ((pszHex[0] >= '0') && (pszHex[0] <= '9')) + { + bHigh = pszHex[0] - '0'; + } + else if ((pszHex[0] >= 'A') && (pszHex[0] <= 'F')) + { + bHigh = (pszHex[0] - 'A') + 10; } - // Determine where to place the separators - int groupingSizes[] = { firstGroupingSize + 1, groupingSize }; // First group gets +1 since we begin all subsequent groups at the second digit - int groupingOffsetsToNext[] = { 1, 0 }; // We will offset from the first entry to the second, then stay at the second for remaining iterations - const int* currentGroupingSize = groupingSizes; - const int* currentGroupingOffsetToNext = groupingOffsetsToNext; - AZStd::fixed_vector separatorLocations; - int groupCounter = 0; - int digitPosition = numberEndPos - 1; + bHigh = bHigh << 4; - while (digitPosition >= 0) + if ((pszHex[1] >= '0') && (pszHex[1] <= '9')) { - // Walk backwards in the string from the least significant digit to the most significant, demarcating consecutive groups of digits - char c = buffer[digitPosition]; + bLow = pszHex[1] - '0'; + } + else if ((pszHex[1] >= 'A') && (pszHex[1] <= 'F')) + { + bLow = (pszHex[1] - 'A') + 10; + } - if (c >= '0' && c <= '9') - { - if (++groupCounter == *currentGroupingSize) - { - // Demarcate a new group of digits at this location - separatorLocations.push_back(buffer + digitPosition); - currentGroupingSize += *currentGroupingOffsetToNext; - currentGroupingOffsetToNext += *currentGroupingOffsetToNext; - groupCounter = 0; - } + return bHigh | bLow; + } + }; - digitPosition--; - } - else + size_t len = strlen(in); + if (len < 2) //must be at least 2 characters to work with + { + return false; + } + + size_t nBytes = len / 2; + char* pszData = reinterpret_cast(azmalloc(nBytes + 1)); + + for (size_t ii = 0; ii < nBytes; ++ii) + { + pszData[ii] = TInline::HexToByte(&in[ii * 2]); + } + + pszData[nBytes] = 0x00; + out = pszData; + azfree(pszData); + + return true; + } + + namespace NumberFormatting + { + int GroupDigits(char* buffer, size_t bufferSize, size_t decimalPosHint, char digitSeparator, char decimalSeparator, int groupingSize, int firstGroupingSize) + { + static const int MAX_SEPARATORS = 16; + + AZ_Assert(buffer, "Null string buffer"); + AZ_Assert(bufferSize > decimalPosHint, "Decimal position %lu cannot be located beyond bufferSize %lu", decimalPosHint, bufferSize); + AZ_Assert(groupingSize > 0, "Grouping size must be a positive integer"); + + int numberEndPos = 0; + int stringEndPos = 0; + + if (decimalPosHint > 0 && decimalPosHint < (bufferSize - 1) && buffer[decimalPosHint] == decimalSeparator) + { + // Assume the number ends at the supplied location + numberEndPos = (int)decimalPosHint; + stringEndPos = numberEndPos + (int)strnlen(buffer + numberEndPos, bufferSize - numberEndPos); + } + else + { + // Search for the final digit or separator while obtaining the string length + int lastDigitSeenPos = 0; + + while (stringEndPos < bufferSize) + { + char c = buffer[stringEndPos]; + + if (!c) { break; } - } - - if (stringEndPos + separatorLocations.size() >= bufferSize) - { - // Won't fit into buffer, so return unchanged - return stringEndPos; - } - - // Insert the separators by shifting characters forward in the string, starting at the end and working backwards - const char* src = buffer + stringEndPos; - char* dest = buffer + stringEndPos + separatorLocations.size(); - auto separatorItr = separatorLocations.begin(); - - while (separatorItr != separatorLocations.end()) - { - while (src > *separatorItr) + else if (c == decimalSeparator) { - *dest-- = *src--; + // End the number if there's a decimal + numberEndPos = stringEndPos; + } + else if (numberEndPos <= 0 && c >= '0' && c <= '9') + { + // Otherwise keep track of where the last digit we've seen is + lastDigitSeenPos = stringEndPos; } - // Insert the separator and reduce the distance between our destination and source by one - *dest-- = digitSeparator; - ++separatorItr; + stringEndPos++; } - return (int)(stringEndPos + separatorLocations.size()); + if (numberEndPos <= 0) + { + if (lastDigitSeenPos > 0) + { + // No decimal, so use the last seen digit as the end of the number + numberEndPos = lastDigitSeenPos + 1; + } + else + { + // No digits, no decimals, therefore no change in the string + return stringEndPos; + } + } } - } - namespace AssetPath + if (firstGroupingSize <= 0) + { + firstGroupingSize = groupingSize; + } + + // Determine where to place the separators + int groupingSizes[] = { firstGroupingSize + 1, groupingSize }; // First group gets +1 since we begin all subsequent groups at the second digit + int groupingOffsetsToNext[] = { 1, 0 }; // We will offset from the first entry to the second, then stay at the second for remaining iterations + const int* currentGroupingSize = groupingSizes; + const int* currentGroupingOffsetToNext = groupingOffsetsToNext; + AZStd::fixed_vector separatorLocations; + int groupCounter = 0; + int digitPosition = numberEndPos - 1; + + while (digitPosition >= 0) + { + // Walk backwards in the string from the least significant digit to the most significant, demarcating consecutive groups of digits + char c = buffer[digitPosition]; + + if (c >= '0' && c <= '9') + { + if (++groupCounter == *currentGroupingSize) + { + // Demarcate a new group of digits at this location + separatorLocations.push_back(buffer + digitPosition); + currentGroupingSize += *currentGroupingOffsetToNext; + currentGroupingOffsetToNext += *currentGroupingOffsetToNext; + groupCounter = 0; + } + + digitPosition--; + } + else + { + break; + } + } + + if (stringEndPos + separatorLocations.size() >= bufferSize) + { + // Won't fit into buffer, so return unchanged + return stringEndPos; + } + + // Insert the separators by shifting characters forward in the string, starting at the end and working backwards + const char* src = buffer + stringEndPos; + char* dest = buffer + stringEndPos + separatorLocations.size(); + auto separatorItr = separatorLocations.begin(); + + while (separatorItr != separatorLocations.end()) + { + while (src > *separatorItr) + { + *dest-- = *src--; + } + + // Insert the separator and reduce the distance between our destination and source by one + *dest-- = digitSeparator; + ++separatorItr; + } + + return (int)(stringEndPos + separatorLocations.size()); + } + } + + namespace AssetPath + { + namespace Internal { - void CalculateBranchToken(const AZStd::string& appRootPath, AZStd::string& token) + AZ::u32 CalculateBranchTokenHash(AZStd::string_view engineRootPath) { // Normalize the token to prepare for CRC32 calculation - AZStd::string normalized = appRootPath; + auto NormalizeEnginePath = [](const char element) -> char + { + // Substitute path separators with '_' and lower case + return element == AZ::IO::WindowsPathSeparator || element == AZ::IO::PosixPathSeparator + ? '_' + : static_cast(std::tolower(element)); + }; - // Strip out any trailing path separators - AZ::StringFunc::Strip(normalized, AZ_CORRECT_FILESYSTEM_SEPARATOR_STRING AZ_WRONG_FILESYSTEM_SEPARATOR_STRING,false, false, true); - - // Lower case always - AZStd::to_lower(normalized.begin(), normalized.end()); - - // Substitute path separators with '_' - AZStd::replace(normalized.begin(), normalized.end(), '\\', '_'); - AZStd::replace(normalized.begin(), normalized.end(), '/', '_'); + // Trim off trailing path separators + engineRootPath = RStrip(engineRootPath, AZ_CORRECT_AND_WRONG_FILESYSTEM_SEPARATOR); + AZ::IO::FixedMaxPathString enginePath; + AZStd::transform( + engineRootPath.begin(), engineRootPath.end(), AZStd::back_inserter(enginePath), AZStd::move(NormalizeEnginePath)); // Perform the CRC32 calculation - const AZ::Crc32 branchTokenCrc(normalized.c_str(), normalized.size(), true); - char branchToken[12]; - azsnprintf(branchToken, AZ_ARRAY_SIZE(branchToken), "0x%08X", static_cast(branchTokenCrc)); - token = AZStd::string(branchToken); + constexpr bool forceLowercase = true; + return static_cast(AZ::Crc32(enginePath.c_str(), enginePath.size(), forceLowercase)); } + } // namespace Internal + void CalculateBranchToken(AZStd::string_view engineRootPath, AZStd::string& token) + { + token = AZStd::string::format("0x%08X", Internal::CalculateBranchTokenHash(engineRootPath)); + } + void CalculateBranchToken(AZStd::string_view engineRootPath, AZ::IO::FixedMaxPathString& token) + { + token = AZ::IO::FixedMaxPathString::format("0x%08X", Internal::CalculateBranchTokenHash(engineRootPath)); + } + } // namespace AssetPath + + namespace AssetDatabasePath + { + bool Normalize(AZStd::string& inout) + { + // Asset Paths uses the forward slash for the database separator + AZ::IO::Path path(AZStd::move(inout), AZ_CORRECT_DATABASE_SEPARATOR); + bool appendTrailingSlash = (path.Native().ends_with(AZ_CORRECT_DATABASE_SEPARATOR) || path.Native().ends_with(AZ_WRONG_DATABASE_SEPARATOR)) + && path.HasRelativePath(); + inout = AZStd::move(path.LexicallyNormal().Native()); + if (appendTrailingSlash) + { + inout.push_back(AZ_CORRECT_DATABASE_SEPARATOR); + } + return IsValid(inout.c_str()); } - namespace AssetDatabasePath + bool IsValid(const char* in) { - bool Normalize(AZStd::string& inout) + if (!in) { - // Asset Paths uses the forward slash for the database separator - AZ::IO::Path path(AZStd::move(inout), AZ_CORRECT_DATABASE_SEPARATOR); - bool appendTrailingSlash = (path.Native().ends_with(AZ_CORRECT_DATABASE_SEPARATOR) || path.Native().ends_with(AZ_WRONG_DATABASE_SEPARATOR)) - && path.HasRelativePath(); - inout = AZStd::move(path.LexicallyNormal().Native()); - if (appendTrailingSlash) - { - inout.push_back(AZ_CORRECT_DATABASE_SEPARATOR); - } - return IsValid(inout.c_str()); + return false; } - bool IsValid(const char* in) + if (!strlen(in)) { - if (!in) - { - return false; - } + return false; + } - if (!strlen(in)) - { - return false; - } + if (Find(in, AZ_DATABASE_INVALID_CHARACTERS) != AZStd::string::npos) + { + return false; + } - if (Find(in, AZ_DATABASE_INVALID_CHARACTERS) != AZStd::string::npos) - { - return false; - } - - if (Find(in, AZ_WRONG_DATABASE_SEPARATOR) != AZStd::string::npos) - { - return false; - } + if (Find(in, AZ_WRONG_DATABASE_SEPARATOR) != AZStd::string::npos) + { + return false; + } #ifndef AZ_FILENAME_ALLOW_SPACES - if (Find(in, AZ_SPACE_CHARACTERS) != AZStd::string::npos) - { - return false; - } + if (Find(in, AZ_SPACE_CHARACTERS) != AZStd::string::npos) + { + return false; + } #endif // AZ_FILENAME_ALLOW_SPACES - if (LastCharacter(in) == AZ_CORRECT_DATABASE_SEPARATOR) - { - return false; - } - - return true; - } - - bool Split(const char* in, [[maybe_unused]] AZStd::string* pDstProjectRootOut, AZStd::string* pDstDatabaseRootOut, - AZStd::string* pDstDatabasePathOut , AZStd::string* pDstFileOut, AZStd::string* pDstFileExtensionOut) + if (LastCharacter(in) == AZ_CORRECT_DATABASE_SEPARATOR) { - AZStd::string_view path{ in }; - if (path.empty()) - { - return false; - } - - AZ::IO::PathView pathView(path, AZ_CORRECT_DATABASE_SEPARATOR); - if (pDstDatabaseRootOut) - { - AZStd::string_view rootNameView = pathView.RootName().Native(); - if (rootNameView.size() > pDstDatabaseRootOut->max_size()) - { - return false; - } - *pDstDatabaseRootOut = rootNameView; - } - if (pDstDatabasePathOut) - { - AZStd::string_view rootPathView = pathView.RootPath().Native(); - AZStd::string_view relPathParentView = pathView.ParentPath().RelativePath().Native(); - if (rootPathView.size() + relPathParentView.size() > pDstDatabasePathOut->max_size()) - { - return false; - } - // Append the root directory if there is one - *pDstDatabasePathOut = rootPathView; - // Append the relative path portion of the split path excluding the filename - *pDstDatabasePathOut += relPathParentView; - } - if (pDstFileOut) - { - AZStd::string_view stemView = pathView.Stem().Native(); - if (stemView.size() > pDstFileOut->max_size()) - { - return false; - } - *pDstFileOut = stemView; - } - if (pDstFileExtensionOut) - { - AZStd::string_view extensionView = pathView.Extension().Native(); - if (extensionView.size() > pDstFileExtensionOut->max_size()) - { - return false; - } - *pDstFileExtensionOut = extensionView; - } - - return true; + return false; } - bool Join(const char* pFirstPart, const char* pSecondPart, AZStd::string& out, [[maybe_unused]] bool bCaseInsensitive /*= true*/, bool bNormalize /*= true*/) - { - // both paths cannot be empty - if (!pFirstPart || !pSecondPart) - { - return false; - } + return true; + } - AZ::IO::PathView secondPath(pSecondPart); - AZ_Warning("StringFunc", secondPath.IsRelative(), "The second join parameter %s is an absolute path," - " this will replace the first part of the path resulting in an output of just the second part", - pSecondPart); - - AZ::IO::Path resultPath(pFirstPart, AZ_CORRECT_DATABASE_SEPARATOR); - resultPath /= secondPath; - out = bNormalize ? AZStd::move(resultPath.LexicallyNormal().Native()) : AZStd::move(resultPath.Native()); - return true; - } - } //namespace AssetDatabasePath - - namespace Root + bool Split(const char* in, [[maybe_unused]] AZStd::string* pDstProjectRootOut, AZStd::string* pDstDatabaseRootOut, + AZStd::string* pDstDatabasePathOut , AZStd::string* pDstFileOut, AZStd::string* pDstFileExtensionOut) { - bool Normalize(AZStd::string& inout) + AZStd::string_view path{ in }; + if (path.empty()) { - AZ::IO::Path path(AZStd::move(inout)); - path = path.LexicallyNormal(); - // After normalization check if the path contains a relative path - bool appendTrailingSlash = path.HasRelativePath(); - inout = AZStd::move(path.Native()); - if (appendTrailingSlash) - { - inout.push_back(AZ_CORRECT_FILESYSTEM_SEPARATOR); // Append a trailing separator for Root path normalization - } - return IsValid(inout.c_str()); + return false; } - bool IsValid(const char* in) + AZ::IO::PathView pathView(path, AZ_CORRECT_DATABASE_SEPARATOR); + if (pDstDatabaseRootOut) { - if (!in) + AZStd::string_view rootNameView = pathView.RootName().Native(); + if (rootNameView.size() > pDstDatabaseRootOut->max_size()) { return false; } - - if (!strlen(in)) + *pDstDatabaseRootOut = rootNameView; + } + if (pDstDatabasePathOut) + { + AZStd::string_view rootPathView = pathView.RootPath().Native(); + AZStd::string_view relPathParentView = pathView.ParentPath().RelativePath().Native(); + if (rootPathView.size() + relPathParentView.size() > pDstDatabasePathOut->max_size()) { return false; } - - if (Find(in, AZ_FILESYSTEM_INVALID_CHARACTERS) != AZStd::string::npos) + // Append the root directory if there is one + *pDstDatabasePathOut = rootPathView; + // Append the relative path portion of the split path excluding the filename + *pDstDatabasePathOut += relPathParentView; + } + if (pDstFileOut) + { + AZStd::string_view stemView = pathView.Stem().Native(); + if (stemView.size() > pDstFileOut->max_size()) { return false; } - - if (Find(in, AZ_WRONG_FILESYSTEM_SEPARATOR) != AZStd::string::npos) + *pDstFileOut = stemView; + } + if (pDstFileExtensionOut) + { + AZStd::string_view extensionView = pathView.Extension().Native(); + if (extensionView.size() > pDstFileExtensionOut->max_size()) { return false; } + *pDstFileExtensionOut = extensionView; + } - #ifndef AZ_FILENAME_ALLOW_SPACES - if (Find(in, AZ_SPACE_CHARACTERS) != AZStd::string::npos) - { - return false; - } - #endif // AZ_FILENAME_ALLOW_SPACES + return true; + } - AZ::IO::PathView pathView(in); - if (!pathView.HasRootPath()) - { - return false; - } + bool Join(const char* pFirstPart, const char* pSecondPart, AZStd::string& out, [[maybe_unused]] bool bCaseInsensitive /*= true*/, bool bNormalize /*= true*/) + { + // both paths cannot be empty + if (!pFirstPart || !pSecondPart) + { + return false; + } - if (LastCharacter(in) != AZ_CORRECT_FILESYSTEM_SEPARATOR) - { - return false; - } + AZ::IO::PathView secondPath(pSecondPart); + AZ_Warning("StringFunc", secondPath.IsRelative(), "The second join parameter %s is an absolute path," + " this will replace the first part of the path resulting in an output of just the second part", + pSecondPart); + AZ::IO::Path resultPath(pFirstPart, AZ_CORRECT_DATABASE_SEPARATOR); + resultPath /= secondPath; + out = bNormalize ? AZStd::move(resultPath.LexicallyNormal().Native()) : AZStd::move(resultPath.Native()); + return true; + } + } //namespace AssetDatabasePath + + namespace Root + { + bool Normalize(AZStd::string& inout) + { + AZ::IO::Path path(AZStd::move(inout)); + path = path.LexicallyNormal(); + // After normalization check if the path contains a relative path + bool appendTrailingSlash = path.HasRelativePath(); + inout = AZStd::move(path.Native()); + if (appendTrailingSlash) + { + inout.push_back(AZ_CORRECT_FILESYSTEM_SEPARATOR); // Append a trailing separator for Root path normalization + } + return IsValid(inout.c_str()); + } + + bool IsValid(const char* in) + { + if (!in) + { + return false; + } + + if (!strlen(in)) + { + return false; + } + + if (Find(in, AZ_FILESYSTEM_INVALID_CHARACTERS) != AZStd::string::npos) + { + return false; + } + + if (Find(in, AZ_WRONG_FILESYSTEM_SEPARATOR) != AZStd::string::npos) + { + return false; + } + +#ifndef AZ_FILENAME_ALLOW_SPACES + if (Find(in, AZ_SPACE_CHARACTERS) != AZStd::string::npos) + { + return false; + } +#endif // AZ_FILENAME_ALLOW_SPACES + + AZ::IO::PathView pathView(in); + if (!pathView.HasRootPath()) + { + return false; + } + + if (LastCharacter(in) != AZ_CORRECT_FILESYSTEM_SEPARATOR) + { + return false; + } + + return true; + } + }//namespace Root + + namespace RelativePath + { + bool Normalize(AZStd::string& inout) + { + AZ::IO::Path path(AZStd::move(inout)); + path = path.LexicallyNormal(); + // After normalization check if the path contains a relative path + bool appendTrailingSlash = path.HasRelativePath(); + inout = AZStd::move(path.Native()); + if (appendTrailingSlash) + { + inout.push_back(AZ_CORRECT_FILESYSTEM_SEPARATOR); // Append trailing separator for Relative path normalization if it it is not empty + } + return IsValid(inout.c_str()); + } + + bool IsValid(const char* in) + { + if (!in) + { + return false; + } + + if (!strlen(in)) + { return true; } - }//namespace Root - namespace RelativePath + if (Find(in, AZ_FILESYSTEM_INVALID_CHARACTERS) != AZStd::string::npos) + { + return false; + } + + if (Find(in, AZ_WRONG_FILESYSTEM_SEPARATOR) != AZStd::string::npos) + { + return false; + } + +#ifndef AZ_FILENAME_ALLOW_SPACES + if (Find(in, AZ_SPACE_CHARACTERS) != AZStd::string::npos) + { + return false; + } +#endif // AZ_FILENAME_ALLOW_SPACES + + if (Path::HasDrive(in)) + { + return false; + } + + if (FirstCharacter(in) == AZ_CORRECT_FILESYSTEM_SEPARATOR) + { + return false; + } + + if (LastCharacter(in) != AZ_CORRECT_FILESYSTEM_SEPARATOR) + { + return false; + } + + return true; + } + }//namespace RelativePath + + namespace Path + { + bool Normalize(AZStd::string& inout) { - bool Normalize(AZStd::string& inout) + AZ::IO::Path path(AZStd::move(inout)); + bool appendTrailingSlash = (path.Native().ends_with(AZ_CORRECT_FILESYSTEM_SEPARATOR) || path.Native().ends_with(AZ_WRONG_FILESYSTEM_SEPARATOR)); + path = path.LexicallyNormal(); + // After normalization check if the path contains a relative path and addition to ending with a path separator before + appendTrailingSlash = appendTrailingSlash && path.HasRelativePath(); + inout = AZStd::move(path.Native()); + if (appendTrailingSlash) { - AZ::IO::Path path(AZStd::move(inout)); - path = path.LexicallyNormal(); - // After normalization check if the path contains a relative path - bool appendTrailingSlash = path.HasRelativePath(); - inout = AZStd::move(path.Native()); - if (appendTrailingSlash) - { - inout.push_back(AZ_CORRECT_FILESYSTEM_SEPARATOR); // Append trailing separator for Relative path normalization if it it is not empty - } - return IsValid(inout.c_str()); + inout.push_back(AZ_CORRECT_FILESYSTEM_SEPARATOR); } + return IsValid(inout.c_str()); + } - bool IsValid(const char* in) - { - if (!in) - { - return false; - } - - if (!strlen(in)) - { - return true; - } - - if (Find(in, AZ_FILESYSTEM_INVALID_CHARACTERS) != AZStd::string::npos) - { - return false; - } - - if (Find(in, AZ_WRONG_FILESYSTEM_SEPARATOR) != AZStd::string::npos) - { - return false; - } - - #ifndef AZ_FILENAME_ALLOW_SPACES - if (Find(in, AZ_SPACE_CHARACTERS) != AZStd::string::npos) - { - return false; - } - #endif // AZ_FILENAME_ALLOW_SPACES - - if (Path::HasDrive(in)) - { - return false; - } - - if (FirstCharacter(in) == AZ_CORRECT_FILESYSTEM_SEPARATOR) - { - return false; - } - - if (LastCharacter(in) != AZ_CORRECT_FILESYSTEM_SEPARATOR) - { - return false; - } - - return true; - } - }//namespace RelativePath - - namespace Path + bool Normalize(FixedString& inout) { - bool Normalize(AZStd::string& inout) + AZ::IO::FixedMaxPath path(AZStd::move(inout)); + bool appendTrailingSlash = (path.Native().ends_with(AZ_CORRECT_FILESYSTEM_SEPARATOR) || path.Native().ends_with(AZ_WRONG_FILESYSTEM_SEPARATOR)); + path = path.LexicallyNormal(); + // After normalization check if the path contains a relative path and addition to ending with a path separator before + appendTrailingSlash = appendTrailingSlash && path.HasRelativePath(); + inout = AZStd::move(path.Native()); + if (appendTrailingSlash) { - AZ::IO::Path path(AZStd::move(inout)); - bool appendTrailingSlash = (path.Native().ends_with(AZ_CORRECT_FILESYSTEM_SEPARATOR) || path.Native().ends_with(AZ_WRONG_FILESYSTEM_SEPARATOR)); - path = path.LexicallyNormal(); - // After normalization check if the path contains a relative path and addition to ending with a path separator before - appendTrailingSlash = appendTrailingSlash && path.HasRelativePath(); - inout = AZStd::move(path.Native()); - if (appendTrailingSlash) - { - inout.push_back(AZ_CORRECT_FILESYSTEM_SEPARATOR); - } - return IsValid(inout.c_str()); + inout.push_back(AZ_CORRECT_FILESYSTEM_SEPARATOR); + } + return IsValid(inout.c_str()); + } + + bool IsValid(const char* in, bool bHasDrive /*= false*/, bool bHasExtension /*= false*/, AZStd::string* errors /*= nullptr*/) + { + //if they gave us a error reporting string empty it. + if (errors) + { + errors->clear(); } - bool Normalize(FixedString& inout) + //empty is not a valid path + if (!in) { - AZ::IO::FixedMaxPath path(AZStd::move(inout)); - bool appendTrailingSlash = (path.Native().ends_with(AZ_CORRECT_FILESYSTEM_SEPARATOR) || path.Native().ends_with(AZ_WRONG_FILESYSTEM_SEPARATOR)); - path = path.LexicallyNormal(); - // After normalization check if the path contains a relative path and addition to ending with a path separator before - appendTrailingSlash = appendTrailingSlash && path.HasRelativePath(); - inout = AZStd::move(path.Native()); - if (appendTrailingSlash) - { - inout.push_back(AZ_CORRECT_FILESYSTEM_SEPARATOR); - } - return IsValid(inout.c_str()); - } - - bool IsValid(const char* in, bool bHasDrive /*= false*/, bool bHasExtension /*= false*/, AZStd::string* errors /*= nullptr*/) - { - //if they gave us a error reporting string empty it. if (errors) { - errors->clear(); + *errors += "The path is Empty."; } + return false; + } - //empty is not a valid path - if (!in) + //empty is not a valid path + size_t length = strlen(in); + if (!length) + { + if (errors) { - if (errors) - { - *errors += "The path is Empty."; - } - return false; + *errors += "The path is Empty."; } + return false; + } - //empty is not a valid path - size_t length = strlen(in); - if (!length) + //invalid characters + const char* inEnd = in + length; + const char* invalidCharactersBegin = AZ_FILESYSTEM_INVALID_CHARACTERS; + const char* invalidCharactersEnd = invalidCharactersBegin + AZ_ARRAY_SIZE(AZ_FILESYSTEM_INVALID_CHARACTERS); + if (AZStd::find_first_of(in, inEnd, invalidCharactersBegin, invalidCharactersEnd) != inEnd) + { + if (errors) { - if (errors) - { - *errors += "The path is Empty."; - } - return false; + *errors += "The path has invalid characters."; } + return false; + } - //invalid characters - const char* inEnd = in + length; - const char* invalidCharactersBegin = AZ_FILESYSTEM_INVALID_CHARACTERS; - const char* invalidCharactersEnd = invalidCharactersBegin + AZ_ARRAY_SIZE(AZ_FILESYSTEM_INVALID_CHARACTERS); - if (AZStd::find_first_of(in, inEnd, invalidCharactersBegin, invalidCharactersEnd) != inEnd) + //invalid characters + if (Find(in, AZ_WRONG_FILESYSTEM_SEPARATOR) != AZStd::string::npos) + { + if (errors) { - if (errors) - { - *errors += "The path has invalid characters."; - } - return false; + *errors += "The path has wrong separator."; } + return false; + } - //invalid characters - if (Find(in, AZ_WRONG_FILESYSTEM_SEPARATOR) != AZStd::string::npos) +#ifndef AZ_FILENAME_ALLOW_SPACES + const char* spaceCharactersBegin = AZ_SPACE_CHARACTERS; + const char* spaceCharactersEnd = spaceCharactersBegin + AZ_ARRAY_SIZE(AZ_SPACE_CHARACTERS); + if (AZStd::find_first_of(in, inEnd, spaceCharactersBegin, spaceCharactersEnd) != inEnd) + { + if (errors) { - if (errors) - { - *errors += "The path has wrong separator."; - } - return false; + *errors += "The path has space characters."; } + return false; + } +#endif // AZ_FILENAME_ALLOW_SPACES - #ifndef AZ_FILENAME_ALLOW_SPACES - const char* spaceCharactersBegin = AZ_SPACE_CHARACTERS; - const char* spaceCharactersEnd = spaceCharactersBegin + AZ_ARRAY_SIZE(AZ_SPACE_CHARACTERS); - if (AZStd::find_first_of(in, inEnd, spaceCharactersBegin, spaceCharactersEnd) != inEnd) + //does it have a drive if specified + if (bHasDrive && !HasDrive(in)) + { + if (errors) { - if (errors) - { - *errors += "The path has space characters."; - } - return false; + *errors += "The path should have a drive. The path ["; + *errors += in; + *errors += "] is invalid."; } - #endif // AZ_FILENAME_ALLOW_SPACES + return false; + } - //does it have a drive if specified - if (bHasDrive && !HasDrive(in)) + //does it have and extension if specified + if (bHasExtension && !HasExtension(in)) + { + if (errors) { - if (errors) - { - *errors += "The path should have a drive. The path ["; - *errors += in; - *errors += "] is invalid."; - } - return false; + *errors += "The path should have the a file extension. The path ["; + *errors += in; + *errors += "] is invalid."; } + return false; + } - //does it have and extension if specified - if (bHasExtension && !HasExtension(in)) + //start at the beginning and walk down the characters of the path + const char* elementStart = in; + const char* walk = elementStart; + while (*walk) + { + if (*walk == AZ_CORRECT_FILESYSTEM_SEPARATOR) //is this the correct separator { - if (errors) - { - *errors += "The path should have the a file extension. The path ["; - *errors += in; - *errors += "] is invalid."; - } - return false; + elementStart = walk; } - - //start at the beginning and walk down the characters of the path - const char* elementStart = in; - const char* walk = elementStart; - while (*walk) +#if AZ_TRAIT_OS_USE_WINDOWS_FILE_PATHS + else if (*walk == AZ_FILESYSTEM_DRIVE_SEPARATOR) //is this the drive separator { - if (*walk == AZ_CORRECT_FILESYSTEM_SEPARATOR) //is this the correct separator - { - elementStart = walk; - } - #if AZ_TRAIT_OS_USE_WINDOWS_FILE_PATHS - else if (*walk == AZ_FILESYSTEM_DRIVE_SEPARATOR) //is this the drive separator - { - //A AZ_FILESYSTEM_DRIVE_SEPARATOR character con only occur in the first - //component of a valid path. If the elementStart is not GetBufferPtr() - //then we have past the first component - if (elementStart != in) - { - if (errors) - { - *errors += "There is a stray AZ_FILESYSTEM_DRIVE_SEPARATOR = "; - *errors += AZ_FILESYSTEM_DRIVE_SEPARATOR; - *errors += " found after the first component. The path ["; - *errors += in; - *errors += "] is invalid."; - } - return false; - } - } - #endif - #ifndef AZ_FILENAME_ALLOW_SPACES - else if (*walk == ' ') //is this a space + //A AZ_FILESYSTEM_DRIVE_SEPARATOR character con only occur in the first + //component of a valid path. If the elementStart is not GetBufferPtr() + //then we have past the first component + if (elementStart != in) { if (errors) { - *errors += "The component ["; - for (const char* c = elementStart + 1; c != walk; ++c) - { - *errors += *c; - } - *errors += "] has a SPACE character. The path ["; + *errors += "There is a stray AZ_FILESYSTEM_DRIVE_SEPARATOR = "; + *errors += AZ_FILESYSTEM_DRIVE_SEPARATOR; + *errors += " found after the first component. The path ["; *errors += in; *errors += "] is invalid."; } return false; } - #endif - - ++walk; } - - #if !AZ_TRAIT_OS_ALLOW_UNLIMITED_PATH_COMPONENT_LENGTH - //is this full path longer than AZ::IO::MaxPathLength (The longest a path with all components can possibly be)? - if (walk - in > AZ::IO::MaxPathLength) +#endif +#ifndef AZ_FILENAME_ALLOW_SPACES + else if (*walk == ' ') //is this a space { - if (errors != 0) + if (errors) { - *errors += "The path ["; + *errors += "The component ["; + for (const char* c = elementStart + 1; c != walk; ++c) + { + *errors += *c; + } + *errors += "] has a SPACE character. The path ["; *errors += in; - *errors += "] is over the AZ::IO::MaxPathLength = "; - char buf[64]; - _itoa_s(AZ::IO::MaxPathLength, buf, 10); - *errors += buf; - *errors += " characters total length limit."; + *errors += "] is invalid."; } return false; } - #endif +#endif - return true; + ++walk; } - bool ConstructFull(const char* pRootPath, const char* pFileName, AZStd::string& out, bool bNormalize /* = false*/) +#if !AZ_TRAIT_OS_ALLOW_UNLIMITED_PATH_COMPONENT_LENGTH + //is this full path longer than AZ::IO::MaxPathLength (The longest a path with all components can possibly be)? + if (walk - in > AZ::IO::MaxPathLength) { - if (!pRootPath || AZ::IO::PathView(pRootPath).IsRelative() - || !pFileName || AZ::IO::PathView(pFileName).IsAbsolute()) + if (errors != 0) { - return false; - } - AZ::IO::Path path(pRootPath); - path /= pFileName; - if (bNormalize) - { - out = AZStd::move(path.LexicallyNormal().Native()); - } - else - { - out = AZStd::move(path.Native()); - } - return IsValid(out.c_str()); - } - - bool ConstructFull(const char* pRootPath, const char* pFileName, const char* pFileExtension, AZStd::string& out, bool bNormalize /* = false*/) - { - if (!pRootPath || AZ::IO::PathView(pRootPath).IsRelative() - || !pFileName || AZ::IO::PathView(pFileName).IsAbsolute()) - { - return false; - } - AZ::IO::Path path(pRootPath); - path /= pFileName; - if (pFileExtension) - { - path.ReplaceExtension(pFileExtension); - } - if (bNormalize) - { - out = AZStd::move(path.LexicallyNormal().Native()); - } - else - { - out = AZStd::move(path.Native()); - } - return IsValid(out.c_str()); - } - - bool ConstructFull(const char* pRoot, const char* pRelativePath, const char* pFileName, const char* pFileExtension, AZStd::string& out, bool bNormalize /* = false*/) - { - if (!pRoot || AZ::IO::PathView(pRoot).IsRelative() - || !pRelativePath || AZ::IO::PathView(pRelativePath).IsAbsolute() - || !pFileName || AZ::IO::PathView(pFileName).IsAbsolute()) - { - return false; - } - AZ::IO::Path path(pRoot); - path /= pRelativePath; - path /= pFileName; - if (pFileExtension) - { - path.ReplaceExtension(pFileExtension); - } - if (bNormalize) - { - out = AZStd::move(path.LexicallyNormal().Native()); - } - else - { - out = AZStd::move(path.Native()); - } - return IsValid(out.c_str()); - } - - bool Split(const char* in, AZStd::string* pDstDrive, AZStd::string* pDstPath, AZStd::string* pDstName, AZStd::string* pDstExtension) - { - AZStd::string_view path{ in }; - if (path.empty()) - { - return false; - } - - AZ::IO::PathView pathView(path); - if (pDstDrive) - { - AZStd::string_view rootNameView = pathView.RootName().Native(); - if (rootNameView.size() > pDstDrive->max_size()) - { - return false; - } - *pDstDrive = rootNameView; - } - if (pDstPath) - { - AZStd::string_view rootDirectoryView = pathView.RootDirectory().Native(); - AZStd::string_view relPathParentView = pathView.ParentPath().RelativePath().Native(); - if (rootDirectoryView.size() + relPathParentView.size() > pDstPath->max_size()) - { - return false; - } - // Append the root directory if there is one - *pDstPath = rootDirectoryView; - // Append the relative path portion of the split path excluding the filename - *pDstPath += relPathParentView; - } - if (pDstName) - { - AZStd::string_view stemView = pathView.Stem().Native(); - if (stemView.size() > pDstName->max_size()) - { - return false; - } - *pDstName = stemView; - } - if (pDstExtension) - { - AZStd::string_view extensionView = pathView.Extension().Native(); - if (extensionView.size() > pDstExtension->max_size()) - { - return false; - } - *pDstExtension = extensionView; - } - - return true; - } - - bool Join(const char* pFirstPart, const char* pSecondPart, AZStd::string& out, [[maybe_unused]] bool bCaseInsensitive, bool bNormalize) - { - if (!pFirstPart || !pSecondPart) - { - return false; - } - - AZ::IO::PathView secondPath(pSecondPart); - AZ_Warning("StringFunc", secondPath.IsRelative(), "The second join parameter %s is an absolute path," - " this will replace the first part of the path resulting in an output of just the second part", - pSecondPart); - - AZ::IO::Path resultPath(pFirstPart); - resultPath /= secondPath; - out = bNormalize ? AZStd::move(resultPath.LexicallyNormal().Native()) : AZStd::move(resultPath.Native()); - return true; - } - - bool Join(const char* pFirstPart, const char* pSecondPart, FixedString& out, [[maybe_unused]] bool bCaseInsensitive, bool bNormalize) - { - if (!pFirstPart || !pSecondPart) - { - return false; - } - - AZ::IO::PathView secondPath(pSecondPart); - AZ_Warning("StringFunc", secondPath.IsRelative(), "The second join parameter %s is an absolute path," - " this will replace the first part of the path resulting in an output of just the second part", - pSecondPart); - - AZ::IO::FixedMaxPath resultPath(pFirstPart); - resultPath /= secondPath; - out = bNormalize ? AZStd::move(resultPath.LexicallyNormal().Native()) : AZStd::move(resultPath.Native()); - return true; - } - - bool HasDrive(const char* in, bool bCheckAllFileSystemFormats /*= false*/) - { - // no drive if empty - if (!in || in[0] == '\0') - { - return false; - } - AZ::IO::PathView pathView(in); - return pathView.HasRootName() || (bCheckAllFileSystemFormats && pathView.HasRootDirectory()); - } - - bool HasExtension(const char* in) - { - //it doesn't have an extension if it's empty - if (!in || in[0] == '\0') - { - return false; - } - - return AZ::IO::PathView(in).HasExtension(); - } - - bool IsExtension(const char* in, const char* pExtension, bool bCaseInsenitive /*= false*/) - { - //it doesn't have an extension if it's empty - if (!in || in[0] == '\0' || !pExtension || pExtension[0] == '\0') - { - return false; - } - - AZStd::string_view pathExtension = AZ::IO::PathView(in).Extension().Native(); - if (pathExtension.starts_with(AZ_FILESYSTEM_EXTENSION_SEPARATOR)) - { - pathExtension.remove_prefix(1); - } - AZStd::string_view extensionView(pExtension); - if (extensionView.starts_with(AZ_FILESYSTEM_EXTENSION_SEPARATOR)) - { - extensionView.remove_prefix(1); - } - - return AZStd::equal(pathExtension.begin(), pathExtension.end(), extensionView.begin(), extensionView.end(), - [bCaseInsenitive](const char lhs, const char rhs) - { - return !bCaseInsenitive ? lhs == rhs : tolower(lhs) == tolower(rhs); - }); - } - - bool IsRelative(const char* in) - { - //not relative if empty - if (!in || in[0] == '\0') - { - return false; - } - - return AZ::IO::PathView(in).IsRelative(); - } - - bool StripDrive(AZStd::string& inout) - { - AZ::IO::PathView pathView(inout); - AZ::IO::PathView rootNameView(pathView.RootName()); - if (!rootNameView.empty()) - { - inout.replace(0, rootNameView.Native().size(), ""); - return true; + *errors += "The path ["; + *errors += in; + *errors += "] is over the AZ::IO::MaxPathLength = "; + char buf[64]; + _itoa_s(AZ::IO::MaxPathLength, buf, 10); + *errors += buf; + *errors += " characters total length limit."; } return false; } +#endif - void StripPath(AZStd::string& inout) + return true; + } + + bool ConstructFull(const char* pRootPath, const char* pFileName, AZStd::string& out, bool bNormalize /* = false*/) + { + if (!pRootPath || AZ::IO::PathView(pRootPath).IsRelative() + || !pFileName || AZ::IO::PathView(pFileName).IsAbsolute()) { - inout = AZ::IO::PathView(inout).Filename().Native(); + return false; + } + AZ::IO::Path path(pRootPath); + path /= pFileName; + if (bNormalize) + { + out = AZStd::move(path.LexicallyNormal().Native()); + } + else + { + out = AZStd::move(path.Native()); + } + return IsValid(out.c_str()); + } + + bool ConstructFull(const char* pRootPath, const char* pFileName, const char* pFileExtension, AZStd::string& out, bool bNormalize /* = false*/) + { + if (!pRootPath || AZ::IO::PathView(pRootPath).IsRelative() + || !pFileName || AZ::IO::PathView(pFileName).IsAbsolute()) + { + return false; + } + AZ::IO::Path path(pRootPath); + path /= pFileName; + if (pFileExtension) + { + path.ReplaceExtension(pFileExtension); + } + if (bNormalize) + { + out = AZStd::move(path.LexicallyNormal().Native()); + } + else + { + out = AZStd::move(path.Native()); + } + return IsValid(out.c_str()); + } + + bool ConstructFull(const char* pRoot, const char* pRelativePath, const char* pFileName, const char* pFileExtension, AZStd::string& out, bool bNormalize /* = false*/) + { + if (!pRoot || AZ::IO::PathView(pRoot).IsRelative() + || !pRelativePath || AZ::IO::PathView(pRelativePath).IsAbsolute() + || !pFileName || AZ::IO::PathView(pFileName).IsAbsolute()) + { + return false; + } + AZ::IO::Path path(pRoot); + path /= pRelativePath; + path /= pFileName; + if (pFileExtension) + { + path.ReplaceExtension(pFileExtension); + } + if (bNormalize) + { + out = AZStd::move(path.LexicallyNormal().Native()); + } + else + { + out = AZStd::move(path.Native()); + } + return IsValid(out.c_str()); + } + + bool Split(const char* in, AZStd::string* pDstDrive, AZStd::string* pDstPath, AZStd::string* pDstName, AZStd::string* pDstExtension) + { + AZStd::string_view path{ in }; + if (path.empty()) + { + return false; } - void StripFullName(AZStd::string& inout) + AZ::IO::PathView pathView(path); + if (pDstDrive) { - inout = AZ::IO::Path(AZStd::move(inout)).RemoveFilename().Native(); - } - - void StripExtension(AZStd::string& inout) - { - AZ::IO::Path path(AZStd::move(inout)); - path.ReplaceExtension(); - inout = AZStd::move(path.Native()); - } - - bool StripComponent(AZStd::string& inout, bool bLastComponent /* = false*/) - { - AZ::IO::PathView pathView(inout); - auto pathBeginIter = pathView.begin(); - auto pathEndIter = pathView.end(); - if (pathBeginIter == pathEndIter) + AZStd::string_view rootNameView = pathView.RootName().Native(); + if (rootNameView.size() > pDstDrive->max_size()) { return false; } - AZ::IO::Path resultPath; - if (!bLastComponent) - { - // Removing leading path component - AZStd::advance(pathBeginIter, 1); - } - else - { - // Remove trailing path component - AZStd::advance(pathEndIter, -1); - } - for (; pathBeginIter != pathEndIter; ++pathBeginIter) - { - resultPath /= *pathBeginIter; - } - if (resultPath.empty()) + *pDstDrive = rootNameView; + } + if (pDstPath) + { + AZStd::string_view rootDirectoryView = pathView.RootDirectory().Native(); + AZStd::string_view relPathParentView = pathView.ParentPath().RelativePath().Native(); + if (rootDirectoryView.size() + relPathParentView.size() > pDstPath->max_size()) { return false; } - inout = AZStd::move(resultPath.Native()); + // Append the root directory if there is one + *pDstPath = rootDirectoryView; + // Append the relative path portion of the split path excluding the filename + *pDstPath += relPathParentView; + } + if (pDstName) + { + AZStd::string_view stemView = pathView.Stem().Native(); + if (stemView.size() > pDstName->max_size()) + { + return false; + } + *pDstName = stemView; + } + if (pDstExtension) + { + AZStd::string_view extensionView = pathView.Extension().Native(); + if (extensionView.size() > pDstExtension->max_size()) + { + return false; + } + *pDstExtension = extensionView; + } + + return true; + } + + bool Join(const char* pFirstPart, const char* pSecondPart, AZStd::string& out, [[maybe_unused]] bool bCaseInsensitive, bool bNormalize) + { + if (!pFirstPart || !pSecondPart) + { + return false; + } + + AZ::IO::PathView secondPath(pSecondPart); + AZ_Warning("StringFunc", secondPath.IsRelative(), "The second join parameter %s is an absolute path," + " this will replace the first part of the path resulting in an output of just the second part", + pSecondPart); + + AZ::IO::Path resultPath(pFirstPart); + resultPath /= secondPath; + out = bNormalize ? AZStd::move(resultPath.LexicallyNormal().Native()) : AZStd::move(resultPath.Native()); + return true; + } + + bool Join(const char* pFirstPart, const char* pSecondPart, FixedString& out, [[maybe_unused]] bool bCaseInsensitive, bool bNormalize) + { + if (!pFirstPart || !pSecondPart) + { + return false; + } + + AZ::IO::PathView secondPath(pSecondPart); + AZ_Warning("StringFunc", secondPath.IsRelative(), "The second join parameter %s is an absolute path," + " this will replace the first part of the path resulting in an output of just the second part", + pSecondPart); + + AZ::IO::FixedMaxPath resultPath(pFirstPart); + resultPath /= secondPath; + out = bNormalize ? AZStd::move(resultPath.LexicallyNormal().Native()) : AZStd::move(resultPath.Native()); + return true; + } + + bool HasDrive(const char* in, bool bCheckAllFileSystemFormats /*= false*/) + { + // no drive if empty + if (!in || in[0] == '\0') + { + return false; + } + AZ::IO::PathView pathView(in); + return pathView.HasRootName() || (bCheckAllFileSystemFormats && pathView.HasRootDirectory()); + } + + bool HasExtension(const char* in) + { + //it doesn't have an extension if it's empty + if (!in || in[0] == '\0') + { + return false; + } + + return AZ::IO::PathView(in).HasExtension(); + } + + bool IsExtension(const char* in, const char* pExtension, bool bCaseInsenitive /*= false*/) + { + //it doesn't have an extension if it's empty + if (!in || in[0] == '\0' || !pExtension || pExtension[0] == '\0') + { + return false; + } + + AZStd::string_view pathExtension = AZ::IO::PathView(in).Extension().Native(); + if (pathExtension.starts_with(AZ_FILESYSTEM_EXTENSION_SEPARATOR)) + { + pathExtension.remove_prefix(1); + } + AZStd::string_view extensionView(pExtension); + if (extensionView.starts_with(AZ_FILESYSTEM_EXTENSION_SEPARATOR)) + { + extensionView.remove_prefix(1); + } + + return AZStd::equal(pathExtension.begin(), pathExtension.end(), extensionView.begin(), extensionView.end(), + [bCaseInsenitive](const char lhs, const char rhs) + { + return !bCaseInsenitive ? lhs == rhs : tolower(lhs) == tolower(rhs); + }); + } + + bool IsRelative(const char* in) + { + //not relative if empty + if (!in || in[0] == '\0') + { + return false; + } + + return AZ::IO::PathView(in).IsRelative(); + } + + bool StripDrive(AZStd::string& inout) + { + AZ::IO::PathView pathView(inout); + AZ::IO::PathView rootNameView(pathView.RootName()); + if (!rootNameView.empty()) + { + inout.replace(0, rootNameView.Native().size(), ""); return true; } + return false; + } - bool GetDrive(const char* in, AZStd::string& out) + void StripPath(AZStd::string& inout) + { + inout = AZ::IO::PathView(inout).Filename().Native(); + } + + void StripFullName(AZStd::string& inout) + { + inout = AZ::IO::Path(AZStd::move(inout)).RemoveFilename().Native(); + } + + void StripExtension(AZStd::string& inout) + { + AZ::IO::Path path(AZStd::move(inout)); + path.ReplaceExtension(); + inout = AZStd::move(path.Native()); + } + + bool StripComponent(AZStd::string& inout, bool bLastComponent /* = false*/) + { + AZ::IO::PathView pathView(inout); + auto pathBeginIter = pathView.begin(); + auto pathEndIter = pathView.end(); + if (pathBeginIter == pathEndIter) { - if (!in || in[0] == '\0') - { - return false; - } + return false; + } + AZ::IO::Path resultPath; + if (!bLastComponent) + { + // Removing leading path component + AZStd::advance(pathBeginIter, 1); + } + else + { + // Remove trailing path component + AZStd::advance(pathEndIter, -1); + } + for (; pathBeginIter != pathEndIter; ++pathBeginIter) + { + resultPath /= *pathBeginIter; + } + if (resultPath.empty()) + { + return false; + } + inout = AZStd::move(resultPath.Native()); + return true; + } - out = AZ::IO::PathView(in).RootName().Native(); + bool GetDrive(const char* in, AZStd::string& out) + { + if (!in || in[0] == '\0') + { + return false; + } + + out = AZ::IO::PathView(in).RootName().Native(); + return !out.empty(); + } + + AZStd::optional GetParentDir(AZStd::string_view path) + { + if (path.empty()) + { + return {}; + } + + AZStd::string_view parentDir = AZ::IO::PathView(path).ParentPath().Native(); + return !parentDir.empty() ? AZStd::make_optional(parentDir) : AZStd::nullopt; + } + + bool GetFullPath(const char* in, AZStd::string& out) + { + if (!in || in[0] == '\0') + { + return false; + } + + out = AZ::IO::PathView(in).ParentPath().Native(); + return !out.empty(); + } + + bool GetFolderPath(const char* in, AZStd::string& out) + { + return GetFullPath(in, out); + } + + bool GetFolder(const char* in, AZStd::string& out, bool bFirst /* = false*/) + { + if (!in || in[0] == '\0') + { + return false; + } + + if (!bFirst) + { + out = AZ::IO::PathView(in).ParentPath().Filename().Native(); return !out.empty(); } - - AZStd::optional GetParentDir(AZStd::string_view path) + else { - if (path.empty()) - { - return {}; - } - - AZStd::string_view parentDir = AZ::IO::PathView(path).ParentPath().Native(); - return !parentDir.empty() ? AZStd::make_optional(parentDir) : AZStd::nullopt; - } - - bool GetFullPath(const char* in, AZStd::string& out) - { - if (!in || in[0] == '\0') - { - return false; - } - - out = AZ::IO::PathView(in).ParentPath().Native(); + AZStd::string_view relativePath = AZ::IO::PathView(in).RelativePath().Native(); + size_t nextSeparator = relativePath.find_first_of(AZ_CORRECT_FILESYSTEM_SEPARATOR); + out = nextSeparator != AZStd::string_view::npos ? relativePath.substr(0, nextSeparator) : relativePath; return !out.empty(); } + } - bool GetFolderPath(const char* in, AZStd::string& out) + bool GetFullFileName(const char* in, AZStd::string& out) + { + if (!in || in[0] == '\0') { - return GetFullPath(in, out); + return false; } - bool GetFolder(const char* in, AZStd::string& out, bool bFirst /* = false*/) - { - if (!in || in[0] == '\0') - { - return false; - } + out = AZ::IO::PathView(in).Filename().Native(); + return !out.empty(); + } - if (!bFirst) - { - out = AZ::IO::PathView(in).ParentPath().Filename().Native(); - return !out.empty(); - } - else - { - AZStd::string_view relativePath = AZ::IO::PathView(in).RelativePath().Native(); - size_t nextSeparator = relativePath.find_first_of(AZ_CORRECT_FILESYSTEM_SEPARATOR); - out = nextSeparator != AZStd::string_view::npos ? relativePath.substr(0, nextSeparator) : relativePath; - return !out.empty(); - } + bool GetFileName(const char* in, AZStd::string& out) + { + if (!in || in[0] == '\0') + { + return false; } - bool GetFullFileName(const char* in, AZStd::string& out) - { - if (!in || in[0] == '\0') - { - return false; - } + out = AZ::IO::PathView(in).Stem().Native(); + return !out.empty(); + } - out = AZ::IO::PathView(in).Filename().Native(); - return !out.empty(); + bool GetExtension(const char* in, AZStd::string& out, bool includeDot) + { + if (!in || in[0] == '\0') + { + return false; } - bool GetFileName(const char* in, AZStd::string& out) + AZStd::string_view extensionView = AZ::IO::PathView(in).Extension().Native(); + // PathView returns extensions with the character, so remove the + // if it is not included + if (!includeDot && extensionView.starts_with(AZ_FILESYSTEM_EXTENSION_SEPARATOR)) { - if (!in || in[0] == '\0') + extensionView.remove_prefix(1); + } + out = extensionView; + return !out.empty(); + } + + void ReplaceFullName(AZStd::string& inout, const char* pFileName /* = nullptr*/, const char* pFileExtension /* = nullptr*/) + { + //strip the full file name if it has one + AZ::IO::Path path(AZStd::move(inout)); + path.RemoveFilename(); + if (pFileName) + { + path /= pFileName; + } + if (pFileExtension) + { + path.ReplaceExtension(pFileExtension); + } + inout = AZStd::move(path.Native()); + } + + void ReplaceExtension(AZStd::string& inout, const char* newExtension /* = nullptr*/) + { + //treat this as a strip + if (!newExtension || newExtension[0] == '\0') + { + return; + } + AZ::IO::Path path(AZStd::move(inout)); + path.ReplaceExtension(newExtension); + inout = AZStd::move(path.Native()); + } + + AZStd::string& AppendSeparator(AZStd::string& inout) + { + if (inout.ends_with(AZ_WRONG_FILESYSTEM_SEPARATOR)) + { + inout.replace(inout.end() - 1, inout.end(), 1, AZ_CORRECT_FILESYSTEM_SEPARATOR); + } + else if (!inout.ends_with(AZ_CORRECT_FILESYSTEM_SEPARATOR)) + { + inout.append(1, AZ_CORRECT_FILESYSTEM_SEPARATOR); + } + return inout; + } + } // namespace Path + + namespace Json + { + /* + According to http://www.ecma-international.org/publications/files/ECMA-ST/ECMA-404.pdf: + A string is a sequence of Unicode code points wrapped with quotation marks (U+0022). All characters may be + placed within the quotation marks except for the characters that must be escaped: quotation mark (U+0022), + reverse solidus (U+005C), and the control characters U+0000 to U+001F. + */ + AZStd::string& ToEscapedString(AZStd::string& inout) + { + size_t strSize = inout.size(); + + for (size_t i = 0; i < strSize; ++i) + { + char character = inout[i]; + + // defaults to 1 if it hits any cases except default + size_t jumpChar = 1; + switch (character) { - return false; + case '"': + inout.insert(i, "\\"); + break; + + case '\\': + inout.insert(i, "\\"); + break; + + case '/': + inout.insert(i, "\\"); + break; + + case '\b': + inout.replace(i, i + 1, "\\b"); + break; + + case '\f': + inout.replace(i, i + 1, "\\f"); + break; + + case '\n': + inout.replace(i, i + 1, "\\n"); + break; + + case '\r': + inout.replace(i, i + 1, "\\r"); + break; + + case '\t': + inout.replace(i, i + 1, "\\t"); + break; + + default: + /* + Control characters U+0000 to U+001F may be represented as a six - character sequence : a reverse solidus, + followed by the lowercase letter u, followed by four hexadecimal digits that encode the code point. + */ + if (character >= '\x0000' && character <= '\x001f') + { + // jumping "\uXXXX" characters + jumpChar = 6; + + AZStd::string hexStr = AZStd::string::format("\\u%04x", static_cast(character)); + inout.replace(i, i + 1, hexStr); + } + else + { + jumpChar = 0; + } } - out = AZ::IO::PathView(in).Stem().Native(); - return !out.empty(); + i += jumpChar; + strSize += jumpChar; } - bool GetExtension(const char* in, AZStd::string& out, bool includeDot) - { - if (!in || in[0] == '\0') - { - return false; - } + return inout; + } + } // namespace Json - AZStd::string_view extensionView = AZ::IO::PathView(in).Extension().Native(); - // PathView returns extensions with the character, so remove the - // if it is not included - if (!includeDot && extensionView.starts_with(AZ_FILESYSTEM_EXTENSION_SEPARATOR)) - { - extensionView.remove_prefix(1); - } - out = extensionView; - return !out.empty(); - } + namespace Base64 + { + static const char base64pad = '='; - void ReplaceFullName(AZStd::string& inout, const char* pFileName /* = nullptr*/, const char* pFileExtension /* = nullptr*/) - { - //strip the full file name if it has one - AZ::IO::Path path(AZStd::move(inout)); - path.RemoveFilename(); - if (pFileName) - { - path /= pFileName; - } - if (pFileExtension) - { - path.ReplaceExtension(pFileExtension); - } - inout = AZStd::move(path.Native()); - } + static const char c_base64Table[] = + { + "ABCDEFGHIJKLMNOPQRSTUVWXYZ" + "abcdefghijklmnopqrstuvwxyz" + "0123456789+/" + }; - void ReplaceExtension(AZStd::string& inout, const char* newExtension /* = nullptr*/) - { - //treat this as a strip - if (!newExtension || newExtension[0] == '\0') - { - return; - } - AZ::IO::Path path(AZStd::move(inout)); - path.ReplaceExtension(newExtension); - inout = AZStd::move(path.Native()); - } + static const AZ::u8 c_inverseBase64Table[] = + { + 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, + 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, + 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x3e, 0xff, 0xff, 0xff, 0x3f, + 0x34, 0x35, 0x36, 0x37, 0x38, 0x39, 0x3a, 0x3b, 0x3c, 0x3d, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, + 0xff, 0x00, 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, 0x08, 0x09, 0x0a, 0x0b, 0x0c, 0x0d, 0x0e, + 0x0f, 0x10, 0x11, 0x12, 0x13, 0x14, 0x15, 0x16, 0x17, 0x18, 0x19, 0xff, 0xff, 0xff, 0xff, 0xff, + 0xff, 0x1a, 0x1b, 0x1c, 0x1d, 0x1e, 0x1f, 0x20, 0x21, 0x22, 0x23, 0x24, 0x25, 0x26, 0x27, 0x28, + 0x29, 0x2a, 0x2b, 0x2c, 0x2d, 0x2e, 0x2f, 0x30, 0x31, 0x32, 0x33, 0xff, 0xff, 0xff, 0xff, 0xff, + 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, + 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, + 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, + 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, + 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, + 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, + 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, + 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff + }; - AZStd::string& AppendSeparator(AZStd::string& inout) - { - if (inout.ends_with(AZ_WRONG_FILESYSTEM_SEPARATOR)) - { - inout.replace(inout.end() - 1, inout.end(), 1, AZ_CORRECT_FILESYSTEM_SEPARATOR); - } - else if (!inout.ends_with(AZ_CORRECT_FILESYSTEM_SEPARATOR)) - { - inout.append(1, AZ_CORRECT_FILESYSTEM_SEPARATOR); - } - return inout; - } - } // namespace Path + bool IsValidEncodedChar(const char encodedChar) + { + return c_inverseBase64Table[static_cast(encodedChar)] != 0xff; + } - namespace Json + AZStd::string Encode(const AZ::u8* in, const size_t size) { /* - According to http://www.ecma-international.org/publications/files/ECMA-ST/ECMA-404.pdf: - A string is a sequence of Unicode code points wrapped with quotation marks (U+0022). All characters may be - placed within the quotation marks except for the characters that must be escaped: quotation mark (U+0022), - reverse solidus (U+005C), and the control characters U+0000 to U+001F. + figure retrieved from the Base encoding rfc https://tools.ietf.org/html/rfc4648 + +--first octet--+-second octet--+--third octet--+ + |7 6 5 4 3 2 1 0|7 6 5 4 3 2 1 0|7 6 5 4 3 2 1 0| + +-----------+---+-------+-------+---+-----------+ + |5 4 3 2 1 0|5 4 3 2 1 0|5 4 3 2 1 0|5 4 3 2 1 0| + +--1.index--+--2.index--+--3.index--+--4.index--+ */ - AZStd::string& ToEscapedString(AZStd::string& inout) + AZStd::string result; + + const size_t remainder = size % 3; + const size_t alignEndSize = size - remainder; + const AZ::u8* encodeBuf = in; + size_t encodeIndex = 0; + for (; encodeIndex < alignEndSize; encodeIndex += 3) { - size_t strSize = inout.size(); - - for (size_t i = 0; i < strSize; ++i) - { - char character = inout[i]; - - // defaults to 1 if it hits any cases except default - size_t jumpChar = 1; - switch (character) - { - case '"': - inout.insert(i, "\\"); - break; - - case '\\': - inout.insert(i, "\\"); - break; - - case '/': - inout.insert(i, "\\"); - break; - - case '\b': - inout.replace(i, i + 1, "\\b"); - break; - - case '\f': - inout.replace(i, i + 1, "\\f"); - break; - - case '\n': - inout.replace(i, i + 1, "\\n"); - break; - - case '\r': - inout.replace(i, i + 1, "\\r"); - break; - - case '\t': - inout.replace(i, i + 1, "\\t"); - break; - - default: - /* - Control characters U+0000 to U+001F may be represented as a six - character sequence : a reverse solidus, - followed by the lowercase letter u, followed by four hexadecimal digits that encode the code point. - */ - if (character >= '\x0000' && character <= '\x001f') - { - // jumping "\uXXXX" characters - jumpChar = 6; - - AZStd::string hexStr = AZStd::string::format("\\u%04x", static_cast(character)); - inout.replace(i, i + 1, hexStr); - } - else - { - jumpChar = 0; - } - } - - i += jumpChar; - strSize += jumpChar; - } - - return inout; - } - } // namespace Json - - namespace Base64 - { - static const char base64pad = '='; - - static const char c_base64Table[] = - { - "ABCDEFGHIJKLMNOPQRSTUVWXYZ" - "abcdefghijklmnopqrstuvwxyz" - "0123456789+/" - }; - - static const AZ::u8 c_inverseBase64Table[] = - { - 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, - 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, - 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x3e, 0xff, 0xff, 0xff, 0x3f, - 0x34, 0x35, 0x36, 0x37, 0x38, 0x39, 0x3a, 0x3b, 0x3c, 0x3d, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, - 0xff, 0x00, 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, 0x08, 0x09, 0x0a, 0x0b, 0x0c, 0x0d, 0x0e, - 0x0f, 0x10, 0x11, 0x12, 0x13, 0x14, 0x15, 0x16, 0x17, 0x18, 0x19, 0xff, 0xff, 0xff, 0xff, 0xff, - 0xff, 0x1a, 0x1b, 0x1c, 0x1d, 0x1e, 0x1f, 0x20, 0x21, 0x22, 0x23, 0x24, 0x25, 0x26, 0x27, 0x28, - 0x29, 0x2a, 0x2b, 0x2c, 0x2d, 0x2e, 0x2f, 0x30, 0x31, 0x32, 0x33, 0xff, 0xff, 0xff, 0xff, 0xff, - 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, - 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, - 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, - 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, - 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, - 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, - 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, - 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff - }; - - bool IsValidEncodedChar(const char encodedChar) - { - return c_inverseBase64Table[static_cast(encodedChar)] != 0xff; - } - - AZStd::string Encode(const AZ::u8* in, const size_t size) - { - /* - figure retrieved from the Base encoding rfc https://tools.ietf.org/html/rfc4648 - +--first octet--+-second octet--+--third octet--+ - |7 6 5 4 3 2 1 0|7 6 5 4 3 2 1 0|7 6 5 4 3 2 1 0| - +-----------+---+-------+-------+---+-----------+ - |5 4 3 2 1 0|5 4 3 2 1 0|5 4 3 2 1 0|5 4 3 2 1 0| - +--1.index--+--2.index--+--3.index--+--4.index--+ - */ - AZStd::string result; - - const size_t remainder = size % 3; - const size_t alignEndSize = size - remainder; - const AZ::u8* encodeBuf = in; - size_t encodeIndex = 0; - for (; encodeIndex < alignEndSize; encodeIndex += 3) - { - encodeBuf = &in[encodeIndex]; - - result.push_back(c_base64Table[(encodeBuf[0] & 0xfc) >> 2]); - result.push_back(c_base64Table[((encodeBuf[0] & 0x03) << 4) | ((encodeBuf[1] & 0xf0) >> 4)]); - result.push_back(c_base64Table[((encodeBuf[1] & 0x0f) << 2) | ((encodeBuf[2] & 0xc0) >> 6)]); - result.push_back(c_base64Table[encodeBuf[2] & 0x3f]); - } - encodeBuf = &in[encodeIndex]; - if (remainder == 2) - { - result.push_back(c_base64Table[(encodeBuf[0] & 0xfc) >> 2]); - result.push_back(c_base64Table[((encodeBuf[0] & 0x03) << 4) | ((encodeBuf[1] & 0xf0) >> 4)]); - result.push_back(c_base64Table[((encodeBuf[1] & 0x0f) << 2)]); - result.push_back(base64pad); - } - else if (remainder == 1) - { - result.push_back(c_base64Table[(encodeBuf[0] & 0xfc) >> 2]); - result.push_back(c_base64Table[(encodeBuf[0] & 0x03) << 4]); - result.push_back(base64pad); - result.push_back(base64pad); - } - return result; + result.push_back(c_base64Table[(encodeBuf[0] & 0xfc) >> 2]); + result.push_back(c_base64Table[((encodeBuf[0] & 0x03) << 4) | ((encodeBuf[1] & 0xf0) >> 4)]); + result.push_back(c_base64Table[((encodeBuf[1] & 0x0f) << 2) | ((encodeBuf[2] & 0xc0) >> 6)]); + result.push_back(c_base64Table[encodeBuf[2] & 0x3f]); } - bool Decode(AZStd::vector& out, const char* in, const size_t size) + encodeBuf = &in[encodeIndex]; + if (remainder == 2) { - if (size % 4 != 0) - { - AZ_Warning("StringFunc", size % 4 == 0, "Base 64 encoded data length must be multiple of 4"); - return false; - } - - AZStd::vector result; - result.reserve(size * 3 / 4); - const char* decodeBuf = in; - size_t decodeIndex = 0; - for (; decodeIndex < size; decodeIndex += 4) - { - decodeBuf = &in[decodeIndex]; - //Check if each character is a valid Base64 encoded character - { - // First Octet - if (!IsValidEncodedChar(decodeBuf[0])) - { - AZ_Warning("StringFunc", false, "Invalid Base64 encoded text at offset %tu", AZStd::distance(in, &decodeBuf[0])); - return false; - } - if (!IsValidEncodedChar(decodeBuf[1])) - { - AZ_Warning("StringFunc", false, "Invalid Base64 encoded text at offset %tu", AZStd::distance(in, &decodeBuf[1])); - return false; - } - - result.push_back((c_inverseBase64Table[static_cast(decodeBuf[0])] << 2) | ((c_inverseBase64Table[static_cast(decodeBuf[1])] & 0x30) >> 4)); - } - - { - // Second Octet - if (decodeBuf[2] == base64pad) - { - break; - } - - if (!IsValidEncodedChar(decodeBuf[2])) - { - AZ_Warning("StringFunc", false, "Invalid Base64 encoded text at offset %tu", AZStd::distance(in, &decodeBuf[2])); - return false; - } - - result.push_back(((c_inverseBase64Table[static_cast(decodeBuf[1])] & 0x0f) << 4) | ((c_inverseBase64Table[static_cast(decodeBuf[2])] & 0x3c) >> 2)); - } - - { - // Third Octet - if (decodeBuf[3] == base64pad) - { - break; - } - - if (!IsValidEncodedChar(decodeBuf[3])) - { - AZ_Warning("StringFunc", false, "Invalid Base64 encoded text at offset %tu", AZStd::distance(in, &decodeBuf[3])); - return false; - } - - result.push_back(((c_inverseBase64Table[static_cast(decodeBuf[2])] & 0x03) << 6) | (c_inverseBase64Table[static_cast(decodeBuf[3])] & 0x3f)); - } - } - - out = AZStd::move(result); - return true; + result.push_back(c_base64Table[(encodeBuf[0] & 0xfc) >> 2]); + result.push_back(c_base64Table[((encodeBuf[0] & 0x03) << 4) | ((encodeBuf[1] & 0xf0) >> 4)]); + result.push_back(c_base64Table[((encodeBuf[1] & 0x0f) << 2)]); + result.push_back(base64pad); } + else if (remainder == 1) + { + result.push_back(c_base64Table[(encodeBuf[0] & 0xfc) >> 2]); + result.push_back(c_base64Table[(encodeBuf[0] & 0x03) << 4]); + result.push_back(base64pad); + result.push_back(base64pad); + } + + return result; } - namespace Utf8 + bool Decode(AZStd::vector& out, const char* in, const size_t size) { - bool CheckNonAsciiChar(const AZStd::string& in) + if (size % 4 != 0) { - for (int i = 0; i < in.length(); ++i) - { - char byte = in[i]; - if (byte & 0x80) - { - return true; - } - } + AZ_Warning("StringFunc", size % 4 == 0, "Base 64 encoded data length must be multiple of 4"); return false; } + + AZStd::vector result; + result.reserve(size * 3 / 4); + const char* decodeBuf = in; + size_t decodeIndex = 0; + for (; decodeIndex < size; decodeIndex += 4) + { + decodeBuf = &in[decodeIndex]; + //Check if each character is a valid Base64 encoded character + { + // First Octet + if (!IsValidEncodedChar(decodeBuf[0])) + { + AZ_Warning("StringFunc", false, "Invalid Base64 encoded text at offset %tu", AZStd::distance(in, &decodeBuf[0])); + return false; + } + if (!IsValidEncodedChar(decodeBuf[1])) + { + AZ_Warning("StringFunc", false, "Invalid Base64 encoded text at offset %tu", AZStd::distance(in, &decodeBuf[1])); + return false; + } + + result.push_back((c_inverseBase64Table[static_cast(decodeBuf[0])] << 2) | ((c_inverseBase64Table[static_cast(decodeBuf[1])] & 0x30) >> 4)); + } + + { + // Second Octet + if (decodeBuf[2] == base64pad) + { + break; + } + + if (!IsValidEncodedChar(decodeBuf[2])) + { + AZ_Warning("StringFunc", false, "Invalid Base64 encoded text at offset %tu", AZStd::distance(in, &decodeBuf[2])); + return false; + } + + result.push_back(((c_inverseBase64Table[static_cast(decodeBuf[1])] & 0x0f) << 4) | ((c_inverseBase64Table[static_cast(decodeBuf[2])] & 0x3c) >> 2)); + } + + { + // Third Octet + if (decodeBuf[3] == base64pad) + { + break; + } + + if (!IsValidEncodedChar(decodeBuf[3])) + { + AZ_Warning("StringFunc", false, "Invalid Base64 encoded text at offset %tu", AZStd::distance(in, &decodeBuf[3])); + return false; + } + + result.push_back(((c_inverseBase64Table[static_cast(decodeBuf[2])] & 0x03) << 6) | (c_inverseBase64Table[static_cast(decodeBuf[3])] & 0x3f)); + } + } + + out = AZStd::move(result); + return true; } - } // namespace StringFunc -} // namespace AZ + } + + namespace Utf8 + { + bool CheckNonAsciiChar(const AZStd::string& in) + { + for (int i = 0; i < in.length(); ++i) + { + char byte = in[i]; + if (byte & 0x80) + { + return true; + } + } + return false; + } + } +} // namespace AZ::StringFunc diff --git a/Code/Framework/AzCore/AzCore/StringFunc/StringFunc.h b/Code/Framework/AzCore/AzCore/StringFunc/StringFunc.h index 1e651afc93..55236a0fff 100644 --- a/Code/Framework/AzCore/AzCore/StringFunc/StringFunc.h +++ b/Code/Framework/AzCore/AzCore/StringFunc/StringFunc.h @@ -485,10 +485,11 @@ namespace AZ //! CalculateBranchToken /*! Calculate the branch token that is used for asset processor connection negotiations * - * \param appRootPath - The absolute path of the app root to base the token calculation on + * \param engineRootPath - The absolute path to the engine root to base the token calculation on * \param token - The result of the branch token calculation */ - void CalculateBranchToken(const AZStd::string& appRootPath, AZStd::string& token); + void CalculateBranchToken(AZStd::string_view engineRootPath, AZStd::string& token); + void CalculateBranchToken(AZStd::string_view engineRootPath, AZ::IO::FixedMaxPathString& token); } ////////////////////////////////////////////////////////////////////////// diff --git a/Code/Framework/AzCore/AzCore/Task/TaskExecutor.cpp b/Code/Framework/AzCore/AzCore/Task/TaskExecutor.cpp index 4097348798..08cfb11d34 100644 --- a/Code/Framework/AzCore/AzCore/Task/TaskExecutor.cpp +++ b/Code/Framework/AzCore/AzCore/Task/TaskExecutor.cpp @@ -363,7 +363,11 @@ namespace AZ { ++m_graphsRemaining; - event->m_executor = this; // Used to validate event is not waited for inside a job + if (event) + { + event->IncWaitCount(); + event->m_executor = this; // Used to validate event is not waited for inside a job + } // Submit all tasks that have no inbound edges for (Internal::Task& task : graph.Tasks()) diff --git a/Code/Framework/AzCore/AzCore/Task/TaskGraph.cpp b/Code/Framework/AzCore/AzCore/Task/TaskGraph.cpp index f57b06890a..eeb46d6887 100644 --- a/Code/Framework/AzCore/AzCore/Task/TaskGraph.cpp +++ b/Code/Framework/AzCore/AzCore/Task/TaskGraph.cpp @@ -20,6 +20,46 @@ namespace AZ m_semaphore.acquire(); } + void TaskGraphEvent::IncWaitCount() + { + // guess zero to optimize for single task graph using an event, if multiple are using it then this will take 2+ comp_exch calls + int expectedValue = 0; + while(!m_waitCount.compare_exchange_weak(expectedValue, expectedValue + 1)) + { + // value will be negative once event is ready to signal or has been signaled. Shouldn't happen. + AZ_Assert(expectedValue >= 0, "Called TaskGraphEvent::IncWaitCount on a signalled event"); + if (expectedValue < 0) // event already signaled, skip + { + return; + } + }; + } + + void TaskGraphEvent::Signal() + { + // guess one to optimize for single task graph using an event, if multiple are using it then this will take 2+ comp_exch calls + int expectedValue = 1; + while(!m_waitCount.compare_exchange_weak(expectedValue, expectedValue - 1)) + { + // It's an error for Signal to be called if no one is waiting, or the event has already been signaled + AZ_Assert(expectedValue > 0, "Called TaskGraphEvent::Signal when event is either signaled or unused"); + if (expectedValue < 0) // return if already signaled + { + return; + } + }; + + if (expectedValue == 1) // This call to Signal decremented the value to 0. + { + expectedValue = 0; + // validate no one incremented the wait count and mark signalling state + if (m_waitCount.compare_exchange_strong(expectedValue, -1)) + { + m_semaphore.release(); + } + } + } + void TaskToken::PrecedesInternal(TaskToken& comesAfter) { AZ_Assert(!m_parent.m_submitted, "Cannot mutate a TaskGraph that was previously submitted."); diff --git a/Code/Framework/AzCore/AzCore/Task/TaskGraph.h b/Code/Framework/AzCore/AzCore/Task/TaskGraph.h index 9553013a4b..ffe3ea6caf 100644 --- a/Code/Framework/AzCore/AzCore/Task/TaskGraph.h +++ b/Code/Framework/AzCore/AzCore/Task/TaskGraph.h @@ -16,6 +16,7 @@ #include #include #include +#include namespace AZ { @@ -61,14 +62,14 @@ namespace AZ uint32_t m_index; }; - // A TaskGraphEvent may be used to block until a task graph has finished executing. Usage + // A TaskGraphEvent may be used to block until one or more task graphs has finished executing. Usage // is NOT recommended for the majority of tasks (prefer to simply containing expanding/contracting // the graph without synchronization over the course of the frame). However, the event // is useful for the edges of the computation graph. // // You are responsible for ensuring the event object lifetime exceeds the task graph lifetime. // - // After the TaskGraphEvent is signaled, you are allowed to reuse the same TaskGraphEvent + // After the TaskGraphEvent is signaled, you are NOT allowed to reuse the same TaskGraphEvent // for a future submission. class TaskGraphEvent { @@ -81,10 +82,12 @@ namespace AZ friend class TaskGraph; friend class TaskExecutor; + void IncWaitCount(); void Signal(); AZStd::binary_semaphore m_semaphore; - TaskExecutor* m_executor = nullptr; + AZStd::atomic_int m_waitCount = 0; + TaskExecutor* m_executor = nullptr; }; // The TaskGraph encapsulates a set of tasks and their interdependencies. After adding diff --git a/Code/Framework/AzCore/AzCore/Task/TaskGraph.inl b/Code/Framework/AzCore/AzCore/Task/TaskGraph.inl index 7b2f0cefdc..9a5289eb82 100644 --- a/Code/Framework/AzCore/AzCore/Task/TaskGraph.inl +++ b/Code/Framework/AzCore/AzCore/Task/TaskGraph.inl @@ -33,11 +33,6 @@ namespace AZ return m_semaphore.try_acquire_for(AZStd::chrono::milliseconds{ 0 }); } - inline void TaskGraphEvent::Signal() - { - m_semaphore.release(); - } - template TaskToken TaskGraph::AddTask(TaskDescriptor const& desc, Lambda&& lambda) { diff --git a/Code/Framework/AzCore/AzCore/Task/TaskGraphSystemComponent.cpp b/Code/Framework/AzCore/AzCore/Task/TaskGraphSystemComponent.cpp index 56b56e96a1..1cacef7ff3 100644 --- a/Code/Framework/AzCore/AzCore/Task/TaskGraphSystemComponent.cpp +++ b/Code/Framework/AzCore/AzCore/Task/TaskGraphSystemComponent.cpp @@ -30,8 +30,13 @@ namespace AZ if (Interface::Get() == nullptr) { + #if (AZ_TRAIT_THREAD_NUM_TASK_GRAPH_WORKER_THREADS) + const uint32_t numberOfWorkerThreads = AZ_TRAIT_THREAD_NUM_TASK_GRAPH_WORKER_THREADS; + #else + const uint32_t numberOfWorkerThreads = Threading::CalcNumWorkerThreads(cl_taskGraphThreadsConcurrencyRatio, cl_taskGraphThreadsMinNumber, cl_taskGraphThreadsNumReserved); + #endif // (AZ_TRAIT_THREAD_NUM_TASK_GRAPH_WORKER_THREADS) Interface::Register(this); // small window that another thread can try to use taskgraph between this line and the set instance. - m_taskExecutor = aznew TaskExecutor(Threading::CalcNumWorkerThreads(cl_taskGraphThreadsConcurrencyRatio, cl_taskGraphThreadsMinNumber, cl_taskGraphThreadsNumReserved)); + m_taskExecutor = aznew TaskExecutor(numberOfWorkerThreads); TaskExecutor::SetInstance(m_taskExecutor); } } diff --git a/Code/Framework/AzCore/AzCore/Time/ITime.h b/Code/Framework/AzCore/AzCore/Time/ITime.h index a97ba2319a..a61b629f35 100644 --- a/Code/Framework/AzCore/AzCore/Time/ITime.h +++ b/Code/Framework/AzCore/AzCore/Time/ITime.h @@ -12,8 +12,8 @@ #include #include #include -#include #include +#include namespace AZ { @@ -24,15 +24,21 @@ namespace AZ //! Using int64_t as the underlying type, this is good to represent approximately 292,471 years AZ_TYPE_SAFE_INTEGRAL(TimeUs, int64_t); + namespace Time + { + static const AZ::TimeMs ZeroTimeMs = AZ::TimeMs{ 0 }; + static const AZ::TimeUs ZeroTimeUs = AZ::TimeUs{ 0 }; + } + //! @class ITime //! @brief This is an AZ::Interface<> for managing time related operations. //! AZ::ITime and associated types may not operate in realtime. These abstractions are to allow our application //! simulation to operate both slower and faster than realtime in a well defined and user controllable manner - //! The rate at which time passes for AZ::ITime is controlled by the cvar t_scale - //! t_scale == 0 means simulation time should halt - //! 0 < t_scale < 1 will cause time to pass slower than realtime, with t_scale 0.1 being roughly 1/10th realtime - //! t_scale == 1 will cause time to pass at roughly realtime - //! t_scale > 1 will cause time to pass faster than normal, with t_scale 10 being roughly 10x realtime + //! The rate at which time passes for AZ::ITime is controlled by the cvar t_simulationTickScale + //! t_simulationTickScale == 0 means simulation time should halt + //! 0 < t_simulationTickScale < 1 will cause time to pass slower than realtime, with t_simulationTickScale 0.1 being roughly 1/10th realtime + //! t_simulationTickScale == 1 will cause time to pass at roughly realtime + //! t_simulationTickScale > 1 will cause time to pass faster than normal, with t_simulationTickScale 10 being roughly 10x realtime class ITime { public: @@ -41,15 +47,72 @@ namespace AZ ITime() = default; virtual ~ITime() = default; - //! Returns the number of milliseconds since application start. - //! @return the number of milliseconds that have elapsed since application start + //! Returns the number of milliseconds since application start scaled by t_simulationTickScale. + //! @return The number of milliseconds that have elapsed since application start. virtual TimeMs GetElapsedTimeMs() const = 0; - //! Returns the number of microseconds since application start. + //! Returns the number of microseconds since application start scaled by t_simulationTickScale. //! @return the number of microseconds that have elapsed since application start virtual TimeUs GetElapsedTimeUs() const = 0; + + //! Returns the number of milliseconds since application start. + //! This value is not affected by the t_simulationTickScale cvar. + //! @return The number of milliseconds that have elapsed since application start. + virtual TimeMs GetRealElapsedTimeMs() const = 0; + + //! Returns the number of microseconds since application start. + //! This value is not affected by the t_simulationTickScale cvar. + //! @return The number of microseconds that have elapsed since application start. + virtual TimeUs GetRealElapsedTimeUs() const = 0; + + //! Returns the current simulation tick delta time. + //! This is affected by the cvars t_simulationTickScale, t_simulationTickDeltaOverride, and t_maxGameTickDelta. + //! @return The number of microseconds elapsed since the last game tick. + virtual TimeUs GetSimulationTickDeltaTimeUs() const = 0; + + //! Returns the non-manipulated tick time. + //! @return The number of microseconds elapsed since the last game tick. + virtual TimeUs GetRealTickDeltaTimeUs() const = 0; + + //! Returns the time since application start of when the last simulation tick was updated. + virtual TimeUs GetLastSimulationTickTime() const = 0; + + //! If > 0 this will override the simulation tick delta time with the provided value. + //! When enabled this will ignore any set simulation tick scale. + //! Setting to 0 disables the override. + //! @param timeMs The time in milliseconds to use for the tick delta. + virtual void SetSimulationTickDeltaOverride(TimeMs timeMs) = 0; + + //! Returns the current simulation tick override. + //! 0 means disabled. + //! @returns The current simulation tick override in milliseconds. + virtual TimeMs GetSimulationTickDeltaOverride() const = 0; + + //! A scalar amount to adjust the passage of time by, 1.0 == realtime, 0.5 == half realtime, 2.0 == doubletime. + //! @param scale The scalar value to apply to the simulation time. + virtual void SetSimulationTickScale(float scale) = 0; + + //! Returns the current simulation tick scale. + //! 1.0 == realtime, 0.5 == half realtime, 2.0 == doubletime. + //! @returns The simulation tick scale value. + virtual float GetSimulationTickScale() const = 0; + + //! The minimum rate to force the simulation tick to run. + //! 0 for as fast as possible. 30 = ~33ms, 60 = ~16ms. + //! Setting to 0 will disable rate limiting. + //! @note It is not guaranteed to hit the requested tick rate exactly. + //! @param rate The rate in frames per second. + virtual void SetSimulationTickRate(int rate) = 0; + + //! Return the current simulation tick rate. + //! 0 means disabled. + //! @return The rate in frames per second. + virtual int32_t GetSimulationTickRate() const = 0; AZ_DISABLE_COPY_MOVE(ITime); + + static const AZ::TimeMs ZeroTimeMs = AZ::TimeMs{ 0 }; + static const AZ::TimeUs ZeroTimeUs = AZ::TimeUs{ 0 }; }; // EBus wrapper for ScriptCanvas @@ -74,6 +137,36 @@ namespace AZ return AZ::Interface::Get()->GetElapsedTimeUs(); } + //! This is a simple convenience wrapper + inline TimeMs GetRealElapsedTimeMs() + { + return AZ::Interface::Get()->GetRealElapsedTimeMs(); + } + + //! This is a simple convenience wrapper + inline TimeUs GetRealElapsedTimeUs() + { + return AZ::Interface::Get()->GetRealElapsedTimeUs(); + } + + //! This is a simple convenience wrapper + inline TimeUs GetSimulationTickDeltaTimeUs() + { + return AZ::Interface::Get()->GetSimulationTickDeltaTimeUs(); + } + + //! This is a simple convenience wrapper + inline TimeUs GetRealTickDeltaTimeUs() + { + return AZ::Interface::Get()->GetRealTickDeltaTimeUs(); + } + + //! This is a simple convenience wrapper + inline TimeUs GetLastSimulationTickTime() + { + return AZ::Interface::Get()->GetLastSimulationTickTime(); + } + //! Converts from milliseconds to microseconds inline TimeUs TimeMsToUs(TimeMs value) { @@ -92,12 +185,24 @@ namespace AZ return static_cast(value) / 1000.0f; } + //! Converts from milliseconds to seconds + inline double TimeMsToSecondsDouble(TimeMs value) + { + return static_cast(value) / 1000.0; + } + //! Converts from microseconds to seconds inline float TimeUsToSeconds(TimeUs value) { return static_cast(value) / 1000000.0f; } + //! Converts from microseconds to seconds + inline double TimeUsToSecondsDouble(TimeUs value) + { + return static_cast(value) / 1000000.0; + } + //! Converts from milliseconds to AZStd::chrono::time_point inline auto TimeMsToChrono(TimeMs value) { @@ -113,6 +218,20 @@ namespace AZ auto chronoValue = AZStd::chrono::microseconds(aznumeric_cast(value)); return epoch + chronoValue; } + + //! A utility function to convert from seconds to TimeMs + inline TimeMs SecondsToTimeMs(const double value) + { + const double valueMs = value * 1000.0; + return static_cast(static_cast(valueMs)); + } + + //! A utility function to convert from seconds to TimeUs + inline TimeUs SecondsToTimeUs(const double value) + { + const double valueMs = value * 1000000.0; + return static_cast(static_cast(valueMs)); + } } // namespace AZ AZ_TYPE_SAFE_INTEGRAL_SERIALIZEBINDING(AZ::TimeMs); diff --git a/Code/Framework/AzCore/AzCore/Time/TimeSystem.cpp b/Code/Framework/AzCore/AzCore/Time/TimeSystem.cpp new file mode 100644 index 0000000000..7ba306fbe6 --- /dev/null +++ b/Code/Framework/AzCore/AzCore/Time/TimeSystem.cpp @@ -0,0 +1,218 @@ +/* + * Copyright (c) Contributors to the Open 3D Engine Project. + * For complete copyright and license terms please see the LICENSE at the root of this distribution. + * + * SPDX-License-Identifier: Apache-2.0 OR MIT + * + */ + +#include +#include +#include +#include + +namespace AZ +{ + namespace + { + void cvar_t_simulationTickScale_Changed(const float& value) + { + if (auto* timeSystem = AZ::Interface::Get()) + { + timeSystem->SetSimulationTickScale(value); + } + } + + void cvar_t_simulationTickDeltaOverride_Changed(const int64_t& value) + { + if (auto* timeSystem = AZ::Interface::Get()) + { + timeSystem->SetSimulationTickDeltaOverride(static_cast(value)); + } + } + + void cvar_t_simulationTickRate_Changed(const int& rate) + { + AZ_Warning("tick", false, "Simulation tick rate limiting is currently disabled. Setting will not be applied."); + if (auto* timeSystem = AZ::Interface::Get()) + { + timeSystem->SetSimulationTickRate(rate); + } + } + } // namespace + + AZ_CVAR(float, t_simulationTickScale, 1.0f, cvar_t_simulationTickScale_Changed, AZ::ConsoleFunctorFlags::Null, + "A scalar amount to adjust time passage by, 1.0 == realtime, 0.5 == half realtime, 2.0 == doubletime"); + + AZ_CVAR(int64_t, t_simulationTickDeltaOverride, 0, cvar_t_simulationTickDeltaOverride_Changed, AZ::ConsoleFunctorFlags::Null, + "If > 0, overrides the simulation tick delta time with the provided value (Milliseconds) and ignores any t_simulationTickScale value."); + + AZ_CVAR(int, t_simulationTickRate, 0, cvar_t_simulationTickRate_Changed, AZ::ConsoleFunctorFlags::Null, + "The minimum rate to force the game simulation tick to run. 0 for as fast as possible. 30 = ~33ms, 60 = ~16ms"); + + void TimeSystem::Reflect(AZ::ReflectContext* context) + { + if (AZ::SerializeContext* serializeContext = azrtti_cast(context)) + { + serializeContext->Class() + ->Version(1); + } + } + + TimeSystem::TimeSystem() + { + m_lastInvokedTimeUs = static_cast(AZStd::GetTimeNowMicroSecond()); + m_realLastInvokedTimeUs = static_cast(AZStd::GetTimeNowMicroSecond()); + AZ::Interface::Register(this); + ITimeRequestBus::Handler::BusConnect(); + } + + TimeSystem::~TimeSystem() + { + AZ::Interface::Unregister(this); + ITimeRequestBus::Handler::BusDisconnect(); + } + + TimeMs TimeSystem::GetElapsedTimeMs() const + { + return AZ::TimeUsToMs(GetElapsedTimeUs()); + } + + TimeUs TimeSystem::GetElapsedTimeUs() const + { + TimeUs currentTime = static_cast(AZStd::GetTimeNowMicroSecond()); + TimeUs deltaTime = currentTime - m_lastInvokedTimeUs; + + if (t_simulationTickScale != 1.0f) + { + const float floatDelta = AZStd::GetMax(static_cast(deltaTime) * t_simulationTickScale, 1.0f); + deltaTime = static_cast(static_cast(floatDelta)); + } + + m_accumulatedTimeUs += deltaTime; + m_lastInvokedTimeUs = currentTime; + + return m_accumulatedTimeUs; + } + + TimeMs TimeSystem::GetRealElapsedTimeMs() const + { + return AZ::TimeUsToMs(GetRealElapsedTimeUs()); + } + + TimeUs TimeSystem::GetRealElapsedTimeUs() const + { + const TimeUs currentTime = static_cast(AZStd::GetTimeNowMicroSecond()); + m_realAccumulatedTimeUs += currentTime - m_realLastInvokedTimeUs; + m_realLastInvokedTimeUs = currentTime; + + return m_realAccumulatedTimeUs; + } + + TimeUs TimeSystem::GetSimulationTickDeltaTimeUs() const + { + return m_simulationTickDeltaTimeUs; + } + + TimeUs TimeSystem::GetRealTickDeltaTimeUs() const + { + return m_realTickDeltaTimeUs; + } + + TimeUs TimeSystem::GetLastSimulationTickTime() const + { + return m_lastSimulationTickTimeUs; + } + + TimeUs TimeSystem::AdvanceTickDeltaTimes() + { + const TimeUs currentTimeUs = static_cast(AZStd::GetTimeNowMicroSecond()); + + //real time + m_realTickDeltaTimeUs = currentTimeUs - m_lastSimulationTickTimeUs; + + //game time + if (m_simulationTickDeltaOverride > AZ::Time::ZeroTimeUs) + { + m_simulationTickDeltaTimeUs = m_simulationTickDeltaOverride; + m_lastSimulationTickTimeUs = currentTimeUs; + return m_simulationTickDeltaTimeUs; + } + + m_simulationTickDeltaTimeUs = currentTimeUs - m_lastSimulationTickTimeUs; + + if (!AZ::IsClose(t_simulationTickScale, 1.0f)) + { + const double floatDelta = AZStd::GetMax(static_cast(m_simulationTickDeltaTimeUs) * static_cast(t_simulationTickScale), 1.0); + m_simulationTickDeltaTimeUs = static_cast(static_cast(floatDelta)); + } + m_lastSimulationTickTimeUs = currentTimeUs; + + return m_simulationTickDeltaTimeUs; + } + + void TimeSystem::ApplyTickRateLimiterIfNeeded() + { + // Currently disabling the Tick rate limiter as there are some reported issues when using it. + #ifdef ENABLE_TICK_RATE_LIMITER + // If tick rate limiting is on, ensure (1 / t_simulationTickRate) ms has elapsed since the last frame, + // sleeping if there's still time remaining. + if (t_simulationTickRate > 0) + { + const TimeUs currentTimeUs = AZ::GetRealElapsedTimeUs(); + const TimeUs timeUntilNextTick = (m_lastSimulationTickTimeUs + m_simulationTickLimitTimeUs) - currentTimeUs; + if (timeUntilNextTick > AZ::Time::ZeroTimeUs) + { + AZ_TracePrintf("tick", "Sleeping for %.2f", AZ::TimeUsToSecondsDouble(timeUntilNextTick)); + AZStd::this_thread::sleep_for(AZStd::chrono::microseconds(static_cast(timeUntilNextTick))); + } + } + #endif // #ifdef ENABLE_TICK_RATE_LIMITER + } + + void TimeSystem::SetSimulationTickDeltaOverride(TimeMs timeMs) + { + const TimeUs timeUs = AZ::TimeMsToUs(timeMs); + if (timeUs != m_simulationTickDeltaOverride) + { + m_simulationTickDeltaOverride = timeUs; + t_simulationTickDeltaOverride = static_cast (timeMs); // update the cvar + } + } + + TimeMs TimeSystem::GetSimulationTickDeltaOverride() const + { + return AZ::TimeUsToMs(m_simulationTickDeltaOverride); + } + + void TimeSystem::SetSimulationTickScale(float scale) + { + if (!AZ::IsClose(scale, t_simulationTickScale)) + { + t_simulationTickScale = scale; + } + } + + float TimeSystem::GetSimulationTickScale() const + { + return t_simulationTickScale; + } + + void TimeSystem::SetSimulationTickRate(int rate) + { + m_simulationTickLimitRate = AZStd::abs(rate); + if (m_simulationTickLimitRate != 0) + { + m_simulationTickLimitTimeUs = AZ::SecondsToTimeUs(1.0f / m_simulationTickLimitRate); + } + else + { + m_simulationTickLimitTimeUs = AZ::Time::ZeroTimeUs; + } + } + + int32_t TimeSystem::GetSimulationTickRate() const + { + return m_simulationTickLimitRate; + } +} // namespace AZ diff --git a/Code/Framework/AzCore/AzCore/Time/TimeSystem.h b/Code/Framework/AzCore/AzCore/Time/TimeSystem.h new file mode 100644 index 0000000000..9d5f2a6d7c --- /dev/null +++ b/Code/Framework/AzCore/AzCore/Time/TimeSystem.h @@ -0,0 +1,91 @@ +/* + * Copyright (c) Contributors to the Open 3D Engine Project. + * For complete copyright and license terms please see the LICENSE at the root of this distribution. + * + * SPDX-License-Identifier: Apache-2.0 OR MIT + * + */ + +#pragma once + +#include +#include + +namespace AZ +{ + class ReflectContext; + + //! Implementation of the ITime system interface. + class TimeSystem + : public ITimeRequestBus::Handler + { + public: + AZ_RTTI(AZ::TimeSystem, "{CE1C5E4F-7DC1-4248-B10C-AC55E8924A48}", AZ::ITime); + + static void Reflect(AZ::ReflectContext* context); + + TimeSystem(); + virtual ~TimeSystem(); + + //! ITime overrides. + //! @{ + TimeMs GetElapsedTimeMs() const override; + TimeUs GetElapsedTimeUs() const override; + TimeMs GetRealElapsedTimeMs() const override; + TimeUs GetRealElapsedTimeUs() const override; + TimeUs GetSimulationTickDeltaTimeUs() const override; + TimeUs GetRealTickDeltaTimeUs() const override; + TimeUs GetLastSimulationTickTime() const override; + void SetSimulationTickDeltaOverride(TimeMs timeMs) override; + TimeMs GetSimulationTickDeltaOverride() const override; + void SetSimulationTickScale(float scale) override; + float GetSimulationTickScale() const override; + void SetSimulationTickRate(int rate) override; + int32_t GetSimulationTickRate() const override; + //! @} + + //! Advances the Simulation and Real tick delta time counters. + //! This is called from the owner of the TimeSystem, ComponentApplication in Tick(). + //! @return The delta in microseconds from the last call to AdvanceTickDeltaTimes(). Value will be the same as GetSimulationTickDeltaTimeUs(). + TimeUs AdvanceTickDeltaTimes(); + + //! If t_simulationTickRate is >0 this will try to have the game delta time run at a maximum of the rate set. + //! This is called from the owner of the TimeSystem, ComponentApplication in Tick(). + //! example. If t_simulationTickRate is set to 60Fps, and the game tick delta is <17ms(60fps), this will add a sleep for the remaining time. + //! example. If t_simulationTickRate is set to 60Fps, and the game tick delta is >=17ms(60fps), this will not sleep at all. + //! @note It is not guaranteed to hit the requested tick rate exactly. + void ApplyTickRateLimiterIfNeeded(); + private: + //! Used to calculate the delta time between calls to GetElapsedTimeMs/TimeUs(). + //! Mutable to allow GetElapsedTimeMs/TimeUs() to be a const functions. + mutable TimeUs m_lastInvokedTimeUs = AZ::Time::ZeroTimeUs; + + //! Accumulates the delta time of GetElapsedTimeMs/TimeUs() calls. + //! Mutable to allow GetElapsedTimeMs/TimeUs() to be a const functions. + mutable TimeUs m_accumulatedTimeUs = AZ::Time::ZeroTimeUs; + + //! Used to calculate the delta time between calls to GetRealElapsedTimeMs/TimeUs(). + //! Mutable to allow GetRealElapsedTimeMs/TimeUs() to be a const functions. + mutable TimeUs m_realLastInvokedTimeUs = AZ::Time::ZeroTimeUs; + + //! Accumulates the delta time of GetRealElapsedTimeMs/TimeUs() calls. + //! Mutable to allow GetRealElapsedTimeMs/TimeUs() to be a const functions. + mutable TimeUs m_realAccumulatedTimeUs = AZ::Time::ZeroTimeUs; + + //! The current game tick delta time. + //! Can be affected by time system cvars. + //! Updated in AdvanceTickDeltaTimes(). + TimeUs m_simulationTickDeltaTimeUs = AZ::Time::ZeroTimeUs; + + //! The current real tick delta time. + //! Will not be affected by time system cvars. + //! Updated in AdvanceTickDeltaTimes(). + TimeUs m_realTickDeltaTimeUs = AZ::Time::ZeroTimeUs; + + TimeUs m_lastSimulationTickTimeUs = AZ::Time::ZeroTimeUs; //!< Used to determine the game tick delta time. + + TimeUs m_simulationTickDeltaOverride = AZ::Time::ZeroTimeUs; // -#include -#include - -namespace AZ -{ - AZ_CVAR(float, t_scale, 1.0f, nullptr, AZ::ConsoleFunctorFlags::Null, "A scalar amount to adjust time passage by, 1.0 == realtime, 0.5 == half realtime, 2.0 == doubletime"); - - void TimeSystemComponent::Reflect(AZ::ReflectContext* context) - { - if (AZ::SerializeContext* serializeContext = azrtti_cast(context)) - { - serializeContext->Class() - ->Version(1); - } - } - - void TimeSystemComponent::GetProvidedServices(AZ::ComponentDescriptor::DependencyArrayType& provided) - { - provided.push_back(AZ_CRC_CE("TimeService")); - } - - void TimeSystemComponent::GetIncompatibleServices(AZ::ComponentDescriptor::DependencyArrayType& incompatible) - { - incompatible.push_back(AZ_CRC_CE("TimeService")); - } - - TimeSystemComponent::TimeSystemComponent() - { - m_lastInvokedTimeUs = static_cast(AZStd::GetTimeNowMicroSecond()); - AZ::Interface::Register(this); - ITimeRequestBus::Handler::BusConnect(); - } - - TimeSystemComponent::~TimeSystemComponent() - { - ITimeRequestBus::Handler::BusDisconnect(); - AZ::Interface::Unregister(this); - } - - void TimeSystemComponent::Activate() - { - ; - } - - void TimeSystemComponent::Deactivate() - { - ; - } - - TimeMs TimeSystemComponent::GetElapsedTimeMs() const - { - return TimeUsToMs(GetElapsedTimeUs()); - } - - TimeUs TimeSystemComponent::GetElapsedTimeUs() const - { - TimeUs currentTime = static_cast(AZStd::GetTimeNowMicroSecond()); - TimeUs deltaTime = currentTime - m_lastInvokedTimeUs; - - if (t_scale != 1.0f) - { - float floatDelta = static_cast(deltaTime) * t_scale; - deltaTime = static_cast(static_cast(floatDelta)); - } - - m_accumulatedTimeUs += deltaTime; - m_lastInvokedTimeUs = currentTime; - - return m_accumulatedTimeUs; - } -} diff --git a/Code/Framework/AzCore/AzCore/Time/TimeSystemComponent.h b/Code/Framework/AzCore/AzCore/Time/TimeSystemComponent.h deleted file mode 100644 index 3ab3dbc234..0000000000 --- a/Code/Framework/AzCore/AzCore/Time/TimeSystemComponent.h +++ /dev/null @@ -1,50 +0,0 @@ -/* - * Copyright (c) Contributors to the Open 3D Engine Project. - * For complete copyright and license terms please see the LICENSE at the root of this distribution. - * - * SPDX-License-Identifier: Apache-2.0 OR MIT - * - */ - -#pragma once - -#include -#include -#include - -namespace AZ -{ - //! Implementation of the ITime system interface. - class TimeSystemComponent - : public AZ::Component - , public ITimeRequestBus::Handler - { - public: - - AZ_COMPONENT(TimeSystemComponent, "{CE1C5E4F-7DC1-4248-B10C-AC55E8924A48}"); - - static void Reflect(AZ::ReflectContext* context); - static void GetProvidedServices(AZ::ComponentDescriptor::DependencyArrayType& provided); - static void GetIncompatibleServices(AZ::ComponentDescriptor::DependencyArrayType& incompatible); - - TimeSystemComponent(); - virtual ~TimeSystemComponent(); - - //! AZ::Component overrides. - //! @{ - void Activate() override; - void Deactivate() override; - //! @} - - //! ITime overrides. - //! @{ - TimeMs GetElapsedTimeMs() const override; - TimeUs GetElapsedTimeUs() const override; - //! @} - - private: - - mutable TimeUs m_lastInvokedTimeUs = TimeUs{0}; - mutable TimeUs m_accumulatedTimeUs = TimeUs{0}; - }; -} diff --git a/Code/Framework/AzCore/AzCore/UnitTest/MockComponentApplication.h b/Code/Framework/AzCore/AzCore/UnitTest/MockComponentApplication.h index 8f069da9dd..190fa09cb7 100644 --- a/Code/Framework/AzCore/AzCore/UnitTest/MockComponentApplication.h +++ b/Code/Framework/AzCore/AzCore/UnitTest/MockComponentApplication.h @@ -41,7 +41,6 @@ namespace UnitTest MOCK_METHOD0(GetSerializeContext, AZ::SerializeContext* ()); MOCK_METHOD0(GetJsonRegistrationContext, AZ::JsonRegistrationContext* ()); MOCK_METHOD0(GetBehaviorContext, AZ::BehaviorContext* ()); - MOCK_CONST_METHOD0(GetAppRoot, const char* ()); MOCK_CONST_METHOD0(GetEngineRoot, const char* ()); MOCK_CONST_METHOD0(GetExecutableFolder, const char* ()); MOCK_CONST_METHOD1(QueryApplicationType, void(AZ::ApplicationTypeQuery&)); diff --git a/Code/Framework/AzCore/AzCore/UnitTest/Mocks/MockITime.h b/Code/Framework/AzCore/AzCore/UnitTest/Mocks/MockITime.h new file mode 100644 index 0000000000..3d31056e27 --- /dev/null +++ b/Code/Framework/AzCore/AzCore/UnitTest/Mocks/MockITime.h @@ -0,0 +1,119 @@ +/* + * Copyright (c) Contributors to the Open 3D Engine Project. + * For complete copyright and license terms please see the LICENSE at the root of this distribution. + * + * SPDX-License-Identifier: Apache-2.0 OR MIT + * + */ +#pragma once + +#include +#include + +namespace AZ +{ + class MockTimeSystem; + using NiceTimeSystemMock =::testing::NiceMock; + + //used if you wish to mock any of the Get time functions. + class MockTimeSystem + : public ITimeRequestBus::Handler + { + public: + MockTimeSystem() + { + AZ::Interface::Register(this); + ITimeRequestBus::Handler::BusConnect(); + } + virtual ~MockTimeSystem() + { + AZ::Interface::Unregister(this); + ITimeRequestBus::Handler::BusDisconnect(); + } + + MOCK_CONST_METHOD0(GetElapsedTimeMs, TimeMs()); + MOCK_CONST_METHOD0(GetElapsedTimeUs, TimeUs()); + MOCK_CONST_METHOD0(GetRealElapsedTimeMs, TimeMs()); + MOCK_CONST_METHOD0(GetRealElapsedTimeUs, TimeUs()); + MOCK_CONST_METHOD0(GetSimulationTickDeltaTimeUs, TimeUs()); + MOCK_CONST_METHOD0(GetRealTickDeltaTimeUs, TimeUs()); + MOCK_CONST_METHOD0(GetLastSimulationTickTime, TimeUs()); + MOCK_METHOD1(SetSimulationTickDeltaOverride, void(TimeMs)); + MOCK_CONST_METHOD0(GetSimulationTickDeltaOverride, TimeMs()); + MOCK_METHOD1(SetSimulationTickScale, void(float)); + MOCK_CONST_METHOD0(GetSimulationTickScale, float()); + MOCK_METHOD1(SetSimulationTickRate, void(int)); + MOCK_CONST_METHOD0(GetSimulationTickRate, int32_t()); + }; + + //used if you wish to override any of the Get time functions with specific functionality. + class StubTimeSystem + : public AZ::TimeSystem + { + public: + AZ_RTTI(AZ::StubTimeSystem, "{DD5D5A6A-345F-49FD-A61E-A40E63C49CFA}", AZ::TimeSystem); + + virtual AZ::TimeMs GetElapsedTimeMs() const override + { + return AZ::Time::ZeroTimeMs; + } + + virtual AZ::TimeUs GetElapsedTimeUs() const override + { + return AZ::Time::ZeroTimeUs; + } + + virtual AZ::TimeMs GetRealElapsedTimeMs() const override + { + return AZ::Time::ZeroTimeMs; + } + + virtual AZ::TimeUs GetRealElapsedTimeUs() const override + { + return AZ::Time::ZeroTimeUs; + } + + virtual AZ::TimeUs GetSimulationTickDeltaTimeUs() const override + { + return AZ::Time::ZeroTimeUs; + } + + virtual AZ::TimeUs GetRealTickDeltaTimeUs() const override + { + return AZ::Time::ZeroTimeUs; + } + + virtual AZ::TimeUs GetLastSimulationTickTime() const override + { + return AZ::Time::ZeroTimeUs; + } + + virtual void SetSimulationTickDeltaOverride([[maybe_unused]]TimeMs timeMs) override + { + } + + virtual TimeMs GetSimulationTickDeltaOverride() const override + { + return AZ::Time::ZeroTimeMs; + } + + virtual void SetSimulationTickScale([[maybe_unused]] float scale) override + { + } + + virtual float GetSimulationTickScale() const override + { + return 1.0f; + } + + virtual void SetSimulationTickRate([[maybe_unused]] int rate) override + { + } + + virtual int32_t GetSimulationTickRate() const override + { + return 0; + } + }; + +} // namespace AZ diff --git a/Code/Framework/AzCore/AzCore/UnitTest/TestTypes.h b/Code/Framework/AzCore/AzCore/UnitTest/TestTypes.h index e5dcb32d9d..afa6898944 100644 --- a/Code/Framework/AzCore/AzCore/UnitTest/TestTypes.h +++ b/Code/Framework/AzCore/AzCore/UnitTest/TestTypes.h @@ -13,8 +13,6 @@ #include #include -#include -#include #include #if defined(HAVE_BENCHMARK) @@ -39,7 +37,6 @@ namespace UnitTest */ class AllocatorsBase { - AZ::Debug::DrillerManager* m_drillerManager; bool m_ownsAllocator{}; public: @@ -47,8 +44,7 @@ namespace UnitTest void SetupAllocator(const AZ::SystemAllocator::Descriptor& allocatorDesc = {}) { - m_drillerManager = AZ::Debug::DrillerManager::Create(); - m_drillerManager->Register(aznew AZ::Debug::MemoryDriller); + AZ::AllocatorManager::Instance().EnterProfilingMode(); AZ::AllocatorManager::Instance().SetDefaultTrackingMode(AZ::Debug::AllocationRecords::RECORD_FULL); // Only create the SystemAllocator if it s not ready @@ -68,9 +64,9 @@ namespace UnitTest AZ::AllocatorInstance::Destroy(); } m_ownsAllocator = false; - AZ::Debug::DrillerManager::Destroy(m_drillerManager); AZ::AllocatorManager::Instance().SetDefaultTrackingMode(AZ::Debug::AllocationRecords::RECORD_NO_RECORDS); + AZ::AllocatorManager::Instance().ExitProfilingMode(); } }; @@ -93,8 +89,7 @@ namespace UnitTest * Helper class to handle the boiler plate of setting up a test fixture that uses the system allocators * If you wish to do additional setup and tear down be sure to call the base class SetUp first and TearDown * last. - * By default memory tracking through driller is enabled. - * Defaults to a heap size of 15 MB + * By default memory tracking is enabled. */ class AllocatorsTestFixture @@ -123,8 +118,7 @@ namespace UnitTest * Helper class to handle the boiler plate of setting up a benchmark fixture that uses the system allocators * If you wish to do additional setup and tear down be sure to call the base class SetUp first and TearDown * last. - * By default memory tracking through driller is disabled. - * Defaults to a heap size of 15 MB + * By default memory tracking is enabled. */ class AllocatorsBenchmarkFixture : public ::benchmark::Fixture diff --git a/Code/Framework/AzCore/AzCore/UnitTest/UnitTest.h b/Code/Framework/AzCore/AzCore/UnitTest/UnitTest.h index 5244493c78..1dae089d5c 100644 --- a/Code/Framework/AzCore/AzCore/UnitTest/UnitTest.h +++ b/Code/Framework/AzCore/AzCore/UnitTest/UnitTest.h @@ -60,6 +60,7 @@ namespace UnitTest m_isAssertTest = true; m_numAssertsFailed = 0; } + int StopAssertTests() { m_isAssertTest = false; @@ -68,7 +69,21 @@ namespace UnitTest return numAssertsFailed; } + void ResetSuppressionSettingsToDefault() + { + m_suppressErrors = true; + m_suppressWarnings = true; + m_suppressAsserts = true; + m_suppressOutput = true; + m_suppressPrintf = true; + } + bool m_isAssertTest; + bool m_suppressErrors = true; + bool m_suppressWarnings = true; + bool m_suppressAsserts = true; + bool m_suppressOutput = true; + bool m_suppressPrintf = true; int m_numAssertsFailed; }; @@ -114,7 +129,7 @@ namespace UnitTest // utility classes that you can derive from or contain, which suppress AZ_Asserts // and AZ_Errors to the below macros (processAssert, etc) - // If TraceBusHook or TraceBusRedirector have been started in your unit tests, + // If TraceBusHook or TraceBusRedirector have been started in your unit tests, // use AZ_TEST_START_TRACE_SUPPRESSION and AZ_TEST_STOP_TRACE_SUPPRESSION(numExpectedAsserts) macros to perform AZ_Assert and AZ_Error suppression class TraceBusRedirector : public AZ::Debug::TraceMessageBus::Handler @@ -124,16 +139,19 @@ namespace UnitTest if (UnitTest::TestRunner::Instance().m_isAssertTest) { UnitTest::TestRunner::Instance().ProcessAssert(message, file, line, false); + return true; } - else + else if (UnitTest::TestRunner::Instance().m_suppressAsserts) { GTEST_MESSAGE_AT_(file, line, message, ::testing::TestPartResult::kNonFatalFailure); + return true; } - return true; + + return false; } bool OnAssert(const char* /*message*/) override { - return true; // stop processing + return UnitTest::TestRunner::Instance().m_suppressAsserts; // stop processing } bool OnPreError(const char* /*window*/, const char* file, int line, const char* /*func*/, const char* message) override { @@ -142,6 +160,7 @@ namespace UnitTest UnitTest::TestRunner::Instance().ProcessAssert(message, file, line, false); return true; } + return false; } bool OnError(const char* /*window*/, const char* message) override @@ -149,12 +168,15 @@ namespace UnitTest if (UnitTest::TestRunner::Instance().m_isAssertTest) { UnitTest::TestRunner::Instance().ProcessAssert(message, __FILE__, __LINE__, UnitTest::AssertionExpr(false)); + return true; } - else + else if (UnitTest::TestRunner::Instance().m_suppressErrors) { GTEST_MESSAGE_(message, ::testing::TestPartResult::kNonFatalFailure); + return true; } - return true; // stop processing + + return false; } bool OnPreWarning(const char* /*window*/, const char* /*fileName*/, int /*line*/, const char* /*func*/, const char* /*message*/) override { @@ -163,21 +185,21 @@ namespace UnitTest } bool OnWarning(const char* /*window*/, const char* /*message*/) override { - return true; + return UnitTest::TestRunner::Instance().m_suppressWarnings; } bool OnOutput(const char* /*window*/, const char* /*message*/) override { - return true; + return UnitTest::TestRunner::Instance().m_suppressOutput; } bool OnPrintf(const char* window, const char* message) override { if (AZStd::string_view(window) == "Memory") // We want to print out the memory leak's stack traces { - ColoredPrintf(COLOR_RED, "[ MEMORY ] %s", message); + ColoredPrintf(COLOR_RED, "[ MEMORY ] %s", message); } - return true; + return UnitTest::TestRunner::Instance().m_suppressPrintf; } }; @@ -259,7 +281,6 @@ namespace UnitTest bool m_environmentSetup = false; bool m_createdAllocator = false; }; - } diff --git a/Code/Framework/AzCore/AzCore/Utils/Utils.cpp b/Code/Framework/AzCore/AzCore/Utils/Utils.cpp index e6bfd78806..1623aca56b 100644 --- a/Code/Framework/AzCore/AzCore/Utils/Utils.cpp +++ b/Code/Framework/AzCore/AzCore/Utils/Utils.cpp @@ -59,7 +59,7 @@ namespace AZ::Utils { // Fix the size value of the fixed string by calculating the c-string length using char traits absolutePath.resize_no_construct(AZStd::char_traits::length(absolutePath.data())); - return srcPath; + return absolutePath; } return AZStd::nullopt; @@ -165,13 +165,12 @@ namespace AZ::Utils } Container fileContent; - fileContent.resize(length); + fileContent.resize_no_construct(length); AZ::IO::SizeType bytesRead = file.Read(length, fileContent.data()); file.Close(); // Resize again just in case bytesRead is less than length for some reason - fileContent.resize(bytesRead); - + fileContent.resize_no_construct(bytesRead); return AZ::Success(AZStd::move(fileContent)); } diff --git a/Code/Framework/AzCore/AzCore/azcore_files.cmake b/Code/Framework/AzCore/AzCore/azcore_files.cmake index a5cc3fdcd4..0dfce11247 100644 --- a/Code/Framework/AzCore/AzCore/azcore_files.cmake +++ b/Code/Framework/AzCore/AzCore/azcore_files.cmake @@ -92,10 +92,6 @@ set(FILES Compression/Compression.h Compression/zstd_compression.cpp Compression/zstd_compression.h - Debug/AssetTracking.cpp - Debug/AssetTracking.h - Debug/AssetTrackingTypesImpl.h - Debug/AssetTrackingTypes.h Debug/Budget.h Debug/Budget.cpp Debug/BudgetTracker.h @@ -111,30 +107,21 @@ set(FILES Debug/ProfilerReflection.cpp Debug/ProfilerReflection.h Debug/StackTracer.h - Debug/EventTrace.h - Debug/EventTrace.cpp - Debug/EventTraceDriller.h - Debug/EventTraceDriller.cpp - Debug/EventTraceDrillerBus.h Debug/Timer.h Debug/Trace.cpp Debug/Trace.h Debug/TraceMessageBus.h - Debug/TraceMessagesDriller.cpp - Debug/TraceMessagesDriller.h - Debug/TraceMessagesDrillerBus.h Debug/TraceReflection.cpp Debug/TraceReflection.h + DOM/DomBackend.cpp + DOM/DomBackend.h + DOM/DomUtils.cpp + DOM/DomUtils.h DOM/DomVisitor.cpp DOM/DomVisitor.h - Driller/DefaultStringPool.h - Driller/Driller.cpp - Driller/Driller.h - Driller/DrillerBus.cpp - Driller/DrillerBus.h - Driller/DrillerRootHandler.h - Driller/Stream.cpp - Driller/Stream.h + DOM/Backends/JSON/JsonBackend.h + DOM/Backends/JSON/JsonSerializationUtils.cpp + DOM/Backends/JSON/JsonSerializationUtils.h EBus/BusImpl.h EBus/EBus.h EBus/EBusEnvironment.cpp @@ -171,7 +158,6 @@ set(FILES IO/CompressorZStd.h IO/FileIO.cpp IO/FileIO.h - IO/FileIOEventBus.h IO/FileReader.cpp IO/FileReader.h IO/IOUtils.h @@ -187,6 +173,8 @@ set(FILES IO/Path/Path.inl IO/Path/PathIterable.inl IO/Path/PathParser.inl + IO/Path/PathReflect.cpp + IO/Path/PathReflect.h IO/Path/Path_fwd.h IO/SystemFile.cpp IO/SystemFile.h @@ -395,16 +383,12 @@ set(FILES Memory/Memory.h Memory/MemoryComponent.cpp Memory/MemoryComponent.h - Memory/MemoryDriller.cpp - Memory/MemoryDriller.h - Memory/MemoryDrillerBus.h Memory/nedmalloc.inl Memory/NewAndDelete.inl Memory/OSAllocator.cpp Memory/OSAllocator.h Memory/OverrunDetectionAllocator.cpp Memory/OverrunDetectionAllocator.h - Memory/PlatformMemoryInstrumentation.h Memory/PoolAllocator.h Memory/PoolSchema.cpp Memory/PoolSchema.h @@ -549,6 +533,8 @@ set(FILES Serialization/Json/JsonUtils.cpp Serialization/Json/MapSerializer.h Serialization/Json/MapSerializer.cpp + Serialization/Json/PathSerializer.h + Serialization/Json/PathSerializer.cpp Serialization/Json/RegistrationContext.h Serialization/Json/RegistrationContext.cpp Serialization/Json/SmartPointerSerializer.h @@ -654,8 +640,8 @@ set(FILES Threading/ThreadUtils.h Threading/ThreadUtils.cpp Time/ITime.h - Time/TimeSystemComponent.cpp - Time/TimeSystemComponent.h + Time/TimeSystem.cpp + Time/TimeSystem.h ) # Prevent the following files from being grouped in UNITY builds diff --git a/Code/Framework/AzCore/AzCore/azcoretestcommon_files.cmake b/Code/Framework/AzCore/AzCore/azcoretestcommon_files.cmake index 6c25641f9f..e31dc803b9 100644 --- a/Code/Framework/AzCore/AzCore/azcoretestcommon_files.cmake +++ b/Code/Framework/AzCore/AzCore/azcoretestcommon_files.cmake @@ -12,5 +12,6 @@ set(FILES UnitTest/UnitTest.h UnitTest/TestTypes.h UnitTest/Mocks/MockFileIOBase.h + UnitTest/Mocks/MockITime.h UnitTest/Mocks/MockSettingsRegistry.h ) diff --git a/Code/Framework/AzCore/AzCore/std/allocator_stateless.cpp b/Code/Framework/AzCore/AzCore/std/allocator_stateless.cpp index 5806cc485c..baf650a560 100644 --- a/Code/Framework/AzCore/AzCore/std/allocator_stateless.cpp +++ b/Code/Framework/AzCore/AzCore/std/allocator_stateless.cpp @@ -11,17 +11,17 @@ namespace AZStd { - stateless_allocator::stateless_allocator(const char* name) - : m_name(name) {} + stateless_allocator::stateless_allocator() = default; + stateless_allocator::stateless_allocator(const char*) + {} const char* stateless_allocator::get_name() const { - return m_name; + return "AZStd::stateless_allocator"; } - void stateless_allocator::set_name(const char* name) + void stateless_allocator::set_name(const char*) { - m_name = name; } auto stateless_allocator::allocate(size_type byteSize) -> pointer_type diff --git a/Code/Framework/AzCore/AzCore/std/allocator_stateless.h b/Code/Framework/AzCore/AzCore/std/allocator_stateless.h index b73c680c32..6b78aca53d 100644 --- a/Code/Framework/AzCore/AzCore/std/allocator_stateless.h +++ b/Code/Framework/AzCore/AzCore/std/allocator_stateless.h @@ -26,7 +26,8 @@ namespace AZStd using difference_type = ptrdiff_t; using allow_memory_leaks = AZStd::true_type; - stateless_allocator(const char* name = "AZStd::stateless_allocator"); + stateless_allocator(); + explicit stateless_allocator(const char*); // Stateless allocator does not store a name stateless_allocator(const stateless_allocator& rhs) = default; stateless_allocator& operator=(const stateless_allocator& rhs) = default; @@ -51,9 +52,6 @@ namespace AZStd bool is_lock_free(); bool is_stale_read_allowed(); bool is_delayed_recycling(); - - private: - const char* m_name; }; bool operator==(const stateless_allocator& left, const stateless_allocator& right); diff --git a/Code/Framework/AzCore/AzCore/std/containers/compressed_pair.h b/Code/Framework/AzCore/AzCore/std/containers/compressed_pair.h index 066ec7be5e..c79ddf11ee 100644 --- a/Code/Framework/AzCore/AzCore/std/containers/compressed_pair.h +++ b/Code/Framework/AzCore/AzCore/std/containers/compressed_pair.h @@ -8,6 +8,7 @@ #pragma once #include +#include #include /* Microsoft C++ ABI puts 1 byte of padding between each empty base class when multiple inheritance is being used @@ -20,7 +21,7 @@ #if defined(AZ_COMPILER_MSVC) #define AZSTD_COMPRESSED_PAIR_EMPTY_BASE_OPTIMIZATION __declspec(empty_bases) #else -#define AZSTD_COMPRESSED_PAIR_EMPTY_BASE_OPTIMIZATION +#define AZSTD_COMPRESSED_PAIR_EMPTY_BASE_OPTIMIZATION #endif namespace AZStd @@ -97,16 +98,14 @@ namespace AZStd using second_base_value_type = typename second_base_type::value_type; public: - // First template argument is a placeholder argument of void as MSVC examines the types - // of a templated function to determine if they are the same template - // Due to the "template compressed_pair(skip_element_tag, T&&)" - // constructor below, the default constructor template types needs to be distinguished from it - template ::value - && AZStd::is_default_constructible::value>> + // First template argument is used to perform a substitution into AZStd::enable_if_t + // so that SFINAE can trigger + template + && AZStd::is_default_constructible_v, Unused>> constexpr compressed_pair(); - template , compressed_pair>::value, bool> = true> + template , compressed_pair>, bool> = true> constexpr explicit compressed_pair(T&& firstElement); template diff --git a/Code/Framework/AzCore/AzCore/std/containers/compressed_pair.inl b/Code/Framework/AzCore/AzCore/std/containers/compressed_pair.inl index 9fb5eb87fb..8e585a1467 100644 --- a/Code/Framework/AzCore/AzCore/std/containers/compressed_pair.inl +++ b/Code/Framework/AzCore/AzCore/std/containers/compressed_pair.inl @@ -75,7 +75,7 @@ namespace AZStd } template - template , compressed_pair>::value, bool>> + template , compressed_pair>, bool>> inline constexpr compressed_pair::compressed_pair(T&& firstElement) : first_base_type{ AZStd::forward(firstElement) } , second_base_type{} @@ -117,7 +117,7 @@ namespace AZStd { return static_cast(*this).get(); } - + template inline constexpr auto compressed_pair::second() -> second_base_value_type& { diff --git a/Code/Framework/AzCore/AzCore/std/containers/deque.h b/Code/Framework/AzCore/AzCore/std/containers/deque.h index db585e0ec9..9eed66aeb3 100644 --- a/Code/Framework/AzCore/AzCore/std/containers/deque.h +++ b/Code/Framework/AzCore/AzCore/std/containers/deque.h @@ -1233,6 +1233,14 @@ namespace AZStd right.swap(AZStd::forward(left)); } + template + decltype(auto) erase(deque& container, const U& value) + { + auto iter = AZStd::remove(container.begin(), container.end(), value); + auto removedCount = AZStd::distance(iter, container.end()); + container.erase(iter, container.end()); + return removedCount; + } template decltype(auto) erase_if(deque& container, Predicate predicate) { diff --git a/Code/Framework/AzCore/AzCore/std/containers/fixed_vector.h b/Code/Framework/AzCore/AzCore/std/containers/fixed_vector.h index 7c0cca0308..82faaab2d8 100644 --- a/Code/Framework/AzCore/AzCore/std/containers/fixed_vector.h +++ b/Code/Framework/AzCore/AzCore/std/containers/fixed_vector.h @@ -130,10 +130,11 @@ namespace AZStd::Internal //! Constructors - constexpr fixed_trivial_storage() = default; + fixed_trivial_storage() = default; template >> - constexpr fixed_trivial_storage(AZStd::initializer_list ilist) noexcept + fixed_trivial_storage(AZStd::initializer_list ilist) noexcept + : m_size(aznumeric_caster(ilist.size())) { AZSTD_CONTAINER_ASSERT(ilist.size() <= capacity(), "Initializer list cannot be larger than storage capacity"); size_t index{}; @@ -141,20 +142,19 @@ namespace AZStd::Internal { m_data[index++] = element; } - resize_no_construct(ilist.size()); } - constexpr pointer data() noexcept + pointer data() noexcept { return m_data; } - constexpr const_pointer data() const noexcept + const_pointer data() const noexcept { return m_data; } //! Number of elements currently stored. - constexpr size_type size() const noexcept + size_type size() const noexcept { return m_size; } @@ -164,12 +164,12 @@ namespace AZStd::Internal return Capacity; } //! Is the storage empty? - constexpr bool empty() const noexcept + bool empty() const noexcept { return size() == 0; } //! Is the storage full? - constexpr bool full() const noexcept + bool full() const noexcept { return size() == capacity(); } @@ -186,7 +186,7 @@ namespace AZStd::Internal //! Increases size of the storage by one. //! Always fails for empty storage. template >> - constexpr reference emplace_back(Args&&... args) noexcept + reference emplace_back(Args&&... args) noexcept { AZSTD_CONTAINER_ASSERT(!full(), "emplace_back cannot be invoked on full storage"); reference new_element = *(data() + size()); @@ -196,7 +196,7 @@ namespace AZStd::Internal } //! Removes the last element of the storage. //! Precondition: size is not empty - constexpr void pop_back() noexcept + void pop_back() noexcept { AZSTD_CONTAINER_ASSERT(!empty(), "pop_back cannot be invoked on empty storage"); resize_no_construct(size() - 1); @@ -205,7 +205,7 @@ namespace AZStd::Internal //! removing elements (unsafe). //! //! Updates the size of the container while checking that the new size is less than capacity - constexpr void resize_no_construct(size_t new_size) noexcept + void resize_no_construct(size_t new_size) noexcept { AZSTD_CONTAINER_ASSERT(new_size <= capacity(), "New size cannot be larger than capacity"); m_size = aznumeric_cast(new_size); @@ -215,19 +215,19 @@ namespace AZStd::Internal //! This does not modify the size of the storage //! This is a no-op for trivial types template >> - constexpr void unsafe_destroy(InputIt, InputIt) noexcept + void unsafe_destroy(InputIt, InputIt) noexcept { } //! Destructs all elements of the storage. //! This does not modify the size of the storage //! This is a no-op for trivial types - constexpr void unsafe_destroy_all() noexcept + void unsafe_destroy_all() noexcept { } private: - T m_data[Capacity]{}; + T m_data[Capacity]; size_type m_size{}; }; @@ -245,7 +245,7 @@ namespace AZStd::Internal using reference = T&; using const_reference = const T&; - constexpr fixed_non_trivial_storage() = default; + fixed_non_trivial_storage() = default; ~fixed_non_trivial_storage() noexcept { @@ -253,7 +253,7 @@ namespace AZStd::Internal } template >> - constexpr fixed_non_trivial_storage(AZStd::initializer_list ilist) noexcept(noexcept(emplace_back(AZStd::declval()))) + fixed_non_trivial_storage(AZStd::initializer_list ilist) noexcept(noexcept(emplace_back(AZStd::declval()))) { AZSTD_CONTAINER_ASSERT(ilist.size() <= capacity(), "Initializer list cannot be larger than storage capacity"); for (const U& element : ilist) @@ -272,7 +272,7 @@ namespace AZStd::Internal } //! Number of elements currently stored. - constexpr size_type size() const noexcept + size_type size() const noexcept { return m_size; } @@ -282,12 +282,12 @@ namespace AZStd::Internal return Capacity; } //! Is the storage empty? - constexpr bool empty() const noexcept + bool empty() const noexcept { return size() == 0; } //! Is the storage full? - constexpr bool full() const noexcept + bool full() const noexcept { return size() == capacity(); } @@ -325,7 +325,7 @@ namespace AZStd::Internal //! removing elements (unsafe). //! //! Updates the size of the container while checking that the new size is less than capacity - constexpr void resize_no_construct(size_t new_size) noexcept + void resize_no_construct(size_t new_size) noexcept { AZSTD_CONTAINER_ASSERT(new_size <= capacity(), "New size cannot be larger than capacity"); m_size = aznumeric_cast(new_size); @@ -402,23 +402,23 @@ namespace AZStd ////////////////////////////////////////////////////////////////////////// // 23.2.4.1 construct/copy/destroy - constexpr fixed_vector() = default; + fixed_vector() = default; - constexpr explicit fixed_vector(size_type numElements, const_reference value = value_type()) + explicit fixed_vector(size_type numElements, const_reference value = value_type()) { resize_no_construct(numElements); AZStd::uninitialized_fill_n(data(), numElements, value); } template >> - constexpr fixed_vector(InputIt first, InputIt last) + fixed_vector(InputIt first, InputIt last) { resize_no_construct(AZStd::distance(first, last)); AZStd::uninitialized_copy(first, last, data()); } - constexpr fixed_vector(const fixed_vector& rhs) + fixed_vector(const fixed_vector& rhs) { resize_no_construct(rhs.size()); AZStd::uninitialized_copy(rhs.data(), rhs.data() + rhs.size(), data()); @@ -428,7 +428,7 @@ namespace AZStd // It performs an AZStd::move on each of the fixed_vector elements instead // of swapping pointers to the allocted memory address // as it is unable to perform that operations due to the storage being baked into the container - constexpr fixed_vector(fixed_vector&& rhs) + fixed_vector(fixed_vector&& rhs) { resize_no_construct(rhs.size()); AZStd::uninitialized_move(rhs.data(), rhs.data() + rhs.size(), data()); @@ -440,7 +440,7 @@ namespace AZStd // into a fixed_vector given that the type in question isn't the same type as this fixed_vector type template && !AZStd::is_convertible_v>> - constexpr fixed_vector(VectorContainer&& rhs) + fixed_vector(VectorContainer&& rhs) { constexpr bool is_const_or_lvalue_reference = AZStd::is_lvalue_reference_v || AZStd::is_const_v; @@ -459,12 +459,12 @@ namespace AZStd } } - constexpr fixed_vector(AZStd::initializer_list ilist) + fixed_vector(AZStd::initializer_list ilist) : base_type(ilist) { } - constexpr fixed_vector& operator=(const fixed_vector& rhs) + fixed_vector& operator=(const fixed_vector& rhs) { if (this == &rhs) { @@ -475,7 +475,7 @@ namespace AZStd return assign_helper(rhs); } - constexpr fixed_vector& operator=(fixed_vector&& rhs) + fixed_vector& operator=(fixed_vector&& rhs) { if (this == &rhs) { @@ -487,23 +487,23 @@ namespace AZStd } template - constexpr AZStd::enable_if_t, fixed_vector>, fixed_vector>& operator=(VectorContainer&& rhs) + AZStd::enable_if_t, fixed_vector>, fixed_vector>& operator=(VectorContainer&& rhs) { return assign_helper(AZStd::forward(rhs)); } - constexpr iterator begin() { return iterator(data()); } - constexpr const_iterator begin() const { return const_iterator(data()); } - constexpr const_iterator cbegin() const { return const_iterator(data()); } - constexpr iterator end() { return iterator(data() + size()); } - constexpr const_iterator end() const { return const_iterator(data() + size()); } - constexpr const_iterator cend() const { return const_iterator(data() + size()); } - constexpr reverse_iterator rbegin() { return reverse_iterator(end()); } - constexpr const_reverse_iterator rbegin() const { return const_reverse_iterator(end()); } - constexpr const_reverse_iterator crbegin() const { return const_reverse_iterator(end()); } - constexpr reverse_iterator rend() { return reverse_iterator(begin()); } - constexpr const_reverse_iterator rend() const { return const_reverse_iterator(begin()); } - constexpr const_reverse_iterator crend() const { return const_reverse_iterator(begin()); } + iterator begin() { return iterator(data()); } + const_iterator begin() const { return const_iterator(data()); } + const_iterator cbegin() const { return const_iterator(data()); } + iterator end() { return iterator(data() + size()); } + const_iterator end() const { return const_iterator(data() + size()); } + const_iterator cend() const { return const_iterator(data() + size()); } + reverse_iterator rbegin() { return reverse_iterator(end()); } + const_reverse_iterator rbegin() const { return const_reverse_iterator(end()); } + const_reverse_iterator crbegin() const { return const_reverse_iterator(end()); } + reverse_iterator rend() { return reverse_iterator(begin()); } + const_reverse_iterator rend() const { return const_reverse_iterator(begin()); } + const_reverse_iterator crend() const { return const_reverse_iterator(begin()); } // bring in fixed_vector_storage functions into scope using base_type::data; @@ -514,7 +514,7 @@ namespace AZStd // extension method using base_type::resize_no_construct; - constexpr size_type size() const noexcept + size_type size() const noexcept { return base_type::size(); } @@ -527,12 +527,12 @@ namespace AZStd return base_type::max_size(); } - constexpr void resize(size_type newSize) + void resize(size_type newSize) { return resize(newSize, value_type{}); } - constexpr void resize(size_type newSize, const_reference value) + void resize(size_type newSize, const_reference value) { size_type dataSize = size(); if (dataSize < newSize) @@ -547,7 +547,7 @@ namespace AZStd // Removes unused capacity - For fixed_vector this only asserts // that the supplied capacity is not longer than the fixed_vector capacity - constexpr void reserve(size_type newCapacity) + void reserve(size_type newCapacity) { // No-op - Implemented to provide consistent std::vector AZSTD_CONTAINER_ASSERT(newCapacity <= capacity(), @@ -556,79 +556,79 @@ namespace AZStd } // Removes unused capacity - For fixed_vector this does nothing - constexpr void shrink_to_fit() + void shrink_to_fit() { // No-op - Implemented to provide consistent std::vector } - constexpr reference at(size_type position) + reference at(size_type position) { AZSTD_CONTAINER_ASSERT(position < size(), "AZStd::fixed_vector<>::at - position is out of range"); return *(data() + position); } - constexpr const_reference at(size_type position) const + const_reference at(size_type position) const { AZSTD_CONTAINER_ASSERT(position < size(), "AZStd::fixed_vector<>::at - position is out of range"); return *(data() + position); } - constexpr reference operator[](size_type position) + reference operator[](size_type position) { AZSTD_CONTAINER_ASSERT(position < size(), "AZStd::fixed_vector<>::at - position is out of range"); return *(data() + position); } - constexpr const_reference operator[](size_type position) const + const_reference operator[](size_type position) const { AZSTD_CONTAINER_ASSERT(position < size(), "AZStd::fixed_vector<>::at - position is out of range"); return *(data() + position); } - constexpr reference front() + reference front() { AZSTD_CONTAINER_ASSERT(!empty(), "AZStd::fixed_vector<>::front - container is empty!"); return *data(); } - constexpr const_reference front() const + const_reference front() const { AZSTD_CONTAINER_ASSERT(!empty(), "AZStd::fixed_vector<>::front - container is empty!"); return *data(); } - constexpr reference back() + reference back() { AZSTD_CONTAINER_ASSERT(!empty(), "AZStd::fixed_vector<>::back - container is empty!"); return *(data() + size() - 1); } - constexpr const_reference back() const + const_reference back() const { AZSTD_CONTAINER_ASSERT(!empty(), "AZStd::fixed_vector<>::back - container is empty!"); return *(data() + size() - 1); } - constexpr void push_back(const_reference value) + void push_back(const_reference value) { emplace_back(value); } - constexpr void assign(size_type numElements, const_reference value) + void assign(size_type numElements, const_reference value) { clear(); insert(end(), numElements, value); } template >> - constexpr void assign(InputIt first, InputIt last) + void assign(InputIt first, InputIt last) { clear(); insert(end(), first, last); } - constexpr void assign(AZStd::initializer_list ilist) + void assign(AZStd::initializer_list ilist) { assign(ilist.begin(), ilist.end()); } template >> - constexpr iterator emplace(const_iterator insertPos, Args&&... args) + iterator emplace(const_iterator insertPos, Args&&... args) { AZSTD_CONTAINER_ASSERT(!full(), "Cannot emplace on a full fixed_vector"); AZSTD_CONTAINER_ASSERT(insertPos >= cbegin() && insertPos <= cend(), "insert position must be in range of container"); @@ -645,18 +645,18 @@ namespace AZStd AZStd::construct_at(insertPosPtr, AZStd::forward(args)...); return iterator(insertPosPtr); } - constexpr iterator insert(const_iterator insertPos, const_reference value) + iterator insert(const_iterator insertPos, const_reference value) { AZSTD_CONTAINER_ASSERT(insertPos >= cbegin() && insertPos <= cend(), "insert position must be in range of container"); return emplace(insertPos, value); } - constexpr iterator insert(const_iterator insertPos, value_type&& value) + iterator insert(const_iterator insertPos, value_type&& value) { AZSTD_CONTAINER_ASSERT(insertPos >= cbegin() && insertPos <= cend(), "insert position must be in range of container"); return emplace(insertPos, AZStd::move(value)); } - constexpr void insert(const_iterator insertPos, size_type numElements, const_reference value) + void insert(const_iterator insertPos, size_type numElements, const_reference value) { if (numElements == 0) { @@ -708,24 +708,24 @@ namespace AZStd } template>> - constexpr void insert(const_iterator insertPos, InputIt first, InputIt last) + void insert(const_iterator insertPos, InputIt first, InputIt last) { // specialize for iterator categories. AZSTD_CONTAINER_ASSERT(insertPos >= cbegin() && insertPos <= cend(), "insert position must be in range of container"); insert_iter(insertPos, first, last, typename iterator_traits::iterator_category()); }; - constexpr void insert(const_iterator insertPos, AZStd::initializer_list ilist) + void insert(const_iterator insertPos, AZStd::initializer_list ilist) { insert(insertPos, ilist.begin(), ilist.end()); } - constexpr iterator erase(const_iterator elementIter) + iterator erase(const_iterator elementIter) { return erase(elementIter, elementIter + 1); } - constexpr iterator erase(const_iterator first, const_iterator last) + iterator erase(const_iterator first, const_iterator last) { AZSTD_CONTAINER_ASSERT(first >= cbegin() && last <= cend(), "erase iterator must be inside the range of fixed_vector container"); iterator dataStart = begin(); @@ -741,12 +741,12 @@ namespace AZStd return dataStart + offset; } - constexpr void clear() + void clear() { base_type::unsafe_destroy_all(); resize_no_construct(0); } - constexpr void swap(fixed_vector& rhs) + void swap(fixed_vector& rhs) { // Fixed containers cannot swap pointers, they need to do full copies. // The strategy is to extend the smaller fixed_vector to be the size @@ -776,12 +776,12 @@ namespace AZStd } // Validate container status. - constexpr bool validate() const + bool validate() const { return size() <= max_size(); } // Validate iterator. - constexpr int validate_iterator(const_iterator iter) const + int validate_iterator(const_iterator iter) const { const_pointer start = data(); const_pointer end = data() + size(); @@ -799,19 +799,19 @@ namespace AZStd } // pushes back an empty without a provided instance. - constexpr void push_back() + void push_back() { emplace_back(); } - constexpr void leak_and_reset() + void leak_and_reset() { resize_no_construct(0); } private: template - constexpr fixed_vector& assign_helper(VectorContainer&& rhs) + fixed_vector& assign_helper(VectorContainer&& rhs) { constexpr bool is_const_or_lvalue_reference = AZStd::is_lvalue_reference_v || AZStd::is_const_v; @@ -872,7 +872,7 @@ namespace AZStd } template - constexpr void insert_iter(const_iterator insertPos, Iterator first, Iterator last, const forward_iterator_tag&) + void insert_iter(const_iterator insertPos, Iterator first, Iterator last, const forward_iterator_tag&) { size_type numElements = AZStd::distance(first, last); if (numElements == 0) @@ -923,7 +923,7 @@ namespace AZStd } template - constexpr void insert_iter(const_iterator insertPos, Iterator first, Iterator last, const input_iterator_tag&) + void insert_iter(const_iterator insertPos, Iterator first, Iterator last, const input_iterator_tag&) { iterator dataStart = data(); size_type offset = AZStd::distance(dataStart, insertPos); @@ -974,4 +974,22 @@ namespace AZStd { return !operator<(a, b); } + + // C++20 erase free functions + template + constexpr decltype(auto) erase(fixed_vector& container, const U& value) + { + auto iter = AZStd::remove(container.begin(), container.end(), value); + auto removedCount = AZStd::distance(iter, container.end()); + container.erase(iter, container.end()); + return removedCount; + } + template + constexpr decltype(auto) erase_if(fixed_vector& container, Predicate predicate) + { + auto iter = AZStd::remove_if(container.begin(), container.end(), predicate); + auto removedCount = AZStd::distance(iter, container.end()); + container.erase(iter, container.end()); + return removedCount; + } } diff --git a/Code/Framework/AzCore/AzCore/std/containers/forward_list.h b/Code/Framework/AzCore/AzCore/std/containers/forward_list.h index 407d65ffa9..9d7eebbe0e 100644 --- a/Code/Framework/AzCore/AzCore/std/containers/forward_list.h +++ b/Code/Framework/AzCore/AzCore/std/containers/forward_list.h @@ -1275,6 +1275,11 @@ namespace AZStd return !(left == right); } + template + decltype(auto) erase(forward_list& container, const U& value) + { + return container.remove(value); + } template decltype(auto) erase_if(forward_list& container, Predicate predicate) { diff --git a/Code/Framework/AzCore/AzCore/std/containers/list.h b/Code/Framework/AzCore/AzCore/std/containers/list.h index 60d2977749..51bc62f444 100644 --- a/Code/Framework/AzCore/AzCore/std/containers/list.h +++ b/Code/Framework/AzCore/AzCore/std/containers/list.h @@ -1340,6 +1340,11 @@ namespace AZStd return !(left == right); } + template + decltype(auto) erase(list& container, const U& value) + { + return container.remove(value); + } template decltype(auto) erase_if(list& container, Predicate predicate) { diff --git a/Code/Framework/AzCore/AzCore/std/containers/vector.h b/Code/Framework/AzCore/AzCore/std/containers/vector.h index 48de12a5b4..255e1c4de4 100644 --- a/Code/Framework/AzCore/AzCore/std/containers/vector.h +++ b/Code/Framework/AzCore/AzCore/std/containers/vector.h @@ -1387,6 +1387,14 @@ namespace AZStd } //#pragma endregion + template + decltype(auto) erase(vector& container, const U& value) + { + auto iter = AZStd::remove(container.begin(), container.end(), value); + auto removedCount = AZStd::distance(iter, container.end()); + container.erase(iter, container.end()); + return removedCount; + } template decltype(auto) erase_if(vector& container, Predicate predicate) { diff --git a/Code/Framework/AzCore/AzCore/std/parallel/threadbus.h b/Code/Framework/AzCore/AzCore/std/parallel/threadbus.h index 26c2f92edb..85b716a6fa 100644 --- a/Code/Framework/AzCore/AzCore/std/parallel/threadbus.h +++ b/Code/Framework/AzCore/AzCore/std/parallel/threadbus.h @@ -8,9 +8,9 @@ #ifndef AZSTD_THREAD_BUS_H #define AZSTD_THREAD_BUS_H 1 -#include #include #include +#include namespace AZStd { @@ -32,24 +32,7 @@ namespace AZStd virtual void OnThreadExit(const AZStd::thread::id& id) = 0; }; - //! Thread events driller bus - only "drillers" (profilers) should connect to this. - //! A global mutex that includes a lock on the memory manager and other driller busses - //! is held during dispatch, and listeners are expected to do no allocation - //! or thread workloads or blocking or mutex operations of their own - only dump the data to - //! network or file ASAP. - //! DO NOT USE this bus unless you are a profiler capture system, use the ThreadEvents / ThreadBus instead - class ThreadDrillerEvents - : public AZ::Debug::DrillerEBusTraits - { - public: - /// Called when we enter a thread, optional thread_desc is provided when the use provides one. - virtual void OnThreadEnter(const AZStd::thread::id& id, const AZStd::thread_desc* desc) = 0; - /// Called when we exit a thread. - virtual void OnThreadExit(const AZStd::thread::id& id) = 0; - }; - typedef AZ::EBus ThreadEventBus; - typedef AZ::EBus ThreadDrillerEventBus; } #endif // AZSTD_THREAD_BUS_H diff --git a/Code/Framework/AzCore/AzCore/std/string/fixed_string.h b/Code/Framework/AzCore/AzCore/std/string/fixed_string.h index b68f21784b..ea841bc4ca 100644 --- a/Code/Framework/AzCore/AzCore/std/string/fixed_string.h +++ b/Code/Framework/AzCore/AzCore/std/string/fixed_string.h @@ -343,26 +343,6 @@ namespace AZStd static decltype(auto) format(const wchar_t* format, ...); protected: - template - constexpr auto append_iter(InputIt first, InputIt last) - -> enable_if_t && !is_convertible_v, basic_fixed_string&>; - - template - constexpr auto construct_iter(InputIt first, InputIt last) - -> enable_if_t && !is_convertible_v>; - - template - constexpr auto assign_iter(InputIt first, InputIt last) - -> enable_if_t && !is_convertible_v, basic_fixed_string&>; - - template - constexpr auto insert_iter(const_iterator insertPos, InputIt first, InputIt last) - -> enable_if_t && !is_convertible_v, iterator>; - - template - constexpr auto replace_iter(const_iterator first, const_iterator last, InputIt first2, InputIt last2) - -> enable_if_t && !is_convertible_v, basic_fixed_string&>; - constexpr auto fits_in_capacity(size_type newSize) -> bool; inline static constexpr size_type Capacity = MaxElementCount; // current storage reserved for string not including null-terminator @@ -465,6 +445,15 @@ namespace AZStd template constexpr bool operator>=(const Element* lhs, const basic_fixed_string& rhs); + // C++20 erase helpers + template + constexpr auto erase(basic_fixed_string& container, const U& element) + -> typename basic_fixed_string::size_type; + + template + constexpr auto erase_if(basic_fixed_string& container, Predicate predicate) + -> typename basic_fixed_string::size_type; + template struct hash; diff --git a/Code/Framework/AzCore/AzCore/std/string/fixed_string.inl b/Code/Framework/AzCore/AzCore/std/string/fixed_string.inl index 9a7e38aca0..15d2acf7a1 100644 --- a/Code/Framework/AzCore/AzCore/std/string/fixed_string.inl +++ b/Code/Framework/AzCore/AzCore/std/string/fixed_string.inl @@ -11,7 +11,7 @@ #include #include -#include +#include #include @@ -62,14 +62,7 @@ namespace AZStd template inline constexpr basic_fixed_string::basic_fixed_string(InputIt first, InputIt last) { // construct from [first, last) - if (first == last) - { - Traits::assign(m_buffer[0], Element()); // terminate - } - else - { - construct_iter(first, last); - } + assign(first, last); } // #7 @@ -98,8 +91,7 @@ namespace AZStd template inline constexpr basic_fixed_string::basic_fixed_string(const T& convertibleToView) { - AZStd::basic_string_view view = convertibleToView; - assign(view.begin(), view.end()); + assign(convertibleToView); } // #11 @@ -313,15 +305,7 @@ namespace AZStd if (count > 0 && fits_in_capacity(num)) { pointer data = m_buffer; - // make room and append new stuff using assign - if (count == 1) - { - Traits::assign(*(data + m_size), ch); - } - else - { - Traits::assign(data + m_size, count, ch); - } + Traits::assign(data + m_size, count, ch); m_size = static_cast(num); Traits::assign(data[num], Element()); // terminate } @@ -332,13 +316,47 @@ namespace AZStd template inline constexpr auto basic_fixed_string::append(InputIt first, InputIt last) -> enable_if_t && !is_convertible_v, basic_fixed_string&> - { // append [first, last) - return append_iter(first, last); + { + if constexpr (Internal::satisfies_contiguous_iterator_concept_v + && is_same_v::value_type, value_type>) + { + return append(AZStd::to_address(first), AZStd::distance(first, last)); + } + else if constexpr (Internal::is_forward_iterator_v) + { + // Input Iterator pointer type doesn't match the const_pointer type + // So the elements need to be appended one by one into the buffer + size_type newSize = m_size + AZStd::distance(first, last); + if (fits_in_capacity(newSize)) + { + for (size_t updateIndex = m_size; first != last; ++first, ++updateIndex) + { + Traits::assign(m_buffer[updateIndex], static_cast(*first)); + } + m_size = static_cast(newSize); + Traits::assign(m_buffer[newSize], Element()); // terminate + } + return *this; + } + else + { + // input iterator that aren't forward iterators can only be used in a single pass + // algorithm. Therefore AZStd::distance can't be used + // So the input is copied into a local string and then delegated + // to use the (const_pointer, size_type) overload + basic_fixed_string inputCopy; + for (; first != last; ++first) + { + inputCopy.push_back(static_cast(*first)); + } + + return append(inputCopy.c_str(), inputCopy.size()); + } } template inline constexpr auto basic_fixed_string::append(AZStd::initializer_list ilist) -> basic_fixed_string& - { // append [first, last) - return append_iter(ilist.begin(), ilist.end()); + { + return append(ilist.begin(), ilist.size()); } template @@ -420,18 +438,10 @@ namespace AZStd inline constexpr auto basic_fixed_string::assign(size_type count, Element ch) -> basic_fixed_string& { // assign count * ch - AZSTD_CONTAINER_ASSERT(count != npos, "result is too long!"); if (fits_in_capacity(count)) { // make room and assign new stuff pointer data = m_buffer; - if (count == 1) - { - Traits::assign(*(data), ch); - } - else - { - Traits::assign(data, count, ch); - } + Traits::assign(data, count, ch); m_size = static_cast(count); Traits::assign(data[count], Element()); // terminate } @@ -443,12 +453,46 @@ namespace AZStd inline constexpr auto basic_fixed_string::assign(InputIt first, InputIt last) -> enable_if_t && !is_convertible_v, basic_fixed_string&> { - return assign_iter(first, last); + if constexpr (Internal::satisfies_contiguous_iterator_concept_v + && is_same_v::value_type, value_type>) + { + return assign(AZStd::to_address(first), AZStd::distance(first, last)); + } + else if constexpr (Internal::is_forward_iterator_v) + { + // Input Iterator pointer type doesn't match the const_pointer type + // So the elements need to be assigned one by one into the buffer + size_type newSize = AZStd::distance(first, last); + if (fits_in_capacity(newSize)) + { + for (size_t updateIndex = 0; first != last; ++first, ++updateIndex) + { + Traits::assign(m_buffer[updateIndex], static_cast(*first)); + } + m_size = static_cast(newSize); + Traits::assign(m_buffer[newSize], Element()); // terminate + } + return *this; + } + else + { + // input iterator that aren't forward iterators can only be used in a single pass + // algorithm. Therefore AZStd::distance can't be used + // So the input is copied into a local string and then delegated + // to use the (const_pointer, size_type) overload + basic_fixed_string inputCopy; + for (; first != last; ++first) + { + inputCopy.push_back(static_cast(*first)); + } + + return assign(inputCopy.c_str(), inputCopy.size()); + } } template inline constexpr auto basic_fixed_string::assign(AZStd::initializer_list ilist) -> basic_fixed_string& { - return assign_iter(ilist.begin(), ilist.end()); + return assign(ilist.begin(), ilist.size()); } template @@ -536,14 +580,7 @@ namespace AZStd pointer data = m_buffer; // make room and insert new stuff Traits::copy_backward(data + offset + count, data + offset, m_size - offset); // empty out hole - if (count == 1) - { - Traits::assign(*(data + offset), ch); - } - else - { - Traits::assign(data + offset, count, ch); - } + Traits::assign(data + offset, count, ch); m_size = static_cast(num); Traits::assign(data[num], Element()); // terminate } @@ -582,14 +619,51 @@ namespace AZStd inline constexpr auto basic_fixed_string::insert(const_iterator insertPos, InputIt first, InputIt last)-> enable_if_t && !is_convertible_v, iterator> { // insert [_First, _Last) at _Where - return insert_iter(insertPos, first, last); + size_type insertOffset = AZStd::distance(cbegin(), insertPos); + if constexpr (Internal::satisfies_contiguous_iterator_concept_v + && is_same_v::value_type, value_type>) + { + insert(insertOffset, AZStd::to_address(first), AZStd::distance(first, last)); + } + else if constexpr (Internal::is_forward_iterator_v) + { + // Input Iterator pointer type doesn't match the const_pointer type + // So the elements need to be inserted one by one into the buffer + size_type count = AZStd::distance(first, last); + size_type newSize = m_size + count; + if (fits_in_capacity(newSize)) + { + Traits::copy_backward(m_buffer + insertOffset + count, m_buffer + insertOffset, m_size - insertOffset); // empty out hole + for (size_t updateIndex = insertOffset; first != last; ++first, ++updateIndex) + { + Traits::assign(m_buffer[updateIndex], static_cast(*first)); + } + m_size = static_cast(newSize); + Traits::assign(m_buffer[newSize], Element()); // terminate + } + } + else + { + // input iterator that aren't forward iterators can only be used in a single pass + // algorithm. Therefore AZStd::distance can't be used + // So the input is copied into a local string and then delegated + // to use the (const_pointer, size_type) overload + basic_fixed_string inputCopy; + for (; first != last; ++first) + { + inputCopy.push_back(static_cast(*first)); + } + + insert(insertOffset, inputCopy.c_str(), inputCopy.size()); + } + return begin() + insertOffset; } template inline constexpr auto basic_fixed_string::insert(const_iterator insertPos, AZStd::initializer_list ilist) -> iterator { // insert [_First, _Last) at _Where - return insert_iter(insertPos, ilist.begin(), ilist.end()); + return insert(insertPos, ilist.begin(), ilist.end()); } template @@ -604,7 +678,7 @@ namespace AZStd { // move elements down pointer data = m_buffer; - Traits::copy(data + offset, data + offset + count, m_size - offset - count); + Traits::move(data + offset, data + offset + count, m_size - offset - count); m_size = static_cast(m_size - count); Traits::assign(data[m_size], Element()); // terminate } @@ -643,7 +717,7 @@ namespace AZStd const basic_fixed_string& rhs) -> basic_fixed_string& { // replace [offset, offset + count) with rhs - return replace(offset, count, rhs, size_type(0), npos); + return replace(offset, count, rhs.c_str(), rhs.size()); } template @@ -651,56 +725,7 @@ namespace AZStd const basic_fixed_string& rhs, size_type rhsOffset, size_type rhsCount) -> basic_fixed_string& { // replace [offset, offset + count) with rhs [rhsOffset, rhsOffset + rhsCount) - AZSTD_CONTAINER_ASSERT(m_size >= offset && rhs.m_size >= rhsOffset, "Invalid offsets"); - if (m_size - offset < count) - { - count = m_size - offset; // trim count to size - } - size_type num = rhs.m_size - rhsOffset; - if (num < rhsCount) - { - rhsCount = num; // trim rhsCount to size - } - AZSTD_CONTAINER_ASSERT(npos - rhsCount > m_size - count, "Result is too long"); - - size_type nm = m_size - count - offset; // length of preserved tail - size_type newSize = m_size + rhsCount - count; - if (fits_in_capacity(newSize)) - { - pointer data = m_buffer; - const_pointer rhsData = rhs.m_buffer; - - if (this != &rhs) - { // no overlap, just move down and copy in new stuff - Traits::copy_backward(data + offset + rhsCount, data + offset + count, nm); // empty hole - Traits::copy(data + offset, rhsData + rhsOffset, rhsCount); // fill hole - } - else if (rhsCount <= count) - { // hole doesn't get larger, just copy in substring - Traits::copy(data + offset, data + rhsOffset, rhsCount); // fill hole - Traits::copy_backward(data + offset + rhsCount, data + offset + count, nm); // move tail down - } - else if (rhsOffset <= offset) - { // hole gets larger, substring begins before hole - Traits::copy_backward(data + offset + rhsCount, data + offset + count, nm); // move tail down - Traits::copy(data + offset, data + rhsOffset, rhsCount); // fill hole - } - else if (offset + count <= rhsOffset) - { // hole gets larger, substring begins after hole - Traits::copy_backward(data + offset + rhsCount, data + offset + count, nm); // move tail down - Traits::copy(data + offset, data + (rhsOffset + rhsCount - count), rhsCount); // fill hole - } - else - { // hole gets larger, substring begins in hole - Traits::copy(data + offset, data + rhsOffset, count); // fill old hole - Traits::copy_backward(data + offset + rhsCount, data + offset + count, nm); // move tail down - Traits::copy(data + offset + count, data + rhsOffset + rhsCount, rhsCount - count); // fill rest of new hole - } - - m_size = static_cast(newSize); - Traits::assign(data[newSize], Element()); // terminate - } - return *this; + return replace(offset, count, rhs.c_str() + rhsOffset, AZStd::min(rhsCount, rhs.size() - rhsOffset)); } template template @@ -720,35 +745,83 @@ namespace AZStd pointer data = m_buffer; // replace [offset, offset + count) with [ptr, ptr + ptrCount) AZSTD_CONTAINER_ASSERT(m_size >= offset, "Invalid offset"); - if (m_size - offset < count) - { - count = m_size - offset; // trim _N0 to size - } - AZSTD_CONTAINER_ASSERT(npos - ptrCount > m_size - count, "Result too long"); + // Make sure count is within is no larger than the distance from the offset + // to the end of this string + count = AZStd::min(count, m_size - offset); - size_type nm = m_size - count - offset; - if (ptrCount < count) + size_type newSize = m_size + ptrCount - count; + if (fits_in_capacity(newSize)) { - Traits::copy(data + offset + ptrCount, data + offset + count, nm); // smaller hole, move tail up - } - size_type num = m_size + ptrCount - count; - if ((0 != ptrCount || 0 != count) && fits_in_capacity(num)) - { - data = m_buffer; - // make room and rearrange - if (count < ptrCount) + // The code assumes that compile time evaluation will not need to deal with overlapping input + size_type charsAfterCountToMove = m_size - count - offset; + if (az_builtin_is_constant_evaluated() || !((ptr >= data + offset && ptr < data + offset + count) + || (ptr + ptrCount > data + offset && ptr + ptrCount <= data + offset + count))) { - Traits::copy_backward(data + offset + ptrCount, data + offset + count, nm); // move tail down + // Ex1. this = "ABCDEFG", offset = 1, count = 4 + // Input string is "CDE" + // First the text post offset + count is moved to right after the input string will be copied + // "ABCDFG" + // ^^^ + // Next the input string is copied into the buffer + // "ACDEFG" + // + // Ex2. this = "ABCDEFG", offset = 1, count = 2 + // Input string is "CDE" + // Performing the same two steps above, the string transform as follows + // "ABCDEFG" -> "ABCDDEFG" -> "ACDEDEFG" + // ^^^ + if (count != ptrCount) + { + Traits::move(data + offset + ptrCount, data + offset + count, charsAfterCountToMove); + } + if (ptrCount > 0) + { + // Copy bytes up to the minimum of this string count and input string count + Traits::copy(data + offset, ptr, ptrCount); + } } - - if (ptrCount > 0) + else { - Traits::copy(data + offset, ptr, ptrCount); // fill hole + // Overlap checks for fixed_string only needs to check between this string + // [offset, offset + count) due to fixed_string never moving memory + // + // Ex. this = "ABCDEFG", offset = 1, count=4 + // substring is "CDE" + // The text from offset 1 for 4 chars "BCDE": should be replaced with "CDE" + // making a whole for the bytes results in output = "ABCDFG" + // Afterwards output = "ACDEFG" + // The input string overlaps with this string in this case + // So the string is copied piecewise + if (ptrCount <= count) + { // hole doesn't get larger, just copy in substring + Traits::move(data + offset, ptr, ptrCount); // fill hole + Traits::copy(data + offset + ptrCount, data + offset + count, charsAfterCountToMove); // move tail down + } + else + { + if (ptr <= data + offset) + { // hole gets larger, substring begins before hole + Traits::copy_backward(data + offset + ptrCount, data + offset + count, charsAfterCountToMove); // move tail down + Traits::copy(data + offset, ptr, ptrCount); // fill hole + } + else if (data + offset + count <= ptr) + { // hole gets larger, substring begins after hole + Traits::copy_backward(data + offset + ptrCount, data + offset + count, charsAfterCountToMove); // move tail down + Traits::copy(data + offset, ptr + (ptrCount - count), ptrCount); // fill hole + } + else + { // hole gets larger, substring begins in hole + Traits::copy(data + offset, ptr, count); // fill old hole + Traits::copy_backward(data + offset + ptrCount, data + offset + count, charsAfterCountToMove); // move tail down + Traits::copy(data + offset + count, ptr + ptrCount, ptrCount - count); // fill rest of new hole + } + } } - - m_size = static_cast(num); - Traits::assign(data[num], Element()); // terminate } + + m_size = static_cast(newSize); + Traits::assign(data[newSize], Element()); // terminate + return *this; } @@ -793,14 +866,7 @@ namespace AZStd { Traits::copy_backward(data + offset + num, data + offset + count, nm); // move tail down } - if (count == 1) - { - Traits::assign(*(data + offset), ch); - } - else - { - Traits::assign(data + offset, num, ch); - } + Traits::assign(data + offset, num, ch); m_size = static_cast(numToGrow); Traits::assign(data[numToGrow], Element()); // terminate } @@ -851,15 +917,54 @@ namespace AZStd template template inline constexpr auto basic_fixed_string::replace(const_iterator first, const_iterator last, - InputIt first2, InputIt last2) -> enable_if_t && !is_convertible_v, basic_fixed_string&> - { // replace [first, last) with [first2,last2) - return replace_iter(first, last, first2, last2); + InputIt replaceFirst, InputIt replaceLast) -> enable_if_t && !is_convertible_v, basic_fixed_string&> + { // replace [first, last) with [replaceFirst,replaceLast) + if constexpr (Internal::satisfies_contiguous_iterator_concept_v + && is_same_v::value_type, value_type>) + { + return replace(first, last, AZStd::to_address(replaceFirst), AZStd::distance(replaceFirst, replaceLast)); + } + else if constexpr (Internal::is_forward_iterator_v) + { + // Input Iterator pointer type doesn't match the const_pointer type + // So the elements need to be appended one by one into the buffer + + size_type insertOffset = AZStd::distance(cbegin(), first); + size_type postInsertOffset = AZStd::distance(cbegin(), last); + size_type count = AZStd::distance(replaceFirst, replaceLast); + size_type newSize = m_size + count - AZStd::distance(first, last); + if (fits_in_capacity(newSize)) + { + Traits::move(first + count, last, m_size - postInsertOffset); // empty out hole + for (size_t updateIndex = insertOffset; replaceFirst != replaceLast; ++replaceFirst, ++updateIndex) + { + Traits::assign(m_buffer[updateIndex], static_cast(*replaceFirst)); + } + m_size = static_cast(newSize); + Traits::assign(m_buffer[newSize], Element()); // terminate + } + return *this; + } + else + { + // input iterator that aren't forward iterators can only be used in a single pass + // algorithm. Therefore AZStd::distance can't be used + // So the input is copied into a local string and then delegated + // to use the (const_pointer, size_type) overload + basic_fixed_string inputCopy; + for (; replaceFirst != replaceLast; ++replaceFirst) + { + inputCopy.push_back(static_cast(*replaceFirst)); + } + + return replace(first, last, inputCopy.c_str(), inputCopy.size()); + } } template inline constexpr auto basic_fixed_string::replace(const_iterator first, const_iterator last, AZStd::initializer_list ilist) -> basic_fixed_string& - { // replace [first, last) with [first2,last2) - return replace_iter(first, last, ilist.begin(), ilist.end()); + { + return replace(first, last, ilist.begin(), ilist.end()); } template @@ -1411,54 +1516,6 @@ namespace AZStd return result; } - template - template - inline constexpr auto basic_fixed_string::construct_iter(InputIt first, InputIt last) - -> enable_if_t && !is_convertible_v> - { - // initialize from [first, last), input iterators - for (; first != last; ++first) - { - append((size_type)1, (Element)* first); - } - } - - template - template - inline constexpr auto basic_fixed_string::append_iter(InputIt first, InputIt last) - -> enable_if_t && !is_convertible_v, basic_fixed_string&> - { // append [first, last), input iterators - return replace(end(), end(), first, last); - } - - template - template - inline constexpr auto basic_fixed_string::assign_iter(InputIt first, InputIt last) - -> enable_if_t && !is_convertible_v, basic_fixed_string&> - { - return replace(begin(), end(), first, last); - } - - template - template - inline constexpr auto basic_fixed_string::insert_iter(const_iterator insertPos, InputIt first, - InputIt last) -> enable_if_t && !is_convertible_v, iterator> - { // insert [first, last) at insertPos, input iterators - difference_type offset = insertPos - cbegin(); - replace(insertPos, insertPos, first, last); - return iterator(m_buffer + offset); - } - - template - template - inline constexpr auto basic_fixed_string::replace_iter(const_iterator first, const_iterator last, - InputIt first2, InputIt last2) -> enable_if_t && !is_convertible_v, basic_fixed_string&> - { // replace [first, last) with [first2, last2), input iterators - basic_fixed_string rhs(first2, last2); - replace(first, last, rhs); - return *this; - } - template inline constexpr auto basic_fixed_string::fits_in_capacity(size_type newSize)-> bool { @@ -1680,6 +1737,26 @@ namespace AZStd return !operator<(lhs, rhs); } + template + inline constexpr auto erase(basic_fixed_string& container, const U& element) + -> typename basic_fixed_string::size_type + { + auto iter = AZStd::remove(container.begin(), container.end(), element); + auto removedCount = AZStd::distance(iter, container.end()); + container.erase(iter, container.end()); + return removedCount; + } + + template + inline constexpr auto erase_if(basic_fixed_string& container, Predicate predicate) + -> typename basic_fixed_string::size_type + { + auto iter = AZStd::remove_if(container.begin(), container.end(), predicate); + auto removedCount = AZStd::distance(iter, container.end()); + container.erase(iter, container.end()); + return removedCount; + } + template struct hash> { diff --git a/Code/Framework/AzCore/AzCore/std/string/memorytoascii.cpp b/Code/Framework/AzCore/AzCore/std/string/memorytoascii.cpp index 8f2d5ddf25..21f3a1c5f4 100644 --- a/Code/Framework/AzCore/AzCore/std/string/memorytoascii.cpp +++ b/Code/Framework/AzCore/AzCore/std/string/memorytoascii.cpp @@ -8,179 +8,176 @@ #include -namespace AZStd +namespace AZStd::MemoryToASCII { - namespace MemoryToASCII + AZStd::string ToString(const void* memoryAddrs, AZStd::size_t dataSize, AZStd::size_t maxShowSize, AZStd::size_t dataWidth/*=16*/, Options format/*=Options::Default*/) { - AZStd::string ToString(const void* memoryAddrs, AZStd::size_t dataSize, AZStd::size_t maxShowSize, AZStd::size_t dataWidth/*=16*/, Options format/*=Options::Default*/) + AZStd::string output; + + if ((memoryAddrs != nullptr) && (dataSize > 0)) { - AZStd::string output; + const AZ::u8 *data = reinterpret_cast(memoryAddrs); - if ((memoryAddrs != nullptr) && (dataSize > 0)) + if (static_cast(format) != 0) { - const AZ::u8 *data = reinterpret_cast(memoryAddrs); + output.reserve(8162); - if (static_cast(format) != 0) + bool showHeader = static_cast(format) & static_cast(Options::Header) ? true : false; + bool showOffset = static_cast(format) & static_cast(Options::Offset) ? true : false; + bool showBinary = static_cast(format) & static_cast(Options::Binary) ? true : false; + bool showASCII = static_cast(format) & static_cast(Options::ASCII) ? true : false; + bool showInfo = static_cast(format) & static_cast(Options::Info) ? true : false; + + // Because of the auto formatting for the headers, the min width is 3 + if (dataWidth < 3) { - output.reserve(8162); + dataWidth = 3; + } - bool showHeader = static_cast(format) & static_cast(Options::Header) ? true : false; - bool showOffset = static_cast(format) & static_cast(Options::Offset) ? true : false; - bool showBinary = static_cast(format) & static_cast(Options::Binary) ? true : false; - bool showASCII = static_cast(format) & static_cast(Options::ASCII) ? true : false; - bool showInfo = static_cast(format) & static_cast(Options::Info) ? true : false; + if (showHeader) + { + AZStd::string line1; + AZStd::string line2; + line1.reserve(1024); + line2.reserve(1024); - // Because of the auto formatting for the headers, the min width is 3 - if (dataWidth < 3) + if (showOffset) { - dataWidth = 3; + line1 += "Offset"; + line2 += "------"; + + if (showBinary || showASCII) + { + line1 += " "; + line2 += " "; + } } - if (showHeader) + if (showBinary) { - AZStd::string line1; - AZStd::string line2; - line1.reserve(1024); - line2.reserve(1024); + static const char *kHeaderName = "Data"; + static AZStd::size_t kHeaderNameSize = 4; - if (showOffset) + AZStd::size_t lineLength = (dataWidth * 3) - 1; + AZStd::size_t numPreSpaces = (lineLength - kHeaderNameSize) / 2; + AZStd::size_t numPostSpaces = lineLength - numPreSpaces - kHeaderNameSize; + + line1 += AZStd::string(numPreSpaces, ' ') + kHeaderName + AZStd::string(numPostSpaces, ' '); + //line2 += AZStd::string(lineLength, '-'); + for(size_t i=0; i 0) { - line1 += " "; - line2 += " "; - } - } - - if (showBinary) - { - static const char *kHeaderName = "Data"; - static AZStd::size_t kHeaderNameSize = 4; - - AZStd::size_t lineLength = (dataWidth * 3) - 1; - AZStd::size_t numPreSpaces = (lineLength - kHeaderNameSize) / 2; - AZStd::size_t numPostSpaces = lineLength - numPreSpaces - kHeaderNameSize; - - line1 += AZStd::string(numPreSpaces, ' ') + kHeaderName + AZStd::string(numPostSpaces, ' '); - //line2 += AZStd::string(lineLength, '-'); - for(size_t i=0; i 0) - { - line2 += "-"; - } - - line2 += AZStd::string::format("%02zx", i); + line2 += "-"; } - if (showASCII) - { - line1 += " "; - line2 += " "; - } + line2 += AZStd::string::format("%02zx", i); } if (showASCII) { - static const char *kHeaderName = "ASCII"; - static AZStd::size_t kHeaderNameSize = 5; - - AZStd::size_t numPreSpaces = (dataWidth - kHeaderNameSize) / 2; - AZStd::size_t numPostSpaces = dataWidth - numPreSpaces - kHeaderNameSize; - - line1 += AZStd::string(numPreSpaces, ' ') + kHeaderName + AZStd::string(numPostSpaces, ' '); - line2 += AZStd::string(dataWidth, '-'); + line1 += " "; + line2 += " "; } - - if (showInfo) - { - output += AZStd::string::format("Address: 0x%p Data Size:%zu Max Size:%zu\n", data, dataSize, maxShowSize); - } - - output += line1 + "\n"; - output += line2 + "\n"; } - AZStd::size_t offset = 0; - AZStd::size_t maxSize = dataSize > maxShowSize ? maxShowSize : dataSize; - - while (offset < maxSize) + if (showASCII) { - if (showOffset) - { - output += AZStd::string::format("%06zx", offset); + static const char *kHeaderName = "ASCII"; + static AZStd::size_t kHeaderNameSize = 5; - if (showBinary || showASCII) + AZStd::size_t numPreSpaces = (dataWidth - kHeaderNameSize) / 2; + AZStd::size_t numPostSpaces = dataWidth - numPreSpaces - kHeaderNameSize; + + line1 += AZStd::string(numPreSpaces, ' ') + kHeaderName + AZStd::string(numPostSpaces, ' '); + line2 += AZStd::string(dataWidth, '-'); + } + + if (showInfo) + { + output += AZStd::string::format("Address: 0x%p Data Size:%zu Max Size:%zu\n", data, dataSize, maxShowSize); + } + + output += line1 + "\n"; + output += line2 + "\n"; + } + + AZStd::size_t offset = 0; + AZStd::size_t maxSize = dataSize > maxShowSize ? maxShowSize : dataSize; + + while (offset < maxSize) + { + if (showOffset) + { + output += AZStd::string::format("%06zx", offset); + + if (showBinary || showASCII) + { + output += " "; + } + } + + if (showBinary) + { + AZStd::string binLine; + binLine.reserve((dataWidth * 3) * 2); + + for (AZStd::size_t index = 0; index < dataWidth; index++) + { + if (!binLine.empty()) { - output += " "; + binLine += " "; + } + + if ((offset + index) < maxSize) + { + binLine += AZStd::string::format("%02x", data[offset + index]); + } + else + { + binLine += " "; } } - if (showBinary) - { - AZStd::string binLine; - binLine.reserve((dataWidth * 3) * 2); - - for (AZStd::size_t index = 0; index < dataWidth; index++) - { - if (!binLine.empty()) - { - binLine += " "; - } - - if ((offset + index) < maxSize) - { - binLine += AZStd::string::format("%02x", data[offset + index]); - } - else - { - binLine += " "; - } - } - - output += binLine; - - if (showASCII) - { - output += " "; - } - } + output += binLine; if (showASCII) { - AZStd::string asciiLine; - asciiLine.reserve(dataWidth * 2); + output += " "; + } + } - for (AZStd::size_t index = 0; index < dataWidth; index++) + if (showASCII) + { + AZStd::string asciiLine; + asciiLine.reserve(dataWidth * 2); + + for (AZStd::size_t index = 0; index < dataWidth; index++) + { + if ((offset + index) > maxSize) { - if ((offset + index) > maxSize) - { - break; - } - else - { - char value = static_cast(data[offset + index]); - - if ((value < 32) || (value > 127)) - value = ' '; - - asciiLine += value; - } + break; } + else + { + char value = static_cast(data[offset + index]); - output += asciiLine; + if ((value < 32) || (value > 127)) + value = ' '; + + asciiLine += value; + } } - output += "\n"; - offset += dataWidth; + output += asciiLine; } + + output += "\n"; + offset += dataWidth; } } - - return output; } - } // namespace MemoryToASCII -} // namespace AZStd + + return output; + } +} // namespace AZStd::MemoryToASCII diff --git a/Code/Framework/AzCore/AzCore/std/string/string.h b/Code/Framework/AzCore/AzCore/std/string/string.h index 9ef7ea3086..7dd6dd7065 100644 --- a/Code/Framework/AzCore/AzCore/std/string/string.h +++ b/Code/Framework/AzCore/AzCore/std/string/string.h @@ -5,24 +5,43 @@ * SPDX-License-Identifier: Apache-2.0 OR MIT * */ -#ifndef AZSTD_STRING_H -#define AZSTD_STRING_H +#pragma once #include #include #include #include +#include #include #include #include #include #include -#include #include #include +namespace AZStd::StringInternal +{ + template + struct Padding + { + AZ::u8 m_padding[ElementSize - 1]; + }; + + template + struct Padding + {}; +} + +#if defined(HAVE_BENCHMARK) +namespace Benchmark +{ + class StringBenchmarkFixture; +} +#endif + namespace AZStd { /** @@ -35,130 +54,95 @@ namespace AZStd : public Debug::checked_container_base #endif { - typedef basic_string this_type; + using this_type = basic_string; public: - typedef Element* pointer; - typedef const Element* const_pointer; + using pointer = Element*; + using const_pointer = const Element*; - typedef Element& reference; - typedef const Element& const_reference; - typedef typename Allocator::difference_type difference_type; - typedef typename Allocator::size_type size_type; + using reference = Element&; + using const_reference = const Element&; + using difference_type = typename Allocator::difference_type; + using size_type = typename Allocator::size_type; - typedef pointer iterator_impl; - typedef const_pointer const_iterator_impl; + using iterator_impl = pointer; + using const_iterator_impl = const_pointer; #ifdef AZSTD_HAS_CHECKED_ITERATORS - typedef Debug::checked_randomaccess_iterator iterator; - typedef Debug::checked_randomaccess_iterator const_iterator; + using iterator = Debug::checked_randomaccess_iterator; + using const_iterator = Debug::checked_randomaccess_iterator; #else - typedef iterator_impl iterator; - typedef const_iterator_impl const_iterator; + using iterator = iterator_impl; + using const_iterator = const_iterator_impl; #endif - typedef AZStd::reverse_iterator reverse_iterator; - typedef AZStd::reverse_iterator const_reverse_iterator; - typedef Element value_type; - typedef Traits traits_type; - typedef Allocator allocator_type; + using reverse_iterator = AZStd::reverse_iterator; + using const_reverse_iterator = AZStd::reverse_iterator; + using value_type = Element; + using traits_type = Traits; + using allocator_type = Allocator; // AZSTD extension. /** * \brief Allocation node type. Common for all AZStd containers. * In vectors case we allocate always "sizeof(node_type)*capacity" block. */ - typedef value_type node_type; + using node_type = value_type; - static const size_type npos = size_type(-1); + inline static constexpr size_type npos = size_type(-1); inline basic_string(const Allocator& alloc = Allocator()) - : m_size(0) - , m_capacity(SSO_BUF_SIZE - 1) - , m_allocator(alloc) + : m_storage{ skip_element_tag{}, alloc } { - Traits::assign(m_buffer[0], Element()); + Traits::assign(m_storage.first().GetData()[0], Element()); } inline basic_string(const_pointer ptr, size_type count, const Allocator& alloc = Allocator()) - : m_size(0) - , m_capacity(SSO_BUF_SIZE - 1) - , m_allocator(alloc) + : m_storage{ skip_element_tag{}, alloc } { // construct from [ptr, ptr + count) assign(ptr, count); } inline basic_string(const_pointer ptr, const Allocator& alloc = Allocator()) - : m_size(0) - , m_capacity(SSO_BUF_SIZE - 1) - , m_allocator(alloc) + : m_storage{ skip_element_tag{}, alloc } { // construct from [ptr, ) assign(ptr); } inline basic_string(size_type count, Element ch, const Allocator& alloc = Allocator()) - : m_size(0) - , m_capacity(SSO_BUF_SIZE - 1) - , m_allocator(alloc) + : m_storage{ skip_element_tag{}, alloc } { // construct from count * ch assign(count, ch); } - template - inline basic_string(InputIterator first, InputIterator last, const Allocator& alloc = Allocator()) - : m_size(0) - , m_capacity(SSO_BUF_SIZE - 1) - , m_allocator(alloc) + template && !is_convertible_v>> + inline basic_string(InputIt first, InputIt last, const Allocator& alloc = Allocator()) + : m_storage{ skip_element_tag{}, alloc } { // construct from [first, last) - if (first == last) - { - Traits::assign(m_buffer[0], Element()); // terminate - } - else - { - construct_iter(first, last, is_integral()); - } + assign(first, last); } inline basic_string(const_pointer first, const_pointer last) - : m_size(0) - , m_capacity(SSO_BUF_SIZE - 1) { // construct from [first, last), const pointers - assign(&*first, last - first); + assign(first, last - first); } - //inline basic_string(const_iterator _First, const_iterator _Last) - // : m_size(0) - // , m_capacity(SSO_BUF_SIZE-1) - //{ // construct from [_First, _Last), const_iterators - // if (first != last) - // assign(&*first, last - first); - //} - inline basic_string(const this_type& rhs) - : m_size(0) - , m_capacity(SSO_BUF_SIZE - 1) - , m_allocator(rhs.m_allocator) + : m_storage{ skip_element_tag{}, rhs.m_storage.second() } { assign(rhs, 0, npos); } inline basic_string(this_type&& rhs) - : m_size(0) - , m_capacity(SSO_BUF_SIZE - 1) - , m_allocator(AZStd::move(rhs.m_allocator)) + : m_storage{ skip_element_tag{}, AZStd::move(rhs.m_storage.second()) } { assign(AZStd::forward(rhs)); } inline basic_string(const this_type& rhs, size_type rhsOffset, size_type count = npos) - : m_size(0) - , m_capacity(SSO_BUF_SIZE - 1) { // construct from rhs [rhsOffset, rhsOffset + count) assign(rhs, rhsOffset, count); } inline basic_string(const this_type& rhs, size_type rhsOffset, size_type count, const Allocator& alloc) - : m_size(0) - , m_capacity(SSO_BUF_SIZE - 1) - , m_allocator(alloc) + : m_storage{ skip_element_tag{}, alloc } { // construct from rhs [rhsOffset, rhsOffset + count) with allocator assign(rhs, rhsOffset, count); } @@ -174,7 +158,7 @@ namespace AZStd inline ~basic_string() { // destroy the string - deallocate_memory(m_data, 0, typename allocator_type::allow_memory_leaks()); + deallocate_memory(m_storage.first().GetData(), 0, typename allocator_type::allow_memory_leaks()); } operator AZStd::basic_string_view() const @@ -182,12 +166,12 @@ namespace AZStd return AZStd::basic_string_view(data(), size()); } - inline iterator begin() { return iterator(AZSTD_CHECKED_ITERATOR(iterator_impl, SSO_BUF_SIZE <= m_capacity ? m_data : m_buffer)); } - inline const_iterator begin() const { return const_iterator(AZSTD_CHECKED_ITERATOR(const_iterator_impl, SSO_BUF_SIZE <= m_capacity ? m_data : m_buffer)); } - inline const_iterator cbegin() const { return const_iterator(AZSTD_CHECKED_ITERATOR(const_iterator_impl, SSO_BUF_SIZE <= m_capacity ? m_data : m_buffer)); } - inline iterator end() { return iterator(AZSTD_CHECKED_ITERATOR(iterator_impl, (SSO_BUF_SIZE <= m_capacity ? m_data : m_buffer) + m_size)); } - inline const_iterator end() const { return const_iterator(AZSTD_CHECKED_ITERATOR(const_iterator_impl, (SSO_BUF_SIZE <= m_capacity ? m_data : m_buffer) + m_size)); } - inline const_iterator cend() const { return const_iterator(AZSTD_CHECKED_ITERATOR(const_iterator_impl, (SSO_BUF_SIZE <= m_capacity ? m_data : m_buffer) + m_size)); } + inline iterator begin() { return iterator(AZSTD_CHECKED_ITERATOR(iterator_impl, m_storage.first().GetData())); } + inline const_iterator begin() const { return const_iterator(AZSTD_CHECKED_ITERATOR(const_iterator_impl, m_storage.first().GetData())); } + inline const_iterator cbegin() const { return const_iterator(AZSTD_CHECKED_ITERATOR(const_iterator_impl, m_storage.first().GetData())); } + inline iterator end() { return iterator(AZSTD_CHECKED_ITERATOR(iterator_impl, (m_storage.first().GetData()) + m_storage.first().GetSize())); } + inline const_iterator end() const { return const_iterator(AZSTD_CHECKED_ITERATOR(const_iterator_impl, (m_storage.first().GetData()) + m_storage.first().GetSize())); } + inline const_iterator cend() const { return const_iterator(AZSTD_CHECKED_ITERATOR(const_iterator_impl, (m_storage.first().GetData()) + m_storage.first().GetSize())); } inline reverse_iterator rbegin() { return reverse_iterator(end()); } inline const_reverse_iterator rbegin() const { return const_reverse_iterator(end()); } inline const_reverse_iterator crbegin() const { return const_reverse_iterator(end()); } @@ -196,7 +180,7 @@ namespace AZStd inline const_reverse_iterator crend() const { return const_reverse_iterator(begin()); } inline this_type& operator=(const this_type& rhs) { return assign(rhs); } - inline this_type& operator=(this_type&& rhs) { return assign(AZStd::forward(rhs)); } + inline this_type& operator=(this_type&& rhs) { return assign(AZStd::move(rhs)); } inline this_type& operator=(AZStd::basic_string_view view) { return assign(view); } inline this_type& operator=(const_pointer ptr) { return assign(ptr); } inline this_type& operator=(Element ch) { return assign(1, ch); } @@ -208,21 +192,18 @@ namespace AZStd this_type& append(const this_type& rhs, size_type rhsOffset, size_type count) { // append rhs [rhsOffset, rhsOffset + count) AZSTD_CONTAINER_ASSERT(rhs.size() >= rhsOffset, "Invalid offset!"); - size_type num = rhs.m_size - rhsOffset; - if (num < count) + count = AZStd::min(count, rhs.size() - rhsOffset); + + size_type oldSize = size(); + size_type newSize = oldSize + count; + if (count > 0 && grow(newSize)) { - count = num; // trim count to size - } - AZSTD_CONTAINER_ASSERT(npos - m_size > count && m_size + count >= m_size, "result is too long!"); - num = m_size + count; - if (count > 0 && grow(num)) - { - pointer data = SSO_BUF_SIZE <= m_capacity ? m_data : m_buffer; - const_pointer rhsData = SSO_BUF_SIZE <= rhs.m_capacity ? rhs.m_data : rhs.m_buffer; + pointer data = m_storage.first().GetData(); + const_pointer rhsData = rhs.data(); // make room and append new stuff - Traits::copy(data + m_size /*, m_capacity - m_size*/, rhsData + rhsOffset, count); - m_size = num; - Traits::assign(data[num], Element()); // terminate + Traits::copy(data + oldSize, rhsData + rhsOffset, count); + m_storage.first().SetSize(newSize); + Traits::assign(data[newSize], Element()); // terminate } return *this; } @@ -230,20 +211,21 @@ namespace AZStd this_type& append(const_pointer ptr, size_type count) { // append [ptr, ptr + count) - pointer data = SSO_BUF_SIZE <= m_capacity ? m_data : m_buffer; - if (ptr != 0 && ptr >= data && (data + m_size) > ptr) + pointer data = m_storage.first().GetData(); + if (ptr != nullptr && ptr >= data && (data + size()) > ptr) { return append(*this, ptr - data, count); // substring } - AZSTD_CONTAINER_ASSERT(npos - m_size > count && m_size + count >= m_size, "result is too long!"); - size_type num = m_size + count; - if (count > 0 && grow(num)) + AZSTD_CONTAINER_ASSERT(npos - size() > count && size() + count >= size(), "result is too long!"); + size_type oldSize = size(); + size_type newSize = oldSize + count; + if (count > 0 && grow(newSize)) { // make room and append new stuff - data = SSO_BUF_SIZE <= m_capacity ? m_data : m_buffer; - Traits::copy(data + m_size /*, m_capacity - m_size*/, ptr, count); - m_size = num; - Traits::assign(data[num], Element()); // terminate + data = m_storage.first().GetData(); + Traits::copy(data + oldSize , ptr, count); + m_storage.first().SetSize(newSize); + Traits::assign(data[newSize], Element()); // terminate } return *this; } @@ -252,30 +234,60 @@ namespace AZStd this_type& append(size_type count, Element ch) { // append count * ch - AZSTD_CONTAINER_ASSERT(npos - m_size > count, "result is too long"); - size_type num = m_size + count; + AZSTD_CONTAINER_ASSERT(npos - size() > count, "result is too long"); + size_type num = size() + count; if (count > 0 && grow(num)) { - pointer data = SSO_BUF_SIZE <= m_capacity ? m_data : m_buffer; + pointer data = m_storage.first().GetData(); // make room and append new stuff using assign - if (count == 1) - { - Traits::assign(*(data + m_size), ch); - } - else - { - Traits::assign(data + m_size, count, ch); - } - m_size = num; + Traits::assign(data + size(), count, ch); + m_storage.first().SetSize(num); Traits::assign(data[num], Element()); // terminate } return *this; } - template - inline this_type& append(InputIterator first, InputIterator last) + template + inline auto append(InputIt first, InputIt last) + -> enable_if_t && !is_convertible_v, this_type&> { // append [first, last) - return append_iter(first, last, AZStd::is_integral()); + if constexpr (Internal::satisfies_contiguous_iterator_concept_v + && is_same_v::value_type, value_type>) + { + return append(AZStd::to_address(first), AZStd::distance(first, last)); + } + else if constexpr (Internal::is_forward_iterator_v) + { + // Input Iterator pointer type doesn't match the const_pointer type + // So the elements need to be appended one by one into the buffer + size_type oldSize = size(); + size_type newSize = oldSize + AZStd::distance(first, last); + if (grow(newSize)) + { + pointer buffer = data(); + for (size_t updateIndex = oldSize; first != last; ++first, ++updateIndex) + { + Traits::assign(buffer[updateIndex], static_cast(*first)); + } + m_storage.first().SetSize(newSize); + Traits::assign(buffer[newSize], Element()); // terminate + } + return *this; + } + else + { + // input iterator that aren't forward iterators can only be used in a single pass + // algorithm. Therefore AZStd::distance can't be used + // So the input is copied into a local string and then delegated + // to use the (const_pointer, size_type) overload + basic_string inputCopy; + for (; first != last; ++first) + { + inputCopy.push_back(static_cast(*first)); + } + + return append(inputCopy.c_str(), inputCopy.size()); + } } inline this_type& append(const_pointer first, const_pointer last) @@ -283,11 +295,6 @@ namespace AZStd return replace(end(), end(), first, last); } - //inline this_type& append(const_iterator first, const_iterator last) - //{ // append [first, last), const_iterators - // return replace(end(), end(), first, last); - //} - inline this_type& assign(const this_type& rhs) { return assign(rhs, 0, npos); @@ -302,27 +309,34 @@ namespace AZStd { if (this != &rhs) { - if (SSO_BUF_SIZE <= m_capacity) + deallocate_memory(m_storage.first().GetData(), 0, typename allocator_type::allow_memory_leaks()); + + m_storage.first().SetCapacity(rhs.capacity()); + + pointer data = m_storage.first().GetData(); + pointer rhsData = rhs.data(); + // Memmove the right hand side string data if it is using the short string optimization + // Otherwise set the pointer to the right hand side + if (rhs.m_storage.first().ShortStringOptimizationActive()) { - deallocate_memory(m_data, 0, typename allocator_type::allow_memory_leaks()); + Traits::move(data, rhsData, rhs.size() + 1); // string + null-terminator } + else + { + m_storage.first().SetData(rhsData); + } + m_storage.first().SetSize(rhs.size()); + m_storage.second() = rhs.m_storage.second(); - Traits::move(m_buffer, rhs.m_buffer, sizeof(m_buffer)); - m_size = rhs.m_size; - m_capacity = rhs.m_capacity; - m_allocator = rhs.m_allocator; - - rhs.m_data = nullptr; - rhs.m_size = 0; - rhs.m_capacity = SSO_BUF_SIZE - 1; + rhs.leak_and_reset(); } return *this; } this_type& assign(const this_type& rhs, size_type rhsOffset, size_type count) { // assign rhs [rhsOffset, rhsOffset + count) - AZSTD_CONTAINER_ASSERT(rhs.m_size >= rhsOffset, "Invalid offset"); - size_type num = rhs.m_size - rhsOffset; + AZSTD_CONTAINER_ASSERT(rhs.size() >= rhsOffset, "Invalid offset"); + size_type num = rhs.size() - rhsOffset; if (count < num) { num = count; // trim num to size @@ -334,10 +348,10 @@ namespace AZStd } else if (grow(num)) { // make room and assign new stuff - pointer data = SSO_BUF_SIZE <= m_capacity ? m_data : m_buffer; - const_pointer rhsData = SSO_BUF_SIZE <= rhs.m_capacity ? rhs.m_data : rhs.m_buffer; - Traits::copy(data /*, m_capacity*/, rhsData + rhsOffset, num); - m_size = num; + pointer data = m_storage.first().GetData(); + const_pointer rhsData = rhs.data(); + Traits::copy(data, rhsData + rhsOffset, num); + m_storage.first().SetSize(num); Traits::assign(data[num], Element()); // terminate } return *this; @@ -345,20 +359,20 @@ namespace AZStd this_type& assign(const_pointer ptr, size_type count) { // assign [ptr, ptr + count) - pointer data = SSO_BUF_SIZE <= m_capacity ? m_data : m_buffer; - if (ptr != 0 && ptr >= data && (data + m_size) > ptr) + pointer data = m_storage.first().GetData(); + if (ptr != nullptr && ptr >= data && (data + size()) > ptr) { return assign(*this, ptr - data, count); // substring } if (grow(count)) { // make room and assign new stuff - data = SSO_BUF_SIZE <= m_capacity ? m_data : m_buffer; + data = m_storage.first().GetData(); if (count > 0) { Traits::copy(data, ptr, count); } - m_size = count; + m_storage.first().SetSize(count); Traits::assign(data[count], Element()); // terminate } return *this; @@ -367,109 +381,132 @@ namespace AZStd this_type& assign(size_type count, Element ch) { // assign count * ch - AZSTD_CONTAINER_ASSERT(count != npos, "result is too long!"); if (grow(count)) { // make room and assign new stuff - pointer data = SSO_BUF_SIZE <= m_capacity ? m_data : m_buffer; - if (count == 1) - { - Traits::assign(*(data), ch); - } - else - { - Traits::assign(data, count, ch); - } - m_size = count; + pointer data = m_storage.first().GetData(); + Traits::assign(data, count, ch); + m_storage.first().SetSize(count); Traits::assign(data[count], Element()); // terminate } return *this; } - template - inline this_type& assign(InputIterator first, InputIterator last) { return assign_iter(first, last, AZStd::is_integral()); } - inline this_type& assign(const_pointer first, const_pointer last) { return replace(begin(), end(), first, last); } - inline this_type& insert(size_type offset, const this_type& rhs) { return insert(offset, rhs, 0, npos); } + template + auto assign(InputIt first, InputIt last) + -> enable_if_t && !is_convertible_v, this_type&> + { + if constexpr (Internal::satisfies_contiguous_iterator_concept_v + && is_same_v::value_type, value_type>) + { + return assign(AZStd::to_address(first), AZStd::distance(first, last)); + } + else if constexpr (Internal::is_forward_iterator_v) + { + // forward iterator pointer type doesn't match the const_pointer type + // So the elements need to be assigned one by one into the buffer + size_type newSize = AZStd::distance(first, last); + if (grow(newSize)) + { + pointer buffer = data(); + for (size_t updateIndex = 0; first != last; ++first, ++updateIndex) + { + Traits::assign(buffer[updateIndex], static_cast(*first)); + } + m_storage.first().SetSize(newSize); + Traits::assign(buffer[newSize], Element()); // terminate + } + return *this; + } + else + { + // input iterator that aren't forward iterators can only be used in a single pass + // algorithm. Therefore AZStd::distance can't be used + // So the input is copied into a local string and then delegated + // to use the (const_pointer, size_type) overload + basic_string inputCopy; + for (; first != last; ++first) + { + inputCopy.push_back(static_cast(*first)); + } + + return assign(inputCopy.c_str(), inputCopy.size()); + } + } + inline this_type& insert(size_type offset, const this_type& rhs) { return insert(offset, rhs, 0, npos); } this_type& insert(size_type offset, const this_type& rhs, size_type rhsOffset, size_type count) { // insert rhs [rhsOffset, rhsOffset + count) at offset - AZSTD_CONTAINER_ASSERT(m_size >= offset && rhs.m_size >= rhsOffset, "Invalid offset(s)"); - size_type num = rhs.m_size - rhsOffset; + AZSTD_CONTAINER_ASSERT(size() >= offset && rhs.size() >= rhsOffset, "Invalid offset(s)"); + size_type num = rhs.size() - rhsOffset; if (num < count) { count = num; // trim _Count to size } - AZSTD_CONTAINER_ASSERT(npos - m_size > count, "Result is too long"); - num = m_size + count; + AZSTD_CONTAINER_ASSERT(npos - size() > count, "Result is too long"); + num = size() + count; if (count > 0 && grow(num)) { - pointer data = SSO_BUF_SIZE <= m_capacity ? m_data : m_buffer; + pointer data = m_storage.first().GetData(); // make room and insert new stuff - Traits::move(data + offset + count /*, m_capacity - offset - count*/, data + offset, m_size - offset); // empty out hole + Traits::move(data + offset + count, data + offset, size() - offset); // empty out hole if (this == &rhs) { - Traits::move(data + offset /*, m_capacity - offset*/, data + (offset < rhsOffset ? rhsOffset + count : rhsOffset), count); // substring + Traits::move(data + offset, data + (offset < rhsOffset ? rhsOffset + count : rhsOffset), count); // substring } else { - const_pointer rhsData = SSO_BUF_SIZE <= rhs.m_capacity ? rhs.m_data : rhs.m_buffer; - Traits::copy(data + offset /*, m_capacity - offset*/, rhsData + rhsOffset, count); // fill hole + const_pointer rhsData = rhs.data(); + Traits::copy(data + offset, rhsData + rhsOffset, count); // fill hole } - m_size = num; + m_storage.first().SetSize(num); Traits::assign(data[num], Element()); // terminate } return (*this); } - this_type& insert(size_type offset, const_pointer ptr, size_type count) + this_type& insert(size_type offset, const_pointer ptr, size_type count) { // insert [ptr, ptr + count) at offset - pointer data = SSO_BUF_SIZE <= m_capacity ? m_data : m_buffer; - if (ptr != 0 && ptr >= data && (data + m_size) > ptr) + pointer data = m_storage.first().GetData(); + if (ptr != nullptr && ptr >= data && (data + size()) > ptr) { - return insert(offset, *this, ptr - data, count); // substring + return insert(offset, *this, ptr - data, count); // substring } - AZSTD_CONTAINER_ASSERT(m_size >= offset, "Invalid offset"); - AZSTD_CONTAINER_ASSERT(npos - m_size > count, "Result is too long"); - size_type num = m_size + count; + AZSTD_CONTAINER_ASSERT(size() >= offset, "Invalid offset"); + AZSTD_CONTAINER_ASSERT(npos - size() > count, "Result is too long"); + size_type num = size() + count; if (count > 0 && grow(num)) { // make room and insert new stuff - data = SSO_BUF_SIZE <= m_capacity ? m_data : m_buffer; - Traits::move(data + offset + count /*, m_capacity - offset - count*/, data + offset, m_size - offset); // empty out hole - Traits::copy(data + offset /*, m_capacity - offset*/, ptr, count); // fill hole - m_size = num; + data = m_storage.first().GetData(); + Traits::move(data + offset + count, data + offset, size() - offset); // empty out hole + Traits::copy(data + offset, ptr, count); // fill hole + m_storage.first().SetSize(num); Traits::assign(data[num], Element()); // terminate } return *this; } - inline this_type& insert(size_type offset, const_pointer ptr) { return insert(offset, ptr, Traits::length(ptr)); } + inline this_type& insert(size_type offset, const_pointer ptr) { return insert(offset, ptr, Traits::length(ptr)); } this_type& insert(size_type offset, size_type count, Element ch) { // insert count * ch at offset - AZSTD_CONTAINER_ASSERT(m_size >= offset, "Invalid offset"); - AZSTD_CONTAINER_ASSERT(npos - m_size > count, "Result is too long"); - size_type num = m_size + count; + AZSTD_CONTAINER_ASSERT(size() >= offset, "Invalid offset"); + AZSTD_CONTAINER_ASSERT(npos - size() > count, "Result is too long"); + size_type num = size() + count; if (count > 0 && grow(num)) { - pointer data = SSO_BUF_SIZE <= m_capacity ? m_data : m_buffer; + pointer data = m_storage.first().GetData(); // make room and insert new stuff - Traits::move(data + offset + count /*, m_capacity - offset - count*/, data + offset, m_size - offset); // empty out hole - if (count == 1) - { - Traits::assign(*(data + offset), ch); - } - else - { - Traits::assign(data + offset, count, ch); - } - m_size = num; + Traits::move(data + offset + count, data + offset, size() - offset); // empty out hole + Traits::assign(data + offset, count, ch); + m_storage.first().SetSize(num); Traits::assign(data[num], Element()); // terminate } return *this; } - inline iterator insert(const_iterator insertPos) { return insert(insertPos, Element()); } + inline iterator insert(const_iterator insertPos) { return insert(insertPos, Element()); } iterator insert(const_iterator insertPos, Element ch) { @@ -479,54 +516,89 @@ namespace AZStd const_pointer insertPosPtr = insertPos; #endif - const_pointer data = SSO_BUF_SIZE <= m_capacity ? m_data : m_buffer; + const_pointer data = m_storage.first().GetData(); size_type offset = insertPosPtr - data; insert(offset, 1, ch); return iterator(AZSTD_CHECKED_ITERATOR(iterator_impl, data + offset)); } - void insert(const_iterator insertPos, size_type count, Element ch) + iterator insert(const_iterator insertPos, size_type count, Element ch) { // insert count * elem at insertPos #ifdef AZSTD_HAS_CHECKED_ITERATORS const_pointer insertPosPtr = insertPos.get_iterator(); #else const_pointer insertPosPtr = insertPos; #endif - pointer data = SSO_BUF_SIZE <= m_capacity ? m_data : m_buffer; + pointer data = m_storage.first().GetData(); size_type offset = insertPosPtr - data; insert(offset, count, ch); + return begin() + offset; } - template - inline void insert(const_iterator insertPos, InputIterator first, InputIterator last) + template + auto insert(const_iterator insertPos, InputIt first, InputIt last) + -> enable_if_t && !is_convertible_v, iterator> { // insert [_First, _Last) at _Where - insert_iter(insertPos, first, last, is_integral()); - } + size_type insertOffset = AZStd::distance(cbegin(), insertPos); + if constexpr (Internal::satisfies_contiguous_iterator_concept_v + && is_same_v::value_type, value_type>) + { + insert(insertOffset, AZStd::to_address(first), AZStd::distance(first, last)); + } + else if constexpr (Internal::is_forward_iterator_v) + { + // Input Iterator pointer type doesn't match the const_pointer type + // So the elements need to be inserted one by one into the buffer + size_type count = AZStd::distance(first, last); + size_type oldSize = size(); + size_type newSize = oldSize + count; + if (grow(newSize)) + { + pointer buffer = m_storage.first().GetData(); + Traits::copy_backward(buffer + insertOffset + count, buffer + insertOffset, oldSize - insertOffset); // empty out hole + for (size_t updateIndex = insertOffset; first != last; ++first, ++updateIndex) + { + Traits::assign(buffer[updateIndex], static_cast(*first)); + } + m_storage.first().SetSize(newSize); + Traits::assign(buffer[newSize], Element()); // terminate + } + } + else + { + // input iterator that aren't forward iterators can only be used in a single pass + // algorithm. Therefore AZStd::distance can't be used + // So the input is copied into a local string and then delegated + // to use the (const_pointer, size_type) overload + basic_string inputCopy; + for (; first != last; ++first) + { + inputCopy.push_back(static_cast(*first)); + } - inline void insert(const_iterator insertPos, const_pointer first, const_pointer last) - { // insert [first, last) at insertPos, const pointers - replace(insertPos, insertPos, first, last); + insert(insertOffset, inputCopy.c_str(), inputCopy.size()); + } + return begin() + insertOffset; } - this_type& erase(size_type offset = 0, size_type count = npos) { // erase elements [offset, offset + count) - AZSTD_CONTAINER_ASSERT(m_size >= offset, "Invalid offset"); - if (m_size - offset < count) + AZSTD_CONTAINER_ASSERT(size() >= offset, "Invalid offset"); + if (size() - offset < count) { - count = m_size - offset; // trim count + count = size() - offset; // trim count } if (count > 0) { // move elements down - pointer data = SSO_BUF_SIZE <= m_capacity ? m_data : m_buffer; + pointer data = m_storage.first().GetData(); #ifdef AZSTD_HAS_CHECKED_ITERATORS orphan_range(data + offset, data + offset + count); #endif - Traits::move(data + offset /*, m_capacity - offset*/, data + offset + count, m_size - offset - count); - m_size = m_size - count; - Traits::assign(data[m_size], Element()); // terminate - } + Traits::move(data + offset, data + offset + count, size() - offset - count); + m_storage.first().SetSize(size() - count); + Traits::assign(data[size()], Element()); // terminate + } return *this; } @@ -538,10 +610,10 @@ namespace AZStd const_pointer erasePtr = erasePos; #endif // erase element at insertPos - const_pointer data = SSO_BUF_SIZE <= m_capacity ? m_data : m_buffer; + const_pointer data = m_storage.first().GetData(); size_type count = erasePtr - data; erase(count, 1); - data = SSO_BUF_SIZE <= m_capacity ? m_data : m_buffer; + data = m_storage.first().GetData(); return iterator(AZSTD_CHECKED_ITERATOR(iterator_impl, data + count)); } @@ -554,159 +626,152 @@ namespace AZStd const_pointer firstPtr = first; const_pointer lastPtr = last; #endif - pointer data = SSO_BUF_SIZE <= m_capacity ? m_data : m_buffer; + pointer data = m_storage.first().GetData(); size_type count = firstPtr - data; erase(count, lastPtr - firstPtr); - data = SSO_BUF_SIZE <= m_capacity ? m_data : m_buffer; + data = m_storage.first().GetData(); return iterator(AZSTD_CHECKED_ITERATOR(iterator_impl, data + count)); } - inline void clear() { erase(begin(), end()); } - inline this_type& replace(size_type offset, size_type count, const this_type& rhs) + inline void clear() { erase(begin(), end()); } + this_type& replace(size_type offset, size_type count, const this_type& rhs) { - // replace [offset, offset + count) with rhs - return replace(offset, count, rhs, 0, npos); + return replace(offset, count, rhs.c_str(), rhs.size()); } this_type& replace(size_type offset, size_type count, const this_type& rhs, size_type rhsOffset, size_type rhsCount) { - // replace [offset, offset + count) with rhs [rhsOffset, rhsOffset + rhsCount) - AZSTD_CONTAINER_ASSERT(m_size >= offset && rhs.m_size >= rhsOffset, "Invalid offsets"); - if (m_size - offset < count) - { - count = m_size - offset; // trim count to size - } - size_type num = rhs.m_size - rhsOffset; - if (num < rhsCount) - { - rhsCount = num; // trim rhsCount to size - } - AZSTD_CONTAINER_ASSERT(npos - rhsCount > m_size - count, "Result is too long"); - - size_type nm = m_size - count - offset; // length of preserved tail - size_type newSize = m_size + rhsCount - count; - if (m_size < newSize) - { - grow(newSize); - } - - pointer data = SSO_BUF_SIZE <= m_capacity ? m_data : m_buffer; - const_pointer rhsData = SSO_BUF_SIZE <= rhs.m_capacity ? rhs.m_data : rhs.m_buffer; - -#ifdef AZSTD_HAS_CHECKED_ITERATORS - orphan_range(data + offset, data + offset + count); -#endif - if (this != &rhs) - { // no overlap, just move down and copy in new stuff - Traits::move(data + offset + rhsCount /*, m_capacity - offset - rhsCount*/, data + offset + count, nm); // empty hole - Traits::copy(data + offset /*, m_capacity - offset*/, rhsData + rhsOffset, rhsCount); // fill hole - } - else if (rhsCount <= count) - { // hole doesn't get larger, just copy in substring - Traits::move(data + offset /*, m_capacity - offset*/, data + rhsOffset, rhsCount); // fill hole - Traits::move(data + offset + rhsCount /*, m_capacity - offset - rhsCount*/, data + offset + count, nm); // move tail down - } - else if (rhsOffset <= offset) - { // hole gets larger, substring begins before hole - Traits::move(data + offset + rhsCount /*, m_capacity - offset - rhsCount*/, data + offset + count, nm); // move tail down - Traits::move(data + offset /*, m_capacity - offset*/, data + rhsOffset, rhsCount); // fill hole - } - else if (offset + count <= rhsOffset) - { // hole gets larger, substring begins after hole - Traits::move(data + offset + rhsCount /*, m_capacity - offset - rhsCount*/, data + offset + count, nm); // move tail down - Traits::move(data + offset /*, m_capacity - offset*/, data + (rhsOffset + rhsCount - count), rhsCount); // fill hole - } - else - { // hole gets larger, substring begins in hole - Traits::move(data + offset /*, m_capacity - offset*/, data + rhsOffset, count); // fill old hole - Traits::move(data + offset + rhsCount /*, m_capacity - offset - rhsCount*/, data + offset + count, nm); // move tail down - Traits::move(data + offset + count /*, m_capacity - offset - count*/, data + rhsOffset + rhsCount, rhsCount - count); // fill rest of new hole - } - - m_size = newSize; - Traits::assign(data[newSize], Element()); // terminate - return (*this); + return replace(offset, count, rhs.c_str() + rhsOffset, AZStd::min(rhsCount, rhs.size() - rhsOffset)); } this_type& replace(size_type offset, size_type count, const_pointer ptr, size_type ptrCount) { - pointer data = SSO_BUF_SIZE <= m_capacity ? m_data : m_buffer; // replace [offset, offset + count) with [ptr, ptr + ptrCount) - if (ptr != 0 && ptr >= data && (data + m_size) > ptr) - { - return (replace(offset, count, *this, ptr - data, ptrCount)); // substring, replace carefully - } - AZSTD_CONTAINER_ASSERT(m_size >= offset, "Invalid offset"); - if (m_size - offset < count) - { - count = m_size - offset; // trim _N0 to size - } - AZSTD_CONTAINER_ASSERT(npos - ptrCount > m_size - count, "Result too long"); + AZSTD_CONTAINER_ASSERT(size() >= offset, "Invalid offset"); + // Make sure count is within is no larger than the distance from the offset + // to the end of this string + count = AZStd::min(count, size() - offset); -#ifdef AZSTD_HAS_CHECKED_ITERATORS - orphan_range(data + offset, data + offset + count); -#endif - size_type nm = m_size - count - offset; - if (ptrCount < count) + size_type newSize = size() + ptrCount - count; + size_type charsAfterCountToMove = size() - count - offset; + pointer inputStringCopy{}; + + if (pointer thisBuffer = m_storage.first().GetData(); + (ptr >= thisBuffer && ptr < thisBuffer + size()) + || (ptr + ptrCount > thisBuffer && ptr + ptrCount <= thisBuffer + size())) { - Traits::move(data + offset + ptrCount, data + offset + count, nm); // smaller hole, move tail up - } - size_type num = m_size + ptrCount - count; - if ((0 < ptrCount || 0 < count) && grow(num)) - { - data = SSO_BUF_SIZE <= m_capacity ? m_data : m_buffer; - // make room and rearrange - if (count < ptrCount) + // Overlap checks for tring needs if the input pointer is anywhere within the string + // even if it is outside of the range of [offset, offset + count) as a growing + // the string buffer could cause a realloc to occur + if (!fits_in_capacity(newSize)) { - Traits::move(data + offset + ptrCount /*, m_capacity - offset - ptrCount*/, data + offset + count, nm); // move tail down + // If the input string is a sub-string and it would cause + // this string to need to re-allocated as it doesn't fit in the capacity + // Then the input string is needs to be copied into a local buffer + inputStringCopy = reinterpret_cast(get_allocator().allocate(ptrCount * sizeof(value_type), alignof(value_type))); + Traits::copy(inputStringCopy, ptr, ptrCount); + // Updated the input string pointer to point to the local buffer + ptr = inputStringCopy; + // Now this string buffer can now be safely resized and the non-overlapping string logic below can be used + } + else + { + // overlapping string in-place logic + // Ex. this = "ABCDEFG", offset = 1, count=4 + // substring is "CDE" + // The text from offset 1 for 4 chars "BCDE": should be replaced with "CDE" + // making a whole for the bytes results in output = "ABCDFG" + // Afterwards output = "ACDEFG" + // The input string overlaps with this string in this case + // So the string is copied piecewise + if (ptrCount <= count) + { // hole doesn't get larger, just copy in substring + Traits::move(thisBuffer + offset, ptr, ptrCount); // fill hole + Traits::copy(thisBuffer + offset + ptrCount, thisBuffer + offset + count, charsAfterCountToMove); // move tail down + } + else + { + if (ptr <= thisBuffer + offset) + { // hole gets larger, substring begins before hole + Traits::copy_backward(thisBuffer + offset + ptrCount, thisBuffer + offset + count, charsAfterCountToMove); // move tail down + Traits::copy(thisBuffer + offset, ptr, ptrCount); // fill hole + } + else if (thisBuffer + offset + count <= ptr) + { // hole gets larger, substring begins after hole + Traits::copy_backward(thisBuffer + offset + ptrCount, thisBuffer + offset + count, charsAfterCountToMove); // move tail down + Traits::copy(thisBuffer + offset, ptr + (ptrCount - count), ptrCount); // fill hole + } + else + { // hole gets larger, substring begins in hole + Traits::copy(thisBuffer + offset, ptr, count); // fill old hole + Traits::copy_backward(thisBuffer + offset + ptrCount, thisBuffer + offset + count, charsAfterCountToMove); // move tail down + Traits::copy(thisBuffer + offset + count, ptr + ptrCount, ptrCount - count); // fill rest of new hole + } + } + m_storage.first().SetSize(newSize); + Traits::assign(thisBuffer[newSize], Element()); // terminate + return *this; + } + } + + // input string doesn't overlap, so this string can be re-allocated safely + if (grow(newSize)) + { + // Need to regrab the memory address for the storage buffer + // in case the grow re-allocated memory + pointer thisBuffer = m_storage.first().GetData(); + if (count != ptrCount) + { + Traits::move(thisBuffer + offset + ptrCount, thisBuffer + offset + count, charsAfterCountToMove); } if (ptrCount > 0) { - Traits::copy(data + offset /*, m_capacity - offset*/, ptr, ptrCount); // fill hole + // Copy bytes up to the minimum of this string count and input string count + Traits::copy(thisBuffer + offset, ptr, ptrCount); } - - m_size = num; - Traits::assign(data[num], Element()); // terminate + // input string doesn't overlap, so this string can be re-allocated safely + m_storage.first().SetSize(newSize); + Traits::assign(thisBuffer[newSize], Element()); // terminate } + + // If a local string was allocated, then de-allocate its memory + if (inputStringCopy != nullptr) + { + get_allocator().deallocate(inputStringCopy, 0, alignof(value_type)); + } + return *this; } inline this_type& replace(size_type offset, size_type count, const_pointer ptr) { return replace(offset, count, ptr, Traits::length(ptr)); } this_type& replace(size_type offset, size_type count, size_type num, Element ch) { // replace [offset, offset + count) with num * ch - AZSTD_CONTAINER_ASSERT(m_size > offset, "Invalid offset"); - if (m_size - offset < count) + AZSTD_CONTAINER_ASSERT(size() > offset, "Invalid offset"); + if (size() - offset < count) { - count = m_size - offset; // trim count to size + count = size() - offset; // trim count to size } - AZSTD_CONTAINER_ASSERT(npos - num > m_size - count, "Result is too long"); - size_type nm = m_size - count - offset; + AZSTD_CONTAINER_ASSERT(npos - num > size() - count, "Result is too long"); + size_type nm = size() - count - offset; - pointer data = SSO_BUF_SIZE <= m_capacity ? m_data : m_buffer; + pointer data = m_storage.first().GetData(); #ifdef AZSTD_HAS_CHECKED_ITERATORS orphan_range(data + offset, data + offset + count); #endif if (num < count) { - Traits::move(data + offset + num /*, m_capacity - offset - num*/, data + offset + count, nm); // smaller hole, move tail up + Traits::move(data + offset + num, data + offset + count, nm); // smaller hole, move tail up } - size_type numToGrow = m_size + num - count; + size_type numToGrow = size() + num - count; if ((0 < num || 0 < count) && grow(numToGrow)) { // make room and rearrange - data = SSO_BUF_SIZE <= m_capacity ? m_data : m_buffer; + data = m_storage.first().GetData(); if (count < num) { - Traits::move(data + offset + num /*, m_capacity - offset - num*/, data + offset + count, nm); // move tail down + Traits::move(data + offset + num, data + offset + count, nm); // move tail down } - if (count == 1) - { - Traits::assign(*(data + offset), ch); - } - else - { - Traits::assign(data + offset, num, ch); - } - m_size = numToGrow; + Traits::assign(data + offset, num, ch); + m_storage.first().SetSize(numToGrow); Traits::assign(data[numToGrow], Element()); // terminate } return *this; @@ -722,7 +787,7 @@ namespace AZStd const_pointer firstPtr = first; const_pointer lastPtr = last; #endif - pointer data = SSO_BUF_SIZE <= m_capacity ? m_data : m_buffer; + pointer data = m_storage.first().GetData(); return replace(firstPtr - data, lastPtr - firstPtr, rhs); } @@ -735,7 +800,7 @@ namespace AZStd const_pointer firstPtr = first; const_pointer lastPtr = last; #endif - pointer data = SSO_BUF_SIZE <= m_capacity ? m_data : m_buffer; + pointer data = m_storage.first().GetData(); return replace(firstPtr - data, lastPtr - firstPtr, ptr, count); } @@ -748,7 +813,7 @@ namespace AZStd const_pointer firstPtr = first; const_pointer lastPtr = last; #endif - pointer data = SSO_BUF_SIZE <= m_capacity ? m_data : m_buffer; + pointer data = m_storage.first().GetData(); return replace(firstPtr - data, lastPtr - firstPtr, ptr); } @@ -761,113 +826,133 @@ namespace AZStd const_pointer firstPtr = first; const_pointer lastPtr = last; #endif - pointer data = SSO_BUF_SIZE <= m_capacity ? m_data : m_buffer; + pointer data = m_storage.first().GetData(); return replace(firstPtr - data, lastPtr - firstPtr, count, ch); } - template - inline this_type& replace(const_iterator first, const_iterator last, InputIterator first2, InputIterator last2) - { // replace [first, last) with [first2,last2) - return replace_iter(first, last, first2, last2, is_integral()); - } - - this_type& replace(const_iterator first, const_iterator last, const_pointer first2, const_pointer last2) + template + inline auto replace(const_iterator first, const_iterator last, InputIt replaceFirst, InputIt replaceLast) + -> enable_if_t && !is_convertible_v, this_type&> { -#ifdef AZSTD_HAS_CHECKED_ITERATORS - const_pointer first1 = first.get_iterator(); - const_pointer last1 = last.get_iterator(); -#else - const_pointer first1 = first; - const_pointer last1 = last; -#endif - // replace [first, last) with [first2, last2), const pointers - pointer data = SSO_BUF_SIZE <= m_capacity ? m_data : m_buffer; - if (first2 == last2) + if constexpr (Internal::satisfies_contiguous_iterator_concept_v + && is_same_v::value_type, value_type>) { - erase(first1 - data, last1 - first1); + return replace(first, last, AZStd::to_address(replaceFirst), AZStd::distance(replaceFirst, replaceLast)); + } + else if constexpr (Internal::is_forward_iterator_v) + { + // Input Iterator pointer type doesn't match the const_pointer type + // So the elements need to be appended one by one into the buffer + + size_type insertOffset = AZStd::distance(cbegin(), first); + size_type postInsertOffset = AZStd::distance(cbegin(), last); + size_type count = AZStd::distance(replaceFirst, replaceLast); + size_type oldSize = size(); + size_type newSize = oldSize + count - AZStd::distance(first, last); + if (grow(newSize)) + { + pointer buffer = data(); + Traits::move(first + count, last, oldSize - postInsertOffset); // empty out hole + for (size_t updateIndex = insertOffset; replaceFirst != replaceLast; ++replaceFirst, ++updateIndex) + { + Traits::assign(buffer[updateIndex], static_cast(*replaceFirst)); + } + m_storage.first().SetSize(newSize); + Traits::assign(buffer[newSize], Element()); // terminate + } + return *this; } else { - replace(first1 - data, last1 - first1, &*first2, last2 - first2); + // input iterator that aren't forward iterators can only be used in a single pass + // algorithm. Therefore AZStd::distance can't be used + // So the input is copied into a local string and then delegated + // to use the (const_pointer, size_type) overload + basic_string inputCopy; + for (; replaceFirst != replaceLast; ++replaceFirst) + { + inputCopy.push_back(static_cast(*replaceFirst)); + } + + return replace(first, last, inputCopy.c_str(), inputCopy.size()); } - return *this; } inline reference at(size_type offset) { // subscript mutable sequence with checking - AZSTD_CONTAINER_ASSERT(m_size > offset, "Invalid offset"); - pointer data = SSO_BUF_SIZE <= m_capacity ? m_data : m_buffer; + AZSTD_CONTAINER_ASSERT(size() > offset, "Invalid offset"); + pointer data = m_storage.first().GetData(); return data[offset]; } inline const_reference at(size_type offset) const { // subscript nonmutable sequence with checking - AZSTD_CONTAINER_ASSERT(m_size > offset, "Invalid offset"); - const_pointer data = SSO_BUF_SIZE <= m_capacity ? m_data : m_buffer; + AZSTD_CONTAINER_ASSERT(size() > offset, "Invalid offset"); + const_pointer data = m_storage.first().GetData(); return data[offset]; } inline reference operator[](size_type offset) { // subscript mutable sequence with checking - AZSTD_CONTAINER_ASSERT(m_size > offset, "Invalid offset"); - pointer data = SSO_BUF_SIZE <= m_capacity ? m_data : m_buffer; + AZSTD_CONTAINER_ASSERT(size() > offset, "Invalid offset"); + pointer data = m_storage.first().GetData(); return data[offset]; } inline const_reference operator[](size_type offset) const { // subscript nonmutable sequence with checking - AZSTD_CONTAINER_ASSERT(m_size > offset, "Invalid offset"); - const_pointer data = SSO_BUF_SIZE <= m_capacity ? m_data : m_buffer; + AZSTD_CONTAINER_ASSERT(size() > offset, "Invalid offset"); + const_pointer data = m_storage.first().GetData(); return data[offset]; } inline reference front() { - AZSTD_CONTAINER_ASSERT(m_size != 0, "AZStd::string::front - string is empty!"); - pointer data = SSO_BUF_SIZE <= m_capacity ? m_data : m_buffer; + AZSTD_CONTAINER_ASSERT(size() != 0, "AZStd::string::front - string is empty!"); + pointer data = m_storage.first().GetData(); return data[0]; } inline const_reference front() const { - AZSTD_CONTAINER_ASSERT(m_size != 0, "AZStd::string::front - string is empty!"); - const_pointer data = SSO_BUF_SIZE <= m_capacity ? m_data : m_buffer; + AZSTD_CONTAINER_ASSERT(size() != 0, "AZStd::string::front - string is empty!"); + const_pointer data = m_storage.first().GetData(); return data[0]; } inline reference back() { - AZSTD_CONTAINER_ASSERT(m_size != 0, "AZStd::string::back - string is empty!"); - pointer data = SSO_BUF_SIZE <= m_capacity ? m_data : m_buffer; - return data[m_size - 1]; + AZSTD_CONTAINER_ASSERT(size() != 0, "AZStd::string::back - string is empty!"); + pointer data = m_storage.first().GetData(); + return data[size() - 1]; } inline const_reference back() const { - AZSTD_CONTAINER_ASSERT(m_size != 0, "AZStd::string::back - string is empty!"); - const_pointer data = SSO_BUF_SIZE <= m_capacity ? m_data : m_buffer; - return data[m_size - 1]; + AZSTD_CONTAINER_ASSERT(size() != 0, "AZStd::string::back - string is empty!"); + const_pointer data = m_storage.first().GetData(); + return data[size() - 1]; } inline void push_back(Element ch) { - const_pointer end = SSO_BUF_SIZE <= m_capacity ? m_data : m_buffer; - end += m_size; + const_pointer end = data(); + end += size(); insert(end, ch); } - inline const_pointer c_str() const { return (SSO_BUF_SIZE <= m_capacity ? m_data : m_buffer); } - inline size_type length() const { return m_size; } - inline size_type size() const { return m_size; } - inline size_type capacity() const { return m_capacity; } + inline const_pointer c_str() const { return (data()); } + inline size_type length() const { return m_storage.first().GetSize(); } + inline size_type size() const { return m_storage.first().GetSize(); } + inline size_type capacity() const { return m_storage.first().GetCapacity(); } inline size_type max_size() const { // return maximum possible length of sequence - return AZStd::allocator_traits::max_size(m_allocator) / sizeof(value_type); + return AZStd::allocator_traits::max_size(m_storage.second()) / sizeof(value_type); } inline void resize(size_type newSize) @@ -877,58 +962,58 @@ namespace AZStd inline void resize_no_construct(size_type newSize) { - if (newSize <= m_size) + if (newSize <= size()) { erase(newSize); } else { reserve(newSize); - pointer data = SSO_BUF_SIZE <= m_capacity ? m_data : m_buffer; - m_size = newSize; - Traits::assign(data[m_size], Element()); // terminate + pointer data = m_storage.first().GetData(); + m_storage.first().SetSize(newSize); + Traits::assign(data[newSize], Element()); // terminate } } inline void resize(size_type newSize, Element ch) { // determine new length, padding with ch elements as needed - if (newSize <= m_size) + if (newSize <= size()) { erase(newSize); } else { - append(newSize - m_size, ch); + append(newSize - size(), ch); } } void reserve(size_type newCapacity = 0) { // determine new minimum length of allocated storage - if (m_size <= newCapacity && m_capacity != newCapacity) + if (size() <= newCapacity && capacity() != newCapacity) { // change reservation - size_type size = m_size; + size_type curSize = size(); if (grow(newCapacity)) { - m_size = size; - pointer data = SSO_BUF_SIZE <= m_capacity ? m_data : m_buffer; - Traits::assign(data[size], Element()); // terminate + m_storage.first().SetSize(curSize); + pointer data = m_storage.first().GetData(); + Traits::assign(data[curSize], Element()); // terminate } } } - inline bool empty() const { return (m_size == 0); } - size_type copy(Element* dest /*, size_type destSize */, size_type count, size_type offset = 0) const + inline bool empty() const { return size() == 0; } + size_type copy(Element* dest, size_type count, size_type offset = 0) const { // copy [offset, offset + count) to [dest, dest + count) // assume there is enough space in _Ptr - AZSTD_CONTAINER_ASSERT(m_size >= offset, "Invalid offset"); - if (m_size - offset < count) + AZSTD_CONTAINER_ASSERT(size() >= offset, "Invalid offset"); + if (size() - offset < count) { - count = m_size - offset; + count = size() - offset; } - const_pointer data = SSO_BUF_SIZE <= m_capacity ? m_data : m_buffer; - Traits::copy(dest /*, destSize*/, data + offset, count); + const_pointer data = m_storage.first().GetData(); + Traits::copy(dest, data + offset, count); return count; } @@ -939,19 +1024,10 @@ namespace AZStd return; } - if (m_allocator == rhs.m_allocator) + if (m_storage.second() == rhs.m_storage.second()) { - // same allocator, swap control information -#ifdef AZSTD_HAS_CHECKED_ITERATORS - swap_all(rhs); -#endif - Element temp[SSO_BUF_SIZE]; - ::memcpy(temp, rhs.m_buffer, sizeof(m_buffer)); - ::memcpy(rhs.m_buffer, m_buffer, sizeof(m_buffer)); - ::memcpy(m_buffer, temp, sizeof(m_buffer)); - - AZStd::swap(m_size, rhs.m_size); - AZStd::swap(m_capacity, rhs.m_capacity); + // same allocator, swap storage + m_storage.first().swap(rhs.m_storage.first()); } else { @@ -980,174 +1056,76 @@ namespace AZStd inline size_type find(const this_type& rhs, size_type offset = 0) const { - const_pointer rhsData = SSO_BUF_SIZE <= rhs.m_capacity ? rhs.m_data : rhs.m_buffer; - return find(rhsData, offset, rhs.m_size); + const_pointer rhsData = rhs.data(); + return find(rhsData, offset, rhs.size()); } size_type find(const_pointer ptr, size_type offset, size_type count) const { - AZ_Assert(ptr != NULL, "Invalid input!"); - - // look for [ptr, ptr + count) beginning at or after offset - if (count == 0 && offset <= m_size) - { - return offset; // null string always matches (if inside string) - } - size_type nm; - if (offset < m_size && count <= (nm = m_size - offset)) - { // room for match, look for it - const_pointer uptr, vptr; - const_pointer data = SSO_BUF_SIZE <= m_capacity ? m_data : m_buffer; - for (nm -= count - 1, vptr = data + offset; (uptr = Traits::find(vptr, nm, *ptr)) != 0; nm -= uptr - vptr + 1, vptr = uptr + 1) - { - if (Traits::compare(uptr, ptr, count) == 0) - { - return (uptr - data); // found a match - } - } - } - - return (npos); // no match + return StringInternal::find(data(), size(), ptr, offset, count, npos); } inline size_type find(const_pointer ptr, size_type offset = 0) const { return find(ptr, offset, Traits::length(ptr)); } inline size_type find(Element ch, size_type offset = 0) const { return find((const_pointer) & ch, offset, 1); } inline size_type rfind(const this_type& rhs, size_type offset = npos) const { - const_pointer rhsData = SSO_BUF_SIZE <= rhs.m_capacity ? rhs.m_data : rhs.m_buffer; - return rfind(rhsData, offset, rhs.m_size); + const_pointer rhsData = rhs.data(); + return rfind(rhsData, offset, rhs.size()); } size_type rfind(const_pointer ptr, size_type offset, size_type count) const - { // look for [ptr, ptr + count) beginning before offset - if (count == 0) - { - return (offset < m_size ? offset : m_size); // null always matches - } - if (count <= m_size) - { // room for match, look for it - const_pointer data = SSO_BUF_SIZE <= m_capacity ? m_data : m_buffer; - const_pointer uptr = data + (offset < m_size - count ? offset : m_size - count); - for (;; --uptr) - { - if (Traits::eq(*uptr, *ptr) && Traits::compare(uptr, ptr, count) == 0) - { - return (uptr - data); // found a match - } - else if (uptr == data) - { - break; // at beginning, no more chance for match - } - } - } - - return npos; // no match + { + return StringInternal::rfind(data(), size(), ptr, offset, count, npos); } inline size_type rfind(const_pointer ptr, size_type offset = npos) const { return rfind(ptr, offset, Traits::length(ptr)); } inline size_type rfind(Element ch, size_type offset = npos) const { return rfind((const_pointer) & ch, offset, 1); } inline size_type find_first_of(const this_type& rhs, size_type offset = 0) const { - const_pointer rhsData = SSO_BUF_SIZE <= rhs.m_capacity ? rhs.m_data : rhs.m_buffer; - return find_first_of(rhsData, offset, rhs.m_size); + const_pointer rhsData = rhs.data(); + return find_first_of(rhsData, offset, rhs.size()); } size_type find_first_of(const_pointer ptr, size_type offset, size_type count) const - { // look for one of [ptr, ptr + count) at or after offset - if (0 < count && offset < m_size) - { // room for match, look for it - const_pointer data = SSO_BUF_SIZE <= m_capacity ? m_data : m_buffer; - const Element* const vptr = data + m_size; - for (const_pointer uptr = data + offset; uptr < vptr; ++uptr) - { - if (Traits::find(ptr, count, *uptr) != 0) - { - return uptr - data; // found a match - } - } - } - return npos; // no match + { + return StringInternal::find_first_of(data(), size(), ptr, offset, count, npos); } inline size_type find_first_of(const_pointer ptr, size_type offset = 0) const { return find_first_of(ptr, offset, Traits::length(ptr)); } inline size_type find_first_of(Element ch, size_type offset = 0) const { return find((const_pointer) & ch, offset, 1); } inline size_type find_last_of(const this_type& rhs, size_type offset = npos) const { - const_pointer rhsData = SSO_BUF_SIZE <= rhs.m_capacity ? rhs.m_data : rhs.m_buffer; - return find_last_of(rhsData, offset, rhs.m_size); + const_pointer rhsData = rhs.data(); + return find_last_of(rhsData, offset, rhs.size()); } size_type find_last_of(const_pointer ptr, size_type offset, size_type count) const - { // look for one of [ptr, ptr + count) before offset - if (0 < count && 0 < m_size) - { - const_pointer data = SSO_BUF_SIZE <= m_capacity ? m_data : m_buffer; - for (const_pointer uptr = data + (offset < m_size ? offset : m_size - 1);; --uptr) - { - if (Traits::find(ptr, count, *uptr) != 0) - { - return uptr - data; // found a match - } - else if (uptr == data) - { - break; // at beginning, no more chance for match - } - } - } - - return npos; // no match + { + return StringInternal::find_last_of(data(), size(), ptr, offset, count, npos); } inline size_type find_last_of(const_pointer ptr, size_type offset = npos) const { return find_last_of(ptr, offset, Traits::length(ptr)); } inline size_type find_last_of(Element ch, size_type offset = npos) const { return rfind((const_pointer) & ch, offset, 1); } inline size_type find_first_not_of(const this_type& rhs, size_type offset = 0) const { // look for none of rhs at or after offset - const_pointer rhsData = SSO_BUF_SIZE <= rhs.m_capacity ? rhs.m_data : rhs.m_buffer; - return find_first_not_of(rhsData, offset, rhs.m_size); + const_pointer rhsData = rhs.data(); + return find_first_not_of(rhsData, offset, rhs.size()); } size_type find_first_not_of(const_pointer ptr, size_type offset, size_type count) const { - // look for none of [ptr, ptr + count) at or after offset - if (offset < m_size) - { // room for match, look for it - const_pointer data = SSO_BUF_SIZE <= m_capacity ? m_data : m_buffer; - const Element* const vptr = data + m_size; - for (const_pointer uptr = data + offset; uptr < vptr; ++uptr) - { - if (Traits::find(ptr, count, *uptr) == 0) - { - return uptr - data; - } - } - } - return npos; + return StringInternal::find_first_not_of(data(), size(), ptr, offset, count, npos); } inline size_type find_first_not_of(const_pointer ptr, size_type offset = 0) const { return find_first_not_of(ptr, offset, Traits::length(ptr)); } inline size_type find_first_not_of(Element ch, size_type offset = 0) const { return find_first_not_of((const_pointer) & ch, offset, 1); } inline size_type find_last_not_of(const this_type& rhs, size_type offset = npos) const { // look for none of rhs before offset - const_pointer rhsData = SSO_BUF_SIZE <= rhs.m_capacity ? rhs.m_data : rhs.m_buffer; - return find_last_not_of(rhsData, offset, rhs.m_size); + const_pointer rhsData = rhs.data(); + return find_last_not_of(rhsData, offset, rhs.size()); } size_type find_last_not_of(const_pointer ptr, size_type offset, size_type count) const - { // look for none of [ptr, ptr + count) before offset - if (0 < m_size) - { - const_pointer data = SSO_BUF_SIZE <= m_capacity ? m_data : m_buffer; - for (const_pointer uptr = data + (offset < m_size ? offset : m_size - 1);; --uptr) - { - if (Traits::find(ptr, count, *uptr) == 0) - { - return uptr - data; - } - else if (uptr == data) - { - break; - } - } - } - return npos; + { + return StringInternal::find_last_not_of(data(), size(), ptr, offset, count, npos); } inline size_type find_last_not_of(const_pointer ptr, size_type offset = npos) const { return find_last_not_of(ptr, offset, Traits::length(ptr)); } @@ -1161,8 +1139,8 @@ namespace AZStd inline int compare(const this_type& rhs) const { - const_pointer rhsData = SSO_BUF_SIZE <= rhs.m_capacity ? rhs.m_data : rhs.m_buffer; - return compare(0, m_size, rhsData, rhs.m_size); + const_pointer rhsData = rhs.data(); + return compare(0, size(), rhsData, rhs.size()); } inline int compare(size_type offset, size_type count, const this_type& rhs) const @@ -1173,26 +1151,26 @@ namespace AZStd int compare(size_type offset, size_type count, const this_type& rhs, size_type rhsOffset, size_type rhsCount) const { // compare [offset, offset + count) with rhs [rhsOffset, rhsOffset + rhsCount) - AZSTD_CONTAINER_ASSERT(rhs.m_size >= rhsOffset, "Invalid offset"); - if (rhs.m_size - rhsOffset < rhsCount) + AZSTD_CONTAINER_ASSERT(rhs.size() >= rhsOffset, "Invalid offset"); + if (rhs.size() - rhsOffset < rhsCount) { - rhsCount = rhs.m_size - rhsOffset; // trim rhsCount to size + rhsCount = rhs.size() - rhsOffset; // trim rhsCount to size } - const_pointer rhsData = SSO_BUF_SIZE <= rhs.m_capacity ? rhs.m_data : rhs.m_buffer; + const_pointer rhsData = rhs.data(); return compare(offset, count, rhsData + rhsOffset, rhsCount); } - inline int compare(const_pointer ptr) const { return compare(0, m_size, ptr, Traits::length(ptr)); } + inline int compare(const_pointer ptr) const { return compare(0, size(), ptr, Traits::length(ptr)); } inline int compare(size_type offset, size_type count, const_pointer ptr) const { return compare(offset, count, ptr, Traits::length(ptr)); } int compare(size_type offset, size_type count, const_pointer ptr, size_type ptrCount) const { // compare [offset, offset + _N0) with [_Ptr, _Ptr + _Count) - AZSTD_CONTAINER_ASSERT(m_size >= offset, "Invalid offset"); - if (m_size - offset < count) + AZSTD_CONTAINER_ASSERT(size() >= offset, "Invalid offset"); + if (size() - offset < count) { - count = m_size - offset; // trim count to size + count = size() - offset; // trim count to size } - const_pointer data = SSO_BUF_SIZE <= m_capacity ? m_data : m_buffer; + const_pointer data = m_storage.first().GetData(); size_type ans = Traits::compare(data + offset, ptr, count < ptrCount ? count : ptrCount); return (ans != 0 ? (int)ans : count < ptrCount ? -1 : count == ptrCount ? 0 : +1); } @@ -1231,11 +1209,11 @@ namespace AZStd inline void pop_back() { - if (m_size > 0) + if (!empty()) { - pointer data = SSO_BUF_SIZE <= m_capacity ? m_data : m_buffer; - --m_size; - Traits::assign(data[m_size], Element()); // terminate + pointer data = m_storage.first().GetData(); + m_storage.first().SetSize(m_storage.first().GetSize() - 1); + Traits::assign(data[size()], Element()); // terminate } } @@ -1245,39 +1223,35 @@ namespace AZStd * @{ */ /// TR1 Extension. Return pointer to the vector data. The vector data is guaranteed to be stored as an array. - inline pointer data() { return (SSO_BUF_SIZE <= m_capacity ? m_data : m_buffer); } - inline const_pointer data() const { return (SSO_BUF_SIZE <= m_capacity ? m_data : m_buffer); } + inline pointer data() { return m_storage.first().GetData(); } + inline const_pointer data() const { return m_storage.first().GetData(); } /// /// The only difference from the standard is that we return the allocator instance, not a copy. - inline allocator_type& get_allocator() { return m_allocator; } - inline const allocator_type& get_allocator() const { return m_allocator; } + inline allocator_type& get_allocator() { return m_storage.second(); } + inline const allocator_type& get_allocator() const { return m_storage.second(); } /// Set the vector allocator. If different than then current all elements will be reallocated. void set_allocator(const allocator_type& allocator) { - if (m_allocator != allocator) + if (m_storage.second() != allocator) { - if (m_size > 0 && SSO_BUF_SIZE <= m_capacity) + if (!empty() && !m_storage.first().ShortStringOptimizationActive()) { allocator_type newAllocator = allocator; - pointer data = m_data; + pointer data = m_storage.first().GetData(); - pointer newData = reinterpret_cast(newAllocator.allocate(sizeof(node_type) * (m_capacity + 1), alignment_of::value)); + pointer newData = reinterpret_cast(newAllocator.allocate(sizeof(node_type) * (capacity() + 1), alignof(node_type))); - Traits::copy(newData, data, m_size + 1); // copy elements and terminator + Traits::copy(newData, data, size() + 1); // copy elements and terminator // Free memory (if needed). deallocate_memory(data, 0, typename allocator_type::allow_memory_leaks()); - m_allocator = newAllocator; - -#ifdef AZSTD_HAS_CHECKED_ITERATORS - orphan_all(); -#endif + m_storage.second() = newAllocator; } else { - m_allocator = allocator; + m_storage.second() = allocator; } } } @@ -1296,12 +1270,12 @@ namespace AZStd #else pointer iterPtr = iter; #endif - const_pointer data = SSO_BUF_SIZE <= m_capacity ? m_data : m_buffer; - if (iterPtr < data || iterPtr > (data + m_size)) + const_pointer data = m_storage.first().GetData(); + if (iterPtr < data || iterPtr > (data + size())) { return isf_none; } - else if (iterPtr == (data + m_size)) + else if (iterPtr == (data + size())) { return isf_valid; } @@ -1316,12 +1290,12 @@ namespace AZStd #else const_pointer iterPtr = iter; #endif - const_pointer data = SSO_BUF_SIZE <= m_capacity ? m_data : m_buffer; - if (iterPtr < data || iterPtr > (data + m_size)) + const_pointer data = m_storage.first().GetData(); + if (iterPtr < data || iterPtr > (data + size())) { return isf_none; } - else if (iterPtr == (data + m_size)) + else if (iterPtr == (data + size())) { return isf_valid; } @@ -1337,86 +1311,74 @@ namespace AZStd * \note This function is added to the vector for consistency. In the vector case we have only one allocation, and if the allocator allows memory leaks * it can just leave deallocate function empty, which performance wise will be the same. For more complex containers this will make big difference. */ - void leak_and_reset() + void leak_and_reset() { - m_size = 0; - m_capacity = SSO_BUF_SIZE - 1; - Traits::assign(m_buffer[0], Element()); - -#ifdef AZSTD_HAS_CHECKED_ITERATORS - orphan_all(); -#endif + m_storage.first() = {}; } /** * Set the capacity, if necessary it will erase elements at the end of the container to match the new capacity. */ - void set_capacity(size_type numElements) + void set_capacity(size_type numElements) { // sets the new capacity of the vector, can be smaller than size() - if (m_capacity != numElements) + if (capacity() != numElements) { - if (numElements < SSO_BUF_SIZE) + if (numElements < ShortStringData::Capacity) { - if (m_capacity >= SSO_BUF_SIZE) + if (!m_storage.first().ShortStringOptimizationActive()) { // copy any leftovers to small buffer and deallocate - pointer ptr = m_data; - numElements = numElements < m_size ? numElements : m_size; + pointer ptr = m_storage.first().GetData(); + numElements = numElements < size() ? numElements : size(); + m_storage.first().SetCapacity(ShortStringData::Capacity); if (0 < numElements) { - Traits::copy(m_buffer /*, SSO_BUF_SIZE*/, ptr, numElements); + Traits::copy(m_storage.first().GetData(), ptr, numElements); } - deallocate_memory(ptr, 0, typename allocator_type::allow_memory_leaks()); - m_capacity = SSO_BUF_SIZE - 1; + // deallocate_memory functione examines the current + // m_storage short string optimization state was changed to true + // by the SetCapacity call above. Therefore m_storage.second().deallocate + // is used directly + m_storage.second().deallocate(ptr, 0, alignof(node_type)); } - m_size = numElements; - Traits::assign(m_buffer[numElements], Element()); // terminate + m_storage.first().SetSize(numElements); + Traits::assign(m_storage.first().GetData()[numElements], Element()); // terminate } else { size_type expandedSize = 0; - if (m_capacity >= SSO_BUF_SIZE) + if (!m_storage.first().ShortStringOptimizationActive()) { - expandedSize = m_allocator.resize(m_data, sizeof(node_type) * (numElements + 1)); + expandedSize = m_storage.second().resize(m_storage.first().GetData(), sizeof(node_type) * (numElements + 1)); // our memory managers allocate on 8+ bytes boundary and our node type should be less than that in general, otherwise // we need to take care when we compute the size on deallocate. AZ_Assert(expandedSize % sizeof(node_type) == 0, "Expanded size not a multiply of node type. This should not happen"); size_type expandedCapacity = expandedSize / sizeof(node_type); if (expandedCapacity > numElements) { - m_capacity = expandedCapacity - 1; + m_storage.first().SetCapacity(expandedCapacity - 1); return; } } - pointer newData = reinterpret_cast(m_allocator.allocate(sizeof(node_type) * (numElements + 1), alignment_of::value)); - AZSTD_CONTAINER_ASSERT(newData != 0, "AZStd::string allocation failed!"); + pointer newData = reinterpret_cast(m_storage.second().allocate(sizeof(node_type) * (numElements + 1), alignof(node_type))); + AZSTD_CONTAINER_ASSERT(newData != nullptr, "AZStd::string allocation failed!"); - size_type newSize = numElements < m_size ? numElements : m_size; - const_pointer data = SSO_BUF_SIZE <= m_capacity ? m_data : m_buffer; + size_type newSize = numElements < m_storage.first().GetSize() ? numElements : m_storage.first().GetSize(); + pointer data = m_storage.first().GetData(); if (newSize > 0) { - Traits::copy(newData /*, newSize + 1*/, data, newSize); // copy existing elements - } - if (m_capacity >= SSO_BUF_SIZE) - { - deallocate_memory(m_data, expandedSize, typename allocator_type::allow_memory_leaks()); + Traits::copy(newData, data, newSize); // copy existing elements } + deallocate_memory(data, expandedSize, typename allocator_type::allow_memory_leaks()); - m_data = newData; - m_capacity = numElements; - m_size = newSize; - Traits::assign(m_data[newSize], Element()); // terminate + Traits::assign(newData[newSize], Element()); // terminate + m_storage.first().SetCapacity(numElements); + m_storage.first().SetData(newData); + m_storage.first().SetSize(newSize); } - -#ifdef AZSTD_HAS_CHECKED_ITERATORS - // when we move data in the buffer we don't really need to make invalid all iterators, but it's - // very important that we are consistent, so people don't have different behavior when they have - // short strings - orphan_all(); -#endif } } @@ -1521,9 +1483,9 @@ namespace AZStd } }; -// Clang supports compile-time check for printf-like signatures -// On MSVC, *only* if /analyze flag is enabled(defines _PREFAST_) we can also do a compile-time check -// For not affecting final release binary size, we don't use the templated version on Release configuration either + // Clang supports compile-time check for printf-like signatures + // On MSVC, *only* if /analyze flag is enabled(defines _PREFAST_) we can also do a compile-time check + // For not affecting final release binary size, we don't use the templated version on Release configuration either #if AZ_COMPILER_CLANG || defined(_PREFAST_) || defined(_RELEASE) # if AZ_COMPILER_CLANG # define FORMAT_FUNC __attribute__((format(printf, 1, 2))) @@ -1597,137 +1559,70 @@ namespace AZStd template inline basic_string(const basic_string& rhs) - : m_size(0) - , m_capacity(SSO_BUF_SIZE - 1) { assign(rhs.c_str()); } template inline this_type& operator=(const basic_string& rhs) { return assign(rhs.c_str()); } template - inline this_type& append(const basic_string& rhs) { return append(rhs.c_str()); } + inline this_type& append(const basic_string& rhs) { return append(rhs.c_str()); } template inline this_type& insert(size_type offset, const basic_string& rhs) { return insert(offset, rhs.c_str()); } template inline this_type& replace(size_type offset, size_type count, const basic_string& rhs) { return replace(offset, count, rhs.c_str()); } template - inline int compare(const basic_string& rhs) { return compare(rhs.c_str()); } + inline int compare(const basic_string& rhs) { return compare(rhs.c_str()); } // @} protected: - enum - { // length of internal buffer, [1, 16] - SSO_BUF_SIZE = 16 / sizeof (Element) < 1 ? 1 : 16 / sizeof(Element) - }; enum { // roundup mask for allocated buffers, [0, 15] - _ALLOC_MASK = sizeof (Element) <= 1 ? 15 : sizeof (Element) <= 2 ? 7 : sizeof (Element) <= 4 ? 3 : sizeof (Element) <= 8 ? 1 : 0 + _ALLOC_MASK = sizeof(Element) <= 1 ? 15 + : sizeof(Element) <= 2 ? 7 + : sizeof(Element) <= 4 ? 3 + : sizeof(Element) <= 8 ? 1 : 0 }; - template - inline this_type& append_iter(InputIterator count, InputIterator ch, const true_type& /* is_integral */) - { // append count * ch - return append((size_type)count, (Element)ch); - } - - template - inline void construct_iter(InputIterator count, InputIterator ch, const true_type& /* is_integral */) - { // initialize from count * ch - assign((size_type)count, (Element)ch); - } - - template - inline void construct_iter(InputIterator first, InputIterator last, const false_type& /*, const input_iterator_tag&*/) - { - // initialize from [first, last), input iterators - // \todo use insert ? - for (; first != last; ++first) - { - append((size_type)1, (Element) * first); - } - } - - - template - inline this_type& append_iter(InputIterator first, InputIterator last, const false_type& /* !is_integral */) - { // append [first, last), input iterators - return replace(end(), end(), first, last); - } - - - template - inline this_type& assign_iter(InputIterator count, InputIterator ch, const true_type&) { return assign((size_type)count, (Element)ch); } - template - inline this_type& assign_iter(InputIterator first, InputIterator last, const false_type&){ return replace(begin(), end(), first, last); } - - template - inline void insert_iter(const_iterator insertPos, InputIterator count, InputIterator ch, const true_type& /* is_integral() */) - { // insert count * ch at insertPos - insert(insertPos, (size_type)count, (Element)ch); - } - - template - inline void insert_iter(const_iterator insertPos, InputIterator first, InputIterator last, const false_type& /* is_integral() */) - { // insert [first, last) at insertPos, input iterators - replace(insertPos, insertPos, first, last); - } - - - template - inline this_type& replace_iter(const_iterator first, const_iterator last, InputIterator count, InputIterator ch, const true_type& /* is_intergral */) - { // replace [first, last) with count * ch - return replace(first, last, (size_type)count, (Element)ch); - } - - template - inline this_type& replace_iter(const_iterator first, const_iterator last, InputIterator first2, InputIterator last2, const false_type& /* !is_intergral */) - { // replace [first, last) with [first2, last2), input iterators - this_type rhs(first2, last2); - replace(first, last, rhs); - return *this; - } - void copy(size_type newSize, size_type oldLength) { size_type newCapacity = newSize | _ALLOC_MASK; - if (newCapacity / 3 < m_capacity / 2) + size_type currentCapacity = capacity(); + if (newCapacity / 3 < currentCapacity / 2) { - newCapacity = m_capacity + m_capacity / 2; // grow exponentially if possible + newCapacity = currentCapacity + currentCapacity / 2; // grow exponentially if possible } - if (newCapacity >= SSO_BUF_SIZE) + if (newCapacity >= ShortStringData::Capacity) { size_type expandedSize = 0; - if (m_capacity >= SSO_BUF_SIZE) + if (!m_storage.first().ShortStringOptimizationActive()) { - expandedSize = m_allocator.resize(m_data, sizeof(node_type) * (newCapacity + 1)); + expandedSize = m_storage.second().resize(m_storage.first().GetData(), sizeof(node_type) * (newCapacity + 1)); // our memory managers allocate on 8+ bytes boundary and our node type should be less than that in general, otherwise // we need to take care when we compute the size on deallocate. - AZ_Assert(expandedSize % sizeof(node_type) == 0, "Expanded size not a multiply of node type. This should not happen"); + AZ_Assert(expandedSize % sizeof(node_type) == 0, "Expanded size not a multiple of node type. This should not happen"); size_type expandedCapacity = expandedSize / sizeof(node_type); if (expandedCapacity > newCapacity) { - m_capacity = expandedCapacity - 1; + m_storage.first().SetCapacity(expandedCapacity - 1); return; } } - pointer newData = reinterpret_cast(m_allocator.allocate(sizeof(node_type) * (newCapacity + 1), alignment_of::value)); - AZSTD_CONTAINER_ASSERT(newData != 0, "AZStd::string allocation failed!"); + pointer newData = reinterpret_cast(m_storage.second().allocate(sizeof(node_type) * (newCapacity + 1), alignof(node_type))); + AZSTD_CONTAINER_ASSERT(newData != nullptr, "AZStd::string allocation failed!"); if (newData) { - const_pointer data = SSO_BUF_SIZE <= m_capacity ? m_data : m_buffer; + pointer data = m_storage.first().GetData(); if (0 < oldLength) { - Traits::copy(newData /*, newSize + 1*/, data, oldLength); // copy existing elements - } - if (m_capacity >= SSO_BUF_SIZE) - { - deallocate_memory(m_data, expandedSize, typename allocator_type::allow_memory_leaks()); + Traits::copy(newData, data, oldLength); // copy existing elements } + deallocate_memory(data, expandedSize, typename allocator_type::allow_memory_leaks()); - m_data = newData; - m_capacity = newCapacity; - Traits::assign(m_data[newSize], Element()); // terminate + Traits::assign(newData[oldLength], Element()); // terminate + m_storage.first().SetCapacity(newCapacity); + m_storage.first().SetSize(oldLength); + m_storage.first().SetData(newData); } } } @@ -1735,40 +1630,209 @@ namespace AZStd bool grow(size_type newSize) { // ensure buffer is big enough, trim to size if _Trim is true - if (m_capacity < newSize) + if (capacity() < newSize) { - copy(newSize, m_size); // reallocate to grow + copy(newSize, size()); // reallocate to grow } else if (newSize == 0) { - pointer data = SSO_BUF_SIZE <= m_capacity ? m_data : m_buffer; - m_size = 0; + pointer data = m_storage.first().GetData(); + m_storage.first().SetSize(0); Traits::assign(data[0], Element()); // terminate } return (0 < newSize); // return true only if more work to do } + bool fits_in_capacity(size_type newSize) + { + return newSize <= capacity(); + } + inline void deallocate_memory(pointer, size_type, const true_type& /* allocator::allow_memory_leaks */) {} inline void deallocate_memory(pointer data, size_type expandedSize, const false_type& /* !allocator::allow_memory_leaks */) { - if (m_capacity >= SSO_BUF_SIZE) + if (!m_storage.first().ShortStringOptimizationActive()) { - size_type byteSize = (expandedSize == 0) ? (sizeof(node_type) * (m_capacity + 1)) : expandedSize; - m_allocator.deallocate(data, byteSize, alignment_of::value); + size_type byteSize = (expandedSize == 0) ? (sizeof(node_type) * (m_storage.first().GetCapacity() + 1)) : expandedSize; + m_storage.second().deallocate(data, byteSize, alignof(node_type)); } } - union //Storage + //! Assuming 64-bit for pointer and size_t size + //! The offset and sizes of each structure are marked below + + //! dynamically allocated data + struct AllocatedStringData { - Element m_buffer[SSO_BUF_SIZE]; //< small buffer used for small string optimization - pointer m_data; //< dynamically allocated data + AllocatedStringData() + { + m_capacity = 0; + m_ssoActive = false; + } + // bit offset: 0, bits: 64 + pointer m_data{}; + + // bit offset: 64, bit: 64 + size_type m_size{}; + + // Use all but the top bit of a size_t for the string capacity + // This allows the short string optimization to be used + // with no additional space at the cost of cutting the max_size in half + // to 2^63-1 + // offset: 128, bits: 63 + size_type m_capacity : AZStd::numeric_limits::digits - 1; + + // bit offset: 191, bits: 1 + size_type m_ssoActive : 1; + + // Total size 192 bits(24 bytes) }; - size_type m_size; // current length of string - size_type m_capacity; // current storage reserved for string - allocator_type m_allocator; + static_assert(sizeof(AllocatedStringData) <= 24, "The AllocatedStringData structure" + " should be an 8-byte pointer, 8 byte size, 63-bit capacity and 1-bit SSO flag for" + " a total of 24 bytes"); + + //! small buffer used for small string optimization + struct ShortStringData + { + //! The size can be stored within 7 bits since the buffer will be no larger + //! than 23 bytes(22 characters + 1 null-terminating character) + inline static constexpr size_type BufferMaxSize = sizeof(AllocatedStringData) - sizeof(AZ::u8); + static_assert(sizeof(Element) < BufferMaxSize, "The size of Element type must be less than the size of " + " the AllocatedStringData struct in order to use it with the basic_string class"); + inline static constexpr size_type BufferCapacityPlusNull = BufferMaxSize / sizeof(Element); + + inline static constexpr size_type Capacity = BufferCapacityPlusNull - 1; + + ShortStringData() + { + // Make sure the short string buffer is null-terminated + m_buffer[0] = Element{}; + m_size = 0; + m_ssoActive = true; + } + + // bit offset: 0, bits: 184 + Element m_buffer[BufferCapacityPlusNull]; + + // Padding to make sure for Element types with a size >1 + // such as wchar_t, that the `m_size` member starts at the bit 164 + // NOTE: Uses the anonymous struct extension + // supported by MSVC, Clang and GCC + // Takes advantage of the empty base optimization + // to have the StringInternal::Padding struct + // take 0 bytes when the Element type is 1-byte type like `char` + // When C++20 support is added, this can be changed to use [[no_unique_address]] + struct + : StringInternal::Padding + { + + // bit offset: 184, bits: 7 + AZ::u8 m_size : AZStd::numeric_limits::digits - 1; + + // bit offset: 191, bits: 1 + AZ::u8 m_ssoActive : 1; + }; + // Total size 192 bits(24 bytes) + }; + + struct PointerAlignedData + { + uintptr_t m_alignedValues[sizeof(ShortStringData) / sizeof(uintptr_t)]; + }; + + static_assert(sizeof(AllocatedStringData) == sizeof(ShortStringData) && "Short string struct must be the same size" + " as the regular allocated string struct"); + + static_assert(sizeof(PointerAlignedData) == sizeof(ShortStringData) && "Pointer aligned struct must be the same size" + " as the short string struct "); + + // The top-bit in the last byte of the AllocatedStringData and ShortStringData is used to determine if the short string optimization is being used + union Storage + { + Storage() {}; + + bool ShortStringOptimizationActive() const + { + return m_shortData.m_ssoActive; + } + const_pointer GetData() const + { + return ShortStringOptimizationActive() ? m_shortData.m_buffer + : reinterpret_cast(m_shortData).m_data; + } + pointer GetData() + { + return ShortStringOptimizationActive() ? m_shortData.m_buffer + : reinterpret_cast(m_shortData).m_data; + } + void SetData(pointer address) + { + if (!ShortStringOptimizationActive()) + { + reinterpret_cast(m_shortData).m_data = address; + } + else + { + AZSTD_CONTAINER_ASSERT(false, "Programming Error: string class is invoking SetData when the Short Optimization" + " is active. Make sure SetCapacity() is invoked" + " before calling this function."); + } + } + size_type GetSize() const + { + return ShortStringOptimizationActive() ? m_shortData.m_size + : reinterpret_cast(m_shortData).m_size; + } + void SetSize(size_type size) + { + if (ShortStringOptimizationActive()) + { + m_shortData.m_size = size; + } + else + { + reinterpret_cast(m_shortData).m_size = size; + } + } + size_type GetCapacity() const + { + return ShortStringOptimizationActive() ? m_shortData.Capacity + : reinterpret_cast(m_shortData).m_capacity; + } + void SetCapacity(size_type capacity) + { + if (capacity <= ShortStringData::Capacity) + { + m_shortData.m_ssoActive = true; + } + else + { + m_shortData.m_ssoActive = false; + reinterpret_cast(m_shortData).m_capacity = capacity; + } + } + void swap(Storage& rhs) + { + // Use pointer sized swaps to swap the string storage + AZStd::aligned_storage_for_t tempStorage; + ::memcpy(&tempStorage, this, sizeof(Storage)); + ::memcpy(this, &rhs, sizeof(Storage)); + ::memcpy(&rhs, &tempStorage, sizeof(Storage)); + } + private: + ShortStringData m_shortData{}; + AllocatedStringData m_allocatedData; + PointerAlignedData m_pointerData; + }; + + AZStd::compressed_pair m_storage; + +#if defined(HAVE_BENCHMARK) + friend class Benchmark::StringBenchmarkFixture; +#endif #ifdef AZSTD_HAS_CHECKED_ITERATORS void orphan_range(pointer first, pointer last) const @@ -1809,18 +1873,7 @@ namespace AZStd }; template - const typename basic_string::size_type basic_string::npos; - - // basic_string implements a performant swap - /*template - class move_operation_category > - { - public: - typedef swap_move_tag move_cat; - };*/ - - template - inline void swap(basic_string& left, basic_string& right) + inline void swap(basic_string& left, basic_string& right) { left.swap(right); } @@ -1955,6 +2008,16 @@ namespace AZStd { return basic_string(lhs).compare(rhs) >= 0; } + + template + decltype(auto) erase(basic_string& container, const U& element) + { + auto iter = AZStd::remove(container.begin(), container.end(), element); + auto removedCount = AZStd::distance(iter, container.end()); + container.erase(iter, container.end()); + return removedCount; + } + template decltype(auto) erase_if(basic_string& container, Predicate predicate) { @@ -2017,6 +2080,3 @@ namespace AZStd }; } // namespace AZStd - -#endif // AZSTD_STRING_H -#pragma once diff --git a/Code/Framework/AzCore/AzCore/std/string/string_view.h b/Code/Framework/AzCore/AzCore/std/string/string_view.h index 30e61f95ce..841044dd16 100644 --- a/Code/Framework/AzCore/AzCore/std/string/string_view.h +++ b/Code/Framework/AzCore/AzCore/std/string/string_view.h @@ -280,18 +280,36 @@ namespace AZStd static constexpr char_type* assign(char_type* dest, size_t count, char_type ch) noexcept { AZ_Assert(dest, "Invalid input!"); - for (char_type* iter = dest; count; --count, ++iter) + + if constexpr (AZStd::is_same_v) { - assign(*iter, ch); + // Use builtin_memset if available for char type + if (az_builtin_is_constant_evaluated()) + { + for (char_type* iter = dest; count; --count, ++iter) + { + assign(*iter, ch); + } + } + else + { + ::memset(dest, ch, count); + } } + else + { + for (char_type* iter = dest; count; --count, ++iter) + { + assign(*iter, ch); + } + } + return dest; } static constexpr bool eq(char_type left, char_type right) noexcept { return left == right; } static constexpr bool lt(char_type left, char_type right) noexcept { return left < right; } static constexpr int compare(const char_type* s1, const char_type* s2, size_t count) noexcept { - // Regression in VS2017 15.8 and 15.9 where __builtin_memcmp fails in valid checks in constexpr evaluation -#if !defined(AZ_COMPILER_MSVC) || AZ_COMPILER_MSVC < 1915 || AZ_COMPILER_MSVC > 1916 if constexpr (AZStd::is_same_v) { return __builtin_memcmp(s1, s2, count); @@ -301,7 +319,6 @@ namespace AZStd return __builtin_wmemcmp(s1, s2, count); } else -#endif { for (; count; --count, ++s1, ++s2) { @@ -339,10 +356,6 @@ namespace AZStd } static constexpr const char_type* find(const char_type* s, size_t count, const char_type& ch) noexcept { - // There is a bug with the __builtin_char_memchr intrinsic in Visual Studio 2017 15.8.x and 15.9.x - // It reads in one more additional character than the value of count. - // This is probably due to assuming null-termination -#if !defined(AZ_COMPILER_MSVC) || AZ_COMPILER_MSVC < 1915 || AZ_COMPILER_MSVC > 1916 if constexpr (AZStd::is_same_v) { return __builtin_char_memchr(s, ch, count); @@ -353,7 +366,6 @@ namespace AZStd } else -#endif { for (; count; --count, ++s) { @@ -368,64 +380,112 @@ namespace AZStd static constexpr char_type* move(char_type* dest, const char_type* src, size_t count) noexcept { AZ_Assert(dest != nullptr && src != nullptr, "Invalid input!"); - if (count == 0) + if (count == 0 || src == dest) { return dest; } - char_type* result = dest; - // The less than(<), greater than(>) and other variants(<=, >=) - // Cannot be compare pointers within a constexpr due to the potential for undefined behavior - // per the bullet linked in the C++ standard at http://eel.is/c++draft/expr.compound#expr.rel-5 - // Now clang and gcc compilers allow the use of this relation operators in a constexpr, but - // msvc is not so forgiving - // So a workaround of iterating the src pointer, checking for equality with the dest pointer - // is used to check for overlap - auto should_copy_forward = [](const char_type* dest1, const char_type* src2, size_t count2) constexpr -> bool + + #if az_has_builtin_memmove + __builtin_memmove(dest, src, count * sizeof(char_type)); + #else + auto NonBuiltinMove = [](char_type* dest1, const char_type* src1, size_t count1) constexpr + -> char_type* { - bool dest_less_than_src{ true }; - for(const char_type* src_iter = src2; src_iter != src2 + count2; ++src_iter) + if (az_builtin_is_constant_evaluated()) { - if (src_iter == dest1) + // The less than(<), greater than(>) and other variants(<=, >=) + // Cannot be compare pointers within a constexpr due to the potential for undefined behavior + // per the bullet linked in the C++ standard at http://eel.is/c++draft/expr.compound#expr.rel-5 + // Now clang and gcc compilers allow the use of this relation operators in a constexpr, but + // msvc is not so forgiving + // So a workaround of iterating the src pointer, checking for equality with the dest pointer + // is used to check for overlap + auto should_copy_forward = [](const char_type* dest2, const char_type* src2, size_t count2) constexpr -> bool { - dest_less_than_src = false; - break; + bool dest_less_than_src{ true }; + for (const char_type* src_iter = src2; src_iter != src2 + count2; ++src_iter) + { + if (src_iter == dest2) + { + dest_less_than_src = false; + break; + } + } + return dest_less_than_src; + }; + + if (should_copy_forward(dest1, src1, count1)) + { + copy(dest1, src1, count1); + } + else + { + copy_backward(dest1, src1, count1); } } - return dest_less_than_src; + else + { + // Use the faster ::memmove operation at runtime + ::memmove(dest1, src1, count1 * sizeof(char_type)); + } + + return dest1; }; + NonBuiltinMove(dest, src, count); + #endif - if (should_copy_forward(dest, src, count)) - { - copy(dest, src, count); - } - else - { - copy_backward(dest, src, count); - } - - return result; + return dest; } static constexpr char_type* copy(char_type* dest, const char_type* src, size_t count) noexcept { AZ_Assert(dest != nullptr && src != nullptr, "Invalid input!"); - char_type* result = dest; - for(; count; --count, ++dest, ++src) + + #if az_has_builtin_memcpy + __builtin_memcpy(dest, src, count * sizeof(char_type)); + #else + auto NonBuiltinCopy = [](char_type* dest1, const char_type* src1, size_t count1) constexpr + -> char_type* { - assign(*dest, *src); - } - return result; + if (az_builtin_is_constant_evaluated()) + { + for (; count1; --count1, ++dest1, ++src1) + { + assign(*dest1, *src1); + } + } + else + { + ::memcpy(dest1, src1, count1 * sizeof(char_type)); + } + return dest1; + }; + NonBuiltinCopy(dest, src, count); + #endif + + return dest; } // Extension for constexpr workarounds: Addresses of a string literal cannot be compared at compile time and MSVC and clang will just refuse to compile the constexpr // Adding a copy_backwards overload that always copies backwards. - static constexpr char_type* copy_backward(char_type* dest, const char_type*src, size_t count) noexcept + static constexpr char_type* copy_backward(char_type* dest, const char_type* src, size_t count) noexcept { char_type* result = dest; - dest += count; - src += count; - for (; count; --count) + #if az_has_builtin_memmove + __builtin_memmove(dest, src, count * sizeof(char_type)); + #else + if (az_builtin_is_constant_evaluated()) { - assign(*--dest, *--src); + dest += count; + src += count; + for (; count; --count) + { + assign(*--dest, *--src); + } } + else + { + ::memmove(dest, src, count); + } + #endif return result; } diff --git a/Code/Framework/AzCore/CMakeLists.txt b/Code/Framework/AzCore/CMakeLists.txt index 96ed838ccc..838142f0df 100644 --- a/Code/Framework/AzCore/CMakeLists.txt +++ b/Code/Framework/AzCore/CMakeLists.txt @@ -146,6 +146,11 @@ if(PAL_TRAIT_BUILD_TESTS_SUPPORTED) PROPERTY COMPILE_DEFINITIONS VALUES AZCORETEST_DLL_NAME=\"$\" ) + ly_add_target_files( + TARGETS AzCore.Tests + FILES ${CMAKE_CURRENT_SOURCE_DIR}/Tests/Memory/AllocatorBenchmarkRecordings.bin + OUTPUT_SUBDIRECTORY Tests/AzCore/Memory + ) endif() diff --git a/Code/Framework/AzCore/Platform/Android/AzCore/AzCore_Traits_Android.h b/Code/Framework/AzCore/Platform/Android/AzCore/AzCore_Traits_Android.h index 495c8d5f2c..e8efce1133 100644 --- a/Code/Framework/AzCore/Platform/Android/AzCore/AzCore_Traits_Android.h +++ b/Code/Framework/AzCore/Platform/Android/AzCore/AzCore_Traits_Android.h @@ -53,10 +53,8 @@ // Compiler traits ... #define AZ_TRAIT_COMPILER_DEFINE_AZSWNPRINTF_AS_SWPRINTF 1 #define AZ_TRAIT_COMPILER_DEFINE_FS_ERRNO_TYPE 1 -#define AZ_TRAIT_COMPILER_DEFINE_FS_STAT_TYPE 0 #define AZ_TRAIT_COMPILER_DEFINE_GETCURRENTPROCESSID 1 #define AZ_TRAIT_COMPILER_DEFINE_REFGUID 0 -#define AZ_TRAIT_COMPILER_DEFINE_SASSERTDATA_TYPE 1 #define AZ_TRAIT_COMPILER_DEFINE_WCSICMP 1 #define AZ_TRAIT_COMPILER_INT64_T_IS_LONG 1 #define AZ_TRAIT_COMPILER_OPTIMIZE_MISSING_DEFAULT_SWITCH_CASE 0 @@ -75,7 +73,6 @@ #define AZ_TRAIT_HEAPSCHEMA_COMPILE_MALLINFO 0 #define AZ_TRAIT_IS_ABS_PATH_IF_COLON_FOUND_ANYWHERE 0 #define AZ_TRAIT_JSON_CLANG_IGNORE_UNKNOWN_WARNING 0 -#define AZ_TRAIT_MAX_JOB_MANAGER_WORKER_THREADS 0 #define AZ_TRAIT_PERF_MEMORYBENCHMARK_IS_AVAILABLE 0 #define AZ_TRAIT_PUMP_SYSTEM_EVENTS_WHILE_LOADING 0 #define AZ_TRAIT_PUMP_SYSTEM_EVENTS_WHILE_LOADING_INTERVAL_MS 0 diff --git a/Code/Framework/AzCore/Platform/Android/AzCore/IO/SystemFile_Android.cpp b/Code/Framework/AzCore/Platform/Android/AzCore/IO/SystemFile_Android.cpp index b9a6cfef9a..a0b95960ed 100644 --- a/Code/Framework/AzCore/Platform/Android/AzCore/IO/SystemFile_Android.cpp +++ b/Code/Framework/AzCore/Platform/Android/AzCore/IO/SystemFile_Android.cpp @@ -8,7 +8,6 @@ #include #include -#include #include #include @@ -87,7 +86,6 @@ bool SystemFile::PlatformOpen(int mode, int platformFlags) } else { - EBUS_EVENT(FileIOEventBus, OnError, this, nullptr, EINVAL); return false; } @@ -103,7 +101,6 @@ bool SystemFile::PlatformOpen(int mode, int platformFlags) { if (isApkFile) { - EBUS_EVENT(FileIOEventBus, OnError, this, nullptr, ENOSPC); return false; } @@ -125,7 +122,6 @@ bool SystemFile::PlatformOpen(int mode, int platformFlags) if (m_handle == PlatformSpecificInvalidHandle) { - EBUS_EVENT(FileIOEventBus, OnError, this, nullptr, errorCode); return false; } @@ -168,22 +164,8 @@ namespace Platform::Internal entry = readdir(dir); } - int lastError = errno; - if (lastError != 0) - { - EBUS_EVENT(FileIOEventBus, OnError, nullptr, filter, lastError); - } - closedir(dir); } - else - { - int lastError = errno; - if (lastError != ENOENT) - { - EBUS_EVENT(FileIOEventBus, OnError, nullptr, filter, 0); - } - } } void FindFilesInApk(const char* filter, const SystemFile::FindFileCB& cb) @@ -233,11 +215,7 @@ namespace Platform { if (handle != PlatformSpecificInvalidHandle) { - off_t result = fseeko(handle, static_cast(offset), mode); - if (result != 0) - { - EBUS_EVENT(FileIOEventBus, OnError, systemFile, nullptr, errno); - } + fseeko(handle, static_cast(offset), mode); } } @@ -248,7 +226,6 @@ namespace Platform off_t result = ftello(handle); if (result == (off_t)-1) { - EBUS_EVENT(FileIOEventBus, OnError, systemFile, nullptr, errno); return 0; } return aznumeric_cast(result); @@ -292,7 +269,6 @@ namespace Platform if (bytesRead != bytesToRead && ferror(handle)) { - EBUS_EVENT(FileIOEventBus, OnError, systemFile, nullptr, errno); return 0; } @@ -311,7 +287,6 @@ namespace Platform if (bytesWritten != bytesToWrite && ferror(handle)) { - EBUS_EVENT(FileIOEventBus, OnError, systemFile, nullptr, errno); return 0; } @@ -325,10 +300,7 @@ namespace Platform { if (handle != PlatformSpecificInvalidHandle) { - if (fflush(handle) != 0) - { - EBUS_EVENT(FileIOEventBus, OnError, systemFile, nullptr, errno); - } + fflush(handle); } } @@ -347,7 +319,6 @@ namespace Platform struct stat fileStat; if (stat(fileName, &fileStat) < 0) { - EBUS_EVENT(FileIOEventBus, OnError, systemFile, nullptr, 0); return 0; } return static_cast(fileStat.st_size); diff --git a/Code/Framework/AzCore/Platform/Common/Apple/AzCore/IO/SystemFile_Apple.cpp b/Code/Framework/AzCore/Platform/Common/Apple/AzCore/IO/SystemFile_Apple.cpp index be5cbc3859..deb2d49516 100644 --- a/Code/Framework/AzCore/Platform/Common/Apple/AzCore/IO/SystemFile_Apple.cpp +++ b/Code/Framework/AzCore/Platform/Common/Apple/AzCore/IO/SystemFile_Apple.cpp @@ -7,9 +7,9 @@ */ #include -#include #include #include +#include #include #include <../Common/UnixLike/AzCore/IO/Internal/SystemFileUtils_UnixLike.h> @@ -44,21 +44,7 @@ namespace AZ::IO::Platform entry = readdir(dir); } - int lastError = errno; - if (lastError != 0) - { - EBUS_EVENT(FileIOEventBus, OnError, nullptr, filter, lastError); - } - closedir(dir); } - else - { - int lastError = errno; - if (lastError != ENOENT) - { - EBUS_EVENT(FileIOEventBus, OnError, nullptr, filter, 0); - } - } } } diff --git a/Code/Framework/AzCore/Platform/Common/UnixLike/AzCore/Debug/Trace_UnixLike.cpp b/Code/Framework/AzCore/Platform/Common/UnixLike/AzCore/Debug/Trace_UnixLike.cpp index f4d7db802b..92a80b0d9a 100644 --- a/Code/Framework/AzCore/Platform/Common/UnixLike/AzCore/Debug/Trace_UnixLike.cpp +++ b/Code/Framework/AzCore/Platform/Common/UnixLike/AzCore/Debug/Trace_UnixLike.cpp @@ -13,73 +13,67 @@ #include #include -namespace AZ +namespace AZ::Debug::Platform { - namespace Debug - { - namespace Platform - { #if defined(AZ_ENABLE_DEBUG_TOOLS) - bool performDebuggerDetection() + bool performDebuggerDetection() + { + AZ::IO::SystemFile processStatusFile; + if (!processStatusFile.Open("/proc/self/status", AZ::IO::SystemFile::SF_OPEN_READ_ONLY)) + { + return false; + } + + char buffer[4096]; + AZ::IO::SystemFile::SizeType numRead = processStatusFile.Read(sizeof(buffer), buffer); + + const AZStd::string_view processStatusView(buffer, buffer + numRead); + constexpr AZStd::string_view tracerPidString = "TracerPid:"; + const size_t tracerPidOffset = processStatusView.find(tracerPidString); + if (tracerPidOffset == AZStd::string_view::npos) + { + return false; + } + for (size_t i = tracerPidOffset + tracerPidString.length(); i < numRead; ++i) + { + if (!::isspace(processStatusView[i])) { - AZ::IO::SystemFile processStatusFile; - if (!processStatusFile.Open("/proc/self/status", AZ::IO::SystemFile::SF_OPEN_READ_ONLY)) - { - return false; - } - - char buffer[4096]; - AZ::IO::SystemFile::SizeType numRead = processStatusFile.Read(sizeof(buffer), buffer); - - const AZStd::string_view processStatusView(buffer, buffer + numRead); - constexpr AZStd::string_view tracerPidString = "TracerPid:"; - const size_t tracerPidOffset = processStatusView.find(tracerPidString); - if (tracerPidOffset == AZStd::string_view::npos) - { - return false; - } - for (size_t i = tracerPidOffset + tracerPidString.length(); i < numRead; ++i) - { - if (!::isspace(processStatusView[i])) - { - return processStatusView[i] != '0'; - } - } - return false; - } - - bool IsDebuggerPresent() - { - static bool s_detectionPerformed = false; - static bool s_debuggerDetected = false; - if (!s_detectionPerformed) - { - s_debuggerDetected = performDebuggerDetection(); - s_detectionPerformed = true; - } - return s_debuggerDetected; - } - - bool AttachDebugger() - { - // Not supported yet - AZ_Assert(false, "AttachDebugger() is not supported for Unix platform yet"); - return false; - } - - void HandleExceptions(bool) - {} - - void DebugBreak() - { - raise(SIGINT); - } -#endif // AZ_ENABLE_DEBUG_TOOLS - - void Terminate(int exitCode) - { - _exit(exitCode); + return processStatusView[i] != '0'; } } + return false; } -} + + bool IsDebuggerPresent() + { + static bool s_detectionPerformed = false; + static bool s_debuggerDetected = false; + if (!s_detectionPerformed) + { + s_debuggerDetected = performDebuggerDetection(); + s_detectionPerformed = true; + } + return s_debuggerDetected; + } + + bool AttachDebugger() + { + // Not supported yet + AZ_Assert(false, "AttachDebugger() is not supported for Unix platform yet"); + return false; + } + + void HandleExceptions(bool) + {} + + void DebugBreak() + { + raise(SIGINT); + } +#endif // AZ_ENABLE_DEBUG_TOOLS + + void Terminate(int exitCode) + { + _exit(exitCode); + } +} // namespace AZ::Debug::Platform diff --git a/Code/Framework/AzCore/Platform/Common/UnixLike/AzCore/IO/Internal/SystemFileUtils_UnixLike.cpp b/Code/Framework/AzCore/Platform/Common/UnixLike/AzCore/IO/Internal/SystemFileUtils_UnixLike.cpp index 07614ad56b..4c605f6154 100644 --- a/Code/Framework/AzCore/Platform/Common/UnixLike/AzCore/IO/Internal/SystemFileUtils_UnixLike.cpp +++ b/Code/Framework/AzCore/Platform/Common/UnixLike/AzCore/IO/Internal/SystemFileUtils_UnixLike.cpp @@ -8,82 +8,76 @@ #include "SystemFileUtils_UnixLike.h" -namespace AZ +namespace AZ::IO::Internal { - namespace IO + bool FormatAndPeelOffWildCardExtension(const char* sourcePath, char* filePath, size_t filePathSize, char* extensionPath, size_t extensionSize, bool keepWildcard) { - namespace Internal + if (sourcePath == nullptr || filePath == nullptr || extensionPath == nullptr || filePathSize == 0 || extensionSize == 0) { - bool FormatAndPeelOffWildCardExtension(const char* sourcePath, char* filePath, size_t filePathSize, char* extensionPath, size_t extensionSize, bool keepWildcard) + AZ_Error("AZ::IO::Internal", false, "FormatAndPeelOffWildCardExtension: One or more parameters was invalid."); + return false; + } + const char* pSrcPath = sourcePath; + char* pDestPath = filePath; + size_t destinationSize = filePathSize; + unsigned numFileChars = 0; + unsigned numExtensionChars = 0; + unsigned* pNumDestChars = &numFileChars; + bool bIsWildcardExtension = false; + while (*pSrcPath) + { + char srcChar = *pSrcPath++; + + // Skip '*' and '.' + if ((!bIsWildcardExtension && srcChar != '*') || (bIsWildcardExtension && srcChar != '.' && (keepWildcard || srcChar != '*'))) { - if (sourcePath == nullptr || filePath == nullptr || extensionPath == nullptr || filePathSize == 0 || extensionSize == 0) + unsigned numChars = *pNumDestChars; + pDestPath[numChars++] = srcChar; + *pNumDestChars = numChars; + + --destinationSize; + if (destinationSize == 0) { - AZ_Error("AZ::IO::Internal", false, "FormatAndPeelOffWildCardExtension: One or more parameters was invalid."); + AZ_Error( + "AZ::IO::Internal", + false, + "Error splitting sourcePath '%s' into filePath and extension, %s length is larger than storage size %d.", + sourcePath, + bIsWildcardExtension ? "extensionPath" : "filePath", + bIsWildcardExtension ? extensionSize : filePathSize); return false; } - const char* pSrcPath = sourcePath; - char* pDestPath = filePath; - size_t destinationSize = filePathSize; - unsigned numFileChars = 0; - unsigned numExtensionChars = 0; - unsigned* pNumDestChars = &numFileChars; - bool bIsWildcardExtension = false; - while (*pSrcPath) + } + // Wild-card extension is separate + if (srcChar == '*') + { + bIsWildcardExtension = true; + pDestPath = extensionPath; + destinationSize = extensionSize; + pNumDestChars = &numExtensionChars; + if (keepWildcard) { - char srcChar = *pSrcPath++; + unsigned numChars = *pNumDestChars; + pDestPath[numChars++] = srcChar; + *pNumDestChars = numChars; - // Skip '*' and '.' - if ((!bIsWildcardExtension && srcChar != '*') || (bIsWildcardExtension && srcChar != '.' && (keepWildcard || srcChar != '*'))) + --destinationSize; + if (destinationSize == 0) { - unsigned numChars = *pNumDestChars; - pDestPath[numChars++] = srcChar; - *pNumDestChars = numChars; - - --destinationSize; - if (destinationSize == 0) - { - AZ_Error( - "AZ::IO::Internal", - false, - "Error splitting sourcePath '%s' into filePath and extension, %s length is larger than storage size %d.", - sourcePath, - bIsWildcardExtension ? "extensionPath" : "filePath", - bIsWildcardExtension ? extensionSize : filePathSize); - return false; - } - } - // Wild-card extension is separate - if (srcChar == '*') - { - bIsWildcardExtension = true; - pDestPath = extensionPath; - destinationSize = extensionSize; - pNumDestChars = &numExtensionChars; - if (keepWildcard) - { - unsigned numChars = *pNumDestChars; - pDestPath[numChars++] = srcChar; - *pNumDestChars = numChars; - - --destinationSize; - if (destinationSize == 0) - { - AZ_Error( - "AZ::IO::Internal", - false, - "Error splitting sourcePath '%s' into filePath and extension, extensionPath length is larger than storage size %d.", - sourcePath, - extensionSize); - return false; - } - } + AZ_Error( + "AZ::IO::Internal", + false, + "Error splitting sourcePath '%s' into filePath and extension, extensionPath length is larger than storage size %d.", + sourcePath, + extensionSize); + return false; } } - // Close strings - filePath[numFileChars] = 0; - extensionPath[numExtensionChars] = 0; - return true; } } + // Close strings + filePath[numFileChars] = 0; + extensionPath[numExtensionChars] = 0; + return true; } -} +} // namespace AZ::IO::Internal diff --git a/Code/Framework/AzCore/Platform/Common/UnixLike/AzCore/IO/SystemFile_UnixLike.cpp b/Code/Framework/AzCore/Platform/Common/UnixLike/AzCore/IO/SystemFile_UnixLike.cpp index 8f651a9559..2bf7fdc5f2 100644 --- a/Code/Framework/AzCore/Platform/Common/UnixLike/AzCore/IO/SystemFile_UnixLike.cpp +++ b/Code/Framework/AzCore/Platform/Common/UnixLike/AzCore/IO/SystemFile_UnixLike.cpp @@ -8,7 +8,6 @@ #include #include -#include #include #include @@ -130,7 +129,6 @@ namespace Platform int result = remove(fileName); if (result != 0) { - EBUS_EVENT(FileIOEventBus, OnError, nullptr, fileName, result); return false; } @@ -142,7 +140,6 @@ namespace Platform int result = rename(sourceFileName, targetFileName); if (result) { - EBUS_EVENT(FileIOEventBus, OnError, nullptr, sourceFileName, result); return false; } @@ -198,10 +195,6 @@ namespace Platform } azstrcpy(dirPath, AZ_MAX_PATH_LEN, dirName); bool success = CreateDirRecursive(dirPath); - if (!success) - { - EBUS_EVENT(FileIOEventBus, OnError, nullptr, dirName, errno); - } return success; } return false; diff --git a/Code/Framework/AzCore/Platform/Common/UnixLike/AzCore/Platform_UnixLike.cpp b/Code/Framework/AzCore/Platform/Common/UnixLike/AzCore/Platform_UnixLike.cpp index bdc2e753be..4a316bcde6 100644 --- a/Code/Framework/AzCore/Platform/Common/UnixLike/AzCore/Platform_UnixLike.cpp +++ b/Code/Framework/AzCore/Platform/Common/UnixLike/AzCore/Platform_UnixLike.cpp @@ -14,31 +14,28 @@ #include #include -namespace AZ +namespace AZ::Platform { - namespace Platform + ProcessId GetCurrentProcessId() { - ProcessId GetCurrentProcessId() - { - return static_cast(::getpid()); - } + return static_cast(::getpid()); + } - MachineId GetLocalMachineId() + MachineId GetLocalMachineId() + { + if (s_machineId == 0) { + // In specialized server situations, SetLocalMachineId() should be used, with whatever criteria works best in that environment + // A proper implementation for each supported system will be needed instead of this temporary measure to avoid collision in the small scale. + // On a larger scale, the odds of two people getting in here at the same millisecond will go up drastically, and we'll have the same issue again, + // though far less reproducible, for duplicated EntityId's across a network. + s_machineId = static_cast(AZStd::GetTimeUTCMilliSecond() & 0xffffffff); if (s_machineId == 0) { - // In specialized server situations, SetLocalMachineId() should be used, with whatever criteria works best in that environment - // A proper implementation for each supported system will be needed instead of this temporary measure to avoid collision in the small scale. - // On a larger scale, the odds of two people getting in here at the same millisecond will go up drastically, and we'll have the same issue again, - // though far less reproducible, for duplicated EntityId's across a network. - s_machineId = static_cast(AZStd::GetTimeUTCMilliSecond() & 0xffffffff); - if (s_machineId == 0) - { - s_machineId = 1; - AZ_Warning("System", false, "0 machine ID is reserved!"); - } + s_machineId = 1; + AZ_Warning("System", false, "0 machine ID is reserved!"); } - return s_machineId; } - } // namespace Platform -} + return s_machineId; + } +} // namespace AZ::Platform diff --git a/Code/Framework/AzCore/Platform/Common/UnixLike/AzCore/Socket/AzSocket_UnixLike.cpp b/Code/Framework/AzCore/Platform/Common/UnixLike/AzCore/Socket/AzSocket_UnixLike.cpp index 5b35b13d8b..555d70f1e6 100644 --- a/Code/Framework/AzCore/Platform/Common/UnixLike/AzCore/Socket/AzSocket_UnixLike.cpp +++ b/Code/Framework/AzCore/Platform/Common/UnixLike/AzCore/Socket/AzSocket_UnixLike.cpp @@ -18,365 +18,362 @@ #define INVALID_SOCKET (-1) #define closesocket(_s) close(_s) #define GetInternalSocketError errno -typedef int SOCKET; -typedef AZ::u32 AZSOCKLEN; +using SOCKET = int; +using AZSOCKLEN = AZ::u32; -namespace AZ +namespace AZ::AzSock { - namespace AzSock + AZ::s32 TranslateOSError(AZ::s32 oserror) { - AZ::s32 TranslateOSError(AZ::s32 oserror) - { - AZ::s32 error; + AZ::s32 error; #define TRANSLATE(_from, _to) case (_from): error = static_cast(_to); break; - switch (oserror) - { - TRANSLATE(0, AzSockError::eASE_NO_ERROR); - TRANSLATE(EACCES, AzSockError::eASE_EACCES); - TRANSLATE(EADDRINUSE, AzSockError::eASE_EADDRINUSE); - TRANSLATE(EADDRNOTAVAIL, AzSockError::eASE_EADDRNOTAVAIL); - TRANSLATE(EAFNOSUPPORT, AzSockError::eASE_EAFNOSUPPORT); - TRANSLATE(EALREADY, AzSockError::eASE_EALREADY); - TRANSLATE(EBADF, AzSockError::eASE_EBADF); - TRANSLATE(ECONNABORTED, AzSockError::eASE_ECONNABORTED); - TRANSLATE(ECONNREFUSED, AzSockError::eASE_ECONNREFUSED); - TRANSLATE(ECONNRESET, AzSockError::eASE_ECONNRESET); - TRANSLATE(EFAULT, AzSockError::eASE_EFAULT); - TRANSLATE(EHOSTDOWN, AzSockError::eASE_EHOSTDOWN); - TRANSLATE(EINPROGRESS, AzSockError::eASE_EINPROGRESS); - TRANSLATE(EINTR, AzSockError::eASE_EINTR); - TRANSLATE(EINVAL, AzSockError::eASE_EINVAL); - TRANSLATE(EISCONN, AzSockError::eASE_EISCONN); - TRANSLATE(EMFILE, AzSockError::eASE_EMFILE); - TRANSLATE(EMSGSIZE, AzSockError::eASE_EMSGSIZE); - TRANSLATE(ENETUNREACH, AzSockError::eASE_ENETUNREACH); - TRANSLATE(ENOBUFS, AzSockError::eASE_ENOBUFS); - TRANSLATE(ENOPROTOOPT, AzSockError::eASE_ENOPROTOOPT); - TRANSLATE(ENOTCONN, AzSockError::eASE_ENOTCONN); - TRANSLATE(EOPNOTSUPP, AzSockError::eASE_EOPNOTSUPP); - TRANSLATE(EPROTONOSUPPORT, AzSockError::eASE_EAFNOSUPPORT); - TRANSLATE(ETIMEDOUT, AzSockError::eASE_ETIMEDOUT); - TRANSLATE(ETOOMANYREFS, AzSockError::eASE_ETOOMANYREFS); - TRANSLATE(EWOULDBLOCK, AzSockError::eASE_EWOULDBLOCK); + switch (oserror) + { + TRANSLATE(0, AzSockError::eASE_NO_ERROR); + TRANSLATE(EACCES, AzSockError::eASE_EACCES); + TRANSLATE(EADDRINUSE, AzSockError::eASE_EADDRINUSE); + TRANSLATE(EADDRNOTAVAIL, AzSockError::eASE_EADDRNOTAVAIL); + TRANSLATE(EAFNOSUPPORT, AzSockError::eASE_EAFNOSUPPORT); + TRANSLATE(EALREADY, AzSockError::eASE_EALREADY); + TRANSLATE(EBADF, AzSockError::eASE_EBADF); + TRANSLATE(ECONNABORTED, AzSockError::eASE_ECONNABORTED); + TRANSLATE(ECONNREFUSED, AzSockError::eASE_ECONNREFUSED); + TRANSLATE(ECONNRESET, AzSockError::eASE_ECONNRESET); + TRANSLATE(EFAULT, AzSockError::eASE_EFAULT); + TRANSLATE(EHOSTDOWN, AzSockError::eASE_EHOSTDOWN); + TRANSLATE(EINPROGRESS, AzSockError::eASE_EINPROGRESS); + TRANSLATE(EINTR, AzSockError::eASE_EINTR); + TRANSLATE(EINVAL, AzSockError::eASE_EINVAL); + TRANSLATE(EISCONN, AzSockError::eASE_EISCONN); + TRANSLATE(EMFILE, AzSockError::eASE_EMFILE); + TRANSLATE(EMSGSIZE, AzSockError::eASE_EMSGSIZE); + TRANSLATE(ENETUNREACH, AzSockError::eASE_ENETUNREACH); + TRANSLATE(ENOBUFS, AzSockError::eASE_ENOBUFS); + TRANSLATE(ENOPROTOOPT, AzSockError::eASE_ENOPROTOOPT); + TRANSLATE(ENOTCONN, AzSockError::eASE_ENOTCONN); + TRANSLATE(EOPNOTSUPP, AzSockError::eASE_EOPNOTSUPP); + TRANSLATE(EPROTONOSUPPORT, AzSockError::eASE_EAFNOSUPPORT); + TRANSLATE(ETIMEDOUT, AzSockError::eASE_ETIMEDOUT); + TRANSLATE(ETOOMANYREFS, AzSockError::eASE_ETOOMANYREFS); + TRANSLATE(EWOULDBLOCK, AzSockError::eASE_EWOULDBLOCK); - default: - AZ_TracePrintf("AzSock", "AzSocket could not translate OS error code %x, treating as miscellaneous.\n", oserror); - error = static_cast(AzSockError::eASE_MISC_ERROR); - break; - } + default: + AZ_TracePrintf("AzSock", "AzSocket could not translate OS error code %x, treating as miscellaneous.\n", oserror); + error = static_cast(AzSockError::eASE_MISC_ERROR); + break; + } #undef TRANSLATE - return error; - } + return error; + } - AZ::s32 TranslateSocketOption(AzSocketOption opt) - { - AZ::s32 value; + AZ::s32 TranslateSocketOption(AzSocketOption opt) + { + AZ::s32 value; #define TRANSLATE(_from, _to) case (_from): value = (_to); break; - switch (opt) - { - TRANSLATE(AzSocketOption::REUSEADDR, SO_REUSEADDR); - TRANSLATE(AzSocketOption::KEEPALIVE, SO_KEEPALIVE); - TRANSLATE(AzSocketOption::LINGER, SO_LINGER); + switch (opt) + { + TRANSLATE(AzSocketOption::REUSEADDR, SO_REUSEADDR); + TRANSLATE(AzSocketOption::KEEPALIVE, SO_KEEPALIVE); + TRANSLATE(AzSocketOption::LINGER, SO_LINGER); - default: - AZ_TracePrintf("AzSock", "AzSocket option %x not yet supported", opt); - value = 0; - break; - } + default: + AZ_TracePrintf("AzSock", "AzSocket option %x not yet supported", opt); + value = 0; + break; + } #undef TRANSLATE - return value; - } + return value; + } - AZSOCKET HandleInvalidSocket(SOCKET sock) + AZSOCKET HandleInvalidSocket(SOCKET sock) + { + AZSOCKET azsock = static_cast(sock); + if (sock == INVALID_SOCKET) { - AZSOCKET azsock = static_cast(sock); - if (sock == INVALID_SOCKET) - { - azsock = TranslateOSError(GetInternalSocketError); - } - return azsock; + azsock = TranslateOSError(GetInternalSocketError); } + return azsock; + } - AZ::s32 HandleSocketError(AZ::s32 socketError) + AZ::s32 HandleSocketError(AZ::s32 socketError) + { + if (socketError == SOCKET_ERROR) { - if (socketError == SOCKET_ERROR) - { - socketError = TranslateOSError(GetInternalSocketError); - } - return socketError; + socketError = TranslateOSError(GetInternalSocketError); } + return socketError; + } - const char* GetStringForError(AZ::s32 errorNumber) - { - AzSockError errorCode = AzSockError(errorNumber); + const char* GetStringForError(AZ::s32 errorNumber) + { + AzSockError errorCode = AzSockError(errorNumber); #define CASE_RETSTRING(errorEnum) case errorEnum: { return #errorEnum; } - switch (errorCode) - { - CASE_RETSTRING(AzSockError::eASE_NO_ERROR); - CASE_RETSTRING(AzSockError::eASE_SOCKET_INVALID); - CASE_RETSTRING(AzSockError::eASE_EACCES); - CASE_RETSTRING(AzSockError::eASE_EADDRINUSE); - CASE_RETSTRING(AzSockError::eASE_EADDRNOTAVAIL); - CASE_RETSTRING(AzSockError::eASE_EAFNOSUPPORT); - CASE_RETSTRING(AzSockError::eASE_EALREADY); - CASE_RETSTRING(AzSockError::eASE_EBADF); - CASE_RETSTRING(AzSockError::eASE_ECONNABORTED); - CASE_RETSTRING(AzSockError::eASE_ECONNREFUSED); - CASE_RETSTRING(AzSockError::eASE_ECONNRESET); - CASE_RETSTRING(AzSockError::eASE_EFAULT); - CASE_RETSTRING(AzSockError::eASE_EHOSTDOWN); - CASE_RETSTRING(AzSockError::eASE_EINPROGRESS); - CASE_RETSTRING(AzSockError::eASE_EINTR); - CASE_RETSTRING(AzSockError::eASE_EINVAL); - CASE_RETSTRING(AzSockError::eASE_EISCONN); - CASE_RETSTRING(AzSockError::eASE_EMFILE); - CASE_RETSTRING(AzSockError::eASE_EMSGSIZE); - CASE_RETSTRING(AzSockError::eASE_ENETUNREACH); - CASE_RETSTRING(AzSockError::eASE_ENOBUFS); - CASE_RETSTRING(AzSockError::eASE_ENOPROTOOPT); - CASE_RETSTRING(AzSockError::eASE_ENOTCONN); - CASE_RETSTRING(AzSockError::eASE_ENOTINITIALISED); - CASE_RETSTRING(AzSockError::eASE_EOPNOTSUPP); - CASE_RETSTRING(AzSockError::eASE_EPIPE); - CASE_RETSTRING(AzSockError::eASE_EPROTONOSUPPORT); - CASE_RETSTRING(AzSockError::eASE_ETIMEDOUT); - CASE_RETSTRING(AzSockError::eASE_ETOOMANYREFS); - CASE_RETSTRING(AzSockError::eASE_EWOULDBLOCK); - CASE_RETSTRING(AzSockError::eASE_EWOULDBLOCK_CONN); - CASE_RETSTRING(AzSockError::eASE_MISC_ERROR); - } + switch (errorCode) + { + CASE_RETSTRING(AzSockError::eASE_NO_ERROR); + CASE_RETSTRING(AzSockError::eASE_SOCKET_INVALID); + CASE_RETSTRING(AzSockError::eASE_EACCES); + CASE_RETSTRING(AzSockError::eASE_EADDRINUSE); + CASE_RETSTRING(AzSockError::eASE_EADDRNOTAVAIL); + CASE_RETSTRING(AzSockError::eASE_EAFNOSUPPORT); + CASE_RETSTRING(AzSockError::eASE_EALREADY); + CASE_RETSTRING(AzSockError::eASE_EBADF); + CASE_RETSTRING(AzSockError::eASE_ECONNABORTED); + CASE_RETSTRING(AzSockError::eASE_ECONNREFUSED); + CASE_RETSTRING(AzSockError::eASE_ECONNRESET); + CASE_RETSTRING(AzSockError::eASE_EFAULT); + CASE_RETSTRING(AzSockError::eASE_EHOSTDOWN); + CASE_RETSTRING(AzSockError::eASE_EINPROGRESS); + CASE_RETSTRING(AzSockError::eASE_EINTR); + CASE_RETSTRING(AzSockError::eASE_EINVAL); + CASE_RETSTRING(AzSockError::eASE_EISCONN); + CASE_RETSTRING(AzSockError::eASE_EMFILE); + CASE_RETSTRING(AzSockError::eASE_EMSGSIZE); + CASE_RETSTRING(AzSockError::eASE_ENETUNREACH); + CASE_RETSTRING(AzSockError::eASE_ENOBUFS); + CASE_RETSTRING(AzSockError::eASE_ENOPROTOOPT); + CASE_RETSTRING(AzSockError::eASE_ENOTCONN); + CASE_RETSTRING(AzSockError::eASE_ENOTINITIALISED); + CASE_RETSTRING(AzSockError::eASE_EOPNOTSUPP); + CASE_RETSTRING(AzSockError::eASE_EPIPE); + CASE_RETSTRING(AzSockError::eASE_EPROTONOSUPPORT); + CASE_RETSTRING(AzSockError::eASE_ETIMEDOUT); + CASE_RETSTRING(AzSockError::eASE_ETOOMANYREFS); + CASE_RETSTRING(AzSockError::eASE_EWOULDBLOCK); + CASE_RETSTRING(AzSockError::eASE_EWOULDBLOCK_CONN); + CASE_RETSTRING(AzSockError::eASE_MISC_ERROR); + } #undef CASE_RETSTRING - return "(invalid)"; - } - - AZ::u32 HostToNetLong(AZ::u32 hstLong) - { - return htonl(hstLong); - } - - AZ::u32 NetToHostLong(AZ::u32 netLong) - { - return ntohl(netLong); - } - - AZ::u16 HostToNetShort(AZ::u16 hstShort) - { - return htons(hstShort); - } - - AZ::u16 NetToHostShort(AZ::u16 netShort) - { - return ntohs(netShort); - } - - AZ::s32 GetHostName(AZStd::string& hostname) - { - AZ::s32 result = 0; - hostname.clear(); - char name[256]; - result = HandleSocketError(gethostname(name, AZ_ARRAY_SIZE(name))); - if (result == static_cast(AzSockError::eASE_NO_ERROR)) - { - hostname = name; - } - return result; - } - - AZSOCKET Socket() - { - return Socket(AF_INET, SOCK_STREAM, IPPROTO_TCP); - } - - AZSOCKET Socket(AZ::s32 af, AZ::s32 type, AZ::s32 protocol) - { - return HandleInvalidSocket(socket(af, type, protocol)); - } - - AZ::s32 SetSockOpt(AZSOCKET sock, AZ::s32 level, AZ::s32 optname, const char* optval, AZ::s32 optlen) - { - AZSOCKLEN length(optlen); - return HandleSocketError(setsockopt(sock, level, optname, optval, length)); - } - - AZ::s32 SetSocketOption(AZSOCKET sock, AzSocketOption opt, bool enable) - { - AZ::u32 val = enable ? 1 : 0; - return SetSockOpt(sock, SOL_SOCKET, TranslateSocketOption(opt), reinterpret_cast(&val), sizeof(val)); - } - - AZ::s32 EnableTCPNoDelay(AZSOCKET sock, bool enable) - { - AZ::u32 val = enable ? 1 : 0; - return SetSockOpt(sock, IPPROTO_TCP, TCP_NODELAY, reinterpret_cast(&val), sizeof(val)); - } - - AZ::s32 SetSocketBlockingMode(AZSOCKET sock, bool blocking) - { - AZ::s32 flags = ::fcntl(sock, F_GETFL); - flags &= ~O_NONBLOCK; - flags |= (blocking ? 0 : O_NONBLOCK); - return ::fcntl(sock, F_SETFL, flags); - } - - AZ::s32 CloseSocket(AZSOCKET sock) - { - return HandleSocketError(closesocket(sock)); - } - - AZ::s32 Shutdown(AZSOCKET sock, AZ::s32 how) - { - return HandleSocketError(shutdown(sock, how)); - } - - AZ::s32 GetSockName(AZSOCKET sock, AzSocketAddress& addr) - { - AZSOCKADDR sAddr; - AZSOCKLEN sAddrLen = sizeof(AZSOCKADDR); - memset(&sAddr, 0, sAddrLen); - AZ::s32 result = HandleSocketError(getsockname(sock, &sAddr, &sAddrLen)); - addr = sAddr; - return result; - } - - AZ::s32 Connect(AZSOCKET sock, const AzSocketAddress& addr) - { - AZ::s32 err = HandleSocketError(connect(sock, addr.GetTargetAddress(), sizeof(AZSOCKADDR_IN))); - if (err == static_cast(AzSockError::eASE_EINPROGRESS)) - { - err = static_cast(AzSockError::eASE_EWOULDBLOCK_CONN); - } - return err; - } - - AZ::s32 Listen(AZSOCKET sock, AZ::s32 backlog) - { - return HandleSocketError(listen(sock, backlog)); - } - - AZSOCKET Accept(AZSOCKET sock, AzSocketAddress& addr) - { - AZSOCKADDR sAddr; - AZSOCKLEN sAddrLen = sizeof(AZSOCKADDR); - memset(&sAddr, 0, sAddrLen); - AZSOCKET outSock = HandleInvalidSocket(accept(sock, &sAddr, &sAddrLen)); - addr = sAddr; - return outSock; - } - - AZ::s32 Send(AZSOCKET sock, const char* buf, AZ::s32 len, AZ::s32 flags) - { - AZ::s32 msgNoSignal = MSG_NOSIGNAL; - return HandleSocketError(send(sock, buf, len, flags | msgNoSignal)); - } - - AZ::s32 Recv(AZSOCKET sock, char* buf, AZ::s32 len, AZ::s32 flags) - { - return HandleSocketError(recv(sock, buf, len, flags)); - } - - AZ::s32 Bind(AZSOCKET sock, const AzSocketAddress& addr) - { - return HandleSocketError(bind(sock, addr.GetTargetAddress(), sizeof(AZSOCKADDR_IN))); - } - - AZ::s32 Select(AZSOCKET sock, AZFD_SET* readfdsock, AZFD_SET* writefdsock, AZFD_SET* exceptfdsock, AZTIMEVAL* timeout) - { - return HandleSocketError(::select(sock + 1, readfdsock, writefdsock, exceptfdsock, timeout)); - } - - AZ::s32 IsRecvPending(AZSOCKET sock, AZTIMEVAL* timeout) - { - AZFD_SET readSet; - FD_ZERO(&readSet); - FD_SET(sock, &readSet); - - AZ::s32 ret = Select(sock, &readSet, nullptr, nullptr, timeout); - if (ret >= 0) - { - ret = FD_ISSET(sock, &readSet); - if (ret != 0) - { - ret = 1; - } - } - - return ret; - } - - AZ::s32 WaitForWritableSocket(AZSOCKET sock, AZTIMEVAL* timeout) - { - AZFD_SET writeSet; - FD_ZERO(&writeSet); - FD_SET(sock, &writeSet); - - AZ::s32 ret = Select(sock, nullptr, &writeSet, nullptr, timeout); - if (ret >= 0) - { - ret = FD_ISSET(sock, &writeSet); - if (ret != 0) - { - ret = 1; - } - } - - return ret; - } - - AZ::s32 Startup() - { - return static_cast(AzSockError::eASE_NO_ERROR); - } - - AZ::s32 Cleanup() - { - return static_cast(AzSockError::eASE_NO_ERROR); - } - - bool ResolveAddress(const AZStd::string& ip, AZ::u16 port, AZSOCKADDR_IN& socketAddress) - { - bool foundAddr = false; - addrinfo hints; - memset(&hints, 0, sizeof(addrinfo)); - addrinfo* addrInfo; - hints.ai_family = AF_INET; - hints.ai_flags = AI_CANONNAME; - char strPort[8]; - azsnprintf(strPort, AZ_ARRAY_SIZE(strPort), "%d", port); - - const char* address = ip.c_str(); - if (address && strlen(address) == 0) // getaddrinfo doesn't accept empty string - { - address = nullptr; - } - - AZ::s32 err = HandleSocketError(getaddrinfo(address, strPort, &hints, &addrInfo)); - if (err == 0) // eASE_NO_ERROR - { - if (addrInfo->ai_family == AF_INET) - { - socketAddress = *reinterpret_cast(addrInfo->ai_addr); - foundAddr = true; - } - - freeaddrinfo(addrInfo); - } - else - { - AZ_Assert(false, "AzSocketAddress could not resolve address %s with port %d. (reason - %s)", ip.c_str(), port, GetStringForError(err)); - } - return foundAddr; - } + return "(invalid)"; } -} + + AZ::u32 HostToNetLong(AZ::u32 hstLong) + { + return htonl(hstLong); + } + + AZ::u32 NetToHostLong(AZ::u32 netLong) + { + return ntohl(netLong); + } + + AZ::u16 HostToNetShort(AZ::u16 hstShort) + { + return htons(hstShort); + } + + AZ::u16 NetToHostShort(AZ::u16 netShort) + { + return ntohs(netShort); + } + + AZ::s32 GetHostName(AZStd::string& hostname) + { + AZ::s32 result = 0; + hostname.clear(); + char name[256]; + result = HandleSocketError(gethostname(name, AZ_ARRAY_SIZE(name))); + if (result == static_cast(AzSockError::eASE_NO_ERROR)) + { + hostname = name; + } + return result; + } + + AZSOCKET Socket() + { + return Socket(AF_INET, SOCK_STREAM, IPPROTO_TCP); + } + + AZSOCKET Socket(AZ::s32 af, AZ::s32 type, AZ::s32 protocol) + { + return HandleInvalidSocket(socket(af, type, protocol)); + } + + AZ::s32 SetSockOpt(AZSOCKET sock, AZ::s32 level, AZ::s32 optname, const char* optval, AZ::s32 optlen) + { + AZSOCKLEN length(optlen); + return HandleSocketError(setsockopt(sock, level, optname, optval, length)); + } + + AZ::s32 SetSocketOption(AZSOCKET sock, AzSocketOption opt, bool enable) + { + AZ::u32 val = enable ? 1 : 0; + return SetSockOpt(sock, SOL_SOCKET, TranslateSocketOption(opt), reinterpret_cast(&val), sizeof(val)); + } + + AZ::s32 EnableTCPNoDelay(AZSOCKET sock, bool enable) + { + AZ::u32 val = enable ? 1 : 0; + return SetSockOpt(sock, IPPROTO_TCP, TCP_NODELAY, reinterpret_cast(&val), sizeof(val)); + } + + AZ::s32 SetSocketBlockingMode(AZSOCKET sock, bool blocking) + { + AZ::s32 flags = ::fcntl(sock, F_GETFL); + flags &= ~O_NONBLOCK; + flags |= (blocking ? 0 : O_NONBLOCK); + return ::fcntl(sock, F_SETFL, flags); + } + + AZ::s32 CloseSocket(AZSOCKET sock) + { + return HandleSocketError(closesocket(sock)); + } + + AZ::s32 Shutdown(AZSOCKET sock, AZ::s32 how) + { + return HandleSocketError(shutdown(sock, how)); + } + + AZ::s32 GetSockName(AZSOCKET sock, AzSocketAddress& addr) + { + AZSOCKADDR sAddr; + AZSOCKLEN sAddrLen = sizeof(AZSOCKADDR); + memset(&sAddr, 0, sAddrLen); + AZ::s32 result = HandleSocketError(getsockname(sock, &sAddr, &sAddrLen)); + addr = sAddr; + return result; + } + + AZ::s32 Connect(AZSOCKET sock, const AzSocketAddress& addr) + { + AZ::s32 err = HandleSocketError(connect(sock, addr.GetTargetAddress(), sizeof(AZSOCKADDR_IN))); + if (err == static_cast(AzSockError::eASE_EINPROGRESS)) + { + err = static_cast(AzSockError::eASE_EWOULDBLOCK_CONN); + } + return err; + } + + AZ::s32 Listen(AZSOCKET sock, AZ::s32 backlog) + { + return HandleSocketError(listen(sock, backlog)); + } + + AZSOCKET Accept(AZSOCKET sock, AzSocketAddress& addr) + { + AZSOCKADDR sAddr; + AZSOCKLEN sAddrLen = sizeof(AZSOCKADDR); + memset(&sAddr, 0, sAddrLen); + AZSOCKET outSock = HandleInvalidSocket(accept(sock, &sAddr, &sAddrLen)); + addr = sAddr; + return outSock; + } + + AZ::s32 Send(AZSOCKET sock, const char* buf, AZ::s32 len, AZ::s32 flags) + { + AZ::s32 msgNoSignal = MSG_NOSIGNAL; + return HandleSocketError(send(sock, buf, len, flags | msgNoSignal)); + } + + AZ::s32 Recv(AZSOCKET sock, char* buf, AZ::s32 len, AZ::s32 flags) + { + return HandleSocketError(recv(sock, buf, len, flags)); + } + + AZ::s32 Bind(AZSOCKET sock, const AzSocketAddress& addr) + { + return HandleSocketError(bind(sock, addr.GetTargetAddress(), sizeof(AZSOCKADDR_IN))); + } + + AZ::s32 Select(AZSOCKET sock, AZFD_SET* readfdsock, AZFD_SET* writefdsock, AZFD_SET* exceptfdsock, AZTIMEVAL* timeout) + { + return HandleSocketError(::select(sock + 1, readfdsock, writefdsock, exceptfdsock, timeout)); + } + + AZ::s32 IsRecvPending(AZSOCKET sock, AZTIMEVAL* timeout) + { + AZFD_SET readSet; + FD_ZERO(&readSet); + FD_SET(sock, &readSet); + + AZ::s32 ret = Select(sock, &readSet, nullptr, nullptr, timeout); + if (ret >= 0) + { + ret = FD_ISSET(sock, &readSet); + if (ret != 0) + { + ret = 1; + } + } + + return ret; + } + + AZ::s32 WaitForWritableSocket(AZSOCKET sock, AZTIMEVAL* timeout) + { + AZFD_SET writeSet; + FD_ZERO(&writeSet); + FD_SET(sock, &writeSet); + + AZ::s32 ret = Select(sock, nullptr, &writeSet, nullptr, timeout); + if (ret >= 0) + { + ret = FD_ISSET(sock, &writeSet); + if (ret != 0) + { + ret = 1; + } + } + + return ret; + } + + AZ::s32 Startup() + { + return static_cast(AzSockError::eASE_NO_ERROR); + } + + AZ::s32 Cleanup() + { + return static_cast(AzSockError::eASE_NO_ERROR); + } + + bool ResolveAddress(const AZStd::string& ip, AZ::u16 port, AZSOCKADDR_IN& socketAddress) + { + bool foundAddr = false; + addrinfo hints; + memset(&hints, 0, sizeof(addrinfo)); + addrinfo* addrInfo; + hints.ai_family = AF_INET; + hints.ai_flags = AI_CANONNAME; + char strPort[8]; + azsnprintf(strPort, AZ_ARRAY_SIZE(strPort), "%d", port); + + const char* address = ip.c_str(); + if (address && strlen(address) == 0) // getaddrinfo doesn't accept empty string + { + address = nullptr; + } + + AZ::s32 err = HandleSocketError(getaddrinfo(address, strPort, &hints, &addrInfo)); + if (err == 0) // eASE_NO_ERROR + { + if (addrInfo->ai_family == AF_INET) + { + socketAddress = *reinterpret_cast(addrInfo->ai_addr); + foundAddr = true; + } + + freeaddrinfo(addrInfo); + } + else + { + AZ_Assert(false, "AzSocketAddress could not resolve address %s with port %d. (reason - %s)", ip.c_str(), port, GetStringForError(err)); + } + return foundAddr; + } +} // namespace AZ::AzSock diff --git a/Code/Framework/AzCore/Platform/Common/UnixLike/AzCore/Utils/Utils_UnixLike.cpp b/Code/Framework/AzCore/Platform/Common/UnixLike/AzCore/Utils/Utils_UnixLike.cpp index 7327c8f152..8a93f88ac2 100644 --- a/Code/Framework/AzCore/Platform/Common/UnixLike/AzCore/Utils/Utils_UnixLike.cpp +++ b/Code/Framework/AzCore/Platform/Common/UnixLike/AzCore/Utils/Utils_UnixLike.cpp @@ -11,68 +11,65 @@ #include #include -namespace AZ +namespace AZ::Utils { - namespace Utils + void RequestAbnormalTermination() { - void RequestAbnormalTermination() + abort(); + } + + void NativeErrorMessageBox(const char*, const char*) {} + + AZ::IO::FixedMaxPathString GetHomeDirectory() + { + constexpr AZStd::string_view overrideHomeDirKey = "/Amazon/Settings/override_home_dir"; + AZ::IO::FixedMaxPathString overrideHomeDir; + if (auto settingsRegistry = AZ::SettingsRegistry::Get(); settingsRegistry != nullptr) { - abort(); - } - - void NativeErrorMessageBox(const char*, const char*) {} - - AZ::IO::FixedMaxPathString GetHomeDirectory() - { - constexpr AZStd::string_view overrideHomeDirKey = "/Amazon/Settings/override_home_dir"; - AZ::IO::FixedMaxPathString overrideHomeDir; - if (auto settingsRegistry = AZ::SettingsRegistry::Get(); settingsRegistry != nullptr) + if (settingsRegistry->Get(overrideHomeDir, overrideHomeDirKey)) { - if (settingsRegistry->Get(overrideHomeDir, overrideHomeDirKey)) - { - AZ::IO::FixedMaxPath path{overrideHomeDir}; - return path.Native(); - } - } - - if (const char* homePath = std::getenv("HOME"); homePath != nullptr) - { - AZ::IO::FixedMaxPath path{homePath}; + AZ::IO::FixedMaxPath path{overrideHomeDir}; return path.Native(); } - - struct passwd* pass = getpwuid(getuid()); - if (pass) - { - AZ::IO::FixedMaxPath path{pass->pw_dir}; - return path.Native(); - } - - return {}; } - bool ConvertToAbsolutePath(const char* path, char* absolutePath, AZ::u64 maxLength) + if (const char* homePath = std::getenv("HOME"); homePath != nullptr) { + AZ::IO::FixedMaxPath path{homePath}; + return path.Native(); + } + + struct passwd* pass = getpwuid(getuid()); + if (pass) + { + AZ::IO::FixedMaxPath path{pass->pw_dir}; + return path.Native(); + } + + return {}; + } + + bool ConvertToAbsolutePath(const char* path, char* absolutePath, AZ::u64 maxLength) + { #ifdef PATH_MAX - static constexpr size_t UnixMaxPathLength = PATH_MAX; + static constexpr size_t UnixMaxPathLength = PATH_MAX; #else - // Fallback to 4096 if the PATH_MAX macro isn't defined on the Unix System - static constexpr size_t UnixMaxPathLength = 4096; + // Fallback to 4096 if the PATH_MAX macro isn't defined on the Unix System + static constexpr size_t UnixMaxPathLength = 4096; #endif - if (!AZ::IO::PathView(path).IsAbsolute()) + if (!AZ::IO::PathView(path).IsAbsolute()) + { + // note that realpath fails if the path does not exist and actually changes the return value + // to be the actual place that FAILED, which we don't want. + // if we fail, we'd prefer to fall through and at least use the original path. + char absolutePathBuffer[UnixMaxPathLength]; + if (const char* result = realpath(path, absolutePathBuffer); result != nullptr) { - // note that realpath fails if the path does not exist and actually changes the return value - // to be the actual place that FAILED, which we don't want. - // if we fail, we'd prefer to fall through and at least use the original path. - char absolutePathBuffer[UnixMaxPathLength]; - if (const char* result = realpath(path, absolutePathBuffer); result != nullptr) - { - azstrcpy(absolutePath, maxLength, absolutePathBuffer); - return true; - } + azstrcpy(absolutePath, maxLength, absolutePathBuffer); + return true; } - azstrcpy(absolutePath, maxLength, path); - return AZ::IO::PathView(absolutePath).IsAbsolute(); } - } // namespace Utils -} // namespace AZ + azstrcpy(absolutePath, maxLength, path); + return AZ::IO::PathView(absolutePath).IsAbsolute(); + } +} // namespace AZ::Utils diff --git a/Code/Framework/AzCore/Platform/Common/UnixLike/AzCore/std/parallel/internal/thread_UnixLike.cpp b/Code/Framework/AzCore/Platform/Common/UnixLike/AzCore/std/parallel/internal/thread_UnixLike.cpp index b615f677f1..da5d95b9a4 100644 --- a/Code/Framework/AzCore/Platform/Common/UnixLike/AzCore/std/parallel/internal/thread_UnixLike.cpp +++ b/Code/Framework/AzCore/Platform/Common/UnixLike/AzCore/std/parallel/internal/thread_UnixLike.cpp @@ -35,7 +35,6 @@ namespace AZStd destroy_thread_info(ti); ThreadEventBus::Broadcast(&ThreadEventBus::Events::OnThreadExit, this_thread::get_id()); - ThreadDrillerEventBus::Broadcast(&ThreadDrillerEventBus::Events::OnThreadExit, this_thread::get_id()); pthread_exit(nullptr); return nullptr; } @@ -88,7 +87,6 @@ namespace AZStd Platform::PostCreateThread(tId, name, cpuId); ThreadEventBus::Broadcast(&ThreadEventBus::Events::OnThreadEnter, thread::id(tId), desc); - ThreadDrillerEventBus::Broadcast(&ThreadDrillerEventBus::Events::OnThreadEnter, thread::id(tId), desc); return tId; } } diff --git a/Code/Framework/AzCore/Platform/Common/UnixLikeDefault/AzCore/IO/SystemFile_UnixLikeDefault.cpp b/Code/Framework/AzCore/Platform/Common/UnixLikeDefault/AzCore/IO/SystemFile_UnixLikeDefault.cpp index 88c47ed142..7302232a49 100644 --- a/Code/Framework/AzCore/Platform/Common/UnixLikeDefault/AzCore/IO/SystemFile_UnixLikeDefault.cpp +++ b/Code/Framework/AzCore/Platform/Common/UnixLikeDefault/AzCore/IO/SystemFile_UnixLikeDefault.cpp @@ -8,7 +8,6 @@ #include #include -#include #include #include @@ -61,7 +60,6 @@ bool SystemFile::PlatformOpen(int mode, int platformFlags) } else { - EBUS_EVENT(FileIOEventBus, OnError, this, nullptr, 0); return false; } @@ -88,7 +86,6 @@ bool SystemFile::PlatformOpen(int mode, int platformFlags) if (m_handle == PlatformSpecificInvalidHandle) { - EBUS_EVENT(FileIOEventBus, OnError, this, nullptr, errno); return false; } else @@ -119,11 +116,7 @@ namespace Platform { if (handle != PlatformSpecificInvalidHandle) { - int result = lseek(handle, offset, mode); - if (result == -1) - { - EBUS_EVENT(FileIOEventBus, OnError, systemFile, nullptr, errno); - } + lseek(handle, offset, mode); } } @@ -132,10 +125,6 @@ namespace Platform if (handle != PlatformSpecificInvalidHandle) { off_t result = lseek(handle, 0, SEEK_CUR); - if (result == (off_t)-1) - { - EBUS_EVENT(FileIOEventBus, OnError, systemFile, nullptr, errno); - } return aznumeric_cast(result); } @@ -149,14 +138,12 @@ namespace Platform off_t current = lseek(handle, 0, SEEK_CUR); if (current == (off_t)-1) { - EBUS_EVENT(FileIOEventBus, OnError, systemFile, nullptr, current); return false; } off_t end = lseek(handle, 0, SEEK_END); if (end == (off_t)-1) { - EBUS_EVENT(FileIOEventBus, OnError, systemFile, nullptr, end); return false; } @@ -191,7 +178,6 @@ namespace Platform ssize_t bytesRead = read(handle, buffer, byteSize); if (bytesRead == -1) { - EBUS_EVENT(FileIOEventBus, OnError, systemFile, nullptr, errno); return 0; } return bytesRead; @@ -207,7 +193,6 @@ namespace Platform ssize_t result = write(handle, buffer, byteSize); if (result == -1) { - EBUS_EVENT(FileIOEventBus, OnError, systemFile, nullptr, errno); return 0; } return result; @@ -221,10 +206,7 @@ namespace Platform if (handle != PlatformSpecificInvalidHandle) { #if AZ_TRAIT_SYSTEMFILE_FSYNC_IS_DEFINED - if (fsync(handle) != 0) - { - EBUS_EVENT(FileIOEventBus, OnError, systemFile, nullptr, errno); - } + fsync(handle); #endif } } @@ -236,7 +218,6 @@ namespace Platform struct stat stat; if (fstat(handle, &stat) < 0) { - EBUS_EVENT(FileIOEventBus, OnError, systemFile, nullptr, 0); return 0; } return stat.st_size; diff --git a/Code/Framework/AzCore/Platform/Common/VisualStudio/AzCore/Natvis/azcore.natvis b/Code/Framework/AzCore/Platform/Common/VisualStudio/AzCore/Natvis/azcore.natvis index 3730b8a4f9..dca82e2439 100644 --- a/Code/Framework/AzCore/Platform/Common/VisualStudio/AzCore/Natvis/azcore.natvis +++ b/Code/Framework/AzCore/Platform/Common/VisualStudio/AzCore/Natvis/azcore.natvis @@ -10,6 +10,13 @@ + + {m_element} + + + {$T1} is empty + + reverse_iterator base() {m_current} @@ -388,35 +395,41 @@ - - {m_buffer,s} - {m_data,s} - m_buffer,s - m_data,s + + {((AZStd::compressed_pair_element<AZStd::basic_string<char,$T1,$T2>::Storage,0,0>&)m_storage).m_element.m_shortData.m_buffer,s} + {((AZStd::compressed_pair_element<AZStd::basic_string<char,$T1,$T2>::Storage,0,0>&)m_storage).m_element.m_allocatedData.m_data,s} + ((AZStd::compressed_pair_element<AZStd::basic_string<char,$T1,$T2>::Storage,0,0>&)m_storage).m_element.m_shortData.m_buffer,s + ((AZStd::compressed_pair_element<AZStd::basic_string<char,$T1,$T2>::Storage,0,0>&)m_storage).m_element.m_allocatedData.m_data,s - m_size - m_capacity + (size_t)((AZStd::compressed_pair_element<AZStd::basic_string<char,$T1,$T2>::Storage,0,0>&)m_storage).m_element.m_shortData.m_size + ((AZStd::compressed_pair_element<AZStd::basic_string<char,$T1,$T2>::Storage,0,0>&)m_storage).m_element.m_allocatedData.m_size + ((AZStd::compressed_pair_element<AZStd::basic_string<char,$T1,$T2>::Storage,0,0>&)m_storage).m_element.m_shortData.Capacity + ((AZStd::compressed_pair_element<AZStd::basic_string<char,$T1,$T2>::Storage,0,0>&)m_storage).m_element.m_allocatedData.m_capacity - m_size - m_buffer - m_data + ((AZStd::compressed_pair_element<AZStd::basic_string<char,$T1,$T2>::Storage,0,0>&)m_storage).m_element.m_shortData.m_size,u + ((AZStd::compressed_pair_element<AZStd::basic_string<char,$T1,$T2>::Storage,0,0>&)m_storage).m_element.m_allocatedData.m_size + ((AZStd::compressed_pair_element<AZStd::basic_string<char,$T1,$T2>::Storage,0,0>&)m_storage).m_element.m_shortData.m_buffer + ((AZStd::compressed_pair_element<AZStd::basic_string<char,$T1,$T2>::Storage,0,0>&)m_storage).m_element.m_allocatedData.m_data - {m_buffer,su} - {m_data,su} - m_buffer,su - m_data,su + {((AZStd::compressed_pair_element<AZStd::basic_string<wchar_t,$T1,$T2>::Storage,0,0>&)m_storage).m_element.m_shortData.m_buffer,su} + {((AZStd::compressed_pair_element<AZStd::basic_string<wchar_t,$T1,$T2>::Storage,0,0>&)m_storage).m_element.m_allocatedData.m_data,su} + ((AZStd::compressed_pair_element<AZStd::basic_string<wchar_t,$T1,$T2>::Storage,0,0>&)m_storage).m_element.m_shortData.m_buffer,su + ((AZStd::compressed_pair_element<AZStd::basic_string<wchar_t,$T1,$T2>::Storage,0,0>&)m_storage).m_element.m_allocatedData.m_data,su - m_size - m_capacity + (size_t)((AZStd::compressed_pair_element<AZStd::basic_string<wchar_t,$T1,$T2>::Storage,0,0>&)m_storage).m_element.m_shortData.m_size + ((AZStd::compressed_pair_element<AZStd::basic_string<wchar_t,$T1,$T2>::Storage,0,0>&)m_storage).m_element.m_allocatedData.m_size + ((AZStd::compressed_pair_element<AZStd::basic_string<wchar_t,$T1,$T2>::Storage,0,0>&)m_storage).m_element.m_shortData.Capacity + ((AZStd::compressed_pair_element<AZStd::basic_string<wchar_t,$T1,$T2>::Storage,0,0>&)m_storage).m_element.m_allocatedData.m_capacity - m_size - m_buffer - m_data + ((AZStd::compressed_pair_element<AZStd::basic_string<wchar_t,$T1,$T2>::Storage,0,0>&)m_storage).m_element.m_shortData.m_size,u + ((AZStd::compressed_pair_element<AZStd::basic_string<wchar_t,$T1,$T2>::Storage,0,0>&)m_storage).m_element.m_allocatedData.m_size + ((AZStd::compressed_pair_element<AZStd::basic_string<wchar_t,$T1,$T2>::Storage,0,0>&)m_storage).m_element.m_shortData.m_buffer + ((AZStd::compressed_pair_element<AZStd::basic_string<wchar_t,$T1,$T2>::Storage,0,0>&)m_storage).m_element.m_allocatedData.m_data diff --git a/Code/Framework/AzCore/Platform/Common/WinAPI/AzCore/Debug/Trace_WinAPI.cpp b/Code/Framework/AzCore/Platform/Common/WinAPI/AzCore/Debug/Trace_WinAPI.cpp index 4535387902..d090971359 100644 --- a/Code/Framework/AzCore/Platform/Common/WinAPI/AzCore/Debug/Trace_WinAPI.cpp +++ b/Code/Framework/AzCore/Platform/Common/WinAPI/AzCore/Debug/Trace_WinAPI.cpp @@ -11,7 +11,6 @@ #include #include #include -#include #include #include @@ -186,8 +185,6 @@ namespace AZ::Debug Debug::Trace::Instance().PrintCallstack(nullptr, 0, ExceptionInfo->ContextRecord); - EBUS_EVENT(Debug::TraceMessageDrillerBus, OnException, message); - bool result = false; EBUS_EVENT_RESULT(result, Debug::TraceMessageBus, OnException, message); if (result) diff --git a/Code/Framework/AzCore/Platform/Common/WinAPI/AzCore/IO/SystemFile_WinAPI.cpp b/Code/Framework/AzCore/Platform/Common/WinAPI/AzCore/IO/SystemFile_WinAPI.cpp index 0fe32dcd4a..d608d67a85 100644 --- a/Code/Framework/AzCore/Platform/Common/WinAPI/AzCore/IO/SystemFile_WinAPI.cpp +++ b/Code/Framework/AzCore/Platform/Common/WinAPI/AzCore/IO/SystemFile_WinAPI.cpp @@ -8,7 +8,6 @@ #include #include -#include #include #include @@ -142,7 +141,6 @@ bool SystemFile::PlatformOpen(int mode, int platformFlags) if (m_handle == INVALID_HANDLE_VALUE) { - EBUS_EVENT(FileIOEventBus, OnError, this, nullptr, (int)GetLastError()); return false; } else @@ -160,10 +158,7 @@ void SystemFile::PlatformClose() { if (m_handle != PlatformSpecificInvalidHandle) { - if (!CloseHandle(m_handle)) - { - EBUS_EVENT(FileIOEventBus, OnError, this, nullptr, (int)GetLastError()); - } + CloseHandle(m_handle); m_handle = INVALID_HANDLE_VALUE; } } @@ -177,7 +172,7 @@ namespace Platform { using FileHandleType = AZ::IO::SystemFile::FileHandleType; - void Seek(FileHandleType handle, const SystemFile* systemFile, SystemFile::SeekSizeType offset, SystemFile::SeekMode mode) + void Seek(FileHandleType handle, [[maybe_unused]] const SystemFile* systemFile, SystemFile::SeekSizeType offset, SystemFile::SeekMode mode) { if (handle != PlatformSpecificInvalidHandle) { @@ -185,14 +180,11 @@ namespace Platform LARGE_INTEGER distToMove; distToMove.QuadPart = offset; - if (!SetFilePointerEx(handle, distToMove, 0, dwMoveMethod)) - { - EBUS_EVENT(FileIOEventBus, OnError, systemFile, nullptr, (int)GetLastError()); - } + SetFilePointerEx(handle, distToMove, 0, dwMoveMethod); } } - SystemFile::SizeType Tell(FileHandleType handle, const SystemFile* systemFile) + SystemFile::SizeType Tell(FileHandleType handle, [[maybe_unused]] const SystemFile* systemFile) { if (handle != PlatformSpecificInvalidHandle) { @@ -202,7 +194,6 @@ namespace Platform LARGE_INTEGER newFilePtr; if (!SetFilePointerEx(handle, distToMove, &newFilePtr, FILE_CURRENT)) { - EBUS_EVENT(FileIOEventBus, OnError, systemFile, nullptr, (int)GetLastError()); return 0; } @@ -212,7 +203,7 @@ namespace Platform return 0; } - bool Eof(FileHandleType handle, const SystemFile* systemFile) + bool Eof(FileHandleType handle, [[maybe_unused]] const SystemFile* systemFile) { if (handle != PlatformSpecificInvalidHandle) { @@ -222,14 +213,12 @@ namespace Platform LARGE_INTEGER currentFilePtr; if (!SetFilePointerEx(handle, zero, ¤tFilePtr, FILE_CURRENT)) { - EBUS_EVENT(FileIOEventBus, OnError, systemFile, nullptr, (int)GetLastError()); return false; } FILE_STANDARD_INFO fileInfo; if (!GetFileInformationByHandleEx(handle, FileStandardInfo, &fileInfo, sizeof(fileInfo))) { - EBUS_EVENT(FileIOEventBus, OnError, systemFile, nullptr, (int)GetLastError()); return false; } @@ -239,14 +228,13 @@ namespace Platform return false; } - AZ::u64 ModificationTime(FileHandleType handle, const SystemFile* systemFile) + AZ::u64 ModificationTime(FileHandleType handle, [[maybe_unused]] const SystemFile* systemFile) { if (handle != PlatformSpecificInvalidHandle) { FILE_BASIC_INFO fileInfo; if (!GetFileInformationByHandleEx(handle, FileBasicInfo, &fileInfo, sizeof(fileInfo))) { - EBUS_EVENT(FileIOEventBus, OnError, systemFile, nullptr, (int)GetLastError()); return 0; } @@ -263,7 +251,7 @@ namespace Platform return 0; } - SystemFile::SizeType Read(FileHandleType handle, const SystemFile* systemFile, SizeType byteSize, void* buffer) + SystemFile::SizeType Read(FileHandleType handle, [[maybe_unused]] const SystemFile* systemFile, SizeType byteSize, void* buffer) { if (handle != PlatformSpecificInvalidHandle) { @@ -271,7 +259,6 @@ namespace Platform DWORD nNumberOfBytesToRead = (DWORD)byteSize; if (!ReadFile(handle, buffer, nNumberOfBytesToRead, &dwNumBytesRead, 0)) { - EBUS_EVENT(FileIOEventBus, OnError, systemFile, nullptr, (int)GetLastError()); return 0; } return static_cast(dwNumBytesRead); @@ -280,7 +267,7 @@ namespace Platform return 0; } - SystemFile::SizeType Write(FileHandleType handle, const SystemFile* systemFile, const void* buffer, SizeType byteSize) + SystemFile::SizeType Write(FileHandleType handle, [[maybe_unused]] const SystemFile* systemFile, const void* buffer, SizeType byteSize) { if (handle != PlatformSpecificInvalidHandle) { @@ -288,7 +275,6 @@ namespace Platform DWORD nNumberOfBytesToWrite = (DWORD)byteSize; if (!WriteFile(handle, buffer, nNumberOfBytesToWrite, &dwNumBytesWritten, 0)) { - EBUS_EVENT(FileIOEventBus, OnError, systemFile, nullptr, (int)GetLastError()); return 0; } return static_cast(dwNumBytesWritten); @@ -297,25 +283,21 @@ namespace Platform return 0; } - void Flush(FileHandleType handle, const SystemFile* systemFile) + void Flush(FileHandleType handle, [[maybe_unused]] const SystemFile* systemFile) { if (handle != PlatformSpecificInvalidHandle) { - if (!FlushFileBuffers(handle)) - { - EBUS_EVENT(FileIOEventBus, OnError, systemFile, nullptr, (int)GetLastError()); - } + FlushFileBuffers(handle); } } - SystemFile::SizeType Length(FileHandleType handle, const SystemFile* systemFile) + SystemFile::SizeType Length(FileHandleType handle, [[maybe_unused]] const SystemFile* systemFile) { if (handle != PlatformSpecificInvalidHandle) { LARGE_INTEGER size; if (!GetFileSizeEx(handle, &size)) { - EBUS_EVENT(FileIOEventBus, OnError, systemFile, nullptr, (int)GetLastError()); return 0; } @@ -341,7 +323,6 @@ namespace Platform { WIN32_FIND_DATA fd; HANDLE hFile; - int lastError; AZ::IO::FixedMaxPathWString filterW; AZStd::to_wstring(filterW, filter); @@ -367,20 +348,7 @@ namespace Platform cb(fileName, (fd.dwFileAttributes & FILE_ATTRIBUTE_DIRECTORY) == 0); } - lastError = (int)GetLastError(); FindClose(hFile); - if (lastError != ERROR_NO_MORE_FILES) - { - EBUS_EVENT(FileIOEventBus, OnError, nullptr, fileName, lastError); - } - } - else - { - lastError = (int)GetLastError(); - if (lastError != ERROR_FILE_NOT_FOUND) - { - EBUS_EVENT(FileIOEventBus, OnError, nullptr, filter, lastError); - } } } @@ -394,15 +362,11 @@ namespace Platform if (handle == INVALID_HANDLE_VALUE) { - EBUS_EVENT(FileIOEventBus, OnError, nullptr, fileName, (int)GetLastError()); return 0; } FILE_BASIC_INFO fileInfo{}; - if (!GetFileInformationByHandleEx(handle, FileBasicInfo, &fileInfo, sizeof(fileInfo))) - { - EBUS_EVENT(FileIOEventBus, OnError, nullptr, fileName, (int)GetLastError()); - } + GetFileInformationByHandleEx(handle, FileBasicInfo, &fileInfo, sizeof(fileInfo)); CloseHandle(handle); @@ -434,10 +398,6 @@ namespace Platform fileSize.HighPart = data.nFileSizeHigh; len = aznumeric_cast(fileSize.QuadPart); } - else - { - EBUS_EVENT(FileIOEventBus, OnError, nullptr, fileName, (int)GetLastError()); - } return len; } @@ -448,7 +408,6 @@ namespace Platform AZStd::to_wstring(fileNameW, fileName); if (DeleteFileW(fileNameW.c_str()) == 0) { - EBUS_EVENT(FileIOEventBus, OnError, nullptr, fileName, (int)GetLastError()); return false; } @@ -463,7 +422,6 @@ namespace Platform AZStd::to_wstring(targetFileNameW, targetFileName); if (MoveFileExW(sourceFileNameW.c_str(), targetFileNameW.c_str(), overwrite ? MOVEFILE_REPLACE_EXISTING : 0) == 0) { - EBUS_EVENT(FileIOEventBus, OnError, nullptr, sourceFileName, (int)GetLastError()); return false; } @@ -503,10 +461,6 @@ namespace Platform AZ::IO::FixedMaxPathWString dirNameW; AZStd::to_wstring(dirNameW, dirName); bool success = CreateDirRecursive(dirNameW); - if (!success) - { - EBUS_EVENT(FileIOEventBus, OnError, nullptr, dirName, (int)GetLastError()); - } return success; } return false; diff --git a/Code/Framework/AzCore/Platform/Common/WinAPI/AzCore/std/parallel/internal/thread_WinAPI.cpp b/Code/Framework/AzCore/Platform/Common/WinAPI/AzCore/std/parallel/internal/thread_WinAPI.cpp index c84b4ecd98..cd638a34fa 100644 --- a/Code/Framework/AzCore/Platform/Common/WinAPI/AzCore/std/parallel/internal/thread_WinAPI.cpp +++ b/Code/Framework/AzCore/Platform/Common/WinAPI/AzCore/std/parallel/internal/thread_WinAPI.cpp @@ -38,7 +38,6 @@ namespace AZStd destroy_thread_info(ti); ThreadEventBus::Broadcast(&ThreadEventBus::Events::OnThreadExit, this_thread::get_id()); // goes to client listeners - ThreadDrillerEventBus::Broadcast(&ThreadDrillerEventBus::Events::OnThreadExit, this_thread::get_id()); // goes to the profiler. return Platform::PostThreadRun(); } @@ -73,7 +72,6 @@ namespace AZStd } ThreadEventBus::Broadcast(&ThreadEventBus::Events::OnThreadEnter, thread::id(*id), desc); - ThreadDrillerEventBus::Broadcast(&ThreadDrillerEventBus::Events::OnThreadEnter, thread::id(*id), desc); ::ResumeThread(hThread); diff --git a/Code/Framework/AzCore/Platform/Linux/AzCore/AzCore_Traits_Linux.h b/Code/Framework/AzCore/Platform/Linux/AzCore/AzCore_Traits_Linux.h index 6ba369e86d..59d5f3c5ed 100644 --- a/Code/Framework/AzCore/Platform/Linux/AzCore/AzCore_Traits_Linux.h +++ b/Code/Framework/AzCore/Platform/Linux/AzCore/AzCore_Traits_Linux.h @@ -53,10 +53,8 @@ // Compiler traits ... #define AZ_TRAIT_COMPILER_DEFINE_AZSWNPRINTF_AS_SWPRINTF 1 #define AZ_TRAIT_COMPILER_DEFINE_FS_ERRNO_TYPE 1 -#define AZ_TRAIT_COMPILER_DEFINE_FS_STAT_TYPE 0 #define AZ_TRAIT_COMPILER_DEFINE_GETCURRENTPROCESSID 1 #define AZ_TRAIT_COMPILER_DEFINE_REFGUID 1 -#define AZ_TRAIT_COMPILER_DEFINE_SASSERTDATA_TYPE 1 #define AZ_TRAIT_COMPILER_DEFINE_WCSICMP 0 #define AZ_TRAIT_COMPILER_INT64_T_IS_LONG 1 #define AZ_TRAIT_COMPILER_OPTIMIZE_MISSING_DEFAULT_SWITCH_CASE 1 @@ -75,7 +73,6 @@ #define AZ_TRAIT_HEAPSCHEMA_COMPILE_MALLINFO 1 #define AZ_TRAIT_IS_ABS_PATH_IF_COLON_FOUND_ANYWHERE 0 #define AZ_TRAIT_JSON_CLANG_IGNORE_UNKNOWN_WARNING 0 -#define AZ_TRAIT_MAX_JOB_MANAGER_WORKER_THREADS 0 #define AZ_TRAIT_PERF_MEMORYBENCHMARK_IS_AVAILABLE 0 #define AZ_TRAIT_PUMP_SYSTEM_EVENTS_WHILE_LOADING 0 #define AZ_TRAIT_PUMP_SYSTEM_EVENTS_WHILE_LOADING_INTERVAL_MS 0 diff --git a/Code/Framework/AzCore/Platform/Linux/AzCore/Debug/Trace_Linux.cpp b/Code/Framework/AzCore/Platform/Linux/AzCore/Debug/Trace_Linux.cpp index 1ca06fcf7f..e4cd0d0db4 100644 --- a/Code/Framework/AzCore/Platform/Linux/AzCore/Debug/Trace_Linux.cpp +++ b/Code/Framework/AzCore/Platform/Linux/AzCore/Debug/Trace_Linux.cpp @@ -9,16 +9,10 @@ #include #include -namespace AZ +namespace AZ::Debug::Platform { - namespace Debug + void OutputToDebugger([[maybe_unused]] const char* title, [[maybe_unused]] const char* message) { - namespace Platform - { - void OutputToDebugger([[maybe_unused]] const char* title, [[maybe_unused]] const char* message) - { - // std::cout << title << ": " << message; - } - } + // std::cout << title << ": " << message; } -} +} // namespace AZ::Debug::Platform diff --git a/Code/Framework/AzCore/Platform/Linux/AzCore/IO/SystemFile_Linux.cpp b/Code/Framework/AzCore/Platform/Linux/AzCore/IO/SystemFile_Linux.cpp index be5cbc3859..deb2d49516 100644 --- a/Code/Framework/AzCore/Platform/Linux/AzCore/IO/SystemFile_Linux.cpp +++ b/Code/Framework/AzCore/Platform/Linux/AzCore/IO/SystemFile_Linux.cpp @@ -7,9 +7,9 @@ */ #include -#include #include #include +#include #include #include <../Common/UnixLike/AzCore/IO/Internal/SystemFileUtils_UnixLike.h> @@ -44,21 +44,7 @@ namespace AZ::IO::Platform entry = readdir(dir); } - int lastError = errno; - if (lastError != 0) - { - EBUS_EVENT(FileIOEventBus, OnError, nullptr, filter, lastError); - } - closedir(dir); } - else - { - int lastError = errno; - if (lastError != ENOENT) - { - EBUS_EVENT(FileIOEventBus, OnError, nullptr, filter, 0); - } - } } } diff --git a/Code/Framework/AzCore/Platform/Linux/AzCore/Memory/HeapSchema_Linux.cpp b/Code/Framework/AzCore/Platform/Linux/AzCore/Memory/HeapSchema_Linux.cpp index e28832cf61..d9defd5acc 100644 --- a/Code/Framework/AzCore/Platform/Linux/AzCore/Memory/HeapSchema_Linux.cpp +++ b/Code/Framework/AzCore/Platform/Linux/AzCore/Memory/HeapSchema_Linux.cpp @@ -8,13 +8,10 @@ #include -namespace AZ +namespace AZ::Platform { - namespace Platform + size_t GetHeapCapacity() { - size_t GetHeapCapacity() - { - return 0; - } + return 0; } -} +} // namespace AZ::Platform diff --git a/Code/Framework/AzCore/Platform/Linux/AzCore/Module/DynamicModuleHandle_Linux.cpp b/Code/Framework/AzCore/Platform/Linux/AzCore/Module/DynamicModuleHandle_Linux.cpp index 62718c2d46..aee2bdb622 100644 --- a/Code/Framework/AzCore/Platform/Linux/AzCore/Module/DynamicModuleHandle_Linux.cpp +++ b/Code/Framework/AzCore/Platform/Linux/AzCore/Module/DynamicModuleHandle_Linux.cpp @@ -10,28 +10,25 @@ #include #include -namespace AZ +namespace AZ::Platform { - namespace Platform + AZ::IO::FixedMaxPath GetModulePath() { - AZ::IO::FixedMaxPath GetModulePath() - { - return AZ::Utils::GetExecutableDirectory(); - } - - void* OpenModule(const AZ::OSString& fileName, bool& alreadyOpen) - { - void* handle = dlopen(fileName.c_str(), RTLD_NOLOAD); - alreadyOpen = (handle != nullptr); - if (!alreadyOpen) - { - handle = dlopen(fileName.c_str(), RTLD_NOW); - } - return handle; - } - - void ConstructModuleFullFileName(AZ::IO::FixedMaxPath&) - { - } + return AZ::Utils::GetExecutableDirectory(); } -} + + void* OpenModule(const AZ::OSString& fileName, bool& alreadyOpen) + { + void* handle = dlopen(fileName.c_str(), RTLD_NOLOAD); + alreadyOpen = (handle != nullptr); + if (!alreadyOpen) + { + handle = dlopen(fileName.c_str(), RTLD_NOW); + } + return handle; + } + + void ConstructModuleFullFileName(AZ::IO::FixedMaxPath&) + { + } +} // namespace AZ::Platform diff --git a/Code/Framework/AzCore/Platform/Linux/AzCore/Module/Internal/ModuleManagerSearchPathTool_Linux.cpp b/Code/Framework/AzCore/Platform/Linux/AzCore/Module/Internal/ModuleManagerSearchPathTool_Linux.cpp index 39b4cbd4ea..9dfa08e554 100644 --- a/Code/Framework/AzCore/Platform/Linux/AzCore/Module/Internal/ModuleManagerSearchPathTool_Linux.cpp +++ b/Code/Framework/AzCore/Platform/Linux/AzCore/Module/Internal/ModuleManagerSearchPathTool_Linux.cpp @@ -8,20 +8,17 @@ #include -namespace AZ +namespace AZ::Internal { - namespace Internal + ModuleManagerSearchPathTool::ModuleManagerSearchPathTool() { - ModuleManagerSearchPathTool::ModuleManagerSearchPathTool() - { - } + } - ModuleManagerSearchPathTool::~ModuleManagerSearchPathTool() - { - } + ModuleManagerSearchPathTool::~ModuleManagerSearchPathTool() + { + } - void ModuleManagerSearchPathTool::SetModuleSearchPath(const AZ::DynamicModuleDescriptor&) - { - } - } // namespace Internal -} // namespace AZ + void ModuleManagerSearchPathTool::SetModuleSearchPath(const AZ::DynamicModuleDescriptor&) + { + } +} // namespace AZ::Internal diff --git a/Code/Framework/AzCore/Platform/Linux/AzCore/Utils/Utils_Linux.cpp b/Code/Framework/AzCore/Platform/Linux/AzCore/Utils/Utils_Linux.cpp index d75eab0139..ed4e2674c5 100644 --- a/Code/Framework/AzCore/Platform/Linux/AzCore/Utils/Utils_Linux.cpp +++ b/Code/Framework/AzCore/Platform/Linux/AzCore/Utils/Utils_Linux.cpp @@ -13,42 +13,39 @@ #include -namespace AZ +namespace AZ::Utils { - namespace Utils + GetExecutablePathReturnType GetExecutablePath(char* exeStorageBuffer, size_t exeStorageSize) { - GetExecutablePathReturnType GetExecutablePath(char* exeStorageBuffer, size_t exeStorageSize) + GetExecutablePathReturnType result; + result.m_pathIncludesFilename = true; + + // http://man7.org/linux/man-pages/man5/proc.5.html + const ssize_t bytesWritten = readlink("/proc/self/exe", exeStorageBuffer, exeStorageSize); + if (bytesWritten == -1) { - GetExecutablePathReturnType result; - result.m_pathIncludesFilename = true; - - // http://man7.org/linux/man-pages/man5/proc.5.html - const ssize_t bytesWritten = readlink("/proc/self/exe", exeStorageBuffer, exeStorageSize); - if (bytesWritten == -1) - { - result.m_pathStored = ExecutablePathResult::GeneralError; - } - else if (bytesWritten == exeStorageSize) - { - result.m_pathStored = ExecutablePathResult::BufferSizeNotLargeEnough; - } - else - { - // readlink doesn't null terminate - exeStorageBuffer[bytesWritten] = '\0'; - } - - return result; + result.m_pathStored = ExecutablePathResult::GeneralError; + } + else if (bytesWritten == exeStorageSize) + { + result.m_pathStored = ExecutablePathResult::BufferSizeNotLargeEnough; + } + else + { + // readlink doesn't null terminate + exeStorageBuffer[bytesWritten] = '\0'; } - AZStd::optional GetDefaultAppRootPath() - { - return AZStd::nullopt; - } - - AZStd::optional GetDevWriteStoragePath() - { - return AZStd::nullopt; - } + return result; } -} + + AZStd::optional GetDefaultAppRootPath() + { + return AZStd::nullopt; + } + + AZStd::optional GetDevWriteStoragePath() + { + return AZStd::nullopt; + } +} // namespace AZ::Utils diff --git a/Code/Framework/AzCore/Platform/Mac/AzCore/AzCore_Traits_Mac.h b/Code/Framework/AzCore/Platform/Mac/AzCore/AzCore_Traits_Mac.h index a41b5c6baa..1a3d0663e1 100644 --- a/Code/Framework/AzCore/Platform/Mac/AzCore/AzCore_Traits_Mac.h +++ b/Code/Framework/AzCore/Platform/Mac/AzCore/AzCore_Traits_Mac.h @@ -53,10 +53,8 @@ // Compiler traits ... #define AZ_TRAIT_COMPILER_DEFINE_AZSWNPRINTF_AS_SWPRINTF 1 #define AZ_TRAIT_COMPILER_DEFINE_FS_ERRNO_TYPE 1 -#define AZ_TRAIT_COMPILER_DEFINE_FS_STAT_TYPE 1 #define AZ_TRAIT_COMPILER_DEFINE_GETCURRENTPROCESSID 1 #define AZ_TRAIT_COMPILER_DEFINE_REFGUID 1 -#define AZ_TRAIT_COMPILER_DEFINE_SASSERTDATA_TYPE 1 #define AZ_TRAIT_COMPILER_DEFINE_WCSICMP 0 #define AZ_TRAIT_COMPILER_INT64_T_IS_LONG 0 #define AZ_TRAIT_COMPILER_OPTIMIZE_MISSING_DEFAULT_SWITCH_CASE 1 @@ -75,7 +73,6 @@ #define AZ_TRAIT_HEAPSCHEMA_COMPILE_MALLINFO 1 #define AZ_TRAIT_IS_ABS_PATH_IF_COLON_FOUND_ANYWHERE 0 #define AZ_TRAIT_JSON_CLANG_IGNORE_UNKNOWN_WARNING 0 -#define AZ_TRAIT_MAX_JOB_MANAGER_WORKER_THREADS 0 #define AZ_TRAIT_PERF_MEMORYBENCHMARK_IS_AVAILABLE 0 #define AZ_TRAIT_PUMP_SYSTEM_EVENTS_WHILE_LOADING 0 #define AZ_TRAIT_PUMP_SYSTEM_EVENTS_WHILE_LOADING_INTERVAL_MS 0 diff --git a/Code/Framework/AzCore/Platform/Windows/AzCore/AzCore_Traits_Windows.h b/Code/Framework/AzCore/Platform/Windows/AzCore/AzCore_Traits_Windows.h index 2f9fcefdbd..1a83aba267 100644 --- a/Code/Framework/AzCore/Platform/Windows/AzCore/AzCore_Traits_Windows.h +++ b/Code/Framework/AzCore/Platform/Windows/AzCore/AzCore_Traits_Windows.h @@ -53,10 +53,8 @@ // Compiler traits ... #define AZ_TRAIT_COMPILER_DEFINE_AZSWNPRINTF_AS_SWPRINTF 0 #define AZ_TRAIT_COMPILER_DEFINE_FS_ERRNO_TYPE 0 -#define AZ_TRAIT_COMPILER_DEFINE_FS_STAT_TYPE 0 #define AZ_TRAIT_COMPILER_DEFINE_GETCURRENTPROCESSID 0 #define AZ_TRAIT_COMPILER_DEFINE_REFGUID 0 -#define AZ_TRAIT_COMPILER_DEFINE_SASSERTDATA_TYPE 0 #define AZ_TRAIT_COMPILER_DEFINE_WCSICMP 0 #define AZ_TRAIT_COMPILER_INT64_T_IS_LONG 0 #define AZ_TRAIT_COMPILER_OPTIMIZE_MISSING_DEFAULT_SWITCH_CASE 1 @@ -75,7 +73,6 @@ #define AZ_TRAIT_HEAPSCHEMA_COMPILE_MALLINFO 1 #define AZ_TRAIT_IS_ABS_PATH_IF_COLON_FOUND_ANYWHERE 0 #define AZ_TRAIT_JSON_CLANG_IGNORE_UNKNOWN_WARNING 1 -#define AZ_TRAIT_MAX_JOB_MANAGER_WORKER_THREADS 0 #define AZ_TRAIT_PERF_MEMORYBENCHMARK_IS_AVAILABLE 1 #define AZ_TRAIT_PUMP_SYSTEM_EVENTS_WHILE_LOADING 0 #define AZ_TRAIT_PUMP_SYSTEM_EVENTS_WHILE_LOADING_INTERVAL_MS 0 diff --git a/Code/Framework/AzCore/Platform/Windows/AzCore/IO/Streamer/StorageDrive_Windows.cpp b/Code/Framework/AzCore/Platform/Windows/AzCore/IO/Streamer/StorageDrive_Windows.cpp index 2462af861b..feb8bce111 100644 --- a/Code/Framework/AzCore/Platform/Windows/AzCore/IO/Streamer/StorageDrive_Windows.cpp +++ b/Code/Framework/AzCore/Platform/Windows/AzCore/IO/Streamer/StorageDrive_Windows.cpp @@ -73,7 +73,7 @@ namespace AZ::IO , m_constructionOptions(options) { AZ_Assert(!drivePaths.empty(), "StorageDrive_win requires at least one drive path to work."); - + // Get drive paths m_drivePaths.reserve(drivePaths.size()); for (AZStd::string_view drivePath : drivePaths) @@ -583,7 +583,7 @@ namespace AZ::IO // If any are unaligned to the sector sizes, make adjustments and allocate an aligned buffer. const bool alignedAddr = IStreamerTypes::IsAlignedTo(data->m_output, aznumeric_caster(m_physicalSectorSize)); const bool alignedOffs = IStreamerTypes::IsAlignedTo(data->m_offset, aznumeric_caster(m_logicalSectorSize)); - + // Adjust the offset if it's misaligned. // Align the offset down to next lowest sector. // Change the size to compensate. @@ -656,7 +656,7 @@ namespace AZ::IO Statistic::PlotImmediate(m_name, DirectReadsName, m_directReadsPercentageStat.GetMostRecentSample()); #endif // AZ_STREAMER_ADD_EXTRA_PROFILING_INFO } - + FileReadStatus& readStatus = m_readSlots_statusInfo[readSlot]; LPOVERLAPPED overlapped = &readStatus.m_overlapped; overlapped->Offset = aznumeric_caster(readOffs); @@ -716,7 +716,7 @@ namespace AZ::IO Statistic::PlotImmediate(m_name, FileSwitchesName, m_fileSwitchPercentageStat.GetMostRecentSample()); Statistic::PlotImmediate(m_name, SeeksName, m_seekPercentageStat.GetMostRecentSample()); #endif // AZ_STREAMER_ADD_EXTRA_PROFILING_INFO - + m_fileCache_activeReads[fileCacheSlot]++; m_activeCacheSlot = fileCacheSlot; m_activeOffset = readOffs + readSize; @@ -1007,7 +1007,7 @@ namespace AZ::IO auto readCommand = AZStd::get_if(&fileReadInfo.m_request->GetCommand()); AZ_Assert(readCommand != nullptr, "Request stored with the overlapped I/O call did not contain a read request."); - + if (fileReadInfo.m_sectorAlignedOutput && !encounteredError) { auto offsetAddress = reinterpret_cast(fileReadInfo.m_sectorAlignedOutput) + fileReadInfo.m_copyBackOffset; diff --git a/Code/Framework/AzCore/Platform/Windows/AzCore/IO/Streamer/StorageDrive_Windows.h b/Code/Framework/AzCore/Platform/Windows/AzCore/IO/Streamer/StorageDrive_Windows.h index 86f8c6db16..c70eb7804d 100644 --- a/Code/Framework/AzCore/Platform/Windows/AzCore/IO/Streamer/StorageDrive_Windows.h +++ b/Code/Framework/AzCore/Platform/Windows/AzCore/IO/Streamer/StorageDrive_Windows.h @@ -40,7 +40,7 @@ namespace AZ::IO //! make adjustments. For the most optimal performance align read buffers to the physicalSectorSize. u8 m_enableUnbufferedReads : 1; //! Globally enable file sharing. This allows files to used outside AZ::IO::Streamer, including other applications - //! while in use by AZ::IO::Streamer. + //! while in use by AZ::IO::Streamer. u8 m_enableSharing : 1; //! If true, only information that's explicitly requested or issues are reported. If false, status information //! such as when drives are created and destroyed is reported as well. @@ -99,7 +99,7 @@ namespace AZ::IO FileRequest* m_request{ nullptr }; void* m_sectorAlignedOutput{ nullptr }; // Internally allocated buffer that is sector aligned. size_t m_copyBackOffset{ 0 }; - + void AllocateAlignedBuffer(size_t size, size_t sectorSize); void Clear(); }; diff --git a/Code/Framework/AzCore/Platform/iOS/AzCore/AzCore_Traits_iOS.h b/Code/Framework/AzCore/Platform/iOS/AzCore/AzCore_Traits_iOS.h index d53f4b057e..7a75af71fb 100644 --- a/Code/Framework/AzCore/Platform/iOS/AzCore/AzCore_Traits_iOS.h +++ b/Code/Framework/AzCore/Platform/iOS/AzCore/AzCore_Traits_iOS.h @@ -53,10 +53,8 @@ // Compiler traits ... #define AZ_TRAIT_COMPILER_DEFINE_AZSWNPRINTF_AS_SWPRINTF 1 #define AZ_TRAIT_COMPILER_DEFINE_FS_ERRNO_TYPE 1 -#define AZ_TRAIT_COMPILER_DEFINE_FS_STAT_TYPE 1 #define AZ_TRAIT_COMPILER_DEFINE_GETCURRENTPROCESSID 1 #define AZ_TRAIT_COMPILER_DEFINE_REFGUID 1 -#define AZ_TRAIT_COMPILER_DEFINE_SASSERTDATA_TYPE 1 #define AZ_TRAIT_COMPILER_DEFINE_WCSICMP 0 #define AZ_TRAIT_COMPILER_INT64_T_IS_LONG 0 #define AZ_TRAIT_COMPILER_OPTIMIZE_MISSING_DEFAULT_SWITCH_CASE 1 @@ -76,7 +74,6 @@ #define AZ_TRAIT_HEAPSCHEMA_COMPILE_MALLINFO 1 #define AZ_TRAIT_IS_ABS_PATH_IF_COLON_FOUND_ANYWHERE 0 #define AZ_TRAIT_JSON_CLANG_IGNORE_UNKNOWN_WARNING 0 -#define AZ_TRAIT_MAX_JOB_MANAGER_WORKER_THREADS 0 #define AZ_TRAIT_PERF_MEMORYBENCHMARK_IS_AVAILABLE 0 #define AZ_TRAIT_PUMP_SYSTEM_EVENTS_WHILE_LOADING 0 #define AZ_TRAIT_PUMP_SYSTEM_EVENTS_WHILE_LOADING_INTERVAL_MS 0 diff --git a/Code/Framework/AzCore/Tests/AZStd/Parallel.cpp b/Code/Framework/AzCore/Tests/AZStd/Parallel.cpp index 6b9202133c..362560c7be 100644 --- a/Code/Framework/AzCore/Tests/AZStd/Parallel.cpp +++ b/Code/Framework/AzCore/Tests/AZStd/Parallel.cpp @@ -1392,7 +1392,7 @@ namespace UnitTest EXPECT_TRUE(done); } - // Fixture for thread-driller-bus related calls + // Fixture for thread-event-bus related calls // exists only to categorize the tests. class ThreadEventsBus : public AllocatorsFixture @@ -1438,44 +1438,33 @@ namespace UnitTest TEST_F(ThreadEventsBus, Broadcasts_BothBusses) { ThreadEventCounter eventBusCounter; - ThreadEventCounter drillerBusCounter; auto thread_function = [&]() { ; // intentionally left blank }; eventBusCounter.Connect(); - drillerBusCounter.Connect(); AZStd::thread starter = AZStd::thread(thread_function); starter.join(); - EXPECT_EQ(drillerBusCounter.m_enterCount, 1); - EXPECT_EQ(drillerBusCounter.m_exitCount, 1); EXPECT_EQ(eventBusCounter.m_enterCount, 1); EXPECT_EQ(eventBusCounter.m_exitCount, 1); eventBusCounter.Disconnect(); - drillerBusCounter.Disconnect(); } - // this class tests for deadlocks caused by interactions between the thread - // driller bus and the other driller busses. - // Client code (ie, not part of the driller system) can connec to the - // ThreadEventBus and be told when threads are started and stopped - // However, if they instead listen to the ThreadDrillerEventBus, a deadlock condition - // could be caused if they lock a mutex that another thread needs in order to proceed. - // This test makes sure that using the ThreadEventBus (ie, the one meant for client code) - // instead of the ThreadDrillerEventBus (the one meant only for profilers) does NOT cause - // a deadlock. + // This class tests for deadlocks caused by multiple threads interacting with the ThreadEventBus. + // Client code can connect to the ThreadEventBus and be told when threads are started and stopped. + // A deadlock condition could be caused if they lock a mutex that another thread needs in order to proceed. + // This test makes sure that using the ThreadEventBus does NOT cause a deadlock. // We will simulate this series of events by doing the following // 1. Main thread listens on the ThreadEventBus // 2. OnThreadExit will lock a mutex, perform an allocation, unlock a mutex // 3. The thread itself will lock the mutex, perform an allocation, unlock the mutex. - // As long as there is no cross talk between the client and the driller busses, the - // above operation should not deadlock. - // but if there is, then a deadlock can occur where one thread will be unable to perform - // its allocation because the other is in OnThreadExit() - // and the other will not be able to perform OnThreadExit() because it cannot lock the mutex. + // As long as there is no cross talk between threads, the above operation should not deadlock. + // If there is, then a deadlock can occur where one thread will be unable to perform + // its allocation because the other is in OnThreadExit() and the other will not be able to perform + // OnThreadExit() because it cannot lock the mutex. class ThreadEventsDeathTest : public AllocatorsFixture diff --git a/Code/Framework/AzCore/Tests/AZStd/String.cpp b/Code/Framework/AzCore/Tests/AZStd/String.cpp index 68bdd311d5..0f84ad0970 100644 --- a/Code/Framework/AzCore/Tests/AZStd/String.cpp +++ b/Code/Framework/AzCore/Tests/AZStd/String.cpp @@ -8,11 +8,11 @@ #include "UserTypes.h" #include -#include #include #include #include #include +#include #include #include #include @@ -21,13 +21,10 @@ #include // we need this for AZ_TEST_FLOAT compare -#include #include #include #include -using namespace AZStd; - // Because of the SSO (small string optimization) we always shoule have capacity != 0 and data != 0 #define AZ_TEST_VALIDATE_EMPTY_STRING(_String) \ EXPECT_TRUE(_String.validate()); \ @@ -81,8 +78,6 @@ namespace UnitTest va_end(mark); } -#if !AZ_UNIT_TEST_SKIP_STD_STRING_TESTS - TEST(StringC, VSNPrintf) { char buffer32[32]; @@ -168,75 +163,75 @@ namespace UnitTest { const char* sChar = "SSO string"; // 10 characters const char* sCharLong = "This is a long string test that will allocate"; // 45 characters - array aChar = { + AZStd::array aChar = { { 'a', 'b', 'c', 'd', 'e', 'f' } }; // short string (should use SSO) - string str1; + AZStd::string str1; AZ_TEST_VALIDATE_EMPTY_STRING(str1); // short char* - string str2(sChar); + AZStd::string str2(sChar); AZ_TEST_VALIDATE_STRING(str2, 10); - string str2_1(""); + AZStd::string str2_1(""); AZ_TEST_VALIDATE_EMPTY_STRING(str2_1); - string str3(sChar, 5); + AZStd::string str3(sChar, 5); AZ_TEST_VALIDATE_STRING(str3, 5); // long char* - string str4(sCharLong); + AZStd::string str4(sCharLong); AZ_TEST_VALIDATE_STRING(str4, 45); - string str5(sCharLong, 35); + AZStd::string str5(sCharLong, 35); AZ_TEST_VALIDATE_STRING(str5, 35); // element - string str6(13, 'a'); + AZStd::string str6(13, 'a'); AZ_TEST_VALIDATE_STRING(str6, 13); - string str6_1(0, 'a'); + AZStd::string str6_1(0, 'a'); AZ_TEST_VALIDATE_EMPTY_STRING(str6_1); - string str7(aChar.begin(), aChar.end()); + AZStd::string str7(aChar.begin(), aChar.end()); AZ_TEST_VALIDATE_STRING(str7, 6); - string str7_1(aChar.begin(), aChar.begin()); + AZStd::string str7_1(aChar.begin(), aChar.begin()); AZ_TEST_VALIDATE_EMPTY_STRING(str7_1); - string str8(sChar, sChar + 3); + AZStd::string str8(sChar, sChar + 3); AZ_TEST_VALIDATE_STRING(str8, 3); - string str8_1(sChar, sChar); + AZStd::string str8_1(sChar, sChar); AZ_TEST_VALIDATE_EMPTY_STRING(str8_1); // - string str9(str2); + AZStd::string str9(str2); AZ_TEST_VALIDATE_STRING(str9, 10); - string str9_1(str1); + AZStd::string str9_1(str1); AZ_TEST_VALIDATE_EMPTY_STRING(str9_1); - string str10(str2, 4); + AZStd::string str10(str2, 4); AZ_TEST_VALIDATE_STRING(str10, 6); - string str11(str2, 4, 3); + AZStd::string str11(str2, 4, 3); AZ_TEST_VALIDATE_STRING(str11, 3); - string str12(sChar); - string large = sCharLong; + AZStd::string str12(sChar); + AZStd::string large = sCharLong; // move ctor - string strSm = AZStd::move(str12); + AZStd::string strSm = AZStd::move(str12); AZ_TEST_VALIDATE_STRING(strSm, 10); AZ_TEST_VALIDATE_EMPTY_STRING(str12); - string strLg(AZStd::move(large)); + AZStd::string strLg(AZStd::move(large)); AZ_TEST_VALIDATE_STRING(strLg, 45); AZ_TEST_VALIDATE_EMPTY_STRING(large); - string strEmpty(AZStd::move(str1)); + AZStd::string strEmpty(AZStd::move(str1)); AZ_TEST_VALIDATE_EMPTY_STRING(strEmpty); AZ_TEST_VALIDATE_EMPTY_STRING(str1); @@ -369,7 +364,7 @@ namespace UnitTest AZ_TEST_VALIDATE_STRING(str2, 28); AZ_TEST_ASSERT(str2[0] == 'b'); - str2.erase(str2.begin(), next(str2.begin(), 4)); + str2.erase(str2.begin(), AZStd::next(str2.begin(), 4)); AZ_TEST_VALIDATE_STRING(str2, 24); AZ_TEST_ASSERT(str2[0] == 'f'); @@ -400,33 +395,33 @@ namespace UnitTest AZ_TEST_ASSERT(str2[3] == 'g'); AZ_TEST_ASSERT(str2[4] == 'g'); - str2.replace(str2.begin(), next(str2.begin(), str1.length()), str1); + str2.replace(str2.begin(), AZStd::next(str2.begin(), str1.length()), str1); AZ_TEST_VALIDATE_STRING(str2, 24); AZ_TEST_ASSERT(str2[0] == 'a'); AZ_TEST_ASSERT(str2[1] == 'b'); - str2.replace(str2.begin(), next(str2.begin(), 10), sChar); + str2.replace(str2.begin(), AZStd::next(str2.begin(), 10), sChar); AZ_TEST_VALIDATE_STRING(str2, 24); AZ_TEST_ASSERT(str2[0] == 'S'); AZ_TEST_ASSERT(str2[1] == 'S'); - str2.replace(str2.begin(), next(str2.begin(), 3), sChar, 3); + str2.replace(str2.begin(), AZStd::next(str2.begin(), 3), sChar, 3); AZ_TEST_VALIDATE_STRING(str2, 24); AZ_TEST_ASSERT(str2[0] == 'S'); AZ_TEST_ASSERT(str2[1] == 'S'); AZ_TEST_ASSERT(str2[2] == 'O'); - str2.replace(str2.begin(), next(str2.begin(), 2), 2, 'h'); + str2.replace(str2.begin(), AZStd::next(str2.begin(), 2), 2, 'h'); AZ_TEST_VALIDATE_STRING(str2, 24); AZ_TEST_ASSERT(str2[0] == 'h'); AZ_TEST_ASSERT(str2[1] == 'h'); - str2.replace(str2.begin(), next(str2.begin(), 2), aChar.begin(), next(aChar.begin(), 2)); + str2.replace(str2.begin(), AZStd::next(str2.begin(), 2), aChar.begin(), AZStd::next(aChar.begin(), 2)); AZ_TEST_VALIDATE_STRING(str2, 24); AZ_TEST_ASSERT(str2[0] == 'a'); AZ_TEST_ASSERT(str2[1] == 'b'); - str2.replace(str2.begin(), next(str2.begin(), 2), sChar, sChar + 5); + str2.replace(str2.begin(), AZStd::next(str2.begin(), 2), sChar, sChar + 5); AZ_TEST_VALIDATE_STRING(str2, 27); AZ_TEST_ASSERT(str2[0] == 'S'); AZ_TEST_ASSERT(str2[1] == 'S'); @@ -489,7 +484,7 @@ namespace UnitTest AZ_TEST_ASSERT(pos == 2); pos = str1.find('Z'); - AZ_TEST_ASSERT(pos == string::npos); + AZ_TEST_ASSERT(pos == AZStd::string::npos); pos = str1.rfind(str2); AZ_TEST_ASSERT(pos == 12); @@ -510,7 +505,7 @@ namespace UnitTest AZ_TEST_ASSERT(pos == 12); pos = str1.rfind('Z'); - AZ_TEST_ASSERT(pos == string::npos); + AZ_TEST_ASSERT(pos == AZStd::string::npos); pos = str1.find_first_of(str2); AZ_TEST_ASSERT(pos == 2); @@ -535,7 +530,7 @@ namespace UnitTest AZ_TEST_ASSERT(pos == 12); pos = str1.find_first_of('Z'); - AZ_TEST_ASSERT(pos == string::npos); + AZ_TEST_ASSERT(pos == AZStd::string::npos); pos = str1.find_last_of(str2); AZ_TEST_ASSERT(pos == 14); @@ -550,7 +545,7 @@ namespace UnitTest AZ_TEST_ASSERT(pos == 12); pos = str1.find_last_of('Z'); - AZ_TEST_ASSERT(pos == string::npos); + AZ_TEST_ASSERT(pos == AZStd::string::npos); pos = str1.find_first_not_of(str2, 3); AZ_TEST_ASSERT(pos == 5); @@ -559,13 +554,13 @@ namespace UnitTest AZ_TEST_ASSERT(pos == 0); pos = str1.find_last_not_of(sChar); - AZ_TEST_ASSERT(pos == string::npos); + AZ_TEST_ASSERT(pos == AZStd::string::npos); pos = str1.find_last_not_of('Z'); AZ_TEST_ASSERT(pos == 19); - string sub = str1.substr(0, 10); + AZStd::string sub = str1.substr(0, 10); AZ_TEST_VALIDATE_STRING(sub, 10); AZ_TEST_ASSERT(sub[0] == 'S'); AZ_TEST_ASSERT(sub[9] == 'g'); @@ -594,13 +589,13 @@ namespace UnitTest using iteratorType = char; auto testValue = str4; - reverse_iterator rend = testValue.rend(); - reverse_iterator crend1 = testValue.rend(); - reverse_iterator crend2 = testValue.crend(); + AZStd::reverse_iterator rend = testValue.rend(); + AZStd::reverse_iterator crend1 = testValue.rend(); + AZStd::reverse_iterator crend2 = testValue.crend(); - reverse_iterator rbegin = testValue.rbegin(); - reverse_iterator crbegin1 = testValue.rbegin(); - reverse_iterator crbegin2 = testValue.crbegin(); + AZStd::reverse_iterator rbegin = testValue.rbegin(); + AZStd::reverse_iterator crbegin1 = testValue.rbegin(); + AZStd::reverse_iterator crbegin2 = testValue.crbegin(); AZ_TEST_ASSERT(rend == crend1); AZ_TEST_ASSERT(crend1 == crend2); @@ -630,128 +625,128 @@ namespace UnitTest TEST_F(String, Algorithms) { - string str = string::format("%s %d", "BlaBla", 5); + AZStd::string str = AZStd::string::format("%s %d", "BlaBla", 5); AZ_TEST_VALIDATE_STRING(str, 8); - wstring wstr = wstring::format(L"%ls %d", L"BlaBla", 5); + AZStd::wstring wstr = AZStd::wstring::format(L"%ls %d", L"BlaBla", 5); AZ_TEST_VALIDATE_WSTRING(wstr, 8); - to_lower(str.begin(), str.end()); + AZStd::to_lower(str.begin(), str.end()); AZ_TEST_ASSERT(str[0] == 'b'); AZ_TEST_ASSERT(str[3] == 'b'); - to_upper(str.begin(), str.end()); + AZStd::to_upper(str.begin(), str.end()); AZ_TEST_ASSERT(str[1] == 'L'); AZ_TEST_ASSERT(str[2] == 'A'); - string intStr("10"); + AZStd::string intStr("10"); int ival = AZStd::stoi(intStr); AZ_TEST_ASSERT(ival == 10); - wstring wintStr(L"10"); + AZStd::wstring wintStr(L"10"); ival = AZStd::stoi(wintStr); AZ_TEST_ASSERT(ival == 10); - string floatStr("2.32"); + AZStd::string floatStr("2.32"); float fval = AZStd::stof(floatStr); AZ_TEST_ASSERT_FLOAT_CLOSE(fval, 2.32f); - wstring wfloatStr(L"2.32"); + AZStd::wstring wfloatStr(L"2.32"); fval = AZStd::stof(wfloatStr); AZ_TEST_ASSERT_FLOAT_CLOSE(fval, 2.32f); - to_string(intStr, 20); + AZStd::to_string(intStr, 20); AZ_TEST_ASSERT(intStr == "20"); - AZ_TEST_ASSERT(to_string(static_cast(20)) == "20"); - AZ_TEST_ASSERT(to_string(static_cast(20)) == "20"); - AZ_TEST_ASSERT(to_string(static_cast(20)) == "20"); - AZ_TEST_ASSERT(to_string(static_cast(20)) == "20"); - AZ_TEST_ASSERT(to_string(static_cast(20)) == "20"); - AZ_TEST_ASSERT(to_string(static_cast(20)) == "20"); + EXPECT_EQ("20", AZStd::to_string(static_cast(20))); + EXPECT_EQ("20", AZStd::to_string(static_cast(20))); + EXPECT_EQ("20", AZStd::to_string(static_cast(20))); + EXPECT_EQ("20", AZStd::to_string(static_cast(20))); + EXPECT_EQ("20", AZStd::to_string(static_cast(20))); + EXPECT_EQ("20", AZStd::to_string(static_cast(20))); // wstring to string - string str1; - to_string(str1, wstr); + AZStd::string str1; + AZStd::to_string(str1, wstr); AZ_TEST_ASSERT(str1 == "BlaBla 5"); EXPECT_EQ(8, to_string_length(wstr)); - str1 = string::format("%ls", wstr.c_str()); + str1 = AZStd::string::format("%ls", wstr.c_str()); AZ_TEST_ASSERT(str1 == "BlaBla 5"); // string to wstring - wstring wstr1; - to_wstring(wstr1, str); + AZStd::wstring wstr1; + AZStd::to_wstring(wstr1, str); AZ_TEST_ASSERT(wstr1 == L"BLABLA 5"); - wstr1 = wstring::format(L"%hs", str.c_str()); + wstr1 = AZStd::wstring::format(L"%hs", str.c_str()); AZ_TEST_ASSERT(wstr1 == L"BLABLA 5"); // wstring to char buffer char strBuffer[9]; - to_string(strBuffer, 9, wstr1.c_str()); + AZStd::to_string(strBuffer, 9, wstr1.c_str()); AZ_TEST_ASSERT(0 == azstricmp(strBuffer, "BLABLA 5")); EXPECT_EQ(8, to_string_length(wstr1)); // wstring to char with unicode - wstring ws1InfinityEscaped = L"Infinity: \u221E"; // escaped + AZStd::wstring ws1InfinityEscaped = L"Infinity: \u221E"; // escaped EXPECT_EQ(13, to_string_length(ws1InfinityEscaped)); // wchar_t buffer to char buffer wchar_t wstrBuffer[9] = L"BLABLA 5"; memset(strBuffer, 0, AZ_ARRAY_SIZE(strBuffer)); - to_string(strBuffer, 9, wstrBuffer); + AZStd::to_string(strBuffer, 9, wstrBuffer); AZ_TEST_ASSERT(0 == azstricmp(strBuffer, "BLABLA 5")); // string to wchar_t buffer memset(wstrBuffer, 0, AZ_ARRAY_SIZE(wstrBuffer)); - to_wstring(wstrBuffer, 9, str1.c_str()); + AZStd::to_wstring(wstrBuffer, 9, str1.c_str()); AZ_TEST_ASSERT(0 == azwcsicmp(wstrBuffer, L"BlaBla 5")); // char buffer to wchar_t buffer memset(wstrBuffer, L' ', AZ_ARRAY_SIZE(wstrBuffer)); // to check that the null terminator is properly placed - to_wstring(wstrBuffer, 9, strBuffer); + AZStd::to_wstring(wstrBuffer, 9, strBuffer); AZ_TEST_ASSERT(0 == azwcsicmp(wstrBuffer, L"BLABLA 5")); // wchar UTF16/UTF32 to/from Utf8 wstr1 = L"this is a \u20AC \u00A3 test"; // that's a euro and a pound sterling AZStd::to_string(str, wstr1); - wstring wstr2; + AZStd::wstring wstr2; AZStd::to_wstring(wstr2, str); AZ_TEST_ASSERT(wstr1 == wstr2); // tokenize - vector tokens; - tokenize(string("one, two, three"), string(", "), tokens); + AZStd::vector tokens; + AZStd::tokenize(AZStd::string("one, two, three"), AZStd::string(", "), tokens); AZ_TEST_ASSERT(tokens.size() == 3); AZ_TEST_ASSERT(tokens[0] == "one"); AZ_TEST_ASSERT(tokens[1] == "two"); AZ_TEST_ASSERT(tokens[2] == "three"); - tokenize(string("one, ,, two, ,, three"), string(", "), tokens); + AZStd::tokenize(AZStd::string("one, ,, two, ,, three"), AZStd::string(", "), tokens); AZ_TEST_ASSERT(tokens.size() == 3); AZ_TEST_ASSERT(tokens[0] == "one"); AZ_TEST_ASSERT(tokens[1] == "two"); AZ_TEST_ASSERT(tokens[2] == "three"); - tokenize(string("thequickbrownfox"), string("ABC"), tokens); + AZStd::tokenize(AZStd::string("thequickbrownfox"), AZStd::string("ABC"), tokens); AZ_TEST_ASSERT(tokens.size() == 1); AZ_TEST_ASSERT(tokens[0] == "thequickbrownfox"); - tokenize(string(""), string(""), tokens); + AZStd::tokenize(AZStd::string{}, AZStd::string{}, tokens); AZ_TEST_ASSERT(tokens.empty()); - tokenize(string("ABC"), string("ABC"), tokens); + AZStd::tokenize(AZStd::string("ABC"), AZStd::string("ABC"), tokens); AZ_TEST_ASSERT(tokens.empty()); - tokenize(string(" foo bar "), string(" "), tokens); + AZStd::tokenize(AZStd::string(" foo bar "), AZStd::string(" "), tokens); AZ_TEST_ASSERT(tokens.size() == 2); AZ_TEST_ASSERT(tokens[0] == "foo"); AZ_TEST_ASSERT(tokens[1] == "bar"); - tokenize_keep_empty(string(" foo , bar "), string(","), tokens); + AZStd::tokenize_keep_empty(AZStd::string(" foo , bar "), AZStd::string(","), tokens); AZ_TEST_ASSERT(tokens.size() == 2); AZ_TEST_ASSERT(tokens[0] == " foo "); AZ_TEST_ASSERT(tokens[1] == " bar "); // Sort - AZStd::vector toSort; + AZStd::vector toSort; toSort.push_back("z2"); toSort.push_back("z100"); toSort.push_back("z1"); @@ -761,39 +756,39 @@ namespace UnitTest AZ_TEST_ASSERT(toSort[2] == "z2"); // Natural sort - AZ_TEST_ASSERT(alphanum_comp("", "") == 0); - AZ_TEST_ASSERT(alphanum_comp("", "a") < 0); - AZ_TEST_ASSERT(alphanum_comp("a", "") > 0); - AZ_TEST_ASSERT(alphanum_comp("a", "a") == 0); - AZ_TEST_ASSERT(alphanum_comp("", "9") < 0); - AZ_TEST_ASSERT(alphanum_comp("9", "") > 0); - AZ_TEST_ASSERT(alphanum_comp("1", "1") == 0); - AZ_TEST_ASSERT(alphanum_comp("1", "2") < 0); - AZ_TEST_ASSERT(alphanum_comp("3", "2") > 0); - AZ_TEST_ASSERT(alphanum_comp("a1", "a1") == 0); - AZ_TEST_ASSERT(alphanum_comp("a1", "a2") < 0); - AZ_TEST_ASSERT(alphanum_comp("a2", "a1") > 0); - AZ_TEST_ASSERT(alphanum_comp("a1a2", "a1a3") < 0); - AZ_TEST_ASSERT(alphanum_comp("a1a2", "a1a0") > 0); - AZ_TEST_ASSERT(alphanum_comp("134", "122") > 0); - AZ_TEST_ASSERT(alphanum_comp("12a3", "12a3") == 0); - AZ_TEST_ASSERT(alphanum_comp("12a1", "12a0") > 0); - AZ_TEST_ASSERT(alphanum_comp("12a1", "12a2") < 0); - AZ_TEST_ASSERT(alphanum_comp("a", "aa") < 0); - AZ_TEST_ASSERT(alphanum_comp("aaa", "aa") > 0); - AZ_TEST_ASSERT(alphanum_comp("Alpha 2", "Alpha 2") == 0); - AZ_TEST_ASSERT(alphanum_comp("Alpha 2", "Alpha 2A") < 0); - AZ_TEST_ASSERT(alphanum_comp("Alpha 2 B", "Alpha 2") > 0); - string strA("Alpha 2"); - AZ_TEST_ASSERT(alphanum_comp(strA, "Alpha 2") == 0); - AZ_TEST_ASSERT(alphanum_comp(strA, "Alpha 2A") < 0); - AZ_TEST_ASSERT(alphanum_comp("Alpha 2 B", strA) > 0); - AZ_TEST_ASSERT(alphanum_comp(strA, strdup("Alpha 2")) == 0); - AZ_TEST_ASSERT(alphanum_comp(strA, strdup("Alpha 2A")) < 0); - AZ_TEST_ASSERT(alphanum_comp(strdup("Alpha 2 B"), strA) > 0); + AZ_TEST_ASSERT(AZStd::alphanum_comp("", "") == 0); + AZ_TEST_ASSERT(AZStd::alphanum_comp("", "a") < 0); + AZ_TEST_ASSERT(AZStd::alphanum_comp("a", "") > 0); + AZ_TEST_ASSERT(AZStd::alphanum_comp("a", "a") == 0); + AZ_TEST_ASSERT(AZStd::alphanum_comp("", "9") < 0); + AZ_TEST_ASSERT(AZStd::alphanum_comp("9", "") > 0); + AZ_TEST_ASSERT(AZStd::alphanum_comp("1", "1") == 0); + AZ_TEST_ASSERT(AZStd::alphanum_comp("1", "2") < 0); + AZ_TEST_ASSERT(AZStd::alphanum_comp("3", "2") > 0); + AZ_TEST_ASSERT(AZStd::alphanum_comp("a1", "a1") == 0); + AZ_TEST_ASSERT(AZStd::alphanum_comp("a1", "a2") < 0); + AZ_TEST_ASSERT(AZStd::alphanum_comp("a2", "a1") > 0); + AZ_TEST_ASSERT(AZStd::alphanum_comp("a1a2", "a1a3") < 0); + AZ_TEST_ASSERT(AZStd::alphanum_comp("a1a2", "a1a0") > 0); + AZ_TEST_ASSERT(AZStd::alphanum_comp("134", "122") > 0); + AZ_TEST_ASSERT(AZStd::alphanum_comp("12a3", "12a3") == 0); + AZ_TEST_ASSERT(AZStd::alphanum_comp("12a1", "12a0") > 0); + AZ_TEST_ASSERT(AZStd::alphanum_comp("12a1", "12a2") < 0); + AZ_TEST_ASSERT(AZStd::alphanum_comp("a", "aa") < 0); + AZ_TEST_ASSERT(AZStd::alphanum_comp("aaa", "aa") > 0); + AZ_TEST_ASSERT(AZStd::alphanum_comp("Alpha 2", "Alpha 2") == 0); + AZ_TEST_ASSERT(AZStd::alphanum_comp("Alpha 2", "Alpha 2A") < 0); + AZ_TEST_ASSERT(AZStd::alphanum_comp("Alpha 2 B", "Alpha 2") > 0); + AZStd::string strA("Alpha 2"); + AZ_TEST_ASSERT(AZStd::alphanum_comp(strA, "Alpha 2") == 0); + AZ_TEST_ASSERT(AZStd::alphanum_comp(strA, "Alpha 2A") < 0); + AZ_TEST_ASSERT(AZStd::alphanum_comp("Alpha 2 B", strA) > 0); + AZ_TEST_ASSERT(AZStd::alphanum_comp(strA, strdup("Alpha 2")) == 0); + AZ_TEST_ASSERT(AZStd::alphanum_comp(strA, strdup("Alpha 2A")) < 0); + AZ_TEST_ASSERT(AZStd::alphanum_comp(strdup("Alpha 2 B"), strA) > 0); // show usage of the comparison functor with a set - using StringSetType = set>; + using StringSetType = AZStd::set>; StringSetType s; s.insert("Xiph Xlater 58"); s.insert("Xiph Xlater 5000"); @@ -879,7 +874,7 @@ namespace UnitTest AZ_TEST_ASSERT(*setIt++ == "Xiph Xlater 10000"); // show usage of comparison functor with a map - using StringIntMapType = map>; + using StringIntMapType = AZStd::map>; StringIntMapType m; m["z1.doc"] = 1; m["z10.doc"] = 2; @@ -931,13 +926,13 @@ namespace UnitTest AZ_TEST_ASSERT((mapIt++)->second == 5); // show usage of comparison functor with an STL algorithm on a vector - vector v; + AZStd::vector v; // vector contents are reversed sorted contents of the old set - AZStd::copy(s.rbegin(), s.rend(), back_inserter(v)); + AZStd::copy(s.rbegin(), s.rend(), AZStd::back_inserter(v)); // now sort the vector with the algorithm - AZStd::sort(v.begin(), v.end(), alphanum_less()); + AZStd::sort(v.begin(), v.end(), AZStd::alphanum_less()); // check values - vector::const_iterator vecIt = v.begin(); + AZStd::vector::const_iterator vecIt = v.begin(); AZ_TEST_ASSERT(*vecIt++ == "10X Radonius"); AZ_TEST_ASSERT(*vecIt++ == "20X Radonius"); AZ_TEST_ASSERT(*vecIt++ == "20X Radonius Prime"); @@ -988,52 +983,52 @@ namespace UnitTest TEST_F(Regex, Regex_IPAddressSubnetPattern_Success) { // Error case for LY-43888 - regex txt_regex("^(([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])\\.){3}([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])(/([0-9]|[1-2][0-9]|3[0-2]))?$"); - string sample_input("10.85.22.92/24"); - bool match = regex_match(sample_input, txt_regex); + AZStd::regex txt_regex("^(([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])\\.){3}([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])(/([0-9]|[1-2][0-9]|3[0-2]))?$"); + AZStd::string sample_input("10.85.22.92/24"); + bool match = AZStd::regex_match(sample_input, txt_regex); AZ_TEST_ASSERT(match); } TEST_F(Regex, MatchConstChar) { //regex - AZ_TEST_ASSERT(regex_match("subject", regex("(sub)(.*)"))); + AZ_TEST_ASSERT(AZStd::regex_match("subject", AZStd::regex("(sub)(.*)"))); } TEST_F(Regex, MatchString) { - string reStr("subject"); - regex re("(sub)(.*)"); - AZ_TEST_ASSERT(regex_match(reStr, re)); - AZ_TEST_ASSERT(regex_match(reStr.begin(), reStr.end(), re)) + AZStd::string reStr("subject"); + AZStd::regex re("(sub)(.*)"); + AZ_TEST_ASSERT(AZStd::regex_match(reStr, re)); + AZ_TEST_ASSERT(AZStd::regex_match(reStr.begin(), reStr.end(), re)) } TEST_F(Regex, CMatch) { - regex re("(sub)(.*)"); - cmatch cm; // same as match_results cm; - regex_match("subject", cm, re); + AZStd::regex re("(sub)(.*)"); + AZStd::cmatch cm; // same as match_results cm; + AZStd::regex_match("subject", cm, re); AZ_TEST_ASSERT(cm.size() == 3); } TEST_F(Regex, SMatch) { - string reStr("subject"); - regex re("(sub)(.*)"); - smatch sm; // same as std::match_results sm; - regex_match(reStr, sm, re); + AZStd::string reStr("subject"); + AZStd::regex re("(sub)(.*)"); + AZStd::smatch sm; // same as std::match_results sm; + AZStd::regex_match(reStr, sm, re); AZ_TEST_ASSERT(sm.size() == 3); - regex_match(reStr.cbegin(), reStr.cend(), sm, re); + AZStd::regex_match(reStr.cbegin(), reStr.cend(), sm, re); AZ_TEST_ASSERT(sm.size() == 3); } TEST_F(Regex, CMatchWithFlags) { - regex re("(sub)(.*)"); - cmatch cm; // same as match_results cm; + AZStd::regex re("(sub)(.*)"); + AZStd::cmatch cm; // same as match_results cm; // using explicit flags: - regex_match("subject", cm, re, regex_constants::match_default); + AZStd::regex_match("subject", cm, re, AZStd::regex_constants::match_default); AZ_TEST_ASSERT(cm[0] == "subject"); AZ_TEST_ASSERT(cm[1] == "sub"); AZ_TEST_ASSERT(cm[2] == "ject"); @@ -1042,18 +1037,18 @@ namespace UnitTest TEST_F(Regex, PatternMatchFiles) { // Simple regular expression matching - string fnames[] = { "foo.txt", "bar.txt", "baz.dat", "zoidberg" }; - regex txt_regex("[a-z]+\\.txt"); + AZStd::string fnames[] = { "foo.txt", "bar.txt", "baz.dat", "zoidberg" }; + AZStd::regex txt_regex("[a-z]+\\.txt"); for (size_t i = 0; i < AZ_ARRAY_SIZE(fnames); ++i) { if (i < 2) { - AZ_TEST_ASSERT(regex_match(fnames[i], txt_regex) == true); + AZ_TEST_ASSERT(AZStd::regex_match(fnames[i], txt_regex) == true); } else { - AZ_TEST_ASSERT(regex_match(fnames[i], txt_regex) == false); + AZ_TEST_ASSERT(AZStd::regex_match(fnames[i], txt_regex) == false); } } } @@ -1061,13 +1056,13 @@ namespace UnitTest TEST_F(Regex, PatternWithSingleCaptureGroup) { // Extraction of a sub-match - string fnames[] = { "foo.txt", "bar.txt", "baz.dat", "zoidberg" }; - regex base_regex("([a-z]+)\\.txt"); - smatch base_match; + AZStd::string fnames[] = { "foo.txt", "bar.txt", "baz.dat", "zoidberg" }; + AZStd::regex base_regex("([a-z]+)\\.txt"); + AZStd::smatch base_match; for (size_t i = 0; i < AZ_ARRAY_SIZE(fnames); ++i) { - if (regex_match(fnames[i], base_match, base_regex)) + if (AZStd::regex_match(fnames[i], base_match, base_regex)) { AZ_TEST_ASSERT(base_match.size() == 2); AZ_TEST_ASSERT(base_match[1] == "foo" || base_match[1] == "bar") @@ -1078,12 +1073,12 @@ namespace UnitTest TEST_F(Regex, PatternWithMultipleCaptureGroups) { // Extraction of several sub-matches - string fnames[] = { "foo.txt", "bar.txt", "baz.dat", "zoidberg" }; - regex pieces_regex("([a-z]+)\\.([a-z]+)"); - smatch pieces_match; + AZStd::string fnames[] = { "foo.txt", "bar.txt", "baz.dat", "zoidberg" }; + AZStd::regex pieces_regex("([a-z]+)\\.([a-z]+)"); + AZStd::smatch pieces_match; for (size_t i = 0; i < AZ_ARRAY_SIZE(fnames); ++i) { - if (regex_match(fnames[i], pieces_match, pieces_regex)) + if (AZStd::regex_match(fnames[i], pieces_match, pieces_regex)) { AZ_TEST_ASSERT(pieces_match.size() == 3); AZ_TEST_ASSERT(pieces_match[0] == "foo.txt" || pieces_match[0] == "bar.txt" || pieces_match[0] == "baz.dat"); @@ -1096,40 +1091,40 @@ namespace UnitTest TEST_F(Regex, WideCharTests) { //wchar_t - AZ_TEST_ASSERT(regex_match(L"subject", wregex(L"(sub)(.*)"))); - wstring reWStr(L"subject"); - wregex reW(L"(sub)(.*)"); - AZ_TEST_ASSERT(regex_match(reWStr, reW)); - AZ_TEST_ASSERT(regex_match(reWStr.begin(), reWStr.end(), reW)) + AZ_TEST_ASSERT(AZStd::regex_match(L"subject", AZStd::wregex(L"(sub)(.*)"))); + AZStd::wstring reWStr(L"subject"); + AZStd::wregex reW(L"(sub)(.*)"); + AZ_TEST_ASSERT(AZStd::regex_match(reWStr, reW)); + AZ_TEST_ASSERT(AZStd::regex_match(reWStr.begin(), reWStr.end(), reW)) } TEST_F(Regex, LongPatterns) { // test construction and destruction of a regex with a pattern long enough to require reallocation of buffers - regex longerThan16(".*\\/Presets\\/GeomCache\\/.*", regex::flag_type::icase | regex::flag_type::ECMAScript); - regex longerThan32(".*\\/Presets\\/GeomCache\\/Whatever\\/Much\\/Test\\/Very\\/Memory\\/.*", regex::flag_type::icase); + AZStd::regex longerThan16(".*\\/Presets\\/GeomCache\\/.*", AZStd::regex::flag_type::icase | AZStd::regex::flag_type::ECMAScript); + AZStd::regex longerThan32(".*\\/Presets\\/GeomCache\\/Whatever\\/Much\\/Test\\/Very\\/Memory\\/.*", AZStd::regex::flag_type::icase); } TEST_F(Regex, SmileyFaceParseRegression) { - regex smiley(":)"); + AZStd::regex smiley(":)"); EXPECT_TRUE(smiley.Empty()); EXPECT_TRUE(smiley.GetError() != nullptr); - EXPECT_FALSE(regex_match("wut", smiley)); - EXPECT_FALSE(regex_match(":)", smiley)); + EXPECT_FALSE(AZStd::regex_match("wut", smiley)); + EXPECT_FALSE(AZStd::regex_match(":)", smiley)); } TEST_F(Regex, ParseFailure) { - regex failed(")))/?!\\$"); + AZStd::regex failed(")))/?!\\$"); EXPECT_FALSE(failed.Valid()); - regex other = AZStd::move(failed); + AZStd::regex other = AZStd::move(failed); EXPECT_FALSE(other.Valid()); - regex other2; + AZStd::regex other2; other2.swap(other); EXPECT_TRUE(other.Empty()); EXPECT_TRUE(other.GetError() == nullptr); @@ -1139,69 +1134,69 @@ namespace UnitTest TEST_F(String, ConstString) { - string_view cstr1; - AZ_TEST_ASSERT(cstr1.data()==nullptr); - AZ_TEST_ASSERT(cstr1.size() == 0); - AZ_TEST_ASSERT(cstr1.length() == 0); - AZ_TEST_ASSERT(cstr1.begin() == cstr1.end()); - AZ_TEST_ASSERT(cstr1 == string_view()); - AZ_TEST_ASSERT(cstr1.empty()); + AZStd::string_view cstr1; + EXPECT_EQ(nullptr, cstr1.data()); + EXPECT_EQ(0, cstr1.size()); + EXPECT_EQ(0, cstr1.length()); + EXPECT_EQ(cstr1.begin(), cstr1.end()); + EXPECT_EQ(cstr1, AZStd::string_view()); + EXPECT_TRUE(cstr1.empty()); - string_view cstr2("Test"); - AZ_TEST_ASSERT(cstr2.data() != nullptr); - AZ_TEST_ASSERT(cstr2.size() == 4); - AZ_TEST_ASSERT(cstr2.length() == 4); - AZ_TEST_ASSERT(cstr2.begin() != cstr2.end()); - AZ_TEST_ASSERT(cstr2 != cstr1); - AZ_TEST_ASSERT(cstr2 == string_view("Test")); - AZ_TEST_ASSERT(cstr2 == "Test"); - AZ_TEST_ASSERT(cstr2 != "test"); - AZ_TEST_ASSERT(cstr2[2] == 's'); - AZ_TEST_ASSERT(cstr2.at(2) == 's'); + AZStd::string_view cstr2("Test"); + EXPECT_NE(nullptr, cstr2.data()); + EXPECT_EQ(4, cstr2.size()); + EXPECT_EQ(4, cstr2.length()); + EXPECT_NE(cstr2.begin(), cstr2.end()); + EXPECT_NE(cstr2, cstr1); + EXPECT_EQ(cstr2, AZStd::string_view("Test")); + EXPECT_EQ(cstr2, "Test"); + EXPECT_NE(cstr2, "test"); + EXPECT_EQ(cstr2[2], 's'); + EXPECT_EQ(cstr2.at(2), 's'); AZ_TEST_START_TRACE_SUPPRESSION; - AZ_TEST_ASSERT(cstr2.at(7) == 0); + EXPECT_EQ(0, cstr2.at(7)); AZ_TEST_STOP_TRACE_SUPPRESSION(1); - AZ_TEST_ASSERT(!cstr2.empty()); - AZ_TEST_ASSERT(cstr2.data() == string("Test")); - AZ_TEST_ASSERT((string)cstr2 == string("Test")); + EXPECT_FALSE(cstr2.empty()); + EXPECT_EQ(cstr2.data(), AZStd::string("Test")); + EXPECT_EQ(cstr2, AZStd::string("Test")); - string_view cstr3 = cstr2; - AZ_TEST_ASSERT(cstr3 == cstr2); + AZStd::string_view cstr3 = cstr2; + EXPECT_EQ(cstr3, cstr2); cstr3.swap(cstr1); - AZ_TEST_ASSERT(cstr3 == string_view()); - AZ_TEST_ASSERT(cstr1 == cstr2); + EXPECT_EQ(cstr3, AZStd::string_view()); + EXPECT_EQ(cstr1, cstr2); cstr1 = {}; - AZ_TEST_ASSERT(cstr1 == string_view()); - AZ_TEST_ASSERT(cstr1.size() == 0); - AZ_TEST_ASSERT(cstr1.length() == 0); + EXPECT_EQ(cstr1, AZStd::string_view()); + EXPECT_EQ(0, cstr1.size()); + EXPECT_EQ(0, cstr1.length()); AZStd::string str1("Test"); - AZ_TEST_ASSERT(cstr2 == str1); + EXPECT_EQ(cstr2, str1); cstr1 = str1; - AZ_TEST_ASSERT(cstr1 == cstr2); + EXPECT_EQ(cstr1, cstr2); // check hashing - AZStd::hash h; + AZStd::hash h; AZStd::size_t value = h(cstr1); - AZ_TEST_ASSERT(value != 0); + EXPECT_NE(0, value); // testing empty string AZStd::string emptyString; - string_view cstr4; + AZStd::string_view cstr4; cstr4 = emptyString; - AZ_TEST_ASSERT(cstr4.data() != nullptr); - AZ_TEST_ASSERT(cstr4.size() == 0); - AZ_TEST_ASSERT(cstr4.length() == 0); - AZ_TEST_ASSERT(cstr4.begin() == cstr4.end()); - AZ_TEST_ASSERT(cstr4.empty()); + EXPECT_NE(nullptr, cstr4.data()); + EXPECT_EQ(0, cstr4.size()); + EXPECT_EQ(0, cstr4.length()); + EXPECT_EQ(cstr4.begin(), cstr4.end()); + EXPECT_TRUE(cstr4.empty()); } TEST_F(String, StringViewModifierTest) { - string_view emptyView1; - string_view view2("Needle in Haystack"); + AZStd::string_view emptyView1; + AZStd::string_view view2("Needle in Haystack"); // front EXPECT_EQ('N', view2.front()); @@ -1209,7 +1204,7 @@ namespace UnitTest EXPECT_EQ('k', view2.back()); AZStd::string findStr("Hay"); - string_view view3(findStr); + AZStd::string_view view3(findStr); // copy const size_t destBufferSize = 32; @@ -1223,17 +1218,17 @@ namespace UnitTest AZ_TEST_STOP_TRACE_SUPPRESSION(1); // substr - string_view subView2 = view2.substr(10); + AZStd::string_view subView2 = view2.substr(10); EXPECT_EQ("Haystack", subView2); AZ_TEST_START_TRACE_SUPPRESSION; - [[maybe_unused]] string_view assertSubView = view2.substr(view2.size() + 1); + [[maybe_unused]] AZStd::string_view assertSubView = view2.substr(view2.size() + 1); AZ_TEST_STOP_TRACE_SUPPRESSION(1); // compare AZStd::size_t compareResult = view2.compare(1, view2.size() - 1, dest, copyResult); EXPECT_EQ(0, compareResult); - string_view compareView = "Stackhay in Needle"; + AZStd::string_view compareView = "Stackhay in Needle"; compareResult = compareView.compare(view2); EXPECT_NE(0, compareResult); @@ -1252,7 +1247,7 @@ namespace UnitTest EXPECT_EQ(10, findResult); findResult = compareView.find("Random String"); - EXPECT_EQ(string_view::npos, findResult); + EXPECT_EQ(AZStd::string_view::npos, findResult); findResult = view3.find('y', 2); EXPECT_EQ(2, findResult); @@ -1262,13 +1257,13 @@ namespace UnitTest EXPECT_EQ(1, rfindResult); rfindResult = emptyView1.rfind(""); - EXPECT_EQ(string_view::npos, rfindResult); + EXPECT_EQ(AZStd::string_view::npos, rfindResult); rfindResult = view2.rfind("z"); - EXPECT_EQ(string_view::npos, rfindResult); + EXPECT_EQ(AZStd::string_view::npos, rfindResult); // find_first_of - string_view repeatString = "abcdefabcfedghiabcdef"; + AZStd::string_view repeatString = "abcdefabcfedghiabcdef"; AZStd::size_t findFirstOfResult = repeatString.find_first_of('f'); EXPECT_EQ(5, findFirstOfResult); @@ -1281,7 +1276,7 @@ namespace UnitTest AZStd::string notFoundStr = "zzz"; AZStd::string foundStr = "ghi"; findFirstOfResult = repeatString.find_first_of(notFoundStr); - EXPECT_EQ(string_view::npos, findFirstOfResult); + EXPECT_EQ(AZStd::string_view::npos, findFirstOfResult); findFirstOfResult = repeatString.find_first_of(foundStr); EXPECT_EQ(12, findFirstOfResult); @@ -1297,7 +1292,7 @@ namespace UnitTest EXPECT_EQ(3, findLastOfResult); findLastOfResult = repeatString.find_last_of(notFoundStr); - EXPECT_EQ(string_view::npos, findLastOfResult); + EXPECT_EQ(AZStd::string_view::npos, findLastOfResult); findLastOfResult = repeatString.find_last_of(foundStr); EXPECT_EQ(14, findLastOfResult); @@ -1335,12 +1330,12 @@ namespace UnitTest EXPECT_EQ(11, findLastNotOfResult); // remove_prefix - string_view prefixRemovalView = view2; + AZStd::string_view prefixRemovalView = view2; prefixRemovalView.remove_prefix(6); EXPECT_EQ(" in Haystack", prefixRemovalView); // remove_suffix - string_view suffixRemovalView = view2; + AZStd::string_view suffixRemovalView = view2; suffixRemovalView.remove_suffix(8); EXPECT_EQ("Needle in ", suffixRemovalView); @@ -1365,10 +1360,10 @@ namespace UnitTest TEST_F(String, StringViewCmpOperatorTest) { - string_view view1("The quick brown fox jumped over the lazy dog"); - string_view view2("Needle in Haystack"); - string_view emptyBeaverView; - string_view superEmptyBeaverView(""); + AZStd::string_view view1("The quick brown fox jumped over the lazy dog"); + AZStd::string_view view2("Needle in Haystack"); + AZStd::string_view emptyBeaverView; + AZStd::string_view superEmptyBeaverView(""); EXPECT_EQ("", emptyBeaverView); EXPECT_EQ("", superEmptyBeaverView); @@ -1378,13 +1373,13 @@ namespace UnitTest EXPECT_EQ(view2, "Needle in Haystack"); EXPECT_NE(view2, "Needle in Hayqueue"); - string_view compareView(view2); + AZStd::string_view compareView(view2); EXPECT_EQ(view2, compareView); EXPECT_NE(view2, view1); AZStd::string compareStr("Busy Beaver"); - string_view notBeaverView("Lumber Beaver"); - string_view beaverView("Busy Beaver"); + AZStd::string_view notBeaverView("Lumber Beaver"); + AZStd::string_view beaverView("Busy Beaver"); EXPECT_EQ(compareStr, beaverView); EXPECT_NE(compareStr, notBeaverView); @@ -1528,8 +1523,8 @@ namespace UnitTest TYPED_TEST_CASE(BasicStringViewConstexprFixture, StringViewElementTypes); TYPED_TEST(BasicStringViewConstexprFixture, StringView_DefaultConstructorsIsConstexpr) { - constexpr basic_string_view defaultView1; - constexpr basic_string_view defaultView2; + constexpr AZStd::basic_string_view defaultView1; + constexpr AZStd::basic_string_view defaultView2; static_assert(defaultView1 == defaultView2, "string_view constructor should be constexpr"); } @@ -1549,7 +1544,7 @@ namespace UnitTest return {}; }(); - constexpr basic_string_view charTView1(compileTimeString); + constexpr AZStd::basic_string_view charTView1(compileTimeString); static_assert(charTView1.size() == 10, "string_view constructor should be constexpr"); // non-null terminated compile time string constexpr const TypeParam* compileTimeString2 = []() constexpr -> const TypeParam* @@ -1565,7 +1560,7 @@ namespace UnitTest return {}; }(); - constexpr basic_string_view charTViewWithLength(compileTimeString2, 7); + constexpr AZStd::basic_string_view charTViewWithLength(compileTimeString2, 7); static_assert(charTViewWithLength.size() == 7, "string_view constructor should be constexpr"); } @@ -1585,8 +1580,8 @@ namespace UnitTest return {}; }(); - constexpr basic_string_view copyView1(compileTimeString); - constexpr basic_string_view copyView2(copyView1); + constexpr AZStd::basic_string_view copyView1(compileTimeString); + constexpr AZStd::basic_string_view copyView2(copyView1); static_assert(copyView1 == copyView2, "string_view constructor should be constexpr"); } @@ -1606,8 +1601,8 @@ namespace UnitTest return {}; }(); - constexpr basic_string_view assignView1(compileTimeString1); - auto assignment_test_func = [](basic_string_view sourceView) constexpr -> basic_string_view + constexpr AZStd::basic_string_view assignView1(compileTimeString1); + auto assignment_test_func = [](AZStd::basic_string_view sourceView) constexpr -> AZStd::basic_string_view { constexpr const TypeParam* const compileTimeString2 = []() constexpr-> const TypeParam* { @@ -1622,7 +1617,7 @@ namespace UnitTest return {}; }(); - basic_string_view assignView2(compileTimeString2); + AZStd::basic_string_view assignView2(compileTimeString2); assignView2 = sourceView; return assignView2; }; @@ -1646,15 +1641,15 @@ namespace UnitTest return {}; }(); - constexpr basic_string_view iteratorView(compileTimeString1); - constexpr typename basic_string_view::iterator beginIt = iteratorView.begin(); - constexpr typename basic_string_view::const_iterator cbeginIt = iteratorView.cbegin(); - constexpr typename basic_string_view::iterator endIt = iteratorView.end(); - constexpr typename basic_string_view::const_iterator cendIt = iteratorView.cend(); - constexpr typename basic_string_view::reverse_iterator rbeginIt = iteratorView.rbegin(); - constexpr typename basic_string_view::const_reverse_iterator crbeginIt = iteratorView.crbegin(); - constexpr typename basic_string_view::reverse_iterator rendIt = iteratorView.rend(); - constexpr typename basic_string_view::const_reverse_iterator crendIt = iteratorView.crend(); + constexpr AZStd::basic_string_view iteratorView(compileTimeString1); + constexpr typename AZStd::basic_string_view::iterator beginIt = iteratorView.begin(); + constexpr typename AZStd::basic_string_view::const_iterator cbeginIt = iteratorView.cbegin(); + constexpr typename AZStd::basic_string_view::iterator endIt = iteratorView.end(); + constexpr typename AZStd::basic_string_view::const_iterator cendIt = iteratorView.cend(); + constexpr typename AZStd::basic_string_view::reverse_iterator rbeginIt = iteratorView.rbegin(); + constexpr typename AZStd::basic_string_view::const_reverse_iterator crbeginIt = iteratorView.crbegin(); + constexpr typename AZStd::basic_string_view::reverse_iterator rendIt = iteratorView.rend(); + constexpr typename AZStd::basic_string_view::const_reverse_iterator crendIt = iteratorView.crend(); static_assert(beginIt != endIt, "begin and iterators should be different"); static_assert(cbeginIt != cendIt, "begin and iterators should be different"); static_assert(rbeginIt != rendIt, "begin and iterators should be different"); @@ -1679,7 +1674,7 @@ namespace UnitTest return {}; }(); - constexpr basic_string_view elementView1(compileTimeString1); + constexpr AZStd::basic_string_view elementView1(compileTimeString1); static_assert(elementView1[4] == 'o', "character at index 4 in string_view should be 'o'"); static_assert(elementView1.at(5) == 'W', "character at index 5 in string_view should be 'W'"); } @@ -1700,7 +1695,7 @@ namespace UnitTest return {}; }(); - constexpr basic_string_view elementView1(compileTimeString1); + constexpr AZStd::basic_string_view elementView1(compileTimeString1); static_assert(elementView1.front() == 'H', "Fourth character in string_view should be 'H'"); static_assert(elementView1.back() == 'd', "Fifth character in string_view should be 'd'"); } @@ -1734,8 +1729,8 @@ namespace UnitTest return {}; }(); - static constexpr basic_string_view elementView1(compileTimeString1); - static constexpr basic_string_view elementView2(compileTimeString2); + static constexpr AZStd::basic_string_view elementView1(compileTimeString1); + static constexpr AZStd::basic_string_view elementView2(compileTimeString2); static_assert(elementView1.data(), "string_view.data() should be non-nullptr"); static_assert(elementView2.data(), "string_view.data() should be non-nullptr"); } @@ -1756,7 +1751,7 @@ namespace UnitTest return {}; }(); - constexpr basic_string_view sizeView1(compileTimeString1); + constexpr AZStd::basic_string_view sizeView1(compileTimeString1); static_assert(sizeView1.size() == sizeView1.length(), "string_views size and length function should return the same value"); static_assert(!sizeView1.empty(), "string_views should not be empty"); static_assert(sizeView1.max_size() != 0, "string_views max_size should be greater than 0"); @@ -1770,21 +1765,21 @@ namespace UnitTest { return "HelloWorld"; }; - constexpr basic_string_view modifierView("HelloWorld"); + constexpr AZStd::basic_string_view modifierView("HelloWorld"); // A constexpr lambda is used to evaluate non constexpr string_view instances' member functions which // have been marked as constexpr at compile time // The google test function being run is not a constexpr function and therefore will evaulate // non-constexpr string_view variables at runtime. This would cause static_assert to state // that the expression is evaluated at runtime - auto remove_prefix_test_func = [](basic_string_view sourceView) constexpr -> basic_string_view + auto remove_prefix_test_func = [](AZStd::basic_string_view sourceView) constexpr -> AZStd::basic_string_view { - basic_string_view lstripView(sourceView); + AZStd::basic_string_view lstripView(sourceView); lstripView.remove_prefix(5); return lstripView; }; - auto remove_suffix_test_func = [](basic_string_view sourceView) constexpr -> basic_string_view + auto remove_suffix_test_func = [](AZStd::basic_string_view sourceView) constexpr -> AZStd::basic_string_view { - basic_string_view rstripView(sourceView); + AZStd::basic_string_view rstripView(sourceView); rstripView.remove_suffix(5); return rstripView; }; @@ -1801,8 +1796,8 @@ namespace UnitTest return "HelloWorld"; }; constexpr const TypeParam* compileTimeString1 = MakeCompileTimeString1();; - constexpr basic_string_view fullView(compileTimeString1); - auto substr_test_func = [](basic_string_view sourceView) constexpr -> basic_string_view + constexpr AZStd::basic_string_view fullView(compileTimeString1); + auto substr_test_func = [](AZStd::basic_string_view sourceView) constexpr -> AZStd::basic_string_view { return sourceView.substr(3, 5); }; @@ -1818,7 +1813,7 @@ namespace UnitTest return "elloGovernor"; }; constexpr const TypeParam* compileTimeString1 = MakeCompileTimeString1(); - constexpr basic_string_view withView(compileTimeString1); + constexpr AZStd::basic_string_view withView(compileTimeString1); static_assert(withView.starts_with("ello"), "string_view should start with \"ello\""); // Regression in VS2017 15.8 and 15.9 where __builtin_memcmp fails in valid checks #if AZ_COMPILER_MSVC < 1915 && AZ_COMPILER_MSVC > 1916 @@ -1854,9 +1849,9 @@ namespace UnitTest TYPED_TEST(BasicStringViewConstexprFixture, StringView_FindOperationsAreConstexpr) { constexpr const TypeParam* compileTimeString1 = MakeCompileTimeString1; - constexpr basic_string_view quickFoxView(compileTimeString1); + constexpr AZStd::basic_string_view quickFoxView(compileTimeString1); constexpr const TypeParam* searchString = MakeSearchString; - constexpr basic_string_view searchView(searchString); + constexpr AZStd::basic_string_view searchView(searchString); constexpr const TypeParam* testString1 = MakeTestString1; constexpr const TypeParam* testString2 = MakeTestString2; @@ -1893,10 +1888,10 @@ namespace UnitTest static_assert(quickFoxView.find_last_of('o') == 42, "string_view find_last_of should result in index 42"); static_assert(quickFoxView.find_last_of(testString6) == 40, "string_view find_last_of should result in index 40"); static_assert(quickFoxView.find_last_of(testString7, 31) == 29, "string_view find_last_of should result in index 29"); - static_assert(quickFoxView.find_last_of(testString8, basic_string_view::npos, 1) == 7, "string_view find_last_of should result in index 7"); + static_assert(quickFoxView.find_last_of(testString8, AZStd::basic_string_view::npos, 1) == 7, "string_view find_last_of should result in index 7"); // find_first_not_of test - constexpr basic_string_view firstNotOfView(testString9); + constexpr AZStd::basic_string_view firstNotOfView(testString9); static_assert(quickFoxView.find_first_not_of(firstNotOfView) == 4, "string_view find_first_not_of should result in index 0"); static_assert(quickFoxView.find_first_not_of('t') == 1, "string_view find_first_not_of should result in index 1"); static_assert(quickFoxView.find_first_not_of(testString9) == 4, "string_view find_first_not_of should result in index 4"); @@ -1904,12 +1899,12 @@ namespace UnitTest static_assert(quickFoxView.find_first_not_of(testString9, 0, 1) == 1, "string_view find_first_not_of should result in index 1"); // find_last_not_of test - constexpr basic_string_view lastNotOfView(testString10); + constexpr AZStd::basic_string_view lastNotOfView(testString10); static_assert(quickFoxView.find_last_not_of(lastNotOfView) == 39, "string_view find_last_not_of should result in index 39"); static_assert(quickFoxView.find_last_not_of('g') == 42, "string_view find_last_not_of should result in index 42"); static_assert(quickFoxView.find_last_not_of(testString10) == 39, "string_view find_last_not_of should result in index 39"); static_assert(quickFoxView.find_last_not_of(testString10, 27) == 24, "string_view find_last_not_of should result in index 24"); - static_assert(quickFoxView.find_last_not_of(testString10, basic_string_view::npos, 1) == 43, "string_view find_last_not_of should result in index 43"); + static_assert(quickFoxView.find_last_not_of(testString10, AZStd::basic_string_view::npos, 1) == 43, "string_view find_last_not_of should result in index 43"); } TEST_F(String, StringView_CompareIsConstexpr) @@ -1925,8 +1920,8 @@ namespace UnitTest }; constexpr const TypeParam* compileTimeString1 = ThisTestMakeCompileTimeString1(); constexpr const TypeParam* compileTimeString2 = MakeCompileTimeString2(); - constexpr basic_string_view lhsView(compileTimeString1); - constexpr basic_string_view rhsView(compileTimeString2); + constexpr AZStd::basic_string_view lhsView(compileTimeString1); + constexpr AZStd::basic_string_view rhsView(compileTimeString2); static_assert(lhsView.compare(rhsView) > 0, R"("HelloWorld" > "HelloPearl")"); static_assert(lhsView.compare(0, 5, rhsView) < 0, R"("Hello" < HelloPearl")"); static_assert(lhsView.compare(2, 3, rhsView, 2, 3) == 0, R"("llo" == llo")"); @@ -1943,7 +1938,7 @@ namespace UnitTest return "HelloWorld"; }; constexpr const TypeParam* compileTimeString1 = TestMakeCompileTimeString1(); - constexpr basic_string_view compareView(compileTimeString1); + constexpr AZStd::basic_string_view compareView(compileTimeString1); static_assert(compareView == "HelloWorld", "string_view operator== comparison has failed"); static_assert(compareView != "MadWorld", "string_view operator!= comparison has failed"); static_assert(compareView < "JelloWorld", "string_view operator< comparison has failed"); @@ -1954,7 +1949,7 @@ namespace UnitTest TYPED_TEST(BasicStringViewConstexprFixture, StringView_SwapIsConstexpr) { - auto swap_test_func = []() constexpr -> basic_string_view + auto swap_test_func = []() constexpr -> AZStd::basic_string_view { constexpr auto ThisTestMakeCompileTimeString1 = []() constexpr -> const TypeParam* { @@ -1980,8 +1975,8 @@ namespace UnitTest }; constexpr const TypeParam* compileTimeString1 = ThisTestMakeCompileTimeString1(); constexpr const TypeParam* compileTimeString2 = MakeCompileTimeString2(); - basic_string_view lhsView(compileTimeString1); - basic_string_view rhsView(compileTimeString2); + AZStd::basic_string_view lhsView(compileTimeString1); + AZStd::basic_string_view rhsView(compileTimeString2); lhsView.swap(rhsView); return lhsView; }; @@ -2014,13 +2009,14 @@ namespace UnitTest } }; constexpr const TypeParam* compileTimeString1 = ThisTestMakeCompileTimeString1(); - constexpr basic_string_view hashView(compileTimeString1); - constexpr size_t compileHash = AZStd::hash>{}(hashView); + constexpr AZStd::basic_string_view hashView(compileTimeString1); + constexpr size_t compileHash = AZStd::hash>{}(hashView); static_assert(compileHash != 0, "Hash of \"HelloWorld\" should not be 0"); } TEST_F(String, StringView_UserLiteralsSucceed) { + using namespace AZStd::string_view_literals; constexpr auto charView{ "Test"_sv }; constexpr auto wcharView{ L"Super Test"_sv }; static_assert(charView == "Test", "char string literal should be \"Test\""); @@ -2291,21 +2287,21 @@ namespace UnitTest { AZStd::fixed_string<32> filter1; AZStd::string testValue{ "test" }; - EXPECT_FALSE(wildcard_match(filter1, testValue)); + EXPECT_FALSE(AZStd::wildcard_match(filter1, testValue)); } TEST_F(String, WildcardMatch_EmptyFilterWithEmptyValue_Succeeds) { AZStd::fixed_string<32> filter1; AZStd::fixed_string<32> emptyValue; - EXPECT_TRUE(wildcard_match(filter1, emptyValue)); + EXPECT_TRUE(AZStd::wildcard_match(filter1, emptyValue)); } TEST_F(String, WildcardMatch_AsteriskOnlyFilterWithEmptyValue_Succeeds) { const char* filter1{ "*" }; const char* filter2{ "**" }; const char* emptyValue{ "" }; - EXPECT_TRUE(wildcard_match(filter1, emptyValue)); - EXPECT_TRUE(wildcard_match(filter2, emptyValue)); + EXPECT_TRUE(AZStd::wildcard_match(filter1, emptyValue)); + EXPECT_TRUE(AZStd::wildcard_match(filter2, emptyValue)); } TEST_F(String, WildcardMatch_AsteriskQuestionMarkFilterWithEmptyValue_Failes) { @@ -2313,60 +2309,60 @@ namespace UnitTest const char* filter1{ "*?" }; const char* filter2{ "?*" }; const char* emptyValue{ "" }; - EXPECT_FALSE(wildcard_match(filter1, emptyValue)); - EXPECT_FALSE(wildcard_match(filter2, emptyValue)); + EXPECT_FALSE(AZStd::wildcard_match(filter1, emptyValue)); + EXPECT_FALSE(AZStd::wildcard_match(filter2, emptyValue)); } TEST_F(String, WildcardMatch_DotValue_Succeeds) { const char* filter1{ "?" }; const char* dotValue{ "." }; - EXPECT_TRUE(wildcard_match(filter1, dotValue)); + EXPECT_TRUE(AZStd::wildcard_match(filter1, dotValue)); } TEST_F(String, WildcardMatch_DoubleDotValue_Succeeds) { const char* filter1{ "??" }; const char* dotValue{ ".." }; - EXPECT_TRUE(wildcard_match(filter1, dotValue)); + EXPECT_TRUE(AZStd::wildcard_match(filter1, dotValue)); } TEST_F(String, WildcardMatch_GlobFilters_Succeeds) { const char* filter1{ "*" }; const char* filter2{ "*?" }; const char* filter3{ "?*" }; - EXPECT_TRUE(wildcard_match(filter1, "Hello")); - EXPECT_TRUE(wildcard_match(filter1, "?")); - EXPECT_TRUE(wildcard_match(filter1, "*")); - EXPECT_TRUE(wildcard_match(filter1, "Q")); + EXPECT_TRUE(AZStd::wildcard_match(filter1, "Hello")); + EXPECT_TRUE(AZStd::wildcard_match(filter1, "?")); + EXPECT_TRUE(AZStd::wildcard_match(filter1, "*")); + EXPECT_TRUE(AZStd::wildcard_match(filter1, "Q")); - EXPECT_TRUE(wildcard_match(filter2, "Hello")); - EXPECT_TRUE(wildcard_match(filter2, "?")); - EXPECT_TRUE(wildcard_match(filter2, "*")); - EXPECT_TRUE(wildcard_match(filter2, "Q")); + EXPECT_TRUE(AZStd::wildcard_match(filter2, "Hello")); + EXPECT_TRUE(AZStd::wildcard_match(filter2, "?")); + EXPECT_TRUE(AZStd::wildcard_match(filter2, "*")); + EXPECT_TRUE(AZStd::wildcard_match(filter2, "Q")); - EXPECT_TRUE(wildcard_match(filter3, "Hello")); - EXPECT_TRUE(wildcard_match(filter3, "?")); - EXPECT_TRUE(wildcard_match(filter3, "*")); - EXPECT_TRUE(wildcard_match(filter3, "Q")); + EXPECT_TRUE(AZStd::wildcard_match(filter3, "Hello")); + EXPECT_TRUE(AZStd::wildcard_match(filter3, "?")); + EXPECT_TRUE(AZStd::wildcard_match(filter3, "*")); + EXPECT_TRUE(AZStd::wildcard_match(filter3, "Q")); } TEST_F(String, WildcardMatch_NormalString_Succeeds) { constexpr AZStd::string_view jpgFilter{ "**/*.jpg" }; - EXPECT_FALSE(wildcard_match(jpgFilter, "Test.jpg")); - EXPECT_FALSE(wildcard_match(jpgFilter, "Test.jpfg")); - EXPECT_TRUE(wildcard_match(jpgFilter, "Images/Other.jpg")); - EXPECT_FALSE(wildcard_match(jpgFilter, "Pictures/Other.gif")); + EXPECT_FALSE(AZStd::wildcard_match(jpgFilter, "Test.jpg")); + EXPECT_FALSE(AZStd::wildcard_match(jpgFilter, "Test.jpfg")); + EXPECT_TRUE(AZStd::wildcard_match(jpgFilter, "Images/Other.jpg")); + EXPECT_FALSE(AZStd::wildcard_match(jpgFilter, "Pictures/Other.gif")); constexpr AZStd::string_view tempDirFilter{ "temp/*" }; - EXPECT_TRUE(wildcard_match(tempDirFilter, "temp/")); - EXPECT_TRUE(wildcard_match(tempDirFilter, "temp/f")); - EXPECT_FALSE(wildcard_match(tempDirFilter, "tem1/")); + EXPECT_TRUE(AZStd::wildcard_match(tempDirFilter, "temp/")); + EXPECT_TRUE(AZStd::wildcard_match(tempDirFilter, "temp/f")); + EXPECT_FALSE(AZStd::wildcard_match(tempDirFilter, "tem1/")); constexpr AZStd::string_view xmlFilter{ "test.xml" }; - EXPECT_TRUE(wildcard_match(xmlFilter, "Test.xml")); - EXPECT_TRUE(wildcard_match(xmlFilter, "test.xml")); - EXPECT_FALSE(wildcard_match(xmlFilter, "test.xmlschema")); - EXPECT_FALSE(wildcard_match(xmlFilter, "Xtest.xml")); + EXPECT_TRUE(AZStd::wildcard_match(xmlFilter, "Test.xml")); + EXPECT_TRUE(AZStd::wildcard_match(xmlFilter, "test.xml")); + EXPECT_FALSE(AZStd::wildcard_match(xmlFilter, "test.xmlschema")); + EXPECT_FALSE(AZStd::wildcard_match(xmlFilter, "Xtest.xml")); } TEST_F(String, WildcardMatchCase_CanBeCompileTimeEvaluated_Succeeds) @@ -2376,17 +2372,77 @@ namespace UnitTest static_assert(AZStd::wildcard_match_case(filter1, blahValue)); } - TEST_F(String, StringEraseIf_Succeeds) + TEST_F(String, StringCXX20Erase_Succeeds) { - AZStd::string eraseIfTest = "ABC CBA"; - auto eraseCount = AZStd::erase_if(eraseIfTest, [](AZStd::string::value_type ch) - { - return ch == 'C'; - }); + auto erasePredicate = [](AZStd::string::value_type ch) + { + return ch == 'C'; + }; + auto eraseCount = AZStd::erase_if(eraseIfTest, erasePredicate); EXPECT_EQ(2, eraseCount); EXPECT_EQ(5, eraseIfTest.size()); EXPECT_STREQ("AB BA", eraseIfTest.c_str()); + + // Now erase the letter 'A'; + eraseCount = AZStd::erase(eraseIfTest, 'A'); + EXPECT_EQ(2, eraseCount); + EXPECT_EQ(3, eraseIfTest.size()); + EXPECT_EQ("B B", eraseIfTest); + } + + TEST_F(String, FixedStringCXX20Erase_Succeeds) + { + // Erase 'l' from the phrase "Hello" World" + constexpr auto eraseTest = [](const char* testString) constexpr + { + AZStd::fixed_string<16> testResult{ testString }; + AZStd::erase(testResult, 'l'); + return testResult; + }("HelloWorld"); + + static_assert(eraseTest == "HeoWord"); + EXPECT_EQ("HeoWord", eraseTest); + + // Use erase_if to erase both 'H' and 'e' from the remaining eraseTest string + constexpr auto eraseIfTest = [](AZStd::string_view testString) constexpr + { + AZStd::fixed_string<16> testResult{ testString }; + auto erasePredicate = [](char ch) + { + return ch == 'H' || ch == 'e'; + }; + AZStd::erase_if(testResult, erasePredicate); + return testResult; + }(eraseTest); + + static_assert(eraseIfTest == "oWord"); + EXPECT_EQ("oWord", eraseIfTest); + } + + TEST_F(String, StringWithStatelessAllocator_HasSizeOf_PointerPlus2IntTypes_Compiles) + { + // The expected size of a basic_string with a stateless allocator + // Is the size of the pointer (used for storing the memory address of the string) + // + the size of the string "size" member used to store the size of the string + // + the size of the string "capacity" member used to store the capacity of the string + size_t constexpr ExpectedBasicStringSize = sizeof(void*) + 2 * sizeof(size_t); + using StringStatelessAllocator = AZStd::basic_string, AZStd::stateless_allocator>; + static_assert(ExpectedBasicStringSize == sizeof(StringStatelessAllocator), + "Stateless allocator is counting against the size of the basic_string class" + " A change has made to break the empty base optimization of the basic_string class"); + } + + TEST_F(String, StringWithStatefulAllocator_HasSizeOf_PointerPlus2IntTypesPlusAllocator_Compiles) + { + // The expected size of a basic_string with a stateless allocator + // Is the size of the pointer (used for storing the memory address of the string) + // + the size of the string "size" member used to store the size of the string + // + the size of the string "capacity" member used to store the capacity of the string + size_t constexpr ExpectedBasicStringSize = sizeof(void*) + 2 * sizeof(size_t) + sizeof(AZStd::allocator); + static_assert(ExpectedBasicStringSize == sizeof(AZStd::string), + "Using Stateful allocator with basic_string class should result in a 32-byte string class" + " on 64-bit platforms "); } template @@ -2438,5 +2494,296 @@ namespace UnitTest EXPECT_EQ(str, formatted); } -#endif // AZ_UNIT_TEST_SKIP_STD_STRING_TESTS } + +#if defined(HAVE_BENCHMARK) +namespace Benchmark +{ + class StringBenchmarkFixture + : public ::UnitTest::AllocatorsBenchmarkFixture + { + protected: + template + void SwapStringViaMemcpy(AZStd::basic_string& left, + AZStd::basic_string& right) + { + // Test Swapping the storage container for the string class + // Use aligned_storage to prevent constructors from slowing operation + AZStd::aligned_storage_for_t tempStorage; + ::memcpy(&tempStorage, &left.m_storage.first(), sizeof(left.m_storage.first())); + ::memcpy(&left.m_storage.first(), &right.m_storage.first(), sizeof(right.m_storage.first())); + ::memcpy(&right.m_storage.first(), &tempStorage, sizeof(tempStorage)); + } + + + template + void SwapStringViaPointerSizedSwaps(AZStd::basic_string& left, + AZStd::basic_string& right) + { + using String = AZStd::basic_string; + using PointerAlignedData = typename String::PointerAlignedData; + // Use pointer sized swaps to swap the string storage + auto& leftAlignedPointers = reinterpret_cast(left.m_storage.first()); + auto& rightAlignedPointers = reinterpret_cast(right.m_storage.first()); + constexpr size_t alignedPointerCount{ AZStd::size(PointerAlignedData{}.m_alignedValues) }; + for (size_t i = 0; i < alignedPointerCount; ++i) + { + AZStd::swap(leftAlignedPointers.m_alignedValues[i], rightAlignedPointers.m_alignedValues[i]); + } + } + }; + + BENCHMARK_F(StringBenchmarkFixture, BM_StringPointerSwapShortString)(benchmark::State& state) + { + AZStd::string test1{ "foo bar"}; + AZStd::string test2{ "bar foo" }; + for (auto _ : state) + { + SwapStringViaPointerSizedSwaps(test1, test2); + } + } + + BENCHMARK_F(StringBenchmarkFixture, BM_StringPointerSwapLongString)(benchmark::State& state) + { + AZStd::string test1{ "The brown quick wolf jumped over the hyperactive cat" }; + AZStd::string test2{ "The quick brown fox jumped over the lazy dog" }; + for (auto _ : state) + { + SwapStringViaPointerSizedSwaps(test1, test2); + } + } + + BENCHMARK_F(StringBenchmarkFixture, BM_StringMemcpySwapShortString)(benchmark::State& state) + { + AZStd::string test1{ "foo bar" }; + AZStd::string test2{ "bar foo" }; + for (auto _ : state) + { + SwapStringViaMemcpy(test1, test2); + } + } + + BENCHMARK_F(StringBenchmarkFixture, BM_StringMemcpySwapLongString)(benchmark::State& state) + { + AZStd::string test1{ "The brown quick wolf jumped over the hyperactive cat" }; + AZStd::string test2{ "The quick brown fox jumped over the lazy dog" }; + for (auto _ : state) + { + SwapStringViaMemcpy(test1, test2); + } + } + + template + class StringTemplateBenchmarkFixture + : public ::UnitTest::AllocatorsBenchmarkFixture + {}; + + // AZStd::string assign benchmarks + BENCHMARK_TEMPLATE_DEFINE_F(StringTemplateBenchmarkFixture, BM_StringAssignConstPointer_NullDelimited, AZStd::string)(benchmark::State& state) + { + AZStd::string sourceString(state.range(0), 'a'); + const char* sourceAddress = sourceString.c_str(); + + for (auto _ : state) + { + AZStd::string assignString; + assignString.assign(sourceAddress); + } + } + + BENCHMARK_REGISTER_F(StringTemplateBenchmarkFixture, BM_StringAssignConstPointer_NullDelimited) + ->RangeMultiplier(2)->Range(8, 32); + + BENCHMARK_TEMPLATE_DEFINE_F(StringTemplateBenchmarkFixture, BM_StringAssignConstPointer_WithSize, AZStd::string)(benchmark::State& state) + { + AZStd::string sourceString(state.range(0), 'a'); + const char* sourceAddress = sourceString.c_str(); + const size_t sourceSize = sourceString.size(); + + for (auto _ : state) + { + AZStd::string assignString; + assignString.assign(sourceAddress, sourceSize); + } + } + + BENCHMARK_REGISTER_F(StringTemplateBenchmarkFixture, BM_StringAssignConstPointer_WithSize) + ->RangeMultiplier(2)->Range(8, 32); + + BENCHMARK_TEMPLATE_DEFINE_F(StringTemplateBenchmarkFixture, BM_StringAssignFromIterators, AZStd::string)(benchmark::State& state) + { + AZStd::string sourceString(state.range(0), 'a'); + auto sourceBegin = sourceString.begin(); + auto sourceEnd = sourceString.end(); + + for (auto _ : state) + { + AZStd::string assignString; + assignString.assign(sourceBegin, sourceEnd); + } + } + + BENCHMARK_REGISTER_F(StringTemplateBenchmarkFixture, BM_StringAssignFromIterators) + ->RangeMultiplier(2)->Range(8, 32); + + BENCHMARK_TEMPLATE_DEFINE_F(StringTemplateBenchmarkFixture, BM_StringAssignFromStringView, AZStd::string)(benchmark::State& state) + { + AZStd::string sourceString(state.range(0), 'a'); + AZStd::string_view sourceView(sourceString); + + for (auto _ : state) + { + AZStd::string assignString; + assignString.assign(sourceView); + } + } + + BENCHMARK_REGISTER_F(StringTemplateBenchmarkFixture, BM_StringAssignFromStringView) + ->RangeMultiplier(2)->Range(8, 32); + + BENCHMARK_TEMPLATE_DEFINE_F(StringTemplateBenchmarkFixture, BM_StringAssignFromString_LValue, AZStd::string)(benchmark::State& state) + { + AZStd::string sourceString(state.range(0), 'a'); + + for (auto _ : state) + { + AZStd::string assignString; + assignString.assign(sourceString); + } + } + + BENCHMARK_REGISTER_F(StringTemplateBenchmarkFixture, BM_StringAssignFromString_LValue) + ->RangeMultiplier(2)->Range(8, 32); + + BENCHMARK_TEMPLATE_DEFINE_F(StringTemplateBenchmarkFixture, BM_StringAssignFromString_RValue, AZStd::string)(benchmark::State& state) + { + AZStd::string sourceString(state.range(0), 'a'); + + for (auto _ : state) + { + AZStd::string assignString; + assignString.assign(AZStd::move(sourceString)); + } + } + + BENCHMARK_REGISTER_F(StringTemplateBenchmarkFixture, BM_StringAssignFromString_RValue) + ->RangeMultiplier(2)->Range(8, 32); + + BENCHMARK_TEMPLATE_DEFINE_F(StringTemplateBenchmarkFixture, BM_StringAssignFromSingleCharacter, AZStd::string)(benchmark::State& state) + { + for (auto _ : state) + { + AZStd::string assignString; + assignString.assign(state.range(0), 'a'); + } + } + + BENCHMARK_REGISTER_F(StringTemplateBenchmarkFixture, BM_StringAssignFromSingleCharacter) + ->RangeMultiplier(2)->Range(8, 32); + + // AZStd::fixed_string assign benchmarks + // NOTE: This is a copy-and-paste of above because Google Benchmark doesn't support real templated benchmarks like Googletest + // https://github.com/google/benchmark/issues/541 + BENCHMARK_TEMPLATE_DEFINE_F(StringTemplateBenchmarkFixture, BM_FixedStringAssignConstPointer_NullDelimited, AZStd::fixed_string<1024>)(benchmark::State& state) + { + AZStd::fixed_string<1024> sourceString(state.range(0), 'a'); + const char* sourceAddress = sourceString.c_str(); + + for (auto _ : state) + { + AZStd::fixed_string<1024> assignString; + assignString.assign(sourceAddress); + } + } + + BENCHMARK_REGISTER_F(StringTemplateBenchmarkFixture, BM_FixedStringAssignConstPointer_NullDelimited) + ->RangeMultiplier(2)->Range(8, 32); + + BENCHMARK_TEMPLATE_DEFINE_F(StringTemplateBenchmarkFixture, BM_FixedStringAssignConstPointer_WithSize, AZStd::fixed_string<1024>)(benchmark::State& state) + { + AZStd::fixed_string<1024> sourceString(state.range(0), 'a'); + const char* sourceAddress = sourceString.c_str(); + const size_t sourceSize = sourceString.size(); + + for (auto _ : state) + { + AZStd::fixed_string<1024> assignString; + assignString.assign(sourceAddress, sourceSize); + } + } + + BENCHMARK_REGISTER_F(StringTemplateBenchmarkFixture, BM_FixedStringAssignConstPointer_WithSize) + ->RangeMultiplier(2)->Range(8, 32); + + BENCHMARK_TEMPLATE_DEFINE_F(StringTemplateBenchmarkFixture, BM_FixedStringAssignFromIterators, AZStd::fixed_string<1024>)(benchmark::State& state) + { + AZStd::fixed_string<1024> sourceString(state.range(0), 'a'); + auto sourceBegin = sourceString.begin(); + auto sourceEnd = sourceString.end(); + + for (auto _ : state) + { + AZStd::fixed_string<1024> assignString; + assignString.assign(sourceBegin, sourceEnd); + } + } + + BENCHMARK_REGISTER_F(StringTemplateBenchmarkFixture, BM_FixedStringAssignFromIterators) + ->RangeMultiplier(2)->Range(8, 32); + + BENCHMARK_TEMPLATE_DEFINE_F(StringTemplateBenchmarkFixture, BM_FixedStringAssignFromStringView, AZStd::fixed_string<1024>)(benchmark::State& state) + { + AZStd::fixed_string<1024> sourceString(state.range(0), 'a'); + AZStd::string_view sourceView(sourceString); + + for (auto _ : state) + { + AZStd::fixed_string<1024> assignString; + assignString.assign(sourceView); + } + } + + BENCHMARK_REGISTER_F(StringTemplateBenchmarkFixture, BM_FixedStringAssignFromStringView) + ->RangeMultiplier(2)->Range(8, 32); + + BENCHMARK_TEMPLATE_DEFINE_F(StringTemplateBenchmarkFixture, BM_FixedStringAssignFromString_LValue, AZStd::fixed_string<1024>)(benchmark::State& state) + { + AZStd::fixed_string<1024> sourceString(state.range(0), 'a'); + + for (auto _ : state) + { + AZStd::fixed_string<1024> assignString; + assignString.assign(sourceString); + } + } + + BENCHMARK_REGISTER_F(StringTemplateBenchmarkFixture, BM_FixedStringAssignFromString_LValue) + ->RangeMultiplier(2)->Range(8, 32); + + BENCHMARK_TEMPLATE_DEFINE_F(StringTemplateBenchmarkFixture, BM_FixedStringAssignFromString_RValue, AZStd::fixed_string<1024>)(benchmark::State& state) + { + AZStd::fixed_string<1024> sourceString(state.range(0), 'a'); + + for (auto _ : state) + { + AZStd::fixed_string<1024> assignString; + assignString.assign(AZStd::move(sourceString)); + } + } + + BENCHMARK_REGISTER_F(StringTemplateBenchmarkFixture, BM_FixedStringAssignFromString_RValue) + ->RangeMultiplier(2)->Range(8, 32); + + BENCHMARK_TEMPLATE_DEFINE_F(StringTemplateBenchmarkFixture, BM_FixedStringAssignFromSingleCharacter, AZStd::fixed_string<1024>)(benchmark::State& state) + { + for (auto _ : state) + { + AZStd::fixed_string<1024> assignString; + assignString.assign(state.range(0), 'a'); + } + } + + BENCHMARK_REGISTER_F(StringTemplateBenchmarkFixture, BM_FixedStringAssignFromSingleCharacter) + ->RangeMultiplier(2)->Range(8, 32); +} +#endif diff --git a/Code/Framework/AzCore/Tests/AZStd/TypeTraits.cpp b/Code/Framework/AzCore/Tests/AZStd/TypeTraits.cpp index da3aae1387..aeba048d69 100644 --- a/Code/Framework/AzCore/Tests/AZStd/TypeTraits.cpp +++ b/Code/Framework/AzCore/Tests/AZStd/TypeTraits.cpp @@ -8,6 +8,7 @@ #include "UserTypes.h" #include +#include #include #include #include diff --git a/Code/Framework/AzCore/Tests/AZStd/VectorAndArray.cpp b/Code/Framework/AzCore/Tests/AZStd/VectorAndArray.cpp index 47c3630091..851a7a8609 100644 --- a/Code/Framework/AzCore/Tests/AZStd/VectorAndArray.cpp +++ b/Code/Framework/AzCore/Tests/AZStd/VectorAndArray.cpp @@ -753,7 +753,7 @@ namespace UnitTest TEST_F(Arrays, FixedVectorCanCopyAndMoveWithDifferentCapacity) { - constexpr AZStd::fixed_vector sourceVector{ 1,2,3,4,5 }; + AZStd::fixed_vector sourceVector{ 1,2,3,4,5 }; AZStd::fixed_vector copyConstructVector{ sourceVector }; EXPECT_EQ(sourceVector, copyConstructVector); @@ -768,32 +768,63 @@ namespace UnitTest AZStd::fixed_vector moveAssignVector = AZStd::move(moveConstructVector); - constexpr AZStd::fixed_vector expectedVector{ 1,2,3,4,5,6 }; + AZStd::fixed_vector expectedVector{ 1,2,3,4,5,6 }; EXPECT_EQ(expectedVector, moveAssignVector); } TEST_F(Arrays, FixedVectorComparisonOperatorsSucceedAsExpected) { - constexpr AZStd::fixed_vector testVector{ 1,2,3,4,5 }; - constexpr AZStd::fixed_vector equalVector{ 1,2,3,4,5 }; - constexpr AZStd::fixed_vector notEqualVectorDifferentSize{ 1,2,3,4,5,6 }; - constexpr AZStd::fixed_vector lessVector{ 1,2,3,4,4 }; - constexpr AZStd::fixed_vector greaterVectorDifferentSize{ 1,2,3,4,5, 1 }; + AZStd::fixed_vector testVector{ 1,2,3,4,5 }; + AZStd::fixed_vector equalVector{ 1,2,3,4,5 }; + AZStd::fixed_vector notEqualVectorDifferentSize{ 1,2,3,4,5,6 }; + AZStd::fixed_vector lessVector{ 1,2,3,4,4 }; + AZStd::fixed_vector greaterVectorDifferentSize{ 1,2,3,4,5, 1 }; - static_assert(testVector == equalVector); - static_assert(testVector != notEqualVectorDifferentSize); - static_assert(testVector != lessVector); - static_assert(lessVector < testVector); - static_assert(lessVector < greaterVectorDifferentSize); - static_assert(lessVector <= lessVector); - static_assert(lessVector <= testVector); - static_assert(lessVector <= greaterVectorDifferentSize); - static_assert(testVector > lessVector); - static_assert(testVector > lessVector); - static_assert(notEqualVectorDifferentSize > testVector); - static_assert(testVector >= testVector); - static_assert(testVector >= lessVector); - static_assert(greaterVectorDifferentSize > lessVector); + EXPECT_EQ(testVector, equalVector); + EXPECT_NE(testVector, notEqualVectorDifferentSize); + EXPECT_NE(testVector, lessVector); + EXPECT_LT(lessVector, testVector); + EXPECT_LT(lessVector, greaterVectorDifferentSize); + EXPECT_LE(lessVector, lessVector); + EXPECT_LE(lessVector, testVector); + EXPECT_LE(lessVector, greaterVectorDifferentSize); + EXPECT_GT(testVector, lessVector); + EXPECT_GT(testVector, lessVector); + EXPECT_GT(notEqualVectorDifferentSize, testVector); + EXPECT_GE(testVector, testVector); + EXPECT_GE(testVector, lessVector); + EXPECT_GT(greaterVectorDifferentSize, lessVector); + } + + TEST_F(Arrays, FixedVectorCXX20Erase_Succeeds) + { + // Erase 'l' from the phrase "Hello" World" + auto eraseTest = [](AZStd::initializer_list testInit) + { + AZStd::fixed_vector testResult{ testInit }; + AZStd::erase(testResult, 'l'); + return testResult; + }({ 'H', 'e', 'l', 'l', 'o', 'W', 'o', 'r', 'l', 'd' }); + + constexpr AZStd::string_view expectedEraseString = "HeoWord"; + AZStd::string_view testEraseString{ eraseTest.begin(), eraseTest.end() }; + EXPECT_EQ(expectedEraseString, testEraseString); + + // Use erase_if to erase both 'H' and 'e' from the remaining eraseTest string + auto eraseIfTest = [](const AZStd::fixed_vector& testVector) + { + AZStd::fixed_vector testResult{ testVector }; + auto erasePredicate = [](char ch) + { + return ch == 'H' || ch == 'e'; + }; + AZStd::erase_if(testResult, erasePredicate); + return testResult; + }(testEraseString); + + constexpr AZStd::string_view expectedEraseIfString = "oWord"; + AZStd::string_view testEraseIfString{ eraseIfTest.begin(), eraseIfTest.end() }; + EXPECT_EQ(expectedEraseIfString, testEraseIfString); } TEST_F(Arrays, VectorSwap) diff --git a/Code/Framework/AzCore/Tests/Asset/AssetManagerLoadingTests.cpp b/Code/Framework/AzCore/Tests/Asset/AssetManagerLoadingTests.cpp index e33dbce9c1..c3be9b886a 100644 --- a/Code/Framework/AzCore/Tests/Asset/AssetManagerLoadingTests.cpp +++ b/Code/Framework/AzCore/Tests/Asset/AssetManagerLoadingTests.cpp @@ -26,6 +26,7 @@ #include #include #include +#include #include #include #include @@ -131,8 +132,8 @@ namespace UnitTest * This will test the aspect of the system where ObjectStreams and asset jobs loading dependent * assets will do the work in their own thread. */ - class AssetJobsFloodTest - : public BaseAssetManagerTest + + class AssetJobsFloodTest : public DisklessAssetManagerBase { public: TestAssetManager* m_testAssetManager{ nullptr }; @@ -183,15 +184,14 @@ namespace UnitTest void SetUp() override { - BaseAssetManagerTest::SetUp(); + DisklessAssetManagerBase::SetUp(); SetupTest(); } void TearDown() override { - TearDownTest(); AssetManager::Destroy(); - BaseAssetManagerTest::TearDown(); + DisklessAssetManagerBase::TearDown(); } void SetupAssets() @@ -257,9 +257,9 @@ namespace UnitTest AssetWithSerializedData ap2; AssetWithSerializedData ap3; - EXPECT_TRUE(AZ::Utils::SaveObjectToFile(GetTestFolderPath() + "TestAsset4.txt", AZ::DataStream::ST_XML, &ap1, m_serializeContext)); - EXPECT_TRUE(AZ::Utils::SaveObjectToFile(GetTestFolderPath() + "TestAsset5.txt", AZ::DataStream::ST_XML, &ap2, m_serializeContext)); - EXPECT_TRUE(AZ::Utils::SaveObjectToFile(GetTestFolderPath() + "TestAsset6.txt", AZ::DataStream::ST_XML, &ap3, m_serializeContext)); + EXPECT_TRUE(m_streamerWrapper->WriteMemoryFile("TestAsset4.txt", &ap1, m_serializeContext)); + EXPECT_TRUE(m_streamerWrapper->WriteMemoryFile("TestAsset5.txt", &ap2, m_serializeContext)); + EXPECT_TRUE(m_streamerWrapper->WriteMemoryFile("TestAsset6.txt", &ap3, m_serializeContext)); AssetWithAssetReference assetWithPreload1; AssetWithAssetReference assetWithPreload2; @@ -273,11 +273,11 @@ namespace UnitTest noLoadAsset.m_asset = m_testAssetManager->CreateAsset(MyAsset2Id, AssetLoadBehavior::NoLoad); EXPECT_EQ(m_assetHandlerAndCatalog->m_numCreations, 4); - EXPECT_TRUE(AZ::Utils::SaveObjectToFile(GetTestFolderPath() + "TestAsset1.txt", AZ::DataStream::ST_XML, &assetWithPreload1, m_serializeContext)); - EXPECT_TRUE(AZ::Utils::SaveObjectToFile(GetTestFolderPath() + "TestAsset2.txt", AZ::DataStream::ST_XML, &assetWithPreload2, m_serializeContext)); - EXPECT_TRUE(AZ::Utils::SaveObjectToFile(GetTestFolderPath() + "TestAsset3.txt", AZ::DataStream::ST_XML, &assetWithPreload3, m_serializeContext)); - EXPECT_TRUE(AZ::Utils::SaveObjectToFile(GetTestFolderPath() + "DelayLoadAsset.txt", AZ::DataStream::ST_XML, &delayedAsset, m_serializeContext)); - EXPECT_TRUE(AZ::Utils::SaveObjectToFile(GetTestFolderPath() + "NoLoadAsset.txt", AZ::DataStream::ST_XML, &noLoadAsset, m_serializeContext)); + EXPECT_TRUE(m_streamerWrapper->WriteMemoryFile("TestAsset1.txt", &assetWithPreload1, m_serializeContext)); + EXPECT_TRUE(m_streamerWrapper->WriteMemoryFile("TestAsset2.txt", &assetWithPreload2, m_serializeContext)); + EXPECT_TRUE(m_streamerWrapper->WriteMemoryFile("TestAsset3.txt", &assetWithPreload3, m_serializeContext)); + EXPECT_TRUE(m_streamerWrapper->WriteMemoryFile("DelayLoadAsset.txt", &delayedAsset, m_serializeContext)); + EXPECT_TRUE(m_streamerWrapper->WriteMemoryFile("NoLoadAsset.txt", &noLoadAsset, m_serializeContext)); AssetWithQueueAndPreLoadReferences preLoadRoot; AssetWithQueueAndPreLoadReferences preLoadA; @@ -297,16 +297,16 @@ namespace UnitTest preLoadBrokenA.m_preLoad = m_testAssetManager->CreateAsset(PreloadBrokenDepBId, AssetLoadBehavior::PreLoad); preLoadBrokenB.m_preLoad = m_testAssetManager->CreateAsset(PreloadAssetNoDataId, AssetLoadBehavior::PreLoad); - EXPECT_TRUE(AZ::Utils::SaveObjectToFile(GetTestFolderPath() + "PreLoadRoot.txt", AZ::DataStream::ST_XML, &preLoadRoot, m_serializeContext)); - EXPECT_TRUE(AZ::Utils::SaveObjectToFile(GetTestFolderPath() + "PreLoadA.txt", AZ::DataStream::ST_XML, &preLoadA, m_serializeContext)); - EXPECT_TRUE(AZ::Utils::SaveObjectToFile(GetTestFolderPath() + "PreLoadB.txt", AZ::DataStream::ST_XML, &noRefs, m_serializeContext)); - EXPECT_TRUE(AZ::Utils::SaveObjectToFile(GetTestFolderPath() + "PreLoadC.txt", AZ::DataStream::ST_XML, &noRefs, m_serializeContext)); - EXPECT_TRUE(AZ::Utils::SaveObjectToFile(GetTestFolderPath() + "QueueLoadA.txt", AZ::DataStream::ST_XML, &queueLoadA, m_serializeContext)); - EXPECT_TRUE(AZ::Utils::SaveObjectToFile(GetTestFolderPath() + "QueueLoadB.txt", AZ::DataStream::ST_XML, &noRefs, m_serializeContext)); - EXPECT_TRUE(AZ::Utils::SaveObjectToFile(GetTestFolderPath() + "QueueLoadC.txt", AZ::DataStream::ST_XML, &noRefs, m_serializeContext)); - EXPECT_TRUE(AZ::Utils::SaveObjectToFile(GetTestFolderPath() + "PreLoadBrokenA.txt", AZ::DataStream::ST_XML, &preLoadBrokenA, m_serializeContext)); - EXPECT_TRUE(AZ::Utils::SaveObjectToFile(GetTestFolderPath() + "PreLoadBrokenB.txt", AZ::DataStream::ST_XML, &preLoadBrokenB, m_serializeContext)); - EXPECT_TRUE(AZ::Utils::SaveObjectToFile(GetTestFolderPath() + "PreLoadNoData.txt", AZ::DataStream::ST_XML, &noRefs, m_serializeContext)); + EXPECT_TRUE(m_streamerWrapper->WriteMemoryFile("PreLoadRoot.txt", &preLoadRoot, m_serializeContext)); + EXPECT_TRUE(m_streamerWrapper->WriteMemoryFile("PreLoadA.txt", &preLoadA, m_serializeContext)); + EXPECT_TRUE(m_streamerWrapper->WriteMemoryFile("PreLoadB.txt", &noRefs, m_serializeContext)); + EXPECT_TRUE(m_streamerWrapper->WriteMemoryFile("PreLoadC.txt", &noRefs, m_serializeContext)); + EXPECT_TRUE(m_streamerWrapper->WriteMemoryFile("QueueLoadA.txt", &queueLoadA, m_serializeContext)); + EXPECT_TRUE(m_streamerWrapper->WriteMemoryFile("QueueLoadB.txt", &noRefs, m_serializeContext)); + EXPECT_TRUE(m_streamerWrapper->WriteMemoryFile("QueueLoadC.txt", &noRefs, m_serializeContext)); + EXPECT_TRUE(m_streamerWrapper->WriteMemoryFile("PreLoadBrokenA.txt", &preLoadBrokenA, m_serializeContext)); + EXPECT_TRUE(m_streamerWrapper->WriteMemoryFile("PreLoadBrokenB.txt", &preLoadBrokenB, m_serializeContext)); + EXPECT_TRUE(m_streamerWrapper->WriteMemoryFile("PreLoadNoData.txt", &noRefs, m_serializeContext)); AssetWithQueueAndPreLoadReferences circularA; AssetWithQueueAndPreLoadReferences circularB; @@ -318,43 +318,15 @@ namespace UnitTest circularC.m_preLoad = m_testAssetManager->CreateAsset(CircularBId, AssetLoadBehavior::PreLoad); circularD.m_preLoad = circularC.m_preLoad; - EXPECT_TRUE(AZ::Utils::SaveObjectToFile(GetTestFolderPath() + "CircularA.txt", AZ::DataStream::ST_XML, &circularA, m_serializeContext)); - EXPECT_TRUE(AZ::Utils::SaveObjectToFile(GetTestFolderPath() + "CircularB.txt", AZ::DataStream::ST_XML, &circularB, m_serializeContext)); - EXPECT_TRUE(AZ::Utils::SaveObjectToFile(GetTestFolderPath() + "CircularC.txt", AZ::DataStream::ST_XML, &circularC, m_serializeContext)); - EXPECT_TRUE(AZ::Utils::SaveObjectToFile(GetTestFolderPath() + "CircularD.txt", AZ::DataStream::ST_XML, &circularD, m_serializeContext)); + EXPECT_TRUE(m_streamerWrapper->WriteMemoryFile("CircularA.txt", &circularA, m_serializeContext)); + EXPECT_TRUE(m_streamerWrapper->WriteMemoryFile("CircularB.txt", &circularB, m_serializeContext)); + EXPECT_TRUE(m_streamerWrapper->WriteMemoryFile("CircularC.txt", &circularC, m_serializeContext)); + EXPECT_TRUE(m_streamerWrapper->WriteMemoryFile("CircularD.txt", &circularD, m_serializeContext)); + m_assetHandlerAndCatalog->m_numCreations = 0; } } - void TearDownTest() - { - DeleteAssetFromDisk(GetTestFolderPath() + "TestAsset4.txt"); - DeleteAssetFromDisk(GetTestFolderPath() + "TestAsset5.txt"); - DeleteAssetFromDisk(GetTestFolderPath() + "TestAsset6.txt"); - - DeleteAssetFromDisk(GetTestFolderPath() + "TestAsset1.txt"); - DeleteAssetFromDisk(GetTestFolderPath() + "TestAsset2.txt"); - DeleteAssetFromDisk(GetTestFolderPath() + "TestAsset3.txt"); - DeleteAssetFromDisk(GetTestFolderPath() + "DelayLoadAsset.txt"); - DeleteAssetFromDisk(GetTestFolderPath() + "NoLoadAsset.txt"); - - DeleteAssetFromDisk(GetTestFolderPath() + "PreLoadRoot.txt"); - DeleteAssetFromDisk(GetTestFolderPath() + "PreLoadA.txt"); - DeleteAssetFromDisk(GetTestFolderPath() + "PreLoadB.txt"); - DeleteAssetFromDisk(GetTestFolderPath() + "PreLoadC.txt"); - DeleteAssetFromDisk(GetTestFolderPath() + "QueueLoadA.txt"); - DeleteAssetFromDisk(GetTestFolderPath() + "QueueLoadB.txt"); - DeleteAssetFromDisk(GetTestFolderPath() + "QueueLoadC.txt"); - DeleteAssetFromDisk(GetTestFolderPath() + "PreLoadBrokenA.txt"); - DeleteAssetFromDisk(GetTestFolderPath() + "PreLoadBrokenB.txt"); - DeleteAssetFromDisk(GetTestFolderPath() + "PreLoadNoData.txt"); - - DeleteAssetFromDisk(GetTestFolderPath() + "CircularA.txt"); - DeleteAssetFromDisk(GetTestFolderPath() + "CircularB.txt"); - DeleteAssetFromDisk(GetTestFolderPath() + "CircularC.txt"); - DeleteAssetFromDisk(GetTestFolderPath() + "CircularD.txt"); - } - void CheckFinishedCreationsAndDestructions() { // Make sure asset jobs have finished before validating the number of destroyed assets, because it's possible that the asset job @@ -367,7 +339,7 @@ namespace UnitTest }; static constexpr AZStd::chrono::seconds MaxDispatchTimeoutSeconds = BaseAssetManagerTest::DefaultTimeoutSeconds * 12; - + template bool DispatchEventsUntilCondition(AZ::Data::AssetManager& assetManager, Pred&& conditionPredicate, AZStd::chrono::seconds logIntervalSeconds = BaseAssetManagerTest::DefaultTimeoutSeconds, @@ -609,23 +581,8 @@ namespace UnitTest EXPECT_EQ(baseStatus, expected_base_status); } - struct DebugListener : AZ::Interface::Registrar - { - void AssetStatusUpdate(AZ::Data::AssetId id, AZ::Data::AssetData::AssetStatus status) override - { - AZ::Debug::Trace::Output( - "", AZStd::string::format("Status %s - %d\n", id.ToString().c_str(), static_cast(status)).c_str()); - } - void ReleaseAsset(AZ::Data::AssetId id) override - { - AZ::Debug::Trace::Output( - "", AZStd::string::format("Release %s\n", id.ToString().c_str()).c_str()); - } - }; - TEST_F(AssetJobsFloodTest, RapidAcquireAndRelease) { - DebugListener listener; auto assetUuids = { MyAsset1Id, MyAsset2Id, @@ -652,11 +609,11 @@ namespace UnitTest threads.emplace_back([this, &threadCount, &cv, assetUuid]() { bool checkLoaded = true; - for (int i = 0; i < 5000; i++) + for (int i = 0; i < 1000; i++) { Asset asset1 = m_testAssetManager->GetAsset(assetUuid, azrtti_typeid(), AZ::Data::AssetLoadBehavior::PreLoad); - + if (checkLoaded) { asset1.BlockUntilLoadComplete(); @@ -678,7 +635,7 @@ namespace UnitTest while (threadCount > 0 && !timedOut) { AZStd::unique_lock lock(mutex); - timedOut = (AZStd::cv_status::timeout == cv.wait_until(lock, AZStd::chrono::system_clock::now() + DefaultTimeoutSeconds * 20000)); + timedOut = (AZStd::cv_status::timeout == cv.wait_until(lock, AZStd::chrono::system_clock::now() + DefaultTimeoutSeconds)); } ASSERT_EQ(threadCount, 0) << "Thread count is non-zero, a thread has likely deadlocked. Test will not shut down cleanly."; @@ -729,8 +686,8 @@ namespace UnitTest AssetWithSerializedData ap; - EXPECT_TRUE(AZ::Utils::SaveObjectToFile(GetTestFolderPath() + "a.txt", AZ::DataStream::ST_XML, &ap, m_serializeContext)); - EXPECT_TRUE(AZ::Utils::SaveObjectToFile(GetTestFolderPath() + "b.txt", AZ::DataStream::ST_XML, &ap, m_serializeContext)); + EXPECT_TRUE(m_streamerWrapper->WriteMemoryFile("a.txt", &ap, m_serializeContext)); + EXPECT_TRUE(m_streamerWrapper->WriteMemoryFile("b.txt", &ap, m_serializeContext)); } auto& assetManager = AssetManager::Instance(); @@ -793,7 +750,7 @@ namespace UnitTest * Verify that loads without using the Asset Container still work correctly */ class AssetContainerDisableTest - : public BaseAssetManagerTest + : public DisklessAssetManagerBase { public: static inline const AZ::Uuid MyAsset1Id{ "{5B29FE2B-6B41-48C9-826A-C723951B0560}" }; @@ -812,7 +769,7 @@ namespace UnitTest void SetUp() override { - BaseAssetManagerTest::SetUp(); + DisklessAssetManagerBase::SetUp(); SetupTest(); } @@ -822,7 +779,7 @@ namespace UnitTest AssetManager::Instance().UnregisterHandler(m_assetHandlerAndCatalog); delete m_assetHandlerAndCatalog; AssetManager::Destroy(); - BaseAssetManagerTest::TearDown(); + DisklessAssetManagerBase::TearDown(); } void SetupAssets() @@ -864,9 +821,9 @@ namespace UnitTest AssetWithSerializedData ap2; AssetWithSerializedData ap3; - EXPECT_TRUE(AZ::Utils::SaveObjectToFile(GetTestFolderPath() + "TestAsset4.txt", AZ::DataStream::ST_XML, &ap1, m_serializeContext)); - EXPECT_TRUE(AZ::Utils::SaveObjectToFile(GetTestFolderPath() + "TestAsset5.txt", AZ::DataStream::ST_XML, &ap2, m_serializeContext)); - EXPECT_TRUE(AZ::Utils::SaveObjectToFile(GetTestFolderPath() + "TestAsset6.txt", AZ::DataStream::ST_XML, &ap3, m_serializeContext)); + EXPECT_TRUE(m_streamerWrapper->WriteMemoryFile("TestAsset4.txt", &ap1, m_serializeContext)); + EXPECT_TRUE(m_streamerWrapper->WriteMemoryFile("TestAsset5.txt", &ap2, m_serializeContext)); + EXPECT_TRUE(m_streamerWrapper->WriteMemoryFile("TestAsset6.txt", &ap3, m_serializeContext)); AssetWithAssetReference assetWithPreload1; AssetWithAssetReference assetWithPreload2; @@ -877,9 +834,9 @@ namespace UnitTest assetWithPreload3.m_asset = m_testAssetManager->CreateAsset(MyAsset6Id, AssetLoadBehavior::PreLoad); EXPECT_EQ(m_assetHandlerAndCatalog->m_numCreations, 3); - EXPECT_TRUE(AZ::Utils::SaveObjectToFile(GetTestFolderPath() + "TestAsset1.txt", AZ::DataStream::ST_XML, &assetWithPreload1, m_serializeContext)); - EXPECT_TRUE(AZ::Utils::SaveObjectToFile(GetTestFolderPath() + "TestAsset2.txt", AZ::DataStream::ST_XML, &assetWithPreload2, m_serializeContext)); - EXPECT_TRUE(AZ::Utils::SaveObjectToFile(GetTestFolderPath() + "TestAsset3.txt", AZ::DataStream::ST_XML, &assetWithPreload3, m_serializeContext)); + EXPECT_TRUE(m_streamerWrapper->WriteMemoryFile("TestAsset1.txt", &assetWithPreload1, m_serializeContext)); + EXPECT_TRUE(m_streamerWrapper->WriteMemoryFile("TestAsset2.txt", &assetWithPreload2, m_serializeContext)); + EXPECT_TRUE(m_streamerWrapper->WriteMemoryFile("TestAsset3.txt", &assetWithPreload3, m_serializeContext)); m_assetHandlerAndCatalog->m_numCreations = 0; } @@ -957,11 +914,11 @@ namespace UnitTest m_testAssetManager->SetParallelDependentLoadingEnabled(true); } -#if AZ_TRAIT_DISABLE_FAILED_ASSET_MANAGER_TESTS || AZ_TRAIT_DISABLE_FAILED_ASSET_LOAD_TESTS +#if AZ_TRAIT_DISABLE_FAILED_ASSET_MANAGER_TESTS TEST_F(AssetJobsFloodTest, DISABLED_LoadTest_SameAsset_DifferentFilters) #else TEST_F(AssetJobsFloodTest, LoadTest_SameAsset_DifferentFilters) -#endif // AZ_TRAIT_DISABLE_FAILED_ASSET_MANAGER_TESTS || AZ_TRAIT_DISABLE_FAILED_ASSET_LOAD_TESTS +#endif // AZ_TRAIT_DISABLE_FAILED_ASSET_MANAGER_TESTS { m_assetHandlerAndCatalog->AssetCatalogRequestBus::Handler::BusConnect(); @@ -1190,7 +1147,7 @@ namespace UnitTest #if AZ_TRAIT_DISABLE_FAILED_ASSET_MANAGER_TESTS TEST_F(AssetJobsFloodTest, DISABLED_ContainerFilterTest_ContainersWithAndWithoutFiltering_Success) #else - TEST_F(AssetJobsFloodTest, DISABLED_ContainerFilterTest_ContainersWithAndWithoutFiltering_Success) + TEST_F(AssetJobsFloodTest, ContainerFilterTest_ContainersWithAndWithoutFiltering_Success) #endif // !AZ_TRAIT_DISABLE_FAILED_ASSET_MANAGER_TESTS { m_assetHandlerAndCatalog->AssetCatalogRequestBus::Handler::BusConnect(); @@ -1306,11 +1263,11 @@ namespace UnitTest m_assetHandlerAndCatalog->AssetCatalogRequestBus::Handler::BusDisconnect(); } -#if AZ_TRAIT_DISABLE_FAILED_ASSET_MANAGER_TESTS || AZ_TRAIT_DISABLE_FAILED_ASSET_LOAD_TESTS +#if AZ_TRAIT_DISABLE_FAILED_ASSET_MANAGER_TESTS TEST_F(AssetJobsFloodTest, DISABLED_AssetWithNoLoadReference_LoadDependencies_NoLoadNotLoaded) #else TEST_F(AssetJobsFloodTest, AssetWithNoLoadReference_LoadDependencies_NoLoadNotLoaded) -#endif // AZ_TRAIT_DISABLE_FAILED_ASSET_MANAGER_TESTS || AZ_TRAIT_DISABLE_FAILED_ASSET_LOAD_TESTS +#endif // AZ_TRAIT_DISABLE_FAILED_ASSET_MANAGER_TESTS { m_assetHandlerAndCatalog->AssetCatalogRequestBus::Handler::BusConnect(); // Setup has already created/destroyed assets @@ -1347,11 +1304,11 @@ namespace UnitTest m_assetHandlerAndCatalog->AssetCatalogRequestBus::Handler::BusDisconnect(); } -#if AZ_TRAIT_DISABLE_FAILED_ASSET_MANAGER_TESTS || AZ_TRAIT_DISABLE_FAILED_ASSET_LOAD_TESTS +#if AZ_TRAIT_DISABLE_FAILED_ASSET_MANAGER_TESTS TEST_F(AssetJobsFloodTest, DISABLED_AssetWithNoLoadReference_LoadContainerDependencies_LoadAllLoadsNoLoad) #else TEST_F(AssetJobsFloodTest, AssetWithNoLoadReference_LoadContainerDependencies_LoadAllLoadsNoLoad) -#endif // AZ_TRAIT_DISABLE_FAILED_ASSET_MANAGER_TESTS || AZ_TRAIT_DISABLE_FAILED_ASSET_LOAD_TESTS +#endif // AZ_TRAIT_DISABLE_FAILED_ASSET_MANAGER_TESTS { m_assetHandlerAndCatalog->AssetCatalogRequestBus::Handler::BusConnect(); // Setup has already created/destroyed assets @@ -1386,11 +1343,11 @@ namespace UnitTest m_assetHandlerAndCatalog->AssetCatalogRequestBus::Handler::BusDisconnect(); } -#if AZ_TRAIT_DISABLE_FAILED_ASSET_MANAGER_TESTS || AZ_TRAIT_DISABLE_FAILED_ASSET_LOAD_TESTS +#if AZ_TRAIT_DISABLE_FAILED_ASSET_MANAGER_TESTS TEST_F(AssetJobsFloodTest, DISABLED_AssetWithNoLoadReference_LoadDependencies_BehaviorObeyed) #else TEST_F(AssetJobsFloodTest, AssetWithNoLoadReference_LoadDependencies_BehaviorObeyed) -#endif // AZ_TRAIT_DISABLE_FAILED_ASSET_MANAGER_TESTS || AZ_TRAIT_DISABLE_FAILED_ASSET_LOAD_TESTS +#endif // AZ_TRAIT_DISABLE_FAILED_ASSET_MANAGER_TESTS { m_assetHandlerAndCatalog->AssetCatalogRequestBus::Handler::BusConnect(); // Setup has already created/destroyed assets @@ -2029,11 +1986,12 @@ namespace UnitTest CheckFinishedCreationsAndDestructions(); m_assetHandlerAndCatalog->AssetCatalogRequestBus::Handler::BusDisconnect(); } + /** * Run multiple threads that get and release assets simultaneously to test AssetManager's thread safety */ class AssetJobsMultithreadedTest - : public BaseAssetManagerTest + : public DisklessAssetManagerBase { public: static inline const AZ::Uuid MyAsset1Id{ "{5B29FE2B-6B41-48C9-826A-C723951B0560}" }; @@ -2043,6 +2001,7 @@ namespace UnitTest static inline const AZ::Uuid MyAsset5Id{ "{D9CDAB04-D206-431E-BDC0-1DD615D56197}" }; static inline const AZ::Uuid MyAsset6Id{ "{B2F139C3-5032-4B52-ADCA-D52A8F88E043}" }; + // Initialize the Job Manager with 2 threads for the Asset Manager to use. size_t GetNumJobManagerThreads() const override { return 2; } @@ -2093,9 +2052,9 @@ namespace UnitTest AssetWithSerializedData ap2; AssetWithSerializedData ap3; - EXPECT_TRUE(AZ::Utils::SaveObjectToFile(GetTestFolderPath() + "TestAsset4.txt", AZ::DataStream::ST_XML, &ap1, &context)); - EXPECT_TRUE(AZ::Utils::SaveObjectToFile(GetTestFolderPath() + "TestAsset5.txt", AZ::DataStream::ST_XML, &ap2, &context)); - EXPECT_TRUE(AZ::Utils::SaveObjectToFile(GetTestFolderPath() + "TestAsset6.txt", AZ::DataStream::ST_XML, &ap3, &context)); + EXPECT_TRUE(m_streamerWrapper->WriteMemoryFile("TestAsset4.txt", &ap1, &context)); + EXPECT_TRUE(m_streamerWrapper->WriteMemoryFile("TestAsset5.txt", &ap2, &context)); + EXPECT_TRUE(m_streamerWrapper->WriteMemoryFile("TestAsset6.txt", &ap3, &context)); AssetWithAssetReference assetWithPreload1; AssetWithAssetReference assetWithPreload2; @@ -2104,9 +2063,9 @@ namespace UnitTest assetWithPreload2.m_asset = AssetManager::Instance().CreateAsset(MyAsset5Id, AssetLoadBehavior::PreLoad); assetWithPreload3.m_asset = AssetManager::Instance().CreateAsset(MyAsset6Id, AssetLoadBehavior::PreLoad); - EXPECT_TRUE(AZ::Utils::SaveObjectToFile(GetTestFolderPath() + "TestAsset1.txt", AZ::DataStream::ST_XML, &assetWithPreload1, &context)); - EXPECT_TRUE(AZ::Utils::SaveObjectToFile(GetTestFolderPath() + "TestAsset2.txt", AZ::DataStream::ST_XML, &assetWithPreload2, &context)); - EXPECT_TRUE(AZ::Utils::SaveObjectToFile(GetTestFolderPath() + "TestAsset3.txt", AZ::DataStream::ST_XML, &assetWithPreload3, &context)); + EXPECT_TRUE(m_streamerWrapper->WriteMemoryFile("TestAsset1.txt", &assetWithPreload1, &context)); + EXPECT_TRUE(m_streamerWrapper->WriteMemoryFile("TestAsset2.txt", &assetWithPreload2, &context)); + EXPECT_TRUE(m_streamerWrapper->WriteMemoryFile("TestAsset3.txt", &assetWithPreload3, &context)); EXPECT_TRUE(assetHandlerAndCatalog->m_numCreations == 3); assetHandlerAndCatalog->m_numCreations = 0; @@ -2206,22 +2165,22 @@ namespace UnitTest // A will be saved to disk with MyAsset1Id AssetWithAssetReference a; a.m_asset = AssetManager::Instance().CreateAsset(MyAsset2Id); - EXPECT_TRUE(AZ::Utils::SaveObjectToFile(GetTestFolderPath() + "TestAsset1.txt", AZ::DataStream::ST_XML, &a, &context)); + EXPECT_TRUE(m_streamerWrapper->WriteMemoryFile("TestAsset1.txt", &a, &context)); AssetWithAssetReference b; b.m_asset = AssetManager::Instance().CreateAsset(MyAsset3Id); - EXPECT_TRUE(AZ::Utils::SaveObjectToFile(GetTestFolderPath() + "TestAsset2.txt", AZ::DataStream::ST_XML, &b, &context)); + EXPECT_TRUE(m_streamerWrapper->WriteMemoryFile("TestAsset2.txt", &b, &context)); AssetWithAssetReference c; c.m_asset = AssetManager::Instance().CreateAsset(MyAsset4Id); - EXPECT_TRUE(AZ::Utils::SaveObjectToFile(GetTestFolderPath() + "TestAsset3.txt", AZ::DataStream::ST_XML, &c, &context)); + EXPECT_TRUE(m_streamerWrapper->WriteMemoryFile("TestAsset3.txt", &c, &context)); AssetWithAssetReference d; d.m_asset = AssetManager::Instance().CreateAsset(MyAsset5Id); - EXPECT_TRUE(AZ::Utils::SaveObjectToFile(GetTestFolderPath() + "TestAsset4.txt", AZ::DataStream::ST_XML, &d, &context)); + EXPECT_TRUE(m_streamerWrapper->WriteMemoryFile("TestAsset4.txt", &d, &context)); AssetWithAssetReference e; e.m_asset = AssetManager::Instance().CreateAsset(MyAsset6Id); - EXPECT_TRUE(AZ::Utils::SaveObjectToFile(GetTestFolderPath() + "TestAsset5.txt", AZ::DataStream::ST_XML, &e, &context)); + EXPECT_TRUE(m_streamerWrapper->WriteMemoryFile("TestAsset5.txt", &e, &context)); AssetWithAssetReference f; f.m_asset = AssetManager::Instance().CreateAsset(MyAsset1Id); // refer back to asset1 - EXPECT_TRUE(AZ::Utils::SaveObjectToFile(GetTestFolderPath() + "TestAsset6.txt", AZ::DataStream::ST_XML, &f, &context)); + EXPECT_TRUE(m_streamerWrapper->WriteMemoryFile("TestAsset6.txt", &f, &context)); EXPECT_TRUE(assetHandlerAndCatalog->m_numCreations == 6); assetHandlerAndCatalog->m_numCreations = 0; @@ -2297,6 +2256,45 @@ namespace UnitTest AssetManager::Destroy(); } + struct MockAssetContainer : AssetContainer + { + MockAssetContainer(Asset assetData, const AssetLoadParameters& loadParams) + { + // Copying the code in the original constructor, we can't call that constructor because it will not invoke our virtual method + m_rootAsset = AssetInternal::WeakAsset(assetData); + m_containerAssetId = m_rootAsset.GetId(); + + AddDependentAssets(assetData, loadParams); + } + + protected: + AZStd::vector>> CreateAndQueueDependentAssets( + const AZStd::vector& dependencyInfoList, const AssetLoadParameters& loadParamsCopyWithNoLoadingFilter) override + { + auto result = AssetContainer::CreateAndQueueDependentAssets(dependencyInfoList, loadParamsCopyWithNoLoadingFilter); + + // Sleep for a long enough time to allow asset loads to complete and start triggering AssetReady events + // This forces the race condition to occur + AZStd::this_thread::sleep_for(AZStd::chrono::milliseconds(500)); + + return result; + } + }; + + struct MockAssetManager : AssetManager + { + explicit MockAssetManager(const Descriptor& desc) + : AssetManager(desc) + { + } + + protected: + AZStd::shared_ptr CreateAssetContainer(Asset asset, const AssetLoadParameters& loadParams) const override + { + return AZStd::shared_ptr(aznew MockAssetContainer(asset, loadParams)); + } + }; + void ParallelDeepAssetReferences() { SerializeContext context; @@ -2304,7 +2302,7 @@ namespace UnitTest AssetWithAssetReference::Reflect(context); AssetManager::Descriptor desc; - AssetManager::Create(desc); + AssetManager::SetInstance(aznew MockAssetManager(desc)); auto& db = AssetManager::Instance(); @@ -2323,26 +2321,26 @@ namespace UnitTest // AssetD is MYASSETD AssetWithSerializedData d; d.m_data = 42; - EXPECT_TRUE(AZ::Utils::SaveObjectToFile(GetTestFolderPath() + "TestAsset4.txt", AZ::DataStream::ST_XML, &d, &context)); + EXPECT_TRUE(m_streamerWrapper->WriteMemoryFile("TestAsset4.txt", &d, &context)); // AssetC is MYASSETC AssetWithAssetReference c; - c.m_asset = AssetManager::Instance().CreateAsset(AssetId(MyAssetDId)); // point at D - EXPECT_TRUE(AZ::Utils::SaveObjectToFile(GetTestFolderPath() + "TestAsset3.txt", AZ::DataStream::ST_XML, &c, &context)); + c.m_asset = db.CreateAsset(AssetId(MyAssetDId)); // point at D + EXPECT_TRUE(m_streamerWrapper->WriteMemoryFile("TestAsset3.txt", &c, &context)); // AssetB is MYASSETB AssetWithAssetReference b; - b.m_asset = AssetManager::Instance().CreateAsset(AssetId(MyAssetCId)); // point at C - EXPECT_TRUE(AZ::Utils::SaveObjectToFile(GetTestFolderPath() + "TestAsset2.txt", AZ::DataStream::ST_XML, &b, &context)); + b.m_asset = db.CreateAsset(AssetId(MyAssetCId)); // point at C + EXPECT_TRUE(m_streamerWrapper->WriteMemoryFile("TestAsset2.txt", &b, &context)); // AssetA will be written to disk as MYASSETA AssetWithAssetReference a; - a.m_asset = AssetManager::Instance().CreateAsset(AssetId(MyAssetBId)); // point at B - EXPECT_TRUE(AZ::Utils::SaveObjectToFile(GetTestFolderPath() + "TestAsset1.txt", AZ::DataStream::ST_XML, &a, &context)); + a.m_asset = db.CreateAsset(AssetId(MyAssetBId)); // point at B + EXPECT_TRUE(m_streamerWrapper->WriteMemoryFile("TestAsset1.txt", &a, &context)); } - const size_t numThreads = 4; - AZStd::atomic_int threadCount(numThreads); + constexpr size_t NumThreads = 4; + AZStd::atomic_int threadCount(NumThreads); AZStd::condition_variable cv; AZStd::vector threads; AZStd::atomic_bool keepDispatching(true); @@ -2357,7 +2355,7 @@ namespace UnitTest AZStd::thread dispatchThread(dispatch); - for (size_t threadIdx = 0; threadIdx < numThreads; ++threadIdx) + for (size_t threadIdx = 0; threadIdx < NumThreads; ++threadIdx) { threads.emplace_back([&threadCount, &db, &cv]() { @@ -2545,15 +2543,14 @@ namespace UnitTest #if AZ_TRAIT_DISABLE_FAILED_ASSET_MANAGER_TESTS TEST_F(AssetJobsMultithreadedTest, DISABLED_ParallelDeepAssetReferences) #else - // temporarily disabled until sporadic failures can be root caused - TEST_F(AssetJobsMultithreadedTest, DISABLED_ParallelDeepAssetReferences) + TEST_F(AssetJobsMultithreadedTest, ParallelDeepAssetReferences) #endif // AZ_TRAIT_DISABLE_FAILED_ASSET_MANAGER_TESTS { ParallelDeepAssetReferences(); } class AssetManagerTests - : public BaseAssetManagerTest + : public DisklessAssetManagerBase { protected: static inline const AZ::Uuid MyAsset1Id{ "{5B29FE2B-6B41-48C9-826A-C723951B0560}" }; @@ -2568,7 +2565,7 @@ namespace UnitTest void SetUp() override { - BaseAssetManagerTest::SetUp(); + DisklessAssetManagerBase::SetUp(); m_console = AZStd::make_unique(); AZ::Interface::Register(m_console.get()); @@ -2607,7 +2604,7 @@ namespace UnitTest AssetManager::Destroy(); AZ::Interface::Unregister(m_console.get()); m_console = nullptr; - BaseAssetManagerTest::TearDown(); + DisklessAssetManagerBase::TearDown(); } }; @@ -2958,7 +2955,7 @@ namespace UnitTest * the middle of loading. The tests help ensure that assets can't get stuck in perpetual loading states. **/ class AssetManagerClearAssetReferenceTests - : public BaseAssetManagerTest + : public DisklessAssetManagerBase { protected: static inline const AZ::Uuid RootAssetId{ "{AB13F568-C676-41FE-A7E9-341F71A78104}" }; @@ -2977,7 +2974,7 @@ namespace UnitTest void SetUp() override { - BaseAssetManagerTest::SetUp(); + DisklessAssetManagerBase::SetUp(); // create the database AssetManager::Descriptor desc; @@ -3015,21 +3012,18 @@ namespace UnitTest // Create and save the dependent asset first, so that we can get a reference to it. AssetWithSerializedData dependentBlockingAsset; - EXPECT_TRUE(AZ::Utils::SaveObjectToFile(GetTestFolderPath() + "DependentPreloadBlockingAsset.txt", - AZ::DataStream::ST_XML, &dependentBlockingAsset, m_serializeContext)); + EXPECT_TRUE(m_streamerWrapper->WriteMemoryFile("DependentPreloadBlockingAsset.txt", &dependentBlockingAsset, m_serializeContext)); AssetWithAssetReference dependentAsset; dependentAsset.m_asset = AssetManager::Instance().CreateAsset( NestedDependentPreloadBlockingAssetId, AssetLoadBehavior::PreLoad); - EXPECT_TRUE(AZ::Utils::SaveObjectToFile(GetTestFolderPath() + "DependentPreloadAsset.txt", - AZ::DataStream::ST_XML, &dependentAsset, m_serializeContext)); + EXPECT_TRUE(m_streamerWrapper->WriteMemoryFile("DependentPreloadAsset.txt", &dependentAsset, m_serializeContext)); // Create and save the top-level asset. AssetWithAssetReference rootAsset; rootAsset.m_asset = AssetManager::Instance().CreateAsset( DependentPreloadAssetId, AssetLoadBehavior::PreLoad); - EXPECT_TRUE(AZ::Utils::SaveObjectToFile(GetTestFolderPath() + "RootAsset.txt", - AZ::DataStream::ST_XML, &rootAsset, m_serializeContext)); + EXPECT_TRUE(m_streamerWrapper->WriteMemoryFile("RootAsset.txt", &rootAsset, m_serializeContext)); } void TearDown() override @@ -3041,7 +3035,7 @@ namespace UnitTest delete m_assetHandlerAndCatalog; AssetManager::Destroy(); - BaseAssetManagerTest::TearDown(); + DisklessAssetManagerBase::TearDown(); } }; diff --git a/Code/Framework/AzCore/Tests/Asset/BaseAssetManagerTest.cpp b/Code/Framework/AzCore/Tests/Asset/BaseAssetManagerTest.cpp index 4dbd3c0e1e..532cb0a1d8 100644 --- a/Code/Framework/AzCore/Tests/Asset/BaseAssetManagerTest.cpp +++ b/Code/Framework/AzCore/Tests/Asset/BaseAssetManagerTest.cpp @@ -67,7 +67,10 @@ namespace UnitTest { SerializeContextFixture::SetUp(); + SuppressTraceOutput(false); + AZ::JobManagerDesc jobDesc; + AZ::JobManagerThreadDesc threadDesc; for (size_t threadCount = 0; threadCount < GetNumJobManagerThreads(); threadCount++) { @@ -111,9 +114,21 @@ namespace UnitTest delete m_jobContext; delete m_jobManager; + // Reset back to default suppression settings to avoid affecting other tests + SuppressTraceOutput(true); + SerializeContextFixture::TearDown(); } + void BaseAssetManagerTest::SuppressTraceOutput(bool suppress) + { + UnitTest::TestRunner::Instance().m_suppressAsserts = suppress; + UnitTest::TestRunner::Instance().m_suppressErrors = suppress; + UnitTest::TestRunner::Instance().m_suppressWarnings = suppress; + UnitTest::TestRunner::Instance().m_suppressPrintf = suppress; + UnitTest::TestRunner::Instance().m_suppressOutput = suppress; + } + void BaseAssetManagerTest::WriteAssetToDisk(const AZStd::string& assetName, [[maybe_unused]] const AZStd::string& assetIdGuid) { AZStd::string assetFileName = GetTestFolderPath() + assetName; @@ -150,4 +165,254 @@ namespace UnitTest EXPECT_FALSE(AssetManager::Instance().HasActiveJobsOrStreamerRequests()); } + + MemoryStreamerWrapper::MemoryStreamerWrapper() + { + using ::testing::_; + using ::testing::NiceMock; + using ::testing::Return; + + ON_CALL(m_mockStreamer, SuspendProcessing()).WillByDefault([this]() + { + m_suspended = true; + }); + + ON_CALL(m_mockStreamer, ResumeProcessing()).WillByDefault([this]() + { + AZStd::unique_lock lock(m_mutex); + + m_suspended = false; + + while (!m_processingQueue.empty()) + { + FileRequestHandle requestHandle = m_processingQueue.front(); + m_processingQueue.pop(); + + const auto& onCompleteCallback = GetReadRequest(requestHandle)->m_callback; + + if (onCompleteCallback) + { + onCompleteCallback(requestHandle); + } + } + }); + + ON_CALL(m_mockStreamer, Read(_, ::testing::An(), _, _, _, _)) + .WillByDefault( + [this]( + [[maybe_unused]] AZStd::string_view relativePath, IStreamerTypes::RequestMemoryAllocator& allocator, size_t size, + AZStd::chrono::microseconds deadline, IStreamerTypes::Priority priority, [[maybe_unused]] size_t offset) + { + AZStd::unique_lock lock(m_mutex); + + ReadRequest request; + + // Save off the requested deadline and priority + request.m_deadline = deadline; + request.m_priority = priority; + request.m_data = allocator.Allocate(size, size, 8); + + const auto* virtualFile = FindFile(relativePath); + + AZ_Assert( + virtualFile->size() == size, "Streamer read request size did not match size of saved file: %d vs %d (%.*s)", + virtualFile->size(), size, + relativePath.size(), relativePath.data()); + AZ_Assert(size > 0, "Size is zero %.*s", relativePath.size(), relativePath.data()); + + memcpy(request.m_data.m_address, virtualFile->data(), size); + + // Create a real file request result and return it + request.m_request = m_context.GetNewExternalRequest(); + + m_readRequests.push_back(request); + + return request.m_request; + }); + + ON_CALL(m_mockStreamer, SetRequestCompleteCallback(_, _)) + .WillByDefault([this](FileRequestPtr& request, AZ::IO::IStreamer::OnCompleteCallback callback) -> FileRequestPtr& + { + // Save off the callback just so that we can call it when the request is "done" + AZStd::unique_lock lock(m_mutex); + ReadRequest* readRequest = GetReadRequest(request); + readRequest->m_callback = callback; + + return request; + }); + + ON_CALL(m_mockStreamer, QueueRequest(_)) + .WillByDefault([this](const auto& fileRequest) + { + if (!m_suspended) + { + decltype(ReadRequest::m_callback) onCompleteCallback; + + AZStd::unique_lock lock(m_mutex); + ReadRequest* readRequest = GetReadRequest(fileRequest); + onCompleteCallback = readRequest->m_callback; + + if (onCompleteCallback) + { + onCompleteCallback(fileRequest); + + m_readRequests.erase(readRequest); + } + } + else + { + AZStd::unique_lock lock(m_mutex); + + m_processingQueue.push(fileRequest); + } + }); + + ON_CALL(m_mockStreamer, GetRequestStatus(_)) + .WillByDefault([]([[maybe_unused]] FileRequestHandle request) + { + // Return whatever request status has been set in this class + return IO::IStreamerTypes::RequestStatus::Completed; + }); + + ON_CALL(m_mockStreamer, GetReadRequestResult(_, _, _, _)) + .WillByDefault([this]( + [[maybe_unused]] FileRequestHandle request, void*& buffer, AZ::u64& numBytesRead, + IStreamerTypes::ClaimMemory claimMemory) + { + // Make sure the requestor plans to free the data buffer we allocated. + EXPECT_EQ(claimMemory, IStreamerTypes::ClaimMemory::Yes); + + AZStd::unique_lock lock(m_mutex); + + ReadRequest* readRequest = GetReadRequest(request); + + // Provide valid data buffer results. + numBytesRead = readRequest->m_data.m_size; + buffer = readRequest->m_data.m_address; + + return true; + }); + + ON_CALL(m_mockStreamer, RescheduleRequest(_, _, _)) + .WillByDefault([this](IO::FileRequestPtr target, AZStd::chrono::microseconds newDeadline, IO::IStreamerTypes::Priority newPriority) + { + AZStd::unique_lock lock(m_mutex); + ReadRequest* readRequest = GetReadRequest(target); + + readRequest->m_deadline = newDeadline; + readRequest->m_priority = newPriority; + + return target; + }); + } + + ReadRequest* MemoryStreamerWrapper::GetReadRequest(FileRequestHandle request) + { + auto itr = AZStd::find_if( + m_readRequests.begin(), m_readRequests.end(), + [request](const ReadRequest& searchItem) -> bool + { + return (searchItem.m_request == request); + }); + + return itr; + } + + AZStd::vector* MemoryStreamerWrapper::FindFile(AZStd::string_view path) + { + auto itr = m_virtualFiles.find(path); + + if (itr == m_virtualFiles.end()) + { + // Path didn't work as-is, does it have the test folder prefixed? If so try removing it + if (AZ::StringFunc::StartsWith(path, GetTestFolderPath())) + { + AZStd::string_view pathWithoutFolder = path; + + pathWithoutFolder = AZ::StringFunc::LStrip(pathWithoutFolder, GetTestFolderPath().c_str()); + itr = m_virtualFiles.find(pathWithoutFolder); + } + else // Path isn't prefixed, so try adding it + { + itr = m_virtualFiles.find(GetTestFolderPath().append(path)); + } + } + + if (itr != m_virtualFiles.end()) + { + return &itr->second; + } + + // Currently no test expects a file not to exist so we assert to make it easy to quickly find where something went wrong + // If we ever need to test for a non-existent file this assert should just be conditionally disabled for that specific test + AZ_Assert(false, "Failed to find virtual file %*.s", path.size(), path.data()) + + return nullptr; + } + + void DisklessAssetManagerBase::SetUp() + { + using ::testing::_; + using ::testing::NiceMock; + using ::testing::Return; + + BaseAssetManagerTest::SetUp(); + + ON_CALL(m_fileIO, Size(::testing::Matcher(::testing::_), _)) + .WillByDefault( + [this](const char* path, u64& size) + { + AZStd::scoped_lock lock(m_streamerWrapper->m_mutex); + + const auto* file = m_streamerWrapper->FindFile(path); + + if (file) + { + size = file->size(); + return ResultCode::Success; + } + + AZ_Error("DisklessAssetManagerBase", false, "Failed to find virtual file %.*s", path); + + return ResultCode::Error; + }); + + m_prevFileIO = IO::FileIOBase::GetInstance(); + IO::FileIOBase::SetInstance(nullptr); + IO::FileIOBase::SetInstance(&m_fileIO); + } + + void DisklessAssetManagerBase::TearDown() + { + IO::FileIOBase::SetInstance(nullptr); + IO::FileIOBase::SetInstance(m_prevFileIO); + + BaseAssetManagerTest::TearDown(); + } + + IO::IStreamer* DisklessAssetManagerBase::CreateStreamer() + { + m_streamerWrapper = AZStd::make_unique(); + + return &(m_streamerWrapper->m_mockStreamer); + } + + void DisklessAssetManagerBase::DestroyStreamer(IO::IStreamer*) + { + m_streamerWrapper = nullptr; + } + + void DisklessAssetManagerBase::WriteAssetToDisk(const AZStd::string& assetName, const AZStd::string&) + { + AZStd::string assetFileName = GetTestFolderPath() + assetName; + + AssetWithCustomData asset; + + EXPECT_TRUE(m_streamerWrapper->WriteMemoryFile(assetFileName, &asset, m_serializeContext)); + } + + void DisklessAssetManagerBase::DeleteAssetFromDisk(const AZStd::string&) + { + + } } diff --git a/Code/Framework/AzCore/Tests/Asset/BaseAssetManagerTest.h b/Code/Framework/AzCore/Tests/Asset/BaseAssetManagerTest.h index 757edb3713..af48c74a60 100644 --- a/Code/Framework/AzCore/Tests/Asset/BaseAssetManagerTest.h +++ b/Code/Framework/AzCore/Tests/Asset/BaseAssetManagerTest.h @@ -20,7 +20,8 @@ #include #include #include - +#include +#include namespace UnitTest { @@ -58,14 +59,20 @@ namespace UnitTest // Subclasses can optionally override the streamer creation and destruction virtual IO::IStreamer* CreateStreamer() { return aznew IO::Streamer(AZStd::thread_desc{}, StreamerComponent::CreateStreamerStack()); } - virtual void DestroyStreamer(IO::IStreamer* streamer) { delete streamer; } + virtual void DestroyStreamer(IO::IStreamer* streamer) + { + delete streamer; + streamer = nullptr; + } void SetUp() override; void TearDown() override; + static void SuppressTraceOutput(bool suppress); + // Helper methods to create and destroy actual assets on the disk for true end-to-end asset loading. - void WriteAssetToDisk(const AZStd::string& assetName, const AZStd::string& assetIdGuid); - void DeleteAssetFromDisk(const AZStd::string& assetName); + virtual void WriteAssetToDisk(const AZStd::string& assetName, const AZStd::string& assetIdGuid); + virtual void DeleteAssetFromDisk(const AZStd::string& assetName); void BlockUntilAssetJobsAreComplete(); @@ -80,4 +87,57 @@ namespace UnitTest AZStd::vector m_assetsWritten; }; + + struct ReadRequest + { + AZStd::chrono::milliseconds m_deadline{}; + AZ::IO::IStreamerTypes::Priority m_priority{}; + IO::IStreamerTypes::RequestMemoryAllocatorResult m_data{ nullptr, 0, IO::IStreamerTypes::MemoryType::ReadWrite }; + AZ::IO::IStreamer::OnCompleteCallback m_callback; + IO::FileRequestPtr m_request; + }; + + struct MemoryStreamerWrapper + { + MemoryStreamerWrapper(); + ~MemoryStreamerWrapper() = default; + + ReadRequest* GetReadRequest(IO::FileRequestHandle request); + + template + bool WriteMemoryFile(const AZStd::string& filePath, TObject* object, AZ::SerializeContext* context) + { + auto& buffer = m_virtualFiles[filePath]; + ByteContainerStream stream(&buffer); + + return AZ::Utils::SaveObjectToStream(stream, DataStream::StreamType::ST_XML, object, context); + } + + AZStd::vector* FindFile(AZStd::string_view path); + + ::testing::NiceMock m_mockStreamer; + IO::StreamerContext m_context; + AZStd::atomic_bool m_suspended{ false }; + + AZStd::recursive_mutex m_mutex; + AZStd::queue m_processingQueue; // Keeps tracks of requests that have been queued while processing is suspended + AZStd::vector m_readRequests; + AZStd::unordered_map> m_virtualFiles; + }; + + struct DisklessAssetManagerBase : BaseAssetManagerTest + { + void SetUp() override; + void TearDown() override; + IO::IStreamer* CreateStreamer() override; + void DestroyStreamer(IO::IStreamer*) override; + + void WriteAssetToDisk(const AZStd::string& assetName, const AZStd::string& assetIdGuid) override; + void DeleteAssetFromDisk(const AZStd::string& assetName) override; + + AZStd::unique_ptr m_streamerWrapper; + ::testing::NiceMock m_fileIO; + IO::FileIOBase* m_prevFileIO{}; + }; + } diff --git a/Code/Framework/AzCore/Tests/BehaviorContextFixture.h b/Code/Framework/AzCore/Tests/BehaviorContextFixture.h index 1895f2e35b..3c6d48add7 100644 --- a/Code/Framework/AzCore/Tests/BehaviorContextFixture.h +++ b/Code/Framework/AzCore/Tests/BehaviorContextFixture.h @@ -59,7 +59,6 @@ namespace UnitTest AZ::SerializeContext* GetSerializeContext() override { return nullptr; } AZ::BehaviorContext* GetBehaviorContext() override { return m_behaviorContext; } AZ::JsonRegistrationContext* GetJsonRegistrationContext() override { return nullptr; } - const char* GetAppRoot() const override { return nullptr; } const char* GetEngineRoot() const override { return nullptr; } const char* GetExecutableFolder() const override { return nullptr; } void EnumerateEntities(const EntityCallback& /*callback*/) override {} diff --git a/Code/Framework/AzCore/Tests/Components.cpp b/Code/Framework/AzCore/Tests/Components.cpp index 55b1c193b3..159d55e948 100644 --- a/Code/Framework/AzCore/Tests/Components.cpp +++ b/Code/Framework/AzCore/Tests/Components.cpp @@ -175,7 +175,6 @@ namespace UnitTest ComponentApplication componentApp; ComponentApplication::Descriptor desc; desc.m_useExistingAllocator = true; - desc.m_enableDrilling = false; // we already created a memory driller for the test (AllocatorsFixture) ComponentApplication::StartupParameters startupParams; startupParams.m_allocator = &AZ::AllocatorInstance::Get(); Entity* systemEntity = componentApp.Create(desc, startupParams); @@ -631,7 +630,6 @@ namespace UnitTest ComponentApplication::Descriptor desc; desc.m_useExistingAllocator = true; - desc.m_enableDrilling = false; // we already created a memory driller for the test (AllocatorsFixture in Components) ComponentApplication::StartupParameters startupParams; startupParams.m_allocator = &AZ::AllocatorInstance::Get(); @@ -1060,26 +1058,21 @@ namespace UnitTest /** * UserSettingsComponent test */ - class UserSettingsTestApp - : public ComponentApplication - , public UserSettingsFileLocatorBus::Handler - { - public: - void SetExecutableFolder(const char* path) - { - m_exeDirectory = path; - } - + class UserSettingsTestApp + : public ComponentApplication + , public UserSettingsFileLocatorBus::Handler + { + public: AZStd::string ResolveFilePath(u32 providerId) override { AZStd::string filePath; if (providerId == UserSettings::CT_GLOBAL) { - filePath = (m_exeDirectory / "GlobalUserSettings.xml").String(); + filePath = (AZ::IO::Path(GetTestFolderPath()) / "GlobalUserSettings.xml").Native(); } else if (providerId == UserSettings::CT_LOCAL) { - filePath = (m_exeDirectory / "LocalUserSettings.xml").String(); + filePath = (AZ::IO::Path(GetTestFolderPath()) / "LocalUserSettings.xml").Native(); } return filePath; } @@ -1117,7 +1110,6 @@ namespace UnitTest ComponentApplication::Descriptor appDesc; appDesc.m_memoryBlocksByteSize = 10 * 1024 * 1024; Entity* systemEntity = app.Create(appDesc); - app.SetExecutableFolder(GetTestFolderPath().c_str()); app.UserSettingsFileLocatorBus::Handler::BusConnect(); // Make sure user settings file does not exist at this point diff --git a/Code/Framework/AzCore/Tests/DOM/DomJsonBenchmarks.cpp b/Code/Framework/AzCore/Tests/DOM/DomJsonBenchmarks.cpp new file mode 100644 index 0000000000..0baa4aeb53 --- /dev/null +++ b/Code/Framework/AzCore/Tests/DOM/DomJsonBenchmarks.cpp @@ -0,0 +1,185 @@ +/* + * Copyright (c) Contributors to the Open 3D Engine Project. + * For complete copyright and license terms please see the LICENSE at the root of this distribution. + * + * SPDX-License-Identifier: Apache-2.0 OR MIT + * + */ + +#if defined(HAVE_BENCHMARK) + +#include +#include +#include +#include +#include +#include +#include + +namespace Benchmark +{ + class DomJsonBenchmark : public UnitTest::AllocatorsBenchmarkFixture + { + public: + void SetUp(const ::benchmark::State& st) override + { + UnitTest::AllocatorsBenchmarkFixture::SetUp(st); + AZ::NameDictionary::Create(); + } + + void SetUp(::benchmark::State& st) override + { + UnitTest::AllocatorsBenchmarkFixture::SetUp(st); + AZ::NameDictionary::Create(); + } + + void TearDown(::benchmark::State& st) override + { + AZ::NameDictionary::Destroy(); + UnitTest::AllocatorsBenchmarkFixture::TearDown(st); + } + + void TearDown(const ::benchmark::State& st) override + { + AZ::NameDictionary::Destroy(); + UnitTest::AllocatorsBenchmarkFixture::TearDown(st); + } + + AZStd::string GenerateDomJsonBenchmarkPayload(int64_t entryCount, int64_t stringTemplateLength) + { + rapidjson::Document document; + document.SetObject(); + + AZStd::string entryTemplate; + while (entryTemplate.size() < static_cast(stringTemplateLength)) + { + entryTemplate += "Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor "; + } + entryTemplate.resize(stringTemplateLength); + AZStd::string buffer; + + auto createString = [&](int n) -> rapidjson::Value + { + buffer = AZStd::string::format("#%i %s", n, entryTemplate.c_str()); + return rapidjson::Value(buffer.data(), static_cast(buffer.size()), document.GetAllocator()); + }; + + auto createEntry = [&](int n) -> rapidjson::Value + { + rapidjson::Value entry(rapidjson::kObjectType); + entry.AddMember("string", createString(n), document.GetAllocator()); + entry.AddMember("int", rapidjson::Value(n), document.GetAllocator()); + entry.AddMember("double", rapidjson::Value(static_cast(n) * 0.5), document.GetAllocator()); + entry.AddMember("bool", rapidjson::Value(n % 2 == 0), document.GetAllocator()); + entry.AddMember("null", rapidjson::Value(rapidjson::kNullType), document.GetAllocator()); + return entry; + }; + + auto createArray = [&]() -> rapidjson::Value + { + rapidjson::Value array; + array.SetArray(); + for (int i = 0; i < entryCount; ++i) + { + array.PushBack(createEntry(i), document.GetAllocator()); + } + return array; + }; + + auto createObject = [&]() -> rapidjson::Value + { + rapidjson::Value object; + object.SetObject(); + for (int i = 0; i < entryCount; ++i) + { + buffer = AZStd::string::format("Key%i", i); + rapidjson::Value key; + key.SetString(buffer.data(), static_cast(buffer.length()), document.GetAllocator()); + object.AddMember(key.Move(), createArray(), document.GetAllocator()); + } + return object; + }; + + document.SetObject(); + document.AddMember("entries", createObject(), document.GetAllocator()); + + AZStd::string serializedJson; + auto result = AZ::JsonSerializationUtils::WriteJsonString(document, serializedJson); + AZ_Assert(result.IsSuccess(), "Failed to serialize generated JSON"); + return serializedJson; + } + }; + +// Helper macro for registering JSON benchmarks +#define BENCHMARK_REGISTER_JSON(BaseClass, Method) \ + BENCHMARK_REGISTER_F(BaseClass, Method) \ + ->Args({ 10, 5 }) \ + ->Args({ 10, 500 }) \ + ->Args({ 100, 5 }) \ + ->Args({ 100, 500 }) \ + ->Unit(benchmark::kMillisecond); + + BENCHMARK_DEFINE_F(DomJsonBenchmark, DomDeserializeToDocumentInPlace)(benchmark::State& state) + { + AZ::Dom::JsonBackend backend; + AZStd::string serializedPayload = GenerateDomJsonBenchmarkPayload(state.range(0), state.range(1)); + + for (auto _ : state) + { + state.PauseTiming(); + AZStd::string payloadCopy = serializedPayload; + state.ResumeTiming(); + + auto result = AZ::Dom::Json::WriteToRapidJsonDocument( + [&](AZ::Dom::Visitor& visitor) + { + return AZ::Dom::Utils::ReadFromStringInPlace(backend, payloadCopy, visitor); + }); + + benchmark::DoNotOptimize(result.GetValue()); + } + + state.SetBytesProcessed(serializedPayload.size() * state.iterations()); + } + BENCHMARK_REGISTER_JSON(DomJsonBenchmark, DomDeserializeToDocumentInPlace) + + BENCHMARK_DEFINE_F(DomJsonBenchmark, DomDeserializeToDocument)(benchmark::State& state) + { + AZ::Dom::JsonBackend backend; + AZStd::string serializedPayload = GenerateDomJsonBenchmarkPayload(state.range(0), state.range(1)); + + for (auto _ : state) + { + auto result = AZ::Dom::Json::WriteToRapidJsonDocument( + [&](AZ::Dom::Visitor& visitor) + { + return AZ::Dom::Utils::ReadFromString(backend, serializedPayload, AZ::Dom::Lifetime::Temporary, visitor); + }); + + benchmark::DoNotOptimize(result.GetValue()); + } + + state.SetBytesProcessed(serializedPayload.size() * state.iterations()); + } + BENCHMARK_REGISTER_JSON(DomJsonBenchmark, DomDeserializeToDocument) + + BENCHMARK_DEFINE_F(DomJsonBenchmark, JsonUtilsDeserializeToDocument)(benchmark::State& state) + { + AZ::Dom::JsonBackend backend; + AZStd::string serializedPayload = GenerateDomJsonBenchmarkPayload(state.range(0), state.range(1)); + + for (auto _ : state) + { + auto result = AZ::JsonSerializationUtils::ReadJsonString(serializedPayload); + + benchmark::DoNotOptimize(result.GetValue()); + } + + state.SetBytesProcessed(serializedPayload.size() * state.iterations()); + } + BENCHMARK_REGISTER_JSON(DomJsonBenchmark, JsonUtilsDeserializeToDocument) + +#undef BENCHMARK_REGISTER_JSON +} // namespace Benchmark + +#endif // defined(HAVE_BENCHMARK) diff --git a/Code/Framework/AzCore/Tests/DOM/DomJsonTests.cpp b/Code/Framework/AzCore/Tests/DOM/DomJsonTests.cpp new file mode 100644 index 0000000000..c7af6438cf --- /dev/null +++ b/Code/Framework/AzCore/Tests/DOM/DomJsonTests.cpp @@ -0,0 +1,219 @@ +/* + * Copyright (c) Contributors to the Open 3D Engine Project. + * For complete copyright and license terms please see the LICENSE at the root of this distribution. + * + * SPDX-License-Identifier: Apache-2.0 OR MIT + * + */ + +#include +#include +#include +#include +#include +#include +#include + +namespace AZ::Dom::Tests +{ + class DomJsonTests : public UnitTest::AllocatorsFixture + { + public: + void SetUp() override + { + UnitTest::AllocatorsFixture::SetUp(); + NameDictionary::Create(); + m_document = AZStd::make_unique(); + } + + void TearDown() override + { + m_document.reset(); + NameDictionary::Destroy(); + UnitTest::AllocatorsFixture::TearDown(); + } + + rapidjson::Value CreateString(const AZStd::string& text) + { + rapidjson::Value key; + key.SetString(text.c_str(), static_cast(text.length()), m_document->GetAllocator()); + return key; + } + + template + void AddValue(const AZStd::string& key, T value) + { + m_document->AddMember(CreateString(key), rapidjson::Value(value), m_document->GetAllocator()); + } + + // Validate round-trip serialization to and from rapidjson::Document and a UTF-8 encoded string + void PerformSerializationChecks() + { + // Generate a canonical serializaed representation of this document using rapidjson + // This will be pretty-printed using the same rapidjson pretty printer we use, so should be binary identical + // to any output generated by the visitor API + AZStd::string canonicalSerializedDocument; + AZ::JsonSerializationUtils::WriteJsonString(*m_document, canonicalSerializedDocument); + + auto visitDocumentFn = [this](AZ::Dom::Visitor& visitor) + { + return Json::VisitRapidJsonValue(*m_document, visitor, Lifetime::Temporary); + }; + + // Document -> Document + { + auto result = Json::WriteToRapidJsonDocument(visitDocumentFn); + EXPECT_TRUE(result.IsSuccess()); + EXPECT_EQ(AZ::JsonSerialization::Compare(*m_document, result.GetValue()), AZ::JsonSerializerCompareResult::Equal); + } + + // Document -> string + { + AZStd::string serializedDocument; + JsonBackend backend; + auto result = backend.WriteToBuffer(serializedDocument, visitDocumentFn); + EXPECT_TRUE(result.IsSuccess()); + EXPECT_EQ(canonicalSerializedDocument, serializedDocument); + } + + // string -> Document + { + auto result = Json::WriteToRapidJsonDocument( + [&canonicalSerializedDocument](AZ::Dom::Visitor& visitor) + { + JsonBackend backend; + return Dom::Utils::ReadFromString(backend, canonicalSerializedDocument, Lifetime::Temporary, visitor); + }); + EXPECT_TRUE(result.IsSuccess()); + EXPECT_EQ(AZ::JsonSerialization::Compare(*m_document, result.GetValue()), JsonSerializerCompareResult::Equal); + } + + // string -> string + { + AZStd::string serializedDocument; + JsonBackend backend; + auto result = backend.WriteToBuffer( + serializedDocument, + [&backend, &canonicalSerializedDocument](AZ::Dom::Visitor& visitor) + { + return Dom::Utils::ReadFromString(backend, canonicalSerializedDocument, Lifetime::Temporary, visitor); + }); + EXPECT_TRUE(result.IsSuccess()); + EXPECT_EQ(canonicalSerializedDocument, serializedDocument); + } + } + + AZStd::unique_ptr m_document; + }; + + TEST_F(DomJsonTests, EmptyArray) + { + m_document->SetArray(); + PerformSerializationChecks(); + } + + TEST_F(DomJsonTests, SimpleArray) + { + m_document->SetArray(); + for (int i = 0; i < 5; ++i) + { + m_document->PushBack(i, m_document->GetAllocator()); + } + PerformSerializationChecks(); + } + + TEST_F(DomJsonTests, NestedArrays) + { + m_document->SetArray(); + for (int j = 0; j < 7; ++j) + { + rapidjson::Value nestedArray(rapidjson::kArrayType); + for (int i = 0; i < 5; ++i) + { + nestedArray.PushBack(i, m_document->GetAllocator()); + } + m_document->PushBack(nestedArray.Move(), m_document->GetAllocator()); + } + PerformSerializationChecks(); + } + + TEST_F(DomJsonTests, EmptyObject) + { + m_document->SetObject(); + PerformSerializationChecks(); + } + + TEST_F(DomJsonTests, SimpleObject) + { + m_document->SetObject(); + for (int i = 0; i < 5; ++i) + { + m_document->AddMember(CreateString(AZStd::string::format("Key%i", i)), rapidjson::Value(i), m_document->GetAllocator()); + } + PerformSerializationChecks(); + } + + TEST_F(DomJsonTests, NestedObjects) + { + m_document->SetObject(); + for (int j = 0; j < 7; ++j) + { + rapidjson::Value nestedObject(rapidjson::kObjectType); + for (int i = 0; i < 5; ++i) + { + nestedObject.AddMember(CreateString(AZStd::string::format("Key%i", i)), rapidjson::Value(i), m_document->GetAllocator()); + } + m_document->AddMember(CreateString(AZStd::string::format("Obj%i", j)), nestedObject.Move(), m_document->GetAllocator()); + } + PerformSerializationChecks(); + } + + TEST_F(DomJsonTests, Int64) + { + m_document->SetObject(); + AddValue("int64_min", AZStd::numeric_limits::min()); + AddValue("int64_max", AZStd::numeric_limits::max()); + PerformSerializationChecks(); + } + + TEST_F(DomJsonTests, Uint64) + { + m_document->SetObject(); + AddValue("uint64_min", AZStd::numeric_limits::min()); + AddValue("uint64_max", AZStd::numeric_limits::max()); + PerformSerializationChecks(); + } + + TEST_F(DomJsonTests, Double) + { + m_document->SetObject(); + AddValue("double_min", AZStd::numeric_limits::min()); + AddValue("double_max", AZStd::numeric_limits::max()); + PerformSerializationChecks(); + } + + TEST_F(DomJsonTests, Null) + { + m_document->SetObject(); + m_document->AddMember(CreateString("null_value"), rapidjson::Value(rapidjson::kNullType), m_document->GetAllocator()); + PerformSerializationChecks(); + } + + TEST_F(DomJsonTests, Bool) + { + m_document->SetObject(); + AddValue("true_value", true); + AddValue("false_value", false); + PerformSerializationChecks(); + } + + TEST_F(DomJsonTests, String) + { + m_document->SetObject(); + m_document->AddMember(CreateString("empty_string"), CreateString(""), m_document->GetAllocator()); + m_document->AddMember(CreateString("short_string"), CreateString("test"), m_document->GetAllocator()); + m_document->AddMember( + CreateString("long_string"), CreateString("abcdefghijklmnopqrstuvwxyz0123456789"), m_document->GetAllocator()); + PerformSerializationChecks(); + } +} // namespace AZ::Dom::Tests diff --git a/Code/Framework/AzCore/Tests/Debug.cpp b/Code/Framework/AzCore/Tests/Debug.cpp index 0d6e1a51e0..e27cdcd27e 100644 --- a/Code/Framework/AzCore/Tests/Debug.cpp +++ b/Code/Framework/AzCore/Tests/Debug.cpp @@ -6,9 +6,8 @@ * */ -#include #include -#include +#include #include #include #include @@ -105,7 +104,7 @@ namespace UnitTest } class TraceTest - : public AZ::Debug::TraceMessageDrillerBus::Handler + : public AZ::Debug::TraceMessageBus::Handler , public ::testing::Test { int m_numTracePrintfs; @@ -114,12 +113,13 @@ namespace UnitTest : m_numTracePrintfs(0) {} ////////////////////////////////////////////////////////////////////////// - // TraceMessagesDrillerBus - void OnPrintf(const char* windowName, const char* message) override + // TraceMessageBus + bool OnPrintf(const char* windowName, const char* message) override { (void)windowName; (void)message; ++m_numTracePrintfs; + return false; } ////////////////////////////////////////////////////////////////////////// diff --git a/Code/Framework/AzCore/Tests/Debug/AssetTracking.cpp b/Code/Framework/AzCore/Tests/Debug/AssetTracking.cpp deleted file mode 100644 index 89968406c7..0000000000 --- a/Code/Framework/AzCore/Tests/Debug/AssetTracking.cpp +++ /dev/null @@ -1,169 +0,0 @@ -/* - * Copyright (c) Contributors to the Open 3D Engine Project. - * For complete copyright and license terms please see the LICENSE at the root of this distribution. - * - * SPDX-License-Identifier: Apache-2.0 OR MIT - * - */ - -#include -#include -#include -#include - -using namespace AZ; - -namespace UnitTest -{ - namespace - { - struct TestData - { - }; - - using AssetTree = AZ::Debug::AssetTree; - using AllocationTable = AZ::Debug::AllocationTable; - - struct AssetTrackingTestEnvironment - { - AssetTrackingTestEnvironment() : m_table(m_mutex) - { - } - - AZStd::mutex m_mutex; - AssetTree m_tree; - AllocationTable m_table; - AZStd::unique_ptr m_assetTracking; - }; - } - - class AssetTrackingTests - : public ::testing::Test - { - public: - void SetUp() override - { - AZ::AllocatorInstance::Create(); - m_env.reset(new AssetTrackingTestEnvironment); - m_env->m_assetTracking.reset(aznew AZ::Debug::AssetTracking(&m_env->m_tree, &m_env->m_table)); - } - - void TearDown() override - { - m_env.reset(); - AZ::AllocatorInstance::Destroy(); - } - - void RunTests() - { - TestAssetScopes(); - TestScopedAllocation(); - TestScopeAttach(); - } - - private: - void TestAssetScopes() - { - const char* debugScopeText; - { - AZ_ASSET_NAMED_SCOPE("TestAssetScopes.1"); - { - AZ_ASSET_NAMED_SCOPE("TestAssetScopes.2"); - { - AZ_ASSET_NAMED_SCOPE("TestAssetScopes.3"); - debugScopeText = AZ::Debug::AssetTracking::GetDebugScope(); - EXPECT_STREQ(debugScopeText, "TestAssetScopes.3\nTestAssetScopes.2\nTestAssetScopes.1\n"); - } - - debugScopeText = AZ::Debug::AssetTracking::GetDebugScope(); - EXPECT_STREQ(debugScopeText, "TestAssetScopes.2\nTestAssetScopes.1\n"); - } - - - debugScopeText = AZ::Debug::AssetTracking::GetDebugScope(); - EXPECT_STREQ(debugScopeText, "TestAssetScopes.1\n"); - } - } - - void TestScopedAllocation() - { - void* TEST_POINTER = (void*)0xDEADBEEFull; - static const size_t TEST_SIZE = 32; - - { - AZ_ASSET_NAMED_SCOPE("TestScopedAllocation.1"); - AZ::Debug::AssetTreeNodeBase* activeAsset = m_env->m_assetTracking->GetCurrentThreadAsset(); - m_env->m_table.Get().emplace(TEST_POINTER, AllocationTable::RecordType{ activeAsset, (uint32_t)TEST_SIZE, TestData() }); - } - - auto& rootAsset = m_env->m_tree.m_rootAssets; - auto itr = rootAsset.m_children.find("TestScopedAllocation.1"); - - EXPECT_EQ(&rootAsset, &m_env->m_tree.GetRoot()); - ASSERT_NE(itr, rootAsset.m_children.end()); - EXPECT_EQ(itr->second.m_primaryinfo->m_id->m_id, "TestScopedAllocation.1"); - - EXPECT_EQ(&itr->second, m_env->m_table.FindAllocation(TEST_POINTER)); - - auto allocationRecord = m_env->m_table.Get().find(TEST_POINTER); - ASSERT_NE(allocationRecord, m_env->m_table.Get().end()); - EXPECT_EQ(allocationRecord->second.m_asset, &itr->second); - EXPECT_EQ(allocationRecord->second.m_size, TEST_SIZE); - - // Test realocation - void* TEST_REALLOC_POINTER = (void*)0xDEADC0DEull; - static const size_t TEST_REALLOC_SIZE = 128; - - m_env->m_table.ReallocateAllocation(TEST_POINTER, TEST_REALLOC_POINTER, TEST_REALLOC_SIZE); - allocationRecord = m_env->m_table.Get().find(TEST_POINTER); - EXPECT_EQ(allocationRecord, m_env->m_table.Get().end()); - allocationRecord = m_env->m_table.Get().find(TEST_REALLOC_POINTER); - ASSERT_NE(allocationRecord, m_env->m_table.Get().end()); - EXPECT_EQ(allocationRecord->second.m_asset, &itr->second); - EXPECT_EQ(allocationRecord->second.m_size, TEST_REALLOC_SIZE); - - // Test resize - static const size_t TEST_RESIZE_SIZE = 1024; - m_env->m_table.ResizeAllocation(TEST_REALLOC_POINTER, TEST_RESIZE_SIZE); - EXPECT_EQ(allocationRecord->second.m_size, TEST_RESIZE_SIZE); - } - - void TestScopeAttach() - { - void* TEST_POINTER = (void*)0xDEADBEEFull; - static const size_t TEST_SIZE = 32; - AZ::Debug::AssetTreeNodeBase* originatingAsset; - - { - AZ_ASSET_ATTACH_TO_SCOPE(TEST_POINTER); - EXPECT_EQ(m_env->m_assetTracking->GetCurrentThreadAsset(), nullptr); - } - - { - AZ_ASSET_NAMED_SCOPE("TestScopeAttach.1"); - { - AZ_ASSET_NAMED_SCOPE("TestScopeAttach.2"); - { - originatingAsset = m_env->m_assetTracking->GetCurrentThreadAsset(); - EXPECT_NE(originatingAsset, nullptr); - m_env->m_table.Get().emplace(TEST_POINTER, AllocationTable::RecordType{ originatingAsset, (uint32_t)TEST_SIZE, TestData() }); - } - } - } - - EXPECT_EQ(m_env->m_assetTracking->GetCurrentThreadAsset(), nullptr); - - { - AZ_ASSET_ATTACH_TO_SCOPE(TEST_POINTER); - EXPECT_EQ(m_env->m_assetTracking->GetCurrentThreadAsset(), originatingAsset); - } - } - - AZStd::unique_ptr m_env; - }; - - TEST_F(AssetTrackingTests, Test) - { - RunTests(); - } -} diff --git a/Code/Framework/AzCore/Tests/EBus.cpp b/Code/Framework/AzCore/Tests/EBus.cpp index 9acf0f8a05..470a95435b 100644 --- a/Code/Framework/AzCore/Tests/EBus.cpp +++ b/Code/Framework/AzCore/Tests/EBus.cpp @@ -2500,7 +2500,7 @@ namespace UnitTest namespace RoutingTest { - class DrillerInterceptor : public EBusVersion1::Router + class EBusInterceptor : public EBusVersion1::Router { public: void OnEvent(int a) override @@ -2555,20 +2555,20 @@ namespace UnitTest TEST_F(EBus, Routing) { using namespace RoutingTest; - DrillerInterceptor driller; + EBusInterceptor interceptor; EBusVersion1Handler v1Handler; v1Handler.BusConnect(); - driller.BusRouterConnect(); + interceptor.BusRouterConnect(); EBusVersion1::Broadcast(&EBusVersion1::Events::OnEvent, 1020); - EXPECT_EQ(1, driller.m_numOnEvent); + EXPECT_EQ(1, interceptor.m_numOnEvent); EXPECT_EQ(1, v1Handler.m_numOnEvent); - driller.BusRouterDisconnect(); + interceptor.BusRouterDisconnect(); EBusVersion1::Broadcast(&EBusVersion1::Events::OnEvent, 1020); - EXPECT_EQ(1, driller.m_numOnEvent); + EXPECT_EQ(1, interceptor.m_numOnEvent); EXPECT_EQ(2, v1Handler.m_numOnEvent); // routing events diff --git a/Code/Framework/AzCore/Tests/EBus/ScheduledEventTests.cpp b/Code/Framework/AzCore/Tests/EBus/ScheduledEventTests.cpp index ec9a09fb09..b9c690edcc 100644 --- a/Code/Framework/AzCore/Tests/EBus/ScheduledEventTests.cpp +++ b/Code/Framework/AzCore/Tests/EBus/ScheduledEventTests.cpp @@ -11,7 +11,7 @@ #include #include #include -#include +#include #include #include @@ -26,22 +26,22 @@ namespace UnitTest SetupAllocator(); AZ::NameDictionary::Create(); - m_loggerComponent = new AZ::LoggerSystemComponent; - m_timeComponent = new AZ::TimeSystemComponent; - m_eventSchedulerComponent = new AZ::EventSchedulerSystemComponent; + m_loggerComponent = AZStd::make_unique(); + m_timeSystem = AZStd::make_unique(); + m_eventSchedulerComponent = AZStd::make_unique(); - m_testEvent = new AZ::ScheduledEvent([this] { TestBasicEvent(); }, AZ::Name("UnitTestEvent fire once event")); - m_testRequeue = new AZ::ScheduledEvent([this] { TestAutoRequeuedEvent(); }, AZ::Name("UnitTestEvent auto Requeue")); + m_testEvent = AZStd::make_unique([this] { TestBasicEvent(); }, AZ::Name("UnitTestEvent fire once event")); + m_testRequeue = AZStd::make_unique([this] { TestAutoRequeuedEvent(); }, AZ::Name("UnitTestEvent auto Requeue")); } void TearDown() override { - delete m_testEvent; - delete m_testRequeue; + m_testEvent.reset(); + m_testRequeue.reset(); - delete m_eventSchedulerComponent; - delete m_timeComponent; - delete m_loggerComponent; + m_eventSchedulerComponent.reset(); + m_timeSystem.reset(); + m_loggerComponent.reset(); AZ::NameDictionary::Destroy(); TeardownAllocator(); @@ -60,12 +60,12 @@ namespace UnitTest uint32_t m_basicEventTriggerCount = 0; uint32_t m_requeuedEventTriggerCount = 0; - AZ::ScheduledEvent* m_testEvent = nullptr; - AZ::ScheduledEvent* m_testRequeue = nullptr; + AZStd::unique_ptr m_testEvent; + AZStd::unique_ptr m_testRequeue; - AZ::LoggerSystemComponent* m_loggerComponent = nullptr; - AZ::TimeSystemComponent* m_timeComponent = nullptr; - AZ::EventSchedulerSystemComponent* m_eventSchedulerComponent = nullptr; + AZStd::unique_ptr m_loggerComponent; + AZStd::unique_ptr m_timeSystem; + AZStd::unique_ptr m_eventSchedulerComponent; }; TEST_F(ScheduledEventTests, TestFireOnce) diff --git a/Code/Framework/AzCore/Tests/Math/FrustumTests.cpp b/Code/Framework/AzCore/Tests/Math/FrustumTests.cpp index 294d622a92..31fa6b626f 100644 --- a/Code/Framework/AzCore/Tests/Math/FrustumTests.cpp +++ b/Code/Framework/AzCore/Tests/Math/FrustumTests.cpp @@ -552,7 +552,6 @@ namespace UnitTest box.testCaseName = "BoxShaped"; frustums.push_back(box); - // Default values in a CCamera from Cry_Camera.h FrustumTestCase defaultCameraFrustum; defaultCameraFrustum.nearTopLeft = AZ::Vector3(-0.204621f, 0.200000f, 0.153465f); defaultCameraFrustum.nearTopRight = AZ::Vector3(0.204621f, 0.200000f, 0.153465f); diff --git a/Code/Framework/AzCore/Tests/Math/MathTest.h b/Code/Framework/AzCore/Tests/Math/MathTest.h new file mode 100644 index 0000000000..783c08a553 --- /dev/null +++ b/Code/Framework/AzCore/Tests/Math/MathTest.h @@ -0,0 +1,19 @@ +/* + * Copyright (c) Contributors to the Open 3D Engine Project. + * For complete copyright and license terms please see the LICENSE at the root of this distribution. + * + * SPDX-License-Identifier: Apache-2.0 OR MIT + * + */ + +#pragma once + +#include + +#if AZ_DEBUG_BUILD + #define AZ_MATH_TEST_START_TRACE_SUPPRESSION AZ_TEST_START_TRACE_SUPPRESSION + #define AZ_MATH_TEST_STOP_TRACE_SUPPRESSION(x) AZ_TEST_STOP_TRACE_SUPPRESSION(x) +#else + #define AZ_MATH_TEST_START_TRACE_SUPPRESSION + #define AZ_MATH_TEST_STOP_TRACE_SUPPRESSION(x) +#endif diff --git a/Code/Framework/AzCore/Tests/Math/MathTestData.h b/Code/Framework/AzCore/Tests/Math/MathTestData.h index f87ab8f448..72a98e835d 100644 --- a/Code/Framework/AzCore/Tests/Math/MathTestData.h +++ b/Code/Framework/AzCore/Tests/Math/MathTestData.h @@ -33,6 +33,15 @@ namespace MathTestData AZ::Matrix3x3::CreateScale(AZ::Vector3(0.7f, 1.3f, 0.9f)) }; + static const AZ::Matrix4x4 Matrix4x4s[] = { + AZ::Matrix4x4::CreateIdentity(), + AZ::Matrix4x4::CreateFromQuaternionAndTranslation(AZ::Quaternion(-0.46f, 0.26f, -0.22f, 0.82f), AZ::Vector3(1.0f, 5.0f, 10.0f)), + AZ::Matrix4x4::CreateFromTransform(AZ::Transform::CreateFromMatrix3x3AndTranslation( + AZ::Matrix3x3::CreateScale(AZ::Vector3(1.0f, 2.0f, 3.0f)), AZ::Vector3(2.0f, 4.0f, 6.0f))), + AZ::Matrix4x4::CreateScale(AZ::Vector3(5.0f, 10.0f, 15.0f)), + AZ::Matrix4x4::CreateRotationZ(AZ::DegToRad(45.0f)) + }; + using AxisPair = AZStd::pair; static const AxisPair Axes[] = { { AZ::Constants::Axis::XPositive, AZ::Vector3::CreateAxisX(1.0f) }, diff --git a/Code/Framework/AzCore/Tests/Math/Matrix3x4Tests.cpp b/Code/Framework/AzCore/Tests/Math/Matrix3x4Tests.cpp index 8f8f8ca1e9..20d1107757 100644 --- a/Code/Framework/AzCore/Tests/Math/Matrix3x4Tests.cpp +++ b/Code/Framework/AzCore/Tests/Math/Matrix3x4Tests.cpp @@ -10,6 +10,7 @@ #include #include #include +#include #include #include "MathTestData.h" @@ -392,6 +393,32 @@ namespace UnitTest INSTANTIATE_TEST_CASE_P(MATH_Matrix3x4, Matrix3x4CreateFromMatrix3x3Fixture, ::testing::ValuesIn(MathTestData::Matrix3x3s)); + using Matrix3x4CreateFromMatrix4x4Fixture = ::testing::TestWithParam; + + TEST_P(Matrix3x4CreateFromMatrix4x4Fixture, UnsafeCreateFromMatrix4x4) + { + const AZ::Matrix4x4 matrix4x4 = GetParam(); + const AZ::Matrix3x4 matrix3x4 = AZ::Matrix3x4::UnsafeCreateFromMatrix4x4(matrix4x4); + EXPECT_THAT(matrix3x4.GetTranslation(), IsClose(matrix4x4.GetTranslation())); + const AZ::Vector3 vector(2.3f, -0.6, 1.8f); + EXPECT_THAT(matrix3x4.TransformVector(vector), IsClose((matrix4x4 * AZ::Vector3ToVector4(vector, 0.0f)).GetAsVector3())); + const AZ::Vector3 point(12.3f, -5.6, 7.3f); + EXPECT_THAT(matrix3x4.TransformPoint(point), IsClose((matrix4x4 * AZ::Vector3ToVector4(point, 1.0f)).GetAsVector3())); + } + + INSTANTIATE_TEST_CASE_P(MATH_Matrix3x4, Matrix3x4CreateFromMatrix4x4Fixture, ::testing::ValuesIn(MathTestData::Matrix4x4s)); + + TEST(MATH_Matrix3x4, TransformPoint) + { + const AZ::Matrix3x4 matrix3x4 = AZ::Matrix3x4::CreateFromMatrix3x3AndTranslation( + AZ::Matrix3x3::CreateRotationY(AZ::DegToRad(90.0f)), AZ::Vector3(5.0f, 0.0f, 0.0f)); + + const AZ::Vector3 result = matrix3x4.TransformPoint(AZ::Vector3(1.0f, 0.0f, 0.0f)); + const AZ::Vector3 expected = AZ::Vector3(5.0f, 0.0f, -1.0f); + + EXPECT_THAT(result, expected); + } + TEST(MATH_Matrix3x4, CreateScale) { const AZ::Vector3 scale(1.7f, 0.3f, 2.4f); diff --git a/Code/Framework/AzCore/Tests/Math/PlaneTests.cpp b/Code/Framework/AzCore/Tests/Math/PlaneTests.cpp index 016a7ec6e2..398c1320ed 100644 --- a/Code/Framework/AzCore/Tests/Math/PlaneTests.cpp +++ b/Code/Framework/AzCore/Tests/Math/PlaneTests.cpp @@ -12,6 +12,7 @@ #include #include #include +#include using namespace AZ; @@ -47,7 +48,9 @@ namespace UnitTest TEST(MATH_Plane, TestSet) { Plane pl; + AZ_MATH_TEST_START_TRACE_SUPPRESSION; pl.Set(12.0f, 13.0f, 14.0f, 15.0f); + AZ_MATH_TEST_STOP_TRACE_SUPPRESSION(1); AZ_TEST_ASSERT_FLOAT_CLOSE(pl.GetDistance(), 15.0f); AZ_TEST_ASSERT_FLOAT_CLOSE(pl.GetNormal().GetX(), 12.0f); AZ_TEST_ASSERT_FLOAT_CLOSE(pl.GetNormal().GetY(), 13.0f); @@ -57,7 +60,9 @@ namespace UnitTest TEST(MATH_Plane, TestSetVector3) { Plane pl; + AZ_MATH_TEST_START_TRACE_SUPPRESSION; pl.Set(Vector3(22.0f, 23.0f, 24.0f), 25.0f); + AZ_MATH_TEST_STOP_TRACE_SUPPRESSION(1); AZ_TEST_ASSERT_FLOAT_CLOSE(pl.GetDistance(), 25.0f); AZ_TEST_ASSERT_FLOAT_CLOSE(pl.GetNormal().GetX(), 22.0f); AZ_TEST_ASSERT_FLOAT_CLOSE(pl.GetNormal().GetY(), 23.0f); @@ -177,17 +182,21 @@ namespace UnitTest pl.Set(1.0f, 0.0f, 0.0f, 0.0f); AZ_TEST_ASSERT(pl.IsFinite()); const float infinity = std::numeric_limits::infinity(); + AZ_MATH_TEST_START_TRACE_SUPPRESSION; pl.Set(infinity, infinity, infinity, infinity); + AZ_MATH_TEST_STOP_TRACE_SUPPRESSION(1); AZ_TEST_ASSERT(!pl.IsFinite()); } TEST(MATH_Plane, CreateFromVectorCoefficients_IsEquivalentToCreateFromCoefficients) { + AZ_MATH_TEST_START_TRACE_SUPPRESSION; Plane planeFromCoefficients = Plane::CreateFromCoefficients(1.0, 2.0, 3.0, 4.0); - + AZ_MATH_TEST_STOP_TRACE_SUPPRESSION(1); Vector4 coefficients(1.0, 2.0, 3.0, 4.0); Plane planeFromVectorCoefficients = Plane::CreateFromVectorCoefficients(coefficients); + EXPECT_EQ(planeFromVectorCoefficients, planeFromCoefficients); } } diff --git a/Code/Framework/AzCore/Tests/Math/QuaternionTests.cpp b/Code/Framework/AzCore/Tests/Math/QuaternionTests.cpp index cbff646990..3de60a1fd4 100644 --- a/Code/Framework/AzCore/Tests/Math/QuaternionTests.cpp +++ b/Code/Framework/AzCore/Tests/Math/QuaternionTests.cpp @@ -11,6 +11,7 @@ #include #include #include +#include using namespace AZ; @@ -408,4 +409,118 @@ namespace UnitTest Matrix4x4 m = Matrix4x4::CreateFromQuaternion(rotQuat); AZ_TEST_ASSERT(m.IsClose(rotMatrix)); } + + class QuaternionScaledAxisAngleConversionFixture + : public ::testing::TestWithParam + { + public: + AZ::Quaternion GetAbs(const AZ::Quaternion& in) + { + // Take the shortest path for quaternions containing rotations bigger than 180.0°. + if (in.GetW() < 0.0f) + { + return -in; + } + + return in; + } + }; + + static const AZ::Quaternion RotationRepresentationConversionTestQuats[] = + { + AZ::Quaternion::CreateIdentity(), + -AZ::Quaternion::CreateIdentity(), + AZ::Quaternion::CreateRotationX(AZ::Constants::TwoPi), + AZ::Quaternion::CreateRotationY(AZ::Constants::Pi), + AZ::Quaternion::CreateRotationZ(AZ::Constants::HalfPi), + AZ::Quaternion::CreateRotationX(AZ::Constants::QuarterPi), + AZ::Quaternion(0.64f, 0.36f, 0.48f, 0.48f), + AZ::Quaternion(0.70f, -0.34f, 0.10f, 0.62f), + AZ::Quaternion(-0.38f, 0.34f, 0.70f, -0.50f), + AZ::Quaternion(0.70f, -0.34f, -0.38f, 0.50f), + AZ::Quaternion(0.00f, 0.00f, -0.28f, 0.96f), + AZ::Quaternion(0.24f, -0.64f, 0.72f, 0.12f), + AZ::Quaternion(-0.66f, 0.62f, 0.42f, 0.06f) + }; + + TEST_P(QuaternionScaledAxisAngleConversionFixture, ScaledAxisAngleQuatRoundtripTests) + { + const AZ::Quaternion testQuat = GetAbs(GetParam()); + + // Convert test quaternion to scaled axis-angle representation. + const AZ::Vector3 scaledAxisAngle = testQuat.ConvertToScaledAxisAngle(); + + // Convert the scaled axis-angle back into a quaternion. + AZ::Quaternion backFromScaledAxisAngle = AZ::Quaternion::CreateFromScaledAxisAngle(scaledAxisAngle); + + // Compare the original quaternion with the one after the conversion. + EXPECT_THAT(testQuat, IsCloseTolerance(backFromScaledAxisAngle, 1e-6f)); + } + + TEST_P(QuaternionScaledAxisAngleConversionFixture, AxisAngleQuatRoundtripTests) + { + const AZ::Quaternion testQuat = GetAbs(GetParam()); + + // Convert test quaternion to axis-angle representation. + AZ::Vector3 axis; + float angle; + testQuat.ConvertToAxisAngle(axis, angle); + + // Convert the axis-angle back into a quaternion and compare the original quaternion with the one after the conversion. + const AZ::Quaternion backFromAxisAngle = AZ::Quaternion::CreateFromAxisAngle(axis, angle); + EXPECT_THAT(testQuat, IsCloseTolerance(backFromAxisAngle, 1e-6f)); + } + + TEST_P(QuaternionScaledAxisAngleConversionFixture, CompareAxisAngleConversionTests) + { + const AZ::Quaternion testQuat = GetAbs(GetParam()); + + // Convert test quaternion to scaled axis-angle representation. + const AZ::Vector3 scaledAxisAngle = testQuat.ConvertToScaledAxisAngle(); + + // Convert test quaternion to axis-angle representation and scale it manually. + AZ::Vector3 axis; + float angle; + testQuat.ConvertToAxisAngle(axis, angle); + + // Compare the scaled result to the version from the helper that directly converts it to scaled axis-angle. + AZ::Vector3 scaledResult = axis*angle; + EXPECT_TRUE(scaledResult.IsClose(scaledAxisAngle, 1e-5f)); + } + + TEST_P(QuaternionScaledAxisAngleConversionFixture, CompareScaledAxisAngleConversionTests) + { + const AZ::Quaternion testQuat = GetAbs(GetParam()); + + // Convert test quaternion to axis-angle representation and scale it manually. + AZ::Vector3 axis; + float angle; + testQuat.ConvertToAxisAngle(axis, angle); + AZ::Vector3 scaledResult = axis*angle; + + // Special case handling for identity rotation. + AZ::Vector3 axisFromScaledResult = scaledResult.GetNormalized(); + float angleFromScaledResult = scaledResult.GetLength(); + if (AZ::IsClose(angleFromScaledResult, 0.0f)) + { + axisFromScaledResult = AZ::Vector3::CreateAxisY(); + } + + const AZ::Quaternion backFromAxisAngle = AZ::Quaternion::CreateFromAxisAngle(axisFromScaledResult, angleFromScaledResult); + EXPECT_THAT(testQuat, IsCloseTolerance(backFromAxisAngle, 1e-6f)); + } + + INSTANTIATE_TEST_CASE_P(MATH_Quaternion, QuaternionScaledAxisAngleConversionFixture, ::testing::ValuesIn(RotationRepresentationConversionTestQuats)); + + TEST(MATH_Quaternion, ShortestEquivalent) + { + const AZ::Quaternion testQuat = AZ::Quaternion::CreateRotationX(AZ::Constants::HalfPi * 3.0f); + + AZ::Quaternion absQuat = testQuat; + absQuat.ShortestEquivalent(); + EXPECT_THAT(testQuat.GetShortestEquivalent(), IsCloseTolerance(absQuat, 1e-6f)); + + const float angle = absQuat.GetEulerRadians().GetX(); + EXPECT_THAT(angle, testing::FloatEq(-AZ::Constants::HalfPi)); + } } diff --git a/Code/Framework/AzCore/Tests/Math/TransformTests.cpp b/Code/Framework/AzCore/Tests/Math/TransformTests.cpp index 0138d32376..752c622ae8 100644 --- a/Code/Framework/AzCore/Tests/Math/TransformTests.cpp +++ b/Code/Framework/AzCore/Tests/Math/TransformTests.cpp @@ -402,17 +402,18 @@ namespace UnitTest AllocatorsFixture::SetUp(); AZ::ComponentApplication::Descriptor desc; desc.m_useExistingAllocator = true; - desc.m_enableDrilling = false; // we already created a memory driller for the test (AllocatorsFixture) - m_app.Create(desc); + m_app.reset(aznew AZ::ComponentApplication); + m_app->Create(desc); } void TearDown() override { - m_app.Destroy(); + m_app->Destroy(); + m_app.reset(); AllocatorsFixture::TearDown(); } - AZ::ComponentApplication m_app; + AZStd::unique_ptr m_app; }; TEST_F(MATH_TransformApplicationFixture, DeserializingOldFormat) diff --git a/Code/Framework/AzCore/Tests/Memory.cpp b/Code/Framework/AzCore/Tests/Memory.cpp index 5a483c1ed1..5287167c8b 100644 --- a/Code/Framework/AzCore/Tests/Memory.cpp +++ b/Code/Framework/AzCore/Tests/Memory.cpp @@ -12,8 +12,6 @@ #include #include -#include -#include #include #include #include @@ -44,16 +42,13 @@ namespace UnitTest void SetUp() override { AZ::AllocatorManager::Instance().SetDefaultTrackingMode(AZ::Debug::AllocationRecords::RECORD_FULL); - m_drillerManager = Debug::DrillerManager::Create(); - m_drillerManager->Register(aznew MemoryDriller); + AZ::AllocatorManager::Instance().EnterProfilingMode(); } void TearDown() override { - Debug::DrillerManager::Destroy(m_drillerManager); + AZ::AllocatorManager::Instance().ExitProfilingMode(); AZ::AllocatorManager::Instance().SetDefaultTrackingMode(AZ::Debug::AllocationRecords::RECORD_NO_RECORDS); } - protected: - Debug::DrillerManager* m_drillerManager = nullptr; }; class SystemAllocatorTest diff --git a/Code/Framework/AzCore/Tests/Memory/AllocatorBenchmarkRecordings.bin b/Code/Framework/AzCore/Tests/Memory/AllocatorBenchmarkRecordings.bin new file mode 100644 index 0000000000..ec5de82e83 --- /dev/null +++ b/Code/Framework/AzCore/Tests/Memory/AllocatorBenchmarkRecordings.bin @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:281ba03e79ecba90b313a0b17bdba87c57d76b504b6e38d579b5eabd995902cc +size 245760 diff --git a/Code/Framework/AzCore/Tests/Memory/AllocatorBenchmarks.cpp b/Code/Framework/AzCore/Tests/Memory/AllocatorBenchmarks.cpp new file mode 100644 index 0000000000..bc477e41dc --- /dev/null +++ b/Code/Framework/AzCore/Tests/Memory/AllocatorBenchmarks.cpp @@ -0,0 +1,591 @@ +/* + * Copyright (c) Contributors to the Open 3D Engine Project. + * For complete copyright and license terms please see the LICENSE at the root of this distribution. + * + * SPDX-License-Identifier: Apache-2.0 OR MIT + * + */ + +#if defined(HAVE_BENCHMARK) + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#include + +namespace Benchmark +{ + namespace Platform + { + size_t GetProcessMemoryUsageBytes(); + size_t GetMemorySize(void* memory); + } + + /// + /// Test allocator wrapper that redirects the calls to the passed TAllocator by using AZ::AllocatorInstance. + /// It also creates/destroys the TAllocator type (to reflect what happens at runtime) + /// + /// Allocator type to wrap + template + class TestAllocatorWrapper + { + public: + static void SetUp() + { + AZ::AllocatorInstance::Create(); + } + + static void TearDown() + { + AZ::AllocatorInstance::Destroy(); + } + + static void* Allocate(size_t byteSize, size_t alignment) + { + return AZ::AllocatorInstance::Get().Allocate(byteSize, alignment); + } + + static void DeAllocate(void* ptr, size_t byteSize = 0) + { + AZ::AllocatorInstance::Get().DeAllocate(ptr, byteSize); + } + + static void* ReAllocate(void* ptr, size_t newSize, size_t newAlignment) + { + return AZ::AllocatorInstance::Get().ReAllocate(ptr, newSize, newAlignment); + } + + static size_t Resize(void* ptr, size_t newSize) + { + return AZ::AllocatorInstance::Get().Resize(ptr, newSize); + } + + static void GarbageCollect() + { + AZ::AllocatorInstance::Get().GarbageCollect(); + } + + static size_t NumAllocatedBytes() + { + return AZ::AllocatorInstance::Get().NumAllocatedBytes() + + AZ::AllocatorInstance::Get().GetUnAllocatedMemory(); + } + + static size_t GetSize(void* ptr) + { + return AZ::AllocatorInstance::Get().AllocationSize(ptr); + } + }; + + /// + /// Basic allocator used as a baseline. This allocator is the most basic allocation possible with the OS (AZ_OS_MALLOC). + /// MallocSchema cannot be used here because it has extra logic that we don't want to use as a baseline. + /// + class RawMallocAllocator {}; + + template<> + class TestAllocatorWrapper + { + public: + TestAllocatorWrapper() + { + s_numAllocatedBytes = 0; + } + + static void SetUp() + { + s_numAllocatedBytes = 0; + } + + static void TearDown() + { + } + + // IAllocatorAllocate + static void* Allocate(size_t byteSize, size_t) + { + s_numAllocatedBytes += byteSize; + // Don't pass an alignment since we wont be able to get the memory size without also passing the alignment + return AZ_OS_MALLOC(byteSize, 1); + } + + static void DeAllocate(void* ptr, size_t = 0) + { + s_numAllocatedBytes -= Platform::GetMemorySize(ptr); + AZ_OS_FREE(ptr); + } + + static void* ReAllocate(void* ptr, size_t newSize, size_t) + { + s_numAllocatedBytes -= Platform::GetMemorySize(ptr); + AZ_OS_FREE(ptr); + + s_numAllocatedBytes += newSize; + return AZ_OS_MALLOC(newSize, 1); + } + + static size_t Resize(void* ptr, size_t newSize) + { + AZ_UNUSED(ptr); + AZ_UNUSED(newSize); + + return 0; + } + + static void GarbageCollect() {} + + static size_t NumAllocatedBytes() + { + return s_numAllocatedBytes; + } + + static size_t GetSize(void* ptr) + { + return Platform::GetMemorySize(ptr); + } + + private: + static size_t s_numAllocatedBytes; + }; + + size_t TestAllocatorWrapper::s_numAllocatedBytes = 0; + + // Some allocator are not fully declared, those we simply setup from the schema + class MallocSchemaAllocator : public AZ::SimpleSchemaAllocator + { + public: + AZ_TYPE_INFO(MallocSchemaAllocator, "{3E68224F-E676-402C-8276-CE4B49C05E89}"); + + MallocSchemaAllocator() + : AZ::SimpleSchemaAllocator("MallocSchemaAllocator", "") + {} + }; + + // We use both this HphaSchemaAllocator and the SystemAllocator configured with Hpha because the SystemAllocator + // has extra things + class HphaSchemaAllocator : public AZ::SimpleSchemaAllocator + { + public: + AZ_TYPE_INFO(HphaSchemaAllocator, "{6563AB4B-A68E-4499-8C98-D61D640D1F7F}"); + + HphaSchemaAllocator() + : AZ::SimpleSchemaAllocator("TestHphaSchemaAllocator", "") + {} + }; + + // For the SystemAllocator we inherit so we have a different stack. The SystemAllocator is used globally so we dont want + // to get that data affecting the benchmark + class TestSystemAllocator : public AZ::SystemAllocator + { + public: + AZ_TYPE_INFO(TestSystemAllocator, "{360D4DAA-D65D-4D5C-A6FA-1A4C5261C35C}"); + + TestSystemAllocator() + : AZ::SystemAllocator() + { + } + }; + + // Allocated bytes reported by the allocator + static const char* s_counterAllocatorMemory = "Allocator_Memory"; + + // Allocated bytes as counted by the benchmark + static const char* s_counterBenchmarkMemory = "Benchmark_Memory"; + + enum AllocationSize + { + SMALL, + BIG, + MIXED, + COUNT + }; + + static const size_t s_kiloByte = 1024; + static const size_t s_megaByte = s_kiloByte * s_kiloByte; + using AllocationSizeArray = AZStd::array; + static const AZStd::array s_allocationSizes = { + /* SMALL */ AllocationSizeArray{ 2, 16, 20, 59, 100, 128, 160, 250, 300, 512 }, + /* BIG */ AllocationSizeArray{ 513, s_kiloByte, 2 * s_kiloByte, 4 * s_kiloByte, 10 * s_kiloByte, 64 * s_kiloByte, 128 * s_kiloByte, 200 * s_kiloByte, s_megaByte, 2 * s_megaByte }, + /* MIXED */ AllocationSizeArray{ 2, s_kiloByte, 59, 4 * s_kiloByte, 128, 200 * s_kiloByte, 250, s_megaByte, 512, 2 * s_megaByte } + }; + + template + class AllocatorBenchmarkFixture + : public ::benchmark::Fixture + { + protected: + using TestAllocatorType = TestAllocatorWrapper; + + virtual void internalSetUp(const ::benchmark::State& state) + { + if (state.thread_index == 0) // Only setup in the first thread + { + TestAllocatorType::SetUp(); + + m_allocations.resize(state.threads); + for (auto& perThreadAllocations : m_allocations) + { + perThreadAllocations.resize(state.range(0), nullptr); + } + } + } + + virtual void internalTearDown(const ::benchmark::State& state) + { + if (state.thread_index == 0) // Only setup in the first thread + { + m_allocations.clear(); + m_allocations.shrink_to_fit(); + + TestAllocatorType::TearDown(); + } + } + + AZStd::vector& GetPerThreadAllocations(size_t threadIndex) + { + return m_allocations[threadIndex]; + } + + public: + void SetUp(const ::benchmark::State& state) override + { + internalSetUp(state); + } + void SetUp(::benchmark::State& state) override + { + internalSetUp(state); + } + + void TearDown(const ::benchmark::State& state) override + { + internalTearDown(state); + } + void TearDown(::benchmark::State& state) override + { + internalTearDown(state); + } + + private: + AZStd::vector> m_allocations; + }; + + template + class AllocationBenchmarkFixture + : public AllocatorBenchmarkFixture + { + using base = AllocatorBenchmarkFixture; + using TestAllocatorType = typename base::TestAllocatorType; + + public: + void Benchmark(benchmark::State& state) + { + for (auto _ : state) + { + state.PauseTiming(); + + AZStd::vector& perThreadAllocations = base::GetPerThreadAllocations(state.thread_index); + const size_t numberOfAllocations = perThreadAllocations.size(); + size_t totalAllocationSize = 0; + for (size_t allocationIndex = 0; allocationIndex < numberOfAllocations; ++allocationIndex) + { + const AllocationSizeArray& allocationArray = s_allocationSizes[TAllocationSize]; + const size_t allocationSize = allocationArray[allocationIndex % allocationArray.size()]; + totalAllocationSize += allocationSize; + + state.ResumeTiming(); + perThreadAllocations[allocationIndex] = TestAllocatorType::Allocate(allocationSize, 0); + state.PauseTiming(); + } + + state.counters[s_counterAllocatorMemory] = benchmark::Counter(static_cast(TestAllocatorType::NumAllocatedBytes()), benchmark::Counter::kDefaults); + state.counters[s_counterBenchmarkMemory] = benchmark::Counter(static_cast(totalAllocationSize), benchmark::Counter::kDefaults); + + for (size_t allocationIndex = 0; allocationIndex < numberOfAllocations; ++allocationIndex) + { + const AllocationSizeArray& allocationArray = s_allocationSizes[TAllocationSize]; + const size_t allocationSize = allocationArray[allocationIndex % allocationArray.size()]; + TestAllocatorType::DeAllocate(perThreadAllocations[allocationIndex], allocationSize); + perThreadAllocations[allocationIndex] = nullptr; + } + TestAllocatorType::GarbageCollect(); + + state.SetItemsProcessed(numberOfAllocations); + } + } + }; + + template + class DeAllocationBenchmarkFixture + : public AllocatorBenchmarkFixture + { + using base = AllocatorBenchmarkFixture; + using TestAllocatorType = typename base::TestAllocatorType; + + public: + void Benchmark(benchmark::State& state) + { + for (auto _ : state) + { + state.PauseTiming(); + AZStd::vector& perThreadAllocations = base::GetPerThreadAllocations(state.thread_index); + + const size_t numberOfAllocations = perThreadAllocations.size(); + size_t totalAllocationSize = 0; + for (size_t allocationIndex = 0; allocationIndex < numberOfAllocations; ++allocationIndex) + { + const AllocationSizeArray& allocationArray = s_allocationSizes[TAllocationSize]; + const size_t allocationSize = allocationArray[allocationIndex % allocationArray.size()]; + totalAllocationSize += allocationSize; + perThreadAllocations[allocationIndex] = TestAllocatorType::Allocate(allocationSize, 0); + } + + for (size_t allocationIndex = 0; allocationIndex < numberOfAllocations; ++allocationIndex) + { + const AllocationSizeArray& allocationArray = s_allocationSizes[TAllocationSize]; + const size_t allocationSize = allocationArray[allocationIndex % allocationArray.size()]; + state.ResumeTiming(); + TestAllocatorType::DeAllocate(perThreadAllocations[allocationIndex], allocationSize); + state.PauseTiming(); + perThreadAllocations[allocationIndex] = nullptr; + } + + state.counters[s_counterAllocatorMemory] = benchmark::Counter(static_cast(TestAllocatorType::NumAllocatedBytes()), benchmark::Counter::kDefaults); + state.counters[s_counterBenchmarkMemory] = benchmark::Counter(static_cast(totalAllocationSize), benchmark::Counter::kDefaults); + + state.SetItemsProcessed(numberOfAllocations); + + TestAllocatorType::GarbageCollect(); + } + } + }; + + template + class RecordedAllocationBenchmarkFixture : public ::benchmark::Fixture + { + using TestAllocatorType = TestAllocatorWrapper; + + virtual void internalSetUp() + { + TestAllocatorType::SetUp(); + } + + void internalTearDown() + { + TestAllocatorType::TearDown(); + } + + #pragma pack(push, 1) + struct alignas(1) AllocatorOperation + { + enum OperationType : size_t + { + ALLOCATE, + DEALLOCATE + }; + OperationType m_type : 1; + size_t m_size : 28; // Can represent up to 256Mb requests + size_t m_alignment : 7; // Can represent up to 128 alignment + size_t m_recordId : 28; // Can represent up to 256M simultaneous requests, we reuse ids + }; + #pragma pack(pop) + static_assert(sizeof(AllocatorOperation) == 8); + + public: + void SetUp(const ::benchmark::State&) override + { + internalSetUp(); + } + void SetUp(::benchmark::State&) override + { + internalSetUp(); + } + + void TearDown(const ::benchmark::State&) override + { + internalTearDown(); + } + void TearDown(::benchmark::State&) override + { + internalTearDown(); + } + + void Benchmark(benchmark::State& state) + { + for (auto _ : state) + { + state.PauseTiming(); + + AZStd::unordered_map pointerRemapping; + constexpr size_t allocationOperationCount = 5 * 1024; + AZStd::array m_operations = {}; + [[maybe_unused]] const size_t operationSize = sizeof(AllocatorOperation); + + size_t totalAllocationSize = 0; + size_t itemsProcessed = 0; + + for (size_t i = 0; i < 100; ++i) // play the recording multiple times to get a good stable sample, this way we can keep a smaller recording + { + AZ::IO::SystemFile file; + AZ::IO::FixedMaxPathString filePath = AZ::Utils::GetExecutableDirectory(); + filePath += "/Tests/AzCore/Memory/AllocatorBenchmarkRecordings.bin"; + if (!file.Open(filePath.c_str(), AZ::IO::SystemFile::OpenMode::SF_OPEN_READ_ONLY)) + { + return; + } + size_t elementsRead = + file.Read(sizeof(AllocatorOperation) * allocationOperationCount, &m_operations) / sizeof(AllocatorOperation); + itemsProcessed += elementsRead; + + while (elementsRead > 0) + { + for (size_t operationIndex = 0; operationIndex < elementsRead; ++operationIndex) + { + const AllocatorOperation& operation = m_operations[operationIndex]; + if (operation.m_type == AllocatorOperation::ALLOCATE) + { + const auto it = pointerRemapping.emplace(operation.m_recordId, nullptr); + if (it.second) // otherwise already allocated + { + state.ResumeTiming(); + void* ptr = TestAllocatorType::Allocate(operation.m_size, operation.m_alignment); + state.PauseTiming(); + totalAllocationSize += operation.m_size; + it.first->second = ptr; + } + else + { + // Doing a resize, dont account for this memory change, this operation is rare and we dont have + // the size of the previous allocation + state.ResumeTiming(); + TestAllocatorType::Resize(it.first->second, operation.m_size); + state.PauseTiming(); + } + } + else // AllocatorOperation::DEALLOCATE: + { + if (operation.m_recordId) + { + const auto ptrIt = pointerRemapping.find(operation.m_recordId); + if (ptrIt != pointerRemapping.end()) + { + totalAllocationSize -= operation.m_size; + state.ResumeTiming(); + TestAllocatorType::DeAllocate( + ptrIt->second, + /*operation.m_size*/ 0); // size is not correct after a resize, a 0 size deals with it + state.PauseTiming(); + pointerRemapping.erase(ptrIt); + } + } + else // deallocate(nullptr) are recorded + { + // Just to account of the call of deallocate(nullptr); + state.ResumeTiming(); + TestAllocatorType::DeAllocate(nullptr, /*operation.m_size*/ 0); + state.PauseTiming(); + } + } + } + + elementsRead = + file.Read(sizeof(AllocatorOperation) * allocationOperationCount, &m_operations) / sizeof(AllocatorOperation); + itemsProcessed += elementsRead; + } + file.Close(); + + // Deallocate the remainder (since we stopped the recording middle-game)(there are leaks as well) + for (const auto& pointerMapping : pointerRemapping) + { + state.ResumeTiming(); + TestAllocatorType::DeAllocate(pointerMapping.second); + state.PauseTiming(); + } + itemsProcessed += pointerRemapping.size(); + pointerRemapping.clear(); + } + + state.counters[s_counterAllocatorMemory] = benchmark::Counter(static_cast(TestAllocatorType::NumAllocatedBytes()), benchmark::Counter::kDefaults); + state.counters[s_counterBenchmarkMemory] = benchmark::Counter(static_cast(totalAllocationSize), benchmark::Counter::kDefaults); + + state.SetItemsProcessed(itemsProcessed); + + TestAllocatorType::GarbageCollect(); + } + } + }; + + // For non-threaded ranges, run 100, 400, 1600 amounts + static void RunRanges(benchmark::internal::Benchmark* b) + { + for (int i = 0; i < 6; i += 2) + { + b->Arg((1 << i) * 100); + } + } + static void RecordedRunRanges(benchmark::internal::Benchmark* b) + { + b->Iterations(1); + } + + // For threaded ranges, run just 200, multi-threaded will already multiply by thread + static void ThreadedRunRanges(benchmark::internal::Benchmark* b) + { + b->Arg(100); + } + + // Test under and over-subscription of threads vs the amount of CPUs available + static const unsigned int MaxThreadRange = 2 * AZStd::thread::hardware_concurrency(); + +#define BM_REGISTER_TEMPLATE(FIXTURE, TESTNAME, ...) \ + BENCHMARK_TEMPLATE_DEFINE_F(FIXTURE, TESTNAME, __VA_ARGS__)(benchmark::State& state) { Benchmark(state); } \ + BENCHMARK_REGISTER_F(FIXTURE, TESTNAME) + + // We test small/big/mixed allocations in single-threaded environments. For multi-threaded environments, we test mixed since + // the multi threaded fixture will run multiple passes (1, 2, 4, ... until 2*hardware_concurrency) +#define BM_REGISTER_SIZE_FIXTURES(FIXTURE, TESTNAME, ALLOCATORTYPE) \ + BM_REGISTER_TEMPLATE(FIXTURE, TESTNAME##_SMALL, ALLOCATORTYPE, SMALL)->Apply(RunRanges); \ + BM_REGISTER_TEMPLATE(FIXTURE, TESTNAME##_BIG, ALLOCATORTYPE, BIG)->Apply(RunRanges); \ + BM_REGISTER_TEMPLATE(FIXTURE, TESTNAME##_MIXED, ALLOCATORTYPE, MIXED)->Apply(RunRanges); \ + BM_REGISTER_TEMPLATE(FIXTURE, TESTNAME##_MIXED_THREADED, ALLOCATORTYPE, MIXED)->ThreadRange(2, MaxThreadRange)->Apply(ThreadedRunRanges); + +#define BM_REGISTER_ALLOCATOR(TESTNAME, ALLOCATORTYPE) \ + namespace BM_##TESTNAME \ + { \ + BM_REGISTER_SIZE_FIXTURES(AllocationBenchmarkFixture, TESTNAME, ALLOCATORTYPE); \ + BM_REGISTER_SIZE_FIXTURES(DeAllocationBenchmarkFixture, TESTNAME, ALLOCATORTYPE); \ + BM_REGISTER_TEMPLATE(RecordedAllocationBenchmarkFixture, TESTNAME, ALLOCATORTYPE)->Apply(RecordedRunRanges); \ + } + + /// Warm up benchmark used to prepare the OS for allocations. Most OS keep allocations for a process somehow + /// reserved. So the first allocations run always get a bigger impact in a process. This warm up allocator runs + /// all the benchmarks and is just used for the the next allocators to report more consistent results. + BM_REGISTER_ALLOCATOR(WarmUpAllocator, RawMallocAllocator); + + BM_REGISTER_ALLOCATOR(RawMallocAllocator, RawMallocAllocator); + BM_REGISTER_ALLOCATOR(MallocSchemaAllocator, MallocSchemaAllocator); + BM_REGISTER_ALLOCATOR(HphaSchemaAllocator, HphaSchemaAllocator); + BM_REGISTER_ALLOCATOR(SystemAllocator, TestSystemAllocator); + + //BM_REGISTER_ALLOCATOR(BestFitExternalMapAllocator, BestFitExternalMapAllocator); // Requires to pre-allocate blocks and cannot work as a general-purpose allocator + //BM_REGISTER_ALLOCATOR(HeapSchemaAllocator, TestHeapSchemaAllocator); // Requires to pre-allocate blocks and cannot work as a general-purpose allocator + //BM_REGISTER_SCHEMA(PoolSchema); // Requires special alignment requests while allocating + +#undef BM_REGISTER_ALLOCATOR +#undef BM_REGISTER_SIZE_FIXTURES +#undef BM_REGISTER_TEMPLATE + +} // Benchmark + +#endif // HAVE_BENCHMARK diff --git a/Code/Framework/AzCore/Tests/Memory/HphaSchema.cpp b/Code/Framework/AzCore/Tests/Memory/HphaSchema.cpp index 85dd79931d..08b84416e6 100644 --- a/Code/Framework/AzCore/Tests/Memory/HphaSchema.cpp +++ b/Code/Framework/AzCore/Tests/Memory/HphaSchema.cpp @@ -10,10 +10,6 @@ #include #include -#if defined(HAVE_BENCHMARK) -#include -#endif // HAVE_BENCHMARK - class HphaSchema_TestAllocator : public AZ::SimpleSchemaAllocator { @@ -112,87 +108,3 @@ namespace UnitTest HphaSchemaTestFixture, ::testing::ValuesIn(s_mixedInstancesParameters)); } - - -#if defined(HAVE_BENCHMARK) -namespace Benchmark -{ - class HphaSchemaBenchmarkFixture - : public ::benchmark::Fixture - { - void internalSetUp() - { - AZ::AllocatorInstance::Create(); - } - - void internalTearDown() - { - AZ::AllocatorInstance::Destroy(); - } - - public: - void SetUp(const benchmark::State&) override - { - internalSetUp(); - } - void SetUp(benchmark::State&) override - { - internalSetUp(); - } - void TearDown(const benchmark::State&) override - { - internalTearDown(); - } - void TearDown(benchmark::State&) override - { - internalTearDown(); - } - - static void BM_Allocations(benchmark::State& state, const AllocationSizeArray& allocationArray) - { - AZStd::vector allocations; - while (state.KeepRunning()) - { - state.PauseTiming(); - const size_t allocationIndex = allocations.size(); - const size_t allocationSize = allocationArray[allocationIndex % allocationArray.size()]; - - state.ResumeTiming(); - void* allocation = AZ::AllocatorInstance::Get().Allocate(allocationSize, 0); - - state.PauseTiming(); - allocations.emplace_back(allocation); - - state.ResumeTiming(); - } - - const size_t numberOfAllocations = allocations.size(); - state.SetItemsProcessed(numberOfAllocations); - - for (size_t allocationIndex = 0; allocationIndex < numberOfAllocations; ++allocationIndex) - { - AZ::AllocatorInstance::Get().DeAllocate(allocations[allocationIndex], allocationArray[allocationIndex % allocationArray.size()]); - } - AZ::AllocatorInstance::Get().GarbageCollect(); - } - }; - - // Small allocations, these are allocations that are going to end up in buckets in the HphaSchema - BENCHMARK_F(HphaSchemaBenchmarkFixture, SmallAllocations)(benchmark::State& state) - { - BM_Allocations(state, s_smallAllocationSizes); - } - - BENCHMARK_F(HphaSchemaBenchmarkFixture, BigAllocations)(benchmark::State& state) - { - BM_Allocations(state, s_bigAllocationSizes); - } - - BENCHMARK_F(HphaSchemaBenchmarkFixture, MixedAllocations)(benchmark::State& state) - { - BM_Allocations(state, s_mixedAllocationSizes); - } - - -} // Benchmark -#endif // HAVE_BENCHMARK diff --git a/Code/Framework/AzCore/Tests/Memory/LeakDetection.cpp b/Code/Framework/AzCore/Tests/Memory/LeakDetection.cpp index 09255ce16f..dcfc931141 100644 --- a/Code/Framework/AzCore/Tests/Memory/LeakDetection.cpp +++ b/Code/Framework/AzCore/Tests/Memory/LeakDetection.cpp @@ -270,8 +270,7 @@ namespace UnitTest void SetUp() override { - m_drillerManager = AZ::Debug::DrillerManager::Create(); - m_drillerManager->Register(aznew AZ::Debug::MemoryDriller); + AZ::AllocatorManager::Instance().EnterProfilingMode(); AZ::AllocatorManager::Instance().SetDefaultTrackingMode(AZ::Debug::AllocationRecords::RECORD_FULL); if (azrtti_typeid() != azrtti_typeid()) // simplifies instead of template specialization @@ -292,7 +291,7 @@ namespace UnitTest // Other allocators need the SystemAllocator in order to work AZ::AllocatorInstance::Destroy(); } - AZ::Debug::DrillerManager::Destroy(m_drillerManager); + AZ::AllocatorManager::Instance().ExitProfilingMode(); m_busRedirector.BusDisconnect(); EXPECT_EQ(m_leakExpected, m_leakDetected); @@ -352,7 +351,6 @@ namespace UnitTest }; BusRedirector m_busRedirector; - AZ::Debug::DrillerManager* m_drillerManager = nullptr; bool m_leakDetected = false; bool m_leakExpected = false; }; diff --git a/Code/Framework/AzCore/Tests/Platform/Android/Tests/Memory/AllocatorBenchmarks_Android.cpp b/Code/Framework/AzCore/Tests/Platform/Android/Tests/Memory/AllocatorBenchmarks_Android.cpp new file mode 100644 index 0000000000..636d5519d8 --- /dev/null +++ b/Code/Framework/AzCore/Tests/Platform/Android/Tests/Memory/AllocatorBenchmarks_Android.cpp @@ -0,0 +1,31 @@ +/* + * Copyright (c) Contributors to the Open 3D Engine Project. + * For complete copyright and license terms please see the LICENSE at the root of this distribution. + * + * SPDX-License-Identifier: Apache-2.0 OR MIT + * + */ + +#include +#include + +#include +#include + +namespace Benchmark +{ + namespace Platform + { + size_t GetProcessMemoryUsageBytes() + { + struct rusage rusage; + getrusage(RUSAGE_SELF, &rusage); + return rusage.ru_maxrss * 1024L; + } + + size_t GetMemorySize(void* memory) + { + return memory ? malloc_usable_size(memory) : 0; + } + } +} diff --git a/Code/Framework/AzCore/Tests/Platform/Android/platform_android_files.cmake b/Code/Framework/AzCore/Tests/Platform/Android/platform_android_files.cmake index ed54a84dbf..3ad1bd3185 100644 --- a/Code/Framework/AzCore/Tests/Platform/Android/platform_android_files.cmake +++ b/Code/Framework/AzCore/Tests/Platform/Android/platform_android_files.cmake @@ -8,4 +8,5 @@ set(FILES Tests/UtilsTests_Android.cpp + Tests/Memory/AllocatorBenchmarks_Android.cpp ) diff --git a/Code/Framework/AzCore/Tests/Platform/Linux/Tests/Memory/AllocatorBenchmarks_Linux.cpp b/Code/Framework/AzCore/Tests/Platform/Linux/Tests/Memory/AllocatorBenchmarks_Linux.cpp new file mode 100644 index 0000000000..636d5519d8 --- /dev/null +++ b/Code/Framework/AzCore/Tests/Platform/Linux/Tests/Memory/AllocatorBenchmarks_Linux.cpp @@ -0,0 +1,31 @@ +/* + * Copyright (c) Contributors to the Open 3D Engine Project. + * For complete copyright and license terms please see the LICENSE at the root of this distribution. + * + * SPDX-License-Identifier: Apache-2.0 OR MIT + * + */ + +#include +#include + +#include +#include + +namespace Benchmark +{ + namespace Platform + { + size_t GetProcessMemoryUsageBytes() + { + struct rusage rusage; + getrusage(RUSAGE_SELF, &rusage); + return rusage.ru_maxrss * 1024L; + } + + size_t GetMemorySize(void* memory) + { + return memory ? malloc_usable_size(memory) : 0; + } + } +} diff --git a/Code/Framework/AzCore/Tests/Platform/Linux/platform_linux_files.cmake b/Code/Framework/AzCore/Tests/Platform/Linux/platform_linux_files.cmake index 844b621e05..953dbb7791 100644 --- a/Code/Framework/AzCore/Tests/Platform/Linux/platform_linux_files.cmake +++ b/Code/Framework/AzCore/Tests/Platform/Linux/platform_linux_files.cmake @@ -9,4 +9,5 @@ set(FILES Tests/UtilsTests_Linux.cpp ../Common/UnixLike/Tests/UtilsTests_UnixLike.cpp + Tests/Memory/AllocatorBenchmarks_Linux.cpp ) diff --git a/Code/Framework/AzCore/Tests/Platform/Mac/Tests/Memory/AllocatorBenchmarks_Mac.cpp b/Code/Framework/AzCore/Tests/Platform/Mac/Tests/Memory/AllocatorBenchmarks_Mac.cpp new file mode 100644 index 0000000000..932252985a --- /dev/null +++ b/Code/Framework/AzCore/Tests/Platform/Mac/Tests/Memory/AllocatorBenchmarks_Mac.cpp @@ -0,0 +1,31 @@ +/* + * Copyright (c) Contributors to the Open 3D Engine Project. + * For complete copyright and license terms please see the LICENSE at the root of this distribution. + * + * SPDX-License-Identifier: Apache-2.0 OR MIT + * + */ + +#include +#include + +#include +#include + +namespace Benchmark +{ + namespace Platform + { + size_t GetProcessMemoryUsageBytes() + { + struct rusage rusage; + getrusage(RUSAGE_SELF, &rusage); + return rusage.ru_maxrss; + } + + size_t GetMemorySize(void* memory) + { + return memory ? malloc_size(memory) : 0; + } + } +} diff --git a/Code/Framework/AzCore/Tests/Platform/Mac/platform_mac_files.cmake b/Code/Framework/AzCore/Tests/Platform/Mac/platform_mac_files.cmake index 93d2daf2b8..14e39d47f4 100644 --- a/Code/Framework/AzCore/Tests/Platform/Mac/platform_mac_files.cmake +++ b/Code/Framework/AzCore/Tests/Platform/Mac/platform_mac_files.cmake @@ -9,4 +9,5 @@ set(FILES ../Common/Apple/Tests/UtilsTests_Apple.cpp ../Common/UnixLike/Tests/UtilsTests_UnixLike.cpp + Tests/Memory/AllocatorBenchmarks_Mac.cpp ) diff --git a/Code/Framework/AzCore/Tests/Platform/Windows/Tests/Memory/AllocatorBenchmarks_Windows.cpp b/Code/Framework/AzCore/Tests/Platform/Windows/Tests/Memory/AllocatorBenchmarks_Windows.cpp new file mode 100644 index 0000000000..e9571a7e5b --- /dev/null +++ b/Code/Framework/AzCore/Tests/Platform/Windows/Tests/Memory/AllocatorBenchmarks_Windows.cpp @@ -0,0 +1,40 @@ +/* + * Copyright (c) Contributors to the Open 3D Engine Project. + * For complete copyright and license terms please see the LICENSE at the root of this distribution. + * + * SPDX-License-Identifier: Apache-2.0 OR MIT + * + */ + +#include +#include + +#include +#include + +namespace Benchmark +{ + namespace Platform + { + size_t GetProcessMemoryUsageBytes() + { + EmptyWorkingSet(GetCurrentProcess()); + + size_t memoryUsage = 0; + MEMORY_BASIC_INFORMATION mbi = { 0 }; + unsigned char* pEndRegion = nullptr; + while (sizeof(mbi) == VirtualQuery(pEndRegion, &mbi, sizeof(mbi))) { + pEndRegion += mbi.RegionSize; + if ((mbi.AllocationProtect & PAGE_READWRITE) && (mbi.State & MEM_COMMIT)) { + memoryUsage += mbi.RegionSize; + } + } + return memoryUsage; + } + + size_t GetMemorySize(void* memory) + { + return memory ? _aligned_msize(memory, 1, 0) : 0; + } + } +} diff --git a/Code/Framework/AzCore/Tests/Platform/Windows/platform_windows_files.cmake b/Code/Framework/AzCore/Tests/Platform/Windows/platform_windows_files.cmake index 0a96dad34e..97b12b28e6 100644 --- a/Code/Framework/AzCore/Tests/Platform/Windows/platform_windows_files.cmake +++ b/Code/Framework/AzCore/Tests/Platform/Windows/platform_windows_files.cmake @@ -9,6 +9,7 @@ set(FILES ../Common/WinAPI/Tests/UtilsTests_WinAPI.cpp Tests/IO/Streamer/StorageDriveTests_Windows.cpp + Tests/Memory/AllocatorBenchmarks_Windows.cpp Tests/Memory/OverrunDetectionAllocator_Windows.cpp Tests/Serialization_Windows.cpp ) diff --git a/Code/Framework/AzCore/Tests/Rtti.cpp b/Code/Framework/AzCore/Tests/Rtti.cpp index 935df848c2..85089b0602 100644 --- a/Code/Framework/AzCore/Tests/Rtti.cpp +++ b/Code/Framework/AzCore/Tests/Rtti.cpp @@ -17,6 +17,7 @@ #include #include #include +#include #include #include #include diff --git a/Code/Framework/AzCore/Tests/ScriptMath.cpp b/Code/Framework/AzCore/Tests/ScriptMath.cpp index 35541c5eec..927ea4a3cd 100644 --- a/Code/Framework/AzCore/Tests/ScriptMath.cpp +++ b/Code/Framework/AzCore/Tests/ScriptMath.cpp @@ -15,6 +15,8 @@ #include #include +#include + using namespace AZ; namespace UnitTest @@ -1409,13 +1411,17 @@ namespace UnitTest script->Execute("AZTestAssertFloatClose(pl:GetNormal().y,-1)"); script->Execute("AZTestAssertFloatClose(pl:GetNormal().z,0)"); + AZ_MATH_TEST_START_TRACE_SUPPRESSION; script->Execute("pl:Set(12, 13, 14, 15)"); + AZ_MATH_TEST_STOP_TRACE_SUPPRESSION(1); script->Execute("AZTestAssertFloatClose(pl:GetDistance(), 15)"); script->Execute("AZTestAssertFloatClose(pl:GetNormal().x, 12)"); script->Execute("AZTestAssertFloatClose(pl:GetNormal().y, 13)"); script->Execute("AZTestAssertFloatClose(pl:GetNormal().z, 14)"); + AZ_MATH_TEST_START_TRACE_SUPPRESSION; script->Execute("pl:Set(Vector3(22, 23, 24), 25)"); + AZ_MATH_TEST_STOP_TRACE_SUPPRESSION(1); script->Execute("AZTestAssertFloatClose(pl:GetDistance(), 25)"); script->Execute("AZTestAssertFloatClose(pl:GetNormal().x, 22)"); script->Execute("AZTestAssertFloatClose(pl:GetNormal().y, 23)"); @@ -1493,7 +1499,9 @@ namespace UnitTest script->Execute("pl:Set(1, 0, 0, 0)"); script->Execute("AZTestAssert(pl:IsFinite())"); + AZ_MATH_TEST_START_TRACE_SUPPRESSION; script->Execute("pl:Set(math.huge, math.huge, math.huge, math.huge)"); + AZ_MATH_TEST_STOP_TRACE_SUPPRESSION(1); script->Execute("AZTestAssert( not pl:IsFinite())"); } diff --git a/Code/Framework/AzCore/Tests/Serialization.cpp b/Code/Framework/AzCore/Tests/Serialization.cpp index f1d5edc490..1666913317 100644 --- a/Code/Framework/AzCore/Tests/Serialization.cpp +++ b/Code/Framework/AzCore/Tests/Serialization.cpp @@ -59,6 +59,7 @@ #include #include #include +#include #include #include @@ -1240,7 +1241,6 @@ namespace UnitTest SerializeContext* GetSerializeContext() override { return m_serializeContext.get(); } BehaviorContext* GetBehaviorContext() override { return nullptr; } JsonRegistrationContext* GetJsonRegistrationContext() override { return nullptr; } - const char* GetAppRoot() const override { return nullptr; } const char* GetEngineRoot() const override { return nullptr; } const char* GetExecutableFolder() const override { return nullptr; } void EnumerateEntities(const EntityCallback& /*callback*/) override {} @@ -8152,5 +8152,98 @@ namespace UnitTest m_serializeContext->Class(); m_serializeContext->DisableRemoveReflection(); } + + template + class PathSerializationParamFixture + : public ScopedAllocatorSetupFixture + , public ::testing::WithParamInterface + { + public: + PathSerializationParamFixture() + : ScopedAllocatorSetupFixture( + []() { AZ::SystemAllocator::Descriptor desc; desc.m_stackRecordLevels = 30; return desc; }() + ) + {} + + // We must expose the class for serialization first. + void SetUp() override + { + m_serializeContext = AZStd::make_unique(); + AZ::IO::PathReflect(m_serializeContext.get()); + + } + + void TearDown() override + { + m_serializeContext->EnableRemoveReflection(); + AZ::IO::PathReflect(m_serializeContext.get()); + m_serializeContext->DisableRemoveReflection(); + + m_serializeContext.reset(); + } + + protected: + AZStd::unique_ptr m_serializeContext; + }; + + struct PathSerializationParams + { + const char m_preferredSeparator{}; + const char* m_testPath{}; + }; + using PathSerializationFixture = PathSerializationParamFixture; + + TEST_P(PathSerializationFixture, PathSerializer_SerializesStringBackedPath_Succeeds) + { + const auto& testParams = GetParam(); + { + // Path serialization + AZ::IO::Path testPath{ testParams.m_testPath, testParams.m_preferredSeparator }; + + AZStd::vector byteBuffer; + AZ::IO::ByteContainerStream byteStream(&byteBuffer); + auto objStream = AZ::ObjectStream::Create(&byteStream, *m_serializeContext, AZ::ObjectStream::ST_XML); + objStream->WriteClass(&testPath); + objStream->Finalize(); + + byteStream.Seek(0, AZ::IO::GenericStream::ST_SEEK_BEGIN); + + AZ::IO::Path loadPath{ testParams.m_preferredSeparator }; + EXPECT_TRUE(AZ::Utils::LoadObjectFromStreamInPlace(byteStream, loadPath, m_serializeContext.get())); + EXPECT_EQ(testPath.LexicallyNormal(), loadPath); + } + + { + // FixedMaxPath serialization + AZ::IO::FixedMaxPath testFixedMaxPath{ testParams.m_testPath, testParams.m_preferredSeparator }; + + AZStd::vector byteBuffer; + AZ::IO::ByteContainerStream byteStream(&byteBuffer); + auto objStream = AZ::ObjectStream::Create(&byteStream, *m_serializeContext, AZ::ObjectStream::ST_XML); + objStream->WriteClass(&testFixedMaxPath); + objStream->Finalize(); + + byteStream.Seek(0, AZ::IO::GenericStream::ST_SEEK_BEGIN); + + AZ::IO::FixedMaxPath loadPath{ testParams.m_preferredSeparator }; + EXPECT_TRUE(AZ::Utils::LoadObjectFromStreamInPlace(byteStream, loadPath, m_serializeContext.get())); + EXPECT_EQ(testFixedMaxPath.LexicallyNormal(), loadPath); + } + } + + INSTANTIATE_TEST_CASE_P( + PathSerialization, + PathSerializationFixture, + ::testing::Values( + PathSerializationParams{ AZ::IO::PosixPathSeparator, "" }, + PathSerializationParams{ AZ::IO::PosixPathSeparator, "test" }, + PathSerializationParams{ AZ::IO::PosixPathSeparator, "/test" }, + PathSerializationParams{ AZ::IO::WindowsPathSeparator, "test" }, + PathSerializationParams{ AZ::IO::WindowsPathSeparator, "/test" }, + PathSerializationParams{ AZ::IO::WindowsPathSeparator, "D:test" }, + PathSerializationParams{ AZ::IO::WindowsPathSeparator, "D:/test" }, + PathSerializationParams{ AZ::IO::WindowsPathSeparator, "test/foo/../bar" } + ) + ); } diff --git a/Code/Framework/AzCore/Tests/Serialization/Json/BasicContainerSerializerTests.cpp b/Code/Framework/AzCore/Tests/Serialization/Json/BasicContainerSerializerTests.cpp index 4a6a8e9e8a..17a4cfbc7f 100644 --- a/Code/Framework/AzCore/Tests/Serialization/Json/BasicContainerSerializerTests.cpp +++ b/Code/Framework/AzCore/Tests/Serialization/Json/BasicContainerSerializerTests.cpp @@ -11,6 +11,7 @@ #include #include #include +#include #include #include #include diff --git a/Code/Framework/AzCore/Tests/Serialization/Json/JsonRegistrationContextTests.cpp b/Code/Framework/AzCore/Tests/Serialization/Json/JsonRegistrationContextTests.cpp index 9d4af1def5..9b44f10e89 100644 --- a/Code/Framework/AzCore/Tests/Serialization/Json/JsonRegistrationContextTests.cpp +++ b/Code/Framework/AzCore/Tests/Serialization/Json/JsonRegistrationContextTests.cpp @@ -327,17 +327,13 @@ namespace JsonSerializationTests SerializerWithOneType::Unreflect(m_jsonRegistrationContext.get()); } -#if GTEST_HAS_DEATH_TEST - using JsonSerializationDeathTests = JsonRegistrationContextTests; - TEST_F(JsonSerializationDeathTests, DoubleUnregisterSerializer_Asserts) + TEST_F(JsonRegistrationContextTests, DoubleUnregisterSerializer_Asserts) { - ASSERT_DEATH({ - SerializerWithOneType::Reflect(m_jsonRegistrationContext.get()); - SerializerWithOneType::Unreflect(m_jsonRegistrationContext.get()); - SerializerWithOneType::Unreflect(m_jsonRegistrationContext.get()); - }, ".*" - ); + SerializerWithOneType::Reflect(m_jsonRegistrationContext.get()); + SerializerWithOneType::Unreflect(m_jsonRegistrationContext.get()); + AZ_TEST_START_ASSERTTEST; + SerializerWithOneType::Unreflect(m_jsonRegistrationContext.get()); + AZ_TEST_STOP_ASSERTTEST(1); } -#endif // GTEST_HAS_DEATH_TEST } //namespace JsonSerializationTests diff --git a/Code/Framework/AzCore/Tests/Serialization/Json/PathSerializerTests.cpp b/Code/Framework/AzCore/Tests/Serialization/Json/PathSerializerTests.cpp new file mode 100644 index 0000000000..e00a4171a2 --- /dev/null +++ b/Code/Framework/AzCore/Tests/Serialization/Json/PathSerializerTests.cpp @@ -0,0 +1,106 @@ +/* + * Copyright (c) Contributors to the Open 3D Engine Project. + * For complete copyright and license terms please see the LICENSE at the root of this distribution. + * + * SPDX-License-Identifier: Apache-2.0 OR MIT + * + */ + +#include +#include +#include +#include +#include + +namespace JsonSerializationTests +{ + template + class PathTestDescription + : public JsonSerializerConformityTestDescriptor + { + public: + using JsonSerializerConformityTestDescriptor::Reflect; + void Reflect(AZStd::unique_ptr& serializeContext) override + { + AZ::IO::PathReflect(serializeContext.get()); + } + void Reflect(AZStd::unique_ptr& jsonContext) override + { + AZ::IO::PathReflect(jsonContext.get()); + } + AZStd::shared_ptr CreateSerializer() override + { + return AZStd::make_shared(); + } + + AZStd::shared_ptr CreateDefaultInstance() override + { + return AZStd::make_shared(); + } + + AZStd::shared_ptr CreateFullySetInstance() override + { + return AZStd::make_shared("O3DE/Relative/Path"); + } + + AZStd::string_view GetJsonForFullySetInstance() override + { + return R"("O3DE/Relative/Path")"; + } + + void ConfigureFeatures(JsonSerializerConformityTestDescriptorFeatures& features) override + { + features.EnableJsonType(rapidjson::kStringType); + features.m_supportsPartialInitialization = false; + features.m_supportsInjection = false; + } + + bool AreEqual(const PathType& lhs, const PathType& rhs) override + { + return lhs == rhs; + } + }; + + using PathConformityTestTypes = ::testing::Types< + PathTestDescription, + PathTestDescription + >; + INSTANTIATE_TYPED_TEST_CASE_P(Path, JsonSerializerConformityTests, PathConformityTestTypes); + + + class PathSerializerTests + : public BaseJsonSerializerFixture + { + public: + AZStd::unique_ptr m_serializer; + + void SetUp() override + { + BaseJsonSerializerFixture::SetUp(); + m_serializer = AZStd::make_unique(); + } + + void TearDown() override + { + m_serializer.reset(); + BaseJsonSerializerFixture::TearDown(); + } + }; + + TEST_F(PathSerializerTests, LoadingIntoFixedMaxPath_GreaterThanMaxPathLength_Fails) + { + AZ::IO::Path testPath; + // Fill a path greater than the AZ::IO::MaxPathLength in write it to Json + testPath.Native().append(AZ::IO::MaxPathLength + 2, 'a'); + + rapidjson::Value loadPathValue; + AZ::JsonSerializationResult::ResultCode resultCode = m_serializer->Store(loadPathValue, + &testPath, nullptr, azrtti_typeid(), *m_jsonSerializationContext); + EXPECT_EQ(AZ::JsonSerializationResult::Outcomes::Success, resultCode.GetOutcome()); + + AZ::IO::FixedMaxPath resultPath; + AZ::JsonSerializationResult::ResultCode result = m_serializer->Load(&resultPath, azrtti_typeid(), + loadPathValue, *m_jsonDeserializationContext); + EXPECT_GE(result.GetOutcome(), AZ::JsonSerializationResult::Outcomes::Invalid); + } +} // namespace JsonSerializationTests diff --git a/Code/Framework/AzCore/Tests/Serialization/Json/TestCases_TypeId.cpp b/Code/Framework/AzCore/Tests/Serialization/Json/TestCases_TypeId.cpp index 60b8f55dce..b7362a5e61 100644 --- a/Code/Framework/AzCore/Tests/Serialization/Json/TestCases_TypeId.cpp +++ b/Code/Framework/AzCore/Tests/Serialization/Json/TestCases_TypeId.cpp @@ -10,6 +10,77 @@ #include #include #include +#include + +namespace AZ +{ + template + struct SerializeGenericTypeInfo> + { + using ThisType = JsonSerializationTests::TemplatedClass; + + class GenericTemplatedClassInfo : public GenericClassInfo + { + public: + GenericTemplatedClassInfo() + : m_classData{ SerializeContext::ClassData::Create( + "TemplatedClass", "{CA4ADF74-66E7-4D16-B4AC-F71278C60EC7}", nullptr, nullptr) } + { + } + + SerializeContext::ClassData* GetClassData() override + { + return &m_classData; + } + + size_t GetNumTemplatedArguments() override + { + return 1; + } + + const Uuid& GetSpecializedTypeId() const override + { + return m_classData.m_typeId; + } + + const Uuid& GetGenericTypeId() const override + { + return m_classData.m_typeId; + } + + const Uuid& GetTemplatedTypeId(size_t element) override + { + (void)element; + return SerializeGenericTypeInfo::GetClassTypeId(); + } + + void Reflect(SerializeContext* serializeContext) override + { + if (serializeContext) + { + serializeContext->RegisterGenericClassInfo( + GetSpecializedTypeId(), this, &AZ::AnyTypeInfoConcept>::CreateAny); + serializeContext->RegisterGenericClassInfo( + azrtti_typeid(), this, + &AZ::AnyTypeInfoConcept::CreateAny); + } + } + + SerializeContext::ClassData m_classData; + }; + + using ClassInfoType = GenericTemplatedClassInfo; + static ClassInfoType* GetGenericInfo() + { + return GetCurrentSerializeContextModule().CreateGenericClassInfo(); + } + + static const Uuid& GetClassTypeId() + { + return GetGenericInfo()->GetClassData()->m_typeId; + } + }; +} // namespace AZ namespace JsonSerializationTests { @@ -286,4 +357,32 @@ namespace JsonSerializationTests EXPECT_EQ(Processing::Halted, result.GetProcessing()); EXPECT_EQ(Outcomes::Unknown, result.GetOutcome()); } + + TEST_F(JsonSerializationTests, StoreTypeId_TemplatedType_StoresUuidWithName) + { + using namespace AZ; + using namespace AZ::JsonSerializationResult; + + m_serializeContext->RegisterGenericType>(); + m_serializeContext->RegisterGenericType>(); + + Uuid input = azrtti_typeid>(); + ResultCode result = JsonSerialization::StoreTypeId( + *m_jsonDocument, m_jsonDocument->GetAllocator(), input, AZStd::string_view{}, *m_serializationSettings); + + EXPECT_EQ(Processing::Completed, result.GetProcessing()); + + AZStd::string expected = + AZStd::string::format(R"("%s TemplatedClass")", azrtti_typeid>().ToString().c_str()); + Expect_DocStrEq(expected.c_str(), false); + + input = azrtti_typeid>(); + result = JsonSerialization::StoreTypeId( + *m_jsonDocument, m_jsonDocument->GetAllocator(), input, AZStd::string_view{}, *m_serializationSettings); + + expected = + AZStd::string::format(R"("%s TemplatedClass")", azrtti_typeid>().ToString().c_str()); + EXPECT_EQ(Processing::Completed, result.GetProcessing()); + Expect_DocStrEq(expected.c_str(), false); + } } // namespace JsonSerializationTests diff --git a/Code/Framework/AzCore/Tests/Settings/SettingsRegistryMergeUtilsTests.cpp b/Code/Framework/AzCore/Tests/Settings/SettingsRegistryMergeUtilsTests.cpp index 00a18f7682..485593a699 100644 --- a/Code/Framework/AzCore/Tests/Settings/SettingsRegistryMergeUtilsTests.cpp +++ b/Code/Framework/AzCore/Tests/Settings/SettingsRegistryMergeUtilsTests.cpp @@ -539,6 +539,22 @@ tags=tools,renderer,metal)" EXPECT_STREQ("Bat", commandLine.GetMiscValue(2).c_str()); } + TEST_F(SettingsRegistryMergeUtilsCommandLineFixture, RegsetFileArgument_DoesNotMergeNUL) + { + AZStd::string regsetFile = AZ::IO::SystemFile::GetNullFilename(); + AZ::CommandLine commandLine; + commandLine.Parse({ "--regset-file", regsetFile }); + + AZ::SettingsRegistryMergeUtils::MergeSettingsToRegistry_CommandLine(*m_registry, commandLine, false); + + // Add a settings path to anchor loaded settings underneath + regsetFile = AZStd::string::format("%s::/AnchorPath/Of/Settings", AZ::IO::SystemFile::GetNullFilename()); + commandLine.Parse({ "--regset-file", regsetFile }); + + AZ::SettingsRegistryMergeUtils::MergeSettingsToRegistry_CommandLine(*m_registry, commandLine, false); + EXPECT_EQ(AZ::SettingsRegistryInterface::Type::NoType, m_registry->GetType("/AnchorPath/Of/Settings")); + } + using SettingsRegistryAncestorDescendantOrEqualPathFixture = SettingsRegistryMergeUtilsCommandLineFixture; TEST_F(SettingsRegistryAncestorDescendantOrEqualPathFixture, ValidateThatAncestorOrDescendantOrPathWithTheSameValue_Succeeds) diff --git a/Code/Framework/AzCore/Tests/StatisticalProfiler.cpp b/Code/Framework/AzCore/Tests/StatisticalProfiler.cpp index fc5fe66c4b..291f2a8110 100644 --- a/Code/Framework/AzCore/Tests/StatisticalProfiler.cpp +++ b/Code/Framework/AzCore/Tests/StatisticalProfiler.cpp @@ -13,7 +13,7 @@ #include #include #include -#include +#include #include @@ -468,28 +468,29 @@ namespace UnitTest /** Trace message handler to track messages during tests */ struct MyTraceMessageSink final - : public AZ::Debug::TraceMessageDrillerBus::Handler + : public AZ::Debug::TraceMessageBus::Handler { MyTraceMessageSink() { - AZ::Debug::TraceMessageDrillerBus::Handler::BusConnect(); + AZ::Debug::TraceMessageBus::Handler::BusConnect(); } ~MyTraceMessageSink() { - AZ::Debug::TraceMessageDrillerBus::Handler::BusDisconnect(); + AZ::Debug::TraceMessageBus::Handler::BusDisconnect(); } ////////////////////////////////////////////////////////////////////////// - // TraceMessageDrillerBus - void OnPrintf(const char* window, const char* message) override + // TraceMessageBus + bool OnPrintf(const char* window, const char* message) override { - OnOutput(window, message); + return OnOutput(window, message); } - void OnOutput(const char* window, const char* message) override + bool OnOutput(const char* window, const char* message) override { printf("%s: %s\n", window, message); + return false; } }; //struct MyTraceMessageSink diff --git a/Code/Framework/AzCore/Tests/Streamer/FullDecompressorTests.cpp b/Code/Framework/AzCore/Tests/Streamer/FullDecompressorTests.cpp index 92eeb4d2e2..9f2f0dbd6b 100644 --- a/Code/Framework/AzCore/Tests/Streamer/FullDecompressorTests.cpp +++ b/Code/Framework/AzCore/Tests/Streamer/FullDecompressorTests.cpp @@ -89,7 +89,7 @@ namespace AZ::IO m_context = nullptr; AllocatorInstance::Destroy(); - AllocatorInstance::Destroy(); + AllocatorInstance::Destroy(); UnitTest::AllocatorsFixture::TearDown(); } @@ -123,7 +123,7 @@ namespace AZ::IO .WillRepeatedly(Return(false)); EXPECT_CALL(*m_mock, QueueRequest(_)); EXPECT_CALL(*m_mock, UpdateStatus(_)).Times(AnyNumber()); - + switch (mockResult) { case ReadResult::Success: @@ -267,7 +267,7 @@ namespace AZ::IO { allCompleted = allCompleted && request.GetStatus() == IStreamerTypes::RequestStatus::Completed; }; - + FileRequest* requests[count]; AZStd::unique_ptr buffers[count]; for (size_t i = 0; i < count; ++i) @@ -300,7 +300,7 @@ namespace AZ::IO size = size >> 2; for (u64 i = 0; i < size; ++i) { - // Using assert here because in case of a problem EXPECT would + // Using assert here because in case of a problem EXPECT would // cause a large amount of log noise. ASSERT_EQ(buffer[i], offset + (i << 2)); } diff --git a/Code/Framework/AzCore/Tests/Streamer/ReadSplitterTests.cpp b/Code/Framework/AzCore/Tests/Streamer/ReadSplitterTests.cpp index 1464ada97b..a68ce091b8 100644 --- a/Code/Framework/AzCore/Tests/Streamer/ReadSplitterTests.cpp +++ b/Code/Framework/AzCore/Tests/Streamer/ReadSplitterTests.cpp @@ -359,7 +359,7 @@ namespace AZ::IO .Times(2) .WillRepeatedly([this](FileRequest* request) { m_context.MarkRequestAsCompleted(request); }); m_context.FinalizeCompletedRequests(); - + azfree(memory); } @@ -415,7 +415,7 @@ namespace AZ::IO m_context.FinalizeCompletedRequests(); EXPECT_EQ(2, completedRequests); - + azfree(memory1); azfree(memory0); } diff --git a/Code/Framework/AzCore/Tests/Streamer/SchedulerTests.cpp b/Code/Framework/AzCore/Tests/Streamer/SchedulerTests.cpp index 147c6ca2b6..6c360b97de 100644 --- a/Code/Framework/AzCore/Tests/Streamer/SchedulerTests.cpp +++ b/Code/Framework/AzCore/Tests/Streamer/SchedulerTests.cpp @@ -30,7 +30,7 @@ namespace AZ::IO { using ::testing::_; using ::testing::AnyNumber; - + UnitTest::AllocatorsFixture::SetUp(); m_mock = AZStd::make_shared(); @@ -78,7 +78,7 @@ namespace AZ::IO { using ::testing::_; using ::testing::AtLeast; - + EXPECT_CALL(*m_mock, UpdateStatus(_)).Times(AtLeast(1)); EXPECT_CALL(*m_mock, UpdateCompletionEstimates(_, _, _, _)).Times(AtLeast(1)); EXPECT_CALL(*m_mock, PrepareRequest(_)) @@ -115,7 +115,7 @@ namespace AZ::IO void MockAllocatorForUnclaimedMemory(IStreamerTypes::RequestMemoryAllocatorMock& mock, AZStd::binary_semaphore& sync) { using ::testing::_; - + EXPECT_CALL(mock, LockAllocator()).Times(1); EXPECT_CALL(mock, UnlockAllocator()) .Times(1) @@ -256,13 +256,13 @@ namespace AZ::IO using ::testing::_; using ::testing::AtLeast; using ::testing::Return; - + EXPECT_CALL(*m_mock, UpdateStatus(_)).Times(AtLeast(1)); EXPECT_CALL(*m_mock, UpdateCompletionEstimates(_, _, _, _)).Times(AtLeast(1)); EXPECT_CALL(*m_mock, PrepareRequest(_)).Times(AtLeast(1)); EXPECT_CALL(*m_mock, ExecuteRequests()).Times(AtLeast(1)); EXPECT_CALL(*m_mock, QueueRequest(_)).Times(1); - + AZStd::atomic_int counter = 2; AZStd::binary_semaphore sync; auto wait = [&sync, &counter](FileRequestHandle) @@ -350,7 +350,7 @@ namespace AZ::IO EXPECT_CALL(*m_mock, UpdateStatus(_)).Times(AnyNumber()); EXPECT_CALL(*m_mock, UpdateCompletionEstimates(_, _, _, _)).Times(AnyNumber()); - + // Pretend to be busy [Iterations] times, then set the status to idle so the Scheduler thread can exit. EXPECT_CALL(*m_mock, ExecuteRequests()) .Times(Iterations + 1) diff --git a/Code/Framework/AzCore/Tests/Streamer/StreamStackEntryConformityTests.h b/Code/Framework/AzCore/Tests/Streamer/StreamStackEntryConformityTests.h index 7162b6efa0..6cbec7ea8a 100644 --- a/Code/Framework/AzCore/Tests/Streamer/StreamStackEntryConformityTests.h +++ b/Code/Framework/AzCore/Tests/Streamer/StreamStackEntryConformityTests.h @@ -97,7 +97,7 @@ namespace AZ::IO TYPED_TEST_P(StreamStackEntryConformityTests, SetContext_ContextIsForwardedToNext_SetContextOnMockIsCalled) { using ::testing::_; - + auto mock = AZStd::make_shared(); auto entry = this->m_description.CreateInstance(); entry.SetNext(mock); @@ -194,14 +194,14 @@ namespace AZ::IO TYPED_TEST_P(StreamStackEntryConformityTests, UpdateStatus_ForwardsCallToNext_NextRecievedCall) { using ::testing::_; - + auto mock = AZStd::make_shared(); auto entry = this->m_description.CreateInstance(); entry.SetNext(mock); EXPECT_CALL(*mock, UpdateStatus(_)) .Times(1); - + StreamStackEntry::Status status; entry.UpdateStatus(status); } @@ -241,7 +241,7 @@ namespace AZ::IO TYPED_TEST_P(StreamStackEntryConformityTests, UpdateStatus_NextHasSmallerNumSlots_ReturnsSmallestNumSlots) { using ::testing::_; - + if (this->m_description.UsesSlots()) { auto mock = AZStd::make_shared(); @@ -264,7 +264,7 @@ namespace AZ::IO TYPED_TEST_P(StreamStackEntryConformityTests, UpdateStatus_NextHasLargerNumSlots_ReturnsSmallestNumSlots) { using ::testing::_; - + if (this->m_description.UsesSlots()) { auto mock = AZStd::make_shared(); @@ -289,7 +289,7 @@ namespace AZ::IO TYPED_TEST_P(StreamStackEntryConformityTests, UpdateCompletionEstimates_ForwardsCallToNext_NextRecievedCall) { using ::testing::_; - + auto mock = AZStd::make_shared(); auto entry = this->m_description.CreateInstance(); entry.SetNext(mock); diff --git a/Code/Framework/AzCore/Tests/StreamerTests.cpp b/Code/Framework/AzCore/Tests/StreamerTests.cpp index fec81a9031..78f9f9060f 100644 --- a/Code/Framework/AzCore/Tests/StreamerTests.cpp +++ b/Code/Framework/AzCore/Tests/StreamerTests.cpp @@ -20,301 +20,261 @@ #include #include -namespace AZ +namespace AZ::IO { - namespace IO + namespace Utils { - namespace Utils + //! Create a test file that stores 4 byte integers starting at 0 and incrementing. + //! @filename The name of the file to write to. + //! @filesize The size the new file needs to be in bytes. The stored values will continue till fileSize / 4. + //! @paddingSize The amount of data to insert before and after the file. In total paddingSize / 4 integers + //! will be added. The prefix will be marked with "0xdeadbeef" and the postfix with "0xd15ea5ed". + static void CreateTestFile(const AZStd::string& name, size_t fileSize, size_t paddingSize) { - //! Create a test file that stores 4 byte integers starting at 0 and incrementing. - //! @filename The name of the file to write to. - //! @filesize The size the new file needs to be in bytes. The stored values will continue till fileSize / 4. - //! @paddingSize The amount of data to insert before and after the file. In total paddingSize / 4 integers - //! will be added. The prefix will be marked with "0xdeadbeef" and the postfix with "0xd15ea5ed". - static void CreateTestFile(const AZStd::string& name, size_t fileSize, size_t paddingSize) + constexpr size_t bufferByteSize = 1_mib; + constexpr size_t bufferSize = bufferByteSize / sizeof(u32); + u32* buffer = new u32[bufferSize]; + + AZ_Assert(paddingSize < bufferByteSize, "Padding can't currently be larger than %i bytes.", bufferByteSize); + size_t paddingCount = paddingSize / sizeof(u32); + + FileIOStream stream(name.c_str(), OpenMode::ModeWrite | OpenMode::ModeBinary); + + // Write pre-padding + for (size_t i = 0; i < paddingCount; ++i) { - constexpr size_t bufferByteSize = 1_mib; - constexpr size_t bufferSize = bufferByteSize / sizeof(u32); - u32* buffer = new u32[bufferSize]; - - AZ_Assert(paddingSize < bufferByteSize, "Padding can't currently be larger than %i bytes.", bufferByteSize); - size_t paddingCount = paddingSize / sizeof(u32); + buffer[i] = 0xdeadbeef; + } + stream.Write(paddingSize, buffer); - FileIOStream stream(name.c_str(), OpenMode::ModeWrite | OpenMode::ModeBinary); - - // Write pre-padding - for (size_t i = 0; i < paddingCount; ++i) - { - buffer[i] = 0xdeadbeef; - } - stream.Write(paddingSize, buffer); - - // Write content - u32 startIndex = 0; - while (fileSize > bufferByteSize) - { - for (u32 i = 0; i < bufferSize; ++i) - { - buffer[i] = startIndex + i; - } - startIndex += bufferSize; - - stream.Write(bufferByteSize, buffer); - fileSize -= bufferByteSize; - } + // Write content + u32 startIndex = 0; + while (fileSize > bufferByteSize) + { for (u32 i = 0; i < bufferSize; ++i) { buffer[i] = startIndex + i; } - stream.Write(fileSize, buffer); + startIndex += bufferSize; - // Write post-padding - for (size_t i = 0; i < paddingCount; ++i) - { - buffer[i] = 0xd15ea5ed; - } - stream.Write(paddingSize, buffer); + stream.Write(bufferByteSize, buffer); + fileSize -= bufferByteSize; + } + for (u32 i = 0; i < bufferSize; ++i) + { + buffer[i] = startIndex + i; + } + stream.Write(fileSize, buffer); - delete[] buffer; + // Write post-padding + for (size_t i = 0; i < paddingCount; ++i) + { + buffer[i] = 0xd15ea5ed; + } + stream.Write(paddingSize, buffer); + + delete[] buffer; + } + } + + struct DedicatedCache_Uncompressed {}; + struct GlobalCache_Uncompressed {}; + struct DedicatedCache_Compressed {}; + struct GlobalCache_Compressed {}; + + enum class PadArchive : bool + { + Yes, + No + }; + + class MockFileBase + { + public: + virtual ~MockFileBase() = default; + + virtual void CreateTestFile(AZStd::string filename, size_t fileSize, PadArchive padding) = 0; + virtual const AZStd::string& GetFileName() const = 0; + }; + + class MockUncompressedFile + : public MockFileBase + { + public: + ~MockUncompressedFile() override + { + if (m_hasFile) + { + FileIOBase::GetInstance()->DestroyPath(m_filename.c_str()); } } - struct DedicatedCache_Uncompressed {}; - struct GlobalCache_Uncompressed {}; - struct DedicatedCache_Compressed {}; - struct GlobalCache_Compressed {}; - - enum class PadArchive : bool + void CreateTestFile(AZStd::string filename, size_t fileSize, PadArchive) override { - Yes, - No - }; + m_fileSize = fileSize; + m_filename = AZStd::move(filename); + Utils::CreateTestFile(m_filename, m_fileSize, 0); + m_hasFile = true; + } - class MockFileBase + const AZStd::string& GetFileName() const override { - public: - virtual ~MockFileBase() = default; + return m_filename; + } - virtual void CreateTestFile(AZStd::string filename, size_t fileSize, PadArchive padding) = 0; - virtual const AZStd::string& GetFileName() const = 0; - }; + private: + AZStd::string m_filename; + size_t m_fileSize = 0; + bool m_hasFile = false; + }; - class MockUncompressedFile - : public MockFileBase + class MockCompressedFile + : public MockFileBase + , public CompressionBus::Handler + { + public: + static constexpr uint32_t s_tag = static_cast('T') << 24 | static_cast('E') << 16 | static_cast('S') << 8 | static_cast('T'); + static constexpr uint32_t s_paddingSize = 512; // Use this amount of bytes before and after a generated file as padding. + + ~MockCompressedFile() override { - public: - ~MockUncompressedFile() override + if (m_hasFile) { - if (m_hasFile) - { - FileIOBase::GetInstance()->DestroyPath(m_filename.c_str()); - } + BusDisconnect(); + FileIOBase::GetInstance()->DestroyPath(m_filename.c_str()); + } + } + + void CreateTestFile(AZStd::string filename, size_t fileSize, PadArchive padding) override + { + m_fileSize = fileSize; + m_filename = AZStd::move(filename); + m_hasPadding = (padding == PadArchive::Yes); + uint32_t paddingSize = s_paddingSize; + Utils::CreateTestFile(m_filename, m_fileSize / 2, m_hasPadding ? paddingSize : 0 ); + + m_hasFile = true; + + BusConnect(); + } + + const AZStd::string& GetFileName() const override + { + return m_filename; + } + + void Decompress(const AZ::IO::CompressionInfo& info, const void* compressed, size_t compressedSize, + void* uncompressed, size_t uncompressedSize) + { + constexpr uint32_t tag = s_tag; + ASSERT_EQ(info.m_compressionTag.m_code, tag); + ASSERT_EQ(info.m_compressedSize, m_fileSize / 2); + ASSERT_TRUE(info.m_isCompressed); + uint32_t paddingSize = s_paddingSize; + ASSERT_EQ(info.m_offset, m_hasPadding ? paddingSize : 0); + ASSERT_EQ(info.m_uncompressedSize, m_fileSize); + + // Check the input + ASSERT_EQ(compressedSize, m_fileSize / 2); + const u32* values = reinterpret_cast(compressed); + const size_t numValues = compressedSize / sizeof(u32); + for (size_t i = 0; i < numValues; ++i) + { + EXPECT_EQ(values[i], i); } - void CreateTestFile(AZStd::string filename, size_t fileSize, PadArchive) override + // Create the fake uncompressed data. + ASSERT_EQ(uncompressedSize, m_fileSize); + u32* output = reinterpret_cast(uncompressed); + size_t outputSize = uncompressedSize / sizeof(u32); + for (size_t i = 0; i < outputSize; ++i) { - m_fileSize = fileSize; - m_filename = AZStd::move(filename); - Utils::CreateTestFile(m_filename, m_fileSize, 0); - m_hasFile = true; + output[i] = static_cast(i); } + } - const AZStd::string& GetFileName() const override - { - return m_filename; - } - - private: - AZStd::string m_filename; - size_t m_fileSize = 0; - bool m_hasFile = false; - }; - - class MockCompressedFile - : public MockFileBase - , public CompressionBus::Handler + //@{ CompressionBus Handler implementation. + void FindCompressionInfo(bool& found, AZ::IO::CompressionInfo& info, const AZStd::string_view filename) override { - public: - static constexpr uint32_t s_tag = static_cast('T') << 24 | static_cast('E') << 16 | static_cast('S') << 8 | static_cast('T'); - static constexpr uint32_t s_paddingSize = 512; // Use this amount of bytes before and after a generated file as padding. - - ~MockCompressedFile() override + if (m_hasFile && m_filename == filename) { - if (m_hasFile) - { - BusDisconnect(); - FileIOBase::GetInstance()->DestroyPath(m_filename.c_str()); - } - } - - void CreateTestFile(AZStd::string filename, size_t fileSize, PadArchive padding) override - { - m_fileSize = fileSize; - m_filename = AZStd::move(filename); - m_hasPadding = (padding == PadArchive::Yes); + found = true; + info.m_archiveFilename.InitFromRelativePath(m_filename.c_str()); + ASSERT_TRUE(info.m_archiveFilename.IsValid()); + info.m_compressedSize = m_fileSize / 2; + const uint32_t tag = s_tag; + info.m_compressionTag.m_code = tag; + info.m_isCompressed = true; uint32_t paddingSize = s_paddingSize; - Utils::CreateTestFile(m_filename, m_fileSize / 2, m_hasPadding ? paddingSize : 0 ); - - m_hasFile = true; + info.m_offset = m_hasPadding ? paddingSize : 0; + info.m_uncompressedSize = m_fileSize; - BusConnect(); - } - - const AZStd::string& GetFileName() const override - { - return m_filename; - } - - void Decompress(const AZ::IO::CompressionInfo& info, const void* compressed, size_t compressedSize, - void* uncompressed, size_t uncompressedSize) - { - constexpr uint32_t tag = s_tag; - ASSERT_EQ(info.m_compressionTag.m_code, tag); - ASSERT_EQ(info.m_compressedSize, m_fileSize / 2); - ASSERT_TRUE(info.m_isCompressed); - uint32_t paddingSize = s_paddingSize; - ASSERT_EQ(info.m_offset, m_hasPadding ? paddingSize : 0); - ASSERT_EQ(info.m_uncompressedSize, m_fileSize); - - // Check the input - ASSERT_EQ(compressedSize, m_fileSize / 2); - const u32* values = reinterpret_cast(compressed); - const size_t numValues = compressedSize / sizeof(u32); - for (size_t i = 0; i < numValues; ++i) + info.m_decompressor = + [this](const AZ::IO::CompressionInfo& info, const void* compressed, + size_t compressedSize, void* uncompressed, size_t uncompressedSize) -> bool { - EXPECT_EQ(values[i], i); - } - - // Create the fake uncompressed data. - ASSERT_EQ(uncompressedSize, m_fileSize); - u32* output = reinterpret_cast(uncompressed); - size_t outputSize = uncompressedSize / sizeof(u32); - for (size_t i = 0; i < outputSize; ++i) - { - output[i] = static_cast(i); - } + Decompress(info, compressed, compressedSize, uncompressed, uncompressedSize); + return true; + }; } + } + //@} - //@{ CompressionBus Handler implementation. - void FindCompressionInfo(bool& found, AZ::IO::CompressionInfo& info, const AZStd::string_view filename) override - { - if (m_hasFile && m_filename == filename) - { - found = true; - info.m_archiveFilename.InitFromRelativePath(m_filename.c_str()); - ASSERT_TRUE(info.m_archiveFilename.IsValid()); - info.m_compressedSize = m_fileSize / 2; - const uint32_t tag = s_tag; - info.m_compressionTag.m_code = tag; - info.m_isCompressed = true; - uint32_t paddingSize = s_paddingSize; - info.m_offset = m_hasPadding ? paddingSize : 0; - info.m_uncompressedSize = m_fileSize; + private: + AZStd::string m_filename; + size_t m_fileSize = 0; + bool m_hasFile = false; + bool m_hasPadding = false; + }; - info.m_decompressor = - [this](const AZ::IO::CompressionInfo& info, const void* compressed, - size_t compressedSize, void* uncompressed, size_t uncompressedSize) -> bool - { - Decompress(info, compressed, compressedSize, uncompressed, uncompressedSize); - return true; - }; - } - } - //@} - - private: - AZStd::string m_filename; - size_t m_fileSize = 0; - bool m_hasFile = false; - bool m_hasPadding = false; - }; - - class GemTestApplication - : public AZ::ComponentApplication + class GemTestApplication + : public AZ::ComponentApplication + { + public: + // ComponentApplication + void SetSettingsRegistrySpecializations(SettingsRegistryInterface::Specializations& specializations) override { - public: - // ComponentApplication - void SetSettingsRegistrySpecializations(SettingsRegistryInterface::Specializations& specializations) override - { - ComponentApplication::SetSettingsRegistrySpecializations(specializations); - specializations.Append("test"); - specializations.Append("gemtest"); - } - }; + ComponentApplication::SetSettingsRegistrySpecializations(specializations); + specializations.Append("test"); + specializations.Append("gemtest"); + } + }; - class StreamerTestBase - : public UnitTest::AllocatorsTestFixture + class StreamerTestBase + : public UnitTest::AllocatorsTestFixture + { + public: + void SetUp() override { - public: - void SetUp() override + AllocatorsTestFixture::SetUp(); + AZ::AllocatorInstance::Create(); + AZ::AllocatorInstance::Create(); + + m_prevFileIO = FileIOBase::GetInstance(); + FileIOBase::SetInstance(&m_fileIO); + + m_application = aznew GemTestApplication(); + AZ::ComponentApplication::Descriptor appDesc; + appDesc.m_useExistingAllocator = true; + auto m_systemEntity = m_application->Create(appDesc); + m_systemEntity->AddComponent(aznew AZ::StreamerComponent()); + m_systemEntity->Init(); + m_systemEntity->Activate(); + + m_streamer = Interface::Get(); + } + + void TearDown() override + { + m_streamer = nullptr; + + m_application->Destroy(); + delete m_application; + m_application = nullptr; + + for (size_t i = 0; i < m_testFileCount; ++i) { - AllocatorsTestFixture::SetUp(); - AZ::AllocatorInstance::Create(); - AZ::AllocatorInstance::Create(); - - m_prevFileIO = FileIOBase::GetInstance(); - FileIOBase::SetInstance(&m_fileIO); - - m_application = aznew GemTestApplication(); - AZ::ComponentApplication::Descriptor appDesc; - appDesc.m_useExistingAllocator = true; - appDesc.m_enableDrilling = false; - auto m_systemEntity = m_application->Create(appDesc); - m_systemEntity->AddComponent(aznew AZ::StreamerComponent()); - m_systemEntity->Init(); - m_systemEntity->Activate(); - - m_streamer = Interface::Get(); - } - - void TearDown() override - { - m_streamer = nullptr; - - m_application->Destroy(); - delete m_application; - m_application = nullptr; - - for (size_t i = 0; i < m_testFileCount; ++i) - { - AZStd::string name = AZStd::string::format("TestFile_%zu.test", i); - -#if AZ_TRAIT_TEST_APPEND_ROOT_FOLDER_TO_PATH - AZ::IO::Path testFullPath(AZ_TRAIT_TEST_ROOT_FOLDER); -#else - AZ::IO::Path testFullPath; -#endif - testFullPath /= name; - - FileIOBase::GetInstance()->DestroyPath(testFullPath.c_str()); - } - - FileIOBase::SetInstance(m_prevFileIO); - - AZ::AllocatorInstance::Destroy(); - AZ::AllocatorInstance::Destroy(); - AllocatorsTestFixture::TearDown(); - } - - //! Requests are typically completed by Streamer before it updates it's internal bookkeeping. - //! If a test depends on getting status information such as if cache files have been cleared - //! then call WaitForScheduler to give Steamers scheduler some time to update it's internal status. - void WaitForScheduler() - { - AZStd::this_thread::sleep_for(AZStd::chrono::milliseconds(250)); - } - - protected: - virtual AZStd::unique_ptr CreateMockFile() = 0; - virtual bool IsUsingArchive() const = 0; - virtual bool CreateDedicatedCache() const = 0; - - //! Create a test file that stores 4 byte integers starting at 0 and incrementing. - //! @filesize The size the new file needs to be in bytes. The stored values will continue till fileSize / 4. - //! @return The name of the test file. - AZStd::unique_ptr CreateTestFile(size_t fileSize, PadArchive padding) - { - AZStd::string name = AZStd::string::format("TestFile_%zu.test", m_testFileCount++); + AZStd::string name = AZStd::string::format("TestFile_%zu.test", i); #if AZ_TRAIT_TEST_APPEND_ROOT_FOLDER_TO_PATH AZ::IO::Path testFullPath(AZ_TRAIT_TEST_ROOT_FOLDER); @@ -323,355 +283,391 @@ namespace AZ #endif testFullPath /= name; - AZStd::unique_ptr result = CreateMockFile(); - result->CreateTestFile(testFullPath.c_str(), fileSize, padding); - if (CreateDedicatedCache()) - { - AZ::Interface::Get()->CreateDedicatedCache(name.c_str()); - } - return result; + FileIOBase::GetInstance()->DestroyPath(testFullPath.c_str()); } - void VerifyTestFile(const void* buffer, size_t fileSize, size_t offset = 0) - { - size_t count = fileSize / sizeof(u32); - size_t numOffset = offset / sizeof(u32); - const u32* data = reinterpret_cast(buffer); - for (size_t i = 0; i < count; ++i) - { - EXPECT_EQ(data[i], i + numOffset); - } - } + FileIOBase::SetInstance(m_prevFileIO); - void AssertTestFile(const void* buffer, size_t fileSize, size_t offset = 0) - { - size_t count = fileSize / sizeof(u32); - size_t numOffset = offset / sizeof(u32); - const u32* data = reinterpret_cast(buffer); - for (size_t i = 0; i < count; ++i) - { - ASSERT_EQ(data[i], i + numOffset); - } - } - - void PeriodicallyCheckedRead(AZStd::string_view filename, void* buffer, u64 fileSize, u64 offset, AZStd::chrono::seconds timeOut) - { - AZStd::binary_semaphore sync; - - AZStd::atomic_bool readSuccessful = false; - auto callback = [&readSuccessful, &sync](FileRequestHandle request) - { - auto streamer = AZ::Interface::Get(); - readSuccessful = streamer->GetRequestStatus(request) == IStreamerTypes::RequestStatus::Completed; - sync.release(); - }; - - FileRequestPtr request = this->m_streamer->Read(filename, buffer, fileSize, fileSize, - IStreamerTypes::s_deadlineNow, IStreamerTypes::s_priorityMedium, offset); - this->m_streamer->SetRequestCompleteCallback(request, AZStd::move(callback)); - this->m_streamer->QueueRequest(AZStd::move(request)); - - bool hasTimedOut = !sync.try_acquire_for(timeOut); - ASSERT_FALSE(hasTimedOut); - ASSERT_TRUE(readSuccessful); - } - - UnitTest::TestFileIOBase m_fileIO; - FileIOBase* m_prevFileIO{ nullptr }; - IStreamer* m_streamer{ nullptr }; - AZ::ComponentApplication* m_application{ nullptr }; - size_t m_testFileCount{ 0 }; - }; - - template - class StreamerTest : public StreamerTestBase - { - protected: - bool IsUsingArchive() const override - { - AZ_Assert(false, "Not correctly specialized."); - return false; - } - - bool CreateDedicatedCache() const override - { - AZ_Assert(false, "Not correctly specialized."); - return false; - } - - AZStd::unique_ptr CreateMockFile() override - { - AZ_Assert(false, "Not correctly specialized."); - return nullptr; - } - }; - - template<> - class StreamerTest : public StreamerTestBase - { - protected: - bool IsUsingArchive() const override { return false; } - bool CreateDedicatedCache() const override { return true; } - AZStd::unique_ptr CreateMockFile() override - { - return AZStd::make_unique(); - } - }; - - template<> - class StreamerTest : public StreamerTestBase - { - protected: - bool IsUsingArchive() const override { return false; } - bool CreateDedicatedCache() const override { return false; } - AZStd::unique_ptr CreateMockFile() override - { - return AZStd::make_unique(); - } - }; - - template<> - class StreamerTest : public StreamerTestBase - { - protected: - bool IsUsingArchive() const override { return true; } - bool CreateDedicatedCache() const override { return true; } - AZStd::unique_ptr CreateMockFile() override - { - return AZStd::make_unique(); - } - }; - - template<> - class StreamerTest : public StreamerTestBase - { - protected: - bool IsUsingArchive() const override { return true; } - bool CreateDedicatedCache() const override { return false; } - AZStd::unique_ptr CreateMockFile() override - { - return AZStd::make_unique(); - } - }; - -#if !AZ_TRAIT_DISABLE_FAILED_STREAMER_TESTS - - TYPED_TEST_CASE_P(StreamerTest); - - // Read a file that's smaller than the cache. - TYPED_TEST_P(StreamerTest, Read_ReadSmallFileEntirely_FileFullyRead) - { - constexpr size_t fileSize = 50_kib; - auto testFile = this->CreateTestFile(fileSize, PadArchive::No); - - char buffer[fileSize]; - this->PeriodicallyCheckedRead(testFile->GetFileName(), buffer, fileSize, 0, AZStd::chrono::seconds(5)); - this->VerifyTestFile(buffer, fileSize); + AZ::AllocatorInstance::Destroy(); + AZ::AllocatorInstance::Destroy(); + AllocatorsTestFixture::TearDown(); } - // Read a large file that will need to be broken into chunks. - TYPED_TEST_P(StreamerTest, Read_ReadLargeFileEntirely_FileFullyRead) + //! Requests are typically completed by Streamer before it updates it's internal bookkeeping. + //! If a test depends on getting status information such as if cache files have been cleared + //! then call WaitForScheduler to give Steamers scheduler some time to update it's internal status. + void WaitForScheduler() { - constexpr size_t fileSize = 10_mib; - auto testFile = this->CreateTestFile(fileSize, PadArchive::No); - - char* buffer = new char[fileSize]; - this->PeriodicallyCheckedRead(testFile->GetFileName(), buffer, fileSize, 0, AZStd::chrono::seconds(5)); - this->VerifyTestFile(buffer, fileSize); - - delete[] buffer; + AZStd::this_thread::sleep_for(AZStd::chrono::milliseconds(250)); } - // Reads multiple small pieces to make sure that the cache is hit, seeded and copied properly. - TYPED_TEST_P(StreamerTest, Read_ReadMultiplePieces_AllReadRequestWereSuccessful) + protected: + virtual AZStd::unique_ptr CreateMockFile() = 0; + virtual bool IsUsingArchive() const = 0; + virtual bool CreateDedicatedCache() const = 0; + + //! Create a test file that stores 4 byte integers starting at 0 and incrementing. + //! @filesize The size the new file needs to be in bytes. The stored values will continue till fileSize / 4. + //! @return The name of the test file. + AZStd::unique_ptr CreateTestFile(size_t fileSize, PadArchive padding) { - constexpr size_t fileSize = 2_mib; - // Deliberately not taking a multiple of the file size so at least one read will have a partial cache hit. -#if defined(AZ_DEBUG_BUILD) - constexpr size_t bufferSize = 4800; + AZStd::string name = AZStd::string::format("TestFile_%zu.test", m_testFileCount++); + +#if AZ_TRAIT_TEST_APPEND_ROOT_FOLDER_TO_PATH + AZ::IO::Path testFullPath(AZ_TRAIT_TEST_ROOT_FOLDER); #else - constexpr size_t bufferSize = 480; + AZ::IO::Path testFullPath; #endif - constexpr size_t readBlock = bufferSize * sizeof(u32); + testFullPath /= name; - auto testFile = this->CreateTestFile(fileSize, PadArchive::No); - - u32 buffer[bufferSize]; - size_t block = 0; - size_t fileRemainder = fileSize; - for (block = 0; block < fileSize; block += readBlock) + AZStd::unique_ptr result = CreateMockFile(); + result->CreateTestFile(testFullPath.c_str(), fileSize, padding); + if (CreateDedicatedCache()) { - size_t blockSize = AZStd::min(readBlock, fileRemainder); - this->PeriodicallyCheckedRead(testFile->GetFileName(), buffer, blockSize, block, AZStd::chrono::seconds(5)); - this->AssertTestFile(buffer, blockSize, block); + AZ::Interface::Get()->CreateDedicatedCache(name.c_str()); + } + return result; + } - fileRemainder -= blockSize; + void VerifyTestFile(const void* buffer, size_t fileSize, size_t offset = 0) + { + size_t count = fileSize / sizeof(u32); + size_t numOffset = offset / sizeof(u32); + const u32* data = reinterpret_cast(buffer); + for (size_t i = 0; i < count; ++i) + { + EXPECT_EQ(data[i], i + numOffset); } } - // Same as the previous test, but all requests are submitted in a single batch. - TYPED_TEST_P(StreamerTest, Read_ReadMultiplePiecesWithBatch_AllReadRequestWereSuccessful) + void AssertTestFile(const void* buffer, size_t fileSize, size_t offset = 0) { - constexpr size_t fileSize = 2_mib; - // Deliberately not taking a multiple of the file size so at least one read will have a partial cache hit. -#if defined(AZ_DEBUG_BUILD) - constexpr size_t bufferSize = 4800 * sizeof(u32); -#else - constexpr size_t bufferSize = 480 * sizeof(u32); -#endif - constexpr size_t numRequests = (fileSize / bufferSize) + 1; - - auto testFile = this->CreateTestFile(fileSize, PadArchive::No); - - AZStd::vector requests; - this->m_streamer->CreateRequestBatch(requests, numRequests); - - AZStd::binary_semaphore sync; - AZStd::atomic_int remainingReads = numRequests; - - AZStd::atomic_bool readSuccessful = true; - auto callback = [&readSuccessful, &sync, &remainingReads](FileRequestHandle request) + size_t count = fileSize / sizeof(u32); + size_t numOffset = offset / sizeof(u32); + const u32* data = reinterpret_cast(buffer); + for (size_t i = 0; i < count; ++i) { - if (AZ::Interface::Get()->GetRequestStatus(request) != IStreamerTypes::RequestStatus::Completed) - { - readSuccessful = false; - } - if (--remainingReads == 0) - { - sync.release(); - } - }; - - u8* buffer = new u8[fileSize]; - size_t block = 0; - size_t fileRemainder = fileSize; - size_t requestIndex = 0; - for (block = 0; block < fileSize; block += bufferSize) - { - size_t blockSize = AZStd::min(bufferSize, fileRemainder); - this->m_streamer->Read(requests[requestIndex], testFile->GetFileName(), buffer + block, blockSize, blockSize, - IStreamerTypes::s_deadlineNow, IStreamerTypes::s_priorityMedium, block); - this->m_streamer->SetRequestCompleteCallback(requests[requestIndex], callback); - fileRemainder -= blockSize; - requestIndex++; + ASSERT_EQ(data[i], i + numOffset); } - - this->m_streamer->QueueRequestBatch(requests); - bool hasTimedOut = !sync.try_acquire_for(AZStd::chrono::minutes(10)); // Especially in debug this can take a long time. - EXPECT_FALSE(hasTimedOut); - EXPECT_TRUE(readSuccessful); - - fileRemainder = fileSize; - for (block = 0; block < fileSize; block += bufferSize) - { - size_t blockSize = AZStd::min(bufferSize, fileRemainder); - this->AssertTestFile(buffer + block, blockSize, block); - fileRemainder -= blockSize; - } - - delete[] buffer; } - // Queue a request on a suspended device, then resume to see if gets picked up again. - TYPED_TEST_P(StreamerTest, SuspendProcessing_SuspendWhileFileIsQueued_FileIsNotReadUntilProcessingIsRestarted) + void PeriodicallyCheckedRead(AZStd::string_view filename, void* buffer, u64 fileSize, u64 offset, AZStd::chrono::seconds timeOut) { - constexpr size_t fileSize = 50_kib; - auto testFile = this->CreateTestFile(fileSize, PadArchive::No); - AZStd::binary_semaphore sync; AZStd::atomic_bool readSuccessful = false; auto callback = [&readSuccessful, &sync](FileRequestHandle request) { - readSuccessful = AZ::Interface::Get()->GetRequestStatus(request) == IStreamerTypes::RequestStatus::Completed; + auto streamer = AZ::Interface::Get(); + readSuccessful = streamer->GetRequestStatus(request) == IStreamerTypes::RequestStatus::Completed; sync.release(); }; - char buffer[fileSize]; - FileRequestPtr request = this->m_streamer->Read(testFile->GetFileName(), buffer, fileSize, fileSize); + FileRequestPtr request = this->m_streamer->Read(filename, buffer, fileSize, fileSize, + IStreamerTypes::s_deadlineNow, IStreamerTypes::s_priorityMedium, offset); this->m_streamer->SetRequestCompleteCallback(request, AZStd::move(callback)); - - this->m_streamer->SuspendProcessing(); this->m_streamer->QueueRequest(AZStd::move(request)); - // Sleep for a short while to make sure the test doesn't outrun the Streamer. - AZStd::this_thread::sleep_for(AZStd::chrono::seconds(1)); - EXPECT_EQ(IStreamerTypes::RequestStatus::Pending, this->m_streamer->GetRequestStatus(request)); - - // Wait for a maximum of a few seconds for the request to complete. If it doesn't, the suspend is most likely stuck and the test should fail. - this->m_streamer->ResumeProcessing(); - bool hasTimedOut = !sync.try_acquire_for(AZStd::chrono::seconds(5)); - EXPECT_FALSE(hasTimedOut); - EXPECT_TRUE(readSuccessful); + bool hasTimedOut = !sync.try_acquire_for(timeOut); + ASSERT_FALSE(hasTimedOut); + ASSERT_TRUE(readSuccessful); } - TYPED_TEST_P(StreamerTest, FlushCaches_FlushAfterEveryRead_FilesAreReadCorrectly) + UnitTest::TestFileIOBase m_fileIO; + FileIOBase* m_prevFileIO{ nullptr }; + IStreamer* m_streamer{ nullptr }; + AZ::ComponentApplication* m_application{ nullptr }; + size_t m_testFileCount{ 0 }; + }; + + template + class StreamerTest : public StreamerTestBase + { + protected: + bool IsUsingArchive() const override { - constexpr size_t fileSize = 4_mib; - constexpr size_t fileCount = 128; - - AZStd::vector> testFiles; - AZStd::vector> testData; - AZStd::vector requests; - testFiles.reserve(fileCount); - testData.reserve(fileCount); - requests.reserve(fileCount * 2); - - AZStd::binary_semaphore sync; - AZStd::atomic_bool readSuccessful = true; - AZStd::atomic_int counter = fileCount * 2; - - auto callback = [&sync, &counter, &readSuccessful](FileRequestHandle request) - { - readSuccessful = readSuccessful && AZ::Interface::Get()->GetRequestStatus(request) == IStreamerTypes::RequestStatus::Completed; - counter--; - if (counter == 0) - { - sync.release(); - } - }; - - for (size_t i = 0; i < fileCount; ++i) - { - auto testFile = this->CreateTestFile(fileSize, PadArchive::No); - AZStd::unique_ptr buffer(new char[fileSize]); - - auto readRequest = this->m_streamer->Read(testFile->GetFileName(), buffer.get(), fileSize, fileSize); - this->m_streamer->SetRequestCompleteCallback(readRequest, callback); - auto flushRequest = this->m_streamer->FlushCaches(); - this->m_streamer->SetRequestCompleteCallback(flushRequest, callback); - - requests.push_back(AZStd::move(readRequest)); - requests.push_back(AZStd::move(flushRequest)); - - testFiles.push_back(AZStd::move(testFile)); - testData.push_back(AZStd::move(buffer)); - } - - for (size_t i = 0; i < fileCount * 2; i += 2) - { - this->m_streamer->QueueRequest(requests[i]); - this->m_streamer->QueueRequest(requests[i + 1]); - AZStd::this_thread::yield(); - } - - bool hasTimedOut = !sync.try_acquire_for(AZStd::chrono::seconds(30)); - EXPECT_FALSE(hasTimedOut); - EXPECT_TRUE(readSuccessful); + AZ_Assert(false, "Not correctly specialized."); + return false; } - REGISTER_TYPED_TEST_CASE_P(StreamerTest, - Read_ReadSmallFileEntirely_FileFullyRead, - Read_ReadLargeFileEntirely_FileFullyRead, - Read_ReadMultiplePieces_AllReadRequestWereSuccessful, - Read_ReadMultiplePiecesWithBatch_AllReadRequestWereSuccessful, - SuspendProcessing_SuspendWhileFileIsQueued_FileIsNotReadUntilProcessingIsRestarted, - FlushCaches_FlushAfterEveryRead_FilesAreReadCorrectly); + bool CreateDedicatedCache() const override + { + AZ_Assert(false, "Not correctly specialized."); + return false; + } - using StreamerTestCases = ::testing::Types; + AZStd::unique_ptr CreateMockFile() override + { + AZ_Assert(false, "Not correctly specialized."); + return nullptr; + } + }; - INSTANTIATE_TYPED_TEST_CASE_P(StreamerTests, StreamerTest, StreamerTestCases); + template<> + class StreamerTest : public StreamerTestBase + { + protected: + bool IsUsingArchive() const override { return false; } + bool CreateDedicatedCache() const override { return true; } + AZStd::unique_ptr CreateMockFile() override + { + return AZStd::make_unique(); + } + }; + + template<> + class StreamerTest : public StreamerTestBase + { + protected: + bool IsUsingArchive() const override { return false; } + bool CreateDedicatedCache() const override { return false; } + AZStd::unique_ptr CreateMockFile() override + { + return AZStd::make_unique(); + } + }; + + template<> + class StreamerTest : public StreamerTestBase + { + protected: + bool IsUsingArchive() const override { return true; } + bool CreateDedicatedCache() const override { return true; } + AZStd::unique_ptr CreateMockFile() override + { + return AZStd::make_unique(); + } + }; + + template<> + class StreamerTest : public StreamerTestBase + { + protected: + bool IsUsingArchive() const override { return true; } + bool CreateDedicatedCache() const override { return false; } + AZStd::unique_ptr CreateMockFile() override + { + return AZStd::make_unique(); + } + }; + +#if !AZ_TRAIT_DISABLE_FAILED_STREAMER_TESTS + + TYPED_TEST_CASE_P(StreamerTest); + + // Read a file that's smaller than the cache. + TYPED_TEST_P(StreamerTest, Read_ReadSmallFileEntirely_FileFullyRead) + { + constexpr size_t fileSize = 50_kib; + auto testFile = this->CreateTestFile(fileSize, PadArchive::No); + + char buffer[fileSize]; + this->PeriodicallyCheckedRead(testFile->GetFileName(), buffer, fileSize, 0, AZStd::chrono::seconds(5)); + this->VerifyTestFile(buffer, fileSize); + } + + // Read a large file that will need to be broken into chunks. + TYPED_TEST_P(StreamerTest, Read_ReadLargeFileEntirely_FileFullyRead) + { + constexpr size_t fileSize = 10_mib; + auto testFile = this->CreateTestFile(fileSize, PadArchive::No); + + char* buffer = new char[fileSize]; + this->PeriodicallyCheckedRead(testFile->GetFileName(), buffer, fileSize, 0, AZStd::chrono::seconds(5)); + this->VerifyTestFile(buffer, fileSize); + + delete[] buffer; + } + + // Reads multiple small pieces to make sure that the cache is hit, seeded and copied properly. + TYPED_TEST_P(StreamerTest, Read_ReadMultiplePieces_AllReadRequestWereSuccessful) + { + constexpr size_t fileSize = 2_mib; + // Deliberately not taking a multiple of the file size so at least one read will have a partial cache hit. +#if defined(AZ_DEBUG_BUILD) + constexpr size_t bufferSize = 4800; +#else + constexpr size_t bufferSize = 480; +#endif + constexpr size_t readBlock = bufferSize * sizeof(u32); + + auto testFile = this->CreateTestFile(fileSize, PadArchive::No); + + u32 buffer[bufferSize]; + size_t block = 0; + size_t fileRemainder = fileSize; + for (block = 0; block < fileSize; block += readBlock) + { + size_t blockSize = AZStd::min(readBlock, fileRemainder); + this->PeriodicallyCheckedRead(testFile->GetFileName(), buffer, blockSize, block, AZStd::chrono::seconds(5)); + this->AssertTestFile(buffer, blockSize, block); + + fileRemainder -= blockSize; + } + } + + // Same as the previous test, but all requests are submitted in a single batch. + TYPED_TEST_P(StreamerTest, Read_ReadMultiplePiecesWithBatch_AllReadRequestWereSuccessful) + { + constexpr size_t fileSize = 2_mib; + // Deliberately not taking a multiple of the file size so at least one read will have a partial cache hit. +#if defined(AZ_DEBUG_BUILD) + constexpr size_t bufferSize = 4800 * sizeof(u32); +#else + constexpr size_t bufferSize = 480 * sizeof(u32); +#endif + constexpr size_t numRequests = (fileSize / bufferSize) + 1; + + auto testFile = this->CreateTestFile(fileSize, PadArchive::No); + + AZStd::vector requests; + this->m_streamer->CreateRequestBatch(requests, numRequests); + + AZStd::binary_semaphore sync; + AZStd::atomic_int remainingReads = numRequests; + + AZStd::atomic_bool readSuccessful = true; + auto callback = [&readSuccessful, &sync, &remainingReads](FileRequestHandle request) + { + if (AZ::Interface::Get()->GetRequestStatus(request) != IStreamerTypes::RequestStatus::Completed) + { + readSuccessful = false; + } + if (--remainingReads == 0) + { + sync.release(); + } + }; + + u8* buffer = new u8[fileSize]; + size_t block = 0; + size_t fileRemainder = fileSize; + size_t requestIndex = 0; + for (block = 0; block < fileSize; block += bufferSize) + { + size_t blockSize = AZStd::min(bufferSize, fileRemainder); + this->m_streamer->Read(requests[requestIndex], testFile->GetFileName(), buffer + block, blockSize, blockSize, + IStreamerTypes::s_deadlineNow, IStreamerTypes::s_priorityMedium, block); + this->m_streamer->SetRequestCompleteCallback(requests[requestIndex], callback); + fileRemainder -= blockSize; + requestIndex++; + } + + this->m_streamer->QueueRequestBatch(requests); + bool hasTimedOut = !sync.try_acquire_for(AZStd::chrono::minutes(10)); // Especially in debug this can take a long time. + EXPECT_FALSE(hasTimedOut); + EXPECT_TRUE(readSuccessful); + + fileRemainder = fileSize; + for (block = 0; block < fileSize; block += bufferSize) + { + size_t blockSize = AZStd::min(bufferSize, fileRemainder); + this->AssertTestFile(buffer + block, blockSize, block); + fileRemainder -= blockSize; + } + + delete[] buffer; + } + + // Queue a request on a suspended device, then resume to see if gets picked up again. + TYPED_TEST_P(StreamerTest, SuspendProcessing_SuspendWhileFileIsQueued_FileIsNotReadUntilProcessingIsRestarted) + { + constexpr size_t fileSize = 50_kib; + auto testFile = this->CreateTestFile(fileSize, PadArchive::No); + + AZStd::binary_semaphore sync; + + AZStd::atomic_bool readSuccessful = false; + auto callback = [&readSuccessful, &sync](FileRequestHandle request) + { + readSuccessful = AZ::Interface::Get()->GetRequestStatus(request) == IStreamerTypes::RequestStatus::Completed; + sync.release(); + }; + + char buffer[fileSize]; + FileRequestPtr request = this->m_streamer->Read(testFile->GetFileName(), buffer, fileSize, fileSize); + this->m_streamer->SetRequestCompleteCallback(request, AZStd::move(callback)); + + this->m_streamer->SuspendProcessing(); + this->m_streamer->QueueRequest(AZStd::move(request)); + + // Sleep for a short while to make sure the test doesn't outrun the Streamer. + AZStd::this_thread::sleep_for(AZStd::chrono::seconds(1)); + EXPECT_EQ(IStreamerTypes::RequestStatus::Pending, this->m_streamer->GetRequestStatus(request)); + + // Wait for a maximum of a few seconds for the request to complete. If it doesn't, the suspend is most likely stuck and the test should fail. + this->m_streamer->ResumeProcessing(); + bool hasTimedOut = !sync.try_acquire_for(AZStd::chrono::seconds(5)); + EXPECT_FALSE(hasTimedOut); + EXPECT_TRUE(readSuccessful); + } + + TYPED_TEST_P(StreamerTest, FlushCaches_FlushAfterEveryRead_FilesAreReadCorrectly) + { + constexpr size_t fileSize = 4_mib; + constexpr size_t fileCount = 128; + + AZStd::vector> testFiles; + AZStd::vector> testData; + AZStd::vector requests; + testFiles.reserve(fileCount); + testData.reserve(fileCount); + requests.reserve(fileCount * 2); + + AZStd::binary_semaphore sync; + AZStd::atomic_bool readSuccessful = true; + AZStd::atomic_int counter = fileCount * 2; + + auto callback = [&sync, &counter, &readSuccessful](FileRequestHandle request) + { + readSuccessful = readSuccessful && AZ::Interface::Get()->GetRequestStatus(request) == IStreamerTypes::RequestStatus::Completed; + counter--; + if (counter == 0) + { + sync.release(); + } + }; + + for (size_t i = 0; i < fileCount; ++i) + { + auto testFile = this->CreateTestFile(fileSize, PadArchive::No); + AZStd::unique_ptr buffer(new char[fileSize]); + + auto readRequest = this->m_streamer->Read(testFile->GetFileName(), buffer.get(), fileSize, fileSize); + this->m_streamer->SetRequestCompleteCallback(readRequest, callback); + auto flushRequest = this->m_streamer->FlushCaches(); + this->m_streamer->SetRequestCompleteCallback(flushRequest, callback); + + requests.push_back(AZStd::move(readRequest)); + requests.push_back(AZStd::move(flushRequest)); + + testFiles.push_back(AZStd::move(testFile)); + testData.push_back(AZStd::move(buffer)); + } + + for (size_t i = 0; i < fileCount * 2; i += 2) + { + this->m_streamer->QueueRequest(requests[i]); + this->m_streamer->QueueRequest(requests[i + 1]); + AZStd::this_thread::yield(); + } + + bool hasTimedOut = !sync.try_acquire_for(AZStd::chrono::seconds(30)); + EXPECT_FALSE(hasTimedOut); + EXPECT_TRUE(readSuccessful); + } + + REGISTER_TYPED_TEST_CASE_P(StreamerTest, + Read_ReadSmallFileEntirely_FileFullyRead, + Read_ReadLargeFileEntirely_FileFullyRead, + Read_ReadMultiplePieces_AllReadRequestWereSuccessful, + Read_ReadMultiplePiecesWithBatch_AllReadRequestWereSuccessful, + SuspendProcessing_SuspendWhileFileIsQueued_FileIsNotReadUntilProcessingIsRestarted, + FlushCaches_FlushAfterEveryRead_FilesAreReadCorrectly); + + using StreamerTestCases = ::testing::Types; + + INSTANTIATE_TYPED_TEST_CASE_P(StreamerTests, StreamerTest, StreamerTestCases); #endif // AZ_TRAIT_DISABLE_FAILED_STREAMER_TESTS - } // namespace IO -} // namespace AZ +} // namespace AZ::IO diff --git a/Code/Framework/AzCore/Tests/TaskTests.cpp b/Code/Framework/AzCore/Tests/TaskTests.cpp index 9e839f60ee..4f53772d51 100644 --- a/Code/Framework/AzCore/Tests/TaskTests.cpp +++ b/Code/Framework/AzCore/Tests/TaskTests.cpp @@ -610,15 +610,16 @@ namespace UnitTest g.Follows(e, f); g.Precedes(d); - TaskGraphEvent ev; - graph.SubmitOnExecutor(*m_executor, &ev); - ev.Wait(); + TaskGraphEvent ev1; + graph.SubmitOnExecutor(*m_executor, &ev1); + ev1.Wait(); EXPECT_EQ(3 | 0b100000, x); x = 0; - graph.SubmitOnExecutor(*m_executor, &ev); - ev.Wait(); + TaskGraphEvent ev2; + graph.SubmitOnExecutor(*m_executor, &ev2); + ev2.Wait(); EXPECT_EQ(3 | 0b100000, x); } diff --git a/Code/Framework/AzCore/Tests/TestCatalog.cpp b/Code/Framework/AzCore/Tests/TestCatalog.cpp index c633c6391b..cb8fa11c72 100644 --- a/Code/Framework/AzCore/Tests/TestCatalog.cpp +++ b/Code/Framework/AzCore/Tests/TestCatalog.cpp @@ -167,7 +167,8 @@ namespace UnitTest if (!info.m_streamName.empty()) { AZStd::string fullName = GetTestFolderPath() + info.m_streamName; - info.m_dataLen = static_cast(IO::SystemFile::Length(fullName.c_str())); + IO::FileIOBase* io = IO::FileIOBase::GetInstance(); + io->Size(fullName.c_str(), info.m_dataLen); } else { @@ -187,8 +188,11 @@ namespace UnitTest if (!info.m_streamName.empty()) { + IO::FileIOBase* io = AZ::IO::FileIOBase::GetInstance(); + AZStd::string fullName = GetTestFolderPath() + info.m_streamName; - info.m_dataLen = static_cast(IO::SystemFile::Length(fullName.c_str())); + + io->Size(fullName.c_str(), info.m_dataLen); } else { diff --git a/Code/Framework/AzCore/Tests/Time/TimeTests.cpp b/Code/Framework/AzCore/Tests/Time/TimeTests.cpp index 6727ef1501..164e72343b 100644 --- a/Code/Framework/AzCore/Tests/Time/TimeTests.cpp +++ b/Code/Framework/AzCore/Tests/Time/TimeTests.cpp @@ -6,28 +6,27 @@ * */ -#include +#include #include namespace UnitTest { - class TimeTests - : public AllocatorsFixture + class TimeTests : public AllocatorsFixture { public: void SetUp() override { SetupAllocator(); - m_timeComponent = new AZ::TimeSystemComponent; + m_timeSystem = AZStd::make_unique(); } void TearDown() override { - delete m_timeComponent; + m_timeSystem.reset(); TeardownAllocator(); } - AZ::TimeSystemComponent* m_timeComponent = nullptr; + AZStd::unique_ptr m_timeSystem; }; TEST_F(TimeTests, TestConversionUsToMs) @@ -44,6 +43,30 @@ namespace UnitTest EXPECT_EQ(timeUs, AZ::TimeUs{ 1000000 }); } + TEST_F(TimeTests, TestConversionTimeMsToSeconds) + { + AZ::TimeMs timeMs = AZ::TimeMs{ 1000 }; + float timeSecondsFloat = AZ::TimeMsToSeconds(timeMs); + EXPECT_TRUE(AZ::IsClose(timeSecondsFloat, 1.0f)); + + double timeSecondsDouble = AZ::TimeMsToSecondsDouble(timeMs); + EXPECT_TRUE(AZ::IsClose(timeSecondsDouble, 1.0)); + } + + TEST_F(TimeTests, TestConversionSecondsToTimeUs) + { + double seconds = 1.0; + AZ::TimeUs timeUs = AZ::SecondsToTimeUs(seconds); + EXPECT_EQ(timeUs, AZ::TimeUs{ 1000000 }); + } + + TEST_F(TimeTests, TestConversionSecondsToTimeMs) + { + double seconds = 1.0; + AZ::TimeMs timeMs = AZ::SecondsToTimeMs(seconds); + EXPECT_EQ(timeMs, AZ::TimeMs{ 1000 }); + } + TEST_F(TimeTests, TestClocks) { AZ::TimeUs timeUs = AZ::GetElapsedTimeUs(); @@ -53,4 +76,4 @@ namespace UnitTest int64_t delta = static_cast(timeMs) - static_cast(timeUsToMs); EXPECT_LT(abs(delta), 1); } -} +} // namespace UnitTest diff --git a/Code/Framework/AzCore/Tests/azcoretests_files.cmake b/Code/Framework/AzCore/Tests/azcoretests_files.cmake index d39595c45e..834e3431b6 100644 --- a/Code/Framework/AzCore/Tests/azcoretests_files.cmake +++ b/Code/Framework/AzCore/Tests/azcoretests_files.cmake @@ -69,7 +69,6 @@ set(FILES TickBusTest.cpp UUIDTests.cpp XML.cpp - Debug/AssetTracking.cpp Debug/LocalFileEventLoggerTests.cpp Debug/Trace.cpp Debug/UnhandledExceptions.cpp @@ -112,6 +111,7 @@ set(FILES Serialization/Json/MapSerializerTests.cpp Serialization/Json/MathVectorSerializerTests.cpp Serialization/Json/MathMatrixSerializerTests.cpp + Serialization/Json/PathSerializerTests.cpp Serialization/Json/SmartPointerSerializerTests.cpp Serialization/Json/StringSerializerTests.cpp Serialization/Json/TestCases.h @@ -148,6 +148,7 @@ set(FILES Math/Matrix4x4PerformanceTests.cpp Math/Matrix4x4Tests.cpp Math/MatrixUtilsTests.cpp + Math/MathTest.h Math/MathTestData.h Math/ObbPerformanceTests.cpp Math/ObbTests.cpp @@ -170,6 +171,7 @@ set(FILES Math/Vector3Tests.cpp Math/Vector4PerformanceTests.cpp Math/Vector4Tests.cpp + Memory/AllocatorBenchmarks.cpp Memory/AllocatorManager.cpp Memory/HphaSchema.cpp Memory/HphaSchemaErrorDetection.cpp @@ -213,6 +215,8 @@ set(FILES AZStd/Variant.cpp AZStd/VariantSerialization.cpp AZStd/VectorAndArray.cpp + DOM/DomJsonTests.cpp + DOM/DomJsonBenchmarks.cpp ) # Prevent the following files from being grouped in UNITY builds diff --git a/Code/Framework/AzFramework/AzFramework/API/ApplicationAPI.h b/Code/Framework/AzFramework/AzFramework/API/ApplicationAPI.h index 1c5db0a82b..e536082d61 100644 --- a/Code/Framework/AzFramework/AzFramework/API/ApplicationAPI.h +++ b/Code/Framework/AzFramework/AzFramework/API/ApplicationAPI.h @@ -67,12 +67,6 @@ namespace AzFramework /// Make path relative to the provided root. virtual void MakePathRelative(AZStd::string& /*fullPath*/, const char* /*rootPath*/) {} - /// Gets the engine root path where the modules for the current engine are located. - virtual const char* GetEngineRoot() const { return nullptr; } - - /// Retrieves the app root path for the application. - virtual const char* GetAppRoot() const { return nullptr; } - /// Get the Command Line arguments passed in. virtual const CommandLine* GetCommandLine() { return nullptr; } diff --git a/Code/Framework/AzFramework/AzFramework/Application/Application.cpp b/Code/Framework/AzFramework/AzFramework/Application/Application.cpp index 323e834413..b3521a877f 100644 --- a/Code/Framework/AzFramework/AzFramework/Application/Application.cpp +++ b/Code/Framework/AzFramework/AzFramework/Application/Application.cpp @@ -69,6 +69,7 @@ #include #include #include +#include #include "Application.h" #include @@ -224,13 +225,6 @@ namespace AzFramework } } - void Application::PreModuleLoad() - { - SetRootPath(RootPathType::EngineRoot, m_engineRoot.c_str()); - AZ_TracePrintf(s_azFrameworkWarningWindow, "Engine Path: %s\n", m_engineRoot.c_str()); - } - - void Application::Stop() { if (m_isStarted) @@ -318,6 +312,8 @@ namespace AzFramework AzFramework::SurfaceData::SurfaceTagWeight::Reflect(context); AzFramework::SurfaceData::SurfacePoint::Reflect(context); AzFramework::Terrain::TerrainDataRequests::Reflect(context); + Physics::HeightfieldProviderRequests::Reflect(context); + Physics::HeightMaterialPoint::Reflect(context); if (AZ::SerializeContext* serializeContext = azrtti_cast(context)) { @@ -394,11 +390,6 @@ namespace AzFramework outModules.emplace_back(aznew AzFrameworkModule()); } - const char* Application::GetAppRoot() const - { - return m_appRoot.c_str(); - } - const char* Application::GetCurrentConfigurationName() const { #if defined(_RELEASE) @@ -434,19 +425,19 @@ namespace AzFramework void Application::ResolveEnginePath(AZStd::string& engineRelativePath) const { - AZ::IO::FixedMaxPath fullPath = m_engineRoot / engineRelativePath; + auto fullPath = AZ::IO::FixedMaxPath(GetEngineRoot()) / engineRelativePath; engineRelativePath = fullPath.String(); } void Application::CalculateBranchTokenForEngineRoot(AZStd::string& token) const { - AzFramework::StringFunc::AssetPath::CalculateBranchToken(m_engineRoot.String(), token); + AZ::StringFunc::AssetPath::CalculateBranchToken(GetEngineRoot(), token); } //////////////////////////////////////////////////////////////////////////// void Application::MakePathRootRelative(AZStd::string& fullPath) { - MakePathRelative(fullPath, m_engineRoot.c_str()); + MakePathRelative(fullPath, GetEngineRoot()); } //////////////////////////////////////////////////////////////////////////// @@ -562,11 +553,9 @@ namespace AzFramework //////////////////////////////////////////////////////////////////////////// - AZ_CVAR(float, t_frameTimeOverride, 0.0f, nullptr, AZ::ConsoleFunctorFlags::Null, "If > 0, overrides the application delta frame-time with the provided value"); - - void Application::Tick(float deltaOverride /*= -1.f*/) + void Application::Tick() { - ComponentApplication::Tick((t_frameTimeOverride > 0.0f) ? t_frameTimeOverride : deltaOverride); + ComponentApplication::Tick(); } //////////////////////////////////////////////////////////////////////////// @@ -582,30 +571,6 @@ namespace AzFramework } } - void Application::SetRootPath(RootPathType type, const char* source) - { - [[maybe_unused]] const size_t sourceLen = strlen(source); - - // Copy the source path to the intended root path and correct the path separators as well - switch (type) - { - case RootPathType::AppRoot: - { - AZ_Assert(sourceLen < m_appRoot.Native().max_size(), "String overflow for App Root: %s", source); - m_appRoot = AZ::IO::PathView(source).LexicallyNormal(); - } - break; - case RootPathType::EngineRoot: - { - AZ_Assert(sourceLen < m_engineRoot.Native().max_size(), "String overflow for Engine Root: %s", source); - m_engineRoot = AZ::IO::PathView(source).LexicallyNormal(); - } - break; - default: - AZ_Assert(false, "Invalid RootPathType (%d)", static_cast(type)); - } - } - struct DeprecatedAliasesKeyVisitor : AZ::SettingsRegistryInterface::Visitor { diff --git a/Code/Framework/AzFramework/AzFramework/Application/Application.h b/Code/Framework/AzFramework/AzFramework/Application/Application.h index c6b1dfeaae..27144e4376 100644 --- a/Code/Framework/AzFramework/AzFramework/Application/Application.h +++ b/Code/Framework/AzFramework/AzFramework/Application/Application.h @@ -87,7 +87,7 @@ namespace AzFramework */ virtual void Stop(); - void Tick(float deltaOverride = -1.f) override; + void Tick() override; AZ::ComponentTypeList GetRequiredSystemComponents() const override; @@ -95,8 +95,6 @@ namespace AzFramework ////////////////////////////////////////////////////////////////////////// //! ApplicationRequests::Bus::Handler - const char* GetEngineRoot() const override { return m_engineRoot.c_str(); } - const char* GetAppRoot() const override; void ResolveEnginePath(AZStd::string& engineRelativePath) const override; void CalculateBranchTokenForEngineRoot(AZStd::string& token) const override; bool IsPrefabSystemEnabled() const override; @@ -146,8 +144,6 @@ namespace AzFramework */ void SetFileIOAliases(); - void PreModuleLoad() override; - ////////////////////////////////////////////////////////////////////////// //! AZ::ComponentApplication void RegisterCoreComponents() override; @@ -181,13 +177,7 @@ namespace AzFramework bool m_ownsConsole = false; bool m_exitMainLoopRequested = false; - - enum class RootPathType - { - AppRoot, - EngineRoot - }; - void SetRootPath(RootPathType type, const char* source); + }; } // namespace AzFramework diff --git a/Code/Framework/AzFramework/AzFramework/Archive/Archive.cpp b/Code/Framework/AzFramework/AzFramework/Archive/Archive.cpp index c1c5775958..04802a8d0e 100644 --- a/Code/Framework/AzFramework/AzFramework/Archive/Archive.cpp +++ b/Code/Framework/AzFramework/AzFramework/Archive/Archive.cpp @@ -34,7 +34,6 @@ #include #include #include -#include #include #include #include @@ -43,13 +42,10 @@ namespace AZ::IO { - AZ_CVAR(int, sys_PakPriority, aznumeric_cast(ArchiveVars{}.nPriority), nullptr, AZ::ConsoleFunctorFlags::Null, - "If set to 1, tells Archive to try to open the file in pak first, then go to file system"); - AZ_CVAR(int, sys_PakMessageInvalidFileAccess, ArchiveVars{}.nMessageInvalidFileAccess, nullptr, AZ::ConsoleFunctorFlags::Null, - "Message Box synchronous file access when in game"); - - AZ_CVAR(int, sys_PakWarnOnPakAccessFailures, ArchiveVars{}.nWarnOnPakAccessFails, nullptr, AZ::ConsoleFunctorFlags::Null, - "If 1, access failure for Paks is treated as a warning, if zero it is only a log message."); + AZ_CVAR(int, sys_PakPriority, aznumeric_cast(ArchiveVars{}.m_fileSearchPriority), nullptr, AZ::ConsoleFunctorFlags::Null, + "If set to 0, tells Archive to try to open the file on the file system first othewise check mounted paks.\n" + "If set to 1, tells Archive to try to open the file in pak first, then go to file system.\n" + "If set to 2, tells the Archive to only open files from the pak"); AZ_CVAR(int, sys_report_files_not_found_in_paks, 0, nullptr, AZ::ConsoleFunctorFlags::Null, "Reports when files are searched for in paks and not found. 1 = log, 2 = warning, 3 = error"); AZ_CVAR(int32_t, az_archive_verbosity, 0, nullptr, AZ::ConsoleFunctorFlags::Null, @@ -437,9 +433,9 @@ namespace AZ::IO ////////////////////////////////////////////////////////////////////////// - bool Archive::IsFileExist(AZStd::string_view sFilename, EFileSearchLocation fileLocation) + bool Archive::IsFileExist(AZStd::string_view sFilename, FileSearchLocation fileLocation) { - const AZ::IO::ArchiveLocationPriority nVarPakPriority = GetPakPriority(); + const AZ::IO::FileSearchPriority nVarPakPriority = GetPakPriority(); auto szFullPath = AZ::IO::FileIOBase::GetDirectInstance()->ResolvePath(sFilename); if (!szFullPath) @@ -450,25 +446,25 @@ namespace AZ::IO switch(fileLocation) { - case IArchive::eFileLocation_Any: + case FileSearchLocation::Any: // Search for file based on pak priority switch (nVarPakPriority) { - case ArchiveLocationPriority::ePakPriorityFileFirst: + case FileSearchPriority::FileFirst: return FileIOBase::GetDirectInstance()->Exists(szFullPath->c_str()) || FindPakFileEntry(szFullPath->Native()); - case ArchiveLocationPriority::ePakPriorityPakFirst: + case FileSearchPriority::PakFirst: return FindPakFileEntry(szFullPath->Native()) || IO::FileIOBase::GetDirectInstance()->Exists(szFullPath->c_str()); - case ArchiveLocationPriority::ePakPriorityPakOnly: + case FileSearchPriority::PakOnly: return FindPakFileEntry(szFullPath->Native()); default: - AZ_Assert(false, "PakPriority %d doesn't match a value in the ArchiveLocationPriority enum", + AZ_Assert(false, "PakPriority %d doesn't match a value in the FileSearchPriority enum", aznumeric_cast(nVarPakPriority)); } break; - case IArchive::eFileLocation_InPak: + case FileSearchLocation::InPak: return FindPakFileEntry(szFullPath->Native()); - case IArchive::eFileLocation_OnDisk: - if (nVarPakPriority != ArchiveLocationPriority::ePakPriorityPakOnly) + case FileSearchLocation::OnDisk: + if (nVarPakPriority != FileSearchPriority::PakOnly) { return FileIOBase::GetDirectInstance()->Exists(szFullPath->c_str()); } @@ -485,7 +481,7 @@ namespace AZ::IO ////////////////////////////////////////////////////////////////////////// bool Archive::IsFolder(AZStd::string_view sPath) { - AZStd::fixed_string filePath{ sPath }; + AZ::IO::FixedMaxPath filePath{ sPath }; return AZ::IO::FileIOBase::GetDirectInstance()->IsDirectory(filePath.c_str()); } @@ -515,7 +511,7 @@ namespace AZ::IO // get the priority into local variable to avoid it changing in the course of // this function execution (?) - const ArchiveLocationPriority nVarPakPriority = GetPakPriority(); + const FileSearchPriority nVarPakPriority = GetPakPriority(); AZ::IO::OpenMode nOSFlags = AZ::IO::GetOpenModeFromStringMode(szMode); @@ -628,17 +624,17 @@ namespace AZ::IO switch (nVarPakPriority) { - case ArchiveLocationPriority::ePakPriorityFileFirst: + case FileSearchPriority::FileFirst: { AZ::IO::HandleType fileHandle = OpenFromFileSystem(); return fileHandle != AZ::IO::InvalidHandle ? fileHandle : OpenFromArchive(); } - case ArchiveLocationPriority::ePakPriorityPakFirst: + case FileSearchPriority::PakFirst: { AZ::IO::HandleType fileHandle = OpenFromArchive(); return fileHandle != AZ::IO::InvalidHandle ? fileHandle : OpenFromFileSystem(); } - case ArchiveLocationPriority::ePakPriorityPakOnly: + case FileSearchPriority::PakOnly: { return OpenFromArchive(); } @@ -810,7 +806,7 @@ namespace AZ::IO return 0; } - if (GetPakPriority() == ArchiveLocationPriority::ePakPriorityFileFirst) // if the file system files have priority now.. + if (GetPakPriority() == FileSearchPriority::FileFirst) // if the file system files have priority now.. { IArchive::SignedFileSize nFileSize = GetFileSizeOnDisk(fullPath->Native()); if (nFileSize != IArchive::FILE_NOT_PRESENT) @@ -825,7 +821,7 @@ namespace AZ::IO return pFileEntry->desc.lSizeUncompressed; } - if (bAllowUseFileSystem || GetPakPriority() == ArchiveLocationPriority::ePakPriorityPakFirst) // if the archive files had more priority, we didn't attempt fopen before- try it now + if (bAllowUseFileSystem || GetPakPriority() == FileSearchPriority::PakFirst) // if the archive files had more priority, we didn't attempt fopen before- try it now { IArchive::SignedFileSize nFileSize = GetFileSizeOnDisk(fullPath->Native()); if (nFileSize != IArchive::FILE_NOT_PRESENT) @@ -1023,7 +1019,7 @@ namespace AZ::IO ////////////////////////////////////////////////////////////////////////// - AZ::IO::ArchiveFileIterator Archive::FindFirst(AZStd::string_view pDir, EFileSearchType searchType) + AZ::IO::ArchiveFileIterator Archive::FindFirst(AZStd::string_view pDir, FileSearchLocation searchType) { auto szFullPath = AZ::IO::FileIOBase::GetDirectInstance()->ResolvePath(pDir); if (!szFullPath) @@ -1036,18 +1032,21 @@ namespace AZ::IO bool bAllowUseFileSystem{}; switch (searchType) { - case IArchive::eFileSearchType_AllowInZipsOnly: - bAllowUseFileSystem = false; - bScanZips = true; - break; - case IArchive::eFileSearchType_AllowOnDiskAndInZips: - bAllowUseFileSystem = true; - bScanZips = true; - break; - case IArchive::eFileSearchType_AllowOnDiskOnly: - bAllowUseFileSystem = true; - bScanZips = false; - break; + case FileSearchLocation::InPak: + bAllowUseFileSystem = false; + bScanZips = true; + break; + case FileSearchLocation::Any: + bAllowUseFileSystem = true; + bScanZips = true; + break; + case FileSearchLocation::OnDisk: + bAllowUseFileSystem = true; + bScanZips = false; + break; + default: + AZ_Assert(false, "Invalid search location value supplied"); + break; } AZStd::intrusive_ptr pFindData = aznew AZ::IO::FindData(); @@ -1218,7 +1217,7 @@ namespace AZ::IO else { // [LYN-2376] Remove once legacy slice support is removed - AZStd::vector levelDirs; + AZStd::vector levelDirs; if (addLevels) { @@ -1241,6 +1240,10 @@ namespace AZ::IO m_arrZips.insert(revItZip.base(), desc); + // This lock is for m_arrZips. + // Unlock it now because the modification is complete, and events responding to this signal + // will attempt to lock the same mutex, causing the application to lock up. + lock.unlock(); m_levelOpenEvent.Signal(levelDirs); } @@ -1376,7 +1379,7 @@ namespace AZ::IO return true; } - if (AZ::IO::ArchiveFileIterator fileIterator = FindFirst(pWildcardIn, IArchive::eFileSearchType_AllowOnDiskOnly); fileIterator) + if (AZ::IO::ArchiveFileIterator fileIterator = FindFirst(pWildcardIn, FileSearchLocation::OnDisk); fileIterator) { AZStd::vector files; do @@ -1951,15 +1954,15 @@ namespace AZ::IO } // gets the current archive priority - ArchiveLocationPriority Archive::GetPakPriority() const + FileSearchPriority Archive::GetPakPriority() const { - int pakPriority = aznumeric_cast(ArchiveVars{}.nPriority); + FileSearchPriority pakPriority = ArchiveVars{}.m_fileSearchPriority; if (auto console = AZ::Interface::Get(); console != nullptr) { - [[maybe_unused]] AZ::GetValueResult getCvarResult = console->GetCvarValue("sys_PakPriority", pakPriority); + [[maybe_unused]] AZ::GetValueResult getCvarResult = console->GetCvarValue("sys_PakPriority", reinterpret_cast(pakPriority)); AZ_Error("Archive", getCvarResult == AZ::GetValueResult::Success, "Lookup of 'sys_PakPriority console variable failed with error %s", AZ::GetEnumString(getCvarResult)); } - return static_cast(pakPriority); + return pakPriority; } ////////////////////////////////////////////////////////////////////////// @@ -2026,13 +2029,13 @@ namespace AZ::IO switch (GetPakPriority()) { - case ArchiveLocationPriority::ePakPriorityFileFirst: + case FileSearchPriority::FileFirst: info.m_conflictResolution = AZ::IO::ConflictResolution::PreferFile; break; - case ArchiveLocationPriority::ePakPriorityPakFirst: + case FileSearchPriority::PakFirst: info.m_conflictResolution = AZ::IO::ConflictResolution::PreferArchive; break; - case ArchiveLocationPriority::ePakPriorityPakOnly: + case FileSearchPriority::PakOnly: info.m_conflictResolution = AZ::IO::ConflictResolution::UseArchiveOnly; break; } @@ -2143,13 +2146,13 @@ namespace AZ::IO return manifestInfo; } - AZStd::vector Archive::ScanForLevels(ZipDir::CachePtr pZip) + AZStd::vector Archive::ScanForLevels(ZipDir::CachePtr pZip) { - AZStd::queue scanDirs; - AZStd::vector levelDirs; - AZStd::string currentDir = "levels"; - AZStd::string currentDirPattern; - AZStd::string currentFilePattern; + AZStd::queue scanDirs; + AZStd::vector levelDirs; + AZ::IO::Path currentDir = "levels"; + AZ::IO::Path currentDirPattern; + AZ::IO::Path currentFilePattern; ZipDir::FindDir findDir(pZip); findDir.FindFirst(currentDir.c_str()); @@ -2167,11 +2170,10 @@ namespace AZ::IO scanDirs.pop(); } - currentDirPattern = currentDir + AZ_FILESYSTEM_SEPARATOR_WILDCARD; - currentFilePattern = currentDir + AZ_CORRECT_FILESYSTEM_SEPARATOR_STRING + "level.pak"; + currentDirPattern = currentDir / "*"; + currentFilePattern = currentDir / "level.pak"; - ZipDir::FileEntry* fileEntry = findFile.FindExact(currentFilePattern.c_str()); - if (fileEntry) + if (ZipDir::FileEntry* fileEntry = findFile.FindExact(currentFilePattern); fileEntry) { levelDirs.emplace_back(currentDir); continue; @@ -2179,9 +2181,7 @@ namespace AZ::IO for (findDir.FindFirst(currentDirPattern.c_str()); findDir.GetDirEntry(); findDir.FindNext()) { - AZStd::string_view dirName = findDir.GetDirName(); - AZStd::string dirToAdd = AZStd::string::format("%s/%.*s", currentDir.data(), aznumeric_cast(dirName.size()), dirName.data()); - scanDirs.push(dirToAdd); + scanDirs.push(currentDir / findDir.GetDirName()); } } while (!scanDirs.empty()); diff --git a/Code/Framework/AzFramework/AzFramework/Archive/Archive.h b/Code/Framework/AzFramework/AzFramework/Archive/Archive.h index 279702b433..d429aa8f17 100644 --- a/Code/Framework/AzFramework/AzFramework/Archive/Archive.h +++ b/Code/Framework/AzFramework/AzFramework/Archive/Archive.h @@ -207,7 +207,7 @@ namespace AZ::IO uint64_t FTell(AZ::IO::HandleType handle) override; int FFlush(AZ::IO::HandleType handle) override; int FClose(AZ::IO::HandleType handle) override; - AZ::IO::ArchiveFileIterator FindFirst(AZStd::string_view pDir, EFileSearchType searchType = eFileSearchType_AllowInZipsOnly) override; + AZ::IO::ArchiveFileIterator FindFirst(AZStd::string_view pDir, FileSearchLocation searchType = FileSearchLocation::InPak) override; AZ::IO::ArchiveFileIterator FindNext(AZ::IO::ArchiveFileIterator fileIterator) override; bool FindClose(AZ::IO::ArchiveFileIterator fileIterator) override; int FEof(AZ::IO::HandleType handle) override; @@ -219,7 +219,7 @@ namespace AZ::IO bool RemoveDir(AZStd::string_view pName) override; // remove directory from FS (if supported) bool IsAbsPath(AZStd::string_view pPath) override; - bool IsFileExist(AZStd::string_view sFilename, EFileSearchLocation fileLocation = eFileLocation_Any) override; + bool IsFileExist(AZStd::string_view sFilename, FileSearchLocation fileLocation = FileSearchLocation::Any) override; bool IsFolder(AZStd::string_view sPath) override; IArchive::SignedFileSize GetFileSizeOnDisk(AZStd::string_view filename) override; @@ -255,7 +255,7 @@ namespace AZ::IO bool DisableRuntimeFileAccess(bool status, AZStd::thread_id threadId) override; // gets the current archive priority - ArchiveLocationPriority GetPakPriority() const override; + FileSearchPriority GetPakPriority() const override; uint64_t GetFileOffsetOnMedia(AZStd::string_view szName) const override; @@ -305,7 +305,7 @@ namespace AZ::IO AZStd::shared_ptr GetBundleCatalog(ZipDir::CachePtr pZip, const AZStd::string& catalogName); // [LYN-2376] Remove once legacy slice support is removed - AZStd::vector ScanForLevels(ZipDir::CachePtr pZip); + AZStd::vector ScanForLevels(ZipDir::CachePtr pZip); mutable AZStd::shared_mutex m_csOpenFiles; ZipPseudoFileArray m_arrOpenFiles; diff --git a/Code/Framework/AzFramework/AzFramework/Archive/ArchiveFileIO.cpp b/Code/Framework/AzFramework/AzFramework/Archive/ArchiveFileIO.cpp index 9e6e1034ea..8cc2b9dfb4 100644 --- a/Code/Framework/AzFramework/AzFramework/Archive/ArchiveFileIO.cpp +++ b/Code/Framework/AzFramework/AzFramework/Archive/ArchiveFileIO.cpp @@ -169,7 +169,7 @@ namespace AZ::IO size = m_archive->FGetSize(filePath, true); if (!size) { - return m_archive->IsFileExist(filePath, IArchive::eFileLocation_Any) ? IO::ResultCode::Success : IO::ResultCode::Error; + return m_archive->IsFileExist(filePath, FileSearchLocation::Any) ? IO::ResultCode::Success : IO::ResultCode::Error; } return IO::ResultCode::Success; diff --git a/Code/Framework/AzFramework/AzFramework/Archive/ArchiveFindData.cpp b/Code/Framework/AzFramework/AzFramework/Archive/ArchiveFindData.cpp index 7b483dc5de..9e4290131e 100644 --- a/Code/Framework/AzFramework/AzFramework/Archive/ArchiveFindData.cpp +++ b/Code/Framework/AzFramework/AzFramework/Archive/ArchiveFindData.cpp @@ -78,9 +78,9 @@ namespace AZ::IO { // get the priority into local variable to avoid it changing in the course of // this function execution - ArchiveLocationPriority nVarPakPriority = archive->GetPakPriority(); + FileSearchPriority nVarPakPriority = archive->GetPakPriority(); - if (nVarPakPriority == ArchiveLocationPriority::ePakPriorityFileFirst) + if (nVarPakPriority == FileSearchPriority::FileFirst) { // first, find the file system files ScanFS(archive, szDir); @@ -96,7 +96,7 @@ namespace AZ::IO { ScanZips(archive, szDir); } - if (bAllowUseFS || nVarPakPriority != ArchiveLocationPriority::ePakPriorityPakOnly) + if (bAllowUseFS || nVarPakPriority != FileSearchPriority::PakOnly) { ScanFS(archive, szDir); } diff --git a/Code/Framework/AzFramework/AzFramework/Archive/ArchiveVars.cpp b/Code/Framework/AzFramework/AzFramework/Archive/ArchiveVars.cpp new file mode 100644 index 0000000000..0098d97b8d --- /dev/null +++ b/Code/Framework/AzFramework/AzFramework/Archive/ArchiveVars.cpp @@ -0,0 +1,24 @@ +/* + * Copyright (c) Contributors to the Open 3D Engine Project. + * For complete copyright and license terms please see the LICENSE at the root of this distribution. + * + * SPDX-License-Identifier: Apache-2.0 OR MIT + * + */ + + +#include + +namespace AZ::IO +{ + FileSearchPriority GetDefaultFileSearchPriority() + { +#if defined(LY_ARCHIVE_FILE_SEARCH_MODE) + return FileSearchPriority{ LY_ARCHIVE_FILE_SEARCH_MODE }; +#else + return FileSearchPriority{ !ArchiveVars::IsReleaseConfig + ? FileSearchPriority::FileFirst + : FileSearchPriority::PakOnly }; +#endif + } +} diff --git a/Code/Framework/AzFramework/AzFramework/Archive/ArchiveVars.h b/Code/Framework/AzFramework/AzFramework/Archive/ArchiveVars.h index 931b07fa71..2c2ec33544 100644 --- a/Code/Framework/AzFramework/AzFramework/Archive/ArchiveVars.h +++ b/Code/Framework/AzFramework/AzFramework/Archive/ArchiveVars.h @@ -9,17 +9,26 @@ #pragma once -#include - namespace AZ::IO { - enum class ArchiveLocationPriority + enum class FileSearchPriority { - ePakPriorityFileFirst = 0, - ePakPriorityPakFirst = 1, - ePakPriorityPakOnly = 2 + FileFirst, + PakFirst, + PakOnly }; + + //file location enum used in isFileExist to control where the archive system looks for the file. + enum class FileSearchLocation + { + Any, + OnDisk, + InPak + }; + + FileSearchPriority GetDefaultFileSearchPriority(); + // variables that control behavior of the Archive subsystem struct ArchiveVars { @@ -28,29 +37,10 @@ namespace AZ::IO #else inline static constexpr bool IsReleaseConfig{}; #endif - - public: - int nReadSlice{}; - int nSaveTotalResourceList{}; - int nSaveFastloadResourceList{}; - int nSaveMenuCommonResourceList{}; int nSaveLevelResourceList{}; - int nValidateFileHashes{ IsReleaseConfig ? 0 : 1 }; - int nUncachedStreamReads{ 1 }; - int nInMemoryPerPakSizeLimit{ 6 }; // Limits in MB - int nTotalInMemoryPakSizeLimit{ 30 }; - int nLoadCache{}; - int nLoadModePaks{}; - int nStreamCache{ STREAM_CACHE_DEFAULT }; - ArchiveLocationPriority nPriority{ IsReleaseConfig - ? ArchiveLocationPriority::ePakPriorityPakOnly - : ArchiveLocationPriority::ePakPriorityFileFirst }; // Which file location to favor (loose vs. pak files) + FileSearchPriority m_fileSearchPriority{ GetDefaultFileSearchPriority()}; int nMessageInvalidFileAccess{}; int nLogInvalidFileAccess{ IsReleaseConfig ? 0 : 1 }; - int nDisableNonLevelRelatedPaks{ 1 }; - int nWarnOnPakAccessFails{ 1 }; // Whether to treat failed pak access as a warning or log message - int nSetLogLevel{ 3 }; - int nLogAllFileAccess{}; }; } diff --git a/Code/Framework/AzFramework/AzFramework/Archive/IArchive.h b/Code/Framework/AzFramework/AzFramework/Archive/IArchive.h index bd9615110a..d7eaee6e24 100644 --- a/Code/Framework/AzFramework/AzFramework/Archive/IArchive.h +++ b/Code/Framework/AzFramework/AzFramework/Archive/IArchive.h @@ -18,13 +18,13 @@ #include #include - +#include enum EStreamSourceMediaType : int32_t; namespace AZ::IO { - enum class ArchiveLocationPriority; + enum class FileSearchPriority; struct IResourceList; struct INestedArchive; struct IArchive; @@ -114,14 +114,6 @@ namespace AZ::IO RFOM_NextLevel // used for level2level loading }; - //file location enum used in isFileExist to control where the archive system looks for the file. - enum EFileSearchLocation - { - eFileLocation_Any = 0, - eFileLocation_OnDisk, - eFileLocation_InPak, - }; - enum EInMemoryArchiveLocation { eInMemoryPakLocale_Unload = 0, @@ -130,12 +122,6 @@ namespace AZ::IO eInMemoryPakLocale_PAK, }; - enum EFileSearchType - { - eFileSearchType_AllowInZipsOnly = 0, - eFileSearchType_AllowOnDiskAndInZips, - eFileSearchType_AllowOnDiskOnly - }; using SignedFileSize = int64_t; @@ -213,7 +199,7 @@ namespace AZ::IO virtual AZStd::intrusive_ptr PoolAllocMemoryBlock(size_t nSize, const char* sUsage, size_t nAlign = 1) = 0; // Arguments: - virtual ArchiveFileIterator FindFirst(AZStd::string_view pDir, EFileSearchType searchType = eFileSearchType_AllowInZipsOnly) = 0; + virtual ArchiveFileIterator FindFirst(AZStd::string_view pDir, FileSearchLocation searchType = FileSearchLocation::InPak) = 0; virtual ArchiveFileIterator FindNext(AZ::IO::ArchiveFileIterator handle) = 0; virtual bool FindClose(AZ::IO::ArchiveFileIterator handle) = 0; //returns file modification time @@ -221,7 +207,7 @@ namespace AZ::IO // Description: // Checks if specified file exist in filesystem. - virtual bool IsFileExist(AZStd::string_view sFilename, EFileSearchLocation = eFileLocation_Any) = 0; + virtual bool IsFileExist(AZStd::string_view sFilename, FileSearchLocation = FileSearchLocation::Any) = 0; // Checks if path is a folder virtual bool IsFolder(AZStd::string_view sPath) = 0; @@ -283,7 +269,7 @@ namespace AZ::IO virtual bool DisableRuntimeFileAccess(bool status, AZStd::thread_id threadId) = 0; // gets the current pak priority - virtual ArchiveLocationPriority GetPakPriority() const = 0; + virtual FileSearchPriority GetPakPriority() const = 0; // Summary: // Return offset in archive file (ideally has to return offset on DVD) for streaming requests sorting @@ -295,7 +281,7 @@ namespace AZ::IO // Event sent when a archive file is opened that contains a level.pak // @param const AZStd::vector& - Array of directories containing level.pak files - using LevelPackOpenEvent = AZ::Event&>; + using LevelPackOpenEvent = AZ::Event&>; virtual auto GetLevelPackOpenEvent()->LevelPackOpenEvent* = 0; // Event sent when a archive contains a level.pak is closed // @param const AZStd::string_view - Name of the pak file that was closed diff --git a/Code/Framework/AzFramework/AzFramework/Asset/AssetBundleManifest.cpp b/Code/Framework/AzFramework/AzFramework/Asset/AssetBundleManifest.cpp index 43a5e8fdb3..b4da5745be 100644 --- a/Code/Framework/AzFramework/AzFramework/Asset/AssetBundleManifest.cpp +++ b/Code/Framework/AzFramework/AzFramework/Asset/AssetBundleManifest.cpp @@ -7,23 +7,153 @@ */ #include +#include +#include #include namespace AzFramework { - - const int AssetBundleManifest::CurrentBundleVersion = 2; + // Redirects writing of the AssetBundleManifest to an older version if the bundle version + // is not set to the current version + static void OldBundleManifestWriter(AZ::SerializeContext::EnumerateInstanceCallContext& callContext, const void* bundleManifestPointer, + const AZ::SerializeContext::ClassData&, const AZ::SerializeContext::ClassElement* assetBundleManifestClassElement); + + static bool BundleManifestVersionConverter(AZ::SerializeContext& context, AZ::SerializeContext::DataElementNode& rootElement); + + const int AssetBundleManifest::CurrentBundleVersion = 3; const char AssetBundleManifest::s_manifestFileName[] = "manifest.xml"; + + AssetBundleManifest::AssetBundleManifest() = default; + AssetBundleManifest::~AssetBundleManifest() = default; + void AssetBundleManifest::ReflectSerialize(AZ::SerializeContext* serializeContext) { if (serializeContext) { serializeContext->Class() - ->Version(2) + ->Version(CurrentBundleVersion, &BundleManifestVersionConverter) + ->Attribute(AZ::SerializeContextAttributes::ObjectStreamWriteElementOverride, &OldBundleManifestWriter) ->Field("BundleVersion", &AssetBundleManifest::m_bundleVersion) ->Field("CatalogName", &AssetBundleManifest::m_catalogName) - ->Field("DependentBundleNames", &AssetBundleManifest::m_depedendentBundleNames) + ->Field("DependentBundleNames", &AssetBundleManifest::m_dependentBundleNames) ->Field("LevelNames", &AssetBundleManifest::m_levelDirs); + + // Make sure the AZStd::vector type is reflected so that it can be read + // using DataElement::GetChildData + serializeContext->RegisterGenericType>(); } } + + bool BundleManifestVersionConverter(AZ::SerializeContext& context, AZ::SerializeContext::DataElementNode& rootElement) + { + if (rootElement.GetVersion() < 3) + { + static constexpr AZ::u32 levelNamesCrc = AZ_CRC_CE("LevelNames"); + AZStd::vector newLevelDirs; + if (AZStd::vector oldLevelNames; rootElement.GetChildData(levelNamesCrc, oldLevelNames)) + { + newLevelDirs.insert(newLevelDirs.end(), + AZStd::make_move_iterator(oldLevelNames.begin()), AZStd::make_move_iterator(oldLevelNames.end())); + } + else + { + AZ_Error("AssetBundleManifest", false, R"(Unable to read "levelNames" from AssetBundleManifest version %u )", + rootElement.GetVersion()); + } + + rootElement.RemoveElementByName(levelNamesCrc); + rootElement.AddElementWithData(context, "LevelNames", newLevelDirs); + } + return true; + } + + void OldBundleManifestWriter(AZ::SerializeContext::EnumerateInstanceCallContext& callContext, const void* bundleManifestPointer, + const AZ::SerializeContext::ClassData&, const AZ::SerializeContext::ClassElement* assetBundleManifestClassElement) + { + // Copy the AssetBundleManifest current version instance to the AssetBundleManifest V2 instance + auto assetBundleManifestCurrent = reinterpret_cast(bundleManifestPointer); + if (assetBundleManifestCurrent->GetBundleVersion() <= 2) + { + auto serializeContext = const_cast(callContext.m_context); + + struct AssetBundleManifestV2 + { + // Use the same ClassName and typeid as the AssetBundleManifest + AZ_TYPE_INFO(AssetBundleManifest, azrtti_typeid()); + AZStd::string m_catalogName; + AZStd::vector m_dependentBundleNames; + AZStd::vector m_levelDirs; + int m_bundleVersion{}; + }; + auto ReflectAssetBundleManifestV2 = [](AZ::SerializeContext* serializeContext) + { + serializeContext->Class() + ->Version(2) + ->Field("BundleVersion", &AssetBundleManifestV2::m_bundleVersion) + ->Field("CatalogName", &AssetBundleManifestV2::m_catalogName) + ->Field("DependentBundleNames", &AssetBundleManifestV2::m_dependentBundleNames) + ->Field("LevelNames", &AssetBundleManifestV2::m_levelDirs); + }; + + // Unreflect the AssetBundleManifest class at the version since it shares the same typeid + // as the older version and Reflect the V2 AssetBundlerManifest + serializeContext->EnableRemoveReflection(); + AssetBundleManifest::ReflectSerialize(serializeContext); + serializeContext->DisableRemoveReflection(); + ReflectAssetBundleManifestV2(serializeContext); + + // Use the Current AssetBundleManifest instance to make a Version 2 AssetBundleManifest + AssetBundleManifestV2 assetBundleManifestV2; + assetBundleManifestV2.m_catalogName = assetBundleManifestCurrent->GetCatalogName(); + assetBundleManifestV2.m_dependentBundleNames = assetBundleManifestCurrent->GetDependentBundleNames(); + assetBundleManifestV2.m_bundleVersion = assetBundleManifestCurrent->GetBundleVersion(); + for (const AZ::IO::Path& levelDir : assetBundleManifestCurrent->GetLevelDirectories()) + { + assetBundleManifestV2.m_levelDirs.emplace_back(levelDir.Native()); + } + + const AZ::TypeId& assetBundlerManifestTypeId = azrtti_typeid(); + const auto assetBundleManifestV2ClassData = serializeContext->FindClassData(assetBundlerManifestTypeId); + + // Create an AssetBundleManifest Version 2 Class Eleemnt + // It will copy over the name and nameCrc values of the current AssetBundleManifestelemnt + auto CreateAssetBundleManifestV2ClassElement = [&assetBundlerManifestTypeId]( + const AZ::SerializeContext::ClassElement* currentVersionElement) -> AZ::SerializeContext::ClassElement + { + AZ::SerializeContext::ClassElement v2ClassElement; + // Copy over the name of he current + if (currentVersionElement) + { + v2ClassElement.m_name = currentVersionElement->m_name; + v2ClassElement.m_nameCrc = currentVersionElement->m_nameCrc; + } + v2ClassElement.m_dataSize = sizeof(AssetBundleManifest); + v2ClassElement.m_azRtti = AZ::GetRttiHelper(); + v2ClassElement.m_genericClassInfo = nullptr; + v2ClassElement.m_typeId = assetBundlerManifestTypeId; + v2ClassElement.m_editData = nullptr; + v2ClassElement.m_attributeOwnership = AZ::SerializeContext::ClassElement::AttributeOwnership::Self; + return v2ClassElement; + }; + const auto assetBundleManifestV2ClassElement = CreateAssetBundleManifestV2ClassElement(assetBundleManifestClassElement); + + serializeContext->EnumerateInstanceConst(&callContext, &assetBundleManifestV2, assetBundlerManifestTypeId, + assetBundleManifestV2ClassData, assetBundleManifestClassElement ? &assetBundleManifestV2ClassElement : nullptr); + + // Unreflect the V2 AssetBundleManifest and Re-reflect the AssetBundleManifest class at the current version + serializeContext->EnableRemoveReflection(); + ReflectAssetBundleManifestV2(serializeContext); + serializeContext->DisableRemoveReflection(); + AssetBundleManifest::ReflectSerialize(serializeContext); + } + } + + const AZStd::vector& AssetBundleManifest::GetLevelDirectories() const + { + return m_levelDirs; + } + void AssetBundleManifest::SetLevelsDirectory(const AZStd::vector& levelDirs) + { + m_levelDirs = levelDirs; + } } // namespace AzFramework diff --git a/Code/Framework/AzFramework/AzFramework/Asset/AssetBundleManifest.h b/Code/Framework/AzFramework/AzFramework/Asset/AssetBundleManifest.h index 9760482231..eb0390a8c0 100644 --- a/Code/Framework/AzFramework/AzFramework/Asset/AssetBundleManifest.h +++ b/Code/Framework/AzFramework/AzFramework/Asset/AssetBundleManifest.h @@ -8,6 +8,7 @@ #pragma once +#include #include #include #include @@ -27,7 +28,8 @@ namespace AzFramework AZ_TYPE_INFO(AssetBundleManifest, "{8628A669-7B19-4C48-A7CB-F670CC9586FD}"); AZ_CLASS_ALLOCATOR(AssetBundleManifest, AZ::SystemAllocator, 0); - AssetBundleManifest() = default; + AssetBundleManifest(); + ~AssetBundleManifest(); static void ReflectSerialize(AZ::SerializeContext* serializeContext); @@ -35,21 +37,21 @@ namespace AzFramework // of files within the AssetBundle in order to update the Asset Registry at runtime when // loading the bundle const AZStd::string& GetCatalogName() const { return m_catalogName; } - AZStd::vector GetDependentBundleNames() const { return m_depedendentBundleNames; } - AZStd::vector GetLevelDirectories() const { return m_levelDirs; } + AZStd::vector GetDependentBundleNames() const { return m_dependentBundleNames; } + const AZStd::vector& GetLevelDirectories() const; int GetBundleVersion() const { return m_bundleVersion; } void SetCatalogName(const AZStd::string& catalogName) { m_catalogName = catalogName; } void SetBundleVersion(int bundleVersion) { m_bundleVersion = bundleVersion; } - void SetDependentBundleNames(const AZStd::vector& dependentBundleNames) { m_depedendentBundleNames = dependentBundleNames; } - void SetLevelsDirectory(const AZStd::vector& levelDirs) { m_levelDirs = levelDirs; } + void SetDependentBundleNames(const AZStd::vector& dependentBundleNames) { m_dependentBundleNames = dependentBundleNames; } + void SetLevelsDirectory(const AZStd::vector& levelDirs); static const char s_manifestFileName[]; static const int CurrentBundleVersion; - private: + private: AZStd::string m_catalogName; - AZStd::vector m_depedendentBundleNames; - AZStd::vector m_levelDirs; + AZStd::vector m_dependentBundleNames; + AZStd::vector m_levelDirs; int m_bundleVersion = CurrentBundleVersion; }; diff --git a/Code/Framework/AzFramework/AzFramework/Asset/AssetCatalog.cpp b/Code/Framework/AzFramework/AzFramework/Asset/AssetCatalog.cpp index 3d76bcefc4..0c6b195434 100644 --- a/Code/Framework/AzFramework/AzFramework/Asset/AssetCatalog.cpp +++ b/Code/Framework/AzFramework/AzFramework/Asset/AssetCatalog.cpp @@ -1186,7 +1186,7 @@ namespace AzFramework } - bool AssetCatalog::CreateBundleManifest(const AZStd::string& deltaCatalogPath, const AZStd::vector& dependentBundleNames, const AZStd::string& fileDirectory, int bundleVersion, const AZStd::vector& levelDirs) + bool AssetCatalog::CreateBundleManifest(const AZStd::string& deltaCatalogPath, const AZStd::vector& dependentBundleNames, const AZStd::string& fileDirectory, int bundleVersion, const AZStd::vector& levelDirs) { if (bundleVersion > AzFramework::AssetBundleManifest::CurrentBundleVersion || bundleVersion < 0) { diff --git a/Code/Framework/AzFramework/AzFramework/Asset/AssetCatalog.h b/Code/Framework/AzFramework/AzFramework/Asset/AssetCatalog.h index 64f3c2e3d2..20f1355e7f 100644 --- a/Code/Framework/AzFramework/AzFramework/Asset/AssetCatalog.h +++ b/Code/Framework/AzFramework/AzFramework/Asset/AssetCatalog.h @@ -67,7 +67,7 @@ namespace AzFramework bool InsertDeltaCatalogBefore(AZStd::shared_ptr deltaCatalog, AZStd::shared_ptr afterDeltaCatalog) override; bool RemoveDeltaCatalog(AZStd::shared_ptr deltaCatalog) override; static bool SaveAssetBundleManifest(const char* assetBundleManifestFile, AzFramework::AssetBundleManifest* bundleManifest); - bool CreateBundleManifest(const AZStd::string& deltaCatalogPath, const AZStd::vector& dependentBundleNames, const AZStd::string& fileDirectory, int bundleVersion, const AZStd::vector& levelDirs) override; + bool CreateBundleManifest(const AZStd::string& deltaCatalogPath, const AZStd::vector& dependentBundleNames, const AZStd::string& fileDirectory, int bundleVersion, const AZStd::vector& levelDirs) override; bool CreateDeltaCatalog(const AZStd::vector& files, const AZStd::string& filePath) override; void AddExtension(const char* extension) override; diff --git a/Code/Framework/AzFramework/AzFramework/Asset/AssetSystemComponent.cpp b/Code/Framework/AzFramework/AzFramework/Asset/AssetSystemComponent.cpp index 3db19c53ee..bb361e56de 100644 --- a/Code/Framework/AzFramework/AzFramework/Asset/AssetSystemComponent.cpp +++ b/Code/Framework/AzFramework/AzFramework/Asset/AssetSystemComponent.cpp @@ -9,6 +9,7 @@ #include #include +#include #include #include #include @@ -17,7 +18,6 @@ #include #include #include -#include #include #include @@ -28,6 +28,8 @@ #include #include +AZ_DECLARE_BUDGET(AzFramework); + namespace AzFramework { namespace AssetBenchmark @@ -302,7 +304,7 @@ namespace AzFramework // SystemTickBus overrides void AssetSystemComponent::OnSystemTick() { - AZ_TRACE_METHOD(); + AZ_PROFILE_FUNCTION(AzFramework); LegacyAssetEventBus::ExecuteQueuedEvents(); } diff --git a/Code/Framework/AzFramework/AzFramework/Components/TransformComponent.cpp b/Code/Framework/AzFramework/AzFramework/Components/TransformComponent.cpp index bc109b73c2..809f664a10 100644 --- a/Code/Framework/AzFramework/AzFramework/Components/TransformComponent.cpp +++ b/Code/Framework/AzFramework/AzFramework/Components/TransformComponent.cpp @@ -534,7 +534,7 @@ namespace AzFramework void TransformComponent::SetParentImpl(AZ::EntityId parentId, bool isKeepWorldTM) { - if (parentId == GetEntityId()) + if (GetEntity() && parentId == GetEntityId()) { AZ_Warning("TransformComponent", false, "An entity can not be set as its own parent."); return; diff --git a/Code/Framework/AzFramework/AzFramework/Entity/EntityContext.cpp b/Code/Framework/AzFramework/AzFramework/Entity/EntityContext.cpp index c1283c9379..2faed93ab7 100644 --- a/Code/Framework/AzFramework/AzFramework/Entity/EntityContext.cpp +++ b/Code/Framework/AzFramework/AzFramework/Entity/EntityContext.cpp @@ -8,7 +8,6 @@ #include #include -#include #include #include #include @@ -243,8 +242,6 @@ namespace AzFramework //========================================================================= void EntityContext::ActivateEntity(AZ::EntityId entityId) { - AZ_ASSET_ATTACH_TO_SCOPE(this); - // Verify that this context has the right to perform operations on the entity bool validEntity = IsOwnedByThisContext(entityId); AZ_Warning("GameEntityContext", validEntity, "Entity with id %llu does not belong to the game context.", entityId); diff --git a/Code/Framework/AzFramework/AzFramework/Entity/EntityDebugDisplayBus.h b/Code/Framework/AzFramework/AzFramework/Entity/EntityDebugDisplayBus.h index 49506364f4..b81a0ab7f0 100644 --- a/Code/Framework/AzFramework/AzFramework/Entity/EntityDebugDisplayBus.h +++ b/Code/Framework/AzFramework/AzFramework/Entity/EntityDebugDisplayBus.h @@ -76,9 +76,12 @@ namespace AzFramework virtual void DrawSolidCone(const AZ::Vector3& pos, const AZ::Vector3& dir, float radius, float height, bool drawShaded = true) { (void)pos; (void)dir; (void)radius; (void)height; (void)drawShaded; } virtual void DrawWireCylinder(const AZ::Vector3& center, const AZ::Vector3& axis, float radius, float height) { (void)center; (void)axis; (void)radius; (void)height; } virtual void DrawSolidCylinder(const AZ::Vector3& center, const AZ::Vector3& axis, float radius, float height, bool drawShaded = true) { (void)center; (void)axis; (void)radius; (void)height; (void)drawShaded; } + virtual void DrawWireCylinderNoEnds(const AZ::Vector3& center, const AZ::Vector3& axis, float radius, float height) { (void)center; (void)axis; (void)radius; (void)height; } + virtual void DrawSolidCylinderNoEnds(const AZ::Vector3& center, const AZ::Vector3& axis, float radius, float height, bool drawShaded = true) { (void)center; (void)axis; (void)radius; (void)height; (void)drawShaded; } virtual void DrawWireCapsule(const AZ::Vector3& center, const AZ::Vector3& axis, float radius, float heightStraightSection) { (void)center; (void)axis; (void)radius; (void)heightStraightSection; } virtual void DrawWireSphere(const AZ::Vector3& pos, float radius) { (void)pos; (void)radius; } virtual void DrawWireSphere(const AZ::Vector3& pos, const AZ::Vector3 radius) { (void)pos; (void)radius; } + virtual void DrawWireHemisphere(const AZ::Vector3& pos, const AZ::Vector3& axis, float radius) { (void)pos; (void)axis; (void)radius; } virtual void DrawWireDisk(const AZ::Vector3& pos, const AZ::Vector3& dir, float radius) { (void)pos; (void)dir; (void)radius; } virtual void DrawBall(const AZ::Vector3& pos, float radius, bool drawShaded = true) { (void)pos; (void)radius; (void)drawShaded; } virtual void DrawDisk(const AZ::Vector3& pos, const AZ::Vector3& dir, float radius) { (void)pos; (void)dir; (void)radius; } diff --git a/Code/Framework/AzFramework/AzFramework/Entity/SliceEntityOwnershipService.cpp b/Code/Framework/AzFramework/AzFramework/Entity/SliceEntityOwnershipService.cpp index 9a077cd611..ab14dfeb7f 100644 --- a/Code/Framework/AzFramework/AzFramework/Entity/SliceEntityOwnershipService.cpp +++ b/Code/Framework/AzFramework/AzFramework/Entity/SliceEntityOwnershipService.cpp @@ -386,7 +386,6 @@ namespace AzFramework void SliceEntityOwnershipService::OnAssetReady(AZ::Data::Asset readyAsset) { AZ_PROFILE_FUNCTION(AzFramework); - AZ_ASSET_ATTACH_TO_SCOPE(readyAsset.Get()); AZ_Assert(readyAsset.GetAs(), "Asset is not a slice!"); @@ -400,7 +399,6 @@ namespace AzFramework // we intentionally capture readyAsset by value here, so that its refcount doesn't hit 0 by the time this call happens. AZStd::function instantiateCallback = [this, readyAsset]() { - AZ_ASSET_ATTACH_TO_SCOPE(readyAsset.Get()); const AZ::Data::AssetId readyAssetId = readyAsset.GetId(); for (auto iter = m_queuedSliceInstantiations.begin(); iter != m_queuedSliceInstantiations.end(); ) { diff --git a/Code/Framework/AzFramework/AzFramework/FileTag/FileTagComponent.cpp b/Code/Framework/AzFramework/AzFramework/FileTag/FileTagComponent.cpp index 1d09500415..f4831d1f8b 100644 --- a/Code/Framework/AzFramework/AzFramework/FileTag/FileTagComponent.cpp +++ b/Code/Framework/AzFramework/AzFramework/FileTag/FileTagComponent.cpp @@ -97,19 +97,38 @@ namespace AzFramework AZStd::vector registeredAssetPaths; AZ::Data::AssetCatalogRequestBus::BroadcastResult(registeredAssetPaths, &AZ::Data::AssetCatalogRequests::GetRegisteredAssetPaths); - const char* dependencyXmlPattern = "*_dependencies.xml"; + constexpr const char* dependencyXmlPattern = "_dependencies.xml"; for (const AZStd::string& assetPath : registeredAssetPaths) { - if (!AZStd::wildcard_match(dependencyXmlPattern, assetPath.c_str())) + if (assetPath.ends_with(dependencyXmlPattern)) { - continue; - } - - if (!m_excludeFileQueryManager.get()->LoadEngineDependencies(assetPath)) - { - AZ_Error("ExcludeFileComponent", false, "Failed to add assets referenced from %s to the blocked list", assetPath.c_str()); + AZ_VerifyError("ExcludeFileComponent", m_excludeFileQueryManager.get()->LoadEngineDependencies(assetPath), + "Failed to add assets referenced from %s to the blocked list", assetPath.c_str()); } } } + + void ExcludeFileComponent::OnCatalogAssetChanged(const AZ::Data::AssetId& assetId) + { + // Reload any modified "_dependencies.xml" files + AZ::IO::Path assetPath; + auto GetAssetPath = [&assetId, &assetPath](AZ::Data::AssetCatalogRequests* assetCatalogRequests) + { + assetPath = assetCatalogRequests->GetAssetPathById(assetId); + }; + + AZ::Data::AssetCatalogRequestBus::Broadcast(AZStd::move(GetAssetPath)); + constexpr const char* dependencyXmlPattern = "_dependencies.xml"; + if (assetPath.Native().ends_with(dependencyXmlPattern)) + { + AZ_VerifyError("ExcludeFileComponent", m_excludeFileQueryManager.get()->LoadEngineDependencies(assetPath.Native()), + "Failed to add assets referenced from %s to the blocked list", assetPath.c_str()); + } + } + + void ExcludeFileComponent::OnCatalogAssetAdded(const AZ::Data::AssetId& assetId) + { + OnCatalogAssetChanged(assetId); + } } } diff --git a/Code/Framework/AzFramework/AzFramework/FileTag/FileTagComponent.h b/Code/Framework/AzFramework/AzFramework/FileTag/FileTagComponent.h index d53e4e7a89..1bd0f46aa0 100644 --- a/Code/Framework/AzFramework/AzFramework/FileTag/FileTagComponent.h +++ b/Code/Framework/AzFramework/AzFramework/FileTag/FileTagComponent.h @@ -65,6 +65,8 @@ namespace AzFramework void Deactivate() override; void OnCatalogLoaded(const char* catalogFile) override; + void OnCatalogAssetChanged(const AZ::Data::AssetId& assetId) override; + void OnCatalogAssetAdded(const AZ::Data::AssetId& assetId) override; static void Reflect(AZ::ReflectContext* context); diff --git a/Code/Framework/AzFramework/AzFramework/IO/LocalFileIO.cpp b/Code/Framework/AzFramework/AzFramework/IO/LocalFileIO.cpp index c1b9c941bc..19bffaccbd 100644 --- a/Code/Framework/AzFramework/AzFramework/IO/LocalFileIO.cpp +++ b/Code/Framework/AzFramework/AzFramework/IO/LocalFileIO.cpp @@ -635,6 +635,7 @@ namespace AZ size_t longestMatch = 0; size_t bufStringLength = inBuffer.size(); AZStd::string_view longestAlias; + AZStd::string_view longestResolvedAlias; for (const auto& [alias, resolvedAlias] : m_aliases) { @@ -653,6 +654,7 @@ namespace AZ { longestMatch = resolvedAlias.size(); longestAlias = alias; + longestResolvedAlias = resolvedAlias; } } } @@ -661,7 +663,10 @@ namespace AZ // rearrange the buffer to have // [alias][old path] size_t aliasSize = longestAlias.size(); - size_t charsToAbsorb = longestMatch; + // If the resolved alias ends in a path separator, do not consume it. + const bool resolvedAliasEndsInPathSeparator = (longestResolvedAlias.ends_with(AZ::IO::PosixPathSeparator) || + longestResolvedAlias.ends_with(AZ::IO::WindowsPathSeparator)); + const size_t charsToAbsorb = resolvedAliasEndsInPathSeparator ? longestMatch - 1 : longestMatch; size_t remainingData = bufStringLength - charsToAbsorb; size_t finalStringSize = aliasSize + remainingData; if (finalStringSize >= outBufferLength) diff --git a/Code/Framework/AzFramework/AzFramework/IO/RemoteStorageDrive.cpp b/Code/Framework/AzFramework/AzFramework/IO/RemoteStorageDrive.cpp index 5cd36ca05a..589c805871 100644 --- a/Code/Framework/AzFramework/AzFramework/IO/RemoteStorageDrive.cpp +++ b/Code/Framework/AzFramework/AzFramework/IO/RemoteStorageDrive.cpp @@ -199,7 +199,7 @@ namespace AzFramework { activeFile = &m_filePaths[m_activeCacheSlot]; } - + // Estimate requests in this stack entry. for (FileRequest* request : m_pendingRequests) { @@ -279,7 +279,7 @@ namespace AzFramework using namespace AZ::IO; AZ_PROFILE_FUNCTION(AzCore); - + auto data = AZStd::get_if(&request->GetCommand()); AZ_Assert(data, "Request doing reading in the RemoteStorageDrive didn't contain read data."); @@ -292,7 +292,7 @@ namespace AzFramework file = m_fileHandles[cacheIndex]; m_fileLastUsed[cacheIndex] = AZStd::chrono::high_resolution_clock::now(); } - + // If the file is not open, eject the oldest entry from the cache and open the file for reading. if (file == InvalidHandle) { @@ -325,7 +325,7 @@ namespace AzFramework } m_activeCacheSlot = cacheIndex; - AZ_Assert(file != InvalidHandle, + AZ_Assert(file != InvalidHandle, "While searching for file '%s' RemoteStorageDevice::ReadFile encountered a problem that wasn't reported.", data->m_path.GetRelativePath()); { TIMED_AVERAGE_WINDOW_SCOPE(m_readTimeAverage); @@ -357,7 +357,7 @@ namespace AzFramework } } m_readSizeAverage.PushEntry(data->m_size); - + request->SetStatus(IStreamerTypes::RequestStatus::Completed); m_context->MarkRequestAsCompleted(request); } @@ -507,7 +507,7 @@ namespace AzFramework using namespace AZ::IO; using DoubleSeconds = AZStd::chrono::duration; - + double totalBytesReadMB = m_readSizeAverage.GetTotal() / (1024.0 * 1024.0); double totalReadTimeSec = AZStd::chrono::duration_cast(m_readTimeAverage.GetTotal()).count(); if (m_readSizeAverage.GetTotal() > 1) // A default is always added. diff --git a/Code/Framework/AzFramework/AzFramework/IO/RemoteStorageDrive.h b/Code/Framework/AzFramework/AzFramework/IO/RemoteStorageDrive.h index a250551e02..c3e28f2e55 100644 --- a/Code/Framework/AzFramework/AzFramework/IO/RemoteStorageDrive.h +++ b/Code/Framework/AzFramework/AzFramework/IO/RemoteStorageDrive.h @@ -53,7 +53,7 @@ namespace AzFramework protected: static constexpr AZ::s32 s_maxRequests = 1; - + void ReadFile(AZ::IO::FileRequest* request); bool CancelRequest(AZ::IO::FileRequest* cancelRequest, AZ::IO::FileRequestPtr& target); void FileExistsRequest(AZ::IO::FileRequest* request); diff --git a/Code/Framework/AzFramework/AzFramework/Input/Buses/Requests/InputDeviceRequestBus.h b/Code/Framework/AzFramework/AzFramework/Input/Buses/Requests/InputDeviceRequestBus.h index 147ff7f0b8..74e2459ab6 100644 --- a/Code/Framework/AzFramework/AzFramework/Input/Buses/Requests/InputDeviceRequestBus.h +++ b/Code/Framework/AzFramework/AzFramework/Input/Buses/Requests/InputDeviceRequestBus.h @@ -229,17 +229,13 @@ namespace AzFramework //! Alias for the EBus implementation of this interface using Bus = AZ::EBus>; - //////////////////////////////////////////////////////////////////////////////////////////// - //! Alias for the function type used to create the custom implementations - using CreateFunctionType = typename InputDeviceType::Implementation*(*)(InputDeviceType&); - //////////////////////////////////////////////////////////////////////////////////////////// //! Set a custom implementation for this input device type, either for a specific instance //! by addressing the call to an InputDeviceId, or for all existing instances by broadcast. //! Passing InputDeviceType::Implementation::Create as the argument will create the default //! device implementation, while passing nullptr will delete any existing implementation. - //! \param[in] createFunction Pointer to the function that will create the implementation. - virtual void SetCustomImplementation(CreateFunctionType createFunction) = 0; + //! \param[in] implementationFactory Pointer to the function that creates the implementation. + virtual void SetCustomImplementation(typename InputDeviceType::ImplementationFactory implementationFactory) = 0; }; //////////////////////////////////////////////////////////////////////////////////////////////// @@ -267,18 +263,14 @@ namespace AzFramework AZ_DISABLE_COPY_MOVE(InputDeviceImplementationRequestHandler); protected: - //////////////////////////////////////////////////////////////////////////////////////////// - //! Alias for the function type used to create the custom implementations - using CreateFunctionType = typename InputDeviceType::Implementation*(*)(InputDeviceType&); - //////////////////////////////////////////////////////////////////////////////////////////// //! \ref InputDeviceImplementationRequest::SetCustomImplementation - AZ_INLINE void SetCustomImplementation(CreateFunctionType createFunction) override + AZ_INLINE void SetCustomImplementation(typename InputDeviceType::ImplementationFactory implementationFactory) override { AZStd::unique_ptr newImplementation; - if (createFunction) + if (implementationFactory) { - newImplementation.reset(createFunction(m_inputDevice)); + newImplementation.reset(implementationFactory(m_inputDevice)); } m_inputDevice.SetImplementation(AZStd::move(newImplementation)); } diff --git a/Code/Framework/AzFramework/AzFramework/Input/Channels/InputChannelId.cpp b/Code/Framework/AzFramework/AzFramework/Input/Channels/InputChannelId.cpp index 496d89d767..ef39e50cb8 100644 --- a/Code/Framework/AzFramework/AzFramework/Input/Channels/InputChannelId.cpp +++ b/Code/Framework/AzFramework/AzFramework/Input/Channels/InputChannelId.cpp @@ -27,28 +27,4 @@ namespace AzFramework ; } } - - //////////////////////////////////////////////////////////////////////////////////////////////// - const char* InputChannelId::GetName() const - { - return m_name.c_str(); - } - - //////////////////////////////////////////////////////////////////////////////////////////////// - const AZ::Crc32& InputChannelId::GetNameCrc32() const - { - return m_crc32; - } - - //////////////////////////////////////////////////////////////////////////////////////////////// - bool InputChannelId::operator==(const InputChannelId& other) const - { - return (m_crc32 == other.m_crc32); - } - - //////////////////////////////////////////////////////////////////////////////////////////////// - bool InputChannelId::operator!=(const InputChannelId& other) const - { - return !(*this == other); - } } // namespace AzFramework diff --git a/Code/Framework/AzFramework/AzFramework/Input/Channels/InputChannelId.h b/Code/Framework/AzFramework/AzFramework/Input/Channels/InputChannelId.h index a4d8ac83eb..62d79285f5 100644 --- a/Code/Framework/AzFramework/AzFramework/Input/Channels/InputChannelId.h +++ b/Code/Framework/AzFramework/AzFramework/Input/Channels/InputChannelId.h @@ -39,53 +39,58 @@ namespace AzFramework //////////////////////////////////////////////////////////////////////////////////////////// //! Constructor - //! \param[in] name Name of the input channel (will be ignored if exceeds MAX_NAME_LENGTH) + //! \param[in] name Name of the input channel (will be truncated if exceeds MAX_NAME_LENGTH) explicit constexpr InputChannelId(AZStd::string_view name = "") - : m_name(name) - , m_crc32(name) + : m_name(name.substr(0, MAX_NAME_LENGTH)) + , m_crc32(name.substr(0, MAX_NAME_LENGTH)) { } - constexpr InputChannelId(const InputChannelId& other) = default; - constexpr InputChannelId(InputChannelId&& other) = default; - constexpr InputChannelId& operator=(const InputChannelId& other) - { - m_name = other.m_name; - m_crc32 = other.m_crc32; - return *this; - } - constexpr InputChannelId& operator=(InputChannelId&& other) - { - m_name = AZStd::move(other.m_name); - m_crc32 = AZStd::move(other.m_crc32); - other.m_crc32 = 0; - return *this; - } + //////////////////////////////////////////////////////////////////////////////////////////// + // Default copying and moving + AZ_DEFAULT_COPY_MOVE(InputChannelId); + + //////////////////////////////////////////////////////////////////////////////////////////// + //! Default destructor ~InputChannelId() = default; //////////////////////////////////////////////////////////////////////////////////////////// //! Access to the input channel's name //! \return Name of the input channel - const char* GetName() const; + constexpr const char* GetName() const + { + return m_name.c_str(); + } //////////////////////////////////////////////////////////////////////////////////////////// //! Access to the crc32 of the input channel's name //! \return crc32 of the input channel name - const AZ::Crc32& GetNameCrc32() const; + constexpr const AZ::Crc32& GetNameCrc32() const + { + return m_crc32; + } //////////////////////////////////////////////////////////////////////////////////////////// - ///@{ //! Equality comparison operator //! \param[in] other Another instance of the class to compare for equality - bool operator==(const InputChannelId& other) const; - bool operator!=(const InputChannelId& other) const; - ///@} + constexpr bool operator==(const InputChannelId& other) const + { + return m_crc32 == other.m_crc32; + } + + //////////////////////////////////////////////////////////////////////////////////////////// + //! Inequality comparison operator + //! \param[in] other Another instance of the class to compare for inequality + constexpr bool operator!=(const InputChannelId& other) const + { + return !(*this == other); + } private: //////////////////////////////////////////////////////////////////////////////////////////// // Variables AZStd::fixed_string m_name; //!< Name of the input channel - AZ::Crc32 m_crc32; //!< Crc32 of the input channel + AZ::Crc32 m_crc32; //!< Crc32 of the input channel name }; } // namespace AzFramework diff --git a/Code/Framework/AzFramework/AzFramework/Input/Devices/Gamepad/InputDeviceGamepad.cpp b/Code/Framework/AzFramework/AzFramework/Input/Devices/Gamepad/InputDeviceGamepad.cpp index 51aa008519..c7629c7afb 100644 --- a/Code/Framework/AzFramework/AzFramework/Input/Devices/Gamepad/InputDeviceGamepad.cpp +++ b/Code/Framework/AzFramework/AzFramework/Input/Devices/Gamepad/InputDeviceGamepad.cpp @@ -14,14 +14,6 @@ //////////////////////////////////////////////////////////////////////////////////////////////////// namespace AzFramework { - //////////////////////////////////////////////////////////////////////////////////////////////// - const char* InputDeviceGamepad::Name("gamepad"); - const InputDeviceId InputDeviceGamepad::IdForIndex0(Name, 0); - const InputDeviceId InputDeviceGamepad::IdForIndex1(Name, 1); - const InputDeviceId InputDeviceGamepad::IdForIndex2(Name, 2); - const InputDeviceId InputDeviceGamepad::IdForIndex3(Name, 3); - const InputDeviceId InputDeviceGamepad::IdForIndexN(AZ::u32 n) { return InputDeviceId(Name, n); } - //////////////////////////////////////////////////////////////////////////////////////////////// bool InputDeviceGamepad::IsGamepadDevice(const InputDeviceId& inputDeviceId) { @@ -94,7 +86,14 @@ namespace AzFramework //////////////////////////////////////////////////////////////////////////////////////////////// InputDeviceGamepad::InputDeviceGamepad(AZ::u32 index) - : InputDevice(InputDeviceId(Name, index)) + : InputDeviceGamepad(InputDeviceId(Name, index)) // Delegated constructor + { + } + + //////////////////////////////////////////////////////////////////////////////////////////////// + InputDeviceGamepad::InputDeviceGamepad(const InputDeviceId& inputDeviceId, + ImplementationFactory implementationFactory) + : InputDevice(inputDeviceId) , m_allChannelsById() , m_buttonChannelsById() , m_triggerChannelsById() @@ -144,8 +143,8 @@ namespace AzFramework m_thumbStickDirectionChannelsById[channelId] = channel; } - // Create the platform specific implementation - m_pimpl.reset(Implementation::Create(*this)); + // Create the platform specific or custom implementation + m_pimpl.reset(implementationFactory ? implementationFactory(*this) : nullptr); // Connect to the haptic feedback request bus InputHapticFeedbackRequestBus::Handler::BusConnect(GetInputDeviceId()); diff --git a/Code/Framework/AzFramework/AzFramework/Input/Devices/Gamepad/InputDeviceGamepad.h b/Code/Framework/AzFramework/AzFramework/Input/Devices/Gamepad/InputDeviceGamepad.h index 286b4f0df3..b143709621 100644 --- a/Code/Framework/AzFramework/AzFramework/Input/Devices/Gamepad/InputDeviceGamepad.h +++ b/Code/Framework/AzFramework/AzFramework/Input/Devices/Gamepad/InputDeviceGamepad.h @@ -32,16 +32,16 @@ namespace AzFramework public: //////////////////////////////////////////////////////////////////////////////////////////// //! The name used to identify any game-pad input device - static const char* Name; + static constexpr inline const char* Name{"gamepad"}; //////////////////////////////////////////////////////////////////////////////////////////// //! The id used to identify a game-pad input device with a specific index ///@{ - static const InputDeviceId IdForIndex0; - static const InputDeviceId IdForIndex1; - static const InputDeviceId IdForIndex2; - static const InputDeviceId IdForIndex3; - static const InputDeviceId IdForIndexN(AZ::u32 n); + static constexpr inline InputDeviceId IdForIndex0{Name, 0}; + static constexpr inline InputDeviceId IdForIndex1{Name, 1}; + static constexpr inline InputDeviceId IdForIndex2{Name, 2}; + static constexpr inline InputDeviceId IdForIndex3{Name, 3}; + static constexpr inline InputDeviceId IdForIndexN(AZ::u32 n) { return InputDeviceId(Name, n); } ///@} //////////////////////////////////////////////////////////////////////////////////////////// @@ -182,6 +182,14 @@ namespace AzFramework // Reflection static void Reflect(AZ::ReflectContext* context); + //////////////////////////////////////////////////////////////////////////////////////////// + // Foward declare the internal Implementation class so it can be passed into the constructor + class Implementation; + + //////////////////////////////////////////////////////////////////////////////////////////// + //! Alias for the function type used to create a custom implementation for this input device + using ImplementationFactory = Implementation*(InputDeviceGamepad&); + //////////////////////////////////////////////////////////////////////////////////////////// //! Constructor explicit InputDeviceGamepad(); @@ -191,6 +199,13 @@ namespace AzFramework //! \param[in] index Index of the game-pad device explicit InputDeviceGamepad(AZ::u32 index); + //////////////////////////////////////////////////////////////////////////////////////////// + //! Constructor + //! \param[in] inputDeviceId Id of the input device + //! \param[in] implementationFactory Optional override of the default Implementation::Create + explicit InputDeviceGamepad(const InputDeviceId& inputDeviceId, + ImplementationFactory implementationFactory = &Implementation::Create); + //////////////////////////////////////////////////////////////////////////////////////////// // Disable copying AZ_DISABLE_COPY_MOVE(InputDeviceGamepad); diff --git a/Code/Framework/AzFramework/AzFramework/Input/Devices/InputDeviceId.cpp b/Code/Framework/AzFramework/AzFramework/Input/Devices/InputDeviceId.cpp index fa0955bd16..7f9a0039ac 100644 --- a/Code/Framework/AzFramework/AzFramework/Input/Devices/InputDeviceId.cpp +++ b/Code/Framework/AzFramework/AzFramework/Input/Devices/InputDeviceId.cpp @@ -29,71 +29,4 @@ namespace AzFramework ; } } - - //////////////////////////////////////////////////////////////////////////////////////////////// - InputDeviceId::InputDeviceId(const char* name, AZ::u32 index) - : m_crc32(name) - , m_index(index) - { - memset(m_name, 0, AZ_ARRAY_SIZE(m_name)); - azstrncpy(m_name, NAME_BUFFER_SIZE, name, MAX_NAME_LENGTH); - } - - //////////////////////////////////////////////////////////////////////////////////////////////// - InputDeviceId::InputDeviceId(const InputDeviceId& other) - : m_crc32(other.m_crc32) - , m_index(other.m_index) - { - memset(m_name, 0, AZ_ARRAY_SIZE(m_name)); - azstrcpy(m_name, NAME_BUFFER_SIZE, other.m_name); - } - - //////////////////////////////////////////////////////////////////////////////////////////////// - InputDeviceId& InputDeviceId::operator=(const InputDeviceId& other) - { - azstrcpy(m_name, NAME_BUFFER_SIZE, other.m_name); - m_crc32 = other.m_crc32; - m_index = other.m_index; - return *this; - } - - //////////////////////////////////////////////////////////////////////////////////////////////// - const char* InputDeviceId::GetName() const - { - return m_name; - } - - //////////////////////////////////////////////////////////////////////////////////////////////// - const AZ::Crc32& InputDeviceId::GetNameCrc32() const - { - return m_crc32; - } - - //////////////////////////////////////////////////////////////////////////////////////////////// - AZ::u32 InputDeviceId::GetIndex() const - { - return m_index; - } - - //////////////////////////////////////////////////////////////////////////////////////////////// - bool InputDeviceId::operator==(const InputDeviceId& other) const - { - return (m_crc32 == other.m_crc32) && (m_index == other.m_index); - } - - //////////////////////////////////////////////////////////////////////////////////////////////// - bool InputDeviceId::operator!=(const InputDeviceId& other) const - { - return !(*this == other); - } - - //////////////////////////////////////////////////////////////////////////////////////////////// - bool InputDeviceId::operator<(const InputDeviceId& other) const - { - if (m_index == other.m_index) - { - return m_crc32 < other.m_crc32; - } - return m_index < other.m_index; - } } // namespace AzFramework diff --git a/Code/Framework/AzFramework/AzFramework/Input/Devices/InputDeviceId.h b/Code/Framework/AzFramework/AzFramework/Input/Devices/InputDeviceId.h index 6d2aa8b9fd..ffc1745c3b 100644 --- a/Code/Framework/AzFramework/AzFramework/Input/Devices/InputDeviceId.h +++ b/Code/Framework/AzFramework/AzFramework/Input/Devices/InputDeviceId.h @@ -11,6 +11,7 @@ #include #include #include +#include //////////////////////////////////////////////////////////////////////////////////////////////////// namespace AzFramework @@ -22,8 +23,7 @@ namespace AzFramework public: //////////////////////////////////////////////////////////////////////////////////////////// // Constants - static const int NAME_BUFFER_SIZE = 64; - static const int MAX_NAME_LENGTH = NAME_BUFFER_SIZE - 1; + static constexpr int MAX_NAME_LENGTH = 64; //////////////////////////////////////////////////////////////////////////////////////////// // Allocator @@ -41,17 +41,16 @@ namespace AzFramework //! Constructor //! \param[in] name Name of the input device (will be truncated if exceeds MAX_NAME_LENGTH) //! \param[in] index Index of the input device (optional) - explicit InputDeviceId(const char* name, AZ::u32 index = 0); + explicit constexpr InputDeviceId(AZStd::string_view name, AZ::u32 index = 0) + : m_name(name.substr(0, MAX_NAME_LENGTH)) + , m_crc32(name.substr(0, MAX_NAME_LENGTH)) + , m_index(index) + { + } //////////////////////////////////////////////////////////////////////////////////////////// - //! Copy constructor - //! \param[in] other Another instance of the class to copy from - InputDeviceId(const InputDeviceId& other); - - //////////////////////////////////////////////////////////////////////////////////////////// - //! Copy assignment operator - //! \param[in] other Another instance of the class to copy from - InputDeviceId& operator=(const InputDeviceId& other); + // Default copying and moving + AZ_DEFAULT_COPY_MOVE(InputDeviceId); //////////////////////////////////////////////////////////////////////////////////////////// //! Default destructor @@ -60,12 +59,18 @@ namespace AzFramework //////////////////////////////////////////////////////////////////////////////////////////// //! Access to the input device's name //! \return Name of the input device - const char* GetName() const; + constexpr const char* GetName() const + { + return m_name.c_str(); + } //////////////////////////////////////////////////////////////////////////////////////////// //! Access to the crc32 of the input device's name //! \return crc32 of the input device name - const AZ::Crc32& GetNameCrc32() const; + constexpr const AZ::Crc32& GetNameCrc32() const + { + return m_crc32; + } //////////////////////////////////////////////////////////////////////////////////////////// //! Access to the input device's index. Used for differentiating between multiple instances @@ -75,27 +80,45 @@ namespace AzFramework //! at startup using indicies 0->3. As gamepads connect/disconnect at runtime we assign the //! appropriate (system dependent) local user id (see InputDevice::GetAssignedLocalUserId). //! \return Index of the input device - AZ::u32 GetIndex() const; + constexpr AZ::u32 GetIndex() const + { + return m_index; + } //////////////////////////////////////////////////////////////////////////////////////////// - ///@{ //! Equality comparison operator //! \param[in] other Another instance of the class to compare for equality - bool operator==(const InputDeviceId& other) const; - bool operator!=(const InputDeviceId& other) const; - ///@} + constexpr bool operator==(const InputDeviceId& other) const + { + return (m_crc32 == other.m_crc32) && (m_index == other.m_index); + } + + //////////////////////////////////////////////////////////////////////////////////////////// + //! Inequality comparison operator + //! \param[in] other Another instance of the class to compare for inequality + constexpr bool operator!=(const InputDeviceId& other) const + { + return !(*this == other); + } //////////////////////////////////////////////////////////////////////////////////////////// //! Less than comparison operator //! \param[in] other Another instance of the class to compare - bool operator<(const InputDeviceId& other) const; + constexpr bool operator<(const InputDeviceId& other) const + { + if (m_index == other.m_index) + { + return m_crc32 < other.m_crc32; + } + return m_index < other.m_index; + } private: //////////////////////////////////////////////////////////////////////////////////////////// // Variables - char m_name[NAME_BUFFER_SIZE]; //!< Name of the input device - AZ::Crc32 m_crc32; //!< Crc32 of the input device - AZ::u32 m_index; //!< Index of the input device + AZStd::fixed_string m_name; //!< Name of the input device + AZ::Crc32 m_crc32; //!< Crc32 of the input device name + AZ::u32 m_index; //!< Index of the input device }; } // namespace AzFramework diff --git a/Code/Framework/AzFramework/AzFramework/Input/Devices/Keyboard/InputDeviceKeyboard.cpp b/Code/Framework/AzFramework/AzFramework/Input/Devices/Keyboard/InputDeviceKeyboard.cpp index d1117ea895..08674ea92f 100644 --- a/Code/Framework/AzFramework/AzFramework/Input/Devices/Keyboard/InputDeviceKeyboard.cpp +++ b/Code/Framework/AzFramework/AzFramework/Input/Devices/Keyboard/InputDeviceKeyboard.cpp @@ -15,9 +15,6 @@ //////////////////////////////////////////////////////////////////////////////////////////////////// namespace AzFramework { - //////////////////////////////////////////////////////////////////////////////////////////////// - const InputDeviceId InputDeviceKeyboard::Id("keyboard"); - //////////////////////////////////////////////////////////////////////////////////////////////// bool InputDeviceKeyboard::IsKeyboardDevice(const InputDeviceId& inputDeviceId) { @@ -182,8 +179,9 @@ namespace AzFramework } //////////////////////////////////////////////////////////////////////////////////////////////// - InputDeviceKeyboard::InputDeviceKeyboard(AzFramework::InputDeviceId id) - : InputDevice(id) + InputDeviceKeyboard::InputDeviceKeyboard(const InputDeviceId& inputDeviceId, + ImplementationFactory implementationFactory) + : InputDevice(inputDeviceId) , m_modifierKeyStates(AZStd::make_shared()) , m_allChannelsById() , m_keyChannelsById() @@ -203,8 +201,8 @@ namespace AzFramework m_keyChannelsById[channelId] = channel; } - // Create the platform specific implementation - m_pimpl.reset(Implementation::Create(*this)); + // Create the platform specific or custom implementation + m_pimpl.reset(implementationFactory ? implementationFactory(*this) : nullptr); // Connect to the text entry request bus InputTextEntryRequestBus::Handler::BusConnect(GetInputDeviceId()); diff --git a/Code/Framework/AzFramework/AzFramework/Input/Devices/Keyboard/InputDeviceKeyboard.h b/Code/Framework/AzFramework/AzFramework/Input/Devices/Keyboard/InputDeviceKeyboard.h index e3c21ec326..f8300eefdf 100644 --- a/Code/Framework/AzFramework/AzFramework/Input/Devices/Keyboard/InputDeviceKeyboard.h +++ b/Code/Framework/AzFramework/AzFramework/Input/Devices/Keyboard/InputDeviceKeyboard.h @@ -33,7 +33,7 @@ namespace AzFramework public: //////////////////////////////////////////////////////////////////////////////////////////// //! The id used to identify the primary physical keyboard input device - static const InputDeviceId Id; + static constexpr inline InputDeviceId Id{"keyboard"}; //////////////////////////////////////////////////////////////////////////////////////////// //! Check whether an input device id identifies a physical keyboard (regardless of index) @@ -370,9 +370,20 @@ namespace AzFramework // Reflection static void Reflect(AZ::ReflectContext* context); + //////////////////////////////////////////////////////////////////////////////////////////// + // Foward declare the internal Implementation class so it can be passed into the constructor + class Implementation; + + //////////////////////////////////////////////////////////////////////////////////////////// + //! Alias for the function type used to create a custom implementation for this input device + using ImplementationFactory = Implementation*(InputDeviceKeyboard&); + //////////////////////////////////////////////////////////////////////////////////////////// //! Constructor - InputDeviceKeyboard(AzFramework::InputDeviceId id = Id); + //! \param[in] inputDeviceId Optional override of the default input device id + //! \param[in] implementationFactory Optional override of the default Implementation::Create + explicit InputDeviceKeyboard(const InputDeviceId& inputDeviceId = Id, + ImplementationFactory implementationFactory = &Implementation::Create); //////////////////////////////////////////////////////////////////////////////////////////// // Disable copying diff --git a/Code/Framework/AzFramework/AzFramework/Input/Devices/Motion/InputDeviceMotion.cpp b/Code/Framework/AzFramework/AzFramework/Input/Devices/Motion/InputDeviceMotion.cpp index c144f63d2c..fec51349c9 100644 --- a/Code/Framework/AzFramework/AzFramework/Input/Devices/Motion/InputDeviceMotion.cpp +++ b/Code/Framework/AzFramework/AzFramework/Input/Devices/Motion/InputDeviceMotion.cpp @@ -14,9 +14,6 @@ //////////////////////////////////////////////////////////////////////////////////////////////////// namespace AzFramework { - //////////////////////////////////////////////////////////////////////////////////////////////// - const InputDeviceId InputDeviceMotion::Id("motion"); - //////////////////////////////////////////////////////////////////////////////////////////////// bool InputDeviceMotion::IsMotionDevice(const InputDeviceId& inputDeviceId) { @@ -60,8 +57,9 @@ namespace AzFramework } //////////////////////////////////////////////////////////////////////////////////////////////// - InputDeviceMotion::InputDeviceMotion() - : InputDevice(Id) + InputDeviceMotion::InputDeviceMotion(const InputDeviceId& inputDeviceId, + ImplementationFactory implementationFactory) + : InputDevice(inputDeviceId) , m_allChannelsById() , m_accelerationChannelsById() , m_rotationRateChannelsById() @@ -107,8 +105,8 @@ namespace AzFramework m_orientationChannelsById[channelId] = channel; } - // Create the platform specific implementation - m_pimpl.reset(Implementation::Create(*this)); + // Create the platform specific or custom implementation + m_pimpl.reset(implementationFactory ? implementationFactory(*this) : nullptr); // Connect to the motion sensor request bus InputMotionSensorRequestBus::Handler::BusConnect(GetInputDeviceId()); diff --git a/Code/Framework/AzFramework/AzFramework/Input/Devices/Motion/InputDeviceMotion.h b/Code/Framework/AzFramework/AzFramework/Input/Devices/Motion/InputDeviceMotion.h index 872bd1cfa0..14783e01ca 100644 --- a/Code/Framework/AzFramework/AzFramework/Input/Devices/Motion/InputDeviceMotion.h +++ b/Code/Framework/AzFramework/AzFramework/Input/Devices/Motion/InputDeviceMotion.h @@ -28,7 +28,7 @@ namespace AzFramework public: //////////////////////////////////////////////////////////////////////////////////////////// //! The id used to identify the primary motion input device - static const InputDeviceId Id; + static constexpr inline InputDeviceId Id{"motion"}; //////////////////////////////////////////////////////////////////////////////////////////// //! Check whether an input device id identifies a motion device (regardless of index) @@ -126,9 +126,20 @@ namespace AzFramework // Reflection static void Reflect(AZ::ReflectContext* context); + //////////////////////////////////////////////////////////////////////////////////////////// + // Foward declare the internal Implementation class so it can be passed into the constructor + class Implementation; + + //////////////////////////////////////////////////////////////////////////////////////////// + //! Alias for the function type used to create a custom implementation for this input device + using ImplementationFactory = Implementation*(InputDeviceMotion&); + //////////////////////////////////////////////////////////////////////////////////////////// //! Constructor - InputDeviceMotion(); + //! \param[in] inputDeviceId Optional override of the default input device id + //! \param[in] implementationFactory Optional override of the default Implementation::Create + explicit InputDeviceMotion(const InputDeviceId& inputDeviceId = Id, + ImplementationFactory implementationFactory = &Implementation::Create); //////////////////////////////////////////////////////////////////////////////////////////// // Disable copying diff --git a/Code/Framework/AzFramework/AzFramework/Input/Devices/Mouse/InputDeviceMouse.cpp b/Code/Framework/AzFramework/AzFramework/Input/Devices/Mouse/InputDeviceMouse.cpp index e9af4cc4ce..d869fa1f83 100644 --- a/Code/Framework/AzFramework/AzFramework/Input/Devices/Mouse/InputDeviceMouse.cpp +++ b/Code/Framework/AzFramework/AzFramework/Input/Devices/Mouse/InputDeviceMouse.cpp @@ -15,18 +15,6 @@ //////////////////////////////////////////////////////////////////////////////////////////////////// namespace AzFramework { - //////////////////////////////////////////////////////////////////////////////////////////////// - const AZ::u32 InputDeviceMouse::MovementSampleRateDefault = 60; - - //////////////////////////////////////////////////////////////////////////////////////////////// - const AZ::u32 InputDeviceMouse::MovementSampleRateQueueAll = std::numeric_limits::max(); - - //////////////////////////////////////////////////////////////////////////////////////////////// - const AZ::u32 InputDeviceMouse::MovementSampleRateAccumulateAll = 0; - - //////////////////////////////////////////////////////////////////////////////////////////////// - const InputDeviceId InputDeviceMouse::Id("mouse"); - //////////////////////////////////////////////////////////////////////////////////////////////// bool InputDeviceMouse::IsMouseDevice(const InputDeviceId& inputDeviceId) { @@ -67,8 +55,9 @@ namespace AzFramework } //////////////////////////////////////////////////////////////////////////////////////////////// - InputDeviceMouse::InputDeviceMouse(AzFramework::InputDeviceId id) - : InputDevice(id) + InputDeviceMouse::InputDeviceMouse(const InputDeviceId& inputDeviceId, + ImplementationFactory implementationFactory) + : InputDevice(inputDeviceId) , m_allChannelsById() , m_buttonChannelsById() , m_movementChannelsById() @@ -97,8 +86,8 @@ namespace AzFramework m_cursorPositionChannel = aznew InputChannelDeltaWithSharedPosition2D(SystemCursorPosition, *this, m_cursorPositionData2D); m_allChannelsById[SystemCursorPosition] = m_cursorPositionChannel; - // Create the platform specific implementation - m_pimpl.reset(Implementation::Create(*this)); + // Create the platform specific or custom implementation + m_pimpl.reset(implementationFactory ? implementationFactory(*this) : nullptr); // Connect to the system cursor request bus InputSystemCursorRequestBus::Handler::BusConnect(GetInputDeviceId()); diff --git a/Code/Framework/AzFramework/AzFramework/Input/Devices/Mouse/InputDeviceMouse.h b/Code/Framework/AzFramework/AzFramework/Input/Devices/Mouse/InputDeviceMouse.h index 3b35e03f1b..8ad2088d2b 100644 --- a/Code/Framework/AzFramework/AzFramework/Input/Devices/Mouse/InputDeviceMouse.h +++ b/Code/Framework/AzFramework/AzFramework/Input/Devices/Mouse/InputDeviceMouse.h @@ -31,23 +31,23 @@ namespace AzFramework //////////////////////////////////////////////////////////////////////////////////////////// //! Default sample rate for raw mouse movement events that aims to strike a balance between //! responsiveness and performance. - static const AZ::u32 MovementSampleRateDefault; + static constexpr inline AZ::u32 MovementSampleRateDefault{60}; //////////////////////////////////////////////////////////////////////////////////////////// //! Sample rate for raw mouse movement that will cause all events received in the same frame //! to be queued and dispatched as individual events. This results in maximum responsiveness //! but may potentially impact performance depending how many events happen over each frame. - static const AZ::u32 MovementSampleRateQueueAll; + static constexpr inline AZ::u32 MovementSampleRateQueueAll{std::numeric_limits::max()}; //////////////////////////////////////////////////////////////////////////////////////////// //! Sample rate for raw mouse movement that will cause all events received in the same frame //! to be accumulated and dispatched as a single event. Optimal for performance, but results //! in sluggish/unresponsive mouse movement, especially when running at low frame rates. - static const AZ::u32 MovementSampleRateAccumulateAll; + static constexpr inline AZ::u32 MovementSampleRateAccumulateAll{0}; //////////////////////////////////////////////////////////////////////////////////////////// //! The id used to identify the primary mouse input device - static const InputDeviceId Id; + static constexpr inline InputDeviceId Id{"mouse"}; //////////////////////////////////////////////////////////////////////////////////////////// //! Check whether an input device id identifies a mouse (regardless of index) @@ -122,9 +122,20 @@ namespace AzFramework // Reflection static void Reflect(AZ::ReflectContext* context); + //////////////////////////////////////////////////////////////////////////////////////////// + // Foward declare the internal Implementation class so it can be passed into the constructor + class Implementation; + + //////////////////////////////////////////////////////////////////////////////////////////// + //! Alias for the function type used to create a custom implementation for this input device + using ImplementationFactory = Implementation*(InputDeviceMouse&); + //////////////////////////////////////////////////////////////////////////////////////////// //! Constructor - explicit InputDeviceMouse(AzFramework::InputDeviceId id = Id); + //! \param[in] inputDeviceId Optional override of the default input device id + //! \param[in] implementationFactory Optional override of the default Implementation::Create + explicit InputDeviceMouse(const InputDeviceId& inputDeviceId = Id, + ImplementationFactory implementationFactory = &Implementation::Create); //////////////////////////////////////////////////////////////////////////////////////////// // Disable copying diff --git a/Code/Framework/AzFramework/AzFramework/Input/Devices/Touch/InputDeviceTouch.cpp b/Code/Framework/AzFramework/AzFramework/Input/Devices/Touch/InputDeviceTouch.cpp index be850e9289..395ebcecb5 100644 --- a/Code/Framework/AzFramework/AzFramework/Input/Devices/Touch/InputDeviceTouch.cpp +++ b/Code/Framework/AzFramework/AzFramework/Input/Devices/Touch/InputDeviceTouch.cpp @@ -15,9 +15,6 @@ //////////////////////////////////////////////////////////////////////////////////////////////////// namespace AzFramework { - //////////////////////////////////////////////////////////////////////////////////////////////// - const InputDeviceId InputDeviceTouch::Id("touch"); - //////////////////////////////////////////////////////////////////////////////////////////////// bool InputDeviceTouch::IsTouchDevice(const InputDeviceId& inputDeviceId) { @@ -59,8 +56,9 @@ namespace AzFramework } //////////////////////////////////////////////////////////////////////////////////////////////// - InputDeviceTouch::InputDeviceTouch() - : InputDevice(Id) + InputDeviceTouch::InputDeviceTouch(const InputDeviceId& inputDeviceId, + ImplementationFactory implementationFactory) + : InputDevice(inputDeviceId) , m_allChannelsById() , m_touchChannelsById() , m_pimpl(nullptr) @@ -75,8 +73,8 @@ namespace AzFramework m_touchChannelsById[channelId] = channel; } - // Create the platform specific implementation - m_pimpl.reset(Implementation::Create(*this)); + // Create the platform specific or custom implementation + m_pimpl.reset(implementationFactory ? implementationFactory(*this) : nullptr); } //////////////////////////////////////////////////////////////////////////////////////////////// diff --git a/Code/Framework/AzFramework/AzFramework/Input/Devices/Touch/InputDeviceTouch.h b/Code/Framework/AzFramework/AzFramework/Input/Devices/Touch/InputDeviceTouch.h index d21834c22a..6e5e0c7ca9 100644 --- a/Code/Framework/AzFramework/AzFramework/Input/Devices/Touch/InputDeviceTouch.h +++ b/Code/Framework/AzFramework/AzFramework/Input/Devices/Touch/InputDeviceTouch.h @@ -25,7 +25,7 @@ namespace AzFramework public: //////////////////////////////////////////////////////////////////////////////////////////// //! The id used to identify the primary touch input device - static const InputDeviceId Id; + static constexpr inline InputDeviceId Id{"touch"}; //////////////////////////////////////////////////////////////////////////////////////////// //! Check whether an input device id identifies a touch device (regardless of index) @@ -77,9 +77,20 @@ namespace AzFramework // Reflection static void Reflect(AZ::ReflectContext* context); + //////////////////////////////////////////////////////////////////////////////////////////// + // Foward declare the internal Implementation class so it can be passed into the constructor + class Implementation; + + //////////////////////////////////////////////////////////////////////////////////////////// + //! Alias for the function type used to create a custom implementation for this input device + using ImplementationFactory = Implementation*(InputDeviceTouch&); + //////////////////////////////////////////////////////////////////////////////////////////// //! Constructor - InputDeviceTouch(); + //! \param[in] inputDeviceId Optional override of the default input device id + //! \param[in] implementationFactory Optional override of the default Implementation::Create + explicit InputDeviceTouch(const InputDeviceId& inputDeviceId = Id, + ImplementationFactory implementationFactory = &Implementation::Create); //////////////////////////////////////////////////////////////////////////////////////////// // Disable copying diff --git a/Code/Framework/AzFramework/AzFramework/Input/Devices/VirtualKeyboard/InputDeviceVirtualKeyboard.cpp b/Code/Framework/AzFramework/AzFramework/Input/Devices/VirtualKeyboard/InputDeviceVirtualKeyboard.cpp index f3024f11ab..5cfc4ea480 100644 --- a/Code/Framework/AzFramework/AzFramework/Input/Devices/VirtualKeyboard/InputDeviceVirtualKeyboard.cpp +++ b/Code/Framework/AzFramework/AzFramework/Input/Devices/VirtualKeyboard/InputDeviceVirtualKeyboard.cpp @@ -14,9 +14,6 @@ //////////////////////////////////////////////////////////////////////////////////////////////////// namespace AzFramework { - //////////////////////////////////////////////////////////////////////////////////////////////// - const InputDeviceId InputDeviceVirtualKeyboard::Id("virtual_keyboard"); - //////////////////////////////////////////////////////////////////////////////////////////////// bool InputDeviceVirtualKeyboard::IsVirtualKeyboardDevice(const InputDeviceId& inputDeviceId) { @@ -51,8 +48,9 @@ namespace AzFramework } //////////////////////////////////////////////////////////////////////////////////////////////// - InputDeviceVirtualKeyboard::InputDeviceVirtualKeyboard() - : InputDevice(Id) + InputDeviceVirtualKeyboard::InputDeviceVirtualKeyboard(const InputDeviceId& inputDeviceId, + ImplementationFactory implementationFactory) + : InputDevice(inputDeviceId) , m_allChannelsById() , m_pimpl() , m_implementationRequestHandler(*this) @@ -65,8 +63,8 @@ namespace AzFramework m_commandChannelsById[channelId] = channel; } - // Create the platform specific implementation - m_pimpl.reset(Implementation::Create(*this)); + // Create the platform specific or custom implementation + m_pimpl.reset(implementationFactory ? implementationFactory(*this) : nullptr); // Connect to the text entry request bus InputTextEntryRequestBus::Handler::BusConnect(GetInputDeviceId()); diff --git a/Code/Framework/AzFramework/AzFramework/Input/Devices/VirtualKeyboard/InputDeviceVirtualKeyboard.h b/Code/Framework/AzFramework/AzFramework/Input/Devices/VirtualKeyboard/InputDeviceVirtualKeyboard.h index 6f62c3ec61..c9f6286128 100644 --- a/Code/Framework/AzFramework/AzFramework/Input/Devices/VirtualKeyboard/InputDeviceVirtualKeyboard.h +++ b/Code/Framework/AzFramework/AzFramework/Input/Devices/VirtualKeyboard/InputDeviceVirtualKeyboard.h @@ -25,7 +25,7 @@ namespace AzFramework public: //////////////////////////////////////////////////////////////////////////////////////////// //! The id used to identify the primary virtual keyboard input device - static const InputDeviceId Id; + static constexpr inline InputDeviceId Id{"virtual_keyboard"}; //////////////////////////////////////////////////////////////////////////////////////////// //! Check whether an input device id identifies a virtual keyboard (regardless of index) @@ -69,9 +69,20 @@ namespace AzFramework // Reflection static void Reflect(AZ::ReflectContext* context); + //////////////////////////////////////////////////////////////////////////////////////////// + // Foward declare the internal Implementation class so it can be passed into the constructor + class Implementation; + + //////////////////////////////////////////////////////////////////////////////////////////// + //! Alias for the function type used to create a custom implementation for this input device + using ImplementationFactory = Implementation*(InputDeviceVirtualKeyboard&); + //////////////////////////////////////////////////////////////////////////////////////////// //! Constructor - InputDeviceVirtualKeyboard(); + //! \param[in] inputDeviceId Optional override of the default input device id + //! \param[in] implementationFactory Optional override of the default Implementation::Create + explicit InputDeviceVirtualKeyboard(const InputDeviceId& inputDeviceId = Id, + ImplementationFactory implementationFactory = &Implementation::Create); //////////////////////////////////////////////////////////////////////////////////////////// // Disable copying diff --git a/Code/Framework/AzFramework/AzFramework/Physics/HeightfieldProviderBus.cpp b/Code/Framework/AzFramework/AzFramework/Physics/HeightfieldProviderBus.cpp new file mode 100644 index 0000000000..38fac9655c --- /dev/null +++ b/Code/Framework/AzFramework/AzFramework/Physics/HeightfieldProviderBus.cpp @@ -0,0 +1,46 @@ +/* + * Copyright (c) Contributors to the Open 3D Engine Project. + * For complete copyright and license terms please see the LICENSE at the root of this distribution. + * + * SPDX-License-Identifier: Apache-2.0 OR MIT + * + */ + +#include "HeightfieldProviderBus.h" +#include +#include +#include + +namespace Physics +{ + void HeightfieldProviderRequests::Reflect(AZ::ReflectContext* context) + { + if (AZ::BehaviorContext* behaviorContext = azrtti_cast(context)) + { + behaviorContext->EBus("HeightfieldProviderRequestsBus") + ->Attribute(AZ::Script::Attributes::Scope, AZ::Script::Attributes::ScopeFlags::Common) + ->Attribute(AZ::Script::Attributes::Module, "physics") + ->Attribute(AZ::Script::Attributes::Category, "PhysX") + ->Event("GetHeightfieldGridSpacing", &Physics::HeightfieldProviderRequestsBus::Events::GetHeightfieldGridSpacing) + ->Event("GetHeightfieldAabb", &Physics::HeightfieldProviderRequestsBus::Events::GetHeightfieldAabb) + ->Event("GetHeightfieldTransform", &Physics::HeightfieldProviderRequestsBus::Events::GetHeightfieldTransform) + ->Event("GetMaterialList", &Physics::HeightfieldProviderRequestsBus::Events::GetMaterialList) + ->Event("GetHeights", &Physics::HeightfieldProviderRequestsBus::Events::GetHeights) + ->Event("GetHeightsAndMaterials", &Physics::HeightfieldProviderRequestsBus::Events::GetHeightsAndMaterials) + ->Event("GetHeightfieldMinHeight", &Physics::HeightfieldProviderRequestsBus::Events::GetHeightfieldMinHeight) + ->Event("GetHeightfieldMaxHeight", &Physics::HeightfieldProviderRequestsBus::Events::GetHeightfieldMaxHeight) + ->Event("GetHeightfieldGridColumns", &Physics::HeightfieldProviderRequestsBus::Events::GetHeightfieldGridColumns) + ->Event("GetHeightfieldGridRows", &Physics::HeightfieldProviderRequestsBus::Events::GetHeightfieldGridRows) + ; + } + } + + void HeightMaterialPoint::Reflect(AZ::ReflectContext* context) + { + if (AZ::BehaviorContext* behaviorContext = azrtti_cast(context)) + { + behaviorContext->Class()->Attribute(AZ::Script::Attributes::Category, "Physics"); + } + } + +} // namespace Physics diff --git a/Code/Framework/AzFramework/AzFramework/Physics/HeightfieldProviderBus.h b/Code/Framework/AzFramework/AzFramework/Physics/HeightfieldProviderBus.h index 73523ee1ba..da361f0a2b 100644 --- a/Code/Framework/AzFramework/AzFramework/Physics/HeightfieldProviderBus.h +++ b/Code/Framework/AzFramework/AzFramework/Physics/HeightfieldProviderBus.h @@ -26,10 +26,25 @@ namespace Physics struct HeightMaterialPoint { + HeightMaterialPoint( + float height = 0.0f, QuadMeshType type = QuadMeshType::SubdivideUpperLeftToBottomRight, uint8_t index = 0) + : m_height(height) + , m_quadMeshType(type) + , m_materialIndex(index) + , m_padding(0) + { + } + + virtual ~HeightMaterialPoint() = default; + + static void Reflect(AZ::ReflectContext* context); + + AZ_RTTI(HeightMaterialPoint, "{DF167ED4-24E6-4F7B-8AB7-42622F7DBAD3}"); float m_height{ 0.0f }; //!< Holds the height of this point in the heightfield relative to the heightfield entity location. QuadMeshType m_quadMeshType{ QuadMeshType::SubdivideUpperLeftToBottomRight }; //!< By default, create two triangles like this |\|, where this point is in the upper left corner. uint8_t m_materialIndex{ 0 }; //!< The surface material index for the upper left corner of this quad. uint16_t m_padding{ 0 }; //!< available for future use. + }; //! An interface to provide heightfield values. @@ -37,6 +52,8 @@ namespace Physics : public AZ::ComponentBus { public: + static void Reflect(AZ::ReflectContext* context); + //! Returns the distance between each height in the map. //! @return Vector containing Column Spacing, Rows Spacing. virtual AZ::Vector2 GetHeightfieldGridSpacing() const = 0; @@ -46,11 +63,27 @@ namespace Physics //! @param numRows contains the size of the grid in the y direction. virtual void GetHeightfieldGridSize(int32_t& numColumns, int32_t& numRows) const = 0; + //! Returns the height field gridsize columns. + //! @return the size of the grid in the x direction. + virtual int32_t GetHeightfieldGridColumns() const = 0; + + //! Returns the height field gridsize rows. + //! @return the size of the grid in the y direction. + virtual int32_t GetHeightfieldGridRows() const = 0; + //! Returns the height field min and max height bounds. //! @param minHeightBounds contains the minimum height that the heightfield can contain. //! @param maxHeightBounds contains the maximum height that the heightfield can contain. virtual void GetHeightfieldHeightBounds(float& minHeightBounds, float& maxHeightBounds) const = 0; + //! Returns the height field min height bounds. + //! @return the minimum height that the heightfield can contain. + virtual float GetHeightfieldMinHeight() const = 0; + + //! Returns the height field max height bounds. + //! @return the maximum height that the heightfield can contain. + virtual float GetHeightfieldMaxHeight() const = 0; + //! Returns the AABB of the heightfield. //! This is provided separately from the shape AABB because the heightfield might choose to modify the AABB bounds. //! @return AABB of the heightfield. diff --git a/Code/Framework/AzFramework/AzFramework/Physics/Material.cpp b/Code/Framework/AzFramework/AzFramework/Physics/Material.cpp index 222bc48dda..d78d4e0943 100644 --- a/Code/Framework/AzFramework/AzFramework/Physics/Material.cpp +++ b/Code/Framework/AzFramework/AzFramework/Physics/Material.cpp @@ -360,6 +360,11 @@ namespace Physics ->Field("MaterialId", &Physics::MaterialId::m_id) ; } + + if (AZ::BehaviorContext* behaviorContext = azrtti_cast(context)) + { + behaviorContext->Class()->Attribute(AZ::Script::Attributes::Category, "Physics"); + } } MaterialId MaterialId::Create() diff --git a/Code/Framework/AzFramework/AzFramework/Process/ProcessCommunicatorTracePrinter.cpp b/Code/Framework/AzFramework/AzFramework/Process/ProcessCommunicatorTracePrinter.cpp new file mode 100644 index 0000000000..51674bb32c --- /dev/null +++ b/Code/Framework/AzFramework/AzFramework/Process/ProcessCommunicatorTracePrinter.cpp @@ -0,0 +1,87 @@ +/* + * Copyright (c) Contributors to the Open 3D Engine Project. + * For complete copyright and license terms please see the LICENSE at the root of this distribution. + * + * SPDX-License-Identifier: Apache-2.0 OR MIT + * + */ + +#include "ProcessCommunicatorTracePrinter.h" + + +ProcessCommunicatorTracePrinter::ProcessCommunicatorTracePrinter(AzFramework::ProcessCommunicator* communicator, const char* window) : + m_communicator(communicator), + m_window(window) +{ + m_stringBeingConcatenated.reserve(1024); +} + +ProcessCommunicatorTracePrinter::~ProcessCommunicatorTracePrinter() +{ + // flush stdout + WriteCurrentString(false); + + // flush stderr + WriteCurrentString(true); +} + +void ProcessCommunicatorTracePrinter::Pump() +{ + if (m_communicator->IsValid()) + { + // Don't call readOutput unless there is output or else it will block... + while (m_communicator->PeekOutput()) + { + AZ::u32 readSize = m_communicator->ReadOutput(m_streamBuffer, AZ_ARRAY_SIZE(m_streamBuffer)); + ParseDataBuffer(readSize, false); + } + while (m_communicator->PeekError()) + { + AZ::u32 readSize = m_communicator->ReadError(m_streamBuffer, AZ_ARRAY_SIZE(m_streamBuffer)); + ParseDataBuffer(readSize, true); + } + } +} + +void ProcessCommunicatorTracePrinter::ParseDataBuffer(AZ::u32 readSize, bool isFromStdErr) +{ + if (readSize > AZ_ARRAY_SIZE(m_streamBuffer)) + { + AZ_ErrorOnce("ERROR", false, "Programmer bug: Read size is overflowing in traceprintf communicator."); + return; + } + + // we cannot write the string to the same buffer, as stdError and stdOut are different streams and could + // have different cutting points as buffers empty. + AZStd::string& bufferToUse = isFromStdErr ? m_errorStringBeingConcatenated : m_stringBeingConcatenated; + + for (size_t pos = 0; pos < readSize; ++pos) + { + if ((m_streamBuffer[pos] == '\n') || (m_streamBuffer[pos] == '\r')) + { + WriteCurrentString(isFromStdErr); + } + else + { + bufferToUse.push_back(m_streamBuffer[pos]); + } + } +} + +void ProcessCommunicatorTracePrinter::WriteCurrentString(bool isFromStdErr) +{ + AZStd::string& bufferToUse = isFromStdErr ? m_errorStringBeingConcatenated : m_stringBeingConcatenated; + + if (!bufferToUse.empty()) + { + if (isFromStdErr) + { + AZ_Error(m_window.c_str(), false, "%s", bufferToUse.c_str()); + } + else + { + AZ_TracePrintf(m_window.c_str(), "%s", bufferToUse.c_str()); + } + bufferToUse.clear(); + } +} diff --git a/Code/Framework/AzFramework/AzFramework/Process/ProcessCommunicatorTracePrinter.h b/Code/Framework/AzFramework/AzFramework/Process/ProcessCommunicatorTracePrinter.h new file mode 100644 index 0000000000..5e14fa290d --- /dev/null +++ b/Code/Framework/AzFramework/AzFramework/Process/ProcessCommunicatorTracePrinter.h @@ -0,0 +1,36 @@ +/* + * Copyright (c) Contributors to the Open 3D Engine Project. + * For complete copyright and license terms please see the LICENSE at the root of this distribution. + * + * SPDX-License-Identifier: Apache-2.0 OR MIT + * + */ + +#pragma once + +#include + +//! ProcessCommunicatorTracePrinter listens to stderr and stdout of a running process and writes its output to the AZ_Trace system +//! Importantly, it does not do any blocking operations. +class ProcessCommunicatorTracePrinter +{ +public: + ProcessCommunicatorTracePrinter(AzFramework::ProcessCommunicator* communicator, const char* window); + ~ProcessCommunicatorTracePrinter(); + + //! Call this periodically to drain the buffers and write them. + void Pump(); + + //! Drains the buffer into the string that's being built, then traces the string when it hits a newline. + void ParseDataBuffer(AZ::u32 readSize, bool isFromStdErr); + + //! Prints the current buffer to AZ_Error or AZ_TracePrintf so that it can be picked up by AZ::Debug::Trace + void WriteCurrentString(bool isFromStdError); + +private: + AZStd::string m_window; + AzFramework::ProcessCommunicator* m_communicator; + char m_streamBuffer[128]; + AZStd::string m_stringBeingConcatenated; + AZStd::string m_errorStringBeingConcatenated; +}; diff --git a/Code/Framework/AzFramework/AzFramework/Process/ProcessWatcher.cpp b/Code/Framework/AzFramework/AzFramework/Process/ProcessWatcher.cpp index 798b1fe99f..d64c83a6db 100644 --- a/Code/Framework/AzFramework/AzFramework/Process/ProcessWatcher.cpp +++ b/Code/Framework/AzFramework/AzFramework/Process/ProcessWatcher.cpp @@ -9,7 +9,6 @@ #include #include #include -#include #include #include @@ -22,7 +21,7 @@ namespace AzFramework AZStd::scoped_ptr pWatcher(LaunchProcess(processLaunchInfo, communicationType)); if (!pWatcher) { - AZ_TracePrintf("Process Watcher", "ProcessWatcher::LaunchProcessAndRetrieveOutput: Unable to launch process '%s %s'\n", processLaunchInfo.m_processExecutableString.c_str(), processLaunchInfo.m_commandlineParameters.c_str()); + AZ_TracePrintf("Process Watcher", "ProcessWatcher::LaunchProcessAndRetrieveOutput: Unable to launch process '%s %s'\n", processLaunchInfo.m_processExecutableString.c_str(), processLaunchInfo.GetCommandLineParametersAsString().c_str()); return false; } else @@ -31,7 +30,7 @@ namespace AzFramework ProcessCommunicator* pCommunicator = pWatcher->GetCommunicator(); if (!pCommunicator || !pCommunicator->IsValid()) { - AZ_TracePrintf("Process Watcher", "ProcessWatcher::LaunchProcessAndRetrieveOutput: No communicator for watcher's process (%s %s)!\n", processLaunchInfo.m_processExecutableString.c_str(), processLaunchInfo.m_commandlineParameters.c_str()); + AZ_TracePrintf("Process Watcher", "ProcessWatcher::LaunchProcessAndRetrieveOutput: No communicator for watcher's process (%s %s)!\n", processLaunchInfo.m_processExecutableString.c_str(), processLaunchInfo.GetCommandLineParametersAsString().c_str()); return false; } else diff --git a/Code/Framework/AzFramework/AzFramework/Process/ProcessWatcher.h b/Code/Framework/AzFramework/AzFramework/Process/ProcessWatcher.h index 042f450db0..323136c1e0 100644 --- a/Code/Framework/AzFramework/AzFramework/Process/ProcessWatcher.h +++ b/Code/Framework/AzFramework/AzFramework/Process/ProcessWatcher.h @@ -13,6 +13,7 @@ #include #include #include +#include namespace AzFramework { @@ -37,7 +38,7 @@ namespace AzFramework * On windows, the command line will be passed as-is to the shell (with quotes) * on UNIX/OSX, the command line will be converted as appropriate (quotes removed, but used to chop up parameters) */ - AZStd::string m_commandlineParameters; + AZStd::variant> m_commandlineParameters; /** * (optional) If you specify a working directory, the command will be executed with that directory as the current directory. @@ -50,6 +51,8 @@ namespace AzFramework //Not Supported On Mac bool m_showWindow = true; + + AZStd::string GetCommandLineParametersAsString() const; }; static const AZ::u32 INFINITE_TIMEOUT = (AZ::u32) -1; diff --git a/Code/Framework/AzFramework/AzFramework/ProjectManager/ProjectManager.cpp b/Code/Framework/AzFramework/AzFramework/ProjectManager/ProjectManager.cpp index 6bbb07ea74..ed3ff44d1c 100644 --- a/Code/Framework/AzFramework/AzFramework/ProjectManager/ProjectManager.cpp +++ b/Code/Framework/AzFramework/AzFramework/ProjectManager/ProjectManager.cpp @@ -83,7 +83,7 @@ namespace AzFramework::ProjectManager return ProjectPathCheckResult::ProjectManagerLaunchFailed; } - bool LaunchProjectManager([[maybe_unused]]const AZStd::string& commandLineArgs) + bool LaunchProjectManager([[maybe_unused]] const AZStd::vector& commandLineArgs) { bool launchSuccess = false; #if (AZ_TRAIT_AZFRAMEWORK_USE_PROJECT_MANAGER) @@ -105,7 +105,12 @@ namespace AzFramework::ProjectManager } AzFramework::ProcessLauncher::ProcessLaunchInfo processLaunchInfo; - processLaunchInfo.m_commandlineParameters = executablePath.String() + commandLineArgs; + + AZStd::vector launchCmd = { executablePath.String() }; + launchCmd.insert(launchCmd.end(), commandLineArgs.begin(), commandLineArgs.end()); + + processLaunchInfo.m_commandlineParameters = AZStd::move(launchCmd); + launchSuccess = AzFramework::ProcessLauncher::LaunchUnwatchedProcess(processLaunchInfo); } if (ownsSystemAllocator) diff --git a/Code/Framework/AzFramework/AzFramework/ProjectManager/ProjectManager.h b/Code/Framework/AzFramework/AzFramework/ProjectManager/ProjectManager.h index 323045886d..ca4e88ebe1 100644 --- a/Code/Framework/AzFramework/AzFramework/ProjectManager/ProjectManager.h +++ b/Code/Framework/AzFramework/AzFramework/ProjectManager/ProjectManager.h @@ -8,6 +8,7 @@ #pragma once #include +#include #include namespace AzFramework::ProjectManager @@ -29,5 +30,5 @@ namespace AzFramework::ProjectManager //! current executable. Requires the o3de cli and python. //! @param commandLineArgs additional command line arguments to provide to the project manager //! @return true on success, false if failed to find or launch the executable - bool LaunchProjectManager(const AZStd::string& commandLineArgs = ""); + bool LaunchProjectManager(const AZStd::vector& commandLineArgs = {}); } // AzFramework::ProjectManager diff --git a/Code/Framework/AzFramework/AzFramework/Script/ScriptComponent.cpp b/Code/Framework/AzFramework/AzFramework/Script/ScriptComponent.cpp index bfd7c5ac4c..79365f1ebe 100644 --- a/Code/Framework/AzFramework/AzFramework/Script/ScriptComponent.cpp +++ b/Code/Framework/AzFramework/AzFramework/Script/ScriptComponent.cpp @@ -142,7 +142,7 @@ namespace AzFramework AZ::Outcome CompileScript(ScriptCompileRequest& request, AZ::ScriptContext& scriptContext) { AZ_TracePrintf(request.m_errorWindow.data(), "Starting script compile.\n"); - + AZStd::string debugName = "@"; debugName += request.m_sourceFile; AZStd::to_lower(debugName.begin(), debugName.end()); @@ -180,14 +180,14 @@ namespace AzFramework { using namespace AZ::IO; FileIOStream outputStream; - + if (!outputStream.Open(request.m_destPath.c_str(), OpenMode::ModeWrite | OpenMode::ModeBinary)) { return AZ::Failure(AZStd::string("Failed to open output file %s", request.m_destPath.data())); } request.m_output = &outputStream; - + if (writeAssetInfo) { if (request.m_prewriteCallback) @@ -292,7 +292,7 @@ namespace AzFramework namespace Internal { - + AZStd::string PrintLuaValue(lua_State* lua, int stackIdx, int depth = 0) { constexpr int MaxDepth = 4; @@ -302,7 +302,7 @@ namespace AzFramework } const int elementType = lua_type(lua, stackIdx); - + switch (elementType) { case LUA_TSTRING: @@ -347,7 +347,7 @@ namespace AzFramework { keyValuePairs += " "; } - } + } } tableStr += keyValuePairs.length() < 1024 ? keyValuePairs : AZStd::string::format("too many keys (%i)!", keyCount); @@ -891,18 +891,18 @@ namespace AzFramework // This is the root table (properties) it will be used as properties for all sub tables // ScriptComponents can share the same lua script asset, but each instance's Properties table needs to be unique. // This way the script can change a property at runtime and not affect the other ScriptComponents which are using the same script. - // For normal properties we will create new variable instances, but NetSynched variables aren't stored in Lua, and instead + // For normal properties we will create new variable instances, but NetSynched variables aren't stored in Lua, and instead // are retrieved using the __index and __newIndex metamethods. // Ensure that this instance of Properties table has the proper __index and __newIndex metamethods. - lua_newtable(lua); // This new table will become the Properties instance metatable. Stack: ScriptRootTable PropertiesTable EntityTable "Properties" {} {} + lua_newtable(lua); // This new table will become the Properties instance metatable. Stack: ScriptRootTable PropertiesTable EntityTable "Properties" {} {} lua_pushliteral(lua, "__index"); // Stack: ScriptRootTable PropertiesTable EntityTable "Properties" {} {} __index lua_pushcclosure(lua, &Internal::Properties__Index, 0); // Stack: ScriptRootTable PropertiesTable EntityTable "Properties" {} {} __index function - lua_rawset(lua, -3); // Stack: ScriptRootTable PropertiesTable EntityTable "Properties" {} {__index=Internal::Properties__Index} + lua_rawset(lua, -3); // Stack: ScriptRootTable PropertiesTable EntityTable "Properties" {} {__index=Internal::Properties__Index} lua_pushliteral(lua, "__newindex"); lua_pushcclosure(lua, &Internal::Properties__NewIndex, 0); - lua_rawset(lua, -3); // Stack: ScriptRootTable PropertiesTable EntityTable "Properties" {} {__index=Internal::Properties__Index __newindex=Internal::Properties__NewIndex} - lua_setmetatable(lua, -2); // Stack: ScriptRootTable PropertiesTable EntityTable "Properties" {Meta{__index=Internal::Properties__Index __newindex=Internal::Properties__NewIndex} } + lua_rawset(lua, -3); // Stack: ScriptRootTable PropertiesTable EntityTable "Properties" {} {__index=Internal::Properties__Index __newindex=Internal::Properties__NewIndex} + lua_setmetatable(lua, -2); // Stack: ScriptRootTable PropertiesTable EntityTable "Properties" {Meta{__index=Internal::Properties__Index __newindex=Internal::Properties__NewIndex} } metatableIndex = lua_gettop(lua); // This will be the metatable for all subtables } diff --git a/Code/Framework/AzFramework/AzFramework/Spawnable/RootSpawnableInterface.h b/Code/Framework/AzFramework/AzFramework/Spawnable/RootSpawnableInterface.h index 72a3031e3e..d3fe62eae3 100644 --- a/Code/Framework/AzFramework/AzFramework/Spawnable/RootSpawnableInterface.h +++ b/Code/Framework/AzFramework/AzFramework/Spawnable/RootSpawnableInterface.h @@ -30,12 +30,22 @@ namespace AzFramework //! Called when the root spawnable has been assigned a new value. This may be called several times without a call to release //! in between. + //! @note: The callback is not queued but immediately called from a random thread. This is done because this callback is typically + //! used before entities are spawned and if it's queued then the entities spawn before this callback is called. //! @param rootSpawnable The new root spawnable that was assigned. //! @param generation The generation of the root spawnable. This will increment every time a new spawnable is assigned. virtual void OnRootSpawnableAssigned([[maybe_unused]] AZ::Data::Asset rootSpawnable, [[maybe_unused]] uint32_t generation) {} + //! Called when the root spawnable has completed spawning of entities. This may be called several times without a call to release + //! in between. + //! @note: This callback is queued and will be called with a delay and from the main thread. + //! @param rootSpawnable The new root spawnable that was used to spawn entities from. + //! @param generation The generation of the root spawnable. This will increment every time a new spawnable is assigned. + virtual void OnRootSpawnableReady( + [[maybe_unused]] AZ::Data::Asset rootSpawnable, [[maybe_unused]] uint32_t generation) {} //! Called when the root spawnable has Released. This will only be called if there's no root spawnable assigned to take the //! place of the original root spawnable. + //! Note: This callback is queued and will be called with a delay and from the main thread. //! @param generation The generation of the root spawnable that was released. virtual void OnRootSpawnableReleased([[maybe_unused]] uint32_t generation) {} }; diff --git a/Code/Framework/AzFramework/AzFramework/Spawnable/Spawnable.cpp b/Code/Framework/AzFramework/AzFramework/Spawnable/Spawnable.cpp index 4855dc15b3..6259a57ab5 100644 --- a/Code/Framework/AzFramework/AzFramework/Spawnable/Spawnable.cpp +++ b/Code/Framework/AzFramework/AzFramework/Spawnable/Spawnable.cpp @@ -6,12 +6,473 @@ * */ +#include #include #include +#include +#include +#include #include namespace AzFramework { + // + // EntityAlias + // + + bool Spawnable::EntityAlias::HasLowerIndex(const EntityAlias& other) const + { + return m_sourceIndex == other.m_sourceIndex ? + m_aliasType < other.m_aliasType : + m_sourceIndex < other.m_sourceIndex; + } + + + // + // EntityAliasVisitorBase + // + + bool Spawnable::EntityAliasVisitorBase::IsValid(const EntityAliasList* aliases) const + { + return aliases != nullptr; + } + + bool Spawnable::EntityAliasVisitorBase::HasAliases(const EntityAliasList* aliases) const + { + AZ_Assert(aliases, "Attempting to visit entity aliases on a spawnable that wasn't locked."); + return !aliases->empty(); + } + + bool Spawnable::EntityAliasVisitorBase::AreAllSpawnablesReady(const EntityAliasList* aliases) const + { + AZ_Assert(aliases, "Attempting to visit entity aliases on a spawnable that wasn't locked."); + for (const EntityAlias& alias : *aliases) + { + if (!alias.m_queueLoad || + alias.m_aliasType == Spawnable::EntityAliasType::Original || + alias.m_aliasType == Spawnable::EntityAliasType::Disable) + { + continue; + } + if (!alias.m_spawnable.IsReady() && !alias.m_spawnable.IsError()) + { + return false; + } + } + return true; + } + + auto Spawnable::EntityAliasVisitorBase::begin(const EntityAliasList* aliases) const -> EntityAliasList::const_iterator + { + AZ_Assert(aliases, "Attempting to visit entity aliases on a spawnable that wasn't locked."); + return aliases->cbegin(); + } + + auto Spawnable::EntityAliasVisitorBase::end(const EntityAliasList* aliases) const -> EntityAliasList::const_iterator + { + AZ_Assert(aliases, "Attempting to visit entity aliases on a spawnable that wasn't locked."); + return aliases->cend(); + } + + auto Spawnable::EntityAliasVisitorBase::cbegin(const EntityAliasList* aliases) const -> EntityAliasList::const_iterator + { + AZ_Assert(aliases, "Attempting to visit entity aliases on a spawnable that wasn't locked."); + return aliases->cbegin(); + } + + auto Spawnable::EntityAliasVisitorBase::cend(const EntityAliasList* aliases) const -> EntityAliasList::const_iterator + { + AZ_Assert(aliases, "Attempting to visit entity aliases on a spawnable that wasn't locked."); + return aliases->cend(); + } + + void Spawnable::EntityAliasVisitorBase::ListTargetSpawnables( + const EntityAliasList* aliases, const ListTargetSpawanblesCallback& callback) const + { + AZ_Assert(aliases, "Attempting to visit entity aliases on a spawnable that wasn't locked."); + AZStd::unordered_set spawnableIds; + for (const Spawnable::EntityAlias& alias : *aliases) + { + // If the spawnable id is not valid it means that the alias is referencing the spawnable it's stored on. + if (alias.m_spawnable.GetId().IsValid()) + { + auto it = spawnableIds.find(alias.m_spawnable.GetId()); + if (it == spawnableIds.end()) + { + callback(alias.m_spawnable); + spawnableIds.emplace(alias.m_spawnable.GetId()); + } + } + } + } + + void Spawnable::EntityAliasVisitorBase::ListTargetSpawnables( + const EntityAliasList* aliases, AZ::Crc32 tag, const ListTargetSpawanblesCallback& callback) const + { + AZ_Assert(aliases, "Attempting to visit entity aliases on a spawnable that wasn't locked."); + AZStd::unordered_set spawnableIds; + for (const Spawnable::EntityAlias& alias : *aliases) + { + // If the spawnable id is not valid it means that the alias is referencing the spawnable it's stored on. + if (alias.m_tag == tag && alias.m_spawnable.GetId().IsValid()) + { + auto it = spawnableIds.find(alias.m_spawnable.GetId()); + if (it == spawnableIds.end()) + { + callback(alias.m_spawnable); + spawnableIds.emplace(alias.m_spawnable.GetId()); + } + } + } + } + + + // + // EntityAliasVisitor + // + + Spawnable::EntityAliasVisitor::EntityAliasVisitor(Spawnable& owner, EntityAliasList* entityAliasList) + : m_owner(owner) + , m_entityAliasList(entityAliasList) + { + } + + Spawnable::EntityAliasVisitor::~EntityAliasVisitor() + { + if (IsValid()) + { + Optimize(); + + AZ_Assert( + m_owner.m_shareState == ShareState::ReadWrite, "Attempting to unlock a spawnable that's not in the locked state (%i).", + m_owner.m_shareState.load()); + m_owner.m_shareState = ShareState::NotShared; + } + } + + Spawnable::EntityAliasVisitor::EntityAliasVisitor(EntityAliasVisitor&& rhs) + : m_owner(rhs.m_owner) + , m_entityAliasList(rhs.m_entityAliasList) + { + m_dirty = rhs.m_dirty; + + rhs.m_entityAliasList = nullptr; + rhs.m_dirty = false; + } + + auto Spawnable::EntityAliasVisitor::operator=(EntityAliasVisitor&& rhs) -> EntityAliasVisitor& + { + if (this != &rhs) + { + this->~EntityAliasVisitor(); + new(this) EntityAliasVisitor(AZStd::move(rhs)); + } + return *this; + } + + bool Spawnable::EntityAliasVisitor::IsValid() const + { + return EntityAliasVisitorBase::IsValid(m_entityAliasList); + } + + bool Spawnable::EntityAliasVisitor::HasAliases() const + { + return EntityAliasVisitorBase::HasAliases(m_entityAliasList); + } + + bool Spawnable::EntityAliasVisitor::AreAllSpawnablesReady() const + { + return EntityAliasVisitorBase::AreAllSpawnablesReady(m_entityAliasList); + } + + auto Spawnable::EntityAliasVisitor::begin() const -> EntityAliasList::const_iterator + { + return EntityAliasVisitorBase::begin(m_entityAliasList); + } + + auto Spawnable::EntityAliasVisitor::end() const -> EntityAliasList::const_iterator + { + return EntityAliasVisitorBase::end(m_entityAliasList); + } + + auto Spawnable::EntityAliasVisitor::cbegin() const -> EntityAliasList::const_iterator + { + return EntityAliasVisitorBase::cbegin(m_entityAliasList); + } + + auto Spawnable::EntityAliasVisitor::cend() const -> EntityAliasList::const_iterator + { + return EntityAliasVisitorBase::cend(m_entityAliasList); + } + + void Spawnable::EntityAliasVisitor::ListTargetSpawnables(const ListTargetSpawanblesCallback& callback) const + { + EntityAliasVisitorBase::ListTargetSpawnables(m_entityAliasList, callback); + } + + void Spawnable::EntityAliasVisitor::ListTargetSpawnables(AZ::Crc32 tag, const ListTargetSpawanblesCallback& callback) const + { + EntityAliasVisitorBase::ListTargetSpawnables(m_entityAliasList, tag, callback); + } + + void Spawnable::EntityAliasVisitor::AddAlias( + AZ::Data::Asset targetSpawnable, + AZ::Crc32 tag, + uint32_t sourceIndex, + uint32_t targetIndex, + Spawnable::EntityAliasType aliasType, + bool queueLoad) + { + AZ_Assert(m_entityAliasList, "Attempting to visit entity aliases on a spawnable that wasn't locked."); + AZ_Assert(sourceIndex < m_owner.GetEntities().size(), "Invalid source index (%i) for entity alias", sourceIndex); + if (targetSpawnable.IsReady()) + { + AZ_Assert( + targetIndex < targetSpawnable->GetEntities().size(), "Invalid target index (%i) for entity alias '%s'", targetIndex, + targetSpawnable.GetHint().c_str()); + } + + m_entityAliasList->push_back(Spawnable::EntityAlias{ targetSpawnable, tag, sourceIndex, targetIndex, aliasType, queueLoad }); + m_dirty = true; + } + + void Spawnable::EntityAliasVisitor::ListSpawnablesRequiringLoad(const ListSpawnablesRequiringLoadCallback& callback) + { + AZ_Assert(m_entityAliasList, "Attempting to visit entity aliases on a spawnable that wasn't locked."); + for (Spawnable::EntityAlias& alias : *m_entityAliasList) + { + if (alias.m_queueLoad && + alias.m_aliasType != Spawnable::EntityAliasType::Original && + alias.m_aliasType != Spawnable::EntityAliasType::Disable && + !alias.m_spawnable.IsLoading() && + !alias.m_spawnable.IsReady() && + !alias.m_spawnable.IsError()) + { + callback(alias.m_spawnable); + } + } + } + + void Spawnable::EntityAliasVisitor::UpdateAliases(const UpdateCallback& callback) + { + AZ_Assert(m_entityAliasList, "Attempting to visit entity aliases on a spawnable that wasn't locked."); + for (Spawnable::EntityAlias& alias : *m_entityAliasList) + { + AZ::Data::Asset targetSpawnable(alias.m_spawnable); + callback(alias.m_aliasType, alias.m_queueLoad, targetSpawnable, alias.m_tag, alias.m_sourceIndex, alias.m_targetIndex); + } + m_dirty = true; + } + + void Spawnable::EntityAliasVisitor::UpdateAliases(AZ::Crc32 tag, const UpdateCallback& callback) + { + AZ_Assert(m_entityAliasList, "Attempting to visit entity aliases on a spawnable that wasn't locked."); + for (Spawnable::EntityAlias& alias : *m_entityAliasList) + { + if (alias.m_tag == tag) + { + AZ::Data::Asset targetSpawnable(alias.m_spawnable); + callback(alias.m_aliasType, alias.m_queueLoad, targetSpawnable, alias.m_tag, alias.m_sourceIndex, alias.m_targetIndex); + m_dirty = true; + } + } + } + + void Spawnable::EntityAliasVisitor::UpdateAliasType(uint32_t index, Spawnable::EntityAliasType newType) + { + AZ_Assert(m_entityAliasList, "Attempting to visit entity aliases on a spawnable that wasn't locked."); + AZ_Assert( + index < m_entityAliasList->size(), "Unable to update entity alias at index %i as there are only %zu aliases in spawnable.", + index, m_entityAliasList->size()); + (*m_entityAliasList)[index].m_aliasType = newType; + m_dirty = true; + } + + void Spawnable::EntityAliasVisitor::Optimize() + { + AZ_Assert(m_entityAliasList, "Attempting to visit entity aliases on a spawnable that wasn't locked."); + if (m_dirty) + { + AZStd::stable_sort( + m_entityAliasList->begin(), m_entityAliasList->end(), + [](const Spawnable::EntityAlias& lhs, const Spawnable::EntityAlias& rhs) + { + // Sort by source index from smallest to largest so during spawning the entities can be iterated linearly over. + // If the source index is the same then sort by alias type so the next steps can optimize away superfluous steps. + return lhs.HasLowerIndex(rhs); + }); + + // Remove aliases that are not going to have any practical effect and insert aliases where needed to simplify the spawning. + // This is done at runtime rather than at build time because the above ebus allows other systems to make adjustments to the + // aliases, for instance Networking can decide to disable certain aliases when running on a client. This in turn also requires + // the aliases to be in their recorded order during building as the ebus handlers may depend on that order to determine what + // entities need to be updated. + uint32_t previousIndex = AZStd::numeric_limits::max(); + Spawnable::EntityAliasType previousType = + static_cast(AZStd::numeric_limits>::max()); + Spawnable::EntityAlias* it = m_entityAliasList->begin(); + Spawnable::EntityAlias* end = m_entityAliasList->end(); + while (it < end) + { + // If there's a switch to a new source index and the previous index only had an original it can + // be removed. + if (previousType == Spawnable::EntityAliasType::Original && previousIndex != it->m_sourceIndex) + { + it = m_entityAliasList->erase(it - 1); + end = m_entityAliasList->end(); + if (it == end) + { + break; + } + } + + switch (it->m_aliasType) + { + case Spawnable::EntityAliasType::Original: + [[fallthrough]]; + case Spawnable::EntityAliasType::Disable: + [[fallthrough]]; + case Spawnable::EntityAliasType::Replace: + // If the previous entry was a disabled, original or replace alias then remove it as it will be overwritten by the + // current entry. + if (previousIndex == it->m_sourceIndex && + (previousType == Spawnable::EntityAliasType::Original || + previousType == Spawnable::EntityAliasType::Disable || + previousType == Spawnable::EntityAliasType::Replace)) + { + previousIndex = it->m_sourceIndex; + previousType = it->m_aliasType; + // Erase instead of a swap-and-pop in order to preserver the order. + it = m_entityAliasList->erase(it - 1) + 1; + end = m_entityAliasList->end(); + } + else + { + previousIndex = it->m_sourceIndex; + previousType = it->m_aliasType; + ++it; + } + break; + case Spawnable::EntityAliasType::Additional: + [[fallthrough]]; + case Spawnable::EntityAliasType::Merge: + // If this is the first entry for this index then insert an original in front of it so the spawnable entity manager + // doesn't have to check for the case there's a merge and/or addition without an entity to extend. + if (previousIndex != it->m_sourceIndex) + { + Spawnable::EntityAlias insert; + // No load, as the asset is already loaded. + insert.m_spawnable = AZ::Data::Asset({}, azrtti_typeid()); + insert.m_sourceIndex = it->m_sourceIndex; + insert.m_targetIndex = it->m_sourceIndex; // Source index as the original entry for this slot is added. + insert.m_aliasType = Spawnable::EntityAliasType::Original; + + previousIndex = it->m_sourceIndex; + previousType = it->m_aliasType; + + // Insert to maintain the order. + it = m_entityAliasList->insert(it, AZStd::move(insert)); + it += 2; + end = m_entityAliasList->end(); + } + else + { + previousType = it->m_aliasType; + ++it; + } + break; + default: + AZ_Assert(false, "Invalid Spawnable entity alias type found during asset loading: %i", it->m_aliasType); + break; + } + } + + // Check if the last entry is an "Original" in which case it can be removed. + if (!m_entityAliasList->empty() && m_entityAliasList->back().m_aliasType == Spawnable::EntityAliasType::Original) + { + m_entityAliasList->pop_back(); + } + + // Reclaim memory because after this point the aliases will not change anymore. + m_entityAliasList->shrink_to_fit(); + m_dirty = false; + } + } + + + + // + // EntityAliasConstVisitor + // + + Spawnable::EntityAliasConstVisitor::EntityAliasConstVisitor(const Spawnable& owner, const EntityAliasList* entityAliasList) + : m_owner(owner) + , m_entityAliasList(entityAliasList) + { + } + + Spawnable::EntityAliasConstVisitor::~EntityAliasConstVisitor() + { + if (IsValid()) + { + AZ_Assert( + m_owner.m_shareState <= ShareState::Read, "Attempting to unlock a read shared spawnable that was not in a read shared mode (%i).", + m_owner.m_shareState.load()); + m_owner.m_shareState++; + } + } + + bool Spawnable::EntityAliasConstVisitor::IsValid() const + { + return EntityAliasVisitorBase::IsValid(m_entityAliasList); + } + + bool Spawnable::EntityAliasConstVisitor::HasAliases() const + { + return EntityAliasVisitorBase::HasAliases(m_entityAliasList); + } + + bool Spawnable::EntityAliasConstVisitor::AreAllSpawnablesReady() const + { + return EntityAliasVisitorBase::AreAllSpawnablesReady(m_entityAliasList); + } + + auto Spawnable::EntityAliasConstVisitor::begin() const -> EntityAliasList::const_iterator + { + return EntityAliasVisitorBase::begin(m_entityAliasList); + } + + auto Spawnable::EntityAliasConstVisitor::end() const -> EntityAliasList::const_iterator + { + return EntityAliasVisitorBase::end(m_entityAliasList); + } + + auto Spawnable::EntityAliasConstVisitor::cbegin() const -> EntityAliasList::const_iterator + { + return EntityAliasVisitorBase::cbegin(m_entityAliasList); + } + + auto Spawnable::EntityAliasConstVisitor::cend() const -> EntityAliasList::const_iterator + { + return EntityAliasVisitorBase::cend(m_entityAliasList); + } + + void Spawnable::EntityAliasConstVisitor::ListTargetSpawnables(const ListTargetSpawanblesCallback& callback) const + { + EntityAliasVisitorBase::ListTargetSpawnables(m_entityAliasList, callback); + } + + void Spawnable::EntityAliasConstVisitor::ListTargetSpawnables(AZ::Crc32 tag, const ListTargetSpawanblesCallback& callback) const + { + EntityAliasVisitorBase::ListTargetSpawnables(m_entityAliasList, tag, callback); + } + + + + // + // Spawnable + // + Spawnable::Spawnable(const AZ::Data::AssetId& id, AssetStatus status) : AZ::Data::AssetData(id, status) { @@ -27,6 +488,33 @@ namespace AzFramework return m_entities; } + auto Spawnable::TryGetAliasesConst() const -> EntityAliasConstVisitor + { + int32_t expected = ShareState::NotShared; + do + { + // Try to set the lock to a negative number to indicate a shared read. + if (m_shareState.compare_exchange_strong(expected, expected - 1)) + { + return EntityAliasConstVisitor(*this, &m_entityAliases); + } + // as long as the value is negative or not shared then keep trying to get a shared read lock. + } while (expected <= 0); + return EntityAliasConstVisitor(*this, nullptr); + } + + auto Spawnable::TryGetAliases() const -> EntityAliasConstVisitor + { + return TryGetAliasesConst(); + } + + auto Spawnable::TryGetAliases() -> EntityAliasVisitor + { + int32_t expected = ShareState::NotShared; + return m_shareState.compare_exchange_strong(expected, ShareState::ReadWrite) ? EntityAliasVisitor(*this, &m_entityAliases) + : EntityAliasVisitor(*this, nullptr); + } + bool Spawnable::IsEmpty() const { return m_entities.empty(); @@ -44,11 +532,29 @@ namespace AzFramework void Spawnable::Reflect(AZ::ReflectContext* context) { + EntityAlias::Reflect(context); + if (auto* serializeContext = azrtti_cast(context); serializeContext != nullptr) { - serializeContext->Class()->Version(1) + serializeContext->Class()->Version(2) ->Field("Meta data", &Spawnable::m_metaData) + ->Field("Entity aliases", &Spawnable::m_entityAliases) ->Field("Entities", &Spawnable::m_entities); } } + + void Spawnable::EntityAlias::Reflect(AZ::ReflectContext* context) + { + if (auto* serializeContext = azrtti_cast(context); serializeContext != nullptr) + { + serializeContext->Class() + ->Version(1) + ->Field("Spawnable", &EntityAlias::m_spawnable) + ->Field("Tag", &EntityAlias::m_tag) + ->Field("Source Index", &EntityAlias::m_sourceIndex) + ->Field("Target Index", &EntityAlias::m_targetIndex) + ->Field("Alias Type", &EntityAlias::m_aliasType) + ->Field("Queue Load", &EntityAlias::m_queueLoad); + } + } } // namespace AzFramework diff --git a/Code/Framework/AzFramework/AzFramework/Spawnable/Spawnable.h b/Code/Framework/AzFramework/AzFramework/Spawnable/Spawnable.h index 37c22d503d..f029246847 100644 --- a/Code/Framework/AzFramework/AzFramework/Spawnable/Spawnable.h +++ b/Code/Framework/AzFramework/AzFramework/Spawnable/Spawnable.h @@ -11,6 +11,7 @@ #include #include #include +#include #include #include #include @@ -29,7 +30,148 @@ namespace AzFramework AZ_CLASS_ALLOCATOR(Spawnable, AZ::SystemAllocator, 0); AZ_RTTI(AzFramework::Spawnable, "{855E3021-D305-4845-B284-20C3F7FDF16B}", AZ::Data::AssetData); + // The order is important for sorting in the SpawnableAssetHandler. + enum class EntityAliasType : uint8_t + { + Original, //!< The original entity is spawned. + Disable, //!< No entity will be spawned. + Replace, //!< The entity alias is spawned instead of the original. + Additional, //!< The original entity is spawned as well as the alias. The alias will get a new entity id. + Merge //!< The original entity is spawned and the components of the alias are added. The caller is responsible for + //!< maintaining a valid component list. + }; + + enum ShareState : int32_t + { + Read = -1, + NotShared = 0, + ReadWrite = 1 + }; + + //! An entity alias redirects the spawning of an entity to another entity, possibly in another spawnable. + struct EntityAlias + { + AZ_CLASS_ALLOCATOR(EntityAlias, AZ::SystemAllocator, 0); + AZ_TYPE_INFO(AzFramework::Spawnable::EntityAlias, "{C8D0C5BC-1F0B-4572-98C1-73B2CA8C9356}"); + + bool HasLowerIndex(const EntityAlias& other) const; + + AZ::Data::Asset m_spawnable; //!< The spawnable containing the target entity to spawn. + uint32_t m_tag{ 0 }; //!< A unique tag to identify this alias with. + uint32_t m_sourceIndex{ 0 }; //!< The index of the entity in the original spawnable that will be replaced. + uint32_t m_targetIndex{ 0 }; //!< The index of the entity in the target spawnable that will be used to replace the original. + EntityAliasType m_aliasType{ EntityAliasType::Original }; //!< The kind of replacement. + bool m_queueLoad{ false }; //!< Whether or not to automatically queue the spawnable for loading. + + static void Reflect(AZ::ReflectContext* context); + }; + using EntityList = AZStd::vector>; + using EntityAliasList = AZStd::vector; + + private: + class EntityAliasVisitorBase + { + protected: + bool IsValid(const EntityAliasList* aliases) const; + + bool HasAliases(const EntityAliasList* aliases) const; + bool AreAllSpawnablesReady(const EntityAliasList* aliases) const; + + EntityAliasList::const_iterator begin(const EntityAliasList* aliases) const; + EntityAliasList::const_iterator end(const EntityAliasList* aliases) const; + EntityAliasList::const_iterator cbegin(const EntityAliasList* aliases) const; + EntityAliasList::const_iterator cend(const EntityAliasList* aliases) const; + + using ListTargetSpawanblesCallback = AZStd::function& targetSpawnable)>; + void ListTargetSpawnables(const EntityAliasList* aliases, const ListTargetSpawanblesCallback& callback) const; + void ListTargetSpawnables(const EntityAliasList* aliases, AZ::Crc32 tag, const ListTargetSpawanblesCallback& callback) const; + }; + + public: + class EntityAliasVisitor final : public EntityAliasVisitorBase + { + public: + EntityAliasVisitor(Spawnable& owner, EntityAliasList* m_entityAliasList); + ~EntityAliasVisitor(); + + EntityAliasVisitor(EntityAliasVisitor&& rhs); + EntityAliasVisitor& operator=(EntityAliasVisitor&& rhs); + + EntityAliasVisitor(const EntityAliasVisitor& rhs) = delete; + EntityAliasVisitor& operator=(const EntityAliasVisitor& rhs) = delete; + + //! Checks if the visitor was able to retrieve data. This needs to be checked before calling any other functions. + bool IsValid() const; + + bool HasAliases() const; + bool AreAllSpawnablesReady() const; + + // Modification of aliases is limited to specific changes that can only be done through the available modification functions. + // For this reason access through iterators is limited to unmodifiable constant iterators. + + EntityAliasList::const_iterator begin() const; + EntityAliasList::const_iterator end() const; + EntityAliasList::const_iterator cbegin() const; + EntityAliasList::const_iterator cend() const; + + void ListTargetSpawnables(const ListTargetSpawanblesCallback& callback) const; + void ListTargetSpawnables(AZ::Crc32 tag, const ListTargetSpawanblesCallback& callback) const; + + void AddAlias( + AZ::Data::Asset targetSpawnable, + AZ::Crc32 tag, + uint32_t sourceIndex, + uint32_t targetIndex, + Spawnable::EntityAliasType aliasType, + bool queueLoad); + + using ListSpawnablesRequiringLoadCallback = AZStd::function& spawnablePendingLoad)>; + void ListSpawnablesRequiringLoad(const ListSpawnablesRequiringLoadCallback& callback); + + using UpdateCallback = AZStd::function& aliasedSpawnable, + const AZ::Crc32 tag, + const uint32_t sourceIndex, + const uint32_t targetIndex)>; + void UpdateAliases(const UpdateCallback& callback); + void UpdateAliases(AZ::Crc32 tag, const UpdateCallback& callback); + void UpdateAliasType(uint32_t index, Spawnable::EntityAliasType newType); + + void Optimize(); + + private: + Spawnable& m_owner; + EntityAliasList* m_entityAliasList{ nullptr }; + bool m_dirty{ false }; + }; + + class EntityAliasConstVisitor final : public EntityAliasVisitorBase + { + public: + EntityAliasConstVisitor(const Spawnable& owner, const EntityAliasList* entityAliasList); + ~EntityAliasConstVisitor(); + + //! Checks if the visitor was able to retrieve data. This needs to be checked before calling any other functions. + bool IsValid() const; + + bool HasAliases() const; + bool AreAllSpawnablesReady() const; + + EntityAliasList::const_iterator begin() const; + EntityAliasList::const_iterator end() const; + EntityAliasList::const_iterator cbegin() const; + EntityAliasList::const_iterator cend() const; + + void ListTargetSpawnables(const ListTargetSpawanblesCallback& callback) const; + void ListTargetSpawnables(AZ::Crc32 tag, const ListTargetSpawanblesCallback& callback) const; + + private: + const Spawnable& m_owner; + const EntityAliasList* m_entityAliasList; + }; inline static constexpr const char* FileExtension = "spawnable"; inline static constexpr const char* DotFileExtension = ".spawnable"; @@ -45,6 +187,9 @@ namespace AzFramework const EntityList& GetEntities() const; EntityList& GetEntities(); + EntityAliasConstVisitor TryGetAliasesConst() const; + EntityAliasConstVisitor TryGetAliases() const; + EntityAliasVisitor TryGetAliases(); bool IsEmpty() const; SpawnableMetaData& GetMetaData(); @@ -55,11 +200,12 @@ namespace AzFramework private: SpawnableMetaData m_metaData; + // Aliases that optionally replace the ones stored in this spawnable. + EntityAliasList m_entityAliases; // Container for keeping all entities of the prefab the Spawnable was created from. // Includes both direct and nested entities of the prefab. EntityList m_entities; + + mutable AZStd::atomic m_shareState{ ShareState::NotShared }; }; - - using SpawnableList = AZStd::vector; - } // namespace AzFramework diff --git a/Code/Framework/AzFramework/AzFramework/Spawnable/SpawnableAssetBus.h b/Code/Framework/AzFramework/AzFramework/Spawnable/SpawnableAssetBus.h new file mode 100644 index 0000000000..d3d7bfabb7 --- /dev/null +++ b/Code/Framework/AzFramework/AzFramework/Spawnable/SpawnableAssetBus.h @@ -0,0 +1,38 @@ +/* + * Copyright (c) Contributors to the Open 3D Engine Project. + * For complete copyright and license terms please see the LICENSE at the root of this distribution. + * + * SPDX-License-Identifier: Apache-2.0 OR MIT + * + */ + +#pragma once + +#include +#include +#include + +namespace AzFramework +{ + class SpawnableAssetEvents : public AZ::EBusTraits + { + public: + using MutexType = AZStd::recursive_mutex; + + //! Callback to allow the entity aliases in a spawnable to adjusted based on runtime requirements. + //! This will be called by the Asset Manager as part of the creation of the spawnable asset from loaded file data. Any work done + //! in this callback will be counted towards the maximum amount of time allocated to asset handlers to construct their assets, + //! it's recommended to keep work done in this callback to a minimum and prefer delaying any complex processing. + //! + //! ALERT: Do not start blocking asset requests in this callback. + //! Since this is part of the Asset Manager's asset streaming, doing a blocking load in this callback will cause the job + //! processing the spawnable asset to locked out of doing any asset streaming work. If there are more spawnables doing + //! this than there are job threads available the engine will enter a deadlock situation as no more assets can complete + //! loading and no job threads become free as they're all waiting for assets to complete. It is however safe to queue + //! an asset for loading. + virtual void OnResolveAliases( + Spawnable::EntityAliasVisitor& aliases, const SpawnableMetaData& metadata, const Spawnable::EntityList& entities) = 0; + }; + + using SpawnableAssetEventsBus = AZ::EBus; +} // namespace AzFramework diff --git a/Code/Framework/AzFramework/AzFramework/Spawnable/SpawnableAssetHandler.cpp b/Code/Framework/AzFramework/AzFramework/Spawnable/SpawnableAssetHandler.cpp index c24b538de7..411ee56687 100644 --- a/Code/Framework/AzFramework/AzFramework/Spawnable/SpawnableAssetHandler.cpp +++ b/Code/Framework/AzFramework/AzFramework/Spawnable/SpawnableAssetHandler.cpp @@ -9,8 +9,10 @@ #include #include #include +#include #include #include +#include namespace AzFramework { @@ -52,6 +54,7 @@ namespace AzFramework AZ::ObjectStream::FilterDescriptor filter(assetLoadFilterCB); if (AZ::Utils::LoadObjectFromStreamInPlace(*stream, *spawnable, nullptr /*SerializeContext*/, filter)) { + ResolveEntityAliases(spawnable, asset, stream->GetStreamingDeadline(), stream->GetStreamingPriority(), assetLoadFilterCB); return AZ::Data::AssetHandler::LoadResult::LoadComplete; } else @@ -91,4 +94,41 @@ namespace AzFramework AZ::Uuid subIdHash = AZ::Uuid::CreateData(id.data(), id.size()); return azlossy_caster(subIdHash.GetHash()); } + + void SpawnableAssetHandler::ResolveEntityAliases( + Spawnable* spawnable, + [[maybe_unused]] const AZ::Data::Asset& asset, + AZStd::chrono::milliseconds streamingDeadline, + AZ::IO::IStreamerTypes::Priority streamingPriority, + const AZ::Data::AssetFilterCB& assetLoadFilterCB) + { + Spawnable::EntityAliasVisitor aliases = spawnable->TryGetAliases(); + AZ_Assert(aliases.IsValid(), "Newly created Spawnable '%s' was already locked.", asset.GetHint().c_str()); + if (aliases.HasAliases()) + { + AZ_Assert( + AZStd::is_sorted( + aliases.begin(), aliases.end(), + [](const Spawnable::EntityAlias& lhs, const Spawnable::EntityAlias& rhs) + { + return lhs.HasLowerIndex(rhs); + }), + "Spawnable '%s' has an unsorted entity alias list.", asset.GetHint().c_str()); + + SpawnableAssetEventsBus::Broadcast( + &SpawnableAssetEvents::OnResolveAliases, aliases, spawnable->GetMetaData(), spawnable->GetEntities()); + + // The aliases will only be optimized if OnResolveAliases has made any changes. + aliases.Optimize(); + aliases.ListSpawnablesRequiringLoad( + [&assetLoadFilterCB, streamingDeadline, streamingPriority](AZ::Data::Asset& assetPendingLoad) + { + AZ::Data::AssetLoadParameters loadInfo; + loadInfo.m_assetLoadFilterCB = assetLoadFilterCB; + loadInfo.m_deadline = streamingDeadline; + loadInfo.m_priority = streamingPriority; + assetPendingLoad.QueueLoad(loadInfo); + }); + } + } } // namespace AzFramework diff --git a/Code/Framework/AzFramework/AzFramework/Spawnable/SpawnableAssetHandler.h b/Code/Framework/AzFramework/AzFramework/Spawnable/SpawnableAssetHandler.h index 94ec9b13fd..e043019e29 100644 --- a/Code/Framework/AzFramework/AzFramework/Spawnable/SpawnableAssetHandler.h +++ b/Code/Framework/AzFramework/AzFramework/Spawnable/SpawnableAssetHandler.h @@ -50,5 +50,13 @@ namespace AzFramework const AZ::Data::Asset& asset, AZStd::shared_ptr stream, const AZ::Data::AssetFilterCB& assetLoadFilterCB) override; + + private: + void ResolveEntityAliases( + class Spawnable* spawnable, + const AZ::Data::Asset& asset, + AZStd::chrono::milliseconds streamingDeadline, + AZ::IO::IStreamerTypes::Priority streamingPriority, + const AZ::Data::AssetFilterCB& assetLoadFilterCB); }; } // namespace AzFramework diff --git a/Code/Framework/AzFramework/AzFramework/Spawnable/SpawnableEntitiesContainer.cpp b/Code/Framework/AzFramework/AzFramework/Spawnable/SpawnableEntitiesContainer.cpp index b98ea275e4..912bf05058 100644 --- a/Code/Framework/AzFramework/AzFramework/Spawnable/SpawnableEntitiesContainer.cpp +++ b/Code/Framework/AzFramework/AzFramework/Spawnable/SpawnableEntitiesContainer.cpp @@ -26,7 +26,7 @@ namespace AzFramework return m_threadData != nullptr; } - uint64_t SpawnableEntitiesContainer::GetCurrentGeneration() const + uint32_t SpawnableEntitiesContainer::GetCurrentGeneration() const { return m_currentGeneration; } @@ -37,7 +37,7 @@ namespace AzFramework SpawnableEntitiesInterface::Get()->SpawnAllEntities(m_threadData->m_spawnedEntitiesTicket); } - void SpawnableEntitiesContainer::SpawnEntities(AZStd::vector entityIndices) + void SpawnableEntitiesContainer::SpawnEntities(AZStd::vector entityIndices) { AZ_Assert(m_threadData, "Calling SpawnEntities on a Spawnable container that's not set."); SpawnableEntitiesInterface::Get()->SpawnEntities( @@ -78,15 +78,21 @@ namespace AzFramework } } - void SpawnableEntitiesContainer::Alert(AlertCallback callback) + void SpawnableEntitiesContainer::Alert(AlertCallback callback, CheckIfSpawnableIsLoaded spawnableCheck) { AZ_Assert(m_threadData, "Calling DespawnEntities on a Spawnable container that's not set."); - SpawnableEntitiesInterface::Get()->Barrier( - m_threadData->m_spawnedEntitiesTicket, - [generation = m_threadData->m_generation, callback = AZStd::move(callback)](EntitySpawnTicket::Id) - { - callback(generation); - }); + auto callbackWrapper = [generation = m_threadData->m_generation, callback = AZStd::move(callback)](EntitySpawnTicket::Id) + { + callback(generation); + }; + if (spawnableCheck == CheckIfSpawnableIsLoaded::No) + { + SpawnableEntitiesInterface::Get()->Barrier(m_threadData->m_spawnedEntitiesTicket, AZStd::move(callbackWrapper)); + } + else + { + SpawnableEntitiesInterface::Get()->LoadBarrier(m_threadData->m_spawnedEntitiesTicket, AZStd::move(callbackWrapper)); + } } void SpawnableEntitiesContainer::Connect(AZ::Data::Asset spawnable) diff --git a/Code/Framework/AzFramework/AzFramework/Spawnable/SpawnableEntitiesContainer.h b/Code/Framework/AzFramework/AzFramework/Spawnable/SpawnableEntitiesContainer.h index 6fa295e18c..cabef38ff5 100644 --- a/Code/Framework/AzFramework/AzFramework/Spawnable/SpawnableEntitiesContainer.h +++ b/Code/Framework/AzFramework/AzFramework/Spawnable/SpawnableEntitiesContainer.h @@ -36,6 +36,12 @@ namespace AzFramework public: using AlertCallback = AZStd::function; + enum class CheckIfSpawnableIsLoaded : bool + { + Yes, + No + }; + //! Constructs a new spawnables entity container that has not been connected. SpawnableEntitiesContainer() = default; //! Constructs a new spawnables entity container that connects to the provided spawnable. @@ -48,13 +54,13 @@ namespace AzFramework //! Returns a number that identifies the current generation of the container with. The completion callback can still receive //! calls from older generations as processing completes on those. The returned value can be used to help calls tell //! older versions apart from newer ones. - [[nodiscard]] uint64_t GetCurrentGeneration() const; + [[nodiscard]] uint32_t GetCurrentGeneration() const; //! Puts in a request to spawn entities using all entities in the provided spawnable as a template. void SpawnAllEntities(); //! Puts in a request to spawn entities using the entities found in the spawnable at the provided indices as a template. //! @param entityIndices A list of indices to the entities in the spawnable. - void SpawnEntities(AZStd::vector entityIndices); + void SpawnEntities(AZStd::vector entityIndices); //! Puts in a request to despawn all previous spawned entities. void DespawnAllEntities(); @@ -73,7 +79,11 @@ namespace AzFramework //! other than the calling thread including the main thread. Note that because the alert is queued it can still be called //! after the container has been deleted or can be called for a previously assigned spawnable. In the latter case check //! if the current generation matches the generation provided with the callback. - void Alert(AlertCallback callback); + //! @param callback The function called when the alert triggers. This can be called from a different thread than the one that + //! the one that made the call to Alert. + //! @param checkSpawnableIsLoaded If true the alert will also block until the spawnable has been loaded. If false then it will + //! be called after all previous calls have completed, but the spawnable may not be loaded at that point. + void Alert(AlertCallback callback, CheckIfSpawnableIsLoaded spawnableCheck = CheckIfSpawnableIsLoaded::No); private: void Connect(AZ::Data::Asset spawnable); diff --git a/Code/Framework/AzFramework/AzFramework/Spawnable/SpawnableEntitiesInterface.cpp b/Code/Framework/AzFramework/AzFramework/Spawnable/SpawnableEntitiesInterface.cpp index 171d626b27..37091d8f0f 100644 --- a/Code/Framework/AzFramework/AzFramework/Spawnable/SpawnableEntitiesInterface.cpp +++ b/Code/Framework/AzFramework/AzFramework/Spawnable/SpawnableEntitiesInterface.cpp @@ -152,7 +152,7 @@ namespace AzFramework // SpawnableIndexEntityPair // - SpawnableIndexEntityPair::SpawnableIndexEntityPair(AZ::Entity** entityIterator, size_t* indexIterator) + SpawnableIndexEntityPair::SpawnableIndexEntityPair(AZ::Entity** entityIterator, uint32_t* indexIterator) : m_entity(entityIterator) , m_index(indexIterator) { @@ -168,7 +168,7 @@ namespace AzFramework return *m_entity; } - size_t SpawnableIndexEntityPair::GetIndex() const + uint32_t SpawnableIndexEntityPair::GetIndex() const { return *m_index; } @@ -177,7 +177,7 @@ namespace AzFramework // SpawnableIndexEntityIterator // - SpawnableIndexEntityIterator::SpawnableIndexEntityIterator(AZ::Entity** entityIterator, size_t* indexIterator) + SpawnableIndexEntityIterator::SpawnableIndexEntityIterator(AZ::Entity** entityIterator, uint32_t* indexIterator) : m_value(entityIterator, indexIterator) { } @@ -248,7 +248,7 @@ namespace AzFramework // SpawnableConstIndexEntityContainerView::SpawnableConstIndexEntityContainerView( - AZ::Entity** beginEntity, size_t* beginIndices, size_t length) + AZ::Entity** beginEntity, uint32_t* beginIndices, size_t length) : m_begin(beginEntity, beginIndices) , m_end(beginEntity + length, beginIndices + length) { diff --git a/Code/Framework/AzFramework/AzFramework/Spawnable/SpawnableEntitiesInterface.h b/Code/Framework/AzFramework/AzFramework/Spawnable/SpawnableEntitiesInterface.h index 74a17020df..66197ae8fc 100644 --- a/Code/Framework/AzFramework/AzFramework/Spawnable/SpawnableEntitiesInterface.h +++ b/Code/Framework/AzFramework/AzFramework/Spawnable/SpawnableEntitiesInterface.h @@ -10,6 +10,7 @@ #include #include +#include #include #include #include @@ -85,19 +86,19 @@ namespace AzFramework AZ::Entity* GetEntity(); const AZ::Entity* GetEntity() const; - size_t GetIndex() const; + uint32_t GetIndex() const; private: SpawnableIndexEntityPair() = default; SpawnableIndexEntityPair(const SpawnableIndexEntityPair&) = default; SpawnableIndexEntityPair(SpawnableIndexEntityPair&&) = default; - SpawnableIndexEntityPair(AZ::Entity** entityIterator, size_t* indexIterator); + SpawnableIndexEntityPair(AZ::Entity** entityIterator, uint32_t* indexIterator); SpawnableIndexEntityPair& operator=(const SpawnableIndexEntityPair&) = default; SpawnableIndexEntityPair& operator=(SpawnableIndexEntityPair&&) = default; AZ::Entity** m_entity { nullptr }; - size_t* m_index { nullptr }; + uint32_t* m_index { nullptr }; }; class SpawnableIndexEntityIterator @@ -110,7 +111,7 @@ namespace AzFramework using pointer = SpawnableIndexEntityPair*; using reference = SpawnableIndexEntityPair&; - SpawnableIndexEntityIterator(AZ::Entity** entityIterator, size_t* indexIterator); + SpawnableIndexEntityIterator(AZ::Entity** entityIterator, uint32_t* indexIterator); SpawnableIndexEntityIterator& operator++(); SpawnableIndexEntityIterator operator++(int); @@ -132,7 +133,7 @@ namespace AzFramework class SpawnableConstIndexEntityContainerView { public: - SpawnableConstIndexEntityContainerView(AZ::Entity** beginEntity, size_t* beginIndices, size_t length); + SpawnableConstIndexEntityContainerView(AZ::Entity** beginEntity, uint32_t* beginIndices, size_t length); const SpawnableIndexEntityIterator& begin(); const SpawnableIndexEntityIterator& end(); @@ -144,6 +145,16 @@ namespace AzFramework SpawnableIndexEntityIterator m_end; }; + //! Information used when updating the type of an entity alias. + struct EntityAliasTypeChange + { + //! The index of the alias in the spawnable. Note that due to optimizations done on the entity aliases the index of an alias + //! can change over time. + uint32_t m_aliasIndex; + //! The type to replace type stored in the spawnable at the index provided by m_aliasIndex. + Spawnable::EntityAliasType m_newAliasType; + }; + //! Requests to the SpawnableEntitiesInterface require a ticket with a valid spawnable that is used as a template. A ticket can //! be reused for multiple calls on the same spawnable and is safe to be used 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 @@ -154,6 +165,8 @@ namespace AzFramework public: friend class SpawnableEntitiesDefinition; + AZ_CLASS_ALLOCATOR(AzFramework::EntitySpawnTicket, AZ::SystemAllocator, 0); + using Id = uint32_t; EntitySpawnTicket() = default; @@ -178,6 +191,7 @@ namespace AzFramework using EntityDespawnCallback = AZStd::function; using RetrieveEntitySpawnTicketCallback = AZStd::function; using ReloadSpawnableCallback = AZStd::function; + using UpdateEntityAliasTypesCallback = AZStd::function; using ListEntitiesCallback = AZStd::function; using ListIndicesEntitiesCallback = AZStd::function; using ClaimEntitiesCallback = AZStd::function; @@ -247,6 +261,15 @@ namespace AzFramework SpawnablePriority m_priority { SpawnablePriority_Default }; }; + struct UpdateEntityAliasTypesOptionalArgs final + { + //! Callback that's called when entity aliases are updated. This can be triggered from a different thread than the one that + //! made the function call to update. + UpdateEntityAliasTypesCallback m_completionCallback; + //! The priority at which this call will be executed. + SpawnablePriority m_priority{ SpawnablePriority_Default }; + }; + struct ListEntitiesOptionalArgs final { //! The priority at which this call will be executed. @@ -265,6 +288,14 @@ namespace AzFramework SpawnablePriority m_priority{ SpawnablePriority_Default }; }; + struct LoadBarrierOptionalArgs final + { + //! The priority at which this call will be executed. + SpawnablePriority m_priority{ SpawnablePriority_Default }; + //! Also checks if the spawnables referenced in the entity aliases that are marked to be loaded are loaded. + bool m_checkAliasSpawnables{ true }; + }; + //! Interface definition to (de)spawn entities from a spawnable into the game world. //! //! While the callbacks of the individual calls are being processed they will block processing any other request. Callbacks can be @@ -298,7 +329,7 @@ namespace AzFramework //! @param entityIndices The indices into the template entities stored in the spawnable that will be used to spawn entities from. //! @param optionalArgs Optional additional arguments, see SpawnEntitiesOptionalArgs. virtual void SpawnEntities( - EntitySpawnTicket& ticket, AZStd::vector entityIndices, SpawnEntitiesOptionalArgs optionalArgs = {}) = 0; + EntitySpawnTicket& ticket, AZStd::vector entityIndices, SpawnEntitiesOptionalArgs optionalArgs = {}) = 0; //! Removes all entities in the provided list from the environment. //! @param ticket The ticket previously used to spawn entities with. //! @param optionalArgs Optional additional arguments, see DespawnAllEntitiesOptionalArgs. @@ -320,6 +351,16 @@ namespace AzFramework virtual void ReloadSpawnable( EntitySpawnTicket& ticket, AZ::Data::Asset spawnable, ReloadSpawnableOptionalArgs optionalArgs = {}) = 0; + //! Allows updating the entity alias on a spawnable. This allows the spawning behavior for all entities spawned from the used + //! spawnable to be changed and is not restricted to this ticket alone. + //! @param ticket Holds the information for the spawnable. + //! @param updateAliases An array of index and alias type values used to update the entity alias list. + //! @param optionalArgs Optional additional arguments, see UpdateEntityAliasTypesOptionalArgs. + virtual void UpdateEntityAliasTypes( + EntitySpawnTicket& ticket, + AZStd::vector updatedAliases, + UpdateEntityAliasTypesOptionalArgs optionalArgs = {}) = 0; + //! List all entities that are spawned using this ticket. //! @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. @@ -351,31 +392,37 @@ namespace AzFramework //! @param completionCallback Required callback that will be called as soon as the barrier has been reached. //! @param optionalArgs Optional additional arguments, see BarrierOptionalArgs. virtual void Barrier(EntitySpawnTicket& ticket, BarrierCallback completionCallback, BarrierOptionalArgs optionalArgs = {}) = 0; + //! Blocks until the spawnable is loaded and all operations made on the provided ticket before the barrier call have completed. + //! @param ticket The ticket to monitor. + //! @param completionCallback Required callback that will be called as soon as the barrier has been reached. + //! @param optionalArgs Optional additional arguments, see BarrierOptionalArgs. + virtual void LoadBarrier( + EntitySpawnTicket& ticket, BarrierCallback completionCallback, LoadBarrierOptionalArgs optionalArgs = {}) = 0; protected: [[nodiscard]] virtual AZStd::pair CreateTicket(AZ::Data::Asset&& spawnable) = 0; virtual void DestroyTicket(void* ticket) = 0; template - static T& GetTicketPayload(EntitySpawnTicket& ticket) + [[nodiscard]] static T& GetTicketPayload(EntitySpawnTicket& ticket) { return *reinterpret_cast(ticket.m_payload); } template - static const T& GetTicketPayload(const EntitySpawnTicket& ticket) + [[nodiscard]] static const T& GetTicketPayload(const EntitySpawnTicket& ticket) { return *reinterpret_cast(ticket.m_payload); } template - static T* GetTicketPayload(EntitySpawnTicket* ticket) + [[nodiscard]] static T* GetTicketPayload(EntitySpawnTicket* ticket) { return reinterpret_cast(ticket->m_payload); } template - static const T* GetTicketPayload(const EntitySpawnTicket* ticket) + [[nodiscard]] static const T* GetTicketPayload(const EntitySpawnTicket* ticket) { return reinterpret_cast(ticket->m_payload); } diff --git a/Code/Framework/AzFramework/AzFramework/Spawnable/SpawnableEntitiesManager.cpp b/Code/Framework/AzFramework/AzFramework/Spawnable/SpawnableEntitiesManager.cpp index ef7351aabb..3406057fca 100644 --- a/Code/Framework/AzFramework/AzFramework/Spawnable/SpawnableEntitiesManager.cpp +++ b/Code/Framework/AzFramework/AzFramework/Spawnable/SpawnableEntitiesManager.cpp @@ -60,7 +60,7 @@ namespace AzFramework } void SpawnableEntitiesManager::SpawnEntities( - EntitySpawnTicket& ticket, AZStd::vector entityIndices, SpawnEntitiesOptionalArgs optionalArgs) + EntitySpawnTicket& ticket, AZStd::vector entityIndices, SpawnEntitiesOptionalArgs optionalArgs) { AZ_Assert(ticket.IsValid(), "Ticket provided to SpawnEntities hasn't been initialized."); @@ -128,6 +128,20 @@ namespace AzFramework QueueRequest(ticket, optionalArgs.m_priority, AZStd::move(queueEntry)); } + void SpawnableEntitiesManager::UpdateEntityAliasTypes( + EntitySpawnTicket& ticket, + AZStd::vector updatedAliases, + UpdateEntityAliasTypesOptionalArgs optionalArgs) + { + AZ_Assert(ticket.IsValid(), "Ticket provided to ReloadSpawnable hasn't been initialized."); + + UpdateEntityAliasTypesCommand queueEntry; + queueEntry.m_entityAliases = AZStd::move(updatedAliases); + queueEntry.m_ticketId = ticket.GetId(); + queueEntry.m_completionCallback = AZStd::move(optionalArgs.m_completionCallback); + QueueRequest(ticket, optionalArgs.m_priority, AZStd::move(queueEntry)); + } + void SpawnableEntitiesManager::ListEntities( EntitySpawnTicket& ticket, ListEntitiesCallback listCallback, ListEntitiesOptionalArgs optionalArgs) { @@ -175,6 +189,19 @@ namespace AzFramework QueueRequest(ticket, optionalArgs.m_priority, AZStd::move(queueEntry)); } + void SpawnableEntitiesManager::LoadBarrier( + EntitySpawnTicket& ticket, BarrierCallback completionCallback, LoadBarrierOptionalArgs optionalArgs) + { + AZ_Assert(completionCallback, "Load barrier on spawnable entities called without a valid callback to use."); + AZ_Assert(ticket.IsValid(), "Ticket provided to LoadBarrier hasn't been initialized."); + + LoadBarrierCommand queueEntry; + queueEntry.m_ticketId = ticket.GetId(); + queueEntry.m_completionCallback = AZStd::move(completionCallback); + queueEntry.m_checkAliasSpawnables = optionalArgs.m_checkAliasSpawnables; + QueueRequest(ticket, optionalArgs.m_priority, AZStd::move(queueEntry)); + } + auto SpawnableEntitiesManager::ProcessQueue(CommandQueuePriority priority) -> CommandQueueStatus { CommandQueueStatus result = CommandQueueStatus::NoCommandsLeft; @@ -203,13 +230,13 @@ namespace AzFramework for (size_t i = 0; i < delayedSize; ++i) { Requests& request = queue.m_delayed.front(); - bool result = AZStd::visit( - [this](auto&& args) -> bool + CommandResult result = AZStd::visit( + [this](auto&& args) -> CommandResult { return ProcessRequest(args); }, request); - if (!result) + if (result == CommandResult::Requeue) { queue.m_delayed.emplace_back(AZStd::move(request)); } @@ -230,13 +257,13 @@ namespace AzFramework while (!pendingRequestQueue.empty()) { Requests& request = pendingRequestQueue.front(); - bool result = AZStd::visit( - [this](auto&& args) -> bool + CommandResult result = AZStd::visit( + [this](auto&& args) -> CommandResult { return ProcessRequest(args); }, request); - if (!result) + if (result == CommandResult::Requeue) { queue.m_delayed.emplace_back(AZStd::move(request)); } @@ -273,14 +300,73 @@ namespace AzFramework } } - AZ::Entity* SpawnableEntitiesManager::CloneSingleEntity(const AZ::Entity& entityTemplate, - EntityIdMap& templateToCloneMap, AZ::SerializeContext& serializeContext) + AZ::Entity* SpawnableEntitiesManager::CloneSingleEntity(const AZ::Entity& entityPrototype, + EntityIdMap& prototypeToCloneMap, AZ::SerializeContext& serializeContext) { // If the same ID gets remapped more than once, preserve the original remapping instead of overwriting it. constexpr bool allowDuplicateIds = false; return AZ::IdUtils::Remapper::CloneObjectAndGenerateNewIdsAndFixRefs( - &entityTemplate, templateToCloneMap, &serializeContext); + &entityPrototype, prototypeToCloneMap, &serializeContext); + } + + AZ::Entity* SpawnableEntitiesManager::CloneSingleAliasedEntity( + const AZ::Entity& entityPrototype, + const Spawnable::EntityAlias& alias, + EntityIdMap& prototypeToCloneMap, + AZ::Entity* previouslySpawnedEntity, + AZ::SerializeContext& serializeContext) + { + AZ::Entity* clone = nullptr; + switch (alias.m_aliasType) + { + case Spawnable::EntityAliasType::Original: + // Behave as the original version. + clone = CloneSingleEntity(entityPrototype, prototypeToCloneMap, serializeContext); + AZ_Assert(clone != nullptr, "Failed to clone spawnable entity."); + return clone; + case Spawnable::EntityAliasType::Disable: + // Do nothing. + return nullptr; + case Spawnable::EntityAliasType::Replace: + clone = CloneSingleEntity(*(alias.m_spawnable->GetEntities()[alias.m_targetIndex]), prototypeToCloneMap, serializeContext); + AZ_Assert(clone != nullptr, "Failed to clone spawnable entity."); + return clone; + case Spawnable::EntityAliasType::Additional: + // The asset handler will have sorted and inserted a Spawnable::EntityAliasType::Original, so the just + // spawn the additional entity. + clone = CloneSingleEntity(*(alias.m_spawnable->GetEntities()[alias.m_targetIndex]), prototypeToCloneMap, serializeContext); + AZ_Assert(clone != nullptr, "Failed to clone spawnable entity."); + return clone; + case Spawnable::EntityAliasType::Merge: + AZ_Assert(previouslySpawnedEntity != nullptr, "Merging components but there's no entity to add to yet."); + AppendComponents( + *previouslySpawnedEntity, alias.m_spawnable->GetEntities()[alias.m_targetIndex]->GetComponents(), prototypeToCloneMap, + serializeContext); + return nullptr; + default: + AZ_Assert(false, "Unsupported spawnable entity alias type: %i", alias.m_aliasType); + return nullptr; + } + } + + void SpawnableEntitiesManager::AppendComponents( + AZ::Entity& target, + const AZ::Entity::ComponentArrayType& componentPrototypes, + EntityIdMap& prototypeToCloneMap, + AZ::SerializeContext& serializeContext) + { + // Only components are added and entities are looked up so no duplicate entity ids should be encountered. + constexpr bool allowDuplicateIds = false; + + for (const AZ::Component* component : componentPrototypes) + { + AZ::Component* clone = AZ::IdUtils::Remapper::CloneObjectAndGenerateNewIdsAndFixRefs( + component, prototypeToCloneMap, &serializeContext); + AZ_Assert(clone, "Unable to clone component for entity '%s' (%zu).", target.GetName().c_str(), target.GetId()); + [[maybe_unused]] bool result = target.AddComponent(clone); + AZ_Assert(result, "Unable to add cloned component to entity '%s' (%zu).", target.GetName().c_str(), target.GetId()); + } } void SpawnableEntitiesManager::InitializeEntityIdMappings( @@ -316,161 +402,256 @@ namespace AzFramework } } - - bool SpawnableEntitiesManager::ProcessRequest(SpawnAllEntitiesCommand& request) + auto SpawnableEntitiesManager::ProcessRequest(SpawnAllEntitiesCommand& request) -> CommandResult { Ticket& ticket = *request.m_ticket; if (ticket.m_spawnable.IsReady() && request.m_requestId == ticket.m_currentRequestId) { - AZStd::vector& spawnedEntities = ticket.m_spawnedEntities; - AZStd::vector& spawnedEntityIndices = ticket.m_spawnedEntityIndices; - - // Keep track how many entities there were in the array initially - size_t spawnedEntitiesInitialCount = spawnedEntities.size(); - - // These are 'template' entities we'll be cloning from - const Spawnable::EntityList& entitiesToSpawn = ticket.m_spawnable->GetEntities(); - size_t entitiesToSpawnSize = entitiesToSpawn.size(); - - // Reserve buffers - spawnedEntities.reserve(spawnedEntities.size() + entitiesToSpawnSize); - spawnedEntityIndices.reserve(spawnedEntityIndices.size() + entitiesToSpawnSize); - - // Pre-generate the full set of entity id to new entity id mappings, so that during the clone operation below, - // any entity references that point to a not-yet-cloned entity will still get their ids remapped correctly. - // We clear out and regenerate the set of IDs on every SpawnAllEntities call, because presumably every entity reference - // in every entity we're about to instantiate is intended to point to an entity in our newly-instantiated batch, regardless - // of spawn order. If we didn't clear out the map, it would be possible for some entities here to have references to - // previously-spawned entities from a previous SpawnEntities or SpawnAllEntities call. - InitializeEntityIdMappings(entitiesToSpawn, ticket.m_entityIdReferenceMap, ticket.m_previouslySpawned); - - for (size_t i = 0; i < entitiesToSpawnSize; ++i) + if (Spawnable::EntityAliasConstVisitor aliases = ticket.m_spawnable->TryGetAliasesConst(); + aliases.IsValid() && aliases.AreAllSpawnablesReady()) { - // If this entity has previously been spawned, give it a new id in the reference map - RefreshEntityIdMapping(entitiesToSpawn[i].get()->GetId(), ticket.m_entityIdReferenceMap, ticket.m_previouslySpawned); + AZStd::vector& spawnedEntities = ticket.m_spawnedEntities; + AZStd::vector& spawnedEntityIndices = ticket.m_spawnedEntityIndices; - AZ::Entity* clone = CloneSingleEntity(*entitiesToSpawn[i], ticket.m_entityIdReferenceMap, *request.m_serializeContext); - AZ_Assert(clone != nullptr, "Failed to clone spawnable entity."); + // Keep track how many entities there were in the array initially + size_t spawnedEntitiesInitialCount = spawnedEntities.size(); - spawnedEntities.emplace_back(clone); - spawnedEntityIndices.push_back(i); - } + // These are 'prototype' entities we'll be cloning from + const Spawnable::EntityList& entitiesToSpawn = ticket.m_spawnable->GetEntities(); + uint32_t entitiesToSpawnSize = aznumeric_caster(entitiesToSpawn.size()); - // loadAll is true if every entity has been spawned only once - ticket.m_loadAll = (spawnedEntities.size() == entitiesToSpawnSize); - - // Let other systems know about newly spawned entities for any pre-processing before adding to the scene/game context. - if (request.m_preInsertionCallback) - { - request.m_preInsertionCallback(request.m_ticketId, SpawnableEntityContainerView( - ticket.m_spawnedEntities.begin() + spawnedEntitiesInitialCount, ticket.m_spawnedEntities.end())); - } + // Reserve buffers + spawnedEntities.reserve(spawnedEntities.size() + entitiesToSpawnSize); + spawnedEntityIndices.reserve(spawnedEntityIndices.size() + entitiesToSpawnSize); - // Add to the game context, now the entities are active - for (auto it = ticket.m_spawnedEntities.begin() + spawnedEntitiesInitialCount; it != ticket.m_spawnedEntities.end(); ++it) - { - (*it)->SetSpawnTicketId(request.m_ticketId); - GameEntityContextRequestBus::Broadcast(&GameEntityContextRequestBus::Events::AddGameEntity, *it); - } - - // Let other systems know about newly spawned entities for any post-processing after adding to the scene/game context. - if (request.m_completionCallback) - { - request.m_completionCallback(request.m_ticketId, SpawnableConstEntityContainerView( - ticket.m_spawnedEntities.begin() + spawnedEntitiesInitialCount, ticket.m_spawnedEntities.end())); - } - - ticket.m_currentRequestId++; - return true; - } - else - { - return false; - } - } - - bool SpawnableEntitiesManager::ProcessRequest(SpawnEntitiesCommand& request) - { - Ticket& ticket = *request.m_ticket; - if (ticket.m_spawnable.IsReady() && request.m_requestId == ticket.m_currentRequestId) - { - AZStd::vector& spawnedEntities = ticket.m_spawnedEntities; - AZStd::vector& spawnedEntityIndices = ticket.m_spawnedEntityIndices; - AZ_Assert( - spawnedEntities.size() == spawnedEntityIndices.size(), - "The indices for the spawned entities has gone out of sync with the entities."); - - // Keep track of how many entities there were in the array initially - size_t spawnedEntitiesInitialCount = spawnedEntities.size(); - - // These are 'template' entities we'll be cloning from - const Spawnable::EntityList& entitiesToSpawn = ticket.m_spawnable->GetEntities(); - size_t entitiesToSpawnSize = request.m_entityIndices.size(); - - if (ticket.m_entityIdReferenceMap.empty() || !request.m_referencePreviouslySpawnedEntities) - { - // This map keeps track of ids from template (spawnable) to clone (instance) allowing patch ups of fields referring - // to entityIds outside of a given entity. - // We pre-generate the full set of entity id to new entity id mappings, so that during the clone operation below, + // Pre-generate the full set of entity-id-to-new-entity-id mappings, so that during the clone operation below, // any entity references that point to a not-yet-cloned entity will still get their ids remapped correctly. - // By default, we only initialize this map once because it needs to persist across multiple SpawnEntities calls, so - // that reference fixups work even when the entity being referenced is spawned in a different SpawnEntities - // (or SpawnAllEntities) call. - // However, the caller can also choose to reset the map by passing in "m_referencePreviouslySpawnedEntities = false". + // We clear out and regenerate the set of IDs on every SpawnAllEntities call, because presumably every entity reference + // in every entity we're about to instantiate is intended to point to an entity in our newly-instantiated batch, regardless + // of spawn order. If we didn't clear out the map, it would be possible for some entities here to have references to + // previously-spawned entities from a previous SpawnEntities or SpawnAllEntities call. InitializeEntityIdMappings(entitiesToSpawn, ticket.m_entityIdReferenceMap, ticket.m_previouslySpawned); - } - spawnedEntities.reserve(spawnedEntities.size() + entitiesToSpawnSize); - spawnedEntityIndices.reserve(spawnedEntityIndices.size() + entitiesToSpawnSize); - - for (size_t index : request.m_entityIndices) - { - if (index < entitiesToSpawn.size()) + auto aliasIt = aliases.begin(); + auto aliasEnd = aliases.end(); + if (aliasIt == aliasEnd) { - // If this entity has previously been spawned, give it a new id in the reference map - RefreshEntityIdMapping( - entitiesToSpawn[index].get()->GetId(), ticket.m_entityIdReferenceMap, ticket.m_previouslySpawned); + for (uint32_t i = 0; i < entitiesToSpawnSize; ++i) + { + // If this entity has previously been spawned, give it a new id in the reference map + RefreshEntityIdMapping( + entitiesToSpawn[i].get()->GetId(), ticket.m_entityIdReferenceMap, ticket.m_previouslySpawned); - AZ::Entity* clone = - CloneSingleEntity(*entitiesToSpawn[index], ticket.m_entityIdReferenceMap, *request.m_serializeContext); - AZ_Assert(clone != nullptr, "Failed to clone spawnable entity."); - - spawnedEntities.push_back(clone); - spawnedEntityIndices.push_back(index); + spawnedEntities.emplace_back( + CloneSingleEntity(*entitiesToSpawn[i], ticket.m_entityIdReferenceMap, *request.m_serializeContext)); + spawnedEntityIndices.push_back(i); + } } - } - ticket.m_loadAll = false; + else + { + for (uint32_t i = 0; i < entitiesToSpawnSize; ++i) + { + // If this entity has previously been spawned, give it a new id in the reference map + RefreshEntityIdMapping( + entitiesToSpawn[i].get()->GetId(), ticket.m_entityIdReferenceMap, ticket.m_previouslySpawned); - // Let other systems know about newly spawned entities for any pre-processing before adding to the scene/game context. - if (request.m_preInsertionCallback) - { - request.m_preInsertionCallback(request.m_ticketId, SpawnableEntityContainerView( - ticket.m_spawnedEntities.begin() + spawnedEntitiesInitialCount, ticket.m_spawnedEntities.end())); - } + if (aliasIt == aliasEnd || aliasIt->m_sourceIndex != i) + { + spawnedEntities.emplace_back( + CloneSingleEntity(*entitiesToSpawn[i], ticket.m_entityIdReferenceMap, *request.m_serializeContext)); + spawnedEntityIndices.push_back(i); + } + else + { + // The list of entities has already been sorted and optimized (See SpawnableEntitiesAliasList:Optimize) so can + // be safely executed in order without risking an invalid state. + AZ::Entity* previousEntity = nullptr; + do + { + AZ::Entity* clone = CloneSingleAliasedEntity( + *entitiesToSpawn[i], *aliasIt, ticket.m_entityIdReferenceMap, previousEntity, + *request.m_serializeContext); + previousEntity = clone; + if (clone) + { + spawnedEntities.emplace_back(clone); + spawnedEntityIndices.push_back(i); + } + ++aliasIt; + } while (aliasIt != aliasEnd && aliasIt->m_sourceIndex == i); + } + } + } - // Add to the game context, now the entities are active - for (auto it = ticket.m_spawnedEntities.begin() + spawnedEntitiesInitialCount; it != ticket.m_spawnedEntities.end(); ++it) - { - (*it)->SetSpawnTicketId(request.m_ticketId); - GameEntityContextRequestBus::Broadcast(&GameEntityContextRequestBus::Events::AddGameEntity, *it); - } + // There were no initial entities then the ticket now holds exactly all entities. If there were already entities then + // a new set are not added so it no longer holds exactly the number of entities. + ticket.m_loadAll = spawnedEntitiesInitialCount == 0; - if (request.m_completionCallback) - { - request.m_completionCallback(request.m_ticketId, SpawnableConstEntityContainerView( - ticket.m_spawnedEntities.begin() + spawnedEntitiesInitialCount, ticket.m_spawnedEntities.end())); - } + auto newEntitiesBegin = ticket.m_spawnedEntities.begin() + spawnedEntitiesInitialCount; + auto newEntitiesEnd = ticket.m_spawnedEntities.end(); + // Let other systems know about newly spawned entities for any pre-processing before adding to the scene/game context. + if (request.m_preInsertionCallback) + { + request.m_preInsertionCallback(request.m_ticketId, SpawnableEntityContainerView(newEntitiesBegin, newEntitiesEnd)); + } - ticket.m_currentRequestId++; - return true; - } - else - { - return false; + // Add to the game context, now the entities are active + for (auto it = newEntitiesBegin; it != newEntitiesEnd; ++it) + { + AZ::Entity* clone = (*it); + clone->SetSpawnTicketId(request.m_ticketId); + GameEntityContextRequestBus::Broadcast(&GameEntityContextRequestBus::Events::AddGameEntity, clone); + } + + // Let other systems know about newly spawned entities for any post-processing after adding to the scene/game context. + if (request.m_completionCallback) + { + request.m_completionCallback(request.m_ticketId, SpawnableConstEntityContainerView(newEntitiesBegin, newEntitiesEnd)); + } + + ticket.m_currentRequestId++; + return CommandResult::Executed; + } } + return CommandResult::Requeue; } - bool SpawnableEntitiesManager::ProcessRequest(DespawnAllEntitiesCommand& request) + auto SpawnableEntitiesManager::ProcessRequest(SpawnEntitiesCommand& request) -> CommandResult + { + Ticket& ticket = *request.m_ticket; + if (ticket.m_spawnable.IsReady() && request.m_requestId == ticket.m_currentRequestId) + { + if (Spawnable::EntityAliasConstVisitor aliases = ticket.m_spawnable->TryGetAliasesConst(); + aliases.IsValid() && aliases.AreAllSpawnablesReady()) + { + AZStd::vector& spawnedEntities = ticket.m_spawnedEntities; + AZStd::vector& spawnedEntityIndices = ticket.m_spawnedEntityIndices; + AZ_Assert( + spawnedEntities.size() == spawnedEntityIndices.size(), + "The indices for the spawned entities has gone out of sync with the entities."); + + // Keep track of how many entities there were in the array initially + size_t spawnedEntitiesInitialCount = spawnedEntities.size(); + + // These are 'prototype' entities we'll be cloning from + const Spawnable::EntityList& entitiesToSpawn = ticket.m_spawnable->GetEntities(); + size_t entitiesToSpawnSize = request.m_entityIndices.size(); + + if (ticket.m_entityIdReferenceMap.empty() || !request.m_referencePreviouslySpawnedEntities) + { + // This map keeps track of ids from prototype (spawnable) to clone (instance) allowing patch ups of fields referring + // to entityIds outside of a given entity. + // We pre-generate the full set of entity id to new entity id mappings, so that during the clone operation below, + // any entity references that point to a not-yet-cloned entity will still get their ids remapped correctly. + // By default, we only initialize this map once because it needs to persist across multiple SpawnEntities calls, so + // that reference fixups work even when the entity being referenced is spawned in a different SpawnEntities + // (or SpawnAllEntities) call. + // However, the caller can also choose to reset the map by passing in "m_referencePreviouslySpawnedEntities = false". + InitializeEntityIdMappings(entitiesToSpawn, ticket.m_entityIdReferenceMap, ticket.m_previouslySpawned); + } + + spawnedEntities.reserve(spawnedEntities.size() + entitiesToSpawnSize); + spawnedEntityIndices.reserve(spawnedEntityIndices.size() + entitiesToSpawnSize); + + auto aliasBegin = aliases.begin(); + auto aliasEnd = aliases.end(); + if (aliasBegin == aliasEnd) + { + for (uint32_t index : request.m_entityIndices) + { + if (index < entitiesToSpawn.size()) + { + // If this entity has previously been spawned, give it a new id in the reference map + RefreshEntityIdMapping( + entitiesToSpawn[index].get()->GetId(), ticket.m_entityIdReferenceMap, ticket.m_previouslySpawned); + + spawnedEntities.push_back( + CloneSingleEntity(*entitiesToSpawn[index], ticket.m_entityIdReferenceMap, *request.m_serializeContext)); + spawnedEntityIndices.push_back(index); + } + } + } + else + { + for (uint32_t index : request.m_entityIndices) + { + if (index < entitiesToSpawn.size()) + { + // If this entity has previously been spawned, give it a new id in the reference map + RefreshEntityIdMapping( + entitiesToSpawn[index].get()->GetId(), ticket.m_entityIdReferenceMap, ticket.m_previouslySpawned); + + auto aliasIt = AZStd::lower_bound( + aliasBegin, aliasEnd, index, + [](const Spawnable::EntityAlias& lhs, uint32_t rhs) + { + return lhs.m_sourceIndex < rhs; + }); + + if (aliasIt == aliasEnd || aliasIt->m_sourceIndex != index) + { + spawnedEntities.emplace_back( + CloneSingleEntity(*entitiesToSpawn[index], ticket.m_entityIdReferenceMap, *request.m_serializeContext)); + spawnedEntityIndices.push_back(index); + } + else + { + // The list of entities has already been sorted and optimized (See SpawnableEntitiesAliasList:Optimize) so + // can be safely executed in order without risking an invalid state. + AZ::Entity* previousEntity = nullptr; + do + { + AZ::Entity* clone = CloneSingleAliasedEntity( + *entitiesToSpawn[index], *aliasIt, ticket.m_entityIdReferenceMap, previousEntity, + *request.m_serializeContext); + previousEntity = clone; + if (clone) + { + spawnedEntities.emplace_back(clone); + spawnedEntityIndices.push_back(index); + } + + ++aliasIt; + } while (aliasIt != aliasEnd && aliasIt->m_sourceIndex == index); + } + } + } + } + ticket.m_loadAll = false; + + // Let other systems know about newly spawned entities for any pre-processing before adding to the scene/game context. + if (request.m_preInsertionCallback) + { + request.m_preInsertionCallback( + request.m_ticketId, + SpawnableEntityContainerView( + ticket.m_spawnedEntities.begin() + spawnedEntitiesInitialCount, ticket.m_spawnedEntities.end())); + } + + // Add to the game context, now the entities are active + for (auto it = ticket.m_spawnedEntities.begin() + spawnedEntitiesInitialCount; it != ticket.m_spawnedEntities.end(); ++it) + { + AZ::Entity* clone = (*it); + clone->SetSpawnTicketId(request.m_ticketId); + GameEntityContextRequestBus::Broadcast(&GameEntityContextRequestBus::Events::AddGameEntity, *it); + } + + if (request.m_completionCallback) + { + request.m_completionCallback( + request.m_ticketId, + SpawnableConstEntityContainerView( + ticket.m_spawnedEntities.begin() + spawnedEntitiesInitialCount, ticket.m_spawnedEntities.end())); + } + + ticket.m_currentRequestId++; + return CommandResult::Executed; + } + } + return CommandResult::Requeue; + } + + auto SpawnableEntitiesManager::ProcessRequest(DespawnAllEntitiesCommand& request) -> CommandResult { Ticket& ticket = *request.m_ticket; if (request.m_requestId == ticket.m_currentRequestId) @@ -479,7 +660,7 @@ namespace AzFramework { if (entity != nullptr) { - // Setting it to 0 is needed to avoid the infite loop between GameEntityContext and SpawnableEntitiesManager. + // Setting it to 0 is needed to avoid the infinite loop between GameEntityContext and SpawnableEntitiesManager. entity->SetSpawnTicketId(0); GameEntityContextRequestBus::Broadcast( &GameEntityContextRequestBus::Events::DestroyGameEntity, entity->GetId()); @@ -495,15 +676,15 @@ namespace AzFramework } ticket.m_currentRequestId++; - return true; + return CommandResult::Executed; } else { - return false; + return CommandResult::Requeue; } } - bool SpawnableEntitiesManager::ProcessRequest(DespawnEntityCommand& request) + auto SpawnableEntitiesManager::ProcessRequest(DespawnEntityCommand& request) -> CommandResult { Ticket& ticket = *request.m_ticket; if (request.m_requestId == ticket.m_currentRequestId) @@ -513,7 +694,7 @@ namespace AzFramework { if (*entityIterator != nullptr && (*entityIterator)->GetId() == request.m_entityId) { - // Setting it to 0 is needed to avoid the infite loop between GameEntityContext and SpawnableEntitiesManager. + // Setting it to 0 is needed to avoid the infinite loop between GameEntityContext and SpawnableEntitiesManager. (*entityIterator)->SetSpawnTicketId(0); GameEntityContextRequestBus::Broadcast( &GameEntityContextRequestBus::Events::DestroyGameEntity, (*entityIterator)->GetId()); @@ -529,15 +710,15 @@ namespace AzFramework } ticket.m_currentRequestId++; - return true; + return CommandResult::Executed; } else { - return false; + return CommandResult::Requeue; } } - bool SpawnableEntitiesManager::ProcessRequest(ReloadSpawnableCommand& request) + auto SpawnableEntitiesManager::ProcessRequest(ReloadSpawnableCommand& request) -> CommandResult { Ticket& ticket = *request.m_ticket; AZ_Assert(ticket.m_spawnable.GetId() == request.m_spawnable.GetId(), @@ -564,7 +745,7 @@ namespace AzFramework // Pre-generate the full set of entity id to new entity id mappings, so that during the clone operation below, // any entity references that point to a not-yet-cloned entity will still get their ids remapped correctly. // This map is intentionally cleared out and regenerated here to ensure that we're starting fresh with mappings that - // match the new set of template entities getting spawned. + // match the new set of prototype entities getting spawned. InitializeEntityIdMappings(entities, ticket.m_entityIdReferenceMap, ticket.m_previouslySpawned); if (ticket.m_loadAll) @@ -574,7 +755,7 @@ namespace AzFramework ticket.m_spawnedEntityIndices.clear(); size_t entitiesToSpawnSize = entities.size(); - for (size_t i = 0; i < entitiesToSpawnSize; ++i) + for (uint32_t i = 0; i < entitiesToSpawnSize; ++i) { // If this entity has previously been spawned, give it a new id in the reference map RefreshEntityIdMapping(entities[i].get()->GetId(), ticket.m_entityIdReferenceMap, ticket.m_previouslySpawned); @@ -590,7 +771,7 @@ namespace AzFramework { size_t entitiesSize = entities.size(); - for (size_t index : ticket.m_spawnedEntityIndices) + for (uint32_t index : ticket.m_spawnedEntityIndices) { // It's possible for the new spawnable to have a different number of entities, so guard against this. // It's also possible that the entities have moved within the spawnable to a new index. This can't be @@ -616,15 +797,40 @@ namespace AzFramework ticket.m_currentRequestId++; - return true; + return CommandResult::Executed; } else { - return false; + return CommandResult::Requeue; } } - bool SpawnableEntitiesManager::ProcessRequest(ListEntitiesCommand& request) + auto SpawnableEntitiesManager::ProcessRequest(UpdateEntityAliasTypesCommand& request) -> CommandResult + { + Ticket& ticket = *request.m_ticket; + if (ticket.m_spawnable.IsReady() && request.m_requestId == ticket.m_currentRequestId) + { + if (Spawnable::EntityAliasVisitor aliases = ticket.m_spawnable->TryGetAliases(); aliases.IsValid()) + { + for (EntityAliasTypeChange& replacement : request.m_entityAliases) + { + aliases.UpdateAliasType(replacement.m_aliasIndex, replacement.m_newAliasType); + } + aliases.Optimize(); + + if (request.m_completionCallback) + { + request.m_completionCallback(request.m_ticketId); + } + + ticket.m_currentRequestId++; + return CommandResult::Executed; + } + } + return CommandResult::Requeue; + } + + auto SpawnableEntitiesManager::ProcessRequest(ListEntitiesCommand& request) -> CommandResult { Ticket& ticket = *request.m_ticket; if (request.m_requestId == ticket.m_currentRequestId) @@ -632,15 +838,15 @@ namespace AzFramework request.m_listCallback(request.m_ticketId, SpawnableConstEntityContainerView( ticket.m_spawnedEntities.begin(), ticket.m_spawnedEntities.end())); ticket.m_currentRequestId++; - return true; + return CommandResult::Executed; } else { - return false; + return CommandResult::Requeue; } } - bool SpawnableEntitiesManager::ProcessRequest(ListIndicesEntitiesCommand& request) + auto SpawnableEntitiesManager::ProcessRequest(ListIndicesEntitiesCommand& request) -> CommandResult { Ticket& ticket = *request.m_ticket; if (request.m_requestId == ticket.m_currentRequestId) @@ -651,15 +857,15 @@ namespace AzFramework request.m_listCallback(request.m_ticketId, SpawnableConstIndexEntityContainerView( ticket.m_spawnedEntities.begin(), ticket.m_spawnedEntityIndices.begin(), ticket.m_spawnedEntities.size())); ticket.m_currentRequestId++; - return true; + return CommandResult::Executed; } else { - return false; + return CommandResult::Requeue; } } - bool SpawnableEntitiesManager::ProcessRequest(ClaimEntitiesCommand& request) + auto SpawnableEntitiesManager::ProcessRequest(ClaimEntitiesCommand& request) -> CommandResult { Ticket& ticket = *request.m_ticket; if (request.m_requestId == ticket.m_currentRequestId) @@ -671,15 +877,15 @@ namespace AzFramework ticket.m_spawnedEntityIndices.clear(); ticket.m_currentRequestId++; - return true; + return CommandResult::Executed; } else { - return false; + return CommandResult::Requeue; } } - bool SpawnableEntitiesManager::ProcessRequest(BarrierCommand& request) + auto SpawnableEntitiesManager::ProcessRequest(BarrierCommand& request) -> CommandResult { Ticket& ticket = *request.m_ticket; if (request.m_requestId == ticket.m_currentRequestId) @@ -690,15 +896,39 @@ namespace AzFramework } ticket.m_currentRequestId++; - return true; + return CommandResult::Executed; } else { - return false; + return CommandResult::Requeue; } } - bool SpawnableEntitiesManager::ProcessRequest(DestroyTicketCommand& request) + auto SpawnableEntitiesManager::ProcessRequest(LoadBarrierCommand& request) -> CommandResult + { + Ticket& ticket = *request.m_ticket; + if (ticket.m_spawnable.IsReady() && request.m_requestId == ticket.m_currentRequestId) + { + if (request.m_checkAliasSpawnables) + { + if (Spawnable::EntityAliasConstVisitor visitor = ticket.m_spawnable->TryGetAliasesConst(); + !visitor.IsValid() || !visitor.AreAllSpawnablesReady()) + { + return CommandResult::Requeue; + } + } + + request.m_completionCallback(request.m_ticketId); + ticket.m_currentRequestId++; + return CommandResult::Executed; + } + else + { + return CommandResult::Requeue; + } + } + + auto SpawnableEntitiesManager::ProcessRequest(DestroyTicketCommand& request) -> CommandResult { if (request.m_requestId == request.m_ticket->m_currentRequestId) { @@ -706,7 +936,7 @@ namespace AzFramework { if (entity != nullptr) { - // Setting it to 0 is needed to avoid the infite loop between GameEntityContext and SpawnableEntitiesManager. + // Setting it to 0 is needed to avoid the infinite loop between GameEntityContext and SpawnableEntitiesManager. entity->SetSpawnTicketId(0); GameEntityContextRequestBus::Broadcast( &GameEntityContextRequestBus::Events::DestroyGameEntity, entity->GetId()); @@ -714,11 +944,11 @@ namespace AzFramework } delete request.m_ticket; - return true; + return CommandResult::Executed; } else { - return false; + return CommandResult::Requeue; } } } // namespace AzFramework diff --git a/Code/Framework/AzFramework/AzFramework/Spawnable/SpawnableEntitiesManager.h b/Code/Framework/AzFramework/AzFramework/Spawnable/SpawnableEntitiesManager.h index c3de5be003..d2b5c3c9af 100644 --- a/Code/Framework/AzFramework/AzFramework/Spawnable/SpawnableEntitiesManager.h +++ b/Code/Framework/AzFramework/AzFramework/Spawnable/SpawnableEntitiesManager.h @@ -55,13 +55,18 @@ namespace AzFramework void SpawnAllEntities(EntitySpawnTicket& ticket, SpawnAllEntitiesOptionalArgs optionalArgs = {}) override; void SpawnEntities( - EntitySpawnTicket& ticket, AZStd::vector entityIndices, SpawnEntitiesOptionalArgs optionalArgs = {}) override; + EntitySpawnTicket& ticket, AZStd::vector entityIndices, SpawnEntitiesOptionalArgs optionalArgs = {}) override; void DespawnAllEntities(EntitySpawnTicket& ticket, DespawnAllEntitiesOptionalArgs optionalArgs = {}) override; void DespawnEntity(AZ::EntityId entityId, EntitySpawnTicket& ticket, DespawnEntityOptionalArgs optionalArgs = {}) override; void RetrieveEntitySpawnTicket(EntitySpawnTicket::Id entitySpawnTicketId, RetrieveEntitySpawnTicketCallback callback) override; void ReloadSpawnable( EntitySpawnTicket& ticket, AZ::Data::Asset spawnable, ReloadSpawnableOptionalArgs optionalArgs = {}) override; + void UpdateEntityAliasTypes( + EntitySpawnTicket& ticket, + AZStd::vector updatedAliases, + UpdateEntityAliasTypesOptionalArgs optionalArgs = {}) override; + void ListEntities( EntitySpawnTicket& ticket, ListEntitiesCallback listCallback, ListEntitiesOptionalArgs optionalArgs = {}) override; void ListIndicesAndEntities( @@ -70,6 +75,8 @@ namespace AzFramework EntitySpawnTicket& ticket, ClaimEntitiesCallback listCallback, ClaimEntitiesOptionalArgs optionalArgs = {}) override; void Barrier(EntitySpawnTicket& spawnInfo, BarrierCallback completionCallback, BarrierOptionalArgs optionalArgs = {}) override; + void LoadBarrier( + EntitySpawnTicket& spawnInfo, BarrierCallback completionCallback, LoadBarrierOptionalArgs optionalArgs = {}) override; // // The following function is thread safe but intended to be run from the main thread. @@ -78,14 +85,20 @@ namespace AzFramework CommandQueueStatus ProcessQueue(CommandQueuePriority priority); protected: - struct Ticket + enum class CommandResult : bool + { + Executed, + Requeue + }; + + struct Ticket final { AZ_CLASS_ALLOCATOR(Ticket, AZ::ThreadPoolAllocator, 0); static constexpr uint32_t Processing = AZStd::numeric_limits::max(); - //! Map of template entity ids to their associated instance ids. - //! Tickets can be used to spawn the same template entities multiple times, in any order, across multiple calls. - //! Since template entities can reference other entities, this map is used to fix up those references across calls + //! Map of prototype entity ids to their associated instance ids. + //! Tickets can be used to spawn the same prototype entities multiple times, in any order, across multiple calls. + //! Since prototype entities can reference other entities, this map is used to fix up those references across calls //! using the following policy: //! - Entities referencing an entity that hasn't been spawned yet will get a reference to the id that *will* be used //! the first time that entity will be spawned. The reference will be invalid until that entity is spawned, but @@ -100,14 +113,14 @@ namespace AzFramework AZStd::unordered_set m_previouslySpawned; AZStd::vector m_spawnedEntities; - AZStd::vector m_spawnedEntityIndices; + AZStd::vector m_spawnedEntityIndices; AZ::Data::Asset m_spawnable; uint32_t m_nextRequestId{ 0 }; //!< Next id for this ticket. uint32_t m_currentRequestId { 0 }; //!< The id for the command that should be executed. bool m_loadAll{ true }; }; - struct SpawnAllEntitiesCommand + struct SpawnAllEntitiesCommand final { EntitySpawnCallback m_completionCallback; EntityPreInsertionCallback m_preInsertionCallback; @@ -116,9 +129,9 @@ namespace AzFramework EntitySpawnTicket::Id m_ticketId; uint32_t m_requestId; }; - struct SpawnEntitiesCommand + struct SpawnEntitiesCommand final { - AZStd::vector m_entityIndices; + AZStd::vector m_entityIndices; EntitySpawnCallback m_completionCallback; EntityPreInsertionCallback m_preInsertionCallback; AZ::SerializeContext* m_serializeContext; @@ -127,7 +140,7 @@ namespace AzFramework uint32_t m_requestId; bool m_referencePreviouslySpawnedEntities; }; - struct DespawnAllEntitiesCommand + struct DespawnAllEntitiesCommand final { EntityDespawnCallback m_completionCallback; Ticket* m_ticket; @@ -142,7 +155,7 @@ namespace AzFramework EntitySpawnTicket::Id m_ticketId; uint32_t m_requestId; }; - struct ReloadSpawnableCommand + struct ReloadSpawnableCommand final { AZ::Data::Asset m_spawnable; ReloadSpawnableCallback m_completionCallback; @@ -151,35 +164,51 @@ namespace AzFramework EntitySpawnTicket::Id m_ticketId; uint32_t m_requestId; }; - struct ListEntitiesCommand + struct UpdateEntityAliasTypesCommand final + { + AZStd::vector m_entityAliases; + UpdateEntityAliasTypesCallback m_completionCallback; + Ticket* m_ticket; + EntitySpawnTicket::Id m_ticketId; + uint32_t m_requestId; + }; + struct ListEntitiesCommand final { ListEntitiesCallback m_listCallback; Ticket* m_ticket; EntitySpawnTicket::Id m_ticketId; uint32_t m_requestId; }; - struct ListIndicesEntitiesCommand + struct ListIndicesEntitiesCommand final { ListIndicesEntitiesCallback m_listCallback; Ticket* m_ticket; EntitySpawnTicket::Id m_ticketId; uint32_t m_requestId; }; - struct ClaimEntitiesCommand + struct ClaimEntitiesCommand final { ClaimEntitiesCallback m_listCallback; Ticket* m_ticket; EntitySpawnTicket::Id m_ticketId; uint32_t m_requestId; }; - struct BarrierCommand + struct BarrierCommand final { BarrierCallback m_completionCallback; Ticket* m_ticket; EntitySpawnTicket::Id m_ticketId; uint32_t m_requestId; }; - struct DestroyTicketCommand + struct LoadBarrierCommand final + { + BarrierCallback m_completionCallback; + Ticket* m_ticket; + EntitySpawnTicket::Id m_ticketId; + uint32_t m_requestId; + bool m_checkAliasSpawnables; + }; + struct DestroyTicketCommand final { Ticket* m_ticket; uint32_t m_requestId; @@ -191,10 +220,12 @@ namespace AzFramework DespawnAllEntitiesCommand, DespawnEntityCommand, ReloadSpawnableCommand, + UpdateEntityAliasTypesCommand, ListEntitiesCommand, ListIndicesEntitiesCommand, ClaimEntitiesCommand, BarrierCommand, + LoadBarrierCommand, DestroyTicketCommand>; struct Queue @@ -212,18 +243,31 @@ namespace AzFramework CommandQueueStatus ProcessQueue(Queue& queue); AZ::Entity* CloneSingleEntity( - const AZ::Entity& entityTemplate, EntityIdMap& templateToCloneMap, AZ::SerializeContext& serializeContext); + const AZ::Entity& entityPrototype, EntityIdMap& prototypeToCloneMap, AZ::SerializeContext& serializeContext); + AZ::Entity* CloneSingleAliasedEntity( + const AZ::Entity& entityPrototype, + const Spawnable::EntityAlias& alias, + EntityIdMap& prototypeToCloneMap, + AZ::Entity* previouslySpawnedEntity, + AZ::SerializeContext& serializeContext); + void AppendComponents( + AZ::Entity& target, + const AZ::Entity::ComponentArrayType& componentPrototypes, + EntityIdMap& prototypeToCloneMap, + AZ::SerializeContext& serializeContext); - bool ProcessRequest(SpawnAllEntitiesCommand& request); - bool ProcessRequest(SpawnEntitiesCommand& request); - bool ProcessRequest(DespawnAllEntitiesCommand& request); - bool ProcessRequest(DespawnEntityCommand& request); - bool ProcessRequest(ReloadSpawnableCommand& request); - bool ProcessRequest(ListEntitiesCommand& request); - bool ProcessRequest(ListIndicesEntitiesCommand& request); - bool ProcessRequest(ClaimEntitiesCommand& request); - bool ProcessRequest(BarrierCommand& request); - bool ProcessRequest(DestroyTicketCommand& request); + CommandResult ProcessRequest(SpawnAllEntitiesCommand& request); + CommandResult ProcessRequest(SpawnEntitiesCommand& request); + CommandResult ProcessRequest(DespawnAllEntitiesCommand& request); + CommandResult ProcessRequest(DespawnEntityCommand& request); + CommandResult ProcessRequest(ReloadSpawnableCommand& request); + CommandResult ProcessRequest(UpdateEntityAliasTypesCommand& request); + CommandResult ProcessRequest(ListEntitiesCommand& request); + CommandResult ProcessRequest(ListIndicesEntitiesCommand& request); + CommandResult ProcessRequest(ClaimEntitiesCommand& request); + CommandResult ProcessRequest(BarrierCommand& request); + CommandResult ProcessRequest(LoadBarrierCommand& request); + CommandResult ProcessRequest(DestroyTicketCommand& request); //! Generate a base set of original-to-new entity ID mappings to use during spawning. //! Since Entity references get fixed up on an entity-by-entity basis while spawning, it's important to have the complete diff --git a/Code/Framework/AzFramework/AzFramework/Spawnable/SpawnableSystemComponent.cpp b/Code/Framework/AzFramework/AzFramework/Spawnable/SpawnableSystemComponent.cpp index 957786c6df..4ba9c45a98 100644 --- a/Code/Framework/AzFramework/AzFramework/Spawnable/SpawnableSystemComponent.cpp +++ b/Code/Framework/AzFramework/AzFramework/Spawnable/SpawnableSystemComponent.cpp @@ -8,6 +8,7 @@ #include #include +#include #include #include #include @@ -61,18 +62,9 @@ namespace AzFramework m_entitiesManager.ProcessQueue(SpawnableEntitiesManager::CommandQueuePriority::High); } - void SpawnableSystemComponent::OnCatalogLoaded([[maybe_unused]] const char* catalogFile) - { - if (!m_catalogAvailable) - { - m_catalogAvailable = true; - LoadRootSpawnableFromSettingsRegistry(); - } - } - uint64_t SpawnableSystemComponent::AssignRootSpawnable(AZ::Data::Asset rootSpawnable) { - uint64_t generation = 0; + uint32_t generation = 0; if (m_rootSpawnableId == rootSpawnable.GetId()) { @@ -87,16 +79,25 @@ namespace AzFramework // Suspend and resume processing in the container that completion calls aren't received until // everything has been setup to accept callbacks from the call. m_rootSpawnableContainer.Reset(rootSpawnable); - m_rootSpawnableContainer.SpawnAllEntities(); generation = m_rootSpawnableContainer.GetCurrentGeneration(); - AZ_TracePrintf("Spawnables", "Root spawnable set to '%s' at generation %zu.\n", rootSpawnable.GetHint().c_str(), - generation); + + // Don't send out the alert that the root spawnable has been assigned until the spawnable itself is ready. The common + // use case is for handlers to do something with the information in the spawnable before the entities get spawned. + m_rootSpawnableContainer.Alert( + [rootSpawnable](uint32_t generation) + { + RootSpawnableNotificationBus::Broadcast( + &RootSpawnableNotificationBus::Events::OnRootSpawnableAssigned, AZStd::move(rootSpawnable), generation); + }, SpawnableEntitiesContainer::CheckIfSpawnableIsLoaded::Yes); + m_rootSpawnableContainer.SpawnAllEntities(); m_rootSpawnableContainer.Alert( [newSpawnable = AZStd::move(rootSpawnable)](uint32_t generation) { RootSpawnableNotificationBus::QueueBroadcast( - &RootSpawnableNotificationBus::Events::OnRootSpawnableAssigned, newSpawnable, generation); + &RootSpawnableNotificationBus::Events::OnRootSpawnableReady, AZStd::move(newSpawnable), generation); }); + + AZ_TracePrintf("Spawnables", "Root spawnable set to '%s' at generation %zu.\n", rootSpawnable.GetHint().c_str(), generation); } else { @@ -132,6 +133,12 @@ namespace AzFramework AZ_TracePrintf("Spawnables", "New root spawnable '%s' assigned (generation: %i).\n", rootSpawnable.GetHint().c_str(), generation); } + void SpawnableSystemComponent::OnRootSpawnableReady( + [[maybe_unused]] AZ::Data::Asset rootSpawnable, [[maybe_unused]] uint32_t generation) + { + AZ_TracePrintf("Spawnables", "Entities from new root spawnable '%s' are ready (generation: %i).\n", rootSpawnable.GetHint().c_str(), generation); + } + void SpawnableSystemComponent::OnRootSpawnableReleased([[maybe_unused]] uint32_t generation) { AZ_TracePrintf("Spawnables", "Generation %i of the root spawnable has been released.\n", generation); @@ -142,20 +149,29 @@ namespace AzFramework // Register with AssetDatabase AZ_Assert(AZ::Data::AssetManager::IsReady(), "Spawnables can't be registered because the Asset Manager is not ready yet."); AZ::Data::AssetManager::Instance().RegisterHandler(&m_assetHandler, AZ::AzTypeInfo::Uuid()); - + // Register with AssetCatalog AZ::Data::AssetCatalogRequestBus::Broadcast( &AZ::Data::AssetCatalogRequestBus::Events::EnableCatalogForAsset, AZ::AzTypeInfo::Uuid()); AZ::Data::AssetCatalogRequestBus::Broadcast( &AZ::Data::AssetCatalogRequestBus::Events::AddExtension, Spawnable::FileExtension); - AssetCatalogEventBus::Handler::BusConnect(); + // Register for the CriticalAssetsCompiled lifecycle event to trigger the loading of the root spawnable + auto settingsRegistry = AZ::SettingsRegistry::Get(); + AZ_Assert(settingsRegistry, "Unable to change root spawnable callback because Settings Registry is not available."); + + auto LifecycleCallback = [this](AZStd::string_view, AZ::SettingsRegistryInterface::Type) + { + LoadRootSpawnableFromSettingsRegistry(); + }; + AZ::ComponentApplicationLifecycle::RegisterHandler(*settingsRegistry, m_criticalAssetsHandler, + AZStd::move(LifecycleCallback), "CriticalAssetsCompiled"); + + RootSpawnableNotificationBus::Handler::BusConnect(); AZ::TickBus::Handler::BusConnect(); - auto registry = AZ::SettingsRegistry::Get(); - AZ_Assert(registry, "Unable to change root spawnable callback because Settings Registry is not available."); - m_registryChangeHandler = registry->RegisterNotifier([this](AZStd::string_view path, AZ::SettingsRegistryInterface::Type /*type*/) + m_registryChangeHandler = settingsRegistry->RegisterNotifier([this](AZStd::string_view path, AZ::SettingsRegistryInterface::Type /*type*/) { if (path.starts_with(RootSpawnableRegistryKey)) { @@ -172,13 +188,14 @@ namespace AzFramework AZ::TickBus::Handler::BusDisconnect(); RootSpawnableNotificationBus::Handler::BusDisconnect(); - AssetCatalogEventBus::Handler::BusDisconnect(); + // Unregister Lifecycle event handler + m_criticalAssetsHandler = {}; - if (m_catalogAvailable) + if (m_rootSpawnableId.IsValid()) { ReleaseRootSpawnable(); - // The SpawnalbleSystemComponent needs to guarantee there's no more processing left to do by the + // The SpawnableSystemComponent needs to guarantee there's no more processing left to do by the // entity manager before it can safely destroy it on shutdown, but also to make sure that are no // more calls to the callback registered to the root spawnable as that accesses this component. m_rootSpawnableContainer.Clear(); @@ -195,8 +212,6 @@ namespace AzFramework void SpawnableSystemComponent::LoadRootSpawnableFromSettingsRegistry() { - AZ_Assert(m_catalogAvailable, "Attempting to load root spawnable while the catalog is not available yet."); - auto registry = AZ::SettingsRegistry::Get(); AZ_Assert(registry, "Unable to check for root spawnable because the Settings Registry is not available."); diff --git a/Code/Framework/AzFramework/AzFramework/Spawnable/SpawnableSystemComponent.h b/Code/Framework/AzFramework/AzFramework/Spawnable/SpawnableSystemComponent.h index 74e255d624..712cd1529d 100644 --- a/Code/Framework/AzFramework/AzFramework/Spawnable/SpawnableSystemComponent.h +++ b/Code/Framework/AzFramework/AzFramework/Spawnable/SpawnableSystemComponent.h @@ -12,7 +12,6 @@ #include #include #include -#include #include #include #include @@ -25,7 +24,6 @@ namespace AzFramework : public AZ::Component , public AZ::TickBus::Handler , public AZ::SystemTickBus::Handler - , public AssetCatalogEventBus::Handler , public RootSpawnableInterface::Registrar , public RootSpawnableNotificationBus::Handler { @@ -63,12 +61,6 @@ namespace AzFramework void OnSystemTick() override; - // - // AssetCatalogEventBus - // - - void OnCatalogLoaded(const char* catalogFile) override; - // // RootSpawnableInterface // @@ -82,6 +74,7 @@ namespace AzFramework // void OnRootSpawnableAssigned(AZ::Data::Asset rootSpawnable, uint32_t generation) override; + void OnRootSpawnableReady(AZ::Data::Asset rootSpawnable, uint32_t generation) override; void OnRootSpawnableReleased(uint32_t generation) override; protected: @@ -96,6 +89,6 @@ namespace AzFramework AZ::SettingsRegistryInterface::NotifyEventHandler m_registryChangeHandler; AZ::Data::AssetId m_rootSpawnableId; - bool m_catalogAvailable{ false }; + AZ::SettingsRegistryInterface::NotifyEventHandler m_criticalAssetsHandler; }; } // namespace AzFramework diff --git a/Code/Framework/AzFramework/AzFramework/Terrain/TerrainDataRequestBus.cpp b/Code/Framework/AzFramework/AzFramework/Terrain/TerrainDataRequestBus.cpp index 561408db20..d0926008c5 100644 --- a/Code/Framework/AzFramework/AzFramework/Terrain/TerrainDataRequestBus.cpp +++ b/Code/Framework/AzFramework/AzFramework/Terrain/TerrainDataRequestBus.cpp @@ -12,29 +12,95 @@ namespace AzFramework::Terrain { + // Create a handler that can be accessed from Python scripts to receive terrain change notifications. + class TerrainDataNotificationHandler final + : public AzFramework::Terrain::TerrainDataNotificationBus::Handler + , public AZ::BehaviorEBusHandler + { + public: + AZ_EBUS_BEHAVIOR_BINDER( + TerrainDataNotificationHandler, + "{A83EF103-295A-4653-8279-F30FBF3F9037}", + AZ::SystemAllocator, + OnTerrainDataCreateBegin, + OnTerrainDataCreateEnd, + OnTerrainDataDestroyBegin, + OnTerrainDataDestroyEnd, + OnTerrainDataChanged); + + void OnTerrainDataCreateBegin() override + { + Call(FN_OnTerrainDataCreateBegin); + } + + void OnTerrainDataCreateEnd() override + { + Call(FN_OnTerrainDataCreateEnd); + } + + void OnTerrainDataDestroyBegin() override + { + Call(FN_OnTerrainDataDestroyBegin); + } + + void OnTerrainDataDestroyEnd() override + { + Call(FN_OnTerrainDataDestroyEnd); + } + + void OnTerrainDataChanged( + const AZ::Aabb& dirtyRegion, AzFramework::Terrain::TerrainDataNotifications::TerrainDataChangedMask dataChangedMask) override + { + Call(FN_OnTerrainDataChanged, dirtyRegion, dataChangedMask); + } + }; + void TerrainDataRequests::Reflect(AZ::ReflectContext* context) { if (AZ::BehaviorContext* behaviorContext = azrtti_cast(context)) { behaviorContext->EBus("TerrainDataRequestBus") + ->Attribute(AZ::Script::Attributes::Scope, AZ::Script::Attributes::ScopeFlags::Common) ->Attribute(AZ::Script::Attributes::Category, "Terrain") - ->Event("GetHeight", &AzFramework::Terrain::TerrainDataRequestBus::Events::GetHeight) - ->Event("GetNormal", &AzFramework::Terrain::TerrainDataRequestBus::Events::GetNormal) - ->Event("GetMaxSurfaceWeight", &AzFramework::Terrain::TerrainDataRequestBus::Events::GetMaxSurfaceWeight) - ->Event("GetMaxSurfaceWeightFromVector2", - &AzFramework::Terrain::TerrainDataRequestBus::Events::GetMaxSurfaceWeightFromVector2) - ->Event("GetSurfaceWeights", &AzFramework::Terrain::TerrainDataRequestBus::Events::GetSurfaceWeights) - ->Event("GetSurfaceWeightsFromVector2", - &AzFramework::Terrain::TerrainDataRequestBus::Events::GetSurfaceWeightsFromVector2) + ->Attribute(AZ::Script::Attributes::Module, "terrain") + ->Attribute(AZ::Script::Attributes::Scope, AZ::Script::Attributes::ScopeFlags::Common) + ->Event("GetHeight", &AzFramework::Terrain::TerrainDataRequestBus::Events::BehaviorContextGetHeight) + ->Event("GetHeightFromFloats", &AzFramework::Terrain::TerrainDataRequestBus::Events::BehaviorContextGetHeightFromFloats) + ->Event("GetHeightFromVector2", &AzFramework::Terrain::TerrainDataRequestBus::Events::BehaviorContextGetHeightFromVector2) + ->Event("GetNormal", &AzFramework::Terrain::TerrainDataRequestBus::Events::BehaviorContextGetNormal) + ->Event("GetMaxSurfaceWeight", &AzFramework::Terrain::TerrainDataRequestBus::Events::BehaviorContextGetMaxSurfaceWeight) + ->Event( + "GetMaxSurfaceWeightFromVector2", + &AzFramework::Terrain::TerrainDataRequestBus::Events::BehaviorContextGetMaxSurfaceWeightFromVector2) + ->Event("GetSurfaceWeights", &AzFramework::Terrain::TerrainDataRequestBus::Events::BehaviorContextGetSurfaceWeights) + ->Event( + "GetSurfaceWeightsFromVector2", + &AzFramework::Terrain::TerrainDataRequestBus::Events::BehaviorContextGetSurfaceWeightsFromVector2) + ->Event("GetIsHole", &AzFramework::Terrain::TerrainDataRequestBus::Events::GetIsHole) ->Event("GetIsHoleFromFloats", &AzFramework::Terrain::TerrainDataRequestBus::Events::GetIsHoleFromFloats) - ->Event("GetSurfacePoint", &AzFramework::Terrain::TerrainDataRequestBus::Events::GetSurfacePoint) - ->Event("GetSurfacePointFromVector2", - &AzFramework::Terrain::TerrainDataRequestBus::Events::GetSurfacePointFromVector2) + ->Event("GetSurfacePoint", &AzFramework::Terrain::TerrainDataRequestBus::Events::BehaviorContextGetSurfacePoint) + ->Event( + "GetSurfacePointFromVector2", + &AzFramework::Terrain::TerrainDataRequestBus::Events::BehaviorContextGetSurfacePointFromVector2) ->Event("GetTerrainAabb", &AzFramework::Terrain::TerrainDataRequestBus::Events::GetTerrainAabb) - ->Event("GetTerrainHeightQueryResolution", + ->Event( + "GetTerrainHeightQueryResolution", &AzFramework::Terrain::TerrainDataRequestBus::Events::GetTerrainHeightQueryResolution) - ; + ; + + behaviorContext->EBus("TerrainDataNotificationBus") + ->Attribute(AZ::Script::Attributes::Scope, AZ::Script::Attributes::ScopeFlags::Common) + ->Attribute(AZ::Script::Attributes::Category, "Terrain") + ->Attribute(AZ::Script::Attributes::Module, "terrain") + ->Event("OnTerrainDataCreateBegin", &AzFramework::Terrain::TerrainDataNotifications::OnTerrainDataCreateBegin) + ->Event("OnTerrainDataCreateEnd", &AzFramework::Terrain::TerrainDataNotifications::OnTerrainDataCreateEnd) + ->Event("OnTerrainDataDestroyBegin", &AzFramework::Terrain::TerrainDataNotifications::OnTerrainDataDestroyBegin) + ->Event("OnTerrainDataDestroyEnd", &AzFramework::Terrain::TerrainDataNotifications::OnTerrainDataDestroyEnd) + ->Event("OnTerrainDataChanged", &AzFramework::Terrain::TerrainDataNotifications::OnTerrainDataChanged) + ->Handler() + ; } + //TerrainDataNotificationHandler::Reflect(context); } } // namespace AzFramework::Terrain diff --git a/Code/Framework/AzFramework/AzFramework/Terrain/TerrainDataRequestBus.h b/Code/Framework/AzFramework/AzFramework/Terrain/TerrainDataRequestBus.h index 30a2f8e044..2572a07494 100644 --- a/Code/Framework/AzFramework/AzFramework/Terrain/TerrainDataRequestBus.h +++ b/Code/Framework/AzFramework/AzFramework/Terrain/TerrainDataRequestBus.h @@ -52,8 +52,8 @@ namespace AzFramework virtual void SetTerrainAabb(const AZ::Aabb& worldBounds) = 0; //! Returns terrains height in meters at location x,y. - //! @terrainExistsPtr: Can be nullptr. If != nullptr then, if there's no terrain at location x,y or location x,y is inside a terrain HOLE then *terrainExistsPtr will become false, - //! otherwise *terrainExistsPtr will become true. + //! @terrainExistsPtr: Can be nullptr. If != nullptr then, if there's no terrain at location x,y or location x,y is inside + //! a terrain HOLE then *terrainExistsPtr will become false, otherwise *terrainExistsPtr will become true. virtual float GetHeight(const AZ::Vector3& position, Sampler sampler = Sampler::BILINEAR, bool* terrainExistsPtr = nullptr) const = 0; virtual float GetHeightFromVector2( const AZ::Vector2& position, Sampler sampler = Sampler::BILINEAR, bool* terrainExistsPtr = nullptr) const = 0; @@ -68,8 +68,7 @@ namespace AzFramework // Given an XY coordinate, return the surface normal. //! @terrainExists: Can be nullptr. If != nullptr then, if there's no terrain at location x,y or location x,y is inside a - //! terrain HOLE then *terrainExistsPtr will be set to false, - //! otherwise *terrainExistsPtr will be set to true. + //! terrain HOLE then *terrainExistsPtr will be set to false, otherwise *terrainExistsPtr will be set to true. virtual AZ::Vector3 GetNormal( const AZ::Vector3& position, Sampler sampleFilter = Sampler::BILINEAR, bool* terrainExistsPtr = nullptr) const = 0; virtual AZ::Vector3 GetNormalFromVector2( @@ -78,8 +77,8 @@ namespace AzFramework float x, float y, Sampler sampleFilter = Sampler::BILINEAR, bool* terrainExistsPtr = nullptr) const = 0; //! Given an XY coordinate, return the max surface type and weight. - //! @terrainExists: Can be nullptr. If != nullptr then, if there's no terrain at location x,y or location x,y is inside a terrain HOLE then *terrainExistsPtr will be set to false, - //! otherwise *terrainExistsPtr will be set to true. + //! @terrainExists: Can be nullptr. If != nullptr then, if there's no terrain at location x,y or location x,y is inside + //! a terrain HOLE then *terrainExistsPtr will be set to false, otherwise *terrainExistsPtr will be set to true. virtual SurfaceData::SurfaceTagWeight GetMaxSurfaceWeight( const AZ::Vector3& position, Sampler sampleFilter = Sampler::BILINEAR, bool* terrainExistsPtr = nullptr) const = 0; virtual SurfaceData::SurfaceTagWeight GetMaxSurfaceWeightFromVector2( @@ -87,8 +86,8 @@ namespace AzFramework virtual SurfaceData::SurfaceTagWeight GetMaxSurfaceWeightFromFloats( float x, float y, Sampler sampleFilter = Sampler::BILINEAR, bool* terrainExistsPtr = nullptr) const = 0; - //! Given an XY coordinate, return the set of surface types and weights. The Vector3 input position version is defined to ignore - //! the input Z value. + //! Given an XY coordinate, return the set of surface types and weights. The Vector3 input position version is defined to + //! ignore the input Z value. virtual void GetSurfaceWeights( const AZ::Vector3& inPosition, SurfaceData::SurfaceTagWeightList& outSurfaceWeights, @@ -106,13 +105,14 @@ namespace AzFramework Sampler sampleFilter = Sampler::DEFAULT, bool* terrainExistsPtr = nullptr) const = 0; - //! Convenience function for low level systems that can't do a reverse lookup from Crc to string. Everyone else should use GetMaxSurfaceWeight or GetMaxSurfaceWeightFromFloats. + //! Convenience function for low level systems that can't do a reverse lookup from Crc to string. Everyone else should use + //! GetMaxSurfaceWeight or GetMaxSurfaceWeightFromFloats. //! Not available in the behavior context. //! Returns nullptr if the position is inside a hole or outside of the terrain boundaries. virtual const char* GetMaxSurfaceName( const AZ::Vector3& position, Sampler sampleFilter = Sampler::BILINEAR, bool* terrainExistsPtr = nullptr) const = 0; - //! Given an XY coordinate, return all terrain information at that location. The Vector3 input position version is defined + //! Given an XY coordinate, return all terrain information at that location. The Vector3 input position version is defined //! to ignore the input Z value. virtual void GetSurfacePoint( const AZ::Vector3& inPosition, @@ -130,6 +130,70 @@ namespace AzFramework SurfaceData::SurfacePoint& outSurfacePoint, Sampler sampleFilter = Sampler::DEFAULT, bool* terrainExistsPtr = nullptr) const = 0; + + private: + // Private variations of the GetSurfacePoint API exposed to BehaviorContext that returns a value instead of + // using an "out" parameter. The "out" parameter is useful for reusing memory allocated in SurfacePoint when + // using the public API, but can't easily be used from Script Canvas. + SurfaceData::SurfacePoint BehaviorContextGetSurfacePoint( + const AZ::Vector3& inPosition, + Sampler sampleFilter = Sampler::DEFAULT) const + { + SurfaceData::SurfacePoint result; + GetSurfacePoint(inPosition, result, sampleFilter); + return result; + } + SurfaceData::SurfacePoint BehaviorContextGetSurfacePointFromVector2( + const AZ::Vector2& inPosition, Sampler sampleFilter = Sampler::DEFAULT) const + { + SurfaceData::SurfacePoint result; + GetSurfacePointFromVector2(inPosition, result, sampleFilter); + return result; + } + // Private variations of the GetHeight.., GetNormal..., GetMaxSurfaceWeight..., GetSurfaceWeights... APIs + // exposed to BehaviorContext that does not use the terrainExists "out" parameter. + float BehaviorContextGetHeight(const AZ::Vector3& position, Sampler sampler = Sampler::BILINEAR) + { + return GetHeight(position, sampler, nullptr); + } + float BehaviorContextGetHeightFromVector2(const AZ::Vector2& position, Sampler sampler = Sampler::BILINEAR) + { + return GetHeightFromVector2(position, sampler, nullptr); + } + float BehaviorContextGetHeightFromFloats(float x, float y, Sampler sampler = Sampler::BILINEAR) + { + return GetHeightFromFloats(x, y, sampler, nullptr); + } + AZ::Vector3 BehaviorContextGetNormal(const AZ::Vector3& position, Sampler sampleFilter = Sampler::BILINEAR) + { + return GetNormal(position, sampleFilter, nullptr); + } + SurfaceData::SurfaceTagWeight BehaviorContextGetMaxSurfaceWeight( + const AZ::Vector3& position, Sampler sampleFilter = Sampler::BILINEAR) + { + return GetMaxSurfaceWeight(position, sampleFilter, nullptr); + } + SurfaceData::SurfaceTagWeight BehaviorContextGetMaxSurfaceWeightFromVector2( + const AZ::Vector2& inPosition, Sampler sampleFilter = Sampler::DEFAULT) + { + return GetMaxSurfaceWeightFromVector2(inPosition, sampleFilter, nullptr); + } + SurfaceData::SurfaceTagWeightList BehaviorContextGetSurfaceWeights( + const AZ::Vector3& inPosition, + Sampler sampleFilter = Sampler::DEFAULT) + { + SurfaceData::SurfaceTagWeightList list; + GetSurfaceWeights(inPosition, list, sampleFilter, nullptr); + return list; + } + SurfaceData::SurfaceTagWeightList BehaviorContextGetSurfaceWeightsFromVector2( + const AZ::Vector2& inPosition, + Sampler sampleFilter = Sampler::DEFAULT) + { + SurfaceData::SurfaceTagWeightList list; + GetSurfaceWeightsFromVector2(inPosition, list, sampleFilter, nullptr); + return list; + } }; using TerrainDataRequestBus = AZ::EBus; diff --git a/Code/Framework/AzFramework/AzFramework/UnitTest/TestDebugDisplayRequests.h b/Code/Framework/AzFramework/AzFramework/UnitTest/TestDebugDisplayRequests.h index 72b15c1a69..b71d10c751 100644 --- a/Code/Framework/AzFramework/AzFramework/UnitTest/TestDebugDisplayRequests.h +++ b/Code/Framework/AzFramework/AzFramework/UnitTest/TestDebugDisplayRequests.h @@ -13,6 +13,13 @@ namespace UnitTest { + //! Null implementation of DebugDisplayRequests for dummy draw calls. + class NullDebugDisplayRequests : public AzFramework::DebugDisplayRequests + { + public: + virtual ~NullDebugDisplayRequests() = default; + }; + //! Minimal implementation of DebugDisplayRequests to support testing shapes. //! Stores a list of points based on received draw calls to delineate the exterior of the object requested to be drawn. class TestDebugDisplayRequests : public AzFramework::DebugDisplayRequests diff --git a/Code/Framework/AzFramework/AzFramework/Viewport/CameraInput.cpp b/Code/Framework/AzFramework/AzFramework/Viewport/CameraInput.cpp index ddee63e191..cd33f60b91 100644 --- a/Code/Framework/AzFramework/AzFramework/Viewport/CameraInput.cpp +++ b/Code/Framework/AzFramework/AzFramework/Viewport/CameraInput.cpp @@ -94,27 +94,27 @@ namespace AzFramework float y; float z; - // 2.4 Factor as RzRyRx - if (orientation.GetElement(2, 0) < 1.0f) + // 2.5 Factor as RzRxRy + if (orientation.GetElement(2, 1) < 1.0f) { - if (orientation.GetElement(2, 0) > -1.0f) + if (orientation.GetElement(2, 1) > -1.0f) { - x = AZStd::atan2(orientation.GetElement(2, 1), orientation.GetElement(2, 2)); - y = AZStd::asin(-orientation.GetElement(2, 0)); - z = AZStd::atan2(orientation.GetElement(1, 0), orientation.GetElement(0, 0)); + x = AZStd::asin(orientation.GetElement(2, 1)); + y = AZStd::atan2(-orientation.GetElement(2, 0), orientation.GetElement(2, 2)); + z = AZStd::atan2(-orientation.GetElement(0, 1), orientation.GetElement(1, 1)); } else { - x = 0.0f; - y = AZ::Constants::Pi * 0.5f; - z = -AZStd::atan2(-orientation.GetElement(2, 1), orientation.GetElement(1, 1)); + x = -AZ::Constants::Pi * 0.5f; + y = 0.0f; + z = -AZStd::atan2(orientation.GetElement(0, 2), orientation.GetElement(0, 0)); } } else { - x = 0.0f; - y = -AZ::Constants::Pi * 0.5f; - z = AZStd::atan2(-orientation.GetElement(1, 2), orientation.GetElement(1, 1)); + x = AZ::Constants::Pi * 0.5f; + y = 0.0f; + z = AZStd::atan2(orientation.GetElement(0, 2), orientation.GetElement(0, 0)); } return { x, y, z }; @@ -122,14 +122,36 @@ namespace AzFramework void UpdateCameraFromTransform(Camera& camera, const AZ::Transform& transform) { - const auto eulerAngles = AzFramework::EulerAngles(AZ::Matrix3x3::CreateFromTransform(transform)); + UpdateCameraFromTranslationAndRotation( + camera, transform.GetTranslation(), AzFramework::EulerAngles(AZ::Matrix3x3::CreateFromTransform(transform))); + } + void UpdateCameraFromTranslationAndRotation(Camera& camera, const AZ::Vector3& translation, const AZ::Vector3& eulerAngles) + { camera.m_pitch = eulerAngles.GetX(); camera.m_yaw = eulerAngles.GetZ(); - camera.m_pivot = transform.GetTranslation(); + camera.m_pivot = translation; camera.m_offset = AZ::Vector3::CreateZero(); } + float SmoothValueTime(const float smoothness, float deltaTime) + { + // note: the math for the lerp smoothing implementation for camera rotation and translation was inspired by this excellent + // article by Scott Lembcke: https://www.gamasutra.com/blogs/ScottLembcke/20180404/316046/Improved_Lerp_Smoothing.php + const float rate = AZStd::exp2(smoothness); + return AZStd::exp2(-rate * deltaTime); + } + + float SmoothValue(const float target, const float current, const float time) + { + return AZ::Lerp(target, current, time); + } + + float SmoothValue(const float target, const float current, const float smoothness, const float deltaTime) + { + return SmoothValue(target, current, SmoothValueTime(smoothness, deltaTime)); + } + bool CameraSystem::HandleEvents(const InputEvent& event) { if (const auto& cursor = AZStd::get_if(&event)) @@ -191,27 +213,33 @@ namespace AzFramework Camera Cameras::StepCamera(const Camera& targetCamera, const ScreenVector& cursorDelta, const float scrollDelta, const float deltaTime) { - for (int i = 0; i < m_idleCameraInputs.size();) + for (int idleIndex = 0; idleIndex < m_idleCameraInputs.size();) { - auto& cameraInput = m_idleCameraInputs[i]; + auto& cameraInput = m_idleCameraInputs[idleIndex]; const bool canBegin = cameraInput->Beginning() && AZStd::all_of(m_activeCameraInputs.cbegin(), m_activeCameraInputs.cend(), [](const auto& input) { return !input->Exclusive(); }) && - (!cameraInput->Exclusive() || (cameraInput->Exclusive() && m_activeCameraInputs.empty())); + (!cameraInput->Exclusive() || m_activeCameraInputs.empty()); if (canBegin) { m_activeCameraInputs.push_back(cameraInput); using AZStd::swap; - swap(m_idleCameraInputs[i], m_idleCameraInputs[m_idleCameraInputs.size() - 1]); + swap(m_idleCameraInputs[idleIndex], m_idleCameraInputs[m_idleCameraInputs.size() - 1]); m_idleCameraInputs.pop_back(); } else { - i++; + // if a camera attempted to start but was not allowed to, ensure activation is cancelled + if (!cameraInput->Idle()) + { + cameraInput->CancelActivation(); + } + + idleIndex++; } } @@ -223,21 +251,21 @@ namespace AzFramework return acc; }); - for (int i = 0; i < m_activeCameraInputs.size();) + for (int activeIndex = 0; activeIndex < m_activeCameraInputs.size();) { - auto& cameraInput = m_activeCameraInputs[i]; + auto& cameraInput = m_activeCameraInputs[activeIndex]; if (cameraInput->Ending()) { cameraInput->ClearActivation(); m_idleCameraInputs.push_back(cameraInput); using AZStd::swap; - swap(m_activeCameraInputs[i], m_activeCameraInputs[m_activeCameraInputs.size() - 1]); + swap(m_activeCameraInputs[activeIndex], m_activeCameraInputs[m_activeCameraInputs.size() - 1]); m_activeCameraInputs.pop_back(); } else { cameraInput->ContinueActivation(); - i++; + activeIndex++; } } @@ -291,6 +319,11 @@ namespace AzFramework { return false; }; + + m_constrainPitch = []() constexpr + { + return true; + }; } bool RotateCameraInput::HandleEvents(const InputEvent& event, const ScreenVector& cursorDelta, [[maybe_unused]] const float scrollDelta) @@ -308,11 +341,17 @@ namespace AzFramework Camera nextCamera = targetCamera; const float rotateSpeed = m_rotateSpeedFn(); - nextCamera.m_pitch -= float(cursorDelta.m_y) * rotateSpeed * Invert(m_invertPitchFn()); - nextCamera.m_yaw -= float(cursorDelta.m_x) * rotateSpeed * Invert(m_invertYawFn()); + const float deltaPitch = aznumeric_cast(cursorDelta.m_y) * rotateSpeed * Invert(m_invertPitchFn()); + const float deltaYaw = aznumeric_cast(cursorDelta.m_x) * rotateSpeed * Invert(m_invertYawFn()); + nextCamera.m_pitch -= deltaPitch; + nextCamera.m_yaw -= deltaYaw; nextCamera.m_yaw = WrapYawRotation(nextCamera.m_yaw); - nextCamera.m_pitch = ClampPitchRotation(nextCamera.m_pitch); + + if (m_constrainPitch()) + { + nextCamera.m_pitch = ClampPitchRotation(nextCamera.m_pitch); + } return nextCamera; } @@ -437,9 +476,10 @@ namespace AzFramework { if (input->m_state == InputChannel::State::Began) { - m_translation |= TranslationFromKey(input->m_channelId, m_translateCameraInputChannelIds); - if (m_translation != TranslationType::Nil) + if (auto translation = TranslationFromKey(input->m_channelId, m_translateCameraInputChannelIds); + translation != TranslationType::Nil) { + m_translation |= translation; BeginActivation(); } @@ -451,11 +491,16 @@ namespace AzFramework // ensure we don't process end events in the idle state else if (input->m_state == InputChannel::State::Ended && !Idle()) { - m_translation &= ~(TranslationFromKey(input->m_channelId, m_translateCameraInputChannelIds)); - if (m_translation == TranslationType::Nil) + if (auto translation = TranslationFromKey(input->m_channelId, m_translateCameraInputChannelIds); + translation != TranslationType::Nil) { - EndActivation(); + m_translation &= ~translation; + if (m_translation == TranslationType::Nil) + { + EndActivation(); + } } + if (input->m_channelId == m_translateCameraInputChannelIds.m_boostChannelId) { m_boost = false; @@ -726,14 +771,14 @@ namespace AzFramework Camera SmoothCamera(const Camera& currentCamera, const Camera& targetCamera, const CameraProps& cameraProps, const float deltaTime) { - const auto clamp_rotation = [](const float angle) + const auto clampRotation = [](const float angle) { return AZStd::fmod(angle + AZ::Constants::TwoPi, AZ::Constants::TwoPi); }; // keep yaw in 0 - 360 range - float targetYaw = clamp_rotation(targetCamera.m_yaw); - const float currentYaw = clamp_rotation(currentCamera.m_yaw); + float targetYaw = clampRotation(targetCamera.m_yaw); + const float currentYaw = clampRotation(currentCamera.m_yaw); // return the sign of the float input (-1, 0, 1) const auto sign = [](const float value) @@ -742,21 +787,17 @@ namespace AzFramework }; // ensure smooth transition when moving across 0 - 360 boundary - const float yawDelta = targetYaw - currentYaw; - if (AZStd::abs(yawDelta) >= AZ::Constants::Pi) + if (const float yawDelta = targetYaw - currentYaw; AZStd::abs(yawDelta) >= AZ::Constants::Pi) { targetYaw -= AZ::Constants::TwoPi * sign(yawDelta); } Camera camera; - // note: the math for the lerp smoothing implementation for camera rotation and translation was inspired by this excellent - // article by Scott Lembcke: https://www.gamasutra.com/blogs/ScottLembcke/20180404/316046/Improved_Lerp_Smoothing.php if (cameraProps.m_rotateSmoothingEnabledFn()) { - const float lookRate = AZStd::exp2(cameraProps.m_rotateSmoothnessFn()); - const float lookTime = AZStd::exp2(-lookRate * deltaTime); - camera.m_pitch = AZ::Lerp(targetCamera.m_pitch, currentCamera.m_pitch, lookTime); - camera.m_yaw = AZ::Lerp(targetYaw, currentYaw, lookTime); + const float lookTime = SmoothValueTime(cameraProps.m_rotateSmoothnessFn(), deltaTime); + camera.m_pitch = SmoothValue(targetCamera.m_pitch, currentCamera.m_pitch, lookTime); + camera.m_yaw = SmoothValue(targetYaw, currentYaw, lookTime); } else { @@ -766,8 +807,7 @@ namespace AzFramework if (cameraProps.m_translateSmoothingEnabledFn()) { - const float moveRate = AZStd::exp2(cameraProps.m_translateSmoothnessFn()); - const float moveTime = AZStd::exp2(-moveRate * deltaTime); + const float moveTime = SmoothValueTime(cameraProps.m_rotateSmoothnessFn(), deltaTime); camera.m_pivot = targetCamera.m_pivot.Lerp(currentCamera.m_pivot, moveTime); camera.m_offset = targetCamera.m_offset.Lerp(currentCamera.m_offset, moveTime); } @@ -806,12 +846,20 @@ namespace AzFramework [[maybe_unused]] float scrollDelta, [[maybe_unused]] float deltaTime) { + const auto pivot = m_pivotFn(); + + if (!pivot.has_value()) + { + EndActivation(); + return targetCamera; + } + if (Beginning()) { // as the camera starts, record the camera we would like to end up as - m_nextCamera.m_offset = m_offsetFn(m_pivotFn().GetDistance(targetCamera.Translation())); + m_nextCamera.m_offset = m_offsetFn(pivot.value().GetDistance(targetCamera.Translation())); const auto angles = - EulerAngles(AZ::Matrix3x3::CreateFromMatrix3x4(AZ::Matrix3x4::CreateLookAt(targetCamera.Translation(), m_pivotFn()))); + EulerAngles(AZ::Matrix3x3::CreateFromMatrix3x4(AZ::Matrix3x4::CreateLookAt(targetCamera.Translation(), pivot.value()))); m_nextCamera.m_pitch = angles.GetX(); m_nextCamera.m_yaw = angles.GetZ(); m_nextCamera.m_pivot = targetCamera.m_pivot; diff --git a/Code/Framework/AzFramework/AzFramework/Viewport/CameraInput.h b/Code/Framework/AzFramework/AzFramework/Viewport/CameraInput.h index 2b7cc3ea9e..b652d616b2 100644 --- a/Code/Framework/AzFramework/AzFramework/Viewport/CameraInput.h +++ b/Code/Framework/AzFramework/AzFramework/Viewport/CameraInput.h @@ -25,6 +25,9 @@ namespace AzFramework struct WindowSize; + //! Tolerance to use when limiting pitch to avoid reaching +/-Pi/2 exactly. + constexpr float CameraPitchTolerance = 1.0e-4f; + //! Returns Euler angles (pitch, roll, yaw) for the incoming orientation. //! @note Order of rotation is Z, Y, X. AZ::Vector3 EulerAngles(const AZ::Matrix3x3& orientation); @@ -85,6 +88,19 @@ namespace AzFramework //! Extracts Euler angles (orientation) and translation from the transform and writes the values to the camera. void UpdateCameraFromTransform(Camera& camera, const AZ::Transform& transform); + //! Writes the translation value and Euler angles to the camera. + void UpdateCameraFromTranslationAndRotation(Camera& camera, const AZ::Vector3& translation, const AZ::Vector3& eulerAngles); + + //! Returns the time ('t') input value to use with SmoothValue. + //! Useful if it is to be reused for multiple calls to SmoothValue. + float SmoothValueTime(float smoothness, float deltaTime); + + // Smoothly interpolate a value from current to target according to a smoothing parameter. + float SmoothValue(float target, float current, float smoothness, float deltaTime); + + // Overload of SmoothValue that takes time ('t') value directly. + float SmoothValue(float target, float current, float time); + //! Generic motion type. template struct MotionEvent @@ -169,6 +185,11 @@ namespace AzFramework m_activation = Activation::Ending; } + void CancelActivation() + { + m_activation = Activation::Idle; + } + void ContinueActivation() { // continue activation is called after the first step of the camera input, @@ -305,11 +326,26 @@ namespace AzFramework return m_handlingEvents; } - //! Clamps pitch to be +/-90 degrees (-Pi/2, Pi/2). + //! Returns min/max values for camera pitch (in radians). + inline AZStd::tuple CameraPitchMinMaxRadians() + { + return { -AZ::Constants::HalfPi, AZ::Constants::HalfPi }; + } + + //! Returns min/max values for camera pitch (in radians) including a small tolerance at each + //! extreme (looking directly up or down) to avoid floating point accuracy issues. + inline AZStd::tuple CameraPitchMinMaxRadiansWithTolerance() + { + const auto [pitchMinRadians, pitchMaxRadians] = CameraPitchMinMaxRadians(); + return { pitchMinRadians + CameraPitchTolerance, pitchMaxRadians - CameraPitchTolerance }; + } + + //! Clamps pitch to be +/-90 degrees (-Pi/2, Pi/2) with a minor tolerance at each extreme. //! @param pitch Pitch angle in radians. inline float ClampPitchRotation(const float pitch) { - return AZ::GetClamp(pitch, -AZ::Constants::HalfPi, AZ::Constants::HalfPi); + const auto [pitchMin, pitchMax] = CameraPitchMinMaxRadiansWithTolerance(); + return AZ::GetClamp(pitch, pitchMin, pitchMax); } //! Ensures yaw wraps between 0 and 360 degrees (0, 2Pi). @@ -334,6 +370,7 @@ namespace AzFramework AZStd::function m_rotateSpeedFn; AZStd::function m_invertPitchFn; AZStd::function m_invertYawFn; + AZStd::function m_constrainPitch; private: InputChannelId m_rotateChannelId; //!< Input channel to begin the rotate camera input. @@ -651,7 +688,7 @@ namespace AzFramework class FocusCameraInput : public CameraInput { public: - using PivotFn = AZStd::function; + using PivotFn = AZStd::function()>; FocusCameraInput(const InputChannelId& focusChannelId, FocusOffsetFn offsetFn); diff --git a/Code/Framework/AzFramework/AzFramework/Viewport/CameraState.cpp b/Code/Framework/AzFramework/AzFramework/Viewport/CameraState.cpp index 00cbda7b34..40fb82ca97 100644 --- a/Code/Framework/AzFramework/AzFramework/Viewport/CameraState.cpp +++ b/Code/Framework/AzFramework/AzFramework/Viewport/CameraState.cpp @@ -8,18 +8,18 @@ #include "CameraState.h" -#include #include #include +#include namespace AzFramework { void SetCameraClippingVolume( - AzFramework::CameraState& cameraState, const float nearPlane, const float farPlane, const float fovRad) + AzFramework::CameraState& cameraState, const float nearPlane, const float farPlane, const float verticalFovRad) { cameraState.m_nearClip = nearPlane; cameraState.m_farClip = farPlane; - cameraState.m_fovOrZoom = fovRad; + cameraState.m_fovOrZoom = verticalFovRad; } void SetCameraTransform(CameraState& cameraState, const AZ::Transform& transform) @@ -35,20 +35,34 @@ namespace AzFramework SetCameraClippingVolume(cameraState, 0.1f, 1000.0f, AZ::DegToRad(60.0f)); } - AzFramework::CameraState CreateDefaultCamera( - const AZ::Transform& transform, const AZ::Vector2& viewportSize) + CameraState CreateCamera( + const AZ::Transform& transform, + const float nearPlane, + const float farPlane, + const float verticalFovRad, + const AZ::Vector2& viewportSize) { AzFramework::CameraState cameraState; - SetDefaultCameraClippingVolume(cameraState); SetCameraTransform(cameraState, transform); + SetCameraClippingVolume(cameraState, nearPlane, farPlane, verticalFovRad); cameraState.m_viewportSize = viewportSize; return cameraState; } - AzFramework::CameraState CreateIdentityDefaultCamera( - const AZ::Vector3& position, const AZ::Vector2& viewportSize) + AzFramework::CameraState CreateDefaultCamera(const AZ::Transform& transform, const AZ::Vector2& viewportSize) + { + AzFramework::CameraState cameraState; + + SetCameraTransform(cameraState, transform); + SetDefaultCameraClippingVolume(cameraState); + cameraState.m_viewportSize = viewportSize; + + return cameraState; + } + + AzFramework::CameraState CreateIdentityDefaultCamera(const AZ::Vector3& position, const AZ::Vector2& viewportSize) { return CreateDefaultCamera(AZ::Transform::CreateTranslation(position), viewportSize); } @@ -89,15 +103,15 @@ namespace AzFramework void CameraState::Reflect(AZ::SerializeContext& serializeContext) { - serializeContext.Class()-> - Field("Position", &CameraState::m_position)-> - Field("Forward", &CameraState::m_forward)-> - Field("Side", &CameraState::m_side)-> - Field("Up", &CameraState::m_up)-> - Field("ViewportSize", &CameraState::m_viewportSize)-> - Field("NearClip", &CameraState::m_nearClip)-> - Field("FarClip", &CameraState::m_farClip)-> - Field("FovZoom", &CameraState::m_fovOrZoom)-> - Field("Ortho", &CameraState::m_orthographic); + serializeContext.Class() + ->Field("Position", &CameraState::m_position) + ->Field("Forward", &CameraState::m_forward) + ->Field("Side", &CameraState::m_side) + ->Field("Up", &CameraState::m_up) + ->Field("ViewportSize", &CameraState::m_viewportSize) + ->Field("NearClip", &CameraState::m_nearClip) + ->Field("FarClip", &CameraState::m_farClip) + ->Field("FovZoom", &CameraState::m_fovOrZoom) + ->Field("Ortho", &CameraState::m_orthographic); } } // namespace AzFramework diff --git a/Code/Framework/AzFramework/AzFramework/Viewport/CameraState.h b/Code/Framework/AzFramework/AzFramework/Viewport/CameraState.h index e174771c3b..cefb144ec1 100644 --- a/Code/Framework/AzFramework/AzFramework/Viewport/CameraState.h +++ b/Code/Framework/AzFramework/AzFramework/Viewport/CameraState.h @@ -40,10 +40,14 @@ namespace AzFramework AZ::Vector2 m_viewportSize = AZ::Vector2::CreateZero(); //!< Dimensions of the viewport. float m_nearClip = 0.01f; //!< Near clip plane of the camera. float m_farClip = 100.0f; //!< Far clip plane of the camera. - float m_fovOrZoom = 0.0f; //!< Fov or zoom of camera depending on if it is using orthographic projection or not. + float m_fovOrZoom = 0.0f; //!< Vertical fov or zoom of camera depending on if it is using orthographic projection or not. bool m_orthographic = false; //!< Is the camera using orthographic projection or not. }; + //! Create a camera at the given transform, specifying the near and far clip planes as well as the fov with a specific viewport size. + CameraState CreateCamera( + const AZ::Transform& transform, float nearPlane, float farPlane, float verticalFovRad, const AZ::Vector2& viewportSize); + //! Create a camera at the given transform with a specific viewport size. //! @note The near/far clip planes and fov are sensible default values - please //! use SetCameraClippingVolume to override them. @@ -60,7 +64,7 @@ namespace AzFramework CameraState CreateCameraFromWorldFromViewMatrix(const AZ::Matrix4x4& worldFromView, const AZ::Vector2& viewportSize); //! Override the default near/far clipping planes and fov of the camera. - void SetCameraClippingVolume(CameraState& cameraState, float nearPlane, float farPlane, float fovRad); + void SetCameraClippingVolume(CameraState& cameraState, float nearPlane, float farPlane, float verticalFovRad); //! Override the default near/far clipping planes and fov of the camera by inferring them the specified right handed transform into clip space. void SetCameraClippingVolumeFromPerspectiveFovMatrixRH(CameraState& cameraState, const AZ::Matrix4x4& clipFromView); diff --git a/Code/Framework/AzFramework/AzFramework/Viewport/ClickDetector.cpp b/Code/Framework/AzFramework/AzFramework/Viewport/ClickDetector.cpp index 1b3645630e..294ff71974 100644 --- a/Code/Framework/AzFramework/AzFramework/Viewport/ClickDetector.cpp +++ b/Code/Framework/AzFramework/AzFramework/Viewport/ClickDetector.cpp @@ -24,11 +24,12 @@ namespace AzFramework ClickDetector::ClickOutcome ClickDetector::DetectClick(const ClickEvent clickEvent, const ScreenVector& cursorDelta) { + m_moveAccumulator += ScreenVectorLength(cursorDelta); + const auto previousDetectionState = m_detectionState; if (previousDetectionState == DetectionState::WaitingForMove) { // only allow the action to begin if the mouse has been moved a small amount - m_moveAccumulator += ScreenVectorLength(cursorDelta); if (m_moveAccumulator > m_deadZone) { m_detectionState = DetectionState::Moved; @@ -43,7 +44,7 @@ namespace AzFramework using FloatingPointSeconds = AZStd::chrono::duration; const auto diff = now - m_tryBeginTime.value(); - if (FloatingPointSeconds(diff).count() < m_doubleClickInterval) + if (FloatingPointSeconds(diff).count() < m_doubleClickInterval && m_moveAccumulator < m_deadZone) { return ClickOutcome::Nil; } diff --git a/Code/Framework/AzFramework/AzFramework/Viewport/ClickDetector.h b/Code/Framework/AzFramework/AzFramework/Viewport/ClickDetector.h index 70bdeb4619..544afe6d69 100644 --- a/Code/Framework/AzFramework/AzFramework/Viewport/ClickDetector.h +++ b/Code/Framework/AzFramework/AzFramework/Viewport/ClickDetector.h @@ -15,6 +15,10 @@ namespace AzFramework { + //! Default value to use for detecting if the mouse has moved far enough after a mouse down to no longer + //! register a click when a mouse up occurs. + inline constexpr float DefaultMouseMoveDeadZone = 2.0f; + struct ScreenVector; //! Utility class to help detect different types of mouse click (mouse down and up with @@ -66,7 +70,7 @@ namespace AzFramework }; float m_moveAccumulator = 0.0f; //!< How far the mouse has moved after mouse down. - float m_deadZone = 2.0f; //!< How far to move before a click is cancelled (when Move will fire). + float m_deadZone = DefaultMouseMoveDeadZone; //!< How far to move before a click is cancelled (when Move will fire). float m_doubleClickInterval = 0.4f; //!< Default double click interval, can be overridden. DetectionState m_detectionState; //!< Internal state of ClickDetector. //! Mouse down time (happens each mouse down, helps with double click handling). diff --git a/Code/Framework/AzFramework/AzFramework/Viewport/ScreenGeometry.cpp b/Code/Framework/AzFramework/AzFramework/Viewport/ScreenGeometry.cpp index e26d7cfa9b..f1c21230c7 100644 --- a/Code/Framework/AzFramework/AzFramework/Viewport/ScreenGeometry.cpp +++ b/Code/Framework/AzFramework/AzFramework/Viewport/ScreenGeometry.cpp @@ -24,6 +24,10 @@ namespace AzFramework serializeContext->Class()-> Field("X", &ScreenVector::m_x)-> Field("Y", &ScreenVector::m_y); + + serializeContext->Class()-> + Field("Width", &ScreenSize::m_width)-> + Field("Height", &ScreenSize::m_height); } } } // namespace AzFramework diff --git a/Code/Framework/AzFramework/AzFramework/Viewport/ScreenGeometry.h b/Code/Framework/AzFramework/AzFramework/Viewport/ScreenGeometry.h index 1529d760e5..27031c6ab3 100644 --- a/Code/Framework/AzFramework/AzFramework/Viewport/ScreenGeometry.h +++ b/Code/Framework/AzFramework/AzFramework/Viewport/ScreenGeometry.h @@ -10,6 +10,7 @@ #include #include +#include #include #include @@ -26,7 +27,7 @@ namespace AzFramework AZ_TYPE_INFO(ScreenPoint, "{8472B6C2-527F-44FC-87F8-C226B1A57A97}"); ScreenPoint() = default; - ScreenPoint(int x, int y) + constexpr ScreenPoint(int x, int y) : m_x(x) , m_y(y) { @@ -45,7 +46,7 @@ namespace AzFramework AZ_TYPE_INFO(ScreenVector, "{1EAA2C62-8FDB-4A28-9FE3-1FA4F1418894}"); ScreenVector() = default; - ScreenVector(int x, int y) + constexpr ScreenVector(int x, int y) : m_x(x) , m_y(y) { @@ -55,6 +56,22 @@ namespace AzFramework int m_y; //!< Y screen delta. }; + //! A wrapper around a screen width and height. + struct ScreenSize + { + AZ_TYPE_INFO(ScreenSize, "{26D28916-6E8E-44B8-83F9-C44BCDA370E2}"); + ScreenSize() = default; + + constexpr ScreenSize(int width, int height) + : m_width(width) + , m_height(height) + { + } + + int m_width; //!< Screen size width. + int m_height; //!< Screen size height. + }; + void ScreenGeometryReflect(AZ::ReflectContext* context); inline const ScreenVector operator-(const ScreenPoint& lhs, const ScreenPoint& rhs) @@ -138,6 +155,16 @@ namespace AzFramework return !operator==(lhs, rhs); } + inline const bool operator==(const ScreenSize& lhs, const ScreenSize& rhs) + { + return lhs.m_width == rhs.m_width && lhs.m_height == rhs.m_height; + } + + inline const bool operator!=(const ScreenSize& lhs, const ScreenSize& rhs) + { + return !operator==(lhs, rhs); + } + inline ScreenVector& operator*=(ScreenVector& lhs, const float rhs) { lhs.m_x = aznumeric_cast(AZStd::lround(aznumeric_cast(lhs.m_x) * rhs)); @@ -152,6 +179,20 @@ namespace AzFramework return result; } + inline ScreenSize& operator*=(ScreenSize& lhs, const float rhs) + { + lhs.m_width = aznumeric_cast(AZStd::lround(aznumeric_cast(lhs.m_width) * rhs)); + lhs.m_height = aznumeric_cast(AZStd::lround(aznumeric_cast(lhs.m_height) * rhs)); + return lhs; + } + + inline const ScreenSize operator*(const ScreenSize& lhs, const float rhs) + { + ScreenSize result{ lhs }; + result *= rhs; + return result; + } + inline float ScreenVectorLength(const ScreenVector& screenVector) { return aznumeric_cast(AZStd::sqrt(screenVector.m_x * screenVector.m_x + screenVector.m_y * screenVector.m_y)); @@ -163,9 +204,39 @@ namespace AzFramework return AZ::Vector2(aznumeric_cast(screenPoint.m_x), aznumeric_cast(screenPoint.m_y)); } + //! Return an AZ::Vector3 from a ScreenPoint (including z/depth value, defaulting to 0.0f). + inline AZ::Vector3 Vector3FromScreenPoint(const ScreenPoint& screenPoint, const float z = 0.0f) + { + return AZ::Vector3(aznumeric_cast(screenPoint.m_x), aznumeric_cast(screenPoint.m_y), z); + } + //! Return an AZ::Vector2 from a ScreenVector. inline AZ::Vector2 Vector2FromScreenVector(const ScreenVector& screenVector) { return AZ::Vector2(aznumeric_cast(screenVector.m_x), aznumeric_cast(screenVector.m_y)); } + + //! Return an AZ::Vector2 from a ScreenSize. + inline AZ::Vector2 Vector2FromScreenSize(const ScreenSize& screenSize) + { + return AZ::Vector2(aznumeric_cast(screenSize.m_width), aznumeric_cast(screenSize.m_height)); + } + + //! Return a ScreenPoint from an AZ::Vector2. + inline ScreenPoint ScreenPointFromVector2(const AZ::Vector2& vector2) + { + return ScreenPoint(aznumeric_cast(AZStd::lround(vector2.GetX())), aznumeric_cast(AZStd::lround(vector2.GetY()))); + } + + //! Return a ScreenVector from an AZ::Vector2. + inline ScreenVector ScreenVectorFromVector2(const AZ::Vector2& vector2) + { + return ScreenVector(aznumeric_cast(AZStd::lround(vector2.GetX())), aznumeric_cast(AZStd::lround(vector2.GetY()))); + } + + //! Return a ScreenSize from an AZ::Vector2. + inline ScreenSize ScreenSizeFromVector2(const AZ::Vector2& vector2) + { + return ScreenSize(aznumeric_cast(AZStd::lround(vector2.GetX())), aznumeric_cast(AZStd::lround(vector2.GetY()))); + } } // namespace AzFramework diff --git a/Code/Framework/AzFramework/AzFramework/Viewport/ViewportBus.h b/Code/Framework/AzFramework/AzFramework/Viewport/ViewportBus.h index 444173f773..f53b84a63f 100644 --- a/Code/Framework/AzFramework/AzFramework/Viewport/ViewportBus.h +++ b/Code/Framework/AzFramework/AzFramework/Viewport/ViewportBus.h @@ -8,32 +8,33 @@ #pragma once -#include #include +#include +#include namespace AZ { class Matrix4x4; + class Matrix3x4; class Transform; class ReflectContext; } // namespace AZ namespace AzFramework { - class ViewportRequests - : public AZ::EBusTraits + class ViewportRequests : public AZ::EBusTraits { public: static const AZ::EBusHandlerPolicy HandlerPolicy = AZ::EBusHandlerPolicy::Single; - static const AZ::EBusAddressPolicy AddressPolicy = AZ::EBusAddressPolicy::ById; + static const AZ::EBusAddressPolicy AddressPolicy = AZ::EBusAddressPolicy::ById; using BusIdType = ViewportId; static void Reflect(AZ::ReflectContext* context); - virtual ~ViewportRequests() {} - //! Gets the current camera's world to view matrix. virtual const AZ::Matrix4x4& GetCameraViewMatrix() const = 0; + //! Gets the current camera's world to view matrix as a Matrix3x4. + virtual AZ::Matrix3x4 GetCameraViewMatrixAsMatrix3x4() const = 0; //! Sets the current camera's world to view matrix. virtual void SetCameraViewMatrix(const AZ::Matrix4x4& matrix) = 0; //! Gets the current camera's projection (view to clip) matrix. @@ -44,8 +45,36 @@ namespace AzFramework virtual AZ::Transform GetCameraTransform() const = 0; //! Convenience method, sets the camera's world to view matrix from this AZ::Transform. virtual void SetCameraTransform(const AZ::Transform& transform) = 0; + + protected: + ~ViewportRequests() = default; }; using ViewportRequestBus = AZ::EBus; -} //namespace AzFramework + //! The additional padding around the viewport when a viewport border is active. + struct ViewportBorderPadding + { + float m_top; + float m_bottom; + float m_left; + float m_right; + }; + + //! For performing queries about the state of the viewport border. + class ViewportBorderRequests : public AZ::EBusTraits + { + public: + static const AZ::EBusHandlerPolicy HandlerPolicy = AZ::EBusHandlerPolicy::Single; + static const AZ::EBusAddressPolicy AddressPolicy = AZ::EBusAddressPolicy::ById; + using BusIdType = ViewportId; + + //! Returns if a viewport border is in effect and what the current dimensions (padding) of the border are. + virtual AZStd::optional GetViewportBorderPadding() const = 0; + + protected: + ~ViewportBorderRequests() = default; + }; + + using ViewportBorderRequestBus = AZ::EBus; +} // namespace AzFramework diff --git a/Code/Framework/AzFramework/AzFramework/Viewport/ViewportScreen.cpp b/Code/Framework/AzFramework/AzFramework/Viewport/ViewportScreen.cpp index afd16a6c23..a23b306546 100644 --- a/Code/Framework/AzFramework/AzFramework/Viewport/ViewportScreen.cpp +++ b/Code/Framework/AzFramework/AzFramework/Viewport/ViewportScreen.cpp @@ -10,6 +10,7 @@ #include #include +#include #include #include #include @@ -30,34 +31,31 @@ namespace AzFramework // multiplication which must be used (see CameraTransformFromCameraView and CameraViewFromCameraTransform) // note: coordinate system convention is right handed // see Matrix4x4::CreateProjection for more details - static AZ::Matrix4x4 ZYCoordinateSystemConversion() + static AZ::Matrix3x4 ZYCoordinateSystemConversion() { // note: the below matrix is the result of these combined transformations // pitch = AZ::Matrix4x4::CreateRotationX(AZ::DegToRad(-90.0f)); // yaw = AZ::Matrix4x4::CreateRotationZ(AZ::DegToRad(180.0f)); // conversion = pitch * yaw - return AZ::Matrix4x4::CreateFromColumns( - AZ::Vector4(-1.0f, 0.0f, 0.0f, 0.0f), AZ::Vector4(0.0f, 0.0f, 1.0f, 0.0f), AZ::Vector4(0.0f, 1.0f, 0.0f, 0.0f), - AZ::Vector4(0.0f, 0.0f, 0.0f, 1.0f)); + return AZ::Matrix3x4::CreateFromColumns( + AZ::Vector3(-1.0f, 0.0f, 0.0f), AZ::Vector3(0.0f, 0.0f, 1.0f), AZ::Vector3(0.0f, 1.0f, 0.0f), AZ::Vector3(0.0f, 0.0f, 0.0f)); } - AZ::Matrix4x4 CameraTransform(const CameraState& cameraState) + AZ::Matrix3x4 CameraTransform(const CameraState& cameraState) { - return AZ::Matrix4x4::CreateFromColumns( - AZ::Vector3ToVector4(cameraState.m_side), AZ::Vector3ToVector4(cameraState.m_forward), AZ::Vector3ToVector4(cameraState.m_up), - AZ::Vector3ToVector4(cameraState.m_position, 1.0f)); + return AZ::Matrix3x4::CreateFromColumns(cameraState.m_side, cameraState.m_forward, cameraState.m_up, cameraState.m_position); } - AZ::Matrix4x4 CameraView(const CameraState& cameraState) + AZ::Matrix3x4 CameraView(const CameraState& cameraState) { // ensure the camera is looking down positive z with the x axis pointing left - return ZYCoordinateSystemConversion() * CameraTransform(cameraState).GetInverseTransform(); + return ZYCoordinateSystemConversion() * CameraTransform(cameraState).GetInverseFast(); } - AZ::Matrix4x4 InverseCameraView(const CameraState& cameraState) + AZ::Matrix3x4 InverseCameraView(const CameraState& cameraState) { // ensure the camera is looking down positive z with the x axis pointing left - return CameraView(cameraState).GetInverseTransform(); + return CameraView(cameraState).GetInverseFast(); } AZ::Matrix4x4 CameraProjection(const CameraState& cameraState) @@ -71,14 +69,14 @@ namespace AzFramework return CameraProjection(cameraState).GetInverseFull(); } - AZ::Matrix4x4 CameraTransformFromCameraView(const AZ::Matrix4x4& cameraView) + AZ::Matrix3x4 CameraTransformFromCameraView(const AZ::Matrix3x4& cameraView) { - return (ZYCoordinateSystemConversion() * cameraView).GetInverseTransform(); + return (ZYCoordinateSystemConversion() * cameraView).GetInverseFast(); } - AZ::Matrix4x4 CameraViewFromCameraTransform(const AZ::Matrix4x4& cameraTransform) + AZ::Matrix3x4 CameraViewFromCameraTransform(const AZ::Matrix3x4& cameraTransform) { - return ZYCoordinateSystemConversion() * cameraTransform.GetInverseTransform(); + return ZYCoordinateSystemConversion() * cameraTransform.GetInverseFast(); } AZ::Frustum FrustumFromCameraState(const CameraState& cameraState) @@ -90,16 +88,17 @@ namespace AzFramework { const auto worldFromView = AzFramework::CameraTransform(cameraState); const auto cameraWorldTransform = AZ::Transform::CreateFromMatrix3x3AndTranslation( - AZ::Matrix3x3::CreateFromMatrix4x4(worldFromView), worldFromView.GetTranslation()); + AZ::Matrix3x3::CreateFromMatrix3x4(worldFromView), worldFromView.GetTranslation()); return AZ::ViewFrustumAttributes( cameraWorldTransform, AspectRatio(cameraState.m_viewportSize), cameraState.m_fovOrZoom, cameraState.m_nearClip, cameraState.m_farClip); } - AZ::Vector3 WorldToScreenNdc(const AZ::Vector3& worldPosition, const AZ::Matrix4x4& cameraView, const AZ::Matrix4x4& cameraProjection) + AZ::Vector3 WorldToScreenNdc(const AZ::Vector3& worldPosition, const AZ::Matrix3x4& cameraView, const AZ::Matrix4x4& cameraProjection) { // transform the world space position to clip space - const auto clipSpacePosition = cameraProjection * cameraView * AZ::Vector3ToVector4(worldPosition, 1.0f); + const auto clipSpacePosition = + cameraProjection * AZ::Vector3ToVector4(cameraView.TransformPoint(worldPosition), 1.0f); // transform the clip space position to ndc space (perspective divide) const auto ndcPosition = clipSpacePosition / clipSpacePosition.GetW(); // transform ndc space from <-1,1> to <0, 1> range @@ -108,13 +107,12 @@ namespace AzFramework ScreenPoint WorldToScreen( const AZ::Vector3& worldPosition, - const AZ::Matrix4x4& cameraView, + const AZ::Matrix3x4& cameraView, const AZ::Matrix4x4& cameraProjection, const AZ::Vector2& viewportSize) { - const auto ndcNormalizedPosition = WorldToScreenNdc(worldPosition, cameraView, cameraProjection); // scale ndc position by screen dimensions to return screen position - return ScreenPointFromNdc(AZ::Vector3ToVector2(ndcNormalizedPosition), viewportSize); + return ScreenPointFromNdc(AZ::Vector3ToVector2(WorldToScreenNdc(worldPosition, cameraView, cameraProjection)), viewportSize); } ScreenPoint WorldToScreen(const AZ::Vector3& worldPosition, const CameraState& cameraState) @@ -123,7 +121,7 @@ namespace AzFramework } AZ::Vector3 ScreenNdcToWorld( - const AZ::Vector2& normalizedScreenPosition, const AZ::Matrix4x4& inverseCameraView, const AZ::Matrix4x4& inverseCameraProjection) + const AZ::Vector2& normalizedScreenPosition, const AZ::Matrix3x4& inverseCameraView, const AZ::Matrix4x4& inverseCameraProjection) { // convert screen space coordinates from <0, 1> to <-1,1> range const auto ndcPosition = normalizedScreenPosition * 2.0f - AZ::Vector2::CreateOne(); @@ -140,13 +138,11 @@ namespace AzFramework AZ::Vector3 ScreenToWorld( const ScreenPoint& screenPosition, - const AZ::Matrix4x4& inverseCameraView, + const AZ::Matrix3x4& inverseCameraView, const AZ::Matrix4x4& inverseCameraProjection, const AZ::Vector2& viewportSize) { - const auto normalizedScreenPosition = NdcFromScreenPoint(screenPosition, viewportSize); - - return ScreenNdcToWorld(normalizedScreenPosition, inverseCameraView, inverseCameraProjection); + return ScreenNdcToWorld(NdcFromScreenPoint(screenPosition, viewportSize), inverseCameraView, inverseCameraProjection); } AZ::Vector3 ScreenToWorld(const ScreenPoint& screenPosition, const CameraState& cameraState) diff --git a/Code/Framework/AzFramework/AzFramework/Viewport/ViewportScreen.h b/Code/Framework/AzFramework/AzFramework/Viewport/ViewportScreen.h index 8a6c0249b2..9cd88e1c0c 100644 --- a/Code/Framework/AzFramework/AzFramework/Viewport/ViewportScreen.h +++ b/Code/Framework/AzFramework/AzFramework/Viewport/ViewportScreen.h @@ -16,6 +16,7 @@ namespace AZ { class Frustum; + class Matrix3x4; class Matrix4x4; struct ViewFrustumAttributes; } // namespace AZ @@ -43,7 +44,7 @@ namespace AzFramework } //! Projects a position in world space to screen space normalized device coordinates for the given camera. - AZ::Vector3 WorldToScreenNdc(const AZ::Vector3& worldPosition, const AZ::Matrix4x4& cameraView, const AZ::Matrix4x4& cameraProjection); + AZ::Vector3 WorldToScreenNdc(const AZ::Vector3& worldPosition, const AZ::Matrix3x4& cameraView, const AZ::Matrix4x4& cameraProjection); //! Projects a position in world space to screen space for the given camera. ScreenPoint WorldToScreen(const AZ::Vector3& worldPosition, const CameraState& cameraState); @@ -52,7 +53,7 @@ namespace AzFramework //! is called many times in a loop. ScreenPoint WorldToScreen( const AZ::Vector3& worldPosition, - const AZ::Matrix4x4& cameraView, + const AZ::Matrix3x4& cameraView, const AZ::Matrix4x4& cameraProjection, const AZ::Vector2& viewportSize); @@ -64,14 +65,14 @@ namespace AzFramework //! is called many times in a loop. AZ::Vector3 ScreenToWorld( const ScreenPoint& screenPosition, - const AZ::Matrix4x4& inverseCameraView, + const AZ::Matrix3x4& inverseCameraView, const AZ::Matrix4x4& inverseCameraProjection, const AZ::Vector2& viewportSize); //! Unprojects a position in screen space normalized device coordinates to world space. //! Note: The position returned will be on the near clip plane of the camera in world space. AZ::Vector3 ScreenNdcToWorld( - const AZ::Vector2& ndcPosition, const AZ::Matrix4x4& inverseCameraView, const AZ::Matrix4x4& inverseCameraProjection); + const AZ::Vector2& ndcPosition, const AZ::Matrix3x4& inverseCameraView, const AZ::Matrix4x4& inverseCameraProjection); //! Returns the camera projection for the current camera state. AZ::Matrix4x4 CameraProjection(const CameraState& cameraState); @@ -81,27 +82,27 @@ namespace AzFramework //! Returns the camera view for the current camera state. //! @note This is the 'v' in the MVP transform going from world space to view space (viewFromWorld). - AZ::Matrix4x4 CameraView(const CameraState& cameraState); + AZ::Matrix3x4 CameraView(const CameraState& cameraState); //! Returns the inverse of the camera view for the current camera state. //! @note This is the same as the CameraTransform but corrected for Z up. - AZ::Matrix4x4 InverseCameraView(const CameraState& cameraState); + AZ::Matrix3x4 InverseCameraView(const CameraState& cameraState); //! Returns the camera transform for the current camera state. //! @note This is the inverse of 'v' in the MVP transform going from view space to world space (worldFromView). - AZ::Matrix4x4 CameraTransform(const CameraState& cameraState); + AZ::Matrix3x4 CameraTransform(const CameraState& cameraState); //! Takes a camera view (the world to camera space transform) and returns the //! corresponding camera transform (the world position and orientation of the camera). //! @note The parameter is the viewFromWorld transform (the 'v' in MVP) going from world space //! to view space. The return value is worldFromView transform going from view space to world space. - AZ::Matrix4x4 CameraTransformFromCameraView(const AZ::Matrix4x4& cameraView); + AZ::Matrix3x4 CameraTransformFromCameraView(const AZ::Matrix3x4& cameraView); //! Takes a camera transform (the world position and orientation of the camera) and //! returns the corresponding camera view (to be used to transform from world to camera space). //! @note The parameter is the worldFromView transform going from view space to world space. The //! return value is viewFromWorld transform (the 'v' in MVP) going from view space to world space. - AZ::Matrix4x4 CameraViewFromCameraTransform(const AZ::Matrix4x4& cameraTransform); + AZ::Matrix3x4 CameraViewFromCameraTransform(const AZ::Matrix3x4& cameraTransform); //! Returns a frustum representing the camera transform and view volume in world space. AZ::Frustum FrustumFromCameraState(const CameraState& cameraState); diff --git a/Code/Framework/AzFramework/AzFramework/Windowing/NativeWindow.cpp b/Code/Framework/AzFramework/AzFramework/Windowing/NativeWindow.cpp index c89d12a8ae..bb3c5e4388 100644 --- a/Code/Framework/AzFramework/AzFramework/Windowing/NativeWindow.cpp +++ b/Code/Framework/AzFramework/AzFramework/Windowing/NativeWindow.cpp @@ -143,6 +143,13 @@ namespace AzFramework return vsync_interval; } + bool NativeWindow::SetSyncInterval(uint32_t newSyncInterval) + { + vsync_interval = newSyncInterval; + return true; + } + + /*static*/ bool NativeWindow::GetFullScreenStateOfDefaultWindow() { NativeWindowHandle defaultWindowHandle = nullptr; diff --git a/Code/Framework/AzFramework/AzFramework/Windowing/NativeWindow.h b/Code/Framework/AzFramework/AzFramework/Windowing/NativeWindow.h index 0eb699475f..9c844034cb 100644 --- a/Code/Framework/AzFramework/AzFramework/Windowing/NativeWindow.h +++ b/Code/Framework/AzFramework/AzFramework/Windowing/NativeWindow.h @@ -132,6 +132,7 @@ namespace AzFramework void ToggleFullScreenState() override; float GetDpiScaleFactor() const override; uint32_t GetSyncInterval() const override; + bool SetSyncInterval(uint32_t newSyncInterval) override; uint32_t GetDisplayRefreshRate() const override; //! Get the full screen state of the default window. diff --git a/Code/Framework/AzFramework/AzFramework/Windowing/WindowBus.h b/Code/Framework/AzFramework/AzFramework/Windowing/WindowBus.h index d3bd0ce82c..faae925580 100644 --- a/Code/Framework/AzFramework/AzFramework/Windowing/WindowBus.h +++ b/Code/Framework/AzFramework/AzFramework/Windowing/WindowBus.h @@ -78,6 +78,10 @@ namespace AzFramework //! Returns the sync interval which tells the drivers the number of v-blanks to synchronize with virtual uint32_t GetSyncInterval() const = 0; + //! Sets the sync interval which tells the drivers the number of v-blanks to synchronize with + //! Returns if the sync interval was succesfully set + virtual bool SetSyncInterval(uint32_t newSyncInterval) = 0; + //! Returns the refresh rate of the main display virtual uint32_t GetDisplayRefreshRate() const = 0; }; diff --git a/Code/Framework/AzFramework/AzFramework/azframework_files.cmake b/Code/Framework/AzFramework/AzFramework/azframework_files.cmake index e03d166cfc..73608d6a85 100644 --- a/Code/Framework/AzFramework/AzFramework/azframework_files.cmake +++ b/Code/Framework/AzFramework/AzFramework/azframework_files.cmake @@ -21,6 +21,7 @@ set(FILES Archive/ArchiveFindData.cpp Archive/ArchiveFindData.h Archive/ArchiveVars.h + Archive/ArchiveVars.cpp Archive/Codec.h Archive/IArchive.h Archive/INestedArchive.h @@ -78,6 +79,7 @@ set(FILES CommandLine/CommandLine.h CommandLine/CommandRegistrationBus.h Debug/DebugCameraBus.h + feature_options.cmake Viewport/ViewportBus.h Viewport/ViewportBus.cpp Viewport/ViewportColors.h @@ -229,6 +231,7 @@ set(FILES Physics/Configuration/SystemConfiguration.h Physics/Configuration/SystemConfiguration.cpp Physics/HeightfieldProviderBus.h + Physics/HeightfieldProviderBus.cpp Physics/SimulatedBodies/RigidBody.h Physics/SimulatedBodies/RigidBody.cpp Physics/SimulatedBodies/StaticRigidBody.h @@ -267,13 +270,13 @@ set(FILES Physics/WindBus.h Process/ProcessCommunicator.cpp Process/ProcessCommunicator.h - Process/ProcessWatcher.cpp - Process/ProcessWatcher.h Process/ProcessCommon_fwd.h Process/ProcessCommunicator.h Process/ProcessWatcher.cpp Process/ProcessWatcher.h Process/ProcessCommon_fwd.h + Process/ProcessCommunicatorTracePrinter.cpp + Process/ProcessCommunicatorTracePrinter.h ProjectManager/ProjectManager.h ProjectManager/ProjectManager.cpp Render/GameIntersectorComponent.h @@ -286,6 +289,7 @@ set(FILES Spawnable/RootSpawnableInterface.h Spawnable/Spawnable.cpp Spawnable/Spawnable.h + Spawnable/SpawnableAssetBus.h Spawnable/SpawnableAssetHandler.h Spawnable/SpawnableAssetHandler.cpp Spawnable/SpawnableEntitiesContainer.h diff --git a/Code/Framework/AzFramework/AzFramework/feature_options.cmake b/Code/Framework/AzFramework/AzFramework/feature_options.cmake new file mode 100644 index 0000000000..e10ddf6ba6 --- /dev/null +++ b/Code/Framework/AzFramework/AzFramework/feature_options.cmake @@ -0,0 +1,13 @@ +# +# Copyright (c) Contributors to the Open 3D Engine Project. +# For complete copyright and license terms please see the LICENSE at the root of this distribution. +# +# SPDX-License-Identifier: Apache-2.0 OR MIT +# +# + +set(LY_ARCHIVE_FILE_SEARCH_MODE "" CACHE STRING "Set the default file search mode to locate non-Pak files within the Archive System\n\ + Valid values are:\n\ + 0 = Search FileSystem first, before searching within mounted Paks (default in debug/profile)\n\ + 1 = Search mounted Paks first, before searching FileSystem\n\ + 2 = Search only mounted Paks (default in release)\n") diff --git a/Code/Framework/AzFramework/CMakeLists.txt b/Code/Framework/AzFramework/CMakeLists.txt index c8eeac5c2d..9f30d23a19 100644 --- a/Code/Framework/AzFramework/CMakeLists.txt +++ b/Code/Framework/AzFramework/CMakeLists.txt @@ -6,6 +6,7 @@ # # +include(AzFramework/feature_options.cmake) ly_get_list_relative_pal_filename(pal_dir ${CMAKE_CURRENT_LIST_DIR}/Platform/${PAL_PLATFORM_NAME}) ly_get_list_relative_pal_filename(common_dir ${CMAKE_CURRENT_LIST_DIR}/Platform/Common) @@ -33,6 +34,14 @@ ly_add_target( 3rdParty::lz4 ) +set(LY_SEARCH_MODE_DEFINE $<$:LY_ARCHIVE_FILE_SEARCH_MODE=${LY_ARCHIVE_FILE_SEARCH_MODE}>) + +ly_add_source_properties( + SOURCES + AzFramework/Archive/ArchiveVars.cpp + PROPERTY COMPILE_DEFINITIONS + VALUES ${LY_SEARCH_MODE_DEFINE}) + if(PAL_TRAIT_BUILD_TESTS_SUPPORTED) ly_get_list_relative_pal_filename(pal_dir ${CMAKE_CURRENT_LIST_DIR}/Tests/Platform/${PAL_PLATFORM_NAME}) @@ -43,6 +52,7 @@ if(PAL_TRAIT_BUILD_TESTS_SUPPORTED) FILES_CMAKE Tests/framework_shared_tests_files.cmake AzFramework/Physics/physics_mock_files.cmake + Tests/terrain_mock_files.cmake INCLUDE_DIRECTORIES PUBLIC Tests diff --git a/Code/Framework/AzFramework/Platform/Android/AzFramework/Archive/ArchiveVars_Android.h b/Code/Framework/AzFramework/Platform/Android/AzFramework/Archive/ArchiveVars_Android.h deleted file mode 100644 index 5a80afe271..0000000000 --- a/Code/Framework/AzFramework/Platform/Android/AzFramework/Archive/ArchiveVars_Android.h +++ /dev/null @@ -1,11 +0,0 @@ -/* - * Copyright (c) Contributors to the Open 3D Engine Project. - * For complete copyright and license terms please see the LICENSE at the root of this distribution. - * - * SPDX-License-Identifier: Apache-2.0 OR MIT - * - */ - -#pragma once - -#define STREAM_CACHE_DEFAULT 0 diff --git a/Code/Framework/AzFramework/Platform/Android/AzFramework/Archive/ArchiveVars_Platform.h b/Code/Framework/AzFramework/Platform/Android/AzFramework/Archive/ArchiveVars_Platform.h deleted file mode 100644 index 42a2a43006..0000000000 --- a/Code/Framework/AzFramework/Platform/Android/AzFramework/Archive/ArchiveVars_Platform.h +++ /dev/null @@ -1,10 +0,0 @@ -/* - * Copyright (c) Contributors to the Open 3D Engine Project. - * For complete copyright and license terms please see the LICENSE at the root of this distribution. - * - * SPDX-License-Identifier: Apache-2.0 OR MIT - * - */ -#pragma once - -#include diff --git a/Code/Framework/AzFramework/Platform/Android/AzFramework/Process/ProcessWatcher_Android.cpp b/Code/Framework/AzFramework/Platform/Android/AzFramework/Process/ProcessWatcher_Android.cpp index f87c51bdc5..d637da29fe 100644 --- a/Code/Framework/AzFramework/Platform/Android/AzFramework/Process/ProcessWatcher_Android.cpp +++ b/Code/Framework/AzFramework/Platform/Android/AzFramework/Process/ProcessWatcher_Android.cpp @@ -6,10 +6,10 @@ * */ +#include #include #include - namespace AzFramework { @@ -83,4 +83,23 @@ namespace AzFramework { } + + AZStd::string ProcessLauncher::ProcessLaunchInfo::GetCommandLineParametersAsString() const + { + struct CommandLineParametersVisitor + { + AZStd::string operator()(const AZStd::string& commandLine) const + { + return commandLine; + } + + AZStd::string operator()(const AZStd::vector& commandLineArray) const + { + AZStd::string commandLineResult; + AZ::StringFunc::Join(commandLineResult, commandLineArray.begin(), commandLineArray.end(), " "); + return commandLineResult; + } + }; + return AZStd::visit(CommandLineParametersVisitor{}, m_commandlineParameters); + } } //namespace AzFramework diff --git a/Code/Framework/AzFramework/Platform/Android/platform_android_files.cmake b/Code/Framework/AzFramework/Platform/Android/platform_android_files.cmake index c220bc1154..9eddc4964a 100644 --- a/Code/Framework/AzFramework/Platform/Android/platform_android_files.cmake +++ b/Code/Framework/AzFramework/Platform/Android/platform_android_files.cmake @@ -27,8 +27,6 @@ set(FILES AzFramework/Input/User/LocalUserId_Platform.h ../Common/Default/AzFramework/Input/User/LocalUserId_Default.h AzFramework/Input/Devices/VirtualKeyboard/InputDeviceVirtualKeyboard_Android.cpp - AzFramework/Archive/ArchiveVars_Platform.h - AzFramework/Archive/ArchiveVars_Android.h AzFramework/Process/ProcessCommon.h AzFramework/Process/ProcessWatcher_Android.cpp AzFramework/Process/ProcessCommunicator_Android.cpp diff --git a/Code/Framework/AzFramework/Platform/Common/Default/AzFramework/Process/ProcessWatcher_Default.cpp b/Code/Framework/AzFramework/Platform/Common/Default/AzFramework/Process/ProcessWatcher_Default.cpp index f87c51bdc5..a30ab72420 100644 --- a/Code/Framework/AzFramework/Platform/Common/Default/AzFramework/Process/ProcessWatcher_Default.cpp +++ b/Code/Framework/AzFramework/Platform/Common/Default/AzFramework/Process/ProcessWatcher_Default.cpp @@ -83,4 +83,9 @@ namespace AzFramework { } + + AZStd::string ProcessLauncher::ProcessLaunchInfo::GetCommandLineParametersAsString() const + { + return AZStd::string{}; + } } //namespace AzFramework diff --git a/Code/Framework/AzFramework/Platform/Common/Xcb/AzFramework/XcbApplication.cpp b/Code/Framework/AzFramework/Platform/Common/Xcb/AzFramework/XcbApplication.cpp index f57f4a89ac..780e1e72fe 100644 --- a/Code/Framework/AzFramework/Platform/Common/Xcb/AzFramework/XcbApplication.cpp +++ b/Code/Framework/AzFramework/Platform/Common/Xcb/AzFramework/XcbApplication.cpp @@ -10,6 +10,8 @@ #include #include +#include + namespace AzFramework { //////////////////////////////////////////////////////////////////////////////////////////////// @@ -34,6 +36,31 @@ namespace AzFramework return m_xcbConnection.get(); } + void SetEnableXInput(xcb_connection_t* connection, bool enable) override + { + struct Mask + { + xcb_input_event_mask_t head; + xcb_input_xi_event_mask_t mask; + }; + const Mask mask { + /*.head=*/{ + /*.device_id=*/XCB_INPUT_DEVICE_ALL_MASTER, + /*.mask_len=*/1 + }, + /*.mask=*/ enable ? + (xcb_input_xi_event_mask_t)(XCB_INPUT_XI_EVENT_MASK_RAW_MOTION | XCB_INPUT_XI_EVENT_MASK_RAW_BUTTON_PRESS | XCB_INPUT_XI_EVENT_MASK_RAW_BUTTON_RELEASE) : + (xcb_input_xi_event_mask_t)XCB_NONE + }; + + const xcb_setup_t* xcbSetup = xcb_get_setup(connection); + const xcb_screen_t* xcbScreen = xcb_setup_roots_iterator(xcbSetup).data; + + xcb_input_xi_select_events(connection, xcbScreen->root, 1, &mask.head); + + xcb_flush(connection); + } + private: XcbUniquePtr m_xcbConnection = nullptr; }; diff --git a/Code/Framework/AzFramework/Platform/Common/Xcb/AzFramework/XcbConnectionManager.h b/Code/Framework/AzFramework/Platform/Common/Xcb/AzFramework/XcbConnectionManager.h index daa5bf35af..ca7ce06e6c 100644 --- a/Code/Framework/AzFramework/Platform/Common/Xcb/AzFramework/XcbConnectionManager.h +++ b/Code/Framework/AzFramework/Platform/Common/Xcb/AzFramework/XcbConnectionManager.h @@ -24,6 +24,9 @@ namespace AzFramework virtual ~XcbConnectionManager() = default; virtual xcb_connection_t* GetXcbConnection() const = 0; + + //! Enables/Disables XInput Raw Input events. + virtual void SetEnableXInput(xcb_connection_t* connection, bool enable) = 0; }; class XcbConnectionManagerBusTraits diff --git a/Code/Framework/AzFramework/Platform/Common/Xcb/AzFramework/XcbEventHandler.h b/Code/Framework/AzFramework/Platform/Common/Xcb/AzFramework/XcbEventHandler.h index 251342093a..f32e45ed99 100644 --- a/Code/Framework/AzFramework/Platform/Common/Xcb/AzFramework/XcbEventHandler.h +++ b/Code/Framework/AzFramework/Platform/Common/Xcb/AzFramework/XcbEventHandler.h @@ -23,9 +23,6 @@ namespace AzFramework virtual ~XcbEventHandler() = default; virtual void HandleXcbEvent(xcb_generic_event_t* event) = 0; - - // ATTN This is used as a workaround for RAW Input events when using the Editor. - virtual void PollSpecialEvents(){}; }; class XcbEventHandlerBusTraits : public AZ::EBusTraits diff --git a/Code/Framework/AzFramework/Platform/Common/Xcb/AzFramework/XcbInputDeviceKeyboard.h b/Code/Framework/AzFramework/Platform/Common/Xcb/AzFramework/XcbInputDeviceKeyboard.h index 00383abf6c..a6d3029a57 100644 --- a/Code/Framework/AzFramework/Platform/Common/Xcb/AzFramework/XcbInputDeviceKeyboard.h +++ b/Code/Framework/AzFramework/Platform/Common/Xcb/AzFramework/XcbInputDeviceKeyboard.h @@ -5,6 +5,9 @@ * SPDX-License-Identifier: Apache-2.0 OR MIT * */ +#pragma once + +#pragma once #include #include diff --git a/Code/Framework/AzFramework/Platform/Common/Xcb/AzFramework/XcbInputDeviceMouse.cpp b/Code/Framework/AzFramework/Platform/Common/Xcb/AzFramework/XcbInputDeviceMouse.cpp index 56f21e6533..c3b7a97ccf 100644 --- a/Code/Framework/AzFramework/Platform/Common/Xcb/AzFramework/XcbInputDeviceMouse.cpp +++ b/Code/Framework/AzFramework/Platform/Common/Xcb/AzFramework/XcbInputDeviceMouse.cpp @@ -13,21 +13,68 @@ namespace AzFramework { - xcb_window_t GetSystemCursorFocusWindow() + xcb_window_t GetSystemCursorFocusWindow(xcb_connection_t* connection) { void* systemCursorFocusWindow = nullptr; AzFramework::InputSystemCursorConstraintRequestBus::BroadcastResult( systemCursorFocusWindow, &AzFramework::InputSystemCursorConstraintRequests::GetSystemCursorConstraintWindow); - if (!systemCursorFocusWindow) + if (systemCursorFocusWindow) { - return XCB_NONE; + return static_cast(reinterpret_cast(systemCursorFocusWindow)); } - // TODO Clang compile error because cast .... loses information. On GNU/Linux HWND is void* and on 64-bit - // machines its obviously 64 bit but we receive the window id from m_renderOverlay.winId() which is xcb_window_t 32-bit. + // EWMH-compliant window managers set the "_NET_ACTIVE_WINDOW" property + // of the X server's root window to the currently active window. This + // retrieves value of that property. - return static_cast(reinterpret_cast(systemCursorFocusWindow)); + // Get the atom for the _NET_ACTIVE_WINDOW property + constexpr int propertyNameLength = 18; + xcb_generic_error_t* error = nullptr; + XcbStdFreePtr activeWindowAtom {xcb_intern_atom_reply( + connection, + xcb_intern_atom(connection, /*only_if_exists=*/ 1, propertyNameLength, "_NET_ACTIVE_WINDOW"), + &error + )}; + if (!activeWindowAtom || error) + { + if (error) + { + AZ_Warning("XcbInput", false, "Retrieving _NET_ACTIVE_WINDOW atom failed : Error code %d", error->error_code); + free(error); + } + return XCB_WINDOW_NONE; + } + + // Get the root window + const xcb_window_t rootWId = xcb_setup_roots_iterator(xcb_get_setup(connection)).data->root; + + // Fetch the value of the root window's _NET_ACTIVE_WINDOW property + XcbStdFreePtr property {xcb_get_property_reply( + connection, + xcb_get_property( + /*c=*/connection, + /*_delete=*/ 0, + /*window=*/rootWId, + /*property=*/activeWindowAtom->atom, + /*type=*/XCB_ATOM_WINDOW, + /*long_offset=*/0, + /*long_length=*/1 + ), + &error + )}; + + if (!property || error) + { + if (error) + { + AZ_Warning("XcbInput", false, "Retrieving _NET_ACTIVE_WINDOW atom failed : Error code %d", error->error_code); + free(error); + } + return XCB_WINDOW_NONE; + } + + return *static_cast(xcb_get_property_value(property.get())); } xcb_connection_t* XcbInputDeviceMouse::s_xcbConnection = nullptr; @@ -39,8 +86,7 @@ namespace AzFramework : InputDeviceMouse::Implementation(inputDevice) , m_systemCursorState(SystemCursorState::Unknown) , m_systemCursorPositionNormalized(0.5f, 0.5f) - , m_prevConstraintWindow(XCB_NONE) - , m_focusWindow(XCB_NONE) + , m_focusWindow(XCB_WINDOW_NONE) , m_cursorShown(true) { XcbEventHandlerBus::Handler::BusConnect(); @@ -57,14 +103,14 @@ namespace AzFramework InputDeviceMouse::Implementation* XcbInputDeviceMouse::Create(InputDeviceMouse& inputDevice) { - auto* interface = AzFramework::XcbConnectionManagerInterface::Get(); + const auto* interface = AzFramework::XcbConnectionManagerInterface::Get(); if (!interface) { AZ_Warning("XcbInput", false, "XCB interface not available"); return nullptr; } - s_xcbConnection = AzFramework::XcbConnectionManagerInterface::Get()->GetXcbConnection(); + s_xcbConnection = interface->GetXcbConnection(); if (!s_xcbConnection) { AZ_Warning("XcbInput", false, "XCB connection not available"); @@ -126,7 +172,7 @@ namespace AzFramework // Get window information. const XcbStdFreePtr xcbGeometryReply{ xcb_get_geometry_reply( - s_xcbConnection, xcb_get_geometry(s_xcbConnection, window), NULL) }; + s_xcbConnection, xcb_get_geometry(s_xcbConnection, window), nullptr) }; if (!xcbGeometryReply) { @@ -137,7 +183,7 @@ namespace AzFramework xcb_translate_coordinates(s_xcbConnection, window, s_xcbScreen->root, 0, 0); const XcbStdFreePtr xkbTranslateCoordReply{ xcb_translate_coordinates_reply( - s_xcbConnection, translate_coord, NULL) }; + s_xcbConnection, translate_coord, nullptr) }; if (!xkbTranslateCoordReply) { @@ -173,11 +219,11 @@ namespace AzFramework for (const auto& barrier : m_activeBarriers) { xcb_void_cookie_t cookie = xcb_xfixes_create_pointer_barrier_checked( - s_xcbConnection, barrier.id, window, barrier.x0, barrier.y0, barrier.x1, barrier.y1, barrier.direction, 0, NULL); - const XcbStdFreePtr xkbError{ xcb_request_check(s_xcbConnection, cookie) }; + s_xcbConnection, barrier.id, window, barrier.x0, barrier.y0, barrier.x1, barrier.y1, barrier.direction, 0, nullptr); + const XcbStdFreePtr xcbError{ xcb_request_check(s_xcbConnection, cookie) }; AZ_Warning( - "XcbInput", !xkbError, "XFixes, failed to create barrier %d at (%d %d %d %d)", barrier.id, barrier.x0, barrier.y0, + "XcbInput", !xcbError, "XFixes, failed to create barrier %d at (%d %d %d %d)", barrier.id, barrier.x0, barrier.y0, barrier.x1, barrier.y1); } } @@ -207,7 +253,7 @@ namespace AzFramework const xcb_xfixes_query_version_cookie_t query_cookie = xcb_xfixes_query_version(s_xcbConnection, 5, 0); - xcb_generic_error_t* error = NULL; + xcb_generic_error_t* error = nullptr; const XcbStdFreePtr xkbQueryRequestReply{ xcb_xfixes_query_version_reply( s_xcbConnection, query_cookie, &error) }; @@ -244,7 +290,7 @@ namespace AzFramework const xcb_input_xi_query_version_cookie_t query_version_cookie = xcb_input_xi_query_version(s_xcbConnection, 2, 2); - xcb_generic_error_t* error = NULL; + xcb_generic_error_t* error = nullptr; const XcbStdFreePtr xkbQueryRequestReply{ xcb_input_xi_query_version_reply( s_xcbConnection, query_version_cookie, &error) }; @@ -268,40 +314,13 @@ namespace AzFramework return m_xInputInitialized; } - void XcbInputDeviceMouse::SetEnableXInput(bool enable) - { - struct - { - xcb_input_event_mask_t head; - int mask; - } mask; - - mask.head.deviceid = XCB_INPUT_DEVICE_ALL; - mask.head.mask_len = 1; - - if (enable) - { - mask.mask = XCB_INPUT_XI_EVENT_MASK_RAW_MOTION | XCB_INPUT_XI_EVENT_MASK_RAW_BUTTON_PRESS | - XCB_INPUT_XI_EVENT_MASK_RAW_BUTTON_RELEASE | XCB_INPUT_XI_EVENT_MASK_MOTION | XCB_INPUT_XI_EVENT_MASK_BUTTON_PRESS | - XCB_INPUT_XI_EVENT_MASK_BUTTON_RELEASE; - } - else - { - mask.mask = XCB_NONE; - } - - xcb_input_xi_select_events(s_xcbConnection, s_xcbScreen->root, 1, &mask.head); - - xcb_flush(s_xcbConnection); - } - void XcbInputDeviceMouse::SetSystemCursorState(SystemCursorState systemCursorState) { if (systemCursorState != m_systemCursorState) { m_systemCursorState = systemCursorState; - m_focusWindow = GetSystemCursorFocusWindow(); + m_focusWindow = GetSystemCursorFocusWindow(s_xcbConnection); HandleCursorState(m_focusWindow, systemCursorState); } @@ -309,52 +328,10 @@ namespace AzFramework void XcbInputDeviceMouse::HandleCursorState(xcb_window_t window, SystemCursorState systemCursorState) { - bool confined = false, cursorShown = true; - switch (systemCursorState) - { - case SystemCursorState::ConstrainedAndHidden: - { - //!< Constrained to the application's main window and hidden - confined = true; - cursorShown = false; - } - break; - case SystemCursorState::ConstrainedAndVisible: - { - //!< Constrained to the application's main window and visible - confined = true; - } - break; - case SystemCursorState::UnconstrainedAndHidden: - { - //!< Free to move outside the main window but hidden while inside - cursorShown = false; - } - break; - case SystemCursorState::UnconstrainedAndVisible: - { - //!< Free to move outside the application's main window and visible - } - case SystemCursorState::Unknown: - default: - break; - } - - // ATTN GetSystemCursorFocusWindow when getting out of the play in editor will return XCB_NONE - // We need however the window id to reset the cursor. - if (XCB_NONE == window && (confined || cursorShown)) - { - // Reuse the previous window to reset states. - window = m_prevConstraintWindow; - m_prevConstraintWindow = XCB_NONE; - } - else - { - // Remember the window we used to modify cursor and barrier states. - m_prevConstraintWindow = window; - } - - SetEnableXInput(!cursorShown); + const bool confined = (systemCursorState == SystemCursorState::ConstrainedAndHidden) || + (systemCursorState == SystemCursorState::ConstrainedAndVisible); + const bool cursorShown = (systemCursorState == SystemCursorState::ConstrainedAndVisible) || + (systemCursorState == SystemCursorState::UnconstrainedAndVisible); CreateBarriers(window, confined); ShowCursor(window, cursorShown); @@ -368,26 +345,26 @@ namespace AzFramework void XcbInputDeviceMouse::SetSystemCursorPositionNormalizedInternal(xcb_window_t window, AZ::Vector2 positionNormalized) { // TODO Basically not done at all. Added only the basic functions needed. - const XcbStdFreePtr xkbGeometryReply{ xcb_get_geometry_reply( - s_xcbConnection, xcb_get_geometry(s_xcbConnection, window), NULL) }; + const XcbStdFreePtr xcbGeometryReply{ xcb_get_geometry_reply( + s_xcbConnection, xcb_get_geometry(s_xcbConnection, window), nullptr) }; - if (!xkbGeometryReply) + if (!xcbGeometryReply) { return; } - const int16_t x = static_cast(positionNormalized.GetX() * xkbGeometryReply->width); - const int16_t y = static_cast(positionNormalized.GetY() * xkbGeometryReply->height); + const int16_t x = static_cast(positionNormalized.GetX() * xcbGeometryReply->width); + const int16_t y = static_cast(positionNormalized.GetY() * xcbGeometryReply->height); - xcb_warp_pointer(s_xcbConnection, XCB_NONE, window, 0, 0, 0, 0, x, y); + xcb_warp_pointer(s_xcbConnection, XCB_WINDOW_NONE, window, 0, 0, 0, 0, x, y); xcb_flush(s_xcbConnection); } void XcbInputDeviceMouse::SetSystemCursorPositionNormalized(AZ::Vector2 positionNormalized) { - const xcb_window_t window = GetSystemCursorFocusWindow(); - if (XCB_NONE == window) + const xcb_window_t window = GetSystemCursorFocusWindow(s_xcbConnection); + if (XCB_WINDOW_NONE == window) { return; } @@ -401,7 +378,7 @@ namespace AzFramework const xcb_query_pointer_cookie_t pointer = xcb_query_pointer(s_xcbConnection, window); - const XcbStdFreePtr xkbQueryPointerReply{ xcb_query_pointer_reply(s_xcbConnection, pointer, NULL) }; + const XcbStdFreePtr xkbQueryPointerReply{ xcb_query_pointer_reply(s_xcbConnection, pointer, nullptr) }; if (!xkbQueryPointerReply) { @@ -409,7 +386,7 @@ namespace AzFramework } const XcbStdFreePtr xkbGeometryReply{ xcb_get_geometry_reply( - s_xcbConnection, xcb_get_geometry(s_xcbConnection, window), NULL) }; + s_xcbConnection, xcb_get_geometry(s_xcbConnection, window), nullptr) }; if (!xkbGeometryReply) { @@ -429,8 +406,8 @@ namespace AzFramework AZ::Vector2 XcbInputDeviceMouse::GetSystemCursorPositionNormalized() const { - const xcb_window_t window = GetSystemCursorFocusWindow(); - if (XCB_NONE == window) + const xcb_window_t window = GetSystemCursorFocusWindow(s_xcbConnection); + if (XCB_WINDOW_NONE == window) { return AZ::Vector2::CreateZero(); } @@ -455,11 +432,11 @@ namespace AzFramework cookie = xcb_xfixes_hide_cursor_checked(s_xcbConnection, window); } - const XcbStdFreePtr xkbError{ xcb_request_check(s_xcbConnection, cookie) }; + const XcbStdFreePtr xcbError{ xcb_request_check(s_xcbConnection, cookie) }; - if (xkbError) + if (xcbError) { - AZ_Warning("XcbInput", false, "ShowCursor failed: %d", xkbError->error_code); + AZ_Warning("XcbInput", false, "ShowCursor failed: %d", xcbError->error_code); return; } @@ -500,14 +477,6 @@ namespace AzFramework } } - void XcbInputDeviceMouse::HandlePointerMotionEvents(const xcb_generic_event_t* event) - { - const xcb_input_motion_event_t* mouseMotionEvent = reinterpret_cast(event); - - m_systemCursorPosition[0] = mouseMotionEvent->event_x; - m_systemCursorPosition[1] = mouseMotionEvent->event_y; - } - void XcbInputDeviceMouse::HandleRawInputEvents(const xcb_ge_generic_event_t* event) { const xcb_ge_generic_event_t* genericEvent = reinterpret_cast(event); @@ -552,78 +521,20 @@ namespace AzFramework } } - void XcbInputDeviceMouse::PollSpecialEvents() - { - while (xcb_generic_event_t* genericEvent = xcb_poll_for_queued_event(s_xcbConnection)) - { - // TODO Is the following correct? If we are showing the cursor, don't poll RAW Input events. - switch (genericEvent->response_type & ~0x80) - { - case XCB_GE_GENERIC: - { - const xcb_ge_generic_event_t* geGenericEvent = reinterpret_cast(genericEvent); - - // Only handle raw inputs if we have focus. - // Handle Raw Input events first. - if ((geGenericEvent->event_type == XCB_INPUT_RAW_BUTTON_PRESS) || - (geGenericEvent->event_type == XCB_INPUT_RAW_BUTTON_RELEASE) || - (geGenericEvent->event_type == XCB_INPUT_RAW_MOTION)) - { - HandleRawInputEvents(geGenericEvent); - - free(genericEvent); - } - } - break; - } - } - } - void XcbInputDeviceMouse::HandleXcbEvent(xcb_generic_event_t* event) { switch (event->response_type & ~0x80) { - // QT5 is using by default XInput which means we do need to check for XCB_GE_GENERIC event to parse all mouse related events. + // XInput raw events are sent from the server as a XCB_GE_GENERIC + // event. A XCB_GE_GENERIC event is typecast to a + // xcb_ge_generic_event_t, which is distinct from a + // xcb_generic_event_t, and exists so that X11 extensions can extend + // the event emission beyond the size that a normal X11 event could + // contain. case XCB_GE_GENERIC: { const xcb_ge_generic_event_t* genericEvent = reinterpret_cast(event); - - // Handling RAW Inputs here works in GameMode but not in Editor mode because QT is - // not handling RAW input events and passing to. - if (!m_cursorShown) - { - // Handle Raw Input events first. - if ((genericEvent->event_type == XCB_INPUT_RAW_BUTTON_PRESS) || - (genericEvent->event_type == XCB_INPUT_RAW_BUTTON_RELEASE) || (genericEvent->event_type == XCB_INPUT_RAW_MOTION)) - { - HandleRawInputEvents(genericEvent); - } - } - else - { - switch (genericEvent->event_type) - { - case XCB_INPUT_BUTTON_PRESS: - { - const xcb_input_button_press_event_t* mouseButtonEvent = - reinterpret_cast(genericEvent); - HandleButtonPressEvents(mouseButtonEvent->detail, true); - } - break; - case XCB_INPUT_BUTTON_RELEASE: - { - const xcb_input_button_release_event_t* mouseButtonEvent = - reinterpret_cast(genericEvent); - HandleButtonPressEvents(mouseButtonEvent->detail, false); - } - break; - case XCB_INPUT_MOTION: - { - HandlePointerMotionEvents(event); - } - break; - } - } + HandleRawInputEvents(genericEvent); } break; case XCB_FOCUS_IN: @@ -634,6 +545,9 @@ namespace AzFramework m_focusWindow = focusInEvent->event; HandleCursorState(m_focusWindow, m_systemCursorState); } + + auto* interface = AzFramework::XcbConnectionManagerInterface::Get(); + interface->SetEnableXInput(interface->GetXcbConnection(), true); } break; case XCB_FOCUS_OUT: @@ -644,7 +558,10 @@ namespace AzFramework ProcessRawEventQueues(); ResetInputChannelStates(); - m_focusWindow = XCB_NONE; + m_focusWindow = XCB_WINDOW_NONE; + + auto* interface = AzFramework::XcbConnectionManagerInterface::Get(); + interface->SetEnableXInput(interface->GetXcbConnection(), false); } break; } diff --git a/Code/Framework/AzFramework/Platform/Common/Xcb/AzFramework/XcbInputDeviceMouse.h b/Code/Framework/AzFramework/Platform/Common/Xcb/AzFramework/XcbInputDeviceMouse.h index 106d204ca9..f5b805a7a5 100644 --- a/Code/Framework/AzFramework/Platform/Common/Xcb/AzFramework/XcbInputDeviceMouse.h +++ b/Code/Framework/AzFramework/Platform/Common/Xcb/AzFramework/XcbInputDeviceMouse.h @@ -6,6 +6,8 @@ * */ +#pragma once + #include #include #include @@ -65,9 +67,6 @@ namespace AzFramework //! \ref AzFramework::InputDeviceMouse::Implementation::TickInputDevice void TickInputDevice() override; - //! This method is called by the Editor to accommodate some events with the Editor. Never called in Game mode. - void PollSpecialEvents() override; - //! Handle X11 events. void HandleXcbEvent(xcb_generic_event_t* event) override; @@ -77,9 +76,6 @@ namespace AzFramework //! Initialize XInput extension. Used for raw input during confinement and showing/hiding the cursor. static bool InitializeXInput(); - //! Enables/Disables XInput Raw Input events. - void SetEnableXInput(bool enable); - //! Create barriers. void CreateBarriers(xcb_window_t window, bool create); @@ -98,9 +94,6 @@ namespace AzFramework //! Handle button press/release events. void HandleButtonPressEvents(uint32_t detail, bool pressed); - //! Handle motion notify events. - void HandlePointerMotionEvents(const xcb_generic_event_t* event); - //! Will set cursor states and confinement modes. void HandleCursorState(xcb_window_t window, SystemCursorState systemCursorState); @@ -160,7 +153,6 @@ namespace AzFramework AZ::Vector2 m_cursorHiddenPosition; AZ::Vector2 m_systemCursorPositionNormalized; - uint32_t m_systemCursorPosition[MAX_XI_RAW_AXIS]; static xcb_connection_t* s_xcbConnection; static xcb_screen_t* s_xcbScreen; @@ -171,9 +163,6 @@ namespace AzFramework //! Will be true if the xinput2 extension could be initialized. static bool m_xInputInitialized; - //! The window that had focus - xcb_window_t m_prevConstraintWindow; - //! The current window that has focus xcb_window_t m_focusWindow; diff --git a/Code/Framework/AzFramework/Platform/Linux/AzFramework/Archive/ArchiveVars_Linux.h b/Code/Framework/AzFramework/Platform/Linux/AzFramework/Archive/ArchiveVars_Linux.h deleted file mode 100644 index 5a80afe271..0000000000 --- a/Code/Framework/AzFramework/Platform/Linux/AzFramework/Archive/ArchiveVars_Linux.h +++ /dev/null @@ -1,11 +0,0 @@ -/* - * Copyright (c) Contributors to the Open 3D Engine Project. - * For complete copyright and license terms please see the LICENSE at the root of this distribution. - * - * SPDX-License-Identifier: Apache-2.0 OR MIT - * - */ - -#pragma once - -#define STREAM_CACHE_DEFAULT 0 diff --git a/Code/Framework/AzFramework/Platform/Linux/AzFramework/Archive/ArchiveVars_Platform.h b/Code/Framework/AzFramework/Platform/Linux/AzFramework/Archive/ArchiveVars_Platform.h deleted file mode 100644 index 1a0b774b97..0000000000 --- a/Code/Framework/AzFramework/Platform/Linux/AzFramework/Archive/ArchiveVars_Platform.h +++ /dev/null @@ -1,10 +0,0 @@ -/* - * Copyright (c) Contributors to the Open 3D Engine Project. - * For complete copyright and license terms please see the LICENSE at the root of this distribution. - * - * SPDX-License-Identifier: Apache-2.0 OR MIT - * - */ -#pragma once - -#include diff --git a/Code/Framework/AzFramework/Platform/Linux/AzFramework/Asset/AssetSystemComponentHelper_Linux.cpp b/Code/Framework/AzFramework/Platform/Linux/AzFramework/Asset/AssetSystemComponentHelper_Linux.cpp index dcdc4a5925..6cb474f4ce 100644 --- a/Code/Framework/AzFramework/Platform/Linux/AzFramework/Asset/AssetSystemComponentHelper_Linux.cpp +++ b/Code/Framework/AzFramework/Platform/Linux/AzFramework/Asset/AssetSystemComponentHelper_Linux.cpp @@ -9,19 +9,71 @@ #include #include #include +#include #include #include -#include +#include #include #include +#include #include +AZ_CVAR(bool, ap_tether_lifetime, true, nullptr, AZ::ConsoleFunctorFlags::Null, + "If enabled, a parent process that launches the AP will terminate the AP on exit"); + namespace AzFramework::AssetSystem::Platform { void AllowAssetProcessorToForeground() {} + [[noreturn]] static void LaunchAssetProcessorDirectly(const AZ::IO::FixedMaxPath& assetProcessorPath, AZStd::string_view engineRoot, AZStd::string_view projectPath) + { + AZStd::fixed_vector args { + assetProcessorPath.c_str(), + "--start-hidden", + }; + + // Add the engine path to the launch command if not empty + AZ::IO::FixedMaxPathString engineRootArg; + if (!engineRoot.empty()) + { + // No need to quote these paths, this code calls exec directly and + // does not go through shell string interpolation + engineRootArg = AZ::IO::FixedMaxPathString{"--engine-path="} + AZ::IO::FixedMaxPathString{engineRoot}; + args.push_back(engineRootArg.data()); + } + + // Add the active project path to the launch command if not empty + AZ::IO::FixedMaxPathString projectPathArg; + if (!projectPath.empty()) + { + projectPathArg = AZ::IO::FixedMaxPathString{"--regset=/Amazon/AzCore/Bootstrap/project_path="} + AZ::IO::FixedMaxPathString{projectPath}; + args.push_back(projectPathArg.data()); + } + + // Make sure this is at the end + args.push_back(nullptr); // argv itself needs to be null-terminated + + execv(args[0], const_cast(args.data())); + + // exec* family of functions only return on error + fprintf(stderr, "Asset Processor failed with error: %s\n", strerror(errno)); + _exit(1); + } + + static pid_t LaunchAssetProcessorDaemonized(const AZ::IO::FixedMaxPath& assetProcessorPath, AZStd::string_view engineRoot, AZStd::string_view projectPath) + { + // detach the child from parent + setsid(); + const pid_t secondChildPid = fork(); + if (secondChildPid == 0) + { + LaunchAssetProcessorDirectly(assetProcessorPath, engineRoot, projectPath); + } + return secondChildPid; + } + bool LaunchAssetProcessor(AZStd::string_view executableDirectory, AZStd::string_view engineRoot, AZStd::string_view projectPath) { @@ -40,7 +92,8 @@ namespace AzFramework::AssetSystem::Platform } } - pid_t firstChildPid = fork(); + const pid_t parentPid = getpid(); + const pid_t firstChildPid = fork(); if (firstChildPid == 0) { // redirect output to dev/null so it doesn't hijack an existing console window @@ -53,51 +106,33 @@ namespace AzFramework::AssetSystem::Platform AZ::IO::FileDescriptorRedirector stderrRedirect(STDERR_FILENO); stderrRedirect.RedirectTo(devNull, mode); - // detach the child from parent - setsid(); - pid_t secondChildPid = fork(); - if (secondChildPid == 0) + if (ap_tether_lifetime) { - AZStd::array args { - assetProcessorPath.c_str(), assetProcessorPath.c_str(), "--start-hidden", - static_cast(nullptr), static_cast(nullptr), static_cast(nullptr) - }; - int optionalArgPos = 3; - - // Add the engine path to the launch command if not empty - AZ::IO::FixedMaxPathString engineRootArg; - if (!engineRoot.empty()) + prctl(PR_SET_PDEATHSIG, SIGTERM); + if (getppid() != parentPid) { - engineRootArg = AZ::IO::FixedMaxPathString::format(R"(--engine-path="%.*s")", - aznumeric_cast(engineRoot.size()), engineRoot.data()); - args[optionalArgPos++] = engineRootArg.data(); + _exit(1); } + LaunchAssetProcessorDirectly(assetProcessorPath, engineRoot, projectPath); + } + else + { + const pid_t secondChildPid = LaunchAssetProcessorDaemonized(assetProcessorPath, engineRoot, projectPath); + stdoutRedirect.Reset(); + stderrRedirect.Reset(); - // Add the active project path to the launch command if not empty - AZ::IO::FixedMaxPathString projectPathArg; - if (!projectPath.empty()) - { - projectPathArg = AZ::IO::FixedMaxPathString::format(R"(--regset="/Amazon/AzCore/Bootstrap/project_path=%.*s")", - aznumeric_cast(projectPath.size()), projectPath.data()); - args[optionalArgPos++] = projectPathArg.data(); - } - - AZStd::apply(execl, args); - - // exec* family of functions only exit on error - AZ_Error("AssetSystemComponent", false, "Asset Processor failed with error: %s", strerror(errno)); - _exit(1); + // exit the transient child with proper return code + int ret = (secondChildPid < 0) ? 1 : 0; + _exit(ret); } - stdoutRedirect.Reset(); - stderrRedirect.Reset(); - - // exit the transient child with proper return code - int ret = (secondChildPid < 0) ? 1 : 0; - _exit(ret); } else if (firstChildPid > 0) { + if (ap_tether_lifetime) + { + return true; + } // wait for first child to exit to ensure the second child was started int status = 0; pid_t ret = waitpid(firstChildPid, &status, 0); @@ -106,4 +141,4 @@ namespace AzFramework::AssetSystem::Platform return false; } -} +} // namespace AzFramework::AssetSystem::Platform diff --git a/Code/Framework/AzFramework/Platform/Linux/AzFramework/Process/ProcessWatcher_Linux.cpp b/Code/Framework/AzFramework/Platform/Linux/AzFramework/Process/ProcessWatcher_Linux.cpp index 51a8545443..7c86e00fec 100644 --- a/Code/Framework/AzFramework/Platform/Linux/AzFramework/Process/ProcessWatcher_Linux.cpp +++ b/Code/Framework/AzFramework/Platform/Linux/AzFramework/Process/ProcessWatcher_Linux.cpp @@ -10,12 +10,11 @@ #include #include -#include - #include #include #include #include +#include #include #include @@ -220,36 +219,52 @@ namespace AzFramework // this is so that the callers (which could be numerous) do not have to worry about this and sprinkle ifdefs // all over their code. // We'll convert this to UNIX style command line parameters by counting and eliminating quotes: - - AZStd::vector commandTokens; - - AZStd::string outputString; - bool inQuotes = false; - for (const char currentChar : processLaunchInfo.m_commandlineParameters) - { - if (currentChar == '"') - { - inQuotes = !inQuotes; - } - else if ((currentChar == ' ') && (!inQuotes)) - { - // its a space outside of quotes, so it ends the current parameter - commandTokens.push_back(outputString); - outputString.clear(); - } - else - { - // Its a normal character, or its a space inside quotes - outputString.push_back(currentChar); - } - } - if (!outputString.empty()) + // Struct uses overloaded operator() to quote command line arguments based + // on whether a string or a vector was supplied + struct EscapeCommandArguments { - commandTokens.push_back(outputString); - outputString.clear(); - } - + void operator()(const AZStd::string& commandParameterString) + { + AZStd::string outputString; + bool inQuotes = false; + for (size_t pos = 0; pos < commandParameterString.size(); ++pos) + { + char currentChar = commandParameterString[pos]; + if (currentChar == '"') + { + inQuotes = !inQuotes; + } + else if ((currentChar == ' ') && (!inQuotes)) + { + // its a space outside of quotes, so it ends the current parameter + commandArray.push_back(outputString); + outputString.clear(); + } + else + { + // Its a normal character, or its a space inside quotes + outputString.push_back(currentChar); + } + } + + if (!outputString.empty()) + { + commandArray.push_back(outputString); + outputString.clear(); + } + } + + void operator()(const AZStd::vector& commandParameterArray) + { + commandArray = commandParameterArray; + } + AZStd::vector& commandArray; + }; + + AZStd::vector commandTokens; + AZStd::visit(EscapeCommandArguments{ commandTokens }, processLaunchInfo.m_commandlineParameters); + if (!processLaunchInfo.m_processExecutableString.empty()) { commandTokens.insert(commandTokens.begin(), processLaunchInfo.m_processExecutableString); @@ -452,4 +467,23 @@ namespace AzFramework kill(m_pWatcherData->m_childProcessId, SIGKILL); } + + AZStd::string ProcessLauncher::ProcessLaunchInfo::GetCommandLineParametersAsString() const + { + struct CommandLineParametersVisitor + { + AZStd::string operator()(const AZStd::string& commandLine) const + { + return commandLine; + } + + AZStd::string operator()(const AZStd::vector& commandLineArray) const + { + AZStd::string commandLineResult; + AZ::StringFunc::Join(commandLineResult, commandLineArray.begin(), commandLineArray.end(), " "); + return commandLineResult; + } + }; + return AZStd::visit(CommandLineParametersVisitor{}, m_commandlineParameters); + } } //namespace AzFramework diff --git a/Code/Framework/AzFramework/Platform/Linux/platform_linux_files.cmake b/Code/Framework/AzFramework/Platform/Linux/platform_linux_files.cmake index 206563fdda..da1ce54a15 100644 --- a/Code/Framework/AzFramework/Platform/Linux/platform_linux_files.cmake +++ b/Code/Framework/AzFramework/Platform/Linux/platform_linux_files.cmake @@ -28,6 +28,4 @@ set(FILES AzFramework/Input/User/LocalUserId_Platform.h ../Common/Default/AzFramework/Input/User/LocalUserId_Default.h ../Common/Unimplemented/AzFramework/Input/Devices/VirtualKeyboard/InputDeviceVirtualKeyboard_Unimplemented.cpp - AzFramework/Archive/ArchiveVars_Platform.h - AzFramework/Archive/ArchiveVars_Linux.h ) diff --git a/Code/Framework/AzFramework/Platform/Mac/AzFramework/Archive/ArchiveVars_Mac.h b/Code/Framework/AzFramework/Platform/Mac/AzFramework/Archive/ArchiveVars_Mac.h deleted file mode 100644 index 5a80afe271..0000000000 --- a/Code/Framework/AzFramework/Platform/Mac/AzFramework/Archive/ArchiveVars_Mac.h +++ /dev/null @@ -1,11 +0,0 @@ -/* - * Copyright (c) Contributors to the Open 3D Engine Project. - * For complete copyright and license terms please see the LICENSE at the root of this distribution. - * - * SPDX-License-Identifier: Apache-2.0 OR MIT - * - */ - -#pragma once - -#define STREAM_CACHE_DEFAULT 0 diff --git a/Code/Framework/AzFramework/Platform/Mac/AzFramework/Archive/ArchiveVars_Platform.h b/Code/Framework/AzFramework/Platform/Mac/AzFramework/Archive/ArchiveVars_Platform.h deleted file mode 100644 index 5311c78de6..0000000000 --- a/Code/Framework/AzFramework/Platform/Mac/AzFramework/Archive/ArchiveVars_Platform.h +++ /dev/null @@ -1,10 +0,0 @@ -/* - * Copyright (c) Contributors to the Open 3D Engine Project. - * For complete copyright and license terms please see the LICENSE at the root of this distribution. - * - * SPDX-License-Identifier: Apache-2.0 OR MIT - * - */ -#pragma once - -#include diff --git a/Code/Framework/AzFramework/Platform/Mac/AzFramework/Asset/AssetSystemComponentHelper_Mac.cpp b/Code/Framework/AzFramework/Platform/Mac/AzFramework/Asset/AssetSystemComponentHelper_Mac.cpp index c6f481b65b..a3381dabb8 100644 --- a/Code/Framework/AzFramework/Platform/Mac/AzFramework/Asset/AssetSystemComponentHelper_Mac.cpp +++ b/Code/Framework/AzFramework/Platform/Mac/AzFramework/Asset/AssetSystemComponentHelper_Mac.cpp @@ -10,6 +10,8 @@ #include #include +#include + #include #include @@ -24,14 +26,20 @@ namespace AzFramework::AssetSystem::Platform AZ::IO::FixedMaxPath assetProcessorPath{ executableDirectory }; // In Mac the Editor and game is within a bundle, so the path to the sibling app // has to go up from the Contents/MacOS folder the binary is in - assetProcessorPath /= "../../../AssetProcessor.app"; + assetProcessorPath /= "../../../AssetProcessor.app/Contents/MacOS/AssetProcessor"; assetProcessorPath = assetProcessorPath.LexicallyNormal(); if (!AZ::IO::SystemFile::Exists(assetProcessorPath.c_str())) { - // Check for existence of one under a "bin" directory, i.e. engineRoot is an SDK structure. - assetProcessorPath = - AZ::IO::FixedMaxPath{engineRoot} / "bin" / AZ_TRAIT_OS_PLATFORM_NAME / AZ_BUILD_CONFIGURATION_TYPE / "AssetProcessor.app"; + if (auto settingsRegistry = AZ::SettingsRegistry::Get(); settingsRegistry != nullptr) + { + if (AZ::IO::FixedMaxPath installedBinariesPath; + settingsRegistry->Get(installedBinariesPath.Native(), AZ::SettingsRegistryMergeUtils::FilePathKey_InstalledBinaryFolder)) + { + // Check for existence of one under a "bin" directory, i.e. engineRoot is an SDK structure. + assetProcessorPath = AZ::IO::FixedMaxPath{ engineRoot } / installedBinariesPath / "AssetProcessor.app/Contents/MacOS/AssetProcessor"; + } + } if (!AZ::IO::SystemFile::Exists(assetProcessorPath.c_str())) { @@ -39,23 +47,21 @@ namespace AzFramework::AssetSystem::Platform } } - auto fullLaunchCommand = AZ::IO::FixedMaxPathString::format(R"(open -g "%s" --args --start-hidden)", assetProcessorPath.c_str()); + AZStd::string commandLineParams; // Add the engine path to the launch command if not empty if (!engineRoot.empty()) { - fullLaunchCommand += R"( --engine-path=")"; - fullLaunchCommand += engineRoot; - fullLaunchCommand += '"'; + commandLineParams += AZStd::string::format("\"--engine-path=\"%s\"\"", engineRoot.data()); } - // Add the active project path to the launch command if not empty if (!projectPath.empty()) { - fullLaunchCommand += R"( --project-path=")"; - fullLaunchCommand += projectPath; - fullLaunchCommand += '"'; + commandLineParams += AZStd::string::format(" \"--regset=/Amazon/AzCore/Bootstrap/project_path=\"%s\"\"", projectPath.data()); } - return system(fullLaunchCommand.c_str()) == 0; + AzFramework::ProcessLauncher::ProcessLaunchInfo processLaunchInfo; + processLaunchInfo.m_processExecutableString = AZStd::move(assetProcessorPath.Native()); + processLaunchInfo.m_commandlineParameters = commandLineParams; + return AzFramework::ProcessLauncher::LaunchUnwatchedProcess(processLaunchInfo); } } diff --git a/Code/Framework/AzFramework/Platform/Mac/AzFramework/Process/ProcessWatcher_Mac.cpp b/Code/Framework/AzFramework/Platform/Mac/AzFramework/Process/ProcessWatcher_Mac.cpp index 1ba9ff3067..e131ab4a7b 100644 --- a/Code/Framework/AzFramework/Platform/Mac/AzFramework/Process/ProcessWatcher_Mac.cpp +++ b/Code/Framework/AzFramework/Platform/Mac/AzFramework/Process/ProcessWatcher_Mac.cpp @@ -11,13 +11,12 @@ #include #include -#include - #include #include #include #include #include +#include #include #include @@ -210,46 +209,51 @@ namespace AzFramework // this is so that the callers (which could be numerous) do not have to worry about this and sprinkle ifdefs // all over their code. // We'll convert this to UNIX style command line parameters by counting and eliminating quotes: - + + // Struct uses overloaded operator() to quote command line arguments based + // on whether a string or a vector was supplied + struct EscapeCommandArguments + { + void operator()(const AZStd::string& commandParameterString) + { + AZStd::string outputString; + bool inQuotes = false; + for (size_t pos = 0; pos < commandParameterString.size(); ++pos) + { + char currentChar = commandParameterString[pos]; + if (currentChar == '"') + { + inQuotes = !inQuotes; + } + else if ((currentChar == ' ') && (!inQuotes)) + { + // its a space outside of quotes, so it ends the current parameter + commandArray.push_back(outputString); + outputString.clear(); + } + else + { + // Its a normal character, or its a space inside quotes + outputString.push_back(currentChar); + } + } + + if (!outputString.empty()) + { + commandArray.push_back(outputString); + outputString.clear(); + } + } + + void operator()(const AZStd::vector& commandParameterArray) + { + commandArray = commandParameterArray; + } + AZStd::vector& commandArray; + }; + AZStd::vector commandTokens; - - AZStd::string outputString; - bool inQuotes = false; - for (size_t pos = 0; pos < processLaunchInfo.m_commandlineParameters.size(); ++pos) - { - char currentChar = processLaunchInfo.m_commandlineParameters[pos]; - if (currentChar == '"') - { - // Allow quote literals to go through as quotes which do NOT alter our "in quotes" bool below - // This is to conform with our PC parameter strings which will sometimes include path parameters which - // Can have spaces and commas and need to be output as paramname="\"Some pa,ram\"" in order to capture both correctly - if (outputString.length() && outputString.back() == '\\') - { - outputString.back() = currentChar; - } - else - { - inQuotes = !inQuotes; - } - } - else if ((currentChar == ' ') && (!inQuotes)) - { - // its a space outside of quotes, so it ends the current parameter - commandTokens.push_back(outputString); - outputString.clear(); - } - else - { - // Its a normal character, or its a space inside quotes - outputString.push_back(currentChar); - } - } - - if (!outputString.empty()) - { - commandTokens.push_back(outputString); - outputString.clear(); - } + AZStd::visit(EscapeCommandArguments{ commandTokens }, processLaunchInfo.m_commandlineParameters); if (!processLaunchInfo.m_processExecutableString.empty()) { @@ -417,5 +421,24 @@ namespace AzFramework kill(m_pWatcherData->m_childProcessId, SIGKILL); waitpid(m_pWatcherData->m_childProcessId, NULL, 0); } + + AZStd::string ProcessLauncher::ProcessLaunchInfo::GetCommandLineParametersAsString() const + { + struct CommandLineParametersVisitor + { + AZStd::string operator()(const AZStd::string& commandLine) const + { + return commandLine; + } + + AZStd::string operator()(const AZStd::vector& commandLineArray) const + { + AZStd::string commandLineResult; + AZ::StringFunc::Join(commandLineResult, commandLineArray.begin(), commandLineArray.end(), " "); + return commandLineResult; + } + }; + return AZStd::visit(CommandLineParametersVisitor{}, m_commandlineParameters); + } } //namespace AzFramework diff --git a/Code/Framework/AzFramework/Platform/Mac/platform_mac_files.cmake b/Code/Framework/AzFramework/Platform/Mac/platform_mac_files.cmake index 78f11a65da..319f8f7a46 100644 --- a/Code/Framework/AzFramework/Platform/Mac/platform_mac_files.cmake +++ b/Code/Framework/AzFramework/Platform/Mac/platform_mac_files.cmake @@ -30,8 +30,6 @@ set(FILES AzFramework/Input/User/LocalUserId_Platform.h ../Common/Default/AzFramework/Input/User/LocalUserId_Default.h ../Common/Unimplemented/AzFramework/Input/Devices/VirtualKeyboard/InputDeviceVirtualKeyboard_Unimplemented.cpp - AzFramework/Archive/ArchiveVars_Platform.h - AzFramework/Archive/ArchiveVars_Mac.h ../Common/Apple/AzFramework/Utils/SystemUtilsApple.h ../Common/Apple/AzFramework/Utils/SystemUtilsApple.mm ) diff --git a/Code/Framework/AzFramework/Platform/Windows/AzFramework/Archive/ArchiveVars_Platform.h b/Code/Framework/AzFramework/Platform/Windows/AzFramework/Archive/ArchiveVars_Platform.h deleted file mode 100644 index 771c25c998..0000000000 --- a/Code/Framework/AzFramework/Platform/Windows/AzFramework/Archive/ArchiveVars_Platform.h +++ /dev/null @@ -1,10 +0,0 @@ -/* - * Copyright (c) Contributors to the Open 3D Engine Project. - * For complete copyright and license terms please see the LICENSE at the root of this distribution. - * - * SPDX-License-Identifier: Apache-2.0 OR MIT - * - */ -#pragma once - -#include diff --git a/Code/Framework/AzFramework/Platform/Windows/AzFramework/Archive/ArchiveVars_Windows.h b/Code/Framework/AzFramework/Platform/Windows/AzFramework/Archive/ArchiveVars_Windows.h deleted file mode 100644 index 5a80afe271..0000000000 --- a/Code/Framework/AzFramework/Platform/Windows/AzFramework/Archive/ArchiveVars_Windows.h +++ /dev/null @@ -1,11 +0,0 @@ -/* - * Copyright (c) Contributors to the Open 3D Engine Project. - * For complete copyright and license terms please see the LICENSE at the root of this distribution. - * - * SPDX-License-Identifier: Apache-2.0 OR MIT - * - */ - -#pragma once - -#define STREAM_CACHE_DEFAULT 0 diff --git a/Code/Framework/AzFramework/Platform/Windows/AzFramework/Asset/AssetSystemComponentHelper_Windows.cpp b/Code/Framework/AzFramework/Platform/Windows/AzFramework/Asset/AssetSystemComponentHelper_Windows.cpp index a3782ae081..2e2014df10 100644 --- a/Code/Framework/AzFramework/Platform/Windows/AzFramework/Asset/AssetSystemComponentHelper_Windows.cpp +++ b/Code/Framework/AzFramework/Platform/Windows/AzFramework/Asset/AssetSystemComponentHelper_Windows.cpp @@ -14,7 +14,7 @@ #include -AZ_CVAR(bool, ap_tether_lifetime, false, nullptr, AZ::ConsoleFunctorFlags::Null, +AZ_CVAR(bool, ap_tether_lifetime, true, nullptr, AZ::ConsoleFunctorFlags::Null, "If enabled, a parent process that launches the AP will terminate the AP on exit"); namespace AzFramework::AssetSystem::Platform diff --git a/Code/Framework/AzFramework/Platform/Windows/AzFramework/Process/ProcessWatcher_Win.cpp b/Code/Framework/AzFramework/Platform/Windows/AzFramework/Process/ProcessWatcher_Win.cpp index 6e21ecc205..b0ef2f09a4 100644 --- a/Code/Framework/AzFramework/Platform/Windows/AzFramework/Process/ProcessWatcher_Win.cpp +++ b/Code/Framework/AzFramework/Platform/Windows/AzFramework/Process/ProcessWatcher_Win.cpp @@ -10,6 +10,7 @@ #include #include #include +#include #include #include @@ -99,7 +100,7 @@ namespace AzFramework AZStd::wstring editableCommandLine; AZStd::wstring processExecutableString; AZStd::wstring workingDirectory; - AZStd::to_wstring(editableCommandLine, processLaunchInfo.m_commandlineParameters); + AZStd::to_wstring(editableCommandLine, processLaunchInfo.GetCommandLineParametersAsString()); AZStd::to_wstring(processExecutableString, processLaunchInfo.m_processExecutableString); AZStd::to_wstring(workingDirectory, processLaunchInfo.m_workingDirectory); @@ -355,4 +356,41 @@ namespace AzFramework ::TerminateProcess(m_pWatcherData->processInformation.hProcess, exitCode); } } + + AZStd::string ProcessLauncher::ProcessLaunchInfo::GetCommandLineParametersAsString() const + { + struct CommandLineParametersVisitor + { + AZStd::string operator()(const AZStd::string& commandLine) const + { + return commandLine; + } + + AZStd::string operator()(const AZStd::vector& commandLineArray) const + { + AZStd::string commandLineResult; + + // When re-constructing a command line from an argument list (on windows), if an argument + // is double-quoted, then the double-quotes must be escaped properly otherwise + // it will be absorbed by the native argument parser and possibly evaluated as + // multiple values for arguments + AZStd::string_view escapedDoubleQuote = R"("\")"; + + AZStd::vector preprocessedCommandArray; + + for (const auto& commandArg : commandLineArray) + { + AZStd::string replacedArg = commandArg; + AZ::StringFunc::Replace(replacedArg, R"(")", R"("\")", false, true, true); + preprocessedCommandArray.emplace_back(replacedArg); + } + AZ::StringFunc::Join(commandLineResult, preprocessedCommandArray.begin(), preprocessedCommandArray.end(), " "); + + return commandLineResult; + } + }; + + return AZStd::visit(CommandLineParametersVisitor{}, m_commandlineParameters); + } + } // namespace AzFramework diff --git a/Code/Framework/AzFramework/Platform/Windows/AzFramework/Windowing/NativeWindow_Windows.cpp b/Code/Framework/AzFramework/Platform/Windows/AzFramework/Windowing/NativeWindow_Windows.cpp index 57b37037ae..80428e2557 100644 --- a/Code/Framework/AzFramework/Platform/Windows/AzFramework/Windowing/NativeWindow_Windows.cpp +++ b/Code/Framework/AzFramework/Platform/Windows/AzFramework/Windowing/NativeWindow_Windows.cpp @@ -11,6 +11,7 @@ #include #include +#include #include namespace AzFramework @@ -54,6 +55,7 @@ namespace AzFramework RECT m_windowRectToRestoreOnFullScreenExit; //!< The position and size of the window to restore when exiting full screen. UINT m_windowStyleToRestoreOnFullScreenExit; //!< The style(s) of the window to restore when exiting full screen. bool m_isInBorderlessWindowFullScreenState = false; //!< Was a borderless window used to enter full screen state? + bool m_shouldEnterFullScreenStateOnActivate = false; //!< Should we enter full screen state when the window is activated? using GetDpiForWindowType = UINT(HWND hwnd); GetDpiForWindowType* m_getDpiFunction = nullptr; @@ -233,14 +235,14 @@ namespace AzFramework const UINT rawInputHeaderSize = sizeof(RAWINPUTHEADER); GetRawInputData((HRAWINPUT)lParam, RID_INPUT, NULL, &rawInputSize, rawInputHeaderSize); - LPBYTE rawInputBytes = new BYTE[rawInputSize]; + AZStd::array rawInputBytesArray; + LPBYTE rawInputBytes = rawInputBytesArray.data(); GetRawInputData((HRAWINPUT)lParam, RID_INPUT, rawInputBytes, &rawInputSize, rawInputHeaderSize); RAWINPUT* rawInput = (RAWINPUT*)rawInputBytes; AzFramework::RawInputNotificationBusWindows::Broadcast( &AzFramework::RawInputNotificationBusWindows::Events::OnRawInputEvent, *rawInput); - delete [] rawInputBytes; break; } case WM_CHAR: @@ -249,6 +251,28 @@ namespace AzFramework AzFramework::RawInputNotificationBusWindows::Broadcast(&AzFramework::RawInputNotificationsWindows::OnRawInputCodeUnitUTF16Event, codeUnitUTF16); break; } + case WM_ACTIVATE: + { + // Alt-tabbing out of the app while it is in a full screen state does not + // work unless we explicitly exit the full screen state upon deactivation, + // in which case we want to enter full screen state again upon activation. + const bool windowIsNowInactive = (LOWORD(wParam) == WA_INACTIVE); + const bool windowFullScreenState = nativeWindowImpl->GetFullScreenState(); + if (windowIsNowInactive && + windowFullScreenState) + { + nativeWindowImpl->m_shouldEnterFullScreenStateOnActivate = true; + nativeWindowImpl->SetFullScreenState(false); + } + else if (!windowIsNowInactive && + !windowFullScreenState && + nativeWindowImpl->m_shouldEnterFullScreenStateOnActivate) + { + nativeWindowImpl->m_shouldEnterFullScreenStateOnActivate = false; + nativeWindowImpl->SetFullScreenState(true); + } + break; + } case WM_SYSKEYDOWN: { // Handle ALT+ENTER to toggle full screen unless exclsuive full screen diff --git a/Code/Framework/AzFramework/Platform/Windows/platform_windows_files.cmake b/Code/Framework/AzFramework/Platform/Windows/platform_windows_files.cmake index b8f5b5f841..021ecd3298 100644 --- a/Code/Framework/AzFramework/Platform/Windows/platform_windows_files.cmake +++ b/Code/Framework/AzFramework/Platform/Windows/platform_windows_files.cmake @@ -32,6 +32,4 @@ set(FILES AzFramework/Input/User/LocalUserId_Platform.h ../Common/Default/AzFramework/Input/User/LocalUserId_Default.h ../Common/Unimplemented/AzFramework/Input/Devices/VirtualKeyboard/InputDeviceVirtualKeyboard_Unimplemented.cpp - AzFramework/Archive/ArchiveVars_Platform.h - AzFramework/Archive/ArchiveVars_Windows.h ) diff --git a/Code/Framework/AzFramework/Platform/iOS/AzFramework/Archive/ArchiveVars_Platform.h b/Code/Framework/AzFramework/Platform/iOS/AzFramework/Archive/ArchiveVars_Platform.h deleted file mode 100644 index 6ebbe5aade..0000000000 --- a/Code/Framework/AzFramework/Platform/iOS/AzFramework/Archive/ArchiveVars_Platform.h +++ /dev/null @@ -1,10 +0,0 @@ -/* - * Copyright (c) Contributors to the Open 3D Engine Project. - * For complete copyright and license terms please see the LICENSE at the root of this distribution. - * - * SPDX-License-Identifier: Apache-2.0 OR MIT - * - */ -#pragma once - -#include diff --git a/Code/Framework/AzFramework/Platform/iOS/AzFramework/Archive/ArchiveVars_iOS.h b/Code/Framework/AzFramework/Platform/iOS/AzFramework/Archive/ArchiveVars_iOS.h deleted file mode 100644 index 5a80afe271..0000000000 --- a/Code/Framework/AzFramework/Platform/iOS/AzFramework/Archive/ArchiveVars_iOS.h +++ /dev/null @@ -1,11 +0,0 @@ -/* - * Copyright (c) Contributors to the Open 3D Engine Project. - * For complete copyright and license terms please see the LICENSE at the root of this distribution. - * - * SPDX-License-Identifier: Apache-2.0 OR MIT - * - */ - -#pragma once - -#define STREAM_CACHE_DEFAULT 0 diff --git a/Code/Framework/AzFramework/Platform/iOS/AzFramework/Process/ProcessWatcher_iOS.cpp b/Code/Framework/AzFramework/Platform/iOS/AzFramework/Process/ProcessWatcher_iOS.cpp index f87c51bdc5..d637da29fe 100644 --- a/Code/Framework/AzFramework/Platform/iOS/AzFramework/Process/ProcessWatcher_iOS.cpp +++ b/Code/Framework/AzFramework/Platform/iOS/AzFramework/Process/ProcessWatcher_iOS.cpp @@ -6,10 +6,10 @@ * */ +#include #include #include - namespace AzFramework { @@ -83,4 +83,23 @@ namespace AzFramework { } + + AZStd::string ProcessLauncher::ProcessLaunchInfo::GetCommandLineParametersAsString() const + { + struct CommandLineParametersVisitor + { + AZStd::string operator()(const AZStd::string& commandLine) const + { + return commandLine; + } + + AZStd::string operator()(const AZStd::vector& commandLineArray) const + { + AZStd::string commandLineResult; + AZ::StringFunc::Join(commandLineResult, commandLineArray.begin(), commandLineArray.end(), " "); + return commandLineResult; + } + }; + return AZStd::visit(CommandLineParametersVisitor{}, m_commandlineParameters); + } } //namespace AzFramework diff --git a/Code/Framework/AzFramework/Platform/iOS/platform_ios_files.cmake b/Code/Framework/AzFramework/Platform/iOS/platform_ios_files.cmake index 7745f43ec9..e784e4f6df 100644 --- a/Code/Framework/AzFramework/Platform/iOS/platform_ios_files.cmake +++ b/Code/Framework/AzFramework/Platform/iOS/platform_ios_files.cmake @@ -27,8 +27,6 @@ set(FILES AzFramework/Input/User/LocalUserId_Platform.h ../Common/Default/AzFramework/Input/User/LocalUserId_Default.h ../Common/Apple/AzFramework/Input/Devices/VirtualKeyboard/InputDeviceVirtualKeyboard_Apple.mm - AzFramework/Archive/ArchiveVars_Platform.h - AzFramework/Archive/ArchiveVars_iOS.h AzFramework/Process/ProcessCommon.h AzFramework/Process/ProcessWatcher_iOS.cpp AzFramework/Process/ProcessCommunicator_iOS.cpp diff --git a/Code/Framework/AzFramework/Tests/ArchiveCompressionTests.cpp b/Code/Framework/AzFramework/Tests/ArchiveCompressionTests.cpp index 6cde5b5e84..aa1a27f9b0 100644 --- a/Code/Framework/AzFramework/Tests/ArchiveCompressionTests.cpp +++ b/Code/Framework/AzFramework/Tests/ArchiveCompressionTests.cpp @@ -41,7 +41,9 @@ namespace UnitTest auto projectPathKey = AZ::SettingsRegistryInterface::FixedValueString(AZ::SettingsRegistryMergeUtils::BootstrapSettingsRootKey) + "/project_path"; - registry->Set(projectPathKey, "AutomatedTesting"); + AZ::IO::FixedMaxPath enginePath; + registry->Get(enginePath.Native(), AZ::SettingsRegistryMergeUtils::FilePathKey_EngineRootFolder); + registry->Set(projectPathKey, (enginePath / "AutomatedTesting").Native()); AZ::SettingsRegistryMergeUtils::MergeSettingsToRegistry_AddRuntimeFilePaths(*registry); m_application->Start({}); diff --git a/Code/Framework/AzFramework/Tests/ArchiveTests.cpp b/Code/Framework/AzFramework/Tests/ArchiveTests.cpp index 37babb49a8..33924d7e0c 100644 --- a/Code/Framework/AzFramework/Tests/ArchiveTests.cpp +++ b/Code/Framework/AzFramework/Tests/ArchiveTests.cpp @@ -45,7 +45,9 @@ namespace UnitTest auto projectPathKey = AZ::SettingsRegistryInterface::FixedValueString(AZ::SettingsRegistryMergeUtils::BootstrapSettingsRootKey) + "/project_path"; - registry->Set(projectPathKey, "AutomatedTesting"); + AZ::IO::FixedMaxPath enginePath; + registry->Get(enginePath.Native(), AZ::SettingsRegistryMergeUtils::FilePathKey_EngineRootFolder); + registry->Set(projectPathKey, (enginePath / "AutomatedTesting").Native()); AZ::SettingsRegistryMergeUtils::MergeSettingsToRegistry_AddRuntimeFilePaths(*registry); m_application->Start({}); @@ -271,7 +273,7 @@ namespace UnitTest // Also enable extra verbosity in the AZ::IO::Archive code CVarIntValueScope previousLocationPriority{ *console, "sys_pakPriority" }; CVarIntValueScope oldArchiveVerbosity{ *console, "az_archive_verbosity" }; - console->PerformCommand("sys_PakPriority", { AZ::CVarFixedString::format("%d", aznumeric_cast(AZ::IO::ArchiveLocationPriority::ePakPriorityPakOnly)) }); + console->PerformCommand("sys_PakPriority", { AZ::CVarFixedString::format("%d", aznumeric_cast(AZ::IO::FileSearchPriority::PakOnly)) }); console->PerformCommand("az_archive_verbosity", { "1" }); // ---- Archive FGetCachedFileDataTests (these leverage Archive CachedFile mechanism for caching data --- @@ -457,7 +459,7 @@ namespace UnitTest // Once the archive has been deleted it should no longer be searched CVarIntValueScope previousLocationPriority{ *console, "sys_pakPriority" }; - console->PerformCommand("sys_PakPriority", { AZ::CVarFixedString::format("%d", aznumeric_cast(AZ::IO::ArchiveLocationPriority::ePakPriorityPakOnly)) }); + console->PerformCommand("sys_PakPriority", { AZ::CVarFixedString::format("%d", aznumeric_cast(AZ::IO::FileSearchPriority::PakOnly)) }); handle = archive->FindFirst("levels\\*"); EXPECT_FALSE(static_cast(handle)); @@ -783,7 +785,7 @@ namespace UnitTest EXPECT_TRUE(archive->OpenPack("@usercache@", realNameBuf)); EXPECT_TRUE(archive->IsFileExist("@usercache@/foundit.dat")); - EXPECT_FALSE(archive->IsFileExist("@usercache@/foundit.dat", AZ::IO::IArchive::eFileLocation_OnDisk)); + EXPECT_FALSE(archive->IsFileExist("@usercache@/foundit.dat", AZ::IO::FileSearchLocation::OnDisk)); EXPECT_FALSE(archive->IsFileExist("@usercache@/notfoundit.dat")); EXPECT_TRUE(archive->ClosePack(realNameBuf)); @@ -791,7 +793,7 @@ namespace UnitTest EXPECT_TRUE(archive->OpenPack("@products@", realNameBuf)); EXPECT_TRUE(archive->IsFileExist("@products@/foundit.dat")); EXPECT_FALSE(archive->IsFileExist("@usercache@/foundit.dat")); // do not find it in the previous location! - EXPECT_FALSE(archive->IsFileExist("@products@/foundit.dat", AZ::IO::IArchive::eFileLocation_OnDisk)); + EXPECT_FALSE(archive->IsFileExist("@products@/foundit.dat", AZ::IO::FileSearchLocation::OnDisk)); EXPECT_FALSE(archive->IsFileExist("@products@/notfoundit.dat")); EXPECT_TRUE(archive->ClosePack(realNameBuf)); @@ -800,8 +802,8 @@ namespace UnitTest EXPECT_TRUE(archive->IsFileExist("@products@/mystuff/foundit.dat")); EXPECT_FALSE(archive->IsFileExist("@products@/foundit.dat")); // do not find it in the previous locations! EXPECT_FALSE(archive->IsFileExist("@usercache@/foundit.dat")); // do not find it in the previous locations! - EXPECT_FALSE(archive->IsFileExist("@products@/foundit.dat", AZ::IO::IArchive::eFileLocation_OnDisk)); - EXPECT_FALSE(archive->IsFileExist("@products@/mystuff/foundit.dat", AZ::IO::IArchive::eFileLocation_OnDisk)); + EXPECT_FALSE(archive->IsFileExist("@products@/foundit.dat", AZ::IO::FileSearchLocation::OnDisk)); + EXPECT_FALSE(archive->IsFileExist("@products@/mystuff/foundit.dat", AZ::IO::FileSearchLocation::OnDisk)); EXPECT_FALSE(archive->IsFileExist("@products@/notfoundit.dat")); // non-existent file EXPECT_FALSE(archive->IsFileExist("@products@/mystuff/notfoundit.dat")); // non-existent file EXPECT_TRUE(archive->ClosePack(realNameBuf)); diff --git a/Code/Framework/AzFramework/Tests/AssetCatalog.cpp b/Code/Framework/AzFramework/Tests/AssetCatalog.cpp index 9e5c72f74c..8a24d164cd 100644 --- a/Code/Framework/AzFramework/Tests/AssetCatalog.cpp +++ b/Code/Framework/AzFramework/Tests/AssetCatalog.cpp @@ -305,7 +305,9 @@ namespace UnitTest AZ::SettingsRegistryInterface* registry = AZ::SettingsRegistry::Get(); auto projectPathKey = AZ::SettingsRegistryInterface::FixedValueString(AZ::SettingsRegistryMergeUtils::BootstrapSettingsRootKey) + "/project_path"; - registry->Set(projectPathKey, "AutomatedTesting"); + AZ::IO::FixedMaxPath enginePath; + registry->Get(enginePath.Native(), AZ::SettingsRegistryMergeUtils::FilePathKey_EngineRootFolder); + registry->Set(projectPathKey, (enginePath / "AutomatedTesting").Native()); AZ::SettingsRegistryMergeUtils::MergeSettingsToRegistry_AddRuntimeFilePaths(*registry); AZ::ComponentApplication::StartupParameters startupParameters; diff --git a/Code/Framework/AzFramework/Tests/AssetProcessorConnection.cpp b/Code/Framework/AzFramework/Tests/AssetProcessorConnection.cpp index 2023410397..6c44a882f4 100644 --- a/Code/Framework/AzFramework/Tests/AssetProcessorConnection.cpp +++ b/Code/Framework/AzFramework/Tests/AssetProcessorConnection.cpp @@ -92,11 +92,7 @@ protected: }; -#if AZ_TRAIT_DISABLE_FAILED_AP_CONNECTION_TESTS -TEST_F(APConnectionTest, DISABLED_TestAddRemoveCallbacks) -#else TEST_F(APConnectionTest, TestAddRemoveCallbacks) -#endif // AZ_TRAIT_DISABLE_FAILED_AP_CONNECTION_TESTS { using namespace AzFramework; @@ -218,11 +214,7 @@ TEST_F(APConnectionTest, TestAddRemoveCallbacks) EXPECT_TRUE(WaitForConnectionStateToBeEqual(apConnection, SocketConnection::EConnectionState::Disconnected)); } -#if AZ_TRAIT_DISABLE_FAILED_AP_CONNECTION_TESTS -TEST_F(APConnectionTest, DISABLED_TestAddRemoveCallbacks_RemoveDuringCallback_DoesNotCrash) -#else TEST_F(APConnectionTest, TestAddRemoveCallbacks_RemoveDuringCallback_DoesNotCrash) -#endif // AZ_TRAIT_DISABLE_FAILED_AP_CONNECTION_TESTS { using namespace AzFramework; @@ -313,11 +305,7 @@ TEST_F(APConnectionTest, TestAddRemoveCallbacks_RemoveDuringCallback_DoesNotCras EXPECT_TRUE(WaitForConnectionStateToBeEqual(apConnection, SocketConnection::EConnectionState::Disconnected)); } -#if AZ_TRAIT_DISABLE_FAILED_AP_CONNECTION_TESTS -TEST_F(APConnectionTest, DISABLED_TestAddRemoveCallbacks_AddDuringCallback_DoesNotCrash) -#else TEST_F(APConnectionTest, TestAddRemoveCallbacks_AddDuringCallback_DoesNotCrash) -#endif // AZ_TRAIT_DISABLE_FAILED_AP_CONNECTION_TESTS { using namespace AzFramework; @@ -451,11 +439,7 @@ TEST_F(APConnectionTest, TestAddRemoveCallbacks_AddDuringCallback_DoesNotCrash) EXPECT_TRUE(WaitForConnectionStateToBeEqual(apConnection, SocketConnection::EConnectionState::Disconnected)); } -#if AZ_TRAIT_DISABLE_FAILED_AP_CONNECTION_TESTS -TEST_F(APConnectionTest, DISABLED_TestConnection) -#else TEST_F(APConnectionTest, TestConnection) -#endif // AZ_TRAIT_DISABLE_FAILED_AP_CONNECTION_TESTS { using namespace AzFramework; @@ -557,11 +541,7 @@ TEST_F(APConnectionTest, TestConnection) EXPECT_TRUE(WaitForConnectionStateToBeEqual(apListener, SocketConnection::EConnectionState::Disconnected)); } -#if AZ_TRAIT_DISABLE_FAILED_AP_CONNECTION_TESTS -TEST_F(APConnectionTest, DISABLED_TestReconnect) -#else TEST_F(APConnectionTest, TestReconnect) -#endif // AZ_TRAIT_DISABLE_FAILED_AP_CONNECTION_TESTS { using namespace AzFramework; diff --git a/Code/Framework/AzFramework/Tests/BinToTextEncode.cpp b/Code/Framework/AzFramework/Tests/BinToTextEncode.cpp index a1ebdfd945..a4055db33c 100644 --- a/Code/Framework/AzFramework/Tests/BinToTextEncode.cpp +++ b/Code/Framework/AzFramework/Tests/BinToTextEncode.cpp @@ -34,24 +34,20 @@ namespace UnitTest AllocatorInstance::Create(); ComponentApplication::Descriptor desc; desc.m_useExistingAllocator = true; - desc.m_enableDrilling = false; // we already created a memory driller for the test (AllocatorsFixture) - m_app.Create(desc); + m_app.reset(aznew ComponentApplication); + m_app->Create(desc); } void TearDown() override { - m_app.Destroy(); + m_app->Destroy(); + m_app.reset(); AllocatorInstance::Destroy(); AllocatorInstance::Destroy(); AllocatorsFixture::TearDown(); } - ~Base64Test() override - { - - } - - ComponentApplication m_app; + AZStd::unique_ptr m_app; }; TEST_F(Base64Test, EmptyStringEncodeTest) diff --git a/Code/Framework/AzFramework/Tests/CameraInputTests.cpp b/Code/Framework/AzFramework/Tests/CameraInputTests.cpp index a89fb0bd84..0ddf9e89b9 100644 --- a/Code/Framework/AzFramework/Tests/CameraInputTests.cpp +++ b/Code/Framework/AzFramework/Tests/CameraInputTests.cpp @@ -104,9 +104,10 @@ namespace UnitTest AZStd::shared_ptr m_orbitCamera; AZ::Vector3 m_pivot = AZ::Vector3::CreateZero(); - //! This is approximately Pi/2 * 1000 - this can be used to rotate the camera 90 degrees (pitch or yaw based - //! on vertical or horizontal motion) as the rotate speed function is set to be 1/1000. - inline static const int PixelMotionDelta = 1570; + // this is approximately Pi/2 * 1000 - this can be used to rotate the camera 90 degrees (pitch or yaw based + // on vertical or horizontal motion) as the rotate speed function is set to be 1/1000. + inline static const int PixelMotionDelta90Degrees = 1570; + inline static const int PixelMotionDelta135Degrees = 2356; }; TEST_F(CameraInputFixture, BeginAndEndOrbitCameraInputConsumesCorrectEvents) @@ -292,7 +293,7 @@ namespace UnitTest HandleEventAndUpdate( AzFramework::DiscreteInputEvent{ AzFramework::InputDeviceMouse::Button::Right, AzFramework::InputChannel::State::Began }); - HandleEventAndUpdate(AzFramework::HorizontalMotionEvent{ PixelMotionDelta }); + HandleEventAndUpdate(AzFramework::HorizontalMotionEvent{ PixelMotionDelta90Degrees }); const float expectedYaw = AzFramework::WrapYawRotation(-AZ::Constants::HalfPi); @@ -310,7 +311,7 @@ namespace UnitTest HandleEventAndUpdate( AzFramework::DiscreteInputEvent{ AzFramework::InputDeviceMouse::Button::Right, AzFramework::InputChannel::State::Began }); - HandleEventAndUpdate(AzFramework::VerticalMotionEvent{ PixelMotionDelta }); + HandleEventAndUpdate(AzFramework::VerticalMotionEvent{ PixelMotionDelta90Degrees }); const float expectedPitch = AzFramework::ClampPitchRotation(-AZ::Constants::HalfPi); @@ -321,6 +322,17 @@ namespace UnitTest EXPECT_THAT(m_camera.m_offset, IsClose(AZ::Vector3::CreateZero())); } + TEST(CameraInput, CameraPitchIsClampedWithExpectedTolerance) + { + const auto [expectedMinPitch, expectedMaxPitch] = AzFramework::CameraPitchMinMaxRadiansWithTolerance(); + const float minPitch = AzFramework::ClampPitchRotation(-AZ::Constants::HalfPi); + const float maxPitch = AzFramework::ClampPitchRotation(AZ::Constants::HalfPi); + + using ::testing::FloatNear; + EXPECT_THAT(minPitch, FloatNear(expectedMinPitch, AzFramework::CameraPitchTolerance)); + EXPECT_THAT(maxPitch, FloatNear(expectedMaxPitch, AzFramework::CameraPitchTolerance)); + } + TEST_F(CameraInputFixture, OrbitRotateCameraInputRotatesPitchOffsetByNinetyDegreesWithRequiredPixelDelta) { const auto cameraStartingPosition = AZ::Vector3::CreateAxisY(-20.0f); @@ -331,7 +343,7 @@ namespace UnitTest HandleEventAndUpdate(AzFramework::DiscreteInputEvent{ m_orbitChannelId, AzFramework::InputChannel::State::Began }); HandleEventAndUpdate( AzFramework::DiscreteInputEvent{ AzFramework::InputDeviceMouse::Button::Left, AzFramework::InputChannel::State::Began }); - HandleEventAndUpdate(AzFramework::VerticalMotionEvent{ PixelMotionDelta }); + HandleEventAndUpdate(AzFramework::VerticalMotionEvent{ PixelMotionDelta90Degrees }); const auto expectedCameraEndingPosition = AZ::Vector3(0.0f, -10.0f, 10.0f); const float expectedPitch = AzFramework::ClampPitchRotation(-AZ::Constants::HalfPi); @@ -354,7 +366,7 @@ namespace UnitTest HandleEventAndUpdate(AzFramework::DiscreteInputEvent{ m_orbitChannelId, AzFramework::InputChannel::State::Began }); HandleEventAndUpdate( AzFramework::DiscreteInputEvent{ AzFramework::InputDeviceMouse::Button::Left, AzFramework::InputChannel::State::Began }); - HandleEventAndUpdate(AzFramework::HorizontalMotionEvent{ -PixelMotionDelta }); + HandleEventAndUpdate(AzFramework::HorizontalMotionEvent{ -PixelMotionDelta90Degrees }); const auto expectedCameraEndingPosition = AZ::Vector3(20.0f, -5.0f, 0.0f); const float expectedYaw = AzFramework::WrapYawRotation(AZ::Constants::HalfPi); @@ -366,4 +378,116 @@ namespace UnitTest EXPECT_THAT(m_camera.m_offset, IsClose(AZ::Vector3(5.0f, -10.0f, 0.0f))); EXPECT_THAT(m_camera.Translation(), IsCloseTolerance(expectedCameraEndingPosition, 0.01f)); } + + TEST_F(CameraInputFixture, CameraPitchCanNotBeMovedPastNinetyDegreesWhenConstrained) + { + const auto cameraStartingPosition = AZ::Vector3(15.0f, -20.0f, 0.0f); + m_targetCamera.m_pivot = cameraStartingPosition; + + HandleEventAndUpdate( + AzFramework::DiscreteInputEvent{ AzFramework::InputDeviceMouse::Button::Right, AzFramework::InputChannel::State::Began }); + // pitch by 135.0 degrees + HandleEventAndUpdate(AzFramework::VerticalMotionEvent{ -PixelMotionDelta135Degrees }); + + // clamped to 90.0 degrees + const float expectedPitch = AZ::DegToRad(90.0f); + + using ::testing::FloatNear; + EXPECT_THAT(m_camera.m_pitch, FloatNear(expectedPitch, 0.001f)); + } + + TEST_F(CameraInputFixture, CameraPitchCanBeMovedPastNinetyDegreesWhenUnconstrained) + { + m_firstPersonRotateCamera->m_constrainPitch = [] + { + return false; + }; + + const auto cameraStartingPosition = AZ::Vector3(15.0f, -20.0f, 0.0f); + m_targetCamera.m_pivot = cameraStartingPosition; + + HandleEventAndUpdate( + AzFramework::DiscreteInputEvent{ AzFramework::InputDeviceMouse::Button::Right, AzFramework::InputChannel::State::Began }); + // pitch by 135.0 degrees + HandleEventAndUpdate(AzFramework::VerticalMotionEvent{ -PixelMotionDelta135Degrees }); + + const float expectedPitch = AZ::DegToRad(135.0f); + + using ::testing::FloatNear; + EXPECT_THAT(m_camera.m_pitch, FloatNear(expectedPitch, 0.001f)); + } + + TEST_F(CameraInputFixture, InvalidTranslationInputKeyCannotBeginTranslateCameraInputAgain) + { + HandleEventAndUpdate(AzFramework::DiscreteInputEvent{ m_translateCameraInputChannelIds.m_forwardChannelId, + AzFramework::InputChannel::State::Began }); + + const bool consumed = + m_cameraSystem->HandleEvents(AzFramework::DiscreteInputEvent{ m_orbitChannelId, AzFramework::InputChannel::State::Began }); + + using ::testing::IsFalse; + using ::testing::IsTrue; + EXPECT_THAT(consumed, IsTrue()); + EXPECT_THAT(m_firstPersonTranslateCamera->Beginning(), IsFalse()); + EXPECT_THAT(m_firstPersonTranslateCamera->Active(), IsTrue()); + } + + TEST_F(CameraInputFixture, InvalidTranslationInputKeyDownCannotBeginTranslateCameraInputAgain) + { + HandleEventAndUpdate(AzFramework::DiscreteInputEvent{ m_translateCameraInputChannelIds.m_forwardChannelId, + AzFramework::InputChannel::State::Began }); + + const bool consumed = + m_cameraSystem->HandleEvents(AzFramework::DiscreteInputEvent{ m_orbitChannelId, AzFramework::InputChannel::State::Began }); + + using ::testing::IsFalse; + using ::testing::IsTrue; + EXPECT_THAT(consumed, IsTrue()); + EXPECT_THAT(m_firstPersonTranslateCamera->Beginning(), IsFalse()); + EXPECT_THAT(m_firstPersonTranslateCamera->Active(), IsTrue()); + } + + TEST_F(CameraInputFixture, InvalidTranslationInputKeyUpDoesNotAffectTranslateCameraInputEnd) + { + HandleEventAndUpdate(AzFramework::DiscreteInputEvent{ m_translateCameraInputChannelIds.m_forwardChannelId, + AzFramework::InputChannel::State::Began }); + + const bool consumed = + m_cameraSystem->HandleEvents(AzFramework::DiscreteInputEvent{ m_orbitChannelId, AzFramework::InputChannel::State::Began }); + + HandleEventAndUpdate(AzFramework::DiscreteInputEvent{ m_translateCameraInputChannelIds.m_forwardChannelId, + AzFramework::InputChannel::State::Ended }); + + using ::testing::IsFalse; + using ::testing::IsTrue; + EXPECT_THAT(consumed, IsTrue()); + EXPECT_THAT(m_firstPersonTranslateCamera->Idle(), IsTrue()); + } + + TEST_F(CameraInputFixture, OrbitCameraInputCannotBeLeftInInvalidStateIfItCannotFullyBeginAfterInputChannelBegin) + { + HandleEventAndUpdate(AzFramework::DiscreteInputEvent{ m_translateCameraInputChannelIds.m_forwardChannelId, + AzFramework::InputChannel::State::Began }); + + HandleEventAndUpdate(AzFramework::DiscreteInputEvent{ m_orbitChannelId, AzFramework::InputChannel::State::Began }); + + using ::testing::IsFalse; + using ::testing::IsTrue; + EXPECT_THAT(m_orbitCamera->Beginning(), IsFalse()); + EXPECT_THAT(m_orbitCamera->Idle(), IsTrue()); + } + + TEST_F(CameraInputFixture, OrbitCameraInputCannotBeLeftInInvalidStateIfItCannotFullyBeginAfterInputChannelBeginAndEnd) + { + HandleEventAndUpdate(AzFramework::DiscreteInputEvent{ m_translateCameraInputChannelIds.m_forwardChannelId, + AzFramework::InputChannel::State::Began }); + + HandleEventAndUpdate(AzFramework::DiscreteInputEvent{ m_orbitChannelId, AzFramework::InputChannel::State::Began }); + HandleEventAndUpdate(AzFramework::DiscreteInputEvent{ m_orbitChannelId, AzFramework::InputChannel::State::Ended }); + + using ::testing::IsFalse; + using ::testing::IsTrue; + EXPECT_THAT(m_orbitCamera->Ending(), IsFalse()); + EXPECT_THAT(m_orbitCamera->Idle(), IsTrue()); + } } // namespace UnitTest diff --git a/Code/Framework/AzFramework/Tests/CameraState.cpp b/Code/Framework/AzFramework/Tests/CameraState.cpp index 70fa8be89a..1f35d5a06c 100644 --- a/Code/Framework/AzFramework/Tests/CameraState.cpp +++ b/Code/Framework/AzFramework/Tests/CameraState.cpp @@ -11,6 +11,7 @@ #include #include #include +#include #include namespace UnitTest @@ -51,22 +52,6 @@ namespace UnitTest { }; - // Taken from Atom::MatrixUtils for testing purposes, this can be removed if MakePerspectiveFovMatrixRH makes it into AZ - static AZ::Matrix4x4 MakePerspectiveMatrixRH(float fovY, float aspectRatio, float nearClip, float farClip) - { - float sinFov, cosFov; - AZ::SinCos(0.5f * fovY, sinFov, cosFov); - float yScale = cosFov / sinFov; //cot(fovY/2) - float xScale = yScale / aspectRatio; - - AZ::Matrix4x4 out; - out.SetRow(0, xScale, 0.f, 0.f, 0.f ); - out.SetRow(1, 0.f, yScale, 0.f, 0.f ); - out.SetRow(2, 0.f, 0.f, farClip / (nearClip - farClip), nearClip*farClip / (nearClip - farClip) ); - out.SetRow(3, 0.f, 0.f, -1.f, 0.f ); - return out; - } - TEST_P(Translation, Permutation) { // Given a position @@ -176,7 +161,8 @@ namespace UnitTest { auto [fovY, aspectRatio, nearClip, farClip] = GetParam(); - AZ::Matrix4x4 clipFromView = MakePerspectiveMatrixRH(fovY, aspectRatio, nearClip, farClip); + AZ::Matrix4x4 clipFromView; + MakePerspectiveFovMatrixRH(clipFromView, fovY, aspectRatio, nearClip, farClip); AzFramework::SetCameraClippingVolumeFromPerspectiveFovMatrixRH(m_cameraState, clipFromView); diff --git a/Code/Framework/AzFramework/Tests/ClickDetectorTests.cpp b/Code/Framework/AzFramework/Tests/ClickDetectorTests.cpp index 45bac2770e..62852c9b87 100644 --- a/Code/Framework/AzFramework/Tests/ClickDetectorTests.cpp +++ b/Code/Framework/AzFramework/Tests/ClickDetectorTests.cpp @@ -144,12 +144,45 @@ namespace UnitTest { using ::testing::Eq; - const ClickDetector::ClickOutcome downOutcome = - m_clickDetector.DetectClick(ClickDetector::ClickEvent::Down, ScreenVector(0, 0)); - const ClickDetector::ClickOutcome upOutcome = - m_clickDetector.DetectClick(ClickDetector::ClickEvent::Up, ScreenVector(50, 50)); + const ClickDetector::ClickOutcome downOutcome = m_clickDetector.DetectClick(ClickDetector::ClickEvent::Down, ScreenVector(0, 0)); + const ClickDetector::ClickOutcome upOutcome = m_clickDetector.DetectClick(ClickDetector::ClickEvent::Up, ScreenVector(50, 50)); EXPECT_THAT(downOutcome, Eq(ClickDetector::ClickOutcome::Nil)); EXPECT_THAT(upOutcome, Eq(ClickDetector::ClickOutcome::Release)); } + + //! note: ClickDetector does not explicitly return double clicks but if one occurs the ClickOutcome will be Nil + TEST_F(ClickDetectorFixture, DoubleClickIsRegisteredIfMouseDeltaHasMovedLessThanDeadzoneInClickInterval) + { + using ::testing::Eq; + + const ClickDetector::ClickOutcome firstDownOutcome = + m_clickDetector.DetectClick(ClickDetector::ClickEvent::Down, ScreenVector(0, 0)); + const ClickDetector::ClickOutcome firstUpOutcome = m_clickDetector.DetectClick(ClickDetector::ClickEvent::Up, ScreenVector(0, 0)); + const ClickDetector::ClickOutcome secondDownOutcome = + m_clickDetector.DetectClick(ClickDetector::ClickEvent::Down, ScreenVector(0, 0)); + const ClickDetector::ClickOutcome secondUpOutcome = m_clickDetector.DetectClick(ClickDetector::ClickEvent::Up, ScreenVector(0, 0)); + + EXPECT_THAT(firstDownOutcome, Eq(ClickDetector::ClickOutcome::Nil)); + EXPECT_THAT(firstUpOutcome, Eq(ClickDetector::ClickOutcome::Click)); + EXPECT_THAT(secondDownOutcome, Eq(ClickDetector::ClickOutcome::Nil)); + EXPECT_THAT(secondUpOutcome, Eq(ClickDetector::ClickOutcome::Nil)); + } + + TEST_F(ClickDetectorFixture, DoubleClickIsNotRegisteredIfMouseDeltaHasMovedMoreThanDeadzoneInClickInterval) + { + using ::testing::Eq; + + const ClickDetector::ClickOutcome firstDownOutcome = + m_clickDetector.DetectClick(ClickDetector::ClickEvent::Down, ScreenVector(0, 0)); + const ClickDetector::ClickOutcome firstUpOutcome = m_clickDetector.DetectClick(ClickDetector::ClickEvent::Up, ScreenVector(0, 0)); + const ClickDetector::ClickOutcome secondDownOutcome = + m_clickDetector.DetectClick(ClickDetector::ClickEvent::Down, ScreenVector(10, 10)); + const ClickDetector::ClickOutcome secondUpOutcome = m_clickDetector.DetectClick(ClickDetector::ClickEvent::Up, ScreenVector(0, 0)); + + EXPECT_THAT(firstDownOutcome, Eq(ClickDetector::ClickOutcome::Nil)); + EXPECT_THAT(firstUpOutcome, Eq(ClickDetector::ClickOutcome::Click)); + EXPECT_THAT(secondDownOutcome, Eq(ClickDetector::ClickOutcome::Nil)); + EXPECT_THAT(secondUpOutcome, Eq(ClickDetector::ClickOutcome::Click)); + } } // namespace UnitTest diff --git a/Code/Framework/AzFramework/Tests/CursorStateTests.cpp b/Code/Framework/AzFramework/Tests/CursorStateTests.cpp index 923cd02a10..fe15580dad 100644 --- a/Code/Framework/AzFramework/Tests/CursorStateTests.cpp +++ b/Code/Framework/AzFramework/Tests/CursorStateTests.cpp @@ -8,12 +8,13 @@ #include #include +#include namespace UnitTest { using AzFramework::CursorState; - using AzFramework::ScreenVector; using AzFramework::ScreenPoint; + using AzFramework::ScreenVector; class CursorStateFixture : public ::testing::Test { diff --git a/Code/Framework/AzFramework/Tests/EntityContext.cpp b/Code/Framework/AzFramework/Tests/EntityContext.cpp index 74a4948e04..520067a9a6 100644 --- a/Code/Framework/AzFramework/Tests/EntityContext.cpp +++ b/Code/Framework/AzFramework/Tests/EntityContext.cpp @@ -58,7 +58,6 @@ namespace UnitTest ComponentApplication app; ComponentApplication::Descriptor desc; desc.m_useExistingAllocator = true; - desc.m_enableDrilling = false; // we already created a memory driller for the test (AllocatorsFixture) app.Create(desc); Data::AssetManager::Instance().RegisterHandler(aznew SliceAssetHandler(app.GetSerializeContext()), AZ::AzTypeInfo::Uuid()); diff --git a/Code/Framework/AzFramework/Tests/FileTagTests.cpp b/Code/Framework/AzFramework/Tests/FileTagTests.cpp index 2b09a5638c..5005ab6ef9 100644 --- a/Code/Framework/AzFramework/Tests/FileTagTests.cpp +++ b/Code/Framework/AzFramework/Tests/FileTagTests.cpp @@ -83,7 +83,6 @@ namespace UnitTest m_data = AZStd::make_unique(); using namespace AzFramework::FileTag; AZ::ComponentApplication::Descriptor desc; - desc.m_enableDrilling = false; m_data->m_application.Start(desc); const char* testAssetRoot = m_tempDirectory.GetDirectory(); diff --git a/Code/Framework/AzFramework/Tests/InputTests.cpp b/Code/Framework/AzFramework/Tests/InputTests.cpp index 9942912622..31558250b5 100644 --- a/Code/Framework/AzFramework/Tests/InputTests.cpp +++ b/Code/Framework/AzFramework/Tests/InputTests.cpp @@ -29,6 +29,13 @@ namespace InputUnitTests //////////////////////////////////////////////////////////////////////////////////////////////// class InputTest : public ScopedAllocatorSetupFixture { + public: + InputTest() : ScopedAllocatorSetupFixture() + { + // Many input tests are only valid if the GamePad device is supported on this platform. + m_gamepadSupported = InputDeviceGamepad::GetMaxSupportedGamepads() > 0; + } + protected: //////////////////////////////////////////////////////////////////////////////////////////// void SetUp() override @@ -46,8 +53,27 @@ namespace InputUnitTests //////////////////////////////////////////////////////////////////////////////////////////// AZStd::unique_ptr m_inputSystemComponent; + bool m_gamepadSupported; }; + //////////////////////////////////////////////////////////////////////////////////////////////// + TEST_F(InputTest, InputChannelId_ConstExpression_CopyConstructorSuccessfull) + { + constexpr InputChannelId testInputChannelId1("TestInputChannelId"); + constexpr InputChannelId testInputChannelId2(testInputChannelId1); + static_assert(testInputChannelId1 == testInputChannelId2); + EXPECT_EQ(testInputChannelId1, testInputChannelId2); + } + + //////////////////////////////////////////////////////////////////////////////////////////////// + TEST_F(InputTest, InputDeviceId_ConstExpression_CopyConstructorSuccessfull) + { + constexpr InputDeviceId testInputDeviceId1("TestInputDeviceId"); + constexpr InputDeviceId testInputDeviceId2(testInputDeviceId1); + static_assert(testInputDeviceId1 == testInputDeviceId2); + EXPECT_EQ(testInputDeviceId1, testInputDeviceId2); + } + //////////////////////////////////////////////////////////////////////////////////////////////// TEST_F(InputTest, InputContext_InitWithDataStruct_InitializationSuccessfull) { @@ -60,12 +86,17 @@ namespace InputUnitTests } //////////////////////////////////////////////////////////////////////////////////////////////// -#if AZ_TRAIT_DISABLE_FAILED_INPUT_TESTS - TEST_F(InputTest, DISABLED_InputContext_ActivateDeactivate_Successfull) -#else TEST_F(InputTest, InputContext_ActivateDeactivate_Successfull) -#endif // AZ_TRAIT_DISABLE_FAILED_INPUT_TESTS { + if (!m_gamepadSupported) + { + #if defined(GTEST_SKIP) + GTEST_SKIP() << "Skipping test InputContext_ActivateDeactivate_Successfull"; + #else + SUCCEED() << "Skipping test InputContext_ActivateDeactivate_Successfull"; + #endif + return; + } // Create an input context (they are inactive by default). InputContext inputContext("TestInputContext"); @@ -130,12 +161,18 @@ namespace InputUnitTests } //////////////////////////////////////////////////////////////////////////////////////////////// -#if AZ_TRAIT_DISABLE_FAILED_INPUT_TESTS - TEST_F(InputTest, DISABLED_InputContext_AddRemoveInputMapping_Successfull) -#else TEST_F(InputTest, InputContext_AddRemoveInputMapping_Successfull) -#endif // AZ_TRAIT_DISABLE_FAILED_INPUT_TESTS { + if (!m_gamepadSupported) + { + #if defined(GTEST_SKIP) + GTEST_SKIP() << "Skipping test InputContext_AddRemoveInputMapping_Successfull"; + #else + SUCCEED() << "Skipping test InputContext_AddRemoveInputMapping_Successfull"; + #endif + return; + } + // Create an input context and activate it. InputContext inputContext("TestInputContext"); inputContext.Activate(); @@ -238,12 +275,18 @@ namespace InputUnitTests } //////////////////////////////////////////////////////////////////////////////////////////////// -#if AZ_TRAIT_DISABLE_FAILED_INPUT_TESTS - TEST_F(InputTest, DISABLED_InputContext_ConsumeProcessedInput_Consumed) -#else TEST_F(InputTest, InputContext_ConsumeProcessedInput_Consumed) -#endif // AZ_TRAIT_DISABLE_FAILED_INPUT_TESTS { + if (!m_gamepadSupported) + { + #if defined(GTEST_SKIP) + GTEST_SKIP() << "Skipping test InputContext_ConsumeProcessedInput_Consumed"; + #else + SUCCEED() << "Skipping test InputContext_ConsumeProcessedInput_Consumed"; + #endif + return; + } + InputContext::InitData initData; // Create a high priority input context that consumes input processed by any of its mappings. @@ -322,12 +365,18 @@ namespace InputUnitTests } //////////////////////////////////////////////////////////////////////////////////////////////// -#if AZ_TRAIT_DISABLE_FAILED_INPUT_TESTS - TEST_F(InputTest, DISABLED_InputContext_FilteredInput_Mapped) -#else TEST_F(InputTest, InputContext_FilteredInput_Mapped) -#endif // AZ_TRAIT_DISABLE_FAILED_INPUT_TESTS { + if (!m_gamepadSupported) + { + #if defined(GTEST_SKIP) + GTEST_SKIP() << "Skipping test InputContext_FilteredInput_Mapped"; + #else + SUCCEED() << "Skipping test InputContext_FilteredInput_Mapped"; + #endif + return; + } + // Create an input context that initially only listens for keyboard input. InputContext::InitData initData; initData.autoActivate = true; @@ -395,12 +444,18 @@ namespace InputUnitTests } //////////////////////////////////////////////////////////////////////////////////////////////// -#if AZ_TRAIT_DISABLE_FAILED_INPUT_TESTS - TEST_F(InputTest, DISABLED_InputMappingOr_AddRemoveSourceInput_Successful) -#else TEST_F(InputTest, InputMappingOr_AddRemoveSourceInput_Successful) -#endif // AZ_TRAIT_DISABLE_FAILED_INPUT_TESTS { + if (!m_gamepadSupported) + { + #if defined(GTEST_SKIP) + GTEST_SKIP() << "Skipping test InputMappingOr_AddRemoveSourceInput_Successful"; + #else + SUCCEED() << "Skipping test InputMappingOr_AddRemoveSourceInput_Successful"; + #endif + return; + } + // Create an input context and activate it. InputContext inputContext("TestInputContext"); inputContext.Activate(); @@ -473,12 +528,18 @@ namespace InputUnitTests } //////////////////////////////////////////////////////////////////////////////////////////////// -#if AZ_TRAIT_DISABLE_FAILED_INPUT_TESTS - TEST_F(InputTest, DISABLED_InputMappingOr_SingleSourceInput_Mapped) -#else TEST_F(InputTest, InputMappingOr_SingleSourceInput_Mapped) -#endif // AZ_TRAIT_DISABLE_FAILED_INPUT_TESTS { + if (!m_gamepadSupported) + { + #if defined(GTEST_SKIP) + GTEST_SKIP() << "Skipping test InputMappingOr_SingleSourceInput_Mapped"; + #else + SUCCEED() << "Skipping test InputMappingOr_SingleSourceInput_Mapped"; + #endif + return; + } + // Create an input context and activate it. InputContext inputContext("TestInputContext"); inputContext.Activate(); @@ -540,12 +601,18 @@ namespace InputUnitTests } //////////////////////////////////////////////////////////////////////////////////////////////// -#if AZ_TRAIT_DISABLE_FAILED_INPUT_TESTS - TEST_F(InputTest, DISABLED_InputMappingOr_MultipleSourceInputs_Mapped) -#else TEST_F(InputTest, InputMappingOr_MultipleSourceInputs_Mapped) -#endif // AZ_TRAIT_DISABLE_FAILED_INPUT_TESTS { + if (!m_gamepadSupported) + { + #if defined(GTEST_SKIP) + GTEST_SKIP() << "Skipping test InputMappingOr_MultipleSourceInputs_Mapped"; + #else + SUCCEED() << "Skipping test InputMappingOr_MultipleSourceInputs_Mapped"; + #endif + return; + } + // Create an input context and activate it. InputContext inputContext("TestInputContext"); inputContext.Activate(); @@ -632,12 +699,18 @@ namespace InputUnitTests } //////////////////////////////////////////////////////////////////////////////////////////////// -#if AZ_TRAIT_DISABLE_FAILED_INPUT_TESTS - TEST_F(InputTest, DISABLED_InputMappingAnd_AddRemoveSourceInput_Successful) -#else TEST_F(InputTest, InputMappingAnd_AddRemoveSourceInput_Successful) -#endif // AZ_TRAIT_DISABLE_FAILED_INPUT_TESTS { + if (!m_gamepadSupported) + { + #if defined(GTEST_SKIP) + GTEST_SKIP() << "Skipping test InputMappingAnd_AddRemoveSourceInput_Successful"; + #else + SUCCEED() << "Skipping test InputMappingAnd_AddRemoveSourceInput_Successful"; + #endif + return; + } + // Create an input context and activate it. InputContext inputContext("TestInputContext"); inputContext.Activate(); @@ -710,12 +783,18 @@ namespace InputUnitTests } //////////////////////////////////////////////////////////////////////////////////////////////// -#if AZ_TRAIT_DISABLE_FAILED_INPUT_TESTS - TEST_F(InputTest, DISABLED_InputMappingAnd_SingleSourceInput_Mapped) -#else TEST_F(InputTest, InputMappingAnd_SingleSourceInput_Mapped) -#endif // AZ_TRAIT_DISABLE_FAILED_INPUT_TESTS { + if (!m_gamepadSupported) + { + #if defined(GTEST_SKIP) + GTEST_SKIP() << "Skipping test InputMappingAnd_SingleSourceInput_Mapped"; + #else + SUCCEED() << "Skipping test InputMappingAnd_SingleSourceInput_Mapped"; + #endif + return; + } + // Create an input context and activate it. InputContext inputContext("TestInputContext"); inputContext.Activate(); @@ -777,12 +856,18 @@ namespace InputUnitTests } //////////////////////////////////////////////////////////////////////////////////////////////// -#if AZ_TRAIT_DISABLE_FAILED_INPUT_TESTS - TEST_F(InputTest, DISABLED_InputMappingAnd_MultipleSourceInputs_Mapped) -#else TEST_F(InputTest, InputMappingAnd_MultipleSourceInputs_Mapped) -#endif // AZ_TRAIT_DISABLE_FAILED_INPUT_TESTS { + if (!m_gamepadSupported) + { + #if defined(GTEST_SKIP) + GTEST_SKIP() << "Skipping test InputMappingAnd_MultipleSourceInputs_Mapped"; + #else + SUCCEED() << "Skipping test InputMappingAnd_MultipleSourceInputs_Mapped"; + #endif + return; + } + // Create an input context and activate it. InputContext inputContext("TestInputContext"); inputContext.Activate(); @@ -891,12 +976,18 @@ namespace InputUnitTests } //////////////////////////////////////////////////////////////////////////////////////////////// -#if AZ_TRAIT_DISABLE_FAILED_INPUT_TESTS - TEST_F(InputTest, DISABLED_InputMappingAnd_MultipleSourceInputsWithDifferentValues_ValuesAveraged) -#else TEST_F(InputTest, InputMappingAnd_MultipleSourceInputsWithDifferentValues_ValuesAveraged) -#endif // AZ_TRAIT_DISABLE_FAILED_INPUT_TESTS { + if (!m_gamepadSupported) + { + #if defined(GTEST_SKIP) + GTEST_SKIP() << "Skipping test InputMappingAnd_MultipleSourceInputsWithDifferentValues_ValuesAveraged"; + #else + SUCCEED() << "Skipping test InputMappingAnd_MultipleSourceInputsWithDifferentValues_ValuesAveraged"; + #endif + return; + } + // Create an input context and activate it. InputContext inputContext("TestInputContext"); inputContext.Activate(); @@ -951,12 +1042,18 @@ namespace InputUnitTests } //////////////////////////////////////////////////////////////////////////////////////////////// -#if AZ_TRAIT_DISABLE_FAILED_INPUT_TESTS - TEST_F(InputTest, DISABLED_InputMappingAnd_MultipleSourceInputsFromTheSameInputDeviceTypeWithDifferentIndicies_NotMapped) -#else TEST_F(InputTest, InputMappingAnd_MultipleSourceInputsFromTheSameInputDeviceTypeWithDifferentIndicies_NotMapped) -#endif // AZ_TRAIT_DISABLE_FAILED_INPUT_TESTS { + if (!m_gamepadSupported) + { + #if defined(GTEST_SKIP) + GTEST_SKIP() << "Skipping test InputMappingAnd_MultipleSourceInputsFromTheSameInputDeviceTypeWithDifferentIndicies_NotMapped"; + #else + SUCCEED() << "Skipping test InputMappingAnd_MultipleSourceInputsFromTheSameInputDeviceTypeWithDifferentIndicies_NotMapped"; + #endif + return; + } + // Create an input context and activate it. InputContext inputContext("TestInputContext"); inputContext.Activate(); diff --git a/Code/Framework/AzFramework/Tests/Mocks/MockSpawnableEntitiesInterface.h b/Code/Framework/AzFramework/Tests/Mocks/MockSpawnableEntitiesInterface.h index a437545adf..4d04fa5bc9 100644 --- a/Code/Framework/AzFramework/Tests/Mocks/MockSpawnableEntitiesInterface.h +++ b/Code/Framework/AzFramework/Tests/Mocks/MockSpawnableEntitiesInterface.h @@ -36,7 +36,7 @@ namespace AzFramework MOCK_METHOD3( SpawnEntities, - void(EntitySpawnTicket& ticket, AZStd::vector entityIndices, SpawnEntitiesOptionalArgs optionalArgs)); + void(EntitySpawnTicket& ticket, AZStd::vector entityIndices, SpawnEntitiesOptionalArgs optionalArgs)); MOCK_METHOD2(DespawnAllEntities, void(EntitySpawnTicket& ticket, DespawnAllEntitiesOptionalArgs optionalArgs)); @@ -49,6 +49,13 @@ namespace AzFramework ReloadSpawnable, void(EntitySpawnTicket& ticket, AZ::Data::Asset spawnable, ReloadSpawnableOptionalArgs optionalArgs)); + MOCK_METHOD3( + UpdateEntityAliasTypes, + void( + EntitySpawnTicket& ticket, + AZStd::vector updatedAliases, + UpdateEntityAliasTypesOptionalArgs optionalArgs)); + MOCK_METHOD3( ListEntities, void(EntitySpawnTicket& ticket, ListEntitiesCallback listCallback, ListEntitiesOptionalArgs optionalArgs)); @@ -61,6 +68,7 @@ namespace AzFramework void(EntitySpawnTicket& ticket, ClaimEntitiesCallback listCallback, ClaimEntitiesOptionalArgs optionalArgs)); MOCK_METHOD3(Barrier, void(EntitySpawnTicket& ticket, BarrierCallback completionCallback, BarrierOptionalArgs optionalArgs)); + MOCK_METHOD3(LoadBarrier, void(EntitySpawnTicket& ticket, BarrierCallback completionCallback, LoadBarrierOptionalArgs optionalArgs)); MOCK_METHOD1(CreateTicket, AZStd::pair(AZ::Data::Asset&& spawnable)); MOCK_METHOD1(DestroyTicket, void(void* ticket)); diff --git a/Code/Framework/AzFramework/Tests/Mocks/MockWindowRequests.h b/Code/Framework/AzFramework/Tests/Mocks/MockWindowRequests.h index 63f73d0b28..a166df19b4 100644 --- a/Code/Framework/AzFramework/Tests/Mocks/MockWindowRequests.h +++ b/Code/Framework/AzFramework/Tests/Mocks/MockWindowRequests.h @@ -36,6 +36,7 @@ namespace UnitTest MOCK_METHOD0(ToggleFullScreenState, void()); MOCK_CONST_METHOD0(GetDpiScaleFactor, float()); MOCK_CONST_METHOD0(GetSyncInterval, uint32_t()); + MOCK_METHOD1(SetSyncInterval, bool(uint32_t)); MOCK_CONST_METHOD0(GetDisplayRefreshRate, uint32_t()); }; } // namespace UnitTest diff --git a/Code/Framework/AzFramework/Tests/Mocks/Terrain/MockTerrainDataRequestBus.h b/Code/Framework/AzFramework/Tests/Mocks/Terrain/MockTerrainDataRequestBus.h new file mode 100644 index 0000000000..dbce11d639 --- /dev/null +++ b/Code/Framework/AzFramework/Tests/Mocks/Terrain/MockTerrainDataRequestBus.h @@ -0,0 +1,80 @@ +/* + * Copyright (c) Contributors to the Open 3D Engine Project. + * For complete copyright and license terms please see the LICENSE at the root of this distribution. + * + * SPDX-License-Identifier: Apache-2.0 OR MIT + * + */ +#pragma once + +#include + +#include +#include +#include +#include + +namespace UnitTest +{ + class MockTerrainDataNotificationListener : public AzFramework::Terrain::TerrainDataNotificationBus::Handler + { + public: + MockTerrainDataNotificationListener() + { + AzFramework::Terrain::TerrainDataNotificationBus::Handler::BusConnect(); + } + + ~MockTerrainDataNotificationListener() + { + AzFramework::Terrain::TerrainDataNotificationBus::Handler::BusDisconnect(); + } + + MOCK_METHOD0(OnTerrainDataCreateBegin, void()); + MOCK_METHOD0(OnTerrainDataCreateEnd, void()); + MOCK_METHOD0(OnTerrainDataDestroyBegin, void()); + MOCK_METHOD0(OnTerrainDataDestroyEnd, void()); + MOCK_METHOD2(OnTerrainDataChanged, void(const AZ::Aabb& dirtyRegion, TerrainDataChangedMask dataChangedMask)); + }; + + class MockTerrainDataRequests : public AzFramework::Terrain::TerrainDataRequestBus::Handler + { + public: + MockTerrainDataRequests() + { + AzFramework::Terrain::TerrainDataRequestBus::Handler::BusConnect(); + } + + ~MockTerrainDataRequests() + { + AzFramework::Terrain::TerrainDataRequestBus::Handler::BusDisconnect(); + } + + MOCK_CONST_METHOD0(GetTerrainHeightQueryResolution, AZ::Vector2()); + MOCK_METHOD1(SetTerrainHeightQueryResolution, void(AZ::Vector2)); + MOCK_CONST_METHOD0(GetTerrainAabb, AZ::Aabb()); + MOCK_METHOD1(SetTerrainAabb, void(const AZ::Aabb&)); + MOCK_CONST_METHOD3(GetHeight, float(const AZ::Vector3&, Sampler, bool*)); + MOCK_CONST_METHOD3(GetHeightFromVector2, float(const AZ::Vector2&, Sampler, bool*)); + MOCK_CONST_METHOD4(GetHeightFromFloats, float(float, float, Sampler, bool*)); + MOCK_CONST_METHOD2(GetIsHole, bool(const AZ::Vector3&, Sampler)); + MOCK_CONST_METHOD2(GetIsHoleFromVector2, bool(const AZ::Vector2&, Sampler)); + MOCK_CONST_METHOD3(GetIsHoleFromFloats, bool(float, float, Sampler)); + MOCK_CONST_METHOD3(GetNormal, AZ::Vector3(const AZ::Vector3&, Sampler, bool*)); + MOCK_CONST_METHOD3(GetNormalFromVector2, AZ::Vector3(const AZ::Vector2&, Sampler, bool*)); + MOCK_CONST_METHOD4(GetNormalFromFloats, AZ::Vector3(float, float, Sampler, bool*)); + MOCK_CONST_METHOD3(GetMaxSurfaceWeight, AzFramework::SurfaceData::SurfaceTagWeight(const AZ::Vector3&, Sampler, bool*)); + MOCK_CONST_METHOD3(GetMaxSurfaceWeightFromVector2, AzFramework::SurfaceData::SurfaceTagWeight(const AZ::Vector2&, Sampler, bool*)); + MOCK_CONST_METHOD4(GetMaxSurfaceWeightFromFloats, AzFramework::SurfaceData::SurfaceTagWeight(float, float, Sampler, bool*)); + MOCK_CONST_METHOD4(GetSurfaceWeights, void(const AZ::Vector3&, AzFramework::SurfaceData::SurfaceTagWeightList&, Sampler, bool*)); + MOCK_CONST_METHOD4( + GetSurfaceWeightsFromVector2, void(const AZ::Vector2&, AzFramework::SurfaceData::SurfaceTagWeightList&, Sampler, bool*)); + MOCK_CONST_METHOD5( + GetSurfaceWeightsFromFloats, void(float, float, AzFramework::SurfaceData::SurfaceTagWeightList&, Sampler, bool*)); + MOCK_CONST_METHOD3(GetMaxSurfaceName, const char*(const AZ::Vector3&, Sampler, bool*)); + MOCK_CONST_METHOD4(GetSurfacePoint, void(const AZ::Vector3&, AzFramework::SurfaceData::SurfacePoint&, Sampler, bool*)); + MOCK_CONST_METHOD4( + GetSurfacePointFromVector2, void(const AZ::Vector2&, AzFramework::SurfaceData::SurfacePoint&, Sampler, bool*)); + MOCK_CONST_METHOD5( + GetSurfacePointFromFloats, void(float, float, AzFramework::SurfaceData::SurfacePoint&, Sampler, bool*)); + }; +} // namespace UnitTest diff --git a/Code/Framework/AzFramework/Tests/Platform/Common/Xcb/Actions.h b/Code/Framework/AzFramework/Tests/Platform/Common/Xcb/Actions.h index 1650ff4f8d..e86904efa3 100644 --- a/Code/Framework/AzFramework/Tests/Platform/Common/Xcb/Actions.h +++ b/Code/Framework/AzFramework/Tests/Platform/Common/Xcb/Actions.h @@ -11,6 +11,13 @@ #include #include +ACTION_TEMPLATE(ReturnMalloc, + HAS_1_TEMPLATE_PARAMS(typename, T), + AND_0_VALUE_PARAMS()) { + T* value = static_cast(malloc(sizeof(T))); + *value = T{}; + return value; +} ACTION_TEMPLATE(ReturnMalloc, HAS_1_TEMPLATE_PARAMS(typename, T), AND_1_VALUE_PARAMS(p0)) { @@ -25,3 +32,38 @@ ACTION_TEMPLATE(ReturnMalloc, *value = T{ p0, p1 }; return value; } +ACTION_TEMPLATE(ReturnMalloc, + HAS_1_TEMPLATE_PARAMS(typename, T), + AND_3_VALUE_PARAMS(p0, p1, p2)) { + T* value = static_cast(malloc(sizeof(T))); + *value = T{ p0, p1, p2 }; + return value; +} +ACTION_TEMPLATE(ReturnMalloc, + HAS_1_TEMPLATE_PARAMS(typename, T), + AND_4_VALUE_PARAMS(p0, p1, p2, p3)) { + T* value = static_cast(malloc(sizeof(T))); + *value = T{ p0, p1, p2, p3 }; + return value; +} +ACTION_TEMPLATE(ReturnMalloc, + HAS_1_TEMPLATE_PARAMS(typename, T), + AND_5_VALUE_PARAMS(p0, p1, p2, p3, p4)) { + T* value = static_cast(malloc(sizeof(T))); + *value = T{ p0, p1, p2, p3, p4 }; + return value; +} +ACTION_TEMPLATE(ReturnMalloc, + HAS_1_TEMPLATE_PARAMS(typename, T), + AND_6_VALUE_PARAMS(p0, p1, p2, p3, p4, p5)) { + T* value = static_cast(malloc(sizeof(T))); + *value = T{ p0, p1, p2, p3, p4, p5 }; + return value; +} +ACTION_TEMPLATE(ReturnMalloc, + HAS_1_TEMPLATE_PARAMS(typename, T), + AND_7_VALUE_PARAMS(p0, p1, p2, p3, p4, p5, p6)) { + T* value = static_cast(malloc(sizeof(T))); + *value = T{ p0, p1, p2, p3, p4, p5, p6 }; + return value; +} diff --git a/Code/Framework/AzFramework/Tests/Platform/Common/Xcb/MockXcbInterface.cpp b/Code/Framework/AzFramework/Tests/Platform/Common/Xcb/MockXcbInterface.cpp index b15809a4c6..a19642e388 100644 --- a/Code/Framework/AzFramework/Tests/Platform/Common/Xcb/MockXcbInterface.cpp +++ b/Code/Framework/AzFramework/Tests/Platform/Common/Xcb/MockXcbInterface.cpp @@ -32,6 +32,82 @@ xcb_generic_error_t* xcb_request_check(xcb_connection_t* c, xcb_void_cookie_t co { return MockXcbInterface::Instance()->xcb_request_check(c, cookie); } +const xcb_setup_t* xcb_get_setup(xcb_connection_t *c) +{ + return MockXcbInterface::Instance()->xcb_get_setup(c); +} +xcb_screen_iterator_t xcb_setup_roots_iterator(const xcb_setup_t* R) +{ + return MockXcbInterface::Instance()->xcb_setup_roots_iterator(R); +} +const xcb_query_extension_reply_t* xcb_get_extension_data(xcb_connection_t* c, xcb_extension_t* ext) +{ + return MockXcbInterface::Instance()->xcb_get_extension_data(c, ext); +} +int xcb_flush(xcb_connection_t *c) +{ + return MockXcbInterface::Instance()->xcb_flush(c); +} +xcb_query_pointer_cookie_t xcb_query_pointer(xcb_connection_t* c, xcb_window_t window) +{ + return MockXcbInterface::Instance()->xcb_query_pointer(c, window); +} +xcb_query_pointer_reply_t* xcb_query_pointer_reply(xcb_connection_t* c, xcb_query_pointer_cookie_t cookie, xcb_generic_error_t** e) +{ + return MockXcbInterface::Instance()->xcb_query_pointer_reply(c, cookie, e); +} +xcb_get_geometry_cookie_t xcb_get_geometry(xcb_connection_t* c, xcb_drawable_t drawable) +{ + return MockXcbInterface::Instance()->xcb_get_geometry(c, drawable); +} +xcb_get_geometry_reply_t* xcb_get_geometry_reply(xcb_connection_t* c, xcb_get_geometry_cookie_t cookie, xcb_generic_error_t** e) +{ + return MockXcbInterface::Instance()->xcb_get_geometry_reply(c, cookie, e); +} +xcb_void_cookie_t xcb_warp_pointer( + xcb_connection_t* c, + xcb_window_t src_window, + xcb_window_t dst_window, + int16_t src_x, + int16_t src_y, + uint16_t src_width, + uint16_t src_height, + int16_t dst_x, + int16_t dst_y) +{ + return MockXcbInterface::Instance()->xcb_warp_pointer(c, src_window, dst_window, src_x, src_y, src_width, src_height, dst_x, dst_y); +} +xcb_intern_atom_cookie_t xcb_intern_atom(xcb_connection_t* c, uint8_t only_if_exists, uint16_t name_len, const char* name) +{ + return MockXcbInterface::Instance()->xcb_intern_atom(c, only_if_exists, name_len, name); +} +xcb_intern_atom_reply_t* xcb_intern_atom_reply(xcb_connection_t* c, xcb_intern_atom_cookie_t cookie, xcb_generic_error_t** e) +{ + return MockXcbInterface::Instance()->xcb_intern_atom_reply(c, cookie, e); +} +xcb_get_property_cookie_t xcb_get_property( + xcb_connection_t* c, + uint8_t _delete, + xcb_window_t window, + xcb_atom_t property, + xcb_atom_t type, + uint32_t long_offset, + uint32_t long_length) +{ + return MockXcbInterface::Instance()->xcb_get_property(c, _delete, window, property, type, long_offset, long_length); +} +xcb_get_property_reply_t* xcb_get_property_reply(xcb_connection_t* c, xcb_get_property_cookie_t cookie, xcb_generic_error_t** e) +{ + return MockXcbInterface::Instance()->xcb_get_property_reply(c, cookie, e); +} +void* xcb_get_property_value(const xcb_get_property_reply_t* R) +{ + return MockXcbInterface::Instance()->xcb_get_property_value(R); +} +uint32_t xcb_generate_id(xcb_connection_t *c) +{ + return MockXcbInterface::Instance()->xcb_generate_id(c); +} // ---------------------------------------------------------------------------- // xcb-xkb @@ -116,4 +192,76 @@ xkb_state_component xkb_state_update_mask( state, depressed_mods, latched_mods, locked_mods, depressed_layout, latched_layout, locked_layout); } +// ---------------------------------------------------------------------------- +// xcb-xfixes +xcb_xfixes_query_version_cookie_t xcb_xfixes_query_version( + xcb_connection_t* c, uint32_t client_major_version, uint32_t client_minor_version) +{ + return MockXcbInterface::Instance()->xcb_xfixes_query_version(c, client_major_version, client_minor_version); +} +xcb_xfixes_query_version_reply_t* xcb_xfixes_query_version_reply( + xcb_connection_t* c, xcb_xfixes_query_version_cookie_t cookie, xcb_generic_error_t** e) +{ + return MockXcbInterface::Instance()->xcb_xfixes_query_version_reply(c, cookie, e); +} +xcb_void_cookie_t xcb_xfixes_show_cursor_checked(xcb_connection_t* c, xcb_window_t window) +{ + return MockXcbInterface::Instance()->xcb_xfixes_show_cursor_checked(c, window); +} +xcb_void_cookie_t xcb_xfixes_hide_cursor_checked(xcb_connection_t* c, xcb_window_t window) +{ + return MockXcbInterface::Instance()->xcb_xfixes_hide_cursor_checked(c, window); +} +xcb_void_cookie_t xcb_xfixes_delete_pointer_barrier_checked(xcb_connection_t* c, xcb_xfixes_barrier_t barrier) +{ + return MockXcbInterface::Instance()->xcb_xfixes_delete_pointer_barrier_checked(c, barrier); +} +xcb_translate_coordinates_cookie_t xcb_translate_coordinates(xcb_connection_t* c, xcb_window_t src_window, xcb_window_t dst_window, int16_t src_x, int16_t src_y) +{ + return MockXcbInterface::Instance()->xcb_translate_coordinates(c, src_window, dst_window, src_x, src_y); +} +xcb_translate_coordinates_reply_t* xcb_translate_coordinates_reply(xcb_connection_t* c, xcb_translate_coordinates_cookie_t cookie, xcb_generic_error_t** e) +{ + return MockXcbInterface::Instance()->xcb_translate_coordinates_reply(c, cookie, e); +} +xcb_void_cookie_t xcb_xfixes_create_pointer_barrier_checked( + xcb_connection_t* c, + xcb_xfixes_barrier_t barrier, + xcb_window_t window, + uint16_t x1, + uint16_t y1, + uint16_t x2, + uint16_t y2, + uint32_t directions, + uint16_t num_devices, + const uint16_t* devices) +{ + return MockXcbInterface::Instance()->xcb_xfixes_create_pointer_barrier_checked(c, barrier, window, x1, y1, x2, y2, directions, num_devices, devices); +} + +// ---------------------------------------------------------------------------- +// xcb-xinput +xcb_input_xi_query_version_cookie_t xcb_input_xi_query_version(xcb_connection_t* c, uint16_t major_version, uint16_t minor_version) +{ + return MockXcbInterface::Instance()->xcb_input_xi_query_version(c, major_version, minor_version); +} +xcb_input_xi_query_version_reply_t* xcb_input_xi_query_version_reply( + xcb_connection_t* c, xcb_input_xi_query_version_cookie_t cookie, xcb_generic_error_t** e) +{ + return MockXcbInterface::Instance()->xcb_input_xi_query_version_reply(c, cookie, e); +} +xcb_void_cookie_t xcb_input_xi_select_events( + xcb_connection_t* c, xcb_window_t window, uint16_t num_mask, const xcb_input_event_mask_t* masks) +{ + return MockXcbInterface::Instance()->xcb_input_xi_select_events(c, window, num_mask, masks); +} +int xcb_input_raw_button_press_axisvalues_length (const xcb_input_raw_button_press_event_t *R) +{ + return MockXcbInterface::Instance()->xcb_input_raw_button_press_axisvalues_length(R); +} +xcb_input_fp3232_t* xcb_input_raw_button_press_axisvalues_raw(const xcb_input_raw_button_press_event_t* R) +{ + return MockXcbInterface::Instance()->xcb_input_raw_button_press_axisvalues_raw(R); +} + } diff --git a/Code/Framework/AzFramework/Tests/Platform/Common/Xcb/MockXcbInterface.h b/Code/Framework/AzFramework/Tests/Platform/Common/Xcb/MockXcbInterface.h index b57751344e..c554993110 100644 --- a/Code/Framework/AzFramework/Tests/Platform/Common/Xcb/MockXcbInterface.h +++ b/Code/Framework/AzFramework/Tests/Platform/Common/Xcb/MockXcbInterface.h @@ -18,6 +18,8 @@ #undef explicit #include #include +#include +#include #include "Printers.h" @@ -62,6 +64,37 @@ public: MOCK_CONST_METHOD1(xcb_disconnect, void(xcb_connection_t* c)); MOCK_CONST_METHOD1(xcb_poll_for_event, xcb_generic_event_t*(xcb_connection_t* c)); MOCK_CONST_METHOD2(xcb_request_check, xcb_generic_error_t*(xcb_connection_t* c, xcb_void_cookie_t cookie)); + MOCK_CONST_METHOD1(xcb_get_setup, const xcb_setup_t*(xcb_connection_t *c)); + MOCK_CONST_METHOD1(xcb_setup_roots_iterator, xcb_screen_iterator_t(const xcb_setup_t* R)); + MOCK_CONST_METHOD2(xcb_get_extension_data, const xcb_query_extension_reply_t*(xcb_connection_t* c, xcb_extension_t* ext)); + MOCK_CONST_METHOD1(xcb_flush, int(xcb_connection_t *c)); + MOCK_CONST_METHOD2(xcb_query_pointer, xcb_query_pointer_cookie_t(xcb_connection_t* c, xcb_window_t window)); + MOCK_CONST_METHOD3(xcb_query_pointer_reply, xcb_query_pointer_reply_t*(xcb_connection_t* c, xcb_query_pointer_cookie_t cookie, xcb_generic_error_t** e)); + MOCK_CONST_METHOD2(xcb_get_geometry, xcb_get_geometry_cookie_t(xcb_connection_t* c, xcb_drawable_t drawable)); + MOCK_CONST_METHOD3(xcb_get_geometry_reply, xcb_get_geometry_reply_t*(xcb_connection_t* c, xcb_get_geometry_cookie_t cookie, xcb_generic_error_t** e)); + MOCK_CONST_METHOD9(xcb_warp_pointer, xcb_void_cookie_t( + xcb_connection_t* c, + xcb_window_t src_window, + xcb_window_t dst_window, + int16_t src_x, + int16_t src_y, + uint16_t src_width, + uint16_t src_height, + int16_t dst_x, + int16_t dst_y)); + MOCK_CONST_METHOD4(xcb_intern_atom, xcb_intern_atom_cookie_t(xcb_connection_t* c, uint8_t only_if_exists, uint16_t name_len, const char* name)); + MOCK_CONST_METHOD3(xcb_intern_atom_reply, xcb_intern_atom_reply_t*(xcb_connection_t* c, xcb_intern_atom_cookie_t cookie, xcb_generic_error_t** e)); + MOCK_CONST_METHOD7(xcb_get_property, xcb_get_property_cookie_t( + xcb_connection_t* c, + uint8_t _delete, + xcb_window_t window, + xcb_atom_t property, + xcb_atom_t type, + uint32_t long_offset, + uint32_t long_length)); + MOCK_CONST_METHOD3(xcb_get_property_reply, xcb_get_property_reply_t*(xcb_connection_t* c, xcb_get_property_cookie_t cookie, xcb_generic_error_t** e)); + MOCK_CONST_METHOD1(xcb_get_property_value, void*(const xcb_get_property_reply_t* R)); + MOCK_CONST_METHOD1(xcb_generate_id, uint32_t(xcb_connection_t *c)); // xcb-xkb MOCK_CONST_METHOD3(xcb_xkb_use_extension, xcb_xkb_use_extension_cookie_t(xcb_connection_t* c, uint16_t wantedMajor, uint16_t wantedMinor)); @@ -83,6 +116,33 @@ public: MOCK_CONST_METHOD4(xkb_state_key_get_utf8, int(xkb_state* state, xkb_keycode_t key, char* buffer, size_t size)); MOCK_CONST_METHOD7(xkb_state_update_mask, xkb_state_component(xkb_state* state, xkb_mod_mask_t depressed_mods, xkb_mod_mask_t latched_mods, xkb_mod_mask_t locked_mods, xkb_layout_index_t depressed_layout, xkb_layout_index_t latched_layout, xkb_layout_index_t locked_layout)); + // xcb-xfixes + MOCK_CONST_METHOD3(xcb_xfixes_query_version, xcb_xfixes_query_version_cookie_t(xcb_connection_t* c, uint32_t client_major_version, uint32_t client_minor_version)); + MOCK_CONST_METHOD3(xcb_xfixes_query_version_reply, xcb_xfixes_query_version_reply_t*(xcb_connection_t* c, xcb_xfixes_query_version_cookie_t cookie, xcb_generic_error_t** e)); + MOCK_CONST_METHOD2(xcb_xfixes_show_cursor_checked, xcb_void_cookie_t(xcb_connection_t* c, xcb_window_t window)); + MOCK_CONST_METHOD2(xcb_xfixes_hide_cursor_checked, xcb_void_cookie_t(xcb_connection_t* c, xcb_window_t window)); + MOCK_CONST_METHOD2(xcb_xfixes_delete_pointer_barrier_checked, xcb_void_cookie_t(xcb_connection_t* c, xcb_xfixes_barrier_t barrier)); + MOCK_CONST_METHOD5(xcb_translate_coordinates, xcb_translate_coordinates_cookie_t(xcb_connection_t* c, xcb_window_t src_window, xcb_window_t dst_window, int16_t src_x, int16_t src_y)); + MOCK_CONST_METHOD3(xcb_translate_coordinates_reply, xcb_translate_coordinates_reply_t*(xcb_connection_t* c, xcb_translate_coordinates_cookie_t cookie, xcb_generic_error_t** e)); + MOCK_CONST_METHOD10(xcb_xfixes_create_pointer_barrier_checked, xcb_void_cookie_t( + xcb_connection_t* c, + xcb_xfixes_barrier_t barrier, + xcb_window_t window, + uint16_t x1, + uint16_t y1, + uint16_t x2, + uint16_t y2, + uint32_t directions, + uint16_t num_devices, + const uint16_t* devices)); + + // xcb-xinput + MOCK_CONST_METHOD3(xcb_input_xi_query_version, xcb_input_xi_query_version_cookie_t(xcb_connection_t* c, uint16_t major_version, uint16_t minor_version)); + MOCK_CONST_METHOD3(xcb_input_xi_query_version_reply, xcb_input_xi_query_version_reply_t*(xcb_connection_t* c, xcb_input_xi_query_version_cookie_t cookie, xcb_generic_error_t** e)); + MOCK_CONST_METHOD4(xcb_input_xi_select_events, xcb_void_cookie_t(xcb_connection_t* c, xcb_window_t window, uint16_t num_mask, const xcb_input_event_mask_t* masks)); + MOCK_CONST_METHOD1(xcb_input_raw_button_press_axisvalues_length, int(const xcb_input_raw_button_press_event_t* R)); + MOCK_CONST_METHOD1(xcb_input_raw_button_press_axisvalues_raw, xcb_input_fp3232_t*(const xcb_input_raw_button_press_event_t* R)); + private: static inline MockXcbInterface* self = nullptr; }; diff --git a/Code/Framework/AzFramework/Tests/Platform/Common/Xcb/XcbBaseTestFixture.h b/Code/Framework/AzFramework/Tests/Platform/Common/Xcb/XcbBaseTestFixture.h index 8e9b008fc1..524df3e436 100644 --- a/Code/Framework/AzFramework/Tests/Platform/Common/Xcb/XcbBaseTestFixture.h +++ b/Code/Framework/AzFramework/Tests/Platform/Common/Xcb/XcbBaseTestFixture.h @@ -10,6 +10,7 @@ #include #include +#include #include "MockXcbInterface.h" @@ -17,11 +18,17 @@ namespace AzFramework { // Sets up mock behavior for the xcb library, providing an xcb_connection_t that is returned from a call to xcb_connect class XcbBaseTestFixture - : public testing::Test + : public ::UnitTest::ScopedAllocatorSetupFixture { public: void SetUp() override; + template + static xcb_generic_event_t MakeEvent(T event) + { + return *reinterpret_cast(&event); + } + protected: testing::NiceMock m_interface; xcb_connection_t m_connection{}; diff --git a/Code/Framework/AzFramework/Tests/Platform/Common/Xcb/XcbInputDeviceKeyboardTests.cpp b/Code/Framework/AzFramework/Tests/Platform/Common/Xcb/XcbInputDeviceKeyboardTests.cpp index 76d00eda50..7209875235 100644 --- a/Code/Framework/AzFramework/Tests/Platform/Common/Xcb/XcbInputDeviceKeyboardTests.cpp +++ b/Code/Framework/AzFramework/Tests/Platform/Common/Xcb/XcbInputDeviceKeyboardTests.cpp @@ -21,12 +21,6 @@ #include "XcbBaseTestFixture.h" #include "XcbTestApplication.h" -template -xcb_generic_event_t MakeEvent(T event) -{ - return *reinterpret_cast(&event); -} - namespace AzFramework { // Sets up default behavior for mock keyboard responses to xcb methods diff --git a/Code/Framework/AzFramework/Tests/Platform/Common/Xcb/XcbInputDeviceMouseTests.cpp b/Code/Framework/AzFramework/Tests/Platform/Common/Xcb/XcbInputDeviceMouseTests.cpp new file mode 100644 index 0000000000..05784462d7 --- /dev/null +++ b/Code/Framework/AzFramework/Tests/Platform/Common/Xcb/XcbInputDeviceMouseTests.cpp @@ -0,0 +1,545 @@ +/* + * Copyright (c) Contributors to the Open 3D Engine Project. + * For complete copyright and license terms please see the LICENSE at the root of this distribution. + * + * SPDX-License-Identifier: Apache-2.0 OR MIT + * + */ + +#include +#include + +#include + +#include +#include + +#include "XcbBaseTestFixture.h" +#include "XcbTestApplication.h" +#include "Matchers.h" +#include "Actions.h" + +namespace AzFramework +{ + // Sets up default behavior for mock keyboard responses to xcb methods + class XcbInputDeviceMouseTests + : public XcbBaseTestFixture + { + public: + void SetUp() override + { + using testing::Eq; + using testing::Field; + using testing::Return; + using testing::StrEq; + using testing::_; + + XcbBaseTestFixture::SetUp(); + + ON_CALL(m_interface, xcb_get_setup(&m_connection)) + .WillByDefault(Return(&s_xcbSetup)); + ON_CALL(m_interface, xcb_setup_roots_iterator(&s_xcbSetup)) + .WillByDefault(Return(xcb_screen_iterator_t{&s_xcbScreen})); + + ON_CALL(m_interface, xcb_get_extension_data(&m_connection, &xcb_xfixes_id)) + .WillByDefault(Return(&s_xfixesExtensionReply)); + ON_CALL(m_interface, xcb_xfixes_query_version_reply(&m_connection, _, _)) + .WillByDefault(ReturnMalloc( + /*response_type=*/(uint8_t)XCB_XFIXES_QUERY_VERSION, + /*pad0=*/(uint8_t)0, + /*sequence=*/(uint16_t)1, + /*length=*/0u, + /*major_version=*/5u, + /*minor_version=*/0u + )); + + ON_CALL(m_interface, xcb_get_extension_data(&m_connection, &xcb_input_id)) + .WillByDefault(Return(&s_xfixesExtensionReply)); + ON_CALL(m_interface, xcb_input_xi_query_version_reply(&m_connection, _, _)) + .WillByDefault(ReturnMalloc( + /*response_type=*/(uint8_t)XCB_INPUT_XI_QUERY_VERSION, + /*pad0=*/(uint8_t)0, + /*sequence=*/(uint16_t)1, + /*length=*/0u, + /*major_version=*/(uint16_t)2, + /*minor_version=*/(uint16_t)2 + )); + + // Set the default focus window + EXPECT_CALL(m_interface, xcb_intern_atom(&m_connection, 1, 18, StrEq("_NET_ACTIVE_WINDOW"))) + .WillRepeatedly(Return(xcb_intern_atom_cookie_t{/*.sequence=*/ 1})); + ON_CALL(m_interface, xcb_intern_atom_reply(&m_connection, Field(&xcb_intern_atom_cookie_t::sequence, Eq(1)), _)) + .WillByDefault(ReturnMalloc( + /*response_type=*/(uint8_t)XCB_INTERN_ATOM, + /*pad0=*/(uint8_t)0, + /*sequence=*/(uint16_t)1, + /*length=*/0u, + /*xcb_atom_t=*/s_netActiveWindowAtom + )); + ON_CALL(m_interface, xcb_get_property(&m_connection, 0, s_rootWindow, s_netActiveWindowAtom, XCB_ATOM_WINDOW, 0, 1)) + .WillByDefault(Return(xcb_get_property_cookie_t{/*.sequence=*/ s_getActiveWindowPropertySequence})); + ON_CALL(m_interface, xcb_get_property_reply(&m_connection, Field(&xcb_get_property_cookie_t::sequence, Eq(s_getActiveWindowPropertySequence)), _)) + .WillByDefault(ReturnMalloc( + /*response_type=*/(uint8_t)XCB_GET_PROPERTY, + /*format=*/(uint8_t)0, + /*sequence=*/(uint16_t)s_getActiveWindowPropertySequence, + /*length=*/0u, + /*type=*/XCB_ATOM_WINDOW, + /*bytes_after=*/0u, + /*value_len=*/1u + )); + ON_CALL(m_interface, xcb_get_property_value(Field(&xcb_get_property_reply_t::sequence, Eq(s_getActiveWindowPropertySequence)))) + .WillByDefault(Return(const_cast(&s_nullWindow))); + + ON_CALL(m_interface, xcb_get_geometry(&m_connection, _)) + .WillByDefault(Return(xcb_get_geometry_cookie_t{/*.sequence=*/1})); + ON_CALL(m_interface, xcb_get_geometry_reply(&m_connection, Field(&xcb_get_geometry_cookie_t::sequence, Eq(1)), _)) + .WillByDefault(ReturnMalloc(s_defaultWindowGeometry)); + } + + void PumpApplication() + { + m_application.PumpSystemEventLoopUntilEmpty(); + m_application.TickSystem(); + m_application.Tick(); + } + + protected: + static constexpr inline uint8_t s_xinputMajorOpcode = 131; + static constexpr inline xcb_window_t s_rootWindow = 1; + static constexpr inline xcb_window_t s_nullWindow = XCB_WINDOW_NONE; + static constexpr inline xcb_input_device_id_t s_virtualCorePointerId = 2; + static constexpr inline xcb_input_device_id_t s_physicalPointerDeviceId = 3; + static constexpr inline uint16_t s_screenWidthInPixels = 3840; + static constexpr inline uint16_t s_screenHeightInPixels = 2160; + static constexpr inline uint16_t s_getActiveWindowPropertySequence = 2160; + static constexpr inline xcb_atom_t s_netActiveWindowAtom = 1; + static constexpr inline xcb_setup_t s_xcbSetup{ + /*.status=*/1, + /*.pad0=*/0, + /*.protocol_major_version=*/11, + /*.protocol_minor_version=*/0, + }; + static inline xcb_screen_t s_xcbScreen{ + /*.root=*/s_rootWindow, + /*.default_colormap=*/32, + /*.white_pixel=*/16777215, + /*.black_pixel=*/0, + /*.current_input_masks=*/0, + /*.width_in_pixels=*/s_screenWidthInPixels, + /*.height_in_pixels=*/s_screenHeightInPixels, + /*.width_in_millimeters=*/602, + /*.height_in_millimeters=*/341, + }; + static constexpr inline xcb_query_extension_reply_t s_xfixesExtensionReply{ + /*.response_type=*/XCB_QUERY_EXTENSION, + /*.pad0=*/0, + /*.sequence=*/1, + /*.length=*/0, + /*.present=*/1, + }; + static constexpr inline xcb_query_extension_reply_t s_xinputExtensionReply{ + /*.response_type=*/XCB_QUERY_EXTENSION, + /*.pad0=*/0, + /*.sequence=*/1, + /*.length=*/0, + /*.present=*/1, + /*.major_opcode=*/s_xinputMajorOpcode, + }; + static constexpr inline xcb_get_geometry_reply_t s_defaultWindowGeometry{ + /*.response_type=*/XCB_GET_GEOMETRY, + /*.depth=*/0, + /*.sequence=*/1, + /*.length=*/0, + /*.root=*/s_rootWindow, + /*.x=*/100, + /*.y=*/100, + /*.width=*/100, + /*.height=*/100, + /*.border_width=*/3, + /*.pad0[2]=*/{}, + }; + XcbTestApplication m_application{ + /*enabledGamepadsCount=*/0, + /*keyboardEnabled=*/false, + /*motionEnabled=*/false, + /*mouseEnabled=*/true, + /*touchEnabled=*/false, + /*virtualKeyboardEnabled=*/false + }; + }; + + struct MouseButtonTestData + { + xcb_button_index_t m_button; + }; + + class XcbInputDeviceMouseButtonTests + : public XcbInputDeviceMouseTests + , public testing::WithParamInterface + { + public: + static InputChannelId GetInputChannelIdForButton(const xcb_button_index_t button) + { + switch (button) + { + case XCB_BUTTON_INDEX_1: + return InputDeviceMouse::Button::Left; + case XCB_BUTTON_INDEX_2: + return InputDeviceMouse::Button::Right; + case XCB_BUTTON_INDEX_3: + return InputDeviceMouse::Button::Middle; + } + return InputChannelId{}; + } + + AZStd::array GetIdleChannelIdsForButton(const xcb_button_index_t button) + { + switch (button) + { + case XCB_BUTTON_INDEX_1: + return { InputDeviceMouse::Button::Right, InputDeviceMouse::Button::Middle, InputDeviceMouse::Button::Other1, InputDeviceMouse::Button::Other2 }; + case XCB_BUTTON_INDEX_2: + return { InputDeviceMouse::Button::Left, InputDeviceMouse::Button::Middle, InputDeviceMouse::Button::Other1, InputDeviceMouse::Button::Other2 }; + case XCB_BUTTON_INDEX_3: + return { InputDeviceMouse::Button::Left, InputDeviceMouse::Button::Right, InputDeviceMouse::Button::Other1, InputDeviceMouse::Button::Other2 }; + case XCB_BUTTON_INDEX_4: + return { InputDeviceMouse::Button::Left, InputDeviceMouse::Button::Right, InputDeviceMouse::Button::Middle, InputDeviceMouse::Button::Other2 }; + case XCB_BUTTON_INDEX_5: + return { InputDeviceMouse::Button::Left, InputDeviceMouse::Button::Right, InputDeviceMouse::Button::Middle, InputDeviceMouse::Button::Other1 }; + } + return AZStd::array(); + } + }; + + TEST_P(XcbInputDeviceMouseButtonTests, ButtonInputChannelsUpdateStateFromXcbEvents) + { + using testing::Each; + using testing::Eq; + using testing::NotNull; + using testing::Property; + using testing::Return; + + // Set the expectations for the events that will be generated + // nullptr entries represent when the event queue is empty, and will cause + // PumpSystemEventLoopUntilEmpty to return + // + // Event pointers are freed by the calling code, so these actions + // malloc new copies + // + // The xcb mouse does not react to the `XCB_BUTTON_PRESS` / + // `XCB_BUTTON_RELEASE` events, but it will still receive those events + // from the X server. + EXPECT_CALL(m_interface, xcb_poll_for_event(&m_connection)) + .WillOnce(ReturnMalloc(MakeEvent(xcb_input_raw_button_press_event_t{ + /*response_type=*/XCB_GE_GENERIC, + /*extension=*/s_xinputMajorOpcode, + /*sequence=*/4, + /*length=*/2, + /*event_type=*/XCB_INPUT_RAW_BUTTON_PRESS, + /*deviceid=*/s_virtualCorePointerId, + /*time=*/3984920, + /*detail=*/GetParam().m_button, + /*sourceid=*/s_physicalPointerDeviceId, + /*valuators_len=*/2, + /*flags=*/0, + /*pad0[4]=*/{}, + /*full_sequence=*/4 + }))) + .WillOnce(Return(nullptr)) + .WillOnce(ReturnMalloc(MakeEvent(xcb_button_press_event_t{ + /*response_type=*/XCB_BUTTON_PRESS, + /*detail=*/static_cast(GetParam().m_button), + /*sequence=*/4, + /*time=*/3984920, + /*root=*/s_rootWindow, + /*event=*/119537664, + /*child=*/0, + /*root_x=*/55, + /*root_y=*/1099, + /*event_x=*/55, + /*event_y=*/55, + /*state=*/0, + /*same_screen=*/1 + }))) + .WillOnce(Return(nullptr)) + .WillOnce(ReturnMalloc(MakeEvent(xcb_input_raw_button_release_event_t{ + /*response_type=*/XCB_GE_GENERIC, + /*extension=*/s_xinputMajorOpcode, + /*sequence=*/4, + /*length=*/2, + /*event_type=*/XCB_INPUT_RAW_BUTTON_RELEASE, + /*deviceid=*/s_virtualCorePointerId, + /*time=*/3984964, + /*detail=*/GetParam().m_button, + /*sourceid=*/s_physicalPointerDeviceId, + /*valuators_len=*/2, + /*flags=*/0, + /*pad0[4]=*/{}, + /*full_sequence=*/4 + }))) + .WillOnce(Return(nullptr)) + .WillOnce(ReturnMalloc(MakeEvent(xcb_button_release_event_t{ + /*response_type=*/XCB_BUTTON_RELEASE, + /*detail=*/static_cast(GetParam().m_button), + /*sequence=*/4, + /*time=*/3984964, + /*root=*/s_rootWindow, + /*event=*/119537664, + /*child=*/0, + /*root_x=*/55, + /*root_y=*/1099, + /*event_x=*/55, + /*event_y=*/55, + /*state=*/XCB_KEY_BUT_MASK_BUTTON_1, + /*same_screen=*/1 + }))) + .WillOnce(Return(nullptr)) + ; + + m_application.Start(); + InputSystemCursorRequestBus::Event( + InputDeviceMouse::Id, + &InputSystemCursorRequests::SetSystemCursorState, + SystemCursorState::ConstrainedAndHidden); + + const InputChannel* activeButtonChannel = InputChannelRequests::FindInputChannel(GetInputChannelIdForButton(GetParam().m_button)); + const auto inactiveButtonChannels = [this]() + { + const auto inactiveButtonChannelIds = GetIdleChannelIdsForButton(GetParam().m_button); + AZStd::array channels{}; + AZStd::transform(begin(inactiveButtonChannelIds), end(inactiveButtonChannelIds), begin(channels), [](const InputChannelId& id) + { + return InputChannelRequests::FindInputChannel(id); + }); + return channels; + }(); + + ASSERT_TRUE(activeButtonChannel); + ASSERT_THAT(inactiveButtonChannels, Each(NotNull())); + + EXPECT_THAT(activeButtonChannel->GetState(), Eq(InputChannel::State::Idle)); + EXPECT_THAT(inactiveButtonChannels, Each(Property(&InputChannel::GetState, Eq(InputChannel::State::Idle)))); + + PumpApplication(); + + EXPECT_THAT(activeButtonChannel->GetState(), Eq(InputChannel::State::Began)); + EXPECT_THAT(inactiveButtonChannels, Each(Property(&InputChannel::GetState, Eq(InputChannel::State::Idle)))); + + PumpApplication(); + + EXPECT_THAT(activeButtonChannel->GetState(), Eq(InputChannel::State::Updated)); + EXPECT_THAT(inactiveButtonChannels, Each(Property(&InputChannel::GetState, Eq(InputChannel::State::Idle)))); + + PumpApplication(); + + EXPECT_THAT(activeButtonChannel->GetState(), Eq(InputChannel::State::Ended)); + EXPECT_THAT(inactiveButtonChannels, Each(Property(&InputChannel::GetState, Eq(InputChannel::State::Idle)))); + + PumpApplication(); + + EXPECT_THAT(activeButtonChannel->GetState(), Eq(InputChannel::State::Idle)); + EXPECT_THAT(inactiveButtonChannels, Each(Property(&InputChannel::GetState, Eq(InputChannel::State::Idle)))); + } + + INSTANTIATE_TEST_CASE_P( + AllButtons, + XcbInputDeviceMouseButtonTests, + testing::Values( + MouseButtonTestData{ XCB_BUTTON_INDEX_1 }, + MouseButtonTestData{ XCB_BUTTON_INDEX_2 }, + MouseButtonTestData{ XCB_BUTTON_INDEX_3 } + // XCB_BUTTON_INDEX_4 and XCB_BUTTON_INDEX_5 map to positive and + // negative scroll wheel events, which are handled as motion events + ) + ); + + TEST_F(XcbInputDeviceMouseTests, MovementInputChannelsUpdateStateFromXcbEvents) + { + using testing::Each; + using testing::Eq; + using testing::FloatEq; + using testing::NotNull; + using testing::Property; + using testing::Return; + + // Set the expectations for the events that will be generated + // nullptr entries represent when the event queue is empty, and will cause + // PumpSystemEventLoopUntilEmpty to return + // + // Event pointers are freed by the calling code, so these actions + // malloc new copies + // + // The xcb mouse does not react to the `XCB_MOTION_NOTIFY` event, but + // it will still receive it from the X server. + EXPECT_CALL(m_interface, xcb_poll_for_event(&m_connection)) + .WillOnce(ReturnMalloc(MakeEvent(xcb_input_raw_motion_event_t{ + /*response_type=*/XCB_GE_GENERIC, + /*extension=*/s_xinputMajorOpcode, + /*sequence=*/5, + /*length=*/10, + /*event_type=*/XCB_INPUT_RAW_MOTION, + /*deviceid=*/s_virtualCorePointerId, + /*time=*/0, // use the time value to identify each event + /*detail=*/XCB_MOTION_NORMAL, + /*sourceid=*/s_physicalPointerDeviceId, + /*valuators_len=*/2, // number of axes that have values for this event + /*flags=*/0, + /*pad0[4]=*/{}, + /*full_sequence=*/5, + }))) + .WillOnce(Return(nullptr)) + .WillOnce(ReturnMalloc(MakeEvent(xcb_motion_notify_event_t{ + /*response_type=*/XCB_MOTION_NOTIFY, + /*detail=*/XCB_MOTION_NORMAL, + /*sequence=*/5, + /*time=*/1, // use the time value to identify each event + /*root=*/s_rootWindow, + /*event=*/127926272, + /*child=*/0, + /*root_x=*/95, + /*root_y=*/1079, + /*event_x=*/95, + /*event_y=*/20, + /*state=*/0, + /*same_screen=*/1, + }))) + .WillOnce(Return(nullptr)) + ; + + AZStd::array axisValues + { + xcb_input_fp3232_t{ /*.integral=*/ 1, /*.fraction=*/0 }, // x motion + xcb_input_fp3232_t{ /*.integral=*/ 2, /*.fraction=*/0 } // y motion + }; + + EXPECT_CALL(m_interface, xcb_input_raw_button_press_axisvalues_length(testing::Field(&xcb_input_raw_button_press_event_t::time, 0))) + .WillRepeatedly(testing::Return(2)); // x and y axis + EXPECT_CALL(m_interface, xcb_input_raw_button_press_axisvalues_raw(testing::Field(&xcb_input_raw_button_press_event_t::time, 0))) + .WillRepeatedly(testing::Return(axisValues.data())); // x and y axis + + m_application.Start(); + InputSystemCursorRequestBus::Event( + InputDeviceMouse::Id, + &InputSystemCursorRequests::SetSystemCursorState, + SystemCursorState::ConstrainedAndHidden); + + const InputChannel* xMotionChannel = InputChannelRequests::FindInputChannel(InputDeviceMouse::Movement::X); + const InputChannel* yMotionChannel = InputChannelRequests::FindInputChannel(InputDeviceMouse::Movement::Y); + ASSERT_TRUE(xMotionChannel); + ASSERT_TRUE(yMotionChannel); + + EXPECT_THAT(xMotionChannel->GetState(), Eq(InputChannel::State::Idle)); + EXPECT_THAT(yMotionChannel->GetState(), Eq(InputChannel::State::Idle)); + EXPECT_THAT(xMotionChannel->GetValue(), FloatEq(0.0f)); + EXPECT_THAT(yMotionChannel->GetValue(), FloatEq(0.0f)); + + PumpApplication(); + + EXPECT_THAT(xMotionChannel->GetState(), Eq(InputChannel::State::Began)); + EXPECT_THAT(yMotionChannel->GetState(), Eq(InputChannel::State::Began)); + EXPECT_THAT(xMotionChannel->GetValue(), FloatEq(1.0f)); + EXPECT_THAT(yMotionChannel->GetValue(), FloatEq(2.0f)); + + PumpApplication(); + + EXPECT_THAT(xMotionChannel->GetState(), Eq(InputChannel::State::Ended)); + EXPECT_THAT(yMotionChannel->GetState(), Eq(InputChannel::State::Ended)); + EXPECT_THAT(xMotionChannel->GetValue(), FloatEq(0.0f)); + EXPECT_THAT(yMotionChannel->GetValue(), FloatEq(0.0f)); + } + + struct GetCursorPositionParam + { + int16_t m_x; + int16_t m_y; + }; + + class XcbGetSystemCursorPositionTests + : public XcbInputDeviceMouseTests + , public testing::WithParamInterface + { + }; + + TEST_P(XcbGetSystemCursorPositionTests, GetSystemCursorPositionNormalizedReturnsCorrectValue) + { + using testing::Eq; + using testing::Field; + using testing::Return; + using testing::_; + + xcb_window_t focusWindow = 42; + const xcb_query_pointer_reply_t queryPointerReply{ + /*.response_type=*/XCB_QUERY_POINTER, + /*.same_screen=*/1, + /*.sequence=*/0, + /*.length=*/1, + /*.root=*/s_rootWindow, + /*.child=*/focusWindow, + /*.root_x=*/static_cast(GetParam().m_x + s_defaultWindowGeometry.x), + /*.root_y=*/static_cast(GetParam().m_y + s_defaultWindowGeometry.y), + /*.win_x=*/GetParam().m_x, + /*.win_y=*/GetParam().m_y, + /*.mask=*/{}, + /*.pad0[2]=*/{}, + }; + + // Querying the root window's pointer gives its absolute value + const xcb_query_pointer_reply_t rootWindowQueryPointerReply{ + /*.response_type=*/XCB_QUERY_POINTER, + /*.same_screen=*/1, + /*.sequence=*/0, + /*.length=*/1, + /*.root=*/s_rootWindow, + /*.child=*/s_rootWindow, + /*.root_x=*/static_cast(GetParam().m_x + s_defaultWindowGeometry.x), + /*.root_y=*/static_cast(GetParam().m_y + s_defaultWindowGeometry.y), + /*.win_x=*/static_cast(GetParam().m_x + s_defaultWindowGeometry.x), + /*.win_y=*/static_cast(GetParam().m_y + s_defaultWindowGeometry.y), + /*.mask=*/{}, + /*.pad0[2]=*/{}, + }; + + EXPECT_CALL(m_interface, xcb_get_property_value(Field(&xcb_get_property_reply_t::sequence, Eq(s_getActiveWindowPropertySequence)))) + .WillRepeatedly(Return(&focusWindow)); + + EXPECT_CALL(m_interface, xcb_query_pointer(&m_connection, focusWindow)) + .WillRepeatedly(Return(xcb_query_pointer_cookie_t{/*.sequence=*/1})); + EXPECT_CALL(m_interface, xcb_query_pointer_reply(&m_connection, Field(&xcb_query_pointer_cookie_t::sequence, 1), _)) + .WillRepeatedly(ReturnMalloc(queryPointerReply)); + + EXPECT_CALL(m_interface, xcb_query_pointer(&m_connection, s_rootWindow)) + .WillRepeatedly(Return(xcb_query_pointer_cookie_t{/*.sequence=*/2})); + EXPECT_CALL(m_interface, xcb_query_pointer_reply(&m_connection, Field(&xcb_query_pointer_cookie_t::sequence, 2), _)) + .WillRepeatedly(ReturnMalloc(rootWindowQueryPointerReply)); + + m_application.Start(); + InputSystemCursorRequestBus::Event( + InputDeviceMouse::Id, + &InputSystemCursorRequests::SetSystemCursorState, + SystemCursorState::ConstrainedAndHidden); + + AZ::Vector2 systemCursorPositionNormalized = AZ::Vector2::CreateZero(); + InputSystemCursorRequestBus::EventResult( + systemCursorPositionNormalized, + InputDeviceMouse::Id, + &InputSystemCursorRequests::GetSystemCursorPositionNormalized); + + EXPECT_THAT(systemCursorPositionNormalized, ::testing::AllOf( + testing::Property(&AZ::Vector2::GetX, testing::FloatEq(static_cast(GetParam().m_x) / s_defaultWindowGeometry.width)), + testing::Property(&AZ::Vector2::GetY, testing::FloatEq(static_cast(GetParam().m_y) / s_defaultWindowGeometry.height)) + )); + } + + INSTANTIATE_TEST_CASE_P( + AllPointerPositions, + XcbGetSystemCursorPositionTests, + testing::Values( + // Default mocked window geometry sets width and height to 100, all + // parameter values should be within [0, 100) + GetCursorPositionParam{ 50, 50 }, + GetCursorPositionParam{ 25, 25 }, + GetCursorPositionParam{ 0, 100 } + ) + ); +} // namespace AzFramework diff --git a/Code/Framework/AzFramework/Tests/Platform/Common/Xcb/azframework_xcb_tests_files.cmake b/Code/Framework/AzFramework/Tests/Platform/Common/Xcb/azframework_xcb_tests_files.cmake index 147fd2bfe1..7da00fa18c 100644 --- a/Code/Framework/AzFramework/Tests/Platform/Common/Xcb/azframework_xcb_tests_files.cmake +++ b/Code/Framework/AzFramework/Tests/Platform/Common/Xcb/azframework_xcb_tests_files.cmake @@ -17,5 +17,6 @@ set(FILES XcbBaseTestFixture.cpp XcbBaseTestFixture.h XcbInputDeviceKeyboardTests.cpp + XcbInputDeviceMouseTests.cpp XcbTestApplication.h ) diff --git a/Code/Framework/AzFramework/Tests/ProcessLaunchParseTests.cpp b/Code/Framework/AzFramework/Tests/ProcessLaunchParseTests.cpp index 17dd04c587..0a7eb24df4 100644 --- a/Code/Framework/AzFramework/Tests/ProcessLaunchParseTests.cpp +++ b/Code/Framework/AzFramework/Tests/ProcessLaunchParseTests.cpp @@ -75,7 +75,8 @@ namespace UnitTest AzFramework::ProcessOutput processOutput; AzFramework::ProcessLauncher::ProcessLaunchInfo processLaunchInfo; - processLaunchInfo.m_commandlineParameters = AZ_TRAIT_TEST_ROOT_FOLDER "ProcessLaunchTest"; + processLaunchInfo.m_commandlineParameters.emplace(AZStd::string(AZ_TRAIT_TEST_ROOT_FOLDER "ProcessLaunchTest")); + processLaunchInfo.m_workingDirectory = AZ::Test::GetCurrentExecutablePath(); processLaunchInfo.m_showWindow = false; bool launchReturn = AzFramework::ProcessWatcher::LaunchProcessAndRetrieveOutput(processLaunchInfo, AzFramework::ProcessCommunicationType::COMMUNICATOR_TYPE_STDINOUT, processOutput); @@ -90,7 +91,9 @@ namespace UnitTest AzFramework::ProcessOutput processOutput; AzFramework::ProcessLauncher::ProcessLaunchInfo processLaunchInfo; - processLaunchInfo.m_commandlineParameters = AZ_TRAIT_TEST_ROOT_FOLDER "ProcessLaunchTest -param1 param1val -param2=param2val"; + processLaunchInfo.m_commandlineParameters.emplace>( + AZStd::vector{AZStd::string(AZ_TRAIT_TEST_ROOT_FOLDER "ProcessLaunchTest"), "-param1", "param1val","-param2", "param2val"}); + processLaunchInfo.m_workingDirectory = AZ::Test::GetCurrentExecutablePath(); processLaunchInfo.m_showWindow = false; bool launchReturn = AzFramework::ProcessWatcher::LaunchProcessAndRetrieveOutput(processLaunchInfo, AzFramework::ProcessCommunicationType::COMMUNICATOR_TYPE_STDINOUT, processOutput); @@ -117,14 +120,16 @@ namespace UnitTest #if AZ_TRAIT_DISABLE_FAILED_PROCESS_LAUNCHER_TESTS TEST_F(ProcessLaunchParseTests, DISABLED_ProcessLauncher_StringsWithCommas_Success) #else - TEST_F(ProcessLaunchParseTests, ProcessLauncher_StringsWithCommas_Success) + TEST_F(ProcessLaunchParseTests, ProcessLauncher_WithCommas_Success) #endif // AZ_TRAIT_DISABLE_FAILED_PROCESS_LAUNCHER_TESTS { ProcessLaunchParseTests::ParsedArgMap argMap; AzFramework::ProcessOutput processOutput; AzFramework::ProcessLauncher::ProcessLaunchInfo processLaunchInfo; - processLaunchInfo.m_commandlineParameters = AZ_TRAIT_TEST_ROOT_FOLDER R"(ProcessLaunchTest -param1 "\"param,1val\"" -param2="\"param2v,al\"")"; + processLaunchInfo.m_commandlineParameters.emplace>( + AZStd::vector{AZStd::string(AZ_TRAIT_TEST_ROOT_FOLDER "ProcessLaunchTest"), "-param1", "param,1val","-param2", "param2v,al"}); + processLaunchInfo.m_workingDirectory = AZ::Test::GetCurrentExecutablePath(); processLaunchInfo.m_showWindow = false; bool launchReturn = AzFramework::ProcessWatcher::LaunchProcessAndRetrieveOutput(processLaunchInfo, AzFramework::ProcessCommunicationType::COMMUNICATOR_TYPE_STDINOUT, processOutput); @@ -137,28 +142,32 @@ namespace UnitTest EXPECT_NE(param1itr, argMap.end()); AZStd::vector param1{ param1itr->second }; - EXPECT_EQ(param1.size(), 1); - EXPECT_EQ(param1[0], "param,1val"); + EXPECT_EQ(param1.size(), 2); + EXPECT_EQ(param1[0], "param"); + EXPECT_EQ(param1[1], "1val"); auto param2itr = argMap.find("param2"); EXPECT_NE(param2itr, argMap.end()); AZStd::vector param2{ param2itr->second }; - EXPECT_EQ(param2.size(), 1); - EXPECT_EQ(param2[0], "param2v,al"); + EXPECT_EQ(param2.size(), 2); + EXPECT_EQ(param2[0], "param2v"); + EXPECT_EQ(param2[1], "al"); } #if AZ_TRAIT_DISABLE_FAILED_PROCESS_LAUNCHER_TESTS TEST_F(ProcessLaunchParseTests, DISABLED_ProcessLauncher_StringsWithSpaces_Success) #else - TEST_F(ProcessLaunchParseTests, ProcessLauncher_StringsWithSpaces_Success) + TEST_F(ProcessLaunchParseTests, ProcessLauncher_WithSpaces_Success) #endif // AZ_TRAIT_DISABLE_FAILED_PROCESS_LAUNCHER_TESTS { ProcessLaunchParseTests::ParsedArgMap argMap; AzFramework::ProcessOutput processOutput; AzFramework::ProcessLauncher::ProcessLaunchInfo processLaunchInfo; - processLaunchInfo.m_commandlineParameters = AZ_TRAIT_TEST_ROOT_FOLDER R"(ProcessLaunchTest -param1 "\"param 1val\"" -param2="\"param2v al\"")"; + processLaunchInfo.m_commandlineParameters.emplace>(AZStd::vector{ + AZStd::string(AZ_TRAIT_TEST_ROOT_FOLDER "ProcessLaunchTest"), "-param1", R"("param 1val")", R"(-param2="param2v al")" }); + processLaunchInfo.m_workingDirectory = AZ::Test::GetCurrentExecutablePath(); processLaunchInfo.m_showWindow = false; bool launchReturn = AzFramework::ProcessWatcher::LaunchProcessAndRetrieveOutput(processLaunchInfo, AzFramework::ProcessCommunicationType::COMMUNICATOR_TYPE_STDINOUT, processOutput); @@ -185,14 +194,16 @@ namespace UnitTest #if AZ_TRAIT_DISABLE_FAILED_PROCESS_LAUNCHER_TESTS TEST_F(ProcessLaunchParseTests, DISABLED_ProcessLauncher_StringsWithSpacesAndComma_Success) #else - TEST_F(ProcessLaunchParseTests, ProcessLauncher_StringsWithSpacesAndComma_Success) + TEST_F(ProcessLaunchParseTests, ProcessLauncher_WithSpacesAndComma_Success) #endif // AZ_TRAIT_DISABLE_FAILED_PROCESS_LAUNCHER_TESTS { ProcessLaunchParseTests::ParsedArgMap argMap; AzFramework::ProcessOutput processOutput; AzFramework::ProcessLauncher::ProcessLaunchInfo processLaunchInfo; - processLaunchInfo.m_commandlineParameters = AZ_TRAIT_TEST_ROOT_FOLDER R"(ProcessLaunchTest -param1 "\"par,am 1val\"" -param2="\"param,2v al\"")"; + processLaunchInfo.m_commandlineParameters.emplace>(AZStd::vector{ + AZStd::string(AZ_TRAIT_TEST_ROOT_FOLDER "ProcessLaunchTest"), "-param1", R"("param, 1val")", R"(-param2="param,2v al")" }); + processLaunchInfo.m_workingDirectory = AZ::Test::GetCurrentExecutablePath(); processLaunchInfo.m_showWindow = false; bool launchReturn = AzFramework::ProcessWatcher::LaunchProcessAndRetrieveOutput(processLaunchInfo, AzFramework::ProcessCommunicationType::COMMUNICATOR_TYPE_STDINOUT, processOutput); @@ -206,7 +217,7 @@ namespace UnitTest AZStd::vector param1{ param1itr->second }; EXPECT_EQ(param1.size(), 1); - EXPECT_EQ(param1[0], "par,am 1val"); + EXPECT_EQ(param1[0], "param, 1val"); auto param2itr = argMap.find("param2"); EXPECT_NE(param2itr, argMap.end()); @@ -216,35 +227,4 @@ namespace UnitTest EXPECT_EQ(param2[0], "param,2v al"); } - TEST_F(ProcessLaunchParseTests, ProcessLauncher_CommaStringNoQuotes_Success) - { - ProcessLaunchParseTests::ParsedArgMap argMap; - AzFramework::ProcessOutput processOutput; - AzFramework::ProcessLauncher::ProcessLaunchInfo processLaunchInfo; - - processLaunchInfo.m_commandlineParameters = AZ_TRAIT_TEST_ROOT_FOLDER "ProcessLaunchTest -param1 param,1val -param2=param2v,al"; - processLaunchInfo.m_workingDirectory = AZ::Test::GetCurrentExecutablePath(); - processLaunchInfo.m_showWindow = false; - bool launchReturn = AzFramework::ProcessWatcher::LaunchProcessAndRetrieveOutput(processLaunchInfo, AzFramework::ProcessCommunicationType::COMMUNICATOR_TYPE_STDINOUT, processOutput); - - EXPECT_EQ(launchReturn, true); - - argMap = ProcessLaunchParseTests::ParseParameters(processOutput.outputResult); - - auto param1itr = argMap.find("param1"); - EXPECT_NE(param1itr, argMap.end()); - AZStd::vector param1{ param1itr->second }; - - EXPECT_EQ(param1.size(), 2); - EXPECT_EQ(param1[0], "param"); - EXPECT_EQ(param1[1], "1val"); - - auto param2itr = argMap.find("param2"); - EXPECT_NE(param2itr, argMap.end()); - AZStd::vector param2{ param2itr->second }; - - EXPECT_EQ(param2.size(), 2); - EXPECT_EQ(param2[0], "param2v"); - EXPECT_EQ(param2[1], "al"); - } } // namespace UnitTest diff --git a/Code/Framework/AzFramework/Tests/Scene.cpp b/Code/Framework/AzFramework/Tests/Scene.cpp index 31df6e6774..a7325cc810 100644 --- a/Code/Framework/AzFramework/Tests/Scene.cpp +++ b/Code/Framework/AzFramework/Tests/Scene.cpp @@ -113,7 +113,6 @@ namespace SceneUnitTest m_app.RegisterComponentDescriptor(AZ::StreamerComponent::CreateDescriptor()); AZ::ComponentApplication::Descriptor desc; - desc.m_enableDrilling = false; // the unit test framework already adds a driller m_systemEntity = m_app.Create(desc); m_systemEntity->Init(); diff --git a/Code/Framework/AzFramework/Tests/Spawnable/SpawnableEntitiesManagerTests.cpp b/Code/Framework/AzFramework/Tests/Spawnable/SpawnableEntitiesManagerTests.cpp index 2dc32d14d5..50365ff2ff 100644 --- a/Code/Framework/AzFramework/Tests/Spawnable/SpawnableEntitiesManagerTests.cpp +++ b/Code/Framework/AzFramework/Tests/Spawnable/SpawnableEntitiesManagerTests.cpp @@ -55,9 +55,54 @@ namespace UnitTest AZ::EntityId m_entityReference; }; + class SourceSpawnableComponent : public AZ::Component + { + public: + AZ_COMPONENT(SourceSpawnableComponent, "{47FF79CE-A95B-420E-8BEB-F1CC58087B87}"); + + void Activate() override {} + void Deactivate() override {} + + static void Reflect(AZ::ReflectContext* reflection) + { + if (auto* serializeContext = azrtti_cast(reflection)) + { + serializeContext->Class(); + } + } + }; + + class TargetSpawnableComponent : public AZ::Component + { + public: + AZ_COMPONENT(TargetSpawnableComponent, "{B4041561-63A7-4E1E-80F1-78C08D497960}"); + + TargetSpawnableComponent() = default; + explicit TargetSpawnableComponent(AZ::EntityId parent) + : m_parent(parent) + { + } + + void Activate() override {} + void Deactivate() override {} + + static void Reflect(AZ::ReflectContext* reflection) + { + if (auto* serializeContext = azrtti_cast(reflection)) + { + serializeContext->Class() + ->Field("Parent", &TargetSpawnableComponent::m_parent); + } + } + + AZ::EntityId m_parent; + }; + class SpawnableEntitiesManagerTest : public AllocatorsFixture { public: + constexpr static AZ::u64 EntityIdStartId = 40; + void SetUp() override { AllocatorsFixture::SetUp(); @@ -66,6 +111,8 @@ namespace UnitTest AZ::ComponentApplication::Descriptor descriptor; m_application->Start(descriptor); m_application->RegisterComponentDescriptor(ComponentWithEntityReference::CreateDescriptor()); + m_application->RegisterComponentDescriptor(SourceSpawnableComponent::CreateDescriptor()); + m_application->RegisterComponentDescriptor(TargetSpawnableComponent::CreateDescriptor()); // Without this, the user settings component would attempt to save on finalize/shutdown. Since the file is // shared across the whole engine, if multiple tests are run in parallel, the saving could cause a crash @@ -75,7 +122,7 @@ namespace UnitTest m_spawnable = aznew AzFramework::Spawnable( AZ::Data::AssetId::CreateString("{EB2E8A2B-F253-4A90-BBF4-55F2EED786B8}:0"), AZ::Data::AssetData::AssetStatus::Ready); m_spawnableAsset = new AZ::Data::Asset(m_spawnable, AZ::Data::AssetLoadBehavior::Default); - m_ticket = new AzFramework::EntitySpawnTicket(*m_spawnableAsset); + m_ticket = aznew AzFramework::EntitySpawnTicket(*m_spawnableAsset); auto managerInterface = AzFramework::SpawnableEntitiesInterface::Get(); m_manager = azrtti_cast(managerInterface); @@ -109,10 +156,179 @@ namespace UnitTest entities.reserve(numElements); for (size_t i=0; i()); + auto entry = AZStd::make_unique(); + entry->AddComponent(aznew SourceSpawnableComponent()); + entry->SetId(AZ::EntityId(EntityIdStartId + i)); + entities.push_back(AZStd::move(entry)); } } + AZ::Data::Asset CreateTargetSpawnable(size_t numElements, bool requiresMatchingEntityIds) + { + auto target = aznew AzFramework::Spawnable( + AZ::Data::AssetId(AZ::Uuid("{716CD8C3-0BA8-4F32-B579-0EC7C967796F}")), AZ::Data::AssetData::AssetStatus::Ready); + + AzFramework::Spawnable::EntityList& entities = target->GetEntities(); + entities.reserve(numElements); + if (requiresMatchingEntityIds) + { + for (size_t i = 0; i < numElements; ++i) + { + auto entry = AZStd::make_unique(); + if (i != 0) + { + entry->AddComponent(aznew TargetSpawnableComponent(AZ::EntityId(EntityIdStartId + i - 1))); + } + else + { + entry->AddComponent(aznew TargetSpawnableComponent()); + } + entry->SetId(AZ::EntityId(EntityIdStartId + i)); + entities.push_back(AZStd::move(entry)); + } + } + else + { + for (size_t i = 0; i < numElements; ++i) + { + auto entry = AZStd::make_unique(); + entry->AddComponent(aznew TargetSpawnableComponent()); + entities.push_back(AZStd::move(entry)); + } + } + + return AZ::Data::Asset(target, AZ::Data::AssetLoadBehavior::NoLoad); + } + + template + void InsertEntityAliases( + const AZStd::array& sourceIds, + const AZStd::array& targetIds, + const AZStd::array& aliasTypes, + AZ::Data::Asset* target = nullptr) + { + AzFramework::Spawnable::EntityAliasVisitor visitor = m_spawnable->TryGetAliases(); + + for (uint32_t i = 0; i < AliasCount; ++i) + { + if (target) + { + visitor.AddAlias(*target, AZ::Crc32(i), sourceIds[i], targetIds[i], aliasTypes[i], false); + } + else + { + AZ::Data::Asset spawnable( + AZ::Data::AssetId(AZ::Uuid("{4CBEC17A-52D6-42D5-9037-F4C05B9CE1D9}"), i), azrtti_typeid()); + visitor.AddAlias(AZStd::move(spawnable), AZ::Crc32(i), sourceIds[i], targetIds[i], aliasTypes[i], false); + } + } + } + + static bool AreAllEntitiesReplaced(AzFramework::SpawnableConstEntityContainerView entities) + { + for (const AZ::Entity* entity : entities) + { + if (entity) + { + if (entity->FindComponent() != nullptr || + entity->FindComponent() == nullptr) + { + return false; + } + } + else + { + return false; + } + } + return true; + } + + static bool DoParentEntityIdsMatch(AzFramework::SpawnableConstEntityContainerView entities) + { + if (entities.empty()) + { + return false; + } + + const AZ::Entity* previous = nullptr; + for (const AZ::Entity* entity : entities) + { + if (entity) + { + if (previous) + { + if (TargetSpawnableComponent* link = entity->FindComponent(); link != nullptr) + { + if (link->m_parent != previous->GetId()) + { + return false; + } + } + previous = entity; + } + } + else + { + return false; + } + } + return true; + } + + static bool IsEveryOtherEntityAReplacement(AzFramework::SpawnableConstEntityContainerView entities) + { + bool onAlternative = true; + for (const AZ::Entity* entity : entities) + { + if (entity) + { + if (onAlternative) + { + if (entity->FindComponent() == nullptr || + entity->FindComponent() != nullptr) + { + return false; + } + } + else + { + if (entity->FindComponent() != nullptr || + entity->FindComponent() == nullptr) + { + return false; + } + } + onAlternative = !onAlternative; + } + else + { + return false; + } + } + return true; + } + + static bool AreAllMerged(AzFramework::SpawnableConstEntityContainerView entities) + { + for (const AZ::Entity* entity : entities) + { + if (entity) + { + if (entity->FindComponent() == nullptr || + entity->FindComponent() == nullptr) + { + return false; + } + } + else + { + return false; + } + } + return true; + } + void CreateRecursiveHierarchy() { AzFramework::Spawnable::EntityList& entities = m_spawnable->GetEntities(); @@ -245,6 +461,30 @@ namespace UnitTest TestApplication* m_application { nullptr }; }; + + // + // Constructors + // + + TEST_F(SpawnableEntitiesManagerTest, EntitySpawnTicket_Move_Works) + { + AzFramework::EntitySpawnTicket ticket1(*m_spawnableAsset); + AzFramework::EntitySpawnTicket ticket2(*m_spawnableAsset); + + const AzFramework::EntitySpawnTicket::Id ticket1Id = ticket1.GetId(); + const AzFramework::EntitySpawnTicket::Id ticket2Id = ticket2.GetId(); + + AzFramework::EntitySpawnTicket ticketMoveConstructor(AZStd::move(ticket1)); + EXPECT_TRUE(ticketMoveConstructor.IsValid()); + EXPECT_EQ(ticketMoveConstructor.GetId(), ticket1Id); + + AzFramework::EntitySpawnTicket ticketMoveOperator; + ticketMoveOperator = AZStd::move(ticket2); + EXPECT_TRUE(ticketMoveOperator.IsValid()); + EXPECT_EQ(ticketMoveOperator.GetId(), ticket2Id); + } + + // // SpawnAllEntitities // @@ -340,7 +580,7 @@ namespace UnitTest // Make sure we start with a fresh ticket each time, or else each iteration through this loop would continue to build up // more and more entities. delete m_ticket; - m_ticket = new AzFramework::EntitySpawnTicket(*m_spawnableAsset); + m_ticket = aznew AzFramework::EntitySpawnTicket(*m_spawnableAsset); constexpr size_t NumEntities = 4; FillSpawnable(NumEntities); @@ -366,24 +606,6 @@ namespace UnitTest } } - TEST_F(SpawnableEntitiesManagerTest, EntitySpawnTicket_Move_Works) - { - AzFramework::EntitySpawnTicket ticket1(*m_spawnableAsset); - AzFramework::EntitySpawnTicket ticket2(*m_spawnableAsset); - - const AzFramework::EntitySpawnTicket::Id ticket1Id = ticket1.GetId(); - const AzFramework::EntitySpawnTicket::Id ticket2Id = ticket2.GetId(); - - AzFramework::EntitySpawnTicket ticketMoveConstructor(AZStd::move(ticket1)); - EXPECT_TRUE(ticketMoveConstructor.IsValid()); - EXPECT_EQ(ticketMoveConstructor.GetId(), ticket1Id); - - AzFramework::EntitySpawnTicket ticketMoveOperator; - ticketMoveOperator = AZStd::move(ticket2); - EXPECT_TRUE(ticketMoveOperator.IsValid()); - EXPECT_EQ(ticketMoveOperator.GetId(), ticket2Id); - } - TEST_F(SpawnableEntitiesManagerTest, SpawnAllEntities_DeleteTicketBeforeCall_NoCrash) { { @@ -393,6 +615,147 @@ namespace UnitTest m_manager->ProcessQueue(AzFramework::SpawnableEntitiesManager::CommandQueuePriority::Regular); } + TEST_F(SpawnableEntitiesManagerTest, SpawnAllEntities_AllAliasesWithDisabled_NoEntitiesSpawned) + { + using namespace AzFramework; + static constexpr size_t NumEntities = 4; + FillSpawnable(NumEntities); + InsertEntityAliases( + { 0, 1, 2, 3 }, { 0, 1, 2, 3 }, + { Spawnable::EntityAliasType::Disable, Spawnable::EntityAliasType::Disable, Spawnable::EntityAliasType::Disable, + Spawnable::EntityAliasType::Disable }); + + size_t spawnedEntitiesCount = 0; + auto callback = [&spawnedEntitiesCount](AzFramework::EntitySpawnTicket::Id, AzFramework::SpawnableConstEntityContainerView entities) + { + spawnedEntitiesCount += entities.size(); + }; + AzFramework::SpawnAllEntitiesOptionalArgs optionalArgs; + optionalArgs.m_completionCallback = AZStd::move(callback); + m_manager->SpawnAllEntities(*m_ticket, AZStd::move(optionalArgs)); + m_manager->ProcessQueue(AzFramework::SpawnableEntitiesManager::CommandQueuePriority::Regular); + + EXPECT_EQ(0, spawnedEntitiesCount); + } + + TEST_F(SpawnableEntitiesManagerTest, SpawnAllEntities_SomeAliasesWithDisabled_RegularEntitiesAreSpawned) + { + using namespace AzFramework; + static constexpr size_t NumEntities = 8; + FillSpawnable(NumEntities); + InsertEntityAliases<2>({ 1, 3 }, { 1, 3 }, { Spawnable::EntityAliasType::Disable, Spawnable::EntityAliasType::Disable }); + + size_t spawnedEntitiesCount = 0; + auto callback = [&spawnedEntitiesCount](AzFramework::EntitySpawnTicket::Id, AzFramework::SpawnableConstEntityContainerView entities) + { + spawnedEntitiesCount += entities.size(); + }; + AzFramework::SpawnAllEntitiesOptionalArgs optionalArgs; + optionalArgs.m_completionCallback = AZStd::move(callback); + m_manager->SpawnAllEntities(*m_ticket, AZStd::move(optionalArgs)); + m_manager->ProcessQueue(AzFramework::SpawnableEntitiesManager::CommandQueuePriority::Regular); + + EXPECT_EQ(6, spawnedEntitiesCount); + } + + TEST_F(SpawnableEntitiesManagerTest, SpawnAllEntities_AllAliasesWithReplace_EntitiesSpawnedFromTarget) + { + using namespace AzFramework; + static constexpr size_t NumEntities = 4; + FillSpawnable(NumEntities); + constexpr bool requiresMatchingEntityIds = true; + AZ::Data::Asset target = CreateTargetSpawnable(4, requiresMatchingEntityIds); + InsertEntityAliases<4>( + { 0, 1, 2, 3 }, { 0, 1, 2, 3 }, + { Spawnable::EntityAliasType::Replace, Spawnable::EntityAliasType::Replace, Spawnable::EntityAliasType::Replace, + Spawnable::EntityAliasType::Replace }, + &target); + + size_t spawnedEntitiesCount = 0; + bool allReplaced = false; + bool allEntityIdsPatched = false; + auto callback = [&spawnedEntitiesCount, &allReplaced, &allEntityIdsPatched]( + AzFramework::EntitySpawnTicket::Id, AzFramework::SpawnableConstEntityContainerView entities) + { + spawnedEntitiesCount += entities.size(); + allReplaced = AreAllEntitiesReplaced(entities); + allEntityIdsPatched = DoParentEntityIdsMatch(entities); + }; + AzFramework::SpawnAllEntitiesOptionalArgs optionalArgs; + optionalArgs.m_completionCallback = AZStd::move(callback); + m_manager->SpawnAllEntities(*m_ticket, AZStd::move(optionalArgs)); + m_manager->ProcessQueue(AzFramework::SpawnableEntitiesManager::CommandQueuePriority::Regular); + + EXPECT_EQ(4, spawnedEntitiesCount); + EXPECT_TRUE(allReplaced); + EXPECT_TRUE(allEntityIdsPatched); + } + + TEST_F(SpawnableEntitiesManagerTest, SpawnAllEntities_AllAliasesWithAdditional_SourceAndTargetComponentsMerged) + { + using namespace AzFramework; + static constexpr size_t NumEntities = 4; + FillSpawnable(NumEntities); + constexpr bool requiresMatchingEntityIds = false; + AZ::Data::Asset target = CreateTargetSpawnable(4, requiresMatchingEntityIds); + InsertEntityAliases<4>( + { 0, 1, 2, 3 }, { 0, 1, 2, 3 }, + { Spawnable::EntityAliasType::Additional, Spawnable::EntityAliasType::Additional, Spawnable::EntityAliasType::Additional, + Spawnable::EntityAliasType::Additional }, + &target); + + size_t spawnedEntitiesCount = 0; + bool allAdded = false; + bool allEntityIdsPatched = false; + auto callback = [&spawnedEntitiesCount, &allAdded, &allEntityIdsPatched]( + AzFramework::EntitySpawnTicket::Id, AzFramework::SpawnableConstEntityContainerView entities) + { + spawnedEntitiesCount += entities.size(); + allAdded = IsEveryOtherEntityAReplacement(entities); + allEntityIdsPatched = DoParentEntityIdsMatch(entities); + }; + AzFramework::SpawnAllEntitiesOptionalArgs optionalArgs; + optionalArgs.m_completionCallback = AZStd::move(callback); + m_manager->SpawnAllEntities(*m_ticket, AZStd::move(optionalArgs)); + m_manager->ProcessQueue(AzFramework::SpawnableEntitiesManager::CommandQueuePriority::Regular); + + EXPECT_EQ(8, spawnedEntitiesCount); + EXPECT_TRUE(allAdded); + EXPECT_TRUE(allEntityIdsPatched); + } + + TEST_F(SpawnableEntitiesManagerTest, SpawnAllEntities_AllAliasesWithMerge_SourceAndTargetComponentsMerged) + { + using namespace AzFramework; + static constexpr size_t NumEntities = 4; + FillSpawnable(NumEntities); + constexpr bool requiresMatchingEntityIds = true; + AZ::Data::Asset target = CreateTargetSpawnable(4, requiresMatchingEntityIds); + InsertEntityAliases<4>( + { 0, 1, 2, 3 }, { 0, 1, 2, 3 }, + { Spawnable::EntityAliasType::Merge, Spawnable::EntityAliasType::Merge, Spawnable::EntityAliasType::Merge, + Spawnable::EntityAliasType::Merge }, + &target); + + size_t spawnedEntitiesCount = 0; + bool allMerged = false; + bool allEntityIdsPatched = false; + auto callback = [&spawnedEntitiesCount, &allMerged, &allEntityIdsPatched]( + AzFramework::EntitySpawnTicket::Id, AzFramework::SpawnableConstEntityContainerView entities) + { + spawnedEntitiesCount += entities.size(); + allMerged = AreAllMerged(entities); + allEntityIdsPatched = DoParentEntityIdsMatch(entities); + }; + AzFramework::SpawnAllEntitiesOptionalArgs optionalArgs; + optionalArgs.m_completionCallback = AZStd::move(callback); + m_manager->SpawnAllEntities(*m_ticket, AZStd::move(optionalArgs)); + m_manager->ProcessQueue(AzFramework::SpawnableEntitiesManager::CommandQueuePriority::Regular); + + EXPECT_EQ(4, spawnedEntitiesCount); + EXPECT_TRUE(allMerged); + EXPECT_TRUE(allEntityIdsPatched); + } // // SpawnEntities @@ -403,7 +766,7 @@ namespace UnitTest static constexpr size_t NumEntities = 4; FillSpawnable(NumEntities); - AZStd::vector indices = { 0, 2, 3, 1 }; + AZStd::vector indices = { 0, 2, 3, 1 }; size_t spawnedEntitiesCount = 0; auto callback = [&spawnedEntitiesCount](AzFramework::EntitySpawnTicket::Id, AzFramework::SpawnableConstEntityContainerView entities) @@ -423,7 +786,7 @@ namespace UnitTest static constexpr size_t NumEntities = 1; FillSpawnable(NumEntities); - AZStd::vector indices = { 0, 0 }; + AZStd::vector indices = { 0, 0 }; size_t spawnedEntitiesCount = 0; auto callback = @@ -444,7 +807,7 @@ namespace UnitTest static constexpr size_t NumEntities = 4; FillSpawnable(NumEntities); - AZStd::vector indices = { 0, 2, 3, 1 }; + AZStd::vector indices = { 0, 2, 3, 1 }; size_t spawnedEntitiesCount = 0; auto callback = @@ -467,7 +830,7 @@ namespace UnitTest FillSpawnable(NumEntities); CreateSingleParent(); - AZStd::vector indices = { 0, 1, 2, 3 }; + AZStd::vector indices = { 0, 1, 2, 3 }; AZStd::vector parents; auto callback = [&parents](AzFramework::EntitySpawnTicket::Id, AzFramework::SpawnableConstEntityContainerView entities) @@ -499,7 +862,7 @@ namespace UnitTest FillSpawnable(NumEntities); CreateSingleParent(); - AZStd::vector indices = { 0, 1, 2, 3 }; + AZStd::vector indices = { 0, 1, 2, 3 }; AZStd::vector parents; auto callback = @@ -754,6 +1117,160 @@ namespace UnitTest m_manager->ProcessQueue(AzFramework::SpawnableEntitiesManager::CommandQueuePriority::Regular); } + TEST_F(SpawnableEntitiesManagerTest, SpawnEntities_AllAliasesWithDisabled_NoEntitiesSpawned) + { + using namespace AzFramework; + static constexpr size_t NumEntities = 4; + FillSpawnable(NumEntities); + + InsertEntityAliases( + { 0, 1, 2, 3 }, { 0, 1, 2, 3 }, + { Spawnable::EntityAliasType::Disable, Spawnable::EntityAliasType::Disable, Spawnable::EntityAliasType::Disable, + Spawnable::EntityAliasType::Disable }); + + AZStd::vector indices = { 0, 2, 3, 1 }; + + size_t spawnedEntitiesCount = 0; + auto callback = [&spawnedEntitiesCount](AzFramework::EntitySpawnTicket::Id, AzFramework::SpawnableConstEntityContainerView entities) + { + spawnedEntitiesCount += entities.size(); + }; + AzFramework::SpawnEntitiesOptionalArgs optionalArgs; + optionalArgs.m_completionCallback = AZStd::move(callback); + m_manager->SpawnEntities(*m_ticket, AZStd::move(indices), AZStd::move(optionalArgs)); + m_manager->ProcessQueue(AzFramework::SpawnableEntitiesManager::CommandQueuePriority::Regular); + + EXPECT_EQ(0, spawnedEntitiesCount); + } + + TEST_F(SpawnableEntitiesManagerTest, SpawnEntities_SomeAliasesWithDisabled_RegularEntitiesAreSpawned) + { + using namespace AzFramework; + FillSpawnable(8); + InsertEntityAliases<3>( + { 1, 3, 6 }, { 1, 3, 6 }, + { Spawnable::EntityAliasType::Disable, Spawnable::EntityAliasType::Disable, Spawnable::EntityAliasType::Disable }); + + AZStd::vector indices = { 0, 2, 3, 1, 2, 3, 0, 1, 6, 4, 5, 7, 4, 1, 0, 6 }; + + size_t spawnedEntitiesCount = 0; + auto callback = [&spawnedEntitiesCount](AzFramework::EntitySpawnTicket::Id, AzFramework::SpawnableConstEntityContainerView entities) + { + spawnedEntitiesCount += entities.size(); + }; + AzFramework::SpawnEntitiesOptionalArgs optionalArgs; + optionalArgs.m_completionCallback = AZStd::move(callback); + m_manager->SpawnEntities(*m_ticket, AZStd::move(indices), AZStd::move(optionalArgs)); + m_manager->ProcessQueue(AzFramework::SpawnableEntitiesManager::CommandQueuePriority::Regular); + + EXPECT_EQ(9, spawnedEntitiesCount); + } + + TEST_F(SpawnableEntitiesManagerTest, SpawnEntities_AllAliasesWithReplace_EntitiesSpawnedFromTarget) + { + using namespace AzFramework; + static constexpr size_t NumEntities = 4; + FillSpawnable(NumEntities); + constexpr bool requiresMatchingEntityIds = true; + AZ::Data::Asset target = CreateTargetSpawnable(4, requiresMatchingEntityIds); + InsertEntityAliases<4>( + { 0, 1, 2, 3 }, { 0, 1, 2, 3 }, + { Spawnable::EntityAliasType::Replace, Spawnable::EntityAliasType::Replace, Spawnable::EntityAliasType::Replace, + Spawnable::EntityAliasType::Replace }, + &target); + + AZStd::vector indices = { 0, 2, 3, 1 }; + + size_t spawnedEntitiesCount = 0; + bool allReplaced = false; + bool allEntityIdsPatched = false; + auto callback = [&spawnedEntitiesCount, &allReplaced, &allEntityIdsPatched]( + AzFramework::EntitySpawnTicket::Id, AzFramework::SpawnableConstEntityContainerView entities) + { + spawnedEntitiesCount += entities.size(); + allReplaced = AreAllEntitiesReplaced(entities); + allEntityIdsPatched = DoParentEntityIdsMatch(entities); + }; + AzFramework::SpawnEntitiesOptionalArgs optionalArgs; + optionalArgs.m_completionCallback = AZStd::move(callback); + m_manager->SpawnEntities(*m_ticket, AZStd::move(indices), AZStd::move(optionalArgs)); + m_manager->ProcessQueue(AzFramework::SpawnableEntitiesManager::CommandQueuePriority::Regular); + + EXPECT_EQ(4, spawnedEntitiesCount); + EXPECT_TRUE(allReplaced); + EXPECT_TRUE(allEntityIdsPatched); + } + + TEST_F(SpawnableEntitiesManagerTest, SpawnEntities_AllAliasesWithAdditional_SourceAndTargetComponentsMerged) + { + using namespace AzFramework; + static constexpr size_t NumEntities = 4; + FillSpawnable(NumEntities); + constexpr bool requiresMatchingEntityIds = false; + AZ::Data::Asset target = CreateTargetSpawnable(4, requiresMatchingEntityIds); + InsertEntityAliases<4>( + { 0, 1, 2, 3 }, { 0, 1, 2, 3 }, + { Spawnable::EntityAliasType::Additional, Spawnable::EntityAliasType::Additional, Spawnable::EntityAliasType::Additional, + Spawnable::EntityAliasType::Additional }, + &target); + + AZStd::vector indices = { 0, 2, 3, 1 }; + + size_t spawnedEntitiesCount = 0; + bool allAdded = false; + bool allEntityIdsPatched = false; + auto callback = + [&spawnedEntitiesCount, &allAdded, &allEntityIdsPatched]( + AzFramework::EntitySpawnTicket::Id, AzFramework::SpawnableConstEntityContainerView entities) + { + spawnedEntitiesCount += entities.size(); + allAdded = IsEveryOtherEntityAReplacement(entities); + allEntityIdsPatched = DoParentEntityIdsMatch(entities); + }; + AzFramework::SpawnEntitiesOptionalArgs optionalArgs; + optionalArgs.m_completionCallback = AZStd::move(callback); + m_manager->SpawnEntities(*m_ticket, AZStd::move(indices), AZStd::move(optionalArgs)); + m_manager->ProcessQueue(AzFramework::SpawnableEntitiesManager::CommandQueuePriority::Regular); + + EXPECT_EQ(8, spawnedEntitiesCount); + EXPECT_TRUE(allAdded); + EXPECT_TRUE(allEntityIdsPatched); + } + + TEST_F(SpawnableEntitiesManagerTest, SpawnEntities_AllAliasesWithMerge_SourceAndTargetComponentsMerged) + { + using namespace AzFramework; + static constexpr size_t NumEntities = 4; + FillSpawnable(NumEntities); + constexpr bool requiresMatchingEntityIds = true; + AZ::Data::Asset target = CreateTargetSpawnable(4, requiresMatchingEntityIds); + InsertEntityAliases<4>( + { 0, 1, 2, 3 }, { 0, 1, 2, 3 }, + { Spawnable::EntityAliasType::Merge, Spawnable::EntityAliasType::Merge, Spawnable::EntityAliasType::Merge, + Spawnable::EntityAliasType::Merge }, + &target); + + AZStd::vector indices = { 0, 2, 3, 1 }; + + size_t spawnedEntitiesCount = 0; + bool allMerged = false; + bool allEntityIdsPatched = false; + auto callback = [&spawnedEntitiesCount, &allMerged, &allEntityIdsPatched]( + AzFramework::EntitySpawnTicket::Id, AzFramework::SpawnableConstEntityContainerView entities) + { + spawnedEntitiesCount += entities.size(); + allMerged = AreAllMerged(entities); + allEntityIdsPatched = DoParentEntityIdsMatch(entities); + }; + AzFramework::SpawnEntitiesOptionalArgs optionalArgs; + optionalArgs.m_completionCallback = AZStd::move(callback); + m_manager->SpawnEntities(*m_ticket, AZStd::move(indices), AZStd::move(optionalArgs)); + m_manager->ProcessQueue(AzFramework::SpawnableEntitiesManager::CommandQueuePriority::Regular); + + EXPECT_EQ(4, spawnedEntitiesCount); + EXPECT_TRUE(allMerged); + EXPECT_TRUE(allEntityIdsPatched); + } // // DespawnAllEntities @@ -873,6 +1390,36 @@ namespace UnitTest // ClaimEntities // + TEST_F(SpawnableEntitiesManagerTest, ClaimEntities_Call_AllEntitiesWereClaimedAndNotDeleted) + { + static constexpr size_t NumEntities = 4; + FillSpawnable(NumEntities); + + AZStd::vector claimedEntities; + auto callback = [&claimedEntities](AzFramework::EntitySpawnTicket::Id, AzFramework::SpawnableEntityContainerView container) + { + for (AZ::Entity* entity : container) + { + claimedEntities.push_back(entity); + } + }; + + { + AzFramework::EntitySpawnTicket ticket(*m_spawnableAsset); + m_manager->SpawnAllEntities(ticket); + m_manager->ClaimEntities(ticket, AZStd::move(callback)); + m_manager->ProcessQueue(AzFramework::SpawnableEntitiesManager::CommandQueuePriority::Regular); + } + + EXPECT_EQ(NumEntities, claimedEntities.size()); + + // If these calls fail it means that the ticket has still deleted the entities, so they weren't properly claimed. + for (AZ::Entity* entity : claimedEntities) + { + delete entity; + } + } + TEST_F(SpawnableEntitiesManagerTest, ClaimEntities_DeleteTicketBeforeCall_NoCrash) { auto callback = [](AzFramework::EntitySpawnTicket::Id, AzFramework::SpawnableEntityContainerView) {}; diff --git a/Code/Framework/AzFramework/Tests/Spawnable/SpawnableTests.cpp b/Code/Framework/AzFramework/Tests/Spawnable/SpawnableTests.cpp new file mode 100644 index 0000000000..94641037f0 --- /dev/null +++ b/Code/Framework/AzFramework/Tests/Spawnable/SpawnableTests.cpp @@ -0,0 +1,513 @@ +/* + * Copyright (c) Contributors to the Open 3D Engine Project. + * For complete copyright and license terms please see the LICENSE at the root of this distribution. + * + * SPDX-License-Identifier: Apache-2.0 OR MIT + * + */ + +#include +#include +#include +#include + +namespace UnitTest +{ + class SpawnableTest : public AllocatorsFixture + { + public: + static constexpr size_t DefaultEntityAliasTestCount = 8; + + void SetUp() override + { + AllocatorsFixture::SetUp(); + + m_spawnable = aznew AzFramework::Spawnable(); + } + + void TearDown() override + { + delete m_spawnable; + m_spawnable = nullptr; + + AllocatorsFixture::TearDown(); + } + + void InsertEntities(size_t count) + { + AzFramework::Spawnable::EntityList& entities = m_spawnable->GetEntities(); + entities.reserve(entities.size() + count); + for (size_t i = 0; i < count; ++i) + { + entities.emplace_back(AZStd::make_unique()); + } + } + + template + void InsertEntityAliases( + const AZStd::array& sourceIds, + const AZStd::array& targetIds, + const AZStd::array& aliasTypes, + bool queueLoad = false) + { + AzFramework::Spawnable::EntityAliasVisitor visitor = m_spawnable->TryGetAliases(); + + for (uint32_t i = 0; i < Count; ++i) + { + AZ::Data::Asset spawnable( + AZ::Data::AssetId(AZ::Uuid("{4CBEC17A-52D6-42D5-9037-F4C05B9CE1D9}"), i), azrtti_typeid()); + visitor.AddAlias(spawnable, AZ::Crc32(i), sourceIds[i], targetIds[i], aliasTypes[i], queueLoad); + } + } + + template + void InsertEntityAliases(bool queueLoad) + { + using namespace AzFramework; + + AZStd::array ids; + for (uint32_t i=0; i(Count); ++i) + { + ids[i] = i; + } + + AZStd::array aliasTypes; + for (uint32_t i = 0; i < aznumeric_cast(Count); ++i) + { + aliasTypes[i] = Spawnable::EntityAliasType::Replace; + } + + InsertEntityAliases(ids, ids, aliasTypes, queueLoad); + } + + template + void InsertEntityAliases() + { + InsertEntityAliases(false); + } + + protected: + AzFramework::Spawnable* m_spawnable; + }; + + + // + // TryGetAliasesConst + // + + TEST_F(SpawnableTest, TryGetAliasesConst_GetVisitor_VisitorDataIsAvailable) + { + AzFramework::Spawnable::EntityAliasConstVisitor visitor = m_spawnable->TryGetAliasesConst(); + EXPECT_TRUE(visitor.IsValid()); + } + + TEST_F(SpawnableTest, TryGetAliasesConst_VisitorThatIsNotReadShared_VisitorDataIsNotAvailable) + { + AzFramework::Spawnable::EntityAliasVisitor readWriteVisitor = m_spawnable->TryGetAliases(); + ASSERT_TRUE(readWriteVisitor.IsValid()); + + AzFramework::Spawnable::EntityAliasConstVisitor visitor = m_spawnable->TryGetAliasesConst(); + EXPECT_FALSE(visitor.IsValid()); + } + + TEST_F(SpawnableTest, TryGetAliasesConst_VisitorThatIsAlreadyReadShared_VisitorDataIsAvailable) + { + AzFramework::Spawnable::EntityAliasConstVisitor readVisitor = m_spawnable->TryGetAliasesConst(); + ASSERT_TRUE(readVisitor.IsValid()); + + AzFramework::Spawnable::EntityAliasConstVisitor visitor = m_spawnable->TryGetAliasesConst(); + EXPECT_TRUE(visitor.IsValid()); + } + + + // + // TryGetAliases + // + + TEST_F(SpawnableTest, TryGetAliases_GetVisitor_VisitorDataIsAvailable) + { + AzFramework::Spawnable::EntityAliasVisitor visitor = m_spawnable->TryGetAliases(); + EXPECT_TRUE(visitor.IsValid()); + } + + TEST_F(SpawnableTest, TryGetAliasesConst_VisitorThatIsAlreadyShared_VisitorDataNotIsAvailable) + { + AzFramework::Spawnable::EntityAliasConstVisitor readVisitor = m_spawnable->TryGetAliasesConst(); + ASSERT_TRUE(readVisitor.IsValid()); + + AzFramework::Spawnable::EntityAliasVisitor visitor = m_spawnable->TryGetAliases(); + EXPECT_FALSE(visitor.IsValid()); + } + + + // + // EntityAliasVisitor + // + + + // + // HasAliases + // + + TEST_F(SpawnableTest, EntityAliasVisitor_HasAliases_EmptyAliasList_ReturnsFalse) + { + AzFramework::Spawnable::EntityAliasVisitor visitor = m_spawnable->TryGetAliases(); + ASSERT_TRUE(visitor.IsValid()); + + EXPECT_FALSE(visitor.HasAliases()); + } + + TEST_F(SpawnableTest, EntityAliasVisitor_HasAliases_FilledInAliasList_ReturnsTrue) + { + InsertEntities(8); + InsertEntityAliases<8>(); + AzFramework::Spawnable::EntityAliasVisitor visitor = m_spawnable->TryGetAliases(); + ASSERT_TRUE(visitor.IsValid()); + + EXPECT_TRUE(visitor.HasAliases()); + } + + + // + // Optimize + // + + TEST_F(SpawnableTest, EntityAliasVisitor_Optimize_SortEntityAliases_AliasesAreSortedBySourceAndTargetId) + { + InsertEntities(DefaultEntityAliasTestCount); + InsertEntityAliases(); + AzFramework::Spawnable::EntityAliasVisitor visitor = m_spawnable->TryGetAliases(); + ASSERT_TRUE(visitor.IsValid()); + + // Optimize doesn't need to be explicitly called because the setup of the aliases will cause the alias list to be sorted and optimized. + + uint32_t sourceIndex = 0; + uint32_t targetIndex = 0; + for (const AzFramework::Spawnable::EntityAlias& alias : visitor) + { + if (alias.m_sourceIndex != sourceIndex) + { + ASSERT_LE(sourceIndex, alias.m_sourceIndex); + } + else + { + ASSERT_LE(targetIndex, alias.m_targetIndex); + } + sourceIndex = alias.m_sourceIndex; + targetIndex = alias.m_targetIndex; + } + } + + TEST_F( + SpawnableTest, EntityAliasVisitor_Optimize_RemoveUnused_OnlySecondToLastAliasRemains) + { + using namespace AzFramework; + InsertEntities(8); + InsertEntityAliases<8>( + { 0, 0, 0, 0, 0, 0, 0, 0 }, { 0, 1, 2, 3, 4, 5, 6, 7 }, + { Spawnable::EntityAliasType::Replace, Spawnable::EntityAliasType::Original, Spawnable::EntityAliasType::Disable, + Spawnable::EntityAliasType::Replace, Spawnable::EntityAliasType::Original, Spawnable::EntityAliasType::Disable, + Spawnable::EntityAliasType::Replace, Spawnable::EntityAliasType::Original }); + + AzFramework::Spawnable::EntityAliasVisitor visitor = m_spawnable->TryGetAliases(); + ASSERT_TRUE(visitor.IsValid()); + + EXPECT_EQ(1, AZStd::distance(visitor.begin(), visitor.end())); + EXPECT_EQ(Spawnable::EntityAliasType::Replace, visitor.begin()->m_aliasType); + EXPECT_EQ(6, visitor.begin()->m_targetIndex); + } + + TEST_F(SpawnableTest, EntityAliasVisitor_Optimize_AddAdditional_ThreeAdditionalAliasesAreAdded) + { + using namespace AzFramework; + InsertEntities(8); + InsertEntityAliases<8>( + { 0, 0, 0, 0, 1, 2, 2, 2 }, { 0, 1, 2, 3, 4, 5, 6, 7 }, + { Spawnable::EntityAliasType::Additional, Spawnable::EntityAliasType::Additional, Spawnable::EntityAliasType::Additional, + Spawnable::EntityAliasType::Additional, Spawnable::EntityAliasType::Additional, Spawnable::EntityAliasType::Additional, + Spawnable::EntityAliasType::Additional, Spawnable::EntityAliasType::Additional }); + + AzFramework::Spawnable::EntityAliasVisitor visitor = m_spawnable->TryGetAliases(); + ASSERT_TRUE(visitor.IsValid()); + + EXPECT_EQ(11, AZStd::distance(visitor.begin(), visitor.end())); + EXPECT_EQ(Spawnable::EntityAliasType::Original, visitor.begin()->m_aliasType); + EXPECT_EQ(Spawnable::EntityAliasType::Original, visitor.begin()[5].m_aliasType); + EXPECT_EQ(Spawnable::EntityAliasType::Original, visitor.begin()[7].m_aliasType); + } + + TEST_F(SpawnableTest, EntityAliasVisitor_Optimize_OriginalsOnly_AliasListIsEmpty) + { + using namespace AzFramework; + InsertEntities(8); + InsertEntityAliases<8>( + { 0, 0, 0, 0, 0, 0, 0, 0 }, { 0, 1, 2, 3, 4, 5, 6, 7 }, + { Spawnable::EntityAliasType::Original, Spawnable::EntityAliasType::Original, Spawnable::EntityAliasType::Original, + Spawnable::EntityAliasType::Original, Spawnable::EntityAliasType::Original, Spawnable::EntityAliasType::Original, + Spawnable::EntityAliasType::Original, Spawnable::EntityAliasType::Original }); + + AzFramework::Spawnable::EntityAliasVisitor visitor = m_spawnable->TryGetAliases(); + ASSERT_TRUE(visitor.IsValid()); + + EXPECT_EQ(0, AZStd::distance(visitor.begin(), visitor.end())); + } + + TEST_F(SpawnableTest, EntityAliasVisitor_Optimize_MixedOriginals_AllOriginalsRemoved) + { + using namespace AzFramework; + InsertEntities(8); + InsertEntityAliases<8>( + { 0, 0, 0, 1, 1, 2, 2, 2 }, { 0, 1, 2, 3, 4, 5, 6, 7 }, + { Spawnable::EntityAliasType::Original, Spawnable::EntityAliasType::Original, Spawnable::EntityAliasType::Original, + Spawnable::EntityAliasType::Original, Spawnable::EntityAliasType::Disable, Spawnable::EntityAliasType::Original, + Spawnable::EntityAliasType::Replace, Spawnable::EntityAliasType::Original }); + + AzFramework::Spawnable::EntityAliasVisitor visitor = m_spawnable->TryGetAliases(); + ASSERT_TRUE(visitor.IsValid()); + + EXPECT_EQ(2, AZStd::distance(visitor.begin(), visitor.end())); + EXPECT_EQ(Spawnable::EntityAliasType::Disable, visitor.begin()->m_aliasType); + EXPECT_EQ(Spawnable::EntityAliasType::Replace, visitor.begin()[1].m_aliasType); + } + + TEST_F(SpawnableTest, EntityAliasVisitor_Optimize_MergeAfterOriginal_NoAdditionalOriginalIsInserted) + { + using namespace AzFramework; + InsertEntities(8); + InsertEntityAliases<8>( + { 0, 0, 1, 1, 2, 2, 2, 2 }, { 0, 1, 2, 3, 4, 5, 6, 7 }, + { Spawnable::EntityAliasType::Original, Spawnable::EntityAliasType::Merge, Spawnable::EntityAliasType::Replace, + Spawnable::EntityAliasType::Merge, Spawnable::EntityAliasType::Original, Spawnable::EntityAliasType::Original, + Spawnable::EntityAliasType::Original, Spawnable::EntityAliasType::Original }); + + AzFramework::Spawnable::EntityAliasVisitor visitor = m_spawnable->TryGetAliases(); + ASSERT_TRUE(visitor.IsValid()); + + EXPECT_EQ(4, AZStd::distance(visitor.begin(), visitor.end())); + EXPECT_EQ(Spawnable::EntityAliasType::Original, visitor.begin()->m_aliasType); + EXPECT_EQ(Spawnable::EntityAliasType::Merge, visitor.begin()[1].m_aliasType); + EXPECT_EQ(Spawnable::EntityAliasType::Replace, visitor.begin()[2].m_aliasType); + EXPECT_EQ(Spawnable::EntityAliasType::Merge, visitor.begin()[3].m_aliasType); + } + + + // + // UpdateAliasType + // + + TEST_F(SpawnableTest, EntityAliasVisitor_UpdateAliasType_AllToOriginal_NoAliasesAfterOptimization) + { + using namespace AzFramework; + InsertEntities(8); + InsertEntityAliases<8>( + { 0, 1, 2, 3, 4, 5, 6, 7 }, { 0, 1, 2, 3, 4, 5, 6, 7 }, + { Spawnable::EntityAliasType::Replace, Spawnable::EntityAliasType::Replace, Spawnable::EntityAliasType::Replace, + Spawnable::EntityAliasType::Replace, Spawnable::EntityAliasType::Replace, Spawnable::EntityAliasType::Replace, + Spawnable::EntityAliasType::Replace, Spawnable::EntityAliasType::Replace }); + + AzFramework::Spawnable::EntityAliasVisitor visitor = m_spawnable->TryGetAliases(); + ASSERT_TRUE(visitor.IsValid()); + + for (uint32_t i = 0; i < 8; ++i) + { + visitor.UpdateAliasType(i, Spawnable::EntityAliasType::Original); + } + + for (const Spawnable::EntityAlias& alias : visitor) + { + EXPECT_EQ(Spawnable::EntityAliasType::Original, alias.m_aliasType); + } + + visitor.Optimize(); + + EXPECT_EQ(0, AZStd::distance(visitor.begin(), visitor.end())); + } + + + // + // UpdateAliases + // + + TEST_F(SpawnableTest, EntityAliasVisitor_UpdateAliases_AllToOriginal_NoAliasesAfterOptimization) + { + using namespace AzFramework; + InsertEntities(8); + InsertEntityAliases<8>( + { 0, 1, 2, 3, 4, 5, 6, 7 }, { 0, 1, 2, 3, 4, 5, 6, 7 }, + { Spawnable::EntityAliasType::Replace, Spawnable::EntityAliasType::Replace, Spawnable::EntityAliasType::Replace, + Spawnable::EntityAliasType::Replace, Spawnable::EntityAliasType::Replace, Spawnable::EntityAliasType::Replace, + Spawnable::EntityAliasType::Replace, Spawnable::EntityAliasType::Replace }); + + AzFramework::Spawnable::EntityAliasVisitor visitor = m_spawnable->TryGetAliases(); + ASSERT_TRUE(visitor.IsValid()); + + auto callback = + [](Spawnable::EntityAliasType& aliasType, bool& /*queueLoad*/, const AZ::Data::Asset& /*aliasedSpawnable*/, + const AZ::Crc32 /*tag*/, const uint32_t /*sourceIndex*/, const uint32_t /*targetIndex*/) + { + aliasType = Spawnable::EntityAliasType::Original; + }; + visitor.UpdateAliases(AZStd::move(callback)); + + for (const Spawnable::EntityAlias& alias : visitor) + { + EXPECT_EQ(Spawnable::EntityAliasType::Original, alias.m_aliasType); + } + + visitor.Optimize(); + + EXPECT_EQ(0, AZStd::distance(visitor.begin(), visitor.end())); + } + + TEST_F(SpawnableTest, EntityAliasVisitor_UpdateAliases_FilterByTag_OnlyOneAliasUpdated) + { + using namespace AzFramework; + InsertEntities(8); + InsertEntityAliases<8>( + { 0, 1, 2, 3, 4, 5, 6, 7 }, { 0, 1, 2, 3, 4, 5, 6, 7 }, + { Spawnable::EntityAliasType::Replace, Spawnable::EntityAliasType::Replace, Spawnable::EntityAliasType::Replace, + Spawnable::EntityAliasType::Replace, Spawnable::EntityAliasType::Replace, Spawnable::EntityAliasType::Replace, + Spawnable::EntityAliasType::Replace, Spawnable::EntityAliasType::Replace }); + + AzFramework::Spawnable::EntityAliasVisitor visitor = m_spawnable->TryGetAliases(); + ASSERT_TRUE(visitor.IsValid()); + + bool correctTag = false; + size_t numberOfUpdates = 0; + auto callback = [&correctTag, &numberOfUpdates](Spawnable::EntityAliasType& aliasType, bool& /*queueLoad*/, + const AZ::Data::Asset& /*aliasedSpawnable*/, const AZ::Crc32 tag, const uint32_t /*sourceIndex*/, + const uint32_t /*targetIndex*/) + { + correctTag = (tag == AZ::Crc32(3)); + numberOfUpdates++; + aliasType = Spawnable::EntityAliasType::Original; + }; + visitor.UpdateAliases(AZ::Crc32(3), AZStd::move(callback)); + + EXPECT_EQ(Spawnable::EntityAliasType::Original, visitor.begin()[3].m_aliasType); + } + + + // + // AreAllSpawnablesReady + // + + TEST_F(SpawnableTest, EntityAliasVisitor_AreAllSpawnablesReady_CheckFakeLoadedAssets_ReturnsTrue) + { + using namespace AzFramework; + InsertEntities(DefaultEntityAliasTestCount); + InsertEntityAliases(); + + AzFramework::Spawnable::EntityAliasVisitor visitor = m_spawnable->TryGetAliases(); + ASSERT_TRUE(visitor.IsValid()); + + EXPECT_TRUE(visitor.AreAllSpawnablesReady()); + } + + TEST_F(SpawnableTest, EntityAliasVisitor_AreAllSpawnablesReady_CheckFakeNotLoadedAssets_ReturnsFalse) + { + using namespace AzFramework; + InsertEntities(8); + InsertEntityAliases<8>(true); + + AzFramework::Spawnable::EntityAliasVisitor visitor = m_spawnable->TryGetAliases(); + ASSERT_TRUE(visitor.IsValid()); + + EXPECT_FALSE(visitor.AreAllSpawnablesReady()); + } + + + // + // ListTargetSpawnables + // + + TEST_F(SpawnableTest, EntityAliasVisitor_ListTargetSpawnables_ListAllTargetAssets_AllTargetsListed) + { + using namespace AzFramework; + InsertEntities(DefaultEntityAliasTestCount); + InsertEntityAliases(); + + AzFramework::Spawnable::EntityAliasVisitor visitor = m_spawnable->TryGetAliases(); + ASSERT_TRUE(visitor.IsValid()); + + size_t count = 0; + bool correctAssets = true; + auto callback = [&count, &correctAssets](const AZ::Data::Asset& targetSpawnable) + { + correctAssets = correctAssets && (targetSpawnable.GetId().m_subId == count); + count++; + }; + visitor.ListTargetSpawnables(callback); + + EXPECT_EQ(8, count); + EXPECT_TRUE(correctAssets); + } + + TEST_F(SpawnableTest, EntityAliasVisitor_ListTargetSpawnables_ListTaggedTargetAssets_OneAssetListed) + { + using namespace AzFramework; + InsertEntities(DefaultEntityAliasTestCount); + InsertEntityAliases(); + + AzFramework::Spawnable::EntityAliasVisitor visitor = m_spawnable->TryGetAliases(); + ASSERT_TRUE(visitor.IsValid()); + + size_t count = 0; + bool correctAsset = false; + auto callback = [&count, &correctAsset](const AZ::Data::Asset& targetSpawnable) + { + correctAsset = (targetSpawnable.GetId().m_subId == 3); + count++; + }; + visitor.ListTargetSpawnables(AZ::Crc32(3), callback); + + EXPECT_EQ(1, count); + EXPECT_TRUE(correctAsset); + } + + + // + // ListSpawnablesRequiringLoad + // + + TEST_F(SpawnableTest, EntityAliasVisitor_ListSpawnablesRequiringLoad_AllSetToLoaded_AllTargetsListed) + { + using namespace AzFramework; + InsertEntities(DefaultEntityAliasTestCount); + InsertEntityAliases(true); + + AzFramework::Spawnable::EntityAliasVisitor visitor = m_spawnable->TryGetAliases(); + ASSERT_TRUE(visitor.IsValid()); + + size_t count = 0; + bool correctAssets = true; + auto callback = [&count, &correctAssets](const AZ::Data::Asset& targetSpawnable) + { + correctAssets = correctAssets && (targetSpawnable.GetId().m_subId == count); + count++; + }; + visitor.ListSpawnablesRequiringLoad(callback); + + EXPECT_EQ(8, count); + EXPECT_TRUE(correctAssets); + } + + TEST_F(SpawnableTest, EntityAliasVisitor_ListSpawnablesRequiringLoad_AllSetToNotLoaded_NoTargetsListed) + { + using namespace AzFramework; + InsertEntities(DefaultEntityAliasTestCount); + InsertEntityAliases(false); + + AzFramework::Spawnable::EntityAliasVisitor visitor = m_spawnable->TryGetAliases(); + ASSERT_TRUE(visitor.IsValid()); + + size_t count = 0; + auto callback = [&count](const AZ::Data::Asset& /*targetSpawnable*/) + { + count++; + }; + visitor.ListSpawnablesRequiringLoad(callback); + + EXPECT_EQ(0, count); + } +} // namespace UnitTest diff --git a/Code/Framework/AzFramework/Tests/Utils/Printers.cpp b/Code/Framework/AzFramework/Tests/Utils/Printers.cpp new file mode 100644 index 0000000000..91c9558be7 --- /dev/null +++ b/Code/Framework/AzFramework/Tests/Utils/Printers.cpp @@ -0,0 +1,32 @@ +/* + * Copyright (c) Contributors to the Open 3D Engine Project. + * For complete copyright and license terms please see the LICENSE at the root of this distribution. + * + * SPDX-License-Identifier: Apache-2.0 OR MIT + * + */ + +#include "Printers.h" + +#include + +#include +#include + +namespace AzFramework +{ + void PrintTo(const ScreenPoint& screenPoint, std::ostream* os) + { + *os << "(x: " << screenPoint.m_x << ", y: " << screenPoint.m_y << ")"; + } + + void PrintTo(const ScreenVector& screenVector, std::ostream* os) + { + *os << "(x: " << screenVector.m_x << ", y: " << screenVector.m_y << ")"; + } + + void PrintTo(const ScreenSize& screenSize, std::ostream* os) + { + *os << "(width: " << screenSize.m_width << ", height: " << screenSize.m_height << ")"; + } +} // namespace AzFramework diff --git a/Code/Framework/AzFramework/Tests/Utils/Printers.h b/Code/Framework/AzFramework/Tests/Utils/Printers.h new file mode 100644 index 0000000000..fc967eabe9 --- /dev/null +++ b/Code/Framework/AzFramework/Tests/Utils/Printers.h @@ -0,0 +1,20 @@ +/* + * Copyright (c) Contributors to the Open 3D Engine Project. + * For complete copyright and license terms please see the LICENSE at the root of this distribution. + * + * SPDX-License-Identifier: Apache-2.0 OR MIT + * + */ + +#include + +namespace AzFramework +{ + struct ScreenPoint; + struct ScreenVector; + struct ScreenSize; + + void PrintTo(const ScreenPoint& screenPoint, std::ostream* os); + void PrintTo(const ScreenVector& screenVector, std::ostream* os); + void PrintTo(const ScreenSize& screenSize, std::ostream* os); +} // namespace AzFramework diff --git a/Code/Framework/AzFramework/Tests/framework_shared_tests_files.cmake b/Code/Framework/AzFramework/Tests/framework_shared_tests_files.cmake index 85c00a2e8a..9427738e67 100644 --- a/Code/Framework/AzFramework/Tests/framework_shared_tests_files.cmake +++ b/Code/Framework/AzFramework/Tests/framework_shared_tests_files.cmake @@ -11,5 +11,7 @@ set(FILES Mocks/MockWindowRequests.h Utils/Utils.h Utils/Utils.cpp + Utils/Printers.h + Utils/Printers.cpp FrameworkApplicationFixture.h ) diff --git a/Code/Framework/AzFramework/Tests/frameworktests_files.cmake b/Code/Framework/AzFramework/Tests/frameworktests_files.cmake index 6c4f611352..e4877e34a9 100644 --- a/Code/Framework/AzFramework/Tests/frameworktests_files.cmake +++ b/Code/Framework/AzFramework/Tests/frameworktests_files.cmake @@ -10,6 +10,7 @@ set(FILES Main.cpp Spawnable/SpawnableEntitiesInterfaceTests.cpp Spawnable/SpawnableEntitiesManagerTests.cpp + Spawnable/SpawnableTests.cpp ArchiveCompressionTests.cpp ArchiveTests.cpp BehaviorEntityTests.cpp diff --git a/Code/Framework/AzFramework/Tests/terrain_mock_files.cmake b/Code/Framework/AzFramework/Tests/terrain_mock_files.cmake new file mode 100644 index 0000000000..590c64d88b --- /dev/null +++ b/Code/Framework/AzFramework/Tests/terrain_mock_files.cmake @@ -0,0 +1,11 @@ +# +# Copyright (c) Contributors to the Open 3D Engine Project. +# For complete copyright and license terms please see the LICENSE at the root of this distribution. +# +# SPDX-License-Identifier: Apache-2.0 OR MIT +# +# + +set(FILES + Mocks/Terrain/MockTerrainDataRequestBus.h +) \ No newline at end of file diff --git a/Code/Framework/AzGameFramework/AzGameFramework/Application/GameApplication.cpp b/Code/Framework/AzGameFramework/AzGameFramework/Application/GameApplication.cpp index f0417d206e..36acf2b063 100644 --- a/Code/Framework/AzGameFramework/AzGameFramework/Application/GameApplication.cpp +++ b/Code/Framework/AzGameFramework/AzGameFramework/Application/GameApplication.cpp @@ -87,7 +87,7 @@ namespace AzGameFramework AZ::SettingsRegistryMergeUtils::MergeSettingsToRegistry_ProjectRegistry(registry, AZ_TRAIT_OS_PLATFORM_CODENAME, specializations, &scratchBuffer); #endif - // Used the lowercase the platform name since the bootstrap.game...setreg is being loaded + // Used the lowercase the platform name since the bootstrap.game..setreg is being loaded // from the asset cache root where all the files are in lowercased from regardless of the filesystem case-sensitivity static constexpr char filename[] = "bootstrap.game." AZ_BUILD_CONFIGURATION_TYPE ".setreg"; diff --git a/Code/Framework/AzManipulatorTestFramework/Include/AzManipulatorTestFramework/ActionDispatcher.h b/Code/Framework/AzManipulatorTestFramework/Include/AzManipulatorTestFramework/ActionDispatcher.h index 06db67a05f..99f11c37da 100644 --- a/Code/Framework/AzManipulatorTestFramework/Include/AzManipulatorTestFramework/ActionDispatcher.h +++ b/Code/Framework/AzManipulatorTestFramework/Include/AzManipulatorTestFramework/ActionDispatcher.h @@ -39,6 +39,10 @@ namespace AzManipulatorTestFramework DerivedDispatcherT* MouseLButtonDown(); //! Set the left mouse button up. DerivedDispatcherT* MouseLButtonUp(); + //! Set the middle mouse button down. + DerivedDispatcherT* MouseMButtonDown(); + //! Set the middle mouse button up. + DerivedDispatcherT* MouseMButtonUp(); //! Send a double click event. DerivedDispatcherT* MouseLButtonDoubleClick(); //! Set the keyboard modifier button down. @@ -73,6 +77,8 @@ namespace AzManipulatorTestFramework virtual void CameraStateImpl(const AzFramework::CameraState& cameraState) = 0; virtual void MouseLButtonDownImpl() = 0; virtual void MouseLButtonUpImpl() = 0; + virtual void MouseMButtonDownImpl() = 0; + virtual void MouseMButtonUpImpl() = 0; virtual void MouseLButtonDoubleClickImpl() = 0; virtual void MousePositionImpl(const AzFramework::ScreenPoint& position) = 0; virtual void KeyboardModifierDownImpl(const AzToolsFramework::ViewportInteraction::KeyboardModifier& keyModifier) = 0; @@ -183,6 +189,22 @@ namespace AzManipulatorTestFramework return static_cast(this); } + template + DerivedDispatcherT* ActionDispatcher::MouseMButtonDown() + { + Log("Mouse middle button down"); + MouseMButtonDownImpl(); + return static_cast(this); + } + + template + DerivedDispatcherT* ActionDispatcher::MouseMButtonUp() + { + Log("Mouse middle button up"); + MouseMButtonUpImpl(); + return static_cast(this); + } + template DerivedDispatcherT* ActionDispatcher::MouseLButtonDoubleClick() { diff --git a/Code/Framework/AzManipulatorTestFramework/Include/AzManipulatorTestFramework/AzManipulatorTestFramework.h b/Code/Framework/AzManipulatorTestFramework/Include/AzManipulatorTestFramework/AzManipulatorTestFramework.h index 5f0179d6ad..865a571d3b 100644 --- a/Code/Framework/AzManipulatorTestFramework/Include/AzManipulatorTestFramework/AzManipulatorTestFramework.h +++ b/Code/Framework/AzManipulatorTestFramework/Include/AzManipulatorTestFramework/AzManipulatorTestFramework.h @@ -8,6 +8,7 @@ #pragma once +#include #include #include #include @@ -25,29 +26,33 @@ namespace AzManipulatorTestFramework { public: virtual ~ViewportInteractionInterface() = default; - //! Return the camera state. + //! Returns the camera state. virtual AzFramework::CameraState GetCameraState() = 0; - //! Set the camera state. + //! Sets the camera state. virtual void SetCameraState(const AzFramework::CameraState& cameraState) = 0; - //! Retrieve the debug display. + //! Retrieves the debug display. virtual AzFramework::DebugDisplayRequests& GetDebugDisplay() = 0; - //! Set if grid snapping is enabled or not. + //! Sets if grid snapping is enabled or not. virtual void SetGridSnapping(bool enabled) = 0; - //! Set if angular snapping is enabled or not. + //! Sets if angular snapping is enabled or not. virtual void SetAngularSnapping(bool enabled) = 0; - //! Set the grid size. + //! Sets the grid size. virtual void SetGridSize(float size) = 0; - //! Set the angular step. + //! Sets the angular step. virtual void SetAngularStep(float step) = 0; - //! Get the viewport id. - virtual int GetViewportId() const = 0; + //! Gets the viewport id. + virtual AzFramework::ViewportId GetViewportId() const = 0; //! Updates the visibility state. //! Updates which entities are currently visible given the current camera state. virtual void UpdateVisibility() = 0; - //! Set if sticky select is enabled or not. + //! Sets if sticky select is enabled or not. virtual void SetStickySelect(bool enabled) = 0; - //! Get default Editor Camera Position. + //! Gets default Editor Camera Position. virtual AZ::Vector3 DefaultEditorCameraPosition() const = 0; + //! Sets if icons are visible in the viewport. + virtual void SetIconsVisible(bool visible) = 0; + //! Sets if helpers are visible in the viewport. + virtual void SetHelpersVisible(bool visible) = 0; }; //! This interface is used to simulate the manipulator manager while the manipulators are under test. diff --git a/Code/Framework/AzManipulatorTestFramework/Include/AzManipulatorTestFramework/AzManipulatorTestFrameworkTestHelpers.h b/Code/Framework/AzManipulatorTestFramework/Include/AzManipulatorTestFramework/AzManipulatorTestFrameworkTestHelpers.h index f87f83c1b2..8528795206 100644 --- a/Code/Framework/AzManipulatorTestFramework/Include/AzManipulatorTestFramework/AzManipulatorTestFrameworkTestHelpers.h +++ b/Code/Framework/AzManipulatorTestFramework/Include/AzManipulatorTestFramework/AzManipulatorTestFrameworkTestHelpers.h @@ -26,10 +26,12 @@ namespace UnitTest using IndirectCallManipulatorViewportInteraction = AzManipulatorTestFramework::IndirectCallManipulatorViewportInteraction; using ImmediateModeActionDispatcher = AzManipulatorTestFramework::ImmediateModeActionDispatcher; + public: void SetUpEditorFixtureImpl() override { ToolsApplicationFixtureT::SetUpEditorFixtureImpl(); - m_viewportManipulatorInteraction = AZStd::make_unique(); + m_viewportManipulatorInteraction = + AZStd::make_unique(ToolsApplicationFixtureT::CreateDebugDisplayRequests()); m_actionDispatcher = AZStd::make_unique(*m_viewportManipulatorInteraction); m_cameraState = AzFramework::CreateIdentityDefaultCamera(AZ::Vector3::CreateZero(), AzManipulatorTestFramework::DefaultViewportSize); @@ -42,7 +44,6 @@ namespace UnitTest ToolsApplicationFixtureT::TearDownEditorFixtureImpl(); } - public: AzFramework::CameraState m_cameraState; AZStd::unique_ptr m_actionDispatcher; AZStd::unique_ptr m_viewportManipulatorInteraction; diff --git a/Code/Framework/AzManipulatorTestFramework/Include/AzManipulatorTestFramework/AzManipulatorTestFrameworkUtils.h b/Code/Framework/AzManipulatorTestFramework/Include/AzManipulatorTestFramework/AzManipulatorTestFrameworkUtils.h index 1dcbea2125..653644aefe 100644 --- a/Code/Framework/AzManipulatorTestFramework/Include/AzManipulatorTestFramework/AzManipulatorTestFrameworkUtils.h +++ b/Code/Framework/AzManipulatorTestFramework/Include/AzManipulatorTestFramework/AzManipulatorTestFrameworkUtils.h @@ -27,29 +27,6 @@ namespace AzManipulatorTestFramework const AZ::Vector3& position = AZ::Vector3::CreateZero(), float radius = 1.0f); - //! Create a mouse pick from the specified ray and screen point. - AzToolsFramework::ViewportInteraction::MousePick CreateMousePick( - const AZ::Vector3& origin, const AZ::Vector3& direction, const AzFramework::ScreenPoint& screenPoint); - - //! Build a mouse pick from the specified mouse position and camera state. - AzToolsFramework::ViewportInteraction::MousePick BuildMousePick( - const AzFramework::ScreenPoint& screenPoint, const AzFramework::CameraState& cameraState); - - //! Create a mouse interaction from the specified pick, buttons, interaction id and keyboard modifiers. - AzToolsFramework::ViewportInteraction::MouseInteraction CreateMouseInteraction( - const AzToolsFramework::ViewportInteraction::MousePick& mousePick, - AzToolsFramework::ViewportInteraction::MouseButtons buttons, - AzToolsFramework::ViewportInteraction::InteractionId interactionId, - AzToolsFramework::ViewportInteraction::KeyboardModifiers modifiers); - - //! Create a mouse buttons from the specified mouse button. - AzToolsFramework::ViewportInteraction::MouseButtons CreateMouseButtons(AzToolsFramework::ViewportInteraction::MouseButton button); - - //! Create a mouse interaction event from the specified interaction and event. - AzToolsFramework::ViewportInteraction::MouseInteractionEvent CreateMouseInteractionEvent( - const AzToolsFramework::ViewportInteraction::MouseInteraction& mouseInteraction, - AzToolsFramework::ViewportInteraction::MouseEvent event); - //! Dispatch a mouse event to the main manipulator manager via a bus call. void DispatchMouseInteractionEvent(const AzToolsFramework::ViewportInteraction::MouseInteractionEvent& event); diff --git a/Code/Framework/AzManipulatorTestFramework/Include/AzManipulatorTestFramework/DirectManipulatorViewportInteraction.h b/Code/Framework/AzManipulatorTestFramework/Include/AzManipulatorTestFramework/DirectManipulatorViewportInteraction.h index 3421116b96..33afee695b 100644 --- a/Code/Framework/AzManipulatorTestFramework/Include/AzManipulatorTestFramework/DirectManipulatorViewportInteraction.h +++ b/Code/Framework/AzManipulatorTestFramework/Include/AzManipulatorTestFramework/DirectManipulatorViewportInteraction.h @@ -17,11 +17,10 @@ namespace AzManipulatorTestFramework class ViewportInteraction; //! Implementation of manipulator viewport interaction that manipulates the manager directly. - class DirectCallManipulatorViewportInteraction - : public ManipulatorViewportInteraction + class DirectCallManipulatorViewportInteraction : public ManipulatorViewportInteraction { public: - DirectCallManipulatorViewportInteraction(); + explicit DirectCallManipulatorViewportInteraction(AZStd::shared_ptr debugDisplayRequests); ~DirectCallManipulatorViewportInteraction(); // ManipulatorViewportInteractionInterface ... @@ -30,7 +29,7 @@ namespace AzManipulatorTestFramework private: AZStd::shared_ptr m_customManager; - std::unique_ptr m_viewportInteraction; - std::unique_ptr m_manipulatorManager; + AZStd::unique_ptr m_viewportInteraction; + AZStd::unique_ptr m_manipulatorManager; }; } // namespace AzManipulatorTestFramework diff --git a/Code/Framework/AzManipulatorTestFramework/Include/AzManipulatorTestFramework/ImmediateModeActionDispatcher.h b/Code/Framework/AzManipulatorTestFramework/Include/AzManipulatorTestFramework/ImmediateModeActionDispatcher.h index 5d1f606e8c..8a05a15fd9 100644 --- a/Code/Framework/AzManipulatorTestFramework/Include/AzManipulatorTestFramework/ImmediateModeActionDispatcher.h +++ b/Code/Framework/AzManipulatorTestFramework/Include/AzManipulatorTestFramework/ImmediateModeActionDispatcher.h @@ -25,7 +25,7 @@ namespace AzManipulatorTestFramework using MouseInteractionEvent = AzToolsFramework::ViewportInteraction::MouseInteractionEvent; public: - explicit ImmediateModeActionDispatcher(ManipulatorViewportInteraction& viewportManipulatorInteraction); + explicit ImmediateModeActionDispatcher(ManipulatorViewportInteraction& manipulatorViewportInteraction); ~ImmediateModeActionDispatcher(); //! Clear the current event state. @@ -55,13 +55,15 @@ namespace AzManipulatorTestFramework AZStd::chrono::milliseconds EditorViewportInputTimeNow() override; protected: - // ActionDispatcher ... + // ActionDispatcher overrides ... void SetSnapToGridImpl(bool enabled) override; void SetStickySelectImpl(bool enabled) override; void GridSizeImpl(float size) override; void CameraStateImpl(const AzFramework::CameraState& cameraState) override; void MouseLButtonDownImpl() override; void MouseLButtonUpImpl() override; + void MouseMButtonDownImpl() override; + void MouseMButtonUpImpl() override; void MouseLButtonDoubleClickImpl() override; void MousePositionImpl(const AzFramework::ScreenPoint& position) override; void KeyboardModifierDownImpl(const KeyboardModifier& keyModifier) override; @@ -82,7 +84,7 @@ namespace AzManipulatorTestFramework const MouseInteractionEvent* GetMouseInteractionEvent() const; mutable AZStd::unique_ptr m_event; - ManipulatorViewportInteraction& m_viewportManipulatorInteraction; + ManipulatorViewportInteraction& m_manipulatorViewportInteraction; //! Current time that ticks up after each call to EditorViewportInputTimeNow. AZStd::chrono::milliseconds m_timeNow = AZStd::chrono::milliseconds(0); diff --git a/Code/Framework/AzManipulatorTestFramework/Include/AzManipulatorTestFramework/IndirectManipulatorViewportInteraction.h b/Code/Framework/AzManipulatorTestFramework/Include/AzManipulatorTestFramework/IndirectManipulatorViewportInteraction.h index a7b1be2c7d..2d5a41c2c2 100644 --- a/Code/Framework/AzManipulatorTestFramework/Include/AzManipulatorTestFramework/IndirectManipulatorViewportInteraction.h +++ b/Code/Framework/AzManipulatorTestFramework/Include/AzManipulatorTestFramework/IndirectManipulatorViewportInteraction.h @@ -21,12 +21,15 @@ namespace AzManipulatorTestFramework class IndirectCallManipulatorViewportInteraction : public ManipulatorViewportInteraction { public: - IndirectCallManipulatorViewportInteraction(); + explicit IndirectCallManipulatorViewportInteraction(AZStd::shared_ptr debugDisplayRequests); ~IndirectCallManipulatorViewportInteraction(); - // ManipulatorViewportInteractionInterface ... + // ManipulatorViewportInteraction overrides ... const ViewportInteractionInterface& GetViewportInteraction() const override; const ManipulatorManagerInterface& GetManipulatorManager() const override; + // make non-const overloads visible + using ManipulatorViewportInteraction::GetViewportInteraction; + using ManipulatorViewportInteraction::GetManipulatorManager; private: AZStd::unique_ptr m_viewportInteraction; diff --git a/Code/Framework/AzManipulatorTestFramework/Include/AzManipulatorTestFramework/ViewportInteraction.h b/Code/Framework/AzManipulatorTestFramework/Include/AzManipulatorTestFramework/ViewportInteraction.h index a8ba63500c..f29245bb34 100644 --- a/Code/Framework/AzManipulatorTestFramework/Include/AzManipulatorTestFramework/ViewportInteraction.h +++ b/Code/Framework/AzManipulatorTestFramework/Include/AzManipulatorTestFramework/ViewportInteraction.h @@ -11,10 +11,13 @@ #include #include +namespace AzFramework +{ + class DebugDisplayRequests; +} + namespace AzManipulatorTestFramework { - class NullDebugDisplayRequests; - //! Implementation of the viewport interaction model to handle viewport interaction requests. class ViewportInteraction : public ViewportInteractionInterface @@ -23,7 +26,7 @@ namespace AzManipulatorTestFramework , private AzToolsFramework::ViewportInteraction::EditorEntityViewportInteractionRequestBus::Handler { public: - ViewportInteraction(); + explicit ViewportInteraction(AZStd::shared_ptr debugDisplayRequests); ~ViewportInteraction(); // ViewportInteractionInterface overrides ... @@ -33,16 +36,17 @@ namespace AzManipulatorTestFramework void SetAngularSnapping(bool enabled) override; void SetGridSize(float size) override; void SetAngularStep(float step) override; - int GetViewportId() const override; + AzFramework::ViewportId GetViewportId() const override; void UpdateVisibility() override; void SetStickySelect(bool enabled) override; - AZ::Vector3 DefaultEditorCameraPosition() const override; + void SetIconsVisible(bool visible) override; + void SetHelpersVisible(bool visible) override; // ViewportInteractionRequestBus overrides ... AzFramework::CameraState GetCameraState() override; AzFramework::ScreenPoint ViewportWorldToScreen(const AZ::Vector3& worldPosition) override; - AZStd::optional ViewportScreenToWorld(const AzFramework::ScreenPoint& screenPosition, float depth) override; - AZStd::optional ViewportScreenToWorldRay( + AZ::Vector3 ViewportScreenToWorld(const AzFramework::ScreenPoint& screenPosition) override; + AzToolsFramework::ViewportInteraction::ProjectedViewportRay ViewportScreenToWorldRay( const AzFramework::ScreenPoint& screenPosition) override; float DeviceScalingFactor() override; @@ -55,19 +59,25 @@ namespace AzManipulatorTestFramework float ManipulatorLineBoundWidth() const override; float ManipulatorCircleBoundWidth() const override; bool StickySelectEnabled() const override; + AZ::Vector3 DefaultEditorCameraPosition() const override; + bool IconsVisible() const override; + bool HelpersVisible() const override; // EditorEntityViewportInteractionRequestBus overrides ... void FindVisibleEntities(AZStd::vector& visibleEntities) override; private: + static constexpr AzFramework::ViewportId m_viewportId = 1234; //!< Arbitrary viewport id for manipulator tests. + AzFramework::EntityVisibilityQuery m_entityVisibilityQuery; - AZStd::unique_ptr m_nullDebugDisplayRequests; - const int m_viewportId = 1234; // Arbitrary viewport id for manipulator tests + AZStd::shared_ptr m_debugDisplayRequests; AzFramework::CameraState m_cameraState; + float m_gridSize = 1.0f; + float m_angularStep = 0.0f; bool m_gridSnapping = false; bool m_angularSnapping = false; bool m_stickySelect = true; - float m_gridSize = 1.0f; - float m_angularStep = 0.0f; + bool m_iconsVisible = true; + bool m_helpersVisible = true; }; } // namespace AzManipulatorTestFramework diff --git a/Code/Framework/AzManipulatorTestFramework/Source/AzManipulatorTestFrameworkUtils.cpp b/Code/Framework/AzManipulatorTestFramework/Source/AzManipulatorTestFrameworkUtils.cpp index 4f1e108a14..4c7d7f6901 100644 --- a/Code/Framework/AzManipulatorTestFramework/Source/AzManipulatorTestFrameworkUtils.cpp +++ b/Code/Framework/AzManipulatorTestFramework/Source/AzManipulatorTestFrameworkUtils.cpp @@ -82,49 +82,6 @@ namespace AzManipulatorTestFramework return manipulator; } - AzToolsFramework::ViewportInteraction::MousePick CreateMousePick( - const AZ::Vector3& origin, const AZ::Vector3& direction, const AzFramework::ScreenPoint& screenPoint) - { - return { origin, direction, screenPoint }; - } - - AzToolsFramework::ViewportInteraction::MousePick BuildMousePick( - const AzFramework::ScreenPoint& screenPoint, const AzFramework::CameraState& cameraState) - { - const auto nearPlaneWorldPosition = AzFramework::ScreenToWorld(screenPoint, cameraState); - - AzToolsFramework::ViewportInteraction::MousePick mousePick; - mousePick.m_screenCoordinates = screenPoint; - mousePick.m_rayOrigin = cameraState.m_position; - mousePick.m_rayDirection = (nearPlaneWorldPosition - cameraState.m_position).GetNormalized(); - - return mousePick; - } - - MouseInteraction CreateMouseInteraction( - const MousePick& mousePick, MouseButtons buttons, InteractionId interactionId, KeyboardModifiers modifiers) - { - AzToolsFramework::ViewportInteraction::MouseInteraction interaction; - interaction.m_mousePick = mousePick; - interaction.m_mouseButtons = buttons; - interaction.m_interactionId = interactionId; - interaction.m_keyboardModifiers = modifiers; - - return interaction; - } - - MouseButtons CreateMouseButtons(MouseButton button) - { - MouseButtons buttons; - buttons.m_mouseButtons = static_cast(button); - return buttons; - } - - MouseInteractionEvent CreateMouseInteractionEvent(const MouseInteraction& mouseInteraction, MouseEvent event) - { - return MouseInteractionEvent(mouseInteraction, event, /*captured=*/false); - } - void DispatchMouseInteractionEvent(const MouseInteractionEvent& event) { AzToolsFramework::EditorInteractionSystemViewportSelectionRequestBus::Event( diff --git a/Code/Framework/AzManipulatorTestFramework/Source/DirectManipulatorViewportInteraction.cpp b/Code/Framework/AzManipulatorTestFramework/Source/DirectManipulatorViewportInteraction.cpp index c9234fe488..c96840e4c9 100644 --- a/Code/Framework/AzManipulatorTestFramework/Source/DirectManipulatorViewportInteraction.cpp +++ b/Code/Framework/AzManipulatorTestFramework/Source/DirectManipulatorViewportInteraction.cpp @@ -118,10 +118,11 @@ namespace AzManipulatorTestFramework return m_manipulatorManager->Interacting(); } - DirectCallManipulatorViewportInteraction::DirectCallManipulatorViewportInteraction() + DirectCallManipulatorViewportInteraction::DirectCallManipulatorViewportInteraction( + AZStd::shared_ptr debugDisplayRequests) : m_customManager( AZStd::make_unique(AzToolsFramework::ManipulatorManagerId(AZ::Crc32("TestManipulatorManagerId")))) - , m_viewportInteraction(AZStd::make_unique()) + , m_viewportInteraction(AZStd::make_unique(AZStd::move(debugDisplayRequests))) , m_manipulatorManager(AZStd::make_unique(m_viewportInteraction.get(), m_customManager)) { } diff --git a/Code/Framework/AzManipulatorTestFramework/Source/ImmediateModeActionDispatcher.cpp b/Code/Framework/AzManipulatorTestFramework/Source/ImmediateModeActionDispatcher.cpp index c122a941c4..715c2b1083 100644 --- a/Code/Framework/AzManipulatorTestFramework/Source/ImmediateModeActionDispatcher.cpp +++ b/Code/Framework/AzManipulatorTestFramework/Source/ImmediateModeActionDispatcher.cpp @@ -29,8 +29,8 @@ namespace AzManipulatorTestFramework using KeyboardModifier = AzToolsFramework::ViewportInteraction::KeyboardModifier; using MouseInteractionEvent = AzToolsFramework::ViewportInteraction::MouseInteractionEvent; - ImmediateModeActionDispatcher::ImmediateModeActionDispatcher(ManipulatorViewportInteraction& viewportManipulatorInteraction) - : m_viewportManipulatorInteraction(viewportManipulatorInteraction) + ImmediateModeActionDispatcher::ImmediateModeActionDispatcher(ManipulatorViewportInteraction& manipulatorViewportInteraction) + : m_manipulatorViewportInteraction(manipulatorViewportInteraction) { AzToolsFramework::ViewportInteraction::EditorModifierKeyRequestBus::Handler::BusConnect(); AzToolsFramework::ViewportInteraction::EditorViewportInputTimeNowRequestBus::Handler::BusConnect(); @@ -48,36 +48,34 @@ namespace AzManipulatorTestFramework // mouse down and mouse up event, to match the editor behavior we insert this event // to ensure the tests are simulating the same environment as the editor GetMouseInteractionEvent()->m_mouseEvent = AzToolsFramework::ViewportInteraction::MouseEvent::Move; - m_viewportManipulatorInteraction.GetManipulatorManager().ConsumeMouseInteractionEvent(*m_event); + m_manipulatorViewportInteraction.GetManipulatorManager().ConsumeMouseInteractionEvent(*m_event); } void ImmediateModeActionDispatcher::SetSnapToGridImpl(const bool enabled) { - m_viewportManipulatorInteraction.GetViewportInteraction().SetGridSnapping(enabled); + m_manipulatorViewportInteraction.GetViewportInteraction().SetGridSnapping(enabled); } void ImmediateModeActionDispatcher::SetStickySelectImpl(const bool enabled) { - m_viewportManipulatorInteraction.GetViewportInteraction().SetStickySelect(enabled); + m_manipulatorViewportInteraction.GetViewportInteraction().SetStickySelect(enabled); } void ImmediateModeActionDispatcher::GridSizeImpl(const float size) { - m_viewportManipulatorInteraction.GetViewportInteraction().SetGridSize(size); + m_manipulatorViewportInteraction.GetViewportInteraction().SetGridSize(size); } void ImmediateModeActionDispatcher::CameraStateImpl(const AzFramework::CameraState& cameraState) { - m_viewportManipulatorInteraction.GetViewportInteraction().SetCameraState(cameraState); - GetMouseInteractionEvent()->m_mouseInteraction.m_mousePick.m_rayOrigin = cameraState.m_position; - GetMouseInteractionEvent()->m_mouseInteraction.m_mousePick.m_rayDirection = cameraState.m_forward; + m_manipulatorViewportInteraction.GetViewportInteraction().SetCameraState(cameraState); } void ImmediateModeActionDispatcher::MouseLButtonDownImpl() { ToggleOn(GetMouseInteractionEvent()->m_mouseInteraction.m_mouseButtons.m_mouseButtons, MouseButton::Left); GetMouseInteractionEvent()->m_mouseEvent = AzToolsFramework::ViewportInteraction::MouseEvent::Down; - m_viewportManipulatorInteraction.GetManipulatorManager().ConsumeMouseInteractionEvent(*m_event); + m_manipulatorViewportInteraction.GetManipulatorManager().ConsumeMouseInteractionEvent(*m_event); // the mouse position will be the same as the previous event, thus the delta will be 0 MouseMoveAfterButton(); } @@ -85,17 +83,35 @@ namespace AzManipulatorTestFramework void ImmediateModeActionDispatcher::MouseLButtonUpImpl() { GetMouseInteractionEvent()->m_mouseEvent = AzToolsFramework::ViewportInteraction::MouseEvent::Up; - m_viewportManipulatorInteraction.GetManipulatorManager().ConsumeMouseInteractionEvent(*m_event); + m_manipulatorViewportInteraction.GetManipulatorManager().ConsumeMouseInteractionEvent(*m_event); ToggleOff(GetMouseInteractionEvent()->m_mouseInteraction.m_mouseButtons.m_mouseButtons, MouseButton::Left); // the mouse position will be the same as the previous event, thus the delta will be 0 MouseMoveAfterButton(); } + void ImmediateModeActionDispatcher::MouseMButtonDownImpl() + { + ToggleOn(GetMouseInteractionEvent()->m_mouseInteraction.m_mouseButtons.m_mouseButtons, MouseButton::Middle); + GetMouseInteractionEvent()->m_mouseEvent = AzToolsFramework::ViewportInteraction::MouseEvent::Down; + m_manipulatorViewportInteraction.GetManipulatorManager().ConsumeMouseInteractionEvent(*m_event); + // the mouse position will be the same as the previous event, thus the delta will be 0 + MouseMoveAfterButton(); + } + + void ImmediateModeActionDispatcher::MouseMButtonUpImpl() + { + GetMouseInteractionEvent()->m_mouseEvent = AzToolsFramework::ViewportInteraction::MouseEvent::Up; + m_manipulatorViewportInteraction.GetManipulatorManager().ConsumeMouseInteractionEvent(*m_event); + ToggleOff(GetMouseInteractionEvent()->m_mouseInteraction.m_mouseButtons.m_mouseButtons, MouseButton::Middle); + // the mouse position will be the same as the previous event, thus the delta will be 0 + MouseMoveAfterButton(); + } + void ImmediateModeActionDispatcher::MouseLButtonDoubleClickImpl() { GetMouseInteractionEvent()->m_mouseEvent = AzToolsFramework::ViewportInteraction::MouseEvent::DoubleClick; ToggleOn(GetMouseInteractionEvent()->m_mouseInteraction.m_mouseButtons.m_mouseButtons, MouseButton::Left); - m_viewportManipulatorInteraction.GetManipulatorManager().ConsumeMouseInteractionEvent(*m_event); + m_manipulatorViewportInteraction.GetManipulatorManager().ConsumeMouseInteractionEvent(*m_event); ToggleOff(GetMouseInteractionEvent()->m_mouseInteraction.m_mouseButtons.m_mouseButtons, MouseButton::Left); // the mouse position will be the same as the previous event, thus the delta will be 0 MouseMoveAfterButton(); @@ -103,10 +119,11 @@ namespace AzManipulatorTestFramework void ImmediateModeActionDispatcher::MousePositionImpl(const AzFramework::ScreenPoint& position) { - const auto cameraState = m_viewportManipulatorInteraction.GetViewportInteraction().GetCameraState(); - GetMouseInteractionEvent()->m_mouseInteraction.m_mousePick = BuildMousePick(position, cameraState); + const auto cameraState = m_manipulatorViewportInteraction.GetViewportInteraction().GetCameraState(); + GetMouseInteractionEvent()->m_mouseInteraction.m_mousePick = + AzToolsFramework::ViewportInteraction::BuildMousePick(cameraState, position); GetMouseInteractionEvent()->m_mouseEvent = AzToolsFramework::ViewportInteraction::MouseEvent::Move; - m_viewportManipulatorInteraction.GetManipulatorManager().ConsumeMouseInteractionEvent(*m_event); + m_manipulatorViewportInteraction.GetManipulatorManager().ConsumeMouseInteractionEvent(*m_event); } void ImmediateModeActionDispatcher::KeyboardModifierDownImpl(const KeyboardModifier& keyModifier) @@ -146,7 +163,7 @@ namespace AzManipulatorTestFramework { m_event = AZStd::unique_ptr(AZStd::make_unique()); m_event->m_mouseInteraction.m_interactionId.m_viewportId = - m_viewportManipulatorInteraction.GetViewportInteraction().GetViewportId(); + m_manipulatorViewportInteraction.GetViewportInteraction().GetViewportId(); } return m_event.get(); @@ -180,12 +197,12 @@ namespace AzManipulatorTestFramework void ImmediateModeActionDispatcher::ExpectManipulatorBeingInteractedImpl() { - EXPECT_TRUE(m_viewportManipulatorInteraction.GetManipulatorManager().ManipulatorBeingInteracted()); + EXPECT_TRUE(m_manipulatorViewportInteraction.GetManipulatorManager().ManipulatorBeingInteracted()); } void ImmediateModeActionDispatcher::ExpectManipulatorNotBeingInteractedImpl() { - EXPECT_FALSE(m_viewportManipulatorInteraction.GetManipulatorManager().ManipulatorBeingInteracted()); + EXPECT_FALSE(m_manipulatorViewportInteraction.GetManipulatorManager().ManipulatorBeingInteracted()); } ImmediateModeActionDispatcher* ImmediateModeActionDispatcher::ResetEvent() diff --git a/Code/Framework/AzManipulatorTestFramework/Source/IndirectManipulatorViewportInteraction.cpp b/Code/Framework/AzManipulatorTestFramework/Source/IndirectManipulatorViewportInteraction.cpp index 730c106301..9c5f84196f 100644 --- a/Code/Framework/AzManipulatorTestFramework/Source/IndirectManipulatorViewportInteraction.cpp +++ b/Code/Framework/AzManipulatorTestFramework/Source/IndirectManipulatorViewportInteraction.cpp @@ -20,7 +20,8 @@ namespace AzManipulatorTestFramework { public: IndirectCallManipulatorManager(ViewportInteractionInterface& viewportInteraction); - // ManipulatorManagerInterface ... + + // ManipulatorManagerInterface overrides ... void ConsumeMouseInteractionEvent(const MouseInteractionEvent& event) override; AzToolsFramework::ManipulatorManagerId GetId() const override; bool ManipulatorBeingInteracted() const override; @@ -75,8 +76,9 @@ namespace AzManipulatorTestFramework return manipulatorInteracting; } - IndirectCallManipulatorViewportInteraction::IndirectCallManipulatorViewportInteraction() - : m_viewportInteraction(AZStd::make_unique()) + IndirectCallManipulatorViewportInteraction::IndirectCallManipulatorViewportInteraction( + AZStd::shared_ptr debugDisplayRequests) + : m_viewportInteraction(AZStd::make_unique(AZStd::move(debugDisplayRequests))) , m_manipulatorManager(AZStd::make_unique(*m_viewportInteraction)) { } diff --git a/Code/Framework/AzManipulatorTestFramework/Source/ViewportInteraction.cpp b/Code/Framework/AzManipulatorTestFramework/Source/ViewportInteraction.cpp index 269baa703d..b7fd5e2b73 100644 --- a/Code/Framework/AzManipulatorTestFramework/Source/ViewportInteraction.cpp +++ b/Code/Framework/AzManipulatorTestFramework/Source/ViewportInteraction.cpp @@ -10,22 +10,19 @@ #include #include #include +#include namespace AzManipulatorTestFramework { - // Null debug display for dummy draw calls - class NullDebugDisplayRequests : public AzFramework::DebugDisplayRequests - { - public: - virtual ~NullDebugDisplayRequests() = default; - }; - - ViewportInteraction::ViewportInteraction() - : m_nullDebugDisplayRequests(AZStd::make_unique()) + ViewportInteraction::ViewportInteraction(AZStd::shared_ptr debugDisplayRequests) + : m_debugDisplayRequests(AZStd::move(debugDisplayRequests)) { AzToolsFramework::ViewportInteraction::ViewportInteractionRequestBus::Handler::BusConnect(m_viewportId); AzToolsFramework::ViewportInteraction::ViewportSettingsRequestBus::Handler::BusConnect(m_viewportId); AzToolsFramework::ViewportInteraction::EditorEntityViewportInteractionRequestBus::Handler::BusConnect(m_viewportId); + + m_cameraState = + AzFramework::CreateIdentityDefaultCamera(AZ::Vector3::CreateZero(), AzManipulatorTestFramework::DefaultViewportSize); } ViewportInteraction::~ViewportInteraction() @@ -102,7 +99,7 @@ namespace AzManipulatorTestFramework AzFramework::DebugDisplayRequests& ViewportInteraction::GetDebugDisplay() { - return *m_nullDebugDisplayRequests; + return *m_debugDisplayRequests; } void ViewportInteraction::SetGridSnapping(const bool enabled) @@ -120,6 +117,16 @@ namespace AzManipulatorTestFramework m_stickySelect = enabled; } + void ViewportInteraction::SetIconsVisible(const bool visible) + { + m_iconsVisible = visible; + } + + void ViewportInteraction::SetHelpersVisible(const bool visible) + { + m_helpersVisible = visible; + } + AZ::Vector3 ViewportInteraction::DefaultEditorCameraPosition() const { return {}; @@ -135,25 +142,34 @@ namespace AzManipulatorTestFramework m_angularStep = step; } - int ViewportInteraction::GetViewportId() const + AzFramework::ViewportId ViewportInteraction::GetViewportId() const { return m_viewportId; } - AZStd::optional ViewportInteraction::ViewportScreenToWorld( - [[maybe_unused]] const AzFramework::ScreenPoint& screenPosition, [[maybe_unused]] float depth) + AZ::Vector3 ViewportInteraction::ViewportScreenToWorld([[maybe_unused]] const AzFramework::ScreenPoint& screenPosition) { - return {}; + return AzFramework::ScreenToWorld(screenPosition, m_cameraState); } - AZStd::optional ViewportInteraction::ViewportScreenToWorldRay( + AzToolsFramework::ViewportInteraction::ProjectedViewportRay ViewportInteraction::ViewportScreenToWorldRay( [[maybe_unused]] const AzFramework::ScreenPoint& screenPosition) { - return {}; + return AzToolsFramework::ViewportInteraction::ViewportScreenToWorldRay(m_cameraState, screenPosition); } float ViewportInteraction::DeviceScalingFactor() { return 1.0f; } + + bool ViewportInteraction::IconsVisible() const + { + return m_iconsVisible; + } + + bool ViewportInteraction::HelpersVisible() const + { + return m_helpersVisible; + } } // namespace AzManipulatorTestFramework diff --git a/Code/Framework/AzManipulatorTestFramework/Tests/AzManipulatorTestFrameworkTestFixtures.h b/Code/Framework/AzManipulatorTestFramework/Tests/AzManipulatorTestFrameworkTestFixtures.h index 4679ac142c..24ede71904 100644 --- a/Code/Framework/AzManipulatorTestFramework/Tests/AzManipulatorTestFrameworkTestFixtures.h +++ b/Code/Framework/AzManipulatorTestFramework/Tests/AzManipulatorTestFrameworkTestFixtures.h @@ -8,21 +8,22 @@ #pragma once +#include #include #include -#include namespace UnitTest { - class LinearManipulatorTestFixture - : public ToolsApplicationFixture + class LinearManipulatorTestFixture : public ToolsApplicationFixture { protected: LinearManipulatorTestFixture(const AzToolsFramework::ManipulatorManagerId& manipulatorManagerId) - : m_manipulatorManagerId(manipulatorManagerId) {} + : m_manipulatorManagerId(manipulatorManagerId) + { + } void SetUpEditorFixtureImpl() override - { + { m_linearManipulator = AzManipulatorTestFramework::CreateLinearManipulator( m_manipulatorManagerId, /*position=*/AZ::Vector3::CreateZero(), @@ -31,21 +32,21 @@ namespace UnitTest // default sanity check call backs m_linearManipulator->InstallLeftMouseDownCallback( [this](const AzToolsFramework::LinearManipulator::Action& /*action*/) - { - m_receivedLeftMouseDown = true; - }); + { + m_receivedLeftMouseDown = true; + }); m_linearManipulator->InstallMouseMoveCallback( [this](const AzToolsFramework::LinearManipulator::Action& /*action*/) - { - m_receivedMouseMove = true; - }); + { + m_receivedMouseMove = true; + }); m_linearManipulator->InstallLeftMouseUpCallback( [this](const AzToolsFramework::LinearManipulator::Action& /*action*/) - { - m_receivedLeftMouseUp = true; - }); + { + m_receivedLeftMouseUp = true; + }); } void TearDownEditorFixtureImpl() override @@ -63,16 +64,16 @@ namespace UnitTest bool m_receivedLeftMouseUp = false; // initial world space starting position for mouse interaction - const AzToolsFramework::ViewportInteraction::MousePick m_mouseStartingPositionRay = - AzManipulatorTestFramework::CreateMousePick( - AZ::Vector3(0.0f, -2.0f, 0.0f), AZ::Vector3(0.0f, 1.0f, 0.0f), AzFramework::ScreenPoint( 0,0 )); + const AzToolsFramework::ViewportInteraction::MousePick m_mouseStartingPositionRay{ AZ::Vector3(0.0f, -2.0f, 0.0f), + AZ::Vector3(0.0f, 1.0f, 0.0f), + AzFramework::ScreenPoint(0, 0) }; // left mouse down ray in world space 2 units back from origin looking down +y axis with a null interaction // id and no keyboard modifiers AzToolsFramework::ViewportInteraction::MouseInteraction m_interaction = - AzManipulatorTestFramework::CreateMouseInteraction( + AzToolsFramework::ViewportInteraction::BuildMouseInteraction( m_mouseStartingPositionRay, - AzManipulatorTestFramework::CreateMouseButtons(AzToolsFramework::ViewportInteraction::MouseButton::Left), + AzToolsFramework::ViewportInteraction::BuildMouseButtons(AzToolsFramework::ViewportInteraction::MouseButton::Left), AzToolsFramework::ViewportInteraction::InteractionId(AZ::EntityId(0), 0), AzToolsFramework::ViewportInteraction::KeyboardModifiers(0)); }; diff --git a/Code/Framework/AzManipulatorTestFramework/Tests/BusCallTest.cpp b/Code/Framework/AzManipulatorTestFramework/Tests/BusCallTest.cpp index 11f35d8fdc..8d86a96ffa 100644 --- a/Code/Framework/AzManipulatorTestFramework/Tests/BusCallTest.cpp +++ b/Code/Framework/AzManipulatorTestFramework/Tests/BusCallTest.cpp @@ -7,6 +7,8 @@ */ #include "AzManipulatorTestFrameworkTestFixtures.h" + +#include #include #include @@ -34,8 +36,8 @@ namespace UnitTest TEST_F(AzManipulatorTestFrameworkBusCallTestFixture, ConsumeViewportLeftMouseClick) { // given a left mouse down ray in world space - auto event = - AzManipulatorTestFramework::CreateMouseInteractionEvent(m_interaction, AzToolsFramework::ViewportInteraction::MouseEvent::Down); + auto event = AzToolsFramework::ViewportInteraction::BuildMouseInteractionEvent( + m_interaction, AzToolsFramework::ViewportInteraction::MouseEvent::Down); // consume the mouse down and up events AzManipulatorTestFramework::DispatchMouseInteractionEvent(event); @@ -53,8 +55,8 @@ namespace UnitTest TEST_F(AzManipulatorTestFrameworkBusCallTestFixture, ConsumeViewportMouseMoveHover) { // given a left mouse down ray in world space - const auto event = - AzManipulatorTestFramework::CreateMouseInteractionEvent(m_interaction, AzToolsFramework::ViewportInteraction::MouseEvent::Move); + const auto event = AzToolsFramework::ViewportInteraction::BuildMouseInteractionEvent( + m_interaction, AzToolsFramework::ViewportInteraction::MouseEvent::Move); // consume the mouse move event AzManipulatorTestFramework::DispatchMouseInteractionEvent(event); @@ -72,8 +74,8 @@ namespace UnitTest TEST_F(AzManipulatorTestFrameworkBusCallTestFixture, ConsumeViewportMouseMoveActive) { // given a left mouse down ray in world space - auto event = - AzManipulatorTestFramework::CreateMouseInteractionEvent(m_interaction, AzToolsFramework::ViewportInteraction::MouseEvent::Down); + auto event = AzToolsFramework::ViewportInteraction::BuildMouseInteractionEvent( + m_interaction, AzToolsFramework::ViewportInteraction::MouseEvent::Down); // consume the mouse down event AzManipulatorTestFramework::DispatchMouseInteractionEvent(event); @@ -113,8 +115,8 @@ namespace UnitTest }); // given a left mouse down ray in world space - auto event = - AzManipulatorTestFramework::CreateMouseInteractionEvent(m_interaction, AzToolsFramework::ViewportInteraction::MouseEvent::Down); + auto event = AzToolsFramework::ViewportInteraction::BuildMouseInteractionEvent( + m_interaction, AzToolsFramework::ViewportInteraction::MouseEvent::Down); // consume the mouse down event AzManipulatorTestFramework::DispatchMouseInteractionEvent(event); diff --git a/Code/Framework/AzManipulatorTestFramework/Tests/GridSnappingTest.cpp b/Code/Framework/AzManipulatorTestFramework/Tests/GridSnappingTest.cpp index 4af66edc0a..8707d08bb3 100644 --- a/Code/Framework/AzManipulatorTestFramework/Tests/GridSnappingTest.cpp +++ b/Code/Framework/AzManipulatorTestFramework/Tests/GridSnappingTest.cpp @@ -26,7 +26,8 @@ namespace UnitTest { public: GridSnappingFixture() - : m_viewportManipulatorInteraction(AZStd::make_unique()) + : m_viewportManipulatorInteraction(AZStd::make_unique( + AZStd::make_shared())) , m_actionDispatcher( AZStd::make_unique(*m_viewportManipulatorInteraction)) { diff --git a/Code/Framework/AzManipulatorTestFramework/Tests/ViewportInteractionTest.cpp b/Code/Framework/AzManipulatorTestFramework/Tests/ViewportInteractionTest.cpp index 38c3e33977..481647f960 100644 --- a/Code/Framework/AzManipulatorTestFramework/Tests/ViewportInteractionTest.cpp +++ b/Code/Framework/AzManipulatorTestFramework/Tests/ViewportInteractionTest.cpp @@ -15,7 +15,8 @@ namespace UnitTest { public: AValidViewportInteraction() - : m_viewportInteraction(AZStd::make_unique()) + : m_viewportInteraction( + AZStd::make_unique(AZStd::make_shared())) { } diff --git a/Code/Framework/AzManipulatorTestFramework/Tests/WorldSpaceBuilderTest.cpp b/Code/Framework/AzManipulatorTestFramework/Tests/WorldSpaceBuilderTest.cpp index 211c8d64ef..95afe0e47d 100644 --- a/Code/Framework/AzManipulatorTestFramework/Tests/WorldSpaceBuilderTest.cpp +++ b/Code/Framework/AzManipulatorTestFramework/Tests/WorldSpaceBuilderTest.cpp @@ -75,9 +75,11 @@ namespace UnitTest void SetUpEditorFixtureImpl() override { m_directState = - AZStd::make_unique(AZStd::make_unique()); + AZStd::make_unique(AZStd::make_unique( + AZStd::make_shared())); m_busState = - AZStd::make_unique(AZStd::make_unique()); + AZStd::make_unique(AZStd::make_unique( + AZStd::make_shared())); m_cameraState = AzFramework::CreateIdentityDefaultCamera(AZ::Vector3::CreateZero(), AzManipulatorTestFramework::DefaultViewportSize); } @@ -140,8 +142,8 @@ namespace UnitTest // given a left mouse down ray in world space // consume the mouse move event state.m_actionDispatcher->CameraState(m_cameraState) - ->MouseLButtonDown() ->MousePosition(AzManipulatorTestFramework::GetCameraStateViewportCenter(m_cameraState)) + ->MouseLButtonDown() ->ExpectTrue(state.m_linearManipulator->PerformingAction()) ->ExpectManipulatorBeingInteracted() ->MouseLButtonUp() diff --git a/Code/Framework/AzNetworking/AzNetworking/AutoGen/CorePackets.AutoPackets.xml b/Code/Framework/AzNetworking/AzNetworking/AutoGen/CorePackets.AutoPackets.xml index 8ce3e5ad86..ae025b67e3 100644 --- a/Code/Framework/AzNetworking/AzNetworking/AutoGen/CorePackets.AutoPackets.xml +++ b/Code/Framework/AzNetworking/AzNetworking/AutoGen/CorePackets.AutoPackets.xml @@ -13,7 +13,9 @@ - + + + diff --git a/Code/Framework/AzNetworking/AzNetworking/ConnectionLayer/ConnectionMetrics.cpp b/Code/Framework/AzNetworking/AzNetworking/ConnectionLayer/ConnectionMetrics.cpp index 3a3ab06d02..6705ec8b36 100644 --- a/Code/Framework/AzNetworking/AzNetworking/ConnectionLayer/ConnectionMetrics.cpp +++ b/Code/Framework/AzNetworking/AzNetworking/ConnectionLayer/ConnectionMetrics.cpp @@ -42,7 +42,7 @@ namespace AzNetworking { const uint32_t sampleAtom = 1 - m_activeAtom; - if (m_atoms[sampleAtom].m_timeAccumulatorMs == AZ::TimeMs{0}) + if (m_atoms[sampleAtom].m_timeAccumulatorMs == AZ::Time::ZeroTimeMs) { return 0.0f; } diff --git a/Code/Framework/AzNetworking/AzNetworking/ConnectionLayer/ConnectionMetrics.h b/Code/Framework/AzNetworking/AzNetworking/ConnectionLayer/ConnectionMetrics.h index b576c64e86..19db52b979 100644 --- a/Code/Framework/AzNetworking/AzNetworking/ConnectionLayer/ConnectionMetrics.h +++ b/Code/Framework/AzNetworking/AzNetworking/ConnectionLayer/ConnectionMetrics.h @@ -19,7 +19,7 @@ namespace AzNetworking { DatarateAtom() = default; - AZ::TimeMs m_timeAccumulatorMs = AZ::TimeMs{ 0 }; + AZ::TimeMs m_timeAccumulatorMs = AZ::Time::ZeroTimeMs; uint32_t m_bytesTransmitted = 0; uint32_t m_packetsSent = 0; uint32_t m_packetsLost = 0; @@ -78,7 +78,7 @@ namespace AzNetworking ConnectionPacketEntry(PacketId packetId, AZ::TimeMs sendTimeMs); PacketId m_packetId = InvalidPacketId; - AZ::TimeMs m_sendTimeMs = AZ::TimeMs{0}; + AZ::TimeMs m_sendTimeMs = AZ::Time::ZeroTimeMs; }; //! @class ConnectionComputeRtt diff --git a/Code/Framework/AzNetworking/AzNetworking/ConnectionLayer/IConnection.h b/Code/Framework/AzNetworking/AzNetworking/ConnectionLayer/IConnection.h index 363fd1d37b..7afbbaee7c 100644 --- a/Code/Framework/AzNetworking/AzNetworking/ConnectionLayer/IConnection.h +++ b/Code/Framework/AzNetworking/AzNetworking/ConnectionLayer/IConnection.h @@ -28,8 +28,8 @@ namespace AzNetworking ConnectionQuality(int32_t lossPercentage, AZ::TimeMs latencyMs, AZ::TimeMs varianceMs); int32_t m_lossPercentage = 0; - AZ::TimeMs m_latencyMs = AZ::TimeMs{ 0 }; - AZ::TimeMs m_varianceMs = AZ::TimeMs{ 0 }; + AZ::TimeMs m_latencyMs = AZ::Time::ZeroTimeMs; + AZ::TimeMs m_varianceMs = AZ::Time::ZeroTimeMs; }; enum class TrustZone diff --git a/Code/Framework/AzNetworking/AzNetworking/DataStructures/TimeoutQueue.cpp b/Code/Framework/AzNetworking/AzNetworking/DataStructures/TimeoutQueue.cpp index b0f316cf50..eb07efe80f 100644 --- a/Code/Framework/AzNetworking/AzNetworking/DataStructures/TimeoutQueue.cpp +++ b/Code/Framework/AzNetworking/AzNetworking/DataStructures/TimeoutQueue.cpp @@ -122,10 +122,4 @@ namespace AzNetworking m_timeoutItemMap.erase(itemTimeoutId); } } - - void TimeoutQueue::UpdateTimeouts(ITimeoutHandler& timeoutHandler, int32_t maxTimeouts) - { - TimeoutHandler handler([&timeoutHandler](TimeoutQueue::TimeoutItem& item) { return timeoutHandler.HandleTimeout(item); }); - UpdateTimeouts(handler, maxTimeouts); - } } diff --git a/Code/Framework/AzNetworking/AzNetworking/DataStructures/TimeoutQueue.h b/Code/Framework/AzNetworking/AzNetworking/DataStructures/TimeoutQueue.h index 63417ea36f..1a4423144f 100644 --- a/Code/Framework/AzNetworking/AzNetworking/DataStructures/TimeoutQueue.h +++ b/Code/Framework/AzNetworking/AzNetworking/DataStructures/TimeoutQueue.h @@ -23,8 +23,6 @@ namespace AzNetworking Delete }; - class ITimeoutHandler; - //! @class TimeoutQueue //! @brief class for managing timeout items. class TimeoutQueue @@ -39,8 +37,8 @@ namespace AzNetworking void UpdateTimeoutTime(AZ::TimeMs currentTimeMs); uint64_t m_userData = 0; - AZ::TimeMs m_timeoutMs = AZ::TimeMs{0}; - AZ::TimeMs m_nextTimeoutTimeMs = AZ::TimeMs{0}; + AZ::TimeMs m_timeoutMs = AZ::Time::ZeroTimeMs; + AZ::TimeMs m_nextTimeoutTimeMs = AZ::Time::ZeroTimeMs; }; TimeoutQueue() = default; @@ -70,11 +68,6 @@ namespace AzNetworking using TimeoutHandler = AZStd::function; void UpdateTimeouts(const TimeoutHandler& timeoutHandler, int32_t maxTimeouts = -1); - //! Updates timeouts for all items, invokes timeout handlers if required. - //! @param timeoutHandler listener instance to call back on for timeouts - //! @param maxTimeouts the maximum number of timeouts to process before breaking iteration - void UpdateTimeouts(ITimeoutHandler& timeoutHandler, int32_t maxTimeouts = -1); - private: struct TimeoutQueueItem @@ -94,19 +87,6 @@ namespace AzNetworking TimeoutItemMap m_timeoutItemMap; TimeoutItemQueue m_timeoutItemQueue; }; - - //! @class ITimeoutHandler - //! @brief interface class for managing timeout items. - class ITimeoutHandler - { - public: - virtual ~ITimeoutHandler() = default; - - //! Handler callback for timed out items. - //! @param item containing registered timeout details - //! @return ETimeoutResult for whether to re-register or discard the timeout params - virtual TimeoutResult HandleTimeout(TimeoutQueue::TimeoutItem& item) = 0; - }; } #include diff --git a/Code/Framework/AzNetworking/AzNetworking/Framework/NetworkInterfaceMetrics.h b/Code/Framework/AzNetworking/AzNetworking/Framework/NetworkInterfaceMetrics.h index 8cad6e5537..d4bfabf54a 100644 --- a/Code/Framework/AzNetworking/AzNetworking/Framework/NetworkInterfaceMetrics.h +++ b/Code/Framework/AzNetworking/AzNetworking/Framework/NetworkInterfaceMetrics.h @@ -15,11 +15,11 @@ namespace AzNetworking struct NetworkInterfaceMetrics { //! Returns the total number of milliseconds spent updating this network interface. - AZ::TimeMs m_updateTimeMs = AZ::TimeMs{ 0 }; + AZ::TimeMs m_updateTimeMs = AZ::Time::ZeroTimeMs; //! Returns the total number of connections bound to this network interface. uint64_t m_connectionCount = 0; //! Returns the total number of milliseconds spent sending data on this network interface. - AZ::TimeMs m_sendTimeMs = AZ::TimeMs{ 0 }; + AZ::TimeMs m_sendTimeMs = AZ::Time::ZeroTimeMs; //! Returns the total number of packets sent on this socket. uint64_t m_sendPackets = 0; //! Returns the total number of encrypted packets sent on this socket. @@ -37,7 +37,7 @@ namespace AzNetworking //! Returns the total number of packets that had to be resent on this network interface due to packet loss. uint64_t m_resentPackets = 0; //! Returns the total number of milliseconds spent processing received data on this network interface. - AZ::TimeMs m_recvTimeMs = AZ::TimeMs{ 0 }; + AZ::TimeMs m_recvTimeMs = AZ::Time::ZeroTimeMs; //! Returns the total number of packets received on this socket. uint64_t m_recvPackets = 0; //! Returns the total number of bytes received on this socket after compression. diff --git a/Code/Framework/AzNetworking/AzNetworking/TcpTransport/TcpConnection.cpp b/Code/Framework/AzNetworking/AzNetworking/TcpTransport/TcpConnection.cpp index 6d7358a425..7537232a27 100644 --- a/Code/Framework/AzNetworking/AzNetworking/TcpTransport/TcpConnection.cpp +++ b/Code/Framework/AzNetworking/AzNetworking/TcpTransport/TcpConnection.cpp @@ -27,13 +27,11 @@ namespace AzNetworking ConnectionId connectionId, const IpAddress& remoteAddress, TcpNetworkInterface& networkInterface, - TcpSocket& socket, - TimeoutId timeoutId + TcpSocket& socket ) : IConnection(connectionId, remoteAddress) , m_networkInterface(networkInterface) , m_socket(socket.CloneAndTakeOwnership()) - , m_timeoutId(timeoutId) , m_state(m_socket->IsOpen() ? ConnectionState::Connecting : ConnectionState::Disconnected) , m_connectionRole(ConnectionRole::Acceptor) , m_registeredSocketFd(InvalidSocketFd) @@ -163,13 +161,6 @@ namespace AzNetworking break; } - TimeoutQueue::TimeoutItem* timeoutItem = m_networkInterface.m_connectionTimeoutQueue.RetrieveItem(GetTimeoutId()); - if (timeoutItem == nullptr) - { - return true; - } - timeoutItem->UpdateTimeoutTime(startTimeMs); - NetworkOutputSerializer serializer(buffer.GetBuffer(), static_cast(buffer.GetSize())); if (m_state == ConnectionState::Connecting) { diff --git a/Code/Framework/AzNetworking/AzNetworking/TcpTransport/TcpConnection.h b/Code/Framework/AzNetworking/AzNetworking/TcpTransport/TcpConnection.h index b769aea086..3d74f3f336 100644 --- a/Code/Framework/AzNetworking/AzNetworking/TcpTransport/TcpConnection.h +++ b/Code/Framework/AzNetworking/AzNetworking/TcpTransport/TcpConnection.h @@ -38,14 +38,12 @@ namespace AzNetworking //! @param remoteAddress IP address of the remote endpoint //! @param networkInterface TcpNetworkInterface that owns this connection instance //! @param socket TCP socket to take ownership of and use for sending and receiving data - //! @param timeoutId timeout identifier of this connection instance TcpConnection ( ConnectionId connectionId, const IpAddress& remoteAddress, TcpNetworkInterface& networkInterface, - TcpSocket& socket, - TimeoutId timeoutId + TcpSocket& socket ); //! Construct a new socket with optional encryption, used when initiating a new connection @@ -69,14 +67,6 @@ namespace AzNetworking //! @return the TcpSocket bound to this TcpConnection TcpSocket* GetTcpSocket() const; - //! Sets the timeout identifier for this TcpConnection. - //! @param timeoutId the timeout identifier to use for this TcpConnection - void SetTimeoutId(TimeoutId timeoutId); - - //! Returns the timeout identifier for this TcpConnection. - //! @return the timeout identifier for this TcpConnection - TimeoutId GetTimeoutId() const; - //! Returns true if this connection instance is in an open state, and is capable of actively sending and receiving packets. //! @return boolean true if this connection instance is in an open state bool IsOpen() const; @@ -142,7 +132,6 @@ namespace AzNetworking AZStd::unique_ptr m_socket; AZStd::unique_ptr m_compressor; - TimeoutId m_timeoutId; PacketId m_lastSentPacketId = InvalidPacketId; ConnectionState m_state = ConnectionState::Disconnected; ConnectionRole m_connectionRole = ConnectionRole::Connector; diff --git a/Code/Framework/AzNetworking/AzNetworking/TcpTransport/TcpConnection.inl b/Code/Framework/AzNetworking/AzNetworking/TcpTransport/TcpConnection.inl index ecd1e5e908..5b5f38774e 100644 --- a/Code/Framework/AzNetworking/AzNetworking/TcpTransport/TcpConnection.inl +++ b/Code/Framework/AzNetworking/AzNetworking/TcpTransport/TcpConnection.inl @@ -15,16 +15,6 @@ namespace AzNetworking return m_socket.get(); } - inline void TcpConnection::SetTimeoutId(TimeoutId timeoutId) - { - m_timeoutId = timeoutId; - } - - inline TimeoutId TcpConnection::GetTimeoutId() const - { - return m_timeoutId; - } - inline bool TcpConnection::IsOpen() const { return m_socket->IsOpen(); diff --git a/Code/Framework/AzNetworking/AzNetworking/TcpTransport/TcpListenThread.h b/Code/Framework/AzNetworking/AzNetworking/TcpTransport/TcpListenThread.h index 0859e1d0f7..f2dc88cab4 100644 --- a/Code/Framework/AzNetworking/AzNetworking/TcpTransport/TcpListenThread.h +++ b/Code/Framework/AzNetworking/AzNetworking/TcpTransport/TcpListenThread.h @@ -67,6 +67,6 @@ namespace AzNetworking uint32_t m_listenPortCount = 0; TcpSocketManager m_tcpSocketManager; AZ::ThreadSafeDeque m_listenPorts; - AZ::TimeMs m_updateTimeMs = AZ::TimeMs{ 0 }; + AZ::TimeMs m_updateTimeMs = AZ::Time::ZeroTimeMs; }; } diff --git a/Code/Framework/AzNetworking/AzNetworking/TcpTransport/TcpNetworkInterface.cpp b/Code/Framework/AzNetworking/AzNetworking/TcpTransport/TcpNetworkInterface.cpp index 1ccff7be50..18ce25c4dd 100644 --- a/Code/Framework/AzNetworking/AzNetworking/TcpTransport/TcpNetworkInterface.cpp +++ b/Code/Framework/AzNetworking/AzNetworking/TcpTransport/TcpNetworkInterface.cpp @@ -21,16 +21,11 @@ namespace AzNetworking static const bool net_TcpUseEncryption = false; #endif - AZ_CVAR(bool, net_TcpTimeoutConnections, true, nullptr, AZ::ConsoleFunctorFlags::DontReplicate, "Boolean value on whether we should timeout Tcp connections"); - AZ_CVAR(AZ::TimeMs, net_TcpHeartbeatTimeMs, AZ::TimeMs{ 2 * 1000 }, nullptr, AZ::ConsoleFunctorFlags::Null, "Tcp connection heartbeat frequency"); - AZ_CVAR(AZ::TimeMs, net_TcpDefaultTimeoutMs, AZ::TimeMs{ 10 * 1000 }, nullptr, AZ::ConsoleFunctorFlags::Null, "Time in milliseconds before we timeout an idle Tcp connection"); - TcpNetworkInterface::TcpNetworkInterface(AZ::Name name, IConnectionListener& connectionListener, TrustZone trustZone, TcpListenThread& listenThread) : m_name(name) , m_trustZone(trustZone) , m_connectionListener(connectionListener) , m_listenThread(listenThread) - , m_timeoutMs(net_TcpDefaultTimeoutMs) { ; } @@ -98,8 +93,6 @@ namespace AzNetworking } AZLOG_INFO("Adding new socket %d", static_cast(tcpSocket->GetSocketFd())); - const TimeoutId newTimeoutId = m_connectionTimeoutQueue.RegisterItem(static_cast(tcpSocket->GetSocketFd()), net_TcpHeartbeatTimeMs); - connection->SetTimeoutId(newTimeoutId); connection->SendReliablePacket(CorePackets::InitiateConnectionPacket()); m_connectionListener.OnConnect(connection.get()); m_connectionSet.AddConnection(AZStd::move(connection)); @@ -110,17 +103,11 @@ namespace AzNetworking { const AZ::TimeMs startTimeMs = AZ::GetElapsedTimeMs(); - // Time out any stale connections - { - ConnectionTimeoutFunctor functor(*this); - m_connectionTimeoutQueue.UpdateTimeouts(functor); - } - AcceptNewConnections(); auto readCallback = [this, startTimeMs](SocketFd socketFd) { HandleConnectionRecv(socketFd, startTimeMs); }; auto writeCallback = [this](SocketFd socketFd) { HandleConnectionSend(socketFd); }; - m_tcpSocketManager.ProcessEvents(AZ::TimeMs{ 0 }, readCallback, writeCallback); + m_tcpSocketManager.ProcessEvents(AZ::Time::ZeroTimeMs, readCallback, writeCallback); FlushQueuedRemoves(); @@ -258,8 +245,7 @@ namespace AzNetworking return; } AZLOG(NET_TcpTraffic, "Adding new socket %d", static_cast(tcpSocket.GetSocketFd())); - const TimeoutId timeoutId = m_connectionTimeoutQueue.RegisterItem(static_cast(tcpSocket.GetSocketFd()), m_timeoutMs); - AZStd::unique_ptr connection = AZStd::make_unique(connectionId, remoteAddress, *this, tcpSocket, timeoutId); + AZStd::unique_ptr connection = AZStd::make_unique(connectionId, remoteAddress, *this, tcpSocket); AZ_Assert(connection->GetConnectionRole() == ConnectionRole::Acceptor, "Invalid role for connection"); GetConnectionListener().OnConnect(connection.get()); m_connectionSet.AddConnection(AZStd::move(connection)); @@ -286,7 +272,6 @@ namespace AzNetworking m_pendingRemoves.resize_no_construct(0); } - TcpNetworkInterface::PendingConnection::PendingConnection(SocketFd socketFd, uint32_t remoteIpAddress, uint16_t remotePort, uint16_t listenPort) : m_socketFd(socketFd) , m_remoteIpAddress(remoteIpAddress) @@ -295,34 +280,4 @@ namespace AzNetworking { ; } - - TcpNetworkInterface::ConnectionTimeoutFunctor::ConnectionTimeoutFunctor(TcpNetworkInterface& networkInterface) - : m_networkInterface(networkInterface) - { - ; - } - - TimeoutResult TcpNetworkInterface::ConnectionTimeoutFunctor::HandleTimeout(TimeoutQueue::TimeoutItem& item) - { - const SocketFd socketFd = static_cast(item.m_userData); - TcpConnection* tcpConnection = m_networkInterface.m_connectionSet.GetConnection(socketFd); - - if (tcpConnection == nullptr) - { - // We've already deleted this connection - return TimeoutResult::Delete; - } - - if (tcpConnection->GetConnectionRole() == ConnectionRole::Connector) - { - tcpConnection->SendReliablePacket(CorePackets::HeartbeatPacket()); - } - else if (net_TcpTimeoutConnections && (m_networkInterface.GetTimeoutMs() > AZ::TimeMs{ 0 })) - { - tcpConnection->Disconnect(DisconnectReason::Timeout, TerminationEndpoint::Local); - return TimeoutResult::Delete; - } - - return TimeoutResult::Refresh; - } } diff --git a/Code/Framework/AzNetworking/AzNetworking/TcpTransport/TcpNetworkInterface.h b/Code/Framework/AzNetworking/AzNetworking/TcpTransport/TcpNetworkInterface.h index d8f5d1b62b..d483a89cf3 100644 --- a/Code/Framework/AzNetworking/AzNetworking/TcpTransport/TcpNetworkInterface.h +++ b/Code/Framework/AzNetworking/AzNetworking/TcpTransport/TcpNetworkInterface.h @@ -137,16 +137,6 @@ namespace AzNetworking AZ_DISABLE_COPY_MOVE(TcpNetworkInterface); - struct ConnectionTimeoutFunctor final - : public ITimeoutHandler - { - ConnectionTimeoutFunctor(TcpNetworkInterface& networkInterface); - TimeoutResult HandleTimeout(TimeoutQueue::TimeoutItem& item) override; - private: - AZ_DISABLE_COPY_MOVE(ConnectionTimeoutFunctor); - TcpNetworkInterface& m_networkInterface; - }; - struct PendingRemove { SocketFd m_socketFd; @@ -156,13 +146,12 @@ namespace AzNetworking AZ::Name m_name; TrustZone m_trustZone; uint16_t m_port = 0; - AZ::TimeMs m_timeoutMs = AZ::TimeMs{ 0 }; + AZ::TimeMs m_timeoutMs = AZ::Time::ZeroTimeMs; IConnectionListener& m_connectionListener; TcpConnectionSet m_connectionSet; TcpSocketManager m_tcpSocketManager; AZ::ThreadSafeDeque m_pendingConnections; AZStd::vector m_pendingRemoves; - TimeoutQueue m_connectionTimeoutQueue; TcpListenThread& m_listenThread; friend class TcpConnection; // For access to private RequestDisconnect() method diff --git a/Code/Framework/AzNetworking/AzNetworking/UdpTransport/UdpConnection.cpp b/Code/Framework/AzNetworking/AzNetworking/UdpTransport/UdpConnection.cpp index 7b451865c4..452992f971 100644 --- a/Code/Framework/AzNetworking/AzNetworking/UdpTransport/UdpConnection.cpp +++ b/Code/Framework/AzNetworking/AzNetworking/UdpTransport/UdpConnection.cpp @@ -79,7 +79,8 @@ namespace AzNetworking AZLOG(NET_Acks, "Unacked packet count exceeded, sending client heartbeat (curr %u : max %u)", m_unackedPacketCount, static_cast(net_UdpMaxUnackedPacketCount)); // This simply times out unreliable chunks that haven't completed within our timeout delay m_fragmentQueue.Update(); - SendUnreliablePacket(CorePackets::HeartbeatPacket()); + // This heartbeat is sent to minimize the time the remote endpoint spends waiting for ack vector replication, we don't require a response + SendUnreliablePacket(CorePackets::HeartbeatPacket(false)); } } @@ -289,7 +290,11 @@ namespace AzNetworking { return PacketDispatchResult::Failure; } - // Do nothing, we've already processed our ack packets + if (packet.GetRequestResponse()) + { + // We're replying to a heartbeat request, we don't want a response + SendUnreliablePacket(CorePackets::HeartbeatPacket(false)); + } return PacketDispatchResult::Success; } break; diff --git a/Code/Framework/AzNetworking/AzNetworking/UdpTransport/UdpConnection.h b/Code/Framework/AzNetworking/AzNetworking/UdpTransport/UdpConnection.h index 199a5a8347..ddd75c9946 100644 --- a/Code/Framework/AzNetworking/AzNetworking/UdpTransport/UdpConnection.h +++ b/Code/Framework/AzNetworking/AzNetworking/UdpTransport/UdpConnection.h @@ -136,12 +136,12 @@ namespace AzNetworking AZ_DISABLE_COPY_MOVE(UdpConnection); UdpNetworkInterface& m_networkInterface; - UdpPacketTracker m_packetTracker; - UdpReliableQueue m_reliableQueue; - UdpFragmentQueue m_fragmentQueue; - ConnectionState m_state = ConnectionState::Disconnected; - ConnectionRole m_connectionRole = ConnectionRole::Connector; - DtlsEndpoint m_dtlsEndpoint; + UdpPacketTracker m_packetTracker; + UdpReliableQueue m_reliableQueue; + UdpFragmentQueue m_fragmentQueue; + ConnectionState m_state = ConnectionState::Disconnected; + ConnectionRole m_connectionRole = ConnectionRole::Connector; + DtlsEndpoint m_dtlsEndpoint; AZ::TimeMs m_lastSentPacketMs; uint32_t m_unackedPacketCount = 0; diff --git a/Code/Framework/AzNetworking/AzNetworking/UdpTransport/UdpFragmentQueue.cpp b/Code/Framework/AzNetworking/AzNetworking/UdpTransport/UdpFragmentQueue.cpp index fa4ee78a92..0c710f5a14 100644 --- a/Code/Framework/AzNetworking/AzNetworking/UdpTransport/UdpFragmentQueue.cpp +++ b/Code/Framework/AzNetworking/AzNetworking/UdpTransport/UdpFragmentQueue.cpp @@ -20,7 +20,13 @@ namespace AzNetworking void UdpFragmentQueue::Update() { - m_timeoutQueue.UpdateTimeouts(*this); + m_timeoutQueue.UpdateTimeouts([this](TimeoutQueue::TimeoutItem& item) + { + const SequenceId fragmentSequence = static_cast(item.m_userData & 0xFF); + AZLOG(NET_FragmentQueue, "Timing out unreliable fragmented packet %u", static_cast(fragmentSequence)); + m_packetFragments.erase(fragmentSequence); + return TimeoutResult::Delete; + }); } void UdpFragmentQueue::Reset() @@ -163,12 +169,4 @@ namespace AzNetworking return handledPacket; } - - TimeoutResult UdpFragmentQueue::HandleTimeout(TimeoutQueue::TimeoutItem& item) - { - const SequenceId fragmentSequence = static_cast(item.m_userData & 0xFF); - AZLOG(NET_FragmentQueue, "Timing out unreliable fragmented packet %u", static_cast(fragmentSequence)); - m_packetFragments.erase(fragmentSequence); - return TimeoutResult::Delete; - } } diff --git a/Code/Framework/AzNetworking/AzNetworking/UdpTransport/UdpFragmentQueue.h b/Code/Framework/AzNetworking/AzNetworking/UdpTransport/UdpFragmentQueue.h index 9c929d63e8..5efa767283 100644 --- a/Code/Framework/AzNetworking/AzNetworking/UdpTransport/UdpFragmentQueue.h +++ b/Code/Framework/AzNetworking/AzNetworking/UdpTransport/UdpFragmentQueue.h @@ -26,7 +26,6 @@ namespace AzNetworking //! @class UdpFragmentQueue //! @brief Class for reconstructing packet chunks into the original unsegmented packet. class UdpFragmentQueue - : public ITimeoutHandler { public: @@ -51,11 +50,6 @@ namespace AzNetworking private: - //! Handler callback for timed out items. - //! @param item containing registered timeout details - //! @return ETimeoutResult for whether to re-register or discard the timeout params - TimeoutResult HandleTimeout(TimeoutQueue::TimeoutItem& item) override; - TimeoutQueue m_timeoutQueue; SequenceGenerator m_sequenceGenerator; diff --git a/Code/Framework/AzNetworking/AzNetworking/UdpTransport/UdpNetworkInterface.cpp b/Code/Framework/AzNetworking/AzNetworking/UdpTransport/UdpNetworkInterface.cpp index b0e64f93e3..1ca5922753 100644 --- a/Code/Framework/AzNetworking/AzNetworking/UdpTransport/UdpNetworkInterface.cpp +++ b/Code/Framework/AzNetworking/AzNetworking/UdpTransport/UdpNetworkInterface.cpp @@ -31,7 +31,7 @@ namespace AzNetworking AZ_CVAR(bool, net_UdpTimeoutConnections, true, nullptr, AZ::ConsoleFunctorFlags::DontReplicate, "Boolean value on whether we should timeout Udp connections"); AZ_CVAR(AZ::TimeMs, net_UdpPacketTimeSliceMs, AZ::TimeMs{ 8 }, nullptr, AZ::ConsoleFunctorFlags::DontReplicate, "The number of milliseconds to allow for packet processing"); - AZ_CVAR(AZ::TimeMs, net_UdpHeartbeatTimeMs, AZ::TimeMs{ 2 * 1000 }, nullptr, AZ::ConsoleFunctorFlags::Null, "Udp connection heartbeat frequency"); + AZ_CVAR(uint32_t, net_UdpUnackedHeartbeats, 5, nullptr, AZ::ConsoleFunctorFlags::Null, "The number of heartbeats to attempt to send to keep a connection alive before giving up"); AZ_CVAR(AZ::TimeMs, net_UdpDefaultTimeoutMs, AZ::TimeMs{ 10 * 1000 }, nullptr, AZ::ConsoleFunctorFlags::Null, "Time in milliseconds before we timeout an idle Udp connection"); AZ_CVAR(AZ::TimeMs, net_MinPacketTimeoutMs, AZ::TimeMs{ 200 }, nullptr, AZ::ConsoleFunctorFlags::DontReplicate, "Minimum time to wait before timing out an unacked packet"); AZ_CVAR(int32_t, net_MaxTimeoutsPerFrame, 1000, nullptr, AZ::ConsoleFunctorFlags::DontReplicate, "Maximum number of packet timeouts to allow to process in a single frame"); @@ -139,7 +139,8 @@ namespace AzNetworking } const ConnectionId connectionId = m_connectionSet.GetNextConnectionId(); - const TimeoutId timeoutId = m_connectionTimeoutQueue.RegisterItem(aznumeric_cast(connectionId), m_timeoutMs); + const AZ::TimeMs timeoutTimeMs = m_timeoutMs / static_cast(static_cast(net_UdpUnackedHeartbeats)); + const TimeoutId timeoutId = m_connectionTimeoutQueue.RegisterItem(aznumeric_cast(connectionId), timeoutTimeMs); AZStd::unique_ptr connection = AZStd::make_unique(connectionId, remoteAddress, *this, ConnectionRole::Connector); UdpPacketEncodingBuffer dtlsData; @@ -277,6 +278,7 @@ namespace AzNetworking } timeoutItem->UpdateTimeoutTime(startTimeMs); + connection->m_timeoutCounter = 0; PacketDispatchResult handledPacket = PacketDispatchResult::Failure; if (header.GetPacketType() < aznumeric_cast(CorePackets::PacketType::MAX)) @@ -319,16 +321,10 @@ namespace AzNetworking const AZ::TimeMs receiveTimeMs = AZ::GetElapsedTimeMs() - startTimeMs; // Time out any stale client connections - { - ConnectionTimeoutFunctor functor(*this); - m_connectionTimeoutQueue.UpdateTimeouts(functor); - } + m_connectionTimeoutQueue.UpdateTimeouts([this](TimeoutQueue::TimeoutItem& item) { return HandleConnectionTimeout(item); }); // Time out any packets that haven't been acked within our timeout window - { - PacketTimeoutFunctor functor(*this); - m_packetTimeoutQueue.UpdateTimeouts(functor, static_cast(net_MaxTimeoutsPerFrame)); - } + m_packetTimeoutQueue.UpdateTimeouts([this](TimeoutQueue::TimeoutItem& item) { return HandlePacketTimeout(item); }, static_cast(net_MaxTimeoutsPerFrame)); // Delete any connections we've disconnected for (RemovedConnection& removedConnection : m_removedConnections) @@ -709,21 +705,14 @@ namespace AzNetworking { // Packets involved in handshake are InitiateConnection, ConnectionHandshake and FragmentedPackets of ConnectionHandshake return packetType == aznumeric_cast(CorePackets::PacketType::InitiateConnectionPacket) || - packetType == aznumeric_cast(CorePackets::PacketType::ConnectionHandshakePacket) || - (packetType == aznumeric_cast(CorePackets::PacketType::FragmentedPacket) && endpoint.IsConnecting()); + packetType == aznumeric_cast(CorePackets::PacketType::ConnectionHandshakePacket) || + (packetType == aznumeric_cast(CorePackets::PacketType::FragmentedPacket) && endpoint.IsConnecting()); } - - UdpNetworkInterface::ConnectionTimeoutFunctor::ConnectionTimeoutFunctor(UdpNetworkInterface& networkInterface) - : m_networkInterface(networkInterface) - { - ; - } - - TimeoutResult UdpNetworkInterface::ConnectionTimeoutFunctor::HandleTimeout(TimeoutQueue::TimeoutItem& item) + TimeoutResult UdpNetworkInterface::HandleConnectionTimeout(TimeoutQueue::TimeoutItem& item) { const ConnectionId connectionId = ConnectionId(aznumeric_cast(item.m_userData)); - UdpConnection* udpConnection = static_cast(m_networkInterface.m_connectionSet.GetConnection(connectionId)); + UdpConnection* udpConnection = static_cast(m_connectionSet.GetConnection(connectionId)); if (udpConnection == nullptr) { @@ -731,22 +720,23 @@ namespace AzNetworking return TimeoutResult::Delete; } - if (udpConnection->GetConnectionState() == ConnectionState::Connecting) + if ((udpConnection->GetConnectionState() == ConnectionState::Connecting) + && udpConnection->GetDtlsEndpoint().IsConnecting()) { - if (udpConnection->GetDtlsEndpoint().IsConnecting()) - { - // DTLS prefers we resend data lost over the wire with fresh SSL IDs so account for that here - UdpPacketEncodingBuffer dtlsData; - udpConnection->ProcessHandshakeData(dtlsData); - return TimeoutResult::Refresh; - } + // DTLS prefers we resend data lost over the wire with fresh SSL IDs so account for that here + UdpPacketEncodingBuffer dtlsData; + udpConnection->ProcessHandshakeData(dtlsData); + return TimeoutResult::Refresh; } - if (udpConnection->GetConnectionRole() == ConnectionRole::Connector) + if ((udpConnection->GetConnectionRole() == ConnectionRole::Connector) + && (udpConnection->m_timeoutCounter < net_UdpUnackedHeartbeats)) { - udpConnection->SendUnreliablePacket(CorePackets::HeartbeatPacket()); + // Set the request response flag to true since we want a response to keep the connection alive + udpConnection->SendUnreliablePacket(CorePackets::HeartbeatPacket(true)); + ++udpConnection->m_timeoutCounter; } - else if (net_UdpTimeoutConnections && (m_networkInterface.GetTimeoutMs() > AZ::TimeMs{ 0 })) + else if (net_UdpTimeoutConnections && (GetTimeoutMs() > AZ::Time::ZeroTimeMs)) { udpConnection->Disconnect(DisconnectReason::Timeout, TerminationEndpoint::Local); return TimeoutResult::Delete; @@ -755,19 +745,13 @@ namespace AzNetworking return TimeoutResult::Refresh; } - UdpNetworkInterface::PacketTimeoutFunctor::PacketTimeoutFunctor(UdpNetworkInterface& networkInterface) - : m_networkInterface(networkInterface) - { - ; - } - - TimeoutResult UdpNetworkInterface::PacketTimeoutFunctor::HandleTimeout(TimeoutQueue::TimeoutItem& item) + TimeoutResult UdpNetworkInterface::HandlePacketTimeout(TimeoutQueue::TimeoutItem& item) { ConnectionId connectionId; PacketId packetId; ReliabilityType reliability; DecodeTimeoutId(item.m_userData, connectionId, packetId, reliability); - UdpConnection* connection = static_cast(m_networkInterface.m_connectionSet.GetConnection(connectionId)); + UdpConnection* connection = static_cast(m_connectionSet.GetConnection(connectionId)); if (connection == nullptr) { @@ -782,16 +766,14 @@ namespace AzNetworking case PacketTimeoutResult::Acked: // Packet was already acked, just discard this timeout entry return TimeoutResult::Delete; - case PacketTimeoutResult::Pending: // Packet timed out before we received any info about it's sequence from the remote endpoint // The connection latency may have increased, and our Rtt metrics may still be adjusting.. // Just throw it back into the timeout queue return TimeoutResult::Refresh; - case PacketTimeoutResult::Lost: // Packet timed out and was not acked, so we consider it lost - m_networkInterface.m_connectionListener.OnPacketLost(connection, packetId); + m_connectionListener.OnPacketLost(connection, packetId); break; } diff --git a/Code/Framework/AzNetworking/AzNetworking/UdpTransport/UdpNetworkInterface.h b/Code/Framework/AzNetworking/AzNetworking/UdpTransport/UdpNetworkInterface.h index 8f827c74c4..a640a6e3b8 100644 --- a/Code/Framework/AzNetworking/AzNetworking/UdpTransport/UdpNetworkInterface.h +++ b/Code/Framework/AzNetworking/AzNetworking/UdpTransport/UdpNetworkInterface.h @@ -149,39 +149,29 @@ namespace AzNetworking //! @param endpoint whether the disconnection was initiated locally or remotely void RequestDisconnect(UdpConnection* connection, DisconnectReason reason, TerminationEndpoint endpoint); - //! Internal helper to check if a packet's type is for connection handshake + //! Internal helper to check if a packet's type is for connection handshake. //! @param endpoint DTLS endpoint participating in the handshake //! @param packetType type of the packet //! @return if the packet is for handshake bool IsHandshakePacket(const DtlsEndpoint& endpoint, AzNetworking::PacketType packetType) const; + //! Internal helper to manage connection timeout behaviour. + //! @param item the timeout item corresponding to the timed out connection + //! @return whether to delete or persist the timeout item + TimeoutResult HandleConnectionTimeout(TimeoutQueue::TimeoutItem& item); + + //! Internal helper to manage packet timeout behaviour. + //! @param item the timeout item corresponding to the timed out packet + //! @return whether to delete or persist the timeout item + TimeoutResult HandlePacketTimeout(TimeoutQueue::TimeoutItem& item); + AZ_DISABLE_COPY_MOVE(UdpNetworkInterface); - struct ConnectionTimeoutFunctor final - : public ITimeoutHandler - { - ConnectionTimeoutFunctor(UdpNetworkInterface& networkInterface); - TimeoutResult HandleTimeout(TimeoutQueue::TimeoutItem& item) override; - private: - AZ_DISABLE_COPY_MOVE(ConnectionTimeoutFunctor); - UdpNetworkInterface& m_networkInterface; - }; - - struct PacketTimeoutFunctor final - : public ITimeoutHandler - { - PacketTimeoutFunctor(UdpNetworkInterface& networkInterface); - TimeoutResult HandleTimeout(TimeoutQueue::TimeoutItem& item) override; - private: - AZ_DISABLE_COPY_MOVE(PacketTimeoutFunctor); - UdpNetworkInterface& m_networkInterface; - }; - AZ::Name m_name; TrustZone m_trustZone; uint16_t m_port = 0; bool m_allowIncomingConnections = false; - AZ::TimeMs m_timeoutMs = AZ::TimeMs{ 0 }; + AZ::TimeMs m_timeoutMs = AZ::Time::ZeroTimeMs; IConnectionListener& m_connectionListener; UdpConnectionSet m_connectionSet; TimeoutQueue m_connectionTimeoutQueue; diff --git a/Code/Framework/AzNetworking/AzNetworking/UdpTransport/UdpReaderThread.h b/Code/Framework/AzNetworking/AzNetworking/UdpTransport/UdpReaderThread.h index e0c97f157f..1d25a9e6e1 100644 --- a/Code/Framework/AzNetworking/AzNetworking/UdpTransport/UdpReaderThread.h +++ b/Code/Framework/AzNetworking/AzNetworking/UdpTransport/UdpReaderThread.h @@ -94,6 +94,6 @@ namespace AzNetworking int32_t m_backIndex = 0; AZStd::array m_readerBuffers; AZStd::vector m_pendingAdds; - AZ::TimeMs m_updateTimeMs = AZ::TimeMs{ 0 }; + AZ::TimeMs m_updateTimeMs = AZ::Time::ZeroTimeMs; }; } diff --git a/Code/Framework/AzNetworking/AzNetworking/UdpTransport/UdpSocket.cpp b/Code/Framework/AzNetworking/AzNetworking/UdpTransport/UdpSocket.cpp index 300b3527fa..85cc3a38f8 100644 --- a/Code/Framework/AzNetworking/AzNetworking/UdpTransport/UdpSocket.cpp +++ b/Code/Framework/AzNetworking/AzNetworking/UdpTransport/UdpSocket.cpp @@ -135,7 +135,7 @@ namespace AzNetworking int32_t sentBytes = size; #ifdef ENABLE_LATENCY_DEBUG - if (connectionQuality.m_latencyMs <= AZ::TimeMs{ 0 }) + if (connectionQuality.m_latencyMs <= AZ::Time::ZeroTimeMs) #endif { sentBytes = SendInternal(address, data, size, encrypt, dtlsEndpoint); @@ -153,9 +153,9 @@ namespace AzNetworking } } #ifdef ENABLE_LATENCY_DEBUG - else if ((connectionQuality.m_latencyMs > AZ::TimeMs{ 0 }) || (connectionQuality.m_varianceMs > AZ::TimeMs{ 0 })) + else if ((connectionQuality.m_latencyMs > AZ::Time::ZeroTimeMs) || (connectionQuality.m_varianceMs > AZ::Time::ZeroTimeMs)) { - const AZ::TimeMs jitterMs = aznumeric_cast(m_random.GetRandom()) % (connectionQuality.m_varianceMs > AZ::TimeMs{ 0 } + const AZ::TimeMs jitterMs = aznumeric_cast(m_random.GetRandom()) % (connectionQuality.m_varianceMs > AZ::Time::ZeroTimeMs ? connectionQuality.m_varianceMs : AZ::TimeMs{ 1 }); const AZ::TimeMs deferTimeMs = (connectionQuality.m_latencyMs) + jitterMs; diff --git a/Code/Framework/AzNetworking/AzNetworking/Utilities/EncryptionCommon.cpp b/Code/Framework/AzNetworking/AzNetworking/Utilities/EncryptionCommon.cpp index 9f496c3e0c..0903205eb8 100644 --- a/Code/Framework/AzNetworking/AzNetworking/Utilities/EncryptionCommon.cpp +++ b/Code/Framework/AzNetworking/AzNetworking/Utilities/EncryptionCommon.cpp @@ -94,7 +94,7 @@ namespace AzNetworking static const uint32_t MaxCookieHistory = 8; static bool g_encryptionInitialized = false; static int32_t g_azNetworkingTrustDataIndex = 0; - static AZ::TimeMs g_lastCookieTimestamp = AZ::TimeMs{0}; + static AZ::TimeMs g_lastCookieTimestamp = AZ::Time::ZeroTimeMs; static uint64_t g_validCookieArray[MaxCookieHistory]; static uint32_t g_cookieReplaceIndex = 0; diff --git a/Code/Framework/AzNetworking/Tests/Serialization/DeltaSerializerTests.cpp b/Code/Framework/AzNetworking/Tests/Serialization/DeltaSerializerTests.cpp index 32562d9940..4ad9412849 100644 --- a/Code/Framework/AzNetworking/Tests/Serialization/DeltaSerializerTests.cpp +++ b/Code/Framework/AzNetworking/Tests/Serialization/DeltaSerializerTests.cpp @@ -15,7 +15,7 @@ namespace UnitTest { AzNetworking::PacketId m_packetId = AzNetworking::InvalidPacketId; uint32_t m_id = 0; - AZ::TimeMs m_timeMs = AZ::TimeMs{ 0 }; + AZ::TimeMs m_timeMs = AZ::Time::ZeroTimeMs; float m_blendFactor = 0.f; AZStd::vector m_growVector, m_shrinkVector; diff --git a/Code/Framework/AzNetworking/Tests/TcpTransport/TcpTransportTests.cpp b/Code/Framework/AzNetworking/Tests/TcpTransport/TcpTransportTests.cpp index 77632da572..d3a956bef3 100644 --- a/Code/Framework/AzNetworking/Tests/TcpTransport/TcpTransportTests.cpp +++ b/Code/Framework/AzNetworking/Tests/TcpTransport/TcpTransportTests.cpp @@ -11,7 +11,7 @@ #include #include #include -#include +#include #include #include @@ -102,24 +102,24 @@ namespace UnitTest SetupAllocator(); AZ::NameDictionary::Create(); - m_loggerComponent = new AZ::LoggerSystemComponent; - m_timeComponent = new AZ::TimeSystemComponent; - m_networkingSystemComponent = new AzNetworking::NetworkingSystemComponent; + m_loggerComponent = AZStd::make_unique(); + m_timeSystem = AZStd::make_unique(); + m_networkingSystemComponent = AZStd::make_unique(); } void TearDown() override { - delete m_networkingSystemComponent; - delete m_timeComponent; - delete m_loggerComponent; + m_networkingSystemComponent.reset(); + m_timeSystem.reset(); + m_loggerComponent.reset(); AZ::NameDictionary::Destroy(); TeardownAllocator(); } - AZ::LoggerSystemComponent* m_loggerComponent; - AZ::TimeSystemComponent* m_timeComponent; - AzNetworking::NetworkingSystemComponent* m_networkingSystemComponent; + AZStd::unique_ptr m_loggerComponent; + AZStd::unique_ptr m_timeSystem; + AZStd::unique_ptr m_networkingSystemComponent; }; #if AZ_TRAIT_DISABLE_FAILED_NETWORKING_TESTS diff --git a/Code/Framework/AzNetworking/Tests/UdpTransport/UdpTransportTests.cpp b/Code/Framework/AzNetworking/Tests/UdpTransport/UdpTransportTests.cpp index 65c2cfa2b5..821c261fab 100644 --- a/Code/Framework/AzNetworking/Tests/UdpTransport/UdpTransportTests.cpp +++ b/Code/Framework/AzNetworking/Tests/UdpTransport/UdpTransportTests.cpp @@ -14,7 +14,7 @@ #include #include #include -#include +#include #include #include @@ -105,24 +105,24 @@ namespace UnitTest SetupAllocator(); AZ::NameDictionary::Create(); - m_loggerComponent = new AZ::LoggerSystemComponent; - m_timeComponent = new AZ::TimeSystemComponent; - m_networkingSystemComponent = new AzNetworking::NetworkingSystemComponent; + m_loggerComponent = AZStd::make_unique(); + m_timeSystem = AZStd::make_unique(); + m_networkingSystemComponent = AZStd::make_unique(); } void TearDown() override { - delete m_networkingSystemComponent; - delete m_timeComponent; - delete m_loggerComponent; + m_networkingSystemComponent.reset(); + m_timeSystem.reset(); + m_loggerComponent.reset(); AZ::NameDictionary::Destroy(); TeardownAllocator(); } - AZ::LoggerSystemComponent* m_loggerComponent; - AZ::TimeSystemComponent* m_timeComponent; - AzNetworking::NetworkingSystemComponent* m_networkingSystemComponent; + AZStd::unique_ptr m_loggerComponent; + AZStd::unique_ptr m_timeSystem; + AZStd::unique_ptr m_networkingSystemComponent; }; TEST_F(UdpTransportTests, PacketIdWrap) diff --git a/Code/Framework/AzQtComponents/AzQtComponents/Components/FancyDocking.cpp b/Code/Framework/AzQtComponents/AzQtComponents/Components/FancyDocking.cpp index 7a76781cd7..7e78f64778 100644 --- a/Code/Framework/AzQtComponents/AzQtComponents/Components/FancyDocking.cpp +++ b/Code/Framework/AzQtComponents/AzQtComponents/Components/FancyDocking.cpp @@ -53,14 +53,13 @@ static void OptimizedSetParent(QWidget* widget, QWidget* parent) namespace AzQtComponents { - static FancyDockingDropZoneConstants g_FancyDockingConstants; // Constant for the threshold in pixels for snapping to edges while dragging for docking static const int g_snapThresholdInPixels = 15; - static QString g_minimizeButtonObjectName = "minimizeButton"; - static QString g_maximizeButtonObjectName = "maximizeButton"; - static QString g_closeButtonObjectName = "closeButton"; + static const QString MinimizeButtonObjectName = QStringLiteral("minimizeButton"); + static const QString MaximizeButtonObjectName = QStringLiteral("maximizeButton"); + static const QString CloseButtonObjectName = QStringLiteral("closeButton"); static Qt::Orientation orientation(Qt::DockWidgetArea area) { @@ -155,7 +154,7 @@ namespace AzQtComponents // Timer for updating our hovered drop zone opacity QObject::connect(m_dropZoneHoverFadeInTimer, &QTimer::timeout, this, &FancyDocking::onDropZoneHoverFadeInUpdate); - m_dropZoneHoverFadeInTimer->setInterval(g_FancyDockingConstants.dropZoneHoverFadeUpdateIntervalMS); + m_dropZoneHoverFadeInTimer->setInterval(FancyDockingDropZoneConstants::dropZoneHoverFadeUpdateIntervalMS); QIcon dragIcon = QIcon(QStringLiteral(":/Cursors/Grabbing.svg")); m_dragCursor = QCursor(dragIcon.pixmap(16), 5, 2); } @@ -333,13 +332,13 @@ namespace AzQtComponents */ void FancyDocking::onDropZoneHoverFadeInUpdate() { - const qreal dropZoneHoverOpacity = g_FancyDockingConstants.dropZoneHoverFadeIncrement + m_dropZoneState.dropZoneHoverOpacity(); + const qreal dropZoneHoverOpacity = FancyDockingDropZoneConstants::dropZoneHoverFadeIncrement + m_dropZoneState.dropZoneHoverOpacity(); // Once we've reached the full drop zone opacity, cut it off in case we // went over and stop the timer - if (dropZoneHoverOpacity >= g_FancyDockingConstants.dropZoneOpacity) + if (dropZoneHoverOpacity >= FancyDockingDropZoneConstants::dropZoneOpacity) { - m_dropZoneState.setDropZoneHoverOpacity(g_FancyDockingConstants.dropZoneOpacity); + m_dropZoneState.setDropZoneHoverOpacity(FancyDockingDropZoneConstants::dropZoneOpacity); m_dropZoneHoverFadeInTimer->stop(); } else @@ -460,7 +459,7 @@ namespace AzQtComponents // Minimize Icon QAction* minimizeAction = new QAction(tr("Minimize")); - minimizeAction->setObjectName(g_minimizeButtonObjectName); + minimizeAction->setObjectName(MinimizeButtonObjectName); connect(minimizeAction, &QAction::triggered, this, [titleBar]() { titleBar->handleMinimize(); @@ -470,7 +469,7 @@ namespace AzQtComponents // Maximize Icon QAction* maximizeAction = new QAction(tr("Maximize")); - maximizeAction->setObjectName(g_maximizeButtonObjectName); + maximizeAction->setObjectName(MaximizeButtonObjectName); connect(maximizeAction, &QAction::triggered, this, [titleBar]() { titleBar->handleMaximize(); @@ -480,7 +479,7 @@ namespace AzQtComponents // Close Icon QAction* closeAction = new QAction(tr("Close")); - closeAction->setObjectName(g_closeButtonObjectName); + closeAction->setObjectName(CloseButtonObjectName); connect(closeAction, &QAction::triggered, this, [titleBar]() { titleBar->handleClose(); @@ -792,12 +791,12 @@ namespace AzQtComponents QPoint mainWindowTopLeft = multiscreenMapFromGlobal(mainWindow->mapToGlobal(mainWindowRect.topLeft())); QPoint mainWindowTopRight = multiscreenMapFromGlobal(mainWindow->mapToGlobal(mainWindowRect.topRight())); QPoint mainWindowBottomLeft = multiscreenMapFromGlobal(mainWindow->mapToGlobal(mainWindowRect.bottomLeft())); - QSize absoluteLeftRightSize(g_FancyDockingConstants.absoluteDropZoneSizeInPixels, mainWindowRect.height()); + QSize absoluteLeftRightSize(FancyDockingDropZoneConstants::absoluteDropZoneSizeInPixels, mainWindowRect.height()); QRect absoluteLeftDropZone(mainWindowTopLeft, absoluteLeftRightSize); - QRect absoluteRightDropZone(mainWindowTopRight - QPoint(g_FancyDockingConstants.absoluteDropZoneSizeInPixels, 0), absoluteLeftRightSize); - QSize absoluteTopBottomSize(mainWindowRect.width(), g_FancyDockingConstants.absoluteDropZoneSizeInPixels); + QRect absoluteRightDropZone(mainWindowTopRight - QPoint(FancyDockingDropZoneConstants::absoluteDropZoneSizeInPixels, 0), absoluteLeftRightSize); + QSize absoluteTopBottomSize(mainWindowRect.width(), FancyDockingDropZoneConstants::absoluteDropZoneSizeInPixels); QRect absoluteTopDropZone(mainWindowTopLeft, absoluteTopBottomSize); - QRect absoluteBottomDropZone(mainWindowBottomLeft - QPoint(0, g_FancyDockingConstants.absoluteDropZoneSizeInPixels), absoluteTopBottomSize); + QRect absoluteBottomDropZone(mainWindowBottomLeft - QPoint(0, FancyDockingDropZoneConstants::absoluteDropZoneSizeInPixels), absoluteTopBottomSize); // If the drop target is a main window, then we will only show the absolute // drop zone if the cursor is in that zone already @@ -986,16 +985,16 @@ namespace AzQtComponents switch (m_dropZoneState.absoluteDropZoneArea()) { case Qt::LeftDockWidgetArea: - dockRect.setX(dockRect.x() + g_FancyDockingConstants.absoluteDropZoneSizeInPixels); + dockRect.setX(dockRect.x() + FancyDockingDropZoneConstants::absoluteDropZoneSizeInPixels); break; case Qt::RightDockWidgetArea: - dockRect.setWidth(dockRect.width() - g_FancyDockingConstants.absoluteDropZoneSizeInPixels); + dockRect.setWidth(dockRect.width() - FancyDockingDropZoneConstants::absoluteDropZoneSizeInPixels); break; case Qt::TopDockWidgetArea: - dockRect.setY(dockRect.y() + g_FancyDockingConstants.absoluteDropZoneSizeInPixels); + dockRect.setY(dockRect.y() + FancyDockingDropZoneConstants::absoluteDropZoneSizeInPixels); break; case Qt::BottomDockWidgetArea: - dockRect.setHeight(dockRect.height() - g_FancyDockingConstants.absoluteDropZoneSizeInPixels); + dockRect.setHeight(dockRect.height() - FancyDockingDropZoneConstants::absoluteDropZoneSizeInPixels); break; } @@ -1034,15 +1033,15 @@ namespace AzQtComponents // Set the drop zone width/height to the default, but if the dock widget // width and/or height is below the threshold, then switch to scaling them // down accordingly - int dropZoneWidth = g_FancyDockingConstants.dropZoneSizeInPixels; - if (dockWidth < g_FancyDockingConstants.minDockSizeBeforeDropZoneScalingInPixels) + int dropZoneWidth = FancyDockingDropZoneConstants::dropZoneSizeInPixels; + if (dockWidth < FancyDockingDropZoneConstants::minDockSizeBeforeDropZoneScalingInPixels) { - dropZoneWidth = aznumeric_cast(dockWidth * g_FancyDockingConstants.dropZoneScaleFactor); + dropZoneWidth = aznumeric_cast(dockWidth * FancyDockingDropZoneConstants::dropZoneScaleFactor); } - int dropZoneHeight = g_FancyDockingConstants.dropZoneSizeInPixels; - if (dockHeight < g_FancyDockingConstants.minDockSizeBeforeDropZoneScalingInPixels) + int dropZoneHeight = FancyDockingDropZoneConstants::dropZoneSizeInPixels; + if (dockHeight < FancyDockingDropZoneConstants::minDockSizeBeforeDropZoneScalingInPixels) { - dropZoneHeight = aznumeric_cast(dockHeight * g_FancyDockingConstants.dropZoneScaleFactor); + dropZoneHeight = aznumeric_cast(dockHeight * FancyDockingDropZoneConstants::dropZoneScaleFactor); } // Calculate the inner corners to be used when constructing the drop zone polygons @@ -1078,7 +1077,7 @@ namespace AzQtComponents int innerDropZoneWidth = m_dropZoneState.innerDropZoneRect().width(); int innerDropZoneHeight = m_dropZoneState.innerDropZoneRect().height(); int centerDropZoneDiameter = (innerDropZoneWidth < innerDropZoneHeight) ? innerDropZoneWidth : innerDropZoneHeight; - centerDropZoneDiameter = aznumeric_cast(centerDropZoneDiameter * g_FancyDockingConstants.centerTabDropZoneScale); + centerDropZoneDiameter = aznumeric_cast(centerDropZoneDiameter * FancyDockingDropZoneConstants::centerTabDropZoneScale); // Setup our center tab drop zone const QSize centerDropZoneSize(centerDropZoneDiameter, centerDropZoneDiameter); @@ -1986,7 +1985,7 @@ namespace AzQtComponents // hasn't faded in all the way yet, then ignore the drop zone area // which will make the widget floating bool modifiedKeyPressed = FancyDockingDropZoneWidget::CheckModifierKey(); - if (modifiedKeyPressed || m_dropZoneState.dropZoneHoverOpacity() != g_FancyDockingConstants.dropZoneOpacity) + if (modifiedKeyPressed || m_dropZoneState.dropZoneHoverOpacity() != FancyDockingDropZoneConstants::dropZoneOpacity) { area = Qt::NoDockWidgetArea; } @@ -2785,7 +2784,7 @@ namespace AzQtComponents RepaintFloatingIndicators(); } break; - case QEvent::WindowDeactivate: + case QEvent::WindowBlocked: // If our main window is deactivated while we are in the middle of // a docking drag operation (e.g. popup dialog for new level), we // should cancel our drag operation because the mouse release event @@ -3026,7 +3025,7 @@ namespace AzQtComponents { bool modifiedKeyPressed = FancyDockingDropZoneWidget::CheckModifierKey(); - m_ghostWidget->setWindowOpacity(modifiedKeyPressed ? 1.0f : g_FancyDockingConstants.draggingDockWidgetOpacity); + m_ghostWidget->setWindowOpacity(modifiedKeyPressed ? 1.0f : FancyDockingDropZoneConstants::draggingDockWidgetOpacity); m_ghostWidget->setPixmap(m_state.dockWidgetScreenGrab.screenGrab, m_state.placeholder(), m_state.placeholderScreen()); } } diff --git a/Code/Framework/AzQtComponents/AzQtComponents/Components/FancyDockingDropZoneWidget.cpp b/Code/Framework/AzQtComponents/AzQtComponents/Components/FancyDockingDropZoneWidget.cpp index d729929d7b..3873f0389b 100644 --- a/Code/Framework/AzQtComponents/AzQtComponents/Components/FancyDockingDropZoneWidget.cpp +++ b/Code/Framework/AzQtComponents/AzQtComponents/Components/FancyDockingDropZoneWidget.cpp @@ -19,26 +19,6 @@ namespace AzQtComponents { - static FancyDockingDropZoneConstants g_Constants; - - FancyDockingDropZoneConstants::FancyDockingDropZoneConstants() - { - draggingDockWidgetOpacity = 0.6; - dropZoneOpacity = 0.4; - dropZoneSizeInPixels = 40; - minDockSizeBeforeDropZoneScalingInPixels = dropZoneSizeInPixels * 3; - dropZoneScaleFactor = 0.25; - centerTabDropZoneScale = 0.5; - centerTabIconScale = 0.5; - dropZoneColor = QColor(155, 155, 155); - dropZoneBorderColor = Qt::black; - dropZoneBorderInPixels = 1; - absoluteDropZoneSizeInPixels = 25; - dockingTargetDelayMS = 110; - dropZoneHoverFadeUpdateIntervalMS = 20; - dropZoneHoverFadeIncrement = dropZoneOpacity / (dockingTargetDelayMS / dropZoneHoverFadeUpdateIntervalMS); - centerDropZoneIconPath = QString(":/stylesheet/img/UI20/docking/tabs_icon.svg"); - } FancyDockingDropZoneWidget::FancyDockingDropZoneWidget(QMainWindow* mainWindow, QWidget* coordinatesRelativeTo, QScreen* screen, FancyDockingDropZoneState* dropZoneState) // NOTE: this will not work with multiple monitors if this widget has a parent. The floating drop zone @@ -154,7 +134,7 @@ namespace AzQtComponents // Draw all of the normal drop zones if they exist (if a dock widget is hovered over) painter.setPen(Qt::NoPen); - painter.setOpacity(g_Constants.dropZoneOpacity); + painter.setOpacity(FancyDockingDropZoneConstants::dropZoneOpacity); auto dropZones = m_dropZoneState->dropZones(); for (auto it = dropZones.cbegin(); it != dropZones.cend(); ++it) { @@ -189,7 +169,7 @@ namespace AzQtComponents // Otherwise, set the normal color else { - painter.setBrush(g_Constants.dropZoneColor); + painter.setBrush(FancyDockingDropZoneConstants::dropZoneColor); } // negate the window position to offset everything by that much @@ -214,8 +194,8 @@ namespace AzQtComponents // Scale the tabs icon based on the drop zone size and our specified offset // Doing this through QIcon to make sure that SVG is rendered already in desired resolution const QSize& dropZoneSize = dropZoneRect.size(); - const QSize requestedIconSize = dropZoneSize * g_Constants.centerTabIconScale; - const QIcon dropZoneIcon = QIcon(g_Constants.centerDropZoneIconPath); + const QSize requestedIconSize = dropZoneSize * FancyDockingDropZoneConstants::centerTabIconScale; + const QIcon dropZoneIcon = QIcon(FancyDockingDropZoneConstants::centerDropZoneIconPath); const QPixmap dropZonePixmap = dropZoneIcon.pixmap(requestedIconSize); const QSize receivedIconSize = dropZoneIcon.actualSize(requestedIconSize); @@ -264,7 +244,7 @@ namespace AzQtComponents } else { - painter.setBrush(g_Constants.dropZoneColor); + painter.setBrush(FancyDockingDropZoneConstants::dropZoneColor); } painter.drawRect(absoluteDropZoneRect); @@ -313,8 +293,8 @@ namespace AzQtComponents const QPoint innerBottomRight = innerDropZoneRect.bottomRight(); // Draw the lines using the appropriate pen - QPen dropZoneBorderPen(g_Constants.dropZoneBorderColor); - dropZoneBorderPen.setWidth(g_Constants.dropZoneBorderInPixels); + QPen dropZoneBorderPen(FancyDockingDropZoneConstants::dropZoneBorderColor); + dropZoneBorderPen.setWidth(FancyDockingDropZoneConstants::dropZoneBorderInPixels); painter.setPen(dropZoneBorderPen); painter.setOpacity(1); painter.drawLine(topLeft, innerTopLeft); diff --git a/Code/Framework/AzQtComponents/AzQtComponents/Components/FancyDockingDropZoneWidget.h b/Code/Framework/AzQtComponents/AzQtComponents/Components/FancyDockingDropZoneWidget.h index 94a6792833..865adcea59 100644 --- a/Code/Framework/AzQtComponents/AzQtComponents/Components/FancyDockingDropZoneWidget.h +++ b/Code/Framework/AzQtComponents/AzQtComponents/Components/FancyDockingDropZoneWidget.h @@ -28,63 +28,58 @@ class QPainter; namespace AzQtComponents { - struct AZ_QT_COMPONENTS_API FancyDockingDropZoneConstants + namespace FancyDockingDropZoneConstants { // Constant for the opacity of the screen grab for the dock widget being dragged - qreal draggingDockWidgetOpacity; + static constexpr qreal draggingDockWidgetOpacity = 0.6; // Constant for the opacity of the normal drop zones - qreal dropZoneOpacity; + static constexpr qreal dropZoneOpacity = 0.4; // Constant for the default drop zone size (in pixels) - int dropZoneSizeInPixels; + static constexpr int dropZoneSizeInPixels = 40; // Constant for the dock width/height size (in pixels) before we need to start // scaling down the drop zone sizes, or else they will overlap with the center // tab icon or each other - int minDockSizeBeforeDropZoneScalingInPixels; + static constexpr int minDockSizeBeforeDropZoneScalingInPixels = dropZoneSizeInPixels * 3; // Constant for the factor by which we must scale down the drop zone sizes once // the dock width/height size is too small - qreal dropZoneScaleFactor; + static constexpr qreal dropZoneScaleFactor = 0.25; // Constant for the percentage to scale down the inner drop zone rectangle for the center tab drop zone - qreal centerTabDropZoneScale; + static constexpr qreal centerTabDropZoneScale = 0.5; // Constant for the percentage to scale down the center tab drop zone for the center tab icon - qreal centerTabIconScale; + static constexpr qreal centerTabIconScale = 0.5; // Constant for the drop zone hotspot default color - QColor dropZoneColor; + static const QColor dropZoneColor = QColor(155, 155, 155); // Constant for the drop zone border color - QColor dropZoneBorderColor; + static const QColor dropZoneBorderColor = Qt::black; // Constant for the border width in pixels separating the drop zones - int dropZoneBorderInPixels; + static constexpr int dropZoneBorderInPixels = 1; // Constant for the border width in pixels separating the drop zones - int absoluteDropZoneSizeInPixels; + static constexpr int absoluteDropZoneSizeInPixels = 25; // Constant for the delay (in milliseconds) before a drop zone becomes active // once it is hovered over - int dockingTargetDelayMS; + static constexpr int dockingTargetDelayMS = 110; // Constant for the rate at which we will update (fade in) the drop zone opacity // when hovered over (in milliseconds) - int dropZoneHoverFadeUpdateIntervalMS; + static constexpr int dropZoneHoverFadeUpdateIntervalMS = 20; // Constant for the incremental opacity increase for the hovered drop zone // that will fade in to the full drop zone opacity in the desired time - qreal dropZoneHoverFadeIncrement; + static constexpr qreal dropZoneHoverFadeIncrement = dropZoneOpacity / (dockingTargetDelayMS / dropZoneHoverFadeUpdateIntervalMS); // Constant for the path to the center drop zone tabs icon - QString centerDropZoneIconPath; - - FancyDockingDropZoneConstants(); - - FancyDockingDropZoneConstants(const FancyDockingDropZoneConstants&) = delete; - FancyDockingDropZoneConstants& operator=(const FancyDockingDropZoneConstants&) = delete; + static const QString centerDropZoneIconPath = QStringLiteral(":/stylesheet/img/UI20/docking/tabs_icon.svg"); }; class FancyDockingDropZoneState diff --git a/Code/Framework/AzQtComponents/AzQtComponents/Components/Widgets/BrowseEdit.cpp b/Code/Framework/AzQtComponents/AzQtComponents/Components/Widgets/BrowseEdit.cpp index 03d2c13f64..7e18843d65 100644 --- a/Code/Framework/AzQtComponents/AzQtComponents/Components/Widgets/BrowseEdit.cpp +++ b/Code/Framework/AzQtComponents/AzQtComponents/Components/Widgets/BrowseEdit.cpp @@ -27,7 +27,7 @@ AZ_POP_DISABLE_WARNING namespace AzQtComponents { - static const char clearButtonActionNameC[] = "_q_qlineeditclearaction"; + static const QString ClearButtonActionNameC = QStringLiteral("_q_qlineeditclearaction"); struct BrowseEdit::InternalData { @@ -263,7 +263,7 @@ namespace AzQtComponents auto lineEdit = browseEdit->m_data->m_lineEdit; LineEdit::polish(style, lineEdit, lineEditConfig); - QAction* action = lineEdit->findChild(clearButtonActionNameC); + QAction* action = lineEdit->findChild(ClearButtonActionNameC); if (action) { QStyleOptionFrame option; @@ -284,7 +284,7 @@ namespace AzQtComponents auto lineEdit = browseEdit->m_data->m_lineEdit; LineEdit::unpolish(style, lineEdit, lineEditConfig); - QAction* action = lineEdit->findChild(clearButtonActionNameC); + QAction* action = lineEdit->findChild(ClearButtonActionNameC); if (action) { QStyleOptionFrame option; diff --git a/Code/Framework/AzQtComponents/AzQtComponents/Components/Widgets/ColorPicker/ColorController.cpp b/Code/Framework/AzQtComponents/AzQtComponents/Components/Widgets/ColorPicker/ColorController.cpp index 176443c0cd..4e8e86bc5a 100644 --- a/Code/Framework/AzQtComponents/AzQtComponents/Components/Widgets/ColorPicker/ColorController.cpp +++ b/Code/Framework/AzQtComponents/AzQtComponents/Components/Widgets/ColorPicker/ColorController.cpp @@ -323,7 +323,7 @@ namespace AzQtComponents saturation *= 2.0 - lightness; } double value = (lightness + saturation) / 2.0; - saturation = (2.0 * saturation) / (lightness + saturation); + saturation = qFuzzyIsNull(lightness + saturation) ? 0 : (2.0 * saturation) / (lightness + saturation); m_hsv.saturation = AZ::GetClamp(saturation, 0.0, 1.0); m_hsv.value = AZ::GetClamp(value, 0.0, 12.5); @@ -341,11 +341,12 @@ namespace AzQtComponents double saturation = m_hsv.saturation * m_hsv.value; if (lightness <= 1.0) { - saturation /= lightness; + saturation = (qFuzzyIsNull(lightness)) ? 0.0 : saturation / lightness; } else { - saturation /= 2.0 - lightness; + double two_minus_lightness = 2.0 - lightness; + saturation = (qFuzzyIsNull(two_minus_lightness)) ? 0.0 : saturation / two_minus_lightness; } lightness /= 2.0; diff --git a/Code/Framework/AzQtComponents/AzQtComponents/Components/Widgets/ElidingLabel.cpp b/Code/Framework/AzQtComponents/AzQtComponents/Components/Widgets/ElidingLabel.cpp index 8ef69c4b56..8daa183b80 100644 --- a/Code/Framework/AzQtComponents/AzQtComponents/Components/Widgets/ElidingLabel.cpp +++ b/Code/Framework/AzQtComponents/AzQtComponents/Components/Widgets/ElidingLabel.cpp @@ -12,6 +12,8 @@ #include #include #include +#include +#include namespace AzQtComponents { @@ -35,6 +37,7 @@ namespace AzQtComponents m_text = text; m_metricsLabel->setText(m_text); + m_elidedText.clear(); elide(); updateGeometry(); @@ -65,7 +68,62 @@ namespace AzQtComponents void ElidingLabel::elide() { ensurePolished(); - m_elidedText = fontMetrics().elidedText(m_text, m_elideMode, TextRect().width()); + + if (Qt::mightBeRichText(m_text)) + { + // If RichText tags are elided using fontMetrics.elidedText(), they will break. + // A TextDocument is used to produce elided text that takes this into account. + const QString ellipsis("..."); + const int maxLineWidth = TextRect().width(); + + QTextDocument doc; + doc.setHtml(m_text); + doc.setDefaultFont(font()); + doc.setDocumentMargin(0.0); + + // Turn off wrapping so the document uses a single line. + QTextOption option = doc.defaultTextOption(); + option.setWrapMode(QTextOption::WrapMode::NoWrap); + doc.setDefaultTextOption(option); + doc.adjustSize(); + + if (doc.size().width() <= maxLineWidth) + { + m_elidedText = m_text; + } + else + { + QTextCursor textCursor(&doc); + textCursor.movePosition(QTextCursor::End); + + int ellipsisWidth = 0; + + // At the moment only ElideRight and ElideNone are ever used. This will need expanding if other elision modes are used. + if (m_elideMode == Qt::ElideRight) + { + ellipsisWidth = fontMetrics().horizontalAdvance(ellipsis); + } + + // Move the cursor back until the text fits or the start of the text is reached. + while (doc.size().width() + ellipsisWidth > maxLineWidth && !textCursor.atStart()) + { + textCursor.deletePreviousChar(); + doc.adjustSize(); + } + + if (m_elideMode == Qt::ElideRight) + { + textCursor.insertText(ellipsis); + } + + m_elidedText = doc.toHtml(); + } + } + else + { + m_elidedText = fontMetrics().elidedText(m_text, m_elideMode, TextRect().width()); + } + QLabel::setText(m_elidedText); if (m_elidedText != m_text) diff --git a/Code/Framework/AzQtComponents/AzQtComponents/Components/Widgets/Internal/OverlayWidgetLayer.cpp b/Code/Framework/AzQtComponents/AzQtComponents/Components/Widgets/Internal/OverlayWidgetLayer.cpp index f6417d3470..21f2500822 100644 --- a/Code/Framework/AzQtComponents/AzQtComponents/Components/Widgets/Internal/OverlayWidgetLayer.cpp +++ b/Code/Framework/AzQtComponents/AzQtComponents/Components/Widgets/Internal/OverlayWidgetLayer.cpp @@ -32,7 +32,7 @@ namespace AzQtComponents namespace Internal { - const char* OverlayWidgetLayer::s_layerStyle = "background-color:rgba(0, 0, 0, 179)"; + static const QString LayerStyle = QStringLiteral("background-color:rgba(0, 0, 0, 179)"); OverlayWidgetLayer::OverlayWidgetLayer(OverlayWidget* parent, QWidget* centerWidget, QWidget* breakoutWidget, const char* title, const OverlayWidgetButtonList& buttons) @@ -66,7 +66,7 @@ namespace AzQtComponents if (breakoutWidget) { - setStyleSheet(s_layerStyle); + setStyleSheet(LayerStyle); setLayout(new QHBoxLayout()); // close the overlay if either dependent widget is destroyed @@ -100,7 +100,7 @@ namespace AzQtComponents } else { - setStyleSheet(s_layerStyle); + setStyleSheet(LayerStyle); } AddButtons(*m_ui.data(), buttons, parent == nullptr); } diff --git a/Code/Framework/AzQtComponents/AzQtComponents/Components/Widgets/Internal/OverlayWidgetLayer.h b/Code/Framework/AzQtComponents/AzQtComponents/Components/Widgets/Internal/OverlayWidgetLayer.h index 1ad3cb5071..cba61cb67d 100644 --- a/Code/Framework/AzQtComponents/AzQtComponents/Components/Widgets/Internal/OverlayWidgetLayer.h +++ b/Code/Framework/AzQtComponents/AzQtComponents/Components/Widgets/Internal/OverlayWidgetLayer.h @@ -59,8 +59,6 @@ namespace AzQtComponents bool eventFilter(QObject* object, QEvent* event) override; - static const char* s_layerStyle; - QVector - background-color:rgb(51, 51, 51) + QWidget#m_darkBox { background-color:rgb(51, 51, 51) } @@ -444,6 +444,9 @@ Qt::Horizontal + + background-color:rgb(51, 51, 51) + diff --git a/Code/Framework/AzToolsFramework/AzToolsFramework/UI/PropertyEditor/Model/AssetCompleterModel.cpp b/Code/Framework/AzToolsFramework/AzToolsFramework/UI/PropertyEditor/Model/AssetCompleterModel.cpp index 3e5b41ebeb..40f3b7063e 100644 --- a/Code/Framework/AzToolsFramework/AzToolsFramework/UI/PropertyEditor/Model/AssetCompleterModel.cpp +++ b/Code/Framework/AzToolsFramework/AzToolsFramework/UI/PropertyEditor/Model/AssetCompleterModel.cpp @@ -39,7 +39,12 @@ namespace AzToolsFramework typeFilter->SetAssetType(filterType); typeFilter->SetFilterPropagation(AssetBrowserEntryFilter::PropagateDirection::Down); - m_assetBrowserFilterModel->SetFilter(FilterConstType(typeFilter)); + SetFilter(FilterConstType(typeFilter)); + } + + void AssetCompleterModel::SetFilter(FilterConstType filter) + { + m_assetBrowserFilterModel->SetFilter(filter); RefreshAssetList(); } @@ -120,9 +125,6 @@ namespace AzToolsFramework int rows = m_assetBrowserFilterModel->rowCount(index); if (rows == 0) { - if (index != QModelIndex()) { - AZ_Error("AssetCompleterModel", false, "No children detected in FetchResources()"); - } return; } @@ -131,7 +133,7 @@ namespace AzToolsFramework QModelIndex childIndex = m_assetBrowserFilterModel->index(i, 0, index); AssetBrowserEntry* childEntry = GetAssetEntry(m_assetBrowserFilterModel->mapToSource(childIndex)); - if (childEntry->GetEntryType() == AssetBrowserEntry::AssetEntryType::Product) + if (childEntry->GetEntryType() == m_entryType) { ProductAssetBrowserEntry* productEntry = static_cast(childEntry); AZStd::string assetName; @@ -167,7 +169,6 @@ namespace AzToolsFramework return m_assets[index.row()].m_displayName; } - const AZ::Data::AssetId AssetCompleterModel::GetAssetIdFromIndex(const QModelIndex& index) { if (!index.isValid()) @@ -177,4 +178,19 @@ namespace AzToolsFramework return m_assets[index.row()].m_assetId; } + + const AZStd::string_view AssetCompleterModel::GetPathFromIndex(const QModelIndex& index) + { + if (!index.isValid()) + { + return ""; + } + + return m_assets[index.row()].m_path; + } + + void AssetCompleterModel::SetFetchEntryType(AssetBrowserEntry::AssetEntryType entryType) + { + m_entryType = entryType; + } } diff --git a/Code/Framework/AzToolsFramework/AzToolsFramework/UI/PropertyEditor/Model/AssetCompleterModel.h b/Code/Framework/AzToolsFramework/AzToolsFramework/UI/PropertyEditor/Model/AssetCompleterModel.h index 55a6db8589..4596d70657 100644 --- a/Code/Framework/AzToolsFramework/AzToolsFramework/UI/PropertyEditor/Model/AssetCompleterModel.h +++ b/Code/Framework/AzToolsFramework/AzToolsFramework/UI/PropertyEditor/Model/AssetCompleterModel.h @@ -32,6 +32,7 @@ namespace AzToolsFramework QVariant data(const QModelIndex &index, int role = Qt::DisplayRole) const override; void SetFilter(AZ::Data::AssetType filterType); + void SetFilter(FilterConstType filter); void RefreshAssetList(); void SearchStringHighlight(QString searchString); @@ -39,6 +40,9 @@ namespace AzToolsFramework const AZStd::string_view GetNameFromIndex(const QModelIndex& index); const AZ::Data::AssetId GetAssetIdFromIndex(const QModelIndex& index); + const AZStd::string_view GetPathFromIndex(const QModelIndex& index); + + void SetFetchEntryType(AssetBrowserEntry::AssetEntryType entryType); private: struct AssetItem @@ -57,6 +61,8 @@ namespace AzToolsFramework AZStd::vector m_assets; //! String that will be highlighted in the suggestions QString m_highlightString; + + AssetBrowserEntry::AssetEntryType m_entryType = AssetBrowserEntry::AssetEntryType::Product; }; } diff --git a/Code/Framework/AzToolsFramework/AzToolsFramework/UI/PropertyEditor/PropertyAssetCtrl.cpp b/Code/Framework/AzToolsFramework/AzToolsFramework/UI/PropertyEditor/PropertyAssetCtrl.cpp index 24b2c7466e..bd0cb3844a 100644 --- a/Code/Framework/AzToolsFramework/AzToolsFramework/UI/PropertyEditor/PropertyAssetCtrl.cpp +++ b/Code/Framework/AzToolsFramework/AzToolsFramework/UI/PropertyEditor/PropertyAssetCtrl.cpp @@ -527,8 +527,8 @@ namespace AzToolsFramework m_errorButton = nullptr; } } - - void PropertyAssetCtrl::UpdateErrorButton(const AZStd::string& errorLog) + + void PropertyAssetCtrl::UpdateErrorButton() { if (m_errorButton) { @@ -543,12 +543,17 @@ namespace AzToolsFramework m_errorButton->setSizePolicy(QSizePolicy::Fixed, QSizePolicy::Fixed); m_errorButton->setFixedSize(QSize(16, 16)); m_errorButton->setMouseTracking(true); - m_errorButton->setIcon(QIcon("Icons/PropertyEditor/error_icon.png")); + m_errorButton->setIcon(QIcon(":/PropertyEditor/Resources/error_icon.png")); m_errorButton->setToolTip("Show Errors"); // Insert the error button after the asset label qobject_cast(layout())->insertWidget(1, m_errorButton); } + } + + void PropertyAssetCtrl::UpdateErrorButtonWithLog(const AZStd::string& errorLog) + { + UpdateErrorButton(); // Connect pressed to opening the error dialog // Must capture this for call to QObject::connect @@ -587,6 +592,21 @@ namespace AzToolsFramework logDialog->show(); }); } + + void PropertyAssetCtrl::UpdateErrorButtonWithMessage(const AZStd::string& message) + { + UpdateErrorButton(); + + connect(m_errorButton, &QPushButton::clicked, this, [this, message]() { + QMessageBox::critical(nullptr, "Error", message.c_str()); + + // Without this, the error button would maintain focus after clicking, which left the red error icon in a blue-highlighted state + if (parentWidget()) + { + parentWidget()->setFocus(); + } + }); + } void PropertyAssetCtrl::ClearAssetInternal() { @@ -960,7 +980,6 @@ namespace AzToolsFramework else { const AZ::Data::AssetId assetID = GetCurrentAssetID(); - m_currentAssetHint = ""; AZ::Outcome jobOutcome = AZ::Failure(); AssetSystemJobRequestBus::BroadcastResult(jobOutcome, &AssetSystemJobRequestBus::Events::GetAssetJobsInfoByAssetID, assetID, false, false); @@ -1018,7 +1037,7 @@ namespace AzToolsFramework // In case of failure, render failure icon case AssetSystem::JobStatus::Failed: { - UpdateErrorButton(errorLog); + UpdateErrorButtonWithLog(errorLog); } break; @@ -1043,6 +1062,10 @@ namespace AzToolsFramework m_currentAssetHint = assetPath; } } + else + { + UpdateErrorButtonWithMessage(AZStd::string::format("Asset is missing.\n\nID: %s\nHint:%s", assetID.ToString().c_str(), GetCurrentAssetHint().c_str())); + } } // Get the asset file name @@ -1072,10 +1095,10 @@ namespace AzToolsFramework RefreshAutocompleter(); } - // When focus is lost, clear the field if necessary + // When focus is lost, revert to the selected asset if (!focus && m_incompleteFilename) { - HandleFieldClear(); + SetSelectedAssetID(GetCurrentAssetID()); } } @@ -1265,7 +1288,7 @@ namespace AzToolsFramework return newCtrl; } - void AssetPropertyHandlerDefault::ConsumeAttribute(PropertyAssetCtrl* GUI, AZ::u32 attrib, PropertyAttributeReader* attrValue, const char* debugName) + void AssetPropertyHandlerDefault::ConsumeAttributeInternal(PropertyAssetCtrl* GUI, AZ::u32 attrib, PropertyAttributeReader* attrValue, const char* debugName) { (void)debugName; @@ -1464,6 +1487,11 @@ namespace AzToolsFramework } } + void AssetPropertyHandlerDefault::ConsumeAttribute(PropertyAssetCtrl* GUI, AZ::u32 attrib, PropertyAttributeReader* attrValue, const char* debugName) + { + ConsumeAttributeInternal(GUI, attrib, attrValue, debugName); + } + void AssetPropertyHandlerDefault::WriteGUIValuesIntoProperty(size_t index, PropertyAssetCtrl* GUI, property_t& instance, InstanceDataNode* node) { (void)index; @@ -1606,8 +1634,8 @@ namespace AzToolsFramework void RegisterAssetPropertyHandler() { - EBUS_EVENT(PropertyTypeRegistrationMessages::Bus, RegisterPropertyType, aznew AssetPropertyHandlerDefault()); - EBUS_EVENT(PropertyTypeRegistrationMessages::Bus, RegisterPropertyType, aznew SimpleAssetPropertyHandlerDefault()); + PropertyTypeRegistrationMessages::Bus::Broadcast(&PropertyTypeRegistrationMessages::RegisterPropertyType, aznew AssetPropertyHandlerDefault()); + PropertyTypeRegistrationMessages::Bus::Broadcast(&PropertyTypeRegistrationMessages::RegisterPropertyType, aznew SimpleAssetPropertyHandlerDefault()); } } diff --git a/Code/Framework/AzToolsFramework/AzToolsFramework/UI/PropertyEditor/PropertyAssetCtrl.hxx b/Code/Framework/AzToolsFramework/AzToolsFramework/UI/PropertyEditor/PropertyAssetCtrl.hxx index 0b98278bc5..d6ff1b8de6 100644 --- a/Code/Framework/AzToolsFramework/AzToolsFramework/UI/PropertyEditor/PropertyAssetCtrl.hxx +++ b/Code/Framework/AzToolsFramework/AzToolsFramework/UI/PropertyEditor/PropertyAssetCtrl.hxx @@ -168,15 +168,18 @@ namespace AzToolsFramework bool IsCorrectMimeData(const QMimeData* pData, AZ::Data::AssetId* pAssetId = nullptr, AZ::Data::AssetType* pAssetType = nullptr) const; void ClearErrorButton(); - void UpdateErrorButton(const AZStd::string& errorLog); + void UpdateErrorButton(); + void UpdateErrorButtonWithLog(const AZStd::string& errorLog); + void UpdateErrorButtonWithMessage(const AZStd::string& message); virtual const AZStd::string GetFolderSelection() const { return AZStd::string(); } virtual void SetFolderSelection(const AZStd::string& /* folderPath */) {} virtual void ClearAssetInternal(); - void ConfigureAutocompleter(); + virtual void ConfigureAutocompleter(); void RefreshAutocompleter(); void EnableAutocompleter(); void DisableAutocompleter(); + const QModelIndex GetSourceIndex(const QModelIndex& index); void HandleFieldClear(); AZStd::string AddDefaultSuffix(const AZStd::string& filename); @@ -233,20 +236,19 @@ namespace AzToolsFramework void SetSelectedAssetID(const AZ::Data::AssetId& newID, const AZ::Data::AssetType& newType); void SetCurrentAssetHint(const AZStd::string& hint); void SetDefaultAssetID(const AZ::Data::AssetId& defaultID); - void PopupAssetPicker(); + virtual void PopupAssetPicker(); void OnClearButtonClicked(); void UpdateAssetDisplay(); void OnLineEditFocus(bool focus); virtual void OnEditButtonClicked(); void OnThumbnailClicked(); void OnCompletionModelReset(); - void OnAutocomplete(const QModelIndex& index); + virtual void OnAutocomplete(const QModelIndex& index); void OnTextChange(const QString& text); void OnReturnPressed(); void ShowContextMenu(const QPoint& pos); private: - const QModelIndex GetSourceIndex(const QModelIndex& index); void UpdateThumbnail(); }; @@ -268,7 +270,8 @@ namespace AzToolsFramework virtual void UpdateWidgetInternalTabbing(PropertyAssetCtrl* widget) override { widget->UpdateTabOrder(); } virtual QWidget* CreateGUI(QWidget* pParent) override; - virtual void ConsumeAttribute(PropertyAssetCtrl* GUI, AZ::u32 attrib, PropertyAttributeReader* attrValue, const char* debugName) override; + static void ConsumeAttributeInternal(PropertyAssetCtrl* GUI, AZ::u32 attrib, PropertyAttributeReader* attrValue, const char* debugName); + void ConsumeAttribute(PropertyAssetCtrl* GUI, AZ::u32 attrib, PropertyAttributeReader* attrValue, const char* debugName) override; virtual void WriteGUIValuesIntoProperty(size_t index, PropertyAssetCtrl* GUI, property_t& instance, InstanceDataNode* node) override; virtual bool ReadValuesIntoGUI(size_t index, PropertyAssetCtrl* GUI, const property_t& instance, InstanceDataNode* node) override; }; diff --git a/Code/Framework/AzToolsFramework/AzToolsFramework/UI/PropertyEditor/PropertyIntCtrlCommon.h b/Code/Framework/AzToolsFramework/AzToolsFramework/UI/PropertyEditor/PropertyIntCtrlCommon.h index 01675e0044..bb7d03367b 100644 --- a/Code/Framework/AzToolsFramework/AzToolsFramework/UI/PropertyEditor/PropertyIntCtrlCommon.h +++ b/Code/Framework/AzToolsFramework/AzToolsFramework/UI/PropertyEditor/PropertyIntCtrlCommon.h @@ -169,6 +169,10 @@ namespace AzToolsFramework { AzToolsFramework::PropertyEditorGUIMessages::Bus::Broadcast(&PropertyEditorGUIMessages::Bus::Events::RequestWrite, newCtrl); }); + this->connect(newCtrl, &PropertyControl::editingFinished, this, [newCtrl]() + { + AzToolsFramework::PropertyEditorGUIMessages::Bus::Broadcast(&PropertyEditorGUIMessages::Bus::Handler::OnEditingFinished, newCtrl); + }); // note: Qt automatically disconnects objects from each other when either end is destroyed, no need to worry about delete. // Set the value range to that of ValueType as clamped to the range of QtWidgetValueType diff --git a/Code/Framework/AzToolsFramework/AzToolsFramework/UI/PropertyEditor/PropertyRowWidget.cpp b/Code/Framework/AzToolsFramework/AzToolsFramework/UI/PropertyEditor/PropertyRowWidget.cpp index bb2d2851ca..e895456151 100644 --- a/Code/Framework/AzToolsFramework/AzToolsFramework/UI/PropertyEditor/PropertyRowWidget.cpp +++ b/Code/Framework/AzToolsFramework/AzToolsFramework/UI/PropertyEditor/PropertyRowWidget.cpp @@ -421,6 +421,7 @@ namespace AzToolsFramework { QString label{ text }; m_nameLabel->setText(label); + m_nameLabel->setOpenExternalLinks(true); m_nameLabel->setVisible(!label.isEmpty()); // setting the stretches to 0 in case of an empty label really hides the label (i.e. even the reserved space) m_mainLayout->setStretch(0, label.isEmpty() ? 0 : LabelColumnStretch); diff --git a/Code/Framework/AzToolsFramework/AzToolsFramework/UI/PropertyEditor/PropertyVectorCtrl.hxx b/Code/Framework/AzToolsFramework/AzToolsFramework/UI/PropertyEditor/PropertyVectorCtrl.hxx index e5a6b5803c..cc61593154 100644 --- a/Code/Framework/AzToolsFramework/AzToolsFramework/UI/PropertyEditor/PropertyVectorCtrl.hxx +++ b/Code/Framework/AzToolsFramework/AzToolsFramework/UI/PropertyEditor/PropertyVectorCtrl.hxx @@ -150,10 +150,7 @@ namespace AzToolsFramework TypeBeingHandled actualValue = instance; for (int idx = 0; idx < m_common.GetElementCount(); ++idx) { - if (elements[idx]->wasValueEditedByUser()) - { - actualValue.SetElement(idx, static_cast(elements[idx]->getValue())); - } + actualValue.SetElement(idx, static_cast(elements[idx]->getValue())); } instance = actualValue; } diff --git a/Code/Framework/AzToolsFramework/AzToolsFramework/UI/Slice/SlicePushWidget.cpp b/Code/Framework/AzToolsFramework/AzToolsFramework/UI/Slice/SlicePushWidget.cpp index 76f91b438e..ce6ee7ead7 100644 --- a/Code/Framework/AzToolsFramework/AzToolsFramework/UI/Slice/SlicePushWidget.cpp +++ b/Code/Framework/AzToolsFramework/AzToolsFramework/UI/Slice/SlicePushWidget.cpp @@ -1201,8 +1201,6 @@ namespace AzToolsFramework .arg((item->parent() == nullptr) ? item->m_entity->GetName().c_str() : GetNodeDisplayName(*item->m_node).c_str())); } - SliceTargetTreeItem* parent = nullptr; - AZStd::vector validSliceAssets = GetValidTargetAssetsForField(*item); // For the selected item populate the tree of all valid slice targets. @@ -1274,7 +1272,6 @@ namespace AzToolsFramework selectButton->setChecked(true); } - parent = sliceItem; ++level; } } diff --git a/Code/Framework/AzToolsFramework/AzToolsFramework/UnitTest/AzToolsFrameworkTestHelpers.cpp b/Code/Framework/AzToolsFramework/AzToolsFramework/UnitTest/AzToolsFrameworkTestHelpers.cpp index a0d02f47e7..7f877facb6 100644 --- a/Code/Framework/AzToolsFramework/AzToolsFramework/UnitTest/AzToolsFrameworkTestHelpers.cpp +++ b/Code/Framework/AzToolsFramework/AzToolsFramework/UnitTest/AzToolsFrameworkTestHelpers.cpp @@ -30,8 +30,7 @@ namespace UnitTest void MousePressAndMove( QWidget* widget, const QPoint& initialPositionWidget, const QPoint& mouseDelta, const Qt::MouseButton mouseButton) { - QPoint position = widget->mapToGlobal(initialPositionWidget); - QTest::mousePress(widget, mouseButton, Qt::NoModifier, position); + QTest::mousePress(widget, mouseButton, Qt::NoModifier, initialPositionWidget); MouseMove(widget, initialPositionWidget, mouseDelta, mouseButton); } @@ -45,17 +44,52 @@ namespace UnitTest // - https://lists.qt-project.org/pipermail/development/2019-July/036873.html void MouseMove(QWidget* widget, const QPoint& initialPositionWidget, const QPoint& mouseDelta, const Qt::MouseButton mouseButton) { - QPoint nextPosition = widget->mapToGlobal(initialPositionWidget + mouseDelta); + const QPoint nextLocalPosition = initialPositionWidget + mouseDelta; + const QPoint nextGlobalPosition = widget->mapToGlobal(nextLocalPosition); // ^1 To ensure a mouse move event is fired we must call the test mouse move function // and also send a mouse move event that matches. Each on their own do not appear to // work - please see the links above for more context. - QTest::mouseMove(widget, nextPosition); + QTest::mouseMove(widget, nextLocalPosition); QMouseEvent mouseMoveEvent( - QEvent::MouseMove, QPointF(nextPosition), QPointF(nextPosition), Qt::NoButton, mouseButton, Qt::NoModifier); + QEvent::MouseMove, QPointF(nextLocalPosition), QPointF(nextGlobalPosition), Qt::NoButton, mouseButton, Qt::NoModifier); QApplication::sendEvent(widget, &mouseMoveEvent); } + void MouseScroll(QWidget* widget, QPoint localEventPosition, QPoint wheelDelta, + Qt::MouseButtons mouseButtons, Qt::KeyboardModifiers keyboardModifiers) + { + const QPoint globalEventPos = widget->mapToGlobal(localEventPosition); + const QPoint zero = QPoint(); + + QWheelEvent wheelEventBegin(globalEventPos, zero, zero, wheelDelta, mouseButtons, keyboardModifiers, Qt::ScrollBegin, false); + QApplication::sendEvent(widget, &wheelEventBegin); + + QWheelEvent wheelEventUpdate(globalEventPos, zero, zero, wheelDelta, mouseButtons, keyboardModifiers, Qt::ScrollUpdate, false); + QApplication::sendEvent(widget, &wheelEventUpdate); + + QWheelEvent wheelEventEnd(globalEventPos, zero, zero, zero, mouseButtons, keyboardModifiers, Qt::ScrollEnd, false); + QApplication::sendEvent(widget, &wheelEventEnd); + } + + AZStd::string QtKeyToAzString(Qt::Key key, Qt::KeyboardModifiers modifiers) + { + QKeySequence keySequence = QKeySequence(key); + QString keyText = keySequence.toString(); + + // QKeySequence seems to uppercase alpha keys regardless of shift-modifier + if (modifiers == Qt::NoModifier && keyText.isUpper()) + { + keyText = keyText.toLower(); + } + else if (modifiers != Qt::ShiftModifier) + { + keyText = QString(); + } + + return AZStd::string(keyText.toUtf8().data()); + } + bool TestWidget::eventFilter(QObject* watched, QEvent* event) { AZ_UNUSED(watched); @@ -123,6 +157,23 @@ namespace UnitTest return QWidget::event(event); } + MouseMoveDetector::MouseMoveDetector(QWidget* parent) + : QObject(parent) + { + } + + bool MouseMoveDetector::eventFilter(QObject* watched, QEvent* event) + { + if (const auto eventType = event->type(); eventType == QEvent::Type::MouseMove) + { + auto mouseEvent = static_cast(event); + m_mouseGlobalPosition = mouseEvent->globalPos(); + m_mouseLocalPosition = mouseEvent->pos(); + } + + return QObject::eventFilter(watched, event); + } + void TestEditorActions::Connect() { using AzToolsFramework::GetEntityContextId; @@ -537,3 +588,5 @@ namespace UnitTest sliceAssets.clear(); } } // namespace UnitTest + +#include diff --git a/Code/Framework/AzToolsFramework/AzToolsFramework/UnitTest/AzToolsFrameworkTestHelpers.h b/Code/Framework/AzToolsFramework/AzToolsFramework/UnitTest/AzToolsFrameworkTestHelpers.h index 4a7039423c..2c60ca914c 100644 --- a/Code/Framework/AzToolsFramework/AzToolsFramework/UnitTest/AzToolsFrameworkTestHelpers.h +++ b/Code/Framework/AzToolsFramework/AzToolsFramework/UnitTest/AzToolsFrameworkTestHelpers.h @@ -15,12 +15,14 @@ #include #include #include +#include #include #include #include #include #include #include +#include #include #include #include @@ -75,6 +77,20 @@ namespace UnitTest /// @param mouseButton The button to be held during the move. void MouseMove(QWidget* widget, const QPoint& initialPosition, const QPoint& mouseDelta, Qt::MouseButton mouseButton = Qt::NoButton); + /// Performs a full series (begin, update, end) of mouse wheel events on the provided widget. + /// @param widget The widget to perform the mouse wheel events on. + /// @param localEventPosition The position of the mouse relative to the widget (will be remapped to a global position internally). + /// @param wheelDelta How far to move the mouse (note: mouseDelta may be zero and the mouse will only be moved to initialPosition). + /// @param mouseButtons Optional mouse buttons to include during the wheel events, defaults to Qt::NoButton + /// @param keyboardModifiers Optional keyboard modifiers to include during the wheel events, defaults to Qt::NoModifier + void MouseScroll(QWidget* widget, QPoint localEventPosition, QPoint wheelDelta, + Qt::MouseButtons mouseButtons = Qt::NoButton, Qt::KeyboardModifiers keyboardModifiers = Qt::NoModifier); + + /// Convert a Qt::Key + optional modifiers to the printable text of the key sequence + /// @param key The widget to perform the mouse wheel event on. + /// @param modifiers Optional keyboard modifiers to include during the wheel events, defaults to Qt::NoModifier + AZStd::string QtKeyToAzString(Qt::Key key, Qt::KeyboardModifiers modifiers = Qt::NoModifier); + /// Test widget to store QActions generated by EditorTransformComponentSelection. class TestWidget : public QWidget { @@ -95,10 +111,29 @@ namespace UnitTest { Q_OBJECT public: - FocusInteractionWidget(QWidget* parent = nullptr) : QWidget(parent) {} + FocusInteractionWidget(QWidget* parent = nullptr) + : QWidget(parent) + { + } + bool event(QEvent* event) override; }; + /// Records mouse move events and stores the local and global position of the cursor. + /// @note To use, install as an event filter for the widget being interacted with + /// e.g. m_testWidget->installEventFilter(&m_mouseMoveDetector); + class MouseMoveDetector : public QObject + { + Q_OBJECT + public: + MouseMoveDetector(QWidget* parent = nullptr); + + bool eventFilter([[maybe_unused]] QObject* watched, QEvent* event) override; + + QPoint m_mouseGlobalPosition; + QPoint m_mouseLocalPosition; + }; + /// Stores actions registered for either normal mode (regular viewport) editing and /// component mode editing. class TestEditorActions @@ -158,7 +193,10 @@ namespace UnitTest { // Create & Start a new ToolsApplication if there's no existing one m_app = CreateTestApplication(); - m_app->Start(AzFramework::Application::Descriptor()); + AZ::ComponentApplication::StartupParameters startupParameters; + startupParameters.m_loadAssetCatalog = false; + + m_app->Start(AzFramework::Application::Descriptor(), startupParameters); } // without this, the user settings component would attempt to save on finalize/shutdown. Since the file is @@ -232,6 +270,13 @@ namespace UnitTest return toolsApp; } + //! It is possible to override this in classes deriving from ToolsApplicationFixture to provide alternate + //! implementations of the DebugDisplayRequests interface (e.g. TestDebugDisplayRequests). + virtual AZStd::shared_ptr CreateDebugDisplayRequests() + { + return AZStd::make_shared(); + } + protected: TestEditorActions m_editorActions; ToolsApplicationMessageHandler m_messageHandler; // used to suppress trace messages in test output diff --git a/Code/Framework/AzToolsFramework/AzToolsFramework/Viewport/ActionBus.h b/Code/Framework/AzToolsFramework/AzToolsFramework/Viewport/ActionBus.h index 4dde676511..c0562025b6 100644 --- a/Code/Framework/AzToolsFramework/AzToolsFramework/Viewport/ActionBus.h +++ b/Code/Framework/AzToolsFramework/AzToolsFramework/Viewport/ActionBus.h @@ -23,11 +23,11 @@ namespace AzToolsFramework /// @name Reverse URLs. /// Used to identify common actions and override them when necessary. //@{ - static const AZ::Crc32 s_backAction = AZ_CRC("com.o3de.action.common.back", 0xd772a2af); - static const AZ::Crc32 s_deleteAction = AZ_CRC("com.o3de.action.common.delete", 0x5731f6cb); - static const AZ::Crc32 s_duplicateAction = AZ_CRC("com.o3de.action.common.duplicate", 0x08ccf461); - static const AZ::Crc32 s_nextComponentMode = AZ_CRC("com.o3de.action.common.nextComponentMode", 0xcc26094f); - static const AZ::Crc32 s_previousComponentMode = AZ_CRC("com.o3de.action.common.previousComponentMode", 0x0d18ff39); + static const AZ::Crc32 s_backAction = AZ_CRC("com.o3de.action.common.back", 0x80c3030f); + static const AZ::Crc32 s_deleteAction = AZ_CRC("com.o3de.action.common.delete", 0x58e78eed); + static const AZ::Crc32 s_duplicateAction = AZ_CRC("com.o3de.action.common.duplicate", 0xbc5a4a23); + static const AZ::Crc32 s_nextComponentMode = AZ_CRC("com.o3de.action.common.nextComponentMode", 0xf9aca3a8); + static const AZ::Crc32 s_previousComponentMode = AZ_CRC("com.o3de.action.common.previousComponentMode", 0x0580eaec); //@} /// Specific Action properties to be sent to a type implementing diff --git a/Code/Framework/AzToolsFramework/AzToolsFramework/Viewport/ViewportMessages.cpp b/Code/Framework/AzToolsFramework/AzToolsFramework/Viewport/ViewportMessages.cpp index e3b45aca2b..24b3c95310 100644 --- a/Code/Framework/AzToolsFramework/AzToolsFramework/Viewport/ViewportMessages.cpp +++ b/Code/Framework/AzToolsFramework/AzToolsFramework/Viewport/ViewportMessages.cpp @@ -6,6 +6,7 @@ * */ +#include #include namespace AzToolsFramework @@ -62,4 +63,47 @@ namespace AzToolsFramework return circleBoundWidth; } + + AZ::Vector3 FindClosestPickIntersection(const AzFramework::RenderGeometry::RayRequest& rayRequest, const float defaultDistance) + { + AzFramework::RenderGeometry::RayResult renderGeometryIntersectionResult; + AzFramework::RenderGeometry::IntersectorBus::EventResult( + renderGeometryIntersectionResult, AzToolsFramework::GetEntityContextId(), + &AzFramework::RenderGeometry::IntersectorBus::Events::RayIntersect, rayRequest); + + // attempt a ray intersection with any visible mesh and return the intersection position if successful + if (renderGeometryIntersectionResult) + { + return renderGeometryIntersectionResult.m_worldPosition; + } + else + { + const AZ::Vector3 rayDirection = (rayRequest.m_endWorldPosition - rayRequest.m_startWorldPosition).GetNormalized(); + return rayRequest.m_startWorldPosition + rayDirection * defaultDistance; + } + } + + void RefreshRayRequest( + AzFramework::RenderGeometry::RayRequest& rayRequest, + const ViewportInteraction::ProjectedViewportRay& viewportRay, + const float rayLength) + { + AZ_Assert(rayLength > 0.0f, "Invalid ray length passed to RefreshRayRequest"); + rayRequest.m_startWorldPosition = viewportRay.m_origin; + rayRequest.m_endWorldPosition = viewportRay.m_origin + viewportRay.m_direction * rayLength; + } + + AZ::Vector3 FindClosestPickIntersection( + const AzFramework::ViewportId viewportId, + const AzFramework::ScreenPoint& screenPoint, + const float rayLength, + const float defaultDistance) + { + AzFramework::RenderGeometry::RayRequest ray; + ray.m_onlyVisible = true; // only consider visible objects + + RefreshRayRequest(ray, ViewportInteraction::ViewportScreenToWorldRay(viewportId, screenPoint), rayLength); + + return FindClosestPickIntersection(ray, defaultDistance); + } } // namespace AzToolsFramework diff --git a/Code/Framework/AzToolsFramework/AzToolsFramework/Viewport/ViewportMessages.h b/Code/Framework/AzToolsFramework/AzToolsFramework/Viewport/ViewportMessages.h index 8ec772f0da..4dbcc9d926 100644 --- a/Code/Framework/AzToolsFramework/AzToolsFramework/Viewport/ViewportMessages.h +++ b/Code/Framework/AzToolsFramework/AzToolsFramework/Viewport/ViewportMessages.h @@ -21,7 +21,12 @@ namespace AzFramework { struct ScreenPoint; -} + + namespace RenderGeometry + { + struct RayRequest; + } +} // namespace AzFramework namespace AzToolsFramework { @@ -145,13 +150,6 @@ namespace AzToolsFramework static const AZ::EBusHandlerPolicy HandlerPolicy = AZ::EBusHandlerPolicy::Single; }; - //! A ray projection, originating from a point and extending in a direction specified as a normal. - struct ProjectedViewportRay - { - AZ::Vector3 origin; - AZ::Vector3 direction; - }; - //! Requests that can be made to the viewport to query and modify its state. class ViewportInteractionRequests { @@ -162,12 +160,11 @@ namespace AzToolsFramework //! Multiply by DeviceScalingFactor to get the position in viewport pixel space. virtual AzFramework::ScreenPoint ViewportWorldToScreen(const AZ::Vector3& worldPosition) = 0; //! Transforms a point from Qt widget screen space to world space based on the given clip space depth. - //! Depth specifies a relative camera depth to project in the range of [0.f, 1.f]. //! Returns the world space position if successful. - virtual AZStd::optional ViewportScreenToWorld(const AzFramework::ScreenPoint& screenPosition, float depth) = 0; + virtual AZ::Vector3 ViewportScreenToWorld(const AzFramework::ScreenPoint& screenPosition) = 0; //! Casts a point in screen space to a ray in world space originating from the viewport camera frustum's near plane. //! Returns a ray containing the ray's origin and a direction normal, if successful. - virtual AZStd::optional ViewportScreenToWorldRay(const AzFramework::ScreenPoint& screenPosition) = 0; + virtual ProjectedViewportRay ViewportScreenToWorldRay(const AzFramework::ScreenPoint& screenPosition) = 0; //! Gets the DPI scaling factor that translates Qt widget space into viewport pixel space. virtual float DeviceScalingFactor() = 0; @@ -178,6 +175,17 @@ namespace AzToolsFramework //! Type to inherit to implement ViewportInteractionRequests. using ViewportInteractionRequestBus = AZ::EBus; + //! Utility function to return a viewport ray using the ViewportInteractionRequestBus. + inline ProjectedViewportRay ViewportScreenToWorldRay( + const AzFramework::ViewportId viewportId, const AzFramework::ScreenPoint& screenPoint) + { + ProjectedViewportRay viewportRay{}; + ViewportInteractionRequestBus::EventResult( + viewportRay, viewportId, &ViewportInteractionRequestBus::Events::ViewportScreenToWorldRay, screenPoint); + + return viewportRay; + } + //! Interface to return only viewport specific settings (e.g. snapping). class ViewportSettingsRequests { @@ -200,6 +208,10 @@ namespace AzToolsFramework virtual bool StickySelectEnabled() const = 0; //! Returns the default viewport camera position. virtual AZ::Vector3 DefaultEditorCameraPosition() const = 0; + //! Returns if icons are visible in the viewport. + virtual bool IconsVisible() const = 0; + //! Returns if viewport helpers (additional debug drawing) are visible in the viewport. + virtual bool HelpersVisible() const = 0; protected: ~ViewportSettingsRequests() = default; @@ -229,13 +241,6 @@ namespace AzToolsFramework class MainEditorViewportInteractionRequests { public: - //! Given a point in screen space, return the picked entity (if any). - //! Picked EntityId will be returned, InvalidEntityId will be returned on failure. - virtual AZ::EntityId PickEntity(const AzFramework::ScreenPoint& point) = 0; - //! Given a point in screen space, return the terrain position in world space. - virtual AZ::Vector3 PickTerrain(const AzFramework::ScreenPoint& point) = 0; - //! Return the terrain height given a world position in 2d (xy plane). - virtual float TerrainHeight(const AZ::Vector2& position) = 0; //! Is the user holding a modifier key to move the manipulator space from local to world. virtual bool ShowingWorldSpace() = 0; //! Return the widget to use as the parent for the viewport context menu. @@ -266,7 +271,6 @@ namespace AzToolsFramework { public: static const AZ::EBusAddressPolicy AddressPolicy = AZ::EBusAddressPolicy::Single; - static const AZ::EBusHandlerPolicy HandlerPolicy = AZ::EBusHandlerPolicy::Single; //! Returns the current state of the keyboard modifier keys. virtual KeyboardModifiers QueryKeyboardModifiers() = 0; @@ -290,7 +294,6 @@ namespace AzToolsFramework { public: static const AZ::EBusAddressPolicy AddressPolicy = AZ::EBusAddressPolicy::Single; - static const AZ::EBusHandlerPolicy HandlerPolicy = AZ::EBusHandlerPolicy::Single; //! Returns the current time in seconds. //! This interface can be overridden for the purposes of testing to simplify viewport input requests. @@ -340,6 +343,21 @@ namespace AzToolsFramework return entityContextId; } + //! Performs an intersection test against meshes in the scene, if there is a hit (the ray intersects + //! a mesh), that position is returned, otherwise a point projected defaultDistance from the + //! origin of the ray will be returned. + //! @note The intersection will only consider visible objects. + AZ::Vector3 FindClosestPickIntersection( + AzFramework::ViewportId viewportId, const AzFramework::ScreenPoint& screenPoint, float rayLength, float defaultDistance); + + //! Overload of FindClosestPickIntersection taking a RenderGeometry::RayRequest directly. + //! @note rayRequest must contain a valid ray/line segment (start/endWorldPosition must not be at the same position). + AZ::Vector3 FindClosestPickIntersection(const AzFramework::RenderGeometry::RayRequest& rayRequest, float defaultDistance); + + //! Update the in/out parameter rayRequest based on the latest viewport ray. + void RefreshRayRequest( + AzFramework::RenderGeometry::RayRequest& rayRequest, const ViewportInteraction::ProjectedViewportRay& viewportRay, float rayLength); + //! Maps a mouse interaction event to a ClickDetector event. //! @note Function only cares about up or down events, all other events are mapped to Nil (ignored). AzFramework::ClickDetector::ClickEvent ClickDetectorEventFromViewportInteraction( diff --git a/Code/Framework/AzToolsFramework/AzToolsFramework/Viewport/ViewportSettings.cpp b/Code/Framework/AzToolsFramework/AzToolsFramework/Viewport/ViewportSettings.cpp new file mode 100644 index 0000000000..3bf25d4231 --- /dev/null +++ b/Code/Framework/AzToolsFramework/AzToolsFramework/Viewport/ViewportSettings.cpp @@ -0,0 +1,145 @@ +/* + * Copyright (c) Contributors to the Open 3D Engine Project. + * For complete copyright and license terms please see the LICENSE at the root of this distribution. + * + * SPDX-License-Identifier: Apache-2.0 OR MIT + * + */ + +#include + +namespace AzToolsFramework +{ + constexpr AZStd::string_view FlipManipulatorAxesTowardsViewSetting = "/Amazon/Preferences/Editor/Manipulator/FlipManipulatorAxesTowardsView"; + constexpr AZStd::string_view LinearManipulatorAxisLengthSetting = "/Amazon/Preferences/Editor/Manipulator/LinearManipulatorAxisLength"; + constexpr AZStd::string_view PlanarManipulatorAxisLengthSetting = "/Amazon/Preferences/Editor/Manipulator/PlanarManipulatorAxisLength"; + constexpr AZStd::string_view SurfaceManipulatorRadiusSetting = "/Amazon/Preferences/Editor/Manipulator/SurfaceManipulatorRadius"; + constexpr AZStd::string_view SurfaceManipulatorOpacitySetting = "/Amazon/Preferences/Editor/Manipulator/SurfaceManipulatorOpacity"; + constexpr AZStd::string_view LinearManipulatorConeLengthSetting = "/Amazon/Preferences/Editor/Manipulator/LinearManipulatorConeLength"; + constexpr AZStd::string_view LinearManipulatorConeRadiusSetting = "/Amazon/Preferences/Editor/Manipulator/LinearManipulatorConeRadius"; + constexpr AZStd::string_view ScaleManipulatorBoxHalfExtentSetting = "/Amazon/Preferences/Editor/Manipulator/ScaleManipulatorBoxHalfExtent"; + constexpr AZStd::string_view RotationManipulatorRadiusSetting = "/Amazon/Preferences/Editor/Manipulator/RotationManipulatorRadius"; + constexpr AZStd::string_view ManipulatorViewBaseScaleSetting = "/Amazon/Preferences/Editor/Manipulator/ViewBaseScale"; + constexpr AZStd::string_view IconsVisibleSetting = "/Amazon/Preferences/Editor/IconsVisible"; + constexpr AZStd::string_view HelpersVisibleSetting = "/Amazon/Preferences/Editor/HelpersVisible"; + + bool FlipManipulatorAxesTowardsView() + { + return GetRegistry(FlipManipulatorAxesTowardsViewSetting, true); + } + + void SetFlipManipulatorAxesTowardsView(const bool enabled) + { + SetRegistry(FlipManipulatorAxesTowardsViewSetting, enabled); + } + + float LinearManipulatorAxisLength() + { + return aznumeric_cast(GetRegistry(LinearManipulatorAxisLengthSetting, 2.0)); + } + + void SetLinearManipulatorAxisLength(const float length) + { + SetRegistry(LinearManipulatorAxisLengthSetting, length); + } + + float PlanarManipulatorAxisLength() + { + return aznumeric_cast(GetRegistry(PlanarManipulatorAxisLengthSetting, 0.6)); + } + + void SetPlanarManipulatorAxisLength(const float length) + { + SetRegistry(PlanarManipulatorAxisLengthSetting, length); + } + + float SurfaceManipulatorRadius() + { + return aznumeric_cast(GetRegistry(SurfaceManipulatorRadiusSetting, 0.1)); + } + + void SetSurfaceManipulatorRadius(const float radius) + { + SetRegistry(SurfaceManipulatorRadiusSetting, radius); + } + + float SurfaceManipulatorOpacity() + { + return aznumeric_cast(GetRegistry(SurfaceManipulatorOpacitySetting, 0.75)); + } + + void SetSurfaceManipulatorOpacity(const float opacity) + { + SetRegistry(SurfaceManipulatorOpacitySetting, opacity); + } + + float LinearManipulatorConeLength() + { + return aznumeric_cast(GetRegistry(LinearManipulatorConeLengthSetting, 0.28)); + } + + void SetLinearManipulatorConeLength(const float length) + { + SetRegistry(LinearManipulatorConeLengthSetting, length); + } + + float LinearManipulatorConeRadius() + { + return aznumeric_cast(GetRegistry(LinearManipulatorConeRadiusSetting, 0.1)); + } + + void SetLinearManipulatorConeRadius(const float radius) + { + SetRegistry(LinearManipulatorConeRadiusSetting, radius); + } + + float ScaleManipulatorBoxHalfExtent() + { + return aznumeric_cast(GetRegistry(ScaleManipulatorBoxHalfExtentSetting, 0.1)); + } + + void SetScaleManipulatorBoxHalfExtent(const float size) + { + SetRegistry(ScaleManipulatorBoxHalfExtentSetting, size); + } + + float RotationManipulatorRadius() + { + return aznumeric_cast(GetRegistry(RotationManipulatorRadiusSetting, 2.0)); + } + + void SetRotationManipulatorRadius(const float radius) + { + SetRegistry(RotationManipulatorRadiusSetting, radius); + } + + float ManipulatorViewBaseScale() + { + return aznumeric_cast(GetRegistry(ManipulatorViewBaseScaleSetting, 1.0)); + } + + void SetManipulatorViewBaseScale(const float scale) + { + SetRegistry(ManipulatorViewBaseScaleSetting, scale); + } + + bool IconsVisible() + { + return GetRegistry(IconsVisibleSetting, true); + } + + void SetIconsVisible(const bool visible) + { + SetRegistry(IconsVisibleSetting, visible); + } + + bool HelpersVisible() + { + return GetRegistry(HelpersVisibleSetting, true); + } + + void SetHelpersVisible(const bool visible) + { + SetRegistry(HelpersVisibleSetting, visible); + } +} // namespace AzToolsFramework diff --git a/Code/Framework/AzToolsFramework/AzToolsFramework/Viewport/ViewportSettings.h b/Code/Framework/AzToolsFramework/AzToolsFramework/Viewport/ViewportSettings.h new file mode 100644 index 0000000000..80880e0bae --- /dev/null +++ b/Code/Framework/AzToolsFramework/AzToolsFramework/Viewport/ViewportSettings.h @@ -0,0 +1,75 @@ +/* + * Copyright (c) Contributors to the Open 3D Engine Project. + * For complete copyright and license terms please see the LICENSE at the root of this distribution. + * + * SPDX-License-Identifier: Apache-2.0 OR MIT + * + */ + +#pragma once + +#include + +namespace AzToolsFramework +{ + template + void SetRegistry(const AZStd::string_view setting, T&& value) + { + if (auto* registry = AZ::SettingsRegistry::Get()) + { + registry->Set(setting, AZStd::forward(value)); + } + } + + template + AZStd::remove_cvref_t GetRegistry(const AZStd::string_view setting, T&& defaultValue) + { + AZStd::remove_cvref_t value = AZStd::forward(defaultValue); + if (const auto* registry = AZ::SettingsRegistry::Get()) + { + T potentialValue; + if (registry->Get(potentialValue, setting)) + { + value = AZStd::move(potentialValue); + } + } + + return value; + } + + bool FlipManipulatorAxesTowardsView(); + void SetFlipManipulatorAxesTowardsView(bool enabled); + + float LinearManipulatorAxisLength(); + void SetLinearManipulatorAxisLength(float length); + + float PlanarManipulatorAxisLength(); + void SetPlanarManipulatorAxisLength(float length); + + float SurfaceManipulatorRadius(); + void SetSurfaceManipulatorRadius(float radius); + + float SurfaceManipulatorOpacity(); + void SetSurfaceManipulatorOpacity(float opacity); + + float LinearManipulatorConeLength(); + void SetLinearManipulatorConeLength(float length); + + float LinearManipulatorConeRadius(); + void SetLinearManipulatorConeRadius(float radius); + + float ScaleManipulatorBoxHalfExtent(); + void SetScaleManipulatorBoxHalfExtent(float halfExtent); + + float RotationManipulatorRadius(); + void SetRotationManipulatorRadius(float radius); + + float ManipulatorViewBaseScale(); + void SetManipulatorViewBaseScale(float scale); + + bool IconsVisible(); + void SetIconsVisible(bool visible); + + bool HelpersVisible(); + void SetHelpersVisible(bool visible); +} // namespace AzToolsFramework diff --git a/Code/Framework/AzToolsFramework/AzToolsFramework/Viewport/ViewportTypes.cpp b/Code/Framework/AzToolsFramework/AzToolsFramework/Viewport/ViewportTypes.cpp index 546320d1e9..f884ab245e 100644 --- a/Code/Framework/AzToolsFramework/AzToolsFramework/Viewport/ViewportTypes.cpp +++ b/Code/Framework/AzToolsFramework/AzToolsFramework/Viewport/ViewportTypes.cpp @@ -49,5 +49,22 @@ namespace AzToolsFramework ->Field("MouseEvent", &MouseInteractionEvent::m_mouseEvent) ->Field("WheelDelta", &MouseInteractionEvent::m_wheelDelta); } + + MouseInteraction BuildMouseInteraction( + const MousePick& mousePick, const MouseButtons buttons, const InteractionId interactionId, const KeyboardModifiers modifiers) + { + MouseInteraction interaction; + interaction.m_mousePick = mousePick; + interaction.m_mouseButtons = buttons; + interaction.m_interactionId = interactionId; + interaction.m_keyboardModifiers = modifiers; + return interaction; + } + + MouseInteractionEvent BuildMouseInteractionEvent( + const MouseInteraction& mouseInteraction, const MouseEvent event, const bool cursorCaptured /*= false*/) + { + return MouseInteractionEvent(mouseInteraction, event, cursorCaptured); + } } // namespace ViewportInteraction } // namespace AzToolsFramework diff --git a/Code/Framework/AzToolsFramework/AzToolsFramework/Viewport/ViewportTypes.h b/Code/Framework/AzToolsFramework/AzToolsFramework/Viewport/ViewportTypes.h index bc1d277609..903c91fb0a 100644 --- a/Code/Framework/AzToolsFramework/AzToolsFramework/Viewport/ViewportTypes.h +++ b/Code/Framework/AzToolsFramework/AzToolsFramework/Viewport/ViewportTypes.h @@ -8,11 +8,11 @@ #pragma once -#include "AzFramework/Viewport/ScreenGeometry.h" - #include #include #include +#include +#include #include @@ -20,7 +20,7 @@ namespace AZ { class ReflectContext; class SerializeContext; -} +} // namespace AZ namespace AzToolsFramework { @@ -178,6 +178,12 @@ namespace AzToolsFramework //! @cond AZ_TYPE_INFO(MousePick, "{A69B9562-FC8C-4DE7-9137-0FF867B1513D}"); MousePick() = default; + MousePick(const AZ::Vector3& rayOrigin, const AZ::Vector3& rayDirection, const AzFramework::ScreenPoint& screenPoint) + : m_rayOrigin(rayOrigin) + , m_rayDirection(rayDirection) + , m_screenCoordinates(screenPoint) + { + } //! @endcond AZ::Vector3 m_rayOrigin = AZ::Vector3::CreateZero(); //!< World space. @@ -249,6 +255,22 @@ namespace AzToolsFramework return mouseInteractionEvent.m_wheelDelta; } + //! A ray projection, originating from a point and extending in a direction specified as a normal. + struct ProjectedViewportRay + { + AZ::Vector3 m_origin; + AZ::Vector3 m_direction; + }; + + //! Utility function to return a viewport ray. + inline ProjectedViewportRay ViewportScreenToWorldRay( + const AzFramework::CameraState& cameraState, const AzFramework::ScreenPoint& screenPoint) + { + const AZ::Vector3 rayOrigin = AzFramework::ScreenToWorld(screenPoint, cameraState); + const AZ::Vector3 rayDirection = (rayOrigin - cameraState.m_position).GetNormalized(); + return ProjectedViewportRay{ rayOrigin, rayDirection }; + } + //! Return QPoint from AzFramework::ScreenPoint. inline QPoint QPointFromScreenPoint(const AzFramework::ScreenPoint& screenPoint) { @@ -301,6 +323,27 @@ namespace AzToolsFramework return mouseButtons; } + //! Build a mouse pick from the specified mouse position and camera state. + inline MousePick BuildMousePick(const AzFramework::CameraState& cameraState, const AzFramework::ScreenPoint& screenPoint) + { + const auto ray = ViewportScreenToWorldRay(cameraState, screenPoint); + return MousePick(ray.m_origin, ray.m_direction, screenPoint); + } + + //! Create a mouse interaction from the specified pick, buttons, interaction id and keyboard modifiers. + MouseInteraction BuildMouseInteraction( + const MousePick& mousePick, MouseButtons buttons, InteractionId interactionId, KeyboardModifiers modifiers); + + //! Create a mouse buttons from the specified mouse button. + inline MouseButtons BuildMouseButtons(const MouseButton button) + { + return MouseButtons(aznumeric_cast(button)); + } + + //! Create a mouse interaction event from the specified interaction and event. + MouseInteractionEvent BuildMouseInteractionEvent( + const MouseInteraction& mouseInteraction, MouseEvent event, bool cursorCaptured = false); + //! Reflect all viewport related types. void ViewportInteractionReflect(AZ::ReflectContext* context); } // namespace ViewportInteraction diff --git a/Code/Framework/AzToolsFramework/AzToolsFramework/ViewportSelection/EditorBoxSelect.cpp b/Code/Framework/AzToolsFramework/AzToolsFramework/ViewportSelection/EditorBoxSelect.cpp index a1b653225b..ebbeac4794 100644 --- a/Code/Framework/AzToolsFramework/AzToolsFramework/ViewportSelection/EditorBoxSelect.cpp +++ b/Code/Framework/AzToolsFramework/AzToolsFramework/ViewportSelection/EditorBoxSelect.cpp @@ -64,7 +64,8 @@ namespace AzToolsFramework } } - if (clickOutcome == AzFramework::ClickDetector::ClickOutcome::Release) + if (clickOutcome == AzFramework::ClickDetector::ClickOutcome::Release || + clickOutcome == AzFramework::ClickDetector::ClickOutcome::Click) { if (m_leftMouseUp) { diff --git a/Code/Framework/AzToolsFramework/AzToolsFramework/ViewportSelection/EditorHelpers.cpp b/Code/Framework/AzToolsFramework/AzToolsFramework/ViewportSelection/EditorHelpers.cpp index 0f94b95e5f..ace2156d85 100644 --- a/Code/Framework/AzToolsFramework/AzToolsFramework/ViewportSelection/EditorHelpers.cpp +++ b/Code/Framework/AzToolsFramework/AzToolsFramework/ViewportSelection/EditorHelpers.cpp @@ -52,34 +52,45 @@ AZ_CVAR( AZ::ConsoleFunctorFlags::Null, "Use a lock icon when the cursor is over entities that cannot be interacted with"); +AZ_CVAR(float, ed_iconMinScale, 0.1f, nullptr, AZ::ConsoleFunctorFlags::Null, "Minimum scale for icons in the distance"); +AZ_CVAR(float, ed_iconMaxScale, 1.0f, nullptr, AZ::ConsoleFunctorFlags::Null, "Maximum scale for icons near the camera"); +AZ_CVAR(float, ed_iconCloseDist, 3.0f, nullptr, AZ::ConsoleFunctorFlags::Null, "Distance at which icons are at maximum scale"); +AZ_CVAR(float, ed_iconFarDist, 40.f, nullptr, AZ::ConsoleFunctorFlags::Null, "Distance at which icons are at minimum scale"); + namespace AzToolsFramework { AZ_CLASS_ALLOCATOR_IMPL(EditorHelpers, AZ::SystemAllocator, 0) - static const int s_iconSize = 36; // icon display size (in pixels) - static const float s_iconMinScale = 0.1f; // minimum scale for icons in the distance - static const float s_iconMaxScale = 1.0f; // maximum scale for icons near the camera - static const float s_iconCloseDist = 3.f; // distance at which icons are at maximum scale - static const float s_iconFarDist = 40.f; // distance at which icons are at minimum scale + static const int IconSize = 36; // icon display size (in pixels) // helper function to wrap EBus call to check if helpers are being displayed - // note: the ['?'] icon in the top right of the editor - static bool HelpersVisible() + static bool HelpersVisible(const AzFramework::ViewportId viewportId) { bool helpersVisible = false; - EditorRequestBus::BroadcastResult(helpersVisible, &EditorRequests::DisplayHelpersVisible); + ViewportInteraction::ViewportSettingsRequestBus::EventResult( + helpersVisible, viewportId, &ViewportInteraction::ViewportSettingsRequestBus::Events::HelpersVisible); return helpersVisible; } - // calculate the icon scale based on how far away it is (distanceSq) from a given point - // note: this is mostly likely distance from the camera - static float GetIconScale(const float distSq) + // helper function to wrap EBus call to check if icons are being displayed + static bool IconsVisible(const AzFramework::ViewportId viewportId) { - AZ_PROFILE_FUNCTION(AzToolsFramework); + bool iconsVisible = false; + ViewportInteraction::ViewportSettingsRequestBus::EventResult( + iconsVisible, viewportId, &ViewportInteraction::ViewportSettingsRequestBus::Events::IconsVisible); + return iconsVisible; + } - return s_iconMinScale + - (s_iconMaxScale - s_iconMinScale) * - (1.0f - AZ::GetClamp(AZ::GetMax(0.0f, sqrtf(distSq) - s_iconCloseDist) / s_iconFarDist, 0.0f, 1.0f)); + float GetIconScale(const float distance) + { + return ed_iconMinScale + + (ed_iconMaxScale - ed_iconMinScale) * + (1.0f - AZ::GetClamp(AZ::GetMax(0.0f, distance - ed_iconCloseDist) / (ed_iconFarDist - ed_iconCloseDist), 0.0f, 1.0f)); + } + + float GetIconSize(const float distance) + { + return GetIconScale(distance) * IconSize; } static void DisplayComponents( @@ -148,7 +159,6 @@ namespace AzToolsFramework return false; } - EditorHelpers::EditorHelpers(const EditorVisibleEntityDataCache* entityDataCache) : m_entityDataCache(entityDataCache) { @@ -172,11 +182,14 @@ namespace AzToolsFramework const int viewportId = mouseInteraction.m_mouseInteraction.m_interactionId.m_viewportId; - const bool helpersVisible = HelpersVisible(); + const bool iconsVisible = IconsVisible(viewportId); + + const AZ::Matrix3x4 cameraView = AzFramework::CameraView(cameraState); + const AZ::Matrix4x4 cameraProjection = AzFramework::CameraProjection(cameraState); // selecting new entities AZ::EntityId entityIdUnderCursor; - float closestDistance = std::numeric_limits::max(); + float closestDistance = AZStd::numeric_limits::max(); for (size_t entityCacheIndex = 0; entityCacheIndex < m_entityDataCache->VisibleEntityDataCount(); ++entityCacheIndex) { const AZ::EntityId entityId = m_entityDataCache->GetVisibleEntityId(entityCacheIndex); @@ -186,26 +199,34 @@ namespace AzToolsFramework continue; } - // 2d screen space selection - did we click an icon - if (helpersVisible) + if (iconsVisible) { // some components choose to hide their icons (e.g. meshes) - if (!m_entityDataCache->IsVisibleEntityIconHidden(entityCacheIndex)) + // we also do not want to test against icons that may not be showing as they're inside a 'closed' entity container + // (these icons only become visible when it is opened for editing) + if (!m_entityDataCache->IsVisibleEntityIconHidden(entityCacheIndex) && + m_entityDataCache->IsVisibleEntityIndividuallySelectableInViewport(entityCacheIndex)) { const AZ::Vector3& entityPosition = m_entityDataCache->GetVisibleEntityPosition(entityCacheIndex); // selecting based on 2d icon - should only do it when visible and not selected - const AzFramework::ScreenPoint screenPosition = AzFramework::WorldToScreen(entityPosition, cameraState); + const AZ::Vector3 ndcPoint = AzFramework::WorldToScreenNdc(entityPosition, cameraView, cameraProjection); + const AzFramework::ScreenPoint screenPosition = + AzFramework::ScreenPointFromNdc(AZ::Vector3ToVector2(ndcPoint), cameraState.m_viewportSize); - const float distSqFromCamera = cameraState.m_position.GetDistanceSq(entityPosition); - const auto iconRange = static_cast(GetIconScale(distSqFromCamera) * s_iconSize * 0.5f); + const float distanceFromCamera = cameraState.m_position.GetDistance(entityPosition); + const auto iconRange = GetIconSize(distanceFromCamera) * 0.5f; const auto screenCoords = mouseInteraction.m_mouseInteraction.m_mousePick.m_screenCoordinates; + // 2d screen space selection - did we click an icon if (screenCoords.m_x >= screenPosition.m_x - iconRange && screenCoords.m_x <= screenPosition.m_x + iconRange && - screenCoords.m_y >= screenPosition.m_y - iconRange && screenCoords.m_y <= screenPosition.m_y + iconRange) + screenCoords.m_y >= screenPosition.m_y - iconRange && screenCoords.m_y <= screenPosition.m_y + iconRange && + ndcPoint.GetZ() < closestDistance) { + // use ndc z value for distance here which is in 0-1 range so will most likely 'win' when it comes to the + // distance check (this is what we want as the cursor should always favor icons if they are hovered) + closestDistance = ndcPoint.GetZ(); entityIdUnderCursor = entityId; - break; } } } @@ -218,9 +239,14 @@ namespace AzToolsFramework if (AabbIntersectMouseRay(mouseInteraction.m_mouseInteraction, aabb)) { // if success, pick against specific component - if (PickEntity(entityId, mouseInteraction.m_mouseInteraction, closestDistance, viewportId)) + float closestBoundDifference = AZStd::numeric_limits::max(); + if (PickEntity(entityId, mouseInteraction.m_mouseInteraction, closestBoundDifference, viewportId)) { - entityIdUnderCursor = entityId; + if (closestBoundDifference < closestDistance) + { + closestDistance = closestBoundDifference; + entityIdUnderCursor = entityId; + } } } } @@ -235,7 +261,7 @@ namespace AzToolsFramework viewportId, &ViewportInteraction::ViewportMouseCursorRequestBus::Events::SetOverrideCursor, ViewportInteraction::CursorStyleOverride::Forbidden); } - + if (mouseInteraction.m_mouseInteraction.m_mouseButtons.Left() && mouseInteraction.m_mouseEvent == ViewportInteraction::MouseEvent::Down || mouseInteraction.m_mouseEvent == ViewportInteraction::MouseEvent::DoubleClick) @@ -274,55 +300,78 @@ namespace AzToolsFramework { AZ_PROFILE_FUNCTION(AzToolsFramework); - if (HelpersVisible()) + const bool iconsVisible = IconsVisible(viewportInfo.m_viewportId); + const bool helpersVisible = HelpersVisible(viewportInfo.m_viewportId); + + auto displayCheck = [this](const size_t entityCacheIndex, const AZ::EntityId entityId) + { + if (!m_entityDataCache->IsVisibleEntityVisible(entityCacheIndex) || !IsSelectableInViewport(entityId)) + { + return false; + } + return true; + }; + + if (helpersVisible) { for (size_t entityCacheIndex = 0; entityCacheIndex < m_entityDataCache->VisibleEntityDataCount(); ++entityCacheIndex) { - const AZ::EntityId entityId = m_entityDataCache->GetVisibleEntityId(entityCacheIndex); - - if (!m_entityDataCache->IsVisibleEntityVisible(entityCacheIndex) || !IsSelectableInViewport(entityId)) + if (const AZ::EntityId entityId = m_entityDataCache->GetVisibleEntityId(entityCacheIndex); + displayCheck(entityCacheIndex, entityId)) { - continue; + // notify components to display + DisplayComponents(entityId, viewportInfo, debugDisplay); } + } + } - // notify components to display - DisplayComponents(entityId, viewportInfo, debugDisplay); + if (iconsVisible) + { + auto editorViewportIconDisplay = EditorViewportIconDisplay::Get(); + if (!editorViewportIconDisplay) + { + return; + } - if (m_entityDataCache->IsVisibleEntityIconHidden(entityCacheIndex) || - (m_entityDataCache->IsVisibleEntitySelected(entityCacheIndex) && !showIconCheck(entityId))) + for (size_t entityCacheIndex = 0; entityCacheIndex < m_entityDataCache->VisibleEntityDataCount(); ++entityCacheIndex) + { + if (const AZ::EntityId entityId = m_entityDataCache->GetVisibleEntityId(entityCacheIndex); + displayCheck(entityCacheIndex, entityId)) { - continue; - } - - int iconTextureId = 0; - EditorEntityIconComponentRequestBus::EventResult( - iconTextureId, entityId, &EditorEntityIconComponentRequests::GetEntityIconTextureId); - - const AZ::Vector3& entityPosition = m_entityDataCache->GetVisibleEntityPosition(entityCacheIndex); - const float distSqFromCamera = cameraState.m_position.GetDistanceSq(entityPosition); - - const float iconScale = GetIconScale(distSqFromCamera); - const float iconSize = s_iconSize * iconScale; - - using ComponentEntityAccentType = Components::EditorSelectionAccentSystemComponent::ComponentEntityAccentType; - const AZ::Color iconHighlight = [this, entityCacheIndex]() - { - if (m_entityDataCache->IsVisibleEntityLocked(entityCacheIndex)) + if (m_entityDataCache->IsVisibleEntityIconHidden(entityCacheIndex) || + (m_entityDataCache->IsVisibleEntitySelected(entityCacheIndex) && !showIconCheck(entityId))) { - return AZ::Color(AZ::u8(100), AZ::u8(100), AZ::u8(100), AZ::u8(255)); + continue; } - if (m_entityDataCache->GetVisibleEntityAccent(entityCacheIndex) == ComponentEntityAccentType::Hover) + int iconTextureId = 0; + EditorEntityIconComponentRequestBus::EventResult( + iconTextureId, entityId, &EditorEntityIconComponentRequests::GetEntityIconTextureId); + + using ComponentEntityAccentType = Components::EditorSelectionAccentSystemComponent::ComponentEntityAccentType; + const AZ::Color iconHighlight = [this, entityCacheIndex]() { - return AZ::Color(AZ::u8(255), AZ::u8(120), AZ::u8(0), AZ::u8(204)); - } + if (m_entityDataCache->IsVisibleEntityLocked(entityCacheIndex)) + { + return AZ::Color(AZ::u8(100), AZ::u8(100), AZ::u8(100), AZ::u8(255)); + } - return AZ::Color(1.0f, 1.0f, 1.0f, 1.0f); - }(); + if (m_entityDataCache->GetVisibleEntityAccent(entityCacheIndex) == ComponentEntityAccentType::Hover) + { + return AZ::Color(AZ::u8(255), AZ::u8(120), AZ::u8(0), AZ::u8(204)); + } - EditorViewportIconDisplay::Get()->DrawIcon({ viewportInfo.m_viewportId, iconTextureId, iconHighlight, entityPosition, - EditorViewportIconDisplayInterface::CoordinateSpace::WorldSpace, - AZ::Vector2{ iconSize, iconSize } }); + return AZ::Color(1.0f, 1.0f, 1.0f, 1.0f); + }(); + + const AZ::Vector3& entityPosition = m_entityDataCache->GetVisibleEntityPosition(entityCacheIndex); + const float distanceFromCamera = cameraState.m_position.GetDistance(entityPosition); + const float iconSize = GetIconSize(distanceFromCamera); + + editorViewportIconDisplay->DrawIcon({ viewportInfo.m_viewportId, iconTextureId, iconHighlight, entityPosition, + EditorViewportIconDisplayInterface::CoordinateSpace::WorldSpace, + AZ::Vector2{ iconSize, iconSize } }); + } } } } diff --git a/Code/Framework/AzToolsFramework/AzToolsFramework/ViewportSelection/EditorHelpers.h b/Code/Framework/AzToolsFramework/AzToolsFramework/ViewportSelection/EditorHelpers.h index 458f15c1f2..358e6d9117 100644 --- a/Code/Framework/AzToolsFramework/AzToolsFramework/ViewportSelection/EditorHelpers.h +++ b/Code/Framework/AzToolsFramework/AzToolsFramework/ViewportSelection/EditorHelpers.h @@ -106,4 +106,12 @@ namespace AzToolsFramework const EditorVisibleEntityDataCache* m_entityDataCache = nullptr; //!< Entity Data queried by the EditorHelpers. const FocusModeInterface* m_focusModeInterface = nullptr; //!< API to interact with focus mode functionality. }; + + //! Calculate the icon scale based on how far away it is from a given point. + //! @note This is mostly likely distance from the camera. + float GetIconScale(float distance); + + //! Calculate the icon size based on how far away it is from a given point. + //! @note This is the base icon size multiplied by the icon scale to give a final viewport size. + float GetIconSize(float distance); } // namespace AzToolsFramework diff --git a/Code/Framework/AzToolsFramework/AzToolsFramework/ViewportSelection/EditorSelectionUtil.cpp b/Code/Framework/AzToolsFramework/AzToolsFramework/ViewportSelection/EditorSelectionUtil.cpp index a5ef66e7a3..31ea0c3985 100644 --- a/Code/Framework/AzToolsFramework/AzToolsFramework/ViewportSelection/EditorSelectionUtil.cpp +++ b/Code/Framework/AzToolsFramework/AzToolsFramework/ViewportSelection/EditorSelectionUtil.cpp @@ -9,6 +9,7 @@ #include "EditorSelectionUtil.h" #include +#include #include #include #include @@ -16,10 +17,20 @@ #include #include +AZ_CVAR( + float, + ed_defaultEntityPlacementDistance, + 10.0f, + nullptr, + AZ::ConsoleFunctorFlags::Null, + "The default distance to place an entity from the camera if no intersection is found"); + namespace AzToolsFramework { - // default ray length for picking in the viewport - static const float EditorPickRayLength = 1000.0f; + float GetDefaultEntityPlacementDistance() + { + return ed_defaultEntityPlacementDistance; + } AZ::Vector3 CalculateCenterOffset(const AZ::EntityId entityId, const EditorTransformComponentSelectionRequests::Pivot pivot) { diff --git a/Code/Framework/AzToolsFramework/AzToolsFramework/ViewportSelection/EditorSelectionUtil.h b/Code/Framework/AzToolsFramework/AzToolsFramework/ViewportSelection/EditorSelectionUtil.h index d58549b329..b3a6c6afd4 100644 --- a/Code/Framework/AzToolsFramework/AzToolsFramework/ViewportSelection/EditorSelectionUtil.h +++ b/Code/Framework/AzToolsFramework/AzToolsFramework/ViewportSelection/EditorSelectionUtil.h @@ -26,6 +26,9 @@ namespace AzFramework namespace AzToolsFramework { + //! Default ray length for picking in the viewport. + inline constexpr float EditorPickRayLength = 1000.0f; + //! Is the pivot at the center of the object (middle of extents) or at the //! exported authored object root position. inline bool Centered(const EditorTransformComponentSelectionRequests::Pivot pivot) @@ -57,6 +60,9 @@ namespace AzToolsFramework //! Wrapper for EBus call to return the DPI scaling for a given viewport. float GetScreenDisplayScaling(int viewportId); + //! The default distance an entity is placed from the camera if there is no intersection. + float GetDefaultEntityPlacementDistance(); + //! A utility to return the center of several points. //! Take several positions and store the min and max of each in //! turn - when all points have been added return the center/midpoint. diff --git a/Code/Framework/AzToolsFramework/AzToolsFramework/ViewportSelection/EditorTransformComponentSelection.cpp b/Code/Framework/AzToolsFramework/AzToolsFramework/ViewportSelection/EditorTransformComponentSelection.cpp index 39c882b766..b14f58fafa 100644 --- a/Code/Framework/AzToolsFramework/AzToolsFramework/ViewportSelection/EditorTransformComponentSelection.cpp +++ b/Code/Framework/AzToolsFramework/AzToolsFramework/ViewportSelection/EditorTransformComponentSelection.cpp @@ -21,6 +21,7 @@ #include #include #include +#include #include #include #include @@ -28,10 +29,12 @@ #include #include #include +#include #include #include #include #include +#include #include #include #include @@ -230,8 +233,8 @@ namespace AzToolsFramework { return mouseInteraction.m_mouseInteraction.m_mouseButtons.Middle() && mouseInteraction.m_mouseEvent == ViewportInteraction::MouseEvent::Down && - mouseInteraction.m_mouseInteraction.m_keyboardModifiers.Ctrl() && - !mouseInteraction.m_mouseInteraction.m_keyboardModifiers.Alt(); + !mouseInteraction.m_mouseInteraction.m_keyboardModifiers.Alt() && + mouseInteraction.m_mouseInteraction.m_keyboardModifiers.Ctrl(); } static bool IndividualDitto(const ViewportInteraction::MouseInteractionEvent& mouseInteraction) @@ -242,12 +245,12 @@ namespace AzToolsFramework mouseInteraction.m_mouseInteraction.m_keyboardModifiers.Ctrl(); } - static bool SnapTerrain(const ViewportInteraction::MouseInteractionEvent& mouseInteraction) + static bool SnapSurface(const ViewportInteraction::MouseInteractionEvent& mouseInteraction) { return mouseInteraction.m_mouseInteraction.m_mouseButtons.Middle() && mouseInteraction.m_mouseEvent == ViewportInteraction::MouseEvent::Down && - (mouseInteraction.m_mouseInteraction.m_keyboardModifiers.Alt() || - mouseInteraction.m_mouseInteraction.m_keyboardModifiers.Ctrl()); + mouseInteraction.m_mouseInteraction.m_keyboardModifiers.Shift() && + mouseInteraction.m_mouseInteraction.m_keyboardModifiers.Ctrl(); } static bool ManipulatorDitto( @@ -408,7 +411,7 @@ namespace AzToolsFramework const AzFramework::CameraState cameraState = GetCameraState(viewportId); for (size_t entityCacheIndex = 0; entityCacheIndex < entityDataCache.VisibleEntityDataCount(); ++entityCacheIndex) { - if (!entityDataCache.IsVisibleEntitySelectableInViewport(entityCacheIndex)) + if (!entityDataCache.IsVisibleEntityIndividuallySelectableInViewport(entityCacheIndex)) { continue; } @@ -891,60 +894,37 @@ namespace AzToolsFramework prevModifiers = action.m_modifiers; } - static void HandleAccents( - const bool hasSelectedEntities, - const AZ::EntityId entityIdUnderCursor, - const bool ctrlHeld, - AZ::EntityId& hoveredEntityId, + void HandleAccents( + const AZ::EntityId currentEntityIdUnderCursor, + AZ::EntityId& hoveredEntityIdUnderCursor, + const HandleAccentsContext& handleAccentsContext, const ViewportInteraction::MouseButtons mouseButtons, - const bool usingBoxSelect) + const AZStd::function& setEntityAccentedFn) { - AZ_PROFILE_FUNCTION(AzToolsFramework); - const bool invalidMouseButtonHeld = mouseButtons.Middle() || mouseButtons.Right(); + const bool hasSelectedEntities = handleAccentsContext.m_hasSelectedEntities; + const bool ctrlHeld = handleAccentsContext.m_ctrlHeld; + const bool boxSelect = handleAccentsContext.m_usingBoxSelect; + const bool stickySelect = handleAccentsContext.m_usingStickySelect; + const bool canSelect = stickySelect ? !hasSelectedEntities || ctrlHeld : true; - if ((hoveredEntityId.IsValid() && hoveredEntityId != entityIdUnderCursor) || - (hasSelectedEntities && !ctrlHeld && hoveredEntityId.IsValid()) || invalidMouseButtonHeld) + const bool removePreviousAccent = + (currentEntityIdUnderCursor != hoveredEntityIdUnderCursor && hoveredEntityIdUnderCursor.IsValid()) || invalidMouseButtonHeld; + const bool addNextAccent = currentEntityIdUnderCursor.IsValid() && canSelect && !invalidMouseButtonHeld && !boxSelect; + + if (removePreviousAccent) { - if (hoveredEntityId.IsValid()) - { - ToolsApplicationRequestBus::Broadcast(&ToolsApplicationRequests::SetEntityHighlighted, hoveredEntityId, false); - - hoveredEntityId.SetInvalid(); - } + setEntityAccentedFn(hoveredEntityIdUnderCursor, false); + hoveredEntityIdUnderCursor.SetInvalid(); } - if (!invalidMouseButtonHeld && !usingBoxSelect && (!hasSelectedEntities || ctrlHeld)) + if (addNextAccent) { - if (entityIdUnderCursor.IsValid()) - { - ToolsApplicationRequestBus::Broadcast(&ToolsApplicationRequests::SetEntityHighlighted, entityIdUnderCursor, true); - - hoveredEntityId = entityIdUnderCursor; - } + setEntityAccentedFn(currentEntityIdUnderCursor, true); + hoveredEntityIdUnderCursor = currentEntityIdUnderCursor; } } - static AZ::Vector3 PickTerrainPosition(const ViewportInteraction::MouseInteraction& mouseInteraction) - { - AZ_PROFILE_FUNCTION(AzToolsFramework); - - const int viewportId = mouseInteraction.m_interactionId.m_viewportId; - // get unsnapped terrain position (world space) - AZ::Vector3 worldSurfacePosition; - ViewportInteraction::MainEditorViewportInteractionRequestBus::EventResult( - worldSurfacePosition, viewportId, &ViewportInteraction::MainEditorViewportInteractionRequestBus::Events::PickTerrain, - mouseInteraction.m_mousePick.m_screenCoordinates); - - // convert to local space - snap if enabled - const GridSnapParameters gridSnapParams = GridSnapSettings(viewportId); - const AZ::Vector3 finalSurfacePosition = gridSnapParams.m_gridSnap - ? CalculateSnappedTerrainPosition(worldSurfacePosition, AZ::Transform::CreateIdentity(), viewportId, gridSnapParams.m_gridSize) - : worldSurfacePosition; - - return finalSurfacePosition; - } - // is the passed entity id contained with in the entity id list template static bool IsEntitySelectedInternal(AZ::EntityId entityId, const EntityIdContainer& selectedEntityIds) @@ -982,7 +962,7 @@ namespace AzToolsFramework { if (auto entityIndex = entityDataCache.GetVisibleEntityIndexFromId(entityId)) { - if (entityDataCache.IsVisibleEntitySelectableInViewport(*entityIndex)) + if (entityDataCache.IsVisibleEntityIndividuallySelectableInViewport(*entityIndex)) { return *entityIndex; } @@ -1013,6 +993,15 @@ namespace AzToolsFramework ToolsApplicationNotificationBus::Broadcast(&ToolsApplicationNotificationBus::Events::InvalidatePropertyDisplay, Refresh_Values); } + // leaves focus mode by focusing on the parent of the current perfab in the entity outliner + static void LeaveFocusMode() + { + if (auto prefabFocusPublicInterface = AZ::Interface::Get()) + { + prefabFocusPublicInterface->FocusOnParentOfFocusedPrefab(GetEntityContextId()); + } + } + EditorTransformComponentSelection::EditorTransformComponentSelection(const EditorVisibleEntityDataCache* entityDataCache) : m_entityDataCache(entityDataCache) { @@ -1031,6 +1020,7 @@ namespace AzToolsFramework EditorManipulatorCommandUndoRedoRequestBus::Handler::BusConnect(entityContextId); EditorContextMenuBus::Handler::BusConnect(); ViewportInteraction::ViewportSettingsNotificationBus::Handler::BusConnect(ViewportUi::DefaultViewportId); + ReadOnlyEntityPublicNotificationBus::Handler::BusConnect(entityContextId); CreateTransformModeSelectionCluster(); CreateSpaceSelectionCluster(); @@ -1066,6 +1056,7 @@ namespace AzToolsFramework m_pivotOverrideFrame.Reset(); + ReadOnlyEntityPublicNotificationBus::Handler::BusDisconnect(); ViewportInteraction::ViewportSettingsNotificationBus::Handler::BusDisconnect(); EditorContextMenuBus::Handler::BusConnect(); EditorManipulatorCommandUndoRedoRequestBus::Handler::BusDisconnect(); @@ -1177,8 +1168,10 @@ namespace AzToolsFramework continue; } - const AZ::Aabb bound = CalculateEditorEntitySelectionBounds(entityId, viewportInfo); - debugDisplay.DrawSolidBox(bound.GetMin(), bound.GetMax()); + if (const AZ::Aabb bound = CalculateEditorEntitySelectionBounds(entityId, viewportInfo); bound.IsValid()) + { + debugDisplay.DrawSolidBox(bound.GetMin(), bound.GetMax()); + } } debugDisplay.DepthTestOn(); @@ -1277,7 +1270,7 @@ namespace AzToolsFramework m_axisPreview.m_translation = m_entityIdManipulators.m_manipulators->GetLocalTransform().GetTranslation(); m_axisPreview.m_orientation = QuaternionFromTransformNoScaling(m_entityIdManipulators.m_manipulators->GetLocalTransform()); - // [ref 1.] + // see comment [ref 1.] above BeginRecordManipulatorCommand(); }); @@ -1312,7 +1305,7 @@ namespace AzToolsFramework m_axisPreview.m_translation = m_entityIdManipulators.m_manipulators->GetLocalTransform().GetTranslation(); m_axisPreview.m_orientation = QuaternionFromTransformNoScaling(m_entityIdManipulators.m_manipulators->GetLocalTransform()); - // [ref 1.] + // see comment [ref 1.] above BeginRecordManipulatorCommand(); }); @@ -1345,7 +1338,7 @@ namespace AzToolsFramework m_axisPreview.m_translation = m_entityIdManipulators.m_manipulators->GetLocalTransform().GetTranslation(); m_axisPreview.m_orientation = QuaternionFromTransformNoScaling(m_entityIdManipulators.m_manipulators->GetLocalTransform()); - // [ref 1.] + // see comment [ref 1.] above BeginRecordManipulatorCommand(); }); @@ -1387,7 +1380,7 @@ namespace AzToolsFramework // view rotationManipulators->SetLocalAxes(AZ::Vector3::CreateAxisX(), AZ::Vector3::CreateAxisY(), AZ::Vector3::CreateAxisZ()); rotationManipulators->ConfigureView( - 2.0f, AzFramework::ViewportColors::XAxisColor, AzFramework::ViewportColors::YAxisColor, + RotationManipulatorRadius(), AzFramework::ViewportColors::XAxisColor, AzFramework::ViewportColors::YAxisColor, AzFramework::ViewportColors::ZAxisColor); struct SharedRotationState @@ -1419,7 +1412,7 @@ namespace AzToolsFramework m_axisPreview.m_translation = m_entityIdManipulators.m_manipulators->GetLocalTransform().GetTranslation(); m_axisPreview.m_orientation = QuaternionFromTransformNoScaling(m_entityIdManipulators.m_manipulators->GetLocalTransform()); - // [ref 1.] + // see comment [ref 1.] above BeginRecordManipulatorCommand(); }); @@ -1546,7 +1539,8 @@ namespace AzToolsFramework RecalculateAverageManipulatorTransform(m_entityIdManipulators.m_lookups, m_pivotOverrideFrame, m_pivotMode, m_referenceFrame)); scaleManipulators->SetAxes(AZ::Vector3::CreateAxisX(), AZ::Vector3::CreateAxisY(), AZ::Vector3::CreateAxisZ()); - scaleManipulators->ConfigureView(2.0f, AZ::Color::CreateOne(), AZ::Color::CreateOne(), AZ::Color::CreateOne()); + scaleManipulators->ConfigureView( + LinearManipulatorAxisLength(), AZ::Color::CreateOne(), AZ::Color::CreateOne(), AZ::Color::CreateOne()); struct SharedScaleState { @@ -1801,7 +1795,7 @@ namespace AzToolsFramework const AzFramework::CameraState cameraState = GetCameraState(viewportId); const auto cursorEntityIdQuery = m_editorHelpers->FindEntityIdUnderCursor(cameraState, mouseInteraction); - m_cachedEntityIdUnderCursor = cursorEntityIdQuery.ContainerAncestorEntityId(); + m_currentEntityIdUnderCursor = cursorEntityIdQuery.ContainerAncestorEntityId(); const auto selectClickEvent = ClickDetectorEventFromViewportInteraction(mouseInteraction); m_cursorState.SetCurrentPosition(mouseInteraction.m_mouseInteraction.m_mousePick.m_screenCoordinates); @@ -1822,7 +1816,7 @@ namespace AzToolsFramework mouseInteraction.m_mouseInteraction, AZ::Aabb::CreateFromMinMax(boxPosition - scaledSize, boxPosition + scaledSize))) { - m_cachedEntityIdUnderCursor = entityId; + m_currentEntityIdUnderCursor = entityId; } } } @@ -1842,7 +1836,7 @@ namespace AzToolsFramework return true; } - const AZ::EntityId entityIdUnderCursor = m_cachedEntityIdUnderCursor; + const AZ::EntityId entityIdUnderCursor = m_currentEntityIdUnderCursor; if (mouseInteraction.m_mouseEvent == ViewportInteraction::MouseEvent::DoubleClick && mouseInteraction.m_mouseInteraction.m_mouseButtons.Left()) @@ -1891,6 +1885,13 @@ namespace AzToolsFramework if (!m_selectedEntityIds.empty()) { + // try snapping to a surface (mesh) if in Translation mode + if (Input::SnapSurface(mouseInteraction)) + { + PerformSnapToSurface(mouseInteraction); + return false; + } + // group copying/alignment to specific entity - 'ditto' position/orientation for group if (Input::GroupDitto(mouseInteraction) && PerformGroupDitto(entityIdUnderCursor)) { @@ -1903,13 +1904,6 @@ namespace AzToolsFramework return false; } - // try snapping to the terrain (if in Translation mode) and entity wasn't picked - if (Input::SnapTerrain(mouseInteraction)) - { - PerformSnapToTerrain(mouseInteraction); - return false; - } - // set manipulator pivot override translation or orientation (update manipulators) if (Input::ManipulatorDitto(clickOutcome, mouseInteraction)) { @@ -1997,25 +1991,28 @@ namespace AzToolsFramework return false; } - void EditorTransformComponentSelection::PerformSnapToTerrain(const ViewportInteraction::MouseInteractionEvent& mouseInteraction) + void EditorTransformComponentSelection::PerformSnapToSurface(const ViewportInteraction::MouseInteractionEvent& mouseInteraction) { - for (AZ::EntityId entityId : m_selectedEntityIds) + for (const AZ::EntityId& entityId : m_selectedEntityIds) { ScopedUndoBatch::MarkEntityDirty(entityId); } if (m_mode == Mode::Translation) { - const AZ::Vector3 finalSurfacePosition = PickTerrainPosition(mouseInteraction.m_mouseInteraction); + const AZ::Vector3 worldPosition = FindClosestPickIntersection( + mouseInteraction.m_mouseInteraction.m_interactionId.m_viewportId, + mouseInteraction.m_mouseInteraction.m_mousePick.m_screenCoordinates, AzToolsFramework::EditorPickRayLength, + GetDefaultEntityPlacementDistance()); // handle modifier alternatives if (Input::IndividualDitto(mouseInteraction)) { - CopyTranslationToSelectedEntitiesIndividual(finalSurfacePosition); + CopyTranslationToSelectedEntitiesIndividual(worldPosition); } else if (Input::GroupDitto(mouseInteraction)) { - CopyTranslationToSelectedEntitiesGroup(finalSurfacePosition); + CopyTranslationToSelectedEntitiesGroup(worldPosition); } } else if (m_mode == Mode::Rotation) @@ -2507,6 +2504,28 @@ namespace AzToolsFramework { AZ_PROFILE_FUNCTION(AzToolsFramework); + // do not create manipulators for the container entity of the focused prefab. + if (auto prefabFocusPublicInterface = AZ::Interface::Get()) + { + AzFramework::EntityContextId editorEntityContextId = GetEntityContextId(); + if (AZ::EntityId focusRoot = prefabFocusPublicInterface->GetFocusedPrefabContainerEntityId(editorEntityContextId); + focusRoot.IsValid()) + { + m_selectedEntityIds.erase(focusRoot); + } + } + + // do not create manipulators for any entities marked as read only + if (auto readOnlyEntityPublicInterface = AZ::Interface::Get()) + { + AZStd::erase_if( + m_selectedEntityIds, + [readOnlyEntityPublicInterface](auto entityId) + { + return readOnlyEntityPublicInterface->IsReadOnly(entityId); + }); + } + // note: create/destroy pattern to be addressed DestroyManipulators(m_entityIdManipulators); CreateEntityIdManipulators(); @@ -3241,13 +3260,34 @@ namespace AzToolsFramework void EditorTransformComponentSelection::PopulateEditorGlobalContextMenu( QMenu* menu, [[maybe_unused]] const AZ::Vector2& point, [[maybe_unused]] int flags) { - QAction* action = menu->addAction(QObject::tr(TogglePivotTitleRightClick)); - QObject::connect( - action, &QAction::triggered, action, - [this] + // Don't show the Toggle Pivot option if any read-only entities are in the current selection + // We need to request the selected entities instead of just using the m_selectedEntities variable + // because we filter out any read-only entities from the m_selectedEntities so that the manipulators + // will be hidden + EntityIdList selectedEntityIds; + ToolsApplicationRequests::Bus::BroadcastResult(selectedEntityIds, &ToolsApplicationRequests::GetSelectedEntities); + + auto readOnlyEntityPublicInterface = AZ::Interface::Get(); + bool readOnlyEntityInSelection = false; + for (const auto& entityId : selectedEntityIds) + { + if (readOnlyEntityPublicInterface->IsReadOnly(entityId)) { - ToggleCenterPivotSelection(); - }); + readOnlyEntityInSelection = true; + break; + } + } + + if (!readOnlyEntityInSelection) + { + QAction* action = menu->addAction(QObject::tr(TogglePivotTitleRightClick)); + QObject::connect( + action, &QAction::triggered, action, + [this] + { + ToggleCenterPivotSelection(); + }); + } } void EditorTransformComponentSelection::BeforeEntitySelectionChanged() @@ -3361,9 +3401,23 @@ namespace AzToolsFramework m_cursorState.Update(); + bool stickySelect = false; + ViewportInteraction::ViewportSettingsRequestBus::EventResult( + stickySelect, viewportInfo.m_viewportId, &ViewportInteraction::ViewportSettingsRequestBus::Events::StickySelectEnabled); + + HandleAccentsContext handleAccentsContext; + handleAccentsContext.m_ctrlHeld = keyboardModifiers.Ctrl(); + handleAccentsContext.m_hasSelectedEntities = !m_selectedEntityIds.empty(); + handleAccentsContext.m_usingBoxSelect = m_boxSelect.Active(); + handleAccentsContext.m_usingStickySelect = stickySelect; + HandleAccents( - !m_selectedEntityIds.empty(), m_cachedEntityIdUnderCursor, keyboardModifiers.Ctrl(), m_hoveredEntityId, - ViewportInteraction::BuildMouseButtons(QGuiApplication::mouseButtons()), m_boxSelect.Active()); + m_currentEntityIdUnderCursor, m_hoveredEntityId, handleAccentsContext, + ViewportInteraction::BuildMouseButtons(QGuiApplication::mouseButtons()), + [](const AZ::EntityId entityId, bool highlighted) + { + ToolsApplicationRequestBus::Broadcast(&ToolsApplicationRequests::SetEntityHighlighted, entityId, highlighted); + }); const ReferenceFrame referenceFrame = m_spaceCluster.m_spaceLock.value_or(ReferenceFrameFromModifiers(keyboardModifiers)); @@ -3507,7 +3561,7 @@ namespace AzToolsFramework // get the editor cameras current orientation const int viewportId = viewportInfo.m_viewportId; const AzFramework::CameraState editorCameraState = GetCameraState(viewportId); - const AZ::Matrix3x3& editorCameraOrientation = AZ::Matrix3x3::CreateFromMatrix4x4(AzFramework::CameraTransform(editorCameraState)); + const AZ::Matrix3x3& editorCameraOrientation = AZ::Matrix3x3::CreateFromMatrix3x4(AzFramework::CameraTransform(editorCameraState)); // create a gizmo camera transform about the origin matching the orientation of the editor camera // (10 units back in the y axis to produce an orbit effect) @@ -3554,10 +3608,9 @@ namespace AzToolsFramework debugDisplay.SetLineWidth(1.0f); const float labelOffset = ed_viewportGizmoAxisLabelOffset; - const float screenScale = GetScreenDisplayScaling(viewportId); - const auto labelXScreenPosition = (gizmoStart + (gizmoAxisX * labelOffset)) * editorCameraState.m_viewportSize * screenScale; - const auto labelYScreenPosition = (gizmoStart + (gizmoAxisY * labelOffset)) * editorCameraState.m_viewportSize * screenScale; - const auto labelZScreenPosition = (gizmoStart + (gizmoAxisZ * labelOffset)) * editorCameraState.m_viewportSize * screenScale; + const auto labelXScreenPosition = (gizmoStart + (gizmoAxisX * labelOffset)) * editorCameraState.m_viewportSize; + const auto labelYScreenPosition = (gizmoStart + (gizmoAxisY * labelOffset)) * editorCameraState.m_viewportSize; + const auto labelZScreenPosition = (gizmoStart + (gizmoAxisZ * labelOffset)) * editorCameraState.m_viewportSize; // draw the label of of each axis for the gizmo const float labelSize = ed_viewportGizmoAxisLabelSize; @@ -3694,7 +3747,8 @@ namespace AzToolsFramework case ViewportEditorMode::Focus: { ViewportUi::ViewportUiRequestBus::Event( - ViewportUi::DefaultViewportId, &ViewportUi::ViewportUiRequestBus::Events::CreateViewportBorder, "Focus Mode"); + ViewportUi::DefaultViewportId, &ViewportUi::ViewportUiRequestBus::Events::CreateViewportBorder, "Focus Mode", + LeaveFocusMode); } break; case ViewportEditorMode::Default: @@ -3723,7 +3777,8 @@ namespace AzToolsFramework if (editorModeState.IsModeActive(ViewportEditorMode::Focus)) { ViewportUi::ViewportUiRequestBus::Event( - ViewportUi::DefaultViewportId, &ViewportUi::ViewportUiRequestBus::Events::CreateViewportBorder, "Focus Mode"); + ViewportUi::DefaultViewportId, &ViewportUi::ViewportUiRequestBus::Events::CreateViewportBorder, "Focus Mode", + LeaveFocusMode); } } break; @@ -3809,6 +3864,14 @@ namespace AzToolsFramework m_snappingCluster.TrySetVisible(m_viewportUiVisible && !m_selectedEntityIds.empty()); } + void EditorTransformComponentSelection::OnReadOnlyEntityStatusChanged(const AZ::EntityId& entityId, [[maybe_unused]] bool readOnly) + { + if (IsEntitySelected(entityId)) + { + RefreshSelectedEntityIdsAndRegenerateManipulators(); + } + } + namespace ETCS { // little raii wrapper to switch a value from true to false and back diff --git a/Code/Framework/AzToolsFramework/AzToolsFramework/ViewportSelection/EditorTransformComponentSelection.h b/Code/Framework/AzToolsFramework/AzToolsFramework/ViewportSelection/EditorTransformComponentSelection.h index 1e1cc6d2e1..7b3ba08894 100644 --- a/Code/Framework/AzToolsFramework/AzToolsFramework/ViewportSelection/EditorTransformComponentSelection.h +++ b/Code/Framework/AzToolsFramework/AzToolsFramework/ViewportSelection/EditorTransformComponentSelection.h @@ -20,6 +20,7 @@ #include #include #include +#include #include #include #include @@ -160,6 +161,7 @@ namespace AzToolsFramework , private EditorManipulatorCommandUndoRedoRequestBus::Handler , private AZ::TransformNotificationBus::MultiHandler , private ViewportInteraction::ViewportSettingsNotificationBus::Handler + , private ReadOnlyEntityPublicNotificationBus::Handler { public: AZ_CLASS_ALLOCATOR_DECL @@ -297,6 +299,9 @@ namespace AzToolsFramework // ViewportSettingsNotificationBus overrides ... void OnGridSnappingChanged(bool enabled) override; + // ReadOnlyEntityPublicNotificationBus overrides ... + void OnReadOnlyEntityStatusChanged(const AZ::EntityId& entityId, bool readOnly) override; + // Helpers to safely interact with the TransformBus (requests). void SetEntityWorldTranslation(AZ::EntityId entityId, const AZ::Vector3& worldTranslation); void SetEntityLocalTranslation(AZ::EntityId entityId, const AZ::Vector3& localTranslation); @@ -308,7 +313,7 @@ namespace AzToolsFramework bool PerformGroupDitto(AZ::EntityId entityId); bool PerformIndividualDitto(AZ::EntityId entityId); void PerformManipulatorDitto(AZ::EntityId entityId); - void PerformSnapToTerrain(const ViewportInteraction::MouseInteractionEvent& mouseInteraction); + void PerformSnapToSurface(const ViewportInteraction::MouseInteractionEvent& mouseInteraction); //! Responsible for keeping the space cluster in sync with the current reference frame. void UpdateSpaceCluster(ReferenceFrame referenceFrame); @@ -317,7 +322,7 @@ namespace AzToolsFramework void SetAllViewportUiVisible(bool visible); AZ::EntityId m_hoveredEntityId; //!< What EntityId is the mouse currently hovering over (if any). - AZ::EntityId m_cachedEntityIdUnderCursor; //!< Store the EntityId on each mouse move for use in Display. + AZ::EntityId m_currentEntityIdUnderCursor; //!< Store the EntityId on each mouse move for use in Display. AZ::EntityId m_editorCameraComponentEntityId; //!< The EditorCameraComponent EntityId if it is set. EntityIdSet m_selectedEntityIds; //!< Represents the current entities in the selection. @@ -357,6 +362,23 @@ namespace AzToolsFramework bool m_viewportUiVisible = true; //!< Used to hide/show the viewport ui elements. }; + //! Bundles viewport state that impacts how accents are added/removed in HandleAccents. + struct HandleAccentsContext + { + bool m_hasSelectedEntities; + bool m_ctrlHeld; + bool m_usingBoxSelect; + bool m_usingStickySelect; + }; + + //! Updates whether accents (icon highlights) are added/removed for a given entity based on the cursor position. + void HandleAccents( + AZ::EntityId currentEntityIdUnderCursor, + AZ::EntityId& hoveredEntityIdUnderCursor, + const HandleAccentsContext& handleAccentsContext, + ViewportInteraction::MouseButtons mouseButtons, + const AZStd::function& setEntityAccentedFn); + //! The ETCS (EntityTransformComponentSelection) namespace contains functions and data used exclusively by //! the EditorTransformComponentSelection type. Functions in this namespace are exposed to facilitate testing //! and should not be used outside of EditorTransformComponentSelection or EditorTransformComponentSelectionTests. diff --git a/Code/Framework/AzToolsFramework/AzToolsFramework/ViewportSelection/EditorTransformComponentSelectionRequestBus.h b/Code/Framework/AzToolsFramework/AzToolsFramework/ViewportSelection/EditorTransformComponentSelectionRequestBus.h index 35f5b0ba99..7ae1db1073 100644 --- a/Code/Framework/AzToolsFramework/AzToolsFramework/ViewportSelection/EditorTransformComponentSelectionRequestBus.h +++ b/Code/Framework/AzToolsFramework/AzToolsFramework/ViewportSelection/EditorTransformComponentSelectionRequestBus.h @@ -32,6 +32,8 @@ namespace AzToolsFramework constexpr inline AZ::Crc32 EditReset = AZ_CRC_CE("com.o3de.action.editortransform.editreset"); constexpr inline AZ::Crc32 EditResetManipulator = AZ_CRC_CE("com.o3de.action.editortransform.editresetmanipulator"); constexpr inline AZ::Crc32 ViewportUiVisible = AZ_CRC_CE("com.o3de.action.editortransform.viewportuivisible"); + constexpr inline AZ::Crc32 Helpers = AZ_CRC_CE("com.o3de.action.editor.helpers"); + constexpr inline AZ::Crc32 Icons = AZ_CRC_CE("com.o3de.action.editor.icons"); //@} //! Provide interface for EditorTransformComponentSelection requests. diff --git a/Code/Framework/AzToolsFramework/AzToolsFramework/ViewportSelection/EditorVisibleEntityDataCache.cpp b/Code/Framework/AzToolsFramework/AzToolsFramework/ViewportSelection/EditorVisibleEntityDataCache.cpp index 328cfc3ae5..58c25b944c 100644 --- a/Code/Framework/AzToolsFramework/AzToolsFramework/ViewportSelection/EditorVisibleEntityDataCache.cpp +++ b/Code/Framework/AzToolsFramework/AzToolsFramework/ViewportSelection/EditorVisibleEntityDataCache.cpp @@ -293,12 +293,10 @@ namespace AzToolsFramework return m_impl->m_visibleEntityDatas[index].m_iconHidden; } - bool EditorVisibleEntityDataCache::IsVisibleEntitySelectableInViewport(size_t index) const + bool EditorVisibleEntityDataCache::IsVisibleEntityIndividuallySelectableInViewport(const size_t index) const { - return m_impl->m_visibleEntityDatas[index].m_visible - && !m_impl->m_visibleEntityDatas[index].m_locked - && m_impl->m_visibleEntityDatas[index].m_inFocus - && !m_impl->m_visibleEntityDatas[index].m_descendantOfClosedContainer; + return m_impl->m_visibleEntityDatas[index].m_visible && !m_impl->m_visibleEntityDatas[index].m_locked && + m_impl->m_visibleEntityDatas[index].m_inFocus && !m_impl->m_visibleEntityDatas[index].m_descendantOfClosedContainer; } AZStd::optional EditorVisibleEntityDataCache::GetVisibleEntityIndexFromId(const AZ::EntityId entityId) const diff --git a/Code/Framework/AzToolsFramework/AzToolsFramework/ViewportSelection/EditorVisibleEntityDataCache.h b/Code/Framework/AzToolsFramework/AzToolsFramework/ViewportSelection/EditorVisibleEntityDataCache.h index 16fa1b6d14..4262d334df 100644 --- a/Code/Framework/AzToolsFramework/AzToolsFramework/ViewportSelection/EditorVisibleEntityDataCache.h +++ b/Code/Framework/AzToolsFramework/AzToolsFramework/ViewportSelection/EditorVisibleEntityDataCache.h @@ -55,7 +55,10 @@ namespace AzToolsFramework bool IsVisibleEntityVisible(size_t index) const; bool IsVisibleEntitySelected(size_t index) const; bool IsVisibleEntityIconHidden(size_t index) const; - bool IsVisibleEntitySelectableInViewport(size_t index) const; + //! Returns true if the entity is individually selectable (none of its ancestors are a closed container entity). + //! @note It may still be desirable to be able to 'click' an entity that is a descendant of a closed container + //! to select the container itself, not the individual entity. + bool IsVisibleEntityIndividuallySelectableInViewport(size_t index) const; AZStd::optional GetVisibleEntityIndexFromId(AZ::EntityId entityId) const; diff --git a/Code/Framework/AzToolsFramework/AzToolsFramework/ViewportSelection/InvalidClicks.h b/Code/Framework/AzToolsFramework/AzToolsFramework/ViewportSelection/InvalidClicks.h index fe54b5379b..9f89b92948 100644 --- a/Code/Framework/AzToolsFramework/AzToolsFramework/ViewportSelection/InvalidClicks.h +++ b/Code/Framework/AzToolsFramework/AzToolsFramework/ViewportSelection/InvalidClicks.h @@ -9,6 +9,7 @@ #pragma once #include +#include #include namespace AzFramework diff --git a/Code/Framework/AzToolsFramework/AzToolsFramework/ViewportUi/ViewportUiCluster.cpp b/Code/Framework/AzToolsFramework/AzToolsFramework/ViewportUi/ViewportUiCluster.cpp index bc299f9985..365ba237db 100644 --- a/Code/Framework/AzToolsFramework/AzToolsFramework/ViewportUi/ViewportUiCluster.cpp +++ b/Code/Framework/AzToolsFramework/AzToolsFramework/ViewportUi/ViewportUiCluster.cpp @@ -62,9 +62,6 @@ namespace AzToolsFramework::ViewportUi::Internal return; } - // set hover to true by default - action->setProperty("IconHasHoverEffect", true); - // add the action addAction(action); diff --git a/Code/Framework/AzToolsFramework/AzToolsFramework/ViewportUi/ViewportUiDisplay.cpp b/Code/Framework/AzToolsFramework/AzToolsFramework/ViewportUi/ViewportUiDisplay.cpp index 0f79e3535d..c1bddbe3c3 100644 --- a/Code/Framework/AzToolsFramework/AzToolsFramework/ViewportUi/ViewportUiDisplay.cpp +++ b/Code/Framework/AzToolsFramework/AzToolsFramework/ViewportUi/ViewportUiDisplay.cpp @@ -12,6 +12,7 @@ #include #include #include +#include #include #include #include @@ -19,8 +20,9 @@ namespace AzToolsFramework::ViewportUi::Internal { const static int HighlightBorderSize = 5; - const static int TopHighlightBorderSize = 25; - const static char* HighlightBorderColor = "#4A90E2"; + const static char* const HighlightBorderColor = "#4A90E2"; + const static int HighlightBorderBackButtonIconSize = 20; + const static char* const HighlightBorderBackButtonIconFile = "X_axis.svg"; static void UnparentWidgets(ViewportUiElementIdInfoLookup& viewportUiElementIdInfoLookup) { @@ -61,7 +63,8 @@ namespace AzToolsFramework::ViewportUi::Internal , m_uiOverlay(parent) , m_fullScreenLayout(&m_uiOverlay) , m_uiOverlayLayout() - , m_componentModeBorderText(&m_uiOverlay) + , m_viewportBorderText(&m_uiOverlay) + , m_viewportBorderBackButton(&m_uiOverlay) { } @@ -221,11 +224,11 @@ namespace AzToolsFramework::ViewportUi::Internal AZStd::shared_ptr ViewportUiDisplay::GetViewportUiElement(ViewportUiElementId elementId) { - auto element = m_viewportUiElements.find(elementId); - if (element != m_viewportUiElements.end()) + if (auto element = m_viewportUiElements.find(elementId); element != m_viewportUiElements.end()) { return element->second.m_widget; } + return nullptr; } @@ -254,7 +257,7 @@ namespace AzToolsFramework::ViewportUi::Internal auto viewportUiMapElement = m_viewportUiElements.find(elementId); if (viewportUiMapElement != m_viewportUiElements.end()) { - viewportUiMapElement->second.m_widget->setVisible(false); + viewportUiMapElement->second.m_widget->hide(); viewportUiMapElement->second.m_widget->setParent(nullptr); m_viewportUiElements.erase(viewportUiMapElement); } @@ -269,7 +272,7 @@ namespace AzToolsFramework::ViewportUi::Internal { if (ViewportUiElementInfo element = GetViewportUiElementInfo(elementId); element.m_widget) { - element.m_widget->setVisible(true); + element.m_widget->show(); } } @@ -277,7 +280,7 @@ namespace AzToolsFramework::ViewportUi::Internal { if (ViewportUiElementInfo element = GetViewportUiElementInfo(elementId); element.m_widget) { - element.m_widget->setVisible(false); + element.m_widget->hide(); } } @@ -287,28 +290,38 @@ namespace AzToolsFramework::ViewportUi::Internal { return element.IsValid() && element.m_widget->isVisible(); } + return false; } - void ViewportUiDisplay::CreateViewportBorder(const AZStd::string& borderTitle) + void ViewportUiDisplay::CreateViewportBorder( + const AZStd::string& borderTitle, AZStd::optional backButtonCallback) { - const AZStd::string styleSheet = AZStd::string::format( - "border: %dpx solid %s; border-top: %dpx solid %s;", HighlightBorderSize, HighlightBorderColor, TopHighlightBorderSize, - HighlightBorderColor); - m_uiOverlay.setStyleSheet(styleSheet.c_str()); + m_uiOverlay.setStyleSheet(QString("border: %1px solid %2; border-top: %3px solid %4;") + .arg( + QString::number(HighlightBorderSize), HighlightBorderColor, + QString::number(ViewportUiTopBorderSize), HighlightBorderColor)); m_uiOverlayLayout.setContentsMargins( - HighlightBorderSize + ViewportUiOverlayMargin, TopHighlightBorderSize + ViewportUiOverlayMargin, + HighlightBorderSize + ViewportUiOverlayMargin, ViewportUiTopBorderSize + ViewportUiOverlayMargin, HighlightBorderSize + ViewportUiOverlayMargin, HighlightBorderSize + ViewportUiOverlayMargin); - m_componentModeBorderText.setVisible(true); - m_componentModeBorderText.setText(borderTitle.c_str()); + m_viewportBorderText.show(); + m_viewportBorderText.setText(borderTitle.c_str()); UpdateUiOverlayGeometry(); + + // only display the back button if a callback was provided + m_viewportBorderBackButtonCallback = backButtonCallback; + m_viewportBorderBackButton.setVisible(m_viewportBorderBackButtonCallback.has_value()); } void ViewportUiDisplay::RemoveViewportBorder() { - m_componentModeBorderText.setVisible(false); + m_viewportBorderText.hide(); m_uiOverlay.setStyleSheet("border: none;"); - m_uiOverlayLayout.setMargin(ViewportUiOverlayMargin); + m_uiOverlayLayout.setContentsMargins( + ViewportUiOverlayMargin, ViewportUiOverlayMargin + ViewportUiOverlayTopMarginPadding, ViewportUiOverlayMargin, + ViewportUiOverlayMargin); + m_viewportBorderBackButtonCallback.reset(); + m_viewportBorderBackButton.hide(); } void ViewportUiDisplay::PositionViewportUiElementFromWorldSpace(ViewportUiElementId elementId, const AZ::Vector3& pos) @@ -347,23 +360,46 @@ namespace AzToolsFramework::ViewportUi::Internal { m_uiMainWindow.setObjectName(QString("ViewportUiWindow")); ConfigureWindowForViewportUi(&m_uiMainWindow); - m_uiMainWindow.setVisible(false); + m_uiMainWindow.hide(); m_uiOverlay.setObjectName(QString("ViewportUiOverlay")); m_uiMainWindow.setCentralWidget(&m_uiOverlay); - m_uiOverlay.setVisible(false); + m_uiOverlay.hide(); // remove any spacing and margins from the UI Overlay Layout m_fullScreenLayout.setSpacing(0); m_fullScreenLayout.setContentsMargins(0, 0, 0, 0); m_fullScreenLayout.addLayout(&m_uiOverlayLayout, 0, 0, 1, 1); - // format the label which will appear on top of the highlight border - AZStd::string styleSheet = AZStd::string::format("background-color: %s; border: none;", HighlightBorderColor); - m_componentModeBorderText.setStyleSheet(styleSheet.c_str()); - m_componentModeBorderText.setFixedHeight(TopHighlightBorderSize); - m_componentModeBorderText.setVisible(false); - m_fullScreenLayout.addWidget(&m_componentModeBorderText, 0, 0, Qt::AlignTop | Qt::AlignHCenter); + // style the label which will appear on top of the highlight border + m_viewportBorderText.setStyleSheet(QString("background-color: %1; border: none").arg(HighlightBorderColor)); + m_viewportBorderText.setFixedHeight(ViewportUiTopBorderSize); + m_viewportBorderText.hide(); + m_fullScreenLayout.addWidget(&m_viewportBorderText, 0, 0, Qt::AlignTop | Qt::AlignHCenter); + + m_viewportBorderBackButton.setAutoRaise(true); // hover highlight + m_viewportBorderBackButton.hide(); + + QIcon backButtonIcon(QString(":/stylesheet/img/UI20/toolbar/%1").arg(HighlightBorderBackButtonIconFile)); + m_viewportBorderBackButton.setIcon(backButtonIcon); + m_viewportBorderBackButton.setIconSize(QSize(HighlightBorderBackButtonIconSize, HighlightBorderBackButtonIconSize)); + + // setup the handler for the back button to call the user provided callback (if any) + QObject::connect( + &m_viewportBorderBackButton, &QToolButton::clicked, + [this] + { + if (m_viewportBorderBackButtonCallback.has_value()) + { + // we need to swap out the existing back button callback because it will be reset in RemoveViewportBorder() + // so preserve the lifetime with this temporary callback until after the call to RemoveViewportBorder() + AZStd::optional backButtonCallback; + m_viewportBorderBackButtonCallback.swap(backButtonCallback); + RemoveViewportBorder(); + (*backButtonCallback)(); + } + }); + m_fullScreenLayout.addWidget(&m_viewportBorderBackButton, 0, 0, Qt::AlignTop | Qt::AlignRight); } void ViewportUiDisplay::PrepareWidgetForViewportUi(QPointer widget) @@ -396,14 +432,14 @@ namespace AzToolsFramework::ViewportUi::Internal void ViewportUiDisplay::UpdateUiOverlayGeometry() { - // add the component mode border region if visible + // add the viewport border region if visible QRegion region; - if (m_componentModeBorderText.isVisible()) + if (m_viewportBorderText.isVisible()) { // get the border region by taking the entire region and subtracting the non-border area region += m_uiOverlay.rect(); region -= QRect( - QPoint(m_uiOverlay.rect().left() + HighlightBorderSize, m_uiOverlay.rect().top() + TopHighlightBorderSize), + QPoint(m_uiOverlay.rect().left() + HighlightBorderSize, m_uiOverlay.rect().top() + ViewportUiTopBorderSize), QPoint(m_uiOverlay.rect().right() - HighlightBorderSize, m_uiOverlay.rect().bottom() - HighlightBorderSize)); } @@ -411,16 +447,9 @@ namespace AzToolsFramework::ViewportUi::Internal region += m_uiOverlay.childrenRegion(); // set viewport ui visibility depending on if elements are present - if (region.isEmpty() || !UiDisplayEnabled()) - { - m_uiMainWindow.setVisible(false); - m_uiOverlay.setVisible(false); - } - else - { - m_uiMainWindow.setVisible(true); - m_uiOverlay.setVisible(true); - } + const bool visible = !region.isEmpty() && UiDisplayEnabled(); + m_uiMainWindow.setVisible(visible); + m_uiOverlay.setVisible(visible); m_uiMainWindow.setMask(region); } diff --git a/Code/Framework/AzToolsFramework/AzToolsFramework/ViewportUi/ViewportUiDisplay.h b/Code/Framework/AzToolsFramework/AzToolsFramework/ViewportUi/ViewportUiDisplay.h index 5020241815..dba0f25830 100644 --- a/Code/Framework/AzToolsFramework/AzToolsFramework/ViewportUi/ViewportUiDisplay.h +++ b/Code/Framework/AzToolsFramework/AzToolsFramework/ViewportUi/ViewportUiDisplay.h @@ -17,6 +17,7 @@ #include #include #include +#include AZ_PUSH_DISABLE_WARNING(4251, "-Wunknown-warning-option") #include @@ -89,7 +90,7 @@ namespace AzToolsFramework::ViewportUi::Internal AZStd::shared_ptr GetViewportUiElement(ViewportUiElementId elementId); bool IsViewportUiElementVisible(ViewportUiElementId elementId); - void CreateViewportBorder(const AZStd::string& borderTitle); + void CreateViewportBorder(const AZStd::string& borderTitle, AZStd::optional backButtonCallback); void RemoveViewportBorder(); private: @@ -113,7 +114,10 @@ namespace AzToolsFramework::ViewportUi::Internal QWidget m_uiOverlay; //!< The UI Overlay which displays Viewport UI Elements. QGridLayout m_fullScreenLayout; //!< The layout which extends across the full screen. ViewportUiDisplayLayout m_uiOverlayLayout; //!< The layout used for optionally anchoring Viewport UI Elements. - QLabel m_componentModeBorderText; //!< The text used for the Component Mode border. + QLabel m_viewportBorderText; //!< The text used for the viewport highlight border. + QToolButton m_viewportBorderBackButton; //!< The button to return from the viewport highlight border (only displayed if callback provided). + //! The optional callback for when the viewport highlight border back button is pressed. + AZStd::optional m_viewportBorderBackButtonCallback; QWidget* m_renderOverlay; QPointer m_fullScreenWidget; //!< Reference to the widget attached to m_fullScreenLayout if any. diff --git a/Code/Framework/AzToolsFramework/AzToolsFramework/ViewportUi/ViewportUiDisplayLayout.h b/Code/Framework/AzToolsFramework/AzToolsFramework/ViewportUi/ViewportUiDisplayLayout.h index 4a44f07491..335f664094 100644 --- a/Code/Framework/AzToolsFramework/AzToolsFramework/ViewportUi/ViewportUiDisplayLayout.h +++ b/Code/Framework/AzToolsFramework/AzToolsFramework/ViewportUi/ViewportUiDisplayLayout.h @@ -14,13 +14,20 @@ #include #include +namespace AzToolsFramework::ViewportUi +{ + //! Margin for the Viewport UI Overlay (in pixels) + constexpr int ViewportUiOverlayMargin = 5; + //! Padding to make space for ImGui (in pixels) + constexpr int ViewportUiOverlayTopMarginPadding = 20; + //! Size of the top viewport border (in pixels) + constexpr int ViewportUiTopBorderSize = 25; + //! Size of the left, right and bottom viewport border (in pixels) + constexpr int ViewportUiLeftRightBottomBorderSize = 5; +} // namespace AzToolsFramework::ViewportUi + namespace AzToolsFramework::ViewportUi::Internal { - // margin for the Viewport UI Overlay in pixels - constexpr int ViewportUiOverlayMargin = 5; - // padding to make space for ImGui - constexpr int ViewportUiOverlayTopMarginPadding = 20; - //! QGridLayout implementation that uses a grid of QVBox/QHBoxLayouts internally to stack widgets. class ViewportUiDisplayLayout : public QGridLayout { diff --git a/Code/Framework/AzToolsFramework/AzToolsFramework/ViewportUi/ViewportUiManager.cpp b/Code/Framework/AzToolsFramework/AzToolsFramework/ViewportUi/ViewportUiManager.cpp index 1f14b12b7d..143da34074 100644 --- a/Code/Framework/AzToolsFramework/AzToolsFramework/ViewportUi/ViewportUiManager.cpp +++ b/Code/Framework/AzToolsFramework/AzToolsFramework/ViewportUi/ViewportUiManager.cpp @@ -240,9 +240,10 @@ namespace AzToolsFramework::ViewportUi } } - void ViewportUiManager::CreateViewportBorder(const AZStd::string& borderTitle) + void ViewportUiManager::CreateViewportBorder( + const AZStd::string& borderTitle, AZStd::optional backButtonCallback) { - m_viewportUi->CreateViewportBorder(borderTitle); + m_viewportUi->CreateViewportBorder(borderTitle, backButtonCallback); } void ViewportUiManager::RemoveViewportBorder() diff --git a/Code/Framework/AzToolsFramework/AzToolsFramework/ViewportUi/ViewportUiManager.h b/Code/Framework/AzToolsFramework/AzToolsFramework/ViewportUi/ViewportUiManager.h index ce7e5aafe9..54f1eb5a57 100644 --- a/Code/Framework/AzToolsFramework/AzToolsFramework/ViewportUi/ViewportUiManager.h +++ b/Code/Framework/AzToolsFramework/AzToolsFramework/ViewportUi/ViewportUiManager.h @@ -50,7 +50,8 @@ namespace AzToolsFramework::ViewportUi void RegisterTextFieldCallback(TextFieldId textFieldId, AZ::Event::Handler& handler) override; void RemoveTextField(TextFieldId textFieldId) override; void SetTextFieldVisible(TextFieldId textFieldId, bool visible) override; - void CreateViewportBorder(const AZStd::string& borderTitle) override; + void CreateViewportBorder( + const AZStd::string& borderTitle, AZStd::optional backButtonCallback) override; void RemoveViewportBorder() override; void PressButton(ClusterId clusterId, ButtonId buttonId) override; void PressButton(SwitcherId switcherId, ButtonId buttonId) override; diff --git a/Code/Framework/AzToolsFramework/AzToolsFramework/ViewportUi/ViewportUiRequestBus.h b/Code/Framework/AzToolsFramework/AzToolsFramework/ViewportUi/ViewportUiRequestBus.h index 3c6f7094cb..9ac6feb8c8 100644 --- a/Code/Framework/AzToolsFramework/AzToolsFramework/ViewportUi/ViewportUiRequestBus.h +++ b/Code/Framework/AzToolsFramework/AzToolsFramework/ViewportUi/ViewportUiRequestBus.h @@ -22,6 +22,9 @@ namespace AzToolsFramework::ViewportUi using SwitcherId = IdType; using TextFieldId = IdType; + //! Callback function for viewport UI back button. + using ViewportUiBackButtonCallback = AZStd::function; + inline const ViewportUiElementId InvalidViewportUiElementId = ViewportUiElementId(0); inline const ButtonId InvalidButtonId = ButtonId(0); inline const ClusterId InvalidClusterId = ClusterId(0); @@ -95,9 +98,9 @@ namespace AzToolsFramework::ViewportUi virtual void RemoveTextField(TextFieldId textFieldId) = 0; //! Sets the visibility of the text field. virtual void SetTextFieldVisible(TextFieldId textFieldId, bool visible) = 0; - //! Create the highlight border for Component Mode. - virtual void CreateViewportBorder(const AZStd::string& borderTitle) = 0; - //! Remove the highlight border for Component Mode. + //! Create the highlight border with optional back button to exit the given editor mode. + virtual void CreateViewportBorder(const AZStd::string& borderTitle, AZStd::optional backButtonCallback) = 0; + //! Remove the highlight border. virtual void RemoveViewportBorder() = 0; //! Invoke a button press on a cluster. virtual void PressButton(ClusterId clusterId, ButtonId buttonId) = 0; diff --git a/Code/Framework/AzToolsFramework/AzToolsFramework/ViewportUi/ViewportUiSwitcher.cpp b/Code/Framework/AzToolsFramework/AzToolsFramework/ViewportUi/ViewportUiSwitcher.cpp index 6b8b1873f7..c4be11ac66 100644 --- a/Code/Framework/AzToolsFramework/AzToolsFramework/ViewportUi/ViewportUiSwitcher.cpp +++ b/Code/Framework/AzToolsFramework/AzToolsFramework/ViewportUi/ViewportUiSwitcher.cpp @@ -22,8 +22,6 @@ namespace AzToolsFramework::ViewportUi::Internal // Add am empty active button (is set in the call to SetActiveMode) m_activeButton = new QToolButton(); - // No hover effect for the main button as it's not clickable - m_activeButton->setProperty("IconHasHoverEffect", false); m_activeButton->setCheckable(false); m_activeButton->setToolButtonStyle(Qt::ToolButtonTextBesideIcon); addWidget(m_activeButton); @@ -56,9 +54,6 @@ namespace AzToolsFramework::ViewportUi::Internal return; } - // set hover to true by default - action->setProperty("IconHasHoverEffect", true); - // add the action addAction(action); diff --git a/Code/Framework/AzToolsFramework/AzToolsFramework/aztoolsframework_files.cmake b/Code/Framework/AzToolsFramework/AzToolsFramework/aztoolsframework_files.cmake index 286ef97418..05c07afecd 100644 --- a/Code/Framework/AzToolsFramework/AzToolsFramework/aztoolsframework_files.cmake +++ b/Code/Framework/AzToolsFramework/AzToolsFramework/aztoolsframework_files.cmake @@ -47,6 +47,7 @@ set(FILES API/EntityCompositionRequestBus.h API/EntityCompositionNotificationBus.h API/EditorViewportIconDisplayInterface.h + API/PythonLoader.h API/ViewPaneOptions.h API/ViewportEditorModeTrackerInterface.h Application/Ticker.h @@ -147,6 +148,8 @@ set(FILES Entity/EditorEntitySortBus.h Entity/EditorEntitySortComponent.cpp Entity/EditorEntitySortComponent.h + Entity/EditorEntitySortComponentSerializer.cpp + Entity/EditorEntitySortComponentSerializer.h Entity/EditorEntityTransformBus.h Entity/PrefabEditorEntityOwnershipInterface.h Entity/PrefabEditorEntityOwnershipService.h @@ -156,6 +159,10 @@ set(FILES Entity/SliceEditorEntityOwnershipServiceBus.h Entity/EntityUtilityComponent.h Entity/EntityUtilityComponent.cpp + Entity/ReadOnly/ReadOnlyEntityInterface.h + Entity/ReadOnly/ReadOnlyEntityBus.h + Entity/ReadOnly/ReadOnlyEntitySystemComponent.cpp + Entity/ReadOnly/ReadOnlyEntitySystemComponent.h Fingerprinting/TypeFingerprinter.h Fingerprinting/TypeFingerprinter.cpp FocusMode/FocusModeInterface.h @@ -499,6 +506,8 @@ set(FILES Viewport/ViewportMessages.cpp Viewport/ViewportTypes.h Viewport/ViewportTypes.cpp + Viewport/ViewportSettings.h + Viewport/ViewportSettings.cpp ViewportUi/Button.h ViewportUi/Button.cpp ViewportUi/ButtonGroup.h @@ -661,6 +670,9 @@ set(FILES Prefab/PrefabSystemComponent.h Prefab/PrefabSystemComponent.cpp Prefab/PrefabSystemComponentInterface.h + Prefab/ProceduralPrefabSystemComponent.h + Prefab/ProceduralPrefabSystemComponent.cpp + Prefab/ProceduralPrefabSystemComponentInterface.h Prefab/PrefabSystemScriptingBus.h Prefab/PrefabSystemScriptingHandler.h Prefab/PrefabSystemScriptingHandler.cpp @@ -711,10 +723,17 @@ set(FILES Prefab/Spawnable/EditorOnlyEntityHandler/UiEditorOnlyEntityHandler.cpp Prefab/Spawnable/EditorOnlyEntityHandler/WorldEditorOnlyEntityHandler.h Prefab/Spawnable/EditorOnlyEntityHandler/WorldEditorOnlyEntityHandler.cpp + Prefab/Spawnable/EntityAliasTypes.h + Prefab/Spawnable/InMemorySpawnableAssetContainer.h + Prefab/Spawnable/InMemorySpawnableAssetContainer.cpp Prefab/Spawnable/PrefabCatchmentProcessor.h Prefab/Spawnable/PrefabCatchmentProcessor.cpp Prefab/Spawnable/PrefabConversionPipeline.h Prefab/Spawnable/PrefabConversionPipeline.cpp + Prefab/Spawnable/PrefabConverterStackProfileNames.h + Prefab/Spawnable/PrefabDocument.h + Prefab/Spawnable/PrefabDocument.inl + Prefab/Spawnable/PrefabDocument.cpp Prefab/Spawnable/ProcesedObjectStore.h Prefab/Spawnable/ProcesedObjectStore.cpp Prefab/Spawnable/PrefabProcessor.h @@ -759,6 +778,10 @@ set(FILES UI/Prefab/PrefabUiHandler.cpp UI/Prefab/PrefabViewportFocusPathHandler.h UI/Prefab/PrefabViewportFocusPathHandler.cpp + UI/Prefab/Procedural/ProceduralPrefabReadOnlyHandler.h + UI/Prefab/Procedural/ProceduralPrefabReadOnlyHandler.cpp + UI/Prefab/Procedural/ProceduralPrefabUiHandler.h + UI/Prefab/Procedural/ProceduralPrefabUiHandler.cpp UI/Notifications/ToastNotificationsView.cpp UI/Notifications/ToastNotificationsView.h UI/Notifications/ToastBus.h @@ -768,8 +791,8 @@ set(FILES PythonTerminal/ScriptTermDialog.cpp PythonTerminal/ScriptTermDialog.h PythonTerminal/ScriptTermDialog.ui - Input/QtEventToAzInputManager.h - Input/QtEventToAzInputManager.cpp + Input/QtEventToAzInputMapper.h + Input/QtEventToAzInputMapper.cpp Script/LuaSymbolsReporterBus.h Script/LuaSymbolsReporterSystemComponent.h Script/LuaSymbolsReporterSystemComponent.cpp diff --git a/Code/Framework/AzToolsFramework/Platform/Common/Default/AzToolsFramework/API/PythonLoader_Default.cpp b/Code/Framework/AzToolsFramework/Platform/Common/Default/AzToolsFramework/API/PythonLoader_Default.cpp new file mode 100644 index 0000000000..42fef21db6 --- /dev/null +++ b/Code/Framework/AzToolsFramework/Platform/Common/Default/AzToolsFramework/API/PythonLoader_Default.cpp @@ -0,0 +1,20 @@ +/* +* Copyright (c) Contributors to the Open 3D Engine Project. +* For complete copyright and license terms please see the LICENSE at the root of this distribution. +* +* SPDX-License-Identifier: Apache-2.0 OR MIT +* +*/ + +#include + +namespace AzToolsFramework::EmbeddedPython +{ + PythonLoader::PythonLoader() + { + } + + PythonLoader::~PythonLoader() + { + } +} diff --git a/Code/Framework/AzToolsFramework/Platform/Linux/AzToolsFramework/API/PythonLoader_Linux.cpp b/Code/Framework/AzToolsFramework/Platform/Linux/AzToolsFramework/API/PythonLoader_Linux.cpp new file mode 100644 index 0000000000..351cf69c15 --- /dev/null +++ b/Code/Framework/AzToolsFramework/Platform/Linux/AzToolsFramework/API/PythonLoader_Linux.cpp @@ -0,0 +1,34 @@ +/* + * Copyright (c) Contributors to the Open 3D Engine Project. + * For complete copyright and license terms please see the LICENSE at the root of this distribution. + * + * SPDX-License-Identifier: Apache-2.0 OR MIT + * + */ + +#include +#include +#include + +namespace AzToolsFramework::EmbeddedPython +{ + PythonLoader::PythonLoader() + { + constexpr char libPythonName[] = "libpython3.7m.so.1.0"; + m_embeddedLibPythonHandle = dlopen(libPythonName, RTLD_NOW | RTLD_GLOBAL); + if (m_embeddedLibPythonHandle == nullptr) + { + [[maybe_unused]] const char* err = dlerror(); + AZ_Error("PythonLoader", false, "Failed to load %s with error: %s\n", libPythonName, err ? err : "Unknown Error"); + } + } + + PythonLoader::~PythonLoader() + { + if (m_embeddedLibPythonHandle) + { + dlclose(m_embeddedLibPythonHandle); + } + } + +} // namespace AzToolsFramework::EmbeddedPython diff --git a/Code/Framework/AzToolsFramework/Platform/Linux/platform_linux_files.cmake b/Code/Framework/AzToolsFramework/Platform/Linux/platform_linux_files.cmake index c2c5a11c4c..3b04a903a4 100644 --- a/Code/Framework/AzToolsFramework/Platform/Linux/platform_linux_files.cmake +++ b/Code/Framework/AzToolsFramework/Platform/Linux/platform_linux_files.cmake @@ -7,4 +7,5 @@ # set(FILES + AzToolsFramework/API/PythonLoader_Linux.cpp ) diff --git a/Code/Framework/AzToolsFramework/Platform/Mac/platform_mac_files.cmake b/Code/Framework/AzToolsFramework/Platform/Mac/platform_mac_files.cmake index c2c5a11c4c..6342747a38 100644 --- a/Code/Framework/AzToolsFramework/Platform/Mac/platform_mac_files.cmake +++ b/Code/Framework/AzToolsFramework/Platform/Mac/platform_mac_files.cmake @@ -7,4 +7,5 @@ # set(FILES + ../Common/Default/AzToolsFramework/API/PythonLoader_Default.cpp ) diff --git a/Code/Framework/AzToolsFramework/Platform/Windows/platform_windows_files.cmake b/Code/Framework/AzToolsFramework/Platform/Windows/platform_windows_files.cmake index c2c5a11c4c..6342747a38 100644 --- a/Code/Framework/AzToolsFramework/Platform/Windows/platform_windows_files.cmake +++ b/Code/Framework/AzToolsFramework/Platform/Windows/platform_windows_files.cmake @@ -7,4 +7,5 @@ # set(FILES + ../Common/Default/AzToolsFramework/API/PythonLoader_Default.cpp ) diff --git a/Code/Framework/AzToolsFramework/Tests/ArchiveTests.cpp b/Code/Framework/AzToolsFramework/Tests/ArchiveTests.cpp index 395e4c9049..2eb7b835ad 100644 --- a/Code/Framework/AzToolsFramework/Tests/ArchiveTests.cpp +++ b/Code/Framework/AzToolsFramework/Tests/ArchiveTests.cpp @@ -69,12 +69,12 @@ namespace UnitTest QString GetArchiveFolderName() { - return "Archive"; + return "archive"; } QString GetExtractFolderName() { - return "Extracted"; + return "extracted"; } void CreateArchiveFolder(QString archiveFolderName, QStringList fileList) @@ -90,7 +90,7 @@ namespace UnitTest QString CreateArchiveListTextFile() { - QString listFilePath = QDir(m_tempDir.GetDirectory()).absoluteFilePath("FileList.txt"); + QString listFilePath = QDir(m_tempDir.GetDirectory()).absoluteFilePath("filelist.txt"); QString textContent = CreateArchiveFileList().join("\n"); EXPECT_TRUE(CreateDummyFile(listFilePath, textContent)); return listFilePath; @@ -151,11 +151,7 @@ namespace UnitTest UnitTest::ScopedTemporaryDirectory m_tempDir; }; -#if AZ_TRAIT_DISABLE_FAILED_ARCHIVE_TESTS - TEST_F(ArchiveComponentTest, DISABLED_CreateArchive_FilesAtThreeDepths_ArchiveCreated) -#else TEST_F(ArchiveComponentTest, CreateArchive_FilesAtThreeDepths_ArchiveCreated) -#endif // AZ_TRAIT_DISABLE_FAILED_ARCHIVE_TESTS { EXPECT_TRUE(m_tempDir.IsValid()); CreateArchiveFolder(); @@ -167,11 +163,7 @@ namespace UnitTest EXPECT_TRUE(createResult); } -#if AZ_TRAIT_DISABLE_FAILED_ARCHIVE_TESTS - TEST_F(ArchiveComponentTest, DISABLED_ListFilesInArchive_FilesAtThreeDepths_FilesFound) -#else TEST_F(ArchiveComponentTest, ListFilesInArchive_FilesAtThreeDepths_FilesFound) -#endif // AZ_TRAIT_DISABLE_FAILED_ARCHIVE_TESTS { EXPECT_TRUE(m_tempDir.IsValid()); CreateArchiveFolder(); @@ -190,11 +182,7 @@ namespace UnitTest EXPECT_EQ(fileList.size(), 6); } -#if AZ_TRAIT_DISABLE_FAILED_ARCHIVE_TESTS - TEST_F(ArchiveComponentTest, DISABLED_CreateDeltaCatalog_AssetsNotRegistered_Failure) -#else TEST_F(ArchiveComponentTest, CreateDeltaCatalog_AssetsNotRegistered_Failure) -#endif // AZ_TRAIT_DISABLE_FAILED_ARCHIVE_TESTS { QStringList fileList = CreateArchiveFileList(); @@ -213,11 +201,7 @@ namespace UnitTest EXPECT_EQ(catalogCreated, false); } -#if AZ_TRAIT_DISABLE_FAILED_ARCHIVE_TESTS - TEST_F(ArchiveComponentTest, DISABLED_AddFilesToArchive_FromListFile_Success) -#else TEST_F(ArchiveComponentTest, AddFilesToArchive_FromListFile_Success) -#endif // AZ_TRAIT_DISABLE_FAILED_ARCHIVE_TESTS { QString listFile = CreateArchiveListTextFile(); CreateArchiveFolder(GetArchiveFolderName(), CreateArchiveFileList()); @@ -233,11 +217,7 @@ namespace UnitTest EXPECT_TRUE(result); } -#if AZ_TRAIT_DISABLE_FAILED_ARCHIVE_TESTS - TEST_F(ArchiveComponentTest, DISABLED_ExtractArchive_AllFiles_Success) -#else TEST_F(ArchiveComponentTest, ExtractArchive_AllFiles_Success) -#endif // AZ_TRAIT_DISABLE_FAILED_ARCHIVE_TESTS { CreateArchiveFolder(); AZ_TEST_START_TRACE_SUPPRESSION; @@ -264,11 +244,7 @@ namespace UnitTest } } -#if AZ_TRAIT_DISABLE_FAILED_ARCHIVE_TESTS - TEST_F(ArchiveComponentTest, DISABLED_CreateDeltaCatalog_ArchiveWithoutCatalogAssetsRegistered_Success) -#else TEST_F(ArchiveComponentTest, CreateDeltaCatalog_ArchiveWithoutCatalogAssetsRegistered_Success) -#endif // AZ_TRAIT_DISABLE_FAILED_ARCHIVE_TESTS { QStringList fileList = CreateArchiveFileList(); diff --git a/Code/Framework/AzToolsFramework/Tests/AssetFileInfoListComparison.cpp b/Code/Framework/AzToolsFramework/Tests/AssetFileInfoListComparison.cpp index ad80b5c39d..af0ae9addb 100644 --- a/Code/Framework/AzToolsFramework/Tests/AssetFileInfoListComparison.cpp +++ b/Code/Framework/AzToolsFramework/Tests/AssetFileInfoListComparison.cpp @@ -57,9 +57,7 @@ namespace UnitTest ArgumentContainer argContainer{ {} }; // Append Command Line override for the Project Cache Path - auto projectCachePathOverride = FixedValueString::format(R"(--project-cache-path="%s")", m_tempDir.GetDirectory()); - auto projectPathOverride = FixedValueString{ R"(--project-path=AutomatedTesting)" }; - argContainer.push_back(projectCachePathOverride.data()); + auto projectPathOverride = FixedValueString::format(R"(--project-path="%s")", m_tempDir.GetDirectory()); argContainer.push_back(projectPathOverride.data()); m_application = new ToolsTestApplication("AssetFileInfoListComparisonTest", aznumeric_caster(argContainer.size()), argContainer.data()); AzToolsFramework::AssetSeedManager assetSeedManager; @@ -100,7 +98,7 @@ namespace UnitTest m_application->Start(AzFramework::Application::Descriptor()); // Without this, the user settings component would attempt to save on finalize/shutdown. Since the file is - // shared across the whole engine, if multiple tests are run in parallel, the saving could cause a crash + // shared across the whole engine, if multiple tests are run in parallel, the saving could cause a crash // in the unit tests. AZ::UserSettingsComponentRequestBus::Broadcast(&AZ::UserSettingsComponentRequests::DisableSaveOnFinalize); @@ -223,7 +221,7 @@ namespace UnitTest // AssetFileInfo should contain {2*, 4*, 5} AzToolsFramework::AssetFileInfoList assetFileInfoList; - + ASSERT_TRUE(AZ::Utils::LoadObjectFromFileInPlace(TempFiles[FileIndex::ResultAssetFileInfoList], assetFileInfoList)) << "Unable to read the asset file info list.\n"; EXPECT_EQ(assetFileInfoList.m_fileInfoList.size(), 3); @@ -256,7 +254,7 @@ namespace UnitTest } } - // Verifying that correct assetId are present in the assetFileInfo list + // Verifying that correct assetId are present in the assetFileInfo list AZStd::unordered_set expectedAssetIds{ m_assets[2], m_assets[4], m_assets[5] }; for (const AzToolsFramework::AssetFileInfo& assetFileInfo : assetFileInfoList.m_fileInfoList) @@ -298,7 +296,7 @@ namespace UnitTest { firstAssetIdToAssetFileInfoMap[assetFileInfo.m_assetId] = AZStd::move(assetFileInfo); } - + AzToolsFramework::AssetFileInfoList secondAssetFileInfoList; ASSERT_TRUE(AZ::Utils::LoadObjectFromFileInPlace(TempFiles[FileIndex::SecondAssetFileInfoList], secondAssetFileInfoList)) << "Unable to read the asset file info list.\n"; @@ -315,7 +313,7 @@ namespace UnitTest auto foundSecond = secondAssetIdToAssetFileInfoMap.find(assetFileInfo.m_assetId); if (foundSecond != secondAssetIdToAssetFileInfoMap.end()) { - // Even if the asset Id is present in both the AssetFileInfo List, it should match the file hash from the second AssetFileInfo list + // Even if the asset Id is present in both the AssetFileInfo List, it should match the file hash from the second AssetFileInfo list for (int idx = 0; idx < AzToolsFramework::AssetFileInfo::s_arraySize; idx++) { if (foundSecond->second.m_hash[idx] != assetFileInfo.m_hash[idx]) @@ -343,7 +341,7 @@ namespace UnitTest } } - // Verifying that correct assetId are present in the assetFileInfo list + // Verifying that correct assetId are present in the assetFileInfo list AZStd::unordered_set expectedAssetIds{ m_assets[0], m_assets[1], m_assets[2], m_assets[3], m_assets[4], m_assets[5] }; for (const AzToolsFramework::AssetFileInfo& assetFileInfo : assetFileInfoList.m_fileInfoList) @@ -403,7 +401,7 @@ namespace UnitTest } } - // Verifying that correct assetId are present in the assetFileInfo list + // Verifying that correct assetId are present in the assetFileInfo list AZStd::unordered_set expectedAssetIds{ m_assets[1], m_assets[2], m_assets[3], m_assets[4] }; for (const AzToolsFramework::AssetFileInfo& assetFileInfo : assetFileInfoList.m_fileInfoList) @@ -462,7 +460,7 @@ namespace UnitTest } } - // Verifying that correct assetId are present in the assetFileInfo list + // Verifying that correct assetId are present in the assetFileInfo list AZStd::unordered_set expectedAssetIds{ m_assets[5] }; for (const AzToolsFramework::AssetFileInfo& assetFileInfo : assetFileInfoList.m_fileInfoList) @@ -493,7 +491,7 @@ namespace UnitTest EXPECT_EQ(assetFileInfoList.m_fileInfoList.size(), 5); - // Verifying that correct assetId are present in the assetFileInfo list + // Verifying that correct assetId are present in the assetFileInfo list AZStd::unordered_set expectedAssetIds{ m_assets[0], m_assets[1], m_assets[2], m_assets[3], m_assets[4] }; for (const AzToolsFramework::AssetFileInfo& assetFileInfo : assetFileInfoList.m_fileInfoList) @@ -601,7 +599,7 @@ namespace UnitTest } } - // Verifying that correct assetId are present in the assetFileInfo list + // Verifying that correct assetId are present in the assetFileInfo list AZStd::unordered_set expectedAssetIds{ m_assets[2] }; for (const AzToolsFramework::AssetFileInfo& assetFileInfo : assetFileInfoList.m_fileInfoList) @@ -625,12 +623,12 @@ namespace UnitTest AssetFileInfoListComparison::ComparisonData filePatternComparisonData(AssetFileInfoListComparison::ComparisonType::FilePattern,"$1", "Asset[0-3].txt", AssetFileInfoListComparison::FilePatternType::Regex); filePatternComparisonData.m_firstInput = TempFiles[FileIndex::FirstAssetFileInfoList]; assetFileInfoListComparison.AddComparisonStep(filePatternComparisonData); - + AzToolsFramework::AssetFileInfoListComparison::ComparisonData deltaComparisonData(AzToolsFramework::AssetFileInfoListComparison::ComparisonType::Delta, TempFiles[FileIndex::ResultAssetFileInfoList]); deltaComparisonData.m_firstInput = "$1"; deltaComparisonData.m_secondInput = TempFiles[FileIndex::SecondAssetFileInfoList]; assetFileInfoListComparison.AddComparisonStep(deltaComparisonData); - + ASSERT_TRUE(assetFileInfoListComparison.CompareAndSaveResults().IsSuccess()) << "Multiple Comparison Operation( FilePattern + Delta ) failed.\n"; // Output of the FilePattern Operation should be {0,1,2,3} // Output of the Delta Operation should be {2*,4*,5} @@ -666,7 +664,7 @@ namespace UnitTest } } - // Verifying that correct assetId are present in the assetFileInfo list + // Verifying that correct assetId are present in the assetFileInfo list AZStd::unordered_set expectedAssetIds{ m_assets[2], m_assets[4], m_assets[5] }; for (const AzToolsFramework::AssetFileInfo& assetFileInfo : assetFileInfoList.m_fileInfoList) @@ -738,7 +736,7 @@ namespace UnitTest } } - // Verifying that correct assetId are present in the assetFileInfo list + // Verifying that correct assetId are present in the assetFileInfo list AZStd::unordered_set expectedAssetIds{ m_assets[4], m_assets[5] }; for (const AzToolsFramework::AssetFileInfo& assetFileInfo : assetFileInfoList.m_fileInfoList) diff --git a/Code/Framework/AzToolsFramework/Tests/AssetSeedManager.cpp b/Code/Framework/AzToolsFramework/Tests/AssetSeedManager.cpp index 827737f561..f04a0642d1 100644 --- a/Code/Framework/AzToolsFramework/Tests/AssetSeedManager.cpp +++ b/Code/Framework/AzToolsFramework/Tests/AssetSeedManager.cpp @@ -63,10 +63,8 @@ namespace UnitTest ArgumentContainer argContainer{ {} }; // Append Command Line override for the Project Cache Path - AZ::IO::Path cacheProjectRootFolder{ m_tempDir.GetDirectory() }; - auto projectCachePathOverride = FixedValueString::format(R"(--project-cache-path="%s")", cacheProjectRootFolder.c_str()); - auto projectPathOverride = FixedValueString{ R"(--project-path=AutomatedTesting)" }; - argContainer.push_back(projectCachePathOverride.data()); + auto cacheProjectRootFolder = AZ::IO::Path{ m_tempDir.GetDirectory() } / "Cache"; + auto projectPathOverride = FixedValueString::format(R"(--project-path="%s")", m_tempDir.GetDirectory()); argContainer.push_back(projectPathOverride.data()); m_application = new ToolsTestApplication("AssetSeedManagerTest", aznumeric_caster(argContainer.size()), argContainer.data()); m_assetSeedManager = new AzToolsFramework::AssetSeedManager(); diff --git a/Code/Framework/AzToolsFramework/Tests/AzToolsFrameworkTestHelpersTest.cpp b/Code/Framework/AzToolsFramework/Tests/AzToolsFrameworkTestHelpersTest.cpp new file mode 100644 index 0000000000..2a1254f2e9 --- /dev/null +++ b/Code/Framework/AzToolsFramework/Tests/AzToolsFrameworkTestHelpersTest.cpp @@ -0,0 +1,88 @@ +/* + * Copyright (c) Contributors to the Open 3D Engine Project. + * For complete copyright and license terms please see the LICENSE at the root of this distribution. + * + * SPDX-License-Identifier: Apache-2.0 OR MIT + * + */ + +#include + +#include +#include + +namespace UnitTest +{ + class AzToolsFrameworkTestHelpersFixture : public AllocatorsTestFixture + { + public: + void SetUp() override + { + AllocatorsTestFixture::SetUp(); + + m_rootWidget = AZStd::make_unique(); + m_rootWidget->setFixedSize(0, 0); + m_rootWidget->setMouseTracking(true); + m_rootWidget->move(0, 0); // explicitly set the widget to be in the upper left corner + + m_mouseMoveDetector = AZStd::make_unique(); + m_rootWidget->installEventFilter(m_mouseMoveDetector.get()); + } + + void TearDown() override + { + m_rootWidget->removeEventFilter(m_mouseMoveDetector.get()); + m_rootWidget.reset(); + m_mouseMoveDetector.reset(); + + AllocatorsTestFixture::TearDown(); + } + + AZStd::unique_ptr m_rootWidget; + AZStd::unique_ptr m_mouseMoveDetector; + }; + + struct MouseMoveParams + { + QSize m_widgetSize; + QPoint m_widgetPosition; + QPoint m_localCursorPosition; + QPoint m_cursorDelta; + }; + + class MouseMoveAzToolsFrameworkTestHelperFixture + : public AzToolsFrameworkTestHelpersFixture + , public ::testing::WithParamInterface + { + }; + + TEST_P(MouseMoveAzToolsFrameworkTestHelperFixture, MouseMoveCorrectlyTransformsCursorPositionInGlobalAndLocalSpace) + { + // given + const MouseMoveParams mouseMoveParams = GetParam(); + m_rootWidget->move(mouseMoveParams.m_widgetPosition); + m_rootWidget->setFixedSize(mouseMoveParams.m_widgetSize); + + // when + MouseMove(m_rootWidget.get(), mouseMoveParams.m_localCursorPosition, mouseMoveParams.m_cursorDelta); + + // then + const QPoint mouseLocalPosition = m_mouseMoveDetector->m_mouseLocalPosition; + const QPoint mouseLocalPositionFromGlobal = m_rootWidget->mapFromGlobal(m_mouseMoveDetector->m_mouseGlobalPosition); + const QPoint expectedPosition = mouseMoveParams.m_localCursorPosition + mouseMoveParams.m_cursorDelta; + + using ::testing::Eq; + EXPECT_THAT(mouseLocalPosition.x(), Eq(expectedPosition.x())); + EXPECT_THAT(mouseLocalPosition.y(), Eq(expectedPosition.y())); + EXPECT_THAT(mouseLocalPositionFromGlobal.x(), Eq(expectedPosition.x())); + EXPECT_THAT(mouseLocalPositionFromGlobal.y(), Eq(expectedPosition.y())); + } + + INSTANTIATE_TEST_CASE_P( + All, + MouseMoveAzToolsFrameworkTestHelperFixture, + testing::Values( + MouseMoveParams{ QSize(100, 100), QPoint(0, 0), QPoint(0, 0), QPoint(10, 10) }, + MouseMoveParams{ QSize(100, 100), QPoint(100, 100), QPoint(0, 0), QPoint(10, 10) }, + MouseMoveParams{ QSize(100, 100), QPoint(20, 20), QPoint(50, 50), QPoint(20, 20) })); +} // namespace UnitTest diff --git a/Code/Framework/AzToolsFramework/Tests/BoundsTestComponent.cpp b/Code/Framework/AzToolsFramework/Tests/BoundsTestComponent.cpp index 1aa7b39593..0b3c574e16 100644 --- a/Code/Framework/AzToolsFramework/Tests/BoundsTestComponent.cpp +++ b/Code/Framework/AzToolsFramework/Tests/BoundsTestComponent.cpp @@ -8,6 +8,8 @@ #include +#include +#include #include namespace UnitTest @@ -40,6 +42,9 @@ namespace UnitTest { AzFramework::BoundsRequestBus::Handler::BusConnect(GetEntityId()); AzToolsFramework::EditorComponentSelectionRequestsBus::Handler::BusConnect(GetEntityId()); + + // default local bounds to unit cube + m_localBounds = AZ::Aabb::CreateFromMinMax(AZ::Vector3(-0.5f), AZ::Vector3(0.5f)); } void BoundsTestComponent::Deactivate() @@ -57,7 +62,53 @@ namespace UnitTest AZ::Aabb BoundsTestComponent::GetLocalBounds() { - return AZ::Aabb::CreateFromMinMax(AZ::Vector3(-0.5f), AZ::Vector3(0.5f)); + return m_localBounds; } + void RenderGeometryIntersectionTestComponent::Reflect(AZ::ReflectContext* context) + { + if (auto serializeContext = azrtti_cast(context)) + { + serializeContext->Class()->Version(1); + } + } + + void RenderGeometryIntersectionTestComponent::Activate() + { + BoundsTestComponent::Activate(); + + const AZ::EntityId entityId = GetEntityId(); + AzFramework::EntityContextId contextId = AzFramework::EntityContextId::CreateNull(); + AzFramework::EntityIdContextQueryBus::EventResult(contextId, entityId, &AzFramework::EntityIdContextQueries::GetOwningContextId); + AzFramework::RenderGeometry::IntersectionRequestBus::Handler::BusConnect({entityId, contextId}); + } + + void RenderGeometryIntersectionTestComponent::Deactivate() + { + AzFramework::RenderGeometry::IntersectionRequestBus::Handler::BusDisconnect(); + BoundsTestComponent::Deactivate(); + } + + AzFramework::RenderGeometry::RayResult RenderGeometryIntersectionTestComponent::RenderGeometryIntersect( + const AzFramework::RenderGeometry::RayRequest& ray) + { + AZ::Transform worldFromLocal = AZ::Transform::CreateIdentity(); + AZ::TransformBus::EventResult(worldFromLocal, GetEntityId(), &AZ::TransformBus::Events::GetWorldTM); + + AzFramework::RenderGeometry::RayResult rayResult; + + float t = 0.0f; + const AZ::Obb obb = GetLocalBounds().GetTransformedObb(worldFromLocal); + const AZ::Vector3 rayDirection = ray.m_endWorldPosition - ray.m_startWorldPosition; + if (AZ::Intersect::IntersectRayObb(ray.m_startWorldPosition, rayDirection, obb, t)) + { + rayResult.m_worldPosition = ray.m_startWorldPosition + rayDirection * t; + rayResult.m_entityAndComponent = AZ::EntityComponentIdPair(GetEntityId(), GetId()); + rayResult.m_distance = t; + rayResult.m_uv = AZ::Vector2::CreateZero(); + rayResult.m_worldNormal = AZ::Vector3::CreateZero(); + } + + return rayResult; + } } // namespace UnitTest diff --git a/Code/Framework/AzToolsFramework/Tests/BoundsTestComponent.h b/Code/Framework/AzToolsFramework/Tests/BoundsTestComponent.h index 036f9c8798..2eee3c0a66 100644 --- a/Code/Framework/AzToolsFramework/Tests/BoundsTestComponent.h +++ b/Code/Framework/AzToolsFramework/Tests/BoundsTestComponent.h @@ -8,6 +8,7 @@ #pragma once +#include #include #include #include @@ -41,5 +42,24 @@ namespace UnitTest // BoundsRequestBus overrides ... AZ::Aabb GetWorldBounds() override; AZ::Aabb GetLocalBounds() override; + + AZ::Aabb m_localBounds; //!< Local bounds that can be modified for certain tests (defaults to unit cube). + }; + + class RenderGeometryIntersectionTestComponent + : public BoundsTestComponent + , public AzFramework::RenderGeometry::IntersectionRequestBus::Handler + { + public: + AZ_EDITOR_COMPONENT(RenderGeometryIntersectionTestComponent, "{6F46B5BF-60DF-4BDD-9BA7-9658E85B99C2}", BoundsTestComponent); + + static void Reflect(AZ::ReflectContext* context); + + // AZ::Component overrides ... + void Activate() override; + void Deactivate() override; + + // IntersectionRequestBus overrides ... + AzFramework::RenderGeometry::RayResult RenderGeometryIntersect(const AzFramework::RenderGeometry::RayRequest& ray) override; }; } // namespace UnitTest diff --git a/Code/Framework/AzToolsFramework/Tests/ComponentAddRemove.cpp b/Code/Framework/AzToolsFramework/Tests/ComponentAddRemove.cpp index e416efc5c6..730e7a7309 100644 --- a/Code/Framework/AzToolsFramework/Tests/ComponentAddRemove.cpp +++ b/Code/Framework/AzToolsFramework/Tests/ComponentAddRemove.cpp @@ -572,11 +572,12 @@ namespace UnitTest AZ::SettingsRegistryInterface* registry = AZ::SettingsRegistry::Get(); auto projectPathKey = AZ::SettingsRegistryInterface::FixedValueString(AZ::SettingsRegistryMergeUtils::BootstrapSettingsRootKey) + "/project_path"; - registry->Set(projectPathKey, "AutomatedTesting"); + AZ::IO::FixedMaxPath enginePath; + registry->Get(enginePath.Native(), AZ::SettingsRegistryMergeUtils::FilePathKey_EngineRootFolder); + registry->Set(projectPathKey, (enginePath / "AutomatedTesting").Native()); AZ::SettingsRegistryMergeUtils::MergeSettingsToRegistry_AddRuntimeFilePaths(*registry); AzFramework::Application::Descriptor descriptor; - descriptor.m_enableDrilling = false; m_app.Start(descriptor); // Without this, the user settings component would attempt to save on finalize/shutdown. Since the file is @@ -1114,7 +1115,6 @@ namespace UnitTest SerializeContext* GetSerializeContext() override { return m_serializeContext.get(); } BehaviorContext* GetBehaviorContext() override { return nullptr; } JsonRegistrationContext* GetJsonRegistrationContext() override { return nullptr; } - const char* GetAppRoot() const override { return nullptr; } const char* GetEngineRoot() const override { return nullptr; } const char* GetExecutableFolder() const override { return nullptr; } void EnumerateEntities(const EntityCallback& /*callback*/) override {} diff --git a/Code/Framework/AzToolsFramework/Tests/EditorTransformComponentSelectionTests.cpp b/Code/Framework/AzToolsFramework/Tests/EditorTransformComponentSelectionTests.cpp index 81909ac511..dc9e1180b7 100644 --- a/Code/Framework/AzToolsFramework/Tests/EditorTransformComponentSelectionTests.cpp +++ b/Code/Framework/AzToolsFramework/Tests/EditorTransformComponentSelectionTests.cpp @@ -38,18 +38,14 @@ #include #include -#include - -namespace AZ -{ - std::ostream& operator<<(std::ostream& os, const EntityId entityId) - { - return os << entityId.ToString().c_str(); - } -} // namespace AZ +#include namespace UnitTest { + using AzToolsFramework::ViewportInteraction::BuildMouseButtons; + using AzToolsFramework::ViewportInteraction::BuildMouseInteraction; + using AzToolsFramework::ViewportInteraction::BuildMousePick; + AzToolsFramework::EntityIdList SelectedEntities() { AzToolsFramework::EntityIdList selectedEntitiesBefore; @@ -137,6 +133,18 @@ namespace UnitTest AzToolsFramework::EntityIdList m_entityIds; }; + AZ::EntityId CreateEntityWithBounds(const char* entityName) + { + AZ::Entity* entity = nullptr; + AZ::EntityId entityId = CreateDefaultEditorEntity(entityName, &entity); + + entity->Deactivate(); + entity->CreateComponent(); + entity->Activate(); + + return entityId; + } + class EditorTransformComponentSelectionViewportPickingFixture : public ToolsApplicationFixture { public: @@ -146,21 +154,9 @@ namespace UnitTest // register a simple component implementing BoundsRequestBus and EditorComponentSelectionRequestsBus app->RegisterComponentDescriptor(BoundsTestComponent::CreateDescriptor()); - auto createEntityWithBoundsFn = [](const char* entityName) - { - AZ::Entity* entity = nullptr; - AZ::EntityId entityId = CreateDefaultEditorEntity(entityName, &entity); - - entity->Deactivate(); - entity->CreateComponent(); - entity->Activate(); - - return entityId; - }; - - m_entityId1 = createEntityWithBoundsFn("Entity1"); - m_entityId2 = createEntityWithBoundsFn("Entity2"); - m_entityId3 = createEntityWithBoundsFn("Entity3"); + m_entityId1 = CreateEntityWithBounds("Entity1"); + m_entityId2 = CreateEntityWithBounds("Entity2"); + m_entityId3 = CreateEntityWithBounds("Entity3"); } void PositionEntities() @@ -493,12 +489,8 @@ namespace UnitTest /////////////////////////////////////////////////////////////////////////////////////////////////////////////// // Then - AzToolsFramework::EntityIdList selectedEntities; - AzToolsFramework::ToolsApplicationRequestBus::BroadcastResult( - selectedEntities, &AzToolsFramework::ToolsApplicationRequestBus::Events::GetSelectedEntities); - - AzToolsFramework::EntityIdList expectedSelectedEntities = { entity4, entity5, entity6 }; - + const AzToolsFramework::EntityIdList selectedEntities = SelectedEntities(); + const AzToolsFramework::EntityIdList expectedSelectedEntities = { entity4, entity5, entity6 }; EXPECT_THAT(selectedEntities, UnorderedElementsAreArray(expectedSelectedEntities)); /////////////////////////////////////////////////////////////////////////////////////////////////////////////// } @@ -527,12 +519,8 @@ namespace UnitTest /////////////////////////////////////////////////////////////////////////////////////////////////////////////// // Then - AzToolsFramework::EntityIdList selectedEntities; - AzToolsFramework::ToolsApplicationRequestBus::BroadcastResult( - selectedEntities, &AzToolsFramework::ToolsApplicationRequestBus::Events::GetSelectedEntities); - - AzToolsFramework::EntityIdList expectedSelectedEntities = { m_entityId1, entity2, entity3, entity4 }; - + const AzToolsFramework::EntityIdList selectedEntities = SelectedEntities(); + const AzToolsFramework::EntityIdList expectedSelectedEntities = { m_entityId1, entity2, entity3, entity4 }; EXPECT_THAT(selectedEntities, UnorderedElementsAreArray(expectedSelectedEntities)); /////////////////////////////////////////////////////////////////////////////////////////////////////////////// } @@ -946,6 +934,176 @@ namespace UnitTest EXPECT_THAT(selectedEntitiesAfter, UnorderedElementsAre(m_entityId1)); } + TEST_F( + EditorTransformComponentSelectionViewportPickingManipulatorTestFixture, BoundsBetweenCameraAndNearClipPlaneDoesNotIntersectMouseRay) + { + // move camera to 10 units along the y-axis + AzFramework::SetCameraTransform(m_cameraState, AZ::Transform::CreateTranslation(AZ::Vector3::CreateAxisY(10.0f))); + + // send a very narrow bounds for entity1 + AZ::Entity* entity1 = AzToolsFramework::GetEntityById(m_entityId1); + auto* boundTestComponent = entity1->FindComponent(); + boundTestComponent->m_localBounds = + AZ::Aabb::CreateFromMinMax(AZ::Vector3(-0.5f, -0.0025f, -0.5f), AZ::Vector3(0.5f, 0.0025f, 0.5f)); + + // move entity1 in front of the camera between it and the near clip plane + AZ::TransformBus::Event( + m_entityId1, &AZ::TransformBus::Events::SetWorldTM, AZ::Transform::CreateTranslation(AZ::Vector3::CreateAxisY(10.05f))); + // move entity2 behind entity1 + AZ::TransformBus::Event( + m_entityId2, &AZ::TransformBus::Events::SetWorldTM, AZ::Transform::CreateTranslation(AZ::Vector3::CreateAxisY(15.0f))); + + const auto entity2ScreenPosition = AzFramework::WorldToScreen(AzToolsFramework::GetWorldTranslation(m_entityId2), m_cameraState); + + // ensure icons are not enabled to avoid them interfering with bound detection + m_viewportManipulatorInteraction->GetViewportInteraction().SetIconsVisible(false); + + // click the entity in the viewport + m_actionDispatcher->SetStickySelect(true) + ->CameraState(m_cameraState) + ->MousePosition(entity2ScreenPosition) + ->CameraState(m_cameraState) + ->MouseLButtonDown() + ->MouseLButtonUp(); + + // ensure entity1 is not selected as it is before the near clip plane + using ::testing::UnorderedElementsAreArray; + const AzToolsFramework::EntityIdList selectedEntities = SelectedEntities(); + const AzToolsFramework::EntityIdList expectedSelectedEntities = { m_entityId2 }; + EXPECT_THAT(selectedEntities, UnorderedElementsAreArray(expectedSelectedEntities)); + } + + // entity can be selected using icon + TEST_F(EditorTransformComponentSelectionViewportPickingManipulatorTestFixture, CursorOverEntityIconReturnsThatEntityId) + { + const AZ::EntityId boundlessEntityId = CreateDefaultEditorEntity("BoundlessEntity"); + + // camera (go to position format) -5.00, -8.00, 5.00, 0.00, 0.00 + AzFramework::SetCameraTransform(m_cameraState, AZ::Transform::CreateTranslation(AZ::Vector3(-5.0f, -8.0f, 5.0f))); + // position entity in the world + AZ::TransformBus::Event(boundlessEntityId, &AZ::TransformBus::Events::SetWorldTranslation, AZ::Vector3(-5.0f, -1.0f, 5.0f)); + + const float distanceFromCamera = m_cameraState.m_position.GetDistance(AzToolsFramework::GetWorldTranslation(boundlessEntityId)); + + const auto quaterIconSize = AzToolsFramework::GetIconSize(distanceFromCamera) * 0.25f; + const auto entity1ScreenPosition = + AzFramework::WorldToScreen(AzToolsFramework::GetWorldTranslation(boundlessEntityId), m_cameraState) + + AzFramework::ScreenVectorFromVector2(AZ::Vector2(quaterIconSize)); + + AzToolsFramework::EditorVisibleEntityDataCache editorVisibleEntityDataCache; + AzToolsFramework::EditorHelpers editorHelpers(&editorVisibleEntityDataCache); + + const auto viewportId = m_viewportManipulatorInteraction->GetViewportInteraction().GetViewportId(); + const auto mousePick = BuildMousePick(m_cameraState, entity1ScreenPosition); + const auto mouseInteraction = BuildMouseInteraction( + mousePick, BuildMouseButtons(AzToolsFramework::ViewportInteraction::MouseButton::None), + AzToolsFramework::ViewportInteraction::InteractionId(AZ::EntityId(), viewportId), + AzToolsFramework::ViewportInteraction::KeyboardModifiers()); + const auto mouseInteractionEvent = AzToolsFramework::ViewportInteraction::BuildMouseInteractionEvent( + mouseInteraction, AzToolsFramework::ViewportInteraction::MouseEvent::Move, false); + + // mimic mouse move + m_actionDispatcher->CameraState(m_cameraState)->MousePosition(entity1ScreenPosition); + + // simulate hovering over an icon in the viewport + editorVisibleEntityDataCache.CalculateVisibleEntityDatas(AzFramework::ViewportInfo{ viewportId }); + auto entityIdUnderCursor = editorHelpers.FindEntityIdUnderCursor(m_cameraState, mouseInteractionEvent); + + using ::testing::Eq; + EXPECT_THAT(entityIdUnderCursor.EntityIdUnderCursor(), Eq(boundlessEntityId)); + } + + // overlapping icons, nearest is detected + TEST_F(EditorTransformComponentSelectionViewportPickingManipulatorTestFixture, CursorOverOverlappingEntityIconsReturnsClosestEntityId) + { + const AZ::EntityId boundlessEntityId1 = CreateDefaultEditorEntity("BoundlessEntity1"); + const AZ::EntityId boundlessEntityId2 = CreateDefaultEditorEntity("BoundlessEntity2"); + + // camera (go to position format) -5.00, -8.00, 5.00, 0.00, 0.00 + AzFramework::SetCameraTransform(m_cameraState, AZ::Transform::CreateTranslation(AZ::Vector3(-5.0f, -8.0f, 5.0f))); + // position entities in the world + AZ::TransformBus::Event(boundlessEntityId1, &AZ::TransformBus::Events::SetWorldTranslation, AZ::Vector3(-5.0f, -1.0f, 5.0f)); + // note: boundlessEntityId2 is closer to the camera + AZ::TransformBus::Event(boundlessEntityId2, &AZ::TransformBus::Events::SetWorldTranslation, AZ::Vector3(-5.0f, -3.0f, 5.0f)); + + const float distanceFromCamera = m_cameraState.m_position.GetDistance(AzToolsFramework::GetWorldTranslation(boundlessEntityId2)); + + const auto quaterIconSize = AzToolsFramework::GetIconSize(distanceFromCamera) * 0.25f; + const auto entity2ScreenPosition = + AzFramework::WorldToScreen(AzToolsFramework::GetWorldTranslation(boundlessEntityId2), m_cameraState) + + AzFramework::ScreenVectorFromVector2(AZ::Vector2(quaterIconSize)); + + AzToolsFramework::EditorVisibleEntityDataCache editorVisibleEntityDataCache; + AzToolsFramework::EditorHelpers editorHelpers(&editorVisibleEntityDataCache); + + const auto viewportId = m_viewportManipulatorInteraction->GetViewportInteraction().GetViewportId(); + const auto mousePick = BuildMousePick(m_cameraState, entity2ScreenPosition); + const auto mouseInteraction = BuildMouseInteraction( + mousePick, BuildMouseButtons(AzToolsFramework::ViewportInteraction::MouseButton::None), + AzToolsFramework::ViewportInteraction::InteractionId(AZ::EntityId(), viewportId), + AzToolsFramework::ViewportInteraction::KeyboardModifiers()); + const auto mouseInteractionEvent = AzToolsFramework::ViewportInteraction::BuildMouseInteractionEvent( + mouseInteraction, AzToolsFramework::ViewportInteraction::MouseEvent::Move, false); + + // mimic mouse move + m_actionDispatcher->CameraState(m_cameraState)->MousePosition(entity2ScreenPosition); + + // simulate hovering over an icon in the viewport + editorVisibleEntityDataCache.CalculateVisibleEntityDatas(AzFramework::ViewportInfo{ viewportId }); + auto entityIdUnderCursor = editorHelpers.FindEntityIdUnderCursor(m_cameraState, mouseInteractionEvent); + + using ::testing::Eq; + EXPECT_THAT(entityIdUnderCursor.EntityIdUnderCursor(), Eq(boundlessEntityId2)); + } + + // if an entity with an icon is behind an entity with a bound, the entity with the icon will be selected + // even if the bound is closer (this is because icons are treated as if they are on the near clip plane) + TEST_F( + EditorTransformComponentSelectionViewportPickingManipulatorTestFixture, FurtherAwayEntityWithIconReturnedWhenBoundEntityIsInFront) + { + const AZ::EntityId boundEntityId = CreateEntityWithBounds("BoundEntity"); + const AZ::EntityId boundlessEntityId = CreateDefaultEditorEntity("BoundlessEntity"); + + auto* boundTestComponent = AzToolsFramework::GetEntityById(boundEntityId)->FindComponent(); + boundTestComponent->m_localBounds = AZ::Aabb::CreateFromMinMax(AZ::Vector3(-1.5f, -0.5f, -0.5f), AZ::Vector3(1.5f, 0.5, 0.5f)); + + // camera (go to position format) -5.00, -8.00, 5.00, 0.00, 0.00 + AzFramework::SetCameraTransform(m_cameraState, AZ::Transform::CreateTranslation(AZ::Vector3(-5.0f, -8.0f, 5.0f))); + // position entities in the world + AZ::TransformBus::Event(boundEntityId, &AZ::TransformBus::Events::SetWorldTranslation, AZ::Vector3(-4.0f, -3.0f, 5.0f)); + // note: boundlessEntityId2 is closer to the camera + AZ::TransformBus::Event(boundlessEntityId, &AZ::TransformBus::Events::SetWorldTranslation, AZ::Vector3(-5.0f, -1.0f, 5.0f)); + + const float distanceFromCamera = m_cameraState.m_position.GetDistance(AzToolsFramework::GetWorldTranslation(boundlessEntityId)); + + const auto quaterIconSize = AzToolsFramework::GetIconSize(distanceFromCamera) * 0.25f; + const auto entity2ScreenPosition = + AzFramework::WorldToScreen(AzToolsFramework::GetWorldTranslation(boundlessEntityId), m_cameraState) + + AzFramework::ScreenVectorFromVector2(AZ::Vector2(quaterIconSize)); + + AzToolsFramework::EditorVisibleEntityDataCache editorVisibleEntityDataCache; + AzToolsFramework::EditorHelpers editorHelpers(&editorVisibleEntityDataCache); + + const auto viewportId = m_viewportManipulatorInteraction->GetViewportInteraction().GetViewportId(); + const auto mousePick = BuildMousePick(m_cameraState, entity2ScreenPosition); + const auto mouseInteraction = BuildMouseInteraction( + mousePick, BuildMouseButtons(AzToolsFramework::ViewportInteraction::MouseButton::None), + AzToolsFramework::ViewportInteraction::InteractionId(AZ::EntityId(), viewportId), + AzToolsFramework::ViewportInteraction::KeyboardModifiers()); + const auto mouseInteractionEvent = AzToolsFramework::ViewportInteraction::BuildMouseInteractionEvent( + mouseInteraction, AzToolsFramework::ViewportInteraction::MouseEvent::Move, false); + + // mimic mouse move + m_actionDispatcher->CameraState(m_cameraState)->MousePosition(entity2ScreenPosition); + + // simulate hovering over an icon in the viewport + editorVisibleEntityDataCache.CalculateVisibleEntityDatas(AzFramework::ViewportInfo{ viewportId }); + auto entityIdUnderCursor = editorHelpers.FindEntityIdUnderCursor(m_cameraState, mouseInteractionEvent); + + using ::testing::Eq; + EXPECT_THAT(entityIdUnderCursor.EntityIdUnderCursor(), Eq(boundlessEntityId)); + } + class EditorTransformComponentSelectionViewportPickingManipulatorTestFixtureParam : public EditorTransformComponentSelectionViewportPickingManipulatorTestFixture , public ::testing::WithParamInterface @@ -1635,7 +1793,7 @@ namespace UnitTest const AZ::Transform finalEntityTransform = AzToolsFramework::GetWorldTransform(m_entityId1); // ensure final world positions match - EXPECT_TRUE(finalEntityTransform.IsClose(finalTransformWorld, 0.01f)); + EXPECT_THAT(finalEntityTransform, IsCloseTolerance(finalTransformWorld, 0.01f)); } TEST_F(EditorTransformComponentSelectionManipulatorTestFixture, TranslatingEntityWithLinearManipulatorNotifiesOnEntityTransformChanged) @@ -1681,8 +1839,9 @@ namespace UnitTest using MouseInteractionResult = AzToolsFramework::ViewportInteraction::MouseInteractionResult; public: - WheelEventWidget(QWidget* parent = nullptr) + WheelEventWidget(const AzFramework::ViewportId viewportId, QWidget* parent = nullptr) : QWidget(parent) + , m_viewportId(viewportId) { } @@ -1691,7 +1850,7 @@ namespace UnitTest namespace vi = AzToolsFramework::ViewportInteraction; vi::MouseInteraction mouseInteraction; mouseInteraction.m_interactionId.m_cameraId = AZ::EntityId(); - mouseInteraction.m_interactionId.m_viewportId = 0; + mouseInteraction.m_interactionId.m_viewportId = m_viewportId; mouseInteraction.m_mouseButtons = vi::BuildMouseButtons(ev->buttons()); mouseInteraction.m_mousePick = vi::MousePick(); mouseInteraction.m_keyboardModifiers = vi::BuildKeyboardModifiers(ev->modifiers()); @@ -1703,15 +1862,15 @@ namespace UnitTest } MouseInteractionResult m_mouseInteractionResult; + AzFramework::ViewportId m_viewportId; }; - TEST_F(EditorTransformComponentSelectionFixture, MouseScrollWheelSwitchesTransformMode) + TEST_F(EditorTransformComponentSelectionManipulatorTestFixture, MouseScrollWheelSwitchesTransformMode) { - using ::testing::Eq; namespace vi = AzToolsFramework::ViewportInteraction; using AzToolsFramework::EditorTransformComponentSelectionRequestBus; - const auto transformMode = []() + const auto transformMode = [] { EditorTransformComponentSelectionRequestBus::Events::Mode transformMode; EditorTransformComponentSelectionRequestBus::EventResult( @@ -1724,7 +1883,7 @@ namespace UnitTest // preconditions EXPECT_THAT(transformMode(), EditorTransformComponentSelectionRequestBus::Events::Mode::Translation); - auto wheelEventWidget = WheelEventWidget(); + auto wheelEventWidget = WheelEventWidget(m_viewportManipulatorInteraction->GetViewportInteraction().GetViewportId()); // attach the global event filter to the placeholder widget AzQtComponents::GlobalEventFilter globalEventFilter(QApplication::instance()); wheelEventWidget.installEventFilter(&globalEventFilter); @@ -1740,6 +1899,7 @@ namespace UnitTest // then // transform mode has changed and mouse event was handled + using ::testing::Eq; EXPECT_THAT(transformMode(), Eq(EditorTransformComponentSelectionRequestBus::Events::Mode::Rotation)); EXPECT_THAT(wheelEventWidget.m_mouseInteractionResult, Eq(vi::MouseInteractionResult::Viewport)); } @@ -2753,4 +2913,368 @@ namespace UnitTest /////////////////////////////////////////////////////////////////////////////////////////////////////////////// } + TEST(HandleAccents, CurrentValidEntityIdBecomesHoveredWithNoSelectionAndUnstickySelect) + { + namespace azvi = AzToolsFramework::ViewportInteraction; + + const AZ::EntityId currentEntityId = AZ::EntityId(12345); + AZ::EntityId hoveredEntityEntityId; + + AzToolsFramework::HandleAccentsContext handleAccentsContext; + handleAccentsContext.m_ctrlHeld = false; + handleAccentsContext.m_hasSelectedEntities = false; + handleAccentsContext.m_usingBoxSelect = false; + handleAccentsContext.m_usingStickySelect = false; + + bool currentEntityIdAccentAdded = false; + AzToolsFramework::HandleAccents( + currentEntityId, hoveredEntityEntityId, handleAccentsContext, azvi::MouseButtonsFromButton(azvi::MouseButton::None), + [¤tEntityIdAccentAdded, currentEntityId](const AZ::EntityId entityId, const bool accent) + { + if (entityId == currentEntityId && accent) + { + currentEntityIdAccentAdded = true; + } + }); + + using ::testing::Eq; + using ::testing::IsTrue; + EXPECT_THAT(currentEntityId, Eq(hoveredEntityEntityId)); + EXPECT_THAT(currentEntityIdAccentAdded, IsTrue()); + } + + TEST(HandleAccents, CurrentValidEntityIdBecomesHoveredWithSelectionAndUnstickySelect) + { + namespace azvi = AzToolsFramework::ViewportInteraction; + + const AZ::EntityId currentEntityId = AZ::EntityId(12345); + AZ::EntityId hoveredEntityEntityId; + + AzToolsFramework::HandleAccentsContext handleAccentsContext; + handleAccentsContext.m_ctrlHeld = false; + handleAccentsContext.m_hasSelectedEntities = true; + handleAccentsContext.m_usingBoxSelect = false; + handleAccentsContext.m_usingStickySelect = false; + + bool currentEntityIdAccentAdded = false; + AzToolsFramework::HandleAccents( + currentEntityId, hoveredEntityEntityId, handleAccentsContext, azvi::MouseButtonsFromButton(azvi::MouseButton::None), + [¤tEntityIdAccentAdded, currentEntityId](const AZ::EntityId entityId, const bool accent) + { + if (entityId == currentEntityId && accent) + { + currentEntityIdAccentAdded = true; + } + }); + + using ::testing::Eq; + using ::testing::IsTrue; + EXPECT_THAT(currentEntityId, Eq(hoveredEntityEntityId)); + EXPECT_THAT(currentEntityIdAccentAdded, IsTrue()); + } + + TEST(HandleAccents, CurrentValidEntityIdDoesNotBecomeHoveredWithSelectionUnstickySelectAndInvalidButton) + { + namespace azvi = AzToolsFramework::ViewportInteraction; + + const AZ::EntityId currentEntityId = AZ::EntityId(12345); + AZ::EntityId hoveredEntityEntityId = AZ::EntityId(54321); + + AzToolsFramework::HandleAccentsContext handleAccentsContext; + handleAccentsContext.m_ctrlHeld = false; + handleAccentsContext.m_hasSelectedEntities = false; + handleAccentsContext.m_usingBoxSelect = false; + handleAccentsContext.m_usingStickySelect = false; + + bool hoveredEntityIdAccentRemoved = false; + AzToolsFramework::HandleAccents( + currentEntityId, hoveredEntityEntityId, handleAccentsContext, azvi::MouseButtonsFromButton(azvi::MouseButton::Middle), + [&hoveredEntityIdAccentRemoved, hoveredEntityEntityId](const AZ::EntityId entityId, const bool accent) + { + if (entityId == hoveredEntityEntityId && !accent) + { + hoveredEntityIdAccentRemoved = true; + } + }); + + using ::testing::Eq; + using ::testing::IsFalse; + using ::testing::IsTrue; + EXPECT_THAT(hoveredEntityEntityId.IsValid(), IsFalse()); + EXPECT_THAT(hoveredEntityIdAccentRemoved, IsTrue()); + } + + TEST(HandleAccents, CurrentValidEntityIdDoesNotBecomeHoveredWithSelectionUnstickySelectAndDoingBoxSelect) + { + namespace azvi = AzToolsFramework::ViewportInteraction; + + const AZ::EntityId currentEntityId = AZ::EntityId(12345); + AZ::EntityId hoveredEntityEntityId = AZ::EntityId(54321); + + AzToolsFramework::HandleAccentsContext handleAccentsContext; + handleAccentsContext.m_ctrlHeld = false; + handleAccentsContext.m_hasSelectedEntities = false; + handleAccentsContext.m_usingBoxSelect = true; + handleAccentsContext.m_usingStickySelect = false; + + bool hoveredEntityIdAccentRemoved = false; + AzToolsFramework::HandleAccents( + currentEntityId, hoveredEntityEntityId, handleAccentsContext, azvi::MouseButtonsFromButton(azvi::MouseButton::None), + [&hoveredEntityIdAccentRemoved, hoveredEntityEntityId](const AZ::EntityId entityId, const bool accent) + { + if (entityId == hoveredEntityEntityId && !accent) + { + hoveredEntityIdAccentRemoved = true; + } + }); + + using ::testing::Eq; + using ::testing::IsFalse; + using ::testing::IsTrue; + EXPECT_THAT(hoveredEntityEntityId.IsValid(), IsFalse()); + EXPECT_THAT(hoveredEntityIdAccentRemoved, IsTrue()); + } + + // mimics the mouse moving off of hovered entity onto a new entity with sticky select enabled + TEST(HandleAccents, CurrentValidEntityIdDoesNotBecomeHoveredWithSelectionAndStickySelect) + { + namespace azvi = AzToolsFramework::ViewportInteraction; + + const AZ::EntityId currentEntityId = AZ::EntityId(12345); + AZ::EntityId hoveredEntityEntityId = AZ::EntityId(54321); + + AzToolsFramework::HandleAccentsContext handleAccentsContext; + handleAccentsContext.m_ctrlHeld = false; + handleAccentsContext.m_hasSelectedEntities = true; + handleAccentsContext.m_usingBoxSelect = false; + handleAccentsContext.m_usingStickySelect = true; + + bool hoveredEntityIdAccentRemoved = false; + AzToolsFramework::HandleAccents( + currentEntityId, hoveredEntityEntityId, handleAccentsContext, azvi::MouseButtonsFromButton(azvi::MouseButton::None), + [&hoveredEntityIdAccentRemoved, hoveredEntityEntityId](const AZ::EntityId entityId, const bool accent) + { + if (entityId == hoveredEntityEntityId && !accent) + { + hoveredEntityIdAccentRemoved = true; + } + }); + + using ::testing::Eq; + using ::testing::IsFalse; + using ::testing::IsTrue; + EXPECT_THAT(hoveredEntityIdAccentRemoved, IsTrue()); + EXPECT_THAT(hoveredEntityEntityId.IsValid(), IsFalse()); + } + + TEST(HandleAccents, CurrentValidEntityIdDoesBecomeHoveredWithSelectionAndStickySelectAndCtrl) + { + namespace azvi = AzToolsFramework::ViewportInteraction; + + const AZ::EntityId currentEntityId = AZ::EntityId(12345); + AZ::EntityId hoveredEntityEntityId = AZ::EntityId(54321); + + AzToolsFramework::HandleAccentsContext handleAccentsContext; + handleAccentsContext.m_ctrlHeld = true; + handleAccentsContext.m_hasSelectedEntities = true; + handleAccentsContext.m_usingBoxSelect = false; + handleAccentsContext.m_usingStickySelect = true; + + bool currentEntityIdAccentAdded = false; + bool hoveredEntityIdAccentRemoved = false; + AzToolsFramework::HandleAccents( + currentEntityId, hoveredEntityEntityId, handleAccentsContext, azvi::MouseButtonsFromButton(azvi::MouseButton::None), + [&hoveredEntityIdAccentRemoved, ¤tEntityIdAccentAdded, currentEntityId, + hoveredEntityEntityId](const AZ::EntityId entityId, const bool accent) + { + if (entityId == currentEntityId && accent) + { + currentEntityIdAccentAdded = true; + } + + if (entityId == hoveredEntityEntityId && !accent) + { + hoveredEntityIdAccentRemoved = true; + } + }); + + using ::testing::Eq; + using ::testing::IsFalse; + using ::testing::IsTrue; + EXPECT_THAT(currentEntityIdAccentAdded, IsTrue()); + EXPECT_THAT(hoveredEntityIdAccentRemoved, IsTrue()); + EXPECT_THAT(hoveredEntityEntityId, Eq(AZ::EntityId(12345))); + } + + class EditorTransformComponentSelectionRenderGeometryIntersectionFixture : public ToolsApplicationFixture + { + public: + void SetUpEditorFixtureImpl() override + { + auto* app = GetApplication(); + // register a simple component implementing BoundsRequestBus and EditorComponentSelectionRequestsBus + app->RegisterComponentDescriptor(BoundsTestComponent::CreateDescriptor()); + // register a component implementing RenderGeometry::IntersectionRequestBus + app->RegisterComponentDescriptor(RenderGeometryIntersectionTestComponent::CreateDescriptor()); + + auto createEntityWithGeometryIntersectionFn = [](const char* entityName) + { + AZ::Entity* entity = nullptr; + AZ::EntityId entityId = CreateDefaultEditorEntity(entityName, &entity); + + entity->Deactivate(); + entity->CreateComponent(); + entity->Activate(); + + return entityId; + }; + + m_entityIdGround = createEntityWithGeometryIntersectionFn("Entity1"); + m_entityIdBox = createEntityWithGeometryIntersectionFn("Entity2"); + + if (auto* ground = AzToolsFramework::GetEntityById(m_entityIdGround)->FindComponent()) + { + ground->m_localBounds = AZ::Aabb::CreateFromMinMax(AZ::Vector3(-10.0f, -10.0f, -0.5f), AZ::Vector3(10.0f, 10.0f, 0.5f)); + } + + AzToolsFramework::SetWorldTransform(m_entityIdGround, AZ::Transform::CreateTranslation(AZ::Vector3(0.0f, 10.0f, 5.0f))); + + if (auto* box = AzToolsFramework::GetEntityById(m_entityIdBox)->FindComponent()) + { + box->m_localBounds = AZ::Aabb::CreateFromMinMax(AZ::Vector3(-0.5f), AZ::Vector3(0.5f)); + } + + AzToolsFramework::SetWorldTransform( + m_entityIdBox, + AZ::Transform::CreateFromMatrix3x3AndTranslation( + AZ::Matrix3x3::CreateRotationZ(AZ::DegToRad(45.0f)), AZ::Vector3(0.0f, 10.0f, 7.0f))); + } + + AZ::EntityId m_entityIdGround; + AZ::EntityId m_entityIdBox; + }; + + using EditorTransformComponentSelectionRenderGeometryIntersectionManipulatorFixture = + IndirectCallManipulatorViewportInteractionFixtureMixin; + + TEST_F( + EditorTransformComponentSelectionRenderGeometryIntersectionManipulatorFixture, BoxCanBePlacedOnMeshSurfaceUsingSurfaceManipulator) + { + // camera (go to position format) - 0.00, 20.00, 12.00, -35.00, -180.00 + m_cameraState.m_viewportSize = AZ::Vector2(1280.0f, 720.0f); + AzFramework::SetCameraTransform( + m_cameraState, + AZ::Transform::CreateFromMatrix3x3AndTranslation( + AZ::Matrix3x3::CreateRotationZ(AZ::DegToRad(-180.0f)) * AZ::Matrix3x3::CreateRotationX(AZ::DegToRad(-35.0f)), + AZ::Vector3(0.0f, 20.0f, 12.0f))); + + // the initial starting position of the entity + const auto initialTransformWorld = AzToolsFramework::GetWorldTransform(m_entityIdBox); + // where the entity should end up (snapped to the larger ground surface) + const auto finalTransformWorld = + AZ::Transform::CreateFromQuaternionAndTranslation(initialTransformWorld.GetRotation(), AZ::Vector3(2.5f, 12.5f, 5.5f)); + + // calculate the position in screen space of the initial position of the entity + const auto initialPositionScreen = AzFramework::WorldToScreen(initialTransformWorld.GetTranslation(), m_cameraState); + // calculate the position in screen space of the final position of the entity + const auto finalPositionScreen = AzFramework::WorldToScreen(finalTransformWorld.GetTranslation(), m_cameraState); + + // select the entity (this will cause the manipulators to appear in EditorTransformComponentSelection) + AzToolsFramework::SelectEntity(m_entityIdBox); + + // press and drag the mouse (starting where the surface manipulator is) + m_actionDispatcher->CameraState(m_cameraState) + ->MousePosition(initialPositionScreen) + ->MouseLButtonDown() + ->MousePosition(finalPositionScreen) + ->MouseLButtonUp(); + + // read back the position of the entity now + const AZ::Transform finalEntityTransform = AzToolsFramework::GetWorldTransform(m_entityIdBox); + + // ensure final world positions match + EXPECT_THAT(finalEntityTransform, IsCloseTolerance(finalTransformWorld, 0.01f)); + } + + TEST_F( + EditorTransformComponentSelectionRenderGeometryIntersectionManipulatorFixture, + SurfaceManipulatorFollowsMouseAtDefaultEditorDistanceFromCameraWhenNoMeshIntersection) + { + // camera (go to position format) - 0.00, 25.00, 12.00, 0.00, -180.00 + m_cameraState.m_viewportSize = AZ::Vector2(1280.0f, 720.0f); + AzFramework::SetCameraTransform( + m_cameraState, + AZ::Transform::CreateFromMatrix3x3AndTranslation( + AZ::Matrix3x3::CreateRotationZ(AZ::DegToRad(-180.0f)), AZ::Vector3(0.0f, 25.0f, 12.0f))); + + // the initial starting position of the entity + const auto initialTransformWorld = AzToolsFramework::GetWorldTransform(m_entityIdBox); + // where the entity should end up (default distance away from the camera/near clip under where the mouse is) + const auto finalTransformWorld = + AZ::Transform::CreateFromQuaternionAndTranslation(initialTransformWorld.GetRotation(), AZ::Vector3(0.0f, 14.9f, 12.0f)); + + // calculate the position in screen space of the initial position of the entity + const auto initialPositionScreen = AzFramework::WorldToScreen(initialTransformWorld.GetTranslation(), m_cameraState); + // calculate the position in screen space of the final position of the entity + const auto finalPositionScreen = AzFramework::WorldToScreen(finalTransformWorld.GetTranslation(), m_cameraState); + + // select the entity (this will cause the manipulators to appear in EditorTransformComponentSelection) + AzToolsFramework::SelectEntity(m_entityIdBox); + + // press and drag the mouse (starting where the surface manipulator is) + m_actionDispatcher->CameraState(m_cameraState) + ->MousePosition(initialPositionScreen) + ->MouseLButtonDown() + ->MousePosition(finalPositionScreen) + ->MouseLButtonUp(); + + // read back the position of the entity now + const AZ::Transform finalEntityTransform = AzToolsFramework::GetWorldTransform(m_entityIdBox); + + const auto viewportRay = AzToolsFramework::ViewportInteraction::ViewportScreenToWorldRay(m_cameraState, initialPositionScreen); + const auto distanceAway = (finalEntityTransform.GetTranslation() - viewportRay.m_origin).GetLength(); + + // ensure final world positions match + EXPECT_THAT(finalEntityTransform, IsCloseTolerance(finalTransformWorld, 0.01f)); + // ensure distance away is what we expect + EXPECT_NEAR(distanceAway, AzToolsFramework::GetDefaultEntityPlacementDistance(), 0.001f); + } + + TEST_F( + EditorTransformComponentSelectionRenderGeometryIntersectionManipulatorFixture, + MiddleMouseButtonWithShiftAndCtrlHeldOnMeshSurfaceWillSnapSelectedEntityToIntersectionPoint) + { + // camera (go to position format) - 21.00, 8.00, 11.00, -22.00, 150.00 + m_cameraState.m_viewportSize = AZ::Vector2(1280.0f, 720.0f); + AzFramework::SetCameraTransform( + m_cameraState, + AZ::Transform::CreateFromMatrix3x3AndTranslation( + AZ::Matrix3x3::CreateRotationZ(AZ::DegToRad(150.0f)) * AZ::Matrix3x3::CreateRotationX(AZ::DegToRad(-22.0f)), + AZ::Vector3(21.0f, 8.0f, 11.0f))); + + // position the ground entity + AzToolsFramework::SetWorldTransform( + m_entityIdGround, + AZ::Transform::CreateFromMatrix3x3AndTranslation( + AZ::Matrix3x3::CreateRotationY(AZ::DegToRad(40.0f)) * AZ::Matrix3x3::CreateRotationZ(AZ::DegToRad(60.0f)), + AZ::Vector3(14.0f, -6.0f, 5.0f))); + + // select the other entity (a 1x1x1 box) + AzToolsFramework::SelectEntity(m_entityIdBox); + + // expected world position (value taken from editor scenario) + const auto expectedWorldPosition = AZ::Vector3(13.606657f, -2.6753534f, 5.9827675f); + const auto screenPosition = AzFramework::WorldToScreen(expectedWorldPosition, m_cameraState); + + // perform snap action + m_actionDispatcher->CameraState(m_cameraState) + ->MousePosition(screenPosition) + ->KeyboardModifierDown(AzToolsFramework::ViewportInteraction::KeyboardModifier::Control) + ->KeyboardModifierDown(AzToolsFramework::ViewportInteraction::KeyboardModifier::Shift) + ->MouseMButtonDown(); + + // read back the current entity transform after placement + const AZ::Transform finalEntityTransform = AzToolsFramework::GetWorldTransform(m_entityIdBox); + EXPECT_THAT(finalEntityTransform.GetTranslation(), IsCloseTolerance(expectedWorldPosition, 0.01f)); + } } // namespace UnitTest diff --git a/Code/Framework/AzToolsFramework/Tests/EditorVertexSelectionTests.cpp b/Code/Framework/AzToolsFramework/Tests/EditorVertexSelectionTests.cpp index d08c9646a2..228dea6b7c 100644 --- a/Code/Framework/AzToolsFramework/Tests/EditorVertexSelectionTests.cpp +++ b/Code/Framework/AzToolsFramework/Tests/EditorVertexSelectionTests.cpp @@ -10,21 +10,23 @@ #include #include #include +#include +#include +#include +#include +#include #include #include +#include #include #include #include #include #include #include -#include -#include -#include -#include -#include +#include -using namespace AzToolsFramework; +#include namespace UnitTest { @@ -41,20 +43,65 @@ namespace UnitTest void Disconnect(); // FixedVerticesRequestBus/VariableVerticesRequestBus ... - bool GetVertex(size_t index, AZ::Vector3& vertex) const override { return m_vertexContainer.GetVertex(index, vertex); } - bool UpdateVertex(size_t index, const AZ::Vector3& vertex) override { return m_vertexContainer.UpdateVertex(index, vertex); }; - void AddVertex(const AZ::Vector3& vertex) override { m_vertexContainer.AddVertex(vertex); } - bool InsertVertex(size_t index, const AZ::Vector3& vertex) override { return m_vertexContainer.InsertVertex(index, vertex); } - bool RemoveVertex(size_t index) override { return m_vertexContainer.RemoveVertex(index); } - void SetVertices(const AZStd::vector& vertices) override { m_vertexContainer.SetVertices(vertices); }; - void ClearVertices() override { m_vertexContainer.Clear(); } - size_t Size() const override { return m_vertexContainer.Size(); } - bool Empty() const override { return m_vertexContainer.Empty(); } + bool GetVertex(size_t index, AZ::Vector3& vertex) const override; + bool UpdateVertex(size_t index, const AZ::Vector3& vertex) override; + void AddVertex(const AZ::Vector3& vertex) override; + bool InsertVertex(size_t index, const AZ::Vector3& vertex) override; + bool RemoveVertex(size_t index) override; + void SetVertices(const AZStd::vector& vertices) override; + void ClearVertices() override; + size_t Size() const override; + bool Empty() const override; private: AZ::VertexContainer m_vertexContainer; }; + bool TestVariableVerticesVertexContainer::GetVertex(size_t index, AZ::Vector3& vertex) const + { + return m_vertexContainer.GetVertex(index, vertex); + } + + bool TestVariableVerticesVertexContainer::UpdateVertex(size_t index, const AZ::Vector3& vertex) + { + return m_vertexContainer.UpdateVertex(index, vertex); + } + + void TestVariableVerticesVertexContainer::AddVertex(const AZ::Vector3& vertex) + { + m_vertexContainer.AddVertex(vertex); + } + + bool TestVariableVerticesVertexContainer::InsertVertex(size_t index, const AZ::Vector3& vertex) + { + return m_vertexContainer.InsertVertex(index, vertex); + } + + bool TestVariableVerticesVertexContainer::RemoveVertex(size_t index) + { + return m_vertexContainer.RemoveVertex(index); + } + + void TestVariableVerticesVertexContainer::SetVertices(const AZStd::vector& vertices) + { + m_vertexContainer.SetVertices(vertices); + } + + void TestVariableVerticesVertexContainer::ClearVertices() + { + m_vertexContainer.Clear(); + } + + size_t TestVariableVerticesVertexContainer::Size() const + { + return m_vertexContainer.Size(); + } + + bool TestVariableVerticesVertexContainer::Empty() const + { + return m_vertexContainer.Empty(); + } + void TestVariableVerticesVertexContainer::Connect(const AZ::EntityId entityId) { AZ::VariableVerticesRequestBus::Handler::BusConnect(entityId); @@ -67,17 +114,18 @@ namespace UnitTest AZ::VariableVerticesRequestBus::Handler::BusDisconnect(); } - class TestEditorVertexSelectionVariable - : public EditorVertexSelectionVariable + class TestEditorVertexSelectionVariable : public AzToolsFramework::EditorVertexSelectionVariable { public: AZ_CLASS_ALLOCATOR(TestEditorVertexSelectionVariable, AZ::SystemAllocator, 0) - void ShowVertexDeletionWarning() override { /*noop*/ } + void ShowVertexDeletionWarning() override + { + // noop + } }; - class EditorVertexSelectionFixture - : public ToolsApplicationFixture + class EditorVertexSelectionFixture : public ToolsApplicationFixture { public: void SetUpEditorFixtureImpl() override @@ -111,26 +159,25 @@ namespace UnitTest void EditorVertexSelectionFixture::RecreateVertexSelection() { + namespace aztf = AzToolsFramework; m_vertexSelection.Create( - AZ::EntityComponentIdPair(m_entityId, TestComponentId), - g_mainManipulatorManagerId, AZStd::make_unique(), - TranslationManipulators::Dimensions::Three, ConfigureTranslationManipulatorAppearance3d); + AZ::EntityComponentIdPair(m_entityId, TestComponentId), aztf::g_mainManipulatorManagerId, + AZStd::make_unique(), aztf::TranslationManipulators::Dimensions::Three, + aztf::ConfigureTranslationManipulatorAppearance3d); } void EditorVertexSelectionFixture::PopulateVertices() { for (size_t vertIndex = 0; vertIndex < EditorVertexSelectionFixture::VertexCount; ++vertIndex) { - InsertVertexAfter( - AZ::EntityComponentIdPair(m_entityId, TestComponentId), 0, AZ::Vector3::CreateZero()); + AzToolsFramework::InsertVertexAfter(AZ::EntityComponentIdPair(m_entityId, TestComponentId), 0, AZ::Vector3::CreateZero()); } } void EditorVertexSelectionFixture::ClearVertices() { for (size_t vertIndex = 0; vertIndex < EditorVertexSelectionFixture::VertexCount; ++vertIndex) { - SafeRemoveVertex( - AZ::EntityComponentIdPair(m_entityId, TestComponentId), 0); + AzToolsFramework::SafeRemoveVertex(AZ::EntityComponentIdPair(m_entityId, TestComponentId), 0); } } @@ -187,7 +234,7 @@ namespace UnitTest /////////////////////////////////////////////////////////////////////////////////////////////////////////////// // When // just provide a placeholder mouse interaction event in this case - m_vertexSelection.SnapVerticesToTerrain(ViewportInteraction::MouseInteractionEvent{}); + m_vertexSelection.SnapVerticesToSurface(AzToolsFramework::ViewportInteraction::MouseInteractionEvent{}); /////////////////////////////////////////////////////////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////////////////////////////////////////////////////////// @@ -196,8 +243,7 @@ namespace UnitTest /////////////////////////////////////////////////////////////////////////////////////////////////////////////// } - using EditorVertexSelectionManipulatorFixture = - IndirectCallManipulatorViewportInteractionFixtureMixin; + using EditorVertexSelectionManipulatorFixture = IndirectCallManipulatorViewportInteractionFixtureMixin; TEST_F(EditorVertexSelectionManipulatorFixture, CannotDeleteAllVertices) { @@ -205,25 +251,23 @@ namespace UnitTest const auto entityComponentIdPair = AZ::EntityComponentIdPair(m_entityId, TestComponentId); - const float horizontalPositions[] = {-1.5f, -0.5f, 0.5f, 1.5f}; - for (size_t vertIndex = 0; vertIndex < std::size(horizontalPositions); ++vertIndex) + const float horizontalPositions[] = { -1.5f, -0.5f, 0.5f, 1.5f }; + for (size_t vertIndex = 0; vertIndex < AZStd::size(horizontalPositions); ++vertIndex) { - InsertVertexAfter( - entityComponentIdPair, vertIndex, AZ::Vector3(horizontalPositions[vertIndex], 5.0f, 0.0f)); + AzToolsFramework::InsertVertexAfter(entityComponentIdPair, vertIndex, AZ::Vector3(horizontalPositions[vertIndex], 5.0f, 0.0f)); } - // rebuild the vertex selection after adding the new verts + // rebuild the vertex selection after adding the new vertices RecreateVertexSelection(); // build a vector of the vertex positions in screen space AZStd::vector vertexScreenPositions; - for (size_t vertIndex = 0; vertIndex < std::size(horizontalPositions); ++vertIndex) + for (size_t vertIndex = 0; vertIndex < AZStd::size(horizontalPositions); ++vertIndex) { - AZ::Vector3 localVertex; + AZ::Vector3 localVertex = AZ::Vector3::CreateZero(); bool found = false; AZ::FixedVerticesRequestBus::EventResult( - found, m_entityId, &AZ::FixedVerticesRequestBus::Handler::GetVertex, - vertIndex, localVertex); + found, m_entityId, &AZ::FixedVerticesRequestBus::Handler::GetVertex, vertIndex, localVertex); if (found) { @@ -266,9 +310,9 @@ namespace UnitTest const auto entityComponentIdPair = AZ::EntityComponentIdPair(m_entityId, TestComponentId); // add a single vertex (in front of the camera) - InsertVertexAfter(entityComponentIdPair, 0, AZ::Vector3::CreateAxisY(5.0f)); + AzToolsFramework::InsertVertexAfter(entityComponentIdPair, 0, AZ::Vector3::CreateAxisY(5.0f)); - // rebuild the vertex selection after adding the new verts + // rebuild the vertex selection after adding the new vertices RecreateVertexSelection(); AzFramework::ScreenPoint vertexScreenPosition; @@ -299,4 +343,132 @@ namespace UnitTest // deleting the last vertex through a manipulator is disallowed - size should remain the same EXPECT_THAT(vertexCountAfter, Eq(1)); } + + static AZ::EntityId CreateEntityForVertexIntersectionPlacement(EditorVertexSelectionManipulatorFixture& fixture) + { + auto* app = fixture.GetApplication(); + app->RegisterComponentDescriptor(BoundsTestComponent::CreateDescriptor()); + app->RegisterComponentDescriptor(RenderGeometryIntersectionTestComponent::CreateDescriptor()); + + AZ::Entity* entityGround = nullptr; + AZ::EntityId entityIdGround = CreateDefaultEditorEntity("EntityGround", &entityGround); + + entityGround->Deactivate(); + auto ground = entityGround->CreateComponent(); + entityGround->Activate(); + + ground->m_localBounds = AZ::Aabb::CreateFromMinMax(AZ::Vector3(-10.0f, -10.0f, -0.5f), AZ::Vector3(10.0f, 10.0f, 0.5f)); + + return entityIdGround; + } + + static AZStd::vector SetupVertices( + const AZ::EntityId entityId, EditorVertexSelectionManipulatorFixture& fixture) + { + const auto entityComponentIdPair = AZ::EntityComponentIdPair(entityId, TestComponentId); + const float horizontalPositions[] = { -3.0f, -1.0f, 1.0f, 3.0f }; + for (size_t vertIndex = 0; vertIndex < AZStd::size(horizontalPositions); ++vertIndex) + { + AzToolsFramework::InsertVertexAfter(entityComponentIdPair, vertIndex, AZ::Vector3(horizontalPositions[vertIndex], 0.0f, 0.0f)); + } + + // rebuild the vertex selection after adding the new vertices + fixture.RecreateVertexSelection(); + + // build a vector of the vertex positions in screen space + AZStd::vector vertexScreenPositions; + for (size_t vertIndex = 0; vertIndex < AZStd::size(horizontalPositions); ++vertIndex) + { + AZ::Vector3 localVertex; + bool found = false; + AZ::FixedVerticesRequestBus::EventResult( + found, entityId, &AZ::FixedVerticesRequestBus::Handler::GetVertex, vertIndex, localVertex); + + if (found) + { + const AZ::Vector3 worldVertex = AzToolsFramework::GetWorldTransform(entityId).TransformPoint(localVertex); + vertexScreenPositions.push_back(AzFramework::WorldToScreen(worldVertex, fixture.m_cameraState)); + } + } + + return vertexScreenPositions; + } + + AzToolsFramework::ViewportInteraction::MouseInteractionEvent BuildMiddleMouseDownEvent( + const AzFramework::ScreenPoint& screenPosition, const AzFramework::ViewportId viewportId) + { + AzToolsFramework::ViewportInteraction::MousePick mousePick; + mousePick.m_screenCoordinates = screenPosition; + + AzToolsFramework::ViewportInteraction::MouseInteraction mouseInteraction; + mouseInteraction.m_interactionId.m_cameraId = AZ::EntityId(); + mouseInteraction.m_interactionId.m_viewportId = viewportId; + mouseInteraction.m_mouseButtons = + AzToolsFramework::ViewportInteraction::MouseButtonsFromButton(AzToolsFramework::ViewportInteraction::MouseButton::Middle); + mouseInteraction.m_mousePick = mousePick; + mouseInteraction.m_keyboardModifiers = AzToolsFramework::ViewportInteraction::KeyboardModifiers( + static_cast(AzToolsFramework::ViewportInteraction::KeyboardModifier::Shift) | + static_cast(AzToolsFramework::ViewportInteraction::KeyboardModifier::Ctrl)); + + return AzToolsFramework::ViewportInteraction::MouseInteractionEvent( + mouseInteraction, AzToolsFramework::ViewportInteraction::MouseEvent::Down, /*captured=*/false); + } + + TEST_F(EditorVertexSelectionManipulatorFixture, VertexPlacedWhereIntersectionPointIsFoundWithCustomReferenceSpace) + { + const AZ::EntityId entityIdGround = CreateEntityForVertexIntersectionPlacement(*this); + + // position ground + AzToolsFramework::SetWorldTransform( + entityIdGround, + AZ::Transform::CreateFromMatrix3x3AndTranslation( + AZ::Matrix3x3::CreateRotationX(AZ::DegToRad(-20.0f)) * AZ::Matrix3x3::CreateRotationY(AZ::DegToRad(-40.0f)) * + AZ::Matrix3x3::CreateRotationZ(AZ::DegToRad(60.0f)), + AZ::Vector3(14.0f, -6.0f, 5.0f))); + + // camera (go to position format) - 12.00, 18.00, 16.00, -38.00, -175.00 + m_cameraState.m_viewportSize = AZ::Vector2(1280.0f, 720.0f); + AzFramework::SetCameraTransform( + m_cameraState, + AZ::Transform::CreateFromMatrix3x3AndTranslation( + AZ::Matrix3x3::CreateRotationZ(AZ::DegToRad(-175.0f)) * AZ::Matrix3x3::CreateRotationX(AZ::DegToRad(-38.0f)), + AZ::Vector3(12.0f, 18.0f, 16.0f))); + + // create orientated and scaled transform for vertex selection entity transform + auto vertexSelectionTransform = AZ::Transform::CreateFromMatrix3x3AndTranslation( + AZ::Matrix3x3::CreateRotationZ(AZ::DegToRad(45.0f)), AZ::Vector3(14.0f, 7.0f, 5.0f)); + vertexSelectionTransform.MultiplyByUniformScale(3.0f); + + // set the initial starting position of the vertex selection + AzToolsFramework::SetWorldTransform(m_entityId, vertexSelectionTransform); + + auto vertexScreenPositions = SetupVertices(m_entityId, *this); + + // press and drag the mouse (starting where the surface manipulator is) + // select each vertex (by holding ctrl) + m_actionDispatcher->CameraState(m_cameraState)->MousePosition(vertexScreenPositions[0])->MouseLButtonDown()->MouseLButtonUp(); + + const auto finalPositionWorld = AZ::Vector3(14.3573294f, -8.94695091f, 7.08627319f); + // calculate the position in screen space of the final position of the entity + const auto finalPositionScreen = AzFramework::WorldToScreen(finalPositionWorld, m_cameraState); + + auto middleMouseDownEvent = + BuildMiddleMouseDownEvent(finalPositionScreen, m_viewportManipulatorInteraction->GetViewportInteraction().GetViewportId()); + + // explicitly handle mouse event in vertex selection instance + m_vertexSelection.HandleMouse(middleMouseDownEvent); + + // read back the position of the vertex now + AZ::Vector3 localVertex = AZ::Vector3::CreateZero(); + bool found = false; + AZ::FixedVerticesRequestBus::EventResult( + found, m_entityId, &AZ::FixedVerticesRequestBus::Handler::GetVertex, 0, localVertex); + + // transform to world space + const AZ::Vector3 worldVertex = vertexSelectionTransform.TransformPoint(localVertex); + + EXPECT_THAT(found, ::testing::IsTrue()); + // ensure final world positions match + EXPECT_THAT(worldVertex, IsCloseTolerance(finalPositionWorld, 0.01f)); + } } // namespace UnitTest diff --git a/Code/Framework/AzToolsFramework/Tests/Entity/ReadOnly/ReadOnlyEntityFixture.cpp b/Code/Framework/AzToolsFramework/Tests/Entity/ReadOnly/ReadOnlyEntityFixture.cpp new file mode 100644 index 0000000000..d80ecebce0 --- /dev/null +++ b/Code/Framework/AzToolsFramework/Tests/Entity/ReadOnly/ReadOnlyEntityFixture.cpp @@ -0,0 +1,125 @@ +/* + * Copyright (c) Contributors to the Open 3D Engine Project. + * For complete copyright and license terms please see the LICENSE at the root of this distribution. + * + * SPDX-License-Identifier: Apache-2.0 OR MIT + * + */ + +#include + +#include + +namespace AzToolsFramework +{ + void ReadOnlyEntityFixture::SetUpEditorFixtureImpl() + { + // Without this, the user settings component would attempt to save on finalize/shutdown. Since the file is + // shared across the whole engine, if multiple tests are run in parallel, the saving could cause a crash + // in the unit tests. + AZ::UserSettingsComponentRequestBus::Broadcast(&AZ::UserSettingsComponentRequests::DisableSaveOnFinalize); + + m_readOnlyEntityPublicInterface = AZ::Interface::Get(); + ASSERT_TRUE(m_readOnlyEntityPublicInterface != nullptr); + + GenerateTestHierarchy(); + } + + void ReadOnlyEntityFixture::TearDownEditorFixtureImpl() + { + } + + void ReadOnlyEntityFixture::GenerateTestHierarchy() + { + /* + * Root + * |_ Child + * |_ GrandChild1 + * |_ GrandChild2 + */ + + m_entityMap[RootEntityName] = CreateEditorEntity(RootEntityName, AZ::EntityId()); + m_entityMap[ChildEntityName] = CreateEditorEntity(ChildEntityName, m_entityMap[RootEntityName]); + m_entityMap[GrandChild1EntityName] = CreateEditorEntity(GrandChild1EntityName, m_entityMap[ChildEntityName]); + m_entityMap[GrandChild2EntityName] = CreateEditorEntity(GrandChild2EntityName, m_entityMap[ChildEntityName]); + } + + AZ::EntityId ReadOnlyEntityFixture::CreateEditorEntity(const char* name, AZ::EntityId parentId) + { + AZ::Entity* entity = nullptr; + UnitTest::CreateDefaultEditorEntity(name, &entity); + + // Parent + AZ::TransformBus::Event(entity->GetId(), &AZ::TransformInterface::SetParent, parentId); + + return entity->GetId(); + } + + ReadOnlyHandlerAlwaysTrue::ReadOnlyHandlerAlwaysTrue() + { + auto editorEntityContextId = AzFramework::EntityContextId::CreateNull(); + EditorEntityContextRequestBus::BroadcastResult(editorEntityContextId, &EditorEntityContextRequests::GetEditorEntityContextId); + + ReadOnlyEntityQueryRequestBus::Handler::BusConnect(editorEntityContextId); + } + + ReadOnlyHandlerAlwaysTrue::~ReadOnlyHandlerAlwaysTrue() + { + ReadOnlyEntityQueryRequestBus::Handler::BusDisconnect(); + + if (auto readOnlyEntityQueryInterface = AZ::Interface::Get()) + { + readOnlyEntityQueryInterface->RefreshReadOnlyStateForAllEntities(); + } + } + + void ReadOnlyHandlerAlwaysTrue::IsReadOnly([[maybe_unused]] const AZ::EntityId& entityId, bool& isReadOnly) + { + isReadOnly = true; + } + + ReadOnlyHandlerAlwaysFalse::ReadOnlyHandlerAlwaysFalse() + { + auto editorEntityContextId = AzFramework::EntityContextId::CreateNull(); + EditorEntityContextRequestBus::BroadcastResult(editorEntityContextId, &EditorEntityContextRequests::GetEditorEntityContextId); + + ReadOnlyEntityQueryRequestBus::Handler::BusConnect(editorEntityContextId); + } + + ReadOnlyHandlerAlwaysFalse::~ReadOnlyHandlerAlwaysFalse() + { + ReadOnlyEntityQueryRequestBus::Handler::BusDisconnect(); + + if (auto readOnlyEntityQueryInterface = AZ::Interface::Get()) + { + readOnlyEntityQueryInterface->RefreshReadOnlyStateForAllEntities(); + } + } + + ReadOnlyHandlerEntityId::ReadOnlyHandlerEntityId(AZ::EntityId entityId) + : m_entityId(entityId) + { + auto editorEntityContextId = AzFramework::EntityContextId::CreateNull(); + EditorEntityContextRequestBus::BroadcastResult(editorEntityContextId, &EditorEntityContextRequests::GetEditorEntityContextId); + + ReadOnlyEntityQueryRequestBus::Handler::BusConnect(editorEntityContextId); + } + + ReadOnlyHandlerEntityId::~ReadOnlyHandlerEntityId() + { + ReadOnlyEntityQueryRequestBus::Handler::BusDisconnect(); + + if (auto readOnlyEntityQueryInterface = AZ::Interface::Get()) + { + readOnlyEntityQueryInterface->RefreshReadOnlyStateForAllEntities(); + } + } + + void ReadOnlyHandlerEntityId::IsReadOnly(const AZ::EntityId& entityId, bool& isReadOnly) + { + if (entityId == m_entityId) + { + isReadOnly = true; + } + } +} diff --git a/Code/Framework/AzToolsFramework/Tests/Entity/ReadOnly/ReadOnlyEntityFixture.h b/Code/Framework/AzToolsFramework/Tests/Entity/ReadOnly/ReadOnlyEntityFixture.h new file mode 100644 index 0000000000..72fff56c6a --- /dev/null +++ b/Code/Framework/AzToolsFramework/Tests/Entity/ReadOnly/ReadOnlyEntityFixture.h @@ -0,0 +1,78 @@ +/* + * Copyright (c) Contributors to the Open 3D Engine Project. + * For complete copyright and license terms please see the LICENSE at the root of this distribution. + * + * SPDX-License-Identifier: Apache-2.0 OR MIT + * + */ + +#pragma once + +#include +#include + +#include + +#include +#include +#include + +namespace AzToolsFramework +{ + class ReadOnlyEntityFixture + : public UnitTest::ToolsApplicationFixture + { + protected: + void SetUpEditorFixtureImpl() override; + void TearDownEditorFixtureImpl() override; + + void GenerateTestHierarchy(); + AZ::EntityId CreateEditorEntity(const char* name, AZ::EntityId parentId); + + AZStd::unordered_map m_entityMap; + + ReadOnlyEntityPublicInterface* m_readOnlyEntityPublicInterface = nullptr; + + public: + inline static const char* RootEntityName = "Root"; + inline static const char* ChildEntityName = "Child"; + inline static const char* GrandChild1EntityName = "GrandChild1"; + inline static const char* GrandChild2EntityName = "GrandChild2"; + }; + + class ReadOnlyHandlerAlwaysTrue + : public ReadOnlyEntityQueryRequestBus::Handler + { + public: + ReadOnlyHandlerAlwaysTrue(); + ~ReadOnlyHandlerAlwaysTrue(); + + // ReadOnlyEntityQueryNotificationBus overrides ... + void IsReadOnly(const AZ::EntityId& entityId, bool& isReadOnly) override; + }; + + class ReadOnlyHandlerAlwaysFalse + : public ReadOnlyEntityQueryRequestBus::Handler + { + public: + ReadOnlyHandlerAlwaysFalse(); + ~ReadOnlyHandlerAlwaysFalse(); + + // ReadOnlyEntityQueryNotificationBus overrides ... + void IsReadOnly([[maybe_unused]] const AZ::EntityId& entityId, [[maybe_unused]] bool& isReadOnly) override {} + }; + + class ReadOnlyHandlerEntityId + : public ReadOnlyEntityQueryRequestBus::Handler + { + public: + ReadOnlyHandlerEntityId(AZ::EntityId entityId); + ~ReadOnlyHandlerEntityId(); + + // ReadOnlyEntityQueryNotificationBus overrides ... + void IsReadOnly(const AZ::EntityId& entityId, bool& isReadOnly) override; + + private: + AZ::EntityId m_entityId; + }; +} diff --git a/Code/Framework/AzToolsFramework/Tests/Entity/ReadOnly/ReadOnlyEntityTests.cpp b/Code/Framework/AzToolsFramework/Tests/Entity/ReadOnly/ReadOnlyEntityTests.cpp new file mode 100644 index 0000000000..69a130b33f --- /dev/null +++ b/Code/Framework/AzToolsFramework/Tests/Entity/ReadOnly/ReadOnlyEntityTests.cpp @@ -0,0 +1,117 @@ +/* + * Copyright (c) Contributors to the Open 3D Engine Project. + * For complete copyright and license terms please see the LICENSE at the root of this distribution. + * + * SPDX-License-Identifier: Apache-2.0 OR MIT + * + */ + +#include + +namespace AzToolsFramework +{ + TEST_F(ReadOnlyEntityFixture, NoHandlerEntityIsNotReadOnlyByDefault) + { + EXPECT_FALSE(m_readOnlyEntityPublicInterface->IsReadOnly(m_entityMap[ChildEntityName])); + } + + TEST_F(ReadOnlyEntityFixture, SingleHandlerEntityIsReadOnly) + { + // Create a handler that sets all entities to read-only. + ReadOnlyHandlerAlwaysTrue alwaysTrueHandler; + + // All entities should be marked read-only now. + EXPECT_TRUE(m_readOnlyEntityPublicInterface->IsReadOnly(m_entityMap[RootEntityName])); + EXPECT_TRUE(m_readOnlyEntityPublicInterface->IsReadOnly(m_entityMap[ChildEntityName])); + EXPECT_TRUE(m_readOnlyEntityPublicInterface->IsReadOnly(m_entityMap[GrandChild1EntityName])); + EXPECT_TRUE(m_readOnlyEntityPublicInterface->IsReadOnly(m_entityMap[GrandChild2EntityName])); + } + + TEST_F(ReadOnlyEntityFixture, SingleHandlerEntityIsNotReadOnly) + { + // Create a handler that sets all entities to read-only. + ReadOnlyHandlerAlwaysFalse alwaysFalseHandler; + + // All entities should not be marked read-only now. + EXPECT_FALSE(m_readOnlyEntityPublicInterface->IsReadOnly(m_entityMap[RootEntityName])); + EXPECT_FALSE(m_readOnlyEntityPublicInterface->IsReadOnly(m_entityMap[ChildEntityName])); + EXPECT_FALSE(m_readOnlyEntityPublicInterface->IsReadOnly(m_entityMap[GrandChild1EntityName])); + EXPECT_FALSE(m_readOnlyEntityPublicInterface->IsReadOnly(m_entityMap[GrandChild2EntityName])); + } + + TEST_F(ReadOnlyEntityFixture, SingleHandlerWithLogic) + { + // Create a handler that sets just the child entity to read-only. + ReadOnlyHandlerEntityId entityIdHandler(m_entityMap[ChildEntityName]); + + EXPECT_FALSE(m_readOnlyEntityPublicInterface->IsReadOnly(m_entityMap[RootEntityName])); + EXPECT_TRUE(m_readOnlyEntityPublicInterface->IsReadOnly(m_entityMap[ChildEntityName])); + EXPECT_FALSE(m_readOnlyEntityPublicInterface->IsReadOnly(m_entityMap[GrandChild1EntityName])); + EXPECT_FALSE(m_readOnlyEntityPublicInterface->IsReadOnly(m_entityMap[GrandChild2EntityName])); + } + + TEST_F(ReadOnlyEntityFixture, TwoHandlersCanOverlap) + { + // Create two handlers that set different entities to read-only. + ReadOnlyHandlerEntityId entityIdHandler1(m_entityMap[ChildEntityName]); + ReadOnlyHandlerEntityId entityIdHandler2(m_entityMap[GrandChild2EntityName]); + + // Both entities should be marked as read-only, while others aren't. + EXPECT_FALSE(m_readOnlyEntityPublicInterface->IsReadOnly(m_entityMap[RootEntityName])); + EXPECT_TRUE(m_readOnlyEntityPublicInterface->IsReadOnly(m_entityMap[ChildEntityName])); + EXPECT_FALSE(m_readOnlyEntityPublicInterface->IsReadOnly(m_entityMap[GrandChild1EntityName])); + EXPECT_TRUE(m_readOnlyEntityPublicInterface->IsReadOnly(m_entityMap[GrandChild2EntityName])); + } + + TEST_F(ReadOnlyEntityFixture, EnsureCacheIsRefreshedCorrectly) + { + // Verify the child entity is not marked as read-only + EXPECT_FALSE(m_readOnlyEntityPublicInterface->IsReadOnly(m_entityMap[ChildEntityName])); + + // Create a handler that sets the child entity to read-only. + ReadOnlyHandlerEntityId entityIdHandler(m_entityMap[ChildEntityName]); + + // Communicate to the ReadOnlyEntitySystemComponent that the read-only state for the child entity may have changed. + // Note that this operation would usually be executed by the handler, hence the Query interface call. + if (auto readOnlyEntityQueryInterface = AZ::Interface::Get()) + { + readOnlyEntityQueryInterface->RefreshReadOnlyState({ m_entityMap[ChildEntityName] }); + } + + // Verify the child entity is marked as read-only + EXPECT_TRUE(m_readOnlyEntityPublicInterface->IsReadOnly(m_entityMap[ChildEntityName])); + } + + TEST_F(ReadOnlyEntityFixture, EnsureCacheIsClearedCorrectly) + { + { + // Create a handler that sets the child entity to read-only. + ReadOnlyHandlerEntityId entityIdHandler(m_entityMap[ChildEntityName]); + + // Verify the child entity is marked as read-only + EXPECT_TRUE(m_readOnlyEntityPublicInterface->IsReadOnly(m_entityMap[ChildEntityName])); + } + // When the handler goes out of scope, it calls RefreshReadOnlyStateForAllEntities and refreshes the cache. + + // Verify the child entity is no longer marked as read-only + EXPECT_FALSE(m_readOnlyEntityPublicInterface->IsReadOnly(m_entityMap[ChildEntityName])); + } + + TEST_F(ReadOnlyEntityFixture, EnsureCacheIsClearedCorrectlyEvenIfUnchanged) + { + // Create a handler that sets all entities to read-only. + ReadOnlyHandlerAlwaysTrue alwaysTrueHandler; + + { + // Create a handler that sets the child entity to read-only. + ReadOnlyHandlerEntityId entityIdHandler(m_entityMap[ChildEntityName]); + + // Verify the child entity is marked as read-only + EXPECT_TRUE(m_readOnlyEntityPublicInterface->IsReadOnly(m_entityMap[ChildEntityName])); + } + // When the handler goes out of scope, it calls RefreshReadOnlyStateForAllEntities and refreshes the cache. + + // Verify the child entity is still marked as read-only + EXPECT_TRUE(m_readOnlyEntityPublicInterface->IsReadOnly(m_entityMap[ChildEntityName])); + } +} diff --git a/Code/Framework/AzToolsFramework/Tests/EntityIdQLabelTests.cpp b/Code/Framework/AzToolsFramework/Tests/EntityIdQLabelTests.cpp index 486224c011..c2b4ff3cc4 100644 --- a/Code/Framework/AzToolsFramework/Tests/EntityIdQLabelTests.cpp +++ b/Code/Framework/AzToolsFramework/Tests/EntityIdQLabelTests.cpp @@ -62,7 +62,6 @@ namespace UnitTest void BrowseForAssets(AssetBrowser::AssetSelectionModel& /*selection*/) override {} int GetIconTextureIdFromEntityIconPath(const AZStd::string& entityIconPath) override { AZ_UNUSED(entityIconPath); return 0; } - bool DisplayHelpersVisible() override { return false; } void GoToSelectedEntitiesInViewports() override { diff --git a/Code/Framework/AzToolsFramework/Tests/EntityOwnershipService/EntityOwnershipServiceTestFixture.cpp b/Code/Framework/AzToolsFramework/Tests/EntityOwnershipService/EntityOwnershipServiceTestFixture.cpp index 646576a8c9..9cfb918758 100644 --- a/Code/Framework/AzToolsFramework/Tests/EntityOwnershipService/EntityOwnershipServiceTestFixture.cpp +++ b/Code/Framework/AzToolsFramework/Tests/EntityOwnershipService/EntityOwnershipServiceTestFixture.cpp @@ -19,7 +19,6 @@ namespace UnitTest AllocatorsTestFixture::SetUp(); AZ::ComponentApplication::Descriptor componentApplicationDescriptor; componentApplicationDescriptor.m_useExistingAllocator = true; - componentApplicationDescriptor.m_enableDrilling = false; // we already created a memory driller for the test(AllocatorsTestFixture) m_app = AZStd::make_unique(); m_app->Start(componentApplicationDescriptor); diff --git a/Code/Framework/AzToolsFramework/Tests/EntityTestbed.h b/Code/Framework/AzToolsFramework/Tests/EntityTestbed.h index 1bf51045c0..b100e78f6c 100644 --- a/Code/Framework/AzToolsFramework/Tests/EntityTestbed.h +++ b/Code/Framework/AzToolsFramework/Tests/EntityTestbed.h @@ -163,7 +163,6 @@ namespace UnitTest void SetupComponentApplication() { AZ::ComponentApplication::Descriptor desc; - desc.m_enableDrilling = true; desc.m_allocationRecords = true; desc.m_recordingMode = AZ::Debug::AllocationRecords::RECORD_FULL; desc.m_stackRecordLevels = 10; diff --git a/Code/Framework/AzToolsFramework/Tests/FocusMode/ContainerEntitySelectionTests.cpp b/Code/Framework/AzToolsFramework/Tests/FocusMode/ContainerEntitySelectionTests.cpp index a47e41da42..0ad61b924b 100644 --- a/Code/Framework/AzToolsFramework/Tests/FocusMode/ContainerEntitySelectionTests.cpp +++ b/Code/Framework/AzToolsFramework/Tests/FocusMode/ContainerEntitySelectionTests.cpp @@ -8,12 +8,12 @@ #include -namespace AzToolsFramework +namespace UnitTest { - TEST_F(EditorFocusModeSelectionFixture, ContainerEntitySelectionTests_FindHighestSelectableEntityWithNoContainers) + TEST_F(EditorFocusModeSelectionFixture, ContainerEntitySelectionFindHighestSelectableEntityWithNoContainers) { // When no containers are in the way, the function will just return the entityId of the entity that was clicked. - + // Click on Car Entity ClickAtWorldPositionOnViewport(WorldCarEntityPosition); @@ -23,7 +23,7 @@ namespace AzToolsFramework EXPECT_EQ(selectedEntitiesAfter.front(), m_entityMap[CarEntityName]); } - TEST_F(EditorFocusModeSelectionFixture, ContainerEntitySelectionTests_FindHighestSelectableEntityWithClosedContainer) + TEST_F(EditorFocusModeSelectionFixture, ContainerEntitySelectionFindHighestSelectableEntityWithClosedContainer) { // If a closed container is an ancestor of the queried entity, the closed container is selected. m_containerEntityInterface->RegisterEntityAsContainer(m_entityMap[StreetEntityName]); // Containers are closed by default @@ -40,7 +40,7 @@ namespace AzToolsFramework m_containerEntityInterface->UnregisterEntityAsContainer(m_entityMap[StreetEntityName]); } - TEST_F(EditorFocusModeSelectionFixture, ContainerEntitySelectionTests_FindHighestSelectableEntityWithOpenContainer) + TEST_F(EditorFocusModeSelectionFixture, ContainerEntitySelectionFindHighestSelectableEntityWithOpenContainer) { // If a closed container is an ancestor of the queried entity, the closed container is selected. m_containerEntityInterface->RegisterEntityAsContainer(m_entityMap[StreetEntityName]); @@ -58,7 +58,7 @@ namespace AzToolsFramework m_containerEntityInterface->UnregisterEntityAsContainer(m_entityMap[StreetEntityName]); } - TEST_F(EditorFocusModeSelectionFixture, ContainerEntitySelectionTests_FindHighestSelectableEntityWithMultipleClosedContainers) + TEST_F(EditorFocusModeSelectionFixture, ContainerEntitySelectionFindHighestSelectableEntityWithMultipleClosedContainers) { // If multiple closed containers are ancestors of the queried entity, the highest closed container is selected. m_containerEntityInterface->RegisterEntityAsContainer(m_entityMap[StreetEntityName]); @@ -77,7 +77,7 @@ namespace AzToolsFramework m_containerEntityInterface->UnregisterEntityAsContainer(m_entityMap[CityEntityName]); } - TEST_F(EditorFocusModeSelectionFixture, ContainerEntitySelectionTests_FindHighestSelectableEntityWithMultipleContainers) + TEST_F(EditorFocusModeSelectionFixture, ContainerEntitySelectionFindHighestSelectableEntityWithMultipleContainers) { // If multiple containers are ancestors of the queried entity, the highest closed container is selected. m_containerEntityInterface->RegisterEntityAsContainer(m_entityMap[StreetEntityName]); @@ -96,4 +96,4 @@ namespace AzToolsFramework m_containerEntityInterface->UnregisterEntityAsContainer(m_entityMap[StreetEntityName]); m_containerEntityInterface->UnregisterEntityAsContainer(m_entityMap[CityEntityName]); } -} +} // namespace UnitTest diff --git a/Code/Framework/AzToolsFramework/Tests/FocusMode/ContainerEntityTests.cpp b/Code/Framework/AzToolsFramework/Tests/FocusMode/ContainerEntityTests.cpp index 031062f027..db81f7bb0b 100644 --- a/Code/Framework/AzToolsFramework/Tests/FocusMode/ContainerEntityTests.cpp +++ b/Code/Framework/AzToolsFramework/Tests/FocusMode/ContainerEntityTests.cpp @@ -8,9 +8,9 @@ #include -namespace AzToolsFramework +namespace UnitTest { - TEST_F(EditorFocusModeFixture, ContainerEntityTests_Register) + TEST_F(EditorFocusModeFixture, ContainerEntityRegister) { // Registering an entity is successful. auto outcome = m_containerEntityInterface->RegisterEntityAsContainer(m_entityMap[CarEntityName]); @@ -20,7 +20,7 @@ namespace AzToolsFramework m_containerEntityInterface->UnregisterEntityAsContainer(m_entityMap[CarEntityName]); } - TEST_F(EditorFocusModeFixture, ContainerEntityTests_RegisterTwice) + TEST_F(EditorFocusModeFixture, ContainerEntityRegisterTwice) { // Registering an entity twice fails. m_containerEntityInterface->RegisterEntityAsContainer(m_entityMap[CarEntityName]); @@ -31,7 +31,7 @@ namespace AzToolsFramework m_containerEntityInterface->UnregisterEntityAsContainer(m_entityMap[CarEntityName]); } - TEST_F(EditorFocusModeFixture, ContainerEntityTests_Unregister) + TEST_F(EditorFocusModeFixture, ContainerEntityUnregister) { // Unregistering a container entity is successful. m_containerEntityInterface->RegisterEntityAsContainer(m_entityMap[CarEntityName]); @@ -39,21 +39,21 @@ namespace AzToolsFramework EXPECT_TRUE(outcome.IsSuccess()); } - TEST_F(EditorFocusModeFixture, ContainerEntityTests_UnregisterRegularEntity) + TEST_F(EditorFocusModeFixture, ContainerEntityUnregisterRegularEntity) { // Unregistering an entity that was not previously registered fails. auto outcome = m_containerEntityInterface->UnregisterEntityAsContainer(m_entityMap[CarEntityName]); EXPECT_FALSE(outcome.IsSuccess()); } - TEST_F(EditorFocusModeFixture, ContainerEntityTests_UnregisterTwice) + TEST_F(EditorFocusModeFixture, ContainerEntityUnregisterTwice) { // Unregistering a container entity twice fails. auto outcome = m_containerEntityInterface->UnregisterEntityAsContainer(m_entityMap[CarEntityName]); EXPECT_FALSE(outcome.IsSuccess()); } - TEST_F(EditorFocusModeFixture, ContainerEntityTests_IsContainerOnRegularEntity) + TEST_F(EditorFocusModeFixture, ContainerEntityIsContainerOnRegularEntity) { // If a regular entity is passed, IsContainer returns false. // Note that we use a different entity than the tests above to validate a completely new EntityId. @@ -61,7 +61,7 @@ namespace AzToolsFramework EXPECT_FALSE(isContainer); } - TEST_F(EditorFocusModeFixture, ContainerEntityTests_IsContainerOnRegisteredContainer) + TEST_F(EditorFocusModeFixture, ContainerEntityIsContainerOnRegisteredContainer) { // If a container entity is passed, IsContainer returns true. m_containerEntityInterface->RegisterEntityAsContainer(m_entityMap[SportsCarEntityName]); @@ -72,7 +72,7 @@ namespace AzToolsFramework m_containerEntityInterface->UnregisterEntityAsContainer(m_entityMap[SportsCarEntityName]); } - TEST_F(EditorFocusModeFixture, ContainerEntityTests_IsContainerOnUnRegisteredContainer) + TEST_F(EditorFocusModeFixture, ContainerEntityIsContainerOnUnRegisteredContainer) { // If an entity that was previously a container but was then unregistered is passed, IsContainer returns false. m_containerEntityInterface->RegisterEntityAsContainer(m_entityMap[SportsCarEntityName]); @@ -82,14 +82,14 @@ namespace AzToolsFramework EXPECT_FALSE(isContainer); } - TEST_F(EditorFocusModeFixture, ContainerEntityTests_SetContainerOpenOnRegularEntity) + TEST_F(EditorFocusModeFixture, ContainerEntitySetContainerOpenOnRegularEntity) { // Setting a regular entity to open should return a failure. auto outcome = m_containerEntityInterface->SetContainerOpen(m_entityMap[StreetEntityName], true); EXPECT_FALSE(outcome.IsSuccess()); } - TEST_F(EditorFocusModeFixture, ContainerEntityTests_SetContainerOpen) + TEST_F(EditorFocusModeFixture, ContainerEntitySetContainerOpen) { // Set a container entity to open, and verify the operation was successful. m_containerEntityInterface->RegisterEntityAsContainer(m_entityMap[StreetEntityName]); @@ -100,7 +100,7 @@ namespace AzToolsFramework m_containerEntityInterface->UnregisterEntityAsContainer(m_entityMap[StreetEntityName]); } - TEST_F(EditorFocusModeFixture, ContainerEntityTests_SetContainerOpenTwice) + TEST_F(EditorFocusModeFixture, ContainerEntitySetContainerOpenTwice) { // Set a container entity to open twice, and verify that does not cause a failure (as intended). m_containerEntityInterface->RegisterEntityAsContainer(m_entityMap[StreetEntityName]); @@ -112,7 +112,7 @@ namespace AzToolsFramework m_containerEntityInterface->UnregisterEntityAsContainer(m_entityMap[StreetEntityName]); } - TEST_F(EditorFocusModeFixture, ContainerEntityTests_SetContainerClosed) + TEST_F(EditorFocusModeFixture, ContainerEntitySetContainerClosed) { // Set a container entity to closed, and verify the operation was successful. m_containerEntityInterface->RegisterEntityAsContainer(m_entityMap[StreetEntityName]); @@ -122,16 +122,16 @@ namespace AzToolsFramework // Restore default state for other tests. m_containerEntityInterface->UnregisterEntityAsContainer(m_entityMap[StreetEntityName]); } - - TEST_F(EditorFocusModeFixture, ContainerEntityTests_IsContainerOpenOnRegularEntity) + + TEST_F(EditorFocusModeFixture, ContainerEntityIsContainerOpenOnRegularEntity) { // Query open state on a regular entity, and verify it returns true. // Open containers behave exactly as regular entities, so this is the expected return value. bool isOpen = m_containerEntityInterface->IsContainerOpen(m_entityMap[CityEntityName]); EXPECT_TRUE(isOpen); } - - TEST_F(EditorFocusModeFixture, ContainerEntityTests_IsContainerOpenOnDefaultContainerEntity) + + TEST_F(EditorFocusModeFixture, ContainerEntityIsContainerOpenOnDefaultContainerEntity) { // Query open state on a newly registered container entity, and verify it returns false. // Containers are registered closed by default. @@ -142,8 +142,8 @@ namespace AzToolsFramework // Restore default state for other tests. m_containerEntityInterface->UnregisterEntityAsContainer(m_entityMap[CityEntityName]); } - - TEST_F(EditorFocusModeFixture, ContainerEntityTests_IsContainerOpenOnOpenContainerEntity) + + TEST_F(EditorFocusModeFixture, ContainerEntityIsContainerOpenOnOpenContainerEntity) { // Query open state on a container entity that was opened, and verify it returns true. m_containerEntityInterface->RegisterEntityAsContainer(m_entityMap[CityEntityName]); @@ -154,8 +154,8 @@ namespace AzToolsFramework // Restore default state for other tests. m_containerEntityInterface->UnregisterEntityAsContainer(m_entityMap[CityEntityName]); } - - TEST_F(EditorFocusModeFixture, ContainerEntityTests_IsContainerOpenOnClosedContainerEntity) + + TEST_F(EditorFocusModeFixture, ContainerEntityIsContainerOpenOnClosedContainerEntity) { // Query open state on a container entity that was opened and then closed, and verify it returns false. m_containerEntityInterface->RegisterEntityAsContainer(m_entityMap[CityEntityName]); @@ -167,8 +167,8 @@ namespace AzToolsFramework // Restore default state for other tests. m_containerEntityInterface->UnregisterEntityAsContainer(m_entityMap[CityEntityName]); } - - TEST_F(EditorFocusModeFixture, ContainerEntityTests_ContainerOpenStateIsPreserved) + + TEST_F(EditorFocusModeFixture, ContainerEntityContainerOpenStateIsPreserved) { // Register an entity as container, open it, then unregister it. // When the entity is registered again, the open state should be preserved. @@ -184,15 +184,15 @@ namespace AzToolsFramework // Restore default state for other tests. m_containerEntityInterface->UnregisterEntityAsContainer(m_entityMap[CityEntityName]); } - - TEST_F(EditorFocusModeFixture, ContainerEntityTests_ClearSucceeds) + + TEST_F(EditorFocusModeFixture, ContainerEntityClearSucceeds) { // The Clear function works if no container is registered. auto outcome = m_containerEntityInterface->Clear(m_editorEntityContextId); EXPECT_TRUE(outcome.IsSuccess()); } - - TEST_F(EditorFocusModeFixture, ContainerEntityTests_ClearFailsIfContainersAreStillRegistered) + + TEST_F(EditorFocusModeFixture, ContainerEntityClearFailsIfContainersAreStillRegistered) { // The Clear function fails if a container is registered. m_containerEntityInterface->RegisterEntityAsContainer(m_entityMap[Passenger1EntityName]); @@ -202,8 +202,8 @@ namespace AzToolsFramework // Restore default state for other tests. m_containerEntityInterface->UnregisterEntityAsContainer(m_entityMap[Passenger1EntityName]); } - - TEST_F(EditorFocusModeFixture, ContainerEntityTests_ClearSucceedsIfContainersAreUnregistered) + + TEST_F(EditorFocusModeFixture, ContainerEntityClearSucceedsIfContainersAreUnregistered) { // The Clear function fails if a container is registered. m_containerEntityInterface->RegisterEntityAsContainer(m_entityMap[Passenger1EntityName]); @@ -212,7 +212,7 @@ namespace AzToolsFramework EXPECT_TRUE(outcome.IsSuccess()); } - TEST_F(EditorFocusModeFixture, ContainerEntityTests_ClearDeletesPreservedOpenStates) + TEST_F(EditorFocusModeFixture, ContainerEntityClearDeletesPreservedOpenStates) { // Register an entity as container, open it, unregister it, then call clear. // When the entity is registered again, the open state should not be preserved. @@ -230,14 +230,14 @@ namespace AzToolsFramework m_containerEntityInterface->UnregisterEntityAsContainer(m_entityMap[Passenger1EntityName]); } - TEST_F(EditorFocusModeFixture, ContainerEntityTests_FindHighestSelectableEntityWithNoContainers) + TEST_F(EditorFocusModeFixture, ContainerEntityFindHighestSelectableEntityWithNoContainers) { // When no containers are in the way, the function will just return the entityId that was passed to it. AZ::EntityId selectedEntityId = m_containerEntityInterface->FindHighestSelectableEntity(m_entityMap[Passenger2EntityName]); EXPECT_EQ(selectedEntityId, m_entityMap[Passenger2EntityName]); } - TEST_F(EditorFocusModeFixture, ContainerEntityTests_FindHighestSelectableEntityWithClosedContainer) + TEST_F(EditorFocusModeFixture, ContainerEntityFindHighestSelectableEntityWithClosedContainer) { // If a closed container is an ancestor of the queried entity, the closed container is selected. m_containerEntityInterface->RegisterEntityAsContainer(m_entityMap[SportsCarEntityName]); // Containers are closed by default @@ -248,7 +248,7 @@ namespace AzToolsFramework m_containerEntityInterface->UnregisterEntityAsContainer(m_entityMap[SportsCarEntityName]); } - TEST_F(EditorFocusModeFixture, ContainerEntityTests_FindHighestSelectableEntityWithOpenContainer) + TEST_F(EditorFocusModeFixture, ContainerEntityFindHighestSelectableEntityWithOpenContainer) { // If an open container is an ancestor of the queried entity, it is ignored. m_containerEntityInterface->RegisterEntityAsContainer(m_entityMap[SportsCarEntityName]); @@ -261,7 +261,7 @@ namespace AzToolsFramework m_containerEntityInterface->UnregisterEntityAsContainer(m_entityMap[SportsCarEntityName]); } - TEST_F(EditorFocusModeFixture, ContainerEntityTests_FindHighestSelectableEntityWithMultipleClosedContainers) + TEST_F(EditorFocusModeFixture, ContainerEntityFindHighestSelectableEntityWithMultipleClosedContainers) { // If multiple closed containers are ancestors of the queried entity, the highest closed container is selected. m_containerEntityInterface->RegisterEntityAsContainer(m_entityMap[StreetEntityName]); @@ -275,7 +275,7 @@ namespace AzToolsFramework m_containerEntityInterface->UnregisterEntityAsContainer(m_entityMap[SportsCarEntityName]); } - TEST_F(EditorFocusModeFixture, ContainerEntityTests_FindHighestSelectableEntityWithMultipleContainers) + TEST_F(EditorFocusModeFixture, ContainerEntityFindHighestSelectableEntityWithMultipleContainers) { // If multiple containers are ancestors of the queried entity, the highest closed container is selected. m_containerEntityInterface->RegisterEntityAsContainer(m_entityMap[StreetEntityName]); @@ -289,5 +289,4 @@ namespace AzToolsFramework m_containerEntityInterface->UnregisterEntityAsContainer(m_entityMap[StreetEntityName]); m_containerEntityInterface->UnregisterEntityAsContainer(m_entityMap[SportsCarEntityName]); } - -} +} // namespace UnitTest diff --git a/Code/Framework/AzToolsFramework/Tests/FocusMode/EditorFocusModeFixture.cpp b/Code/Framework/AzToolsFramework/Tests/FocusMode/EditorFocusModeFixture.cpp index 49bf7cee15..90becfa46f 100644 --- a/Code/Framework/AzToolsFramework/Tests/FocusMode/EditorFocusModeFixture.cpp +++ b/Code/Framework/AzToolsFramework/Tests/FocusMode/EditorFocusModeFixture.cpp @@ -12,7 +12,7 @@ #include -namespace AzToolsFramework +namespace UnitTest { void ClearSelectedEntities() { @@ -31,14 +31,14 @@ namespace AzToolsFramework void EditorFocusModeFixture::SetUpEditorFixtureImpl() { // Without this, the user settings component would attempt to save on finalize/shutdown. Since the file is - // shared across the whole engine, if multiple tests are run in parallel, the saving could cause a crash + // shared across the whole engine, if multiple tests are run in parallel, the saving could cause a crash // in the unit tests. AZ::UserSettingsComponentRequestBus::Broadcast(&AZ::UserSettingsComponentRequests::DisableSaveOnFinalize); - m_containerEntityInterface = AZ::Interface::Get(); + m_containerEntityInterface = AZ::Interface::Get(); ASSERT_TRUE(m_containerEntityInterface != nullptr); - m_focusModeInterface = AZ::Interface::Get(); + m_focusModeInterface = AZ::Interface::Get(); ASSERT_TRUE(m_focusModeInterface != nullptr); // register a simple component implementing BoundsRequestBus and EditorComponentSelectionRequestsBus @@ -68,26 +68,26 @@ namespace AzToolsFramework ClearSelectedEntities(); } - void EditorFocusModeFixture::GenerateTestHierarchy() + void EditorFocusModeFixture::GenerateTestHierarchy() { /* - * City - * |_ Street - * |_ Car - * | |_ Passenger - * |_ SportsCar - * |_ Passenger - */ + * City + * |_ Street + * |_ Car + * | |_ Passenger + * |_ SportsCar + * |_ Passenger + */ - m_entityMap[CityEntityName] = CreateEditorEntity(CityEntityName, AZ::EntityId()); - m_entityMap[StreetEntityName] = CreateEditorEntity(StreetEntityName, m_entityMap[CityEntityName]); - m_entityMap[CarEntityName] = CreateEditorEntity(CarEntityName, m_entityMap[StreetEntityName]); - m_entityMap[Passenger1EntityName] = CreateEditorEntity(Passenger1EntityName, m_entityMap[CarEntityName]); - m_entityMap[SportsCarEntityName] = CreateEditorEntity(SportsCarEntityName, m_entityMap[StreetEntityName]); - m_entityMap[Passenger2EntityName] = CreateEditorEntity(Passenger2EntityName, m_entityMap[SportsCarEntityName]); + m_entityMap[CityEntityName] = CreateEditorEntity(CityEntityName, AZ::EntityId()); + m_entityMap[StreetEntityName] = CreateEditorEntity(StreetEntityName, m_entityMap[CityEntityName]); + m_entityMap[CarEntityName] = CreateEditorEntity(CarEntityName, m_entityMap[StreetEntityName]); + m_entityMap[Passenger1EntityName] = CreateEditorEntity(Passenger1EntityName, m_entityMap[CarEntityName]); + m_entityMap[SportsCarEntityName] = CreateEditorEntity(SportsCarEntityName, m_entityMap[StreetEntityName]); + m_entityMap[Passenger2EntityName] = CreateEditorEntity(Passenger2EntityName, m_entityMap[SportsCarEntityName]); // Add a BoundsTestComponent to the Car entity. - AZ::Entity* entity = GetEntityById(m_entityMap[CarEntityName]); + AZ::Entity* entity = AzToolsFramework::GetEntityById(m_entityMap[CarEntityName]); entity->Deactivate(); entity->CreateComponent(); @@ -113,4 +113,4 @@ namespace AzToolsFramework return entity->GetId(); } -} +} // namespace UnitTest diff --git a/Code/Framework/AzToolsFramework/Tests/FocusMode/EditorFocusModeFixture.h b/Code/Framework/AzToolsFramework/Tests/FocusMode/EditorFocusModeFixture.h index c48795a3a4..0cf1be6ffd 100644 --- a/Code/Framework/AzToolsFramework/Tests/FocusMode/EditorFocusModeFixture.h +++ b/Code/Framework/AzToolsFramework/Tests/FocusMode/EditorFocusModeFixture.h @@ -18,10 +18,9 @@ #include #include -namespace AzToolsFramework +namespace UnitTest { - class EditorFocusModeFixture - : public UnitTest::ToolsApplicationFixture + class EditorFocusModeFixture : public ToolsApplicationFixture { protected: void SetUpEditorFixtureImpl() override; @@ -32,8 +31,8 @@ namespace AzToolsFramework AZStd::unordered_map m_entityMap; - ContainerEntityInterface* m_containerEntityInterface = nullptr; - FocusModeInterface* m_focusModeInterface = nullptr; + AzToolsFramework::ContainerEntityInterface* m_containerEntityInterface = nullptr; + AzToolsFramework::FocusModeInterface* m_focusModeInterface = nullptr; public: AzToolsFramework::EntityIdList GetSelectedEntities(); @@ -53,4 +52,4 @@ namespace AzToolsFramework inline static AZ::Vector3 WorldCarEntityPosition = AZ::Vector3(5.0f, 15.0f, 0.0f); }; -} +} // namespace UnitTest diff --git a/Code/Framework/AzToolsFramework/Tests/FocusMode/EditorFocusModeSelectionFixture.h b/Code/Framework/AzToolsFramework/Tests/FocusMode/EditorFocusModeSelectionFixture.h index 4c9369bc46..fe1de9b122 100644 --- a/Code/Framework/AzToolsFramework/Tests/FocusMode/EditorFocusModeSelectionFixture.h +++ b/Code/Framework/AzToolsFramework/Tests/FocusMode/EditorFocusModeSelectionFixture.h @@ -26,11 +26,17 @@ #include #include -namespace AzToolsFramework +namespace UnitTest { - class EditorFocusModeSelectionFixture : public UnitTest::IndirectCallManipulatorViewportInteractionFixtureMixin + class EditorFocusModeSelectionFixture : public IndirectCallManipulatorViewportInteractionFixtureMixin { public: + void SetUpEditorFixtureImpl() override + { + IndirectCallManipulatorViewportInteractionFixtureMixin::SetUpEditorFixtureImpl(); + m_viewportManipulatorInteraction->GetViewportInteraction().SetIconsVisible(false); + } + void ClickAtWorldPositionOnViewport(const AZ::Vector3& worldPosition) { // Calculate the world position in screen space @@ -40,4 +46,4 @@ namespace AzToolsFramework m_actionDispatcher->CameraState(m_cameraState)->MousePosition(carScreenPosition)->MouseLButtonDown()->MouseLButtonUp(); } }; -} // namespace AzToolsFramework +} // namespace UnitTest diff --git a/Code/Framework/AzToolsFramework/Tests/FocusMode/EditorFocusModeSelectionTests.cpp b/Code/Framework/AzToolsFramework/Tests/FocusMode/EditorFocusModeSelectionTests.cpp index 2f746c9d63..1efcb15b30 100644 --- a/Code/Framework/AzToolsFramework/Tests/FocusMode/EditorFocusModeSelectionTests.cpp +++ b/Code/Framework/AzToolsFramework/Tests/FocusMode/EditorFocusModeSelectionTests.cpp @@ -8,9 +8,9 @@ #include -namespace AzToolsFramework +namespace UnitTest { - TEST_F(EditorFocusModeSelectionFixture, EditorFocusModeSelectionTests_SelectEntityWithFocusOnLevel) + TEST_F(EditorFocusModeSelectionFixture, EditorFocusModeSelectionSelectEntityWithFocusOnLevel) { // Click on Car Entity ClickAtWorldPositionOnViewport(WorldCarEntityPosition); @@ -21,7 +21,7 @@ namespace AzToolsFramework EXPECT_EQ(selectedEntitiesAfter.front(), m_entityMap[CarEntityName]); } - TEST_F(EditorFocusModeSelectionFixture, EditorFocusModeSelectionTests_SelectEntityWithFocusOnAncestor) + TEST_F(EditorFocusModeSelectionFixture, EditorFocusModeSelectionSelectEntityWithFocusOnAncestor) { // Set the focus on the Street Entity (parent of the test entity) m_focusModeInterface->SetFocusRoot(m_entityMap[StreetEntityName]); @@ -35,7 +35,7 @@ namespace AzToolsFramework EXPECT_EQ(selectedEntitiesAfter.front(), m_entityMap[CarEntityName]); } - TEST_F(EditorFocusModeSelectionFixture, EditorFocusModeSelectionTests_SelectEntityWithFocusOnItself) + TEST_F(EditorFocusModeSelectionFixture, EditorFocusModeSelectionSelectEntityWithFocusOnItself) { // Set the focus on the Car Entity (test entity) m_focusModeInterface->SetFocusRoot(m_entityMap[CarEntityName]); @@ -49,7 +49,7 @@ namespace AzToolsFramework EXPECT_EQ(selectedEntitiesAfter.front(), m_entityMap[CarEntityName]); } - TEST_F(EditorFocusModeSelectionFixture, EditorFocusModeSelectionTests_SelectEntityWithFocusOnSibling) + TEST_F(EditorFocusModeSelectionFixture, EditorFocusModeSelectionSelectEntityWithFocusOnSibling) { // Set the focus on the SportsCar Entity (sibling of the test entity) m_focusModeInterface->SetFocusRoot(m_entityMap[SportsCarEntityName]); @@ -62,7 +62,7 @@ namespace AzToolsFramework EXPECT_EQ(selectedEntitiesAfter.size(), 0); } - TEST_F(EditorFocusModeSelectionFixture, EditorFocusModeSelectionTests_SelectEntityWithFocusOnDescendant) + TEST_F(EditorFocusModeSelectionFixture, EditorFocusModeSelectionSelectEntityWithFocusOnDescendant) { // Set the focus on the Passenger1 Entity (child of the entity) m_focusModeInterface->SetFocusRoot(m_entityMap[Passenger1EntityName]); @@ -74,4 +74,4 @@ namespace AzToolsFramework auto selectedEntitiesAfter = GetSelectedEntities(); EXPECT_EQ(selectedEntitiesAfter.size(), 0); } -} +} // namespace UnitTest diff --git a/Code/Framework/AzToolsFramework/Tests/FocusMode/EditorFocusModeTests.cpp b/Code/Framework/AzToolsFramework/Tests/FocusMode/EditorFocusModeTests.cpp index eec3902f99..bac60230d6 100644 --- a/Code/Framework/AzToolsFramework/Tests/FocusMode/EditorFocusModeTests.cpp +++ b/Code/Framework/AzToolsFramework/Tests/FocusMode/EditorFocusModeTests.cpp @@ -8,9 +8,9 @@ #include -namespace AzToolsFramework +namespace UnitTest { - TEST_F(EditorFocusModeFixture, EditorFocusModeTests_SetFocus) + TEST_F(EditorFocusModeFixture, SetFocus) { // When an entity is set as the focus root, GetFocusRoot should return its EntityId. m_focusModeInterface->SetFocusRoot(m_entityMap[CarEntityName]); @@ -20,7 +20,7 @@ namespace AzToolsFramework m_focusModeInterface->ClearFocusRoot(m_editorEntityContextId); } - TEST_F(EditorFocusModeFixture, EditorFocusModeTests_ClearFocus) + TEST_F(EditorFocusModeFixture, ClearFocus) { // Change the value from the default. m_focusModeInterface->SetFocusRoot(m_entityMap[CarEntityName]); @@ -30,7 +30,7 @@ namespace AzToolsFramework EXPECT_EQ(m_focusModeInterface->GetFocusRoot(m_editorEntityContextId), AZ::EntityId()); } - TEST_F(EditorFocusModeFixture, EditorFocusModeTests_IsInFocusSubTree_AncestorsDescendants) + TEST_F(EditorFocusModeFixture, IsInFocusSubTreeAncestorsDescendants) { // When the focus is set to an entity, all its descendants are in the focus subtree while the ancestors aren't. m_focusModeInterface->SetFocusRoot(m_entityMap[StreetEntityName]); @@ -43,7 +43,7 @@ namespace AzToolsFramework EXPECT_EQ(m_focusModeInterface->IsInFocusSubTree(m_entityMap[Passenger2EntityName]), true); } - TEST_F(EditorFocusModeFixture, EditorFocusModeTests_IsInFocusSubTree_Siblings) + TEST_F(EditorFocusModeFixture, IsInFocusSubTreeSiblings) { // If the root entity has siblings, they are also outside of the focus subtree. m_focusModeInterface->SetFocusRoot(m_entityMap[CarEntityName]); @@ -56,7 +56,7 @@ namespace AzToolsFramework EXPECT_EQ(m_focusModeInterface->IsInFocusSubTree(m_entityMap[Passenger2EntityName]), false); } - TEST_F(EditorFocusModeFixture, EditorFocusModeTests_IsInFocusSubTree_Leaf) + TEST_F(EditorFocusModeFixture, IsInFocusSubTreeLeaf) { // If the root is a leaf, then the focus subtree will consists of just that entity. m_focusModeInterface->SetFocusRoot(m_entityMap[Passenger2EntityName]); @@ -69,7 +69,7 @@ namespace AzToolsFramework EXPECT_EQ(m_focusModeInterface->IsInFocusSubTree(m_entityMap[Passenger2EntityName]), true); } - TEST_F(EditorFocusModeFixture, EditorFocusModeTests_IsInFocusSubTree_Clear) + TEST_F(EditorFocusModeFixture, IsInFocusSubTreeClear) { // Change the value from the default. m_focusModeInterface->SetFocusRoot(m_entityMap[StreetEntityName]); @@ -84,4 +84,4 @@ namespace AzToolsFramework EXPECT_EQ(m_focusModeInterface->IsInFocusSubTree(m_entityMap[SportsCarEntityName]), true); EXPECT_EQ(m_focusModeInterface->IsInFocusSubTree(m_entityMap[Passenger2EntityName]), true); } -} +} // namespace UnitTest diff --git a/Code/Framework/AzToolsFramework/Tests/GenericComponentWrapperTest.cpp b/Code/Framework/AzToolsFramework/Tests/GenericComponentWrapperTest.cpp index 54132b974e..dbe3963069 100644 --- a/Code/Framework/AzToolsFramework/Tests/GenericComponentWrapperTest.cpp +++ b/Code/Framework/AzToolsFramework/Tests/GenericComponentWrapperTest.cpp @@ -59,7 +59,9 @@ protected: AZ::SettingsRegistryInterface* registry = AZ::SettingsRegistry::Get(); auto projectPathKey = AZ::SettingsRegistryInterface::FixedValueString(AZ::SettingsRegistryMergeUtils::BootstrapSettingsRootKey) + "/project_path"; - registry->Set(projectPathKey, "AutomatedTesting"); + AZ::IO::FixedMaxPath enginePath; + registry->Get(enginePath.Native(), AZ::SettingsRegistryMergeUtils::FilePathKey_EngineRootFolder); + registry->Set(projectPathKey, (enginePath / "AutomatedTesting").Native()); AZ::SettingsRegistryMergeUtils::MergeSettingsToRegistry_AddRuntimeFilePaths(*registry); m_app.Start(AZ::ComponentApplication::Descriptor()); @@ -184,7 +186,9 @@ public: AZ::SettingsRegistryInterface* registry = AZ::SettingsRegistry::Get(); auto projectPathKey = AZ::SettingsRegistryInterface::FixedValueString(AZ::SettingsRegistryMergeUtils::BootstrapSettingsRootKey) + "/project_path"; - registry->Set(projectPathKey, "AutomatedTesting"); + AZ::IO::FixedMaxPath enginePath; + registry->Get(enginePath.Native(), AZ::SettingsRegistryMergeUtils::FilePathKey_EngineRootFolder); + registry->Set(projectPathKey, (enginePath / "AutomatedTesting").Native()); AZ::SettingsRegistryMergeUtils::MergeSettingsToRegistry_AddRuntimeFilePaths(*registry); m_app.Start(AzFramework::Application::Descriptor()); diff --git a/Code/Framework/AzToolsFramework/Tests/Input/QtEventToAzInputMapperTests.cpp b/Code/Framework/AzToolsFramework/Tests/Input/QtEventToAzInputMapperTests.cpp new file mode 100644 index 0000000000..4c813a4bdd --- /dev/null +++ b/Code/Framework/AzToolsFramework/Tests/Input/QtEventToAzInputMapperTests.cpp @@ -0,0 +1,515 @@ +/* + * Copyright (c) Contributors to the Open 3D Engine Project. + * For complete copyright and license terms please see the LICENSE at the root of this distribution. + * + * SPDX-License-Identifier: Apache-2.0 OR MIT + * + */ + +#include +#include + +#include + + +namespace UnitTest +{ + static bool IsMouseButton(const AzFramework::InputChannelId& inputChannelId) + { + const auto& buttons = AzFramework::InputDeviceMouse::Button::All; + const auto& it = AZStd::find(buttons.cbegin(), buttons.cend(), inputChannelId); + return it != buttons.cend(); + } + + class QtEventToAzInputMapperFixture + : public AllocatorsTestFixture + , public AzFramework::InputChannelNotificationBus::Handler + , public AzFramework::InputTextNotificationBus::Handler + { + public: + static inline constexpr QSize WidgetSize = QSize(1920, 1080); + static inline constexpr int TestDeviceIdSeed = 4321; + + void SetUp() override + { + AllocatorsTestFixture::SetUp(); + + m_rootWidget = AZStd::make_unique(); + m_rootWidget->setFixedSize(WidgetSize); + m_rootWidget->move(0, 0); + + m_inputChannelMapper = AZStd::make_unique(m_rootWidget.get(), TestDeviceIdSeed); + + // listen for events signaled from QtEventToAzInputMapper and forward to the controller list + QObject::connect(m_inputChannelMapper.get(), &AzToolsFramework::QtEventToAzInputMapper::InputChannelUpdated, m_rootWidget.get(), + [this]([[maybe_unused]] const AzFramework::InputChannel* inputChannel, QEvent* event) + { + const QEvent::Type eventType = event->type(); + + if (eventType == QEvent::Type::MouseButtonPress || + eventType == QEvent::Type::MouseButtonRelease || + eventType == QEvent::Type::MouseButtonDblClick) + { + m_signalEvents.push_back(QtEventInfo(static_cast(event))); + event->accept(); + } + else if (eventType == QEvent::Type::Wheel) + { + m_signalEvents.push_back(QtEventInfo(static_cast(event))); + event->accept(); + } + else if (eventType == QEvent::Type::KeyPress || + eventType == QEvent::Type::KeyRelease || + eventType == QEvent::Type::ShortcutOverride) + { + m_signalEvents.push_back(QtEventInfo(static_cast(event))); + event->accept(); + } + }); + } + + void TearDown() override + { + m_inputChannelMapper.reset(); + + m_rootWidget.reset(); + + AllocatorsTestFixture::TearDown(); + } + + void OnInputChannelEvent(const AzFramework::InputChannel& inputChannel, bool& hasBeenConsumed) override + { + AZ_Assert(hasBeenConsumed == false, "Unexpected input event consumed elsewhere during QtEventToAzInputMapper tests"); + + const AzFramework::InputChannelId& inputChannelId = inputChannel.GetInputChannelId(); + const AzFramework::InputDeviceId& inputDeviceId = inputChannel.GetInputDevice().GetInputDeviceId(); + + if (AzFramework::InputDeviceMouse::IsMouseDevice(inputDeviceId)) + { + if (IsMouseButton(inputChannelId)) + { + m_azChannelEvents.push_back(AzEventInfo(inputChannel)); + hasBeenConsumed = m_captureAzEvents; + } + else if (inputChannelId == AzFramework::InputDeviceMouse::Movement::Z) + { + m_azChannelEvents.push_back(AzEventInfo(inputChannel)); + hasBeenConsumed = m_captureAzEvents; + } + } + else if (AzFramework::InputDeviceKeyboard::IsKeyboardDevice(inputDeviceId)) + { + m_azChannelEvents.push_back(AzEventInfo(inputChannel)); + hasBeenConsumed = m_captureAzEvents; + } + } + + void OnInputTextEvent(const AZStd::string& textUtf8, bool& hasBeenConsumed) override + { + AZ_Assert(hasBeenConsumed == false, "Unexpected text event consumed elsewhere during QtEventToAzInputMapper tests"); + + m_azTextEvents.push_back(textUtf8); + hasBeenConsumed = m_captureTextEvents; + } + + // simple structure for caching minimal QtEvent data necessary for testing + struct QtEventInfo + { + explicit QtEventInfo(QMouseEvent* mouseEvent) + : m_eventType(mouseEvent->type()) + , m_button(mouseEvent->button()) + { + } + + explicit QtEventInfo(QWheelEvent* mouseWheelEvent) + : m_eventType(mouseWheelEvent->type()) + , m_scrollPhase(mouseWheelEvent->phase()) + { + } + + explicit QtEventInfo(QKeyEvent* keyEvent) + : m_eventType(keyEvent->type()) + , m_key(keyEvent->key()) + { + } + + QEvent::Type m_eventType{ QEvent::None }; + Qt::MouseButton m_button{ Qt::NoButton }; + Qt::ScrollPhase m_scrollPhase{ Qt::NoScrollPhase }; + int m_key{ 0 }; + }; + + // simple structure for caching minimal AzInput event data necessary for testing + struct AzEventInfo + { + AzEventInfo() = delete; + explicit AzEventInfo(const AzFramework::InputChannel& inputChannel) + : m_inputChannelId(inputChannel.GetInputChannelId()) + , m_isActive(inputChannel.IsActive()) + { + } + + AzFramework::InputChannelId m_inputChannelId; + bool m_isActive; + }; + + + AZStd::unique_ptr m_rootWidget; + + AZStd::unique_ptr m_inputChannelMapper; + + AZStd::vector m_signalEvents; + AZStd::vector m_azChannelEvents; + AZStd::vector m_azTextEvents; + + bool m_captureAzEvents{ false }; + bool m_captureTextEvents{ false }; + }; + + //////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// + + // Qt event forwarding through the internal signal handler test + TEST_F(QtEventToAzInputMapperFixture, MouseWheel_NoAzHandlers_ReceivedThreeSignalAndZeroAzChannelEvents) + { + // setup + const QPoint mouseEventPos = QPoint(WidgetSize.width() / 2, WidgetSize.height() / 2); + const QPoint scrollDelta = QPoint(10, 10); + + MouseScroll(m_rootWidget.get(), mouseEventPos, scrollDelta); + + // qt validation + ASSERT_EQ(m_signalEvents.size(), 3); + + EXPECT_EQ(m_signalEvents[0].m_eventType, QEvent::Type::Wheel); + EXPECT_EQ(m_signalEvents[0].m_scrollPhase, Qt::ScrollBegin); + + EXPECT_EQ(m_signalEvents[1].m_eventType, QEvent::Type::Wheel); + EXPECT_EQ(m_signalEvents[1].m_scrollPhase, Qt::ScrollUpdate); + + EXPECT_EQ(m_signalEvents[2].m_eventType, QEvent::Type::Wheel); + EXPECT_EQ(m_signalEvents[2].m_scrollPhase, Qt::ScrollEnd); + + // az validation + EXPECT_EQ(m_azChannelEvents.size(), 0); + } + + // Qt event to AzInput event conversion test + TEST_F(QtEventToAzInputMapperFixture, MouseWheel_AzHandlerNotCaptured_ReceivedThreeSignalAndThreeAzChannelEvents) + { + // setup + const AzFramework::InputChannelId mouseWheelId = AzFramework::InputDeviceMouse::Movement::Z; + const char* mouseWheelChannelName = mouseWheelId.GetName(); + + AzFramework::InputChannelNotificationBus::Handler::BusConnect(); + m_captureAzEvents = false; + + const QPoint mouseEventPos = QPoint(WidgetSize.width() / 2, WidgetSize.height() / 2); + const QPoint scrollDelta = QPoint(10, 10); + + MouseScroll(m_rootWidget.get(), mouseEventPos, scrollDelta); + + // qt validation + ASSERT_EQ(m_signalEvents.size(), 3); + + EXPECT_EQ(m_signalEvents[0].m_eventType, QEvent::Type::Wheel); + EXPECT_EQ(m_signalEvents[0].m_scrollPhase, Qt::ScrollBegin); + + EXPECT_EQ(m_signalEvents[1].m_eventType, QEvent::Type::Wheel); + EXPECT_EQ(m_signalEvents[1].m_scrollPhase, Qt::ScrollUpdate); + + EXPECT_EQ(m_signalEvents[2].m_eventType, QEvent::Type::Wheel); + EXPECT_EQ(m_signalEvents[2].m_scrollPhase, Qt::ScrollEnd); + + // az validation + ASSERT_EQ(m_azChannelEvents.size(), 3); + + EXPECT_STREQ(m_azChannelEvents[0].m_inputChannelId.GetName(), mouseWheelChannelName); + EXPECT_STREQ(m_azChannelEvents[1].m_inputChannelId.GetName(), mouseWheelChannelName); + EXPECT_STREQ(m_azChannelEvents[2].m_inputChannelId.GetName(), mouseWheelChannelName); + + // cleanup + AzFramework::InputChannelNotificationBus::Handler::BusDisconnect(); + } + + // AzInput event handler consumption test + TEST_F(QtEventToAzInputMapperFixture, MouseWheel_AzHandlerCaptured_ReceivedZeroSignalAndThreeAzChannelEvents) + { + // setup + const AzFramework::InputChannelId mouseWheelId = AzFramework::InputDeviceMouse::Movement::Z; + const char* mouseWheelChannelName = mouseWheelId.GetName(); + + AzFramework::InputChannelNotificationBus::Handler::BusConnect(); + m_captureAzEvents = true; + + const QPoint mouseEventPos = QPoint(WidgetSize.width() / 2, WidgetSize.height() / 2); + const QPoint scrollDelta = QPoint(10, 10); + + MouseScroll(m_rootWidget.get(), mouseEventPos, scrollDelta); + + // qt validation + EXPECT_EQ(m_signalEvents.size(), 0); + + // az validation + ASSERT_EQ(m_azChannelEvents.size(), 3); + + EXPECT_STREQ(m_azChannelEvents[0].m_inputChannelId.GetName(), mouseWheelChannelName); + EXPECT_STREQ(m_azChannelEvents[1].m_inputChannelId.GetName(), mouseWheelChannelName); + EXPECT_STREQ(m_azChannelEvents[2].m_inputChannelId.GetName(), mouseWheelChannelName); + + // cleanup + AzFramework::InputChannelNotificationBus::Handler::BusDisconnect(); + } + + //////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// + + struct MouseButtonIdsParam + { + Qt::MouseButton m_qt; + AzFramework::InputChannelId m_az; + }; + + class MouseButtonParamQtEventToAzInputMapperFixture + : public QtEventToAzInputMapperFixture + , public ::testing::WithParamInterface + { + }; + + // Qt event forwarding through the internal signal handler test + TEST_P(MouseButtonParamQtEventToAzInputMapperFixture, MouseClick_NoAzHandlers_ReceivedTwoSignalAndZeroAzChannelEvents) + { + // setup + const MouseButtonIdsParam mouseButtonIds = GetParam(); + + const QPoint mouseEventPos = QPoint(WidgetSize.width() / 2, WidgetSize.height() / 2); + QTest::mouseClick(m_rootWidget.get(), mouseButtonIds.m_qt, Qt::NoModifier, mouseEventPos); + + // qt validation + ASSERT_EQ(m_signalEvents.size(), 2); + + EXPECT_EQ(m_signalEvents[0].m_eventType, QEvent::Type::MouseButtonPress); + EXPECT_EQ(m_signalEvents[0].m_button, mouseButtonIds.m_qt); + + EXPECT_EQ(m_signalEvents[1].m_eventType, QEvent::Type::MouseButtonRelease); + EXPECT_EQ(m_signalEvents[1].m_button, mouseButtonIds.m_qt); + + // az validation + EXPECT_EQ(m_azChannelEvents.size(), 0); + } + + // Qt event to AzInput event conversion test + TEST_P(MouseButtonParamQtEventToAzInputMapperFixture, MouseClick_AzHandlerNotCaptured_ReceivedTwoSignalAndTwoAzChannelEvents) + { + // setup + const MouseButtonIdsParam mouseButtonIds = GetParam(); + + AzFramework::InputChannelNotificationBus::Handler::BusConnect(); + m_captureAzEvents = false; + + const QPoint mouseEventPos = QPoint(WidgetSize.width() / 2, WidgetSize.height() / 2); + QTest::mouseClick(m_rootWidget.get(), mouseButtonIds.m_qt, Qt::NoModifier, mouseEventPos); + + // qt validation + ASSERT_EQ(m_signalEvents.size(), 2); + + EXPECT_EQ(m_signalEvents[0].m_eventType, QEvent::Type::MouseButtonPress); + EXPECT_EQ(m_signalEvents[0].m_button, mouseButtonIds.m_qt); + + EXPECT_EQ(m_signalEvents[1].m_eventType, QEvent::Type::MouseButtonRelease); + EXPECT_EQ(m_signalEvents[1].m_button, mouseButtonIds.m_qt); + + // az validation + ASSERT_EQ(m_azChannelEvents.size(), 2); + + EXPECT_STREQ(m_azChannelEvents[0].m_inputChannelId.GetName(), mouseButtonIds.m_az.GetName()); + EXPECT_TRUE(m_azChannelEvents[0].m_isActive); + + EXPECT_STREQ(m_azChannelEvents[1].m_inputChannelId.GetName(), mouseButtonIds.m_az.GetName()); + EXPECT_FALSE(m_azChannelEvents[1].m_isActive); + + // cleanup + AzFramework::InputChannelNotificationBus::Handler::BusDisconnect(); + } + + // AzInput event handler consumption test + TEST_P(MouseButtonParamQtEventToAzInputMapperFixture, MouseClick_AzHandlerCaptured_ReceivedZeroSignalAndTwoAzChannelEvents) + { + // setup + const MouseButtonIdsParam mouseButtonIds = GetParam(); + + AzFramework::InputChannelNotificationBus::Handler::BusConnect(); + m_captureAzEvents = true; + + const QPoint mouseEventPos = QPoint(WidgetSize.width() / 2, WidgetSize.height() / 2); + QTest::mouseClick(m_rootWidget.get(), mouseButtonIds.m_qt, Qt::NoModifier, mouseEventPos); + + // qt validation + EXPECT_EQ(m_signalEvents.size(), 0); + + // az validation + ASSERT_EQ(m_azChannelEvents.size(), 2); + + EXPECT_STREQ(m_azChannelEvents[0].m_inputChannelId.GetName(), mouseButtonIds.m_az.GetName()); + EXPECT_TRUE(m_azChannelEvents[0].m_isActive); + + EXPECT_STREQ(m_azChannelEvents[1].m_inputChannelId.GetName(), mouseButtonIds.m_az.GetName()); + EXPECT_FALSE(m_azChannelEvents[1].m_isActive); + + // cleanup + AzFramework::InputChannelNotificationBus::Handler::BusDisconnect(); + } + + INSTANTIATE_TEST_CASE_P(All, MouseButtonParamQtEventToAzInputMapperFixture, + testing::Values( + MouseButtonIdsParam{ Qt::MouseButton::LeftButton, AzFramework::InputDeviceMouse::Button::Left }, + MouseButtonIdsParam{ Qt::MouseButton::RightButton, AzFramework::InputDeviceMouse::Button::Right }, + MouseButtonIdsParam{ Qt::MouseButton::MiddleButton, AzFramework::InputDeviceMouse::Button::Middle } + ), + [](const ::testing::TestParamInfo& info) + { + return info.param.m_az.GetName(); + } + ); + + //////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// + + struct KeyEventIdsParam + { + Qt::Key m_qt; + AzFramework::InputChannelId m_az; + }; + + class PrintableKeyEventParamQtEventToAzInputMapperFixture + : public QtEventToAzInputMapperFixture + , public ::testing::WithParamInterface + { + }; + + // Qt event forwarding through the internal signal handler test + TEST_P(PrintableKeyEventParamQtEventToAzInputMapperFixture, KeyClick_NoAzHandlers_ReceivedTwoSignalAndZeroAzEvents) + { + // setup + const KeyEventIdsParam keyEventIds = GetParam(); + const Qt::KeyboardModifiers modifiers = Qt::NoModifier; + + QTest::keyClick(m_rootWidget.get(), keyEventIds.m_qt, modifiers); + + // qt validation + ASSERT_EQ(m_signalEvents.size(), 2); + + EXPECT_EQ(m_signalEvents[0].m_eventType, QEvent::Type::KeyPress); + EXPECT_EQ(m_signalEvents[0].m_key, keyEventIds.m_qt); + + EXPECT_EQ(m_signalEvents[1].m_eventType, QEvent::Type::KeyRelease); + EXPECT_EQ(m_signalEvents[1].m_key, keyEventIds.m_qt); + + // az validation + EXPECT_EQ(m_azChannelEvents.size(), 0); + EXPECT_EQ(m_azTextEvents.size(), 0); + } + + // Qt event to AzInput event conversion test + TEST_P(PrintableKeyEventParamQtEventToAzInputMapperFixture, KeyClick_AzHandlersNotCaptured_ReceivedTwoSignalAndThreeAzEvents) + { + // setup + const KeyEventIdsParam keyEventIds = GetParam(); + const Qt::KeyboardModifiers modifiers = Qt::NoModifier; + + AZStd::string keyAsText = QtKeyToAzString(keyEventIds.m_qt, modifiers); + + AzFramework::InputChannelNotificationBus::Handler::BusConnect(); + m_captureAzEvents = false; + + AzFramework::InputTextNotificationBus::Handler::BusConnect(); + m_captureAzEvents = false; + + QTest::keyClick(m_rootWidget.get(), keyEventIds.m_qt, modifiers); + + // qt validation + ASSERT_EQ(m_signalEvents.size(), 2); + + EXPECT_EQ(m_signalEvents[0].m_eventType, QEvent::Type::KeyPress); + EXPECT_EQ(m_signalEvents[0].m_key, keyEventIds.m_qt); + + EXPECT_EQ(m_signalEvents[1].m_eventType, QEvent::Type::KeyRelease); + EXPECT_EQ(m_signalEvents[1].m_key, keyEventIds.m_qt); + + // az validation + ASSERT_EQ(m_azTextEvents.size(), 1); + + EXPECT_STREQ(m_azTextEvents[0].c_str(), keyAsText.c_str()); + + ASSERT_EQ(m_azChannelEvents.size(), 2); + + EXPECT_STREQ(m_azChannelEvents[0].m_inputChannelId.GetName(), keyEventIds.m_az.GetName()); + EXPECT_TRUE(m_azChannelEvents[0].m_isActive); + + EXPECT_STREQ(m_azChannelEvents[1].m_inputChannelId.GetName(), keyEventIds.m_az.GetName()); + EXPECT_FALSE(m_azChannelEvents[1].m_isActive); + + // cleanup + AzFramework::InputTextNotificationBus::Handler::BusDisconnect(); + AzFramework::InputChannelNotificationBus::Handler::BusDisconnect(); + } + + INSTANTIATE_TEST_CASE_P(All, PrintableKeyEventParamQtEventToAzInputMapperFixture, + testing::Values( + KeyEventIdsParam{ Qt::Key_0, AzFramework::InputDeviceKeyboard::Key::Alphanumeric0 }, + KeyEventIdsParam{ Qt::Key_1, AzFramework::InputDeviceKeyboard::Key::Alphanumeric1 }, + KeyEventIdsParam{ Qt::Key_2, AzFramework::InputDeviceKeyboard::Key::Alphanumeric2 }, + KeyEventIdsParam{ Qt::Key_3, AzFramework::InputDeviceKeyboard::Key::Alphanumeric3 }, + KeyEventIdsParam{ Qt::Key_4, AzFramework::InputDeviceKeyboard::Key::Alphanumeric4 }, + KeyEventIdsParam{ Qt::Key_5, AzFramework::InputDeviceKeyboard::Key::Alphanumeric5 }, + KeyEventIdsParam{ Qt::Key_6, AzFramework::InputDeviceKeyboard::Key::Alphanumeric6 }, + KeyEventIdsParam{ Qt::Key_7, AzFramework::InputDeviceKeyboard::Key::Alphanumeric7 }, + KeyEventIdsParam{ Qt::Key_8, AzFramework::InputDeviceKeyboard::Key::Alphanumeric8 }, + KeyEventIdsParam{ Qt::Key_9, AzFramework::InputDeviceKeyboard::Key::Alphanumeric9 }, + + KeyEventIdsParam{ Qt::Key_A, AzFramework::InputDeviceKeyboard::Key::AlphanumericA }, + KeyEventIdsParam{ Qt::Key_B, AzFramework::InputDeviceKeyboard::Key::AlphanumericB }, + KeyEventIdsParam{ Qt::Key_C, AzFramework::InputDeviceKeyboard::Key::AlphanumericC }, + KeyEventIdsParam{ Qt::Key_D, AzFramework::InputDeviceKeyboard::Key::AlphanumericD }, + KeyEventIdsParam{ Qt::Key_E, AzFramework::InputDeviceKeyboard::Key::AlphanumericE }, + KeyEventIdsParam{ Qt::Key_F, AzFramework::InputDeviceKeyboard::Key::AlphanumericF }, + KeyEventIdsParam{ Qt::Key_G, AzFramework::InputDeviceKeyboard::Key::AlphanumericG }, + KeyEventIdsParam{ Qt::Key_H, AzFramework::InputDeviceKeyboard::Key::AlphanumericH }, + KeyEventIdsParam{ Qt::Key_I, AzFramework::InputDeviceKeyboard::Key::AlphanumericI }, + KeyEventIdsParam{ Qt::Key_J, AzFramework::InputDeviceKeyboard::Key::AlphanumericJ }, + KeyEventIdsParam{ Qt::Key_K, AzFramework::InputDeviceKeyboard::Key::AlphanumericK }, + KeyEventIdsParam{ Qt::Key_L, AzFramework::InputDeviceKeyboard::Key::AlphanumericL }, + KeyEventIdsParam{ Qt::Key_M, AzFramework::InputDeviceKeyboard::Key::AlphanumericM }, + KeyEventIdsParam{ Qt::Key_N, AzFramework::InputDeviceKeyboard::Key::AlphanumericN }, + KeyEventIdsParam{ Qt::Key_O, AzFramework::InputDeviceKeyboard::Key::AlphanumericO }, + KeyEventIdsParam{ Qt::Key_P, AzFramework::InputDeviceKeyboard::Key::AlphanumericP }, + KeyEventIdsParam{ Qt::Key_Q, AzFramework::InputDeviceKeyboard::Key::AlphanumericQ }, + KeyEventIdsParam{ Qt::Key_R, AzFramework::InputDeviceKeyboard::Key::AlphanumericR }, + KeyEventIdsParam{ Qt::Key_S, AzFramework::InputDeviceKeyboard::Key::AlphanumericS }, + KeyEventIdsParam{ Qt::Key_T, AzFramework::InputDeviceKeyboard::Key::AlphanumericT }, + KeyEventIdsParam{ Qt::Key_U, AzFramework::InputDeviceKeyboard::Key::AlphanumericU }, + KeyEventIdsParam{ Qt::Key_V, AzFramework::InputDeviceKeyboard::Key::AlphanumericV }, + KeyEventIdsParam{ Qt::Key_W, AzFramework::InputDeviceKeyboard::Key::AlphanumericW }, + KeyEventIdsParam{ Qt::Key_X, AzFramework::InputDeviceKeyboard::Key::AlphanumericX }, + KeyEventIdsParam{ Qt::Key_Y, AzFramework::InputDeviceKeyboard::Key::AlphanumericY }, + KeyEventIdsParam{ Qt::Key_Z, AzFramework::InputDeviceKeyboard::Key::AlphanumericZ }, + + // these may need to be special cased due to the printable text conversion + //KeyEventIdsParam{ Qt::Key_Space, AzFramework::InputDeviceKeyboard::Key::EditSpace }, + //KeyEventIdsParam{ Qt::Key_Tab, AzFramework::InputDeviceKeyboard::Key::EditTab }, + + KeyEventIdsParam{ Qt::Key_Apostrophe, AzFramework::InputDeviceKeyboard::Key::PunctuationApostrophe }, + KeyEventIdsParam{ Qt::Key_Backslash, AzFramework::InputDeviceKeyboard::Key::PunctuationBackslash }, + KeyEventIdsParam{ Qt::Key_BracketLeft, AzFramework::InputDeviceKeyboard::Key::PunctuationBracketL }, + KeyEventIdsParam{ Qt::Key_BracketRight, AzFramework::InputDeviceKeyboard::Key::PunctuationBracketR }, + KeyEventIdsParam{ Qt::Key_Comma, AzFramework::InputDeviceKeyboard::Key::PunctuationComma }, + KeyEventIdsParam{ Qt::Key_Equal, AzFramework::InputDeviceKeyboard::Key::PunctuationEquals }, + KeyEventIdsParam{ Qt::Key_hyphen, AzFramework::InputDeviceKeyboard::Key::PunctuationHyphen }, + KeyEventIdsParam{ Qt::Key_Period, AzFramework::InputDeviceKeyboard::Key::PunctuationPeriod }, + KeyEventIdsParam{ Qt::Key_Semicolon, AzFramework::InputDeviceKeyboard::Key::PunctuationSemicolon }, + KeyEventIdsParam{ Qt::Key_Slash, AzFramework::InputDeviceKeyboard::Key::PunctuationSlash }, + KeyEventIdsParam{ Qt::Key_QuoteLeft, AzFramework::InputDeviceKeyboard::Key::PunctuationTilde } + ), + [](const ::testing::TestParamInfo& info) + { + return info.param.m_az.GetName(); + } + ); +} // namespace UnitTest diff --git a/Code/Framework/AzToolsFramework/Tests/InstanceDataHierarchy.cpp b/Code/Framework/AzToolsFramework/Tests/InstanceDataHierarchy.cpp index 4d144d0d1b..88966ef994 100644 --- a/Code/Framework/AzToolsFramework/Tests/InstanceDataHierarchy.cpp +++ b/Code/Framework/AzToolsFramework/Tests/InstanceDataHierarchy.cpp @@ -710,7 +710,7 @@ namespace UnitTest auto getEnumData = [&ec](const AzToolsFramework::InstanceDataNode& node) -> Uuid { - Uuid id; + Uuid id = Uuid::CreateNull(); auto attribute = node.GetElementMetadata()->FindAttribute(AZ_CRC("EnumType")); auto attributeData = azrtti_cast*>(attribute); if (attributeData) diff --git a/Code/Framework/AzToolsFramework/Tests/Main.cpp b/Code/Framework/AzToolsFramework/Tests/Main.cpp index 6cb8ca01bd..a1b5638d6c 100644 --- a/Code/Framework/AzToolsFramework/Tests/Main.cpp +++ b/Code/Framework/AzToolsFramework/Tests/Main.cpp @@ -6,18 +6,17 @@ * */ -#include #include +#include #include #include #include #include #include +#include #include -using namespace AZ; - // Handle asserts class ToolsFrameworkHook : public AZ::Test::ITestEnvironment @@ -25,12 +24,12 @@ class ToolsFrameworkHook public: void SetupEnvironment() override { - AllocatorInstance::Create(); + AZ::AllocatorInstance::Create(); } void TeardownEnvironment() override { - AllocatorInstance::Destroy(); + AZ::AllocatorInstance::Destroy(); } }; @@ -38,12 +37,17 @@ AZTEST_EXPORT int AZ_UNIT_TEST_HOOK_NAME(int argc, char** argv) { ::testing::InitGoogleMock(&argc, argv); QApplication app(argc, argv); - auto styleManager = AZStd::make_unique< AzQtComponents::StyleManager>(&app); + auto styleManager = AZStd::make_unique(&app); AZ::IO::FixedMaxPath engineRootPath; { AZ::ComponentApplication componentApplication(argc, argv); auto settingsRegistry = AZ::SettingsRegistry::Get(); settingsRegistry->Get(engineRootPath.Native(), AZ::SettingsRegistryMergeUtils::FilePathKey_EngineRootFolder); + + AZ::ComponentApplicationLifecycle::RegisterEvent(*settingsRegistry, "SystemComponentsDeactivated"); + AZ::ComponentApplicationLifecycle::RegisterEvent(*settingsRegistry, "ConsoleUnavailable"); + AZ::ComponentApplicationLifecycle::RegisterEvent(*settingsRegistry, "SettingsRegistryUnavailable"); + AZ::ComponentApplicationLifecycle::RegisterEvent(*settingsRegistry, "SystemAllocatorPendingDestruction"); } styleManager->initialize(&app, engineRootPath); AZ::Test::printUnusedParametersWarning(argc, argv); diff --git a/Code/Framework/AzToolsFramework/Tests/ManipulatorViewTests.cpp b/Code/Framework/AzToolsFramework/Tests/ManipulatorViewTests.cpp index 11ec33a995..5f02d9da9c 100644 --- a/Code/Framework/AzToolsFramework/Tests/ManipulatorViewTests.cpp +++ b/Code/Framework/AzToolsFramework/Tests/ManipulatorViewTests.cpp @@ -7,12 +7,16 @@ */ #include +#include +#include +#include +#include #include #include -#include +#include #include -#include - +#include +#include #include #include #include @@ -21,8 +25,7 @@ namespace UnitTest { using namespace AzToolsFramework; - class ManipulatorViewTest - : public AllocatorsTestFixture + class ManipulatorViewTest : public AllocatorsTestFixture { AZStd::unique_ptr m_serializeContext; @@ -32,7 +35,7 @@ namespace UnitTest m_serializeContext = AZStd::make_unique(); m_app.Start(AzFramework::Application::Descriptor()); // Without this, the user settings component would attempt to save on finalize/shutdown. Since the file is - // shared across the whole engine, if multiple tests are run in parallel, the saving could cause a crash + // shared across the whole engine, if multiple tests are run in parallel, the saving could cause a crash // in the unit tests. AZ::UserSettingsComponentRequestBus::Broadcast(&AZ::UserSettingsComponentRequests::DisableSaveOnFinalize); } @@ -51,12 +54,9 @@ namespace UnitTest /////////////////////////////////////////////////////////////////////////////////////////////////////////////// // Given const AZ::Transform orientation = - AZ::Transform::CreateFromQuaternion( - AZ::Quaternion::CreateFromAxisAngle( - AZ::Vector3::CreateAxisX(), AZ::DegToRad(-90.0f))); + AZ::Transform::CreateFromQuaternion(AZ::Quaternion::CreateRotationX(AZ::DegToRad(-90.0f))); - const AZ::Transform translation = - AZ::Transform::CreateTranslation(AZ::Vector3(5.0f, 0.0f, 10.0f)); + const AZ::Transform translation = AZ::Transform::CreateTranslation(AZ::Vector3(5.0f, 0.0f, 10.0f)); const AZ::Transform manipulatorSpace = translation * orientation; // create a rotation manipulator in an arbitrary space @@ -67,8 +67,7 @@ namespace UnitTest // When const AZ::Vector3 worldCameraPosition = AZ::Vector3(5.0f, -10.0f, 10.0f); // transform the view direction to the space of the manipulator (space + local transform) - const AZ::Vector3 viewDirection = - CalculateViewDirection(rotationManipulators, worldCameraPosition); + const AZ::Vector3 viewDirection = CalculateViewDirection(rotationManipulators, worldCameraPosition); /////////////////////////////////////////////////////////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////////////////////////////////////////////////////////// @@ -84,8 +83,7 @@ namespace UnitTest cameraState.m_position = AZ::Vector3::CreateAxisY(20.0f); cameraState.m_forward = -AZ::Vector3::CreateAxisY(); - const float scale = - AzToolsFramework::CalculateScreenToWorldMultiplier(AZ::Vector3::CreateZero(), cameraState); + const float scale = AzToolsFramework::CalculateScreenToWorldMultiplier(AZ::Vector3::CreateZero(), cameraState); EXPECT_NEAR(scale, 2.0f, std::numeric_limits::epsilon()); } @@ -96,9 +94,57 @@ namespace UnitTest cameraState.m_position = AZ::Vector3::CreateAxisY(20.0f); cameraState.m_forward = -AZ::Vector3::CreateAxisY(); - const float scale = - AzToolsFramework::CalculateScreenToWorldMultiplier(AZ::Vector3::CreateAxisX(-10.0f), cameraState); + const float scale = AzToolsFramework::CalculateScreenToWorldMultiplier(AZ::Vector3::CreateAxisX(-10.0f), cameraState); EXPECT_NEAR(scale, 2.0f, std::numeric_limits::epsilon()); } + + TEST_F(ManipulatorViewTest, ManipulatorViewQuadDrawsAtCorrectPositionWhenManipulatorSpaceIsScaledUniformlyAndNonUniformly) + { + // Given + // simulate a custom manipulator space (e.g. entity transform) and a local offset within that space (e.g. spline vertex position) + const AZ::Transform space = + AZ::Transform::CreateTranslation(AZ::Vector3(2.0f, -3.0f, -4.0f)) * AZ::Transform::CreateUniformScale(2.0f); + const AZ::Vector3 localPosition = AZ::Vector3(2.0f, -2.0f, 0.0f); + const AZ::Vector3 nonUniformScale = AZ::Vector3(2.0f, 3.0f, 4.0f); + const AZ::Transform combinedTransform = + AzToolsFramework::ApplySpace(AZ::Transform::CreateTranslation(localPosition), space, nonUniformScale); + + // create a manipulator state based on the space and local position + AzToolsFramework::ManipulatorState manipulatorState{}; + manipulatorState.m_worldFromLocal = combinedTransform; + manipulatorState.m_nonUniformScale = nonUniformScale; + // note: This is zero as the localPosition is already encoded in the combinedTransform + manipulatorState.m_localPosition = AZ::Vector3::CreateZero(); + + // camera (go to position format) - 10.00, -15.00, 6.00, -90.00, 0.00 + const AzFramework::CameraState cameraState = AzFramework::CreateDefaultCamera( + AZ::Transform::CreateFromMatrix3x3AndTranslation( + AZ::Matrix3x3::CreateRotationX(AZ::DegToRad(-90.0f)), AZ::Vector3(10.0f, -15.0f, 6.0f)), + AZ::Vector2(1280, 720)); + + // test debug display instance to record vertices that were output + auto testDebugDisplayRequests = AZStd::make_shared(); + auto planarTranslationViewQuad = CreateManipulatorViewQuadForPlanarTranslationManipulator( + AZ::Vector3::CreateAxisX(), AZ::Vector3::CreateAxisY(), AZ::Color::CreateZero(), AZ::Color::CreateZero(), 2.2f, 0.2f, 1.0f); + + // When + // draw the quad as it would be for a manipulator + planarTranslationViewQuad->Draw( + AzToolsFramework::ManipulatorManagerId(1), AzToolsFramework::ManipulatorManagerState{ false }, + AzToolsFramework::ManipulatorId(1), manipulatorState, *testDebugDisplayRequests, cameraState, + AzToolsFramework::ViewportInteraction::MouseInteraction{}); + + const AZStd::vector expectedDisplayPositions = { + AZ::Vector3(10.5f, -13.5f, -4.0f), AZ::Vector3(11.5f, -13.5f, -4.0f), AZ::Vector3(10.5f, -14.5f, -4.0f), + AZ::Vector3(11.5f, -14.5f, -4.0f), AZ::Vector3(10.5f, -13.5f, -4.0f), AZ::Vector3(10.5f, -14.5f, -4.0f), + AZ::Vector3(11.5f, -14.5f, -4.0f), AZ::Vector3(11.5f, -13.5f, -4.0f) + }; + + // Then + const auto points = testDebugDisplayRequests->GetPoints(); + // quad vertices appear in the expected position (not offset or scaled incorrectly by space scale) + using ::testing::UnorderedPointwise; + EXPECT_THAT(points, UnorderedPointwise(ContainerIsClose(), expectedDisplayPositions)); + } } // namespace UnitTest diff --git a/Code/Framework/AzToolsFramework/Tests/PlatformAddressedAssetCatalogTests.cpp b/Code/Framework/AzToolsFramework/Tests/PlatformAddressedAssetCatalogTests.cpp index 9c226cbb1b..e58e347b2a 100644 --- a/Code/Framework/AzToolsFramework/Tests/PlatformAddressedAssetCatalogTests.cpp +++ b/Code/Framework/AzToolsFramework/Tests/PlatformAddressedAssetCatalogTests.cpp @@ -44,10 +44,8 @@ namespace UnitTest ArgumentContainer argContainer{ {} }; // Append Command Line override for the Project Cache Path - AZ::IO::Path cacheProjectRootFolder{ m_tempDir.GetDirectory() }; - auto projectCachePathOverride = FixedValueString::format(R"(--project-cache-path="%s")", cacheProjectRootFolder.c_str()); - auto projectPathOverride = FixedValueString{ R"(--project-path=AutomatedTesting)" }; - argContainer.push_back(projectCachePathOverride.data()); + auto cacheProjectRootFolder = AZ::IO::Path{ m_tempDir.GetDirectory() } / "Cache"; + auto projectPathOverride = FixedValueString::format(R"(--project-path="%s")", m_tempDir.GetDirectory()); argContainer.push_back(projectPathOverride.data()); m_application = new ToolsTestApplication("AddressedAssetCatalogManager", aznumeric_caster(argContainer.size()), argContainer.data()); @@ -195,10 +193,7 @@ namespace UnitTest ArgumentContainer argContainer{ {} }; // Append Command Line override for the Project Cache Path - AZ::IO::Path cacheProjectRootFolder{ m_tempDir.GetDirectory() }; - auto projectCachePathOverride = FixedValueString::format(R"(--project-cache-path="%s")", cacheProjectRootFolder.c_str()); - auto projectPathOverride = FixedValueString{ R"(--project-path=AutomatedTesting)" }; - argContainer.push_back(projectCachePathOverride.data()); + auto projectPathOverride = FixedValueString::format(R"(--project-path="%s")", m_tempDir.GetDirectory()); argContainer.push_back(projectPathOverride.data()); m_application = new ToolsTestApplication("MessageTest", aznumeric_caster(argContainer.size()), argContainer.data()); diff --git a/Code/Framework/AzToolsFramework/Tests/Prefab/Benchmark/Spawnable/SpawnAllEntitiesBenchmarks.cpp b/Code/Framework/AzToolsFramework/Tests/Prefab/Benchmark/Spawnable/SpawnAllEntitiesBenchmarks.cpp index ecbbe10c39..ba0c3a4838 100644 --- a/Code/Framework/AzToolsFramework/Tests/Prefab/Benchmark/Spawnable/SpawnAllEntitiesBenchmarks.cpp +++ b/Code/Framework/AzToolsFramework/Tests/Prefab/Benchmark/Spawnable/SpawnAllEntitiesBenchmarks.cpp @@ -25,7 +25,7 @@ namespace Benchmark for (auto _ : state) { state.PauseTiming(); - m_spawnTicket = new AzFramework::EntitySpawnTicket(m_spawnableAsset); + m_spawnTicket = aznew AzFramework::EntitySpawnTicket(m_spawnableAsset); state.ResumeTiming(); for (uint64_t spwanableCounter = 0; spwanableCounter < spawnAllEntitiesCallCount; spwanableCounter++) @@ -62,7 +62,7 @@ namespace Benchmark for (auto _ : state) { state.PauseTiming(); - m_spawnTicket = new AzFramework::EntitySpawnTicket(m_spawnableAsset); + m_spawnTicket = aznew AzFramework::EntitySpawnTicket(m_spawnableAsset); state.ResumeTiming(); AzFramework::SpawnableEntitiesInterface::Get()->SpawnAllEntities(*m_spawnTicket); @@ -93,15 +93,16 @@ namespace Benchmark SetUpSpawnableAsset(entityCountInSpawnable); + auto spawner = AzFramework::SpawnableEntitiesInterface::Get(); for (auto _ : state) { state.PauseTiming(); - m_spawnTicket = new AzFramework::EntitySpawnTicket(m_spawnableAsset); + m_spawnTicket = aznew AzFramework::EntitySpawnTicket(m_spawnableAsset); state.ResumeTiming(); for (uint64_t spawnCallCounter = 0; spawnCallCounter < spawnCallCount; spawnCallCounter++) { - AzFramework::SpawnableEntitiesInterface::Get()->SpawnAllEntities(*m_spawnTicket); + spawner->SpawnAllEntities(*m_spawnTicket); } m_rootSpawnableInterface->ProcessSpawnableQueue(); diff --git a/Code/Framework/AzToolsFramework/Tests/Prefab/PrefabAssetFixupTests.cpp b/Code/Framework/AzToolsFramework/Tests/Prefab/PrefabAssetFixupTests.cpp new file mode 100644 index 0000000000..4f2a19faec --- /dev/null +++ b/Code/Framework/AzToolsFramework/Tests/Prefab/PrefabAssetFixupTests.cpp @@ -0,0 +1,184 @@ +/* + * Copyright (c) Contributors to the Open 3D Engine Project. + * For complete copyright and license terms please see the LICENSE at the root of this distribution. + * + * SPDX-License-Identifier: Apache-2.0 OR MIT + * + */ + +#include +#include +#include +#include +#include + +namespace UnitTest +{ + using PrefabInstantiateTest = PrefabTestFixture; + + struct MockAsset : AZ::Data::AssetData + { + AZ_RTTI(MockAsset, "{DAB98A3F-1714-4B95-AACB-8C150B0D0628}", AZ::Data::AssetData); + + AZ_CLASS_ALLOCATOR(MockAsset, AZ::SystemAllocator, 0); + + static void Reflect(AZ::ReflectContext* context) + { + if (auto serializeContext = azrtti_cast(context)) + { + serializeContext->Class()->Field("data", &MockAsset::m_data); + } + } + float m_data = 1.f; + }; + + struct MockAssetComponent : AZ::Component + { + AZ_COMPONENT(MockAssetComponent, "{D81B0D06-B495-479E-832A-A63079FD6D37}"); + + static void Reflect(AZ::ReflectContext* context) + { + MockAsset::Reflect(context); + + if (auto serializeContext = azrtti_cast(context)) + { + serializeContext->Class() + ->Field("asset", &MockAssetComponent::m_asset); + } + } + + void Activate() override{} + void Deactivate() override{} + + AZ::Data::Asset m_asset; + }; + + class MockAssetHandler : public AZ::Data::AssetHandler + { + public: + AZ_CLASS_ALLOCATOR(MockAssetHandler, AZ::SystemAllocator, 0); + + AZ::Data::AssetPtr CreateAsset(const AZ::Data::AssetId& id, const AZ::Data::AssetType& type) override + { + (void)id; + EXPECT_TRUE(type == azrtti_typeid()); + if (type == azrtti_typeid()) + { + return aznew MockAsset(); + } + return nullptr; + } + + LoadResult LoadAssetData(const AZ::Data::Asset&, AZStd::shared_ptr, const AZ::Data::AssetFilterCB&) override + { + return LoadResult::Error; + } + + void DestroyAsset(AZ::Data::AssetPtr ptr) override + { + EXPECT_TRUE(ptr->GetType() == azrtti_typeid()); + delete ptr; + } + + void GetHandledAssetTypes(AZStd::vector& assetTypes) override + { + assetTypes.push_back(azrtti_typeid()); + } + }; + + struct PrefabFixupTest : PrefabInstantiateTest + { + void SetUpEditorFixtureImpl() override + { + PrefabInstantiateTest::SetUpEditorFixtureImpl(); + + AZ::SerializeContext* context = nullptr; + + AZ::ComponentApplicationBus::BroadcastResult(context, &AZ::ComponentApplicationBus::Events::GetSerializeContext); + + ASSERT_NE(context, nullptr); + + MockAssetComponent::Reflect(context); + + AZ::Data::AssetManager::Instance().RegisterHandler(&m_handler, azrtti_typeid()); + + auto entity = aznew AZ::Entity(); + auto mockAssetComponent = entity->CreateComponent(); + + mockAssetComponent->m_asset = + AZ::Data::Asset(AZ::Uuid::CreateNull(), AZ::Data::AssetType::CreateNull(), "test.asset"); + + auto newInstance = AZ::Interface::Get()->CreatePrefab({ entity }, {}, "test.prefab"); + + AZStd::string prefabString; + ASSERT_TRUE(m_prefabLoaderInterface->SaveTemplateToString(newInstance->GetTemplateId(), prefabString)); + m_prefabSystemComponent->RemoveAllTemplates(); + + AZ::Outcome readPrefabFileResult = AZ::JsonSerializationUtils::ReadJsonString(prefabString); + + ASSERT_TRUE(readPrefabFileResult.IsSuccess()); + + AZ::Data::AssetCatalogRequestBus::BroadcastResult( + m_assetId, &AZ::Data::AssetCatalogRequestBus::Events::GetAssetIdByPath, "test.asset", azrtti_typeid(), + true); // True to register the asset and generate an AssetId for lookup + + m_prefabDom = readPrefabFileResult.TakeValue(); + } + + void TearDownEditorFixtureImpl() override + { + PrefabInstantiateTest::TearDownEditorFixtureImpl(); + + AZ::Data::AssetManager::Instance().UnregisterHandler(&m_handler); + } + + void CheckInstance(const Instance& instance) + { + const AZ::Entity* loadedEntity = nullptr; + instance.GetConstEntities( + [&loadedEntity](const AZ::Entity& entity) + { + loadedEntity = &entity; + + return false; + }); + + auto loadedComponent = loadedEntity->FindComponent(); + + ASSERT_NE(loadedComponent, nullptr); + + ASSERT_STREQ(loadedComponent->m_asset.GetHint().c_str(), "test.asset"); + ASSERT_EQ(loadedComponent->m_asset->GetId(), m_assetId); + } + + MockAssetHandler m_handler; + PrefabDom m_prefabDom; + AZ::Data::AssetId m_assetId; + }; + + TEST_F(PrefabFixupTest, Test_LoadInstanceFromPrefabDom_Overload1) + { + Instance instance; + ASSERT_TRUE(PrefabDomUtils::LoadInstanceFromPrefabDom(instance, m_prefabDom)); + + CheckInstance(instance); + } + + TEST_F(PrefabFixupTest, Test_LoadInstanceFromPrefabDom_Overload2) + { + Instance instance; + AZStd::vector> referencedAssets; + ASSERT_TRUE(PrefabDomUtils::LoadInstanceFromPrefabDom(instance, m_prefabDom, referencedAssets)); + + CheckInstance(instance); + } + + TEST_F(PrefabFixupTest, Test_LoadInstanceFromPrefabDom_Overload3) + { + Instance instance; + Instance::EntityList entityList; + (PrefabDomUtils::LoadInstanceFromPrefabDom(instance, entityList, m_prefabDom)); + + CheckInstance(instance); + } +} diff --git a/Code/Framework/AzToolsFramework/Tests/Prefab/PrefabDeleteTests.cpp b/Code/Framework/AzToolsFramework/Tests/Prefab/PrefabDeleteTests.cpp new file mode 100644 index 0000000000..0ef328b2ca --- /dev/null +++ b/Code/Framework/AzToolsFramework/Tests/Prefab/PrefabDeleteTests.cpp @@ -0,0 +1,150 @@ +/* + * Copyright (c) Contributors to the Open 3D Engine Project. + * For complete copyright and license terms please see the LICENSE at the root of this distribution. + * + * SPDX-License-Identifier: Apache-2.0 OR MIT + * + */ + +#include +#include +#include + +#include +#include +#include + +namespace UnitTest +{ + using PrefabDeleteTest = PrefabTestFixture; + + TEST_F(PrefabDeleteTest, DeleteEntitiesInInstance_DeleteSingleEntitySucceeds) + { + PrefabEntityResult createEntityResult = m_prefabPublicInterface->CreateEntity(AZ::EntityId(), AZ::Vector3()); + + // Verify that a valid entity is created. + AZ::EntityId testEntityId = createEntityResult.GetValue(); + ASSERT_TRUE(testEntityId.IsValid()); + AZ::Entity* testEntity = AzToolsFramework::GetEntityById(testEntityId); + ASSERT_TRUE(testEntity != nullptr); + + m_prefabPublicInterface->DeleteEntitiesInInstance(AzToolsFramework::EntityIdList{ testEntityId }); + + // Verify that entity can't be found after deletion. + testEntity = AzToolsFramework::GetEntityById(testEntityId); + EXPECT_TRUE(testEntity == nullptr); + } + + TEST_F(PrefabDeleteTest, DeleteEntitiesInInstance_DeleteSinglePrefabSucceeds) + { + PrefabEntityResult createEntityResult = m_prefabPublicInterface->CreateEntity(AZ::EntityId(), AZ::Vector3()); + + // Verify that a valid entity is created. + AZ::EntityId createdEntityId = createEntityResult.GetValue(); + ASSERT_TRUE(createdEntityId.IsValid()); + AZ::Entity* createdEntity = AzToolsFramework::GetEntityById(createdEntityId); + ASSERT_TRUE(createdEntity != nullptr); + + // Rather than hardcode a path, use a path from settings registry since that will work on all platforms. + AZ::SettingsRegistryInterface* registry = AZ::SettingsRegistry::Get(); + AZ::IO::FixedMaxPath path; + registry->Get(path.Native(), AZ::SettingsRegistryMergeUtils::FilePathKey_EngineRootFolder); + CreatePrefabResult createPrefabResult = + m_prefabPublicInterface->CreatePrefabInMemory(AzToolsFramework::EntityIdList{ createdEntityId }, path); + + AZ::EntityId createdPrefabContainerId = createPrefabResult.GetValue(); + ASSERT_TRUE(createdPrefabContainerId.IsValid()); + AZ::Entity* prefabContainerEntity = AzToolsFramework::GetEntityById(createdPrefabContainerId); + ASSERT_TRUE(prefabContainerEntity != nullptr); + + // Verify that the prefab container entity and the entity within are deleted. + m_prefabPublicInterface->DeleteEntitiesInInstance(AzToolsFramework::EntityIdList{ createdPrefabContainerId }); + prefabContainerEntity = AzToolsFramework::GetEntityById(createdPrefabContainerId); + EXPECT_TRUE(prefabContainerEntity == nullptr); + createdEntity = AzToolsFramework::GetEntityById(createdEntityId); + EXPECT_TRUE(createdEntity == nullptr); + } + + TEST_F(PrefabDeleteTest, DeleteEntitiesAndAllDescendantsInInstance_DeletingEntityDeletesChildEntityToo) + { + PrefabEntityResult parentEntityCreationResult = m_prefabPublicInterface->CreateEntity(AZ::EntityId(), AZ::Vector3()); + + // Verify that valid parent entity is created. + AZ::EntityId parentEntityId = parentEntityCreationResult.GetValue(); + ASSERT_TRUE(parentEntityId.IsValid()); + AZ::Entity* parentEntity = AzToolsFramework::GetEntityById(parentEntityId); + ASSERT_TRUE(parentEntity != nullptr); + + // Verify that valid child entity is created. + PrefabEntityResult childEntityCreationResult = m_prefabPublicInterface->CreateEntity(parentEntityId, AZ::Vector3()); + AZ::EntityId childEntityId = childEntityCreationResult.GetValue(); + ASSERT_TRUE(childEntityId.IsValid()); + AZ::Entity* childEntity = AzToolsFramework::GetEntityById(childEntityId); + ASSERT_TRUE(childEntity != nullptr); + + // PrefabTestFixture won't add required editor components by default. Hence we add them here. + AddRequiredEditorComponents(childEntity); + AddRequiredEditorComponents(parentEntity); + + // Parent the child entity under the parent entity. + AZ::TransformBus::Event(childEntityId, &AZ::TransformBus::Events::SetParent, parentEntityId); + + // Delete parent entity and its children. + m_prefabPublicInterface->DeleteEntitiesAndAllDescendantsInInstance(AzToolsFramework::EntityIdList{ parentEntityId }); + + // Verify that both the parent and child entities are deleted. + parentEntity = AzToolsFramework::GetEntityById(parentEntityId); + EXPECT_TRUE(parentEntity == nullptr); + childEntity = AzToolsFramework::GetEntityById(childEntityId); + EXPECT_TRUE(childEntity == nullptr); + } + + TEST_F(PrefabDeleteTest, DeleteEntitiesAndAllDescendantsInInstance_DeletingEntityDeletesChildPrefabToo) + { + PrefabEntityResult entityToBePutUnderPrefabResult = m_prefabPublicInterface->CreateEntity(AZ::EntityId(), AZ::Vector3()); + + // Verify that a valid entity is created that will be put in a prefab later. + AZ::EntityId entityToBePutUnderPrefabId = entityToBePutUnderPrefabResult.GetValue(); + ASSERT_TRUE(entityToBePutUnderPrefabId.IsValid()); + AZ::Entity* entityToBePutUnderPrefab = AzToolsFramework::GetEntityById(entityToBePutUnderPrefabId); + ASSERT_TRUE(entityToBePutUnderPrefab != nullptr); + + // Verify that a valid parent entity is created. + PrefabEntityResult parentEntityCreationResult = m_prefabPublicInterface->CreateEntity(AZ::EntityId(), AZ::Vector3()); + AZ::EntityId parentEntityId = parentEntityCreationResult.GetValue(); + ASSERT_TRUE(parentEntityId.IsValid()); + AZ::Entity* parentEntity = AzToolsFramework::GetEntityById(parentEntityId); + ASSERT_TRUE(parentEntity != nullptr); + + // Rather than hardcode a path, use a path from settings registry since that will work on all platforms. + AZ::SettingsRegistryInterface* registry = AZ::SettingsRegistry::Get(); + AZ::IO::FixedMaxPath path; + registry->Get(path.Native(), AZ::SettingsRegistryMergeUtils::FilePathKey_EngineRootFolder); + CreatePrefabResult createPrefabResult = + m_prefabPublicInterface->CreatePrefabInMemory(AzToolsFramework::EntityIdList{ entityToBePutUnderPrefabId }, path); + + // Verify that a valid prefab container entity is created. + AZ::EntityId createdPrefabContainerId = createPrefabResult.GetValue(); + ASSERT_TRUE(createdPrefabContainerId.IsValid()); + AZ::Entity* prefabContainerEntity = AzToolsFramework::GetEntityById(createdPrefabContainerId); + ASSERT_TRUE(prefabContainerEntity != nullptr); + + // PrefabTestFixture won't add required editor components by default. Hence we add them here. + AddRequiredEditorComponents(parentEntity); + AddRequiredEditorComponents(prefabContainerEntity); + + // Parent the prefab under the parent entity. + AZ::TransformBus::Event(createdPrefabContainerId, &AZ::TransformBus::Events::SetParent, parentEntityId); + + // Delete the parent entity. + m_prefabPublicInterface->DeleteEntitiesAndAllDescendantsInInstance(AzToolsFramework::EntityIdList{ parentEntityId }); + + // Validate that the parent and the prefab under it and the entity inside the prefab are all deleted. + parentEntity = AzToolsFramework::GetEntityById(parentEntityId); + ASSERT_TRUE(parentEntity == nullptr); + entityToBePutUnderPrefab = AzToolsFramework::GetEntityById(entityToBePutUnderPrefabId); + ASSERT_TRUE(entityToBePutUnderPrefab == nullptr); + prefabContainerEntity = AzToolsFramework::GetEntityById(createdPrefabContainerId); + EXPECT_TRUE(prefabContainerEntity == nullptr); + } +} // namespace UnitTest diff --git a/Code/Framework/AzToolsFramework/Tests/Prefab/PrefabFocus/PrefabFocusTests.cpp b/Code/Framework/AzToolsFramework/Tests/Prefab/PrefabFocus/PrefabFocusTests.cpp index 86c73e72e5..6bf964f038 100644 --- a/Code/Framework/AzToolsFramework/Tests/Prefab/PrefabFocus/PrefabFocusTests.cpp +++ b/Code/Framework/AzToolsFramework/Tests/Prefab/PrefabFocus/PrefabFocusTests.cpp @@ -106,7 +106,9 @@ namespace UnitTest inline static const char* Passenger2EntityName = "Passenger2"; }; - TEST_F(PrefabFocusTests, PrefabFocus_FocusOnOwningPrefab_RootContainer) + // Test was disabled because the implementation of GetFocusedPrefabInstance now relies on the Prefab EOS, + // which is not used by our test environment. This can be restored once Instance handles are implemented. + TEST_F(PrefabFocusTests, DISABLED_PrefabFocus_FocusOnOwningPrefab_RootContainer) { // Verify FocusOnOwningPrefab works when passing the container entity of the root prefab. { @@ -121,7 +123,9 @@ namespace UnitTest } } - TEST_F(PrefabFocusTests, PrefabFocus_FocusOnOwningPrefab_RootEntity) + // Test was disabled because the implementation of GetFocusedPrefabInstance now relies on the Prefab EOS, + // which is not used by our test environment. This can be restored once Instance handles are implemented. + TEST_F(PrefabFocusTests, DISABLED_PrefabFocus_FocusOnOwningPrefab_RootEntity) { // Verify FocusOnOwningPrefab works when passing a nested entity of the root prefab. { diff --git a/Code/Framework/AzToolsFramework/Tests/Prefab/PrefabScriptingTests.cpp b/Code/Framework/AzToolsFramework/Tests/Prefab/PrefabScriptingTests.cpp index 7e61c50629..999f3e8c26 100644 --- a/Code/Framework/AzToolsFramework/Tests/Prefab/PrefabScriptingTests.cpp +++ b/Code/Framework/AzToolsFramework/Tests/Prefab/PrefabScriptingTests.cpp @@ -48,11 +48,45 @@ namespace UnitTest } }; + TEST_F(PrefabScriptingTest, CreatePrefabTemplate_GeneratesContainerWithStableTransformComponentId) + { + AZ::EntityId entityId; + AzToolsFramework::EntityUtilityBus::BroadcastResult(entityId, &AzToolsFramework::EntityUtilityBus::Events::CreateEditorReadyEntity, "test"); + TemplateId templateId1; + PrefabSystemScriptingBus::BroadcastResult(templateId1, &PrefabSystemScriptingBus::Events::CreatePrefabTemplate, AZStd::vector{ entityId }, "test.prefab"); + + auto prefabSystemComponentInterface = AZ::Interface::Get(); + + auto instance1 = prefabSystemComponentInterface->InstantiatePrefab(templateId1); + + // Clear all templates to reset the system + prefabSystemComponentInterface->RemoveAllTemplates(); + + TemplateId templateId2; + PrefabSystemScriptingBus::BroadcastResult(templateId2, &PrefabSystemScriptingBus::Events::CreatePrefabTemplate, AZStd::vector{ entityId }, "test.prefab"); + + auto instance2 = prefabSystemComponentInterface->InstantiatePrefab(templateId2); + + auto referenceWrapper1 = instance1->GetContainerEntity(); + auto referenceWrapper2 = instance2->GetContainerEntity(); + + ASSERT_TRUE(referenceWrapper1); + ASSERT_TRUE(referenceWrapper2); + + auto transformComponent1 = referenceWrapper1->get().FindComponent(); + auto transformComponent2 = referenceWrapper2->get().FindComponent(); + + ASSERT_NE(transformComponent1, nullptr); + ASSERT_NE(transformComponent2, nullptr); + + ASSERT_EQ(transformComponent1->GetId(), transformComponent2->GetId()); + } + TEST_F(PrefabScriptingTest, PrefabScripting_CreatePrefab) { AZ::ScriptContext sc; auto behaviorContext = AZ::Interface::Get()->GetBehaviorContext(); - + sc.BindTo(behaviorContext); sc.Execute(R"LUA( my_id = EntityUtilityBus.Broadcast.CreateEditorReadyEntity("test") @@ -76,7 +110,7 @@ namespace UnitTest { AZ::ScriptContext sc; auto behaviorContext = AZ::Interface::Get()->GetBehaviorContext(); - + sc.BindTo(behaviorContext); sc.Execute(R"LUA( my_id = EntityUtilityBus.Broadcast.CreateEditorReadyEntity("test") @@ -99,7 +133,7 @@ namespace UnitTest { AZ::ScriptContext sc; auto behaviorContext = AZ::Interface::Get()->GetBehaviorContext(); - + sc.BindTo(behaviorContext); AZ_TEST_START_TRACE_SUPPRESSION; sc.Execute(R"LUA( @@ -119,7 +153,7 @@ namespace UnitTest { AZ::ScriptContext sc; auto behaviorContext = AZ::Interface::Get()->GetBehaviorContext(); - + sc.BindTo(behaviorContext); sc.Execute(R"LUA( my_id = EntityUtilityBus.Broadcast.CreateEditorReadyEntity("test") @@ -132,7 +166,7 @@ namespace UnitTest g_globalPrefabString = my_result:GetValue() end )LUA"); - + auto prefabSystemComponentInterface = AZ::Interface::Get(); prefabSystemComponentInterface->RemoveAllTemplates(); @@ -169,5 +203,5 @@ namespace UnitTest g_globalPrefabString.set_capacity(0); // Free all memory } - + } diff --git a/Code/Framework/AzToolsFramework/Tests/Prefab/PrefabTestFixture.cpp b/Code/Framework/AzToolsFramework/Tests/Prefab/PrefabTestFixture.cpp index ed30de09c4..3067f66aa0 100644 --- a/Code/Framework/AzToolsFramework/Tests/Prefab/PrefabTestFixture.cpp +++ b/Code/Framework/AzToolsFramework/Tests/Prefab/PrefabTestFixture.cpp @@ -11,6 +11,8 @@ #include #include #include +#include +#include #include #include @@ -50,6 +52,15 @@ namespace UnitTest GetApplication()->RegisterComponentDescriptor(PrefabTestComponent::CreateDescriptor()); GetApplication()->RegisterComponentDescriptor(PrefabTestComponentWithUnReflectedTypeMember::CreateDescriptor()); + + AzToolsFramework::ToolsApplicationRequestBus::BroadcastResult( + m_undoStack, &AzToolsFramework::ToolsApplicationRequestBus::Events::GetUndoStack); + AZ_Assert(m_undoStack, "Failed to look up undo stack from tools application"); + } + + void PrefabTestFixture::TearDownEditorFixtureImpl() + { + m_undoStack = nullptr; } AZStd::unique_ptr PrefabTestFixture::CreateTestApplication() @@ -57,7 +68,25 @@ namespace UnitTest return AZStd::make_unique("PrefabTestApplication"); } - AZ::Entity* PrefabTestFixture::CreateEntity(const char* entityName, const bool shouldActivate) + void PrefabTestFixture::CreateRootPrefab() + { + auto entityOwnershipService = AZ::Interface::Get(); + ASSERT_TRUE(entityOwnershipService != nullptr); + entityOwnershipService->CreateNewLevelPrefab("UnitTestRoot.prefab", ""); + auto rootEntityReference = entityOwnershipService->GetRootPrefabInstance()->get().GetContainerEntity(); + ASSERT_TRUE(rootEntityReference.has_value()); + auto& rootEntity = rootEntityReference->get(); + rootEntity.Deactivate(); + rootEntity.CreateComponent(); + rootEntity.Activate(); + } + + void PrefabTestFixture::PropagateAllTemplateChanges() + { + m_prefabSystemComponent->OnSystemTick(); + } + + AZ::Entity* PrefabTestFixture::CreateEntity(AZStd::string entityName, const bool shouldActivate) { // Circumvent the EntityContext system and generate a new entity with a transformcomponent AZ::Entity* newEntity = aznew AZ::Entity(entityName); @@ -71,8 +100,43 @@ namespace UnitTest return newEntity; } + AZ::EntityId PrefabTestFixture::CreateEntityUnderRootPrefab(AZStd::string name, AZ::EntityId parentId) + { + auto createResult = m_prefabPublicInterface->CreateEntity(parentId, AZ::Vector3()); + AZ_Assert(createResult.IsSuccess(), "Failed to create entity: %s", createResult.GetError().c_str()); + AZ::EntityId entityId = createResult.GetValue(); + + AZ::Entity* entity = nullptr; + AZ::ComponentApplicationBus::BroadcastResult(entity, &AZ::ComponentApplicationRequests::FindEntity, entityId); + + entity->Deactivate(); + + entity->SetName(name); + + // Normally, in invalid parent ID should automatically parent us to the root prefab, but currently in the unit test + // environment entities aren't created with a default transform component, so CreateEntity won't correctly parent. + // We get the actual target parent ID here, then create our missing transform component. + if (!parentId.IsValid()) + { + auto prefabEditorEntityOwnershipInterface = AZ::Interface::Get(); + parentId = prefabEditorEntityOwnershipInterface->GetRootPrefabInstance()->get().GetContainerEntityId(); + } + + auto transform = aznew AzToolsFramework::Components::TransformComponent; + transform->SetParent(parentId); + entity->AddComponent(transform); + + entity->Activate(); + + // Update our undo cache entry to include the rename / reparent as one atomic operation. + m_prefabPublicInterface->GenerateUndoNodesForEntityChangeAndUpdateCache(entityId, m_undoStack->GetTop()); + m_prefabSystemComponent->OnSystemTick(); + + return entityId; + } + void PrefabTestFixture::CompareInstances(const AzToolsFramework::Prefab::Instance& instanceA, - const AzToolsFramework::Prefab::Instance& instanceB, bool shouldCompareLinkIds, bool shouldCompareContainerEntities) + const AzToolsFramework::Prefab::Instance& instanceB, bool shouldCompareLinkIds, bool shouldCompareContainerEntities) { AzToolsFramework::Prefab::TemplateId templateAId = instanceA.GetTemplateId(); AzToolsFramework::Prefab::TemplateId templateBId = instanceB.GetTemplateId(); @@ -125,4 +189,31 @@ namespace UnitTest EXPECT_EQ(entityInInstance->GetState(), AZ::Entity::State::Active); } } + + void PrefabTestFixture::ProcessDeferredUpdates() + { + // Force a prefab propagation for updates that are deferred to the next tick. + m_prefabSystemComponent->OnSystemTick(); + } + + void PrefabTestFixture::Undo() + { + m_undoStack->Undo(); + ProcessDeferredUpdates(); + } + + void PrefabTestFixture::Redo() + { + m_undoStack->Redo(); + ProcessDeferredUpdates(); + } + + void PrefabTestFixture::AddRequiredEditorComponents(AZ::Entity* entity) + { + ASSERT_TRUE(entity != nullptr); + entity->Deactivate(); + AzToolsFramework::EditorEntityContextRequestBus::Broadcast( + &AzToolsFramework::EditorEntityContextRequests::AddRequiredComponents, *entity); + entity->Activate(); + } } diff --git a/Code/Framework/AzToolsFramework/Tests/Prefab/PrefabTestFixture.h b/Code/Framework/AzToolsFramework/Tests/Prefab/PrefabTestFixture.h index 0a78ded1a6..a4cc1c8a7a 100644 --- a/Code/Framework/AzToolsFramework/Tests/Prefab/PrefabTestFixture.h +++ b/Code/Framework/AzToolsFramework/Tests/Prefab/PrefabTestFixture.h @@ -49,10 +49,14 @@ namespace UnitTest inline static const char* CarPrefabMockFilePath = "SomePathToCar"; void SetUpEditorFixtureImpl() override; + void TearDownEditorFixtureImpl() override; AZStd::unique_ptr CreateTestApplication() override; - AZ::Entity* CreateEntity(const char* entityName, const bool shouldActivate = true); + void CreateRootPrefab(); + AZ::Entity* CreateEntity(AZStd::string entityName, const bool shouldActivate = true); + AZ::EntityId CreateEntityUnderRootPrefab(AZStd::string name, AZ::EntityId parentId = AZ::EntityId()); + void PropagateAllTemplateChanges(); void CompareInstances(const Instance& instanceA, const Instance& instanceB, bool shouldCompareLinkIds = true, bool shouldCompareContainerEntities = true); @@ -62,10 +66,22 @@ namespace UnitTest //! Validates that all entities within a prefab instance are in 'Active' state. void ValidateInstanceEntitiesActive(Instance& instance); + // Kicks off any updates scheduled for the next tick + virtual void ProcessDeferredUpdates(); + + // Performs an undo operation and ensures the tick-scheduled updates happen + void Undo(); + + // Performs a redo operation and ensures the tick-scheduled updates happen + void Redo(); + + void AddRequiredEditorComponents(AZ::Entity* entity); + PrefabSystemComponent* m_prefabSystemComponent = nullptr; PrefabLoaderInterface* m_prefabLoaderInterface = nullptr; PrefabPublicInterface* m_prefabPublicInterface = nullptr; InstanceUpdateExecutorInterface* m_instanceUpdateExecutorInterface = nullptr; InstanceToTemplateInterface* m_instanceToTemplateInterface = nullptr; + AzToolsFramework::UndoSystem::UndoStack* m_undoStack = nullptr; }; } diff --git a/Code/Framework/AzToolsFramework/Tests/Prefab/PrefabUndoLinkTests.cpp b/Code/Framework/AzToolsFramework/Tests/Prefab/PrefabUndoLinkTests.cpp index 8fafe1f177..442894c101 100644 --- a/Code/Framework/AzToolsFramework/Tests/Prefab/PrefabUndoLinkTests.cpp +++ b/Code/Framework/AzToolsFramework/Tests/Prefab/PrefabUndoLinkTests.cpp @@ -170,7 +170,14 @@ namespace UnitTest m_instanceUpdateExecutorInterface->UpdateTemplateInstancesInQueue(); //instantiate a new nested instance - nestedInstance = m_prefabSystemComponent->InstantiatePrefab(nestedTemplateId); + nestedInstance = m_prefabSystemComponent->InstantiatePrefab( + nestedTemplateId, AZStd::nullopt, + [](const AzToolsFramework::EntityList& entities) + { + AzToolsFramework::EditorEntityContextRequestBus::Broadcast( + &AzToolsFramework::EditorEntityContextRequests::HandleEntitiesAdded, entities); + }); + nestedContainerEntityId = nestedInstance->GetContainerEntityId(); AZ::ComponentApplicationBus::BroadcastResult(nestedContainerEntity, &AZ::ComponentApplicationBus::Events::FindEntity, nestedContainerEntityId); ASSERT_TRUE(nestedContainerEntity); @@ -198,7 +205,13 @@ namespace UnitTest LinkId linkId = undoInstanceLinkNode.GetLinkId(); - rootInstance = m_prefabSystemComponent->InstantiatePrefab(rootTemplateId); + rootInstance = m_prefabSystemComponent->InstantiatePrefab( + rootTemplateId, AZStd::nullopt, + [](const AzToolsFramework::EntityList& entities) + { + AzToolsFramework::EditorEntityContextRequestBus::Broadcast( + &AzToolsFramework::EditorEntityContextRequests::HandleEntitiesAdded, entities); + }); aliases = rootInstance->GetNestedInstanceAliases(nestedTemplateId); //verify the link was created @@ -228,7 +241,13 @@ namespace UnitTest m_instanceUpdateExecutorInterface->UpdateTemplateInstancesInQueue(); //verify the update worked - rootInstance = m_prefabSystemComponent->InstantiatePrefab(rootTemplateId); + rootInstance = m_prefabSystemComponent->InstantiatePrefab( + rootTemplateId, AZStd::nullopt, + [](const AzToolsFramework::EntityList& entities) + { + AzToolsFramework::EditorEntityContextRequestBus::Broadcast( + &AzToolsFramework::EditorEntityContextRequests::HandleEntitiesAdded, entities); + }); aliases = rootInstance->GetNestedInstanceAliases(nestedTemplateId); nestedInstanceRef = rootInstance->FindNestedInstance(aliases[0]); nestedContainerEntityId = nestedInstanceRef->get().GetContainerEntityId(); @@ -244,7 +263,13 @@ namespace UnitTest m_instanceUpdateExecutorInterface->UpdateTemplateInstancesInQueue(); //verify the undo update worked - rootInstance = m_prefabSystemComponent->InstantiatePrefab(rootTemplateId); + rootInstance = m_prefabSystemComponent->InstantiatePrefab( + rootTemplateId, AZStd::nullopt, + [](const AzToolsFramework::EntityList& entities) + { + AzToolsFramework::EditorEntityContextRequestBus::Broadcast( + &AzToolsFramework::EditorEntityContextRequests::HandleEntitiesAdded, entities); + }); aliases = rootInstance->GetNestedInstanceAliases(nestedTemplateId); nestedInstanceRef = rootInstance->FindNestedInstance(aliases[0]); nestedContainerEntityId = nestedInstanceRef->get().GetContainerEntityId(); @@ -259,7 +284,13 @@ namespace UnitTest undoLinkUpdateNode.Redo(); m_instanceUpdateExecutorInterface->UpdateTemplateInstancesInQueue(); - rootInstance = m_prefabSystemComponent->InstantiatePrefab(rootTemplateId); + rootInstance = m_prefabSystemComponent->InstantiatePrefab( + rootTemplateId, AZStd::nullopt, + [](const AzToolsFramework::EntityList& entities) + { + AzToolsFramework::EditorEntityContextRequestBus::Broadcast( + &AzToolsFramework::EditorEntityContextRequests::HandleEntitiesAdded, entities); + }); aliases = rootInstance->GetNestedInstanceAliases(nestedTemplateId); nestedInstanceRef = rootInstance->FindNestedInstance(aliases[0]); nestedContainerEntityId = nestedInstanceRef->get().GetContainerEntityId(); @@ -287,7 +318,13 @@ namespace UnitTest m_instanceUpdateExecutorInterface->UpdateTemplateInstancesInQueue(); //verify the update worked - rootInstance = m_prefabSystemComponent->InstantiatePrefab(rootTemplateId); + rootInstance = m_prefabSystemComponent->InstantiatePrefab( + rootTemplateId, AZStd::nullopt, + [](const AzToolsFramework::EntityList& entities) + { + AzToolsFramework::EditorEntityContextRequestBus::Broadcast( + &AzToolsFramework::EditorEntityContextRequests::HandleEntitiesAdded, entities); + }); aliases = rootInstance->GetNestedInstanceAliases(nestedTemplateId); nestedInstanceRef = rootInstance->FindNestedInstance(aliases[0]); nestedContainerEntityId = nestedInstanceRef->get().GetContainerEntityId(); diff --git a/Code/Framework/AzToolsFramework/Tests/Prefab/PrefabUndoTests.cpp b/Code/Framework/AzToolsFramework/Tests/Prefab/PrefabUndoTests.cpp index 5c68b30e8f..cfba41696c 100644 --- a/Code/Framework/AzToolsFramework/Tests/Prefab/PrefabUndoTests.cpp +++ b/Code/Framework/AzToolsFramework/Tests/Prefab/PrefabUndoTests.cpp @@ -79,7 +79,14 @@ namespace UnitTest // verify template updated correctly //instantiate second instance for checking if propogation works - AZStd::unique_ptr secondInstance = m_prefabSystemComponent->InstantiatePrefab(templateId); + AZStd::unique_ptr secondInstance = m_prefabSystemComponent->InstantiatePrefab( + templateId, AZStd::nullopt, + [](const AzToolsFramework::EntityList& entities) + { + AzToolsFramework::EditorEntityContextRequestBus::Broadcast( + &AzToolsFramework::EditorEntityContextRequests::HandleEntitiesAdded, entities); + }); + ASSERT_TRUE(secondInstance); ValidateInstanceEntitiesActive(*secondInstance); diff --git a/Code/Framework/AzToolsFramework/Tests/Prefab/ProceduralPrefabSystemComponentTests.cpp b/Code/Framework/AzToolsFramework/Tests/Prefab/ProceduralPrefabSystemComponentTests.cpp new file mode 100644 index 0000000000..e2c650f50b --- /dev/null +++ b/Code/Framework/AzToolsFramework/Tests/Prefab/ProceduralPrefabSystemComponentTests.cpp @@ -0,0 +1,302 @@ +/* + * Copyright (c) Contributors to the Open 3D Engine Project. + * For complete copyright and license terms please see the LICENSE at the root of this distribution. + * + * SPDX-License-Identifier: Apache-2.0 OR MIT + * + */ + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +namespace UnitTest +{ + struct ProceduralPrefabSystemComponentTests + : AllocatorsTestFixture + , AZ::ComponentApplicationBus::Handler + { + void SetUp() override + { + TestRunner::Instance().m_suppressOutput = false; + TestRunner::Instance().m_suppressPrintf = false; + TestRunner::Instance().m_suppressWarnings = false; + TestRunner::Instance().m_suppressErrors = false; + TestRunner::Instance().m_suppressAsserts = false; + + AllocatorsTestFixture::SetUp(); + + AZ::ComponentApplicationBus::Handler::BusConnect(); + + ASSERT_TRUE(m_temporaryDirectory.IsValid()); + + m_localFileIo = AZStd::make_unique(); + + m_prevIoBase = AZ::IO::FileIOBase::GetInstance(); + AZ::IO::FileIOBase::SetInstance(nullptr); // Need to clear the previous instance first + AZ::IO::FileIOBase::SetInstance(m_localFileIo.get()); + + AZ::JsonSystemComponent::Reflect(&m_jsonContext); + + m_settingsRegistry = AZStd::make_unique(); + AZ::SettingsRegistry::Register(m_settingsRegistry.get()); + + m_settingsRegistry->Set(AZ::SettingsRegistryMergeUtils::FilePathKey_ProjectPath, m_temporaryDirectory.GetDirectory()); + + m_prefabSystem = PrefabSystemComponent::CreateDescriptor(); + m_procSystem = ProceduralPrefabSystemComponent::CreateDescriptor(); + + m_prefabSystem->Reflect(&m_context); + m_prefabSystem->Reflect(&m_jsonContext); + m_procSystem->Reflect(&m_context); + m_procSystem->Reflect(&m_jsonContext); + + AZ::Entity::Reflect(&m_context); + AZ::Entity::Reflect(&m_jsonContext); + AZ::IO::PathReflect(&m_context); + + m_systemEntity = AZStd::make_unique(); + m_systemEntity->CreateComponent(); + m_systemEntity->CreateComponent(); + + m_systemEntity->Init(); + m_systemEntity->Activate(); + + AZ::Data::AssetManager::Create({}); + } + + void TearDown() override + { + AZ::Data::AssetManager::Destroy(); + + m_systemEntity->Deactivate(); + m_systemEntity = nullptr; + + m_jsonContext.EnableRemoveReflection(); + AZ::JsonSystemComponent::Reflect(&m_jsonContext); + m_prefabSystem->Reflect(&m_jsonContext); + m_procSystem->Reflect(&m_jsonContext); + AZ::Entity::Reflect(&m_jsonContext); + m_jsonContext.DisableRemoveReflection(); + + AZ::IO::FileIOBase::SetInstance(nullptr); // Clear the previous instance first + AZ::IO::FileIOBase::SetInstance(m_prevIoBase); + + m_prevIoBase = nullptr; + + AZ::SettingsRegistry::Unregister(m_settingsRegistry.get()); + + AZ::ComponentApplicationBus::Handler::BusDisconnect(); + AllocatorsTestFixture::TearDown(); + + TestRunner::Instance().ResetSuppressionSettingsToDefault(); + } + + // ComponentApplicationBus + AZ::ComponentApplication* GetApplication() override + { + return nullptr; + } + + void RegisterComponentDescriptor(const AZ::ComponentDescriptor*) override { } + void UnregisterComponentDescriptor(const AZ::ComponentDescriptor*) override { } + void RegisterEntityAddedEventHandler(AZ::EntityAddedEvent::Handler&) override { } + void RegisterEntityRemovedEventHandler(AZ::EntityRemovedEvent::Handler&) override { } + void RegisterEntityActivatedEventHandler(AZ::EntityActivatedEvent::Handler&) override { } + void RegisterEntityDeactivatedEventHandler(AZ::EntityDeactivatedEvent::Handler&) override { } + void SignalEntityActivated(AZ::Entity*) override { } + void SignalEntityDeactivated(AZ::Entity*) override { } + + bool AddEntity(AZ::Entity*) override + { + return true; + } + + bool RemoveEntity(AZ::Entity*) override + { + return true; + } + + bool DeleteEntity(const AZ::EntityId&) override + { + return true; + } + + AZ::Entity* FindEntity(const AZ::EntityId&) override + { + return nullptr; + } + + AZ::SerializeContext* GetSerializeContext() override + { + return &m_context; + } + + AZ::BehaviorContext* GetBehaviorContext() override + { + return nullptr; + } + + AZ::JsonRegistrationContext* GetJsonRegistrationContext() override + { + return &m_jsonContext; + } + + const char* GetEngineRoot() const override + { + return nullptr; + } + + const char* GetExecutableFolder() const override + { + return nullptr; + } + + void EnumerateEntities(const EntityCallback& /*callback*/) override { } + void QueryApplicationType(AZ::ApplicationTypeQuery& /*appType*/) const override { } + //// + + AZ::ComponentDescriptor* m_prefabSystem{}; + AZ::ComponentDescriptor* m_procSystem{}; + AZStd::unique_ptr m_settingsRegistry; + AZ::SerializeContext m_context; + AZ::JsonRegistrationContext m_jsonContext; + AZStd::unique_ptr m_localFileIo; + ScopedTemporaryDirectory m_temporaryDirectory; + AZStd::unique_ptr m_systemEntity; + + AZ::IO::FileIOBase* m_prevIoBase{}; + }; + + struct MockCatalog : AZ::Data::AssetCatalogRequestBus::Handler + { + static const inline AZ::Data::AssetId TestId{ AZ::Uuid::CreateRandom(), 1234 }; + + MockCatalog(AZStd::string testFile) + : m_testFile(AZStd::move(testFile)) + { + BusConnect(); + } + + ~MockCatalog() override + { + BusDisconnect(); + } + + AZStd::string GetAssetPathById(const AZ::Data::AssetId& assetId) override + { + if (assetId == TestId) + { + return m_testFile; + } + + return "InvalidAssetId"; + } + + AZ::Data::AssetId GetAssetIdByPath(const char* path, const AZ::Data::AssetType&, bool) override + { + AZ::IO::PathView pathView{ AZStd::string_view(path) }; + + if (AZ::IO::PathView(m_testFile) == pathView) + { + return TestId; + } + + AZ_Error("MockCatalog", false, "Requested path %s does not match expected asset path of %s", path, m_testFile.c_str()); + ADD_FAILURE(); + + return {}; + } + + AZStd::string m_testFile; + }; + + struct PrefabPublicNotificationsListener : PrefabPublicNotificationBus::Handler + { + PrefabPublicNotificationsListener() + { + BusConnect(); + } + + ~PrefabPublicNotificationsListener() override + { + BusDisconnect(); + } + + void OnPrefabInstancePropagationBegin() override + { + m_updated = true; + } + + bool m_updated = false; + }; + + TEST_F(ProceduralPrefabSystemComponentTests, RegisteredPrefabUpdates) + { + const AZStd::string prefabFile = (AZ::IO::Path(m_temporaryDirectory.GetDirectory()) / "test.prefab").Native(); + MockCatalog catalog(prefabFile.c_str()); + + auto proceduralPrefabSystemComponentInterface = AZ::Interface::Get(); + auto prefabSystemComponentInterface = AZ::Interface::Get(); + auto prefabLoaderInterface = AZ::Interface::Get(); + + ASSERT_NE(proceduralPrefabSystemComponentInterface, nullptr); + ASSERT_NE(prefabSystemComponentInterface, nullptr); + ASSERT_NE(prefabLoaderInterface, nullptr); + + auto entity = aznew AZ::Entity(); + + AZStd::unique_ptr instance = prefabSystemComponentInterface->CreatePrefab({ entity }, {}, prefabFile.c_str()); + + ASSERT_NE(instance, nullptr); + + prefabLoaderInterface->SaveTemplateToFile(instance->GetTemplateId(), prefabFile.c_str()); + + proceduralPrefabSystemComponentInterface->RegisterProceduralPrefab(prefabFile, instance->GetTemplateId()); + + AzFramework::AssetCatalogEventBus::Broadcast(&AzFramework::AssetCatalogEventBus::Events::OnCatalogAssetChanged, MockCatalog::TestId); + + PrefabPublicNotificationsListener listener; + AZ::SystemTickBus::Broadcast(&AZ::SystemTickBus::Events::OnSystemTick); + + EXPECT_TRUE(listener.m_updated); + } + + TEST_F(ProceduralPrefabSystemComponentTests, UnregisteredPrefabDoesNotUpdate) + { + PrefabPublicNotificationsListener listener; + + const AZStd::string prefabFile = (AZ::IO::Path(m_temporaryDirectory.GetDirectory()) / "test.prefab").Native(); + MockCatalog catalog(prefabFile.c_str()); + + auto proceduralPrefabSystemComponentInterface = AZ::Interface::Get(); + auto prefabSystemComponentInterface = AZ::Interface::Get(); + auto prefabLoaderInterface = AZ::Interface::Get(); + + ASSERT_NE(proceduralPrefabSystemComponentInterface, nullptr); + ASSERT_NE(prefabSystemComponentInterface, nullptr); + ASSERT_NE(prefabLoaderInterface, nullptr); + + auto entity = aznew AZ::Entity(); + + AZStd::unique_ptr instance = prefabSystemComponentInterface->CreatePrefab({ entity }, {}, prefabFile.c_str()); + + ASSERT_NE(instance, nullptr); + + prefabLoaderInterface->SaveTemplateToFile(instance->GetTemplateId(), prefabFile.c_str()); + + AzFramework::AssetCatalogEventBus::Broadcast( + &AzFramework::AssetCatalogEventBus::Events::OnCatalogAssetChanged, MockCatalog::TestId); + + AZ::SystemTickBus::Broadcast(&AZ::SystemTickBus::Events::OnSystemTick); + + EXPECT_FALSE(listener.m_updated); + } +} diff --git a/Code/Framework/AzToolsFramework/Tests/Prefab/SpawnableRemoveEditorInfoTestFixture.cpp b/Code/Framework/AzToolsFramework/Tests/Prefab/SpawnableRemoveEditorInfoTestFixture.cpp index b8ce3c7c42..0d75227e38 100644 --- a/Code/Framework/AzToolsFramework/Tests/Prefab/SpawnableRemoveEditorInfoTestFixture.cpp +++ b/Code/Framework/AzToolsFramework/Tests/Prefab/SpawnableRemoveEditorInfoTestFixture.cpp @@ -9,6 +9,7 @@ #include #include +#include #include #include #include @@ -201,15 +202,14 @@ namespace UnitTest { ConvertSourceEntitiesToPrefab(); + AzToolsFramework::Prefab::PrefabConversionUtils::PrefabDocument prefab("Test"); + prefab.SetPrefabDom(m_prefabDom); const bool actualResult = - m_editorInfoRemover.RemoveEditorInfo(m_prefabDom, m_serializeContext, m_prefabProcessorContext).IsSuccess(); + m_editorInfoRemover.RemoveEditorInfo(prefab, m_serializeContext, m_prefabProcessorContext).IsSuccess(); EXPECT_EQ(expectedResult, actualResult); - AZStd::unique_ptr convertedInstance(aznew Instance()); - ASSERT_TRUE(AzToolsFramework::Prefab::PrefabDomUtils::LoadInstanceFromPrefabDom(*convertedInstance, m_prefabDom)); - - convertedInstance->DetachAllEntitiesInHierarchy( + prefab.GetInstance().DetachAllEntitiesInHierarchy( [this](AZStd::unique_ptr entity) { m_runtimeEntities.emplace_back(entity.release()); diff --git a/Code/Framework/AzToolsFramework/Tests/PropertyIntCtrlCommonTests.cpp b/Code/Framework/AzToolsFramework/Tests/PropertyIntCtrlCommonTests.cpp index 67f764d1b3..d95451441f 100644 --- a/Code/Framework/AzToolsFramework/Tests/PropertyIntCtrlCommonTests.cpp +++ b/Code/Framework/AzToolsFramework/Tests/PropertyIntCtrlCommonTests.cpp @@ -6,7 +6,9 @@ * */ -#include "IntegerPrimtitiveTestConfig.h" +#include +#include +#include namespace UnitTest { diff --git a/Code/Framework/AzToolsFramework/Tests/PropertyIntCtrlCommonTests.h b/Code/Framework/AzToolsFramework/Tests/PropertyIntCtrlCommonTests.h index 10aed57ebd..712eeb99b7 100644 --- a/Code/Framework/AzToolsFramework/Tests/PropertyIntCtrlCommonTests.h +++ b/Code/Framework/AzToolsFramework/Tests/PropertyIntCtrlCommonTests.h @@ -156,6 +156,16 @@ namespace UnitTest EXPECT_STREQ(tooltip.toStdString().c_str(), expected.str().c_str()); } + void EmitWidgetValueChanged() + { + emit m_widget->valueChanged(ValueType(0)); + } + + void EmitWidgetEditingFinished() + { + emit m_widget->editingFinished(); + } + AZStd::unique_ptr m_dummyWidget; AZStd::unique_ptr m_handler; WidgetType* m_widget; diff --git a/Code/Framework/AzToolsFramework/Tests/PropertyIntSpinCtrlTests.cpp b/Code/Framework/AzToolsFramework/Tests/PropertyIntSpinCtrlTests.cpp index 01f314bcc2..d7616e6bb8 100644 --- a/Code/Framework/AzToolsFramework/Tests/PropertyIntSpinCtrlTests.cpp +++ b/Code/Framework/AzToolsFramework/Tests/PropertyIntSpinCtrlTests.cpp @@ -47,4 +47,71 @@ namespace UnitTest { this->HandlerMinMaxLessLimit_ModifyHandler_ExpectSuccessAndValidLessLimitToolTipString(); } + + struct PropertyEditorHandler + : public AzToolsFramework::PropertyEditorGUIMessages::Bus::Handler + { + PropertyEditorHandler() + { + AzToolsFramework::PropertyEditorGUIMessages::Bus::Handler::BusConnect(); + } + + ~PropertyEditorHandler() + { + AzToolsFramework::PropertyEditorGUIMessages::Bus::Handler::BusDisconnect(); + } + + // AzToolsFramework::PropertyEditorGUIMessages::Bus overrides ... + void RequestWrite([[maybe_unused]] QWidget* editorGUI) override + { + m_requestWriteCallCount++; + } + + void RequestRefresh([[maybe_unused]] PropertyModificationRefreshLevel level) override + { + } + + void AddElementsToParentContainer( + [[maybe_unused]] QWidget* editorGUI, + [[maybe_unused]] size_t numElements, + [[maybe_unused]] const InstanceDataNode::FillDataClassCallback& fillDataCallback) override + { + } + + void RequestPropertyNotify([[maybe_unused]] QWidget* editorGUI) override + { + } + + void OnEditingFinished([[maybe_unused]]QWidget* editorGUI) override + { + m_onEditingFinishedCallCount++; + } + + int m_requestWriteCallCount = 0; + int m_onEditingFinishedCallCount = 0; + }; + + TYPED_TEST(PropertySpinCtrlFixture, SpinBoxWidgetValueChangedInvokesPropertyEditorGUIMessages) + { + // setup the event handler + PropertyEditorHandler eventHandler; + + // trigger the QT signal + this->EmitWidgetValueChanged(); + + // there should be at least 1 call to RequestWrite. + EXPECT_GT(eventHandler.m_requestWriteCallCount, 0); + } + + TYPED_TEST(PropertySpinCtrlFixture, SpinBoxWidgetEditingFinishedInvokesPropertyEditorGUIMessages) + { + // setup the event handler + PropertyEditorHandler eventHandler; + + // trigger the QT signal + this->EmitWidgetEditingFinished(); + + // there should be at least 1 call to OnEditingFinished. + EXPECT_GT(eventHandler.m_onEditingFinishedCallCount, 0); + } } // namespace UnitTest diff --git a/Code/Framework/AzToolsFramework/Tests/Script/ScriptComponentTests.cpp b/Code/Framework/AzToolsFramework/Tests/Script/ScriptComponentTests.cpp index 93d108de85..f480621a40 100644 --- a/Code/Framework/AzToolsFramework/Tests/Script/ScriptComponentTests.cpp +++ b/Code/Framework/AzToolsFramework/Tests/Script/ScriptComponentTests.cpp @@ -31,7 +31,7 @@ namespace UnitTest int myReloadValue = 0; class ScriptComponentTest - : public testing::Test + : public UnitTest::ScopedAllocatorSetupFixture { public: AZ_TYPE_INFO(ScriptComponentTest, "{85CDBD49-70FF-416A-8154-B5525EDD30D4}"); diff --git a/Code/Framework/AzToolsFramework/Tests/SliceStabilityTests/SliceStabilityTestFramework.h b/Code/Framework/AzToolsFramework/Tests/SliceStabilityTests/SliceStabilityTestFramework.h index 01b40fbb16..56f4bb5243 100644 --- a/Code/Framework/AzToolsFramework/Tests/SliceStabilityTests/SliceStabilityTestFramework.h +++ b/Code/Framework/AzToolsFramework/Tests/SliceStabilityTests/SliceStabilityTestFramework.h @@ -137,7 +137,6 @@ namespace UnitTest void CreateEditorRepresentation(AZ::Entity* entity) override; void BrowseForAssets(AzToolsFramework::AssetBrowser::AssetSelectionModel& selection) override { AZ_UNUSED(selection); } int GetIconTextureIdFromEntityIconPath(const AZStd::string& entityIconPath) override { AZ_UNUSED(entityIconPath); return 0; } - bool DisplayHelpersVisible() override { return false; } /* * AssetSystemRequestBus diff --git a/Code/Framework/AzToolsFramework/Tests/SliceUpgradeTests.cpp b/Code/Framework/AzToolsFramework/Tests/SliceUpgradeTests.cpp index d0f97e22f3..7a578a2bf3 100644 --- a/Code/Framework/AzToolsFramework/Tests/SliceUpgradeTests.cpp +++ b/Code/Framework/AzToolsFramework/Tests/SliceUpgradeTests.cpp @@ -16,6 +16,7 @@ AZ_PUSH_DISABLE_WARNING(,"-Wdelete-non-virtual-dtor") #include #include #include +#include #include #include #include diff --git a/Code/Framework/AzToolsFramework/Tests/Slices.cpp b/Code/Framework/AzToolsFramework/Tests/Slices.cpp index 1e849de620..9b546357cd 100644 --- a/Code/Framework/AzToolsFramework/Tests/Slices.cpp +++ b/Code/Framework/AzToolsFramework/Tests/Slices.cpp @@ -1059,7 +1059,9 @@ namespace UnitTest AZ::SettingsRegistryInterface* registry = AZ::SettingsRegistry::Get(); auto projectPathKey = AZ::SettingsRegistryInterface::FixedValueString(AZ::SettingsRegistryMergeUtils::BootstrapSettingsRootKey) + "/project_path"; - registry->Set(projectPathKey, "AutomatedTesting"); + AZ::IO::FixedMaxPath enginePath; + registry->Get(enginePath.Native(), AZ::SettingsRegistryMergeUtils::FilePathKey_EngineRootFolder); + registry->Set(projectPathKey, (enginePath / "AutomatedTesting").Native()); AZ::SettingsRegistryMergeUtils::MergeSettingsToRegistry_AddRuntimeFilePaths(*registry); m_app.Start(AzFramework::Application::Descriptor()); diff --git a/Code/Framework/AzToolsFramework/Tests/SpinBoxTests.cpp b/Code/Framework/AzToolsFramework/Tests/SpinBoxTests.cpp index 2d524cbcf4..f885240fde 100644 --- a/Code/Framework/AzToolsFramework/Tests/SpinBoxTests.cpp +++ b/Code/Framework/AzToolsFramework/Tests/SpinBoxTests.cpp @@ -275,7 +275,7 @@ namespace UnitTest QString testString = "0" + QString(testLocale.decimalPoint()) + "9999999"; QString value = setupTruncationTest(testString); - testString = "0" + QString(testLocale.decimalPoint()) + "999"; + testString = "1" + QString(testLocale.decimalPoint()) + "0"; EXPECT_TRUE(value == testString); } @@ -295,19 +295,19 @@ namespace UnitTest QString testString = "0" + QString(testLocale.decimalPoint()) + "12395"; QString value = setupTruncationTest(testString); - testString = "0" + QString(testLocale.decimalPoint()) + "123"; + testString = "0" + QString(testLocale.decimalPoint()) + "124"; EXPECT_TRUE(value == testString); testString = "0" + QString(testLocale.decimalPoint()) + "94496"; value = setupTruncationTest(testString); - testString = "0" + QString(testLocale.decimalPoint()) + "944"; + testString = "0" + QString(testLocale.decimalPoint()) + "945"; EXPECT_TRUE(value == testString); testString = "0" + QString(testLocale.decimalPoint()) + "0009999"; value = setupTruncationTest(testString); - testString = "0" + QString(testLocale.decimalPoint()) + "0"; + testString = "0" + QString(testLocale.decimalPoint()) + "001"; EXPECT_TRUE(value == testString); } diff --git a/Code/Framework/AzToolsFramework/Tests/TransformComponent.cpp b/Code/Framework/AzToolsFramework/Tests/TransformComponent.cpp index 4fbebc8526..71ce9e3b5f 100644 --- a/Code/Framework/AzToolsFramework/Tests/TransformComponent.cpp +++ b/Code/Framework/AzToolsFramework/Tests/TransformComponent.cpp @@ -18,7 +18,10 @@ #include #include +#include #include +#include +#include #include @@ -43,7 +46,6 @@ namespace UnitTest AllocatorsFixture::SetUp(); ComponentApplication::Descriptor desc; desc.m_useExistingAllocator = true; - desc.m_enableDrilling = false; // we already created a memory driller for the test (AllocatorsFixture) m_app.Start(desc); @@ -1063,4 +1065,67 @@ R"DELIMITER( } } } + + // Fixture provides a root prefab with Transform component and listens for TransformNotificationBus. + class TransformComponentActivationTest + : public PrefabTestFixture + , public TransformNotificationBus::Handler + { + protected: + void SetUpEditorFixtureImpl() override + { + PrefabTestFixture::SetUpEditorFixtureImpl(); + + CreateRootPrefab(); + } + + void TearDownEditorFixtureImpl() override + { + BusDisconnect(); + + PrefabTestFixture::TearDownEditorFixtureImpl(); + } + + void OnTransformChanged(const Transform& /*local*/, const Transform& /*world*/) override + { + m_transformUpdated = true; + } + + void MoveEntity(AZ::EntityId entityId) + { + AzToolsFramework::ScopedUndoBatch undoBatch("Move Entity"); + TransformBus::Event(entityId, &TransformInterface::SetWorldTranslation, Vector3(1.f, 0.f, 0.f)); + } + + bool m_transformUpdated = false; + }; + + TEST_F(TransformComponentActivationTest, TransformChangedEventIsSentWhenEntityIsActivatedViaUndoRedo) + { + AZ::EntityId entityId = CreateEntityUnderRootPrefab("Entity"); + MoveEntity(entityId); + BusConnect(entityId); + + // verify that undoing/redoing move operations fires TransformChanged event + Undo(); + EXPECT_TRUE(m_transformUpdated); + m_transformUpdated = false; + + Redo(); + EXPECT_TRUE(m_transformUpdated); + m_transformUpdated = false; + } + + TEST_F(TransformComponentActivationTest, TransformChangedEventIsNotSentWhenEntityIsDeactivatedAndActivated) + { + AZ::EntityId entityId = CreateEntityUnderRootPrefab("Entity"); + BusConnect(entityId); + + // verify that simply activating/deactivating an entity does not fire TransformChanged event + Entity* entity = nullptr; + ComponentApplicationBus::BroadcastResult(entity, &AZ::ComponentApplicationRequests::FindEntity, entityId); + entity->Deactivate(); + entity->Activate(); + EXPECT_FALSE(m_transformUpdated); + } } // namespace UnitTest diff --git a/Code/Framework/AzToolsFramework/Tests/UI/AssetBrowserTests.cpp b/Code/Framework/AzToolsFramework/Tests/UI/AssetBrowserTests.cpp new file mode 100644 index 0000000000..5173e40c63 --- /dev/null +++ b/Code/Framework/AzToolsFramework/Tests/UI/AssetBrowserTests.cpp @@ -0,0 +1,333 @@ +/* + * Copyright (c) Contributors to the Open 3D Engine Project. + * For complete copyright and license terms please see the LICENSE at the root of this distribution. + * + * SPDX-License-Identifier: Apache-2.0 OR MIT + * + */ + +#include + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +namespace UnitTest +{ + // Test fixture for the AssetBrowser model that uses a QAbstractItemModelTester to validate the state of the model + // when QAbstractItemModel signals fire. Tests will exit with a fatal error if an invalid state is detected. + class AssetBrowserTest + : public ToolsApplicationFixture + , public testing::WithParamInterface + { + protected: + enum class AssetEntryType + { + Root, + Folder, + Source, + Product + }; + + enum class FolderType + { + Root, + File + }; + + void SetUpEditorFixtureImpl() override; + void TearDownEditorFixtureImpl() override; + + //! Creates a Mock Scan Folder + void AddScanFolder(AZ::s64 folderID, AZStd::string folderPath, AZStd::string displayName, FolderType folderType = FolderType::File); + + //! Creates a Source entry from a mock file + AZ::Uuid CreateSourceEntry( + AZ::s64 fileID, AZ::s64 parentFolderID, AZStd::string filename, AssetEntryType sourceType = AssetEntryType::Source); + + //! Creates a product from a given sourceEntry + void CreateProduct(AZ::s64 productID, AZ::Uuid sourceUuid, AZStd::string productName); + + void SetupAssetBrowser(); + void PrintModel(const QAbstractItemModel* model, AZStd::function printer); + QModelIndex GetModelIndex(const QAbstractItemModel* model, int targetDepth, int row = 0); + AZStd::shared_ptr GetRootEntry(); + AZStd::vector GetVectorFromFormattedString(const QString& formattedString); + + protected: + QString m_assetBrowserHierarchy = QString(); + + AZStd::unique_ptr m_searchWidget; + AZStd::unique_ptr m_assetBrowserComponent; + + AZStd::unique_ptr m_filterModel; + AZStd::unique_ptr m_tableModel; + + QVector m_folderIds = { 13, 14, 15 }; + QVector m_sourceIDs = { 1, 2, 3, 4, 5 }; + QVector m_productIDs = { 1, 2, 3, 4, 5 }; + }; + + void AssetBrowserTest::SetUpEditorFixtureImpl() + { + GetApplication()->RegisterComponentDescriptor(AzToolsFramework::EditorEntityContextComponent::CreateDescriptor()); + + m_assetBrowserComponent = AZStd::make_unique(); + m_assetBrowserComponent->Activate(); + + m_filterModel = AZStd::make_unique(); + m_tableModel = AZStd::make_unique(); + + m_filterModel->setSourceModel(m_assetBrowserComponent->GetAssetBrowserModel()); + m_tableModel->setSourceModel(m_filterModel.get()); + + m_searchWidget = AZStd::make_unique(); + + // Setup String filters + m_searchWidget->Setup(true, true); + m_filterModel->SetFilter(m_searchWidget->GetFilter()); + + SetupAssetBrowser(); + } + + void AssetBrowserTest::TearDownEditorFixtureImpl() + { + m_tableModel.reset(); + m_filterModel.reset(); + m_assetBrowserComponent->Deactivate(); + + m_assetBrowserComponent.reset(); + m_searchWidget.reset(); + } + + void AssetBrowserTest::AddScanFolder( + AZ::s64 folderID, AZStd::string folderPath, AZStd::string displayName, FolderType folderType /*= FolderType::File*/) + { + AzToolsFramework::AssetDatabase::ScanFolderDatabaseEntry scanFolder = AzToolsFramework::AssetDatabase::ScanFolderDatabaseEntry(); + scanFolder.m_scanFolderID = folderID; + scanFolder.m_scanFolder = folderPath; + scanFolder.m_displayName = displayName; + scanFolder.m_isRoot = folderType == FolderType::Root; + GetRootEntry()->AddScanFolder(scanFolder); + } + + AZ::Uuid AssetBrowserTest::CreateSourceEntry( + AZ::s64 fileID, AZ::s64 parentFolderID, AZStd::string filename, AssetEntryType sourceType /*= AssetEntryType::Source*/) + { + AzToolsFramework::AssetDatabase::FileDatabaseEntry entry = AzToolsFramework::AssetDatabase::FileDatabaseEntry(); + entry.m_scanFolderPK = parentFolderID; + entry.m_fileID = fileID; + entry.m_fileName = filename; + entry.m_isFolder = sourceType == AssetEntryType::Folder; + GetRootEntry()->AddFile(entry); + + if (!entry.m_isFolder) + { + AzToolsFramework::AssetBrowser::SourceWithFileID entrySource = AzToolsFramework::AssetBrowser::SourceWithFileID(); + entrySource.first = entry.m_fileID; + entrySource.second = AzToolsFramework::AssetDatabase::SourceDatabaseEntry(); + entrySource.second.m_scanFolderPK = parentFolderID; + entrySource.second.m_sourceName = filename; + entrySource.second.m_sourceID = fileID; + entrySource.second.m_sourceGuid = AZ::Uuid::CreateRandom(); + + GetRootEntry()->AddSource(entrySource); + + return entrySource.second.m_sourceGuid; + } + + return AZ::Uuid::CreateNull(); + } + + void AssetBrowserTest::CreateProduct(AZ::s64 productID, AZ::Uuid sourceUuid, AZStd::string productName) + { + AzToolsFramework::AssetBrowser::ProductWithUuid product = AzToolsFramework::AssetBrowser::ProductWithUuid(); + product.first = sourceUuid; + product.second = AzToolsFramework::AssetDatabase::ProductDatabaseEntry(); + product.second.m_productID = productID; + + product.second.m_subID = aznumeric_cast(productID); + product.second.m_productName = productName; + + GetRootEntry()->AddProduct(product); + } + + void AssetBrowserTest::SetupAssetBrowser() + { + // RootEntries : 1 | Folders : 4 | SourceEntries : 5 | ProductEntries : 9 + m_assetBrowserHierarchy = R"( + D: + \ + dev + o3de + GameProject + Assets + Source_1 + Product_1_1 + Product_1_0 + Source_0 + Product_0_3 + Product_0_2 + Product_0_1 + Product_0_0 + Scripts + Source_3 + Source_2 + Product_2_2 + Product_2_1 + Product_2_0 + Misc + Source_4 + Product_4_2 + Product_4_1 + Product_4_0 )"; + + namespace AzAssetBrowser = AzToolsFramework::AssetBrowser; + + AddScanFolder(m_folderIds.at(2), "D:/dev/o3de/GameProject/Misc", "Misc"); + AZ::Uuid sourceUuid_4 = CreateSourceEntry(m_sourceIDs.at(4), m_folderIds.at(2), "Source_4"); + CreateProduct(m_productIDs.at(0), sourceUuid_4, "Product_4_0"); + CreateProduct(m_productIDs.at(1), sourceUuid_4, "Product_4_1"); + CreateProduct(m_productIDs.at(2), sourceUuid_4, "Product_4_2"); + + AddScanFolder(m_folderIds.at(1), "D:/dev/o3de/GameProject/Scripts", "Scripts"); + + AZ::Uuid sourceUuid_2 = CreateSourceEntry(m_sourceIDs.at(2), m_folderIds.at(1), "Source_2"); + CreateProduct(m_productIDs.at(0), sourceUuid_2, "Product_2_0"); + CreateProduct(m_productIDs.at(1), sourceUuid_2, "Product_2_1"); + CreateProduct(m_productIDs.at(2), sourceUuid_2, "Product_2_2"); + + CreateSourceEntry(m_sourceIDs.at(3), m_folderIds.at(1), "Source_3"); + + AddScanFolder(m_folderIds.at(0), "D:/dev/o3de/GameProject/Assets", "Assets"); + + AZ::Uuid sourceUuid_0 = CreateSourceEntry(m_sourceIDs.at(0), m_folderIds.at(0), "Source_0"); + CreateProduct(m_productIDs.at(0), sourceUuid_0, "Product_0_0"); + CreateProduct(m_productIDs.at(1), sourceUuid_0, "Product_0_1"); + CreateProduct(m_productIDs.at(2), sourceUuid_0, "Product_0_2"); + CreateProduct(m_productIDs.at(3), sourceUuid_0, "Product_0_3"); + + AZ::Uuid sourceUuid_1 = CreateSourceEntry(m_sourceIDs.at(1), m_folderIds.at(0), "Source_1"); + CreateProduct(m_productIDs.at(0), sourceUuid_1, "Product_1_0"); + CreateProduct(m_productIDs.at(1), sourceUuid_1, "Product_1_1"); + } + + void AssetBrowserTest::PrintModel(const QAbstractItemModel* model, AZStd::function printer) + { + AZStd::deque> indices; + indices.push_back({ model->index(0, 0), 0 }); + while (!indices.empty()) + { + auto [index, depth] = indices.front(); + indices.pop_front(); + + QString indentString; + for (int i = 0; i < depth; ++i) + { + indentString += " "; + } + const QString message = indentString + index.data(Qt::DisplayRole).toString(); + printer(message); + + for (int i = 0; i < model->rowCount(index); ++i) + { + indices.emplace_front(model->index(i, 0, index), depth + 1); + } + } + } + + QModelIndex AssetBrowserTest::GetModelIndex(const QAbstractItemModel* model, int targetDepth, int row) + { + AZStd::deque> indices; + indices.push_back({ model->index(0, 0), 0 }); + while (!indices.empty()) + { + auto [index, depth] = indices.front(); + indices.pop_front(); + + for (int i = 0; i < model->rowCount(index); ++i) + { + if (depth + 1 == targetDepth && row == i) + { + return model->index(i, 0, index); + } + indices.emplace_front(model->index(i, 0, index), depth + 1); + } + } + return QModelIndex(); + } + + AZStd::shared_ptr AssetBrowserTest::GetRootEntry() + { + return m_assetBrowserComponent->GetAssetBrowserModel()->GetRootEntry(); + } + + AZStd::vector AssetBrowserTest::GetVectorFromFormattedString(const QString& formattedString) + { + AZStd::vector hierarchySections; + QStringList splittedList = formattedString.split('\n', Qt::SkipEmptyParts); + + for (auto& str : splittedList) + { + str.replace(" ", ""); + hierarchySections.push_back(str); + } + return hierarchySections; + } + + TEST_F(AssetBrowserTest, CheckCorrectNumberOfEntriesInTableView) + { + m_filterModel->FilterUpdatedSlotImmediate(); + const int tableViewRowcount = m_tableModel->rowCount(); + + // RowCount should be 17 -> 5 SourceEntries + 12 ProductEntries) + EXPECT_EQ(tableViewRowcount, 17); + } + + TEST_F(AssetBrowserTest, CheckCorrectNumberOfEntriesInTableViewAfterStringFilter) + { + /* + *-Source_1 + * | + * |-product_1_0 + * |-product_1_1 + * + * + * Matching entries = 3 + */ + + // Apply string filter + m_searchWidget->SetTextFilter(QString("source_1")); + m_filterModel->FilterUpdatedSlotImmediate(); + + const int tableViewRowcount = m_tableModel->rowCount(); + EXPECT_EQ(tableViewRowcount, 3); + } + + TEST_F(AssetBrowserTest, CheckScanFolderAddition) + { + EXPECT_EQ(m_assetBrowserComponent->GetAssetBrowserModel()->rowCount(), 1); + const int newFolderId = 20; + AddScanFolder(newFolderId, "E:/TestFolder/TestFolder2", "TestFolder"); + + // Since the folder is empty it shouldn't be added to the model. + EXPECT_EQ(m_assetBrowserComponent->GetAssetBrowserModel()->rowCount(), 1); + + CreateSourceEntry(123, newFolderId, "DummyFile"); + + // When we add a file to the folder it should be added to the model + EXPECT_EQ(m_assetBrowserComponent->GetAssetBrowserModel()->rowCount(), 2); + } + +} // namespace UnitTest diff --git a/Code/Framework/AzToolsFramework/Tests/UI/EntityOutlinerTests.cpp b/Code/Framework/AzToolsFramework/Tests/UI/EntityOutlinerTests.cpp index fa8de64c62..36e2398162 100644 --- a/Code/Framework/AzToolsFramework/Tests/UI/EntityOutlinerTests.cpp +++ b/Code/Framework/AzToolsFramework/Tests/UI/EntityOutlinerTests.cpp @@ -37,16 +37,11 @@ namespace UnitTest m_model->Initialize(); m_modelTester = AZStd::make_unique(m_model.get(), QAbstractItemModelTester::FailureReportingMode::Fatal); - - AzToolsFramework::ToolsApplicationRequestBus::BroadcastResult( - m_undoStack, &AzToolsFramework::ToolsApplicationRequestBus::Events::GetUndoStack); - AZ_Assert(m_undoStack, "Failed to look up undo stack from tools application"); - + // Create a new root prefab - the synthetic "NewLevel.prefab" that comes in by default isn't suitable for outliner tests // because it's created before the EditorEntityModel that our EntityOutlinerListModel subscribes to, and we want to // recreate it as part of the fixture regardless. - auto entityOwnershipService = AZ::Interface::Get(); - entityOwnershipService->CreateNewLevelPrefab("UnitTestRoot.prefab", ""); + CreateRootPrefab(); } void TearDownEditorFixtureImpl() override @@ -82,8 +77,8 @@ namespace UnitTest } auto transform = aznew AzToolsFramework::Components::TransformComponent; - transform->SetParent(parentId); entity->AddComponent(transform); + transform->SetParent(parentId); entity->Activate(); @@ -125,32 +120,17 @@ namespace UnitTest } // Kicks off any updates scheduled for the next tick - void ProcessDeferredUpdates() + void ProcessDeferredUpdates() override { // Force a prefab propagation for updates that are deferred to the next tick. - m_prefabSystemComponent->OnSystemTick(); + PropagateAllTemplateChanges(); // Ensure the model process its entity update queue m_model->ProcessEntityUpdates(); } - - // Performs an undo operation and ensures the tick-scheduled updates happen - void Undo() - { - m_undoStack->Undo(); - ProcessDeferredUpdates(); - } - - // Performs a redo operation and ensures the tick-scheduled updates happen - void Redo() - { - m_undoStack->Redo(); - ProcessDeferredUpdates(); - } - + AZStd::unique_ptr m_model; AZStd::unique_ptr m_modelTester; - AzToolsFramework::UndoSystem::UndoStack* m_undoStack = nullptr; }; TEST_F(EntityOutlinerTest, TestCreateFlatHierarchyUndoAndRedoWorks) diff --git a/Code/Framework/AzToolsFramework/Tests/UI/EntityPropertyEditorTests.cpp b/Code/Framework/AzToolsFramework/Tests/UI/EntityPropertyEditorTests.cpp index c24bab9299..9a96c716fb 100644 --- a/Code/Framework/AzToolsFramework/Tests/UI/EntityPropertyEditorTests.cpp +++ b/Code/Framework/AzToolsFramework/Tests/UI/EntityPropertyEditorTests.cpp @@ -36,11 +36,6 @@ namespace UnitTest : public ComponentApplication { public: - void SetExecutableFolder(const char* path) - { - m_exeDirectory = path; - } - void SetSettingsRegistrySpecializations(SettingsRegistryInterface::Specializations& specializations) override { ComponentApplication::SetSettingsRegistrySpecializations(specializations); @@ -58,7 +53,6 @@ namespace UnitTest ToolsApplication::Descriptor desc; desc.m_useExistingAllocator = true; - desc.m_enableDrilling = false; ToolsApplication::StartupParameters startupParams; startupParams.m_allocator = &AZ::AllocatorInstance::Get(); @@ -249,7 +243,6 @@ namespace UnitTest // These are required by implementing the EditorRequestBus void BrowseForAssets(AssetBrowser::AssetSelectionModel& /*selection*/) override {} int GetIconTextureIdFromEntityIconPath([[maybe_unused]] const AZStd::string& entityIconPath) override { return 0; } - bool DisplayHelpersVisible() override { return false; } public: EntityPropertyEditor* m_levelEditor; diff --git a/Code/Framework/AzToolsFramework/Tests/Viewport/ViewportInteractionTests.cpp b/Code/Framework/AzToolsFramework/Tests/Viewport/ViewportInteractionTests.cpp new file mode 100644 index 0000000000..fdcc8553f2 --- /dev/null +++ b/Code/Framework/AzToolsFramework/Tests/Viewport/ViewportInteractionTests.cpp @@ -0,0 +1,76 @@ +/* + * Copyright (c) Contributors to the Open 3D Engine Project. + * For complete copyright and license terms please see the LICENSE at the root of this distribution. + * + * SPDX-License-Identifier: Apache-2.0 OR MIT + * + */ + +#include +#include +#include +#include +#include +#include +#include +#include + +namespace UnitTest +{ + class IndirectCallViewportInteractionIntersectionFixture : public ToolsApplicationFixture + { + public: + void SetUpEditorFixtureImpl() override + { + auto* app = GetApplication(); + // register a simple component implementing BoundsRequestBus and EditorComponentSelectionRequestsBus + app->RegisterComponentDescriptor(BoundsTestComponent::CreateDescriptor()); + // register a component implementing RenderGeometry::IntersectionRequestBus + app->RegisterComponentDescriptor(RenderGeometryIntersectionTestComponent::CreateDescriptor()); + + AZ::Entity* entityGround = nullptr; + m_entityIdGround = CreateDefaultEditorEntity("EntityGround", &entityGround); + + entityGround->Deactivate(); + auto ground = entityGround->CreateComponent(); + entityGround->Activate(); + + ground->m_localBounds = AZ::Aabb::CreateFromMinMax(AZ::Vector3(-10.0f, -10.0f, -0.5f), AZ::Vector3(10.0f, 10.0f, 0.5f)); + } + + AZ::EntityId m_entityIdGround; + }; + + using IndirectCallManipulatorViewportInteractionIntersectionFixture = + IndirectCallManipulatorViewportInteractionFixtureMixin; + + TEST_F(IndirectCallManipulatorViewportInteractionIntersectionFixture, FindClosestPickIntersectionReturnsExpectedSurfacePoint) + { + // camera - 21.00, 8.00, 11.00, -22.00, 150.00 + m_cameraState.m_viewportSize = AZ::Vector2(1280.0f, 720.0f); + AzFramework::SetCameraTransform( + m_cameraState, + AZ::Transform::CreateFromMatrix3x3AndTranslation( + AZ::Matrix3x3::CreateRotationZ(AZ::DegToRad(150.0f)) * AZ::Matrix3x3::CreateRotationX(AZ::DegToRad(-22.0f)), + AZ::Vector3(21.0f, 8.0f, 11.0f))); + + m_actionDispatcher->CameraState(m_cameraState); + + AzToolsFramework::SetWorldTransform( + m_entityIdGround, + AZ::Transform::CreateFromMatrix3x3AndTranslation( + AZ::Matrix3x3::CreateRotationY(AZ::DegToRad(40.0f)) * AZ::Matrix3x3::CreateRotationZ(AZ::DegToRad(60.0f)), + AZ::Vector3(14.0f, -6.0f, 5.0f))); + + // expected world position (value taken from editor scenario) + const auto expectedWorldPosition = AZ::Vector3(13.606657f, -2.6753534f, 5.9827675f); + const auto screenPosition = AzFramework::WorldToScreen(expectedWorldPosition, m_cameraState); + + // perform ray intersection against mesh + const auto worldIntersectionPoint = AzToolsFramework::FindClosestPickIntersection( + m_viewportManipulatorInteraction->GetViewportInteraction().GetViewportId(), screenPosition, + AzToolsFramework::EditorPickRayLength, AzToolsFramework::GetDefaultEntityPlacementDistance()); + + EXPECT_THAT(worldIntersectionPoint, IsCloseTolerance(expectedWorldPosition, 0.01f)); + } +} // namespace UnitTest diff --git a/Code/Framework/AzToolsFramework/Tests/Viewport/ViewportScreenTests.cpp b/Code/Framework/AzToolsFramework/Tests/Viewport/ViewportScreenTests.cpp index e8fce6653f..58c28f8568 100644 --- a/Code/Framework/AzToolsFramework/Tests/Viewport/ViewportScreenTests.cpp +++ b/Code/Framework/AzToolsFramework/Tests/Viewport/ViewportScreenTests.cpp @@ -17,6 +17,7 @@ #include #include #include +#include namespace UnitTest { @@ -35,6 +36,7 @@ namespace UnitTest const auto worldResult = AzFramework::ScreenToWorld(screenPoint, cameraState); return AzFramework::WorldToScreen(worldResult, cameraState); } + //////////////////////////////////////////////////////////////////////////////////////////////////////// // ScreenPoint tests TEST(ViewportScreen, WorldToScreenAndScreenToWorldReturnsTheSameValueIdentityCameraOffsetFromOrigin) @@ -102,8 +104,8 @@ namespace UnitTest } //////////////////////////////////////////////////////////////////////////////////////////////////////// - // NDC tests - TEST(ViewportScreen, WorldToScreenNDCAndScreenNDCToWorldReturnsTheSameValueIdentityCameraOffsetFromOrigin) + // Ndc tests + TEST(ViewportScreen, WorldToScreenNdcAndScreenNdcToWorldReturnsTheSameValueIdentityCameraOffsetFromOrigin) { using NdcPoint = AZ::Vector2; @@ -136,7 +138,7 @@ namespace UnitTest } } - TEST(ViewportScreen, WorldToScreenNDCAndScreenNDCToWorldReturnsTheSameValueOrientatedCamera) + TEST(ViewportScreen, WorldToScreenNdcAndScreenNdcToWorldReturnsTheSameValueOrientatedCamera) { using NdcPoint = AZ::Vector2; @@ -153,7 +155,7 @@ namespace UnitTest // note: nearClip is 0.1 - the world space value returned will be aligned to the near clip // plane of the camera so use that to confirm the mapping to/from is correct - TEST(ViewportScreen, ScreenNDCToWorldReturnsPositionOnNearClipPlaneInWorldSpace) + TEST(ViewportScreen, ScreenNdcToWorldReturnsPositionOnNearClipPlaneInWorldSpace) { using NdcPoint = AZ::Vector2; diff --git a/Code/Framework/AzToolsFramework/Tests/aztoolsframeworktests_files.cmake b/Code/Framework/AzToolsFramework/Tests/aztoolsframeworktests_files.cmake index e3742041b4..2631a84325 100644 --- a/Code/Framework/AzToolsFramework/Tests/aztoolsframeworktests_files.cmake +++ b/Code/Framework/AzToolsFramework/Tests/aztoolsframeworktests_files.cmake @@ -12,6 +12,7 @@ set(FILES AssetFileInfoListComparison.cpp AssetSeedManager.cpp AssetSystemMocks.h + AzToolsFrameworkTestHelpersTest.cpp BoundsTestComponent.cpp BoundsTestComponent.h ComponentAdapterTests.cpp @@ -28,6 +29,9 @@ set(FILES Entity/EditorEntitySearchComponentTests.cpp Entity/EditorEntitySelectionTests.cpp Entity/EntityUtilityComponentTests.cpp + Entity/ReadOnly/ReadOnlyEntityFixture.cpp + Entity/ReadOnly/ReadOnlyEntityFixture.h + Entity/ReadOnly/ReadOnlyEntityTests.cpp EntityIdQLabelTests.cpp EntityInspectorTests.cpp EntityOwnershipService/EntityOwnershipServiceTestFixture.cpp @@ -45,6 +49,7 @@ set(FILES FocusMode/EditorFocusModeSelectionTests.cpp FocusMode/EditorFocusModeTests.cpp GenericComponentWrapperTest.cpp + Input/QtEventToAzInputMapperTests.cpp InstanceDataHierarchy.cpp IntegerPrimtitiveTestConfig.h LogLines.cpp @@ -66,11 +71,12 @@ set(FILES Prefab/PrefabFocus/PrefabFocusTests.cpp Prefab/MockPrefabFileIOActionValidator.cpp Prefab/MockPrefabFileIOActionValidator.h + Prefab/PrefabDeleteTests.cpp Prefab/PrefabDuplicateTests.cpp Prefab/PrefabEntityAliasTests.cpp Prefab/PrefabInstanceToTemplatePropagatorTests.cpp Prefab/PrefabInstantiateTests.cpp - Prefab/PrefabInstantiateTests.cpp + Prefab/PrefabAssetFixupTests.cpp Prefab/PrefabLoadTemplateTests.cpp Prefab/PrefabTestComponent.cpp Prefab/PrefabTestComponent.h @@ -100,6 +106,8 @@ set(FILES Prefab/SpawnableSortEntitiesTests.cpp Prefab/PrefabScriptingTests.cpp Prefab/ProceduralPrefabAssetTests.cpp + Prefab/ProceduralPrefabSystemComponentTests.cpp + PropertyIntCtrlCommonTests.cpp PropertyIntCtrlCommonTests.h PropertyIntSliderCtrlTests.cpp PropertyIntSpinCtrlTests.cpp @@ -126,6 +134,7 @@ set(FILES UI/EntityIdQLineEditTests.cpp UI/EntityOutlinerTests.cpp UI/EntityPropertyEditorTests.cpp + UI/AssetBrowserTests.cpp UndoStack.cpp Viewport/ClusterTests.cpp Viewport/ViewportEditorModeTests.cpp @@ -134,5 +143,6 @@ set(FILES Viewport/ViewportUiDisplayTests.cpp Viewport/ViewportUiManagerTests.cpp Viewport/ViewportUiWidgetManagerTests.cpp + Viewport/ViewportInteractionTests.cpp Visibility/EditorVisibilityTests.cpp ) diff --git a/Code/Framework/GridMate/GridMate/Carrier/Carrier.cpp b/Code/Framework/GridMate/GridMate/Carrier/Carrier.cpp index 2922cc2891..0fcb2e6ba3 100644 --- a/Code/Framework/GridMate/GridMate/Carrier/Carrier.cpp +++ b/Code/Framework/GridMate/GridMate/Carrier/Carrier.cpp @@ -3820,10 +3820,8 @@ CarrierImpl::DisconnectRequest(ConnectionID id, CarrierDisconnectReason reason) case Carrier::CST_CONNECTED: { conn->m_state = Carrier::CST_DISCONNECTING; - EBUS_EVENT(Debug::CarrierDrillerBus, OnConnectionStateChanged, this, conn, conn->m_state); m_handshake->OnDisconnect(conn); EBUS_EVENT_ID(m_gridMate, CarrierEventBus, OnDisconnect, this, id, reason); - EBUS_EVENT(Debug::CarrierDrillerBus, OnDisconnect, this, id, reason); ThreadMessage* ctm = aznew ThreadMessage(CTM_DISCONNECT); ctm->m_connection = conn; @@ -3836,10 +3834,8 @@ CarrierImpl::DisconnectRequest(ConnectionID id, CarrierDisconnectReason reason) case Carrier::CST_CONNECTING: { conn->m_state = Carrier::CST_DISCONNECTING; - EBUS_EVENT(Debug::CarrierDrillerBus, OnConnectionStateChanged, this, id, conn->m_state); m_handshake->OnDisconnect(conn); EBUS_EVENT_ID(m_gridMate, CarrierEventBus, OnFailedToConnect, this, id, reason); - EBUS_EVENT(Debug::CarrierDrillerBus, OnFailedToConnect, this, id, reason); ThreadMessage* ctm = aznew ThreadMessage(CTM_DISCONNECT); ctm->m_connection = conn; @@ -3873,13 +3869,11 @@ CarrierImpl::DeleteConnection(Connection* conn, CarrierDisconnectReason reason) { m_handshake->OnDisconnect(conn); EBUS_EVENT_ID(m_gridMate, CarrierEventBus, OnDisconnect, this, conn, reason); - EBUS_EVENT(Debug::CarrierDrillerBus, OnDisconnect, this, conn, reason); } break; case Carrier::CST_CONNECTING: { m_handshake->OnDisconnect(conn); EBUS_EVENT_ID(m_gridMate, CarrierEventBus, OnFailedToConnect, this, conn, reason); - EBUS_EVENT(Debug::CarrierDrillerBus, OnFailedToConnect, this, conn, reason); } break; case Carrier::CST_DISCONNECTED: case Carrier::CST_DISCONNECTING: @@ -4271,7 +4265,6 @@ CarrierImpl::ProcessMainThreadMessages() m_connections.insert(conn); EBUS_EVENT_ID(m_gridMate, CarrierEventBus, OnIncomingConnection, this, conn); - EBUS_EVENT(Debug::CarrierDrillerBus, OnIncomingConnection, this, conn); ThreadMessage* ctm = aznew ThreadMessage(CTM_CONNECT); ctm->m_connection = conn; @@ -4306,7 +4299,6 @@ CarrierImpl::ProcessMainThreadMessages() ctm->m_threadConnection = threadConn; ctm->m_disconnectReason = msg->m_disconnectReason; m_thread->PushCarrierThreadMessage(ctm); - EBUS_EVENT(Debug::CarrierDrillerBus, OnConnectionStateChanged, this, msg->m_connection, msg->m_connection->m_state); } } break; case MTM_DELETE_CONNECTION: @@ -4333,7 +4325,6 @@ CarrierImpl::ProcessMainThreadMessages() if (msg->m_errorCode == CarrierErrorCode::EC_DRIVER) { EBUS_EVENT_ID(m_gridMate, CarrierEventBus, OnDriverError, this, msg->m_connection, msg->m_error.m_driverError); - EBUS_EVENT(Debug::CarrierDrillerBus, OnDriverError, this, msg->m_connection, msg->m_error.m_driverError); if (msg->m_connection) { @@ -4344,7 +4335,6 @@ CarrierImpl::ProcessMainThreadMessages() else { EBUS_EVENT_ID(m_gridMate, CarrierEventBus, OnSecurityError, this, msg->m_connection, msg->m_error.m_securityError); - EBUS_EVENT(Debug::CarrierDrillerBus, OnSecurityError, this, msg->m_connection, msg->m_error.m_securityError); } } break; case MTM_RATE_UPDATE: @@ -4443,13 +4433,11 @@ CarrierImpl::ProcessSystemMessages() if (requestError == HandshakeErrorCode::OK) { conn->m_state = Carrier::CST_CONNECTED; - EBUS_EVENT(Debug::CarrierDrillerBus, OnConnectionStateChanged, this, conn, conn->m_state); SendSyncTime(); // send time first if we have the clock. SendSystemMessage(SM_CONNECT_ACK, wb, conn, SEND_RELIABLE); EBUS_EVENT_ID(m_gridMate, CarrierEventBus, OnConnectionEstablished, this, conn); - EBUS_EVENT(Debug::CarrierDrillerBus, OnConnectionEstablished, this, conn); ThreadMessage* ctm = aznew ThreadMessage(CTM_HANDSHAKE_COMPLETE); ctm->m_connection = conn; @@ -4494,9 +4482,7 @@ CarrierImpl::ProcessSystemMessages() m_pendingHandshakes.erase(PendingHandshake(conn)); // Connected -> no need to retry handshake anymore conn->m_state = Carrier::CST_CONNECTED; - EBUS_EVENT(Debug::CarrierDrillerBus, OnConnectionStateChanged, this, conn, conn->m_state); EBUS_EVENT_ID(m_gridMate, CarrierEventBus, OnConnectionEstablished, this, conn); - EBUS_EVENT(Debug::CarrierDrillerBus, OnConnectionEstablished, this, conn); ThreadMessage* ctm = aznew ThreadMessage(CTM_HANDSHAKE_COMPLETE); ctm->m_connection = conn; @@ -4540,7 +4526,6 @@ CarrierImpl::ProcessSystemMessages() ctm->m_threadConnection = threadConn; ctm->m_disconnectReason = reason; m_thread->PushCarrierThreadMessage(ctm); - EBUS_EVENT(Debug::CarrierDrillerBus, OnConnectionStateChanged, this, conn, conn->m_state); ////////////////////////////////////////////////////////////////////////// } break; case SM_CLOCK_SYNC: @@ -4850,7 +4835,6 @@ CarrierImpl::DebugDeleteConnection(ConnectionID id) ctm->m_threadConnection = threadConn; ctm->m_disconnectReason = reason; m_thread->PushCarrierThreadMessage(ctm); - EBUS_EVENT(Debug::CarrierDrillerBus, OnConnectionStateChanged, this, conn, conn->m_state); ////////////////////////////////////////////////////////////////////////// } diff --git a/Code/Framework/GridMate/GridMate/Carrier/Carrier.h b/Code/Framework/GridMate/GridMate/Carrier/Carrier.h index 94c31ed6d2..9255bb4016 100644 --- a/Code/Framework/GridMate/GridMate/Carrier/Carrier.h +++ b/Code/Framework/GridMate/GridMate/Carrier/Carrier.h @@ -14,8 +14,6 @@ #include #include -#include -#include #include "AzCore/std/smart_ptr/weak_ptr.h" namespace GridMate @@ -485,60 +483,6 @@ namespace GridMate }; typedef AZ::EBus CarrierEventBus; - - namespace Debug - { - class CarrierDrillerEvents - : public CarrierEventsBase - , public AZ::Debug::DrillerEBusTraits - { - public: - virtual void OnIncomingConnection(Carrier* carrier, ConnectionID id) = 0; - - virtual void OnFailedToConnect(Carrier* carrier, ConnectionID id, CarrierDisconnectReason reason) = 0; - - virtual void OnConnectionEstablished(Carrier* carrier, ConnectionID id) = 0; - - virtual void OnDisconnect(Carrier* carrier, ConnectionID id, CarrierDisconnectReason reason) = 0; - - /// Report all carrier and driver errors! id == InvalidConnectionID if the error is not connection related! - virtual void OnDriverError(Carrier* carrier, ConnectionID id, const DriverError& error) = 0; - virtual void OnSecurityError(Carrier* carrier, ConnectionID id, const SecurityError& error) = 0; - - ////////////////////////////////////////////////////////////////////////// - // Executed from NETWORK thread - - // Driver - /// SendTo - /// ReceiveFrom - /// Errors - - // Traffic control - - /// Called every second when you update last second statistics - virtual void OnUpdateStatistics(const AZStd::string& address, const TrafficControl::Statistics& lastSecond, const TrafficControl::Statistics& lifeTime, const TrafficControl::Statistics& effectiveLastSecond, const TrafficControl::Statistics& effectiveLifeTime) = 0; - - // Simulator - /// Enable/Disable - /// Change Simulator parameters - - // Carrier - virtual void OnConnectionStateChanged(Carrier* carrier, ConnectionID id, Carrier::ConnectionStates newState) = 0; - - ////////////////////////////////////////////////////////////////////////// - - ////////////////////////////////////////////////////////////////////////// - // Executed from GAME/MAIN thread - - // Handshake low level (we drill the handshake on session level too) - - // Carrier - in addition to carrier events - - ////////////////////////////////////////////////////////////////////////// - }; - - typedef AZ::EBus CarrierDrillerBus; - } } #endif // GM_CARRIER_H diff --git a/Code/Framework/GridMate/GridMate/Carrier/DefaultTrafficControl.cpp b/Code/Framework/GridMate/GridMate/Carrier/DefaultTrafficControl.cpp index 8743e50e83..107dfe839b 100644 --- a/Code/Framework/GridMate/GridMate/Carrier/DefaultTrafficControl.cpp +++ b/Code/Framework/GridMate/GridMate/Carrier/DefaultTrafficControl.cpp @@ -591,9 +591,6 @@ DefaultTrafficControl::Update() //AZ_TracePrintf("GridMate","Traffic control: Connection %s LifeTime(rtt %.2f packetLoss %.2f) LastSecond(rtt %.2f packetLoss %.2f)\n", // cd.m_address.c_str(),cd.m_sdLifetime.m_rtt,cd.m_sdLifetime.m_packetLoss,cd.m_sdLastSecond.m_rtt,cd.m_sdLastSecond.m_packetLoss); - // send new statistics event - EBUS_EVENT(Debug::CarrierDrillerBus, OnUpdateStatistics, cd.m_address, cd.m_sdLastSecond, cd.m_sdLifetime, cd.m_sdEffectiveLastSecond, cd.m_sdEffectiveLifetime); - cd.m_sdCurrentSecond.Reset(); cd.m_sdCurrentSecond.m_rtt = cd.m_sdLastSecond.m_rtt; //cd.sdCurrentSecond.flow = 1.0f; // Good diff --git a/Code/Framework/GridMate/GridMate/Drillers/CarrierDriller.cpp b/Code/Framework/GridMate/GridMate/Drillers/CarrierDriller.cpp deleted file mode 100644 index 38f029f0f5..0000000000 --- a/Code/Framework/GridMate/GridMate/Drillers/CarrierDriller.cpp +++ /dev/null @@ -1,224 +0,0 @@ -/* - * Copyright (c) Contributors to the Open 3D Engine Project. - * For complete copyright and license terms please see the LICENSE at the root of this distribution. - * - * SPDX-License-Identifier: Apache-2.0 OR MIT - * - */ - -#include -#include - -using namespace AZ::Debug; - -namespace GridMate -{ - namespace Debug - { - //========================================================================= - // CarrierDriller - // [4/14/2011] - //========================================================================= - CarrierDriller::CarrierDriller() - { - m_drillerTag = AZ_CRC("CarrierDriller", 0x72a37d06); - } - - //========================================================================= - // Start - // [4/14/2011] - //========================================================================= - void CarrierDriller::Start(const Param* params, int numParams) - { - (void)params; - (void)numParams; - CarrierDrillerBus::Handler::BusConnect(); - - /* get carriers and output all the data - m_output->BeginTag(m_drillerTag); - m_output->Write(AZ_CRC("CarrierId"),carrier); - m_output->BeginTag(AZ_CRC("StartDrill")); - for(unsigned int iConn = 0; iConn < carrier->GetNumConnections(); ++iConn ) - { - ConnectionID connId = carrier->GetConnectionId(iConn); - m_output->BeginTag(AZ_CRC("Connection")); - m_output->Write(AZ_CRC("Id"),connId); - m_output->Write(AZ_CRC("Address"),carrier->ConnectionToAddress(connId)); - m_output->Write(AZ_CRC("State"),static_cast(carrier->GetConnectionState(connId))); - m_output->EndTag(AZ_CRC("Connection")); - } - m_output->EndTag(AZ_CRC("StartDrill")); - m_output->EndTag(m_drillerTag);*/ - } - - //========================================================================= - // Stop - // [4/14/2011] - //========================================================================= - void CarrierDriller::Stop() - { - CarrierDrillerBus::Handler::BusDisconnect(); - } - - //========================================================================= - // OnUpdateStatistics - // [4/14/2011] - //========================================================================= - void CarrierDriller::OnUpdateStatistics(const AZStd::string& address, const TrafficControl::Statistics& lastSecond, const TrafficControl::Statistics& lifeTime, const TrafficControl::Statistics& effectiveLastSecond, const TrafficControl::Statistics& effectiveLifeTime) - { - m_output->BeginTag(m_drillerTag); - m_output->BeginTag(AZ_CRC("Statistics", 0xe2d38b22)); - m_output->Write(AZ_CRC("Address", 0x0d4e6f81), address); - m_output->BeginTag(AZ_CRC("LastSecond", 0x5e6ccbee)); - m_output->Write(AZ_CRC("DataSend", 0xae94c282), lastSecond.m_dataSend); - m_output->Write(AZ_CRC("DataReceived", 0xd92f8e4b), lastSecond.m_dataReceived); - m_output->Write(AZ_CRC("DataResend", 0xe44a3086), lastSecond.m_dataResend); - m_output->Write(AZ_CRC("DataAcked", 0xbb5e5496), lastSecond.m_dataAcked); - m_output->Write(AZ_CRC("PacketSend", 0x5b52fa79), lastSecond.m_packetSend); - m_output->Write(AZ_CRC("PacketReceived", 0xf247dd9e), lastSecond.m_packetReceived); - m_output->Write(AZ_CRC("PacketLost", 0xbc64441e), lastSecond.m_packetLost); - m_output->Write(AZ_CRC("PacketAcked", 0x91c4b93a), lastSecond.m_packetAcked); - m_output->Write(AZ_CRC("PacketLoss", 0x2200d1bd), lastSecond.m_packetLoss); - m_output->Write(AZ_CRC("rtt", 0xb40f6cfb), lastSecond.m_rtt); - //m_output->Write(AZ_CRC("flow"),lastSecond.m_flow); - m_output->EndTag(AZ_CRC("LastSecond", 0x5e6ccbee)); - m_output->BeginTag(AZ_CRC("LifeTime", 0x3de73088)); - m_output->Write(AZ_CRC("DataSend", 0xae94c282), lifeTime.m_dataSend); - m_output->Write(AZ_CRC("DataReceived", 0xd92f8e4b), lifeTime.m_dataReceived); - m_output->Write(AZ_CRC("DataResend", 0xe44a3086), lifeTime.m_dataResend); - m_output->Write(AZ_CRC("DataAcked", 0xbb5e5496), lifeTime.m_dataAcked); - m_output->Write(AZ_CRC("PacketSend", 0x5b52fa79), lifeTime.m_packetSend); - m_output->Write(AZ_CRC("PacketReceived", 0xf247dd9e), lifeTime.m_packetReceived); - m_output->Write(AZ_CRC("PacketLost", 0xbc64441e), lifeTime.m_packetLost); - m_output->Write(AZ_CRC("PacketAcked", 0x91c4b93a), lifeTime.m_packetAcked); - m_output->Write(AZ_CRC("PacketLoss", 0x2200d1bd), lifeTime.m_packetLoss); - m_output->Write(AZ_CRC("rtt", 0xb40f6cfb), lifeTime.m_rtt); - //m_output->Write(AZ_CRC("flow"),lifeTime.m_flow); - m_output->EndTag(AZ_CRC("LifeTime", 0x3de73088)); - m_output->BeginTag(AZ_CRC("EffectiveLastSecond", 0x8f84642f)); - m_output->Write(AZ_CRC("DataSend", 0xae94c282), effectiveLastSecond.m_dataSend); - m_output->Write(AZ_CRC("DataReceived", 0xd92f8e4b), effectiveLastSecond.m_dataReceived); - m_output->Write(AZ_CRC("DataResend", 0xe44a3086), effectiveLastSecond.m_dataResend); - m_output->Write(AZ_CRC("DataAcked", 0xbb5e5496), effectiveLastSecond.m_dataAcked); - m_output->Write(AZ_CRC("PacketSend", 0x5b52fa79), effectiveLastSecond.m_packetSend); - m_output->Write(AZ_CRC("PacketReceived", 0xf247dd9e), effectiveLastSecond.m_packetReceived); - m_output->Write(AZ_CRC("PacketLost", 0xbc64441e), effectiveLastSecond.m_packetLost); - m_output->Write(AZ_CRC("PacketAcked", 0x91c4b93a), effectiveLastSecond.m_packetAcked); - m_output->Write(AZ_CRC("PacketLoss", 0x2200d1bd), effectiveLastSecond.m_packetLoss); - m_output->Write(AZ_CRC("rtt", 0xb40f6cfb), effectiveLastSecond.m_rtt); - //m_output->Write(AZ_CRC("flow"),effectiveLastSecond.m_flow); - m_output->EndTag(AZ_CRC("EffectiveLastSecond", 0x8f84642f)); - m_output->BeginTag(AZ_CRC("EffectiveLifeTime", 0x4644a47a)); - m_output->Write(AZ_CRC("DataSend", 0xae94c282), effectiveLifeTime.m_dataSend); - m_output->Write(AZ_CRC("DataReceived", 0xd92f8e4b), effectiveLifeTime.m_dataReceived); - m_output->Write(AZ_CRC("DataResend", 0xe44a3086), effectiveLifeTime.m_dataResend); - m_output->Write(AZ_CRC("DataAcked", 0xbb5e5496), effectiveLifeTime.m_dataAcked); - m_output->Write(AZ_CRC("PacketSend", 0x5b52fa79), effectiveLifeTime.m_packetSend); - m_output->Write(AZ_CRC("PacketReceived", 0xf247dd9e), effectiveLifeTime.m_packetReceived); - m_output->Write(AZ_CRC("PacketLost", 0xbc64441e), effectiveLifeTime.m_packetLost); - m_output->Write(AZ_CRC("PacketAcked", 0x91c4b93a), effectiveLifeTime.m_packetAcked); - m_output->Write(AZ_CRC("PacketLoss", 0x2200d1bd), effectiveLifeTime.m_packetLoss); - m_output->Write(AZ_CRC("rtt", 0xb40f6cfb), effectiveLifeTime.m_rtt); - //m_output->Write(AZ_CRC("flow"),effectiveLifeTime.m_flow); - m_output->EndTag(AZ_CRC("EffectiveLifeTime", 0x4644a47a)); - m_output->EndTag(AZ_CRC("Statistics", 0xe2d38b22)); - m_output->EndTag(m_drillerTag); - } - //========================================================================= - // OnConnectionStateChanged - // [4/14/2011] - //========================================================================= - void CarrierDriller::OnConnectionStateChanged(Carrier* carrier, ConnectionID id, Carrier::ConnectionStates newState) - { - m_output->BeginTag(m_drillerTag); - m_output->Write(AZ_CRC("CarrierId", 0x93f4bfbe), carrier); - m_output->BeginTag(AZ_CRC("ConnectionState", 0x38a6a5da)); - m_output->Write(AZ_CRC("Id", 0xbf396750), id); - m_output->Write(AZ_CRC("State", 0xa393d2fb), static_cast(newState)); - m_output->EndTag(AZ_CRC("ConnectionState", 0x38a6a5da)); - m_output->EndTag(m_drillerTag); - } - //========================================================================= - // OnIncomingConnection - // [4/14/2011] - //========================================================================= - void CarrierDriller::OnIncomingConnection(Carrier* carrier, ConnectionID id) - { - m_output->BeginTag(m_drillerTag); - m_output->Write(AZ_CRC("CarrierId", 0x93f4bfbe), carrier); - m_output->BeginTag(AZ_CRC("IncomingConnection", 0x8c9d071a)); - m_output->Write(AZ_CRC("Id", 0xbf396750), id); - m_output->Write(AZ_CRC("Address", 0x0d4e6f81), carrier->ConnectionToAddress(id)); - m_output->EndTag(AZ_CRC("IncomingConnection", 0x8c9d071a)); - m_output->EndTag(m_drillerTag); - } - //========================================================================= - // OnFailedToConnect - // [4/14/2011] - //========================================================================= - void CarrierDriller::OnFailedToConnect(Carrier* carrier, ConnectionID id, CarrierDisconnectReason reason) - { - m_output->BeginTag(m_drillerTag); - m_output->Write(AZ_CRC("CarrierId", 0x93f4bfbe), carrier); - m_output->BeginTag(AZ_CRC("FailedToConnect", 0xb6539549)); - m_output->Write(AZ_CRC("Id", 0xbf396750), id); - m_output->Write(AZ_CRC("Reason", 0x3bb8880c), ReasonToString(reason)); - m_output->EndTag(AZ_CRC("FailedToConnect", 0xb6539549)); - m_output->EndTag(m_drillerTag); - } - //========================================================================= - // OnConnectionEstablished - // [4/14/2011] - //========================================================================= - void CarrierDriller::OnConnectionEstablished(Carrier* carrier, ConnectionID id) - { - m_output->BeginTag(m_drillerTag); - m_output->Write(AZ_CRC("CarrierId", 0x93f4bfbe), carrier); - m_output->BeginTag(AZ_CRC("ConnectionEstablished", 0xcde31aa7)); - m_output->Write(AZ_CRC("Id", 0xbf396750), id); - m_output->EndTag(AZ_CRC("ConnectionEstablished", 0xcde31aa7)); - m_output->EndTag(m_drillerTag); - } - //========================================================================= - // OnDisconnect - // [4/14/2011] - //========================================================================= - void CarrierDriller::OnDisconnect(Carrier* carrier, ConnectionID id, CarrierDisconnectReason reason) - { - m_output->BeginTag(m_drillerTag); - m_output->Write(AZ_CRC("CarrierId", 0x93f4bfbe), carrier); - m_output->BeginTag(AZ_CRC("Disconnect", 0x003a4b91)); - m_output->Write(AZ_CRC("Id", 0xbf396750), id); - m_output->Write(AZ_CRC("Reason", 0x3bb8880c), ReasonToString(reason)); - m_output->EndTag(AZ_CRC("Disconnect", 0x003a4b91)); - m_output->EndTag(m_drillerTag); - } - //========================================================================= - // OnDriverError - // [12/14/2016] - //========================================================================= - void CarrierDriller::OnDriverError(Carrier* carrier, ConnectionID id, const DriverError& error) - { - m_output->BeginTag(m_drillerTag); - m_output->Write(AZ_CRC("CarrierId", 0x93f4bfbe), carrier); - m_output->BeginTag(AZ_CRC("DriverError", 0xe7522aff)); - m_output->Write(AZ_CRC("Id", 0xbf396750), id); - m_output->Write(AZ_CRC("ErrorCode", 0x499e660e), static_cast(error.m_errorCode)); - m_output->EndTag(AZ_CRC("DriverError", 0xe7522aff)); - m_output->EndTag(m_drillerTag); - } - //========================================================================= - // OnSecurityError - //========================================================================= - void CarrierDriller::OnSecurityError(Carrier* carrier, ConnectionID id, const SecurityError& error) - { - m_output->BeginTag(m_drillerTag); - m_output->Write(AZ_CRC("CarrierId", 0x93f4bfbe), carrier); - m_output->BeginTag(AZ_CRC("SecurityError", 0xdfe940ab)); - m_output->Write(AZ_CRC("Id", 0xbf396750), id); - m_output->Write(AZ_CRC("ErrorCode", 0x499e660e), static_cast(error.m_errorCode)); - m_output->EndTag(AZ_CRC("SecurityError", 0xdfe940ab)); - m_output->EndTag(m_drillerTag); - } - } // namespace Debug -} // namespace GridMate diff --git a/Code/Framework/GridMate/GridMate/Drillers/CarrierDriller.h b/Code/Framework/GridMate/GridMate/Drillers/CarrierDriller.h deleted file mode 100644 index b12441e6fa..0000000000 --- a/Code/Framework/GridMate/GridMate/Drillers/CarrierDriller.h +++ /dev/null @@ -1,62 +0,0 @@ -/* - * Copyright (c) Contributors to the Open 3D Engine Project. - * For complete copyright and license terms please see the LICENSE at the root of this distribution. - * - * SPDX-License-Identifier: Apache-2.0 OR MIT - * - */ -#ifndef GM_CARRIER_DRILLER_H -#define GM_CARRIER_DRILLER_H - -#include -#include -#include - -namespace GridMate -{ - namespace Debug - { - /** - * Carrier driller - * \note Be careful which buses you attach. The drillers work in Multi threaded environment and expect that - * a driller mutex (DrillerManager::DrillerManager) will be automatically locked on every write. - * Otherwise in output stream corruption will happen (even is the stream is thread safe). - */ - class CarrierDriller - : public AZ::Debug::Driller - , public CarrierDrillerBus::Handler - { - int m_drillerTag; - public: - AZ_CLASS_ALLOCATOR(CarrierDriller, AZ::OSAllocator, 0); - CarrierDriller(); - - ////////////////////////////////////////////////////////////////////////// - // Driller - const char* GroupName() const override { return "GridMate"; } - const char* GetName() const override { return "CarrierDriller"; } - const char* GetDescription() const override { return "Drills Carrier/transport layer,traffic control, driver,etc."; } - void Start(const Param* params = nullptr, int numParams = 0) override; - void Stop() override; - ////////////////////////////////////////////////////////////////////////// - - ////////////////////////////////////////////////////////////////////////// - // Carrier Driller Bus - void OnUpdateStatistics(const AZStd::string& address, const TrafficControl::Statistics& lastSecond, const TrafficControl::Statistics& lifeTime, const TrafficControl::Statistics& effectiveLastSecond, const TrafficControl::Statistics& effectiveLifeTime) override; - void OnConnectionStateChanged(Carrier* carrier, ConnectionID id, Carrier::ConnectionStates newState) override; - ////////////////////////////////////////////////////////////////////////// - - ////////////////////////////////////////////////////////////////////////// - // Carrier Event Bus - void OnIncomingConnection(Carrier* carrier, ConnectionID id) override; - void OnFailedToConnect(Carrier* carrier, ConnectionID id, CarrierDisconnectReason reason) override; - void OnConnectionEstablished(Carrier* carrier, ConnectionID id) override; - void OnDisconnect(Carrier* carrier, ConnectionID id, CarrierDisconnectReason reason) override; - void OnDriverError(Carrier* carrier, ConnectionID id, const DriverError& error) override; - void OnSecurityError(Carrier* carrier, ConnectionID id, const SecurityError& error) override; - ////////////////////////////////////////////////////////////////////////// - }; - } -} - -#endif // GM_CARRIER_DRILLER_H diff --git a/Code/Framework/GridMate/GridMate/Drillers/ReplicaDriller.cpp b/Code/Framework/GridMate/GridMate/Drillers/ReplicaDriller.cpp deleted file mode 100644 index cb48578255..0000000000 --- a/Code/Framework/GridMate/GridMate/Drillers/ReplicaDriller.cpp +++ /dev/null @@ -1,140 +0,0 @@ -/* - * Copyright (c) Contributors to the Open 3D Engine Project. - * For complete copyright and license terms please see the LICENSE at the root of this distribution. - * - * SPDX-License-Identifier: Apache-2.0 OR MIT - * - */ -#include -#include -#include -#include - -using namespace AZ::Debug; - -namespace GridMate -{ - namespace Debug - { - const AZ::Crc32 ReplicaDriller::Tags::REPLICA_DRILLER = AZ_CRC("ReplicaDriller", 0xd832f49a); - - // Event Types - const AZ::Crc32 ReplicaDriller::Tags::CHUNK_SEND_DATASET = AZ_CRC("ChunkSendDataSet", 0x085ea99b); - const AZ::Crc32 ReplicaDriller::Tags::CHUNK_RECEIVE_DATASET = AZ_CRC("ChunkReceiveDataSet", 0x8d4536db); - const AZ::Crc32 ReplicaDriller::Tags::CHUNK_SEND_RPC = AZ_CRC("ChunkSendRPC", 0x7c40afe0); - const AZ::Crc32 ReplicaDriller::Tags::CHUNK_RECEIVE_RPC = AZ_CRC("ChunkReceiveRPC", 0xb49b302d); - - // Data Fields - const AZ::Crc32 ReplicaDriller::Tags::REPLICA_NAME = AZ_CRC("ReplicaName", 0xc69b68ee); - const AZ::Crc32 ReplicaDriller::Tags::REPLICA_ID = AZ_CRC("ReplicaID", 0x394dd741); - const AZ::Crc32 ReplicaDriller::Tags::CHUNK_TYPE = AZ_CRC("TypeName", 0x115f811d); - const AZ::Crc32 ReplicaDriller::Tags::CHUNK_INDEX = AZ_CRC("ChunkIndex", 0x25ba3370); - const AZ::Crc32 ReplicaDriller::Tags::DATA_SET_NAME = AZ_CRC("DataSetName", 0xf22dbaae); - const AZ::Crc32 ReplicaDriller::Tags::DATA_SET_INDEX = AZ_CRC("DataSetIndex", 0x58d2421f); - const AZ::Crc32 ReplicaDriller::Tags::RPC_NAME = AZ_CRC("RPCName", 0x4c4cbf3a); - const AZ::Crc32 ReplicaDriller::Tags::RPC_INDEX = AZ_CRC("RPCIndex", 0xaf0e7447); - const AZ::Crc32 ReplicaDriller::Tags::SIZE = AZ_CRC("Size", 0xf7c0246a); - const AZ::Crc32 ReplicaDriller::Tags::TIME_PROCESSED_MILLISEC = AZ_CRC("Time", 0x6f949845); - - ReplicaDriller::ReplicaDriller() - { - } - - void ReplicaDriller::Start(const Param* params, int numParams) - { - (void)params; - (void)numParams; - ReplicaDrillerBus::Handler::BusConnect(); - } - - void ReplicaDriller::Stop() - { - ReplicaDrillerBus::Handler::BusDisconnect(); - } - - void ReplicaDriller::OnSendDataSet(ReplicaChunkBase* chunk, AZ::u32 chunkIndex, DataSetBase* dataSet, PeerId from, PeerId to, const void* data, size_t len) - { - (void)from; - (void)to; - (void)data; - - const char* dataSetName = chunk->GetDescriptor()->GetDataSetName(chunk, dataSet); - size_t dataSetIndex = chunk->GetDescriptor()->GetDataSetIndex(chunk, dataSet); - - m_output->BeginTag(Tags::REPLICA_DRILLER); - m_output->BeginTag(Tags::CHUNK_SEND_DATASET); - OutputBaseReplicaChunkTags(chunk, chunkIndex, len); - m_output->Write(Tags::DATA_SET_NAME, dataSetName); - m_output->Write(Tags::DATA_SET_INDEX, dataSetIndex); - m_output->EndTag(Tags::CHUNK_SEND_DATASET); - m_output->EndTag(Tags::REPLICA_DRILLER); - } - - void ReplicaDriller::OnReceiveDataSet(ReplicaChunkBase* chunk, AZ::u32 chunkIndex, DataSetBase* dataSet, PeerId from, PeerId to, const void* data, size_t len) - { - (void)from; - (void)to; - (void)data; - - const char* dataSetName = chunk->GetDescriptor()->GetDataSetName(chunk, dataSet); - size_t dataSetIndex = chunk->GetDescriptor()->GetDataSetIndex(chunk, dataSet); - - m_output->BeginTag(Tags::REPLICA_DRILLER); - m_output->BeginTag(Tags::CHUNK_RECEIVE_DATASET); - OutputBaseReplicaChunkTags(chunk, chunkIndex, len); - m_output->Write(Tags::DATA_SET_NAME, dataSetName); - m_output->Write(Tags::DATA_SET_INDEX, dataSetIndex); - m_output->EndTag(Tags::CHUNK_RECEIVE_DATASET); - m_output->EndTag(Tags::REPLICA_DRILLER); - } - - void ReplicaDriller::OnSendRpc(ReplicaChunkBase* chunk, AZ::u32 chunkIndex, Internal::RpcRequest* rpc, PeerId from, PeerId to, const void* data, size_t len) - { - (void)from; - (void)to; - (void)data; - - const char* rpcName = chunk->GetDescriptor()->GetRpcName(chunk, rpc->m_rpc); - size_t rpcIndex = chunk->GetDescriptor()->GetRpcIndex(chunk, rpc->m_rpc); - - - m_output->BeginTag(Tags::REPLICA_DRILLER); - m_output->BeginTag(Tags::CHUNK_SEND_RPC); - OutputBaseReplicaChunkTags(chunk, chunkIndex, len); - m_output->Write(Tags::RPC_NAME, rpcName); - m_output->Write(Tags::RPC_INDEX, rpcIndex); - m_output->EndTag(Tags::CHUNK_SEND_RPC); - m_output->EndTag(Tags::REPLICA_DRILLER); - } - void ReplicaDriller::OnReceiveRpc(ReplicaChunkBase* chunk, AZ::u32 chunkIndex, Internal::RpcRequest* rpc, PeerId from, PeerId to, const void* data, size_t len) - { - (void)from; - (void)to; - (void)data; - - const char* rpcName = chunk->GetDescriptor()->GetRpcName(chunk, rpc->m_rpc); - size_t rpcIndex = chunk->GetDescriptor()->GetRpcIndex(chunk, rpc->m_rpc); - - m_output->BeginTag(Tags::REPLICA_DRILLER); - m_output->BeginTag(Tags::CHUNK_RECEIVE_RPC); - OutputBaseReplicaChunkTags(chunk, chunkIndex, len); - m_output->Write(Tags::RPC_NAME, rpcName); - m_output->Write(Tags::RPC_INDEX, rpcIndex); - m_output->EndTag(Tags::CHUNK_RECEIVE_RPC); - m_output->EndTag(Tags::REPLICA_DRILLER); - } - - void ReplicaDriller::OutputBaseReplicaChunkTags(ReplicaChunkBase* chunk, AZ::u32 chunkIndex, size_t len) - { - const char* chunkTypeName = chunk->GetDescriptor()->GetChunkName(); - const char* replicaName = chunk->GetReplica()->GetDebugName(); - - m_output->Write(Tags::REPLICA_NAME, replicaName); - m_output->Write(Tags::REPLICA_ID, chunk->GetReplicaId()); - m_output->Write(Tags::CHUNK_TYPE, chunkTypeName); - m_output->Write(Tags::CHUNK_INDEX, chunkIndex); - m_output->Write(Tags::SIZE, len); - m_output->Write(Tags::TIME_PROCESSED_MILLISEC, AZStd::chrono::milliseconds(AZStd::chrono::system_clock::now().time_since_epoch()).count()); - } - } -} diff --git a/Code/Framework/GridMate/GridMate/Drillers/ReplicaDriller.h b/Code/Framework/GridMate/GridMate/Drillers/ReplicaDriller.h deleted file mode 100644 index e2b7213926..0000000000 --- a/Code/Framework/GridMate/GridMate/Drillers/ReplicaDriller.h +++ /dev/null @@ -1,77 +0,0 @@ -/* - * Copyright (c) Contributors to the Open 3D Engine Project. - * For complete copyright and license terms please see the LICENSE at the root of this distribution. - * - * SPDX-License-Identifier: Apache-2.0 OR MIT - * - */ -#ifndef GM_REPLICA_DRILLER_H -#define GM_REPLICA_DRILLER_H - -#include -#include -#include -#include - -namespace GridMate -{ - namespace Debug - { - class ReplicaDriller - : public AZ::Debug::Driller - , public GridMate::Debug::ReplicaDrillerBus::Handler - { - public: - struct Tags - { - // Driller - static const AZ::Crc32 REPLICA_DRILLER; - - // Event Types - static const AZ::Crc32 CHUNK_SEND_DATASET; - static const AZ::Crc32 CHUNK_RECEIVE_DATASET; - static const AZ::Crc32 CHUNK_SEND_RPC; - static const AZ::Crc32 CHUNK_RECEIVE_RPC; - - // Data Fields - static const AZ::Crc32 REPLICA_NAME; - static const AZ::Crc32 REPLICA_ID; - static const AZ::Crc32 CHUNK_TYPE; - static const AZ::Crc32 CHUNK_INDEX; - static const AZ::Crc32 DATA_SET_NAME; - static const AZ::Crc32 DATA_SET_INDEX; - static const AZ::Crc32 RPC_NAME; - static const AZ::Crc32 RPC_INDEX; - static const AZ::Crc32 SIZE; - static const AZ::Crc32 TIME_PROCESSED_MILLISEC; - }; - - AZ_CLASS_ALLOCATOR(ReplicaDriller, AZ::OSAllocator, 0); - ReplicaDriller(); - - ////////////////////////////////////////////////////////////////////////// - // Driller - const char* GroupName() const override { return "GridMate"; } - const char* GetName() const override { return "ReplicaDriller"; } - const char* GetDescription() const override { return "Drills replicas."; } - void Start(const Param* params = NULL, int numParams = 0) override; - void Stop() override; - ////////////////////////////////////////////////////////////////////////// - - ////////////////////////////////////////////////////////////////////////// - // ReplicaDrillerEvents - void OnSendDataSet(ReplicaChunkBase* chunk, AZ::u32 chunkIndex, DataSetBase* dataSet, PeerId from, PeerId to, const void* data, size_t len) override; - void OnReceiveDataSet(ReplicaChunkBase* chunk, AZ::u32 chunkIndex, DataSetBase* dataSet, PeerId from, PeerId to, const void* data, size_t len) override; - - void OnSendRpc(ReplicaChunkBase* chunk, AZ::u32 chunkIndex, Internal::RpcRequest* rpc, PeerId from, PeerId to, const void* data, size_t len) override; - void OnReceiveRpc(ReplicaChunkBase* chunk, AZ::u32 chunkIndex, Internal::RpcRequest* rpc, PeerId from, PeerId to, const void* data, size_t len) override; - ////////////////////////////////////////////////////////////////////////// - - private: - - void OutputBaseReplicaChunkTags(ReplicaChunkBase* chunk, AZ::u32 chunkIndex, size_t len); - }; - } -} - -#endif diff --git a/Code/Framework/GridMate/GridMate/Drillers/SessionDriller.cpp b/Code/Framework/GridMate/GridMate/Drillers/SessionDriller.cpp deleted file mode 100644 index a7130218f8..0000000000 --- a/Code/Framework/GridMate/GridMate/Drillers/SessionDriller.cpp +++ /dev/null @@ -1,275 +0,0 @@ -/* - * Copyright (c) Contributors to the Open 3D Engine Project. - * For complete copyright and license terms please see the LICENSE at the root of this distribution. - * - * SPDX-License-Identifier: Apache-2.0 OR MIT - * - */ - -#include - -using namespace AZ::Debug; - -namespace GridMate -{ - namespace Debug - { - //========================================================================= - // SessionDriller - // [4/14/2011] - //========================================================================= - SessionDriller::SessionDriller() - { - m_drillerTag = AZ_CRC("SessionDriller", 0x30b916a9); - } - - //========================================================================= - // Start - // [4/14/2011] - //========================================================================= - void SessionDriller::Start(const Param* params, int numParams) - { - (void)params; - (void)numParams; - // Collect current session information ? - SessionDrillerBus::Handler::BusConnect(); - - // - //m_output->BeginTag(m_drillerTag); - //m_output->BeginTag(AZ_CRC("StartDrill")); - //if(sessionMgr->m_activeSession) - //{ - // GridSession* gs = sessionMgr->m_activeSession; - // // store the current session state - // m_output->BeginTag(AZ_CRC("Session")); - // m_output->Write(AZ_CRC("SessionId"),gs->GetId()); - // m_output->Write(AZ_CRC("Carrier"),gs->GetCarrier()); - // m_output->Write(AZ_CRC("ReplicaMgr"),gs->GetReplicaMgr()); - // m_output->Write(AZ_CRC("Topology"),(char)gs->GetTopology()); - // m_output->Write(AZ_CRC("Time"),gs->GetTime()); - // m_output->Write(AZ_CRC("State"),(char)gs->m_sm.GetCurrentState()); - // m_output->Write(AZ_CRC("IsHost"),gs->IsHost()); - // // There are endless params add as needed - - // for(unsigned int i = 0; i < gs->GetNumberOfMembers(); ++i ) - // { - // GridMember* gm = gs->GetMember(i); - // m_output->BeginTag(AZ_CRC("Member")); - // m_output->Write(AZ_CRC("Id"),gm->GetId().ToString()); - // m_output->Write(AZ_CRC("Name"),gm->GetName()); - // m_output->Write(AZ_CRC("ConnectionId"),gm->GetConnectionId()); - // m_output->Write(AZ_CRC("NAT"),(char)gm->GetNatType()); - // m_output->Write(AZ_CRC("CommFilter"),gm->GetCommFilter()); - // m_output->Write(AZ_CRC("IsHost"),gm->IsHost()); - // m_output->Write(AZ_CRC("IsLocal"),gm->IsLocal()); - // m_output->Write(AZ_CRC("IsInvited"),gm->IsInvited()); - // m_output->EndTag(AZ_CRC("Member")); - // } - - // m_output->EndTag(AZ_CRC("Session")); - //} - //else if(sessionMgr->m_activeSearch) - //{ - // GridSearch* gs = sessionMgr->m_activeSearch; - // m_output->BeginTag(AZ_CRC("GridSearch")); - // m_output->Write(AZ_CRC("SearchId"),gs); - // m_output->Write(AZ_CRC("IsDone"),gs->IsDone()); - // m_output->Write(AZ_CRC("NumResults"),gs->GetNumResults()); - // // add platform specific drill or just generic reporting - // m_output->EndTag(AZ_CRC("GridSearch")); - //} - //m_output->EndTag(AZ_CRC("StartDrill")); - //m_output->EndTag(m_drillerTag); - } - - //========================================================================= - // Stop - // [4/14/2011] - //========================================================================= - void SessionDriller::Stop() - { - SessionDrillerBus::Handler::BusDisconnect(); - } - - //========================================================================= - // OnSessionServiceReady - // [4/15/2011] - //========================================================================= - void - SessionDriller::OnSessionServiceReady() - { - // m_output->BeginTag(m_drillerTag); - // m_output->EndTag(m_drillerTag); - } - - //========================================================================= - // OnGridSearchComplete - // [4/15/2011] - //========================================================================= - void - SessionDriller::OnGridSearchComplete(GridSearch* gridSearch) - { - m_output->BeginTag(m_drillerTag); - m_output->BeginTag(AZ_CRC("GridSearchComplete", 0x974b5717)); - m_output->Write(AZ_CRC("SearchId", 0x4f7ef2d2), gridSearch); - m_output->Write(AZ_CRC("NumResults", 0xdfb1542f), gridSearch->GetNumResults()); - // add platform specific drill or just generic reporting - m_output->EndTag(AZ_CRC("GridSearchComplete", 0x974b5717)); - m_output->EndTag(m_drillerTag); - } - - //========================================================================= - // OnMemberJoined - // [4/15/2011] - //========================================================================= - void - SessionDriller::OnMemberJoined(GridSession* session, GridMember* member) - { - m_output->BeginTag(m_drillerTag); - m_output->BeginTag(AZ_CRC("MemberJoined", 0xbde4706c)); - m_output->Write(AZ_CRC("SessionId", 0xacd49154), session->GetId()); - m_output->Write(AZ_CRC("Id", 0xbf396750), member->GetId().ToString()); - m_output->Write(AZ_CRC("Name", 0x5e237e06), member->GetName()); - m_output->Write(AZ_CRC("ConnectionId", 0x4592a200), member->GetConnectionId()); - m_output->Write(AZ_CRC("NAT", 0x9686d0fb), (char)member->GetNatType()); - //m_output->Write(AZ_CRC("MuteList"),member->GetMuteList()); - m_output->Write(AZ_CRC("IsHost", 0xce28a9cf), member->IsHost()); - m_output->Write(AZ_CRC("IsLocal", 0x4300d6d2), member->IsLocal()); - m_output->Write(AZ_CRC("IsInvited", 0x29d785f7), member->IsInvited()); - m_output->EndTag(AZ_CRC("MemberJoined", 0xbde4706c)); - m_output->EndTag(m_drillerTag); - } - - //========================================================================= - // OnMemberLeaving - // [4/15/2011] - //========================================================================= - void - SessionDriller::OnMemberLeaving(GridSession* session, GridMember* member) - { - m_output->BeginTag(m_drillerTag); - m_output->BeginTag(AZ_CRC("MemberLeaving", 0xd10ee176)); - m_output->Write(AZ_CRC("SessionId", 0xacd49154), session->GetId()); - m_output->Write(AZ_CRC("Id", 0xbf396750), member->GetId().ToString()); - m_output->EndTag(AZ_CRC("MemberLeaving", 0xd10ee176)); - m_output->EndTag(m_drillerTag); - } - - //========================================================================= - // OnMemberKicked - // [4/15/2011] - //========================================================================= - void - SessionDriller::OnMemberKicked(GridSession* session, GridMember* member) - { - m_output->BeginTag(m_drillerTag); - m_output->BeginTag(AZ_CRC("MemberKicked", 0x908e74e6)); - m_output->Write(AZ_CRC("SessionId", 0xacd49154), session->GetId()); - m_output->Write(AZ_CRC("Id", 0xbf396750), member->GetId().ToString()); - m_output->EndTag(AZ_CRC("MemberKicked", 0x908e74e6)); - m_output->EndTag(m_drillerTag); - } - - //========================================================================= - // OnSessionCreated - // [4/15/2011] - //========================================================================= - void - SessionDriller::OnSessionCreated(GridSession* session) - { - m_output->BeginTag(m_drillerTag); - m_output->BeginTag(AZ_CRC("SessionCreated", 0x24655a62)); - m_output->Write(AZ_CRC("SessionId", 0xacd49154), session->GetId()); - m_output->Write(AZ_CRC("Carrier", 0x4739f11c), session->GetCarrier()); - m_output->Write(AZ_CRC("ReplicaMgr", 0x41cf3853), session->GetReplicaMgr()); - m_output->Write(AZ_CRC("Topology", 0x1198610c), (char)session->GetTopology()); - m_output->Write(AZ_CRC("Time", 0x6f949845), session->GetTime()); - m_output->Write(AZ_CRC("State", 0xa393d2fb), (char)session->m_sm.GetCurrentState()); - m_output->Write(AZ_CRC("IsHost", 0xce28a9cf), session->IsHost()); - m_output->EndTag(AZ_CRC("SessionCreated", 0x24655a62)); - m_output->EndTag(m_drillerTag); - } - //========================================================================= - // OnSessionJoined - // [4/15/2011] - //========================================================================= - void - SessionDriller::OnSessionJoined(GridSession* session) - { - m_output->BeginTag(m_drillerTag); - m_output->BeginTag(AZ_CRC("SessionJoined", 0x04b85d49)); - m_output->Write(AZ_CRC("SessionId", 0xacd49154), session->GetId()); - m_output->Write(AZ_CRC("Carrier", 0x4739f11c), session->GetCarrier()); - m_output->Write(AZ_CRC("ReplicaMgr", 0x41cf3853), session->GetReplicaMgr()); - m_output->Write(AZ_CRC("Topology", 0x1198610c), (char)session->GetTopology()); - m_output->Write(AZ_CRC("Time", 0x6f949845), session->GetTime()); - m_output->Write(AZ_CRC("State", 0xa393d2fb), (char)session->m_sm.GetCurrentState()); - m_output->Write(AZ_CRC("IsHost", 0xce28a9cf), session->IsHost()); - m_output->EndTag(AZ_CRC("SessionJoined", 0x04b85d49)); - m_output->EndTag(m_drillerTag); - } - //========================================================================= - // OnSessionDelete - // [4/15/2011] - //========================================================================= - void - SessionDriller::OnSessionDelete(GridSession* session) - { - m_output->BeginTag(m_drillerTag); - m_output->Write(AZ_CRC("SessionDelete", 0x6b5728cd), session->GetId()); - m_output->EndTag(m_drillerTag); - } - //========================================================================= - // OnSessionError - // [4/15/2011] - //========================================================================= - void - SessionDriller::OnSessionError(GridSession* session, const AZStd::string& errorMsg) - { - m_output->BeginTag(m_drillerTag); - m_output->BeginTag(AZ_CRC("SessionError", 0xc689cc40)); - m_output->Write(AZ_CRC("SessionId", 0xacd49154), session ? session->GetId() : "NoId"); - m_output->Write(AZ_CRC("Error", 0x5dddbc71), errorMsg); - m_output->EndTag(AZ_CRC("SessionError", 0xc689cc40)); - m_output->EndTag(m_drillerTag); - } - //========================================================================= - // OnSessionStart - // [4/15/2011] - //========================================================================= - void - SessionDriller::OnSessionStart(GridSession* session) - { - m_output->BeginTag(m_drillerTag); - m_output->Write(AZ_CRC("SessionStart", 0x042d25be), session->GetId()); - m_output->EndTag(m_drillerTag); - } - //========================================================================= - // OnSessionEnd - // [4/15/2011] - //========================================================================= - void - SessionDriller::OnSessionEnd(GridSession* session) - { - m_output->BeginTag(m_drillerTag); - m_output->Write(AZ_CRC("SessionEnd", 0x07821a5e), session->GetId()); - m_output->EndTag(m_drillerTag); - } - //========================================================================= - // OnWriteStatistics - // [6/8/2011] - //========================================================================= - void - SessionDriller::OnWriteStatistics(GridSession* session, GridMember* member, StatisticsData& data) - { - m_output->BeginTag(m_drillerTag); - m_output->BeginTag(AZ_CRC("WriteStatistics", 0xcf7f12aa)); - m_output->Write(AZ_CRC("SessionId", 0xacd49154), session->GetId()); - m_output->Write(AZ_CRC("Id", 0xbf396750), member->GetId().ToString()); - // data... - (void)data; - m_output->EndTag(AZ_CRC("WriteStatistics", 0xcf7f12aa)); - m_output->EndTag(m_drillerTag); - } - } // namespace Debug -} // namespace GridMate diff --git a/Code/Framework/GridMate/GridMate/Drillers/SessionDriller.h b/Code/Framework/GridMate/GridMate/Drillers/SessionDriller.h deleted file mode 100644 index 7af318287a..0000000000 --- a/Code/Framework/GridMate/GridMate/Drillers/SessionDriller.h +++ /dev/null @@ -1,77 +0,0 @@ -/* - * Copyright (c) Contributors to the Open 3D Engine Project. - * For complete copyright and license terms please see the LICENSE at the root of this distribution. - * - * SPDX-License-Identifier: Apache-2.0 OR MIT - * - */ -#ifndef GM_SESSION_DRILLER_H -#define GM_SESSION_DRILLER_H - -#include -#include -#include - -namespace GridMate -{ - namespace Debug - { - /** - * Session Driller - * \note Be careful which buses you attach. The drillers work in Multi threaded environment and expect that - * a driller mutex (DrillerManager::DrillerManager) will be automatically locked on every write. - * Otherwise in output stream corruption will happen (even is the stream is thread safe). - */ - class SessionDriller - : public AZ::Debug::Driller - , public SessionDrillerBus::Handler - { - int m_drillerTag; - public: - AZ_CLASS_ALLOCATOR(SessionDriller, AZ::OSAllocator, 0); - SessionDriller(); - - ////////////////////////////////////////////////////////////////////////// - // Driller - const char* GroupName() const override { return "GridMate"; } - const char* GetName() const override { return "SessionDriller"; } - const char* GetDescription() const override { return "Drills GridSession, Search, etc."; } - void Start(const Param* params = NULL, int numParams = 0) override; - void Stop() override; - ////////////////////////////////////////////////////////////////////////// - - ////////////////////////////////////////////////////////////////////////// - // Session Event Bus - /// Callback that is called when the Session service is ready to process sessions. - void OnSessionServiceReady() override; - //virtual OnCommucationChanged() = 0 Callback that notifies the title when a member's communication settings change. - /// Callback that notifies the title when a game search query have completed. - void OnGridSearchComplete(GridSearch* gridSearch) override; - /// Callback that notifies the title when a new member joins the game session. - void OnMemberJoined(GridSession* session, GridMember* member) override; - /// Callback that notifies the title that a member is leaving the game session. member pointer is NOT valid after the callback returns. - void OnMemberLeaving(GridSession* session, GridMember* member) override; - // \todo a better way will be (after we solve migration) is to supply a reason to OnMemberLeaving... like the member was kicked. - // this will require that we actually remove the replica at the same moment. - /// Callback that host decided to kick a member. You will receive a OnMemberLeaving when the actual member leaves the session. - void OnMemberKicked(GridSession* session, GridMember* member) override; - /// After this callback it is safe to access session features. If host session is fully operational if client wait for OnSessionJoined. - void OnSessionCreated(GridSession* session) override; - /// Called on client machines to indicate that we join successfully. - void OnSessionJoined(GridSession* session) override; - /// Callback that notifies the title when a session will be left. session pointer is NOT valid after the callback returns. - void OnSessionDelete(GridSession* session) override; - /// Called when a session error occurs. - void OnSessionError(GridSession* session, const AZStd::string& errorMsg) override; - /// Called when the actual game(match) starts - void OnSessionStart(GridSession* session) override; - /// Called when the actual game(match) ends - void OnSessionEnd(GridSession* session) override; - /// Called when we have our last chance to write statistics data for member in the session. - void OnWriteStatistics(GridSession* session, GridMember* member, StatisticsData& data) override; - ////////////////////////////////////////////////////////////////////////// - }; - } -} - -#endif // GM_SESSION_DRILLER_H diff --git a/Code/Framework/GridMate/GridMate/Replica/RemoteProcedureCall.cpp b/Code/Framework/GridMate/GridMate/Replica/RemoteProcedureCall.cpp index 3feef708be..7f96638cf5 100644 --- a/Code/Framework/GridMate/GridMate/Replica/RemoteProcedureCall.cpp +++ b/Code/Framework/GridMate/GridMate/Replica/RemoteProcedureCall.cpp @@ -11,7 +11,6 @@ #include #include #include -#include #include #include @@ -32,14 +31,12 @@ namespace GridMate m_replicaChunk->QueueRPCRequest(rpc); } - void RpcBase::OnRpcRequest(GridMate::Internal::RpcRequest* rpc) const + void RpcBase::OnRpcRequest(GridMate::Internal::RpcRequest*) const { - EBUS_EVENT(Debug::ReplicaDrillerBus, OnRequestRpc, m_replicaChunk, rpc); } - void RpcBase::OnRpcInvoke(GridMate::Internal::RpcRequest* rpc) const + void RpcBase::OnRpcInvoke(GridMate::Internal::RpcRequest*) const { - EBUS_EVENT(Debug::ReplicaDrillerBus, OnInvokeRpc, m_replicaChunk, rpc); } PeerId RpcBase::GetSourcePeerId() diff --git a/Code/Framework/GridMate/GridMate/Replica/Replica.cpp b/Code/Framework/GridMate/GridMate/Replica/Replica.cpp index a05b92a7a0..bc95302afd 100644 --- a/Code/Framework/GridMate/GridMate/Replica/Replica.cpp +++ b/Code/Framework/GridMate/GridMate/Replica/Replica.cpp @@ -14,7 +14,6 @@ #include #include #include -#include #include #include #include @@ -49,8 +48,6 @@ namespace GridMate replicaName = nullptr; #endif InternalCreateInitialChunks(replicaName); - - EBUS_EVENT(Debug::ReplicaDrillerBus, OnCreateReplica, this); } //----------------------------------------------------------------------------- Replica::~Replica() @@ -96,8 +93,6 @@ namespace GridMate } } m_chunks.clear(); - - EBUS_EVENT(Debug::ReplicaDrillerBus, OnDestroyReplica, this); } //----------------------------------------------------------------------------- void Replica::Destroy() @@ -257,17 +252,12 @@ namespace GridMate //----------------------------------------------------------------------------- void Replica::OnActivate(const ReplicaContext& rc) { - EBUS_EVENT(Debug::ReplicaDrillerBus, OnActivateReplica, this); - for (auto chunk : m_chunks) { if (chunk) { - { - GM_PROFILE_USER_CALLBACK("OnReplicaActivate"); - chunk->OnReplicaActivate(rc); - } - EBUS_EVENT(Debug::ReplicaDrillerBus, OnActivateReplicaChunk, chunk.get()); + GM_PROFILE_USER_CALLBACK("OnReplicaActivate"); + chunk->OnReplicaActivate(rc); } } } @@ -277,17 +267,13 @@ namespace GridMate AZ_PROFILE_FUNCTION(GridMate); EBUS_EVENT_ID(rc.m_rm->GetGridMate(), ReplicaMgrCallbackBus, OnDeactivateReplica, GetRepId(), rc.m_rm); - EBUS_EVENT(Debug::ReplicaDrillerBus, OnDeactivateReplica, this); for (auto chunk : m_chunks) { if (chunk) { - { - GM_PROFILE_USER_CALLBACK("OnReplicaDeactivate"); - chunk->OnReplicaDeactivate(rc); - } - EBUS_EVENT(Debug::ReplicaDrillerBus, OnDeactivateReplicaChunk, chunk.get()); + GM_PROFILE_USER_CALLBACK("OnReplicaDeactivate"); + chunk->OnReplicaDeactivate(rc); } } } @@ -325,8 +311,6 @@ namespace GridMate { if (IsPrimary()) { - EBUS_EVENT(Debug::ReplicaDrillerBus, OnRequestReplicaChangeOwnership, this, requestor); - if (IsMigratable() && requestor != m_manager->GetLocalPeerId()) { bool accepted; @@ -595,8 +579,6 @@ namespace GridMate chunkInfo.m_payload.Init(128); mc.m_outBuffer = &chunkInfo.m_payload; - EBUS_EVENT(Debug::ReplicaDrillerBus, OnSendReplicaChunkBegin, chunk.get(), static_cast(iChunk), mc.m_rm->GetLocalPeerId(), mc.m_peer->GetId()); - PackedSize writeOffset = mc.m_outBuffer->GetExactSize(); // Write the ctor data if we need to if (mc.m_marshalFlags & ReplicaMarshalFlags::IncludeCtorData) { @@ -606,7 +588,6 @@ namespace GridMate // Marshal the chunk data chunk->Marshal(mc, static_cast(iChunk)); - EBUS_EVENT(Debug::ReplicaDrillerBus, OnSendReplicaChunkEnd, chunk.get(), static_cast(iChunk), mc.m_outBuffer->Get() + writeOffset.GetBytes(), mc.m_outBuffer->Size() - writeOffset.GetBytes()); // Precompute the chunk payload length and add to overall replica payload length PackedSize chunkLen = chunkInfo.m_payload.GetExactSize(); @@ -696,9 +677,7 @@ namespace GridMate if (chunk) { - EBUS_EVENT(Debug::ReplicaDrillerBus, OnReceiveReplicaChunkBegin, chunk.get(), static_cast(iChunk), chunkContext.m_peer->GetId(), chunkContext.m_rm->GetLocalPeerId(), innerBuffer.Get(), chunkSize.GetSizeInBytesRoundUp()); chunk->Unmarshal(chunkContext, static_cast(iChunk)); - EBUS_EVENT(Debug::ReplicaDrillerBus, OnReceiveReplicaChunkEnd, chunk.get(), static_cast(iChunk)); } else { diff --git a/Code/Framework/GridMate/GridMate/Replica/ReplicaChunk.cpp b/Code/Framework/GridMate/GridMate/Replica/ReplicaChunk.cpp index d3db481ccd..2ded895be0 100644 --- a/Code/Framework/GridMate/GridMate/Replica/ReplicaChunk.cpp +++ b/Code/Framework/GridMate/GridMate/Replica/ReplicaChunk.cpp @@ -15,7 +15,6 @@ #include #include #include -#include #include namespace GridMate @@ -41,13 +40,11 @@ namespace GridMate ReplicaChunkInitContext* initContext = ReplicaChunkDescriptorTable::Get().GetCurrentReplicaChunkInitContext(); AZ_Assert(initContext, "Replica's descriptor is NOT pushed on the stack! Call Replica::Desriptor::Push() before construction!"); initContext->m_chunk = this; - EBUS_EVENT(Debug::ReplicaDrillerBus, OnCreateReplicaChunk, this); } //----------------------------------------------------------------------------- ReplicaChunkBase::~ReplicaChunkBase() { AZ_Assert(m_refCount == 0, "Attempting to free replica with non-zero refCount(%d)!", m_refCount); - EBUS_EVENT(Debug::ReplicaDrillerBus, OnDestroyReplicaChunk, this); } //----------------------------------------------------------------------------- void ReplicaChunkBase::Init(ReplicaChunkClassId chunkTypeId) @@ -332,7 +329,7 @@ namespace GridMate return dataSetMask; } //----------------------------------------------------------------------------- - void ReplicaChunkBase::MarshalDataSets(MarshalContext& mc, AZ::u32 chunkIndex) + void ReplicaChunkBase::MarshalDataSets(MarshalContext& mc, [[maybe_unused]] AZ::u32 chunkIndex) { //AZ_PROFILE_SCOPE("GridMate"); AZ::u32 dirtyDataSetMask = CalculateDirtyDataSetMask(mc); @@ -358,15 +355,6 @@ namespace GridMate ReadBuffer data = dataset->GetMarshalData(); mc.m_outBuffer->WriteRaw(data.Get(), data.Size()); wroteDataSet = true; - - EBUS_EVENT(Debug::ReplicaDrillerBus, OnSendDataSet, - this, - chunkIndex, - dataset, - mc.m_rm->GetLocalPeerId(), - mc.m_peer->GetId(), - data.Get(), - data.Size().GetSizeInBytesRoundUp()); } } if(wroteDataSet) @@ -380,7 +368,7 @@ namespace GridMate } } //----------------------------------------------------------------------------- - void ReplicaChunkBase::UnmarshalDataSets(UnmarshalContext& mc, AZ::u32 chunkIndex) + void ReplicaChunkBase::UnmarshalDataSets(UnmarshalContext& mc, [[maybe_unused]] AZ::u32 chunkIndex) { AZ_PROFILE_FUNCTION(GridMate); @@ -421,22 +409,12 @@ namespace GridMate dataset->MarkAsNonDefaultValue(); m_nonDefaultValueBits.set(i); - const char* readPtr = mc.m_iBuf->GetCurrent(); dataset->Unmarshal(mc); - - EBUS_EVENT(Debug::ReplicaDrillerBus, OnReceiveDataSet, - this, - chunkIndex, - dataset, - mc.m_peer->GetId(), - mc.m_rm->GetLocalPeerId(), - readPtr, - mc.m_iBuf->GetCurrent() - readPtr); } } } //----------------------------------------------------------------------------- - void ReplicaChunkBase::MarshalRpcs(MarshalContext& mc, AZ::u32 chunkIndex) + void ReplicaChunkBase::MarshalRpcs(MarshalContext& mc, [[maybe_unused]] AZ::u32 chunkIndex) { //AZ_PROFILE_SCOPE("GridMate"); @@ -467,22 +445,12 @@ namespace GridMate AZ::u8 rpcIndex = static_cast(GetDescriptor()->GetRpcIndex(this, rpc->m_rpc)); - auto bufferSize = mc.m_outBuffer->Size(); - SafeGuardWrite(mc.m_outBuffer, [rpc, rpcIndex, &mc]() { mc.m_outBuffer->Write(rpcIndex); rpc->m_rpc->Marshal(*mc.m_outBuffer, rpc); }); - EBUS_EVENT(Debug::ReplicaDrillerBus, OnSendRpc, - this, - chunkIndex, - rpc, - mc.m_rm->GetLocalPeerId(), - mc.m_peer->GetId(), - mc.m_outBuffer->Get() + bufferSize, - mc.m_outBuffer->Size() - bufferSize); rpc->m_relayed = !(mc.m_marshalFlags & ReplicaMarshalFlags::Authoritative); // marking upstream rpcs relayed, for downstream rpcs - replicamgr marks them relayed after marshaling is finished rpcsSent++; } @@ -494,7 +462,7 @@ namespace GridMate } } //----------------------------------------------------------------------------- - void ReplicaChunkBase::UnmarshalRpcs(UnmarshalContext& mc, AZ::u32 chunkIndex) + void ReplicaChunkBase::UnmarshalRpcs(UnmarshalContext& mc, [[maybe_unused]] AZ::u32 chunkIndex) { AZ_PROFILE_FUNCTION(GridMate); @@ -504,7 +472,7 @@ namespace GridMate { for (AZ::u32 rpcsRead = 0; rpcsRead < rpcCount; ++rpcsRead) { - SafeGuardRead(mc.m_iBuf, [this, &mc, &chunkIndex]() + SafeGuardRead(mc.m_iBuf, [this, &mc]() { unsigned char rpcIndex; if (!mc.m_iBuf->Read(rpcIndex)) @@ -519,7 +487,6 @@ namespace GridMate return; } - const char* dataPtr = mc.m_iBuf->GetCurrent(); Internal::RpcRequest* request = rpc->Unmarshal(*mc.m_iBuf); if (!request) { @@ -565,15 +532,6 @@ namespace GridMate request->m_sourcePeer = mc.m_peer->GetId(); } - size_t dataSize = mc.m_iBuf->GetCurrent() - dataPtr; - EBUS_EVENT(Debug::ReplicaDrillerBus, OnReceiveRpc, - this, - chunkIndex, - request, - mc.m_peer->GetId(), - mc.m_rm->GetLocalPeerId(), - dataPtr, - dataSize); m_rpcQueue.push_back(request); } else @@ -739,7 +697,6 @@ namespace GridMate m_replica = replica; - EBUS_EVENT(Debug::ReplicaDrillerBus, OnAttachReplicaChunk, this); { GM_PROFILE_USER_CALLBACK("OnAttachedToReplica"); OnAttachedToReplica(replica); @@ -751,7 +708,6 @@ namespace GridMate AZ_PROFILE_FUNCTION(GridMate); AZ_Assert(m_replica, "Should be attached to a replica"); - EBUS_EVENT(Debug::ReplicaDrillerBus, OnDetachReplicaChunk, this); { GM_PROFILE_USER_CALLBACK("OnDetachedFromReplica"); OnDetachedFromReplica(m_replica); diff --git a/Code/Framework/GridMate/GridMate/Replica/ReplicaDrillerEvents.h b/Code/Framework/GridMate/GridMate/Replica/ReplicaDrillerEvents.h deleted file mode 100644 index 9ee2785f09..0000000000 --- a/Code/Framework/GridMate/GridMate/Replica/ReplicaDrillerEvents.h +++ /dev/null @@ -1,116 +0,0 @@ -/* - * Copyright (c) Contributors to the Open 3D Engine Project. - * For complete copyright and license terms please see the LICENSE at the root of this distribution. - * - * SPDX-License-Identifier: Apache-2.0 OR MIT - * - */ -#ifndef GM_REPLICA_DRILLER_EVENTS_H -#define GM_REPLICA_DRILLER_EVENTS_H - -#include - -/*! -* The replica system emits debugging EBus events via the ReplicaDrillerEvents interface. -* To listen for these events, derive from ReplicaDrillerBus::Handler and implement all -* the functions declared in the ReplicaDrillerEvents interface. -*/ - -namespace GridMate -{ - class Replica; - class ReplicaChunk; - class ReplicaChunkBase; - class DataSetBase; - typedef AZ::u32 PeerId; - - namespace Internal - { - struct RpcRequest; - } - - namespace Debug - { - /*! - * These are the driller events that the replica system will emit. - * All functions in this interface should be implemented by the user. - */ - class ReplicaDrillerEvents - : public AZ::Debug::DrillerEBusTraits - { - public: - //! Called when a replica is instantiated. It doesn't mean it will be added to the system. - virtual void OnCreateReplica(Replica* replica) { (void)replica; } - //! Called when a replica is actually destroyed. - virtual void OnDestroyReplica(Replica* replica) { (void)replica; } - //! Called when a replica is added to the system. - virtual void OnActivateReplica(Replica* replica) { (void)replica; } - //! Called when a replica is removed from the system. - virtual void OnDeactivateReplica(Replica* replica) { (void)replica; } - //! Called every time the replica data is sent to a peer. - virtual void OnSendReplicaBegin(Replica* replica) { (void)replica; } - //! Called every time the replica data is sent to a peer. - virtual void OnSendReplicaEnd(Replica* replica, const void* data, size_t len) { (void)replica; (void)data; (void)len; } - //! Called when data is received for a replica. Called with nullptr replica pointer when data for unknown replica received. - virtual void OnReceiveReplicaBegin(Replica* replica, const void* data, size_t len) { (void)replica; (void)data; (void)len; } - //! Called when data is received for a replica. Called with nullptr replica pointer when data for unknown replica received. - virtual void OnReceiveReplicaEnd(Replica* replica) { (void)replica; } - //! Called when an ownership transfer request is received. - virtual void OnRequestReplicaChangeOwnership(Replica* replica, PeerId requestor) { (void)replica; (void)requestor; } - //! Called when a replica changes ownership, not necessarily to or from the local node. - virtual void OnReplicaChangeOwnership(Replica* replica, bool wasPrimary) { (void)replica; (void)wasPrimary; } - - //! Called when a chunk has been created. It doesn't mean it will be added to the system. - //! Object will be partially constructed at this point if you inherit from ReplicaChunk - virtual void OnCreateReplicaChunk(ReplicaChunkBase* chunk) { (void)chunk; } - //! Called when a chuck is actually destroyed. - virtual void OnDestroyReplicaChunk(ReplicaChunkBase* chunk) { (void)chunk; } - //! Called when a chunk is added to the system. - virtual void OnActivateReplicaChunk(ReplicaChunkBase* chunk) { (void)chunk; } - //! Called when a chunk is removed from the system. - virtual void OnDeactivateReplicaChunk(ReplicaChunkBase* chunk) { (void)chunk; } - //! Called when a chunk is attached to a replica. - virtual void OnAttachReplicaChunk(ReplicaChunkBase* chunk) { (void)chunk; } - //! Called when a chunk is detached from a replica. - virtual void OnDetachReplicaChunk(ReplicaChunkBase* chunk) { (void)chunk; } - //! Called every time the chunk data is sent to a peer. - virtual void OnSendReplicaChunkBegin(ReplicaChunkBase* chunk, AZ::u32 chunkIndex, PeerId from, PeerId to) { (void)chunk; (void)chunkIndex; (void)from; (void)to; } - //! Called every time the chunk data is sent to a peer. - virtual void OnSendReplicaChunkEnd(ReplicaChunkBase* chunk, AZ::u32 chunkIndex, const void* data, size_t len) { (void)chunk; (void)chunkIndex; (void)data; (void)len; } - //! Called when data is received for a chunk. - virtual void OnReceiveReplicaChunkBegin(ReplicaChunkBase* chunk, AZ::u32 chunkIndex, PeerId from, PeerId to, const void* data, size_t len) { (void)chunk; (void)chunkIndex; (void)from; (void)to; (void)data; (void)len; } - //! Called when data is received for a chunk. - virtual void OnReceiveReplicaChunkEnd(ReplicaChunkBase* chunk, AZ::u32 chunkIndex) { (void)chunk; (void)chunkIndex; } - - //! Called every time a dataset is sent to a peer. - virtual void OnSendDataSet(ReplicaChunkBase* chunk, AZ::u32 chunkIndex, DataSetBase* dataSet, PeerId from, PeerId to, const void* data, size_t len) { (void)chunk; (void)chunkIndex; (void)dataSet; (void)from; (void)to; (void)data; (void)len; } - //! Called when data is received for a dataset. - virtual void OnReceiveDataSet(ReplicaChunkBase* chunk, AZ::u32 chunkIndex, DataSetBase* dataSet, PeerId from, PeerId to, const void* data, size_t len) { (void)chunk; (void)chunkIndex; (void)dataSet; (void)from; (void)to; (void)data; (void)len; } - - //! Called when an rpc request is received. RpcRequest pointer will be null if rpc is called on primary replica. - virtual void OnRequestRpc(ReplicaChunkBase* chunk, Internal::RpcRequest* rpc) { (void)chunk; (void)rpc; } - //! Called when an rpc is invoked. RpcRequest pointer will be null if rpc is called on primary replica. - virtual void OnInvokeRpc(ReplicaChunkBase* chunk, Internal::RpcRequest* rpc) { (void)chunk; (void)rpc; } - //! Called every time an rpc is sent to a peer. - virtual void OnSendRpc(ReplicaChunkBase* chunk, AZ::u32 chunkIndex, Internal::RpcRequest* rpc, PeerId from, PeerId to, const void* data, size_t len) { (void)chunk; (void)chunkIndex; (void)rpc; (void)from; (void)to; (void)data; (void)len; } - //! Called when an rpc is received. - virtual void OnReceiveRpc(ReplicaChunkBase* chunk, AZ::u32 chunkIndex, Internal::RpcRequest* rpc, PeerId from, PeerId to, const void* data, size_t len) { (void)chunk; (void)chunkIndex; (void)rpc; (void)from; (void)to; (void)data; (void)len; } - - //! Called when a replica packet is sent. - virtual void OnSend(PeerId to, const void* data, size_t len, bool isReliable) { (void)to; (void)data; (void)len; (void)isReliable; } - //! Called when a replica packet is received. - virtual void OnReceive(PeerId from, const void* data, size_t len) { (void)from; (void)data; (void)len; } - }; - - /*! - * Replica driller events are sent are sent via this the ReplicaDrillerBus. - * To receive events, derive a handler from ReplicaDrillerBus::Handler and - * attach it to the bus. - */ - typedef AZ::EBus ReplicaDrillerBus; - } // namespace Debug -} // namespace GridMate - -#endif // GM_REPLICA_DRILLER_EVENTS_H - -#pragma once diff --git a/Code/Framework/GridMate/GridMate/Replica/ReplicaMgr.cpp b/Code/Framework/GridMate/GridMate/Replica/ReplicaMgr.cpp index 7a56393bd5..1331e08bd6 100644 --- a/Code/Framework/GridMate/GridMate/Replica/ReplicaMgr.cpp +++ b/Code/Framework/GridMate/GridMate/Replica/ReplicaMgr.cpp @@ -17,7 +17,6 @@ #include #include #include -#include #include #include @@ -147,8 +146,6 @@ namespace GridMate auto callback = AZStd::make_unique((m_reliableCallbacks)); carrier->SendWithCallback(m_reliableOutBuffer.Get(), static_cast(m_reliableOutBuffer.Size()), AZStd::move(callback), GetConnectionId(), Carrier::SEND_RELIABLE, Carrier::PRIORITY_NORMAL, commChannel); - - EBUS_EVENT(Debug::ReplicaDrillerBus, OnSend, GetId(), m_reliableOutBuffer.Get(), m_reliableOutBuffer.Size(), true); } if (hasUnreliableData) @@ -164,8 +161,6 @@ namespace GridMate auto callback = AZStd::make_unique((m_unreliableCallbacks)); carrier->SendWithCallback(m_unreliableOutBuffer.Get(), static_cast(m_unreliableOutBuffer.Size()), AZStd::move(callback), GetConnectionId(), Carrier::SEND_UNRELIABLE, Carrier::PRIORITY_NORMAL, commChannel); - - EBUS_EVENT(Debug::ReplicaDrillerBus, OnSend, GetId(), m_unreliableOutBuffer.Get(), m_unreliableOutBuffer.Size(), false); } // prepare for next cycle ResetBuffer(); @@ -1024,9 +1019,6 @@ namespace GridMate */ while (!rb.IsEmptyIgnoreTrailingBits()) { - // This is used later to report the buffer information to driller. - const char* cmdBufferBegin = rb.GetCurrent(); - CmdId cmdhdr; if (!rb.Read(cmdhdr)) { @@ -1179,10 +1171,8 @@ namespace GridMate return; } - EBUS_EVENT(Debug::ReplicaDrillerBus, OnReceiveReplicaBegin, pReplica.get(), cmdBufferBegin, rb.GetCurrent() - cmdBufferBegin); pReplica->Unmarshal(mc); OnReplicaUnmarshaled(pReplica); - EBUS_EVENT(Debug::ReplicaDrillerBus, OnReceiveReplicaEnd, pReplica.get()); } else { @@ -1195,12 +1185,10 @@ namespace GridMate pReplica->SetSyncStage(isSyncStage); pReplica->SetMigratable(isMigratable); - EBUS_EVENT(Debug::ReplicaDrillerBus, OnReceiveReplicaBegin, pReplica.get(), cmdBufferBegin, rb.GetCurrent() - cmdBufferBegin); pReplica->Unmarshal(mc); ReplicaContext rc(this, GetTime(), pFrom); RegisterReplica(pReplica, false, rc); OnReplicaUnmarshaled(pReplica); - EBUS_EVENT(Debug::ReplicaDrillerBus, OnReceiveReplicaEnd, pReplica.get()); } break; } @@ -1268,11 +1256,9 @@ namespace GridMate } if (pObj->m_upstreamHop) { - EBUS_EVENT(Debug::ReplicaDrillerBus, OnReceiveReplicaBegin, pObj.get(), cmdBufferBegin, rb.GetCurrent() - cmdBufferBegin); mc.m_peer = pFrom; pObj->Unmarshal(mc); OnReplicaUnmarshaled(pObj); - EBUS_EVENT(Debug::ReplicaDrillerBus, OnReceiveReplicaEnd, pObj.get()); } else { @@ -1332,7 +1318,6 @@ namespace GridMate } ReadBuffer rb(GetGridMate()->GetDefaultEndianType(), m_receiveBuffer.data(), result.m_numBytes); - EBUS_EVENT(Debug::ReplicaDrillerBus, OnReceive, peer->GetId(), rb.Get(), rb.Size().GetSizeInBytesRoundUp()); _Unmarshal(rb, peer); AZ_Assert(rb.IsEmptyIgnoreTrailingBits(), "We did not process the whole message!"); } @@ -1655,7 +1640,6 @@ namespace GridMate { replica->SetPrimary(isPrimary); replica->OnChangeOwnership(rc); - EBUS_EVENT(Debug::ReplicaDrillerBus, OnReplicaChangeOwnership, replica.get(), wasPrimary); } } //----------------------------------------------------------------------------- diff --git a/Code/Framework/GridMate/GridMate/Replica/Tasks/ReplicaMarshalTasks.cpp b/Code/Framework/GridMate/GridMate/Replica/Tasks/ReplicaMarshalTasks.cpp index c1d6905e14..cab40e18ca 100644 --- a/Code/Framework/GridMate/GridMate/Replica/Tasks/ReplicaMarshalTasks.cpp +++ b/Code/Framework/GridMate/GridMate/Replica/Tasks/ReplicaMarshalTasks.cpp @@ -8,7 +8,6 @@ #include #include -#include #include #include #include @@ -72,12 +71,10 @@ namespace GridMate //----------------------------------------------------------------------------- void ReplicaMarshalTaskBase::OnSendReplicaBegin() { - EBUS_EVENT(Debug::ReplicaDrillerBus, OnSendReplicaBegin, m_replica.get()); } //----------------------------------------------------------------------------- - void ReplicaMarshalTaskBase::OnSendReplicaEnd(ReplicaPeer* to, const void* data, size_t len) + void ReplicaMarshalTaskBase::OnSendReplicaEnd(ReplicaPeer* to, const void*, size_t len) { - EBUS_EVENT(Debug::ReplicaDrillerBus, OnSendReplicaEnd, m_replica.get(), data, len); to->m_sentBytes += static_cast(len); } //----------------------------------------------------------------------------- diff --git a/Code/Framework/GridMate/GridMate/Session/LANSession.cpp b/Code/Framework/GridMate/GridMate/Session/LANSession.cpp index 223085cf13..ae1e674cf2 100644 --- a/Code/Framework/GridMate/GridMate/Session/LANSession.cpp +++ b/Code/Framework/GridMate/GridMate/Session/LANSession.cpp @@ -882,7 +882,6 @@ LANSession::OnStateHostMigrateSession(AZ::HSM& sm, const AZ::HSM::Event& e) { // check the output for more info AZStd::string errorMsg = AZStd::string::format("Failed to initialize socket at port %d!", hostPort); - EBUS_DBG_EVENT(Debug::SessionDrillerBus, OnSessionError, this, errorMsg); EBUS_EVENT_ID(m_gridMate, SessionEventBus, OnSessionError, this, errorMsg); // We can't be a real host if we failed to provide matching services. Leave(false); @@ -1146,7 +1145,6 @@ void LANSessionService::OnServiceRegistered(IGridMate* gridMate) LANSessionServiceBus::Handler::BusConnect(gridMate); - EBUS_DBG_EVENT(Debug::SessionDrillerBus, OnSessionServiceReady); EBUS_EVENT_ID(m_gridMate, SessionEventBus, OnSessionServiceReady); } diff --git a/Code/Framework/GridMate/GridMate/Session/Session.cpp b/Code/Framework/GridMate/GridMate/Session/Session.cpp index 3dcb16b08d..54e1e1dfe6 100644 --- a/Code/Framework/GridMate/GridMate/Session/Session.cpp +++ b/Code/Framework/GridMate/GridMate/Session/Session.cpp @@ -316,7 +316,6 @@ GridSession::Shutdown() m_carrier->Shutdown(); } - EBUS_DBG_EVENT(Debug::SessionDrillerBus, OnSessionDelete, this); EBUS_EVENT_ID(m_gridMate, SessionEventBus, OnSessionDelete, this); m_state = nullptr; @@ -438,7 +437,6 @@ GridSession::Update() memberStateIter = m_unboundMemberStates.erase(memberStateIter); // Both member and client state are valid! send member joined message - EBUS_DBG_EVENT(Debug::SessionDrillerBus, OnMemberJoined, this, member); EBUS_EVENT_ID(GetGridMate(), SessionEventBus, OnMemberJoined, this, member); } else @@ -1221,7 +1219,6 @@ GridSession::OnDriverError(Carrier* carrier, ConnectionID id, const DriverError& } uintptr_t idInt = reinterpret_cast(static_cast(id)); AZStd::string errorMsg = AZStd::string::format("Carrier driver error ConnectionID: %" PRIuPTR "ErrorCode: 0x%08x", idInt, error.m_errorCode); - EBUS_DBG_EVENT(Debug::SessionDrillerBus, OnSessionError, this, errorMsg); EBUS_EVENT_ID(m_gridMate, SessionEventBus, OnSessionError, this, errorMsg); if (id != InvalidConnectionID) @@ -1249,7 +1246,6 @@ GridSession::OnSecurityError(Carrier* carrier, ConnectionID id, const SecurityEr } uintptr_t idInt = reinterpret_cast(static_cast(id)); AZStd::string errorMsg = AZStd::string::format("Carrier security error ConnectionID: %" PRIuPTR " ErrorCode: 0x%08x", idInt, error.m_errorCode); - EBUS_DBG_EVENT(Debug::SessionDrillerBus, OnSessionError, this, errorMsg); } //========================================================================= @@ -1276,7 +1272,6 @@ GridSession::ElectNewHost() // AZ_Assert(m_sm.IsInState(SS_HOST_MIGRATE_ELECTION),"We should be in host migrate election state to call this function!"); GridMember* newHost = nullptr; // Allow the user to choose - EBUS_DBG_EVENT(Debug::SessionDrillerBus, OnMigrationElectHost, this, newHost); EBUS_EVENT_ID(m_gridMate, SessionEventBus, OnMigrationElectHost, this, newHost); if (newHost == nullptr || newHost->GetConnectionId() == InvalidConnectionID || newHost->IsHost()) @@ -1497,7 +1492,6 @@ GridSession::OnStateJoin(HSM& sm, const HSM::Event& e) { case SE_JOINED: { - EBUS_DBG_EVENT(Debug::SessionDrillerBus, OnSessionJoined, this); EBUS_EVENT_ID(m_gridMate, SessionEventBus, OnSessionJoined, this); sm.Transition(SS_IDLE); } return true; @@ -1591,7 +1585,6 @@ GridSession::OnStateCreate(HSM& sm, const HSM::Event& e) } sm.Transition(SS_IDLE); - EBUS_DBG_EVENT(Debug::SessionDrillerBus, OnSessionCreated, this); EBUS_EVENT_ID(m_gridMate, SessionEventBus, OnSessionCreated, this); EBUS_EVENT_ID(m_gridMate, SessionEventBus, OnSessionHosted, this); } @@ -1616,7 +1609,6 @@ GridSession::OnStateCreate(HSM& sm, const HSM::Event& e) m_carrier->Connect(m_hostAddress); - EBUS_DBG_EVENT(Debug::SessionDrillerBus, OnSessionCreated, this); EBUS_EVENT_ID(m_gridMate, SessionEventBus, OnSessionCreated, this); } @@ -1639,7 +1631,6 @@ GridSession::OnStateStart(HSM& sm, const HSM::Event& e) { case HSM::EnterEventId: { - EBUS_DBG_EVENT(Debug::SessionDrillerBus, OnSessionStart, this); EBUS_EVENT_ID(m_gridMate, SessionEventBus, OnSessionStart, this); } return true; } @@ -1660,7 +1651,6 @@ GridSession::OnStateEnd(HSM& sm, const HSM::Event& e) { case HSM::EnterEventId: { - EBUS_DBG_EVENT(Debug::SessionDrillerBus, OnSessionEnd, this); EBUS_EVENT_ID(m_gridMate, SessionEventBus, OnSessionEnd, this); } return true; } @@ -1710,7 +1700,6 @@ GridSession::OnStateHostMigrateElection(AZ::HSM& sm, const AZ::HSM::Event& e) m_hostMigrationInProcess = true; m_handshake->SetHostMigration(true); - EBUS_DBG_EVENT(Debug::SessionDrillerBus, OnMigrationStart, this); EBUS_EVENT_ID(m_gridMate, SessionEventBus, OnMigrationStart, this); m_hostMigrationTimeOut = m_state ? m_state->m_hostMigrationTimeout.Get() : 0; @@ -1890,7 +1879,6 @@ GridSession::OnStateHostMigrateSession(AZ::HSM& sm, const AZ::HSM::Event& e) GridMember* host = GetHost(); - EBUS_DBG_EVENT(Debug::SessionDrillerBus, OnMigrationEnd, this, host); EBUS_EVENT_ID(m_gridMate, SessionEventBus, OnMigrationEnd, this, host); m_myMember->m_clientState->m_newHostVote.Set(0); @@ -2004,7 +1992,6 @@ GridMember::OnReplicaActivate(const ReplicaContext& rc) rc.m_rm->AddPrimary(m_clientState->GetReplica()); // Both member and client state are valid! send member joined message - EBUS_DBG_EVENT(Debug::SessionDrillerBus, OnMemberJoined, m_session, this); EBUS_EVENT_ID(m_session->GetGridMate(), SessionEventBus, OnMemberJoined, m_session, this); } } @@ -2021,7 +2008,6 @@ GridMember::OnReplicaDeactivate(const ReplicaContext& rc) if (m_clientState) { // We are deleting the member so send leave message (we are always keeping member <-> state together). - EBUS_DBG_EVENT(Debug::SessionDrillerBus, OnMemberLeaving, m_session, this); EBUS_EVENT_ID(m_session->GetGridMate(), SessionEventBus, OnMemberLeaving, m_session, this); m_clientState->m_member = nullptr; @@ -2072,7 +2058,6 @@ GridMember::OnKick(AZ::u8 reason, const RpcContext& rc) // 2 Kick messages in quick succession can cause this to crash otherwise. if (m_session && m_session->GetHost() && rc.m_sourcePeer == m_session->GetHost()->GetIdCompact()) //Only the host can kick { - EBUS_DBG_EVENT(Debug::SessionDrillerBus, OnMemberKicked, m_session, this); EBUS_EVENT_ID(m_session->GetGridMate(), SessionEventBus, OnMemberKicked, m_session, this, reason); if (IsLocal()) @@ -2325,7 +2310,6 @@ GridMemberStateReplica::OnReplicaDeactivate(const ReplicaContext& rc) if (m_member) { // client state is gone send leave message - EBUS_DBG_EVENT(Debug::SessionDrillerBus, OnMemberLeaving, m_member->m_session, m_member); EBUS_EVENT_ID(m_member->GetSession()->GetGridMate(), SessionEventBus, OnMemberLeaving, m_member->m_session, m_member); m_member->m_clientState = nullptr; @@ -2519,7 +2503,6 @@ SessionService::Update() it = m_activeSearches.erase(it); m_completedSearches.push_back(search); - EBUS_DBG_EVENT(Debug::SessionDrillerBus, OnGridSearchComplete, search); EBUS_EVENT_ID(m_gridMate, SessionEventBus, OnGridSearchComplete, search); } else diff --git a/Code/Framework/GridMate/GridMate/Session/Session.h b/Code/Framework/GridMate/GridMate/Session/Session.h index e075a0aa48..4ab978a713 100644 --- a/Code/Framework/GridMate/GridMate/Session/Session.h +++ b/Code/Framework/GridMate/GridMate/Session/Session.h @@ -28,10 +28,6 @@ namespace GridMate extern const EndianType kSessionEndian; - namespace Debug { - class SessionDriller; - } - typedef AZ::u32 MemberIDCompact; /** * MemberID interface class. @@ -403,7 +399,6 @@ namespace GridMate friend class Internal::GridSessionReplica; friend class Internal::GridMemberStateReplica; friend class SessionService; - friend class Debug::SessionDriller; public: enum CarrierChannels { @@ -742,7 +737,6 @@ namespace GridMate : public GridMateService { friend class GridSession; - friend class Debug::SessionDriller; friend class GridSearch; public: typedef vector SessionArrayType; @@ -936,62 +930,6 @@ namespace GridMate }; } - namespace Debug - { - /** - * Session driller events, - * this events are in addition to the session event bus - */ - class SessionDrillerEvents - : public AZ::Debug::DrillerEBusTraits - { - public: - virtual ~SessionDrillerEvents() {} - - /// Callback that is called when the Session service is ready to process sessions. - virtual void OnSessionServiceReady() {} - - //virtual OnCommucationChanged() = 0 Callback that notifies the title when a member's communication settings change. - - /// Callback when we start a grid search. - virtual void OnGridSearchStart(GridSearch* gridSearch) { (void)gridSearch; } - /// Callback that notifies the title when a game search query have completed. - virtual void OnGridSearchComplete(GridSearch* gridSearch) { (void)gridSearch; } - /// Callback when we release (delete) a grid search. It's not safe to hold the grid pointer after this. - virtual void OnGridSearchRelease(GridSearch* gridSearch) { (void)gridSearch; } - - /// Callback that notifies the title when a new member joins the game session. - virtual void OnMemberJoined(GridSession* session, GridMember* member) { (void)session; (void)member; } - /// Callback that notifies the title that a member is leaving the game session. member pointer is NOT valid after the callback returns. - virtual void OnMemberLeaving(GridSession* session, GridMember* member) { (void)session; (void)member; } - // \todo a better way will be (after we solve migration) is to supply a reason to OnMemberLeaving... like the member was kicked. - // this will require that we actually remove the replica at the same moment. - /// Callback that host decided to kick a member. You will receive a OnMemberLeaving when the actual member leaves the session. - virtual void OnMemberKicked(GridSession* session, GridMember* member) { (void)session; (void)member; } - /// After this callback it is safe to access session features. If host session is fully operational if client wait for OnSessionJoined. - virtual void OnSessionCreated(GridSession* session) { (void)session; } - /// Called on client machines to indicate that we join successfully. - virtual void OnSessionJoined(GridSession* session) { (void)session; } - /// Callback that notifies the title when a session will be left. session pointer is NOT valid after the callback returns. - virtual void OnSessionDelete(GridSession* session) { (void)session; } - /// Called when a session error occurs. - virtual void OnSessionError(GridSession* session, const AZStd::string& errorMsg) { (void)session; (void)errorMsg; } - /// Called when the actual game(match) starts - virtual void OnSessionStart(GridSession* session) { (void)session; } - /// Called when the actual game(match) ends - virtual void OnSessionEnd(GridSession* session) { (void)session; } - /// Called when we start a host migration. - virtual void OnMigrationStart(GridSession* session) { (void)session; } - /// Called so the user can select a member that should be the new Host. Value will be ignored if NULL, current host or the member has invalid connection id. - virtual void OnMigrationElectHost(GridSession* session, GridMember*& newHost) { (void)session; (void)newHost; } - /// Called when the host migration has completed. - virtual void OnMigrationEnd(GridSession* session, GridMember* newHost) { (void)session; (void)newHost; } - /// Called when we have our last chance to write statistics data for member in the session. - virtual void OnWriteStatistics(GridSession* session, GridMember* member, StatisticsData& data) { (void)session; (void)member; (void)data; } - }; - - typedef AZ::EBus SessionDrillerBus; - } } // namespace GridMate #endif // GM_SESSION_H diff --git a/Code/Framework/GridMate/GridMate/gridmate_files.cmake b/Code/Framework/GridMate/GridMate/gridmate_files.cmake index e318a8adcd..99dc4257f6 100644 --- a/Code/Framework/GridMate/GridMate/gridmate_files.cmake +++ b/Code/Framework/GridMate/GridMate/gridmate_files.cmake @@ -45,12 +45,6 @@ set(FILES Containers/unordered_map.h Containers/unordered_set.h Containers/vector.h - Drillers/CarrierDriller.cpp - Drillers/CarrierDriller.h - Drillers/ReplicaDriller.cpp - Drillers/ReplicaDriller.h - Drillers/SessionDriller.cpp - Drillers/SessionDriller.h Online/OnlineUtilityThread.h Online/UserServiceTypes.h Replica/BasicHostChunkDescriptor.h @@ -71,7 +65,6 @@ set(FILES Replica/ReplicaChunkInterface.h Replica/ReplicaCommon.h Replica/ReplicaDefs.h - Replica/ReplicaDrillerEvents.h Replica/ReplicaFunctions.h Replica/ReplicaFunctions.inl Replica/ReplicaInline.inl diff --git a/Code/Framework/GridMate/Tests/Replica.cpp b/Code/Framework/GridMate/Tests/Replica.cpp index 5fef135347..4e569f525a 100644 --- a/Code/Framework/GridMate/Tests/Replica.cpp +++ b/Code/Framework/GridMate/Tests/Replica.cpp @@ -1399,2553 +1399,8 @@ public: } }; -//----------------------------------------------------------------------------- -//----------------------------------------------------------------------------- -class MPSession - : public CarrierEventBus::Handler -{ -public: - ReplicaManager& GetReplicaMgr() { return m_rm; } - void SetTransport(Carrier* transport) { m_pTransport = transport; CarrierEventBus::Handler::BusConnect(transport->GetGridMate()); } - Carrier* GetTransport() { return m_pTransport; } - void SetClient(bool isClient) { m_client = isClient; } - void AcceptConn(bool accept) { m_acceptConn = accept; } - - ~MPSession() - { - CarrierEventBus::Handler::BusDisconnect(); - } - - void Update() - { - char buf[1500]; - for (ConnectionSet::iterator iConn = m_connections.begin(); iConn != m_connections.end(); ++iConn) - { - ConnectionID conn = *iConn; - Carrier::ReceiveResult result = m_pTransport->Receive(buf, 1500, conn, GM_REPLICA_TEST_SESSION_CHANNEL); - if (result.m_state == Carrier::ReceiveResult::RECEIVED) - { - if (strcmp(buf, "IM_A_CLIENT") == 0) - { - m_rm.AddPeer(conn, Mode_Client); - } - else if (strcmp(buf, "IM_A_PEER") == 0) - { - m_rm.AddPeer(conn, Mode_Peer); - } - } - } - } - - template - typename T::Ptr GetChunkFromReplica(ReplicaId id) - { - ReplicaPtr replica = GetReplicaMgr().FindReplica(id); - if (!replica) - { - return nullptr; - } - return replica->FindReplicaChunk(); - } - - ////////////////////////////////////////////////////////////////////////// - // CarrierEventBus - void OnConnectionEstablished(Carrier* carrier, ConnectionID id) override - { - if (carrier != m_pTransport) - { - return; // not for us - } - m_connections.insert(id); - if (m_client) - { - m_pTransport->Send("IM_A_CLIENT", 12, id, Carrier::SEND_RELIABLE, Carrier::PRIORITY_NORMAL, GM_REPLICA_TEST_SESSION_CHANNEL); - } - else - { - m_pTransport->Send("IM_A_PEER", 10, id, Carrier::SEND_RELIABLE, Carrier::PRIORITY_NORMAL, GM_REPLICA_TEST_SESSION_CHANNEL); - } - } - - void OnDisconnect(Carrier* carrier, ConnectionID id, CarrierDisconnectReason /*reason*/) override - { - if (carrier != m_pTransport) - { - return; // not for us - } - m_rm.RemovePeer(id); - m_connections.erase(id); - } - - void OnDriverError(Carrier* carrier, ConnectionID id, const DriverError& error) override - { - (void)error; - if (carrier != m_pTransport) - { - return; // not for us - } - m_pTransport->Disconnect(id); - } - - void OnSecurityError(Carrier* carrier, ConnectionID id, const SecurityError& error) override - { - (void)carrier; - (void)id; - (void)error; - //Ignore security warnings in unit tests - } - ////////////////////////////////////////////////////////////////////////// - - ReplicaManager m_rm; - Carrier* m_pTransport; - typedef unordered_set ConnectionSet; - ConnectionSet m_connections; - bool m_client; - bool m_acceptConn; -}; - -//----------------------------------------------------------------------------- -//----------------------------------------------------------------------------- -class MyObj -{ -public: - GM_CLASS_ALLOCATOR(MyObj); - MyObj() - : m_f1(0.f) - , m_b1(false) - , m_i1(0) {} - - float m_f1; - bool m_b1; - int m_i1; -}; - -//----------------------------------------------------------------------------- -class MyCtorContext - : public CtorContextBase -{ -public: - CtorDataSet m_f; - - MyCtorContext() - : m_f(Float16Marshaler(0.f, 1.f)) - {} -}; - -//----------------------------------------------------------------------------- -class MigratableReplica - : public ReplicaChunk -{ -public: - class Descriptor - : public ReplicaChunkDescriptor - { - public: - Descriptor() - : ReplicaChunkDescriptor(MigratableReplica::GetChunkName(), sizeof(MigratableReplica)) - { - } - - ReplicaChunkBase* CreateFromStream(UnmarshalContext& mc) override - { - MyCtorContext cc; - cc.Unmarshal(*mc.m_iBuf); - - // Important hooks. Pre/Post construct allows us to detect all datasets. - if (mc.m_rm->GetUserContext(12345)) - { - AZ_TracePrintf("GridMate", "Create with UserData:%p\n", mc.m_rm->GetUserContext(12345)); - } - ReplicaChunk* chunk = aznew MigratableReplica; - return chunk; - } - - void DiscardCtorStream(UnmarshalContext& mc) override - { - MyCtorContext cc; - cc.Unmarshal(*mc.m_iBuf); - } - - void DeleteReplicaChunk(ReplicaChunkBase* chunkInstance) override { delete chunkInstance; } - - void MarshalCtorData(ReplicaChunkBase*, WriteBuffer& wb) override - { - MyCtorContext cc; - cc.m_f.Set(0.5f); - cc.Marshal(wb); - } - }; - - class MigratableReplicaDebugMsgs - : public AZ::Debug::DrillerEBusTraits - { - public: - typedef AZ::EBus EBus; - - virtual void OnNewOwner(ReplicaId repId, ReplicaManager* repMgr) = 0; - }; - - typedef AZStd::intrusive_ptr Ptr; - - GM_CLASS_ALLOCATOR(MigratableReplica); - static const char* GetChunkName() {return "MigratableReplica"; } - - MigratableReplica(MyObj* pObj = nullptr) - : MyHandler123Rpc("MyHandler123Rpc") - , m_data1("Data1") - , m_data2("Data2") - , m_data3("Data3", 3.0f, Float16Marshaler(0.0f, 10.0f)) - , m_data4("Data4") - - { - Bind(pObj); - } - - bool IsReplicaMigratable() override - { - return true; - } - - bool MyHandler123(const float& f, const RpcContext& rc) - { - (void)f; - (void)rc; - AZ_TracePrintf("GridMate", "Executed MyHandler123 requested at %u with %g on %s at %u.\n", rc.m_timestamp, f, GetReplica()->IsPrimary() ? "Primary" : "Proxy", rc.m_realTime); - return true; - } - - Rpc >::BindInterface MyHandler123Rpc; - - void UpdateChunk(const ReplicaContext& rc) override - { - if (m_pLocalObj) - { - m_data1.Set(m_pLocalObj->m_f1); - m_data1Interpolated.AddSample(m_pLocalObj->m_f1, rc.m_localTime); - - m_data2.Set(m_pLocalObj->m_i1); - m_data3.Set(m_pLocalObj->m_f1); - } - AZStd::bitset<25> bits = m_data4.Get(); - m_data4.Set(bits.flip()); - } - - void UpdateFromChunk(const ReplicaContext& rc) override - { - // AZ_TracePrintf("GridMate", "Updating proxy 0x%x on peer %d coming from peer %d %s\n", GetRepId(), rc.rm->GetLocalPeerId(), rc.myPeer->GetId(), rc.myPeer->GetConnectionId() == InvalidConnectionID ? "(orphan)" : ""); - if (m_pLocalObj) - { - m_data1Interpolated.AddSample(m_data1.Get(), m_data1.GetLastUpdateTime()); - m_pLocalObj->m_f1 = m_data1Interpolated.GetInterpolatedValue(rc.m_localTime); - - m_pLocalObj->m_i1 = m_data2.Get(); - } - m_dummy = m_data3.Get(); - } - - void OnReplicaActivate(const ReplicaContext& rc) override - { - (void)rc; - if (rc.m_rm->GetUserContext(12345)) - { - AZ_TracePrintf("GridMate", "Activate %s with UserData:%p\n", GetReplica()->IsPrimary() ? "primary" : "proxy", rc.m_rm->GetUserContext(12345)); - } - if (IsProxy()) - { - Bind(aznew MyObj()); - } - - if (IsPrimary()) - { - EBUS_EVENT(MigratableReplicaDebugMsgs::EBus, OnNewOwner, GetReplicaId(), rc.m_rm); - } - } - - void OnReplicaDeactivate(const ReplicaContext& rc) override - { - (void)rc; - if (m_pLocalObj) - { - delete m_pLocalObj; - m_pLocalObj = NULL; - } - } - - void OnReplicaChangeOwnership(const ReplicaContext& rc) override - { - (void)rc; - AZ_TracePrintf("GridMate", "Migratable replica 0x%x became %s on Peer %d\n", (int) GetReplicaId(), IsPrimary() ? "primary" : "proxy", (int) rc.m_rm->GetLocalPeerId()); - - if (IsPrimary()) - { - EBUS_EVENT(MigratableReplicaDebugMsgs::EBus, OnNewOwner, GetReplicaId(), rc.m_rm); - } - } - - void Bind(MyObj* pObj) - { - m_pLocalObj = pObj; - } -private: - DataSet m_data1; - LinearInterpExtrap m_data1Interpolated; - - DataSet m_data2; - DataSet m_data3; - DataSet > m_data4; - - MyObj* m_pLocalObj; - float m_dummy; -}; -//----------------------------------------------------------------------------- - -//----------------------------------------------------------------------------- -//----------------------------------------------------------------------------- -class NonMigratableReplica - : public ReplicaChunk -{ -public: - enum EBla : AZ::u8 - { - e_Bla0, - e_Bla1, - }; - typedef vector IntVectorType; - bool m_unreliableCheck; -protected: - MyObj* m_pLocalObj; - int m_prevUnreliableValue; - - bool MyHandler123(const float& f, const RpcContext& rc) - { - (void)f; - (void)rc; - AZ_TracePrintf("GridMate", "Executed MyHandler123 requested at %u with %g on %s at %u.\n", rc.m_timestamp, f, IsPrimary() ? "Primary" : "Proxy", rc.m_realTime); - return true; - } - bool MyHandler2(const float& f, int p2, const RpcContext& rc) - { - (void)f; - (void)p2; - (void)rc; - AZ_TracePrintf("GridMate", "Executed MyHandler2 requested at %u with %g,%d on %s at %u.\n", rc.m_timestamp, f, p2, IsPrimary() ? "Primary" : "Proxy", rc.m_realTime); - return true; - } - bool MyHandler3(const float& f, int p2, EBla p3, const RpcContext& rc) - { - (void)f; - (void)p2; - (void)p3; - (void)rc; - AZ_TracePrintf("GridMate", "Executed MyHandler3 requested at %u with %g,%d,%d on %s at %u.\n", rc.m_timestamp, f, p2, p3, IsPrimary() ? "Primary" : "Proxy", rc.m_realTime); - return true; - } - bool MyHandler4(const float& f, int p2, EBla p3, const IntVectorType& p4, const RpcContext& rc) - { - (void)f; - (void)p2; - (void)p3; - (void)p4; - (void)rc; - AZ_TracePrintf("GridMate", "Executed MyHandler4 requested at %u with %g,%d,%d,%d,%d on %s at %u.\n", rc.m_timestamp, f, p2, p3, p4[0], p4[1], IsPrimary() ? "Primary" : "Proxy", rc.m_realTime); - return true; - } - bool MyHandlerUnreliable(const int& i, const RpcContext& rc) - { - (void)rc; - AZ_TracePrintf("GridMate", "Executed MyHandlerUnreliable requested at %u with %d on %s at %u.\n", rc.m_timestamp, i, IsPrimary() ? "Primary" : "Proxy", rc.m_realTime); - AZ_TEST_ASSERT(i > m_prevUnreliableValue); - if ((i - m_prevUnreliableValue) > 1) - { - m_unreliableCheck = true; - } - m_prevUnreliableValue = i; - return true; - } -public: - GM_CLASS_ALLOCATOR(NonMigratableReplica); - typedef AZStd::intrusive_ptr Ptr; - static const char* GetChunkName() { return "NonMigratableReplica"; } - - Rpc >::BindInterface MyHandler123Rpc; - Rpc, RpcArg >::BindInterface MyHandler2Rpc; - Rpc, RpcArg, RpcArg >::BindInterface MyHandler3Rpc; - Rpc, RpcArg, RpcArg, RpcArg >::BindInterface MyHandler4Rpc; - - Rpc >::BindInterface MyHandlerUnreliableRpc; - - NonMigratableReplica(MyObj* pObj = NULL) - : m_unreliableCheck(false) - , m_prevUnreliableValue(0) - , MyHandler123Rpc("MyHandler123Rpc") - , MyHandler2Rpc("MyHandler2Rpc") - , MyHandler3Rpc("MyHandler3Rpc") - , MyHandler4Rpc("MyHandler4Rpc") - , MyHandlerUnreliableRpc("MyHandlerUnreliableRpc") - , m_data1("Data1") - , m_data2("Data2") - { - Bind(pObj); - } - - bool IsReplicaMigratable() override - { - return false; - } - - ~NonMigratableReplica() - { - AZ_Assert(!m_pLocalObj, "Local object should be cleared"); - } - - void UpdateChunk(const ReplicaContext& rc) override - { - m_data1.Set(m_pLocalObj->m_f1); - m_data1Interpolated.AddSample(m_pLocalObj->m_f1, rc.m_localTime); - - m_data2.Set(m_pLocalObj->m_i1); - } - - void UpdateFromChunk(const ReplicaContext& rc) override - { - m_data1Interpolated.AddSample(m_data1.Get(), m_data1.GetLastUpdateTime()); - m_pLocalObj->m_f1 = m_data1Interpolated.GetInterpolatedValue(rc.m_localTime); - - m_pLocalObj->m_i1 = m_data2.Get(); - } - - void OnReplicaActivate(const ReplicaContext& rc) override - { - (void)rc; - if (rc.m_rm->GetUserContext(12345)) - { - AZ_TracePrintf("GridMate", "Activate %s with UserData:%p\n", IsPrimary() ? "primary" : "proxy", rc.m_rm->GetUserContext(12345)); - } - if (IsProxy()) - { - Bind(aznew MyObj()); - } - } - - void OnReplicaDeactivate(const ReplicaContext& rc) override - { - (void)rc; - if (m_pLocalObj) - { - delete m_pLocalObj; - m_pLocalObj = NULL; - } - } - - void OnReplicaChangeOwnership(const ReplicaContext& rc) override - { - (void)rc; - AZ_TracePrintf("GridMate", "NonMigratable replica 0x%x became %s on Peer %d\n", (int) GetReplicaId(), IsPrimary() ? "primary" : "proxy", (int) rc.m_rm->GetLocalPeerId()); - } - - void Bind(MyObj* pObj) - { - m_pLocalObj = pObj; - } - -protected: - DataSet m_data1; - LinearInterpExtrap m_data1Interpolated; - - DataSet m_data2; -}; -//----------------------------------------------------------------------------- - -//----------------------------------------------------------------------------- -//----------------------------------------------------------------------------- -class MyDerivedReplica - : public NonMigratableReplica -{ -public: - GM_CLASS_ALLOCATOR(MyDerivedReplica); - - MyDerivedReplica() - : m_data3("Data3") { } - - typedef AZStd::intrusive_ptr Ptr; - static const char* GetChunkName() { return "MyDerivedReplica"; } - - virtual void UpdateChunk(const ReplicaContext& rc) override - { - NonMigratableReplica::UpdateChunk(rc); - m_data3.Set(m_pLocalObj->m_b1); - } - - virtual void UpdateFromChunk(const ReplicaContext& rc) override - { - NonMigratableReplica::UpdateFromChunk(rc); - m_pLocalObj->m_b1 = m_data3.Get(); - } - -protected: - DataSet m_data3; -}; -//----------------------------------------------------------------------------- - -class ReplicaGMTest - : public UnitTest::GridMateMPTestFixture - , public ::testing::Test -{}; - -TEST_F(ReplicaGMTest, DISABLED_ReplicaTest) - { - ReplicaChunkDescriptorTable::Get().RegisterChunkType(); - ReplicaChunkDescriptorTable::Get().RegisterChunkType(); - ReplicaChunkDescriptorTable::Get().RegisterChunkType(); - - AZ_TracePrintf("GridMate", "\n"); - enum - { - s1, - s2, - s3, - nSessions - }; - const int k_delay = 100; - - // Setting up simulator with outgoing packet loss - DefaultSimulator clientSimulator; - clientSimulator.SetOutgoingPacketLoss(1, 1); - - MPSession sessions[nSessions]; - - MyObj* s1obj1 = NULL, * s1obj2 = NULL, * s2obj1 = NULL, * s3obj1 = NULL; - MigratableReplica::Ptr s1rep1, s3rep1; - NonMigratableReplica::Ptr s1rep2; - MyDerivedReplica::Ptr s2rep1; - ReplicaId s1rep1id = 0, s1rep2id = 0, s2rep1id = 0, s3rep1id = 0; - - // initialize transport - int basePort = 4427; - for (int i = 0; i < nSessions; ++i) - { - TestCarrierDesc desc; - desc.m_port = basePort + i; - desc.m_enableDisconnectDetection = false; - if (i == s2) - { - desc.m_simulator = &clientSimulator; - } - - // initialize replica managers - // s2(p)<-->(p)s1(p)<-->(c)s3 - sessions[i].SetTransport(DefaultCarrier::Create(desc, m_gridMate)); - sessions[i].AcceptConn(true); - sessions[i].SetClient(i == s3); - sessions[i].GetReplicaMgr().Init(ReplicaMgrDesc(i + 1, sessions[i].GetTransport(), 0, i == 0 ? ReplicaMgrDesc::Role_SyncHost : 0)); - sessions[i].GetReplicaMgr().RegisterUserContext(12345, reinterpret_cast(static_cast(i + 1))); - } - sessions[0].GetReplicaMgr().SetLocalLagAmt(50); - - // put something on s1 to get it going - auto rep = Replica::CreateReplica(nullptr); - s1rep1 = CreateAndAttachReplicaChunk(rep); - s1rep1id = sessions[s1].GetReplicaMgr().AddPrimary(rep); - s1rep1->Bind(s1obj1 = aznew MyObj()); - - // connect s2 to s1 - sessions[s2].GetTransport()->Connect("127.0.0.1", basePort); - - // main test loop - static bool keepRunning = true; - int tick = 0; - while (keepRunning) - { - // perform some random actions on a timeline - switch (tick) - { - case 5: - { - // connect s3 to s1 - sessions[s3].GetTransport()->Connect("127.0.0.1", basePort); - break; - } - case 25: - // remove s1rep1 - AZ_TEST_ASSERT(s1rep1id); - s1rep1->GetReplica()->Destroy(); - s1obj1 = NULL; - break; - case 35: - //AZ_TracePrintf("GridMate", "No more updates.\n"); - break; - case 70: - //AZ_TracePrintf("GridMate", "Restart updates.\n"); - break; - case 90: - keepRunning = false; - } - - // add an object on s2 - if (sessions[s2].GetReplicaMgr().IsReady()) - { - if (!s2rep1id) - { - auto newReplica = Replica::CreateReplica(nullptr); - s2rep1 = CreateAndAttachReplicaChunk(newReplica); - s2rep1id = sessions[s2].GetReplicaMgr().AddPrimary(newReplica); - s2rep1->Bind(s2obj1 = aznew MyObj()); - } - else - { - static bool sends2rep1rpc = true; - if (sends2rep1rpc && tick >= 20) - { - s2rep1->MyHandler123Rpc(5.f); - s2rep1->MyHandler2Rpc(6.0f, 1); - s2rep1->MyHandler3Rpc(7.0f, 2, NonMigratableReplica::e_Bla0); - NonMigratableReplica::IntVectorType v; - v.push_back(10); - v.push_back(13); - s2rep1->MyHandler4Rpc(8.0f, 3, NonMigratableReplica::e_Bla1, v); - sends2rep1rpc = false; - } - } - } - - // add object on s1 - if (sessions[s1].GetReplicaMgr().IsReady()) - { - if (!s1rep2) - { - auto newReplica = Replica::CreateReplica(nullptr); - s1rep2 = CreateAndAttachReplicaChunk(newReplica); - s1rep2id = sessions[s1].GetReplicaMgr().AddPrimary(newReplica); - s1rep2->Bind(s1obj2 = aznew MyObj); - } - else - { - if (s1rep2id && tick >= 40) - { - s1rep2->GetReplica()->Destroy(); - s1obj2 = NULL; - s1rep2id = 0; - } - } - } - - // add object on s3 - if (sessions[s3].GetReplicaMgr().IsReady()) - { - if (!s3rep1) - { - auto newReplica = Replica::CreateReplica(nullptr); - s3rep1 = CreateAndAttachReplicaChunk(newReplica); - s3rep1id = sessions[s3].GetReplicaMgr().AddPrimary(newReplica); - s3rep1->Bind(s3obj1 = aznew MyObj()); - } - else - { - if (s3rep1id && tick >= 45) - { - s3rep1->MyHandler123Rpc(-1.f); - s3rep1->GetReplica()->Destroy(); - s3obj1 = NULL; - s3rep1id = 0; - } - } - } - - { // Testing unreliable rpcs: enabling network simulator with outgoing packetloss, - // calling 10 rpcs with 1..10 int argument, checking if replicas got rpcs in an order, and have missing calls - static bool requestrpc = true; - if (s3rep1id && requestrpc) - { - if (ReplicaPtr pObj = sessions[s2].GetReplicaMgr().FindReplica(s3rep1id)) - { - pObj->FindReplicaChunk()->MyHandler123Rpc(2.0f); - requestrpc = false; - } - } - - static bool unreliableRequest = true; - static int numUnreliableRequests = 0; - if (sessions[s2].GetReplicaMgr().IsReady() && s2rep1 && tick > 15 && unreliableRequest) - { - // Starting packet loss - unreliableRequest = false; - } - - if (!unreliableRequest && numUnreliableRequests < 10) - { - if (numUnreliableRequests == 4) - { - clientSimulator.Enable(); - } - else if (numUnreliableRequests == 5) - { - clientSimulator.Disable(); - } - s2rep1->MyHandlerUnreliableRpc(++numUnreliableRequests); - } - - static bool checkUnreliableDelivery = true; - if (checkUnreliableDelivery && tick >= 25) - { - // Stopping packet loss - ReplicaPtr rep1 = sessions[s1].GetReplicaMgr().FindReplica(s2rep1->GetReplicaId()); - ReplicaPtr rep3 = sessions[s3].GetReplicaMgr().FindReplica(s2rep1->GetReplicaId()); - AZ_TEST_ASSERT(rep1); - AZ_TEST_ASSERT(rep3); - AZ_TEST_ASSERT(rep1->FindReplicaChunk()->m_unreliableCheck); - AZ_TEST_ASSERT(rep3->FindReplicaChunk()->m_unreliableCheck); - checkUnreliableDelivery = false; - } - } - - // modify local objects - if (tick < 20 || tick > 70) - { - if (s1obj1) - { - s1obj1->m_f1 += 0.5f; - s1obj1->m_i1 += 1; - s1obj1->m_b1 = !s1obj1->m_b1; - } - if (s1obj2) - { - s1obj2->m_f1 += 1.0f; - s1obj2->m_i1 -= 1; - s1obj2->m_b1 = !s1obj2->m_b1; - } - if (s2obj1) - { - s2obj1->m_f1 += 0.1f; - s2obj1->m_i1 += 2; - s2obj1->m_b1 = !s2obj1->m_b1; - } - if (s3obj1) - { - s3obj1->m_f1 += 0.3f; - s3obj1->m_i1 += 3; - s3obj1->m_b1 = !s3obj1->m_b1; - } - } - ++tick; - // tick everything - for (int i = 0; i < nSessions; ++i) - { - sessions[i].Update(); - sessions[i].GetReplicaMgr().Unmarshal(); - } - for (int i = 0; i < nSessions; ++i) - { - sessions[i].GetReplicaMgr().UpdateReplicas(); - } - for (int i = 0; i < nSessions; ++i) - { - sessions[i].GetReplicaMgr().UpdateFromReplicas(); - sessions[i].GetReplicaMgr().Marshal(); - } - for (int i = 0; i < nSessions; ++i) - { - sessions[i].GetTransport()->Update(); - } - AZStd::this_thread::sleep_for(AZStd::chrono::milliseconds(k_delay)); - } - - for (int i = 0; i < nSessions; ++i) - { - sessions[i].GetReplicaMgr().Shutdown(); - DefaultCarrier::Destroy(sessions[i].GetTransport()); - } - } - -class ForcedReplicaMigrationTest - : public UnitTest::GridMateMPTestFixture - , public ReplicaMgrCallbackBus::Handler - , public MigratableReplica::MigratableReplicaDebugMsgs::EBus::Handler - , public ::testing::Test -{ - void OnNewHost(bool isHost, ReplicaManager* pMgr) override - { - if (isHost) - { - AZ_TracePrintf("GridMate", "Peer %d has completed host migration and is now the host.\n", (int)pMgr->GetLocalPeerId()); - pMgr->SetSendTimeInterval(k_hostSendRateMs); - m_newHostEventOnNewHostCount++; - } - else - { - AZ_TracePrintf("GridMate", "Peer %d has has received notification that host migration is complete.\n", (int)pMgr->GetLocalPeerId()); - pMgr->SetSendTimeInterval(0); - m_newHostEventOnPeersCount++; - } - } - - void OnNewOwner(ReplicaId repId, ReplicaManager* repMgr) override - { - AZ_TracePrintf("GridMate", "Replica 0x%08x got new owner %d on frame %d.\n", repId, (int)repMgr->GetLocalPeerId(), m_frameCount); - m_replicaOwnership[repId] = repMgr; - } - -public: - ForcedReplicaMigrationTest() { ReplicaMgrCallbackBus::Handler::BusConnect(m_gridMate); } - ~ForcedReplicaMigrationTest() { ReplicaMgrCallbackBus::Handler::BusDisconnect(); } - - - enum - { - p1, p2, p3, p4, p5, nPeers - }; - - static const int k_frameTimePerNodeMs = 10; - static const int k_numFramesToRun = 300; - static const int k_hostSendRateMs = k_frameTimePerNodeMs * nPeers * 2; // limiting host send rate x2 times - - int m_frameCount; - int m_newHostEventOnNewHostCount; - int m_newHostEventOnPeersCount; - AZStd::unordered_map m_replicaOwnership; -}; - -const int ForcedReplicaMigrationTest::k_frameTimePerNodeMs; -const int ForcedReplicaMigrationTest::k_numFramesToRun; -const int ForcedReplicaMigrationTest::k_hostSendRateMs; - -TEST_F(ForcedReplicaMigrationTest, DISABLED_ForcedReplicaMigrationTest) - { - ReplicaChunkDescriptorTable::Get().RegisterChunkType(); - ReplicaChunkDescriptorTable::Get().RegisterChunkType(); - - MPSession peers[nPeers]; - MigratableReplica::Ptr migrRep[nPeers]; - NonMigratableReplica::Ptr nonMigrRep[nPeers]; - - m_newHostEventOnNewHostCount = 0; - m_newHostEventOnPeersCount = 0; - - MigratableReplica::MigratableReplicaDebugMsgs::EBus::Handler::BusConnect(); - - // initialize full-mesh P2P session - int basePort = 4427; - for (int i = 0; i < nPeers; ++i) - { - TestCarrierDesc desc; - desc.m_port = basePort + i; - desc.m_enableDisconnectDetection = /*false*/ true; - desc.m_threadUpdateTimeMS = k_frameTimePerNodeMs / 2; - - // initialize replica managers - peers[i].SetTransport(DefaultCarrier::Create(desc, m_gridMate)); - peers[i].AcceptConn(true); - peers[i].SetClient(false); - peers[i].GetReplicaMgr().Init(ReplicaMgrDesc(i + 1 - , peers[i].GetTransport() - , 0 - , i == 0 ? ReplicaMgrDesc::Role_SyncHost : 0 - , i == 0 ? k_hostSendRateMs : 0)); - } - - AZ_TracePrintf("GridMate", "\n"); - m_frameCount = 0; - while (m_frameCount < k_numFramesToRun) - { - static bool allReady = false; - // establish all connections - if (m_frameCount < nPeers) - { - for (int i = 0; i < m_frameCount; ++i) - { - peers[m_frameCount].GetTransport()->Connect("127.0.0.1", basePort + i); - } - } - - if (!allReady) - { - allReady = true; - for (int i = 0; i < nPeers; ++i) - { - if (!peers[i].GetReplicaMgr().IsReady()) - { - allReady = false; - } - } - if (allReady) - { - AZ_TracePrintf("GridMate", "All peers ready at frame %d\n", m_frameCount); - } - } - - // perform tests - if (allReady) - { - // add replicas - static bool addReplicas = true; - if (addReplicas) - { - for (int i = 0; i < nPeers; ++i) - { - { - auto rep = Replica::CreateReplica(nullptr); - migrRep[i] = CreateAndAttachReplicaChunk(rep, aznew MyObj()); - peers[i].GetReplicaMgr().AddPrimary(rep); - AZ_TEST_ASSERT(m_replicaOwnership[migrRep[i]->GetReplicaId()] == &peers[i].GetReplicaMgr()); - } - { - auto rep = Replica::CreateReplica(nullptr); - nonMigrRep[i] = CreateAndAttachReplicaChunk(rep, aznew MyObj()); - peers[i].GetReplicaMgr().AddPrimary(rep); - } - } - addReplicas = false; - AZ_TracePrintf("GridMate", "Replicas added at frame %d\n", m_frameCount); - } - - // disconnect p3 and trigger peer migration - static bool dropP3 = true; - if (m_frameCount > 50 && dropP3) - { - peers[p3].GetTransport()->Disconnect(AllConnections); - dropP3 = false; - AZ_TracePrintf("GridMate", "Dropped P3 at frame %d\n", m_frameCount); - } - - // Check that p3's MigratableReplica has migrated to p1 (host) - if (m_frameCount == 85) - { - AZ_TEST_ASSERT(m_replicaOwnership[migrRep[p3]->GetReplicaId()] == &peers[p1].GetReplicaMgr()); - } - - // disconnect p1 and trigger host loss - static bool dropP1 = true; - if (m_frameCount > 100 && dropP1) - { - peers[p1].GetTransport()->Disconnect(AllConnections); - dropP1 = false; - AZ_TracePrintf("GridMate", "Dropped P1 at frame %d\n", m_frameCount); - } - - // promote p2 to host - static bool promoteP2 = true; - if (m_frameCount > 150 && promoteP2) - { - peers[p2].GetReplicaMgr().Promote(); - promoteP2 = false; - AZ_TracePrintf("GridMate", "Promoted P2 at frame %d\n", m_frameCount); - } - } - - // tick - int tickPeer = m_frameCount++ % nPeers; - peers[tickPeer].Update(); - peers[tickPeer].GetReplicaMgr().Unmarshal(); - peers[tickPeer].GetReplicaMgr().UpdateReplicas(); - peers[tickPeer].GetReplicaMgr().UpdateFromReplicas(); - peers[tickPeer].GetReplicaMgr().Marshal(); - peers[tickPeer].GetTransport()->Update(); - AZStd::this_thread::sleep_for(AZStd::chrono::milliseconds(k_frameTimePerNodeMs)); - } - - // Check that p1's MigratableReplicas (including the one from p3) have migrated to p2 (host) - AZ_TEST_ASSERT(m_replicaOwnership[migrRep[p1]->GetReplicaId()] == &peers[p2].GetReplicaMgr()); - AZ_TEST_ASSERT(m_replicaOwnership[migrRep[p3]->GetReplicaId()] == &peers[p2].GetReplicaMgr()); - - AZ_TEST_ASSERT(m_newHostEventOnNewHostCount == 1); // New host should have received OnNewHost event - AZ_TEST_ASSERT(m_newHostEventOnPeersCount == 2); // 2 peers remaining should have received OnNewHost event - - // clean up - for (int i = 0; i < nPeers; ++i) - { - peers[i].GetReplicaMgr().Shutdown(); - DefaultCarrier::Destroy(peers[i].GetTransport()); - } - - MigratableReplica::MigratableReplicaDebugMsgs::EBus::Handler::BusDisconnect(); - } - -class ReplicaMigrationRequestTest - : public UnitTest::GridMateMPTestFixture - , public ::testing::Test -{ -public: - enum - { - Host, - Peer1, - Peer2, - Client1, - Client2, - TotalNodes - }; - - class AlwaysMigratable - : public ReplicaChunk - { - public: - GM_CLASS_ALLOCATOR(AlwaysMigratable); - typedef AZStd::intrusive_ptr Ptr; - static const char* GetChunkName() { return "AlwaysMigratable"; } - - AlwaysMigratable() - : UpdateControlValue("UpdateControlValue") - , m_requests(0) - , m_accepted(0) - , m_triggerNextTransfer(false) - , m_owner("Owner") - , m_control("Control") - { - } - - bool IsReplicaMigratable() override - { - return true; - } - - bool AcceptChangeOwnership(PeerId requestor, const ReplicaContext& rc) override - { - AZ_TracePrintf("GridMate", "Node %d accepted transfer of AlwaysMigratable 0x%x to node %d.\n", rc.m_rm->GetLocalPeerId() - 1, GetReplicaId(), requestor - 1); - m_requests++; - m_accepted++; - - if (rc.m_rm->GetLocalPeerId() - 1 == Peer2 && requestor - 1 == Host) - { - m_triggerNextTransfer = true; - } - - return true; - } - - void OnReplicaActivate(const ReplicaContext& rc) override - { - if (IsPrimary()) - { - m_owner.Set(rc.m_rm->GetLocalPeerId() - 1); - m_control.Set(rc.m_rm->GetLocalPeerId() - 1); - } - } - - void OnReplicaChangeOwnership(const ReplicaContext& rc) override - { - if (IsPrimary()) - { - AZ_TracePrintf("GridMate", "OnChangeOwnership: 0x%04x Became primary on node %d\n", GetReplicaId(), rc.m_rm->GetLocalPeerId() - 1); - m_owner.Set(rc.m_rm->GetLocalPeerId() - 1); - } - else - { - AZ_TracePrintf("GridMate", "OnChangeOwnership: 0x%04x Became proxy on node %d\n", GetReplicaId(), rc.m_rm->GetLocalPeerId() - 1); - if (m_triggerNextTransfer) - { - GetReplica()->RequestChangeOwnership(Client2 + 1); - m_triggerNextTransfer = false; - } - } - } - - bool UpdateControlValueFn(const RpcContext& rc) - { - (void)rc; - m_control.Set(GetReplicaManager()->GetLocalPeerId() - 1); - return false; - } - Rpc<>::BindInterface UpdateControlValue; - - int m_requests; - int m_accepted; - bool m_triggerNextTransfer; - - DataSet m_owner; - DataSet m_control; - }; - - class NeverMigratable - : public AlwaysMigratable - { - public: - GM_CLASS_ALLOCATOR(NeverMigratable); - typedef AZStd::intrusive_ptr Ptr; - static const char* GetChunkName() { return "NeverMigratable"; } - - NeverMigratable() - { - } - - bool IsReplicaMigratable() override - { - return false; - } - }; - - class SometimesMigratable - : public AlwaysMigratable - { - public: - GM_CLASS_ALLOCATOR(SometimesMigratable); - typedef AZStd::intrusive_ptr Ptr; - static const char* GetChunkName() { return "SometimesMigratable"; } - - SometimesMigratable() - { - m_acceptMigrationRequests = false; - } - - virtual bool AcceptChangeOwnership(PeerId requestor, const ReplicaContext& rc) override - { - (void)requestor; - (void)rc; - m_requests++; - if (m_acceptMigrationRequests) - { - AZ_TracePrintf("GridMate", "Node %d accepted transfer of SometimesMigratable 0x%x to node %d.\n", rc.m_rm->GetLocalPeerId() - 1, GetReplicaId(), requestor - 1); - m_accepted++; - return true; - } - return false; - } - - bool m_acceptMigrationRequests; - }; - - struct Node - { - MPSession m_session; - AlwaysMigratable::Ptr m_always; - NeverMigratable::Ptr m_never; - SometimesMigratable::Ptr m_sometimes; - }; - - - static const int k_frameTimePerNodeMs = 10; - static const int k_hostSendTimeMs = k_frameTimePerNodeMs * TotalNodes * 4; // limiting host send rate to be x4 times slower than tick -}; - -TEST_F(ReplicaMigrationRequestTest, DISABLED_ReplicaMigrationRequestTest) - { - /* - Topology: - P1---P2 - \ / - \ / - H - / \ - / \ - C1 C2 - - Migration pattern: - AlwaysMigratable: - P1 -> P2 - P2 -> Host -> C2 (both at same time, with C2 arriving second) - Host -> C1 - C1 -> C2 -> Host - C2 -> P1 - NeverMigratable: - P1 -> C1 (Forbidden) - C2 -> P2 (Forbidden) - SometimesMigratable: - P1 -> Host - C1 -> P1 - P2 -> C2 (Forbidden) - C2 -> Host (Forbidden) - */ - - ReplicaChunkDescriptorTable::Get().RegisterChunkType(); - ReplicaChunkDescriptorTable::Get().RegisterChunkType(); - ReplicaChunkDescriptorTable::Get().RegisterChunkType(); - - Node nodes[TotalNodes]; - int basePort = 4427; - for (int i = 0; i < TotalNodes; ++i) - { - TestCarrierDesc desc; - desc.m_port = basePort + i; - desc.m_connectionTimeoutMS = 15000; - // initialize replica managers - nodes[i].m_session.SetTransport(DefaultCarrier::Create(desc, m_gridMate)); - nodes[i].m_session.AcceptConn(true); - nodes[i].m_session.SetClient(i == Client1 || i == Client2); - nodes[i].m_session.GetReplicaMgr().Init(ReplicaMgrDesc(i + 1 - , nodes[i].m_session.GetTransport() - , 0 - , i == Host ? ReplicaMgrDesc::Role_SyncHost : 0 - , i == Host ? k_hostSendTimeMs : 0)); - } - - // Connect all the nodes - nodes[Peer1].m_session.GetTransport()->Connect("127.0.0.1", basePort + Host); - nodes[Peer2].m_session.GetTransport()->Connect("127.0.0.1", basePort + Host); - nodes[Client1].m_session.GetTransport()->Connect("127.0.0.1", basePort + Host); - nodes[Client2].m_session.GetTransport()->Connect("127.0.0.1", basePort + Host); - nodes[Peer1].m_session.GetTransport()->Connect("127.0.0.1", basePort + Peer2); - - - int framesToRun = 800; - for (int iTick = 0; iTick < framesToRun; ++iTick) - { - for (int iNode = 0; iNode < TotalNodes; ++iNode) - { - if (nodes[iNode].m_session.GetReplicaMgr().IsReady()) - { - if (nodes[iNode].m_always == nullptr) - { - { - auto rep = Replica::CreateReplica(nullptr); - nodes[iNode].m_always = CreateAndAttachReplicaChunk(rep); - nodes[iNode].m_session.GetReplicaMgr().AddPrimary(rep); - } - { - auto rep = Replica::CreateReplica(nullptr); - nodes[iNode].m_never = CreateAndAttachReplicaChunk(rep); - nodes[iNode].m_session.GetReplicaMgr().AddPrimary(rep); - } - { - auto rep = Replica::CreateReplica(nullptr); - nodes[iNode].m_sometimes = CreateAndAttachReplicaChunk(rep); - nodes[iNode].m_sometimes->m_acceptMigrationRequests = iNode == Peer1 || iNode == Client1; - nodes[iNode].m_session.GetReplicaMgr().AddPrimary(rep); - } - } - } - } - - // First round of migrations - if (iTick == 200) - { - // P1 -> P2 - ReplicaPtr aP1onP2 = nodes[Peer2].m_session.GetReplicaMgr().FindReplica(nodes[Peer1].m_always->GetReplicaId()); - AZ_TEST_ASSERT(aP1onP2); - aP1onP2->RequestChangeOwnership(); - - // P2 -> Host -> C2 (both at same time, with C2 arriving second) - ReplicaPtr aP2onH = nodes[Host].m_session.GetReplicaMgr().FindReplica(nodes[Peer2].m_always->GetReplicaId()); - AZ_TEST_ASSERT(aP2onH); - aP2onH->RequestChangeOwnership(); - - // Host -> C1 - ReplicaPtr aHonC1 = nodes[Client1].m_session.GetReplicaMgr().FindReplica(nodes[Host].m_always->GetReplicaId()); - AZ_TEST_ASSERT(aHonC1); - aHonC1->RequestChangeOwnership(); - - // C1 -> C2 -> Host (first migration) - ReplicaPtr aC1onC2 = nodes[Client2].m_session.GetReplicaMgr().FindReplica(nodes[Client1].m_always->GetReplicaId()); - AZ_TEST_ASSERT(aC1onC2); - aC1onC2->RequestChangeOwnership(); - - // C2 -> P1 - ReplicaPtr aC2onP1 = nodes[Peer1].m_session.GetReplicaMgr().FindReplica(nodes[Client2].m_always->GetReplicaId()); - AZ_TEST_ASSERT(aC2onP1); - aC2onP1->RequestChangeOwnership(); - - // P1 -> C1 (Forbidden) - ReplicaPtr nP1onC1 = nodes[Client1].m_session.GetReplicaMgr().FindReplica(nodes[Peer1].m_never->GetReplicaId()); - AZ_TEST_ASSERT(nP1onC1); - nP1onC1->RequestChangeOwnership(); - - // C2 -> P2 (Forbidden) - ReplicaPtr nC2onP2 = nodes[Peer2].m_session.GetReplicaMgr().FindReplica(nodes[Client2].m_never->GetReplicaId()); - AZ_TEST_ASSERT(nC2onP2); - nC2onP2->RequestChangeOwnership(); - - // P1 -> Host - ReplicaPtr sP1onH = nodes[Host].m_session.GetReplicaMgr().FindReplica(nodes[Peer1].m_sometimes->GetReplicaId()); - AZ_TEST_ASSERT(sP1onH); - sP1onH->RequestChangeOwnership(); - - // C1 -> P1 - ReplicaPtr sC1onP1 = nodes[Peer1].m_session.GetReplicaMgr().FindReplica(nodes[Client1].m_sometimes->GetReplicaId()); - AZ_TEST_ASSERT(sC1onP1); - sC1onP1->RequestChangeOwnership(); - - // P2 -> C2 (Forbidden) - ReplicaPtr sP2onC2 = nodes[Client2].m_session.GetReplicaMgr().FindReplica(nodes[Peer2].m_sometimes->GetReplicaId()); - AZ_TEST_ASSERT(sP2onC2); - sP2onC2->RequestChangeOwnership(); - - // C2 -> Host (Forbidden) - ReplicaPtr sC2onH = nodes[Host].m_session.GetReplicaMgr().FindReplica(nodes[Client2].m_sometimes->GetReplicaId()); - AZ_TEST_ASSERT(sC2onH); - sC2onH->RequestChangeOwnership(); - } - - // Second round of migrations - if (iTick == 400) - { - // C1 -> C2 -> Host (1st migration) - AZ_TEST_ASSERT(nodes[Client1].m_always->m_requests == 1); - AZ_TEST_ASSERT(nodes[Client1].m_always->m_accepted == 1); - AZ_TEST_ASSERT(nodes[Client1].m_always->GetReplica()->IsProxy()); - AZ_TEST_ASSERT(nodes[Client1].m_always->m_owner.Get() == Client2); - AZ_TEST_ASSERT(nodes[Client2].m_session.GetReplicaMgr().FindReplica(nodes[Client1].m_always->GetReplicaId())->IsPrimary()); - - // C1 -> C2 -> Host (2nd migration) - ReplicaPtr aHonC1 = nodes[Host].m_session.GetReplicaMgr().FindReplica(nodes[Client1].m_always->GetReplicaId()); - AZ_TEST_ASSERT(aHonC1); - aHonC1->RequestChangeOwnership(); - } - - // Send non-authoritative control RPCs - if (iTick == 600) - { - // P1 -> P2 - AlwaysMigratable::Ptr aP1onH = nodes[Host].m_session.GetChunkFromReplica(nodes[Peer1].m_always->GetReplicaId()); - aP1onH->UpdateControlValue(); - // P2 -> Host -> C2 (both at same time, with C2 arriving second) - AlwaysMigratable::Ptr aP2onC1 = nodes[Client1].m_session.GetChunkFromReplica(nodes[Peer2].m_always->GetReplicaId()); - aP2onC1->UpdateControlValue(); - // Host -> C1 - AlwaysMigratable::Ptr aHonP1 = nodes[Peer1].m_session.GetChunkFromReplica(nodes[Host].m_always->GetReplicaId()); - aHonP1->UpdateControlValue(); - // C1 -> C2 -> Host - AlwaysMigratable::Ptr aC1onP2 = nodes[Peer2].m_session.GetChunkFromReplica(nodes[Client1].m_always->GetReplicaId()); - aC1onP2->UpdateControlValue(); - // C2 -> P1 - AlwaysMigratable::Ptr aC2onP2 = nodes[Peer2].m_session.GetChunkFromReplica(nodes[Client2].m_always->GetReplicaId()); - aC2onP2->UpdateControlValue(); - // P1 -> C1 (Forbidden) - NeverMigratable::Ptr nP1onH = nodes[Host].m_session.GetChunkFromReplica(nodes[Peer1].m_never->GetReplicaId()); - nP1onH->UpdateControlValue(); - // C2 -> P2 (Forbidden) - NeverMigratable::Ptr nC2onP1 = nodes[Peer1].m_session.GetChunkFromReplica(nodes[Client2].m_never->GetReplicaId()); - nC2onP1->UpdateControlValue(); - // P1 -> Host - SometimesMigratable::Ptr sP1onH = nodes[Host].m_session.GetChunkFromReplica(nodes[Peer1].m_sometimes->GetReplicaId()); - sP1onH->UpdateControlValue(); - // C1 -> P1 - SometimesMigratable::Ptr sC1onC2 = nodes[Client2].m_session.GetChunkFromReplica(nodes[Client1].m_sometimes->GetReplicaId()); - sC1onC2->UpdateControlValue(); - // P2 -> C2 (Forbidden) - SometimesMigratable::Ptr sP2onC2 = nodes[Client2].m_session.GetChunkFromReplica(nodes[Peer2].m_sometimes->GetReplicaId()); - sP2onC2->UpdateControlValue(); - // C2 -> Host (Forbidden) - SometimesMigratable::Ptr sC2onP1 = nodes[Peer1].m_session.GetChunkFromReplica(nodes[Client2].m_sometimes->GetReplicaId()); - sC2onP1->UpdateControlValue(); - } - - // tick - int tickNode = iTick % TotalNodes; - nodes[tickNode].m_session.Update(); - nodes[tickNode].m_session.GetReplicaMgr().Unmarshal(); - nodes[tickNode].m_session.GetReplicaMgr().UpdateFromReplicas(); - nodes[tickNode].m_session.GetReplicaMgr().UpdateReplicas(); - nodes[tickNode].m_session.GetReplicaMgr().Marshal(); - nodes[tickNode].m_session.GetTransport()->Update(); - AZStd::this_thread::sleep_for(AZStd::chrono::milliseconds(k_frameTimePerNodeMs)); - } - - // P1 -> P2 - AZ_TEST_ASSERT(nodes[Peer1].m_always->m_requests == 1); - AZ_TEST_ASSERT(nodes[Peer1].m_always->m_accepted == 1); - AZ_TEST_ASSERT(nodes[Peer1].m_always->GetReplica()->IsProxy()); - AZ_TEST_ASSERT(nodes[Peer1].m_always->m_owner.Get() == Peer2); - AZ_TEST_ASSERT(nodes[Peer2].m_session.GetReplicaMgr().FindReplica(nodes[Peer1].m_always->GetReplicaId())->IsPrimary()); - AZ_TEST_ASSERT(nodes[Peer1].m_always->m_control.Get() == Peer2); - - // P2 -> Host -> C2 (both at same time, with C2 arriving second) - AZ_TEST_ASSERT(nodes[Peer2].m_always->m_requests == 1); - AZ_TEST_ASSERT(nodes[Peer2].m_always->m_accepted == 1); - AZ_TEST_ASSERT(nodes[Peer2].m_always->GetReplica()->IsProxy()); - AZ_TEST_ASSERT(nodes[Peer2].m_always->m_owner.Get() == Client2); - AlwaysMigratable::Ptr aP2onH = nodes[Host].m_session.GetChunkFromReplica(nodes[Peer2].m_always->GetReplicaId()); - AZ_TEST_ASSERT(aP2onH->m_requests == 1); - AZ_TEST_ASSERT(aP2onH->m_accepted == 1); - AZ_TEST_ASSERT(aP2onH->GetReplica()->IsProxy()); - AZ_TEST_ASSERT(aP2onH->m_owner.Get() == Client2); - AZ_TEST_ASSERT(nodes[Client2].m_session.GetReplicaMgr().FindReplica(nodes[Peer2].m_always->GetReplicaId())->IsPrimary()); - AZ_TEST_ASSERT(nodes[Peer2].m_always->m_control.Get() == Client2); - - // Host -> C1 - AZ_TEST_ASSERT(nodes[Host].m_always->m_requests == 1); - AZ_TEST_ASSERT(nodes[Host].m_always->m_accepted == 1); - AZ_TEST_ASSERT(nodes[Host].m_always->GetReplica()->IsProxy()); - AZ_TEST_ASSERT(nodes[Host].m_always->m_owner.Get() == Client1); - AZ_TEST_ASSERT(nodes[Client1].m_session.GetReplicaMgr().FindReplica(nodes[Host].m_always->GetReplicaId())->IsPrimary()); - AZ_TEST_ASSERT(nodes[Host].m_always->m_control.Get() == Client1); - - // C1 -> C2 -> Host (2nd migration) - AZ_TEST_ASSERT(nodes[Client1].m_always->m_requests == 1); - AZ_TEST_ASSERT(nodes[Client1].m_always->m_accepted == 1); - AZ_TEST_ASSERT(nodes[Client1].m_always->GetReplica()->IsProxy()); - AZ_TEST_ASSERT(nodes[Client1].m_always->m_owner.Get() == Host); - AlwaysMigratable::Ptr aC1onC2 = nodes[Client2].m_session.GetChunkFromReplica(nodes[Client1].m_always->GetReplicaId()); - AZ_TEST_ASSERT(aC1onC2->m_requests == 1); - AZ_TEST_ASSERT(aC1onC2->m_accepted == 1); - AZ_TEST_ASSERT(aC1onC2->GetReplica()->IsProxy()); - AZ_TEST_ASSERT(aC1onC2->m_owner.Get() == Host); - AZ_TEST_ASSERT(nodes[Host].m_session.GetReplicaMgr().FindReplica(nodes[Client1].m_always->GetReplicaId())->IsPrimary()); - AZ_TEST_ASSERT(nodes[Client1].m_always->m_control.Get() == Host); - - // C2 -> P1 - AZ_TEST_ASSERT(nodes[Client2].m_always->m_requests == 1); - AZ_TEST_ASSERT(nodes[Client2].m_always->m_accepted == 1); - AZ_TEST_ASSERT(nodes[Client2].m_always->GetReplica()->IsProxy()); - AZ_TEST_ASSERT(nodes[Client2].m_always->m_owner.Get() == Peer1); - AZ_TEST_ASSERT(nodes[Peer1].m_session.GetReplicaMgr().FindReplica(nodes[Client2].m_always->GetReplicaId())->IsPrimary()); - AZ_TEST_ASSERT(nodes[Client2].m_always->m_control.Get() == Peer1); - - // P1 -> C1 (Forbidden) - AZ_TEST_ASSERT(nodes[Peer1].m_never->m_requests == 0); - AZ_TEST_ASSERT(nodes[Peer1].m_never->m_accepted == 0); - AZ_TEST_ASSERT(nodes[Peer1].m_never->GetReplica()->IsPrimary()); - AZ_TEST_ASSERT(nodes[Peer1].m_never->m_owner.Get() == Peer1); - AZ_TEST_ASSERT(nodes[Client1].m_session.GetReplicaMgr().FindReplica(nodes[Peer1].m_never->GetReplicaId())->IsProxy()); - AZ_TEST_ASSERT(nodes[Peer1].m_never->m_control.Get() == Peer1); - - // C2 -> P2 (Forbidden) - AZ_TEST_ASSERT(nodes[Client2].m_never->m_requests == 0); - AZ_TEST_ASSERT(nodes[Client2].m_never->m_accepted == 0); - AZ_TEST_ASSERT(nodes[Client2].m_never->GetReplica()->IsPrimary()); - AZ_TEST_ASSERT(nodes[Client2].m_never->m_owner.Get() == Client2); - AZ_TEST_ASSERT(nodes[Peer2].m_session.GetReplicaMgr().FindReplica(nodes[Client2].m_never->GetReplicaId())->IsProxy()); - AZ_TEST_ASSERT(nodes[Client2].m_never->m_control.Get() == Client2); - - // P1 -> Host - AZ_TEST_ASSERT(nodes[Peer1].m_sometimes->m_requests == 1); - AZ_TEST_ASSERT(nodes[Peer1].m_sometimes->m_accepted == 1); - AZ_TEST_ASSERT(nodes[Peer1].m_sometimes->GetReplica()->IsProxy()); - AZ_TEST_ASSERT(nodes[Peer1].m_sometimes->m_owner.Get() == Host); - AZ_TEST_ASSERT(nodes[Host].m_session.GetReplicaMgr().FindReplica(nodes[Peer1].m_sometimes->GetReplicaId())->IsPrimary()); - AZ_TEST_ASSERT(nodes[Peer1].m_sometimes->m_control.Get() == Host); - - // C1 -> P1 - AZ_TEST_ASSERT(nodes[Client1].m_sometimes->m_requests == 1); - AZ_TEST_ASSERT(nodes[Client1].m_sometimes->m_accepted == 1); - AZ_TEST_ASSERT(nodes[Client1].m_sometimes->GetReplica()->IsProxy()); - AZ_TEST_ASSERT(nodes[Client1].m_sometimes->m_owner.Get() == Peer1); - AZ_TEST_ASSERT(nodes[Peer1].m_session.GetReplicaMgr().FindReplica(nodes[Client1].m_sometimes->GetReplicaId())->IsPrimary()); - AZ_TEST_ASSERT(nodes[Client1].m_sometimes->m_control.Get() == Peer1); - - // P2 -> C2 (Forbidden) - AZ_TEST_ASSERT(nodes[Peer2].m_sometimes->m_requests == 1); - AZ_TEST_ASSERT(nodes[Peer2].m_sometimes->m_accepted == 0); - AZ_TEST_ASSERT(nodes[Peer2].m_sometimes->GetReplica()->IsPrimary()); - AZ_TEST_ASSERT(nodes[Peer2].m_sometimes->m_owner.Get() == Peer2); - AZ_TEST_ASSERT(nodes[Client2].m_session.GetReplicaMgr().FindReplica(nodes[Peer2].m_never->GetReplicaId())->IsProxy()); - AZ_TEST_ASSERT(nodes[Peer2].m_sometimes->m_control.Get() == Peer2); - - // C2 -> Host (Forbidden) - AZ_TEST_ASSERT(nodes[Client2].m_sometimes->m_requests == 1); - AZ_TEST_ASSERT(nodes[Client2].m_sometimes->m_accepted == 0); - AZ_TEST_ASSERT(nodes[Client2].m_sometimes->GetReplica()->IsPrimary()); - AZ_TEST_ASSERT(nodes[Client2].m_sometimes->m_owner.Get() == Client2); - AZ_TEST_ASSERT(nodes[Host].m_session.GetReplicaMgr().FindReplica(nodes[Client2].m_never->GetReplicaId())->IsProxy()); - AZ_TEST_ASSERT(nodes[Client2].m_sometimes->m_control.Get() == Client2); - - // clean up - for (int i = 0; i < TotalNodes; ++i) - { - nodes[i].m_always = nullptr; - nodes[i].m_never = nullptr; - nodes[i].m_sometimes = nullptr; - nodes[i].m_session.GetReplicaMgr().Shutdown(); - DefaultCarrier::Destroy(nodes[i].m_session.GetTransport()); - } - } - -const int ReplicaMigrationRequestTest::k_frameTimePerNodeMs; -const int ReplicaMigrationRequestTest::k_hostSendTimeMs; - - -class PeerRejoinTest - : public UnitTest::GridMateMPTestFixture - , public ReplicaMgrCallbackBus::Handler - , public ::testing::Test -{ - void OnNewHost(bool isHost, ReplicaManager* pMgr) override - { - (void)pMgr; - if (isHost) - { - AZ_TracePrintf("GridMate", "Peer %d has completed host migration and is now the host.\n", (int)pMgr->GetLocalPeerId()); - } - else - { - AZ_TracePrintf("GridMate", "Peer %d has has received notification that host migration is complete.\n", (int)pMgr->GetLocalPeerId()); - } - } - -public: - PeerRejoinTest() { ReplicaMgrCallbackBus::Handler::BusConnect(m_gridMate); } - ~PeerRejoinTest() { ReplicaMgrCallbackBus::Handler::BusDisconnect(); } -}; - -TEST_F(PeerRejoinTest, DISABLED_PeerRejoinTest) - { - ReplicaChunkDescriptorTable::Get().RegisterChunkType(); - ReplicaChunkDescriptorTable::Get().RegisterChunkType(); - - int frameTime = 10; - int framesToRun = 300; - enum - { - p1, p2, nPeers - }; - - MPSession peers[nPeers]; - MigratableReplica::Ptr migrRep[nPeers]; - NonMigratableReplica::Ptr nonMigrRep[nPeers]; - - // initialize full-mesh P2P session - int basePort = 4427; - for (int i = 0; i < nPeers; ++i) - { - TestCarrierDesc desc; - desc.m_port = basePort + i; - desc.m_enableDisconnectDetection = true; - desc.m_threadUpdateTimeMS = frameTime / 2; - - // initialize replica managers - peers[i].SetTransport(DefaultCarrier::Create(desc, m_gridMate)); - peers[i].AcceptConn(true); - peers[i].SetClient(false); - peers[i].GetReplicaMgr().Init(ReplicaMgrDesc(i + 1 - , peers[i].GetTransport() - , 0 - , i == 0 ? ReplicaMgrDesc::Role_SyncHost : 0 - , frameTime / 2)); - } - - AZ_TracePrintf("GridMate", "\n"); - int frameCount = 0; - while (frameCount < framesToRun) - { - static bool allReady = false; - // establish all connections - if (frameCount < nPeers) - { - for (int i = 0; i < frameCount; ++i) - { - peers[frameCount].GetTransport()->Connect("127.0.0.1", basePort + i); - } - } - - if (!allReady) - { - allReady = true; - for (int i = 0; i < nPeers; ++i) - { - if (!peers[i].GetReplicaMgr().IsReady()) - { - allReady = false; - } - } - if (allReady) - { - AZ_TracePrintf("GridMate", "All peers ready at frame %d\n", frameCount); - } - } - - // perform tests - if (allReady) - { - // add replicas - static bool addReplicas = true; - if (addReplicas) - { - for (int i = 0; i < nPeers; ++i) - { - { - auto rep = Replica::CreateReplica(nullptr); - migrRep[i] = CreateAndAttachReplicaChunk(rep, aznew MyObj()); - peers[i].GetReplicaMgr().AddPrimary(rep); - } - { - auto rep = Replica::CreateReplica(nullptr); - nonMigrRep[i] = CreateAndAttachReplicaChunk(rep, aznew MyObj()); - peers[i].GetReplicaMgr().AddPrimary(rep); - } - } - addReplicas = false; - AZ_TracePrintf("GridMate", "Replicas added at frame %d\n", frameCount); - } - - // disconnect p2 and trigger peer migration - static bool dropP2 = true; - if (frameCount > 50 && dropP2) - { - peers[p2].GetTransport()->Disconnect(AllConnections); - peers[p2].GetReplicaMgr().Shutdown(); - dropP2 = false; - AZ_TracePrintf("GridMate", "Dropped P2 at frame %d\n", frameCount); - } - - // reconnect p2 - static bool reconP2 = true; - if (frameCount > 100 && reconP2) - { - peers[p2].GetReplicaMgr().Init(ReplicaMgrDesc(p2 + 1 - , peers[p2].GetTransport() - , 0 - , 0 - , frameTime / 2)); - peers[p1].GetTransport()->Connect("127.0.0.1", basePort + p2); - peers[p2].GetTransport()->Connect("127.0.0.1", basePort + p1); - reconP2 = false; - AZ_TracePrintf("GridMate", "Reconnected P2 at frame %d\n", frameCount); - } - - // disconnect p2 again - static bool redropP2 = true; - if (frameCount > 150 && redropP2) - { - peers[p2].GetTransport()->Disconnect(AllConnections); - redropP2 = false; - AZ_TracePrintf("GridMate", "Re-Dropped P2 at frame %d\n", frameCount); - } - } - - // tick - int tickPeer = frameCount++ % nPeers; - peers[tickPeer].Update(); - if (peers[tickPeer].GetReplicaMgr().IsInitialized()) - { - peers[tickPeer].GetReplicaMgr().Unmarshal(); - peers[tickPeer].GetReplicaMgr().UpdateReplicas(); - peers[tickPeer].GetReplicaMgr().UpdateFromReplicas(); - peers[tickPeer].GetReplicaMgr().Marshal(); - } - peers[tickPeer].GetTransport()->Update(); - AZStd::this_thread::sleep_for(AZStd::chrono::milliseconds(frameTime)); - } - - // clean up - for (int i = 0; i < nPeers; ++i) - { - peers[i].GetReplicaMgr().Shutdown(); - DefaultCarrier::Destroy(peers[i].GetTransport()); - } - } - -class ReplicationSecurityOptionsTest - : public UnitTest::GridMateMPTestFixture - , public ::testing::Test -{ -public: - enum - { - s1, - s2, - s3, - nSessions - }; - - class TestChunk : public ReplicaChunk - { - public: - struct ForwardSourcePeerTrait : public RpcDefaultTraits - { - static const bool s_alwaysForwardSourcePeer = true; - static const bool s_allowNonAuthoritativeRequestRelay = false; - }; - - struct DisableNonAuthoritativeRequestTrait : public RpcAuthoritativeTraits - { - static const bool s_alwaysForwardSourcePeer = true; - }; - - GM_CLASS_ALLOCATOR(TestChunk); - - static const char* GetChunkName() { return "ReplicationSecurityOptionsTest::TestChunk"; } - - TestChunk() - : m_nForwardSourcePeerRpcCallsFromS1("m_nForwardSourcePeerRpcCallsFromS1", 0) - , m_nForwardSourcePeerRpcCallsFromS2("m_nForwardSourcePeerRpcCallsFromS2", 0) - , m_nForwardSourcePeerRpcCallsFromS3("m_nForwardSourcePeerRpcCallsFromS3", 0) - , ForwardSourcePeerRpcFromS1("ForwardSourcePeerRpcFromS1") - , ForwardSourcePeerRpcFromS2("ForwardSourcePeerRpcFromS2") - , ForwardSourcePeerRpcFromS3("ForwardSourcePeerRpcFromS3") - , m_nAuthoritativeOnlyRpcCallsFromS1("m_nAuthoritativeOnlyRpcCallsFromS1", 0) - , m_nAuthoritativeOnlyRpcCallsFromS2("m_nAuthoritativeOnlyRpcCallsFromS2", 0) - , m_nAuthoritativeOnlyRpcCallsFromS3("m_nAuthoritativeOnlyRpcCallsFromS3", 0) - , m_nAuthoritativeOnlyProxyRpcCallsFromS1(0) - , m_nAuthoritativeOnlyProxyRpcCallsFromS2(0) - , m_nAuthoritativeOnlyProxyRpcCallsFromS3(0) - , AuthoritativeOnlyRpcFromS1("AuthoritativeOnlyRpcFromS1") - , AuthoritativeOnlyRpcFromS2("AuthoritativeOnlyRpcFromS2") - , AuthoritativeOnlyRpcFromS3("AuthoritativeOnlyRpcFromS3") - { - } - - bool IsReplicaMigratable() override { return false; } - - bool OnForwardSourcePeerRpcFromS1(const RpcContext& rpcContext) - { - // make sure the requestor is set to s1 - AZ_TEST_ASSERT(rpcContext.m_sourcePeer == s1 + 1); - m_nForwardSourcePeerRpcCallsFromS1.Modify([](int& value) { ++value; return true; }); - return false; - } - - bool OnForwardSourcePeerRpcFromS2(const RpcContext& rpcContext) - { - // make sure the requestor is set to s2 - AZ_TEST_ASSERT(rpcContext.m_sourcePeer == s2 + 1); - // requests to s3 should be blocked in this test - AZ_TEST_ASSERT(GetReplicaManager()->GetLocalPeerId() != s3 + 1); - m_nForwardSourcePeerRpcCallsFromS2.Modify([](int& value) { ++value; return true; }); - return false; - } - - bool OnForwardSourcePeerRpcFromS3(const RpcContext& rpcContext) - { - // make sure the requestor is set to s3 - AZ_TEST_ASSERT(rpcContext.m_sourcePeer == s3 + 1); - // requests to s2 should be blocked in this test - AZ_TEST_ASSERT(GetReplicaManager()->GetLocalPeerId() != s2 + 1); - m_nForwardSourcePeerRpcCallsFromS3.Modify([](int& value) { ++value; return true; }); - return false; - } - - bool OnAuthoritativeOnlyRpcFromS1(const RpcContext& rpcContext) - { - // make sure the requestor is set to s1 - AZ_TEST_ASSERT(rpcContext.m_sourcePeer == s1 + 1); - if (IsPrimary()) - { - m_nAuthoritativeOnlyRpcCallsFromS1.Modify([](int& value) { ++value; return true; }); - } - else - { - ++m_nAuthoritativeOnlyProxyRpcCallsFromS1; - } - return true; - } - - bool OnAuthoritativeOnlyRpcFromS2(const RpcContext& rpcContext) - { - // make sure the requestor is set to s2 - AZ_TEST_ASSERT(rpcContext.m_sourcePeer == s2 + 1); - if (IsPrimary()) - { - m_nAuthoritativeOnlyRpcCallsFromS2.Modify([](int& value) { ++value; return true; }); - } - else - { - ++m_nAuthoritativeOnlyProxyRpcCallsFromS2; - } - return true; - } - - bool OnAuthoritativeOnlyRpcFromS3(const RpcContext& rpcContext) - { - // make sure the requestor is set to s3 - AZ_TEST_ASSERT(rpcContext.m_sourcePeer == s3 + 1); - if (IsPrimary()) - { - m_nAuthoritativeOnlyRpcCallsFromS3.Modify([](int& value) { ++value; return true; }); - } - else - { - ++m_nAuthoritativeOnlyProxyRpcCallsFromS3; - } - return true; - } - - DataSet m_nForwardSourcePeerRpcCallsFromS1; - DataSet m_nForwardSourcePeerRpcCallsFromS2; - DataSet m_nForwardSourcePeerRpcCallsFromS3; - Rpc<>::BindInterface ForwardSourcePeerRpcFromS1; - Rpc<>::BindInterface ForwardSourcePeerRpcFromS2; - Rpc<>::BindInterface ForwardSourcePeerRpcFromS3; - - DataSet m_nAuthoritativeOnlyRpcCallsFromS1; - DataSet m_nAuthoritativeOnlyRpcCallsFromS2; - DataSet m_nAuthoritativeOnlyRpcCallsFromS3; - int m_nAuthoritativeOnlyProxyRpcCallsFromS1; - int m_nAuthoritativeOnlyProxyRpcCallsFromS2; - int m_nAuthoritativeOnlyProxyRpcCallsFromS3; - Rpc<>::BindInterface AuthoritativeOnlyRpcFromS1; - Rpc<>::BindInterface AuthoritativeOnlyRpcFromS2; - Rpc<>::BindInterface AuthoritativeOnlyRpcFromS3; - }; - using TestChunkPtr = AZStd::intrusive_ptr ; -}; - -TEST_F(ReplicationSecurityOptionsTest, DISABLED_ReplicationSecurityOptionsTest) - { - AZ_TracePrintf("GridMate", "\n"); - - // Register test chunks - ReplicaChunkDescriptorTable::Get().RegisterChunkType(); - - MPSession sessions[nSessions]; - ReplicaPtr primarys[nSessions]; - - // initialize transport - int basePort = 4427; - for (int i = 0; i < nSessions; ++i) - { - TestCarrierDesc desc; - desc.m_port = basePort + i; - // initialize replica managers - // s2(c)<-->(p)s1(p)<-->(c)s3 - sessions[i].SetTransport(DefaultCarrier::Create(desc, m_gridMate)); - sessions[i].AcceptConn(true); - sessions[i].SetClient(i != s1); - sessions[i].GetReplicaMgr().Init(ReplicaMgrDesc(i + 1, sessions[i].GetTransport(), 0, i == 0 ? ReplicaMgrDesc::Role_SyncHost : 0)); - - ReplicationSecurityOptions options; - options.m_enableStrictSourceValidation = true; - sessions[i].GetReplicaMgr().SetSecurityOptions(options); - } - - // connect s2 to s1 - sessions[s2].GetTransport()->Connect("127.0.0.1", basePort); - - // connect s3 to s1 - sessions[s3].GetTransport()->Connect("127.0.0.1", basePort); - - // main test loop - for (int tick = 0; tick < 1000; ++tick) - { - if (tick == 100) - { - for (int i = 0; i < nSessions; ++i) - { - AZ_TEST_ASSERT(sessions[i].GetReplicaMgr().IsReady()); - primarys[i] = Replica::CreateReplica("ReplicationSecurityOptionsTest::TestReplica"); - TestChunkPtr chunk = CreateReplicaChunk(); - primarys[i]->AttachReplicaChunk(chunk); - sessions[i].GetReplicaMgr().AddPrimary(primarys[i]); - } - } - - if (tick == 200) - { - AZ_TEST_START_TRACE_SUPPRESSION; - for (int i = 0; i < nSessions; ++i) - { - sessions[s1].GetReplicaMgr().FindReplica(primarys[i]->GetRepId())->FindReplicaChunk()->ForwardSourcePeerRpcFromS1(); - sessions[s2].GetReplicaMgr().FindReplica(primarys[i]->GetRepId())->FindReplicaChunk()->ForwardSourcePeerRpcFromS2(); - sessions[s3].GetReplicaMgr().FindReplica(primarys[i]->GetRepId())->FindReplicaChunk()->ForwardSourcePeerRpcFromS3(); - } - } - - if (tick == 300) - { - // The previous test should have triggered the following assert twice: - // ReplicaChunk.cpp(449): AZ_Assert(false, "Discarding non-authoritative RPC <%s> because s_allowNonAuthoritativeRequestRelay trait is disabled!", GetDescriptor()->GetRpcName(this, rpc)); - AZ_TEST_STOP_TRACE_SUPPRESSION(2); - - // All chunks should have received the call from the host - AZ_TEST_ASSERT(primarys[s1]->FindReplicaChunk()->m_nForwardSourcePeerRpcCallsFromS1 == 1); - AZ_TEST_ASSERT(primarys[s2]->FindReplicaChunk()->m_nForwardSourcePeerRpcCallsFromS1 == 1); - AZ_TEST_ASSERT(primarys[s3]->FindReplicaChunk()->m_nForwardSourcePeerRpcCallsFromS1 == 1); - - // the host chunk should have received calls from both clients - AZ_TEST_ASSERT(primarys[s1]->FindReplicaChunk()->m_nForwardSourcePeerRpcCallsFromS2 == 1); - AZ_TEST_ASSERT(primarys[s1]->FindReplicaChunk()->m_nForwardSourcePeerRpcCallsFromS3 == 1); - - // the chunk on s2 should receive its own call but not from s3 - AZ_TEST_ASSERT(primarys[s2]->FindReplicaChunk()->m_nForwardSourcePeerRpcCallsFromS2 == 1); - AZ_TEST_ASSERT(primarys[s2]->FindReplicaChunk()->m_nForwardSourcePeerRpcCallsFromS3 == 0); - - // the chunk on s3 should receive its own call but not from s2 - AZ_TEST_ASSERT(primarys[s3]->FindReplicaChunk()->m_nForwardSourcePeerRpcCallsFromS2 == 0); - AZ_TEST_ASSERT(primarys[s3]->FindReplicaChunk()->m_nForwardSourcePeerRpcCallsFromS3 == 1); - - // all datasets should have propagated properly - for (int i = 0; i < nSessions; ++i) - { - AZ_TEST_ASSERT(sessions[i].GetReplicaMgr().FindReplica(primarys[s1]->GetRepId())->FindReplicaChunk()->m_nForwardSourcePeerRpcCallsFromS1.Get() == primarys[s1]->FindReplicaChunk()->m_nForwardSourcePeerRpcCallsFromS1.Get()); - AZ_TEST_ASSERT(sessions[i].GetReplicaMgr().FindReplica(primarys[s1]->GetRepId())->FindReplicaChunk()->m_nForwardSourcePeerRpcCallsFromS2.Get() == primarys[s1]->FindReplicaChunk()->m_nForwardSourcePeerRpcCallsFromS2.Get()); - AZ_TEST_ASSERT(sessions[i].GetReplicaMgr().FindReplica(primarys[s1]->GetRepId())->FindReplicaChunk()->m_nForwardSourcePeerRpcCallsFromS3.Get() == primarys[s1]->FindReplicaChunk()->m_nForwardSourcePeerRpcCallsFromS3.Get()); - - AZ_TEST_ASSERT(sessions[i].GetReplicaMgr().FindReplica(primarys[s2]->GetRepId())->FindReplicaChunk()->m_nForwardSourcePeerRpcCallsFromS1.Get() == primarys[s2]->FindReplicaChunk()->m_nForwardSourcePeerRpcCallsFromS1.Get()); - AZ_TEST_ASSERT(sessions[i].GetReplicaMgr().FindReplica(primarys[s2]->GetRepId())->FindReplicaChunk()->m_nForwardSourcePeerRpcCallsFromS2.Get() == primarys[s2]->FindReplicaChunk()->m_nForwardSourcePeerRpcCallsFromS2.Get()); - AZ_TEST_ASSERT(sessions[i].GetReplicaMgr().FindReplica(primarys[s2]->GetRepId())->FindReplicaChunk()->m_nForwardSourcePeerRpcCallsFromS3.Get() == primarys[s2]->FindReplicaChunk()->m_nForwardSourcePeerRpcCallsFromS3.Get()); - - AZ_TEST_ASSERT(sessions[i].GetReplicaMgr().FindReplica(primarys[s3]->GetRepId())->FindReplicaChunk()->m_nForwardSourcePeerRpcCallsFromS1.Get() == primarys[s3]->FindReplicaChunk()->m_nForwardSourcePeerRpcCallsFromS1.Get()); - AZ_TEST_ASSERT(sessions[i].GetReplicaMgr().FindReplica(primarys[s3]->GetRepId())->FindReplicaChunk()->m_nForwardSourcePeerRpcCallsFromS2.Get() == primarys[s3]->FindReplicaChunk()->m_nForwardSourcePeerRpcCallsFromS2.Get()); - AZ_TEST_ASSERT(sessions[i].GetReplicaMgr().FindReplica(primarys[s3]->GetRepId())->FindReplicaChunk()->m_nForwardSourcePeerRpcCallsFromS3.Get() == primarys[s3]->FindReplicaChunk()->m_nForwardSourcePeerRpcCallsFromS3.Get()); - } - } - - if (tick == 400) - { - AZ_TEST_START_TRACE_SUPPRESSION; - for (int i = 0; i < nSessions; ++i) - { - sessions[s1].GetReplicaMgr().FindReplica(primarys[i]->GetRepId())->FindReplicaChunk()->AuthoritativeOnlyRpcFromS1(); - sessions[s2].GetReplicaMgr().FindReplica(primarys[i]->GetRepId())->FindReplicaChunk()->AuthoritativeOnlyRpcFromS2(); - sessions[s3].GetReplicaMgr().FindReplica(primarys[i]->GetRepId())->FindReplicaChunk()->AuthoritativeOnlyRpcFromS3(); - } - } - - if (tick == 500) - { - // The previous test should have triggered the following assert six times: - // ReplicaChunk.cpp(444): AZ_Assert(false, "Discarding non-authoritative RPC <%s> because s_allowNonAuthoritativeRequests trait is disabled!", GetDescriptor()->GetRpcName(this, rpc)); - AZ_TEST_STOP_TRACE_SUPPRESSION(6); - - // Each chunk should have received their own AuthoritativeOnlyRpc once. - AZ_TEST_ASSERT(primarys[s1]->FindReplicaChunk()->m_nAuthoritativeOnlyRpcCallsFromS1 == 1); - AZ_TEST_ASSERT(primarys[s2]->FindReplicaChunk()->m_nAuthoritativeOnlyRpcCallsFromS2 == 1); - AZ_TEST_ASSERT(primarys[s3]->FindReplicaChunk()->m_nAuthoritativeOnlyRpcCallsFromS3 == 1); - - // Calls from other nodes should have been discarded. - AZ_TEST_ASSERT(primarys[s1]->FindReplicaChunk()->m_nAuthoritativeOnlyRpcCallsFromS2 == 0); - AZ_TEST_ASSERT(primarys[s1]->FindReplicaChunk()->m_nAuthoritativeOnlyRpcCallsFromS3 == 0); - AZ_TEST_ASSERT(primarys[s2]->FindReplicaChunk()->m_nAuthoritativeOnlyRpcCallsFromS1 == 0); - AZ_TEST_ASSERT(primarys[s2]->FindReplicaChunk()->m_nAuthoritativeOnlyRpcCallsFromS3 == 0); - AZ_TEST_ASSERT(primarys[s3]->FindReplicaChunk()->m_nAuthoritativeOnlyRpcCallsFromS1 == 0); - AZ_TEST_ASSERT(primarys[s3]->FindReplicaChunk()->m_nAuthoritativeOnlyRpcCallsFromS2 == 0); - - // Calls should have successfully propagated to the other 2 proxies - AZ_TEST_ASSERT(sessions[s1].GetReplicaMgr().FindReplica(primarys[s2]->GetRepId())->FindReplicaChunk()->m_nAuthoritativeOnlyProxyRpcCallsFromS2 == 1); - AZ_TEST_ASSERT(sessions[s1].GetReplicaMgr().FindReplica(primarys[s3]->GetRepId())->FindReplicaChunk()->m_nAuthoritativeOnlyProxyRpcCallsFromS3 == 1); - AZ_TEST_ASSERT(sessions[s2].GetReplicaMgr().FindReplica(primarys[s1]->GetRepId())->FindReplicaChunk()->m_nAuthoritativeOnlyProxyRpcCallsFromS1 == 1); - AZ_TEST_ASSERT(sessions[s2].GetReplicaMgr().FindReplica(primarys[s3]->GetRepId())->FindReplicaChunk()->m_nAuthoritativeOnlyProxyRpcCallsFromS3 == 1); - AZ_TEST_ASSERT(sessions[s3].GetReplicaMgr().FindReplica(primarys[s1]->GetRepId())->FindReplicaChunk()->m_nAuthoritativeOnlyProxyRpcCallsFromS1 == 1); - AZ_TEST_ASSERT(sessions[s3].GetReplicaMgr().FindReplica(primarys[s2]->GetRepId())->FindReplicaChunk()->m_nAuthoritativeOnlyProxyRpcCallsFromS2 == 1); - - // all datasets should have propagated properly - for (int i = 0; i < nSessions; ++i) - { - AZ_TEST_ASSERT(sessions[i].GetReplicaMgr().FindReplica(primarys[s1]->GetRepId())->FindReplicaChunk()->m_nAuthoritativeOnlyRpcCallsFromS1.Get() == primarys[s1]->FindReplicaChunk()->m_nAuthoritativeOnlyRpcCallsFromS1.Get()); - AZ_TEST_ASSERT(sessions[i].GetReplicaMgr().FindReplica(primarys[s1]->GetRepId())->FindReplicaChunk()->m_nAuthoritativeOnlyRpcCallsFromS2.Get() == primarys[s1]->FindReplicaChunk()->m_nAuthoritativeOnlyRpcCallsFromS2.Get()); - AZ_TEST_ASSERT(sessions[i].GetReplicaMgr().FindReplica(primarys[s1]->GetRepId())->FindReplicaChunk()->m_nAuthoritativeOnlyRpcCallsFromS3.Get() == primarys[s1]->FindReplicaChunk()->m_nAuthoritativeOnlyRpcCallsFromS3.Get()); - - AZ_TEST_ASSERT(sessions[i].GetReplicaMgr().FindReplica(primarys[s2]->GetRepId())->FindReplicaChunk()->m_nAuthoritativeOnlyRpcCallsFromS1.Get() == primarys[s2]->FindReplicaChunk()->m_nAuthoritativeOnlyRpcCallsFromS1.Get()); - AZ_TEST_ASSERT(sessions[i].GetReplicaMgr().FindReplica(primarys[s2]->GetRepId())->FindReplicaChunk()->m_nAuthoritativeOnlyRpcCallsFromS2.Get() == primarys[s2]->FindReplicaChunk()->m_nAuthoritativeOnlyRpcCallsFromS2.Get()); - AZ_TEST_ASSERT(sessions[i].GetReplicaMgr().FindReplica(primarys[s2]->GetRepId())->FindReplicaChunk()->m_nAuthoritativeOnlyRpcCallsFromS3.Get() == primarys[s2]->FindReplicaChunk()->m_nAuthoritativeOnlyRpcCallsFromS3.Get()); - - AZ_TEST_ASSERT(sessions[i].GetReplicaMgr().FindReplica(primarys[s3]->GetRepId())->FindReplicaChunk()->m_nAuthoritativeOnlyRpcCallsFromS1.Get() == primarys[s3]->FindReplicaChunk()->m_nAuthoritativeOnlyRpcCallsFromS1.Get()); - AZ_TEST_ASSERT(sessions[i].GetReplicaMgr().FindReplica(primarys[s3]->GetRepId())->FindReplicaChunk()->m_nAuthoritativeOnlyRpcCallsFromS2.Get() == primarys[s3]->FindReplicaChunk()->m_nAuthoritativeOnlyRpcCallsFromS2.Get()); - AZ_TEST_ASSERT(sessions[i].GetReplicaMgr().FindReplica(primarys[s3]->GetRepId())->FindReplicaChunk()->m_nAuthoritativeOnlyRpcCallsFromS3.Get() == primarys[s3]->FindReplicaChunk()->m_nAuthoritativeOnlyRpcCallsFromS3.Get()); - } - } - - // tick everything - for (int i = 0; i < nSessions; ++i) - { - sessions[i].Update(); - sessions[i].GetReplicaMgr().Unmarshal(); - sessions[i].GetReplicaMgr().UpdateReplicas(); - sessions[i].GetReplicaMgr().UpdateFromReplicas(); - sessions[i].GetReplicaMgr().Marshal(); - sessions[i].GetTransport()->Update(); - } - - AZStd::this_thread::sleep_for(AZStd::chrono::milliseconds(10)); - } - - - for (int i = 0; i < nSessions; ++i) - { - sessions[i].GetReplicaMgr().Shutdown(); - DefaultCarrier::Destroy(sessions[i].GetTransport()); - } - } - - -/* - *03.25.2015* Typical test results on Core i7 3.4 GHz desktop (with polling): - Release: - Replica update time (msec): avg=2.02, min=2, max=3 (peers=40, replicas=16000, freq=0%, samples=4000) - Replica update time (msec): avg=4.83, min=2, max=12 (peers=40, replicas=16000, freq=10%, samples=4000) - Replica update time (msec): avg=4.73, min=3, max=12 (peers=40, replicas=16000, freq=100%, samples=4000) - DebugOpt: - Replica update time (msec): avg=2.53, min=2, max=5 (peers=40, replicas=16000, freq=0%, samples=4000) - Replica update time (msec): avg=4.21, min=2, max=8 (peers=40, replicas=16000, freq=10%, samples=4000) - Replica update time (msec): avg=5.59, min=3, max=14 (peers=40, replicas=16000, freq=100%, samples=4000) - - - Test results (task based marshaling): - Release: - Replica update time (msec): avg=0.03, min=0, max=1 (peers=40, replicas=16000, freq=0%, samples=4000) - Replica update time (msec): avg=3.94, min=1, max=11 (peers=40, replicas=16000, freq=10%, samples=4000) - Replica update time (msec): avg=5.21, min=4, max=15 (peers=40, replicas=16000, freq=100%, samples=4000) - DebugOpt: - Replica update time (msec): avg=1.00, min=1, max=2 (peers=40, replicas=16000, freq=0%, samples=4000) - Replica update time (msec): avg=4.94, min=1, max=9 (peers=40, replicas=16000, freq=10%, samples=4000) - Replica update time (msec): avg=8.05, min=6, max=15 (peers=40, replicas=16000, freq=100%, samples=4000) -*/ -class DISABLED_ReplicaStressTest - : public UnitTest::GridMateMPTestFixture -{ -public: - class StressTestReplica - : public ReplicaChunk - { - public: - GM_CLASS_ALLOCATOR(StressTestReplica); - typedef AZStd::intrusive_ptr Ptr; - static const char* GetChunkName() { return "StressTestReplica"; } - - StressTestReplica() - : m_data("Data") - { - } - - bool IsReplicaMigratable() override - { - return false; - } - - bool m_changing; - DataSet m_data; - }; - - static const size_t NUM_PEERS = 40; - static const size_t NUM_REPLICAS_PER_PEER = 400; - static const int FRAME_TIME = 5; - static const int BASE_PORT = 44270; - - // TODO: Reduce the size or disable the test for platforms which can't allocate 2 GiB - DISABLED_ReplicaStressTest() - : UnitTest::GridMateMPTestFixture(2000u * 1024u * 1024u) - {} - - void UpdateReplica(MPSession& session) - { - session.GetReplicaMgr().Unmarshal(); - session.GetReplicaMgr().UpdateReplicas(); - - session.GetReplicaMgr().UpdateFromReplicas(); - session.GetReplicaMgr().Marshal(); - } - - void Wait(MPSession* sessions, vector >& replicas, int numFrames, int frameTime) - { - (void)replicas; - while (numFrames--) - { - for (size_t i = 0; i < NUM_PEERS; ++i) - { - sessions[i].Update(); - UpdateReplica(sessions[i]); - } - - for (size_t i = 0; i < NUM_PEERS; ++i) - { - sessions[i].GetTransport()->Update(); - } - - AZStd::this_thread::sleep_for(AZStd::chrono::milliseconds(frameTime)); - } - } - - // freq is 0..1, 0.0 - no dirty replicas per tick, 1.0 - all replicas are dirty every tick, 0.5 - 50% of replicas per tick - void TestReplicas(MPSession* sessions, vector >& replicas, int numFrames, int frameTime, double freq) - { - AZStd::chrono::system_clock::duration minUpdateTime(AZStd::chrono::system_clock::duration::max()); - AZStd::chrono::system_clock::duration maxUpdateTime(AZStd::chrono::system_clock::duration::min()); - AZStd::chrono::system_clock::duration sumSamples(AZStd::chrono::system_clock::duration::zero()); - unsigned long long numSamples = 0; - - int count = 0; - while (numFrames--) - { - MarkChanging(replicas, freq); - - for (auto& r : replicas) - { - if (r.second->m_changing) - { - r.second->m_data.Set(count++); - } - } - - for (size_t i = 0; i < NUM_PEERS; ++i) - { - sessions[i].Update(); - AZStd::chrono::system_clock::time_point beforeUpdateTime = AZStd::chrono::system_clock::now(); - UpdateReplica(sessions[i]); - auto updateTime = AZStd::chrono::system_clock::now() - beforeUpdateTime; - minUpdateTime = AZStd::min(updateTime, minUpdateTime); - maxUpdateTime = AZStd::max(updateTime, maxUpdateTime); - sumSamples += updateTime; - ++numSamples; - } - - for (size_t i = 0; i < NUM_PEERS; ++i) - { - sessions[i].GetTransport()->Update(); - } - - AZStd::this_thread::sleep_for(AZStd::chrono::milliseconds(frameTime)); - } - - AZ_TEST_ASSERT(numSamples > 0); - - AZ_Printf("GridMate", "\n\n----------------\nReplica update time (msec): avg=%.2f, min=%.2f, max=%.2f (peers=%d, replicas=%d, freq=%d%%, samples=%llu)\n", - static_cast(AZStd::chrono::duration_cast(sumSamples).count()) / static_cast(numSamples), - AZStd::chrono::duration_cast(minUpdateTime).count() / 1000.0, - AZStd::chrono::duration_cast(maxUpdateTime).count() / 1000.0, - NUM_PEERS, - replicas.size(), - static_cast(freq * 100.0), - numSamples); - } - - bool ConnectPeers(MPSession* sessions, int frameTime) - { - size_t frameCount = 0; - bool allReady = false; - size_t maxFramesToReady = NUM_PEERS + 100; // this is to avoid infinite loop waiting for all peers to become ready in case some peer cannot connect - vector > replicas; - - while (!allReady && frameCount < maxFramesToReady) - { - // establish all connections - if (frameCount < NUM_PEERS) - { - for (size_t i = 0; i < frameCount; ++i) - { - sessions[frameCount].GetTransport()->Connect("127.0.0.1", BASE_PORT + static_cast(i)); - } - } - - allReady = true; - for (size_t i = 0; i < NUM_PEERS; ++i) - { - if (!sessions[i].GetReplicaMgr().IsReady()) - { - allReady = false; - break; - } - } - if (allReady) - { - AZ_Printf("GridMate", "All peers ready at frame %d\n", frameCount); - } - - Wait(sessions, replicas, 1, frameTime); - ++frameCount; - } - - return allReady; - } - - virtual void RunStressTests(MPSession* sessions, vector >& replicas) - { - // testing 3 cases & waiting for system to settle in between - //TestProfiler::StartProfiling(); - Wait(sessions, replicas, 50, FRAME_TIME); - //TestProfiler::PrintProfilingTotal("GridMate"); - - Wait(sessions, replicas, 20, FRAME_TIME); - //TestProfiler::StartProfiling(); - TestReplicas(sessions, replicas, 100, FRAME_TIME, 0.0); // no replicas are dirty - //TestProfiler::PrintProfilingTotal("GridMate"); - - Wait(sessions, replicas, 20, FRAME_TIME); - //TestProfiler::StartProfiling(); - TestReplicas(sessions, replicas, 1, FRAME_TIME, 1.0); // single burst dirty replicas - Wait(sessions, replicas, 2, FRAME_TIME); - //TestProfiler::PrintProfilingTotal("GridMate"); - - Wait(sessions, replicas, 20, FRAME_TIME); - //TestProfiler::StartProfiling(); - TestReplicas(sessions, replicas, 100, FRAME_TIME, 0.1); // 10% of replicas are marked dirty every frame - //TestProfiler::PrintProfilingTotal("GridMate"); - - Wait(sessions, replicas, 20, FRAME_TIME); - //TestProfiler::StartProfiling(); - TestReplicas(sessions, replicas, 100, FRAME_TIME, 1.0); // every replica is marked dirty every frame - //TestProfiler::PrintProfilingTotal("GridMate"); - //TestProfiler::PrintProfilingSelf("GridMate"); - - //TestProfiler::StopProfiling(); - } - - virtual void MarkChanging(vector >& replicas, double freq) - { - AZ::Sfmt& sfmt = AZ::Sfmt::GetInstance(); - for (auto& r : replicas) - { - r.second->m_changing = sfmt.RandR32_2() <= freq; - } - } - - void run() - { - ReplicaChunkDescriptorTable::Get().RegisterChunkType(); - - MPSession sessions[NUM_PEERS]; - vector > replicas; - - replicas.reserve(NUM_PEERS * NUM_REPLICAS_PER_PEER); - - for (unsigned int i = 0; i < NUM_PEERS; ++i) - { - TestCarrierDesc desc; - desc.m_port = BASE_PORT + i; - desc.m_enableDisconnectDetection = false; - - // initialize replica managers - sessions[i].SetTransport(DefaultCarrier::Create(desc, m_gridMate)); - sessions[i].AcceptConn(true); - sessions[i].SetClient(false); - sessions[i].GetReplicaMgr().Init(ReplicaMgrDesc(i + 1 - , sessions[i].GetTransport() - , 0 - , i == 0 ? ReplicaMgrDesc::Role_SyncHost : 0)); - } - - bool allReady = ConnectPeers(sessions, FRAME_TIME); - - AZ_TEST_ASSERT(allReady); - - for (auto& session : sessions) - { - for (size_t j = 0; j < NUM_REPLICAS_PER_PEER; ++j) - { - auto rep = Replica::CreateReplica(nullptr); - auto chunk = CreateAndAttachReplicaChunk(rep); - replicas.push_back(AZStd::make_pair(rep, chunk)); - session.GetReplicaMgr().AddPrimary(rep); - } - } - - RunStressTests(sessions, replicas); - - // clean up - for (auto& s : sessions) - { - s.GetReplicaMgr().Shutdown(); - DefaultCarrier::Destroy(s.GetTransport()); - } - } -}; - -/* - This test performs updates to the same replicas every frame unlike stress test that picks random replicas every frame - *03.25.2015* Typical test results on Core i7 3.4 GHz desktop (with polling): - Release: - Replica update time (msec): avg=2.54, min=2, max=9 (peers=40, replicas=16000, freq=10%, samples=4000) - Replica update time (msec): avg=3.15, min=2, max=7 (peers=40, replicas=16000, freq=50%, samples=4000) - DebugOpt: - Replica update time (msec): avg=3.35, min=3, max=8 (peers=40, replicas=16000, freq=10%, samples=4000) - Replica update time (msec): avg=4.45, min=3, max=10 (peers=40, replicas=16000, freq=50%, samples=4000) - - Test results (task based marshaling): - Release: - Replica update time (msec): avg=1.62, min=1, max=10 (peers=40, replicas=16000, freq=10%, samples=4000) - Replica update time (msec): avg=4.38, min=2, max=15 (peers=40, replicas=16000, freq=50%, samples=4000) - DebugOpt: - Replica update time (msec): avg=2.01, min=1, max=5 (peers=40, replicas=16000, freq=10%, samples=4000) - Replica update time (msec): avg=4.61, min=3, max=10 (peers=40, replicas=16000, freq=50%, samples=4000) -*/ -class DISABLED_ReplicaStableStressTest - : public DISABLED_ReplicaStressTest -{ -public: - - void MarkChanging(vector >& replicas, double freq) override - { - (void)replicas; - (void)freq; - } - - void RunStressTests(MPSession* sessions, vector >& replicas) override - { - DISABLED_ReplicaStressTest::MarkChanging(replicas, 0.1); // picks 10% of replicas - Wait(sessions, replicas, 20, FRAME_TIME); - //TestProfiler::StartProfiling(); - TestReplicas(sessions, replicas, 100, FRAME_TIME, 0.1); - /*TestProfiler::PrintProfilingTotal("GridMate"); - TestProfiler::PrintProfilingSelf("GridMate");*/ - - DISABLED_ReplicaStressTest::MarkChanging(replicas, 0.5); // picks 50% of replicas - Wait(sessions, replicas, 20, FRAME_TIME); - //TestProfiler::StartProfiling(); - TestReplicas(sessions, replicas, 100, FRAME_TIME, 0.5); - /*TestProfiler::PrintProfilingTotal("GridMate"); - TestProfiler::PrintProfilingSelf("GridMate"); - - TestProfiler::StopProfiling();*/ - } -}; - - -/* -* This test verifies bandwidth limiter. The test takes ~2 minutes. It sends ~7k/s of data with a limit of 4k with the following pattern: -* -* -* time | 10s | 10s | 20s | 20s | 10s | 20s | -* +-----+-----+----------+----------+-----+----------+ -* sendrate | 0k | 7k | 7k | 1.5k | 7k | 7k | -* | | | | | | | -* expected |none |brst | capped |under cap |brst | capped | -* -*/ -class DISABLED_ReplicaBandiwdthTest - : public UnitTest::GridMateMPTestFixture -{ -public: - - class BandwidthTestChunk - : public ReplicaChunk - { - public: - GM_CLASS_ALLOCATOR(BandwidthTestChunk); - typedef AZStd::intrusive_ptr Ptr; - static const char* GetChunkName() { return "BandwidthTestChunk"; } - - BandwidthTestChunk() - : m_value("Value") - { - Touch(); - } - - void Touch() - { - AZStd::string randomStr; - for (unsigned i = 0; i < k_strSize; ++i) - { - randomStr += 'a' + (rand() % 26); - } - m_value.Set(randomStr); - } - - bool IsReplicaMigratable() override { return false; } - - static const unsigned k_strSize = 64; - DataSet m_value; - }; - - void run() - { - ReplicaChunkDescriptorTable::Get().RegisterChunkType(); - - MPSession sessions[nSessions]; - // initialize transport - int basePort = 4427; - for (int i = 0; i < nSessions; ++i) - { - TestCarrierDesc desc; - desc.m_port = basePort + i; - desc.m_enableDisconnectDetection = false; - sessions[i].SetClient(i != sHost); - sessions[i].SetTransport(DefaultCarrier::Create(desc, m_gridMate)); - sessions[i].AcceptConn(true); - sessions[i].GetReplicaMgr().Init(ReplicaMgrDesc(i + 1, sessions[i].GetTransport(), 0, i == 0 ? ReplicaMgrDesc::Role_SyncHost : 0)); - } - - // adding replicas for the host - static const size_t k_numReplicas = 10; - BandwidthTestChunk::Ptr chunks[k_numReplicas]; - for (size_t i = 0; i < k_numReplicas; ++i) - { - auto rep = Replica::CreateReplica(nullptr); - chunks[i] = CreateAndAttachReplicaChunk(rep); - sessions[sHost].GetReplicaMgr().AddPrimary(rep); - } - - // connect to host - for (size_t i = 0; i < nSessions; ++i) - { - if (i == sHost) - { - continue; - } - - sessions[i].GetTransport()->Connect("127.0.0.1", basePort); - } - - static const int k_delayMS = 100; // tick time - - bool isDone = false; - size_t numReplicasToChange = 0; - - /* - 10 replicas x ~70 bytes per replica x 10 frames per second =~ 7000 bytes per second - Will try to cutoff it at 4k per sec - */ - static const unsigned k_sendRateLimit = 4000; - - unsigned tickNo = 0; - AZ_Printf("GridMate", "Created %d sessions.\n", nSessions); - while (!isDone) - { - for (size_t i = 0; i < numReplicasToChange; ++i) - { - chunks[i]->Touch(); - } - - for (auto connId : sessions[sHost].m_connections) - { - if (connId == InvalidConnectionID) - { - continue; - } - - TrafficControl::Statistics lastSecEffective; - sessions[sHost].GetTransport()->QueryStatistics(connId, nullptr, nullptr, &lastSecEffective); - m_measurements[connId].m_sendData.push_back(lastSecEffective.m_dataSend); - - if (!(tickNo % 30)) // printout every 3 seconds - { - AZ_Printf("GridMate", " - effective sendRate=%.2f KB\n", lastSecEffective.m_dataSend / 1000.f); - } - //AZ_TracePrintf("GridMate", "%d\n", lastSecEffective.m_dataSend); - } - - - // ======================================================= - // Actual tests - // ======================================================= - if (tickNo == 100) // things should've settle at this point, session is established, initial replicas are sent - { - for (size_t i = 0; i < AZ_ARRAY_SIZE(sessions); ++i) - { - AZ_TEST_ASSERT(sessions[i].GetReplicaMgr().IsReady()); - } - - numReplicasToChange = k_numReplicas; - ResetMeasurements(); - AZ_Printf("GridMate", "Starting replica data send. Unlimited.\n"); - } - else if (tickNo == 200) - { - // test if initial unlimited burst was allowed - for (const auto& m : m_measurements) - { - AZ_TEST_ASSERT(m.second.Max() > k_sendRateLimit * 1.5f); - } - ResetMeasurements(); - sessions[sHost].GetReplicaMgr().SetSendLimit(k_sendRateLimit); - AZ_Printf("GridMate", "Limited by SendLimit=%d Bps.\n", sessions[sHost].GetReplicaMgr().GetSendLimit()); - } - else if (tickNo == 400) - { - // checking if bandwidth was rate limited - for (const auto& m : m_measurements) - { - if (!(m.second.Mean() < k_sendRateLimit * 1.1f)) - { - AZ_Printf("GridMate", "rate mean: %f limit %d\n", m.second.Mean(), sessions[sHost].GetReplicaMgr().GetSendLimit()) - } - AZ_TEST_ASSERT(m.second.Mean() < k_sendRateLimit * 1.1f); // allowing 10% margin of error - } - ResetMeasurements(); - numReplicasToChange = k_numReplicas / 4; // reducing outgoing traffic 1/4 - AZ_Printf("GridMate", "Reduced send rate...\n"); - } - else if (tickNo == 600) - { - // checking if traffic below the limit - for (const auto& m : m_measurements) - { - AZ_TEST_ASSERT(m.second.Mean() < k_sendRateLimit * 0.7f); - } - ResetMeasurements(); - sessions[sHost].GetReplicaMgr().SetSendLimit(0); // returning to unlimited send rate - numReplicasToChange = k_numReplicas; - AZ_Printf("GridMate", "Full send rate...\n"); - } - else if (tickNo == 700) - { - // test if burst allowed - for (const auto& m : m_measurements) - { - AZ_TEST_ASSERT(m.second.Max() > k_sendRateLimit * 1.5f); - } - ResetMeasurements(); - sessions[sHost].GetReplicaMgr().SetSendLimit(k_sendRateLimit); - AZ_Printf("GridMate", "Limited by SendLimit=%d Bps.\n", sessions[sHost].GetReplicaMgr().GetSendLimit()); - } - else if (tickNo == 900) - { - // checking if bandwidth was limited - for (const auto& m : m_measurements) - { - AZ_TEST_ASSERT(m.second.Mean() < k_sendRateLimit * 1.1f); // allowing 10% jerking around limit - } - - isDone = true; - } - - // ======================================================= - // Tick everything - // ======================================================= - for (size_t i = 0; i < nSessions; ++i) - { - sessions[i].Update(); - sessions[i].GetReplicaMgr().Unmarshal(); - } - - for (size_t i = 0; i < nSessions; ++i) - { - sessions[i].GetReplicaMgr().UpdateReplicas(); - } - - for (size_t i = 0; i < nSessions; ++i) - { - sessions[i].GetReplicaMgr().UpdateFromReplicas(); - sessions[i].GetReplicaMgr().Marshal(); - } - - for (size_t i = 0; i < nSessions; ++i) - { - sessions[i].GetTransport()->Update(); - } - - ++tickNo; - AZStd::this_thread::sleep_for(AZStd::chrono::milliseconds(k_delayMS)); - } - - - for (int i = 0; i < nSessions; ++i) - { - sessions[i].GetReplicaMgr().Shutdown(); - DefaultCarrier::Destroy(sessions[i].GetTransport()); - } - } - - void ResetMeasurements() - { - for (auto& m : m_measurements) - { - m.second.Reset(); - } - } - - struct Measurement - { - unsigned int Mean() const - { - AZ_Assert(!m_sendData.empty(), "No data!"); - unsigned int sum = 0; - for (auto val : m_sendData) - { - sum += val; - } - - return sum / static_cast(m_sendData.size()); - } - - unsigned int Max() const - { - unsigned int curMax = 0; - for (auto val : m_sendData) - { - curMax = AZStd::GetMax(curMax, val); - } - - return curMax; - } - - void Reset() - { - m_sendData.clear(); - } - - vector m_sendData; // data sent per second - }; - - enum - { - sHost, sClient1, nSessions - }; - unordered_map m_measurements; -}; - } // namespace UnitTest GM_TEST_SUITE(ReplicaSuite) GM_TEST(InterpolatorTest) - -#if !defined(AZ_DEBUG_BUILD) // these tests are a little slow for debug -GM_TEST(DISABLED_ReplicaBandiwdthTest) -GM_TEST(DISABLED_ReplicaStressTest) -GM_TEST(DISABLED_ReplicaStableStressTest) -#endif - GM_TEST_SUITE_END() diff --git a/Code/Framework/GridMate/Tests/ReplicaBehavior.cpp b/Code/Framework/GridMate/Tests/ReplicaBehavior.cpp index 86f9f4605b..67b5e49df7 100644 --- a/Code/Framework/GridMate/Tests/ReplicaBehavior.cpp +++ b/Code/Framework/GridMate/Tests/ReplicaBehavior.cpp @@ -18,7 +18,6 @@ #include #include #include -#include #include using namespace GridMate; @@ -584,837 +583,5 @@ namespace ReplicaBehavior { AZStd::array m_sessions; }; - /* - * A hook to intercept the payload size of a replica and it's contents. - */ - class ReplicaDrillerHook - : public Debug::ReplicaDrillerBus::Handler - { - public: - ReplicaDrillerHook() - { - } - - void OnSendReplicaEnd(Replica* /*replica*/, const void* /*data*/, size_t len) override - { - m_replicaLengths.push_back(len); - } - - void ResetCounts([[maybe_unused]] bool trace = false) - { -#if defined(AZ_ENABLE_TRACING) - if (trace && m_replicaLengths.size() > 0) - { - AZ_TracePrintf("GridMate", "Driller saw replicas with the following byte sizes:\n"); - for (auto length : m_replicaLengths) - { - AZ_TracePrintf("GridMate", "\t\t\t %d \n", length); - } - } -#endif - - m_replicaLengths.clear(); - } - - AZStd::vector m_replicaLengths; - }; - - template - class FilteredHook : public ReplicaDrillerHook - { - public: - void OnSendReplicaEnd(Replica* replica, const void* /*data*/, size_t len) override - { - if (ContainsChunkTypeWeWant(replica)) - { - m_replicaLengths.push_back(len); - } - } - - private: - bool ContainsChunkTypeWeWant(Replica* replica) const - { - auto numChunks = replica->GetNumChunks(); - for (size_t i = 0; i < numChunks; i++) - { - auto chunk = replica->GetChunkByIndex(i); - if (chunk->GetDescriptor()->GetChunkName() == ReplicaChunkType::GetChunkName()) - { - return true; - } - } - - return false; - } - }; - - /* - * The most basic functionality test for sending datasets that have a default value and have not yet been modified - * from their constructor values. - * - * This is a simple sanity check to ensure the logic sends the update when it's necessary. - */ - class Replica_DontSendDataSets_WithNoDiffFromCtorData - : public SimpleBehaviorTest - { - public: - Replica_DontSendDataSets_WithNoDiffFromCtorData() - : m_replicaIdDefault(InvalidReplicaId), m_replicaIdModified(InvalidReplicaId) - { - } - - enum - { - sHost, - s2, - nSessions - }; - - int GetNumSessions() override { return nSessions; } - - void PreConnect() override - { - m_driller.BusConnect(); - { - ReplicaPtr replica = Replica::CreateReplica(nullptr); - - auto chunk = CreateAndAttachReplicaChunk(replica); - AZ_TEST_ASSERT(chunk); - AZ_TEST_ASSERT(chunk->Data1.IsDefaultValue()); - AZ_TEST_ASSERT(chunk->Data2.IsDefaultValue()); - - m_replicaIdDefault = m_sessions[sHost].GetReplicaMgr().AddPrimary(replica); - } - } - - const int ExpectedReplicaSizeWithDefaults = 37; - const int ExpectedReplicaSizeWithNonDefaults = 46; - - TestStatus Tick(int tick) override - { - switch (tick) - { - case 20: - { - { - ReplicaPtr rep = m_sessions[s2].GetReplicaMgr().FindReplica(m_replicaIdDefault); - AZ_TEST_ASSERT(rep); - - auto chunk = rep->FindReplicaChunk(); - AZ_TEST_ASSERT(chunk); - - auto replicaSize = m_driller.m_replicaLengths[0]; - AZ_TEST_ASSERT(replicaSize == ExpectedReplicaSizeWithDefaults); - m_driller.ResetCounts(); - } - // create another replica with non-default values - { - ReplicaPtr replica = Replica::CreateReplica(nullptr); - - auto chunk = CreateAndAttachReplicaChunk(replica); - AZ_TEST_ASSERT(chunk); - - AZ_TEST_ASSERT(chunk->Data1.IsDefaultValue()); - AZ_TEST_ASSERT(chunk->Data2.IsDefaultValue()); - chunk->Data1.Set(4242); - chunk->Data2.Set(4242); - AZ_TEST_ASSERT(!chunk->Data1.IsDefaultValue()); - AZ_TEST_ASSERT(!chunk->Data2.IsDefaultValue()); - - m_replicaIdModified = m_sessions[sHost].GetReplicaMgr().AddPrimary(replica); - } - break; - } - case 40: - { - { - ReplicaPtr rep = m_sessions[s2].GetReplicaMgr().FindReplica(m_replicaIdModified); - AZ_TEST_ASSERT(rep); - - auto chunk = rep->FindReplicaChunk(); - AZ_TEST_ASSERT(chunk); - - auto replicaSize = m_driller.m_replicaLengths[0]; - AZ_TEST_ASSERT(replicaSize == ExpectedReplicaSizeWithNonDefaults); - m_driller.ResetCounts(); - - // check that non-default values are set for the dataset - { - AZ_TEST_ASSERT(!chunk->Data1.IsDefaultValue()); - auto value = chunk->Data1.Get(); - AZ_TEST_ASSERT(value == 4242); - } - { - AZ_TEST_ASSERT(!chunk->Data2.IsDefaultValue()); - auto value = chunk->Data2.Get(); - AZ_TEST_ASSERT(value == 4242); - } - } - m_driller.ResetCounts(true); - break; - } - case 45: - { - { - m_sessions[sHost].GetReplicaMgr().FindReplica(m_replicaIdDefault)->Destroy(); - m_sessions[sHost].GetReplicaMgr().FindReplica(m_replicaIdModified)->Destroy(); - } - break; - } - case 50: - return TestStatus::Completed; - default: - break; - } - return TestStatus::Running; - } - - ReplicaId m_replicaIdDefault; - ReplicaId m_replicaIdModified; - FilteredHook m_driller; - }; - - TEST(Replica_DontSendDataSets_WithNoDiffFromCtorData, DISABLED_Replica_DontSendDataSets_WithNoDiffFromCtorData) - { - Replica_DontSendDataSets_WithNoDiffFromCtorData tester; - tester.run(); - } - - /* - * This test checks the actual size of the replica as marshalled in the binary payload. - * The assessment of the payload size is done using driller EBus. - */ - class ReplicaDefaultDataSetDriller - : public SimpleBehaviorTest - { - public: - ReplicaDefaultDataSetDriller() - : m_replicaId(InvalidReplicaId) - { - } - - enum - { - sHost, - s2, - nSessions - }; - - int GetNumSessions() override { return nSessions; } - - static const int NonDefaultValue = 4242; - - void PreConnect() override - { - m_driller.BusConnect(); - - ReplicaPtr replica = Replica::CreateReplica(nullptr); - LargeChunkWithDefaults* chunk = CreateAndAttachReplicaChunk(replica); - AZ_TEST_ASSERT(chunk); - - m_replicaId = m_sessions[sHost].GetReplicaMgr().AddPrimary(replica); - } - - ~ReplicaDefaultDataSetDriller() override - { - m_driller.BusDisconnect(); - } - - TestStatus Tick(int tick) override - { - switch (tick) - { - case 10: - { - auto rep = m_sessions[s2].GetReplicaMgr().FindReplica(m_replicaId); - AZ_TEST_ASSERT(rep); - - m_driller.ResetCounts(); - - break; - } - case 15: - { - ReplicaPtr replica = m_sessions[sHost].GetReplicaMgr().FindReplica(m_replicaId); - auto chunk = replica->FindReplicaChunk(); - int nonDefaultValue = NonDefaultValue; - auto touch = [nonDefaultValue](DataSet& dataSet) { dataSet.Set(nonDefaultValue); }; - touch(chunk->Data1); - touch(chunk->Data2); - touch(chunk->Data3); - - m_driller.ResetCounts(); - - break; - } - case 20: - { - auto repLengths = m_driller.m_replicaLengths; - m_driller.ResetCounts(); - - // check exact expected sizes - const auto countUnreliable = 4; - const auto countReliable = 1; - const auto expectedReplicaSize = 22; - - AZ_TEST_ASSERT(repLengths.size() == countUnreliable + countReliable); - for (auto length : repLengths) - { - AZ_TEST_ASSERT(length == expectedReplicaSize); - } - - m_sessions[sHost].GetReplicaMgr().FindReplica(m_replicaId)->Destroy(); - break; - } - case 25: - { - return TestStatus::Completed; - } - default: - break; - } - return TestStatus::Running; - } - - ReplicaDrillerHook m_driller; - ReplicaId m_replicaId; - }; - - const int ReplicaDefaultDataSetDriller::NonDefaultValue; - - TEST(ReplicaDefaultDataSetDriller, DISABLED_ReplicaDefaultDataSetDriller) - { - ReplicaDefaultDataSetDriller tester; - tester.run(); - } - - /* - * This test checks the actual size of the replica as marshalled in the binary payload. - * The assessment of the payload size is done using driller EBus. - */ - class Replica_ComparePackingBoolsVsU8 - : public SimpleBehaviorTest - { - public: - Replica_ComparePackingBoolsVsU8() - : m_replicaBoolsId(InvalidReplicaId) - , m_replicaU8Id(InvalidReplicaId) - { - } - - enum - { - sHost, - s2, - nSessions - }; - - int GetNumSessions() override { return nSessions; } - - void PreConnect() override - { - m_driller.BusConnect(); - - ReplicaPtr replica1 = Replica::CreateReplica(nullptr); - ChunkWithBools* chunk1 = CreateAndAttachReplicaChunk(replica1); - AZ_TEST_ASSERT(chunk1); - - m_replicaBoolsId = m_sessions[sHost].GetReplicaMgr().AddPrimary(replica1); - - ReplicaPtr replica2 = Replica::CreateReplica(nullptr); - ChunkWithShortInts* chunk2 = CreateAndAttachReplicaChunk(replica2); - AZ_TEST_ASSERT(chunk2); - - m_replicaU8Id = m_sessions[sHost].GetReplicaMgr().AddPrimary(replica2); - } - - ~Replica_ComparePackingBoolsVsU8() override - { - m_driller.BusDisconnect(); - } - - TestStatus Tick(int tick) override - { - switch (tick) - { - case 10: - { - auto rep1 = m_sessions[s2].GetReplicaMgr().FindReplica(m_replicaBoolsId); - AZ_TEST_ASSERT(rep1); - auto rep2 = m_sessions[s2].GetReplicaMgr().FindReplica(m_replicaU8Id); - AZ_TEST_ASSERT(rep2); - break; - } - case 15: - { - // we have to poke the values so that they become non-default - { - ReplicaPtr replica = m_sessions[sHost].GetReplicaMgr().FindReplica(m_replicaBoolsId); - auto chunk = replica->FindReplicaChunk(); - - auto touch = [](DataSet& dataSet) { dataSet.Set(true); }; - touch(chunk->Data1); - touch(chunk->Data2); - touch(chunk->Data3); - touch(chunk->Data4); - touch(chunk->Data5); - touch(chunk->Data6); - touch(chunk->Data7); - touch(chunk->Data8); - touch(chunk->Data9); - touch(chunk->Data10); - } - { - ReplicaPtr replica = m_sessions[sHost].GetReplicaMgr().FindReplica(m_replicaU8Id); - auto chunk = replica->FindReplicaChunk(); - - auto touch = [](DataSet& dataSet) { dataSet.Set(42); }; - touch(chunk->Data1); - touch(chunk->Data2); - touch(chunk->Data3); - touch(chunk->Data4); - touch(chunk->Data5); - touch(chunk->Data6); - touch(chunk->Data7); - touch(chunk->Data8); - touch(chunk->Data9); - touch(chunk->Data10); - } - m_driller.ResetCounts(); - - break; - } - case 30: - { - auto repLengths = m_driller.m_replicaLengths; - m_driller.ResetCounts(); - - // check exact expected sizes - const auto expectedReplicaSizeWithBools = 12; - const auto expectedReplicaSizeWithShortInts = 20; - - AZ_TEST_ASSERT(repLengths.size() >= 2); - AZ_TEST_ASSERT(AZStd::find(repLengths.begin(), repLengths.end(), expectedReplicaSizeWithBools)); - AZ_TEST_ASSERT(AZStd::find(repLengths.begin(), repLengths.end(), expectedReplicaSizeWithShortInts)); - - m_sessions[sHost].GetReplicaMgr().FindReplica(m_replicaBoolsId)->Destroy(); - m_sessions[sHost].GetReplicaMgr().FindReplica(m_replicaU8Id)->Destroy(); - break; - } - case 35: - { - //auto boolDatasetSize = m_driller.m_boolChunkLengths[1]; - //auto u8DatasetSize = m_driller.m_u8ChunkLengths[1]; - //AZ_TEST_ASSERT(boolDatasetSize < u8DatasetSize); // Observed example: 5bytes < 13bytes - - return TestStatus::Completed; - } - default: - break; - } - return TestStatus::Running; - } - - ReplicaDrillerHook m_driller; - ReplicaId m_replicaBoolsId; - ReplicaId m_replicaU8Id; - }; - - TEST(Replica_ComparePackingBoolsVsU8, DISABLED_Replica_ComparePackingBoolsVsU8) - { - Replica_ComparePackingBoolsVsU8 tester; - tester.run(); - } - - class CheckDataSetStreamIsntWrittenMoreThanNecessary - : public SimpleBehaviorTest - { - public: - CheckDataSetStreamIsntWrittenMoreThanNecessary() - : m_replicaId(InvalidReplicaId) - { - } - - enum - { - sHost, - s2, - nSessions - }; - - int GetNumSessions() override { return nSessions; } - - static const int NonDefaultValue = 4242; - - void PreConnect() override - { - m_driller.BusConnect(); - - ReplicaPtr replica = Replica::CreateReplica(nullptr); - auto chunk = CreateAndAttachReplicaChunk(replica); - AZ_TEST_ASSERT(chunk); - - m_replicaId = m_sessions[sHost].GetReplicaMgr().AddPrimary(replica); - } - - ~CheckDataSetStreamIsntWrittenMoreThanNecessary() override - { - m_driller.BusDisconnect(); - } - - CustomMarshalerTestChunk::Ptr GetHostChunk() - { - ReplicaPtr replica = m_sessions[sHost].GetReplicaMgr().FindReplica(m_replicaId); - auto chunk = replica->FindReplicaChunk(); - - return chunk; - } - - TestStatus Tick(int tick) override - { - switch (tick) - { - case 10: - { - auto rep = m_sessions[s2].GetReplicaMgr().FindReplica(m_replicaId); - AZ_TEST_ASSERT(rep); - break; - } - case 15: - { - auto chunk = GetHostChunk(); - //chunk->Data1.Set(CustomInt(41)); - - const auto& m = chunk->Data1.GetMarshaler(); - // Only the initial setup call should have occurred - AZ_TEST_ASSERT(m.m_marshalCalls == 1); - m.m_marshalCalls = 0; - m_driller.ResetCounts(); - - break; - } - case 42: - { - auto chunk = GetHostChunk(); - const auto& m = chunk->Data1.GetMarshaler(); - // No reason for any new calls to occur - AZ_TEST_ASSERT(m.m_marshalCalls == 0); - - m_sessions[sHost].GetReplicaMgr().FindReplica(m_replicaId)->Destroy(); - break; - } - case 45: - { - return TestStatus::Completed; - } - default: - break; - } - return TestStatus::Running; - } - - ReplicaDrillerHook m_driller; - ReplicaId m_replicaId; - }; - - TEST(CheckDataSetStreamIsntWrittenMoreThanNecessary, DISABLED_CheckDataSetStreamIsntWrittenMoreThanNecessary) - { - CheckDataSetStreamIsntWrittenMoreThanNecessary tester; - tester.run(); - } - - class CheckDataSetStreamIsntWrittenMoreThanNecessaryOnceDirty - : public SimpleBehaviorTest - { - public: - CheckDataSetStreamIsntWrittenMoreThanNecessaryOnceDirty() - : m_replicaId(InvalidReplicaId) - { - } - - enum - { - sHost, - s2, - nSessions - }; - - int GetNumSessions() override { return nSessions; } - - static const int NonDefaultValue = 4242; - - void PreConnect() override - { - m_driller.BusConnect(); - - ReplicaPtr replica = Replica::CreateReplica(nullptr); - auto chunk = CreateAndAttachReplicaChunk(replica); - AZ_TEST_ASSERT(chunk); - - m_replicaId = m_sessions[sHost].GetReplicaMgr().AddPrimary(replica); - } - - ~CheckDataSetStreamIsntWrittenMoreThanNecessaryOnceDirty() override - { - m_driller.BusDisconnect(); - } - - CustomMarshalerTestChunk::Ptr GetHostChunk() - { - ReplicaPtr replica = m_sessions[sHost].GetReplicaMgr().FindReplica(m_replicaId); - auto chunk = replica->FindReplicaChunk(); - - return chunk; - } - - TestStatus Tick(int tick) override - { - switch (tick) - { - case 10: - { - auto rep = m_sessions[s2].GetReplicaMgr().FindReplica(m_replicaId); - AZ_TEST_ASSERT(rep); - break; - } - case 15: - { - auto chunk = GetHostChunk(); - chunk->Data1.Set(CustomInt(41)); - - const auto& m = chunk->Data1.GetMarshaler(); - // Only the initial setup call - AZ_TEST_ASSERT(m.m_marshalCalls == 1); - m.m_marshalCalls = 0; - m_driller.ResetCounts(); - - break; - } - case 42: - { - auto chunk = GetHostChunk(); - const auto& m = chunk->Data1.GetMarshaler(); - AZ_TEST_ASSERT(m.m_marshalCalls == 6 /* 5 unreliables + 1 reliable */); - - m_sessions[sHost].GetReplicaMgr().FindReplica(m_replicaId)->Destroy(); - break; - } - case 45: - { - return TestStatus::Completed; - } - default: - break; - } - return TestStatus::Running; - } - - ReplicaDrillerHook m_driller; - ReplicaId m_replicaId; - }; - - TEST(CheckDataSetStreamIsntWrittenMoreThanNecessaryOnceDirty, DISABLED_CheckDataSetStreamIsntWrittenMoreThanNecessaryOnceDirty) - { - CheckDataSetStreamIsntWrittenMoreThanNecessaryOnceDirty tester; - tester.run(); - } - - class CheckReplicaIsntSentWithNoChanges - : public SimpleBehaviorTest - { - public: - CheckReplicaIsntSentWithNoChanges() - : m_replicaId(InvalidReplicaId) - { - } - - enum - { - sHost, - s2, - nSessions - }; - - int GetNumSessions() override { return nSessions; } - - void PreConnect() override - { - m_driller.BusConnect(); - - ReplicaPtr replica = Replica::CreateReplica(nullptr); - ForcingDirtyTestChunk* chunk = CreateAndAttachReplicaChunk(replica); - AZ_TEST_ASSERT(chunk); - - m_replicaId = m_sessions[sHost].GetReplicaMgr().AddPrimary(replica); - } - - ~CheckReplicaIsntSentWithNoChanges() override - { - m_driller.BusDisconnect(); - } - - const int NewValue = 999; - const int MomentaryValue = 1; - const int ExpectedNumberReplicasSent = 6; - - ReplicaPtr GetHostReplica() - { - return m_sessions[sHost].GetReplicaMgr().FindReplica(m_replicaId); - } - - TestStatus Tick(int tick) override - { - switch (tick) - { - case 9: - { - auto rep = GetHostReplica(); - AZ_TEST_ASSERT(rep); - m_driller.ResetCounts(); - - auto chunk = rep->FindReplicaChunk(); - chunk->Data1.Set(NewValue); - - break; - } - case 15: - { - auto rep = GetHostReplica(); - AZ_TEST_ASSERT(rep); - - auto counts = m_driller.m_replicaLengths.size(); - AZ_TEST_ASSERT(counts == ExpectedNumberReplicasSent); - m_driller.ResetCounts(); - - auto chunk = rep->FindReplicaChunk(); - chunk->Data1.Set(MomentaryValue); - - break; - } - case 16: - { - auto rep = GetHostReplica(); - AZ_TEST_ASSERT(rep); - auto chunk = rep->FindReplicaChunk(); - chunk->Data1.Set(NewValue); - - auto counts = m_driller.m_replicaLengths.size(); - AZ_TEST_ASSERT(counts == 1); - m_driller.ResetCounts(); - - break; - } - case 100: - { - auto counts = m_driller.m_replicaLengths.size(); - AZ_TEST_ASSERT(counts == ExpectedNumberReplicasSent); - m_driller.ResetCounts(); - - m_sessions[sHost].GetReplicaMgr().FindReplica(m_replicaId)->Destroy(); - return TestStatus::Completed; - } - default: - break; - } - return TestStatus::Running; - } - - FilteredHook m_driller; - ReplicaId m_replicaId; - }; - - TEST(CheckReplicaIsntSentWithNoChanges, DISABLED_CheckReplicaIsntSentWithNoChanges) - { - CheckReplicaIsntSentWithNoChanges tester; - tester.run(); - } - - class CheckEntityScriptReplicaIsntSentWithNoChanges - : public SimpleBehaviorTest - { - public: - CheckEntityScriptReplicaIsntSentWithNoChanges() - : m_replicaId(InvalidReplicaId) - { - } - - enum - { - sHost, - s2, - nSessions - }; - - - int GetNumSessions() override { return nSessions; } - - void PreConnect() override - { - m_driller.BusConnect(); - - ReplicaPtr replica = Replica::CreateReplica(nullptr); - auto chunk = CreateAndAttachReplicaChunk(replica); - AZ_TEST_ASSERT(chunk); - - m_replicaId = m_sessions[sHost].GetReplicaMgr().AddPrimary(replica); - } - - ~CheckEntityScriptReplicaIsntSentWithNoChanges() override - { - m_driller.BusDisconnect(); - } - - const int NewValue = 999; - const int MomentaryValue = 1; - const int ExpectedNumberReplicasSent = 6; - - ReplicaPtr GetHostReplica() - { - return m_sessions[sHost].GetReplicaMgr().FindReplica(m_replicaId); - } - - TestStatus Tick(int tick) override - { - switch (tick) - { - case 10: - { - auto rep = GetHostReplica(); - AZ_TEST_ASSERT(rep); - m_driller.ResetCounts(); - - auto chunk = rep->FindReplicaChunk(); - - // mimicing behavior of entity script chunk - chunk->m_scriptDataSets[0].SetIsEnabled(true); - chunk->m_scriptDataSets[0].Set(NewValue); - - break; - } - case 60: - { - auto counts = m_driller.m_replicaLengths.size(); - AZ_TEST_ASSERT(counts == ExpectedNumberReplicasSent); - m_driller.ResetCounts(); - - m_sessions[sHost].GetReplicaMgr().FindReplica(m_replicaId)->Destroy(); - return TestStatus::Completed; - } - default: - break; - } - return TestStatus::Running; - } - - ReplicaDrillerHook m_driller; - ReplicaId m_replicaId; - }; - - TEST(CheckEntityScriptReplicaIsntSentWithNoChanges, DISABLED_CheckEntityScriptReplicaIsntSentWithNoChanges) - { - CheckEntityScriptReplicaIsntSentWithNoChanges tester; - tester.run(); - } - } // namespace ReplicaBehavior } // namespace UnitTest diff --git a/Code/Framework/GridMate/Tests/ReplicaMedium.cpp b/Code/Framework/GridMate/Tests/ReplicaMedium.cpp index 2e8d2a3a73..b258d7d310 100644 --- a/Code/Framework/GridMate/Tests/ReplicaMedium.cpp +++ b/Code/Framework/GridMate/Tests/ReplicaMedium.cpp @@ -20,7 +20,6 @@ #include #include #include -#include #include #include @@ -525,22 +524,6 @@ public: int m_deactivates; }; -class DrillerTestChunk - : public ReplicaChunk -{ -public: - GM_CLASS_ALLOCATOR(DrillerTestChunk); - typedef AZStd::intrusive_ptr Ptr; - static const char* GetChunkName() { return "DrillerTestChunk"; } - - DrillerTestChunk() { } - - bool IsReplicaMigratable() override - { - return true; - } -}; - class NonConstMarshaler { public: @@ -744,10 +727,6 @@ public: { ReplicaChunkDescriptorTable::Get().RegisterChunkType(); } - if (!ReplicaChunkDescriptorTable::Get().FindReplicaChunkDescriptor(ReplicaChunkClassId(DrillerTestChunk::GetChunkName()))) - { - ReplicaChunkDescriptorTable::Get().RegisterChunkType(); - } if (!ReplicaChunkDescriptorTable::Get().FindReplicaChunkDescriptor(ReplicaChunkClassId(NonConstMarshalerChunk::GetChunkName()))) { ReplicaChunkDescriptorTable::Get().RegisterChunkType(); @@ -1648,440 +1627,6 @@ TEST_F(ReplicaChunkEventsDeactivate, DISABLED_ReplicaChunkEventsDeactivate) }); } - -class ReplicaDriller - : public SimpleTest -{ -public: - ReplicaDriller() - : m_replicaId(InvalidReplicaId) - { - } - - enum - { - sHost, - s2, - nSessions - }; - - class ReplicaDrillerHook - : public Debug::ReplicaDrillerBus::Handler - { - public: - ReplicaDrillerHook() - : m_createdReplicas(0) - , m_destroyedReplicas(0) - , m_activatedReplicas(0) - , m_deactivatedReplicas(0) - , m_attachedChunks(0) - , m_detachedChunks(0) - , m_numReplicaBytesSent(0) - , m_numReplicaBytesReceived(0) - , m_numRequestChangeOwnership(0) - , m_numChangedOwnership(0) - , m_createdChunks(0) - , m_destroyedChunks(0) - , m_activatedChunks(0) - , m_deactivatedChunks(0) - , m_numChunkBytesSent(0) - , m_numChunkBytesReceived(0) - , m_numOutgoingDatasets(0) - , m_numIncomingDatasets(0) - , m_numRpcRequests(0) - , m_numRpcInvokes(0) - , m_outgoingRpcDataSize(0) - , m_incomingRpcDataSize(0) - , m_totalOutgoingBytes(0) - , m_totalIncomingBytes(0) - , m_curReplicaSend(nullptr) - , m_curReplicaChunkSend(nullptr) - , m_curReplicaChunkIndexSend(GM_MAX_CHUNKS_PER_REPLICA) - , m_curReplicaReceive(nullptr) - , m_curReplicaChunkReceive(nullptr) - , m_curReplicaChunkIndexReceive(GM_MAX_CHUNKS_PER_REPLICA) - { - } - - AZStd::size_t m_createdReplicas; - AZStd::size_t m_destroyedReplicas; - AZStd::size_t m_activatedReplicas; - AZStd::size_t m_deactivatedReplicas; - AZStd::size_t m_attachedChunks; - AZStd::size_t m_detachedChunks; - AZStd::size_t m_numReplicaBytesSent; - AZStd::size_t m_numReplicaBytesReceived; - AZStd::size_t m_numRequestChangeOwnership; - AZStd::size_t m_numChangedOwnership; - - AZStd::size_t m_createdChunks; - AZStd::size_t m_destroyedChunks; - AZStd::size_t m_activatedChunks; - AZStd::size_t m_deactivatedChunks; - AZStd::size_t m_numChunkBytesSent; - AZStd::size_t m_numChunkBytesReceived; - - AZStd::size_t m_numOutgoingDatasets; - AZStd::size_t m_numIncomingDatasets; - - AZStd::size_t m_numRpcRequests; - AZStd::size_t m_numRpcInvokes; - AZStd::size_t m_outgoingRpcDataSize; - AZStd::size_t m_incomingRpcDataSize; - - AZStd::size_t m_totalOutgoingBytes; - AZStd::size_t m_totalIncomingBytes; - - Replica* m_curReplicaSend; - ReplicaChunkBase* m_curReplicaChunkSend; - size_t m_curReplicaChunkIndexSend; - Replica* m_curReplicaReceive; - ReplicaChunkBase* m_curReplicaChunkReceive; - AZ::u32 m_curReplicaChunkIndexReceive; - - void OnCreateReplica(Replica* replica) override - { - AZ_TEST_ASSERT(replica); - ++m_createdReplicas; - } - - void OnDestroyReplica(Replica* replica) override - { - AZ_TEST_ASSERT(replica); - ++m_destroyedReplicas; - } - - void OnActivateReplica(Replica* replica) override - { - AZ_TEST_ASSERT(replica); - ++m_activatedReplicas; - } - - void OnDeactivateReplica(Replica* replica) override - { - AZ_TEST_ASSERT(replica); - ++m_deactivatedReplicas; - } - - void OnAttachReplicaChunk(ReplicaChunkBase* chunk) override - { - AZ_TEST_ASSERT(chunk); - ++m_attachedChunks; - } - - void OnDetachReplicaChunk(ReplicaChunkBase* chunk) override - { - AZ_TEST_ASSERT(chunk); - ++m_detachedChunks; - } - - void OnSendReplicaBegin(Replica* replica) override - { - AZ_TEST_ASSERT(replica); - AZ_TEST_ASSERT(m_curReplicaSend == nullptr); - m_curReplicaSend = replica; - } - - void OnSendReplicaEnd(Replica* replica, const void* data, size_t len) override - { - AZ_TEST_ASSERT(replica); - AZ_TEST_ASSERT(replica == m_curReplicaSend); - AZ_TEST_ASSERT(data); - AZ_TEST_ASSERT(len > 0); - m_numReplicaBytesSent += len; - m_curReplicaSend = nullptr; - } - - void OnReceiveReplicaBegin(Replica* replica, const void* data, size_t len) override - { - AZ_TEST_ASSERT(replica); - AZ_TEST_ASSERT(m_curReplicaReceive == nullptr); - AZ_TEST_ASSERT(data); - AZ_TEST_ASSERT(len > 0); - m_curReplicaReceive = replica; - m_numReplicaBytesReceived += len; - } - - void OnReceiveReplicaEnd(Replica* replica) override - { - AZ_TEST_ASSERT(replica); - AZ_TEST_ASSERT(replica == m_curReplicaReceive); - m_curReplicaReceive = nullptr; - } - - void OnRequestReplicaChangeOwnership(Replica* replica, PeerId requestor) override - { - AZ_TEST_ASSERT(replica); - AZ_TEST_ASSERT(requestor == (s2 + 1)); - ++m_numRequestChangeOwnership; - } - - void OnReplicaChangeOwnership(Replica* replica, bool wasPrimary) override - { - AZ_TEST_ASSERT(replica); - switch (m_numChangedOwnership) - { - case 0: // host loses ownership - AZ_TEST_ASSERT(replica->IsProxy() && wasPrimary == true); - break; - case 1: // peer acquires ownership - AZ_TEST_ASSERT(replica->IsPrimary() && wasPrimary == false); - break; - default: - AZ_TEST_ASSERT(0); - } - - ++m_numChangedOwnership; - } - - void OnCreateReplicaChunk(ReplicaChunkBase* chunk) override - { - AZ_TEST_ASSERT(chunk); - ++m_createdChunks; - } - - void OnDestroyReplicaChunk(ReplicaChunkBase* chunk) override - { - AZ_TEST_ASSERT(chunk); - ++m_destroyedChunks; - } - - void OnActivateReplicaChunk(ReplicaChunkBase* chunk) override - { - AZ_TEST_ASSERT(chunk); - ++m_activatedChunks; - } - - void OnDeactivateReplicaChunk(ReplicaChunkBase* chunk) override - { - AZ_TEST_ASSERT(chunk); - ++m_deactivatedChunks; - } - - void OnSendReplicaChunkBegin(ReplicaChunkBase* chunk, AZ::u32 chunkIndex, PeerId from, PeerId to) override - { - (void)from; - (void)to; - - AZ_TEST_ASSERT(chunk); - AZ_TEST_ASSERT(m_curReplicaSend == chunk->GetReplica()); - AZ_TEST_ASSERT(m_curReplicaChunkSend == nullptr); - AZ_TEST_ASSERT(m_curReplicaChunkIndexSend == GM_MAX_CHUNKS_PER_REPLICA); - m_curReplicaChunkSend = chunk; - m_curReplicaChunkIndexSend = chunkIndex; - } - - void OnSendReplicaChunkEnd(ReplicaChunkBase* chunk, AZ::u32 chunkIndex, const void* data, size_t len) override - { - AZ_TEST_ASSERT(chunk); - AZ_TEST_ASSERT(m_curReplicaSend == chunk->GetReplica()); - AZ_TEST_ASSERT(m_curReplicaChunkSend == chunk); - AZ_TEST_ASSERT(m_curReplicaChunkIndexSend == chunkIndex); - AZ_TEST_ASSERT(data); - AZ_TEST_ASSERT(len > 0); - m_numChunkBytesSent += len; - m_curReplicaChunkSend = nullptr; - m_curReplicaChunkIndexSend = GM_MAX_CHUNKS_PER_REPLICA; - - } - - void OnReceiveReplicaChunkBegin(ReplicaChunkBase* chunk, AZ::u32 chunkIndex, PeerId from, PeerId to, const void* data, size_t len) override - { - AZ_TEST_ASSERT(chunk); - AZ_TEST_ASSERT(m_curReplicaReceive == chunk->GetReplica()); - AZ_TEST_ASSERT(m_curReplicaChunkReceive == nullptr); - AZ_TEST_ASSERT(m_curReplicaChunkIndexReceive == GM_MAX_CHUNKS_PER_REPLICA); - AZ_TEST_ASSERT(from); - AZ_TEST_ASSERT(to); - AZ_TEST_ASSERT(data); - AZ_TEST_ASSERT(len > 0); - m_curReplicaChunkReceive = chunk; - m_curReplicaChunkIndexReceive = chunkIndex; - m_numChunkBytesReceived += len; - } - - void OnReceiveReplicaChunkEnd(ReplicaChunkBase* chunk, AZ::u32 chunkIndex) override - { - AZ_TEST_ASSERT(chunk); - AZ_TEST_ASSERT(m_curReplicaReceive == chunk->GetReplica()); - AZ_TEST_ASSERT(m_curReplicaChunkReceive == chunk); - AZ_TEST_ASSERT(m_curReplicaChunkIndexReceive == chunkIndex); - m_curReplicaChunkReceive = nullptr; - m_curReplicaChunkIndexReceive = GM_MAX_CHUNKS_PER_REPLICA; - } - - void OnSendDataSet(ReplicaChunkBase* chunk, AZ::u32 chunkIndex, DataSetBase* dataSet, PeerId from, PeerId to, const void* data, size_t len) override - { - AZ_TEST_ASSERT(chunk); - AZ_TEST_ASSERT(m_curReplicaChunkSend == chunk); - AZ_TEST_ASSERT(m_curReplicaChunkIndexSend == chunkIndex); - AZ_TEST_ASSERT(dataSet); - AZ_TEST_ASSERT(from); - AZ_TEST_ASSERT(to); - AZ_TEST_ASSERT(data); - AZ_TEST_ASSERT(len > 0); - - ++m_numOutgoingDatasets; - } - - void OnReceiveDataSet(ReplicaChunkBase* chunk, AZ::u32 chunkIndex, DataSetBase* dataSet, PeerId from, PeerId to, const void* data, size_t len) override - { - AZ_TEST_ASSERT(chunk); - AZ_TEST_ASSERT(m_curReplicaChunkReceive == chunk); - AZ_TEST_ASSERT(m_curReplicaChunkIndexReceive == chunkIndex); - AZ_TEST_ASSERT(dataSet); - AZ_TEST_ASSERT(from); - AZ_TEST_ASSERT(to); - AZ_TEST_ASSERT(data); - AZ_TEST_ASSERT(len > 0); - - ++m_numIncomingDatasets; - } - - void OnRequestRpc(ReplicaChunkBase* chunk, Internal::RpcRequest* rpc) override - { - (void)chunk; - (void)rpc; - ++m_numRpcRequests; - } - - void OnInvokeRpc(ReplicaChunkBase* chunk, Internal::RpcRequest* rpc) override - { - (void)chunk; - (void)rpc; - ++m_numRpcInvokes; - } - - void OnSendRpc(ReplicaChunkBase* chunk, AZ::u32 chunkIndex, Internal::RpcRequest* rpc, PeerId from, PeerId to, const void* data, size_t len) override - { - AZ_TEST_ASSERT(chunk); - AZ_TEST_ASSERT(m_curReplicaChunkSend == chunk); - AZ_TEST_ASSERT(m_curReplicaChunkIndexSend == chunkIndex); - AZ_TEST_ASSERT(rpc); - AZ_TEST_ASSERT(from); - AZ_TEST_ASSERT(to); - AZ_TEST_ASSERT(data); - AZ_TEST_ASSERT(len > 0); - m_outgoingRpcDataSize += len; - } - - void OnReceiveRpc(ReplicaChunkBase* chunk, AZ::u32 chunkIndex, Internal::RpcRequest* rpc, PeerId from, PeerId to, const void* data, size_t len) override - { - AZ_TEST_ASSERT(chunk); - AZ_TEST_ASSERT(m_curReplicaChunkReceive == chunk); - AZ_TEST_ASSERT(m_curReplicaChunkIndexReceive == chunkIndex); - AZ_TEST_ASSERT(rpc); - AZ_TEST_ASSERT(from); - AZ_TEST_ASSERT(to); - AZ_TEST_ASSERT(data); - AZ_TEST_ASSERT(len > 0); - m_incomingRpcDataSize += len; - } - - void OnSend(PeerId to, const void* data, size_t len, bool isReliable) override - { - (void)to; // peerId might not be valid at this point, e.g. handshake (Cmd_Greetings) did not accomplish yet - (void)isReliable; - AZ_TEST_ASSERT(data); - AZ_TEST_ASSERT(len > 0); - m_totalOutgoingBytes += len; - } - - void OnReceive(PeerId from, const void* data, size_t len) override - { - (void)from; // peerId might not be valid at this point, e.g. handshake (Cmd_Greetings) did not accomplish yet - AZ_TEST_ASSERT(data); - AZ_TEST_ASSERT(len > 0); - m_totalIncomingBytes += len; - } - }; - - int GetNumSessions() override { return nSessions; } - - void PreConnect() override - { - m_driller.BusConnect(); - - ReplicaPtr replica = Replica::CreateReplica(nullptr); - CreateAndAttachReplicaChunk(replica); - m_replicaId = m_sessions[sHost].GetReplicaMgr().AddPrimary(replica); - } - - ~ReplicaDriller() override - { - m_driller.BusDisconnect(); - } - - ReplicaDrillerHook m_driller; - ReplicaId m_replicaId; -}; - -TEST_F(ReplicaDriller, DISABLED_ReplicaDriller) -{ - RunTickLoop([this](int tick)-> TestStatus - { - switch (tick) - { - case 10: - { - auto rep = m_sessions[s2].GetReplicaMgr().FindReplica(m_replicaId); - AZ_TEST_ASSERT(rep); - AZ_TEST_ASSERT(rep->IsProxy()); - rep->RequestChangeOwnership(); - break; - } - case 30: - { - auto rep = m_sessions[s2].GetReplicaMgr().FindReplica(m_replicaId); - AZ_TEST_ASSERT(rep); - AZ_TEST_ASSERT(rep->IsPrimary()); - rep->Destroy(); - break; - } - case 40: - // replicas - AZ_TEST_ASSERT(m_driller.m_createdReplicas > 0); - AZ_TEST_ASSERT(m_driller.m_destroyedReplicas > 0); - AZ_TEST_ASSERT(m_driller.m_activatedReplicas > 0); - AZ_TEST_ASSERT(m_driller.m_deactivatedReplicas > 0); - AZ_TEST_ASSERT(m_driller.m_numReplicaBytesSent > 0); - AZ_TEST_ASSERT(m_driller.m_numReplicaBytesReceived > 0); - AZ_TEST_ASSERT(m_driller.m_numRequestChangeOwnership == 1); - AZ_TEST_ASSERT(m_driller.m_numChangedOwnership == 2); // two because one call for host & one for peer - - // chunks - AZ_TEST_ASSERT(m_driller.m_createdChunks >= m_driller.m_createdReplicas); - AZ_TEST_ASSERT(m_driller.m_destroyedChunks >= m_driller.m_destroyedReplicas); - AZ_TEST_ASSERT(m_driller.m_activatedChunks >= m_driller.m_activatedReplicas); - AZ_TEST_ASSERT(m_driller.m_deactivatedChunks >= m_driller.m_deactivatedReplicas); - AZ_TEST_ASSERT(m_driller.m_attachedChunks > 0); - AZ_TEST_ASSERT(m_driller.m_detachedChunks > 0); - AZ_TEST_ASSERT(m_driller.m_numChunkBytesReceived > 0); - - AZ_TEST_ASSERT(m_driller.m_numChunkBytesSent > 0); - AZ_TEST_ASSERT(m_driller.m_numChunkBytesReceived > 0); - - // datasets - AZ_TEST_ASSERT(m_driller.m_numOutgoingDatasets > 0); - AZ_TEST_ASSERT(m_driller.m_numIncomingDatasets > 0); - - // rpcs - AZ_TEST_ASSERT(m_driller.m_numRpcRequests > 0); - AZ_TEST_ASSERT(m_driller.m_numRpcInvokes > 0); - AZ_TEST_ASSERT(m_driller.m_outgoingRpcDataSize > 0); - AZ_TEST_ASSERT(m_driller.m_incomingRpcDataSize > 0); - - // data - AZ_TEST_ASSERT(m_driller.m_totalOutgoingBytes > 0); - AZ_TEST_ASSERT(m_driller.m_totalIncomingBytes > 0); - return TestStatus::Completed; - default: break; - } - return TestStatus::Running; - }); -} - - class DataSetChangedTest : public SimpleTest { @@ -2403,114 +1948,6 @@ TEST_F(SourcePeerTest, DISABLED_SourcePeerTest) }); } - -class SendWithPriority - : public SimpleTest -{ -public: - enum - { - sHost, - s2, - nSessions - }; - - class PriorityChunk - : public ReplicaChunk - { - public: - GM_CLASS_ALLOCATOR(PriorityChunk); - typedef AZStd::intrusive_ptr Ptr; - static const char* GetChunkName() { return "PriorityChunk"; } - - PriorityChunk() - : m_value("Value") - { - } - - bool IsReplicaMigratable() override { return false; } - - DataSet m_value; - }; - - class ReplicaDrillerHook - : public Debug::ReplicaDrillerBus::Handler - { - public: - ReplicaDrillerHook() - : m_expectedSendValue(SendWithPriority::kNumReplicas) - , m_expectedRecvValue(SendWithPriority::kNumReplicas) - { - } - - void OnReceiveReplicaEnd(Replica* replica) override - { - auto chunk = replica->FindReplicaChunk(); - if (chunk && m_expectedRecvValue > 0) - { - AZ_TEST_ASSERT(chunk->m_value.Get() == m_expectedRecvValue); // checking reverse order - --m_expectedRecvValue; - } - } - - void OnSendReplicaEnd(Replica* replica, const void* data, size_t len) override - { - (void)data; - (void)len; - - auto chunk = replica->FindReplicaChunk(); - if (chunk && m_expectedSendValue > 0) - { - AZ_TEST_ASSERT(chunk->m_value.Get() == m_expectedSendValue); // checking reverse order - --m_expectedSendValue; - } - } - - int m_expectedSendValue; - int m_expectedRecvValue; - }; - - int GetNumSessions() override { return nSessions; } - - void PreConnect() override - { - ReplicaChunkDescriptorTable::Get().RegisterChunkType(); - - m_driller.BusConnect(); - - for (unsigned i = 0; i < kNumReplicas; ++i) - { - ReplicaPtr replica = Replica::CreateReplica(nullptr); - m_chunks[i] = CreateAndAttachReplicaChunk(replica); - m_chunks[i]->m_value.Set(i + 1); // setting dataset values to 1..kNumReplicas - m_chunks[i]->SetPriority(k_replicaPriorityNormal + static_cast(i)); // the later created - the higher priorities, so should be sent in reverse order - m_sessions[sHost].GetReplicaMgr().AddPrimary(replica); - } - } - - - static const size_t kNumReplicas = 5; - - ReplicaDrillerHook m_driller; - PriorityChunk::Ptr m_chunks[kNumReplicas]; -}; - -TEST_F(SendWithPriority, DISABLED_SendWithPriority) -{ - RunTickLoop([this](int tick)-> TestStatus - { - if (tick == 20) - { - AZ_TEST_ASSERT(m_driller.m_expectedSendValue == 0); // sent all the replicas in the right order - AZ_TEST_ASSERT(m_driller.m_expectedRecvValue == 0); // received all the replicas in the right order - return TestStatus::Completed; - } - - return TestStatus::Running; - }); -} - - class SuspendUpdatesTest : public SimpleTest { @@ -2787,75 +2224,6 @@ TEST_F(BasicHostChunkDescriptorTest, DISABLED_BasicHostChunkDescriptorTest) } } -/* - * Create and immedietly destroy primary replica - * Test that it does not result in any network sync -*/ -class CreateDestroyPrimary - : public SimpleTest - , public Debug::ReplicaDrillerBus::Handler -{ -public: - enum - { - sHost, - s2, - nSessions - }; - - int GetNumSessions() override { return nSessions; } - - - // ReplicaDrillerBus - void OnReceive(PeerId from, const void* data, size_t len) override - { - (void)from; - (void)data; - (void)len; - - AZ_TEST_ASSERT(false); // should not receive any replica data - } - - void ConnectDriller() - { - Debug::ReplicaDrillerBus::Handler::BusConnect(); - } - - void DisconnectDriller() - { - Debug::ReplicaDrillerBus::Handler::BusDisconnect(); - } -}; - -TEST_F(CreateDestroyPrimary, DISABLED_CreateDestroyPrimary) -{ - RunTickLoop([this](int tick)-> TestStatus - { - switch (tick) - { - - case 10: - { - ConnectDriller(); - auto replica = Replica::CreateReplica(nullptr); - CreateAndAttachReplicaChunk(replica); - m_sessions[sHost].GetReplicaMgr().AddPrimary(replica); - - // Destroying replica right away - replica->Destroy(); - break; - } - - case 20: - DisconnectDriller(); - return TestStatus::Completed; - default: break; - } - - return TestStatus::Running; - }); -} - /* * This test checks that when the carrier ACKs a message it feeds back to the ReplicaTarget. * The ReplicaTarget will prevent sending more updates. @@ -2884,8 +2252,6 @@ public: void PreConnect() override { - m_driller.BusConnect(); - ReplicaPtr replica = Replica::CreateReplica("ReplicaACKfeedbackTest"); LargeChunkWithDefaultsMedium* chunk = CreateAndAttachReplicaChunk(replica); AZ_TEST_ASSERT(chunk); @@ -2895,12 +2261,9 @@ public: ~ReplicaACKfeedbackTestFixture() override { - m_driller.BusDisconnect(); } - size_t m_replicaBytesSentPrev = 0; ReplicaId m_replicaId; - ReplicaDriller::ReplicaDrillerHook m_driller; }; TEST_F(ReplicaACKfeedbackTestFixture, ReplicaACKfeedbackTest) @@ -2912,7 +2275,6 @@ TEST_F(ReplicaACKfeedbackTestFixture, ReplicaACKfeedbackTest) return TestStatus::Completed; } - //AZ_Printf("GridMateTests", "%d %d\n", tick, m_driller.m_numReplicaBytesSent); // Tests the Revision stamp with Carrier ACK feedback // result is true on the immediate tick after changing, but false on the next and stays false until next change auto CheckHostReplicaChanged = [this](bool result) @@ -2963,12 +2325,10 @@ TEST_F(ReplicaACKfeedbackTestFixture, ReplicaACKfeedbackTest) updateDataSets(chunk, NonDefaultValue); - m_replicaBytesSentPrev = m_driller.m_numReplicaBytesSent; CheckHostReplicaChanged(false); //Changed now, but wont know until next prepareData() }break; case 16: { - AZ_TEST_ASSERT(m_driller.m_numReplicaBytesSent - m_replicaBytesSentPrev == k_updateBytes); CheckHostReplicaChanged(true); //Detected change. ACK feedback on next tick returns to false. }break; case 20: @@ -2978,12 +2338,10 @@ TEST_F(ReplicaACKfeedbackTestFixture, ReplicaACKfeedbackTest) updateDataSets(chunk, NonDefaultValue + 1); - m_replicaBytesSentPrev = m_driller.m_numReplicaBytesSent; CheckHostReplicaChanged(false); //Changed now, but wont know until next prepareData() }break; case 21: { - AZ_TEST_ASSERT(m_driller.m_numReplicaBytesSent - m_replicaBytesSentPrev == k_updateBytes); CheckHostReplicaChanged(true); //Detected change. ACK feedback on next tick returns to false. }break; case 25: diff --git a/Code/Framework/GridMate/Tests/ReplicaSmall.cpp b/Code/Framework/GridMate/Tests/ReplicaSmall.cpp index d71789ae90..7e058d5c6f 100644 --- a/Code/Framework/GridMate/Tests/ReplicaSmall.cpp +++ b/Code/Framework/GridMate/Tests/ReplicaSmall.cpp @@ -453,7 +453,6 @@ public: // replicaHeader += 16; //#endif // const int marshalDataSize = 48; //Data plus length - //Only for Driller ReplicaManager rm; ReplicaPeer peer(&rm); diff --git a/Code/Framework/GridMate/Tests/Tests.h b/Code/Framework/GridMate/Tests/Tests.h index 7e1638c5e5..f3583c22eb 100644 --- a/Code/Framework/GridMate/Tests/Tests.h +++ b/Code/Framework/GridMate/Tests/Tests.h @@ -18,18 +18,8 @@ #include #include -#include -#include - #include -#define GM_TEST_MEMORY_DRILLING 0 -////////////////////////////////////////////////////////////////////////// -// Drillers -#include - -#define AZ_ROOT_TEST_FOLDER "" - #include ////////////////////////////////////////////////////////////////////////// @@ -50,9 +40,6 @@ namespace UnitTest { protected: GridMate::IGridMate* m_gridMate; - AZ::Debug::DrillerSession* m_drillerSession; - AZ::Debug::DrillerOutputFileStream* m_drillerStream; - AZ::Debug::DrillerManager* m_drillerManager; private: using Platform = GridMateTestFixture_Platform; @@ -60,25 +47,15 @@ namespace UnitTest public: GridMateTestFixture([[maybe_unused]] unsigned int memorySize = 100 * 1024 * 1024) : m_gridMate(nullptr) - , m_drillerSession(nullptr) - , m_drillerStream(nullptr) - , m_drillerManager(nullptr) { GridMate::GridMateDesc desc; -#if GM_TEST_MEMORY_DRILLING - m_drillerManager = AZ::Debug::DrillerManager::Create(); - m_drillerManager->Register(aznew AZ::Debug::MemoryDriller); - - desc.m_allocatorDesc.m_allocationRecords = true; -#endif AZ::AllocatorInstance::Create(); //desc.m_autoInitPlatformNetModules = false; m_gridMate = GridMateCreate(desc); AZ_TEST_ASSERT(m_gridMate != NULL); - m_drillerSession = NULL; - + AZ::AllocatorManager::Instance().EnterProfilingMode(); AZ::Debug::AllocationRecords* records = AZ::AllocatorInstance::GetAllocator().GetRecords(); if (records) { @@ -99,12 +76,7 @@ namespace UnitTest } AZ::AllocatorInstance::Destroy(); - - if (m_drillerManager) - { - AZ::Debug::DrillerManager::Destroy(m_drillerManager); - m_drillerManager = nullptr; - } + AZ::AllocatorManager::Instance().ExitProfilingMode(); } void Update() diff --git a/Code/LauncherUnified/Launcher.cpp b/Code/LauncherUnified/Launcher.cpp index 0f832ff1a5..9dfd6213c4 100644 --- a/Code/LauncherUnified/Launcher.cpp +++ b/Code/LauncherUnified/Launcher.cpp @@ -25,9 +25,7 @@ #include -#include #include -#include #include #include @@ -80,146 +78,6 @@ namespace } } -#if AZ_TRAIT_LAUNCHER_USE_CRY_DYNAMIC_MODULE_HANDLE - // mimics AZ::DynamicModuleHandle but uses CryLibrary under the hood, - // which is necessary to properly load legacy Cry libraries on some platforms - class DynamicModuleHandle - { - public: - AZ_CLASS_ALLOCATOR(DynamicModuleHandle, AZ::OSAllocator, 0) - - static AZStd::unique_ptr Create(const char* fullFileName) - { - return AZStd::unique_ptr(aznew DynamicModuleHandle(fullFileName)); - } - - DynamicModuleHandle(const DynamicModuleHandle&) = delete; - DynamicModuleHandle& operator=(const DynamicModuleHandle&) = delete; - - ~DynamicModuleHandle() - { - Unload(); - } - - // argument is strictly to match the API of AZ::DynamicModuleHandle - bool Load(bool unused) - { - AZ_UNUSED(unused); - - if (IsLoaded()) - { - return true; - } - - m_moduleHandle = CryLoadLibrary(m_fileName.c_str()); - return IsLoaded(); - } - - bool Unload() - { - if (!IsLoaded()) - { - return false; - } - - return CryFreeLibrary(m_moduleHandle); - } - - bool IsLoaded() const - { - return m_moduleHandle != nullptr; - } - - const AZ::OSString& GetFilename() const - { - return m_fileName; - } - - template - Function GetFunction(const char* functionName) const - { - if (IsLoaded()) - { - return reinterpret_cast(CryGetProcAddress(m_moduleHandle, functionName)); - } - else - { - return nullptr; - } - } - - - private: - DynamicModuleHandle(const char* fileFullName) - : m_fileName() - , m_moduleHandle(nullptr) - { - m_fileName = AZ::OSString::format("%s%s%s", - CrySharedLibraryPrefix, fileFullName, CrySharedLibraryExtension); - } - - AZ::OSString m_fileName; - HMODULE m_moduleHandle; - }; -#else - // mimics AZ::DynamicModuleHandle but also calls InjectEnvironmentFunction on - // the loaded module which is necessary to properly load legacy Cry libraries - class DynamicModuleHandle - { - public: - AZ_CLASS_ALLOCATOR(DynamicModuleHandle, AZ::OSAllocator, 0); - - static AZStd::unique_ptr Create(const char* fullFileName) - { - return AZStd::unique_ptr(aznew DynamicModuleHandle(fullFileName)); - } - - bool Load(bool isInitializeFunctionRequired) - { - const bool loaded = m_moduleHandle->Load(isInitializeFunctionRequired); - if (loaded) - { - // We need to inject the environment first thing so that allocators are available immediately - InjectEnvironmentFunction injectEnv = GetFunction(INJECT_ENVIRONMENT_FUNCTION); - if (injectEnv) - { - auto env = AZ::Environment::GetInstance(); - injectEnv(env); - } - } - return loaded; - } - - bool Unload() - { - bool unloaded = m_moduleHandle->Unload(); - if (unloaded) - { - DetachEnvironmentFunction detachEnv = GetFunction(DETACH_ENVIRONMENT_FUNCTION); - if (detachEnv) - { - detachEnv(); - } - } - return unloaded; - } - - template - Function GetFunction(const char* functionName) const - { - return m_moduleHandle->GetFunction(functionName); - } - - private: - DynamicModuleHandle(const char* fileFullName) - : m_moduleHandle(AZ::DynamicModuleHandle::Create(fileFullName)) - { - } - - AZStd::unique_ptr m_moduleHandle; - }; -#endif // AZ_TRAIT_LAUNCHER_USE_CRY_DYNAMIC_MODULE_HANDLE - void RunMainLoop(AzGameFramework::GameApplication& gameApplication) { // Ideally we'd just call GameApplication::RunMainLoop instead, but @@ -254,7 +112,7 @@ namespace } // Update the AzFramework application tick bus - gameApplication.Tick(gEnv->pTimer->GetFrameTime()); + gameApplication.Tick(); // Post-update CrySystem if (system) @@ -369,55 +227,68 @@ namespace O3DELauncher } } - void CompileCriticalAssets(); void CreateRemoteFileIO(); - bool ConnectToAssetProcessor() - { - bool connectedToAssetProcessor{}; - // When the AssetProcessor is already launched it should take less than a second to perform a connection - // but when the AssetProcessor needs to be launch it could take up to 15 seconds to have the AssetProcessor initialize - // and able to negotiate a connection when running a debug build - // and to negotiate a connection - // Setting the connectTimeout to 3 seconds if not set within the settings registry - - AzFramework::AssetSystem::ConnectionSettings connectionSettings; - AzFramework::AssetSystem::ReadConnectionSettingsFromSettingsRegistry(connectionSettings); - - connectionSettings.m_launchAssetProcessorOnFailedConnection = true; - connectionSettings.m_connectionIdentifier = AzFramework::AssetSystem::ConnectionIdentifiers::Game; - connectionSettings.m_loggingCallback = []([[maybe_unused]] AZStd::string_view logData) - { - AZ_TracePrintf("Launcher", "%.*s", aznumeric_cast(logData.size()), logData.data()); - }; - - AzFramework::AssetSystemRequestBus::BroadcastResult(connectedToAssetProcessor, &AzFramework::AssetSystemRequestBus::Events::EstablishAssetProcessorConnection, connectionSettings); - - if (connectedToAssetProcessor) - { - AZ_TracePrintf("Launcher", "Connected to Asset Processor\n"); - CreateRemoteFileIO(); - CompileCriticalAssets(); - } - - return connectedToAssetProcessor; - } - - //! Compiles the critical assets that are within the Engine directory of Open 3D Engine - //! This code should be in a centralized location, but doesn't belong in AzFramework - //! since it is specific to how Open 3D Engine projects has assets setup + // This function make sure the launcher has signaled the "CriticalAssetsCompiled" + // lifecycle event as well as to load the "assetcatalog.xml" file if it exists void CompileCriticalAssets() { - // VERY early on, as soon as we can, request that the asset system make sure the following assets take priority over others, - // so that by the time we ask for them there is a greater likelihood that they're already good to go. - // these can be loaded later but are still important: - AzFramework::AssetSystemRequestBus::Broadcast(&AzFramework::AssetSystem::AssetSystemRequests::EscalateAssetBySearchTerm, "/texturemsg/"); - AzFramework::AssetSystemRequestBus::Broadcast(&AzFramework::AssetSystem::AssetSystemRequests::EscalateAssetBySearchTerm, "engineassets/materials"); - AzFramework::AssetSystemRequestBus::Broadcast(&AzFramework::AssetSystem::AssetSystemRequests::EscalateAssetBySearchTerm, "engineassets/geomcaches"); - AzFramework::AssetSystemRequestBus::Broadcast(&AzFramework::AssetSystem::AssetSystemRequests::EscalateAssetBySearchTerm, "engineassets/objects"); + if (auto settingsRegistry = AZ::SettingsRegistry::Get(); settingsRegistry != nullptr) + { + AZ::ComponentApplicationLifecycle::SignalEvent(*settingsRegistry, "CriticalAssetsCompiled", R"({})"); + // Reload the assetcatalog.xml at this point again + // Start Monitoring Asset changes over the network and load the AssetCatalog + auto LoadCatalog = [settingsRegistry](AZ::Data::AssetCatalogRequests* assetCatalogRequests) + { + if (AZ::IO::FixedMaxPath assetCatalogPath; + settingsRegistry->Get(assetCatalogPath.Native(), AZ::SettingsRegistryMergeUtils::FilePathKey_CacheRootFolder)) + { + assetCatalogPath /= "assetcatalog.xml"; + assetCatalogRequests->LoadCatalog(assetCatalogPath.c_str()); + } + }; + AZ::Data::AssetCatalogRequestBus::Broadcast(AZStd::move(LoadCatalog)); + } + } - // some are specifically extra important and will cause issues if missing completely: - AzFramework::AssetSystemRequestBus::Broadcast(&AzFramework::AssetSystem::AssetSystemRequests::CompileAssetSync, "engineassets/objects/default.cgf"); + // If the connect option is false, this function will return true + // to make sure the Launcher passes the connected to AP check + // If REMOTE_ASSET_PROCESSOR is not defined, then the launcher doesn't need + // to connect to the AssetProcessor and therefore this function returns true + bool ConnectToAssetProcessor([[maybe_unused]] bool connect) + { + bool connectedToAssetProcessor = true; +#if defined(REMOTE_ASSET_PROCESSOR) + if (connect) + { + // When the AssetProcessor is already launched it should take less than a second to perform a connection + // but when the AssetProcessor needs to be launch it could take up to 15 seconds to have the AssetProcessor initialize + // and able to negotiate a connection when running a debug build + // and to negotiate a connection + // Setting the connectTimeout to 3 seconds if not set within the settings registry + + AzFramework::AssetSystem::ConnectionSettings connectionSettings; + AzFramework::AssetSystem::ReadConnectionSettingsFromSettingsRegistry(connectionSettings); + + connectionSettings.m_launchAssetProcessorOnFailedConnection = true; + connectionSettings.m_connectionIdentifier = AzFramework::AssetSystem::ConnectionIdentifiers::Game; + connectionSettings.m_loggingCallback = []([[maybe_unused]] AZStd::string_view logData) + { + AZ_TracePrintf("Launcher", "%.*s", aznumeric_cast(logData.size()), logData.data()); + }; + + AzFramework::AssetSystemRequestBus::BroadcastResult(connectedToAssetProcessor, &AzFramework::AssetSystemRequestBus::Events::EstablishAssetProcessorConnection, connectionSettings); + + if (connectedToAssetProcessor) + { + AZ_TracePrintf("Launcher", "Connected to Asset Processor\n"); + CreateRemoteFileIO(); + } + } + +#endif + CompileCriticalAssets(); + return connectedToAssetProcessor; } //! Remote FileIO to use as a Virtual File System @@ -564,25 +435,21 @@ namespace O3DELauncher gameApplication.Start({}, gameApplicationStartupParams); -#if defined(REMOTE_ASSET_PROCESSOR) - bool allowedEngineConnection = !systemInitParams.bToolMode && !systemInitParams.bTestMode && bg_ConnectToAssetProcessor; //connect to the asset processor using the bootstrap values - if (allowedEngineConnection) + const bool allowedEngineConnection = !systemInitParams.bToolMode && !systemInitParams.bTestMode && bg_ConnectToAssetProcessor; + if (!ConnectToAssetProcessor(allowedEngineConnection)) { - if (!ConnectToAssetProcessor()) + AZ::s64 waitForConnect{}; + AZ::SettingsRegistryMergeUtils::PlatformGet(*settingsRegistry, waitForConnect, + AZ::SettingsRegistryMergeUtils::BootstrapSettingsRootKey, "wait_for_connect"); + if (waitForConnect != 0) { - AZ::s64 waitForConnect{}; - AZ::SettingsRegistryMergeUtils::PlatformGet(*settingsRegistry, waitForConnect, - AZ::SettingsRegistryMergeUtils::BootstrapSettingsRootKey, "wait_for_connect"); - if (waitForConnect != 0) - { - AZ_Error("Launcher", false, "Failed to connect to AssetProcessor."); - return ReturnCode::ErrAssetProccessor; - } + AZ_Error("Launcher", false, "Failed to connect to AssetProcessor."); + return ReturnCode::ErrAssetProccessor; } } -#endif + AZ_Assert(AZ::AllocatorInstance::IsReady(), "System allocator was not created or creation failed."); //Initialize the Debug trace instance to create necessary environment variables AZ::Debug::Trace::Instance().Init(); @@ -649,13 +516,13 @@ namespace O3DELauncher // Create CrySystem. #if !defined(AZ_MONOLITHIC_BUILD) - AZStd::unique_ptr crySystemLibrary; - PFNCREATESYSTEMINTERFACE CreateSystemInterface = nullptr; - - crySystemLibrary = DynamicModuleHandle::Create("CrySystem"); - if (crySystemLibrary->Load(false)) + constexpr const char* crySystemLibraryName = AZ_TRAIT_OS_DYNAMIC_LIBRARY_PREFIX "CrySystem" AZ_TRAIT_OS_DYNAMIC_LIBRARY_EXTENSION; + AZStd::unique_ptr crySystemLibrary = AZ::DynamicModuleHandle::Create(crySystemLibraryName); + if (crySystemLibrary->Load(true)) { - CreateSystemInterface = crySystemLibrary->GetFunction("CreateSystemInterface"); + PFNCREATESYSTEMINTERFACE CreateSystemInterface = + crySystemLibrary->GetFunction("CreateSystemInterface"); + if (CreateSystemInterface) { systemInitParams.pSystem = CreateSystemInterface(systemInitParams); diff --git a/Code/LauncherUnified/Platform/Android/Launcher_Android.cpp b/Code/LauncherUnified/Platform/Android/Launcher_Android.cpp index de548a49d7..0890b5a193 100644 --- a/Code/LauncherUnified/Platform/Android/Launcher_Android.cpp +++ b/Code/LauncherUnified/Platform/Android/Launcher_Android.cpp @@ -299,7 +299,7 @@ void android_main(android_app* appState) { // Adding a start up banner so you can see when the game is starting up in amongst the logcat spam LOGI("****************************************************************"); - LOGI("* Amazon Lumberyard - Launching Game... *"); + LOGI("* Launching Game... *"); LOGI("****************************************************************"); // setup the system command handler which are guaranteed to be called on the same diff --git a/Code/LauncherUnified/Platform/Common/UnixLike/Launcher_UnixLike.cpp b/Code/LauncherUnified/Platform/Common/UnixLike/Launcher_UnixLike.cpp index b873f30c6d..4e121f149c 100644 --- a/Code/LauncherUnified/Platform/Common/UnixLike/Launcher_UnixLike.cpp +++ b/Code/LauncherUnified/Platform/Common/UnixLike/Launcher_UnixLike.cpp @@ -49,18 +49,17 @@ namespace rlimit limit; if (getrlimit(resource, &limit) != 0) { - AZ_Error("Launcher", false, "[ERROR] Failed to get limit for resource %d. Error: %s", resource, strerror(errno)); - return false; + AZ_Warning("Launcher", false, "[WARNING] Unable to get limit for resource %d. Error: %s", resource, strerror(errno)); } if (updateLimit(limit)) { if (setrlimit(resource, &limit) != 0) { - AZ_Error("Launcher", false, "[ERROR] Failed to update resource limit for resource %d. Error: %s", resource, strerror(errno)); - return false; + AZ_Warning("Launcher", false, "[WARNING] Unable to update resource limit for resource %d. Error: %s", resource, strerror(errno)); } } + return true; } } diff --git a/Code/LauncherUnified/Platform/Linux/Launcher_Linux.cpp b/Code/LauncherUnified/Platform/Linux/Launcher_Linux.cpp index 3030dcc740..e210a59738 100644 --- a/Code/LauncherUnified/Platform/Linux/Launcher_Linux.cpp +++ b/Code/LauncherUnified/Platform/Linux/Launcher_Linux.cpp @@ -12,8 +12,6 @@ #include // for AZ_MAX_PATH_LEN #include -#include - #include #include #include @@ -86,17 +84,6 @@ int main(int argc, char** argv) using namespace O3DELauncher; -#if !defined(AZ_MONOLITHIC_BUILD) - char exePath[AZ_MAX_PATH_LEN] = { 0 }; - if (readlink("/proc/self/exe", exePath, AZ_MAX_PATH_LEN) == -1) - { - return static_cast(ReturnCode::ErrExePath); - } - - char* runDir = dirname(exePath); - SetModulePath(runDir); -#endif // !defined(AZ_MONOLITHIC_BUILD) - PlatformMainInfo mainInfo; mainInfo.m_updateResourceLimits = IncreaseResourceLimits; diff --git a/Code/LauncherUnified/Platform/Windows/Launcher_Windows.cpp b/Code/LauncherUnified/Platform/Windows/Launcher_Windows.cpp index d1e6a69e5e..0d0ca3e8b0 100644 --- a/Code/LauncherUnified/Platform/Windows/Launcher_Windows.cpp +++ b/Code/LauncherUnified/Platform/Windows/Launcher_Windows.cpp @@ -7,7 +7,6 @@ */ #include -#include #include #include @@ -43,24 +42,6 @@ int APIENTRY WinMain([[maybe_unused]] HINSTANCE hInstance, [[maybe_unused]] HINS MessageBoxA(0, GetReturnCodeString(status), "Error", MB_OK | MB_DEFAULT_DESKTOP_ONLY | MB_ICONERROR); } -#if !defined(AZ_MONOLITHIC_BUILD) - - { - // HACK HACK HACK - is this still needed?!?! - // CrySystem module can get loaded multiple times (even from within CrySystem itself) - // so we will release it as many times as it takes until it actually unloads. - void* hModule = CryLoadLibraryDefName("CrySystem"); - if (hModule) - { - // loop until we fail (aka unload the DLL) - while (CryFreeLibrary(hModule)) - { - ; - } - } - } -#endif // !defined(AZ_MONOLITHIC_BUILD) - // there is no way to transfer ownership of the allocator to the component application // without altering the app descriptor, so it must be destroyed here AZ::AllocatorInstance::Destroy(); diff --git a/Code/LauncherUnified/launcher_generator.cmake b/Code/LauncherUnified/launcher_generator.cmake index 5c9ee68e27..550a67bc49 100644 --- a/Code/LauncherUnified/launcher_generator.cmake +++ b/Code/LauncherUnified/launcher_generator.cmake @@ -76,6 +76,12 @@ foreach(project_name project_path IN ZIP_LISTS LY_PROJECTS_TARGET_NAME LY_PROJEC Legacy::CrySystem ) + if(PAL_TRAIT_BUILD_SERVER_SUPPORTED) + set(server_runtime_dependencies + Legacy::CrySystem + ) + endif() + endif() ################################################################################ diff --git a/Code/Legacy/CryCommon/AppleSpecific.h b/Code/Legacy/CryCommon/AppleSpecific.h index e4c4fadb89..2645ec2270 100644 --- a/Code/Legacy/CryCommon/AppleSpecific.h +++ b/Code/Legacy/CryCommon/AppleSpecific.h @@ -141,11 +141,6 @@ typedef uint8 byte; #endif -#ifndef SAFE_RELEASE_FORCE -#define SAFE_RELEASE_FORCE(p) { if (p) { (p)->ReleaseForce(); (p) = NULL; } \ -} -#endif - #define MAKEWORD(a, b) ((WORD)(((BYTE)((DWORD_PTR)(a) & 0xff)) | ((WORD)((BYTE)((DWORD_PTR)(b) & 0xff))) << 8)) #define MAKELONG(a, b) ((LONG)(((WORD)((DWORD_PTR)(a) & 0xffff)) | ((DWORD)((WORD)((DWORD_PTR)(b) & 0xffff))) << 16)) #define LOWORD(l) ((WORD)((DWORD_PTR)(l) & 0xffff)) @@ -472,22 +467,6 @@ inline int64 CryGetTicks() return counter.QuadPart; } -inline int64 CryGetTicksPerSec() -{ - LARGE_INTEGER li; - QueryPerformanceFrequency(&li); - return li.QuadPart; -} -/* - inline uint32 GetTickCount() - { - LARGE_INTEGER count, freq; - QueryPerformanceCounter(&count); - QueryPerformanceFrequency(&freq); - return uint32(count.QuadPart * 1000 / freq.QuadPart); - } - */ - #ifdef _RELEASE #define __debugbreak() #else diff --git a/Code/Legacy/CryCommon/CryLibrary.cpp b/Code/Legacy/CryCommon/CryLibrary.cpp deleted file mode 100644 index 07c74f5b97..0000000000 --- a/Code/Legacy/CryCommon/CryLibrary.cpp +++ /dev/null @@ -1,47 +0,0 @@ -/* - * Copyright (c) Contributors to the Open 3D Engine Project. - * For complete copyright and license terms please see the LICENSE at the root of this distribution. - * - * SPDX-License-Identifier: Apache-2.0 OR MIT - * - */ - - -#include - -#if !defined(AZ_RESTRICTED_PLATFORM) && defined(WIN32) - -HMODULE CryLoadLibrary(const char* libName) -{ - HMODULE module = ::LoadLibraryA(libName); - if (module != NULL) - { - // We need to inject the environment first thing so that allocators are available immediately - InjectEnvironmentFunction injectEnv = reinterpret_cast(::GetProcAddress(module, INJECT_ENVIRONMENT_FUNCTION)); - if (injectEnv) - { - auto env = AZ::Environment::GetInstance(); - injectEnv(env); - } - } - - return module; -} - -// Cry code seems to have used void* as their abstraction for HMODULE across -// platforms. -bool CryFreeLibrary(void* lib) -{ - if (lib != NULL) - { - DetachEnvironmentFunction detachEnv = reinterpret_cast(::GetProcAddress((HMODULE)lib, DETACH_ENVIRONMENT_FUNCTION)); - if (detachEnv) - { - detachEnv(); - } - return ::FreeLibrary((HMODULE)lib) != FALSE; - } - return false; -} - -#endif diff --git a/Code/Legacy/CryCommon/CryLibrary.h b/Code/Legacy/CryCommon/CryLibrary.h deleted file mode 100644 index 995ba0abc5..0000000000 --- a/Code/Legacy/CryCommon/CryLibrary.h +++ /dev/null @@ -1,193 +0,0 @@ -/* - * Copyright (c) Contributors to the Open 3D Engine Project. - * For complete copyright and license terms please see the LICENSE at the root of this distribution. - * - * SPDX-License-Identifier: Apache-2.0 OR MIT - * - */ - - -#pragma once - - -/*! - CryLibrary - - Convenience-Macros which abstract the use of DLLs/shared libraries in a platform independent way. - A short explanation of the different macros follows: - - CrySharedLibrarySupported: - This macro can be used to test if the current active platform supports shared library calls. The default - value is false. This gets redefined if a certain platform (WIN32 or LINUX) is desired. - - CrySharedLibraryPrefix: - The default prefix which will get prepended to library names in calls to CryLoadLibraryDefName - (see below). - - CrySharedLibraryExtension: - The default extension which will get appended to library names in calls to CryLoadLibraryDefName - (see below). - - CryLoadLibrary(libName): - Loads a shared library. - - CryLoadLibraryDefName(libName): - Loads a shared library. The platform-specific default library prefix and extension are appended to the libName. - This allows writing of somewhat platform-independent library loading code and is therefore the function - which should be used most of the time, unless some special extensions are used (e.g. for plugins). - - CryGetProcAddress(libHandle, procName): - Import function from the library presented by libHandle. - - CryFreeLibrary(libHandle): - Unload the library presented by libHandle. - - HISTORY: - 03.03.2004 MarcoK - - initial version - - added to CryPlatform -*/ - -#include -#include -#include - -#define INJECT_ENVIRONMENT_FUNCTION "InjectEnvironment" -#define DETACH_ENVIRONMENT_FUNCTION "DetachEnvironment" -using InjectEnvironmentFunction = void(*)(void*); -using DetachEnvironmentFunction = void(*)(); - -#if defined(AZ_RESTRICTED_PLATFORM) - #include AZ_RESTRICTED_FILE(CryLibrary_h) -#elif defined(WIN32) - #if !defined(WIN32_LEAN_AND_MEAN) - #define WIN32_LEAN_AND_MEAN - #endif - - HMODULE CryLoadLibrary(const char* libName); - - // Cry code seems to have used void* as their abstraction for HMODULE across - // platforms. - bool CryFreeLibrary(void* lib); - - #define CRYLIBRARY_H_TRAIT_USE_WINDOWS_DLL 1 -#elif ((defined(LINUX) || AZ_TRAIT_OS_PLATFORM_APPLE)) - #include - #include - #include - #include "platform.h" - #include - -// for compatibility with code written for windows - #define CrySharedLibrarySupported true - #define CrySharedLibraryPrefix "lib" -#if AZ_TRAIT_OS_PLATFORM_APPLE - #include - #define CrySharedLibraryExtension ".dylib" -#else - #define CrySharedLibraryExtension ".so" -#endif - - #define CryGetProcAddress(libHandle, procName) ::dlsym(libHandle, procName) - #define HMODULE void* -static const char* gEnvName("MODULE_PATH"); - -inline const char* GetModulePath() -{ - return getenv(gEnvName); -} - -inline void SetModulePath(const char* pModulePath) -{ - setenv(gEnvName, pModulePath ? pModulePath : "", true); -} - -// bInModulePath is only ever set to false in RC, because rc needs to load dlls from a $PATH that -// it has modified to include .. -inline HMODULE CryLoadLibrary(const char* libName, bool bLazy = false, bool bInModulePath = true) -{ - const char* libPath = nullptr; - libPath = libName; - -#if !defined(AZ_PLATFORM_ANDROID) - if (bInModulePath) - { - char exePath[MAX_PATH + 1] = { 0 }; - const char* modulePath = GetModulePath(); - if (!modulePath) - { - modulePath = "."; - #if defined(LINUX) - int len = readlink("/proc/self/exe", exePath, MAX_PATH); - if (len != -1) - { - exePath[len] = 0; - modulePath = dirname(exePath); - } - #elif AZ_TRAIT_OS_PLATFORM_APPLE - uint32_t bufsize = MAX_PATH; - if (_NSGetExecutablePath(exePath, &bufsize) == 0) - { - exePath[bufsize] = 0; - modulePath = dirname(exePath); - } - #endif - } - char pathBuffer[MAX_PATH] = {0}; - sprintf_s(pathBuffer, "%s/%s", modulePath, libName); - libPath = pathBuffer; - } -#endif - - HMODULE module; - #if defined(LINUX) && !defined(ANDROID) - module = ::dlopen(libPath, (bLazy ? RTLD_LAZY : RTLD_NOW) | RTLD_DEEPBIND); - #else - module = ::dlopen(libPath, bLazy ? RTLD_LAZY : RTLD_NOW); - #endif - AZ_Warning("LMBR", module, "Can't load library [%s]: %s", libName, dlerror()); - - if (module) - { - // We need to inject the environment first thing so that allocators are available immediately - InjectEnvironmentFunction injectEnv = reinterpret_cast(CryGetProcAddress(module, INJECT_ENVIRONMENT_FUNCTION)); - if (injectEnv) - { - injectEnv(AZ::Environment::GetInstance()); - } - } - - return module; -} - -inline bool CryFreeLibrary(void* lib) -{ - if (lib) - { - DetachEnvironmentFunction detachEnv = reinterpret_cast(CryGetProcAddress(lib, DETACH_ENVIRONMENT_FUNCTION)); - if (detachEnv) - { - detachEnv(); - } - return (::dlclose(lib) == 0); - } - return false; -} -#endif - -#if CRYLIBRARY_H_TRAIT_USE_WINDOWS_DLL -#define CrySharedLibrarySupported true -#define CrySharedLibraryPrefix "" -#define CrySharedLibraryExtension ".dll" -#define CryGetProcAddress(libHandle, procName) ::GetProcAddress((HMODULE)(libHandle), procName) -#elif !defined(CrySharedLibrarySupported) -#define CrySharedLibrarySupported false -#define CrySharedLibraryPrefix "" -#define CrySharedLibraryExtension "" -#define CryLoadLibrary(libName) NULL -#define CryGetProcAddress(libHandle, procName) NULL -#define CryFreeLibrary(libHandle) -#define GetModuleHandle(x) 0 -#endif -#define CryLibraryDefName(libName) CrySharedLibraryPrefix libName CrySharedLibraryExtension -#define CryLoadLibraryDefName(libName) CryLoadLibrary(CryLibraryDefName(libName)) diff --git a/Code/Legacy/CryCommon/Cry_Camera.h b/Code/Legacy/CryCommon/Cry_Camera.h deleted file mode 100644 index 6ccae5bce1..0000000000 --- a/Code/Legacy/CryCommon/Cry_Camera.h +++ /dev/null @@ -1,448 +0,0 @@ -/* - * Copyright (c) Contributors to the Open 3D Engine Project. - * For complete copyright and license terms please see the LICENSE at the root of this distribution. - * - * SPDX-License-Identifier: Apache-2.0 OR MIT - * - */ - - -// Description : Common Camera class implementation -#pragma once - - -//DOC-IGNORE-BEGIN -#include -#include -//DOC-IGNORE-END - -////////////////////////////////////////////////////////////////////// -#define CAMERA_MIN_NEAR 0.001f -#define DEFAULT_NEAR 0.2f -#define DEFAULT_FAR 1024.0f -#define DEFAULT_FOV (75.0f * gf_PI / 180.0f) -#define MIN_FOV 0.0000001f - -////////////////////////////////////////////////////////////////////// - -enum -{ - FR_PLANE_NEAR, - FR_PLANE_FAR, - FR_PLANE_RIGHT, - FR_PLANE_LEFT, - FR_PLANE_TOP, - FR_PLANE_BOTTOM, - FRUSTUM_PLANES -}; - -////////////////////////////////////////////////////////////////////// - -enum cull -{ - CULL_EXCLUSION, // The whole object is outside of frustum. - CULL_OVERLAP, // The object & frustum overlap. - CULL_INCLUSION // The whole object is inside frustum. -}; - -/////////////////////////////////////////////////////////////////////////////// -// Implements essential operations like calculation of a view-matrix and -// frustum-culling with simple geometric primitives (Point, Sphere, AABB, OBB). -// All calculation are based on the CryENGINE coordinate-system -// -// We are using a "right-handed" coordinate systems, where the positive X-Axis points -// to the right, the positive Y-Axis points away from the viewer and the positive -// Z-Axis points up. The following illustration shows our coordinate system. -// -//
-//  z-axis
-//    ^
-//    |
-//    |   y-axis
-//    |  /
-//    | /
-//    |/
-//    +---------------->   x-axis
-// 
-// -// This same system is also used in 3D-Studio-MAX. It is not unusual for 3D-APIs like D3D9 or -// OpenGL to use a different coordinate system. Currently in D3D9 we use a coordinate system -// in which the X-Axis points to the right, the Y-Axis points down and the Z-Axis points away -// from the viewer. To convert from the CryEngine system into D3D9 we are just doing a clockwise -// rotation of pi/2 about the X-Axis. This conversion happens in the renderer. -// -// The 6 DOFs (degrees-of-freedom) are stored in one single 3x4 matrix ("m_Matrix"). The 3 -// orientation-DOFs are stored in the 3x3 part and the 3 position-DOFs are stored in the translation- -// vector. You can use the member-functions "GetMatrix()" or "SetMatrix(Matrix34(orientation,positon))" -// to change or access the 6 DOFs. -// -// There are helper-function in Cry_Math.h to create the orientation: -// -// This function builds a 3x3 orientation matrix using a view-direction and a radiant to rotate about Y-axis. -// Matrix33 orientation=Matrix33::CreateOrientation( Vec3(0,1,0), 0 ); -// -// This function builds a 3x3 orientation matrix using Yaw-Pitch-Roll angles. -// Matrix33 orientation=CCamera::CreateOrientationYPR( Ang3(1.234f,0.342f,0) ); -// -/////////////////////////////////////////////////////////////////////////////// -class CCamera -{ -public: - ILINE static Matrix33 CreateOrientationYPR(const Ang3& ypr); - ILINE static Ang3 CreateAnglesYPR(const Matrix33& m); - ILINE static Ang3 CreateAnglesYPR(const Vec3& vdir, f32 r = 0); - - ILINE void SetMatrix(const Matrix34& mat) { assert(mat.IsOrthonormal()); m_Matrix = mat; UpdateFrustum(); }; - ILINE const Matrix34& GetMatrix() const { return m_Matrix; }; - ILINE Vec3 GetViewdir() const { return m_Matrix.GetColumn1(); }; - - ILINE Vec3 GetPosition() const { return m_Matrix.GetTranslation(); } - ILINE void SetPosition(const Vec3& p) { m_Matrix.SetTranslation(p); UpdateFrustum(); } - - //------------------------------------------------------------ - - void SetFrustum(int nWidth, int nHeight, f32 FOV = DEFAULT_FOV, f32 nearplane = DEFAULT_NEAR, f32 farplane = DEFAULT_FAR, f32 fPixelAspectRatio = 1.0f); - - ILINE int GetViewSurfaceZ() const { return m_Height; } - ILINE f32 GetFov() const { return m_fov; } - ILINE f32 GetPixelAspectRatio() const { return m_PixelAspectRatio; } - - ////////////////////////////////////////////////////////////////////////// - - //----------------------------------------------------------------------------------- - //-------- Frustum-Culling ---------------------------- - //----------------------------------------------------------------------------------- - - // AABB-frustum test - // Fast - bool IsAABBVisible_F(const ::AABB& aabb) const; - - //## constructor/destructor - CCamera() - { - m_Matrix.SetIdentity(); - m_asymRight = 0; - m_asymLeft = 0; - m_asymBottom = 0; - m_asymTop = 0; - SetFrustum(640, 480); - m_nPosX = m_nPosY = m_nSizeX = m_nSizeY = 0; - m_entityPos = Vec3(0, 0, 0); - } - ~CCamera() {} - - void SetJustActivated([[maybe_unused]] const bool justActivated) {} - - void UpdateFrustum(); - -private: - Matrix34 m_Matrix; // world space-matrix - - f32 m_fov; // vertical fov in radiants [0..1*PI[ - int m_Width; // surface width-resolution - int m_Height; // surface height-resolution - f32 m_PixelAspectRatio; // accounts for aspect ratio and non-square pixels - - Vec3 m_entityPos; //The position of this camera's entity (does not include HMD position or stereo offsets) - - Vec3 m_edge_nlt; // this is the left/upper vertex of the near-plane - Vec3 m_edge_plt; // this is the left/upper vertex of the projection-plane - Vec3 m_edge_flt; // this is the left/upper vertex of the far-clip-plane - - f32 m_asymLeft, m_asymRight, m_asymBottom, m_asymTop; // Shift to create asymmetric frustum (only used for GPU culling of tessellated objects) - f32 m_asymLeftProj, m_asymRightProj, m_asymBottomProj, m_asymTopProj; - f32 m_asymLeftFar, m_asymRightFar, m_asymBottomFar, m_asymTopFar; - - //usually we update these values every frame (they depend on m_Matrix) - Vec3 m_cltp, m_crtp, m_clbp, m_crbp; //this are the 4 vertices of the projection-plane in cam-space - Vec3 m_cltn, m_crtn, m_clbn, m_crbn; //this are the 4 vertices of the near-plane in cam-space - Vec3 m_cltf, m_crtf, m_clbf, m_crbf; //this are the 4 vertices of the farclip-plane in cam-space - - Plane_tpl m_fp [FRUSTUM_PLANES]; // - uint32 m_idx1[FRUSTUM_PLANES], m_idy1[FRUSTUM_PLANES], m_idz1[FRUSTUM_PLANES]; // - uint32 m_idx2[FRUSTUM_PLANES], m_idy2[FRUSTUM_PLANES], m_idz2[FRUSTUM_PLANES]; // - - int m_nPosX, m_nPosY, m_nSizeX, m_nSizeY; -}; - -// Description -// This function builds a 3x3 orientation matrix using YPR-angles -// Rotation order for the orientation-matrix is Z-X-Y. (Zaxis=YAW / Xaxis=PITCH / Yaxis=ROLL) -// -//
-//  COORDINATE-SYSTEM
-//
-//  z-axis
-//    ^
-//    |
-//    |  y-axis
-//    |  /
-//    | /
-//    |/
-//    +--------------->   x-axis
-// 
-// -// Example: -// Matrix33 orientation=CCamera::CreateOrientationYPR( Ang3(1,2,3) ); -inline Matrix33 CCamera::CreateOrientationYPR(const Ang3& ypr) -{ - f32 sz, cz; - sincos_tpl(ypr.x, &sz, &cz); //Zaxis = YAW - f32 sx, cx; - sincos_tpl(ypr.y, &sx, &cx); //Xaxis = PITCH - f32 sy, cy; - sincos_tpl(ypr.z, &sy, &cy); //Yaxis = ROLL - Matrix33 c; - c.m00 = cy * cz - sy * sz * sx; - c.m01 = -sz * cx; - c.m02 = sy * cz + cy * sz * sx; - c.m10 = cy * sz + sy * sx * cz; - c.m11 = cz * cx; - c.m12 = sy * sz - cy * sx * cz; - c.m20 = -sy * cx; - c.m21 = sx; - c.m22 = cy * cx; - return c; -} - -// Description -//
-//   x-YAW
-//   y-PITCH (negative=looking down / positive=looking up)
-//   z-ROLL
-//   
-// Note: If we are looking along the z-axis, its not possible to specify the x and z-angle -inline Ang3 CCamera::CreateAnglesYPR(const Matrix33& m) -{ - assert(m.IsOrthonormal()); - float l = Vec3(m.m01, m.m11, 0.0f).GetLength(); - if (l > 0.0001) - { - return Ang3(atan2f(-m.m01 / l, m.m11 / l), atan2f(m.m21, l), atan2f(-m.m20 / l, m.m22 / l)); - } - else - { - return Ang3(0, atan2f(m.m21, l), 0); - } -} - -// Description -//
-//x-YAW
-//y-PITCH (negative=looking down / positive=looking up)
-//z-ROLL (its not possile to extract a "roll" from a view-vector)
-// 
-// Note: if we are looking along the z-axis, its not possible to specify the rotation about the z-axis -ILINE Ang3 CCamera::CreateAnglesYPR(const Vec3& vdir, f32 r) -{ - assert((fabs_tpl(1 - (vdir | vdir))) < 0.001); //check if unit-vector - f32 l = Vec3(vdir.x, vdir.y, 0.0f).GetLength(); //check if not zero - if (l > 0.0001) - { - return Ang3(atan2f(-vdir.x / l, vdir.y / l), atan2f(vdir.z, l), r); - } - else - { - return Ang3(0, atan2f(vdir.z, l), r); - } -} - -//--------------------------------------------------------------------------- -//--------------------------------------------------------------------------- -//--------------------------------------------------------------------------- -//--------------------------------------------------------------------------- -inline void CCamera::SetFrustum(int nWidth, int nHeight, f32 FOV, f32 nearplane, f32 farplane, f32 fPixelAspectRatio) -{ - assert (nearplane >= CAMERA_MIN_NEAR); //check if near-plane is valid - assert (farplane >= 0.1f); //check if far-plane is valid - assert (farplane >= nearplane); //check if far-plane bigger then near-plane - assert (FOV >= MIN_FOV && FOV < gf_PI); //check if specified FOV is valid - - m_fov = FOV; - - m_Width = nWidth; //surface x-resolution - m_Height = nHeight; //surface z-resolution - - f32 fWidth = (((f32)nWidth) / fPixelAspectRatio); - f32 fHeight = (f32) nHeight; - - m_PixelAspectRatio = fPixelAspectRatio; - - //------------------------------------------------------------------------- - //--- calculate the Left/Top edge of the Projection-Plane in EYE-SPACE --- - //------------------------------------------------------------------------- - f32 projLeftTopX = -fWidth * 0.5f; - f32 projLeftTopY = static_cast((1.0f / tan_tpl(m_fov * 0.5f)) * (fHeight * 0.5f)); - f32 projLeftTopZ = fHeight * 0.5f; - - m_edge_plt.x = projLeftTopX; - m_edge_plt.y = projLeftTopY; - m_edge_plt.z = projLeftTopZ; - - float invProjLeftTopY = 1.0f / projLeftTopY; - - //Apply asym shift to the camera frustum - Necessary for properly culling tessellated objects in VR - //These are applied in UpdateFrustum to the camera space frustum planes - //Can't apply asym shift to frustum edges here. That would only apply to the top left corner - //rather than the whole frustum. It would also interfere with shadow map application - - //m_asym is at the near plane, we want it at the projection plane too - m_asymLeftProj = (m_asymLeft / nearplane) * projLeftTopY; - m_asymTopProj = (m_asymTop / nearplane) * projLeftTopY; - m_asymRightProj = (m_asymRight / nearplane) * projLeftTopY; - m_asymBottomProj = (m_asymBottom / nearplane) * projLeftTopY; - - //Also want m_asym at the far plane - m_asymLeftFar = m_asymLeftProj * (farplane * invProjLeftTopY); - m_asymTopFar = m_asymTopProj * (farplane * invProjLeftTopY); - m_asymRightFar = m_asymRightProj * (farplane * invProjLeftTopY); - m_asymBottomFar = m_asymBottomProj * (farplane * invProjLeftTopY); - - m_edge_nlt.x = nearplane * projLeftTopX * invProjLeftTopY; - m_edge_nlt.y = nearplane; - m_edge_nlt.z = nearplane * projLeftTopZ * invProjLeftTopY; - - //calculate the left/upper edge of the far-plane (=not rotated) - m_edge_flt.x = projLeftTopX * (farplane * invProjLeftTopY); - m_edge_flt.y = farplane; - m_edge_flt.z = projLeftTopZ * (farplane * invProjLeftTopY); - - UpdateFrustum(); -} - -/*! - * - * Updates all parameters required by the render-engine: - * - * 3d-view-frustum and all matrices - * - */ -inline void CCamera::UpdateFrustum() -{ - //------------------------------------------------------------------- - //--- calculate frustum-edges of projection-plane in CAMERA-SPACE --- - //------------------------------------------------------------------- - Matrix33 m33 = Matrix33(m_Matrix); - m_cltp = m33 * Vec3(+m_edge_plt.x + m_asymLeftProj, +m_edge_plt.y, +m_edge_plt.z + m_asymTopProj); - m_crtp = m33 * Vec3(-m_edge_plt.x + m_asymRightProj, +m_edge_plt.y, +m_edge_plt.z + m_asymTopProj); - m_clbp = m33 * Vec3(+m_edge_plt.x + m_asymLeftProj, +m_edge_plt.y, -m_edge_plt.z + m_asymBottomProj); - m_crbp = m33 * Vec3(-m_edge_plt.x + m_asymRightProj, +m_edge_plt.y, -m_edge_plt.z + m_asymBottomProj); - - m_cltn = m33 * Vec3(+m_edge_nlt.x + m_asymLeft, +m_edge_nlt.y, +m_edge_nlt.z + m_asymTop); - m_crtn = m33 * Vec3(-m_edge_nlt.x + m_asymRight, +m_edge_nlt.y, +m_edge_nlt.z + m_asymTop); - m_clbn = m33 * Vec3(+m_edge_nlt.x + m_asymLeft, +m_edge_nlt.y, -m_edge_nlt.z + m_asymBottom); - m_crbn = m33 * Vec3(-m_edge_nlt.x + m_asymRight, +m_edge_nlt.y, -m_edge_nlt.z + m_asymBottom); - - m_cltf = m33 * Vec3(+m_edge_flt.x + m_asymLeftFar, +m_edge_flt.y, +m_edge_flt.z + m_asymTopFar); - m_crtf = m33 * Vec3(-m_edge_flt.x + m_asymRightFar, +m_edge_flt.y, +m_edge_flt.z + m_asymTopFar); - m_clbf = m33 * Vec3(+m_edge_flt.x + m_asymLeftFar, +m_edge_flt.y, -m_edge_flt.z + m_asymBottomFar); - m_crbf = m33 * Vec3(-m_edge_flt.x + m_asymRightFar, +m_edge_flt.y, -m_edge_flt.z + m_asymBottomFar); - - //------------------------------------------------------------------------------- - //--- calculate the six frustum-planes using the frustum edges in world-space --- - //------------------------------------------------------------------------------- - m_fp[FR_PLANE_NEAR ] = Plane_tpl::CreatePlane(m_crtn + GetPosition(), m_cltn + GetPosition(), m_crbn + GetPosition()); - m_fp[FR_PLANE_RIGHT ] = Plane_tpl::CreatePlane(m_crbf + GetPosition(), m_crtf + GetPosition(), GetPosition()); - m_fp[FR_PLANE_LEFT ] = Plane_tpl::CreatePlane(m_cltf + GetPosition(), m_clbf + GetPosition(), GetPosition()); - m_fp[FR_PLANE_TOP ] = Plane_tpl::CreatePlane(m_crtf + GetPosition(), m_cltf + GetPosition(), GetPosition()); - m_fp[FR_PLANE_BOTTOM] = Plane_tpl::CreatePlane(m_clbf + GetPosition(), m_crbf + GetPosition(), GetPosition()); - m_fp[FR_PLANE_FAR ] = Plane_tpl::CreatePlane(m_crtf + GetPosition(), m_crbf + GetPosition(), m_cltf + GetPosition()); //clip-plane - - uint32 rh = m_Matrix.IsOrthonormalRH(); - if (rh == 0) - { - m_fp[FR_PLANE_NEAR ] = -m_fp[FR_PLANE_NEAR ]; - m_fp[FR_PLANE_RIGHT ] = -m_fp[FR_PLANE_RIGHT ]; - m_fp[FR_PLANE_LEFT ] = -m_fp[FR_PLANE_LEFT ]; - m_fp[FR_PLANE_TOP ] = -m_fp[FR_PLANE_TOP ]; - m_fp[FR_PLANE_BOTTOM] = -m_fp[FR_PLANE_BOTTOM]; - m_fp[FR_PLANE_FAR ] = -m_fp[FR_PLANE_FAR ]; //clip-plane - } - - union f32_u - { - float floatVal; - uint32 uintVal; - }; - - for (int i = 0; i < FRUSTUM_PLANES; i++) - { - f32_u ux; - ux.floatVal = m_fp[i].n.x; - f32_u uy; - uy.floatVal = m_fp[i].n.y; - f32_u uz; - uz.floatVal = m_fp[i].n.z; - uint32 bitX = ux.uintVal >> 31; - uint32 bitY = uy.uintVal >> 31; - uint32 bitZ = uz.uintVal >> 31; - m_idx1[i] = bitX * 3 + 0; - m_idx2[i] = (1 - bitX) * 3 + 0; - m_idy1[i] = bitY * 3 + 1; - m_idy2[i] = (1 - bitY) * 3 + 1; - m_idz1[i] = bitZ * 3 + 2; - m_idz2[i] = (1 - bitZ) * 3 + 2; - } -} - -// Description -// Simple approach to check if an AABB and the camera-frustum overlap. The AABB -// is assumed to be in world-space. This is a very fast method, just one single -// dot-product is necessary to check an AABB against a plane. Actually there -// is no significant speed-different between culling a sphere or an AABB. -// -// Example -// bool InOut=camera.IsAABBVisible_F(aabb); -// -// return values -// CULL_EXCLUSION = AABB outside of frustum (very fast rejection-test) -// CULL_OVERLAP = AABB either intersects the borders of the frustum or is totally inside - -inline bool CCamera::IsAABBVisible_F(const AABB& aabb) const -{ - const f32* p = &aabb.min.x; - uint32 x, y, z; - x = m_idx1[0]; - y = m_idy1[0]; - z = m_idz1[0]; - if ((m_fp[0] | Vec3(p[x], p[y], p[z])) > 0) - { - return CULL_EXCLUSION; - } - x = m_idx1[1]; - y = m_idy1[1]; - z = m_idz1[1]; - if ((m_fp[1] | Vec3(p[x], p[y], p[z])) > 0) - { - return CULL_EXCLUSION; - } - x = m_idx1[2]; - y = m_idy1[2]; - z = m_idz1[2]; - if ((m_fp[2] | Vec3(p[x], p[y], p[z])) > 0) - { - return CULL_EXCLUSION; - } - x = m_idx1[3]; - y = m_idy1[3]; - z = m_idz1[3]; - if ((m_fp[3] | Vec3(p[x], p[y], p[z])) > 0) - { - return CULL_EXCLUSION; - } - x = m_idx1[4]; - y = m_idy1[4]; - z = m_idz1[4]; - if ((m_fp[4] | Vec3(p[x], p[y], p[z])) > 0) - { - return CULL_EXCLUSION; - } - x = m_idx1[5]; - y = m_idy1[5]; - z = m_idz1[5]; - if ((m_fp[5] | Vec3(p[x], p[y], p[z])) > 0) - { - return CULL_EXCLUSION; - } - return CULL_OVERLAP; -} diff --git a/Code/Legacy/CryCommon/Cry_Math.h b/Code/Legacy/CryCommon/Cry_Math.h index a96b83a1bf..b09e29ce90 100644 --- a/Code/Legacy/CryCommon/Cry_Math.h +++ b/Code/Legacy/CryCommon/Cry_Math.h @@ -17,6 +17,7 @@ #include // eLittleEndian #include #include +#include /////////////////////////////////////////////////////////////////////////////// // Forward declarations // /////////////////////////////////////////////////////////////////////////////// diff --git a/Code/Legacy/CryCommon/Cry_Matrix34.h b/Code/Legacy/CryCommon/Cry_Matrix34.h index eb9c22086b..747d0c7db9 100644 --- a/Code/Legacy/CryCommon/Cry_Matrix34.h +++ b/Code/Legacy/CryCommon/Cry_Matrix34.h @@ -799,11 +799,6 @@ struct Matrix34_tpl /////////////////////////////////////////////////////////////////////////////// typedef Matrix34_tpl Matrix34; //always 32 bit -#if AZ_COMPILER_MSVC - typedef __declspec(align(16)) Matrix34_tpl Matrix34A; -#elif AZ_COMPILER_CLANG - typedef Matrix34_tpl __attribute__((aligned(16))) Matrix34A; -#endif //---------------------------------------------------------------------------------- //---------------------------------------------------------------------------------- diff --git a/Code/Legacy/CryCommon/Cry_Matrix44.h b/Code/Legacy/CryCommon/Cry_Matrix44.h index 4da8475260..de721b4e1f 100644 --- a/Code/Legacy/CryCommon/Cry_Matrix44.h +++ b/Code/Legacy/CryCommon/Cry_Matrix44.h @@ -276,30 +276,6 @@ struct Matrix44_tpl m32 = m.m32; m33 = m.m33; } - //CONSTRUCTOR for identical types which converts between double/float - //Matrix44 m=m44r; - //Matrix44r m=m44; - template - ILINE Matrix44_tpl(const Matrix44_tpl&m) - { - assert(m.IsValid()); - m00 = F(m.m00); - m01 = F(m.m01); - m02 = F(m.m02); - m03 = F(m.m03); - m10 = F(m.m10); - m11 = F(m.m11); - m12 = F(m.m12); - m13 = F(m.m13); - m20 = F(m.m20); - m21 = F(m.m21); - m22 = F(m.m22); - m23 = F(m.m23); - m30 = F(m.m30); - m31 = F(m.m31); - m32 = F(m.m32); - m33 = F(m.m33); - } //--------------------------------------------------------------------- @@ -662,13 +638,6 @@ struct Matrix44_tpl /////////////////////////////////////////////////////////////////////////////// typedef Matrix44_tpl Matrix44; //always 32 bit -typedef Matrix44_tpl Matrix44d; //always 64 bit -typedef Matrix44_tpl Matrix44r; //variable float precision. depending on the target system it can be between 32, 64 or 80 bit -#if AZ_COMPILER_MSVC - typedef __declspec(align(16)) Matrix44_tpl Matrix44A; -#elif AZ_COMPILER_CLANG - typedef Matrix44_tpl __attribute__((aligned(16))) Matrix44A; -#endif //---------------------------------------------------------------------------------- //---------------------------------------------------------------------------------- diff --git a/Code/Legacy/CryCommon/Cry_Vector2.h b/Code/Legacy/CryCommon/Cry_Vector2.h index 81a8c10e49..5bf47d0642 100644 --- a/Code/Legacy/CryCommon/Cry_Vector2.h +++ b/Code/Legacy/CryCommon/Cry_Vector2.h @@ -8,10 +8,6 @@ // Description : Common matrix class - - -#ifndef CRYINCLUDE_CRYCOMMON_CRY_VECTOR2_H -#define CRYINCLUDE_CRYCOMMON_CRY_VECTOR2_H #pragma once #include @@ -68,9 +64,7 @@ struct Vec2_tpl : x((F)v.x) , y((F)v.y) { assert(this->IsValid()); } - ILINE Vec2_tpl& operator=(const Vec2_tpl& src) { x = src.x; y = src.y; return *this; } - //template Vec2_tpl& operator=(const Vec2_tpl& src) { x=F(src.x); y=F(src.y); return *this; } - //template Vec2_tpl& operator=(const Vec3_tpl& src) { x=F(src.x); y=F(src.y); return *this; } + Vec2_tpl& operator=(const Vec2_tpl& src) = default; ILINE int operator!() const { return x == 0 && y == 0; } @@ -372,4 +366,3 @@ namespace AZ { AZ_TYPE_INFO_SPECIALIZE(Vec2, "{844131BA-9565-42F3-8482-6F65A6D5FC59}"); } -#endif // CRYINCLUDE_CRYCOMMON_CRY_VECTOR2_H diff --git a/Code/Legacy/CryCommon/HMDBus.h b/Code/Legacy/CryCommon/HMDBus.h deleted file mode 100644 index dab4c28668..0000000000 --- a/Code/Legacy/CryCommon/HMDBus.h +++ /dev/null @@ -1,276 +0,0 @@ -/* - * Copyright (c) Contributors to the Open 3D Engine Project. - * For complete copyright and license terms please see the LICENSE at the root of this distribution. - * - * SPDX-License-Identifier: Apache-2.0 OR MIT - * - */ - - -#pragma once - -#include -#include -#include -#include -#include -#include -#include - -struct IRenderAuxGeom; - -namespace AZ -{ - namespace VR - { - /** - * Bus for reacting to events triggered by the VR systems - */ - class VREvents : public AZ::EBusTraits - { - public: - virtual ~VREvents() {} - - /** - * Event triggered when an HMD initializes successfully - */ - virtual void OnHMDInitialized() {} - - /** - * Event triggered when an HMD shuts down - */ - virtual void OnHMDShutdown() {} - }; - - using VREventBus = AZ::EBus; - - /// - /// Device initialization bus. Each HMD device SDK should connect to this bus during startup in order to be initialized by the LY engine. - /// Any devices that successfully initialize will be connected to the HMDDeviceBus for actual use in VR rendering. - /// - class HMDInitBus : public AZ::EBusTraits - { - public: - - virtual ~HMDInitBus() {} - - /// - /// Attempt to initialize this device. If initialization is initially successful (device exists and is able to startup) then this device should connect to the - /// HMDDeviceRequestBus in order to be used as an HMD from the main Open 3D Engine system. - /// - /// @return If true, initialization fully succeeded. - /// - virtual bool AttemptInit() = 0; - - /// - /// Shutdown this device and destroy any internal context/state information that it may contain. Once this function has returned, the device should be in a - /// totally clean state and able to re-initialized if necessary. - /// - virtual void Shutdown() = 0; - - /// - /// Priority values for the HMD to set. A higher priority value means that the HMD will be be initialized before - /// other HMDs with lower priority values. - /// - enum HMDInitPriority - { - kNullVR = -100, - kLowest = 0, - kMiddle = 50, - kHighest = 100 - }; - - /// - /// Specify the initialization priority for this HMD device. Typically SDKs that have only one device that they support (e.g. Oculus) should have the highest - /// priority so that other VR Gems don't take the device context. For example, OpenVR is capable of driving an Oculus Rift and if initialized first will control - /// the device as opposed to the Oculus runtime. - /// - virtual HMDInitPriority GetInitPriority() const = 0; - }; - - using HMDInitRequestBus = AZ::EBus; - - /// - /// HMD device bus used to communicate with the rest of the engine. Every device supported by the engine lives in its own GEM and supports this bus. A device - /// wraps the underlying SDK into a single object for easy use by the rest of the system. Every device created should register with the EBus in order to be picked up as - /// a usable device during initialization via the EBus function BusConnect(). - /// - class HMDDeviceBus - : public AZ::EBusTraits - { - public: - - ////////////////////////////////////////////////////////////////////////// - // EBus Traits - static const EBusHandlerPolicy HandlerPolicy = EBusHandlerPolicy::Multiple; - static const EBusAddressPolicy AddressPolicy = EBusAddressPolicy::Single; - using MutexType = AZStd::recursive_mutex; - ////////////////////////////////////////////////////////////////////////// - - virtual ~HMDDeviceBus() {} - - /// - /// Simple texture descriptor to pass to the device during render target creation. - /// - struct TextureDesc - { - uint32 width; - uint32 height; - }; - - /// - /// Update the HMD's internal state and handle events - /// This is NOT where tracking is updated. This is for game-time - /// events such as controllers connecting/disconnecting or - /// certain compositor events being triggered. - /// - virtual void UpdateInternalState() {} - - /// - /// Create the render targets for a rendering device. Note that this will create all necessary render targets but the render targets will be destroyed one at a time in DestroyRenderTargets. - /// - /// @param renderDevice The render device to use when creating the render target. - /// @param desc TextureDesc object denoting texture options to use during creation. - /// @param eyeCount The number of HMDRenderTargets to be created in this function. - /// @param renderTargets Array of pointers to HMDRenderTargets of size eyeCount created upon successful return of this function. See struct RenderTarget for more info. - /// - /// @returns If true, the render targets were successfully created. - /// - virtual bool CreateRenderTargets([[maybe_unused]] void* renderDevice, [[maybe_unused]] const TextureDesc& desc, [[maybe_unused]] size_t eyeCount, [[maybe_unused]] HMDRenderTarget* renderTargets[]) { return false; } - - /// - /// Destroy the passed-in render target. Any device-specific texture data will be cleaned up after this function has finished executing. - /// - virtual void DestroyRenderTarget([[maybe_unused]] HMDRenderTarget& renderTarget) {} - - /// - /// Take care of any frame preparations that may be necessary BEFORE rendering begins on either eye. This could be things like synchronization, - /// clearing old state, etc. - /// - virtual void PrepareFrame() {} - - /// - /// Retrieve the latest tracking state that was cached since the last call - /// to UpdateTrackingStates. - /// - /// TODO: Differentiate between tracking states viable for rendering and - /// tracking states viable for game simulation. - /// - virtual TrackingState* GetTrackingState() { return nullptr; } - - /// - /// Per-eye target to submit to the device for final composition and rendering. - /// - struct EyeTarget - { - void* renderTarget; ///< The device render target. - Vec2i viewportPosition; ///< Position of the viewport pertaining to this render target. - Vec2i viewportSize; ///< Size of the viewport pertaining to this render target. - }; - - /// - /// Submit a new frame to the HMD device. Each eye should be fully rendered by this point. The device will automatically correlate the proper - /// tracking information with this frame. - /// - /// @param left A reference to the left EyeTarget to present - /// @param right A reference to the right EyeTarget to present - /// - virtual void SubmitFrame([[maybe_unused]] const EyeTarget& left, [[maybe_unused]] const EyeTarget& right) {} - - /// - /// Recent the current pose for the HMD based on the current direction that the viewer is looking. - /// - virtual void RecenterPose() {} - - /// - /// Set the current tracking level of the HMD. Supported tracking levels are defined in struct TrackingLevel. - /// - /// @param level The tracking level we want to use with this HMD - /// - virtual void SetTrackingLevel([[maybe_unused]] const AZ::VR::HMDTrackingLevel level) {} - - /// - /// Write any HMD info to the console/log file(s). At a minimum this function should print the info contained in the HMDDeviceInfo object. - /// - virtual void OutputHMDInfo() {} - - /// - /// Enable/disable debugging for this device. The device can decide what the most appropriate debugging information is - /// displayed to the user (e.g. HMD position, performance info, latency timing, etc.). - /// - /// @param enable Set to true to enable debugging - /// - virtual void EnableDebugging([[maybe_unused]] bool enable) {} - - /// - /// Draw any custom debug info for this device. This function is invoked by the HMDDebugger. - /// - /// @param transform Local to world-space transform. - /// @param auxGeom A pointer to the auxiliary geometry renderer - /// - virtual void DrawDebugInfo([[maybe_unused]] const AZ::Transform& transform, [[maybe_unused]] IRenderAuxGeom* auxGeom) {} - - /// - /// Get the device info object for this particular HMD. See struct HMDDeviceInfo for more details. - /// - /// @return A pointer to this HMD's HMDDeviceInfo struct - /// - virtual HMDDeviceInfo* GetDeviceInfo() { return nullptr; } - - /// - /// Get whether or not the HMD has been initialized. The HMD has been initialized when it has fully established an interface - /// with its necessary SDK and is ready to be used. - /// - /// @return True if the device has been initialized and is usable - /// - virtual bool IsInitialized() { return false; } - - /// - /// Get the play space of the device, if exists - /// - /// @return True if the device has been initialized and is usable - /// - virtual const Playspace* GetPlayspace() { return nullptr; } - - /// - /// Ask the HMD to update its internal tracking state; must be called once per frame. - /// Must be called from the render thread (the same thread that the device submits on). - /// This will calculate the internal tracking states fit for rendering the upcoming frame. - /// - virtual void UpdateTrackingStates() {} - - protected: - }; - - using HMDDeviceRequestBus = AZ::EBus; - - /// - /// Bus to define HMD debugging. This includes visualization of any HMD-specific objects as well as any - /// VR performance metrics displayed in the HMD. - /// - class HMDDebuggerBus - : public AZ::EBusTraits - { - public: - - virtual ~HMDDebuggerBus() {} - - /// - /// Enable/disable the debugger. - /// - /// @param enable Pass in true to enable info debugging - /// - virtual void EnableInfo(bool enable) = 0; - - /// - /// Enable/disable the camera debugger. - /// - /// @param enable Pass in true to enable camera debugging - /// - virtual void EnableCamera(bool enable) = 0; - }; - - using HMDDebuggerRequestBus = AZ::EBus; - - } // namespace VR -} // namespace AZ diff --git a/Code/Legacy/CryCommon/ICmdLine.h b/Code/Legacy/CryCommon/ICmdLine.h index 6071671b02..80561fd85c 100644 --- a/Code/Legacy/CryCommon/ICmdLine.h +++ b/Code/Legacy/CryCommon/ICmdLine.h @@ -71,6 +71,14 @@ public: // The value of the argument as integer number. virtual const int GetIValue() const = 0; // + + // Description: + // Retrieve the value of the argument. + // Arguments: + // cmdLineValue. The cmdline value will be filled out if a valid boolean is found. + // Return Value: + // Returns true if the cmdline arg is actually a boolean string matching "true" or "false"; otherwise return false. + virtual const bool GetBoolValue(bool& cmdLineValue) const = 0; }; // Command line interface diff --git a/Code/Legacy/CryCommon/IEntityRenderState.h b/Code/Legacy/CryCommon/IEntityRenderState.h deleted file mode 100644 index 42e485cd1e..0000000000 --- a/Code/Legacy/CryCommon/IEntityRenderState.h +++ /dev/null @@ -1,26 +0,0 @@ -/* - * Copyright (c) Contributors to the Open 3D Engine Project. - * For complete copyright and license terms please see the LICENSE at the root of this distribution. - * - * SPDX-License-Identifier: Apache-2.0 OR MIT - * - */ - -#pragma once -#include - -struct IStatObj; - -struct IRenderNode -{ - // Gives access to object components. - IStatObj* GetEntityStatObj(unsigned int = 0, unsigned int = 0, Matrix34* = nullptr, bool = false) { - return nullptr; - } - - int GetSlotCount() const { return 1; } - - // Max view distance settings. - static constexpr int VIEW_DISTANCE_MULTIPLIER_MAX = 100; - -}; diff --git a/Code/Legacy/CryCommon/IFunctorBase.h b/Code/Legacy/CryCommon/IFunctorBase.h deleted file mode 100644 index 6fb3a5d981..0000000000 --- a/Code/Legacy/CryCommon/IFunctorBase.h +++ /dev/null @@ -1,54 +0,0 @@ -/* - * Copyright (c) Contributors to the Open 3D Engine Project. - * For complete copyright and license terms please see the LICENSE at the root of this distribution. - * - * SPDX-License-Identifier: Apache-2.0 OR MIT - * - */ - - -// Description : Base header for multi DLL functors. - - -#ifndef CRYINCLUDE_CRYCOMMON_IFUNCTORBASE_H -#define CRYINCLUDE_CRYCOMMON_IFUNCTORBASE_H -#pragma once - -#include - -// Base class for functor storage. -// Not intended for direct usage. -class IFunctorBase -{ -public: - IFunctorBase() - : m_nReferences(0){} - virtual ~IFunctorBase(){}; - virtual void Call() = 0; - - void AddRef() - { - m_nReferences.fetch_add(1, AZStd::memory_order_acq_rel); - } - - void Release() - { - if (m_nReferences.fetch_sub(1, AZStd::memory_order_acq_rel) == 1) - { - delete this; - } - } - -protected: - AZStd::atomic_int m_nReferences; -}; - -// Base Template for specialization. -// Not intended for direct usage. -template -class TFunctor - : public IFunctorBase -{ -}; - -#endif // CRYINCLUDE_CRYCOMMON_IFUNCTORBASE_H diff --git a/Code/Legacy/CryCommon/IIndexedMesh.h b/Code/Legacy/CryCommon/IIndexedMesh.h index 8d3ee64c71..eaa47473f0 100644 --- a/Code/Legacy/CryCommon/IIndexedMesh.h +++ b/Code/Legacy/CryCommon/IIndexedMesh.h @@ -10,7 +10,6 @@ #pragma once #include "Cry_Color.h" -#include #include // Description: @@ -53,119 +52,3 @@ public: a = othera; } }; - - -// Description: -// Defines a single triangle face in the CMesh topology. -struct SMeshFace -{ - int v[3]; // indices to vertex, normals and optionally tangent basis arrays - unsigned char nSubset; // index to mesh subsets array. -}; - -// Description: -// 3D Normal Vector used by CMesh. -struct SMeshNormal -{ - SMeshNormal() {} - -private: - Vec3 Normal; - -public: - explicit SMeshNormal(const Vec3& othern) - { - Normal = othern; - } - - Vec3 GetN() const { return Normal; } - -}; - -// Subset of mesh is a continuous range of vertices and indices that share same material. -struct SMeshSubset -{ - Vec3 vCenter; - float fRadius; - float fTexelDensity; - - int nFirstIndexId; - int nNumIndices; - - int nFirstVertId; - int nNumVerts; - - int nMatID; // Material Sub-object id. - int nMatFlags; // Special Material flags. - int nPhysicalizeType; // Type of physicalization for this subset. - - AZ::Vertex::Format vertexFormat; - - SMeshSubset() - : vCenter(0, 0, 0) - , fRadius(0) - , fTexelDensity(0) - , nFirstIndexId(0) - , nNumIndices(0) - , nFirstVertId(0) - , nNumVerts(0) - , nMatID(0) - , nMatFlags(0) - , nPhysicalizeType(0x1000) - , vertexFormat(eVF_P3S_C4B_T2S) - { - } - -}; - -// Description: -// Editable mesh interface. -// IndexedMesh can be created directly or loaded from CGF file, before rendering it is converted into IRenderMesh. -// IStatObj is used to host IIndexedMesh, and corresponding IRenderMesh. -struct IIndexedMesh -{ - /*! Structure used for read-only access to mesh data. Used by GetMesh() function */ - struct SMeshDescription - { - const SMeshFace* m_pFaces; // pointer to array of faces - const Vec3* m_pVerts; // pointer to array of vertices in f32 format - const Vec3f16* m_pVertsF16; // pointer to array of vertices in f16 format - const SMeshNormal* m_pNorms; // pointer to array of normals - const SMeshColor* m_pColor; // pointer to array of vertex colors - const SMeshTexCoord* m_pTexCoord; // pointer to array of texture coordinates - const vtx_idx* m_pIndices; // pointer to array of indices - int m_nFaceCount; // number of elements m_pFaces array - int m_nVertCount; // number of elements in m_pVerts, m_pNorms and m_pColor arrays - int m_nCoorCount; // number of elements in m_pTexCoord array - int m_nIndexCount; // number of elements in m_pIndices array - }; - - virtual ~IIndexedMesh() {} - - // Release indexed mesh. - virtual void Release() = 0; - - //! Gives read-only access to mesh data - virtual void GetMeshDescription(SMeshDescription& meshDesc) const = 0; - - //! Return number of allocated faces - virtual int GetFaceCount() const = 0; - - //! Return number of allocated vertices, normals and colors - virtual int GetVertexCount() const = 0; - - /*! Reallocates vertices, normals and colors. Calling this function invalidates SMeshDescription pointers */ - virtual void SetVertexCount(int nNewCount) = 0; - - //! Return number of allocated texture coordinates - virtual int GetTexCoordCount() const = 0; - - // Get number of indices in the mesh. - virtual int GetIndexCount() const = 0; - - ////////////////////////////////////////////////////////////////////////// - // Subset access. - ////////////////////////////////////////////////////////////////////////// - virtual int GetSubSetCount() const = 0; - virtual const SMeshSubset& GetSubSet(int nIndex) const = 0; -}; diff --git a/Code/Legacy/CryCommon/IMovieSystem.h b/Code/Legacy/CryCommon/IMovieSystem.h index 4da08d3bbf..79c000bfca 100644 --- a/Code/Legacy/CryCommon/IMovieSystem.h +++ b/Code/Legacy/CryCommon/IMovieSystem.h @@ -18,7 +18,9 @@ #include #include #include -#include + +#define DEFAULT_NEAR 0.2f +#define DEFAULT_FOV (75.0f * gf_PI / 180.0f) // forward declaration. struct IAnimTrack; diff --git a/Code/Legacy/CryCommon/IRenderAuxGeom.h b/Code/Legacy/CryCommon/IRenderAuxGeom.h index 6627c41530..a07bba83e4 100644 --- a/Code/Legacy/CryCommon/IRenderAuxGeom.h +++ b/Code/Legacy/CryCommon/IRenderAuxGeom.h @@ -10,6 +10,8 @@ #include "Cry_Color.h" #include "IRenderer.h" +#include +#include struct SAuxGeomRenderFlags; diff --git a/Code/Legacy/CryCommon/IRenderer.h b/Code/Legacy/CryCommon/IRenderer.h index 495c885e44..d457b234e4 100644 --- a/Code/Legacy/CryCommon/IRenderer.h +++ b/Code/Legacy/CryCommon/IRenderer.h @@ -9,7 +9,6 @@ #pragma once -#include "Cry_Camera.h" #include "VertexFormats.h" #include diff --git a/Code/Legacy/CryCommon/IShader.h b/Code/Legacy/CryCommon/IShader.h index 208af79ece..c425bfecc0 100644 --- a/Code/Legacy/CryCommon/IShader.h +++ b/Code/Legacy/CryCommon/IShader.h @@ -52,7 +52,6 @@ enum EParamType }; struct IShader; -class CCamera; union UParamVal { @@ -64,7 +63,6 @@ union UParamVal char* m_String; float m_Color[4]; float m_Vector[3]; - CCamera* m_pCamera; }; struct SShaderParam diff --git a/Code/Legacy/CryCommon/IStatObj.h b/Code/Legacy/CryCommon/IStatObj.h deleted file mode 100644 index a809064bcc..0000000000 --- a/Code/Legacy/CryCommon/IStatObj.h +++ /dev/null @@ -1,110 +0,0 @@ -/* - * Copyright (c) Contributors to the Open 3D Engine Project. - * For complete copyright and license terms please see the LICENSE at the root of this distribution. - * - * SPDX-License-Identifier: Apache-2.0 OR MIT - * - */ -#pragma once - -#include "Cry_Math.h" -#include "Cry_Geo.h" -#include "IMaterial.h" - -// General forward declaration. -struct SRenderingPassInfo; - -////////////////////////////////////////////////////////////////////////// -// Type of static sub object. -////////////////////////////////////////////////////////////////////////// -enum EStaticSubObjectType -{ - STATIC_SUB_OBJECT_MESH, // This simple geometry part of the multi-sub object geometry. - STATIC_SUB_OBJECT_HELPER_MESH, // Special helper mesh, not rendered usually, used for broken pieces. -}; - -// used for on-CPU voxelization -struct SRayHitInfo -{ - SRayHitInfo() - { - memset(this, 0, sizeof(*this)); - } - ////////////////////////////////////////////////////////////////////////// - // Input parameters. - Vec3 inReferencePoint; - Ray inRay; - - ////////////////////////////////////////////////////////////////////////// - // Output parameters. - Vec3 vHitPos; - Vec3 vHitNormal; - - // More inputs - bool bInFirstHit; - bool bUseCache; -}; - -// Summary: -// Interface to hold static object data -struct IStatObj -{ - ////////////////////////////////////////////////////////////////////////// - // SubObject - ////////////////////////////////////////////////////////////////////////// - struct SSubObject - { - EStaticSubObjectType nType; - Matrix34 localTM; // Local transformation matrix, relative to parent. - IStatObj* pStatObj; // Static object for sub part of CGF. - }; - ////////////////////////////////////////////////////////////////////////// - - virtual ~IStatObj() {} - // Description: - // Provide access to the faces, vertices, texture coordinates, normals and - // colors of the object used later for CRenderMesh construction. - // Return Value: - // - // Summary: - // Get the object source geometry - virtual struct IIndexedMesh* GetIndexedMesh(bool bCreateIfNone = false) = 0; - - // Summary: - // Get the bounding box - // Arguments: - // Mins - Position of the bottom left close corner of the bounding box - // Maxs - Position of the top right far corner of the bounding box - virtual AABB GetAABB() = 0; - - // Description: - // Returns the LOD object, if present. - // Arguments: - // nLodLevel - Level of the LOD - // bReturnNearest - if true will return nearest available LOD to nLodLevel. - // Return Value: - // A static object with the desired LOD. The value NULL will be return if there isn't any LOD object for the level requested. - // Summary: - // Get the LOD object - virtual IStatObj* GetLodObject(int nLodLevel, bool bReturnNearest = false) = 0; - - // Summary: - // Returns a pointer to the object - // Return Value: - // A pointer to the current object, which is simply done like this "return this;" - virtual struct IStatObj* GetIStatObj() { return this; } - - ////////////////////////////////////////////////////////////////////////// - // Interface to the Sub Objects. - ////////////////////////////////////////////////////////////////////////// - // Summary: - // Retrieve number of sub-objects. - virtual int GetSubObjectCount() const = 0; - // Summary: - // Retrieve sub object by index, where 0 <= nIndex < GetSubObjectCount() - virtual SSubObject* GetSubObject(int nIndex) = 0; - - // Intersect ray with static object. - // Ray must be in object local space. - virtual bool RayIntersection(SRayHitInfo& hitInfo, IMaterial* pCustomMtl = nullptr) = 0; -}; diff --git a/Code/Legacy/CryCommon/ISystem.h b/Code/Legacy/CryCommon/ISystem.h index 948977d02a..6fdc8b52fe 100644 --- a/Code/Legacy/CryCommon/ISystem.h +++ b/Code/Legacy/CryCommon/ISystem.h @@ -47,7 +47,6 @@ struct IConsole; struct IRemoteConsole; struct IRenderer; struct IProcess; -struct ITimer; struct ICryFont; struct IMovieSystem; namespace Audio @@ -57,7 +56,6 @@ namespace Audio struct SFileVersion; struct INameTable; struct ILevelSystem; -struct IViewSystem; class IXMLBinarySerializer; struct IAVI_Reader; class CPNoise3; @@ -75,7 +73,6 @@ namespace AZ typedef void* WIN_HWND; -class CCamera; struct CLoadingTimeProfiler; class ICmdLine; @@ -430,7 +427,7 @@ struct ISystemUserCallback // Description: // Show message by provider. - virtual int ShowMessage(const char* text, const char* caption, unsigned int uType) { return CryMessageBox(text, caption, uType); } + virtual void ShowMessage(const char* text, const char* caption, unsigned int uType) { CryMessageBox(text, caption, uType); } // @@ -612,7 +609,6 @@ struct SSystemGlobalEnvironment { AZ::IO::IArchive* pCryPak; AZ::IO::FileIOBase* pFileIO; - ITimer* pTimer; ICryFont* pCryFont; ::IConsole* pConsole; ISystem* pSystem = nullptr; @@ -739,24 +735,6 @@ public: #undef GetUserName #endif - -struct IProfilingSystem -{ - // - virtual ~IProfilingSystem() {} - ////////////////////////////////////////////////////////////////////////// - // VTune Profiling interface. - - // Summary: - // Resumes vtune data collection. - virtual void VTuneResume() = 0; - // Summary: - // Pauses vtune data collection. - virtual void VTunePause() = 0; - ////////////////////////////////////////////////////////////////////////// - // -}; - //////////////////////////////////////////////////////////////////////////////////////////////// // Description: @@ -833,16 +811,13 @@ struct ISystem // Description: // Report message by provider or by using CryMessageBox. // Doesn't terminate the execution. - virtual int ShowMessage(const char* text, const char* caption, unsigned int uType) = 0; + virtual void ShowMessage(const char* text, const char* caption, unsigned int uType) = 0; // Summary: // Compare specified verbosity level to the one currently set. virtual bool CheckLogVerbosity(int verbosity) = 0; // return the related subsystem interface - - // - virtual IViewSystem* GetIViewSystem() = 0; virtual ILevelSystem* GetILevelSystem() = 0; virtual ICmdLine* GetICmdLine() = 0; virtual ILog* GetILog() = 0; @@ -851,18 +826,8 @@ struct ISystem virtual IMovieSystem* GetIMovieSystem() = 0; virtual ::IConsole* GetIConsole() = 0; virtual IRemoteConsole* GetIRemoteConsole() = 0; - virtual IProfilingSystem* GetIProfilingSystem() = 0; virtual ISystemEventDispatcher* GetISystemEventDispatcher() = 0; - virtual ITimer* GetITimer() = 0; - - // Arguments: - // bValue - Set to true when running on a cheat protected server or a client that is connected to it (not used in singleplayer). - virtual void SetForceNonDevMode(bool bValue) = 0; - // Return Value: - // True when running on a cheat protected server or a client that is connected to it (not used in singleplayer). - virtual bool GetForceNonDevMode() const = 0; - virtual bool WasInDevMode() const = 0; virtual bool IsDevMode() const = 0; ////////////////////////////////////////////////////////////////////////// @@ -887,18 +852,6 @@ struct ISystem // When ignore update sets to true, system will ignore and updates and render calls. virtual void IgnoreUpdates(bool bIgnore) = 0; - // Summary: - // Sets the active process - // Arguments: - // process - A pointer to a class that implement the IProcess interface. - virtual void SetIProcess(IProcess* process) = 0; - - // Summary: - // Gets the active process. - // Return Value: - // A pointer to the current active process. - virtual IProcess* GetIProcess() = 0; - // Return Value: // True if system running in Test mode. virtual bool IsTestMode() const = 0; @@ -938,8 +891,6 @@ struct ISystem // pCallback - 0 means normal LoadConfigVar behaviour is used virtual void LoadConfiguration(const char* sFilename, ILoadConfigurationEntrySink* pSink = 0, bool warnIfMissing = true) = 0; - virtual ESystemConfigSpec GetMaxConfigSpec() const = 0; - ////////////////////////////////////////////////////////////////////////// // Summary: @@ -964,10 +915,6 @@ struct ISystem // Retrieves the perlin noise singleton instance. virtual CPNoise3* GetNoiseGen() = 0; - // Summary: - // Retrieves system update counter. - virtual uint64 GetUpdateCounter() = 0; - ////////////////////////////////////////////////////////////////////////// // Error callback handling @@ -1000,13 +947,6 @@ struct ISystem virtual void SetAssertVisible(bool bAssertVisble) = 0; ////////////////////////////////////////////////////////////////////////// - // Summary: - // Enable/Disable drawing the console - virtual void SetConsoleDrawEnabled(bool enabled) = 0; - - // Enable/Disable drawing the UI - virtual void SetUIDrawEnabled(bool enabled) = 0; - // Summary: // Get the index of the currently running O3DE application. (0 = first instance, 1 = second instance, etc) virtual int GetApplicationInstance() = 0; @@ -1054,12 +994,6 @@ struct ISystem virtual bool IsSavingResourceList() const = 0; #endif - // Summary: - // Gets the root window message handler function - // The returned pointer is platform-specific: - // For Windows OS, the pointer is of type WNDPROC - virtual void* GetRootWindowMessageHandler() = 0; - // Summary: // Register a IWindowMessageHandler that will be informed about window messages // The delivered messages are platform-specific @@ -1069,10 +1003,6 @@ struct ISystem // Unregister an IWindowMessageHandler that was previously registered using RegisterWindowMessageHandler virtual void UnregisterWindowMessageHandler(IWindowMessageHandler* pHandler) = 0; - // Create an instance of a Local File IO object (which reads directly off the local filesystem, instead of, - // for example, reading from the network or a pack or USB or such. - virtual std::shared_ptr CreateLocalFileIO() = 0; - //////////////////////////////////////////////////////////////////////////////////////////////// // EBus interface used to listen for cry system notifications class CrySystemNotifications : public AZ::EBusTraits @@ -1121,25 +1051,17 @@ inline ISystem* GetISystem() // Description: // This function must be called once by each module at the beginning, to setup global pointers. -extern "C" AZ_DLL_EXPORT void ModuleInitISystem(ISystem* pSystem, const char* moduleName); -extern "C" AZ_DLL_EXPORT void ModuleShutdownISystem(ISystem* pSystem); -extern "C" AZ_DLL_EXPORT void InjectEnvironment(void* env); -extern "C" AZ_DLL_EXPORT void DetachEnvironment(); +void ModuleInitISystem(ISystem* pSystem, const char* moduleName); +void ModuleShutdownISystem(ISystem* pSystem); void* GetModuleInitISystemSymbol(); void* GetModuleShutdownISystemSymbol(); -void* GetInjectEnvironmentSymbol(); -void* GetDetachEnvironmentSymbol(); #define PREVENT_MODULE_AND_ENVIRONMENT_SYMBOL_STRIPPING \ AZ_UNUSED(GetModuleInitISystemSymbol()); \ - AZ_UNUSED(GetModuleShutdownISystemSymbol()); \ - AZ_UNUSED(GetInjectEnvironmentSymbol()); \ - AZ_UNUSED(GetDetachEnvironmentSymbol()); + AZ_UNUSED(GetModuleShutdownISystemSymbol()); -extern bool g_bProfilerEnabled; - // Summary: // Interface of the DLL. extern "C" diff --git a/Code/Legacy/CryCommon/ITimer.h b/Code/Legacy/CryCommon/ITimer.h deleted file mode 100644 index 06bdab61e7..0000000000 --- a/Code/Legacy/CryCommon/ITimer.h +++ /dev/null @@ -1,211 +0,0 @@ -/* - * Copyright (c) Contributors to the Open 3D Engine Project. - * For complete copyright and license terms please see the LICENSE at the root of this distribution. - * - * SPDX-License-Identifier: Apache-2.0 OR MIT - * - */ - - -#ifndef CRYINCLUDE_CRYCOMMON_ITIMER_H -#define CRYINCLUDE_CRYCOMMON_ITIMER_H -#pragma once - - -#include "TimeValue.h" // CTimeValue -#include "SerializeFwd.h" - -struct tm; - -// Summary: -// Interface to the Timer System. -struct ITimer -{ - enum ETimer - { - ETIMER_GAME = 0, // Pausable, serialized, frametime is smoothed/scaled/clamped. - ETIMER_UI, // Non-pausable, non-serialized, frametime unprocessed. - ETIMER_LAST - }; - - enum ETimeScaleChannels - { - eTSC_Trackview = 0, - eTSC_GameStart - }; - - // - virtual ~ITimer() {}; - - // Summary: - // Resets the timer - // Notes: - // Only needed because float precision wasn't last that long - can be removed if 64bit is used everywhere. - virtual void ResetTimer() = 0; - - // Summary: - // Updates the timer every frame, needs to be called by the system. - virtual void UpdateOnFrameStart() = 0; - - // Summary: - // Returns the absolute time at the last UpdateOnFrameStart() call. - // Todo: - // Remove, use GetFrameStartTime() instead. - // See also: - // UpdateOnFrameStart(),GetFrameStartTime() - virtual float GetCurrTime(ETimer which = ETIMER_GAME) const = 0; - - // Summary: - // Returns the absolute time at the last UpdateOnFrameStart() call. - // See also: - // UpdateOnFrameStart() - //virtual const CTimeValue& GetFrameStartTime(ETimer which = ETIMER_GAME) const = 0; - virtual const CTimeValue& GetFrameStartTime(ETimer which = ETIMER_GAME) const = 0; - - // Summary: - // Returns the absolute current time. - // Notes: - // The value continuously changes, slower than GetFrameStartTime(). - // See also: - // GetFrameStartTime() - virtual CTimeValue GetAsyncTime() const = 0; - - // Summary: - // Returns the absolute current time at the moment of the call. - virtual float GetAsyncCurTime() = 0; - - // Summary: - // Returns the relative time passed from the last UpdateOnFrameStart() in seconds. - // See also: - // UpdateOnFrameStart() - virtual float GetFrameTime(ETimer which = ETIMER_GAME) const = 0; - - // Description: - // Returns the relative time passed from the last UpdateOnFrameStart() in seconds without any dilation, smoothing, clamping, etc... - // See also: - // UpdateOnFrameStart() - virtual float GetRealFrameTime() const = 0; - - // Summary: - // Returns the time scale applied to time values. - virtual float GetTimeScale() const = 0; - - // Summary: - // Returns the time scale factor for the given channel - virtual float GetTimeScale(uint32 channel) const = 0; - - // Summary: - // Clears all current time scale requests - virtual void ClearTimeScales() = 0; - - // Summary: - // Sets the time scale applied to time values. - virtual void SetTimeScale(float s, uint32 channel = 0) = 0; - - // Summary: - // Enables/disables timer. - virtual void EnableTimer(bool bEnable) = 0; - - // Return Value: - // True if timer is enabled - virtual bool IsTimerEnabled() const = 0; - - // Summary: - // Returns the current framerate in frames/second. - virtual float GetFrameRate() = 0; - - // Summary: - // Returns the fraction to blend current frame in profiling stats. - virtual float GetProfileFrameBlending(float* pfBlendTime = 0, int* piBlendMode = 0) = 0; - - // Summary: - // Serialization. - virtual void Serialize(TSerialize ser) = 0; - - // Summary: - // Tries to pause/unpause a timer. - // Return Value: - // True if successfully paused/unpaused, false otherwise. - virtual bool PauseTimer(ETimer which, bool bPause) = 0; - - // Summary: - // Determines if a timer is paused. - // Returns: - // True if paused, false otherwise. - virtual bool IsTimerPaused(ETimer which) = 0; - - // Summary: - // Tries to set a timer. - // Returns: - // True if successful, false otherwise. - virtual bool SetTimer(ETimer which, float timeInSeconds) = 0; - - // Summary: - // Makes a tm struct from a time_t in UTC - // Example: - // Like gmtime. - virtual void SecondsToDateUTC(time_t time, struct tm& outDateUTC) = 0; - - // Summary: - // Makes a UTC time from a tm. - // Example: - // Like timegm, but not available on all platforms. - virtual time_t DateToSecondsUTC(struct tm& timePtr) = 0; - - - // Summary - // Convert from ticks (CryGetTicks()) to seconds - // - virtual float TicksToSeconds(int64 ticks) = 0; - - // Summary - // Get number of ticks per second - // - virtual int64 GetTicksPerSecond() = 0; - - // Summary - // Create a new timer of the same type - // - virtual ITimer* CreateNewTimer() = 0; - - /*! - This is similar to the cvar t_FixedStep. However it is stronger, and will cause even GetRealFrameTime to follow the fixed time stamp. - GetRealFrameTime will always return the same value as GetFrameTime. This mode is mostly intended for Feature tests that have strict requirements - for determinism. It will cause even fps counters to return a fixed value that does not match the actual fps. I could see this also being useful - if rendering a video. - */ - virtual void EnableFixedTimeMode(bool enable, float timeStep) = 0; - // -}; - -// Description: -// This class is used for automatic profiling of a section of the code. -// Creates an instance of this class, and upon exiting from the code section. -template -class CITimerAutoProfiler -{ -public: - CITimerAutoProfiler (ITimer* pTimer, time& rTime) - : m_pTimer (pTimer) - , m_rTime (rTime) - { - rTime -= pTimer->GetAsyncCurTime(); - } - - ~CITimerAutoProfiler () - { - m_rTime += m_pTimer->GetAsyncCurTime(); - } - -protected: - ITimer* m_pTimer; - time& m_rTime; -}; - -// Description: -// Include this string AUTO_PROFILE_SECTION(pITimer, g_fTimer) for the section of code where the profiler timer must be turned on and off. -// The profiler timer is just some global or static float or double value that accumulates the time (in seconds) spent in the given block of code. -// pITimer is a pointer to the ITimer interface, g_fTimer is the global accumulator. -#define AUTO_PROFILE_SECTION(pITimer, g_fTimer) CITimerAutoProfiler __section_auto_profiler(pITimer, g_fTimer) - -#endif // CRYINCLUDE_CRYCOMMON_ITIMER_H diff --git a/Code/Legacy/CryCommon/IViewSystem.h b/Code/Legacy/CryCommon/IViewSystem.h deleted file mode 100644 index d8514aadf6..0000000000 --- a/Code/Legacy/CryCommon/IViewSystem.h +++ /dev/null @@ -1,295 +0,0 @@ -/* - * Copyright (c) Contributors to the Open 3D Engine Project. - * For complete copyright and license terms please see the LICENSE at the root of this distribution. - * - * SPDX-License-Identifier: Apache-2.0 OR MIT - * - */ - - -// Description : View System interfaces. - -#pragma once - -#include -#include - -// -#define VIEWID_NORMAL 0 -#define VIEWID_FOLLOWHEAD 1 -#define VIEWID_VEHICLE 2 -#define VIEWID_RAGDOLL 3 - -//Forward declaration of AZ::Entity -namespace AZ { - class Entity; -} - -enum EMotionBlurType -{ - eMBT_None = 0, - eMBT_Accumulation = 1, - eMBT_Velocity = 2 -}; - -struct SViewParams -{ - SViewParams() - : position(ZERO) - , rotation(IDENTITY) - , localRotationLast(IDENTITY) - , nearplane(0.0f) - , farplane(0.0f) - , fov(0.0f) - , viewID(0) - , groundOnly(false) - , shakingRatio(0.0f) - , currentShakeQuat(IDENTITY) - , currentShakeShift(ZERO) - , targetPos(ZERO) - , frameTime(0.0f) - , angleVel(0.0f) - , vel(0.0f) - , dist(0.0f) - , blend(true) - , blendPosSpeed(5.0f) - , blendRotSpeed(10.0f) - , blendFOVSpeed(5.0f) - , blendPosOffset(ZERO) - , blendRotOffset(IDENTITY) - , blendFOVOffset(0) - , justActivated(false) - , viewIDLast(0) - , positionLast(ZERO) - , rotationLast(IDENTITY) - , FOVLast(0) - { - } - - void SetViewID(uint8 id, bool shouldBlend = true) - { - viewID = id; - if (!shouldBlend) - { - viewIDLast = id; - } - } - - void UpdateBlending(float curFrameTime) - { - //if necessary blend the view - if (blend) - { - if (viewIDLast != viewID) - { - blendPosOffset = positionLast - position; - blendRotOffset = (rotationLast / rotation).GetNormalized(); - blendFOVOffset = FOVLast - fov; - } - else - { - blendPosOffset -= blendPosOffset * min(1.0f, blendPosSpeed * curFrameTime); - blendRotOffset = Quat::CreateSlerp(blendRotOffset, IDENTITY, min(1.0f, curFrameTime * blendRotSpeed)); - blendFOVOffset -= blendFOVOffset * min(1.0f, blendFOVSpeed * curFrameTime); - } - - position += blendPosOffset; - rotation *= blendRotOffset; - fov += blendFOVOffset; - } - else - { - blendPosOffset.zero(); - blendRotOffset.SetIdentity(); - blendFOVOffset = 0.0f; - } - - viewIDLast = viewID; - } - - void BlendFrom(const SViewParams& params) - { - positionLast = params.position; - rotationLast = params.rotation; - FOVLast = params.fov; - localRotationLast = params.localRotationLast; - blend = true; - viewIDLast = 0xff; - } - - void SaveLast() - { - if (viewIDLast != 0xff) - { - positionLast = position; - rotationLast = rotation; - FOVLast = fov; - } - else - { - viewIDLast = 0xfe; - } - } - - void ResetBlending() - { - blendPosOffset.zero(); - blendRotOffset.SetIdentity(); - } - - const Vec3& GetPositionLast() { return positionLast; } - const Quat& GetRotationLast() { return rotationLast; } - - // - Vec3 position;//view position - Quat rotation;//view orientation - Quat localRotationLast; - - float nearplane;//custom near clipping plane, 0 means use engine defaults - float farplane;//custom far clipping plane, 0 means use engine defaults - float fov; - - uint8 viewID; - - //view shake status - bool groundOnly; - float shakingRatio;//whats the ammount of shake, from 0.0 to 1.0 - Quat currentShakeQuat;//what the current angular shake - Vec3 currentShakeShift;//what is the current translational shake - - // For damping camera movement. - Vec3 targetPos; // Where the target was. - float frameTime; // current dt. - float angleVel; // previous rate of change of angle. - float vel; // previous rate of change of dist between target and camera. - float dist; // previous dist of cam from target - - //blending - bool blend; - float blendPosSpeed; - float blendRotSpeed; - float blendFOVSpeed; - Vec3 blendPosOffset; - Quat blendRotOffset; - float blendFOVOffset; - bool justActivated; - -private: - uint8 viewIDLast; - Vec3 positionLast;//last view position - Quat rotationLast;//last view orientation - float FOVLast; -}; - -struct IAnimSequence; -struct SCameraParams; - -struct IView -{ - virtual ~IView() {} - struct SShakeParams - { - Ang3 shakeAngle; - Vec3 shakeShift; - float sustainDuration; - float fadeInDuration; - float fadeOutDuration; - float frequency; - float randomness; - int shakeID; - bool bFlipVec; - bool bUpdateOnly; - bool bGroundOnly; - bool bPermanent; // if true, sustainDuration is ignored - bool isSmooth; - - SShakeParams() - : shakeAngle(0, 0, 0) - , shakeShift(0, 0, 0) - , sustainDuration(0) - , fadeInDuration(0) - , fadeOutDuration(2.f) - , frequency(0) - , randomness(0) - , shakeID(0) - , bFlipVec(true) - , bUpdateOnly(false) - , bGroundOnly(false) - , bPermanent(false) - , isSmooth(false) - { - } - }; - - virtual void Release() = 0; - virtual void Update(float frameTime, bool isActive) = 0; - virtual void LinkTo(AZ::Entity* follow) = 0; - virtual void Unlink() = 0; - virtual AZ::EntityId GetLinkedId() = 0; - virtual CCamera& GetCamera() = 0; - virtual const CCamera& GetCamera() const = 0; - - virtual void PostSerialize() = 0; - virtual void SetCurrentParams(SViewParams& params) = 0; - virtual const SViewParams* GetCurrentParams() = 0; - virtual void SetViewShake(Ang3 shakeAngle, Vec3 shakeShift, float duration, float frequency, float randomness, int shakeID, bool bFlipVec = true, bool bUpdateOnly = false, bool bGroundOnly = false) = 0; - virtual void SetViewShakeEx(const SShakeParams& params) = 0; - virtual void StopShake(int shakeID) = 0; - virtual void ResetShaking() = 0; - virtual void ResetBlending() = 0; - virtual void SetFrameAdditiveCameraAngles(const Ang3& addFrameAngles) = 0; - virtual void SetScale(const float scale) = 0; - virtual void SetZoomedScale(const float scale) = 0; - virtual void SetActive(const bool bActive) = 0; -}; - -struct IViewSystemListener -{ - virtual ~IViewSystemListener() {} - virtual bool OnBeginCutScene(IAnimSequence* pSeq, bool bResetFX) = 0; - virtual bool OnEndCutScene(IAnimSequence* pSeq) = 0; - virtual bool OnCameraChange(const SCameraParams& cameraParams) = 0; -}; - -struct IViewSystem -{ - virtual ~IViewSystem() {} - virtual void Release() = 0; - virtual void Update(float frameTime) = 0; - virtual IView* CreateView() = 0; - virtual unsigned int AddView(IView* pView) = 0; - virtual void RemoveView(IView* pView) = 0; - virtual void RemoveView(unsigned int viewId) = 0; - - virtual void SetActiveView(IView* pView) = 0; - virtual void SetActiveView(unsigned int viewId) = 0; - - //utility functions - virtual IView* GetView(unsigned int viewId) = 0; - virtual IView* GetActiveView() = 0; - - virtual unsigned int GetViewId(IView* pView) = 0; - virtual unsigned int GetActiveViewId() = 0; - - virtual IView* GetViewByEntityId(const AZ::EntityId& id, bool forceCreate = false) = 0; - - virtual bool AddListener(IViewSystemListener* pListener) = 0; - virtual bool RemoveListener(IViewSystemListener* pListener) = 0; - - virtual void PostSerialize() = 0; - - // Get default distance to near clipping plane. - virtual float GetDefaultZNear() = 0; - - virtual void SetBlendParams(float fBlendPosSpeed, float fBlendRotSpeed, bool performBlendOut) = 0; - - // Used by time demo playback. - virtual void SetOverrideCameraRotation(bool bOverride, Quat rotation) = 0; - - virtual bool IsPlayingCutScene() const = 0; - - virtual void SetDeferredViewSystemUpdate(bool const bDeferred) = 0; - virtual bool UseDeferredViewSystemUpdate() const = 0; - virtual void SetControlAudioListeners(bool const bActive) = 0; - virtual void ForceUpdate(float elapsed) = 0; -}; diff --git a/Code/Legacy/CryCommon/IXml.h b/Code/Legacy/CryCommon/IXml.h index be2bdcd5ab..6c30789efd 100644 --- a/Code/Legacy/CryCommon/IXml.h +++ b/Code/Legacy/CryCommon/IXml.h @@ -87,7 +87,7 @@ class XmlString public: XmlString() {}; XmlString(const char* str) - : AZStd::string(str) {}; + : AZStd::string(str) {} size_t GetAllocatedMemory() const { @@ -243,15 +243,6 @@ public: // Removes child node. virtual void removeChild(const XmlNodeRef& node) = 0; - // Summary: - // Inserts child node. - virtual void insertChild(int nIndex, const XmlNodeRef& node) = 0; - - // Summary: - // Replaces a specified child with the passed one - // Not supported by all node implementations - virtual void replaceChild(int nIndex, const XmlNodeRef& fromNode) = 0; - // Summary: // Removes all child nodes. virtual void removeAllChilds() = 0; @@ -283,13 +274,6 @@ public: // Sets content of this node. virtual void setContent(const char* str) = 0; - // Summary: - // Deep clone of this and all child xml nodes. - virtual XmlNodeRef clone() = 0; - - // Summary: - // Returns line number for XML tag. - virtual int getLine() const = 0; // Summary: // Set line number in xml. virtual void setLine(int line) = 0; @@ -385,20 +369,6 @@ public: } #endif - // Summary: - // Copies children to this node from a given node. - // Children are reference copied (shallow copy) and the children's parent is NOT set to this - // node, but left with its original parent (which is still the parent) - virtual void shareChildren(const XmlNodeRef& fromNode) = 0; - - // Summary: - // Removes child node at known position. - virtual void deleteChildAt(int nIndex) = 0; - - // Summary: - // Returns XML of this node and sub nodes into tmpBuffer without XML checks (much faster) - virtual XmlString getXMLUnsafe(int level, [[maybe_unused]] char* tmpBuffer, [[maybe_unused]] uint32 sizeOfTmpBuffer) const { return getXML(level); } - // Notes: // Save in small memory chunks. virtual bool saveToFile(const char* fileName, size_t chunkSizeBytes, AZ::IO::HandleType fileHandle = AZ::IO::InvalidHandle) = 0; @@ -413,28 +383,22 @@ public: bool getAttr(const char* key, long& value) const { int v; - if (getAttr(key, v)) - { - value = static_cast(v); - return true; - } - else + if (!getAttr(key, v)) { return false; } + value = static_cast(v); + return true; } bool getAttr(const char* key, unsigned long& value) const { int v; - if (getAttr(key, v)) - { - value = static_cast(v); - return true; - } - else + if (!getAttr(key, v)) { return false; } + value = static_cast(v); + return true; } void setAttr(const char* key, unsigned long value) { setAttr(key, (unsigned int)value); }; void setAttr(const char* key, long value) { setAttr(key, (int)value); }; @@ -442,54 +406,42 @@ public: bool getAttr(const char* key, unsigned short& value) const { int v; - if (getAttr(key, v)) - { - value = static_cast(v); - return true; - } - else + if (!getAttr(key, v)) { return false; } + value = static_cast(v); + return true; } bool getAttr(const char* key, unsigned char& value) const { int v; - if (getAttr(key, v)) - { - value = static_cast(v); - return true; - } - else + if (!getAttr(key, v)) { return false; } + value = static_cast(v); + return true; } bool getAttr(const char* key, short& value) const { int v; - if (getAttr(key, v)) - { - value = static_cast(v); - return true; - } - else + if (!getAttr(key, v)) { return false; } + value = static_cast(v); + return true; } bool getAttr(const char* key, char& value) const { int v; - if (getAttr(key, v)) - { - value = static_cast(v); - return true; - } - else + if (!getAttr(key, v)) { return false; } + value = static_cast(v); + return true; } //##@} diff --git a/Code/Legacy/CryCommon/LinuxSpecific.h b/Code/Legacy/CryCommon/LinuxSpecific.h index b3e75476c9..0062119a30 100644 --- a/Code/Legacy/CryCommon/LinuxSpecific.h +++ b/Code/Legacy/CryCommon/LinuxSpecific.h @@ -102,11 +102,6 @@ typedef float FLOAT; #endif -#ifndef SAFE_RELEASE_FORCE -#define SAFE_RELEASE_FORCE(p) { if (p) { (p)->ReleaseForce(); (p) = NULL; } \ -} -#endif - #define MAKEWORD(a, b) ((WORD)(((BYTE)((DWORD_PTR)(a) & 0xff)) | ((WORD)((BYTE)((DWORD_PTR)(b) & 0xff))) << 8)) #define MAKELONG(a, b) ((LONG)(((WORD)((DWORD_PTR)(a) & 0xffff)) | ((DWORD)((WORD)((DWORD_PTR)(b) & 0xffff))) << 16)) #define LOWORD(l) ((WORD)((DWORD_PTR)(l) & 0xffff)) @@ -462,13 +457,6 @@ inline int64 CryGetTicks() return counter.QuadPart; } -inline int64 CryGetTicksPerSec() -{ - LARGE_INTEGER li; - QueryPerformanceFrequency(&li); - return li.QuadPart; -} - #endif //__cplusplus inline int _CrtCheckMemory() { return 1; }; diff --git a/Code/Legacy/CryCommon/Linux_Win32Wrapper.h b/Code/Legacy/CryCommon/Linux_Win32Wrapper.h index 7157bc4a78..0e3ce80bfe 100644 --- a/Code/Legacy/CryCommon/Linux_Win32Wrapper.h +++ b/Code/Legacy/CryCommon/Linux_Win32Wrapper.h @@ -5,10 +5,6 @@ * SPDX-License-Identifier: Apache-2.0 OR MIT * */ - - -#ifndef CRYINCLUDE_CRYCOMMON_LINUX_WIN32WRAPPER_H -#define CRYINCLUDE_CRYCOMMON_LINUX_WIN32WRAPPER_H #pragma once #include @@ -326,57 +322,6 @@ inline uint32 GetTickCount() #define _strlwr_s(BUF, SIZE) strlwr(BUF) #define _strups strupr -typedef struct __finddata64_t -{ - //!< atributes set by find request - unsigned int attrib; //!< attributes, only directory and readonly flag actually set - int64 time_create; //!< creation time, cannot parse under linux, last modification time is used instead (game does nowhere makes decision based on this values) - int64 time_access; //!< last access time - int64 time_write; //!< last modification time - int64 size; //!< file size (for a directory it will be the block size) - char name[256]; //!< file/directory name - -private: - int m_LastIndex; //!< last index for findnext - char m_DirectoryName[260]; //!< directory name, needed when getting file attributes on the fly - char m_ToMatch[260]; //!< pattern to match with - DIR* m_Dir; //!< directory handle - std::vector m_Entries; //!< all file entries in the current directories -public: - - inline __finddata64_t() - : attrib(0) - , time_create(0) - , time_access(0) - , time_write(0) - , size(0) - , m_LastIndex(-1) - , m_Dir(NULL) - { - memset(name, '0', 256); - } - ~__finddata64_t(); - - //!< copies and retrieves the data for an actual match (to not waste any effort retrioeving data for unused files) - void CopyFoundData(const char* rMatchedFileName); - -public: - //!< global _findfirst64 function using struct above, can't be a member function due to required semantic match - friend intptr_t _findfirst64(const char* pFileName, __finddata64_t* pFindData); - //!< global _findnext64 function using struct above, can't be a member function due to required semantic match - friend int _findnext64(intptr_t last, __finddata64_t* pFindData); -}__finddata64_t; - -typedef struct _finddata_t - : public __finddata64_t -{}_finddata_t;//!< need inheritance since in many places it get used as struct _finddata_t -extern int _findnext64(intptr_t last, __finddata64_t* pFindData); -extern intptr_t _findfirst64(const char* pFileName, __finddata64_t* pFindData); - -extern DWORD GetFileAttributesW(LPCWSTR lpFileName); - -extern const bool GetFilenameNoCase(const char* file, char*, const bool cCreateNew = false); - extern BOOL GetUserName(LPSTR lpBuffer, LPDWORD nSize); //error code stuff @@ -646,8 +591,3 @@ inline unsigned long long _byteswap_uint64(unsigned long long input) ((input & 0x000000000000ff00ull) << 40) | ((input & 0x00000000000000ffull) << 56)); } - -#endif // CRYINCLUDE_CRYCOMMON_LINUX_WIN32WRAPPER_H - -// vim:ts=2 - diff --git a/Code/Legacy/CryCommon/LyShine/IDraw2d.h b/Code/Legacy/CryCommon/LyShine/IDraw2d.h deleted file mode 100644 index 3bfa3a1c14..0000000000 --- a/Code/Legacy/CryCommon/LyShine/IDraw2d.h +++ /dev/null @@ -1,62 +0,0 @@ -/* - * Copyright (c) Contributors to the Open 3D Engine Project. - * For complete copyright and license terms please see the LICENSE at the root of this distribution. - * - * SPDX-License-Identifier: Apache-2.0 OR MIT - * - */ -#pragma once - -#include -#include -#include -#include - -//////////////////////////////////////////////////////////////////////////////////////////////////// -//! Class for 2D drawing in screen space -// -//! The IDraw2d interface allows drawing images and text in 2D. -//! Positions and sizes are specified in pixels in the current 2D viewport. -//! The BeginDraw2d method should be called before calling the Draw methods to enter 2D mode -//! and the EndDraw2d method should be called after calling the Draw methods to exit 2D mode. -//! There is a helper class Draw2dHelper that encapsulates this in its constructor and destructor. -class IDraw2d -{ -public: // types - - //! Horizontal alignment can be used for both text and image drawing - enum class HAlign - { - Left, - Center, - Right, - }; - - //! Vertical alignment can be used for both text and image drawing - enum class VAlign - { - Top, - Center, - Bottom, - }; - - //! Used for specifying how to round positions to an exact pixel position for pixel-perfect rendering - enum class Rounding - { - None, - Nearest, - Down, - Up - }; - - enum - { - //! Limit imposed by FFont. This is the max number of characters including the null terminator. - MAX_TEXT_STRING_LENGTH = 1024, - }; - -public: // member functions - - //! Implement virtual destructor just for safety. - virtual ~IDraw2d() {} -}; diff --git a/Code/Legacy/CryCommon/LyShine/IRenderGraph.h b/Code/Legacy/CryCommon/LyShine/IRenderGraph.h deleted file mode 100644 index 716e0f7417..0000000000 --- a/Code/Legacy/CryCommon/LyShine/IRenderGraph.h +++ /dev/null @@ -1,80 +0,0 @@ -/* - * Copyright (c) Contributors to the Open 3D Engine Project. - * For complete copyright and license terms please see the LICENSE at the root of this distribution. - * - * SPDX-License-Identifier: Apache-2.0 OR MIT - * - */ -#pragma once - -#include -#include -#include - -namespace AZ -{ - class Color; - class Vector2; -} - -namespace LyShine -{ - //////////////////////////////////////////////////////////////////////////////////////////////////// - // UI visual components use this interface to add primitives to the render graph, which is how the - // UI gets rendered. - // There is one render graph per UI canvas. The render graph (like a display list) is rebuilt when - // any visual change occurs on the canvas. - class IRenderGraph - { - public: - - //! Virtual destructor - virtual ~IRenderGraph() {} - - //---- Functions for creating and adding primitives to the render graph ---- - - //! Begin the setup of a mask render node, primitives added between this call and StartChildrenForMask define the mask - virtual void BeginMask(bool isMaskingEnabled, bool useAlphaTest, bool drawBehind, bool drawInFront) = 0; - - //! Start defining the children (masked primitives) of a mask - virtual void StartChildrenForMask() = 0; - - //! End the setup of a mask render node, this marks the end of adding child primitives - virtual void EndMask() = 0; - - //! Begin rendering to a texture - virtual void BeginRenderToTexture(int renderTargetHandle, SDepthTexture* renderTargetDepthSurface, - const AZ::Vector2& viewportTopLeft, const AZ::Vector2& viewportSize, const AZ::Color& clearColor) = 0; - - //! End rendering to a texture - virtual void EndRenderToTexture() = 0; - - //! Get a dynamic quad primitive that can be added as an image primitive to the render graph - //! The graph handles the allocation of this DynUiPrimitive and deletes it when the graph is reset - //! This can be used if the UI component doesn't want to own the storage of the primitive. Used infrequently, - //! e.g. for the selection rect on a text component. - virtual DynUiPrimitive* GetDynamicQuadPrimitive(const AZ::Vector2* positions, uint32 packedColor) = 0; - - //---- Functions for supporting masking (used during creation of the graph, not rendering ) ---- - - //! Get flag that indicates we are rendering into a mask. Used to avoid masks on child mask elements. - virtual bool IsRenderingToMask() const = 0; - - //! Set flag that we are rendering into a mask. Used to avoid masks on child mask elements. - virtual void SetIsRenderingToMask(bool isRenderingToMask) = 0; - - //---- Functions for supporting fading (used during creation of the graph, not rendering ) ---- - - //! Push an alpha fade, this is multiplied with any existing alpha fade from parents - virtual void PushAlphaFade(float alphaFadeValue) = 0; - - //! Push a new alpha fade value, this replaces any existing alpha fade - virtual void PushOverrideAlphaFade(float alphaFadeValue) = 0; - - //! Pop an alpha fade off the stack - virtual void PopAlphaFade() = 0; - - //! Get the current alpha fade value - virtual float GetAlphaFade() const = 0; - }; -} diff --git a/Code/Legacy/CryCommon/Mocks/ICryPakMock.h b/Code/Legacy/CryCommon/Mocks/ICryPakMock.h index 50cae45991..d32f31e5b8 100644 --- a/Code/Legacy/CryCommon/Mocks/ICryPakMock.h +++ b/Code/Legacy/CryCommon/Mocks/ICryPakMock.h @@ -11,9 +11,10 @@ #include #include #include +#include #include #include - +#include struct CryPakMock : AZ::IO::IArchive @@ -52,11 +53,11 @@ struct CryPakMock MOCK_METHOD1(PoolMalloc, void*(size_t size)); MOCK_METHOD1(PoolFree, void(void* p)); MOCK_METHOD3(PoolAllocMemoryBlock, AZStd::intrusive_ptr (size_t nSize, const char* sUsage, size_t nAlign)); - MOCK_METHOD2(FindFirst, AZ::IO::ArchiveFileIterator(AZStd::string_view pDir, AZ::IO::IArchive::EFileSearchType)); + MOCK_METHOD2(FindFirst, AZ::IO::ArchiveFileIterator(AZStd::string_view pDir, AZ::IO::FileSearchLocation)); MOCK_METHOD1(FindNext, AZ::IO::ArchiveFileIterator(AZ::IO::ArchiveFileIterator handle)); MOCK_METHOD1(FindClose, bool(AZ::IO::ArchiveFileIterator)); MOCK_METHOD1(GetModificationTime, AZ::IO::IArchive::FileTime(AZ::IO::HandleType f)); - MOCK_METHOD2(IsFileExist, bool(AZStd::string_view sFilename, EFileSearchLocation)); + MOCK_METHOD2(IsFileExist, bool(AZStd::string_view sFilename, AZ::IO::FileSearchLocation)); MOCK_METHOD1(IsFolder, bool(AZStd::string_view sPath)); MOCK_METHOD1(GetFileSizeOnDisk, AZ::IO::IArchive::SignedFileSize(AZStd::string_view filename)); MOCK_METHOD4(OpenArchive, AZStd::intrusive_ptr (AZStd::string_view szPath, AZStd::string_view bindRoot, uint32_t nFlags, AZStd::intrusive_ptr pData)); @@ -72,7 +73,7 @@ struct CryPakMock MOCK_METHOD1(UnregisterFileAccessSink, void(AZ::IO::IArchiveFileAccessSink * pSink)); MOCK_METHOD1(DisableRuntimeFileAccess, void(bool status)); MOCK_METHOD2(DisableRuntimeFileAccess, bool(bool status, AZStd::thread_id threadId)); - MOCK_CONST_METHOD0(GetPakPriority, AZ::IO::ArchiveLocationPriority()); + MOCK_CONST_METHOD0(GetPakPriority, AZ::IO::FileSearchPriority()); MOCK_CONST_METHOD1(GetFileOffsetOnMedia, uint64_t(AZStd::string_view szName)); MOCK_CONST_METHOD1(GetFileMediaType, EStreamSourceMediaType(AZStd::string_view szName)); MOCK_METHOD0(GetLevelPackOpenEvent, auto()->LevelPackOpenEvent*); diff --git a/Code/Legacy/CryCommon/Mocks/IRemoteConsoleMock.h b/Code/Legacy/CryCommon/Mocks/IRemoteConsoleMock.h deleted file mode 100644 index 21786a322c..0000000000 --- a/Code/Legacy/CryCommon/Mocks/IRemoteConsoleMock.h +++ /dev/null @@ -1,29 +0,0 @@ -/* - * Copyright (c) Contributors to the Open 3D Engine Project. - * For complete copyright and license terms please see the LICENSE at the root of this distribution. - * - * SPDX-License-Identifier: Apache-2.0 OR MIT - * - */ -#pragma once - -#include "IConsole.h" - -// Auto-generated by gmock_gen.py - -class IRemoteConsoleMock - : public IRemoteConsole -{ -public: - MOCK_METHOD0(RegisterConsoleVariables, void()); - MOCK_METHOD0(UnregisterConsoleVariables, void()); - MOCK_METHOD0(Start, void()); - MOCK_METHOD0(Stop, void()); - MOCK_CONST_METHOD0(IsStarted, bool()); - MOCK_METHOD1(AddLogMessage, void(const char* log)); - MOCK_METHOD1(AddLogWarning, void(const char* log)); - MOCK_METHOD1(AddLogError, void(const char* log)); - MOCK_METHOD0(Update, void()); - MOCK_METHOD2(RegisterListener, void(IRemoteConsoleListener* pListener, const char* name)); - MOCK_METHOD1(UnregisterListener, void(IRemoteConsoleListener* pListener)); -}; diff --git a/Code/Legacy/CryCommon/Mocks/ISystemMock.h b/Code/Legacy/CryCommon/Mocks/ISystemMock.h index 9d41b9e77d..e1c0e0d206 100644 --- a/Code/Legacy/CryCommon/Mocks/ISystemMock.h +++ b/Code/Legacy/CryCommon/Mocks/ISystemMock.h @@ -7,7 +7,6 @@ */ #pragma once #include -#include #ifdef GetUserName #undef GetUserName @@ -53,11 +52,9 @@ public: void Warning([[maybe_unused]] EValidatorModule module, [[maybe_unused]] EValidatorSeverity severity, [[maybe_unused]] int flags, [[maybe_unused]] const char* file, [[maybe_unused]] const char* format, ...) override {} MOCK_METHOD3(ShowMessage, - int(const char* text, const char* caption, unsigned int uType)); + void(const char* text, const char* caption, unsigned int uType)); MOCK_METHOD1(CheckLogVerbosity, bool(int verbosity)); - MOCK_METHOD0(GetIViewSystem, - IViewSystem * ()); MOCK_METHOD0(GetILevelSystem, ILevelSystem * ()); MOCK_METHOD0(GetICmdLine, @@ -76,18 +73,8 @@ public: ::IConsole * ()); MOCK_METHOD0(GetIRemoteConsole, IRemoteConsole * ()); - MOCK_METHOD0(GetIProfilingSystem, - IProfilingSystem * ()); MOCK_METHOD0(GetISystemEventDispatcher, ISystemEventDispatcher * ()); - MOCK_METHOD0(GetITimer, - ITimer * ()); - MOCK_METHOD1(SetForceNonDevMode, - void(bool bValue)); - MOCK_CONST_METHOD0(GetForceNonDevMode, - bool()); - MOCK_CONST_METHOD0(WasInDevMode, - bool()); MOCK_CONST_METHOD0(IsDevMode, bool()); MOCK_METHOD3(CreateXmlNode, @@ -100,10 +87,6 @@ public: IXmlUtils * ()); MOCK_METHOD1(IgnoreUpdates, void(bool bIgnore)); - MOCK_METHOD1(SetIProcess, - void(IProcess * process)); - MOCK_METHOD0(GetIProcess, - IProcess * ()); MOCK_CONST_METHOD0(IsTestMode, bool()); MOCK_METHOD3(SetFrameProfiler, @@ -122,8 +105,6 @@ public: MOCK_METHOD3(LoadConfiguration, void(const char*, ILoadConfigurationEntrySink*, bool)); - MOCK_CONST_METHOD0(GetMaxConfigSpec, - ESystemConfigSpec()); MOCK_CONST_METHOD0(GetConfigPlatform, ESystemConfigPlatform()); MOCK_METHOD1(SetConfigPlatform, @@ -134,8 +115,6 @@ public: ILocalizationManager * ()); MOCK_METHOD0(GetNoiseGen, CPNoise3 * ()); - MOCK_METHOD0(GetUpdateCounter, - uint64()); MOCK_METHOD1(RegisterErrorObserver, bool(IErrorObserver * errorObserver)); MOCK_METHOD1(UnregisterErrorObserver, @@ -146,10 +125,6 @@ public: bool()); MOCK_METHOD1(SetAssertVisible, void(bool bAssertVisble)); - MOCK_METHOD1(SetConsoleDrawEnabled, - void(bool enabled)); - MOCK_METHOD1(SetUIDrawEnabled, - void(bool enabled)); MOCK_METHOD0(GetApplicationInstance, int()); MOCK_METHOD1(GetApplicationLogInstance, @@ -174,14 +149,10 @@ public: bool()); #endif - MOCK_METHOD0(GetRootWindowMessageHandler, - void*()); MOCK_METHOD1(RegisterWindowMessageHandler, void(IWindowMessageHandler * pHandler)); MOCK_METHOD1(UnregisterWindowMessageHandler, void(IWindowMessageHandler * pHandler)); - MOCK_METHOD0(CreateLocalFileIO, - std::shared_ptr()); MOCK_METHOD2(ForceMaxFps, void(bool, int)); }; diff --git a/Code/Legacy/CryCommon/Mocks/ITextureMock.h b/Code/Legacy/CryCommon/Mocks/ITextureMock.h deleted file mode 100644 index 8dc657195c..0000000000 --- a/Code/Legacy/CryCommon/Mocks/ITextureMock.h +++ /dev/null @@ -1,25 +0,0 @@ -/* - * Copyright (c) Contributors to the Open 3D Engine Project. - * For complete copyright and license terms please see the LICENSE at the root of this distribution. - * - * SPDX-License-Identifier: Apache-2.0 OR MIT - * - */ -#pragma once - -#include -#include - -class ITextureMock - : public ITexture -{ -public: - MOCK_METHOD0(AddRef, - int()); - MOCK_METHOD0(Release, - int()); - MOCK_METHOD0(ReleaseForce, - int()); - MOCK_CONST_METHOD0(GetName, - const char*()); -}; diff --git a/Code/Legacy/CryCommon/Mocks/ITimerMock.h b/Code/Legacy/CryCommon/Mocks/ITimerMock.h deleted file mode 100644 index 13cf5ef73a..0000000000 --- a/Code/Legacy/CryCommon/Mocks/ITimerMock.h +++ /dev/null @@ -1,51 +0,0 @@ -/* - * Copyright (c) Contributors to the Open 3D Engine Project. - * For complete copyright and license terms please see the LICENSE at the root of this distribution. - * - * SPDX-License-Identifier: Apache-2.0 OR MIT - * - */ -#ifndef CRYINCLUDE_CRYSYSTEM_ITIMERMOCK_H -#define CRYINCLUDE_CRYSYSTEM_ITIMERMOCK_H -#pragma once - -#include -#include -#include - -// Implements all common timing routines -class TimerMock - : public ITimer -{ -public: - MOCK_METHOD0(ResetTimer, void()); - MOCK_METHOD0(UpdateOnFrameStart, void()); - MOCK_CONST_METHOD1(GetCurrTime, float(ETimer which)); - MOCK_CONST_METHOD0(GetAsyncTime, CTimeValue()); - MOCK_METHOD0(GetAsyncCurTime, float()); - MOCK_CONST_METHOD1(GetFrameTime, float(ETimer which)); - MOCK_CONST_METHOD0(GetRealFrameTime, float()); - MOCK_CONST_METHOD0(GetTimeScale, float()); - MOCK_CONST_METHOD1(GetTimeScale, float(uint32 channel)); - MOCK_METHOD2(SetTimeScale, void(float scale, uint32 channel)); - MOCK_METHOD0(ClearTimeScales, void()); - MOCK_METHOD1(EnableTimer, void(bool bEnable)); - MOCK_METHOD0(GetFrameRate, float()); - MOCK_METHOD2(GetProfileFrameBlending, float(float* pfBlendTime, int* piBlendMode)); - MOCK_METHOD1(Serialize, void(TSerialize ser)); - MOCK_CONST_METHOD0(IsTimerEnabled, bool()); - MOCK_METHOD2(PauseTimer, bool(ETimer which, bool bPause)); - MOCK_METHOD1(IsTimerPaused, bool(ETimer which)); - MOCK_METHOD2(SetTimer, bool(ETimer which, float timeInSeconds)); - MOCK_METHOD2(SecondsToDateUTC, void(time_t time, struct tm& outDateUTC)); - MOCK_METHOD1(DateToSecondsUTC, time_t(struct tm& timePtr)); - MOCK_METHOD1(TicksToSeconds, float(int64 ticks)); - MOCK_METHOD0(GetTicksPerSecond, int64()); - - MOCK_CONST_METHOD1(GetFrameStartTime, const CTimeValue&(ETimer which)); - MOCK_METHOD0(CreateNewTimer, ITimer * ()); - - MOCK_METHOD2(EnableFixedTimeMode, void(bool enable, float timeStep)); -}; - -#endif // CRYINCLUDE_CRYSYSTEM_ITIMERMOCK_H diff --git a/Code/Legacy/CryCommon/Mocks/StubTimer.h b/Code/Legacy/CryCommon/Mocks/StubTimer.h deleted file mode 100644 index 95df46a49d..0000000000 --- a/Code/Legacy/CryCommon/Mocks/StubTimer.h +++ /dev/null @@ -1,112 +0,0 @@ -/* - * Copyright (c) Contributors to the Open 3D Engine Project. - * For complete copyright and license terms please see the LICENSE at the root of this distribution. - * - * SPDX-License-Identifier: Apache-2.0 OR MIT - * - */ -#pragma once - -#include -#include - -//! Simple stub timer that exposes a single simple interface for setting the current time. -class StubTimer - : public ITimer -{ -public: - // Stub methods - void SetTime(float seconds) - { - m_frameStartTime.SetSeconds(seconds); - } - //~Stub methods - - StubTimer(float frameTime) - : m_frameTime(frameTime) - , m_frameRate(1.0f / frameTime) - , m_frameStartTime(0.0f) - { - } - virtual ~StubTimer() {}; - - // ITimer - void ResetTimer() override {} - void UpdateOnFrameStart() override {} - float GetCurrTime([[maybe_unused]] ETimer which = ETIMER_GAME) const override - { - // return the same as the frame start time - return m_frameStartTime.GetSeconds(); - } - const CTimeValue& GetFrameStartTime([[maybe_unused]] ETimer which = ETIMER_GAME) const override - { - return m_frameStartTime; - } - CTimeValue GetAsyncTime() const override - { - return m_frameStartTime; - } - float GetAsyncCurTime() override - { - return m_frameStartTime.GetSeconds(); - } - float GetFrameTime([[maybe_unused]] ETimer which = ETIMER_GAME) const override - { - return m_frameTime; - } - float GetRealFrameTime() const override - { - return m_frameTime; - } - float GetTimeScale() const override - { - return 1.0f; - } - float GetTimeScale([[maybe_unused]] uint32 channel) const override - { - return 1.0f; - } - void ClearTimeScales() override {} - void SetTimeScale([[maybe_unused]] float s, [[maybe_unused]] uint32 channel = 0) override {} - void EnableTimer([[maybe_unused]] bool bEnable) override {} - bool IsTimerEnabled() const override - { - return true; - } - float GetFrameRate() override - { - return m_frameRate; - } - float GetProfileFrameBlending([[maybe_unused]] float* pfBlendTime = 0, [[maybe_unused]] int* piBlendMode = 0) override - { - return 0.0f; - } - void Serialize([[maybe_unused]] TSerialize ser) override {} - bool PauseTimer([[maybe_unused]] ETimer which, [[maybe_unused]] bool bPause) override { return false; } - bool IsTimerPaused([[maybe_unused]] ETimer which) override { return false; } - bool SetTimer([[maybe_unused]] ETimer which, [[maybe_unused]] float timeInSeconds) override { return false; } - void SecondsToDateUTC([[maybe_unused]] time_t time, [[maybe_unused]] struct tm& outDateUTC) override {} - time_t DateToSecondsUTC([[maybe_unused]] struct tm& timePtr) override - { - return 0; - } - float TicksToSeconds([[maybe_unused]] int64 ticks) override - { - return 0.0f; - } - int64 GetTicksPerSecond() override - { - return 0; - } - ITimer* CreateNewTimer() override - { - return nullptr; - } - void EnableFixedTimeMode([[maybe_unused]] bool enable, [[maybe_unused]] float timeStep) override {} - // ~ITimer - -private: - CTimeValue m_frameStartTime; - float m_frameTime; - float m_frameRate; -}; diff --git a/Code/Legacy/CryCommon/StatObjBus.h b/Code/Legacy/CryCommon/StatObjBus.h deleted file mode 100644 index 5a05440cb0..0000000000 --- a/Code/Legacy/CryCommon/StatObjBus.h +++ /dev/null @@ -1,36 +0,0 @@ -/* - * Copyright (c) Contributors to the Open 3D Engine Project. - * For complete copyright and license terms please see the LICENSE at the root of this distribution. - * - * SPDX-License-Identifier: Apache-2.0 OR MIT - * - */ -#pragma once - -#include -#include - -////////////////////////////////////////////////////////////////////////// -// -// EBUS support for triggering necessary updates when IStatObj instances -// caches should be updated when 3D Engine events happen during level loads, -// shutting down the application, and so forth -// -////////////////////////////////////////////////////////////////////////// -class InstanceStatObjEvents - : public AZ::EBusTraits -{ -public: - virtual ~InstanceStatObjEvents() = default; - - // AZ::EBusTraits - static const AZ::EBusAddressPolicy AddressPolicy = AZ::EBusAddressPolicy::Single; - static const AZ::EBusHandlerPolicy HandlerPolicy = AZ::EBusHandlerPolicy::Multiple; - using MutexType = AZStd::recursive_mutex; - - virtual void ReleaseData() - { - } -}; - -using InstanceStatObjEventBus = AZ::EBus; diff --git a/Code/Legacy/CryCommon/StlUtils.h b/Code/Legacy/CryCommon/StlUtils.h index f5128a564f..ccbc854dc3 100644 --- a/Code/Legacy/CryCommon/StlUtils.h +++ b/Code/Legacy/CryCommon/StlUtils.h @@ -96,47 +96,6 @@ unsigned countElements (const std::vector& arrT, const T& x) */ namespace stl { - ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// - // Compare member of class/struct. - // - // e.g. Sort Vec3s by x component - // - // std::sort(vec3s.begin(), vec3s.end(), stl::member_compare()); - // - ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// - template > - struct member_compare - { - inline bool operator () (const OWNER_TYPE& lhs, const OWNER_TYPE& rhs) const - { - return EQUALITY()(lhs.*MEMBER_PTR, rhs.*MEMBER_PTR); - } - }; - - ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// - // Compare member of class/struct against parameter. - // - // e.g. Find Vec3 with x component less than 1.0 - // - // std::find_if(vec3s.begin(), vec3s.end(), stl::member_compare_param(1.0f)); - // - ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// - template > - struct member_compare_param - { - inline member_compare_param(const MEMBER_TYPE& _value) - : value(_value) - { - } - - inline bool operator () (const OWNER_TYPE& rhs) const - { - return EQUALITY()(rhs.*MEMBER_PTR, value); - } - - const MEMBER_TYPE& value; - }; - ////////////////////////////////////////////////////////////////////////// //! Searches the given entry in the map by key, and if there is none, returns the default value ////////////////////////////////////////////////////////////////////////// @@ -154,48 +113,6 @@ namespace stl } } - ////////////////////////////////////////////////////////////////////////// - //! Inserts and returns a reference to the given value in the map, or returns the current one if it's already there. - ////////////////////////////////////////////////////////////////////////// - template - inline typename Map::mapped_type& map_insert_or_get(Map& mapKeyToValue, const typename Map::key_type& key, const typename Map::mapped_type& defValue = typename Map::mapped_type()) - { - auto&& iresult = mapKeyToValue.insert(typename Map::value_type(key, defValue)); - return iresult.first->second; - } - - // searches the given entry in the map by key, and if there is none, returns the default value - // The values are taken/returned in REFERENCEs rather than values - template - inline mapped_type& find_in_map_ref(std::map& mapKeyToValue, const Key& key, mapped_type& valueDefault) - { - typedef std::map Map; - typename Map::iterator it = mapKeyToValue.find (key); - if (it == mapKeyToValue.end()) - { - return valueDefault; - } - else - { - return it->second; - } - } - - template - inline const mapped_type& find_in_map_ref(const std::map& mapKeyToValue, const Key& key, const mapped_type& valueDefault) - { - typedef std::map Map; - typename Map::const_iterator it = mapKeyToValue.find (key); - if (it == mapKeyToValue.end()) - { - return valueDefault; - } - else - { - return it->second; - } - } - ////////////////////////////////////////////////////////////////////////// //! Fills vector with contents of map. ////////////////////////////////////////////////////////////////////////// @@ -210,20 +127,6 @@ namespace stl } } - ////////////////////////////////////////////////////////////////////////// - //! Fills vector with contents of set. - ////////////////////////////////////////////////////////////////////////// - template - inline void set_to_vector(const Set& theSet, Vector& array) - { - array.resize(0); - array.reserve(theSet.size()); - for (typename Set::const_iterator it = theSet.begin(); it != theSet.end(); ++it) - { - array.push_back(*it); - } - } - ////////////////////////////////////////////////////////////////////////// //! Find and erase element from container. // @return true if item was find and erased, false if item not found. @@ -312,48 +215,6 @@ namespace stl return false; } - ////////////////////////////////////////////////////////////////////////// - //! Push back to container unique element. - // @return true if item added, false overwise. - template - inline bool push_back_unique_if(CONTAINER& container, const PREDICATE& predicate, const VALUE& value) - { - typename CONTAINER::iterator end = container.end(); - - if (AZStd::find_if(container.begin(), end, predicate) == end) - { - container.push_back(value); - - return true; - } - else - { - return false; - } - } - - ////////////////////////////////////////////////////////////////////////// - //! Push back to container contents of another container - template - inline void push_back_range(Container& container, Iter begin, Iter end) - { - for (Iter it = begin; it != end; ++it) - { - container.push_back(*it); - } - } - - ////////////////////////////////////////////////////////////////////////// - //! Push back to container contents of another container, if not already present - template - inline void push_back_range_unique(Container& container, Iter begin, Iter end) - { - for (Iter it = begin; it != end; ++it) - { - push_back_unique(container, *it); - } - } - ////////////////////////////////////////////////////////////////////////// //! Find element in container. // @return true if item found. @@ -373,107 +234,6 @@ namespace stl return (it == last || value != *it) ? last : it; } - ////////////////////////////////////////////////////////////////////////// - //! Find element in a sorted container using binary search with logarithmic efficiency. - // @return true if item was inserted. - template - inline bool binary_insert_unique(Container& container, const Value& value) - { - typename Container::iterator it = std::lower_bound(container.begin(), container.end(), value); - if (it != container.end()) - { - if (*it == value) - { - return false; - } - container.insert(it, value); - } - else - { - container.insert(container.end(), value); - } - return true; - } - ////////////////////////////////////////////////////////////////////////// - //! Find element in a sorted container using binary search with logarithmic efficiency. - // and erases if element found. - // @return true if item was erased. - template - inline bool binary_erase(Container& container, const Value& value) - { - typename Container::iterator it = std::lower_bound(container.begin(), container.end(), value); - if (it != container.end() && *it == value) - { - container.erase(it); - return true; - } - return false; - } - - template - ItT remove_from_heap(ItT begin, ItT end, ItT at, Func order) - { - using std::swap; - - --end; - if (at == end) - { - return at; - } - - size_t idx = std::distance(begin, at); - swap(*end, *at); - - size_t length = std::distance(begin, end); - size_t parent, child; - - if (idx > 0 && order(*(begin + idx / 2), *(begin + idx))) - { - do - { - parent = idx / 2; - swap(*(begin + idx), *(begin + parent)); - idx = parent; - - if (idx == 0 || order(*(begin + idx), *(begin + idx / 2))) - { - return end; - } - } - while (true); - } - else - { - do - { - child = idx * 2 + 1; - if (child >= length) - { - return end; - } - - ItT left = begin + child; - ItT right = begin + child + 1; - - if (right < end && order(*left, *right)) - { - ++child; - } - - if (order(*(begin + child), *(begin + idx))) - { - return end; - } - - swap(*(begin + child), *(begin + idx)); - idx = child; - } - while (true); - } - - return end; - } - struct container_object_deleter { template @@ -506,18 +266,6 @@ namespace stl return type.c_str(); } - ////////////////////////////////////////////////////////////////////////// - //! Case sensetive less key for any type convertable to const char*. - ////////////////////////////////////////////////////////////////////////// - template - struct less_strcmp - { - bool operator()(const Type& left, const Type& right) const - { - return strcmp(constchar_cast(left), constchar_cast(right)) < 0; - } - }; - ////////////////////////////////////////////////////////////////////////// //! Case insensetive less key for any type convertable to const char*. template @@ -690,89 +438,4 @@ namespace stl stl::free_container(container); } }; - - template - inline void for_each_array(T (&buffer)[Length], Func func) - { - std::for_each(&buffer[0], &buffer[Length], func); - } - - template - inline void for_each_array(StaticInstance(&buffer)[Length], Func func) - { - for (size_t idx = 0; idx < Length; ++idx) - { - func(*buffer[idx]); - } - } - - template - inline void destruct(T* p) - { - p->~T(); - } -} - -#define DEFINE_INTRUSIVE_LINKED_LIST(Class) \ - template<> \ - Class * stl::intrusive_linked_list_node::m_root_intrusive = nullptr; - -// define the maplikestruct, used to approximate the memory requirements for a map node -namespace stl -{ - struct MapLikeStruct - { - bool color; - void* parent; - void* left; - void* right; - }; -} -template -unsigned sizeOfMap(Map& map) -{ - unsigned size = 0; - for (typename Map::iterator it = map.begin(); it != map.end(); it++) - { - typename Map::mapped_type& T = it->second; - size += T.Size(); - } - size += map.size() * sizeof(stl::MapLikeStruct); - return size; -} -template -unsigned sizeOfMapStr(Map& map) -{ - unsigned size = 0; - for (typename Map::iterator it = map.begin(); it != map.end(); it++) - { - typename Map::mapped_type& T = it->second; - size += T.capacity(); - } - size += map.size() * sizeof(stl::MapLikeStruct); - return size; -} -template -unsigned sizeOfMapP(Map& map) -{ - unsigned size = 0; - for (typename Map::iterator it = map.begin(); it != map.end(); it++) - { - typename Map::mapped_type& T = it->second; - size += T->Size(); - } - size += map.size() * sizeof(stl::MapLikeStruct); - return size; -} -template -unsigned sizeOfMapS(Map& map) -{ - unsigned size = 0; - for (typename Map::iterator it = map.begin(); it != map.end(); it++) - { - typename Map::mapped_type& T = it->second; - size += sizeof(T); - } - size += map.size() * sizeof(stl::MapLikeStruct); - return size; } diff --git a/Code/Legacy/CryCommon/Timer.h b/Code/Legacy/CryCommon/Timer.h deleted file mode 100644 index c8c4857971..0000000000 --- a/Code/Legacy/CryCommon/Timer.h +++ /dev/null @@ -1,38 +0,0 @@ -/* - * Copyright (c) Contributors to the Open 3D Engine Project. - * For complete copyright and license terms please see the LICENSE at the root of this distribution. - * - * SPDX-License-Identifier: Apache-2.0 OR MIT - * - */ - - -#pragma once -#ifndef CRYINCLUDE_CRYCOMMON_TIMER_H -#define CRYINCLUDE_CRYCOMMON_TIMER_H - -struct Timer -{ - Timer() - : endTime(-1.0f) - { - } - - void Reset(float duration, float variation = 0.0f) - { - endTime = gEnv->pSystem->GetITimer()->GetFrameStartTime() + CTimeValue(duration) + CTimeValue(cry_random(0.0f, variation)); - } - - bool Elapsed() const - { - return endTime >= 0.0f && gEnv->pSystem->GetITimer()->GetFrameStartTime() >= endTime; - } - - float GetSecondsLeft() const - { - return (endTime - gEnv->pSystem->GetITimer()->GetFrameStartTime()).GetSeconds(); - } - - CTimeValue endTime; -}; -#endif // CRYINCLUDE_CRYCOMMON_TIMER_H diff --git a/Code/Legacy/CryCommon/VRCommon.h b/Code/Legacy/CryCommon/VRCommon.h deleted file mode 100644 index 408da8453c..0000000000 --- a/Code/Legacy/CryCommon/VRCommon.h +++ /dev/null @@ -1,255 +0,0 @@ -/* - * Copyright (c) Contributors to the Open 3D Engine Project. - * For complete copyright and license terms please see the LICENSE at the root of this distribution. - * - * SPDX-License-Identifier: Apache-2.0 OR MIT - * - */ - -#pragma once - -#include -#include -#include -#include -#include - -#include - -#include - -namespace AZ -{ - namespace VR - { - /// - /// Enum to describe the stereo layout of content - /// - enum class StereoLayout : AZ::u32 - { - TOP_BOTTOM = 0, //Top is Left, Bottom is Right - BOTTOM_TOP, //Bottom is Left, Top is Right - //TODO: Figure out how to support LEFT_RIGHT and RIGHT_LEFT - //TOP_BOTTOM is preferred because of the way that scan lines are ordered - //LEFT_RIGHT, //Left is Left, Right is Right - //RIGHT_LEFT, //Right is Left, Left is Right - UNKNOWN //This content is either not stereo or its stereo format cannot be determined - }; - - - /// - /// Eye-specific camera info. - /// - struct PerEyeCameraInfo - { - float fov; ///< Field-of-view of this eye. Note that each eye may have different fields-of-view. - float aspectRatio; ///< Aspect-ratio of this eye. Note that each eye may have different aspect ratios. - AZ::Vector3 eyeOffset; ///< Camera-space offset for this eye relative to the non-stereo view. - - struct AsymmetricFrustumPlane - { - float horizontalDistance; ///< Horizontal frustum shift relative to the non-stereo frustum. - float verticalDistance; ///< Vertical frustum shift relative to the non-stereo frustum. - - AsymmetricFrustumPlane() - : horizontalDistance(1.6f) - , verticalDistance(0.9f) - { - } - }; - - AsymmetricFrustumPlane frustumPlane; - - PerEyeCameraInfo() - : aspectRatio(16.0f / 9.0f) - , fov(DEG2RAD(1.5f)) - , eyeOffset(0.65f, 0.0f, 0.0f) - { - } - }; - - /// - /// Types of social screens supported by the engine. - /// - enum class HMDSocialScreen - { - Off = -1, - UndistortedLeftEye, - UndistortedRightEye, - }; - - /// - /// Supported tracking levels. - /// - enum class HMDTrackingLevel - { - kHead, ///< The sensor reads as if the player is standing. - kFloor, ///< Sensor reads as if the player is seated/on the floor. - kFixed ///< Translation information is ignored, the view appears at the HMD origin - }; - - /// - /// Human-readable info about the connected device. This info is printed to the screen when a new device is detected. - /// - struct HMDDeviceInfo - { - AZ_TYPE_INFO(HMDDeviceInfo, "{DB83AF23-CF4E-491D-A346-F5DC834D1C74}") - - static void Reflect(AZ::ReflectContext* context); - - const char* productName; - const char* manufacturer; - - // Rendering resolution is defined as containing just a single eye. - unsigned int renderWidth; - unsigned int renderHeight; - - // Field of view is defined as the total field of view of the device which includes both eyes. - float fovH; - float fovV; - - HMDDeviceInfo() - : productName(nullptr) - , manufacturer(nullptr) - , renderWidth(0) - , renderHeight(0) - , fovH(0.0f) - , fovV(0.0f) - { - } - }; - - enum HMDStatus - { - HMDStatus_OrientationTracked = BIT(1), - HMDStatus_PositionTracked = BIT(2), - HMDStatus_CameraPoseTracked = BIT(3), - HMDStatus_PositionConnected = BIT(4), - HMDStatus_HmdConnected = BIT(5), - - HMDStatus_IsUsable = HMDStatus_HmdConnected | HMDStatus_OrientationTracked, - HMDStatus_ControllerValid = HMDStatus_OrientationTracked | HMDStatus_PositionConnected, - }; - - /// - /// Single device render target created and managed by the device. The renderer should make use of this render target in order to properly display - /// the rendered content to this HMD. - /// - struct HMDRenderTarget - { - void* deviceSwapTextureSet; ///< Device-represented texture. These textures are created and maintained by the HMD's specific SDK. - uint32 numTextures; ///< Number of textures inside of the swap set. - void** textures; ///< Access to the internal device textures. This array is exactly numTextures long. - - HMDRenderTarget() - : deviceSwapTextureSet(nullptr) - , numTextures(0) - , textures(nullptr) - { - } - }; - - enum class ControllerIndex - : uint32_t - { - LeftHand = 0, - RightHand, - MaxNumControllers - }; - - /// - /// A specific pose of the HMD. Every HMD device has their own way of representing their - /// current pose in 3D space. This structure acts as a common data set between any connected - /// device and the rest of the system. - /// - struct PoseState - { - AZ_TYPE_INFO(PoseState, "{040F18D7-1163-477B-8908-47CC35737DCE}") - - static void Reflect(AZ::ReflectContext* context); - - AZ::Quaternion orientation; ///< The current orientation of the HMD. - AZ::Vector3 position; ///< The current position of the HMD in local space as an offset from the centered pose. - - PoseState() - : orientation(AZ::Quaternion::CreateIdentity()) - , position(AZ::Vector3::CreateZero()) - { - } - }; - - /// - /// Dynamics (accelerations and velocities) of the current HMD. Many HMDs have the ability to track the current movements - /// of the VR device(s) for prediction. Note that not all devices may support velocities/accelerations. - /// - struct DynamicsState - { - AZ_TYPE_INFO(DynamicsState, "{5C5E2249-8844-4790-9F7A-88703A9C18DD}") - - static void Reflect(AZ::ReflectContext* context); - - /// Angular velocity/acceleration reported in local space. - AZ::Vector3 angularVelocity; - AZ::Vector3 angularAcceleration; - - /// Linear velocity/acceleration reported in local space. - AZ::Vector3 linearVelocity; - AZ::Vector3 linearAcceleration; - - DynamicsState() - : angularVelocity(0) - , angularAcceleration(0) - , linearVelocity(0) - , linearAcceleration(0) - { - } - }; - - /// - /// While tracking the HMD, certain parts of the devices may go off/online. For example, - /// a controller may be disconnected or the HMD may lose rotational tracking temporarily. This - /// struct stores a tracked state meaning a pose as well as flags that denote what part of the pose - /// is currently valid. - /// - struct TrackingState - { - AZ_TYPE_INFO(TrackingState, "{E9CB08E8-9996-478B-AABB-EC8CCCF3B403}") - - typedef uint32 StatusFlags; - - bool CheckStatusFlags(StatusFlags flags) const - { - // Multiple flags can be checked simultaneously. - return (statusFlags & flags) == flags; - } - - static void Reflect(AZ::ReflectContext* context); - - PoseState pose; ///< Current pose relating to this tracked state. - DynamicsState dynamics; ///< Current state of the physics dynamics for this device. - StatusFlags statusFlags; ///< Bitfield denoting current tracking status. Flags defined in the enum HMDStatus. - - TrackingState() - : statusFlags(0) - { - } - }; - - /// - /// Rectangle storing the playspace defined by the user when - /// setting up VR device. - /// - struct Playspace - { - AZ_TYPE_INFO(Playspace, "{05934537-80AA-4ABA-AB2C-71096FA7DC74}") - AZ_CLASS_ALLOCATOR_DECL - - static void Reflect(AZ::ReflectContext* context); - - bool isValid = false; ///< The playspace data is valid (calibrated). - AZStd::array corners; ///< Playspace corners defined in device-local space. The center of the playspace is 0. - }; - - }//namespace VR - AZ_TYPE_INFO_SPECIALIZE(VR::ControllerIndex, "{90D4C80E-A1CC-4DBF-A131-0082C75835E8}"); -}//namespace AZ diff --git a/Code/Legacy/CryCommon/WinBase.cpp b/Code/Legacy/CryCommon/WinBase.cpp index 9f7cdfd609..3445637d28 100644 --- a/Code/Legacy/CryCommon/WinBase.cpp +++ b/Code/Legacy/CryCommon/WinBase.cpp @@ -53,27 +53,13 @@ #include #endif -#if defined(ANDROID) -#define FIX_FILENAME_CASE 0 // everything is lower case on android -#elif defined(LINUX) || defined(APPLE) -#define FIX_FILENAME_CASE 1 -#endif - #include - - -#if !defined(_RELEASE) || defined(_DEBUG) -#include -unsigned int g_EnableMultipleAssert = 0;//set to something else than 0 if to enable already reported asserts -#endif - #if defined(LINUX) || defined(APPLE) #include #include #include #include -#include "CryLibrary.h" #endif #if defined(APPLE) @@ -82,106 +68,11 @@ unsigned int g_EnableMultipleAssert = 0;//set to something else than 0 if to ena #if AZ_TRAIT_COMPILER_DEFINE_FS_ERRNO_TYPE typedef int FS_ERRNO_TYPE; -#if AZ_TRAIT_COMPILER_DEFINE_FS_STAT_TYPE -typedef struct stat FS_STAT_TYPE; -#else -typedef struct stat64 FS_STAT_TYPE; -#endif #include -#elif AZ_TRAIT_COMPILER_DEFINE_FS_STAT_TYPE -#error cannot request AZ_TRAIT_COMPILER_DEFINE_FS_STAT_TYPE if AZ_TRAIT_COMPILER_DEFINE_FS_ERRNO_TYPE is zero #endif -#if AZ_TRAIT_COMPILER_DEFINE_SASSERTDATA_TYPE && (!defined(_RELEASE) || defined(_DEBUG)) -struct SAssertData -{ - int line; - char fileName[256 - sizeof(int)]; - const bool operator==(const SAssertData& crArg) const - { - return crArg.line == line && (strcmp(fileName, crArg.fileName) == 0); - } - - const bool operator<(const SAssertData& crArg) const - { - if (line == crArg.line) - { - return strcmp(fileName, crArg.fileName) < 0; - } - else - { - return line < crArg.line; - } - } - - SAssertData() - : line(-1){} - SAssertData(const int cLine, const char* cpFile) - : line(cLine) - { - azstrcpy(fileName, AZ_ARRAY_SIZE(fileName), cpFile); - } - - SAssertData(const SAssertData& crAssertData) - { - memcpy((void*)this, &crAssertData, sizeof(SAssertData)); - } - - void operator=(const SAssertData& crAssertData) - { - memcpy((void*)this, &crAssertData, sizeof(SAssertData)); - } -}; - - -//#define OUTPUT_ASSERT_TO_FILE - -void HandleAssert(const char* cpMessage, const char* cpFunc, const char* cpFile, const int cLine) -{ -#if defined(OUTPUT_ASSERT_TO_FILE) - static FILE* pAssertLogFile = nullptr; - if (!pAssertLogFile) - { - azfopen(&pAssertLogFile, "Assert.log", "w+"); - } -#endif - bool report = true; - static std::set assertSet; - SAssertData assertData(cLine, cpFile); - if (!g_EnableMultipleAssert) - { - std::set::const_iterator it = assertSet.find(assertData); - if (it != assertSet.end()) - { - report = false; - } - else - { - assertSet.insert(assertData); - } - } - else - { - assertSet.insert(assertData); - } - if (report) - { - //added function to be able to place a breakpoint here or to print out to other consoles - printf("ASSERT: %s in %s (%s : %d)\n", cpMessage, cpFunc, cpFile, cLine); -#if defined(OUTPUT_ASSERT_TO_FILE) - if (pAssertLogFile) - { - fprintf(pAssertLogFile, "ASSERT: %s in %s (%s : %d)\n", cpMessage, cpFunc, cpFile, cLine); - fflush(pAssertLogFile); - } -#endif - } -} -#endif - - bool IsBadReadPtr(void* ptr, unsigned int size) { //too complicated to really support it @@ -233,9 +124,9 @@ char* strupr (char* str) char* ltoa (long i, char* a, int radix) { - if (a == NULL) + if (a == nullptr) { - return NULL; + return nullptr; } strcpy (a, "0"); if (i && radix > 1 && radix < 37) @@ -370,9 +261,9 @@ void _makepath(char* path, const char* drive, const char* dir, const char* filen char* _ui64toa(unsigned long long value, char* str, int radix) { - if (str == 0) + if (str == nullptr) { - return 0; + return nullptr; } char buffer[65]; @@ -402,7 +293,7 @@ char* _ui64toa(unsigned long long value, char* str, int radix) long long _atoi64(const char* str) { - if (str == 0) + if (str == nullptr) { return -1; } @@ -551,22 +442,6 @@ void _splitpath(const char* inpath, char* drv, char* dir, char* fname, char* ext } } -////////////////////////////////////////////////////////////////////////// -int memicmp(LPCSTR s1, LPCSTR s2, DWORD len) -{ - int ret = 0; - while (len--) - { - if ((ret = tolower(*s1) - tolower(*s2))) - { - break; - } - s1++; - s2++; - } - return ret; -} - //-----------------------------------------other stuff------------------------------------------------------------------- void GlobalMemoryStatus(LPMEMORYSTATUS lpmem) @@ -698,7 +573,7 @@ static void NormalizeTimeFields(short* FieldToNormalize, short* CarryField, int *CarryField = (short) (*CarryField + 1); } -bool TimeFieldsToTime(PTIME_FIELDS tfTimeFields, PLARGE_INTEGER Time) +static bool TimeFieldsToTime(PTIME_FIELDS tfTimeFields, PLARGE_INTEGER Time) { #define SECSPERMIN 60 #define MINSPERHOUR 60 @@ -776,119 +651,6 @@ BOOL SystemTimeToFileTime(const SYSTEMTIME* syst, LPFILETIME ft) return TRUE; } -void adaptFilenameToLinux(AZStd::string& rAdjustedFilename) -{ - //first replace all \\ by / - AZStd::string::size_type loc = 0; - while ((loc = rAdjustedFilename.find("\\", loc)) != AZStd::string::npos) - { - rAdjustedFilename.replace(loc, 1, "/"); - } - loc = 0; - //remove /./ - while ((loc = rAdjustedFilename.find("/./", loc)) != AZStd::string::npos) - { - rAdjustedFilename.replace(loc, 3, "/"); - } -} - -void replaceDoublePathFilename(char* szFileName) -{ - //replace "\.\" by "\" - AZStd::string s(szFileName); - AZStd::string::size_type loc = 0; - //remove /./ - while ((loc = s.find("/./", loc)) != AZStd::string::npos) - { - s.replace(loc, 3, "/"); - } - loc = 0; - //remove "\.\" - while ((loc = s.find("\\.\\", loc)) != AZStd::string::npos) - { - s.replace(loc, 3, "\\"); - } - azstrcpy((char*)szFileName, AZ_MAX_PATH_LEN, s.c_str()); -} - -#if FIX_FILENAME_CASE -static bool FixOnePathElement(char* path) -{ - if (*path == '\0') - { - return true; - } - - if ((path[0] == '/') && (path[1] == '\0')) - { - return true; // root dir always exists. - } - if (strchr(path, '*') || strchr(path, '?')) - { - return true; // wildcard...stop correcting path. - } - struct stat statbuf; - if (stat(path, &statbuf) != -1) // current case exists. - { - return true; - } - - char* name = path; - char* ptr = strrchr(path, '/'); - if (ptr) - { - name = ptr + 1; - *ptr = '\0'; - } - - if (*name == '\0') // trailing '/' ? - { - *ptr = '/'; - return true; - } - - const char* parent; - if (ptr == path) - { - parent = "/"; - } - else if (ptr == NULL) - { - parent = "."; - } - else - { - parent = path; - } - - DIR* dirp = opendir(parent); - if (ptr) - { - *ptr = '/'; - } - - if (dirp == NULL) - { - return false; - } - - struct dirent* dent; - bool found = false; - while ((dent = readdir(dirp)) != NULL) - { - if (strcasecmp(dent->d_name, name) == 0) - { - azstrcpy(name, AZ_MAX_PATH_LEN, dent->d_name); - found = true; - break; - } - } - - closedir(dirp); - return found; -} -#endif - #define Int32x32To64(a, b) ((uint64)((uint64)(a)) * (uint64)((uint64)(b))) ////////////////////////////////////////////////////////////////////////// @@ -905,24 +667,14 @@ threadID GetCurrentThreadId() } #endif +#include +#include + ////////////////////////////////////////////////////////////////////////// DWORD Sleep(DWORD dwMilliseconds) { #if defined(LINUX) || defined(APPLE) - timespec req; - timespec rem; - - memset(&req, 0, sizeof(req)); - memset(&rem, 0, sizeof(rem)); - - time_t sec = (int)(dwMilliseconds / 1000); - req.tv_sec = sec; - req.tv_nsec = (dwMilliseconds - (sec * 1000)) * 1000000L; - if (nanosleep(&req, &rem) == -1) - { - nanosleep(&rem, 0); - } - + std::this_thread::sleep_for(std::chrono::milliseconds(dwMilliseconds)); return 0; #define AZ_RESTRICTED_SECTION_IMPLEMENTED #elif defined(AZ_RESTRICTED_PLATFORM) @@ -961,7 +713,7 @@ DWORD Sleep(DWORD dwMilliseconds) } ////////////////////////////////////////////////////////////////////////// -DWORD SleepEx(DWORD dwMilliseconds, BOOL bAlertable) +DWORD SleepEx(DWORD dwMilliseconds, BOOL /*bAlertable*/) { //TODO: implement // CRY_ASSERT_MESSAGE(0, "SleepEx not implemented yet"); @@ -1007,7 +759,7 @@ void CrySleep(unsigned int dwMilliseconds) ////////////////////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////////////////// -int CryMessageBox(const char* lpText, const char* lpCaption, unsigned int uType) +void CryMessageBox(const char* lpText, const char* lpCaption, [[maybe_unused]] unsigned int uType) { #ifdef WIN32 # error WIN32 is defined in WinBase.cpp (it is a non-Windows file) @@ -1088,63 +840,8 @@ int CryMessageBox(const char* lpText, const char* lpCaption, unsigned int uType) CFRelease(strText); } - if (kResult == kCFUserNotificationDefaultResponse) - { - switch (uType & 0xf) - { - case MB_OK: - case MB_OKCANCEL: - default: - return IDOK; - case MB_ABORTRETRYIGNORE: - return IDABORT; - case MB_YESNOCANCEL: - case MB_YESNO: - return IDYES; - case MB_RETRYCANCEL: - return IDRETRY; - case MB_CANCELTRYCONTINUE: - return IDCANCEL; - } - } - else if (kResult == kCFUserNotificationAlternateResponse) - { - switch (uType & 0xf) - { - case MB_OKCANCEL: - case MB_RETRYCANCEL: - return IDCANCEL; - case MB_ABORTRETRYIGNORE: - return IDRETRY; - case MB_YESNOCANCEL: - case MB_YESNO: - return IDNO; - case MB_CANCELTRYCONTINUE: - return IDTRYAGAIN; - default: - assert(false); - return IDCANCEL; - } - } - else if (kResult == kCFUserNotificationOtherResponse) - { - switch (uType & 0xf) - { - case MB_ABORTRETRYIGNORE: - return IDIGNORE; - case MB_YESNOCANCEL: - return IDCANCEL; - case MB_CANCELTRYCONTINUE: - return IDCONTINUE; - default: - assert(false); - return IDCANCEL; - } - } - return 0; #else printf("Messagebox: cap: %s text:%s\n", lpCaption ? lpCaption : " ", lpText ? lpText : " "); - return 0; #endif } @@ -1172,21 +869,6 @@ DLL_EXPORT void OutputDebugString(const char* outputString) // This code does not have a long life span and will be replaced soon #if defined(APPLE) || defined(LINUX) || defined(DEFINE_LEGACY_CRY_FILE_OPERATIONS) -typedef DIR* FS_DIR_TYPE; -typedef dirent FS_DIRENT_TYPE; -static const FS_ERRNO_TYPE FS_ENOENT = ENOENT; -static const FS_DIR_TYPE FS_DIR_NULL = NULL; - -typedef int FS_ERRNO_TYPE; - -#if defined(APPLE) -typedef struct stat FS_STAT_TYPE; -#else -typedef struct stat64 FS_STAT_TYPE; -#endif - -#include - bool CrySetFileAttributes(const char* lpFileName, uint32 dwFileAttributes) { //TODO: implement @@ -1195,201 +877,7 @@ bool CrySetFileAttributes(const char* lpFileName, uint32 dwFileAttributes) } -ILINE void FS_OPEN(const char* szFileName, int iFlags, int& iFileDesc, mode_t uMode, FS_ERRNO_TYPE& rErr) -{ - rErr = ((iFileDesc = open(szFileName, iFlags, uMode)) != -1) ? 0 : errno; -} -ILINE void FS_CLOSE(int iFileDesc, FS_ERRNO_TYPE& rErr) -{ - rErr = close(iFileDesc) != -1 ? 0 : errno; -} - -ILINE void FS_CLOSE_NOERR(int iFileDesc) -{ - close(iFileDesc); -} - -ILINE void FS_OPENDIR(const char* szDirName, FS_DIR_TYPE& pDir, FS_ERRNO_TYPE& rErr) -{ - rErr = (pDir = opendir(szDirName)) != NULL ? 0 : errno; -} - -ILINE void FS_READDIR(FS_DIR_TYPE pDir, FS_DIRENT_TYPE& kEnt, uint64_t& uEntSize, FS_ERRNO_TYPE& rErr) -{ - errno = 0; // errno is used to determine if readdir succeeds after - FS_DIRENT_TYPE* pDirent(readdir(pDir)); - if (pDirent == NULL) - { - uEntSize = 0; - rErr = (errno == FS_ENOENT) ? 0 : errno; - } - else - { - kEnt = *pDirent; - uEntSize = static_cast(sizeof(FS_DIRENT_TYPE)); - rErr = 0; - } -} - -ILINE void FS_STAT(const char* szFileName, FS_STAT_TYPE& kStat, FS_ERRNO_TYPE& rErr) -{ -#if defined(APPLE) - rErr = stat(szFileName, &kStat) != -1 ? 0 : errno; -#else - rErr = stat64(szFileName, &kStat) != -1 ? 0 : errno; -#endif -} - -ILINE void FS_FSTAT(int iFileDesc, FS_STAT_TYPE& kStat, FS_ERRNO_TYPE& rErr) -{ -#if defined(APPLE) - rErr = fstat(iFileDesc, &kStat) != -1 ? 0 : errno; -#else - rErr = fstat64(iFileDesc, &kStat) != -1 ? 0 : errno; -#endif -} - -ILINE void FS_CLOSEDIR(FS_DIR_TYPE pDir, FS_ERRNO_TYPE& rErr) -{ - errno = 0; - rErr = closedir(pDir) == 0 ? 0 : errno; -} - -ILINE void FS_CLOSEDIR_NOERR(FS_DIR_TYPE pDir) -{ - closedir(pDir); -} - -const bool GetFilenameNoCase -( - const char* file, - char* pAdjustedFilename, - const bool cCreateNew -) -{ - assert(file); - assert(pAdjustedFilename); - azstrcpy(pAdjustedFilename, AZ_MAX_PATH_LEN, file); - - // Fix the dirname case. - const int cLen = strlen(file); - for (int i = 0; i < cLen; ++i) - { - if (pAdjustedFilename[i] == '\\') - { - pAdjustedFilename[i] = '/'; - } - } - - char* slash; - const char* dirname; - char* name; - - if ((pAdjustedFilename) == (char*)-1) - { - return false; - } - - slash = strrchr(pAdjustedFilename, '/'); - if (slash) - { - dirname = pAdjustedFilename; - name = slash + 1; - *slash = 0; - } - else - { - dirname = "."; - name = pAdjustedFilename; - } - -#if !defined(LINUX) && !defined(APPLE) && !defined(DEFINE_SKIP_WILDCARD_CHECK) // fix the parent path anyhow. - // Check for wildcards. We'll always return true if the specified filename is - // a wildcard pattern. - if (strchr(name, '*') || strchr(name, '?')) - { - if (slash) - { - *slash = '/'; - } - return true; - } -#endif - - // Scan for the file. - if (slash) - { - *slash = '/'; - } - -#if FIX_FILENAME_CASE - char* path = pAdjustedFilename; - char* sep; - while ((sep = strchr(path, '/')) != NULL) - { - *sep = '\0'; - const bool exists = FixOnePathElement(pAdjustedFilename); - *sep = '/'; - if (!exists) - { - return false; - } - - path = sep + 1; - } - if (!FixOnePathElement(pAdjustedFilename)) // catch last filename. - { - return false; - } - -#else - for (char* c = pAdjustedFilename; *c; ++c) - { - *c = tolower(*c); - } -#endif - - return true; -} - -DWORD GetFileAttributes(LPCWSTR lpFileNameW) -{ - AZStd::string lpFileName; - AZStd::to_string(lpFileName, lpFileNameW); - struct stat fileStats; - const int success = stat(lpFileName.c_str(), &fileStats); - if (success == -1) - { - char adjustedFilename[MAX_PATH]; - GetFilenameNoCase(lpFileName.c_str(), adjustedFilename); - if (stat(adjustedFilename, &fileStats) == -1) - { - return (DWORD)INVALID_FILE_ATTRIBUTES; - } - } - DWORD ret = 0; - - const int acc = (fileStats.st_mode & S_IWRITE); - - if (acc != 0) - { - if (S_ISDIR(fileStats.st_mode) != 0) - { - ret |= FILE_ATTRIBUTE_DIRECTORY; - } - } - return (ret == 0) ? FILE_ATTRIBUTE_NORMAL : ret;//return file attribute normal as the default value, must only be set if no other attributes have been found -} - -__finddata64_t::~__finddata64_t() -{ - if (m_Dir != FS_DIR_NULL) - { - FS_CLOSEDIR_NOERR(m_Dir); - m_Dir = FS_DIR_NULL; - } -} #endif //defined(APPLE) || defined(LINUX) #endif // AZ_TRAIT_LEGACY_CRYCOMMON_USE_WINDOWS_STUBS diff --git a/Code/Legacy/CryCommon/crycommon_files.cmake b/Code/Legacy/CryCommon/crycommon_files.cmake index c1cdcf094a..a4d87c207a 100644 --- a/Code/Legacy/CryCommon/crycommon_files.cmake +++ b/Code/Legacy/CryCommon/crycommon_files.cmake @@ -11,9 +11,7 @@ set(FILES IAudioSystem.h ICmdLine.h IConsole.h - IEntityRenderState.h IFont.h - IFunctorBase.h IGem.h IIndexedMesh.h ILevelSystem.h @@ -30,18 +28,12 @@ set(FILES ISerialize.h IShader.h ISplines.h - IStatObj.h - StatObjBus.h ISystem.h ITexture.h - ITimer.h IValidator.h - IViewSystem.h IWindowMessageHandler.h IXml.h MicrophoneBus.h - HMDBus.h - VRCommon.h INavigationSystem.h IMNM.h SerializationTypes.h @@ -71,7 +63,6 @@ set(FILES SimpleSerialize.h smartptr.h StlUtils.h - Timer.h TimeValue.h VectorMap.h VertexFormats.h @@ -81,7 +72,6 @@ set(FILES Cry_Matrix34.h Cry_Matrix44.h Cry_Vector4.h - Cry_Camera.h Cry_Color.h Cry_Geo.h Cry_GeoDistance.h @@ -100,8 +90,6 @@ set(FILES CryAssert_iOS.h CryAssert_Linux.h CryAssert_Mac.h - CryLibrary.cpp - CryLibrary.h Linux32Specific.h Linux64Specific.h Linux_Win32Wrapper.h @@ -112,85 +100,8 @@ set(FILES platform_impl.cpp Win32specific.h Win64specific.h - LyShine/IDraw2d.h - LyShine/ILyShine.h - LyShine/ISprite.h - LyShine/IRenderGraph.h LyShine/UiAssetTypes.h - LyShine/UiComponentTypes.h - LyShine/UiBase.h - LyShine/UiEntityContext.h - LyShine/UiLayoutCellBase.h - LyShine/UiSerializeHelpers.h - LyShine/Animation/IUiAnimation.h - LyShine/Bus/UiAnimateEntityBus.h - LyShine/Bus/UiAnimationBus.h - LyShine/Bus/UiButtonBus.h - LyShine/Bus/UiCanvasBus.h - LyShine/Bus/UiCanvasManagerBus.h - LyShine/Bus/UiCanvasUpdateNotificationBus.h - LyShine/Bus/UiCheckboxBus.h LyShine/Bus/UiCursorBus.h - LyShine/Bus/UiDraggableBus.h - LyShine/Bus/UiDropdownBus.h - LyShine/Bus/UiDropdownOptionBus.h - LyShine/Bus/UiDropTargetBus.h - LyShine/Bus/UiDynamicLayoutBus.h - LyShine/Bus/UiDynamicScrollBoxBus.h - LyShine/Bus/UiEditorBus.h - LyShine/Bus/UiEditorCanvasBus.h - LyShine/Bus/UiEditorChangeNotificationBus.h - LyShine/Bus/UiElementBus.h - LyShine/Bus/UiEntityContextBus.h - LyShine/Bus/UiFaderBus.h - LyShine/Bus/UiFlipbookAnimationBus.h - LyShine/Bus/UiGameEntityContextBus.h - LyShine/Bus/UiImageBus.h - LyShine/Bus/UiImageSequenceBus.h - LyShine/Bus/UiIndexableImageBus.h - LyShine/Bus/UiInitializationBus.h - LyShine/Bus/UiInteractableActionsBus.h - LyShine/Bus/UiInteractableBus.h - LyShine/Bus/UiInteractableStatesBus.h - LyShine/Bus/UiInteractionMaskBus.h - LyShine/Bus/UiLayoutBus.h - LyShine/Bus/UiLayoutCellBus.h - LyShine/Bus/UiLayoutCellDefaultBus.h - LyShine/Bus/UiLayoutColumnBus.h - LyShine/Bus/UiLayoutControllerBus.h - LyShine/Bus/UiLayoutFitterBus.h - LyShine/Bus/UiLayoutGridBus.h - LyShine/Bus/UiLayoutManagerBus.h - LyShine/Bus/UiLayoutRowBus.h - LyShine/Bus/UiMarkupButtonBus.h - LyShine/Bus/UiMaskBus.h - LyShine/Bus/UiNavigationBus.h - LyShine/Bus/UiParticleEmitterBus.h - LyShine/Bus/UiRadioButtonBus.h - LyShine/Bus/UiRadioButtonCommunicationBus.h - LyShine/Bus/UiRadioButtonGroupBus.h - LyShine/Bus/UiRadioButtonGroupCommunicationBus.h - LyShine/Bus/UiRenderBus.h - LyShine/Bus/UiRenderControlBus.h - LyShine/Bus/UiScrollableBus.h - LyShine/Bus/UiScrollBarBus.h - LyShine/Bus/UiScrollBoxBus.h - LyShine/Bus/UiScrollerBus.h - LyShine/Bus/UiSliderBus.h - LyShine/Bus/UiSpawnerBus.h - LyShine/Bus/UiSystemBus.h - LyShine/Bus/UiTextBus.h - LyShine/Bus/UiTextInputBus.h - LyShine/Bus/UiTooltipBus.h - LyShine/Bus/UiTooltipDataPopulatorBus.h - LyShine/Bus/UiTooltipDisplayBus.h - LyShine/Bus/UiTransform2dBus.h - LyShine/Bus/UiTransformBus.h - LyShine/Bus/UiVisualBus.h - LyShine/Bus/Sprite/UiSpriteBus.h - LyShine/Bus/World/UiCanvasOnMeshBus.h - LyShine/Bus/World/UiCanvasRefBus.h - LyShine/Bus/Tools/UiSystemToolsBus.h Maestro/Bus/EditorSequenceAgentComponentBus.h Maestro/Bus/EditorSequenceBus.h Maestro/Bus/EditorSequenceComponentBus.h diff --git a/Code/Legacy/CryCommon/crycommon_testing_files.cmake b/Code/Legacy/CryCommon/crycommon_testing_files.cmake index 9c3427d529..42deecd576 100644 --- a/Code/Legacy/CryCommon/crycommon_testing_files.cmake +++ b/Code/Legacy/CryCommon/crycommon_testing_files.cmake @@ -12,8 +12,5 @@ set(FILES Mocks/ICryPakMock.h Mocks/ILogMock.h Mocks/ISystemMock.h - Mocks/ITimerMock.h Mocks/ICVarMock.h - Mocks/ITextureMock.h - Mocks/IRemoteConsoleMock.h ) diff --git a/Code/Legacy/CryCommon/platform.h b/Code/Legacy/CryCommon/platform.h index 2baddaafd5..d67c0b902c 100644 --- a/Code/Legacy/CryCommon/platform.h +++ b/Code/Legacy/CryCommon/platform.h @@ -249,7 +249,7 @@ ILINE DestinationType alias_cast(SourceType pPtr) // Mostly used only for debugging! ////////////////////////////////////////////////////////////////////////// void CrySleep(unsigned int dwMilliseconds); -int CryMessageBox(const char* lpText, const char* lpCaption, unsigned int uType); +void CryMessageBox(const char* lpText, const char* lpCaption, unsigned int uType); //--------------------------------------------------------------------------- // Useful function to clean the structure. diff --git a/Code/Legacy/CryCommon/platform_impl.cpp b/Code/Legacy/CryCommon/platform_impl.cpp index a68a5150db..64aa7ce1ca 100644 --- a/Code/Legacy/CryCommon/platform_impl.cpp +++ b/Code/Legacy/CryCommon/platform_impl.cpp @@ -74,7 +74,7 @@ void InitCRTHandlers() {} ////////////////////////////////////////////////////////////////////////// // This is an entry to DLL initialization function that must be called for each loaded module ////////////////////////////////////////////////////////////////////////// -extern "C" AZ_DLL_EXPORT void ModuleInitISystem(ISystem* pSystem, [[maybe_unused]] const char* moduleName) +void ModuleInitISystem(ISystem* pSystem, [[maybe_unused]] const char* moduleName) { if (gEnv) // Already registered. { @@ -96,28 +96,12 @@ extern "C" AZ_DLL_EXPORT void ModuleInitISystem(ISystem* pSystem, [[maybe_unused } // if pSystem } -extern "C" AZ_DLL_EXPORT void ModuleShutdownISystem([[maybe_unused]] ISystem* pSystem) +void ModuleShutdownISystem([[maybe_unused]] ISystem* pSystem) { // Unregister with AZ environment. AZ::Environment::Detach(); } -extern "C" AZ_DLL_EXPORT void InjectEnvironment(void* env) -{ - static bool injected = false; - if (!injected) - { - AZ::Environment::Attach(reinterpret_cast(env)); - AZ::AllocatorManager::Instance(); // Force the AllocatorManager to instantiate and register any allocators defined in data sections - injected = true; - } -} - -extern "C" AZ_DLL_EXPORT void DetachEnvironment() -{ - AZ::Environment::Detach(); -} - void* GetModuleInitISystemSymbol() { return reinterpret_cast(&ModuleInitISystem); @@ -126,16 +110,6 @@ void* GetModuleShutdownISystemSymbol() { return reinterpret_cast(&ModuleShutdownISystem); } -void* GetInjectEnvironmentSymbol() -{ - return reinterpret_cast(&InjectEnvironment); -} -void* GetDetachEnvironmentSymbol() -{ - return reinterpret_cast(&DetachEnvironment); -} - -bool g_bProfilerEnabled = false; ////////////////////////////////////////////////////////////////////////// // global random number generator used by cry_random functions @@ -204,21 +178,21 @@ void CrySleep(unsigned int dwMilliseconds) } ////////////////////////////////////////////////////////////////////////// -int CryMessageBox([[maybe_unused]] const char* lpText, [[maybe_unused]] const char* lpCaption, [[maybe_unused]] unsigned int uType) +void CryMessageBox([[maybe_unused]] const char* lpText, [[maybe_unused]] const char* lpCaption, [[maybe_unused]] unsigned int uType) { #ifdef WIN32 ICVar* const pCVar = gEnv && gEnv->pConsole ? gEnv->pConsole->GetCVar("sys_no_crash_dialog") : NULL; if ((pCVar && pCVar->GetIVal() != 0) || (gEnv && gEnv->bNoAssertDialog)) { - return 0; + return; } AZStd::wstring lpTextW; AZStd::to_wstring(lpTextW, lpText); AZStd::wstring lpCaptionW; AZStd::to_wstring(lpCaptionW, lpCaption); - return MessageBoxW(NULL, lpTextW.c_str(), lpCaptionW.c_str(), uType); + MessageBoxW(NULL, lpTextW.c_str(), lpCaptionW.c_str(), uType); #else - return 0; + return; #endif } @@ -307,12 +281,6 @@ int64 CryGetTicks() return li.QuadPart; } -int64 CryGetTicksPerSec() -{ - LARGE_INTEGER li; - QueryPerformanceFrequency(&li); - return li.QuadPart; -} #endif diff --git a/Code/Legacy/CrySystem/AZCoreLogSink.h b/Code/Legacy/CrySystem/AZCoreLogSink.h index 1b09c3198d..9d732b3dd4 100644 --- a/Code/Legacy/CrySystem/AZCoreLogSink.h +++ b/Code/Legacy/CrySystem/AZCoreLogSink.h @@ -36,9 +36,10 @@ public: Disconnect(); } - inline static void Connect() + inline static void Connect(bool suppressSystemOutput) { GetInstance().m_ignoredAsserts = new IgnoredAssertMap(); + GetInstance().m_suppressSystemOutput = suppressSystemOutput; GetInstance().BusConnect(); } @@ -126,7 +127,7 @@ public: CryLogAlways("%s", message); } - return true; // suppress default AzCore behavior. + return m_suppressSystemOutput; #else AZ_UNUSED(fileName); AZ_UNUSED(line); @@ -146,7 +147,7 @@ public: return false; // allow AZCore to do its default behavior. } gEnv->pLog->LogError("(%s) - %s", window, message); - return true; // suppress default AzCore behavior. + return m_suppressSystemOutput; } bool OnPreWarning(const char* window, const char* fileName, int line, const char* func, const char* message) override @@ -161,7 +162,7 @@ public: } CryWarning(VALIDATOR_MODULE_UNKNOWN, VALIDATOR_WARNING, "(%s) - %s", window, message); - return true; // suppress default AzCore behavior. + return m_suppressSystemOutput; } bool OnOutput(const char* window, const char* message) override @@ -179,12 +180,13 @@ public: { CryLog("(%s) - %s", window, message); } - - return true; // suppress default AzCore behavior. + + return m_suppressSystemOutput; } private: using IgnoredAssertMap = AZStd::unordered_map, AZStd::equal_to, AZ::OSStdAllocator>; IgnoredAssertMap* m_ignoredAsserts; + bool m_suppressSystemOutput = true; }; diff --git a/Code/Legacy/CrySystem/CmdLineArg.cpp b/Code/Legacy/CrySystem/CmdLineArg.cpp index 79d23ddae7..554e734055 100644 --- a/Code/Legacy/CrySystem/CmdLineArg.cpp +++ b/Code/Legacy/CrySystem/CmdLineArg.cpp @@ -42,5 +42,22 @@ const int CCmdLineArg::GetIValue() const { return atoi(m_value.c_str()); } +const bool CCmdLineArg::GetBoolValue(bool& cmdLineValue) const +{ + AZStd::string lowercaseValue(m_value); + AZStd::to_lower(lowercaseValue.begin(), lowercaseValue.end()); + if (lowercaseValue == "true") + { + cmdLineValue = true; + return true; + } + if (lowercaseValue == "false") + { + cmdLineValue = false; + return true; + } + + return false; +} diff --git a/Code/Legacy/CrySystem/CmdLineArg.h b/Code/Legacy/CrySystem/CmdLineArg.h index 5e3a629e7c..66d56be132 100644 --- a/Code/Legacy/CrySystem/CmdLineArg.h +++ b/Code/Legacy/CrySystem/CmdLineArg.h @@ -30,6 +30,7 @@ public: const ECmdLineArgType GetType() const; const float GetFValue() const; const int GetIValue() const; + const bool GetBoolValue(bool& cmdLineValue) const; private: diff --git a/Code/Legacy/CrySystem/CrySystem_precompiled.h b/Code/Legacy/CrySystem/CrySystem_precompiled.h index 3ececa6514..41090ff321 100644 --- a/Code/Legacy/CrySystem/CrySystem_precompiled.h +++ b/Code/Legacy/CrySystem/CrySystem_precompiled.h @@ -71,7 +71,6 @@ // CRY Stuff //////////////////////////////////////////////////////////////// ///////////////////////////////////////////////////////////////////////////// #include "Cry_Math.h" -#include #include #include #include @@ -90,7 +89,6 @@ inline int RoundToClosestMB(size_t memSize) #include #include #include -#include #include #include #include diff --git a/Code/Legacy/CrySystem/DebugCallStack.cpp b/Code/Legacy/CrySystem/DebugCallStack.cpp index 19fe4ce8df..201582b949 100644 --- a/Code/Legacy/CrySystem/DebugCallStack.cpp +++ b/Code/Legacy/CrySystem/DebugCallStack.cpp @@ -17,7 +17,6 @@ #include "System.h" #include -#include #include #include @@ -158,8 +157,6 @@ AZStd::spin_mutex g_lockThreadDumpList; void MarkThisThreadForDebugging(const char* name) { - EBUS_EVENT(AZ::Debug::EventTraceDrillerSetupBus, SetThreadName, AZStd::this_thread::get_id(), name); - AZStd::scoped_lock lock(g_lockThreadDumpList); DWORD id = GetCurrentThreadId(); if (g_nDebugThreads == sizeof(g_idDebugThreads) / sizeof(g_idDebugThreads[0])) diff --git a/Code/Legacy/CrySystem/DllMain.cpp b/Code/Legacy/CrySystem/DllMain.cpp index 4a31cb51a0..cbfec93ed9 100644 --- a/Code/Legacy/CrySystem/DllMain.cpp +++ b/Code/Legacy/CrySystem/DllMain.cpp @@ -12,6 +12,8 @@ #include #include "DebugCallStack.h" +#include // for AZ_DECLARE_MODULE_INITIALIZATION + #if defined(AZ_RESTRICTED_PLATFORM) #undef AZ_RESTRICTED_SECTION #define DLLMAIN_CPP_SECTION_1 1 @@ -67,7 +69,7 @@ CRYSYSTEM_API ISystem* CreateSystemInterface(const SSystemInitParams& startupPar // We must attach to the environment prior to allocating CSystem, as opposed to waiting // for ModuleInitISystem(), because the log message sink uses buses. - // Environment should have been attached via InjectEnvironment + // Environment should have been attached via InitializeDynamicModule AZ_Assert(AZ::Environment::IsReady(), "Environment is not attached, must be attached before CreateSystemInterface can be called"); pSystem = new CSystem(startupParams.pSharedEnvironment); @@ -115,3 +117,5 @@ CRYSYSTEM_API ISystem* CreateSystemInterface(const SSystemInitParams& startupPar } }; +// declare the functions used by AZ::DynamicModule to [un]initialize the library here +AZ_DECLARE_MODULE_INITIALIZATION diff --git a/Code/Legacy/CrySystem/LevelSystem/LevelSystem.cpp b/Code/Legacy/CrySystem/LevelSystem/LevelSystem.cpp index 3a2bba64d3..dbe92ee6aa 100644 --- a/Code/Legacy/CrySystem/LevelSystem/LevelSystem.cpp +++ b/Code/Legacy/CrySystem/LevelSystem/LevelSystem.cpp @@ -18,7 +18,7 @@ #include #include -#include +#include #include #include #include @@ -26,7 +26,6 @@ #include #include "MainThreadRenderRequestBus.h" -#include #include #include #include @@ -202,24 +201,22 @@ CLevelSystem::CLevelSystem(ISystem* pSystem, const char* levelsFolder) { return; } - auto pPak = gEnv->pCryPak; + auto archive = AZ::Interface::Get(); - if (AZ::IO::IArchive::LevelPackOpenEvent* levelPakOpenEvent = pPak->GetLevelPackOpenEvent()) + if (AZ::IO::IArchive::LevelPackOpenEvent* levelPakOpenEvent = archive->GetLevelPackOpenEvent()) { - m_levelPackOpenHandler = AZ::IO::IArchive::LevelPackOpenEvent::Handler([this](const AZStd::vector& levelDirs) + m_levelPackOpenHandler = AZ::IO::IArchive::LevelPackOpenEvent::Handler([this](const AZStd::vector& levelDirs) { - for (AZStd::string dir : levelDirs) + for (AZ::IO::Path levelDir : levelDirs) { - AZ::StringFunc::Path::StripComponent(dir, true); - AZStd::string searchPattern = dir + AZ_FILESYSTEM_SEPARATOR_WILDCARD; bool modFolder = false; - PopulateLevels(searchPattern, dir, gEnv->pCryPak, modFolder, false); + PopulateLevels((levelDir / "*").Native(), levelDir.Native(), AZ::Interface::Get(), modFolder, false); } }); m_levelPackOpenHandler.Connect(*levelPakOpenEvent); } - if (AZ::IO::IArchive::LevelPackCloseEvent* levelPakCloseEvent = pPak->GetLevelPackCloseEvent()) + if (AZ::IO::IArchive::LevelPackCloseEvent* levelPakCloseEvent = archive->GetLevelPackCloseEvent()) { m_levelPackCloseHandler = AZ::IO::IArchive::LevelPackCloseEvent::Handler([this](AZStd::string_view) { @@ -287,7 +284,7 @@ void CLevelSystem::ScanFolder(const char* subfolder, bool modFolder) AZStd::unordered_set pakList; - AZ::IO::ArchiveFileIterator handle = pPak->FindFirst(search.c_str(), AZ::IO::IArchive::eFileSearchType_AllowOnDiskOnly); + AZ::IO::ArchiveFileIterator handle = pPak->FindFirst(search.c_str(), AZ::IO::FileSearchLocation::OnDisk); if (handle) { @@ -334,86 +331,85 @@ void CLevelSystem::ScanFolder(const char* subfolder, bool modFolder) } void CLevelSystem::PopulateLevels( - AZStd::string searchPattern, AZStd::string& folder, AZ::IO::IArchive* pPak, bool& modFolder, bool fromFileSystemOnly) + AZStd::string searchPattern, const AZStd::string& folder, AZ::IO::IArchive* pPak, bool& modFolder, bool fromFileSystemOnly) { + // allow this find first to actually touch the file system + // (causes small overhead but with minimal amount of levels this should only be around 150ms on actual DVD Emu) + AZ::IO::ArchiveFileIterator handle = pPak->FindFirst(searchPattern.c_str(), + fromFileSystemOnly ? AZ::IO::FileSearchLocation::OnDisk : AZ::IO::FileSearchLocation::InPak); + + if (handle) { - // allow this find first to actually touch the file system - // (causes small overhead but with minimal amount of levels this should only be around 150ms on actual DVD Emu) - AZ::IO::ArchiveFileIterator handle = pPak->FindFirst(searchPattern.c_str(), AZ::IO::IArchive::eFileSearchType_AllowOnDiskOnly); - - if (handle) + do { - do + if ((handle.m_fileDesc.nAttrib & AZ::IO::FileDesc::Attribute::Subdirectory) != AZ::IO::FileDesc::Attribute::Subdirectory || + handle.m_filename == "." || handle.m_filename == "..") { - if ((handle.m_fileDesc.nAttrib & AZ::IO::FileDesc::Attribute::Subdirectory) != AZ::IO::FileDesc::Attribute::Subdirectory || - handle.m_filename == "." || handle.m_filename == "..") - { - continue; - } + continue; + } - AZStd::string levelFolder; - if (fromFileSystemOnly) - { - levelFolder = - (folder.empty() ? "" : (folder + "/")) + AZStd::string(handle.m_filename.data(), handle.m_filename.size()); - } - else - { - AZStd::string levelName(AZ::IO::PathView(handle.m_filename).Filename().Native()); - levelFolder = (folder.empty() ? "" : (folder + "/")) + levelName; - } + AZStd::string levelFolder; + if (fromFileSystemOnly) + { + levelFolder = + (folder.empty() ? "" : (folder + "/")) + AZStd::string(handle.m_filename.data(), handle.m_filename.size()); + } + else + { + AZStd::string levelName(AZ::IO::PathView(handle.m_filename).Filename().Native()); + levelFolder = (folder.empty() ? "" : (folder + "/")) + levelName; + } - AZStd::string levelPath; - if (AZ::StringFunc::StartsWith(levelFolder.c_str(), m_levelsFolder.c_str())) + AZStd::string levelPath; + if (AZ::StringFunc::StartsWith(levelFolder.c_str(), m_levelsFolder.c_str())) + { + levelPath = levelFolder; + } + else + { + levelPath = m_levelsFolder + "/" + levelFolder; + } + + const AZStd::string levelPakName = levelPath + "/" + LevelPakName; + const AZStd::string levelInfoName = levelPath + "/levelinfo.xml"; + + if (!pPak->IsFileExist( + levelPakName.c_str(), + fromFileSystemOnly ? AZ::IO::FileSearchLocation::OnDisk : AZ::IO::FileSearchLocation::InPak) && + !pPak->IsFileExist( + levelInfoName.c_str(), + fromFileSystemOnly ? AZ::IO::FileSearchLocation::OnDisk : AZ::IO::FileSearchLocation::InPak)) + { + ScanFolder(levelFolder.c_str(), modFolder); + continue; + } + + // With the level.pak workflow, levelPath and levelName will point to a directory. + // levelPath: levels/mylevel + // levelName: mylevel + CLevelInfo levelInfo; + levelInfo.m_levelPath = levelPath; + levelInfo.m_levelName = levelFolder; + levelInfo.m_isPak = !fromFileSystemOnly; + + CLevelInfo* pExistingInfo = GetLevelInfoInternal(levelInfo.m_levelName); + + // Don't add the level if it is already in the list + if (pExistingInfo == NULL) + { + m_levelInfos.push_back(levelInfo); + } + else + { + // Levels in bundles take priority over levels outside bundles. + if (!pExistingInfo->m_isPak && levelInfo.m_isPak) { - levelPath = levelFolder; - } - else - { - levelPath = m_levelsFolder + "/" + levelFolder; + *pExistingInfo = levelInfo; } + } + } while (handle = pPak->FindNext(handle)); - const AZStd::string levelPakName = levelPath + "/" + LevelPakName; - const AZStd::string levelInfoName = levelPath + "/levelinfo.xml"; - - if (!pPak->IsFileExist( - levelPakName.c_str(), - fromFileSystemOnly ? AZ::IO::IArchive::eFileLocation_OnDisk : AZ::IO::IArchive::eFileLocation_InPak) && - !pPak->IsFileExist( - levelInfoName.c_str(), - fromFileSystemOnly ? AZ::IO::IArchive::eFileLocation_OnDisk : AZ::IO::IArchive::eFileLocation_InPak)) - { - ScanFolder(levelFolder.c_str(), modFolder); - continue; - } - - // With the level.pak workflow, levelPath and levelName will point to a directory. - // levelPath: levels/mylevel - // levelName: mylevel - CLevelInfo levelInfo; - levelInfo.m_levelPath = levelPath; - levelInfo.m_levelName = levelFolder; - levelInfo.m_isPak = !fromFileSystemOnly; - - CLevelInfo* pExistingInfo = GetLevelInfoInternal(levelInfo.m_levelName); - - // Don't add the level if it is already in the list - if (pExistingInfo == NULL) - { - m_levelInfos.push_back(levelInfo); - } - else - { - // Levels in bundles take priority over levels outside bundles. - if (!pExistingInfo->m_isPak && levelInfo.m_isPak) - { - *pExistingInfo = levelInfo; - } - } - } while (handle = pPak->FindNext(handle)); - - pPak->FindClose(handle); - } + pPak->FindClose(handle); } } @@ -543,7 +539,6 @@ bool CLevelSystem::LoadLevel(const char* _levelName) ILevel* CLevelSystem::LoadLevelInternal(const char* _levelName) { gEnv->pSystem->SetSystemGlobalState(ESYSTEM_GLOBAL_STATE_LEVEL_LOAD_START); - AZ_ASSET_NAMED_SCOPE("Level: %s", _levelName); CryLog ("Level system is loading \"%s\"", _levelName); INDENT_LOG_DURING_SCOPE(); @@ -553,8 +548,6 @@ ILevel* CLevelSystem::LoadLevelInternal(const char* _levelName) // Not remove a scope!!! { - //m_levelLoadStartTime = gEnv->pTimer->GetAsyncTime(); - CLevelInfo* pLevelInfo = GetLevelInfoInternal(levelName); if (!pLevelInfo) @@ -693,7 +686,9 @@ void CLevelSystem::PrepareNextLevel(const char* levelName) // This work not required in-editor. if (!gEnv || !gEnv->IsEditor()) { - m_levelLoadStartTime = gEnv->pTimer->GetAsyncTime(); + const AZ::TimeMs timeMs = AZ::GetRealElapsedTimeMs(); + const double timeSec = AZ::TimeMsToSecondsDouble(timeMs); + m_levelLoadStartTime = CTimeValue(timeSec); // Open pak file for a new level. pLevelInfo->OpenLevelPak(); @@ -726,7 +721,8 @@ void CLevelSystem::OnLoadingStart(const char* levelName) gEnv->pCryPak->RecordFileOpen(AZ::IO::IArchive::RFOM_Level); } - m_fLastTime = gEnv->pTimer->GetAsyncCurTime(); + const AZ::TimeMs timeMs = AZ::GetRealElapsedTimeMs(); + m_fLastTime = AZ::TimeMsToSeconds(timeMs); GetISystem()->GetISystemEventDispatcher()->OnSystemEvent(ESYSTEM_EVENT_LEVEL_LOAD_START, 0, 0); @@ -757,7 +753,9 @@ void CLevelSystem::OnLoadingError(const char* levelName, const char* error) //------------------------------------------------------------------------ void CLevelSystem::OnLoadingComplete(const char* levelName) { - CTimeValue t = gEnv->pTimer->GetAsyncTime(); + const AZ::TimeMs timeMs = AZ::GetRealElapsedTimeMs(); + const double timeSec = AZ::TimeMsToSecondsDouble(timeMs); + const CTimeValue t(timeSec); m_fLastLevelLoadTime = (t - m_levelLoadStartTime).GetSeconds(); LogLoadingTime(); @@ -851,7 +849,7 @@ void CLevelSystem::UnloadLevel() gEnv->pCryPak->DisableRuntimeFileAccess(false); } - CTimeValue tBegin = gEnv->pTimer->GetAsyncTime(); + const AZ::TimeMs beginTimeMs = AZ::GetRealElapsedTimeMs(); // Clear level entities and prefab instances. EBUS_EVENT(AzFramework::GameEntityContextRequestBus, ResetGameContext); @@ -881,16 +879,10 @@ void CLevelSystem::UnloadLevel() // Normally the GC step is triggered at the end of this method (by the ESYSTEM_EVENT_LEVEL_POST_UNLOAD event). EBUS_EVENT(AZ::ScriptSystemRequestBus, GarbageCollect); - // Perform level unload procedures for the LyShine UI system - if (gEnv && gEnv->pLyShine) - { - gEnv->pLyShine->OnLevelUnload(); - } - m_bLevelLoaded = false; - CTimeValue tUnloadTime = gEnv->pTimer->GetAsyncTime() - tBegin; - CryLog("UnloadLevel End: %.1f sec", tUnloadTime.GetSeconds()); + [[maybe_unused]] const AZ::TimeMs unloadTimeMs = AZ::GetRealElapsedTimeMs() - beginTimeMs; + CryLog("UnloadLevel End: %.1f sec", AZ::TimeMsToSeconds(unloadTimeMs)); // Must be sent last. // Cleanup all containers diff --git a/Code/Legacy/CrySystem/LevelSystem/LevelSystem.h b/Code/Legacy/CrySystem/LevelSystem/LevelSystem.h index d7230347e9..d0a39f30b0 100644 --- a/Code/Legacy/CrySystem/LevelSystem/LevelSystem.h +++ b/Code/Legacy/CrySystem/LevelSystem/LevelSystem.h @@ -11,6 +11,7 @@ #include "ILevelSystem.h" #include +#include // [LYN-2376] Remove the entire file once legacy slice support is removed @@ -115,7 +116,7 @@ private: void ScanFolder(const char* subfolder, bool modFolder); void PopulateLevels( - AZStd::string searchPattern, AZStd::string& folder, AZ::IO::IArchive* pPak, bool& modFolder, bool fromFileSystemOnly); + AZStd::string searchPattern, const AZStd::string& folder, AZ::IO::IArchive* pPak, bool& modFolder, bool fromFileSystemOnly); void PrepareNextLevel(const char* levelName); ILevel* LoadLevelInternal(const char* _levelName); diff --git a/Code/Legacy/CrySystem/LevelSystem/SpawnableLevelSystem.cpp b/Code/Legacy/CrySystem/LevelSystem/SpawnableLevelSystem.cpp index b2b67c3b75..095d296373 100644 --- a/Code/Legacy/CrySystem/LevelSystem/SpawnableLevelSystem.cpp +++ b/Code/Legacy/CrySystem/LevelSystem/SpawnableLevelSystem.cpp @@ -12,20 +12,18 @@ #include -#include #include #include #include #include #include "MainThreadRenderRequestBus.h" -#include #include #include #include #include - #include +#include namespace LegacyLevelSystem { @@ -259,7 +257,6 @@ namespace LegacyLevelSystem bool SpawnableLevelSystem::LoadLevelInternal(const char* levelName) { gEnv->pSystem->SetSystemGlobalState(ESYSTEM_GLOBAL_STATE_LEVEL_LOAD_START); - AZ_ASSET_NAMED_SCOPE("Level: %s", levelName); INDENT_LOG_DURING_SCOPE(); @@ -368,7 +365,9 @@ namespace LegacyLevelSystem // This work not required in-editor. if (!gEnv || !gEnv->IsEditor()) { - m_levelLoadStartTime = gEnv->pTimer->GetAsyncTime(); + const AZ::TimeMs timeMs = AZ::GetRealElapsedTimeMs(); + const double timeSec = AZ::TimeMsToSecondsDouble(timeMs); + m_levelLoadStartTime = CTimeValue(timeSec); // switched to level heap, so now imm start the loading screen (renderer will be reinitialized in the levelheap) gEnv->pSystem->GetISystemEventDispatcher()->OnSystemEvent(ESYSTEM_EVENT_LEVEL_LOAD_START_LOADINGSCREEN, 0, 0); @@ -409,7 +408,8 @@ namespace LegacyLevelSystem gEnv->pCryPak->RecordFileOpen(AZ::IO::IArchive::RFOM_Level); } - m_fLastTime = gEnv->pTimer->GetAsyncCurTime(); + const AZ::TimeMs timeMs = AZ::GetRealElapsedTimeMs(); + m_fLastTime = AZ::TimeMsToSeconds(timeMs); GetISystem()->GetISystemEventDispatcher()->OnSystemEvent(ESYSTEM_EVENT_LEVEL_LOAD_START, 0, 0); @@ -433,7 +433,9 @@ namespace LegacyLevelSystem //------------------------------------------------------------------------ void SpawnableLevelSystem::OnLoadingComplete(const char* levelName) { - CTimeValue t = gEnv->pTimer->GetAsyncTime(); + const AZ::TimeMs timeMs = AZ::GetRealElapsedTimeMs(); + const double timeSec = AZ::TimeMsToSecondsDouble(timeMs); + const CTimeValue t(timeSec); m_fLastLevelLoadTime = (t - m_levelLoadStartTime).GetSeconds(); LogLoadingTime(); @@ -532,7 +534,7 @@ namespace LegacyLevelSystem gEnv->pCryPak->DisableRuntimeFileAccess(false); } - CTimeValue tBegin = gEnv->pTimer->GetAsyncTime(); + const AZ::TimeMs beginTimeMs = AZ::GetRealElapsedTimeMs(); // Clear level entities and prefab instances. EBUS_EVENT(AzFramework::GameEntityContextRequestBus, ResetGameContext); @@ -553,16 +555,10 @@ namespace LegacyLevelSystem // Normally the GC step is triggered at the end of this method (by the ESYSTEM_EVENT_LEVEL_POST_UNLOAD event). EBUS_EVENT(AZ::ScriptSystemRequestBus, GarbageCollect); - // Perform level unload procedures for the LyShine UI system - if (gEnv && gEnv->pLyShine) - { - gEnv->pLyShine->OnLevelUnload(); - } - m_bLevelLoaded = false; - CTimeValue tUnloadTime = gEnv->pTimer->GetAsyncTime() - tBegin; - AZ_TracePrintf("LevelSystem", "UnloadLevel End: %.1f sec\n", tUnloadTime.GetSeconds()); + [[maybe_unused]] const AZ::TimeMs unloadTimeMs = AZ::GetRealElapsedTimeMs() - beginTimeMs; + AZ_TracePrintf("LevelSystem", "UnloadLevel End: %.1f sec\n", AZ::TimeMsToSeconds(unloadTimeMs)); // Must be sent last. // Cleanup all containers diff --git a/Code/Legacy/CrySystem/LevelSystem/SpawnableLevelSystem.h b/Code/Legacy/CrySystem/LevelSystem/SpawnableLevelSystem.h index 0a7b821262..b2e74530ac 100644 --- a/Code/Legacy/CrySystem/LevelSystem/SpawnableLevelSystem.h +++ b/Code/Legacy/CrySystem/LevelSystem/SpawnableLevelSystem.h @@ -12,6 +12,7 @@ #include #include #include +#include namespace LegacyLevelSystem { diff --git a/Code/Legacy/CrySystem/LocalizedStringManager.cpp b/Code/Legacy/CrySystem/LocalizedStringManager.cpp index a87800899d..c48baa95a7 100644 --- a/Code/Legacy/CrySystem/LocalizedStringManager.cpp +++ b/Code/Legacy/CrySystem/LocalizedStringManager.cpp @@ -136,6 +136,44 @@ static const char* PLATFORM_INDEPENDENT_LANGUAGE_NAMES[ ILocalizationManager::eP "da-DK" // Danish (Denmark) }; +#if defined(WIN32) || defined(WIN64) +namespace +{ +#if defined(WIN32) + time_t gmt_to_local_win32(void) + { + TIME_ZONE_INFORMATION tzinfo; + DWORD dwStandardDaylight; + long bias; + + dwStandardDaylight = GetTimeZoneInformation(&tzinfo); + bias = tzinfo.Bias; + + if (dwStandardDaylight == TIME_ZONE_ID_STANDARD) + { + bias += tzinfo.StandardBias; + } + + if (dwStandardDaylight == TIME_ZONE_ID_DAYLIGHT) + { + bias += tzinfo.DaylightBias; + } + + return (-bias * 60); + } +#endif // #if defined(WIN32) + + time_t DateToSecondsUTC(struct tm& inDate) + { +#if defined(WIN32) + return mktime(&inDate) + gmt_to_local_win32(); +#else + return mktime(&inDate); +#endif // #if defined(WIN32) + } +} +#endif // #if defined(WIN32) || defined(WIN64) + ////////////////////////////////////////////////////////////////////////// #if !defined(_RELEASE) static void ReloadDialogData([[maybe_unused]] IConsoleCmdArgs* pArgs) @@ -989,8 +1027,6 @@ bool CLocalizedStringsManager::DoLoadExcelXmlSpreadsheet(const char* sFileName, // key CRC uint32 keyCRC; - size_t nMemSize = 0; - for (;; ) { int nRowIndex = -1; @@ -1471,30 +1507,6 @@ bool CLocalizedStringsManager::DoLoadExcelXmlSpreadsheet(const char* sFileName, pEntry->flags |= SLocalizedStringEntry::IS_INTERCEPTED; } - nMemSize += sizeof(*pEntry) + pEntry->sCharacterName.length() * sizeof(char); - if (m_cvarLocalizationEncode == 0) - { - //Note that this isn't accurate if we're using encoding/compression to shrink the string as the encoding step hasn't happened yet - if (pEntry->TranslatedText.psUtf8Uncompressed) - { - nMemSize += pEntry->TranslatedText.psUtf8Uncompressed->length() * sizeof(char); - } - } - if (pEntry->pEditorExtension != NULL) - { - nMemSize += pEntry->pEditorExtension->sKey.length() - + pEntry->pEditorExtension->sOriginalActorLine.length() - + pEntry->pEditorExtension->sUtf8TranslatedActorLine.length() * sizeof(char) - + pEntry->pEditorExtension->sOriginalText.length() - + pEntry->pEditorExtension->sOriginalCharacterName.length(); - } - - - // Compression Preparation - //unsigned int nSourceSize = pEntry->swTranslatedText.length()*sizeof(wchar_t); - //if (nSourceSize) - // int zResult = Compress(pDest, nDestLen, pEntry->swTranslatedText.c_str(), nSourceSize); - AddLocalizedString(m_pLanguage, pEntry, keyCRC); } @@ -1502,10 +1514,7 @@ bool CLocalizedStringsManager::DoLoadExcelXmlSpreadsheet(const char* sFileName, { pEncoder->Finalize(); - { uint8 compressionBuffer[COMPRESSION_FIXED_BUFFER_LENGTH]; - //uint8 decompressionBuffer[COMPRESSION_FIXED_BUFFER_LENGTH]; - size_t uncompressedTotal = 0, compressedTotal = 0; for (size_t stringToCompress = startOfStringsToCompress; stringToCompress < m_pLanguage->m_vLocalizedStrings.size(); stringToCompress++) { SLocalizedStringEntry* pStringToCompress = m_pLanguage->m_vLocalizedStrings[stringToCompress]; @@ -1513,30 +1522,19 @@ bool CLocalizedStringsManager::DoLoadExcelXmlSpreadsheet(const char* sFileName, { size_t compBufSize = COMPRESSION_FIXED_BUFFER_LENGTH; memset(compressionBuffer, 0, COMPRESSION_FIXED_BUFFER_LENGTH); - //CryLogAlways("%u Compressing %s (%p)", stringToCompress, pStringToCompress->szCompressedTranslatedText, pStringToCompress->szCompressedTranslatedText); size_t inputStringLength = strlen((const char*)(pStringToCompress->TranslatedText.szCompressed)); pEncoder->CompressInput(pStringToCompress->TranslatedText.szCompressed, inputStringLength, compressionBuffer, &compBufSize); compressionBuffer[compBufSize] = 0; pStringToCompress->huffmanTreeIndex = iEncoder; pEncoder->AddRef(); - //CryLogAlways("Compressed %s (%u) to %s (%u)", pStringToCompress->szCompressedTranslatedText, strlen((const char*)pStringToCompress->szCompressedTranslatedText), compressionBuffer, compBufSize); - uncompressedTotal += inputStringLength; - compressedTotal += compBufSize; uint8* szCompressedString = new uint8[compBufSize]; SAFE_DELETE_ARRAY(pStringToCompress->TranslatedText.szCompressed); memcpy(szCompressedString, compressionBuffer, compBufSize); pStringToCompress->TranslatedText.szCompressed = szCompressedString; - - //Testing code - //memset( decompressionBuffer, 0, COMPRESSION_FIXED_BUFFER_LENGTH ); - //size_t decompBufSize = pEncoder->UncompressInput(compressionBuffer, COMPRESSION_FIXED_BUFFER_LENGTH, decompressionBuffer, COMPRESSION_FIXED_BUFFER_LENGTH); - //CryLogAlways("Decompressed %s (%u) to %s (%u)", compressionBuffer, compBufSize, decompressionBuffer, decompBufSize); } } - //CryLogAlways("[LOC PROFILING] %s, %u, Uncompressed %u, Compressed %u", sFileName, m_pLanguage->m_vLocalizedStrings.size() - startOfStringsToCompress, uncompressedTotal, compressedTotal); - } } pXmlTableReader->Release(); @@ -1546,11 +1544,7 @@ bool CLocalizedStringsManager::DoLoadExcelXmlSpreadsheet(const char* sFileName, bool CLocalizedStringsManager::DoLoadAGSXmlDocument(const char* sFileName, uint8 nTagID, bool bReload) { - if (!sFileName) - { - return false; - } - if (!m_pLanguage) + if (!sFileName|| !m_pLanguage) { return false; } @@ -1693,7 +1687,6 @@ bool CLocalizedStringsManager::DoLoadAGSXmlDocument(const char* sFileName, uint8 } { uint8 compressionBuffer[COMPRESSION_FIXED_BUFFER_LENGTH] = {}; - size_t uncompressedTotal = 0, compressedTotal = 0; for (size_t stringToCompress = startOfStringsToCompress; stringToCompress < m_pLanguage->m_vLocalizedStrings.size(); stringToCompress++) { SLocalizedStringEntry* pStringToCompress = m_pLanguage->m_vLocalizedStrings[stringToCompress]; @@ -1706,8 +1699,6 @@ bool CLocalizedStringsManager::DoLoadAGSXmlDocument(const char* sFileName, uint8 compressionBuffer[compBufSize] = 0; pStringToCompress->huffmanTreeIndex = iEncoder; pEncoder->AddRef(); - uncompressedTotal += inputStringLength; - compressedTotal += compBufSize; uint8* szCompressedString = new uint8[compBufSize]; SAFE_DELETE_ARRAY(pStringToCompress->TranslatedText.szCompressed); memcpy(szCompressedString, compressionBuffer, compBufSize); @@ -1772,7 +1763,7 @@ bool CLocalizedStringsManager::LocalizeString_s(const AZStd::string& sString, AZ bool CLocalizedStringsManager::LocalizeStringInternal(const char* pStr, size_t len, AZStd::string& outLocalizedString, bool bEnglish) { assert (m_pLanguage); - if (m_pLanguage == 0) + if (m_pLanguage == nullptr) { CryWarning(VALIDATOR_MODULE_SYSTEM, VALIDATOR_WARNING, "LocalizeString: No language set."); outLocalizedString.assign(pStr, pStr + len); @@ -2656,7 +2647,7 @@ void CLocalizedStringsManager::LocalizeTime(time_t t, bool bMakeLocalTime, bool { struct tm thetime; localtime_s(&thetime, &t); - t = gEnv->pTimer->DateToSecondsUTC(thetime); + t = DateToSecondsUTC(thetime); } outTimeString.clear(); LCID lcID = g_currentLanguageID.lcID ? g_currentLanguageID.lcID : LOCALE_USER_DEFAULT; @@ -2680,7 +2671,7 @@ void CLocalizedStringsManager::LocalizeDate(time_t t, bool bMakeLocalTime, bool { struct tm thetime; localtime_s(&thetime, &t); - t = gEnv->pTimer->DateToSecondsUTC(thetime); + t = DateToSecondsUTC(thetime); } outDateString.resize(0); LCID lcID = g_currentLanguageID.lcID ? g_currentLanguageID.lcID : LOCALE_USER_DEFAULT; diff --git a/Code/Legacy/CrySystem/Log.cpp b/Code/Legacy/CrySystem/Log.cpp index c08d5870e9..2b2fa65dda 100644 --- a/Code/Legacy/CrySystem/Log.cpp +++ b/Code/Legacy/CrySystem/Log.cpp @@ -22,6 +22,7 @@ #include #include #include +#include #ifdef WIN32 #include @@ -503,7 +504,8 @@ void CLog::LogV(const ELogType type, [[maybe_unused]]int flags, const char* szFo { const int sz = sizeof(m_history) / sizeof(m_history[0]); int i, j; - float time = m_pSystem->GetITimer()->GetCurrTime(); + const AZ::TimeMs realTimeMs = AZ::GetRealElapsedTimeMs(); + const float time = AZ::TimeMsToSeconds(realTimeMs); for (i = m_iLastHistoryItem, j = 0; m_history[i].time > time - dt && j < sz; j++, i = i - 1 & sz - 1) { if (m_history[i].type != type) @@ -908,7 +910,7 @@ void CLog::LogStringToFile(const char* szString, ELogType logType, bool bAdd, [[ } #endif - if (m_pLogIncludeTime && gEnv && gEnv->pTimer) + if (m_pLogIncludeTime) { uint32 dwCVarState = m_pLogIncludeTime->GetIVal(); // char szTemp[MAX_TEMP_LENGTH_SIZE]; @@ -933,12 +935,12 @@ void CLog::LogStringToFile(const char* szString, ELogType logType, bool bAdd, [[ } else if (dwCVarState == 2) // Log_IncludeTime { - static CTimeValue lasttime; - CTimeValue currenttime = gEnv->pTimer->GetAsyncTime(); - if (lasttime != CTimeValue()) + static AZ::TimeMs lasttime = AZ::Time::ZeroTimeMs; + const AZ::TimeMs currenttime = AZ::GetRealElapsedTimeMs(); + if (lasttime != AZ::Time::ZeroTimeMs) { timeStr.clear(); - uint32 dwMs = (uint32)((currenttime - lasttime).GetMilliSeconds()); + uint32 dwMs = aznumeric_cast(currenttime - lasttime); timeStr = AZStd::string::format("<%3d.%.3d>: ", dwMs / 1000, dwMs % 1000); tempString = timeStr + tempString; } @@ -960,12 +962,12 @@ void CLog::LogStringToFile(const char* szString, ELogType logType, bool bAdd, [[ #endif tempString = LogStringType(sTime) + tempString; - static CTimeValue lasttime; - CTimeValue currenttime = gEnv->pTimer->GetAsyncTime(); - if (lasttime != CTimeValue()) + static AZ::TimeMs lasttime = AZ::Time::ZeroTimeMs; + const AZ::TimeMs currenttime = AZ::GetRealElapsedTimeMs(); + if (lasttime != AZ::Time::ZeroTimeMs) { timeStr.clear(); - uint32 dwMs = (uint32)((currenttime - lasttime).GetMilliSeconds()); + uint32 dwMs = (uint32)(currenttime - lasttime); timeStr = AZStd::string::format("<%3d.%.3d>: ", dwMs / 1000, dwMs % 1000); tempString = timeStr + tempString; } @@ -975,22 +977,19 @@ void CLog::LogStringToFile(const char* szString, ELogType logType, bool bAdd, [[ { static bool bFirst = true; - if (gEnv->pTimer) + static AZ::TimeMs lasttime = AZ::Time::ZeroTimeMs; + const AZ::TimeMs currenttime = AZ::GetRealElapsedTimeMs(); + if (lasttime != AZ::Time::ZeroTimeMs) { - static CTimeValue lasttime; - CTimeValue currenttime = gEnv->pTimer->GetAsyncTime(); - if (lasttime != CTimeValue()) - { - timeStr.clear(); - uint32 dwMs = (uint32)((currenttime - lasttime).GetMilliSeconds()); - timeStr = AZStd::string::format("<%3d.%.3d>: ", dwMs / 1000, dwMs % 1000); - tempString = timeStr + tempString; - } - if (bFirst) - { - lasttime = currenttime; - bFirst = false; - } + timeStr.clear(); + uint32 dwMs = (uint32)(currenttime - lasttime); + timeStr = AZStd::string::format("<%3d.%.3d>: ", dwMs / 1000, dwMs % 1000); + tempString = timeStr + tempString; + } + if (bFirst) + { + lasttime = currenttime; + bFirst = false; } } else if (dwCVarState == 5) // Log_IncludeTime @@ -1465,9 +1464,10 @@ void CLog::Update() if (LogCVars::s_log_tick != 0) { - static CTimeValue t0 = GetISystem()->GetITimer()->GetAsyncTime(); - CTimeValue t1 = GetISystem()->GetITimer()->GetAsyncTime(); - if (fabs((t1 - t0).GetSeconds()) > LogCVars::s_log_tick) + static AZ::TimeUs t0 = AZ::GetElapsedTimeUs(); + const AZ::TimeUs t1 = AZ::GetElapsedTimeUs(); + const float tSec = AZ::TimeUsToSeconds(t1 - t0); + if (tSec > LogCVars::s_log_tick) { t0 = t1; diff --git a/Code/Legacy/CrySystem/RemoteConsole/RemoteConsole.h b/Code/Legacy/CrySystem/RemoteConsole/RemoteConsole.h index 23edafa736..f075dd2c17 100644 --- a/Code/Legacy/CrySystem/RemoteConsole/RemoteConsole.h +++ b/Code/Legacy/CrySystem/RemoteConsole/RemoteConsole.h @@ -15,7 +15,7 @@ #include #include -#if !defined(RELEASE) || defined(RELEASE_LOGGING) || defined(ENABLE_PROFILING_CODE) +#if (!defined(RELEASE) || defined(RELEASE_LOGGING) || defined(ENABLE_PROFILING_CODE)) && !defined(AZ_LEGACY_CRYSYSTEM_TRAIT_REMOTE_CONSOLE_UNSUPPORTED) #define USE_REMOTE_CONSOLE struct SRemoteServer; diff --git a/Code/Legacy/CrySystem/RemoteConsole/RemoteConsole_none.inl b/Code/Legacy/CrySystem/RemoteConsole/RemoteConsole_none.inl index faf928a377..ae96fc112a 100644 --- a/Code/Legacy/CrySystem/RemoteConsole/RemoteConsole_none.inl +++ b/Code/Legacy/CrySystem/RemoteConsole/RemoteConsole_none.inl @@ -41,17 +41,17 @@ void CRemoteConsole::Stop() } ///////////////////////////////////////////////////////////////////////////////////////////// -void CRemoteConsole::AddLogMessage(const char* log) +void CRemoteConsole::AddLogMessage(const char*) { } ///////////////////////////////////////////////////////////////////////////////////////////// -void CRemoteConsole::AddLogWarning(const char* log) +void CRemoteConsole::AddLogWarning(const char*) { } ///////////////////////////////////////////////////////////////////////////////////////////// -void CRemoteConsole::AddLogError(const char* log) +void CRemoteConsole::AddLogError(const char*) { } @@ -61,11 +61,11 @@ void CRemoteConsole::Update() } ///////////////////////////////////////////////////////////////////////////////////////////// -void CRemoteConsole::RegisterListener(IRemoteConsoleListener* pListener, const char* name) +void CRemoteConsole::RegisterListener(IRemoteConsoleListener*, const char*) { } ///////////////////////////////////////////////////////////////////////////////////////////// -void CRemoteConsole::UnregisterListener(IRemoteConsoleListener* pListener) +void CRemoteConsole::UnregisterListener(IRemoteConsoleListener*) { } diff --git a/Code/Legacy/CrySystem/System.cpp b/Code/Legacy/CrySystem/System.cpp index 2e18e13841..7cf066f72e 100644 --- a/Code/Legacy/CrySystem/System.cpp +++ b/Code/Legacy/CrySystem/System.cpp @@ -16,7 +16,7 @@ #include #include #include -#include "CryLibrary.h" +#include #include #include #include @@ -25,15 +25,16 @@ #include #include #include -#include #include #include #include #include +#include #include #include #include +AZ_DEFINE_BUDGET(CrySystem); #if defined(AZ_RESTRICTED_PLATFORM) #undef AZ_RESTRICTED_SECTION @@ -116,7 +117,6 @@ LRESULT WINAPI WndProc(HWND hWnd, UINT uMsg, WPARAM wParam, LPARAM lParam) #include #include #include -#include #include @@ -129,7 +129,6 @@ LRESULT WINAPI WndProc(HWND hWnd, UINT uMsg, WPARAM wParam, LPARAM lParam) #include "LocalizedStringManager.h" #include "XML/XmlUtils.h" #include "SystemEventDispatcher.h" -#include "HMDBus.h" #include "RemoteConsole/RemoteConsole.h" @@ -143,9 +142,6 @@ LRESULT WINAPI WndProc(HWND hWnd, UINT uMsg, WPARAM wParam, LPARAM lParam) #include -// To enable profiling with vtune (https://software.intel.com/en-us/intel-vtune-amplifier-xe), make sure the line below is not commented out -//#define PROFILE_WITH_VTUNE - #include #include #endif @@ -154,19 +150,23 @@ LRESULT WINAPI WndProc(HWND hWnd, UINT uMsg, WPARAM wParam, LPARAM lParam) #include -// profilers api. -VTuneFunction VTResume = NULL; -VTuneFunction VTPause = NULL; - // Define global cvars. SSystemCVars g_cvars; -#include - #include #include #include "AZCoreLogSink.h" +namespace +{ + float GetMovieFrameDeltaTime() + { + // Use GetRealTickDeltaTimeUs for CryMovie, because it should not be affected by pausing game time + const AZ::TimeUs delta = AZ::GetRealTickDeltaTimeUs(); + return AZ::TimeUsToSeconds(delta); + } +} + ///////////////////////////////////////////////////////////////////////////////// // System Implementation. ////////////////////////////////////////////////////////////////////////// @@ -203,47 +203,23 @@ CSystem::CSystem(SharedEnvironmentInstance* pSharedEnvironment) ////////////////////////////////////////////////////////////////////////// // Initialize global environment interface pointers. m_env.pSystem = this; - m_env.pTimer = &m_Time; m_env.bIgnoreAllAsserts = false; m_env.bNoAssertDialog = false; m_env.pSharedEnvironment = pSharedEnvironment; ////////////////////////////////////////////////////////////////////////// - m_pIFont = NULL; - m_pIFontUi = NULL; - m_rWidth = NULL; - m_rHeight = NULL; - m_rWidthAndHeightAsFractionOfScreenSize = NULL; - m_rMaxWidth = NULL; - m_rMaxHeight = NULL; - m_rColorBits = NULL; - m_rDepthBits = NULL; - m_cvSSInfo = NULL; - m_rStencilBits = NULL; - m_rFullscreen = NULL; m_sysNoUpdate = NULL; - m_pProcess = NULL; m_pCmdLine = NULL; m_pLevelSystem = NULL; - m_pViewSystem = NULL; m_pLocalizationManager = NULL; #if defined(AZ_RESTRICTED_PLATFORM) #define AZ_RESTRICTED_SECTION SYSTEM_CPP_SECTION_2 #include AZ_RESTRICTED_FILE(System_cpp) #endif - m_sys_min_step = 0; - m_sys_max_step = 0; - - m_cvAIUpdate = NULL; m_pUserCallback = NULL; - m_sys_memory_debug = NULL; - m_sysWarnings = NULL; - m_sysKeyboard = NULL; m_sys_firstlaunch = NULL; - m_sys_enable_budgetmonitoring = NULL; - m_sys_preload = NULL; // m_sys_filecache = NULL; m_gpu_particle_physics = NULL; @@ -258,22 +234,11 @@ CSystem::CSystem(SharedEnvironmentInstance* pSharedEnvironment) m_bNoCrashDialog = false; m_bNoErrorReportWindow = false; - m_pCVarQuit = NULL; - - m_bForceNonDevMode = false; - m_bWasInDevMode = false; m_bInDevMode = false; m_bGameFolderWritable = false; - m_bDrawConsole = true; - m_bDrawUI = true; - - m_nServerConfigSpec = CONFIG_VERYHIGH_SPEC; - m_nMaxConfigSpec = CONFIG_VERYHIGH_SPEC; - m_bPaused = false; m_bNoUpdate = false; - m_nUpdateCounter = 0; m_iApplicationInstance = -1; @@ -295,7 +260,6 @@ CSystem::CSystem(SharedEnvironmentInstance* pSharedEnvironment) m_bHasRenderedErrorMessage = false; - m_pDataProbe = nullptr; #if AZ_LEGACY_CRYSYSTEM_TRAIT_USE_MESSAGE_HANDLER RegisterWindowMessageHandler(this); #endif @@ -341,48 +305,15 @@ void CSystem::Release() delete this; } -////////////////////////////////////////////////////////////////////////// -void CSystem::FreeLib(AZStd::unique_ptr& hLibModule) -{ - if (hLibModule) - { - if (hLibModule->IsLoaded()) - { - hLibModule->Unload(); - } - hLibModule.release(); - } -} - ////////////////////////////////////////////////////////////////////////// IRemoteConsole* CSystem::GetIRemoteConsole() { return CRemoteConsole::GetInst(); } -////////////////////////////////////////////////////////////////////////// -void CSystem::SetForceNonDevMode(const bool bValue) -{ - m_bForceNonDevMode = bValue; - if (bValue) - { - SetDevMode(false); - } -} - -////////////////////////////////////////////////////////////////////////// -bool CSystem::GetForceNonDevMode() const -{ - return m_bForceNonDevMode; -} - ////////////////////////////////////////////////////////////////////////// void CSystem::SetDevMode(bool bEnable) { - if (bEnable) - { - m_bWasInDevMode = true; - } m_bInDevMode = bEnable; } @@ -442,23 +373,12 @@ void CSystem::ShutDown() m_pSystemEventDispatcher->OnSystemEvent(ESYSTEM_EVENT_FULL_SHUTDOWN, 0, 0); } - // Shutdown any running VR devices. - EBUS_EVENT(AZ::VR::HMDInitRequestBus, Shutdown); - - if (gEnv && gEnv->pLyShine) - { - gEnv->pLyShine->Release(); - gEnv->pLyShine = nullptr; - } - SAFE_RELEASE(m_env.pMovieSystem); - SAFE_RELEASE(m_env.pLyShine); SAFE_RELEASE(m_env.pCryFont); if (m_env.pConsole) { ((CXConsole*)m_env.pConsole)->FreeRenderResources(); } - SAFE_RELEASE(m_pViewSystem); SAFE_RELEASE(m_pLevelSystem); if (m_env.pLog) @@ -470,31 +390,13 @@ void CSystem::ShutDown() // Release console variables. - SAFE_RELEASE(m_pCVarQuit); - SAFE_RELEASE(m_rWidth); - SAFE_RELEASE(m_rHeight); - SAFE_RELEASE(m_rWidthAndHeightAsFractionOfScreenSize); - SAFE_RELEASE(m_rMaxWidth); - SAFE_RELEASE(m_rMaxHeight); - SAFE_RELEASE(m_rColorBits); - SAFE_RELEASE(m_rDepthBits); - SAFE_RELEASE(m_cvSSInfo); - SAFE_RELEASE(m_rStencilBits); - SAFE_RELEASE(m_rFullscreen); - - SAFE_RELEASE(m_sysWarnings); - SAFE_RELEASE(m_sysKeyboard); SAFE_RELEASE(m_sys_firstlaunch); - SAFE_RELEASE(m_sys_enable_budgetmonitoring); #if defined(AZ_RESTRICTED_PLATFORM) #define AZ_RESTRICTED_SECTION SYSTEM_CPP_SECTION_3 #include AZ_RESTRICTED_FILE(System_cpp) #endif - SAFE_RELEASE(m_sys_min_step); - SAFE_RELEASE(m_sys_max_step); - SAFE_DELETE(m_pLocalizationManager); delete m_pCmdLine; @@ -516,8 +418,6 @@ void CSystem::ShutDown() ShutdownFileSystem(); - ShutdownModuleLibraries(); - EBUS_EVENT(CrySystemEventBus, OnCrySystemPostShutdown); } @@ -564,14 +464,6 @@ bool CSystem::IsQuitting() const return wasExitMainLoopRequested; } -////////////////////////////////////////////////////////////////////////// -void CSystem::SetIProcess(IProcess* process) -{ - m_pProcess = process; - //if (m_pProcess) - //m_pProcess->SetPMessage(""); -} - ////////////////////////////////////////////////////////////////////////// ISystem* CSystem::GetCrySystem() { @@ -581,14 +473,15 @@ ISystem* CSystem::GetCrySystem() ////////////////////////////////////////////////////////////////////////// void CSystem::SleepIfNeeded() { - ITimer* const pTimer = gEnv->pTimer; static bool firstCall = true; typedef MiniQueue PrevNow; static PrevNow prevNow; if (firstCall) { - m_lastTickTime = pTimer->GetAsyncTime(); + const AZ::TimeMs timeMs = AZ::GetRealElapsedTimeMs(); + const double timeSec = AZ::TimeMsToSecondsDouble(timeMs); + m_lastTickTime = CTimeValue(timeSec); prevNow.Push(m_lastTickTime); firstCall = false; return; @@ -596,8 +489,10 @@ void CSystem::SleepIfNeeded() const float maxRate = m_svDedicatedMaxRate->GetFVal(); const float minTime = 1.0f / maxRate; - CTimeValue now = pTimer->GetAsyncTime(); - float elapsed = (now - m_lastTickTime).GetSeconds(); + const AZ::TimeMs nowTimeMs = AZ::GetRealElapsedTimeMs(); + const double nowTimeSec = AZ::TimeMsToSecondsDouble(nowTimeMs); + const CTimeValue now = CTimeValue(nowTimeSec); + const float elapsed = (now - m_lastTickTime).GetSeconds(); if (prevNow.Full()) { @@ -609,7 +504,9 @@ void CSystem::SleepIfNeeded() if (elapsed > minTime && allowStallCatchup) { allowStallCatchup = false; - m_lastTickTime = pTimer->GetAsyncTime(); + const AZ::TimeMs lastTimeMs = AZ::GetRealElapsedTimeMs(); + const double lastTimeSec = AZ::TimeMsToSecondsDouble(lastTimeMs); + m_lastTickTime = CTimeValue(lastTimeSec); return; } allowStallCatchup = true; @@ -621,11 +518,13 @@ void CSystem::SleepIfNeeded() int sleepMS = (int)(1000.0f * sleepTime + 0.5f); if (sleepMS > 0) { - AZ_PROFILE_FUNCTION(System); + AZ_PROFILE_FUNCTION(CrySystem); Sleep(sleepMS); } - m_lastTickTime = pTimer->GetAsyncTime(); + const AZ::TimeMs lastTimeMs = AZ::GetRealElapsedTimeMs(); + const double lastTimeSec = AZ::TimeMsToSecondsDouble(lastTimeMs); + m_lastTickTime = CTimeValue(lastTimeSec); } extern DWORD g_idDebugThreads[]; @@ -658,9 +557,8 @@ bool CSystem::UpdatePreTickBus(int updateFlags, int nPauseMode) _mm_setcsr(_mm_getcsr() & ~0x280 | (g_cvars.sys_float_exceptions > 0 ? 0 : 0x280)); #endif //WIN32 - AZ_TRACE_METHOD(); + AZ_PROFILE_FUNCTION(CrySystem); - m_nUpdateCounter++; #ifndef EXCLUDE_UPDATE_ON_CONSOLE if (m_pUserCallback) { @@ -697,31 +595,6 @@ bool CSystem::UpdatePreTickBus(int updateFlags, int nPauseMode) m_bPaused = false; } -#ifdef PROFILE_WITH_VTUNE - if (m_bInDevMode) - { - if (VTPause != NULL && VTResume != NULL) - { - static bool bVtunePaused = true; - - const AzFramework::InputChannel* inputChannelScrollLock = AzFramework::InputChannelRequests::FindInputChannel(AzFramework::InputDeviceKeyboard::Key::WindowsSystemScrollLock); - const bool bPaused = (inputChannelScrollLock ? inputChannelScrollLock->IsActive() : false); - - { - if (bVtunePaused && !bPaused) - { - GetIProfilingSystem()->VTuneResume(); - } - if (!bVtunePaused && bPaused) - { - GetIProfilingSystem()->VTunePause(); - } - bVtunePaused = bPaused; - } - } - } -#endif //PROFILE_WITH_VTUNE - #ifndef EXCLUDE_UPDATE_ON_CONSOLE if (m_bIgnoreUpdates) { @@ -777,24 +650,21 @@ bool CSystem::UpdatePreTickBus(int updateFlags, int nPauseMode) if (maxFPS > 0 && vSync == 0) { - CTimeValue timeFrameMax; const float safeMarginFPS = 0.5f;//save margin to not drop below 30 fps - static CTimeValue sTimeLast = gEnv->pTimer->GetAsyncTime(); - timeFrameMax.SetMilliSeconds((int64)(1000.f / ((float)maxFPS + safeMarginFPS))); - const CTimeValue timeLast = timeFrameMax + sTimeLast; - while (timeLast.GetValue() > gEnv->pTimer->GetAsyncTime().GetValue()) + static AZ::TimeMs sTimeLast = AZ::GetRealElapsedTimeMs(); + const AZ::TimeMs timeFrameMax(static_cast( + (int64)(1000.f / ((float)maxFPS + safeMarginFPS)) + )); + const AZ::TimeMs timeLast = timeFrameMax + sTimeLast; + while (timeLast > AZ::GetRealElapsedTimeMs()) { CrySleep(0); } - sTimeLast = gEnv->pTimer->GetAsyncTime(); + sTimeLast = AZ::GetRealElapsedTimeMs(); } } } - ////////////////////////////////////////////////////////////////////// - //update time subsystem - m_Time.UpdateOnFrameStart(); - ////////////////////////////////////////////////////////////////////// //update console system if (m_env.pConsole) @@ -808,13 +678,10 @@ bool CSystem::UpdatePreTickBus(int updateFlags, int nPauseMode) return false; } - // Use UI timer for CryMovie, because it should not be affected by pausing game time - const float fMovieFrameTime = m_Time.GetFrameTime(ITimer::ETIMER_UI); - // Run movie system pre-update if (!bNoUpdate) { - UpdateMovieSystem(updateFlags, fMovieFrameTime, true); + UpdateMovieSystem(updateFlags, GetMovieFrameDeltaTime(), true); } return !IsQuitting(); @@ -823,13 +690,14 @@ bool CSystem::UpdatePreTickBus(int updateFlags, int nPauseMode) ////////////////////////////////////////////////////////////////////// bool CSystem::UpdatePostTickBus(int updateFlags, int /*nPauseMode*/) { - CTimeValue updateStart = gEnv->pTimer->GetAsyncTime(); + const AZ::TimeMs updateStartTimeMs = AZ::GetRealElapsedTimeMs(); + const double updateStartTimeSec = AZ::TimeMsToSecondsDouble(updateStartTimeMs); + const CTimeValue updateStart(updateStartTimeSec); // Run movie system post-update if (!m_bNoUpdate) { - const float fMovieFrameTime = m_Time.GetFrameTime(ITimer::ETIMER_UI); - UpdateMovieSystem(updateFlags, fMovieFrameTime, false); + UpdateMovieSystem(updateFlags, GetMovieFrameDeltaTime(), false); } ////////////////////////////////////////////////////////////////////// @@ -840,7 +708,9 @@ bool CSystem::UpdatePostTickBus(int updateFlags, int /*nPauseMode*/) } //Now update frame statistics - CTimeValue cur_time = gEnv->pTimer->GetAsyncTime(); + const AZ::TimeMs curTimeMs = AZ::GetRealElapsedTimeMs(); + const double curTimeSec = AZ::TimeMsToSecondsDouble(curTimeMs); + const CTimeValue cur_time(curTimeSec); CTimeValue a_second(g_cvars.sys_update_profile_time); std::vector< std::pair >::iterator it = m_updateTimes.begin(); @@ -981,13 +851,16 @@ void CSystem::Warning(EValidatorModule module, EValidatorSeverity severity, int } ////////////////////////////////////////////////////////////////////////// -int CSystem::ShowMessage(const char* text, const char* caption, unsigned int uType) +void CSystem::ShowMessage(const char* text, const char* caption, unsigned int uType) { if (m_pUserCallback) { - return m_pUserCallback->ShowMessage(text, caption, uType); + m_pUserCallback->ShowMessage(text, caption, uType); + } + else + { + CryMessageBox(text, caption, uType); } - return CryMessageBox(text, caption, uType); } inline const char* ValidatorModuleToString(EValidatorModule module) @@ -1064,22 +937,18 @@ void CSystem::WarningV(EValidatorModule module, EValidatorSeverity severity, int default: break; } - char szBuffer[MAX_WARNING_LENGTH]; - vsnprintf_s(szBuffer, sizeof(szBuffer), sizeof(szBuffer) - 1, format, args); + + AZStd::fixed_string fmt; + vsnprintf_s(fmt.data(), MAX_WARNING_LENGTH, MAX_WARNING_LENGTH - 1, format, args); if (file && *file) { - AZStd::fixed_string fmt = szBuffer; fmt += " [File="; fmt += file; fmt += "]"; - m_env.pLog->LogWithType(ltype, flags | VALIDATOR_FLAG_SKIP_VALIDATOR, "%s", fmt.c_str()); - } - else - { - m_env.pLog->LogWithType(ltype, flags | VALIDATOR_FLAG_SKIP_VALIDATOR, "%s", szBuffer); } + m_env.pLog->LogWithType(ltype, flags | VALIDATOR_FLAG_SKIP_VALIDATOR, "%s", fmt.c_str()); if (bDbgBreak && g_cvars.sys_error_debugbreak) { @@ -1164,34 +1033,6 @@ ILocalizationManager* CSystem::GetLocalizationManager() return m_pLocalizationManager; } -////////////////////////////////////////////////////////////////////////// -void CSystem::debug_GetCallStackRaw(void** callstack, uint32& callstackLength) -{ - memset(callstack, 0, sizeof(void*) * callstackLength); - -#if !defined(ANDROID) - callstackLength = 0; -#endif - -#if AZ_LEGACY_CRYSYSTEM_TRAIT_CAPTURESTACK - uint32 nNumStackFramesToSkip = 1; - uint32 callstackCapacity = callstackLength; - if (callstackCapacity > 0x40) - { - callstackCapacity = 0x40; - } - callstackLength = RtlCaptureStackBackTrace(nNumStackFramesToSkip, callstackCapacity, callstack, NULL); -#elif defined(AZ_RESTRICTED_PLATFORM) -#define AZ_RESTRICTED_SECTION SYSTEM_CPP_SECTION_7 -#include AZ_RESTRICTED_FILE(System_cpp) -#endif - - if (callstackLength > 0) - { - std::reverse(callstack, callstack + callstackLength); - } -} - ////////////////////////////////////////////////////////////////////////// void CSystem::ExecuteCommandLine(bool deferred) { @@ -1230,12 +1071,6 @@ void CSystem::ExecuteCommandLine(bool deferred) //gEnv->pConsole->ExecuteString("sys_RestoreSpec test*"); // to get useful debugging information about current spec settings to the log file } -////////////////////////////////////////////////////////////////////////// -ESystemConfigSpec CSystem::GetMaxConfigSpec() const -{ - return m_nMaxConfigSpec; -} - ////////////////////////////////////////////////////////////////////////// void CSystem::SetConfigPlatform(const ESystemConfigPlatform platform) { @@ -1255,30 +1090,6 @@ CPNoise3* CSystem::GetNoiseGen() return &m_pNoiseGen; } -////////////////////////////////////////////////////////////////////////// -void CProfilingSystem::VTuneResume() -{ -#ifdef PROFILE_WITH_VTUNE - if (VTResume) - { - CryLogAlways("VTune Resume"); - VTResume(); - } -#endif -} - -////////////////////////////////////////////////////////////////////////// -void CProfilingSystem::VTunePause() -{ -#ifdef PROFILE_WITH_VTUNE - if (VTPause) - { - VTPause(); - CryLogAlways("VTune Pause"); - } -#endif -} - ////////////////////////////////////////////////////////////////////// void CSystem::OnLanguageCVarChanged(ICVar* language) { @@ -1433,19 +1244,16 @@ const char* CSystem::GetSystemGlobalStateName(const ESystemGlobalState systemGlo void CSystem::SetSystemGlobalState(const ESystemGlobalState systemGlobalState) { - static CTimeValue s_startTime = CTimeValue(); + static AZ::TimeMs s_startTime = AZ::Time::ZeroTimeMs; if (systemGlobalState != m_systemGlobalState) { - if (gEnv && gEnv->pTimer) - { - const CTimeValue endTime = gEnv->pTimer->GetAsyncTime(); - [[maybe_unused]] const float numSeconds = endTime.GetDifferenceInSeconds(s_startTime); - CryLog("SetGlobalState %d->%d '%s'->'%s' %3.1f seconds", - m_systemGlobalState, systemGlobalState, - CSystem::GetSystemGlobalStateName(m_systemGlobalState), CSystem::GetSystemGlobalStateName(systemGlobalState), - numSeconds); - s_startTime = gEnv->pTimer->GetAsyncTime(); - } + const AZ::TimeMs endTime = AZ::GetRealElapsedTimeMs(); + [[maybe_unused]] const double numSeconds = AZ::TimeMsToSecondsDouble(endTime - s_startTime); + CryLog("SetGlobalState %d->%d '%s'->'%s' %3.1f seconds", + m_systemGlobalState, systemGlobalState, + CSystem::GetSystemGlobalStateName(m_systemGlobalState), CSystem::GetSystemGlobalStateName(systemGlobalState), + numSeconds); + s_startTime = AZ::GetRealElapsedTimeMs(); } m_systemGlobalState = systemGlobalState; @@ -1457,23 +1265,6 @@ void CSystem::SetSystemGlobalState(const ESystemGlobalState systemGlobalState) #endif // if AZ_LOADSCREENCOMPONENT_ENABLED } -////////////////////////////////////////////////////////////////////////// -void* CSystem::GetRootWindowMessageHandler() -{ -#if defined(AZ_RESTRICTED_PLATFORM) - #define AZ_RESTRICTED_SECTION SYSTEM_CPP_SECTION_9 - #include AZ_RESTRICTED_FILE(System_cpp) -#endif -#if defined(AZ_RESTRICTED_SECTION_IMPLEMENTED) -#undef AZ_RESTRICTED_SECTION_IMPLEMENTED -#elif defined(WIN32) - return reinterpret_cast(&WndProc); -#else - CRY_ASSERT(false && "This platform does not support window message handlers"); - return NULL; -#endif -} - ////////////////////////////////////////////////////////////////////////// void CSystem::RegisterWindowMessageHandler(IWindowMessageHandler* pHandler) { @@ -1657,16 +1448,6 @@ bool CSystem::HandleMessage([[maybe_unused]] HWND hWnd, UINT uMsg, WPARAM wParam #endif -std::shared_ptr CSystem::CreateLocalFileIO() -{ - return std::make_shared(); -} - -IViewSystem* CSystem::GetIViewSystem() -{ - return m_pViewSystem; -} - ILevelSystem* CSystem::GetILevelSystem() { return m_pLevelSystem; diff --git a/Code/Legacy/CrySystem/System.h b/Code/Legacy/CrySystem/System.h index a3a0f12278..664f5385fa 100644 --- a/Code/Legacy/CrySystem/System.h +++ b/Code/Legacy/CrySystem/System.h @@ -13,7 +13,6 @@ #include #include -#include "Timer.h" #include #include "CmdLine.h" @@ -23,6 +22,8 @@ #include #include +#include + #include #include @@ -77,18 +78,11 @@ class CWatchdogThread; #if defined(WIN32) #define AZ_LEGACY_CRYSYSTEM_TRAIT_USE_MESSAGE_HANDLER 1 #endif -#if defined(WIN64) || defined(WIN32) -#define AZ_LEGACY_CRYSYSTEM_TRAIT_CAPTURESTACK 1 -#endif ////////////////////////////////////////////////////////////////////////// #endif -#if defined(LINUX) - #include "CryLibrary.h" -#endif - #ifdef WIN32 using WIN_HMODULE = void*; #else @@ -101,34 +95,12 @@ namespace Audio struct IAudioSystem; struct IMusicSystem; } // namespace Audio -struct IDataProbe; #define PHSYICS_OBJECT_ENTITY 0 -using VTuneFunction = void (__cdecl *)(void); -extern VTuneFunction VTResume; -extern VTuneFunction VTPause; - -#define MAX_STREAMING_POOL_INDEX 6 -#define MAX_THREAD_POOL_INDEX 6 - struct SSystemCVars { - int sys_streaming_requests_grouping_time_period; - int sys_streaming_sleep; - int sys_streaming_memory_budget; - int sys_streaming_max_finalize_per_frame; - float sys_streaming_max_bandwidth; - int sys_streaming_cpu; - int sys_streaming_cpu_worker; - int sys_streaming_debug; - int sys_streaming_resetstats; - int sys_streaming_debug_filter; - float sys_streaming_debug_filter_min_time; - int sys_streaming_use_optical_drive_thread; - ICVar* sys_streaming_debug_filter_file_name; ICVar* sys_localization_folder; - int sys_streaming_in_blocks; int sys_float_exceptions; int sys_no_crash_dialog; @@ -136,54 +108,21 @@ struct SSystemCVars int sys_dump_aux_threads; int sys_WER; int sys_dump_type; - int sys_ai; - int sys_entitysystem; int sys_trackview; - int sys_vtune; float sys_update_profile_time; - int sys_limit_phys_thread_count; int sys_MaxFPS; float sys_maxTimeStepForMovieSystem; - int sys_force_installtohdd_mode; int sys_report_files_not_found_in_paks = 0; -#ifdef USE_HTTP_WEBSOCKETS - int sys_simple_http_base_port; -#endif - int sys_asserts; int sys_error_debugbreak; - int sys_FilesystemCaseSensitivity; - AZ::IO::ArchiveVars archiveVars; - -#if defined(WIN32) - int sys_display_threads; -#elif defined(AZ_RESTRICTED_PLATFORM) -#define AZ_RESTRICTED_SECTION SYSTEM_H_SECTION_2 -#include AZ_RESTRICTED_FILE(System_h) -#endif }; extern SSystemCVars g_cvars; class CSystem; -struct CProfilingSystem - : public IProfilingSystem -{ - ////////////////////////////////////////////////////////////////////////// - // VTune Profiling interface. - - // Summary: - // Resumes vtune data collection. - void VTuneResume() override; - // Summary: - // Pauses vtune data collection. - void VTunePause() override; - ////////////////////////////////////////////////////////////////////////// -}; - class AssetSystem; /* @@ -246,12 +185,10 @@ public: void Quit() override; bool IsQuitting() const override; void ShutdownFileSystem(); // used to cleanup any file resources, such as cache handle. - void SetAffinity(); const char* GetUserName() override; int GetApplicationInstance() override; int GetApplicationLogInstance(const char* logFilePath) override; - ITimer* GetITimer() override{ return m_env.pTimer; } AZ::IO::IArchive* GetIPak() override { return m_env.pCryPak; }; IConsole* GetIConsole() override { return m_env.pConsole; }; IRemoteConsole* GetIRemoteConsole() override; @@ -259,16 +196,13 @@ public: ICryFont* GetICryFont() override{ return m_env.pCryFont; } ILog* GetILog() override{ return m_env.pLog; } ICmdLine* GetICmdLine() override{ return m_pCmdLine; } - IViewSystem* GetIViewSystem() override; ILevelSystem* GetILevelSystem() override; ISystemEventDispatcher* GetISystemEventDispatcher() override { return m_pSystemEventDispatcher; } - IProfilingSystem* GetIProfilingSystem() override { return &m_ProfilingSystem; } ////////////////////////////////////////////////////////////////////////// // retrieves the perlin noise singleton instance CPNoise3* GetNoiseGen() override; - uint64 GetUpdateCounter() override { return m_nUpdateCounter; }; - void DetectGameFolderAccessRights(); + void DetectGameFolderAccessRights(); void ExecuteCommandLine(bool deferred=true) override; @@ -283,9 +217,6 @@ public: void IgnoreUpdates(bool bIgnore) override { m_bIgnoreUpdates = bIgnore; }; - void SetIProcess(IProcess* process) override; - IProcess* GetIProcess() override{ return m_pProcess; } - bool IsTestMode() const override { return m_bTestMode; } //@} @@ -296,7 +227,7 @@ public: // Validator Warning. void WarningV(EValidatorModule module, EValidatorSeverity severity, int flags, const char* file, const char* format, va_list args) override; void Warning(EValidatorModule module, EValidatorSeverity severity, int flags, const char* file, const char* format, ...) override; - int ShowMessage(const char* text, const char* caption, unsigned int uType) override; + void ShowMessage(const char* text, const char* caption, unsigned int uType) override; bool CheckLogVerbosity(int verbosity) override; //! Return pointer to user defined callback. @@ -305,7 +236,6 @@ public: ////////////////////////////////////////////////////////////////////////// void SaveConfiguration() override; void LoadConfiguration(const char* sFilename, ILoadConfigurationEntrySink* pSink = nullptr, bool warnIfMissing = true) override; - ESystemConfigSpec GetMaxConfigSpec() const override; ESystemConfigPlatform GetConfigPlatform() const override; void SetConfigPlatform(ESystemConfigPlatform platform) override; ////////////////////////////////////////////////////////////////////////// @@ -315,21 +245,15 @@ public: ILocalizationManager* GetLocalizationManager() override; void debug_GetCallStack(const char** pFunctions, int& nCount) override; void debug_LogCallStack(int nMaxFuncs = 32, int nFlags = 0) override; - // Get the current callstack in raw address form (more lightweight than the above functions) - // static as memReplay needs it before CSystem has been setup - expose a ISystem interface to this function if you need it outside CrySystem - static void debug_GetCallStackRaw(void** callstack, uint32& callstackLength); public: #if !defined(RELEASE) void SetVersionInfo(const char* const szVersion); #endif - void ShutdownModuleLibraries(); - #if defined(WIN32) friend LRESULT WINAPI WndProc(HWND hWnd, UINT uMsg, WPARAM wParam, LPARAM lParam); #endif - void* GetRootWindowMessageHandler() override; void RegisterWindowMessageHandler(IWindowMessageHandler* pHandler) override; void UnregisterWindowMessageHandler(IWindowMessageHandler* pHandler) override; @@ -344,8 +268,6 @@ private: // Release all resources. void ShutDown(); - bool LoadEngineDLLs(); - //! @name Initialization routines //@{ bool InitConsole(); @@ -361,11 +283,6 @@ private: void CreateSystemVars(); void CreateAudioVars(); - AZStd::unique_ptr LoadDLL(const char* dllName); - - void FreeLib(AZStd::unique_ptr& hLibModule); - - bool UnloadDLL(const char* dllName); void QueryVersionInfo(); void LogVersion(); void LogBuildInfo(); @@ -375,13 +292,10 @@ private: static void SystemVersionChanged(ICVar* pCVar); #endif // #ifndef _RELEASE - bool ReLaunchMediaCenter(); void UpdateAudioSystems(); void AddCVarGroupDirectory(const AZStd::string& sPath) override; - AZStd::unique_ptr LoadDynamiclibrary(const char* dllName) const; - #if defined(AZ_RESTRICTED_PLATFORM) #define AZ_RESTRICTED_SECTION SYSTEM_H_SECTION_3 #include AZ_RESTRICTED_FILE(System_h) @@ -393,14 +307,7 @@ public: void EnableFloatExceptions(int type); // interface ISystem ------------------------------------------- - virtual IDataProbe* GetIDataProbe() { return m_pDataProbe; }; - void SetForceNonDevMode(bool bValue) override; - bool GetForceNonDevMode() const override; - bool WasInDevMode() const override { return m_bWasInDevMode; }; - bool IsDevMode() const override { return m_bInDevMode && !GetForceNonDevMode(); } - - void SetConsoleDrawEnabled(bool enabled) override { m_bDrawConsole = enabled; } - void SetUIDrawEnabled(bool enabled) override { m_bDrawUI = enabled; } + bool IsDevMode() const override { return m_bInDevMode; } // ------------------------------------------------------------- @@ -409,61 +316,33 @@ public: ICVar* attachVariable (const char* szVarName, int* pContainer, const char* szComment, int dwFlags = 0); const CTimeValue& GetLastTickTime() const { return m_lastTickTime; } - const ICVar* GetDedicatedMaxRate() const { return m_svDedicatedMaxRate; } - - std::shared_ptr CreateLocalFileIO() override; private: // ------------------------------------------------------ // System environment. SSystemGlobalEnvironment m_env; - CTimer m_Time; //!< - bool m_bInitializedSuccessfully; //!< true if the system completed all initialization steps - bool m_bRelaunch; //!< relaunching the app or not (true beforerelaunch) - int m_iLoadingMode; //!< Game is loading w/o changing context (0 not, 1 quickloading, 2 full loading) - bool m_bTestMode; //!< If running in testing mode. - bool m_bEditor; //!< If running in Editor. - bool m_bNoCrashDialog; - bool m_bNoErrorReportWindow; - bool m_bPreviewMode; //!< If running in Preview mode. - bool m_bDedicatedServer; //!< If running as Dedicated server. - bool m_bIgnoreUpdates; //!< When set to true will ignore Update and Render calls, - bool m_bForceNonDevMode; //!< true when running on a cheat protected server or a client that is connected to it (not used in singlplayer) - bool m_bWasInDevMode; //!< Set to true if was in dev mode. - bool m_bInDevMode; //!< Set to true if was in dev mode. - bool m_bGameFolderWritable;//!< True when verified that current game folder have write access. - int m_ttMemStatSS; //!< Time to memstat screenshot - bool m_bDrawConsole; //!< Set to true if OK to draw the console. - bool m_bDrawUI; //!< Set to true if OK to draw UI. - - - std::map > m_moduleDLLHandles; - - //! current active process - IProcess* m_pProcess; - - CCamera m_PhysRendererCamera; - ICVar* m_p_draw_helpers_str; - int m_iJumpToPhysProfileEnt; + bool m_bInitializedSuccessfully; //!< true if the system completed all initialization steps + bool m_bRelaunch; //!< relaunching the app or not (true beforerelaunch) + int m_iLoadingMode; //!< Game is loading w/o changing context (0 not, 1 quickloading, 2 full loading) + bool m_bTestMode; //!< If running in testing mode. + bool m_bEditor; //!< If running in Editor. + bool m_bNoCrashDialog; + bool m_bNoErrorReportWindow; + bool m_bPreviewMode; //!< If running in Preview mode. + bool m_bDedicatedServer; //!< If running as Dedicated server. + bool m_bIgnoreUpdates; //!< When set to true will ignore Update and Render calls, + bool m_bInDevMode; //!< Set to true if was in dev mode. + bool m_bGameFolderWritable; //!< True when verified that current game folder have write access. CTimeValue m_lastTickTime; //! system event dispatcher ISystemEventDispatcher* m_pSystemEventDispatcher; - //! The default mono-spaced font for internal usage (profiling, debug info, etc.) - IFFont* m_pIFont; - - //! The default font for end-user UI interfaces - IFFont* m_pIFontUi; - //! System to manage levels. ILevelSystem* m_pLevelSystem; - //! System to manage views. - IViewSystem* m_pViewSystem; - // XML Utils interface. class CXmlUtils* m_pXMLUtils; @@ -479,12 +358,6 @@ private: // ------------------------------------------------------ // System console variables. ////////////////////////////////////////////////////////////////////////// - // DLL names - ICVar* m_sys_dll_response_system; -#if !defined(_RELEASE) - ICVar* m_sys_resource_cache_folder; -#endif - #if AZ_LOADSCREENCOMPONENT_ENABLED ICVar* m_game_load_screen_uicanvas_path; ICVar* m_level_load_screen_uicanvas_path; @@ -498,37 +371,9 @@ private: // ------------------------------------------------------ ICVar* m_level_load_screen_minimum_time{}; #endif // if AZ_LOADSCREENCOMPONENT_ENABLED - ICVar* m_sys_initpreloadpacks; - ICVar* m_sys_menupreloadpacks; - - ICVar* m_cvAIUpdate; - ICVar* m_rWidth; - ICVar* m_rHeight; - ICVar* m_rWidthAndHeightAsFractionOfScreenSize; - ICVar* m_rTabletWidthAndHeightAsFractionOfScreenSize; - ICVar* m_rHDRDolby; - ICVar* m_rMaxWidth; - ICVar* m_rMaxHeight; - ICVar* m_rColorBits; - ICVar* m_rDepthBits; - ICVar* m_rStencilBits; - ICVar* m_rFullscreen; - ICVar* m_rFullscreenWindow; - ICVar* m_rFullscreenNativeRes; - ICVar* m_rDisplayInfo; - ICVar* m_rOverscanBordersDrawDebugView; ICVar* m_sysNoUpdate; - ICVar* m_cvEntitySuppressionLevel; - ICVar* m_pCVarQuit; - ICVar* m_cvMemStats; - ICVar* m_cvMemStatsThreshold; - ICVar* m_cvMemStatsMaxDepth; - ICVar* m_sysKeyboard; - ICVar* m_sysWarnings; //!< might be 0, "sys_warnings" - Treat warning as errors. - ICVar* m_cvSSInfo; //!< might be 0, "sys_SSInfo" 0/1 - get file sourcesafe info ICVar* m_svDedicatedMaxRate; ICVar* m_sys_firstlaunch; - ICVar* m_sys_asset_processor; ICVar* m_sys_load_files_to_memory; #if defined(AZ_RESTRICTED_PLATFORM) @@ -538,13 +383,6 @@ private: // ------------------------------------------------------ ICVar* m_sys_audio_disable; - ICVar* m_sys_min_step; - ICVar* m_sys_max_step; - ICVar* m_sys_enable_budgetmonitoring; - ICVar* m_sys_memory_debug; - ICVar* m_sys_preload; - - // ICVar *m_sys_filecache; ICVar* m_gpu_particle_physics; AZStd::string m_sSavedRDriver; //!< to restore the driver when quitting the dedicated server @@ -556,30 +394,20 @@ private: // ------------------------------------------------------ SFileVersion m_fileVersion; SFileVersion m_productVersion; SFileVersion m_buildVersion; - IDataProbe* m_pDataProbe; class CLocalizedStringsManager* m_pLocalizationManager; - ESystemConfigSpec m_nServerConfigSpec; - ESystemConfigSpec m_nMaxConfigSpec; ESystemConfigPlatform m_ConfigPlatform; - CProfilingSystem m_ProfilingSystem; - // Pause mode. bool m_bPaused; bool m_bNoUpdate; - uint64 m_nUpdateCounter; - bool m_executedCommandLine = false; AZStd::unique_ptr m_missingAssetLogger; public: - ICVar* m_sys_main_CPU; - ICVar* m_sys_streaming_CPU; - ICVar* m_sys_TaskThread_CPU[MAX_THREAD_POOL_INDEX]; ////////////////////////////////////////////////////////////////////////// // File version. @@ -588,8 +416,6 @@ public: const SFileVersion& GetProductVersion() override; const SFileVersion& GetBuildVersion() override; - bool InitVTuneProfiler(); - void OpenPlatformPaks(); void OpenLanguagePak(const char* sLanguage); void OpenLanguageAudioPak(const char* sLanguage); diff --git a/Code/Legacy/CrySystem/SystemEventDispatcher.cpp b/Code/Legacy/CrySystem/SystemEventDispatcher.cpp index 8e4e36b453..b52585c5c4 100644 --- a/Code/Legacy/CrySystem/SystemEventDispatcher.cpp +++ b/Code/Legacy/CrySystem/SystemEventDispatcher.cpp @@ -9,7 +9,9 @@ #include "CrySystem_precompiled.h" #include "SystemEventDispatcher.h" -#include +#include + +AZ_DECLARE_BUDGET(CrySystem); CSystemEventDispatcher::CSystemEventDispatcher() : m_listeners(0) @@ -72,7 +74,7 @@ void CSystemEventDispatcher::OnSystemEvent(ESystemEvent event, UINT_PTR wparam, ////////////////////////////////////////////////////////////////////////// void CSystemEventDispatcher::Update() { - AZ_TRACE_METHOD(); + AZ_PROFILE_FUNCTION(CrySystem); assert(gEnv && gEnv->mMainThreadId == CryGetCurrentThreadId()); SEventParams params; diff --git a/Code/Legacy/CrySystem/SystemInit.cpp b/Code/Legacy/CrySystem/SystemInit.cpp index ac0683cf1b..09bbc3773a 100644 --- a/Code/Legacy/CrySystem/SystemInit.cpp +++ b/Code/Legacy/CrySystem/SystemInit.cpp @@ -12,7 +12,6 @@ #if defined(AZ_RESTRICTED_PLATFORM) || defined(AZ_TOOLS_EXPAND_FOR_RESTRICTED_PLATFORMS) #undef AZ_RESTRICTED_SECTION -#define SYSTEMINIT_CPP_SECTION_1 1 #define SYSTEMINIT_CPP_SECTION_2 2 #define SYSTEMINIT_CPP_SECTION_3 3 #define SYSTEMINIT_CPP_SECTION_4 4 @@ -31,7 +30,6 @@ #define SYSTEMINIT_CPP_SECTION_17 17 #endif -#include "CryLibrary.h" #include "CryPath.h" #include @@ -54,7 +52,6 @@ #include #include -#include #include #include #include @@ -70,9 +67,6 @@ #include "windows.h" #include -// To enable profiling with vtune (https://software.intel.com/en-us/intel-vtune-amplifier-xe), make sure the line below is not commented out -//#define PROFILE_WITH_VTUNE - #endif //WIN32 #include @@ -82,8 +76,6 @@ #include #include #include -#include -#include #include #include "XConsole.h" @@ -93,7 +85,6 @@ #include "SystemEventDispatcher.h" #include "LevelSystem/LevelSystem.h" #include "LevelSystem/SpawnableLevelSystem.h" -#include "ViewSystem/ViewSystem.h" #include #include #include @@ -171,48 +162,12 @@ void CryEngineSignalHandler(int signal) #define LOCALIZATION_TRANSLATIONS_LIST_FILE_NAME "Libs/Localization/localization.xml" -////////////////////////////////////////////////////////////////////////// -#if defined(WIN32) || defined(LINUX) || defined(APPLE) -# define DLL_MODULE_INIT_ISYSTEM "ModuleInitISystem" -# define DLL_MODULE_SHUTDOWN_ISYSTEM "ModuleShutdownISystem" -# define DLL_INITFUNC_RENDERER "PackageRenderConstructor" -# define DLL_INITFUNC_SOUND "CreateSoundSystem" -# define DLL_INITFUNC_FONT "CreateCryFontInterface" -# define DLL_INITFUNC_3DENGINE "CreateCry3DEngine" -# define DLL_INITFUNC_UI "CreateLyShineInterface" -#define AZ_RESTRICTED_SECTION_IMPLEMENTED -#elif defined(AZ_RESTRICTED_PLATFORM) -#define AZ_RESTRICTED_SECTION SYSTEMINIT_CPP_SECTION_1 -#include AZ_RESTRICTED_FILE(SystemInit_cpp) -#endif -#if defined(AZ_RESTRICTED_SECTION_IMPLEMENTED) -#undef AZ_RESTRICTED_SECTION_IMPLEMENTED -#else -# define DLL_MODULE_INIT_ISYSTEM (LPCSTR)2 -# define DLL_MODULE_SHUTDOWN_ISYSTEM (LPCSTR)3 -# define DLL_INITFUNC_RENDERER (LPCSTR)1 -# define DLL_INITFUNC_RENDERER (LPCSTR)1 -# define DLL_INITFUNC_SOUND (LPCSTR)1 -# define DLL_INITFUNC_PHYSIC (LPCSTR)1 -# define DLL_INITFUNC_FONT (LPCSTR)1 -# define DLL_INITFUNC_3DENGINE (LPCSTR)1 -# define DLL_INITFUNC_UI (LPCSTR)1 -#endif - #define AZ_TRACE_SYSTEM_WINDOW AZ::Debug::Trace::GetDefaultSystemWindow() #ifdef WIN32 extern HMODULE gDLLHandle; #endif -namespace -{ -#if defined(AZ_PLATFORM_WINDOWS) - // on windows, we lock our cache using a lockfile. On other platforms this is not necessary since devices like ios, android, consoles cannot - // run more than one game process that uses the same folder anyway. - HANDLE g_cacheLock = INVALID_HANDLE_VALUE; -#endif -} //static int g_sysSpecChanged = false; @@ -292,96 +247,6 @@ static void CmdCrashTest(IConsoleCmdArgs* pArgs) } AZ_POP_DISABLE_WARNING -////////////////////////////////////////////////////////////////////////// -struct SysSpecOverrideSink - : public ILoadConfigurationEntrySink -{ - virtual void OnLoadConfigurationEntry(const char* szKey, const char* szValue, const char* szGroup) - { - ICVar* pCvar = gEnv->pConsole->GetCVar(szKey); - - if (pCvar) - { - const bool wasNotInConfig = ((pCvar->GetFlags() & VF_WASINCONFIG) == 0); - bool applyCvar = wasNotInConfig; - if (applyCvar == false) - { - // Special handling for sys_spec_full - if (azstricmp(szKey, "sys_spec_full") == 0) - { - // If it is set to 0 then ignore this request to set to something else - // If it is set to 0 then the user wants to changes system spec settings in system.cfg - if (pCvar->GetIVal() != 0) - { - applyCvar = true; - } - } - else - { - // This could bypass the restricted cvar checks that exist elsewhere depending on - // the calling code so we also need check here before setting. - bool isConst = pCvar->IsConstCVar(); - bool isCheat = ((pCvar->GetFlags() & (VF_CHEAT | VF_CHEAT_NOCHECK | VF_CHEAT_ALWAYS_CHECK)) != 0); - bool isReadOnly = ((pCvar->GetFlags() & VF_READONLY) != 0); - bool isDeprecated = ((pCvar->GetFlags() & VF_DEPRECATED) != 0); - bool allowApplyCvar = true; - - if ((isConst || isCheat || isReadOnly) || isDeprecated) - { - allowApplyCvar = !isDeprecated && (gEnv->pSystem->IsDevMode()) || (gEnv->IsEditor()); - } - - if ((allowApplyCvar) || ALLOW_CONST_CVAR_MODIFICATIONS) - { - applyCvar = true; - } - } - } - - if (applyCvar) - { - pCvar->Set(szValue); - } - else - { - CryLogAlways("NOT VF_WASINCONFIG Ignoring cvar '%s' new value '%s' old value '%s' group '%s'", szKey, szValue, pCvar->GetString(), szGroup); - } - } - else - { - CryLogAlways("Can't find cvar '%s' value '%s' group '%s'", szKey, szValue, szGroup); - } - } -}; - -#if !defined(CONSOLE) -struct SysSpecOverrideSinkConsole - : public ILoadConfigurationEntrySink -{ - virtual void OnLoadConfigurationEntry(const char* szKey, const char* szValue, const char* szGroup) - { - // Ignore platform-specific cvars that should just be executed on the console - if (azstricmp(szGroup, "Platform") == 0) - { - return; - } - - ICVar* pCvar = gEnv->pConsole->GetCVar(szKey); - if (pCvar) - { - pCvar->Set(szValue); - } - else - { - // If the cvar doesn't exist, calling this function only saves the value in case it's registered later where - // at that point it will be set from the stored value. This is required because otherwise registering the - // cvar bypasses any callbacks and uses values directly from the cvar group files. - gEnv->pConsole->LoadConfigVar(szKey, szValue); - } - } -}; -#endif - static ESystemConfigPlatform GetDevicePlatform() { #if defined(AZ_PLATFORM_WINDOWS) || defined(AZ_PLATFORM_LINUX) @@ -405,117 +270,6 @@ static ESystemConfigPlatform GetDevicePlatform() #endif } -////////////////////////////////////////////////////////////////////////// -#if !defined(AZ_MONOLITHIC_BUILD) - -AZStd::unique_ptr CSystem::LoadDynamiclibrary(const char* dllName) const -{ - AZStd::unique_ptr handle = AZ::DynamicModuleHandle::Create(dllName); - - bool libraryLoaded = handle->Load(false); - // We need to inject the environment first thing so that allocators are available immediately - InjectEnvironmentFunction injectEnv = handle->GetFunction(INJECT_ENVIRONMENT_FUNCTION); - if (injectEnv) - { - auto env = AZ::Environment::GetInstance(); - injectEnv(env); - } - - if (!libraryLoaded) - { - handle.release(); - } - return handle; -} - -////////////////////////////////////////////////////////////////////////// -AZStd::unique_ptr CSystem::LoadDLL(const char* dllName) -{ - AZ_TracePrintf(AZ_TRACE_SYSTEM_WINDOW, "Loading DLL: %s", dllName); - - AZStd::unique_ptr handle = LoadDynamiclibrary(dllName); - - if (!handle) - { -#if defined(LINUX) || defined(APPLE) - AZ_Assert(false, "Error loading dylib: %s, error : %s\n", dllName, dlerror()); -#else - AZ_Assert(false, "Error loading dll: %s, error code %d", dllName, GetLastError()); -#endif - return handle; - } - - ////////////////////////////////////////////////////////////////////////// - // After loading DLL initialize it by calling ModuleInitISystem - ////////////////////////////////////////////////////////////////////////// - AZStd::string moduleName = PathUtil::GetFileName(dllName); - - typedef void*(*PtrFunc_ModuleInitISystem)(ISystem* pSystem, const char* moduleName); - PtrFunc_ModuleInitISystem pfnModuleInitISystem = handle->GetFunction(DLL_MODULE_INIT_ISYSTEM); - if (pfnModuleInitISystem) - { - pfnModuleInitISystem(this, moduleName.c_str()); - } - - return handle; -} - -// TODO:DLL #endif //#if defined(AZ_HAS_DLL_SUPPORT) && !defined(AZ_MONOLITHIC_BUILD) -#endif //if !defined(AZ_MONOLITHIC_BUILD) -////////////////////////////////////////////////////////////////////////// -bool CSystem::LoadEngineDLLs() -{ - return true; -} - -////////////////////////////////////////////////////////////////////////// -bool CSystem::UnloadDLL(const char* dllName) -{ - bool isSuccess = false; - - AZ::Crc32 key(dllName); - AZStd::unique_ptr empty; - AZStd::unique_ptr& hModule = stl::find_in_map_ref(m_moduleDLLHandles, key, empty); - if ((hModule) && (hModule->IsLoaded())) - { - DetachEnvironmentFunction detachEnv = hModule->GetFunction(DETACH_ENVIRONMENT_FUNCTION); - if (detachEnv) - { - detachEnv(); - } - - isSuccess = hModule->Unload(); - hModule.release(); - } - - return isSuccess; -} - -////////////////////////////////////////////////////////////////////////// -void CSystem::ShutdownModuleLibraries() -{ -#if !defined(AZ_MONOLITHIC_BUILD) - for (auto iterator = m_moduleDLLHandles.begin(); iterator != m_moduleDLLHandles.end(); ++iterator) - { - typedef void*( * PtrFunc_ModuleShutdownISystem )(ISystem* pSystem); - - PtrFunc_ModuleShutdownISystem pfnModuleShutdownISystem = iterator->second->GetFunction(DLL_MODULE_SHUTDOWN_ISYSTEM); - if (pfnModuleShutdownISystem) - { - pfnModuleShutdownISystem(this); - } - if (iterator->second->IsLoaded()) - { - iterator->second->Unload(); - } - iterator->second.release(); - } - - m_moduleDLLHandles.clear(); - -#endif // !defined(AZ_MONOLITHIC_BUILD) -} - ///////////////////////////////////////////////////////////////////////////////// ///////////////////////////////////////////////////////////////////////////////// bool CSystem::InitConsole() @@ -575,9 +329,6 @@ bool CSystem::InitFileSystem() m_pUserCallback->OnInitProgress("Initializing File System..."); } - // get the DirectInstance FileIOBase which should be the AZ::LocalFileIO - m_env.pFileIO = AZ::IO::FileIOBase::GetDirectInstance(); - m_env.pCryPak = AZ::Interface::Get(); m_env.pFileIO = AZ::IO::FileIOBase::GetInstance(); AZ_Assert(m_env.pCryPak, "CryPak has not been initialized on AZ::Interface"); @@ -601,33 +352,6 @@ bool CSystem::InitFileSystem() void CSystem::ShutdownFileSystem() { -#if defined(AZ_PLATFORM_WINDOWS) - if (g_cacheLock != INVALID_HANDLE_VALUE) - { - CloseHandle(g_cacheLock); - g_cacheLock = INVALID_HANDLE_VALUE; - } -#endif - - using namespace AZ::IO; - - FileIOBase* directInstance = FileIOBase::GetDirectInstance(); - FileIOBase* pakInstance = FileIOBase::GetInstance(); - - if (directInstance == m_env.pFileIO) - { - // we only mess with file io if we own the instance that we installed. - // if we dont' own the instance, then we never configured fileIO and we should not alter it. - delete directInstance; - FileIOBase::SetDirectInstance(nullptr); - - if (pakInstance != directInstance) - { - delete pakInstance; - FileIOBase::SetInstance(nullptr); - } - } - m_env.pFileIO = nullptr; } @@ -704,33 +428,6 @@ bool CSystem::InitAudioSystem(const SSystemInitParams& initParams) return result; } -////////////////////////////////////////////////////////////////////////// -bool CSystem::InitVTuneProfiler() -{ -#ifdef PROFILE_WITH_VTUNE - - WIN_HMODULE hModule = LoadDLL("VTuneApi.dll"); - if (!hModule) - { - return false; - } - - VTPause = (VTuneFunction) CryGetProcAddress(hModule, "VTPause"); - VTResume = (VTuneFunction) CryGetProcAddress(hModule, "VTResume"); - if (!VTPause || !VTResume) - { - AZ_Assert(false, "VTune did not initialize correctly.") - return false; - } - else - { - AZ_TracePrintf(AZ_TRACE_SYSTEM_WINDOW, "VTune API Initialized"); - } -#endif //PROFILE_WITH_VTUNE - - return true; -} - ////////////////////////////////////////////////////////////////////////// void CSystem::InitLocalization() { @@ -1038,7 +735,17 @@ bool CSystem::Init(const SSystemInitParams& startupParams) m_pCmdLine = new CCmdLine(startupParams.szSystemCmdLine); - AZCoreLogSink::Connect(); + // Init AZCoreLogSink. Don't suppress system output if we're running as an editor-server + bool suppressSystemOutput = true; + if (const ICmdLineArg* isEditorServerArg = m_pCmdLine->FindArg(eCLAT_Pre, "editorsv_isDedicated")) + { + bool editorsv_isDedicated = false; + if (isEditorServerArg->GetBoolValue(editorsv_isDedicated) && editorsv_isDedicated) + { + suppressSystemOutput = false; + } + } + AZCoreLogSink::Connect(suppressSystemOutput); // Registers all AZ Console Variables functors specified within CrySystem if (auto azConsole = AZ::Interface::Get(); azConsole) @@ -1362,17 +1069,6 @@ AZ_POP_DISABLE_WARNING AzFramework::SystemCursorState::ConstrainedAndHidden); } - ////////////////////////////////////////////////////////////////////////// - // TIME - ////////////////////////////////////////////////////////////////////////// - AZ_Printf(AZ_TRACE_SYSTEM_WINDOW, "Time initialization"); - if (!m_Time.Init()) - { - AZ_Assert(false, "Failed to initialize CTimer instance."); - return false; - } - m_Time.ResetTimer(); - // CONSOLE ////////////////////////////////////////////////////////////////////////// if (!InitConsole()) @@ -1384,7 +1080,7 @@ AZ_POP_DISABLE_WARNING { m_pUserCallback->OnInitProgress("Initializing additional systems..."); } - AZ_Printf(AZ_TRACE_SYSTEM_WINDOW, "Initializing additional systems"); + AZ_Printf(AZ_TRACE_SYSTEM_WINDOW, "Initializing additional systems\n"); InlineInitializationProcessing("CSystem::Init AIInit"); @@ -1407,17 +1103,6 @@ AZ_POP_DISABLE_WARNING InlineInitializationProcessing("CSystem::Init Level System"); - ////////////////////////////////////////////////////////////////////////// - // VIEW SYSTEM (must be created after m_pLevelSystem) - m_pViewSystem = new LegacyViewSystem::CViewSystem(this); - - InlineInitializationProcessing("CSystem::Init View System"); - - if (m_env.pLyShine) - { - m_env.pLyShine->PostInit(); - } - InlineInitializationProcessing("CSystem::Init InitLmbrAWS"); // Az to Cry console binding @@ -1446,12 +1131,6 @@ AZ_POP_DISABLE_WARNING InlineInitializationProcessing("CSystem::Init End"); - if (gEnv->IsDedicated()) - { - SCVarsClientConfigSink CVarsClientConfigSink; - LoadConfiguration("client.cfg", &CVarsClientConfigSink); - } - // Send out EBus event EBUS_EVENT(CrySystemEventBus, OnCrySystemInitialized, *this, startupParams); @@ -1511,38 +1190,12 @@ static AZStd::string ConcatPath(const char* szPart1, const char* szPart2) return ret; } -// Helper to maintain backwards compatibility with our CVar but not force our new code to -// pull in CryCommon by routing through an environment variable -void CmdSetAwsLogLevel(IConsoleCmdArgs* pArgs) -{ - static const char* const logLevelEnvVar = "sys_SetLogLevel"; - static AZ::EnvironmentVariable logVar = AZ::Environment::CreateVariable(logLevelEnvVar); - if (pArgs->GetArgCount() > 1) - { - int logLevel = atoi(pArgs->GetArg(1)); - *logVar = logLevel; - AZ_TracePrintf("AWSLogging", "Log level set to %d", *logVar); - } -} - ////////////////////////////////////////////////////////////////////////// void CSystem::CreateSystemVars() { assert(gEnv); assert(gEnv->pConsole); - // Register DLL names as cvars before we load them - // - EVarFlags dllFlags = (EVarFlags)0; - m_sys_dll_response_system = REGISTER_STRING("sys_dll_response_system", 0, dllFlags, "Specifies the DLL to load for the dynamic response system"); - - m_sys_initpreloadpacks = REGISTER_STRING("sys_initpreloadpacks", "", 0, "Specifies the paks for an engine initialization"); - m_sys_menupreloadpacks = REGISTER_STRING("sys_menupreloadpacks", 0, 0, "Specifies the paks for a main menu loading"); - -#ifndef _RELEASE - m_sys_resource_cache_folder = REGISTER_STRING("sys_resource_cache_folder", "Editor\\ResourceCache", 0, "Folder for resource compiled locally. Managed by Sandbox."); -#endif - #if AZ_LOADSCREENCOMPONENT_ENABLED m_game_load_screen_uicanvas_path = REGISTER_STRING("game_load_screen_uicanvas_path", "", 0, "Game load screen UiCanvas path."); m_level_load_screen_uicanvas_path = REGISTER_STRING("level_load_screen_uicanvas_path", "", 0, "Level load screen UiCanvas path."); @@ -1558,8 +1211,6 @@ void CSystem::CreateSystemVars() REGISTER_INT("cvDoVerboseWindowTitle", 0, VF_NULL, ""); - m_pCVarQuit = REGISTER_INT("ExitOnQuit", 1, VF_NULL, ""); - // Register an AZ Console command to quit the engine. // The command is available even in Release builds. static AZ::ConsoleFunctor s_functorQuit @@ -1580,52 +1231,14 @@ void CSystem::CreateSystemVars() REGISTER_STRING_CB("sys_version", "", VF_CHEAT, "Override system file/product version", SystemVersionChanged); #endif // #ifndef _RELEASE - m_cvAIUpdate = REGISTER_INT("ai_NoUpdate", 0, VF_CHEAT, "Disables AI system update when 1"); - - m_cvMemStats = REGISTER_INT("MemStats", 0, 0, - "0/x=refresh rate in milliseconds\n" - "Use 1000 to switch on and 0 to switch off\n" - "Usage: MemStats [0..]"); - m_cvMemStatsThreshold = REGISTER_INT ("MemStatsThreshold", 32000, VF_NULL, ""); - m_cvMemStatsMaxDepth = REGISTER_INT("MemStatsMaxDepth", 4, VF_NULL, ""); - - attachVariable("sys_PakReadSlice", &g_cvars.archiveVars.nReadSlice, "If non-0, means number of kilobytes to use to read files in portions. Should only be used on Win9x kernels"); - - attachVariable("sys_PakInMemorySizeLimit", &g_cvars.archiveVars.nInMemoryPerPakSizeLimit, "Individual pak size limit for being loaded into memory (MB)"); - attachVariable("sys_PakTotalInMemorySizeLimit", &g_cvars.archiveVars.nTotalInMemoryPakSizeLimit, "Total limit (in MB) for all in memory paks"); - attachVariable("sys_PakLoadCache", &g_cvars.archiveVars.nLoadCache, "Load in memory paks from _LoadCache folder"); - attachVariable("sys_PakLoadModePaks", &g_cvars.archiveVars.nLoadModePaks, "Load mode switching paks from modes folder"); - attachVariable("sys_PakStreamCache", &g_cvars.archiveVars.nStreamCache, "Load in memory paks for faster streaming (cgf_cache.pak,dds_cache.pak)"); - attachVariable("sys_PakSaveTotalResourceList", &g_cvars.archiveVars.nSaveTotalResourceList, "Save resource list"); attachVariable("sys_PakSaveLevelResourceList", &g_cvars.archiveVars.nSaveLevelResourceList, "Save resource list when loading level"); - attachVariable("sys_PakSaveFastLoadResourceList", &g_cvars.archiveVars.nSaveFastloadResourceList, "Save resource list during initial loading"); - attachVariable("sys_PakSaveMenuCommonResourceList", &g_cvars.archiveVars.nSaveMenuCommonResourceList, "Save resource list during front end menu flow"); - attachVariable("sys_PakMessageInvalidFileAccess", &g_cvars.archiveVars.nMessageInvalidFileAccess, "Message Box synchronous file access when in game"); attachVariable("sys_PakLogInvalidFileAccess", &g_cvars.archiveVars.nLogInvalidFileAccess, "Log synchronous file access when in game"); -#ifndef _RELEASE - attachVariable("sys_PakLogAllFileAccess", &g_cvars.archiveVars.nLogAllFileAccess, "Log all file access allowing you to easily see whether a file has been loaded directly, or which pak file."); -#endif - attachVariable("sys_PakValidateFileHash", &g_cvars.archiveVars.nValidateFileHashes, "Validate file hashes in pak files for collisions"); - attachVariable("sys_UncachedStreamReads", &g_cvars.archiveVars.nUncachedStreamReads, "Enable stream reads via an uncached file handle"); - attachVariable("sys_PakDisableNonLevelRelatedPaks", &g_cvars.archiveVars.nDisableNonLevelRelatedPaks, "Disables all paks that are not required by specific level; This is used with per level splitted assets."); - attachVariable("sys_PakWarnOnPakAccessFailures", &g_cvars.archiveVars.nWarnOnPakAccessFails, "If 1, access failure for Paks is treated as a warning, if zero it is only a log message."); - - static const int fileSystemCaseSensitivityDefault = 0; - REGISTER_CVAR2("sys_FilesystemCaseSensitivity", &g_cvars.sys_FilesystemCaseSensitivity, fileSystemCaseSensitivityDefault, VF_NULL, - "0 - CryPak lowercases all input file names\n" - "1 - CryPak preserves file name casing\n" - "Default is 1"); m_sysNoUpdate = REGISTER_INT("sys_noupdate", 0, VF_CHEAT, "Toggles updating of system with sys_script_debugger.\n" "Usage: sys_noupdate [0/1]\n" "Default is 0 (system updates during debug)."); - m_sysWarnings = REGISTER_INT("sys_warnings", 0, 0, - "Toggles printing system warnings.\n" - "Usage: sys_warnings [0/1]\n" - "Default is 0 (off)."); - #if defined(_RELEASE) && defined(CONSOLE) && !defined(ENABLE_LW_PROFILERS) enum { @@ -1637,10 +1250,6 @@ void CSystem::CreateSystemVars() e_sysKeyboardDefault = 1 }; #endif - m_sysKeyboard = REGISTER_INT("sys_keyboard", e_sysKeyboardDefault, 0, - "Enables keyboard.\n" - "Usage: sys_keyboard [0/1]\n" - "Default is 1 (on)."); m_svDedicatedMaxRate = REGISTER_FLOAT("sv_DedicatedMaxRate", 30.0f, 0, "Sets the maximum update rate when running as a dedicated server.\n" @@ -1656,57 +1265,14 @@ void CSystem::CreateSystemVars() "Usage: sv_DedicatedCPUVariance [5..50]\n" "Default is 10."); - m_cvSSInfo = REGISTER_INT("sys_SSInfo", 0, 0, - "Show SourceSafe information (Name,Comment,Date) for file errors." - "Usage: sys_SSInfo [0/1]\n" - "Default is 0 (off)"); - - m_cvEntitySuppressionLevel = REGISTER_INT("e_EntitySuppressionLevel", 0, 0, - "Defines the level at which entities are spawned.\n" - "Entities marked with lower level will not be spawned - 0 means no level.\n" - "Usage: e_EntitySuppressionLevel [0-infinity]\n" - "Default is 0 (off)"); - m_sys_firstlaunch = REGISTER_INT("sys_firstlaunch", 0, 0, "Indicates that the game was run for the first time."); - m_sys_main_CPU = REGISTER_INT("sys_main_CPU", 0, 0, - "Specifies the physical CPU index main will run on"); - - m_sys_TaskThread_CPU[0] = REGISTER_INT("sys_TaskThread0_CPU", 3, 0, - "Specifies the physical CPU index taskthread0 will run on"); - - m_sys_TaskThread_CPU[1] = REGISTER_INT("sys_TaskThread1_CPU", 5, 0, - "Specifies the physical CPU index taskthread1 will run on"); - - m_sys_TaskThread_CPU[2] = REGISTER_INT("sys_TaskThread2_CPU", 4, 0, - "Specifies the physical CPU index taskthread2 will run on"); - - m_sys_TaskThread_CPU[3] = REGISTER_INT("sys_TaskThread3_CPU", 3, 0, - "Specifies the physical CPU index taskthread3 will run on"); - - m_sys_TaskThread_CPU[4] = REGISTER_INT("sys_TaskThread4_CPU", 2, 0, - "Specifies the physical CPU index taskthread4 will run on"); - - m_sys_TaskThread_CPU[5] = REGISTER_INT("sys_TaskThread5_CPU", 1, 0, - "Specifies the physical CPU index taskthread5 will run on"); - #if defined(AZ_RESTRICTED_PLATFORM) #define AZ_RESTRICTED_SECTION SYSTEMINIT_CPP_SECTION_12 #include AZ_RESTRICTED_FILE(SystemInit_cpp) #endif - m_sys_min_step = REGISTER_FLOAT("sys_min_step", 0.01f, 0, - "Specifies the minimum physics step in a separate thread"); - m_sys_max_step = REGISTER_FLOAT("sys_max_step", 0.05f, 0, - "Specifies the maximum physics step in a separate thread"); - - // used in define MEMORY_DEBUG_POINT() - m_sys_memory_debug = REGISTER_INT("sys_memory_debug", 0, VF_CHEAT, - "Enables to activate low memory situation is specific places in the code (argument defines which place), 0=off"); - - REGISTER_CVAR2("sys_vtune", &g_cvars.sys_vtune, 0, VF_NULL, ""); - #if defined(AZ_RESTRICTED_PLATFORM) #define AZ_RESTRICTED_SECTION SYSTEMINIT_CPP_SECTION_17 #include AZ_RESTRICTED_FILE(SystemInit_cpp) @@ -1717,40 +1283,7 @@ void CSystem::CreateSystemVars() # define SYS_STREAMING_CPU_DEFAULT_VALUE 1 # define SYS_STREAMING_CPU_WORKER_DEFAULT_VALUE 5 #endif - REGISTER_CVAR2("sys_streaming_CPU", &g_cvars.sys_streaming_cpu, SYS_STREAMING_CPU_DEFAULT_VALUE, VF_NULL, "Specifies the physical CPU file IO thread run on"); - REGISTER_CVAR2("sys_streaming_CPU_worker", &g_cvars.sys_streaming_cpu_worker, SYS_STREAMING_CPU_WORKER_DEFAULT_VALUE, VF_NULL, "Specifies the physical CPU file IO worker thread/s run on"); - REGISTER_CVAR2("sys_streaming_memory_budget", &g_cvars.sys_streaming_memory_budget, 10 * 1024, VF_NULL, "Temp memory streaming system can use in KB"); - REGISTER_CVAR2("sys_streaming_max_finalize_per_frame", &g_cvars.sys_streaming_max_finalize_per_frame, 0, VF_NULL, - "Maximum stream finalizing calls per frame to reduce the CPU impact on main thread (0 to disable)"); - REGISTER_CVAR2("sys_streaming_max_bandwidth", &g_cvars.sys_streaming_max_bandwidth, 0, VF_NULL, "Enables capping of max streaming bandwidth in MB/s"); - REGISTER_CVAR2("sys_streaming_debug", &g_cvars.sys_streaming_debug, 0, VF_NULL, "Enable streaming debug information\n" - "0=off\n" - "1=Streaming Stats\n" - "2=File IO\n" - "3=Request Order\n" - "4=Write to Log\n" - "5=Stats per extension\n" - ); - REGISTER_CVAR2("sys_streaming_requests_grouping_time_period", &g_cvars.sys_streaming_requests_grouping_time_period, 2, VF_NULL, // Vlad: 2 works better than 4 visually, should be be re-tested when streaming pak's activated - "Streaming requests are grouped by request time and then sorted by disk offset"); - REGISTER_CVAR2("sys_streaming_debug_filter", &g_cvars.sys_streaming_debug_filter, 0, VF_NULL, "Set streaming debug information filter.\n" - "0=all\n" - "1=Texture\n" - "2=Geometry\n" - "3=Terrain\n" - "4=Animation\n" - "5=Music\n" - "6=Sound\n" - "7=Shader\n" - ); - g_cvars.sys_streaming_debug_filter_file_name = REGISTER_STRING("sys_streaming_debug_filter_file_name", "", VF_CHEAT, - "Set streaming debug information filter"); - REGISTER_CVAR2("sys_streaming_debug_filter_min_time", &g_cvars.sys_streaming_debug_filter_min_time, 0.f, VF_NULL, "Show only slow items."); - REGISTER_CVAR2("sys_streaming_resetstats", &g_cvars.sys_streaming_resetstats, 0, VF_NULL, - "Reset all the streaming stats"); #define DEFAULT_USE_OPTICAL_DRIVE_THREAD (gEnv->IsDedicated() ? 0 : 1) - REGISTER_CVAR2("sys_streaming_use_optical_drive_thread", &g_cvars.sys_streaming_use_optical_drive_thread, DEFAULT_USE_OPTICAL_DRIVE_THREAD, VF_NULL, - "Allow usage of an extra optical drive thread for faster streaming from 2 medias"); const char* localizeFolder = "Localization"; g_cvars.sys_localization_folder = REGISTER_STRING_CB("sys_localization_folder", localizeFolder, VF_NULL, @@ -1760,9 +1293,6 @@ void CSystem::CreateSystemVars() "Default: Localization\n", CSystem::OnLocalizationFolderCVarChanged); - REGISTER_CVAR2("sys_streaming_in_blocks", &g_cvars.sys_streaming_in_blocks, 1, VF_NULL, - "Streaming of large files happens in blocks"); - #if (defined(WIN32) || defined(WIN64)) && defined(_DEBUG) REGISTER_CVAR2("sys_float_exceptions", &g_cvars.sys_float_exceptions, 2, 0, "Use or not use floating point exceptions."); #else // Float exceptions by default disabled for console builds. @@ -1781,11 +1311,6 @@ void CSystem::CreateSystemVars() REGISTER_CVAR2("sys_WER", &g_cvars.sys_WER, 0, 0, "Enables Windows Error Reporting"); #endif -#ifdef USE_HTTP_WEBSOCKETS - REGISTER_CVAR2("sys_simple_http_base_port", &g_cvars.sys_simple_http_base_port, 1880, VF_REQUIRE_APP_RESTART, - "sets the base port for the simple http server to run on, defaults to 1880"); -#endif - const int DEFAULT_DUMP_TYPE = 2; REGISTER_CVAR2("sys_dump_type", &g_cvars.sys_dump_type, DEFAULT_DUMP_TYPE, VF_NULL, @@ -1797,8 +1322,6 @@ void CSystem::CreateSystemVars() ); REGISTER_CVAR2("sys_dump_aux_threads", &g_cvars.sys_dump_aux_threads, 1, VF_NULL, "Dumps callstacks of other threads in case of a crash"); - REGISTER_CVAR2("sys_limit_phys_thread_count", &g_cvars.sys_limit_phys_thread_count, 1, VF_NULL, "Limits p_num_threads to physical CPU count - 1"); - #if (defined(WIN32) || defined(WIN64)) && defined(_RELEASE) const int DEFAULT_SYS_MAX_FPS = 0; #else @@ -1810,11 +1333,8 @@ void CSystem::CreateSystemVars() REGISTER_CVAR2("sys_maxTimeStepForMovieSystem", &g_cvars.sys_maxTimeStepForMovieSystem, 0.1f, VF_NULL, "Caps the time step for the movie system so that a cut-scene won't be jumped in the case of an extreme stall."); - REGISTER_CVAR2("sys_force_installtohdd_mode", &g_cvars.sys_force_installtohdd_mode, 0, VF_NULL, "Forces install to HDD mode even when doing DVD emulation"); - REGISTER_CVAR2("sys_report_files_not_found_in_paks", &g_cvars.sys_report_files_not_found_in_paks, 0, VF_NULL, "Reports when files are searched for in paks and not found. 1 = log, 2 = warning, 3 = error"); - m_sys_preload = REGISTER_INT("sys_preload", 0, 0, "Preload Game Resources"); REGISTER_COMMAND("sys_crashtest", CmdCrashTest, VF_CHEAT, "Make the game crash\n" "0=off\n" "1=null pointer exception\n" @@ -1853,20 +1373,11 @@ void CSystem::CreateSystemVars() "To speed up loading from non HD media\n" "0=off / 1=enabled"); */ - REGISTER_CVAR2("sys_AI", &g_cvars.sys_ai, 1, 0, "Enables AI Update"); - REGISTER_CVAR2("sys_entities", &g_cvars.sys_entitysystem, 1, 0, "Enables Entities Update"); REGISTER_CVAR2("sys_trackview", &g_cvars.sys_trackview, 1, 0, "Enables TrackView Update"); //Defines selected language. REGISTER_STRING_CB("g_language", "", VF_NULL, "Defines which language pak is loaded", CSystem::OnLanguageCVarChanged); -#if defined(WIN32) - REGISTER_CVAR2("sys_display_threads", &g_cvars.sys_display_threads, 0, 0, "Displays Thread info"); -#elif defined(AZ_RESTRICTED_PLATFORM) -#define AZ_RESTRICTED_SECTION SYSTEMINIT_CPP_SECTION_13 -#include AZ_RESTRICTED_FILE(SystemInit_cpp) -#endif - // adding CVAR to toggle assert verbosity level const int defaultAssertValue = 1; REGISTER_CVAR2_CB("sys_asserts", &g_cvars.sys_asserts, defaultAssertValue, VF_CHEAT, @@ -1889,8 +1400,6 @@ void CSystem::CreateSystemVars() // Since the UI Canvas Editor is incomplete, we have a variable to enable it. // By default it is now enabled. Modify system.cfg or game.cfg to disable it REGISTER_INT("sys_enableCanvasEditor", 1, VF_NULL, "Enables the UI Canvas Editor"); - - REGISTER_COMMAND("sys_SetLogLevel", CmdSetAwsLogLevel, 0, "Set AWS log level [0 - 6]."); } ////////////////////////////////////////////////////////////////////////// diff --git a/Code/Legacy/CrySystem/SystemWin32.cpp b/Code/Legacy/CrySystem/SystemWin32.cpp index 4f0a154afe..270cbbcb9f 100644 --- a/Code/Legacy/CrySystem/SystemWin32.cpp +++ b/Code/Legacy/CrySystem/SystemWin32.cpp @@ -14,7 +14,6 @@ #include #include #include -#include #include #include // for AZ_MAX_PATH_LEN #include @@ -70,39 +69,6 @@ const char* g_szModuleGroups[][2] = { {"CrySystem.dll", g_szGroupCore} }; -////////////////////////////////////////////////////////////////////////// -void CSystem::SetAffinity() -{ - // the following code is only for Windows -#ifdef WIN32 - // set the process affinity - ICVar* pcvAffinityMask = GetIConsole()->GetCVar("sys_affinity"); - if (!pcvAffinityMask) - { - pcvAffinityMask = REGISTER_INT("sys_affinity", 0, VF_NULL, ""); - } - - if (pcvAffinityMask) - { - unsigned nAffinity = pcvAffinityMask->GetIVal(); - if (nAffinity) - { - typedef BOOL (WINAPI * FnSetProcessAffinityMask)(IN HANDLE hProcess, IN DWORD_PTR dwProcessAffinityMask); - HMODULE hKernel = CryLoadLibrary ("kernel32.dll"); - if (hKernel) - { - FnSetProcessAffinityMask SetProcessAffinityMask = (FnSetProcessAffinityMask)GetProcAddress(hKernel, "SetProcessAffinityMask"); - if (SetProcessAffinityMask && !SetProcessAffinityMask(GetCurrentProcess(), nAffinity)) - { - GetILog()->LogError("Error: Cannot set affinity mask %d, error code %d", nAffinity, GetLastError()); - } - FreeLibrary (hKernel); - } - } - } -#endif -} - #if defined(WIN32) #pragma pack(push,1) struct PEHeader_DLL @@ -417,45 +383,6 @@ void CSystem::debug_LogCallStack(int nMaxFuncs, [[maybe_unused]] int nFlags) } } -////////////////////////////////////////////////////////////////////////// -// Support relaunching for windows media center edition. -////////////////////////////////////////////////////////////////////////// -#if defined(WIN32) -#if (_WIN32_WINNT < 0x0501) -#define SM_MEDIACENTER 87 -#endif -bool CSystem::ReLaunchMediaCenter() -{ - // Skip if not running on a Media Center - if (GetSystemMetrics(SM_MEDIACENTER) == 0) - { - return false; - } - - // Get the path to Media Center - wchar_t szExpandedPath[AZ_MAX_PATH_LEN]; - if (!ExpandEnvironmentStringsW(L"%SystemRoot%\\ehome\\ehshell.exe", szExpandedPath, AZ_MAX_PATH_LEN)) - { - return false; - } - - // Skip if ehshell.exe doesn't exist - if (GetFileAttributesW(szExpandedPath) == 0xFFFFFFFF) - { - return false; - } - - // Launch ehshell.exe - INT_PTR result = (INT_PTR)ShellExecuteW(NULL, TEXT("open"), szExpandedPath, NULL, NULL, SW_SHOWNORMAL); - return (result > 32); -} -#else -bool CSystem::ReLaunchMediaCenter() -{ - return false; -} -#endif //defined(WIN32) - #if (defined(WIN32) || defined(WIN64)) ////////////////////////////////////////////////////////////////////////// bool CSystem::GetWinGameFolder(char* szMyDocumentsPath, int maxPathSize) diff --git a/Code/Legacy/CrySystem/Timer.cpp b/Code/Legacy/CrySystem/Timer.cpp deleted file mode 100644 index 1e1b6859e1..0000000000 --- a/Code/Legacy/CrySystem/Timer.cpp +++ /dev/null @@ -1,725 +0,0 @@ -/* - * Copyright (c) Contributors to the Open 3D Engine Project. - * For complete copyright and license terms please see the LICENSE at the root of this distribution. - * - * SPDX-License-Identifier: Apache-2.0 OR MIT - * - */ - - -#include "CrySystem_precompiled.h" -#include "Timer.h" -#include -#include -#include -#include -#include -///////////////////////////////////////////////////// - -#ifdef WIN32 -#define WIN32_LEAN_AND_MEAN -#include "windows.h" -#include "Mmsystem.h" -#endif - -//#define PROFILING 1 -#ifdef PROFILING -static int64 g_lCurrentTime = 0; -#endif - -//! Profile smoothing time in seconds (original default was .8 / log(10) ~= .35 s) -static const float fDEFAULT_PROFILE_SMOOTHING = 1.0f; - - - -#define DEFAULT_FRAME_SMOOTHING 1 - -///////////////////////////////////////////////////// -CTimer::CTimer() -{ - // Default CVar values - m_fixed_time_step = 0; - m_max_time_step = 0.25f; - m_cvar_time_scale = 1.0f; - m_TimeSmoothing = DEFAULT_FRAME_SMOOTHING; // note: frame numbers (old version - commented out) are not used but is based on time - m_TimeDebug = 0; - - m_profile_smooth_time = fDEFAULT_PROFILE_SMOOTHING; - m_profile_weighting = 1; - - // Persistant state - m_bEnabled = true; - //m_fixedTimeModeEnabled = false; - m_nFrameCounter = 0; - - m_lTicksPerSec = CryGetTicksPerSec(); - m_fSecsPerTick = 1.0 / m_lTicksPerSec; - - m_fAverageFrameTime = 1.0f / 30.0f; - for (int i = 0; i < MAX_FRAME_AVERAGE; i++) - { - m_arrFrameTimes[i] = m_fAverageFrameTime; - } - - m_fAvgFrameTime = 0.0f; - m_fProfileBlend = 1.0f; - m_fSmoothTime = 0; - - m_totalTimeScale = 1.0f; - ClearTimeScales(); - - ResetTimer(); -} - -///////////////////////////////////////////////////// -bool CTimer::Init() -{ - // if game code was accessing them by name there was something wrong anyway - - REGISTER_CVAR2("t_Smoothing", &m_TimeSmoothing, DEFAULT_FRAME_SMOOTHING, 0, - "time smoothing\n" - "0=off, 1=on"); - - REGISTER_CVAR2("t_FixedStep", &m_fixed_time_step, 0, VF_NET_SYNCED | VF_DEV_ONLY, - "Game updated with this fixed frame time\n" - "0=off, number specifies the frame time in seconds\n" - "e.g. 0.033333(30 fps), 0.1(10 fps), 0.01(100 fps)"); - - REGISTER_CVAR2("t_MaxStep", &m_max_time_step, 0.25f, 0, - "Game systems clamped to this frame time"); - - // todo: reconsider exposing that as cvar (negative time, same value is used by Trackview, better would be another value multipled with the internal one) - REGISTER_CVAR2("t_Scale", &m_cvar_time_scale, 1.0f, VF_NET_SYNCED | VF_DEV_ONLY, - "Game time scaled by this - for variable slow motion"); - - REGISTER_CVAR2("t_Debug", &m_TimeDebug, 0, 0, "Timer debug: 0 = off, 1 = events, 2 = verbose"); - - // ----------------- - - REGISTER_CVAR2("profile_smooth", &m_profile_smooth_time, fDEFAULT_PROFILE_SMOOTHING, 0, - "Profiler exponential smoothing interval (seconds)"); - - REGISTER_CVAR2("profile_weighting", &m_profile_weighting, 1, 0, - "Profiler smoothing mode: 0 = legacy, 1 = average, 2 = peak weighted, 3 = peak hold"); - - return true; -} - -///////////////////////////////////////////////////// -float CTimer::GetFrameTime(ETimer which) const -{ - float result = 0.0f; - if (m_bEnabled) - { - if (which != ETIMER_GAME || !m_bGameTimerPaused) - { - if (which == ETIMER_UI) - { - result = m_fRealFrameTime; - } - else - { - result = m_fFrameTime; - } - } - } - return result; -} - -///////////////////////////////////////////////////// -float CTimer::GetCurrTime(ETimer which) const -{ - assert(which >= 0 && which < ETIMER_LAST && "Bad timer index"); - return m_CurrTime[which].GetSeconds(); -} - -///////////////////////////////////////////////////// -float CTimer::GetRealFrameTime() const -{ - return m_bEnabled ? m_fRealFrameTime : 0.0f; -} - -///////////////////////////////////////////////////// -float CTimer::GetTimeScale() const -{ - return m_cvar_time_scale * m_totalTimeScale; -} - -///////////////////////////////////////////////////// -float CTimer::GetTimeScale(uint32 channel) const -{ - assert(channel < NUM_TIME_SCALE_CHANNELS); - if (channel >= NUM_TIME_SCALE_CHANNELS) - { - return GetTimeScale(); - } - return m_cvar_time_scale * m_timeScaleChannels[channel]; -} - -///////////////////////////////////////////////////// -void CTimer::SetTimeScale(float scale, uint32 channel /* = 0 */) -{ - assert(channel < NUM_TIME_SCALE_CHANNELS); - if (channel >= NUM_TIME_SCALE_CHANNELS) - { - return; - } - - const float currentScale = m_timeScaleChannels[channel]; - - if (scale != currentScale) - { - // Need to adjust previous frame times for time scale to have immediate effect - const float adjustFactor = scale / currentScale; - for (uint32 i = 0; i < MAX_FRAME_AVERAGE; ++i) - { - m_arrFrameTimes[i] *= adjustFactor; - } - - // Update total time scale immediately - m_totalTimeScale *= adjustFactor; - } - - m_timeScaleChannels[channel] = scale; -} - -///////////////////////////////////////////////////// -void CTimer::ClearTimeScales() -{ - if (m_totalTimeScale != 1.0f) - { - // Need to adjust previous frame times for time scale to have immediate effect - const float adjustFactor = 1.0f / m_totalTimeScale; - for (uint32 i = 0; i < MAX_FRAME_AVERAGE; ++i) - { - m_arrFrameTimes[i] *= adjustFactor; - } - } - - for (int i = 0; i < NUM_TIME_SCALE_CHANNELS; ++i) - { - m_timeScaleChannels[i] = 1.0f; - } - m_totalTimeScale = 1.0f; -} - -///////////////////////////////////////////////////// -float CTimer::GetAsyncCurTime() -{ - //int64 llNow = CryGetTicks() - m_lBaseTime_Async; - int64 llNow = CryGetTicks() - m_lBaseTime; - return TicksToSeconds(llNow); -} - -///////////////////////////////////////////////////// -float CTimer::GetFrameRate() -{ - // Use real frame time. - if (m_fRealFrameTime != 0.f) - { - return 1.f / m_fRealFrameTime; - } - return 0.f; -} - -void CTimer::UpdateBlending() -{ - // Accumulate smoothing time up to specified max. - float fFrameTime = m_fRealFrameTime; - m_fSmoothTime = min(m_fSmoothTime + fFrameTime, m_profile_smooth_time); - - if (m_fSmoothTime <= fFrameTime) - { - m_fAvgFrameTime = fFrameTime; - m_fProfileBlend = 1.f; - return; - } - - if (m_profile_weighting <= 2) - { - // Update average frame time. - if (m_fSmoothTime < m_fAvgFrameTime) - { - m_fAvgFrameTime = m_fSmoothTime; - } - m_fAvgFrameTime *= m_fSmoothTime / (m_fSmoothTime - fFrameTime + m_fAvgFrameTime); - - if (m_profile_weighting == 1) - { - // Weight all frames equally. - m_fProfileBlend = m_fAvgFrameTime / m_fSmoothTime; - } - else - { - // Weight frames by time. - m_fProfileBlend = fFrameTime / m_fSmoothTime; - } - } - else - { - // Decay avg frame time, set as new peak. - m_fAvgFrameTime *= 1.f - fFrameTime / m_fSmoothTime; - if (fFrameTime > m_fAvgFrameTime) - { - m_fAvgFrameTime = fFrameTime; - m_fProfileBlend = 1.f; - } - else - { - m_fProfileBlend = 0.f; - } - } -} - -float CTimer::GetProfileFrameBlending(float* pfBlendTime, int* piBlendMode) -{ - if (piBlendMode) - { - *piBlendMode = m_profile_weighting; - } - if (pfBlendTime) - { - *pfBlendTime = m_fSmoothTime; - } - return m_fProfileBlend; -} - -///////////////////////////////////////////////////// -void CTimer::RefreshGameTime(int64 curTime) -{ - assert(curTime + m_lOffsetTime >= 0); - m_CurrTime[ETIMER_GAME].SetSeconds(TicksToSeconds(curTime + m_lOffsetTime)); -} - -///////////////////////////////////////////////////// -void CTimer::RefreshUITime(int64 curTime) -{ - assert(curTime >= 0); - m_CurrTime[ETIMER_UI].SetSeconds(TicksToSeconds(curTime)); -} - - -///////////////////////////////////////////////////// -void CTimer::UpdateOnFrameStart() -{ - if (!m_bEnabled) - { - return; - } - - //int64 now; - - //if (m_fixedTimeModeEnabled) - //{ - // m_nFrameCounter++; - // m_fRealFrameTime = m_fFrameTime = m_fixedTimeModeStep; - // m_lCurrentTime += m_fixedTimeModeStep*m_lTicksPerSec; - // now = m_lCurrentTime; - //} - //else - //{ - // On Windows before Vista, frequency can change (even though it should be impossible), - // See also: https://msdn.microsoft.com/en-us/library/windows/desktop/dn553408(v=vs.85).aspx - // Win2000, WinXP: Uses RDTSC, which may not be monotonic across all cores (a bug), costs in the order of 10~100 cycles (cheap). - // WinVista: Uses HPET or ACPI timer (a kernel call, and much more expensive than RDTSC, but it's not bugged). - // Win7+: RDTSC if the CPU feature bit for monotonic is set, HPET or ACPI otherwise (not bugged). -#if defined(_WIN32_WINNT) && _WIN32_WINNT < 0x0600 - if ((m_nFrameCounter & 127) == 0) - { - // every bunch of frames, check frequency to adapt to - // CPU power management clock rate changes - LARGE_INTEGER TTicksPerSec; - if (QueryPerformanceFrequency(&TTicksPerSec)) - { - // if returns false, no performance counter is available - m_lTicksPerSec = TTicksPerSec.QuadPart; - m_fSecsPerTick = 1.0 / m_lTicksPerSec; - } - } - - m_nFrameCounter++; -#endif - //} - -#ifdef PROFILING - m_fRealFrameTime = m_fFrameTime = 0.020f; // 20ms = 50fps - g_lCurrentTime += (int)(m_fFrameTime * (float)(CTimeValue::TIMEVALUE_PRECISION)); - m_lLastTime = g_lCurrentTime; - RefreshGameTime(m_lLastTime); - RefreshUITime(m_lLastTime); - return; -#endif - - if (m_fixed_time_step < 0.0f) - { - // Enforce real framerate by sleeping. - const int64 elapsedTicks = CryGetTicks() - m_lBaseTime - m_lLastTime; - const int64 minTicks = SecondsToTicks(-m_fixed_time_step); - if (elapsedTicks < minTicks) - { - const int64 ms = (minTicks - elapsedTicks) * 1000 / m_lTicksPerSec; - CrySleep((unsigned int)ms); - } - } - - const int64 now = CryGetTicks(); - assert(now + 1 >= m_lBaseTime && "Invalid base time"); //+1 margin because QPC may be one off across cores - - m_fRealFrameTime = TicksToSeconds(now - m_lBaseTime - m_lLastTime); - - if (0.0f != m_fixed_time_step) - { - // Apply fixed_time_step - m_fFrameTime = abs(m_fixed_time_step); - } - else - { - // Clamp to max_time_step - m_fFrameTime = min(m_fRealFrameTime, m_max_time_step); - } - - // Dilate time. - m_fFrameTime *= GetTimeScale(); - - if (m_TimeSmoothing > 0) - { - m_fFrameTime = GetAverageFrameTime(); - } - - // Time can only go forward. - if (m_fFrameTime < 0.0f) - { - m_fFrameTime = 0.0f; - } - if (m_fRealFrameTime < 0.0f) - { - m_fRealFrameTime = 0.0; - } - - // Adjust the base time so that time actually seems to have moved forward m_fFrameTime - const int64 frameTicks = SecondsToTicks(m_fFrameTime); - const int64 realTicks = SecondsToTicks(m_fRealFrameTime); - m_lBaseTime += realTicks - frameTicks; - if (m_lBaseTime > now) - { - // Guard against rounding errors due to float <-> int64 precision - assert(m_lBaseTime - now <= 10 && "Bad base time or adjustment, too much difference for a rounding error"); - m_lBaseTime = now; - } - const int64 currentTime = now - m_lBaseTime; - - assert(fabsf(TicksToSeconds(currentTime - m_lLastTime) - m_fFrameTime) < 0.01f && "Bad calculation"); - assert(currentTime >= m_lLastTime && "Bad adjustment in previous frame"); - assert(currentTime + m_lOffsetTime >= 0 && "Sum of game time is negative"); - - // Update timers - RefreshUITime(currentTime); - if (!m_bGameTimerPaused) - { - RefreshGameTime(currentTime); - } - - m_lLastTime = currentTime; - - UpdateBlending(); - - if (m_TimeDebug > 1) - { - CryLogAlways("[CTimer]: Cur=%lld Now=%lld Off=%lld Async=%f CurrTime=%f UI=%f", (long long)currentTime, (long long)now, (long long)m_lOffsetTime, GetAsyncCurTime(), GetCurrTime(ETIMER_GAME), GetCurrTime(ETIMER_UI)); - } -} - -//------------------------------------------------------------------------ -//-- average frame-times to avoid stalls and peaks in framerate -//-- note that is is time-base averaging and not frame-based -//------------------------------------------------------------------------ -float CTimer::GetAverageFrameTime() -{ - f32 LastAverageFrameTime = m_fAverageFrameTime; - f32 FrameTime = m_fFrameTime; - - uint32 numFT = MAX_FRAME_AVERAGE; - for (int32 i = (numFT - 2); i > -1; i--) - { - m_arrFrameTimes[i + 1] = m_arrFrameTimes[i]; - } - - if (FrameTime > 0.4f) - { - FrameTime = 0.4f; - } - if (FrameTime < 0.0f) - { - FrameTime = 0.0f; - } - m_arrFrameTimes[0] = FrameTime; - - //get smoothed frame - uint32 avrg_ftime = 1; - if (LastAverageFrameTime) - { - avrg_ftime = uint32(0.25f / LastAverageFrameTime + 0.5f); //average the frame-times for a certain time-period (sec) - if (avrg_ftime > numFT) - { - avrg_ftime = numFT; - } - if (avrg_ftime < 1) - { - avrg_ftime = 1; - } - } - - f32 AverageFrameTime = 0; - for (uint32 i = 0; i < avrg_ftime; i++) - { - AverageFrameTime += m_arrFrameTimes[i]; - } - AverageFrameTime /= avrg_ftime; - - //don't smooth if we pause the game - if (FrameTime < 0.0001f) - { - AverageFrameTime = FrameTime; - } - - m_fAverageFrameTime = AverageFrameTime; - return AverageFrameTime; -} - - -///////////////////////////////////////////////////// -void CTimer::ResetTimer() -{ - m_lBaseTime = CryGetTicks(); - //m_lBaseTime_Async = CryGetTicks(); - m_lLastTime = 0; - m_lOffsetTime = 0; - - m_fFrameTime = 0.0f; - m_fRealFrameTime = 0.0f; - - RefreshGameTime(0); - RefreshUITime(0); - - m_bGameTimerPaused = false; - m_lGameTimerPausedTime = 0; -} - -///////////////////////////////////////////////////// -void CTimer::EnableTimer(bool bEnable) -{ - m_bEnabled = bEnable; -} - -bool CTimer::IsTimerEnabled() const -{ - return m_bEnabled; -} - -///////////////////////////////////////////////////// -CTimeValue CTimer::GetAsyncTime() const -{ - int64 llNow = CryGetTicks(); - double fConvert = CTimeValue::TIMEVALUE_PRECISION * m_fSecsPerTick; - return CTimeValue(int64(llNow * fConvert)); -} - -///////////////////////////////////////////////////// -void CTimer::Serialize(TSerialize ser) -{ - // cannot change m_lBaseTime, as this is used for async time (which shouldn't be affected by save games) - if (ser.IsWriting()) - { - int64 currentGameTime = m_lLastTime + m_lOffsetTime; - - ser.Value("curTime", currentGameTime); - ser.Value("ticksPerSecond", m_lTicksPerSec); - } - else - { - int64 ticksPerSecond = 1, curTime = 1; - ser.Value("curTime", curTime); - ser.Value("ticksPerSecond", ticksPerSecond); - - // Adjust curTime for ticksPerSecond on this machine. - // Some precision will be lost if the frequencies are not identical. - const double multiplier = (double)m_lTicksPerSec / (double)ticksPerSecond; - curTime = (int64)((double)curTime * multiplier); - - SetOffsetToMatchGameTime(curTime); - - if (m_TimeDebug) - { - [[maybe_unused]] const int64 now = CryGetTicks(); - CryLogAlways("[CTimer]: Serialize: Last=%lld Now=%lld Off=%lld Async=%f CurrTime=%f UI=%f", (long long)m_lLastTime, (long long)now, (long long)m_lOffsetTime, GetAsyncCurTime(), GetCurrTime(ETIMER_GAME), GetCurrTime(ETIMER_UI)); - } - } -} - -//! try to pause/unpause a timer -// returns true if successfully paused/unpaused, false otherwise -bool CTimer::PauseTimer(ETimer which, bool bPause) -{ - if (which != ETIMER_GAME) - { - return false; - } - - if (m_bGameTimerPaused == bPause) - { - return false; - } - - m_bGameTimerPaused = bPause; - - if (bPause) - { - m_lGameTimerPausedTime = m_lLastTime + m_lOffsetTime; - if (m_TimeDebug) - { - CryLogAlways("[CTimer]: Pausing ON: Last=%lld Off=%lld Async=%f CurrTime=%f UI=%f", (long long)m_lLastTime, (long long)m_lOffsetTime, GetAsyncCurTime(), GetCurrTime(ETIMER_GAME), GetCurrTime(ETIMER_UI)); - } - } - else - { - SetOffsetToMatchGameTime(m_lGameTimerPausedTime); - m_lGameTimerPausedTime = 0; - if (m_TimeDebug) - { - CryLogAlways("[CTimer]: Pausing OFF: Last=%lld Off=%lld Async=%f CurrTime=%f UI=%f", (long long)m_lLastTime, (long long)m_lOffsetTime, GetAsyncCurTime(), GetCurrTime(ETIMER_GAME), GetCurrTime(ETIMER_UI)); - } - } - - return true; -} - -//! determine if a timer is paused -// returns true if paused, false otherwise -bool CTimer::IsTimerPaused(ETimer which) -{ - if (which != ETIMER_GAME) - { - return false; - } - return m_bGameTimerPaused; -} - -//! try to set a timer -// return true if successful, false otherwise -bool CTimer::SetTimer(ETimer which, float timeInSeconds) -{ - if (which != ETIMER_GAME) - { - return false; - } - - SetOffsetToMatchGameTime(SecondsToTicks(timeInSeconds)); - return true; -} - -ITimer* CTimer::CreateNewTimer() -{ - return new CTimer(); -} - -void CTimer::SecondsToDateUTC(time_t inTime, struct tm& outDateUTC) -{ -#ifdef AZ_COMPILER_MSVC - gmtime_s(&outDateUTC, &inTime); -#else - outDateUTC = *gmtime(&inTime); -#endif -} - -#if defined (WIN32) || defined(WIN64) -time_t gmt_to_local_win32(void) -{ - TIME_ZONE_INFORMATION tzinfo; - DWORD dwStandardDaylight; - long bias; - - dwStandardDaylight = GetTimeZoneInformation(&tzinfo); - bias = tzinfo.Bias; - - if (dwStandardDaylight == TIME_ZONE_ID_STANDARD) - { - bias += tzinfo.StandardBias; - } - - if (dwStandardDaylight == TIME_ZONE_ID_DAYLIGHT) - { - bias += tzinfo.DaylightBias; - } - - return (-bias * 60); -} -#endif - -time_t CTimer::DateToSecondsUTC(struct tm& inDate) -{ -#if defined (WIN32) - return mktime(&inDate) + gmt_to_local_win32(); -#elif defined (LINUX) -#if defined (HAVE_TIMEGM) - // return timegm(&inDate); -#else - // craig: temp disabled the +tm.tm_gmtoff because i can't see the intention here - // and it doesn't compile anymore - // alexl: tm_gmtoff is the offset to greenwhich mean time, whereas mktime uses localtime - // but not all linux distributions have it... - return mktime(&inDate) /*+ tm.tm_gmtoff*/; -#endif -#else - return mktime(&inDate); -#endif -} - -void CTimer::EnableFixedTimeMode([[maybe_unused]] bool enable, [[maybe_unused]] float timeStep) -{ - //if (enable) - //{ - // m_fixedTimeModeEnabled = true; - // m_fixedTimeModeStep = timeStep; - - // m_lBaseTime =0; - // m_lBaseTime_Async = 0; - // m_lLastTime = m_lCurrentTime = 0; - // m_fRealFrameTime = m_fFrameTime = timeStep; - // RefreshGameTime(m_lCurrentTime); - // RefreshUITime(m_lCurrentTime); - // m_lForcedGameTime = -1; - // m_bGameTimerPaused = false; - // m_lGameTimerPausedTime = 0; - //} - //else - //{ - // m_fixedTimeModeEnabled = false; - // ResetTimer(); - //} -} - -void CTimer::SetOffsetToMatchGameTime(int64 ticks) -{ - [[maybe_unused]] const int64 previousOffset = m_lOffsetTime; - [[maybe_unused]] const float previousGameTime = GetCurrTime(ETIMER_GAME); - - m_lOffsetTime = ticks - m_lLastTime; - RefreshGameTime(m_lLastTime); - - if (m_bGameTimerPaused) - { - // On un-pause, we will restore the specified time. - // If we don't do this, the un-pause will over-write the offset again. - m_lGameTimerPausedTime = ticks; - } - - if (m_TimeDebug) - { - CryLogAlways("[CTimer] SetOffset: Offset %lld -> %lld, GameTime %f -> %f", (long long)previousOffset, (long long)m_lOffsetTime, GetCurrTime(ETIMER_GAME), previousGameTime); - } -} - -int64 CTimer::SecondsToTicks(double seconds) const -{ - return (int64)(seconds * (double)m_lTicksPerSec); -} diff --git a/Code/Legacy/CrySystem/Timer.h b/Code/Legacy/CrySystem/Timer.h deleted file mode 100644 index 69fd2357e0..0000000000 --- a/Code/Legacy/CrySystem/Timer.h +++ /dev/null @@ -1,166 +0,0 @@ -/* - * Copyright (c) Contributors to the Open 3D Engine Project. - * For complete copyright and license terms please see the LICENSE at the root of this distribution. - * - * SPDX-License-Identifier: Apache-2.0 OR MIT - * - */ - - -#ifndef CRYINCLUDE_CRYSYSTEM_TIMER_H -#define CRYINCLUDE_CRYSYSTEM_TIMER_H - -# pragma once -#include - -// Implements all common timing routines -class CTimer - : public ITimer -{ -public: - // constructor - CTimer(); - // destructor - ~CTimer() = default; - - bool Init(); - - // interface ITimer ---------------------------------------------------------- - - // TODO: Review m_time usage in System.cpp - // if it wants Game Time / UI Time or a new Render Time? - - void ResetTimer() override; - void UpdateOnFrameStart() override; - float GetCurrTime(ETimer which = ETIMER_GAME) const override; - CTimeValue GetAsyncTime() const override; - float GetAsyncCurTime() override; // retrieve the actual wall clock time passed since the game started, in seconds - float GetFrameTime(ETimer which = ETIMER_GAME) const override; - float GetRealFrameTime() const override; - float GetTimeScale() const override; - float GetTimeScale(uint32 channel) const override; - void SetTimeScale(float scale, uint32 channel = 0) override; - void ClearTimeScales() override; - void EnableTimer(bool bEnable) override; - float GetFrameRate() override; - float GetProfileFrameBlending(float* pfBlendTime = nullptr, int* piBlendMode = nullptr) override; - void Serialize(TSerialize ser) override; - bool IsTimerEnabled() const override; - - //! try to pause/unpause a timer - // returns true if successfully paused/unpaused, false otherwise - bool PauseTimer(ETimer which, bool bPause) override; - - //! determine if a timer is paused - // returns true if paused, false otherwise - bool IsTimerPaused(ETimer which) override; - - //! try to set a timer - // return true if successful, false otherwise - bool SetTimer(ETimer which, float timeInSeconds) override; - - //! make a tm struct from a time_t in UTC (like gmtime) - void SecondsToDateUTC(time_t time, struct tm& outDateUTC) override; - - //! make a UTC time from a tm (like timegm, but not available on all platforms) - time_t DateToSecondsUTC(struct tm& timePtr) override; - - //! Convert from Tics to Seconds - float TicksToSeconds(int64 ticks) override - { - return float((double)ticks * m_fSecsPerTick); - } - - //! Get number of ticks per second - int64 GetTicksPerSecond() override - { - return m_lTicksPerSec; - } - - const CTimeValue& GetFrameStartTime(ETimer which = ETIMER_GAME) const override { return m_CurrTime[(int)which]; } - ITimer* CreateNewTimer() override; - - void EnableFixedTimeMode(bool enable, float timeStep) override; - -private: // --------------------------------------------------------------------- - - // --------------------------------------------------------------------------- - - // updates m_CurrTime (either pass m_lCurrentTime or custom curTime) - void RefreshGameTime(int64 curTime); - void RefreshUITime(int64 curTime); - void UpdateBlending(); - float GetAverageFrameTime(); - - // Updates the game-time offset to match the the specified time. - // The argument is the new number of ticks since the last Reset(). - void SetOffsetToMatchGameTime(int64 ticks); - - // Convert seconds to ticks using the timer frequency. - // Note: Loss of precision may occur, especially if magnitude of argument or timer frequency is large. - int64 SecondsToTicks(double seconds) const; - - enum - { - MAX_FRAME_AVERAGE = 100, - NUM_TIME_SCALE_CHANNELS = 8, - }; - - ////////////////////////////////////////////////////////////////////////// - // Dynamic state, reset by ResetTimer() - ////////////////////////////////////////////////////////////////////////// - CTimeValue m_CurrTime[ETIMER_LAST]; // Time since last Reset(), cached during Update() - - int64 m_lBaseTime; // Ticks elapsed since system boot, all other tick-unit variables are relative to this. - int64 m_lLastTime; // Ticks since last Reset(). This is the base for UI time. UI time is monotonic, it always moves forward at a constant rate until the timer is Reset()). - int64 m_lOffsetTime; // Additional ticks for Game time (relative to UI time). Game time can be affected by loading, pausing, time smoothing and time clamping, as well as SetTimer(). - - //// the GetcurAsyncTime function appears to want to return the actual wall clock time delta - //// but its using the base time (above) which is adjusted when there is a frame skip. - //int64 m_lBaseTime_Async; - - float m_fFrameTime; // In seconds since the last Update(), clamped/smoothed etc. - float m_fRealFrameTime; // In real seconds since the last Update(), non-clamped/un-smoothed etc. - - bool m_bGameTimerPaused; // Set if the game is paused. GetFrameTime() will return 0, GetCurrTime(ETIMER_GAME) will not progress. - int64 m_lGameTimerPausedTime; // The UI time when the game timer was paused. On un-pause, offset will be adjusted to match. - - ////////////////////////////////////////////////////////////////////////// - // Persistant state, kept by ResetTimer() - ////////////////////////////////////////////////////////////////////////// - bool m_bEnabled; - unsigned int m_nFrameCounter; - - int64 m_lTicksPerSec; // Ticks per second - double m_fSecsPerTick; // Seconds per tick - - // smoothing - float m_arrFrameTimes[MAX_FRAME_AVERAGE]; - float m_fAverageFrameTime; // used for smoothing (AverageFrameTime()) - - float m_fAvgFrameTime; // used for blend weighting (UpdateBlending()) - float m_fProfileBlend; // current blending amount for profile. - float m_fSmoothTime; // smoothing interval (up to m_profile_smooth_time). - - // time scale - float m_timeScaleChannels[NUM_TIME_SCALE_CHANNELS]; - float m_totalTimeScale; - - ////////////////////////////////////////////////////////////////////////// - // Console vars, always have default value on secondary CTimer instances - ////////////////////////////////////////////////////////////////////////// - float m_fixed_time_step; // in seconds - float m_max_time_step; // in seconds - float m_cvar_time_scale; // slow down time cvar - int m_TimeSmoothing; // Console Variable, 0=off, otherwise on - int m_TimeDebug; // Console Variable, 0=off, otherwise on - - // Profile averaging help. - float m_profile_smooth_time; // seconds to exponentially smooth profile results. - int m_profile_weighting; // weighting mode (see RegisterVar desc). - - //bool m_fixedTimeModeEnabled; - //float m_fixedTimeModeStep; -}; - -#endif // CRYINCLUDE_CRYSYSTEM_TIMER_H diff --git a/Code/Legacy/CrySystem/ViewSystem/DebugCamera.cpp b/Code/Legacy/CrySystem/ViewSystem/DebugCamera.cpp deleted file mode 100644 index 6eab555ac4..0000000000 --- a/Code/Legacy/CrySystem/ViewSystem/DebugCamera.cpp +++ /dev/null @@ -1,333 +0,0 @@ -/* - * Copyright (c) Contributors to the Open 3D Engine Project. - * For complete copyright and license terms please see the LICENSE at the root of this distribution. - * - * SPDX-License-Identifier: Apache-2.0 OR MIT - * - */ -#include "CrySystem_precompiled.h" -#include "DebugCamera.h" -#include "ISystem.h" -#include "Cry_Camera.h" -#include "IViewSystem.h" - -#include -#include -#include - -using namespace AzFramework; - -namespace LegacyViewSystem -{ -const float g_moveScaleIncrement = 0.1f; -const float g_moveScaleMin = 0.01f; -const float g_moveScaleMax = 10.0f; -const float g_mouseMoveScale = 0.1f; -const float g_gamepadRotationSpeed = 5.0f; -const float g_mouseMaxRotationSpeed = 270.0f; -const float g_moveSpeed = 10.0f; -const float g_maxPitch = 85.0f; -const float g_boostMultiplier = 10.0f; -const float g_minRotationSpeed = 15.0f; -const float g_maxRotationSpeed = 70.0f; - -/////////////////////////////////////////////////////////////////////////////// -DebugCamera::DebugCamera() - : m_mouseMoveMode(0) - , m_isYInverted(0) - , m_cameraMode(DebugCamera::ModeOff) - , m_cameraYawInput(0.0f) - , m_cameraPitchInput(0.0f) - , m_cameraYaw(0.0f) - , m_cameraPitch(0.0f) - , m_moveInput(ZERO) - , m_moveScale(1.0f) - , m_oldMoveScale(1.0f) - , m_position(ZERO) - , m_view(IDENTITY) -{ - InputChannelEventListener::Connect(); -} - -/////////////////////////////////////////////////////////////////////////////// -DebugCamera::~DebugCamera() -{ - InputChannelEventListener::Disconnect(); -} - -/////////////////////////////////////////////////////////////////////////////// -void DebugCamera::OnEnable() -{ - m_position = Vec3_Zero; - m_moveInput = Vec3_Zero; - - Ang3 cameraAngles = Ang3(ZERO); - m_cameraYaw = RAD2DEG(cameraAngles.z); - m_cameraPitch = RAD2DEG(cameraAngles.x); - m_view = Matrix33(Ang3(DEG2RAD(m_cameraPitch), 0.0f, DEG2RAD(m_cameraYaw))); - - m_cameraYawInput = 0.0f; - m_cameraPitchInput = 0.0f; - - m_mouseMoveMode = 0; - m_cameraMode = DebugCamera::ModeFree; -} - -/////////////////////////////////////////////////////////////////////////////// -void DebugCamera::OnDisable() -{ - m_mouseMoveMode = 0; - m_cameraMode = DebugCamera::ModeOff; -} - -/////////////////////////////////////////////////////////////////////////////// -void DebugCamera::OnInvertY() -{ - m_isYInverted = !m_isYInverted; -} - -/////////////////////////////////////////////////////////////////////////////// -void DebugCamera::OnNextMode() -{ - if (m_cameraMode == DebugCamera::ModeFree) - { - m_cameraMode = DebugCamera::ModeFixed; - } - // ... - else if (m_cameraMode == DebugCamera::ModeFixed) - { - // this is the last mode, go to disabled. - OnDisable(); - } -} - -/////////////////////////////////////////////////////////////////////////////// -void DebugCamera::Update() -{ - if (m_cameraMode == DebugCamera::ModeOff) - { - return; - } - - float rotationSpeed = clamp_tpl(m_moveScale, g_minRotationSpeed, g_maxRotationSpeed); - UpdateYaw(m_cameraYawInput * rotationSpeed * gEnv->pTimer->GetFrameTime()); - UpdatePitch(m_cameraPitchInput * rotationSpeed * gEnv->pTimer->GetFrameTime()); - - m_view = Matrix33(Ang3(DEG2RAD(m_cameraPitch), 0.0f, DEG2RAD(m_cameraYaw))); - UpdatePosition(m_moveInput); -} - -/////////////////////////////////////////////////////////////////////////////// -void DebugCamera::PostUpdate() -{ -} - -/////////////////////////////////////////////////////////////////////////////// -bool DebugCamera::OnInputChannelEventFiltered(const InputChannel& inputChannel) -{ - if (!IsEnabled() || m_cameraMode == DebugCamera::ModeFixed || gEnv->pConsole->IsOpened()) - { - return false; - } - - const InputDeviceId& deviceId = inputChannel.GetInputDevice().GetInputDeviceId(); - const InputChannelId& channelId = inputChannel.GetInputChannelId(); - const float eventValue = inputChannel.GetValue(); - if (InputDeviceKeyboard::IsKeyboardDevice(deviceId)) - { - if (channelId == InputDeviceKeyboard::Key::AlphanumericW) - { - m_moveInput.y = eventValue; - } - else if (channelId == InputDeviceKeyboard::Key::AlphanumericS) - { - m_moveInput.y = -eventValue; - } - else if (channelId == InputDeviceKeyboard::Key::AlphanumericA) - { - m_moveInput.x = -eventValue; - } - else if (channelId == InputDeviceKeyboard::Key::AlphanumericD) - { - m_moveInput.x = eventValue; - } - else if (channelId == InputDeviceKeyboard::Key::ModifierShiftL) - { - if (inputChannel.IsStateEnded()) - { - m_moveScale = m_oldMoveScale; - } - else if (inputChannel.IsStateBegan()) - { - m_oldMoveScale = m_moveScale; - m_moveScale = clamp_tpl(m_moveScale * g_boostMultiplier, g_moveScaleMin, g_moveScaleMax); - } - } - } - else if (InputDeviceMouse::IsMouseDevice(deviceId)) - { - if (channelId == InputDeviceMouse::Movement::Z) - { - if (inputChannel.GetValue() > 0) - { - m_moveScale = clamp_tpl(m_moveScale + g_moveScaleIncrement, g_moveScaleMin, g_moveScaleMax); - } - else - { - m_moveScale = clamp_tpl(m_moveScale - g_moveScaleIncrement, g_moveScaleMin, g_moveScaleMax); - } - } - else if (channelId == InputDeviceMouse::Movement::X) - { - //KC: If both left and right mouse buttons are pressed then use - //the mouse movement for horizontal movement. - if (2 != m_mouseMoveMode) - { - UpdateYaw(fsgnf(-eventValue) * clamp_tpl(fabs_tpl(eventValue) * m_moveScale, 0.0f, g_mouseMaxRotationSpeed) * gEnv->pTimer->GetFrameTime()); - } - else - { - UpdatePosition(Vec3(eventValue * g_mouseMoveScale, 0.0f, 0.0f)); - } - } - else if (channelId == InputDeviceMouse::Movement::Y) - { - //KC: If both left and right mouse buttons are pressed then use - //the mouse movement for vertical movement. - if (2 != m_mouseMoveMode) - { - UpdatePitch(fsgnf(-eventValue) * clamp_tpl(fabs_tpl(eventValue) * m_moveScale, 0.0f, g_mouseMaxRotationSpeed) * gEnv->pTimer->GetFrameTime()); - } - else - { - UpdatePosition(Vec3(0.0f, 0.0f, -eventValue * g_mouseMoveScale)); - } - } - else if (channelId == InputDeviceMouse::Button::Left) - { - if (inputChannel.IsStateEnded()) - { - m_mouseMoveMode = clamp_tpl(m_mouseMoveMode - 1, 0, 2); - } - else - { - m_mouseMoveMode = clamp_tpl(m_mouseMoveMode + 1, 0, 2); - } - } - else if (channelId == InputDeviceMouse::Button::Right) - { - if (inputChannel.IsStateEnded()) - { - m_mouseMoveMode = clamp_tpl(m_mouseMoveMode - 1, 0, 2); - } - else - { - m_mouseMoveMode = clamp_tpl(m_mouseMoveMode + 1, 0, 2); - } - } - } - else if (InputDeviceGamepad::IsGamepadDevice(deviceId)) - { - if (channelId == InputDeviceGamepad::Button::DU) - { - m_moveScale = clamp_tpl(m_moveScale + g_moveScaleIncrement, g_moveScaleMin, g_moveScaleMax); - } - else if (channelId == InputDeviceGamepad::Button::DD) - { - m_moveScale = clamp_tpl(m_moveScale - g_moveScaleIncrement, g_moveScaleMin, g_moveScaleMax); - } - else if (channelId == InputDeviceGamepad::Trigger::L2) - { - m_moveInput.z = -eventValue; - } - else if (channelId == InputDeviceGamepad::Trigger::R2) - { - m_moveInput.z = eventValue; - } - else if (channelId == InputDeviceGamepad::ThumbStickAxis1D::LX) - { - m_moveInput.x = eventValue; - } - else if (channelId == InputDeviceGamepad::ThumbStickAxis1D::LY) - { - m_moveInput.y = eventValue; - } - else if (channelId == InputDeviceGamepad::ThumbStickAxis1D::RX) - { - m_cameraYawInput = -eventValue * g_gamepadRotationSpeed; - } - else if (channelId == InputDeviceGamepad::ThumbStickAxis1D::RY) - { - m_cameraPitchInput = eventValue * g_gamepadRotationSpeed; - } - //KC: Use the shoulder buttons to temporarily boost or reduce the scale. - else if (channelId == InputDeviceGamepad::Button::L1) - { - if (inputChannel.IsStateEnded()) - { - m_moveScale = m_oldMoveScale; - } - else if (inputChannel.IsStateBegan()) - { - m_oldMoveScale = m_moveScale; - m_moveScale = clamp_tpl(m_moveScale / g_boostMultiplier, g_moveScaleMin, g_moveScaleMax); - } - } - else if (channelId == InputDeviceGamepad::Button::R1) - { - if (inputChannel.IsStateEnded()) - { - m_moveScale = m_oldMoveScale; - } - else if (inputChannel.IsStateBegan()) - { - m_oldMoveScale = m_moveScale; - m_moveScale = clamp_tpl(m_moveScale * g_boostMultiplier, g_moveScaleMin, g_moveScaleMax); - } - } - } - - return false; -} - -/////////////////////////////////////////////////////////////////////////////// -void DebugCamera::UpdatePitch(float amount) -{ - if (m_isYInverted) - { - amount = -amount; - } - - m_cameraPitch += amount; - m_cameraPitch = clamp_tpl(m_cameraPitch, -g_maxPitch, g_maxPitch); -} - -/////////////////////////////////////////////////////////////////////////////// -void DebugCamera::UpdateYaw(float amount) -{ - m_cameraYaw += amount; - if (m_cameraYaw < 0.0f) - { - m_cameraYaw += 360.0f; - } - else if (m_cameraYaw >= 360.0f) - { - m_cameraYaw -= 360.0f; - } -} - -/////////////////////////////////////////////////////////////////////////////// -void DebugCamera::UpdatePosition(const Vec3& amount) -{ - Vec3 diff = amount * g_moveSpeed * m_moveScale * gEnv->pTimer->GetFrameTime(); - MovePosition(diff); -} - -void DebugCamera::MovePosition(const Vec3& offset) -{ - m_position += m_view.GetColumn0() * offset.x; - m_position += m_view.GetColumn1() * offset.y; - m_position += m_view.GetColumn2() * offset.z; -} - -} // namespace LegacyViewSystem diff --git a/Code/Legacy/CrySystem/ViewSystem/DebugCamera.h b/Code/Legacy/CrySystem/ViewSystem/DebugCamera.h deleted file mode 100644 index c170b73c96..0000000000 --- a/Code/Legacy/CrySystem/ViewSystem/DebugCamera.h +++ /dev/null @@ -1,79 +0,0 @@ -/* - * Copyright (c) Contributors to the Open 3D Engine Project. - * For complete copyright and license terms please see the LICENSE at the root of this distribution. - * - * SPDX-License-Identifier: Apache-2.0 OR MIT - * - */ -#pragma once - -#include - -namespace LegacyViewSystem -{ -/////////////////////////////////////////////////////////////////////////////// -class DebugCamera - : public AzFramework::InputChannelEventListener -{ -public: - enum Mode - { - ModeOff, // no debug cam - ModeFree, // free-fly - ModeFixed, // fixed cam, control goes back to game - }; - - DebugCamera(); - ~DebugCamera() override; - - void Update(); - void PostUpdate(); - bool IsEnabled(); - bool IsFixed(); - bool IsFree(); - - // AzFramework::InputChannelEventListener - bool OnInputChannelEventFiltered(const AzFramework::InputChannel& inputChannel) override; - - void OnEnable(); - void OnDisable(); - void OnInvertY(); - void OnNextMode(); - void UpdatePitch(float amount); - void UpdateYaw(float amount); - void UpdatePosition(const Vec3& amount); - void MovePosition(const Vec3& offset); - -protected: - int m_mouseMoveMode; - int m_isYInverted; - int m_cameraMode; - float m_cameraYawInput; - float m_cameraPitchInput; - float m_cameraYaw; - float m_cameraPitch; - Vec3 m_moveInput; - - float m_moveScale; - float m_oldMoveScale; - Vec3 m_position; - Matrix33 m_view; -}; - - -inline bool DebugCamera::IsEnabled() -{ - return m_cameraMode != DebugCamera::ModeOff; -} - -inline bool DebugCamera::IsFixed() -{ - return m_cameraMode == DebugCamera::ModeFixed; -} - -inline bool DebugCamera::IsFree() -{ - return m_cameraMode == DebugCamera::ModeFree; -} - -} // namespace LegacyViewSystem diff --git a/Code/Legacy/CrySystem/ViewSystem/View.cpp b/Code/Legacy/CrySystem/ViewSystem/View.cpp deleted file mode 100644 index ca5ef3892b..0000000000 --- a/Code/Legacy/CrySystem/ViewSystem/View.cpp +++ /dev/null @@ -1,546 +0,0 @@ -/* - * Copyright (c) Contributors to the Open 3D Engine Project. - * For complete copyright and license terms please see the LICENSE at the root of this distribution. - * - * SPDX-License-Identifier: Apache-2.0 OR MIT - * - */ - - -#include "CrySystem_precompiled.h" - -#include -#include -#include "View.h" -#include -#include -#include -#include -#include - -namespace LegacyViewSystem -{ - -static ICVar* pCamShakeMult = 0; -static ICVar* pHmdReferencePoint = 0; - -//------------------------------------------------------------------------ -CView::CView(ISystem* pSystem) - : m_pSystem(pSystem) - , m_linkedTo(0) - , m_frameAdditiveAngles(0.0f, 0.0f, 0.0f) - , m_scale(1.0f) - , m_zoomedScale(1.0f) -{ - if (!pCamShakeMult) - { - pCamShakeMult = gEnv->pConsole->GetCVar("c_shakeMult"); - } - if (!pHmdReferencePoint) - { - pHmdReferencePoint = gEnv->pConsole->GetCVar("hmd_reference_point"); - } -} - -//------------------------------------------------------------------------ -CView::~CView() -{ -} - -//----------------------------------------------------------------------- -void CView::Release() -{ - delete this; -} - -//------------------------------------------------------------------------ -void CView::Update([[maybe_unused]] float frameTime, [[maybe_unused]] bool isActive) -{ - AZ_ErrorOnce("CryLegacy", false, "CryLegacy view system no longer available (CView::Update)"); -} - -//----------------------------------------------------------------------- -void CView::ApplyFrameAdditiveAngles(Quat& cameraOrientation) -{ - if ((m_frameAdditiveAngles.x != 0.f) || (m_frameAdditiveAngles.y != 0.f) || (m_frameAdditiveAngles.z != 0.f)) - { - Ang3 cameraAngles(cameraOrientation); - cameraAngles += m_frameAdditiveAngles; - - cameraOrientation.SetRotationXYZ(cameraAngles); - - m_frameAdditiveAngles.Set(0.0f, 0.0f, 0.0f); - } -} - -//------------------------------------------------------------------------ -void CView::SetViewShake(Ang3 shakeAngle, Vec3 shakeShift, float duration, float frequency, float randomness, int shakeID, bool bFlipVec, bool bUpdateOnly, bool bGroundOnly) -{ - SShakeParams params; - params.shakeAngle = shakeAngle; - params.shakeShift = shakeShift; - params.frequency = frequency; - params.randomness = randomness; - params.shakeID = shakeID; - params.bFlipVec = bFlipVec; - params.bUpdateOnly = bUpdateOnly; - params.bGroundOnly = bGroundOnly; - params.fadeInDuration = 0; // - params.fadeOutDuration = duration; // originally it was faded out from start. that is why the values are set this way here, to preserve compatibility. - params.sustainDuration = 0; // - - SetViewShakeEx(params); -} - - -//------------------------------------------------------------------------ -void CView::SetViewShakeEx(const SShakeParams& params) -{ - float shakeMult = GetScale(); - if (shakeMult < 0.001f) - { - return; - } - - int shakes = static_cast(m_shakes.size()); - SShake* pSetShake(NULL); - - for (int i = 0; i < shakes; ++i) - { - SShake* pShake = &m_shakes[i]; - if (pShake->ID == params.shakeID) - { - pSetShake = pShake; - break; - } - } - - if (!pSetShake) - { - m_shakes.push_back(SShake(params.shakeID)); - pSetShake = &m_shakes.back(); - } - - if (pSetShake) - { - // this can be set dynamically - pSetShake->frequency = max(0.00001f, params.frequency); - - // the following are set on a 'new' shake as well - if (params.bUpdateOnly == false) - { - pSetShake->amount = params.shakeAngle * shakeMult; - pSetShake->amountVector = params.shakeShift * shakeMult; - pSetShake->randomness = params.randomness; - pSetShake->doFlip = params.bFlipVec; - pSetShake->groundOnly = params.bGroundOnly; - pSetShake->isSmooth = params.isSmooth; - pSetShake->permanent = params.bPermanent; - pSetShake->fadeInDuration = params.fadeInDuration; - pSetShake->sustainDuration = params.sustainDuration; - pSetShake->fadeOutDuration = params.fadeOutDuration; - pSetShake->timeDone = 0; - pSetShake->updating = true; - pSetShake->interrupted = false; - pSetShake->goalShake = Quat(ZERO); - pSetShake->goalShakeSpeed = Quat(ZERO); - pSetShake->goalShakeVector = Vec3(ZERO); - pSetShake->goalShakeVectorSpeed = Vec3(ZERO); - pSetShake->nextShake = 0.0f; - } - } -} - -//------------------------------------------------------------------------ -void CView::SetScale(const float scale) -{ - CRY_ASSERT_MESSAGE(scale == 1.0f || m_scale == 1.0f, "Attempting to CView::SetScale but has already been set!"); - m_scale = scale; -} - -void CView::SetZoomedScale(const float scale) -{ - CRY_ASSERT_MESSAGE(scale == 1.0f || m_zoomedScale == 1.0f, "Attempting to CView::SetZoomedScale but has already been set!"); - m_zoomedScale = scale; -} - -//------------------------------------------------------------------------ -const float CView::GetScale() -{ - float shakeMult(pCamShakeMult->GetFVal()); - return m_scale * shakeMult * m_zoomedScale; -} - -//------------------------------------------------------------------------ -void CView::ProcessShaking(float frameTime) -{ - m_viewParams.currentShakeQuat.SetIdentity(); - m_viewParams.currentShakeShift.zero(); - m_viewParams.shakingRatio = 0; - m_viewParams.groundOnly = false; - - int shakes = static_cast(m_shakes.size()); - for (int i = 0; i < shakes; ++i) - { - ProcessShake(&m_shakes[i], frameTime); - } -} - -//------------------------------------------------------------------------ -void CView::ProcessShake(SShake* pShake, float frameTime) -{ - if (!pShake->updating) - { - return; - } - - pShake->timeDone += frameTime; - - if (pShake->isSmooth) - { - ProcessShakeSmooth(pShake, frameTime); - } - else - { - ProcessShakeNormal(pShake, frameTime); - } -} - -//------------------------------------------------------------------------ -void CView::ProcessShakeNormal(SShake* pShake, float frameTime) -{ - float endSustain = pShake->fadeInDuration + pShake->sustainDuration; - float totalDuration = endSustain + pShake->fadeOutDuration; - - bool finalDamping = (!pShake->permanent && pShake->timeDone > totalDuration) || (pShake->interrupted && pShake->ratio < 0.05f); - - if (finalDamping) - { - ProcessShakeNormal_FinalDamping(pShake, frameTime); - } - else - { - ProcessShakeNormal_CalcRatio(pShake, frameTime, endSustain); - ProcessShakeNormal_DoShaking(pShake, frameTime); - - //for the global shaking ratio keep the biggest - if (pShake->groundOnly) - { - m_viewParams.groundOnly = true; - } - m_viewParams.shakingRatio = max(m_viewParams.shakingRatio, pShake->ratio); - m_viewParams.currentShakeQuat *= pShake->shakeQuat; - m_viewParams.currentShakeShift += pShake->shakeVector; - } -} - -////////////////////////////////////////////////////////////////////////// -void CView::ProcessShakeSmooth(SShake* pShake, float frameTime) -{ - assert(pShake->timeDone >= 0); - - float endTimeFadeIn = pShake->fadeInDuration; - float endTimeSustain = pShake->sustainDuration + endTimeFadeIn; - float totalTime = endTimeSustain + pShake->fadeOutDuration; - - if (pShake->interrupted && endTimeFadeIn <= pShake->timeDone && pShake->timeDone < endTimeSustain) - { - pShake->timeDone = endTimeSustain; - } - - float damping = 1.f; - if (pShake->timeDone < endTimeFadeIn) - { - damping = pShake->timeDone / endTimeFadeIn; - } - else if (endTimeSustain < pShake->timeDone && pShake->timeDone < totalTime) - { - damping = (totalTime - pShake->timeDone) / (totalTime - endTimeSustain); - } - else if (totalTime <= pShake->timeDone) - { - pShake->shakeQuat.SetIdentity(); - pShake->shakeVector.zero(); - pShake->ratio = 0.0f; - pShake->nextShake = 0.0f; - pShake->flip = false; - pShake->updating = false; - return; - } - - ProcessShakeSmooth_DoShaking(pShake, frameTime); - - if (pShake->groundOnly) - { - m_viewParams.groundOnly = true; - } - pShake->ratio = (3.f - 2.f * damping) * damping * damping; // smooth ration change - m_viewParams.shakingRatio = max(m_viewParams.shakingRatio, pShake->ratio); - m_viewParams.currentShakeQuat *= Quat::CreateSlerp(IDENTITY, pShake->shakeQuat, pShake->ratio); - m_viewParams.currentShakeShift += Vec3::CreateLerp(ZERO, pShake->shakeVector, pShake->ratio); -} - -////////////////////////////////////////////////////////////////////////// -void CView::GetRandomQuat(Quat& quat, SShake* pShake) -{ - quat.SetRotationXYZ(pShake->amount); - float randomAmt(pShake->randomness); - float len(fabs(pShake->amount.x) + fabs(pShake->amount.y) + fabs(pShake->amount.z)); - len /= 3.f; - float r = len * randomAmt; - quat *= Quat::CreateRotationXYZ(Ang3(cry_random(-r, r), cry_random(-r, r), cry_random(-r, r))); -} - -////////////////////////////////////////////////////////////////////////// -void CView::GetRandomVector(Vec3& vec, SShake* pShake) -{ - vec = pShake->amountVector; - float randomAmt(pShake->randomness); - float len = fabs(pShake->amountVector.x) + fabs(pShake->amountVector.y) + fabs(pShake->amountVector.z); - len /= 3.f; - float r = len * randomAmt; - vec += Vec3(cry_random(-r, r), cry_random(-r, r), cry_random(-r, r)); -} - -////////////////////////////////////////////////////////////////////////// -void CView::CubeInterpolateQuat(float t, SShake* pShake) -{ - Quat p0 = pShake->startShake; - Quat p1 = pShake->goalShake; - Quat v0 = pShake->startShakeSpeed * 0.5f; - Quat v1 = pShake->goalShakeSpeed * 0.5f; - - pShake->shakeQuat = (((p0 * 2.f + p1 * -2.f + v0 + v1) * t - + (p0 * -3.f + p1 * 3.f + v0 * -2.f - v1)) * t - + (v0)) * t - + p0; - - pShake->shakeQuat.Normalize(); -} - -////////////////////////////////////////////////////////////////////////// -void CView::CubeInterpolateVector(float t, SShake* pShake) -{ - Vec3 p0 = pShake->startShakeVector; - Vec3 p1 = pShake->goalShakeVector; - Vec3 v0 = pShake->startShakeVectorSpeed * 0.8f; - Vec3 v1 = pShake->goalShakeVectorSpeed * 0.8f; - - pShake->shakeVector = (((p0 * 2.f + p1 * -2.f + v0 + v1) * t - + (p0 * -3.f + p1 * 3.f + v0 * -2.f - v1)) * t - + (v0)) * t - + p0; -} - -////////////////////////////////////////////////////////////////////////// -void CView::ProcessShakeSmooth_DoShaking(SShake* pShake, float frameTime) -{ - if (pShake->nextShake <= 0.0f) - { - pShake->nextShake = pShake->frequency; - - pShake->startShake = pShake->goalShake; - pShake->startShakeSpeed = pShake->goalShakeSpeed; - pShake->startShakeVector = pShake->goalShakeVector; - pShake->startShakeVectorSpeed = pShake->goalShakeVectorSpeed; - - GetRandomQuat(pShake->goalShake, pShake); - GetRandomQuat(pShake->goalShakeSpeed, pShake); - GetRandomVector(pShake->goalShakeVector, pShake); - GetRandomVector(pShake->goalShakeVectorSpeed, pShake); - - if (pShake->flip) - { - pShake->goalShake.Invert(); - pShake->goalShakeSpeed.Invert(); - pShake->goalShakeVector = -pShake->goalShakeVector; - pShake->goalShakeVectorSpeed = -pShake->goalShakeVectorSpeed; - } - - if (pShake->doFlip) - { - pShake->flip = !pShake->flip; - } - } - - pShake->nextShake -= frameTime; - - float t = (pShake->frequency - pShake->nextShake) / pShake->frequency; - CubeInterpolateQuat(t, pShake); - CubeInterpolateVector(t, pShake); -} - -////////////////////////////////////////////////////////////////////////// -void CView::ProcessShakeNormal_FinalDamping(SShake* pShake, float frameTime) -{ - pShake->shakeQuat = Quat::CreateSlerp(pShake->shakeQuat, IDENTITY, frameTime * 5.0f); - m_viewParams.currentShakeQuat *= pShake->shakeQuat; - - pShake->shakeVector = Vec3::CreateLerp(pShake->shakeVector, ZERO, frameTime * 5.0f); - m_viewParams.currentShakeShift += pShake->shakeVector; - - float svlen2(pShake->shakeVector.len2()); - bool quatIsIdentity(Quat::IsEquivalent(IDENTITY, pShake->shakeQuat, 0.0001f)); - - if (quatIsIdentity && svlen2 < 0.01f) - { - pShake->shakeQuat.SetIdentity(); - pShake->shakeVector.zero(); - - pShake->ratio = 0.0f; - pShake->nextShake = 0.0f; - pShake->flip = false; - - pShake->updating = false; - } -} - - -// "ratio" is the amplitude of the shaking -void CView::ProcessShakeNormal_CalcRatio(SShake* pShake, float frameTime, float endSustain) -{ - const float FADEOUT_TIME_WHEN_INTERRUPTED = 0.5f; - - if (pShake->interrupted) - { - pShake->ratio = max(0.f, pShake->ratio - (frameTime / FADEOUT_TIME_WHEN_INTERRUPTED)); // fadeout after interrupted - } - else - if (pShake->timeDone >= endSustain && pShake->fadeOutDuration > 0) - { - float timeFading = pShake->timeDone - endSustain; - pShake->ratio = clamp_tpl(1.f - timeFading / pShake->fadeOutDuration, 0.f, 1.f); // fadeOut - } - else - if (pShake->timeDone >= pShake->fadeInDuration) - { - pShake->ratio = 1.f; // sustain - } - else - { - pShake->ratio = min(1.f, pShake->timeDone / pShake->fadeInDuration); // fadeIn - } - - if (pShake->permanent && pShake->timeDone >= pShake->fadeInDuration && !pShake->interrupted) - { - pShake->ratio = 1.f; // permanent standing - } -} - -////////////////////////////////////////////////////////////////////////// -void CView::ProcessShakeNormal_DoShaking(SShake* pShake, float frameTime) -{ - float t; - if (pShake->nextShake <= 0.0f) - { - //angular - pShake->goalShake.SetRotationXYZ(pShake->amount); - if (pShake->flip) - { - pShake->goalShake.Invert(); - } - - //translational - pShake->goalShakeVector = pShake->amountVector; - if (pShake->flip) - { - pShake->goalShakeVector = -pShake->goalShakeVector; - } - - if (pShake->doFlip) - { - pShake->flip = !pShake->flip; - } - - //randomize it a little - float randomAmt(pShake->randomness); - float len(fabs(pShake->amount.x) + fabs(pShake->amount.y) + fabs(pShake->amount.z)); - len /= 3.0f; - float r = len * randomAmt; - pShake->goalShake *= Quat::CreateRotationXYZ(Ang3(cry_random(-r, r), cry_random(-r, r), cry_random(-r, r))); - - //translational randomization - len = fabs(pShake->amountVector.x) + fabs(pShake->amountVector.y) + fabs(pShake->amountVector.z); - len /= 3.0f; - r = len * randomAmt; - pShake->goalShakeVector += Vec3(cry_random(-r, r), cry_random(-r, r), cry_random(-r, r)); - - //damp & bounce it in a non linear fashion - t = 1.0f - (pShake->ratio * pShake->ratio); - pShake->goalShake = Quat::CreateSlerp(pShake->goalShake, IDENTITY, t); - pShake->goalShakeVector = Vec3::CreateLerp(pShake->goalShakeVector, ZERO, t); - - pShake->nextShake = pShake->frequency; - } - - pShake->nextShake = max(0.0f, pShake->nextShake - frameTime); - - t = min(1.0f, frameTime * (1.0f / pShake->frequency)); - pShake->shakeQuat = Quat::CreateSlerp(pShake->shakeQuat, pShake->goalShake, t); - pShake->shakeQuat.Normalize(); - pShake->shakeVector = Vec3::CreateLerp(pShake->shakeVector, pShake->goalShakeVector, t); -} - - -//------------------------------------------------------------------------ -void CView::StopShake(int shakeID) -{ - uint32 num = static_cast(m_shakes.size()); - for (uint32 i = 0; i < num; ++i) - { - if (m_shakes[i].ID == shakeID && m_shakes[i].updating) - { - m_shakes[i].interrupted = true; - } - } -} - - -//------------------------------------------------------------------------ -void CView::ResetShaking() -{ - // disable shakes - std::vector::iterator iter = m_shakes.begin(); - std::vector::iterator iterEnd = m_shakes.end(); - while (iter != iterEnd) - { - SShake& shake = *iter; - shake.updating = false; - shake.timeDone = 0; - ++iter; - } -} - -//------------------------------------------------------------------------ -void CView::LinkTo(AZ::Entity* follow) -{ - CRY_ASSERT(follow); - m_azEntity = follow; - m_linkedTo = follow->GetId(); - m_viewParams.targetPos = Vec3();// This should be quickly overwritten by the camera's acutal position from its matrix -} - -//------------------------------------------------------------------------ -void CView::Unlink() -{ - m_azEntity = nullptr; - m_linkedTo.SetInvalid(); - m_viewParams.targetPos = Vec3(); -} - -//------------------------------------------------------------------------ -void CView::SetFrameAdditiveCameraAngles(const Ang3& addFrameAngles) -{ - m_frameAdditiveAngles = addFrameAngles; -} - -void CView::PostSerialize() -{ -} - -////////////////////////////////////////////////////////////////////////// -void CView::SetActive([[maybe_unused]] bool const bActive) -{ -} - -} // namespace LegacyViewSystem diff --git a/Code/Legacy/CrySystem/ViewSystem/View.h b/Code/Legacy/CrySystem/ViewSystem/View.h deleted file mode 100644 index 001bf694fd..0000000000 --- a/Code/Legacy/CrySystem/ViewSystem/View.h +++ /dev/null @@ -1,152 +0,0 @@ -/* - * Copyright (c) Contributors to the Open 3D Engine Project. - * For complete copyright and license terms please see the LICENSE at the root of this distribution. - * - * SPDX-License-Identifier: Apache-2.0 OR MIT - * - */ - - -// Description : View System interfaces. - -# pragma once - -#include "IViewSystem.h" -#include - -class CGameObject; -struct ISystem; - -namespace LegacyViewSystem -{ - -class CView - : public IView -{ -public: - - CView(ISystem* pSystem); - ~CView() override; - - //shaking - struct SShake - { - bool updating; - bool flip; - bool doFlip; - bool groundOnly; - bool permanent; - bool interrupted; // when forcefully stopped - bool isSmooth; - - int ID; - - float nextShake; - float timeDone; - float sustainDuration; - float fadeInDuration; - float fadeOutDuration; - - float frequency; - float ratio; - - float randomness; - - Quat startShake; - Quat startShakeSpeed; - Vec3 startShakeVector; - Vec3 startShakeVectorSpeed; - - Quat goalShake; - Quat goalShakeSpeed; - Vec3 goalShakeVector; - Vec3 goalShakeVectorSpeed; - - Ang3 amount; - Vec3 amountVector; - - Quat shakeQuat; - Vec3 shakeVector; - - SShake(int shakeID) - { - memset(this, 0, sizeof(SShake)); - - startShake.SetIdentity(); - startShakeSpeed.SetIdentity(); - goalShake.SetIdentity(); - shakeQuat.SetIdentity(); - - randomness = 0.5f; - - ID = shakeID; - } - }; - - - // IView - void Release() override; - void Update(float frameTime, bool isActive) override; - virtual void ProcessShaking(float frameTime); - virtual void ProcessShake(SShake* pShake, float frameTime); - void ResetShaking() override; - void ResetBlending() override { m_viewParams.ResetBlending(); } - void LinkTo(AZ::Entity* follow) override; - void Unlink() override; - AZ::EntityId GetLinkedId() override {return m_linkedTo; }; - void SetCurrentParams(SViewParams& params) override { m_viewParams = params; }; - const SViewParams* GetCurrentParams() override {return &m_viewParams; } - void SetViewShake(Ang3 shakeAngle, Vec3 shakeShift, float duration, float frequency, float randomness, int shakeID, bool bFlipVec = true, bool bUpdateOnly = false, bool bGroundOnly = false) override; - void SetViewShakeEx(const SShakeParams& params) override; - void StopShake(int shakeID) override; - void SetFrameAdditiveCameraAngles(const Ang3& addFrameAngles) override; - void SetScale(const float scale) override; - void SetZoomedScale(const float scale) override; - void SetActive(const bool bActive) override; - // ~IView - - void PostSerialize() override; - CCamera& GetCamera() override { return m_camera; } - const CCamera& GetCamera() const override { return m_camera; } - -protected: - - void ProcessShakeNormal(SShake* pShake, float frameTime); - void ProcessShakeNormal_FinalDamping(SShake* pShake, float frameTime); - void ProcessShakeNormal_CalcRatio(SShake* pShake, float frameTime, float endSustain); - void ProcessShakeNormal_DoShaking(SShake* pShake, float frameTime); - - void ProcessShakeSmooth(SShake* pShake, float frameTime); - void ProcessShakeSmooth_DoShaking(SShake* pShake, float frameTime); - - void ApplyFrameAdditiveAngles(Quat& cameraOrientation); - - const float GetScale(); - -private: - - void GetRandomQuat(Quat& quat, SShake* pShake); - void GetRandomVector(Vec3& vec3, SShake* pShake); - void CubeInterpolateQuat(float t, SShake* pShake); - void CubeInterpolateVector(float t, SShake* pShake); - -protected: - - bool m_active; - AZ::EntityId m_linkedTo; - AZ::Entity* m_azEntity = nullptr; - - SViewParams m_viewParams; - CCamera m_camera; - - ISystem* m_pSystem; - - std::vector m_shakes; - - Ang3 m_frameAdditiveAngles; // Used mainly for cinematics, where the game can slightly override camera orientation - - float m_scale; - float m_zoomedScale; -}; - -} // namespace LegacyViewSystem diff --git a/Code/Legacy/CrySystem/ViewSystem/ViewSystem.cpp b/Code/Legacy/CrySystem/ViewSystem/ViewSystem.cpp deleted file mode 100644 index d7e5c081c0..0000000000 --- a/Code/Legacy/CrySystem/ViewSystem/ViewSystem.cpp +++ /dev/null @@ -1,656 +0,0 @@ -/* - * Copyright (c) Contributors to the Open 3D Engine Project. - * For complete copyright and license terms please see the LICENSE at the root of this distribution. - * - * SPDX-License-Identifier: Apache-2.0 OR MIT - * - */ - - -#include "CrySystem_precompiled.h" - -#include - -#include -#include -#include "ViewSystem.h" -#include "PNoise3.h" -#include "DebugCamera.h" -#include - -#include - -#define VS_CALL_LISTENERS(func) \ - { \ - size_t count = m_listeners.size(); \ - if (count > 0) \ - { \ - const size_t memSize = count * sizeof(IViewSystemListener*); \ - IViewSystemListener* *pArray = (IViewSystemListener**) alloca(memSize); \ - memcpy(pArray, &*m_listeners.begin(), memSize); \ - while (count--) \ - { \ - (*pArray)->func; ++pArray; \ - } \ - } \ - } - -namespace LegacyViewSystem -{ - -void ToggleDebugCamera([[maybe_unused]] IConsoleCmdArgs* pArgs) -{ -#if !defined(_RELEASE) - if (!gEnv->IsDedicated()) - { - DebugCamera* debugCamera = CViewSystem::s_debugCamera; - if (debugCamera) - { - if (!debugCamera->IsEnabled()) - { - debugCamera->OnEnable(); - } - else - { - debugCamera->OnNextMode(); - } - } - } -#endif -} - -void ToggleDebugCameraInvertY([[maybe_unused]] IConsoleCmdArgs* pArgs) -{ -#if !defined(_RELEASE) - if (!gEnv->IsDedicated()) - { - DebugCamera* debugCamera = CViewSystem::s_debugCamera; - if (debugCamera) - { - debugCamera->OnInvertY(); - } - } -#endif -} - -void DebugCameraMove([[maybe_unused]] IConsoleCmdArgs* pArgs) -{ -#if !defined(_RELEASE) - if (!gEnv->IsDedicated()) - { - if (pArgs->GetArgCount() != 4) - { - CryLogAlways("debugCameraMove requires 3 args, not %d.", pArgs->GetArgCount() - 1); - return; - } - - DebugCamera* debugCamera = CViewSystem::s_debugCamera; - if (debugCamera && debugCamera->IsFree()) - { - Vec3::value_type x = azlossy_cast(atof(pArgs->GetArg(1))); - Vec3::value_type y = azlossy_cast(atof(pArgs->GetArg(2))); - Vec3::value_type z = azlossy_cast(atof(pArgs->GetArg(3))); - Vec3 newPos(x, y, z); - debugCamera->MovePosition(newPos); - } - } -#endif -} - -DebugCamera* CViewSystem::s_debugCamera = nullptr; - -//------------------------------------------------------------------------ -CViewSystem::CViewSystem(ISystem* pSystem) - : m_pSystem(pSystem) - , m_activeViewId(0) - , m_nextViewIdToAssign(1000) - , m_preSequenceViewId(0) - , m_cutsceneViewId(0) - , m_cutsceneCount(0) - , m_bOverridenCameraRotation(false) - , m_bActiveViewFromSequence(false) - , m_fBlendInPosSpeed(0.0f) - , m_fBlendInRotSpeed(0.0f) - , m_bPerformBlendOut(false) - , m_useDeferredViewSystemUpdate(false) - , m_bControlsAudioListeners(true) -{ -#if !defined(_RELEASE) - if (!gEnv->IsDedicated()) - { - if (!s_debugCamera) - { - s_debugCamera = new DebugCamera; - } - - REGISTER_COMMAND("debugCameraToggle", ToggleDebugCamera, VF_DEV_ONLY, "Toggle the debug camera.\n"); - REGISTER_COMMAND("debugCameraInvertY", ToggleDebugCameraInvertY, VF_DEV_ONLY, "Toggle debug camera Y-axis inversion.\n"); - REGISTER_COMMAND("debugCameraMove", DebugCameraMove, VF_DEV_ONLY, "Move the debug camera the specified distance (x y z).\n"); - gEnv->pConsole->CreateKeyBind("ctrl_keyboard_key_punctuation_backslash", "debugCameraToggle"); - gEnv->pConsole->CreateKeyBind("alt_keyboard_key_punctuation_backslash", "debugCameraInvertY"); - } -#endif - - REGISTER_CVAR2("cl_camera_noise", &m_fCameraNoise, -1, 0, - "Adds hand-held like camera noise to the camera view. \n The higher the value, the higher the noise.\n A value <= 0 disables it."); - REGISTER_CVAR2("cl_camera_noise_freq", &m_fCameraNoiseFrequency, 2.5326173f, 0, - "Defines camera noise frequency for the camera view. \n The higher the value, the higher the noise."); - - REGISTER_CVAR2("cl_ViewSystemDebug", &m_nViewSystemDebug, 0, VF_CHEAT, - "Sets Debug information of the ViewSystem."); - - REGISTER_CVAR2("cl_DefaultNearPlane", &m_fDefaultCameraNearZ, DEFAULT_NEAR, VF_CHEAT, - "The default camera near plane. "); - - //Register as level system listener - if (m_pSystem->GetILevelSystem()) - { - m_pSystem->GetILevelSystem()->AddListener(this); - } - - Camera::CameraSystemRequestBus::Handler::BusConnect(); -} - -//------------------------------------------------------------------------ -CViewSystem::~CViewSystem() -{ - Camera::CameraSystemRequestBus::Handler::BusDisconnect(); - - ClearAllViews(); - - IConsole* pConsole = gEnv->pConsole; - CRY_ASSERT(pConsole); - pConsole->UnregisterVariable("cl_camera_noise", true); - pConsole->UnregisterVariable("cl_camera_noise_freq", true); - pConsole->UnregisterVariable("cl_ViewSystemDebug", true); - pConsole->UnregisterVariable("cl_DefaultNearPlane", true); - - //Remove as level system listener - if (m_pSystem->GetILevelSystem()) - { - m_pSystem->GetILevelSystem()->RemoveListener(this); - } - -#if !defined(_RELEASE) - if (!gEnv->IsDedicated()) - { - UNREGISTER_COMMAND("debugCameraToggle"); - UNREGISTER_COMMAND("debugCameraInvertY"); - UNREGISTER_COMMAND("debugCameraMove"); - - if (s_debugCamera) - { - delete s_debugCamera; - s_debugCamera = nullptr; - } - } -#endif -} - -//------------------------------------------------------------------------ -void CViewSystem::Update(float frameTime) -{ - if (gEnv->IsDedicated()) - { - return; - } - - if (s_debugCamera) - { - s_debugCamera->Update(); - } - - CView* const pActiveView = static_cast(GetActiveView()); - - TViewMap::const_iterator Iter(m_views.begin()); - TViewMap::const_iterator const IterEnd(m_views.end()); - - for (; Iter != IterEnd; ++Iter) - { - IView* const pView = Iter->second; - - bool const bIsActive = (pView == pActiveView); - - pView->Update(frameTime, bIsActive); - - if (bIsActive) - { - CCamera& rCamera = pView->GetCamera(); - if (const SViewParams* currentParams = pView->GetCurrentParams()) - { - SViewParams copyCurrentParams = *currentParams; - rCamera.SetJustActivated(copyCurrentParams.justActivated); - - copyCurrentParams.justActivated = false; - pView->SetCurrentParams(copyCurrentParams); - } - - if (m_bOverridenCameraRotation) - { - // When camera rotation is overridden. - Vec3 pos = rCamera.GetMatrix().GetTranslation(); - Matrix34 camTM(m_overridenCameraRotation); - camTM.SetTranslation(pos); - rCamera.SetMatrix(camTM); - } - else - { - // Normal setting of the camera - - if (m_fCameraNoise > 0) - { - Matrix33 m = Matrix33(rCamera.GetMatrix()); - m.OrthonormalizeFast(); - Ang3 aAng1 = Ang3::GetAnglesXYZ(m); - //Ang3 aAng2 = RAD2DEG(aAng1); - - Matrix34 camTM = rCamera.GetMatrix(); - Vec3 pos = camTM.GetTranslation(); - camTM.SetIdentity(); - - const float fScale = 0.1f; - CPNoise3* pNoise = m_pSystem->GetNoiseGen(); - float fRes = pNoise->Noise1D(gEnv->pTimer->GetCurrTime() * m_fCameraNoiseFrequency); - aAng1.x += fRes * m_fCameraNoise * fScale; - pos.z -= fRes * m_fCameraNoise * fScale; - fRes = pNoise->Noise1D(17 + gEnv->pTimer->GetCurrTime() * m_fCameraNoiseFrequency); - aAng1.y -= fRes * m_fCameraNoise * fScale; - - //aAng1.z+=fRes*0.025f; // left / right movement should be much less visible - - camTM.SetRotationXYZ(aAng1); - camTM.SetTranslation(pos); - rCamera.SetMatrix(camTM); - } - } - - AZ_ErrorOnce("CryLegacy", false, "CryLegacy view system no longer available (CViewSystem::Update)"); - } - } - - if (s_debugCamera) - { - s_debugCamera->PostUpdate(); - } - - // Display debug info on screen - if (m_nViewSystemDebug) - { - DebugDraw(); - } -} - -//------------------------------------------------------------------------ -IView* CViewSystem::CreateView() -{ - CView* newView = new CView(m_pSystem); - - if (newView) - { - AddView(newView); - } - - return newView; -} - -unsigned int CViewSystem::AddView(IView* pView) -{ - assert(pView); - - m_views.insert(TViewMap::value_type(m_nextViewIdToAssign, pView)); - return m_nextViewIdToAssign++; -} - -void CViewSystem::RemoveView(IView* pView) -{ - RemoveViewById(GetViewId(pView)); -} - -void CViewSystem::RemoveView(unsigned int viewId) -{ - RemoveViewById(viewId); -} - -void CViewSystem::RemoveViewById(unsigned int viewId) -{ - TViewMap::iterator iter = m_views.find(viewId); - - if (iter != m_views.end()) - { - if (viewId == m_activeViewId) - { - m_activeViewId = 0; - } - if (viewId == m_preSequenceViewId) - { - m_preSequenceViewId = 0; - } - SAFE_RELEASE(iter->second); - m_views.erase(iter); - } -} - -//------------------------------------------------------------------------ -void CViewSystem::SetActiveView(IView* pView) -{ - if (pView != NULL) - { - IView* const pPrevView = GetView(m_activeViewId); - - if (pPrevView != pView) - { - if (pPrevView != NULL) - { - pPrevView->SetActive(false); - } - - pView->SetActive(true); - m_activeViewId = GetViewId(pView); - } - } - else - { - m_activeViewId = ~0u; - } - - m_bActiveViewFromSequence = false; -} - -//------------------------------------------------------------------------ -void CViewSystem::SetActiveView(unsigned int viewId) -{ - IView* const pPrevView = GetView(m_activeViewId); - - if (pPrevView != NULL) - { - pPrevView->SetActive(false); - } - - IView* const pView = GetView(viewId); - - if (pView != NULL) - { - pView->SetActive(true); - m_activeViewId = viewId; - m_bActiveViewFromSequence = false; - } -} - -//------------------------------------------------------------------------ -IView* CViewSystem::GetView(unsigned int viewId) -{ - TViewMap::iterator it = m_views.find(viewId); - - if (it != m_views.end()) - { - return it->second; - } - - return NULL; -} - -//------------------------------------------------------------------------ -IView* CViewSystem::GetActiveView() -{ - return GetView(m_activeViewId); -} - -//------------------------------------------------------------------------ -unsigned int CViewSystem::GetViewId(IView* pView) -{ - for (TViewMap::iterator it = m_views.begin(); it != m_views.end(); ++it) - { - IView* tView = it->second; - - if (tView == pView) - { - return it->first; - } - } - - return 0; -} - -//------------------------------------------------------------------------ -unsigned int CViewSystem::GetActiveViewId() -{ - // cutscene can override the games id of the active view - if (m_cutsceneCount && m_cutsceneViewId) - { - return m_cutsceneViewId; - } - return m_activeViewId; -} - -//------------------------------------------------------------------------ -IView* CViewSystem::GetViewByEntityId(const AZ::EntityId& id, bool forceCreate) -{ - for (TViewMap::iterator it = m_views.begin(); it != m_views.end(); ++it) - { - IView* tView = it->second; - - if (tView && tView->GetLinkedId() == id) - { - return tView; - } - } - - if (forceCreate) - { - // Component Camera - AZ::Entity* entity = nullptr; - AZ::ComponentApplicationBus::BroadcastResult(entity, &AZ::ComponentApplicationBus::Events::FindEntity, id); - if (entity) - { - if (IView* pNew = CreateView()) - { - pNew->LinkTo(entity); - return pNew; - } - } - } - - return nullptr; -} - -//------------------------------------------------------------------------ -void CViewSystem::SetActiveCamera(const SCameraParams& params) -{ - IView* pView = NULL; - - if (params.cameraEntityId.IsValid()) - { - pView = GetViewByEntityId(params.cameraEntityId, true); - if (pView) - { - SViewParams viewParams = *pView->GetCurrentParams(); - viewParams.fov = params.fov; - viewParams.nearplane = params.nearZ; - - if (m_bActiveViewFromSequence == false && m_preSequenceViewId == 0) - { - m_preSequenceViewId = m_activeViewId; - IView* pPrevView = GetView(m_activeViewId); - if (pPrevView && m_fBlendInPosSpeed > 0.0f && m_fBlendInRotSpeed > 0.0f) - { - viewParams.blendPosSpeed = m_fBlendInPosSpeed; - viewParams.blendRotSpeed = m_fBlendInRotSpeed; - viewParams.BlendFrom(*pPrevView->GetCurrentParams()); - } - } - - if (m_activeViewId != GetViewId(pView) && params.justActivated) - { - viewParams.justActivated = true; - } - - pView->SetCurrentParams(viewParams); - // make this one the active view - SetActiveView(pView); - m_bActiveViewFromSequence = true; - } - } - else - { - if (m_preSequenceViewId != 0) - { - // Restore m_preSequenceViewId view - - IView* pActiveView = GetView(m_activeViewId); - IView* pNewView = GetView(m_preSequenceViewId); - if (pActiveView && pNewView && m_bPerformBlendOut) - { - SViewParams activeViewParams = *pActiveView->GetCurrentParams(); - SViewParams newViewParams = *pNewView->GetCurrentParams(); - newViewParams.BlendFrom(activeViewParams); - newViewParams.blendPosSpeed = activeViewParams.blendPosSpeed; - newViewParams.blendRotSpeed = activeViewParams.blendRotSpeed; - - if (m_activeViewId != m_preSequenceViewId && params.justActivated) - { - newViewParams.justActivated = true; - } - - pNewView->SetCurrentParams(newViewParams); - SetActiveView(m_preSequenceViewId); - } - else if (pActiveView && m_activeViewId != m_preSequenceViewId && params.justActivated) - { - SViewParams activeViewParams = *pActiveView->GetCurrentParams(); - activeViewParams.justActivated = true; - - if (pNewView) - { - pNewView->SetCurrentParams(activeViewParams); - SetActiveView(m_preSequenceViewId); - } - } - - m_preSequenceViewId = 0; - m_bActiveViewFromSequence = false; - } - } - m_cutsceneViewId = GetViewId(pView); - - VS_CALL_LISTENERS(OnCameraChange(params)); -} - -//------------------------------------------------------------------------ -void CViewSystem::BeginCutScene(IAnimSequence* pSeq, [[maybe_unused]] unsigned long dwFlags, bool bResetFX) -{ - m_cutsceneCount++; - - VS_CALL_LISTENERS(OnBeginCutScene(pSeq, bResetFX)); -} - -//------------------------------------------------------------------------ -void CViewSystem::EndCutScene(IAnimSequence* pSeq, [[maybe_unused]] unsigned long dwFlags) -{ - m_cutsceneCount -= (m_cutsceneCount > 0); - - ClearCutsceneViews(); - - VS_CALL_LISTENERS(OnEndCutScene(pSeq)); -} - -void CViewSystem::SendGlobalEvent([[maybe_unused]] const char* pszEvent) -{ - // TODO: broadcast to script system -} - -////////////////////////////////////////////////////////////////////////// -void CViewSystem::SetOverrideCameraRotation(bool bOverride, Quat rotation) -{ - m_bOverridenCameraRotation = bOverride; - m_overridenCameraRotation = rotation; -} - -////////////////////////////////////////////////////////////////// -void CViewSystem::OnLoadingStart([[maybe_unused]] const char* levelName) -{ - //If the level is being restarted (IsSerializingFile() == 1) - //views should not be cleared, because the main view (player one) won't be recreated in this case - //Views will only be cleared when loading a new map, or loading a saved game (IsSerizlizingFile() == 2) - bool shouldClearViews = gEnv->pSystem ? (gEnv->pSystem->IsSerializingFile() != 1) : false; - - if (shouldClearViews) - { - ClearAllViews(); - } -} - -///////////////////////////////////////////////////////////////////// -void CViewSystem::OnUnloadComplete([[maybe_unused]] const char* levelName) -{ - bool shouldClearViews = gEnv->pSystem ? (gEnv->pSystem->IsSerializingFile() != 1) : false; - - if (shouldClearViews) - { - ClearAllViews(); - } - - assert(m_listeners.empty()); - stl::free_container(m_listeners); -} - -///////////////////////////////////////////////////////////////////// -void CViewSystem::ClearCutsceneViews() -{ - //First switch to previous camera if available - //In practice, the camera should be already restored before reaching this point, but just in case. - if (m_preSequenceViewId != 0) - { - SCameraParams camParams; - camParams.cameraEntityId.SetInvalid(); //Setting to invalid will try to switch to previous camera - camParams.fov = 60.0f; - camParams.nearZ = DEFAULT_NEAR; - camParams.justActivated = true; - SetActiveCamera(camParams); - } -} - -/////////////////////////////////////////// -void CViewSystem::ClearAllViews() -{ - TViewMap::iterator end = m_views.end(); - for (TViewMap::iterator it = m_views.begin(); it != end; ++it) - { - SAFE_RELEASE(it->second); - } - stl::free_container(m_views); - m_preSequenceViewId = 0; - m_activeViewId = 0; -} - -//////////////////////////////////////////////////////////////////// -void CViewSystem::DebugDraw() -{ -} - -////////////////////////////////////////////////////////////////////////// -void CViewSystem::PostSerialize() -{ - TViewMap::iterator iter = m_views.begin(); - TViewMap::iterator iterEnd = m_views.end(); - while (iter != iterEnd) - { - iter->second->PostSerialize(); - ++iter; - } -} - -/////////////////////////////////////////////////////////////////////////// -void CViewSystem::SetControlAudioListeners(bool bActive) -{ - m_bControlsAudioListeners = bActive; - - TViewMap::const_iterator Iter(m_views.begin()); - TViewMap::const_iterator const IterEnd(m_views.end()); - - for (; Iter != IterEnd; ++Iter) - { - Iter->second->SetActive(bActive); - } -} - -} // namespace LegacyViewSystem diff --git a/Code/Legacy/CrySystem/ViewSystem/ViewSystem.h b/Code/Legacy/CrySystem/ViewSystem/ViewSystem.h deleted file mode 100644 index 80d1faed15..0000000000 --- a/Code/Legacy/CrySystem/ViewSystem/ViewSystem.h +++ /dev/null @@ -1,151 +0,0 @@ -/* - * Copyright (c) Contributors to the Open 3D Engine Project. - * For complete copyright and license terms please see the LICENSE at the root of this distribution. - * - * SPDX-License-Identifier: Apache-2.0 OR MIT - * - */ - - -// Description : View System interfaces. - -#pragma once - -#include "View.h" -#include "IMovieSystem.h" -#include -#include - -namespace LegacyViewSystem -{ - -class DebugCamera; - -class CViewSystem - : public IViewSystem - , public IMovieUser - , public ILevelSystemListener - , public Camera::CameraSystemRequestBus::Handler -{ -private: - - using TViewMap = std::map; - using TViewIdVector = std::vector; - -public: - - //IViewSystem - IView* CreateView() override; - unsigned int AddView(IView* pView) override; - void RemoveView(IView* pView) override; - void RemoveView(unsigned int viewId) override; - - void SetActiveView(IView* pView) override; - void SetActiveView(unsigned int viewId) override; - - //CameraSystemRequestBus - AZ::EntityId GetActiveCamera() override { return m_activeViewId ? GetActiveView()->GetLinkedId() : AZ::EntityId(); } - - //utility functions - IView* GetView(unsigned int viewId) override; - IView* GetActiveView() override; - - unsigned int GetViewId(IView* pView) override; - unsigned int GetActiveViewId() override; - - void PostSerialize() override; - - IView* GetViewByEntityId(const AZ::EntityId& id, bool forceCreate) override; - - float GetDefaultZNear() override { return m_fDefaultCameraNearZ; }; - void SetBlendParams(float fBlendPosSpeed, float fBlendRotSpeed, bool performBlendOut) override { m_fBlendInPosSpeed = fBlendPosSpeed; m_fBlendInRotSpeed = fBlendRotSpeed; m_bPerformBlendOut = performBlendOut; }; - void SetOverrideCameraRotation(bool bOverride, Quat rotation) override; - bool IsPlayingCutScene() const override - { - return m_cutsceneCount > 0; - } - void SetDeferredViewSystemUpdate(bool const bDeferred) override{ m_useDeferredViewSystemUpdate = bDeferred; } - bool UseDeferredViewSystemUpdate() const override { return m_useDeferredViewSystemUpdate; } - void SetControlAudioListeners(bool const bActive) override; - //~IViewSystem - - //IMovieUser - void SetActiveCamera(const SCameraParams& Params) override; - void BeginCutScene(IAnimSequence* pSeq, unsigned long dwFlags, bool bResetFX) override; - void EndCutScene(IAnimSequence* pSeq, unsigned long dwFlags) override; - void SendGlobalEvent(const char* pszEvent) override; - //~IMovieUser - - // ILevelSystemListener - void OnLevelNotFound([[maybe_unused]] const char* levelName) override {}; - void OnLoadingStart([[maybe_unused]] const char* levelName) override; - void OnLoadingComplete([[maybe_unused]] const char* levelName) override{}; - void OnLoadingError([[maybe_unused]] const char* levelName, [[maybe_unused]] const char* error) override{}; - void OnLoadingProgress([[maybe_unused]] const char* levelName, [[maybe_unused]] int progressAmount) override{}; - void OnUnloadComplete([[maybe_unused]] const char* levelName) override; - //~ILevelSystemListener - - CViewSystem(ISystem* pSystem); - ~CViewSystem(); - - void Release() override { delete this; }; - void Update(float frameTime) override; - - void ForceUpdate(float elapsed) override { Update(elapsed); } - - //void RegisterViewClass(const char *name, IView *(*func)()); - - bool AddListener(IViewSystemListener* pListener) override - { - return stl::push_back_unique(m_listeners, pListener); - } - - bool RemoveListener(IViewSystemListener* pListener) override - { - return stl::find_and_erase(m_listeners, pListener); - } - - void ClearAllViews(); - -private: - - void RemoveViewById(unsigned int viewId); - void ClearCutsceneViews(); - void DebugDraw(); - - ISystem* m_pSystem; - - //TViewClassMap m_viewClasses; - TViewMap m_views; - - // Listeners - std::vector m_listeners; - - unsigned int m_activeViewId; - unsigned int m_nextViewIdToAssign; // next id which will be assigned - unsigned int m_preSequenceViewId; // viewId before a movie cam dropped in - - unsigned int m_cutsceneViewId; - unsigned int m_cutsceneCount; - - bool m_bActiveViewFromSequence; - - bool m_bOverridenCameraRotation; - Quat m_overridenCameraRotation; - float m_fCameraNoise; - float m_fCameraNoiseFrequency; - - float m_fDefaultCameraNearZ; - float m_fBlendInPosSpeed; - float m_fBlendInRotSpeed; - bool m_bPerformBlendOut; - int m_nViewSystemDebug; - - bool m_useDeferredViewSystemUpdate; - bool m_bControlsAudioListeners; - -public: - static DebugCamera* s_debugCamera; -}; - -} // namespace LegacyViewSystem diff --git a/Code/Legacy/CrySystem/XConsole.cpp b/Code/Legacy/CrySystem/XConsole.cpp index 9f60a9dd8d..df82e34abe 100644 --- a/Code/Legacy/CrySystem/XConsole.cpp +++ b/Code/Legacy/CrySystem/XConsole.cpp @@ -16,7 +16,6 @@ #include "System.h" #include "ConsoleBatchFile.h" -#include #include #include #include @@ -28,6 +27,7 @@ #include #include #include +#include #include //#define DEFENCE_CVAR_HASH_LOGGING @@ -105,7 +105,8 @@ void Command_SetWaitSeconds(IConsoleCmdArgs* pCmd) if (pCmd->GetArgCount() > 1) { pConsole->m_waitSeconds.SetSeconds(atof(pCmd->GetArg(1))); - pConsole->m_waitSeconds += gEnv->pTimer->GetFrameStartTime(); + const AZ::TimeMs elaspedTimeMs = AZ::GetRealElapsedTimeMs(); + pConsole->m_waitSeconds += CTimeValue(AZ::TimeMsToSecondsDouble(elaspedTimeMs)); } } @@ -305,7 +306,6 @@ void CXConsole::Init(ISystem* pSystem) { m_pFont = pSystem->GetICryFont()->GetFont("default"); } - m_pTimer = pSystem->GetITimer(); AzFramework::InputChannelEventListener::Connect(); AzFramework::InputTextEventListener::Connect(); @@ -333,11 +333,6 @@ void CXConsole::Init(ISystem* pSystem) m_nLoadingBackTexID = -1; - if (gEnv->IsDedicated()) - { - m_bConsoleActive = true; - } - REGISTER_COMMAND("ConsoleShow", &ConsoleShow, VF_NULL, "Opens the console"); REGISTER_COMMAND("ConsoleHide", &ConsoleHide, VF_NULL, "Closes the console"); @@ -939,8 +934,8 @@ void CXConsole::Update() const float fRepeatDelay = 1.0f / 40.0f; // in sec (similar to Windows default but might differ from actual setting) const float fHitchDelay = 1.0f / 10.0f; // in sec. Very low, but still reasonable frame-rate (debug builds) - m_fRepeatTimer -= gEnv->pTimer->GetRealFrameTime(); // works even when time is manipulated - // m_fRepeatTimer -= gEnv->pTimer->GetFrameTime(ITimer::ETIMER_UI); // can be used once ETIMER_UI works even with t_FixedTime + const AZ::TimeUs delta = AZ::GetRealTickDeltaTimeUs(); // works even when time is manipulated + m_fRepeatTimer -= AZ::TimeUsToSeconds(delta); if (m_fRepeatTimer <= 0.0f) { @@ -1966,7 +1961,9 @@ void CXConsole::ExecuteDeferredCommands() if (m_waitSeconds.GetValue()) { - if (m_waitSeconds > gEnv->pTimer->GetFrameStartTime()) + const AZ::TimeMs elaspsedTimeMs = AZ::GetRealElapsedTimeMs(); + const double elaspedTimeSec = AZ::TimeMsToSecondsDouble(elaspsedTimeMs); + if (m_waitSeconds > CTimeValue(elaspedTimeSec)) { return; } diff --git a/Code/Legacy/CrySystem/XConsole.h b/Code/Legacy/CrySystem/XConsole.h index a10adda97b..535f5b8650 100644 --- a/Code/Legacy/CrySystem/XConsole.h +++ b/Code/Legacy/CrySystem/XConsole.h @@ -13,8 +13,8 @@ #pragma once #include -#include "Timer.h" #include +#include #include #include @@ -377,7 +377,6 @@ private: // ---------------------------------------------------------- CSystem* m_pSystem; IFFont* m_pFont; - ITimer* m_pTimer; ICVar* m_pSysDeactivateConsole; diff --git a/Code/Legacy/CrySystem/XML/SerializeXMLReader.cpp b/Code/Legacy/CrySystem/XML/SerializeXMLReader.cpp index 528e3dbcc5..f58d8c7fcf 100644 --- a/Code/Legacy/CrySystem/XML/SerializeXMLReader.cpp +++ b/Code/Legacy/CrySystem/XML/SerializeXMLReader.cpp @@ -10,6 +10,7 @@ #include "CrySystem_precompiled.h" #include "SerializeXMLReader.h" #include +#include #define TAG_SCRIPT_VALUE "v" #define TAG_SCRIPT_TYPE "t" @@ -21,7 +22,6 @@ CSerializeXMLReaderImpl::CSerializeXMLReaderImpl(const XmlNodeRef& nodeRef) : m_nErrors(0) { - //m_curTime = gEnv->pTimer->GetFrameStartTime(); assert(!!nodeRef); m_nodeStack.push_back(CParseState()); m_nodeStack.back().Init(nodeRef); @@ -87,18 +87,21 @@ bool CSerializeXMLReaderImpl::Value(const char* name, CTimeValue& value) } else { + const AZ::TimeMs elaspsedTimeMs = AZ::GetRealElapsedTimeMs(); + const double elaspedTimeSec = AZ::TimeMsToSecondsDouble(elaspsedTimeMs); + const CTimeValue elaspedTime(elaspedTimeSec); float delta; if (!GetAttr(nodeRef, name, delta)) { //CryWarning( VALIDATOR_MODULE_SYSTEM,VALIDATOR_WARNING,"Failed to read time value %s", name); //Failed(); - value = gEnv->pTimer->GetFrameStartTime(); // in case we don't find the node, it was assumed to be the default value (0.0) + value = elaspedTime; // in case we don't find the node, it was assumed to be the default value (0.0) // 0.0 means current time, whereas "zero" really means CTimeValue(0.0), see above return false; } else { - value = CTimeValue(gEnv->pTimer->GetFrameStartTime() + delta); + value = CTimeValue(elaspedTime + delta); } } return true; diff --git a/Code/Legacy/CrySystem/XML/SerializeXMLReader.h b/Code/Legacy/CrySystem/XML/SerializeXMLReader.h index 58c150db24..39f3230521 100644 --- a/Code/Legacy/CrySystem/XML/SerializeXMLReader.h +++ b/Code/Legacy/CrySystem/XML/SerializeXMLReader.h @@ -11,7 +11,6 @@ #include "SimpleSerialize.h" #include #include -#include #include "xml.h" class CSerializeXMLReaderImpl diff --git a/Code/Legacy/CrySystem/XML/SerializeXMLWriter.cpp b/Code/Legacy/CrySystem/XML/SerializeXMLWriter.cpp index 5a3e403218..ee5fe21797 100644 --- a/Code/Legacy/CrySystem/XML/SerializeXMLWriter.cpp +++ b/Code/Legacy/CrySystem/XML/SerializeXMLWriter.cpp @@ -10,6 +10,8 @@ #include "CrySystem_precompiled.h" #include "SerializeXMLWriter.h" +#include + static const size_t MAX_NODE_STACK_DEPTH = 40; #define TAG_SCRIPT_VALUE "v" @@ -18,7 +20,9 @@ static const size_t MAX_NODE_STACK_DEPTH = 40; CSerializeXMLWriterImpl::CSerializeXMLWriterImpl(const XmlNodeRef& nodeRef) { - m_curTime = gEnv->pTimer->GetFrameStartTime(); + const AZ::TimeMs elaspsedTimeMs = AZ::GetRealElapsedTimeMs(); + const double elaspedTimeSec = AZ::TimeMsToSecondsDouble(elaspsedTimeMs); + m_curTime = CTimeValue(elaspedTimeSec); assert(!!nodeRef); m_nodeStack.push_back(nodeRef); diff --git a/Code/Legacy/CrySystem/XML/SerializeXMLWriter.h b/Code/Legacy/CrySystem/XML/SerializeXMLWriter.h index 26fbe4b29c..822045a3f5 100644 --- a/Code/Legacy/CrySystem/XML/SerializeXMLWriter.h +++ b/Code/Legacy/CrySystem/XML/SerializeXMLWriter.h @@ -13,7 +13,6 @@ #include -#include #include #include "SimpleSerialize.h" diff --git a/Code/Legacy/CrySystem/XML/XMLBinaryNode.cpp b/Code/Legacy/CrySystem/XML/XMLBinaryNode.cpp index a13759e82b..14ca936472 100644 --- a/Code/Legacy/CrySystem/XML/XMLBinaryNode.cpp +++ b/Code/Legacy/CrySystem/XML/XMLBinaryNode.cpp @@ -11,20 +11,6 @@ #include "Cry_Color.h" #include "XMLBinaryNode.h" -////////////////////////////////////////////////////////////////////////// -CBinaryXmlData::CBinaryXmlData() - : pNodes(0) - , pAttributes(0) - , pChildIndices(0) - , pStringData(0) - , pFileContents(0) - , nFileSize(0) - , bOwnsFileContentsMemory(true) - , pBinaryNodes(0) - , nRefCount(0) -{ -} - ////////////////////////////////////////////////////////////////////////// CBinaryXmlData::~CBinaryXmlData() { @@ -32,10 +18,10 @@ CBinaryXmlData::~CBinaryXmlData() { delete [] pFileContents; } - pFileContents = 0; + pFileContents = nullptr; delete [] pBinaryNodes; - pBinaryNodes = 0; + pBinaryNodes = nullptr; } ////////////////////////////////////////////////////////////////////////// @@ -56,7 +42,7 @@ XmlNodeRef CBinaryXmlNode::getParent() const XmlNodeRef CBinaryXmlNode::createNode([[maybe_unused]] const char* tag) { assert(0); - return 0; + return nullptr; } ////////////////////////////////////////////////////////////////////////// @@ -93,7 +79,7 @@ bool CBinaryXmlNode::getAttr(const char* key, const char** value) const bool CBinaryXmlNode::haveAttr(const char* key) const { - return (GetValue(key) != 0); + return (GetValue(key) != nullptr); } ////////////////////////////////////////////////////////////////////////// @@ -113,7 +99,7 @@ bool CBinaryXmlNode::getAttr(const char* key, unsigned int& value) const const char* svalue = GetValue(key); if (svalue) { - value = strtoul(svalue, NULL, 10); + value = strtoul(svalue, nullptr, 10); return true; } return false; @@ -290,7 +276,7 @@ XmlNodeRef CBinaryXmlNode::findChild(const char* tag) const return m_pData->pBinaryNodes + m_pData->pChildIndices[i]; } } - return 0; + return nullptr; } //! Get XML Node child nodes. diff --git a/Code/Legacy/CrySystem/XML/XMLBinaryNode.h b/Code/Legacy/CrySystem/XML/XMLBinaryNode.h index b4706f1b85..09126b92f9 100644 --- a/Code/Legacy/CrySystem/XML/XMLBinaryNode.h +++ b/Code/Legacy/CrySystem/XML/XMLBinaryNode.h @@ -6,13 +6,8 @@ * */ - -#ifndef CRYINCLUDE_CRYSYSTEM_XML_XMLBINARYNODE_H -#define CRYINCLUDE_CRYSYSTEM_XML_XMLBINARYNODE_H #pragma once - -#include #include "IXml.h" #include "XMLBinaryHeaders.h" @@ -26,20 +21,20 @@ class CBinaryXmlNode; class CBinaryXmlData { public: - const XMLBinary::Node* pNodes; - const XMLBinary::Attribute* pAttributes; - const XMLBinary::NodeIndex* pChildIndices; - const char* pStringData; + const XMLBinary::Node* pNodes = nullptr; + const XMLBinary::Attribute* pAttributes = nullptr; + const XMLBinary::NodeIndex* pChildIndices = nullptr; + const char* pStringData = nullptr; - const char* pFileContents; - size_t nFileSize; - bool bOwnsFileContentsMemory; + const char* pFileContents = nullptr; + size_t nFileSize = 0; + bool bOwnsFileContentsMemory = true; - CBinaryXmlNode* pBinaryNodes; + CBinaryXmlNode* pBinaryNodes = nullptr; - int nRefCount; + int nRefCount = 0; - CBinaryXmlData(); + CBinaryXmlData() = default; ~CBinaryXmlData(); }; @@ -96,7 +91,6 @@ public: virtual bool getAttributeByIndex(int index, XmlString& key, XmlString& value); - void shareChildren([[maybe_unused]] const XmlNodeRef& fromNode) override { assert(0); }; void copyAttributes(XmlNodeRef fromNode) override { assert(0); }; //! Get XML Node attribute for specified key. @@ -110,8 +104,6 @@ public: bool haveAttr(const char* key) const override; XmlNodeRef newChild([[maybe_unused]] const char* tagName) override { assert(0); return 0; }; - void replaceChild([[maybe_unused]] int inChild, [[maybe_unused]] const XmlNodeRef& node) override { assert(0); }; - void insertChild([[maybe_unused]] int inChild, [[maybe_unused]] const XmlNodeRef& node) override { assert(0); }; void addChild([[maybe_unused]] const XmlNodeRef& node) override { assert(0); }; void removeChild([[maybe_unused]] const XmlNodeRef& node) override { assert(0); }; @@ -127,7 +119,6 @@ public: //! Find node with specified tag. XmlNodeRef findChild(const char* tag) const override; void deleteChild([[maybe_unused]] const char* tag) { assert(0); }; - void deleteChildAt([[maybe_unused]] int nIndex) override { assert(0); }; //! Get parent XML node. XmlNodeRef getParent() const override; @@ -136,10 +127,6 @@ public: const char* getContent() const override { return _string(_node()->nContentStringOffset); }; void setContent([[maybe_unused]] const char* str) override { assert(0); }; - XmlNodeRef clone() override { assert(0); return 0; }; - - //! Returns line number for XML tag. - int getLine() const override { return 0; }; //! Set line number in xml. void setLine([[maybe_unused]] int line) override { assert(0); }; @@ -225,5 +212,3 @@ private: friend class XMLBinary::XMLBinaryReader; }; - -#endif // CRYINCLUDE_CRYSYSTEM_XML_XMLBINARYNODE_H diff --git a/Code/Legacy/CrySystem/XML/XmlUtils.cpp b/Code/Legacy/CrySystem/XML/XmlUtils.cpp index 3e6a49f266..26d6f2336b 100644 --- a/Code/Legacy/CrySystem/XML/XmlUtils.cpp +++ b/Code/Legacy/CrySystem/XML/XmlUtils.cpp @@ -79,22 +79,16 @@ void GetMD5(const char* pSrcBuffer, int nSrcSize, char signatureMD5[16]) } ////////////////////////////////////////////////////////////////////////// -class CXmlSerializer - : public IXmlSerializer +class CXmlSerializer final : public IXmlSerializer { public: - CXmlSerializer() - : m_nRefCount(0) - , m_pReaderImpl(nullptr) - , m_pReaderSer(nullptr) - , m_pWriterSer(nullptr) - , m_pWriterImpl(nullptr) - { - } + CXmlSerializer() = default; + ~CXmlSerializer() { ClearAll(); } + void ClearAll() { SAFE_DELETE(m_pReaderSer); @@ -104,7 +98,11 @@ public: } ////////////////////////////////////////////////////////////////////////// - void AddRef() override { ++m_nRefCount; } + void AddRef() override + { + ++m_nRefCount; + } + void Release() override { if (--m_nRefCount <= 0) @@ -120,6 +118,7 @@ public: m_pWriterSer = new CSimpleSerializeWithDefaults(*m_pWriterImpl); return m_pWriterSer; } + ISerialize* GetReader(XmlNodeRef& node) override { ClearAll(); @@ -130,12 +129,12 @@ public: ////////////////////////////////////////////////////////////////////////// private: - int m_nRefCount; - CSerializeXMLReaderImpl* m_pReaderImpl; - CSimpleSerializeWithDefaults* m_pReaderSer; + int m_nRefCount = 0; + CSerializeXMLReaderImpl* m_pReaderImpl = nullptr; + CSimpleSerializeWithDefaults* m_pReaderSer = nullptr; - CSerializeXMLWriterImpl* m_pWriterImpl; - CSimpleSerializeWithDefaults* m_pWriterSer; + CSerializeXMLWriterImpl* m_pWriterImpl = nullptr; + CSimpleSerializeWithDefaults* m_pWriterSer = nullptr; }; ////////////////////////////////////////////////////////////////////////// @@ -145,8 +144,7 @@ IXmlSerializer* CXmlUtils::CreateXmlSerializer() } ////////////////////////////////////////////////////////////////////////// -class CXmlBinaryDataWriterFile - : public XMLBinary::IDataWriter +class CXmlBinaryDataWriterFile final : public XMLBinary::IDataWriter { public: CXmlBinaryDataWriterFile(const char* file) @@ -177,8 +175,7 @@ private: }; ////////////////////////////////////////////////////////////////////////// -class CXmlTableReader - : public IXmlTableReader +class CXmlTableReader final : public IXmlTableReader { public: CXmlTableReader(); diff --git a/Code/Legacy/CrySystem/XML/xml.cpp b/Code/Legacy/CrySystem/XML/xml.cpp index 65a2cb6ffd..95755d78fe 100644 --- a/Code/Legacy/CrySystem/XML/xml.cpp +++ b/Code/Legacy/CrySystem/XML/xml.cpp @@ -626,20 +626,6 @@ void CXmlNode::deleteChild(const char* tag) } } -////////////////////////////////////////////////////////////////////////// -void CXmlNode::deleteChildAt(int nIndex) -{ - if (m_pChilds) - { - XmlNodes& childs = *m_pChilds; - if (nIndex >= 0 && nIndex < (int)childs.size()) - { - ReleaseChild(childs[nIndex]); - childs.erase(childs.begin() + nIndex); - } - } -} - //! Adds new child node. void CXmlNode::addChild(const XmlNodeRef& node) { @@ -655,74 +641,12 @@ void CXmlNode::addChild(const XmlNodeRef& node) pNode->setParent(this); }; -void CXmlNode::shareChildren(const XmlNodeRef& inFromMe) -{ - int numChildren = inFromMe->getChildCount(); - - removeAllChilds(); - - if (numChildren > 0) - { - XmlNodeRef child; - - m_pChilds = new XmlNodes; - m_pChilds->reserve(numChildren); - for (int i = 0; i < numChildren; i++) - { - child = inFromMe->getChild(i); - - child->AddRef(); - // not overwriting parent assignment of child, we share the node but do not exclusively own it - m_pChilds->push_back(child); - } - } -} - void CXmlNode::setParent(const XmlNodeRef& inNewParent) { // note, parent ptrs are not ref counted m_parent = inNewParent; } -void CXmlNode::insertChild(int inIndex, const XmlNodeRef& inNewChild) -{ - assert(inIndex >= 0 && inIndex <= getChildCount()); - assert(inNewChild != 0); - if (inIndex >= 0 && inIndex <= getChildCount() && inNewChild) - { - if (getChildCount() == 0) - { - addChild(inNewChild); - } - else - { - IXmlNode* pNode = ((IXmlNode*)inNewChild); - pNode->AddRef(); - m_pChilds->insert(m_pChilds->begin() + inIndex, pNode); - pNode->setParent(this); - } - } -} - -void CXmlNode::replaceChild(int inIndex, const XmlNodeRef& inNewChild) -{ - assert(inIndex >= 0 && inIndex < getChildCount()); - assert(inNewChild != 0); - if (inIndex >= 0 && inIndex < getChildCount() && inNewChild) - { - IXmlNode* wasChild = (*m_pChilds)[inIndex]; - - if (wasChild->getParent() == this) - { - wasChild->setParent(XmlNodeRef()); // child is orphaned, will be freed by Release() below if this parent is last holding a reference to it - } - wasChild->Release(); - inNewChild->AddRef(); - (*m_pChilds)[inIndex] = inNewChild; - inNewChild->setParent(this); - } -} - XmlNodeRef CXmlNode::newChild(const char* tagName) { XmlNodeRef node = createNode(tagName); @@ -817,34 +741,6 @@ bool CXmlNode::getAttributeByIndex(int index, XmlString& key, XmlString& value) } return false; } -////////////////////////////////////////////////////////////////////////// -XmlNodeRef CXmlNode::clone() -{ - CXmlNode* node = new CXmlNode; - XmlNodeRef result(node); - node->m_pStringPool = m_pStringPool; - m_pStringPool->AddRef(); - node->m_tag = m_tag; - node->m_content = m_content; - // Clone attributes. - CXmlNode* n = (CXmlNode*)(IXmlNode*)node; - n->copyAttributes(this); - // Clone sub nodes. - - if (m_pChilds) - { - const XmlNodes& childs = *m_pChilds; - - node->m_pChilds = new XmlNodes; - node->m_pChilds->reserve(childs.size()); - for (int i = 0, num = static_cast(childs.size()); i < num; ++i) - { - node->addChild(childs[i]->clone()); - } - } - - return result; -} ////////////////////////////////////////////////////////////////////////// static void AddTabsToString(XmlString& xml, int level) @@ -1206,16 +1102,6 @@ XmlString CXmlNode::getXML(int level) const return xml; } -XmlString CXmlNode::getXMLUnsafe(int level, char* tmpBuffer, uint32 sizeOfTmpBuffer) const -{ - char* endPtr = tmpBuffer + sizeOfTmpBuffer - 1; - char* endOfBuffer = AddToXmlStringUnsafe(tmpBuffer, level, endPtr); - endOfBuffer[0] = '\0'; - XmlString ret(tmpBuffer); - return ret; -} - - // TODO: those 2 saving functions are a bit messy. should probably make a separate one for the use of PlatformAPI bool CXmlNode::saveToFile(const char* fileName) { @@ -1247,9 +1133,7 @@ bool CXmlNode::saveToFile(const char* fileName) bool CXmlNode::saveToFile([[maybe_unused]] const char* fileName, size_t chunkSize, AZ::IO::HandleType fileHandle) { -#ifdef WIN32 - CrySetFileAttributes(fileName, 0x00000080); // FILE_ATTRIBUTE_NORMAL -#endif //WIN32 + CrySetFileAttributes(fileName, FILE_ATTRIBUTE_NORMAL); if (chunkSize < 256 * 1024) // make at least 256k { diff --git a/Code/Legacy/CrySystem/XML/xml.h b/Code/Legacy/CrySystem/XML/xml.h index 0605142b9f..039ca0b92f 100644 --- a/Code/Legacy/CrySystem/XML/xml.h +++ b/Code/Legacy/CrySystem/XML/xml.h @@ -46,14 +46,14 @@ class XmlParser { public: explicit XmlParser(bool bReuseStrings); - ~XmlParser(); + ~XmlParser() override; - void AddRef() + void AddRef() override { ++m_nRefCount; } - void Release() + void Release() override { if (--m_nRefCount <= 0) { @@ -61,9 +61,9 @@ public: } } - virtual XmlNodeRef ParseFile(const char* filename, bool bCleanPools); + XmlNodeRef ParseFile(const char* filename, bool bCleanPools) override; - virtual XmlNodeRef ParseBuffer(const char* buffer, int nBufLen, bool bCleanPools, bool bSuppressWarnings = false); + XmlNodeRef ParseBuffer(const char* buffer, int nBufLen, bool bCleanPools, bool bSuppressWarnings = false) override; const char* getErrorString() const { return m_errorString; } @@ -112,7 +112,7 @@ public: CXmlNode(); CXmlNode(const char* tag, bool bReuseStrings, bool bIsProcessingInstruction = false); //! Destructor. - ~CXmlNode(); + ~CXmlNode() override; ////////////////////////////////////////////////////////////////////////// // Custom new/delete with pool allocator. @@ -120,125 +120,118 @@ public: //void* operator new( size_t nSize ); //void operator delete( void *ptr ); - virtual void DeleteThis(); + void DeleteThis() override; //! Create new XML node. - XmlNodeRef createNode(const char* tag); + XmlNodeRef createNode(const char* tag) override; //! Get XML node tag. - const char* getTag() const { return m_tag; }; - void setTag(const char* tag); + const char* getTag() const override + { return m_tag; }; + void setTag(const char* tag) override; //! Return true if given tag equal to node tag. - bool isTag(const char* tag) const; + bool isTag(const char* tag) const override; //! Get XML Node attributes. - virtual int getNumAttributes() const { return m_pAttributes ? (int)m_pAttributes->size() : 0; }; + int getNumAttributes() const override + { return m_pAttributes ? (int)m_pAttributes->size() : 0; }; //! Return attribute key and value by attribute index. - virtual bool getAttributeByIndex(int index, const char** key, const char** value); + bool getAttributeByIndex(int index, const char** key, const char** value) override; //! Return attribute key and value by attribute index, string version. virtual bool getAttributeByIndex(int index, XmlString& key, XmlString& value); - - virtual void copyAttributes(XmlNodeRef fromNode); - virtual void shareChildren(const XmlNodeRef& fromNode); + void copyAttributes(XmlNodeRef fromNode) override; //! Get XML Node attribute for specified key. - const char* getAttr(const char* key) const; + const char* getAttr(const char* key) const override; //! Get XML Node attribute for specified key. // Returns true if the attribute existes, alse otherwise. - bool getAttr(const char* key, const char** value) const; + bool getAttr(const char* key, const char** value) const override; //! Check if attributes with specified key exist. - bool haveAttr(const char* key) const; + bool haveAttr(const char* key) const override; //! Creates new xml node and add it to childs list. - XmlNodeRef newChild(const char* tagName); + XmlNodeRef newChild(const char* tagName) override; //! Adds new child node. - void addChild(const XmlNodeRef& node); + void addChild(const XmlNodeRef& node) override; //! Remove child node. - void removeChild(const XmlNodeRef& node); - - void insertChild(int nIndex, const XmlNodeRef& node); - void replaceChild(int nIndex, const XmlNodeRef& node); + void removeChild(const XmlNodeRef& node) override; //! Remove all child nodes. - void removeAllChilds(); + void removeAllChilds() override; //! Get number of child XML nodes. - int getChildCount() const { return m_pChilds ? (int)m_pChilds->size() : 0; }; + int getChildCount() const override { return m_pChilds ? (int)m_pChilds->size() : 0; } //! Get XML Node child nodes. - XmlNodeRef getChild(int i) const; + XmlNodeRef getChild(int i) const override; //! Find node with specified tag. - XmlNodeRef findChild(const char* tag) const; + XmlNodeRef findChild(const char* tag) const override; void deleteChild(const char* tag); - void deleteChildAt(int nIndex); //! Get parent XML node. - XmlNodeRef getParent() const { return m_parent; } - void setParent(const XmlNodeRef& inRef); + XmlNodeRef getParent() const override { return m_parent; } + void setParent(const XmlNodeRef& inRef) override; //! Returns content of this node. - const char* getContent() const { return m_content; }; - void setContent(const char* str); + const char* getContent() const override + { return m_content; }; + void setContent(const char* str) override; - XmlNodeRef clone(); - - //! Returns line number for XML tag. - int getLine() const { return m_line; }; //! Set line number in xml. - void setLine(int line) { m_line = line; }; + void setLine(int line) override { m_line = line; } //! Returns XML of this node and sub nodes. - virtual IXmlStringData* getXMLData(int nReserveMem = 0) const; - XmlString getXML(int level = 0) const; - XmlString getXMLUnsafe(int level, char* tmpBuffer, uint32 sizeOfTmpBuffer) const; - bool saveToFile(const char* fileName); // saves in one huge chunk - bool saveToFile(const char* fileName, size_t chunkSizeBytes, AZ::IO::HandleType fileHandle = AZ::IO::InvalidHandle); // save in small memory chunks + IXmlStringData* getXMLData(int nReserveMem = 0) const override; + XmlString getXML(int level = 0) const override; + bool saveToFile(const char* fileName) override; // saves in one huge chunk + bool saveToFile(const char* fileName, size_t chunkSizeBytes, AZ::IO::HandleType fileHandle = AZ::IO::InvalidHandle) override; // save in small memory chunks //! Set new XML Node attribute (or override attribute with same key). using IXmlNode::setAttr; - void setAttr(const char* key, const char* value); - void setAttr(const char* key, int value); - void setAttr(const char* key, unsigned int value); - void setAttr(const char* key, int64 value); - void setAttr(const char* key, uint64 value, bool useHexFormat = true); - void setAttr(const char* key, float value); - void setAttr(const char* key, double value); - void setAttr(const char* key, const Vec2& value); - void setAttr(const char* key, const Ang3& value); - void setAttr(const char* key, const Vec3& value); - void setAttr(const char* key, const Vec4& value); - void setAttr(const char* key, const Quat& value); + void setAttr(const char* key, const char* value) override; + void setAttr(const char* key, int value) override; + void setAttr(const char* key, unsigned int value) override; + void setAttr(const char* key, int64 value) override; + void setAttr(const char* key, uint64 value, bool useHexFormat = true) override; + void setAttr(const char* key, float value) override; + void setAttr(const char* key, double value) override; + void setAttr(const char* key, const Vec2& value) override; + void setAttr(const char* key, const Ang3& value) override; + void setAttr(const char* key, const Vec3& value) override; + void setAttr(const char* key, const Vec4& value) override; + void setAttr(const char* key, const Quat& value) override; //! Delete attrbute. - void delAttr(const char* key); + void delAttr(const char* key) override; //! Remove all node attributes. - void removeAllAttributes(); + void removeAllAttributes() override; //! Get attribute value of node. - bool getAttr(const char* key, int& value) const; - bool getAttr(const char* key, unsigned int& value) const; - bool getAttr(const char* key, int64& value) const; - bool getAttr(const char* key, uint64& value, bool useHexFormat = true /*ignored*/) const; - bool getAttr(const char* key, float& value) const; - bool getAttr(const char* key, double& value) const; - bool getAttr(const char* key, bool& value) const; + bool getAttr(const char* key, int& value) const override; + bool getAttr(const char* key, unsigned int& value) const override; + bool getAttr(const char* key, int64& value) const override; + bool getAttr(const char* key, uint64& value, bool useHexFormat = true /*ignored*/) const override; + bool getAttr(const char* key, float& value) const override; + bool getAttr(const char* key, double& value) const override; + bool getAttr(const char* key, bool& value) const override; - bool getAttr(const char* key, XmlString& value) const {const char* v(NULL); bool boHasAttribute(getAttr(key, &v)); value = v; return boHasAttribute; } + bool getAttr(const char* key, XmlString& value) const override + {const char* v(NULL); bool boHasAttribute(getAttr(key, &v)); value = v; return boHasAttribute; } - bool getAttr(const char* key, Vec2& value) const; - bool getAttr(const char* key, Ang3& value) const; - bool getAttr(const char* key, Vec3& value) const; - bool getAttr(const char* key, Vec4& value) const; - bool getAttr(const char* key, Quat& value) const; - bool getAttr(const char* key, ColorB& value) const; + bool getAttr(const char* key, Vec2& value) const override; + bool getAttr(const char* key, Ang3& value) const override; + bool getAttr(const char* key, Vec3& value) const override; + bool getAttr(const char* key, Vec4& value) const override; + bool getAttr(const char* key, Quat& value) const override; + bool getAttr(const char* key, ColorB& value) const override; protected: @@ -356,7 +349,7 @@ class CXmlNodeReuse { public: CXmlNodeReuse(const char* tag, CXmlNodePool* pPool); - virtual void Release(); + void Release() override; protected: CXmlNodePool* m_pPool; diff --git a/Code/Legacy/CrySystem/crysystem_files.cmake b/Code/Legacy/CrySystem/crysystem_files.cmake index fc923705f2..6e8f9978fb 100644 --- a/Code/Legacy/CrySystem/crysystem_files.cmake +++ b/Code/Legacy/CrySystem/crysystem_files.cmake @@ -20,7 +20,6 @@ set(FILES SystemEventDispatcher.cpp SystemInit.cpp SystemWin32.cpp - Timer.cpp XConsole.cpp XConsoleVariable.cpp AZCrySystemInitLogSink.h @@ -36,7 +35,6 @@ set(FILES CrySystem_precompiled.h System.h SystemEventDispatcher.h - Timer.h XConsole.h XConsoleVariable.h XML/SerializeXMLReader.cpp @@ -59,11 +57,5 @@ set(FILES LevelSystem/LevelSystem.h LevelSystem/SpawnableLevelSystem.cpp LevelSystem/SpawnableLevelSystem.h - ViewSystem/DebugCamera.cpp - ViewSystem/DebugCamera.h - ViewSystem/View.cpp - ViewSystem/View.h - ViewSystem/ViewSystem.cpp - ViewSystem/ViewSystem.h WindowsErrorReporting.cpp ) diff --git a/Code/Tools/AWSNativeSDKInit/CMakeLists.txt b/Code/Tools/AWSNativeSDKInit/CMakeLists.txt index d571f0d9e3..57ee31d30d 100644 --- a/Code/Tools/AWSNativeSDKInit/CMakeLists.txt +++ b/Code/Tools/AWSNativeSDKInit/CMakeLists.txt @@ -24,3 +24,30 @@ ly_add_target( 3rdParty::AWSNativeSDK::Core AZ::AzCore ) + +################################################################################ +# Tests +################################################################################ +if(PAL_TRAIT_BUILD_TESTS_SUPPORTED) + ly_add_target( + NAME AWSNativeSDKInit.Tests ${PAL_TRAIT_TEST_TARGET_TYPE} + NAMESPACE AZ + FILES_CMAKE + aws_native_sdk_init_tests_files.cmake + INCLUDE_DIRECTORIES + PRIVATE + include + tests + source + BUILD_DEPENDENCIES + PRIVATE + AZ::AzCore + AZ::AzFramework + AZ::AzTest + AZ::AWSNativeSDKInit + 3rdParty::AWSNativeSDK::Core + ) + ly_add_googletest( + NAME AZ::AWSNativeSDKInit.Tests + ) +endif() diff --git a/Code/Tools/AWSNativeSDKInit/aws_native_sdk_init_tests_files.cmake b/Code/Tools/AWSNativeSDKInit/aws_native_sdk_init_tests_files.cmake new file mode 100644 index 0000000000..9029a1198a --- /dev/null +++ b/Code/Tools/AWSNativeSDKInit/aws_native_sdk_init_tests_files.cmake @@ -0,0 +1,12 @@ +# +# Copyright (c) Contributors to the Open 3D Engine Project. +# For complete copyright and license terms please see the LICENSE at the root of this distribution. +# +# SPDX-License-Identifier: Apache-2.0 OR MIT +# +# + +set(FILES + tests/AWSLogSystemInterfaceTest.cpp + tests/AWSNativeSDKInitTest.cpp +) diff --git a/Code/Tools/AWSNativeSDKInit/include/AWSNativeSDKInit/AWSLogSystemInterface.h b/Code/Tools/AWSNativeSDKInit/include/AWSNativeSDKInit/AWSLogSystemInterface.h index 4982d3efbd..901e37cd7b 100644 --- a/Code/Tools/AWSNativeSDKInit/include/AWSNativeSDKInit/AWSLogSystemInterface.h +++ b/Code/Tools/AWSNativeSDKInit/include/AWSNativeSDKInit/AWSLogSystemInterface.h @@ -10,7 +10,7 @@ #if defined(PLATFORM_SUPPORTS_AWS_NATIVE_SDK) -#include +#include AZ_PUSH_DISABLE_WARNING(4251 4996, "-Wunknown-warning-option") #include diff --git a/Code/Tools/AWSNativeSDKInit/include/AWSNativeSDKInit/AWSMemoryInterface.h b/Code/Tools/AWSNativeSDKInit/include/AWSNativeSDKInit/AWSMemoryInterface.h index 805088563f..26126057e2 100644 --- a/Code/Tools/AWSNativeSDKInit/include/AWSNativeSDKInit/AWSMemoryInterface.h +++ b/Code/Tools/AWSNativeSDKInit/include/AWSNativeSDKInit/AWSMemoryInterface.h @@ -8,6 +8,7 @@ #pragma once +#include #if defined(PLATFORM_SUPPORTS_AWS_NATIVE_SDK) #include #else diff --git a/Code/Tools/AWSNativeSDKInit/include/AWSNativeSDKInit/AWSNativeSDKInit.h b/Code/Tools/AWSNativeSDKInit/include/AWSNativeSDKInit/AWSNativeSDKInit.h index 32bf02a247..f50d7002eb 100644 --- a/Code/Tools/AWSNativeSDKInit/include/AWSNativeSDKInit/AWSNativeSDKInit.h +++ b/Code/Tools/AWSNativeSDKInit/include/AWSNativeSDKInit/AWSNativeSDKInit.h @@ -13,7 +13,7 @@ #include #if defined(PLATFORM_SUPPORTS_AWS_NATIVE_SDK) - +#include // The AWS Native SDK AWSAllocator triggers a warning due to accessing members of std::allocator directly. // AWSAllocator.h(70): warning C4996: 'std::allocator::pointer': warning STL4010: Various members of std::allocator are deprecated in C++17. // Use std::allocator_traits instead of accessing these members directly. diff --git a/Code/Tools/AWSNativeSDKInit/source/AWSLogSystemInterface.cpp b/Code/Tools/AWSNativeSDKInit/source/AWSLogSystemInterface.cpp index 113e513743..0ccfc43ba4 100644 --- a/Code/Tools/AWSNativeSDKInit/source/AWSLogSystemInterface.cpp +++ b/Code/Tools/AWSNativeSDKInit/source/AWSLogSystemInterface.cpp @@ -10,6 +10,8 @@ #include #include +#include +#include #include #include @@ -24,6 +26,9 @@ AZ_POP_DISABLE_WARNING namespace AWSNativeSDKInit { + AZ_CVAR(int, bg_awsLogLevel, -1, nullptr, AZ::ConsoleFunctorFlags::Null, + "AWSLogLevel used to control verbosity of logging system. Off = 0, Fatal = 1, Error = 2, Warn = 3, Info = 4, Debug = 5, Trace = 6"); + const char* AWSLogSystemInterface::AWS_API_LOG_PREFIX = "AwsApi-"; const int AWSLogSystemInterface::MAX_MESSAGE_LENGTH = 4096; const char* AWSLogSystemInterface::MESSAGE_FORMAT = "[AWS] %s - %s"; @@ -40,15 +45,16 @@ namespace AWSNativeSDKInit Aws::Utils::Logging::LogLevel AWSLogSystemInterface::GetLogLevel() const { Aws::Utils::Logging::LogLevel newLevel = m_logLevel; - static const char* const logLevelEnvVar = "sys_SetLogLevel"; - auto logVar = AZ::Environment::FindVariable(logLevelEnvVar); - - if (logVar) + if (auto console = AZ::Interface::Get(); console != nullptr) { - newLevel = (Aws::Utils::Logging::LogLevel) *logVar; + int awsLogLevel = -1; + console->GetCvarValue("bg_awsLogLevel", awsLogLevel); + if (awsLogLevel >= 0) + { + newLevel = static_cast(awsLogLevel); + } } - - return newLevel != m_logLevel ? newLevel : m_logLevel; + return newLevel; } /** @@ -78,14 +84,12 @@ namespace AWSNativeSDKInit */ void AWSLogSystemInterface::LogStream(Aws::Utils::Logging::LogLevel logLevel, const char* tag, const Aws::OStringStream &messageStream) { - if(!ShouldLog(logLevel)) { return; } ForwardAwsApiLogMessage(logLevel, tag, messageStream.str().c_str()); - } bool AWSLogSystemInterface::ShouldLog(Aws::Utils::Logging::LogLevel logLevel) @@ -93,7 +97,7 @@ namespace AWSNativeSDKInit #if defined(PLATFORM_SUPPORTS_AWS_NATIVE_SDK) Aws::Utils::Logging::LogLevel newLevel = GetLogLevel(); - if (newLevel > Aws::Utils::Logging::LogLevel::Info && newLevel <= Aws::Utils::Logging::LogLevel::Trace && newLevel != m_logLevel) + if (newLevel != m_logLevel) { SetLogLevel(newLevel); } @@ -124,7 +128,7 @@ namespace AWSNativeSDKInit break; case Aws::Utils::Logging::LogLevel::Error: - AZ::Debug::Trace::Instance().Warning(__FILE__, __LINE__, AZ_FUNCTION_SIGNATURE, AWSLogSystemInterface::ERROR_WINDOW_NAME, MESSAGE_FORMAT, tag, message); + AZ::Debug::Trace::Instance().Error(__FILE__, __LINE__, AZ_FUNCTION_SIGNATURE, AWSLogSystemInterface::ERROR_WINDOW_NAME, MESSAGE_FORMAT, tag, message); break; case Aws::Utils::Logging::LogLevel::Warn: diff --git a/Code/Tools/AWSNativeSDKInit/source/AWSNativeSDKInit.cpp b/Code/Tools/AWSNativeSDKInit/source/AWSNativeSDKInit.cpp index 815fc1bbf0..ca63859945 100644 --- a/Code/Tools/AWSNativeSDKInit/source/AWSNativeSDKInit.cpp +++ b/Code/Tools/AWSNativeSDKInit/source/AWSNativeSDKInit.cpp @@ -64,10 +64,10 @@ namespace AWSNativeSDKInit { #if defined(PLATFORM_SUPPORTS_AWS_NATIVE_SDK) Aws::Utils::Logging::LogLevel logLevel; -#ifdef _DEBUG +#if defined(AZ_DEBUG_BUILD) || defined(AZ_PROFILE_BUILD) logLevel = Aws::Utils::Logging::LogLevel::Warn; #else - logLevel = Aws::Utils::Logging::LogLevel::Warn; + logLevel = Aws::Utils::Logging::LogLevel::Error; #endif m_awsSDKOptions.loggingOptions.logLevel = logLevel; m_awsSDKOptions.loggingOptions.logger_create_fn = [logLevel]() diff --git a/Code/Tools/AWSNativeSDKInit/tests/AWSLogSystemInterfaceTest.cpp b/Code/Tools/AWSNativeSDKInit/tests/AWSLogSystemInterfaceTest.cpp new file mode 100644 index 0000000000..02b6cbebc1 --- /dev/null +++ b/Code/Tools/AWSNativeSDKInit/tests/AWSLogSystemInterfaceTest.cpp @@ -0,0 +1,169 @@ +/* + * Copyright (c) Contributors to the Open 3D Engine Project. + * For complete copyright and license terms please see the LICENSE at the root of this distribution. + * + * SPDX-License-Identifier: Apache-2.0 OR MIT + * + */ + +#include +#include +#include +#include +#include + +#include + +#include + +using namespace AWSNativeSDKInit; + +class AWSLogSystemInterfaceTest + : public UnitTest::ScopedAllocatorSetupFixture + , public AZ::Debug::TraceMessageBus::Handler +{ +public: + bool OnPreAssert(const char*, int, const char*, const char*) override + { + return true; + } + + bool OnPreError(const char*, const char*, int, const char*, const char*) override + { + m_error = true; + return true; + } + + bool OnPreWarning(const char*, const char*, int, const char*, const char*) override + { + m_warning = true; + return true; + } + + bool OnPrintf(const char*, const char*) override + { + m_printf = true; + return true; + } + + void SetUp() override + { + BusConnect(); + if (!AZ::Interface::Get()) + { + m_console = AZStd::make_unique(); + m_console->LinkDeferredFunctors(AZ::ConsoleFunctorBase::GetDeferredHead()); + AZ::Interface::Register(m_console.get()); + } + } + + void TearDown() override + { + if (m_console) + { + AZ::Interface::Unregister(m_console.get()); + m_console.reset(); + } + BusDisconnect(); + } + + bool m_error = false; + bool m_warning = false; + bool m_printf = false; + +private: + AZStd::unique_ptr m_console; +}; + +TEST_F(AWSLogSystemInterfaceTest, LogStream_LogFatalMessage_GetExpectedNotification) +{ + AWSLogSystemInterface logSystem(Aws::Utils::Logging::LogLevel::Trace); + Aws::OStringStream testString; + logSystem.LogStream(Aws::Utils::Logging::LogLevel::Fatal, "test", testString); + ASSERT_TRUE(m_error); + ASSERT_FALSE(m_warning); + ASSERT_FALSE(m_printf); +} + +TEST_F(AWSLogSystemInterfaceTest, LogStream_LogErrorMessage_GetExpectedNotification) +{ + AWSLogSystemInterface logSystem(Aws::Utils::Logging::LogLevel::Trace); + Aws::OStringStream testString; + logSystem.LogStream(Aws::Utils::Logging::LogLevel::Error, "test", testString); + ASSERT_TRUE(m_error); + ASSERT_FALSE(m_warning); + ASSERT_FALSE(m_printf); +} + +TEST_F(AWSLogSystemInterfaceTest, LogStream_LogWarningMessage_GetExpectedNotification) +{ + AWSLogSystemInterface logSystem(Aws::Utils::Logging::LogLevel::Trace); + Aws::OStringStream testString; + logSystem.LogStream(Aws::Utils::Logging::LogLevel::Warn, "test", testString); + ASSERT_FALSE(m_error); + ASSERT_TRUE(m_warning); + ASSERT_FALSE(m_printf); +} + +TEST_F(AWSLogSystemInterfaceTest, LogStream_LogInfoMessage_GetExpectedNotification) +{ + AWSLogSystemInterface logSystem(Aws::Utils::Logging::LogLevel::Trace); + Aws::OStringStream testString; + logSystem.LogStream(Aws::Utils::Logging::LogLevel::Info, "test", testString); + ASSERT_FALSE(m_error); + ASSERT_FALSE(m_warning); + ASSERT_TRUE(m_printf); +} + +TEST_F(AWSLogSystemInterfaceTest, LogStream_LogDebugMessage_GetExpectedNotification) +{ + AWSLogSystemInterface logSystem(Aws::Utils::Logging::LogLevel::Trace); + Aws::OStringStream testString; + logSystem.LogStream(Aws::Utils::Logging::LogLevel::Debug, "test", testString); + ASSERT_FALSE(m_error); + ASSERT_FALSE(m_warning); + ASSERT_TRUE(m_printf); +} + +TEST_F(AWSLogSystemInterfaceTest, LogStream_LogTraceMessage_GetExpectedNotification) +{ + AWSLogSystemInterface logSystem(Aws::Utils::Logging::LogLevel::Trace); + Aws::OStringStream testString; + logSystem.LogStream(Aws::Utils::Logging::LogLevel::Trace, "test", testString); + ASSERT_FALSE(m_error); + ASSERT_FALSE(m_warning); + ASSERT_TRUE(m_printf); +} + +TEST_F(AWSLogSystemInterfaceTest, LogStream_OverrideWarnAndLogInfoMessage_GetExpectedNotification) +{ + AWSLogSystemInterface logSystem(Aws::Utils::Logging::LogLevel::Trace); + Aws::OStringStream testString; + AZ::Interface::Get()->PerformCommand("bg_awsLogLevel 3"); + logSystem.LogStream(Aws::Utils::Logging::LogLevel::Info, "test", testString); + ASSERT_FALSE(m_error); + ASSERT_FALSE(m_warning); + ASSERT_FALSE(m_printf); +} + +TEST_F(AWSLogSystemInterfaceTest, LogStream_OverrideWarnAndLogeErrorMessage_GetExpectedNotification) +{ + AWSLogSystemInterface logSystem(Aws::Utils::Logging::LogLevel::Trace); + Aws::OStringStream testString; + AZ::Interface::Get()->PerformCommand("bg_awsLogLevel 3"); + logSystem.LogStream(Aws::Utils::Logging::LogLevel::Error, "test", testString); + ASSERT_TRUE(m_error); + ASSERT_FALSE(m_warning); + ASSERT_FALSE(m_printf); +} + +TEST_F(AWSLogSystemInterfaceTest, LogStream_OverrideOffAndLogInfoMessage_GetExpectedNotification) +{ + AWSLogSystemInterface logSystem(Aws::Utils::Logging::LogLevel::Trace); + Aws::OStringStream testString; + AZ::Interface::Get()->PerformCommand("bg_awsLogLevel 0"); + logSystem.LogStream(Aws::Utils::Logging::LogLevel::Info, "test", testString); + ASSERT_FALSE(m_error); + ASSERT_FALSE(m_warning); + ASSERT_FALSE(m_printf); +} diff --git a/Code/Tools/AWSNativeSDKInit/tests/AWSNativeSDKInitTest.cpp b/Code/Tools/AWSNativeSDKInit/tests/AWSNativeSDKInitTest.cpp new file mode 100644 index 0000000000..40217ff9bc --- /dev/null +++ b/Code/Tools/AWSNativeSDKInit/tests/AWSNativeSDKInitTest.cpp @@ -0,0 +1,11 @@ +/* + * Copyright (c) Contributors to the Open 3D Engine Project. + * For complete copyright and license terms please see the LICENSE at the root of this distribution. + * + * SPDX-License-Identifier: Apache-2.0 OR MIT + * + */ + +#include + +AZ_UNIT_TEST_HOOK(DEFAULT_UNIT_TEST_ENV); diff --git a/Code/Tools/Android/ProjectBuilder/root.build.gradle.in b/Code/Tools/Android/ProjectBuilder/root.build.gradle.in index 14606bee7b..c0102c9d21 100644 --- a/Code/Tools/Android/ProjectBuilder/root.build.gradle.in +++ b/Code/Tools/Android/ProjectBuilder/root.build.gradle.in @@ -8,7 +8,7 @@ buildscript { repositories { google() - jcenter() + mavenCentral() } dependencies { classpath 'com.android.tools.build:gradle:${ANDROID_GRADLE_PLUGIN_VERSION}' @@ -21,7 +21,7 @@ buildscript { allprojects { repositories { google() - jcenter() + mavenCentral() } } diff --git a/Code/Tools/AssetBundler/CMakeLists.txt b/Code/Tools/AssetBundler/CMakeLists.txt index dcc62595c9..28245b67ba 100644 --- a/Code/Tools/AssetBundler/CMakeLists.txt +++ b/Code/Tools/AssetBundler/CMakeLists.txt @@ -77,6 +77,10 @@ ly_add_target( ${additional_dependencies} ) +if(LY_DEFAULT_PROJECT_PATH) + set_property(TARGET AssetBundler AssetBundlerBatch APPEND PROPERTY VS_DEBUGGER_COMMAND_ARGUMENTS "--project-path=\"${LY_DEFAULT_PROJECT_PATH}\"") +endif() + # Adds a specialized .setreg to identify gems enabled in the active project. # This associates the AssetBundler target with the .Builders gem variants. ly_set_gem_variant_to_load(TARGETS AssetBundler VARIANTS Builders) diff --git a/Code/Tools/AssetBundler/source/utils/GUIApplicationManager.cpp b/Code/Tools/AssetBundler/source/utils/GUIApplicationManager.cpp index b17832526f..17e621f7d6 100644 --- a/Code/Tools/AssetBundler/source/utils/GUIApplicationManager.cpp +++ b/Code/Tools/AssetBundler/source/utils/GUIApplicationManager.cpp @@ -346,9 +346,7 @@ namespace AssetBundler } // Determine the enabled platforms - const char* appRoot = nullptr; - AzFramework::ApplicationRequests::Bus::BroadcastResult(appRoot, &AzFramework::ApplicationRequests::GetAppRoot); - m_enabledPlatforms = GetEnabledPlatformFlags(GetEngineRoot(), appRoot, AZ::Utils::GetProjectPath().c_str()); + m_enabledPlatforms = GetEnabledPlatformFlags(GetEngineRoot(), AZStd::string_view(AZ::Utils::GetProjectPath())); // Determine which Gems are enabled for the current project if (!AzFramework::GetGemsInfo(m_gemInfoList, *m_settingsRegistry)) diff --git a/Code/Tools/AssetBundler/source/utils/applicationManager.cpp b/Code/Tools/AssetBundler/source/utils/applicationManager.cpp index 0388570fdd..2df9e64ac5 100644 --- a/Code/Tools/AssetBundler/source/utils/applicationManager.cpp +++ b/Code/Tools/AssetBundler/source/utils/applicationManager.cpp @@ -1401,7 +1401,6 @@ namespace AssetBundler // If no platform was specified, defaulting to platforms specified in the asset processor config files AzFramework::PlatformFlags platformFlags = GetEnabledPlatformFlags( - AZStd::string_view{ AZ::Utils::GetEnginePath() }, AZStd::string_view{ AZ::Utils::GetEnginePath() }, AZStd::string_view{ AZ::Utils::GetProjectPath() }); [[maybe_unused]] auto platformsString = AzFramework::PlatformHelper::GetCommaSeparatedPlatformList(platformFlags); diff --git a/Code/Tools/AssetBundler/source/utils/utils.cpp b/Code/Tools/AssetBundler/source/utils/utils.cpp index 6daf3c571b..7e56f5450e 100644 --- a/Code/Tools/AssetBundler/source/utils/utils.cpp +++ b/Code/Tools/AssetBundler/source/utils/utils.cpp @@ -377,7 +377,6 @@ namespace AssetBundler AzFramework::PlatformFlags GetEnabledPlatformFlags( AZStd::string_view engineRoot, - AZStd::string_view assetRoot, AZStd::string_view projectPath) { auto settingsRegistry = AZ::SettingsRegistry::Get(); @@ -387,7 +386,7 @@ namespace AssetBundler return AzFramework::PlatformFlags::Platform_NONE; } - auto configFiles = AzToolsFramework::AssetUtils::GetConfigFiles(engineRoot, assetRoot, projectPath, true, true, settingsRegistry); + auto configFiles = AzToolsFramework::AssetUtils::GetConfigFiles(engineRoot, projectPath, true, true, settingsRegistry); auto enabledPlatformList = AzToolsFramework::AssetUtils::GetEnabledPlatforms(*settingsRegistry, configFiles); AzFramework::PlatformFlags platformFlags = AzFramework::PlatformFlags::Platform_NONE; for (const auto& enabledPlatform : enabledPlatformList) diff --git a/Code/Tools/AssetBundler/source/utils/utils.h b/Code/Tools/AssetBundler/source/utils/utils.h index bfdf252014..0986d70ca8 100644 --- a/Code/Tools/AssetBundler/source/utils/utils.h +++ b/Code/Tools/AssetBundler/source/utils/utils.h @@ -221,7 +221,6 @@ namespace AssetBundler //! Please note that the game project could be in a different location to the engine therefore we need the assetRoot param. AzFramework::PlatformFlags GetEnabledPlatformFlags( AZStd::string_view enginePath, - AZStd::string_view assetRoot, AZStd::string_view projectPath); QJsonObject ReadJson(const AZStd::string& filePath); diff --git a/Code/Tools/AssetBundler/tests/UtilsTests.cpp b/Code/Tools/AssetBundler/tests/UtilsTests.cpp index 560d399613..60fc79579b 100644 --- a/Code/Tools/AssetBundler/tests/UtilsTests.cpp +++ b/Code/Tools/AssetBundler/tests/UtilsTests.cpp @@ -67,7 +67,7 @@ namespace AssetBundler void NormalizePathKeepCase(AZStd::string& /*path*/) override {} void CalculateBranchTokenForEngineRoot(AZStd::string& /*token*/) const override {} - const char* GetEngineRoot() const override + const char* GetTempDir() const { return m_tempDir->GetDirectory(); } @@ -83,7 +83,7 @@ namespace AssetBundler TEST_F(MockUtilsTest, DISABLED_TestFilePath_StartsWithAFileSeparator_Valid) { AZ::IO::Path relFilePath = "Foo/foo.xml"; - AZ::IO::Path absoluteFilePath = AZ::IO::PathView(GetEngineRoot()).RootPath(); + AZ::IO::Path absoluteFilePath = AZ::IO::PathView(GetTempDir()).RootPath(); absoluteFilePath /= relFilePath; absoluteFilePath = absoluteFilePath.LexicallyNormal(); @@ -95,7 +95,7 @@ namespace AssetBundler TEST_F(MockUtilsTest, TestFilePath_RelativePath_Valid) { AZ::IO::Path relFilePath = "Foo\\foo.xml"; - AZ::IO::Path absoluteFilePath = (AZ::IO::Path(GetEngineRoot()) / relFilePath).LexicallyNormal(); + AZ::IO::Path absoluteFilePath = (AZ::IO::Path(GetTempDir()) / relFilePath).LexicallyNormal(); FilePath filePath(relFilePath.Native()); EXPECT_EQ(AZ::IO::PathView{ filePath.AbsolutePath() }, absoluteFilePath); } @@ -107,8 +107,8 @@ namespace AssetBundler AZ::IO::Path relFilePath = "Foo\\Foo.xml"; AZ::IO::Path wrongCaseRelFilePath = "Foo\\foo.xml"; - AZ::IO::Path correctAbsoluteFilePath = (AZ::IO::Path(GetEngineRoot()) / relFilePath).LexicallyNormal(); - AZ::IO::Path wrongCaseAbsoluteFilePath = (AZ::IO::Path(GetEngineRoot()) / wrongCaseRelFilePath).LexicallyNormal(); + AZ::IO::Path correctAbsoluteFilePath = (AZ::IO::Path(GetTempDir()) / relFilePath).LexicallyNormal(); + AZ::IO::Path wrongCaseAbsoluteFilePath = (AZ::IO::Path(GetTempDir()) / wrongCaseRelFilePath).LexicallyNormal(); AZ::IO::HandleType fileHandle = AZ::IO::InvalidHandle; AZ::IO::FileIOBase::GetInstance()->Open(correctAbsoluteFilePath.c_str(), AZ::IO::OpenMode::ModeWrite | AZ::IO::OpenMode::ModeCreatePath, fileHandle); @@ -121,7 +121,7 @@ namespace AssetBundler TEST_F(MockUtilsTest, TestFilePath_NoFileExists_NoError_valid) { AZ::IO::Path relFilePath = "Foo\\Foo.xml"; - AZ::IO::Path absoluteFilePath = (AZ::IO::Path(GetEngineRoot()) / relFilePath).LexicallyNormal(); + AZ::IO::Path absoluteFilePath = (AZ::IO::Path(GetTempDir()) / relFilePath).LexicallyNormal(); FilePath filePath(absoluteFilePath.Native(), true, false); EXPECT_TRUE(filePath.IsValid()); @@ -132,8 +132,8 @@ namespace AssetBundler { AZStd::string relFilePath = "Foo\\Foo.xml"; AZStd::string wrongCaseRelFilePath = "Foo\\foo.xml"; - AZ::IO::Path correctAbsoluteFilePath = (AZ::IO::Path(GetEngineRoot()) / relFilePath).LexicallyNormal(); - AZ::IO::Path wrongCaseAbsoluteFilePath = (AZ::IO::Path(GetEngineRoot()) / wrongCaseRelFilePath).LexicallyNormal(); + AZ::IO::Path correctAbsoluteFilePath = (AZ::IO::Path(GetTempDir()) / relFilePath).LexicallyNormal(); + AZ::IO::Path wrongCaseAbsoluteFilePath = (AZ::IO::Path(GetTempDir()) / wrongCaseRelFilePath).LexicallyNormal(); AZ::IO::HandleType fileHandle = AZ::IO::InvalidHandle; AZ::IO::FileIOBase::GetInstance()->Open(correctAbsoluteFilePath.c_str(), AZ::IO::OpenMode::ModeWrite | AZ::IO::OpenMode::ModeCreatePath, fileHandle); diff --git a/Code/Tools/AssetBundler/tests/applicationManagerTests.cpp b/Code/Tools/AssetBundler/tests/applicationManagerTests.cpp index 0d915dcc49..fd587195af 100644 --- a/Code/Tools/AssetBundler/tests/applicationManagerTests.cpp +++ b/Code/Tools/AssetBundler/tests/applicationManagerTests.cpp @@ -16,6 +16,7 @@ #include #include #include +#include #include #include @@ -66,7 +67,9 @@ namespace AssetBundler } auto projectPathKey = AZ::SettingsRegistryInterface::FixedValueString(AZ::SettingsRegistryMergeUtils::BootstrapSettingsRootKey) + "/project_path"; - registry->Set(projectPathKey, "AutomatedTesting"); + AZ::IO::FixedMaxPath enginePath; + registry->Get(enginePath.Native(), AZ::SettingsRegistryMergeUtils::FilePathKey_EngineRootFolder); + registry->Set(projectPathKey, (enginePath / "AutomatedTesting").Native()); AZ::SettingsRegistryMergeUtils::MergeSettingsToRegistry_AddRuntimeFilePaths(*registry); @@ -82,10 +85,9 @@ namespace AssetBundler // in the unit tests. AZ::UserSettingsComponentRequestBus::Broadcast(&AZ::UserSettingsComponentRequests::DisableSaveOnFinalize); - const char* engineRoot = nullptr; - AzFramework::ApplicationRequests::Bus::BroadcastResult(engineRoot, &AzFramework::ApplicationRequests::GetEngineRoot); - ASSERT_TRUE(engineRoot) << "Unable to locate engine root.\n"; - AzFramework::StringFunc::Path::Join(engineRoot, RelativeTestFolder, m_data->m_testEngineRoot); + AZ::IO::FixedMaxPath engineRoot = AZ::Utils::GetEnginePath(); + ASSERT_TRUE(!engineRoot.empty()) << "Unable to locate engine root.\n"; + m_data->m_testEngineRoot = (engineRoot / RelativeTestFolder).String(); m_data->m_localFileIO = aznew AZ::IO::LocalFileIO(); m_data->m_priorFileIO = AZ::IO::FileIOBase::GetInstance(); @@ -148,7 +150,8 @@ namespace AssetBundler EXPECT_EQ(0, gemsNameMap.size()); - AzFramework::PlatformFlags platformFlags = GetEnabledPlatformFlags(m_data->m_testEngineRoot.c_str(), m_data->m_testEngineRoot.c_str(), DummyProjectName); + const auto testProjectPath = AZ::IO::Path(m_data->m_testEngineRoot) / DummyProjectName; + AzFramework::PlatformFlags platformFlags = GetEnabledPlatformFlags(m_data->m_testEngineRoot, testProjectPath.Native()); AzFramework::PlatformFlags hostPlatformFlag = AzFramework::PlatformHelper::GetPlatformFlag(AzToolsFramework::AssetSystem::GetHostAssetPlatform()); AzFramework::PlatformFlags expectedFlags = AzFramework::PlatformFlags::Platform_ANDROID | AzFramework::PlatformFlags::Platform_IOS | AzFramework::PlatformFlags::Platform_PROVO | hostPlatformFlag; ASSERT_EQ(platformFlags, expectedFlags); diff --git a/Code/Tools/AssetBundler/tests/tests_main.cpp b/Code/Tools/AssetBundler/tests/tests_main.cpp index 21a6bf8a6f..86432d730e 100644 --- a/Code/Tools/AssetBundler/tests/tests_main.cpp +++ b/Code/Tools/AssetBundler/tests/tests_main.cpp @@ -106,7 +106,9 @@ namespace AssetBundler } auto projectPathKey = AZ::SettingsRegistryInterface::FixedValueString(AZ::SettingsRegistryMergeUtils::BootstrapSettingsRootKey) + "/project_path"; - registry->Set(projectPathKey, "AutomatedTesting"); + AZ::IO::FixedMaxPath enginePath; + registry->Get(enginePath.Native(), AZ::SettingsRegistryMergeUtils::FilePathKey_EngineRootFolder); + registry->Set(projectPathKey, (enginePath / "AutomatedTesting").Native()); AZ::SettingsRegistryMergeUtils::MergeSettingsToRegistry_AddRuntimeFilePaths(*registry); AZ::IO::FixedMaxPath engineRoot = AZ::Utils::GetEnginePath(); diff --git a/Code/Tools/AssetProcessor/AssetBuilder/AssetBuilderApplication.cpp b/Code/Tools/AssetProcessor/AssetBuilder/AssetBuilderApplication.cpp index da2edcc51f..074138b324 100644 --- a/Code/Tools/AssetProcessor/AssetBuilder/AssetBuilderApplication.cpp +++ b/Code/Tools/AssetProcessor/AssetBuilder/AssetBuilderApplication.cpp @@ -37,6 +37,7 @@ #include #include #include +#include namespace AssetBuilder { @@ -165,6 +166,7 @@ void AssetBuilderApplication::StartCommon(AZ::Entity* systemEntity) AssetBuilderSDK::InitializeSerializationContext(); AssetBuilderSDK::InitializeBehaviorContext(); + AssetBuilder::InitializeSerializationContext(); // the asset builder app never writes source files, only assets, so there is no need to do any kind of asset upgrading AZ::Data::AssetManager::Instance().SetAssetInfoUpgradingEnabled(false); diff --git a/Code/Tools/AssetProcessor/AssetBuilder/AssetBuilderComponent.cpp b/Code/Tools/AssetProcessor/AssetBuilder/AssetBuilderComponent.cpp index 78244ab02c..21b8c31cf4 100644 --- a/Code/Tools/AssetProcessor/AssetBuilder/AssetBuilderComponent.cpp +++ b/Code/Tools/AssetProcessor/AssetBuilder/AssetBuilderComponent.cpp @@ -34,6 +34,7 @@ #include #include #include +#include // Command-line parameter options: static const char* const s_paramHelp = "help"; // Print help information. @@ -51,10 +52,10 @@ static const char* const s_paramDebugCreate = "debug_create"; // Debug mode for static const char* const s_paramDebugProcess = "debug_process"; // Debug mode for the process job of the specified file. static const char* const s_paramPlatformTags = "tags"; // Additional list of tags to add platform tag list. static const char* const s_paramPlatform = "platform"; // Platform to use +static const char* const s_paramRegisterBuilders = "register"; // Indicates the AP is starting up and requesting a list of registered builders // Task modes: static const char* const s_taskResident = "resident"; // stays up and running indefinitely, accepting jobs via network connection -static const char* const s_taskRegisterBuilder = "register"; // outputs all the builder descriptors static const char* const s_taskCreateJob = "create"; // runs a builders createJobs function static const char* const s_taskProcessJob = "process"; // runs processJob function static const char* const s_taskDebug = "debug"; // runs a one shot job in a fake environment for a specified file. @@ -204,6 +205,40 @@ void AssetBuilderComponent::Reflect(AZ::ReflectContext* context) } } +bool AssetBuilderComponent::DoHelloPing() +{ + using namespace AssetBuilder; + + BuilderHelloRequest request; + BuilderHelloResponse response; + + AZStd::string id; + + if (!GetParameter(s_paramId, id)) + { + return false; + } + + request.m_uuid = AZ::Uuid::CreateString(id.c_str()); + + AZ_TracePrintf( + "AssetBuilderComponent", "RunInResidentMode: Pinging asset processor with the builder UUID %s\n", + request.m_uuid.ToString().c_str()); + + bool result = AzFramework::AssetSystem::SendRequest(request, response); + + AZ_Error("AssetBuilder", result, "Failed to send hello request to Asset Processor"); + // This error is only shown if we successfully got a response AND the response explicitly indicates the AP rejected the builder + AZ_Error("AssetBuilder", !result || response.m_accepted, "Asset Processor rejected connection request"); + + if (result) + { + AZ_TracePrintf("AssetBuilder", "Builder ID: %s\n", response.m_uuid.ToString().c_str()); + } + + return result; +} + bool AssetBuilderComponent::Run() { AZ_TracePrintf("AssetBuilderComponent", "Run: Parsing command line.\n"); @@ -217,8 +252,8 @@ bool AssetBuilderComponent::Run() } AZStd::string task; - AZStd::string debugFile; + if (GetParameter(s_paramDebug, debugFile, false)) { task = s_taskDebug; @@ -256,11 +291,13 @@ bool AssetBuilderComponent::Run() AZ_TracePrintf("AssetBuilderComponent", "Run: Connecting back to Asset Processor...\n"); bool connectedToAssetProcessor = ConnectToAssetProcessor(); //AP connection is required to access the asset catalog - AZ_Error("AssetBuilder", connectedToAssetProcessor, "Failed to establish a network connection to the AssetProcessor. Use -help for options.");; + AZ_Error("AssetBuilder", connectedToAssetProcessor, "Failed to establish a network connection to the AssetProcessor. Use -help for options."); + + bool registerBuilders = commandLine->GetNumSwitchValues(s_paramRegisterBuilders) > 0; IBuilderApplication* builderApplication = AZ::Interface::Get(); - if(!builderApplication) + if (!builderApplication) { AZ_Error("AssetBuilder", false, "Failed to retreive IBuilderApplication interface"); return false; @@ -274,7 +311,7 @@ bool AssetBuilderComponent::Run() { if (task == s_taskResident) { - result = RunInResidentMode(); + result = RunInResidentMode(registerBuilders); } else if (task == s_taskDebug) { @@ -370,43 +407,46 @@ bool AssetBuilderComponent::ConnectToAssetProcessor() ////////////////////////////////////////////////////////////////////////// -bool AssetBuilderComponent::RunInResidentMode() +bool AssetBuilderComponent::SendRegisteredBuildersToAp() { - using namespace AssetBuilderSDK; + AssetBuilder::BuilderRegistrationRequest registrationRequest; + + for (const auto& [uuid, desc] : m_assetBuilderDescMap) + { + AssetBuilder::BuilderRegistration registration; + + registration.m_name = desc->m_name; + registration.m_analysisFingerprint = desc->m_analysisFingerprint; + registration.m_flags = desc->m_flags; + registration.m_flagsByJobKey = desc->m_flagsByJobKey; + registration.m_version = desc->m_version; + registration.m_busId = desc->m_busId; + registration.m_patterns = desc->m_patterns; + registration.m_productsToKeepOnFailure = desc->m_productsToKeepOnFailure; + + registrationRequest.m_builders.push_back(AZStd::move(registration)); + } + + bool result = SendRequest(registrationRequest); + + AZ_Error("AssetBuilder", result, "Failed to send builder registration request to Asset Processor"); + + return result; +} + +bool AssetBuilderComponent::RunInResidentMode(bool sendRegistration) +{ + using namespace AssetBuilder; using namespace AZStd::placeholders; AZ_TracePrintf("AssetBuilderComponent", "RunInResidentMode: Starting resident mode (waiting for commands to arrive)\n"); - AZStd::string port, id, builderFolder; - - if (!GetParameter(s_paramId, id) - || !GetParameter(s_paramModule, builderFolder)) - { - return false; - } - - if (!LoadBuilders(builderFolder)) - { - return false; - } - AzFramework::SocketConnection::GetInstance()->AddMessageHandler(CreateJobsNetRequest::MessageType(), AZStd::bind(&AssetBuilderComponent::CreateJobsResidentHandler, this, _1, _2, _3, _4)); AzFramework::SocketConnection::GetInstance()->AddMessageHandler(ProcessJobNetRequest::MessageType(), AZStd::bind(&AssetBuilderComponent::ProcessJobResidentHandler, this, _1, _2, _3, _4)); - BuilderHelloRequest request; - BuilderHelloResponse response; + bool result = DoHelloPing() && ((sendRegistration && SendRegisteredBuildersToAp()) || !sendRegistration); - request.m_uuid = AZ::Uuid::CreateString(id.c_str()); - - AZ_TracePrintf("AssetBuilderComponent", "RunInResidentMode: Pinging asset processor with the builder UUID %s\n", request.m_uuid.ToString().c_str()); - - bool result = AzFramework::AssetSystem::SendRequest(request, response); - - AZ_Error("AssetBuilder", result, "Failed to send hello request to Asset Processor"); - // This error is only shown if we successfully got a response AND the response explicitly indicates the AP rejected the builder - AZ_Error("AssetBuilder", !result || response.m_accepted, "Asset Processor rejected connection request"); - - if (result && response.m_accepted) + if (result) { m_running = true; @@ -415,7 +455,6 @@ bool AssetBuilderComponent::RunInResidentMode() AzFramework::EngineConnectionEvents::Bus::Handler::BusConnect(); // Listen for disconnects - AZ_TracePrintf("AssetBuilder", "Builder ID: %s\n", response.m_uuid.ToString().c_str()); AZ_TracePrintf("AssetBuilder", "Resident mode ready\n"); m_mainEvent.acquire(); AZ_TracePrintf("AssetBuilder", "Shutting down\n"); @@ -736,11 +775,7 @@ bool AssetBuilderComponent::RunOneShotTask(const AZStd::string& task) AZ::StringFunc::Path::Normalize(inputFilePath); AZ::StringFunc::Path::Normalize(outputFilePath); - if (task == s_taskRegisterBuilder) - { - return HandleRegisterBuilder(inputFilePath, outputFilePath); - } - else if (task == s_taskCreateJob) + if (task == s_taskCreateJob) { auto func = [this](const AssetBuilderSDK::CreateJobsRequest& request, AssetBuilderSDK::CreateJobsResponse& response) { @@ -896,7 +931,7 @@ void AssetBuilderComponent::JobThread() { case JobType::Create: { - using namespace AssetBuilderSDK; + using namespace AssetBuilder; auto* netRequest = azrtti_cast(job->m_netRequest.get()); auto* netResponse = azrtti_cast(job->m_netResponse.get()); @@ -922,7 +957,7 @@ void AssetBuilderComponent::JobThread() } case JobType::Process: { - using namespace AssetBuilderSDK; + using namespace AssetBuilder; AZ_TracePrintf("AssetBuilder", "Running processJob task\n"); @@ -981,14 +1016,14 @@ void AssetBuilderComponent::JobThread() void AssetBuilderComponent::CreateJobsResidentHandler(AZ::u32 /*typeId*/, AZ::u32 serial, const void* data, AZ::u32 dataLength) { - using namespace AssetBuilderSDK; + using namespace AssetBuilder; ResidentJobHandler(serial, data, dataLength, JobType::Create); } void AssetBuilderComponent::ProcessJobResidentHandler(AZ::u32 /*typeId*/, AZ::u32 serial, const void* data, AZ::u32 dataLength) { - using namespace AssetBuilderSDK; + using namespace AssetBuilder; ResidentJobHandler(serial, data, dataLength, JobType::Process); } @@ -1018,18 +1053,6 @@ bool AssetBuilderComponent::HandleTask(const AZStd::string& inputFilePath, const return true; } -bool AssetBuilderComponent::HandleRegisterBuilder(const AZStd::string& /*inputFilePath*/, const AZStd::string& outputFilePath) const -{ - AssetBuilderSDK::RegisterBuilderResponse response; - - for (const auto& pair : m_assetBuilderDescMap) - { - response.m_assetBuilderDescList.push_back(*pair.second); - } - - return AZ::Utils::SaveObjectToFile(outputFilePath, AZ::DataStream::ST_XML, &response); -} - void AssetBuilderComponent::UpdateResultCode(const AssetBuilderSDK::ProcessJobRequest& request, AssetBuilderSDK::ProcessJobResponse& response) const { if (request.m_jobDescription.m_failOnError) diff --git a/Code/Tools/AssetProcessor/AssetBuilder/AssetBuilderComponent.h b/Code/Tools/AssetProcessor/AssetBuilder/AssetBuilderComponent.h index 2014be41aa..2172e9093e 100644 --- a/Code/Tools/AssetProcessor/AssetBuilder/AssetBuilderComponent.h +++ b/Code/Tools/AssetProcessor/AssetBuilder/AssetBuilderComponent.h @@ -46,6 +46,7 @@ class AssetBuilderComponent public: AZ_COMPONENT(AssetBuilderComponent, "{04332899-5d73-4d41-86b7-b1017d349673}") static void Reflect(AZ::ReflectContext* context); + bool DoHelloPing(); AssetBuilderComponent() = default; ~AssetBuilderComponent() override = default; @@ -64,7 +65,7 @@ public: void RegisterBuilderInformation(const AssetBuilderSDK::AssetBuilderDesc& builderDesc) override; void RegisterComponentDescriptor(AZ::ComponentDescriptor* descriptor) override; - + //EngineConnectionEvents Handler void Disconnected(AzFramework::SocketConnection* connection) override; @@ -98,12 +99,13 @@ protected: static const char* GetLibraryExtension(); bool ConnectToAssetProcessor(); + bool SendRegisteredBuildersToAp(); bool LoadBuilders(const AZStd::string& builderFolder); bool LoadBuilder(const AZStd::string& filePath); void UnloadBuilders(); //! Hooks up net job request handling and keeps the AssetBuilder running indefinitely - bool RunInResidentMode(); + bool RunInResidentMode(bool sendRegistration); bool RunDebugTask(AZStd::string&& debugFile, bool runCreateJobs, bool runProcessJob); bool RunOneShotTask(const AZStd::string& task); @@ -120,9 +122,6 @@ protected: void ProcessJob(const AssetBuilderSDK::ProcessJobFunction& job, const AssetBuilderSDK::ProcessJobRequest& request, AssetBuilderSDK::ProcessJobResponse& outResponse); - //! Handles a builder registration request - bool HandleRegisterBuilder(const AZStd::string& inputFilePath, const AZStd::string& outputFilePath) const; - //! If needed looks at collected data and updates the result code from the job accordingly. void UpdateResultCode(const AssetBuilderSDK::ProcessJobRequest& request, AssetBuilderSDK::ProcessJobResponse& response) const; @@ -141,7 +140,7 @@ protected: //! Currently loading builder AssetBuilder::ExternalModuleAssetBuilderInfo* m_currentAssetBuilder = nullptr; - + //! Thread for running a job, so we don't block the network thread while doing work AZStd::thread_desc m_jobThreadDesc; AZStd::thread m_jobThread; @@ -153,7 +152,7 @@ protected: AZStd::binary_semaphore m_mainEvent; //! Use to signal a new job is ready to be processed AZStd::binary_semaphore m_jobEvent; - + //! Lock for m_queuedJob AZStd::mutex m_jobMutex; diff --git a/Code/Tools/AssetProcessor/AssetBuilder/AssetBuilderStatic.cpp b/Code/Tools/AssetProcessor/AssetBuilder/AssetBuilderStatic.cpp new file mode 100644 index 0000000000..6a67fbe425 --- /dev/null +++ b/Code/Tools/AssetProcessor/AssetBuilder/AssetBuilderStatic.cpp @@ -0,0 +1,182 @@ +/* + * Copyright (c) Contributors to the Open 3D Engine Project. + * For complete copyright and license terms please see the LICENSE at the root of this distribution. + * + * SPDX-License-Identifier: Apache-2.0 OR MIT + * + */ + +#include +#include + +namespace AssetBuilder +{ + void Reflect(AZ::ReflectContext* context) + { + BuilderRegistrationRequest::Reflect(context); + + BuilderHelloRequest::Reflect(context); + BuilderHelloResponse::Reflect(context); + CreateJobsNetRequest::Reflect(context); + CreateJobsNetResponse::Reflect(context); + ProcessJobNetRequest::Reflect(context); + ProcessJobNetResponse::Reflect(context); + } + + void InitializeSerializationContext() + { + AZ::SerializeContext* serializeContext = nullptr; + + AZ::ComponentApplicationBus::BroadcastResult(serializeContext, &AZ::ComponentApplicationBus::Events::GetSerializeContext); + AZ_Assert(serializeContext, "Unable to retrieve serialize context."); + + Reflect(serializeContext); + } + + void BuilderHelloRequest::Reflect(AZ::ReflectContext* context) + { + auto serialize = azrtti_cast(context); + if (serialize) + { + serialize->Class()->Version(1)->Field("UUID", &BuilderHelloRequest::m_uuid); + } + } + + unsigned int BuilderHelloRequest::MessageType() + { + static unsigned int messageType = AZ_CRC("AssetBuilderSDK::BuilderHelloRequest", 0x213a7248); + + return messageType; + } + + unsigned int BuilderHelloRequest::GetMessageType() const + { + return MessageType(); + } + + void BuilderHelloResponse::Reflect(AZ::ReflectContext* context) + { + auto serialize = azrtti_cast(context); + if (serialize) + { + serialize->Class() + ->Version(1) + ->Field("Accepted", &BuilderHelloResponse::m_accepted) + ->Field("UUID", &BuilderHelloResponse::m_uuid); + } + } + + unsigned int BuilderHelloResponse::GetMessageType() const + { + return BuilderHelloRequest::MessageType(); + } + + ////////////////////////////////////////////////////////////////////////// + + void CreateJobsNetRequest::Reflect(AZ::ReflectContext* context) + { + auto serialize = azrtti_cast(context); + if (serialize) + { + serialize->Class()->Version(1)->Field("Request", &CreateJobsNetRequest::m_request); + } + } + + unsigned int CreateJobsNetRequest::MessageType() + { + static unsigned int messageType = AZ_CRC("AssetBuilderSDK::CreateJobsNetRequest", 0xc48209c0); + + return messageType; + } + + unsigned int CreateJobsNetRequest::GetMessageType() const + { + return MessageType(); + } + + void CreateJobsNetResponse::Reflect(AZ::ReflectContext* context) + { + auto serialize = azrtti_cast(context); + if (serialize) + { + serialize->Class()->Version(1)->Field("Response", &CreateJobsNetResponse::m_response); + } + } + + unsigned int CreateJobsNetResponse::GetMessageType() const + { + return CreateJobsNetRequest::MessageType(); + } + + void ProcessJobNetRequest::Reflect(AZ::ReflectContext* context) + { + auto serialize = azrtti_cast(context); + if (serialize) + { + serialize->Class()->Version(1)->Field("Request", &ProcessJobNetRequest::m_request); + } + } + + unsigned int ProcessJobNetRequest::MessageType() + { + static unsigned int messageType = AZ_CRC("AssetBuilderSDK::ProcessJobNetRequest", 0x479f340f); + + return messageType; + } + + unsigned int ProcessJobNetRequest::GetMessageType() const + { + return MessageType(); + } + + void ProcessJobNetResponse::Reflect(AZ::ReflectContext* context) + { + auto serialize = azrtti_cast(context); + if (serialize) + { + serialize->Class()->Version(1)->Field("Response", &ProcessJobNetResponse::m_response); + } + } + + unsigned int ProcessJobNetResponse::GetMessageType() const + { + return ProcessJobNetRequest::MessageType(); + } + + //--------------------------------------------------------------------- + void BuilderRegistration::Reflect(AZ::ReflectContext* context) + { + auto serialize = azrtti_cast(context); + if (serialize) + { + serialize->Class() + ->Version(1) + ->Field("Name", &BuilderRegistration::m_name) + ->Field("Patterns", &BuilderRegistration::m_patterns) + ->Field("BusId", &BuilderRegistration::m_busId) + ->Field("Version", &BuilderRegistration::m_version) + ->Field("AnalysisFingerprint", &BuilderRegistration::m_analysisFingerprint) + ->Field("Flags", &BuilderRegistration::m_flags) + ->Field("FlagsByJobKey", &BuilderRegistration::m_flagsByJobKey) + ->Field("ProductsToKeepOnFailure", &BuilderRegistration::m_productsToKeepOnFailure); + } + } + + void BuilderRegistrationRequest::Reflect(AZ::ReflectContext* context) + { + BuilderRegistration::Reflect(context); + + auto serialize = azrtti_cast(context); + if (serialize) + { + serialize->Class()->Version(1)->Field( + "Builders", &BuilderRegistrationRequest::m_builders); + } + } + + unsigned int BuilderRegistrationRequest::GetMessageType() const + { + return BuilderRegistrationRequest::MessageType; + } + +} // namespace AssetBuilder diff --git a/Code/Tools/AssetProcessor/AssetBuilder/AssetBuilderStatic.h b/Code/Tools/AssetProcessor/AssetBuilder/AssetBuilderStatic.h new file mode 100644 index 0000000000..41b6531116 --- /dev/null +++ b/Code/Tools/AssetProcessor/AssetBuilder/AssetBuilderStatic.h @@ -0,0 +1,140 @@ +/* + * Copyright (c) Contributors to the Open 3D Engine Project. + * For complete copyright and license terms please see the LICENSE at the root of this distribution. + * + * SPDX-License-Identifier: Apache-2.0 OR MIT + * + */ + +#pragma once + +#include +#include + +namespace AssetBuilder +{ + void Reflect(AZ::ReflectContext* context); + + void InitializeSerializationContext(); + + //! BuilderHelloRequest is sent by an AssetBuilder that is attempting to connect to the AssetProcessor to register itself as a worker + class BuilderHelloRequest : public AzFramework::AssetSystem::BaseAssetProcessorMessage + { + public: + AZ_CLASS_ALLOCATOR(BuilderHelloRequest, AZ::OSAllocator, 0); + AZ_RTTI(BuilderHelloRequest, "{5fab5962-a1d8-42a5-bf7a-fb1a8c5a9588}", BaseAssetProcessorMessage); + + static void Reflect(AZ::ReflectContext* context); + static unsigned int MessageType(); + + unsigned int GetMessageType() const override; + + //! Unique ID assigned to this builder to identify it + AZ::Uuid m_uuid = AZ::Uuid::CreateNull(); + }; + + //! BuilderHelloResponse contains the AssetProcessor's response to a builder connection attempt, indicating if it is accepted and the ID + //! that it was assigned + class BuilderHelloResponse : public AzFramework::AssetSystem::BaseAssetProcessorMessage + { + public: + AZ_CLASS_ALLOCATOR(BuilderHelloResponse, AZ::OSAllocator, 0); + AZ_RTTI(BuilderHelloResponse, "{5f3d7c11-6639-4c6f-980a-32be546903c2}", BaseAssetProcessorMessage); + + static void Reflect(AZ::ReflectContext* context); + + unsigned int GetMessageType() const override; + + //! Indicates if the builder was accepted by the AP + bool m_accepted = false; + + //! Unique ID assigned to the builder. If the builder isn't a local process, this is the ID assigned by the AP + AZ::Uuid m_uuid = AZ::Uuid::CreateNull(); + }; + + class CreateJobsNetRequest : public AzFramework::AssetSystem::BaseAssetProcessorMessage + { + public: + AZ_CLASS_ALLOCATOR(CreateJobsNetRequest, AZ::OSAllocator, 0); + AZ_RTTI(CreateJobsNetRequest, "{97fa717d-3a09-4d21-95c6-b2eafd773f1c}", BaseAssetProcessorMessage); + + static void Reflect(AZ::ReflectContext* context); + static unsigned int MessageType(); + + unsigned int GetMessageType() const override; + + AssetBuilderSDK::CreateJobsRequest m_request; + }; + + class CreateJobsNetResponse : public AzFramework::AssetSystem::BaseAssetProcessorMessage + { + public: + AZ_CLASS_ALLOCATOR(CreateJobsNetResponse, AZ::OSAllocator, 0); + AZ_RTTI(CreateJobsNetResponse, "{b2c7c2d3-b60e-4b27-b699-43e0ba991c33}", BaseAssetProcessorMessage); + + static void Reflect(AZ::ReflectContext* context); + + unsigned int GetMessageType() const override; + + AssetBuilderSDK::CreateJobsResponse m_response; + }; + + class ProcessJobNetRequest : public AzFramework::AssetSystem::BaseAssetProcessorMessage + { + public: + AZ_CLASS_ALLOCATOR(ProcessJobNetRequest, AZ::OSAllocator, 0); + AZ_RTTI(ProcessJobNetRequest, "{05288de1-020b-48db-b9de-715f17284efa}", BaseAssetProcessorMessage); + + static void Reflect(AZ::ReflectContext* context); + static unsigned int MessageType(); + + unsigned int GetMessageType() const override; + + AssetBuilderSDK::ProcessJobRequest m_request; + }; + + class ProcessJobNetResponse : public AzFramework::AssetSystem::BaseAssetProcessorMessage + { + public: + AZ_CLASS_ALLOCATOR(ProcessJobNetResponse, AZ::OSAllocator, 0); + AZ_RTTI(ProcessJobNetResponse, "{26ddf882-246c-4cfb-912f-9b8e389df4f6}", BaseAssetProcessorMessage); + + static void Reflect(AZ::ReflectContext* context); + + unsigned int GetMessageType() const override; + + AssetBuilderSDK::ProcessJobResponse m_response; + }; + + ////////////////////////////////////////////////////////////////////////// + struct BuilderRegistration + { + AZ_CLASS_ALLOCATOR(BuilderRegistration, AZ::OSAllocator, 0); + AZ_TYPE_INFO(BuilderRegistration, "{36E785C3-5046-4568-870A-336C8249E453}"); + + static void Reflect(AZ::ReflectContext* context); + + AZStd::string m_name; + AZStd::vector m_patterns; + AZ::Uuid m_busId; + int m_version = 0; + AZStd::string m_analysisFingerprint; + AZ::u8 m_flags = 0; + AZStd::unordered_map m_flagsByJobKey; + AZStd::unordered_map> m_productsToKeepOnFailure; + }; + + class BuilderRegistrationRequest : public AzFramework::AssetSystem::BaseAssetProcessorMessage + { + public: + AZ_CLASS_ALLOCATOR(BuilderRegistrationRequest, AZ::OSAllocator, 0); + AZ_RTTI(BuilderRegistrationRequest, "{FA9CF2D5-C847-47F3-979D-6C3AE061715C}", BaseAssetProcessorMessage); + static void Reflect(AZ::ReflectContext* context); + static constexpr unsigned int MessageType = AZ_CRC_CE("AssetSystem::BuilderRegistrationRequest"); + + BuilderRegistrationRequest() = default; + unsigned int GetMessageType() const override; + + AZStd::vector m_builders; + }; +} // namespace AssetBuilder diff --git a/Code/Tools/AssetProcessor/AssetBuilder/CMakeLists.txt b/Code/Tools/AssetProcessor/AssetBuilder/CMakeLists.txt index 6baa99d43b..f23e749169 100644 --- a/Code/Tools/AssetProcessor/AssetBuilder/CMakeLists.txt +++ b/Code/Tools/AssetProcessor/AssetBuilder/CMakeLists.txt @@ -6,6 +6,22 @@ # # +ly_add_target( + NAME AssetBuilder.Static STATIC + NAMESPACE AZ + FILES_CMAKE + asset_builder_static_files.cmake + INCLUDE_DIRECTORIES + PUBLIC + . + BUILD_DEPENDENCIES + PUBLIC + AZ::AzCore + AZ::AzFramework + AZ::AzToolsFramework + AZ::AssetBuilderSDK +) + ly_add_target( NAME AssetBuilder EXECUTABLE NAMESPACE AZ @@ -17,6 +33,7 @@ ly_add_target( . BUILD_DEPENDENCIES PRIVATE + AssetBuilder.Static 3rdParty::Qt::Core 3rdParty::Qt::Gui 3rdParty::Qt::Network diff --git a/Code/Tools/AssetProcessor/AssetBuilder/asset_builder_static_files.cmake b/Code/Tools/AssetProcessor/AssetBuilder/asset_builder_static_files.cmake new file mode 100644 index 0000000000..48de742704 --- /dev/null +++ b/Code/Tools/AssetProcessor/AssetBuilder/asset_builder_static_files.cmake @@ -0,0 +1,12 @@ +# +# Copyright (c) Contributors to the Open 3D Engine Project. +# For complete copyright and license terms please see the LICENSE at the root of this distribution. +# +# SPDX-License-Identifier: Apache-2.0 OR MIT +# +# + +set(FILES + AssetBuilderStatic.h + AssetBuilderStatic.cpp +) diff --git a/Code/Tools/AssetProcessor/AssetBuilderSDK/AssetBuilderSDK/AssetBuilderSDK.cpp b/Code/Tools/AssetProcessor/AssetBuilderSDK/AssetBuilderSDK/AssetBuilderSDK.cpp index 62b063c83b..43126dd673 100644 --- a/Code/Tools/AssetProcessor/AssetBuilderSDK/AssetBuilderSDK/AssetBuilderSDK.cpp +++ b/Code/Tools/AssetProcessor/AssetBuilderSDK/AssetBuilderSDK/AssetBuilderSDK.cpp @@ -23,6 +23,8 @@ #include ////////////////////////////////////////////////////////////////////////// +#include + namespace AssetBuilderSDK { const char* const ErrorWindow = "Error"; //Use this window name to log error messages. @@ -690,7 +692,6 @@ namespace AssetBuilderSDK static const char* textureExtensions = ".dds"; static const char* staticMeshExtensions = ".cgf"; static const char* skinnedMeshExtensions = ".skin"; - static const char* materialExtensions = ".mtl"; // MIPS static const int c_MaxMipsCount = 11; // 11 is for 8k textures non-compressed. When not compressed it is using one file per mip. @@ -699,7 +700,6 @@ namespace AssetBuilderSDK // XML files may contain generic data (avoid this in new builders - use a custom extension!) static const char* xmlExtensions = ".xml"; - static const char* geomCacheExtensions = ".cax"; static const char* skeletonExtensions = ".chr"; static AZ::Data::AssetType unknownAssetType = AZ::Data::AssetType::CreateNull(); @@ -710,7 +710,6 @@ namespace AssetBuilderSDK static AZ::Data::AssetType textureMipsAssetType("{3918728C-D3CA-4D9E-813E-A5ED20C6821E}"); static AZ::Data::AssetType skinnedMeshLodsAssetType("{58E5824F-C27B-46FD-AD48-865BA41B7A51}"); static AZ::Data::AssetType staticMeshLodsAssetType("{9AAE4926-CB6A-4C60-9948-A1A22F51DB23}"); - static AZ::Data::AssetType geomCacheAssetType("{EBC96071-E960-41B6-B3E3-328F515AE5DA}"); static AZ::Data::AssetType skeletonAssetType("{60161B46-21F0-4396-A4F0-F2CCF0664CDE}"); static AZ::Data::AssetType entityIconAssetType("{3436C30E-E2C5-4C3B-A7B9-66C94A28701B}"); @@ -807,11 +806,6 @@ namespace AssetBuilderSDK return textureAssetType; } - if (AzFramework::StringFunc::Find(materialExtensions, extension.c_str()) != AZStd::string::npos) - { - return materialAssetType; - } - if (AzFramework::StringFunc::Find(staticMeshExtensions, extension.c_str()) != AZStd::string::npos) { return meshAssetType; @@ -822,11 +816,6 @@ namespace AssetBuilderSDK return skinnedMeshAssetType; } - if (AzFramework::StringFunc::Find(geomCacheExtensions, extension.c_str()) != AZStd::string::npos) - { - return geomCacheAssetType; - } - if (AzFramework::StringFunc::Find(skeletonExtensions, extension.c_str()) != AZStd::string::npos) { return skeletonAssetType; @@ -1183,19 +1172,10 @@ namespace AssetBuilderSDK JobProduct::Reflect(context); AssetBuilderDesc::Reflect(context); - RegisterBuilderRequest::Reflect(context); - RegisterBuilderResponse::Reflect(context); CreateJobsRequest::Reflect(context); CreateJobsResponse::Reflect(context); ProcessJobRequest::Reflect(context); ProcessJobResponse::Reflect(context); - - BuilderHelloRequest::Reflect(context); - BuilderHelloResponse::Reflect(context); - CreateJobsNetRequest::Reflect(context); - CreateJobsNetResponse::Reflect(context); - ProcessJobNetRequest::Reflect(context); - ProcessJobNetResponse::Reflect(context); } void InitializeSerializationContext() @@ -1274,24 +1254,6 @@ namespace AssetBuilderSDK } } - void RegisterBuilderRequest::Reflect(AZ::ReflectContext* context) - { - if (AZ::SerializeContext* serializeContext = azrtti_cast(context)) - { - serializeContext->Class()-> - Version(1)-> - Field("FilePath", &RegisterBuilderRequest::m_filePath); - } - - if (AZ::BehaviorContext* behaviorContext = azrtti_cast(context)) - { - behaviorContext->Class("RegisterBuilderRequest") - ->Attribute(AZ::Script::Attributes::Scope, AZ::Script::Attributes::ScopeFlags::Automation) - ->Attribute(AZ::Script::Attributes::Module, "asset.builder") - ->Property("filePath", BehaviorValueProperty(&RegisterBuilderRequest::m_filePath)); - } - } - void AssetBuilderDesc::Reflect(AZ::ReflectContext* context) { if (AZ::SerializeContext* serializeContext = azrtti_cast(context)) @@ -1324,25 +1286,6 @@ namespace AssetBuilderSDK } } - void RegisterBuilderResponse::Reflect(AZ::ReflectContext* context) - { - if (AZ::SerializeContext* serializeContext = azrtti_cast(context)) - { - serializeContext->Class() - ->Version(1) - ->Field("Asset Builder Desc List", &RegisterBuilderResponse::m_assetBuilderDescList); - } - - if (AZ::BehaviorContext* behaviorContext = azrtti_cast(context)) - { - behaviorContext->Class("RegisterBuilderResponse") - ->Attribute(AZ::Script::Attributes::Scope, AZ::Script::Attributes::ScopeFlags::Automation) - ->Attribute(AZ::Script::Attributes::Module, "asset.builder") - ->Constructor() - ->Property("assetBuilderDescList", BehaviorValueProperty(&RegisterBuilderResponse::m_assetBuilderDescList)); - } - } - bool CreateJobsResponse::Succeeded() const { return m_result == CreateJobsResultCode::Success; @@ -1373,128 +1316,6 @@ namespace AssetBuilderSDK } } - void BuilderHelloRequest::Reflect(AZ::ReflectContext* context) - { - auto serialize = azrtti_cast(context); - if (serialize) - { - serialize->Class() - ->Version(1) - ->Field("UUID", &BuilderHelloRequest::m_uuid); - } - } - - unsigned int BuilderHelloRequest::MessageType() - { - static unsigned int messageType = AZ_CRC("AssetBuilderSDK::BuilderHelloRequest", 0x213a7248); - - return messageType; - } - - unsigned int BuilderHelloRequest::GetMessageType() const - { - return MessageType(); - } - - void BuilderHelloResponse::Reflect(AZ::ReflectContext* context) - { - auto serialize = azrtti_cast(context); - if (serialize) - { - serialize->Class() - ->Version(1) - ->Field("Accepted", &BuilderHelloResponse::m_accepted) - ->Field("UUID", &BuilderHelloResponse::m_uuid); - } - } - - unsigned int BuilderHelloResponse::GetMessageType() const - { - return BuilderHelloRequest::MessageType(); - } - - ////////////////////////////////////////////////////////////////////////// - - void CreateJobsNetRequest::Reflect(AZ::ReflectContext* context) - { - auto serialize = azrtti_cast(context); - if (serialize) - { - serialize->Class() - ->Version(1) - ->Field("Request", &CreateJobsNetRequest::m_request); - } - } - - unsigned int CreateJobsNetRequest::MessageType() - { - static unsigned int messageType = AZ_CRC("AssetBuilderSDK::CreateJobsNetRequest", 0xc48209c0); - - return messageType; - } - - unsigned int CreateJobsNetRequest::GetMessageType() const - { - return MessageType(); - } - - void CreateJobsNetResponse::Reflect(AZ::ReflectContext* context) - { - auto serialize = azrtti_cast(context); - if (serialize) - { - serialize->Class() - ->Version(1) - ->Field("Response", &CreateJobsNetResponse::m_response); - } - } - - unsigned int CreateJobsNetResponse::GetMessageType() const - { - return CreateJobsNetRequest::MessageType(); - } - - - - void ProcessJobNetRequest::Reflect(AZ::ReflectContext* context) - { - auto serialize = azrtti_cast(context); - if (serialize) - { - serialize->Class() - ->Version(1) - ->Field("Request", &ProcessJobNetRequest::m_request); - } - } - - unsigned int ProcessJobNetRequest::MessageType() - { - static unsigned int messageType = AZ_CRC("AssetBuilderSDK::ProcessJobNetRequest", 0x479f340f); - - return messageType; - } - - unsigned int ProcessJobNetRequest::GetMessageType() const - { - return MessageType(); - } - - void ProcessJobNetResponse::Reflect(AZ::ReflectContext* context) - { - auto serialize = azrtti_cast(context); - if (serialize) - { - serialize->Class() - ->Version(1) - ->Field("Response", &ProcessJobNetResponse::m_response); - } - } - - unsigned int ProcessJobNetResponse::GetMessageType() const - { - return ProcessJobNetRequest::MessageType(); - } - JobDependency::JobDependency(const AZStd::string& jobKey, const AZStd::string& platformIdentifier, const JobDependencyType& type, const SourceFileDependency& sourceFile) : m_jobKey(jobKey) , m_platformIdentifier(platformIdentifier) @@ -1612,4 +1433,70 @@ namespace AssetBuilderSDK { return m_errorsOccurred; } + + AZ::u64 GetHashFromIOStream(AZ::IO::GenericStream& readStream, AZ::IO::SizeType* bytesReadOut, int hashMsDelay) + { + constexpr AZ::u64 HashBufferSize = 1024 * 64; + char buffer[HashBufferSize]; + + if(readStream.IsOpen() && readStream.CanRead()) + { + AZ::IO::SizeType bytesRead; + + auto* state = XXH64_createState(); + + if(state == nullptr) + { + AZ_Assert(false, "Failed to create hash state"); + return 0; + } + + if (XXH64_reset(state, 0) == XXH_ERROR) + { + AZ_Assert(false, "Failed to reset hash state"); + return 0; + } + + do + { + // In edge cases where another process is writing to this file while this hashing is occuring and that file wasn't locked, + // the following read check can fail because it performs an end of file check, and asserts and shuts down if the read size + // was smaller than the buffer and the read is not at the end of the file. The logic used to check end of file internal to read + // will be out of date in the edge cases where another process is actively writing to this file while this hash is running. + // The stream's length ends up more accurate in this case, preventing this assert and shut down. + // One area this occurs is the navigation mesh file (mnmnavmission0.bai) that's temporarily created when exporting a level, + // the navigation system can still be writing to this file when hashing begins, causing the EoF marker to change. + AZ::IO::SizeType remainingToRead = AZStd::min(readStream.GetLength() - readStream.GetCurPos(), aznumeric_cast(AZ_ARRAY_SIZE(buffer))); + bytesRead = readStream.Read(remainingToRead, buffer); + + if(bytesReadOut) + { + *bytesReadOut += bytesRead; + } + + XXH64_update(state, buffer, bytesRead); + + // Used by unit tests to force the race condition mentioned above, to verify the crash fix. + if(hashMsDelay > 0) + { + AZStd::this_thread::sleep_for(AZStd::chrono::milliseconds(hashMsDelay)); + } + + } while (bytesRead > 0); + + auto hash = XXH64_digest(state); + + XXH64_freeState(state); + + return hash; + } + return 0; + } + + AZ::u64 GetFileHash(const char* filePath, AZ::IO::SizeType* bytesReadOut, int hashMsDelay) + { + constexpr bool ErrorOnReadFailure = true; + AZ::IO::FileIOStream readStream(filePath, AZ::IO::OpenMode::ModeRead | AZ::IO::OpenMode::ModeBinary, ErrorOnReadFailure); + return GetHashFromIOStream(readStream, bytesReadOut, hashMsDelay); + } } diff --git a/Code/Tools/AssetProcessor/AssetBuilderSDK/AssetBuilderSDK/AssetBuilderSDK.h b/Code/Tools/AssetProcessor/AssetBuilderSDK/AssetBuilderSDK/AssetBuilderSDK.h index 5a57fa1e72..65bf9cc7d4 100644 --- a/Code/Tools/AssetProcessor/AssetBuilderSDK/AssetBuilderSDK/AssetBuilderSDK.h +++ b/Code/Tools/AssetProcessor/AssetBuilderSDK/AssetBuilderSDK/AssetBuilderSDK.h @@ -464,35 +464,6 @@ namespace AssetBuilderSDK AZStd::string m_platformIdentifier; }; - //! RegisterBuilderRequest contains input data that will be sent by the AssetProcessor to the builder during the startup registration phase - struct RegisterBuilderRequest - { - AZ_CLASS_ALLOCATOR(RegisterBuilderRequest, AZ::SystemAllocator, 0); - AZ_TYPE_INFO(RegisterBuilderRequest, "{7C6C5198-4766-42B8-9A1E-48479CE2F5EA}"); - - AZStd::string m_filePath; - - RegisterBuilderRequest() {} - - explicit RegisterBuilderRequest(const AZStd::string& filePath) - : m_filePath(filePath) - { - } - - static void Reflect(AZ::ReflectContext* context); - }; - - //! INTERNAL USE ONLY - RegisterBuilderResponse contains registration data that will be sent by the builder to the AssetProcessor in response to RegisterBuilderRequest - struct RegisterBuilderResponse - { - AZ_CLASS_ALLOCATOR(RegisterBuilderResponse, AZ::SystemAllocator, 0); - AZ_TYPE_INFO(RegisterBuilderResponse, "{0AE5583F-C763-410E-BA7F-78BD90546C01}"); - - AZStd::vector m_assetBuilderDescList; - - static void Reflect(AZ::ReflectContext* context); - }; - /** * This tells you about a platform in your CreateJobsRequest or your ProcessJobRequest */ @@ -756,99 +727,9 @@ namespace AssetBuilderSDK static void Reflect(AZ::ReflectContext* context); }; - //! BuilderHelloRequest is sent by an AssetBuilder that is attempting to connect to the AssetProcessor to register itself as a worker - class BuilderHelloRequest : public AzFramework::AssetSystem::BaseAssetProcessorMessage - { - public: + - AZ_CLASS_ALLOCATOR(BuilderHelloRequest, AZ::OSAllocator, 0); - AZ_RTTI(BuilderHelloRequest, "{5fab5962-a1d8-42a5-bf7a-fb1a8c5a9588}", BaseAssetProcessorMessage); - - static void Reflect(AZ::ReflectContext* context); - static unsigned int MessageType(); - - unsigned int GetMessageType() const override; - - //! Unique ID assigned to this builder to identify it - AZ::Uuid m_uuid = AZ::Uuid::CreateNull(); - }; - - //! BuilderHelloResponse contains the AssetProcessor's response to a builder connection attempt, indicating if it is accepted and the ID that it was assigned - class BuilderHelloResponse : public AzFramework::AssetSystem::BaseAssetProcessorMessage - { - public: - - AZ_CLASS_ALLOCATOR(BuilderHelloResponse, AZ::OSAllocator, 0); - AZ_RTTI(BuilderHelloResponse, "{5f3d7c11-6639-4c6f-980a-32be546903c2}", BaseAssetProcessorMessage); - - static void Reflect(AZ::ReflectContext* context); - - unsigned int GetMessageType() const override; - - //! Indicates if the builder was accepted by the AP - bool m_accepted = false; - - //! Unique ID assigned to the builder. If the builder isn't a local process, this is the ID assigned by the AP - AZ::Uuid m_uuid = AZ::Uuid::CreateNull(); - }; - - class CreateJobsNetRequest : public AzFramework::AssetSystem::BaseAssetProcessorMessage - { - public: - - AZ_CLASS_ALLOCATOR(CreateJobsNetRequest, AZ::OSAllocator, 0); - AZ_RTTI(CreateJobsNetRequest, "{97fa717d-3a09-4d21-95c6-b2eafd773f1c}", BaseAssetProcessorMessage); - - static void Reflect(AZ::ReflectContext* context); - static unsigned int MessageType(); - - unsigned int GetMessageType() const override; - - CreateJobsRequest m_request; - }; - - class CreateJobsNetResponse : public AzFramework::AssetSystem::BaseAssetProcessorMessage - { - public: - - AZ_CLASS_ALLOCATOR(CreateJobsNetResponse, AZ::OSAllocator, 0); - AZ_RTTI(CreateJobsNetResponse, "{b2c7c2d3-b60e-4b27-b699-43e0ba991c33}", BaseAssetProcessorMessage); - - static void Reflect(AZ::ReflectContext* context); - - unsigned int GetMessageType() const override; - - CreateJobsResponse m_response; - }; - - class ProcessJobNetRequest : public AzFramework::AssetSystem::BaseAssetProcessorMessage - { - public: - - AZ_CLASS_ALLOCATOR(ProcessJobNetRequest, AZ::OSAllocator, 0); - AZ_RTTI(ProcessJobNetRequest, "{05288de1-020b-48db-b9de-715f17284efa}", BaseAssetProcessorMessage); - - static void Reflect(AZ::ReflectContext* context); - static unsigned int MessageType(); - - unsigned int GetMessageType() const override; - - ProcessJobRequest m_request; - }; - - class ProcessJobNetResponse : public AzFramework::AssetSystem::BaseAssetProcessorMessage - { - public: - - AZ_CLASS_ALLOCATOR(ProcessJobNetResponse, AZ::OSAllocator, 0); - AZ_RTTI(ProcessJobNetResponse, "{26ddf882-246c-4cfb-912f-9b8e389df4f6}", BaseAssetProcessorMessage); - - static void Reflect(AZ::ReflectContext* context); - - unsigned int GetMessageType() const override; - - ProcessJobResponse m_response; - }; + //! JobCancelListener can be used by builders in their processJob method to listen for job cancellation request. //! The address of this listener is the jobid which can be found in the process job request. @@ -911,6 +792,19 @@ namespace AssetBuilderSDK //! There can be multiple builders running at once, so we need to filter out ones coming from other builders AZStd::thread_id m_jobThreadId; }; + + //! Get hash for a whole file + //! @filePath the path for the file + //! @bytesReadOut output the read file size in bytes + //! @hashMsDelay [Do not use except for unit test] add a delay in ms for between each block reading. + AZ::u64 GetFileHash(const char* filePath, AZ::IO::SizeType* bytesReadOut = nullptr, int hashMsDelay = 0); + + //! Get hash for a generic IO stream + //! @readStream the input readable stream + //! @bytesReadOut output the read size in bytes + //! @hashMsDelay [Do not use except for unit test] add a delay in ms for between each block reading. + AZ::u64 GetHashFromIOStream(AZ::IO::GenericStream& readStream, AZ::IO::SizeType* bytesReadOut = nullptr, int hashMsDelay = 0); + } // namespace AssetBuilderSDK namespace AZ @@ -922,44 +816,3 @@ namespace AZ AZ_TYPE_INFO_SPECIALIZE(AssetBuilderSDK::ProductPathDependencyType, "{EF77742B-9627-4072-B431-396AA7183C80}"); AZ_TYPE_INFO_SPECIALIZE(AssetBuilderSDK::SourceFileDependency::SourceFileDependencyType, "{BE9C8805-DB17-4500-944A-EB33FD0BE347}"); } - -//! This macro should be used by every AssetBuilder to register itself, -//! AssetProcessor uses these exported function to identify whether a dll is an Asset Builder or not -//! If you want something highly custom you can do these entry points yourself instead of using the macro. -#define REGISTER_ASSETBUILDER \ - extern void BuilderOnInit(); \ - extern void BuilderDestroy(); \ - extern void BuilderRegisterDescriptors(); \ - extern void BuilderAddComponents(AZ::Entity * entity); \ - extern "C" \ - { \ - AZ_DLL_EXPORT int IsAssetBuilder() \ - { \ - return 0; \ - } \ - \ - AZ_DLL_EXPORT void InitializeModule(AZ::EnvironmentInstance sharedEnvironment) \ - { \ - AZ::Environment::Attach(sharedEnvironment); \ - BuilderOnInit(); \ - } \ - \ - AZ_DLL_EXPORT void UninitializeModule() \ - { \ - BuilderDestroy(); \ - AZ::Environment::Detach(); \ - } \ - \ - AZ_DLL_EXPORT void ModuleRegisterDescriptors() \ - { \ - BuilderRegisterDescriptors(); \ - } \ - \ - AZ_DLL_EXPORT void ModuleAddComponents(AZ::Entity * entity) \ - { \ - BuilderAddComponents(entity); \ - } \ - } -// confusion-reducing note: above end-brace is part of the macro, not a namespace - - diff --git a/Code/Tools/AssetProcessor/AssetBuilderSDK/CMakeLists.txt b/Code/Tools/AssetProcessor/AssetBuilderSDK/CMakeLists.txt index 635cd55f6c..bfbcc35663 100644 --- a/Code/Tools/AssetProcessor/AssetBuilderSDK/CMakeLists.txt +++ b/Code/Tools/AssetProcessor/AssetBuilderSDK/CMakeLists.txt @@ -32,6 +32,7 @@ ly_add_target( PUBLIC AZ::AzFramework AZ::AzToolsFramework + 3rdParty::xxhash ) ly_add_source_properties( SOURCES AssetBuilderSDK/AssetBuilderSDK.cpp diff --git a/Code/Tools/AssetProcessor/CMakeLists.txt b/Code/Tools/AssetProcessor/CMakeLists.txt index 431a167163..a47ced43be 100644 --- a/Code/Tools/AssetProcessor/CMakeLists.txt +++ b/Code/Tools/AssetProcessor/CMakeLists.txt @@ -42,6 +42,7 @@ ly_add_target( AZ::AzQtComponents AZ::AzToolsFramework AZ::AssetBuilderSDK + AZ::AssetBuilder.Static ${additional_dependencies} RUNTIME_DEPENDENCIES AZ::AssetBuilder @@ -52,7 +53,7 @@ get_property(asset_builders GLOBAL PROPERTY LY_ASSET_BUILDERS) string (REPLACE ";" "," asset_builders "${asset_builders}") ly_add_source_properties( SOURCES native/utilities/ApplicationManager.cpp - PROPERTY COMPILE_DEFINITIONS + PROPERTY COMPILE_DEFINITIONS VALUES LY_ASSET_BUILDERS="${asset_builders}" ) @@ -147,9 +148,9 @@ endif() # Tests ################################################################################ if(PAL_TRAIT_BUILD_TESTS_SUPPORTED) - + ly_add_target( - NAME AssetProcessor.Tests EXECUTABLE + NAME AssetProcessor.Tests ${PAL_TRAIT_TEST_TARGET_TYPE} NAMESPACE AZ AUTOMOC AUTORCC @@ -167,12 +168,12 @@ if(PAL_TRAIT_BUILD_TESTS_SUPPORTED) ) ly_add_source_properties( SOURCES native/tests/assetBuilderSDK/assetBuilderSDKTest.cpp - PROPERTY COMPILE_DEFINITIONS + PROPERTY COMPILE_DEFINITIONS VALUES ${LY_PAL_TOOLS_DEFINES} ) ly_add_source_properties( SOURCES native/unittests/AssetProcessorManagerUnitTests.cpp - PROPERTY COMPILE_DEFINITIONS + PROPERTY COMPILE_DEFINITIONS VALUES LY_CMAKE_BINARY_DIR="${CMAKE_BINARY_DIR}" ) @@ -266,7 +267,10 @@ if(PAL_TRAIT_BUILD_TESTS_SUPPORTED) ly_add_googletest( NAME AZ::AssetProcessor.Tests - TEST_COMMAND $ --unittest --gtest_filter=-*.SUITE_sandbox* + ) + ly_add_googlebenchmark( + NAME AZ::AssetProcessor.Benchmarks + TARGET AZ::AssetProcessor.Tests ) endif() diff --git a/Code/Tools/AssetProcessor/Platform/Linux/assetprocessor_linux_files.cmake b/Code/Tools/AssetProcessor/Platform/Linux/assetprocessor_linux_files.cmake index 25f5c41445..b21393bcaa 100644 --- a/Code/Tools/AssetProcessor/Platform/Linux/assetprocessor_linux_files.cmake +++ b/Code/Tools/AssetProcessor/Platform/Linux/assetprocessor_linux_files.cmake @@ -8,4 +8,6 @@ set(FILES native/FileWatcher/FileWatcher_linux.cpp + native/FileWatcher/FileWatcher_linux.h + native/FileWatcher/FileWatcher_platform.h ) diff --git a/Code/Tools/AssetProcessor/Platform/Linux/native/FileWatcher/FileWatcher_linux.cpp b/Code/Tools/AssetProcessor/Platform/Linux/native/FileWatcher/FileWatcher_linux.cpp index 2d3e671999..4ca41c0cb9 100644 --- a/Code/Tools/AssetProcessor/Platform/Linux/native/FileWatcher/FileWatcher_linux.cpp +++ b/Code/Tools/AssetProcessor/Platform/Linux/native/FileWatcher/FileWatcher_linux.cpp @@ -5,7 +5,10 @@ * SPDX-License-Identifier: Apache-2.0 OR MIT * */ + +#include #include +#include #include #include @@ -15,154 +18,127 @@ #include -static constexpr int s_handleToFolderMapLockTimeout = 1000; // 1 sec timeout for obtaining the handle to folder map lock -static constexpr size_t s_iNotifyMaxEntries = 1024 * 16; // Control the maximum number of entries (from inotify) that can be read at one time -static constexpr size_t s_iNotifyEventSize = sizeof(struct inotify_event); -static constexpr size_t s_iNotifyReadBufferSize = s_iNotifyMaxEntries * s_iNotifyEventSize; +static constexpr size_t s_inotifyMaxEntries = 1024 * 16; // Control the maximum number of entries (from inotify) that can be read at one time +static constexpr size_t s_inotifyEventSize = sizeof(struct inotify_event); +static constexpr size_t s_inotifyReadBufferSize = s_inotifyMaxEntries * s_inotifyEventSize; -struct FolderRootWatch::PlatformImplementation +bool FileWatcher::PlatformImplementation::Initialize() { - PlatformImplementation() = default; - - int m_iNotifyHandle = -1; - QMutex m_handleToFolderMapLock; - QHash m_handleToFolderMap; - - bool Initialize() + if (m_inotifyHandle < 0) { - if (m_iNotifyHandle < 0) - { - m_iNotifyHandle = inotify_init(); - } - return (m_iNotifyHandle >= 0); + // The CLOEXEC flag prevents the inotify watchers from copying on fork/exec + m_inotifyHandle = inotify_init1(IN_CLOEXEC); + + [[maybe_unused]] const auto err = errno; + [[maybe_unused]] AZStd::fixed_string<255> errorString; + AZ_Warning("FileWatcher", (m_inotifyHandle >= 0), "Unable to initialize inotify, file monitoring will not be available: %s\n", strerror_r(err, errorString.data(), errorString.capacity())); } - - void Finalize() - { - if (m_iNotifyHandle >= 0) - { - if (!m_handleToFolderMapLock.tryLock(s_handleToFolderMapLockTimeout)) - { - AZ_Error("FileWatcher", false, "Unable to obtain inotify handle lock on thread"); - return; - } - - QHashIterator iter(m_handleToFolderMap); - while (iter.hasNext()) - { - iter.next(); - int watchHandle = iter.key(); - inotify_rm_watch(m_iNotifyHandle, watchHandle); - } - m_handleToFolderMap.clear(); - m_handleToFolderMapLock.unlock(); - - ::close(m_iNotifyHandle); - m_iNotifyHandle = -1; - } - } - - void AddWatchFolder(QString folder) - { - if (m_iNotifyHandle >= 0) - { - // Clean up the path before accepting it as a watch folder - QString cleanPath = QDir::cleanPath(folder); - - // Add the folder to watch and track it - int watchHandle = inotify_add_watch(m_iNotifyHandle, - cleanPath.toUtf8().constData(), - IN_CREATE | IN_CLOSE_WRITE | IN_DELETE | IN_DELETE_SELF | IN_MODIFY | IN_MOVE); - - if (!m_handleToFolderMapLock.tryLock(s_handleToFolderMapLockTimeout)) - { - AZ_Error("FileWatcher", false, "Unable to obtain inotify handle lock on thread"); - return; - } - m_handleToFolderMap[watchHandle] = cleanPath; - m_handleToFolderMapLock.unlock(); - - // Add all the subfolders to watch and track them - QDirIterator dirIter(folder, QDirIterator::Subdirectories | QDirIterator::FollowSymlinks); - - while (dirIter.hasNext()) - { - QString dirName = dirIter.next(); - if (dirName.endsWith("/.") || dirName.endsWith("/..")) - { - continue; - } - - int watchHandle = inotify_add_watch(m_iNotifyHandle, - dirName.toUtf8().constData(), - IN_CREATE | IN_CLOSE_WRITE | IN_DELETE | IN_DELETE_SELF | IN_MODIFY | IN_MOVE); - - if (!m_handleToFolderMapLock.tryLock(s_handleToFolderMapLockTimeout)) - { - AZ_Error("FileWatcher", false, "Unable to obtain inotify handle lock on thread"); - return; - } - m_handleToFolderMap[watchHandle] = dirName; - m_handleToFolderMapLock.unlock(); - } - } - } - - void RemoveWatchFolder(int watchHandle) - { - if (m_iNotifyHandle >= 0) - { - if (!m_handleToFolderMapLock.tryLock(s_handleToFolderMapLockTimeout)) - { - AZ_Error("FileWatcher", false, "Unable to obtain inotify handle lock on thread"); - return; - } - - QHash::iterator handleToRemove = m_handleToFolderMap.find(watchHandle); - if (handleToRemove != m_handleToFolderMap.end()) - { - inotify_rm_watch(m_iNotifyHandle, watchHandle); - m_handleToFolderMap.erase(handleToRemove); - } - - m_handleToFolderMapLock.unlock(); - } - } -}; - -////////////////////////////////////////////////////////////////////////////// -/// FolderWatchRoot -FolderRootWatch::FolderRootWatch(const QString rootFolder) - : m_root(rootFolder) - , m_shutdownThreadSignal(false) - , m_fileWatcher(nullptr) - , m_platformImpl(new PlatformImplementation()) -{ + return (m_inotifyHandle >= 0); } -FolderRootWatch::~FolderRootWatch() +void FileWatcher::PlatformImplementation::Finalize() { - // Destructor is required in here since this file contains the definition of struct PlatformImplementation - Stop(); + if (m_inotifyHandle < 0) + { + return; + } - delete m_platformImpl; + { + QMutexLocker lock{&m_handleToFolderMapLock}; + for (const auto& watchHandle : m_handleToFolderMap.keys()) + { + inotify_rm_watch(m_inotifyHandle, watchHandle); + } + m_handleToFolderMap.clear(); + } + + ::close(m_inotifyHandle); + m_inotifyHandle = -1; } -bool FolderRootWatch::Start() +void FileWatcher::PlatformImplementation::AddWatchFolder(QString folder, bool recursive) +{ + if (m_inotifyHandle < 0) + { + return; + } + + // Clean up the path before accepting it as a watch folder + QString cleanPath = QDir::cleanPath(folder); + + // Add the folder to watch and track it + int watchHandle = inotify_add_watch(m_inotifyHandle, + cleanPath.toUtf8().constData(), + IN_CREATE | IN_CLOSE_WRITE | IN_DELETE | IN_DELETE_SELF | IN_MODIFY | IN_MOVE); + + if (watchHandle < 0) + { + [[maybe_unused]] const auto err = errno; + [[maybe_unused]] AZStd::fixed_string<255> errorString; + AZ_Warning("FileWatcher", false, "inotify_add_watch failed for path %s: %s", cleanPath.toUtf8().constData(), strerror_r(err, errorString.data(), errorString.capacity())); + return; + } + { + QMutexLocker lock{&m_handleToFolderMapLock}; + m_handleToFolderMap[watchHandle] = cleanPath; + } + + // Add all the contents (files and directories) to watch and track them + QDirIterator dirIter(folder, QDir::NoDotAndDotDot | QDir::Dirs | QDir::Files, (recursive ? QDirIterator::Subdirectories : QDirIterator::NoIteratorFlags) | QDirIterator::FollowSymlinks); + + while (dirIter.hasNext()) + { + QString dirName = dirIter.next(); + + watchHandle = inotify_add_watch(m_inotifyHandle, + dirName.toUtf8().constData(), + IN_CREATE | IN_CLOSE_WRITE | IN_DELETE | IN_DELETE_SELF | IN_MODIFY | IN_MOVE); + if (watchHandle < 0) + { + [[maybe_unused]] const auto err = errno; + [[maybe_unused]] AZStd::fixed_string<255> errorString; + AZ_Warning("FileWatcher", false, "inotify_add_watch failed for path %s: %s", dirName.toUtf8().constData(), strerror_r(err, errorString.data(), errorString.capacity())); + return; + } + + QMutexLocker lock{&m_handleToFolderMapLock}; + m_handleToFolderMap[watchHandle] = dirName; + } +} + +void FileWatcher::PlatformImplementation::RemoveWatchFolder(int watchHandle) +{ + if (m_inotifyHandle < 0) + { + return; + } + + QMutexLocker lock{&m_handleToFolderMapLock}; + if (m_handleToFolderMap.remove(watchHandle)) + { + inotify_rm_watch(m_inotifyHandle, watchHandle); + } +} + +bool FileWatcher::PlatformStart() { // inotify will be used by linux to monitor file changes within directories under the root folder if (!m_platformImpl->Initialize()) { return false; } - m_platformImpl->AddWatchFolder(m_root); + for (const auto& [directory, recursive] : m_folderWatchRoots) + { + if (QDir(directory).exists()) + { + m_platformImpl->AddWatchFolder(directory, recursive); + } + } - m_shutdownThreadSignal = false; - m_thread = std::thread([this]() { WatchFolderLoop(); }); return true; } -void FolderRootWatch::Stop() +void FileWatcher::PlatformStop() { m_shutdownThreadSignal = true; @@ -171,64 +147,78 @@ void FolderRootWatch::Stop() if (m_thread.joinable()) { m_thread.join(); // wait for the thread to finish - m_thread = std::thread(); //destroy } } -void FolderRootWatch::WatchFolderLoop() +void FileWatcher::WatchFolderLoop() { - char eventBuffer[s_iNotifyReadBufferSize]; + char eventBuffer[s_inotifyReadBufferSize]; while (!m_shutdownThreadSignal) { - ssize_t bytesRead = ::read(m_platformImpl->m_iNotifyHandle, eventBuffer, s_iNotifyReadBufferSize); + ssize_t bytesRead = ::read(m_platformImpl->m_inotifyHandle, eventBuffer, s_inotifyReadBufferSize); if (bytesRead < 0) { // Break out of the loop when the notify handle was closed (outside of this thread) break; } - else if (bytesRead > 0) + if (!bytesRead) { - for (size_t index=0; index(&eventBuffer[index]); + + if (event->mask & (IN_CREATE | IN_DELETE | IN_MODIFY | IN_MOVE)) { - struct inotify_event *event = ( struct inotify_event * ) &eventBuffer[ index ]; + const QString pathStr = QDir(m_platformImpl->m_handleToFolderMap[event->wd]).absoluteFilePath(event->name); - if (event->mask & (IN_CREATE | IN_DELETE | IN_MODIFY | IN_MOVE )) + if (event->mask & (IN_CREATE | IN_MOVED_TO)) { - QString pathStr = QString("%1%2%3").arg(m_platformImpl->m_handleToFolderMap[event->wd], QDir::separator(), event->name); + if (event->mask & IN_ISDIR) + { + // New Directory, see if it should be added to the watched directories + // It is only added if it is a child of a recursively watched directory + const auto found = AZStd::find_if(begin(m_folderWatchRoots), end(m_folderWatchRoots), [this, event](const WatchRoot& watchRoot) + { + return watchRoot.m_directory == m_platformImpl->m_handleToFolderMap[event->wd]; + }); - if (event->mask & (IN_CREATE | IN_MOVED_TO)) - { - if ( event->mask & IN_ISDIR ) + // If the path is not in m_folderWatchRoots, it must + // be a new subdirectory of a subdirectory of some + // other root that is being watched recursively. + // Maintain the recursive nature of that root. + const bool shouldAddFolder = (found == end(m_folderWatchRoots)) ? true : found->m_recursive; + + if (shouldAddFolder) { - // New Directory, add it to the watch - m_platformImpl->AddWatchFolder(pathStr); - } - else - { - ProcessNewFileEvent(pathStr); + m_platformImpl->AddWatchFolder(pathStr, true); } } - else if (event->mask & (IN_DELETE | IN_MOVED_FROM)) + else { - if (event->mask & IN_ISDIR) - { - // Directory Deleted, remove it from the watch - m_platformImpl->RemoveWatchFolder(event->wd); - } - else - { - ProcessDeleteFileEvent(pathStr); - } - } - else if ((event->mask & IN_MODIFY) && ((event->mask & IN_ISDIR) != IN_ISDIR)) - { - ProcessModifyFileEvent(pathStr); + rawFileAdded(pathStr, {}); } } - index += s_iNotifyEventSize + event->len; + else if (event->mask & (IN_DELETE | IN_MOVED_FROM)) + { + if (event->mask & IN_ISDIR) + { + // Directory Deleted, remove it from the watch + m_platformImpl->RemoveWatchFolder(event->wd); + } + else + { + rawFileRemoved(pathStr, {}); + } + } + else if ((event->mask & IN_MODIFY) && ((event->mask & IN_ISDIR) != IN_ISDIR)) + { + rawFileModified(pathStr, {}); + } } + index += s_inotifyEventSize + event->len; } } } - diff --git a/Code/Tools/AssetProcessor/Platform/Linux/native/FileWatcher/FileWatcher_linux.h b/Code/Tools/AssetProcessor/Platform/Linux/native/FileWatcher/FileWatcher_linux.h new file mode 100644 index 0000000000..a6fead401c --- /dev/null +++ b/Code/Tools/AssetProcessor/Platform/Linux/native/FileWatcher/FileWatcher_linux.h @@ -0,0 +1,26 @@ +/* + * Copyright (c) Contributors to the Open 3D Engine Project. + * For complete copyright and license terms please see the LICENSE at the root of this distribution. + * + * SPDX-License-Identifier: Apache-2.0 OR MIT + * + */ + +#pragma once + +#include +#include +#include + +class FileWatcher::PlatformImplementation +{ +public: + bool Initialize(); + void Finalize(); + void AddWatchFolder(QString folder, bool recursive); + void RemoveWatchFolder(int watchHandle); + + int m_inotifyHandle = -1; + QMutex m_handleToFolderMapLock; + QHash m_handleToFolderMap; +}; diff --git a/Code/Tools/AssetProcessor/Platform/Linux/native/FileWatcher/FileWatcher_platform.h b/Code/Tools/AssetProcessor/Platform/Linux/native/FileWatcher/FileWatcher_platform.h new file mode 100644 index 0000000000..e3cb91d73a --- /dev/null +++ b/Code/Tools/AssetProcessor/Platform/Linux/native/FileWatcher/FileWatcher_platform.h @@ -0,0 +1,11 @@ +/* + * Copyright (c) Contributors to the Open 3D Engine Project. + * For complete copyright and license terms please see the LICENSE at the root of this distribution. + * + * SPDX-License-Identifier: Apache-2.0 OR MIT + * + */ + +#pragma once + +#include diff --git a/Code/Tools/AssetProcessor/Platform/Mac/assetprocessor_mac_files.cmake b/Code/Tools/AssetProcessor/Platform/Mac/assetprocessor_mac_files.cmake index 0f20ef2f38..476bcde500 100644 --- a/Code/Tools/AssetProcessor/Platform/Mac/assetprocessor_mac_files.cmake +++ b/Code/Tools/AssetProcessor/Platform/Mac/assetprocessor_mac_files.cmake @@ -8,4 +8,6 @@ set(FILES native/FileWatcher/FileWatcher_macos.cpp + native/FileWatcher/FileWatcher_mac.h + native/FileWatcher/FileWatcher_platform.h ) diff --git a/Code/Tools/AssetProcessor/Platform/Mac/native/FileWatcher/FileWatcher_mac.h b/Code/Tools/AssetProcessor/Platform/Mac/native/FileWatcher/FileWatcher_mac.h new file mode 100644 index 0000000000..ade2497c4d --- /dev/null +++ b/Code/Tools/AssetProcessor/Platform/Mac/native/FileWatcher/FileWatcher_mac.h @@ -0,0 +1,20 @@ +/* + * Copyright (c) Contributors to the Open 3D Engine Project. + * For complete copyright and license terms please see the LICENSE at the root of this distribution. + * + * SPDX-License-Identifier: Apache-2.0 OR MIT + * + */ + +#pragma once + +#include + +#include + +class FileWatcher::PlatformImplementation +{ +public: + FSEventStreamRef m_stream = nullptr; + CFRunLoopRef m_runLoop = nullptr; +}; diff --git a/Code/Tools/AssetProcessor/Platform/Mac/native/FileWatcher/FileWatcher_macos.cpp b/Code/Tools/AssetProcessor/Platform/Mac/native/FileWatcher/FileWatcher_macos.cpp index 1dd6e65a15..47b344ff81 100644 --- a/Code/Tools/AssetProcessor/Platform/Mac/native/FileWatcher/FileWatcher_macos.cpp +++ b/Code/Tools/AssetProcessor/Platform/Mac/native/FileWatcher/FileWatcher_macos.cpp @@ -6,47 +6,23 @@ * */ #include +#include #include #include -#include void FileEventStreamCallback(ConstFSEventStreamRef streamRef, void *clientCallBackInfo, size_t numEvents, void *eventPaths, const FSEventStreamEventFlags eventFlags[], const FSEventStreamEventId eventIds[]); -struct FolderRootWatch::PlatformImplementation -{ - PlatformImplementation() : m_stream(nullptr), m_runLoop(nullptr) { } - - FSEventStreamRef m_stream; - CFRunLoopRef m_runLoop; - QString m_renameFileDirectory; -}; - -////////////////////////////////////////////////////////////////////////////// -/// FolderWatchRoot -FolderRootWatch::FolderRootWatch(const QString rootFolder) - : m_root(rootFolder) - , m_shutdownThreadSignal(false) - , m_fileWatcher(nullptr) - , m_platformImpl(new PlatformImplementation()) -{ -} - -FolderRootWatch::~FolderRootWatch() -{ - // Destructor is required in here since this file contains the definition of struct PlatformImplementation - Stop(); - - delete m_platformImpl; -} - -bool FolderRootWatch::Start() +bool FileWatcher::PlatformStart() { m_shutdownThreadSignal = false; - CFStringRef rootPath = CFStringCreateWithCString(kCFAllocatorDefault, m_root.toStdString().data(), kCFStringEncodingMacRoman); - CFArrayRef pathsToWatch = CFArrayCreate(NULL, (const void **)&rootPath, 1, NULL); + CFMutableArrayRef pathsToWatch = CFArrayCreateMutable(nullptr, this->m_folderWatchRoots.size(), nullptr); + for (const auto& root : this->m_folderWatchRoots) + { + CFArrayAppendValue(pathsToWatch, root.m_directory.toCFString()); + } // The larger this number, the larger the delay between the kernel knowing a file changed // and us actually consuming the event. It is very important for asset processor to deal with @@ -60,11 +36,12 @@ bool FolderRootWatch::Start() // Set ourselves as the value for the context info field so that in the callback // we get passed into it and the callback can call our public API to handle // the file change events - FSEventStreamContext streamContext; - ::memset(&streamContext, 0, sizeof(streamContext)); - streamContext.info = this; + FSEventStreamContext streamContext{ + /*.version =*/ 0, + /*.info =*/ this, + }; - m_platformImpl->m_stream = FSEventStreamCreate(NULL, + m_platformImpl->m_stream = FSEventStreamCreate(nullptr, FileEventStreamCallback, &streamContext, pathsToWatch, @@ -72,24 +49,25 @@ bool FolderRootWatch::Start() timeBetweenKernelUpdateAndNotification, kFSEventStreamCreateFlagFileEvents); - AZ_Error("FileWatcher", (m_platformImpl->m_stream != nullptr), "FSEventStreamCreate returned a nullptr. No file events will be reported for %s", m_root.toStdString().c_str()); - - m_thread = std::thread(std::bind(&FolderRootWatch::WatchFolderLoop, this)); + AZ_Error("FileWatcher", (m_platformImpl->m_stream != nullptr), "FSEventStreamCreate returned a nullptr. No file events will be reported."); + const CFIndex pathCount = CFArrayGetCount(pathsToWatch); + for(CFIndex i = 0; i < pathCount; ++i) + { + CFRelease(CFArrayGetValueAtIndex(pathsToWatch, i)); + } CFRelease(pathsToWatch); - CFRelease(rootPath); - return (m_platformImpl->m_stream != nullptr); + return m_platformImpl->m_stream != nullptr; } -void FolderRootWatch::Stop() +void FileWatcher::PlatformStop() { m_shutdownThreadSignal = true; if (m_thread.joinable()) { m_thread.join(); // wait for the thread to finish - m_thread = std::thread(); //destroy } FSEventStreamStop(m_platformImpl->m_stream); @@ -97,7 +75,7 @@ void FolderRootWatch::Stop() FSEventStreamRelease(m_platformImpl->m_stream); } -void FolderRootWatch::WatchFolderLoop() +void FileWatcher::WatchFolderLoop() { // Use a half second timeout interval so that we can check if // m_shutdownThreadSignal has been changed while we were running the RunLoop @@ -117,14 +95,14 @@ void FolderRootWatch::WatchFolderLoop() void FileEventStreamCallback(ConstFSEventStreamRef streamRef, void *clientCallBackInfo, size_t numEvents, void *eventPaths, const FSEventStreamEventFlags eventFlags[], const FSEventStreamEventId eventIds[]) { - FolderRootWatch* watcher = reinterpret_cast(clientCallBackInfo); + auto* watcher = reinterpret_cast(clientCallBackInfo); const char** filePaths = reinterpret_cast(eventPaths); for (int i = 0; i < numEvents; ++i) { - QFileInfo fileInfo(QDir::cleanPath(filePaths[i])); - QString fileAndPath = fileInfo.absoluteFilePath(); + const QFileInfo fileInfo(QDir::cleanPath(filePaths[i])); + const QString fileAndPath = fileInfo.absoluteFilePath(); if (!fileInfo.isHidden()) { @@ -133,38 +111,38 @@ void FileEventStreamCallback(ConstFSEventStreamRef streamRef, void *clientCallBa // so check for all of them if (eventFlags[i] & kFSEventStreamEventFlagItemCreated) { - watcher->ProcessNewFileEvent(fileAndPath); + watcher->rawFileAdded(fileAndPath, {}); } if (eventFlags[i] & kFSEventStreamEventFlagItemModified) { - watcher->ProcessModifyFileEvent(fileAndPath); + watcher->rawFileModified(fileAndPath, {}); } if (eventFlags[i] & kFSEventStreamEventFlagItemRemoved) { - watcher->ProcessDeleteFileEvent(fileAndPath); + watcher->rawFileRemoved(fileAndPath, {}); } if (eventFlags[i] & kFSEventStreamEventFlagItemRenamed) { if (fileInfo.exists()) { - watcher->ProcessNewFileEvent(fileAndPath); + watcher->rawFileAdded(fileAndPath, {}); // macOS does not send out an event for the directory being // modified when a file has been renamed but the FileWatcher // API expects it so send out the modification event ourselves. - watcher->ProcessModifyFileEvent(fileInfo.absolutePath()); + watcher->rawFileModified(fileInfo.absolutePath(), {}); } else { - watcher->ProcessDeleteFileEvent(fileAndPath); + watcher->rawFileRemoved(fileAndPath, {}); // macOS does not send out an event for the directory being // modified when a file has been renamed but the FileWatcher // API expects it so send out the modification event ourselves. - watcher->ProcessModifyFileEvent(fileInfo.absolutePath()); + watcher->rawFileModified(fileInfo.absolutePath(), {}); } } } diff --git a/Code/Tools/AssetProcessor/Platform/Mac/native/FileWatcher/FileWatcher_platform.h b/Code/Tools/AssetProcessor/Platform/Mac/native/FileWatcher/FileWatcher_platform.h new file mode 100644 index 0000000000..58b60354e7 --- /dev/null +++ b/Code/Tools/AssetProcessor/Platform/Mac/native/FileWatcher/FileWatcher_platform.h @@ -0,0 +1,11 @@ +/* + * Copyright (c) Contributors to the Open 3D Engine Project. + * For complete copyright and license terms please see the LICENSE at the root of this distribution. + * + * SPDX-License-Identifier: Apache-2.0 OR MIT + * + */ + +#pragma once + +#include diff --git a/Code/Tools/AssetProcessor/Platform/Mac/native/FileWatcher/FileWatcher_win.cpp b/Code/Tools/AssetProcessor/Platform/Mac/native/FileWatcher/FileWatcher_win.cpp deleted file mode 100644 index a6b0841f05..0000000000 --- a/Code/Tools/AssetProcessor/Platform/Mac/native/FileWatcher/FileWatcher_win.cpp +++ /dev/null @@ -1,130 +0,0 @@ -/* - * Copyright (c) Contributors to the Open 3D Engine Project. - * For complete copyright and license terms please see the LICENSE at the root of this distribution. - * - * SPDX-License-Identifier: Apache-2.0 OR MIT - * - */ - -#include - -#include - -struct FolderRootWatch::PlatformImplementation -{ - PlatformImplementation() : m_directoryHandle(nullptr), m_ioHandle(nullptr) { } - HANDLE m_directoryHandle; - HANDLE m_ioHandle; -}; - -////////////////////////////////////////////////////////////////////////////// -/// FolderWatchRoot -FolderRootWatch::FolderRootWatch(const QString rootFolder) - : m_root(rootFolder) - , m_shutdownThreadSignal(false) - , m_fileWatcher(nullptr) - , m_platformImpl(new PlatformImplementation()) -{ -} - -FolderRootWatch::~FolderRootWatch() -{ - // Destructor is required in here since this file contains the definition of struct PlatformImplementation - Stop(); - - delete m_platformImpl; -} - -bool FolderRootWatch::Start() -{ - m_platformImpl->m_directoryHandle = ::CreateFileW(m_root.toStdWString().data(), FILE_LIST_DIRECTORY, FILE_SHARE_READ | FILE_SHARE_WRITE | FILE_SHARE_DELETE, nullptr, OPEN_EXISTING, FILE_FLAG_BACKUP_SEMANTICS | FILE_FLAG_OVERLAPPED, nullptr); - - if (m_platformImpl->m_directoryHandle != INVALID_HANDLE_VALUE) - { - m_platformImpl->m_ioHandle = ::CreateIoCompletionPort(m_platformImpl->m_directoryHandle, nullptr, 1, 0); - if (m_platformImpl->m_ioHandle != INVALID_HANDLE_VALUE) - { - m_shutdownThreadSignal = false; - m_thread = std::thread(std::bind(&FolderRootWatch::WatchFolderLoop, this)); - return true; - } - } - return false; -} - -void FolderRootWatch::Stop() -{ - m_shutdownThreadSignal = true; - CloseHandle(m_platformImpl->m_ioHandle); - m_platformImpl->m_ioHandle = nullptr; - - if (m_thread.joinable()) - { - m_thread.join(); // wait for the thread to finish - m_thread = std::thread(); //destroy - } - CloseHandle(m_platformImpl->m_directoryHandle); - m_platformImpl->m_directoryHandle = nullptr; -} - -void FolderRootWatch::WatchFolderLoop() -{ - FILE_NOTIFY_INFORMATION aFileNotifyInformationList[50000]; - QString path; - OVERLAPPED aOverlapped; - LPOVERLAPPED pOverlapped; - DWORD dwByteCount; - ULONG_PTR ulKey; - - while (!m_shutdownThreadSignal) - { - ::memset(aFileNotifyInformationList, 0, sizeof(aFileNotifyInformationList)); - ::memset(&aOverlapped, 0, sizeof(aOverlapped)); - - if (::ReadDirectoryChangesW(m_platformImpl->m_directoryHandle, aFileNotifyInformationList, sizeof(aFileNotifyInformationList), true, FILE_NOTIFY_CHANGE_LAST_WRITE | FILE_NOTIFY_CHANGE_DIR_NAME | FILE_NOTIFY_CHANGE_ATTRIBUTES | FILE_NOTIFY_CHANGE_FILE_NAME, nullptr, &aOverlapped, nullptr)) - { - //wait for up to a second for I/O to signal - dwByteCount = 0; - if (::GetQueuedCompletionStatus(m_platformImpl->m_ioHandle, &dwByteCount, &ulKey, &pOverlapped, INFINITE)) - { - //if we are signaled to shutdown bypass - if (!m_shutdownThreadSignal && ulKey) - { - if (dwByteCount) - { - int offset = 0; - FILE_NOTIFY_INFORMATION* pFileNotifyInformation = aFileNotifyInformationList; - do - { - pFileNotifyInformation = (FILE_NOTIFY_INFORMATION*)((char*)pFileNotifyInformation + offset); - - path.clear(); - path.append(m_root); - path.append(QString::fromWCharArray(pFileNotifyInformation->FileName, pFileNotifyInformation->FileNameLength / 2)); - - QString file = QDir::toNativeSeparators(QDir::cleanPath(path)); - - switch (pFileNotifyInformation->Action) - { - case FILE_ACTION_ADDED: - case FILE_ACTION_RENAMED_NEW_NAME: - ProcessNewFileEvent(file); - break; - case FILE_ACTION_REMOVED: - case FILE_ACTION_RENAMED_OLD_NAME: - ProcessDeleteFileEvent(file); - break; - case FILE_ACTION_MODIFIED: - ProcessModifyFileEvent(file); - break; - } - - offset = pFileNotifyInformation->NextEntryOffset; - } while (offset); - } - } - } - } - } -} - diff --git a/Code/Tools/AssetProcessor/Platform/Windows/assetprocessor_windows_files.cmake b/Code/Tools/AssetProcessor/Platform/Windows/assetprocessor_windows_files.cmake index 5d1f4d1eed..96dd7434c1 100644 --- a/Code/Tools/AssetProcessor/Platform/Windows/assetprocessor_windows_files.cmake +++ b/Code/Tools/AssetProcessor/Platform/Windows/assetprocessor_windows_files.cmake @@ -7,6 +7,8 @@ # set(FILES - native/FileWatcher/FileWatcher_win.cpp + native/FileWatcher/FileWatcher_platform.h + native/FileWatcher/FileWatcher_windows.cpp + native/FileWatcher/FileWatcher_windows.h native/resource.h ) diff --git a/Code/Tools/AssetProcessor/Platform/Windows/native/FileWatcher/FileWatcher_platform.h b/Code/Tools/AssetProcessor/Platform/Windows/native/FileWatcher/FileWatcher_platform.h new file mode 100644 index 0000000000..5fe5f05f87 --- /dev/null +++ b/Code/Tools/AssetProcessor/Platform/Windows/native/FileWatcher/FileWatcher_platform.h @@ -0,0 +1,11 @@ +/* + * Copyright (c) Contributors to the Open 3D Engine Project. + * For complete copyright and license terms please see the LICENSE at the root of this distribution. + * + * SPDX-License-Identifier: Apache-2.0 OR MIT + * + */ + +#pragma once + +#include diff --git a/Code/Tools/AssetProcessor/Platform/Windows/native/FileWatcher/FileWatcher_win.cpp b/Code/Tools/AssetProcessor/Platform/Windows/native/FileWatcher/FileWatcher_win.cpp deleted file mode 100644 index a6b0841f05..0000000000 --- a/Code/Tools/AssetProcessor/Platform/Windows/native/FileWatcher/FileWatcher_win.cpp +++ /dev/null @@ -1,130 +0,0 @@ -/* - * Copyright (c) Contributors to the Open 3D Engine Project. - * For complete copyright and license terms please see the LICENSE at the root of this distribution. - * - * SPDX-License-Identifier: Apache-2.0 OR MIT - * - */ - -#include - -#include - -struct FolderRootWatch::PlatformImplementation -{ - PlatformImplementation() : m_directoryHandle(nullptr), m_ioHandle(nullptr) { } - HANDLE m_directoryHandle; - HANDLE m_ioHandle; -}; - -////////////////////////////////////////////////////////////////////////////// -/// FolderWatchRoot -FolderRootWatch::FolderRootWatch(const QString rootFolder) - : m_root(rootFolder) - , m_shutdownThreadSignal(false) - , m_fileWatcher(nullptr) - , m_platformImpl(new PlatformImplementation()) -{ -} - -FolderRootWatch::~FolderRootWatch() -{ - // Destructor is required in here since this file contains the definition of struct PlatformImplementation - Stop(); - - delete m_platformImpl; -} - -bool FolderRootWatch::Start() -{ - m_platformImpl->m_directoryHandle = ::CreateFileW(m_root.toStdWString().data(), FILE_LIST_DIRECTORY, FILE_SHARE_READ | FILE_SHARE_WRITE | FILE_SHARE_DELETE, nullptr, OPEN_EXISTING, FILE_FLAG_BACKUP_SEMANTICS | FILE_FLAG_OVERLAPPED, nullptr); - - if (m_platformImpl->m_directoryHandle != INVALID_HANDLE_VALUE) - { - m_platformImpl->m_ioHandle = ::CreateIoCompletionPort(m_platformImpl->m_directoryHandle, nullptr, 1, 0); - if (m_platformImpl->m_ioHandle != INVALID_HANDLE_VALUE) - { - m_shutdownThreadSignal = false; - m_thread = std::thread(std::bind(&FolderRootWatch::WatchFolderLoop, this)); - return true; - } - } - return false; -} - -void FolderRootWatch::Stop() -{ - m_shutdownThreadSignal = true; - CloseHandle(m_platformImpl->m_ioHandle); - m_platformImpl->m_ioHandle = nullptr; - - if (m_thread.joinable()) - { - m_thread.join(); // wait for the thread to finish - m_thread = std::thread(); //destroy - } - CloseHandle(m_platformImpl->m_directoryHandle); - m_platformImpl->m_directoryHandle = nullptr; -} - -void FolderRootWatch::WatchFolderLoop() -{ - FILE_NOTIFY_INFORMATION aFileNotifyInformationList[50000]; - QString path; - OVERLAPPED aOverlapped; - LPOVERLAPPED pOverlapped; - DWORD dwByteCount; - ULONG_PTR ulKey; - - while (!m_shutdownThreadSignal) - { - ::memset(aFileNotifyInformationList, 0, sizeof(aFileNotifyInformationList)); - ::memset(&aOverlapped, 0, sizeof(aOverlapped)); - - if (::ReadDirectoryChangesW(m_platformImpl->m_directoryHandle, aFileNotifyInformationList, sizeof(aFileNotifyInformationList), true, FILE_NOTIFY_CHANGE_LAST_WRITE | FILE_NOTIFY_CHANGE_DIR_NAME | FILE_NOTIFY_CHANGE_ATTRIBUTES | FILE_NOTIFY_CHANGE_FILE_NAME, nullptr, &aOverlapped, nullptr)) - { - //wait for up to a second for I/O to signal - dwByteCount = 0; - if (::GetQueuedCompletionStatus(m_platformImpl->m_ioHandle, &dwByteCount, &ulKey, &pOverlapped, INFINITE)) - { - //if we are signaled to shutdown bypass - if (!m_shutdownThreadSignal && ulKey) - { - if (dwByteCount) - { - int offset = 0; - FILE_NOTIFY_INFORMATION* pFileNotifyInformation = aFileNotifyInformationList; - do - { - pFileNotifyInformation = (FILE_NOTIFY_INFORMATION*)((char*)pFileNotifyInformation + offset); - - path.clear(); - path.append(m_root); - path.append(QString::fromWCharArray(pFileNotifyInformation->FileName, pFileNotifyInformation->FileNameLength / 2)); - - QString file = QDir::toNativeSeparators(QDir::cleanPath(path)); - - switch (pFileNotifyInformation->Action) - { - case FILE_ACTION_ADDED: - case FILE_ACTION_RENAMED_NEW_NAME: - ProcessNewFileEvent(file); - break; - case FILE_ACTION_REMOVED: - case FILE_ACTION_RENAMED_OLD_NAME: - ProcessDeleteFileEvent(file); - break; - case FILE_ACTION_MODIFIED: - ProcessModifyFileEvent(file); - break; - } - - offset = pFileNotifyInformation->NextEntryOffset; - } while (offset); - } - } - } - } - } -} - diff --git a/Code/Tools/AssetProcessor/Platform/Windows/native/FileWatcher/FileWatcher_windows.cpp b/Code/Tools/AssetProcessor/Platform/Windows/native/FileWatcher/FileWatcher_windows.cpp new file mode 100644 index 0000000000..b7d1d4c74c --- /dev/null +++ b/Code/Tools/AssetProcessor/Platform/Windows/native/FileWatcher/FileWatcher_windows.cpp @@ -0,0 +1,153 @@ +/* + * Copyright (c) Contributors to the Open 3D Engine Project. + * For complete copyright and license terms please see the LICENSE at the root of this distribution. + * + * SPDX-License-Identifier: Apache-2.0 OR MIT + * + */ + +#include +#include +#include +#include +#include + +bool FileWatcher::PlatformStart() +{ + m_shutdownThreadSignal = false; + + bool allSucceeded = true; + for (const auto& [directory, recursive] : m_folderWatchRoots) + { + if (QDir(directory).exists()) + { + allSucceeded &= m_platformImpl->AddWatchFolder(directory, recursive); + } + } + return allSucceeded; +} + +bool FileWatcher::PlatformImplementation::AddWatchFolder(QString root, bool recursive) +{ + HandleUniquePtr directoryHandle{::CreateFileW( + root.toStdWString().data(), + FILE_LIST_DIRECTORY, + FILE_SHARE_READ | FILE_SHARE_WRITE | FILE_SHARE_DELETE, + nullptr, + OPEN_EXISTING, + FILE_FLAG_BACKUP_SEMANTICS | FILE_FLAG_OVERLAPPED, + nullptr + )}; + + if (directoryHandle.get() == INVALID_HANDLE_VALUE) + { + AZ_Warning("FileWatcher", false, "Failed to start watching %s", root.toUtf8().constData()); + return false; + } + + // Associate this file handle with our existing io completion port handle + if (!::CreateIoCompletionPort(directoryHandle.get(), m_ioHandle.get(), /*CompletionKey =*/ static_cast(PlatformImplementation::EventType::FileRead), 1)) + { + return false; + } + + auto id = AZStd::make_unique(); + auto* idp = id.get(); + const auto& [folderWatch, inserted] = m_folderRootWatches.emplace(AZStd::piecewise_construct, AZStd::forward_as_tuple(idp), + AZStd::forward_as_tuple(AZStd::move(id), AZStd::move(directoryHandle), root, recursive)); + + if (!inserted) + { + return false; + } + + return folderWatch->second.ReadChanges(); +} + +bool FileWatcher::PlatformImplementation::FolderRootWatch::ReadChanges() +{ + // Register to get directory change notifications for our directory handle + return ::ReadDirectoryChangesW( + m_directoryHandle.get(), + &m_fileNotifyInformationList, + sizeof(m_fileNotifyInformationList), + m_recursive, + FILE_NOTIFY_CHANGE_LAST_WRITE | FILE_NOTIFY_CHANGE_DIR_NAME | FILE_NOTIFY_CHANGE_ATTRIBUTES | FILE_NOTIFY_CHANGE_FILE_NAME, + nullptr, + m_overlapped.get(), + nullptr + ); +} + +void FileWatcher::PlatformStop() +{ + m_shutdownThreadSignal = true; + + // Send a special signal to the child thread, that is blocked in a GetQueuedCompletionStatus call, with a completion + // key set to Shutdown. The child thread will stop its processing when it receives this value for the completion key + PostQueuedCompletionStatus(m_platformImpl->m_ioHandle.get(), 0, /*CompletionKey =*/ static_cast(PlatformImplementation::EventType::Shutdown), nullptr); + if (m_thread.joinable()) + { + m_thread.join(); // wait for the thread to finish + } +} + +void FileWatcher::WatchFolderLoop() +{ + LPOVERLAPPED directoryId = nullptr; + ULONG_PTR completionKey = 0; + + while (!m_shutdownThreadSignal) + { + DWORD dwByteCount = 0; + if (::GetQueuedCompletionStatus(m_platformImpl->m_ioHandle.get(), &dwByteCount, &completionKey, &directoryId, INFINITE)) + { + if (m_shutdownThreadSignal || completionKey == static_cast(PlatformImplementation::EventType::Shutdown)) + { + break; + } + if (dwByteCount == 0) + { + continue; + } + + const auto foundFolderRoot = m_platformImpl->m_folderRootWatches.find(directoryId); + if (foundFolderRoot == end(m_platformImpl->m_folderRootWatches)) + { + continue; + } + + PlatformImplementation::FolderRootWatch& folderRoot = foundFolderRoot->second; + + // Initialize offset to 1 to ensure that the first iteration is always processed + DWORD offset = 1; + for ( + const FILE_NOTIFY_INFORMATION* pFileNotifyInformation = reinterpret_cast(&folderRoot.m_fileNotifyInformationList); + offset; + pFileNotifyInformation = reinterpret_cast(reinterpret_cast(pFileNotifyInformation) + offset) + ){ + const QString file = QDir::toNativeSeparators(QDir(folderRoot.m_directoryRoot) + .filePath(QString::fromWCharArray(pFileNotifyInformation->FileName, pFileNotifyInformation->FileNameLength / 2))); + + switch (pFileNotifyInformation->Action) + { + case FILE_ACTION_ADDED: + case FILE_ACTION_RENAMED_NEW_NAME: + rawFileAdded(file, {}); + break; + case FILE_ACTION_REMOVED: + case FILE_ACTION_RENAMED_OLD_NAME: + rawFileRemoved(file, {}); + break; + case FILE_ACTION_MODIFIED: + rawFileModified(file, {}); + break; + } + + offset = pFileNotifyInformation->NextEntryOffset; + } + + folderRoot.ReadChanges(); + } + } +} diff --git a/Code/Tools/AssetProcessor/Platform/Windows/native/FileWatcher/FileWatcher_windows.h b/Code/Tools/AssetProcessor/Platform/Windows/native/FileWatcher/FileWatcher_windows.h new file mode 100644 index 0000000000..28092961f5 --- /dev/null +++ b/Code/Tools/AssetProcessor/Platform/Windows/native/FileWatcher/FileWatcher_windows.h @@ -0,0 +1,65 @@ +/* + * Copyright (c) Contributors to the Open 3D Engine Project. + * For complete copyright and license terms please see the LICENSE at the root of this distribution. + * + * SPDX-License-Identifier: Apache-2.0 OR MIT + * + */ + +#pragma once + +#include +#include +#include +#include + +#include +#include + +struct HandleDeleter +{ + void operator()(HANDLE handle) + { + if (handle && handle != INVALID_HANDLE_VALUE) + { + CloseHandle(handle); + } + } +}; + +using HandleUniquePtr = AZStd::unique_ptr, HandleDeleter>; + +class FileWatcher::PlatformImplementation +{ +public: + bool AddWatchFolder(QString folder, bool recursive); + + struct FolderRootWatch + { + FolderRootWatch(AZStd::unique_ptr&& overlapped, HandleUniquePtr&& directoryHandle, QString root, bool recursive) + : m_overlapped(AZStd::move(overlapped)) + , m_directoryHandle(AZStd::move(directoryHandle)) + , m_directoryRoot(AZStd::move(root)) + , m_recursive(recursive) + { + } + + bool ReadChanges(); + + AZStd::unique_ptr m_overlapped; // Identifies this root watch + HandleUniquePtr m_directoryHandle; + QString m_directoryRoot; + bool m_recursive; + AZStd::aligned_storage_t<64 * 1024, sizeof(DWORD)> m_fileNotifyInformationList{}; + }; + + enum class EventType + { + FileRead, + Shutdown + }; + + AZStd::unordered_map m_folderRootWatches; + + HandleUniquePtr m_ioHandle{CreateIoCompletionPort(INVALID_HANDLE_VALUE, nullptr, /*CompletionKey =*/ static_cast(EventType::FileRead), 1)}; +}; diff --git a/Code/Tools/AssetProcessor/assetprocessor_static_files.cmake b/Code/Tools/AssetProcessor/assetprocessor_static_files.cmake index 0c1347517f..6dda9af682 100644 --- a/Code/Tools/AssetProcessor/assetprocessor_static_files.cmake +++ b/Code/Tools/AssetProcessor/assetprocessor_static_files.cmake @@ -29,6 +29,9 @@ set(FILES native/AssetManager/SourceFileRelocator.h native/AssetManager/ControlRequestHandler.cpp native/AssetManager/ControlRequestHandler.h + native/AssetManager/ExcludedFolderCache.cpp + native/AssetManager/ExcludedFolderCache.h + native/AssetManager/ExcludedFolderCacheInterface.h native/assetprocessor.h native/connection/connection.cpp native/connection/connection.h @@ -41,7 +44,6 @@ set(FILES native/FileProcessor/FileProcessor.h native/FileWatcher/FileWatcher.cpp native/FileWatcher/FileWatcher.h - native/FileWatcher/FileWatcherAPI.h native/InternalBuilders/SettingsRegistryBuilder.cpp native/InternalBuilders/SettingsRegistryBuilder.h native/resourcecompiler/JobsModel.cpp @@ -60,13 +62,6 @@ set(FILES native/resourcecompiler/RCJobSortFilterProxyModel.h native/resourcecompiler/RCQueueSortModel.cpp native/resourcecompiler/RCQueueSortModel.h - native/shadercompiler/shadercompilerjob.cpp - native/shadercompiler/shadercompilerjob.h - native/shadercompiler/shadercompilerManager.cpp - native/shadercompiler/shadercompilerManager.h - native/shadercompiler/shadercompilerMessages.h - native/shadercompiler/shadercompilerModel.cpp - native/shadercompiler/shadercompilerModel.h native/utilities/ApplicationManagerAPI.h native/utilities/ApplicationManager.cpp native/utilities/ApplicationManager.h @@ -89,8 +84,6 @@ set(FILES native/utilities/BuilderManager.inl native/utilities/ByteArrayStream.cpp native/utilities/ByteArrayStream.h - native/utilities/CommunicatorTracePrinter.cpp - native/utilities/CommunicatorTracePrinter.h native/utilities/IniConfiguration.cpp native/utilities/IniConfiguration.h native/utilities/JobDiagnosticTracker.cpp @@ -102,6 +95,8 @@ set(FILES native/utilities/PlatformConfiguration.cpp native/utilities/PlatformConfiguration.h native/utilities/PotentialDependencies.h + native/utilities/StatsCapture.cpp + native/utilities/StatsCapture.h native/utilities/SpecializedDependencyScanner.h native/utilities/ThreadHelper.cpp native/utilities/ThreadHelper.h diff --git a/Code/Tools/AssetProcessor/assetprocessor_test_files.cmake b/Code/Tools/AssetProcessor/assetprocessor_test_files.cmake index 6aebc8bc25..2c4c53642c 100644 --- a/Code/Tools/AssetProcessor/assetprocessor_test_files.cmake +++ b/Code/Tools/AssetProcessor/assetprocessor_test_files.cmake @@ -36,6 +36,7 @@ set(FILES native/tests/platformconfiguration/platformconfigurationtests.h native/tests/utilities/JobModelTest.cpp native/tests/utilities/JobModelTest.h + native/tests/utilities/StatsCaptureTest.cpp native/tests/AssetCatalog/AssetCatalogUnitTests.cpp native/tests/assetscanner/AssetScannerTests.h native/tests/assetscanner/AssetScannerTests.cpp @@ -66,8 +67,6 @@ set(FILES native/unittests/PlatformConfigurationUnitTests.h native/unittests/RCcontrollerUnitTests.cpp native/unittests/RCcontrollerUnitTests.h - native/unittests/ShaderCompilerUnitTests.cpp - native/unittests/ShaderCompilerUnitTests.h native/unittests/UnitTestRunner.cpp native/unittests/UnitTestRunner.h native/unittests/UtilitiesUnitTests.cpp diff --git a/Code/Tools/AssetProcessor/native/AssetDatabase/AssetDatabase.cpp b/Code/Tools/AssetProcessor/native/AssetDatabase/AssetDatabase.cpp index 8f7d542fcc..cf33e559ac 100644 --- a/Code/Tools/AssetProcessor/native/AssetDatabase/AssetDatabase.cpp +++ b/Code/Tools/AssetProcessor/native/AssetDatabase/AssetDatabase.cpp @@ -1067,15 +1067,12 @@ namespace AssetProcessor if (dropAllTables) { - AZ_TracePrintf("AssetDatabase", "Closing existing db connection\n"); // Temporary debug output to help with tracking down a crash // drop all tables by destroying the entire database. m_databaseConnection->Close(); - AZ_TracePrintf("AssetDatabase", "Getting db file path\n"); // Temporary debug output to help with tracking down a crash AZStd::string dbFilePath = GetAssetDatabaseFilePath(); if (dbFilePath != ":memory:") { - AZ_TracePrintf("AssetDatabase", "Deleting existing db %s\n", dbFilePath.c_str()); // Temporary debug output to help with tracking down a crash // you cannot delete a memory database, but it drops all data when you close it anyway. if (!AZ::IO::SystemFile::Delete(dbFilePath.c_str())) { @@ -1085,7 +1082,7 @@ namespace AssetProcessor return false; } } - AZ_TracePrintf("AssetDatabase", "Re-opening connection\n"); // Temporary debug output to help with tracking down a crash + if (!m_databaseConnection->Open(dbFilePath, IsReadOnly())) { delete m_databaseConnection; @@ -2613,15 +2610,8 @@ namespace AssetProcessor { ScopedTransaction transaction(m_databaseConnection); - const char* statementName = INSERT_NEW_LEGACYSUBID; - bool creatingNew = entry.m_subIDsEntryID == InvalidEntryId; - if (!creatingNew) - { - statementName = OVERWRITE_EXISTING_LEGACYSUBID; - } - if (creatingNew) { if (!s_InsertNewLegacysubidQuery.BindAndStep(*m_databaseConnection, entry.m_productPK, entry.m_subID)) diff --git a/Code/Tools/AssetProcessor/native/AssetManager/ExcludedFolderCache.cpp b/Code/Tools/AssetProcessor/native/AssetManager/ExcludedFolderCache.cpp new file mode 100644 index 0000000000..2c8dc844dd --- /dev/null +++ b/Code/Tools/AssetProcessor/native/AssetManager/ExcludedFolderCache.cpp @@ -0,0 +1,154 @@ +/* + * Copyright (c) Contributors to the Open 3D Engine Project. + * For complete copyright and license terms please see the LICENSE at the root of this distribution. + * + * SPDX-License-Identifier: Apache-2.0 OR MIT + * + */ + +#include +#include +#include +#include +#include +#include + +namespace AssetProcessor +{ + ExcludedFolderCache::ExcludedFolderCache(const PlatformConfiguration* platformConfig) : m_platformConfig(platformConfig) + { + AZ::Interface::Register(this); + } + + ExcludedFolderCache::~ExcludedFolderCache() + { + AZ::Interface::Unregister(this); + } + + const AZStd::unordered_set& ExcludedFolderCache::GetExcludedFolders() + { + if (!m_builtCache) + { + for (int i = 0; i < m_platformConfig->GetScanFolderCount(); ++i) + { + const auto& scanFolderInfo = m_platformConfig->GetScanFolderAt(i); + QDir rooted(scanFolderInfo.ScanPath()); + QString absolutePath = rooted.absolutePath(); + AZStd::stack dirs; + dirs.push(absolutePath); + + while (!dirs.empty()) + { + absolutePath = dirs.top(); + dirs.pop(); + + // Scan only folders, do not recurse so we have the chance to ignore a subfolder before going deeper + QDirIterator dirIterator(absolutePath, QDir::Dirs | QDir::NoSymLinks | QDir::NoDotAndDotDot); + + // Loop all the folders in this directory + while (dirIterator.hasNext()) + { + dirIterator.next(); + QString pathMatch = rooted.absoluteFilePath(dirIterator.filePath()); + + if (m_platformConfig->IsFileExcluded(pathMatch)) + { + // Add the folder to the list and do not proceed any deeper + m_excludedFolders.emplace(pathMatch.toUtf8().constData()); + } + else if (scanFolderInfo.RecurseSubFolders()) + { + // Folder is not excluded and recurse is enabled, add to the list of folders to check + dirs.push(pathMatch); + } + } + } + } + + // Add the cache to the list as well + AZStd::string projectCacheRootValue; + AZ::SettingsRegistry::Get()->Get(projectCacheRootValue, AZ::SettingsRegistryMergeUtils::FilePathKey_CacheProjectRootFolder); + projectCacheRootValue = AssetUtilities::NormalizeFilePath(projectCacheRootValue.c_str()).toUtf8().constData(); + m_excludedFolders.emplace(projectCacheRootValue); + + // Register to be notified about deletes so we can remove old ignored folders + auto fileStateCache = AZ::Interface::Get(); + + if (fileStateCache) + { + m_handler = AZ::Event::Handler([this](FileStateInfo fileInfo) + { + if (fileInfo.m_isDirectory) + { + AZStd::scoped_lock lock(m_pendingNewFolderMutex); + + m_pendingDeletes.emplace(fileInfo.m_absolutePath.toUtf8().constData()); + } + }); + + fileStateCache->RegisterForDeleteEvent(m_handler); + } + else + { + AZ_Error("ExcludedFolderCache", false, "Failed to find IFileStateRequests interface"); + } + + m_builtCache = true; + } + + // Incorporate any pending folders + AZStd::unordered_set pendingAdds; + AZStd::unordered_set pendingDeletes; + + { + AZStd::scoped_lock lock(m_pendingNewFolderMutex); + pendingAdds.swap(m_pendingNewFolders); + pendingDeletes.swap(m_pendingDeletes); + } + + if (!pendingAdds.empty()) + { + m_excludedFolders.insert(pendingAdds.begin(), pendingAdds.end()); + } + + if (!pendingDeletes.empty()) + { + for (const auto& pendingDelete : pendingDeletes) + { + m_excludedFolders.erase(pendingDelete); + } + } + + return m_excludedFolders; + } + + void ExcludedFolderCache::FileAdded(QString path) + { + QString relativePath, scanFolderPath; + + if (!m_platformConfig->ConvertToRelativePath(path, relativePath, scanFolderPath)) + { + AZ_Error("ExcludedFolderCache", false, "Failed to get relative path for newly added file %s", path.toUtf8().constData()); + return; + } + + AZ::IO::Path azPath(relativePath.toUtf8().constData()); + AZ::IO::Path absolutePath(scanFolderPath.toUtf8().constData()); + + for (const auto& pathPart : azPath) + { + absolutePath /= pathPart; + + QString normalized = AssetUtilities::NormalizeFilePath(absolutePath.c_str()); + + if (m_platformConfig->IsFileExcluded(normalized)) + { + // Add the folder to a pending list, since this callback runs on another thread + AZStd::scoped_lock lock(m_pendingNewFolderMutex); + + m_pendingNewFolders.emplace(normalized.toUtf8().constData()); + break; + } + } + } +} diff --git a/Code/Tools/AssetProcessor/native/AssetManager/ExcludedFolderCache.h b/Code/Tools/AssetProcessor/native/AssetManager/ExcludedFolderCache.h new file mode 100644 index 0000000000..b0c70946b6 --- /dev/null +++ b/Code/Tools/AssetProcessor/native/AssetManager/ExcludedFolderCache.h @@ -0,0 +1,39 @@ +/* + * Copyright (c) Contributors to the Open 3D Engine Project. + * For complete copyright and license terms please see the LICENSE at the root of this distribution. + * + * SPDX-License-Identifier: Apache-2.0 OR MIT + * + */ + +#pragma once + +#include +#include + +namespace AssetProcessor +{ + class PlatformConfiguration; + + struct ExcludedFolderCache : ExcludedFolderCacheInterface + { + explicit ExcludedFolderCache(const PlatformConfiguration* platformConfig); + ~ExcludedFolderCache() override; + + // Gets a set of absolute paths to folder which have been excluded according to the platform configuration rules + // Note - not thread safe + const AZStd::unordered_set& GetExcludedFolders() override; + + void FileAdded(QString path) override; + + private: + bool m_builtCache = false; + const PlatformConfiguration* m_platformConfig{}; + AZStd::unordered_set m_excludedFolders; + + AZStd::recursive_mutex m_pendingNewFolderMutex; + AZStd::unordered_set m_pendingNewFolders; // Newly ignored folders waiting to be added to m_excludedFolders + AZStd::unordered_set m_pendingDeletes; + AZ::Event::Handler m_handler; + }; +} diff --git a/Code/Tools/AssetProcessor/native/AssetManager/ExcludedFolderCacheInterface.h b/Code/Tools/AssetProcessor/native/AssetManager/ExcludedFolderCacheInterface.h new file mode 100644 index 0000000000..1bdc4cc855 --- /dev/null +++ b/Code/Tools/AssetProcessor/native/AssetManager/ExcludedFolderCacheInterface.h @@ -0,0 +1,29 @@ +/* + * Copyright (c) Contributors to the Open 3D Engine Project. + * For complete copyright and license terms please see the LICENSE at the root of this distribution. + * + * SPDX-License-Identifier: Apache-2.0 OR MIT + * + */ + +#pragma once + +#include +#include + +namespace AssetProcessor +{ + class PlatformConfiguration; + + struct ExcludedFolderCacheInterface + { + AZ_RTTI(ExcludedFolderCacheInterface, "{3AC471B6-C9F8-49CF-9E9D-237BDF63328C}"); + AZ_DISABLE_COPY_MOVE(ExcludedFolderCacheInterface); + + ExcludedFolderCacheInterface() = default; + virtual ~ExcludedFolderCacheInterface() = default; + + virtual const AZStd::unordered_set& GetExcludedFolders() = 0; + virtual void FileAdded(QString path) = 0; + }; +} diff --git a/Code/Tools/AssetProcessor/native/AssetManager/FileStateCache.cpp b/Code/Tools/AssetProcessor/native/AssetManager/FileStateCache.cpp index d21aca35f5..e49d1bbb47 100644 --- a/Code/Tools/AssetProcessor/native/AssetManager/FileStateCache.cpp +++ b/Code/Tools/AssetProcessor/native/AssetManager/FileStateCache.cpp @@ -63,6 +63,11 @@ namespace AssetProcessor return true; } + void FileStateCache::RegisterForDeleteEvent(AZ::Event::Handler& handler) + { + handler.Connect(m_deleteEvent); + } + void FileStateCache::AddInfoSet(QSet infoSet) { LockGuardType scopeLock(m_mapMutex); @@ -103,6 +108,8 @@ namespace AssetProcessor if (itr != m_fileInfoMap.end()) { + m_deleteEvent.Signal(itr.value()); + bool isDirectory = itr.value().m_isDirectory; QString parentPath = itr.value().m_absolutePath; m_fileInfoMap.erase(itr); @@ -205,6 +212,21 @@ namespace AssetProcessor return true; } + void FileStatePassthrough::RegisterForDeleteEvent(AZ::Event::Handler& handler) + { + handler.Connect(m_deleteEvent); + } + + void FileStatePassthrough::SignalDeleteEvent(const QString& absolutePath) const + { + FileStateInfo info; + + if (GetFileInfo(absolutePath, &info)) + { + m_deleteEvent.Signal(info); + } + } + bool FileStateInfo::operator==(const FileStateInfo& rhs) const { return m_absolutePath == rhs.m_absolutePath diff --git a/Code/Tools/AssetProcessor/native/AssetManager/FileStateCache.h b/Code/Tools/AssetProcessor/native/AssetManager/FileStateCache.h index ba663aef0e..56ec03aa7d 100644 --- a/Code/Tools/AssetProcessor/native/AssetManager/FileStateCache.h +++ b/Code/Tools/AssetProcessor/native/AssetManager/FileStateCache.h @@ -14,6 +14,7 @@ #include #include #include +#include namespace AssetProcessor { @@ -51,10 +52,11 @@ namespace AssetProcessor /// Convenience function to check if a file or directory exists. virtual bool Exists(const QString& absolutePath) const = 0; virtual bool GetHash(const QString& absolutePath, FileHash* foundHash) = 0; + virtual void RegisterForDeleteEvent(AZ::Event::Handler& handler) = 0; AZ_DISABLE_COPY_MOVE(IFileStateRequests); }; - + class FileStateBase : public IFileStateRequests { @@ -89,11 +91,11 @@ namespace AssetProcessor { public: - // FileStateRequestBus implementation bool GetFileInfo(const QString& absolutePath, FileStateInfo* foundFileInfo) const override; bool Exists(const QString& absolutePath) const override; bool GetHash(const QString& absolutePath, FileHash* foundHash) override; + void RegisterForDeleteEvent(AZ::Event::Handler& handler) override; void AddInfoSet(QSet infoSet) override; void AddFile(const QString& absolutePath) override; @@ -116,9 +118,11 @@ namespace AssetProcessor mutable AZStd::recursive_mutex m_mapMutex; QHash m_fileInfoMap; - + QHash m_fileHashMap; + AZ::Event m_deleteEvent; + using LockGuardType = AZStd::lock_guard; }; @@ -131,5 +135,10 @@ namespace AssetProcessor bool GetFileInfo(const QString& absolutePath, FileStateInfo* foundFileInfo) const override; bool Exists(const QString& absolutePath) const override; bool GetHash(const QString& absolutePath, FileHash* foundHash) override; + void RegisterForDeleteEvent(AZ::Event::Handler& handler) override; + + void SignalDeleteEvent(const QString& absolutePath) const; + protected: + AZ::Event m_deleteEvent; }; } // namespace AssetProcessor diff --git a/Code/Tools/AssetProcessor/native/AssetManager/assetProcessorManager.cpp b/Code/Tools/AssetProcessor/native/AssetManager/assetProcessorManager.cpp index 367a296bd4..8867f2379f 100644 --- a/Code/Tools/AssetProcessor/native/AssetManager/assetProcessorManager.cpp +++ b/Code/Tools/AssetProcessor/native/AssetManager/assetProcessorManager.cpp @@ -18,13 +18,14 @@ #include - #include "native/AssetManager/assetProcessorManager.h" + #include #include #include #include +#include #include "AssetRequestHandler.h" @@ -66,8 +67,10 @@ namespace AssetProcessor m_sourceFileRelocator = AZStd::make_unique(m_stateData, m_platformConfig); - PopulateJobStateCache(); + m_excludedFolderCache = AZStd::make_unique(m_platformConfig); + PopulateJobStateCache(); + AssetProcessor::ProcessingJobInfoBus::Handler::BusConnect(); } @@ -121,6 +124,9 @@ namespace AssetProcessor { if (status == AssetProcessor::AssetScanningStatus::Started) { + // capture scanning stats: + AssetProcessor::StatsCapture::BeginCaptureStat("AssetScanning"); + // Ensure that the source file list is populated before a scan begins m_sourceFilesInDatabase.clear(); m_fileModTimes.clear(); @@ -174,6 +180,8 @@ namespace AssetProcessor (status == AssetProcessor::AssetScanningStatus::Stopped)) { m_isCurrentlyScanning = false; + AssetProcessor::StatsCapture::EndCaptureStat("AssetScanning"); + // we cannot invoke this immediately - the scanner might be done, but we aren't actually ready until we've processed all remaining messages: QMetaObject::invokeMethod(this, "CheckMissingFiles", Qt::QueuedConnection); } @@ -207,13 +215,24 @@ namespace AssetProcessor } else { + QString statKey = QString("ProcessJob,%1,%2,%3").arg(jobEntry.m_databaseSourceName).arg(jobEntry.m_jobKey).arg(jobEntry.m_platformInfo.m_identifier.c_str()); + if (status == JobStatus::InProgress) { //update to in progress status m_jobRunKeyToJobInfoMap[jobEntry.m_jobRunKey].m_status = JobStatus::InProgress; + // stats tracking. Start accumulating time. + AssetProcessor::StatsCapture::BeginCaptureStat(statKey.toUtf8().constData()); + } else //if failed or succeeded remove from the map { + // note that sometimes this gets called twice, once by the RCJobs thread and once by the AP itself, + // because sometimes jobs take a short cut from "started" -> "failed" or "started" -> "complete + // without going thru the RC. + // as such, all the code in this block should be crafted to work regardless of whether its double called. + AssetProcessor::StatsCapture::EndCaptureStat(statKey.toUtf8().constData()); + m_jobRunKeyToJobInfoMap.erase(jobEntry.m_jobRunKey); Q_EMIT SourceFinished(sourceUUID, legacySourceUUID); Q_EMIT JobComplete(jobEntry, status); @@ -255,11 +274,9 @@ namespace AssetProcessor } //look for the job in flight first - bool found = false; auto foundElement = m_jobRunKeyToJobInfoMap.find(request.m_jobRunKey); if (foundElement != m_jobRunKeyToJobInfoMap.end()) { - found = true; jobInfo = foundElement->second; } else @@ -277,7 +294,6 @@ namespace AssetProcessor AZ_Assert(jobInfos.size() == 1, "Should only have found one jobInfo!!!"); jobInfo = AZStd::move(jobInfos[0]); - found = true; } if (jobInfo.m_status == JobStatus::Failed_InvalidSourceNameExceedsMaxLimit) @@ -3353,8 +3369,13 @@ namespace AssetProcessor AZStd::string logFileName = AssetUtilities::ComputeJobLogFileName(createJobsRequest); { AssetUtilities::JobLogTraceListener jobLogTraceListener(logFileName, runKey, true); + // track the time it takes to createJobs. We can perform analysis later to present it by extension and other stats. + QString statKey = QString("CreateJobs,%1,%2").arg(actualRelativePath).arg(builderInfo.m_name.c_str()); + AssetProcessor::StatsCapture::BeginCaptureStat(statKey.toUtf8().constData()); builderInfo.m_createJobFunction(createJobsRequest, createJobsResponse); + AssetProcessor::StatsCapture::EndCaptureStat(statKey.toUtf8().constData()); } + AssetProcessor::SetThreadLocalJobId(0); bool isBuilderMissingFingerprint = (createJobsResponse.m_result == AssetBuilderSDK::CreateJobsResultCode::Success @@ -3573,6 +3594,8 @@ namespace AssetProcessor QString knownPathBeforeWildcard = encodedFileData.left(slashBeforeWildcardIndex + 1); // include the slash QString relativeSearch = encodedFileData.mid(slashBeforeWildcardIndex + 1); // skip the slash + const auto& excludedFolders = m_excludedFolderCache->GetExcludedFolders(); + // Absolute path, just check the 1 scan folder if (AZ::IO::PathView(encodedFileData.toUtf8().constData()).IsAbsolute()) { @@ -3592,7 +3615,8 @@ namespace AssetProcessor QString scanFolderAndKnownSubPath = rooted.absoluteFilePath(knownPathBeforeWildcard); resolvedDependencyList.append(m_platformConfig->FindWildcardMatches( - scanFolderAndKnownSubPath, relativeSearch, false, scanFolderInfo->RecurseSubFolders())); + scanFolderAndKnownSubPath, relativeSearch, + excludedFolders, false, scanFolderInfo->RecurseSubFolders())); } } else // Relative path, check every scan folder @@ -3610,7 +3634,21 @@ namespace AssetProcessor QString absolutePath = rooted.absoluteFilePath(knownPathBeforeWildcard); resolvedDependencyList.append(m_platformConfig->FindWildcardMatches( - absolutePath, relativeSearch, false, scanFolderInfo->RecurseSubFolders())); + absolutePath, relativeSearch, + excludedFolders, false, scanFolderInfo->RecurseSubFolders())); + } + } + + // Filter out any excluded files + for (auto itr = resolvedDependencyList.begin(); itr != resolvedDependencyList.end();) + { + if (m_platformConfig->IsFileExcluded(*itr)) + { + itr = resolvedDependencyList.erase(itr); + } + else + { + ++itr; } } @@ -4820,5 +4858,7 @@ namespace AssetProcessor } return filesFound; } + + } // namespace AssetProcessor diff --git a/Code/Tools/AssetProcessor/native/AssetManager/assetProcessorManager.h b/Code/Tools/AssetProcessor/native/AssetManager/assetProcessorManager.h index 891e091f91..fe77396760 100644 --- a/Code/Tools/AssetProcessor/native/AssetManager/assetProcessorManager.h +++ b/Code/Tools/AssetProcessor/native/AssetManager/assetProcessorManager.h @@ -40,6 +40,8 @@ #include "AssetRequestHandler.h" #include "native/utilities/JobDiagnosticTracker.h" #include "SourceFileRelocator.h" + +#include #endif class FileWatcher; @@ -341,7 +343,8 @@ namespace AssetProcessor void CleanEmptyFolder(QString folder, QString root); void ProcessBuilders(QString normalizedPath, QString relativePathToFile, const ScanFolderInfo* scanFolder, const AssetProcessor::BuilderInfoList& builderInfoList); - + AZStd::vector GetExcludedFolders(); + struct SourceInfo { QString m_watchFolder; @@ -552,6 +555,8 @@ namespace AssetProcessor // when true, a flag will be sent to builders process job indicating debug output/mode should be used bool m_builderDebugFlag = false; + AZStd::unique_ptr m_excludedFolderCache{}; + protected Q_SLOTS: void FinishAnalysis(AZStd::string fileToCheck); ////////////////////////////////////////////////////////// diff --git a/Code/Tools/AssetProcessor/native/FileWatcher/FileWatcher.cpp b/Code/Tools/AssetProcessor/native/FileWatcher/FileWatcher.cpp index ff9876ebdd..993e7f2760 100644 --- a/Code/Tools/AssetProcessor/native/FileWatcher/FileWatcher.cpp +++ b/Code/Tools/AssetProcessor/native/FileWatcher/FileWatcher.cpp @@ -6,154 +6,119 @@ * */ #include "FileWatcher.h" +#include "AzCore/std/containers/vector.h" #include +#include +#include -////////////////////////////////////////////////////////////////////////////// -/// FolderWatchRoot -void FolderRootWatch::ProcessNewFileEvent(const QString& file) +//! IsSubfolder(folderA, folderB) +//! returns whether folderA is a subfolder of folderB +//! assumptions: absolute paths +static bool IsSubfolder(const QString& folderA, const QString& folderB) { - FileChangeInfo info; - info.m_action = FileAction::FileAction_Added; - info.m_filePath = file; - const bool invoked = QMetaObject::invokeMethod(m_fileWatcher, "AnyFileChange", Qt::QueuedConnection, Q_ARG(FileChangeInfo, info)); - Q_ASSERT(invoked); -} + // lets avoid allocating or messing with memory - this is a MAJOR hotspot as it is called for any file change even in the cache! + if (folderA.length() <= folderB.length()) + { + return false; + } -void FolderRootWatch::ProcessDeleteFileEvent(const QString& file) -{ - FileChangeInfo info; - info.m_action = FileAction::FileAction_Removed; - info.m_filePath = file; - const bool invoked = QMetaObject::invokeMethod(m_fileWatcher, "AnyFileChange", Qt::QueuedConnection, Q_ARG(FileChangeInfo, info)); - Q_ASSERT(invoked); -} + using AZStd::begin; + using AZStd::end; -void FolderRootWatch::ProcessModifyFileEvent(const QString& file) -{ - FileChangeInfo info; - info.m_action = FileAction::FileAction_Modified; - info.m_filePath = file; - const bool invoked = QMetaObject::invokeMethod(m_fileWatcher, "AnyFileChange", Qt::QueuedConnection, Q_ARG(FileChangeInfo, info)); - Q_ASSERT(invoked); + auto isSlash = [](const QChar c) constexpr + { + return c == AZ::IO::WindowsPathSeparator || c == AZ::IO::PosixPathSeparator; + }; + + const auto firstPathSeparator = AZStd::find_if(begin(folderB), end(folderB), [&isSlash](const QChar c) + { + return isSlash(c); + }); + + // Follow the convention used by AZ::IO::Path, and use a case-sensitive comparison on Posix paths + const bool useCaseSensitiveCompare = (firstPathSeparator == end(folderB)) ? true : (*firstPathSeparator == AZ::IO::PosixPathSeparator); + + return AZStd::equal(begin(folderB), end(folderB), begin(folderA), [isSlash, useCaseSensitiveCompare](const QChar charAtB, const QChar charAtA) + { + if (isSlash(charAtA)) + { + return isSlash(charAtB); + } + if (useCaseSensitiveCompare) + { + return charAtA == charAtB; + } + return charAtA.toLower() == charAtB.toLower(); + }); } ////////////////////////////////////////////////////////////////////////// /// FileWatcher FileWatcher::FileWatcher() - : m_nextHandle(0) + : m_platformImpl(AZStd::make_unique()) { - qRegisterMetaType("FileChangeInfo"); + auto makeFilter = [this](auto signal) + { + return [this, signal](QString path) + { + const auto foundWatchRoot = AZStd::find_if(begin(m_folderWatchRoots), end(m_folderWatchRoots), [path](const WatchRoot& watchRoot) + { + return Filter(path, watchRoot); + }); + if (foundWatchRoot == end(m_folderWatchRoots)) + { + return; + } + AZStd::invoke(signal, this, path); + }; + }; + + // The rawFileAdded signals are emitted by the watcher thread. Use a queued + // connection so that the consumers of the notification process the + // notification on the main thread. + connect(this, &FileWatcher::rawFileAdded, this, makeFilter(&FileWatcher::fileAdded), Qt::QueuedConnection); + connect(this, &FileWatcher::rawFileRemoved, this, makeFilter(&FileWatcher::fileRemoved), Qt::QueuedConnection); + connect(this, &FileWatcher::rawFileModified, this, makeFilter(&FileWatcher::fileModified), Qt::QueuedConnection); } FileWatcher::~FileWatcher() { + disconnect(); + StopWatching(); } -int FileWatcher::AddFolderWatch(FolderWatchBase* pFolderWatch) +void FileWatcher::AddFolderWatch(QString directory, bool recursive) { - if (!pFolderWatch) + // Search for an already monitored root that is a parent of `directory`, + // that is already watching subdirectories recursively + const auto found = AZStd::find_if(begin(m_folderWatchRoots), end(m_folderWatchRoots), [directory](const WatchRoot& root) { - return -1; + return root.m_recursive && IsSubfolder(directory, root.m_directory); + }); + + if (found != end(m_folderWatchRoots)) + { + // This directory is already watched + return; } - FolderRootWatch* pFolderRootWatch = nullptr; + //create a new root and start listening for changes + m_folderWatchRoots.push_back({directory, recursive}); - //see if this a sub folder of an already watched root - for (auto rootsIter = m_folderWatchRoots.begin(); !pFolderRootWatch && rootsIter != m_folderWatchRoots.end(); ++rootsIter) + //since we created a new root, see if the new root is a super folder + //of other roots, if it is then then fold those roots into the new super root + if (recursive) { - if (FolderWatchBase::IsSubfolder(pFolderWatch->m_folder, (*rootsIter)->m_root)) + AZStd::erase_if(m_folderWatchRoots, [directory](const WatchRoot& root) { - pFolderRootWatch = *rootsIter; - } + return IsSubfolder(root.m_directory, directory); + }); } - - bool bCreatedNewRoot = false; - //if its not a sub folder - if (!pFolderRootWatch) - { - //create a new root and start listening for changes - pFolderRootWatch = new FolderRootWatch(pFolderWatch->m_folder); - - //make sure the folder watcher(s) get deleted before this - pFolderRootWatch->setParent(this); - bCreatedNewRoot = true; - } - - pFolderRootWatch->m_fileWatcher = this; - QObject::connect(this, &FileWatcher::AnyFileChange, pFolderWatch, &FolderWatchBase::OnAnyFileChange); - - if (bCreatedNewRoot) - { - if (m_startedWatching) - { - pFolderRootWatch->Start(); - } - - //since we created a new root, see if the new root is a super folder - //of other roots, if it is then then fold those roots into the new super root - for (auto rootsIter = m_folderWatchRoots.begin(); rootsIter != m_folderWatchRoots.end(); ) - { - if (FolderWatchBase::IsSubfolder((*rootsIter)->m_root, pFolderWatch->m_folder)) - { - //union the sub folder map over to the new root - pFolderRootWatch->m_subFolderWatchesMap.insert((*rootsIter)->m_subFolderWatchesMap); - - //clear the old root sub folders map so they don't get deleted when we - //delete the old root as they are now pointed to by the new root - (*rootsIter)->m_subFolderWatchesMap.clear(); - - //delete the empty old root, deleting a root will call Stop() - //automatically which kills the thread - delete *rootsIter; - - //remove the old root pointer form the watched list - rootsIter = m_folderWatchRoots.erase(rootsIter); - } - else - { - ++rootsIter; - } - } - - //add the new root to the watched roots - m_folderWatchRoots.push_back(pFolderRootWatch); - } - - //add to the root - pFolderRootWatch->m_subFolderWatchesMap.insert(m_nextHandle, pFolderWatch); - - m_nextHandle++; - - return m_nextHandle - 1; } -void FileWatcher::RemoveFolderWatch(int handle) +void FileWatcher::ClearFolderWatches() { - for (auto rootsIter = m_folderWatchRoots.begin(); rootsIter != m_folderWatchRoots.end(); ) - { - //find an element by the handle - auto foundIter = (*rootsIter)->m_subFolderWatchesMap.find(handle); - if (foundIter != (*rootsIter)->m_subFolderWatchesMap.end()) - { - //remove the element - (*rootsIter)->m_subFolderWatchesMap.erase(foundIter); - - //we removed a folder watch, if it's empty then there is no reason to keep watching it. - if ((*rootsIter)->m_subFolderWatchesMap.empty()) - { - delete(*rootsIter); - rootsIter = m_folderWatchRoots.erase(rootsIter); - } - else - { - ++rootsIter; - } - } - else - { - ++rootsIter; - } - } + m_folderWatchRoots.clear(); } void FileWatcher::StartWatching() @@ -164,12 +129,18 @@ void FileWatcher::StartWatching() return; } - for (FolderRootWatch* root : m_folderWatchRoots) + if (PlatformStart()) { - root->Start(); + m_thread = AZStd::thread({/*.name=*/ "AssetProcessor FileWatcher thread"}, [this]{ + WatchFolderLoop(); + }); + AZ_TracePrintf(AssetProcessor::ConsoleChannel, "File Change Monitoring started.\n"); + } + else + { + AZ_TracePrintf(AssetProcessor::ConsoleChannel, "File Change Monitoring failed to start.\n"); } - AZ_TracePrintf(AssetProcessor::ConsoleChannel, "File Change Monitoring started.\n"); m_startedWatching = true; } @@ -177,17 +148,35 @@ void FileWatcher::StopWatching() { if (!m_startedWatching) { - AZ_Warning("FileWatcher", false, "StartWatching() called when is not watching for file changes."); + AZ_Warning("FileWatcher", false, "StopWatching() called when is not watching for file changes."); return; } - for (FolderRootWatch* root : m_folderWatchRoots) - { - root->Stop(); - } + PlatformStop(); m_startedWatching = false; } -#include "native/FileWatcher/moc_FileWatcher.cpp" -#include "native/FileWatcher/moc_FileWatcherAPI.cpp" +bool FileWatcher::Filter(QString path, const WatchRoot& watchRoot) +{ + if (!IsSubfolder(path, watchRoot.m_directory)) + { + return false; + } + if (!watchRoot.m_recursive) + { + // filter out subtrees too. + QStringRef subRef = path.rightRef(path.length() - watchRoot.m_directory.length()); + if ((subRef.indexOf('/') != -1) || (subRef.indexOf('\\') != -1)) + { + return false; // filter this out. + } + + // we don't care about subdirs. IsDir is more expensive so we do it after the above filter. + if (QFileInfo(path).isDir()) + { + return false; + } + } + return true; +} diff --git a/Code/Tools/AssetProcessor/native/FileWatcher/FileWatcher.h b/Code/Tools/AssetProcessor/native/FileWatcher/FileWatcher.h index 392f8194a6..b7d8cbe1a4 100644 --- a/Code/Tools/AssetProcessor/native/FileWatcher/FileWatcher.h +++ b/Code/Tools/AssetProcessor/native/FileWatcher/FileWatcher.h @@ -5,62 +5,21 @@ * SPDX-License-Identifier: Apache-2.0 OR MIT * */ -#ifndef FILEWATCHER_COMPONENT_H -#define FILEWATCHER_COMPONENT_H -////////////////////////////////////////////////////////////////////////// + +#pragma once #if !defined(Q_MOC_RUN) -#include "FileWatcherAPI.h" - +#include #include +#include +#include #include #include #include +#include -#include #endif -class FileWatcher; - -////////////////////////////////////////////////////////////////////////// -//! FolderRootWatch -/*! Class used for holding a point in the files system from which file changes are tracked. - * */ -class FolderRootWatch - : public QObject -{ - Q_OBJECT - - friend class FileWatcher; -public: - FolderRootWatch(const QString rootFolder); - virtual ~FolderRootWatch(); - - void ProcessNewFileEvent(const QString& file); - void ProcessDeleteFileEvent(const QString& file); - void ProcessModifyFileEvent(const QString& file); - void ProcessRenameFileEvent(const QString& fileOld, const QString& fileNew); - -public Q_SLOTS: - bool Start(); - void Stop(); - -private: - void WatchFolderLoop(); - -private: - std::thread m_thread; - QString m_root; - QMap m_subFolderWatchesMap; - volatile bool m_shutdownThreadSignal; - FileWatcher* m_fileWatcher; - - // Can't use unique_ptr because this is a QObject and Qt's magic sauce is - // unable to determine the size of the unique_ptr and so fails to compile - struct PlatformImplementation; - PlatformImplementation* m_platformImpl; -}; - ////////////////////////////////////////////////////////////////////////// //! FileWatcher /*! Class that handles creation and deletion of FolderRootWatches based on @@ -73,23 +32,47 @@ class FileWatcher public: FileWatcher(); - virtual ~FileWatcher(); + ~FileWatcher() override; ////////////////////////////////////////////////////////////////////////// - virtual int AddFolderWatch(FolderWatchBase* pFolderWatch); - virtual void RemoveFolderWatch(int handle); + void AddFolderWatch(QString directory, bool recursive = true); + void ClearFolderWatches(); ////////////////////////////////////////////////////////////////////////// - + void StartWatching(); void StopWatching(); Q_SIGNALS: - void AnyFileChange(FileChangeInfo info); + // These signals are emitted when a file under a watched path changes + void fileAdded(QString filePath); + void fileRemoved(QString filePath); + void fileModified(QString filePath); + + // These signals are emitted by the platform implementations when files + // change. Some platforms' file watch APIs do not support non-recursive + // watches, so the signals are filtered before being forwarded to the + // non-"raw" fileAdded/Removed/Modified signals above. + void rawFileAdded(QString filePath, QPrivateSignal); + void rawFileRemoved(QString filePath, QPrivateSignal); + void rawFileModified(QString filePath, QPrivateSignal); private: - int m_nextHandle; - AZStd::vector m_folderWatchRoots; - bool m_startedWatching = false; -}; + bool PlatformStart(); + void PlatformStop(); + void WatchFolderLoop(); -#endif//FILEWATCHER_COMPONENT_H + class PlatformImplementation; + friend class PlatformImplementation; + struct WatchRoot + { + QString m_directory; + bool m_recursive; + }; + static bool Filter(QString path, const WatchRoot& watchRoot); + + AZStd::unique_ptr m_platformImpl; + AZStd::vector m_folderWatchRoots; + AZStd::thread m_thread; + bool m_startedWatching = false; + AZStd::atomic_bool m_shutdownThreadSignal = false; +}; diff --git a/Code/Tools/AssetProcessor/native/FileWatcher/FileWatcherAPI.h b/Code/Tools/AssetProcessor/native/FileWatcher/FileWatcherAPI.h deleted file mode 100644 index 155056d477..0000000000 --- a/Code/Tools/AssetProcessor/native/FileWatcher/FileWatcherAPI.h +++ /dev/null @@ -1,222 +0,0 @@ -/* - * Copyright (c) Contributors to the Open 3D Engine Project. - * For complete copyright and license terms please see the LICENSE at the root of this distribution. - * - * SPDX-License-Identifier: Apache-2.0 OR MIT - * - */ -#ifndef FILEWATCHERAPI_H -#define FILEWATCHERAPI_H - -#include -#include -#include - -////////////////////////////////////////////////////////////////////////// -//! FileAction -/*! Enum for which file changes are tracked. - * */ -enum FileAction -{ - FileAction_None = 0x00, - FileAction_Added = 0x01, - FileAction_Removed = 0x02, - FileAction_Modified = 0x04, - FileAction_Any = 0xFF, -}; -inline FileAction operator | (FileAction a, FileAction b) -{ - return static_cast(static_cast(a) | static_cast(b)); -} -inline FileAction operator & (FileAction a, FileAction b) -{ - return static_cast(static_cast(a) & static_cast(b)); -} - -////////////////////////////////////////////////////////////////////////// -//! FileChangeInfo -/*! Struct for passing along information about file changes. - * */ -struct FileChangeInfo -{ - FileChangeInfo() - : m_action(FileAction::FileAction_None) - {} - FileChangeInfo(const FileChangeInfo& rhs) - : m_action(rhs.m_action) - , m_filePath(rhs.m_filePath) - , m_filePathOld(rhs.m_filePathOld) - { - } - - FileAction m_action; - QString m_filePath; - QString m_filePathOld; -}; - -Q_DECLARE_METATYPE(FileChangeInfo) - -////////////////////////////////////////////////////////////////////////// -//! FolderWatchBase -/*! Class for filtering file changes generated from a root watch. Define your own - *! custom filtering by deriving from this base class and implement your own - *! custom code for what to do when receiving a file change notification. - * */ -class FolderWatchBase - : public QObject -{ - Q_OBJECT - -public: - FolderWatchBase(const QString strFolder, bool bWatchSubtree = true, FileAction fileAction = FileAction::FileAction_Any) - : m_folder(strFolder) - , m_watchSubtree(bWatchSubtree) - , m_fileAction(fileAction) - { - m_folder = QDir::toNativeSeparators(QDir::cleanPath(m_folder) + "/"); - } - - //! IsSubfolder(folderA, folderB) - //! returns whether folderA is a subfolder of folderB - //! assumptions: absolute paths, case insensitive - static bool IsSubfolder(const QString& folderA, const QString& folderB) - { - // lets avoid allocating or messing with memory - this is a MAJOR hotspot as it is called for any file change even in the cache! - int sizeB = folderB.length(); - int sizeA = folderA.length(); - - if (sizeA <= sizeB) - { - return false; - } - - QChar slash1 = QChar('\\'); - QChar slash2 = QChar('/'); - int posA = 0; - - // A is going to be the longer one, so use B: - for (int idx = 0; idx < sizeB; ++idx) - { - QChar charAtA = folderA.at(posA); - QChar charAtB = folderB.at(idx); - - if ((charAtB == slash1) || (charAtB == slash2)) - { - if ((charAtA != slash1) && (charAtA != slash2)) - { - return false; - } - ++posA; - } - else - { - if (charAtA.toLower() != charAtB.toLower()) - { - return false; - } - ++posA; - } - } - return true; - } - - QString m_folder; - bool m_watchSubtree; - FileAction m_fileAction; - -public Q_SLOTS: - void OnAnyFileChange(FileChangeInfo info) - { - //if they set a file action then respect it by rejecting non matching file actions - if (info.m_action & m_fileAction) - { - //is the file is in the folder or subtree (if specified) then call OnFileChange - - if (FolderWatchBase::IsSubfolder(info.m_filePath, m_folder)) - { - OnFileChange(info); - } - } - } - - virtual void OnFileChange(const FileChangeInfo& info) = 0; -}; - -////////////////////////////////////////////////////////////////////////// -//! FolderWatchCallbackEx -/*! Class implements a more complex filtering that can optionally filter for file - *! extension and call different callback for different kinds of file changes - *! generated from a root watch. - *! Notes: - *! - empty extension "" catches all file changes - *! - extension should not include the leading "." - * */ -class FolderWatchCallbackEx - : public FolderWatchBase -{ - Q_OBJECT - -public: - FolderWatchCallbackEx(const QString strFolder, const QString extension, bool bWatchSubtree) - : FolderWatchBase(strFolder, bWatchSubtree) - , m_extension(extension) - { - } - - QString m_extension; - - //on file change call the change callback if passes extension then route - //to specific file action type callback - virtual void OnFileChange(const FileChangeInfo& info) - { - //if they set an extension to watch for only let matching extensions through - QFileInfo fileInfo(info.m_filePath); - - if (!m_watchSubtree) - { - // filter out subtrees too. - QStringRef subRef = info.m_filePath.rightRef(info.m_filePath.length() - m_folder.length()); - if ((subRef.indexOf('/') != -1) || (subRef.indexOf('\\') != -1)) - { - return; // filter this out. - } - - // we don't care about subdirs. IsDir is more expensive so we do it after the above filter. - if (fileInfo.isDir()) - { - return; - } - } - - if (m_extension.isEmpty() || fileInfo.completeSuffix().compare(m_extension, Qt::CaseInsensitive) == 0) - { - if (info.m_action & FileAction::FileAction_Any) - { - Q_EMIT fileChange(info); - } - - if (info.m_action & FileAction::FileAction_Added) - { - Q_EMIT fileAdded(info.m_filePath); - } - - if (info.m_action & FileAction::FileAction_Removed) - { - Q_EMIT fileRemoved(info.m_filePath); - } - - if (info.m_action & FileAction::FileAction_Modified) - { - Q_EMIT fileModified(info.m_filePath); - } - } - } - -Q_SIGNALS: - void fileChange(FileChangeInfo info); - void fileAdded(QString filePath); - void fileRemoved(QString filePath); - void fileModified(QString filePath); -}; - -#endif//FILEWATCHERAPI_H diff --git a/Code/Tools/AssetProcessor/native/InternalBuilders/SettingsRegistryBuilder.cpp b/Code/Tools/AssetProcessor/native/InternalBuilders/SettingsRegistryBuilder.cpp index 7823a0582f..305578219f 100644 --- a/Code/Tools/AssetProcessor/native/InternalBuilders/SettingsRegistryBuilder.cpp +++ b/Code/Tools/AssetProcessor/native/InternalBuilders/SettingsRegistryBuilder.cpp @@ -431,8 +431,9 @@ namespace AssetProcessor } file.Close(); - AZ::u32 hashedSpecialization = static_cast(AZStd::hash{}(specializationString)); - AZ_Assert(hashedSpecialization != 0, "Product ID generation failed for specialization %.*s. This can result in a product ID collision with other builders for this asset.", + const AZ::u32 hashedSpecialization = static_cast(AZStd::hash{}(specializationString)); + AZ_Assert(hashedSpecialization != 0, "Product ID generation failed for specialization %.*s." + " This can result in a product ID collision with other builders for this asset.", AZ_STRING_ARG(specializationString)); response.m_outputProducts.emplace_back(outputPath, m_assetType, hashedSpecialization); response.m_outputProducts.back().m_dependenciesHandled = true; diff --git a/Code/Tools/AssetProcessor/native/assetprocessor.h b/Code/Tools/AssetProcessor/native/assetprocessor.h index 1c13eca200..83eb0464a5 100644 --- a/Code/Tools/AssetProcessor/native/assetprocessor.h +++ b/Code/Tools/AssetProcessor/native/assetprocessor.h @@ -85,7 +85,7 @@ namespace AssetProcessor enum AssetCatalogStatus { - RequiresSaving, + RequiresSaving, UpToDate }; @@ -213,11 +213,11 @@ namespace AssetProcessor bool m_critical = false; int m_priority = -1; - // indicates whether we need to check the server first for the outputs of this job + // indicates whether we need to check the server first for the outputs of this job // before we start processing locally bool m_checkServer = false; - - // Indicates whether this job needs to be processed irrespective of whether its fingerprint got modified or not. + + // Indicates whether this job needs to be processed irrespective of whether its fingerprint got modified or not. bool m_autoProcessJob = false; AssetBuilderSDK::AssetBuilderDesc m_assetBuilderDesc; @@ -251,9 +251,9 @@ namespace AssetProcessor JobDetails() = default; }; - - //! JobDesc struct is used for identifying jobs that need to be processed again - //! because of job dependency declared on them by other jobs + + //! JobDesc struct is used for identifying jobs that need to be processed again + //! because of job dependency declared on them by other jobs struct JobDesc { AZStd::string m_databaseSourceName; @@ -283,7 +283,7 @@ namespace AssetProcessor } }; - //! JobIndentifier is an internal structure that store all the data that can uniquely identify a job + //! JobIndentifier is an internal structure that store all the data that can uniquely identify a job struct JobIndentifier { JobDesc m_jobDesc; diff --git a/Code/Tools/AssetProcessor/native/resourcecompiler/RCBuilder.cpp b/Code/Tools/AssetProcessor/native/resourcecompiler/RCBuilder.cpp index 27210685fc..c463f2320e 100644 --- a/Code/Tools/AssetProcessor/native/resourcecompiler/RCBuilder.cpp +++ b/Code/Tools/AssetProcessor/native/resourcecompiler/RCBuilder.cpp @@ -20,7 +20,6 @@ #include #include -#include #include #include @@ -31,7 +30,6 @@ #include "native/utilities/assetUtils.h" #include "native/utilities/AssetBuilderInfo.h" -#include "native/utilities/CommunicatorTracePrinter.h" #include diff --git a/Code/Tools/AssetProcessor/native/resourcecompiler/rcjoblistmodel.cpp b/Code/Tools/AssetProcessor/native/resourcecompiler/rcjoblistmodel.cpp index a64e3bf5b9..1fddf15547 100644 --- a/Code/Tools/AssetProcessor/native/resourcecompiler/rcjoblistmodel.cpp +++ b/Code/Tools/AssetProcessor/native/resourcecompiler/rcjoblistmodel.cpp @@ -177,11 +177,9 @@ namespace AssetProcessor AZ_TracePrintf(AssetProcessor::DebugChannel, "JobTrace AddNewJob(%i %s,%s,%s)\n", rcJob, rcJob->GetInputFileAbsolutePath().toUtf8().constData(), rcJob->GetPlatformInfo().m_identifier.c_str(), rcJob->GetJobKey().toUtf8().constData()); #endif - bool isPending = false; if (rcJob->GetState() == RCJob::pending) { m_jobsInQueueLookup.insert(rcJob->GetElementID(), rcJob); - isPending = true; } endInsertRows(); } diff --git a/Code/Tools/AssetProcessor/native/shadercompiler/shadercompilerManager.cpp b/Code/Tools/AssetProcessor/native/shadercompiler/shadercompilerManager.cpp deleted file mode 100644 index 47b2ca9047..0000000000 --- a/Code/Tools/AssetProcessor/native/shadercompiler/shadercompilerManager.cpp +++ /dev/null @@ -1,162 +0,0 @@ -/* - * Copyright (c) Contributors to the Open 3D Engine Project. - * For complete copyright and license terms please see the LICENSE at the root of this distribution. - * - * SPDX-License-Identifier: Apache-2.0 OR MIT - * - */ -#include "shadercompilerManager.h" -#include "shadercompilerjob.h" - -#include - -#include "native/utilities/assetUtils.h" - -ShaderCompilerManager::ShaderCompilerManager(QObject* parent) - : QObject(parent) - , m_isUnitTesting(false) - , m_numberOfJobsStarted(0) - , m_numberOfJobsEnded(0) - , m_numberOfErrors(0) -{ -} - -ShaderCompilerManager::~ShaderCompilerManager() -{ -} - -void ShaderCompilerManager::process(unsigned int connID, unsigned int type, unsigned int serial, QByteArray payload) -{ - (void)type; - (void)serial; - Q_ASSERT(AssetUtilities::ComputeCRC32Lowercase("ShaderCompilerProxyRequest") == type); - decodeShaderCompilerRequest(connID, payload); -} - -void ShaderCompilerManager::decodeShaderCompilerRequest(unsigned int connID, QByteArray payload) -{ - if (payload.length() < sizeof(unsigned int) + sizeof(unsigned int) + 2 + sizeof(unsigned short)) - { - QString error = "Payload size is too small"; - AZ_Warning(AssetProcessor::ConsoleChannel, false, error.toUtf8().data()); - emit sendErrorMessage(error); - return; - } - - unsigned char* data_end = reinterpret_cast(payload.data() + payload.size()); - unsigned int* requestId = reinterpret_cast(data_end - sizeof(unsigned int)); - unsigned int* serverListSizePtr = reinterpret_cast(data_end - sizeof(unsigned int) - sizeof(unsigned int)); - unsigned short* serverPortPtr = reinterpret_cast(data_end - sizeof(unsigned int) - sizeof(unsigned int) - sizeof(unsigned short)); - - ShaderCompilerRequestMessage msg; - QString error; - - msg.requestId = *requestId; - msg.serverListSize = *serverListSizePtr; - msg.serverPort = *serverPortPtr; - if ((msg.serverListSize <= 0) || (msg.serverListSize > 100000)) - { - error = "Shader Compiler Server List is wrong"; - AZ_Warning(AssetProcessor::ConsoleChannel, false, error.toUtf8().data()); - emit sendErrorMessage(error); - return; - } - if (msg.serverPort == 0) - { - error = "Shader Compiler port is wrong"; - AZ_Warning(AssetProcessor::ConsoleChannel, false, error.toUtf8().data()); - emit sendErrorMessage(error); - return; - } - - char* position_of_first_null = reinterpret_cast(serverPortPtr) - 1;// -1 for null - if ((*position_of_first_null) != '\0') - { - error = "Shader Compiler payload is corrupt,position is not null"; - AZ_Warning(AssetProcessor::ConsoleChannel, false, error.toUtf8().data()); - emit sendErrorMessage(error); - return; - } - char* beginning_of_serverList = position_of_first_null - msg.serverListSize; - char* position_of_second_null = beginning_of_serverList - 1;//-1 for null - - if ((*position_of_second_null) != '\0') - { - error = "Shader Compiler payload is corrupt,position is not null"; - AZ_Warning(AssetProcessor::ConsoleChannel, false, error.toUtf8().data()); - emit sendErrorMessage(error); - return; - } - - unsigned int originalPayloadSize = static_cast(payload.size()) - sizeof(unsigned int) - sizeof(unsigned int) - sizeof(unsigned short) - static_cast(msg.serverListSize) - 2; - msg.serverList = beginning_of_serverList; - msg.originalPayload.insert(0, payload.data(), static_cast(originalPayloadSize)); - ShaderCompilerJob* shaderCompilerJob = new ShaderCompilerJob(); - shaderCompilerJob->initialize(this, msg); - shaderCompilerJob->setIsUnitTesting(m_isUnitTesting); - m_shaderCompilerJobMap[msg.requestId] = connID; - shaderCompilerJob->setAutoDelete(true); - QThreadPool* threadPool = QThreadPool::globalInstance(); - threadPool->start(shaderCompilerJob); -} - -void ShaderCompilerManager::OnShaderCompilerJobComplete(QByteArray payload, unsigned int requestId) -{ - auto iterator = m_shaderCompilerJobMap.find(requestId); - if (iterator != m_shaderCompilerJobMap.end()) - { - sendResponse(iterator.value(), AssetUtilities::ComputeCRC32Lowercase("ShaderCompilerProxyResponse"), 0, payload); - } - else - { - QString error = "Shader Compiler cannot find the connection id"; - AZ_Warning(AssetProcessor::ConsoleChannel, false, error.toUtf8().data()); - emit sendErrorMessage(error); - } -} - -void ShaderCompilerManager::sendResponse(unsigned int connId, unsigned int /*type*/, unsigned int /*serial*/, QByteArray payload) -{ - EBUS_EVENT_ID(connId, AssetProcessor::ConnectionBus, SendRaw, AssetUtilities::ComputeCRC32Lowercase("ShaderCompilerProxyResponse"), 0, payload); -} - -void ShaderCompilerManager::shaderCompilerError(QString errorMessage, QString server, QString timestamp, QString payload) -{ - m_numberOfErrors++; - emit numberOfErrorsChanged(); - emit sendErrorMessageFromShaderJob(errorMessage, server, timestamp, payload); -} - -void ShaderCompilerManager::jobStarted() -{ - m_numberOfJobsStarted++; - emit numberOfJobsStartedChanged(); -} - -void ShaderCompilerManager::jobEnded() -{ - m_numberOfJobsEnded++; - numberOfJobsEndedChanged(); -} - - -void ShaderCompilerManager::setIsUnitTesting(bool isUnitTesting) -{ - m_isUnitTesting = isUnitTesting; -} - -int ShaderCompilerManager::numberOfJobsStarted() -{ - return m_numberOfJobsStarted; -} - -int ShaderCompilerManager::numberOfJobsEnded() -{ - return m_numberOfJobsEnded; -} - -int ShaderCompilerManager::numberOfErrors() -{ - return m_numberOfErrors; -} - diff --git a/Code/Tools/AssetProcessor/native/shadercompiler/shadercompilerManager.h b/Code/Tools/AssetProcessor/native/shadercompiler/shadercompilerManager.h deleted file mode 100644 index cb51ee98f6..0000000000 --- a/Code/Tools/AssetProcessor/native/shadercompiler/shadercompilerManager.h +++ /dev/null @@ -1,67 +0,0 @@ -/* - * Copyright (c) Contributors to the Open 3D Engine Project. - * For complete copyright and license terms please see the LICENSE at the root of this distribution. - * - * SPDX-License-Identifier: Apache-2.0 OR MIT - * - */ -#ifndef SHADERCOMPILERMANAGER_H -#define SHADERCOMPILERMANAGER_H - -#if !defined(Q_MOC_RUN) -#include -#include -#include -#include -#endif - -typedef QHash ShaderCompilerJobMap; - -/** - * The Shader Compiler Manager class receive a shader compile request - * and starts a shader compiler job for it - */ -class ShaderCompilerManager - : public QObject -{ - Q_OBJECT - Q_PROPERTY(int numberOfJobsStarted READ numberOfJobsStarted NOTIFY numberOfJobsStartedChanged) - Q_PROPERTY(int numberOfJobsEnded READ numberOfJobsEnded NOTIFY numberOfJobsEndedChanged) - Q_PROPERTY(int numberOfErrors READ numberOfErrors NOTIFY numberOfErrorsChanged) -public: - - explicit ShaderCompilerManager(QObject* parent = 0); - virtual ~ShaderCompilerManager(); - - void process(unsigned int connID, unsigned int type, unsigned int serial, QByteArray payload); - void decodeShaderCompilerRequest(unsigned int connID, QByteArray payload); - void setIsUnitTesting(bool isUnitTesting); - int numberOfJobsStarted(); - int numberOfJobsEnded(); - int numberOfErrors(); - virtual void sendResponse(unsigned int connId, unsigned int type, unsigned int serial, QByteArray payload); - -signals: - void sendErrorMessage(QString errorMessage); - void sendErrorMessageFromShaderJob(QString errorMessage, QString server, QString timestamp, QString payload); - void numberOfJobsStartedChanged(); - void numberOfJobsEndedChanged(); - void numberOfErrorsChanged(); - - -public slots: - void OnShaderCompilerJobComplete(QByteArray payload, unsigned int requestId); - void shaderCompilerError(QString errorMessage, QString server, QString timestamp, QString payload); - void jobStarted(); - void jobEnded(); - - -private: - ShaderCompilerJobMap m_shaderCompilerJobMap; - bool m_isUnitTesting; - int m_numberOfJobsStarted; - int m_numberOfJobsEnded; - int m_numberOfErrors; -}; - -#endif // SHADERCOMPILERMANAGER_H diff --git a/Code/Tools/AssetProcessor/native/shadercompiler/shadercompilerMessages.h b/Code/Tools/AssetProcessor/native/shadercompiler/shadercompilerMessages.h deleted file mode 100644 index be90a7b3e5..0000000000 --- a/Code/Tools/AssetProcessor/native/shadercompiler/shadercompilerMessages.h +++ /dev/null @@ -1,24 +0,0 @@ -/* - * Copyright (c) Contributors to the Open 3D Engine Project. - * For complete copyright and license terms please see the LICENSE at the root of this distribution. - * - * SPDX-License-Identifier: Apache-2.0 OR MIT - * - */ -#ifndef SHADERCOMPILERMESSAGES_H -#define SHADERCOMPILERMESSAGES_H - -#include -#include - -struct ShaderCompilerRequestMessage -{ - QByteArray originalPayload; - QString serverList; - unsigned short serverPort; - unsigned int serverListSize; - unsigned int requestId; -}; - -#endif //SHADERCOMPILERMESSAGES_H - diff --git a/Code/Tools/AssetProcessor/native/shadercompiler/shadercompilerModel.cpp b/Code/Tools/AssetProcessor/native/shadercompiler/shadercompilerModel.cpp deleted file mode 100644 index 50b5254e79..0000000000 --- a/Code/Tools/AssetProcessor/native/shadercompiler/shadercompilerModel.cpp +++ /dev/null @@ -1,150 +0,0 @@ -/* - * Copyright (c) Contributors to the Open 3D Engine Project. - * For complete copyright and license terms please see the LICENSE at the root of this distribution. - * - * SPDX-License-Identifier: Apache-2.0 OR MIT - * - */ -#include "shadercompilerModel.h" - -namespace -{ - ShaderCompilerModel* s_singleton = nullptr; -} - -ShaderCompilerModel::ShaderCompilerModel(QObject* parent) - : QAbstractItemModel(parent) -{ - Q_ASSERT(s_singleton == nullptr); - s_singleton = this; -} - -ShaderCompilerModel::~ShaderCompilerModel() -{ - s_singleton = nullptr; -} - -ShaderCompilerModel* ShaderCompilerModel::Get() -{ - return s_singleton; -} - -QVariant ShaderCompilerModel::data(const QModelIndex& index, int role) const -{ - if (!index.isValid()) - { - return QVariant(); - } - - int row = index.row(); - - if (row < 0) - { - return QVariant(); - } - if (row >= m_shaderErrorInfoList.count()) - { - return QVariant(); - } - - switch (role) - { - case TimeStampRole: - return m_shaderErrorInfoList[row].m_shaderTimestamp; - case ServerRole: - return m_shaderErrorInfoList[row].m_shaderServerName; - case ErrorRole: - return m_shaderErrorInfoList[row].m_shaderError; - case OriginalRequestRole: - return m_shaderErrorInfoList[row].m_shaderOriginalPayload; - - case Qt::DisplayRole: - switch (index.column()) - { - case ColumnTimeStamp: - return m_shaderErrorInfoList[row].m_shaderTimestamp; - case ColumnServer: - return m_shaderErrorInfoList[row].m_shaderServerName; - case ColumnError: - return m_shaderErrorInfoList[row].m_shaderServerName; - } - } - - return QVariant(); -} - - -Qt::ItemFlags ShaderCompilerModel::flags(const QModelIndex& index) const -{ - (void)index; - return Qt::ItemIsSelectable | Qt::ItemIsEnabled; -} - - -int ShaderCompilerModel::rowCount(const QModelIndex& parent) const -{ - (void)parent; - return m_shaderErrorInfoList.count(); -} - - -QModelIndex ShaderCompilerModel::parent(const QModelIndex&) const -{ - return QModelIndex(); -} - - -QModelIndex ShaderCompilerModel::index(int row, int column, const QModelIndex& parent) const -{ - if (row >= rowCount(parent) || column >= columnCount(parent)) - { - return QModelIndex(); - } - return createIndex(row, column); -} - - -int ShaderCompilerModel::columnCount(const QModelIndex& parent) const -{ - return parent.isValid() ? 0 : Column::Max; -} - - -QVariant ShaderCompilerModel::headerData(int section, Qt::Orientation orientation, int role) const -{ - if (orientation == Qt::Horizontal && role == Qt::DisplayRole) - { - switch (section) - { - case ColumnTimeStamp: - return tr("Time Stamp"); - case ColumnServer: - return tr("Server"); - case ColumnError: - return tr("Error"); - default: - break; - } - } - - return QAbstractItemModel::headerData(section, orientation, role); -} - - -QHash ShaderCompilerModel::roleNames() const -{ - QHash result; - result[TimeStampRole] = "timestamp"; - result[ServerRole] = "server"; - result[ErrorRole] = "error"; - result[OriginalRequestRole] = "originalRequest"; - return result; -} -void ShaderCompilerModel::addShaderErrorInfoEntry(QString errorMessage, QString timestamp, QString payload, QString server) -{ - ShaderCompilerErrorInfo shaderCompileErrorInfo(errorMessage, timestamp, payload, server); - beginInsertRows(QModelIndex(), m_shaderErrorInfoList.size(), m_shaderErrorInfoList.size()); - m_shaderErrorInfoList.append(shaderCompileErrorInfo); - endInsertRows(); -} - diff --git a/Code/Tools/AssetProcessor/native/shadercompiler/shadercompilerModel.h b/Code/Tools/AssetProcessor/native/shadercompiler/shadercompilerModel.h deleted file mode 100644 index 464ca9b5b0..0000000000 --- a/Code/Tools/AssetProcessor/native/shadercompiler/shadercompilerModel.h +++ /dev/null @@ -1,93 +0,0 @@ -/* - * Copyright (c) Contributors to the Open 3D Engine Project. - * For complete copyright and license terms please see the LICENSE at the root of this distribution. - * - * SPDX-License-Identifier: Apache-2.0 OR MIT - * - */ -#ifndef SHADERCOMPILERMODEL_H -#define SHADERCOMPILERMODEL_H - -#if !defined(Q_MOC_RUN) -#include -#include -#include -#include -#include -#include -#endif - -class QModelIndex; -class QObject; - -struct ShaderCompilerErrorInfo -{ - QString m_shaderError; - QString m_shaderTimestamp; - QString m_shaderOriginalPayload; - QString m_shaderServerName; - - ShaderCompilerErrorInfo(QString shaderError, QString shaderTimestamp, QString shaderOriginalPayload, QString shaderServerName) - : m_shaderError(shaderError) - , m_shaderTimestamp(shaderTimestamp) - , m_shaderOriginalPayload(shaderOriginalPayload) - , m_shaderServerName(shaderServerName) - { - } -}; - -/** The Shader Compiler model is responsible for capturing error requests - */ -class ShaderCompilerModel - : public QAbstractItemModel -{ - Q_OBJECT -public: - - enum DataRoles - { - TimeStampRole = Qt::UserRole + 1, - ServerRole, - ErrorRole, - OriginalRequestRole, - }; - - enum Column - { - ColumnTimeStamp, - ColumnServer, - ColumnError, - Max - }; - - /// standard Qt constructor - explicit ShaderCompilerModel(QObject* parent = 0); - virtual ~ShaderCompilerModel(); - - // singleton pattern - static ShaderCompilerModel* Get(); - - - /// QAbstractListModel interface - QModelIndex parent(const QModelIndex&) const override; - QModelIndex index(int row, int column, const QModelIndex& parent) const override; - int columnCount(const QModelIndex&) const override; - virtual int rowCount(const QModelIndex& parent) const override; - QVariant headerData(int section, Qt::Orientation orientation, int role) const override; - virtual QVariant data(const QModelIndex& index, int role) const override; - virtual QHash roleNames() const override; - virtual Qt::ItemFlags flags(const QModelIndex& index) const override; - -public slots: - void addShaderErrorInfoEntry(QString errorMessage, QString timestamp, QString payload, QString server); - -private: - - QList m_shaderErrorInfoList; -}; - - -#endif // SHADERCOMPILERMODEL_H - - - diff --git a/Code/Tools/AssetProcessor/native/shadercompiler/shadercompilerjob.cpp b/Code/Tools/AssetProcessor/native/shadercompiler/shadercompilerjob.cpp deleted file mode 100644 index 58f9244616..0000000000 --- a/Code/Tools/AssetProcessor/native/shadercompiler/shadercompilerjob.cpp +++ /dev/null @@ -1,194 +0,0 @@ -/* - * Copyright (c) Contributors to the Open 3D Engine Project. - * For complete copyright and license terms please see the LICENSE at the root of this distribution. - * - * SPDX-License-Identifier: Apache-2.0 OR MIT - * - */ -#include "shadercompilerjob.h" -#include "native/assetprocessor.h" - -#include - -ShaderCompilerJob::ShaderCompilerJob() - : m_isUnitTesting(false) - , m_manager(nullptr) -{ -} - -ShaderCompilerJob::~ShaderCompilerJob() -{ - m_manager = nullptr; -} - -ShaderCompilerRequestMessage ShaderCompilerJob::ShaderCompilerMessage() const -{ - return m_ShaderCompilerMessage; -} - -void ShaderCompilerJob::initialize(QObject* pManager, const ShaderCompilerRequestMessage& ShaderCompilerMessage) -{ - m_manager = pManager; - m_ShaderCompilerMessage = ShaderCompilerMessage; -} - -QString ShaderCompilerJob::getServerAddress() -{ - if (isServerListEmpty()) - { - return QString(); - } - - QString serverAddress; - if (!m_ShaderCompilerMessage.serverList.contains(",")) - { - serverAddress = m_ShaderCompilerMessage.serverList; - m_ShaderCompilerMessage.serverList.clear(); - return serverAddress; - } - - QStringList serverList = m_ShaderCompilerMessage.serverList.split(","); - serverAddress = serverList.takeAt(0); - m_ShaderCompilerMessage.serverList = serverList.join(","); - return serverAddress; -} - -bool ShaderCompilerJob::isServerListEmpty() -{ - return m_ShaderCompilerMessage.serverList.isEmpty(); -} - -bool ShaderCompilerJob::attemptDelivery(QString serverAddress, QByteArray& payload) -{ - QTcpSocket socket; - QString error; - int waitingTime = 8000; // 8 sec timeout for sending. - int jobCompileMaxTime = 1000 * 60; // 60 sec timeout for compilation - if (m_isUnitTesting) - { - waitingTime = 500; - jobCompileMaxTime = 500; - } - - socket.connectToHost(serverAddress, m_ShaderCompilerMessage.serverPort, QIODevice::ReadWrite); - - if (socket.waitForConnected(waitingTime)) - { - qint64 bytesWritten = 0; - qint64 payloadSize = static_cast(m_ShaderCompilerMessage.originalPayload.size()); - // send payload size to server - while (bytesWritten != sizeof(qint64)) - { - qint64 currentWrite = socket.write(reinterpret_cast(&payloadSize) + bytesWritten, - sizeof(qint64) - bytesWritten); - if (currentWrite == -1) - { - //It is important to note that we are only outputting the error to debugchannel only here because - //we are forwarding these error messages upstream to the manager,who will take the appropriate action - error = "Connection Lost:Unable to send data"; - AZ_TracePrintf(AssetProcessor::DebugChannel, error.toUtf8().data()); - QMetaObject::invokeMethod(m_manager, "shaderCompilerError", Qt::QueuedConnection, Q_ARG(QString, error), Q_ARG(QString, QDateTime::currentDateTime().toString()), Q_ARG(QString, QString(m_ShaderCompilerMessage.originalPayload)), Q_ARG(QString, serverAddress)); - return false; - } - socket.flush(); - bytesWritten += currentWrite; - } - bytesWritten = 0; - //send actual payload to server - while (bytesWritten != m_ShaderCompilerMessage.originalPayload.size()) - { - qint64 currentWrite = socket.write(m_ShaderCompilerMessage.originalPayload.data() + bytesWritten, - m_ShaderCompilerMessage.originalPayload.size() - bytesWritten); - if (currentWrite == -1) - { - error = "Connection Lost:Unable to send data"; - AZ_TracePrintf(AssetProcessor::DebugChannel, error.toUtf8().data()); - QMetaObject::invokeMethod(m_manager, "shaderCompilerError", Qt::QueuedConnection, Q_ARG(QString, error), Q_ARG(QString, QDateTime::currentDateTime().toString()), Q_ARG(QString, QString(m_ShaderCompilerMessage.originalPayload)), Q_ARG(QString, serverAddress)); - } - socket.flush(); - bytesWritten += currentWrite; - } - } - else - { - error = "Unable to connect to IP Address " + serverAddress; - AZ_TracePrintf(AssetProcessor::DebugChannel, error.toUtf8().data()); - QMetaObject::invokeMethod(m_manager, "shaderCompilerError", Qt::QueuedConnection, Q_ARG(QString, error), Q_ARG(QString, QDateTime::currentDateTime().toString()), Q_ARG(QString, QString(m_ShaderCompilerMessage.originalPayload)), Q_ARG(QString, serverAddress)); - return false; - } - - unsigned int expectedBytes = sizeof(unsigned int) + sizeof(qint8); - unsigned int bytesReadTotal = 0; - unsigned int messageSize = 0; - bool isMessageSizeKnown = false; - //read the entire payload - while ((bytesReadTotal < expectedBytes + messageSize)) - { - if (socket.bytesAvailable() == 0) - { - if (!socket.waitForReadyRead(jobCompileMaxTime)) - { - error = "Remote IP is taking too long to respond: " + serverAddress; - AZ_TracePrintf(AssetProcessor::DebugChannel, error.toUtf8().data()); - QMetaObject::invokeMethod(m_manager, "shaderCompilerError", Qt::QueuedConnection, Q_ARG(QString, error), Q_ARG(QString, QDateTime::currentDateTime().toString()), Q_ARG(QString, QString(m_ShaderCompilerMessage.originalPayload)), Q_ARG(QString, serverAddress)); - payload.clear(); - return false; - } - } - - qint64 bytesAvailable = socket.bytesAvailable(); - - if (bytesAvailable >= expectedBytes && !isMessageSizeKnown) - { - socket.peek(reinterpret_cast(&messageSize), sizeof(unsigned int)); - payload.resize(expectedBytes + messageSize); - isMessageSizeKnown = true; - } - - if (bytesAvailable > 0) - { - qint64 bytesRead = socket.read(payload.data() + bytesReadTotal, bytesAvailable); - - if (bytesRead <= 0) - { - error = "Connection closed by remote IP Address " + serverAddress; - AZ_TracePrintf(AssetProcessor::DebugChannel, error.toUtf8().data()); - QMetaObject::invokeMethod(m_manager, "shaderCompilerError", Qt::QueuedConnection, Q_ARG(QString, error), Q_ARG(QString, QDateTime::currentDateTime().toString()), Q_ARG(QString, QString(m_ShaderCompilerMessage.originalPayload)), Q_ARG(QString, serverAddress)); - payload.clear(); - return false; - } - - bytesReadTotal = aznumeric_cast(bytesReadTotal + bytesRead); - } - } - - return true; // payload successfully send -} - -void ShaderCompilerJob::run() -{ - QMetaObject::invokeMethod(m_manager, "jobStarted", Qt::QueuedConnection); - QByteArray payload; - //until server list is empty, keep trying - while (!isServerListEmpty()) - { - QString serverAddress = getServerAddress(); - //attempt to send payload - if (attemptDelivery(serverAddress, payload)) - { - break; - } - } - //we are appending request id at the end of every payload, - //therefore in the case of any errors also - //we will be sending atleast four bytes to the game - payload.append(reinterpret_cast(&m_ShaderCompilerMessage.requestId), sizeof(unsigned int)); - QMetaObject::invokeMethod(m_manager, "OnShaderCompilerJobComplete", Qt::QueuedConnection, Q_ARG(QByteArray, payload), Q_ARG(unsigned int, m_ShaderCompilerMessage.requestId)); - QMetaObject::invokeMethod(m_manager, "jobEnded", Qt::QueuedConnection); -} - - -void ShaderCompilerJob::setIsUnitTesting(bool isUnitTesting) -{ - m_isUnitTesting = isUnitTesting; -} diff --git a/Code/Tools/AssetProcessor/native/shadercompiler/shadercompilerjob.h b/Code/Tools/AssetProcessor/native/shadercompiler/shadercompilerjob.h deleted file mode 100644 index 1d72365331..0000000000 --- a/Code/Tools/AssetProcessor/native/shadercompiler/shadercompilerjob.h +++ /dev/null @@ -1,44 +0,0 @@ -/* - * Copyright (c) Contributors to the Open 3D Engine Project. - * For complete copyright and license terms please see the LICENSE at the root of this distribution. - * - * SPDX-License-Identifier: Apache-2.0 OR MIT - * - */ -#ifndef SHADERCOMPILERJOB_H -#define SHADERCOMPILERJOB_H - -#include -#include "shadercompilerMessages.h" - -class QByteArray; -class QObject; - -/** - * This class is responsible for connecting to the shader compiler server - * and getting back the response to the shader compiler manager - */ -class ShaderCompilerJob - : public QRunnable -{ -public: - - explicit ShaderCompilerJob(); - virtual ~ShaderCompilerJob(); - ShaderCompilerRequestMessage ShaderCompilerMessage() const; - void initialize(QObject* pManager, const ShaderCompilerRequestMessage& ShaderCompilerMessage); - QString getServerAddress(); - bool isServerListEmpty(); - virtual void run() override; - - void setIsUnitTesting(bool isUnitTesting); - - bool attemptDelivery(QString serverAddress, QByteArray& payload); - -private: - ShaderCompilerRequestMessage m_ShaderCompilerMessage; - QObject* m_manager; - bool m_isUnitTesting; -}; - -#endif // SHADERCOMPILERJOB_H diff --git a/Code/Tools/AssetProcessor/native/tests/AssetCatalog/AssetCatalogUnitTests.cpp b/Code/Tools/AssetProcessor/native/tests/AssetCatalog/AssetCatalogUnitTests.cpp index 46f801223a..50d2cea761 100644 --- a/Code/Tools/AssetProcessor/native/tests/AssetCatalog/AssetCatalogUnitTests.cpp +++ b/Code/Tools/AssetProcessor/native/tests/AssetCatalog/AssetCatalogUnitTests.cpp @@ -128,7 +128,9 @@ namespace AssetProcessor settingsRegistry->Set(cacheRootKey, m_data->m_temporarySourceDir.absoluteFilePath("Cache").toUtf8().constData()); auto projectPathKey = AZ::SettingsRegistryInterface::FixedValueString(AZ::SettingsRegistryMergeUtils::BootstrapSettingsRootKey) + "/project_path"; - settingsRegistry->Set(projectPathKey, "AutomatedTesting"); + AZ::IO::FixedMaxPath enginePath; + settingsRegistry->Get(enginePath.Native(), AZ::SettingsRegistryMergeUtils::FilePathKey_EngineRootFolder); + settingsRegistry->Set(projectPathKey, (enginePath / "AutomatedTesting").Native()); AZ::SettingsRegistryMergeUtils::MergeSettingsToRegistry_AddRuntimeFilePaths(*settingsRegistry); AssetUtilities::ComputeProjectCacheRoot(m_data->m_cacheRootDir); QString normalizedCacheRoot = AssetUtilities::NormalizeDirectoryPath(m_data->m_cacheRootDir.absolutePath()); diff --git a/Code/Tools/AssetProcessor/native/tests/AssetProcessorMessagesTests.cpp b/Code/Tools/AssetProcessor/native/tests/AssetProcessorMessagesTests.cpp index 516f6beb3c..6a0da96151 100644 --- a/Code/Tools/AssetProcessor/native/tests/AssetProcessorMessagesTests.cpp +++ b/Code/Tools/AssetProcessor/native/tests/AssetProcessorMessagesTests.cpp @@ -107,12 +107,13 @@ namespace AssetProcessorMessagesTests AZ::SettingsRegistryMergeUtils::BootstrapSettingsRootKey }; constexpr AZ::SettingsRegistryInterface::FixedValueString projectPathKey{ bootstrapKey + "/project_path" }; - registry->Set(projectPathKey, "AutomatedTesting"); + AZ::IO::FixedMaxPath enginePath; + registry->Get(enginePath.Native(), AZ::SettingsRegistryMergeUtils::FilePathKey_EngineRootFolder); + registry->Set(projectPathKey, (enginePath / "AutomatedTesting").Native()); AZ::SettingsRegistryMergeUtils::MergeSettingsToRegistry_AddRuntimeFilePaths(*registry); // Force the branch token into settings registry before starting the application manager. // This avoids writing the asset_processor.setreg file which can cause fileIO errors. - const AZ::IO::FixedMaxPathString enginePath = AZ::Utils::GetEnginePath(); constexpr AZ::SettingsRegistryInterface::FixedValueString branchTokenKey{ bootstrapKey + "/assetProcessor_branch_token" }; AZStd::string token; AZ::StringFunc::AssetPath::CalculateBranchToken(enginePath.c_str(), token); diff --git a/Code/Tools/AssetProcessor/native/tests/AssetProcessorTest.cpp b/Code/Tools/AssetProcessor/native/tests/AssetProcessorTest.cpp index 3249b7e396..e2b28c1260 100644 --- a/Code/Tools/AssetProcessor/native/tests/AssetProcessorTest.cpp +++ b/Code/Tools/AssetProcessor/native/tests/AssetProcessorTest.cpp @@ -10,7 +10,6 @@ #include #include -#include #include #include "BaseAssetProcessorTest.h" @@ -19,8 +18,6 @@ #include -AZ_UNIT_TEST_HOOK(new BaseAssetProcessorTestEnvironment) - namespace AssetProcessor { class UnitTestAppManager : public BatchApplicationManager @@ -36,7 +33,7 @@ namespace AssetProcessor { return false; } - + // tests which use the builder bus plug in their own mock version, so disconnect ours. AssetProcessor::AssetBuilderInfoBus::Handler::BusDisconnect(); @@ -55,14 +52,12 @@ namespace AssetProcessor }; class LegacyTestAdapter : public AssetProcessorTest, - public ::testing::WithParamInterface, - public AZ::IO::FileIOEventBus::Handler + public ::testing::WithParamInterface { void SetUp() override { AssetProcessorTest::SetUp(); - AZ::IO::FileIOEventBus::Handler::BusConnect(); - + static int numParams = 1; static char processName[] = {"AssetProcessorBatch"}; static char* namePtr = &processName[0]; @@ -71,12 +66,13 @@ namespace AssetProcessor auto registry = AZ::SettingsRegistry::Get(); auto bootstrapKey = AZ::SettingsRegistryInterface::FixedValueString(AZ::SettingsRegistryMergeUtils::BootstrapSettingsRootKey); auto projectPathKey = bootstrapKey + "/project_path"; - registry->Set(projectPathKey, "AutomatedTesting"); + AZ::IO::FixedMaxPath enginePath; + registry->Get(enginePath.Native(), AZ::SettingsRegistryMergeUtils::FilePathKey_EngineRootFolder); + registry->Set(projectPathKey, (enginePath / "AutomatedTesting").Native()); AZ::SettingsRegistryMergeUtils::MergeSettingsToRegistry_AddRuntimeFilePaths(*registry); // Forcing the branch token into settings registry before starting the application manager. // This avoids writing the asset_processor.setreg file which can cause fileIO errors. - AZ::IO::FixedMaxPathString enginePath = AZ::Utils::GetEnginePath(); auto branchTokenKey = bootstrapKey + "/assetProcessor_branch_token"; AZStd::string token; AzFramework::StringFunc::AssetPath::CalculateBranchToken(enginePath.c_str(), token); @@ -90,18 +86,9 @@ namespace AssetProcessor void TearDown() override { m_application.reset(); - AZ::IO::FileIOEventBus::Handler::BusDisconnect(); AssetProcessorTest::TearDown(); } - void OnError( - [[maybe_unused]] const AZ::IO::SystemFile* file, - [[maybe_unused]] const char* fileName, - [[maybe_unused]] int errorCode) override - { - AZ_Error("LegacyTestAdapter", false, "File error detected with %s with code %d", fileName, errorCode); - } - AZStd::unique_ptr m_application; }; @@ -158,7 +145,7 @@ namespace AssetProcessor time.start(); actualTest->StartTest(); - + while (!testIsComplete) { QCoreApplication::sendPostedEvents(0, QEvent::DeferredDelete); diff --git a/Code/Tools/AssetProcessor/native/tests/AssetProcessorTest.h b/Code/Tools/AssetProcessor/native/tests/AssetProcessorTest.h index df40683027..fcfd831d0b 100644 --- a/Code/Tools/AssetProcessor/native/tests/AssetProcessorTest.h +++ b/Code/Tools/AssetProcessor/native/tests/AssetProcessorTest.h @@ -26,7 +26,7 @@ namespace AssetProcessor { protected: AZStd::unique_ptr m_errorAbsorber{}; - FileStatePassthrough m_fileStateCache; + AZStd::unique_ptr m_fileStateCache{}; void SetUp() override { @@ -40,9 +40,10 @@ namespace AssetProcessor m_ownsSysAllocator = true; AZ::AllocatorInstance::Create(); } - m_errorAbsorber = AZStd::make_unique(); + m_errorAbsorber = AZStd::make_unique(); m_application = AZStd::make_unique(); + m_fileStateCache = AZStd::make_unique(); // Inject the AutomatedTesting project as a project path into test fixture using FixedValueString = AZ::SettingsRegistryInterface::FixedValueString; @@ -50,7 +51,9 @@ namespace AssetProcessor + "/project_path"; if(auto settingsRegistry = AZ::SettingsRegistry::Get(); settingsRegistry != nullptr) { - settingsRegistry->Set(projectPathKey, "AutomatedTesting"); + AZ::IO::FixedMaxPath enginePath; + settingsRegistry->Get(enginePath.Native(), AZ::SettingsRegistryMergeUtils::FilePathKey_EngineRootFolder); + settingsRegistry->Set(projectPathKey, (enginePath / "AutomatedTesting").Native()); AZ::SettingsRegistryMergeUtils::MergeSettingsToRegistry_AddRuntimeFilePaths(*settingsRegistry); } } @@ -58,7 +61,8 @@ namespace AssetProcessor void TearDown() override { AssetUtilities::ResetAssetRoot(); - + + m_fileStateCache.reset(); m_application.reset(); m_errorAbsorber.reset(); diff --git a/Code/Tools/AssetProcessor/native/tests/assetmanager/AssetProcessorManagerTest.cpp b/Code/Tools/AssetProcessor/native/tests/assetmanager/AssetProcessorManagerTest.cpp index 656d7cab4e..58f76f8da6 100644 --- a/Code/Tools/AssetProcessor/native/tests/assetmanager/AssetProcessorManagerTest.cpp +++ b/Code/Tools/AssetProcessor/native/tests/assetmanager/AssetProcessorManagerTest.cpp @@ -193,7 +193,9 @@ void AssetProcessorManagerTest::SetUp() registry->Set(cacheRootKey, tempPath.absoluteFilePath("Cache").toUtf8().constData()); auto projectPathKey = AZ::SettingsRegistryInterface::FixedValueString(AZ::SettingsRegistryMergeUtils::BootstrapSettingsRootKey) + "/project_path"; - registry->Set(projectPathKey, "AutomatedTesting"); + AZ::IO::FixedMaxPath enginePath; + registry->Get(enginePath.Native(), AZ::SettingsRegistryMergeUtils::FilePathKey_EngineRootFolder); + registry->Set(projectPathKey, (enginePath / "AutomatedTesting").Native()); AZ::SettingsRegistryMergeUtils::MergeSettingsToRegistry_AddRuntimeFilePaths(*registry); m_data->m_databaseLocationListener.BusConnect(); @@ -241,10 +243,8 @@ void AssetProcessorManagerTest::SetUp() ASSERT_TRUE(m_mockApplicationManager->RegisterAssetRecognizerAsBuilder(rec)); m_mockApplicationManager->BusConnect(); - AZ_Printf("UnitTest", "Allocating APM\n") m_assetProcessorManager.reset(new AssetProcessorManager_Test(m_config.get())); - AZ_Printf("UnitTest", "APM ready\n"); - m_assertAbsorber.Clear(); + m_errorAbsorber->Clear(); m_isIdling = false; @@ -335,9 +335,9 @@ TEST_F(AssetProcessorManagerTest, UnitTestForGettingJobInfoBySourceUUIDSuccess) EXPECT_STRCASEEQ(relFileName.toUtf8().data(), response.m_jobList[0].m_sourceFile.c_str()); EXPECT_STRCASEEQ(tempPath.filePath("subfolder1").toUtf8().data(), response.m_jobList[0].m_watchFolder.c_str()); - ASSERT_EQ(m_assertAbsorber.m_numWarningsAbsorbed, 0); - ASSERT_EQ(m_assertAbsorber.m_numErrorsAbsorbed, 0); - ASSERT_EQ(m_assertAbsorber.m_numAssertsAbsorbed, 0); + ASSERT_EQ(m_errorAbsorber->m_numWarningsAbsorbed, 0); + ASSERT_EQ(m_errorAbsorber->m_numErrorsAbsorbed, 0); + ASSERT_EQ(m_errorAbsorber->m_numAssertsAbsorbed, 0); } TEST_F(AssetProcessorManagerTest, WarningsAndErrorsReported_SuccessfullySavedToDatabase) @@ -389,9 +389,9 @@ TEST_F(AssetProcessorManagerTest, WarningsAndErrorsReported_SuccessfullySavedToD ASSERT_EQ(response.m_jobList[0].m_warningCount, 11); ASSERT_EQ(response.m_jobList[0].m_errorCount, 22); - ASSERT_EQ(m_assertAbsorber.m_numWarningsAbsorbed, 0); - ASSERT_EQ(m_assertAbsorber.m_numErrorsAbsorbed, 0); - ASSERT_EQ(m_assertAbsorber.m_numAssertsAbsorbed, 0); + ASSERT_EQ(m_errorAbsorber->m_numWarningsAbsorbed, 0); + ASSERT_EQ(m_errorAbsorber->m_numErrorsAbsorbed, 0); + ASSERT_EQ(m_errorAbsorber->m_numAssertsAbsorbed, 0); } @@ -1313,8 +1313,8 @@ void PathDependencyTest::SetUp() void PathDependencyTest::TearDown() { - ASSERT_EQ(m_assertAbsorber.m_numAssertsAbsorbed, 0); - ASSERT_EQ(m_assertAbsorber.m_numErrorsAbsorbed, 0); + ASSERT_EQ(m_errorAbsorber->m_numAssertsAbsorbed, 0); + ASSERT_EQ(m_errorAbsorber->m_numErrorsAbsorbed, 0); AssetProcessorManagerTest::TearDown(); } @@ -1618,7 +1618,7 @@ TEST_F(PathDependencyTest, AssetProcessed_Impl_SelfReferrentialProductDependency mainFile.m_products.push_back(productAssetId); // tell the APM that the asset has been processed and allow it to bubble through its event queue: - m_assertAbsorber.Clear(); + m_errorAbsorber->Clear(); m_assetProcessorManager->AssetProcessed(jobDetails.m_jobEntry, processJobResponse); ASSERT_TRUE(BlockUntilIdle(5000)); @@ -1628,8 +1628,8 @@ TEST_F(PathDependencyTest, AssetProcessed_Impl_SelfReferrentialProductDependency ASSERT_TRUE(dependencyContainer.empty()); // We are testing 2 different dependencies, so we should get 2 warnings - ASSERT_EQ(m_assertAbsorber.m_numWarningsAbsorbed, 2); - m_assertAbsorber.Clear(); + ASSERT_EQ(m_errorAbsorber->m_numWarningsAbsorbed, 2); + m_errorAbsorber->Clear(); } // This test shows the process of deferring resolution of a path dependency works. @@ -1946,8 +1946,8 @@ TEST_F(PathDependencyTest, WildcardDependencies_ExcludePathsExisting_ResolveCorr ); // Test asset PrimaryFile1 has 4 conflict dependencies - ASSERT_EQ(m_assertAbsorber.m_numErrorsAbsorbed, 4); - m_assertAbsorber.Clear(); + ASSERT_EQ(m_errorAbsorber->m_numErrorsAbsorbed, 4); + m_errorAbsorber->Clear(); } TEST_F(PathDependencyTest, WildcardDependencies_Deferred_ResolveCorrectly) @@ -2094,8 +2094,8 @@ TEST_F(PathDependencyTest, WildcardDependencies_ExcludedPathDeferred_ResolveCorr // Test asset PrimaryFile1 has 4 conflict dependencies // After test assets dep2 and dep3 are processed, // another 2 errors will be raised because of the confliction - ASSERT_EQ(m_assertAbsorber.m_numErrorsAbsorbed, 6); - m_assertAbsorber.Clear(); + ASSERT_EQ(m_errorAbsorber->m_numErrorsAbsorbed, 6); + m_errorAbsorber->Clear(); } void PathDependencyTest::RunWildcardTest(bool useCorrectDatabaseSeparator, AssetBuilderSDK::ProductPathDependencyType pathDependencyType, bool buildDependenciesFirst) @@ -4140,11 +4140,19 @@ struct LockedFileTest switch (message.GetMessageType()) { case SourceFileNotificationMessage::MessageType: - if (const auto sourceFileMessage = azrtti_cast(&message); - sourceFileMessage != nullptr && sourceFileMessage->m_type == SourceFileNotificationMessage::NotificationType::FileRemoved - && m_callback) + if (const auto sourceFileMessage = azrtti_cast(&message); sourceFileMessage != nullptr && + sourceFileMessage->m_type == SourceFileNotificationMessage::NotificationType::FileRemoved) { - m_callback(); + // The File Remove message will occur before an attempt to delete the file + // Wait for more than 1 File Remove message. + // This indicates the AP has attempted to delete the file once, failed to do so and is now retrying + ++m_deleteCounter; + + if(m_deleteCounter > 1 && m_callback) + { + m_callback(); + m_callback = {}; // Unset it to be safe, we only intend to run the callback once + } } break; default: @@ -4168,6 +4176,7 @@ struct LockedFileTest ModtimeScanningTest::TearDown(); } + AZStd::atomic_int m_deleteCounter{ 0 }; AZStd::function m_callback; }; @@ -4207,6 +4216,10 @@ TEST_F(LockedFileTest, DeleteFile_LockedProduct_DeleteFails) TEST_F(LockedFileTest, DeleteFile_LockedProduct_DeletesWhenReleased) { + // This test is intended to verify the AP will successfully retry deleting a source asset + // when one of its product assets is locked temporarily + // We'll lock the file by holding it open + auto theFile = m_data->m_absolutePath[1].toUtf8(); const char* theFileString = theFile.constData(); auto [sourcePath, productPath] = *m_data->m_productPaths.find(theFileString); @@ -4219,19 +4232,22 @@ TEST_F(LockedFileTest, DeleteFile_LockedProduct_DeletesWhenReleased) ASSERT_GT(m_data->m_productPaths.size(), 0); QFile product(productPath); + // Open the file and keep it open to lock it + // We'll start a thread later to unlock the file + // This will allow us to test how AP handles trying to delete a locked file ASSERT_TRUE(product.open(QIODevice::ReadOnly)); // Check if we can delete the file now, if we can't, proceed with the test // If we can, it means the OS running this test doesn't lock open files so there's nothing to test if (!AZ::IO::SystemFile::Delete(productPath.toUtf8().constData())) { - AZStd::thread workerThread; + m_deleteCounter = 0; - m_callback = [&product, &workerThread]() { - workerThread = AZStd::thread([&product]() { - AZStd::this_thread::sleep_for(AZStd::chrono::milliseconds(60)); - product.close(); - }); + // Set up a callback which will fire after at least 1 retry + // Unlock the file at that point so AP can successfully delete it + m_callback = [&product]() + { + product.close(); }; QMetaObject::invokeMethod( @@ -4241,8 +4257,9 @@ TEST_F(LockedFileTest, DeleteFile_LockedProduct_DeletesWhenReleased) EXPECT_FALSE(QFile::exists(productPath)); EXPECT_EQ(m_data->m_deletedSources.size(), 1); - - workerThread.join(); + + EXPECT_GT(m_deleteCounter, 1); // Make sure the AP tried more than once to delete the file + m_errorAbsorber->ExpectAsserts(0); } else { @@ -4449,9 +4466,7 @@ AssetBuilderSDK::AssetBuilderDesc MockBuilderInfoHandler::CreateBuilderDesc(cons void FingerprintTest::SetUp() { - AZ_Printf("FingerprintTest", "SetUp start\n"); AssetProcessorManagerTest::SetUp(); - AZ_Printf("FingerprintTest", "SetUp self\n"); // We don't want the mock application manager to provide builder descriptors, mockBuilderInfoHandler will provide our own m_mockApplicationManager->BusDisconnect(); @@ -4470,23 +4485,18 @@ void FingerprintTest::SetUp() }); ASSERT_TRUE(UnitTestUtils::CreateDummyFile(m_absolutePath, "")); - AZ_Printf("FingerprintTest", "SetUp end\n"); } void FingerprintTest::TearDown() { - AZ_Printf("FingerprintTest", "TearDown start\n"); m_jobResults = AZStd::vector{}; m_mockBuilderInfoHandler = {}; - AZ_Printf("FingerprintTest", "TearDown parent\n"); AssetProcessorManagerTest::TearDown(); - AZ_Printf("FingerprintTest", "TearDown end\n"); } void FingerprintTest::RunFingerprintTest(QString builderFingerprint, QString jobFingerprint, bool expectedResult) { - AZ_Printf("FingerprintTest", "Fingerprint Test Start\n"); m_mockBuilderInfoHandler.m_builderDesc.m_analysisFingerprint = builderFingerprint.toUtf8().data(); m_mockBuilderInfoHandler.m_jobFingerprint = jobFingerprint; QMetaObject::invokeMethod(m_assetProcessorManager.get(), "AssessModifiedFile", Qt::QueuedConnection, Q_ARG(QString, m_absolutePath)); @@ -4495,7 +4505,6 @@ void FingerprintTest::RunFingerprintTest(QString builderFingerprint, QString job ASSERT_EQ(m_mockBuilderInfoHandler.m_createJobsCount, 1); ASSERT_EQ(m_jobResults.size(), 1); ASSERT_EQ(m_jobResults[0].m_autoFail, expectedResult); - AZ_Printf("FingerprintTest", "Fingerprint Test End\n"); } TEST_F(FingerprintTest, FingerprintChecking_JobFingerprint_NoBuilderFingerprint) @@ -5355,13 +5364,29 @@ AZStd::vector WildcardSourceDependencyTest::FileAddedTest(const Q void WildcardSourceDependencyTest::SetUp() { AssetProcessorManagerTest::SetUp(); - + QDir tempPath(m_tempDir.path()); // Add a non-recursive scan folder. Only files directly inside of this folder should be picked up, subfolders are ignored m_config->AddScanFolder(ScanFolderInfo(tempPath.filePath("no_recurse"), "no_recurse", "no_recurse", false, false, m_config->GetEnabledPlatforms(), 1)); + { + ExcludeAssetRecognizer excludeFolder; + excludeFolder.m_name = "Exclude ignored Folder"; + excludeFolder.m_patternMatcher = + AssetBuilderSDK::FilePatternMatcher(R"REGEX(^(.*\/)?ignored(\/.*)?$)REGEX", AssetBuilderSDK::AssetBuilderPattern::Regex); + m_config->AddExcludeRecognizer(excludeFolder); + } + + { + ExcludeAssetRecognizer excludeFile; + excludeFile.m_name = "Exclude z.foo Files"; + excludeFile.m_patternMatcher = + AssetBuilderSDK::FilePatternMatcher(R"REGEX(^(.*\/)?z\.foo$)REGEX", AssetBuilderSDK::AssetBuilderPattern::Regex); + m_config->AddExcludeRecognizer(excludeFile); + } + UnitTestUtils::CreateDummyFile(tempPath.absoluteFilePath("subfolder1/1a.foo")); UnitTestUtils::CreateDummyFile(tempPath.absoluteFilePath("subfolder1/1b.foo")); UnitTestUtils::CreateDummyFile(tempPath.absoluteFilePath("subfolder2/redirected/a.foo")); @@ -5375,6 +5400,19 @@ void WildcardSourceDependencyTest::SetUp() // Add a file in the non-recursive scanfolder. Since its not directly in the scan folder, it should always be ignored UnitTestUtils::CreateDummyFile(tempPath.absoluteFilePath("no_recurse/one/two/three/f.foo")); + // Add a file to an ignored folder + UnitTestUtils::CreateDummyFile(tempPath.absoluteFilePath("subfolder2/redirected/folder/ignored/g.foo")); + + // Add an ignored file + UnitTestUtils::CreateDummyFile(tempPath.absoluteFilePath("subfolder2/redirected/folder/one/z.foo")); + + // Add a file in the cache + AZStd::string projectCacheRootValue; + AZ::SettingsRegistry::Get()->Get(projectCacheRootValue, AZ::SettingsRegistryMergeUtils::FilePathKey_CacheProjectRootFolder); + projectCacheRootValue = AssetUtilities::NormalizeFilePath(projectCacheRootValue.c_str()).toUtf8().constData(); + auto path = AZ::IO::Path(projectCacheRootValue) / "cache.foo"; + UnitTestUtils::CreateDummyFile(path.c_str()); + AzToolsFramework::AssetDatabase::SourceFileDependencyEntryContainer dependencies; // Relative path wildcard dependency @@ -5509,6 +5547,102 @@ TEST_F(WildcardSourceDependencyTest, Absolute_NoWildcard) ASSERT_THAT(resolvedPaths, ::testing::UnorderedElementsAre()); } +TEST_F(WildcardSourceDependencyTest, Relative_IgnoredFolder) +{ + AZStd::vector resolvedPaths; + + ASSERT_TRUE(Test("*g.foo", resolvedPaths)); + ASSERT_THAT(resolvedPaths, ::testing::UnorderedElementsAre()); +} + +TEST_F(WildcardSourceDependencyTest, Absolute_IgnoredFolder) +{ + AZStd::vector resolvedPaths; + QDir tempPath(m_tempDir.path()); + + ASSERT_TRUE(Test(tempPath.absoluteFilePath("*g.foo").toUtf8().constData(), resolvedPaths)); + ASSERT_THAT(resolvedPaths, ::testing::UnorderedElementsAre()); +} + +TEST_F(WildcardSourceDependencyTest, Relative_IgnoredFile) +{ + AZStd::vector resolvedPaths; + + ASSERT_TRUE(Test("*z.foo", resolvedPaths)); + ASSERT_THAT(resolvedPaths, ::testing::UnorderedElementsAre()); +} + +TEST_F(WildcardSourceDependencyTest, Absolute_IgnoredFile) +{ + AZStd::vector resolvedPaths; + QDir tempPath(m_tempDir.path()); + + ASSERT_TRUE(Test(tempPath.absoluteFilePath("*z.foo").toUtf8().constData(), resolvedPaths)); + ASSERT_THAT(resolvedPaths, ::testing::UnorderedElementsAre()); +} + +TEST_F(WildcardSourceDependencyTest, Relative_CacheFolder) +{ + AZStd::vector resolvedPaths; + QDir tempPath(m_tempDir.path()); + + ASSERT_TRUE(Test("*cache.foo", resolvedPaths)); + ASSERT_THAT(resolvedPaths, ::testing::UnorderedElementsAre()); +} + +TEST_F(WildcardSourceDependencyTest, FilesAddedAfterInitialCache) +{ + AZStd::vector resolvedPaths; + QDir tempPath(m_tempDir.path()); + + auto excludedFolderCacheInterface = AZ::Interface::Get(); + + ASSERT_TRUE(excludedFolderCacheInterface); + + { + const auto& excludedFolders = excludedFolderCacheInterface->GetExcludedFolders(); + + ASSERT_EQ(excludedFolders.size(), 2); + } + + // Add a file to a new ignored folder + QString newFilePath = tempPath.absoluteFilePath("subfolder2/redirected/folder/two/ignored/three/new.foo"); + UnitTestUtils::CreateDummyFile(newFilePath); + + excludedFolderCacheInterface->FileAdded(newFilePath); + + const auto& excludedFolders = excludedFolderCacheInterface->GetExcludedFolders(); + + ASSERT_EQ(excludedFolders.size(), 3); + ASSERT_THAT(excludedFolders, ::testing::Contains(AZStd::string(tempPath.absoluteFilePath("subfolder2/redirected/folder/two/ignored").toUtf8().constData()))); +} + +TEST_F(WildcardSourceDependencyTest, FilesRemovedAfterInitialCache) +{ + AZStd::vector resolvedPaths; + QDir tempPath(m_tempDir.path()); + + // Add a file to a new ignored folder + QString newFilePath = tempPath.absoluteFilePath("subfolder2/redirected/folder/two/ignored/three/new.foo"); + UnitTestUtils::CreateDummyFile(newFilePath); + + auto excludedFolderCacheInterface = AZ::Interface::Get(); + + ASSERT_TRUE(excludedFolderCacheInterface); + + { + const auto& excludedFolders = excludedFolderCacheInterface->GetExcludedFolders(); + + ASSERT_EQ(excludedFolders.size(), 3); + } + + m_fileStateCache->SignalDeleteEvent(tempPath.absoluteFilePath("subfolder2/redirected/folder/two/ignored")); + + const auto& excludedFolders = excludedFolderCacheInterface->GetExcludedFolders(); + + ASSERT_EQ(excludedFolders.size(), 2); +} + TEST_F(WildcardSourceDependencyTest, NewFile_MatchesSavedRelativeDependency) { QDir tempPath(m_tempDir.path()); diff --git a/Code/Tools/AssetProcessor/native/tests/assetmanager/AssetProcessorManagerTest.h b/Code/Tools/AssetProcessor/native/tests/assetmanager/AssetProcessorManagerTest.h index d5afd8520f..7bbef41f44 100644 --- a/Code/Tools/AssetProcessor/native/tests/assetmanager/AssetProcessorManagerTest.h +++ b/Code/Tools/AssetProcessor/native/tests/assetmanager/AssetProcessorManagerTest.h @@ -58,7 +58,6 @@ protected: AZStd::unique_ptr m_assetProcessorManager; AZStd::unique_ptr m_mockApplicationManager; AZStd::unique_ptr m_config; - UnitTestUtils::AssertAbsorber m_assertAbsorber; // absorb asserts/warnings/errors so that the unit test output is not cluttered QString m_gameName; QDir m_normalizedCacheRootDir; AZStd::atomic_bool m_isIdling; diff --git a/Code/Tools/AssetProcessor/native/tests/platformconfiguration/platformconfigurationtests.cpp b/Code/Tools/AssetProcessor/native/tests/platformconfiguration/platformconfigurationtests.cpp index 6fd05fa948..624fa3d06b 100644 --- a/Code/Tools/AssetProcessor/native/tests/platformconfiguration/platformconfigurationtests.cpp +++ b/Code/Tools/AssetProcessor/native/tests/platformconfiguration/platformconfigurationtests.cpp @@ -52,11 +52,12 @@ TEST_F(PlatformConfigurationUnitTests, TestFailReadConfigFile_BadPlatform) using namespace AssetProcessor; const auto testExeFolder = AZ::IO::FileIOBase::GetInstance()->ResolvePath(TestAppRoot); + const AZ::IO::FixedMaxPath projectPath = (*testExeFolder) / EmptyDummyProjectName; auto configRoot = AZ::IO::FileIOBase::GetInstance()->ResolvePath("@exefolder@/testdata/config_broken_badplatform"); ASSERT_TRUE(configRoot); UnitTestPlatformConfiguration config; m_absorber.Clear(); - ASSERT_FALSE(config.InitializeFromConfigFiles(configRoot->c_str(), testExeFolder->c_str(), EmptyDummyProjectName, false, false)); + ASSERT_FALSE(config.InitializeFromConfigFiles(configRoot->c_str(), testExeFolder->c_str(), projectPath.c_str(), false, false)); ASSERT_GT(m_absorber.m_numErrorsAbsorbed, 0); } @@ -67,11 +68,12 @@ TEST_F(PlatformConfigurationUnitTests, TestFailReadConfigFile_NoPlatform) using namespace AssetProcessor; const auto testExeFolder = AZ::IO::FileIOBase::GetInstance()->ResolvePath(TestAppRoot); + const AZ::IO::FixedMaxPath projectPath = (*testExeFolder) / EmptyDummyProjectName; auto configRoot = AZ::IO::FileIOBase::GetInstance()->ResolvePath("@exefolder@/testdata/config_broken_noplatform"); ASSERT_TRUE(configRoot); UnitTestPlatformConfiguration config; m_absorber.Clear(); - ASSERT_FALSE(config.InitializeFromConfigFiles(configRoot->c_str(), testExeFolder->c_str(), EmptyDummyProjectName, false, false)); + ASSERT_FALSE(config.InitializeFromConfigFiles(configRoot->c_str(), testExeFolder->c_str(), projectPath.c_str(), false, false)); ASSERT_GT(m_absorber.m_numErrorsAbsorbed, 0); } @@ -81,11 +83,12 @@ TEST_F(PlatformConfigurationUnitTests, TestFailReadConfigFile_NoScanFolders) using namespace AssetProcessor; const auto testExeFolder = AZ::IO::FileIOBase::GetInstance()->ResolvePath(TestAppRoot); + const AZ::IO::FixedMaxPath projectPath = (*testExeFolder) / EmptyDummyProjectName; auto configRoot = AZ::IO::FileIOBase::GetInstance()->ResolvePath("@exefolder@/testdata/config_broken_noscans"); ASSERT_TRUE(configRoot); UnitTestPlatformConfiguration config; m_absorber.Clear(); - ASSERT_FALSE(config.InitializeFromConfigFiles(configRoot->c_str(), testExeFolder->c_str(), EmptyDummyProjectName, false, false)); + ASSERT_FALSE(config.InitializeFromConfigFiles(configRoot->c_str(), testExeFolder->c_str(), projectPath.c_str(), false, false)); ASSERT_GT(m_absorber.m_numErrorsAbsorbed, 0); } @@ -95,11 +98,12 @@ TEST_F(PlatformConfigurationUnitTests, TestFailReadConfigFile_BrokenRecognizers) using namespace AssetProcessor; const auto testExeFolder = AZ::IO::FileIOBase::GetInstance()->ResolvePath(TestAppRoot); + const AZ::IO::FixedMaxPath projectPath = (*testExeFolder) / EmptyDummyProjectName; auto configRoot = AZ::IO::FileIOBase::GetInstance()->ResolvePath("@exefolder@/testdata/config_broken_recognizers"); ASSERT_TRUE(configRoot); UnitTestPlatformConfiguration config; m_absorber.Clear(); - ASSERT_FALSE(config.InitializeFromConfigFiles(configRoot->c_str(), testExeFolder->c_str(), EmptyDummyProjectName, false, false)); + ASSERT_FALSE(config.InitializeFromConfigFiles(configRoot->c_str(), testExeFolder->c_str(), projectPath.c_str(), false, false)); ASSERT_GT(m_absorber.m_numErrorsAbsorbed, 0); } @@ -109,11 +113,12 @@ TEST_F(PlatformConfigurationUnitTests, TestFailReadConfigFile_Regular_Platforms) using namespace AssetProcessor; const auto testExeFolder = AZ::IO::FileIOBase::GetInstance()->ResolvePath(TestAppRoot); + const AZ::IO::FixedMaxPath projectPath = (*testExeFolder) / EmptyDummyProjectName; auto configRoot = AZ::IO::FileIOBase::GetInstance()->ResolvePath("@exefolder@/testdata/config_regular"); ASSERT_TRUE(configRoot); UnitTestPlatformConfiguration config; m_absorber.Clear(); - ASSERT_TRUE(config.InitializeFromConfigFiles(configRoot->c_str(), testExeFolder->c_str(), EmptyDummyProjectName, false, false)); + ASSERT_TRUE(config.InitializeFromConfigFiles(configRoot->c_str(), testExeFolder->c_str(), projectPath.c_str(), false, false)); ASSERT_EQ(m_absorber.m_numErrorsAbsorbed, 0); // verify the data. @@ -322,12 +327,13 @@ TEST_F(PlatformConfigurationUnitTests, TestFailReadConfigFile_RegularScanfolder) using namespace AssetProcessor; const auto testExeFolder = AZ::IO::FileIOBase::GetInstance()->ResolvePath(TestAppRoot); + const AZ::IO::FixedMaxPath projectPath = (*testExeFolder) / EmptyDummyProjectName; auto configRoot = AZ::IO::FileIOBase::GetInstance()->ResolvePath("@exefolder@/testdata/config_regular"); ASSERT_TRUE(configRoot); UnitTestPlatformConfiguration config; m_absorber.Clear(); AssetUtilities::ComputeProjectName(EmptyDummyProjectName, true); - ASSERT_TRUE(config.InitializeFromConfigFiles(configRoot->c_str(), testExeFolder->c_str(), EmptyDummyProjectName, false, false)); + ASSERT_TRUE(config.InitializeFromConfigFiles(configRoot->c_str(), testExeFolder->c_str(), projectPath.c_str(), false, false)); ASSERT_EQ(m_absorber.m_numErrorsAbsorbed, 0); ASSERT_EQ(config.GetScanFolderCount(), 3); // the two, and then the one that has the same data as prior but different identifier. @@ -356,11 +362,12 @@ TEST_F(PlatformConfigurationUnitTests, TestFailReadConfigFile_RegularScanfolderP using namespace AssetProcessor; const auto testExeFolder = AZ::IO::FileIOBase::GetInstance()->ResolvePath(TestAppRoot); + const AZ::IO::FixedMaxPath projectPath = (*testExeFolder) / EmptyDummyProjectName; auto configRoot = AZ::IO::FileIOBase::GetInstance()->ResolvePath("@exefolder@/testdata/config_regular_platform_scanfolder"); ASSERT_TRUE(configRoot); UnitTestPlatformConfiguration config; m_absorber.Clear(); - ASSERT_TRUE(config.InitializeFromConfigFiles(configRoot->c_str(), testExeFolder->c_str(), EmptyDummyProjectName, false, false)); + ASSERT_TRUE(config.InitializeFromConfigFiles(configRoot->c_str(), testExeFolder->c_str(), projectPath.c_str(), false, false)); ASSERT_EQ(m_absorber.m_numErrorsAbsorbed, 0); ASSERT_EQ(config.GetScanFolderCount(), 5); @@ -402,13 +409,14 @@ TEST_F(PlatformConfigurationUnitTests, TestFailReadConfigFile_RegularExcludes) using namespace AssetProcessor; const auto testExeFolder = AZ::IO::FileIOBase::GetInstance()->ResolvePath(TestAppRoot); + const AZ::IO::FixedMaxPath projectPath = (*testExeFolder) / EmptyDummyProjectName; auto configRoot = AZ::IO::FileIOBase::GetInstance()->ResolvePath("@exefolder@/testdata/config_regular"); ASSERT_TRUE(configRoot); UnitTestPlatformConfiguration config; config.AddScanFolder(ScanFolderInfo("blahblah", "Blah ScanFolder", "sf2", true, true), true); m_absorber.Clear(); - ASSERT_TRUE(config.InitializeFromConfigFiles(configRoot->c_str(), testExeFolder->c_str(), EmptyDummyProjectName, false, false)); + ASSERT_TRUE(config.InitializeFromConfigFiles(configRoot->c_str(), testExeFolder->c_str(), projectPath.c_str(), false, false)); ASSERT_EQ(m_absorber.m_numErrorsAbsorbed, 0); ASSERT_TRUE(config.IsFileExcluded("blahblah/$tmp_01.test")); @@ -429,11 +437,12 @@ TEST_F(PlatformConfigurationUnitTests, TestFailReadConfigFile_Recognizers) #endif const auto testExeFolder = AZ::IO::FileIOBase::GetInstance()->ResolvePath(TestAppRoot); + const AZ::IO::FixedMaxPath projectPath = (*testExeFolder) / EmptyDummyProjectName; auto configRoot = AZ::IO::FileIOBase::GetInstance()->ResolvePath("@exefolder@/testdata/config_regular"); ASSERT_TRUE(configRoot); UnitTestPlatformConfiguration config; m_absorber.Clear(); - ASSERT_TRUE(config.InitializeFromConfigFiles(configRoot->c_str(), testExeFolder->c_str(), EmptyDummyProjectName, false, false)); + ASSERT_TRUE(config.InitializeFromConfigFiles(configRoot->c_str(), testExeFolder->c_str(), projectPath.c_str(), false, false)); ASSERT_EQ(m_absorber.m_numErrorsAbsorbed, 0); const AssetProcessor::RecognizerContainer& recogs = config.GetAssetRecognizerContainer(); @@ -520,12 +529,13 @@ TEST_F(PlatformConfigurationUnitTests, TestFailReadConfigFile_Overrides) using namespace AzToolsFramework::AssetSystem; using namespace AssetProcessor; const auto testExeFolder = AZ::IO::FileIOBase::GetInstance()->ResolvePath(TestAppRoot); + const AZ::IO::FixedMaxPath projectPath = (*testExeFolder) / DummyProjectName; auto configRoot = AZ::IO::FileIOBase::GetInstance()->ResolvePath("@exefolder@/testdata/config_regular"); ASSERT_TRUE(configRoot); UnitTestPlatformConfiguration config; m_absorber.Clear(); - ASSERT_TRUE(config.InitializeFromConfigFiles(configRoot->c_str(), testExeFolder->c_str(), DummyProjectName, false, false)); + ASSERT_TRUE(config.InitializeFromConfigFiles(configRoot->c_str(), testExeFolder->c_str(), projectPath.c_str(), false, false)); ASSERT_EQ(m_absorber.m_numErrorsAbsorbed, 0); const AssetProcessor::RecognizerContainer& recogs = config.GetAssetRecognizerContainer(); @@ -627,11 +637,12 @@ TEST_F(PlatformConfigurationUnitTests, ReadCheckServer_FromConfig_Valid) using namespace AssetProcessor; const auto testExeFolder = AZ::IO::FileIOBase::GetInstance()->ResolvePath(TestAppRoot); + const AZ::IO::FixedMaxPath projectPath = (*testExeFolder) / EmptyDummyProjectName; auto configRoot = AZ::IO::FileIOBase::GetInstance()->ResolvePath("@exefolder@/testdata/config_regular"); ASSERT_TRUE(configRoot); UnitTestPlatformConfiguration config; m_absorber.Clear(); - ASSERT_TRUE(config.InitializeFromConfigFiles(configRoot->c_str(), testExeFolder->c_str(), EmptyDummyProjectName, false, false)); + ASSERT_TRUE(config.InitializeFromConfigFiles(configRoot->c_str(), testExeFolder->c_str(), projectPath.c_str(), false, false)); ASSERT_EQ(m_absorber.m_numErrorsAbsorbed, 0); const AssetProcessor::RecognizerContainer& recogs = config.GetAssetRecognizerContainer(); @@ -676,11 +687,12 @@ TEST_F(PlatformConfigurationUnitTests, Test_MetaFileTypes_AssetImporterExtension using namespace AssetProcessor; const auto testExeFolder = AZ::IO::FileIOBase::GetInstance()->ResolvePath(TestAppRoot); + const AZ::IO::FixedMaxPath projectPath = (*testExeFolder) / EmptyDummyProjectName; auto configRoot = AZ::IO::FileIOBase::GetInstance()->ResolvePath("@exefolder@/testdata/config_metadata"); ASSERT_TRUE(configRoot); UnitTestPlatformConfiguration config; m_absorber.Clear(); - ASSERT_FALSE(config.InitializeFromConfigFiles(configRoot->c_str(), testExeFolder->c_str(), EmptyDummyProjectName, false, false)); + ASSERT_FALSE(config.InitializeFromConfigFiles(configRoot->c_str(), testExeFolder->c_str(), projectPath.c_str(), false, false)); ASSERT_GT(m_absorber.m_numErrorsAbsorbed, 0); ASSERT_TRUE(config.MetaDataFileTypesCount() == 2); diff --git a/Code/Tools/AssetProcessor/native/tests/test_main.cpp b/Code/Tools/AssetProcessor/native/tests/test_main.cpp index e0cdc8cb3c..69f6e9a6c8 100644 --- a/Code/Tools/AssetProcessor/native/tests/test_main.cpp +++ b/Code/Tools/AssetProcessor/native/tests/test_main.cpp @@ -5,76 +5,8 @@ * SPDX-License-Identifier: Apache-2.0 OR MIT * */ -#include "utilities/BatchApplicationManager.h" - #include -#include #include -DECLARE_AZ_UNIT_TEST_MAIN() - -int RunUnitTests(int argc, char* argv[], bool& ranUnitTests) -{ - ranUnitTests = true; - - INVOKE_AZ_UNIT_TEST_MAIN(nullptr); // nullptr turns off default test environment used to catch stray asserts - - // This looks a bit weird, but the macro returns conditionally, so *if* we get here, it means the unit tests didn't run - ranUnitTests = false; - return 0; -} - -int main(int argc, char* argv[]) -{ - qputenv("QT_MAC_DISABLE_FOREGROUND_APPLICATION_TRANSFORM", "1"); - - AZ::Debug::Trace::HandleExceptions(true); - AZ::Test::ApplyGlobalParameters(&argc, argv); - - // If "--unittest" is present on the command line, run unit testing - // and return immediately. Otherwise, continue as normal. - AZ::Test::addTestEnvironment(new BaseAssetProcessorTestEnvironment()); - - bool pauseOnComplete = false; - - if (AZ::Test::ContainsParameter(argc, argv, "--pause-on-completion")) - { - pauseOnComplete = true; - } - - bool ranUnitTests; - int result = RunUnitTests(argc, argv, ranUnitTests); - - if (ranUnitTests) - { - if (pauseOnComplete) - { - system("pause"); - } - - return result; - } - - BatchApplicationManager applicationManager(&argc, &argv); - setvbuf(stdout, NULL, _IONBF, 0); // Disabling output buffering to fix test failures due to incomplete logs - - ApplicationManager::BeforeRunStatus status = applicationManager.BeforeRun(); - - if (status != ApplicationManager::BeforeRunStatus::Status_Success) - { - if (status == ApplicationManager::BeforeRunStatus::Status_Restarting) - { - //AssetProcessor will restart - return 0; - } - else - { - //Initialization failed - return 1; - } - } - - return applicationManager.Run() ? 0 : 1; -} - +AZ_UNIT_TEST_HOOK(new BaseAssetProcessorTestEnvironment) diff --git a/Code/Tools/AssetProcessor/native/tests/utilities/StatsCaptureTest.cpp b/Code/Tools/AssetProcessor/native/tests/utilities/StatsCaptureTest.cpp new file mode 100644 index 0000000000..ed7177e841 --- /dev/null +++ b/Code/Tools/AssetProcessor/native/tests/utilities/StatsCaptureTest.cpp @@ -0,0 +1,200 @@ +/* + * Copyright (c) Contributors to the Open 3D Engine Project. + * For complete copyright and license terms please see the LICENSE at the root of this distribution. + * + * SPDX-License-Identifier: Apache-2.0 OR MIT + * + */ + +#include +#include +#include +#include +#include +#include +#include + +// the simple stats capture system has a trivial interface and only writes to printf. +// So the simplest tests we can do is make sure it only asserts when it should +// and doesn't assert in cases when it shouldn't, and that the stats are reasonable +// in printf format. + +namespace AssetProcessor +{ +// Its okay to talk to this system when unintialized, you can gain some perf +// by not intializing it at all +TEST_F(AssetProcessorTest, StatsCaptureTest_UninitializedSystemDoesNotAssert) +{ + AssetProcessor::StatsCapture::BeginCaptureStat("Test"); + AssetProcessor::StatsCapture::EndCaptureStat("Test"); + AssetProcessor::StatsCapture::Dump(); + AssetProcessor::StatsCapture::Shutdown(); +} + +// Double-intiailize is an error +TEST_F(AssetProcessorTest, StatsCaptureTest_DoubleInitializeIsAnAssert) +{ + m_errorAbsorber->Clear(); + + AssetProcessor::StatsCapture::Initialize(); + AssetProcessor::StatsCapture::Initialize(); + + EXPECT_EQ(m_errorAbsorber->m_numErrorsAbsorbed, 0); + EXPECT_EQ(m_errorAbsorber->m_numAssertsAbsorbed, 1); // not allowed to assert on this + + AssetProcessor::StatsCapture::BeginCaptureStat("Test"); + AssetProcessor::StatsCapture::Shutdown(); +} + +class StatsCaptureOutputTest : public AssetProcessorTest, public AZ::Debug::TraceMessageBus::Handler +{ +public: + void SetUp() override + { + AssetProcessorTest::SetUp(); + AssetProcessor::StatsCapture::Initialize(); + } + + // dump but also capture the dump as a vector of lines: + void Dump() + { + AZ::Debug::TraceMessageBus::Handler::BusConnect(); + AssetProcessor::StatsCapture::Dump(); + AZ::Debug::TraceMessageBus::Handler::BusDisconnect(); + } + + virtual bool OnPrintf(const char* /*window*/, const char* message) + { + m_gatheredMessages.emplace_back(message); + AZ::StringFunc::TrimWhiteSpace(m_gatheredMessages.back(), true, true); + return false; + } + + void TearDown() override + { + m_gatheredMessages = {}; + + AssetProcessor::StatsCapture::Shutdown(); + AssetProcessorTest::TearDown(); + } + + AZStd::vector m_gatheredMessages; +}; + +// turning off machine and human readable mode, should not dump anything. +TEST_F(StatsCaptureOutputTest, StatsCaptureTest_DisabledByRegset_DumpsNothing) +{ + auto registry = AZ::SettingsRegistry::Get(); + ASSERT_NE(registry, nullptr); + registry->Set("/Amazon/AssetProcessor/Settings/Stats/HumanReadable", false); + registry->Set("/Amazon/AssetProcessor/Settings/Stats/MachineReadable", false); + AssetProcessor::StatsCapture::BeginCaptureStat("Test"); + AssetProcessor::StatsCapture::EndCaptureStat("Test"); + Dump(); + EXPECT_EQ(m_gatheredMessages.size(), 0); +} + +// turning on Human Readable, turn off Machine Readable, should not output any machine readable stats. +TEST_F(StatsCaptureOutputTest, StatsCaptureTest_HumanReadableOnly_DumpsNoMachineReadable) +{ + auto registry = AZ::SettingsRegistry::Get(); + ASSERT_NE(registry, nullptr); + registry->Set("/Amazon/AssetProcessor/Settings/Stats/HumanReadable", true); + registry->Set("/Amazon/AssetProcessor/Settings/Stats/MachineReadable", false); + AssetProcessor::StatsCapture::BeginCaptureStat("Test"); + AssetProcessor::StatsCapture::EndCaptureStat("Test"); + Dump(); + EXPECT_GT(m_gatheredMessages.size(), 0); + for (const auto& message : m_gatheredMessages) + { + // we expect to see ZERO "Machine Readable" lines + EXPECT_FALSE(message.contains("MachineReadableStat:")) << "Found unexpected line in output: " << message.c_str(); + } +} + +// Turn on Machine Readable, Turn off Human Readable, ensure only Machine Readable stats emitted. +TEST_F(StatsCaptureOutputTest, StatsCaptureTest_MachineReadableOnly_DumpsNoHumanReadable) +{ + auto registry = AZ::SettingsRegistry::Get(); + ASSERT_NE(registry, nullptr); + registry->Set("/Amazon/AssetProcessor/Settings/Stats/HumanReadable", false); + registry->Set("/Amazon/AssetProcessor/Settings/Stats/MachineReadable", true); + AssetProcessor::StatsCapture::BeginCaptureStat("Test"); + AssetProcessor::StatsCapture::EndCaptureStat("Test"); + Dump(); + for (const auto& message : m_gatheredMessages) + { + // we expect to see ONLY "Machine Readable" lines + EXPECT_TRUE(message.contains("MachineReadableStat:")) << "Found unexpected line in output: " << message.c_str(); + } + EXPECT_GT(m_gatheredMessages.size(), 0); +} + + +// The interface for StatsCapture just captures and then dumps. +// For us to test this, we thus have to capture and parse the dump output. +TEST_F(StatsCaptureOutputTest, StatsCaptureTest_Sanity) +{ + auto registry = AZ::SettingsRegistry::Get(); + ASSERT_NE(registry, nullptr); + + // Make it output in "machine raadable" format so that it is simpler to parse. + registry->Set("/Amazon/AssetProcessor/Settings/Stats/HumanReadable", false); + registry->Set("/Amazon/AssetProcessor/Settings/Stats/MachineReadable", true); + AssetProcessor::StatsCapture::BeginCaptureStat("CreateJobs,foo,mybuilder"); + AssetProcessor::StatsCapture::EndCaptureStat("CreateJobs,foo,mybuilder"); + + // Intentionally not using sleeps in this test. It means that the + // captured duration will be likely 0 but its not worth it to slow down tests. + // If the durations end up 0 its going to be extremely noticable in day-to-day use. + AssetProcessor::StatsCapture::BeginCaptureStat("CreateJobs,foo,mybuilder"); + AssetProcessor::StatsCapture::EndCaptureStat("CreateJobs,foo,mybuilder"); + + // for the second stat, we'll double capture and double end, in order to test debounce + AssetProcessor::StatsCapture::BeginCaptureStat("CreateJobs,foo2,mybuilder"); + AssetProcessor::StatsCapture::BeginCaptureStat("CreateJobs,foo2,mybuilder"); + AssetProcessor::StatsCapture::EndCaptureStat("CreateJobs,foo2,mybuilder2"); + AssetProcessor::StatsCapture::EndCaptureStat("CreateJobs,foo2,mybuilder2"); + + m_gatheredMessages.clear(); + Dump(); + EXPECT_GT(m_gatheredMessages.size(), 0); + + // We'll parse the machine readable stat lines here and make sure that the following is true + // mybuilder appears + // mybuilder appears only once but count is 2 + bool foundFoo = false; + bool foundFoo2 = false; + + for (const auto& stat : m_gatheredMessages) + { + if (stat.contains("MachineReadableStat:")) + { + AZStd::vector tokens; + AZ::StringFunc::Tokenize(stat, tokens, ":", false, false); + ASSERT_EQ(tokens.size(), 5); // should be "MachineReadableStat:time:count:average:name) + const auto& countData = tokens[2]; + const auto& nameData = tokens[4]; + + if (AZ::StringFunc::Equal(nameData, "CreateJobs,foo,mybuilder")) + { + EXPECT_FALSE(foundFoo); // should only find one of these + foundFoo = true; + EXPECT_STREQ(countData.c_str(), "2"); + } + + if (AZ::StringFunc::Equal(nameData, "CreateJobs,foo2,mybuilder2")) + { + EXPECT_FALSE(foundFoo2); // should only find one of these + foundFoo2 = true; + EXPECT_STREQ(countData.c_str(), "1"); + } + } + } + + EXPECT_TRUE(foundFoo) << "The expected token CreateJobs,foo,mybuilder did not appear in the output."; + EXPECT_TRUE(foundFoo2) << "The expected CreateJobs.foo2.mybuilder2 did not appear in the output"; +} + +} + diff --git a/Code/Tools/AssetProcessor/native/ui/AssetTreeItem.cpp b/Code/Tools/AssetProcessor/native/ui/AssetTreeItem.cpp index d8b69a80f5..75823374a0 100644 --- a/Code/Tools/AssetProcessor/native/ui/AssetTreeItem.cpp +++ b/Code/Tools/AssetProcessor/native/ui/AssetTreeItem.cpp @@ -29,14 +29,16 @@ namespace AssetProcessor AssetTreeItem::AssetTreeItem( AZStd::shared_ptr data, QIcon errorIcon, + QIcon folderIcon, + QIcon fileIcon, AssetTreeItem* parentItem) : m_data(data), m_parent(parentItem), - m_errorIcon(errorIcon), // QIcon is implicitily shared. - m_folderIcon(QIcon(QStringLiteral(":/Gallery/Asset_Folder.svg"))), - m_fileIcon(QIcon(QStringLiteral(":/Gallery/Asset_File.svg"))) + m_errorIcon(errorIcon), // QIcon is implicitly shared. + m_folderIcon(folderIcon), + m_fileIcon(fileIcon) { - m_folderIcon.addFile(QStringLiteral(":/Gallery/Asset_Folder.svg"), QSize(), QIcon::Selected); + } AssetTreeItem::~AssetTreeItem() @@ -45,7 +47,7 @@ namespace AssetProcessor AssetTreeItem* AssetTreeItem::CreateChild(AZStd::shared_ptr data) { - m_childItems.emplace_back(new AssetTreeItem(data, m_errorIcon, this)); + m_childItems.emplace_back(new AssetTreeItem(data, m_errorIcon, m_folderIcon, m_fileIcon, this)); return m_childItems.back().get(); } diff --git a/Code/Tools/AssetProcessor/native/ui/AssetTreeItem.h b/Code/Tools/AssetProcessor/native/ui/AssetTreeItem.h index c9bc926c34..f36855adfe 100644 --- a/Code/Tools/AssetProcessor/native/ui/AssetTreeItem.h +++ b/Code/Tools/AssetProcessor/native/ui/AssetTreeItem.h @@ -50,6 +50,8 @@ namespace AssetProcessor explicit AssetTreeItem( AZStd::shared_ptr data, QIcon errorIcon, + QIcon folderIcon, + QIcon fileIcon, AssetTreeItem* parentItem = nullptr); virtual ~AssetTreeItem(); diff --git a/Code/Tools/AssetProcessor/native/ui/AssetTreeModel.cpp b/Code/Tools/AssetProcessor/native/ui/AssetTreeModel.cpp index 8d889343f9..e8540c3d8d 100644 --- a/Code/Tools/AssetProcessor/native/ui/AssetTreeModel.cpp +++ b/Code/Tools/AssetProcessor/native/ui/AssetTreeModel.cpp @@ -16,9 +16,12 @@ namespace AssetProcessor AssetTreeModel::AssetTreeModel(AZStd::shared_ptr sharedDbConnection, QObject *parent) : QAbstractItemModel(parent), - m_sharedDbConnection(sharedDbConnection), - m_errorIcon(QStringLiteral(":/stylesheet/img/logging/error.svg")) + m_sharedDbConnection(sharedDbConnection) + , m_errorIcon(QStringLiteral(":/stylesheet/img/logging/error.svg")) + , m_folderIcon(QIcon(QStringLiteral(":/Gallery/Asset_Folder.svg"))) + , m_fileIcon(QIcon(QStringLiteral(":/Gallery/Asset_File.svg"))) { + m_folderIcon.addFile(QStringLiteral(":/Gallery/Asset_Folder.svg"), QSize(), QIcon::Selected); ApplicationManagerNotifications::Bus::Handler::BusConnect(); AzToolsFramework::AssetDatabase::AssetDatabaseNotificationBus::Handler::BusConnect(); } @@ -40,7 +43,7 @@ namespace AssetProcessor void AssetTreeModel::Reset() { beginResetModel(); - m_root.reset(new AssetTreeItem(AZStd::make_shared("", "", true, AZ::Uuid::CreateNull()), m_errorIcon)); + m_root.reset(new AssetTreeItem(AZStd::make_shared("", "", true, AZ::Uuid::CreateNull()), m_errorIcon, m_folderIcon, m_fileIcon)); ResetModel(); diff --git a/Code/Tools/AssetProcessor/native/ui/AssetTreeModel.h b/Code/Tools/AssetProcessor/native/ui/AssetTreeModel.h index d33bc0bc48..27201c55a3 100644 --- a/Code/Tools/AssetProcessor/native/ui/AssetTreeModel.h +++ b/Code/Tools/AssetProcessor/native/ui/AssetTreeModel.h @@ -54,5 +54,7 @@ namespace AssetProcessor AZStd::shared_ptr m_sharedDbConnection; QIcon m_errorIcon; + QIcon m_folderIcon; + QIcon m_fileIcon; }; } diff --git a/Code/Tools/AssetProcessor/native/ui/MainWindow.cpp b/Code/Tools/AssetProcessor/native/ui/MainWindow.cpp index 70b7ceb009..0837384d95 100644 --- a/Code/Tools/AssetProcessor/native/ui/MainWindow.cpp +++ b/Code/Tools/AssetProcessor/native/ui/MainWindow.cpp @@ -37,7 +37,6 @@ #include "../connection/connection.h" #include "../resourcecompiler/rccontroller.h" #include "../resourcecompiler/RCJobSortFilterProxyModel.h" -#include "../shadercompiler/shadercompilerModel.h" #include @@ -148,7 +147,6 @@ void MainWindow::Activate() ui->buttonList->addTab(QStringLiteral("Jobs")); ui->buttonList->addTab(QStringLiteral("Assets")); ui->buttonList->addTab(QStringLiteral("Logs")); - ui->buttonList->addTab(QStringLiteral("Shaders")); ui->buttonList->addTab(QStringLiteral("Connections")); ui->buttonList->addTab(QStringLiteral("Tools")); @@ -167,7 +165,7 @@ void MainWindow::Activate() ui->connectionTreeView->header()->resizeSection(ConnectionManager::PortColumn, 60); ui->connectionTreeView->header()->resizeSection(ConnectionManager::PlatformColumn, 60); ui->connectionTreeView->header()->resizeSection(ConnectionManager::AutoConnectColumn, 60); - + ui->connectionTreeView->header()->setStretchLastSection(false); connect(ui->connectionTreeView->selectionModel(), &QItemSelectionModel::selectionChanged, this, &MainWindow::OnConnectionSelectionChanged); @@ -191,12 +189,12 @@ void MainWindow::Activate() ui->allowListAllowedListConnectionsListView->setModel(&m_allowedListAddresses); connect(ui->allowedListRejectedConnectionsListView, &QListView::clicked, this, &MainWindow::OnRejectedConnectionsListViewClicked); ui->allowedListRejectedConnectionsListView->setModel(&m_rejectedAddresses); - + connect(ui->allowedListEnableCheckBox, &QCheckBox::toggled, this, &MainWindow::OnAllowedListCheckBoxToggled); - + connect(ui->allowedListAddHostNameToolButton, &QToolButton::clicked, this, &MainWindow::OnAddHostNameAllowedListButtonClicked); connect(ui->allowedListAddIPToolButton, &QPushButton::clicked, this, &MainWindow::OnAddIPAllowedListButtonClicked); - + connect(ui->allowedListToAllowedListToolButton, &QPushButton::clicked, this, &MainWindow::OnToAllowedListButtonClicked); connect(ui->allowedListToRejectedListToolButton, &QToolButton::clicked, this, &MainWindow::OnToRejectedListButtonClicked); @@ -206,7 +204,7 @@ void MainWindow::Activate() QRegExpValidator* hostNameValidator = new QRegExpValidator(validHostName, this); ui->allowedListAddHostNameLineEdit->setValidator(hostNameValidator); - + QRegExpValidator* ipValidator = new QRegExpValidator(validIP, this); ui->allowedListAddIPLineEdit->setValidator(ipValidator); @@ -237,7 +235,7 @@ void MainWindow::Activate() m_logSortFilterProxy->setSourceModel(m_logsModel); m_logSortFilterProxy->setFilterKeyColumn(AzToolsFramework::Logging::LogTableModel::ColumnMessage); m_logSortFilterProxy->setFilterCaseSensitivity(Qt::CaseInsensitive); - + ui->jobLogTableView->setModel(m_logSortFilterProxy); ui->jobLogTableView->setItemDelegate(new AzToolsFramework::Logging::LogTableItemDelegate(ui->jobLogTableView)); ui->jobLogTableView->setExpandOnSelection(); @@ -317,14 +315,6 @@ void MainWindow::Activate() connect(ui->jobFilteredSearchWidget, &AzQtComponents::FilteredSearchWidget::TextFilterChanged, this, writeJobFilterSettings); - //Shader view - ui->shaderTreeView->setModel(m_guiApplicationManager->GetShaderCompilerModel()); - ui->shaderTreeView->header()->resizeSection(ShaderCompilerModel::ColumnTimeStamp, 80); - ui->shaderTreeView->header()->resizeSection(ShaderCompilerModel::ColumnServer, 40); - ui->shaderTreeView->header()->resizeSection(ShaderCompilerModel::ColumnError, 220); - ui->shaderTreeView->header()->setSectionResizeMode(ShaderCompilerModel::ColumnError, QHeaderView::Stretch); - ui->shaderTreeView->header()->setStretchLastSection(false); - // Asset view m_sourceAssetTreeFilterModel = new AssetProcessor::AssetTreeFilterModel(this); m_sourceModel = new AssetProcessor::SourceAssetTreeModel(m_sharedDbConnection, this); @@ -410,7 +400,7 @@ void MainWindow::Activate() bool zeroAnalysisModeFromSettings = settings.value("EnableZeroAnalysis", QVariant(true)).toBool(); settings.endGroup(); - QObject::connect(ui->modtimeSkippingCheckBox, &QCheckBox::stateChanged, this, + QObject::connect(ui->modtimeSkippingCheckBox, &QCheckBox::stateChanged, this, [this](int newCheckState) { bool newOption = newCheckState == Qt::Checked ? true : false; @@ -553,7 +543,7 @@ void MainWindow::OnAddConnection(bool /*checked*/) m_guiApplicationManager->GetConnectionManager()->addUserConnection(); } -void MainWindow::OnAllowedListConnectionsListViewClicked() +void MainWindow::OnAllowedListConnectionsListViewClicked() { ui->allowedListRejectedConnectionsListView->clearSelection(); } @@ -563,7 +553,7 @@ void MainWindow::OnRejectedConnectionsListViewClicked() ui->allowListAllowedListConnectionsListView->clearSelection(); } -void MainWindow::OnAllowedListCheckBoxToggled() +void MainWindow::OnAllowedListCheckBoxToggled() { if (!ui->allowedListEnableCheckBox->isChecked()) { @@ -598,7 +588,7 @@ void MainWindow::OnAllowedListCheckBoxToggled() ui->allowedListToAllowedListToolButton->setEnabled(true); ui->allowedListToRejectedListToolButton->setEnabled(true); } - + m_guiApplicationManager->GetConnectionManager()->AllowedListingEnabled(ui->allowedListEnableCheckBox->isChecked()); } @@ -868,7 +858,7 @@ void MainWindow::OnAssetProcessorStatusChanged(const AssetProcessor::AssetProces text = tr("Working, analyzing jobs remaining %1, processing jobs remaining %2...").arg(m_createJobCount).arg(m_processJobsCount); ui->timerContainerWidget->setVisible(false); ui->productAssetDetailsPanel->SetScanQueueEnabled(false); - + IntervalAssetTabFilterRefresh(); } else @@ -887,7 +877,7 @@ void MainWindow::OnAssetProcessorStatusChanged(const AssetProcessor::AssetProces break; case AssetProcessorStatus::Processing_Jobs: CheckStartProcessTimers(); - m_processJobsCount = entry.m_count; + m_processJobsCount = entry.m_count; if (m_processJobsCount + m_createJobCount > 0) { @@ -993,7 +983,7 @@ void MainWindow::ApplyConfig() ui->jobLogTableView->header()->resizeSection(AzToolsFramework::Logging::LogTableModel::ColumnType, m_config.logTypeColumnWidth); } -MainWindow::LogSortFilterProxy::LogSortFilterProxy(QObject* parentOjbect) : QSortFilterProxyModel(parentOjbect) +MainWindow::LogSortFilterProxy::LogSortFilterProxy(QObject* parentOjbect) : QSortFilterProxyModel(parentOjbect) { } @@ -1312,7 +1302,7 @@ void MainWindow::ShowJobViewContextMenu(const QPoint& pos) ui->sourceAssetDetailsPanel->GoToSource(item->m_elementId.GetInputAssetName().toUtf8().constData()); }); - QString productMenuTitle(tr("View product asset...")); + QString productMenuTitle(tr("View product asset...")); if (item->m_jobState != AzToolsFramework::AssetSystem::JobStatus::Completed) { QString disabledActionTooltip(tr("Only completed jobs are available in the Assets tab.")); @@ -1620,7 +1610,7 @@ void MainWindow::ShowProductAssetContextMenu(const QPoint& pos) { AzQtComponents::ShowFileOnDesktop(pathToProduct.GetValue()); } - + }); QString fileOrFolder(cachedAsset->getChildCount() > 0 ? tr("folder") : tr("file")); diff --git a/Code/Tools/AssetProcessor/native/ui/MainWindow.h b/Code/Tools/AssetProcessor/native/ui/MainWindow.h index 8dc1f3e356..1bec6f982d 100644 --- a/Code/Tools/AssetProcessor/native/ui/MainWindow.h +++ b/Code/Tools/AssetProcessor/native/ui/MainWindow.h @@ -65,7 +65,6 @@ public: Jobs, Assets, Logs, - Shaders, Connections, Tools }; diff --git a/Code/Tools/AssetProcessor/native/ui/MainWindow.ui b/Code/Tools/AssetProcessor/native/ui/MainWindow.ui index d4f341d2b5..9d90beec13 100644 --- a/Code/Tools/AssetProcessor/native/ui/MainWindow.ui +++ b/Code/Tools/AssetProcessor/native/ui/MainWindow.ui @@ -763,59 +763,6 @@
- - - - 0 - - - 0 - - - 0 - - - 0 - - - 0 - - - - - Shaders - - - - - - - - - - - 0 - - - 0 - - - 0 - - - 0 - - - 0 - - - - - - - - - diff --git a/Code/Tools/AssetProcessor/native/unittests/FileWatcherUnitTests.cpp b/Code/Tools/AssetProcessor/native/unittests/FileWatcherUnitTests.cpp index a68b116f3d..2dd911b662 100644 --- a/Code/Tools/AssetProcessor/native/unittests/FileWatcherUnitTests.cpp +++ b/Code/Tools/AssetProcessor/native/unittests/FileWatcherUnitTests.cpp @@ -24,14 +24,12 @@ void FileWatcherUnitTestRunner::StartTest() FileWatcher fileWatcher; - FolderWatchCallbackEx folderWatch(tempPath, "", true); - - fileWatcher.AddFolderWatch(&folderWatch); + fileWatcher.AddFolderWatch(tempPath); fileWatcher.StartWatching(); { // test a single file create/write bool foundFile = false; - auto connection = QObject::connect(&folderWatch, &FolderWatchCallbackEx::fileAdded, this, [&](QString filename) + auto connection = QObject::connect(&fileWatcher, &FileWatcher::fileAdded, this, [&](QString filename) { AZ_TracePrintf(AssetProcessor::DebugChannel, "Single file test Found asset: %s.\n", filename.toUtf8().data()); foundFile = true; @@ -66,7 +64,7 @@ void FileWatcherUnitTestRunner::StartTest() const unsigned long maxFiles = 10000; QSet outstandingFiles; - auto connection = QObject::connect(&folderWatch, &FolderWatchCallbackEx::fileAdded, this, [&](QString filename) + auto connection = QObject::connect(&fileWatcher, &FileWatcher::fileAdded, this, [&](QString filename) { outstandingFiles.remove(filename); }); @@ -122,7 +120,7 @@ void FileWatcherUnitTestRunner::StartTest() { // test deletion bool foundFile = false; - auto connection = QObject::connect(&folderWatch, &FolderWatchCallbackEx::fileRemoved, this, [&](QString filename) + auto connection = QObject::connect(&fileWatcher, &FileWatcher::fileRemoved, this, [&](QString filename) { AZ_TracePrintf(AssetProcessor::DebugChannel, "Deleted asset: %s...\n", filename.toUtf8().data()); foundFile = true; @@ -155,7 +153,7 @@ void FileWatcherUnitTestRunner::StartTest() { bool fileAddCalled = false; QString fileAddName; - auto connectionAdd = QObject::connect(&folderWatch, &FolderWatchCallbackEx::fileAdded, this, [&](QString filename) + auto connectionAdd = QObject::connect(&fileWatcher, &FileWatcher::fileAdded, this, [&](QString filename) { fileAddCalled = true; fileAddName = filename; @@ -163,7 +161,7 @@ void FileWatcherUnitTestRunner::StartTest() bool fileRemoveCalled = false; QString fileRemoveName; - auto connectionRemove = QObject::connect(&folderWatch, &FolderWatchCallbackEx::fileRemoved, this, [&](QString filename) + auto connectionRemove = QObject::connect(&fileWatcher, &FileWatcher::fileRemoved, this, [&](QString filename) { fileRemoveCalled = true; fileRemoveName = filename; @@ -171,7 +169,7 @@ void FileWatcherUnitTestRunner::StartTest() QStringList fileModifiedNames; bool fileModifiedCalled = false; - auto connectionModified = QObject::connect(&folderWatch, &FolderWatchCallbackEx::fileModified, this, [&](QString filename) + auto connectionModified = QObject::connect(&fileWatcher, &FileWatcher::fileModified, this, [&](QString filename) { fileModifiedCalled = true; fileModifiedNames.append(filename); diff --git a/Code/Tools/AssetProcessor/native/unittests/RCcontrollerUnitTests.cpp b/Code/Tools/AssetProcessor/native/unittests/RCcontrollerUnitTests.cpp index a8bc714698..ce531a4796 100644 --- a/Code/Tools/AssetProcessor/native/unittests/RCcontrollerUnitTests.cpp +++ b/Code/Tools/AssetProcessor/native/unittests/RCcontrollerUnitTests.cpp @@ -152,7 +152,6 @@ void RCcontrollerUnitTests::RunRCControllerTests() } QModelIndex rcJobIndex; - int rcJobJobIndex; QString rcJobCommand; QString rcJobState; @@ -172,7 +171,6 @@ void RCcontrollerUnitTests::RunRCControllerTests() return; } - rcJobJobIndex = rcJobListModel->data(rcJobIndex, RCJobListModel::jobIndexRole).toInt(); rcJobCommand = rcJobListModel->data(rcJobIndex, RCJobListModel::displayNameRole).toString(); rcJobState = rcJobListModel->data(rcJobIndex, RCJobListModel::stateRole).toString(); } diff --git a/Code/Tools/AssetProcessor/native/unittests/ShaderCompilerUnitTests.cpp b/Code/Tools/AssetProcessor/native/unittests/ShaderCompilerUnitTests.cpp deleted file mode 100644 index f8bab90118..0000000000 --- a/Code/Tools/AssetProcessor/native/unittests/ShaderCompilerUnitTests.cpp +++ /dev/null @@ -1,188 +0,0 @@ -/* - * Copyright (c) Contributors to the Open 3D Engine Project. - * For complete copyright and license terms please see the LICENSE at the root of this distribution. - * - * SPDX-License-Identifier: Apache-2.0 OR MIT - * - */ -#include "ShaderCompilerUnitTests.h" -#include "native/connection/connectionManager.h" -#include "native/connection/connection.h" -#include "native/utilities/assetUtils.h" - -#define UNIT_TEST_CONNECT_PORT 12125 - -ShaderCompilerUnitTest::ShaderCompilerUnitTest() -{ - m_connectionManager = ConnectionManager::Get(); - connect(this, SIGNAL(StartUnitTestForGoodShaderCompiler()), this, SLOT(UnitTestForGoodShaderCompiler())); - connect(this, SIGNAL(StartUnitTestForFirstBadShaderCompiler()), this, SLOT(UnitTestForFirstBadShaderCompiler())); - connect(this, SIGNAL(StartUnitTestForSecondBadShaderCompiler()), this, SLOT(UnitTestForSecondBadShaderCompiler())); - connect(this, SIGNAL(StartUnitTestForThirdBadShaderCompiler()), this, SLOT(UnitTestForThirdBadShaderCompiler())); - connect(&m_shaderCompilerManager, SIGNAL(sendErrorMessageFromShaderJob(QString, QString, QString, QString)), this, SLOT(ReceiveShaderCompilerErrorMessage(QString, QString, QString, QString))); - - m_shaderCompilerManager.setIsUnitTesting(true); - m_connectionManager->RegisterService(AssetUtilities::ComputeCRC32Lowercase("ShaderCompilerProxyRequest"), AZStd::bind(&ShaderCompilerManager::process, &m_shaderCompilerManager, AZStd::placeholders::_1, AZStd::placeholders::_2, AZStd::placeholders::_3, AZStd::placeholders::_4)); - ContructPayloadForShaderCompilerServer(m_testPayload); -} - -ShaderCompilerUnitTest::~ShaderCompilerUnitTest() -{ - m_connectionManager->removeConnection(m_connectionId); -} - -void ShaderCompilerUnitTest::ContructPayloadForShaderCompilerServer(QByteArray& payload) -{ - QString testString = "This is a test string"; - QString testServerList = "127.0.0.3,198.51.100.0,127.0.0.1"; // note - 198.51.100.0 is in the 'test' range that will never be assigned to anyone. - unsigned int testServerListLength = static_cast(testServerList.size()); - unsigned short testServerPort = 12348; - unsigned int testRequestId = 1; - qint64 testStringLength = static_cast(testString.size()); - payload.resize(static_cast(testStringLength)); - memcpy(payload.data(), (testString.toStdString().c_str()), testStringLength); - unsigned int payloadSize = payload.size(); - payload.resize(payloadSize + 1 + static_cast(testServerListLength) + 1 + sizeof(unsigned short) + sizeof(unsigned int) + sizeof(unsigned int)); - char* dataStart = payload.data() + payloadSize; - *dataStart = 0;// null - memcpy(payload.data() + payloadSize + 1, (testServerList.toStdString().c_str()), testServerListLength); - dataStart += 1 + testServerListLength; - *dataStart = 0; //null - memcpy(payload.data() + payloadSize + 1 + testServerListLength + 1, reinterpret_cast(&testServerPort), sizeof(unsigned short)); - memcpy(payload.data() + payloadSize + 1 + testServerListLength + 1 + sizeof(unsigned short), reinterpret_cast(&testServerListLength), sizeof(unsigned int)); - memcpy(payload.data() + payloadSize + 1 + testServerListLength + 1 + sizeof(unsigned short) + sizeof(unsigned int), reinterpret_cast(&testRequestId), sizeof(unsigned int)); -} - -void ShaderCompilerUnitTest::StartTest() -{ - m_connectionId = m_connectionManager->addConnection(); - Connection* connection = m_connectionManager->getConnection(m_connectionId); - connection->SetPort(UNIT_TEST_CONNECT_PORT); - connection->SetIpAddress("127.0.0.1"); - connection->SetAutoConnect(true); - UnitTestForGoodShaderCompiler(); -} - -int ShaderCompilerUnitTest::UnitTestPriority() const -{ - return -4; -} - -void ShaderCompilerUnitTest::UnitTestForGoodShaderCompiler() -{ - AZ_TracePrintf("ShaderCompilerUnitTest", " ... Starting test of 'good' shader compiler...\n"); - m_shaderCompilerManager.m_sendResponseCallbackFn = AZStd::bind(&ShaderCompilerUnitTest::VerifyPayloadForGoodShaderCompiler, this , AZStd::placeholders::_1, AZStd::placeholders::_2, AZStd::placeholders::_3, AZStd::placeholders::_4); - m_server.Init("127.0.0.1", 12348); - m_server.setServerStatus(UnitTestShaderCompilerServer::GoodServer); - m_connectionManager->SendMessageToService(m_connectionId, AssetUtilities::ComputeCRC32Lowercase("ShaderCompilerProxyRequest"), 0, m_testPayload); -} - -void ShaderCompilerUnitTest::UnitTestForFirstBadShaderCompiler() -{ - AZ_TracePrintf("ShaderCompilerUnitTest", " ... Starting test of 'bad' shader compiler... (Incomplete Payload)\n"); - m_shaderCompilerManager.m_sendResponseCallbackFn = AZStd::bind(&ShaderCompilerUnitTest::VerifyPayloadForFirstBadShaderCompiler, this, AZStd::placeholders::_1, AZStd::placeholders::_2, AZStd::placeholders::_3, AZStd::placeholders::_4); - m_server.setServerStatus(UnitTestShaderCompilerServer::BadServer_SendsIncompletePayload); - m_connectionManager->SendMessageToService(m_connectionId, AssetUtilities::ComputeCRC32Lowercase("ShaderCompilerProxyRequest"), 0, m_testPayload); -} - -void ShaderCompilerUnitTest::UnitTestForSecondBadShaderCompiler() -{ - AZ_TracePrintf("ShaderCompilerUnitTest", " ... Starting test of 'bad' shader compiler... (Payload followed by disconnection)\n"); - m_shaderCompilerManager.m_sendResponseCallbackFn = AZStd::bind(&ShaderCompilerUnitTest::VerifyPayloadForSecondBadShaderCompiler, this, AZStd::placeholders::_1, AZStd::placeholders::_2, AZStd::placeholders::_3, AZStd::placeholders::_4); - m_server.setServerStatus(UnitTestShaderCompilerServer::BadServer_ReadsPayloadAndDisconnect); - m_connectionManager->SendMessageToService(m_connectionId, AssetUtilities::ComputeCRC32Lowercase("ShaderCompilerProxyRequest"), 0, m_testPayload); -} - -void ShaderCompilerUnitTest::UnitTestForThirdBadShaderCompiler() -{ - AZ_TracePrintf("ShaderCompilerUnitTest", " ... Starting test of 'bad' shader compiler... (Connect but disconnect without data)\n"); - m_shaderCompilerManager.m_sendResponseCallbackFn = AZStd::bind(&ShaderCompilerUnitTest::VerifyPayloadForThirdBadShaderCompiler, this, AZStd::placeholders::_1, AZStd::placeholders::_2, AZStd::placeholders::_3, AZStd::placeholders::_4); - m_server.setServerStatus(UnitTestShaderCompilerServer::BadServer_DisconnectAfterConnect); - m_server.startServer(); - m_connectionManager->SendMessageToService(m_connectionId, AssetUtilities::ComputeCRC32Lowercase("ShaderCompilerProxyRequest"), 0, m_testPayload); -} - -void ShaderCompilerUnitTest::VerifyPayloadForGoodShaderCompiler(unsigned int connId, unsigned int type, unsigned int serial, QByteArray payload) -{ - (void) connId; - (void) type; - (void) serial; - m_shaderCompilerManager.m_sendResponseCallbackFn = nullptr; - - unsigned int messageSize; - quint8 status; - QByteArray payloadToCheck; - unsigned int requestId; - memcpy((&messageSize), payload.data(), sizeof(unsigned int)); - memcpy((&status), payload.data() + sizeof(unsigned int), sizeof(unsigned char)); - payloadToCheck.resize(messageSize); - memcpy((payloadToCheck.data()), payload.data() + sizeof(unsigned int) + sizeof(unsigned char), messageSize); - memcpy((&requestId), payload.data() + sizeof(unsigned int) + sizeof(unsigned char) + messageSize, sizeof(unsigned int)); - QString outgoingTestString = "Test string validated"; - if (QString::compare(QString(payloadToCheck), outgoingTestString, Qt::CaseSensitive) != 0) - { - Q_EMIT UnitTestFailed("Unit Test for Good Shader Compiler Failed"); - return; - } - Q_EMIT StartUnitTestForFirstBadShaderCompiler(); -} - -void ShaderCompilerUnitTest::VerifyPayloadForFirstBadShaderCompiler(unsigned int connId, unsigned int type, unsigned int serial, QByteArray payload) -{ - (void) connId; - (void) type; - (void) serial; - m_shaderCompilerManager.m_sendResponseCallbackFn = nullptr; - QString error = "Remote IP is taking too long to respond: 127.0.0.1"; - if ((payload.size() != 4) || (QString::compare(m_lastShaderCompilerErrorMessage, error, Qt::CaseSensitive) != 0)) - { - Q_EMIT UnitTestFailed("Unit Test for First Bad Shader Compiler Failed"); - return; - } - m_lastShaderCompilerErrorMessage.clear(); - Q_EMIT StartUnitTestForSecondBadShaderCompiler(); -} - -void ShaderCompilerUnitTest::VerifyPayloadForSecondBadShaderCompiler(unsigned int connId, unsigned int type, unsigned int serial, QByteArray payload) -{ - (void) connId; - (void) type; - (void) serial; - m_shaderCompilerManager.m_sendResponseCallbackFn = nullptr; - QString error = "Remote IP is taking too long to respond: 127.0.0.1"; - if ((payload.size() != 4) || (QString::compare(m_lastShaderCompilerErrorMessage, error, Qt::CaseSensitive) != 0)) - { - Q_EMIT UnitTestFailed("Unit Test for Second Bad Shader Compiler Failed"); - return; - } - m_lastShaderCompilerErrorMessage.clear(); - Q_EMIT StartUnitTestForThirdBadShaderCompiler(); -} - -void ShaderCompilerUnitTest::VerifyPayloadForThirdBadShaderCompiler(unsigned int connId, unsigned int type, unsigned int serial, QByteArray payload) -{ - (void) connId; - (void) type; - (void) serial; - m_shaderCompilerManager.m_sendResponseCallbackFn = nullptr; - QString error = "Remote IP is taking too long to respond: 127.0.0.1"; - if ((payload.size() != 4) || (QString::compare(m_lastShaderCompilerErrorMessage, error, Qt::CaseSensitive) != 0)) - { - Q_EMIT UnitTestFailed("Unit Test for Third Bad Shader Compiler Failed"); - return; - } - m_lastShaderCompilerErrorMessage.clear(); - Q_EMIT UnitTestPassed(); -} - -void ShaderCompilerUnitTest::ReceiveShaderCompilerErrorMessage(QString error, QString server, QString timestamp, QString payload) -{ - (void) server; - (void) timestamp; - (void) payload; - m_lastShaderCompilerErrorMessage = error; -} - - -REGISTER_UNIT_TEST(ShaderCompilerUnitTest) - diff --git a/Code/Tools/AssetProcessor/native/unittests/ShaderCompilerUnitTests.h b/Code/Tools/AssetProcessor/native/unittests/ShaderCompilerUnitTests.h deleted file mode 100644 index edcff7e949..0000000000 --- a/Code/Tools/AssetProcessor/native/unittests/ShaderCompilerUnitTests.h +++ /dev/null @@ -1,81 +0,0 @@ -/* - * Copyright (c) Contributors to the Open 3D Engine Project. - * For complete copyright and license terms please see the LICENSE at the root of this distribution. - * - * SPDX-License-Identifier: Apache-2.0 OR MIT - * - */ -#ifndef SHADERCOMPILERUNITTEST_H -#define SHADERCOMPILERUNITTEST_H - -#if !defined(Q_MOC_RUN) -#include "UnitTestRunner.h" - -#include - -#include "native/shadercompiler/shadercompilerManager.h" -//#include "native/shadercompiler/shadercompilerMessages.h" -#include "native/utilities/UnitTestShaderCompilerServer.h" -#include -#include -#endif - -class ConnectionManager; - -class ShaderCompilerManagerForUnitTest : public ShaderCompilerManager -{ -public: - explicit ShaderCompilerManagerForUnitTest(QObject* parent = 0) : ShaderCompilerManager(parent) {}; - - // for this test, we override sendResponse and make it so that it just calls a callback instead of actually sending it to the connection manager. - void sendResponse(unsigned int connId, unsigned int type, unsigned int serial, QByteArray payload) override - { - if (m_sendResponseCallbackFn) - { - m_sendResponseCallbackFn(connId, type, serial, payload); - } - } - AZStd::function m_sendResponseCallbackFn; -}; - -class ShaderCompilerUnitTest - : public UnitTestRun -{ - Q_OBJECT -public: - ShaderCompilerUnitTest(); - ~ShaderCompilerUnitTest(); - virtual void StartTest() override; - virtual int UnitTestPriority() const override; - void ContructPayloadForShaderCompilerServer(QByteArray& payload); - -Q_SIGNALS: - void StartUnitTestForGoodShaderCompiler(); - void StartUnitTestForFirstBadShaderCompiler(); - void StartUnitTestForSecondBadShaderCompiler(); - void StartUnitTestForThirdBadShaderCompiler(); - -public Q_SLOTS: - void UnitTestForGoodShaderCompiler(); - void UnitTestForFirstBadShaderCompiler(); - void UnitTestForSecondBadShaderCompiler(); - void UnitTestForThirdBadShaderCompiler(); - void VerifyPayloadForGoodShaderCompiler(unsigned int connId, unsigned int type, unsigned int serial, QByteArray payload); - void VerifyPayloadForFirstBadShaderCompiler(unsigned int connId, unsigned int type, unsigned int serial, QByteArray payload); - void VerifyPayloadForSecondBadShaderCompiler(unsigned int connId, unsigned int type, unsigned int serial, QByteArray payload); - void VerifyPayloadForThirdBadShaderCompiler(unsigned int connId, unsigned int type, unsigned int serial, QByteArray payload); - void ReceiveShaderCompilerErrorMessage(QString error, QString server, QString timestamp, QString payload); - - -private: - UnitTestShaderCompilerServer m_server; - ShaderCompilerManagerForUnitTest m_shaderCompilerManager; - ConnectionManager* m_connectionManager; - QByteArray m_testPayload; - QString m_lastShaderCompilerErrorMessage; - unsigned int m_connectionId = 0; -}; - -#endif // SHADERCOMPILERUNITTEST_H - - diff --git a/Code/Tools/AssetProcessor/native/unittests/UnitTestRunner.h b/Code/Tools/AssetProcessor/native/unittests/UnitTestRunner.h index 0c4357f84a..7f3f3c859d 100644 --- a/Code/Tools/AssetProcessor/native/unittests/UnitTestRunner.h +++ b/Code/Tools/AssetProcessor/native/unittests/UnitTestRunner.h @@ -156,7 +156,6 @@ namespace UnitTestUtils bool OnPreWarning([[maybe_unused]] const char* window, [[maybe_unused]] const char* fileName, [[maybe_unused]] int line, [[maybe_unused]] const char* func, [[maybe_unused]] const char* message) override { - UnitTest::ColoredPrintf(UnitTest::COLOR_YELLOW, message); ++m_numWarningsAbsorbed; if (m_debugMessages) { @@ -167,7 +166,9 @@ namespace UnitTestUtils bool OnPreAssert([[maybe_unused]] const char* fileName, [[maybe_unused]] int line, [[maybe_unused]] const char* func, [[maybe_unused]] const char* message) override { - UnitTest::ColoredPrintf(UnitTest::COLOR_YELLOW, message); + // Print out absorbed asserts since asserts are pretty important and accidentally absorbing unintended ones can lead to difficult-to-detect issues + UnitTest::ColoredPrintf(UnitTest::COLOR_YELLOW, "Absorbed Assert: %s\n", message); + ++m_numAssertsAbsorbed; if (m_debugMessages) { @@ -178,7 +179,6 @@ namespace UnitTestUtils bool OnPreError([[maybe_unused]] const char* window, [[maybe_unused]] const char* fileName, [[maybe_unused]] int line, [[maybe_unused]] const char* func, [[maybe_unused]] const char* message) override { - UnitTest::ColoredPrintf(UnitTest::COLOR_YELLOW, message); ++m_numErrorsAbsorbed; if (m_debugMessages) { @@ -187,9 +187,8 @@ namespace UnitTestUtils return true; // I handled this, do not forward it } - bool OnPrintf(const char* /*window*/, const char* message) override + bool OnPrintf(const char* /*window*/, const char* /*message*/) override { - UnitTest::ColoredPrintf(UnitTest::COLOR_YELLOW, message); ++m_numMessagesAbsorbed; return true; } diff --git a/Code/Tools/AssetProcessor/native/utilities/ApplicationManager.cpp b/Code/Tools/AssetProcessor/native/utilities/ApplicationManager.cpp index a024ce6c7a..57884b304f 100644 --- a/Code/Tools/AssetProcessor/native/utilities/ApplicationManager.cpp +++ b/Code/Tools/AssetProcessor/native/utilities/ApplicationManager.cpp @@ -16,7 +16,8 @@ #include #include -#include "native/resourcecompiler/RCBuilder.h" +#include +#include #include #include @@ -200,6 +201,10 @@ ApplicationManager::~ApplicationManager() delete m_appDependencies[idx]; } + // end stats capture (dump and shutdown) + AssetProcessor::StatsCapture::Dump(); + AssetProcessor::StatsCapture::Shutdown(); + qInstallMessageHandler(nullptr); //deleting QCoreApplication/QApplication @@ -226,44 +231,6 @@ bool ApplicationManager::InitiatedShutdown() const return m_duringShutdown; } -void ApplicationManager::GetExternalBuilderFileList(QStringList& externalBuilderModules) -{ - externalBuilderModules.clear(); - - static const char* builder_folder_name = "Builders"; - - // LY_ASSET_BUILDERS is defined by the CMakeLists.txt. The asset builders add themselves to a variable that - // is populated to allow selective building of those asset builder targets. - // This allows left over Asset builders in the output directory to not be loaded by the AssetProcessor -#if !defined(LY_ASSET_BUILDERS) - #error LY_ASSET_BUILDERS was not defined for ApplicationManager.cpp -#endif - - QDir builderDir = QDir::toNativeSeparators(QString(this->m_frameworkApp.GetExecutableFolder())); - builderDir.cd(QString(builder_folder_name)); - if (builderDir.exists()) - { - AZStd::vector tokens; - AZ::StringFunc::Tokenize(AZStd::string_view(LY_ASSET_BUILDERS), tokens, ','); - AZStd::string builderLibrary; - for (const AZStd::string& token : tokens) - { - QString assetBuilderPath(token.c_str()); - if (builderDir.exists(assetBuilderPath)) - { - externalBuilderModules.push_back(builderDir.absoluteFilePath(assetBuilderPath)); - } - } - } - - if (externalBuilderModules.empty()) - { - AZ_TracePrintf(AssetProcessor::ConsoleChannel, "AssetProcessor was unable to locate any external builders\n"); - } -} - - - QDir ApplicationManager::GetSystemRoot() const { return m_systemRoot; @@ -454,15 +421,6 @@ void ApplicationManager::PopulateApplicationDependencies() m_filesOfInterest.push_back(dir.absoluteFilePath(pathWithPlatformExtension)); } - // Get the external builder modules to add to the files of interest - QStringList builderModuleFileList; - GetExternalBuilderFileList(builderModuleFileList); - for (const QString& builderModuleFile : builderModuleFileList) - { - m_filesOfInterest.push_back(builderModuleFile); - } - - QDir assetRoot; AssetUtilities::ComputeAssetRoot(assetRoot); @@ -571,6 +529,8 @@ bool ApplicationManager::StartAZFramework() bool ApplicationManager::ActivateModules() { + AssetProcessor::StatsCapture::BeginCaptureStat("LoadingModules"); + // we load the editor xml for our modules since it contains the list of gems we need for tools to function (not just runtime) connect(&m_frameworkApp, &AssetProcessorAZApplication::AssetProcessorStatus, this, [this](AssetProcessor::AssetProcessorStatusEntry entry) @@ -587,6 +547,8 @@ bool ApplicationManager::ActivateModules() } m_frameworkApp.LoadDynamicModules(); + + AssetProcessor::StatsCapture::EndCaptureStat("LoadingModules"); return true; } @@ -618,6 +580,9 @@ ApplicationManager::BeforeRunStatus ApplicationManager::BeforeRun() return ApplicationManager::BeforeRunStatus::Status_Failure; } + // enable stats capture from this point on + AssetProcessor::StatsCapture::Initialize(); + return ApplicationManager::BeforeRunStatus::Status_Success; } diff --git a/Code/Tools/AssetProcessor/native/utilities/ApplicationManager.h b/Code/Tools/AssetProcessor/native/utilities/ApplicationManager.h index 91cf2185b7..2ecea4e512 100644 --- a/Code/Tools/AssetProcessor/native/utilities/ApplicationManager.h +++ b/Code/Tools/AssetProcessor/native/utilities/ApplicationManager.h @@ -21,7 +21,6 @@ #include "native/assetprocessor.h" #endif -class FolderWatchCallbackEx; class QCoreApplication; namespace AZ @@ -139,7 +138,7 @@ protected: void RegisterObjectForQuit(QObject* source, bool insertInFront = false); bool NeedRestart() const; void addRunningThread(AssetProcessor::ThreadWorker* thread); - + template void RegisterInternalBuilder(const QString& builderName); @@ -151,9 +150,6 @@ protected: bool m_duringStartup = true; AssetProcessorAZApplication m_frameworkApp; QCoreApplication* m_qApp = nullptr; - - //! Get the list of external builder files for this asset processor - void GetExternalBuilderFileList(QStringList& externalBuilderModules); virtual void Reflect() = 0; virtual const char* GetLogBaseName() = 0; diff --git a/Code/Tools/AssetProcessor/native/utilities/ApplicationManagerBase.cpp b/Code/Tools/AssetProcessor/native/utilities/ApplicationManagerBase.cpp index 4e0bc7e434..36450c4e65 100644 --- a/Code/Tools/AssetProcessor/native/utilities/ApplicationManagerBase.cpp +++ b/Code/Tools/AssetProcessor/native/utilities/ApplicationManagerBase.cpp @@ -25,6 +25,7 @@ #include #include #include +#include #include @@ -32,9 +33,6 @@ #include -//! Amount of time to wait between checking the status of the AssetBuilder process -static const int s_MaximumSleepTimeMS = 10; - //! CreateJobs will wait up to 2 minutes before timing out //! This shouldn't need to be so high but very large slices can take a while to process currently //! This should be reduced down to something more reasonable after slice jobs are sped up @@ -64,6 +62,7 @@ ApplicationManagerBase::~ApplicationManagerBase() AZ::Debug::TraceMessageBus::Handler::BusDisconnect(); AssetProcessor::AssetBuilderRegistrationBus::Handler::BusDisconnect(); AssetBuilderSDK::AssetBuilderBus::Handler::BusDisconnect(); + AssetProcessor::AssetBuilderInfoBus::Handler::BusDisconnect(); if (m_settingsRegistryBuilder) { @@ -192,7 +191,7 @@ void ApplicationManagerBase::InitAssetProcessorManager() { m_assetProcessorManager->SetEnableModtimeSkippingFeature(true); } - + if (commandLine->HasSwitch(Command_enableQueryLogging.m_switch)) { m_assetProcessorManager->SetQueryLogging(true); @@ -206,7 +205,7 @@ void ApplicationManagerBase::InitAssetProcessorManager() { m_dependencyScanPattern = commandLine->GetSwitchValue(Command_dsp.m_switch, 0).c_str(); } - + m_fileDependencyScanPattern = "*"; if (commandLine->HasSwitch(Command_fileDependencyScanPattern.m_switch)) @@ -327,7 +326,7 @@ void ApplicationManagerBase::InitAssetCatalog() AssetProcessor::AssetCatalog* catalog = new AssetCatalog(assetCatalogHelper, m_platformConfiguration); // Using a direct connection so we know the catalog has been updated before continuing on with code might depend on the asset being in the catalog - connect(m_assetProcessorManager, &AssetProcessorManager::AssetMessage, catalog, &AssetCatalog::OnAssetMessage, Qt::DirectConnection); + connect(m_assetProcessorManager, &AssetProcessorManager::AssetMessage, catalog, &AssetCatalog::OnAssetMessage, Qt::DirectConnection); connect(m_assetProcessorManager, &AssetProcessorManager::SourceQueued, catalog, &AssetCatalog::OnSourceQueued); connect(m_assetProcessorManager, &AssetProcessorManager::SourceFinished, catalog, &AssetCatalog::OnSourceFinished); connect(m_assetProcessorManager, &AssetProcessorManager::PathDependencyResolved, catalog, &AssetCatalog::OnDependencyResolved); @@ -379,12 +378,12 @@ void ApplicationManagerBase::InitAssetScanner() QObject::connect(m_assetScanner, &AssetScanner::FilesFound, [this](QSet files) { m_fileStateCache->AddInfoSet(files); }); QObject::connect(m_assetScanner, &AssetScanner::FoldersFound, [this](QSet files) { m_fileStateCache->AddInfoSet(files); }); QObject::connect(m_assetScanner, &AssetScanner::ExcludedFound, [this](QSet files) { m_fileStateCache->AddInfoSet(files); }); - + // file table QObject::connect(m_assetScanner, &AssetScanner::AssetScanningStatusChanged, m_fileProcessor.get(), &FileProcessor::OnAssetScannerStatusChange); QObject::connect(m_assetScanner, &AssetScanner::FilesFound, m_fileProcessor.get(), &FileProcessor::AssessFilesFromScanner); QObject::connect(m_assetScanner, &AssetScanner::FoldersFound, m_fileProcessor.get(), &FileProcessor::AssessFoldersFromScanner); - + } void ApplicationManagerBase::DestroyAssetScanner() @@ -434,61 +433,77 @@ void ApplicationManagerBase::DestroyPlatformConfiguration() void ApplicationManagerBase::InitFileMonitor() { - m_folderWatches.reserve(m_platformConfiguration->GetScanFolderCount()); - m_watchHandles.reserve(m_platformConfiguration->GetScanFolderCount()); for (int folderIdx = 0; folderIdx < m_platformConfiguration->GetScanFolderCount(); ++folderIdx) { const AssetProcessor::ScanFolderInfo& info = m_platformConfiguration->GetScanFolderAt(folderIdx); - - FolderWatchCallbackEx* newFolderWatch = new FolderWatchCallbackEx(info.ScanPath(), "", info.RecurseSubFolders()); - // hook folder watcher to assess files on add/modify - // relevant files will be sent to resource compiler - QObject::connect(newFolderWatch, &FolderWatchCallbackEx::fileAdded, - m_assetProcessorManager, &AssetProcessor::AssetProcessorManager::AssessAddedFile); - QObject::connect(newFolderWatch, &FolderWatchCallbackEx::fileModified, - m_assetProcessorManager, &AssetProcessor::AssetProcessorManager::AssessModifiedFile); - QObject::connect(newFolderWatch, &FolderWatchCallbackEx::fileRemoved, - m_assetProcessorManager, &AssetProcessor::AssetProcessorManager::AssessDeletedFile); - - QObject::connect(newFolderWatch, &FolderWatchCallbackEx::fileAdded, [this](QString path) { m_fileStateCache->AddFile(path); }); - QObject::connect(newFolderWatch, &FolderWatchCallbackEx::fileModified, [this](QString path) { m_fileStateCache->UpdateFile(path); }); - QObject::connect(newFolderWatch, &FolderWatchCallbackEx::fileRemoved, [this](QString path) { m_fileStateCache->RemoveFile(path); }); - - QObject::connect(newFolderWatch, &FolderWatchCallbackEx::fileAdded, - m_fileProcessor.get(), &AssetProcessor::FileProcessor::AssessAddedFile); - QObject::connect(newFolderWatch, &FolderWatchCallbackEx::fileRemoved, - m_fileProcessor.get(), &AssetProcessor::FileProcessor::AssessDeletedFile); - - m_folderWatches.push_back(AZStd::unique_ptr(newFolderWatch)); - m_watchHandles.push_back(m_fileWatcher.AddFolderWatch(newFolderWatch)); + m_fileWatcher.AddFolderWatch(info.ScanPath(), info.RecurseSubFolders()); } - // also hookup monitoring for the cache (output directory) QDir cacheRoot; if (AssetUtilities::ComputeProjectCacheRoot(cacheRoot)) { - FolderWatchCallbackEx* newFolderWatch = new FolderWatchCallbackEx(cacheRoot.absolutePath(), "", true); + m_fileWatcher.AddFolderWatch(cacheRoot.absolutePath(), true); + } - QObject::connect(newFolderWatch, &FolderWatchCallbackEx::fileAdded, [this](QString path) { m_fileStateCache->AddFile(path); }); - QObject::connect(newFolderWatch, &FolderWatchCallbackEx::fileModified, [this](QString path) { m_fileStateCache->UpdateFile(path); }); - QObject::connect(newFolderWatch, &FolderWatchCallbackEx::fileRemoved, [this](QString path) { m_fileStateCache->RemoveFile(path); }); + if (m_platformConfiguration->GetScanFolderCount() || !cacheRoot.path().isEmpty()) + { + const auto cachePath = QDir::toNativeSeparators(cacheRoot.absolutePath()); - // we only care about cache root deletions. - QObject::connect(newFolderWatch, &FolderWatchCallbackEx::fileRemoved, - m_assetProcessorManager, &AssetProcessor::AssetProcessorManager::AssessDeletedFile); + const auto OnFileAdded = [this, cachePath](QString path) + { + const bool isCacheRoot = path.startsWith(cachePath); + if (isCacheRoot) + { + m_fileStateCache->AddFile(path); + } + else + { + m_assetProcessorManager->AssessAddedFile(path); + m_fileStateCache->AddFile(path); + AZ::Interface::Get()->FileAdded(path); + m_fileProcessor->AssetProcessor::FileProcessor::AssessAddedFile(path); + } + }; - m_folderWatches.push_back(AZStd::unique_ptr(newFolderWatch)); - m_watchHandles.push_back(m_fileWatcher.AddFolderWatch(newFolderWatch)); + const auto OnFileModified = [this, cachePath](QString path) + { + const bool isCacheRoot = path.startsWith(cachePath); + if (isCacheRoot) + { + m_assetProcessorManager->AssessModifiedFile(path); + } + else + { + m_assetProcessorManager->AssessModifiedFile(path); + m_fileStateCache->UpdateFile(path); + } + }; + + const auto OnFileRemoved = [this, cachePath](QString path) + { + const bool isCacheRoot = path.startsWith(cachePath); + if (isCacheRoot) + { + m_fileStateCache->RemoveFile(path); + m_assetProcessorManager->AssessDeletedFile(path); + } + else + { + m_assetProcessorManager->AssessDeletedFile(path); + m_fileStateCache->RemoveFile(path); + m_fileProcessor->AssessDeletedFile(path); + } + }; + + connect(&m_fileWatcher, &FileWatcher::fileAdded, OnFileAdded); + connect(&m_fileWatcher, &FileWatcher::fileModified, OnFileModified); + connect(&m_fileWatcher, &FileWatcher::fileRemoved, OnFileRemoved); } } void ApplicationManagerBase::DestroyFileMonitor() { - for (int watchHandle : m_watchHandles) - { - m_fileWatcher.RemoveFolderWatch(watchHandle); - } - m_folderWatches.resize(0); + m_fileWatcher.ClearFolderWatches(); } void ApplicationManagerBase::DestroyApplicationServer() @@ -589,6 +604,51 @@ void ApplicationManagerBase::InitConnectionManager() }, AZStd::placeholders::_1, AZStd::placeholders::_2, AZStd::placeholders::_3, AZStd::placeholders::_4) ); + m_connectionManager->RegisterService( + AssetBuilder::BuilderRegistrationRequest::MessageType, + [this](unsigned int /*connId*/, unsigned int /*type*/, unsigned int /*serial*/, QByteArray payload, QString) + { + AssetBuilder::BuilderRegistrationRequest registrationRequest; + + if (m_builderRegistrationComplete) + { + return; + } + + m_builderRegistrationComplete = true; + + if (AssetProcessor::UnpackMessage(payload, registrationRequest)) + { + for (const auto& builder : registrationRequest.m_builders) + { + AssetBuilderSDK::AssetBuilderDesc desc; + desc.m_name = builder.m_name; + desc.m_patterns = builder.m_patterns; + desc.m_version = builder.m_version; + desc.m_analysisFingerprint = builder.m_analysisFingerprint; + desc.m_flags = builder.m_flags; + desc.m_busId = builder.m_busId; + desc.m_flagsByJobKey = builder.m_flagsByJobKey; + desc.m_productsToKeepOnFailure = builder.m_productsToKeepOnFailure; + + // Builders registered this way are always external builders + desc.m_builderType = AssetBuilderSDK::AssetBuilderDesc::AssetBuilderType::External; + + RegisterBuilderInformation(desc); + } + + QTimer::singleShot( + 0, this, + [this]() + { + if (!PostActivate()) + { + QuitRequested(); + } + }); + } + }); + //You can get Asset Processor Current State using AzFramework::AssetSystem::RequestAssetProcessorStatus; auto GetState = [this](unsigned int connId, unsigned int, unsigned int serial, QByteArray payload, QString) @@ -631,11 +691,11 @@ void ApplicationManagerBase::InitConnectionManager() AssetProcessorPlatformStatusRequest requestMessage; if (AssetProcessor::UnpackMessage(payload, requestMessage)) { - AzToolsFramework::AssetSystemRequestBus::BroadcastResult(responseMessage.m_isPlatformEnabled, + AzToolsFramework::AssetSystemRequestBus::BroadcastResult(responseMessage.m_isPlatformEnabled, &AzToolsFramework::AssetSystemRequestBus::Events::IsAssetPlatformEnabled, requestMessage.m_platform.c_str()); } - AssetProcessor::ConnectionBus::Event(connId, + AssetProcessor::ConnectionBus::Event(connId, &AssetProcessor::ConnectionBus::Events::SendResponse, serial, responseMessage); }); @@ -651,11 +711,11 @@ void ApplicationManagerBase::InitConnectionManager() if (AssetProcessor::UnpackMessage(payload, requestMessage)) { const char* platformIdentifier = requestMessage.m_platform.c_str(); - responseMessage.m_numberOfPendingJobs = + responseMessage.m_numberOfPendingJobs = GetRCController()->NumberOfPendingJobsPerPlatform(platformIdentifier); } - AssetProcessor::ConnectionBus::Event(connId, + AssetProcessor::ConnectionBus::Event(connId, &AssetProcessor::ConnectionBus::Events::SendResponse, serial, responseMessage); }); } @@ -694,7 +754,7 @@ void ApplicationManagerBase::InitAssetRequestHandler(AssetProcessor::AssetReques QObject::connect(GetAssetProcessorManager(), &AssetProcessorManager::SendAssetExistsResponse, m_assetRequestHandler, &AssetRequestHandler::OnRequestAssetExistsResponse); QObject::connect(GetAssetProcessorManager(), &AssetProcessorManager::FenceFileDetected, m_assetRequestHandler, &AssetRequestHandler::OnFenceFileDetected); - + // connect the Asset Request Handler to RC: QObject::connect(m_assetRequestHandler, &AssetRequestHandler::RequestCompileGroup, GetRCController(), &RCController::OnRequestCompileGroup); QObject::connect(m_assetRequestHandler, &AssetRequestHandler::RequestEscalateAssetBySearchTerm, GetRCController(), &RCController::OnEscalateJobsBySearchTerm); @@ -752,8 +812,6 @@ ApplicationManager::BeforeRunStatus ApplicationManagerBase::BeforeRun() qRegisterMetaType("AzFramework::AssetSystem::AssetStatus"); qRegisterMetaType("AssetStatus"); - qRegisterMetaType("FileChangeInfo"); - qRegisterMetaType("AssetScanningStatus"); qRegisterMetaType("NetworkRequestID"); @@ -838,14 +896,6 @@ bool ApplicationManagerBase::Run() return false; } - bool startedSuccessfully = true; - - if (!PostActivate()) - { - QuitRequested(); - startedSuccessfully = false; - } - AZ_Printf(AssetProcessor::ConsoleChannel, "Asset Processor Batch Processing Started.\n"); AZ_Printf(AssetProcessor::ConsoleChannel, "-----------------------------------------\n"); QElapsedTimer allAssetsProcessingTimer; @@ -865,7 +915,7 @@ bool ApplicationManagerBase::Run() RemoveOldTempFolders(); Destroy(); - return (startedSuccessfully && FailedAssetsCount() == 0); + return FailedAssetsCount() == 0; } void ApplicationManagerBase::HandleFileRelocation() const @@ -897,7 +947,7 @@ void ApplicationManagerBase::HandleFileRelocation() const while(!m_sourceControlReady) { // We need to wait for source control to be ready before continuing - + if (printCounter % 10 == 0) { AZ_TracePrintf(AssetProcessor::ConsoleChannel, "Waiting for Source Control connection\n"); @@ -964,18 +1014,18 @@ void ApplicationManagerBase::HandleFileRelocation() const AZ_Printf(AssetProcessor::ConsoleChannel, "SETTING: Preview file move. Run again with --%s to actually make changes\n", ConfirmCommand); } - auto* interface = AZ::Interface::Get(); + auto* relocationInterface = AZ::Interface::Get(); - if(interface) + if(relocationInterface) { - auto result = interface->Move(source, destination, previewOnly, allowBrokenDependencies, !leaveEmptyFolders, updateReferences, excludeMetaDataFiles); + auto result = relocationInterface->Move(source, destination, previewOnly, allowBrokenDependencies, !leaveEmptyFolders, updateReferences, excludeMetaDataFiles); if (result.IsSuccess()) { AssetProcessor::RelocationSuccess success = result.TakeValue(); // The report can be too long for the AZ_Printf buffer, so split it into individual lines - AZStd::string report = interface->BuildReport(success.m_relocationContainer, success.m_updateTasks, true, updateReferences); + AZStd::string report = relocationInterface->BuildReport(success.m_relocationContainer, success.m_updateTasks, true, updateReferences); AZStd::vector lines; AzFramework::StringFunc::Tokenize(report.c_str(), lines, "\n"); @@ -1049,18 +1099,18 @@ void ApplicationManagerBase::HandleFileRelocation() const AZ_Printf(AssetProcessor::ConsoleChannel, "SETTING: Preview file delete. Run again with --%s to actually make changes\n", ConfirmCommand); } - auto* interface = AZ::Interface::Get(); + auto* relocationInterface = AZ::Interface::Get(); - if (interface) + if (relocationInterface) { - auto result = interface->Delete(source, previewOnly, allowBrokenDependencies, !leaveEmptyFolders, excludeMetaDataFiles); + auto result = relocationInterface->Delete(source, previewOnly, allowBrokenDependencies, !leaveEmptyFolders, excludeMetaDataFiles); if (result.IsSuccess()) { AssetProcessor::RelocationSuccess success = result.TakeValue(); // The report can be too long for the AZ_Printf buffer, so split it into individual lines - AZStd::string report = interface->BuildReport(success.m_relocationContainer, success.m_updateTasks, false, updateReferences); + AZStd::string report = relocationInterface->BuildReport(success.m_relocationContainer, success.m_updateTasks, false, updateReferences); AZStd::vector lines; AzFramework::StringFunc::Tokenize(report.c_str(), lines, "\n"); @@ -1127,7 +1177,7 @@ void ApplicationManagerBase::CheckForIdle() TryScanProductDependencies(); TryHandleFileRelocation(); - + // since we are shutting down, we save the registry and then we quit. AZ_Printf(AssetProcessor::ConsoleChannel, "No assets remain in the build queue. Saving the catalog, and then shutting down.\n"); // stop accepting any further idle messages, as we will shut down - don't want this function to repeat! @@ -1171,6 +1221,7 @@ void ApplicationManagerBase::InitBuilderManager() { m_builderManager->ConnectionLost(connId); }); + } void ApplicationManagerBase::ShutdownBuilderManager() @@ -1204,7 +1255,7 @@ void ApplicationManagerBase::ShutDownAssetDatabase() AzToolsFramework::AssetDatabase::AssetDatabaseRequests::Bus::Handler::BusDisconnect(); } -void ApplicationManagerBase::InitFileProcessor() +void ApplicationManagerBase::InitFileProcessor() { AssetProcessor::ThreadController* fileProcessorHelper = new AssetProcessor::ThreadController(); @@ -1295,22 +1346,13 @@ bool ApplicationManagerBase::Activate() } InitBuilderConfiguration(); - - m_isCurrentlyLoadingGems = true; - if (!ActivateModules()) - { - // ActivateModules reports any errors it encounters. - m_isCurrentlyLoadingGems = false; - return false; - } - - m_isCurrentlyLoadingGems = false; PopulateApplicationDependencies(); InitAssetProcessorManager(); AssetBuilderSDK::InitializeSerializationContext(); AssetBuilderSDK::InitializeBehaviorContext(); - + AssetBuilder::InitializeSerializationContext(); + InitFileStateCache(); InitFileProcessor(); @@ -1338,7 +1380,7 @@ bool ApplicationManagerBase::Activate() RegisterObjectForQuit(m_rcController); m_connectionsToRemoveOnShutdown << QObject::connect( - m_assetProcessorManager, &AssetProcessor::AssetProcessorManager::AssetProcessorManagerIdleState, + m_assetProcessorManager, &AssetProcessor::AssetProcessorManager::AssetProcessorManagerIdleState, this, [this](bool state) { if (state) @@ -1359,7 +1401,7 @@ bool ApplicationManagerBase::Activate() }); m_connectionsToRemoveOnShutdown << QObject::connect( - this, &ApplicationManagerBase::CheckAssetProcessorManagerIdleState, + this, &ApplicationManagerBase::CheckAssetProcessorManagerIdleState, m_assetProcessorManager, &AssetProcessor::AssetProcessorManager::CheckAssetProcessorIdleState); MakeActivationConnections(); @@ -1373,6 +1415,22 @@ bool ApplicationManagerBase::Activate() return false; } } + + AssetProcessor::AssetProcessorStatusEntry entry(AssetProcessor::AssetProcessorStatus::Initializing_Builders, 0, QString()); + Q_EMIT AssetProcessorStatusChanged(entry); + + AZStd::thread_desc desc; + desc.m_name = "Builder Component Registration"; + AZStd::thread builderRegistrationThread( + desc, + []() + { + AssetProcessor::BuilderRef builder; + AssetProcessor::BuilderManagerBus::BroadcastResult(builder, &AssetProcessor::BuilderManagerBus::Events::GetBuilder, true); + }); + + builderRegistrationThread.detach(); + return true; } @@ -1381,11 +1439,6 @@ bool ApplicationManagerBase::PostActivate() m_connectionManager->LoadConnections(); InitializeInternalBuilders(); - if (!InitializeExternalBuilders()) - { - AZ_Error("AssetProcessor", false, "AssetProcessor is closing. Failed to initialize and load all the external builders. Please ensure that Builders_Temp directory is not read-only. Please see log for more information.\n"); - return false; - } Q_EMIT OnBuildersRegistered(); @@ -1398,7 +1451,7 @@ bool ApplicationManagerBase::PostActivate() AZ::SystemTickBus::Broadcast(&AZ::SystemTickEvents::OnSystemTick); }); - // now that everything is up and running, we start scanning. Before this, we don't want file events to start percolating through the + // now that everything is up and running, we start scanning. Before this, we don't want file events to start percolating through the // asset system. GetAssetScanner()->StartScan(); @@ -1422,124 +1475,20 @@ bool ApplicationManagerBase::InitializeInternalBuilders() return result; } -bool ApplicationManagerBase::InitializeExternalBuilders() -{ - AssetProcessor::AssetProcessorStatusEntry entry(AssetProcessor::AssetProcessorStatus::Initializing_Builders); - Q_EMIT AssetProcessorStatusChanged(entry); - QCoreApplication::processEvents(QEventLoop::AllEvents); - - - // Get the list of external build modules (full paths) - QStringList fileList; - GetExternalBuilderFileList(fileList); - - for (const QString& filePath : fileList) - { - if (QLibrary::isLibrary(filePath)) - { - AssetProcessor::ExternalModuleAssetBuilderInfo* externalAssetBuilderInfo = new AssetProcessor::ExternalModuleAssetBuilderInfo(filePath); - AssetProcessor::AssetBuilderType assetBuilderType = externalAssetBuilderInfo->Load(); - AZ_TracePrintf(AssetProcessor::ConsoleChannel, "AssetProcessor is loading library %s\n", filePath.toUtf8().data()); - if (assetBuilderType == AssetProcessor::AssetBuilderType::None) - { - AZ_Warning(AssetProcessor::DebugChannel, false, "Non-builder DLL was found in Builders directory %s, skipping. \n", filePath.toUtf8().data()); - delete externalAssetBuilderInfo; - continue; - } - - if (assetBuilderType == AssetProcessor::AssetBuilderType::Invalid) - { - AZ_Warning(AssetProcessor::DebugChannel, false, "AssetProcessor was not able to load the library: %s\n", filePath.toUtf8().data()); - delete externalAssetBuilderInfo; - return false; - } - - AZ_TracePrintf(AssetProcessor::ConsoleChannel, "Initializing and registering builder %s\n", externalAssetBuilderInfo->GetName().toUtf8().data()); - - m_currentExternalAssetBuilder = externalAssetBuilderInfo; - - externalAssetBuilderInfo->Initialize(); - - m_currentExternalAssetBuilder = nullptr; - - m_externalAssetBuilders.push_back(externalAssetBuilderInfo); - } - } - - // Also init external builders which may be inside of Gems - AzToolsFramework::ToolsApplicationRequestBus::Broadcast( - &AzToolsFramework::ToolsApplicationRequests::CreateAndAddEntityFromComponentTags, - AZStd::vector({ AssetBuilderSDK::ComponentTags::AssetBuilder }), "AssetBuilders Entity"); - - return true; -} - -bool ApplicationManagerBase::WaitForBuilderExit(AzFramework::ProcessWatcher* processWatcher, AssetBuilderSDK::JobCancelListener* jobCancelListener, AZ::u32 processTimeoutLimitInSeconds) -{ - AZ::u32 exitCode = 0; - bool finishedOK = false; - QElapsedTimer ticker; - CommunicatorTracePrinter tracer(processWatcher->GetCommunicator(), "AssetBuilder"); - - ticker.start(); - - while (!finishedOK) - { - AZStd::this_thread::sleep_for(AZStd::chrono::milliseconds(s_MaximumSleepTimeMS)); - - tracer.Pump(); - - if (ticker.elapsed() > processTimeoutLimitInSeconds * 1000 || (jobCancelListener && jobCancelListener->IsCancelled())) - { - break; - } - - if (!processWatcher->IsProcessRunning(&exitCode)) - { - finishedOK = true; // we either cant wait for it, or it finished. - break; - } - } - - tracer.Pump(); // empty whats left if possible. - - if (processWatcher->IsProcessRunning(&exitCode)) - { - processWatcher->TerminateProcess(1); - } - - if (exitCode != 0) - { - AZ_Error(AssetProcessor::ConsoleChannel, false, "AssetBuilder exited with error code %d", exitCode); - return false; - } - else if (jobCancelListener && jobCancelListener->IsCancelled()) - { - AZ_TracePrintf(AssetProcessor::DebugChannel, "AssetBuilder was terminated. There was a request to cancel the job.\n"); - return false; - } - else if (!finishedOK) - { - AZ_Error(AssetProcessor::ConsoleChannel, false, "AssetBuilder failed to terminate within %d seconds", processTimeoutLimitInSeconds); - return false; - } - - return true; -} - void ApplicationManagerBase::RegisterBuilderInformation(const AssetBuilderSDK::AssetBuilderDesc& builderDesc) { - // Create Job Function validation - AZ_Error(AssetProcessor::ConsoleChannel, - builderDesc.m_createJobFunction, - "Create Job Function (m_createJobFunction) for %s builder is empty.\n", - builderDesc.m_name.c_str()); + if (!builderDesc.IsExternalBuilder()) + { + // Create Job Function validation + AZ_Error( + AssetProcessor::ConsoleChannel, builderDesc.m_createJobFunction, + "Create Job Function (m_createJobFunction) for %s builder is empty.\n", builderDesc.m_name.c_str()); - // Process Job Function validation - AZ_Error(AssetProcessor::ConsoleChannel, - builderDesc.m_processJobFunction, - "Process Job Function (m_processJobFunction) for %s builder is empty.\n", - builderDesc.m_name.c_str()); + // Process Job Function validation + AZ_Error( + AssetProcessor::ConsoleChannel, builderDesc.m_processJobFunction, + "Process Job Function (m_processJobFunction) for %s builder is empty.\n", builderDesc.m_name.c_str()); + } // Bus ID validation AZ_Error(AssetProcessor::ConsoleChannel, @@ -1547,67 +1496,66 @@ void ApplicationManagerBase::RegisterBuilderInformation(const AssetBuilderSDK::A "Bus ID for %s builder is empty.\n", builderDesc.m_name.c_str()); - // This is an external builder registering, we will want to track its builder desc since it can register multiple ones - AZStd::string builderFilePath; - if (m_currentExternalAssetBuilder) - { - m_currentExternalAssetBuilder->RegisterBuilderDesc(builderDesc.m_busId); - builderFilePath = m_currentExternalAssetBuilder->GetModuleFullPath().toUtf8().data(); - } - AssetBuilderSDK::AssetBuilderDesc modifiedBuilderDesc = builderDesc; // Allow for overrides defined in a BuilderConfig.ini file to update our code defined default values AssetProcessor::BuilderConfigurationRequestBus::Broadcast(&AssetProcessor::BuilderConfigurationRequests::UpdateBuilderDescriptor, builderDesc.m_name, modifiedBuilderDesc); if (builderDesc.IsExternalBuilder()) { - // We're going to override the createJob function so we can run it externally in AssetBuilder, rather than having it run inside the AP - modifiedBuilderDesc.m_createJobFunction = [builderFilePath](const AssetBuilderSDK::CreateJobsRequest& request, AssetBuilderSDK::CreateJobsResponse& response) + // We're going to override the createJob function so we can run it externally in AssetBuilder, rather than having it run + // inside the AP + modifiedBuilderDesc.m_createJobFunction = + [](const AssetBuilderSDK::CreateJobsRequest& request, AssetBuilderSDK::CreateJobsResponse& response) + { + AssetProcessor::BuilderRef builderRef; + AssetProcessor::BuilderManagerBus::BroadcastResult(builderRef, &AssetProcessor::BuilderManagerBusTraits::GetBuilder, false); + + if (builderRef) { - AssetProcessor::BuilderRef builderRef; - AssetProcessor::BuilderManagerBus::BroadcastResult(builderRef, &AssetProcessor::BuilderManagerBusTraits::GetBuilder); + int retryCount = 0; + AssetProcessor::BuilderRunJobOutcome result; - if (builderRef) + do { - int retryCount = 0; - AssetProcessor::BuilderRunJobOutcome result; - - do - { - retryCount++; - result = builderRef->RunJob(request, response, s_MaximumCreateJobsTimeSeconds, "create", builderFilePath, nullptr); - } while (result == AssetProcessor::BuilderRunJobOutcome::LostConnection && retryCount <= AssetProcessor::RetriesForJobNetworkError); - } - else - { - AZ_Error("AssetProcessor", false, "Failed to retrieve a valid builder to process job"); - } - }; + retryCount++; + result = builderRef->RunJob( + request, response, s_MaximumCreateJobsTimeSeconds, "create", "", nullptr); + } while (result == AssetProcessor::BuilderRunJobOutcome::LostConnection && + retryCount <= AssetProcessor::RetriesForJobNetworkError); + } + else + { + AZ_Error("AssetProcessor", false, "Failed to retrieve a valid builder to process job"); + } + }; // Also override the processJob function to run externally - modifiedBuilderDesc.m_processJobFunction = [builderFilePath](const AssetBuilderSDK::ProcessJobRequest& request, AssetBuilderSDK::ProcessJobResponse& response) + modifiedBuilderDesc.m_processJobFunction = + [](const AssetBuilderSDK::ProcessJobRequest& request, AssetBuilderSDK::ProcessJobResponse& response) + { + AssetBuilderSDK::JobCancelListener jobCancelListener(request.m_jobId); + + AssetProcessor::BuilderRef builderRef; + AssetProcessor::BuilderManagerBus::BroadcastResult(builderRef, &AssetProcessor::BuilderManagerBusTraits::GetBuilder, false); + + if (builderRef) { - AssetBuilderSDK::JobCancelListener jobCancelListener(request.m_jobId); + int retryCount = 0; + AssetProcessor::BuilderRunJobOutcome result; - AssetProcessor::BuilderRef builderRef; - AssetProcessor::BuilderManagerBus::BroadcastResult(builderRef, &AssetProcessor::BuilderManagerBusTraits::GetBuilder); - - if (builderRef) + do { - int retryCount = 0; - AssetProcessor::BuilderRunJobOutcome result; - - do - { - retryCount++; - result = builderRef->RunJob(request, response, s_MaximumProcessJobsTimeSeconds, "process", builderFilePath, &jobCancelListener, request.m_tempDirPath); - } while (result == AssetProcessor::BuilderRunJobOutcome::LostConnection && retryCount <= AssetProcessor::RetriesForJobNetworkError); - } - else - { - AZ_Error("AssetProcessor", false, "Failed to retrieve a valid builder to process job"); - } - }; + retryCount++; + result = builderRef->RunJob( + request, response, s_MaximumProcessJobsTimeSeconds, "process", "", &jobCancelListener, request.m_tempDirPath); + } while (result == AssetProcessor::BuilderRunJobOutcome::LostConnection && + retryCount <= AssetProcessor::RetriesForJobNetworkError); + } + else + { + AZ_Error("AssetProcessor", false, "Failed to retrieve a valid builder to process job"); + } + }; } if (m_builderDescMap.find(modifiedBuilderDesc.m_busId) != m_builderDescMap.end()) @@ -1765,7 +1713,7 @@ bool ApplicationManagerBase::CheckSufficientDiskSpace(const QString& savePath, q [[maybe_unused]] bool result = AzToolsFramework::ToolsFileUtils::GetFreeDiskSpace(savePath, bytesFree); AZ_Assert(result, "Unable to determine the amount of free space on drive containing path (%s).", savePath.toUtf8().constData()); - + if (bytesFree < requiredSpace + s_ReservedDiskSpaceInBytes) { if (shutdownIfInsufficient) @@ -1803,8 +1751,8 @@ void ApplicationManagerBase::RemoveOldTempFolders() return; } - // We will remove old temp folders if either their modified time is older than the cutoff time or - // if the total number of temp folders have exceeded the maximum number of temp folders. + // We will remove old temp folders if either their modified time is older than the cutoff time or + // if the total number of temp folders have exceeded the maximum number of temp folders. QFileInfoList entries = root.entryInfoList(QDir::Dirs | QDir::NoDotAndDotDot, QDir::Time); // sorting by modification time int folderCount = 0; bool removeFolder = false; @@ -1818,9 +1766,9 @@ void ApplicationManagerBase::RemoveOldTempFolders() // Since we are sorting the folders list from latest to oldest, we will either be in a state where we have to delete all the remaining folders or not // because either we have reached the folder limit or reached the cutoff date limit. - removeFolder = removeFolder || (folderCount++ >= s_MaximumTempFolders) || + removeFolder = removeFolder || (folderCount++ >= s_MaximumTempFolders) || (entry.lastModified() < cutoffTime); - + if (removeFolder) { QDir dir(entry.absoluteFilePath()); @@ -1834,8 +1782,6 @@ void ApplicationManagerBase::ConnectivityStateChanged(const AzToolsFramework::So Q_EMIT SourceControlReady(); } - - void ApplicationManagerBase::OnAssetProcessorManagerIdleState(bool isIdle) { // these can come in during shutdown. diff --git a/Code/Tools/AssetProcessor/native/utilities/ApplicationManagerBase.h b/Code/Tools/AssetProcessor/native/utilities/ApplicationManagerBase.h index 886880df3a..8591228375 100644 --- a/Code/Tools/AssetProcessor/native/utilities/ApplicationManagerBase.h +++ b/Code/Tools/AssetProcessor/native/utilities/ApplicationManagerBase.h @@ -47,7 +47,6 @@ namespace AssetProcessor class ApplicationServer; class ConnectionManager; -class FolderWatchCallbackEx; class ControlRequestHandler; class ApplicationManagerBase @@ -149,7 +148,6 @@ protected: void CreateQtApplication() override; bool InitializeInternalBuilders(); - bool InitializeExternalBuilders(); void InitBuilderManager(); void ShutdownBuilderManager(); bool InitAssetDatabase(); @@ -173,8 +171,6 @@ protected: AssetProcessor::AssetCatalog* GetAssetCatalog() const { return m_assetCatalog; } - static bool WaitForBuilderExit(AzFramework::ProcessWatcher* processWatcher, AssetBuilderSDK::JobCancelListener* jobCancelListener, AZ::u32 processTimeoutLimitInSeconds); - ApplicationServer* m_applicationServer = nullptr; ConnectionManager* m_connectionManager = nullptr; @@ -195,9 +191,7 @@ protected: bool m_sourceControlReady = false; bool m_fullIdle = false; - AZStd::vector > m_folderWatches; FileWatcher m_fileWatcher; - AZStd::vector m_watchHandles; AssetProcessor::PlatformConfiguration* m_platformConfiguration = nullptr; AssetProcessor::AssetProcessorManager* m_assetProcessorManager = nullptr; AssetProcessor::AssetCatalog* m_assetCatalog = nullptr; @@ -218,6 +212,8 @@ protected: AZStd::shared_ptr m_internalBuilder; AZStd::shared_ptr m_settingsRegistryBuilder; + bool m_builderRegistrationComplete = false; + // Builder description map based on the builder id AZStd::unordered_map m_builderDescMap; @@ -231,7 +227,7 @@ protected: AZStd::list m_externalAssetBuilders; AssetProcessor::ExternalModuleAssetBuilderInfo* m_currentExternalAssetBuilder = nullptr; - + QAtomicInt m_connectionsAwaitingAssetCatalogSave = 0; int m_remainingAPMJobs = 0; bool m_assetProcessorManagerIsReady = false; diff --git a/Code/Tools/AssetProcessor/native/utilities/AssetBuilderInfo.h b/Code/Tools/AssetProcessor/native/utilities/AssetBuilderInfo.h index 5ace9e1aaf..20a1d808fd 100644 --- a/Code/Tools/AssetProcessor/native/utilities/AssetBuilderInfo.h +++ b/Code/Tools/AssetProcessor/native/utilities/AssetBuilderInfo.h @@ -23,7 +23,6 @@ #include #include -class FolderWatchCallbackEx; class QCoreApplication; namespace AssetProcessor diff --git a/Code/Tools/AssetProcessor/native/utilities/BuilderManager.cpp b/Code/Tools/AssetProcessor/native/utilities/BuilderManager.cpp index 751afc1a5d..75c84630f5 100644 --- a/Code/Tools/AssetProcessor/native/utilities/BuilderManager.cpp +++ b/Code/Tools/AssetProcessor/native/utilities/BuilderManager.cpp @@ -16,6 +16,7 @@ #include #include #include +#include namespace AssetProcessor { @@ -138,7 +139,7 @@ namespace AssetProcessor } } - bool Builder::Start() + bool Builder::Start(bool doRegistration) { // Get the current BinXXX folder based on the current running AP QString applicationDir = QCoreApplication::instance()->applicationDirPath(); @@ -155,7 +156,7 @@ namespace AssetProcessor return false; } - const AZStd::string params = BuildParams("resident", buildersFolder.c_str(), UuidString(), "", ""); + const AZStd::vector params = BuildParams("resident", buildersFolder.c_str(), UuidString(), "", "", doRegistration); m_processWatcher = LaunchProcess(fullExePathString.c_str(), params); @@ -164,7 +165,7 @@ namespace AssetProcessor return false; } - m_tracePrinter = AZStd::make_unique(m_processWatcher->GetCommunicator(), "AssetBuilder"); + m_tracePrinter = AZStd::make_unique(m_processWatcher->GetCommunicator(), "AssetBuilder"); return WaitForConnection(); } @@ -179,7 +180,7 @@ namespace AssetProcessor return !m_processWatcher || (m_processWatcher && m_processWatcher->IsProcessRunning(exitCode)); } - AZStd::string Builder::BuildParams(const char* task, const char* moduleFilePath, const AZStd::string& builderGuid, const AZStd::string& jobDescriptionFile, const AZStd::string& jobResponseFile) const + AZStd::vector Builder::BuildParams(const char* task, const char* moduleFilePath, const AZStd::string& builderGuid, const AZStd::string& jobDescriptionFile, const AZStd::string& jobResponseFile, bool doRegistration) const { QDir projectCacheRoot; AssetUtilities::ComputeProjectCacheRoot(projectCacheRoot); @@ -191,35 +192,29 @@ namespace AssetProcessor int portNumber = 0; ApplicationServerBus::BroadcastResult(portNumber, &ApplicationServerBus::Events::GetServerListeningPort); - AZStd::string params; -#if !AZ_TRAIT_OS_PLATFORM_APPLE && !AZ_TRAIT_OS_USE_WINDOWS_FILE_PATHS - params = AZStd::string::format( - R"(-task=%s -id="%s" -project-name="%s" -project-cache-path="%s" -project-path="%s" -engine-path="%s" -port %d)", - task, builderGuid.c_str(), projectName.c_str(), projectCacheRoot.absolutePath().toUtf8().constData(), - projectPath.c_str(), enginePath.c_str(), portNumber); -#else - params = AZStd::string::format( - R"(-task=%s -id="%s" -project-name="\"%s\"" -project-cache-path="\"%s\"" -project-path="\"%s\"" -engine-path="\"%s\"" -port %d)", - task, builderGuid.c_str(), projectName.c_str(), projectCacheRoot.absolutePath().toUtf8().constData(), - projectPath.c_str(), enginePath.c_str(), portNumber); -#endif // !AZ_TRAIT_OS_PLATFORM_APPLE && !AZ_TRAIT_OS_USE_WINDOWS_FILE_PATHS + AZStd::vector params; + params.emplace_back(AZStd::string::format(R"(-task="%s")", task)); + params.emplace_back(AZStd::string::format(R"(-id="%s")", builderGuid.c_str())); + params.emplace_back(AZStd::string::format(R"(-project-name="%s")", projectName.c_str())); + params.emplace_back(AZStd::string::format(R"(-project-cache-path="%s")", projectCacheRoot.absolutePath().toUtf8().constData())); + params.emplace_back(AZStd::string::format(R"(-project-path="%s")", projectPath.c_str())); + params.emplace_back(AZStd::string::format(R"(-engine-path="%s")", enginePath.c_str())); + params.emplace_back(AZStd::string::format("-port=%d", portNumber)); + + if(doRegistration) + { + params.emplace_back("--register"); + } if (moduleFilePath && moduleFilePath[0]) { - #if !AZ_TRAIT_OS_PLATFORM_APPLE && !AZ_TRAIT_OS_USE_WINDOWS_FILE_PATHS - params.append(AZStd::string::format(R"( -module="%s")", moduleFilePath).c_str()); - #else - params.append(AZStd::string::format(R"( -module="\"%s\"")", moduleFilePath).c_str()); - #endif // !AZ_TRAIT_OS_PLATFORM_APPLE && !AZ_TRAIT_OS_USE_WINDOWS_FILE_PATHS + params.emplace_back(AZStd::string::format(R"(-module="%s")", moduleFilePath)); } if (!jobDescriptionFile.empty() && !jobResponseFile.empty()) { - #if !AZ_TRAIT_OS_PLATFORM_APPLE && !AZ_TRAIT_OS_USE_WINDOWS_FILE_PATHS - params = AZStd::string::format(R"(%s -input="%s" -output="%s")", params.c_str(), jobDescriptionFile.c_str(), jobResponseFile.c_str()); - #else - params = AZStd::string::format(R"(%s -input="\"%s\"" -output="\"%s\"")", params.c_str(), jobDescriptionFile.c_str(), jobResponseFile.c_str()); - #endif // !AZ_TRAIT_OS_PLATFORM_APPLE && !AZ_TRAIT_OS_USE_WINDOWS_FILE_PATHS + params.emplace_back(AZStd::string::format(R"(-input="%s")", jobDescriptionFile.c_str())); + params.emplace_back(AZStd::string::format(R"(-output="%s")", jobResponseFile.c_str())); } auto settingsRegistry = AZ::SettingsRegistry::Get(); @@ -232,28 +227,25 @@ namespace AssetProcessor for (size_t optionIndex = 0; optionIndex < commandOptionCount; ++optionIndex) { const AZStd::string& optionValue = commandLine.GetSwitchValue(optionKey, optionIndex); - params.append(AZStd::string::format( -#if !AZ_TRAIT_OS_PLATFORM_APPLE && !AZ_TRAIT_OS_USE_WINDOWS_FILE_PATHS - R"( --%s="%s")", -#else - R"( --%s="\"%s\"")", -#endif - optionKey, optionValue.c_str())); + params.emplace_back(AZStd::string::format(R"(--%s="%s")", optionKey, optionValue.c_str())); } } return params; } - AZStd::unique_ptr Builder::LaunchProcess(const char* fullExePath, const AZStd::string& params) const + AZStd::unique_ptr Builder::LaunchProcess(const char* fullExePath, const AZStd::vector& params) const { AzFramework::ProcessLauncher::ProcessLaunchInfo processLaunchInfo; processLaunchInfo.m_processExecutableString = fullExePath; - processLaunchInfo.m_commandlineParameters = AZStd::string::format("\"%s\" %s", fullExePath, params.c_str()); + + AZStd::vector commandLineArray{ fullExePath }; + commandLineArray.insert(commandLineArray.end(), params.begin(), params.end()); + processLaunchInfo.m_commandlineParameters = AZStd::move(commandLineArray); processLaunchInfo.m_showWindow = false; processLaunchInfo.m_processPriority = AzFramework::ProcessPriority::PROCESSPRIORITY_IDLE; - AZ_TracePrintf(AssetProcessor::DebugChannel, "Executing AssetBuilder with parameters: %s\n", processLaunchInfo.m_commandlineParameters.c_str()); + AZ_TracePrintf(AssetProcessor::DebugChannel, "Executing AssetBuilder with parameters: %s\n", processLaunchInfo.GetCommandLineParametersAsString().c_str()); auto processWatcher = AZStd::unique_ptr(AzFramework::ProcessWatcher::LaunchProcess(processLaunchInfo, AzFramework::ProcessCommunicationType::COMMUNICATOR_TYPE_STDINOUT)); @@ -364,17 +356,19 @@ namespace AssetProcessor BuilderManager::BuilderManager(ConnectionManager* connectionManager) { using namespace AZStd::placeholders; - connectionManager->RegisterService(AssetBuilderSDK::BuilderHelloRequest::MessageType(), AZStd::bind(&BuilderManager::IncomingBuilderPing, this, _1, _2, _3, _4, _5)); + connectionManager->RegisterService(AssetBuilder::BuilderHelloRequest::MessageType(), AZStd::bind(&BuilderManager::IncomingBuilderPing, this, _1, _2, _3, _4, _5)); // Setup a background thread to pump the idle builders so they don't get blocked trying to output to stdout/err - m_pollingThread = AZStd::thread([this]() + AZStd::thread_desc desc; + desc.m_name = "BuilderManager Idle Pump"; + m_pollingThread = AZStd::thread(desc, [this]() + { + while (!m_quitListener.WasQuitRequested()) { - while (!m_quitListener.WasQuitRequested()) - { - PumpIdleBuilders(); - AZStd::this_thread::sleep_for(AZStd::chrono::milliseconds(s_IdleBuilderPumpingDelayMS)); - } - }); + PumpIdleBuilders(); + AZStd::this_thread::sleep_for(AZStd::chrono::milliseconds(s_IdleBuilderPumpingDelayMS)); + } + }); m_quitListener.BusConnect(); BusConnect(); @@ -413,8 +407,8 @@ namespace AssetProcessor void BuilderManager::IncomingBuilderPing(AZ::u32 connId, AZ::u32 /*type*/, AZ::u32 serial, QByteArray payload, QString platform) { - AssetBuilderSDK::BuilderHelloRequest requestPing; - AssetBuilderSDK::BuilderHelloResponse responsePing; + AssetBuilder::BuilderHelloRequest requestPing; + AssetBuilder::BuilderHelloResponse responsePing; if (!AZ::Utils::LoadObjectFromBufferInPlace(payload.data(), payload.length(), requestPing)) { @@ -490,7 +484,7 @@ namespace AssetProcessor return builder; } - BuilderRef BuilderManager::GetBuilder() + BuilderRef BuilderManager::GetBuilder(bool doRegistration) { AZStd::shared_ptr newBuilder; BuilderRef builderRef; @@ -498,27 +492,30 @@ namespace AssetProcessor { AZStd::unique_lock lock(m_buildersMutex); - for (auto itr = m_builders.begin(); itr != m_builders.end(); ) + if (!doRegistration) { - auto& builder = itr->second; - - if (!builder->m_busy) + for (auto itr = m_builders.begin(); itr != m_builders.end();) { - builder->PumpCommunicator(); + auto& builder = itr->second; - if (builder->IsValid()) + if (!builder->m_busy) { - return BuilderRef(builder); + builder->PumpCommunicator(); + + if (builder->IsValid()) + { + return BuilderRef(builder); + } + else + { + itr = m_builders.erase(itr); + } } else { - itr = m_builders.erase(itr); + ++itr; } } - else - { - ++itr; - } } AZ_TracePrintf("BuilderManager", "Starting new builder for job request\n"); @@ -530,7 +527,7 @@ namespace AssetProcessor builderRef = BuilderRef(newBuilder); } - if (!newBuilder->Start()) + if (!newBuilder->Start(doRegistration)) { AZ_Error("BuilderManager", false, "Builder failed to start"); diff --git a/Code/Tools/AssetProcessor/native/utilities/BuilderManager.h b/Code/Tools/AssetProcessor/native/utilities/BuilderManager.h index 657e4c7788..64241b106e 100644 --- a/Code/Tools/AssetProcessor/native/utilities/BuilderManager.h +++ b/Code/Tools/AssetProcessor/native/utilities/BuilderManager.h @@ -10,11 +10,11 @@ #include #include #include +#include #include #include #include #include -#include #include #include // used in the inl file. @@ -39,7 +39,7 @@ namespace AssetProcessor virtual ~BuilderManagerBusTraits() = default; //! Returns a builder for doing work - virtual BuilderRef GetBuilder() = 0; + virtual BuilderRef GetBuilder(bool doRegistration) = 0; }; using BuilderManagerBus = AZ::EBus; @@ -98,13 +98,13 @@ namespace AssetProcessor private: //! Starts the builder process and waits for it to connect - bool Start(); + bool Start(bool doRegistration); //! Sets the connection id and signals that the builder has connected void SetConnection(AZ::u32 connId); - AZStd::string BuildParams(const char* task, const char* moduleFilePath, const AZStd::string& builderGuid, const AZStd::string& jobDescriptionFile, const AZStd::string& jobResponseFile) const; - AZStd::unique_ptr LaunchProcess(const char* fullExePath, const AZStd::string& params) const; + AZStd::vector BuildParams(const char* task, const char* moduleFilePath, const AZStd::string& builderGuid, const AZStd::string& jobDescriptionFile, const AZStd::string& jobResponseFile, bool doRegistration) const; + AZStd::unique_ptr LaunchProcess(const char* fullExePath, const AZStd::vector& params) const; //! Waits for the builder exe to send the job response and pumps stdout/err BuilderRunJobOutcome WaitForBuilderResponse(AssetBuilderSDK::JobCancelListener* jobCancelListener, AZ::u32 processTimeoutLimitInSeconds, AZStd::binary_semaphore* waitEvent) const; @@ -127,7 +127,7 @@ namespace AssetProcessor AZStd::unique_ptr m_processWatcher = nullptr; //! Optional communicator, only available if we have a process watcher - AZStd::unique_ptr m_tracePrinter = nullptr; + AZStd::unique_ptr m_tracePrinter = nullptr; const AssetUtilities::QuitListener& m_quitListener; }; @@ -169,7 +169,7 @@ namespace AssetProcessor void ConnectionLost(AZ::u32 connId); //BuilderManagerBus - BuilderRef GetBuilder() override; + BuilderRef GetBuilder(bool doRegistration) override; private: diff --git a/Code/Tools/AssetProcessor/native/utilities/BuilderManager.inl b/Code/Tools/AssetProcessor/native/utilities/BuilderManager.inl index 986791b501..039680dfae 100644 --- a/Code/Tools/AssetProcessor/native/utilities/BuilderManager.inl +++ b/Code/Tools/AssetProcessor/native/utilities/BuilderManager.inl @@ -7,6 +7,8 @@ */ #pragma once +#include + namespace AssetProcessor { //! Sends the job over to the builder and blocks until the response is received or the builder crashes/times out @@ -48,7 +50,7 @@ namespace AssetProcessor if (!netResponse.m_response.Succeeded() || s_createRequestFileForSuccessfulJob) { - // we write the request out to disk for failure or debugging + // we write the request out to disk for failure or debugging if (!DebugWriteRequestFile(tempFolderPath.c_str(), request, task, modulePath)) { return BuilderRunJobOutcome::FailedToWriteDebugRequest; @@ -81,11 +83,13 @@ namespace AssetProcessor return false; } - auto params = BuildParams(task.c_str(), modulePath.c_str(), "", jobRequestFile, jobResponseFile); + auto params = BuildParams(task.c_str(), modulePath.c_str(), "", jobRequestFile, jobResponseFile, false); + AZStd::string paramString; + AZ::StringFunc::Join(paramString, params.begin(), params.end(), " "); AZ_TracePrintf(AssetProcessor::DebugChannel, "Job request written to %s\n", jobRequestFile.c_str()); AZ_TracePrintf(AssetProcessor::DebugChannel, "To re-run this request manually, run AssetBuilder with the following parameters:\n"); - AZ_TracePrintf(AssetProcessor::DebugChannel, "%s\n", params.c_str()); + AZ_TracePrintf(AssetProcessor::DebugChannel, "%s\n", paramString.c_str()); return true; } diff --git a/Code/Tools/AssetProcessor/native/utilities/CommunicatorTracePrinter.cpp b/Code/Tools/AssetProcessor/native/utilities/CommunicatorTracePrinter.cpp deleted file mode 100644 index c6008deb34..0000000000 --- a/Code/Tools/AssetProcessor/native/utilities/CommunicatorTracePrinter.cpp +++ /dev/null @@ -1,86 +0,0 @@ -/* - * Copyright (c) Contributors to the Open 3D Engine Project. - * For complete copyright and license terms please see the LICENSE at the root of this distribution. - * - * SPDX-License-Identifier: Apache-2.0 OR MIT - * - */ - -#include "CommunicatorTracePrinter.h" - -CommunicatorTracePrinter::CommunicatorTracePrinter(AzFramework::ProcessCommunicator* communicator, const char* window) : - m_communicator(communicator), - m_window(window) -{ - m_stringBeingConcatenated.reserve(1024); -} - -CommunicatorTracePrinter::~CommunicatorTracePrinter() -{ - // flush stdout - WriteCurrentString(false); - - // flush stderr - WriteCurrentString(true); -} - -void CommunicatorTracePrinter::Pump() -{ - if (m_communicator->IsValid()) - { - // Don't call readOutput unless there is output or else it will block... - while (m_communicator->PeekOutput()) - { - AZ::u32 readSize = m_communicator->ReadOutput(m_streamBuffer, AZ_ARRAY_SIZE(m_streamBuffer)); - ParseDataBuffer(readSize, false); - } - while (m_communicator->PeekError()) - { - AZ::u32 readSize = m_communicator->ReadError(m_streamBuffer, AZ_ARRAY_SIZE(m_streamBuffer)); - ParseDataBuffer(readSize, true); - } - } -} - -void CommunicatorTracePrinter::ParseDataBuffer(AZ::u32 readSize, bool isFromStdErr) -{ - if (readSize > AZ_ARRAY_SIZE(m_streamBuffer)) - { - AZ_ErrorOnce("ERROR", false, "Programmer bug: Read size is overflowing in traceprintf communicator."); - return; - } - - // we cannot write the string to the same buffer, as stdError and stdOut are different streams and could - // have different cutting points as buffers empty. - AZStd::string& bufferToUse = isFromStdErr ? m_errorStringBeingConcatenated : m_stringBeingConcatenated; - - for (size_t pos = 0; pos < readSize; ++pos) - { - if ((m_streamBuffer[pos] == '\n') || (m_streamBuffer[pos] == '\r')) - { - WriteCurrentString(isFromStdErr); - } - else - { - bufferToUse.push_back(m_streamBuffer[pos]); - } - } -} - -void CommunicatorTracePrinter::WriteCurrentString(bool isFromStdErr) -{ - AZStd::string& bufferToUse = isFromStdErr ? m_errorStringBeingConcatenated : m_stringBeingConcatenated; - - if (!bufferToUse.empty()) - { - if (isFromStdErr) - { - AZ_Error(m_window.c_str(), false, "%s", bufferToUse.c_str()); - } - else - { - AZ_TracePrintf(m_window.c_str(), "%s", bufferToUse.c_str()); - } - bufferToUse.clear(); - } -} diff --git a/Code/Tools/AssetProcessor/native/utilities/CommunicatorTracePrinter.h b/Code/Tools/AssetProcessor/native/utilities/CommunicatorTracePrinter.h deleted file mode 100644 index c2e4da32af..0000000000 --- a/Code/Tools/AssetProcessor/native/utilities/CommunicatorTracePrinter.h +++ /dev/null @@ -1,35 +0,0 @@ -/* - * Copyright (c) Contributors to the Open 3D Engine Project. - * For complete copyright and license terms please see the LICENSE at the root of this distribution. - * - * SPDX-License-Identifier: Apache-2.0 OR MIT - * - */ - -#pragma once - -#include - -//! CommunicatorTracePrinter listens to stderr and stdout of a running process and writes its output to the AZ_Trace system -//! Importantly, it does not do any blocking operations. -class CommunicatorTracePrinter -{ -public: - CommunicatorTracePrinter(AzFramework::ProcessCommunicator* communicator, const char* window); - ~CommunicatorTracePrinter(); - - // call this periodically to drain the buffers and write them. - void Pump(); - - // drains the buffer into the string thats being built, then traces the string when it hits a newline. - void ParseDataBuffer(AZ::u32 readSize, bool isFromStdErr); - - void WriteCurrentString(bool isFromStdError); - -private: - AZStd::string m_window; - AzFramework::ProcessCommunicator* m_communicator; - char m_streamBuffer[128]; - AZStd::string m_stringBeingConcatenated; - AZStd::string m_errorStringBeingConcatenated; -}; diff --git a/Code/Tools/AssetProcessor/native/utilities/GUIApplicationManager.cpp b/Code/Tools/AssetProcessor/native/utilities/GUIApplicationManager.cpp index c3ff22a39e..13a6b0699a 100644 --- a/Code/Tools/AssetProcessor/native/utilities/GUIApplicationManager.cpp +++ b/Code/Tools/AssetProcessor/native/utilities/GUIApplicationManager.cpp @@ -12,8 +12,6 @@ #include "native/resourcecompiler/rccontroller.h" #include "native/FileServer/fileServer.h" #include "native/AssetManager/assetScanner.h" -#include "native/shadercompiler/shadercompilerManager.h" -#include "native/shadercompiler/shadercompilerModel.h" #include #include @@ -55,7 +53,7 @@ namespace { moduleFileInfo.setFile(executableDirectory); } - + QDir binaryDir = moduleFileInfo.absoluteDir(); // strip extension QString applicationBase = moduleFileInfo.completeBaseName(); @@ -70,7 +68,7 @@ namespace binaryDir.remove(tempFile); } } - + } @@ -145,8 +143,6 @@ void GUIApplicationManager::Destroy() DestroyIniConfiguration(); DestroyFileServer(); - DestroyShaderCompilerManager(); - DestroyShaderCompilerModel(); } @@ -192,7 +188,7 @@ bool GUIApplicationManager::Run() wrapper->enableSaveRestoreGeometry(GetOrganizationName(), GetApplicationName(), "MainWindow", restoreOnFirstShow); AzQtComponents::StyleManager::setStyleSheet(m_mainWindow, QStringLiteral("style:AssetProcessor.qss")); - + auto refreshStyleSheets = [styleManager]() { styleManager->Refresh(); @@ -322,19 +318,11 @@ bool GUIApplicationManager::Run() qApp->setQuitOnLastWindowClosed(false); - QTimer::singleShot(0, this, [this]() - { - if (!PostActivate()) - { - QuitRequested(); - m_startedSuccessfully = false; - } - }); - m_duringStartup = false; + m_startedSuccessfully = true; int resultCode = qApp->exec(); // this blocks until the last window is closed. - + if(!InitiatedShutdown()) { // if we are here it implies that AP did not stop the Qt event loop and is shutting down prematurely @@ -427,7 +415,7 @@ bool GUIApplicationManager::OnError(const char* /*window*/, const char* message) return true; } - // If we're the main thread, then consider showing the message box directly. + // If we're the main thread, then consider showing the message box directly. // note that all other threads will PAUSE if they emit a message while the main thread is showing this box // due to the way the trace system EBUS is mutex-protected. Qt::ConnectionType connection = Qt::DirectConnection; @@ -470,7 +458,7 @@ bool GUIApplicationManager::Activate() AssetUtilities::ComputeProjectCacheRoot(projectCacheRoot); m_localUserSettings.Load(projectCacheRoot.filePath("AssetProcessorUserSettings.xml").toUtf8().data(), context); m_localUserSettings.Activate(AZ::UserSettings::CT_LOCAL); - + InitIniConfiguration(); InitFileServer(); @@ -479,9 +467,6 @@ bool GUIApplicationManager::Activate() { return false; } - - InitShaderCompilerModel(); - InitShaderCompilerManager(); return true; } @@ -490,6 +475,7 @@ bool GUIApplicationManager::PostActivate() { if (!ApplicationManagerBase::PostActivate()) { + m_startedSuccessfully = false; return false; } @@ -606,7 +592,7 @@ void GUIApplicationManager::InitConnectionManager() QObject::connect(m_fileServer, SIGNAL(AddRenameRequest(unsigned int, bool)), m_connectionManager, SLOT(AddRenameRequest(unsigned int, bool))); QObject::connect(m_fileServer, SIGNAL(AddFindFileNamesRequest(unsigned int, bool)), m_connectionManager, SLOT(AddFindFileNamesRequest(unsigned int, bool))); QObject::connect(m_fileServer, SIGNAL(UpdateConnectionMetrics()), m_connectionManager, SLOT(UpdateConnectionMetrics())); - + m_connectionManager->RegisterService(ShowAssetProcessorRequest::MessageType, std::bind([this](unsigned int /*connId*/, unsigned int /*type*/, unsigned int /*serial*/, QByteArray /*payload*/) { @@ -661,40 +647,6 @@ void GUIApplicationManager::DestroyFileServer() } } -void GUIApplicationManager::InitShaderCompilerManager() -{ - m_shaderCompilerManager = new ShaderCompilerManager(); - - //Shader compiler stuff - m_connectionManager->RegisterService(AssetUtilities::ComputeCRC32Lowercase("ShaderCompilerProxyRequest"), std::bind(&ShaderCompilerManager::process, m_shaderCompilerManager, std::placeholders::_1, std::placeholders::_2, std::placeholders::_3, std::placeholders::_4)); - QObject::connect(m_shaderCompilerManager, SIGNAL(sendErrorMessageFromShaderJob(QString, QString, QString, QString)), m_shaderCompilerModel, SLOT(addShaderErrorInfoEntry(QString, QString, QString, QString))); - - -} - -void GUIApplicationManager::DestroyShaderCompilerManager() -{ - if (m_shaderCompilerManager) - { - delete m_shaderCompilerManager; - m_shaderCompilerManager = nullptr; - } -} - -void GUIApplicationManager::InitShaderCompilerModel() -{ - m_shaderCompilerModel = new ShaderCompilerModel(); -} - -void GUIApplicationManager::DestroyShaderCompilerModel() -{ - if (m_shaderCompilerModel) - { - delete m_shaderCompilerModel; - m_shaderCompilerModel = nullptr; - } -} - IniConfiguration* GUIApplicationManager::GetIniConfiguration() const { return m_iniConfiguration; @@ -704,14 +656,6 @@ FileServer* GUIApplicationManager::GetFileServer() const { return m_fileServer; } -ShaderCompilerManager* GUIApplicationManager::GetShaderCompilerManager() const -{ - return m_shaderCompilerManager; -} -ShaderCompilerModel* GUIApplicationManager::GetShaderCompilerModel() const -{ - return m_shaderCompilerModel; -} void GUIApplicationManager::ShowTrayIconErrorMessage(QString msg) { diff --git a/Code/Tools/AssetProcessor/native/utilities/GUIApplicationManager.h b/Code/Tools/AssetProcessor/native/utilities/GUIApplicationManager.h index 3cf58231f2..c10d841daf 100644 --- a/Code/Tools/AssetProcessor/native/utilities/GUIApplicationManager.h +++ b/Code/Tools/AssetProcessor/native/utilities/GUIApplicationManager.h @@ -24,8 +24,6 @@ class ConnectionManager; class IniConfiguration; class ApplicationServer; class FileServer; -class ShaderCompilerManager; -class ShaderCompilerModel; namespace AssetProcessor { @@ -47,8 +45,6 @@ public: ApplicationManager::BeforeRunStatus BeforeRun() override; IniConfiguration* GetIniConfiguration() const; FileServer* GetFileServer() const; - ShaderCompilerManager* GetShaderCompilerManager() const; - ShaderCompilerModel* GetShaderCompilerModel() const; bool Run() override; //////////////////////////////////////////////////// @@ -72,10 +68,6 @@ private: void DestroyIniConfiguration(); void InitFileServer(); void DestroyFileServer(); - void InitShaderCompilerManager(); - void DestroyShaderCompilerManager(); - void InitShaderCompilerModel(); - void DestroyShaderCompilerModel(); void Destroy() override; Q_SIGNALS: @@ -99,8 +91,7 @@ private: IniConfiguration* m_iniConfiguration = nullptr; FileServer* m_fileServer = nullptr; - ShaderCompilerManager* m_shaderCompilerManager = nullptr; - ShaderCompilerModel* m_shaderCompilerModel = nullptr; + QFileSystemWatcher m_qtFileWatcher; AZ::UserSettingsProvider m_localUserSettings; bool m_messageBoxIsVisible = false; diff --git a/Code/Tools/AssetProcessor/native/utilities/PlatformConfiguration.cpp b/Code/Tools/AssetProcessor/native/utilities/PlatformConfiguration.cpp index bcadd0f103..7543e9ec8b 100644 --- a/Code/Tools/AssetProcessor/native/utilities/PlatformConfiguration.cpp +++ b/Code/Tools/AssetProcessor/native/utilities/PlatformConfiguration.cpp @@ -749,7 +749,7 @@ namespace AssetProcessor } AZStd::vector configFiles = AzToolsFramework::AssetUtils::GetConfigFiles(absoluteSystemRoot.toUtf8().constData(), - absoluteAssetRoot.toUtf8().constData(), projectPath.toUtf8().constData(), + projectPath.toUtf8().constData(), addPlatformConfigs, addGemsConfigs && !noGemScanFolders, settingsRegistry); // First Merge all Engine, Gem and Project specific AssetProcessor*Config.setreg/.inifiles @@ -1285,6 +1285,13 @@ namespace AssetProcessor return m_scanFolders[index]; } + const AssetProcessor::ScanFolderInfo& PlatformConfiguration::GetScanFolderAt(int index) const + { + Q_ASSERT(index >= 0); + Q_ASSERT(index < m_scanFolders.size()); + return m_scanFolders[index]; + } + void PlatformConfiguration::AddScanFolder(const AssetProcessor::ScanFolderInfo& source, bool isUnitTesting) { if (isUnitTesting) @@ -1436,7 +1443,10 @@ namespace AssetProcessor } QStringList PlatformConfiguration::FindWildcardMatches( - const QString& sourceFolder, QString relativeName, bool includeFolders, bool recursiveSearch) const + const QString& sourceFolder, + QString relativeName, + bool includeFolders, + bool recursiveSearch) const { if (relativeName.isEmpty()) { @@ -1469,6 +1479,67 @@ namespace AssetProcessor return returnList; } + QStringList PlatformConfiguration::FindWildcardMatches( + const QString& sourceFolder, + QString relativeName, + const AZStd::unordered_set& excludedFolders, + bool includeFolders, + bool recursiveSearch) const + { + if (relativeName.isEmpty()) + { + return QStringList(); + } + + QDir sourceFolderDir(sourceFolder); + + QString posixRelativeName = QDir::fromNativeSeparators(relativeName); + + QStringList returnList; + QRegExp nameMatch{ posixRelativeName, Qt::CaseInsensitive, QRegExp::Wildcard }; + AZStd::stack dirs; + dirs.push(sourceFolderDir.absolutePath()); + + while (!dirs.empty()) + { + QString absolutePath = dirs.top(); + dirs.pop(); + + if (excludedFolders.contains(absolutePath.toUtf8().constData())) + { + continue; + } + + QDirIterator dirIterator(absolutePath, QDir::AllEntries | QDir::NoSymLinks | QDir::NoDotAndDotDot); + + while (dirIterator.hasNext()) + { + dirIterator.next(); + + if (!dirIterator.fileInfo().isFile()) + { + if (recursiveSearch) + { + dirs.push(dirIterator.filePath()); + } + + if (!includeFolders) + { + continue; + } + } + + QString pathMatch{ sourceFolderDir.relativeFilePath(dirIterator.filePath()) }; + if (nameMatch.exactMatch(pathMatch)) + { + returnList.append(QDir::fromNativeSeparators(dirIterator.filePath())); + } + } + } + + return returnList; + } + const AssetProcessor::ScanFolderInfo* PlatformConfiguration::GetScanFolderForFile(const QString& fullFileName) const { QString normalized = AssetUtilities::NormalizeFilePath(fullFileName); diff --git a/Code/Tools/AssetProcessor/native/utilities/PlatformConfiguration.h b/Code/Tools/AssetProcessor/native/utilities/PlatformConfiguration.h index 2c04ca1fad..a57416da10 100644 --- a/Code/Tools/AssetProcessor/native/utilities/PlatformConfiguration.h +++ b/Code/Tools/AssetProcessor/native/utilities/PlatformConfiguration.h @@ -256,6 +256,9 @@ namespace AssetProcessor //! Retrieve the scan folder at a given index. AssetProcessor::ScanFolderInfo& GetScanFolderAt(int index); + //! Retrieve the scan folder at a given index. + const AssetProcessor::ScanFolderInfo& GetScanFolderAt(int index) const; + //! Manually add a scan folder. Also used for testing. void AddScanFolder(const AssetProcessor::ScanFolderInfo& source, bool isUnitTesting = false); @@ -298,7 +301,16 @@ namespace AssetProcessor QString FindFirstMatchingFile(QString relativeName) const; //! given a relative name with wildcard characters (* allowed) find a set of matching files or optionally folders - QStringList FindWildcardMatches(const QString& sourceFolder, QString relativeName, bool includeFolders = false, bool recursiveSearch = true) const; + QStringList FindWildcardMatches(const QString& sourceFolder, QString relativeName, bool includeFolders = false, + bool recursiveSearch = true) const; + + //! given a relative name with wildcard characters (* allowed) find a set of matching files or optionally folders + QStringList FindWildcardMatches( + const QString& sourceFolder, + QString relativeName, + const AZStd::unordered_set& excludedFolders, + bool includeFolders = false, + bool recursiveSearch = true) const; //! given a fileName (as a full path), return the database source name which includes the output prefix. //! diff --git a/Code/Tools/AssetProcessor/native/utilities/StatsCapture.cpp b/Code/Tools/AssetProcessor/native/utilities/StatsCapture.cpp new file mode 100644 index 0000000000..f6b7c07a91 --- /dev/null +++ b/Code/Tools/AssetProcessor/native/utilities/StatsCapture.cpp @@ -0,0 +1,400 @@ + /* + * Copyright (c) Contributors to the Open 3D Engine Project. + * For complete copyright and license terms please see the LICENSE at the root of this distribution. + * + * SPDX-License-Identifier: Apache-2.0 OR MIT + * + */ + +#include +#include + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#include + +namespace AssetProcessor +{ + namespace StatsCapture + { + // This class captures stats by storing them in a map of type + // [name of stat] -> Stat struct + // It can then analyze these stats and produce more stats from the original + // Captures, before dumping. + class StatsCaptureImpl final + { + public: + AZ_CLASS_ALLOCATOR(StatsCaptureImpl, AZ::SystemAllocator, 0); + + void BeginCaptureStat(AZStd::string_view statName); + void EndCaptureStat(AZStd::string_view statName); + void Dump(); + private: + using timepoint = AZStd::chrono::high_resolution_clock::time_point; + using duration = AZStd::chrono::milliseconds; + struct StatsEntry + { + duration m_cumulativeTime = {}; // The total amount of time spent on this. + timepoint m_operationStartTime = {}; // Async tracking - the last time stamp an operation started. + int64_t m_operationCount = 0; // In case there's more than one sample. Used to calc average. + }; + + AZStd::unordered_map m_stats; + bool m_dumpMachineReadableStats = false; + bool m_dumpHumanReadableStats = true; + + // Make a friendly time string of the format nnHnnMhhS.xxxms + AZStd::string FormatDuration(const duration& duration) + { + int64_t milliseconds = duration.count(); + constexpr int64_t millisecondsInASecond = 1000; + constexpr int64_t millisecondsInAMinute = millisecondsInASecond * 60; + constexpr int64_t millisecondsInAnHour = millisecondsInAMinute * 60; + + int64_t hours = milliseconds / millisecondsInAnHour; + milliseconds -= hours * millisecondsInAnHour; + + int64_t minutes = milliseconds / millisecondsInAMinute; + milliseconds -= minutes * millisecondsInAMinute; + + int64_t seconds = milliseconds / millisecondsInASecond; + milliseconds -= seconds * millisecondsInASecond; + + // omit the sections which dont make sense for readability + if (hours) + { + return AZStd::string::format("%02" PRId64 "h%02" PRId64 "m%02" PRId64 "s%03" PRId64 "ms" , hours, minutes, seconds, milliseconds); + } + else if (minutes) + { + return AZStd::string::format(" %02" PRId64 "m%02" PRId64 "s%03" PRId64 "ms", minutes, seconds, milliseconds); + } + else if (seconds) + { + return AZStd::string::format(" %02" PRId64 "s%03" PRId64 "ms", seconds, milliseconds); + } + + return AZStd::string::format(" %03" PRId64 "ms", milliseconds); + } + + // Prints out a single stat. + void PrintStat([[maybe_unused]] const char* name, duration milliseconds, int64_t count) + { + // note that name may be unused as it only appears in Trace macros, which are + // stripped out in release builds. + if (count <= 1) + { + count = 1; + } + + duration average(static_cast(static_cast(milliseconds.count()) / static_cast(count))); + + if (m_dumpHumanReadableStats) + { + if (count > 1) + { + AZ_TracePrintf(AssetProcessor::ConsoleChannel, " Time: %s, Count: %4" PRId64 ", Average: %s, EventName: %s\n", + FormatDuration(milliseconds).c_str(), + count, + FormatDuration(average).c_str(), + name); + } + else + { + AZ_TracePrintf(AssetProcessor::ConsoleChannel, " Time: %s, EventName: %s\n", + FormatDuration(milliseconds).c_str(), + name); + } + } + if (m_dumpMachineReadableStats) + { + // machine Readable mode prints raw milliseconds and uses a CSV-like format + // note that the stat itself may contain commas, so we dont acutally separate with comma + // instead we separate with : + // and each "interesting line" is 'MachineReadableStat:milliseconds:count:average:name' + AZ_TracePrintf(AssetProcessor::ConsoleChannel, "MachineReadableStat:%" PRId64 ":%" PRId64 ":%" PRId64 ":%s\n", + milliseconds.count(), + count, + count > 1 ? average.count() : milliseconds.count(), + name); + } + } + + // calls PrintStat on each element in the vector. + void PrintStatsArray(AZStd::vector& keys, int maxToPrint, const char* header) + { + // don't print anything out at all, not even a header, if the keys are empty. + if (keys.empty()) + { + return; + } + + if ((m_dumpHumanReadableStats)&&(header)) + { + AZ_TracePrintf(AssetProcessor::ConsoleChannel,"Top %i %s\n", maxToPrint, header); + } + + auto sortByTimeDescending = [&](const AZStd::string& s1, const AZStd::string& s2) + { + return this->m_stats[s1].m_cumulativeTime > this->m_stats[s2].m_cumulativeTime; + }; + + AZStd::sort(keys.begin(), keys.end(), sortByTimeDescending); + + for (int idx = 0; idx < maxToPrint; ++idx) + { + if (idx < keys.size()) + { + PrintStat(keys[idx].c_str(), m_stats[keys[idx]].m_cumulativeTime, m_stats[keys[idx]].m_operationCount); + } + } + } + }; + + + void StatsCaptureImpl::BeginCaptureStat(AZStd::string_view statName) + { + StatsEntry& existingStat = m_stats[statName]; + if (existingStat.m_operationStartTime != timepoint()) + { + // prevent double 'Begins' + return; + } + existingStat.m_operationStartTime = AZStd::chrono::high_resolution_clock::now(); + } + + void StatsCaptureImpl::EndCaptureStat(AZStd::string_view statName) + { + StatsEntry& existingStat = m_stats[statName]; + if (existingStat.m_operationStartTime != timepoint()) + { + existingStat.m_cumulativeTime = AZStd::chrono::high_resolution_clock::now() - existingStat.m_operationStartTime; + existingStat.m_operationCount = existingStat.m_operationCount + 1; + existingStat.m_operationStartTime = timepoint(); // reset the start time so that double 'Ends' are ignored. + } + } + + void StatsCaptureImpl::Dump() + { + timepoint startTimeStamp = AZStd::chrono::high_resolution_clock::now(); + + auto settingsRegistry = AZ::SettingsRegistry::Get(); + + int maxCumulativeStats = 5; // default max cumulative stats to show + int maxIndividualStats = 5; // default max individual files to show + + if (settingsRegistry) + { + AZ::u64 cumulativeStats = static_cast(maxCumulativeStats); + AZ::u64 individualStats = static_cast(maxIndividualStats); + settingsRegistry->Get(m_dumpHumanReadableStats, "/Amazon/AssetProcessor/Settings/Stats/HumanReadable"); + settingsRegistry->Get(m_dumpMachineReadableStats, "/Amazon/AssetProcessor/Settings/Stats/MachineReadable"); + settingsRegistry->Get(cumulativeStats, "/Amazon/AssetProcessor/Settings/Stats/MaxCumulativeStats"); + settingsRegistry->Get(individualStats, "/Amazon/AssetProcessor/Settings/Stats/MaxIndividualStats"); + maxCumulativeStats = static_cast(cumulativeStats); + maxIndividualStats = static_cast(individualStats); + } + + if ((!m_dumpHumanReadableStats)&&(!m_dumpMachineReadableStats)) + { + return; + } + + AZStd::vector allCreateJobs; // individual + AZStd::vector allCreateJobsByBuilder; // bucketed by builder + AZStd::vector allProcessJobs; // individual + AZStd::vector allProcessJobsByPlatform; // bucketed by platform + AZStd::vector allProcessJobsByJobKey; // bucketed by type of job (job key) + AZStd::vector allHashFiles; + + // capture only existing keys as we will be expanding the stats + // this approach avoids mutating an iterator. + AZStd::vector statKeys; + for (const auto& element : m_stats) + { + statKeys.push_back(element.first); + } + + for (const AZStd::string& statKey : statKeys) + { + const StatsEntry& statistic = m_stats[statKey]; + // Createjobs stats encode like (CreateJobs,sourcefilepath,builderid) + if (AZ::StringFunc::StartsWith(statKey, "CreateJobs,", true)) + { + allCreateJobs.push_back(statKey); + AZStd::vector tokens; + AZ::StringFunc::Tokenize(statKey, tokens, ",", false, false); + + // look up the builder so you can get its name: + AZStd::string_view builderName = tokens[2]; + + // synthesize a stat to track per-builder createjobs times: + { + AZStd::string newStatKey = AZStd::string::format("CreateJobsByBuilder,%.*s", AZ_STRING_ARG(builderName)); + + auto insertion = m_stats.insert(newStatKey); + StatsEntry& statToSynth = insertion.first->second; + statToSynth.m_cumulativeTime += statistic.m_cumulativeTime; + statToSynth.m_operationCount += statistic.m_operationCount; + if (insertion.second) + { + allCreateJobsByBuilder.push_back(newStatKey); + } + } + // synthesize a stat to track total createjobs times: + { + StatsEntry& statToSynth = m_stats["CreateJobsTotal"]; + statToSynth.m_cumulativeTime += statistic.m_cumulativeTime; + statToSynth.m_operationCount += statistic.m_operationCount; + } + } + else if (AZ::StringFunc::StartsWith(statKey, "ProcessJob,", true)) + { + allProcessJobs.push_back(statKey); + // processjob has the format ProcessJob,sourcename,jobkey,platformname + AZStd::vector tokens; + AZ::StringFunc::Tokenize(statKey, tokens, ",", false, false); + AZStd::string_view jobKey = tokens[2]; + AZStd::string_view platformName = tokens[3]; + + // synthesize a stat to record process time accumulated by job key platform + { + AZStd::string newStatKey = AZStd::string::format("ProcessJobsByPlatform,%.*s", AZ_STRING_ARG(platformName)); + auto insertion = m_stats.insert(newStatKey); + StatsEntry& statToSynth = insertion.first->second; + statToSynth.m_cumulativeTime += statistic.m_cumulativeTime; + statToSynth.m_operationCount += statistic.m_operationCount; + if (insertion.second) + { + allProcessJobsByPlatform.push_back(newStatKey); + } + } + + // synthesize a stat to record process time accumulated job key total across all platforms + { + AZStd::string newStatKey = AZStd::string::format("ProcessJobsByJobKey,%.*s", AZ_STRING_ARG(jobKey)); + auto insertion = m_stats.insert(newStatKey); + StatsEntry& statToSynth = insertion.first->second; + statToSynth.m_cumulativeTime += statistic.m_cumulativeTime; + statToSynth.m_operationCount += statistic.m_operationCount; + if (insertion.second) + { + allProcessJobsByJobKey.push_back(newStatKey); + } + } + // synthesize a stat to track total processjob times: + { + StatsEntry& statToSynth = m_stats["ProcessJobsTotal"]; + statToSynth.m_cumulativeTime += statistic.m_cumulativeTime; + statToSynth.m_operationCount += statistic.m_operationCount; + } + } + else if (AZ::StringFunc::StartsWith(statKey, "HashFile,", true)) + { + allHashFiles.push_back(statKey); + // processjob has the format ProcessJob,sourcename,jobkey,platformname + // synthesize a stat to track total hash times: + StatsEntry& statToSynth = m_stats["HashFileTotal"]; + statToSynth.m_cumulativeTime += statistic.m_cumulativeTime; + statToSynth.m_operationCount += statistic.m_operationCount; + } + } + + StatsEntry& gemLoadStat = m_stats["LoadingModules"]; + PrintStat("LoadingGems", gemLoadStat.m_cumulativeTime, 1); + // analysis-related stats + + StatsEntry& totalScanTime = m_stats["AssetScanning"]; + PrintStat("AssetScanning", totalScanTime.m_cumulativeTime, totalScanTime.m_operationCount); + StatsEntry& totalHashTime = m_stats["HashFileTotal"]; + PrintStat("HashFileTotal", totalHashTime.m_cumulativeTime, totalHashTime.m_operationCount); + PrintStatsArray(allHashFiles, maxIndividualStats, "longest individual file hashes:"); + + // CreateJobs stats + StatsEntry& totalCreateJobs = m_stats["CreateJobsTotal"]; + if (totalCreateJobs.m_operationCount) + { + PrintStat("CreateJobsTotal", totalCreateJobs.m_cumulativeTime, totalCreateJobs.m_operationCount); + PrintStatsArray(allCreateJobs, maxIndividualStats, "longest individual CreateJobs"); + PrintStatsArray(allCreateJobsByBuilder, maxCumulativeStats, "longest CreateJobs By builder"); + } + + // ProcessJobs stats + StatsEntry& totalProcessJobs = m_stats["ProcessJobsTotal"]; + if (totalProcessJobs.m_operationCount) + { + PrintStat("ProcessJobsTotal", totalProcessJobs.m_cumulativeTime, totalProcessJobs.m_operationCount); + PrintStatsArray(allProcessJobs, maxIndividualStats, "longest individual ProcessJob"); + PrintStatsArray(allProcessJobsByJobKey, maxCumulativeStats, "cumulative time spent in ProcessJob by JobKey"); + PrintStatsArray(allProcessJobsByPlatform, maxCumulativeStats, "cumulative time spent in ProcessJob by Platform"); + } + duration costToGenerateStats = AZStd::chrono::high_resolution_clock::now() - startTimeStamp; + PrintStat("ComputeStatsTime", costToGenerateStats, 1); + } + + // Public interface: + static StatsCaptureImpl* g_instance = nullptr; + + //! call this one time before capturing stats. + void Initialize() + { + if (g_instance) + { + AZ_Assert(false, "An instance of StatsCaptureImpl already exists."); + return; + } + g_instance = aznew StatsCaptureImpl(); + } + + //! Call this one time as part of shutting down. + //! note that while it is an error to double-initialize, it is intentionally + //! not an error to call any other function when uninitialized, allowing this system + //! to essentially be "turned off" just by not initializing it in the first place. + void Shutdown() + { + if (g_instance) + { + delete g_instance; + g_instance = nullptr; + } + } + + //! Start the clock running for a particular stat name. + void BeginCaptureStat(AZStd::string_view statName) + { + if (g_instance) + { + g_instance->BeginCaptureStat(statName); + } + } + + //! Stop the clock running for a particular stat name. + void EndCaptureStat(AZStd::string_view statName) + { + if (g_instance) + { + g_instance->EndCaptureStat(statName); + } + } + + //! Do additional processing and then write the cumulative stats to log. + //! Note that since this is an AP-specific system, the analysis done in the dump function + //! is going to make a lot of assumptions about the way the data is encoded. + void Dump() + { + if (g_instance) + { + g_instance->Dump(); + } + } + } +} diff --git a/Code/Tools/AssetProcessor/native/utilities/StatsCapture.h b/Code/Tools/AssetProcessor/native/utilities/StatsCapture.h new file mode 100644 index 0000000000..dd3c9abccf --- /dev/null +++ b/Code/Tools/AssetProcessor/native/utilities/StatsCapture.h @@ -0,0 +1,40 @@ +/* + * Copyright (c) Contributors to the Open 3D Engine Project. + * For complete copyright and license terms please see the LICENSE at the root of this distribution. + * + * SPDX-License-Identifier: Apache-2.0 OR MIT + * + */ + +// This is an AssetProcessor-only stats capture system. Its kept out-of-band +// from the rest of the Asset Processor systems so that it can avoid interfering +// with the rest of the processing decision making and other parts of AssetProcessor. +// This is not meant to be used anywhere except in AssetProcessor. + +#pragma once + +#include + +namespace AssetProcessor +{ + namespace StatsCapture + { + //! call this one time before capturing stats. + void Initialize(); + + //! Call this one time as part of shutting down. + void Shutdown(); + + //! Start the clock running for a particular stat name. + void BeginCaptureStat(AZStd::string_view statName); + + //! Stop the clock running for a particular stat name. + void EndCaptureStat(AZStd::string_view statName); + + //! Do additional processing and then write the cumulative stats to log. + //! Note that since this is an AP-specific system, the analysis done in the dump function + //! is going to make a lot of assumptions about the way the data is encoded. + void Dump(); + } + +} diff --git a/Code/Tools/AssetProcessor/native/utilities/assetUtils.cpp b/Code/Tools/AssetProcessor/native/utilities/assetUtils.cpp index cacd6c4cc9..6bcd0dec01 100644 --- a/Code/Tools/AssetProcessor/native/utilities/assetUtils.cpp +++ b/Code/Tools/AssetProcessor/native/utilities/assetUtils.cpp @@ -10,9 +10,10 @@ #include #include -#include "native/utilities/PlatformConfiguration.h" -#include "native/AssetManager/FileStateCache.h" -#include "native/AssetDatabase/AssetDatabase.h" +#include +#include +#include +#include #include #include #include @@ -1161,7 +1162,7 @@ namespace AssetUtilities { #ifndef AZ_TESTS_ENABLED // Only used for unit tests, speed is critical for GetFileHash. - AZ_UNUSED(hashMsDelay); + hashMsDelay = 0; #endif bool useFileHashing = ShouldUseFileHashing(); @@ -1170,10 +1171,10 @@ namespace AssetUtilities return 0; } + AZ::u64 hash = 0; if(!force) { auto* fileStateInterface = AZ::Interface::Get(); - AZ::u64 hash = 0; if (fileStateInterface && fileStateInterface->GetHash(filePath, &hash)) { @@ -1181,64 +1182,12 @@ namespace AssetUtilities } } - char buffer[FileHashBufferSize]; - - constexpr bool ErrorOnReadFailure = true; - AZ::IO::FileIOStream readStream(filePath, AZ::IO::OpenMode::ModeRead | AZ::IO::OpenMode::ModeBinary, ErrorOnReadFailure); - - if(readStream.IsOpen() && readStream.CanRead()) - { - AZ::IO::SizeType bytesRead; - - auto* state = XXH64_createState(); - - if(state == nullptr) - { - AZ_Assert(false, "Failed to create hash state"); - return 0; - } - - if (XXH64_reset(state, 0) == XXH_ERROR) - { - AZ_Assert(false, "Failed to reset hash state"); - return 0; - } - - do - { - // In edge cases where another process is writing to this file while this hashing is occuring and that file wasn't locked, - // the following read check can fail because it performs an end of file check, and asserts and shuts down if the read size - // was smaller than the buffer and the read is not at the end of the file. The logic used to check end of file internal to read - // will be out of date in the edge cases where another process is actively writing to this file while this hash is running. - // The stream's length ends up more accurate in this case, preventing this assert and shut down. - // One area this occurs is the navigation mesh file (mnmnavmission0.bai) that's temporarily created when exporting a level, - // the navigation system can still be writing to this file when hashing begins, causing the EoF marker to change. - AZ::IO::SizeType remainingToRead = AZStd::min(readStream.GetLength() - readStream.GetCurPos(), aznumeric_cast(AZ_ARRAY_SIZE(buffer))); - bytesRead = readStream.Read(remainingToRead, buffer); - - if(bytesReadOut) - { - *bytesReadOut += bytesRead; - } - - XXH64_update(state, buffer, bytesRead); -#ifdef AZ_TESTS_ENABLED - // Used by unit tests to force the race condition mentioned above, to verify the crash fix. - if(hashMsDelay > 0) - { - AZStd::this_thread::sleep_for(AZStd::chrono::milliseconds(hashMsDelay)); - } -#endif - - } while (bytesRead > 0); - - auto hash = XXH64_digest(state); - - XXH64_freeState(state); - - return hash; - } - return 0; + // keep track of how much time we spend actually hashing files. + AZStd::string statName = AZStd::string::format("HashFile,%s", filePath); + AssetProcessor::StatsCapture::BeginCaptureStat(statName.c_str()); + hash = AssetBuilderSDK::GetFileHash(filePath, bytesReadOut, hashMsDelay); + AssetProcessor::StatsCapture::EndCaptureStat(statName.c_str()); + return hash; } AZ::u64 AdjustTimestamp(QDateTime timestamp) diff --git a/Code/Tools/AssetProcessor/native/utilities/assetUtils.h b/Code/Tools/AssetProcessor/native/utilities/assetUtils.h index 2145c3e0e6..46ec5d6145 100644 --- a/Code/Tools/AssetProcessor/native/utilities/assetUtils.h +++ b/Code/Tools/AssetProcessor/native/utilities/assetUtils.h @@ -238,7 +238,6 @@ namespace AssetUtilities // hashMsDelay is only for automated tests to test that writing to a file while it's hashing does not cause a crash. // hashMsDelay is not used in non-unit test builds. AZ::u64 GetFileHash(const char* filePath, bool force = false, AZ::IO::SizeType* bytesReadOut = nullptr, int hashMsDelay = 0); - inline constexpr AZ::u64 FileHashBufferSize = 1024 * 64; //! Adjusts a timestamp to fix timezone settings and account for any precision adjustment needed AZ::u64 AdjustTimestamp(QDateTime timestamp); diff --git a/Code/Tools/BundleLauncher/O3DE_SDK_Launcher.cpp b/Code/Tools/BundleLauncher/O3DE_SDK_Launcher.cpp index 0c362ac829..4dd7e184e9 100644 --- a/Code/Tools/BundleLauncher/O3DE_SDK_Launcher.cpp +++ b/Code/Tools/BundleLauncher/O3DE_SDK_Launcher.cpp @@ -49,6 +49,12 @@ int main(int argc, char* argv[]) AZStd::unique_ptr shellProcess(AzFramework::ProcessWatcher::LaunchProcess(shellProcessLaunch, AzFramework::ProcessCommunicationType::COMMUNICATOR_TYPE_NONE)); shellProcess->WaitForProcessToExit(120); shellProcess.reset(); + + parameters = AZStd::string::format("-c \"%s/scripts/o3de.sh register --this-engine\"", enginePath.c_str()); + shellProcessLaunch.m_commandlineParameters = parameters; + shellProcess.reset(AzFramework::ProcessWatcher::LaunchProcess(shellProcessLaunch, AzFramework::ProcessCommunicationType::COMMUNICATOR_TYPE_NONE)); + shellProcess->WaitForProcessToExit(120); + shellProcess.reset(); AZ::IO::FixedMaxPath projectManagerPath = installedBinariesFolder/"o3de.app"/"Contents"/"MacOS"/"o3de"; AzFramework::ProcessLauncher::ProcessLaunchInfo processLaunchInfo; diff --git a/Code/Tools/CMakeLists.txt b/Code/Tools/CMakeLists.txt index 8107089433..86f745fdef 100644 --- a/Code/Tools/CMakeLists.txt +++ b/Code/Tools/CMakeLists.txt @@ -17,7 +17,7 @@ add_subdirectory(DeltaCataloger) add_subdirectory(SerializeContextTools) add_subdirectory(AssetBundler) add_subdirectory(GridHub) -add_subdirectory(Standalone) +add_subdirectory(LuaIDE) add_subdirectory(TestImpactFramework) add_subdirectory(ProjectManager) add_subdirectory(BundleLauncher) diff --git a/Code/Tools/DeltaCataloger/Tests/tests_main.cpp b/Code/Tools/DeltaCataloger/Tests/tests_main.cpp index 1a3b86d34b..a2731c498d 100644 --- a/Code/Tools/DeltaCataloger/Tests/tests_main.cpp +++ b/Code/Tools/DeltaCataloger/Tests/tests_main.cpp @@ -45,12 +45,13 @@ protected: AZ::SettingsRegistryInterface* registry = AZ::SettingsRegistry::Get(); auto projectPathKey = AZ::SettingsRegistryInterface::FixedValueString(AZ::SettingsRegistryMergeUtils::BootstrapSettingsRootKey) + "/project_path"; - registry->Set(projectPathKey, "AutomatedTesting"); + AZ::IO::FixedMaxPath enginePath; + registry->Get(enginePath.Native(), AZ::SettingsRegistryMergeUtils::FilePathKey_EngineRootFolder); + registry->Set(projectPathKey, (enginePath / "AutomatedTesting").Native()); AZ::SettingsRegistryMergeUtils::MergeSettingsToRegistry_AddRuntimeFilePaths(*registry); AZ::ComponentApplication::Descriptor desc; desc.m_useExistingAllocator = true; - desc.m_enableDrilling = false; // we already created a memory driller for the test (AllocatorsFixture) app.Start(desc); // Without this, the user settings component would attempt to save on finalize/shutdown. Since the file is diff --git a/Code/Tools/GridHub/CMakeLists.txt b/Code/Tools/GridHub/CMakeLists.txt index 26d8b8e557..8603c1e477 100644 --- a/Code/Tools/GridHub/CMakeLists.txt +++ b/Code/Tools/GridHub/CMakeLists.txt @@ -35,3 +35,5 @@ ly_add_target( AZ::AzCore AZ::GridMate ) + +ly_add_dependencies(LuaIDE GridHub) diff --git a/Code/Tools/LuaIDE/CMakeLists.txt b/Code/Tools/LuaIDE/CMakeLists.txt new file mode 100644 index 0000000000..98c8d7f04b --- /dev/null +++ b/Code/Tools/LuaIDE/CMakeLists.txt @@ -0,0 +1,41 @@ +# +# Copyright (c) Contributors to the Open 3D Engine Project. +# For complete copyright and license terms please see the LICENSE at the root of this distribution. +# +# SPDX-License-Identifier: Apache-2.0 OR MIT +# +# + +if(NOT PAL_TRAIT_BUILD_HOST_TOOLS) + return() +endif() + +ly_add_target( + NAME LuaIDE APPLICATION + NAMESPACE AZ + AUTOMOC + AUTOUIC + AUTORCC + FILES_CMAKE + lua_ide_files.cmake + Platform/${PAL_PLATFORM_NAME}/lua_ide_${PAL_PLATFORM_NAME_LOWERCASE}_files.cmake + INCLUDE_DIRECTORIES + PRIVATE + . + Source/Editor + Source/LUA + BUILD_DEPENDENCIES + PRIVATE + Legacy::CryCommon + AZ::AzCore + AZ::AzFramework + AZ::AzToolsFramework + AZ::GridMate + AZ::AzQtComponents + ${additional_dependencies} + COMPILE_DEFINITIONS + PRIVATE + STANDALONETOOLS_ENABLE_LUA_IDE +) + +ly_add_dependencies(Editor LuaIDE) diff --git a/Code/Tools/Standalone/Platform/Common/Unimplemented/Source/StandaloneApplication_Unimplemented.cpp b/Code/Tools/LuaIDE/Platform/Common/Unimplemented/Source/StandaloneApplication_Unimplemented.cpp similarity index 100% rename from Code/Tools/Standalone/Platform/Common/Unimplemented/Source/StandaloneApplication_Unimplemented.cpp rename to Code/Tools/LuaIDE/Platform/Common/Unimplemented/Source/StandaloneApplication_Unimplemented.cpp diff --git a/Code/Tools/Standalone/Platform/Linux/lua_ide_linux_files.cmake b/Code/Tools/LuaIDE/Platform/Linux/lua_ide_linux_files.cmake similarity index 100% rename from Code/Tools/Standalone/Platform/Linux/lua_ide_linux_files.cmake rename to Code/Tools/LuaIDE/Platform/Linux/lua_ide_linux_files.cmake diff --git a/Code/Tools/Standalone/Platform/Mac/Source/StandaloneApplication_Mac.cpp b/Code/Tools/LuaIDE/Platform/Mac/Source/StandaloneApplication_Mac.cpp similarity index 100% rename from Code/Tools/Standalone/Platform/Mac/Source/StandaloneApplication_Mac.cpp rename to Code/Tools/LuaIDE/Platform/Mac/Source/StandaloneApplication_Mac.cpp diff --git a/Code/Tools/Standalone/Platform/Mac/lua_ide_mac_files.cmake b/Code/Tools/LuaIDE/Platform/Mac/lua_ide_mac_files.cmake similarity index 100% rename from Code/Tools/Standalone/Platform/Mac/lua_ide_mac_files.cmake rename to Code/Tools/LuaIDE/Platform/Mac/lua_ide_mac_files.cmake diff --git a/Code/Tools/Standalone/Platform/Windows/Source/StandaloneApplication_Windows.cpp b/Code/Tools/LuaIDE/Platform/Windows/Source/StandaloneApplication_Windows.cpp similarity index 100% rename from Code/Tools/Standalone/Platform/Windows/Source/StandaloneApplication_Windows.cpp rename to Code/Tools/LuaIDE/Platform/Windows/Source/StandaloneApplication_Windows.cpp diff --git a/Code/Tools/Standalone/Platform/Windows/lua_ide_windows_files.cmake b/Code/Tools/LuaIDE/Platform/Windows/lua_ide_windows_files.cmake similarity index 100% rename from Code/Tools/Standalone/Platform/Windows/lua_ide_windows_files.cmake rename to Code/Tools/LuaIDE/Platform/Windows/lua_ide_windows_files.cmake diff --git a/Code/Tools/Standalone/Source/AssetDatabaseLocationListener.cpp b/Code/Tools/LuaIDE/Source/AssetDatabaseLocationListener.cpp similarity index 100% rename from Code/Tools/Standalone/Source/AssetDatabaseLocationListener.cpp rename to Code/Tools/LuaIDE/Source/AssetDatabaseLocationListener.cpp diff --git a/Code/Tools/Standalone/Source/AssetDatabaseLocationListener.h b/Code/Tools/LuaIDE/Source/AssetDatabaseLocationListener.h similarity index 100% rename from Code/Tools/Standalone/Source/AssetDatabaseLocationListener.h rename to Code/Tools/LuaIDE/Source/AssetDatabaseLocationListener.h diff --git a/Code/Tools/Standalone/Source/Editor/Editor.rc b/Code/Tools/LuaIDE/Source/Editor/Editor.rc similarity index 100% rename from Code/Tools/Standalone/Source/Editor/Editor.rc rename to Code/Tools/LuaIDE/Source/Editor/Editor.rc diff --git a/Code/Tools/Standalone/Source/Editor/LuaEditor.cpp b/Code/Tools/LuaIDE/Source/Editor/LuaEditor.cpp similarity index 100% rename from Code/Tools/Standalone/Source/Editor/LuaEditor.cpp rename to Code/Tools/LuaIDE/Source/Editor/LuaEditor.cpp diff --git a/Code/Tools/Standalone/Source/Editor/LuaEditor.h b/Code/Tools/LuaIDE/Source/Editor/LuaEditor.h similarity index 100% rename from Code/Tools/Standalone/Source/Editor/LuaEditor.h rename to Code/Tools/LuaIDE/Source/Editor/LuaEditor.h diff --git a/Code/Tools/Standalone/Source/Editor/LuaEditor.rc b/Code/Tools/LuaIDE/Source/Editor/LuaEditor.rc similarity index 100% rename from Code/Tools/Standalone/Source/Editor/LuaEditor.rc rename to Code/Tools/LuaIDE/Source/Editor/LuaEditor.rc diff --git a/Code/Tools/Standalone/Source/Editor/Resource.h b/Code/Tools/LuaIDE/Source/Editor/Resource.h similarity index 100% rename from Code/Tools/Standalone/Source/Editor/Resource.h rename to Code/Tools/LuaIDE/Source/Editor/Resource.h diff --git a/Code/Tools/Standalone/Source/Editor/hex_lua.ico b/Code/Tools/LuaIDE/Source/Editor/hex_lua.ico similarity index 100% rename from Code/Tools/Standalone/Source/Editor/hex_lua.ico rename to Code/Tools/LuaIDE/Source/Editor/hex_lua.ico diff --git a/Code/Tools/Standalone/Source/Editor/targetver.h b/Code/Tools/LuaIDE/Source/Editor/targetver.h similarity index 100% rename from Code/Tools/Standalone/Source/Editor/targetver.h rename to Code/Tools/LuaIDE/Source/Editor/targetver.h diff --git a/Code/Tools/Standalone/Source/LUA/BasicScriptChecker.h b/Code/Tools/LuaIDE/Source/LUA/BasicScriptChecker.h similarity index 100% rename from Code/Tools/Standalone/Source/LUA/BasicScriptChecker.h rename to Code/Tools/LuaIDE/Source/LUA/BasicScriptChecker.h diff --git a/Code/Tools/Standalone/Source/LUA/BreakpointPanel.cpp b/Code/Tools/LuaIDE/Source/LUA/BreakpointPanel.cpp similarity index 98% rename from Code/Tools/Standalone/Source/LUA/BreakpointPanel.cpp rename to Code/Tools/LuaIDE/Source/LUA/BreakpointPanel.cpp index 56379a3f07..cb8fffffc7 100644 --- a/Code/Tools/Standalone/Source/LUA/BreakpointPanel.cpp +++ b/Code/Tools/LuaIDE/Source/LUA/BreakpointPanel.cpp @@ -140,7 +140,7 @@ void DHBreakpointsWidget::CreateBreakpoint(const AZStd::string& debugName, int l QTableWidgetItem* newItem = new QTableWidgetItem(debugName.c_str()); newItem->setFlags(Qt::ItemIsEnabled | Qt::ItemIsSelectable); setItem(newRow, 1, newItem); - newItem = new QTableWidgetItem(QString().setNum(lineNumber + 1)); // +1 offset to match editor numbering + newItem = new QTableWidgetItem(QString().setNum(lineNumber)); newItem->setFlags(Qt::ItemIsEnabled | Qt::ItemIsSelectable); setItem(newRow, 0, newItem); } diff --git a/Code/Tools/Standalone/Source/LUA/BreakpointPanel.hxx b/Code/Tools/LuaIDE/Source/LUA/BreakpointPanel.hxx similarity index 100% rename from Code/Tools/Standalone/Source/LUA/BreakpointPanel.hxx rename to Code/Tools/LuaIDE/Source/LUA/BreakpointPanel.hxx diff --git a/Code/Tools/Standalone/Source/LUA/ClassReferenceFilter.cpp b/Code/Tools/LuaIDE/Source/LUA/ClassReferenceFilter.cpp similarity index 100% rename from Code/Tools/Standalone/Source/LUA/ClassReferenceFilter.cpp rename to Code/Tools/LuaIDE/Source/LUA/ClassReferenceFilter.cpp diff --git a/Code/Tools/Standalone/Source/LUA/ClassReferenceFilter.hxx b/Code/Tools/LuaIDE/Source/LUA/ClassReferenceFilter.hxx similarity index 100% rename from Code/Tools/Standalone/Source/LUA/ClassReferenceFilter.hxx rename to Code/Tools/LuaIDE/Source/LUA/ClassReferenceFilter.hxx diff --git a/Code/Tools/Standalone/Source/LUA/ClassReferencePanel.cpp b/Code/Tools/LuaIDE/Source/LUA/ClassReferencePanel.cpp similarity index 100% rename from Code/Tools/Standalone/Source/LUA/ClassReferencePanel.cpp rename to Code/Tools/LuaIDE/Source/LUA/ClassReferencePanel.cpp diff --git a/Code/Tools/Standalone/Source/LUA/ClassReferencePanel.hxx b/Code/Tools/LuaIDE/Source/LUA/ClassReferencePanel.hxx similarity index 100% rename from Code/Tools/Standalone/Source/LUA/ClassReferencePanel.hxx rename to Code/Tools/LuaIDE/Source/LUA/ClassReferencePanel.hxx diff --git a/Code/Tools/Standalone/Source/LUA/CodeCompletion/LUACompleter.cpp b/Code/Tools/LuaIDE/Source/LUA/CodeCompletion/LUACompleter.cpp similarity index 100% rename from Code/Tools/Standalone/Source/LUA/CodeCompletion/LUACompleter.cpp rename to Code/Tools/LuaIDE/Source/LUA/CodeCompletion/LUACompleter.cpp diff --git a/Code/Tools/Standalone/Source/LUA/CodeCompletion/LUACompleter.hxx b/Code/Tools/LuaIDE/Source/LUA/CodeCompletion/LUACompleter.hxx similarity index 100% rename from Code/Tools/Standalone/Source/LUA/CodeCompletion/LUACompleter.hxx rename to Code/Tools/LuaIDE/Source/LUA/CodeCompletion/LUACompleter.hxx diff --git a/Code/Tools/Standalone/Source/LUA/CodeCompletion/LUACompletionModel.cpp b/Code/Tools/LuaIDE/Source/LUA/CodeCompletion/LUACompletionModel.cpp similarity index 100% rename from Code/Tools/Standalone/Source/LUA/CodeCompletion/LUACompletionModel.cpp rename to Code/Tools/LuaIDE/Source/LUA/CodeCompletion/LUACompletionModel.cpp diff --git a/Code/Tools/Standalone/Source/LUA/CodeCompletion/LUACompletionModel.hxx b/Code/Tools/LuaIDE/Source/LUA/CodeCompletion/LUACompletionModel.hxx similarity index 100% rename from Code/Tools/Standalone/Source/LUA/CodeCompletion/LUACompletionModel.hxx rename to Code/Tools/LuaIDE/Source/LUA/CodeCompletion/LUACompletionModel.hxx diff --git a/Code/Tools/Standalone/Source/LUA/DebugAttachmentButton.cpp b/Code/Tools/LuaIDE/Source/LUA/DebugAttachmentButton.cpp similarity index 100% rename from Code/Tools/Standalone/Source/LUA/DebugAttachmentButton.cpp rename to Code/Tools/LuaIDE/Source/LUA/DebugAttachmentButton.cpp diff --git a/Code/Tools/Standalone/Source/LUA/DebugAttachmentButton.hxx b/Code/Tools/LuaIDE/Source/LUA/DebugAttachmentButton.hxx similarity index 100% rename from Code/Tools/Standalone/Source/LUA/DebugAttachmentButton.hxx rename to Code/Tools/LuaIDE/Source/LUA/DebugAttachmentButton.hxx diff --git a/Code/Tools/Standalone/Source/LUA/LUABreakpointTrackerMessages.cpp b/Code/Tools/LuaIDE/Source/LUA/LUABreakpointTrackerMessages.cpp similarity index 100% rename from Code/Tools/Standalone/Source/LUA/LUABreakpointTrackerMessages.cpp rename to Code/Tools/LuaIDE/Source/LUA/LUABreakpointTrackerMessages.cpp diff --git a/Code/Tools/Standalone/Source/LUA/LUABreakpointTrackerMessages.h b/Code/Tools/LuaIDE/Source/LUA/LUABreakpointTrackerMessages.h similarity index 100% rename from Code/Tools/Standalone/Source/LUA/LUABreakpointTrackerMessages.h rename to Code/Tools/LuaIDE/Source/LUA/LUABreakpointTrackerMessages.h diff --git a/Code/Tools/Standalone/Source/LUA/LUAContextControlMessages.h b/Code/Tools/LuaIDE/Source/LUA/LUAContextControlMessages.h similarity index 100% rename from Code/Tools/Standalone/Source/LUA/LUAContextControlMessages.h rename to Code/Tools/LuaIDE/Source/LUA/LUAContextControlMessages.h diff --git a/Code/Tools/Standalone/Source/LUA/LUADebuggerComponent.cpp b/Code/Tools/LuaIDE/Source/LUA/LUADebuggerComponent.cpp similarity index 100% rename from Code/Tools/Standalone/Source/LUA/LUADebuggerComponent.cpp rename to Code/Tools/LuaIDE/Source/LUA/LUADebuggerComponent.cpp diff --git a/Code/Tools/Standalone/Source/LUA/LUADebuggerComponent.h b/Code/Tools/LuaIDE/Source/LUA/LUADebuggerComponent.h similarity index 100% rename from Code/Tools/Standalone/Source/LUA/LUADebuggerComponent.h rename to Code/Tools/LuaIDE/Source/LUA/LUADebuggerComponent.h diff --git a/Code/Tools/Standalone/Source/LUA/LUADebuggerMessages.h b/Code/Tools/LuaIDE/Source/LUA/LUADebuggerMessages.h similarity index 100% rename from Code/Tools/Standalone/Source/LUA/LUADebuggerMessages.h rename to Code/Tools/LuaIDE/Source/LUA/LUADebuggerMessages.h diff --git a/Code/Tools/Standalone/Source/LUA/LUAEditorBlockState.h b/Code/Tools/LuaIDE/Source/LUA/LUAEditorBlockState.h similarity index 100% rename from Code/Tools/Standalone/Source/LUA/LUAEditorBlockState.h rename to Code/Tools/LuaIDE/Source/LUA/LUAEditorBlockState.h diff --git a/Code/Tools/Standalone/Source/LUA/LUAEditorBreakpointWidget.cpp b/Code/Tools/LuaIDE/Source/LUA/LUAEditorBreakpointWidget.cpp similarity index 100% rename from Code/Tools/Standalone/Source/LUA/LUAEditorBreakpointWidget.cpp rename to Code/Tools/LuaIDE/Source/LUA/LUAEditorBreakpointWidget.cpp diff --git a/Code/Tools/Standalone/Source/LUA/LUAEditorBreakpointWidget.hxx b/Code/Tools/LuaIDE/Source/LUA/LUAEditorBreakpointWidget.hxx similarity index 100% rename from Code/Tools/Standalone/Source/LUA/LUAEditorBreakpointWidget.hxx rename to Code/Tools/LuaIDE/Source/LUA/LUAEditorBreakpointWidget.hxx diff --git a/Code/Tools/Standalone/Source/LUA/LUAEditorContext.cpp b/Code/Tools/LuaIDE/Source/LUA/LUAEditorContext.cpp similarity index 99% rename from Code/Tools/Standalone/Source/LUA/LUAEditorContext.cpp rename to Code/Tools/LuaIDE/Source/LUA/LUAEditorContext.cpp index f36724ee1a..533a89a77c 100644 --- a/Code/Tools/Standalone/Source/LUA/LUAEditorContext.cpp +++ b/Code/Tools/LuaIDE/Source/LUA/LUAEditorContext.cpp @@ -1433,7 +1433,8 @@ namespace LUAEditor return; } - AZStd::to_lower(const_cast(assetId).begin(), const_cast(assetId).end()); + AZStd::string assetIdLower(assetId); + AZStd::to_lower(assetIdLower.begin(), assetIdLower.end()); ShowLUAEditorView(); @@ -1446,11 +1447,11 @@ namespace LUAEditor // * we need to load that lua panel with the document's data, initializing it. // are we already tracking it? - auto it = m_documentInfoMap.find(assetId); + auto it = m_documentInfoMap.find(assetIdLower); if (it != m_documentInfoMap.end()) { // tell the view that it needs to focus that document! - mostRecentlyOpenedDocumentView = assetId; + mostRecentlyOpenedDocumentView = assetIdLower; if (m_queuedOpenRecent) { return; @@ -1482,14 +1483,14 @@ namespace LUAEditor // Register the script into the asset catalog AZ::Data::AssetType assetType = AZ::AzTypeInfo::Uuid(); AZ::Data::AssetId catalogAssetId; - EBUS_EVENT_RESULT(catalogAssetId, AZ::Data::AssetCatalogRequestBus, GetAssetIdByPath, assetId.c_str(), assetType, true); + EBUS_EVENT_RESULT(catalogAssetId, AZ::Data::AssetCatalogRequestBus, GetAssetIdByPath, assetIdLower.c_str(), assetType, true); uint64_t modTime = m_fileIO->ModificationTime(assetId.c_str()); DocumentInfo info; - info.m_assetName = assetId; + info.m_assetName = assetIdLower; AzFramework::StringFunc::Path::GetFullFileName(assetId.c_str(), info.m_displayName); - info.m_assetId = assetId; + info.m_assetId = assetIdLower; info.m_bSourceControl_BusyGettingStats = true; info.m_bSourceControl_BusyGettingStats = false; info.m_bSourceControl_CanWrite = true; @@ -1532,7 +1533,7 @@ namespace LUAEditor luaFile.Close(); } - DataLoadDoneCallback(isLoaded, assetId); + DataLoadDoneCallback(isLoaded, assetIdLower); ////////////////////////////////////////////////////////////////////////// if (m_queuedOpenRecent) @@ -1545,7 +1546,7 @@ namespace LUAEditor m_pLUAEditorMainWindow->IgnoreFocusEvents(false); } - mostRecentlyOpenedDocumentView = assetId; + mostRecentlyOpenedDocumentView = assetIdLower; EBUS_QUEUE_FUNCTION(AZ::SystemTickBus, &Context::OpenMostRecentDocumentView, this); } diff --git a/Code/Tools/Standalone/Source/LUA/LUAEditorContext.h b/Code/Tools/LuaIDE/Source/LUA/LUAEditorContext.h similarity index 100% rename from Code/Tools/Standalone/Source/LUA/LUAEditorContext.h rename to Code/Tools/LuaIDE/Source/LUA/LUAEditorContext.h diff --git a/Code/Tools/Standalone/Source/LUA/LUAEditorContextInterface.h b/Code/Tools/LuaIDE/Source/LUA/LUAEditorContextInterface.h similarity index 100% rename from Code/Tools/Standalone/Source/LUA/LUAEditorContextInterface.h rename to Code/Tools/LuaIDE/Source/LUA/LUAEditorContextInterface.h diff --git a/Code/Tools/Standalone/Source/LUA/LUAEditorContextMessages.h b/Code/Tools/LuaIDE/Source/LUA/LUAEditorContextMessages.h similarity index 100% rename from Code/Tools/Standalone/Source/LUA/LUAEditorContextMessages.h rename to Code/Tools/LuaIDE/Source/LUA/LUAEditorContextMessages.h diff --git a/Code/Tools/Standalone/Source/LUA/LUAEditorDebuggerMessages.h b/Code/Tools/LuaIDE/Source/LUA/LUAEditorDebuggerMessages.h similarity index 100% rename from Code/Tools/Standalone/Source/LUA/LUAEditorDebuggerMessages.h rename to Code/Tools/LuaIDE/Source/LUA/LUAEditorDebuggerMessages.h diff --git a/Code/Tools/Standalone/Source/LUA/LUAEditorFindDialog.cpp b/Code/Tools/LuaIDE/Source/LUA/LUAEditorFindDialog.cpp similarity index 99% rename from Code/Tools/Standalone/Source/LUA/LUAEditorFindDialog.cpp rename to Code/Tools/LuaIDE/Source/LUA/LUAEditorFindDialog.cpp index c775ddc0ba..c426566c5f 100644 --- a/Code/Tools/Standalone/Source/LUA/LUAEditorFindDialog.cpp +++ b/Code/Tools/LuaIDE/Source/LUA/LUAEditorFindDialog.cpp @@ -610,7 +610,7 @@ namespace LUAEditor { m_resultList[qAssetName].m_assetId = docInfo.m_assetId; } - entry.m_lineNumber = line; + entry.m_lineNumber = line + 1; entry.m_lineText = entry.m_lineText.trimmed(); while (index > -1) diff --git a/Code/Tools/Standalone/Source/LUA/LUAEditorFindDialog.hxx b/Code/Tools/LuaIDE/Source/LUA/LUAEditorFindDialog.hxx similarity index 100% rename from Code/Tools/Standalone/Source/LUA/LUAEditorFindDialog.hxx rename to Code/Tools/LuaIDE/Source/LUA/LUAEditorFindDialog.hxx diff --git a/Code/Tools/Standalone/Source/LUA/LUAEditorFindDialog.ui b/Code/Tools/LuaIDE/Source/LUA/LUAEditorFindDialog.ui similarity index 100% rename from Code/Tools/Standalone/Source/LUA/LUAEditorFindDialog.ui rename to Code/Tools/LuaIDE/Source/LUA/LUAEditorFindDialog.ui diff --git a/Code/Tools/Standalone/Source/LUA/LUAEditorFindResults.cpp b/Code/Tools/LuaIDE/Source/LUA/LUAEditorFindResults.cpp similarity index 100% rename from Code/Tools/Standalone/Source/LUA/LUAEditorFindResults.cpp rename to Code/Tools/LuaIDE/Source/LUA/LUAEditorFindResults.cpp diff --git a/Code/Tools/Standalone/Source/LUA/LUAEditorFindResults.hxx b/Code/Tools/LuaIDE/Source/LUA/LUAEditorFindResults.hxx similarity index 100% rename from Code/Tools/Standalone/Source/LUA/LUAEditorFindResults.hxx rename to Code/Tools/LuaIDE/Source/LUA/LUAEditorFindResults.hxx diff --git a/Code/Tools/Standalone/Source/LUA/LUAEditorFindResults.ui b/Code/Tools/LuaIDE/Source/LUA/LUAEditorFindResults.ui similarity index 100% rename from Code/Tools/Standalone/Source/LUA/LUAEditorFindResults.ui rename to Code/Tools/LuaIDE/Source/LUA/LUAEditorFindResults.ui diff --git a/Code/Tools/Standalone/Source/LUA/LUAEditorFoldingWidget.cpp b/Code/Tools/LuaIDE/Source/LUA/LUAEditorFoldingWidget.cpp similarity index 100% rename from Code/Tools/Standalone/Source/LUA/LUAEditorFoldingWidget.cpp rename to Code/Tools/LuaIDE/Source/LUA/LUAEditorFoldingWidget.cpp diff --git a/Code/Tools/Standalone/Source/LUA/LUAEditorFoldingWidget.hxx b/Code/Tools/LuaIDE/Source/LUA/LUAEditorFoldingWidget.hxx similarity index 100% rename from Code/Tools/Standalone/Source/LUA/LUAEditorFoldingWidget.hxx rename to Code/Tools/LuaIDE/Source/LUA/LUAEditorFoldingWidget.hxx diff --git a/Code/Tools/Standalone/Source/LUA/LUAEditorGoToLineDialog.cpp b/Code/Tools/LuaIDE/Source/LUA/LUAEditorGoToLineDialog.cpp similarity index 100% rename from Code/Tools/Standalone/Source/LUA/LUAEditorGoToLineDialog.cpp rename to Code/Tools/LuaIDE/Source/LUA/LUAEditorGoToLineDialog.cpp diff --git a/Code/Tools/Standalone/Source/LUA/LUAEditorGoToLineDialog.hxx b/Code/Tools/LuaIDE/Source/LUA/LUAEditorGoToLineDialog.hxx similarity index 100% rename from Code/Tools/Standalone/Source/LUA/LUAEditorGoToLineDialog.hxx rename to Code/Tools/LuaIDE/Source/LUA/LUAEditorGoToLineDialog.hxx diff --git a/Code/Tools/Standalone/Source/LUA/LUAEditorGoToLineDialog.ui b/Code/Tools/LuaIDE/Source/LUA/LUAEditorGoToLineDialog.ui similarity index 100% rename from Code/Tools/Standalone/Source/LUA/LUAEditorGoToLineDialog.ui rename to Code/Tools/LuaIDE/Source/LUA/LUAEditorGoToLineDialog.ui diff --git a/Code/Tools/Standalone/Source/LUA/LUAEditorMainWindow.cpp b/Code/Tools/LuaIDE/Source/LUA/LUAEditorMainWindow.cpp similarity index 96% rename from Code/Tools/Standalone/Source/LUA/LUAEditorMainWindow.cpp rename to Code/Tools/LuaIDE/Source/LUA/LUAEditorMainWindow.cpp index 33d8373487..776e290042 100644 --- a/Code/Tools/Standalone/Source/LUA/LUAEditorMainWindow.cpp +++ b/Code/Tools/LuaIDE/Source/LUA/LUAEditorMainWindow.cpp @@ -346,7 +346,11 @@ namespace LUAEditor { auto selectedAsset = selectedAssets.front(); const AZStd::string filePath = selectedAsset->GetFullPath(); - EBUS_EVENT(Context_DocumentManagement::Bus, OnLoadDocument, filePath, true); + auto entryType = selectedAsset->GetEntryType(); + if (entryType == AzToolsFramework::AssetBrowser::AssetBrowserEntry::AssetEntryType::Source) + { + EBUS_EVENT(Context_DocumentManagement::Bus, OnLoadDocument, filePath, true); + } } }); } @@ -372,9 +376,17 @@ namespace LUAEditor StringFilter* stringFilter = new StringFilter(); stringFilter->SetFilterPropagation(AssetTypeFilter::PropagateDirection::Up); - connect(m_gui->m_assetBrowserSearchWidget, &AzQtComponents::FilteredSearchWidget::TextFilterChanged, this, [stringFilter](const QString& newString) + connect(m_gui->m_assetBrowserSearchWidget, &AzQtComponents::FilteredSearchWidget::TextFilterChanged, this, [&, stringFilter](const QString& newString) { stringFilter->SetFilterString(newString); + if (newString.isEmpty()) + { + m_gui->m_assetBrowserTreeView->collapseAll(); + } + else + { + m_gui->m_assetBrowserTreeView->expandAll(); + } }); // Construct the final filter where they are all and'd together @@ -1280,7 +1292,7 @@ namespace LUAEditor // go to that line of the selected file. lineNumber = dlg.getLineNumber(); - currentView->SetCursorPosition(lineNumber - 1, 0); + currentView->SetCursorPosition(lineNumber, 0); } } @@ -2141,24 +2153,7 @@ namespace LUAEditor if (event->type() == QEvent::KeyPress) { QKeyEvent* keyEvent = static_cast(event); - if (keyEvent->key() == Qt::Key_Control) - { - TrackedLUACtrlTabOrder::iterator tabIter = m_CtrlTabOrder.begin(); - while (tabIter != m_CtrlTabOrder.end()) - { - if (*tabIter == m_lastFocusedAssetId) - { - // store the visible top window and make it the list's topmost - m_StoredTabAssetId = m_lastFocusedAssetId; - m_CtrlTabOrder.erase(tabIter); - m_CtrlTabOrder.push_front(m_lastFocusedAssetId); - break; - } - - ++tabIter; - } - } - else if (keyEvent->key() == Qt::Key_C && (keyEvent->modifiers() & Qt::ControlModifier)) + if (keyEvent->key() == Qt::Key_C && (keyEvent->modifiers() & Qt::ControlModifier)) { OnEditMenuCopy(); return true; @@ -2174,32 +2169,6 @@ namespace LUAEditor QKeyEvent* keyEvent = static_cast(event); if (keyEvent->key() == Qt::Key_Control) { - // reconfigure the ctrl+tab stack to set the next document to be the stored guid - // which was recorded when Ctrl was first pressed - TrackedLUACtrlTabOrder::iterator tabIter = m_CtrlTabOrder.begin(); - while (tabIter != m_CtrlTabOrder.end()) - { - if (*tabIter == m_StoredTabAssetId) - { - m_CtrlTabOrder.erase(tabIter); - - tabIter = m_CtrlTabOrder.begin(); - ++tabIter; - if (tabIter != m_CtrlTabOrder.end()) - { - m_CtrlTabOrder.insert(tabIter, m_StoredTabAssetId); - } - else - { - m_CtrlTabOrder.push_back(m_StoredTabAssetId); - } - - break; - } - - ++tabIter; - } - m_StoredTabAssetId = ""; } } @@ -2210,46 +2179,67 @@ namespace LUAEditor void LUAEditorMainWindow::OnTabForwards() { - // pop the first entry and push it to the last spot TrackedLUACtrlTabOrder::iterator tabIter = m_CtrlTabOrder.begin(); - if (tabIter != m_CtrlTabOrder.end()) - { - AZStd::string assetId = *tabIter; - m_CtrlTabOrder.pop_front(); - m_CtrlTabOrder.push_back(assetId); - // then grab the new first entry and pass it on to the widgetry - tabIter = m_CtrlTabOrder.begin(); - - TrackedLUAViewMap::iterator viewInfoIter = m_dOpenLUAView.find(*tabIter); - if (viewInfoIter != m_dOpenLUAView.end()) + while (tabIter != m_CtrlTabOrder.end()) + { + if (*tabIter == m_lastFocusedAssetId) { - viewInfoIter->second.luaDockWidget()->show(); - viewInfoIter->second.luaDockWidget()->raise(); - viewInfoIter->second.luaViewWidget()->setFocus(); + break; } + tabIter++; + } + + if (tabIter == m_CtrlTabOrder.begin()) + { + tabIter = m_CtrlTabOrder.end(); + --tabIter; + } + else + { + --tabIter; + } + + TrackedLUAViewMap::iterator viewInfoIter = m_dOpenLUAView.find(*tabIter); + if (viewInfoIter != m_dOpenLUAView.end()) + { + viewInfoIter->second.luaDockWidget()->show(); + viewInfoIter->second.luaDockWidget()->raise(); + viewInfoIter->second.luaViewWidget()->setFocus(); + m_lastFocusedAssetId = *tabIter; } } void LUAEditorMainWindow::OnTabBackwards() - { - // pop the last entry and push it to the first spot - TrackedLUACtrlTabOrder::iterator tabIter = m_CtrlTabOrder.end(); - --tabIter; - if (tabIter != m_CtrlTabOrder.end()) + { + TrackedLUACtrlTabOrder::iterator tabIter = m_CtrlTabOrder.begin(); + while (tabIter != m_CtrlTabOrder.end()) { - AZStd::string assetId = *tabIter; - m_CtrlTabOrder.pop_back(); - m_CtrlTabOrder.push_front(assetId); - // then grab the new first entry and pass it on to the widgetry - tabIter = m_CtrlTabOrder.begin(); - - TrackedLUAViewMap::iterator viewInfoIter = m_dOpenLUAView.find(*tabIter); - if (viewInfoIter != m_dOpenLUAView.end()) + if (*tabIter == m_lastFocusedAssetId) { - viewInfoIter->second.luaDockWidget()->show(); - viewInfoIter->second.luaDockWidget()->raise(); - viewInfoIter->second.luaViewWidget()->setFocus(); + break; } + tabIter++; + } + + if (tabIter == m_CtrlTabOrder.end()) + { + return; + } + + tabIter++; + if (tabIter == m_CtrlTabOrder.end()) + { + tabIter = m_CtrlTabOrder.begin(); + + } + + TrackedLUAViewMap::iterator viewInfoIter = m_dOpenLUAView.find(*tabIter); + if (viewInfoIter != m_dOpenLUAView.end()) + { + viewInfoIter->second.luaDockWidget()->show(); + viewInfoIter->second.luaDockWidget()->raise(); + viewInfoIter->second.luaViewWidget()->setFocus(); + m_lastFocusedAssetId = *tabIter; } } diff --git a/Code/Tools/Standalone/Source/LUA/LUAEditorMainWindow.hxx b/Code/Tools/LuaIDE/Source/LUA/LUAEditorMainWindow.hxx similarity index 100% rename from Code/Tools/Standalone/Source/LUA/LUAEditorMainWindow.hxx rename to Code/Tools/LuaIDE/Source/LUA/LUAEditorMainWindow.hxx diff --git a/Code/Tools/Standalone/Source/LUA/LUAEditorMainWindow.ui b/Code/Tools/LuaIDE/Source/LUA/LUAEditorMainWindow.ui similarity index 100% rename from Code/Tools/Standalone/Source/LUA/LUAEditorMainWindow.ui rename to Code/Tools/LuaIDE/Source/LUA/LUAEditorMainWindow.ui diff --git a/Code/Tools/Standalone/Source/LUA/LUAEditorPlainTextEdit.cpp b/Code/Tools/LuaIDE/Source/LUA/LUAEditorPlainTextEdit.cpp similarity index 100% rename from Code/Tools/Standalone/Source/LUA/LUAEditorPlainTextEdit.cpp rename to Code/Tools/LuaIDE/Source/LUA/LUAEditorPlainTextEdit.cpp diff --git a/Code/Tools/Standalone/Source/LUA/LUAEditorPlainTextEdit.hxx b/Code/Tools/LuaIDE/Source/LUA/LUAEditorPlainTextEdit.hxx similarity index 100% rename from Code/Tools/Standalone/Source/LUA/LUAEditorPlainTextEdit.hxx rename to Code/Tools/LuaIDE/Source/LUA/LUAEditorPlainTextEdit.hxx diff --git a/Code/Tools/Standalone/Source/LUA/LUAEditorSettingsDialog.cpp b/Code/Tools/LuaIDE/Source/LUA/LUAEditorSettingsDialog.cpp similarity index 100% rename from Code/Tools/Standalone/Source/LUA/LUAEditorSettingsDialog.cpp rename to Code/Tools/LuaIDE/Source/LUA/LUAEditorSettingsDialog.cpp diff --git a/Code/Tools/Standalone/Source/LUA/LUAEditorSettingsDialog.hxx b/Code/Tools/LuaIDE/Source/LUA/LUAEditorSettingsDialog.hxx similarity index 100% rename from Code/Tools/Standalone/Source/LUA/LUAEditorSettingsDialog.hxx rename to Code/Tools/LuaIDE/Source/LUA/LUAEditorSettingsDialog.hxx diff --git a/Code/Tools/Standalone/Source/LUA/LUAEditorSettingsDialog.ui b/Code/Tools/LuaIDE/Source/LUA/LUAEditorSettingsDialog.ui similarity index 100% rename from Code/Tools/Standalone/Source/LUA/LUAEditorSettingsDialog.ui rename to Code/Tools/LuaIDE/Source/LUA/LUAEditorSettingsDialog.ui diff --git a/Code/Tools/Standalone/Source/LUA/LUAEditorStyleMessages.cpp b/Code/Tools/LuaIDE/Source/LUA/LUAEditorStyleMessages.cpp similarity index 100% rename from Code/Tools/Standalone/Source/LUA/LUAEditorStyleMessages.cpp rename to Code/Tools/LuaIDE/Source/LUA/LUAEditorStyleMessages.cpp diff --git a/Code/Tools/Standalone/Source/LUA/LUAEditorStyleMessages.h b/Code/Tools/LuaIDE/Source/LUA/LUAEditorStyleMessages.h similarity index 100% rename from Code/Tools/Standalone/Source/LUA/LUAEditorStyleMessages.h rename to Code/Tools/LuaIDE/Source/LUA/LUAEditorStyleMessages.h diff --git a/Code/Tools/Standalone/Source/LUA/LUAEditorSyntaxHighlighter.cpp b/Code/Tools/LuaIDE/Source/LUA/LUAEditorSyntaxHighlighter.cpp similarity index 100% rename from Code/Tools/Standalone/Source/LUA/LUAEditorSyntaxHighlighter.cpp rename to Code/Tools/LuaIDE/Source/LUA/LUAEditorSyntaxHighlighter.cpp diff --git a/Code/Tools/Standalone/Source/LUA/LUAEditorSyntaxHighlighter.hxx b/Code/Tools/LuaIDE/Source/LUA/LUAEditorSyntaxHighlighter.hxx similarity index 100% rename from Code/Tools/Standalone/Source/LUA/LUAEditorSyntaxHighlighter.hxx rename to Code/Tools/LuaIDE/Source/LUA/LUAEditorSyntaxHighlighter.hxx diff --git a/Code/Tools/Standalone/Source/LUA/LUAEditorView.cpp b/Code/Tools/LuaIDE/Source/LUA/LUAEditorView.cpp similarity index 98% rename from Code/Tools/Standalone/Source/LUA/LUAEditorView.cpp rename to Code/Tools/LuaIDE/Source/LUA/LUAEditorView.cpp index 18d12f292c..c83c9a5513 100644 --- a/Code/Tools/Standalone/Source/LUA/LUAEditorView.cpp +++ b/Code/Tools/LuaIDE/Source/LUA/LUAEditorView.cpp @@ -964,9 +964,11 @@ namespace LUAEditor int endLine; auto newText = AcumulateSelectedLines(startLine, endLine, callable); - SetSelection(startLine, 0, endLine + 1, 0); + SetSelection(startLine + 1, 0, endLine + 2, 0); + RemoveSelectedText(); + SetCursorPosition(startLine + 1, 0); ReplaceSelectedText(newText); - SetSelection(startLine, 0, endLine + 1, 0); + SetSelection(startLine + 1, 0, endLine + 1, INT_MAX); } void LUAViewWidget::CommentSelectedLines() @@ -1002,21 +1004,30 @@ namespace LUAEditor { int startLine; int endLine; - auto newText = AcumulateSelectedLines(startLine, endLine, [&](QString& newText, QTextBlock& block) + auto currText = AcumulateSelectedLines(startLine, endLine, [&](QString& newText, QTextBlock& block) { newText.append(block.text()); newText.append("\n"); }); + currText.remove(currText.count() - 1, 1); + if (startLine == 0) { return; } - - SetSelection(startLine - 1, INT_MAX, endLine, INT_MAX); + auto upText = GetLineText(startLine -1); + SetSelection(startLine, 0, startLine, INT_MAX); RemoveSelectedText(); - SetCursorPosition(startLine - 1, 0); - ReplaceSelectedText(newText); - SetSelection(startLine - 1, 0, endLine - 1, INT_MAX); + SetSelection(startLine + 1, 0, endLine + 1, INT_MAX); + RemoveSelectedText(); + + SetCursorPosition(startLine , 0); + ReplaceSelectedText(currText); + + SetCursorPosition(endLine + 1, 0); + ReplaceSelectedText(upText); + + SetSelection(startLine, 0, endLine, INT_MAX); } void LUAViewWidget::MoveSelectedLinesDn() @@ -1040,11 +1051,11 @@ namespace LUAEditor newText.prepend("\n"); } - SetSelection(startLine, 0, endLine + 1, 0); + SetSelection(startLine + 1, 0, endLine + 2, 0); RemoveSelectedText(); - SetCursorPosition(startLine + 1, 0); + SetCursorPosition(startLine + 2, 0); ReplaceSelectedText(newText); - SetSelection(startLine + 1, 0, endLine + 1, INT_MAX); + SetSelection(startLine + 2, 0, endLine + 2, INT_MAX); } void LUAViewWidget::SetReadonly(bool readonly) diff --git a/Code/Tools/Standalone/Source/LUA/LUAEditorView.hxx b/Code/Tools/LuaIDE/Source/LUA/LUAEditorView.hxx similarity index 100% rename from Code/Tools/Standalone/Source/LUA/LUAEditorView.hxx rename to Code/Tools/LuaIDE/Source/LUA/LUAEditorView.hxx diff --git a/Code/Tools/Standalone/Source/LUA/LUAEditorView.ui b/Code/Tools/LuaIDE/Source/LUA/LUAEditorView.ui similarity index 100% rename from Code/Tools/Standalone/Source/LUA/LUAEditorView.ui rename to Code/Tools/LuaIDE/Source/LUA/LUAEditorView.ui diff --git a/Code/Tools/Standalone/Source/LUA/LUAEditorViewMessages.h b/Code/Tools/LuaIDE/Source/LUA/LUAEditorViewMessages.h similarity index 100% rename from Code/Tools/Standalone/Source/LUA/LUAEditorViewMessages.h rename to Code/Tools/LuaIDE/Source/LUA/LUAEditorViewMessages.h diff --git a/Code/Tools/Standalone/Source/LUA/LUALocalsTrackerMessages.h b/Code/Tools/LuaIDE/Source/LUA/LUALocalsTrackerMessages.h similarity index 100% rename from Code/Tools/Standalone/Source/LUA/LUALocalsTrackerMessages.h rename to Code/Tools/LuaIDE/Source/LUA/LUALocalsTrackerMessages.h diff --git a/Code/Tools/Standalone/Source/LUA/LUAStackTrackerMessages.h b/Code/Tools/LuaIDE/Source/LUA/LUAStackTrackerMessages.h similarity index 100% rename from Code/Tools/Standalone/Source/LUA/LUAStackTrackerMessages.h rename to Code/Tools/LuaIDE/Source/LUA/LUAStackTrackerMessages.h diff --git a/Code/Tools/Standalone/Source/LUA/LUATargetContextTrackerMessages.cpp b/Code/Tools/LuaIDE/Source/LUA/LUATargetContextTrackerMessages.cpp similarity index 100% rename from Code/Tools/Standalone/Source/LUA/LUATargetContextTrackerMessages.cpp rename to Code/Tools/LuaIDE/Source/LUA/LUATargetContextTrackerMessages.cpp diff --git a/Code/Tools/Standalone/Source/LUA/LUATargetContextTrackerMessages.h b/Code/Tools/LuaIDE/Source/LUA/LUATargetContextTrackerMessages.h similarity index 100% rename from Code/Tools/Standalone/Source/LUA/LUATargetContextTrackerMessages.h rename to Code/Tools/LuaIDE/Source/LUA/LUATargetContextTrackerMessages.h diff --git a/Code/Tools/Standalone/Source/LUA/LUAWatchesDebuggerMessages.h b/Code/Tools/LuaIDE/Source/LUA/LUAWatchesDebuggerMessages.h similarity index 100% rename from Code/Tools/Standalone/Source/LUA/LUAWatchesDebuggerMessages.h rename to Code/Tools/LuaIDE/Source/LUA/LUAWatchesDebuggerMessages.h diff --git a/Code/Tools/Standalone/Source/LUA/ScriptCheckerAPI.h b/Code/Tools/LuaIDE/Source/LUA/ScriptCheckerAPI.h similarity index 100% rename from Code/Tools/Standalone/Source/LUA/ScriptCheckerAPI.h rename to Code/Tools/LuaIDE/Source/LUA/ScriptCheckerAPI.h diff --git a/Code/Tools/Standalone/Source/LUA/StackPanel.cpp b/Code/Tools/LuaIDE/Source/LUA/StackPanel.cpp similarity index 100% rename from Code/Tools/Standalone/Source/LUA/StackPanel.cpp rename to Code/Tools/LuaIDE/Source/LUA/StackPanel.cpp diff --git a/Code/Tools/Standalone/Source/LUA/StackPanel.hxx b/Code/Tools/LuaIDE/Source/LUA/StackPanel.hxx similarity index 100% rename from Code/Tools/Standalone/Source/LUA/StackPanel.hxx rename to Code/Tools/LuaIDE/Source/LUA/StackPanel.hxx diff --git a/Code/Tools/Standalone/Source/LUA/TargetContextButton.cpp b/Code/Tools/LuaIDE/Source/LUA/TargetContextButton.cpp similarity index 100% rename from Code/Tools/Standalone/Source/LUA/TargetContextButton.cpp rename to Code/Tools/LuaIDE/Source/LUA/TargetContextButton.cpp diff --git a/Code/Tools/Standalone/Source/LUA/TargetContextButton.hxx b/Code/Tools/LuaIDE/Source/LUA/TargetContextButton.hxx similarity index 100% rename from Code/Tools/Standalone/Source/LUA/TargetContextButton.hxx rename to Code/Tools/LuaIDE/Source/LUA/TargetContextButton.hxx diff --git a/Code/Tools/Standalone/Source/LUA/WatchesPanel.cpp b/Code/Tools/LuaIDE/Source/LUA/WatchesPanel.cpp similarity index 100% rename from Code/Tools/Standalone/Source/LUA/WatchesPanel.cpp rename to Code/Tools/LuaIDE/Source/LUA/WatchesPanel.cpp diff --git a/Code/Tools/Standalone/Source/LUA/WatchesPanel.hxx b/Code/Tools/LuaIDE/Source/LUA/WatchesPanel.hxx similarity index 100% rename from Code/Tools/Standalone/Source/LUA/WatchesPanel.hxx rename to Code/Tools/LuaIDE/Source/LUA/WatchesPanel.hxx diff --git a/Code/Tools/Standalone/Source/LuaIDEApplication.cpp b/Code/Tools/LuaIDE/Source/LuaIDEApplication.cpp similarity index 100% rename from Code/Tools/Standalone/Source/LuaIDEApplication.cpp rename to Code/Tools/LuaIDE/Source/LuaIDEApplication.cpp diff --git a/Code/Tools/Standalone/Source/LuaIDEApplication.h b/Code/Tools/LuaIDE/Source/LuaIDEApplication.h similarity index 100% rename from Code/Tools/Standalone/Source/LuaIDEApplication.h rename to Code/Tools/LuaIDE/Source/LuaIDEApplication.h diff --git a/Code/Tools/Standalone/Source/StandaloneToolsApplication.cpp b/Code/Tools/LuaIDE/Source/StandaloneToolsApplication.cpp similarity index 100% rename from Code/Tools/Standalone/Source/StandaloneToolsApplication.cpp rename to Code/Tools/LuaIDE/Source/StandaloneToolsApplication.cpp diff --git a/Code/Tools/Standalone/Source/StandaloneToolsApplication.h b/Code/Tools/LuaIDE/Source/StandaloneToolsApplication.h similarity index 100% rename from Code/Tools/Standalone/Source/StandaloneToolsApplication.h rename to Code/Tools/LuaIDE/Source/StandaloneToolsApplication.h diff --git a/Code/Tools/Standalone/Source/Telemetry/TelemetryBus.h b/Code/Tools/LuaIDE/Source/Telemetry/TelemetryBus.h similarity index 100% rename from Code/Tools/Standalone/Source/Telemetry/TelemetryBus.h rename to Code/Tools/LuaIDE/Source/Telemetry/TelemetryBus.h diff --git a/Code/Tools/Standalone/Source/Telemetry/TelemetryComponent.cpp b/Code/Tools/LuaIDE/Source/Telemetry/TelemetryComponent.cpp similarity index 100% rename from Code/Tools/Standalone/Source/Telemetry/TelemetryComponent.cpp rename to Code/Tools/LuaIDE/Source/Telemetry/TelemetryComponent.cpp diff --git a/Code/Tools/Standalone/Source/Telemetry/TelemetryComponent.h b/Code/Tools/LuaIDE/Source/Telemetry/TelemetryComponent.h similarity index 100% rename from Code/Tools/Standalone/Source/Telemetry/TelemetryComponent.h rename to Code/Tools/LuaIDE/Source/Telemetry/TelemetryComponent.h diff --git a/Code/Tools/Standalone/Source/Telemetry/TelemetryEvent.cpp b/Code/Tools/LuaIDE/Source/Telemetry/TelemetryEvent.cpp similarity index 100% rename from Code/Tools/Standalone/Source/Telemetry/TelemetryEvent.cpp rename to Code/Tools/LuaIDE/Source/Telemetry/TelemetryEvent.cpp diff --git a/Code/Tools/Standalone/Source/Telemetry/TelemetryEvent.h b/Code/Tools/LuaIDE/Source/Telemetry/TelemetryEvent.h similarity index 100% rename from Code/Tools/Standalone/Source/Telemetry/TelemetryEvent.h rename to Code/Tools/LuaIDE/Source/Telemetry/TelemetryEvent.h diff --git a/Code/Tools/Standalone/lua_ide_files.cmake b/Code/Tools/LuaIDE/lua_ide_files.cmake similarity index 89% rename from Code/Tools/Standalone/lua_ide_files.cmake rename to Code/Tools/LuaIDE/lua_ide_files.cmake index 0b7b5c627a..e5a7948d97 100644 --- a/Code/Tools/Standalone/lua_ide_files.cmake +++ b/Code/Tools/LuaIDE/lua_ide_files.cmake @@ -7,6 +7,16 @@ # set(FILES + targetver.h + Source/StandaloneToolsApplication.cpp + Source/StandaloneToolsApplication.h + Source/Editor/Resource.h + Source/Editor/targetver.h + Source/Telemetry/TelemetryBus.h + Source/Telemetry/TelemetryComponent.cpp + Source/Telemetry/TelemetryComponent.h + Source/Telemetry/TelemetryEvent.cpp + Source/Telemetry/TelemetryEvent.h Source/LuaIDEApplication.h Source/LuaIDEApplication.cpp Source/AssetDatabaseLocationListener.h diff --git a/Code/Tools/Standalone/targetver.h b/Code/Tools/LuaIDE/targetver.h similarity index 100% rename from Code/Tools/Standalone/targetver.h rename to Code/Tools/LuaIDE/targetver.h diff --git a/Code/Tools/ProjectManager/CMakeLists.txt b/Code/Tools/ProjectManager/CMakeLists.txt index a47ccb62c9..9974125ffb 100644 --- a/Code/Tools/ProjectManager/CMakeLists.txt +++ b/Code/Tools/ProjectManager/CMakeLists.txt @@ -92,6 +92,7 @@ if(PAL_TRAIT_BUILD_TESTS_SUPPORTED) AZ::AzTest AZ::AzFramework AZ::AzFrameworkTestShared + AZ::AzQtComponents AZ::ProjectManager.Static ) diff --git a/Code/Tools/ProjectManager/Platform/Linux/ProjectBuilderWorker_linux.cpp b/Code/Tools/ProjectManager/Platform/Linux/ProjectBuilderWorker_linux.cpp index 2987fc4dc2..5cade609d7 100644 --- a/Code/Tools/ProjectManager/Platform/Linux/ProjectBuilderWorker_linux.cpp +++ b/Code/Tools/ProjectManager/Platform/Linux/ProjectBuilderWorker_linux.cpp @@ -19,29 +19,15 @@ namespace O3DE::ProjectManager { // Attempt to use the Ninja build system if it is installed (described in the o3de documentation) if possible, // otherwise default to the the default for Linux (Unix Makefiles) - auto whichNinjaResult = ProjectUtils::ExecuteCommandResult("which", QStringList{"ninja"}, QProcessEnvironment::systemEnvironment()); + auto whichNinjaResult = ProjectUtils::ExecuteCommandResult("which", QStringList{"ninja"}); QString cmakeGenerator = (whichNinjaResult.IsSuccess()) ? "Ninja Multi-Config" : "Unix Makefiles"; bool compileProfileOnBuild = (whichNinjaResult.IsSuccess()); - // On Linux the default compiler is gcc. For O3DE, it is clang, so we need to specify the version of clang that is detected - // in order to get the compiler option. - auto compilerOptionResult = ProjectUtils::FindSupportedCompilerForPlatform(); - if (!compilerOptionResult.IsSuccess()) - { - return AZ::Failure(compilerOptionResult.GetError()); - } - auto clangCompilers = compilerOptionResult.GetValue().split('|'); - AZ_Assert(clangCompilers.length()==2, "Invalid clang compiler pair specification"); - - QString clangCompilerOption = clangCompilers[0]; - QString clangPPCompilerOption = clangCompilers[1]; QString targetBuildPath = QDir(m_projectInfo.m_path).filePath(ProjectBuildPathPostfix); QStringList generateProjectArgs = QStringList{ProjectCMakeCommand, "-B", ProjectBuildPathPostfix, "-S", ".", QString("-G%1").arg(cmakeGenerator), - QString("-DCMAKE_C_COMPILER=").append(clangCompilerOption), - QString("-DCMAKE_CXX_COMPILER=").append(clangPPCompilerOption), QString("-DLY_3RDPARTY_PATH=").append(thirdPartyPath)}; if (!compileProfileOnBuild) { @@ -52,7 +38,7 @@ namespace O3DE::ProjectManager AZ::Outcome ProjectBuilderWorker::ConstructCmakeBuildCommandArguments() const { - auto whichNinjaResult = ProjectUtils::ExecuteCommandResult("which", QStringList{"ninja"}, QProcessEnvironment::systemEnvironment()); + auto whichNinjaResult = ProjectUtils::ExecuteCommandResult("which", QStringList{"ninja"}); bool compileProfileOnBuild = (whichNinjaResult.IsSuccess()); QString targetBuildPath = QDir(m_projectInfo.m_path).filePath(ProjectBuildPathPostfix); QString launcherTargetName = m_projectInfo.m_projectName + ".GameLauncher"; diff --git a/Code/Tools/ProjectManager/Platform/Linux/ProjectManager_Traits_Linux.h b/Code/Tools/ProjectManager/Platform/Linux/ProjectManager_Traits_Linux.h index 7c0543361f..d7edcfcf12 100644 --- a/Code/Tools/ProjectManager/Platform/Linux/ProjectManager_Traits_Linux.h +++ b/Code/Tools/ProjectManager/Platform/Linux/ProjectManager_Traits_Linux.h @@ -9,3 +9,4 @@ #pragma once #define AZ_TRAIT_PROJECT_MANAGER_CUSTOM_TITLEBAR false +#define AZ_TRAIT_PROJECT_MANAGER_CREATE_DESKTOP_SHORTCUT false diff --git a/Code/Tools/ProjectManager/Platform/Linux/ProjectUtils_linux.cpp b/Code/Tools/ProjectManager/Platform/Linux/ProjectUtils_linux.cpp index 0d66009d90..f0603dc23f 100644 --- a/Code/Tools/ProjectManager/Platform/Linux/ProjectUtils_linux.cpp +++ b/Code/Tools/ProjectManager/Platform/Linux/ProjectUtils_linux.cpp @@ -1,6 +1,6 @@ /* * Copyright (c) Contributors to the Open 3D Engine Project. For complete copyright and license terms please see the LICENSE at the root of this distribution. - * + * * SPDX-License-Identifier: Apache-2.0 OR MIT * */ @@ -10,25 +10,26 @@ #include #include +#include +#include +#include + namespace O3DE::ProjectManager { namespace ProjectUtils { // The list of clang C/C++ compiler command lines to validate on the host Linux system - const QStringList SupportedClangCommands = {"clang-12|clang++-12"}; + const QStringList SupportedClangVersions = {"13", "12", "11", "10", "9", "8", "7", "6.0"}; - AZ::Outcome GetCommandLineProcessEnvironment() + AZ::Outcome SetupCommandLineProcessEnvironment() { - QProcessEnvironment currentEnvironment(QProcessEnvironment::systemEnvironment()); - currentEnvironment.insert("CC", "clang-12"); - currentEnvironment.insert("CXX", "clang++-12"); - return AZ::Success(currentEnvironment); + return AZ::Success(); } AZ::Outcome FindSupportedCompilerForPlatform() { // Validate that cmake is installed and is in the command line - auto whichCMakeResult = ProjectUtils::ExecuteCommandResult("which", QStringList{ProjectCMakeCommand}, QProcessEnvironment::systemEnvironment()); + auto whichCMakeResult = ProjectUtils::ExecuteCommandResult("which", QStringList{ProjectCMakeCommand}); if (!whichCMakeResult.IsSuccess()) { return AZ::Failure(QObject::tr("CMake not found.

" @@ -37,16 +38,13 @@ namespace O3DE::ProjectManager } // Look for the first compatible version of clang. The list below will contain the known clang compilers that have been tested for O3DE. - for (const QString& supportClangCommand : SupportedClangCommands) + for (const QString& supportClangVersion : SupportedClangVersions) { - auto clangCompilers = supportClangCommand.split('|'); - AZ_Assert(clangCompilers.length()==2, "Invalid clang compiler pair specification"); - - auto whichClangResult = ProjectUtils::ExecuteCommandResult("which", QStringList{clangCompilers[0]}, QProcessEnvironment::systemEnvironment()); - auto whichClangPPResult = ProjectUtils::ExecuteCommandResult("which", QStringList{clangCompilers[1]}, QProcessEnvironment::systemEnvironment()); + auto whichClangResult = ProjectUtils::ExecuteCommandResult("which", QStringList{QString("clang-%1").arg(supportClangVersion)}); + auto whichClangPPResult = ProjectUtils::ExecuteCommandResult("which", QStringList{QString("clang++-%1").arg(supportClangVersion)}); if (whichClangResult.IsSuccess() && whichClangPPResult.IsSuccess()) { - return AZ::Success(supportClangCommand); + return AZ::Success(QString("clang-%1").arg(supportClangVersion)); } } return AZ::Failure(QObject::tr("Clang not found.

" @@ -57,7 +55,7 @@ namespace O3DE::ProjectManager AZ::Outcome OpenCMakeGUI(const QString& projectPath) { - AZ::Outcome processEnvResult = GetCommandLineProcessEnvironment(); + AZ::Outcome processEnvResult = SetupCommandLineProcessEnvironment(); if (!processEnvResult.IsSuccess()) { return AZ::Failure(processEnvResult.GetError()); @@ -71,9 +69,8 @@ namespace O3DE::ProjectManager } QProcess process; - process.setProcessEnvironment(processEnvResult.GetValue()); - // if the project build path is relative, it should be relative to the project path + // if the project build path is relative, it should be relative to the project path process.setWorkingDirectory(projectPath); process.setProgram("cmake-gui"); @@ -85,14 +82,67 @@ namespace O3DE::ProjectManager return AZ::Success(); } - + AZ::Outcome RunGetPythonScript(const QString& engineRoot) { return ExecuteCommandResultModalDialog( QString("%1/python/get_python.sh").arg(engineRoot), {}, - QProcessEnvironment::systemEnvironment(), QObject::tr("Running get_python script...")); } + + AZ::IO::FixedMaxPath GetEditorExecutablePath(const AZ::IO::PathView& projectPath) + { + AZ::IO::FixedMaxPath editorPath; + AZ::IO::FixedMaxPath fixedProjectPath{ projectPath }; + // First attempt to launch the Editor.exe within the project build directory if it exists + AZ::IO::FixedMaxPath buildPathSetregPath = fixedProjectPath + / AZ::SettingsRegistryInterface::DevUserRegistryFolder + / "Platform" / AZ_TRAIT_OS_PLATFORM_CODENAME / "build_path.setreg"; + if (AZ::IO::SystemFile::Exists(buildPathSetregPath.c_str())) + { + AZ::SettingsRegistryImpl settingsRegistry; + // Merge the build_path.setreg into the local SettingsRegistry instance + if (AZ::IO::FixedMaxPath projectBuildPath; + settingsRegistry.MergeSettingsFile(buildPathSetregPath.Native(), + AZ::SettingsRegistryInterface::Format::JsonMergePatch) + && settingsRegistry.Get(projectBuildPath.Native(), AZ::SettingsRegistryMergeUtils::ProjectBuildPath)) + { + // local Settings Registry will be used to merge the build_path.setreg for the supplied projectPath + AZ::IO::FixedMaxPath buildConfigurationPath = (fixedProjectPath / projectBuildPath).LexicallyNormal(); + + // First try /bin/$ and if that path doesn't exist + // try /bin/$/$ + buildConfigurationPath /= "bin"; + if (editorPath = (buildConfigurationPath / AZ_BUILD_CONFIGURATION_TYPE / "Editor"). + ReplaceExtension(AZ_TRAIT_OS_EXECUTABLE_EXTENSION); + AZ::IO::SystemFile::Exists(editorPath.c_str())) + { + return editorPath; + } + else if (editorPath = (buildConfigurationPath / AZ_TRAIT_OS_PLATFORM_CODENAME + / AZ_BUILD_CONFIGURATION_TYPE / "Editor"). + ReplaceExtension(AZ_TRAIT_OS_EXECUTABLE_EXTENSION); + AZ::IO::SystemFile::Exists(editorPath.c_str())) + { + return editorPath; + } + } + } + + // Fall back to checking if an Editor exists in O3DE executable directory + editorPath = AZ::IO::FixedMaxPath(AZ::Utils::GetExecutableDirectory()) / "Editor"; + editorPath.ReplaceExtension(AZ_TRAIT_OS_EXECUTABLE_EXTENSION); + if (AZ::IO::SystemFile::Exists(editorPath.c_str())) + { + return editorPath; + } + return {}; + } + + AZ::Outcome CreateDesktopShortcut([[maybe_unused]] const QString& filename, [[maybe_unused]] const QString& targetPath, [[maybe_unused]] const QStringList& arguments) + { + return AZ::Failure(QObject::tr("Creating desktop shortcuts functionality not implemented for this platform yet.")); + } } // namespace ProjectUtils } // namespace O3DE::ProjectManager diff --git a/Code/Tools/ProjectManager/Platform/Mac/ProjectBuilderWorker_mac.cpp b/Code/Tools/ProjectManager/Platform/Mac/ProjectBuilderWorker_mac.cpp index ab412d84d8..2a8bbf4839 100644 --- a/Code/Tools/ProjectManager/Platform/Mac/ProjectBuilderWorker_mac.cpp +++ b/Code/Tools/ProjectManager/Platform/Mac/ProjectBuilderWorker_mac.cpp @@ -19,16 +19,14 @@ namespace O3DE::ProjectManager { AZ::Outcome QueryInstalledCmakeFullPath() { - auto environmentRequest = ProjectUtils::GetCommandLineProcessEnvironment(); + auto environmentRequest = ProjectUtils::SetupCommandLineProcessEnvironment(); if (!environmentRequest.IsSuccess()) { return AZ::Failure(environmentRequest.GetError()); } - auto currentEnvironment = environmentRequest.GetValue(); auto queryCmakeInstalled = ProjectUtils::ExecuteCommandResult("which", - QStringList{ProjectCMakeCommand}, - currentEnvironment); + QStringList{ProjectCMakeCommand}); if (!queryCmakeInstalled.IsSuccess()) { return AZ::Failure(QObject::tr("Unable to detect CMake on this host.")); diff --git a/Code/Tools/ProjectManager/Platform/Mac/ProjectManager_Test_Traits_Mac.h b/Code/Tools/ProjectManager/Platform/Mac/ProjectManager_Test_Traits_Mac.h index 8d7fe068c2..3ebe7d8e44 100644 --- a/Code/Tools/ProjectManager/Platform/Mac/ProjectManager_Test_Traits_Mac.h +++ b/Code/Tools/ProjectManager/Platform/Mac/ProjectManager_Test_Traits_Mac.h @@ -8,4 +8,4 @@ #pragma once -#define AZ_TRAIT_DISABLE_FAILED_PROJECT_MANAGER_TESTS false +#define AZ_TRAIT_DISABLE_FAILED_PROJECT_MANAGER_TESTS true diff --git a/Code/Tools/ProjectManager/Platform/Mac/ProjectManager_Traits_Mac.h b/Code/Tools/ProjectManager/Platform/Mac/ProjectManager_Traits_Mac.h index 7c0543361f..d7edcfcf12 100644 --- a/Code/Tools/ProjectManager/Platform/Mac/ProjectManager_Traits_Mac.h +++ b/Code/Tools/ProjectManager/Platform/Mac/ProjectManager_Traits_Mac.h @@ -9,3 +9,4 @@ #pragma once #define AZ_TRAIT_PROJECT_MANAGER_CUSTOM_TITLEBAR false +#define AZ_TRAIT_PROJECT_MANAGER_CREATE_DESKTOP_SHORTCUT false diff --git a/Code/Tools/ProjectManager/Platform/Mac/ProjectUtils_mac.cpp b/Code/Tools/ProjectManager/Platform/Mac/ProjectUtils_mac.cpp index e36f6cd0c8..2b5556fa88 100644 --- a/Code/Tools/ProjectManager/Platform/Mac/ProjectUtils_mac.cpp +++ b/Code/Tools/ProjectManager/Platform/Mac/ProjectUtils_mac.cpp @@ -1,6 +1,6 @@ /* * Copyright (c) Contributors to the Open 3D Engine Project. For complete copyright and license terms please see the LICENSE at the root of this distribution. - * + * * SPDX-License-Identifier: Apache-2.0 OR MIT * */ @@ -11,32 +11,44 @@ #include #include +#include +#include +#include + namespace O3DE::ProjectManager { namespace ProjectUtils { - AZ::Outcome GetCommandLineProcessEnvironment() + AZ::Outcome SetupCommandLineProcessEnvironment() { // For CMake on Mac, if its installed through home-brew, then it will be installed - // under /usr/local/bin, which may not be in the system PATH environment. + // under /usr/local/bin, which may not be in the system PATH environment. // Add that path for the command line process so that it will be able to locate // a home-brew installed version of CMake - QProcessEnvironment currentEnvironment(QProcessEnvironment::systemEnvironment()); - QString pathValue = currentEnvironment.value("PATH"); - pathValue += ":/usr/local/bin"; - currentEnvironment.insert("PATH", pathValue); - return AZ::Success(currentEnvironment); + QString pathEnv = qEnvironmentVariable("PATH"); + QStringList pathEnvList = pathEnv.split(":"); + if (!pathEnvList.contains("/usr/local/bin")) + { + pathEnv += ":/usr/local/bin"; + if (!qputenv("PATH", pathEnv.toStdString().c_str())) + { + return AZ::Failure(QObject::tr("Failed to set PATH environment variable")); + } + } + + return AZ::Success(); } AZ::Outcome FindSupportedCompilerForPlatform() { - QProcessEnvironment currentEnvironment(QProcessEnvironment::systemEnvironment()); - QString pathValue = currentEnvironment.value("PATH"); - pathValue += ":/usr/local/bin"; - currentEnvironment.insert("PATH", pathValue); + AZ::Outcome processEnvResult = SetupCommandLineProcessEnvironment(); + if (!processEnvResult.IsSuccess()) + { + return AZ::Failure(processEnvResult.GetError()); + } // Validate that we have cmake installed first - auto queryCmakeInstalled = ExecuteCommandResult("which", QStringList{ProjectCMakeCommand}, currentEnvironment); + auto queryCmakeInstalled = ExecuteCommandResult("which", QStringList{ProjectCMakeCommand}); if (!queryCmakeInstalled.IsSuccess()) { return AZ::Failure(QObject::tr("Unable to detect CMake on this host.")); @@ -44,7 +56,7 @@ namespace O3DE::ProjectManager QString cmakeInstalledPath = queryCmakeInstalled.GetValue().split("\n")[0]; // Query the version of the installed cmake - auto queryCmakeVersionQuery = ExecuteCommandResult(cmakeInstalledPath, QStringList{"-version"}, currentEnvironment); + auto queryCmakeVersionQuery = ExecuteCommandResult(cmakeInstalledPath, QStringList{"-version"}); if (!queryCmakeVersionQuery.IsSuccess()) { return AZ::Failure(QObject::tr("Unable to determine the version of CMake on this host.")); @@ -52,7 +64,7 @@ namespace O3DE::ProjectManager AZ_TracePrintf("Project Manager", "Cmake version %s detected.", queryCmakeVersionQuery.GetValue().split("\n")[0].toUtf8().constData()); // Query for the version of xcodebuild (if installed) - auto queryXcodeBuildVersion = ExecuteCommandResult("xcodebuild", QStringList{"-version"}, currentEnvironment); + auto queryXcodeBuildVersion = ExecuteCommandResult("xcodebuild", QStringList{"-version"}); if (!queryCmakeInstalled.IsSuccess()) { return AZ::Failure(QObject::tr("Unable to detect XCodeBuilder on this host.")); @@ -62,11 +74,11 @@ namespace O3DE::ProjectManager return AZ::Success(xcodeBuilderVersionNumber); - } + } AZ::Outcome OpenCMakeGUI(const QString& projectPath) { - const QString cmakeHelp = QObject::tr("Please verify you've installed CMake.app from " + const QString cmakeHelp = QObject::tr("Please verify you've installed CMake.app from " "cmake.org or, if using HomeBrew, " "have installed it with
brew install --cask cmake
"); QString cmakeAppPath = QStandardPaths::locate(QStandardPaths::ApplicationsLocation, "CMake.app", QStandardPaths::LocateDirectory); @@ -84,7 +96,7 @@ namespace O3DE::ProjectManager QProcess process; - // if the project build path is relative, it should be relative to the project path + // if the project build path is relative, it should be relative to the project path process.setWorkingDirectory(projectPath); process.setProgram("open"); process.setArguments({"-a", "CMake", "--args", "-S", projectPath, "-B", projectBuildPath}); @@ -95,14 +107,92 @@ namespace O3DE::ProjectManager return AZ::Success(); } - + AZ::Outcome RunGetPythonScript(const QString& engineRoot) { return ExecuteCommandResultModalDialog( QString("%1/python/get_python.sh").arg(engineRoot), {}, - QProcessEnvironment::systemEnvironment(), QObject::tr("Running get_python script...")); } + + AZ::IO::FixedMaxPath GetEditorExecutablePath(const AZ::IO::PathView& projectPath) + { + AZ::IO::FixedMaxPath editorPath; + AZ::IO::FixedMaxPath fixedProjectPath{ projectPath }; + + // First attempt to launch the Editor.exe within the project build directory if it exists + AZ::IO::FixedMaxPath buildPathSetregPath = fixedProjectPath + / AZ::SettingsRegistryInterface::DevUserRegistryFolder + / "Platform" / AZ_TRAIT_OS_PLATFORM_CODENAME / "build_path.setreg"; + if (AZ::IO::SystemFile::Exists(buildPathSetregPath.c_str())) + { + AZ::SettingsRegistryImpl localRegistry; + // Merge the build_path.setreg into the local SettingsRegistry instance + if (AZ::IO::FixedMaxPath projectBuildPath; + localRegistry.MergeSettingsFile(buildPathSetregPath.Native(), + AZ::SettingsRegistryInterface::Format::JsonMergePatch) + && localRegistry.Get(projectBuildPath.Native(), AZ::SettingsRegistryMergeUtils::ProjectBuildPath)) + { + // local Settings Registry will be used to merge the build_path.setreg for the supplied projectPath + AZ::IO::FixedMaxPath buildConfigurationPath = (fixedProjectPath / projectBuildPath).LexicallyNormal(); + + // First try "/bin/$/Editor.app/Contents/MacOS" + // Followed by "/bin/$/$/Editor.app/Contents/MacOS" + // Directory existence is checked in this case + buildConfigurationPath /= "bin"; + if (editorPath = (buildConfigurationPath + / AZ_BUILD_CONFIGURATION_TYPE / "Editor.app/Contents/MacOS/Editor"); + AZ::IO::SystemFile::Exists(editorPath.c_str())) + { + return editorPath; + } + else if (editorPath = (buildConfigurationPath / AZ_TRAIT_OS_PLATFORM_CODENAME + / AZ_BUILD_CONFIGURATION_TYPE / "Editor.app/Contents/MacOS/Editor"); + AZ::IO::SystemFile::Exists(editorPath.c_str())) + { + return editorPath; + } + } + } + + // Fall back to locating the Editor.app bundle which should exists + // outside of the current O3DE.app bundle + editorPath = (AZ::IO::FixedMaxPath(AZ::Utils::GetExecutableDirectory()) / + "../../../Editor.app/Contents/MacOS/Editor").LexicallyNormal(); + + if (!AZ::IO::SystemFile::Exists(editorPath.c_str())) + { + // Attempt to search the O3DE.app global settings registry for an InstalledBinaryFolder + // key which indicates the relative path to an SDK binary directory on MacOS + if (auto settingsRegistry = AZ::SettingsRegistry::Get(); settingsRegistry != nullptr) + { + if (AZ::IO::FixedMaxPath installedBinariesPath; + settingsRegistry->Get(installedBinariesPath.Native(), + AZ::SettingsRegistryMergeUtils::FilePathKey_InstalledBinaryFolder)) + { + if (AZ::IO::FixedMaxPath engineRootFolder; + settingsRegistry->Get(engineRootFolder.Native(), + AZ::SettingsRegistryMergeUtils::FilePathKey_EngineRootFolder)) + { + editorPath = engineRootFolder / installedBinariesPath / "Editor.app/Contents/MacOS/Editor"; + } + } + } + + if (!AZ::IO::SystemFile::Exists(editorPath.c_str())) + { + AZ_Error("ProjectManager", false, "Unable to find the Editor app bundle!"); + return {}; + } + } + + return editorPath; + } + + AZ::Outcome CreateDesktopShortcut([[maybe_unused]] const QString& filename, [[maybe_unused]] const QString& targetPath, [[maybe_unused]] const QStringList& arguments) + { + return AZ::Failure(QObject::tr("Creating desktop shortcuts functionality not implemented for this platform yet.")); + } } // namespace ProjectUtils } // namespace O3DE::ProjectManager diff --git a/Code/Tools/ProjectManager/Platform/Windows/ProjectBuilderWorker_windows.cpp b/Code/Tools/ProjectManager/Platform/Windows/ProjectBuilderWorker_windows.cpp index b6b37b222d..d692e10baa 100644 --- a/Code/Tools/ProjectManager/Platform/Windows/ProjectBuilderWorker_windows.cpp +++ b/Code/Tools/ProjectManager/Platform/Windows/ProjectBuilderWorker_windows.cpp @@ -19,6 +19,7 @@ namespace O3DE::ProjectManager QString targetBuildPath = QDir(m_projectInfo.m_path).filePath(ProjectBuildPathPostfix); return AZ::Success(QStringList{ ProjectCMakeCommand, + "-G", "Visual Studio 16 2019", "-B", targetBuildPath, "-S", m_projectInfo.m_path, QString("-DLY_3RDPARTY_PATH=").append(thirdPartyPath) } ); diff --git a/Code/Tools/ProjectManager/Platform/Windows/ProjectManagerDefs_windows.cpp b/Code/Tools/ProjectManager/Platform/Windows/ProjectManagerDefs_windows.cpp index 6b58458ccd..9fa9321cce 100644 --- a/Code/Tools/ProjectManager/Platform/Windows/ProjectManagerDefs_windows.cpp +++ b/Code/Tools/ProjectManager/Platform/Windows/ProjectManagerDefs_windows.cpp @@ -9,7 +9,7 @@ namespace O3DE::ProjectManager { - const QString ProjectBuildPathPostfix = ProjectBuildDirectoryName + "/windows_vs2019"; + const QString ProjectBuildPathPostfix = ProjectBuildDirectoryName + "/windows"; const QString GetPythonScriptPath = "python/get_python.bat"; } // namespace O3DE::ProjectManager diff --git a/Code/Tools/ProjectManager/Platform/Windows/ProjectManager_Traits_Windows.h b/Code/Tools/ProjectManager/Platform/Windows/ProjectManager_Traits_Windows.h index e6422b5a77..9e4d29b58f 100644 --- a/Code/Tools/ProjectManager/Platform/Windows/ProjectManager_Traits_Windows.h +++ b/Code/Tools/ProjectManager/Platform/Windows/ProjectManager_Traits_Windows.h @@ -9,3 +9,4 @@ #pragma once #define AZ_TRAIT_PROJECT_MANAGER_CUSTOM_TITLEBAR true +#define AZ_TRAIT_PROJECT_MANAGER_CREATE_DESKTOP_SHORTCUT true diff --git a/Code/Tools/ProjectManager/Platform/Windows/ProjectUtils_windows.cpp b/Code/Tools/ProjectManager/Platform/Windows/ProjectUtils_windows.cpp index 831529d5e4..89032320cd 100644 --- a/Code/Tools/ProjectManager/Platform/Windows/ProjectUtils_windows.cpp +++ b/Code/Tools/ProjectManager/Platform/Windows/ProjectUtils_windows.cpp @@ -1,6 +1,6 @@ /* * Copyright (c) Contributors to the Open 3D Engine Project. For complete copyright and license terms please see the LICENSE at the root of this distribution. - * + * * SPDX-License-Identifier: Apache-2.0 OR MIT * */ @@ -13,41 +13,54 @@ #include #include #include +#include + +#include +#include +#include namespace O3DE::ProjectManager { namespace ProjectUtils { - AZ::Outcome GetCommandLineProcessEnvironment() + AZ::Outcome SetupCommandLineProcessEnvironment() { // Use the engine path to insert a path for cmake auto engineInfoResult = PythonBindingsInterface::Get()->GetEngineInfo(); if (!engineInfoResult.IsSuccess()) { - return AZ::Failure(QObject::tr("Failed to get engine info")); + return AZ::Failure(QObject::tr("Failed to get engine info")); } auto engineInfo = engineInfoResult.GetValue(); - QProcessEnvironment currentEnvironment(QProcessEnvironment::systemEnvironment()); - - // Append cmake path to PATH incase it is missing + // Append cmake path to the current environment PATH incase it is missing, since if + // we are starting CMake itself the current application needs to find it using Path + // This also takes affect for all child processes. QDir cmakePath(engineInfo.m_path); cmakePath.cd("cmake/runtime/bin"); - QString pathValue = currentEnvironment.value("PATH"); - pathValue += ";" + cmakePath.path(); - currentEnvironment.insert("PATH", pathValue); - return AZ::Success(currentEnvironment); + QString pathEnv = qEnvironmentVariable("Path"); + QStringList pathEnvList = pathEnv.split(";"); + if (!pathEnvList.contains(cmakePath.path())) + { + pathEnv += ";" + cmakePath.path(); + if (!qputenv("Path", pathEnv.toStdString().c_str())) + { + return AZ::Failure(QObject::tr("Failed to set Path environment variable")); + } + } + + return AZ::Success(); } AZ::Outcome FindSupportedCompilerForPlatform() { - // Validate that cmake is installed - auto cmakeProcessEnvResult = GetCommandLineProcessEnvironment(); + // Validate that cmake is installed + auto cmakeProcessEnvResult = SetupCommandLineProcessEnvironment(); if (!cmakeProcessEnvResult.IsSuccess()) { return AZ::Failure(cmakeProcessEnvResult.GetError()); } - auto cmakeVersionQueryResult = ExecuteCommandResult("cmake", QStringList{"--version"}, cmakeProcessEnvResult.GetValue()); + auto cmakeVersionQueryResult = ExecuteCommandResult("cmake", QStringList{"--version"}); if (!cmakeVersionQueryResult.IsSuccess()) { return AZ::Failure(QObject::tr("CMake not found. \n\n" @@ -64,7 +77,7 @@ namespace O3DE::ProjectManager if (vsWhereFile.exists() && vsWhereFile.isFile()) { QStringList vsWhereBaseArguments = QStringList{"-version", - "16.9.2", + "[16.9.2,17)", "-latest", "-requires", "Microsoft.VisualStudio.Component.VC.Tools.x86.x64"}; @@ -93,15 +106,13 @@ namespace O3DE::ProjectManager } return AZ::Failure(QObject::tr("Visual Studio 2019 version 16.9.2 or higher not found.

" - "Visual Studio 2019 is required to build this project." - " Install any edition of Visual Studio 2019" - " or update to a newer version before proceeding to the next step." - " While installing configure Visual Studio with these workloads.")); + "A compatible version of Visual Studio is required to build this project.
" + "Refer to the Visual Studio requirements for more information.")); } - + AZ::Outcome OpenCMakeGUI(const QString& projectPath) { - AZ::Outcome processEnvResult = GetCommandLineProcessEnvironment(); + AZ::Outcome processEnvResult = SetupCommandLineProcessEnvironment(); if (!processEnvResult.IsSuccess()) { return AZ::Failure(processEnvResult.GetError()); @@ -115,9 +126,8 @@ namespace O3DE::ProjectManager } QProcess process; - process.setProcessEnvironment(processEnvResult.GetValue()); - // if the project build path is relative, it should be relative to the project path + // if the project build path is relative, it should be relative to the project path process.setWorkingDirectory(projectPath); process.setProgram("cmake-gui"); @@ -136,8 +146,77 @@ namespace O3DE::ProjectManager return ExecuteCommandResultModalDialog( "cmd.exe", QStringList{"/c", batPath}, - QProcessEnvironment::systemEnvironment(), QObject::tr("Running get_python script...")); } + + AZ::IO::FixedMaxPath GetEditorExecutablePath(const AZ::IO::PathView& projectPath) + { + AZ::IO::FixedMaxPath editorPath; + AZ::IO::FixedMaxPath fixedProjectPath{ projectPath }; + // First attempt to launch the Editor.exe within the project build directory if it exists + AZ::IO::FixedMaxPath buildPathSetregPath = fixedProjectPath + / AZ::SettingsRegistryInterface::DevUserRegistryFolder + / "Platform" / AZ_TRAIT_OS_PLATFORM_CODENAME / "build_path.setreg"; + if (AZ::IO::SystemFile::Exists(buildPathSetregPath.c_str())) + { + AZ::SettingsRegistryImpl settingsRegistry; + // Merge the build_path.setreg into the local SettingsRegistry instance + if (AZ::IO::FixedMaxPath projectBuildPath; + settingsRegistry.MergeSettingsFile(buildPathSetregPath.Native(), + AZ::SettingsRegistryInterface::Format::JsonMergePatch) + && settingsRegistry.Get(projectBuildPath.Native(), AZ::SettingsRegistryMergeUtils::ProjectBuildPath)) + { + // local Settings Registry will be used to merge the build_path.setreg for the supplied projectPath + AZ::IO::FixedMaxPath buildConfigurationPath = (fixedProjectPath / projectBuildPath).LexicallyNormal(); + + // First try /bin/$ and if that path doesn't exist + // try /bin/$/$ + buildConfigurationPath /= "bin"; + if (editorPath = (buildConfigurationPath / AZ_BUILD_CONFIGURATION_TYPE / "Editor"). + ReplaceExtension(AZ_TRAIT_OS_EXECUTABLE_EXTENSION); + AZ::IO::SystemFile::Exists(editorPath.c_str())) + { + return editorPath; + } + else if (editorPath = (buildConfigurationPath / AZ_TRAIT_OS_PLATFORM_CODENAME + / AZ_BUILD_CONFIGURATION_TYPE / "Editor"). + ReplaceExtension(AZ_TRAIT_OS_EXECUTABLE_EXTENSION); + AZ::IO::SystemFile::Exists(editorPath.c_str())) + { + return editorPath; + } + } + } + + // Fall back to checking if an Editor exists in O3DE executable directory + editorPath = AZ::IO::FixedMaxPath(AZ::Utils::GetExecutableDirectory()) / "Editor"; + editorPath.ReplaceExtension(AZ_TRAIT_OS_EXECUTABLE_EXTENSION); + if (AZ::IO::SystemFile::Exists(editorPath.c_str())) + { + return editorPath; + } + return {}; + } + + AZ::Outcome CreateDesktopShortcut(const QString& filename, const QString& targetPath, const QStringList& arguments) + { + const QString cmd{"powershell.exe"}; + const QString desktopPath = QStandardPaths::writableLocation(QStandardPaths::DesktopLocation); + const QString shortcutPath = QString("%1/%2.lnk").arg(desktopPath).arg(filename); + const QString arg = QString("$s=(New-Object -COM WScript.Shell).CreateShortcut('%1');$s.TargetPath='%2';$s.Arguments='%3';$s.Save();") + .arg(shortcutPath) + .arg(targetPath) + .arg(arguments.join(' ')); + auto createShortcutResult = ExecuteCommandResult(cmd, QStringList{"-Command", arg}); + if (!createShortcutResult.IsSuccess()) + { + return AZ::Failure(QObject::tr("Failed to create desktop shortcut %1

" + "Please verify you have permission to create files at the specified location.

%2") + .arg(shortcutPath) + .arg(createShortcutResult.GetError())); + } + + return AZ::Success(QObject::tr("Desktop shortcut created at
%2").arg(desktopPath).arg(shortcutPath)); + } } // namespace ProjectUtils } // namespace O3DE::ProjectManager diff --git a/Code/Tools/ProjectManager/Resources/Backgrounds/DefaultBackground.jpg b/Code/Tools/ProjectManager/Resources/Backgrounds/DefaultBackground.jpg index 3af15393c4..0d2ec8a301 100644 --- a/Code/Tools/ProjectManager/Resources/Backgrounds/DefaultBackground.jpg +++ b/Code/Tools/ProjectManager/Resources/Backgrounds/DefaultBackground.jpg @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:342c3eaccf68a178dfd8c2b1792a93a8c9197c8184dca11bf90706d7481df087 -size 1611268 +oid sha256:e9ad0383f3b917fa7f4efa307a8e109a70bb5f66deb197189d013f60eb8dc32c +size 1010250 diff --git a/Code/Tools/ProjectManager/Resources/Backgrounds/FtueBackground.jpg b/Code/Tools/ProjectManager/Resources/Backgrounds/FtueBackground.jpg index 44291a8b1d..258dc62429 100644 --- a/Code/Tools/ProjectManager/Resources/Backgrounds/FtueBackground.jpg +++ b/Code/Tools/ProjectManager/Resources/Backgrounds/FtueBackground.jpg @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:797794816e4b1702f1ae1f32b408c95c79eb1f8a95aba43cfad9cccc181b0bda -size 1135182 +oid sha256:84aab95ec8a5e3ba6ecb3aff1a814afc3171a937aa658decd18c2740623bd172 +size 984146 diff --git a/Code/Tools/ProjectManager/Resources/ProjectManager.qrc b/Code/Tools/ProjectManager/Resources/ProjectManager.qrc index 8dd7e4c9b5..2260ae62b9 100644 --- a/Code/Tools/ProjectManager/Resources/ProjectManager.qrc +++ b/Code/Tools/ProjectManager/Resources/ProjectManager.qrc @@ -41,5 +41,6 @@ Download.svg in_progress.gif gem.svg + checkmark.svg diff --git a/Code/Tools/ProjectManager/Resources/ProjectManager.qss b/Code/Tools/ProjectManager/Resources/ProjectManager.qss index d3ec066be7..3d100ec170 100644 --- a/Code/Tools/ProjectManager/Resources/ProjectManager.qss +++ b/Code/Tools/ProjectManager/Resources/ProjectManager.qss @@ -232,6 +232,11 @@ QTabBar::tab:focus { stop: 0 #555555, stop: 1.0 #777777); } +#dialogSubTitle { + font-size:14px; + font-weight:600; +} + #horizontalSeparatingLine { color: #666666; } @@ -245,10 +250,6 @@ QTabBar::tab:focus { margin-top:30px; } -#projectPreviewLabel { - margin: 10px 0 5px 0; -} - #projectTemplate { margin: 25px 0 0 50px; } @@ -324,6 +325,16 @@ QTabBar::tab:focus { border:none; } +#projectSettingsSectionTitle +{ + font-size:18px; +} + +#projectSmallInfoLabel +{ + font-size:10px; +} + #projectSettingsTab::tab-bar { left: 60px; } @@ -563,6 +574,47 @@ QProgressBar::chunk { margin-top:5px; } +#gemCatalogUpdateGemButton, +#gemCatalogUninstallGemButton +{ + qproperty-flat: true; + min-height:24px; + max-height:24px; + border-radius: 3px; + text-align:center; + font-size:12px; + font-weight:600; +} + +#gemCatalogUpdateGemButton { + background: qlineargradient(x1: 0, y1: 0, x2: 0, y2: 1, + stop: 0 #888888, stop: 1.0 #555555); +} +#gemCatalogUpdateGemButton:hover { + background: qlineargradient(x1: 0, y1: 0, x2: 0, y2: 1, + stop: 0 #999999, stop: 1.0 #666666); +} +#gemCatalogUpdateGemButton:pressed { + background: qlineargradient(x1: 0, y1: 0, x2: 0, y2: 1, + stop: 0 #555555, stop: 1.0 #777777); +} + +#footer > #gemCatalogUninstallGemButton, +#gemCatalogUninstallGemButton { + background: qlineargradient(x1: 0, y1: 0, x2: 0, y2: 1, + stop: 0 #E32C27, stop: 1.0 #951D21); +} +#footer > #gemCatalogUninstallGemButton:hover, +#gemCatalogUninstallGemButton:hover { + background: qlineargradient(x1: 0, y1: 0, x2: 0, y2: 1, + stop: 0 #FD3129, stop: 1.0 #AF2221); +} +#footer > #gemCatalogUninstallGemButton:pressed, +#gemCatalogUninstallGemButton:pressed { + background: qlineargradient(x1: 0, y1: 0, x2: 0, y2: 1, + stop: 0 #951D1F, stop: 1.0 #C92724); +} + /************** Filter Tag widget **************/ #FilterTagWidgetTextLabel { diff --git a/Code/Tools/ProjectManager/Resources/checkmark.svg b/Code/Tools/ProjectManager/Resources/checkmark.svg new file mode 100644 index 0000000000..d612b35370 --- /dev/null +++ b/Code/Tools/ProjectManager/Resources/checkmark.svg @@ -0,0 +1,12 @@ + + + Icons / Hub / Download Copy 5 + + + + + + + + + diff --git a/Code/Tools/ProjectManager/Source/Application.cpp b/Code/Tools/ProjectManager/Source/Application.cpp index 29e0df3c3a..a9ab59a991 100644 --- a/Code/Tools/ProjectManager/Source/Application.cpp +++ b/Code/Tools/ProjectManager/Source/Application.cpp @@ -21,6 +21,7 @@ #include #include #include +#include namespace O3DE::ProjectManager { @@ -69,7 +70,7 @@ namespace O3DE::ProjectManager } m_pythonBindings = AZStd::make_unique(GetEngineRoot()); - AZ_Assert(m_pythonBindings, "Failed to create PythonBindings"); + if (!m_pythonBindings->PythonStarted()) { if (!interactive) @@ -111,6 +112,13 @@ namespace O3DE::ProjectManager } } + m_settings = AZStd::make_unique(); + + if (!RegisterEngine(interactive)) + { + return false; + } + const AZ::CommandLine* commandLine = GetCommandLine(); AZ_Assert(commandLine, "Failed to get command line"); @@ -165,6 +173,86 @@ namespace O3DE::ProjectManager return m_entity != nullptr; } + bool Application::RegisterEngine(bool interactive) + { + // get this engine's info + auto engineInfoOutcome = m_pythonBindings->GetEngineInfo(); + if (!engineInfoOutcome) + { + if (interactive) + { + QMessageBox::critical(nullptr, + QObject::tr("Failed to get engine info"), + QObject::tr("A valid engine.json could not be found or loaded. " + "Please verify a valid engine.json file exists in %1") + .arg(GetEngineRoot())); + } + + AZ_Error("Project Manager", false, "Failed to get engine info"); + return false; + } + + EngineInfo engineInfo = engineInfoOutcome.GetValue(); + if (engineInfo.m_registered) + { + return true; + } + + bool forceRegistration = false; + + // check if an engine with this name is already registered + auto existingEngineResult = m_pythonBindings->GetEngineInfo(engineInfo.m_name); + if (existingEngineResult) + { + if (!interactive) + { + AZ_Error("Project Manager", false, "An engine with the name %s is already registered with the path %s", + engineInfo.m_name.toUtf8().constData(), engineInfo.m_path.toUtf8().constData()); + return false; + } + + // get the updated engine name unless the user wants to cancel + bool okPressed = false; + const EngineInfo& otherEngineInfo = existingEngineResult.GetValue(); + + engineInfo.m_name = QInputDialog::getText(nullptr, + QObject::tr("Engine '%1' already registered").arg(engineInfo.m_name), + QObject::tr("An engine named '%1' is already registered.

" + "Current path
%2

" + "New path
%3

" + "Press 'OK' to force registration, or provide a new engine name below.
" + "Alternatively, press `Cancel` to close the Project Manager and resolve the issue manually.") + .arg(engineInfo.m_name, otherEngineInfo.m_path, engineInfo.m_path), + QLineEdit::Normal, + engineInfo.m_name, + &okPressed); + + if (!okPressed) + { + // user elected not to change the name or force registration + return false; + } + + forceRegistration = true; + } + + auto registerOutcome = m_pythonBindings->SetEngineInfo(engineInfo, forceRegistration); + if (!registerOutcome) + { + if (interactive) + { + ProjectUtils::DisplayDetailedError(QObject::tr("Failed to register engine"), registerOutcome); + } + + AZ_Error("Project Manager", false, "Failed to register engine %s : %s", + engineInfo.m_path.toUtf8().constData(), registerOutcome.GetError().first.c_str()); + + return false; + } + + return true; + } + void Application::TearDown() { if (m_entity) diff --git a/Code/Tools/ProjectManager/Source/Application.h b/Code/Tools/ProjectManager/Source/Application.h index ad55694b18..dc75c1a46e 100644 --- a/Code/Tools/ProjectManager/Source/Application.h +++ b/Code/Tools/ProjectManager/Source/Application.h @@ -11,6 +11,7 @@ #include #include #include +#include #include #endif @@ -34,8 +35,10 @@ namespace O3DE::ProjectManager private: bool InitLog(const char* logName); + bool RegisterEngine(bool interactive); AZStd::unique_ptr m_pythonBindings; + AZStd::unique_ptr m_settings; QSharedPointer m_app; QSharedPointer m_mainWindow; diff --git a/Code/Tools/ProjectManager/Source/CreateProjectCtrl.cpp b/Code/Tools/ProjectManager/Source/CreateProjectCtrl.cpp index 51e1163713..205395c935 100644 --- a/Code/Tools/ProjectManager/Source/CreateProjectCtrl.cpp +++ b/Code/Tools/ProjectManager/Source/CreateProjectCtrl.cpp @@ -13,7 +13,9 @@ #include #include #include +#include #include +#include #include #include @@ -47,9 +49,14 @@ namespace O3DE::ProjectManager m_gemCatalogScreen = new GemCatalogScreen(this); m_stack->addWidget(m_gemCatalogScreen); + + m_gemRepoScreen = new GemRepoScreen(this); + m_stack->addWidget(m_gemRepoScreen); + vLayout->addWidget(m_stack); connect(m_gemCatalogScreen, &ScreenWidget::ChangeScreenRequest, this, &CreateProjectCtrl::OnChangeScreenRequest); + connect(m_gemRepoScreen, &GemRepoScreen::OnRefresh, m_gemCatalogScreen, &GemCatalogScreen::Refresh); // When there are multiple project templates present, we re-gather the gems when changing the selected the project template. connect(m_newProjectSettingsScreen, &NewProjectSettingsScreen::OnTemplateSelectionChanged, this, [=](int oldIndex, [[maybe_unused]] int newIndex) @@ -89,6 +96,9 @@ namespace O3DE::ProjectManager buttons->setObjectName("footer"); vLayout->addWidget(buttons); + m_primaryButton = buttons->addButton(tr("Create Project"), QDialogButtonBox::ApplyRole); + connect(m_primaryButton, &QPushButton::clicked, this, &CreateProjectCtrl::HandlePrimaryButton); + #ifdef TEMPLATE_GEM_CONFIGURATION_ENABLED connect(m_newProjectSettingsScreen, &ScreenWidget::ChangeScreenRequest, this, &CreateProjectCtrl::OnChangeScreenRequest); @@ -100,8 +110,6 @@ namespace O3DE::ProjectManager Update(); #endif // TEMPLATE_GEM_CONFIGURATION_ENABLED - m_primaryButton = buttons->addButton(tr("Create Project"), QDialogButtonBox::ApplyRole); - connect(m_primaryButton, &QPushButton::clicked, this, &CreateProjectCtrl::HandlePrimaryButton); setLayout(vLayout); } @@ -122,6 +130,9 @@ namespace O3DE::ProjectManager // Gather the enabled gems from the default project template when starting the create new project workflow. ReinitGemCatalogForSelectedTemplate(); + + // make sure the gem repo has the latest details + m_gemRepoScreen->Reinit(); } void CreateProjectCtrl::HandleBackButton() @@ -160,12 +171,21 @@ namespace O3DE::ProjectManager { m_header->setSubTitle(tr("Configure project with Gems")); m_secondaryButton->setVisible(false); + m_primaryButton->setVisible(true); + } + else if (m_stack->currentWidget() == m_gemRepoScreen) + { + m_header->setSubTitle(tr("Gem Repositories")); + m_secondaryButton->setVisible(true); + m_secondaryButton->setText(tr("Back")); + m_primaryButton->setVisible(false); } else { m_header->setSubTitle(tr("Enter Project Details")); m_secondaryButton->setVisible(true); m_secondaryButton->setText(tr("Configure Gems")); + m_primaryButton->setVisible(true); } } @@ -175,6 +195,10 @@ namespace O3DE::ProjectManager { HandleSecondaryButton(); } + else if (screen == ProjectManagerScreen::GemRepos) + { + NextScreen(); + } else { emit ChangeScreenRequest(screen); @@ -230,6 +254,12 @@ namespace O3DE::ProjectManager { if (m_newProjectSettingsScreen->Validate()) { + if (!m_gemCatalogScreen->GetDownloadController()->IsDownloadQueueEmpty()) + { + QMessageBox::critical(this, tr("Gems downloading"), tr("You must wait for gems to finish downloading before continuing.")); + return; + } + ProjectInfo projectInfo = m_newProjectSettingsScreen->GetProjectInfo(); QString projectTemplatePath = m_newProjectSettingsScreen->GetProjectTemplatePath(); diff --git a/Code/Tools/ProjectManager/Source/CreateProjectCtrl.h b/Code/Tools/ProjectManager/Source/CreateProjectCtrl.h index 58f4758edd..b43e0e2858 100644 --- a/Code/Tools/ProjectManager/Source/CreateProjectCtrl.h +++ b/Code/Tools/ProjectManager/Source/CreateProjectCtrl.h @@ -23,6 +23,7 @@ namespace O3DE::ProjectManager QT_FORWARD_DECLARE_CLASS(ScreenHeader) QT_FORWARD_DECLARE_CLASS(NewProjectSettingsScreen) QT_FORWARD_DECLARE_CLASS(GemCatalogScreen) + QT_FORWARD_DECLARE_CLASS(GemRepoScreen) class CreateProjectCtrl : public ScreenWidget @@ -64,6 +65,7 @@ namespace O3DE::ProjectManager NewProjectSettingsScreen* m_newProjectSettingsScreen = nullptr; GemCatalogScreen* m_gemCatalogScreen = nullptr; + GemRepoScreen* m_gemRepoScreen = nullptr; }; } // namespace O3DE::ProjectManager diff --git a/Code/Tools/ProjectManager/Source/DownloadController.cpp b/Code/Tools/ProjectManager/Source/DownloadController.cpp index 224b90299c..9b64c5e276 100644 --- a/Code/Tools/ProjectManager/Source/DownloadController.cpp +++ b/Code/Tools/ProjectManager/Source/DownloadController.cpp @@ -18,7 +18,6 @@ namespace O3DE::ProjectManager { DownloadController::DownloadController(QWidget* parent) : QObject() - , m_lastProgress(0) , m_parent(parent) { m_worker = new DownloadWorker(); @@ -41,9 +40,11 @@ namespace O3DE::ProjectManager void DownloadController::AddGemDownload(const QString& gemName) { m_gemNames.push_back(gemName); + emit GemDownloadAdded(gemName); + if (m_gemNames.size() == 1) { - m_worker->SetGemToDownload(m_gemNames[0], false); + m_worker->SetGemToDownload(m_gemNames.front(), false); m_workerThread.start(); } } @@ -62,32 +63,46 @@ namespace O3DE::ProjectManager else { m_gemNames.erase(findResult); + emit GemDownloadRemoved(gemName); } } } - void DownloadController::UpdateUIProgress(int progress) + void DownloadController::UpdateUIProgress(int bytesDownloaded, int totalBytes) { - m_lastProgress = progress; - emit GemDownloadProgress(progress); + emit GemDownloadProgress(m_gemNames.front(), bytesDownloaded, totalBytes); } - void DownloadController::HandleResults(const QString& result) + void DownloadController::HandleResults(const QString& result, const QString& detailedError) { bool succeeded = true; if (!result.isEmpty()) { - QMessageBox::critical(nullptr, tr("Gem download"), result); + if (!detailedError.isEmpty()) + { + QMessageBox gemDownloadError; + gemDownloadError.setIcon(QMessageBox::Critical); + gemDownloadError.setWindowTitle(tr("Gem download")); + gemDownloadError.setText(result); + gemDownloadError.setDetailedText(detailedError); + gemDownloadError.exec(); + } + else + { + QMessageBox::critical(nullptr, tr("Gem download"), result); + } succeeded = false; } + QString gemName = m_gemNames.front(); m_gemNames.erase(m_gemNames.begin()); - emit Done(succeeded); + emit Done(gemName, succeeded); + emit GemDownloadRemoved(gemName); if (!m_gemNames.empty()) { - emit StartGemDownload(m_gemNames[0]); + emit StartGemDownload(m_gemNames.front()); } else { diff --git a/Code/Tools/ProjectManager/Source/DownloadController.h b/Code/Tools/ProjectManager/Source/DownloadController.h index 11ceaacddb..5e637971e9 100644 --- a/Code/Tools/ProjectManager/Source/DownloadController.h +++ b/Code/Tools/ProjectManager/Source/DownloadController.h @@ -53,20 +53,20 @@ namespace O3DE::ProjectManager } } public slots: - void UpdateUIProgress(int progress); - void HandleResults(const QString& result); + void UpdateUIProgress(int bytesDownloaded, int totalBytes); + void HandleResults(const QString& result, const QString& detailedError); signals: void StartGemDownload(const QString& gemName); - void Done(bool success = true); - void GemDownloadProgress(int percentage); + void Done(const QString& gemName, bool success = true); + void GemDownloadAdded(const QString& gemName); + void GemDownloadRemoved(const QString& gemName); + void GemDownloadProgress(const QString& gemName, int bytesDownloaded, int totalBytes); private: DownloadWorker* m_worker; QThread m_workerThread; QWidget* m_parent; AZStd::vector m_gemNames; - - int m_lastProgress; }; } // namespace O3DE::ProjectManager diff --git a/Code/Tools/ProjectManager/Source/DownloadWorker.cpp b/Code/Tools/ProjectManager/Source/DownloadWorker.cpp index 9bda1b34cc..e58c41c89e 100644 --- a/Code/Tools/ProjectManager/Source/DownloadWorker.cpp +++ b/Code/Tools/ProjectManager/Source/DownloadWorker.cpp @@ -20,19 +20,20 @@ namespace O3DE::ProjectManager void DownloadWorker::StartDownload() { - auto gemDownloadProgress = [=](int downloadProgress) + auto gemDownloadProgress = [=](int bytesDownloaded, int totalBytes) { - m_downloadProgress = downloadProgress; - emit UpdateProgress(downloadProgress); + emit UpdateProgress(bytesDownloaded, totalBytes); }; - AZ::Outcome gemInfoResult = PythonBindingsInterface::Get()->DownloadGem(m_gemName, gemDownloadProgress); + AZ::Outcome> gemInfoResult = + PythonBindingsInterface::Get()->DownloadGem(m_gemName, gemDownloadProgress, /*force*/true); + if (gemInfoResult.IsSuccess()) { - emit Done(""); + emit Done("", ""); } else { - emit Done(tr("Gem download failed")); + emit Done(gemInfoResult.GetError().first.c_str(), gemInfoResult.GetError().second.c_str()); } } diff --git a/Code/Tools/ProjectManager/Source/DownloadWorker.h b/Code/Tools/ProjectManager/Source/DownloadWorker.h index 316a730a78..d33de7bacc 100644 --- a/Code/Tools/ProjectManager/Source/DownloadWorker.h +++ b/Code/Tools/ProjectManager/Source/DownloadWorker.h @@ -31,12 +31,11 @@ namespace O3DE::ProjectManager void SetGemToDownload(const QString& gemName, bool downloadNow = true); signals: - void UpdateProgress(int progress); - void Done(QString result = ""); + void UpdateProgress(int bytesDownloaded, int totalBytes); + void Done(QString result = "", QString detailedResult = ""); private: QString m_gemName; - int m_downloadProgress; }; } // namespace O3DE::ProjectManager diff --git a/Code/Tools/ProjectManager/Source/EngineInfo.h b/Code/Tools/ProjectManager/Source/EngineInfo.h index 5fd3faf2ea..c28aede030 100644 --- a/Code/Tools/ProjectManager/Source/EngineInfo.h +++ b/Code/Tools/ProjectManager/Source/EngineInfo.h @@ -25,13 +25,16 @@ namespace O3DE::ProjectManager QString m_name; QString m_thirdPartyPath; - // from o3de_manifest.json QString m_path; + + // from o3de_manifest.json QString m_defaultProjectsFolder; QString m_defaultGemsFolder; QString m_defaultTemplatesFolder; QString m_defaultRestrictedFolder; + bool m_registered = false; + bool IsValid() const; }; } // namespace O3DE::ProjectManager diff --git a/Code/Tools/ProjectManager/Source/EngineScreenCtrl.cpp b/Code/Tools/ProjectManager/Source/EngineScreenCtrl.cpp index f30a8e0daa..1f41acd3d1 100644 --- a/Code/Tools/ProjectManager/Source/EngineScreenCtrl.cpp +++ b/Code/Tools/ProjectManager/Source/EngineScreenCtrl.cpp @@ -39,6 +39,10 @@ namespace O3DE::ProjectManager m_tabWidget->addTab(m_engineSettingsScreen, tr("General")); m_tabWidget->addTab(m_gemRepoScreen, tr("Gem Repositories")); + + // when tab changes, notify the current screen so it can refresh + connect(m_tabWidget, &QTabWidget::currentChanged, this, &EngineScreenCtrl::TabChanged); + topBarHLayout->addWidget(m_tabWidget); vLayout->addWidget(topBarFrameWidget); @@ -46,6 +50,11 @@ namespace O3DE::ProjectManager setLayout(vLayout); } + void EngineScreenCtrl::TabChanged([[maybe_unused]] int index) + { + NotifyCurrentScreen(); + } + ProjectManagerScreen EngineScreenCtrl::GetScreenEnum() { return ProjectManagerScreen::UpdateProject; @@ -63,12 +72,16 @@ namespace O3DE::ProjectManager bool EngineScreenCtrl::ContainsScreen(ProjectManagerScreen screen) { - if (screen == m_engineSettingsScreen->GetScreenEnum() || screen == m_gemRepoScreen->GetScreenEnum()) - { - return true; - } + return screen == m_engineSettingsScreen->GetScreenEnum() || screen == m_gemRepoScreen->GetScreenEnum(); + } - return false; + void EngineScreenCtrl::NotifyCurrentScreen() + { + ScreenWidget* screen = reinterpret_cast(m_tabWidget->currentWidget()); + if (screen) + { + screen->NotifyCurrentScreen(); + } } void EngineScreenCtrl::GoToScreen(ProjectManagerScreen screen) diff --git a/Code/Tools/ProjectManager/Source/EngineScreenCtrl.h b/Code/Tools/ProjectManager/Source/EngineScreenCtrl.h index b7142ba226..cf0d2a24d0 100644 --- a/Code/Tools/ProjectManager/Source/EngineScreenCtrl.h +++ b/Code/Tools/ProjectManager/Source/EngineScreenCtrl.h @@ -30,6 +30,10 @@ namespace O3DE::ProjectManager bool IsTab() override; bool ContainsScreen(ProjectManagerScreen screen) override; void GoToScreen(ProjectManagerScreen screen) override; + void NotifyCurrentScreen() override; + + public slots: + void TabChanged(int index); QTabWidget* m_tabWidget = nullptr; EngineSettingsScreen* m_engineSettingsScreen = nullptr; diff --git a/Code/Tools/ProjectManager/Source/EngineSettingsScreen.cpp b/Code/Tools/ProjectManager/Source/EngineSettingsScreen.cpp index c7df00f423..26f5b8ae11 100644 --- a/Code/Tools/ProjectManager/Source/EngineSettingsScreen.cpp +++ b/Code/Tools/ProjectManager/Source/EngineSettingsScreen.cpp @@ -11,6 +11,7 @@ #include #include #include +#include #include #include @@ -114,10 +115,10 @@ namespace O3DE::ProjectManager engineInfo.m_defaultGemsFolder = m_defaultGems->lineEdit()->text(); engineInfo.m_defaultTemplatesFolder = m_defaultProjectTemplates->lineEdit()->text(); - bool result = PythonBindingsInterface::Get()->SetEngineInfo(engineInfo); + auto result = PythonBindingsInterface::Get()->SetEngineInfo(engineInfo); if (!result) { - QMessageBox::critical(this, tr("Engine Settings"), tr("Failed to save engine settings.")); + ProjectUtils::DisplayDetailedError(tr("Failed to save engine settings"), result, this); } } else diff --git a/Code/Tools/ProjectManager/Source/ExternalLinkDialog.cpp b/Code/Tools/ProjectManager/Source/ExternalLinkDialog.cpp new file mode 100644 index 0000000000..2d24913b5d --- /dev/null +++ b/Code/Tools/ProjectManager/Source/ExternalLinkDialog.cpp @@ -0,0 +1,90 @@ +/* + * Copyright (c) Contributors to the Open 3D Engine Project. + * For complete copyright and license terms please see the LICENSE at the root of this distribution. + * + * SPDX-License-Identifier: Apache-2.0 OR MIT + * + */ + +#include +#include +#include + +#include +#include +#include +#include +#include +#include +#include +#include + +namespace O3DE::ProjectManager +{ + ExternalLinkDialog::ExternalLinkDialog(const QUrl& url, QWidget* parent) + : QDialog(parent) + { + setWindowTitle(tr("Leaving O3DE")); + setObjectName("ExternalLinkDialog"); + setAttribute(Qt::WA_DeleteOnClose); + setModal(true); + + QHBoxLayout* hLayout = new QHBoxLayout(); + hLayout->setMargin(30); + hLayout->setAlignment(Qt::AlignTop); + setLayout(hLayout); + + QVBoxLayout* warningLayout = new QVBoxLayout(); + warningLayout->setMargin(0); + warningLayout->setAlignment(Qt::AlignTop); + hLayout->addLayout(warningLayout); + + QLabel* warningIcon = new QLabel(this); + warningIcon->setPixmap(QIcon(":/Warning.svg").pixmap(32, 32)); + warningLayout->addWidget(warningIcon); + + warningLayout->addStretch(); + + QVBoxLayout* layout = new QVBoxLayout(); + layout->setMargin(0); + layout->setAlignment(Qt::AlignTop); + hLayout->addLayout(layout); + + // Body + QLabel* subTitleLabel = new QLabel(tr("You are about to leave O3DE Project Manager to visit an external link.")); + subTitleLabel->setObjectName("dialogSubTitle"); + layout->addWidget(subTitleLabel); + + layout->addSpacing(10); + + QLabel* bodyLabel = new QLabel(tr("If you trust this source, you can proceed to this link, or click \"Cancel\" to return.")); + layout->addWidget(bodyLabel); + + // Don't actually set linkUrl we are just using LinkLabel superficially here + LinkLabel* linkLabel = new LinkLabel(url.toString(), {}, 12); + layout->addWidget(linkLabel); + + layout->addSpacing(40); + + QCheckBox* skipDialogCheckbox = new QCheckBox(tr("Do not show this again")); + layout->addWidget(skipDialogCheckbox); + connect(skipDialogCheckbox, &QCheckBox::stateChanged, this, &ExternalLinkDialog::SetSkipDialogSetting); + + // Buttons + QDialogButtonBox* dialogButtons = new QDialogButtonBox(); + dialogButtons->setObjectName("footer"); + layout->addWidget(dialogButtons); + + QPushButton* cancelButton = dialogButtons->addButton(tr("Cancel"), QDialogButtonBox::RejectRole); + cancelButton->setProperty("secondary", true); + QPushButton* acceptButton = dialogButtons->addButton(tr("Proceed"), QDialogButtonBox::ApplyRole); + + connect(cancelButton, &QPushButton::clicked, this, &QDialog::reject); + connect(acceptButton, &QPushButton::clicked, this, &QDialog::accept); + } + + void ExternalLinkDialog::SetSkipDialogSetting(bool state) + { + SettingsInterface::Get()->Set(ISettings::ExternalLinkWarningKey, state); + } +} // namespace O3DE::ProjectManager diff --git a/Code/Tools/ProjectManager/Source/ExternalLinkDialog.h b/Code/Tools/ProjectManager/Source/ExternalLinkDialog.h new file mode 100644 index 0000000000..45d391e64e --- /dev/null +++ b/Code/Tools/ProjectManager/Source/ExternalLinkDialog.h @@ -0,0 +1,28 @@ +/* + * Copyright (c) Contributors to the Open 3D Engine Project. + * For complete copyright and license terms please see the LICENSE at the root of this distribution. + * + * SPDX-License-Identifier: Apache-2.0 OR MIT + * + */ + +#pragma once + +#if !defined(Q_MOC_RUN) +#include +#endif + +namespace O3DE::ProjectManager +{ + class ExternalLinkDialog + : public QDialog + { + Q_OBJECT // AUTOMOC + public: + explicit ExternalLinkDialog(const QUrl& url, QWidget* parent = nullptr); + ~ExternalLinkDialog() = default; + + private slots: + void SetSkipDialogSetting(bool state); + }; +} // namespace O3DE::ProjectManager diff --git a/Code/Tools/ProjectManager/Source/GemCatalog/GemCatalogHeaderWidget.cpp b/Code/Tools/ProjectManager/Source/GemCatalog/GemCatalogHeaderWidget.cpp index 5d65c740af..d6f4da0051 100644 --- a/Code/Tools/ProjectManager/Source/GemCatalog/GemCatalogHeaderWidget.cpp +++ b/Code/Tools/ProjectManager/Source/GemCatalog/GemCatalogHeaderWidget.cpp @@ -7,29 +7,39 @@ */ #include +#include + #include + #include #include #include #include #include -#include #include +#include +#include +#include +#include namespace O3DE::ProjectManager { - CartOverlayWidget::CartOverlayWidget(GemModel* gemModel, DownloadController* downloadController, QWidget* parent) - : QWidget(parent) + GemCartWidget::GemCartWidget(GemModel* gemModel, DownloadController* downloadController, QWidget* parent) + : QScrollArea(parent) , m_gemModel(gemModel) , m_downloadController(downloadController) { setObjectName("GemCatalogCart"); + setWidgetResizable(true); + setHorizontalScrollBarPolicy(Qt::ScrollBarAlwaysOff); + setVerticalScrollBarPolicy(Qt::ScrollBarAsNeeded); m_layout = new QVBoxLayout(); m_layout->setSpacing(0); m_layout->setMargin(5); m_layout->setAlignment(Qt::AlignTop); setLayout(m_layout); + setMinimumHeight(400); QHBoxLayout* hLayout = new QHBoxLayout(); @@ -115,11 +125,15 @@ namespace O3DE::ProjectManager } return dependencies; }); - - setWindowFlags(Qt::FramelessWindowHint | Qt::Dialog); } - void CartOverlayWidget::CreateGemSection(const QString& singularTitle, const QString& pluralTitle, GetTagIndicesCallback getTagIndices) + GemCartWidget::~GemCartWidget() + { + // disconnect from all download controller signals + disconnect(m_downloadController, nullptr, this, nullptr); + } + + void GemCartWidget::CreateGemSection(const QString& singularTitle, const QString& pluralTitle, GetTagIndicesCallback getTagIndices) { QWidget* widget = new QWidget(); widget->setFixedWidth(s_width); @@ -145,7 +159,7 @@ namespace O3DE::ProjectManager } else { - tagContainer->Update(ConvertFromModelIndices(tagIndices)); + tagContainer->Update(GetTagsFromModelIndices(tagIndices)); label->setText(QString("%1 %2").arg(tagIndices.size()).arg(tagIndices.size() == 1 ? singularTitle : pluralTitle)); widget->show(); } @@ -155,20 +169,20 @@ namespace O3DE::ProjectManager update(); } - void CartOverlayWidget::OnCancelDownloadActivated(const QString& gemName) + void GemCartWidget::OnCancelDownloadActivated(const QString& gemName) { m_downloadController->CancelGemDownload(gemName); } - void CartOverlayWidget::CreateDownloadSection() + void GemCartWidget::CreateDownloadSection() { - QWidget* widget = new QWidget(); - widget->setFixedWidth(s_width); - m_layout->addWidget(widget); + m_downloadSectionWidget = new QWidget(); + m_downloadSectionWidget->setFixedWidth(s_width); + m_layout->addWidget(m_downloadSectionWidget); QVBoxLayout* layout = new QVBoxLayout(); layout->setAlignment(Qt::AlignTop); - widget->setLayout(layout); + m_downloadSectionWidget->setLayout(layout); QLabel* titleLabel = new QLabel(); titleLabel->setObjectName("GemCatalogCartOverlaySectionLabel"); @@ -187,93 +201,143 @@ namespace O3DE::ProjectManager QLabel* processingQueueLabel = new QLabel("Processing Queue"); gemDownloadLayout->addWidget(processingQueueLabel); - QWidget* downloadingItemWidget = new QWidget(); - downloadingItemWidget->setObjectName("GemCatalogCartOverlayGemDownloadBG"); - gemDownloadLayout->addWidget(downloadingItemWidget); + m_downloadingListWidget = new QWidget(); + m_downloadingListWidget->setObjectName("GemCatalogCartOverlayGemDownloadBG"); + gemDownloadLayout->addWidget(m_downloadingListWidget); QVBoxLayout* downloadingItemLayout = new QVBoxLayout(); downloadingItemLayout->setAlignment(Qt::AlignTop); - downloadingItemWidget->setLayout(downloadingItemLayout); + m_downloadingListWidget->setLayout(downloadingItemLayout); - auto update = [=](int downloadProgress) + QLabel* downloadsInProgessLabel = new QLabel(""); + downloadsInProgessLabel->setObjectName("NumDownloadsInProgressLabel"); + downloadingItemLayout->addWidget(downloadsInProgessLabel); + + if (m_downloadController->IsDownloadQueueEmpty()) { - if (m_downloadController->IsDownloadQueueEmpty()) + m_downloadSectionWidget->hide(); + } + else + { + // Setup gem download rows for gems that are already in the queue + const AZStd::vector& downloadQueue = m_downloadController->GetDownloadQueue(); + + for (const QString& gemName : downloadQueue) { - widget->hide(); + GemDownloadAdded(gemName); + } + } + + // connect to download controller data changed + connect(m_downloadController, &DownloadController::GemDownloadAdded, this, &GemCartWidget::GemDownloadAdded); + connect(m_downloadController, &DownloadController::GemDownloadRemoved, this, &GemCartWidget::GemDownloadRemoved); + connect(m_downloadController, &DownloadController::GemDownloadProgress, this, &GemCartWidget::GemDownloadProgress); + } + + void GemCartWidget::GemDownloadAdded(const QString& gemName) + { + // Containing widget for the current download item + QWidget* newGemDownloadWidget = new QWidget(); + newGemDownloadWidget->setObjectName(gemName); + QVBoxLayout* downloadingGemLayout = new QVBoxLayout(newGemDownloadWidget); + newGemDownloadWidget->setLayout(downloadingGemLayout); + + // Gem name, progress string, cancel + QHBoxLayout* nameProgressLayout = new QHBoxLayout(newGemDownloadWidget); + TagWidget* newTag = new TagWidget({gemName, gemName}, newGemDownloadWidget); + nameProgressLayout->addWidget(newTag); + QLabel* progress = new QLabel(tr("Queued"), newGemDownloadWidget); + progress->setObjectName("DownloadProgressLabel"); + nameProgressLayout->addWidget(progress); + nameProgressLayout->addStretch(); + QLabel* cancelText = new QLabel(tr("Cancel").arg(gemName), newGemDownloadWidget); + cancelText->setTextInteractionFlags(Qt::LinksAccessibleByMouse); + connect(cancelText, &QLabel::linkActivated, this, &GemCartWidget::OnCancelDownloadActivated); + nameProgressLayout->addWidget(cancelText); + downloadingGemLayout->addLayout(nameProgressLayout); + + // Progress bar + QProgressBar* downloadProgessBar = new QProgressBar(newGemDownloadWidget); + downloadProgessBar->setObjectName("DownloadProgressBar"); + downloadingGemLayout->addWidget(downloadProgessBar); + downloadProgessBar->setValue(0); + + m_downloadingListWidget->layout()->addWidget(newGemDownloadWidget); + + const AZStd::vector& downloadQueue = m_downloadController->GetDownloadQueue(); + QLabel* numDownloads = m_downloadingListWidget->findChild("NumDownloadsInProgressLabel"); + numDownloads->setText(QString("%1 %2") + .arg(downloadQueue.size()) + .arg(downloadQueue.size() == 1 ? tr("download in progress...") : tr("downloads in progress..."))); + + m_downloadingListWidget->show(); + } + + void GemCartWidget::GemDownloadRemoved(const QString& gemName) + { + QWidget* gemToRemove = m_downloadingListWidget->findChild(gemName); + if (gemToRemove) + { + gemToRemove->deleteLater(); + } + + if (m_downloadController->IsDownloadQueueEmpty()) + { + m_downloadSectionWidget->hide(); + } + else + { + size_t downloadQueueSize = m_downloadController->GetDownloadQueue().size(); + QLabel* numDownloads = m_downloadingListWidget->findChild("NumDownloadsInProgressLabel"); + numDownloads->setText(QString("%1 %2") + .arg(downloadQueueSize) + .arg(downloadQueueSize == 1 ? tr("download in progress...") : tr("downloads in progress..."))); + } + } + + void GemCartWidget::GemDownloadProgress(const QString& gemName, int bytesDownloaded, int totalBytes) + { + QWidget* gemToUpdate = m_downloadingListWidget->findChild(gemName); + if (gemToUpdate) + { + QLabel* progressLabel = gemToUpdate->findChild("DownloadProgressLabel"); + QProgressBar* progressBar = gemToUpdate->findChild("DownloadProgressBar"); + + // totalBytes can be 0 if the server does not return a content-length for the object + if (totalBytes != 0) + { + int downloadPercentage = static_cast((bytesDownloaded / static_cast(totalBytes)) * 100); + if (progressLabel) + { + progressLabel->setText(QString("%1%").arg(downloadPercentage)); + } + if (progressBar) + { + progressBar->setValue(downloadPercentage); + } } else { - widget->setUpdatesEnabled(false); - // remove items - QLayoutItem* layoutItem = nullptr; - while ((layoutItem = downloadingItemLayout->takeAt(0)) != nullptr) + if (progressLabel) { - if (layoutItem->layout()) - { - // Gem info row - QLayoutItem* rowLayoutItem = nullptr; - while ((rowLayoutItem = layoutItem->layout()->takeAt(0)) != nullptr) - { - rowLayoutItem->widget()->deleteLater(); - } - layoutItem->layout()->deleteLater(); - } - if (layoutItem->widget()) - { - layoutItem->widget()->deleteLater(); - } + progressLabel->setText(QLocale::system().formattedDataSize(bytesDownloaded)); } - - // Setup gem download rows - const AZStd::vector& downloadQueue = m_downloadController->GetDownloadQueue(); - - QLabel* downloadsInProgessLabel = new QLabel(""); - downloadsInProgessLabel->setText( - QString("%1 %2").arg(downloadQueue.size()).arg(downloadQueue.size() == 1 ? tr("download in progress...") : tr("downloads in progress..."))); - downloadingItemLayout->addWidget(downloadsInProgessLabel); - - for (int downloadingGemNumber = 0; downloadingGemNumber < downloadQueue.size(); ++downloadingGemNumber) + if (progressBar) { - QHBoxLayout* nameProgressLayout = new QHBoxLayout(); - TagWidget* newTag = new TagWidget(downloadQueue[downloadingGemNumber]); - nameProgressLayout->addWidget(newTag); - QLabel* progress = new QLabel(downloadingGemNumber == 0? QString("%1%").arg(downloadProgress) : tr("Queued")); - nameProgressLayout->addWidget(progress); - QSpacerItem* spacer = new QSpacerItem(0, 0, QSizePolicy::Expanding, QSizePolicy::Minimum); - nameProgressLayout->addSpacerItem(spacer); - QLabel* cancelText = new QLabel(QString("Cancel").arg(downloadQueue[downloadingGemNumber])); - cancelText->setTextInteractionFlags(Qt::LinksAccessibleByMouse); - connect(cancelText, &QLabel::linkActivated, this, &CartOverlayWidget::OnCancelDownloadActivated); - nameProgressLayout->addWidget(cancelText); - downloadingItemLayout->addLayout(nameProgressLayout); - QProgressBar* downloadProgessBar = new QProgressBar(); - downloadingItemLayout->addWidget(downloadProgessBar); - downloadProgessBar->setValue(downloadingGemNumber == 0 ? downloadProgress : 0); + progressBar->setRange(0, 0); } - - widget->setUpdatesEnabled(true); - widget->show(); } - }; - - auto downloadEnded = [=](bool /*success*/) - { - update(0); // update the list to remove the gem that has finished - }; - // connect to download controller data changed - connect(m_downloadController, &DownloadController::GemDownloadProgress, this, update); - connect(m_downloadController, &DownloadController::Done, this, downloadEnded); - update(0); + } } - QStringList CartOverlayWidget::ConvertFromModelIndices(const QVector& gems) const + QVector GemCartWidget::GetTagsFromModelIndices(const QVector& gems) const { - QStringList gemNames; - gemNames.reserve(gems.size()); + QVector tags; + tags.reserve(gems.size()); for (const QModelIndex& modelIndex : gems) { - gemNames.push_back(GemModel::GetDisplayName(modelIndex)); + tags.push_back({ GemModel::GetDisplayName(modelIndex), GemModel::GetName(modelIndex) }); } - return gemNames; + return tags; } CartButton::CartButton(GemModel* gemModel, DownloadController* downloadController, QWidget* parent) @@ -290,7 +354,7 @@ namespace O3DE::ProjectManager iconButton->setFocusPolicy(Qt::NoFocus); iconButton->setIcon(QIcon(":/Summary.svg")); iconButton->setFixedSize(s_iconSize, s_iconSize); - connect(iconButton, &QPushButton::clicked, this, &CartButton::ShowOverlay); + connect(iconButton, &QPushButton::clicked, this, &CartButton::ShowGemCart); m_layout->addWidget(iconButton); m_countLabel = new QLabel(); @@ -303,7 +367,7 @@ namespace O3DE::ProjectManager m_dropDownButton->setFocusPolicy(Qt::NoFocus); m_dropDownButton->setIcon(QIcon(":/CarrotArrowDown.svg")); m_dropDownButton->setFixedSize(s_arrowDownIconSize, s_arrowDownIconSize); - connect(m_dropDownButton, &QPushButton::clicked, this, &CartButton::ShowOverlay); + connect(m_dropDownButton, &QPushButton::clicked, this, &CartButton::ShowGemCart); m_layout->addWidget(m_dropDownButton); // Adjust the label text whenever the model gets updated. @@ -318,72 +382,69 @@ namespace O3DE::ProjectManager m_dropDownButton->setVisible(!toBeAdded.isEmpty() || !toBeRemoved.isEmpty()); // Automatically close the overlay window in case there are no gems to be activated or deactivated anymore. - if (m_cartOverlay && toBeAdded.isEmpty() && toBeRemoved.isEmpty()) + if (m_gemCart && toBeAdded.isEmpty() && toBeRemoved.isEmpty()) { - m_cartOverlay->deleteLater(); - m_cartOverlay = nullptr; + m_gemCart->deleteLater(); + m_gemCart = nullptr; } }); } void CartButton::mousePressEvent([[maybe_unused]] QMouseEvent* event) { - ShowOverlay(); + ShowGemCart(); } void CartButton::hideEvent(QHideEvent*) { - if (m_cartOverlay) + if (m_gemCart) { - m_cartOverlay->hide(); + m_gemCart->hide(); } } - void CartButton::ShowOverlay() + void CartButton::ShowGemCart() { const QVector toBeAdded = m_gemModel->GatherGemsToBeAdded(/*includeDependencies=*/true); const QVector toBeRemoved = m_gemModel->GatherGemsToBeRemoved(/*includeDependencies=*/true); - if (toBeAdded.isEmpty() && toBeRemoved.isEmpty()) + if (toBeAdded.isEmpty() && toBeRemoved.isEmpty() && m_downloadController->IsDownloadQueueEmpty()) { return; } - if (m_cartOverlay) + if (m_gemCart) { // Directly delete the former overlay before creating the new one. // Don't use deleteLater() here. This might overwrite the new overlay pointer // depending on the event queue. - delete m_cartOverlay; + delete m_gemCart; } - m_cartOverlay = new CartOverlayWidget(m_gemModel, m_downloadController, this); - connect(m_cartOverlay, &QWidget::destroyed, this, [=] + m_gemCart = new GemCartWidget(m_gemModel, m_downloadController, this); + connect(m_gemCart, &QWidget::destroyed, this, [=] { // Reset the overlay pointer on destruction to prevent dangling pointers. - m_cartOverlay = nullptr; + m_gemCart = nullptr; + // Tell header gem cart is no longer open + UpdateGemCart(nullptr); }); - m_cartOverlay->show(); + m_gemCart->show(); - const QPoint parentPos = m_dropDownButton->mapToParent(m_dropDownButton->pos()); - const QPoint globalPos = m_dropDownButton->mapToGlobal(m_dropDownButton->pos()); - const QPoint offset(-4, 10); - m_cartOverlay->setGeometry(globalPos.x() - parentPos.x() - m_cartOverlay->width() + width() + offset.x(), - globalPos.y() + offset.y(), - m_cartOverlay->width(), - m_cartOverlay->height()); + emit UpdateGemCart(m_gemCart); } CartButton::~CartButton() { // Make sure the overlay window is automatically closed in case the gem catalog is destroyed. - if (m_cartOverlay) + if (m_gemCart) { - m_cartOverlay->deleteLater(); + m_gemCart->deleteLater(); } } GemCatalogHeaderWidget::GemCatalogHeaderWidget(GemModel* gemModel, GemSortFilterProxyModel* filterProxyModel, DownloadController* downloadController, QWidget* parent) : QFrame(parent) + , m_downloadController(downloadController) { QHBoxLayout* hLayout = new QHBoxLayout(); hLayout->setAlignment(Qt::AlignLeft); @@ -410,8 +471,25 @@ namespace O3DE::ProjectManager hLayout->addSpacerItem(new QSpacerItem(0, 0, QSizePolicy::Expanding)); hLayout->addSpacerItem(new QSpacerItem(75, 0, QSizePolicy::Fixed)); - CartButton* cartButton = new CartButton(gemModel, downloadController); - hLayout->addWidget(cartButton); + // spinner + m_downloadSpinnerMovie = new QMovie(":/in_progress.gif"); + m_downloadSpinner = new QLabel(this); + m_downloadSpinner->setScaledContents(true); + m_downloadSpinner->setMaximumSize(16, 16); + m_downloadSpinner->setMovie(m_downloadSpinnerMovie); + hLayout->addWidget(m_downloadSpinner); + hLayout->addSpacing(8); + + // downloading label + m_downloadLabel = new QLabel(tr("Downloading")); + hLayout->addWidget(m_downloadLabel); + m_downloadSpinner->hide(); + m_downloadLabel->hide(); + + hLayout->addSpacing(16); + + m_cartButton = new CartButton(gemModel, downloadController); + hLayout->addWidget(m_cartButton); hLayout->addSpacing(16); // Separating line @@ -423,6 +501,7 @@ namespace O3DE::ProjectManager hLayout->addSpacing(16); QMenu* gemMenu = new QMenu(this); + gemMenu->addAction( tr("Refresh"), [this]() { emit RefreshGems(); }); gemMenu->addAction( tr("Show Gem Repos"), [this]() { emit OpenGemsRepo(); }); gemMenu->addSeparator(); gemMenu->addAction( tr("Add Existing Gem"), [this]() { emit AddGem(); }); @@ -433,10 +512,78 @@ namespace O3DE::ProjectManager gemMenuButton->setIcon(QIcon(":/menu.svg")); gemMenuButton->setIconSize(QSize(36, 24)); hLayout->addWidget(gemMenuButton); + + connect(m_downloadController, &DownloadController::GemDownloadAdded, this, &GemCatalogHeaderWidget::GemDownloadAdded); + connect(m_downloadController, &DownloadController::GemDownloadRemoved, this, &GemCatalogHeaderWidget::GemDownloadRemoved); + + connect( + m_cartButton, &CartButton::UpdateGemCart, this, + [this](QWidget* gemCart) + { + GemCartShown(gemCart); + if (gemCart) + { + emit UpdateGemCart(gemCart); + } + }); + } + + void GemCatalogHeaderWidget::GemDownloadAdded(const QString& /*gemName*/) + { + m_downloadSpinner->show(); + m_downloadLabel->show(); + m_downloadSpinnerMovie->start(); + m_cartButton->ShowGemCart(); + } + + void GemCatalogHeaderWidget::GemDownloadRemoved(const QString& /*gemName*/) + { + if (m_downloadController->IsDownloadQueueEmpty()) + { + m_downloadSpinner->hide(); + m_downloadLabel->hide(); + m_downloadSpinnerMovie->stop(); + } + } + + void GemCatalogHeaderWidget::GemCartShown(bool state) + { + m_showGemCart = state; + repaint(); } void GemCatalogHeaderWidget::ReinitForProject() { m_filterLineEdit->setText({}); } + + void GemCatalogHeaderWidget::paintEvent([[maybe_unused]] QPaintEvent* event) + { + // Only show triangle when cart is shown + if (!m_showGemCart) + { + return; + } + + const QPoint buttonPos = m_cartButton->pos(); + const QSize buttonSize = m_cartButton->size(); + + // Draw isosceles triangle with top point touching bottom of cartButton + // Bottom aligned with header bottom and top of right panel + const QPoint topPoint(buttonPos.x() + buttonSize.width() / 2, buttonPos.y() + buttonSize.height()); + const QPoint bottomLeftPoint(topPoint.x() - 20, height()); + const QPoint bottomRightPoint(topPoint.x() + 20, height()); + + QPainterPath trianglePath; + trianglePath.moveTo(topPoint); + trianglePath.lineTo(bottomLeftPoint); + trianglePath.lineTo(bottomRightPoint); + trianglePath.lineTo(topPoint); + + QPainter painter(this); + painter.setRenderHint(QPainter::Antialiasing, true); + painter.setPen(Qt::NoPen); + painter.fillPath(trianglePath, QBrush(QColor("#555555"))); + } + } // namespace O3DE::ProjectManager diff --git a/Code/Tools/ProjectManager/Source/GemCatalog/GemCatalogHeaderWidget.h b/Code/Tools/ProjectManager/Source/GemCatalog/GemCatalogHeaderWidget.h index 4d17259840..b749e9831d 100644 --- a/Code/Tools/ProjectManager/Source/GemCatalog/GemCatalogHeaderWidget.h +++ b/Code/Tools/ProjectManager/Source/GemCatalog/GemCatalogHeaderWidget.h @@ -14,8 +14,10 @@ #include #include #include -#include #include + +#include +#include #endif QT_FORWARD_DECLARE_CLASS(QPushButton) @@ -24,19 +26,26 @@ QT_FORWARD_DECLARE_CLASS(QVBoxLayout) QT_FORWARD_DECLARE_CLASS(QHBoxLayout) QT_FORWARD_DECLARE_CLASS(QHideEvent) QT_FORWARD_DECLARE_CLASS(QMoveEvent) +QT_FORWARD_DECLARE_CLASS(QMovie) namespace O3DE::ProjectManager { - class CartOverlayWidget - : public QWidget + class GemCartWidget + : public QScrollArea { Q_OBJECT // AUTOMOC public: - CartOverlayWidget(GemModel* gemModel, DownloadController* downloadController, QWidget* parent = nullptr); + GemCartWidget(GemModel* gemModel, DownloadController* downloadController, QWidget* parent = nullptr); + ~GemCartWidget(); + + public slots: + void GemDownloadAdded(const QString& gemName); + void GemDownloadRemoved(const QString& gemName); + void GemDownloadProgress(const QString& gemName, int bytesDownloaded, int totalBytes); private: - QStringList ConvertFromModelIndices(const QVector& gems) const; + QVector GetTagsFromModelIndices(const QVector& gems) const; using GetTagIndicesCallback = AZStd::function()>; void CreateGemSection(const QString& singularTitle, const QString& pluralTitle, GetTagIndicesCallback getTagIndices); @@ -47,6 +56,9 @@ namespace O3DE::ProjectManager GemModel* m_gemModel = nullptr; DownloadController* m_downloadController = nullptr; + QWidget* m_downloadSectionWidget = nullptr; + QWidget* m_downloadingListWidget = nullptr; + inline constexpr static int s_width = 240; }; @@ -58,7 +70,10 @@ namespace O3DE::ProjectManager public: CartButton(GemModel* gemModel, DownloadController* downloadController, QWidget* parent = nullptr); ~CartButton(); - void ShowOverlay(); + void ShowGemCart(); + + signals: + void UpdateGemCart(QWidget* gemCart); private: void mousePressEvent(QMouseEvent* event) override; @@ -68,7 +83,7 @@ namespace O3DE::ProjectManager QHBoxLayout* m_layout = nullptr; QLabel* m_countLabel = nullptr; QPushButton* m_dropDownButton = nullptr; - CartOverlayWidget* m_cartOverlay = nullptr; + GemCartWidget* m_gemCart = nullptr; DownloadController* m_downloadController = nullptr; inline constexpr static int s_iconSize = 24; @@ -86,12 +101,28 @@ namespace O3DE::ProjectManager void ReinitForProject(); + public slots: + void GemDownloadAdded(const QString& gemName); + void GemDownloadRemoved(const QString& gemName); + void GemCartShown(bool state = false); + signals: void AddGem(); void OpenGemsRepo(); + void RefreshGems(); + void UpdateGemCart(QWidget* gemCart); + + protected slots: + void paintEvent(QPaintEvent* event) override; private: AzQtComponents::SearchLineEdit* m_filterLineEdit = nullptr; inline constexpr static int s_height = 60; + DownloadController* m_downloadController = nullptr; + QLabel* m_downloadSpinner = nullptr; + QLabel* m_downloadLabel = nullptr; + QMovie* m_downloadSpinnerMovie = nullptr; + CartButton* m_cartButton = nullptr; + bool m_showGemCart = false; }; } // namespace O3DE::ProjectManager diff --git a/Code/Tools/ProjectManager/Source/GemCatalog/GemCatalogScreen.cpp b/Code/Tools/ProjectManager/Source/GemCatalog/GemCatalogScreen.cpp index 98121d7cd2..5bc0b26ca5 100644 --- a/Code/Tools/ProjectManager/Source/GemCatalog/GemCatalogScreen.cpp +++ b/Code/Tools/ProjectManager/Source/GemCatalog/GemCatalogScreen.cpp @@ -8,11 +8,20 @@ #include #include +#include +#include +#include +#include +#include #include #include #include #include +#include +#include #include +#include + #include #include #include @@ -23,6 +32,8 @@ #include #include #include +#include +#include namespace O3DE::ProjectManager { @@ -30,7 +41,10 @@ namespace O3DE::ProjectManager : ScreenWidget(parent) { m_gemModel = new GemModel(this); - m_proxModel = new GemSortFilterProxyModel(m_gemModel, this); + m_proxyModel = new GemSortFilterProxyModel(m_gemModel, this); + + // default to sort by gem name + m_proxyModel->setSortRole(GemModel::RoleName); QVBoxLayout* vLayout = new QVBoxLayout(); vLayout->setMargin(0); @@ -39,20 +53,32 @@ namespace O3DE::ProjectManager m_downloadController = new DownloadController(); - m_headerWidget = new GemCatalogHeaderWidget(m_gemModel, m_proxModel, m_downloadController); + m_headerWidget = new GemCatalogHeaderWidget(m_gemModel, m_proxyModel, m_downloadController); vLayout->addWidget(m_headerWidget); connect(m_gemModel, &GemModel::gemStatusChanged, this, &GemCatalogScreen::OnGemStatusChanged); + connect(m_gemModel, &GemModel::dependencyGemStatusChanged, this, &GemCatalogScreen::OnDependencyGemStatusChanged); + connect(m_gemModel->GetSelectionModel(), &QItemSelectionModel::selectionChanged, this, [this]{ ShowInspector(); }); + connect(m_headerWidget, &GemCatalogHeaderWidget::RefreshGems, this, &GemCatalogScreen::Refresh); connect(m_headerWidget, &GemCatalogHeaderWidget::OpenGemsRepo, this, &GemCatalogScreen::HandleOpenGemRepo); connect(m_headerWidget, &GemCatalogHeaderWidget::AddGem, this, &GemCatalogScreen::OnAddGemClicked); + connect(m_headerWidget, &GemCatalogHeaderWidget::UpdateGemCart, this, &GemCatalogScreen::UpdateAndShowGemCart); + connect(m_downloadController, &DownloadController::Done, this, &GemCatalogScreen::OnGemDownloadResult); QHBoxLayout* hLayout = new QHBoxLayout(); hLayout->setMargin(0); vLayout->addLayout(hLayout); - m_gemListView = new GemListView(m_proxModel, m_proxModel->GetSelectionModel(), this); + m_gemListView = new GemListView(m_proxyModel, m_proxyModel->GetSelectionModel(), this); + + m_rightPanelStack = new QStackedWidget(this); + m_rightPanelStack->setFixedWidth(240); + m_gemInspector = new GemInspector(m_gemModel, this); - m_gemInspector->setFixedWidth(240); + + connect(m_gemInspector, &GemInspector::TagClicked, [=](const Tag& tag) { SelectGem(tag.id); }); + connect(m_gemInspector, &GemInspector::UpdateGem, this, &GemCatalogScreen::UpdateGem); + connect(m_gemInspector, &GemInspector::UninstallGem, this, &GemCatalogScreen::UninstallGem); QWidget* filterWidget = new QWidget(this); filterWidget->setFixedWidth(240); @@ -61,7 +87,7 @@ namespace O3DE::ProjectManager m_filterWidgetLayout->setSpacing(0); filterWidget->setLayout(m_filterWidgetLayout); - GemListHeaderWidget* listHeaderWidget = new GemListHeaderWidget(m_proxModel); + GemListHeaderWidget* listHeaderWidget = new GemListHeaderWidget(m_proxyModel); QVBoxLayout* middleVLayout = new QVBoxLayout(); middleVLayout->setMargin(0); @@ -71,7 +97,9 @@ namespace O3DE::ProjectManager hLayout->addWidget(filterWidget); hLayout->addLayout(middleVLayout); - hLayout->addWidget(m_gemInspector); + + hLayout->addWidget(m_rightPanelStack); + m_rightPanelStack->addWidget(m_gemInspector); m_notificationsView = AZStd::make_unique(this, AZ_CRC("GemCatalogNotificationsView")); m_notificationsView->SetOffset(QPoint(10, 70)); @@ -80,19 +108,30 @@ namespace O3DE::ProjectManager void GemCatalogScreen::ReinitForProject(const QString& projectPath) { + m_projectPath = projectPath; m_gemModel->Clear(); m_gemsToRegisterWithProject.clear(); - FillModel(projectPath); if (m_filterWidget) { - m_filterWidget->hide(); - m_filterWidget->deleteLater(); + // disconnect so we don't update the status filter for every gem we add + disconnect(m_gemModel, &GemModel::dataChanged, m_filterWidget, &GemFilterWidget::ResetGemStatusFilter); } - m_proxModel->ResetFilters(); - m_filterWidget = new GemFilterWidget(m_proxModel); - m_filterWidgetLayout->addWidget(m_filterWidget); + FillModel(projectPath); + + m_proxyModel->ResetFilters(false); + m_proxyModel->sort(/*column=*/0); + + if (m_filterWidget) + { + m_filterWidget->ResetAllFilters(); + } + else + { + m_filterWidget = new GemFilterWidget(m_proxyModel); + m_filterWidgetLayout->addWidget(m_filterWidget); + } m_headerWidget->ReinitForProject(); @@ -100,9 +139,10 @@ namespace O3DE::ProjectManager // Select the first entry after everything got correctly sized QTimer::singleShot(200, [=]{ - QModelIndex firstModelIndex = m_gemListView->model()->index(0,0); - m_gemListView->selectionModel()->select(firstModelIndex, QItemSelectionModel::ClearAndSelect); - }); + QModelIndex firstModelIndex = m_gemModel->index(0, 0); + QModelIndex proxyIndex = m_proxyModel->mapFromSource(firstModelIndex); + m_proxyModel->GetSelectionModel()->setCurrentIndex(proxyIndex, QItemSelectionModel::ClearAndSelect); + }); } void GemCatalogScreen::OnAddGemClicked() @@ -140,11 +180,83 @@ namespace O3DE::ProjectManager { m_gemModel->AddGem(gemInfoResult.GetValue()); m_gemModel->UpdateGemDependencies(); + m_proxyModel->sort(/*column=*/0); } } } } + void GemCatalogScreen::Refresh() + { + QHash gemInfoHash; + + // create a hash with the gem name as key + const AZ::Outcome, AZStd::string>& allGemInfosResult = PythonBindingsInterface::Get()->GetAllGemInfos(m_projectPath); + if (allGemInfosResult.IsSuccess()) + { + const QVector& gemInfos = allGemInfosResult.GetValue(); + for (const GemInfo& gemInfo : gemInfos) + { + gemInfoHash.insert(gemInfo.m_name, gemInfo); + } + } + + // add all the gem repos into the hash + const AZ::Outcome, AZStd::string>& allRepoGemInfosResult = PythonBindingsInterface::Get()->GetGemInfosForAllRepos(); + if (allRepoGemInfosResult.IsSuccess()) + { + const QVector& allRepoGemInfos = allRepoGemInfosResult.GetValue(); + for (const GemInfo& gemInfo : allRepoGemInfos) + { + if (!gemInfoHash.contains(gemInfo.m_name)) + { + gemInfoHash.insert(gemInfo.m_name, gemInfo); + } + } + } + + // remove gems from the model that no longer exist in the hash and are not project dependencies + int i = 0; + while (i < m_gemModel->rowCount()) + { + QModelIndex index = m_gemModel->index(i,0); + QString gemName = m_gemModel->GetName(index); + const bool gemFound = gemInfoHash.contains(gemName); + if (!gemFound && !m_gemModel->IsAdded(index) && !m_gemModel->IsAddedDependency(index)) + { + m_gemModel->RemoveGem(index); + } + else + { + if (!gemFound && (m_gemModel->IsAdded(index) || m_gemModel->IsAddedDependency(index))) + { + const QString error = tr("Gem %1 was removed or unregistered, but is still used by the project.").arg(gemName); + AZ_Warning("Project Manager", false, error.toUtf8().constData()); + QMessageBox::warning(this, tr("Gem not found"), error.toUtf8().constData()); + } + + gemInfoHash.remove(gemName); + i++; + } + } + + // add all gems remaining in the hash that were not removed + for(auto iter = gemInfoHash.begin(); iter != gemInfoHash.end(); ++iter) + { + m_gemModel->AddGem(iter.value()); + } + + m_gemModel->UpdateGemDependencies(); + m_proxyModel->sort(/*column=*/0); + + // temporary, until we can refresh filter counts + m_proxyModel->ResetFilters(false); + m_filterWidget->ResetAllFilters(); + + // Reselect the same selection to proc UI updates + m_proxyModel->GetSelectionModel()->setCurrentIndex(m_proxyModel->GetSelectionModel()->currentIndex(), QItemSelectionModel::Select); + } + void GemCatalogScreen::OnGemStatusChanged(const QString& gemName, uint32_t numChangedDependencies) { if (m_notificationsEnabled) @@ -166,23 +278,25 @@ namespace O3DE::ProjectManager notification = GemModel::GetDisplayName(modelIndex); if (numChangedDependencies > 0) { - notification += " " + tr("and") + " "; + notification += tr(" and "); } - if (added && GemModel::GetDownloadStatus(modelIndex) == GemInfo::DownloadStatus::NotDownloaded) + if (added && (GemModel::GetDownloadStatus(modelIndex) == GemInfo::DownloadStatus::NotDownloaded) || + (GemModel::GetDownloadStatus(modelIndex) == GemInfo::DownloadStatus::DownloadFailed)) { m_downloadController->AddGemDownload(GemModel::GetName(modelIndex)); + GemModel::SetDownloadStatus(*m_gemModel, modelIndex, GemInfo::DownloadStatus::Downloading); } } - if (numChangedDependencies == 1 ) + if (numChangedDependencies == 1) { - notification += "1 Gem " + tr("dependency"); + notification += tr("1 Gem dependency"); } else if (numChangedDependencies > 1) { - notification += QString("%1 Gem ").arg(numChangedDependencies) + tr("dependencies"); + notification += tr("%1 Gem %2").arg(numChangedDependencies).arg(tr("dependencies")); } - notification += " " + (added ? tr("activated") : tr("deactivated")); + notification += (added ? tr(" activated") : tr(" deactivated")); AzQtComponents::ToastConfiguration toastConfiguration(AzQtComponents::ToastType::Custom, notification, ""); toastConfiguration.m_customIconImage = ":/gem.svg"; @@ -192,6 +306,132 @@ namespace O3DE::ProjectManager } } + void GemCatalogScreen::OnDependencyGemStatusChanged(const QString& gemName) + { + QModelIndex modelIndex = m_gemModel->FindIndexByNameString(gemName); + bool added = GemModel::IsAddedDependency(modelIndex); + if (added && (GemModel::GetDownloadStatus(modelIndex) == GemInfo::DownloadStatus::NotDownloaded) || + (GemModel::GetDownloadStatus(modelIndex) == GemInfo::DownloadStatus::DownloadFailed)) + { + m_downloadController->AddGemDownload(GemModel::GetName(modelIndex)); + GemModel::SetDownloadStatus(*m_gemModel, modelIndex, GemInfo::DownloadStatus::Downloading); + } + } + + void GemCatalogScreen::SelectGem(const QString& gemName) + { + QModelIndex modelIndex = m_gemModel->FindIndexByNameString(gemName); + if (!m_proxyModel->filterAcceptsRow(modelIndex.row(), QModelIndex())) + { + m_proxyModel->ResetFilters(); + m_filterWidget->ResetAllFilters(); + } + + QModelIndex proxyIndex = m_proxyModel->mapFromSource(modelIndex); + m_proxyModel->GetSelectionModel()->setCurrentIndex(proxyIndex, QItemSelectionModel::ClearAndSelect); + m_gemListView->scrollTo(proxyIndex); + + ShowInspector(); + } + + void GemCatalogScreen::UpdateGem(const QModelIndex& modelIndex) + { + const QString selectedGemName = m_gemModel->GetName(modelIndex); + const QString selectedGemLastUpdate = m_gemModel->GetLastUpdated(modelIndex); + const QString selectedDisplayGemName = m_gemModel->GetDisplayName(modelIndex); + const QString selectedGemRepoUri = m_gemModel->GetRepoUri(modelIndex); + + // Refresh gem repo + if (!selectedGemRepoUri.isEmpty()) + { + AZ::Outcome refreshResult = PythonBindingsInterface::Get()->RefreshGemRepo(selectedGemRepoUri); + if (refreshResult.IsSuccess()) + { + Refresh(); + } + else + { + QMessageBox::critical( + this, tr("Operation failed"), + tr("Failed to refresh gem repository %1
Error:
%2").arg(selectedGemRepoUri, refreshResult.GetError().c_str())); + } + } + // If repo uri isn't specified warn user that repo might not be refreshed + else + { + int result = QMessageBox::warning( + this, tr("Gem Repository Unspecified"), + tr("The repo for %1 is unspecfied. Repository cannot be automatically refreshed. " + "Please ensure this gem's repo is refreshed before attempting to update.") + .arg(selectedDisplayGemName), + QMessageBox::Cancel, QMessageBox::Ok); + + // Allow user to cancel update to manually refresh repo + if (result != QMessageBox::Ok) + { + return; + } + } + + // Check if there is an update avaliable now that repo is refreshed + bool updateAvaliable = PythonBindingsInterface::Get()->IsGemUpdateAvaliable(selectedGemName, selectedGemLastUpdate); + + GemUpdateDialog* confirmUpdateDialog = new GemUpdateDialog(selectedGemName, updateAvaliable, this); + if (confirmUpdateDialog->exec() == QDialog::Accepted) + { + m_downloadController->AddGemDownload(selectedGemName); + } + } + + void GemCatalogScreen::UninstallGem(const QModelIndex& modelIndex) + { + const QString selectedDisplayGemName = m_gemModel->GetDisplayName(modelIndex); + + GemUninstallDialog* confirmUninstallDialog = new GemUninstallDialog(selectedDisplayGemName, this); + if (confirmUninstallDialog->exec() == QDialog::Accepted) + { + const QString selectedGemPath = m_gemModel->GetPath(modelIndex); + + const bool wasAdded = GemModel::WasPreviouslyAdded(modelIndex); + const bool wasAddedDependency = GemModel::WasPreviouslyAddedDependency(modelIndex); + + // Remove gem from gems to be added to update any dependencies + GemModel::SetIsAdded(*m_gemModel, modelIndex, false); + GemModel::DeactivateDependentGems(*m_gemModel, modelIndex); + + // Unregister the gem + auto unregisterResult = PythonBindingsInterface::Get()->UnregisterGem(selectedGemPath); + if (!unregisterResult) + { + QMessageBox::critical(this, tr("Failed to unregister gem"), unregisterResult.GetError().c_str()); + } + else + { + const QString selectedGemName = m_gemModel->GetName(modelIndex); + + // Remove gem from model + m_gemModel->RemoveGem(modelIndex); + + // Delete uninstalled gem directory + if (!ProjectUtils::DeleteProjectFiles(selectedGemPath, /*force*/true)) + { + QMessageBox::critical( + this, tr("Failed to remove gem directory"), tr("Could not delete gem directory at:
%1").arg(selectedGemPath)); + } + + // Show undownloaded remote gem again + Refresh(); + + // Select remote gem + QModelIndex remoteGemIndex = m_gemModel->FindIndexByNameString(selectedGemName); + GemModel::SetWasPreviouslyAdded(*m_gemModel, remoteGemIndex, wasAdded); + GemModel::SetWasPreviouslyAddedDependency(*m_gemModel, remoteGemIndex, wasAddedDependency); + QModelIndex proxyIndex = m_proxyModel->mapFromSource(remoteGemIndex); + m_proxyModel->GetSelectionModel()->setCurrentIndex(proxyIndex, QItemSelectionModel::ClearAndSelect); + } + } + } + void GemCatalogScreen::hideEvent(QHideEvent* event) { ScreenWidget::hideEvent(event); @@ -218,20 +458,22 @@ namespace O3DE::ProjectManager void GemCatalogScreen::FillModel(const QString& projectPath) { - AZ::Outcome, AZStd::string> allGemInfosResult = PythonBindingsInterface::Get()->GetAllGemInfos(projectPath); + m_projectPath = projectPath; + + const AZ::Outcome, AZStd::string>& allGemInfosResult = PythonBindingsInterface::Get()->GetAllGemInfos(projectPath); if (allGemInfosResult.IsSuccess()) { // Add all available gems to the model. - const QVector allGemInfos = allGemInfosResult.GetValue(); + const QVector& allGemInfos = allGemInfosResult.GetValue(); for (const GemInfo& gemInfo : allGemInfos) { m_gemModel->AddGem(gemInfo); } - AZ::Outcome, AZStd::string> allRepoGemInfosResult = PythonBindingsInterface::Get()->GetAllGemRepoGemsInfos(); + const AZ::Outcome, AZStd::string>& allRepoGemInfosResult = PythonBindingsInterface::Get()->GetGemInfosForAllRepos(); if (allRepoGemInfosResult.IsSuccess()) { - const QVector allRepoGemInfos = allRepoGemInfosResult.GetValue(); + const QVector& allRepoGemInfos = allRepoGemInfosResult.GetValue(); for (const GemInfo& gemInfo : allRepoGemInfos) { // do not add gems that have already been downloaded @@ -250,10 +492,10 @@ namespace O3DE::ProjectManager m_notificationsEnabled = false; // Gather enabled gems for the given project. - auto enabledGemNamesResult = PythonBindingsInterface::Get()->GetEnabledGemNames(projectPath); + const auto& enabledGemNamesResult = PythonBindingsInterface::Get()->GetEnabledGemNames(projectPath); if (enabledGemNamesResult.IsSuccess()) { - const QVector enabledGemNames = enabledGemNamesResult.GetValue(); + const QVector& enabledGemNames = enabledGemNamesResult.GetValue(); for (const AZStd::string& enabledGemName : enabledGemNames) { const QModelIndex modelIndex = m_gemModel->FindIndexByNameString(enabledGemName.c_str()); @@ -284,6 +526,12 @@ namespace O3DE::ProjectManager } } + void GemCatalogScreen::ShowInspector() + { + m_rightPanelStack->setCurrentIndex(RightPanelWidgetOrder::Inspector); + m_headerWidget->GemCartShown(); + } + GemCatalogScreen::EnableDisableGemsResult GemCatalogScreen::EnableDisableGemsForProject(const QString& projectPath) { IPythonBindings* pythonBindings = PythonBindingsInterface::Get(); @@ -313,12 +561,26 @@ namespace O3DE::ProjectManager for (const QModelIndex& modelIndex : toBeAdded) { - const QString gemPath = GemModel::GetPath(modelIndex); + const QString& gemPath = GemModel::GetPath(modelIndex); + + // make sure any remote gems we added were downloaded successfully + const GemInfo::DownloadStatus status = GemModel::GetDownloadStatus(modelIndex); + if (GemModel::GetGemOrigin(modelIndex) == GemInfo::Remote && + !(status == GemInfo::Downloaded || status == GemInfo::DownloadSuccessful)) + { + QMessageBox::critical( + nullptr, "Cannot add gem that isn't downloaded", + tr("Cannot add gem %1 to project because it isn't downloaded yet or failed to download.") + .arg(GemModel::GetDisplayName(modelIndex))); + + return EnableDisableGemsResult::Failed; + } + const AZ::Outcome result = pythonBindings->AddGemToProject(gemPath, projectPath); if (!result.IsSuccess()) { - QMessageBox::critical(nullptr, "Operation failed", - QString("Cannot add gem %1 to project.\n\nError:\n%2").arg(GemModel::GetDisplayName(modelIndex), result.GetError().c_str())); + QMessageBox::critical(nullptr, "Failed to add gem to project", + tr("Cannot add gem %1 to project.

Error:
%2").arg(GemModel::GetDisplayName(modelIndex), result.GetError().c_str())); return EnableDisableGemsResult::Failed; } @@ -336,8 +598,8 @@ namespace O3DE::ProjectManager const AZ::Outcome result = pythonBindings->RemoveGemFromProject(gemPath, projectPath); if (!result.IsSuccess()) { - QMessageBox::critical(nullptr, "Operation failed", - QString("Cannot remove gem %1 from project.\n\nError:\n%2").arg(GemModel::GetDisplayName(modelIndex), result.GetError().c_str())); + QMessageBox::critical(nullptr, "Failed to remove gem from project", + tr("Cannot remove gem %1 from project.

Error:
%2").arg(GemModel::GetDisplayName(modelIndex), result.GetError().c_str())); return EnableDisableGemsResult::Failed; } @@ -348,23 +610,76 @@ namespace O3DE::ProjectManager void GemCatalogScreen::HandleOpenGemRepo() { - QVector gemsToBeAdded = m_gemModel->GatherGemsToBeAdded(true); - QVector gemsToBeRemoved = m_gemModel->GatherGemsToBeRemoved(true); + emit ChangeScreenRequest(ProjectManagerScreen::GemRepos); + } - if (!gemsToBeAdded.empty() || !gemsToBeRemoved.empty()) + void GemCatalogScreen::UpdateAndShowGemCart(QWidget* cartWidget) + { + QWidget* previousCart = m_rightPanelStack->widget(RightPanelWidgetOrder::Cart); + if (previousCart) { - QMessageBox::StandardButton warningResult = QMessageBox::warning( - nullptr, "Pending Changes", - "There are some unsaved changes to the gem selection,
they will be lost if you change screens.
Are you sure?", - QMessageBox::No | QMessageBox::Yes); - - if (warningResult != QMessageBox::Yes) - { - return; - } + m_rightPanelStack->removeWidget(previousCart); } - emit ChangeScreenRequest(ProjectManagerScreen::GemRepos); + m_rightPanelStack->insertWidget(RightPanelWidgetOrder::Cart, cartWidget); + m_rightPanelStack->setCurrentIndex(RightPanelWidgetOrder::Cart); + } + + void GemCatalogScreen::OnGemDownloadResult(const QString& gemName, bool succeeded) + { + if (succeeded) + { + // refresh the information for downloaded gems + const AZ::Outcome, AZStd::string>& allGemInfosResult = + PythonBindingsInterface::Get()->GetAllGemInfos(m_projectPath); + if (allGemInfosResult.IsSuccess()) + { + // we should find the gem name now in all gem infos + for (const GemInfo& gemInfo : allGemInfosResult.GetValue()) + { + if (gemInfo.m_name == gemName) + { + QModelIndex oldIndex = m_gemModel->FindIndexByNameString(gemName); + if (oldIndex.isValid()) + { + // Check if old gem is selected + bool oldGemSelected = false; + if (m_gemModel->GetSelectionModel()->currentIndex() == oldIndex) + { + oldGemSelected = true; + } + + // Remove old remote gem + m_gemModel->RemoveGem(oldIndex); + + // Add new downloaded version of gem + QModelIndex newIndex = m_gemModel->AddGem(gemInfo); + GemModel::SetDownloadStatus(*m_gemModel, newIndex, GemInfo::DownloadSuccessful); + GemModel::SetIsAdded(*m_gemModel, newIndex, true); + + // Select new version of gem if it was previously selected + if (oldGemSelected) + { + QModelIndex proxyIndex = m_proxyModel->mapFromSource(newIndex); + m_proxyModel->GetSelectionModel()->setCurrentIndex(proxyIndex, QItemSelectionModel::ClearAndSelect); + } + } + + break; + } + } + } + } + else + { + QModelIndex index = m_gemModel->FindIndexByNameString(gemName); + if (index.isValid()) + { + GemModel::SetIsAdded(*m_gemModel, index, false); + GemModel::DeactivateDependentGems(*m_gemModel, index); + GemModel::SetDownloadStatus(*m_gemModel, index, GemInfo::DownloadFailed); + } + } } ProjectManagerScreen GemCatalogScreen::GetScreenEnum() diff --git a/Code/Tools/ProjectManager/Source/GemCatalog/GemCatalogScreen.h b/Code/Tools/ProjectManager/Source/GemCatalog/GemCatalogScreen.h index 1b34019d1a..20b0c27ff8 100644 --- a/Code/Tools/ProjectManager/Source/GemCatalog/GemCatalogScreen.h +++ b/Code/Tools/ProjectManager/Source/GemCatalog/GemCatalogScreen.h @@ -12,18 +12,24 @@ #include #include #include -#include -#include -#include -#include -#include -#include + #include #include #endif +QT_FORWARD_DECLARE_CLASS(QVBoxLayout) +QT_FORWARD_DECLARE_CLASS(QStackedWidget) + namespace O3DE::ProjectManager { + QT_FORWARD_DECLARE_CLASS(GemCatalogHeaderWidget) + QT_FORWARD_DECLARE_CLASS(GemFilterWidget) + QT_FORWARD_DECLARE_CLASS(GemListView) + QT_FORWARD_DECLARE_CLASS(GemInspector) + QT_FORWARD_DECLARE_CLASS(GemModel) + QT_FORWARD_DECLARE_CLASS(GemSortFilterProxyModel) + QT_FORWARD_DECLARE_CLASS(DownloadController) + class GemCatalogScreen : public ScreenWidget { @@ -47,7 +53,13 @@ namespace O3DE::ProjectManager public slots: void OnGemStatusChanged(const QString& gemName, uint32_t numChangedDependencies); + void OnDependencyGemStatusChanged(const QString& gemName); void OnAddGemClicked(); + void SelectGem(const QString& gemName); + void OnGemDownloadResult(const QString& gemName, bool succeeded = true); + void Refresh(); + void UpdateGem(const QModelIndex& modelIndex); + void UninstallGem(const QModelIndex& modelIndex); protected: void hideEvent(QHideEvent* event) override; @@ -57,22 +69,31 @@ namespace O3DE::ProjectManager private slots: void HandleOpenGemRepo(); - + void UpdateAndShowGemCart(QWidget* cartWidget); + void ShowInspector(); private: + enum RightPanelWidgetOrder + { + Inspector = 0, + Cart + }; + void FillModel(const QString& projectPath); AZStd::unique_ptr m_notificationsView; GemListView* m_gemListView = nullptr; + QStackedWidget* m_rightPanelStack = nullptr; GemInspector* m_gemInspector = nullptr; GemModel* m_gemModel = nullptr; GemCatalogHeaderWidget* m_headerWidget = nullptr; - GemSortFilterProxyModel* m_proxModel = nullptr; + GemSortFilterProxyModel* m_proxyModel = nullptr; QVBoxLayout* m_filterWidgetLayout = nullptr; GemFilterWidget* m_filterWidget = nullptr; DownloadController* m_downloadController = nullptr; bool m_notificationsEnabled = true; QSet m_gemsToRegisterWithProject; + QString m_projectPath; }; } // namespace O3DE::ProjectManager diff --git a/Code/Tools/ProjectManager/Source/GemCatalog/GemFilterWidget.cpp b/Code/Tools/ProjectManager/Source/GemCatalog/GemFilterWidget.cpp index 4f737d8629..d960145057 100644 --- a/Code/Tools/ProjectManager/Source/GemCatalog/GemFilterWidget.cpp +++ b/Code/Tools/ProjectManager/Source/GemCatalog/GemFilterWidget.cpp @@ -7,6 +7,9 @@ */ #include + +#include + #include #include #include @@ -213,11 +216,98 @@ namespace O3DE::ProjectManager m_filterLayout->setContentsMargins(0, 0, 0, 0); filterSection->setLayout(m_filterLayout); + ResetAllFilters(); + } + + void GemFilterWidget::ResetAllFilters() + { ResetGemStatusFilter(); - AddGemOriginFilter(); - AddTypeFilter(); - AddPlatformFilter(); - AddFeatureFilter(); + ResetGemOriginFilter(); + ResetTypeFilter(); + ResetFeatureFilter(); + } + + void GemFilterWidget::ResetFilterWidget( + FilterCategoryWidget*& filterPtr, + const QString& filterName, + const QVector& elementNames, + const QVector& elementCounts, + int defaultShowCount) + { + bool wasCollapsed = false; + if (filterPtr) + { + wasCollapsed = filterPtr->IsCollapsed(); + } + + FilterCategoryWidget* filterWidget = new FilterCategoryWidget( + filterName, elementNames, elementCounts, /*showAllLessButton=*/defaultShowCount != 4, /*collapsed*/ wasCollapsed, + /*defaultShowCount=*/defaultShowCount); + if (filterPtr) + { + m_filterLayout->replaceWidget(filterPtr, filterWidget); + } + else + { + m_filterLayout->addWidget(filterWidget); + } + + filterPtr->deleteLater(); + filterPtr = filterWidget; + } + + template + void GemFilterWidget::ResetSimpleOrFilter( + FilterCategoryWidget*& filterPtr, + const QString& filterName, + int numFilterElements, + bool (*filterMatcher)(GemModel*, filterType, int), + QString (*typeStringGetter)(filterType), + filterFlagsType (GemSortFilterProxyModel::*filterFlagsGetter)() const, + void (GemSortFilterProxyModel::*filterFlagsSetter)(const filterFlagsType&)) + { + QVector elementNames; + QVector elementCounts; + const int numGems = m_gemModel->rowCount(); + for (int filterIndex = 0; filterIndex < numFilterElements; ++filterIndex) + { + const filterType gemFilterToBeCounted = static_cast(1 << filterIndex); + + int gemFilterCount = 0; + for (int gemIndex = 0; gemIndex < numGems; ++gemIndex) + { + // If filter matches increment filter count + gemFilterCount += filterMatcher(m_gemModel, gemFilterToBeCounted, gemIndex); + } + elementNames.push_back(typeStringGetter(gemFilterToBeCounted)); + elementCounts.push_back(gemFilterCount); + } + + // Replace existing filter and delete old one + ResetFilterWidget(filterPtr, filterName, elementNames, elementCounts); + + const QList buttons = filterPtr->GetButtonGroup()->buttons(); + for (int i = 0; i < buttons.size(); ++i) + { + const filterType gemFilter = static_cast(1 << i); + QAbstractButton* button = buttons[i]; + + connect( + button, &QAbstractButton::toggled, this, + [=](bool checked) + { + filterFlagsType gemFilters = (m_filterProxyModel->*filterFlagsGetter)(); + if (checked) + { + gemFilters |= gemFilter; + } + else + { + gemFilters &= ~gemFilter; + } + (m_filterProxyModel->*filterFlagsSetter)(gemFilters); + }); + } } void GemFilterWidget::ResetGemStatusFilter() @@ -241,25 +331,7 @@ namespace O3DE::ProjectManager elementNames.push_back(GemSortFilterProxyModel::GetGemActiveString(GemSortFilterProxyModel::GemActive::Inactive)); elementCounts.push_back(totalGems - enabledGemTotal); - bool wasCollapsed = false; - if (m_statusFilter) - { - wasCollapsed = m_statusFilter->IsCollapsed(); - } - - FilterCategoryWidget* filterWidget = - new FilterCategoryWidget("Status", elementNames, elementCounts, /*showAllLessButton=*/false, /*collapsed*/wasCollapsed); - if (m_statusFilter) - { - m_filterLayout->replaceWidget(m_statusFilter, filterWidget); - } - else - { - m_filterLayout->addWidget(filterWidget); - } - - m_statusFilter->deleteLater(); - m_statusFilter = filterWidget; + ResetFilterWidget(m_statusFilter, "Status", elementNames, elementCounts); const QList buttons = m_statusFilter->GetButtonGroup()->buttons(); @@ -317,157 +389,42 @@ namespace O3DE::ProjectManager connect(activeButton, &QAbstractButton::toggled, this, updateGemActive); } - void GemFilterWidget::AddGemOriginFilter() + void GemFilterWidget::ResetGemOriginFilter() { - QVector elementNames; - QVector elementCounts; - const int numGems = m_gemModel->rowCount(); - for (int originIndex = 0; originIndex < GemInfo::NumGemOrigins; ++originIndex) - { - const GemInfo::GemOrigin gemOriginToBeCounted = static_cast(1 << originIndex); - - int gemOriginCount = 0; - for (int gemIndex = 0; gemIndex < numGems; ++gemIndex) + ResetSimpleOrFilter + ( + m_originFilter, "Provider", GemInfo::NumGemOrigins, + [](GemModel* gemModel, GemInfo::GemOrigin origin, int gemIndex) { - const GemInfo::GemOrigin gemOrigin = m_gemModel->GetGemOrigin(m_gemModel->index(gemIndex, 0)); - - // Is the gem of the given origin? - if (gemOriginToBeCounted == gemOrigin) - { - gemOriginCount++; - } - } - - elementNames.push_back(GemInfo::GetGemOriginString(gemOriginToBeCounted)); - elementCounts.push_back(gemOriginCount); - } - - FilterCategoryWidget* filterWidget = new FilterCategoryWidget("Provider", elementNames, elementCounts, /*showAllLessButton=*/false); - m_filterLayout->addWidget(filterWidget); - - const QList buttons = filterWidget->GetButtonGroup()->buttons(); - for (int i = 0; i < buttons.size(); ++i) - { - const GemInfo::GemOrigin gemOrigin = static_cast(1 << i); - QAbstractButton* button = buttons[i]; - - connect(button, &QAbstractButton::toggled, this, [=](bool checked) - { - GemInfo::GemOrigins gemOrigins = m_filterProxyModel->GetGemOrigins(); - if (checked) - { - gemOrigins |= gemOrigin; - } - else - { - gemOrigins &= ~gemOrigin; - } - m_filterProxyModel->SetGemOrigins(gemOrigins); - }); - } + return origin == gemModel->GetGemOrigin(gemModel->index(gemIndex, 0)); + }, + &GemInfo::GetGemOriginString, &GemSortFilterProxyModel::GetGemOrigins, &GemSortFilterProxyModel::SetGemOrigins + ); } - void GemFilterWidget::AddTypeFilter() + void GemFilterWidget::ResetTypeFilter() { - QVector elementNames; - QVector elementCounts; - const int numGems = m_gemModel->rowCount(); - for (int typeIndex = 0; typeIndex < GemInfo::NumTypes; ++typeIndex) - { - const GemInfo::Type type = static_cast(1 << typeIndex); - - int typeGemCount = 0; - for (int gemIndex = 0; gemIndex < numGems; ++gemIndex) + ResetSimpleOrFilter( + m_typeFilter, "Type", GemInfo::NumTypes, + [](GemModel* gemModel, GemInfo::Type type, int gemIndex) { - const GemInfo::Types types = m_gemModel->GetTypes(m_gemModel->index(gemIndex, 0)); - - // Is type (Asset, Code, Tool) part of the gem? - if (types & type) - { - typeGemCount++; - } - } - - elementNames.push_back(GemInfo::GetTypeString(type)); - elementCounts.push_back(typeGemCount); - } - - FilterCategoryWidget* filterWidget = new FilterCategoryWidget("Type", elementNames, elementCounts, /*showAllLessButton=*/false); - m_filterLayout->addWidget(filterWidget); - - const QList buttons = filterWidget->GetButtonGroup()->buttons(); - for (int i = 0; i < buttons.size(); ++i) - { - const GemInfo::Type type = static_cast(1 << i); - QAbstractButton* button = buttons[i]; - - connect(button, &QAbstractButton::toggled, this, [=](bool checked) - { - GemInfo::Types types = m_filterProxyModel->GetTypes(); - if (checked) - { - types |= type; - } - else - { - types &= ~type; - } - m_filterProxyModel->SetTypes(types); - }); - } + return static_cast(type & gemModel->GetTypes(gemModel->index(gemIndex, 0))); + }, + &GemInfo::GetTypeString, &GemSortFilterProxyModel::GetTypes, &GemSortFilterProxyModel::SetTypes); } - void GemFilterWidget::AddPlatformFilter() + void GemFilterWidget::ResetPlatformFilter() { - QVector elementNames; - QVector elementCounts; - const int numGems = m_gemModel->rowCount(); - for (int platformIndex = 0; platformIndex < GemInfo::NumPlatforms; ++platformIndex) - { - const GemInfo::Platform platform = static_cast(1 << platformIndex); - - int platformGemCount = 0; - for (int gemIndex = 0; gemIndex < numGems; ++gemIndex) + ResetSimpleOrFilter( + m_platformFilter, "Supported Platforms", GemInfo::NumPlatforms, + [](GemModel* gemModel, GemInfo::Platform platform, int gemIndex) { - const GemInfo::Platforms platforms = m_gemModel->GetPlatforms(m_gemModel->index(gemIndex, 0)); - - // Is platform supported? - if (platforms & platform) - { - platformGemCount++; - } - } - - elementNames.push_back(GemInfo::GetPlatformString(platform)); - elementCounts.push_back(platformGemCount); - } - - FilterCategoryWidget* filterWidget = new FilterCategoryWidget("Supported Platforms", elementNames, elementCounts, /*showAllLessButton=*/false); - m_filterLayout->addWidget(filterWidget); - - const QList buttons = filterWidget->GetButtonGroup()->buttons(); - for (int i = 0; i < buttons.size(); ++i) - { - const GemInfo::Platform platform = static_cast(1 << i); - QAbstractButton* button = buttons[i]; - - connect(button, &QAbstractButton::toggled, this, [=](bool checked) - { - GemInfo::Platforms platforms = m_filterProxyModel->GetPlatforms(); - if (checked) - { - platforms |= platform; - } - else - { - platforms &= ~platform; - } - m_filterProxyModel->SetPlatforms(platforms); - }); - } + return static_cast(platform & gemModel->GetPlatforms(gemModel->index(gemIndex, 0))); + }, + &GemInfo::GetPlatformString, &GemSortFilterProxyModel::GetPlatforms, &GemSortFilterProxyModel::SetPlatforms); } - void GemFilterWidget::AddFeatureFilter() + void GemFilterWidget::ResetFeatureFilter() { // Alphabetically sorted, unique features and their number of occurrences in the gem database. QMap uniqueFeatureCounts; @@ -497,11 +454,15 @@ namespace O3DE::ProjectManager elementCounts.push_back(iterator.value()); } - FilterCategoryWidget* filterWidget = new FilterCategoryWidget("Features", elementNames, elementCounts, - /*showAllLessButton=*/true, false, /*defaultShowCount=*/5); - m_filterLayout->addWidget(filterWidget); + ResetFilterWidget(m_featureFilter, "Features", elementNames, elementCounts, /*defaultShowCount=*/5); - const QList buttons = filterWidget->GetButtonGroup()->buttons(); + for (QMetaObject::Connection& connection : m_featureTagConnections) + { + disconnect(connection); + } + m_featureTagConnections.clear(); + + const QList buttons = m_featureFilter->GetButtonGroup()->buttons(); for (int i = 0; i < buttons.size(); ++i) { const QString& feature = elementNames[i]; @@ -523,13 +484,13 @@ namespace O3DE::ProjectManager }); // Sync the UI state with the proxy model filtering. - connect(m_filterProxyModel, &GemSortFilterProxyModel::OnInvalidated, this, [=] + m_featureTagConnections.push_back(connect(m_filterProxyModel, &GemSortFilterProxyModel::OnInvalidated, this, [=] { const QSet& filteredFeatureTags = m_filterProxyModel->GetFeatures(); const bool isChecked = filteredFeatureTags.contains(button->text()); QSignalBlocker signalsBlocker(button); button->setChecked(isChecked); - }); + })); } } } // namespace O3DE::ProjectManager diff --git a/Code/Tools/ProjectManager/Source/GemCatalog/GemFilterWidget.h b/Code/Tools/ProjectManager/Source/GemCatalog/GemFilterWidget.h index 6340f8309b..e422178d08 100644 --- a/Code/Tools/ProjectManager/Source/GemCatalog/GemFilterWidget.h +++ b/Code/Tools/ProjectManager/Source/GemCatalog/GemFilterWidget.h @@ -66,17 +66,41 @@ namespace O3DE::ProjectManager ~GemFilterWidget() = default; public slots: + void ResetAllFilters(); void ResetGemStatusFilter(); private: - void AddGemOriginFilter(); - void AddTypeFilter(); - void AddPlatformFilter(); - void AddFeatureFilter(); + void ResetGemOriginFilter(); + void ResetTypeFilter(); + void ResetPlatformFilter(); + void ResetFeatureFilter(); + + void ResetFilterWidget( + FilterCategoryWidget*& filterPtr, + const QString& filterName, + const QVector& elementNames, + const QVector& elementCounts, + int defaultShowCount = 4); + + template + void ResetSimpleOrFilter( + FilterCategoryWidget*& filterPtr, + const QString& filterName, + int numFilterElements, + bool (*filterMatcher)(GemModel*, filterType, int), + QString (*typeStringGetter)(filterType), + filterFlagsType (GemSortFilterProxyModel::*filterFlagsGetter)() const, + void (GemSortFilterProxyModel::*filterFlagsSetter)(const filterFlagsType&)); QVBoxLayout* m_filterLayout = nullptr; GemModel* m_gemModel = nullptr; GemSortFilterProxyModel* m_filterProxyModel = nullptr; FilterCategoryWidget* m_statusFilter = nullptr; + FilterCategoryWidget* m_originFilter = nullptr; + FilterCategoryWidget* m_typeFilter = nullptr; + FilterCategoryWidget* m_platformFilter = nullptr; + FilterCategoryWidget* m_featureFilter = nullptr; + + QVector m_featureTagConnections; }; } // namespace O3DE::ProjectManager diff --git a/Code/Tools/ProjectManager/Source/GemCatalog/GemInfo.h b/Code/Tools/ProjectManager/Source/GemCatalog/GemInfo.h index 8c6d40505a..264971428a 100644 --- a/Code/Tools/ProjectManager/Source/GemCatalog/GemInfo.h +++ b/Code/Tools/ProjectManager/Source/GemCatalog/GemInfo.h @@ -9,7 +9,6 @@ #pragma once #if !defined(Q_MOC_RUN) -#include #include #include #include @@ -57,7 +56,9 @@ namespace O3DE::ProjectManager UnknownDownloadStatus = -1, NotDownloaded, Downloading, - Downloaded, + DownloadSuccessful, + DownloadFailed, + Downloaded }; static QString GetDownloadStatusString(DownloadStatus status); @@ -71,18 +72,21 @@ namespace O3DE::ProjectManager QString m_path; QString m_name = "Unknown Gem Name"; - QString m_displayName = "Unknown Gem Name"; + QString m_displayName; QString m_creator = "Unknown Creator"; GemOrigin m_gemOrigin = Local; - bool m_isAdded = false; //! Is the gem currently added and enabled in the project? + bool m_isAdded = false; //! Is the gem explicitly added (not a dependency) and enabled in the project? QString m_summary = "No summary provided."; Platforms m_platforms; Types m_types; //! Asset and/or Code and/or Tool DownloadStatus m_downloadStatus = UnknownDownloadStatus; QStringList m_features; QString m_requirement; + QString m_licenseText; + QString m_licenseLink; QString m_directoryLink; QString m_documentationLink; + QString m_repoUri; QString m_version = "Unknown Version"; QString m_lastUpdatedDate = "Unknown Date"; int m_binarySizeInKB = 0; diff --git a/Code/Tools/ProjectManager/Source/GemCatalog/GemInspector.cpp b/Code/Tools/ProjectManager/Source/GemCatalog/GemInspector.cpp index 7630e92e88..8bdd1f0f0f 100644 --- a/Code/Tools/ProjectManager/Source/GemCatalog/GemInspector.cpp +++ b/Code/Tools/ProjectManager/Source/GemCatalog/GemInspector.cpp @@ -14,6 +14,7 @@ #include #include #include +#include namespace O3DE::ProjectManager { @@ -52,45 +53,96 @@ namespace O3DE::ProjectManager Update(selectedIndices[0]); } + void SetLabelElidedText(QLabel* label, QString text, int labelWidth = 0) + { + QFontMetrics nameFontMetrics(label->font()); + if (!labelWidth) + { + labelWidth = label->width(); + } + + // Don't elide if the widgets are sized too small (sometimes occurs when loading gem catalog) + if (labelWidth > 100) + { + label->setText(nameFontMetrics.elidedText(text, Qt::ElideRight, labelWidth)); + } + else + { + label->setText(text); + } + } + void GemInspector::Update(const QModelIndex& modelIndex) { + m_curModelIndex = modelIndex; + if (!modelIndex.isValid()) { m_mainWidget->hide(); } - m_nameLabel->setText(m_model->GetDisplayName(modelIndex)); - m_creatorLabel->setText(m_model->GetCreator(modelIndex)); + SetLabelElidedText(m_nameLabel, m_model->GetDisplayName(modelIndex)); + SetLabelElidedText(m_creatorLabel, m_model->GetCreator(modelIndex)); m_summaryLabel->setText(m_model->GetSummary(modelIndex)); m_summaryLabel->adjustSize(); + // Manually define remaining space to elide text because spacer would like to take all of the space + SetLabelElidedText(m_licenseLinkLabel, m_model->GetLicenseText(modelIndex), width() - m_licenseLabel->width() - 35); + m_licenseLinkLabel->SetUrl(m_model->GetLicenseLink(modelIndex)); + m_directoryLinkLabel->SetUrl(m_model->GetDirectoryLink(modelIndex)); m_documentationLinkLabel->SetUrl(m_model->GetDocLink(modelIndex)); if (m_model->HasRequirement(modelIndex)) { - m_reqirementsIconLabel->show(); - m_reqirementsTitleLabel->show(); - m_reqirementsTextLabel->show(); + m_requirementsIconLabel->show(); + m_requirementsTitleLabel->show(); + m_requirementsTextLabel->show(); + m_requirementsMainSpacer->changeSize(0, 20, QSizePolicy::Fixed, QSizePolicy::Fixed); - m_reqirementsTitleLabel->setText("Requirement"); - m_reqirementsTextLabel->setText(m_model->GetRequirement(modelIndex)); + m_requirementsTitleLabel->setText(tr("Requirement")); + m_requirementsTextLabel->setText(m_model->GetRequirement(modelIndex)); } else { - m_reqirementsIconLabel->hide(); - m_reqirementsTitleLabel->hide(); - m_reqirementsTextLabel->hide(); + m_requirementsIconLabel->hide(); + m_requirementsTitleLabel->hide(); + m_requirementsTextLabel->hide(); + m_requirementsMainSpacer->changeSize(0, 0, QSizePolicy::Fixed, QSizePolicy::Fixed); } // Depending gems - m_dependingGems->Update("Depending Gems", "The following Gems will be automatically enabled with this Gem.", m_model->GetDependingGemNames(modelIndex)); + const QVector& dependingGemTags = m_model->GetDependingGemTags(modelIndex); + if (!dependingGemTags.isEmpty()) + { + m_dependingGems->Update(tr("Depending Gems"), tr("The following Gems will be automatically enabled with this Gem."), dependingGemTags); + m_dependingGems->show(); + } + else + { + m_dependingGems->hide(); + } // Additional information - m_versionLabel->setText(QString("Gem Version: %1").arg(m_model->GetVersion(modelIndex))); - m_lastUpdatedLabel->setText(QString("Last Updated: %1").arg(m_model->GetLastUpdated(modelIndex))); - m_binarySizeLabel->setText(QString("Binary Size: %1 KB").arg(m_model->GetBinarySizeInKB(modelIndex))); + m_versionLabel->setText(tr("Gem Version: %1").arg(m_model->GetVersion(modelIndex))); + m_lastUpdatedLabel->setText(tr("Last Updated: %1").arg(m_model->GetLastUpdated(modelIndex))); + const int binarySize = m_model->GetBinarySizeInKB(modelIndex); + m_binarySizeLabel->setText(tr("Binary Size: %1").arg(binarySize ? tr("%1 KB").arg(binarySize) : tr("Unknown"))); + + // Update and Uninstall buttons + if (m_model->GetGemOrigin(modelIndex) == GemInfo::Remote && + (m_model->GetDownloadStatus(modelIndex) == GemInfo::Downloaded || + m_model->GetDownloadStatus(modelIndex) == GemInfo::DownloadSuccessful)) + { + m_updateGemButton->show(); + m_uninstallGemButton->show(); + } + else + { + m_updateGemButton->hide(); + m_uninstallGemButton->hide(); + } m_mainWidget->adjustSize(); m_mainWidget->show(); @@ -108,35 +160,51 @@ namespace O3DE::ProjectManager { // Gem name, creator and summary m_nameLabel = CreateStyledLabel(m_mainLayout, 18, s_headerColor); - m_creatorLabel = CreateStyledLabel(m_mainLayout, 12, s_headerColor); + m_creatorLabel = CreateStyledLabel(m_mainLayout, s_baseFontSize, s_headerColor); m_mainLayout->addSpacing(5); // TODO: QLabel seems to have issues determining the right sizeHint() for our font with the given font size. // This results into squeezed elements in the layout in case the text is a little longer than a sentence. - m_summaryLabel = CreateStyledLabel(m_mainLayout, 12, s_textColor); + m_summaryLabel = CreateStyledLabel(m_mainLayout, s_baseFontSize, s_headerColor); m_mainLayout->addWidget(m_summaryLabel); m_summaryLabel->setWordWrap(true); m_summaryLabel->setTextInteractionFlags(Qt::TextBrowserInteraction); m_summaryLabel->setOpenExternalLinks(true); m_mainLayout->addSpacing(5); + // License + { + QHBoxLayout* licenseHLayout = new QHBoxLayout(); + licenseHLayout->setMargin(0); + licenseHLayout->setAlignment(Qt::AlignLeft); + m_mainLayout->addLayout(licenseHLayout); + + m_licenseLabel = CreateStyledLabel(licenseHLayout, s_baseFontSize, s_headerColor); + m_licenseLabel->setText(tr("License: ")); + + m_licenseLinkLabel = new LinkLabel("", QUrl(), s_baseFontSize); + licenseHLayout->addWidget(m_licenseLinkLabel); + + licenseHLayout->addStretch(); + + m_mainLayout->addSpacing(5); + } + // Directory and documentation links { QHBoxLayout* linksHLayout = new QHBoxLayout(); linksHLayout->setMargin(0); m_mainLayout->addLayout(linksHLayout); - QSpacerItem* spacerLeft = new QSpacerItem(0, 0, QSizePolicy::Expanding); - linksHLayout->addSpacerItem(spacerLeft); + linksHLayout->addStretch(); - m_directoryLinkLabel = new LinkLabel("View in Directory"); + m_directoryLinkLabel = new LinkLabel(tr("View in Directory")); linksHLayout->addWidget(m_directoryLinkLabel); linksHLayout->addWidget(new QLabel("|")); - m_documentationLinkLabel = new LinkLabel("Read Documentation"); + m_documentationLinkLabel = new LinkLabel(tr("Read Documentation")); linksHLayout->addWidget(m_documentationLinkLabel); - QSpacerItem* spacerRight = new QSpacerItem(0, 0, QSizePolicy::Expanding); - linksHLayout->addSpacerItem(spacerRight); + linksHLayout->addStretch(); m_mainLayout->addSpacing(8); } @@ -144,46 +212,63 @@ namespace O3DE::ProjectManager // Separating line QFrame* hLine = new QFrame(); hLine->setFrameShape(QFrame::HLine); - hLine->setStyleSheet("color: #666666;"); + hLine->setObjectName("horizontalSeparatingLine"); m_mainLayout->addWidget(hLine); m_mainLayout->addSpacing(10); // Requirements - m_reqirementsTitleLabel = GemInspector::CreateStyledLabel(m_mainLayout, 16, s_headerColor); + m_requirementsTitleLabel = GemInspector::CreateStyledLabel(m_mainLayout, 16, s_headerColor); - QHBoxLayout* requrementsLayout = new QHBoxLayout(); - requrementsLayout->setAlignment(Qt::AlignTop); - requrementsLayout->setMargin(0); - requrementsLayout->setSpacing(0); + QHBoxLayout* requirementsLayout = new QHBoxLayout(); + requirementsLayout->setAlignment(Qt::AlignTop); + requirementsLayout->setMargin(0); + requirementsLayout->setSpacing(0); - m_reqirementsIconLabel = new QLabel(); - m_reqirementsIconLabel->setPixmap(QIcon(":/Warning.svg").pixmap(24, 24)); - requrementsLayout->addWidget(m_reqirementsIconLabel); + m_requirementsIconLabel = new QLabel(); + m_requirementsIconLabel->setPixmap(QIcon(":/Warning.svg").pixmap(24, 24)); + requirementsLayout->addWidget(m_requirementsIconLabel); - m_reqirementsTextLabel = GemInspector::CreateStyledLabel(requrementsLayout, 10, s_textColor); - m_reqirementsTextLabel->setWordWrap(true); - m_reqirementsTextLabel->setTextInteractionFlags(Qt::TextBrowserInteraction); - m_reqirementsTextLabel->setOpenExternalLinks(true); + m_requirementsTextLabel = GemInspector::CreateStyledLabel(requirementsLayout, 10, s_textColor); + m_requirementsTextLabel->setWordWrap(true); + m_requirementsTextLabel->setTextInteractionFlags(Qt::TextBrowserInteraction); + m_requirementsTextLabel->setOpenExternalLinks(true); - QSpacerItem* reqirementsSpacer = new QSpacerItem(0, 0, QSizePolicy::Expanding); - requrementsLayout->addSpacerItem(reqirementsSpacer); + QSpacerItem* requirementsSpacer = new QSpacerItem(0, 0, QSizePolicy::MinimumExpanding); + requirementsLayout->addSpacerItem(requirementsSpacer); - m_mainLayout->addLayout(requrementsLayout); + m_mainLayout->addLayout(requirementsLayout); - m_mainLayout->addSpacing(20); + m_requirementsMainSpacer = new QSpacerItem(0, 20, QSizePolicy::Fixed, QSizePolicy::Fixed); + m_mainLayout->addSpacerItem(m_requirementsMainSpacer); // Depending gems m_dependingGems = new GemsSubWidget(); + connect(m_dependingGems, &GemsSubWidget::TagClicked, this, [this](const Tag& tag){ emit TagClicked(tag); }); m_mainLayout->addWidget(m_dependingGems); m_mainLayout->addSpacing(20); // Additional information QLabel* additionalInfoLabel = CreateStyledLabel(m_mainLayout, 14, s_headerColor); - additionalInfoLabel->setText("Additional Information"); + additionalInfoLabel->setText(tr("Additional Information")); - m_versionLabel = CreateStyledLabel(m_mainLayout, 12, s_textColor); - m_lastUpdatedLabel = CreateStyledLabel(m_mainLayout, 12, s_textColor); - m_binarySizeLabel = CreateStyledLabel(m_mainLayout, 12, s_textColor); + m_versionLabel = CreateStyledLabel(m_mainLayout, s_baseFontSize, s_textColor); + m_lastUpdatedLabel = CreateStyledLabel(m_mainLayout, s_baseFontSize, s_textColor); + m_binarySizeLabel = CreateStyledLabel(m_mainLayout, s_baseFontSize, s_textColor); + + m_mainLayout->addSpacing(20); + + // Update and Uninstall buttons + m_updateGemButton = new QPushButton(tr("Update Gem")); + m_updateGemButton->setObjectName("gemCatalogUpdateGemButton"); + m_mainLayout->addWidget(m_updateGemButton); + connect(m_updateGemButton, &QPushButton::clicked, this , [this]{ emit UpdateGem(m_curModelIndex); }); + + m_mainLayout->addSpacing(10); + + m_uninstallGemButton = new QPushButton(tr("Uninstall Gem")); + m_uninstallGemButton->setObjectName("gemCatalogUninstallGemButton"); + m_mainLayout->addWidget(m_uninstallGemButton); + connect(m_uninstallGemButton, &QPushButton::clicked, this , [this]{ emit UninstallGem(m_curModelIndex); }); } } // namespace O3DE::ProjectManager diff --git a/Code/Tools/ProjectManager/Source/GemCatalog/GemInspector.h b/Code/Tools/ProjectManager/Source/GemCatalog/GemInspector.h index ca36cef240..1713191623 100644 --- a/Code/Tools/ProjectManager/Source/GemCatalog/GemInspector.h +++ b/Code/Tools/ProjectManager/Source/GemCatalog/GemInspector.h @@ -16,11 +16,12 @@ #include #include -#include #endif QT_FORWARD_DECLARE_CLASS(QVBoxLayout) QT_FORWARD_DECLARE_CLASS(QLabel) +QT_FORWARD_DECLARE_CLASS(QSpacerItem) +QT_FORWARD_DECLARE_CLASS(QPushButton) namespace O3DE::ProjectManager { @@ -36,10 +37,18 @@ namespace O3DE::ProjectManager void Update(const QModelIndex& modelIndex); static QLabel* CreateStyledLabel(QLayout* layout, int fontSize, const QString& colorCodeString); + // Fonts + inline constexpr static int s_baseFontSize = 12; + // Colors inline constexpr static const char* s_headerColor = "#FFFFFF"; inline constexpr static const char* s_textColor = "#DDDDDD"; + signals: + void TagClicked(const Tag& tag); + void UpdateGem(const QModelIndex& modelIndex); + void UninstallGem(const QModelIndex& modelIndex); + private slots: void OnSelectionChanged(const QItemSelection& selected, const QItemSelection& deselected); @@ -49,18 +58,22 @@ namespace O3DE::ProjectManager GemModel* m_model = nullptr; QWidget* m_mainWidget = nullptr; QVBoxLayout* m_mainLayout = nullptr; + QModelIndex m_curModelIndex; // General info (top) section QLabel* m_nameLabel = nullptr; QLabel* m_creatorLabel = nullptr; QLabel* m_summaryLabel = nullptr; + QLabel* m_licenseLabel = nullptr; + LinkLabel* m_licenseLinkLabel = nullptr; LinkLabel* m_directoryLinkLabel = nullptr; LinkLabel* m_documentationLinkLabel = nullptr; // Requirements - QLabel* m_reqirementsTitleLabel = nullptr; - QLabel* m_reqirementsIconLabel = nullptr; - QLabel* m_reqirementsTextLabel = nullptr; + QLabel* m_requirementsTitleLabel = nullptr; + QLabel* m_requirementsIconLabel = nullptr; + QLabel* m_requirementsTextLabel = nullptr; + QSpacerItem* m_requirementsMainSpacer = nullptr; // Depending and conflicting gems GemsSubWidget* m_dependingGems = nullptr; @@ -69,5 +82,8 @@ namespace O3DE::ProjectManager QLabel* m_versionLabel = nullptr; QLabel* m_lastUpdatedLabel = nullptr; QLabel* m_binarySizeLabel = nullptr; + + QPushButton* m_updateGemButton = nullptr; + QPushButton* m_uninstallGemButton = nullptr; }; } // namespace O3DE::ProjectManager diff --git a/Code/Tools/ProjectManager/Source/GemCatalog/GemItemDelegate.cpp b/Code/Tools/ProjectManager/Source/GemCatalog/GemItemDelegate.cpp index e15c4b3b39..dd94e42fc4 100644 --- a/Code/Tools/ProjectManager/Source/GemCatalog/GemItemDelegate.cpp +++ b/Code/Tools/ProjectManager/Source/GemCatalog/GemItemDelegate.cpp @@ -37,6 +37,8 @@ namespace O3DE::ProjectManager SetStatusIcon(m_notDownloadedPixmap, ":/Download.svg"); SetStatusIcon(m_unknownStatusPixmap, ":/X.svg"); + SetStatusIcon(m_downloadSuccessfulPixmap, ":/checkmark.svg"); + SetStatusIcon(m_downloadFailedPixmap, ":/Warning.svg"); m_downloadingMovie = new QMovie(":/in_progress.gif"); } @@ -480,6 +482,14 @@ namespace O3DE::ProjectManager currentFrame = currentFrame.scaled(s_statusIconSize, s_statusIconSize); statusPixmap = ¤tFrame; } + else if (downloadStatus == GemInfo::DownloadStatus::DownloadSuccessful) + { + statusPixmap = &m_downloadSuccessfulPixmap; + } + else if (downloadStatus == GemInfo::DownloadStatus::DownloadFailed) + { + statusPixmap = &m_downloadFailedPixmap; + } else if (downloadStatus == GemInfo::DownloadStatus::NotDownloaded) { statusPixmap = &m_notDownloadedPixmap; diff --git a/Code/Tools/ProjectManager/Source/GemCatalog/GemItemDelegate.h b/Code/Tools/ProjectManager/Source/GemCatalog/GemItemDelegate.h index c013be0d9e..107de6de15 100644 --- a/Code/Tools/ProjectManager/Source/GemCatalog/GemItemDelegate.h +++ b/Code/Tools/ProjectManager/Source/GemCatalog/GemItemDelegate.h @@ -97,6 +97,8 @@ namespace O3DE::ProjectManager QPixmap m_unknownStatusPixmap; QPixmap m_notDownloadedPixmap; + QPixmap m_downloadSuccessfulPixmap; + QPixmap m_downloadFailedPixmap; QMovie* m_downloadingMovie = nullptr; }; } // namespace O3DE::ProjectManager diff --git a/Code/Tools/ProjectManager/Source/GemCatalog/GemModel.cpp b/Code/Tools/ProjectManager/Source/GemCatalog/GemModel.cpp index fb228c0b4a..d163ab9076 100644 --- a/Code/Tools/ProjectManager/Source/GemCatalog/GemModel.cpp +++ b/Code/Tools/ProjectManager/Source/GemCatalog/GemModel.cpp @@ -18,6 +18,7 @@ namespace O3DE::ProjectManager : QStandardItemModel(parent) { m_selectionModel = new QItemSelectionModel(this, parent); + connect(this, &QAbstractItemModel::rowsAboutToBeRemoved, this, &GemModel::OnRowsAboutToBeRemoved); } QItemSelectionModel* GemModel::GetSelectionModel() const @@ -25,14 +26,14 @@ namespace O3DE::ProjectManager return m_selectionModel; } - void GemModel::AddGem(const GemInfo& gemInfo) + QModelIndex GemModel::AddGem(const GemInfo& gemInfo) { if (FindIndexByNameString(gemInfo.m_name).isValid()) { // do not add gems with duplicate names // this can happen by mistake or when a gem repo has a gem with the same name as a local gem AZ_TracePrintf("GemModel", "Ignoring duplicate gem: %s", gemInfo.m_name.toUtf8().constData()); - return; + return QModelIndex(); } QStandardItem* item = new QStandardItem(); @@ -58,11 +59,30 @@ namespace O3DE::ProjectManager item->setData(gemInfo.m_path, RolePath); item->setData(gemInfo.m_requirement, RoleRequirement); item->setData(gemInfo.m_downloadStatus, RoleDownloadStatus); + item->setData(gemInfo.m_licenseText, RoleLicenseText); + item->setData(gemInfo.m_licenseLink, RoleLicenseLink); + item->setData(gemInfo.m_repoUri, RoleRepoUri); appendRow(item); const QModelIndex modelIndex = index(rowCount()-1, 0); m_nameToIndexMap[gemInfo.m_name] = modelIndex; + + return modelIndex; + } + + void GemModel::RemoveGem(const QModelIndex& modelIndex) + { + removeRow(modelIndex.row()); + } + + void GemModel::RemoveGem(const QString& gemName) + { + auto nameFind = m_nameToIndexMap.find(gemName); + if (nameFind != m_nameToIndexMap.end()) + { + removeRow(nameFind->row()); + } } void GemModel::Clear() @@ -174,18 +194,6 @@ namespace O3DE::ProjectManager return {}; } - void GemModel::FindGemDisplayNamesByNameStrings(QStringList& inOutGemNames) - { - for (QString& name : inOutGemNames) - { - QModelIndex modelIndex = FindIndexByNameString(name); - if (modelIndex.isValid()) - { - name = GetDisplayName(modelIndex); - } - } - } - QStringList GemModel::GetDependingGems(const QModelIndex& modelIndex) { return modelIndex.data(RoleDependingGems).toStringList(); @@ -205,16 +213,23 @@ namespace O3DE::ProjectManager } } - QStringList GemModel::GetDependingGemNames(const QModelIndex& modelIndex) + QVector GemModel::GetDependingGemTags(const QModelIndex& modelIndex) { - QStringList result = GetDependingGems(modelIndex); - if (result.isEmpty()) + QVector tags; + + QStringList dependingGemNames = GetDependingGems(modelIndex); + tags.reserve(dependingGemNames.size()); + + for (QString& gemName : dependingGemNames) { - return {}; + const QModelIndex& dependingIndex = FindIndexByNameString(gemName); + if (dependingIndex.isValid()) + { + tags.push_back({ GetDisplayName(dependingIndex), GetName(dependingIndex) }); + } } - FindGemDisplayNamesByNameStrings(result); - return result; + return tags; } QString GemModel::GetVersion(const QModelIndex& modelIndex) @@ -247,6 +262,21 @@ namespace O3DE::ProjectManager return modelIndex.data(RoleRequirement).toString(); } + QString GemModel::GetLicenseText(const QModelIndex& modelIndex) + { + return modelIndex.data(RoleLicenseText).toString(); + } + + QString GemModel::GetLicenseLink(const QModelIndex& modelIndex) + { + return modelIndex.data(RoleLicenseLink).toString(); + } + + QString GemModel::GetRepoUri(const QModelIndex& modelIndex) + { + return modelIndex.data(RoleRepoUri).toString(); + } + GemModel* GemModel::GetSourceModel(QAbstractItemModel* model) { GemSortFilterProxyModel* proxyModel = qobject_cast(model); @@ -327,6 +357,8 @@ namespace O3DE::ProjectManager if (!IsAdded(dependency)) { numChangedDependencies++; + const QString dependencyName = gemModel->GetName(dependency); + gemModel->emit dependencyGemStatusChanged(dependencyName); } } } @@ -351,6 +383,8 @@ namespace O3DE::ProjectManager if (!IsAdded(dependency)) { numChangedDependencies++; + const QString dependencyName = gemModel->GetName(dependency); + gemModel->emit dependencyGemStatusChanged(dependencyName); } } } @@ -359,6 +393,35 @@ namespace O3DE::ProjectManager gemModel->emit gemStatusChanged(gemName, numChangedDependencies); } + void GemModel::OnRowsAboutToBeRemoved(const QModelIndex& parent, int first, int last) + { + bool selectedRowRemoved = false; + for (int i = first; i <= last; ++i) + { + QModelIndex modelIndex = index(i, 0, parent); + const QString& gemName = GetName(modelIndex); + m_nameToIndexMap.remove(gemName); + + if (GetSelectionModel()->isRowSelected(i)) + { + selectedRowRemoved = true; + } + } + + // Select a valid row if currently selected row was removed + if (selectedRowRemoved) + { + for (const QModelIndex& index : m_nameToIndexMap) + { + if (index.isValid()) + { + GetSelectionModel()->setCurrentIndex(index, QItemSelectionModel::ClearAndSelect); + break; + } + } + } + } + void GemModel::SetIsAddedDependency(QAbstractItemModel& model, const QModelIndex& modelIndex, bool isAdded) { model.setData(modelIndex, isAdded, RoleIsAddedDependency); @@ -420,6 +483,23 @@ namespace O3DE::ProjectManager return previouslyAdded && !added; } + void GemModel::DeactivateDependentGems(QAbstractItemModel& model, const QModelIndex& modelIndex) + { + GemModel* gemModel = GetSourceModel(&model); + AZ_Assert(gemModel, "Failed to obtain GemModel"); + + QVector dependentGems = gemModel->GatherDependentGems(modelIndex); + if (!dependentGems.isEmpty()) + { + // we need to deactivate all gems that depend on this one + for (auto dependentModelIndex : dependentGems) + { + SetIsAdded(model, dependentModelIndex, false); + } + + } + } + void GemModel::SetDownloadStatus(QAbstractItemModel& model, const QModelIndex& modelIndex, GemInfo::DownloadStatus status) { model.setData(modelIndex, status, RoleDownloadStatus); diff --git a/Code/Tools/ProjectManager/Source/GemCatalog/GemModel.h b/Code/Tools/ProjectManager/Source/GemCatalog/GemModel.h index 35231cc105..cb99581468 100644 --- a/Code/Tools/ProjectManager/Source/GemCatalog/GemModel.h +++ b/Code/Tools/ProjectManager/Source/GemCatalog/GemModel.h @@ -10,6 +10,7 @@ #if !defined(Q_MOC_RUN) #include +#include #include #include #include @@ -26,65 +27,6 @@ namespace O3DE::ProjectManager explicit GemModel(QObject* parent = nullptr); QItemSelectionModel* GetSelectionModel() const; - void AddGem(const GemInfo& gemInfo); - void Clear(); - void UpdateGemDependencies(); - - QModelIndex FindIndexByNameString(const QString& nameString) const; - QStringList GetDependingGemNames(const QModelIndex& modelIndex); - bool HasDependentGems(const QModelIndex& modelIndex) const; - - static QString GetName(const QModelIndex& modelIndex); - static QString GetDisplayName(const QModelIndex& modelIndex); - static QString GetCreator(const QModelIndex& modelIndex); - static GemInfo::GemOrigin GetGemOrigin(const QModelIndex& modelIndex); - static GemInfo::Platforms GetPlatforms(const QModelIndex& modelIndex); - static GemInfo::Types GetTypes(const QModelIndex& modelIndex); - static GemInfo::DownloadStatus GetDownloadStatus(const QModelIndex& modelIndex); - static QString GetSummary(const QModelIndex& modelIndex); - static QString GetDirectoryLink(const QModelIndex& modelIndex); - static QString GetDocLink(const QModelIndex& modelIndex); - static QString GetVersion(const QModelIndex& modelIndex); - static QString GetLastUpdated(const QModelIndex& modelIndex); - static int GetBinarySizeInKB(const QModelIndex& modelIndex); - static QStringList GetFeatures(const QModelIndex& modelIndex); - static QString GetPath(const QModelIndex& modelIndex); - static QString GetRequirement(const QModelIndex& modelIndex); - static GemModel* GetSourceModel(QAbstractItemModel* model); - static const GemModel* GetSourceModel(const QAbstractItemModel* model); - - static bool IsAdded(const QModelIndex& modelIndex); - static bool IsAddedDependency(const QModelIndex& modelIndex); - static void SetIsAdded(QAbstractItemModel& model, const QModelIndex& modelIndex, bool isAdded); - static void SetIsAddedDependency(QAbstractItemModel& model, const QModelIndex& modelIndex, bool isAdded); - static void SetWasPreviouslyAdded(QAbstractItemModel& model, const QModelIndex& modelIndex, bool wasAdded); - static bool WasPreviouslyAdded(const QModelIndex& modelIndex); - static void SetWasPreviouslyAddedDependency(QAbstractItemModel& model, const QModelIndex& modelIndex, bool wasAdded); - static bool WasPreviouslyAddedDependency(const QModelIndex& modelIndex); - static bool NeedsToBeAdded(const QModelIndex& modelIndex, bool includeDependencies = false); - static bool NeedsToBeRemoved(const QModelIndex& modelIndex, bool includeDependencies = false); - static bool HasRequirement(const QModelIndex& modelIndex); - static void UpdateDependencies(QAbstractItemModel& model, const QString& gemName, bool isAdded); - static void SetDownloadStatus(QAbstractItemModel& model, const QModelIndex& modelIndex, GemInfo::DownloadStatus status); - - bool DoGemsToBeAddedHaveRequirements() const; - bool HasDependentGemsToRemove() const; - - QVector GatherGemDependencies(const QModelIndex& modelIndex) const; - QVector GatherDependentGems(const QModelIndex& modelIndex, bool addedOnly = false) const; - QVector GatherGemsToBeAdded(bool includeDependencies = false) const; - QVector GatherGemsToBeRemoved(bool includeDependencies = false) const; - - int TotalAddedGems(bool includeDependencies = false) const; - - signals: - void gemStatusChanged(const QString& gemName, uint32_t numChangedDependencies); - - private: - void FindGemDisplayNamesByNameStrings(QStringList& inOutGemNames); - void GetAllDependingGems(const QModelIndex& modelIndex, QSet& inOutGems); - QStringList GetDependingGems(const QModelIndex& modelIndex); - enum UserRole { RoleName = Qt::UserRole, @@ -107,9 +49,80 @@ namespace O3DE::ProjectManager RoleTypes, RolePath, RoleRequirement, - RoleDownloadStatus + RoleDownloadStatus, + RoleLicenseText, + RoleLicenseLink, + RoleRepoUri }; + QModelIndex AddGem(const GemInfo& gemInfo); + void RemoveGem(const QModelIndex& modelIndex); + void RemoveGem(const QString& gemName); + void Clear(); + void UpdateGemDependencies(); + + QModelIndex FindIndexByNameString(const QString& nameString) const; + QVector GetDependingGemTags(const QModelIndex& modelIndex); + bool HasDependentGems(const QModelIndex& modelIndex) const; + + static QString GetName(const QModelIndex& modelIndex); + static QString GetDisplayName(const QModelIndex& modelIndex); + static QString GetCreator(const QModelIndex& modelIndex); + static GemInfo::GemOrigin GetGemOrigin(const QModelIndex& modelIndex); + static GemInfo::Platforms GetPlatforms(const QModelIndex& modelIndex); + static GemInfo::Types GetTypes(const QModelIndex& modelIndex); + static GemInfo::DownloadStatus GetDownloadStatus(const QModelIndex& modelIndex); + static QString GetSummary(const QModelIndex& modelIndex); + static QString GetDirectoryLink(const QModelIndex& modelIndex); + static QString GetDocLink(const QModelIndex& modelIndex); + static QString GetVersion(const QModelIndex& modelIndex); + static QString GetLastUpdated(const QModelIndex& modelIndex); + static int GetBinarySizeInKB(const QModelIndex& modelIndex); + static QStringList GetFeatures(const QModelIndex& modelIndex); + static QString GetPath(const QModelIndex& modelIndex); + static QString GetRequirement(const QModelIndex& modelIndex); + static QString GetLicenseText(const QModelIndex& modelIndex); + static QString GetLicenseLink(const QModelIndex& modelIndex); + static QString GetRepoUri(const QModelIndex& modelIndex); + static GemModel* GetSourceModel(QAbstractItemModel* model); + static const GemModel* GetSourceModel(const QAbstractItemModel* model); + + static bool IsAdded(const QModelIndex& modelIndex); + static bool IsAddedDependency(const QModelIndex& modelIndex); + static void SetIsAdded(QAbstractItemModel& model, const QModelIndex& modelIndex, bool isAdded); + static void SetIsAddedDependency(QAbstractItemModel& model, const QModelIndex& modelIndex, bool isAdded); + static void SetWasPreviouslyAdded(QAbstractItemModel& model, const QModelIndex& modelIndex, bool wasAdded); + static bool WasPreviouslyAdded(const QModelIndex& modelIndex); + static void SetWasPreviouslyAddedDependency(QAbstractItemModel& model, const QModelIndex& modelIndex, bool wasAdded); + static bool WasPreviouslyAddedDependency(const QModelIndex& modelIndex); + static bool NeedsToBeAdded(const QModelIndex& modelIndex, bool includeDependencies = false); + static bool NeedsToBeRemoved(const QModelIndex& modelIndex, bool includeDependencies = false); + static bool HasRequirement(const QModelIndex& modelIndex); + static void UpdateDependencies(QAbstractItemModel& model, const QString& gemName, bool isAdded); + static void DeactivateDependentGems(QAbstractItemModel& model, const QModelIndex& modelIndex); + static void SetDownloadStatus(QAbstractItemModel& model, const QModelIndex& modelIndex, GemInfo::DownloadStatus status); + + bool DoGemsToBeAddedHaveRequirements() const; + bool HasDependentGemsToRemove() const; + + QVector GatherGemDependencies(const QModelIndex& modelIndex) const; + QVector GatherDependentGems(const QModelIndex& modelIndex, bool addedOnly = false) const; + QVector GatherGemsToBeAdded(bool includeDependencies = false) const; + QVector GatherGemsToBeRemoved(bool includeDependencies = false) const; + + int TotalAddedGems(bool includeDependencies = false) const; + + signals: + void gemStatusChanged(const QString& gemName, uint32_t numChangedDependencies); + void dependencyGemStatusChanged(const QString& gemName); + + protected slots: + void OnRowsAboutToBeRemoved(const QModelIndex& parent, int first, int last); + + private: + void GetAllDependingGems(const QModelIndex& modelIndex, QSet& inOutGems); + QStringList GetDependingGems(const QModelIndex& modelIndex); + QHash m_nameToIndexMap; QItemSelectionModel* m_selectionModel = nullptr; QHash> m_gemDependencyMap; diff --git a/Code/Tools/ProjectManager/Source/GemCatalog/GemSortFilterProxyModel.cpp b/Code/Tools/ProjectManager/Source/GemCatalog/GemSortFilterProxyModel.cpp index 7ec45ac721..a32492cf1e 100644 --- a/Code/Tools/ProjectManager/Source/GemCatalog/GemSortFilterProxyModel.cpp +++ b/Code/Tools/ProjectManager/Source/GemCatalog/GemSortFilterProxyModel.cpp @@ -204,9 +204,14 @@ namespace O3DE::ProjectManager emit OnInvalidated(); } - void GemSortFilterProxyModel::ResetFilters() + void GemSortFilterProxyModel::ResetFilters(bool clearSearchString) { - m_searchString.clear(); + if (clearSearchString) + { + m_searchString.clear(); + } + m_gemSelectedFilter = GemSelected::NoFilter; + m_gemActiveFilter = GemActive::NoFilter; m_gemOriginFilter = {}; m_platformFilter = {}; m_typeFilter = {}; diff --git a/Code/Tools/ProjectManager/Source/GemCatalog/GemSortFilterProxyModel.h b/Code/Tools/ProjectManager/Source/GemCatalog/GemSortFilterProxyModel.h index ab739e62f9..0c58d66ccf 100644 --- a/Code/Tools/ProjectManager/Source/GemCatalog/GemSortFilterProxyModel.h +++ b/Code/Tools/ProjectManager/Source/GemCatalog/GemSortFilterProxyModel.h @@ -70,7 +70,7 @@ namespace O3DE::ProjectManager void SetFeatures(const QSet& features) { m_featureFilter = features; InvalidateFilter(); } void InvalidateFilter(); - void ResetFilters(); + void ResetFilters(bool clearSearchString = true); signals: void OnInvalidated(); diff --git a/Code/Tools/ProjectManager/Source/GemCatalog/GemUninstallDialog.cpp b/Code/Tools/ProjectManager/Source/GemCatalog/GemUninstallDialog.cpp new file mode 100644 index 0000000000..679d9c576f --- /dev/null +++ b/Code/Tools/ProjectManager/Source/GemCatalog/GemUninstallDialog.cpp @@ -0,0 +1,60 @@ +/* + * Copyright (c) Contributors to the Open 3D Engine Project. + * For complete copyright and license terms please see the LICENSE at the root of this distribution. + * + * SPDX-License-Identifier: Apache-2.0 OR MIT + * + */ + +#include + +#include +#include +#include +#include +#include + +namespace O3DE::ProjectManager +{ + GemUninstallDialog::GemUninstallDialog(const QString& gemName, QWidget* parent) + : QDialog(parent) + { + setWindowTitle(tr("Uninstall Remote Gem")); + setObjectName("GemUninstallDialog"); + setAttribute(Qt::WA_DeleteOnClose); + setModal(true); + + QVBoxLayout* layout = new QVBoxLayout(); + layout->setMargin(30); + layout->setAlignment(Qt::AlignTop); + setLayout(layout); + + // Body + QLabel* subTitleLabel = new QLabel(tr("Are you sure you want to uninstall %1?").arg(gemName)); + subTitleLabel->setObjectName("dialogSubTitle"); + layout->addWidget(subTitleLabel); + + layout->addSpacing(10); + + QLabel* bodyLabel = new QLabel(tr("The Gem and its related files will be uninstalled. This does not affect the Gem's repository. " + "You can reinstall this Gem from the Catalog, but its contents may be subject to change.")); + bodyLabel->setWordWrap(true); + bodyLabel->setFixedSize(QSize(440, 80)); + layout->addWidget(bodyLabel); + + layout->addSpacing(40); + + // Buttons + QDialogButtonBox* dialogButtons = new QDialogButtonBox(); + dialogButtons->setObjectName("footer"); + layout->addWidget(dialogButtons); + + QPushButton* cancelButton = dialogButtons->addButton(tr("Cancel"), QDialogButtonBox::RejectRole); + cancelButton->setProperty("secondary", true); + QPushButton* uninstallButton = dialogButtons->addButton(tr("Uninstall Gem"), QDialogButtonBox::ApplyRole); + uninstallButton->setObjectName("gemCatalogUninstallGemButton"); + + connect(cancelButton, &QPushButton::clicked, this, &QDialog::reject); + connect(uninstallButton, &QPushButton::clicked, this, &QDialog::accept); + } +} // namespace O3DE::ProjectManager diff --git a/Code/Tools/ProjectManager/Source/GemCatalog/GemUninstallDialog.h b/Code/Tools/ProjectManager/Source/GemCatalog/GemUninstallDialog.h new file mode 100644 index 0000000000..9e3f4c3f3b --- /dev/null +++ b/Code/Tools/ProjectManager/Source/GemCatalog/GemUninstallDialog.h @@ -0,0 +1,25 @@ +/* + * Copyright (c) Contributors to the Open 3D Engine Project. + * For complete copyright and license terms please see the LICENSE at the root of this distribution. + * + * SPDX-License-Identifier: Apache-2.0 OR MIT + * + */ + +#pragma once + +#if !defined(Q_MOC_RUN) +#include +#endif + +namespace O3DE::ProjectManager +{ + class GemUninstallDialog + : public QDialog + { + Q_OBJECT // AUTOMOC + public: + explicit GemUninstallDialog(const QString& gemName, QWidget *parent = nullptr); + ~GemUninstallDialog() = default; + }; +} // namespace O3DE::ProjectManager diff --git a/Code/Tools/ProjectManager/Source/GemCatalog/GemUpdateDialog.cpp b/Code/Tools/ProjectManager/Source/GemCatalog/GemUpdateDialog.cpp new file mode 100644 index 0000000000..d973dd3749 --- /dev/null +++ b/Code/Tools/ProjectManager/Source/GemCatalog/GemUpdateDialog.cpp @@ -0,0 +1,64 @@ +/* + * Copyright (c) Contributors to the Open 3D Engine Project. + * For complete copyright and license terms please see the LICENSE at the root of this distribution. + * + * SPDX-License-Identifier: Apache-2.0 OR MIT + * + */ + +#include + +#include +#include +#include +#include +#include + +namespace O3DE::ProjectManager +{ + GemUpdateDialog::GemUpdateDialog(const QString& gemName, bool updateAvaliable, QWidget* parent) + : QDialog(parent) + { + setWindowTitle(tr("Update Remote Gem")); + setObjectName("GemUpdateDialog"); + setAttribute(Qt::WA_DeleteOnClose); + setModal(true); + + QVBoxLayout* layout = new QVBoxLayout(); + layout->setMargin(30); + layout->setAlignment(Qt::AlignTop); + setLayout(layout); + + // Body + QLabel* subTitleLabel = new QLabel(tr("%1 to the latest version of %2?").arg( + updateAvaliable ? tr("Update") : tr("Force update"), gemName)); + subTitleLabel->setObjectName("dialogSubTitle"); + layout->addWidget(subTitleLabel); + + layout->addSpacing(10); + + QLabel* bodyLabel = new QLabel(tr("%1The latest version of this Gem may not be compatible with your engine. " + "Updating this Gem will remove any local changes made to this Gem, " + "and may remove old features that are in use.").arg( + updateAvaliable ? "" : tr("No update detected for Gem. " + "This will force a re-download of the gem. "))); + bodyLabel->setWordWrap(true); + bodyLabel->setFixedSize(QSize(440, 80)); + layout->addWidget(bodyLabel); + + layout->addSpacing(40); + + // Buttons + QDialogButtonBox* dialogButtons = new QDialogButtonBox(); + dialogButtons->setObjectName("footer"); + layout->addWidget(dialogButtons); + + QPushButton* cancelButton = dialogButtons->addButton(tr("Cancel"), QDialogButtonBox::RejectRole); + cancelButton->setProperty("secondary", true); + QPushButton* updateButton = + dialogButtons->addButton(tr("%1Update Gem").arg(updateAvaliable ? "" : tr("Force ")), QDialogButtonBox::ApplyRole); + + connect(cancelButton, &QPushButton::clicked, this, &QDialog::reject); + connect(updateButton, &QPushButton::clicked, this, &QDialog::accept); + } +} // namespace O3DE::ProjectManager diff --git a/Code/Tools/ProjectManager/Source/GemCatalog/GemUpdateDialog.h b/Code/Tools/ProjectManager/Source/GemCatalog/GemUpdateDialog.h new file mode 100644 index 0000000000..cf34abfb3d --- /dev/null +++ b/Code/Tools/ProjectManager/Source/GemCatalog/GemUpdateDialog.h @@ -0,0 +1,25 @@ +/* + * Copyright (c) Contributors to the Open 3D Engine Project. + * For complete copyright and license terms please see the LICENSE at the root of this distribution. + * + * SPDX-License-Identifier: Apache-2.0 OR MIT + * + */ + +#pragma once + +#if !defined(Q_MOC_RUN) +#include +#endif + +namespace O3DE::ProjectManager +{ + class GemUpdateDialog + : public QDialog + { + Q_OBJECT // AUTOMOC + public : + explicit GemUpdateDialog(const QString& gemName, bool updateAvaliable = true, QWidget* parent = nullptr); + ~GemUpdateDialog() = default; + }; +} // namespace O3DE::ProjectManager diff --git a/Code/Tools/ProjectManager/Source/GemRepo/GemRepoInfo.h b/Code/Tools/ProjectManager/Source/GemRepo/GemRepoInfo.h index f1d1c2a8a2..c22511faad 100644 --- a/Code/Tools/ProjectManager/Source/GemRepo/GemRepoInfo.h +++ b/Code/Tools/ProjectManager/Source/GemRepo/GemRepoInfo.h @@ -37,7 +37,7 @@ namespace O3DE::ProjectManager QString m_additionalInfo = ""; QString m_directoryLink = ""; QString m_repoUri = ""; - QStringList m_includedGemPaths = {}; + QStringList m_includedGemUris = {}; QDateTime m_lastUpdated; }; } // namespace O3DE::ProjectManager diff --git a/Code/Tools/ProjectManager/Source/GemRepo/GemRepoInspector.cpp b/Code/Tools/ProjectManager/Source/GemRepo/GemRepoInspector.cpp index d065ab59f8..24a3e58ea2 100644 --- a/Code/Tools/ProjectManager/Source/GemRepo/GemRepoInspector.cpp +++ b/Code/Tools/ProjectManager/Source/GemRepo/GemRepoInspector.cpp @@ -8,6 +8,7 @@ #include #include +#include #include #include @@ -60,8 +61,10 @@ namespace O3DE::ProjectManager // Repo name and url link m_nameLabel->setText(m_model->GetName(modelIndex)); - m_repoLinkLabel->setText(m_model->GetRepoUri(modelIndex)); - m_repoLinkLabel->SetUrl(m_model->GetRepoUri(modelIndex)); + + const QString repoUri = m_model->GetRepoUri(modelIndex); + m_repoLinkLabel->setText(repoUri); + m_repoLinkLabel->SetUrl(repoUri); // Repo summary m_summaryLabel->setText(m_model->GetSummary(modelIndex)); @@ -86,7 +89,7 @@ namespace O3DE::ProjectManager } // Included Gems - m_includedGems->Update(tr("Included Gems"), "", m_model->GetIncludedGemNames(modelIndex)); + m_includedGems->Update(tr("Included Gems"), "", m_model->GetIncludedGemTags(modelIndex)); m_mainWidget->adjustSize(); m_mainWidget->show(); @@ -99,7 +102,7 @@ namespace O3DE::ProjectManager m_nameLabel->setObjectName("gemRepoInspectorNameLabel"); m_mainLayout->addWidget(m_nameLabel); - m_repoLinkLabel = new LinkLabel(tr("Repo Url"), QUrl(""), 12, this); + m_repoLinkLabel = new LinkLabel(tr("Repo Url"), QUrl(), 12, this); m_mainLayout->addWidget(m_repoLinkLabel); m_mainLayout->addSpacing(5); diff --git a/Code/Tools/ProjectManager/Source/GemRepo/GemRepoModel.cpp b/Code/Tools/ProjectManager/Source/GemRepo/GemRepoModel.cpp index 7a9617e6c1..436f84019a 100644 --- a/Code/Tools/ProjectManager/Source/GemRepo/GemRepoModel.cpp +++ b/Code/Tools/ProjectManager/Source/GemRepo/GemRepoModel.cpp @@ -41,7 +41,7 @@ namespace O3DE::ProjectManager item->setData(gemRepoInfo.m_lastUpdated, RoleLastUpdated); item->setData(gemRepoInfo.m_path, RolePath); item->setData(gemRepoInfo.m_additionalInfo, RoleAdditionalInfo); - item->setData(gemRepoInfo.m_includedGemPaths, RoleIncludedGems); + item->setData(gemRepoInfo.m_includedGemUris, RoleIncludedGems); appendRow(item); @@ -98,43 +98,39 @@ namespace O3DE::ProjectManager return modelIndex.data(RolePath).toString(); } - QStringList GemRepoModel::GetIncludedGemPaths(const QModelIndex& modelIndex) + QStringList GemRepoModel::GetIncludedGemUris(const QModelIndex& modelIndex) { return modelIndex.data(RoleIncludedGems).toStringList(); } - QStringList GemRepoModel::GetIncludedGemNames(const QModelIndex& modelIndex) + QVector GemRepoModel::GetIncludedGemTags(const QModelIndex& modelIndex) { - QStringList gemNames; - QVector gemInfos = GetIncludedGemInfos(modelIndex); - + QVector tags; + const QVector& gemInfos = GetIncludedGemInfos(modelIndex); + tags.reserve(gemInfos.size()); for (const GemInfo& gemInfo : gemInfos) { - gemNames.append(gemInfo.m_displayName); + tags.append({ gemInfo.m_displayName, gemInfo.m_name }); } - return gemNames; + return tags; } QVector GemRepoModel::GetIncludedGemInfos(const QModelIndex& modelIndex) { - QVector allGemInfos; - QStringList repoGemPaths = GetIncludedGemPaths(modelIndex); + QString repoUri = GetRepoUri(modelIndex); - for (const QString& gemPath : repoGemPaths) + const AZ::Outcome, AZStd::string>& gemInfosResult = PythonBindingsInterface::Get()->GetGemInfosForRepo(repoUri); + if (gemInfosResult.IsSuccess()) { - AZ::Outcome gemInfoResult = PythonBindingsInterface::Get()->GetGemInfo(gemPath); - if (gemInfoResult.IsSuccess()) - { - allGemInfos.append(gemInfoResult.GetValue()); - } - else - { - QMessageBox::critical(nullptr, tr("Gem Not Found"), tr("Cannot find info for gem %1.").arg(gemPath)); - } + return gemInfosResult.GetValue(); + } + else + { + QMessageBox::critical(nullptr, tr("Gems not found"), tr("Cannot find info for gems from repo %1").arg(GetName(modelIndex))); } - return allGemInfos; + return QVector(); } bool GemRepoModel::IsEnabled(const QModelIndex& modelIndex) diff --git a/Code/Tools/ProjectManager/Source/GemRepo/GemRepoModel.h b/Code/Tools/ProjectManager/Source/GemRepo/GemRepoModel.h index f36b66ca48..68991a0509 100644 --- a/Code/Tools/ProjectManager/Source/GemRepo/GemRepoModel.h +++ b/Code/Tools/ProjectManager/Source/GemRepo/GemRepoModel.h @@ -39,8 +39,8 @@ namespace O3DE::ProjectManager static QDateTime GetLastUpdated(const QModelIndex& modelIndex); static QString GetPath(const QModelIndex& modelIndex); - static QStringList GetIncludedGemPaths(const QModelIndex& modelIndex); - static QStringList GetIncludedGemNames(const QModelIndex& modelIndex); + static QStringList GetIncludedGemUris(const QModelIndex& modelIndex); + static QVector GetIncludedGemTags(const QModelIndex& modelIndex); static QVector GetIncludedGemInfos(const QModelIndex& modelIndex); static bool IsEnabled(const QModelIndex& modelIndex); diff --git a/Code/Tools/ProjectManager/Source/GemRepo/GemRepoScreen.cpp b/Code/Tools/ProjectManager/Source/GemRepo/GemRepoScreen.cpp index 0ddfe41434..843538d9da 100644 --- a/Code/Tools/ProjectManager/Source/GemRepo/GemRepoScreen.cpp +++ b/Code/Tools/ProjectManager/Source/GemRepo/GemRepoScreen.cpp @@ -14,6 +14,7 @@ #include #include #include +#include #include #include @@ -52,6 +53,11 @@ namespace O3DE::ProjectManager Reinit(); } + void GemRepoScreen::NotifyCurrentScreen() + { + Reinit(); + } + void GemRepoScreen::Reinit() { m_gemRepoModel->clear(); @@ -70,7 +76,7 @@ namespace O3DE::ProjectManager // Select the first entry after everything got correctly sized QTimer::singleShot(200, [=]{ QModelIndex firstModelIndex = m_gemRepoListView->model()->index(0,0); - m_gemRepoListView->selectionModel()->select(firstModelIndex, QItemSelectionModel::ClearAndSelect); + m_gemRepoListView->selectionModel()->setCurrentIndex(firstModelIndex, QItemSelectionModel::ClearAndSelect); }); } @@ -87,16 +93,17 @@ namespace O3DE::ProjectManager return; } - bool addGemRepoResult = PythonBindingsInterface::Get()->AddGemRepo(repoUri); - if (addGemRepoResult) + auto addGemRepoResult = PythonBindingsInterface::Get()->AddGemRepo(repoUri); + if (addGemRepoResult.IsSuccess()) { Reinit(); + emit OnRefresh(); } else { QString failureMessage = tr("Failed to add gem repo: %1.").arg(repoUri); - QMessageBox::critical(this, tr("Operation failed"), failureMessage); - AZ_Error("Project Manger", false, failureMessage.toUtf8()); + ProjectUtils::DisplayDetailedError(failureMessage, addGemRepoResult, this); + AZ_Error("Project Manager", false, failureMessage.toUtf8()); } } } @@ -116,6 +123,7 @@ namespace O3DE::ProjectManager if (removeGemRepoResult) { Reinit(); + emit OnRefresh(); } else { @@ -130,6 +138,7 @@ namespace O3DE::ProjectManager { bool refreshResult = PythonBindingsInterface::Get()->RefreshAllGemRepos(); Reinit(); + emit OnRefresh(); if (!refreshResult) { @@ -146,6 +155,7 @@ namespace O3DE::ProjectManager if (refreshResult.IsSuccess()) { Reinit(); + emit OnRefresh(); } else { diff --git a/Code/Tools/ProjectManager/Source/GemRepo/GemRepoScreen.h b/Code/Tools/ProjectManager/Source/GemRepo/GemRepoScreen.h index 46a733362a..eed9a5ec4a 100644 --- a/Code/Tools/ProjectManager/Source/GemRepo/GemRepoScreen.h +++ b/Code/Tools/ProjectManager/Source/GemRepo/GemRepoScreen.h @@ -28,6 +28,7 @@ namespace O3DE::ProjectManager class GemRepoScreen : public ScreenWidget { + Q_OBJECT public: explicit GemRepoScreen(QWidget* parent = nullptr); ~GemRepoScreen() = default; @@ -37,12 +38,18 @@ namespace O3DE::ProjectManager GemRepoModel* GetGemRepoModel() const { return m_gemRepoModel; } + void NotifyCurrentScreen() override; + + signals: + void OnRefresh(); + public slots: void HandleAddRepoButton(); void HandleRemoveRepoButton(const QModelIndex& modelIndex); void HandleRefreshAllButton(); void HandleRefreshRepoButton(const QModelIndex& modelIndex); + private: void FillModel(); QFrame* CreateNoReposContent(); diff --git a/Code/Tools/ProjectManager/Source/GemsSubWidget.cpp b/Code/Tools/ProjectManager/Source/GemsSubWidget.cpp index eb24008eb1..2572a39db3 100644 --- a/Code/Tools/ProjectManager/Source/GemsSubWidget.cpp +++ b/Code/Tools/ProjectManager/Source/GemsSubWidget.cpp @@ -33,13 +33,14 @@ namespace O3DE::ProjectManager m_layout->addWidget(m_textLabel); m_tagWidget = new TagContainerWidget(); + connect(m_tagWidget, &TagContainerWidget::TagClicked, this, [=](const Tag& tag){ emit TagClicked(tag); }); m_layout->addWidget(m_tagWidget); } - void GemsSubWidget::Update(const QString& title, const QString& text, const QStringList& gemNames) + void GemsSubWidget::Update(const QString& title, const QString& text, const QVector& tags) { m_titleLabel->setText(title); m_textLabel->setText(text); - m_tagWidget->Update(gemNames); + m_tagWidget->Update(tags); } } // namespace O3DE::ProjectManager diff --git a/Code/Tools/ProjectManager/Source/GemsSubWidget.h b/Code/Tools/ProjectManager/Source/GemsSubWidget.h index 1b10ec8861..5e670b930a 100644 --- a/Code/Tools/ProjectManager/Source/GemsSubWidget.h +++ b/Code/Tools/ProjectManager/Source/GemsSubWidget.h @@ -22,9 +22,14 @@ namespace O3DE::ProjectManager class GemsSubWidget : public QWidget { + Q_OBJECT // AUTOMOC + public: GemsSubWidget(QWidget* parent = nullptr); - void Update(const QString& title, const QString& text, const QStringList& gemNames); + void Update(const QString& title, const QString& text, const QVector& tags); + + signals: + void TagClicked(const Tag& tag); private: QLabel* m_titleLabel = nullptr; diff --git a/Code/Tools/ProjectManager/Source/LinkWidget.cpp b/Code/Tools/ProjectManager/Source/LinkWidget.cpp index 9c8c78ed37..bdafec24d8 100644 --- a/Code/Tools/ProjectManager/Source/LinkWidget.cpp +++ b/Code/Tools/ProjectManager/Source/LinkWidget.cpp @@ -7,6 +7,9 @@ */ #include +#include +#include + #include #include #include @@ -26,7 +29,23 @@ namespace O3DE::ProjectManager { if (m_url.isValid()) { - QDesktopServices::openUrl(m_url); + // Check if user request not to be shown external link warning dialog + bool skipDialog = false; + SettingsInterface::Get()->Get(skipDialog, ISettings::ExternalLinkWarningKey); + + if (!skipDialog) + { + // Style does not apply if LinkLabel is parent so use parentWidget as parent instead + ExternalLinkDialog* linkDialog = new ExternalLinkDialog(m_url.toString(), parentWidget()); + if (linkDialog->exec() == QDialog::Accepted) + { + QDesktopServices::openUrl(m_url); + } + } + else + { + QDesktopServices::openUrl(m_url); + } } emit clicked(); diff --git a/Code/Tools/ProjectManager/Source/NewProjectSettingsScreen.cpp b/Code/Tools/ProjectManager/Source/NewProjectSettingsScreen.cpp index 4febb65782..f1f56993ca 100644 --- a/Code/Tools/ProjectManager/Source/NewProjectSettingsScreen.cpp +++ b/Code/Tools/ProjectManager/Source/NewProjectSettingsScreen.cpp @@ -16,6 +16,8 @@ #include #include #include + +#include #include #include @@ -225,7 +227,7 @@ namespace O3DE::ProjectManager moreGemsLabel->setObjectName("moreGems"); templateDetailsLayout->addWidget(moreGemsLabel); - QLabel* browseCatalogLabel = new QLabel(tr("Browse the Gems Catalog to further customize your project."), this); + QLabel* browseCatalogLabel = new QLabel(tr("Browse the Gems Catalog to further customize your project."), this); browseCatalogLabel->setObjectName("browseCatalog"); browseCatalogLabel->setWordWrap(true); templateDetailsLayout->addWidget(browseCatalogLabel); diff --git a/Code/Tools/ProjectManager/Source/ProjectBuilderController.cpp b/Code/Tools/ProjectManager/Source/ProjectBuilderController.cpp index 7981e9d758..e2c54f622d 100644 --- a/Code/Tools/ProjectManager/Source/ProjectBuilderController.cpp +++ b/Code/Tools/ProjectManager/Source/ProjectBuilderController.cpp @@ -9,12 +9,12 @@ #include #include #include +#include #include #include #include - namespace O3DE::ProjectManager { ProjectBuilderController::ProjectBuilderController(const ProjectInfo& projectInfo, ProjectButton* projectButton, QWidget* parent) @@ -27,6 +27,9 @@ namespace O3DE::ProjectManager m_worker = new ProjectBuilderWorker(m_projectInfo); m_worker->moveToThread(&m_workerThread); + // Remove key here in case Project Manager crashed while building because that causes HandleResults to not be called + SettingsInterface::Get()->SetProjectBuiltSuccessfully(m_projectInfo, false); + connect(&m_workerThread, &QThread::finished, m_worker, &ProjectBuilderWorker::deleteLater); connect(&m_workerThread, &QThread::started, m_worker, &ProjectBuilderWorker::BuildProject); connect(m_worker, &ProjectBuilderWorker::Done, this, &ProjectBuilderController::HandleResults); @@ -109,12 +112,16 @@ namespace O3DE::ProjectManager emit NotifyBuildProject(m_projectInfo); } + SettingsInterface::Get()->SetProjectBuiltSuccessfully(m_projectInfo, false); + emit Done(false); return; } else { m_projectInfo.m_buildFailed = false; + + SettingsInterface::Get()->SetProjectBuiltSuccessfully(m_projectInfo, true); } emit Done(true); diff --git a/Code/Tools/ProjectManager/Source/ProjectBuilderWorker.cpp b/Code/Tools/ProjectManager/Source/ProjectBuilderWorker.cpp index c6a6b20a1d..7ec691fd81 100644 --- a/Code/Tools/ProjectManager/Source/ProjectBuilderWorker.cpp +++ b/Code/Tools/ProjectManager/Source/ProjectBuilderWorker.cpp @@ -117,18 +117,16 @@ namespace O3DE::ProjectManager // Show some kind of progress with very approximate estimates UpdateProgress(++m_progressEstimate); - auto currentEnvironmentRequest = ProjectUtils::GetCommandLineProcessEnvironment(); + auto currentEnvironmentRequest = ProjectUtils::SetupCommandLineProcessEnvironment(); if (!currentEnvironmentRequest.IsSuccess()) { QStringToAZTracePrint(currentEnvironmentRequest.GetError()); return AZ::Failure(currentEnvironmentRequest.GetError()); } - QProcessEnvironment currentEnvironment = currentEnvironmentRequest.GetValue(); m_configProjectProcess = new QProcess(this); m_configProjectProcess->setProcessChannelMode(QProcess::MergedChannels); m_configProjectProcess->setWorkingDirectory(m_projectInfo.m_path); - m_configProjectProcess->setProcessEnvironment(currentEnvironment); auto cmakeGenerateArgumentsResult = ConstructCmakeGenerateProjectArguments(engineInfo.m_thirdPartyPath); if (!cmakeGenerateArgumentsResult.IsSuccess()) @@ -181,7 +179,6 @@ namespace O3DE::ProjectManager m_buildProjectProcess = new QProcess(this); m_buildProjectProcess->setProcessChannelMode(QProcess::MergedChannels); m_buildProjectProcess->setWorkingDirectory(m_projectInfo.m_path); - m_buildProjectProcess->setProcessEnvironment(currentEnvironment); auto cmakeBuildArgumentsResult = ConstructCmakeBuildCommandArguments(); if (!cmakeBuildArgumentsResult.IsSuccess()) diff --git a/Code/Tools/ProjectManager/Source/ProjectButtonWidget.cpp b/Code/Tools/ProjectManager/Source/ProjectButtonWidget.cpp index c425c344e1..39980e1d11 100644 --- a/Code/Tools/ProjectManager/Source/ProjectButtonWidget.cpp +++ b/Code/Tools/ProjectManager/Source/ProjectButtonWidget.cpp @@ -8,7 +8,11 @@ #include #include +#include +#include #include +#include +#include #include #include @@ -23,6 +27,8 @@ #include #include #include +#include +#include namespace O3DE::ProjectManager { @@ -104,11 +110,11 @@ namespace O3DE::ProjectManager vLayout->addWidget(m_progressBar); } - void LabelButton::mousePressEvent([[maybe_unused]] QMouseEvent* event) + void LabelButton::mousePressEvent(QMouseEvent* event) { if(m_enabled) { - emit triggered(); + emit triggered(event); } } @@ -196,30 +202,64 @@ namespace O3DE::ProjectManager projectNameLabel->setToolTip(m_projectInfo.m_path); hLayout->addWidget(projectNameLabel); - QMenu* menu = new QMenu(this); - menu->addAction(tr("Edit Project Settings..."), this, [this]() { emit EditProject(m_projectInfo.m_path); }); - menu->addAction(tr("Build"), this, [this]() { emit BuildProject(m_projectInfo); }); - menu->addAction(tr("Open CMake GUI..."), this, [this]() { emit OpenCMakeGUI(m_projectInfo); }); - menu->addSeparator(); - menu->addAction(tr("Open Project folder..."), this, [this]() - { - AzQtComponents::ShowFileOnDesktop(m_projectInfo.m_path); - }); - menu->addSeparator(); - menu->addAction(tr("Duplicate"), this, [this]() { emit CopyProject(m_projectInfo); }); - menu->addSeparator(); - menu->addAction(tr("Remove from O3DE"), this, [this]() { emit RemoveProject(m_projectInfo.m_path); }); - menu->addAction(tr("Delete this Project"), this, [this]() { emit DeleteProject(m_projectInfo.m_path); }); - m_projectMenuButton = new QPushButton(this); m_projectMenuButton->setObjectName("projectMenuButton"); - m_projectMenuButton->setMenu(menu); + m_projectMenuButton->setMenu(CreateProjectMenu()); hLayout->addWidget(m_projectMenuButton); } vLayout->addWidget(projectFooter); connect(m_projectImageLabel->GetOpenEditorButton(), &QPushButton::clicked, [this](){ emit OpenProject(m_projectInfo.m_path); }); + connect(m_projectImageLabel, &LabelButton::triggered, [this](QMouseEvent* event) { + if (event->button() == Qt::RightButton) + { + m_projectMenuButton->menu()->move(event->globalPos()); + m_projectMenuButton->menu()->show(); + } + }); + } + + QMenu* ProjectButton::CreateProjectMenu() + { + QMenu* menu = new QMenu(this); + menu->addAction(tr("Edit Project Settings..."), this, [this]() { emit EditProject(m_projectInfo.m_path); }); + menu->addAction(tr("Configure Gems..."), this, [this]() { emit EditProjectGems(m_projectInfo.m_path); }); + menu->addAction(tr("Build"), this, [this]() { emit BuildProject(m_projectInfo); }); + menu->addAction(tr("Open CMake GUI..."), this, [this]() { emit OpenCMakeGUI(m_projectInfo); }); + menu->addSeparator(); + menu->addAction(tr("Open Project folder..."), this, [this]() + { + AzQtComponents::ShowFileOnDesktop(m_projectInfo.m_path); + }); + +#if AZ_TRAIT_PROJECT_MANAGER_CREATE_DESKTOP_SHORTCUT + menu->addAction(tr("Create Editor desktop shortcut..."), this, [this]() + { + AZ::IO::FixedMaxPath editorExecutablePath = ProjectUtils::GetEditorExecutablePath(m_projectInfo.m_path.toUtf8().constData()); + + const QString shortcutName = QString("%1 Editor").arg(m_projectInfo.m_displayName); + const QString arg = QString("--regset=\"/Amazon/AzCore/Bootstrap/project_path=%1\"").arg(m_projectInfo.m_path); + + auto result = ProjectUtils::CreateDesktopShortcut(shortcutName, editorExecutablePath.c_str(), { arg }); + if(result.IsSuccess()) + { + QMessageBox::information(this, tr("Desktop Shortcut Created"), result.GetValue()); + } + else + { + QMessageBox::critical(this, tr("Failed to create shortcut"), result.GetError()); + } + }); +#endif // AZ_TRAIT_PROJECT_MANAGER_CREATE_DESKTOP_SHORTCUT + + menu->addSeparator(); + menu->addAction(tr("Duplicate"), this, [this]() { emit CopyProject(m_projectInfo); }); + menu->addSeparator(); + menu->addAction(tr("Remove from O3DE"), this, [this]() { emit RemoveProject(m_projectInfo.m_path); }); + menu->addAction(tr("Delete this Project"), this, [this]() { emit DeleteProject(m_projectInfo.m_path); }); + + return menu; } const ProjectInfo& ProjectButton::GetProjectInfo() const diff --git a/Code/Tools/ProjectManager/Source/ProjectButtonWidget.h b/Code/Tools/ProjectManager/Source/ProjectButtonWidget.h index 5e81dfc2d9..358c1f249a 100644 --- a/Code/Tools/ProjectManager/Source/ProjectButtonWidget.h +++ b/Code/Tools/ProjectManager/Source/ProjectButtonWidget.h @@ -24,6 +24,7 @@ QT_FORWARD_DECLARE_CLASS(QProgressBar) QT_FORWARD_DECLARE_CLASS(QLayout) QT_FORWARD_DECLARE_CLASS(QVBoxLayout) QT_FORWARD_DECLARE_CLASS(QEvent) +QT_FORWARD_DECLARE_CLASS(QMenu) namespace O3DE::ProjectManager { @@ -49,7 +50,7 @@ namespace O3DE::ProjectManager QLayout* GetBuildOverlayLayout(); signals: - void triggered(); + void triggered(QMouseEvent* event); public slots: void mousePressEvent(QMouseEvent* event) override; @@ -95,6 +96,7 @@ namespace O3DE::ProjectManager signals: void OpenProject(const QString& projectName); void EditProject(const QString& projectName); + void EditProjectGems(const QString& projectName); void CopyProject(const ProjectInfo& projectInfo); void RemoveProject(const QString& projectName); void DeleteProject(const QString& projectName); @@ -107,6 +109,8 @@ namespace O3DE::ProjectManager void ShowWarning(bool show, const QString& warning); void ShowDefaultBuildButton(); + QMenu* CreateProjectMenu(); + ProjectInfo m_projectInfo; LabelButton* m_projectImageLabel = nullptr; diff --git a/Code/Tools/ProjectManager/Source/ProjectInfo.cpp b/Code/Tools/ProjectManager/Source/ProjectInfo.cpp index b4a1e84831..0d19fff74a 100644 --- a/Code/Tools/ProjectManager/Source/ProjectInfo.cpp +++ b/Code/Tools/ProjectManager/Source/ProjectInfo.cpp @@ -9,14 +9,13 @@ #include #include -#include - namespace O3DE::ProjectManager { ProjectInfo::ProjectInfo( const QString& path, const QString& projectName, const QString& displayName, + const QString& id, const QString& origin, const QString& summary, const QString& iconPath, @@ -26,6 +25,7 @@ namespace O3DE::ProjectManager : m_path(path) , m_projectName(projectName) , m_displayName(displayName) + , m_id(id) , m_origin(origin) , m_summary(summary) , m_iconPath(iconPath) @@ -49,6 +49,10 @@ namespace O3DE::ProjectManager { return false; } + if (m_id != rhs.m_id) + { + return false; + } if (m_origin != rhs.m_origin) { return false; @@ -80,7 +84,7 @@ namespace O3DE::ProjectManager bool ProjectInfo::IsValid() const { - return !m_path.isEmpty() && !m_projectName.isEmpty(); + return !m_path.isEmpty() && !m_projectName.isEmpty() && !m_id.isEmpty(); } const QString& ProjectInfo::GetProjectDisplayName() const diff --git a/Code/Tools/ProjectManager/Source/ProjectInfo.h b/Code/Tools/ProjectManager/Source/ProjectInfo.h index 2ce1e8c491..4dcb21aa24 100644 --- a/Code/Tools/ProjectManager/Source/ProjectInfo.h +++ b/Code/Tools/ProjectManager/Source/ProjectInfo.h @@ -9,7 +9,6 @@ #pragma once #if !defined(Q_MOC_RUN) -#include #include #include #include @@ -26,6 +25,7 @@ namespace O3DE::ProjectManager const QString& path, const QString& projectName, const QString& displayName, + const QString& id, const QString& origin, const QString& summary, const QString& iconPath, @@ -45,6 +45,7 @@ namespace O3DE::ProjectManager // From project.json QString m_projectName; QString m_displayName; + QString m_id; QString m_origin; QString m_summary; QString m_iconPath; diff --git a/Code/Tools/ProjectManager/Source/ProjectSettingsScreen.cpp b/Code/Tools/ProjectManager/Source/ProjectSettingsScreen.cpp index 88ae3d6319..45023d7f80 100644 --- a/Code/Tools/ProjectManager/Source/ProjectSettingsScreen.cpp +++ b/Code/Tools/ProjectManager/Source/ProjectSettingsScreen.cpp @@ -19,6 +19,7 @@ #include #include #include +#include namespace O3DE::ProjectManager { @@ -33,11 +34,23 @@ namespace O3DE::ProjectManager // if we don't set this in a frame (just use a sub-layout) all the content will align incorrectly horizontally QFrame* projectSettingsFrame = new QFrame(this); projectSettingsFrame->setObjectName("projectSettings"); - m_verticalLayout = new QVBoxLayout(); - // you cannot remove content margins in qss - m_verticalLayout->setContentsMargins(0, 0, 0, 0); + QVBoxLayout* vLayout = new QVBoxLayout(); + vLayout->setMargin(0); + vLayout->setAlignment(Qt::AlignTop); + projectSettingsFrame->setLayout(vLayout); + + QScrollArea* scrollArea = new QScrollArea(this); + scrollArea->setWidgetResizable(true); + vLayout->addWidget(scrollArea); + + QWidget* scrollWidget = new QWidget(this); + scrollArea->setWidget(scrollWidget); + + m_verticalLayout = new QVBoxLayout(); + m_verticalLayout->setMargin(0); m_verticalLayout->setAlignment(Qt::AlignTop); + scrollWidget->setLayout(m_verticalLayout); m_projectName = new FormLineEditWidget(tr("Project name"), "", this); connect(m_projectName->lineEdit(), &QLineEdit::textChanged, this, &ProjectSettingsScreen::OnProjectNameUpdated); @@ -136,7 +149,7 @@ namespace O3DE::ProjectManager void ProjectSettingsScreen::OnProjectPathUpdated() { - Validate(); + ValidateProjectName() && ValidateProjectPath(); } bool ProjectSettingsScreen::Validate() diff --git a/Code/Tools/ProjectManager/Source/ProjectUtils.cpp b/Code/Tools/ProjectManager/Source/ProjectUtils.cpp index bb2bcd070e..209140a004 100644 --- a/Code/Tools/ProjectManager/Source/ProjectUtils.cpp +++ b/Code/Tools/ProjectManager/Source/ProjectUtils.cpp @@ -520,12 +520,10 @@ namespace O3DE::ProjectManager AZ::Outcome ExecuteCommandResultModalDialog( const QString& cmd, const QStringList& arguments, - const QProcessEnvironment& processEnv, const QString& title) { QString resultOutput; QProcess execProcess; - execProcess.setProcessEnvironment(processEnv); execProcess.setProcessChannelMode(QProcess::MergedChannels); QProgressDialog dialog(title, QObject::tr("Cancel"), /*minimum=*/0, /*maximum=*/0); @@ -611,11 +609,9 @@ namespace O3DE::ProjectManager AZ::Outcome ExecuteCommandResult( const QString& cmd, const QStringList& arguments, - const QProcessEnvironment& processEnv, int commandTimeoutSeconds /*= ProjectCommandLineTimeoutSeconds*/) { QProcess execProcess; - execProcess.setProcessEnvironment(processEnv); execProcess.setProcessChannelMode(QProcess::MergedChannels); execProcess.start(cmd, arguments); if (!execProcess.waitForStarted()) @@ -628,11 +624,11 @@ namespace O3DE::ProjectManager return AZ::Failure(QObject::tr("Process for command '%1' timed out at %2 seconds").arg(cmd).arg(commandTimeoutSeconds)); } int resultCode = execProcess.exitCode(); + QString resultOutput = execProcess.readAllStandardOutput(); if (resultCode != 0) { - return AZ::Failure(QObject::tr("Process for command '%1' failed (result code %2").arg(cmd).arg(resultCode)); + return AZ::Failure(QObject::tr("Process for command '%1' failed (result code %2) %3").arg(cmd).arg(resultCode).arg(resultOutput)); } - QString resultOutput = execProcess.readAllStandardOutput(); return AZ::Success(resultOutput); } @@ -663,5 +659,24 @@ namespace O3DE::ProjectManager return AZ::Success(QString(projectBuildPath.c_str())); } + void DisplayDetailedError(const QString& title, const AZ::Outcome>& outcome, QWidget* parent) + { + const AZStd::string& generalError = outcome.GetError().first; + const AZStd::string& detailedError = outcome.GetError().second; + + if (!detailedError.empty()) + { + QMessageBox errorDialog(parent); + errorDialog.setIcon(QMessageBox::Critical); + errorDialog.setWindowTitle(title); + errorDialog.setText(generalError.c_str()); + errorDialog.setDetailedText(detailedError.c_str()); + errorDialog.exec(); + } + else + { + QMessageBox::critical(parent, title, generalError.c_str()); + } + } } // namespace ProjectUtils } // namespace O3DE::ProjectManager diff --git a/Code/Tools/ProjectManager/Source/ProjectUtils.h b/Code/Tools/ProjectManager/Source/ProjectUtils.h index 1fdf76913e..8602ffa692 100644 --- a/Code/Tools/ProjectManager/Source/ProjectUtils.h +++ b/Code/Tools/ProjectManager/Source/ProjectUtils.h @@ -14,6 +14,7 @@ #include #include +#include #include namespace O3DE::ProjectManager @@ -46,7 +47,6 @@ namespace O3DE::ProjectManager AZ::Outcome ExecuteCommandResult( const QString& cmd, const QStringList& arguments, - const QProcessEnvironment& processEnv, int commandTimeoutSeconds = ProjectCommandLineTimeoutSeconds); /** @@ -60,14 +60,52 @@ namespace O3DE::ProjectManager AZ::Outcome ExecuteCommandResultModalDialog( const QString& cmd, const QStringList& arguments, - const QProcessEnvironment& processEnv, const QString& title); - AZ::Outcome GetCommandLineProcessEnvironment(); + AZ::Outcome SetupCommandLineProcessEnvironment(); AZ::Outcome GetProjectBuildPath(const QString& projectPath); AZ::Outcome OpenCMakeGUI(const QString& projectPath); AZ::Outcome RunGetPythonScript(const QString& enginePath); + /** + * Create a desktop shortcut. + * @param filename the name of the desktop shorcut file + * @param target the path to the target to run + * @param arguments the argument list to provide to the target + * @return AZ::Outcome with the command result on success + */ + AZ::Outcome CreateDesktopShortcut(const QString& filename, const QString& targetPath, const QStringList& arguments); + + /** + * Lookup the location of an Editor executable executable that can be used with the + * supplied project path + * First the method attempts to locate a build directory with the project path + * via querying the /user/Registry/Platform//build_path.setreg + * Once that is done a path is formed to locate the Editor executable within the that build + * directory. + * Two paths will checked for the existence of an Editor + * - "/bin/$/Editor" + * - "/bin//$/Editor" + * Where is the current platform the O3DE executable is running on and $ is the + * current build configuration the O3DE executable + * + * If neiether of the above paths contain an Editor application, then a path to the Editor + * is formed by combinding the O3DE executable directory with the filename of Editor + * - "/Editor" + * + * @param projectPath Path to the root of the project + * @return path of the Editor Executable if found or an empty path if not + */ + AZ::IO::FixedMaxPath GetEditorExecutablePath(const AZ::IO::PathView& projectPath); + + + /** + * Display a dialog with general and detailed sections for the given AZ::Outcome + * @param title Dialog title + * @param outcome The AZ::Outcome with general and detailed error messages + * @param parent Optional QWidget parent + */ + void DisplayDetailedError(const QString& title, const AZ::Outcome>& outcome, QWidget* parent = nullptr); } // namespace ProjectUtils } // namespace O3DE::ProjectManager diff --git a/Code/Tools/ProjectManager/Source/ProjectsScreen.cpp b/Code/Tools/ProjectManager/Source/ProjectsScreen.cpp index cf42da88fa..15a6f22d85 100644 --- a/Code/Tools/ProjectManager/Source/ProjectsScreen.cpp +++ b/Code/Tools/ProjectManager/Source/ProjectsScreen.cpp @@ -14,6 +14,7 @@ #include #include #include +#include #include #include @@ -181,6 +182,7 @@ namespace O3DE::ProjectManager connect(projectButton, &ProjectButton::OpenProject, this, &ProjectsScreen::HandleOpenProject); connect(projectButton, &ProjectButton::EditProject, this, &ProjectsScreen::HandleEditProject); + connect(projectButton, &ProjectButton::EditProjectGems, this, &ProjectsScreen::HandleEditProjectGems); connect(projectButton, &ProjectButton::CopyProject, this, &ProjectsScreen::HandleCopyProject); connect(projectButton, &ProjectButton::RemoveProject, this, &ProjectsScreen::HandleRemoveProject); connect(projectButton, &ProjectButton::DeleteProject, this, &ProjectsScreen::HandleDeleteProject); @@ -269,17 +271,33 @@ namespace O3DE::ProjectManager // Add any missing project buttons and restore buttons to default state for (const ProjectInfo& project : projectsVector) { + ProjectButton* currentButton = nullptr; if (!m_projectButtons.contains(QDir::toNativeSeparators(project.m_path))) { - m_projectButtons.insert(QDir::toNativeSeparators(project.m_path), CreateProjectButton(project)); + currentButton = CreateProjectButton(project); + m_projectButtons.insert(QDir::toNativeSeparators(project.m_path), currentButton); } else { auto projectButtonIter = m_projectButtons.find(QDir::toNativeSeparators(project.m_path)); if (projectButtonIter != m_projectButtons.end()) { - projectButtonIter.value()->RestoreDefaultState(); - m_projectsFlowLayout->addWidget(projectButtonIter.value()); + currentButton = projectButtonIter.value(); + currentButton->RestoreDefaultState(); + } + } + + // Check whether project manager has successfully built the project + if (currentButton) + { + m_projectsFlowLayout->addWidget(currentButton); + + bool projectBuiltSuccessfully = false; + SettingsInterface::Get()->GetProjectBuiltSuccessfully(projectBuiltSuccessfully, project); + + if (!projectBuiltSuccessfully) + { + currentButton->ShowBuildRequired(); } } } @@ -324,6 +342,7 @@ namespace O3DE::ProjectManager } m_stack->setCurrentWidget(m_projectsContent); + m_projectsFlowLayout->update(); } ProjectManagerScreen ProjectsScreen::GetScreenEnum() @@ -382,25 +401,32 @@ namespace O3DE::ProjectManager { if (ProjectUtils::AddProjectDialog(this)) { - ResetProjectsContent(); emit ChangeScreenRequest(ProjectManagerScreen::Projects); } } + void ProjectsScreen::HandleOpenProject(const QString& projectPath) { if (!projectPath.isEmpty()) { if (!WarnIfInBuildQueue(projectPath)) { - AZ::IO::FixedMaxPath executableDirectory = AZ::Utils::GetExecutableDirectory(); - AZStd::string executableFilename = "Editor"; - AZ::IO::FixedMaxPath editorExecutablePath = executableDirectory / (executableFilename + AZ_TRAIT_OS_EXECUTABLE_EXTENSION); - auto cmdPath = AZ::IO::FixedMaxPathString::format( - "%s -regset=\"/Amazon/AzCore/Bootstrap/project_path=%s\"", editorExecutablePath.c_str(), - projectPath.toStdString().c_str()); + AZ::IO::FixedMaxPath fixedProjectPath = projectPath.toUtf8().constData(); + AZ::IO::FixedMaxPath editorExecutablePath = ProjectUtils::GetEditorExecutablePath(fixedProjectPath); + if (editorExecutablePath.empty()) + { + AZ_Error("ProjectManager", false, "Failed to locate editor"); + QMessageBox::critical( + this, tr("Error"), tr("Failed to locate the Editor, please verify that it is built.")); + return; + } AzFramework::ProcessLauncher::ProcessLaunchInfo processLaunchInfo; - processLaunchInfo.m_commandlineParameters = cmdPath; + processLaunchInfo.m_commandlineParameters = AZStd::vector{ + editorExecutablePath.String(), + AZStd::string::format(R"(--regset="/Amazon/AzCore/Bootstrap/project_path=%s")", fixedProjectPath.c_str()) + }; + ; bool launchSucceeded = AzFramework::ProcessLauncher::LaunchUnwatchedProcess(processLaunchInfo); if (!launchSucceeded) { @@ -448,6 +474,14 @@ namespace O3DE::ProjectManager emit ChangeScreenRequest(ProjectManagerScreen::UpdateProject); } } + void ProjectsScreen::HandleEditProjectGems(const QString& projectPath) + { + if (!WarnIfInBuildQueue(projectPath)) + { + emit NotifyCurrentProject(projectPath); + emit ChangeScreenRequest(ProjectManagerScreen::GemCatalog); + } + } void ProjectsScreen::HandleCopyProject(const ProjectInfo& projectInfo) { if (!WarnIfInBuildQueue(projectInfo.m_path)) @@ -457,7 +491,6 @@ namespace O3DE::ProjectManager // Open file dialog and choose location for copied project then register copy with O3DE if (ProjectUtils::CopyProjectDialog(projectInfo.m_path, newProjectInfo, this)) { - ResetProjectsContent(); emit NotifyBuildProject(newProjectInfo); emit ChangeScreenRequest(ProjectManagerScreen::Projects); } @@ -470,7 +503,6 @@ namespace O3DE::ProjectManager // Unregister Project from O3DE and reload projects if (ProjectUtils::UnregisterProject(projectPath)) { - ResetProjectsContent(); emit ChangeScreenRequest(ProjectManagerScreen::Projects); } } diff --git a/Code/Tools/ProjectManager/Source/ProjectsScreen.h b/Code/Tools/ProjectManager/Source/ProjectsScreen.h index 859f8d0eae..c690621fb6 100644 --- a/Code/Tools/ProjectManager/Source/ProjectsScreen.h +++ b/Code/Tools/ProjectManager/Source/ProjectsScreen.h @@ -46,6 +46,7 @@ namespace O3DE::ProjectManager void HandleAddProjectButton(); void HandleOpenProject(const QString& projectPath); void HandleEditProject(const QString& projectPath); + void HandleEditProjectGems(const QString& projectPath); void HandleCopyProject(const ProjectInfo& projectInfo); void HandleRemoveProject(const QString& projectPath); void HandleDeleteProject(const QString& projectPath); diff --git a/Code/Tools/ProjectManager/Source/PythonBindings.cpp b/Code/Tools/ProjectManager/Source/PythonBindings.cpp index 740393fec0..35bdfe0031 100644 --- a/Code/Tools/ProjectManager/Source/PythonBindings.cpp +++ b/Code/Tools/ProjectManager/Source/PythonBindings.cpp @@ -23,6 +23,7 @@ #include #include #include +#include #include #include @@ -53,6 +54,8 @@ namespace Platform #define Py_To_String(obj) pybind11::str(obj).cast().c_str() #define Py_To_String_Optional(dict, key, default_string) dict.contains(key) ? Py_To_String(dict[key]) : default_string +#define Py_To_Int(obj) obj.cast() +#define Py_To_Int_Optional(dict, key, default_int) dict.contains(key) ? Py_To_Int(dict[key]) : default_int #define QString_To_Py_String(value) pybind11::str(value.toStdString()) #define QString_To_Py_Path(value) m_pathlib.attr("Path")(value.toStdString()) @@ -208,6 +211,16 @@ namespace RedirectOutput }); SetRedirection("stderr", g_redirect_stderr_saved, g_redirect_stderr, []([[maybe_unused]] const char* msg) { + AZStd::string lastPythonError = msg; + constexpr const char* pythonErrorPrefix = "ERROR:root:"; + constexpr size_t lengthOfErrorPrefix = AZStd::char_traits::length(pythonErrorPrefix); + auto errorPrefix = lastPythonError.find(pythonErrorPrefix); + if (errorPrefix != AZStd::string::npos) + { + lastPythonError.erase(errorPrefix, lengthOfErrorPrefix); + } + O3DE::ProjectManager::PythonBindingsInterface::Get()->AddErrorString(lastPythonError); + AZ_TracePrintf("Python", msg); }); @@ -299,6 +312,7 @@ namespace O3DE::ProjectManager m_register = pybind11::module::import("o3de.register"); m_manifest = pybind11::module::import("o3de.manifest"); m_engineTemplate = pybind11::module::import("o3de.engine_template"); + m_engineProperties = pybind11::module::import("o3de.engine_properties"); m_enableGemProject = pybind11::module::import("o3de.enable_gem"); m_disableGemProject = pybind11::module::import("o3de.disable_gem"); m_editProjectProperties = pybind11::module::import("o3de.project_properties"); @@ -306,9 +320,6 @@ namespace O3DE::ProjectManager m_repo = pybind11::module::import("o3de.repo"); m_pathlib = pybind11::module::import("pathlib"); - // make sure the engine is registered - RegisterThisEngine(); - m_pythonStarted = !PyErr_Occurred(); return m_pythonStarted; } @@ -333,36 +344,6 @@ namespace O3DE::ProjectManager return !PyErr_Occurred(); } - bool PythonBindings::RegisterThisEngine() - { - bool registrationResult = true; // already registered is considered successful - bool pythonResult = ExecuteWithLock( - [&] - { - // check current engine path against all other registered engines - // to see if we are already registered - auto allEngines = m_manifest.attr("get_engines")(); - if (pybind11::isinstance(allEngines)) - { - for (auto engine : allEngines) - { - AZ::IO::FixedMaxPath enginePath(Py_To_String(engine)); - if (enginePath.Compare(m_enginePath) == 0) - { - return; - } - } - } - - auto result = m_register.attr("register")(QString_To_Py_Path(QString(m_enginePath.c_str()))); - registrationResult = (result.cast() == 0); - }); - - bool finalResult = (registrationResult && pythonResult); - AZ_Assert(finalResult, "Registration of this engine failed!"); - return finalResult; - } - AZ::Outcome PythonBindings::ExecuteWithLockErrorHandling(AZStd::function executionCallback) { if (!Py_IsInitialized()) @@ -374,6 +355,8 @@ namespace O3DE::ProjectManager pybind11::gil_scoped_release release; pybind11::gil_scoped_acquire acquire; + ClearErrorStrings(); + try { executionCallback(); @@ -392,16 +375,22 @@ namespace O3DE::ProjectManager return ExecuteWithLockErrorHandling(executionCallback).IsSuccess(); } - AZ::Outcome PythonBindings::GetEngineInfo() + EngineInfo PythonBindings::EngineInfoFromPath(pybind11::handle enginePath) { EngineInfo engineInfo; - bool result = ExecuteWithLock([&] { - auto enginePath = m_manifest.attr("get_this_engine_path")(); + try + { + auto engineData = m_manifest.attr("get_engine_json_data")(pybind11::none(), enginePath); + if (pybind11::isinstance(engineData)) + { + engineInfo.m_version = Py_To_String_Optional(engineData, "O3DEVersion", "0.0.0.0"); + engineInfo.m_name = Py_To_String_Optional(engineData, "engine_name", "O3DE"); + engineInfo.m_path = Py_To_String(enginePath); + } auto o3deData = m_manifest.attr("load_o3de_manifest")(); if (pybind11::isinstance(o3deData)) { - engineInfo.m_path = Py_To_String(enginePath); auto defaultGemsFolder = m_manifest.attr("get_o3de_gems_folder")(); engineInfo.m_defaultGemsFolder = Py_To_String_Optional(o3deData, "default_gems_folder", Py_To_String(defaultGemsFolder)); @@ -418,19 +407,59 @@ namespace O3DE::ProjectManager engineInfo.m_thirdPartyPath = Py_To_String_Optional(o3deData, "default_third_party_folder", Py_To_String(defaultThirdPartyFolder)); } - auto engineData = m_manifest.attr("get_engine_json_data")(pybind11::none(), enginePath); - if (pybind11::isinstance(engineData)) + // check if engine path is registered + auto allEngines = m_manifest.attr("get_engines")(); + if (pybind11::isinstance(allEngines)) { - try + const AZ::IO::FixedMaxPath enginePathFixed(Py_To_String(enginePath)); + for (auto engine : allEngines) { - engineInfo.m_version = Py_To_String_Optional(engineData, "O3DEVersion", "0.0.0.0"); - engineInfo.m_name = Py_To_String_Optional(engineData, "engine_name", "O3DE"); - } - catch ([[maybe_unused]] const std::exception& e) - { - AZ_Warning("PythonBindings", false, "Failed to get EngineInfo from %s", Py_To_String(enginePath)); + AZ::IO::FixedMaxPath otherEnginePath(Py_To_String(engine)); + if (otherEnginePath.Compare(enginePathFixed) == 0) + { + engineInfo.m_registered = true; + break; + } } } + } + catch ([[maybe_unused]] const std::exception& e) + { + AZ_Warning("PythonBindings", false, "Failed to get EngineInfo from %s", Py_To_String(enginePath)); + } + return engineInfo; + } + + AZ::Outcome PythonBindings::GetEngineInfo() + { + EngineInfo engineInfo; + + bool result = ExecuteWithLock([&] { + auto enginePath = m_manifest.attr("get_this_engine_path")(); + engineInfo = EngineInfoFromPath(enginePath); + }); + + if (!result || !engineInfo.IsValid()) + { + return AZ::Failure(); + } + else + { + return AZ::Success(AZStd::move(engineInfo)); + } + } + + AZ::Outcome PythonBindings::GetEngineInfo(const QString& engineName) + { + EngineInfo engineInfo; + bool result = ExecuteWithLock([&] { + auto enginePathResult = m_manifest.attr("get_registered")(QString_To_Py_String(engineName)); + + // if a valid registered object is not found None is returned + if (!pybind11::isinstance(enginePathResult)) + { + engineInfo = EngineInfoFromPath(enginePathResult); + } }); if (!result || !engineInfo.IsValid()) @@ -443,10 +472,32 @@ namespace O3DE::ProjectManager } } - bool PythonBindings::SetEngineInfo(const EngineInfo& engineInfo) + IPythonBindings::DetailedOutcome PythonBindings::SetEngineInfo(const EngineInfo& engineInfo, bool force) { - bool result = ExecuteWithLock([&] { - auto registrationResult = m_register.attr("register")( + bool registrationSuccess = false; + bool pythonSuccess = ExecuteWithLock([&] { + + EngineInfo currentEngine = EngineInfoFromPath(QString_To_Py_Path(engineInfo.m_path)); + + // be kind to source control and avoid needlessly updating engine.json + if (currentEngine.IsValid() && + (currentEngine.m_name.compare(engineInfo.m_name) != 0 || currentEngine.m_version.compare(engineInfo.m_version) != 0)) + { + auto enginePropsResult = m_engineProperties.attr("edit_engine_props")( + QString_To_Py_Path(engineInfo.m_path), + pybind11::none(), // existing engine_name + QString_To_Py_String(engineInfo.m_name), + QString_To_Py_String(engineInfo.m_version) + ); + + if (enginePropsResult.cast() != 0) + { + // do not proceed with registration + return; + } + } + + auto result = m_register.attr("register")( QString_To_Py_Path(engineInfo.m_path), pybind11::none(), // project_path pybind11::none(), // gem_path @@ -459,16 +510,22 @@ namespace O3DE::ProjectManager QString_To_Py_Path(engineInfo.m_defaultGemsFolder), QString_To_Py_Path(engineInfo.m_defaultTemplatesFolder), pybind11::none(), // default_restricted_folder - QString_To_Py_Path(engineInfo.m_thirdPartyPath) - ); + QString_To_Py_Path(engineInfo.m_thirdPartyPath), + pybind11::none(), // external_subdir_engine_path + pybind11::none(), // external_subdir_project_path + false, // remove + force + ); - if (registrationResult.cast() != 0) - { - result = false; - } + registrationSuccess = result.cast() == 0; }); - return result; + if (pythonSuccess && registrationSuccess) + { + return AZ::Success(); + } + + return AZ::Failure(GetErrorPair()); } AZ::Outcome PythonBindings::GetGemInfo(const QString& path, const QString& projectPath) @@ -513,7 +570,11 @@ namespace O3DE::ProjectManager auto pyProjectPath = QString_To_Py_Path(projectPath); for (auto path : m_manifest.attr("get_all_gems")(pyProjectPath)) { - gems.push_back(GemInfoFromPath(path, pyProjectPath)); + GemInfo gemInfo = GemInfoFromPath(path, pyProjectPath); + // Mark as downloaded because this gem was registered with an existing directory + gemInfo.m_downloadStatus = GemInfo::DownloadStatus::Downloaded; + + gems.push_back(AZStd::move(gemInfo)); } }); if (!result.IsSuccess()) @@ -558,7 +619,7 @@ namespace O3DE::ProjectManager return AZ::Success(AZStd::move(gemNames)); } - AZ::Outcome PythonBindings::RegisterGem(const QString& gemPath, const QString& projectPath) + AZ::Outcome PythonBindings::GemRegistration(const QString& gemPath, const QString& projectPath, bool remove) { bool registrationResult = false; auto result = ExecuteWithLockErrorHandling( @@ -580,7 +641,8 @@ namespace O3DE::ProjectManager pybind11::none(), // default_restricted_folder pybind11::none(), // default_third_party_folder pybind11::none(), // external_subdir_engine_path - externalProjectPath // external_subdir_project_path + externalProjectPath, // external_subdir_project_path + remove // remove ); // Returns an exit code so boolify it then invert result @@ -593,12 +655,23 @@ namespace O3DE::ProjectManager } else if (!registrationResult) { - return AZ::Failure(AZStd::string::format("Failed to register gem path %s", gemPath.toUtf8().constData())); + return AZ::Failure(AZStd::string::format( + "Failed to %s gem path %s", remove ? "unregister" : "register", gemPath.toUtf8().constData())); } return AZ::Success(); } + AZ::Outcome PythonBindings::RegisterGem(const QString& gemPath, const QString& projectPath) + { + return GemRegistration(gemPath, projectPath); + } + + AZ::Outcome PythonBindings::UnregisterGem(const QString& gemPath, const QString& projectPath) + { + return GemRegistration(gemPath, projectPath, /*remove*/true); + } + bool PythonBindings::AddProject(const QString& path) { bool registrationResult = false; @@ -656,9 +729,9 @@ namespace O3DE::ProjectManager auto createProjectResult = m_engineTemplate.attr("create_project")( projectPath, - QString_To_Py_String(projectInfo.m_projectName), - QString_To_Py_Path(projectTemplatePath) - ); + QString_To_Py_String(projectInfo.m_projectName), // project_path + QString_To_Py_Path(projectTemplatePath) // template_path + ); if (createProjectResult.cast() == 0) { createdProjectInfo = ProjectInfoFromPath(projectPath); @@ -705,10 +778,15 @@ namespace O3DE::ProjectManager // optional gemInfo.m_displayName = Py_To_String_Optional(data, "display_name", gemInfo.m_name); gemInfo.m_summary = Py_To_String_Optional(data, "summary", ""); - gemInfo.m_version = ""; + gemInfo.m_version = Py_To_String_Optional(data, "version", gemInfo.m_version); + gemInfo.m_lastUpdatedDate = Py_To_String_Optional(data, "last_updated", gemInfo.m_lastUpdatedDate); + gemInfo.m_binarySizeInKB = Py_To_Int_Optional(data, "binary_size", gemInfo.m_binarySizeInKB); gemInfo.m_requirement = Py_To_String_Optional(data, "requirements", ""); gemInfo.m_creator = Py_To_String_Optional(data, "origin", ""); gemInfo.m_documentationLink = Py_To_String_Optional(data, "documentation_url", ""); + gemInfo.m_licenseText = Py_To_String_Optional(data, "license", "Unspecified License"); + gemInfo.m_licenseLink = Py_To_String_Optional(data, "license_url", ""); + gemInfo.m_repoUri = Py_To_String_Optional(data, "repo_uri", ""); if (gemInfo.m_creator.contains("Open 3D Engine")) { @@ -722,6 +800,11 @@ namespace O3DE::ProjectManager { gemInfo.m_gemOrigin = GemInfo::GemOrigin::Remote; } + // If no origin was provided this cannot be remote and would be specified if O3DE so it should be local + else + { + gemInfo.m_gemOrigin = GemInfo::GemOrigin::Local; + } // As long Base Open3DEngine gems are installed before first startup non-remote gems will be downloaded if (gemInfo.m_gemOrigin != GemInfo::GemOrigin::Remote) @@ -781,6 +864,7 @@ namespace O3DE::ProjectManager { projectInfo.m_projectName = Py_To_String(projectData["project_name"]); projectInfo.m_displayName = Py_To_String_Optional(projectData, "display_name", projectInfo.m_projectName); + projectInfo.m_id = Py_To_String_Optional(projectData, "project_id", projectInfo.m_id); projectInfo.m_origin = Py_To_String_Optional(projectData, "origin", projectInfo.m_origin); projectInfo.m_summary = Py_To_String_Optional(projectData, "summary", projectInfo.m_summary); projectInfo.m_iconPath = Py_To_String_Optional(projectData, "icon", ProjectPreviewImagePath); @@ -885,6 +969,7 @@ namespace O3DE::ProjectManager QString_To_Py_Path(projectInfo.m_path), pybind11::none(), // proj_name not used QString_To_Py_String(projectInfo.m_projectName), + QString_To_Py_String(projectInfo.m_id), QString_To_Py_String(projectInfo.m_origin), QString_To_Py_String(projectInfo.m_displayName), QString_To_Py_String(projectInfo.m_summary), @@ -1023,7 +1108,7 @@ namespace O3DE::ProjectManager return result && refreshResult; } - bool PythonBindings::AddGemRepo(const QString& repoUri) + IPythonBindings::DetailedOutcome PythonBindings::AddGemRepo(const QString& repoUri) { bool registrationResult = false; bool result = ExecuteWithLock( @@ -1037,7 +1122,12 @@ namespace O3DE::ProjectManager registrationResult = !pythonRegistrationResult.cast(); }); - return result && registrationResult; + if (!result || !registrationResult) + { + return AZ::Failure(GetErrorPair()); + } + + return AZ::Success(); } bool PythonBindings::RemoveGemRepo(const QString& repoUri) @@ -1107,11 +1197,11 @@ namespace O3DE::ProjectManager gemRepoInfo.m_isEnabled = false; } - if (data.contains("gem_paths")) + if (data.contains("gems")) { - for (auto gemPath : data["gem_paths"]) + for (auto gemPath : data["gems"]) { - gemRepoInfo.m_includedGemPaths.push_back(Py_To_String(gemPath)); + gemRepoInfo.m_includedGemUris.push_back(Py_To_String(gemPath)); } } } @@ -1124,13 +1214,10 @@ namespace O3DE::ProjectManager return gemRepoInfo; } -//#define MOCK_GEM_REPO_INFO true - AZ::Outcome, AZStd::string> PythonBindings::GetAllGemRepoInfos() { QVector gemRepos; -#ifndef MOCK_GEM_REPO_INFO auto result = ExecuteWithLockErrorHandling( [&] { @@ -1143,66 +1230,40 @@ namespace O3DE::ProjectManager { return AZ::Failure(result.GetError().c_str()); } -#else - GemRepoInfo mockJohnRepo("JohnCreates", "John Smith", QDateTime(QDate(2021, 8, 31), QTime(11, 57)), true); - mockJohnRepo.m_summary = "John's Summary. Lorem ipsum dolor sit amet, consectetur adipiscing elit. Fusce sollicitudin dapibus urna"; - mockJohnRepo.m_repoUri = "https://github.com/o3de/o3de"; - mockJohnRepo.m_additionalInfo = "John's additional info. Lorem ipsum dolor sit amet, consectetur adipiscing elit. Fusce sollicitu."; - gemRepos.push_back(mockJohnRepo); - - GemRepoInfo mockJaneRepo("JanesGems", "Jane Doe", QDateTime(QDate(2021, 9, 10), QTime(18, 23)), false); - mockJaneRepo.m_summary = "Jane's Summary."; - mockJaneRepo.m_repoUri = "https://github.com/o3de/o3de.org"; - gemRepos.push_back(mockJaneRepo); -#endif // MOCK_GEM_REPO_INFO std::sort(gemRepos.begin(), gemRepos.end()); return AZ::Success(AZStd::move(gemRepos)); } - AZ::Outcome PythonBindings::DownloadGem(const QString& gemName, std::function gemProgressCallback) + AZ::Outcome, AZStd::string> PythonBindings::GetGemInfosForRepo(const QString& repoUri) { - // This process is currently limited to download a single gem at a time. - bool downloadSucceeded = false; - - m_requestCancelDownload = false; - auto result = ExecuteWithLockErrorHandling( + QVector gemInfos; + AZ::Outcome result = ExecuteWithLockErrorHandling( [&] { - auto downloadResult = m_download.attr("download_gem")( - QString_To_Py_String(gemName), // gem name - pybind11::none(), // destination path - false, // skip auto register - pybind11::cpp_function( - [this, gemProgressCallback](int progress) - { - gemProgressCallback(progress); + auto pyUri = QString_To_Py_String(repoUri); + auto gemPaths = m_repo.attr("get_gem_json_paths_from_cached_repo")(pyUri); - return m_requestCancelDownload; - }) // Callback for download progress and cancelling - ); - downloadSucceeded = (downloadResult.cast() == 0); + if (pybind11::isinstance(gemPaths)) + { + for (auto path : gemPaths) + { + GemInfo gemInfo = GemInfoFromPath(path, pybind11::none()); + gemInfo.m_downloadStatus = GemInfo::DownloadStatus::NotDownloaded; + gemInfos.push_back(gemInfo); + } + } }); - if (!result.IsSuccess()) { - return result; - } - else if (!downloadSucceeded) - { - return AZ::Failure("Failed to download gem."); + return AZ::Failure(result.GetError()); } - return AZ::Success(); + return AZ::Success(AZStd::move(gemInfos)); } - void PythonBindings::CancelDownload() - { - m_requestCancelDownload = true; - } - - AZ::Outcome, AZStd::string> PythonBindings::GetAllGemRepoGemsInfos() + AZ::Outcome, AZStd::string> PythonBindings::GetGemInfosForAllRepos() { QVector gemInfos; AZ::Outcome result = ExecuteWithLockErrorHandling( @@ -1228,4 +1289,84 @@ namespace O3DE::ProjectManager return AZ::Success(AZStd::move(gemInfos)); } + + IPythonBindings::DetailedOutcome PythonBindings::DownloadGem( + const QString& gemName, std::function gemProgressCallback, bool force) + { + // This process is currently limited to download a single gem at a time. + bool downloadSucceeded = false; + + m_requestCancelDownload = false; + auto result = ExecuteWithLockErrorHandling( + [&] + { + auto downloadResult = m_download.attr("download_gem")( + QString_To_Py_String(gemName), // gem name + pybind11::none(), // destination path + false, // skip auto register + force, // force overwrite + pybind11::cpp_function( + [this, gemProgressCallback](int bytesDownloaded, int totalBytes) + { + gemProgressCallback(bytesDownloaded, totalBytes); + + return m_requestCancelDownload; + }) // Callback for download progress and cancelling + ); + downloadSucceeded = (downloadResult.cast() == 0); + }); + + + if (!result.IsSuccess()) + { + IPythonBindings::ErrorPair pythonRunError(result.GetError(), result.GetError()); + return AZ::Failure(AZStd::move(pythonRunError)); + } + else if (!downloadSucceeded) + { + return AZ::Failure(GetErrorPair()); + } + + return AZ::Success(); + } + + void PythonBindings::CancelDownload() + { + m_requestCancelDownload = true; + } + + bool PythonBindings::IsGemUpdateAvaliable(const QString& gemName, const QString& lastUpdated) + { + bool updateAvaliableResult = false; + bool result = ExecuteWithLock( + [&] + { + auto pyGemName = QString_To_Py_String(gemName); + auto pyLastUpdated = QString_To_Py_String(lastUpdated); + auto pythonUpdateAvaliableResult = m_download.attr("is_o3de_gem_update_available")(pyGemName, pyLastUpdated); + + updateAvaliableResult = pythonUpdateAvaliableResult.cast(); + }); + + return result && updateAvaliableResult; + } + + IPythonBindings::ErrorPair PythonBindings::GetErrorPair() + { + AZStd::string detailedString = m_pythonErrorStrings.size() == 1 + ? "" + : AZStd::accumulate(m_pythonErrorStrings.begin(), m_pythonErrorStrings.end(), AZStd::string("")); + + return IPythonBindings::ErrorPair(m_pythonErrorStrings.front(), detailedString); + } + + void PythonBindings::AddErrorString(AZStd::string errorString) + { + m_pythonErrorStrings.push_back(errorString); + } + + void PythonBindings::ClearErrorStrings() + { + m_pythonErrorStrings.clear(); + } } diff --git a/Code/Tools/ProjectManager/Source/PythonBindings.h b/Code/Tools/ProjectManager/Source/PythonBindings.h index 4375d56d02..e2a8109128 100644 --- a/Code/Tools/ProjectManager/Source/PythonBindings.h +++ b/Code/Tools/ProjectManager/Source/PythonBindings.h @@ -35,7 +35,8 @@ namespace O3DE::ProjectManager // Engine AZ::Outcome GetEngineInfo() override; - bool SetEngineInfo(const EngineInfo& engineInfo) override; + AZ::Outcome GetEngineInfo(const QString& engineName) override; + DetailedOutcome SetEngineInfo(const EngineInfo& engineInfo, bool force = false) override; // Gem AZ::Outcome GetGemInfo(const QString& path, const QString& projectPath = {}) override; @@ -43,6 +44,7 @@ namespace O3DE::ProjectManager AZ::Outcome, AZStd::string> GetAllGemInfos(const QString& projectPath) override; AZ::Outcome, AZStd::string> GetEnabledGemNames(const QString& projectPath) override; AZ::Outcome RegisterGem(const QString& gemPath, const QString& projectPath = {}) override; + AZ::Outcome UnregisterGem(const QString& gemPath, const QString& projectPath = {}) override; // Project AZ::Outcome CreateProject(const QString& projectTemplatePath, const ProjectInfo& projectInfo) override; @@ -61,24 +63,32 @@ namespace O3DE::ProjectManager // Gem Repos AZ::Outcome RefreshGemRepo(const QString& repoUri) override; bool RefreshAllGemRepos() override; - bool AddGemRepo(const QString& repoUri) override; + DetailedOutcome AddGemRepo(const QString& repoUri) override; bool RemoveGemRepo(const QString& repoUri) override; AZ::Outcome, AZStd::string> GetAllGemRepoInfos() override; - AZ::Outcome DownloadGem(const QString& gemName, std::function gemProgressCallback) override; + AZ::Outcome, AZStd::string> GetGemInfosForRepo(const QString& repoUri) override; + AZ::Outcome, AZStd::string> GetGemInfosForAllRepos() override; + DetailedOutcome DownloadGem( + const QString& gemName, std::function gemProgressCallback, bool force = false) override; void CancelDownload() override; - AZ::Outcome, AZStd::string> GetAllGemRepoGemsInfos() override; + bool IsGemUpdateAvaliable(const QString& gemName, const QString& lastUpdated) override; + + void AddErrorString(AZStd::string errorString) override; + void ClearErrorStrings() override; private: AZ_DISABLE_COPY_MOVE(PythonBindings); AZ::Outcome ExecuteWithLockErrorHandling(AZStd::function executionCallback); bool ExecuteWithLock(AZStd::function executionCallback); + EngineInfo EngineInfoFromPath(pybind11::handle enginePath); GemInfo GemInfoFromPath(pybind11::handle path, pybind11::handle pyProjectPath); GemRepoInfo GetGemRepoInfo(pybind11::handle repoUri); ProjectInfo ProjectInfoFromPath(pybind11::handle path); ProjectTemplateInfo ProjectTemplateInfoFromPath(pybind11::handle path, pybind11::handle pyProjectPath); - bool RegisterThisEngine(); + AZ::Outcome GemRegistration(const QString& gemPath, const QString& projectPath, bool remove = false); bool StopPython(); + IPythonBindings::ErrorPair GetErrorPair(); bool m_pythonStarted = false; @@ -87,6 +97,7 @@ namespace O3DE::ProjectManager AZStd::recursive_mutex m_lock; pybind11::handle m_engineTemplate; + pybind11::handle m_engineProperties; pybind11::handle m_cmake; pybind11::handle m_register; pybind11::handle m_manifest; @@ -98,5 +109,6 @@ namespace O3DE::ProjectManager pybind11::handle m_pathlib; bool m_requestCancelDownload = false; + AZStd::vector m_pythonErrorStrings; }; } diff --git a/Code/Tools/ProjectManager/Source/PythonBindingsInterface.h b/Code/Tools/ProjectManager/Source/PythonBindingsInterface.h index 1134804f1f..a42ff310c3 100644 --- a/Code/Tools/ProjectManager/Source/PythonBindingsInterface.h +++ b/Code/Tools/ProjectManager/Source/PythonBindingsInterface.h @@ -31,6 +31,10 @@ namespace O3DE::ProjectManager IPythonBindings() = default; virtual ~IPythonBindings() = default; + //! First string in pair is general error, second is detailed + using ErrorPair = AZStd::pair; + using DetailedOutcome = AZ::Outcome; + /** * Get whether Python was started or not. All Python functionality will fail if Python * failed to start. @@ -49,17 +53,25 @@ namespace O3DE::ProjectManager // Engine /** - * Get info about the engine + * Get info about the current engine * @return an outcome with EngineInfo on success */ virtual AZ::Outcome GetEngineInfo() = 0; /** - * Set info about the engine - * @param engineInfo an EngineInfo object + * Get info about an engine by name + * @param engineName The name of the engine to get info about + * @return an outcome with EngineInfo on success */ - virtual bool SetEngineInfo(const EngineInfo& engineInfo) = 0; + virtual AZ::Outcome GetEngineInfo(const QString& engineName) = 0; + /** + * Set info about the engine + * @param force True to force registration even if an engine with the same name is already registered + * @param engineInfo an EngineInfo object + * @return a detailed error outcome on failure. + */ + virtual DetailedOutcome SetEngineInfo(const EngineInfo& engineInfo, bool force = false) = 0; // Gems @@ -94,11 +106,19 @@ namespace O3DE::ProjectManager /** * Registers the gem to the specified project, or to the o3de_manifest.json if no project path is given * @param gemPath the path to the gem - * @param projectPath the path to the project. If empty, will register the external path in o3de_manifest.json + * @param projectPath the path to the project. If empty, will register the external path in o3de_manifest.json * @return An outcome with the success flag as well as an error message in case of a failure. */ virtual AZ::Outcome RegisterGem(const QString& gemPath, const QString& projectPath = {}) = 0; + /** + * Unregisters the gem from the specified project, or from the o3de_manifest.json if no project path is given + * @param gemPath the path to the gem + * @param projectPath the path to the project. If empty, will unregister the external path in o3de_manifest.json + * @return An outcome with the success flag as well as an error message in case of a failure. + */ + virtual AZ::Outcome UnregisterGem(const QString& gemPath, const QString& projectPath = {}) = 0; + // Projects @@ -192,9 +212,9 @@ namespace O3DE::ProjectManager /** * Registers this gem repo with the current engine. * @param repoUri the absolute filesystem path or url to the gem repo. - * @return true on success, false on failure. + * @return an outcome with a pair of string error and detailed messages on failure. */ - virtual bool AddGemRepo(const QString& repoUri) = 0; + virtual DetailedOutcome AddGemRepo(const QString& repoUri) = 0; /** * Unregisters this gem repo with the current engine. @@ -210,23 +230,51 @@ namespace O3DE::ProjectManager virtual AZ::Outcome, AZStd::string> GetAllGemRepoInfos() = 0; /** - * Downloads and registers a Gem. - * @param gemName the name of the Gem to download - * @param gemProgressCallback a callback function that is called with an int percentage download value - * @return an outcome with a string error message on failure. + * Gathers all gem infos from the provided repo + * @param repoUri the absolute filesystem path or url to the gem repo. + * @return A list of gem infos. */ - virtual AZ::Outcome DownloadGem(const QString& gemName, std::function gemProgressCallback) = 0; - - /** - * Cancels the current download. - */ - virtual void CancelDownload() = 0; + virtual AZ::Outcome, AZStd::string> GetGemInfosForRepo(const QString& repoUri) = 0; /** * Gathers all gem infos for all gems registered from repos. * @return A list of gem infos. */ - virtual AZ::Outcome, AZStd::string> GetAllGemRepoGemsInfos() = 0; + virtual AZ::Outcome, AZStd::string> GetGemInfosForAllRepos() = 0; + + /** + * Downloads and registers a Gem. + * @param gemName the name of the Gem to download. + * @param gemProgressCallback a callback function that is called with an int percentage download value. + * @param force should we forcibly overwrite the old version of the gem. + * @return an outcome with a pair of string error and detailed messages on failure. + */ + virtual DetailedOutcome DownloadGem( + const QString& gemName, std::function gemProgressCallback, bool force = false) = 0; + + /** + * Cancels the current download. + */ + virtual void CancelDownload() = 0; + + /** + * Checks if there is an update avaliable for a gem on a repo. + * @param gemName the name of the gem to check. + * @param lastUpdated last time the gem was update. + * @return true if update is avaliable, false if not. + */ + virtual bool IsGemUpdateAvaliable(const QString& gemName, const QString& lastUpdated) = 0; + + /** + * Add an error string to be returned when the current python call is complete. + * @param The error string to be displayed. + */ + virtual void AddErrorString(AZStd::string errorString) = 0; + + /** + * Clears the current list of error strings. + */ + virtual void ClearErrorStrings() = 0; }; using PythonBindingsInterface = AZ::Interface; diff --git a/Code/Tools/ProjectManager/Source/ScreenWidget.h b/Code/Tools/ProjectManager/Source/ScreenWidget.h index 148dcdb8c8..a84fb0be80 100644 --- a/Code/Tools/ProjectManager/Source/ScreenWidget.h +++ b/Code/Tools/ProjectManager/Source/ScreenWidget.h @@ -47,9 +47,9 @@ namespace O3DE::ProjectManager return tr("Missing"); } - virtual bool ContainsScreen([[maybe_unused]] ProjectManagerScreen screen) + virtual bool ContainsScreen(ProjectManagerScreen screen) { - return false; + return GetScreenEnum() == screen; } virtual void GoToScreen([[maybe_unused]] ProjectManagerScreen screen) { @@ -58,7 +58,6 @@ namespace O3DE::ProjectManager //! Notify this screen it is the current screen virtual void NotifyCurrentScreen() { - } signals: diff --git a/Code/Tools/ProjectManager/Source/Settings.cpp b/Code/Tools/ProjectManager/Source/Settings.cpp new file mode 100644 index 0000000000..0a8b600dd9 --- /dev/null +++ b/Code/Tools/ProjectManager/Source/Settings.cpp @@ -0,0 +1,187 @@ +/* + * Copyright (c) Contributors to the Open 3D Engine Project. + * For complete copyright and license terms please see the LICENSE at the root of this distribution. + * + * SPDX-License-Identifier: Apache-2.0 OR MIT + * + */ + +#include + +#include +#include +#include + +namespace O3DE::ProjectManager +{ + Settings::Settings(bool saveToDisk) + : m_saveToDisk(saveToDisk) + { + m_settingsRegistry = AZ::SettingsRegistry::Get(); + + AZ_Assert(m_settingsRegistry, "Failed to create Settings"); + } + + void Settings::Save() + { + AZ::SettingsRegistryMergeUtils::DumperSettings dumperSettings; + dumperSettings.m_prettifyOutput = true; + dumperSettings.m_jsonPointerPrefix = ProjectManagerKeyPrefix; + + AZStd::string stringBuffer; + AZ::IO::ByteContainerStream stringStream(&stringBuffer); + if (!AZ::SettingsRegistryMergeUtils::DumpSettingsRegistryToStream( + *m_settingsRegistry, ProjectManagerKeyPrefix, stringStream, dumperSettings)) + { + AZ_Warning("ProjectManager", false, "Could not save Project Manager settings to stream"); + return; + } + + AZ::IO::FixedMaxPath o3deUserPath = AZ::Utils::GetO3deManifestDirectory(); + o3deUserPath /= AZ::SettingsRegistryInterface::RegistryFolder; + o3deUserPath /= "ProjectManager.setreg"; + + bool saved = false; + constexpr auto configurationMode = + AZ::IO::SystemFile::SF_OPEN_CREATE | AZ::IO::SystemFile::SF_OPEN_CREATE_PATH | AZ::IO::SystemFile::SF_OPEN_WRITE_ONLY; + + AZ::IO::SystemFile outputFile; + if (outputFile.Open(o3deUserPath.c_str(), configurationMode)) + { + saved = outputFile.Write(stringBuffer.data(), stringBuffer.size()) == stringBuffer.size(); + } + + AZ_Warning("ProjectManager", saved, "Unable to save Project Manager registry file to path: %s", o3deUserPath.c_str()); + } + + void Settings::OnSettingsChanged() + { + if (m_saveToDisk) + { + Save(); + } + } + + bool Settings::Get(QString& result, const QString& settingsKey) + { + bool success = false; + + AZStd::string settingsValue; + success = m_settingsRegistry->Get(settingsValue, settingsKey.toStdString().c_str()); + + result = settingsValue.c_str(); + return success; + } + + bool Settings::Get(bool& result, const QString& settingsKey) + { + return m_settingsRegistry->Get(result, settingsKey.toStdString().c_str()); + } + + bool Settings::Set(const QString& settingsKey, const QString& settingsValue) + { + bool success = false; + + success = m_settingsRegistry->Set(settingsKey.toStdString().c_str(), settingsValue.toStdString().c_str()); + OnSettingsChanged(); + + return success; + } + + bool Settings::Set(const QString& settingsKey, bool settingsValue) + { + bool success = false; + + success = m_settingsRegistry->Set(settingsKey.toStdString().c_str(), settingsValue); + OnSettingsChanged(); + + return success; + } + + bool Settings::Remove(const QString& settingsKey) + { + bool success = false; + + success = m_settingsRegistry->Remove(settingsKey.toStdString().c_str()); + OnSettingsChanged(); + + return success; + } + + bool Settings::Copy(const QString& settingsKeyOrig, const QString& settingsKeyDest, bool removeOrig) + { + bool success = false; + AZStd::string settingsValue; + + success = m_settingsRegistry->Get(settingsValue, settingsKeyOrig.toStdString().c_str()); + + if (success) + { + success = m_settingsRegistry->Set(settingsKeyDest.toStdString().c_str(), settingsValue); + if (success) + { + if (removeOrig) + { + success = m_settingsRegistry->Remove(settingsKeyOrig.toStdString().c_str()); + } + OnSettingsChanged(); + } + } + + return success; + } + + QString Settings::GetProjectKey(const ProjectInfo& projectInfo) + { + return QString("%1/Projects/%2/%3").arg(ProjectManagerKeyPrefix, projectInfo.m_id, projectInfo.m_projectName); + } + + bool Settings::GetBuiltSuccessfullyPaths(AZStd::set& result) + { + return m_settingsRegistry->GetObject>(result, ProjectsBuiltSuccessfullyKey); + } + + bool Settings::GetProjectBuiltSuccessfully(bool& result, const ProjectInfo& projectInfo) + { + AZStd::set builtPathsResult; + bool success = GetBuiltSuccessfullyPaths(builtPathsResult); + + // Check if buildPath is listed as successfully built + AZStd::string projectPath = projectInfo.m_path.toStdString().c_str(); + if (builtPathsResult.contains(projectPath)) + { + result = true; + } + // No project built statuses known + else + { + result = false; + } + + return success; + } + + bool Settings::SetProjectBuiltSuccessfully(const ProjectInfo& projectInfo, bool successfullyBuilt) + { + AZStd::set builtPathsResult; + bool success = GetBuiltSuccessfullyPaths(builtPathsResult); + + AZStd::string projectPath = projectInfo.m_path.toStdString().c_str(); + if (successfullyBuilt) + { + //Add successfully built path to set + builtPathsResult.insert(projectPath); + } + else + { + // Remove unsuccessfully built path from set + builtPathsResult.erase(projectPath); + } + + success = m_settingsRegistry->SetObject>(ProjectsBuiltSuccessfullyKey, builtPathsResult); + OnSettingsChanged(); + + return success; + } + +} // namespace O3DE::ProjectManager diff --git a/Code/Tools/ProjectManager/Source/Settings.h b/Code/Tools/ProjectManager/Source/Settings.h new file mode 100644 index 0000000000..416d17b53b --- /dev/null +++ b/Code/Tools/ProjectManager/Source/Settings.h @@ -0,0 +1,50 @@ +/* + * Copyright (c) Contributors to the Open 3D Engine Project. + * For complete copyright and license terms please see the LICENSE at the root of this distribution. + * + * SPDX-License-Identifier: Apache-2.0 OR MIT + * + */ + +#pragma once + +#include + +#include +#include + +namespace AZ +{ + class SettingsRegistryInterface; +} + +namespace O3DE::ProjectManager +{ + class Settings + : public SettingsInterface::Registrar + { + public: + Settings(bool saveToDisk = true); + + bool Get(QString& result, const QString& settingsKey) override; + bool Get(bool& result, const QString& settingsKey) override; + bool Set(const QString& settingsKey, const QString& settingsValue) override; + bool Set(const QString& settingsKey, bool settingsValue) override; + bool Remove(const QString& settingsKey) override; + bool Copy(const QString& settingsKeyOrig, const QString& settingsKeyDest, bool removeOrig = false) override; + + QString GetProjectKey(const ProjectInfo& projectInfo) override; + + bool GetProjectBuiltSuccessfully(bool& result, const ProjectInfo& projectInfo) override; + bool SetProjectBuiltSuccessfully(const ProjectInfo& projectInfo, bool successfullyBuilt) override; + + private: + void Save(); + void OnSettingsChanged(); + + bool GetBuiltSuccessfullyPaths(AZStd::set& result); + + bool m_saveToDisk; + AZ::SettingsRegistryInterface* m_settingsRegistry = nullptr; + }; +} // namespace O3DE::ProjectManager diff --git a/Code/Tools/ProjectManager/Source/SettingsInterface.h b/Code/Tools/ProjectManager/Source/SettingsInterface.h new file mode 100644 index 0000000000..da1363dee5 --- /dev/null +++ b/Code/Tools/ProjectManager/Source/SettingsInterface.h @@ -0,0 +1,101 @@ +/* + * Copyright (c) Contributors to the Open 3D Engine Project. + * For complete copyright and license terms please see the LICENSE at the root of this distribution. + * + * SPDX-License-Identifier: Apache-2.0 OR MIT + * + */ +#pragma once + +#include + +#include +#include + +namespace O3DE::ProjectManager +{ + //! Interface used to interact with the settings functions + class ISettings + { + public: + AZ_RTTI(O3DE::ProjectManager::ISettings, "{95D87D95-0E04-462F-8B0B-ED15C0A9F090}"); + AZ_DISABLE_COPY_MOVE(ISettings); + + static constexpr char ProjectManagerKeyPrefix[] = "/O3DE/ProjectManager"; + static constexpr char ExternalLinkWarningKey[] = "/O3DE/ProjectManager/SkipExternalLinkWarning"; + static constexpr char ProjectsBuiltSuccessfullyKey[] = "/O3DE/ProjectManager/SuccessfulBuildPaths"; + + ISettings() = default; + virtual ~ISettings() = default; + + /** + * Get the value for a string settings key + * @param result Store string result in this variable + * @param settingsKey The key to get the value in + * @return true if all calls to settings registry were successful + */ + virtual bool Get(QString& result, const QString& settingsKey) = 0; + /** + * Get the value for a bool settings key + * @param result Store bool result in this variable + * @param settingsKey The key to get the value in + * @return true if all calls to settings registry were successful + */ + virtual bool Get(bool& result, const QString& settingsKey) = 0; + + /** + * Set the value for a string settings key + * @param settingsKey The key to set the value in + * @param settingsValue String value to set key to + * @return true if all calls to settings registry were successful + */ + virtual bool Set(const QString& settingsKey, const QString& settingsValue) = 0; + /** + * Set the value for a bool settings key + * @param settingsKey The key to set the value in + * @param settingsValue Bool value to set key to + * @return true if all calls to settings registry were successful + */ + virtual bool Set(const QString& settingsKey, bool settingsValue) = 0; + + /** + * Remove settings key + * @param settingsKey The key to remove + * @return true if all calls to settings registry were successful + */ + virtual bool Remove(const QString& settingsKey) = 0; + + /** + * Copy the string settings value from one key to another + * @param settingsKeyOrig The original key to copy from + * @param settingsKeyDest The destination key to copy to + * @param removeOrig(Optional) Delete the original key if true + * @return true if all calls to settings registry were successful + */ + virtual bool Copy(const QString& settingsKeyOrig, const QString& settingsKeyDest, bool removeOrig = false) = 0; + + /** + * Generate prefix for project settings key + * @param projectInfo Project for settings key + * @return QString Prefix for project specific settings key + */ + virtual QString GetProjectKey(const ProjectInfo& projectInfo) = 0; + + /** + * Get the build status for a project + * @param result Store bool build status in this variable + * @param projectInfo Project to check built status for + * @return true if all calls to settings registry were successful + */ + virtual bool GetProjectBuiltSuccessfully(bool& result, const ProjectInfo& projectInfo) = 0; + /** + * Set the build status for a project + * @param projectInfo Project to set built status for + * @param successfullyBuilt Bool value to set build status to + * @return true if all calls to settings registry were successful + */ + virtual bool SetProjectBuiltSuccessfully(const ProjectInfo& projectInfo, bool successfullyBuilt) = 0; + }; + + using SettingsInterface = AZ::Interface; +} // namespace O3DE::ProjectManager diff --git a/Code/Tools/ProjectManager/Source/TagWidget.cpp b/Code/Tools/ProjectManager/Source/TagWidget.cpp index ace9d72d8f..007f0839d1 100644 --- a/Code/Tools/ProjectManager/Source/TagWidget.cpp +++ b/Code/Tools/ProjectManager/Source/TagWidget.cpp @@ -12,12 +12,18 @@ namespace O3DE::ProjectManager { - TagWidget::TagWidget(const QString& text, QWidget* parent) - : QLabel(text, parent) + TagWidget::TagWidget(const Tag& tag, QWidget* parent) + : QLabel(tag.text, parent) + , m_tag(tag) { setObjectName("TagWidget"); } + void TagWidget::mousePressEvent([[maybe_unused]] QMouseEvent* event) + { + emit TagClicked(m_tag); + } + TagContainerWidget::TagContainerWidget(QWidget* parent) : QWidget(parent) { @@ -34,18 +40,34 @@ namespace O3DE::ProjectManager void TagContainerWidget::Update(const QStringList& tags) { - FlowLayout* flowLayout = static_cast(layout()); + Clear(); - // remove old tags + foreach (const QString& tag, tags) + { + TagWidget* tagWidget = new TagWidget({tag, tag}); + connect(tagWidget, &TagWidget::TagClicked, this, [=](const Tag& clickedTag){ emit TagClicked(clickedTag); }); + layout()->addWidget(tagWidget); + } + } + + void TagContainerWidget::Update(const QVector& tags) + { + Clear(); + + foreach (const Tag& tag, tags) + { + TagWidget* tagWidget = new TagWidget(tag); + connect(tagWidget, &TagWidget::TagClicked, this, [=](const Tag& clickedTag){ emit TagClicked(clickedTag); }); + layout()->addWidget(tagWidget); + } + } + + void TagContainerWidget::Clear() + { QLayoutItem* layoutItem = nullptr; while ((layoutItem = layout()->takeAt(0)) != nullptr) { layoutItem->widget()->deleteLater(); } - - foreach (const QString& tag, tags) - { - flowLayout->addWidget(new TagWidget(tag)); - } } } // namespace O3DE::ProjectManager diff --git a/Code/Tools/ProjectManager/Source/TagWidget.h b/Code/Tools/ProjectManager/Source/TagWidget.h index 0dad7468eb..fce6eaf863 100644 --- a/Code/Tools/ProjectManager/Source/TagWidget.h +++ b/Code/Tools/ProjectManager/Source/TagWidget.h @@ -10,12 +10,19 @@ #if !defined(Q_MOC_RUN) #include -#include #include +#include +#include #endif namespace O3DE::ProjectManager { + struct Tag + { + QString text; + QString id; + }; + // Single tag class TagWidget : public QLabel @@ -23,8 +30,17 @@ namespace O3DE::ProjectManager Q_OBJECT // AUTOMOC public: - explicit TagWidget(const QString& text, QWidget* parent = nullptr); + explicit TagWidget(const Tag& id, QWidget* parent = nullptr); ~TagWidget() = default; + + signals: + void TagClicked(const Tag& tag); + + protected: + void mousePressEvent(QMouseEvent* event) override; + + private: + Tag m_tag; }; // Widget containing multiple tags, automatically wrapping based on the size @@ -37,6 +53,13 @@ namespace O3DE::ProjectManager explicit TagContainerWidget(QWidget* parent = nullptr); ~TagContainerWidget() = default; + void Update(const QVector& tags); void Update(const QStringList& tags); + + signals: + void TagClicked(const Tag& tag); + + private: + void Clear(); }; } // namespace O3DE::ProjectManager diff --git a/Code/Tools/ProjectManager/Source/UpdateProjectCtrl.cpp b/Code/Tools/ProjectManager/Source/UpdateProjectCtrl.cpp index 1c8f9a6931..0e5f6f3ca5 100644 --- a/Code/Tools/ProjectManager/Source/UpdateProjectCtrl.cpp +++ b/Code/Tools/ProjectManager/Source/UpdateProjectCtrl.cpp @@ -7,6 +7,7 @@ */ #include +#include #include #include #include @@ -14,6 +15,8 @@ #include #include #include +#include +#include #include #include @@ -39,10 +42,10 @@ namespace O3DE::ProjectManager m_updateSettingsScreen = new UpdateProjectSettingsScreen(); m_gemCatalogScreen = new GemCatalogScreen(); + m_gemRepoScreen = new GemRepoScreen(this); - connect(m_gemCatalogScreen, &ScreenWidget::ChangeScreenRequest, this, [this](ProjectManagerScreen screen){ - emit ChangeScreenRequest(screen); - }); + connect(m_gemCatalogScreen, &ScreenWidget::ChangeScreenRequest, this, &UpdateProjectCtrl::OnChangeScreenRequest); + connect(m_gemRepoScreen, &GemRepoScreen::OnRefresh, m_gemCatalogScreen, &GemCatalogScreen::Refresh); m_stack = new QStackedWidget(this); m_stack->setObjectName("body"); @@ -69,6 +72,7 @@ namespace O3DE::ProjectManager m_stack->addWidget(topBarFrameWidget); m_stack->addWidget(m_gemCatalogScreen); + m_stack->addWidget(m_gemRepoScreen); QDialogButtonBox* backNextButtons = new QDialogButtonBox(); backNextButtons->setObjectName("footer"); @@ -92,6 +96,17 @@ namespace O3DE::ProjectManager return ProjectManagerScreen::UpdateProject; } + bool UpdateProjectCtrl::ContainsScreen(ProjectManagerScreen screen) + { + // Do not include GemRepos because we don't want to advertise jumping to it from all other screens here + return screen == GetScreenEnum() || screen == ProjectManagerScreen::GemCatalog; + } + + void UpdateProjectCtrl::GoToScreen(ProjectManagerScreen screen) + { + OnChangeScreenRequest(screen); + } + // Called when pressing "Edit Project Settings..." void UpdateProjectCtrl::NotifyCurrentScreen() { @@ -100,6 +115,32 @@ namespace O3DE::ProjectManager // Gather the available gems that will be shown in the gem catalog. m_gemCatalogScreen->ReinitForProject(m_projectInfo.m_path); + + // make sure the gem repo has the latest repo details + m_gemRepoScreen->Reinit(); + } + + void UpdateProjectCtrl::OnChangeScreenRequest(ProjectManagerScreen screen) + { + if (screen == ProjectManagerScreen::GemRepos) + { + m_stack->setCurrentWidget(m_gemRepoScreen); + Update(); + } + else if (screen == ProjectManagerScreen::GemCatalog) + { + m_stack->setCurrentWidget(m_gemCatalogScreen); + Update(); + } + else if (screen == ProjectManagerScreen::UpdateProjectSettings) + { + m_stack->setCurrentWidget(m_updateSettingsScreen); + Update(); + } + else + { + emit ChangeScreenRequest(screen); + } } void UpdateProjectCtrl::HandleGemsButton() @@ -145,6 +186,7 @@ namespace O3DE::ProjectManager QMessageBox::critical(this, tr("Gems downloading"), tr("You must wait for gems to finish downloading before continuing.")); return; } + // Enable or disable the gems that got adjusted in the gem catalog and apply them to the given project. const GemCatalogScreen::EnableDisableGemsResult result = m_gemCatalogScreen->EnableDisableGemsForProject(m_projectInfo.m_path); if (result == GemCatalogScreen::EnableDisableGemsResult::Failed) @@ -181,18 +223,26 @@ namespace O3DE::ProjectManager void UpdateProjectCtrl::Update() { - if (m_stack->currentIndex() == ScreenOrder::Gems) + if (m_stack->currentIndex() == ScreenOrder::GemRepos) + { + m_header->setTitle(QString(tr("Edit Project Settings: \"%1\"")).arg(m_projectInfo.GetProjectDisplayName())); + m_header->setSubTitle(QString(tr("Gem Repositories"))); + m_nextButton->setVisible(false); + } + else if (m_stack->currentIndex() == ScreenOrder::Gems) { m_header->setTitle(QString(tr("Edit Project Settings: \"%1\"")).arg(m_projectInfo.GetProjectDisplayName())); m_header->setSubTitle(QString(tr("Configure Gems"))); m_nextButton->setText(tr("Save")); + m_nextButton->setVisible(true); } else { m_header->setTitle(""); m_header->setSubTitle(QString(tr("Edit Project Settings: \"%1\"")).arg(m_projectInfo.GetProjectDisplayName())); m_nextButton->setText(tr("Save")); + m_nextButton->setVisible(true); } } @@ -253,6 +303,15 @@ namespace O3DE::ProjectManager } } + if (newProjectSettings.m_projectName != m_projectInfo.m_projectName) + { + // Remove project build successfully paths for both old and new project names + // because a full rebuild is required when moving projects + auto settings = SettingsInterface::Get(); + settings->SetProjectBuiltSuccessfully(m_projectInfo, false); + settings->SetProjectBuiltSuccessfully(newProjectSettings, false); + } + if (!newProjectSettings.m_newPreviewImagePath.isEmpty()) { if (!ProjectUtils::ReplaceProjectFile( diff --git a/Code/Tools/ProjectManager/Source/UpdateProjectCtrl.h b/Code/Tools/ProjectManager/Source/UpdateProjectCtrl.h index 3321fad638..070e2c58bf 100644 --- a/Code/Tools/ProjectManager/Source/UpdateProjectCtrl.h +++ b/Code/Tools/ProjectManager/Source/UpdateProjectCtrl.h @@ -22,21 +22,26 @@ namespace O3DE::ProjectManager QT_FORWARD_DECLARE_CLASS(ScreenHeader) QT_FORWARD_DECLARE_CLASS(UpdateProjectSettingsScreen) QT_FORWARD_DECLARE_CLASS(GemCatalogScreen) + QT_FORWARD_DECLARE_CLASS(GemRepoScreen) - class UpdateProjectCtrl : public ScreenWidget + class UpdateProjectCtrl + : public ScreenWidget { + Q_OBJECT public: explicit UpdateProjectCtrl(QWidget* parent = nullptr); ~UpdateProjectCtrl() = default; ProjectManagerScreen GetScreenEnum() override; - protected: + bool ContainsScreen(ProjectManagerScreen screen) override; + void GoToScreen(ProjectManagerScreen screen) override; void NotifyCurrentScreen() override; protected slots: void HandleBackButton(); void HandleNextButton(); void HandleGemsButton(); + void OnChangeScreenRequest(ProjectManagerScreen screen); void UpdateCurrentProject(const QString& projectPath); private: @@ -47,13 +52,15 @@ namespace O3DE::ProjectManager enum ScreenOrder { Settings, - Gems + Gems, + GemRepos }; ScreenHeader* m_header = nullptr; QStackedWidget* m_stack = nullptr; UpdateProjectSettingsScreen* m_updateSettingsScreen = nullptr; GemCatalogScreen* m_gemCatalogScreen = nullptr; + GemRepoScreen* m_gemRepoScreen = nullptr; QPushButton* m_backButton = nullptr; QPushButton* m_nextButton = nullptr; diff --git a/Code/Tools/ProjectManager/Source/UpdateProjectSettingsScreen.cpp b/Code/Tools/ProjectManager/Source/UpdateProjectSettingsScreen.cpp index 3bfc07c5b0..30735dcc97 100644 --- a/Code/Tools/ProjectManager/Source/UpdateProjectSettingsScreen.cpp +++ b/Code/Tools/ProjectManager/Source/UpdateProjectSettingsScreen.cpp @@ -16,6 +16,7 @@ #include #include #include +#include namespace O3DE::ProjectManager { @@ -31,12 +32,10 @@ namespace O3DE::ProjectManager m_verticalLayout->addWidget(m_projectPreview); QVBoxLayout* previewExtrasLayout = new QVBoxLayout(this); - previewExtrasLayout->setAlignment(Qt::AlignLeft); - previewExtrasLayout->setContentsMargins(50, 0, 0, 0); + previewExtrasLayout->setAlignment(Qt::AlignTop); + previewExtrasLayout->setContentsMargins(30, 45, 30, 0); - QLabel* projectPreviewLabel = new QLabel(tr("Select an image (PNG). Minimum %1 x %2 pixels.") - .arg(QString::number(ProjectPreviewImageWidth), QString::number(ProjectPreviewImageHeight))); - projectPreviewLabel->setObjectName("projectPreviewLabel"); + QLabel* projectPreviewLabel = new QLabel(tr("Project Preview")); previewExtrasLayout->addWidget(projectPreviewLabel); m_projectPreviewImage = new QLabel(this); @@ -44,7 +43,53 @@ namespace O3DE::ProjectManager m_projectPreviewImage->setAlignment(Qt::AlignHCenter | Qt::AlignVCenter); previewExtrasLayout->addWidget(m_projectPreviewImage); - m_verticalLayout->addLayout(previewExtrasLayout); + QLabel* projectPreviewInfoLabel = new QLabel(tr("Select an image (PNG). Minimum %1 x %2 pixels.") + .arg(QString::number(ProjectPreviewImageWidth), QString::number(ProjectPreviewImageHeight))); + projectPreviewInfoLabel->setObjectName("projectSmallInfoLabel"); + projectPreviewInfoLabel->setWordWrap(true); + previewExtrasLayout->addWidget(projectPreviewInfoLabel); + + m_horizontalLayout->addLayout(previewExtrasLayout); + + m_verticalLayout->addSpacing(10); + + // Collapse button + QHBoxLayout* advancedCollapseLayout = new QHBoxLayout(); + advancedCollapseLayout->setContentsMargins(50, 0, 0, 0); + + m_advancedSettingsCollapseButton = new QPushButton(); + m_advancedSettingsCollapseButton->setCheckable(true); + m_advancedSettingsCollapseButton->setChecked(true); + m_advancedSettingsCollapseButton->setFlat(true); + m_advancedSettingsCollapseButton->setFocusPolicy(Qt::NoFocus); + m_advancedSettingsCollapseButton->setFixedWidth(s_collapseButtonSize); + connect(m_advancedSettingsCollapseButton, &QPushButton::clicked, this, &UpdateProjectSettingsScreen::UpdateAdvancedSettingsCollapseState); + advancedCollapseLayout->addWidget(m_advancedSettingsCollapseButton); + + // Category title + QLabel* advancedLabel = new QLabel(tr("Advanced Settings")); + advancedLabel->setObjectName("projectSettingsSectionTitle"); + advancedCollapseLayout->addWidget(advancedLabel); + m_verticalLayout->addLayout(advancedCollapseLayout); + + m_verticalLayout->addSpacing(5); + + // Everything in the advanced settings widget will be collapsed/uncollapsed + { + m_advancedSettingWidget = new QWidget(); + m_verticalLayout->addWidget(m_advancedSettingWidget); + + QVBoxLayout* advancedSettingsLayout = new QVBoxLayout(); + advancedSettingsLayout->setMargin(0); + advancedSettingsLayout->setAlignment(Qt::AlignTop); + m_advancedSettingWidget->setLayout(advancedSettingsLayout); + + m_projectId = new FormLineEditWidget(tr("Project ID"), "", this); + connect(m_projectId->lineEdit(), &QLineEdit::textChanged, this, &UpdateProjectSettingsScreen::OnProjectIdUpdated); + advancedSettingsLayout->addWidget(m_projectId); + } + + UpdateAdvancedSettingsCollapseState(); } ProjectManagerScreen UpdateProjectSettingsScreen::GetScreenEnum() @@ -56,6 +101,7 @@ namespace O3DE::ProjectManager { m_projectInfo.m_displayName = m_projectName->lineEdit()->text(); m_projectInfo.m_path = m_projectPath->lineEdit()->text(); + m_projectInfo.m_id = m_projectId->lineEdit()->text(); if (m_userChangedPreview) { @@ -70,8 +116,9 @@ namespace O3DE::ProjectManager m_projectInfo = projectInfo; m_projectName->lineEdit()->setText(projectInfo.GetProjectDisplayName()); - m_projectPath->lineEdit()->setText(projectInfo.m_path); + m_projectId->lineEdit()->setText(projectInfo.m_id); + UpdateProjectPreviewPath(); } @@ -88,7 +135,7 @@ namespace O3DE::ProjectManager bool UpdateProjectSettingsScreen::Validate() { - return ProjectSettingsScreen::Validate() && ValidateProjectPreview(); + return ProjectSettingsScreen::Validate() && ValidateProjectPreview() && ValidateProjectId(); } void UpdateProjectSettingsScreen::ResetProjectPreviewPath() @@ -106,6 +153,11 @@ namespace O3DE::ProjectManager QPixmap(m_projectPreview->lineEdit()->text()).scaled(m_projectPreviewImage->size(), Qt::KeepAspectRatioByExpanding)); } + void UpdateProjectSettingsScreen::OnProjectIdUpdated() + { + ValidateProjectId(); + } + bool UpdateProjectSettingsScreen::ValidateProjectPath() { bool projectPathIsValid = true; @@ -155,4 +207,31 @@ namespace O3DE::ProjectManager return projectPreviewIsValid; } + bool UpdateProjectSettingsScreen::ValidateProjectId() + { + bool projectIdIsValid = true; + if (m_projectId->lineEdit()->text().isEmpty()) + { + projectIdIsValid = false; + m_projectId->setErrorLabelText(tr("Project ID cannot be empty.")); + } + + m_projectId->setErrorLabelVisible(!projectIdIsValid); + return projectIdIsValid; + } + + void UpdateProjectSettingsScreen::UpdateAdvancedSettingsCollapseState() + { + if (m_advancedSettingsCollapseButton->isChecked()) + { + m_advancedSettingsCollapseButton->setIcon(QIcon(":/ArrowDownLine.svg")); + m_advancedSettingWidget->hide(); + } + else + { + m_advancedSettingsCollapseButton->setIcon(QIcon(":/ArrowUpLine.svg")); + m_advancedSettingWidget->show(); + } + } + } // namespace O3DE::ProjectManager diff --git a/Code/Tools/ProjectManager/Source/UpdateProjectSettingsScreen.h b/Code/Tools/ProjectManager/Source/UpdateProjectSettingsScreen.h index 22d7794de4..28ea032985 100644 --- a/Code/Tools/ProjectManager/Source/UpdateProjectSettingsScreen.h +++ b/Code/Tools/ProjectManager/Source/UpdateProjectSettingsScreen.h @@ -12,6 +12,7 @@ #endif QT_FORWARD_DECLARE_CLASS(QLabel) +QT_FORWARD_DECLARE_CLASS(QPushButton) namespace O3DE::ProjectManager { @@ -33,16 +34,27 @@ namespace O3DE::ProjectManager public slots: void UpdateProjectPreviewPath(); void PreviewPathChanged(); + void OnProjectIdUpdated(); protected: bool ValidateProjectPath() override; virtual bool ValidateProjectPreview(); + bool ValidateProjectId(); + + inline constexpr static int s_collapseButtonSize = 24; FormBrowseEditWidget* m_projectPreview; QLabel* m_projectPreviewImage; + FormLineEditWidget* m_projectId; + + QPushButton* m_advancedSettingsCollapseButton = nullptr; + QWidget* m_advancedSettingWidget = nullptr; ProjectInfo m_projectInfo; bool m_userChangedPreview; //! Did the user change the project preview path + + protected slots: + void UpdateAdvancedSettingsCollapseState(); }; } // namespace O3DE::ProjectManager diff --git a/Code/Tools/ProjectManager/project_manager_files.cmake b/Code/Tools/ProjectManager/project_manager_files.cmake index e2e35717f6..915b1a072f 100644 --- a/Code/Tools/ProjectManager/project_manager_files.cmake +++ b/Code/Tools/ProjectManager/project_manager_files.cmake @@ -70,12 +70,17 @@ set(FILES Source/ProjectButtonWidget.cpp Source/ScreenHeaderWidget.h Source/ScreenHeaderWidget.cpp + Source/Settings.h + Source/Settings.cpp + Source/SettingsInterface.h Source/LinkWidget.h Source/LinkWidget.cpp Source/TagWidget.h Source/TagWidget.cpp Source/TemplateButtonWidget.h Source/TemplateButtonWidget.cpp + Source/ExternalLinkDialog.h + Source/ExternalLinkDialog.cpp Source/GemCatalog/GemCatalogHeaderWidget.h Source/GemCatalog/GemCatalogHeaderWidget.cpp Source/GemCatalog/GemCatalogScreen.h @@ -96,6 +101,10 @@ set(FILES Source/GemCatalog/GemListHeaderWidget.cpp Source/GemCatalog/GemModel.h Source/GemCatalog/GemModel.cpp + Source/GemCatalog/GemUninstallDialog.h + Source/GemCatalog/GemUninstallDialog.cpp + Source/GemCatalog/GemUpdateDialog.h + Source/GemCatalog/GemUpdateDialog.cpp Source/GemCatalog/GemDependenciesDialog.h Source/GemCatalog/GemDependenciesDialog.cpp Source/GemCatalog/GemRequirementDialog.h diff --git a/Code/Tools/ProjectManager/project_manager_tests_files.cmake b/Code/Tools/ProjectManager/project_manager_tests_files.cmake index 2bfe343038..012a27d13a 100644 --- a/Code/Tools/ProjectManager/project_manager_tests_files.cmake +++ b/Code/Tools/ProjectManager/project_manager_tests_files.cmake @@ -10,8 +10,9 @@ set(FILES Resources/ProjectManager.qrc Resources/ProjectManager.qss tests/ApplicationTests.cpp - tests/PythonBindingsTests.cpp tests/GemCatalogTests.cpp + tests/SettingsTests.cpp + tests/PythonBindingsTests.cpp tests/main.cpp tests/UtilsTests.cpp ) diff --git a/Code/Tools/ProjectManager/tests/GemCatalogTests.cpp b/Code/Tools/ProjectManager/tests/GemCatalogTests.cpp index f5c6d5196a..701a1ddcef 100644 --- a/Code/Tools/ProjectManager/tests/GemCatalogTests.cpp +++ b/Code/Tools/ProjectManager/tests/GemCatalogTests.cpp @@ -8,8 +8,8 @@ #include #include -#include +#include namespace O3DE::ProjectManager { @@ -17,14 +17,22 @@ namespace O3DE::ProjectManager : public ::UnitTest::ScopedAllocatorSetupFixture { public: + void SetUp() override + { + m_gemModel.reset(new GemModel()); + } - GemCatalogTests() = default; + void TearDown() override + { + m_gemModel.release(); + } + + protected: + AZStd::unique_ptr m_gemModel; }; - TEST_F(GemCatalogTests, GemCatalog_Displays_But_Does_Not_Add_Dependencies) + TEST_F(GemCatalogTests, GemCatalog_GemWithDependencies_DisplaysButDoesNotAddDependencies) { - GemModel* gemModel = new GemModel(); - // given 3 gems a,b,c where a depends on b which depends on c GemInfo gemA, gemB, gemC; QModelIndex indexA, indexB, indexC; @@ -35,30 +43,531 @@ namespace O3DE::ProjectManager gemA.m_dependencies = QStringList({ "b" }); gemB.m_dependencies = QStringList({ "c" }); - gemModel->AddGem(gemA); - indexA = gemModel->FindIndexByNameString(gemA.m_name); + indexA = m_gemModel->AddGem(gemA); + indexB = m_gemModel->AddGem(gemB); + indexC = m_gemModel->AddGem(gemC); - gemModel->AddGem(gemB); - indexB = gemModel->FindIndexByNameString(gemB.m_name); - - gemModel->AddGem(gemC); - indexC = gemModel->FindIndexByNameString(gemC.m_name); - - gemModel->UpdateGemDependencies(); + m_gemModel->UpdateGemDependencies(); EXPECT_FALSE(GemModel::IsAdded(indexA)); EXPECT_FALSE(GemModel::IsAddedDependency(indexB) || GemModel::IsAddedDependency(indexC)); // when a is added - GemModel::SetIsAdded(*gemModel, indexA, true); + GemModel::SetIsAdded(*m_gemModel, indexA, true); // expect b and c are now dependencies of an added gem but not themselves added // cmake will handle dependencies EXPECT_TRUE(GemModel::IsAddedDependency(indexB) && GemModel::IsAddedDependency(indexC)); - EXPECT_TRUE(!GemModel::IsAdded(indexB) && !GemModel::IsAdded(indexC)); + EXPECT_FALSE(GemModel::IsAdded(indexB) || GemModel::IsAdded(indexC)); - QVector gemsToAdd = gemModel->GatherGemsToBeAdded(); + const QVector& gemsToAdd = m_gemModel->GatherGemsToBeAdded(); EXPECT_TRUE(gemsToAdd.size() == 1); EXPECT_EQ(GemModel::GetName(gemsToAdd.at(0)), gemA.m_name); } + + class GemCatalogFilterTests + : public GemCatalogTests + { + public: + void SetUp() override + { + GemCatalogTests::SetUp(); + m_proxyModel.reset(new GemSortFilterProxyModel(m_gemModel.get())); + } + + void TearDown() override + { + m_proxyModel.release(); + GemCatalogTests::TearDown(); + } + + protected: + AZStd::unique_ptr m_proxyModel; + }; + + class GemCatalogSearchFilterTests + : public GemCatalogFilterTests + { + public: + void SetUp() override + { + GemCatalogFilterTests::SetUp(); + + GemInfo gemfilterName, gemfilterDisplayName, gemfilterCreator, gemfilterSummary, gemfilterFeature; + + gemfilterName.m_name = "Name"; + gemfilterDisplayName.m_name = "D"; + gemfilterCreator.m_name = "C"; + gemfilterSummary.m_name = "S"; + gemfilterFeature.m_name = "F"; + + gemfilterDisplayName.m_displayName = "Display Name"; + gemfilterCreator.m_creator = "Johnathon Doe"; + gemfilterSummary.m_summary = "Unique Summary"; + gemfilterFeature.m_features.append("Creative Feature"); + + m_gemRows.append(m_gemModel->AddGem(gemfilterName).row()); + m_gemRows.append(m_gemModel->AddGem(gemfilterDisplayName).row()); + m_gemRows.append(m_gemModel->AddGem(gemfilterCreator).row()); + m_gemRows.append(m_gemModel->AddGem(gemfilterSummary).row()); + m_gemRows.append(m_gemModel->AddGem(gemfilterFeature).row()); + } + + protected: + enum RowOrder + { + Name, + DisplayName, + Creator, + Summary, + Features + }; + + QVector m_gemRows; + }; + + TEST_F(GemCatalogSearchFilterTests, GemCatalogFilters_SearchStringName_ShowsNameGems) + { + m_proxyModel->SetSearchString("Name"); + + EXPECT_TRUE(m_proxyModel->filterAcceptsRow(m_gemRows[Name], QModelIndex())); + EXPECT_TRUE(m_proxyModel->filterAcceptsRow(m_gemRows[DisplayName], QModelIndex())); + EXPECT_FALSE(m_proxyModel->filterAcceptsRow(m_gemRows[Creator], QModelIndex())); + EXPECT_FALSE(m_proxyModel->filterAcceptsRow(m_gemRows[Summary], QModelIndex())); + EXPECT_FALSE(m_proxyModel->filterAcceptsRow(m_gemRows[Features], QModelIndex())); + } + + TEST_F(GemCatalogSearchFilterTests, GemCatalogFilters_SearchStringDisplayName_ShowsDisplayNameGem) + { + m_proxyModel->SetSearchString("Display Name"); + + EXPECT_FALSE(m_proxyModel->filterAcceptsRow(m_gemRows[Name], QModelIndex())); + EXPECT_TRUE(m_proxyModel->filterAcceptsRow(m_gemRows[DisplayName], QModelIndex())); + EXPECT_FALSE(m_proxyModel->filterAcceptsRow(m_gemRows[Creator], QModelIndex())); + EXPECT_FALSE(m_proxyModel->filterAcceptsRow(m_gemRows[Summary], QModelIndex())); + EXPECT_FALSE(m_proxyModel->filterAcceptsRow(m_gemRows[Features], QModelIndex())); + } + + TEST_F(GemCatalogSearchFilterTests, GemCatalogFilters_SearchStringCreator_ShowsCreatorGem) + { + m_proxyModel->SetSearchString("Johnathon Doe"); + + EXPECT_FALSE(m_proxyModel->filterAcceptsRow(m_gemRows[Name], QModelIndex())); + EXPECT_FALSE(m_proxyModel->filterAcceptsRow(m_gemRows[DisplayName], QModelIndex())); + EXPECT_TRUE(m_proxyModel->filterAcceptsRow(m_gemRows[Creator], QModelIndex())); + EXPECT_FALSE(m_proxyModel->filterAcceptsRow(m_gemRows[Summary], QModelIndex())); + EXPECT_FALSE(m_proxyModel->filterAcceptsRow(m_gemRows[Features], QModelIndex())); + } + + TEST_F(GemCatalogSearchFilterTests, GemCatalogFilters_SearchStringSummary_ShowsSummaryGem) + { + m_proxyModel->SetSearchString("Unique Summary"); + + EXPECT_FALSE(m_proxyModel->filterAcceptsRow(m_gemRows[Name], QModelIndex())); + EXPECT_FALSE(m_proxyModel->filterAcceptsRow(m_gemRows[DisplayName], QModelIndex())); + EXPECT_FALSE(m_proxyModel->filterAcceptsRow(m_gemRows[Creator], QModelIndex())); + EXPECT_TRUE(m_proxyModel->filterAcceptsRow(m_gemRows[Summary], QModelIndex())); + EXPECT_FALSE(m_proxyModel->filterAcceptsRow(m_gemRows[Features], QModelIndex())); + } + + TEST_F(GemCatalogSearchFilterTests, GemCatalogFilters_SearchStringFeatures_ShowsFeatureGem) + { + m_proxyModel->SetSearchString("Creative"); + + EXPECT_FALSE(m_proxyModel->filterAcceptsRow(m_gemRows[Name], QModelIndex())); + EXPECT_FALSE(m_proxyModel->filterAcceptsRow(m_gemRows[DisplayName], QModelIndex())); + EXPECT_FALSE(m_proxyModel->filterAcceptsRow(m_gemRows[Creator], QModelIndex())); + EXPECT_FALSE(m_proxyModel->filterAcceptsRow(m_gemRows[Summary], QModelIndex())); + EXPECT_TRUE(m_proxyModel->filterAcceptsRow(m_gemRows[Features], QModelIndex())); + } + + TEST_F(GemCatalogSearchFilterTests, GemCatalogFilters_SearchStringEmpty_ShowsAll) + { + m_proxyModel->SetSearchString(""); + + EXPECT_TRUE(m_proxyModel->filterAcceptsRow(m_gemRows[Name], QModelIndex())); + EXPECT_TRUE(m_proxyModel->filterAcceptsRow(m_gemRows[DisplayName], QModelIndex())); + EXPECT_TRUE(m_proxyModel->filterAcceptsRow(m_gemRows[Creator], QModelIndex())); + EXPECT_TRUE(m_proxyModel->filterAcceptsRow(m_gemRows[Summary], QModelIndex())); + EXPECT_TRUE(m_proxyModel->filterAcceptsRow(m_gemRows[Features], QModelIndex())); + } + + TEST_F(GemCatalogSearchFilterTests, GemCatalogFilters_SearchStringCommonCharacter_ShowsAll) + { + // All gems contain "a" in a searchable field so all should be shown + m_proxyModel->SetSearchString("a"); + + EXPECT_TRUE(m_proxyModel->filterAcceptsRow(m_gemRows[Name], QModelIndex())); + EXPECT_TRUE(m_proxyModel->filterAcceptsRow(m_gemRows[DisplayName], QModelIndex())); + EXPECT_TRUE(m_proxyModel->filterAcceptsRow(m_gemRows[Creator], QModelIndex())); + EXPECT_TRUE(m_proxyModel->filterAcceptsRow(m_gemRows[Summary], QModelIndex())); + EXPECT_TRUE(m_proxyModel->filterAcceptsRow(m_gemRows[Features], QModelIndex())); + } + + TEST_F(GemCatalogSearchFilterTests, GemCatalogFilters_SearchStringDifferentCaseCommonCharacter_ShowsAll) + { + // No gems contain the character "A" but search should be case insensitive + m_proxyModel->SetSearchString("A"); + + EXPECT_TRUE(m_proxyModel->filterAcceptsRow(m_gemRows[Name], QModelIndex())); + EXPECT_TRUE(m_proxyModel->filterAcceptsRow(m_gemRows[DisplayName], QModelIndex())); + EXPECT_TRUE(m_proxyModel->filterAcceptsRow(m_gemRows[Creator], QModelIndex())); + EXPECT_TRUE(m_proxyModel->filterAcceptsRow(m_gemRows[Summary], QModelIndex())); + EXPECT_TRUE(m_proxyModel->filterAcceptsRow(m_gemRows[Features], QModelIndex())); + } + + TEST_F(GemCatalogSearchFilterTests, GemCatalogFilters_SearchStringNoneContainCharacter_ShowsNone) + { + // No gems contain the character "z" or "Z" so none should be shown + m_proxyModel->SetSearchString("z"); + + EXPECT_FALSE(m_proxyModel->filterAcceptsRow(m_gemRows[Name], QModelIndex())); + EXPECT_FALSE(m_proxyModel->filterAcceptsRow(m_gemRows[DisplayName], QModelIndex())); + EXPECT_FALSE(m_proxyModel->filterAcceptsRow(m_gemRows[Creator], QModelIndex())); + EXPECT_FALSE(m_proxyModel->filterAcceptsRow(m_gemRows[Summary], QModelIndex())); + EXPECT_FALSE(m_proxyModel->filterAcceptsRow(m_gemRows[Features], QModelIndex())); + } + + TEST_F(GemCatalogSearchFilterTests, GemCatalogFilters_SearchStringPartialMatchString_ShowsNone) + { + // Token matching is currently not supported + // The whole string must match a substring + m_proxyModel->SetSearchString("Name Token"); + + EXPECT_FALSE(m_proxyModel->filterAcceptsRow(m_gemRows[Name], QModelIndex())); + EXPECT_FALSE(m_proxyModel->filterAcceptsRow(m_gemRows[DisplayName], QModelIndex())); + EXPECT_FALSE(m_proxyModel->filterAcceptsRow(m_gemRows[Creator], QModelIndex())); + EXPECT_FALSE(m_proxyModel->filterAcceptsRow(m_gemRows[Summary], QModelIndex())); + EXPECT_FALSE(m_proxyModel->filterAcceptsRow(m_gemRows[Features], QModelIndex())); + } + + class GemCatalogSelectedActiveFilterTests + : public GemCatalogFilterTests + { + public: + void SetUp() override + { + GemCatalogFilterTests::SetUp(); + + GemInfo gemSelected, gemSelectedDep, gemUnselected, gemUnselectedDep, gemActive, gemInactive; + + gemSelected.m_name = "selected"; + gemSelectedDep.m_name = "selectedDep"; + gemUnselected.m_name = "unselected"; + gemUnselectedDep.m_name = "unselectedDep"; + gemActive.m_name = "active"; + gemInactive.m_name = "inactive"; + + gemSelected.m_dependencies = QStringList({ "selectedDep" }); + gemUnselected.m_dependencies = QStringList({ "unselectedDep" }); + + m_gemIndices.append(m_gemModel->AddGem(gemSelected)); + m_gemIndices.append(m_gemModel->AddGem(gemSelectedDep)); + m_gemIndices.append(m_gemModel->AddGem(gemUnselected)); + m_gemIndices.append(m_gemModel->AddGem(gemUnselectedDep)); + m_gemIndices.append(m_gemModel->AddGem(gemActive)); + m_gemIndices.append(m_gemModel->AddGem(gemInactive)); + + m_gemModel->UpdateGemDependencies(); + + // Set intial state of catalog with the to be unselected gem currently added along with active gem + GemModel::SetIsAdded(*m_gemModel, m_gemIndices[Unselected], true); + GemModel::SetWasPreviouslyAdded(*m_gemModel, m_gemIndices[Unselected], true); + GemModel::SetIsAdded(*m_gemModel, m_gemIndices[Active], true); + GemModel::SetWasPreviouslyAdded(*m_gemModel, m_gemIndices[Active], true); + + // Add selected gem and remove unselected gem + GemModel::SetIsAdded(*m_gemModel, m_gemIndices[Selected], true); + GemModel::SetIsAdded(*m_gemModel, m_gemIndices[Unselected], false); + } + + protected: + enum IndexOrder + { + Selected, + SelectedDep, + Unselected, + UnselectedDep, + Active, + Inactive + }; + + QVector m_gemIndices; + }; + + TEST_F(GemCatalogSelectedActiveFilterTests, GemCatalogFilters_SelectedActiveIntialState_AddedGemsAndDependenciesAreAdded) + { + // Check if gems are all in expected state + // if this test fails all other Selected/Active tests are invalid + EXPECT_TRUE(GemModel::IsAdded(m_gemIndices[Selected])); + EXPECT_TRUE(GemModel::IsAddedDependency(m_gemIndices[SelectedDep])); + EXPECT_FALSE(GemModel::IsAdded(m_gemIndices[Unselected])); + EXPECT_FALSE(GemModel::IsAddedDependency(m_gemIndices[UnselectedDep])); + EXPECT_TRUE(GemModel::IsAdded(m_gemIndices[Active])); + EXPECT_FALSE(GemModel::IsAdded(m_gemIndices[Inactive])); + } + + TEST_F(GemCatalogSelectedActiveFilterTests, GemCatalogFilters_SelectedActiveNoFilter_ShowsAll) + { + // Filter is clear + EXPECT_TRUE(m_proxyModel->filterAcceptsRow(m_gemIndices[Selected].row(), QModelIndex())); + EXPECT_TRUE(m_proxyModel->filterAcceptsRow(m_gemIndices[SelectedDep].row(), QModelIndex())); + EXPECT_TRUE(m_proxyModel->filterAcceptsRow(m_gemIndices[Unselected].row(), QModelIndex())); + EXPECT_TRUE(m_proxyModel->filterAcceptsRow(m_gemIndices[UnselectedDep].row(), QModelIndex())); + EXPECT_TRUE(m_proxyModel->filterAcceptsRow(m_gemIndices[Active].row(), QModelIndex())); + EXPECT_TRUE(m_proxyModel->filterAcceptsRow(m_gemIndices[Inactive].row(), QModelIndex())); + } + + TEST_F(GemCatalogSelectedActiveFilterTests, GemCatalogFilters_FilterSelected_ShowsSelectedAndDependencies) + { + // Check selected filter + // Selected dependencies should also be shown + m_proxyModel->SetGemSelected(GemSortFilterProxyModel::GemSelected::Selected); + + EXPECT_TRUE(m_proxyModel->filterAcceptsRow(m_gemIndices[Selected].row(), QModelIndex())); + EXPECT_TRUE(m_proxyModel->filterAcceptsRow(m_gemIndices[SelectedDep].row(), QModelIndex())); + EXPECT_FALSE(m_proxyModel->filterAcceptsRow(m_gemIndices[Unselected].row(), QModelIndex())); + EXPECT_FALSE(m_proxyModel->filterAcceptsRow(m_gemIndices[UnselectedDep].row(), QModelIndex())); + EXPECT_FALSE(m_proxyModel->filterAcceptsRow(m_gemIndices[Active].row(), QModelIndex())); + EXPECT_FALSE(m_proxyModel->filterAcceptsRow(m_gemIndices[Inactive].row(), QModelIndex())); + } + + TEST_F(GemCatalogSelectedActiveFilterTests, GemCatalogFilters_FilterUnselected_ShowsUnselectedAndDependencies) + { + // Check unselected filter + // Unselected dependencies should also be shown + m_proxyModel->SetGemSelected(GemSortFilterProxyModel::GemSelected::Unselected); + + EXPECT_FALSE(m_proxyModel->filterAcceptsRow(m_gemIndices[Selected].row(), QModelIndex())); + EXPECT_FALSE(m_proxyModel->filterAcceptsRow(m_gemIndices[SelectedDep].row(), QModelIndex())); + EXPECT_TRUE(m_proxyModel->filterAcceptsRow(m_gemIndices[Unselected].row(), QModelIndex())); + EXPECT_TRUE(m_proxyModel->filterAcceptsRow(m_gemIndices[UnselectedDep].row(), QModelIndex())); + EXPECT_FALSE(m_proxyModel->filterAcceptsRow(m_gemIndices[Active].row(), QModelIndex())); + EXPECT_FALSE(m_proxyModel->filterAcceptsRow(m_gemIndices[Inactive].row(), QModelIndex())); + } + + TEST_F(GemCatalogSelectedActiveFilterTests, GemCatalogFilters_FilterSelectedAndUnselected_ShowsAllChangesAndDependencies) + { + // Check both un/selected filter + m_proxyModel->SetGemSelected(GemSortFilterProxyModel::GemSelected::Both); + + EXPECT_TRUE(m_proxyModel->filterAcceptsRow(m_gemIndices[Selected].row(), QModelIndex())); + EXPECT_TRUE(m_proxyModel->filterAcceptsRow(m_gemIndices[SelectedDep].row(), QModelIndex())); + EXPECT_TRUE(m_proxyModel->filterAcceptsRow(m_gemIndices[Unselected].row(), QModelIndex())); + EXPECT_TRUE(m_proxyModel->filterAcceptsRow(m_gemIndices[UnselectedDep].row(), QModelIndex())); + EXPECT_FALSE(m_proxyModel->filterAcceptsRow(m_gemIndices[Active].row(), QModelIndex())); + EXPECT_FALSE(m_proxyModel->filterAcceptsRow(m_gemIndices[Inactive].row(), QModelIndex())); + } + + TEST_F(GemCatalogSelectedActiveFilterTests, GemCatalogFilters_FilterActive_ShowsActive) + { + // Check active filter + // Active dependencies should also be shown + m_proxyModel->SetGemActive(GemSortFilterProxyModel::GemActive::Active); + + EXPECT_TRUE(m_proxyModel->filterAcceptsRow(m_gemIndices[Selected].row(), QModelIndex())); + EXPECT_TRUE(m_proxyModel->filterAcceptsRow(m_gemIndices[SelectedDep].row(), QModelIndex())); + EXPECT_FALSE(m_proxyModel->filterAcceptsRow(m_gemIndices[Unselected].row(), QModelIndex())); + EXPECT_FALSE(m_proxyModel->filterAcceptsRow(m_gemIndices[UnselectedDep].row(), QModelIndex())); + EXPECT_TRUE(m_proxyModel->filterAcceptsRow(m_gemIndices[Active].row(), QModelIndex())); + EXPECT_FALSE(m_proxyModel->filterAcceptsRow(m_gemIndices[Inactive].row(), QModelIndex())); + } + + TEST_F(GemCatalogSelectedActiveFilterTests, GemCatalogFilters_FilterActive_ShowsInactive) + { + // Check inactive filter + m_proxyModel->SetGemActive(GemSortFilterProxyModel::GemActive::Inactive); + + EXPECT_FALSE(m_proxyModel->filterAcceptsRow(m_gemIndices[Selected].row(), QModelIndex())); + EXPECT_FALSE(m_proxyModel->filterAcceptsRow(m_gemIndices[SelectedDep].row(), QModelIndex())); + EXPECT_TRUE(m_proxyModel->filterAcceptsRow(m_gemIndices[Unselected].row(), QModelIndex())); + EXPECT_TRUE(m_proxyModel->filterAcceptsRow(m_gemIndices[UnselectedDep].row(), QModelIndex())); + EXPECT_FALSE(m_proxyModel->filterAcceptsRow(m_gemIndices[Active].row(), QModelIndex())); + EXPECT_TRUE(m_proxyModel->filterAcceptsRow(m_gemIndices[Inactive].row(), QModelIndex())); + } + + class GemCatalogMiscFilterTests + : public GemCatalogFilterTests + { + public: + void SetUp() override + { + GemCatalogFilterTests::SetUp(); + + GemInfo gemA, gemB, gemC; + + gemA.m_name = "Default Audio"; + gemB.m_name = "Mobile UX"; + gemC.m_name = "City Props"; + + gemA.m_gemOrigin = GemInfo::GemOrigin::Open3DEngine; + gemB.m_gemOrigin = GemInfo::GemOrigin::Local; + gemC.m_gemOrigin = GemInfo::GemOrigin::Remote; + + gemA.m_types = GemInfo::Type::Code; + gemB.m_types = GemInfo::Type::Code | GemInfo::Type::Tool; + gemC.m_types = GemInfo::Type::Asset; + + using Plat = GemInfo::Platform; + gemA.m_platforms = Plat::Windows; + gemB.m_platforms = Plat::Android | Plat::iOS; + gemC.m_platforms = Plat::Android | Plat::iOS | Plat::Linux | Plat::macOS | Plat::Windows; + + gemA.m_features = QStringList({ "Audio", "Framework", "SDK" }); + gemB.m_features = QStringList({ "Framework", "Tools", "UI" }); + gemC.m_features = QStringList({ "Assets", "Content", "Environment" }); + + m_gemRows.append(m_gemModel->AddGem(gemA).row()); + m_gemRows.append(m_gemModel->AddGem(gemB).row()); + m_gemRows.append(m_gemModel->AddGem(gemC).row()); + } + + protected: + enum RowOrder + { + DefaultAudio, + MobileUX, + CityProps + }; + + QVector m_gemRows; + }; + + TEST_F(GemCatalogMiscFilterTests, GemCatalogFilters_MiscNoFilter_ShowsAll) + { + // No filter + EXPECT_TRUE(m_proxyModel->filterAcceptsRow(m_gemRows[DefaultAudio], QModelIndex())); + EXPECT_TRUE(m_proxyModel->filterAcceptsRow(m_gemRows[MobileUX], QModelIndex())); + EXPECT_TRUE(m_proxyModel->filterAcceptsRow(m_gemRows[CityProps], QModelIndex())); + } + + TEST_F(GemCatalogMiscFilterTests, GemCatalogFilters_FilterSingleOrigin_ShowsOriginMatch) + { + m_proxyModel->SetGemOrigins(GemInfo::GemOrigin::Open3DEngine); + + EXPECT_TRUE(m_proxyModel->filterAcceptsRow(m_gemRows[DefaultAudio], QModelIndex())); + EXPECT_FALSE(m_proxyModel->filterAcceptsRow(m_gemRows[MobileUX], QModelIndex())); + EXPECT_FALSE(m_proxyModel->filterAcceptsRow(m_gemRows[CityProps], QModelIndex())); + + m_proxyModel->SetGemOrigins(GemInfo::GemOrigin::Local); + + EXPECT_FALSE(m_proxyModel->filterAcceptsRow(m_gemRows[DefaultAudio], QModelIndex())); + EXPECT_TRUE(m_proxyModel->filterAcceptsRow(m_gemRows[MobileUX], QModelIndex())); + EXPECT_FALSE(m_proxyModel->filterAcceptsRow(m_gemRows[CityProps], QModelIndex())); + + m_proxyModel->SetGemOrigins(GemInfo::GemOrigin::Remote); + + EXPECT_FALSE(m_proxyModel->filterAcceptsRow(m_gemRows[DefaultAudio], QModelIndex())); + EXPECT_FALSE(m_proxyModel->filterAcceptsRow(m_gemRows[MobileUX], QModelIndex())); + EXPECT_TRUE(m_proxyModel->filterAcceptsRow(m_gemRows[CityProps], QModelIndex())); + } + + TEST_F(GemCatalogMiscFilterTests, GemCatalogFilters_FilterMultipleOrigins_ShowsMultipleOriginMatches) + { + m_proxyModel->SetGemOrigins(GemInfo::GemOrigin::Open3DEngine | GemInfo::GemOrigin::Local); + + EXPECT_TRUE(m_proxyModel->filterAcceptsRow(m_gemRows[DefaultAudio], QModelIndex())); + EXPECT_TRUE(m_proxyModel->filterAcceptsRow(m_gemRows[MobileUX], QModelIndex())); + EXPECT_FALSE(m_proxyModel->filterAcceptsRow(m_gemRows[CityProps], QModelIndex())); + } + + TEST_F(GemCatalogMiscFilterTests, GemCatalogFilters_FilterSingleType_ShowsTypeMatch) + { + m_proxyModel->SetTypes(GemInfo::Type::Code); + + EXPECT_TRUE(m_proxyModel->filterAcceptsRow(m_gemRows[DefaultAudio], QModelIndex())); + EXPECT_TRUE(m_proxyModel->filterAcceptsRow(m_gemRows[MobileUX], QModelIndex())); + EXPECT_FALSE(m_proxyModel->filterAcceptsRow(m_gemRows[CityProps], QModelIndex())); + + m_proxyModel->SetTypes(GemInfo::Type::Tool); + + EXPECT_FALSE(m_proxyModel->filterAcceptsRow(m_gemRows[DefaultAudio], QModelIndex())); + EXPECT_TRUE(m_proxyModel->filterAcceptsRow(m_gemRows[MobileUX], QModelIndex())); + EXPECT_FALSE(m_proxyModel->filterAcceptsRow(m_gemRows[CityProps], QModelIndex())); + + m_proxyModel->SetTypes(GemInfo::Type::Asset); + + EXPECT_FALSE(m_proxyModel->filterAcceptsRow(m_gemRows[DefaultAudio], QModelIndex())); + EXPECT_FALSE(m_proxyModel->filterAcceptsRow(m_gemRows[MobileUX], QModelIndex())); + EXPECT_TRUE(m_proxyModel->filterAcceptsRow(m_gemRows[CityProps], QModelIndex())); + } + + TEST_F(GemCatalogMiscFilterTests, GemCatalogFilters_FilterMultipleTypes_ShowsMultipleTypeMatches) + { + m_proxyModel->SetTypes(GemInfo::Type::Tool | GemInfo::Type::Asset); + + EXPECT_FALSE(m_proxyModel->filterAcceptsRow(m_gemRows[DefaultAudio], QModelIndex())); + EXPECT_TRUE(m_proxyModel->filterAcceptsRow(m_gemRows[MobileUX], QModelIndex())); + EXPECT_TRUE(m_proxyModel->filterAcceptsRow(m_gemRows[CityProps], QModelIndex())); + } + + TEST_F(GemCatalogMiscFilterTests, GemCatalogFilters_FilterSinglePlatform_ShowsPlatformMatch) + { + m_proxyModel->SetPlatforms(GemInfo::Platform::Windows); + + EXPECT_TRUE(m_proxyModel->filterAcceptsRow(m_gemRows[DefaultAudio], QModelIndex())); + EXPECT_FALSE(m_proxyModel->filterAcceptsRow(m_gemRows[MobileUX], QModelIndex())); + EXPECT_TRUE(m_proxyModel->filterAcceptsRow(m_gemRows[CityProps], QModelIndex())); + + m_proxyModel->SetPlatforms(GemInfo::Platform::Android); + + EXPECT_FALSE(m_proxyModel->filterAcceptsRow(m_gemRows[DefaultAudio], QModelIndex())); + EXPECT_TRUE(m_proxyModel->filterAcceptsRow(m_gemRows[MobileUX], QModelIndex())); + EXPECT_TRUE(m_proxyModel->filterAcceptsRow(m_gemRows[CityProps], QModelIndex())); + + m_proxyModel->SetPlatforms(GemInfo::Platform::macOS); + + EXPECT_FALSE(m_proxyModel->filterAcceptsRow(m_gemRows[DefaultAudio], QModelIndex())); + EXPECT_FALSE(m_proxyModel->filterAcceptsRow(m_gemRows[MobileUX], QModelIndex())); + EXPECT_TRUE(m_proxyModel->filterAcceptsRow(m_gemRows[CityProps], QModelIndex())); + } + + TEST_F(GemCatalogMiscFilterTests, GemCatalogFilters_FilterMultiplePlatforms_ShowsMultiplePlatformMatches) + { + m_proxyModel->SetPlatforms(GemInfo::Platform::Android | GemInfo::Platform::iOS); + + EXPECT_FALSE(m_proxyModel->filterAcceptsRow(m_gemRows[DefaultAudio], QModelIndex())); + EXPECT_TRUE(m_proxyModel->filterAcceptsRow(m_gemRows[MobileUX], QModelIndex())); + EXPECT_TRUE(m_proxyModel->filterAcceptsRow(m_gemRows[CityProps], QModelIndex())); + } + + TEST_F(GemCatalogMiscFilterTests, GemCatalogFilters_FilterSingleFeature_ShowsFeatureMatch) + { + m_proxyModel->SetFeatures({ "Audio" }); + + EXPECT_TRUE(m_proxyModel->filterAcceptsRow(m_gemRows[DefaultAudio], QModelIndex())); + EXPECT_FALSE(m_proxyModel->filterAcceptsRow(m_gemRows[MobileUX], QModelIndex())); + EXPECT_FALSE(m_proxyModel->filterAcceptsRow(m_gemRows[CityProps], QModelIndex())); + + m_proxyModel->SetFeatures({ "Tools", }); + + EXPECT_FALSE(m_proxyModel->filterAcceptsRow(m_gemRows[DefaultAudio], QModelIndex())); + EXPECT_TRUE(m_proxyModel->filterAcceptsRow(m_gemRows[MobileUX], QModelIndex())); + EXPECT_FALSE(m_proxyModel->filterAcceptsRow(m_gemRows[CityProps], QModelIndex())); + + m_proxyModel->SetFeatures({ "Environment" }); + + EXPECT_FALSE(m_proxyModel->filterAcceptsRow(m_gemRows[DefaultAudio], QModelIndex())); + EXPECT_FALSE(m_proxyModel->filterAcceptsRow(m_gemRows[MobileUX], QModelIndex())); + EXPECT_TRUE(m_proxyModel->filterAcceptsRow(m_gemRows[CityProps], QModelIndex())); + } + + TEST_F(GemCatalogMiscFilterTests, GemCatalogFilters_FilterMultipleFeatures_ShowsMultipleFeatureMatches) + { + m_proxyModel->SetFeatures({ "Assets", "Framework" }); + + EXPECT_TRUE(m_proxyModel->filterAcceptsRow(m_gemRows[DefaultAudio], QModelIndex())); + EXPECT_TRUE(m_proxyModel->filterAcceptsRow(m_gemRows[MobileUX], QModelIndex())); + EXPECT_TRUE(m_proxyModel->filterAcceptsRow(m_gemRows[CityProps], QModelIndex())); + } + + TEST_F(GemCatalogMiscFilterTests, GemCatalogFilters_FilterPartialMatchFeature_ShowsNone) + { + // Features must be an exact match to filter by them directly + m_proxyModel->SetFeatures({ "Frame" }); + + EXPECT_FALSE(m_proxyModel->filterAcceptsRow(m_gemRows[DefaultAudio], QModelIndex())); + EXPECT_FALSE(m_proxyModel->filterAcceptsRow(m_gemRows[MobileUX], QModelIndex())); + EXPECT_FALSE(m_proxyModel->filterAcceptsRow(m_gemRows[CityProps], QModelIndex())); + } } diff --git a/Code/Tools/ProjectManager/tests/SettingsTests.cpp b/Code/Tools/ProjectManager/tests/SettingsTests.cpp new file mode 100644 index 0000000000..d994a59737 --- /dev/null +++ b/Code/Tools/ProjectManager/tests/SettingsTests.cpp @@ -0,0 +1,184 @@ +/* + * Copyright (c) Contributors to the Open 3D Engine Project. + * For complete copyright and license terms please see the LICENSE at the root of this distribution. + * + * SPDX-License-Identifier: Apache-2.0 OR MIT + * + */ + +#include +#include +#include +#include +#include +#include + +#include + +namespace O3DE::ProjectManager +{ + class SettingsTests + : public ::UnitTest::ScopedAllocatorSetupFixture + { + public: + ~SettingsTests() override = default; + void SetUp() override + { + UnitTest::ScopedAllocatorSetupFixture::SetUp(); + + m_registry = AZStd::make_unique(); + // Store off the old global settings registry to restore after each test + m_oldSettingsRegistry = AZ::SettingsRegistry::Get(); + if (m_oldSettingsRegistry != nullptr) + { + AZ::SettingsRegistry::Unregister(m_oldSettingsRegistry); + } + AZ::SettingsRegistry::Register(m_registry.get()); + + m_serializeContext = AZStd::make_unique(); + m_registrationContext = AZStd::make_unique(); + + m_registry->SetContext(m_serializeContext.get()); + m_registry->SetContext(m_registrationContext.get()); + + AZ::JsonSystemComponent::Reflect(m_registrationContext.get()); + + m_serializeContext->RegisterGenericType>(); + + m_settings = AZStd::make_unique(/*saveToDisk*/ false); + + m_projectInfo.m_path = "Z:/ProjectTestPath"; + } + + void TearDown() override + { + m_settings.reset(); + + m_registrationContext->EnableRemoveReflection(); + AZ::JsonSystemComponent::Reflect(m_registrationContext.get()); + m_registrationContext->DisableRemoveReflection(); + + m_registrationContext.reset(); + m_serializeContext.reset(); + + // Restore the old global settings registry + AZ::SettingsRegistry::Unregister(m_registry.get()); + if (m_oldSettingsRegistry != nullptr) + { + AZ::SettingsRegistry::Register(m_oldSettingsRegistry); + m_oldSettingsRegistry = nullptr; + } + m_registry.reset(); + + UnitTest::ScopedAllocatorSetupFixture::TearDown(); + } + + protected: + AZStd::unique_ptr m_settings; + const QString m_settingsPath = "/Testing/TestKey"; + const QString m_newSettingsPath = "/Testing/NewTestKey"; + ProjectInfo m_projectInfo; + + private: + AZ::SettingsRegistryInterface* m_oldSettingsRegistry = nullptr; + AZStd::unique_ptr m_registry; + AZStd::unique_ptr m_serializeContext; + AZStd::unique_ptr m_registrationContext; + }; + + TEST_F(SettingsTests, Settings_GetUnsetPathBool_ReturnsFalse) + { + bool settingsResult = false; + EXPECT_FALSE(m_settings->Get(settingsResult, m_settingsPath)); + EXPECT_FALSE(settingsResult); + } + + TEST_F(SettingsTests, Settings_SetAndGetValueBool_Success) + { + bool settingsResult = false; + EXPECT_FALSE(m_settings->Get(settingsResult, m_settingsPath)); + + EXPECT_TRUE(m_settings->Set(m_settingsPath, true)); + + settingsResult = false; + EXPECT_TRUE(m_settings->Get(settingsResult, m_settingsPath)); + EXPECT_TRUE(settingsResult); + } + + TEST_F(SettingsTests, Settings_GetUnsetPathString_ReturnsFalse) + { + QString settingsResult; + EXPECT_FALSE(m_settings->Get(settingsResult, m_settingsPath)); + EXPECT_TRUE(settingsResult.isEmpty()); + } + + TEST_F(SettingsTests, Settings_SetAndGetValueString_Success) + { + QString settingsResult; + EXPECT_FALSE(m_settings->Get(settingsResult, m_settingsPath)); + + QString settingsValue = "TestValue"; + + EXPECT_TRUE(m_settings->Set(m_settingsPath, settingsValue)); + + EXPECT_TRUE(m_settings->Get(settingsResult, m_settingsPath)); + EXPECT_TRUE(settingsResult == settingsValue); + } + + TEST_F(SettingsTests, Settings_CopyStringRemoveOriginal_SuccessAndRemovesOriginal) + { + QString settingsResult; + EXPECT_FALSE(m_settings->Get(settingsResult, m_newSettingsPath)); + + QString settingsValue = "TestValue"; + + EXPECT_TRUE(m_settings->Set(m_settingsPath, settingsValue)); + + EXPECT_TRUE(m_settings->Copy(m_settingsPath, m_newSettingsPath, /*removeOrig*/ true)); + + // Check that old path value is removed + EXPECT_FALSE(m_settings->Get(settingsResult, m_settingsPath)); + + EXPECT_TRUE(m_settings->Get(settingsResult, m_newSettingsPath)); + EXPECT_TRUE(settingsResult == settingsValue); + } + + TEST_F(SettingsTests, Settings_RemoveProjectManagerKey_RemovesKey) + { + QString settingsResult; + EXPECT_FALSE(m_settings->Get(settingsResult, m_settingsPath)); + + QString settingsValue = "TestValue"; + + EXPECT_TRUE(m_settings->Set(m_settingsPath, settingsValue)); + EXPECT_TRUE(m_settings->Get(settingsResult, m_settingsPath)); + + EXPECT_TRUE(m_settings->Remove(m_settingsPath)); + EXPECT_FALSE(m_settings->Get(settingsResult, m_settingsPath)); + } + + TEST_F(SettingsTests, Settings_GetUnsetBuildPath_ReturnsFalse) + { + bool buildResult = true; + EXPECT_FALSE(m_settings->GetProjectBuiltSuccessfully(buildResult, m_projectInfo)); + EXPECT_FALSE(buildResult); + } + + TEST_F(SettingsTests, Settings_SetProjectBuiltSuccessfully_ReturnsTrue) + { + EXPECT_TRUE(m_settings->SetProjectBuiltSuccessfully(m_projectInfo, true)); + + bool buildResult = false; + EXPECT_TRUE(m_settings->GetProjectBuiltSuccessfully(buildResult, m_projectInfo)); + EXPECT_TRUE(buildResult); + } + + TEST_F(SettingsTests, Settings_SetProjectBuiltUnsuccessfully_ReturnsFalse) + { + EXPECT_TRUE(m_settings->SetProjectBuiltSuccessfully(m_projectInfo, false)); + + bool buildResult = false; + EXPECT_TRUE(m_settings->GetProjectBuiltSuccessfully(buildResult, m_projectInfo)); + EXPECT_FALSE(buildResult); + } +} diff --git a/Code/Tools/PythonBindingsExample/source/Application.cpp b/Code/Tools/PythonBindingsExample/source/Application.cpp index ab1d1b5acf..cfb28d8e09 100644 --- a/Code/Tools/PythonBindingsExample/source/Application.cpp +++ b/Code/Tools/PythonBindingsExample/source/Application.cpp @@ -39,7 +39,6 @@ namespace PythonBindingsExample AzToolsFramework::EditorPythonConsoleNotificationBus::Handler::BusConnect(); // prepare the Python binding gem(s) - CalculateExecutablePath(); Start(Descriptor()); AZ::SerializeContext* context; diff --git a/Code/Tools/PythonBindingsExample/tests/run_python_tests.bat b/Code/Tools/PythonBindingsExample/tests/run_python_tests.bat deleted file mode 100644 index 216f2dd0da..0000000000 --- a/Code/Tools/PythonBindingsExample/tests/run_python_tests.bat +++ /dev/null @@ -1,59 +0,0 @@ -@echo off - -REM -REM Copyright (c) Contributors to the Open 3D Engine Project. -REM For complete copyright and license terms please see the LICENSE at the root of this distribution. -REM -REM SPDX-License-Identifier: Apache-2.0 OR MIT -REM -REM - -PUSHD "%~dp0" - -SET CWD="%~dp0" -SET EXEPATH141="../../../../Bin64vc141/PythonBindingsExample.exe" -SET EXEPATH142="../../../../Bin64vc142/PythonBindingsExample.exe" -SET EXEPATH="" - -IF EXIST %EXEPATH141% ( - SET EXEPATH=%EXEPATH141% -) ELSE ( - IF EXIST %EXEPATH142% ( - SET EXEPATH=%EXEPATH142% - ) ELSE ( - ECHO PythonBindingsExample.exe not found. - ) -) -IF /I %EXEPATH% EQU "" ( - ECHO [FAILED] Could not run tests since a build of PythonBindingsExample.exe is missing - GOTO exit_app -) - -ECHO Testing basics of tool Python bindings in %CWD% - -%EXEPATH% --file test_hello_tool.py -IF %ERRORLEVEL% EQU 0 ( - ECHO [WORKED] test_hello_tool.py -) ELSE ( - ECHO [FAILED] test_hello_tool.py with %ERRORLEVEL% - GOTO exit_app -) - -%EXEPATH% --file test_framework.py --arg entity -IF %ERRORLEVEL% EQU 0 ( - ECHO [WORKED] test_framework.py --arg entity -) ELSE ( - ECHO [FAILED] test_framework.py --arg entity with %ERRORLEVEL% - GOTO exit_app -) - -%EXEPATH% --file test_framework.py --arg math -IF %ERRORLEVEL% EQU 0 ( - ECHO [WORKED] test_framework.py --arg math -) ELSE ( - ECHO [FAILED] test_framework.py --arg math with %ERRORLEVEL% - GOTO exit_app -) - -:exit_app -POPD diff --git a/Code/Tools/SceneAPI/SceneCore/DataTypes/GraphData/ISkinWeightData.h b/Code/Tools/SceneAPI/SceneCore/DataTypes/GraphData/ISkinWeightData.h index 4b4cd2636f..6dacb61a5f 100644 --- a/Code/Tools/SceneAPI/SceneCore/DataTypes/GraphData/ISkinWeightData.h +++ b/Code/Tools/SceneAPI/SceneCore/DataTypes/GraphData/ISkinWeightData.h @@ -28,6 +28,12 @@ namespace AZ { int boneId; float weight; + + bool IsClose(const Link& other, float tolerance) const + { + return boneId == other.boneId && + AZ::IsClose(weight, other.weight, tolerance); + } }; virtual ~ISkinWeightData() override = default; diff --git a/Code/Tools/SceneAPI/SceneCore/DataTypes/Rules/IScriptProcessorRule.h b/Code/Tools/SceneAPI/SceneCore/DataTypes/Rules/IScriptProcessorRule.h index 36be5f61d3..2b2abae561 100644 --- a/Code/Tools/SceneAPI/SceneCore/DataTypes/Rules/IScriptProcessorRule.h +++ b/Code/Tools/SceneAPI/SceneCore/DataTypes/Rules/IScriptProcessorRule.h @@ -17,6 +17,12 @@ namespace AZ { namespace DataTypes { + enum class ScriptProcessorFallbackLogic + { + FailBuild, // this will log error & fail the build + ContinueBuild // this will log the errors but continue the build logic + }; + class IScriptProcessorRule : public IRule { @@ -26,6 +32,8 @@ namespace AZ virtual ~IScriptProcessorRule() override = default; virtual const AZStd::string& GetScriptFilename() const = 0; + + virtual ScriptProcessorFallbackLogic GetScriptProcessorFallbackLogic() const = 0; }; } // DataTypes } // SceneAPI diff --git a/Code/Tools/SceneAPI/SceneCore/Tests/Containers/SceneBehaviorTests.cpp b/Code/Tools/SceneAPI/SceneCore/Tests/Containers/SceneBehaviorTests.cpp index 3bf75e2d9b..0478e6cdb2 100644 --- a/Code/Tools/SceneAPI/SceneCore/Tests/Containers/SceneBehaviorTests.cpp +++ b/Code/Tools/SceneAPI/SceneCore/Tests/Containers/SceneBehaviorTests.cpp @@ -368,7 +368,6 @@ namespace AZ::SceneAPI::Containers MOCK_METHOD0(GetSerializeContext, AZ::SerializeContext* ()); MOCK_METHOD0(GetJsonRegistrationContext, AZ::JsonRegistrationContext* ()); MOCK_METHOD0(GetBehaviorContext, AZ::BehaviorContext* ()); - MOCK_CONST_METHOD0(GetAppRoot, const char*()); MOCK_CONST_METHOD0(GetEngineRoot, const char*()); MOCK_CONST_METHOD0(GetExecutableFolder, const char* ()); MOCK_CONST_METHOD1(QueryApplicationType, void(AZ::ApplicationTypeQuery&)); diff --git a/Code/Tools/SceneAPI/SceneData/Behaviors/LodRuleBehavior.cpp b/Code/Tools/SceneAPI/SceneData/Behaviors/LodRuleBehavior.cpp index f51c670fc8..c47330620d 100644 --- a/Code/Tools/SceneAPI/SceneData/Behaviors/LodRuleBehavior.cpp +++ b/Code/Tools/SceneAPI/SceneData/Behaviors/LodRuleBehavior.cpp @@ -185,7 +185,7 @@ namespace AZ if (lodCount > 0) { rule->AddLod(); - selection.CopyTo(rule->GetNodeSelectionList(index)); + selection.CopyTo(rule->GetNodeSelectionList(lodLevel)); } else { diff --git a/Code/Tools/SceneAPI/SceneData/Behaviors/LodRuleBehavior.h b/Code/Tools/SceneAPI/SceneData/Behaviors/LodRuleBehavior.h index d152386940..c9416c0aa8 100644 --- a/Code/Tools/SceneAPI/SceneData/Behaviors/LodRuleBehavior.h +++ b/Code/Tools/SceneAPI/SceneData/Behaviors/LodRuleBehavior.h @@ -13,6 +13,7 @@ #include #include #include +#include namespace AZ { @@ -27,7 +28,7 @@ namespace AZ { class LodRule; - class LodRuleBehavior + class SCENE_DATA_CLASS LodRuleBehavior : public SceneCore::BehaviorComponent , public Events::ManifestMetaInfoBus::Handler , public Events::AssetImportRequestBus::Handler @@ -36,18 +37,19 @@ namespace AZ public: AZ_COMPONENT(LodRuleBehavior, "{D2E19864-9A4B-41FD-8ACC-DA6756728CB3}", SceneCore::BehaviorComponent); - ~LodRuleBehavior() override = default; + SCENE_DATA_API ~LodRuleBehavior() override = default; - void Activate() override; - void Deactivate() override; + SCENE_DATA_API void Activate() override; + SCENE_DATA_API void Deactivate() override; static void Reflect(ReflectContext* context); - void InitializeObject(const Containers::Scene& scene, DataTypes::IManifestObject& target) override; - Events::ProcessingResult UpdateManifest(Containers::Scene& scene, ManifestAction action, + SCENE_DATA_API void InitializeObject(const Containers::Scene& scene, DataTypes::IManifestObject& target) override; + SCENE_DATA_API Events::ProcessingResult UpdateManifest( + Containers::Scene& scene, ManifestAction action, RequestingApplication requester) override; - void GetVirtualTypeName(AZStd::string& name, Crc32 type) override; - void GetAllVirtualTypes(AZStd::set& types) override; + SCENE_DATA_API void GetVirtualTypeName(AZStd::string& name, Crc32 type) override; + SCENE_DATA_API void GetAllVirtualTypes(AZStd::set& types) override; private: size_t SelectLodMeshes(const Containers::Scene& scene, DataTypes::ISceneNodeSelectionList& selection, size_t lodLevel) const; diff --git a/Code/Tools/SceneAPI/SceneData/Behaviors/ScriptProcessorRuleBehavior.cpp b/Code/Tools/SceneAPI/SceneData/Behaviors/ScriptProcessorRuleBehavior.cpp index 8d413b6038..6046bfa620 100644 --- a/Code/Tools/SceneAPI/SceneData/Behaviors/ScriptProcessorRuleBehavior.cpp +++ b/Code/Tools/SceneAPI/SceneData/Behaviors/ScriptProcessorRuleBehavior.cpp @@ -173,10 +173,13 @@ namespace AZ::SceneAPI::Behaviors UnloadPython(); } - bool ScriptProcessorRuleBehavior::LoadPython(const AZ::SceneAPI::Containers::Scene& scene, AZStd::string& scriptPath) + bool ScriptProcessorRuleBehavior::LoadPython(const AZ::SceneAPI::Containers::Scene& scene, AZStd::string& scriptPath, Events::ProcessingResult& fallbackResult) { + using namespace AZ::SceneAPI; + + fallbackResult = Events::ProcessingResult::Failure; int scriptDiscoveryAttempts = 0; - const AZ::SceneAPI::Containers::SceneManifest& manifest = scene.GetManifest(); + const Containers::SceneManifest& manifest = scene.GetManifest(); auto view = Containers::MakeDerivedFilterView(manifest.GetValueStorage()); for (const auto& scriptItem : view) { @@ -188,6 +191,8 @@ namespace AZ::SceneAPI::Behaviors } ++scriptDiscoveryAttempts; + fallbackResult = (scriptItem.GetScriptProcessorFallbackLogic() == DataTypes::ScriptProcessorFallbackLogic::ContinueBuild) ? + Events::ProcessingResult::Ignored : Events::ProcessingResult::Failure; // check for file exist via absolute path if (!IO::FileIOBase::GetInstance()->Exists(scriptFilename.c_str())) @@ -301,7 +306,8 @@ namespace AZ::SceneAPI::Behaviors } }; - if (LoadPython(context.GetScene(), scriptPath)) + [[maybe_unused]] Events::ProcessingResult fallbackResult; + if (LoadPython(context.GetScene(), scriptPath, fallbackResult)) { EditorPythonConsoleNotificationHandler logger; m_editorPythonEventsInterface->ExecuteWithLock(executeCallback); @@ -333,8 +339,9 @@ namespace AZ::SceneAPI::Behaviors return Events::ProcessingResult::Ignored; } + Events::ProcessingResult fallbackResult; AZStd::string scriptPath; - if (LoadPython(scene, scriptPath)) + if (LoadPython(scene, scriptPath, fallbackResult)) { AZStd::string manifestUpdate; auto executeCallback = [&scene, &manifestUpdate, &scriptPath]() @@ -349,6 +356,12 @@ namespace AZ::SceneAPI::Behaviors EditorPythonConsoleNotificationHandler logger; m_editorPythonEventsInterface->ExecuteWithLock(executeCallback); + // if the returned scene manifest is empty then ignore the script update + if (manifestUpdate.empty()) + { + return Events::ProcessingResult::Ignored; + } + EntityUtilityBus::Broadcast(&EntityUtilityBus::Events::ResetEntityContext); AZ::Interface::Get()->RemoveAllTemplates(); @@ -364,6 +377,11 @@ namespace AZ::SceneAPI::Behaviors } return Events::ProcessingResult::Success; } + else + { + // if the manifest was not updated by the script, then return back the fallback result + return fallbackResult; + } } return Events::ProcessingResult::Ignored; } diff --git a/Code/Tools/SceneAPI/SceneData/Behaviors/ScriptProcessorRuleBehavior.h b/Code/Tools/SceneAPI/SceneData/Behaviors/ScriptProcessorRuleBehavior.h index a9ddf88df9..8903a8f257 100644 --- a/Code/Tools/SceneAPI/SceneData/Behaviors/ScriptProcessorRuleBehavior.h +++ b/Code/Tools/SceneAPI/SceneData/Behaviors/ScriptProcessorRuleBehavior.h @@ -54,7 +54,7 @@ namespace AZ::SceneAPI::Behaviors SCENE_DATA_API void GetManifestDependencyPaths(AZStd::vector& paths) override; protected: - bool LoadPython(const AZ::SceneAPI::Containers::Scene& scene, AZStd::string& scriptPath); + bool LoadPython(const AZ::SceneAPI::Containers::Scene& scene, AZStd::string& scriptPath, Events::ProcessingResult& fallbackResult); void UnloadPython(); bool DoPrepareForExport(Events::PreExportEventContext& context); diff --git a/Code/Tools/SceneAPI/SceneData/GraphData/BoneData.cpp b/Code/Tools/SceneAPI/SceneData/GraphData/BoneData.cpp index 8a3807c31a..e1a6c2608f 100644 --- a/Code/Tools/SceneAPI/SceneData/GraphData/BoneData.cpp +++ b/Code/Tools/SceneAPI/SceneData/GraphData/BoneData.cpp @@ -46,6 +46,9 @@ namespace AZ BehaviorContext* behaviorContext = azrtti_cast(context); if (behaviorContext) { + behaviorContext->Class() + ->Attribute(AZ::Script::Attributes::Scope, AZ::Script::Attributes::ScopeFlags::Common) + ->Attribute(AZ::Script::Attributes::Module, "scene"); behaviorContext->Class() ->Attribute(AZ::Script::Attributes::ExcludeFrom, AZ::Script::Attributes::ExcludeFlags::All) ->Attribute(AZ::Script::Attributes::Scope, AZ::Script::Attributes::ScopeFlags::Common) diff --git a/Code/Tools/SceneAPI/SceneData/Rules/LodRule.cpp b/Code/Tools/SceneAPI/SceneData/Rules/LodRule.cpp index f893751caf..a6c624397a 100644 --- a/Code/Tools/SceneAPI/SceneData/Rules/LodRule.cpp +++ b/Code/Tools/SceneAPI/SceneData/Rules/LodRule.cpp @@ -21,7 +21,6 @@ namespace AZ { const size_t LodRule::m_maxLods; - AZ_CLASS_ALLOCATOR_IMPL(LodRule, SystemAllocator, 0) SceneNodeSelectionList& LodRule::GetNodeSelectionList(size_t index) { diff --git a/Code/Tools/SceneAPI/SceneData/Rules/LodRule.h b/Code/Tools/SceneAPI/SceneData/Rules/LodRule.h index 0d9bf0a9a6..fd7d6bacd8 100644 --- a/Code/Tools/SceneAPI/SceneData/Rules/LodRule.h +++ b/Code/Tools/SceneAPI/SceneData/Rules/LodRule.h @@ -25,26 +25,26 @@ namespace AZ } namespace SceneData { - class LodRule + class SCENE_DATA_CLASS LodRule : public DataTypes::ILodRule { public: AZ_RTTI(LodRule, "{6E796AC8-1484-4909-860A-6D3F22A7346F}", DataTypes::ILodRule); - AZ_CLASS_ALLOCATOR_DECL + AZ_CLASS_ALLOCATOR(LodRule, AZ::SystemAllocator, 0) - ~LodRule() override = default; + SCENE_DATA_API ~LodRule() override = default; - SceneNodeSelectionList& GetNodeSelectionList(size_t index); + SCENE_DATA_API SceneNodeSelectionList& GetNodeSelectionList(size_t index); - DataTypes::ISceneNodeSelectionList& GetSceneNodeSelectionList(size_t index) override; - const DataTypes::ISceneNodeSelectionList& GetSceneNodeSelectionList(size_t index) const override; - size_t GetLodCount() const override; + SCENE_DATA_API DataTypes::ISceneNodeSelectionList& GetSceneNodeSelectionList(size_t index) override; + SCENE_DATA_API const DataTypes::ISceneNodeSelectionList& GetSceneNodeSelectionList(size_t index) const override; + SCENE_DATA_API size_t GetLodCount() const override; - void AddLod(); + SCENE_DATA_API void AddLod(); static void Reflect(ReflectContext* context); - //The engine supports 6 total lods. 1 for the base model then 5 more lods. - //The rule only captures lods past level 0 so this is set to 5. + //The engine supports 6 total lods. 1 for the base model then 5 more lods. + //The rule only captures lods past level 0 so this is set to 5. static const size_t m_maxLods = 5; protected: diff --git a/Code/Tools/SceneAPI/SceneData/Rules/ScriptProcessorRule.cpp b/Code/Tools/SceneAPI/SceneData/Rules/ScriptProcessorRule.cpp index 5893764eb1..15c8c1b7f3 100644 --- a/Code/Tools/SceneAPI/SceneData/Rules/ScriptProcessorRule.cpp +++ b/Code/Tools/SceneAPI/SceneData/Rules/ScriptProcessorRule.cpp @@ -14,6 +14,9 @@ namespace AZ { + // Enum types must have a TypeId tied to it in order for the reflection to succeed. + AZ_TYPE_INFO_SPECIALIZE(SceneAPI::DataTypes::ScriptProcessorFallbackLogic, "{3DCABF3D-E8EF-43E7-B3C7-373E05825F60}"); + namespace SceneAPI { namespace SceneData @@ -23,13 +26,23 @@ namespace AZ return m_scriptFilename; } + DataTypes::ScriptProcessorFallbackLogic ScriptProcessorRule::GetScriptProcessorFallbackLogic() const + { + return m_fallbackLogic; + } + void ScriptProcessorRule::Reflect(AZ::ReflectContext* context) { AZ::SerializeContext* serializeContext = azrtti_cast(context); if (serializeContext) { - serializeContext->Class()->Version(1) - ->Field("scriptFilename", &ScriptProcessorRule::m_scriptFilename); + serializeContext->Class()->Version(2) + ->Field("scriptFilename", &ScriptProcessorRule::m_scriptFilename) + ->Field("fallbackLogic", &ScriptProcessorRule::m_fallbackLogic); + + serializeContext->Enum() + ->Value("FailBuild", DataTypes::ScriptProcessorFallbackLogic::FailBuild) + ->Value("ContinueBuild", DataTypes::ScriptProcessorFallbackLogic::ContinueBuild); AZ::EditContext* editContext = serializeContext->GetEditContext(); if (editContext) diff --git a/Code/Tools/SceneAPI/SceneData/Rules/ScriptProcessorRule.h b/Code/Tools/SceneAPI/SceneData/Rules/ScriptProcessorRule.h index ad5e1de063..80cb670f9f 100644 --- a/Code/Tools/SceneAPI/SceneData/Rules/ScriptProcessorRule.h +++ b/Code/Tools/SceneAPI/SceneData/Rules/ScriptProcessorRule.h @@ -35,10 +35,13 @@ namespace AZ m_scriptFilename = AZStd::move(scriptFilename); } + DataTypes::ScriptProcessorFallbackLogic GetScriptProcessorFallbackLogic() const override; + static void Reflect(ReflectContext* context); protected: AZStd::string m_scriptFilename; + DataTypes::ScriptProcessorFallbackLogic m_fallbackLogic = DataTypes::ScriptProcessorFallbackLogic::FailBuild; }; } // SceneData } // SceneAPI diff --git a/Code/Tools/SceneAPI/SceneData/SceneData_testing_files.cmake b/Code/Tools/SceneAPI/SceneData/SceneData_testing_files.cmake index 51f3dfc9e7..3a51180ca1 100644 --- a/Code/Tools/SceneAPI/SceneData/SceneData_testing_files.cmake +++ b/Code/Tools/SceneAPI/SceneData/SceneData_testing_files.cmake @@ -11,5 +11,6 @@ set(FILES Tests/GraphData/MeshDataTests.cpp Tests/GraphData/MeshDataPrimitiveUtilsTests.cpp Tests/GraphData/GraphDataBehaviorTests.cpp + Tests/GraphData/RulesTests.cpp Tests/SceneManifest/SceneManifestRuleTests.cpp ) diff --git a/Code/Tools/SceneAPI/SceneData/Tests/GraphData/RulesTests.cpp b/Code/Tools/SceneAPI/SceneData/Tests/GraphData/RulesTests.cpp new file mode 100644 index 0000000000..a6ccdfa59d --- /dev/null +++ b/Code/Tools/SceneAPI/SceneData/Tests/GraphData/RulesTests.cpp @@ -0,0 +1,78 @@ +/* + * Copyright (c) Contributors to the Open 3D Engine Project. + * For complete copyright and license terms please see the LICENSE at the root of this distribution. + * + * SPDX-License-Identifier: Apache-2.0 OR MIT + * + */ + +#include +#include +#include +#include +#include +#include +#include +#include +#include + +namespace AZ +{ + namespace SceneData + { + struct SoftNameMock + : SceneAPI::Events::GraphMetaInfoBus::Handler + { + SoftNameMock() + { + BusConnect(); + } + + ~SoftNameMock() override + { + BusDisconnect(); + } + + void GetVirtualTypes(AZStd::set& types, const SceneAPI::Containers::Scene&, SceneAPI::Containers::SceneGraph::NodeIndex) override + { + // Indicate this node is a LOD1 type + types.emplace(AZ_CRC_CE("LODMesh1")); + } + }; + + TEST(LOD, LODRuleTest) + { + // Test that UpdateManifest doesn't crash when trying to auto-add new LOD levels + SoftNameMock softNameMock; + + SceneAPI::SceneData::LodRuleBehavior lod; + SceneAPI::Containers::Scene scene("test"); + + auto lodRule = AZStd::shared_ptr(aznew SceneAPI::SceneData::LodRule()); + scene.GetManifest().AddEntry(lodRule); + + auto group = AZStd::shared_ptr(aznew SceneAPI::SceneData::MeshGroup()); + + // Add a bunch of other rules first + // This is necessary to replicate the bug condition where the index of the rule is used instead of the index of the LOD + for (int i = 0; i < 5; ++i) + { + auto tangentsRule = AZStd::shared_ptr(aznew SceneAPI::SceneData::TangentsRule()); + group->GetRuleContainer().AddRule(tangentsRule); + } + + group->GetRuleContainer().AddRule(lodRule); + scene.GetManifest().AddEntry(group); + + auto meshData = AZStd::shared_ptr(new GraphData::MeshData()); + scene.GetGraph().AddChild(scene.GetGraph().GetRoot(), "test", meshData); + + EXPECT_EQ(lodRule->GetLodCount(), 0); + + // This should auto-add 1 LOD because of the "test" node we added above along with the SoftNameMock which will report it as an LOD1 + lod.UpdateManifest(scene, SceneAPI::Events::AssetImportRequest::Update, SceneAPI::Events::AssetImportRequest::Generic); + + EXPECT_EQ(lodRule->GetLodCount(), 1); + } + } +} diff --git a/Code/Tools/SceneAPI/SceneData/Tests/SceneManifest/SceneManifestRuleTests.cpp b/Code/Tools/SceneAPI/SceneData/Tests/SceneManifest/SceneManifestRuleTests.cpp index e0d5cca484..2bbbc1054a 100644 --- a/Code/Tools/SceneAPI/SceneData/Tests/SceneManifest/SceneManifestRuleTests.cpp +++ b/Code/Tools/SceneAPI/SceneData/Tests/SceneManifest/SceneManifestRuleTests.cpp @@ -11,6 +11,7 @@ #include #include #include +#include #include #include #include @@ -271,5 +272,79 @@ namespace AZ auto update = scriptProcessorRuleBehavior.UpdateManifest(scene, AssetImportRequest::Update, AssetImportRequest::Generic); EXPECT_EQ(update, ProcessingResult::Ignored); } + + TEST_F(SceneManifest_JSON, ScriptProcessorRule_DefaultFallbackLogic_Works) + { + using namespace AZ::SceneAPI; + + constexpr const char* defaultJson = { R"JSON( + { + "values": [ + { + "$type": "ScriptProcessorRule", + "scriptFilename": "foo.py" + } + ] + })JSON" }; + + auto scene = Containers::Scene("mock"); + auto result = scene.GetManifest().LoadFromString(defaultJson, m_serializeContext.get(), m_jsonRegistrationContext.get()); + EXPECT_TRUE(result.IsSuccess()); + EXPECT_FALSE(scene.GetManifest().IsEmpty()); + ASSERT_EQ(scene.GetManifest().GetEntryCount(), 1); + + auto view = Containers::MakeDerivedFilterView(scene.GetManifest().GetValueStorage()); + EXPECT_EQ(view.begin()->GetScriptProcessorFallbackLogic(), DataTypes::ScriptProcessorFallbackLogic::FailBuild); + } + + TEST_F(SceneManifest_JSON, ScriptProcessorRule_ExplicitFallbackLogic_Works) + { + using namespace AZ::SceneAPI; + + constexpr const char* fallbackLogicJson = { R"JSON( + { + "values": [ + { + "$type": "ScriptProcessorRule", + "scriptFilename": "foo.py", + "fallbackLogic": "FailBuild" + } + ] + })JSON" }; + + auto scene = Containers::Scene("mock"); + auto result = scene.GetManifest().LoadFromString(fallbackLogicJson, m_serializeContext.get(), m_jsonRegistrationContext.get()); + EXPECT_TRUE(result.IsSuccess()); + EXPECT_FALSE(scene.GetManifest().IsEmpty()); + ASSERT_EQ(scene.GetManifest().GetEntryCount(), 1); + + auto view = Containers::MakeDerivedFilterView(scene.GetManifest().GetValueStorage()); + EXPECT_EQ(view.begin()->GetScriptProcessorFallbackLogic(), DataTypes::ScriptProcessorFallbackLogic::FailBuild); + } + + TEST_F(SceneManifest_JSON, ScriptProcessorRule_ContinueBuildFallbackLogic_Works) + { + using namespace AZ::SceneAPI; + + constexpr const char* fallbackLogicJson = { R"JSON( + { + "values": [ + { + "$type": "ScriptProcessorRule", + "scriptFilename": "foo.py", + "fallbackLogic": "ContinueBuild" + } + ] + })JSON" }; + + auto scene = Containers::Scene("mock"); + auto result = scene.GetManifest().LoadFromString(fallbackLogicJson, m_serializeContext.get(), m_jsonRegistrationContext.get()); + EXPECT_TRUE(result.IsSuccess()); + EXPECT_FALSE(scene.GetManifest().IsEmpty()); + ASSERT_EQ(scene.GetManifest().GetEntryCount(), 1); + + auto view = Containers::MakeDerivedFilterView(scene.GetManifest().GetValueStorage()); + EXPECT_EQ(view.begin()->GetScriptProcessorFallbackLogic(), DataTypes::ScriptProcessorFallbackLogic::ContinueBuild); + } } } diff --git a/Code/Tools/SceneAPI/SceneUI/CommonWidgets/ProcessingOverlayWidget.cpp b/Code/Tools/SceneAPI/SceneUI/CommonWidgets/ProcessingOverlayWidget.cpp index bc9c4679df..a1326b0c82 100644 --- a/Code/Tools/SceneAPI/SceneUI/CommonWidgets/ProcessingOverlayWidget.cpp +++ b/Code/Tools/SceneAPI/SceneUI/CommonWidgets/ProcessingOverlayWidget.cpp @@ -63,7 +63,7 @@ namespace AZ } ProcessingOverlayWidget::ProcessingOverlayWidget(UI::OverlayWidget* overlay, Layout layout, Uuid traceTag) - : QWidget() + : QWidget(nullptr, Qt::Tool | Qt::WindowStaysOnTopHint) , m_traceTag(traceTag) , ui(new Ui::ProcessingOverlayWidget()) , m_overlay(overlay) diff --git a/Code/Tools/SerializeContextTools/Converter.cpp b/Code/Tools/SerializeContextTools/Converter.cpp index 6a8bebdbfc..086d444197 100644 --- a/Code/Tools/SerializeContextTools/Converter.cpp +++ b/Code/Tools/SerializeContextTools/Converter.cpp @@ -202,8 +202,6 @@ namespace AZ bool skipSystem = commandLine->HasSwitch("skipsystem"); bool isDryRun = commandLine->HasSwitch("dryrun"); - const char* appRoot = const_cast(application).GetAppRoot(); - PathDocumentContainer documents; bool result = true; const AZStd::string& filePath = application.GetConfigFilePath(); @@ -230,7 +228,7 @@ namespace AZ } auto callback = - [&result, skipGems, skipSystem, &configurationName, sourceGameFolder, &appRoot, &documents, &convertSettings, &verifySettings] + [&result, skipGems, skipSystem, &configurationName, sourceGameFolder, &documents, &convertSettings, &verifySettings] (void* classPtr, const Uuid& classId, SerializeContext* context) { if (classId == azrtti_typeid()) @@ -238,7 +236,7 @@ namespace AZ if (!skipSystem) { result = ConvertSystemSettings(documents, *reinterpret_cast(classPtr), - configurationName, sourceGameFolder, appRoot) && result; + configurationName, sourceGameFolder) && result; } // Cleanup the Serialized Element to allow any classes within the element's hierarchy to delete @@ -443,7 +441,7 @@ namespace AZ } bool Converter::ConvertSystemSettings(PathDocumentContainer& documents, const ComponentApplication::Descriptor& descriptor, - const AZStd::string& configurationName, const AZ::IO::PathView& projectFolder, [[maybe_unused]] const AZStd::string& applicationRoot) + const AZStd::string& configurationName, const AZ::IO::PathView& projectFolder) { AZ::IO::FixedMaxPath memoryFilePath{ projectFolder }; memoryFilePath /= "Registry"; @@ -555,8 +553,6 @@ namespace AZ rapidjson::Value(descriptor.m_reservedOS), memoryDoc.GetAllocator()); memoryDoc.AddMember(rapidjson::StringRef("reservedDebug"), rapidjson::Value(descriptor.m_reservedDebug), memoryDoc.GetAllocator()); - memoryDoc.AddMember(rapidjson::StringRef("enableDrilling"), - rapidjson::Value(descriptor.m_enableDrilling), memoryDoc.GetAllocator()); documents.emplace_back(AZStd::move(memoryFilePath.Native()), AZStd::move(memoryDoc)); return true; diff --git a/Code/Tools/SerializeContextTools/Converter.h b/Code/Tools/SerializeContextTools/Converter.h index 6c8f6c70fb..7d30ca2a3a 100644 --- a/Code/Tools/SerializeContextTools/Converter.h +++ b/Code/Tools/SerializeContextTools/Converter.h @@ -43,7 +43,7 @@ namespace AZ using PathDocumentContainer = AZStd::vector; static bool ConvertSystemSettings(PathDocumentContainer& documents, const ComponentApplication::Descriptor& descriptor, - const AZStd::string& configurationName, const AZ::IO::PathView& projectFolder, const AZStd::string& applicationRoot); + const AZStd::string& configurationName, const AZ::IO::PathView& projectFolder); static bool ConvertSystemComponents(PathDocumentContainer& documents, const Entity& entity, const AZStd::string& configurationName, const AZ::IO::PathView& projectFolder, const JsonSerializerSettings& convertSettings, const JsonDeserializerSettings& verifySettings); diff --git a/Code/Tools/SerializeContextTools/SliceConverter.cpp b/Code/Tools/SerializeContextTools/SliceConverter.cpp index d0528a9cad..cfb1998f48 100644 --- a/Code/Tools/SerializeContextTools/SliceConverter.cpp +++ b/Code/Tools/SerializeContextTools/SliceConverter.cpp @@ -79,10 +79,6 @@ namespace AZ return false; } - // Load the asset catalog so that we can find any nested assets successfully. We also need to tick the tick bus - // so that the OnCatalogLoaded event gets processed now, instead of during application shutdown. - application.Tick(); - AZStd::string logggingScratchBuffer; SetupLogging(logggingScratchBuffer, convertSettings.m_reporting, *commandLine); diff --git a/Code/Tools/Standalone/CMakeLists.txt b/Code/Tools/Standalone/CMakeLists.txt deleted file mode 100644 index 12bdb8f453..0000000000 --- a/Code/Tools/Standalone/CMakeLists.txt +++ /dev/null @@ -1,42 +0,0 @@ -# -# Copyright (c) Contributors to the Open 3D Engine Project. -# For complete copyright and license terms please see the LICENSE at the root of this distribution. -# -# SPDX-License-Identifier: Apache-2.0 OR MIT -# -# - -if(NOT PAL_TRAIT_BUILD_HOST_TOOLS) - return() -endif() - -ly_add_target( - NAME LuaIDE APPLICATION - NAMESPACE AZ - AUTOMOC - AUTOUIC - AUTORCC - FILES_CMAKE - standalone_tools_files.cmake - lua_ide_files.cmake - Platform/${PAL_PLATFORM_NAME}/lua_ide_${PAL_PLATFORM_NAME_LOWERCASE}_files.cmake - INCLUDE_DIRECTORIES - PRIVATE - . - Source/Editor - Source/LUA - BUILD_DEPENDENCIES - PRIVATE - Legacy::CryCommon - AZ::AzCore - AZ::AzFramework - AZ::AzToolsFramework - AZ::GridMate - AZ::AzQtComponents - ${additional_dependencies} - COMPILE_DEFINITIONS - PRIVATE - STANDALONETOOLS_ENABLE_LUA_IDE -) - -ly_add_dependencies(Editor LuaIDE) diff --git a/Code/Tools/Standalone/Platform/Common/Unimplemented/Source/Driller/EvenTrace/EventTraceDataAggregator_Unimplemented.cpp b/Code/Tools/Standalone/Platform/Common/Unimplemented/Source/Driller/EvenTrace/EventTraceDataAggregator_Unimplemented.cpp deleted file mode 100644 index ed7b8f215d..0000000000 --- a/Code/Tools/Standalone/Platform/Common/Unimplemented/Source/Driller/EvenTrace/EventTraceDataAggregator_Unimplemented.cpp +++ /dev/null @@ -1,19 +0,0 @@ -/* - * Copyright (c) Contributors to the Open 3D Engine Project. - * For complete copyright and license terms please see the LICENSE at the root of this distribution. - * - * SPDX-License-Identifier: Apache-2.0 OR MIT - * - */ - -class QString; - -namespace Driller -{ - namespace Platform - { - void LaunchExplorerSelect(const QString& filePath) - { - } - } -} diff --git a/Code/Tools/Standalone/Platform/Linux/profiler_linux_files.cmake b/Code/Tools/Standalone/Platform/Linux/profiler_linux_files.cmake deleted file mode 100644 index 35ab1449e2..0000000000 --- a/Code/Tools/Standalone/Platform/Linux/profiler_linux_files.cmake +++ /dev/null @@ -1,12 +0,0 @@ -# -# Copyright (c) Contributors to the Open 3D Engine Project. -# For complete copyright and license terms please see the LICENSE at the root of this distribution. -# -# SPDX-License-Identifier: Apache-2.0 OR MIT -# -# - -set(FILES - ../Common/Unimplemented/Source/StandaloneApplication_Unimplemented.cpp - ../Common/Unimplemented/Source/Driller/EvenTrace/EventTraceDataAggregator_Unimplemented.cpp -) diff --git a/Code/Tools/Standalone/Platform/Mac/Source/Driller/EvenTrace/EventTraceDataAggregator_Mac.cpp b/Code/Tools/Standalone/Platform/Mac/Source/Driller/EvenTrace/EventTraceDataAggregator_Mac.cpp deleted file mode 100644 index b553a34cf4..0000000000 --- a/Code/Tools/Standalone/Platform/Mac/Source/Driller/EvenTrace/EventTraceDataAggregator_Mac.cpp +++ /dev/null @@ -1,25 +0,0 @@ -/* - * Copyright (c) Contributors to the Open 3D Engine Project. - * For complete copyright and license terms please see the LICENSE at the root of this distribution. - * - * SPDX-License-Identifier: Apache-2.0 OR MIT - * - */ - -#include -#include -#include - -namespace Driller -{ - namespace Platform - { - void LaunchExplorerSelect(const QString& filePath) - { - QProcess::startDetached("/usr/bin/osascript", {"-e", - QStringLiteral("tell application \"Finder\" to reveal POSIX file \"%1\"").arg(QDir::toNativeSeparators(filePath))}); - QProcess::startDetached("/usr/bin/osascript", {"-e", - QStringLiteral("tell application \"Finder\" to activate")}); - } - } -} diff --git a/Code/Tools/Standalone/Platform/Mac/profiler_mac_files.cmake b/Code/Tools/Standalone/Platform/Mac/profiler_mac_files.cmake deleted file mode 100644 index 287c402800..0000000000 --- a/Code/Tools/Standalone/Platform/Mac/profiler_mac_files.cmake +++ /dev/null @@ -1,12 +0,0 @@ -# -# Copyright (c) Contributors to the Open 3D Engine Project. -# For complete copyright and license terms please see the LICENSE at the root of this distribution. -# -# SPDX-License-Identifier: Apache-2.0 OR MIT -# -# - -set(FILES - Source/StandaloneApplication_Mac.cpp - Source/Driller/EvenTrace/EventTraceDataAggregator_Mac.cpp -) diff --git a/Code/Tools/Standalone/Platform/Windows/Source/Driller/EvenTrace/EventTraceDataAggregator_Windows.cpp b/Code/Tools/Standalone/Platform/Windows/Source/Driller/EvenTrace/EventTraceDataAggregator_Windows.cpp deleted file mode 100644 index 2d13b89f6f..0000000000 --- a/Code/Tools/Standalone/Platform/Windows/Source/Driller/EvenTrace/EventTraceDataAggregator_Windows.cpp +++ /dev/null @@ -1,25 +0,0 @@ -/* - * Copyright (c) Contributors to the Open 3D Engine Project. - * For complete copyright and license terms please see the LICENSE at the root of this distribution. - * - * SPDX-License-Identifier: Apache-2.0 OR MIT - * - */ - -#include -#include - -namespace Driller -{ - namespace Platform - { - void LaunchExplorerSelect(const QString& filePath) - { - QString windowsPath = filePath; - windowsPath.replace('/', "\\"); - QProcess process; - process.start("explorer", { " /select," + windowsPath }); - process.waitForFinished(); - } - } -} diff --git a/Code/Tools/Standalone/Platform/Windows/profiler_windows_files.cmake b/Code/Tools/Standalone/Platform/Windows/profiler_windows_files.cmake deleted file mode 100644 index e1c9257a8e..0000000000 --- a/Code/Tools/Standalone/Platform/Windows/profiler_windows_files.cmake +++ /dev/null @@ -1,13 +0,0 @@ -# -# Copyright (c) Contributors to the Open 3D Engine Project. -# For complete copyright and license terms please see the LICENSE at the root of this distribution. -# -# SPDX-License-Identifier: Apache-2.0 OR MIT -# -# - -set(FILES - ../../Source/Editor/ProfilerEditor.rc - Source/StandaloneApplication_Windows.cpp - Source/Driller/EvenTrace/EventTraceDataAggregator_Windows.cpp -) diff --git a/Code/Tools/Standalone/Source/Editor/ProfilerEditor.cpp b/Code/Tools/Standalone/Source/Editor/ProfilerEditor.cpp deleted file mode 100644 index 6ad05a08b2..0000000000 --- a/Code/Tools/Standalone/Source/Editor/ProfilerEditor.cpp +++ /dev/null @@ -1,65 +0,0 @@ -/* - * Copyright (c) Contributors to the Open 3D Engine Project. - * For complete copyright and license terms please see the LICENSE at the root of this distribution. - * - * SPDX-License-Identifier: Apache-2.0 OR MIT - * - */ - -#include "ProfilerEditor.h" -#include - -#if defined(AZ_COMPILER_MSVC) -#include "resource.h" -#endif - -#include -#include -#include - -// Editor.cpp : Defines the entry point for the application. - -int main(int argc, char* argv[]) -{ - // here we free the console (and close the console window) in release. - - int exitCode = 0; - - { - if (!AZ::AllocatorInstance::IsReady()) - { - AZ::AllocatorInstance::Create(); - } - - AZStd::unique_ptr fileIO = AZStd::unique_ptr(aznew AZ::IO::LocalFileIO()); - AZ::IO::FileIOBase::SetInstance(fileIO.get()); - - Driller::Application app(argc, argv); - - QString procName; - { - QCoreApplication qca(argc, argv); - procName = QFileInfo(qca.applicationFilePath()).fileName(); - } - - LegacyFramework::ApplicationDesc desc(procName.toUtf8().data(), argc, argv); - desc.m_applicationModule = NULL; - desc.m_enableProjectManager = false; - - exitCode = app.Run(desc); - // this call will block until someone tells the core app to shut down via a bus message. - // the bus message is usually sent (in gui mode) in response to pressing the quit button or something. - // in an app that does not require GUI to be manufactured or use GUI windows, you should still call RUN - // but make a component which does your processing, in response to RestoreState(). in the CoreMessages bus. - // RestoreState will always be called right before the main message pump activates. - // and will then block until someone calls: - /*EBUS_EVENT(UIFramework::FrameworkMessages::Bus, UserWantsToQuit); */ - // so ideally to make a file processor or something, simply call app.Initialize(.... but with false as the gui mode ... ) - // and make at least one component which starts processing in response to CoreMessages::RestoreState(), and then sends UserWantsToQuit() once it has done its processing. - // calling UserWantsToQuit will simply queue the quit, so its safe to call from any thread. - // your components can query EBUS_EVENT_RESULT(res, LegacyFramework::FrameworkApplicationMessages::IsRunningInGUIMode) to determine - // if its in GUI mode or not. - } - - return exitCode; -} diff --git a/Code/Tools/Standalone/Source/Editor/ProfilerEditor.h b/Code/Tools/Standalone/Source/Editor/ProfilerEditor.h deleted file mode 100644 index d2963c0bf0..0000000000 --- a/Code/Tools/Standalone/Source/Editor/ProfilerEditor.h +++ /dev/null @@ -1,9 +0,0 @@ -/* - * Copyright (c) Contributors to the Open 3D Engine Project. - * For complete copyright and license terms please see the LICENSE at the root of this distribution. - * - * SPDX-License-Identifier: Apache-2.0 OR MIT - * - */ - -#pragma once diff --git a/Code/Tools/Standalone/Source/Editor/ProfilerEditor.rc b/Code/Tools/Standalone/Source/Editor/ProfilerEditor.rc deleted file mode 100644 index 558be5df81..0000000000 Binary files a/Code/Tools/Standalone/Source/Editor/ProfilerEditor.rc and /dev/null differ diff --git a/Code/Tools/Standalone/Source/Editor/profile_icon.ico b/Code/Tools/Standalone/Source/Editor/profile_icon.ico deleted file mode 100644 index 818eef381f..0000000000 --- a/Code/Tools/Standalone/Source/Editor/profile_icon.ico +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:b4863291cd214b33baf55b42e4184e6e2d6de02bcc621d6b037f5d1aab7b978a -size 2238 diff --git a/Code/Tools/Standalone/standalone_tools_files.cmake b/Code/Tools/Standalone/standalone_tools_files.cmake deleted file mode 100644 index d463f932a7..0000000000 --- a/Code/Tools/Standalone/standalone_tools_files.cmake +++ /dev/null @@ -1,20 +0,0 @@ -# -# Copyright (c) Contributors to the Open 3D Engine Project. -# For complete copyright and license terms please see the LICENSE at the root of this distribution. -# -# SPDX-License-Identifier: Apache-2.0 OR MIT -# -# - -set(FILES - targetver.h - Source/StandaloneToolsApplication.cpp - Source/StandaloneToolsApplication.h - Source/Editor/Resource.h - Source/Editor/targetver.h - Source/Telemetry/TelemetryBus.h - Source/Telemetry/TelemetryComponent.cpp - Source/Telemetry/TelemetryComponent.h - Source/Telemetry/TelemetryEvent.cpp - Source/Telemetry/TelemetryEvent.h -) diff --git a/Gems/AWSClientAuth/Code/CMakeLists.txt b/Gems/AWSClientAuth/Code/CMakeLists.txt index bd8b174b65..1f0c119f5a 100644 --- a/Gems/AWSClientAuth/Code/CMakeLists.txt +++ b/Gems/AWSClientAuth/Code/CMakeLists.txt @@ -15,9 +15,9 @@ ly_add_target( awsclientauth_files.cmake INCLUDE_DIRECTORIES PUBLIC - Include/Public + Include PRIVATE - Include/Private + Source BUILD_DEPENDENCIES PRIVATE AZ::AzCore @@ -35,7 +35,7 @@ ly_add_target( awsclientauth_shared_files.cmake INCLUDE_DIRECTORIES PRIVATE - Include/Private + Source BUILD_DEPENDENCIES PRIVATE AZ::AzCore @@ -97,8 +97,8 @@ if(PAL_TRAIT_BUILD_TESTS_SUPPORTED) awsclientauth_test_files.cmake INCLUDE_DIRECTORIES PRIVATE - "Include/Private" - "Include/Public" + Source + Include Tests BUILD_DEPENDENCIES PRIVATE diff --git a/Gems/AWSClientAuth/Code/Include/Public/Authentication/AuthenticationProviderBus.h b/Gems/AWSClientAuth/Code/Include/Authentication/AuthenticationProviderBus.h similarity index 100% rename from Gems/AWSClientAuth/Code/Include/Public/Authentication/AuthenticationProviderBus.h rename to Gems/AWSClientAuth/Code/Include/Authentication/AuthenticationProviderBus.h diff --git a/Gems/AWSClientAuth/Code/Include/Public/Authentication/AuthenticationTokens.h b/Gems/AWSClientAuth/Code/Include/Authentication/AuthenticationTokens.h similarity index 100% rename from Gems/AWSClientAuth/Code/Include/Public/Authentication/AuthenticationTokens.h rename to Gems/AWSClientAuth/Code/Include/Authentication/AuthenticationTokens.h diff --git a/Gems/AWSClientAuth/Code/Include/Public/Authorization/AWSCognitoAuthorizationBus.h b/Gems/AWSClientAuth/Code/Include/Authorization/AWSCognitoAuthorizationBus.h similarity index 100% rename from Gems/AWSClientAuth/Code/Include/Public/Authorization/AWSCognitoAuthorizationBus.h rename to Gems/AWSClientAuth/Code/Include/Authorization/AWSCognitoAuthorizationBus.h diff --git a/Gems/AWSClientAuth/Code/Include/Public/Authorization/ClientAuthAWSCredentials.h b/Gems/AWSClientAuth/Code/Include/Authorization/ClientAuthAWSCredentials.h similarity index 100% rename from Gems/AWSClientAuth/Code/Include/Public/Authorization/ClientAuthAWSCredentials.h rename to Gems/AWSClientAuth/Code/Include/Authorization/ClientAuthAWSCredentials.h diff --git a/Gems/AWSClientAuth/Code/Include/Public/UserManagement/AWSCognitoUserManagementBus.h b/Gems/AWSClientAuth/Code/Include/UserManagement/AWSCognitoUserManagementBus.h similarity index 100% rename from Gems/AWSClientAuth/Code/Include/Public/UserManagement/AWSCognitoUserManagementBus.h rename to Gems/AWSClientAuth/Code/Include/UserManagement/AWSCognitoUserManagementBus.h diff --git a/Gems/AWSClientAuth/Code/Include/Private/AWSClientAuthBus.h b/Gems/AWSClientAuth/Code/Source/AWSClientAuthBus.h similarity index 100% rename from Gems/AWSClientAuth/Code/Include/Private/AWSClientAuthBus.h rename to Gems/AWSClientAuth/Code/Source/AWSClientAuthBus.h diff --git a/Gems/AWSClientAuth/Code/Include/Private/AWSClientAuthModule.h b/Gems/AWSClientAuth/Code/Source/AWSClientAuthModule.h similarity index 100% rename from Gems/AWSClientAuth/Code/Include/Private/AWSClientAuthModule.h rename to Gems/AWSClientAuth/Code/Source/AWSClientAuthModule.h diff --git a/Gems/AWSClientAuth/Code/Include/Private/AWSClientAuthResourceMappingConstants.h b/Gems/AWSClientAuth/Code/Source/AWSClientAuthResourceMappingConstants.h similarity index 100% rename from Gems/AWSClientAuth/Code/Include/Private/AWSClientAuthResourceMappingConstants.h rename to Gems/AWSClientAuth/Code/Source/AWSClientAuthResourceMappingConstants.h diff --git a/Gems/AWSClientAuth/Code/Include/Private/AWSClientAuthSystemComponent.h b/Gems/AWSClientAuth/Code/Source/AWSClientAuthSystemComponent.h similarity index 100% rename from Gems/AWSClientAuth/Code/Include/Private/AWSClientAuthSystemComponent.h rename to Gems/AWSClientAuth/Code/Source/AWSClientAuthSystemComponent.h diff --git a/Gems/AWSClientAuth/Code/Include/Private/Authentication/AWSCognitoAuthenticationProvider.h b/Gems/AWSClientAuth/Code/Source/Authentication/AWSCognitoAuthenticationProvider.h similarity index 100% rename from Gems/AWSClientAuth/Code/Include/Private/Authentication/AWSCognitoAuthenticationProvider.h rename to Gems/AWSClientAuth/Code/Source/Authentication/AWSCognitoAuthenticationProvider.h diff --git a/Gems/AWSClientAuth/Code/Include/Private/Authentication/AuthenticationNotificationBusBehaviorHandler.h b/Gems/AWSClientAuth/Code/Source/Authentication/AuthenticationNotificationBusBehaviorHandler.h similarity index 100% rename from Gems/AWSClientAuth/Code/Include/Private/Authentication/AuthenticationNotificationBusBehaviorHandler.h rename to Gems/AWSClientAuth/Code/Source/Authentication/AuthenticationNotificationBusBehaviorHandler.h diff --git a/Gems/AWSClientAuth/Code/Include/Private/Authentication/AuthenticationProviderInterface.h b/Gems/AWSClientAuth/Code/Source/Authentication/AuthenticationProviderInterface.h similarity index 100% rename from Gems/AWSClientAuth/Code/Include/Private/Authentication/AuthenticationProviderInterface.h rename to Gems/AWSClientAuth/Code/Source/Authentication/AuthenticationProviderInterface.h diff --git a/Gems/AWSClientAuth/Code/Include/Private/Authentication/AuthenticationProviderManager.h b/Gems/AWSClientAuth/Code/Source/Authentication/AuthenticationProviderManager.h similarity index 100% rename from Gems/AWSClientAuth/Code/Include/Private/Authentication/AuthenticationProviderManager.h rename to Gems/AWSClientAuth/Code/Source/Authentication/AuthenticationProviderManager.h diff --git a/Gems/AWSClientAuth/Code/Include/Private/Authentication/AuthenticationProviderScriptCanvasBus.h b/Gems/AWSClientAuth/Code/Source/Authentication/AuthenticationProviderScriptCanvasBus.h similarity index 100% rename from Gems/AWSClientAuth/Code/Include/Private/Authentication/AuthenticationProviderScriptCanvasBus.h rename to Gems/AWSClientAuth/Code/Source/Authentication/AuthenticationProviderScriptCanvasBus.h diff --git a/Gems/AWSClientAuth/Code/Include/Private/Authentication/AuthenticationProviderTypes.h b/Gems/AWSClientAuth/Code/Source/Authentication/AuthenticationProviderTypes.h similarity index 100% rename from Gems/AWSClientAuth/Code/Include/Private/Authentication/AuthenticationProviderTypes.h rename to Gems/AWSClientAuth/Code/Source/Authentication/AuthenticationProviderTypes.h diff --git a/Gems/AWSClientAuth/Code/Include/Private/Authentication/GoogleAuthenticationProvider.h b/Gems/AWSClientAuth/Code/Source/Authentication/GoogleAuthenticationProvider.h similarity index 100% rename from Gems/AWSClientAuth/Code/Include/Private/Authentication/GoogleAuthenticationProvider.h rename to Gems/AWSClientAuth/Code/Source/Authentication/GoogleAuthenticationProvider.h diff --git a/Gems/AWSClientAuth/Code/Include/Private/Authentication/LWAAuthenticationProvider.h b/Gems/AWSClientAuth/Code/Source/Authentication/LWAAuthenticationProvider.h similarity index 100% rename from Gems/AWSClientAuth/Code/Include/Private/Authentication/LWAAuthenticationProvider.h rename to Gems/AWSClientAuth/Code/Source/Authentication/LWAAuthenticationProvider.h diff --git a/Gems/AWSClientAuth/Code/Include/Private/Authentication/OAuthConstants.h b/Gems/AWSClientAuth/Code/Source/Authentication/OAuthConstants.h similarity index 100% rename from Gems/AWSClientAuth/Code/Include/Private/Authentication/OAuthConstants.h rename to Gems/AWSClientAuth/Code/Source/Authentication/OAuthConstants.h diff --git a/Gems/AWSClientAuth/Code/Source/Authorization/AWSClientAuthCognitoCachingAuthenticatedCredentialsProvider.cpp b/Gems/AWSClientAuth/Code/Source/Authorization/AWSClientAuthCognitoCachingAuthenticatedCredentialsProvider.cpp new file mode 100644 index 0000000000..2492afa441 --- /dev/null +++ b/Gems/AWSClientAuth/Code/Source/Authorization/AWSClientAuthCognitoCachingAuthenticatedCredentialsProvider.cpp @@ -0,0 +1,122 @@ +/* + * Copyright (c) Contributors to the Open 3D Engine Project. + * For complete copyright and license terms please see the LICENSE at the root of this distribution. + * + * SPDX-License-Identifier: Apache-2.0 OR MIT + * + */ + +#include + +#include + +#include +#include +#include +#include +#include +#include +#include + + +namespace AWSClientAuth +{ + static const char* AUTH_LOG_TAG = "AWSClientAuthCognitoCachingAuthenticatedCredentialsProvider"; + static const char* ANON_LOG_TAG = "AWSClientAuthCachingAnonymousCredsProvider"; + + // Modification of https://github.com/aws/aws-sdk-cpp/blob/main/aws-cpp-sdk-identity-management/source/auth/CognitoCachingCredentialsProvider.cpp#L92 + // to work around account ID requirement. Account id is not required for call to succeed and is not set unless provided. + // see: https://github.com/aws/aws-sdk-cpp/issues/1448 + Aws::CognitoIdentity::Model::GetCredentialsForIdentityOutcome FetchCredsFromCognito( + const Aws::CognitoIdentity::CognitoIdentityClient& cognitoIdentityClient, + Aws::Auth::PersistentCognitoIdentityProvider& identityRepository, + const char* logTag, + bool includeLogins) + { + auto logins = identityRepository.GetLogins(); + Aws::Map cognitoLogins; + for (auto& login : logins) + { + cognitoLogins[login.first] = login.second.accessToken; + } + + if (!identityRepository.HasIdentityId()) + { + auto accountId = identityRepository.GetAccountId(); + auto identityPoolId = identityRepository.GetIdentityPoolId(); + + Aws::CognitoIdentity::Model::GetIdRequest getIdRequest; + getIdRequest.SetIdentityPoolId(identityPoolId); + + if (!accountId.empty()) // new check + { + getIdRequest.SetAccountId(accountId); + AWS_LOGSTREAM_INFO(logTag, "Identity not found, requesting an id for accountId " + << accountId << " identity pool id " + << identityPoolId << " with logins."); + } + else + { + AWS_LOGSTREAM_INFO( + logTag, "Identity not found, requesting an id for identity pool id %s" << identityPoolId << " with logins."); + } + if (includeLogins) + { + getIdRequest.SetLogins(cognitoLogins); + } + + auto getIdOutcome = cognitoIdentityClient.GetId(getIdRequest); + if (getIdOutcome.IsSuccess()) + { + auto identityId = getIdOutcome.GetResult().GetIdentityId(); + AWS_LOGSTREAM_INFO(logTag, "Successfully retrieved identity: " << identityId); + identityRepository.PersistIdentityId(identityId); + } + else + { + AWS_LOGSTREAM_ERROR( + logTag, + "Failed to retrieve identity. Error: " << getIdOutcome.GetError().GetExceptionName() << " " + << getIdOutcome.GetError().GetMessage()); + return Aws::CognitoIdentity::Model::GetCredentialsForIdentityOutcome(getIdOutcome.GetError()); + } + } + + Aws::CognitoIdentity::Model::GetCredentialsForIdentityRequest getCredentialsForIdentityRequest; + getCredentialsForIdentityRequest.SetIdentityId(identityRepository.GetIdentityId()); + if (includeLogins) + { + getCredentialsForIdentityRequest.SetLogins(cognitoLogins); + } + + return cognitoIdentityClient.GetCredentialsForIdentity(getCredentialsForIdentityRequest); + } + + AWSClientAuthCognitoCachingAuthenticatedCredentialsProvider::AWSClientAuthCognitoCachingAuthenticatedCredentialsProvider( + const std::shared_ptr& identityRepository, + const std::shared_ptr& cognitoIdentityClient) + : CognitoCachingCredentialsProvider(identityRepository, cognitoIdentityClient) + { + } + + Aws::CognitoIdentity::Model::GetCredentialsForIdentityOutcome + AWSClientAuthCognitoCachingAuthenticatedCredentialsProvider::GetCredentialsFromCognito() const + { + return FetchCredsFromCognito(*m_cognitoIdentityClient, *m_identityRepository, AUTH_LOG_TAG, true); + } + + AWSClientAuthCachingAnonymousCredsProvider::AWSClientAuthCachingAnonymousCredsProvider( + const std::shared_ptr& identityRepository, + const std::shared_ptr& cognitoIdentityClient) + : AWSClientAuthCognitoCachingAuthenticatedCredentialsProvider(identityRepository, cognitoIdentityClient) + { + } + + Aws::CognitoIdentity::Model::GetCredentialsForIdentityOutcome AWSClientAuthCachingAnonymousCredsProvider:: + GetCredentialsFromCognito() const + { + return FetchCredsFromCognito(*m_cognitoIdentityClient, *m_identityRepository, ANON_LOG_TAG, false); + } + + +} // namespace AWSClientAuth diff --git a/Gems/AWSClientAuth/Code/Source/Authorization/AWSClientAuthCognitoCachingAuthenticatedCredentialsProvider.h b/Gems/AWSClientAuth/Code/Source/Authorization/AWSClientAuthCognitoCachingAuthenticatedCredentialsProvider.h new file mode 100644 index 0000000000..ad7faf4671 --- /dev/null +++ b/Gems/AWSClientAuth/Code/Source/Authorization/AWSClientAuthCognitoCachingAuthenticatedCredentialsProvider.h @@ -0,0 +1,44 @@ +/* + * Copyright (c) Contributors to the Open 3D Engine Project. + * For complete copyright and license terms please see the LICENSE at the root of this distribution. + * + * SPDX-License-Identifier: Apache-2.0 OR MIT + * + */ + +#pragma once + +#include +#include +#include + +namespace AWSClientAuth +{ + //! Cognito Caching Credentials Provider implementation that is derived from AWS Native SDK. + //! For use with authenticated credentials. + class AWSClientAuthCognitoCachingAuthenticatedCredentialsProvider + : public Aws::Auth::CognitoCachingCredentialsProvider + { + public: + AWSClientAuthCognitoCachingAuthenticatedCredentialsProvider( + const std::shared_ptr& identityRepository, + const std::shared_ptr& cognitoIdentityClient = nullptr); + + protected: + Aws::CognitoIdentity::Model::GetCredentialsForIdentityOutcome GetCredentialsFromCognito() const override; + }; + + //! Cognito Caching Credentials Provider implementation that is eventually derived from AWS Native SDK. + //! For use with anonymous credentials. + class AWSClientAuthCachingAnonymousCredsProvider : public AWSClientAuthCognitoCachingAuthenticatedCredentialsProvider + { + public: + AWSClientAuthCachingAnonymousCredsProvider( + const std::shared_ptr& identityRepository, + const std::shared_ptr& cognitoIdentityClient = nullptr); + + protected: + Aws::CognitoIdentity::Model::GetCredentialsForIdentityOutcome GetCredentialsFromCognito() const override; + }; + +} // namespace AWSClientAuth diff --git a/Gems/AWSClientAuth/Code/Include/Private/Authorization/AWSClientAuthPersistentCognitoIdentityProvider.h b/Gems/AWSClientAuth/Code/Source/Authorization/AWSClientAuthPersistentCognitoIdentityProvider.h similarity index 100% rename from Gems/AWSClientAuth/Code/Include/Private/Authorization/AWSClientAuthPersistentCognitoIdentityProvider.h rename to Gems/AWSClientAuth/Code/Source/Authorization/AWSClientAuthPersistentCognitoIdentityProvider.h diff --git a/Gems/AWSClientAuth/Code/Source/Authorization/AWSCognitoAuthorizationController.cpp b/Gems/AWSClientAuth/Code/Source/Authorization/AWSCognitoAuthorizationController.cpp index 3af28582d6..f53149c90f 100644 --- a/Gems/AWSClientAuth/Code/Source/Authorization/AWSCognitoAuthorizationController.cpp +++ b/Gems/AWSClientAuth/Code/Source/Authorization/AWSCognitoAuthorizationController.cpp @@ -8,6 +8,7 @@ #include #include +#include #include #include #include @@ -38,10 +39,12 @@ namespace AWSClientAuth auto identityClient = AZ::Interface::Get()->GetCognitoIdentityClient(); m_cognitoCachingCredentialsProvider = - std::make_shared(m_persistentCognitoIdentityProvider, identityClient); + std::make_shared( + m_persistentCognitoIdentityProvider, identityClient); m_cognitoCachingAnonymousCredentialsProvider = - std::make_shared(m_persistentAnonymousCognitoIdentityProvider, identityClient); + std::make_shared( + m_persistentAnonymousCognitoIdentityProvider, identityClient); } AWSCognitoAuthorizationController::~AWSCognitoAuthorizationController() @@ -65,9 +68,13 @@ namespace AWSClientAuth AWSCore::AWSResourceMappingRequestBus::BroadcastResult( m_cognitoIdentityPoolId, &AWSCore::AWSResourceMappingRequests::GetResourceNameId, CognitoIdentityPoolIdResourceMappingKey); - if (m_awsAccountId.empty() || m_cognitoIdentityPoolId.empty()) + if (m_awsAccountId.empty()) + { + AZ_TracePrintf("AWSCognitoAuthorizationController", "AWS account id not not configured. Proceeding without it."); + } + + if (m_cognitoIdentityPoolId.empty()) { - AZ_Warning("AWSCognitoAuthorizationController", !m_awsAccountId.empty(), "Missing AWS account id not configured."); AZ_Warning("AWSCognitoAuthorizationController", !m_cognitoIdentityPoolId.empty(), "Missing Cognito Identity pool id in resource mappings."); return false; } diff --git a/Gems/AWSClientAuth/Code/Include/Private/Authorization/AWSCognitoAuthorizationController.h b/Gems/AWSClientAuth/Code/Source/Authorization/AWSCognitoAuthorizationController.h similarity index 91% rename from Gems/AWSClientAuth/Code/Include/Private/Authorization/AWSCognitoAuthorizationController.h rename to Gems/AWSClientAuth/Code/Source/Authorization/AWSCognitoAuthorizationController.h index 042be8fe89..1378feff19 100644 --- a/Gems/AWSClientAuth/Code/Include/Private/Authorization/AWSCognitoAuthorizationController.h +++ b/Gems/AWSClientAuth/Code/Source/Authorization/AWSCognitoAuthorizationController.h @@ -9,6 +9,7 @@ #pragma once #include +#include #include #include #include @@ -51,8 +52,8 @@ namespace AWSClientAuth std::shared_ptr m_persistentCognitoIdentityProvider; std::shared_ptr m_persistentAnonymousCognitoIdentityProvider; - std::shared_ptr m_cognitoCachingCredentialsProvider; - std::shared_ptr m_cognitoCachingAnonymousCredentialsProvider; + std::shared_ptr m_cognitoCachingCredentialsProvider; + std::shared_ptr m_cognitoCachingAnonymousCredentialsProvider; AZStd::string m_cognitoIdentityPoolId; AZStd::string m_formattedCognitoUserPoolId; diff --git a/Gems/AWSClientAuth/Code/Include/Private/Authorization/AWSCognitoAuthorizationNotificationBusBehaviorHandler.h b/Gems/AWSClientAuth/Code/Source/Authorization/AWSCognitoAuthorizationNotificationBusBehaviorHandler.h similarity index 100% rename from Gems/AWSClientAuth/Code/Include/Private/Authorization/AWSCognitoAuthorizationNotificationBusBehaviorHandler.h rename to Gems/AWSClientAuth/Code/Source/Authorization/AWSCognitoAuthorizationNotificationBusBehaviorHandler.h diff --git a/Gems/AWSClientAuth/Code/Include/Private/UserManagement/AWSCognitoUserManagementController.h b/Gems/AWSClientAuth/Code/Source/UserManagement/AWSCognitoUserManagementController.h similarity index 100% rename from Gems/AWSClientAuth/Code/Include/Private/UserManagement/AWSCognitoUserManagementController.h rename to Gems/AWSClientAuth/Code/Source/UserManagement/AWSCognitoUserManagementController.h diff --git a/Gems/AWSClientAuth/Code/Include/Private/UserManagement/UserManagementNotificationBusBehaviorHandler.h b/Gems/AWSClientAuth/Code/Source/UserManagement/UserManagementNotificationBusBehaviorHandler.h similarity index 100% rename from Gems/AWSClientAuth/Code/Include/Private/UserManagement/UserManagementNotificationBusBehaviorHandler.h rename to Gems/AWSClientAuth/Code/Source/UserManagement/UserManagementNotificationBusBehaviorHandler.h diff --git a/Gems/AWSClientAuth/Code/Tests/AWSClientAuthGemMock.h b/Gems/AWSClientAuth/Code/Tests/AWSClientAuthGemMock.h index 1d2e8bad42..19314035c4 100644 --- a/Gems/AWSClientAuth/Code/Tests/AWSClientAuthGemMock.h +++ b/Gems/AWSClientAuth/Code/Tests/AWSClientAuthGemMock.h @@ -608,7 +608,6 @@ namespace AWSClientAuthUnitTest AZ::Entity* FindEntity(const AZ::EntityId&) override { return nullptr; } AZ::BehaviorContext* GetBehaviorContext() override { return nullptr; } const char* GetExecutableFolder() const override { return nullptr; } - const char* GetAppRoot() const override { return nullptr; } const char* GetEngineRoot() const override { return nullptr; } void EnumerateEntities(const EntityCallback& /*callback*/) override {} void QueryApplicationType(AZ::ApplicationTypeQuery& /*appType*/) const override {} diff --git a/Gems/AWSClientAuth/Code/Tests/Authorization/AWSCognitoAuthorizationControllerTest.cpp b/Gems/AWSClientAuth/Code/Tests/Authorization/AWSCognitoAuthorizationControllerTest.cpp index 9f31891512..19064eb1ed 100644 --- a/Gems/AWSClientAuth/Code/Tests/Authorization/AWSCognitoAuthorizationControllerTest.cpp +++ b/Gems/AWSClientAuth/Code/Tests/Authorization/AWSCognitoAuthorizationControllerTest.cpp @@ -62,6 +62,14 @@ TEST_F(AWSCognitoAuthorizationControllerTest, Initialize_Success) ASSERT_TRUE(m_mockController->m_cognitoIdentityPoolId == AWSClientAuthUnitTest::TEST_RESOURCE_NAME_ID); } +TEST_F(AWSCognitoAuthorizationControllerTest, Initialize_Success_GetAWSAccountEmpty) +{ + EXPECT_CALL(m_awsResourceMappingRequestBusMock, GetResourceNameId(testing::_)).Times(2); + EXPECT_CALL(m_awsResourceMappingRequestBusMock, GetDefaultAccountId()).Times(1).WillOnce(testing::Return("")); + EXPECT_CALL(m_awsResourceMappingRequestBusMock, GetDefaultRegion()).Times(1); + ASSERT_TRUE(m_mockController->Initialize()); +} + TEST_F(AWSCognitoAuthorizationControllerTest, RequestAWSCredentials_WithLogins_Success) { AWSClientAuth::AuthenticationTokens tokens( @@ -121,7 +129,7 @@ TEST_F(AWSCognitoAuthorizationControllerTest, MultipleCalls_UsesCacheCredentials m_mockController->RequestAWSCredentialsAsync(); } -TEST_F(AWSCognitoAuthorizationControllerTest, RequestAWSCredentials_Fail_GetIdError) +TEST_F(AWSCognitoAuthorizationControllerTest, RequestAWSCredentials_Fail_GetIdError) // fail { AWSClientAuth::AuthenticationTokens cognitoTokens( AWSClientAuthUnitTest::TEST_TOKEN, AWSClientAuthUnitTest::TEST_TOKEN, AWSClientAuthUnitTest::TEST_TOKEN, @@ -140,7 +148,9 @@ TEST_F(AWSCognitoAuthorizationControllerTest, RequestAWSCredentials_Fail_GetIdEr EXPECT_CALL(*m_cognitoIdentityClientMock, GetCredentialsForIdentity(testing::_)).Times(0); EXPECT_CALL(m_awsCognitoAuthorizationNotificationsBusMock, OnRequestAWSCredentialsSuccess(testing::_)).Times(0); EXPECT_CALL(m_awsCognitoAuthorizationNotificationsBusMock, OnRequestAWSCredentialsFail(testing::_)).Times(1); + AZ_TEST_START_TRACE_SUPPRESSION; m_mockController->RequestAWSCredentialsAsync(); + AZ_TEST_STOP_TRACE_SUPPRESSION_NO_COUNT; } TEST_F(AWSCognitoAuthorizationControllerTest, RequestAWSCredentials_Fail_GetCredentialsForIdentityError) @@ -174,7 +184,9 @@ TEST_F(AWSCognitoAuthorizationControllerTest, RequestAWSCredentials_Fail_GetCred EXPECT_CALL(*m_cognitoIdentityClientMock, GetCredentialsForIdentity(testing::_)).Times(1).WillOnce(testing::Return(outcome)); EXPECT_CALL(m_awsCognitoAuthorizationNotificationsBusMock, OnRequestAWSCredentialsSuccess(testing::_)).Times(0); EXPECT_CALL(m_awsCognitoAuthorizationNotificationsBusMock, OnRequestAWSCredentialsFail(testing::_)).Times(1); + AZ_TEST_START_TRACE_SUPPRESSION; m_mockController->RequestAWSCredentialsAsync(); + AZ_TEST_STOP_TRACE_SUPPRESSION_NO_COUNT; } TEST_F(AWSCognitoAuthorizationControllerTest, AddRemoveLogins_Succuess) @@ -321,7 +333,7 @@ TEST_F(AWSCognitoAuthorizationControllerTest, GetCredentialsProvider_NoPersisted EXPECT_TRUE(actualCredentialsProvider == m_mockController->m_cognitoCachingAnonymousCredentialsProvider); } -TEST_F(AWSCognitoAuthorizationControllerTest, GetCredentialsProvider_NoPersistedLogins_NoAnonymousCredentials_ResultNullPtr) +TEST_F(AWSCognitoAuthorizationControllerTest, GetCredentialsProvider_NoPersistedLogins_NoAnonymousCredentials_ResultNullPtr) // fails { Aws::Client::AWSError error; error.SetExceptionName(AWSClientAuthUnitTest::TEST_EXCEPTION); @@ -331,8 +343,10 @@ TEST_F(AWSCognitoAuthorizationControllerTest, GetCredentialsProvider_NoPersisted EXPECT_CALL(*m_cognitoIdentityClientMock, GetCredentialsForIdentity(testing::_)).Times(0); std::shared_ptr actualCredentialsProvider; + AZ_TEST_START_TRACE_SUPPRESSION; AWSCore::AWSCredentialRequestBus::BroadcastResult( actualCredentialsProvider, &AWSCore::AWSCredentialRequests::GetCredentialsProvider); + AZ_TEST_STOP_TRACE_SUPPRESSION_NO_COUNT; EXPECT_TRUE(actualCredentialsProvider == nullptr); } @@ -431,11 +445,3 @@ TEST_F(AWSCognitoAuthorizationControllerTest, Initialize_Fail_GetResourceNameEmp EXPECT_CALL(m_awsResourceMappingRequestBusMock, GetDefaultAccountId()).Times(1); ASSERT_FALSE(m_mockController->Initialize()); } - -TEST_F(AWSCognitoAuthorizationControllerTest, Initialize_Fail_GetAWSAccountEmpty) -{ - EXPECT_CALL(m_awsResourceMappingRequestBusMock, GetResourceNameId(testing::_)).Times(1); - EXPECT_CALL(m_awsResourceMappingRequestBusMock, GetDefaultAccountId()).Times(1).WillOnce(testing::Return("")); - EXPECT_CALL(m_awsResourceMappingRequestBusMock, GetDefaultRegion()).Times(0); - ASSERT_FALSE(m_mockController->Initialize()); -} diff --git a/Gems/AWSClientAuth/Code/awsclientauth_files.cmake b/Gems/AWSClientAuth/Code/awsclientauth_files.cmake index bd4c971377..5de71210af 100644 --- a/Gems/AWSClientAuth/Code/awsclientauth_files.cmake +++ b/Gems/AWSClientAuth/Code/awsclientauth_files.cmake @@ -7,44 +7,43 @@ # set(FILES - Include/Public/Authentication/AuthenticationProviderBus.h - Include/Public/Authentication/AuthenticationTokens.h - Include/Public/Authorization/AWSCognitoAuthorizationBus.h - Include/Public/Authorization/ClientAuthAWSCredentials.h - Include/Public/UserManagement/AWSCognitoUserManagementBus.h + Include/Authentication/AuthenticationProviderBus.h + Include/Authentication/AuthenticationTokens.h + Include/Authorization/AWSCognitoAuthorizationBus.h + Include/Authorization/ClientAuthAWSCredentials.h + Include/UserManagement/AWSCognitoUserManagementBus.h - Include/Private/AWSClientAuthSystemComponent.h - Include/Private/AWSClientAuthBus.h - Include/Private/AWSClientAuthResourceMappingConstants.h - Include/Private/Authentication/AuthenticationProviderTypes.h - Include/Private/Authentication/AuthenticationProviderScriptCanvasBus.h - Include/Private/Authentication/AuthenticationProviderManager.h - Include/Private/Authentication/AuthenticationNotificationBusBehaviorHandler.h - - Include/Private/Authorization/AWSCognitoAuthorizationController.h - Include/Private/Authorization/AWSClientAuthPersistentCognitoIdentityProvider.h - Include/Private/Authorization/AWSCognitoAuthorizationNotificationBusBehaviorHandler.h - - Include/Private/UserManagement/AWSCognitoUserManagementController.h - Include/Private/UserManagement/UserManagementNotificationBusBehaviorHandler.h - - Include/Private/Authentication/AuthenticationProviderInterface.h - Include/Private/Authentication/OAuthConstants.h - Include/Private/Authentication/AWSCognitoAuthenticationProvider.h - Include/Private/Authentication/LWAAuthenticationProvider.h - Include/Private/Authentication/GoogleAuthenticationProvider.h - Source/AWSClientAuthSystemComponent.cpp - Source/Authentication/AuthenticationTokens.cpp - Source/Authentication/AuthenticationProviderInterface.cpp - Source/Authentication/AuthenticationProviderManager.cpp - Source/Authentication/AWSCognitoAuthenticationProvider.cpp - Source/Authentication/LWAAuthenticationProvider.cpp - Source/Authentication/GoogleAuthenticationProvider.cpp + Source/AWSClientAuthSystemComponent.h + Source/AWSClientAuthBus.h + Source/AWSClientAuthResourceMappingConstants.h - Source/Authorization/ClientAuthAWSCredentials.cpp - Source/Authorization/AWSCognitoAuthorizationController.cpp + Source/Authentication/AuthenticationNotificationBusBehaviorHandler.h + Source/Authentication/AuthenticationProviderInterface.cpp + Source/Authentication/AuthenticationProviderInterface.h + Source/Authentication/AuthenticationProviderManager.cpp + Source/Authentication/AuthenticationProviderManager.h + Source/Authentication/AuthenticationProviderScriptCanvasBus.h + Source/Authentication/AuthenticationProviderTypes.h + Source/Authentication/AuthenticationTokens.cpp + Source/Authentication/AWSCognitoAuthenticationProvider.cpp + Source/Authentication/AWSCognitoAuthenticationProvider.h + Source/Authentication/LWAAuthenticationProvider.cpp + Source/Authentication/LWAAuthenticationProvider.h + Source/Authentication/GoogleAuthenticationProvider.cpp + Source/Authentication/GoogleAuthenticationProvider.h + Source/Authentication/OAuthConstants.h + + Source/Authorization/AWSClientAuthCognitoCachingAuthenticatedCredentialsProvider.cpp + Source/Authorization/AWSClientAuthCognitoCachingAuthenticatedCredentialsProvider.h Source/Authorization/AWSClientAuthPersistentCognitoIdentityProvider.cpp + Source/Authorization/AWSClientAuthPersistentCognitoIdentityProvider.h + Source/Authorization/AWSCognitoAuthorizationController.cpp + Source/Authorization/AWSCognitoAuthorizationController.h + Source/Authorization/AWSCognitoAuthorizationNotificationBusBehaviorHandler.h + Source/Authorization/ClientAuthAWSCredentials.cpp Source/UserManagement/AWSCognitoUserManagementController.cpp + Source/UserManagement/AWSCognitoUserManagementController.h + Source/UserManagement/UserManagementNotificationBusBehaviorHandler.h ) diff --git a/Gems/AWSClientAuth/Code/awsclientauth_shared_files.cmake b/Gems/AWSClientAuth/Code/awsclientauth_shared_files.cmake index 6297f400fd..cca6184641 100644 --- a/Gems/AWSClientAuth/Code/awsclientauth_shared_files.cmake +++ b/Gems/AWSClientAuth/Code/awsclientauth_shared_files.cmake @@ -7,6 +7,6 @@ # set(FILES - Include/Private/AWSClientAuthModule.h Source/AWSClientAuthModule.cpp + Source/AWSClientAuthModule.h ) diff --git a/Gems/AWSClientAuth/gem.json b/Gems/AWSClientAuth/gem.json index 75c07d025b..9c7188f103 100644 --- a/Gems/AWSClientAuth/gem.json +++ b/Gems/AWSClientAuth/gem.json @@ -2,6 +2,7 @@ "gem_name": "AWSClientAuth", "display_name": "AWS Client Authorization", "license": "Apache-2.0 Or MIT", + "license_url": "https://github.com/o3de/o3de/blob/development/LICENSE.txt", "origin": "Amazon Web Services, Inc.", "type": "Code", "summary": "AWS Client Auth provides client authentication and AWS authorization solution.", @@ -14,7 +15,6 @@ "SDK" ], "icon_path": "preview.png", - "requirements": "", "documentation_url": "https://o3de.org/docs/user-guide/gems/reference/aws/aws-client-auth/", "dependencies": [ "AWSCore", diff --git a/Gems/AWSCore/Code/CMakeLists.txt b/Gems/AWSCore/Code/CMakeLists.txt index 7559f4720b..877696e26c 100644 --- a/Gems/AWSCore/Code/CMakeLists.txt +++ b/Gems/AWSCore/Code/CMakeLists.txt @@ -16,10 +16,10 @@ ly_add_target( ${pal_dir}/platform_${PAL_PLATFORM_NAME_LOWERCASE}_files.cmake INCLUDE_DIRECTORIES PUBLIC - Include/Public + Include ${pal_dir} PRIVATE - Include/Private + Source BUILD_DEPENDENCIES PRIVATE AZ::AzCore @@ -36,7 +36,7 @@ ly_add_target( awscore_shared_files.cmake INCLUDE_DIRECTORIES PRIVATE - Include/Private + Source BUILD_DEPENDENCIES PRIVATE AZ::AzCore @@ -60,6 +60,9 @@ ly_create_alias( ) if (PAL_TRAIT_BUILD_HOST_TOOLS) + + include(${CMAKE_CURRENT_SOURCE_DIR}/Platform/${PAL_PLATFORM_NAME}/PAL_traits_editor_${PAL_PLATFORM_NAME_LOWERCASE}.cmake) + ly_add_target( NAME AWSCore.Editor.Static STATIC NAMESPACE Gem @@ -68,10 +71,10 @@ if (PAL_TRAIT_BUILD_HOST_TOOLS) ${pal_dir}/platform_${PAL_PLATFORM_NAME_LOWERCASE}_editor_files.cmake INCLUDE_DIRECTORIES PRIVATE - Include/Private + Source ${pal_dir} PUBLIC - Include/Public + Include BUILD_DEPENDENCIES PRIVATE AZ::AzQtComponents @@ -90,29 +93,38 @@ if (PAL_TRAIT_BUILD_HOST_TOOLS) awscore_editor_shared_files.cmake INCLUDE_DIRECTORIES PRIVATE - Include/Private + Source BUILD_DEPENDENCIES PRIVATE AZ::AzCore Gem::AWSCore.Editor.Static ) - # This target is not a real gem module - # It is not meant to be loaded by the ModuleManager in C++ - ly_add_target( - NAME AWSCore.ResourceMappingTool MODULE - NAMESPACE Gem - OUTPUT_SUBDIRECTORY AWSCoreEditorQtBin - FILES_CMAKE - awscore_resourcemappingtool_files.cmake - INCLUDE_DIRECTORIES - PRIVATE - Include/Private - BUILD_DEPENDENCIES - PRIVATE - Gem::AWSCore.Editor.Static - ) - ly_add_dependencies(AWSCore.Editor AWSCore.ResourceMappingTool) + if (PAL_TRAIT_ENABLE_RESOURCE_MAPPING_TOOL) + + # This target is not a real gem module + # It is not meant to be loaded by the ModuleManager in C++ + ly_add_target( + NAME AWSCore.ResourceMappingTool MODULE + NAMESPACE Gem + OUTPUT_SUBDIRECTORY AWSCoreEditorQtBin + FILES_CMAKE + awscore_resourcemappingtool_files.cmake + INCLUDE_DIRECTORIES + PRIVATE + Source + BUILD_DEPENDENCIES + PRIVATE + Gem::AWSCore.Editor.Static + RUNTIME_DEPENDENCIES + 3rdParty::pyside2 + + ) + ly_add_dependencies(AWSCore.Editor AWSCore.ResourceMappingTool) + + ly_install_directory(DIRECTORIES Tools/ResourceMappingTool) + + endif() # Builders and Tools (such as the Editor use AWSCore.Editor) use the .Editor module above. ly_create_alias( @@ -144,8 +156,8 @@ if(PAL_TRAIT_BUILD_TESTS_SUPPORTED) awscore_tests_files.cmake INCLUDE_DIRECTORIES PRIVATE - Include/Private - Include/Public + Source + Include Tests BUILD_DEPENDENCIES PRIVATE @@ -154,10 +166,20 @@ if(PAL_TRAIT_BUILD_TESTS_SUPPORTED) AZ::AWSNativeSDKInit Gem::AWSCore.Static ) + ly_add_googletest( NAME Gem::AWSCore.Tests ) + ly_add_target_files( + TARGETS + AWSCore.Tests + FILES + ${CMAKE_CURRENT_SOURCE_DIR}/Tools/ResourceMappingTool/resource_mapping_schema.json + OUTPUT_SUBDIRECTORY + Gems/AWSCore + ) + if (PAL_TRAIT_BUILD_HOST_TOOLS) ly_add_target( NAME AWSCore.Editor.Tests ${PAL_TRAIT_TEST_TARGET_TYPE} @@ -168,9 +190,9 @@ if(PAL_TRAIT_BUILD_TESTS_SUPPORTED) ${pal_dir}/platform_${PAL_PLATFORM_NAME_LOWERCASE}_editor_tests_files.cmake INCLUDE_DIRECTORIES PRIVATE - Include/Private + Source ${pal_dir} - Include/Public + Include Tests COMPILE_DEFINITIONS PRIVATE @@ -180,6 +202,7 @@ if(PAL_TRAIT_BUILD_TESTS_SUPPORTED) 3rdParty::Qt::Gui 3rdParty::Qt::Widgets AZ::AzTest + AZ::AWSNativeSDKInit Gem::AWSCore.Static Gem::AWSCore.Editor.Static ) @@ -189,4 +212,13 @@ if(PAL_TRAIT_BUILD_TESTS_SUPPORTED) endif() endif() +ly_add_target_files( + TARGETS + AWSCore + FILES + ${CMAKE_CURRENT_SOURCE_DIR}/Tools/ResourceMappingTool/resource_mapping_schema.json + OUTPUT_SUBDIRECTORY + Gems/AWSCore +) + ly_install_directory(DIRECTORIES Tools/ResourceMappingTool) diff --git a/Gems/AWSCore/Code/Include/Public/AWSCoreBus.h b/Gems/AWSCore/Code/Include/AWSCoreBus.h similarity index 100% rename from Gems/AWSCore/Code/Include/Public/AWSCoreBus.h rename to Gems/AWSCore/Code/Include/AWSCoreBus.h diff --git a/Gems/AWSCore/Code/Include/Public/Credential/AWSCredentialBus.h b/Gems/AWSCore/Code/Include/Credential/AWSCredentialBus.h similarity index 100% rename from Gems/AWSCore/Code/Include/Public/Credential/AWSCredentialBus.h rename to Gems/AWSCore/Code/Include/Credential/AWSCredentialBus.h diff --git a/Gems/AWSCore/Code/Include/Public/Framework/AWSApiClientJob.h b/Gems/AWSCore/Code/Include/Framework/AWSApiClientJob.h similarity index 100% rename from Gems/AWSCore/Code/Include/Public/Framework/AWSApiClientJob.h rename to Gems/AWSCore/Code/Include/Framework/AWSApiClientJob.h diff --git a/Gems/AWSCore/Code/Include/Public/Framework/AWSApiClientJobConfig.h b/Gems/AWSCore/Code/Include/Framework/AWSApiClientJobConfig.h similarity index 100% rename from Gems/AWSCore/Code/Include/Public/Framework/AWSApiClientJobConfig.h rename to Gems/AWSCore/Code/Include/Framework/AWSApiClientJobConfig.h diff --git a/Gems/AWSCore/Code/Include/Public/Framework/AWSApiJob.h b/Gems/AWSCore/Code/Include/Framework/AWSApiJob.h similarity index 100% rename from Gems/AWSCore/Code/Include/Public/Framework/AWSApiJob.h rename to Gems/AWSCore/Code/Include/Framework/AWSApiJob.h diff --git a/Gems/AWSCore/Code/Include/Public/Framework/AWSApiJobConfig.h b/Gems/AWSCore/Code/Include/Framework/AWSApiJobConfig.h similarity index 100% rename from Gems/AWSCore/Code/Include/Public/Framework/AWSApiJobConfig.h rename to Gems/AWSCore/Code/Include/Framework/AWSApiJobConfig.h diff --git a/Gems/AWSCore/Code/Include/Public/Framework/AWSApiRequestJob.h b/Gems/AWSCore/Code/Include/Framework/AWSApiRequestJob.h similarity index 100% rename from Gems/AWSCore/Code/Include/Public/Framework/AWSApiRequestJob.h rename to Gems/AWSCore/Code/Include/Framework/AWSApiRequestJob.h diff --git a/Gems/AWSCore/Code/Include/Public/Framework/AWSApiRequestJobConfig.h b/Gems/AWSCore/Code/Include/Framework/AWSApiRequestJobConfig.h similarity index 100% rename from Gems/AWSCore/Code/Include/Public/Framework/AWSApiRequestJobConfig.h rename to Gems/AWSCore/Code/Include/Framework/AWSApiRequestJobConfig.h diff --git a/Gems/AWSCore/Code/Include/Public/Framework/Error.h b/Gems/AWSCore/Code/Include/Framework/Error.h similarity index 100% rename from Gems/AWSCore/Code/Include/Public/Framework/Error.h rename to Gems/AWSCore/Code/Include/Framework/Error.h diff --git a/Gems/AWSCore/Code/Include/Public/Framework/HttpClientComponent.h b/Gems/AWSCore/Code/Include/Framework/HttpClientComponent.h similarity index 100% rename from Gems/AWSCore/Code/Include/Public/Framework/HttpClientComponent.h rename to Gems/AWSCore/Code/Include/Framework/HttpClientComponent.h diff --git a/Gems/AWSCore/Code/Include/Public/Framework/HttpRequestJob.h b/Gems/AWSCore/Code/Include/Framework/HttpRequestJob.h similarity index 100% rename from Gems/AWSCore/Code/Include/Public/Framework/HttpRequestJob.h rename to Gems/AWSCore/Code/Include/Framework/HttpRequestJob.h diff --git a/Gems/AWSCore/Code/Include/Public/Framework/HttpRequestJobConfig.h b/Gems/AWSCore/Code/Include/Framework/HttpRequestJobConfig.h similarity index 100% rename from Gems/AWSCore/Code/Include/Public/Framework/HttpRequestJobConfig.h rename to Gems/AWSCore/Code/Include/Framework/HttpRequestJobConfig.h diff --git a/Gems/AWSCore/Code/Include/Public/Framework/JobExecuter.h b/Gems/AWSCore/Code/Include/Framework/JobExecuter.h similarity index 100% rename from Gems/AWSCore/Code/Include/Public/Framework/JobExecuter.h rename to Gems/AWSCore/Code/Include/Framework/JobExecuter.h diff --git a/Gems/AWSCore/Code/Include/Public/Framework/JsonObjectHandler.h b/Gems/AWSCore/Code/Include/Framework/JsonObjectHandler.h similarity index 100% rename from Gems/AWSCore/Code/Include/Public/Framework/JsonObjectHandler.h rename to Gems/AWSCore/Code/Include/Framework/JsonObjectHandler.h diff --git a/Gems/AWSCore/Code/Include/Public/Framework/JsonWriter.h b/Gems/AWSCore/Code/Include/Framework/JsonWriter.h similarity index 100% rename from Gems/AWSCore/Code/Include/Public/Framework/JsonWriter.h rename to Gems/AWSCore/Code/Include/Framework/JsonWriter.h diff --git a/Gems/AWSCore/Code/Include/Public/Framework/MultipartFormData.h b/Gems/AWSCore/Code/Include/Framework/MultipartFormData.h similarity index 100% rename from Gems/AWSCore/Code/Include/Public/Framework/MultipartFormData.h rename to Gems/AWSCore/Code/Include/Framework/MultipartFormData.h diff --git a/Gems/AWSCore/Code/Include/Public/Framework/RequestBuilder.h b/Gems/AWSCore/Code/Include/Framework/RequestBuilder.h similarity index 100% rename from Gems/AWSCore/Code/Include/Public/Framework/RequestBuilder.h rename to Gems/AWSCore/Code/Include/Framework/RequestBuilder.h diff --git a/Gems/AWSCore/Code/Include/Public/Framework/ServiceClientJob.h b/Gems/AWSCore/Code/Include/Framework/ServiceClientJob.h similarity index 100% rename from Gems/AWSCore/Code/Include/Public/Framework/ServiceClientJob.h rename to Gems/AWSCore/Code/Include/Framework/ServiceClientJob.h diff --git a/Gems/AWSCore/Code/Include/Public/Framework/ServiceClientJobConfig.h b/Gems/AWSCore/Code/Include/Framework/ServiceClientJobConfig.h similarity index 100% rename from Gems/AWSCore/Code/Include/Public/Framework/ServiceClientJobConfig.h rename to Gems/AWSCore/Code/Include/Framework/ServiceClientJobConfig.h diff --git a/Gems/AWSCore/Code/Include/Public/Framework/ServiceJob.h b/Gems/AWSCore/Code/Include/Framework/ServiceJob.h similarity index 100% rename from Gems/AWSCore/Code/Include/Public/Framework/ServiceJob.h rename to Gems/AWSCore/Code/Include/Framework/ServiceJob.h diff --git a/Gems/AWSCore/Code/Include/Public/Framework/ServiceJobConfig.h b/Gems/AWSCore/Code/Include/Framework/ServiceJobConfig.h similarity index 100% rename from Gems/AWSCore/Code/Include/Public/Framework/ServiceJobConfig.h rename to Gems/AWSCore/Code/Include/Framework/ServiceJobConfig.h diff --git a/Gems/AWSCore/Code/Include/Public/Framework/ServiceJobUtil.h b/Gems/AWSCore/Code/Include/Framework/ServiceJobUtil.h similarity index 100% rename from Gems/AWSCore/Code/Include/Public/Framework/ServiceJobUtil.h rename to Gems/AWSCore/Code/Include/Framework/ServiceJobUtil.h diff --git a/Gems/AWSCore/Code/Include/Public/Framework/ServiceRequestJob.h b/Gems/AWSCore/Code/Include/Framework/ServiceRequestJob.h similarity index 100% rename from Gems/AWSCore/Code/Include/Public/Framework/ServiceRequestJob.h rename to Gems/AWSCore/Code/Include/Framework/ServiceRequestJob.h diff --git a/Gems/AWSCore/Code/Include/Public/Framework/ServiceRequestJobConfig.h b/Gems/AWSCore/Code/Include/Framework/ServiceRequestJobConfig.h similarity index 100% rename from Gems/AWSCore/Code/Include/Public/Framework/ServiceRequestJobConfig.h rename to Gems/AWSCore/Code/Include/Framework/ServiceRequestJobConfig.h diff --git a/Gems/AWSCore/Code/Include/Public/Framework/Util.h b/Gems/AWSCore/Code/Include/Framework/Util.h similarity index 100% rename from Gems/AWSCore/Code/Include/Public/Framework/Util.h rename to Gems/AWSCore/Code/Include/Framework/Util.h diff --git a/Gems/AWSCore/Code/Include/Private/ResourceMapping/AWSResourceMappingConstants.h b/Gems/AWSCore/Code/Include/Private/ResourceMapping/AWSResourceMappingConstants.h deleted file mode 100644 index 97eb5b6492..0000000000 --- a/Gems/AWSCore/Code/Include/Private/ResourceMapping/AWSResourceMappingConstants.h +++ /dev/null @@ -1,84 +0,0 @@ -/* - * Copyright (c) Contributors to the Open 3D Engine Project. - * For complete copyright and license terms please see the LICENSE at the root of this distribution. - * - * SPDX-License-Identifier: Apache-2.0 OR MIT - * - */ - -#pragma once - -namespace AWSCore -{ - static constexpr const char AWSChinaRegionPrefix[] = "cn-"; - - static constexpr const char AWSFeatureGemRESTApiIdKeyNameSuffix[] = ".RESTApiId"; - static constexpr const char AWSFeatureGemRESTApiStageKeyNameSuffix[] = ".RESTApiStage"; - - static constexpr const char ResourceMappingAccountIdKeyName[] = "AccountId"; - static constexpr const char ResourceMappingResourcesKeyName[] = "AWSResourceMappings"; - static constexpr const char ResourceMappingNameIdKeyName[] = "Name/ID"; - static constexpr const char ResourceMappingRegionKeyName[] = "Region"; - static constexpr const char ResourceMappingTypeKeyName[] = "Type"; - static constexpr const char ResourceMappingVersionKeyName[] = "Version"; - - // TODO: move this into an independent file under AWSCore gem, if resource mapping tool can reuse it - static constexpr const char ResourceMappingJsonSchema[] = - R"({ - "$schema": "http://json-schema.org/draft-04/schema", - "type": "object", - "title": "The AWS Resource Mapping Root schema", - "required": ["AWSResourceMappings", "AccountId", "Region", "Version"], - "properties": { - "AWSResourceMappings": { - "type": "object", - "title": "The AWSResourceMappings schema", - "patternProperties": { - "^.+$": { - "type": "object", - "title": "The AWS Resource Entry schema", - "required": ["Type", "Name/ID"], - "properties": { - "Type": { - "$ref": "#/NonEmptyString" - }, - "Name/ID": { - "$ref": "#/NonEmptyString" - }, - "AccountId": { - "$ref": "#/AccountIdString" - }, - "Region": { - "$ref": "#/RegionString" - } - } - } - }, - "additionalProperties": false - }, - "AccountId": { - "$ref": "#/AccountIdString" - }, - "Region": { - "$ref": "#/RegionString" - }, - "Version": { - "pattern": "^[0-9]{1}.[0-9]{1}.[0-9]{1}$" - } - }, - "AccountIdString": { - "type": "string", - "pattern": "^[0-9]{12}$|EMPTY" - }, - "NonEmptyString": { - "type": "string", - "minLength": 1 - }, - "RegionString": { - "type": "string", - "pattern": "^[a-z]{2}-[a-z]{4,9}-[0-9]{1}$" - }, - "additionalProperties": false -})"; - -} // namespace AWSCore diff --git a/Gems/AWSCore/Code/Include/Public/ResourceMapping/AWSResourceMappingBus.h b/Gems/AWSCore/Code/Include/ResourceMapping/AWSResourceMappingBus.h similarity index 100% rename from Gems/AWSCore/Code/Include/Public/ResourceMapping/AWSResourceMappingBus.h rename to Gems/AWSCore/Code/Include/ResourceMapping/AWSResourceMappingBus.h diff --git a/Gems/AWSCore/Code/Include/Public/ScriptCanvas/AWSScriptBehaviorDynamoDB.h b/Gems/AWSCore/Code/Include/ScriptCanvas/AWSScriptBehaviorDynamoDB.h similarity index 100% rename from Gems/AWSCore/Code/Include/Public/ScriptCanvas/AWSScriptBehaviorDynamoDB.h rename to Gems/AWSCore/Code/Include/ScriptCanvas/AWSScriptBehaviorDynamoDB.h diff --git a/Gems/AWSCore/Code/Include/Public/ScriptCanvas/AWSScriptBehaviorLambda.h b/Gems/AWSCore/Code/Include/ScriptCanvas/AWSScriptBehaviorLambda.h similarity index 100% rename from Gems/AWSCore/Code/Include/Public/ScriptCanvas/AWSScriptBehaviorLambda.h rename to Gems/AWSCore/Code/Include/ScriptCanvas/AWSScriptBehaviorLambda.h diff --git a/Gems/AWSCore/Code/Include/Public/ScriptCanvas/AWSScriptBehaviorS3.h b/Gems/AWSCore/Code/Include/ScriptCanvas/AWSScriptBehaviorS3.h similarity index 100% rename from Gems/AWSCore/Code/Include/Public/ScriptCanvas/AWSScriptBehaviorS3.h rename to Gems/AWSCore/Code/Include/ScriptCanvas/AWSScriptBehaviorS3.h diff --git a/Gems/AWSCore/Code/Include/Public/ScriptCanvas/AWSScriptBehaviorsComponent.h b/Gems/AWSCore/Code/Include/ScriptCanvas/AWSScriptBehaviorsComponent.h similarity index 100% rename from Gems/AWSCore/Code/Include/Public/ScriptCanvas/AWSScriptBehaviorsComponent.h rename to Gems/AWSCore/Code/Include/ScriptCanvas/AWSScriptBehaviorsComponent.h diff --git a/Gems/AWSCore/Code/Platform/Linux/AWSCoreEditor_Traits_Linux.h b/Gems/AWSCore/Code/Platform/Linux/AWSCoreEditor_Traits_Linux.h index fb82911dd4..726d4cc86f 100644 --- a/Gems/AWSCore/Code/Platform/Linux/AWSCoreEditor_Traits_Linux.h +++ b/Gems/AWSCore/Code/Platform/Linux/AWSCoreEditor_Traits_Linux.h @@ -7,4 +7,6 @@ */ #pragma once -#define AWSCORE_EDITOR_RESOURCE_MAPPING_TOOL_ENABLED 0 +#define AWSCORE_EDITOR_RESOURCE_MAPPING_TOOL_ENABLED 1 +#define AWSCORE_EDITOR_PYTHON_DEBUG_ARGUMENT "" +#define AWSCORE_EDITOR_PYTHON_COMMAND "python/python.sh" diff --git a/Gems/AWSCore/Code/Platform/Linux/AWSCore_Traits_Linux.h b/Gems/AWSCore/Code/Platform/Linux/AWSCore_Traits_Linux.h index d7b1f32461..2cacfb0d34 100644 --- a/Gems/AWSCore/Code/Platform/Linux/AWSCore_Traits_Linux.h +++ b/Gems/AWSCore/Code/Platform/Linux/AWSCore_Traits_Linux.h @@ -7,4 +7,4 @@ */ #pragma once -#define AWSCORE_BACKWARD_INCOMPATIBLE_CHANGE 0 +#define AWSCORE_BACKWARD_INCOMPATIBLE_CHANGE 1 diff --git a/Gems/AWSCore/Code/Platform/Linux/PAL_traits_editor_linux.cmake b/Gems/AWSCore/Code/Platform/Linux/PAL_traits_editor_linux.cmake new file mode 100644 index 0000000000..deaaa60506 --- /dev/null +++ b/Gems/AWSCore/Code/Platform/Linux/PAL_traits_editor_linux.cmake @@ -0,0 +1,9 @@ +# +# Copyright (c) Contributors to the Open 3D Engine Project. +# For complete copyright and license terms please see the LICENSE at the root of this distribution. +# +# SPDX-License-Identifier: Apache-2.0 OR MIT +# +# + +set(PAL_TRAIT_ENABLE_RESOURCE_MAPPING_TOOL TRUE) diff --git a/Gems/AWSCore/Code/Platform/Mac/AWSCoreEditor_Traits_Mac.h b/Gems/AWSCore/Code/Platform/Mac/AWSCoreEditor_Traits_Mac.h index fb82911dd4..d815c8273e 100644 --- a/Gems/AWSCore/Code/Platform/Mac/AWSCoreEditor_Traits_Mac.h +++ b/Gems/AWSCore/Code/Platform/Mac/AWSCoreEditor_Traits_Mac.h @@ -8,3 +8,5 @@ #pragma once #define AWSCORE_EDITOR_RESOURCE_MAPPING_TOOL_ENABLED 0 +#define AWSCORE_EDITOR_PYTHON_DEBUG_ARGUMENT "" +#define AWSCORE_EDITOR_PYTHON_COMMAND "python/python.sh" diff --git a/Gems/AWSCore/Code/Platform/Mac/AWSCore_Traits_Mac.h b/Gems/AWSCore/Code/Platform/Mac/AWSCore_Traits_Mac.h index d7b1f32461..2cacfb0d34 100644 --- a/Gems/AWSCore/Code/Platform/Mac/AWSCore_Traits_Mac.h +++ b/Gems/AWSCore/Code/Platform/Mac/AWSCore_Traits_Mac.h @@ -7,4 +7,4 @@ */ #pragma once -#define AWSCORE_BACKWARD_INCOMPATIBLE_CHANGE 0 +#define AWSCORE_BACKWARD_INCOMPATIBLE_CHANGE 1 diff --git a/Gems/AWSCore/Code/Platform/Mac/PAL_traits_editor_mac.cmake b/Gems/AWSCore/Code/Platform/Mac/PAL_traits_editor_mac.cmake new file mode 100644 index 0000000000..e953c95955 --- /dev/null +++ b/Gems/AWSCore/Code/Platform/Mac/PAL_traits_editor_mac.cmake @@ -0,0 +1,9 @@ +# +# Copyright (c) Contributors to the Open 3D Engine Project. +# For complete copyright and license terms please see the LICENSE at the root of this distribution. +# +# SPDX-License-Identifier: Apache-2.0 OR MIT +# +# + +set(PAL_TRAIT_ENABLE_RESOURCE_MAPPING_TOOL FALSE) diff --git a/Gems/AWSCore/Code/Platform/Windows/AWSCoreEditor_Traits_Windows.h b/Gems/AWSCore/Code/Platform/Windows/AWSCoreEditor_Traits_Windows.h index e1522db32c..6eca30a8ac 100644 --- a/Gems/AWSCore/Code/Platform/Windows/AWSCoreEditor_Traits_Windows.h +++ b/Gems/AWSCore/Code/Platform/Windows/AWSCoreEditor_Traits_Windows.h @@ -8,3 +8,5 @@ #pragma once #define AWSCORE_EDITOR_RESOURCE_MAPPING_TOOL_ENABLED 1 +#define AWSCORE_EDITOR_PYTHON_DEBUG_ARGUMENT "debug " +#define AWSCORE_EDITOR_PYTHON_COMMAND "python/python.cmd" diff --git a/Gems/AWSCore/Code/Platform/Windows/AWSCore_Traits_Windows.h b/Gems/AWSCore/Code/Platform/Windows/AWSCore_Traits_Windows.h index d7b1f32461..2cacfb0d34 100644 --- a/Gems/AWSCore/Code/Platform/Windows/AWSCore_Traits_Windows.h +++ b/Gems/AWSCore/Code/Platform/Windows/AWSCore_Traits_Windows.h @@ -7,4 +7,4 @@ */ #pragma once -#define AWSCORE_BACKWARD_INCOMPATIBLE_CHANGE 0 +#define AWSCORE_BACKWARD_INCOMPATIBLE_CHANGE 1 diff --git a/Gems/AWSCore/Code/Platform/Windows/PAL_traits_editor_windows.cmake b/Gems/AWSCore/Code/Platform/Windows/PAL_traits_editor_windows.cmake new file mode 100644 index 0000000000..deaaa60506 --- /dev/null +++ b/Gems/AWSCore/Code/Platform/Windows/PAL_traits_editor_windows.cmake @@ -0,0 +1,9 @@ +# +# Copyright (c) Contributors to the Open 3D Engine Project. +# For complete copyright and license terms please see the LICENSE at the root of this distribution. +# +# SPDX-License-Identifier: Apache-2.0 OR MIT +# +# + +set(PAL_TRAIT_ENABLE_RESOURCE_MAPPING_TOOL TRUE) diff --git a/Gems/AWSCore/Code/Include/Private/AWSCoreEditorModule.h b/Gems/AWSCore/Code/Source/AWSCoreEditorModule.h similarity index 100% rename from Gems/AWSCore/Code/Include/Private/AWSCoreEditorModule.h rename to Gems/AWSCore/Code/Source/AWSCoreEditorModule.h diff --git a/Gems/AWSCore/Code/Include/Private/AWSCoreEditorSystemComponent.h b/Gems/AWSCore/Code/Source/AWSCoreEditorSystemComponent.h similarity index 100% rename from Gems/AWSCore/Code/Include/Private/AWSCoreEditorSystemComponent.h rename to Gems/AWSCore/Code/Source/AWSCoreEditorSystemComponent.h diff --git a/Gems/AWSCore/Code/Include/Private/AWSCoreInternalBus.h b/Gems/AWSCore/Code/Source/AWSCoreInternalBus.h similarity index 100% rename from Gems/AWSCore/Code/Include/Private/AWSCoreInternalBus.h rename to Gems/AWSCore/Code/Source/AWSCoreInternalBus.h diff --git a/Gems/AWSCore/Code/Include/Private/AWSCoreModule.h b/Gems/AWSCore/Code/Source/AWSCoreModule.h similarity index 100% rename from Gems/AWSCore/Code/Include/Private/AWSCoreModule.h rename to Gems/AWSCore/Code/Source/AWSCoreModule.h diff --git a/Gems/AWSCore/Code/Source/AWSCoreSystemComponent.cpp b/Gems/AWSCore/Code/Source/AWSCoreSystemComponent.cpp index 294462e654..490fdc9ef2 100644 --- a/Gems/AWSCore/Code/Source/AWSCoreSystemComponent.cpp +++ b/Gems/AWSCore/Code/Source/AWSCoreSystemComponent.cpp @@ -160,6 +160,7 @@ namespace AWSCore // If m_firstThreadCPU isn't -1, then each thread will be // assigned to a specific CPU starting with the specified CPU. AZ::JobManagerDesc jobManagerDesc{}; + jobManagerDesc.m_jobManagerName = "AWSCore JobManager"; AZ::JobManagerThreadDesc threadDesc(m_firstThreadCPU, m_threadPriority, m_threadStackSize); for (int i = 0; i < m_threadCount; ++i) { diff --git a/Gems/AWSCore/Code/Include/Private/AWSCoreSystemComponent.h b/Gems/AWSCore/Code/Source/AWSCoreSystemComponent.h similarity index 100% rename from Gems/AWSCore/Code/Include/Private/AWSCoreSystemComponent.h rename to Gems/AWSCore/Code/Source/AWSCoreSystemComponent.h diff --git a/Gems/AWSCore/Code/Include/Private/Configuration/AWSCoreConfiguration.h b/Gems/AWSCore/Code/Source/Configuration/AWSCoreConfiguration.h similarity index 100% rename from Gems/AWSCore/Code/Include/Private/Configuration/AWSCoreConfiguration.h rename to Gems/AWSCore/Code/Source/Configuration/AWSCoreConfiguration.h diff --git a/Gems/AWSCore/Code/Include/Private/Credential/AWSCVarCredentialHandler.h b/Gems/AWSCore/Code/Source/Credential/AWSCVarCredentialHandler.h similarity index 100% rename from Gems/AWSCore/Code/Include/Private/Credential/AWSCVarCredentialHandler.h rename to Gems/AWSCore/Code/Source/Credential/AWSCVarCredentialHandler.h diff --git a/Gems/AWSCore/Code/Include/Private/Credential/AWSCredentialManager.h b/Gems/AWSCore/Code/Source/Credential/AWSCredentialManager.h similarity index 100% rename from Gems/AWSCore/Code/Include/Private/Credential/AWSCredentialManager.h rename to Gems/AWSCore/Code/Source/Credential/AWSCredentialManager.h diff --git a/Gems/AWSCore/Code/Include/Private/Credential/AWSDefaultCredentialHandler.h b/Gems/AWSCore/Code/Source/Credential/AWSDefaultCredentialHandler.h similarity index 100% rename from Gems/AWSCore/Code/Include/Private/Credential/AWSDefaultCredentialHandler.h rename to Gems/AWSCore/Code/Source/Credential/AWSDefaultCredentialHandler.h diff --git a/Gems/AWSCore/Code/Include/Private/Editor/AWSCoreEditorManager.h b/Gems/AWSCore/Code/Source/Editor/AWSCoreEditorManager.h similarity index 100% rename from Gems/AWSCore/Code/Include/Private/Editor/AWSCoreEditorManager.h rename to Gems/AWSCore/Code/Source/Editor/AWSCoreEditorManager.h diff --git a/Gems/AWSCore/Code/Include/Private/Editor/Attribution/AWSAttributionServiceApi.h b/Gems/AWSCore/Code/Source/Editor/Attribution/AWSAttributionServiceApi.h similarity index 100% rename from Gems/AWSCore/Code/Include/Private/Editor/Attribution/AWSAttributionServiceApi.h rename to Gems/AWSCore/Code/Source/Editor/Attribution/AWSAttributionServiceApi.h diff --git a/Gems/AWSCore/Code/Include/Private/Editor/Attribution/AWSCoreAttributionConsentDialog.h b/Gems/AWSCore/Code/Source/Editor/Attribution/AWSCoreAttributionConsentDialog.h similarity index 100% rename from Gems/AWSCore/Code/Include/Private/Editor/Attribution/AWSCoreAttributionConsentDialog.h rename to Gems/AWSCore/Code/Source/Editor/Attribution/AWSCoreAttributionConsentDialog.h diff --git a/Gems/AWSCore/Code/Include/Private/Editor/Attribution/AWSCoreAttributionConstant.h b/Gems/AWSCore/Code/Source/Editor/Attribution/AWSCoreAttributionConstant.h similarity index 100% rename from Gems/AWSCore/Code/Include/Private/Editor/Attribution/AWSCoreAttributionConstant.h rename to Gems/AWSCore/Code/Source/Editor/Attribution/AWSCoreAttributionConstant.h diff --git a/Gems/AWSCore/Code/Include/Private/Editor/Attribution/AWSCoreAttributionManager.h b/Gems/AWSCore/Code/Source/Editor/Attribution/AWSCoreAttributionManager.h similarity index 100% rename from Gems/AWSCore/Code/Include/Private/Editor/Attribution/AWSCoreAttributionManager.h rename to Gems/AWSCore/Code/Source/Editor/Attribution/AWSCoreAttributionManager.h diff --git a/Gems/AWSCore/Code/Include/Private/Editor/Attribution/AWSCoreAttributionMetric.h b/Gems/AWSCore/Code/Source/Editor/Attribution/AWSCoreAttributionMetric.h similarity index 100% rename from Gems/AWSCore/Code/Include/Private/Editor/Attribution/AWSCoreAttributionMetric.h rename to Gems/AWSCore/Code/Source/Editor/Attribution/AWSCoreAttributionMetric.h diff --git a/Gems/AWSCore/Code/Include/Private/Editor/Attribution/AWSCoreAttributionSystemComponent.h b/Gems/AWSCore/Code/Source/Editor/Attribution/AWSCoreAttributionSystemComponent.h similarity index 100% rename from Gems/AWSCore/Code/Include/Private/Editor/Attribution/AWSCoreAttributionSystemComponent.h rename to Gems/AWSCore/Code/Source/Editor/Attribution/AWSCoreAttributionSystemComponent.h diff --git a/Gems/AWSCore/Code/Include/Private/Editor/Constants/AWSCoreEditorMenuLinks.h b/Gems/AWSCore/Code/Source/Editor/Constants/AWSCoreEditorMenuLinks.h similarity index 100% rename from Gems/AWSCore/Code/Include/Private/Editor/Constants/AWSCoreEditorMenuLinks.h rename to Gems/AWSCore/Code/Source/Editor/Constants/AWSCoreEditorMenuLinks.h diff --git a/Gems/AWSCore/Code/Include/Private/Editor/Constants/AWSCoreEditorMenuNames.h b/Gems/AWSCore/Code/Source/Editor/Constants/AWSCoreEditorMenuNames.h similarity index 100% rename from Gems/AWSCore/Code/Include/Private/Editor/Constants/AWSCoreEditorMenuNames.h rename to Gems/AWSCore/Code/Source/Editor/Constants/AWSCoreEditorMenuNames.h diff --git a/Gems/AWSCore/Code/Include/Private/Editor/UI/AWSCoreEditorMenu.h b/Gems/AWSCore/Code/Source/Editor/UI/AWSCoreEditorMenu.h similarity index 100% rename from Gems/AWSCore/Code/Include/Private/Editor/UI/AWSCoreEditorMenu.h rename to Gems/AWSCore/Code/Source/Editor/UI/AWSCoreEditorMenu.h diff --git a/Gems/AWSCore/Code/Source/Editor/UI/AWSCoreResourceMappingToolAction.cpp b/Gems/AWSCore/Code/Source/Editor/UI/AWSCoreResourceMappingToolAction.cpp index 858d30fa40..49f800dbea 100644 --- a/Gems/AWSCore/Code/Source/Editor/UI/AWSCoreResourceMappingToolAction.cpp +++ b/Gems/AWSCore/Code/Source/Editor/UI/AWSCoreResourceMappingToolAction.cpp @@ -58,7 +58,7 @@ namespace AWSCore if (m_isDebug) { return AZStd::string::format( - "\"%s\" debug -B \"%s\" --binaries-path \"%s\" --debug --profile \"%s\" --config-path \"%s\" --log-path \"%s\"", + "\"%s\" " AWSCORE_EDITOR_PYTHON_DEBUG_ARGUMENT "-B \"%s\" --binaries-path \"%s\" --debug --profile \"%s\" --config-path \"%s\" --log-path \"%s\"", m_enginePythonEntryPath.c_str(), m_toolScriptPath.c_str(), m_toolQtBinDirectoryPath.c_str(), profileName.c_str(), m_toolConfigDirectoryPath.c_str(), m_toolLogDirectoryPath.c_str()); } diff --git a/Gems/AWSCore/Code/Include/Private/Editor/UI/AWSCoreResourceMappingToolAction.h b/Gems/AWSCore/Code/Source/Editor/UI/AWSCoreResourceMappingToolAction.h similarity index 94% rename from Gems/AWSCore/Code/Include/Private/Editor/UI/AWSCoreResourceMappingToolAction.h rename to Gems/AWSCore/Code/Source/Editor/UI/AWSCoreResourceMappingToolAction.h index 1a4c428e68..a065773743 100644 --- a/Gems/AWSCore/Code/Include/Private/Editor/UI/AWSCoreResourceMappingToolAction.h +++ b/Gems/AWSCore/Code/Source/Editor/UI/AWSCoreResourceMappingToolAction.h @@ -13,6 +13,8 @@ #include #include +#include "AWSCoreEditor_Traits_Platform.h" + namespace AWSCore { class AWSCoreResourceMappingToolAction @@ -22,7 +24,7 @@ namespace AWSCore static constexpr const char AWSCoreResourceMappingToolActionName[] = "AWSCoreResourceMappingToolAction"; static constexpr const char ResourceMappingToolDirectoryPath[] = "Gems/AWSCore/Code/Tools/ResourceMappingTool"; static constexpr const char ResourceMappingToolLogDirectoryPath[] = "user/log/"; - static constexpr const char EngineWindowsPythonEntryScriptPath[] = "python/python.cmd"; + static constexpr const char EngineWindowsPythonEntryScriptPath[] = AWSCORE_EDITOR_PYTHON_COMMAND; AWSCoreResourceMappingToolAction(const QString& text, QObject* parent = nullptr); diff --git a/Gems/AWSCore/Code/Source/ResourceMapping/AWSResourceMappingConstants.h b/Gems/AWSCore/Code/Source/ResourceMapping/AWSResourceMappingConstants.h new file mode 100644 index 0000000000..e9d063eb5f --- /dev/null +++ b/Gems/AWSCore/Code/Source/ResourceMapping/AWSResourceMappingConstants.h @@ -0,0 +1,27 @@ +/* + * Copyright (c) Contributors to the Open 3D Engine Project. + * For complete copyright and license terms please see the LICENSE at the root of this distribution. + * + * SPDX-License-Identifier: Apache-2.0 OR MIT + * + */ + +#pragma once + +namespace AWSCore +{ + static constexpr const char AWSChinaRegionPrefix[] = "cn-"; + + static constexpr const char AWSFeatureGemRESTApiIdKeyNameSuffix[] = ".RESTApiId"; + static constexpr const char AWSFeatureGemRESTApiStageKeyNameSuffix[] = ".RESTApiStage"; + + static constexpr const char ResourceMappingAccountIdKeyName[] = "AccountId"; + static constexpr const char ResourceMappingResourcesKeyName[] = "AWSResourceMappings"; + static constexpr const char ResourceMappingNameIdKeyName[] = "Name/ID"; + static constexpr const char ResourceMappingRegionKeyName[] = "Region"; + static constexpr const char ResourceMappingTypeKeyName[] = "Type"; + static constexpr const char ResourceMappingVersionKeyName[] = "Version"; + + static constexpr const char ResourceMapppingJsonSchemaFilePath[] = + "Gems/AWSCore/resource_mapping_schema.json"; +} // namespace AWSCore diff --git a/Gems/AWSCore/Code/Source/ResourceMapping/AWSResourceMappingManager.cpp b/Gems/AWSCore/Code/Source/ResourceMapping/AWSResourceMappingManager.cpp index faec07b19e..d6a3912523 100644 --- a/Gems/AWSCore/Code/Source/ResourceMapping/AWSResourceMappingManager.cpp +++ b/Gems/AWSCore/Code/Source/ResourceMapping/AWSResourceMappingManager.cpp @@ -12,6 +12,7 @@ #include #include #include +#include #include #include @@ -244,14 +245,16 @@ namespace AWSCore bool AWSResourceMappingManager::ValidateJsonDocumentAgainstSchema(const rapidjson::Document& jsonDocument) { - rapidjson::Document jsonSchemaDocument; - if (jsonSchemaDocument.Parse(ResourceMappingJsonSchema).HasParseError()) + AZ::IO::Path executablePath = AZ::IO::PathView(AZ::Utils::GetExecutableDirectory()); + AZ::IO::Path jsonSchemaPath = (executablePath / ResourceMapppingJsonSchemaFilePath).LexicallyNormal(); + AZ::Outcome readJsonOutcome = AZ::JsonSerializationUtils::ReadJsonFile(jsonSchemaPath.c_str()); + if (!readJsonOutcome.IsSuccess() || readJsonOutcome.TakeValue().ObjectEmpty()) { AZ_Error(AWSResourceMappingManagerName, false, ResourceMappingFileInvalidSchemaErrorMessage); return false; } - auto jsonSchema = rapidjson::SchemaDocument(jsonSchemaDocument); + auto jsonSchema = rapidjson::SchemaDocument(readJsonOutcome.TakeValue()); rapidjson::SchemaValidator validator(jsonSchema); if (!jsonDocument.Accept(validator)) diff --git a/Gems/AWSCore/Code/Include/Private/ResourceMapping/AWSResourceMappingManager.h b/Gems/AWSCore/Code/Source/ResourceMapping/AWSResourceMappingManager.h similarity index 100% rename from Gems/AWSCore/Code/Include/Private/ResourceMapping/AWSResourceMappingManager.h rename to Gems/AWSCore/Code/Source/ResourceMapping/AWSResourceMappingManager.h diff --git a/Gems/AWSCore/Code/Include/Private/ResourceMapping/AWSResourceMappingUtils.h b/Gems/AWSCore/Code/Source/ResourceMapping/AWSResourceMappingUtils.h similarity index 100% rename from Gems/AWSCore/Code/Include/Private/ResourceMapping/AWSResourceMappingUtils.h rename to Gems/AWSCore/Code/Source/ResourceMapping/AWSResourceMappingUtils.h diff --git a/Gems/AWSCore/Code/Tests/AWSCoreSystemComponentTest.cpp b/Gems/AWSCore/Code/Tests/AWSCoreSystemComponentTest.cpp index 648648e945..b66b43f735 100644 --- a/Gems/AWSCore/Code/Tests/AWSCoreSystemComponentTest.cpp +++ b/Gems/AWSCore/Code/Tests/AWSCoreSystemComponentTest.cpp @@ -19,6 +19,7 @@ #include #include +#include #include #include #include @@ -103,6 +104,9 @@ public: TEST_F(AWSCoreSystemComponentTest, ComponentActivateTest) { + // Shutdown SDK which is init in fixture setup step + AWSNativeSDKInit::InitializationManager::Shutdown(); + EXPECT_FALSE(m_coreSystemsComponent->IsAWSApiInitialized()); // activate component diff --git a/Gems/AWSCore/Code/Tests/Configuration/AWSCoreConfigurationTest.cpp b/Gems/AWSCore/Code/Tests/Configuration/AWSCoreConfigurationTest.cpp index e54a55f728..696dfd25d3 100644 --- a/Gems/AWSCore/Code/Tests/Configuration/AWSCoreConfigurationTest.cpp +++ b/Gems/AWSCore/Code/Tests/Configuration/AWSCoreConfigurationTest.cpp @@ -8,7 +8,6 @@ #include #include -#include #include #include @@ -39,12 +38,11 @@ class AWSCoreConfigurationTest : public AWSCoreFixture { public: - void CreateTestSetRegFile(const AZStd::string& setregContent) + AWSCoreConfigurationTest() { - m_normalizedSetRegFilePath = AZStd::string::format("%s/%s", - m_normalizedSetRegFolderPath.c_str(), AWSCore::AWSCoreConfiguration::AWSCoreConfigurationFileName); - AzFramework::StringFunc::Path::Normalize(m_normalizedSetRegFilePath); - CreateTestFile(m_normalizedSetRegFilePath, setregContent); + m_setRegFilePath = (GetTestTempDirectoryPath() / + AZ::SettingsRegistryInterface::RegistryFolder / + AWSCore::AWSCoreConfiguration::AWSCoreConfigurationFileName).LexicallyNormal(); } void SetUp() override @@ -53,22 +51,13 @@ public: m_awsCoreConfiguration = AZStd::make_unique(); - m_normalizedSourceProjectFolder = AZStd::string::format("%s/%s%s/", AZ::Test::GetCurrentExecutablePath().c_str(), - "AWSResourceMappingManager", AZ::Uuid::CreateRandom().ToString(false, false).c_str()); - AzFramework::StringFunc::Path::Normalize(m_normalizedSourceProjectFolder); - m_normalizedSetRegFolderPath = AZStd::string::format("%s/%s/", - m_normalizedSourceProjectFolder.c_str(), AZ::SettingsRegistryInterface::RegistryFolder); - AzFramework::StringFunc::Path::Normalize(m_normalizedSetRegFolderPath); - - m_localFileIO->SetAlias("@projectroot@", m_normalizedSourceProjectFolder.c_str()); - - CreateTestSetRegFile(TEST_VALID_RESOURCE_MAPPING_SETREG); + CreateFile(m_setRegFilePath.Native(), TEST_VALID_RESOURCE_MAPPING_SETREG); + m_localFileIO->SetAlias("@projectroot@", GetTestTempDirectoryPath().Native().c_str()); } void TearDown() override { - RemoveTestFile(); - RemoveTestDirectory(); + RemoveFile(m_setRegFilePath.Native()); m_awsCoreConfiguration.reset(); @@ -76,52 +65,12 @@ public: } AZStd::unique_ptr m_awsCoreConfiguration; - AZStd::string m_normalizedSetRegFilePath; - -private: - AZStd::string m_normalizedSourceProjectFolder; - AZStd::string m_normalizedSetRegFolderPath; - - void CreateTestFile(const AZStd::string& filePath, const AZStd::string& fileContent) - { - AZ::IO::SystemFile file; - if (!file.Open(filePath.c_str(), - AZ::IO::SystemFile::OpenMode::SF_OPEN_CREATE | AZ::IO::SystemFile::SF_OPEN_CREATE_PATH | AZ::IO::SystemFile::SF_OPEN_WRITE_ONLY)) - { - AZ_Assert(false, "Failed to open test file"); - } - - if (file.Write(fileContent.c_str(), fileContent.size()) != fileContent.size()) - { - AZ_Assert(false, "Failed to write test file"); - } - file.Close(); - } - - void RemoveTestFile() - { - if (!m_normalizedSetRegFilePath.empty()) - { - AZ_Assert(AZ::IO::SystemFile::Delete(m_normalizedSetRegFilePath.c_str()), - "Failed to delete test settings registry file at %s", m_normalizedSetRegFilePath.c_str()); - } - } - - void RemoveTestDirectory() - { - if (!m_normalizedSetRegFilePath.empty()) - { - AZ_Assert(AZ::IO::SystemFile::DeleteDir(m_normalizedSetRegFolderPath.c_str()), - "Failed to delete test settings registry folder at %s", m_normalizedSetRegFolderPath.c_str()); - AZ_Assert(AZ::IO::SystemFile::DeleteDir(m_normalizedSourceProjectFolder.c_str()), - "Failed to delete test folder at %s", m_normalizedSourceProjectFolder.c_str()); - } - } + AZ::IO::Path m_setRegFilePath; }; TEST_F(AWSCoreConfigurationTest, InitConfig_NoSourceProjectFolderFound_ReturnEmptyConfigFilePath) { - m_settingsRegistry->MergeSettingsFile(m_normalizedSetRegFilePath, AZ::SettingsRegistryInterface::Format::JsonMergePatch, {}); + m_settingsRegistry->MergeSettingsFile(m_setRegFilePath.Native(), AZ::SettingsRegistryInterface::Format::JsonMergePatch, {}); m_localFileIO->ClearAlias("@projectroot@"); AZ_TEST_START_TRACE_SUPPRESSION; @@ -134,8 +83,8 @@ TEST_F(AWSCoreConfigurationTest, InitConfig_NoSourceProjectFolderFound_ReturnEmp TEST_F(AWSCoreConfigurationTest, InitConfig_SettingsRegistryIsEmpty_ReturnEmptyConfigFilePath) { - CreateTestSetRegFile(TEST_INVALID_RESOURCE_MAPPING_SETREG); - m_settingsRegistry->MergeSettingsFile(m_normalizedSetRegFilePath, AZ::SettingsRegistryInterface::Format::JsonMergePatch, {}); + CreateFile(m_setRegFilePath.Native(), TEST_INVALID_RESOURCE_MAPPING_SETREG); + m_settingsRegistry->MergeSettingsFile(m_setRegFilePath.Native(), AZ::SettingsRegistryInterface::Format::JsonMergePatch, {}); m_awsCoreConfiguration->InitConfig(); auto actualConfigFilePath = m_awsCoreConfiguration->GetResourceMappingConfigFilePath(); @@ -144,7 +93,7 @@ TEST_F(AWSCoreConfigurationTest, InitConfig_SettingsRegistryIsEmpty_ReturnEmptyC TEST_F(AWSCoreConfigurationTest, InitConfig_LoadValidSettingsRegistry_ReturnNonEmptyConfigFilePath) { - m_settingsRegistry->MergeSettingsFile(m_normalizedSetRegFilePath, AZ::SettingsRegistryInterface::Format::JsonMergePatch, {}); + m_settingsRegistry->MergeSettingsFile(m_setRegFilePath.Native(), AZ::SettingsRegistryInterface::Format::JsonMergePatch, {}); m_awsCoreConfiguration->InitConfig(); auto actualConfigFilePath = m_awsCoreConfiguration->GetResourceMappingConfigFilePath(); @@ -153,7 +102,7 @@ TEST_F(AWSCoreConfigurationTest, InitConfig_LoadValidSettingsRegistry_ReturnNonE TEST_F(AWSCoreConfigurationTest, ReloadConfiguration_NoSourceProjectFolderFound_ReturnEmptyConfigFilePath) { - m_settingsRegistry->MergeSettingsFile(m_normalizedSetRegFilePath, AZ::SettingsRegistryInterface::Format::JsonMergePatch, {}); + m_settingsRegistry->MergeSettingsFile(m_setRegFilePath.Native(), AZ::SettingsRegistryInterface::Format::JsonMergePatch, {}); m_localFileIO->ClearAlias("@projectroot@"); m_awsCoreConfiguration->ReloadConfiguration(); @@ -163,8 +112,8 @@ TEST_F(AWSCoreConfigurationTest, ReloadConfiguration_NoSourceProjectFolderFound_ TEST_F(AWSCoreConfigurationTest, ReloadConfiguration_LoadValidSettingsRegistryAfterInvalidOne_ReturnNonEmptyConfigFilePath) { - CreateTestSetRegFile(TEST_INVALID_RESOURCE_MAPPING_SETREG); - m_settingsRegistry->MergeSettingsFile(m_normalizedSetRegFilePath, AZ::SettingsRegistryInterface::Format::JsonMergePatch, {}); + CreateFile(m_setRegFilePath.Native(), TEST_INVALID_RESOURCE_MAPPING_SETREG); + m_settingsRegistry->MergeSettingsFile(m_setRegFilePath.Native(), AZ::SettingsRegistryInterface::Format::JsonMergePatch, {}); m_awsCoreConfiguration->InitConfig(); auto actualConfigFilePath = m_awsCoreConfiguration->GetResourceMappingConfigFilePath(); @@ -172,7 +121,7 @@ TEST_F(AWSCoreConfigurationTest, ReloadConfiguration_LoadValidSettingsRegistryAf EXPECT_TRUE(actualConfigFilePath.empty()); EXPECT_TRUE(actualProfileName == AWSCoreConfiguration::AWSCoreDefaultProfileName); - CreateTestSetRegFile(TEST_VALID_RESOURCE_MAPPING_SETREG); + CreateFile(m_setRegFilePath.Native(), TEST_VALID_RESOURCE_MAPPING_SETREG); m_awsCoreConfiguration->ReloadConfiguration(); actualConfigFilePath = m_awsCoreConfiguration->GetResourceMappingConfigFilePath(); @@ -183,7 +132,7 @@ TEST_F(AWSCoreConfigurationTest, ReloadConfiguration_LoadValidSettingsRegistryAf TEST_F(AWSCoreConfigurationTest, ReloadConfiguration_LoadInvalidSettingsRegistryAfterValidOne_ReturnEmptyConfigFilePath) { - m_settingsRegistry->MergeSettingsFile(m_normalizedSetRegFilePath, AZ::SettingsRegistryInterface::Format::JsonMergePatch, {}); + m_settingsRegistry->MergeSettingsFile(m_setRegFilePath.Native(), AZ::SettingsRegistryInterface::Format::JsonMergePatch, {}); m_awsCoreConfiguration->InitConfig(); auto actualConfigFilePath = m_awsCoreConfiguration->GetResourceMappingConfigFilePath(); @@ -191,7 +140,7 @@ TEST_F(AWSCoreConfigurationTest, ReloadConfiguration_LoadInvalidSettingsRegistry EXPECT_FALSE(actualConfigFilePath.empty()); EXPECT_TRUE(actualProfileName != AWSCoreConfiguration::AWSCoreDefaultProfileName); - CreateTestSetRegFile(TEST_INVALID_RESOURCE_MAPPING_SETREG); + CreateFile(m_setRegFilePath.Native(), TEST_INVALID_RESOURCE_MAPPING_SETREG); m_awsCoreConfiguration->ReloadConfiguration(); actualConfigFilePath = m_awsCoreConfiguration->GetResourceMappingConfigFilePath(); diff --git a/Gems/AWSCore/Code/Tests/Credential/AWSCVarCredentialHandlerTest.cpp b/Gems/AWSCore/Code/Tests/Credential/AWSCVarCredentialHandlerTest.cpp index 244c945af9..248737fbe6 100644 --- a/Gems/AWSCore/Code/Tests/Credential/AWSCVarCredentialHandlerTest.cpp +++ b/Gems/AWSCore/Code/Tests/Credential/AWSCVarCredentialHandlerTest.cpp @@ -25,6 +25,11 @@ public: m_credentialHandler = AZStd::make_unique(); } + void TearDown() override + { + m_credentialHandler.reset(); + } + AZStd::unique_ptr m_credentialHandler; }; diff --git a/Gems/AWSCore/Code/Tests/Credential/AWSCredentialBusTest.cpp b/Gems/AWSCore/Code/Tests/Credential/AWSCredentialBusTest.cpp index 82c8c84b81..1b4318f472 100644 --- a/Gems/AWSCore/Code/Tests/Credential/AWSCredentialBusTest.cpp +++ b/Gems/AWSCore/Code/Tests/Credential/AWSCredentialBusTest.cpp @@ -6,8 +6,6 @@ * */ -#include - #include #include @@ -19,14 +17,10 @@ class TestCredentialHandlerOne : AWSCredentialRequestBus::Handler { public: - TestCredentialHandlerOne() + void ActivateHandler() { m_handlerCounter = 0; m_credentialsProvider = std::make_shared(); - } - - void ActivateHandler() - { AWSCredentialRequestBus::Handler::BusConnect(); } @@ -55,14 +49,10 @@ class TestCredentialHandlerTwo : AWSCredentialRequestBus::Handler { public: - TestCredentialHandlerTwo() + void ActivateHandler() { m_handlerCounter = 0; m_credentialsProvider = std::make_shared(); - } - - void ActivateHandler() - { AWSCredentialRequestBus::Handler::BusConnect(); } @@ -88,7 +78,7 @@ public: }; class AWSCredentialBusTest - : public UnitTest::ScopedAllocatorSetupFixture + : public AWSCoreFixture { public: AWSCredentialBusTest() @@ -99,6 +89,8 @@ public: void SetUp() override { + AWSCoreFixture::SetUpFixture(); + m_handlerOne->ActivateHandler(); m_handlerTwo->ActivateHandler(); } @@ -107,6 +99,8 @@ public: { m_handlerOne->DeactivateHandler(); m_handlerTwo->DeactivateHandler(); + + AWSCoreFixture::TearDownFixture(); } AZStd::unique_ptr m_handlerOne; diff --git a/Gems/AWSCore/Code/Tests/Credential/AWSDefaultCredentialHandlerTest.cpp b/Gems/AWSCore/Code/Tests/Credential/AWSDefaultCredentialHandlerTest.cpp index af03afb337..4ff82bcb62 100644 --- a/Gems/AWSCore/Code/Tests/Credential/AWSDefaultCredentialHandlerTest.cpp +++ b/Gems/AWSCore/Code/Tests/Credential/AWSDefaultCredentialHandlerTest.cpp @@ -6,11 +6,9 @@ * */ -#include -#include - #include #include +#include using namespace AWSCore; @@ -18,13 +16,15 @@ static constexpr char AWSDEFAULTCREDENTIALHANDLERTEST_ALLOC_TAG[] = "AWSDefaultC static constexpr const char* AWS_ACCESS_KEY = "AWSACCESSKEY"; static constexpr const char* AWS_SECRET_KEY = "AWSSECRETKEY"; -class EnvironmentAWSCredentialsProviderMock : public Aws::Auth::EnvironmentAWSCredentialsProvider +class EnvironmentAWSCredentialsProviderMock + : public Aws::Auth::EnvironmentAWSCredentialsProvider { public: MOCK_METHOD0(GetAWSCredentials, Aws::Auth::AWSCredentials()); }; -class ProfileConfigFileAWSCredentialsProviderMock : public Aws::Auth::ProfileConfigFileAWSCredentialsProvider +class ProfileConfigFileAWSCredentialsProviderMock + : public Aws::Auth::ProfileConfigFileAWSCredentialsProvider { public: MOCK_METHOD0(GetAWSCredentials, Aws::Auth::AWSCredentials()); @@ -44,7 +44,7 @@ public: }; class AWSDefaultCredentialHandlerTest - : public UnitTest::ScopedAllocatorSetupFixture + : public AWSCoreFixture , public AWSCoreInternalRequestBus::Handler { public: @@ -53,6 +53,8 @@ public: void SetUp() override { + AWSCoreFixture::SetUpFixture(); + AWSCoreInternalRequestBus::Handler::BusConnect(); m_environmentCredentialsProviderMock = Aws::MakeShared(AWSDEFAULTCREDENTIALHANDLERTEST_ALLOC_TAG); m_profileCredentialsProviderMock = Aws::MakeShared(AWSDEFAULTCREDENTIALHANDLERTEST_ALLOC_TAG); @@ -68,6 +70,8 @@ public: m_profileCredentialsProviderMock.reset(); m_environmentCredentialsProviderMock.reset(); AWSCoreInternalRequestBus::Handler::BusDisconnect(); + + AWSCoreFixture::TearDownFixture(); } // AWSCoreInternalRequestBus interface implementation diff --git a/Gems/AWSCore/Code/Tests/Editor/Attribution/AWSAttributionServiceApiTest.cpp b/Gems/AWSCore/Code/Tests/Editor/Attribution/AWSAttributionServiceApiTest.cpp index 4290713e5c..e17d5c1fbf 100644 --- a/Gems/AWSCore/Code/Tests/Editor/Attribution/AWSAttributionServiceApiTest.cpp +++ b/Gems/AWSCore/Code/Tests/Editor/Attribution/AWSAttributionServiceApiTest.cpp @@ -11,7 +11,7 @@ #include #include -#include +#include using namespace AWSCore; @@ -36,7 +36,7 @@ namespace AWSCoreUnitTest }; class AWSAttributionServiceApiTest - : public UnitTest::ScopedAllocatorSetupFixture + : public AWSCoreFixture { public: testing::NiceMock JsonReader; @@ -72,12 +72,11 @@ namespace AWSCoreUnitTest AWSCore::RequestBuilder requestBuilder{}; EXPECT_TRUE(request.parameters.BuildRequest(requestBuilder)); std::shared_ptr bodyContent = requestBuilder.GetBodyContent(); - EXPECT_TRUE(bodyContent != nullptr); + EXPECT_NE(nullptr, bodyContent); - AZStd::string bodyString; std::istreambuf_iterator eos; - bodyString = AZStd::string{ std::istreambuf_iterator(*bodyContent), eos }; - AZ_Printf("AWSAttributionServiceApiTest", bodyString.c_str()); - EXPECT_TRUE(bodyString.find(AZStd::string::format("{\"%s\":\"1.1\"", AwsAttributionAttributeKeyVersion)) != AZStd::string::npos); + AZStd::string bodyString{ std::istreambuf_iterator(*bodyContent), eos }; + AZ_Printf("AWSAttributionServiceApiTest", "%s", bodyString.c_str()); + EXPECT_TRUE(bodyString.contains(AZStd::string::format("{\"%s\":\"1.1\"", AwsAttributionAttributeKeyVersion))); } } diff --git a/Gems/AWSCore/Code/Tests/Editor/Attribution/AWSCoreAttributionManagerTest.cpp b/Gems/AWSCore/Code/Tests/Editor/Attribution/AWSCoreAttributionManagerTest.cpp index 37a8c0f6d4..b78bfe29c8 100644 --- a/Gems/AWSCore/Code/Tests/Editor/Attribution/AWSCoreAttributionManagerTest.cpp +++ b/Gems/AWSCore/Code/Tests/Editor/Attribution/AWSCoreAttributionManagerTest.cpp @@ -10,7 +10,6 @@ #include #include -#include #include #include #include @@ -23,9 +22,9 @@ #include #include #include -#include #include #include +#include #include #include @@ -166,7 +165,6 @@ namespace AWSAttributionUnitTest AZStd::unique_ptr m_jobManager; AZStd::array m_resolvedSettingsPath; ModuleManagerRequestBusMock m_moduleManagerRequestBusMock; - AWSCredentialRquestsBusMock m_credentialRequestBusMock; void SetUp() override { @@ -220,6 +218,7 @@ namespace AWSAttributionUnitTest TEST_F(AttributionManagerTest, MetricsSettings_ConsentShown_AttributionDisabled_SkipsSend) { // GIVEN + AWSCredentialRquestsBusMock credentialRequestBusMock; AWSAttributionManagerMock manager; CreateFile(m_resolvedSettingsPath.data(), R"({ @@ -238,7 +237,7 @@ namespace AWSAttributionUnitTest EXPECT_CALL(manager, SubmitMetric(testing::_)).Times(0); EXPECT_CALL(m_moduleManagerRequestBusMock, EnumerateModules(testing::_)).Times(0); - EXPECT_CALL(m_credentialRequestBusMock, GetCredentialsProvider()).Times(1); + EXPECT_CALL(credentialRequestBusMock, GetCredentialsProvider()).Times(1); // WHEN manager.MetricCheck(); @@ -254,6 +253,7 @@ namespace AWSAttributionUnitTest TEST_F(AttributionManagerTest, AttributionEnabled_ContentShown_NoPreviousTimeStamp_SendSuccess) { // GIVEN + AWSCredentialRquestsBusMock credentialRequestBusMock; AWSAttributionManagerMock manager; CreateFile(m_resolvedSettingsPath.data(), R"({ @@ -271,7 +271,7 @@ namespace AWSAttributionUnitTest EXPECT_CALL(manager, SubmitMetric(testing::_)).Times(1); EXPECT_CALL(m_moduleManagerRequestBusMock, EnumerateModules(testing::_)).Times(1); - EXPECT_CALL(m_credentialRequestBusMock, GetCredentialsProvider()).Times(1); + EXPECT_CALL(credentialRequestBusMock, GetCredentialsProvider()).Times(1); // WHEN manager.MetricCheck(); @@ -288,6 +288,7 @@ namespace AWSAttributionUnitTest TEST_F(AttributionManagerTest, AttributionEnabled_ContentShown_ValidPreviousTimeStamp_SendSuccess) { // GIVEN + AWSCredentialRquestsBusMock credentialRequestBusMock; AWSAttributionManagerMock manager; CreateFile(m_resolvedSettingsPath.data(), R"({ @@ -307,7 +308,7 @@ namespace AWSAttributionUnitTest EXPECT_CALL(manager, SubmitMetric(testing::_)).Times(1); EXPECT_CALL(m_moduleManagerRequestBusMock, EnumerateModules(testing::_)).Times(1); - EXPECT_CALL(m_credentialRequestBusMock, GetCredentialsProvider()).Times(1); + EXPECT_CALL(credentialRequestBusMock, GetCredentialsProvider()).Times(1); // WHEN manager.MetricCheck(); @@ -323,6 +324,7 @@ namespace AWSAttributionUnitTest TEST_F(AttributionManagerTest, AttributionEnabled_ContentShown_DelayNotSatisfied_SendFail) { // GIVEN + AWSCredentialRquestsBusMock credentialRequestBusMock; AWSAttributionManagerMock manager; CreateFile(m_resolvedSettingsPath.data(), R"({ @@ -345,7 +347,7 @@ namespace AWSAttributionUnitTest EXPECT_CALL(manager, SubmitMetric(testing::_)).Times(0); EXPECT_CALL(m_moduleManagerRequestBusMock, EnumerateModules(testing::_)).Times(0); - EXPECT_CALL(m_credentialRequestBusMock, GetCredentialsProvider()).Times(1); + EXPECT_CALL(credentialRequestBusMock, GetCredentialsProvider()).Times(1); // WHEN manager.MetricCheck(); @@ -361,6 +363,7 @@ namespace AWSAttributionUnitTest TEST_F(AttributionManagerTest, AttributionEnabledNotFound_ContentShown_SendFail) { // GIVEN + AWSCredentialRquestsBusMock credentialRequestBusMock; AWSAttributionManagerMock manager; CreateFile(m_resolvedSettingsPath.data(), R"({ @@ -377,7 +380,7 @@ namespace AWSAttributionUnitTest EXPECT_CALL(manager, SubmitMetric(testing::_)).Times(0); EXPECT_CALL(m_moduleManagerRequestBusMock, EnumerateModules(testing::_)).Times(0); - EXPECT_CALL(m_credentialRequestBusMock, GetCredentialsProvider()).Times(1); + EXPECT_CALL(credentialRequestBusMock, GetCredentialsProvider()).Times(1); // WHEN manager.MetricCheck(); @@ -393,12 +396,13 @@ namespace AWSAttributionUnitTest TEST_F(AttributionManagerTest, AttributionEnabledNotFound_ContentNotShown_SendFail) { // GIVEN + AWSCredentialRquestsBusMock credentialRequestBusMock; AWSAttributionManagerMock manager; manager.Init(); EXPECT_CALL(manager, SubmitMetric(testing::_)).Times(0); EXPECT_CALL(m_moduleManagerRequestBusMock, EnumerateModules(testing::_)).Times(0); - EXPECT_CALL(m_credentialRequestBusMock, GetCredentialsProvider()).Times(1); + EXPECT_CALL(credentialRequestBusMock, GetCredentialsProvider()).Times(1); EXPECT_CALL(manager, ShowConsentDialog()).Times(1); // WHEN diff --git a/Gems/AWSCore/Code/Tests/Framework/AWSApiClientJobConfigTest.cpp b/Gems/AWSCore/Code/Tests/Framework/AWSApiClientJobConfigTest.cpp index db433062ad..0eca8a37ed 100644 --- a/Gems/AWSCore/Code/Tests/Framework/AWSApiClientJobConfigTest.cpp +++ b/Gems/AWSCore/Code/Tests/Framework/AWSApiClientJobConfigTest.cpp @@ -6,9 +6,6 @@ * */ -#include - -#include #include #include @@ -19,7 +16,7 @@ using namespace AWSCore; class AWSApiClientJobConfigTest - : public UnitTest::ScopedAllocatorSetupFixture + : public AWSCoreFixture , public AWSCredentialRequestBus::Handler { public: @@ -30,13 +27,9 @@ public: void SetUp() override { - AWSNativeSDKInit::InitializationManager::InitAwsApi(); - m_credentialHandlerCounter = 0; - } + AWSCoreFixture::SetUpFixture(); - void TearDown() override - { - AWSNativeSDKInit::InitializationManager::Shutdown(); + m_credentialHandlerCounter = 0; } // AWSCredentialRequestBus interface implementation diff --git a/Gems/AWSCore/Code/Tests/Framework/AWSApiJobConfigTest.cpp b/Gems/AWSCore/Code/Tests/Framework/AWSApiJobConfigTest.cpp index 6976856b60..8caf0ac013 100644 --- a/Gems/AWSCore/Code/Tests/Framework/AWSApiJobConfigTest.cpp +++ b/Gems/AWSCore/Code/Tests/Framework/AWSApiJobConfigTest.cpp @@ -8,7 +8,6 @@ #include #include -#include #include @@ -20,14 +19,14 @@ using namespace AWSCore; class AwsApiJobConfigTest - : public UnitTest::ScopedAllocatorSetupFixture + : public AWSCoreFixture , AWSCredentialRequestBus::Handler , AWSCoreRequestBus::Handler { public: void SetUp() override { - AZ::AllocatorInstance::Create(); + AWSCoreFixture::SetUpFixture(); m_credentialsHandler = std::make_shared(); AZ::JobManagerDesc jobDesc; @@ -45,7 +44,7 @@ public: m_jobManager.reset(); m_credentialsHandler.reset(); - AZ::AllocatorInstance::Destroy(); + AWSCoreFixture::TearDownFixture(); } // AWSCredentialRequestBus interface implementation diff --git a/Gems/AWSCore/Code/Tests/Framework/HttpRequestJobTest.cpp b/Gems/AWSCore/Code/Tests/Framework/HttpRequestJobTest.cpp index e04cdcb2d9..cee5ec0624 100644 --- a/Gems/AWSCore/Code/Tests/Framework/HttpRequestJobTest.cpp +++ b/Gems/AWSCore/Code/Tests/Framework/HttpRequestJobTest.cpp @@ -6,24 +6,24 @@ * */ -#include - #include #include using namespace AWSCore; class HttpRequestJobTest - : public UnitTest::ScopedAllocatorSetupFixture + : public AWSCoreFixture { void SetUp() override { + AWSCoreFixture::SetUpFixture(); HttpRequestJob::StaticInit(); } void TearDown() override { HttpRequestJob::StaticShutdown(); + AWSCoreFixture::TearDownFixture(); } }; diff --git a/Gems/AWSCore/Code/Tests/Framework/JsonObjectHandlerTest.cpp b/Gems/AWSCore/Code/Tests/Framework/JsonObjectHandlerTest.cpp index f7b1546561..49e77be35f 100644 --- a/Gems/AWSCore/Code/Tests/Framework/JsonObjectHandlerTest.cpp +++ b/Gems/AWSCore/Code/Tests/Framework/JsonObjectHandlerTest.cpp @@ -6,8 +6,6 @@ * */ -#include - #include #include @@ -18,7 +16,7 @@ using OBJECT_TYPE = TestObject; using ARRAY_TYPE = AZStd::vector; using ARRAY_OF_ARRAY_TYPE = AZStd::vector>; using ARRAY_OF_OBJECT_TYPE = AZStd::vector>; -using JsonReaderTest = UnitTest::ScopedAllocatorSetupFixture; +using JsonReaderTest = AWSCoreFixture; template void TestJsonReaderSuccess(const ValueType& expectedValue, const char* valueString) diff --git a/Gems/AWSCore/Code/Tests/Framework/JsonWriterTest.cpp b/Gems/AWSCore/Code/Tests/Framework/JsonWriterTest.cpp index 12ada1188c..9a08e6f111 100644 --- a/Gems/AWSCore/Code/Tests/Framework/JsonWriterTest.cpp +++ b/Gems/AWSCore/Code/Tests/Framework/JsonWriterTest.cpp @@ -6,8 +6,6 @@ * */ -#include - #include #include @@ -17,7 +15,7 @@ using namespace AWSCoreTestingUtils; using OBJECT_TYPE = TestObject; using ARRAY_TYPE = AZStd::vector; -using JsonWriterTest = UnitTest::ScopedAllocatorSetupFixture; +using JsonWriterTest = AWSCoreFixture; template void TestJsonWriterSuccess(const ValueType& actualValue, const char* valueString) diff --git a/Gems/AWSCore/Code/Tests/Framework/RequestBuilderTest.cpp b/Gems/AWSCore/Code/Tests/Framework/RequestBuilderTest.cpp index 0c08868100..35ce262f30 100644 --- a/Gems/AWSCore/Code/Tests/Framework/RequestBuilderTest.cpp +++ b/Gems/AWSCore/Code/Tests/Framework/RequestBuilderTest.cpp @@ -6,15 +6,13 @@ * */ -#include - #include #include using namespace AWSCore; using namespace AWSCoreTestingUtils; -using RequestBuilderTest = UnitTest::ScopedAllocatorSetupFixture; +using RequestBuilderTest = AWSCoreFixture; TEST_F(RequestBuilderTest, WriteJsonBodyParameter_UseTestJsonBody_GetExpectedValue) { diff --git a/Gems/AWSCore/Code/Tests/Framework/ServiceClientJobConfigTest.cpp b/Gems/AWSCore/Code/Tests/Framework/ServiceClientJobConfigTest.cpp index 9bc43482cd..3907b097db 100644 --- a/Gems/AWSCore/Code/Tests/Framework/ServiceClientJobConfigTest.cpp +++ b/Gems/AWSCore/Code/Tests/Framework/ServiceClientJobConfigTest.cpp @@ -6,8 +6,6 @@ * */ -#include - #include #include #include @@ -19,17 +17,21 @@ static constexpr const char TEST_EXPECTED_FEATURE_SERVICE_URL[] = "https://featu static constexpr const char TEST_EXPECTED_CUSTOM_SERVICE_URL[] = "https://custom.service.com"; class ServiceClientJobConfigTest - : public UnitTest::ScopedAllocatorSetupFixture + : public AWSCoreFixture , AWSResourceMappingRequestBus::Handler { void SetUp() override { + AWSCoreFixture::SetUpFixture(); + AWSResourceMappingRequestBus::Handler::BusConnect(); } void TearDown() override { AWSResourceMappingRequestBus::Handler::BusDisconnect(); + + AWSCoreFixture::TearDownFixture(); } // AWSResourceMappingRequestBus interface implementation diff --git a/Gems/AWSCore/Code/Tests/Framework/ServiceJobUtilTest.cpp b/Gems/AWSCore/Code/Tests/Framework/ServiceJobUtilTest.cpp index 230fd304d2..c162a0fa13 100644 --- a/Gems/AWSCore/Code/Tests/Framework/ServiceJobUtilTest.cpp +++ b/Gems/AWSCore/Code/Tests/Framework/ServiceJobUtilTest.cpp @@ -6,12 +6,10 @@ * */ -#include - #include #include -using ServiceJobUtilTest = UnitTest::ScopedAllocatorSetupFixture; +using ServiceJobUtilTest = AWSCoreFixture; TEST_F(ServiceJobUtilTest, DetermineRegionFromRequestUrl_DefaultUrlFormat_Success) { diff --git a/Gems/AWSCore/Code/Tests/Framework/ServiceRequestJobTest.cpp b/Gems/AWSCore/Code/Tests/Framework/ServiceRequestJobTest.cpp index bf4f6dd4fd..23fa78cc23 100644 --- a/Gems/AWSCore/Code/Tests/Framework/ServiceRequestJobTest.cpp +++ b/Gems/AWSCore/Code/Tests/Framework/ServiceRequestJobTest.cpp @@ -6,15 +6,13 @@ * */ -#include - #include #include #include using namespace AWSCore; -using ServiceRequestJobTest = UnitTest::ScopedAllocatorSetupFixture; +using ServiceRequestJobTest = AWSCoreFixture; #define TEST_SERVICE_REQUEST(SERVICE_NAME, METHOD, PATH) \ static const char* Path() { return PATH; } \ diff --git a/Gems/AWSCore/Code/Tests/Framework/UtilTest.cpp b/Gems/AWSCore/Code/Tests/Framework/UtilTest.cpp index 5a1589c073..a0320a894c 100644 --- a/Gems/AWSCore/Code/Tests/Framework/UtilTest.cpp +++ b/Gems/AWSCore/Code/Tests/Framework/UtilTest.cpp @@ -6,14 +6,12 @@ * */ -#include - #include #include using namespace AWSCoreTestingUtils; -using FrameworkUtilTest = UnitTest::ScopedAllocatorSetupFixture; +using FrameworkUtilTest = AWSCoreFixture; TEST_F(FrameworkUtilTest, ToAwsString_UseAzString_GetExpectedAwsString) { diff --git a/Gems/AWSCore/Code/Tests/ResourceMapping/AWSResourceMappingManagerTest.cpp b/Gems/AWSCore/Code/Tests/ResourceMapping/AWSResourceMappingManagerTest.cpp index fb03dea4c0..6c798dbeca 100644 --- a/Gems/AWSCore/Code/Tests/ResourceMapping/AWSResourceMappingManagerTest.cpp +++ b/Gems/AWSCore/Code/Tests/ResourceMapping/AWSResourceMappingManagerTest.cpp @@ -8,7 +8,6 @@ #include #include -#include #include #include @@ -59,6 +58,34 @@ R"({ "Version": "1.0.0" })"; +static constexpr const char TEST_VALID_EMPTY_ACCOUNTID_RESOURCE_MAPPING_CONFIG_FILE[] = + R"({ + "AWSResourceMappings": { + "TestLambda": { + "Type": "AWS::Lambda::Function", + "Name/ID": "MyTestLambda", + "Region": "us-east-1", + "AccountId": "012345678912" + }, + "TestS3Bucket": { + "Type": "AWS::S3::Bucket", + "Name/ID": "MyTestS3Bucket" + }, + "TestService.RESTApiId": { + "Type": "AWS::ApiGateway::RestApi", + "Name/ID": "1234567890" + }, + "TestService.RESTApiStage": { + "Type": "AWS::ApiGateway::Stage", + "Name/ID": "prod", + "Region": "us-east-1" + } + }, + "AccountId": "", + "Region": "us-west-2", + "Version": "1.1.0" +})"; + static constexpr const char TEST_INVALID_RESOURCE_MAPPING_CONFIG_FILE[] = R"({ "AWSResourceMappings": {}, @@ -84,92 +111,42 @@ public: m_resourceMappingManager = AZStd::make_unique(); } - void CreateTestConfigFile(const AZStd::string& configContent) - { - m_normalizedConfigFilePath = AZStd::string::format("%s/%s", m_normalizedConfigFolderPath.c_str(), "test_aws_resource_mappings.json"); - AzFramework::StringFunc::Path::Normalize(m_normalizedConfigFilePath); - CreateTestFile(m_normalizedConfigFilePath, configContent); - } - void SetUp() override { - AWSCoreFixture::SetUp(); + AWSCoreFixture::SetUpFixture(false); - m_normalizedSourceProjectFolder = AZStd::string::format("%s/%s%s/", AZ::Test::GetCurrentExecutablePath().c_str(), - "AWSResourceMappingManager", AZ::Uuid::CreateRandom().ToString(false, false).c_str()); - AzFramework::StringFunc::Path::Normalize(m_normalizedSourceProjectFolder); - m_normalizedConfigFolderPath = AZStd::string::format("%s/%s/", - m_normalizedSourceProjectFolder.c_str(), AWSCore::AWSCoreConfiguration::AWSCoreResourceMappingConfigFolderName); - AzFramework::StringFunc::Path::Normalize(m_normalizedConfigFolderPath); + m_configFilePath = (GetTestTempDirectoryPath() / + AWSCore::AWSCoreConfiguration::AWSCoreResourceMappingConfigFolderName / + "test_aws_resource_mappings.json").LexicallyNormal(); AWSCoreInternalRequestBus::Handler::BusConnect(); } void TearDown() override { AWSCoreInternalRequestBus::Handler::BusDisconnect(); - RemoveTestFile(); - RemoveTestDirectory(); + RemoveFile(m_configFilePath.Native()); + m_configFilePath.clear(); m_reloadConfigurationCounter = 0; m_resourceMappingManager->DeactivateManager(); m_resourceMappingManager.reset(); - AWSCoreFixture::TearDown(); + AWSCoreFixture::TearDownFixture(false); } // AWSCoreInternalRequestBus interface implementation AZStd::string GetProfileName() const override { return ""; } - AZStd::string GetResourceMappingConfigFilePath() const override { return m_normalizedConfigFilePath; } + AZStd::string GetResourceMappingConfigFilePath() const override { return m_configFilePath.Native(); } void ReloadConfiguration() override { m_reloadConfigurationCounter++; } AZStd::unique_ptr m_resourceMappingManager; AZ::u8 m_reloadConfigurationCounter; - -private: - AZStd::string m_normalizedSourceProjectFolder; - AZStd::string m_normalizedConfigFolderPath; - AZStd::string m_normalizedConfigFilePath; - - void CreateTestFile(const AZStd::string& filePath, const AZStd::string& fileContent) - { - AZ::IO::SystemFile file; - if (!file.Open(filePath.c_str(), - AZ::IO::SystemFile::OpenMode::SF_OPEN_CREATE | AZ::IO::SystemFile::SF_OPEN_CREATE_PATH | AZ::IO::SystemFile::SF_OPEN_WRITE_ONLY)) - { - AZ_Assert(false, "Failed to open test file"); - } - - if (file.Write(fileContent.c_str(), fileContent.size()) != fileContent.size()) - { - AZ_Assert(false, "Failed to write test file"); - } - file.Close(); - } - - void RemoveTestFile() - { - if (!m_normalizedConfigFilePath.empty()) - { - AZ_Assert(AZ::IO::SystemFile::Delete(m_normalizedConfigFilePath.c_str()), - "Failed to delete test config file at %s", m_normalizedConfigFilePath.c_str()); - } - } - - void RemoveTestDirectory() - { - if (!m_normalizedConfigFilePath.empty()) - { - AZ_Assert(AZ::IO::SystemFile::DeleteDir(m_normalizedConfigFolderPath.c_str()), - "Failed to delete test config folder at %s", m_normalizedConfigFolderPath.c_str()); - AZ_Assert(AZ::IO::SystemFile::DeleteDir(m_normalizedSourceProjectFolder.c_str()), - "Failed to delete test folder at %s", m_normalizedSourceProjectFolder.c_str()); - } - } + AZ::IO::Path m_configFilePath; }; TEST_F(AWSResourceMappingManagerTest, ActivateManager_ParseInvalidConfigFile_ConfigDataIsEmpty) { - CreateTestConfigFile(TEST_INVALID_RESOURCE_MAPPING_CONFIG_FILE); + CreateFile(m_configFilePath.Native(), TEST_INVALID_RESOURCE_MAPPING_CONFIG_FILE); m_resourceMappingManager->ActivateManager(); AZStd::string actualAccountId; @@ -184,7 +161,7 @@ TEST_F(AWSResourceMappingManagerTest, ActivateManager_ParseInvalidConfigFile_Con TEST_F(AWSResourceMappingManagerTest, ActivateManager_ParseValidConfigFile_ConfigDataIsNotEmpty) { - CreateTestConfigFile(TEST_VALID_RESOURCE_MAPPING_CONFIG_FILE); + CreateFile(m_configFilePath.Native(), TEST_VALID_RESOURCE_MAPPING_CONFIG_FILE); m_resourceMappingManager->ActivateManager(); AZStd::string actualAccountId; @@ -199,7 +176,7 @@ TEST_F(AWSResourceMappingManagerTest, ActivateManager_ParseValidConfigFile_Confi TEST_F(AWSResourceMappingManagerTest, ActivateManager_ParseTemplateConfigFile_ConfigDataIsNotEmpty) { - CreateTestConfigFile(TEST_TEMPLATE_RESOURCE_MAPPING_CONFIG_FILE); + CreateFile(m_configFilePath.Native(), TEST_TEMPLATE_RESOURCE_MAPPING_CONFIG_FILE); m_resourceMappingManager->ActivateManager(); AZStd::string actualAccountId; @@ -214,7 +191,7 @@ TEST_F(AWSResourceMappingManagerTest, ActivateManager_ParseTemplateConfigFile_Co TEST_F(AWSResourceMappingManagerTest, ActivateManager_ParseValidConfigFile_ConfigDataIsNotEmptyWithMultithreadCalls) { - CreateTestConfigFile(TEST_VALID_RESOURCE_MAPPING_CONFIG_FILE); + CreateFile(m_configFilePath.Native(), TEST_VALID_RESOURCE_MAPPING_CONFIG_FILE); m_resourceMappingManager->ActivateManager(); constexpr int testThreadNumber = 10; @@ -237,9 +214,24 @@ TEST_F(AWSResourceMappingManagerTest, ActivateManager_ParseValidConfigFile_Confi EXPECT_TRUE(actualEbusCalls == testThreadNumber); } +TEST_F(AWSResourceMappingManagerTest, ActivateManager_ParseValidConfigFile_GlobalAccountIdEmpty) +{ + CreateFile(m_configFilePath.Native(), TEST_VALID_EMPTY_ACCOUNTID_RESOURCE_MAPPING_CONFIG_FILE); + m_resourceMappingManager->ActivateManager(); + + AZStd::string actualAccountId; + AZStd::string actualRegion; + AWSResourceMappingRequestBus::BroadcastResult(actualAccountId, &AWSResourceMappingRequests::GetDefaultAccountId); + AWSResourceMappingRequestBus::BroadcastResult(actualRegion, &AWSResourceMappingRequests::GetDefaultRegion); + EXPECT_EQ(m_reloadConfigurationCounter, 0); + EXPECT_TRUE(actualAccountId.empty()); + EXPECT_FALSE(actualRegion.empty()); + EXPECT_TRUE(m_resourceMappingManager->GetStatus() == AWSResourceMappingManager::Status::Ready); +} + TEST_F(AWSResourceMappingManagerTest, DeactivateManager_AfterActivatingWithValidConfigFile_ConfigDataGetCleanedUp) { - CreateTestConfigFile(TEST_VALID_RESOURCE_MAPPING_CONFIG_FILE); + CreateFile(m_configFilePath.Native(), TEST_VALID_RESOURCE_MAPPING_CONFIG_FILE); m_resourceMappingManager->ActivateManager(); AZStd::string actualAccountId; @@ -259,7 +251,7 @@ TEST_F(AWSResourceMappingManagerTest, DeactivateManager_AfterActivatingWithValid TEST_F(AWSResourceMappingManagerTest, GetDefaultAccountId_AfterParsingValidConfigFile_GetExpectedDefaultAccountId) { - CreateTestConfigFile(TEST_VALID_RESOURCE_MAPPING_CONFIG_FILE); + CreateFile(m_configFilePath.Native(), TEST_VALID_RESOURCE_MAPPING_CONFIG_FILE); m_resourceMappingManager->ActivateManager(); AZStd::string actualAccountId; @@ -270,7 +262,7 @@ TEST_F(AWSResourceMappingManagerTest, GetDefaultAccountId_AfterParsingValidConfi TEST_F(AWSResourceMappingManagerTest, GetDefaultRegion_AfterParsingValidConfigFile_GetExpectedDefaultRegion) { - CreateTestConfigFile(TEST_VALID_RESOURCE_MAPPING_CONFIG_FILE); + CreateFile(m_configFilePath.Native(), TEST_VALID_RESOURCE_MAPPING_CONFIG_FILE); m_resourceMappingManager->ActivateManager(); AZStd::string actualRegion; @@ -281,7 +273,7 @@ TEST_F(AWSResourceMappingManagerTest, GetDefaultRegion_AfterParsingValidConfigFi TEST_F(AWSResourceMappingManagerTest, GetResourceAccountId_AfterParsingValidConfigFile_GetExpectedAccountId) { - CreateTestConfigFile(TEST_VALID_RESOURCE_MAPPING_CONFIG_FILE); + CreateFile(m_configFilePath.Native(), TEST_VALID_RESOURCE_MAPPING_CONFIG_FILE); m_resourceMappingManager->ActivateManager(); AZStd::string actualAccountId; @@ -298,7 +290,7 @@ TEST_F(AWSResourceMappingManagerTest, GetResourceAccountId_AfterParsingValidConf TEST_F(AWSResourceMappingManagerTest, GetResourceAccountId_QueryNonexistResourceMappingKeyName_GetEmptyAccountId) { - CreateTestConfigFile(TEST_VALID_RESOURCE_MAPPING_CONFIG_FILE); + CreateFile(m_configFilePath.Native(), TEST_VALID_RESOURCE_MAPPING_CONFIG_FILE); m_resourceMappingManager->ActivateManager(); AZStd::string actualAccountId; @@ -309,7 +301,7 @@ TEST_F(AWSResourceMappingManagerTest, GetResourceAccountId_QueryNonexistResource TEST_F(AWSResourceMappingManagerTest, GetResourceNameId_AfterParsingValidConfigFile_GetExpectedNameId) { - CreateTestConfigFile(TEST_VALID_RESOURCE_MAPPING_CONFIG_FILE); + CreateFile(m_configFilePath.Native(), TEST_VALID_RESOURCE_MAPPING_CONFIG_FILE); m_resourceMappingManager->ActivateManager(); AZStd::string actualNameId; @@ -326,7 +318,7 @@ TEST_F(AWSResourceMappingManagerTest, GetResourceNameId_AfterParsingValidConfigF TEST_F(AWSResourceMappingManagerTest, GetResourceNameId_QueryNonexistResourceMappingKeyName_GetEmptyNameId) { - CreateTestConfigFile(TEST_VALID_RESOURCE_MAPPING_CONFIG_FILE); + CreateFile(m_configFilePath.Native(), TEST_VALID_RESOURCE_MAPPING_CONFIG_FILE); m_resourceMappingManager->ActivateManager(); AZStd::string actualNameId; @@ -337,7 +329,7 @@ TEST_F(AWSResourceMappingManagerTest, GetResourceNameId_QueryNonexistResourceMap TEST_F(AWSResourceMappingManagerTest, GetResourceRegion_AfterParsingValidConfigFile_GetExpectedRegion) { - CreateTestConfigFile(TEST_VALID_RESOURCE_MAPPING_CONFIG_FILE); + CreateFile(m_configFilePath.Native(), TEST_VALID_RESOURCE_MAPPING_CONFIG_FILE); m_resourceMappingManager->ActivateManager(); AZStd::string actualRegion; @@ -354,7 +346,7 @@ TEST_F(AWSResourceMappingManagerTest, GetResourceRegion_AfterParsingValidConfigF TEST_F(AWSResourceMappingManagerTest, GetResourceRegion_QueryNonexistResourceMappingKeyName_GetEmptyRegion) { - CreateTestConfigFile(TEST_VALID_RESOURCE_MAPPING_CONFIG_FILE); + CreateFile(m_configFilePath.Native(), TEST_VALID_RESOURCE_MAPPING_CONFIG_FILE); m_resourceMappingManager->ActivateManager(); AZStd::string actualRegion; @@ -365,7 +357,7 @@ TEST_F(AWSResourceMappingManagerTest, GetResourceRegion_QueryNonexistResourceMap TEST_F(AWSResourceMappingManagerTest, GetResourceType_AfterParsingValidConfigFile_GetExpectedType) { - CreateTestConfigFile(TEST_VALID_RESOURCE_MAPPING_CONFIG_FILE); + CreateFile(m_configFilePath.Native(), TEST_VALID_RESOURCE_MAPPING_CONFIG_FILE); m_resourceMappingManager->ActivateManager(); AZStd::string actualType; @@ -382,7 +374,7 @@ TEST_F(AWSResourceMappingManagerTest, GetResourceType_AfterParsingValidConfigFil TEST_F(AWSResourceMappingManagerTest, GetResourceType_QueryNonexistResourceMappingKeyName_GetEmptyType) { - CreateTestConfigFile(TEST_VALID_RESOURCE_MAPPING_CONFIG_FILE); + CreateFile(m_configFilePath.Native(), TEST_VALID_RESOURCE_MAPPING_CONFIG_FILE); m_resourceMappingManager->ActivateManager(); AZStd::string actualType; @@ -393,7 +385,7 @@ TEST_F(AWSResourceMappingManagerTest, GetResourceType_QueryNonexistResourceMappi TEST_F(AWSResourceMappingManagerTest, GetServiceUrl_PassingEmptyServiceName_GetEmptyUrl) { - CreateTestConfigFile(TEST_VALID_RESOURCE_MAPPING_CONFIG_FILE); + CreateFile(m_configFilePath.Native(), TEST_VALID_RESOURCE_MAPPING_CONFIG_FILE); m_resourceMappingManager->ActivateManager(); AZStd::string actualServiceUrl; @@ -404,7 +396,7 @@ TEST_F(AWSResourceMappingManagerTest, GetServiceUrl_PassingEmptyServiceName_GetE TEST_F(AWSResourceMappingManagerTest, GetServiceUrl_PassingEmptyRESTApiIdAndStage_GetEmptyUrl) { - CreateTestConfigFile(TEST_VALID_RESOURCE_MAPPING_CONFIG_FILE); + CreateFile(m_configFilePath.Native(), TEST_VALID_RESOURCE_MAPPING_CONFIG_FILE); m_resourceMappingManager->ActivateManager(); AZStd::string actualServiceUrl; @@ -415,7 +407,7 @@ TEST_F(AWSResourceMappingManagerTest, GetServiceUrl_PassingEmptyRESTApiIdAndStag TEST_F(AWSResourceMappingManagerTest, GetServiceUrl_RESTApiIdAndStageHaveInconsistentRegion_GetEmptyUrl) { - CreateTestConfigFile(TEST_VALID_RESOURCE_MAPPING_CONFIG_FILE); + CreateFile(m_configFilePath.Native(), TEST_VALID_RESOURCE_MAPPING_CONFIG_FILE); m_resourceMappingManager->ActivateManager(); AZStd::string actualServiceUrl; @@ -426,7 +418,7 @@ TEST_F(AWSResourceMappingManagerTest, GetServiceUrl_RESTApiIdAndStageHaveInconsi TEST_F(AWSResourceMappingManagerTest, ReloadConfigFile_ParseValidConfigFileAfterParsingInvalid_ConfigDataGetParsed) { - CreateTestConfigFile(TEST_INVALID_RESOURCE_MAPPING_CONFIG_FILE); + CreateFile(m_configFilePath.Native(), TEST_INVALID_RESOURCE_MAPPING_CONFIG_FILE); m_resourceMappingManager->ActivateManager(); AZStd::string actualAccountId; @@ -438,7 +430,7 @@ TEST_F(AWSResourceMappingManagerTest, ReloadConfigFile_ParseValidConfigFileAfter EXPECT_TRUE(actualRegion.empty()); EXPECT_TRUE(m_resourceMappingManager->GetStatus() == AWSResourceMappingManager::Status::Error); - CreateTestConfigFile(TEST_VALID_RESOURCE_MAPPING_CONFIG_FILE); + CreateFile(m_configFilePath.Native(), TEST_VALID_RESOURCE_MAPPING_CONFIG_FILE); m_resourceMappingManager->ReloadConfigFile(); AWSResourceMappingRequestBus::BroadcastResult(actualAccountId, &AWSResourceMappingRequests::GetDefaultAccountId); @@ -451,7 +443,7 @@ TEST_F(AWSResourceMappingManagerTest, ReloadConfigFile_ParseValidConfigFileAfter TEST_F(AWSResourceMappingManagerTest, ReloadConfigFile_ReloadConfigFileNameAndParseValidConfigFile_ConfigDataGetParsed) { - CreateTestConfigFile(TEST_VALID_RESOURCE_MAPPING_CONFIG_FILE); + CreateFile(m_configFilePath.Native(), TEST_VALID_RESOURCE_MAPPING_CONFIG_FILE); m_resourceMappingManager->ReloadConfigFile(true); EXPECT_EQ(m_reloadConfigurationCounter, 1); @@ -462,6 +454,7 @@ TEST_F(AWSResourceMappingManagerTest, ReloadConfigFile_ReloadConfigFileNameAndPa TEST_F(AWSResourceMappingManagerTest, ReloadConfigFile_MissingSetRegFile_ConfigDataIsNotParsed) { + m_configFilePath.clear(); m_resourceMappingManager->ReloadConfigFile(true); EXPECT_EQ(m_reloadConfigurationCounter, 1); diff --git a/Gems/AWSCore/Code/Tests/ResourceMapping/AWSResourceMappingUtilsTest.cpp b/Gems/AWSCore/Code/Tests/ResourceMapping/AWSResourceMappingUtilsTest.cpp index f1a90aa2ae..f5215f89c2 100644 --- a/Gems/AWSCore/Code/Tests/ResourceMapping/AWSResourceMappingUtilsTest.cpp +++ b/Gems/AWSCore/Code/Tests/ResourceMapping/AWSResourceMappingUtilsTest.cpp @@ -6,8 +6,6 @@ * */ -#include - #include #include @@ -18,7 +16,7 @@ static constexpr const char TEST_VALID_RESTAPI_REGION[] = "us-west-2"; static constexpr const char TEST_VALID_RESTAPI_CHINA_REGION[] = "cn-north-1"; static constexpr const char TEST_VALID_RESTAPI_STAGE[] = "prod"; -using AWSResourceMappingUtilsTest = UnitTest::ScopedAllocatorSetupFixture; +using AWSResourceMappingUtilsTest = AWSCoreFixture; TEST_F(AWSResourceMappingUtilsTest, FormatRESTApiUrl_PassingValidArguments_ReturnExpectedResult) { diff --git a/Gems/AWSCore/Code/Tests/ScriptCanvas/AWSScriptBehaviorDynamoDBTest.cpp b/Gems/AWSCore/Code/Tests/ScriptCanvas/AWSScriptBehaviorDynamoDBTest.cpp index e42e270bc2..bd66ccb309 100644 --- a/Gems/AWSCore/Code/Tests/ScriptCanvas/AWSScriptBehaviorDynamoDBTest.cpp +++ b/Gems/AWSCore/Code/Tests/ScriptCanvas/AWSScriptBehaviorDynamoDBTest.cpp @@ -7,7 +7,6 @@ */ #include -#include #include #include @@ -32,7 +31,7 @@ public: MOCK_METHOD1(OnGetItemError, void(const AZStd::string&)); }; -using AWSScriptBehaviorDynamoDBTest = UnitTest::ScopedAllocatorSetupFixture; +using AWSScriptBehaviorDynamoDBTest = AWSCoreFixture; TEST_F(AWSScriptBehaviorDynamoDBTest, GetItemRaw_CallWithEmptyTableName_InvokeOnError) { diff --git a/Gems/AWSCore/Code/Tests/ScriptCanvas/AWSScriptBehaviorLambdaTest.cpp b/Gems/AWSCore/Code/Tests/ScriptCanvas/AWSScriptBehaviorLambdaTest.cpp index 42ccd6eddc..0b2dc8e30c 100644 --- a/Gems/AWSCore/Code/Tests/ScriptCanvas/AWSScriptBehaviorLambdaTest.cpp +++ b/Gems/AWSCore/Code/Tests/ScriptCanvas/AWSScriptBehaviorLambdaTest.cpp @@ -7,14 +7,14 @@ */ #include -#include #include #include using namespace AWSCore; -class AWSScriptBehaviorLambdaNotificationBusHandlerMock : public AWSScriptBehaviorLambdaNotificationBusHandler +class AWSScriptBehaviorLambdaNotificationBusHandlerMock + : public AWSScriptBehaviorLambdaNotificationBusHandler { public: AWSScriptBehaviorLambdaNotificationBusHandlerMock() @@ -31,7 +31,7 @@ public: MOCK_METHOD1(OnInvokeError, void(const AZStd::string&)); }; -using AWSScriptBehaviorLambdaTest = UnitTest::ScopedAllocatorSetupFixture; +using AWSScriptBehaviorLambdaTest = AWSCoreFixture; TEST_F(AWSScriptBehaviorLambdaTest, InvokeRaw_CallWithEmptyFunctionName_InvokeOnError) { diff --git a/Gems/AWSCore/Code/Tests/ScriptCanvas/AWSScriptBehaviorS3Test.cpp b/Gems/AWSCore/Code/Tests/ScriptCanvas/AWSScriptBehaviorS3Test.cpp index 34a0166e32..da754a0de6 100644 --- a/Gems/AWSCore/Code/Tests/ScriptCanvas/AWSScriptBehaviorS3Test.cpp +++ b/Gems/AWSCore/Code/Tests/ScriptCanvas/AWSScriptBehaviorS3Test.cpp @@ -145,17 +145,18 @@ TEST_F(AWSScriptBehaviorS3Test, GetObjectRaw_CallWithOutfileDirectoryNoExist_Inv AWSScriptBehaviorS3::GetObjectRaw("dummyBucket", "dummyObject", "dummyRegion", dummyDirectory); } +#if defined(AZ_DEBUG_BUILD) || defined(AZ_PROFILE_BUILD) +// The preparation step for this test case does not work in release mode TEST_F(AWSScriptBehaviorS3Test, GetObjectRaw_CallWithOutfileIsReadOnly_InvokeOnError) { AWSScriptBehaviorS3NotificationBusHandlerMock s3HandlerMock; EXPECT_CALL(s3HandlerMock, OnGetObjectError(::testing::_)).Times(1); - AZStd::string randomTestFile = AZStd::string::format("%s/test%s.txt", - AZ::Test::GetCurrentExecutablePath().c_str(), AZ::Uuid::CreateRandom().ToString(false, false).c_str()); - AzFramework::StringFunc::Path::Normalize(randomTestFile); - CreateReadOnlyTestFile(randomTestFile); - AWSScriptBehaviorS3::GetObjectRaw("dummyBucket", "dummyObject", "dummyRegion", randomTestFile); - RemoveReadOnlyTestFile(randomTestFile); + AZ::IO::Path randomTestFilePath = (GetTestTempDirectoryPath() / "random_test.txt").LexicallyNormal(); + CreateReadOnlyTestFile(randomTestFilePath.Native()); + AWSScriptBehaviorS3::GetObjectRaw("dummyBucket", "dummyObject", "dummyRegion", randomTestFilePath.Native()); + RemoveReadOnlyTestFile(randomTestFilePath.Native()); } +#endif TEST_F(AWSScriptBehaviorS3Test, GetObject_NoBucketNameInResourceMappingFound_InvokeOnError) { diff --git a/Gems/AWSCore/Code/Tests/ScriptCanvas/AWSScriptBehaviorsComponentTest.cpp b/Gems/AWSCore/Code/Tests/ScriptCanvas/AWSScriptBehaviorsComponentTest.cpp index caba8b5ae7..387aa932f6 100644 --- a/Gems/AWSCore/Code/Tests/ScriptCanvas/AWSScriptBehaviorsComponentTest.cpp +++ b/Gems/AWSCore/Code/Tests/ScriptCanvas/AWSScriptBehaviorsComponentTest.cpp @@ -9,7 +9,6 @@ #include #include #include -#include #include #include @@ -17,11 +16,12 @@ using namespace AWSCore; class AWSScriptBehaviorsComponentTest - : public UnitTest::ScopedAllocatorSetupFixture + : public AWSCoreFixture { public: void SetUp() override { + AWSCoreFixture::SetUpFixture(); m_serializeContext = AZStd::make_unique(); m_serializeContext->CreateEditContext(); m_behaviorContext = AZStd::make_unique(); @@ -39,6 +39,7 @@ public: m_componentDescriptor.reset(); m_behaviorContext.reset(); m_serializeContext.reset(); + AWSCoreFixture::TearDownFixture(); } protected: diff --git a/Gems/AWSCore/Code/Tests/TestFramework/AWSCoreFixture.h b/Gems/AWSCore/Code/Tests/TestFramework/AWSCoreFixture.h index 1d14484387..6ea5593d0e 100644 --- a/Gems/AWSCore/Code/Tests/TestFramework/AWSCoreFixture.h +++ b/Gems/AWSCore/Code/Tests/TestFramework/AWSCoreFixture.h @@ -8,6 +8,7 @@ #pragma once +#include #include #include #include @@ -16,6 +17,8 @@ #include #include +#include + namespace AWSCoreTestingUtils { static const AZStd::string STRING_VALUE{"s"}; @@ -111,6 +114,11 @@ public: ~AWSCoreFixture() override = default; void SetUp() override + { + SetUpFixture(); + } + + void SetUpFixture(bool mockSettingsRegistry = true) { AZ::AllocatorInstance::Create(); AZ::AllocatorInstance::Create(); @@ -120,14 +128,37 @@ public: AZ::IO::FileIOBase::SetInstance(nullptr); AZ::IO::FileIOBase::SetInstance(m_localFileIO); - m_settingsRegistry = AZStd::make_unique(); - AZ::SettingsRegistry::Register(m_settingsRegistry.get()); + if (mockSettingsRegistry) + { + m_settingsRegistry = AZStd::make_unique(); + AZ::SettingsRegistry::Register(m_settingsRegistry.get()); + } + else + { + m_app = AZStd::make_unique(); + } + + AWSNativeSDKInit::InitializationManager::InitAwsApi(); } void TearDown() override { - AZ::SettingsRegistry::Unregister(m_settingsRegistry.get()); - m_settingsRegistry.reset(); + TearDownFixture(); + } + + void TearDownFixture(bool mockSettingsRegistry = true) + { + AWSNativeSDKInit::InitializationManager::Shutdown(); + + if (mockSettingsRegistry) + { + AZ::SettingsRegistry::Unregister(m_settingsRegistry.get()); + m_settingsRegistry.reset(); + } + else + { + m_app.reset(); + } AZ::IO::FileIOBase::SetInstance(nullptr); @@ -146,7 +177,7 @@ public: bool CreateFile(const AZStd::string& filePath, const AZStd::string& content) { AZ::IO::HandleType fileHandle; - if (!m_localFileIO->Open(filePath.c_str(), AZ::IO::OpenMode::ModeWrite | AZ::IO::OpenMode::ModeText, fileHandle)) + if (!m_localFileIO->Open(filePath.c_str(), AZ::IO::OpenMode::ModeCreatePath | AZ::IO::OpenMode::ModeWrite | AZ::IO::OpenMode::ModeText, fileHandle)) { return false; } @@ -172,5 +203,13 @@ private: AZ::IO::FileIOBase* m_otherFileIO = nullptr; protected: + AZ::IO::Path GetTestTempDirectoryPath() + { + AZ::IO::Path testTempDirPath{ m_testTempDirectory.GetDirectory() }; + return testTempDirPath; + } + + AZ::Test::ScopedAutoTempDirectory m_testTempDirectory; AZStd::unique_ptr m_settingsRegistry; + AZStd::unique_ptr m_app; }; diff --git a/Gems/AWSCore/Code/Tools/ResourceMappingTool/README.md b/Gems/AWSCore/Code/Tools/ResourceMappingTool/README.md index e09ecc281f..33152fb2ee 100644 --- a/Gems/AWSCore/Code/Tools/ResourceMappingTool/README.md +++ b/Gems/AWSCore/Code/Tools/ResourceMappingTool/README.md @@ -1,35 +1,40 @@ # Welcome to the AWS Core Resource Mapping Tool project! -## Setup aws config and credential -Resource mapping tool is using boto3 to interact with aws services: +## Setup aws config and credentials +The Resource Mapping Tool uses boto3 to interact with aws services: * Read boto3 [Configuration](https://boto3.amazonaws.com/v1/documentation/api/latest/guide/configuration.html) to setup default aws region. * Read boto3 [Credentials](https://boto3.amazonaws.com/v1/documentation/api/latest/guide/credentials.html) to setup default profile or credential keys. -Or follow **AWS CLI** configuration which can be reused by boto3 lib: +Or follow **AWS CLI** configuration directions which can be reused by the boto3 lib: * Follow [Quick configuration with aws configure](https://docs.aws.amazon.com/cli/latest/userguide/cli-configure-quickstart.html#cli-configure-quickstart-config) ## Python Environment Setup Options -### 1. Engine python environment (Including Editor) -1. In order to use engine python environment, it requires to link Qt binaries for this tool. +### 1. Use Engine python environment (Including Editor) +1. In order to use the Open 3D Engine's python environment, this tool requires linking the Qt binaries. Follow cmake instructions to configure your project, for example: ``` - $ cmake -B -S . -G "Visual Studio 16 2019" -DLY_3RDPARTY_PATH= -DLY_PROJECTS= + $ cmake -B -S . -G "Visual Studio 16 2019" -DLY_PROJECTS= ``` -2. At this point, double check engine python environment gets setup under */python/runtime* directory +2. At this point, double check that the Open 3D Engine's python environment gets set up under */python/runtime* directory -3. Build project with **AWSCore.Editor** (or **AWSCore.ResourceMappintTool**, or **Editor**) target to generate required Qt binaries. +3. Build the project with the **AWSCore.Editor** (or **AWSCore.ResourceMappingTool**, or **Editor**) target to generate the required Qt binaries. + * Windows + ``` + $ cmake --build --target AWSCore.Editor --config /m + ``` + * Linux ``` $ cmake --build --target AWSCore.Editor --config -j ``` -4. At this point, double check Qt binaries gets generated under */bin//AWSCoreEditorQtBin* directory +4. At this point, double check the Qt binaries have been generated under */bin//AWSCoreEditorQtBin* directory -5. Launch resource mapping tool under engine root folder: +5. Launch the Resource Mapping Tool from the engine root folder: * Windows * release mode ``` @@ -39,10 +44,19 @@ Follow cmake instructions to configure your project, for example: ``` $ python\python.cmd debug Gems\AWSCore\Code\Tools\ResourceMappingTool\resource_mapping_tool.py --binaries_path \bin\debug\AWSCoreEditorQtBin ``` -* Note - Editor is integrated with the same engine python environment to launch Resource Mapping Tool. If it is failed to launch the tool -in Editor, please follow above steps to make sure expected scripts/binaries are present. + * Linux + * release mode + ``` + $ python/python.sh Gems/AWSCore/Code/Tools/ResourceMappingTool/resource_mapping_tool.py --binaries_path /bin/profile/AWSCoreEditorQtBin + ``` + * debug mode + ``` + $ python/python.sh Gems/AWSCore/Code/Tools/ResourceMappingTool/resource_mapping_tool.py --binaries_path /bin/debug/AWSCoreEditorQtBin + ``` + +* Note - the engine Editor is integrated with the same python environment used to launch the Resource Mapping Tool. If the tool fails to launch from the Editor, please double check that you have completed all of the above steps and that the expected scripts and binaries are present in the expected directories. -### 2. Python virtual environment +### 2. Use a separate python virtual environment This project is set up like a standard Python project. The initialization process also creates a virtualenv within this project, stored under the `.env` directory. To create the virtualenv it assumes that there is a `python3` @@ -95,7 +109,23 @@ you can create the virtualenv manually. * `--config-path` **[Optional]** Path to resource mapping config directory, if not provided tool will use current directory. * `--debug` **[Optional]** Execute on debug mode to enable DEBUG logging level. -* `--log-path` **[Optional]** Path to resource mapping tool logging directory, +* `--log-path` **[Optional]** Path to Resource Mapping Tool logging directory, if not provided tool will store logging under tool source code directory. * `--profile` **[Optional]** Named AWS profile to use for querying AWS resources, - if not provided tool will use `default` aws profile. \ No newline at end of file + if not provided tool will use `default` aws profile. + + +## Running tests + +How to run the unit tests for the project: + +1. If not already activated, activate the project's python environment as explained above. +2. Use `pytest` to run one or more tests (command paths formatted as if run from this directory): + * Run all the tests + ``` + python -m pytest -vv . + ``` + * Run a specific test file or directory: + ``` + python -m pytest tests\unit\model\test_basic_resource_attributes.py + ``` \ No newline at end of file diff --git a/Gems/AWSCore/Code/Tools/ResourceMappingTool/controller/view_edit_controller.py b/Gems/AWSCore/Code/Tools/ResourceMappingTool/controller/view_edit_controller.py index bdfe7fa11e..39f7b5ccf1 100755 --- a/Gems/AWSCore/Code/Tools/ResourceMappingTool/controller/view_edit_controller.py +++ b/Gems/AWSCore/Code/Tools/ResourceMappingTool/controller/view_edit_controller.py @@ -69,17 +69,13 @@ class ViewEditController(QObject): json_dict: Dict[str, any] = \ json_utils.convert_resources_to_json_dict(self._proxy_model.get_resources(), self._config_file_json_source) - configuration: Configuration = self._configuration_manager.configuration - if json_dict.get(json_utils.RESOURCE_MAPPING_ACCOUNTID_JSON_KEY_NAME) == \ - json_utils.RESOURCE_MAPPING_ACCOUNTID_TEMPLATE_VALUE: - json_dict[json_utils.RESOURCE_MAPPING_ACCOUNTID_JSON_KEY_NAME] = configuration.account_id - if json_dict == self._config_file_json_source: # skip because no difference found against existing json file return True # try to write in memory json content into json file try: + configuration: Configuration = self._configuration_manager.configuration config_file_full_path: str = file_utils.join_path(configuration.config_directory, config_file_name) json_utils.write_into_json_file(config_file_full_path, json_dict) self._config_file_json_source = json_dict diff --git a/Gems/AWSCore/Code/Tools/ResourceMappingTool/model/basic_resource_attributes.py b/Gems/AWSCore/Code/Tools/ResourceMappingTool/model/basic_resource_attributes.py index 8a85b5d8a3..25df1d5f8e 100755 --- a/Gems/AWSCore/Code/Tools/ResourceMappingTool/model/basic_resource_attributes.py +++ b/Gems/AWSCore/Code/Tools/ResourceMappingTool/model/basic_resource_attributes.py @@ -70,8 +70,9 @@ class BasicResourceAttributes(object): self._region = new_region def is_valid(self) -> bool: - return not self._type == "" and not self._name_id == "" \ - and not self._account_id == "" and not self._region == "" + return not self._type == "" \ + and not self._name_id == "" \ + and not self._region == "" class BasicResourceAttributesBuilder(object): diff --git a/Gems/AWSCore/Code/Tools/ResourceMappingTool/requirements.txt b/Gems/AWSCore/Code/Tools/ResourceMappingTool/requirements.txt index 2b931e0b51..ee8e94640a 100644 --- a/Gems/AWSCore/Code/Tools/ResourceMappingTool/requirements.txt +++ b/Gems/AWSCore/Code/Tools/ResourceMappingTool/requirements.txt @@ -1,2 +1,5 @@ PySide2>=5.15.2 boto3>=1.17.30 +pytest>=5.3.2 + + diff --git a/Gems/AWSCore/Code/Tools/ResourceMappingTool/resource_mapping_schema.json b/Gems/AWSCore/Code/Tools/ResourceMappingTool/resource_mapping_schema.json new file mode 100644 index 0000000000..21bc3334ce --- /dev/null +++ b/Gems/AWSCore/Code/Tools/ResourceMappingTool/resource_mapping_schema.json @@ -0,0 +1,56 @@ +{ + "$schema": "http://json-schema.org/draft-04/schema", + "type": "object", + "title": "O3DE AWS Resource mapping file schema", + "required": ["AWSResourceMappings", "AccountId", "Region", "Version"], + "properties": { + "AWSResourceMappings": { + "type": "object", + "title": "AWS resource mappings schema", + "patternProperties": { + "^.+$": { + "type": "object", + "title": "AWS resource entry schema", + "required": ["Type", "Name/ID"], + "properties": { + "Type": { + "$ref": "#/NonEmptyString" + }, + "Name/ID": { + "$ref": "#/NonEmptyString" + }, + "AccountId": { + "$ref": "#/AccountIdString" + }, + "Region": { + "$ref": "#/RegionString" + } + } + } + }, + "additionalProperties": false + }, + "AccountId": { + "$ref": "#/AccountIdString" + }, + "Region": { + "$ref": "#/RegionString" + }, + "Version": { + "pattern": "^[0-9]{1}.[0-9]{1}.[0-9]{1}$" + } + }, + "AccountIdString": { + "type": "string", + "pattern": "^[0-9]{12}$|EMPTY|^$" + }, + "NonEmptyString": { + "type": "string", + "minLength": 1 + }, + "RegionString": { + "type": "string", + "pattern": "^[a-z]{2}-[a-z]{4,9}-[0-9]{1}$" + }, + "additionalProperties": false +} diff --git a/Gems/AWSCore/Code/Tools/ResourceMappingTool/resource_mapping_tool.py b/Gems/AWSCore/Code/Tools/ResourceMappingTool/resource_mapping_tool.py index 2351fd001b..a3283cbb28 100755 --- a/Gems/AWSCore/Code/Tools/ResourceMappingTool/resource_mapping_tool.py +++ b/Gems/AWSCore/Code/Tools/ResourceMappingTool/resource_mapping_tool.py @@ -10,6 +10,7 @@ import logging import sys from utils import environment_utils +from utils import json_utils from utils import file_utils # arguments setup @@ -20,6 +21,7 @@ argument_parser.add_argument('--debug', action='store_true', help='Execute on de argument_parser.add_argument('--log-path', help='Path to resource mapping tool logging directory ' '(if not provided, logging file will be located at tool directory)') argument_parser.add_argument('--profile', default='default', help='Named AWS profile to use for querying AWS resources') + arguments: Namespace = argument_parser.parse_args() # logging setup @@ -74,6 +76,15 @@ if __name__ == "__main__": except FileNotFoundError: logger.warning("Failed to load style sheet for resource mapping tool") + try: + schema_path: str = file_utils.join_path(file_utils.get_parent_directory_path(__file__), + 'resource_mapping_schema.json') + json_utils.load_resource_mapping_json_schema(schema_path) + except (FileNotFoundError, ValueError, KeyError) as e: + logger.error(f"Failed to load schema file {e}") + environment_utils.cleanup_qt_environment() + exit(-1) + logger.info("Initializing configuration manager ...") configuration_manager: ConfigurationManager = ConfigurationManager() configuration_error: bool = not configuration_manager.setup(arguments.profile, arguments.config_path) diff --git a/Gems/AWSCore/Code/Tools/ResourceMappingTool/tests/unit/controller/test_view_edit_controller.py b/Gems/AWSCore/Code/Tools/ResourceMappingTool/tests/unit/controller/test_view_edit_controller.py index c73bddcd9c..41d4490c44 100755 --- a/Gems/AWSCore/Code/Tools/ResourceMappingTool/tests/unit/controller/test_view_edit_controller.py +++ b/Gems/AWSCore/Code/Tools/ResourceMappingTool/tests/unit/controller/test_view_edit_controller.py @@ -420,8 +420,30 @@ class TestViewEditController(TestCase): self._mocked_view_edit_page.config_file_combobox.currentText.return_value = \ TestViewEditController._expected_config_file_name expected_json_dict: Dict[str, any] = { - "dummyKey": "dummyValue", - self._expected_account_id_attribute_name: self._expected_account_id_template_vale} + "dummyKey": "dummyValue" + } + mock_json_utils.validate_resources_according_to_json_schema.return_value = [] + mock_json_utils.convert_resources_to_json_dict.return_value = expected_json_dict + mock_file_utils.join_path.return_value = TestViewEditController._expected_config_file_full_path + mocked_call_args: call = self._mocked_view_edit_page.save_changes_button.clicked.connect.call_args[0] + + mocked_call_args[0]() # triggering save_changes_button connected function + mock_json_utils.convert_resources_to_json_dict.assert_called_once() + mock_json_utils.write_into_json_file.assert_called_once_with( + TestViewEditController._expected_config_file_full_path, expected_json_dict) + self._mocked_proxy_model.override_all_resources_status.assert_called_once_with( + ResourceMappingAttributesStatus(ResourceMappingAttributesStatus.SUCCESS_STATUS_VALUE, + [ResourceMappingAttributesStatus.SUCCESS_STATUS_VALUE])) + + @patch("controller.view_edit_controller.file_utils") + @patch("controller.view_edit_controller.json_utils") + def test_page_save_changes_button_json_file_saved_and_template_account_id_unchanged( + self, mock_json_utils: MagicMock, mock_file_utils: MagicMock) -> None: + self._mocked_view_edit_page.config_file_combobox.currentText.return_value = \ + TestViewEditController._expected_config_file_name + expected_json_dict: Dict[str, any] = { + self._expected_account_id_attribute_name: self._expected_account_id_template_vale + } mock_json_utils.RESOURCE_MAPPING_ACCOUNTID_JSON_KEY_NAME = self._expected_account_id_attribute_name mock_json_utils.RESOURCE_MAPPING_ACCOUNTID_TEMPLATE_VALUE = self._expected_account_id_template_vale mock_json_utils.validate_resources_according_to_json_schema.return_value = [] @@ -430,7 +452,31 @@ class TestViewEditController(TestCase): mocked_call_args: call = self._mocked_view_edit_page.save_changes_button.clicked.connect.call_args[0] mocked_call_args[0]() # triggering save_changes_button connected function - assert expected_json_dict["AccountId"] == self._mocked_configuration_manager.configuration.account_id + assert expected_json_dict[mock_json_utils.RESOURCE_MAPPING_ACCOUNTID_JSON_KEY_NAME] == self._expected_account_id_template_vale + mock_json_utils.convert_resources_to_json_dict.assert_called_once() + mock_json_utils.write_into_json_file.assert_called_once_with( + TestViewEditController._expected_config_file_full_path, expected_json_dict) + self._mocked_proxy_model.override_all_resources_status.assert_called_once_with( + ResourceMappingAttributesStatus(ResourceMappingAttributesStatus.SUCCESS_STATUS_VALUE, + [ResourceMappingAttributesStatus.SUCCESS_STATUS_VALUE])) + + @patch("controller.view_edit_controller.file_utils") + @patch("controller.view_edit_controller.json_utils") + def test_page_save_changes_button_json_file_saved_and_empty_account_id_unchanged( + self, mock_json_utils: MagicMock, mock_file_utils: MagicMock) -> None: + self._mocked_view_edit_page.config_file_combobox.currentText.return_value = \ + TestViewEditController._expected_config_file_name + expected_json_dict: Dict[str, any] = { + self._expected_account_id_attribute_name: '' + } + mock_json_utils.RESOURCE_MAPPING_ACCOUNTID_JSON_KEY_NAME = self._expected_account_id_attribute_name + mock_json_utils.validate_resources_according_to_json_schema.return_value = [] + mock_json_utils.convert_resources_to_json_dict.return_value = expected_json_dict + mock_file_utils.join_path.return_value = TestViewEditController._expected_config_file_full_path + mocked_call_args: call = self._mocked_view_edit_page.save_changes_button.clicked.connect.call_args[0] + + mocked_call_args[0]() # triggering save_changes_button connected function + assert expected_json_dict[mock_json_utils.RESOURCE_MAPPING_ACCOUNTID_JSON_KEY_NAME] == '' mock_json_utils.convert_resources_to_json_dict.assert_called_once() mock_json_utils.write_into_json_file.assert_called_once_with( TestViewEditController._expected_config_file_full_path, expected_json_dict) diff --git a/Gems/AWSCore/Code/Tools/ResourceMappingTool/tests/unit/model/__init__.py b/Gems/AWSCore/Code/Tools/ResourceMappingTool/tests/unit/model/__init__.py new file mode 100644 index 0000000000..f5193b300e --- /dev/null +++ b/Gems/AWSCore/Code/Tools/ResourceMappingTool/tests/unit/model/__init__.py @@ -0,0 +1,6 @@ +""" +Copyright (c) Contributors to the Open 3D Engine Project. +For complete copyright and license terms please see the LICENSE at the root of this distribution. + +SPDX-License-Identifier: Apache-2.0 OR MIT +""" diff --git a/Gems/AWSCore/Code/Tools/ResourceMappingTool/tests/unit/model/test_basic_resource_attributes.py b/Gems/AWSCore/Code/Tools/ResourceMappingTool/tests/unit/model/test_basic_resource_attributes.py new file mode 100644 index 0000000000..47b23734ae --- /dev/null +++ b/Gems/AWSCore/Code/Tools/ResourceMappingTool/tests/unit/model/test_basic_resource_attributes.py @@ -0,0 +1,42 @@ +""" +Copyright (c) Contributors to the Open 3D Engine Project. +For complete copyright and license terms please see the LICENSE at the root of this distribution. + +SPDX-License-Identifier: Apache-2.0 OR MIT +""" + +from unittest import TestCase +from model.basic_resource_attributes import (BasicResourceAttributes, BasicResourceAttributesBuilder) + +class TestBasicResourceAttributes(TestCase): + """ + BasicResourceAttributes unit test cases + """ + + def setUp(self) -> None: + testResourceAttributes: BasicResourceAttributes = BasicResourceAttributes() + testResourceAttributes.region = "us-east-1" + testResourceAttributes.type = "AWS::S3::Bucket" + testResourceAttributes.account_id = "123456789012" + testResourceAttributes.name_id = "my-o3de-bucket-in-us-east-1" + + self._test_basic_resource_attributes = testResourceAttributes + + def test_is_valid(self) -> None: + assert self._test_basic_resource_attributes.is_valid() == True + + def test_is_valid_no_accountid_ok(self) -> None: + self._test_basic_resource_attributes.account_id = "" + assert self._test_basic_resource_attributes.is_valid() == True + + def test_is_valid_no_type_invalid(self) -> None: + self._test_basic_resource_attributes.type = "" + assert self._test_basic_resource_attributes.is_valid() == False + + def test_is_valid_no_nameid_invalid(self) -> None: + self._test_basic_resource_attributes.name_id = "" + assert self._test_basic_resource_attributes.is_valid() == False + + def test_is_valid_no_region_invalid(self) -> None: + self._test_basic_resource_attributes.region = "" + assert self._test_basic_resource_attributes.is_valid() == False diff --git a/Gems/AWSCore/Code/Tools/ResourceMappingTool/tests/unit/utils/test_environment_utils.py b/Gems/AWSCore/Code/Tools/ResourceMappingTool/tests/unit/utils/test_environment_utils.py index 756d6fdb10..3d36a56468 100644 --- a/Gems/AWSCore/Code/Tools/ResourceMappingTool/tests/unit/utils/test_environment_utils.py +++ b/Gems/AWSCore/Code/Tools/ResourceMappingTool/tests/unit/utils/test_environment_utils.py @@ -5,6 +5,7 @@ For complete copyright and license terms please see the LICENSE at the root of t SPDX-License-Identifier: Apache-2.0 OR MIT """ +import platform from typing import List from unittest import TestCase from unittest.mock import (ANY, call, MagicMock, patch) @@ -27,14 +28,24 @@ class TestEnvironmentUtils(TestCase): self.addCleanup(os_pathsep_patcher.stop) self._mock_os_pathsep: MagicMock = os_pathsep_patcher.start() - def test_setup_qt_environment_global_flag_is_set(self) -> None: + @patch('os.path.exists') + @patch('ctypes.CDLL') + def test_setup_qt_environment_global_flag_is_set(self, mock_os_path_exists, mock_ctype_cdll) -> None: + mock_os_path_exists.return_value = True environment_utils.setup_qt_environment("dummy") self._mock_os_environ.copy.assert_called_once() self._mock_os_pathsep.join.assert_called_once() assert environment_utils.is_qt_linked() is True + if platform.system() == 'Linux': + mock_os_path_exists.assert_called() - def test_cleanup_qt_environment_global_flag_is_set(self) -> None: + @patch('os.path.exists') + @patch('ctypes.CDLL') + def test_cleanup_qt_environment_global_flag_is_set(self, mock_os_path_exists, mock_ctype_cdll) -> None: + mock_os_path_exists.return_value = True environment_utils.setup_qt_environment("dummy") assert environment_utils.is_qt_linked() is True environment_utils.cleanup_qt_environment() assert environment_utils.is_qt_linked() is False + if platform.system() == 'Linux': + mock_os_path_exists.assert_called() diff --git a/Gems/AWSCore/Code/Tools/ResourceMappingTool/tests/unit/utils/test_file_utils.py b/Gems/AWSCore/Code/Tools/ResourceMappingTool/tests/unit/utils/test_file_utils.py index fe0f1754f3..e74771f1ef 100755 --- a/Gems/AWSCore/Code/Tools/ResourceMappingTool/tests/unit/utils/test_file_utils.py +++ b/Gems/AWSCore/Code/Tools/ResourceMappingTool/tests/unit/utils/test_file_utils.py @@ -68,12 +68,65 @@ class TestFileUtils(TestCase): self._mock_path.cwd.assert_called_once() assert actual_path_name == TestFileUtils._expected_path_name - def test_get_parent_directory_path_return_expected_path_name(self) -> None: - self._mock_path.return_value.parent = TestFileUtils._expected_path_name + def test_get_parent_directory_path_return_empty_when_invalid_input(self) -> None: + mocked_path: MagicMock = self._mock_path.return_value + mocked_path.exists.return_value = False actual_path_name: str = file_utils.get_parent_directory_path("dummy") self._mock_path.assert_called_once() - assert actual_path_name == TestFileUtils._expected_path_name + assert actual_path_name == "" + + def test_get_parent_directory_path_return_empty_when_parent_invalid(self) -> None: + mocked_path: MagicMock = self._mock_path.return_value + mocked_path.exists.return_value = True + mocked_parent_path: MagicMock = MagicMock() + mocked_path.parent = mocked_parent_path + mocked_parent_path.exists.return_value = False + + actual_path_name: str = file_utils.get_parent_directory_path("dummy") + self._mock_path.assert_called() + assert actual_path_name == "" + + def test_get_parent_directory_path_return_expected_path_when_parent_valid(self) -> None: + mocked_path: MagicMock = self._mock_path.return_value + mocked_path.exists.return_value = True + mocked_parent_path: MagicMock = MagicMock() + mocked_path.parent = mocked_parent_path + mocked_parent_path.exists.return_value = True + mocked_parent_path.resolve.return_value = TestFileUtils._expected_file_name + + actual_path_name: str = file_utils.get_parent_directory_path("dummy") + self._mock_path.assert_called() + assert actual_path_name == TestFileUtils._expected_file_name + + def test_get_parent_directory_path_return_empty_when_level_two_parent_invalid(self) -> None: + mocked_path: MagicMock = self._mock_path.return_value + mocked_path.exists.return_value = True + mocked_parent_path1: MagicMock = MagicMock() + mocked_path.parent = mocked_parent_path1 + mocked_parent_path1.exists.return_value = True + mocked_parent_path2: MagicMock = MagicMock() + mocked_parent_path1.parent = mocked_parent_path2 + mocked_parent_path2.exists.return_value = False + + actual_path_name: str = file_utils.get_parent_directory_path("dummy", 2) + self._mock_path.assert_called() + assert actual_path_name == "" + + def test_get_parent_directory_path_return_expected_path_when_level_two_parent_valid(self) -> None: + mocked_path: MagicMock = self._mock_path.return_value + mocked_path.exists.return_value = True + mocked_parent_path1: MagicMock = MagicMock() + mocked_path.parent = mocked_parent_path1 + mocked_parent_path1.exists.return_value = True + mocked_parent_path2: MagicMock = MagicMock() + mocked_parent_path1.parent = mocked_parent_path2 + mocked_parent_path2.exists.return_value = True + mocked_parent_path2.resolve.return_value = TestFileUtils._expected_file_name + + actual_path_name: str = file_utils.get_parent_directory_path("dummy", 2) + self._mock_path.assert_called() + assert actual_path_name == TestFileUtils._expected_file_name def test_find_files_with_suffix_under_directory_return_expected_file_name(self) -> None: mocked_path: MagicMock = self._mock_path.return_value diff --git a/Gems/AWSCore/Code/Tools/ResourceMappingTool/tests/unit/utils/test_json_utils.py b/Gems/AWSCore/Code/Tools/ResourceMappingTool/tests/unit/utils/test_json_utils.py index 7eb92ff222..819bfb72fc 100755 --- a/Gems/AWSCore/Code/Tools/ResourceMappingTool/tests/unit/utils/test_json_utils.py +++ b/Gems/AWSCore/Code/Tools/ResourceMappingTool/tests/unit/utils/test_json_utils.py @@ -10,6 +10,7 @@ from typing import (Dict, List) from unittest import TestCase from unittest.mock import (MagicMock, mock_open, patch) +from utils import file_utils from utils import json_utils from model import constants from model.resource_mapping_attributes import (ResourceMappingAttributes, ResourceMappingAttributesBuilder, @@ -49,6 +50,10 @@ class TestJsonUtils(TestCase): } def setUp(self) -> None: + schema_path: str = file_utils.join_path(file_utils.get_parent_directory_path(__file__, 4), + 'resource_mapping_schema.json') + json_utils.load_resource_mapping_json_schema(schema_path) + self._mock_open = mock_open() open_patcher: patch = patch("utils.json_utils.open", self._mock_open) self.addCleanup(open_patcher.stop) @@ -103,6 +108,11 @@ class TestJsonUtils(TestCase): invalid_json_dict.pop(json_utils.RESOURCE_MAPPING_ACCOUNTID_JSON_KEY_NAME) self.assertRaises(KeyError, json_utils.validate_json_dict_according_to_json_schema, invalid_json_dict) + def test_validate_json_dict_according_to_json_schema_raise_error_when_json_dict_has_empty_accountid(self) -> None: + valid_json_dict: Dict[str, any] = copy.deepcopy(TestJsonUtils._expected_json_dict) + valid_json_dict[json_utils.RESOURCE_MAPPING_ACCOUNTID_JSON_KEY_NAME] = '' + json_utils.validate_json_dict_according_to_json_schema(valid_json_dict) + def test_validate_json_dict_according_to_json_schema_pass_when_json_dict_has_template_accountid(self) -> None: valid_json_dict: Dict[str, any] = copy.deepcopy(TestJsonUtils._expected_json_dict) valid_json_dict[json_utils.RESOURCE_MAPPING_ACCOUNTID_JSON_KEY_NAME] = \ diff --git a/Gems/AWSCore/Code/Tools/ResourceMappingTool/utils/environment_utils.py b/Gems/AWSCore/Code/Tools/ResourceMappingTool/utils/environment_utils.py index 8600fe31b5..b67f64e715 100644 --- a/Gems/AWSCore/Code/Tools/ResourceMappingTool/utils/environment_utils.py +++ b/Gems/AWSCore/Code/Tools/ResourceMappingTool/utils/environment_utils.py @@ -7,6 +7,7 @@ SPDX-License-Identifier: Apache-2.0 OR MIT import logging import os +import platform from typing import Dict from utils import file_utils @@ -38,6 +39,20 @@ def setup_qt_environment(bin_path: str) -> None: new_path = os.pathsep.join([binaries_path, path]) os.environ['PATH'] = new_path + # On Linux, we need to load pyside2 and related modules as well + if platform.system() == 'Linux': + import ctypes + + preload_shared_libs = [f'{bin_path}/libpyside2.abi3.so.5.14', + f'{bin_path}/libQt5Widgets.so.5'] + + for preload_shared_lib in preload_shared_libs: + if not os.path.exists(preload_shared_lib): + logger.error(f"Cannot find required shared library at {preload_shared_lib}") + return + else: + ctypes.CDLL(preload_shared_lib) + global qt_binaries_linked qt_binaries_linked = True diff --git a/Gems/AWSCore/Code/Tools/ResourceMappingTool/utils/file_utils.py b/Gems/AWSCore/Code/Tools/ResourceMappingTool/utils/file_utils.py index 9e5dd9617b..9899c5dbb2 100755 --- a/Gems/AWSCore/Code/Tools/ResourceMappingTool/utils/file_utils.py +++ b/Gems/AWSCore/Code/Tools/ResourceMappingTool/utils/file_utils.py @@ -33,8 +33,29 @@ def get_current_directory_path() -> str: return str(pathlib.Path.cwd()) -def get_parent_directory_path(file_path: str) -> str: - return pathlib.Path(file_path).parent +def get_parent_directory_path(file_path: str, level: int = 1) -> str: + """ + Get parent directory path based on requested file path + :param file_path: The requested file path + :param level: The level of parent directory, default value is 1 + :return The string value of parent directory path if exist; otherwise empty string + """ + if not pathlib.Path(file_path).exists(): + return "" + + result: pathlib.Path = pathlib.Path(file_path).parent + current_level: int = 1 + while current_level < level: + current_level += 1 + if result.exists(): + result = result.parent + else: + return "" + + if not result.exists(): + return "" + else: + return result.resolve() def find_files_with_suffix_under_directory(dir_path: str, suffix: str) -> List[str]: diff --git a/Gems/AWSCore/Code/Tools/ResourceMappingTool/utils/json_utils.py b/Gems/AWSCore/Code/Tools/ResourceMappingTool/utils/json_utils.py index 5b9377ada3..3af9b9ff4a 100755 --- a/Gems/AWSCore/Code/Tools/ResourceMappingTool/utils/json_utils.py +++ b/Gems/AWSCore/Code/Tools/ResourceMappingTool/utils/json_utils.py @@ -19,18 +19,29 @@ Json Utils provide related functions to read/write/serialize/deserialize json fo """ logger = logging.getLogger(__name__) +# resource mapping json content constants _RESOURCE_MAPPING_JSON_KEY_NAME: str = "AWSResourceMappings" _RESOURCE_MAPPING_TYPE_JSON_KEY_NAME: str = "Type" _RESOURCE_MAPPING_NAMEID_JSON_KEY_NAME: str = "Name/ID" _RESOURCE_MAPPING_REGION_JSON_KEY_NAME: str = "Region" _RESOURCE_MAPPING_VERSION_JSON_KEY_NAME: str = "Version" -_RESOURCE_MAPPING_JSON_FORMAT_VERSION: str = "1.0.0" - +_RESOURCE_MAPPING_JSON_FORMAT_VERSION: str = "1.1.0" RESOURCE_MAPPING_ACCOUNTID_JSON_KEY_NAME: str = "AccountId" RESOURCE_MAPPING_ACCOUNTID_TEMPLATE_VALUE: str = "EMPTY" -_RESOURCE_MAPPING_ACCOUNTID_PATTERN: str = f"^[0-9]{{12}}|{RESOURCE_MAPPING_ACCOUNTID_TEMPLATE_VALUE}$" -_RESOURCE_MAPPING_REGION_PATTERN: str = "^[a-z]{2}-[a-z]{4,9}-[0-9]{1}$" -_RESOURCE_MAPPING_VERSION_PATTERN: str = "^[0-9]{1}.[0-9]{1}.[0-9]{1}$" + +# resource mapping json schema constants +_RESOURCE_MAPPING_SCHEMA_ACCOUNTID_KEY_NAME: str = "AccountIdString" +_RESOURCE_MAPPING_SCHEMA_REGION_KEY_NAME: str = "RegionString" +_RESOURCE_MAPPING_SCHEMA_REQUIRED_PROPERTIES_KEY_NAME: str = "required" +_RESOURCE_MAPPING_SCHEMA_PROPERTIES_KEY_NAME: str = "properties" +_RESOURCE_MAPPING_SCHEMA_PATTERN_PROPERTIES_KEY_NAME: str = "patternProperties" +_RESOURCE_MAPPING_SCHEMA_PROPERTY_PATTERN_KEY_NAME: str = "pattern" +_RESOURCE_MAPPING_SCHEMA: Dict[str, any] = {} +_RESOURCE_MAPPING_SCHEMA_REQUIRED_ROOT_PROPERTIES: List[str] = [] +_RESOURCE_MAPPING_SCHEMA_REQUIRED_RESOURCE_PROPERTIES: List[str] = [] +_RESOURCE_MAPPING_SCHEMA_ACCOUNTID_PATTERN: str = "" +_RESOURCE_MAPPING_SCHEMA_REGION_PATTERN: str = "" +_RESOURCE_MAPPING_SCHEMA_VERSION_PATTERN: str = "" def _add_validation_error_message(errors: Dict[int, List[str]], row: int, error_message: str) -> None: if row in errors.keys(): @@ -119,6 +130,26 @@ def convert_json_dict_to_resources(json_dict: Dict[str, any]) -> List[ResourceMa return resources +def load_resource_mapping_json_schema(schema_path: str) -> None: + global _RESOURCE_MAPPING_SCHEMA, _RESOURCE_MAPPING_SCHEMA_REQUIRED_ROOT_PROPERTIES, _RESOURCE_MAPPING_SCHEMA_REQUIRED_RESOURCE_PROPERTIES,\ + _RESOURCE_MAPPING_SCHEMA_ACCOUNTID_PATTERN, _RESOURCE_MAPPING_SCHEMA_REGION_PATTERN, _RESOURCE_MAPPING_SCHEMA_VERSION_PATTERN + + if not _RESOURCE_MAPPING_SCHEMA: + # assume schema should be in correct format, and manually load expected pattern; tool will log error if schema is invalid + _RESOURCE_MAPPING_SCHEMA = read_from_json_file(schema_path) + _RESOURCE_MAPPING_SCHEMA_REQUIRED_ROOT_PROPERTIES = _RESOURCE_MAPPING_SCHEMA[_RESOURCE_MAPPING_SCHEMA_REQUIRED_PROPERTIES_KEY_NAME] + schema_properties: Dict[str, any] = _RESOURCE_MAPPING_SCHEMA[_RESOURCE_MAPPING_SCHEMA_PROPERTIES_KEY_NAME] + schema_pattern_properties: Dict[str, any] = \ + schema_properties[_RESOURCE_MAPPING_JSON_KEY_NAME][_RESOURCE_MAPPING_SCHEMA_PATTERN_PROPERTIES_KEY_NAME] + _RESOURCE_MAPPING_SCHEMA_REQUIRED_RESOURCE_PROPERTIES = list(schema_pattern_properties.values())[0][_RESOURCE_MAPPING_SCHEMA_REQUIRED_PROPERTIES_KEY_NAME] + _RESOURCE_MAPPING_SCHEMA_ACCOUNTID_PATTERN = \ + _RESOURCE_MAPPING_SCHEMA[_RESOURCE_MAPPING_SCHEMA_ACCOUNTID_KEY_NAME][_RESOURCE_MAPPING_SCHEMA_PROPERTY_PATTERN_KEY_NAME] + _RESOURCE_MAPPING_SCHEMA_REGION_PATTERN = \ + _RESOURCE_MAPPING_SCHEMA[_RESOURCE_MAPPING_SCHEMA_REGION_KEY_NAME][_RESOURCE_MAPPING_SCHEMA_PROPERTY_PATTERN_KEY_NAME] + _RESOURCE_MAPPING_SCHEMA_VERSION_PATTERN = \ + schema_properties[_RESOURCE_MAPPING_VERSION_JSON_KEY_NAME][_RESOURCE_MAPPING_SCHEMA_PROPERTY_PATTERN_KEY_NAME] + + def read_from_json_file(file_name: str) -> Dict[str, any]: try: json_dict: Dict[str, any] = {} @@ -166,20 +197,20 @@ def validate_resources_according_to_json_schema(resources: List[ResourceMappingA invalid_resources, row_count, error_messages.INVALID_FORMAT_DUPLICATED_KEY_ERROR_MESSAGE.format(resource.key_name)) - if not re.match(_RESOURCE_MAPPING_ACCOUNTID_PATTERN, resource.account_id): + if not re.match(_RESOURCE_MAPPING_SCHEMA_ACCOUNTID_PATTERN, resource.account_id): _add_validation_error_message( invalid_resources, row_count, error_messages.INVALID_FORMAT_UNEXPECTED_VALUE_IN_TABLE_ERROR_MESSAGE.format( resource.account_id, RESOURCE_MAPPING_ACCOUNTID_JSON_KEY_NAME, - _RESOURCE_MAPPING_ACCOUNTID_PATTERN)) + _RESOURCE_MAPPING_SCHEMA_ACCOUNTID_PATTERN)) - if not re.match(_RESOURCE_MAPPING_REGION_PATTERN, resource.region): + if not re.match(_RESOURCE_MAPPING_SCHEMA_REGION_PATTERN, resource.region): _add_validation_error_message( invalid_resources, row_count, error_messages.INVALID_FORMAT_UNEXPECTED_VALUE_IN_TABLE_ERROR_MESSAGE.format( resource.region, _RESOURCE_MAPPING_REGION_JSON_KEY_NAME, - _RESOURCE_MAPPING_REGION_PATTERN)) + _RESOURCE_MAPPING_SCHEMA_REGION_PATTERN)) row_count += 1 @@ -187,30 +218,32 @@ def validate_resources_according_to_json_schema(resources: List[ResourceMappingA def validate_json_dict_according_to_json_schema(json_dict: Dict[str, any]) -> None: - _validate_required_key_in_json_dict(json_dict, "root", _RESOURCE_MAPPING_VERSION_JSON_KEY_NAME) - _validate_required_key_in_json_dict(json_dict, "root", _RESOURCE_MAPPING_JSON_KEY_NAME) + # The reason we keep this manual json schema validation is python missing supportive feature in default libs + # When it is ready, we should be able to replace this with straightforward lib function call + root_property: str + for root_property in _RESOURCE_MAPPING_SCHEMA_REQUIRED_ROOT_PROPERTIES: + _validate_required_key_in_json_dict(json_dict, "root", root_property) - _validate_required_key_in_json_dict(json_dict, "root", RESOURCE_MAPPING_ACCOUNTID_JSON_KEY_NAME) - if not re.match(_RESOURCE_MAPPING_ACCOUNTID_PATTERN, json_dict[RESOURCE_MAPPING_ACCOUNTID_JSON_KEY_NAME]): + if not re.match(_RESOURCE_MAPPING_SCHEMA_ACCOUNTID_PATTERN, json_dict[RESOURCE_MAPPING_ACCOUNTID_JSON_KEY_NAME]): raise ValueError(error_messages.INVALID_FORMAT_UNEXPECTED_VALUE_IN_FILE_ERROR_MESSAGE.format( json_dict[RESOURCE_MAPPING_ACCOUNTID_JSON_KEY_NAME], f"root/{RESOURCE_MAPPING_ACCOUNTID_JSON_KEY_NAME}", - _RESOURCE_MAPPING_ACCOUNTID_PATTERN)) + _RESOURCE_MAPPING_SCHEMA_ACCOUNTID_PATTERN)) - _validate_required_key_in_json_dict(json_dict, "root", _RESOURCE_MAPPING_REGION_JSON_KEY_NAME) - if not re.match(_RESOURCE_MAPPING_REGION_PATTERN, json_dict[_RESOURCE_MAPPING_REGION_JSON_KEY_NAME]): + if not re.match(_RESOURCE_MAPPING_SCHEMA_REGION_PATTERN, json_dict[_RESOURCE_MAPPING_REGION_JSON_KEY_NAME]): raise ValueError(error_messages.INVALID_FORMAT_UNEXPECTED_VALUE_IN_FILE_ERROR_MESSAGE.format( json_dict[_RESOURCE_MAPPING_REGION_JSON_KEY_NAME], f"root/{_RESOURCE_MAPPING_REGION_JSON_KEY_NAME}", - _RESOURCE_MAPPING_REGION_PATTERN)) + _RESOURCE_MAPPING_SCHEMA_REGION_PATTERN)) json_resources: Dict[str, any] = json_dict[_RESOURCE_MAPPING_JSON_KEY_NAME] if json_resources: resource_key: str resource_value: Dict[str, str] for resource_key, resource_value in json_resources.items(): - _validate_required_key_in_json_dict(resource_value, resource_key, _RESOURCE_MAPPING_TYPE_JSON_KEY_NAME) - _validate_required_key_in_json_dict(resource_value, resource_key, _RESOURCE_MAPPING_NAMEID_JSON_KEY_NAME) + resource_property: str + for resource_property in _RESOURCE_MAPPING_SCHEMA_REQUIRED_RESOURCE_PROPERTIES: + _validate_required_key_in_json_dict(resource_value, resource_key, resource_property) def write_into_json_file(file_name: str, json_dict: Dict[str, any]) -> None: diff --git a/Gems/AWSCore/Code/awscore_editor_files.cmake b/Gems/AWSCore/Code/awscore_editor_files.cmake index 44ba91a5d3..ebca45454e 100644 --- a/Gems/AWSCore/Code/awscore_editor_files.cmake +++ b/Gems/AWSCore/Code/awscore_editor_files.cmake @@ -7,25 +7,25 @@ # set(FILES - Include/Private/AWSCoreEditorSystemComponent.h - Include/Private/Editor/Attribution/AWSCoreAttributionConstant.h - Include/Private/Editor/Attribution/AWSCoreAttributionMetric.h - Include/Private/Editor/Attribution/AWSCoreAttributionManager.h - Include/Private/Editor/Attribution/AWSCoreAttributionSystemComponent.h - Include/Private/Editor/Attribution/AWSAttributionServiceApi.h - Include/Private/Editor/Attribution/AWSCoreAttributionConsentDialog.h - Include/Private/Editor/AWSCoreEditorManager.h - Include/Private/Editor/Constants/AWSCoreEditorMenuLinks.h - Include/Private/Editor/Constants/AWSCoreEditorMenuNames.h - Include/Private/Editor/UI/AWSCoreEditorMenu.h - Include/Private/Editor/UI/AWSCoreResourceMappingToolAction.h Source/AWSCoreEditorSystemComponent.cpp - Source/Editor/AWSCoreEditorManager.cpp + Source/AWSCoreEditorSystemComponent.h + Source/Editor/Attribution/AWSCoreAttributionConstant.h Source/Editor/Attribution/AWSCoreAttributionMetric.cpp + Source/Editor/Attribution/AWSCoreAttributionMetric.h Source/Editor/Attribution/AWSCoreAttributionManager.cpp + Source/Editor/Attribution/AWSCoreAttributionManager.h Source/Editor/Attribution/AWSCoreAttributionSystemComponent.cpp + Source/Editor/Attribution/AWSCoreAttributionSystemComponent.h Source/Editor/Attribution/AWSAttributionServiceApi.cpp + Source/Editor/Attribution/AWSAttributionServiceApi.h Source/Editor/Attribution/AWSCoreAttributionConsentDialog.cpp + Source/Editor/Attribution/AWSCoreAttributionConsentDialog.h + Source/Editor/AWSCoreEditorManager.cpp + Source/Editor/AWSCoreEditorManager.h + Source/Editor/Constants/AWSCoreEditorMenuLinks.h + Source/Editor/Constants/AWSCoreEditorMenuNames.h Source/Editor/UI/AWSCoreEditorMenu.cpp + Source/Editor/UI/AWSCoreEditorMenu.h Source/Editor/UI/AWSCoreResourceMappingToolAction.cpp + Source/Editor/UI/AWSCoreResourceMappingToolAction.h ) diff --git a/Gems/AWSCore/Code/awscore_editor_shared_files.cmake b/Gems/AWSCore/Code/awscore_editor_shared_files.cmake index b44a9ffcb1..8bf2abc7e0 100644 --- a/Gems/AWSCore/Code/awscore_editor_shared_files.cmake +++ b/Gems/AWSCore/Code/awscore_editor_shared_files.cmake @@ -7,6 +7,6 @@ # set(FILES - Include/Private/AWSCoreEditorModule.h Source/AWSCoreEditorModule.cpp + Source/AWSCoreEditorModule.h ) diff --git a/Gems/AWSCore/Code/awscore_files.cmake b/Gems/AWSCore/Code/awscore_files.cmake index 34c05891a7..9abc162f8a 100644 --- a/Gems/AWSCore/Code/awscore_files.cmake +++ b/Gems/AWSCore/Code/awscore_files.cmake @@ -7,50 +7,54 @@ # set(FILES - Include/Public/AWSCoreBus.h - Include/Public/Credential/AWSCredentialBus.h - Include/Public/Framework/AWSApiClientJob.h - Include/Public/Framework/AWSApiClientJobConfig.h - Include/Public/Framework/AWSApiJob.h - Include/Public/Framework/AWSApiJobConfig.h - Include/Public/Framework/AWSApiRequestJob.h - Include/Public/Framework/AWSApiRequestJobConfig.h - Include/Public/Framework/Error.h - Include/Public/Framework/HttpClientComponent.h - Include/Public/Framework/HttpRequestJob.h - Include/Public/Framework/HttpRequestJobConfig.h - Include/Public/Framework/JobExecuter.h - Include/Public/Framework/JsonObjectHandler.h - Include/Public/Framework/JsonWriter.h - Include/Public/Framework/MultipartFormData.h - Include/Public/Framework/RequestBuilder.h - Include/Public/Framework/ServiceClientJob.h - Include/Public/Framework/ServiceClientJobConfig.h - Include/Public/Framework/ServiceJob.h - Include/Public/Framework/ServiceJobConfig.h - Include/Public/Framework/ServiceJobUtil.h - Include/Public/Framework/ServiceRequestJob.h - Include/Public/Framework/ServiceRequestJobConfig.h - Include/Public/Framework/Util.h - Include/Public/ResourceMapping/AWSResourceMappingBus.h - Include/Public/ScriptCanvas/AWSScriptBehaviorDynamoDB.h - Include/Public/ScriptCanvas/AWSScriptBehaviorLambda.h - Include/Public/ScriptCanvas/AWSScriptBehaviorS3.h - Include/Public/ScriptCanvas/AWSScriptBehaviorsComponent.h - Include/Private/AWSCoreInternalBus.h - Include/Private/AWSCoreSystemComponent.h - Include/Private/Configuration/AWSCoreConfiguration.h - Include/Private/Credential/AWSCredentialManager.h - Include/Private/Credential/AWSCVarCredentialHandler.h - Include/Private/Credential/AWSDefaultCredentialHandler.h - Include/Private/ResourceMapping/AWSResourceMappingConstants.h - Include/Private/ResourceMapping/AWSResourceMappingManager.h - Include/Private/ResourceMapping/AWSResourceMappingUtils.h + Include/AWSCoreBus.h + Include/Credential/AWSCredentialBus.h + Include/Framework/AWSApiClientJob.h + Include/Framework/AWSApiClientJobConfig.h + Include/Framework/AWSApiJob.h + Include/Framework/AWSApiJobConfig.h + Include/Framework/AWSApiRequestJob.h + Include/Framework/AWSApiRequestJobConfig.h + Include/Framework/Error.h + Include/Framework/HttpClientComponent.h + Include/Framework/HttpRequestJob.h + Include/Framework/HttpRequestJobConfig.h + Include/Framework/JobExecuter.h + Include/Framework/JsonObjectHandler.h + Include/Framework/JsonWriter.h + Include/Framework/MultipartFormData.h + Include/Framework/RequestBuilder.h + Include/Framework/ServiceClientJob.h + Include/Framework/ServiceClientJobConfig.h + Include/Framework/ServiceJob.h + Include/Framework/ServiceJobConfig.h + Include/Framework/ServiceJobUtil.h + Include/Framework/ServiceRequestJob.h + Include/Framework/ServiceRequestJobConfig.h + Include/Framework/Util.h + Include/ResourceMapping/AWSResourceMappingBus.h + Include/ScriptCanvas/AWSScriptBehaviorDynamoDB.h + Include/ScriptCanvas/AWSScriptBehaviorLambda.h + Include/ScriptCanvas/AWSScriptBehaviorS3.h + Include/ScriptCanvas/AWSScriptBehaviorsComponent.h + + Source/AWSCoreInternalBus.h Source/AWSCoreSystemComponent.cpp + Source/AWSCoreSystemComponent.h Source/Configuration/AWSCoreConfiguration.cpp + Source/Configuration/AWSCoreConfiguration.h Source/Credential/AWSCredentialManager.cpp + Source/Credential/AWSCredentialManager.h Source/Credential/AWSCVarCredentialHandler.cpp + Source/Credential/AWSCVarCredentialHandler.h Source/Credential/AWSDefaultCredentialHandler.cpp + Source/Credential/AWSDefaultCredentialHandler.h + Source/ResourceMapping/AWSResourceMappingConstants.h + Source/ResourceMapping/AWSResourceMappingManager.cpp + Source/ResourceMapping/AWSResourceMappingManager.h + Source/ResourceMapping/AWSResourceMappingUtils.cpp + Source/ResourceMapping/AWSResourceMappingUtils.h + Source/Framework/AWSApiJob.cpp Source/Framework/AWSApiJobConfig.cpp Source/Framework/Error.cpp @@ -61,8 +65,6 @@ set(FILES Source/Framework/RequestBuilder.cpp Source/Framework/ServiceJob.cpp Source/Framework/ServiceJobConfig.cpp - Source/ResourceMapping/AWSResourceMappingManager.cpp - Source/ResourceMapping/AWSResourceMappingUtils.cpp Source/ScriptCanvas/AWSScriptBehaviorDynamoDB.cpp Source/ScriptCanvas/AWSScriptBehaviorLambda.cpp Source/ScriptCanvas/AWSScriptBehaviorS3.cpp diff --git a/Gems/AWSCore/Code/awscore_shared_files.cmake b/Gems/AWSCore/Code/awscore_shared_files.cmake index efe6966b26..4ce375b95a 100644 --- a/Gems/AWSCore/Code/awscore_shared_files.cmake +++ b/Gems/AWSCore/Code/awscore_shared_files.cmake @@ -7,6 +7,6 @@ # set(FILES - Include/Private/AWSCoreModule.h Source/AWSCoreModule.cpp + Source/AWSCoreModule.h ) diff --git a/Gems/AWSCore/cdk/README.md b/Gems/AWSCore/cdk/README.md index d50ca40279..644c22d36b 100644 --- a/Gems/AWSCore/cdk/README.md +++ b/Gems/AWSCore/cdk/README.md @@ -65,6 +65,22 @@ them to your `setup.py` file and rerun the `pip install -r requirements.txt` command. ## Optional Features + +Optional features are activated by passing [runtime context variables](https://docs.aws.amazon.com/cdk/latest/guide/context.html). To use multiple optional features together provide one key-value pair at a time: +``` +cdk synth --context key1=value1 --context key2=value2 MyStack +``` + +### Automatic S3 and DynamoDB Cleanup +The S3 bucket and Dynamodb created by the sample will be left behind as the CDK defaults to retaining such storage (both have default policies to retain resources on destroy). To delete +the storage resources created when using CDK destroy, use the following commands to synthesize and destroy the CDK application. +``` +cdk synth -c remove_all_storage_on_destroy=true --all +cdk deploy -c remove_all_storage_on_destroy=true --all +cdk destroy --all +``` + +### Server Access Logging Server access logging is enabled by default. To disable the feature, use the following commands to synthesize and deploy this CDK application. ``` diff --git a/Gems/AWSCore/cdk/core/core_stack.py b/Gems/AWSCore/cdk/core/core_stack.py index c124cb72ab..4124b7b566 100755 --- a/Gems/AWSCore/cdk/core/core_stack.py +++ b/Gems/AWSCore/cdk/core/core_stack.py @@ -86,13 +86,21 @@ class CoreStack(core.Stack): # Create an S3 bucket for Amazon S3 server access logging # See https://docs.aws.amazon.com/AmazonS3/latest/dev/security-best-practices.html if self.node.try_get_context('disable_access_log') != 'true': + + # Auto cleanup bucket and data if requested + _remove_storage = self.node.try_get_context('remove_all_storage_on_destroy') == 'true' + _removal_policy = core.RemovalPolicy.DESTROY if _remove_storage else core.RemovalPolicy.RETAIN + self._server_access_logs_bucket = s3.Bucket( self, f'{self._project_name}-{self._feature_name}-Access-Log-Bucket', + access_control=s3.BucketAccessControl.LOG_DELIVERY_WRITE, + auto_delete_objects = _remove_storage, block_public_access=s3.BlockPublicAccess.BLOCK_ALL, encryption=s3.BucketEncryption.S3_MANAGED, - access_control=s3.BucketAccessControl.LOG_DELIVERY_WRITE + removal_policy=_removal_policy ) + self._server_access_logs_bucket.grant_read(self._admin_group) # Export access log bucket name diff --git a/Gems/AWSCore/cdk/example/example_resources_stack.py b/Gems/AWSCore/cdk/example/example_resources_stack.py index ac229cb313..6a67ed9406 100755 --- a/Gems/AWSCore/cdk/example/example_resources_stack.py +++ b/Gems/AWSCore/cdk/example/example_resources_stack.py @@ -126,11 +126,17 @@ class ExampleResources(core.Stack): core.Fn.import_value(f"{self._project_name}:ServerAccessLogsBucket") ) + # Auto cleanup bucket and data if requested + _remove_storage = self.node.try_get_context('remove_all_storage_on_destroy') == 'true' + _removal_policy = core.RemovalPolicy.DESTROY if _remove_storage else core.RemovalPolicy.RETAIN + example_bucket = s3.Bucket( self, f'{self._project_name}-{self._feature_name}-Example-S3bucket', + auto_delete_objects=_remove_storage, block_public_access=s3.BlockPublicAccess.BLOCK_ALL, encryption=s3.BucketEncryption.S3_MANAGED, + removal_policy=_removal_policy, server_access_logs_bucket= server_access_logs_bucket if server_access_logs_bucket else None, server_access_logs_prefix= @@ -170,6 +176,11 @@ class ExampleResources(core.Stack): type=dynamo.AttributeType.STRING ) ) + + # Auto-delete the table when requested + if self.node.try_get_context('remove_all_storage_on_destroy') == 'true': + demo_table.apply_removal_policy(core.RemovalPolicy.DESTROY) + return demo_table def __create_outputs(self) -> None: diff --git a/Gems/AWSCore/gem.json b/Gems/AWSCore/gem.json index 1bb9da9192..3bced07e8d 100644 --- a/Gems/AWSCore/gem.json +++ b/Gems/AWSCore/gem.json @@ -2,6 +2,7 @@ "gem_name": "AWSCore", "display_name": "AWS Core", "license": "Apache-2.0 Or MIT", + "license_url": "https://github.com/o3de/o3de/blob/development/LICENSE.txt", "origin": "Amazon Web Services, Inc.", "type": "Code", "summary": "The AWS Core Gem provides basic shared AWS functionality such as AWS SDK initialization and client configuration, and is automatically added when selecting any AWS feature Gem.", @@ -14,7 +15,5 @@ "SDK" ], "icon_path": "preview.png", - "requirements": "", - "documentation_url": "https://o3de.org/docs/user-guide/gems/reference/aws/aws-core/", - "dependencies": [] + "documentation_url": "https://o3de.org/docs/user-guide/gems/reference/aws/aws-core/" } diff --git a/Gems/AWSGameLift/Code/AWSGameLiftClient/CMakeLists.txt b/Gems/AWSGameLift/Code/AWSGameLiftClient/CMakeLists.txt index 1fab09e9f4..ab85e89f75 100644 --- a/Gems/AWSGameLift/Code/AWSGameLiftClient/CMakeLists.txt +++ b/Gems/AWSGameLift/Code/AWSGameLiftClient/CMakeLists.txt @@ -6,8 +6,6 @@ # # -set(awsgameliftclient_compile_definition $,AWSGAMELIFT_RELEASE,AWSGAMELIFT_DEV>) - ly_add_target( NAME AWSGameLift.Client.Static STATIC NAMESPACE Gem diff --git a/Gems/AWSGameLift/Code/AWSGameLiftClient/Source/AWSGameLiftClientManager.cpp b/Gems/AWSGameLift/Code/AWSGameLiftClient/Source/AWSGameLiftClientManager.cpp index 4ee2d31ebf..f900310078 100644 --- a/Gems/AWSGameLift/Code/AWSGameLiftClient/Source/AWSGameLiftClientManager.cpp +++ b/Gems/AWSGameLift/Code/AWSGameLiftClient/Source/AWSGameLiftClientManager.cpp @@ -33,7 +33,7 @@ namespace AWSGameLift { -#if defined(AWSGAMELIFT_DEV) +#if defined(AZ_DEBUG_BUILD) || defined(AZ_PROFILE_BUILD) AZ_CVAR(AZ::CVarFixedString, cl_gameliftLocalEndpoint, "", nullptr, AZ::ConsoleFunctorFlags::Null, "The local endpoint to test with GameLiftLocal SDK."); #endif @@ -87,7 +87,7 @@ namespace AWSGameLift // Set up client endpoint or region AZStd::string localEndpoint = ""; -#if defined(AWSGAMELIFT_DEV) +#if defined(AZ_DEBUG_BUILD) || defined(AZ_PROFILE_BUILD) localEndpoint = static_cast(cl_gameliftLocalEndpoint); #endif if (!localEndpoint.empty()) @@ -139,7 +139,7 @@ namespace AWSGameLift { const AWSGameLiftAcceptMatchRequest& gameliftStartMatchmakingRequest = static_cast(acceptMatchRequest); - AcceptMatchHelper(gameliftStartMatchmakingRequest); + AcceptMatchActivity::AcceptMatch(gameliftStartMatchmakingRequest); } } @@ -157,9 +157,9 @@ namespace AWSGameLift AZ::JobContext* jobContext = nullptr; AWSCore::AWSCoreRequestBus::BroadcastResult(jobContext, &AWSCore::AWSCoreRequests::GetDefaultJobContext); AZ::Job* acceptMatchJob = AZ::CreateJobFunction( - [this, gameliftStartMatchmakingRequest]() + [gameliftStartMatchmakingRequest]() { - AcceptMatchHelper(gameliftStartMatchmakingRequest); + AcceptMatchActivity::AcceptMatch(gameliftStartMatchmakingRequest); AzFramework::MatchmakingAsyncRequestNotificationBus::Broadcast( &AzFramework::MatchmakingAsyncRequestNotifications::OnAcceptMatchAsyncComplete); @@ -169,21 +169,6 @@ namespace AWSGameLift acceptMatchJob->Start(); } - void AWSGameLiftClientManager::AcceptMatchHelper(const AWSGameLiftAcceptMatchRequest& acceptMatchRequest) - { - auto gameliftClient = AZ::Interface::Get()->GetGameLiftClient(); - - AZStd::string response; - if (!gameliftClient) - { - AZ_Error(AWSGameLiftClientManagerName, false, AWSGameLiftClientMissingErrorMessage); - } - else - { - AcceptMatchActivity::AcceptMatch(*gameliftClient, acceptMatchRequest); - } - } - AZStd::string AWSGameLiftClientManager::CreateSession(const AzFramework::CreateSessionRequest& createSessionRequest) { AZStd::string result = ""; @@ -191,13 +176,13 @@ namespace AWSGameLift { const AWSGameLiftCreateSessionRequest& gameliftCreateSessionRequest = static_cast(createSessionRequest); - result = CreateSessionHelper(gameliftCreateSessionRequest); + result = CreateSessionActivity::CreateSession(gameliftCreateSessionRequest); } else if (CreateSessionOnQueueActivity::ValidateCreateSessionOnQueueRequest(createSessionRequest)) { const AWSGameLiftCreateSessionOnQueueRequest& gameliftCreateSessionOnQueueRequest = static_cast(createSessionRequest); - result = CreateSessionOnQueueHelper(gameliftCreateSessionOnQueueRequest); + result = CreateSessionOnQueueActivity::CreateSessionOnQueue(gameliftCreateSessionOnQueueRequest); } else { @@ -217,9 +202,9 @@ namespace AWSGameLift AZ::JobContext* jobContext = nullptr; AWSCore::AWSCoreRequestBus::BroadcastResult(jobContext, &AWSCore::AWSCoreRequests::GetDefaultJobContext); AZ::Job* createSessionJob = AZ::CreateJobFunction( - [this, gameliftCreateSessionRequest]() + [gameliftCreateSessionRequest]() { - AZStd::string result = CreateSessionHelper(gameliftCreateSessionRequest); + AZStd::string result = CreateSessionActivity::CreateSession(gameliftCreateSessionRequest); AzFramework::SessionAsyncRequestNotificationBus::Broadcast( &AzFramework::SessionAsyncRequestNotifications::OnCreateSessionAsyncComplete, result); @@ -235,9 +220,9 @@ namespace AWSGameLift AZ::JobContext* jobContext = nullptr; AWSCore::AWSCoreRequestBus::BroadcastResult(jobContext, &AWSCore::AWSCoreRequests::GetDefaultJobContext); AZ::Job* createSessionOnQueueJob = AZ::CreateJobFunction( - [this, gameliftCreateSessionOnQueueRequest]() + [gameliftCreateSessionOnQueueRequest]() { - AZStd::string result = CreateSessionOnQueueHelper(gameliftCreateSessionOnQueueRequest); + AZStd::string result = CreateSessionOnQueueActivity::CreateSessionOnQueue(gameliftCreateSessionOnQueueRequest); AzFramework::SessionAsyncRequestNotificationBus::Broadcast( &AzFramework::SessionAsyncRequestNotifications::OnCreateSessionAsyncComplete, result); @@ -253,38 +238,6 @@ namespace AWSGameLift } } - AZStd::string AWSGameLiftClientManager::CreateSessionHelper( - const AWSGameLiftCreateSessionRequest& createSessionRequest) - { - auto gameliftClient = AZ::Interface::Get()->GetGameLiftClient(); - AZStd::string result = ""; - if (!gameliftClient) - { - AZ_Error(AWSGameLiftClientManagerName, false, AWSGameLiftClientMissingErrorMessage); - } - else - { - result = CreateSessionActivity::CreateSession(*gameliftClient, createSessionRequest); - } - return result; - } - - AZStd::string AWSGameLiftClientManager::CreateSessionOnQueueHelper( - const AWSGameLiftCreateSessionOnQueueRequest& createSessionOnQueueRequest) - { - auto gameliftClient = AZ::Interface::Get()->GetGameLiftClient(); - AZStd::string result; - if (!gameliftClient) - { - AZ_Error(AWSGameLiftClientManagerName, false, AWSGameLiftClientMissingErrorMessage); - } - else - { - result = CreateSessionOnQueueActivity::CreateSessionOnQueue(*gameliftClient, createSessionOnQueueRequest); - } - return result; - } - bool AWSGameLiftClientManager::JoinSession(const AzFramework::JoinSessionRequest& joinSessionRequest) { bool result = false; @@ -292,7 +245,8 @@ namespace AWSGameLift { const AWSGameLiftJoinSessionRequest& gameliftJoinSessionRequest = static_cast(joinSessionRequest); - result = JoinSessionHelper(gameliftJoinSessionRequest); + auto createPlayerSessionOutcome = JoinSessionActivity::CreatePlayerSession(gameliftJoinSessionRequest); + result = JoinSessionActivity::RequestPlayerJoinSession(createPlayerSessionOutcome); } return result; @@ -313,9 +267,10 @@ namespace AWSGameLift AZ::JobContext* jobContext = nullptr; AWSCore::AWSCoreRequestBus::BroadcastResult(jobContext, &AWSCore::AWSCoreRequests::GetDefaultJobContext); AZ::Job* joinSessionJob = AZ::CreateJobFunction( - [this, gameliftJoinSessionRequest]() + [gameliftJoinSessionRequest]() { - bool result = JoinSessionHelper(gameliftJoinSessionRequest); + auto createPlayerSessionOutcome = JoinSessionActivity::CreatePlayerSession(gameliftJoinSessionRequest); + bool result = JoinSessionActivity::RequestPlayerJoinSession(createPlayerSessionOutcome); AzFramework::SessionAsyncRequestNotificationBus::Broadcast( &AzFramework::SessionAsyncRequestNotifications::OnJoinSessionAsyncComplete, result); @@ -325,23 +280,6 @@ namespace AWSGameLift joinSessionJob->Start(); } - bool AWSGameLiftClientManager::JoinSessionHelper(const AWSGameLiftJoinSessionRequest& joinSessionRequest) - { - auto gameliftClient = AZ::Interface::Get()->GetGameLiftClient(); - bool result = false; - if (!gameliftClient) - { - AZ_Error(AWSGameLiftClientManagerName, false, AWSGameLiftClientMissingErrorMessage); - } - else - { - auto createPlayerSessionOutcome = JoinSessionActivity::CreatePlayerSession(*gameliftClient, joinSessionRequest); - - result = JoinSessionActivity::RequestPlayerJoinSession(createPlayerSessionOutcome); - } - return result; - } - void AWSGameLiftClientManager::LeaveSession() { AWSGameLift::LeaveSessionActivity::LeaveSession(); @@ -371,7 +309,7 @@ namespace AWSGameLift { const AWSGameLiftSearchSessionsRequest& gameliftSearchSessionsRequest = static_cast(searchSessionsRequest); - response = SearchSessionsHelper(gameliftSearchSessionsRequest); + response = SearchSessionsActivity::SearchSessions(gameliftSearchSessionsRequest); } return response; @@ -392,9 +330,9 @@ namespace AWSGameLift AZ::JobContext* jobContext = nullptr; AWSCore::AWSCoreRequestBus::BroadcastResult(jobContext, &AWSCore::AWSCoreRequests::GetDefaultJobContext); AZ::Job* searchSessionsJob = AZ::CreateJobFunction( - [this, gameliftSearchSessionsRequest]() + [gameliftSearchSessionsRequest]() { - AzFramework::SearchSessionsResponse response = SearchSessionsHelper(gameliftSearchSessionsRequest); + AzFramework::SearchSessionsResponse response = SearchSessionsActivity::SearchSessions(gameliftSearchSessionsRequest); AzFramework::SessionAsyncRequestNotificationBus::Broadcast( &AzFramework::SessionAsyncRequestNotifications::OnSearchSessionsAsyncComplete, response); @@ -404,22 +342,6 @@ namespace AWSGameLift searchSessionsJob->Start(); } - AzFramework::SearchSessionsResponse AWSGameLiftClientManager::SearchSessionsHelper( - const AWSGameLiftSearchSessionsRequest& searchSessionsRequest) const - { - auto gameliftClient = AZ::Interface::Get()->GetGameLiftClient(); - AzFramework::SearchSessionsResponse response; - if (!gameliftClient) - { - AZ_Error(AWSGameLiftClientManagerName, false, AWSGameLiftClientMissingErrorMessage); - } - else - { - response = SearchSessionsActivity::SearchSessions(*gameliftClient, searchSessionsRequest); - } - return response; - } - AZStd::string AWSGameLiftClientManager::StartMatchmaking(const AzFramework::StartMatchmakingRequest& startMatchmakingRequest) { AZStd::string response; @@ -427,7 +349,7 @@ namespace AWSGameLift { const AWSGameLiftStartMatchmakingRequest& gameliftStartMatchmakingRequest = static_cast(startMatchmakingRequest); - response = StartMatchmakingHelper(gameliftStartMatchmakingRequest); + response = StartMatchmakingActivity::StartMatchmaking(gameliftStartMatchmakingRequest); } return response; @@ -448,9 +370,9 @@ namespace AWSGameLift AZ::JobContext* jobContext = nullptr; AWSCore::AWSCoreRequestBus::BroadcastResult(jobContext, &AWSCore::AWSCoreRequests::GetDefaultJobContext); AZ::Job* startMatchmakingJob = AZ::CreateJobFunction( - [this, gameliftStartMatchmakingRequest]() + [gameliftStartMatchmakingRequest]() { - AZStd::string response = StartMatchmakingHelper(gameliftStartMatchmakingRequest); + AZStd::string response = StartMatchmakingActivity::StartMatchmaking(gameliftStartMatchmakingRequest); AzFramework::MatchmakingAsyncRequestNotificationBus::Broadcast( &AzFramework::MatchmakingAsyncRequestNotifications::OnStartMatchmakingAsyncComplete, response); @@ -460,29 +382,14 @@ namespace AWSGameLift startMatchmakingJob->Start(); } - AZStd::string AWSGameLiftClientManager::StartMatchmakingHelper(const AWSGameLiftStartMatchmakingRequest& startMatchmakingRequest) - { - auto gameliftClient = AZ::Interface::Get()->GetGameLiftClient(); - - AZStd::string response; - if (!gameliftClient) - { - AZ_Error(AWSGameLiftClientManagerName, false, AWSGameLiftClientMissingErrorMessage); - } - else - { - response = StartMatchmakingActivity::StartMatchmaking(*gameliftClient, startMatchmakingRequest); - } - return response; - } - void AWSGameLiftClientManager::StopMatchmaking(const AzFramework::StopMatchmakingRequest& stopMatchmakingRequest) { if (StopMatchmakingActivity::ValidateStopMatchmakingRequest(stopMatchmakingRequest)) { const AWSGameLiftStopMatchmakingRequest& gameliftStopMatchmakingRequest = static_cast(stopMatchmakingRequest); - StopMatchmakingHelper(gameliftStopMatchmakingRequest); + + StopMatchmakingActivity::StopMatchmaking(gameliftStopMatchmakingRequest); } } @@ -501,9 +408,9 @@ namespace AWSGameLift AZ::JobContext* jobContext = nullptr; AWSCore::AWSCoreRequestBus::BroadcastResult(jobContext, &AWSCore::AWSCoreRequests::GetDefaultJobContext); AZ::Job* stopMatchmakingJob = AZ::CreateJobFunction( - [this, gameliftStopMatchmakingRequest]() + [gameliftStopMatchmakingRequest]() { - StopMatchmakingHelper(gameliftStopMatchmakingRequest); + StopMatchmakingActivity::StopMatchmaking(gameliftStopMatchmakingRequest); AzFramework::MatchmakingAsyncRequestNotificationBus::Broadcast( &AzFramework::MatchmakingAsyncRequestNotifications::OnStopMatchmakingAsyncComplete); @@ -512,18 +419,4 @@ namespace AWSGameLift stopMatchmakingJob->Start(); } - - void AWSGameLiftClientManager::StopMatchmakingHelper(const AWSGameLiftStopMatchmakingRequest& stopMatchmakingRequest) - { - auto gameliftClient = AZ::Interface::Get()->GetGameLiftClient(); - - if (!gameliftClient) - { - AZ_Error(AWSGameLiftClientManagerName, false, AWSGameLiftClientMissingErrorMessage); - } - else - { - StopMatchmakingActivity::StopMatchmaking(*gameliftClient, stopMatchmakingRequest); - } - } } // namespace AWSGameLift diff --git a/Gems/AWSGameLift/Code/AWSGameLiftClient/Source/AWSGameLiftClientManager.h b/Gems/AWSGameLift/Code/AWSGameLiftClient/Source/AWSGameLiftClientManager.h index 8a0c91c36d..f37152bc60 100644 --- a/Gems/AWSGameLift/Code/AWSGameLiftClient/Source/AWSGameLiftClientManager.h +++ b/Gems/AWSGameLift/Code/AWSGameLiftClient/Source/AWSGameLiftClientManager.h @@ -175,14 +175,5 @@ namespace AWSGameLift bool JoinSession(const AzFramework::JoinSessionRequest& joinSessionRequest) override; AzFramework::SearchSessionsResponse SearchSessions(const AzFramework::SearchSessionsRequest& searchSessionsRequest) const override; void LeaveSession() override; - - private: - void AcceptMatchHelper(const AWSGameLiftAcceptMatchRequest& createSessionRequest); - AZStd::string CreateSessionHelper(const AWSGameLiftCreateSessionRequest& createSessionRequest); - AZStd::string CreateSessionOnQueueHelper(const AWSGameLiftCreateSessionOnQueueRequest& createSessionOnQueueRequest); - bool JoinSessionHelper(const AWSGameLiftJoinSessionRequest& joinSessionRequest); - AzFramework::SearchSessionsResponse SearchSessionsHelper(const AWSGameLiftSearchSessionsRequest& searchSessionsRequest) const; - AZStd::string StartMatchmakingHelper(const AWSGameLiftStartMatchmakingRequest& startMatchmakingRequest); - void StopMatchmakingHelper(const AWSGameLiftStopMatchmakingRequest& stopMatchmakingRequest); }; } // namespace AWSGameLift diff --git a/Gems/AWSGameLift/Code/AWSGameLiftClient/Source/Activity/AWSGameLiftAcceptMatchActivity.cpp b/Gems/AWSGameLift/Code/AWSGameLiftClient/Source/Activity/AWSGameLiftAcceptMatchActivity.cpp index 25ba328fd0..dbeced1728 100644 --- a/Gems/AWSGameLift/Code/AWSGameLiftClient/Source/Activity/AWSGameLiftAcceptMatchActivity.cpp +++ b/Gems/AWSGameLift/Code/AWSGameLiftClient/Source/Activity/AWSGameLiftAcceptMatchActivity.cpp @@ -7,9 +7,11 @@ */ #include +#include #include #include +#include #include #include @@ -42,13 +44,19 @@ namespace AWSGameLift return request; } - void AcceptMatch(const Aws::GameLift::GameLiftClient& gameliftClient, - const AWSGameLiftAcceptMatchRequest& AcceptMatchRequest) + void AcceptMatch(const AWSGameLiftAcceptMatchRequest& AcceptMatchRequest) { + auto gameliftClient = AZ::Interface::Get()->GetGameLiftClient(); + if (!gameliftClient) + { + AZ_Error(AWSGameLiftAcceptMatchActivityName, false, AWSGameLiftClientMissingErrorMessage); + return; + } + AZ_TracePrintf(AWSGameLiftAcceptMatchActivityName, "Requesting AcceptMatch against Amazon GameLift service ..."); Aws::GameLift::Model::AcceptMatchRequest request = BuildAWSGameLiftAcceptMatchRequest(AcceptMatchRequest); - auto AcceptMatchOutcome = gameliftClient.AcceptMatch(request); + auto AcceptMatchOutcome = gameliftClient->AcceptMatch(request); if (AcceptMatchOutcome.IsSuccess()) { diff --git a/Gems/AWSGameLift/Code/AWSGameLiftClient/Source/Activity/AWSGameLiftAcceptMatchActivity.h b/Gems/AWSGameLift/Code/AWSGameLiftClient/Source/Activity/AWSGameLiftAcceptMatchActivity.h index d5f28f92e2..ac4012c347 100644 --- a/Gems/AWSGameLift/Code/AWSGameLiftClient/Source/Activity/AWSGameLiftAcceptMatchActivity.h +++ b/Gems/AWSGameLift/Code/AWSGameLiftClient/Source/Activity/AWSGameLiftAcceptMatchActivity.h @@ -23,7 +23,7 @@ namespace AWSGameLift Aws::GameLift::Model::AcceptMatchRequest BuildAWSGameLiftAcceptMatchRequest(const AWSGameLiftAcceptMatchRequest& AcceptMatchRequest); // Create AcceptMatchRequest and make a AcceptMatch call through GameLift client - void AcceptMatch(const Aws::GameLift::GameLiftClient& gameliftClient, const AWSGameLiftAcceptMatchRequest& AcceptMatchRequest); + void AcceptMatch(const AWSGameLiftAcceptMatchRequest& AcceptMatchRequest); // Validate AcceptMatchRequest and check required request parameters bool ValidateAcceptMatchRequest(const AzFramework::AcceptMatchRequest& AcceptMatchRequest); diff --git a/Gems/AWSGameLift/Code/AWSGameLiftClient/Source/Activity/AWSGameLiftCreateSessionActivity.cpp b/Gems/AWSGameLift/Code/AWSGameLiftClient/Source/Activity/AWSGameLiftCreateSessionActivity.cpp index 0332ea7a76..ee93f022a1 100644 --- a/Gems/AWSGameLift/Code/AWSGameLiftClient/Source/Activity/AWSGameLiftCreateSessionActivity.cpp +++ b/Gems/AWSGameLift/Code/AWSGameLiftClient/Source/Activity/AWSGameLiftCreateSessionActivity.cpp @@ -6,9 +6,16 @@ * */ +#include +#include + #include #include #include +#include + +#include +#include namespace AWSGameLift { @@ -63,15 +70,21 @@ namespace AWSGameLift return request; } - AZStd::string CreateSession( - const Aws::GameLift::GameLiftClient& gameliftClient, - const AWSGameLiftCreateSessionRequest& createSessionRequest) + AZStd::string CreateSession(const AWSGameLiftCreateSessionRequest& createSessionRequest) { + AZStd::string result = ""; + + auto gameliftClient = AZ::Interface::Get()->GetGameLiftClient(); + if (!gameliftClient) + { + AZ_Error(AWSGameLiftCreateSessionActivityName, false, AWSGameLiftClientMissingErrorMessage); + return result; + } + AZ_TracePrintf(AWSGameLiftCreateSessionActivityName, "Requesting CreateGameSession against Amazon GameLift service ..."); - AZStd::string result = ""; Aws::GameLift::Model::CreateGameSessionRequest request = BuildAWSGameLiftCreateGameSessionRequest(createSessionRequest); - auto createSessionOutcome = gameliftClient.CreateGameSession(request); + auto createSessionOutcome = gameliftClient->CreateGameSession(request); AZ_TracePrintf(AWSGameLiftCreateSessionActivityName, "CreateGameSession request against Amazon GameLift service is complete"); if (createSessionOutcome.IsSuccess()) diff --git a/Gems/AWSGameLift/Code/AWSGameLiftClient/Source/Activity/AWSGameLiftCreateSessionActivity.h b/Gems/AWSGameLift/Code/AWSGameLiftClient/Source/Activity/AWSGameLiftCreateSessionActivity.h index 714675c652..af236dbfa4 100644 --- a/Gems/AWSGameLift/Code/AWSGameLiftClient/Source/Activity/AWSGameLiftCreateSessionActivity.h +++ b/Gems/AWSGameLift/Code/AWSGameLiftClient/Source/Activity/AWSGameLiftCreateSessionActivity.h @@ -10,9 +10,7 @@ #include -#include #include -#include namespace AWSGameLift { @@ -24,9 +22,7 @@ namespace AWSGameLift Aws::GameLift::Model::CreateGameSessionRequest BuildAWSGameLiftCreateGameSessionRequest(const AWSGameLiftCreateSessionRequest& createSessionRequest); // Create CreateGameSessionRequest and make a CreateGameSession call through GameLift client - AZStd::string CreateSession( - const Aws::GameLift::GameLiftClient& gameliftClient, - const AWSGameLiftCreateSessionRequest& createSessionRequest); + AZStd::string CreateSession(const AWSGameLiftCreateSessionRequest& createSessionRequest); // Validate CreateSessionRequest and check required request parameters bool ValidateCreateSessionRequest(const AzFramework::CreateSessionRequest& createSessionRequest); diff --git a/Gems/AWSGameLift/Code/AWSGameLiftClient/Source/Activity/AWSGameLiftCreateSessionOnQueueActivity.cpp b/Gems/AWSGameLift/Code/AWSGameLiftClient/Source/Activity/AWSGameLiftCreateSessionOnQueueActivity.cpp index 52be365ea5..8e8d7e23c5 100644 --- a/Gems/AWSGameLift/Code/AWSGameLiftClient/Source/Activity/AWSGameLiftCreateSessionOnQueueActivity.cpp +++ b/Gems/AWSGameLift/Code/AWSGameLiftClient/Source/Activity/AWSGameLiftCreateSessionOnQueueActivity.cpp @@ -6,9 +6,16 @@ * */ +#include +#include + #include #include #include +#include + +#include +#include namespace AWSGameLift { @@ -47,17 +54,23 @@ namespace AWSGameLift return request; } - AZStd::string CreateSessionOnQueue( - const Aws::GameLift::GameLiftClient& gameliftClient, - const AWSGameLiftCreateSessionOnQueueRequest& createSessionOnQueueRequest) + AZStd::string CreateSessionOnQueue(const AWSGameLiftCreateSessionOnQueueRequest& createSessionOnQueueRequest) { + AZStd::string result = ""; + + auto gameliftClient = AZ::Interface::Get()->GetGameLiftClient(); + if (!gameliftClient) + { + AZ_Error(AWSGameLiftCreateSessionOnQueueActivityName, false, AWSGameLiftClientMissingErrorMessage); + return result; + } + AZ_TracePrintf(AWSGameLiftCreateSessionOnQueueActivityName, "Requesting StartGameSessionPlacement against Amazon GameLift service ..."); - AZStd::string result = ""; Aws::GameLift::Model::StartGameSessionPlacementRequest request = BuildAWSGameLiftStartGameSessionPlacementRequest(createSessionOnQueueRequest); - auto createSessionOnQueueOutcome = gameliftClient.StartGameSessionPlacement(request); + auto createSessionOnQueueOutcome = gameliftClient->StartGameSessionPlacement(request); AZ_TracePrintf(AWSGameLiftCreateSessionOnQueueActivityName, "StartGameSessionPlacement request against Amazon GameLift service is complete."); diff --git a/Gems/AWSGameLift/Code/AWSGameLiftClient/Source/Activity/AWSGameLiftCreateSessionOnQueueActivity.h b/Gems/AWSGameLift/Code/AWSGameLiftClient/Source/Activity/AWSGameLiftCreateSessionOnQueueActivity.h index 714bcd1060..5f16bf0b31 100644 --- a/Gems/AWSGameLift/Code/AWSGameLiftClient/Source/Activity/AWSGameLiftCreateSessionOnQueueActivity.h +++ b/Gems/AWSGameLift/Code/AWSGameLiftClient/Source/Activity/AWSGameLiftCreateSessionOnQueueActivity.h @@ -10,9 +10,7 @@ #include -#include #include -#include namespace AWSGameLift { @@ -25,9 +23,7 @@ namespace AWSGameLift const AWSGameLiftCreateSessionOnQueueRequest& createSessionOnQueueRequest); // Create StartGameSessionPlacementRequest and make a CreateGameSession call through GameLift client - AZStd::string CreateSessionOnQueue( - const Aws::GameLift::GameLiftClient& gameliftClient, - const AWSGameLiftCreateSessionOnQueueRequest& createSessionOnQueueRequest); + AZStd::string CreateSessionOnQueue(const AWSGameLiftCreateSessionOnQueueRequest& createSessionOnQueueRequest); // Validate CreateSessionOnQueueRequest and check required request parameters bool ValidateCreateSessionOnQueueRequest(const AzFramework::CreateSessionRequest& createSessionRequest); diff --git a/Gems/AWSGameLift/Code/AWSGameLiftClient/Source/Activity/AWSGameLiftJoinSessionActivity.cpp b/Gems/AWSGameLift/Code/AWSGameLiftClient/Source/Activity/AWSGameLiftJoinSessionActivity.cpp index a47e59255f..71ef9e9737 100644 --- a/Gems/AWSGameLift/Code/AWSGameLiftClient/Source/Activity/AWSGameLiftJoinSessionActivity.cpp +++ b/Gems/AWSGameLift/Code/AWSGameLiftClient/Source/Activity/AWSGameLiftJoinSessionActivity.cpp @@ -7,10 +7,11 @@ */ #include -#include +#include #include #include +#include namespace AWSGameLift { @@ -59,16 +60,24 @@ namespace AWSGameLift } Aws::GameLift::Model::CreatePlayerSessionOutcome CreatePlayerSession( - const Aws::GameLift::GameLiftClient& gameliftClient, const AWSGameLiftJoinSessionRequest& joinSessionRequest) { + Aws::GameLift::Model::CreatePlayerSessionOutcome createPlayerSessionOutcome; + + auto gameliftClient = AZ::Interface::Get()->GetGameLiftClient(); + if (!gameliftClient) + { + AZ_Error(AWSGameLiftJoinSessionActivityName, false, AWSGameLiftClientMissingErrorMessage); + return createPlayerSessionOutcome; + } + AZ_TracePrintf(AWSGameLiftJoinSessionActivityName, "Requesting CreatePlayerSession for player %s against Amazon GameLift service ...", joinSessionRequest.m_playerId.c_str()); Aws::GameLift::Model::CreatePlayerSessionRequest request = BuildAWSGameLiftCreatePlayerSessionRequest(joinSessionRequest); - auto createPlayerSessionOutcome = gameliftClient.CreatePlayerSession(request); + createPlayerSessionOutcome = gameliftClient->CreatePlayerSession(request); AZ_TracePrintf(AWSGameLiftJoinSessionActivityName, "CreatePlayerSession request for player %s against Amazon GameLift service is complete", joinSessionRequest.m_playerId.c_str()); diff --git a/Gems/AWSGameLift/Code/AWSGameLiftClient/Source/Activity/AWSGameLiftJoinSessionActivity.h b/Gems/AWSGameLift/Code/AWSGameLiftClient/Source/Activity/AWSGameLiftJoinSessionActivity.h index fe34e5fe57..b011f4877b 100644 --- a/Gems/AWSGameLift/Code/AWSGameLiftClient/Source/Activity/AWSGameLiftJoinSessionActivity.h +++ b/Gems/AWSGameLift/Code/AWSGameLiftClient/Source/Activity/AWSGameLiftJoinSessionActivity.h @@ -36,7 +36,6 @@ namespace AWSGameLift // Create CreatePlayerSessionRequest and make a CreatePlayerSession call through GameLift client Aws::GameLift::Model::CreatePlayerSessionOutcome CreatePlayerSession( - const Aws::GameLift::GameLiftClient& gameliftClient, const AWSGameLiftJoinSessionRequest& joinSessionRequest); // Request to setup networking connection for player diff --git a/Gems/AWSGameLift/Code/AWSGameLiftClient/Source/Activity/AWSGameLiftLeaveSessionActivity.cpp b/Gems/AWSGameLift/Code/AWSGameLiftClient/Source/Activity/AWSGameLiftLeaveSessionActivity.cpp index a99fed4edc..fd3b3d6ebc 100644 --- a/Gems/AWSGameLift/Code/AWSGameLiftClient/Source/Activity/AWSGameLiftLeaveSessionActivity.cpp +++ b/Gems/AWSGameLift/Code/AWSGameLiftClient/Source/Activity/AWSGameLiftLeaveSessionActivity.cpp @@ -6,11 +6,12 @@ * */ -#include - #include +#include #include +#include + namespace AWSGameLift { namespace LeaveSessionActivity diff --git a/Gems/AWSGameLift/Code/AWSGameLiftClient/Source/Activity/AWSGameLiftSearchSessionsActivity.cpp b/Gems/AWSGameLift/Code/AWSGameLiftClient/Source/Activity/AWSGameLiftSearchSessionsActivity.cpp index 5f0b6fd012..b7917e6d59 100644 --- a/Gems/AWSGameLift/Code/AWSGameLiftClient/Source/Activity/AWSGameLiftSearchSessionsActivity.cpp +++ b/Gems/AWSGameLift/Code/AWSGameLiftClient/Source/Activity/AWSGameLiftSearchSessionsActivity.cpp @@ -6,10 +6,16 @@ * */ +#include +#include #include #include #include +#include + +#include +#include namespace AWSGameLift { @@ -62,14 +68,21 @@ namespace AWSGameLift } AzFramework::SearchSessionsResponse SearchSessions( - const Aws::GameLift::GameLiftClient& gameliftClient, const AWSGameLiftSearchSessionsRequest& searchSessionsRequest) { + AzFramework::SearchSessionsResponse response; + + auto gameliftClient = AZ::Interface::Get()->GetGameLiftClient(); + if (!gameliftClient) + { + AZ_Error(AWSGameLiftSearchSessionsActivityName, false, AWSGameLiftClientMissingErrorMessage); + return response; + } + AZ_TracePrintf(AWSGameLiftSearchSessionsActivityName, "Requesting SearchGameSessions against Amazon GameLift service ..."); - AzFramework::SearchSessionsResponse response; Aws::GameLift::Model::SearchGameSessionsRequest request = BuildAWSGameLiftSearchGameSessionsRequest(searchSessionsRequest); - Aws::GameLift::Model::SearchGameSessionsOutcome outcome = gameliftClient.SearchGameSessions(request); + Aws::GameLift::Model::SearchGameSessionsOutcome outcome = gameliftClient->SearchGameSessions(request); AZ_TracePrintf(AWSGameLiftSearchSessionsActivityName, "SearchGameSessions request against Amazon GameLift service is complete"); if (outcome.IsSuccess()) diff --git a/Gems/AWSGameLift/Code/AWSGameLiftClient/Source/Activity/AWSGameLiftSearchSessionsActivity.h b/Gems/AWSGameLift/Code/AWSGameLiftClient/Source/Activity/AWSGameLiftSearchSessionsActivity.h index 205e83dd96..d5bcda992c 100644 --- a/Gems/AWSGameLift/Code/AWSGameLiftClient/Source/Activity/AWSGameLiftSearchSessionsActivity.h +++ b/Gems/AWSGameLift/Code/AWSGameLiftClient/Source/Activity/AWSGameLiftSearchSessionsActivity.h @@ -10,9 +10,7 @@ #include -#include #include -#include namespace AWSGameLift { @@ -28,7 +26,6 @@ namespace AWSGameLift // Create SearchGameSessionsRequest and make a SeachGameSessions call through GameLift client AzFramework::SearchSessionsResponse SearchSessions( - const Aws::GameLift::GameLiftClient& gameliftClient, const AWSGameLiftSearchSessionsRequest& searchSessionsRequest); // Convert from Aws::GameLift::Model::SearchGameSessionsResult to AzFramework::SearchSessionsResponse. diff --git a/Gems/AWSGameLift/Code/AWSGameLiftClient/Source/Activity/AWSGameLiftStartMatchmakingActivity.cpp b/Gems/AWSGameLift/Code/AWSGameLiftClient/Source/Activity/AWSGameLiftStartMatchmakingActivity.cpp index 00a7773491..6f6c7fccc0 100644 --- a/Gems/AWSGameLift/Code/AWSGameLiftClient/Source/Activity/AWSGameLiftStartMatchmakingActivity.cpp +++ b/Gems/AWSGameLift/Code/AWSGameLiftClient/Source/Activity/AWSGameLiftStartMatchmakingActivity.cpp @@ -7,11 +7,13 @@ */ #include +#include #include #include #include #include +#include #include #include @@ -78,14 +80,21 @@ namespace AWSGameLift } AZStd::string StartMatchmaking( - const Aws::GameLift::GameLiftClient& gameliftClient, const AWSGameLiftStartMatchmakingRequest& startMatchmakingRequest) { + AZStd::string result = ""; + + auto gameliftClient = AZ::Interface::Get()->GetGameLiftClient(); + if (!gameliftClient) + { + AZ_Error(AWSGameLiftStartMatchmakingActivityName, false, AWSGameLiftClientMissingErrorMessage); + return result; + } + AZ_TracePrintf(AWSGameLiftStartMatchmakingActivityName, "Requesting StartMatchmaking against Amazon GameLift service ..."); - AZStd::string result = ""; Aws::GameLift::Model::StartMatchmakingRequest request = BuildAWSGameLiftStartMatchmakingRequest(startMatchmakingRequest); - auto startMatchmakingOutcome = gameliftClient.StartMatchmaking(request); + auto startMatchmakingOutcome = gameliftClient->StartMatchmaking(request); if (startMatchmakingOutcome.IsSuccess()) { result = AZStd::string(startMatchmakingOutcome.GetResult().GetMatchmakingTicket().GetTicketId().c_str()); diff --git a/Gems/AWSGameLift/Code/AWSGameLiftClient/Source/Activity/AWSGameLiftStartMatchmakingActivity.h b/Gems/AWSGameLift/Code/AWSGameLiftClient/Source/Activity/AWSGameLiftStartMatchmakingActivity.h index db814c14b2..f736e318fb 100644 --- a/Gems/AWSGameLift/Code/AWSGameLiftClient/Source/Activity/AWSGameLiftStartMatchmakingActivity.h +++ b/Gems/AWSGameLift/Code/AWSGameLiftClient/Source/Activity/AWSGameLiftStartMatchmakingActivity.h @@ -23,7 +23,7 @@ namespace AWSGameLift Aws::GameLift::Model::StartMatchmakingRequest BuildAWSGameLiftStartMatchmakingRequest(const AWSGameLiftStartMatchmakingRequest& startMatchmakingRequest); // Create StartMatchmakingRequest and make a StartMatchmaking call through GameLift client - AZStd::string StartMatchmaking(const Aws::GameLift::GameLiftClient& gameliftClient, const AWSGameLiftStartMatchmakingRequest& startMatchmakingRequest); + AZStd::string StartMatchmaking(const AWSGameLiftStartMatchmakingRequest& startMatchmakingRequest); // Validate StartMatchmakingRequest and check required request parameters bool ValidateStartMatchmakingRequest(const AzFramework::StartMatchmakingRequest& startMatchmakingRequest); diff --git a/Gems/AWSGameLift/Code/AWSGameLiftClient/Source/Activity/AWSGameLiftStopMatchmakingActivity.cpp b/Gems/AWSGameLift/Code/AWSGameLiftClient/Source/Activity/AWSGameLiftStopMatchmakingActivity.cpp index b427d0323a..022861570a 100644 --- a/Gems/AWSGameLift/Code/AWSGameLiftClient/Source/Activity/AWSGameLiftStopMatchmakingActivity.cpp +++ b/Gems/AWSGameLift/Code/AWSGameLiftClient/Source/Activity/AWSGameLiftStopMatchmakingActivity.cpp @@ -7,9 +7,11 @@ */ #include +#include #include #include +#include #include #include @@ -32,13 +34,19 @@ namespace AWSGameLift return request; } - void StopMatchmaking(const Aws::GameLift::GameLiftClient& gameliftClient, - const AWSGameLiftStopMatchmakingRequest& stopMatchmakingRequest) + void StopMatchmaking(const AWSGameLiftStopMatchmakingRequest& stopMatchmakingRequest) { + auto gameliftClient = AZ::Interface::Get()->GetGameLiftClient(); + if (!gameliftClient) + { + AZ_Error(AWSGameLiftStopMatchmakingActivityName, false, AWSGameLiftClientMissingErrorMessage); + return; + } + AZ_TracePrintf(AWSGameLiftStopMatchmakingActivityName, "Requesting StopMatchmaking against Amazon GameLift service ..."); Aws::GameLift::Model::StopMatchmakingRequest request = BuildAWSGameLiftStopMatchmakingRequest(stopMatchmakingRequest); - auto stopMatchmakingOutcome = gameliftClient.StopMatchmaking(request); + auto stopMatchmakingOutcome = gameliftClient->StopMatchmaking(request); if (stopMatchmakingOutcome.IsSuccess()) { diff --git a/Gems/AWSGameLift/Code/AWSGameLiftClient/Source/Activity/AWSGameLiftStopMatchmakingActivity.h b/Gems/AWSGameLift/Code/AWSGameLiftClient/Source/Activity/AWSGameLiftStopMatchmakingActivity.h index 0820f2c05e..b5f19d35df 100644 --- a/Gems/AWSGameLift/Code/AWSGameLiftClient/Source/Activity/AWSGameLiftStopMatchmakingActivity.h +++ b/Gems/AWSGameLift/Code/AWSGameLiftClient/Source/Activity/AWSGameLiftStopMatchmakingActivity.h @@ -23,7 +23,7 @@ namespace AWSGameLift Aws::GameLift::Model::StopMatchmakingRequest BuildAWSGameLiftStopMatchmakingRequest(const AWSGameLiftStopMatchmakingRequest& stopMatchmakingRequest); // Create StopMatchmakingRequest and make a StopMatchmaking call through GameLift client - void StopMatchmaking(const Aws::GameLift::GameLiftClient& gameliftClient, const AWSGameLiftStopMatchmakingRequest& stopMatchmakingRequest); + void StopMatchmaking(const AWSGameLiftStopMatchmakingRequest& stopMatchmakingRequest); // Validate StopMatchmakingRequest and check required request parameters bool ValidateStopMatchmakingRequest(const AzFramework::StopMatchmakingRequest& stopMatchmakingRequest); diff --git a/Gems/AWSGameLift/Code/AWSGameLiftClient/Tests/Activity/AWSGameLiftCreateSessionActivityTest.cpp b/Gems/AWSGameLift/Code/AWSGameLiftClient/Tests/Activity/AWSGameLiftCreateSessionActivityTest.cpp index 70dcdba1af..fcf867138b 100644 --- a/Gems/AWSGameLift/Code/AWSGameLiftClient/Tests/Activity/AWSGameLiftCreateSessionActivityTest.cpp +++ b/Gems/AWSGameLift/Code/AWSGameLiftClient/Tests/Activity/AWSGameLiftCreateSessionActivityTest.cpp @@ -9,6 +9,8 @@ #include #include +#include + using namespace AWSGameLift; using AWSGameLiftCreateSessionActivityTest = AWSGameLiftClientFixture; diff --git a/Gems/AWSGameLift/Code/AWSGameLiftClient/Tests/Activity/AWSGameLiftCreateSessionOnQueueActivityTest.cpp b/Gems/AWSGameLift/Code/AWSGameLiftClient/Tests/Activity/AWSGameLiftCreateSessionOnQueueActivityTest.cpp index 8a785d8007..4845586e47 100644 --- a/Gems/AWSGameLift/Code/AWSGameLiftClient/Tests/Activity/AWSGameLiftCreateSessionOnQueueActivityTest.cpp +++ b/Gems/AWSGameLift/Code/AWSGameLiftClient/Tests/Activity/AWSGameLiftCreateSessionOnQueueActivityTest.cpp @@ -9,6 +9,8 @@ #include #include +#include + using namespace AWSGameLift; using AWSGameLiftCreateSessionOnQueueActivityTest = AWSGameLiftClientFixture; diff --git a/Gems/AWSGameLift/Code/AWSGameLiftClient/Tests/Activity/AWSGameLiftJoinSessionActivityTest.cpp b/Gems/AWSGameLift/Code/AWSGameLiftClient/Tests/Activity/AWSGameLiftJoinSessionActivityTest.cpp index 6a1156646a..33b03649c7 100644 --- a/Gems/AWSGameLift/Code/AWSGameLiftClient/Tests/Activity/AWSGameLiftJoinSessionActivityTest.cpp +++ b/Gems/AWSGameLift/Code/AWSGameLiftClient/Tests/Activity/AWSGameLiftJoinSessionActivityTest.cpp @@ -6,6 +6,8 @@ * */ +#include + #include #include diff --git a/Gems/AWSGameLift/Code/AWSGameLiftClient/Tests/Activity/AWSGameLiftSearchSessionsActivityTest.cpp b/Gems/AWSGameLift/Code/AWSGameLiftClient/Tests/Activity/AWSGameLiftSearchSessionsActivityTest.cpp index 3337c2f6d2..0d3c8c137b 100644 --- a/Gems/AWSGameLift/Code/AWSGameLiftClient/Tests/Activity/AWSGameLiftSearchSessionsActivityTest.cpp +++ b/Gems/AWSGameLift/Code/AWSGameLiftClient/Tests/Activity/AWSGameLiftSearchSessionsActivityTest.cpp @@ -12,6 +12,9 @@ #include #include +#include +#include + using namespace AWSGameLift; using AWSGameLiftSearchSessionsActivityTest = AWSGameLiftClientFixture; diff --git a/Gems/AWSGameLift/cdk/aws_gamelift/fleet_configurations.py b/Gems/AWSGameLift/cdk/aws_gamelift/fleet_configurations.py index 59f763498f..72c9d8ea43 100644 --- a/Gems/AWSGameLift/cdk/aws_gamelift/fleet_configurations.py +++ b/Gems/AWSGameLift/cdk/aws_gamelift/fleet_configurations.py @@ -44,7 +44,7 @@ FLEET_CONFIGURATIONS = [ 'build_path': '', # (Conditional) The operating system that the game server binaries are built to run on. # This parameter is required if the parameter build_path is defined. - # Choose from AMAZON_LINUX, AMAZON_LINUX or WINDOWS_2012. + # Choose from AMAZON_LINUX or WINDOWS_2012. 'operating_system': 'WINDOWS_2012' }, # (Optional) Information about the use of a TLS/SSL certificate for a fleet. diff --git a/Gems/AWSGameLift/gem.json b/Gems/AWSGameLift/gem.json index a0d7f62cd1..1ac65c4526 100644 --- a/Gems/AWSGameLift/gem.json +++ b/Gems/AWSGameLift/gem.json @@ -2,6 +2,7 @@ "gem_name": "AWSGameLift", "display_name": "AWS GameLift", "license": "Apache-2.0 Or MIT", + "license_url": "https://github.com/o3de/o3de/blob/development/LICENSE.txt", "origin": "Amazon Web Services, Inc.", "type": "Code", "summary": "The AWS GameLift Gem provides a framework to extend O3DE networking layer to work with GameLift resources via GameLift server and client SDK.", @@ -11,10 +12,11 @@ "user_tags": [ "AWS", "Framework", - "Network" + "Network", + "SDK" ], "icon_path": "preview.png", - "requirements": "", + "requirements": "Users will need to enable the Multiplayer gem to support the AWSGameLift feature.", "documentation_url": "https://o3de.org/docs/user-guide/gems/reference/aws/aws-gamelift/", "dependencies": [ "AWSCore" diff --git a/Gems/AWSMetrics/Code/CMakeLists.txt b/Gems/AWSMetrics/Code/CMakeLists.txt index 2e78ee8c42..1da4e7f96f 100644 --- a/Gems/AWSMetrics/Code/CMakeLists.txt +++ b/Gems/AWSMetrics/Code/CMakeLists.txt @@ -13,9 +13,9 @@ ly_add_target( awsmetrics_files.cmake INCLUDE_DIRECTORIES PUBLIC - Include/Public + Include PRIVATE - Include/Private + Source BUILD_DEPENDENCIES PRIVATE AZ::AzCore @@ -32,9 +32,9 @@ ly_add_target( awsmetrics_shared_files.cmake INCLUDE_DIRECTORIES PUBLIC - Include/Public + Include PRIVATE - Include/Private + Source BUILD_DEPENDENCIES PRIVATE AZ::AzCore @@ -88,8 +88,8 @@ if(PAL_TRAIT_BUILD_TESTS_SUPPORTED) awsmetrics_tests_files.cmake INCLUDE_DIRECTORIES PRIVATE - Include/Private - Include/Public + Include + Source Tests BUILD_DEPENDENCIES PRIVATE diff --git a/Gems/AWSMetrics/Code/Include/Public/AWSMetricsBus.h b/Gems/AWSMetrics/Code/Include/AWSMetricsBus.h similarity index 100% rename from Gems/AWSMetrics/Code/Include/Public/AWSMetricsBus.h rename to Gems/AWSMetrics/Code/Include/AWSMetricsBus.h diff --git a/Gems/AWSMetrics/Code/Include/Private/MetricsAttribute.h b/Gems/AWSMetrics/Code/Include/MetricsAttribute.h similarity index 100% rename from Gems/AWSMetrics/Code/Include/Private/MetricsAttribute.h rename to Gems/AWSMetrics/Code/Include/MetricsAttribute.h diff --git a/Gems/AWSMetrics/Code/Include/Private/AWSMetricsConstant.h b/Gems/AWSMetrics/Code/Source/AWSMetricsConstant.h similarity index 100% rename from Gems/AWSMetrics/Code/Include/Private/AWSMetricsConstant.h rename to Gems/AWSMetrics/Code/Source/AWSMetricsConstant.h diff --git a/Gems/AWSMetrics/Code/Include/Private/AWSMetricsModule.h b/Gems/AWSMetrics/Code/Source/AWSMetricsModule.h similarity index 100% rename from Gems/AWSMetrics/Code/Include/Private/AWSMetricsModule.h rename to Gems/AWSMetrics/Code/Source/AWSMetricsModule.h diff --git a/Gems/AWSMetrics/Code/Include/Private/AWSMetricsServiceApi.h b/Gems/AWSMetrics/Code/Source/AWSMetricsServiceApi.h similarity index 100% rename from Gems/AWSMetrics/Code/Include/Private/AWSMetricsServiceApi.h rename to Gems/AWSMetrics/Code/Source/AWSMetricsServiceApi.h diff --git a/Gems/AWSMetrics/Code/Include/Private/AWSMetricsSystemComponent.h b/Gems/AWSMetrics/Code/Source/AWSMetricsSystemComponent.h similarity index 100% rename from Gems/AWSMetrics/Code/Include/Private/AWSMetricsSystemComponent.h rename to Gems/AWSMetrics/Code/Source/AWSMetricsSystemComponent.h diff --git a/Gems/AWSMetrics/Code/Include/Private/ClientConfiguration.h b/Gems/AWSMetrics/Code/Source/ClientConfiguration.h similarity index 100% rename from Gems/AWSMetrics/Code/Include/Private/ClientConfiguration.h rename to Gems/AWSMetrics/Code/Source/ClientConfiguration.h diff --git a/Gems/AWSMetrics/Code/Include/Private/DefaultClientIdProvider.h b/Gems/AWSMetrics/Code/Source/DefaultClientIdProvider.h similarity index 100% rename from Gems/AWSMetrics/Code/Include/Private/DefaultClientIdProvider.h rename to Gems/AWSMetrics/Code/Source/DefaultClientIdProvider.h diff --git a/Gems/AWSMetrics/Code/Include/Private/GlobalStatistics.h b/Gems/AWSMetrics/Code/Source/GlobalStatistics.h similarity index 100% rename from Gems/AWSMetrics/Code/Include/Private/GlobalStatistics.h rename to Gems/AWSMetrics/Code/Source/GlobalStatistics.h diff --git a/Gems/AWSMetrics/Code/Include/Private/IdentityProvider.h b/Gems/AWSMetrics/Code/Source/IdentityProvider.h similarity index 100% rename from Gems/AWSMetrics/Code/Include/Private/IdentityProvider.h rename to Gems/AWSMetrics/Code/Source/IdentityProvider.h diff --git a/Gems/AWSMetrics/Code/Include/Private/MetricsEvent.h b/Gems/AWSMetrics/Code/Source/MetricsEvent.h similarity index 100% rename from Gems/AWSMetrics/Code/Include/Private/MetricsEvent.h rename to Gems/AWSMetrics/Code/Source/MetricsEvent.h diff --git a/Gems/AWSMetrics/Code/Include/Private/MetricsEventBuilder.h b/Gems/AWSMetrics/Code/Source/MetricsEventBuilder.h similarity index 100% rename from Gems/AWSMetrics/Code/Include/Private/MetricsEventBuilder.h rename to Gems/AWSMetrics/Code/Source/MetricsEventBuilder.h diff --git a/Gems/AWSMetrics/Code/Include/Private/MetricsManager.h b/Gems/AWSMetrics/Code/Source/MetricsManager.h similarity index 100% rename from Gems/AWSMetrics/Code/Include/Private/MetricsManager.h rename to Gems/AWSMetrics/Code/Source/MetricsManager.h diff --git a/Gems/AWSMetrics/Code/Include/Private/MetricsQueue.h b/Gems/AWSMetrics/Code/Source/MetricsQueue.h similarity index 100% rename from Gems/AWSMetrics/Code/Include/Private/MetricsQueue.h rename to Gems/AWSMetrics/Code/Source/MetricsQueue.h diff --git a/Gems/AWSMetrics/Code/Tests/AWSMetricsServiceApiTest.cpp b/Gems/AWSMetrics/Code/Tests/AWSMetricsServiceApiTest.cpp index 8844e727b6..b7e7527b20 100644 --- a/Gems/AWSMetrics/Code/Tests/AWSMetricsServiceApiTest.cpp +++ b/Gems/AWSMetrics/Code/Tests/AWSMetricsServiceApiTest.cpp @@ -100,11 +100,10 @@ namespace AWSMetrics AWSCore::RequestBuilder requestBuilder{}; EXPECT_TRUE(request.parameters.BuildRequest(requestBuilder)); std::shared_ptr bodyContent = requestBuilder.GetBodyContent(); - EXPECT_TRUE(bodyContent != nullptr); + ASSERT_NE(nullptr, bodyContent); - AZStd::string bodyString; std::istreambuf_iterator eos; - bodyString = AZStd::string{ std::istreambuf_iterator(*bodyContent), eos }; - EXPECT_TRUE(bodyString.find(AZStd::string::format("{\"%s\":[{\"event_timestamp\":", AwsMetricsRequestParameterKeyEvents)) != AZStd::string::npos); + AZStd::string bodyString{ std::istreambuf_iterator(*bodyContent), eos }; + EXPECT_TRUE(bodyString.contains(AZStd::string::format("{\"%s\":[{\"event_timestamp\":", AwsMetricsRequestParameterKeyEvents))); } } diff --git a/Gems/AWSMetrics/Code/awsmetrics_files.cmake b/Gems/AWSMetrics/Code/awsmetrics_files.cmake index b51235c957..936c5634e1 100644 --- a/Gems/AWSMetrics/Code/awsmetrics_files.cmake +++ b/Gems/AWSMetrics/Code/awsmetrics_files.cmake @@ -7,27 +7,28 @@ # set(FILES - Include/Public/AWSMetricsBus.h - Include/Private/AWSMetricsConstant.h - Include/Private/AWSMetricsServiceApi.h - Include/Private/AWSMetricsSystemComponent.h - Include/Private/ClientConfiguration.h - Include/Private/DefaultClientIdProvider.h - Include/Private/GlobalStatistics.h - Include/Private/IdentityProvider.h - Include/Private/MetricsAttribute.h - Include/Private/MetricsEvent.h - Include/Private/MetricsEventBuilder.h - Include/Private/MetricsManager.h - Include/Private/MetricsQueue.h - Source/ClientConfiguration.cpp - Source/DefaultClientIdProvider.cpp + Include/AWSMetricsBus.h + Include/MetricsAttribute.h + + Source/AWSMetricsConstant.h Source/AWSMetricsServiceApi.cpp + Source/AWSMetricsServiceApi.h Source/AWSMetricsSystemComponent.cpp + Source/AWSMetricsSystemComponent.h + Source/ClientConfiguration.cpp + Source/ClientConfiguration.h + Source/DefaultClientIdProvider.h + Source/DefaultClientIdProvider.cpp + Source/GlobalStatistics.h Source/IdentityProvider.cpp - Source/MetricsEvent.cpp - Source/MetricsEventBuilder.cpp + Source/IdentityProvider.h Source/MetricsAttribute.cpp + Source/MetricsEvent.cpp + Source/MetricsEvent.h + Source/MetricsEventBuilder.cpp + Source/MetricsEventBuilder.h Source/MetricsManager.cpp + Source/MetricsManager.h Source/MetricsQueue.cpp + Source/MetricsQueue.h ) diff --git a/Gems/AWSMetrics/Code/awsmetrics_shared_files.cmake b/Gems/AWSMetrics/Code/awsmetrics_shared_files.cmake index 3366363152..fee62c6f12 100644 --- a/Gems/AWSMetrics/Code/awsmetrics_shared_files.cmake +++ b/Gems/AWSMetrics/Code/awsmetrics_shared_files.cmake @@ -7,6 +7,6 @@ # set(FILES - Include/Private/AWSMetricsModule.h Source/AWSMetricsModule.cpp + Source/AWSMetricsModule.h ) diff --git a/Gems/AWSMetrics/gem.json b/Gems/AWSMetrics/gem.json index df16890012..054c3624c4 100644 --- a/Gems/AWSMetrics/gem.json +++ b/Gems/AWSMetrics/gem.json @@ -2,6 +2,7 @@ "gem_name": "AWSMetrics", "display_name": "AWS Metrics", "license": "Apache-2.0 Or MIT", + "license_url": "https://github.com/o3de/o3de/blob/development/LICENSE.txt", "origin": "Amazon Web Services, Inc.", "type": "Code", "summary": "The AWS Metrics Gem provides a solution for AWS metrics submission and analytics.", @@ -14,7 +15,6 @@ "SDK" ], "icon_path": "preview.png", - "requirements": "", "documentation_url": "https://o3de.org/docs/user-guide/gems/reference/aws/aws-metrics/", "dependencies": [ "AWSCore" diff --git a/Gems/Achievements/gem.json b/Gems/Achievements/gem.json index bd643f471a..8180584500 100644 --- a/Gems/Achievements/gem.json +++ b/Gems/Achievements/gem.json @@ -2,6 +2,7 @@ "gem_name": "Achievements", "display_name": "Achievements", "license": "Apache-2.0 Or MIT", + "license_url": "https://github.com/o3de/o3de/blob/development/LICENSE.txt", "origin": "Open 3D Engine - o3de.org", "type": "Code", "summary": "The Achievements Gem provides a target platform agnostic interface for retrieving achievement details and unlocking achievements.", diff --git a/Gems/AssetMemoryAnalyzer/CMakeLists.txt b/Gems/AssetMemoryAnalyzer/CMakeLists.txt deleted file mode 100644 index 2bb380fae3..0000000000 --- a/Gems/AssetMemoryAnalyzer/CMakeLists.txt +++ /dev/null @@ -1,9 +0,0 @@ -# -# Copyright (c) Contributors to the Open 3D Engine Project. -# For complete copyright and license terms please see the LICENSE at the root of this distribution. -# -# SPDX-License-Identifier: Apache-2.0 OR MIT -# -# - -add_subdirectory(Code) diff --git a/Gems/AssetMemoryAnalyzer/Code/CMakeLists.txt b/Gems/AssetMemoryAnalyzer/Code/CMakeLists.txt deleted file mode 100644 index 32eada9614..0000000000 --- a/Gems/AssetMemoryAnalyzer/Code/CMakeLists.txt +++ /dev/null @@ -1,69 +0,0 @@ -# -# Copyright (c) Contributors to the Open 3D Engine Project. -# For complete copyright and license terms please see the LICENSE at the root of this distribution. -# -# SPDX-License-Identifier: Apache-2.0 OR MIT -# -# - -ly_add_target( - NAME AssetMemoryAnalyzer.Static STATIC - NAMESPACE Gem - FILES_CMAKE - assetmemoryanalyzer_files.cmake - INCLUDE_DIRECTORIES - PRIVATE - Source - PUBLIC - Include - BUILD_DEPENDENCIES - PUBLIC - AZ::AzCore - Legacy::CryCommon - Gem::ImGui.Static -) - -ly_add_target( - NAME AssetMemoryAnalyzer ${PAL_TRAIT_MONOLITHIC_DRIVEN_MODULE_TYPE} - NAMESPACE Gem - FILES_CMAKE - assetmemoryanalyzer_shared_files.cmake - INCLUDE_DIRECTORIES - PRIVATE - Source - PUBLIC - Include - BUILD_DEPENDENCIES - PRIVATE - Gem::AssetMemoryAnalyzer.Static - RUNTIME_DEPENDENCIES - Gem::ImGui -) - -# AssetMemoryAnalyzer is available in clients and servers. -ly_create_alias(NAME AssetMemoryAnalyzer.Clients NAMESPACE Gem TARGETS Gem::AssetMemoryAnalyzer) -ly_create_alias(NAME AssetMemoryAnalyzer.Servers NAMESPACE Gem TARGETS Gem::AssetMemoryAnalyzer) - -################################################################################ -# Tests -################################################################################ -if(PAL_TRAIT_BUILD_TESTS_SUPPORTED) - ly_add_target( - NAME AssetMemoryAnalyzer.Tests ${PAL_TRAIT_TEST_TARGET_TYPE} - NAMESPACE Gem - FILES_CMAKE - assetmemoryanalyzer_tests_files.cmake - INCLUDE_DIRECTORIES - PRIVATE - Source - Tests - BUILD_DEPENDENCIES - PRIVATE - AZ::AzTest - Gem::AssetMemoryAnalyzer.Static - ) - ly_add_googletest( - NAME Gem::AssetMemoryAnalyzer.Tests - ) -endif() - diff --git a/Gems/AssetMemoryAnalyzer/Code/Include/AssetMemoryAnalyzer/AssetMemoryAnalyzerBus.h b/Gems/AssetMemoryAnalyzer/Code/Include/AssetMemoryAnalyzer/AssetMemoryAnalyzerBus.h deleted file mode 100644 index 465fbd18a6..0000000000 --- a/Gems/AssetMemoryAnalyzer/Code/Include/AssetMemoryAnalyzer/AssetMemoryAnalyzerBus.h +++ /dev/null @@ -1,39 +0,0 @@ -/* - * Copyright (c) Contributors to the Open 3D Engine Project. - * For complete copyright and license terms please see the LICENSE at the root of this distribution. - * - * SPDX-License-Identifier: Apache-2.0 OR MIT - * - */ -#pragma once - -#include - -namespace AssetMemoryAnalyzer -{ - class FrameAnalysis; - - class AssetMemoryAnalyzerRequests - : public AZ::EBusTraits - { - public: - ////////////////////////////////////////////////////////////////////////// - // EBusTraits overrides - static const AZ::EBusHandlerPolicy HandlerPolicy = AZ::EBusHandlerPolicy::Single; - static const AZ::EBusAddressPolicy AddressPolicy = AZ::EBusAddressPolicy::Single; - ////////////////////////////////////////////////////////////////////////// - - // Enables or disables the AssetMemoryAnalyzer. - virtual void SetEnabled(bool enabled = true) = 0; - - // Exports a CSV file that may be imported into a spreadsheet. Top-level assets only, due to the limitations of CSV. Path is optional, defaults to @log@/assetmem-.csv - virtual void ExportCSVFile(const char* path = nullptr) = 0; - - // Exports a JSON file that may be viewed by the web viewer. Path is optional, defaults to @log@/assetmem-.json - virtual void ExportJSONFile(const char* path = nullptr) = 0; - - // Retrieves a frame analysis. (Generally used for testing purposes; use of the gem's private headers are required to inspect this.) - virtual AZStd::shared_ptr GetAnalysis() = 0; - }; - using AssetMemoryAnalyzerRequestBus = AZ::EBus; -} // namespace AssetMemoryAnalyzer diff --git a/Gems/AssetMemoryAnalyzer/Code/Source/AssetMemoryAnalyzer.cpp b/Gems/AssetMemoryAnalyzer/Code/Source/AssetMemoryAnalyzer.cpp deleted file mode 100644 index 798da14aa1..0000000000 --- a/Gems/AssetMemoryAnalyzer/Code/Source/AssetMemoryAnalyzer.cpp +++ /dev/null @@ -1,330 +0,0 @@ -/* - * Copyright (c) Contributors to the Open 3D Engine Project. - * For complete copyright and license terms please see the LICENSE at the root of this distribution. - * - * SPDX-License-Identifier: Apache-2.0 OR MIT - * - */ - -#include "AssetMemoryAnalyzer.h" - -#include -#include -#include -#include -#include - -/////////////////////////////////////////////////////////////////////////////// -// CodePoint hash-table support -/////////////////////////////////////////////////////////////////////////////// - -template<> -struct AZStd::hash -{ - size_t operator()(const AssetMemoryAnalyzer::Data::CodePoint& codePoint) const - { - size_t seed = 0; - AZStd::hash_combine(seed, codePoint.m_file); - AZStd::hash_combine(seed, codePoint.m_line); - - return seed; - } -}; - -namespace AssetMemoryAnalyzer -{ - namespace Data - { - inline bool operator==(const CodePoint& lhs, const CodePoint& rhs) - { - return lhs.m_file == rhs.m_file && - lhs.m_line == rhs.m_line; - } - } -} - -/////////////////////////////////////////////////////////////////////////////// -// AnalyzerImpl class -/////////////////////////////////////////////////////////////////////////////// - -namespace AssetMemoryAnalyzer -{ - class AnalyzerImpl : - public AZ::Debug::MemoryDrillerBus::Handler - { - public: - AZ_TYPE_INFO(AnalyzerImpl, "{E460E4DE-2160-4171-A4B6-3C2DB6692C32}"); - AZ_CLASS_ALLOCATOR(AnalyzerImpl, AZ::Debug::AssetTrackingAllocator, 0); - - AnalyzerImpl(); - ~AnalyzerImpl(); - - // MemoryDrillerBus - void RegisterAllocator(AZ::IAllocator* allocator) override; - void UnregisterAllocator(AZ::IAllocator* allocator) override; - void DumpAllAllocations() override; - void RegisterAllocation(AZ::IAllocator* allocator, void* address, size_t byteSize, size_t alignment, const char* name, const char* fileName, int lineNum, unsigned int stackSuppressCount) override; - void UnregisterAllocation(AZ::IAllocator* allocator, void* address, size_t byteSize, size_t alignment, AZ::Debug::AllocationInfo* info) override; - void ReallocateAllocation(AZ::IAllocator* allocator, void* prevAddress, void* newAddress, size_t newByteSize, size_t newAlignment) override; - void ResizeAllocation(AZ::IAllocator* allocator, void* address, size_t newSize) override; - - AZStd::shared_ptr GetAnalysis(); - - private: - void RegisterAllocationCommon(void* address, size_t byteSize, const char* fileName, int lineNum, Data::AllocationData::CategoryInfo categoryInfo, Data::AllocationCategories category); - void UnregisterAllocationCommon(void* address); - - using AssetTree = AZ::Debug::AssetTree; - using AssetTreeNode = typename AssetTree::NodeType; - using AllocationTable = AZ::Debug::AllocationTable; - using CodePoints = AZStd::unordered_set, AZStd::equal_to, AZ::Debug::AZStdAssetTrackingAllocator>; - using mutex_type = AZStd::mutex; - using lock_type = AZStd::lock_guard; - - mutex_type m_mutex; - CodePoints m_codePoints; - AssetTree m_assetTree; - AllocationTable m_allocationTable; - AZ::Debug::AssetTracking m_assetTracking; - bool m_captureUncategorizedAllocations = false; - bool m_performingAnalysis = false; - }; - - - /////////////////////////////////////////////////////////////////////////////// - // AnalyzerImpl functions - /////////////////////////////////////////////////////////////////////////////// - - AnalyzerImpl::AnalyzerImpl() : - m_allocationTable(m_mutex), - m_assetTracking(&m_assetTree, &m_allocationTable) - { - AZ::Debug::MemoryDrillerBus::Handler::BusConnect(); - } - - AnalyzerImpl::~AnalyzerImpl() - { - AZ::Debug::MemoryDrillerBus::Handler::BusDisconnect(); - } - - void AnalyzerImpl::RegisterAllocator(AZ::IAllocator* allocator) - { - AZ_UNUSED(allocator); - } - - void AnalyzerImpl::UnregisterAllocator(AZ::IAllocator* allocator) - { - AZ_UNUSED(allocator); - } - - void AnalyzerImpl::DumpAllAllocations() - { - } - - void AnalyzerImpl::RegisterAllocation(AZ::IAllocator* allocator, void* address, size_t byteSize, size_t alignment, const char* name, const char* fileName, int lineNum, unsigned int stackSuppressCount) - { - AZ_UNUSED(name); - AZ_UNUSED(alignment); - AZ_UNUSED(stackSuppressCount); - - Data::AllocationData::CategoryInfo categoryInfo; - categoryInfo.m_heapInfo.m_allocator = allocator; - RegisterAllocationCommon(address, byteSize, fileName, lineNum, categoryInfo, Data::AllocationCategories::HEAP); - } - - void AnalyzerImpl::UnregisterAllocation(AZ::IAllocator* allocator, void* address, size_t byteSize, size_t alignment, AZ::Debug::AllocationInfo* info) - { - AZ_UNUSED(allocator); - AZ_UNUSED(byteSize); - AZ_UNUSED(alignment); - AZ_UNUSED(info); - - UnregisterAllocationCommon(address); - } - - void AnalyzerImpl::ReallocateAllocation(AZ::IAllocator* allocator, void* prevAddress, void* newAddress, size_t newByteSize, size_t newAlignment) - { - AZ_UNUSED(allocator); - AZ_UNUSED(newAlignment); - - if (m_performingAnalysis) - { - return; - } - - m_allocationTable.ReallocateAllocation(prevAddress, newAddress, newByteSize); - } - - void AnalyzerImpl::ResizeAllocation(AZ::IAllocator* allocator, void* address, size_t newSize) - { - AZ_UNUSED(allocator); - - if (m_performingAnalysis) - { - return; - } - - m_allocationTable.ResizeAllocation(address, newSize); - } - - void AnalyzerImpl::RegisterAllocationCommon(void* address, size_t byteSize, const char* fileName, int lineNum, Data::AllocationData::CategoryInfo categoryInfo, Data::AllocationCategories category) - { - if (m_performingAnalysis) - { - return; - } - - AZ::Debug::AssetTreeNodeBase* activeAsset = m_assetTracking.GetCurrentThreadAsset(); - - if (!activeAsset) - { - if (m_captureUncategorizedAllocations) - { - activeAsset = &m_assetTree.GetRoot(); - } - else - { - return; - } - } - - { - // Store a record for this allocation, at this code-point - lock_type lock(m_mutex); - auto insertResult = m_codePoints.emplace(Data::CodePoint{ fileName ? fileName : "", lineNum, category }); - Data::CodePoint* cp = &*insertResult.first; - m_allocationTable.Get().emplace(address, AllocationTable::RecordType{ activeAsset, (uint32_t)byteSize, Data::AllocationData{ cp, categoryInfo } }); - static_cast(activeAsset)->m_data.m_totalAllocations[(int)category]++; - } - } - - void AnalyzerImpl::UnregisterAllocationCommon(void* address) - { - if (m_performingAnalysis) - { - return; - } - - { - // Delete the record of this allocation if it exists - lock_type lock(m_mutex); - auto& table = m_allocationTable.Get(); - auto itr = table.find(address); - - if (itr != table.end()) - { - static_cast(itr->second.m_asset)->m_data.m_totalAllocations[(int)itr->second.m_data.m_codePoint->m_category]--; - table.erase(address); - } - } - } - - AZStd::shared_ptr AnalyzerImpl::GetAnalysis() - { - using namespace Data; - - lock_type lock(m_mutex); - m_performingAnalysis = true; // Prevent recursive allocations from disrupting our work - - auto result = AZStd::allocate_shared(AZ::Debug::AZStdAssetTrackingAllocator()); - FrameAnalysis* analysis = result.get(); - - // Walk through all allocations and record their individual contributions to the analysisData for their owning asset - for (auto& allocationInfo : m_allocationTable.Get()) - { - auto assetData = &static_cast(allocationInfo.second.m_asset)->m_data; - auto category = allocationInfo.second.m_data.m_codePoint->m_category; - - // Update total bytes for this asset - assetData->m_totalBytes[(int)category] += allocationInfo.second.m_size; - - // Locate or create a recording of this code point within the analysis for this asset - auto codePointItr = assetData->m_codePointsToAllocations.find(allocationInfo.second.m_data.m_codePoint); - - if (codePointItr == assetData->m_codePointsToAllocations.end()) - { - codePointItr = assetData->m_codePointsToAllocations.emplace(allocationInfo.second.m_data.m_codePoint, AssetData::CodePointInfo()).first; - codePointItr->second.m_category = category; - } - - // Update the code point within the analysis for this asset with information about this allocation - codePointItr->second.m_allocations.emplace_back(AllocationPoint::AllocationInfo{ allocationInfo.second.m_size }); - codePointItr->second.m_totalBytes += allocationInfo.second.m_size; - } - - // Declare function to recurse through the asset tree, converting the analysisData of every node into matching information in the public API (AssetMemory:: namespace) - AZStd::function recurse; - recurse = [&recurse](AssetInfo* outAsset, AssetTreeNode* inAsset, int depth) - { - outAsset->m_id = inAsset->m_primaryinfo ? inAsset->m_primaryinfo->m_id->m_id.c_str() : nullptr; - - // For every code point in this asset node, record its allocations - for (auto& codePointInfo : inAsset->m_data.m_codePointsToAllocations) - { - outAsset->m_allocationPoints.emplace_back(AllocationPoint()); - auto allocationPoint = &outAsset->m_allocationPoints.back(); - allocationPoint->m_codePoint = codePointInfo.first; - allocationPoint->m_allocations.swap(codePointInfo.second.m_allocations); - allocationPoint->m_totalAllocatedMemory = codePointInfo.second.m_totalBytes; - - // Add these allocations to our total count of allocations for this asset - int categoryIndex = (int)codePointInfo.first->m_category; - outAsset->m_localSummary[categoryIndex].m_allocationCount += (uint32_t)allocationPoint->m_allocations.size(); - - // Reserve memory for the next frame, as the number of allocations are unlikely to change much over time - codePointInfo.second.m_allocations.reserve(allocationPoint->m_allocations.size()); - codePointInfo.second.m_totalBytes = 0; // Reset for next frame - } - - // Initialize the local and total summary - for (int categoryIndex = 0; categoryIndex < ALLOCATION_CATEGORY_COUNT; categoryIndex++) - { - outAsset->m_localSummary[categoryIndex].m_allocatedMemory = inAsset->m_data.m_totalBytes[categoryIndex]; - outAsset->m_totalSummary[categoryIndex] = outAsset->m_localSummary[categoryIndex]; - } - - // Recurse over child assets - outAsset->m_childAssets.resize(inAsset->m_children.size()); - size_t childIdx = 0; - - for (auto& inChildItr : inAsset->m_children) - { - auto outChild = &outAsset->m_childAssets[childIdx++]; - recurse(outChild, &inChildItr.second, depth + 1); - - // Have child assets contribute to the total summary - for (int categoryIndex = 0; categoryIndex < ALLOCATION_CATEGORY_COUNT; categoryIndex++) - { - outAsset->m_totalSummary[categoryIndex].m_allocatedMemory += outChild->m_totalSummary[categoryIndex].m_allocatedMemory; - outAsset->m_totalSummary[categoryIndex].m_allocationCount += outChild->m_totalSummary[categoryIndex].m_allocationCount; - } - } - - // Clear analysis data out for the next frame - AZStd::for_each(inAsset->m_data.m_totalBytes, inAsset->m_data.m_totalBytes + ALLOCATION_CATEGORY_COUNT, [](uint32_t& x) { x = 0; }); - }; - - recurse(&analysis->m_rootAsset, static_cast(&m_assetTree.GetRoot()), 0); - - m_performingAnalysis = false; - - return result; - } - - /////////////////////////////////////////////////////////////////////////////// - // Analyzer functions - /////////////////////////////////////////////////////////////////////////////// - - Analyzer::Analyzer() : m_impl(aznew AnalyzerImpl) - { - } - - Analyzer::~Analyzer() - { - } - - AZStd::shared_ptr Analyzer::GetAnalysis() - { - return m_impl->GetAnalysis(); - } -} diff --git a/Gems/AssetMemoryAnalyzer/Code/Source/AssetMemoryAnalyzer.h b/Gems/AssetMemoryAnalyzer/Code/Source/AssetMemoryAnalyzer.h deleted file mode 100644 index 408f2f7f7e..0000000000 --- a/Gems/AssetMemoryAnalyzer/Code/Source/AssetMemoryAnalyzer.h +++ /dev/null @@ -1,162 +0,0 @@ -/* - * Copyright (c) Contributors to the Open 3D Engine Project. - * For complete copyright and license terms please see the LICENSE at the root of this distribution. - * - * SPDX-License-Identifier: Apache-2.0 OR MIT - * - */ -#pragma once - -#include -#include -#include -#include -#include - -namespace AssetMemoryAnalyzer -{ - class AnalyzerImpl; - - namespace Data - { - enum class AllocationCategories - { - HEAP, - VRAM, - - COUNT - }; - - constexpr int ALLOCATION_CATEGORY_COUNT = (int)AllocationCategories::COUNT; - - // A location in code - struct CodePoint - { - const char* m_file; - int m_line; - AllocationCategories m_category; - }; - - // Meta-information to attach to an individual allocation - struct AllocationData - { - union CategoryInfo - { - struct - { - AZ::IAllocator* m_allocator; - } - m_heapInfo; - }; - - CodePoint* m_codePoint; - CategoryInfo m_categoryInfo; - }; - - // Information about a point in code where allocations occur - struct AllocationPoint - { - struct AllocationInfo - { - // Size in bytes - uint32_t m_size; - }; - - using AllocationInfos = AZStd::vector; - - // The point in code where allocations occur - const CodePoint* m_codePoint; - - // Total memory allocated through this code point (will be the sum of m_allocations) - uint32_t m_totalAllocatedMemory = 0; - - // Individual allocations that occurred through this code point - AllocationInfos m_allocations; - }; - - // Summary information about a group of allocations - struct Summary - { - // Total bytes allocated in the group - uint32_t m_allocatedMemory = 0; - - // Total number of separate allocations in the group - uint32_t m_allocationCount = 0; - }; - - // Information about an asset - struct AssetData - { - struct CodePointInfo - { - AllocationPoint::AllocationInfos m_allocations; - uint32_t m_totalBytes = 0; - AllocationCategories m_category; - }; - - uint32_t m_totalAllocations[ALLOCATION_CATEGORY_COUNT]; - uint32_t m_totalBytes[ALLOCATION_CATEGORY_COUNT]; - AZStd::unordered_map, AZStd::equal_to, AZ::Debug::AZStdAssetTrackingAllocator> m_codePointsToAllocations; - }; - - // Information about a specific asset. - struct AssetInfo - { - // Identifier for the asset. - const char* m_id = nullptr; - - // Total allocations/bytes for this asset, including allocations for any child assets. - Summary m_totalSummary[ALLOCATION_CATEGORY_COUNT]; - - // Total allocations/bytes for this asset alone, excluding allocations for child assets. - Summary m_localSummary[ALLOCATION_CATEGORY_COUNT]; - - // Child assets (i.e. assets that enter into scope while this asset is already in scope) - AZStd::vector m_childAssets; - - // Points in code at which this asset has made allocations - AZStd::vector m_allocationPoints; - }; - - typedef AZStd::vector AllocationPoints; - } - - // Analysis of all loaded assets at a moment in time - class FrameAnalysis - { - public: - AZ_TYPE_INFO(FrameAnalysis, "{6B7287A6-EE5E-4A9D-B219-586DAD865537}"); - AZ_CLASS_ALLOCATOR(FrameAnalysis, AZ::Debug::AssetTrackingAllocator, 0); - - const Data::AssetInfo& GetRootAsset() const - { - return m_rootAsset; - } - - const Data::AllocationPoints& GetAllocationPoints() const - { - return m_allocationPoints; - } - - private: - Data::AssetInfo m_rootAsset; - Data::AllocationPoints m_allocationPoints; - - friend AnalyzerImpl; - }; - - class Analyzer - { - public: - AZ_TYPE_INFO(Analyzer, "{00FB30E2-706C-41E6-9BDD-F52A40CF3366}"); - AZ_CLASS_ALLOCATOR(Analyzer, AZ::Debug::AssetTrackingAllocator, 0); - - Analyzer(); - ~Analyzer(); - - AZStd::shared_ptr GetAnalysis(); - - private: - AZStd::unique_ptr m_impl; - }; -} diff --git a/Gems/AssetMemoryAnalyzer/Code/Source/AssetMemoryAnalyzerModule.cpp b/Gems/AssetMemoryAnalyzer/Code/Source/AssetMemoryAnalyzerModule.cpp deleted file mode 100644 index 668c8a5b33..0000000000 --- a/Gems/AssetMemoryAnalyzer/Code/Source/AssetMemoryAnalyzerModule.cpp +++ /dev/null @@ -1,83 +0,0 @@ -/* - * Copyright (c) Contributors to the Open 3D Engine Project. - * For complete copyright and license terms please see the LICENSE at the root of this distribution. - * - * SPDX-License-Identifier: Apache-2.0 OR MIT - * - */ - -#include - -#include - -#include "AssetMemoryAnalyzerSystemComponent.h" - -#include - -namespace AssetMemoryAnalyzer -{ - class AssetMemoryAnalyzerModule - : public CryHooksModule - { - public: - AZ_RTTI(AssetMemoryAnalyzerModule, "{899B0A20-E21D-49BF-ADAF-A2396C27CFCC}", CryHooksModule); - AZ_CLASS_ALLOCATOR(AssetMemoryAnalyzerModule, AZ::OSAllocator, 0); - - AssetMemoryAnalyzerModule() - : CryHooksModule() - { - // Push results of [MyComponent]::CreateDescriptor() into m_descriptors here. - m_descriptors.insert(m_descriptors.end(), { - AssetMemoryAnalyzerSystemComponent::CreateDescriptor(), - }); - } - - /** - * Add required SystemComponents to the SystemEntity. - */ - AZ::ComponentTypeList GetRequiredSystemComponents() const override - { - return AZ::ComponentTypeList{ - azrtti_typeid(), - }; - } - - void OnCrySystemInitialized([[maybe_unused]] ISystem& system, [[maybe_unused]] const SSystemInitParams& systemInitParams) override - { - REGISTER_CVAR2_CB_DEV_ONLY( - "assetmem_enabled", - &m_cvarEnabled, - 0, - VF_NULL, - "AssetMemoryAnalyzer: Enable or disable the Asset Memory Analyzer.", - [](ICVar* pArgs) - { - bool enabled = pArgs->GetIVal() ? true : false; - EBUS_EVENT(AssetMemoryAnalyzerRequestBus, SetEnabled, enabled); - } - ); - - REGISTER_COMMAND_DEV_ONLY( - "assetmem_export_json", - [](IConsoleCmdArgs*) { EBUS_EVENT(AssetMemoryAnalyzerRequestBus, ExportJSONFile, nullptr); }, - 0, - "AssetMemoryAnalyzer: Export JSON analysis to @log@ directory."); - - REGISTER_COMMAND_DEV_ONLY( - "assetmem_export_csv", - [](IConsoleCmdArgs*) { EBUS_EVENT(AssetMemoryAnalyzerRequestBus, ExportCSVFile, nullptr); }, - 0, - "AssetMemoryAnalyzer: Export CSV analysis to @log@ directory. (Top-level assets only.)"); - - EBUS_EVENT(AssetMemoryAnalyzerRequestBus, SetEnabled, m_cvarEnabled != 0); - } - - private: - int m_cvarEnabled = 0; - }; -} - -// DO NOT MODIFY THIS LINE UNLESS YOU RENAME THE GEM -// The first parameter should be GemName_GemIdLower -// The second should be the fully qualified name of the class above -AZ_DECLARE_MODULE_CLASS(Gem_AssetMemoryAnalyzer, AssetMemoryAnalyzer::AssetMemoryAnalyzerModule) diff --git a/Gems/AssetMemoryAnalyzer/Code/Source/AssetMemoryAnalyzerSystemComponent.cpp b/Gems/AssetMemoryAnalyzer/Code/Source/AssetMemoryAnalyzerSystemComponent.cpp deleted file mode 100644 index bf03342149..0000000000 --- a/Gems/AssetMemoryAnalyzer/Code/Source/AssetMemoryAnalyzerSystemComponent.cpp +++ /dev/null @@ -1,199 +0,0 @@ -/* - * Copyright (c) Contributors to the Open 3D Engine Project. - * For complete copyright and license terms please see the LICENSE at the root of this distribution. - * - * SPDX-License-Identifier: Apache-2.0 OR MIT - * - */ - -#include - -#include -#include // For AZ_MAX_PATH_LEN -#include -#include - -#include "AssetMemoryAnalyzerSystemComponent.h" - -#include "AssetMemoryAnalyzer.h" -#include "DebugImGUI.h" -#include "ExportCSV.h" -#include "ExportJSON.h" - -namespace AssetMemoryAnalyzer -{ - namespace - { - static const char* GetExportFile(const char* customFilename, const char* extension) - { - static char sharedBuffer[AZ_MAX_PATH_LEN]; - - if (customFilename) - { - azsnprintf(sharedBuffer, AZ_ARRAY_SIZE(sharedBuffer), "@log@/%s", customFilename); - } - else - { - time_t ltime; - time(<ime); - struct tm timeInfo; - AZ_TRAIT_CTIME_LOCALTIME(&timeInfo, <ime); - strftime(sharedBuffer, AZ_ARRAY_SIZE(sharedBuffer), "@log@/assetmem-%Y-%m-%d-%H-%M-%S.", &timeInfo); - azstrcat(sharedBuffer, AZ_ARRAY_SIZE(sharedBuffer), extension); - } - - return sharedBuffer; - } - } - - static const char* VRAM_CATEGORIES[] = - { - "Texture", - "Buffer", - "Misc" - }; - - static const char* VRAM_SUBCATEGORIES[] = - { - "Rendertarget", - "Texture", - "Dynamic", - "VB", - "IB", - "CB", - "Other", - "Misc" - }; - - class AssetMemoryAnalyzerSystemComponent::Impl - { - private: - AZStd::unique_ptr m_analyzer; - DebugImGUI m_debugImGUI; - ExportCSV m_exportCSV; - ExportJSON m_exportJSON; - - friend class AssetMemoryAnalyzerSystemComponent; - }; - - - AssetMemoryAnalyzerSystemComponent::AssetMemoryAnalyzerSystemComponent() : m_impl(new Impl) - { - AZ::AllocatorInstance::Create(); - } - - AssetMemoryAnalyzerSystemComponent::~AssetMemoryAnalyzerSystemComponent() - { - m_impl.reset(); // Must delete objects before destroying the allocator - AZ::AllocatorInstance::Destroy(); - } - - void AssetMemoryAnalyzerSystemComponent::Reflect(AZ::ReflectContext* context) - { - if (AZ::SerializeContext* serialize = azrtti_cast(context)) - { - serialize->Class() - ->Version(0); - - if (AZ::EditContext* ec = serialize->GetEditContext()) - { - ec->Class("AssetMemoryAnalyzer", "Provides access to asset memory debugging features") - ->ClassElement(AZ::Edit::ClassElements::EditorData, "") - ->Attribute(AZ::Edit::Attributes::AppearsInAddComponentMenu, AZ_CRC("System", 0xc94d118b)) - ->Attribute(AZ::Edit::Attributes::AutoExpand, true) - ; - } - } - } - - void AssetMemoryAnalyzerSystemComponent::GetProvidedServices(AZ::ComponentDescriptor::DependencyArrayType& provided) - { - provided.push_back(AZ_CRC("AssetMemoryAnalyzerService", 0x23c52412)); - } - - void AssetMemoryAnalyzerSystemComponent::GetIncompatibleServices(AZ::ComponentDescriptor::DependencyArrayType& incompatible) - { - incompatible.push_back(AZ_CRC("AssetMemoryAnalyzerService", 0x23c52412)); - } - - void AssetMemoryAnalyzerSystemComponent::GetRequiredServices(AZ::ComponentDescriptor::DependencyArrayType& required) - { - (void)required; - } - - void AssetMemoryAnalyzerSystemComponent::GetDependentServices(AZ::ComponentDescriptor::DependencyArrayType& dependent) - { - (void)dependent; - } - - const char** AssetMemoryAnalyzerSystemComponent::GetVRAMCategories() - { - return VRAM_CATEGORIES; - } - - const char** AssetMemoryAnalyzerSystemComponent::GetVRAMSubCategories() - { - return VRAM_SUBCATEGORIES; - } - - bool AssetMemoryAnalyzerSystemComponent::IsEnabled() const - { - return m_impl->m_analyzer.get() != nullptr; - } - - AZStd::shared_ptr AssetMemoryAnalyzerSystemComponent::GetAnalysis() - { - AZStd::shared_ptr result; - - if (m_impl->m_analyzer) - { - result = m_impl->m_analyzer->GetAnalysis(); - } - - return result; - } - - void AssetMemoryAnalyzerSystemComponent::SetEnabled(bool enabled) - { - if (enabled) - { - if (!m_impl->m_analyzer) - { - m_impl->m_analyzer.reset(aznew Analyzer); - } - } - else - { - m_impl->m_analyzer.reset(); - } - } - - void AssetMemoryAnalyzerSystemComponent::ExportCSVFile(const char* path) - { - const char* outputPath = GetExportFile(path, "csv"); - m_impl->m_exportCSV.OutputCSV(outputPath); - } - - void AssetMemoryAnalyzerSystemComponent::ExportJSONFile(const char* path) - { - const char* outputPath = GetExportFile(path, "json"); - m_impl->m_exportJSON.OutputJSON(outputPath); - } - - void AssetMemoryAnalyzerSystemComponent::Init() - { - m_impl->m_debugImGUI.Init(this); - m_impl->m_exportCSV.Init(this); - m_impl->m_exportJSON.Init(this); - } - - void AssetMemoryAnalyzerSystemComponent::Activate() - { - AssetMemoryAnalyzerRequestBus::Handler::BusConnect(); - } - - void AssetMemoryAnalyzerSystemComponent::Deactivate() - { - AssetMemoryAnalyzerRequestBus::Handler::BusDisconnect(); - } -} diff --git a/Gems/AssetMemoryAnalyzer/Code/Source/AssetMemoryAnalyzerSystemComponent.h b/Gems/AssetMemoryAnalyzer/Code/Source/AssetMemoryAnalyzerSystemComponent.h deleted file mode 100644 index 4255205b27..0000000000 --- a/Gems/AssetMemoryAnalyzer/Code/Source/AssetMemoryAnalyzerSystemComponent.h +++ /dev/null @@ -1,63 +0,0 @@ -/* - * Copyright (c) Contributors to the Open 3D Engine Project. - * For complete copyright and license terms please see the LICENSE at the root of this distribution. - * - * SPDX-License-Identifier: Apache-2.0 OR MIT - * - */ -#pragma once - -#include - -#include -#include - -namespace AssetMemoryAnalyzer -{ - class FrameAnalysis; - - class AssetMemoryAnalyzerSystemComponent - : public AZ::Component - , protected AssetMemoryAnalyzerRequestBus::Handler - { - public: - AZ_COMPONENT(AssetMemoryAnalyzerSystemComponent, "{84428E10-24FF-48A7-B5EC-0A28D25C3C68}"); - - AssetMemoryAnalyzerSystemComponent(); - ~AssetMemoryAnalyzerSystemComponent(); - - static void Reflect(AZ::ReflectContext* context); - - static void GetProvidedServices(AZ::ComponentDescriptor::DependencyArrayType& provided); - static void GetIncompatibleServices(AZ::ComponentDescriptor::DependencyArrayType& incompatible); - static void GetRequiredServices(AZ::ComponentDescriptor::DependencyArrayType& required); - static void GetDependentServices(AZ::ComponentDescriptor::DependencyArrayType& dependent); - - static const char** GetVRAMCategories(); - static const char** GetVRAMSubCategories(); - - bool IsEnabled() const; - - //////////////////////////////////////////////////////////////////////// - // AssetMemoryAnalyzerRequestBus interface implementation - void SetEnabled(bool enabled) override; - void ExportCSVFile(const char* path) override; - void ExportJSONFile(const char* path) override; - AZStd::shared_ptr GetAnalysis() override; - //////////////////////////////////////////////////////////////////////// - - protected: - //////////////////////////////////////////////////////////////////////// - // AZ::Component interface implementation - void Init() override; - void Activate() override; - void Deactivate() override; - //////////////////////////////////////////////////////////////////////// - - private: - class Impl; - - private: - AZStd::unique_ptr m_impl; - }; -} diff --git a/Gems/AssetMemoryAnalyzer/Code/Source/DebugImGUI.cpp b/Gems/AssetMemoryAnalyzer/Code/Source/DebugImGUI.cpp deleted file mode 100644 index c9c123cf70..0000000000 --- a/Gems/AssetMemoryAnalyzer/Code/Source/DebugImGUI.cpp +++ /dev/null @@ -1,272 +0,0 @@ -/* - * Copyright (c) Contributors to the Open 3D Engine Project. - * For complete copyright and license terms please see the LICENSE at the root of this distribution. - * - * SPDX-License-Identifier: Apache-2.0 OR MIT - * - */ - -#include "AssetMemoryAnalyzer.h" -#include "AssetMemoryAnalyzerSystemComponent.h" -#include "DebugImGUI.h" -#include "FormatUtils.h" - -#include -#include -#include -#include - -namespace AssetMemoryAnalyzer -{ - namespace - { - template - struct SortFunctions - { - static bool SortChildAssetsByAllocatedMemory(const Data::AssetInfo* lhs, const Data::AssetInfo* rhs) - { - return lhs->m_totalSummary[(int)Category].m_allocatedMemory > rhs->m_totalSummary[(int)Category].m_allocatedMemory; - } - - static bool SortAllocationPointsByAllocatedMemory(const Data::AllocationPoint* lhs, const Data::AllocationPoint* rhs) - { - return (lhs->m_codePoint->m_category == rhs->m_codePoint->m_category) ? (lhs->m_totalAllocatedMemory > rhs->m_totalAllocatedMemory) : (lhs->m_codePoint->m_category == Category); - } - - static bool SortChildAssetsByAllocationCount(const Data::AssetInfo* lhs, const Data::AssetInfo* rhs) - { - return lhs->m_totalSummary[(int)Category].m_allocationCount > rhs->m_totalSummary[(int)Category].m_allocationCount; - } - - static bool SortAllocationPointsByAllocationCount(const Data::AllocationPoint* lhs, const Data::AllocationPoint* rhs) - { - return (lhs->m_codePoint->m_category == rhs->m_codePoint->m_category) ? (lhs->m_allocations.size() > rhs->m_allocations.size()) : (lhs->m_codePoint->m_category == Category); - } - - }; - } - - static const ImVec4 COLUMN_HEADER_COLOR(0.7f, 0.4f, 0.2f, 1.0f); - static const float COLUMN_WIDTH = 128.0f; - - DebugImGUI::DebugImGUI() - { - ImGui::ImGuiUpdateListenerBus::Handler::BusConnect(); - } - - DebugImGUI::~DebugImGUI() - { - ImGui::ImGuiUpdateListenerBus::Handler::BusDisconnect(); - } - - void DebugImGUI::Init(AssetMemoryAnalyzerSystemComponent* owner) - { - m_owner = owner; - m_childAssetSortFn = &SortFunctions::SortChildAssetsByAllocatedMemory; - m_allocationPointSortFn = &SortFunctions::SortAllocationPointsByAllocatedMemory; - } - - void DebugImGUI::OnImGuiUpdate() - { - using namespace Data; - - // Append to main menu at top of screen. - if (ImGui::BeginMainMenuBar()) - { - // Add new menu items. - if (ImGui::BeginMenu("AssetMemoryAnalyzer")) - { - if (ImGui::Button(m_enabled == false ? "Open" : "Close")) - { - ImGui::CloseCurrentPopup(); - m_enabled = !m_enabled; - } - - if (ImGui::Button("Export JSON")) - { - EBUS_EVENT(AssetMemoryAnalyzerRequestBus, ExportJSONFile, nullptr); - ImGui::CloseCurrentPopup(); - } - - if (ImGui::Button("Export CSV (top-level only)")) - { - EBUS_EVENT(AssetMemoryAnalyzerRequestBus, ExportCSVFile, nullptr); - ImGui::CloseCurrentPopup(); - } - - ImGui::EndMenu(); - } - - ImGui::EndMainMenuBar(); - } - - if (m_enabled) - { - // Draw the asset memory analysis window and its contents - ImGui::Begin("Asset Memory Analysis", &m_enabled); - -#ifndef AZ_TRACK_ASSET_SCOPES - ImGui::TextColored(ImColor(255, 32, 32), "Asset scope tracking disabled in code. Recompile with AZ_TRACK_ASSET_SCOPES defined (see AssetTracking.h)."); -#endif - if (!m_owner->IsEnabled()) - { - ImGui::TextColored(ImColor(255, 32, 32), "Asset memory analysis must be enabled by setting the \"assetmem_enable\" CVar to 1."); - } - - AZStd::shared_ptr analysis = m_owner->GetAnalysis(); - - if (analysis) - { - if (ImGui::Button("Heap Allocation Size")) - { - m_childAssetSortFn = &SortFunctions::SortChildAssetsByAllocatedMemory; - m_allocationPointSortFn = &SortFunctions::SortAllocationPointsByAllocatedMemory; - } - ImGui::SameLine(); - - if (ImGui::Button("Heap Allocation Count")) - { - m_childAssetSortFn = &SortFunctions::SortChildAssetsByAllocationCount; - m_allocationPointSortFn = &SortFunctions::SortAllocationPointsByAllocationCount; - } - ImGui::SameLine(); - - if (ImGui::Button("VRAM Allocation Size")) - { - m_childAssetSortFn = &SortFunctions::SortChildAssetsByAllocatedMemory; - m_allocationPointSortFn = &SortFunctions::SortAllocationPointsByAllocatedMemory; - } - ImGui::SameLine(); - - if (ImGui::Button("VRAM Allocation Count")) - { - m_childAssetSortFn = &SortFunctions::SortChildAssetsByAllocationCount; - m_allocationPointSortFn = &SortFunctions::SortAllocationPointsByAllocationCount; - } - ImGui::SameLine(); - - if (ImGui::Button("A -> Z")) - { - m_childAssetSortFn = [](const AssetInfo* lhs, const AssetInfo* rhs) { return strcmp(lhs->m_id, rhs->m_id) < 0; }; - m_allocationPointSortFn = [](const AllocationPoint* lhs, const AllocationPoint* rhs) { - int cmp = strcmp(lhs->m_codePoint->m_file, rhs->m_codePoint->m_file); - return (cmp < 0) || (cmp == 0 && lhs->m_codePoint->m_line < rhs->m_codePoint->m_line); - }; - } - - ImGui::Text("Asset/Allocation"); - ImGui::SameLine(); - ImGui::SetCursorPosX(ImGui::GetWindowWidth() - COLUMN_WIDTH * 2); - ImGui::Text("Heap (#/kB)"); - ImGui::SameLine(); - ImGui::SetCursorPosX(ImGui::GetWindowWidth() - COLUMN_WIDTH); - ImGui::Text("VRAM (#/kB)"); - ImGui::PushStyleColor(ImGuiCol_Text, ImVec4(255, 255, 32, 1.0)); - OutputLine("Totals", analysis->GetRootAsset().m_totalSummary[(int)AllocationCategories::HEAP], analysis->GetRootAsset().m_totalSummary[(int)AllocationCategories::VRAM]); - ImGui::PopStyleColor(); - - AZStd::function recurse; - recurse = [this, &recurse](const AssetInfo* asset, int depth) - { - AZStd::vector childAssetSorter; - childAssetSorter.resize(asset->m_childAssets.size()); - AZStd::transform(asset->m_childAssets.begin(), asset->m_childAssets.end(), childAssetSorter.begin(), [](const AssetInfo& ai) { return &ai; }); - AZStd::sort(childAssetSorter.begin(), childAssetSorter.end(), m_childAssetSortFn); - - m_allocationPointSorter.resize(asset->m_allocationPoints.size()); - AZStd::transform(asset->m_allocationPoints.begin(), asset->m_allocationPoints.end(), m_allocationPointSorter.begin(), [](const AllocationPoint& ap) { return ≈ }); - AZStd::sort(m_allocationPointSorter.begin(), m_allocationPointSorter.end(), m_allocationPointSortFn); - - if (asset->m_id) - { - float prevX = ImGui::GetCursorPosX(); - OutputLine(nullptr, asset->m_totalSummary[(int)AllocationCategories::HEAP], asset->m_totalSummary[(int)AllocationCategories::VRAM]); - ImGui::SameLine(); - ImGui::SetCursorPosX(prevX); - if (ImGui::TreeNode(asset->m_id)) - { - prevX = ImGui::GetCursorPosX(); - OutputLine(nullptr, asset->m_localSummary[(int)AllocationCategories::HEAP], asset->m_localSummary[(int)AllocationCategories::VRAM]); - ImGui::SameLine(); - ImGui::SetCursorPosX(prevX); - - if (ImGui::TreeNode("Scope allocations:")) - { - for (auto ap : m_allocationPointSorter) - { - Summary heapSummary; - Summary vramSummary; - - switch (ap->m_codePoint->m_category) - { - case AllocationCategories::HEAP: - ImGui::Text("%s", FormatUtils::FormatCodePoint(*ap->m_codePoint)); - heapSummary.m_allocationCount = static_cast(ap->m_allocations.size()); - heapSummary.m_allocatedMemory = ap->m_totalAllocatedMemory; - break; - - case AllocationCategories::VRAM: - ImGui::Text("%s", ap->m_codePoint->m_file); - vramSummary.m_allocationCount = static_cast(ap->m_allocations.size()); - vramSummary.m_allocatedMemory = ap->m_totalAllocatedMemory; - break; - } - - ImGui::SameLine(); - OutputLine(nullptr, heapSummary, vramSummary); - } - - ImGui::TreePop(); - } - - for (auto child : childAssetSorter) - { - recurse(child, depth + 1); - } - - ImGui::TreePop(); - } - } - else - { - for (auto child : childAssetSorter) - { - recurse(child, depth + 1); - } - } - }; - - recurse(&analysis->GetRootAsset(), 0); - } - - ImGui::End(); - } - } - - void DebugImGUI::OutputLine(const char* text, const Data::Summary& heapSummary, const Data::Summary& vramSummary) - { - if (text) - { - ImGui::Text("%s", text); - ImGui::SameLine(); - } - - ImGui::SetCursorPosX(ImGui::GetWindowWidth() - COLUMN_WIDTH * 2); - OutputField(heapSummary); - ImGui::SameLine(); - ImGui::SetCursorPosX(ImGui::GetWindowWidth() - COLUMN_WIDTH); - OutputField(vramSummary); - } - - void DebugImGUI::OutputField(const Data::Summary& summary) - { - if (summary.m_allocationCount) - { - ImGui::Text("%u / %s", summary.m_allocationCount, FormatUtils::FormatKB(summary.m_allocatedMemory)); - } - else - { - ImGui::Text("-- / --"); - } - } -} diff --git a/Gems/AssetMemoryAnalyzer/Code/Source/DebugImGUI.h b/Gems/AssetMemoryAnalyzer/Code/Source/DebugImGUI.h deleted file mode 100644 index 406e8e9a0f..0000000000 --- a/Gems/AssetMemoryAnalyzer/Code/Source/DebugImGUI.h +++ /dev/null @@ -1,52 +0,0 @@ -/* - * Copyright (c) Contributors to the Open 3D Engine Project. - * For complete copyright and license terms please see the LICENSE at the root of this distribution. - * - * SPDX-License-Identifier: Apache-2.0 OR MIT - * - */ -#pragma once - -#include -#include - -namespace AssetMemoryAnalyzer -{ - namespace Data - { - struct AllocationPoint; - struct AssetInfo; - struct Summary; - } - - class AssetMemoryAnalyzerSystemComponent; - - // This class provides debug UI for the gem using ImGUI. - class DebugImGUI - : public ImGui::ImGuiUpdateListenerBus::Handler - { - public: - AZ_TYPE_INFO(AssetMemoryAnalyzer::DebugImGUI, "{D121DA34-EF16-46C2-AFC4-A1EE69DA0851}"); - AZ_CLASS_ALLOCATOR(DebugImGUI, AZ::OSAllocator, 0); - - DebugImGUI(); - ~DebugImGUI(); - - void Init(AssetMemoryAnalyzerSystemComponent* owner); - - // ImGuiUpdateListenerBus - void OnImGuiUpdate() override; - - - private: - void OutputLine(const char* text, const Data::Summary& heapSummary, const Data::Summary& vramSummary); - void OutputField(const Data::Summary& summary); - - AssetMemoryAnalyzerSystemComponent* m_owner; - bool (*m_childAssetSortFn)(const Data::AssetInfo* lhs, const Data::AssetInfo* rhs) = nullptr; - AZStd::vector m_childAssetSorter; - bool (*m_allocationPointSortFn)(const Data::AllocationPoint* lhs, const Data::AllocationPoint* rhs) = nullptr; - AZStd::vector m_allocationPointSorter; - bool m_enabled = false; - }; -} diff --git a/Gems/AssetMemoryAnalyzer/Code/Source/ExportCSV.cpp b/Gems/AssetMemoryAnalyzer/Code/Source/ExportCSV.cpp deleted file mode 100644 index d5728b9a21..0000000000 --- a/Gems/AssetMemoryAnalyzer/Code/Source/ExportCSV.cpp +++ /dev/null @@ -1,81 +0,0 @@ -/* - * Copyright (c) Contributors to the Open 3D Engine Project. - * For complete copyright and license terms please see the LICENSE at the root of this distribution. - * - * SPDX-License-Identifier: Apache-2.0 OR MIT - * - */ - -#include "ExportCSV.h" - -#include "AssetMemoryAnalyzer.h" -#include "AssetMemoryAnalyzerSystemComponent.h" -#include "FormatUtils.h" - -#include - -namespace AssetMemoryAnalyzer -{ - ExportCSV::ExportCSV() - { - } - - ExportCSV::~ExportCSV() - { - } - - void ExportCSV::Init(AssetMemoryAnalyzerSystemComponent* owner) - { - m_owner = owner; - } - - void ExportCSV::OutputCSV(const char* path) - { - using namespace Data; - - AZStd::shared_ptr analysis = m_owner->GetAnalysis(); - - if (!analysis) - { - return; - } - - auto fs = AZ::IO::FileIOBase::GetDirectInstance(); - AZ::IO::HandleType hdl; - - if (!fs->Open(path, AZ::IO::OpenMode::ModeWrite, hdl)) - { - AZ_Assert(false, "Unable to open file for writing: %s", path); - } - - const AZStd::string header("Label,Heap Count,Heap kb,VRAM Count,VRAM kb\n"); - fs->Write(hdl, header.c_str(), header.length()); - char lineBuffer[4096]; - const auto& rootAsset = analysis->GetRootAsset(); - - size_t length = snprintf(lineBuffer, sizeof(lineBuffer), ",%d,%0.2f,%d,%0.2f\n", - rootAsset.m_localSummary[(int)AllocationCategories::HEAP].m_allocationCount, - rootAsset.m_localSummary[(int)AllocationCategories::HEAP].m_allocatedMemory / 1024.0f, - rootAsset.m_localSummary[(int)AllocationCategories::VRAM].m_allocationCount, - rootAsset.m_localSummary[(int)AllocationCategories::VRAM].m_allocatedMemory / 1024.0f - ); - fs->Write(hdl, lineBuffer, length); - - for (const auto& child : analysis->GetRootAsset().m_childAssets) - { - length = snprintf(lineBuffer, sizeof(lineBuffer), "%s,%d,%0.2f,%d,%0.2f\n", - child.m_id, - child.m_totalSummary[(int)AllocationCategories::HEAP].m_allocationCount, - child.m_totalSummary[(int)AllocationCategories::HEAP].m_allocatedMemory / 1024.0f, - child.m_totalSummary[(int)AllocationCategories::VRAM].m_allocationCount, - child.m_totalSummary[(int)AllocationCategories::VRAM].m_allocatedMemory / 1024.0f - ); - - fs->Write(hdl, lineBuffer, length); - } - - fs->Close(hdl); - - AZ_Printf("Debug", "Exported asset allocation list to %s", path); - } -} diff --git a/Gems/AssetMemoryAnalyzer/Code/Source/ExportCSV.h b/Gems/AssetMemoryAnalyzer/Code/Source/ExportCSV.h deleted file mode 100644 index d8d5c34ba0..0000000000 --- a/Gems/AssetMemoryAnalyzer/Code/Source/ExportCSV.h +++ /dev/null @@ -1,33 +0,0 @@ -/* - * Copyright (c) Contributors to the Open 3D Engine Project. - * For complete copyright and license terms please see the LICENSE at the root of this distribution. - * - * SPDX-License-Identifier: Apache-2.0 OR MIT - * - */ -#pragma once - -#include - - -namespace AssetMemoryAnalyzer -{ - class AssetMemoryAnalyzerSystemComponent; - - // This class provides the service of exporting a capture of asset memory to a JSON file that is viewable in the web viewer. - class ExportCSV - { - public: - AZ_TYPE_INFO(AssetMemoryAnalyzer::ExportCSV, "{FEA7D137-EA93-4366-85C2-DCBCE00B3376}"); - AZ_CLASS_ALLOCATOR(ExportCSV, AZ::OSAllocator, 0); - - ExportCSV(); - ~ExportCSV(); - - void Init(AssetMemoryAnalyzerSystemComponent* owner); - void OutputCSV(const char* path); - - private: - AssetMemoryAnalyzerSystemComponent* m_owner; - }; -} diff --git a/Gems/AssetMemoryAnalyzer/Code/Source/ExportJSON.cpp b/Gems/AssetMemoryAnalyzer/Code/Source/ExportJSON.cpp deleted file mode 100644 index 9f75e62454..0000000000 --- a/Gems/AssetMemoryAnalyzer/Code/Source/ExportJSON.cpp +++ /dev/null @@ -1,182 +0,0 @@ -/* - * Copyright (c) Contributors to the Open 3D Engine Project. - * For complete copyright and license terms please see the LICENSE at the root of this distribution. - * - * SPDX-License-Identifier: Apache-2.0 OR MIT - * - */ - -#include "ExportJSON.h" - -#include "AssetMemoryAnalyzer.h" -#include "AssetMemoryAnalyzerSystemComponent.h" -#include "FormatUtils.h" - -#include -#include -#include -#include -#include -#include -#include -#include - -namespace AssetMemoryAnalyzer -{ - namespace - { - template - static void OutputAllocationInfo(WriterT& writer, size_t count, size_t bytes) - { - writer.StartObject(); - writer.Key("count"); - writer.Int((int)count); - writer.Key("kb"); - writer.String(FormatUtils::FormatKB(bytes)); - writer.EndObject(); - } - - template - static void OutputAllocationInfo(WriterT& writer, const Data::Summary& summary) - { - OutputAllocationInfo(writer, summary.m_allocationCount, summary.m_allocatedMemory); - } - } - - ExportJSON::ExportJSON() - { - } - - ExportJSON::~ExportJSON() - { - } - - void ExportJSON::Init(AssetMemoryAnalyzerSystemComponent* owner) - { - m_owner = owner; - } - - void ExportJSON::OutputJSON(const char* path) - { - using namespace Data; - using namespace rapidjson; - - AZStd::shared_ptr analysis = m_owner->GetAnalysis(); - - if (!analysis) - { - return; - } - - StringBuffer buff; - PrettyWriter writer(buff); - size_t idCounter = 0; - - AZStd::function recurse; - recurse = [&recurse, &writer, &idCounter](const AssetInfo& asset, int depth) - { - writer.StartObject(); - - writer.Key("id"); - writer.Int(static_cast(idCounter++)); - - writer.Key("label"); - writer.String(asset.m_id ? asset.m_id : "Root"); - - writer.Key("heap"); - OutputAllocationInfo(writer, asset.m_totalSummary[(int)AllocationCategories::HEAP]); - - writer.Key("vram"); - OutputAllocationInfo(writer, asset.m_totalSummary[(int)AllocationCategories::VRAM]); - - if (!asset.m_allocationPoints.empty() || !asset.m_childAssets.empty()) - { - writer.Key("_children"); - writer.StartArray(); - - if (!asset.m_allocationPoints.empty()) - { - writer.StartObject(); - writer.Key("id"); - writer.Int(static_cast(idCounter++)); - - writer.Key("label"); - writer.String(""); - - writer.Key("heap"); - OutputAllocationInfo(writer, asset.m_localSummary[(int)AllocationCategories::HEAP]); - - writer.Key("vram"); - OutputAllocationInfo(writer, asset.m_localSummary[(int)AllocationCategories::VRAM]); - - writer.Key("_children"); - writer.StartArray(); - - for (const auto& ap : asset.m_allocationPoints) - { - Summary heapSummary; - Summary vramSummary; - - writer.StartObject(); - writer.Key("id"); - writer.Int(static_cast(idCounter++)); - - writer.Key("label"); - - switch (ap.m_codePoint->m_category) - { - case AllocationCategories::HEAP: - writer.String(FormatUtils::FormatCodePoint(*ap.m_codePoint)); - heapSummary.m_allocationCount = static_cast(ap.m_allocations.size()); - heapSummary.m_allocatedMemory = ap.m_totalAllocatedMemory; - break; - - case AllocationCategories::VRAM: - writer.String(ap.m_codePoint->m_file); - vramSummary.m_allocationCount = static_cast(ap.m_allocations.size()); - vramSummary.m_allocatedMemory = ap.m_totalAllocatedMemory; - break; - } - - writer.Key("heap"); - OutputAllocationInfo(writer, heapSummary); - - writer.Key("vram"); - OutputAllocationInfo(writer, vramSummary); - - writer.EndObject(); - } - - writer.EndArray(); - writer.EndObject(); - } - - for (const auto& childInfo : asset.m_childAssets) - { - recurse(childInfo, depth + 1); - } - - writer.EndArray(); - } - - writer.EndObject(); - }; - - writer.StartArray(); - recurse(analysis->GetRootAsset(), 0); - writer.EndArray(); - - auto fs = AZ::IO::FileIOBase::GetDirectInstance(); - AZ::IO::HandleType hdl; - - if (!fs->Open(path, AZ::IO::OpenMode::ModeWrite, hdl)) - { - AZ_Assert(false, "Unable to open file for writing: %s", path); - } - - fs->Write(hdl, buff.GetString(), buff.GetSize()); - fs->Close(hdl); - - AZ_Printf("Debug", "Exported asset allocation map to %s", path); - } -} diff --git a/Gems/AssetMemoryAnalyzer/Code/Source/ExportJSON.h b/Gems/AssetMemoryAnalyzer/Code/Source/ExportJSON.h deleted file mode 100644 index f8b74ec5ce..0000000000 --- a/Gems/AssetMemoryAnalyzer/Code/Source/ExportJSON.h +++ /dev/null @@ -1,32 +0,0 @@ -/* - * Copyright (c) Contributors to the Open 3D Engine Project. - * For complete copyright and license terms please see the LICENSE at the root of this distribution. - * - * SPDX-License-Identifier: Apache-2.0 OR MIT - * - */ -#pragma once - -#include - -namespace AssetMemoryAnalyzer -{ - class AssetMemoryAnalyzerSystemComponent; - - // This class provides the service of exporting a capture of asset memory to a JSON file that is viewable in the web viewer. - class ExportJSON - { - public: - AZ_TYPE_INFO(AssetMemoryAnalyzer::ExportJSON, "{AA85F7E0-8FAF-43BC-9C09-6411270AE3E7}"); - AZ_CLASS_ALLOCATOR(ExportJSON, AZ::OSAllocator, 0); - - ExportJSON(); - ~ExportJSON(); - - void Init(AssetMemoryAnalyzerSystemComponent* owner); - void OutputJSON(const char* path); - - private: - AssetMemoryAnalyzerSystemComponent* m_owner; - }; -} diff --git a/Gems/AssetMemoryAnalyzer/Code/Source/FormatUtils.cpp b/Gems/AssetMemoryAnalyzer/Code/Source/FormatUtils.cpp deleted file mode 100644 index 190de6c0eb..0000000000 --- a/Gems/AssetMemoryAnalyzer/Code/Source/FormatUtils.cpp +++ /dev/null @@ -1,36 +0,0 @@ -/* - * Copyright (c) Contributors to the Open 3D Engine Project. - * For complete copyright and license terms please see the LICENSE at the root of this distribution. - * - * SPDX-License-Identifier: Apache-2.0 OR MIT - * - */ - -#include "FormatUtils.h" - -#include "AssetMemoryAnalyzer.h" - -#include - -namespace AssetMemoryAnalyzer -{ - namespace FormatUtils - { - const char* FormatCodePoint(const Data::CodePoint& cp) - { - static char buff[1024]; - azsnprintf(buff, sizeof(buff), "%s:%d", cp.m_file, cp.m_line); - - return buff; - } - - const char* FormatKB(size_t bytes) - { - static char buff[32]; - int len = azsnprintf(buff, sizeof(buff), "%0.2f", bytes / 1024.0f); - AzFramework::StringFunc::NumberFormatting::GroupDigits(buff, sizeof(buff), len - 3); - - return buff; - } - } -} diff --git a/Gems/AssetMemoryAnalyzer/Code/Source/FormatUtils.h b/Gems/AssetMemoryAnalyzer/Code/Source/FormatUtils.h deleted file mode 100644 index f207794e41..0000000000 --- a/Gems/AssetMemoryAnalyzer/Code/Source/FormatUtils.h +++ /dev/null @@ -1,29 +0,0 @@ -/* - * Copyright (c) Contributors to the Open 3D Engine Project. - * For complete copyright and license terms please see the LICENSE at the root of this distribution. - * - * SPDX-License-Identifier: Apache-2.0 OR MIT - * - */ -#pragma once - -#include - -namespace AssetMemoryAnalyzer -{ - namespace Data - { - struct CodePoint; - } - - namespace FormatUtils - { - // Formats a location in code to a single line of human-readable text. Returns a pointer to the resulting string. - // WARNING: Returns pointer to an internal static buffer for performance. Single-threaded access only! - extern const char* FormatCodePoint(const Data::CodePoint& cp); - - // Formats a byte value to be easily read in kilobytes. Returns a pointer to the resulting string. - // WARNING: Returns pointer to an internal static buffer for performance. Single-threaded access only! - extern const char* FormatKB(size_t bytes); - } -} diff --git a/Gems/AssetMemoryAnalyzer/Code/Tests/AssetMemoryAnalyzerTest.cpp b/Gems/AssetMemoryAnalyzer/Code/Tests/AssetMemoryAnalyzerTest.cpp deleted file mode 100644 index 2a3ac1e4fe..0000000000 --- a/Gems/AssetMemoryAnalyzer/Code/Tests/AssetMemoryAnalyzerTest.cpp +++ /dev/null @@ -1,72 +0,0 @@ -/* - * Copyright (c) Contributors to the Open 3D Engine Project. - * For complete copyright and license terms please see the LICENSE at the root of this distribution. - * - * SPDX-License-Identifier: Apache-2.0 OR MIT - * - */ - -#include -#include -#include -#include -#include <../Source/AssetMemoryAnalyzer.h> -#include <../Source/AssetMemoryAnalyzerSystemComponent.h> - -using namespace AssetMemoryAnalyzer; - -static AZ::IAllocator* testalloc = nullptr; - -class AssetMemoryAnalyzerTest - : public UnitTest::AllocatorsTestFixture -{ -protected: - void SetUp() override - { - AllocatorsTestFixture::SetUp(); - testalloc = &AZ::AllocatorInstance::GetAllocator(); - AZ::ComponentApplication::Descriptor desc; - desc.m_useExistingAllocator = true; - desc.m_enableDrilling = false; - m_app = new (&m_appStorage) AZ::ComponentApplication; - m_systemEntity = m_app->Create(desc); - m_app->RegisterComponentDescriptor(AssetMemoryAnalyzerSystemComponent::CreateDescriptor()); - m_gemSystemComponent = m_systemEntity->CreateComponent(); - m_systemEntity->Init(); - m_systemEntity->Activate(); - } - - void TearDown() override - { - m_app->Destroy(); - m_app->~ComponentApplication(); - - AllocatorsTestFixture::TearDown(); - } - - AZStd::aligned_storage_for_t m_appStorage; - AZ::ComponentApplication* m_app = nullptr; - AZ::Entity* m_systemEntity = nullptr; - AZ::Component* m_gemSystemComponent = nullptr; -}; - -TEST_F(AssetMemoryAnalyzerTest, BasicTest) -{ - AZStd::shared_ptr analysis; - AssetMemoryAnalyzerRequestBus::BroadcastResult(analysis, &AssetMemoryAnalyzerRequests::GetAnalysis); - - EXPECT_FALSE(analysis.get()); - - AssetMemoryAnalyzerRequestBus::Broadcast(&AssetMemoryAnalyzerRequests::SetEnabled, true); - AssetMemoryAnalyzerRequestBus::BroadcastResult(analysis, &AssetMemoryAnalyzerRequests::GetAnalysis); - - ASSERT_TRUE(analysis.get()); -#ifndef AZ_TRACK_ASSET_SCOPES - // No recordings should exist if analysis is disabled - ASSERT_TRUE(analysis->GetAllocationPoints().empty()); -#endif -} - -AZ_UNIT_TEST_HOOK(DEFAULT_UNIT_TEST_ENV); - - diff --git a/Gems/AssetMemoryAnalyzer/Code/assetmemoryanalyzer_files.cmake b/Gems/AssetMemoryAnalyzer/Code/assetmemoryanalyzer_files.cmake deleted file mode 100644 index 5b422502e1..0000000000 --- a/Gems/AssetMemoryAnalyzer/Code/assetmemoryanalyzer_files.cmake +++ /dev/null @@ -1,23 +0,0 @@ -# -# Copyright (c) Contributors to the Open 3D Engine Project. -# For complete copyright and license terms please see the LICENSE at the root of this distribution. -# -# SPDX-License-Identifier: Apache-2.0 OR MIT -# -# - -set(FILES - Include/AssetMemoryAnalyzer/AssetMemoryAnalyzerBus.h - Source/AssetMemoryAnalyzer.cpp - Source/AssetMemoryAnalyzer.h - Source/AssetMemoryAnalyzerSystemComponent.cpp - Source/AssetMemoryAnalyzerSystemComponent.h - Source/DebugImGUI.cpp - Source/DebugImGUI.h - Source/ExportCSV.cpp - Source/ExportCSV.h - Source/ExportJSON.cpp - Source/ExportJSON.h - Source/FormatUtils.cpp - Source/FormatUtils.h -) diff --git a/Gems/AssetMemoryAnalyzer/Code/assetmemoryanalyzer_shared_files.cmake b/Gems/AssetMemoryAnalyzer/Code/assetmemoryanalyzer_shared_files.cmake deleted file mode 100644 index 63323a14d1..0000000000 --- a/Gems/AssetMemoryAnalyzer/Code/assetmemoryanalyzer_shared_files.cmake +++ /dev/null @@ -1,11 +0,0 @@ -# -# Copyright (c) Contributors to the Open 3D Engine Project. -# For complete copyright and license terms please see the LICENSE at the root of this distribution. -# -# SPDX-License-Identifier: Apache-2.0 OR MIT -# -# - -set(FILES - Source/AssetMemoryAnalyzerModule.cpp -) diff --git a/Gems/AssetMemoryAnalyzer/Code/assetmemoryanalyzer_tests_files.cmake b/Gems/AssetMemoryAnalyzer/Code/assetmemoryanalyzer_tests_files.cmake deleted file mode 100644 index a7b08b967e..0000000000 --- a/Gems/AssetMemoryAnalyzer/Code/assetmemoryanalyzer_tests_files.cmake +++ /dev/null @@ -1,11 +0,0 @@ -# -# Copyright (c) Contributors to the Open 3D Engine Project. -# For complete copyright and license terms please see the LICENSE at the root of this distribution. -# -# SPDX-License-Identifier: Apache-2.0 OR MIT -# -# - -set(FILES - Tests/AssetMemoryAnalyzerTest.cpp -) diff --git a/Gems/AssetMemoryAnalyzer/External/tabulator-master/.github/ISSUE_TEMPLATE/bug_report.md b/Gems/AssetMemoryAnalyzer/External/tabulator-master/.github/ISSUE_TEMPLATE/bug_report.md deleted file mode 100644 index d041460807..0000000000 --- a/Gems/AssetMemoryAnalyzer/External/tabulator-master/.github/ISSUE_TEMPLATE/bug_report.md +++ /dev/null @@ -1,40 +0,0 @@ ---- -name: Bug report -about: Create a report to help us improve - ---- - -**Describe the bug** -A clear and concise description of what the bug is. - - -**Tabulator Info** -- Which version of Tabulator are you using? -- Post a copy of your construct object if possible so we can see how your table is setup - -**To Reproduce** -Steps to reproduce the behavior: -1. Go to '...' -2. Click on '....' -3. Scroll down to '....' -4. See error - -**Expected behavior** -A clear and concise description of what you expected to happen. - -**Screenshots** -If applicable, add screenshots to help explain your problem. - -**Desktop (please complete the following information):** - - OS: [e.g. iOS] - - Browser [e.g. chrome, safari] - - Version [e.g. 22] - -**Smartphone (please complete the following information):** - - Device: [e.g. iPhone6] - - OS: [e.g. iOS8.1] - - Browser [e.g. stock browser, safari] - - Version [e.g. 22] - -**Additional context** -Add any other context about the problem here. diff --git a/Gems/AssetMemoryAnalyzer/External/tabulator-master/.github/ISSUE_TEMPLATE/feature_request.md b/Gems/AssetMemoryAnalyzer/External/tabulator-master/.github/ISSUE_TEMPLATE/feature_request.md deleted file mode 100644 index 066b2d920a..0000000000 --- a/Gems/AssetMemoryAnalyzer/External/tabulator-master/.github/ISSUE_TEMPLATE/feature_request.md +++ /dev/null @@ -1,17 +0,0 @@ ---- -name: Feature request -about: Suggest an idea for this project - ---- - -**Is your feature request related to a problem? Please describe.** -A clear and concise description of what the problem is. Ex. I'm always frustrated when [...] - -**Describe the solution you'd like** -A clear and concise description of what you want to happen. - -**Describe alternatives you've considered** -A clear and concise description of any alternative solutions or features you've considered. - -**Additional context** -Add any other context or screenshots about the feature request here. diff --git a/Gems/AssetMemoryAnalyzer/External/tabulator-master/.github/ISSUE_TEMPLATE/question.md b/Gems/AssetMemoryAnalyzer/External/tabulator-master/.github/ISSUE_TEMPLATE/question.md deleted file mode 100644 index a9a1e61214..0000000000 --- a/Gems/AssetMemoryAnalyzer/External/tabulator-master/.github/ISSUE_TEMPLATE/question.md +++ /dev/null @@ -1,11 +0,0 @@ ---- -name: Question -about: Please ask questions on Stack Overflow, NOT on GitHub :) - ---- - -Please ask questions on www.stackoverflow.com the issues list is now reserved for feature requests and bug reports. - -Cheers - -Oli :) diff --git a/Gems/AssetMemoryAnalyzer/External/tabulator-master/.gitignore b/Gems/AssetMemoryAnalyzer/External/tabulator-master/.gitignore deleted file mode 100644 index 013f31d724..0000000000 --- a/Gems/AssetMemoryAnalyzer/External/tabulator-master/.gitignore +++ /dev/null @@ -1,6 +0,0 @@ -*.sublime-project -*.sublime-workspace - -node_modules/ -examples/ -npm-debug.log \ No newline at end of file diff --git a/Gems/AssetMemoryAnalyzer/External/tabulator-master/CODE_OF_CONDUCT.md b/Gems/AssetMemoryAnalyzer/External/tabulator-master/CODE_OF_CONDUCT.md deleted file mode 100644 index 2599d16381..0000000000 --- a/Gems/AssetMemoryAnalyzer/External/tabulator-master/CODE_OF_CONDUCT.md +++ /dev/null @@ -1,46 +0,0 @@ -# Contributor Covenant Code of Conduct - -## Our Pledge - -In the interest of fostering an open and welcoming environment, we as contributors and maintainers pledge to making participation in our project and our community a harassment-free experience for everyone, regardless of age, body size, disability, ethnicity, gender identity and expression, level of experience, nationality, personal appearance, race, religion, or sexual identity and orientation. - -## Our Standards - -Examples of behavior that contributes to creating a positive environment include: - -* Using welcoming and inclusive language -* Being respectful of differing viewpoints and experiences -* Gracefully accepting constructive criticism -* Focusing on what is best for the community -* Showing empathy towards other community members - -Examples of unacceptable behavior by participants include: - -* The use of sexualized language or imagery and unwelcome sexual attention or advances -* Trolling, insulting/derogatory comments, and personal or political attacks -* Public or private harassment -* Publishing others' private information, such as a physical or electronic address, without explicit permission -* Other conduct which could reasonably be considered inappropriate in a professional setting - -## Our Responsibilities - -Project maintainers are responsible for clarifying the standards of acceptable behavior and are expected to take appropriate and fair corrective action in response to any instances of unacceptable behavior. - -Project maintainers have the right and responsibility to remove, edit, or reject comments, commits, code, wiki edits, issues, and other contributions that are not aligned to this Code of Conduct, or to ban temporarily or permanently any contributor for other behaviors that they deem inappropriate, threatening, offensive, or harmful. - -## Scope - -This Code of Conduct applies both within project spaces and in public spaces when an individual is representing the project or its community. Examples of representing a project or community include using an official project e-mail address, posting via an official social media account, or acting as an appointed representative at an online or offline event. Representation of a project may be further defined and clarified by project maintainers. - -## Enforcement - -The project team will review and investigate all complaints, and will respond in a way that it deems appropriate to the circumstances. The project team is obligated to maintain confidentiality with regard to the reporter of an incident. Further details of specific enforcement policies may be posted separately. - -Project maintainers who do not follow or enforce the Code of Conduct in good faith may face temporary or permanent repercussions as determined by other members of the project's leadership. - -## Attribution - -This Code of Conduct is adapted from the [Contributor Covenant][homepage], version 1.4, available at [http://contributor-covenant.org/version/1/4][version] - -[homepage]: http://contributor-covenant.org -[version]: http://contributor-covenant.org/version/1/4/ diff --git a/Gems/AssetMemoryAnalyzer/External/tabulator-master/LICENSE b/Gems/AssetMemoryAnalyzer/External/tabulator-master/LICENSE deleted file mode 100644 index b1a1477df5..0000000000 --- a/Gems/AssetMemoryAnalyzer/External/tabulator-master/LICENSE +++ /dev/null @@ -1,21 +0,0 @@ -The MIT License (MIT) - -Copyright (c) 2015-2018 Oli Folkerd - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -SOFTWARE. \ No newline at end of file diff --git a/Gems/AssetMemoryAnalyzer/External/tabulator-master/README.md b/Gems/AssetMemoryAnalyzer/External/tabulator-master/README.md deleted file mode 100644 index 894e9f8d65..0000000000 --- a/Gems/AssetMemoryAnalyzer/External/tabulator-master/README.md +++ /dev/null @@ -1,84 +0,0 @@ -![Tabulator Table](http://olifolkerd.github.io/tabulator/images/tabulator.png) - -### Version 4.1 Out Now! - -An easy to use interactive table generation JavaScript library - -Full documentation & demos can be found at: [http://tabulator.info](http://tabulator.info) -*** -![Tabulator Table](http://tabulator.info/images/tabulator_table.jpg) -*** - -NPM Package Changed -================================ -jQuery was removed as a dependency in the 4.0 release, so Tabulator has moved in NPM from the old [jquery.tabulator](https://www.npmjs.com/package/jquery.tabulator) package to the new [tabulator-tables](https://www.npmjs.com/package/tabulator-tables) package. - - -Features -================================ -Tabulator allows you to create interactive tables in seconds from any HTML Table, Javascript Array or JSON formatted data. - -Simply include the library and the css in your project and you're away! - -Tabulator is packed with useful features including: - -![Tabulator Features](http://olifolkerd.github.io/tabulator/images/featurelist_share.png) - - -Frontend Framework Support -================================ -Tabulator is built to work with all the major front end JavaScript frameworks including React, Angular and Vue. - - -Setup -================================ -Setting up tabulator could not be simpler. - -Include the library and the css -```html - - -``` - -Create an element to hold the table -```html -
-``` - -Turn the element into a tabulator with some simple javascript -```js -var table = new Tabulator("#example-table", {}); -``` - - -### Bower Installation -To get Tabulator via the Bower package manager, open a terminal in your project directory and run the following commmand: -``` -bower install tabulator --save -``` - -### NPM Installation -To get Tabulator via the NPM package manager, open a terminal in your project directory and run the following commmand: -``` -npm install tabulator-tables --save -``` - -### CDN - UNPKG -To access Tabulator directly from the UNPKG CDN servers, include the following two lines at the start of your project, instead of the localy hosted versions: -```html - - -``` - -Coming Soon -================================ -Tabulator is actively under development and I plan to have even more useful features implemented soon, including: - -- Data Reactivity -- Custom Row Templates -- Additional Editors and Formatters -- Print Styling -- Multi Cell Editing -- Cell Selection - -Get in touch if there are any features you feel Tabulator needs. diff --git a/Gems/AssetMemoryAnalyzer/External/tabulator-master/bower.json b/Gems/AssetMemoryAnalyzer/External/tabulator-master/bower.json deleted file mode 100644 index 7004cd19c4..0000000000 --- a/Gems/AssetMemoryAnalyzer/External/tabulator-master/bower.json +++ /dev/null @@ -1,40 +0,0 @@ -{ - "name": "tabulator", - "main": "dist/js/tabulator.js", - "version": "4.1.2", - "description": "Interactive table generation JavaScript library", - "keywords": [ - "table", - "grid", - "datagrid", - "tabulator", - "editable", - "cookie", - "jquery", - "jqueryui", - "sort", - "format", - "resizable", - "list", - "scrollable", - "ajax", - "json", - "widget", - "jquery", - "react", - "angular", - "vue" - ], - "authors": [ - "Oli Folkerd" - ], - "license": "MIT", - "homepage": "https://github.com/olifolkerd/tabulator", - "ignore": [ - "**/.*", - "node_modules", - "bower_components", - "test", - "tests" - ] -} diff --git a/Gems/AssetMemoryAnalyzer/External/tabulator-master/dist/css/bootstrap/tabulator_bootstrap.css b/Gems/AssetMemoryAnalyzer/External/tabulator-master/dist/css/bootstrap/tabulator_bootstrap.css deleted file mode 100644 index 23513e7329..0000000000 --- a/Gems/AssetMemoryAnalyzer/External/tabulator-master/dist/css/bootstrap/tabulator_bootstrap.css +++ /dev/null @@ -1,804 +0,0 @@ -/* Tabulator v4.1.2 (c) Oliver Folkerd */ -.tabulator { - position: relative; - background-color: #fff; - overflow: hidden; - font-size: 14px; - text-align: left; - width: 100%; - max-width: 100%; - margin-bottom: 20px; - -ms-transform: translatez(0); - transform: translatez(0); -} - -.tabulator[tabulator-layout="fitDataFill"] .tabulator-tableHolder .tabulator-table { - min-width: 100%; -} - -.tabulator.tabulator-block-select { - -webkit-user-select: none; - -moz-user-select: none; - -ms-user-select: none; - user-select: none; -} - -.tabulator .tabulator-header { - position: relative; - box-sizing: border-box; - width: 100%; - border-bottom: 2px solid #ddd; - background-color: #fff; - font-weight: bold; - white-space: nowrap; - overflow: hidden; - -moz-user-select: none; - -khtml-user-select: none; - -webkit-user-select: none; - -o-user-select: none; -} - -.tabulator .tabulator-header .tabulator-col { - display: inline-block; - position: relative; - box-sizing: border-box; - background-color: #fff; - text-align: left; - vertical-align: bottom; - overflow: hidden; -} - -.tabulator .tabulator-header .tabulator-col.tabulator-moving { - position: absolute; - border: 1px solid #ddd; - background: #e6e6e6; - pointer-events: none; -} - -.tabulator .tabulator-header .tabulator-col .tabulator-col-content { - box-sizing: border-box; - position: relative; - padding: 8px; -} - -.tabulator .tabulator-header .tabulator-col .tabulator-col-content .tabulator-col-title { - box-sizing: border-box; - width: 100%; - white-space: nowrap; - overflow: hidden; - text-overflow: ellipsis; - vertical-align: bottom; -} - -.tabulator .tabulator-header .tabulator-col .tabulator-col-content .tabulator-col-title .tabulator-title-editor { - box-sizing: border-box; - width: 100%; - border: 1px solid #999; - padding: 1px; - background: #fff; -} - -.tabulator .tabulator-header .tabulator-col .tabulator-col-content .tabulator-arrow { - display: inline-block; - position: absolute; - top: 14px; - right: 8px; - width: 0; - height: 0; - border-left: 6px solid transparent; - border-right: 6px solid transparent; - border-bottom: 6px solid #bbb; -} - -.tabulator .tabulator-header .tabulator-col.tabulator-col-group .tabulator-col-group-cols { - position: relative; - display: -ms-flexbox; - display: flex; - border-top: 1px solid #ddd; - overflow: hidden; -} - -.tabulator .tabulator-header .tabulator-col.tabulator-col-group .tabulator-col-group-cols .tabulator-col:last-child { - margin-right: -1px; -} - -.tabulator .tabulator-header .tabulator-col:first-child .tabulator-col-resize-handle.prev { - display: none; -} - -.tabulator .tabulator-header .tabulator-col.ui-sortable-helper { - position: absolute; - background-color: #e6e6e6 !important; - border: 1px solid #ddd; -} - -.tabulator .tabulator-header .tabulator-col .tabulator-header-filter { - position: relative; - box-sizing: border-box; - margin-top: 2px; - width: 100%; - text-align: center; -} - -.tabulator .tabulator-header .tabulator-col .tabulator-header-filter textarea { - height: auto !important; -} - -.tabulator .tabulator-header .tabulator-col .tabulator-header-filter svg { - margin-top: 3px; -} - -.tabulator .tabulator-header .tabulator-col .tabulator-header-filter input::-ms-clear { - width: 0; - height: 0; -} - -.tabulator .tabulator-header .tabulator-col.tabulator-sortable .tabulator-col-title { - padding-right: 25px; -} - -.tabulator .tabulator-header .tabulator-col.tabulator-sortable:hover { - cursor: pointer; - background-color: #e6e6e6; -} - -.tabulator .tabulator-header .tabulator-col.tabulator-sortable[aria-sort="none"] .tabulator-col-content .tabulator-arrow { - border-top: none; - border-bottom: 6px solid #bbb; -} - -.tabulator .tabulator-header .tabulator-col.tabulator-sortable[aria-sort="asc"] .tabulator-col-content .tabulator-arrow { - border-top: none; - border-bottom: 6px solid #666; -} - -.tabulator .tabulator-header .tabulator-col.tabulator-sortable[aria-sort="desc"] .tabulator-col-content .tabulator-arrow { - border-top: 6px solid #666; - border-bottom: none; -} - -.tabulator .tabulator-header .tabulator-col.tabulator-col-vertical .tabulator-col-content .tabulator-col-title { - -webkit-writing-mode: vertical-rl; - -ms-writing-mode: tb-rl; - writing-mode: vertical-rl; - text-orientation: mixed; - display: -ms-flexbox; - display: flex; - -ms-flex-align: center; - align-items: center; - -ms-flex-pack: center; - justify-content: center; -} - -.tabulator .tabulator-header .tabulator-col.tabulator-col-vertical.tabulator-col-vertical-flip .tabulator-col-title { - -ms-transform: rotate(180deg); - transform: rotate(180deg); -} - -.tabulator .tabulator-header .tabulator-col.tabulator-col-vertical.tabulator-sortable .tabulator-col-title { - padding-right: 0; - padding-top: 20px; -} - -.tabulator .tabulator-header .tabulator-col.tabulator-col-vertical.tabulator-sortable.tabulator-col-vertical-flip .tabulator-col-title { - padding-right: 0; - padding-bottom: 20px; -} - -.tabulator .tabulator-header .tabulator-col.tabulator-col-vertical.tabulator-sortable .tabulator-arrow { - right: calc(50% - 6px); -} - -.tabulator .tabulator-header .tabulator-frozen { - display: inline-block; - position: absolute; - z-index: 10; -} - -.tabulator .tabulator-header .tabulator-frozen.tabulator-frozen-left { - border-right: 2px solid #ddd; -} - -.tabulator .tabulator-header .tabulator-frozen.tabulator-frozen-right { - border-left: 2px solid #ddd; -} - -.tabulator .tabulator-header .tabulator-calcs-holder { - box-sizing: border-box; - width: 100%; - background: white !important; - border-top: 1px solid #ddd; - border-bottom: 1px solid #ddd; - overflow: hidden; -} - -.tabulator .tabulator-header .tabulator-calcs-holder .tabulator-row { - background: white !important; -} - -.tabulator .tabulator-header .tabulator-calcs-holder .tabulator-row .tabulator-col-resize-handle { - display: none; -} - -.tabulator .tabulator-header .tabulator-frozen-rows-holder { - min-width: 400%; -} - -.tabulator .tabulator-header .tabulator-frozen-rows-holder:empty { - display: none; -} - -.tabulator .tabulator-tableHolder { - position: relative; - width: 100%; - white-space: nowrap; - overflow: auto; - -webkit-overflow-scrolling: touch; -} - -.tabulator .tabulator-tableHolder:focus { - outline: none; -} - -.tabulator .tabulator-tableHolder .tabulator-placeholder { - box-sizing: border-box; - display: -ms-flexbox; - display: flex; - -ms-flex-align: center; - align-items: center; - width: 100%; -} - -.tabulator .tabulator-tableHolder .tabulator-placeholder[tabulator-render-mode="virtual"] { - position: absolute; - top: 0; - left: 0; - height: 100%; -} - -.tabulator .tabulator-tableHolder .tabulator-placeholder span { - display: inline-block; - margin: 0 auto; - padding: 10px; - color: #000; - font-weight: bold; - font-size: 20px; -} - -.tabulator .tabulator-tableHolder .tabulator-table { - position: relative; - display: inline-block; - background-color: #fff; - white-space: nowrap; - overflow: visible; -} - -.tabulator .tabulator-tableHolder .tabulator-table .tabulator-row.tabulator-calcs { - font-weight: bold; - background: #ececec !important; -} - -.tabulator .tabulator-tableHolder .tabulator-table .tabulator-row.tabulator-calcs.tabulator-calcs-top { - border-bottom: 2px solid #ddd; -} - -.tabulator .tabulator-tableHolder .tabulator-table .tabulator-row.tabulator-calcs.tabulator-calcs-bottom { - border-top: 2px solid #ddd; -} - -.tabulator .tabulator-col-resize-handle { - position: absolute; - right: 0; - top: 0; - bottom: 0; - width: 5px; -} - -.tabulator .tabulator-col-resize-handle.prev { - left: 0; - right: auto; -} - -.tabulator .tabulator-col-resize-handle:hover { - cursor: ew-resize; -} - -.tabulator .tabulator-footer { - padding: 5px 10px; - border-top: 2px solid #ddd; - text-align: right; - font-weight: bold; - white-space: nowrap; - -ms-user-select: none; - user-select: none; - -moz-user-select: none; - -khtml-user-select: none; - -webkit-user-select: none; - -o-user-select: none; -} - -.tabulator .tabulator-footer .tabulator-calcs-holder { - box-sizing: border-box; - width: calc(100% + 20px); - margin: -5px -10px 5px -10px; - text-align: left; - background: white !important; - border-bottom: 1px solid #ddd; - border-top: 1px solid #ddd; - overflow: hidden; -} - -.tabulator .tabulator-footer .tabulator-calcs-holder .tabulator-row { - background: white !important; -} - -.tabulator .tabulator-footer .tabulator-calcs-holder .tabulator-row .tabulator-col-resize-handle { - display: none; -} - -.tabulator .tabulator-footer .tabulator-calcs-holder:only-child { - margin-bottom: -5px; - border-bottom: none; -} - -.tabulator .tabulator-footer .tabulator-pages { - margin: 0 7px; -} - -.tabulator .tabulator-footer .tabulator-page { - display: inline-block; - margin: 0 2px; - border: 1px solid #ddd; - border-radius: 3px; - padding: 2px 5px; - background: rgba(255, 255, 255, 0.2); - font-family: inherit; - font-weight: inherit; - font-size: inherit; -} - -.tabulator .tabulator-footer .tabulator-page.active { - color: #d00; -} - -.tabulator .tabulator-footer .tabulator-page:disabled { - opacity: .5; -} - -.tabulator .tabulator-footer .tabulator-page:not(.disabled):hover { - cursor: pointer; - background: rgba(0, 0, 0, 0.2); - color: #fff; -} - -.tabulator .tabulator-loader { - position: absolute; - display: -ms-flexbox; - display: flex; - -ms-flex-align: center; - align-items: center; - top: 0; - left: 0; - z-index: 100; - height: 100%; - width: 100%; - background: rgba(0, 0, 0, 0.4); - text-align: center; -} - -.tabulator .tabulator-loader .tabulator-loader-msg { - display: inline-block; - margin: 0 auto; - padding: 10px 20px; - border-radius: 10px; - background: #fff; - font-weight: bold; - font-size: 16px; -} - -.tabulator .tabulator-loader .tabulator-loader-msg.tabulator-loading { - border: 4px solid #333; - color: #000; -} - -.tabulator .tabulator-loader .tabulator-loader-msg.tabulator-error { - border: 4px solid #D00; - color: #590000; -} - -.tabulator.table-striped .tabulator-row:nth-child(even) { - background-color: #f9f9f9; -} - -.tabulator.table-bordered { - border: 1px solid #ddd; -} - -.tabulator.table-bordered .tabulator-header .tabulator-col { - border-right: 1px solid #ddd; -} - -.tabulator.table-bordered .tabulator-tableHolder .tabulator-table .tabulator-row .tabulator-cell { - border-right: 1px solid #ddd; -} - -.tabulator.table-condensed .tabulator-header .tabulator-col .tabulator-col-content { - padding: 5px; -} - -.tabulator.table-condensed .tabulator-tableHolder .tabulator-table .tabulator-row { - min-height: 24px; -} - -.tabulator.table-condensed .tabulator-tableHolder .tabulator-table .tabulator-row .tabulator-cell { - padding: 5px; -} - -.tabulator .tabulator-tableHolder .tabulator-table .tabulator-row.active { - background: #f5f5f5 !important; -} - -.tabulator .tabulator-tableHolder .tabulator-table .tabulator-row.success { - background: #dff0d8 !important; -} - -.tabulator .tabulator-tableHolder .tabulator-table .tabulator-row.info { - background: #d9edf7 !important; -} - -.tabulator .tabulator-tableHolder .tabulator-table .tabulator-row.warning { - background: #fcf8e3 !important; -} - -.tabulator .tabulator-tableHolder .tabulator-table .tabulator-row.danger { - background: #f2dede !important; -} - -.tabulator-row { - position: relative; - box-sizing: border-box; - min-height: 30px; - background-color: #fff; - border-bottom: 1px solid #ddd; -} - -.tabulator-row.tabulator-selectable:hover { - background-color: #f5f5f5 !important; - cursor: pointer; -} - -.tabulator-row.tabulator-selected { - background-color: #9ABCEA; -} - -.tabulator-row.tabulator-selected:hover { - background-color: #769BCC; - cursor: pointer; -} - -.tabulator-row.tabulator-moving { - position: absolute; - border-top: 1px solid #ddd; - border-bottom: 1px solid #ddd; - pointer-events: none !important; - z-index: 15; -} - -.tabulator-row .tabulator-row-resize-handle { - position: absolute; - right: 0; - bottom: 0; - left: 0; - height: 5px; -} - -.tabulator-row .tabulator-row-resize-handle.prev { - top: 0; - bottom: auto; -} - -.tabulator-row .tabulator-row-resize-handle:hover { - cursor: ns-resize; -} - -.tabulator-row .tabulator-frozen { - display: inline-block; - position: absolute; - background-color: inherit; - z-index: 10; -} - -.tabulator-row .tabulator-frozen.tabulator-frozen-left { - border-right: 2px solid #ddd; -} - -.tabulator-row .tabulator-frozen.tabulator-frozen-right { - border-left: 2px solid #ddd; -} - -.tabulator-row .tabulator-responsive-collapse { - box-sizing: border-box; - padding: 5px; - border-top: 1px solid #ddd; - border-bottom: 1px solid #ddd; -} - -.tabulator-row .tabulator-responsive-collapse:empty { - display: none; -} - -.tabulator-row .tabulator-responsive-collapse table { - font-size: 14px; -} - -.tabulator-row .tabulator-responsive-collapse table tr td { - position: relative; -} - -.tabulator-row .tabulator-responsive-collapse table tr td:first-of-type { - padding-right: 10px; -} - -.tabulator-row .tabulator-cell { - display: inline-block; - position: relative; - box-sizing: border-box; - padding: 8px; - vertical-align: middle; - white-space: nowrap; - overflow: hidden; - text-overflow: ellipsis; -} - -.tabulator-row .tabulator-cell:last-of-type { - border-right: none; -} - -.tabulator-row .tabulator-cell.tabulator-editing { - border: 1px solid #1D68CD; - padding: 0; -} - -.tabulator-row .tabulator-cell.tabulator-editing input, .tabulator-row .tabulator-cell.tabulator-editing select { - border: 1px; - background: transparent; -} - -.tabulator-row .tabulator-cell.tabulator-validation-fail { - border: 1px solid #dd0000; -} - -.tabulator-row .tabulator-cell.tabulator-validation-fail input, .tabulator-row .tabulator-cell.tabulator-validation-fail select { - border: 1px; - background: transparent; - color: #dd0000; -} - -.tabulator-row .tabulator-cell:first-child .tabulator-col-resize-handle.prev { - display: none; -} - -.tabulator-row .tabulator-cell.tabulator-row-handle { - display: -ms-inline-flexbox; - display: inline-flex; - -ms-flex-align: center; - align-items: center; - -moz-user-select: none; - -khtml-user-select: none; - -webkit-user-select: none; - -o-user-select: none; -} - -.tabulator-row .tabulator-cell.tabulator-row-handle .tabulator-row-handle-box { - width: 80%; -} - -.tabulator-row .tabulator-cell.tabulator-row-handle .tabulator-row-handle-box .tabulator-row-handle-bar { - width: 100%; - height: 3px; - margin-top: 2px; - background: #666; -} - -.tabulator-row .tabulator-cell .tabulator-data-tree-branch { - display: inline-block; - vertical-align: middle; - height: 9px; - width: 7px; - margin-top: -9px; - margin-right: 5px; - border-bottom-left-radius: 1px; - border-left: 2px solid #ddd; - border-bottom: 2px solid #ddd; -} - -.tabulator-row .tabulator-cell .tabulator-data-tree-control { - display: -ms-inline-flexbox; - display: inline-flex; - -ms-flex-pack: center; - justify-content: center; - -ms-flex-align: center; - align-items: center; - vertical-align: middle; - height: 11px; - width: 11px; - margin-right: 5px; - border: 1px solid #333; - border-radius: 2px; - background: rgba(0, 0, 0, 0.1); - overflow: hidden; -} - -.tabulator-row .tabulator-cell .tabulator-data-tree-control:hover { - cursor: pointer; - background: rgba(0, 0, 0, 0.2); -} - -.tabulator-row .tabulator-cell .tabulator-data-tree-control .tabulator-data-tree-control-collapse { - display: inline-block; - position: relative; - height: 7px; - width: 1px; - background: transparent; -} - -.tabulator-row .tabulator-cell .tabulator-data-tree-control .tabulator-data-tree-control-collapse:after { - position: absolute; - content: ""; - left: -3px; - top: 3px; - height: 1px; - width: 7px; - background: #333; -} - -.tabulator-row .tabulator-cell .tabulator-data-tree-control .tabulator-data-tree-control-expand { - display: inline-block; - position: relative; - height: 7px; - width: 1px; - background: #333; -} - -.tabulator-row .tabulator-cell .tabulator-data-tree-control .tabulator-data-tree-control-expand:after { - position: absolute; - content: ""; - left: -3px; - top: 3px; - height: 1px; - width: 7px; - background: #333; -} - -.tabulator-row .tabulator-cell .tabulator-responsive-collapse-toggle { - display: -ms-inline-flexbox; - display: inline-flex; - -ms-flex-align: center; - align-items: center; - -ms-flex-pack: center; - justify-content: center; - -moz-user-select: none; - -khtml-user-select: none; - -webkit-user-select: none; - -o-user-select: none; - height: 15px; - width: 15px; - border-radius: 20px; - background: #666; - color: #fff; - font-weight: bold; - font-size: 1.1em; -} - -.tabulator-row .tabulator-cell .tabulator-responsive-collapse-toggle:hover { - opacity: .7; -} - -.tabulator-row .tabulator-cell .tabulator-responsive-collapse-toggle.open .tabulator-responsive-collapse-toggle-close { - display: initial; -} - -.tabulator-row .tabulator-cell .tabulator-responsive-collapse-toggle.open .tabulator-responsive-collapse-toggle-open { - display: none; -} - -.tabulator-row .tabulator-cell .tabulator-responsive-collapse-toggle .tabulator-responsive-collapse-toggle-close { - display: none; -} - -.tabulator-row.tabulator-group { - box-sizing: border-box; - border-bottom: 1px solid #999; - border-right: 1px solid #ddd; - border-top: 1px solid #999; - padding: 5px; - padding-left: 10px; - background: #fafafa; - font-weight: bold; - min-width: 100%; -} - -.tabulator-row.tabulator-group:hover { - cursor: pointer; - background-color: rgba(0, 0, 0, 0.1); -} - -.tabulator-row.tabulator-group.tabulator-group-visible .tabulator-arrow { - margin-right: 10px; - border-left: 6px solid transparent; - border-right: 6px solid transparent; - border-top: 6px solid #666; - border-bottom: 0; -} - -.tabulator-row.tabulator-group.tabulator-group-level-1 .tabulator-arrow { - margin-left: 20px; -} - -.tabulator-row.tabulator-group.tabulator-group-level-2 .tabulator-arrow { - margin-left: 40px; -} - -.tabulator-row.tabulator-group.tabulator-group-level-3 .tabulator-arrow { - margin-left: 60px; -} - -.tabulator-row.tabulator-group.tabulator-group-level-4 .tabulator-arrow { - margin-left: 80px; -} - -.tabulator-row.tabulator-group.tabulator-group-level-5 .tabulator-arrow { - margin-left: 100px; -} - -.tabulator-row.tabulator-group .tabulator-arrow { - display: inline-block; - width: 0; - height: 0; - margin-right: 16px; - border-top: 6px solid transparent; - border-bottom: 6px solid transparent; - border-right: 0; - border-left: 6px solid #666; - vertical-align: middle; -} - -.tabulator-row.tabulator-group span { - margin-left: 10px; - color: #666; -} - -.tabulator-edit-select-list { - position: absolute; - display: inline-block; - box-sizing: border-box; - max-height: 200px; - background: #fff; - border: 1px solid #ddd; - font-size: 14px; - overflow-y: auto; - -webkit-overflow-scrolling: touch; - z-index: 10000; -} - -.tabulator-edit-select-list .tabulator-edit-select-list-item { - padding: 4px; -} - -.tabulator-edit-select-list .tabulator-edit-select-list-item.active { - color: #fff; - background: #1D68CD; -} - -.tabulator-edit-select-list .tabulator-edit-select-list-item:hover { - cursor: pointer; - color: #fff; - background: #1D68CD; -} - -.tabulator-edit-select-list .tabulator-edit-select-list-group { - border-bottom: 1px solid #ddd; - padding: 4px; - padding-top: 6px; - font-weight: bold; -} diff --git a/Gems/AssetMemoryAnalyzer/External/tabulator-master/dist/css/bootstrap/tabulator_bootstrap.min.css b/Gems/AssetMemoryAnalyzer/External/tabulator-master/dist/css/bootstrap/tabulator_bootstrap.min.css deleted file mode 100644 index 47a2815c69..0000000000 --- a/Gems/AssetMemoryAnalyzer/External/tabulator-master/dist/css/bootstrap/tabulator_bootstrap.min.css +++ /dev/null @@ -1,3 +0,0 @@ -/* Tabulator v4.1.2 (c) Oliver Folkerd */ -.tabulator{position:relative;background-color:#fff;overflow:hidden;font-size:14px;text-align:left;width:100%;max-width:100%;margin-bottom:20px;transform:translatez(0)}.tabulator[tabulator-layout=fitDataFill] .tabulator-tableHolder .tabulator-table{min-width:100%}.tabulator.tabulator-block-select{-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}.tabulator .tabulator-header{width:100%;border-bottom:2px solid #ddd;font-weight:700;white-space:nowrap;-moz-user-select:none;-khtml-user-select:none;-webkit-user-select:none;-o-user-select:none}.tabulator .tabulator-header,.tabulator .tabulator-header .tabulator-col{position:relative;box-sizing:border-box;background-color:#fff;overflow:hidden}.tabulator .tabulator-header .tabulator-col{display:inline-block;text-align:left;vertical-align:bottom}.tabulator .tabulator-header .tabulator-col.tabulator-moving{position:absolute;border:1px solid #ddd;background:#e6e6e6;pointer-events:none}.tabulator .tabulator-header .tabulator-col .tabulator-col-content{box-sizing:border-box;position:relative;padding:8px}.tabulator .tabulator-header .tabulator-col .tabulator-col-content .tabulator-col-title{box-sizing:border-box;width:100%;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;vertical-align:bottom}.tabulator .tabulator-header .tabulator-col .tabulator-col-content .tabulator-col-title .tabulator-title-editor{box-sizing:border-box;width:100%;border:1px solid #999;padding:1px;background:#fff}.tabulator .tabulator-header .tabulator-col .tabulator-col-content .tabulator-arrow{display:inline-block;position:absolute;top:14px;right:8px;width:0;height:0;border-left:6px solid transparent;border-right:6px solid transparent;border-bottom:6px solid #bbb}.tabulator .tabulator-header .tabulator-col.tabulator-col-group .tabulator-col-group-cols{position:relative;display:-ms-flexbox;display:flex;border-top:1px solid #ddd;overflow:hidden}.tabulator .tabulator-header .tabulator-col.tabulator-col-group .tabulator-col-group-cols .tabulator-col:last-child{margin-right:-1px}.tabulator .tabulator-header .tabulator-col:first-child .tabulator-col-resize-handle.prev{display:none}.tabulator .tabulator-header .tabulator-col.ui-sortable-helper{position:absolute;background-color:#e6e6e6!important;border:1px solid #ddd}.tabulator .tabulator-header .tabulator-col .tabulator-header-filter{position:relative;box-sizing:border-box;margin-top:2px;width:100%;text-align:center}.tabulator .tabulator-header .tabulator-col .tabulator-header-filter textarea{height:auto!important}.tabulator .tabulator-header .tabulator-col .tabulator-header-filter svg{margin-top:3px}.tabulator .tabulator-header .tabulator-col .tabulator-header-filter input::-ms-clear{width:0;height:0}.tabulator .tabulator-header .tabulator-col.tabulator-sortable .tabulator-col-title{padding-right:25px}.tabulator .tabulator-header .tabulator-col.tabulator-sortable:hover{cursor:pointer;background-color:#e6e6e6}.tabulator .tabulator-header .tabulator-col.tabulator-sortable[aria-sort=none] .tabulator-col-content .tabulator-arrow{border-top:none;border-bottom:6px solid #bbb}.tabulator .tabulator-header .tabulator-col.tabulator-sortable[aria-sort=asc] .tabulator-col-content .tabulator-arrow{border-top:none;border-bottom:6px solid #666}.tabulator .tabulator-header .tabulator-col.tabulator-sortable[aria-sort=desc] .tabulator-col-content .tabulator-arrow{border-top:6px solid #666;border-bottom:none}.tabulator .tabulator-header .tabulator-col.tabulator-col-vertical .tabulator-col-content .tabulator-col-title{-webkit-writing-mode:vertical-rl;-ms-writing-mode:tb-rl;writing-mode:vertical-rl;text-orientation:mixed;display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;-ms-flex-pack:center;justify-content:center}.tabulator .tabulator-header .tabulator-col.tabulator-col-vertical.tabulator-col-vertical-flip .tabulator-col-title{transform:rotate(180deg)}.tabulator .tabulator-header .tabulator-col.tabulator-col-vertical.tabulator-sortable .tabulator-col-title{padding-right:0;padding-top:20px}.tabulator .tabulator-header .tabulator-col.tabulator-col-vertical.tabulator-sortable.tabulator-col-vertical-flip .tabulator-col-title{padding-right:0;padding-bottom:20px}.tabulator .tabulator-header .tabulator-col.tabulator-col-vertical.tabulator-sortable .tabulator-arrow{right:calc(50% - 6px)}.tabulator .tabulator-header .tabulator-frozen{display:inline-block;position:absolute;z-index:1}.tabulator .tabulator-header .tabulator-frozen.tabulator-frozen-left{border-right:2px solid #ddd}.tabulator .tabulator-header .tabulator-frozen.tabulator-frozen-right{border-left:2px solid #ddd}.tabulator .tabulator-header .tabulator-calcs-holder{box-sizing:border-box;width:100%;background:#fff!important;border-top:1px solid #ddd;border-bottom:1px solid #ddd;overflow:hidden}.tabulator .tabulator-header .tabulator-calcs-holder .tabulator-row{background:#fff!important}.tabulator .tabulator-header .tabulator-calcs-holder .tabulator-row .tabulator-col-resize-handle{display:none}.tabulator .tabulator-header .tabulator-frozen-rows-holder{min-width:400%}.tabulator .tabulator-header .tabulator-frozen-rows-holder:empty{display:none}.tabulator .tabulator-tableHolder{position:relative;width:100%;white-space:nowrap;overflow:auto;-webkit-overflow-scrolling:touch}.tabulator .tabulator-tableHolder:focus{outline:none}.tabulator .tabulator-tableHolder .tabulator-placeholder{box-sizing:border-box;display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;width:100%}.tabulator .tabulator-tableHolder .tabulator-placeholder[tabulator-render-mode=virtual]{position:absolute;top:0;left:0;height:100%}.tabulator .tabulator-tableHolder .tabulator-placeholder span{display:inline-block;margin:0 auto;padding:10px;color:#000;font-weight:700;font-size:20px}.tabulator .tabulator-tableHolder .tabulator-table{position:relative;display:inline-block;background-color:#fff;white-space:nowrap;overflow:visible}.tabulator .tabulator-tableHolder .tabulator-table .tabulator-row.tabulator-calcs{font-weight:700;background:#ececec!important}.tabulator .tabulator-tableHolder .tabulator-table .tabulator-row.tabulator-calcs.tabulator-calcs-top{border-bottom:2px solid #ddd}.tabulator .tabulator-tableHolder .tabulator-table .tabulator-row.tabulator-calcs.tabulator-calcs-bottom{border-top:2px solid #ddd}.tabulator .tabulator-col-resize-handle{position:absolute;right:0;top:0;bottom:0;width:5px}.tabulator .tabulator-col-resize-handle.prev{left:0;right:auto}.tabulator .tabulator-col-resize-handle:hover{cursor:ew-resize}.tabulator .tabulator-footer{padding:5px 10px;border-top:2px solid #ddd;text-align:right;font-weight:700;white-space:nowrap;-ms-user-select:none;user-select:none;-moz-user-select:none;-khtml-user-select:none;-webkit-user-select:none;-o-user-select:none}.tabulator .tabulator-footer .tabulator-calcs-holder{box-sizing:border-box;width:calc(100% + 20px);margin:-5px -10px 5px;text-align:left;background:#fff!important;border-bottom:1px solid #ddd;border-top:1px solid #ddd;overflow:hidden}.tabulator .tabulator-footer .tabulator-calcs-holder .tabulator-row{background:#fff!important}.tabulator .tabulator-footer .tabulator-calcs-holder .tabulator-row .tabulator-col-resize-handle{display:none}.tabulator .tabulator-footer .tabulator-calcs-holder:only-child{margin-bottom:-5px;border-bottom:none}.tabulator .tabulator-footer .tabulator-pages{margin:0 7px}.tabulator .tabulator-footer .tabulator-page{display:inline-block;margin:0 2px;border:1px solid #ddd;border-radius:3px;padding:2px 5px;background:hsla(0,0%,100%,.2);font-family:inherit;font-weight:inherit;font-size:inherit}.tabulator .tabulator-footer .tabulator-page.active{color:#d00}.tabulator .tabulator-footer .tabulator-page:disabled{opacity:.5}.tabulator .tabulator-footer .tabulator-page:not(.disabled):hover{cursor:pointer;background:rgba(0,0,0,.2);color:#fff}.tabulator .tabulator-loader{position:absolute;display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;top:0;left:0;z-index:3;height:100%;width:100%;background:rgba(0,0,0,.4);text-align:center}.tabulator .tabulator-loader .tabulator-loader-msg{display:inline-block;margin:0 auto;padding:10px 20px;border-radius:10px;background:#fff;font-weight:700;font-size:16px}.tabulator .tabulator-loader .tabulator-loader-msg.tabulator-loading{border:4px solid #333;color:#000}.tabulator .tabulator-loader .tabulator-loader-msg.tabulator-error{border:4px solid #d00;color:#590000}.tabulator.table-striped .tabulator-row:nth-child(2n){background-color:#f9f9f9}.tabulator.table-bordered{border:1px solid #ddd}.tabulator.table-bordered .tabulator-header .tabulator-col,.tabulator.table-bordered .tabulator-tableHolder .tabulator-table .tabulator-row .tabulator-cell{border-right:1px solid #ddd}.tabulator.table-condensed .tabulator-header .tabulator-col .tabulator-col-content{padding:5px}.tabulator.table-condensed .tabulator-tableHolder .tabulator-table .tabulator-row{min-height:24px}.tabulator.table-condensed .tabulator-tableHolder .tabulator-table .tabulator-row .tabulator-cell{padding:5px}.tabulator .tabulator-tableHolder .tabulator-table .tabulator-row.active{background:#f5f5f5!important}.tabulator .tabulator-tableHolder .tabulator-table .tabulator-row.success{background:#dff0d8!important}.tabulator .tabulator-tableHolder .tabulator-table .tabulator-row.info{background:#d9edf7!important}.tabulator .tabulator-tableHolder .tabulator-table .tabulator-row.warning{background:#fcf8e3!important}.tabulator .tabulator-tableHolder .tabulator-table .tabulator-row.danger{background:#f2dede!important}.tabulator-row{position:relative;box-sizing:border-box;min-height:30px;background-color:#fff;border-bottom:1px solid #ddd}.tabulator-row.tabulator-selectable:hover{background-color:#f5f5f5!important;cursor:pointer}.tabulator-row.tabulator-selected{background-color:#9abcea}.tabulator-row.tabulator-selected:hover{background-color:#769bcc;cursor:pointer}.tabulator-row.tabulator-moving{position:absolute;border-top:1px solid #ddd;border-bottom:1px solid #ddd;pointer-events:none!important;z-index:2}.tabulator-row .tabulator-row-resize-handle{position:absolute;right:0;bottom:0;left:0;height:5px}.tabulator-row .tabulator-row-resize-handle.prev{top:0;bottom:auto}.tabulator-row .tabulator-row-resize-handle:hover{cursor:ns-resize}.tabulator-row .tabulator-frozen{display:inline-block;position:absolute;background-color:inherit;z-index:1}.tabulator-row .tabulator-frozen.tabulator-frozen-left{border-right:2px solid #ddd}.tabulator-row .tabulator-frozen.tabulator-frozen-right{border-left:2px solid #ddd}.tabulator-row .tabulator-responsive-collapse{box-sizing:border-box;padding:5px;border-top:1px solid #ddd;border-bottom:1px solid #ddd}.tabulator-row .tabulator-responsive-collapse:empty{display:none}.tabulator-row .tabulator-responsive-collapse table{font-size:14px}.tabulator-row .tabulator-responsive-collapse table tr td{position:relative}.tabulator-row .tabulator-responsive-collapse table tr td:first-of-type{padding-right:10px}.tabulator-row .tabulator-cell{display:inline-block;position:relative;box-sizing:border-box;padding:8px;vertical-align:middle;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.tabulator-row .tabulator-cell:last-of-type{border-right:none}.tabulator-row .tabulator-cell.tabulator-editing{border:1px solid #1d68cd;padding:0}.tabulator-row .tabulator-cell.tabulator-editing input,.tabulator-row .tabulator-cell.tabulator-editing select{border:1px;background:transparent}.tabulator-row .tabulator-cell.tabulator-validation-fail{border:1px solid #d00}.tabulator-row .tabulator-cell.tabulator-validation-fail input,.tabulator-row .tabulator-cell.tabulator-validation-fail select{border:1px;background:transparent;color:#d00}.tabulator-row .tabulator-cell:first-child .tabulator-col-resize-handle.prev{display:none}.tabulator-row .tabulator-cell.tabulator-row-handle{display:-ms-inline-flexbox;display:inline-flex;-ms-flex-align:center;align-items:center;-moz-user-select:none;-khtml-user-select:none;-webkit-user-select:none;-o-user-select:none}.tabulator-row .tabulator-cell.tabulator-row-handle .tabulator-row-handle-box{width:80%}.tabulator-row .tabulator-cell.tabulator-row-handle .tabulator-row-handle-box .tabulator-row-handle-bar{width:100%;height:3px;margin-top:2px;background:#666}.tabulator-row .tabulator-cell .tabulator-data-tree-branch{display:inline-block;vertical-align:middle;height:9px;width:7px;margin-top:-9px;margin-right:5px;border-bottom-left-radius:1px;border-left:2px solid #ddd;border-bottom:2px solid #ddd}.tabulator-row .tabulator-cell .tabulator-data-tree-control{display:-ms-inline-flexbox;display:inline-flex;-ms-flex-pack:center;justify-content:center;-ms-flex-align:center;align-items:center;vertical-align:middle;height:11px;width:11px;margin-right:5px;border:1px solid #333;border-radius:2px;background:rgba(0,0,0,.1);overflow:hidden}.tabulator-row .tabulator-cell .tabulator-data-tree-control:hover{cursor:pointer;background:rgba(0,0,0,.2)}.tabulator-row .tabulator-cell .tabulator-data-tree-control .tabulator-data-tree-control-collapse{display:inline-block;position:relative;height:7px;width:1px;background:transparent}.tabulator-row .tabulator-cell .tabulator-data-tree-control .tabulator-data-tree-control-collapse:after{position:absolute;content:"";left:-3px;top:3px;height:1px;width:7px;background:#333}.tabulator-row .tabulator-cell .tabulator-data-tree-control .tabulator-data-tree-control-expand{display:inline-block;position:relative;height:7px;width:1px;background:#333}.tabulator-row .tabulator-cell .tabulator-data-tree-control .tabulator-data-tree-control-expand:after{position:absolute;content:"";left:-3px;top:3px;height:1px;width:7px;background:#333}.tabulator-row .tabulator-cell .tabulator-responsive-collapse-toggle{display:-ms-inline-flexbox;display:inline-flex;-ms-flex-align:center;align-items:center;-ms-flex-pack:center;justify-content:center;-moz-user-select:none;-khtml-user-select:none;-webkit-user-select:none;-o-user-select:none;height:15px;width:15px;border-radius:20px;background:#666;color:#fff;font-weight:700;font-size:1.1em}.tabulator-row .tabulator-cell .tabulator-responsive-collapse-toggle:hover{opacity:.7}.tabulator-row .tabulator-cell .tabulator-responsive-collapse-toggle.open .tabulator-responsive-collapse-toggle-close{display:initial}.tabulator-row .tabulator-cell .tabulator-responsive-collapse-toggle.open .tabulator-responsive-collapse-toggle-open,.tabulator-row .tabulator-cell .tabulator-responsive-collapse-toggle .tabulator-responsive-collapse-toggle-close{display:none}.tabulator-row.tabulator-group{box-sizing:border-box;border-bottom:1px solid #999;border-right:1px solid #ddd;border-top:1px solid #999;padding:5px;padding-left:10px;background:#fafafa;font-weight:700;min-width:100%}.tabulator-row.tabulator-group:hover{cursor:pointer;background-color:rgba(0,0,0,.1)}.tabulator-row.tabulator-group.tabulator-group-visible .tabulator-arrow{margin-right:10px;border-left:6px solid transparent;border-right:6px solid transparent;border-top:6px solid #666;border-bottom:0}.tabulator-row.tabulator-group.tabulator-group-level-1 .tabulator-arrow{margin-left:20px}.tabulator-row.tabulator-group.tabulator-group-level-2 .tabulator-arrow{margin-left:40px}.tabulator-row.tabulator-group.tabulator-group-level-3 .tabulator-arrow{margin-left:60px}.tabulator-row.tabulator-group.tabulator-group-level-4 .tabulator-arrow{margin-left:80px}.tabulator-row.tabulator-group.tabulator-group-level-5 .tabulator-arrow{margin-left:100px}.tabulator-row.tabulator-group .tabulator-arrow{display:inline-block;width:0;height:0;margin-right:16px;border-top:6px solid transparent;border-bottom:6px solid transparent;border-right:0;border-left:6px solid #666;vertical-align:middle}.tabulator-row.tabulator-group span{margin-left:10px;color:#666}.tabulator-edit-select-list{position:absolute;display:inline-block;box-sizing:border-box;max-height:200px;background:#fff;border:1px solid #ddd;font-size:14px;overflow-y:auto;-webkit-overflow-scrolling:touch;z-index:4}.tabulator-edit-select-list .tabulator-edit-select-list-item{padding:4px}.tabulator-edit-select-list .tabulator-edit-select-list-item.active{color:#fff;background:#1d68cd}.tabulator-edit-select-list .tabulator-edit-select-list-item:hover{cursor:pointer;color:#fff;background:#1d68cd}.tabulator-edit-select-list .tabulator-edit-select-list-group{border-bottom:1px solid #ddd;padding:4px;padding-top:6px;font-weight:700} -/*# sourceMappingURL=tabulator_bootstrap.min.css.map */ diff --git a/Gems/AssetMemoryAnalyzer/External/tabulator-master/dist/css/bootstrap/tabulator_bootstrap.min.css.map b/Gems/AssetMemoryAnalyzer/External/tabulator-master/dist/css/bootstrap/tabulator_bootstrap.min.css.map deleted file mode 100644 index 9980be3347..0000000000 --- a/Gems/AssetMemoryAnalyzer/External/tabulator-master/dist/css/bootstrap/tabulator_bootstrap.min.css.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"sources":["tabulator_bootstrap.min.css"],"names":[],"mappings":"AACA,WACE,kBAAmB,AACnB,sBAAuB,AACvB,gBAAiB,AACjB,eAAgB,AAChB,gBAAiB,AACjB,WAAY,AACZ,eAAgB,AAChB,mBAAoB,AAEpB,uBAAyB,CAC1B,AAED,iFACE,cAAgB,CACjB,AAED,kCACE,yBAA0B,AACvB,sBAAuB,AACtB,qBAAsB,AAClB,gBAAkB,CAC3B,AAED,6BAGE,WAAY,AACZ,6BAA8B,AAE9B,gBAAkB,AAClB,mBAAoB,AAEpB,sBAAuB,AACvB,wBAAyB,AACzB,yBAA0B,AAC1B,mBAAqB,CACtB,AAED,yEAdE,kBAAmB,AACnB,sBAAuB,AAGvB,sBAAuB,AAGvB,eAAiB,CAOnB,AAQC,4CAPC,qBAAsB,AAItB,gBAAiB,AACjB,qBAAuB,CAExB,AAED,6DACE,kBAAmB,AACnB,sBAAuB,AACvB,mBAAoB,AACpB,mBAAqB,CACtB,AAED,mEACE,sBAAuB,AACvB,kBAAmB,AACnB,WAAa,CACd,AAED,wFACE,sBAAuB,AACvB,WAAY,AACZ,mBAAoB,AACpB,gBAAiB,AACjB,uBAAwB,AACxB,qBAAuB,CACxB,AAED,gHACE,sBAAuB,AACvB,WAAY,AACZ,sBAAuB,AACvB,YAAa,AACb,eAAiB,CAClB,AAED,oFACE,qBAAsB,AACtB,kBAAmB,AACnB,SAAU,AACV,UAAW,AACX,QAAS,AACT,SAAU,AACV,kCAAmC,AACnC,mCAAoC,AACpC,4BAA8B,CAC/B,AAED,0FACE,kBAAmB,AACnB,oBAAqB,AACrB,aAAc,AACd,0BAA2B,AAC3B,eAAiB,CAClB,AAED,oHACE,iBAAmB,CACpB,AAED,0FACE,YAAc,CACf,AAED,+DACE,kBAAmB,AACnB,mCAAqC,AACrC,qBAAuB,CACxB,AAED,qEACE,kBAAmB,AACnB,sBAAuB,AACvB,eAAgB,AAChB,WAAY,AACZ,iBAAmB,CACpB,AAED,8EACE,qBAAwB,CACzB,AAED,yEACE,cAAgB,CACjB,AAED,sFACE,QAAS,AACT,QAAU,CACX,AAED,oFACE,kBAAoB,CACrB,AAED,qEACE,eAAgB,AAChB,wBAA0B,CAC3B,AAED,uHACE,gBAAiB,AACjB,4BAA8B,CAC/B,AAED,sHACE,gBAAiB,AACjB,4BAA8B,CAC/B,AAED,uHACE,0BAA2B,AAC3B,kBAAoB,CACrB,AAED,+GACE,iCAAkC,AAC9B,uBAAwB,AACpB,yBAA0B,AAClC,uBAAwB,AACxB,oBAAqB,AACrB,aAAc,AACd,sBAAuB,AACnB,mBAAoB,AACxB,qBAAsB,AAClB,sBAAwB,CAC7B,AAED,oHAEM,wBAA0B,CAC/B,AAED,2GACE,gBAAiB,AACjB,gBAAkB,CACnB,AAED,uIACE,gBAAiB,AACjB,mBAAqB,CACtB,AAED,uGACE,qBAAuB,CACxB,AAED,+CACE,qBAAsB,AACtB,kBAAmB,AACnB,SAAY,CACb,AAED,qEACE,2BAA6B,CAC9B,AAED,sEACE,0BAA4B,CAC7B,AAED,qDACE,sBAAuB,AACvB,WAAY,AACZ,0BAA6B,AAC7B,0BAA2B,AAC3B,6BAA8B,AAC9B,eAAiB,CAClB,AAED,oEACE,yBAA6B,CAC9B,AAED,iGACE,YAAc,CACf,AAED,2DACE,cAAgB,CACjB,AAED,iEACE,YAAc,CACf,AAED,kCACE,kBAAmB,AACnB,WAAY,AACZ,mBAAoB,AACpB,cAAe,AACf,gCAAkC,CACnC,AAED,wCACE,YAAc,CACf,AAED,yDACE,sBAAuB,AACvB,oBAAqB,AACrB,aAAc,AACd,sBAAuB,AACnB,mBAAoB,AACxB,UAAY,CACb,AAED,wFACE,kBAAmB,AACnB,MAAO,AACP,OAAQ,AACR,WAAa,CACd,AAED,8DACE,qBAAsB,AACtB,cAAe,AACf,aAAc,AACd,WAAY,AACZ,gBAAkB,AAClB,cAAgB,CACjB,AAED,mDACE,kBAAmB,AACnB,qBAAsB,AACtB,sBAAuB,AACvB,mBAAoB,AACpB,gBAAkB,CACnB,AAED,kFACE,gBAAkB,AAClB,4BAA+B,CAChC,AAED,sGACE,4BAA8B,CAC/B,AAED,yGACE,yBAA2B,CAC5B,AAED,wCACE,kBAAmB,AACnB,QAAS,AACT,MAAO,AACP,SAAU,AACV,SAAW,CACZ,AAED,6CACE,OAAQ,AACR,UAAY,CACb,AAED,8CACE,gBAAkB,CACnB,AAED,6BACE,iBAAkB,AAClB,0BAA2B,AAC3B,iBAAkB,AAClB,gBAAkB,AAClB,mBAAoB,AACpB,qBAAsB,AAClB,iBAAkB,AACtB,sBAAuB,AACvB,wBAAyB,AACzB,yBAA0B,AAC1B,mBAAqB,CACtB,AAED,qDACE,sBAAuB,AACvB,wBAAyB,AACzB,sBAA6B,AAC7B,gBAAiB,AACjB,0BAA6B,AAC7B,6BAA8B,AAC9B,0BAA2B,AAC3B,eAAiB,CAClB,AAED,oEACE,yBAA6B,CAC9B,AAED,iGACE,YAAc,CACf,AAED,gEACE,mBAAoB,AACpB,kBAAoB,CACrB,AAED,8CACE,YAAc,CACf,AAED,6CACE,qBAAsB,AACtB,aAAc,AACd,sBAAuB,AACvB,kBAAmB,AACnB,gBAAiB,AACjB,8BAAqC,AACrC,oBAAqB,AACrB,oBAAqB,AACrB,iBAAmB,CACpB,AAED,oDACE,UAAY,CACb,AAED,sDACE,UAAY,CACb,AAED,kEACE,eAAgB,AAChB,0BAA+B,AAC/B,UAAY,CACb,AAED,6BACE,kBAAmB,AACnB,oBAAqB,AACrB,aAAc,AACd,sBAAuB,AACnB,mBAAoB,AACxB,MAAO,AACP,OAAQ,AACR,UAAa,AACb,YAAa,AACb,WAAY,AACZ,0BAA+B,AAC/B,iBAAmB,CACpB,AAED,mDACE,qBAAsB,AACtB,cAAe,AACf,kBAAmB,AACnB,mBAAoB,AACpB,gBAAiB,AACjB,gBAAkB,AAClB,cAAgB,CACjB,AAED,qEACE,sBAAuB,AACvB,UAAY,CACb,AAED,mEACE,sBAAuB,AACvB,aAAe,CAChB,AAED,sDACE,wBAA0B,CAC3B,AAED,0BACE,qBAAuB,CACxB,AAMD,4JACE,2BAA6B,CAC9B,AAED,mFACE,WAAa,CACd,AAED,kFACE,eAAiB,CAClB,AAED,kGACE,WAAa,CACd,AAED,yEACE,4BAA+B,CAChC,AAED,0EACE,4BAA+B,CAChC,AAED,uEACE,4BAA+B,CAChC,AAED,0EACE,4BAA+B,CAChC,AAED,yEACE,4BAA+B,CAChC,AAED,eACE,kBAAmB,AACnB,sBAAuB,AACvB,gBAAiB,AACjB,sBAAuB,AACvB,4BAA8B,CAC/B,AAED,0CACE,mCAAqC,AACrC,cAAgB,CACjB,AAED,kCACE,wBAA0B,CAC3B,AAED,wCACE,yBAA0B,AAC1B,cAAgB,CACjB,AAED,gCACE,kBAAmB,AACnB,0BAA2B,AAC3B,6BAA8B,AAC9B,8BAAgC,AAChC,SAAY,CACb,AAED,4CACE,kBAAmB,AACnB,QAAS,AACT,SAAU,AACV,OAAQ,AACR,UAAY,CACb,AAED,iDACE,MAAO,AACP,WAAa,CACd,AAED,kDACE,gBAAkB,CACnB,AAED,iCACE,qBAAsB,AACtB,kBAAmB,AACnB,yBAA0B,AAC1B,SAAY,CACb,AAED,uDACE,2BAA6B,CAC9B,AAED,wDACE,0BAA4B,CAC7B,AAED,8CACE,sBAAuB,AACvB,YAAa,AACb,0BAA2B,AAC3B,4BAA8B,CAC/B,AAED,oDACE,YAAc,CACf,AAED,oDACE,cAAgB,CACjB,AAED,0DACE,iBAAmB,CACpB,AAED,wEACE,kBAAoB,CACrB,AAED,+BACE,qBAAsB,AACtB,kBAAmB,AACnB,sBAAuB,AACvB,YAAa,AACb,sBAAuB,AACvB,mBAAoB,AACpB,gBAAiB,AACjB,sBAAwB,CACzB,AAED,4CACE,iBAAmB,CACpB,AAED,iDACE,yBAA0B,AAC1B,SAAW,CACZ,AAED,+GACE,WAAY,AACZ,sBAAwB,CACzB,AAED,yDACE,qBAA0B,CAC3B,AAED,+HACE,WAAY,AACZ,uBAAwB,AACxB,UAAe,CAChB,AAED,6EACE,YAAc,CACf,AAED,oDACE,2BAA4B,AAC5B,oBAAqB,AACrB,sBAAuB,AACnB,mBAAoB,AACxB,sBAAuB,AACvB,wBAAyB,AACzB,yBAA0B,AAC1B,mBAAqB,CACtB,AAED,8EACE,SAAW,CACZ,AAED,wGACE,WAAY,AACZ,WAAY,AACZ,eAAgB,AAChB,eAAiB,CAClB,AAED,2DACE,qBAAsB,AACtB,sBAAuB,AACvB,WAAY,AACZ,UAAW,AACX,gBAAiB,AACjB,iBAAkB,AAClB,8BAA+B,AAC/B,2BAA4B,AAC5B,4BAA8B,CAC/B,AAED,4DACE,2BAA4B,AAC5B,oBAAqB,AACrB,qBAAsB,AAClB,uBAAwB,AAC5B,sBAAuB,AACnB,mBAAoB,AACxB,sBAAuB,AACvB,YAAa,AACb,WAAY,AACZ,iBAAkB,AAClB,sBAAuB,AACvB,kBAAmB,AACnB,0BAA+B,AAC/B,eAAiB,CAClB,AAED,kEACE,eAAgB,AAChB,yBAA+B,CAChC,AAED,kGACE,qBAAsB,AACtB,kBAAmB,AACnB,WAAY,AACZ,UAAW,AACX,sBAAwB,CACzB,AAED,wGACE,kBAAmB,AACnB,WAAY,AACZ,UAAW,AACX,QAAS,AACT,WAAY,AACZ,UAAW,AACX,eAAiB,CAClB,AAED,gGACE,qBAAsB,AACtB,kBAAmB,AACnB,WAAY,AACZ,UAAW,AACX,eAAiB,CAClB,AAED,sGACE,kBAAmB,AACnB,WAAY,AACZ,UAAW,AACX,QAAS,AACT,WAAY,AACZ,UAAW,AACX,eAAiB,CAClB,AAED,qEACE,2BAA4B,AAC5B,oBAAqB,AACrB,sBAAuB,AACnB,mBAAoB,AACxB,qBAAsB,AAClB,uBAAwB,AAC5B,sBAAuB,AACvB,wBAAyB,AACzB,yBAA0B,AAC1B,oBAAqB,AACrB,YAAa,AACb,WAAY,AACZ,mBAAoB,AACpB,gBAAiB,AACjB,WAAY,AACZ,gBAAkB,AAClB,eAAiB,CAClB,AAED,2EACE,UAAY,CACb,AAED,sHACE,eAAiB,CAClB,AAMD,sOACE,YAAc,CACf,AAED,+BACE,sBAAuB,AACvB,6BAA8B,AAC9B,4BAA6B,AAC7B,0BAA2B,AAC3B,YAAa,AACb,kBAAmB,AACnB,mBAAoB,AACpB,gBAAkB,AAClB,cAAgB,CACjB,AAED,qCACE,eAAgB,AAChB,+BAAqC,CACtC,AAED,wEACE,kBAAmB,AACnB,kCAAmC,AACnC,mCAAoC,AACpC,0BAA2B,AAC3B,eAAiB,CAClB,AAED,wEACE,gBAAkB,CACnB,AAED,wEACE,gBAAkB,CACnB,AAED,wEACE,gBAAkB,CACnB,AAED,wEACE,gBAAkB,CACnB,AAED,wEACE,iBAAmB,CACpB,AAED,gDACE,qBAAsB,AACtB,QAAS,AACT,SAAU,AACV,kBAAmB,AACnB,iCAAkC,AAClC,oCAAqC,AACrC,eAAgB,AAChB,2BAA4B,AAC5B,qBAAuB,CACxB,AAED,oCACE,iBAAkB,AAClB,UAAY,CACb,AAED,4BACE,kBAAmB,AACnB,qBAAsB,AACtB,sBAAuB,AACvB,iBAAkB,AAClB,gBAAiB,AACjB,sBAAuB,AACvB,eAAgB,AAChB,gBAAiB,AACjB,iCAAkC,AAClC,SAAe,CAChB,AAED,6DACE,WAAa,CACd,AAED,oEACE,WAAY,AACZ,kBAAoB,CACrB,AAED,mEACE,eAAgB,AAChB,WAAY,AACZ,kBAAoB,CACrB,AAED,8DACE,6BAA8B,AAC9B,YAAa,AACb,gBAAiB,AACjB,eAAkB,CACnB","file":"tabulator_bootstrap.min.css","sourcesContent":["/* Tabulator v4.1.2 (c) Oliver Folkerd */\n.tabulator {\n position: relative;\n background-color: #fff;\n overflow: hidden;\n font-size: 14px;\n text-align: left;\n width: 100%;\n max-width: 100%;\n margin-bottom: 20px;\n -ms-transform: translatez(0);\n transform: translatez(0);\n}\n\n.tabulator[tabulator-layout=\"fitDataFill\"] .tabulator-tableHolder .tabulator-table {\n min-width: 100%;\n}\n\n.tabulator.tabulator-block-select {\n -webkit-user-select: none;\n -moz-user-select: none;\n -ms-user-select: none;\n user-select: none;\n}\n\n.tabulator .tabulator-header {\n position: relative;\n box-sizing: border-box;\n width: 100%;\n border-bottom: 2px solid #ddd;\n background-color: #fff;\n font-weight: bold;\n white-space: nowrap;\n overflow: hidden;\n -moz-user-select: none;\n -khtml-user-select: none;\n -webkit-user-select: none;\n -o-user-select: none;\n}\n\n.tabulator .tabulator-header .tabulator-col {\n display: inline-block;\n position: relative;\n box-sizing: border-box;\n background-color: #fff;\n text-align: left;\n vertical-align: bottom;\n overflow: hidden;\n}\n\n.tabulator .tabulator-header .tabulator-col.tabulator-moving {\n position: absolute;\n border: 1px solid #ddd;\n background: #e6e6e6;\n pointer-events: none;\n}\n\n.tabulator .tabulator-header .tabulator-col .tabulator-col-content {\n box-sizing: border-box;\n position: relative;\n padding: 8px;\n}\n\n.tabulator .tabulator-header .tabulator-col .tabulator-col-content .tabulator-col-title {\n box-sizing: border-box;\n width: 100%;\n white-space: nowrap;\n overflow: hidden;\n text-overflow: ellipsis;\n vertical-align: bottom;\n}\n\n.tabulator .tabulator-header .tabulator-col .tabulator-col-content .tabulator-col-title .tabulator-title-editor {\n box-sizing: border-box;\n width: 100%;\n border: 1px solid #999;\n padding: 1px;\n background: #fff;\n}\n\n.tabulator .tabulator-header .tabulator-col .tabulator-col-content .tabulator-arrow {\n display: inline-block;\n position: absolute;\n top: 14px;\n right: 8px;\n width: 0;\n height: 0;\n border-left: 6px solid transparent;\n border-right: 6px solid transparent;\n border-bottom: 6px solid #bbb;\n}\n\n.tabulator .tabulator-header .tabulator-col.tabulator-col-group .tabulator-col-group-cols {\n position: relative;\n display: -ms-flexbox;\n display: flex;\n border-top: 1px solid #ddd;\n overflow: hidden;\n}\n\n.tabulator .tabulator-header .tabulator-col.tabulator-col-group .tabulator-col-group-cols .tabulator-col:last-child {\n margin-right: -1px;\n}\n\n.tabulator .tabulator-header .tabulator-col:first-child .tabulator-col-resize-handle.prev {\n display: none;\n}\n\n.tabulator .tabulator-header .tabulator-col.ui-sortable-helper {\n position: absolute;\n background-color: #e6e6e6 !important;\n border: 1px solid #ddd;\n}\n\n.tabulator .tabulator-header .tabulator-col .tabulator-header-filter {\n position: relative;\n box-sizing: border-box;\n margin-top: 2px;\n width: 100%;\n text-align: center;\n}\n\n.tabulator .tabulator-header .tabulator-col .tabulator-header-filter textarea {\n height: auto !important;\n}\n\n.tabulator .tabulator-header .tabulator-col .tabulator-header-filter svg {\n margin-top: 3px;\n}\n\n.tabulator .tabulator-header .tabulator-col .tabulator-header-filter input::-ms-clear {\n width: 0;\n height: 0;\n}\n\n.tabulator .tabulator-header .tabulator-col.tabulator-sortable .tabulator-col-title {\n padding-right: 25px;\n}\n\n.tabulator .tabulator-header .tabulator-col.tabulator-sortable:hover {\n cursor: pointer;\n background-color: #e6e6e6;\n}\n\n.tabulator .tabulator-header .tabulator-col.tabulator-sortable[aria-sort=\"none\"] .tabulator-col-content .tabulator-arrow {\n border-top: none;\n border-bottom: 6px solid #bbb;\n}\n\n.tabulator .tabulator-header .tabulator-col.tabulator-sortable[aria-sort=\"asc\"] .tabulator-col-content .tabulator-arrow {\n border-top: none;\n border-bottom: 6px solid #666;\n}\n\n.tabulator .tabulator-header .tabulator-col.tabulator-sortable[aria-sort=\"desc\"] .tabulator-col-content .tabulator-arrow {\n border-top: 6px solid #666;\n border-bottom: none;\n}\n\n.tabulator .tabulator-header .tabulator-col.tabulator-col-vertical .tabulator-col-content .tabulator-col-title {\n -webkit-writing-mode: vertical-rl;\n -ms-writing-mode: tb-rl;\n writing-mode: vertical-rl;\n text-orientation: mixed;\n display: -ms-flexbox;\n display: flex;\n -ms-flex-align: center;\n align-items: center;\n -ms-flex-pack: center;\n justify-content: center;\n}\n\n.tabulator .tabulator-header .tabulator-col.tabulator-col-vertical.tabulator-col-vertical-flip .tabulator-col-title {\n -ms-transform: rotate(180deg);\n transform: rotate(180deg);\n}\n\n.tabulator .tabulator-header .tabulator-col.tabulator-col-vertical.tabulator-sortable .tabulator-col-title {\n padding-right: 0;\n padding-top: 20px;\n}\n\n.tabulator .tabulator-header .tabulator-col.tabulator-col-vertical.tabulator-sortable.tabulator-col-vertical-flip .tabulator-col-title {\n padding-right: 0;\n padding-bottom: 20px;\n}\n\n.tabulator .tabulator-header .tabulator-col.tabulator-col-vertical.tabulator-sortable .tabulator-arrow {\n right: calc(50% - 6px);\n}\n\n.tabulator .tabulator-header .tabulator-frozen {\n display: inline-block;\n position: absolute;\n z-index: 10;\n}\n\n.tabulator .tabulator-header .tabulator-frozen.tabulator-frozen-left {\n border-right: 2px solid #ddd;\n}\n\n.tabulator .tabulator-header .tabulator-frozen.tabulator-frozen-right {\n border-left: 2px solid #ddd;\n}\n\n.tabulator .tabulator-header .tabulator-calcs-holder {\n box-sizing: border-box;\n width: 100%;\n background: white !important;\n border-top: 1px solid #ddd;\n border-bottom: 1px solid #ddd;\n overflow: hidden;\n}\n\n.tabulator .tabulator-header .tabulator-calcs-holder .tabulator-row {\n background: white !important;\n}\n\n.tabulator .tabulator-header .tabulator-calcs-holder .tabulator-row .tabulator-col-resize-handle {\n display: none;\n}\n\n.tabulator .tabulator-header .tabulator-frozen-rows-holder {\n min-width: 400%;\n}\n\n.tabulator .tabulator-header .tabulator-frozen-rows-holder:empty {\n display: none;\n}\n\n.tabulator .tabulator-tableHolder {\n position: relative;\n width: 100%;\n white-space: nowrap;\n overflow: auto;\n -webkit-overflow-scrolling: touch;\n}\n\n.tabulator .tabulator-tableHolder:focus {\n outline: none;\n}\n\n.tabulator .tabulator-tableHolder .tabulator-placeholder {\n box-sizing: border-box;\n display: -ms-flexbox;\n display: flex;\n -ms-flex-align: center;\n align-items: center;\n width: 100%;\n}\n\n.tabulator .tabulator-tableHolder .tabulator-placeholder[tabulator-render-mode=\"virtual\"] {\n position: absolute;\n top: 0;\n left: 0;\n height: 100%;\n}\n\n.tabulator .tabulator-tableHolder .tabulator-placeholder span {\n display: inline-block;\n margin: 0 auto;\n padding: 10px;\n color: #000;\n font-weight: bold;\n font-size: 20px;\n}\n\n.tabulator .tabulator-tableHolder .tabulator-table {\n position: relative;\n display: inline-block;\n background-color: #fff;\n white-space: nowrap;\n overflow: visible;\n}\n\n.tabulator .tabulator-tableHolder .tabulator-table .tabulator-row.tabulator-calcs {\n font-weight: bold;\n background: #ececec !important;\n}\n\n.tabulator .tabulator-tableHolder .tabulator-table .tabulator-row.tabulator-calcs.tabulator-calcs-top {\n border-bottom: 2px solid #ddd;\n}\n\n.tabulator .tabulator-tableHolder .tabulator-table .tabulator-row.tabulator-calcs.tabulator-calcs-bottom {\n border-top: 2px solid #ddd;\n}\n\n.tabulator .tabulator-col-resize-handle {\n position: absolute;\n right: 0;\n top: 0;\n bottom: 0;\n width: 5px;\n}\n\n.tabulator .tabulator-col-resize-handle.prev {\n left: 0;\n right: auto;\n}\n\n.tabulator .tabulator-col-resize-handle:hover {\n cursor: ew-resize;\n}\n\n.tabulator .tabulator-footer {\n padding: 5px 10px;\n border-top: 2px solid #ddd;\n text-align: right;\n font-weight: bold;\n white-space: nowrap;\n -ms-user-select: none;\n user-select: none;\n -moz-user-select: none;\n -khtml-user-select: none;\n -webkit-user-select: none;\n -o-user-select: none;\n}\n\n.tabulator .tabulator-footer .tabulator-calcs-holder {\n box-sizing: border-box;\n width: calc(100% + 20px);\n margin: -5px -10px 5px -10px;\n text-align: left;\n background: white !important;\n border-bottom: 1px solid #ddd;\n border-top: 1px solid #ddd;\n overflow: hidden;\n}\n\n.tabulator .tabulator-footer .tabulator-calcs-holder .tabulator-row {\n background: white !important;\n}\n\n.tabulator .tabulator-footer .tabulator-calcs-holder .tabulator-row .tabulator-col-resize-handle {\n display: none;\n}\n\n.tabulator .tabulator-footer .tabulator-calcs-holder:only-child {\n margin-bottom: -5px;\n border-bottom: none;\n}\n\n.tabulator .tabulator-footer .tabulator-pages {\n margin: 0 7px;\n}\n\n.tabulator .tabulator-footer .tabulator-page {\n display: inline-block;\n margin: 0 2px;\n border: 1px solid #ddd;\n border-radius: 3px;\n padding: 2px 5px;\n background: rgba(255, 255, 255, 0.2);\n font-family: inherit;\n font-weight: inherit;\n font-size: inherit;\n}\n\n.tabulator .tabulator-footer .tabulator-page.active {\n color: #d00;\n}\n\n.tabulator .tabulator-footer .tabulator-page:disabled {\n opacity: .5;\n}\n\n.tabulator .tabulator-footer .tabulator-page:not(.disabled):hover {\n cursor: pointer;\n background: rgba(0, 0, 0, 0.2);\n color: #fff;\n}\n\n.tabulator .tabulator-loader {\n position: absolute;\n display: -ms-flexbox;\n display: flex;\n -ms-flex-align: center;\n align-items: center;\n top: 0;\n left: 0;\n z-index: 100;\n height: 100%;\n width: 100%;\n background: rgba(0, 0, 0, 0.4);\n text-align: center;\n}\n\n.tabulator .tabulator-loader .tabulator-loader-msg {\n display: inline-block;\n margin: 0 auto;\n padding: 10px 20px;\n border-radius: 10px;\n background: #fff;\n font-weight: bold;\n font-size: 16px;\n}\n\n.tabulator .tabulator-loader .tabulator-loader-msg.tabulator-loading {\n border: 4px solid #333;\n color: #000;\n}\n\n.tabulator .tabulator-loader .tabulator-loader-msg.tabulator-error {\n border: 4px solid #D00;\n color: #590000;\n}\n\n.tabulator.table-striped .tabulator-row:nth-child(even) {\n background-color: #f9f9f9;\n}\n\n.tabulator.table-bordered {\n border: 1px solid #ddd;\n}\n\n.tabulator.table-bordered .tabulator-header .tabulator-col {\n border-right: 1px solid #ddd;\n}\n\n.tabulator.table-bordered .tabulator-tableHolder .tabulator-table .tabulator-row .tabulator-cell {\n border-right: 1px solid #ddd;\n}\n\n.tabulator.table-condensed .tabulator-header .tabulator-col .tabulator-col-content {\n padding: 5px;\n}\n\n.tabulator.table-condensed .tabulator-tableHolder .tabulator-table .tabulator-row {\n min-height: 24px;\n}\n\n.tabulator.table-condensed .tabulator-tableHolder .tabulator-table .tabulator-row .tabulator-cell {\n padding: 5px;\n}\n\n.tabulator .tabulator-tableHolder .tabulator-table .tabulator-row.active {\n background: #f5f5f5 !important;\n}\n\n.tabulator .tabulator-tableHolder .tabulator-table .tabulator-row.success {\n background: #dff0d8 !important;\n}\n\n.tabulator .tabulator-tableHolder .tabulator-table .tabulator-row.info {\n background: #d9edf7 !important;\n}\n\n.tabulator .tabulator-tableHolder .tabulator-table .tabulator-row.warning {\n background: #fcf8e3 !important;\n}\n\n.tabulator .tabulator-tableHolder .tabulator-table .tabulator-row.danger {\n background: #f2dede !important;\n}\n\n.tabulator-row {\n position: relative;\n box-sizing: border-box;\n min-height: 30px;\n background-color: #fff;\n border-bottom: 1px solid #ddd;\n}\n\n.tabulator-row.tabulator-selectable:hover {\n background-color: #f5f5f5 !important;\n cursor: pointer;\n}\n\n.tabulator-row.tabulator-selected {\n background-color: #9ABCEA;\n}\n\n.tabulator-row.tabulator-selected:hover {\n background-color: #769BCC;\n cursor: pointer;\n}\n\n.tabulator-row.tabulator-moving {\n position: absolute;\n border-top: 1px solid #ddd;\n border-bottom: 1px solid #ddd;\n pointer-events: none !important;\n z-index: 15;\n}\n\n.tabulator-row .tabulator-row-resize-handle {\n position: absolute;\n right: 0;\n bottom: 0;\n left: 0;\n height: 5px;\n}\n\n.tabulator-row .tabulator-row-resize-handle.prev {\n top: 0;\n bottom: auto;\n}\n\n.tabulator-row .tabulator-row-resize-handle:hover {\n cursor: ns-resize;\n}\n\n.tabulator-row .tabulator-frozen {\n display: inline-block;\n position: absolute;\n background-color: inherit;\n z-index: 10;\n}\n\n.tabulator-row .tabulator-frozen.tabulator-frozen-left {\n border-right: 2px solid #ddd;\n}\n\n.tabulator-row .tabulator-frozen.tabulator-frozen-right {\n border-left: 2px solid #ddd;\n}\n\n.tabulator-row .tabulator-responsive-collapse {\n box-sizing: border-box;\n padding: 5px;\n border-top: 1px solid #ddd;\n border-bottom: 1px solid #ddd;\n}\n\n.tabulator-row .tabulator-responsive-collapse:empty {\n display: none;\n}\n\n.tabulator-row .tabulator-responsive-collapse table {\n font-size: 14px;\n}\n\n.tabulator-row .tabulator-responsive-collapse table tr td {\n position: relative;\n}\n\n.tabulator-row .tabulator-responsive-collapse table tr td:first-of-type {\n padding-right: 10px;\n}\n\n.tabulator-row .tabulator-cell {\n display: inline-block;\n position: relative;\n box-sizing: border-box;\n padding: 8px;\n vertical-align: middle;\n white-space: nowrap;\n overflow: hidden;\n text-overflow: ellipsis;\n}\n\n.tabulator-row .tabulator-cell:last-of-type {\n border-right: none;\n}\n\n.tabulator-row .tabulator-cell.tabulator-editing {\n border: 1px solid #1D68CD;\n padding: 0;\n}\n\n.tabulator-row .tabulator-cell.tabulator-editing input, .tabulator-row .tabulator-cell.tabulator-editing select {\n border: 1px;\n background: transparent;\n}\n\n.tabulator-row .tabulator-cell.tabulator-validation-fail {\n border: 1px solid #dd0000;\n}\n\n.tabulator-row .tabulator-cell.tabulator-validation-fail input, .tabulator-row .tabulator-cell.tabulator-validation-fail select {\n border: 1px;\n background: transparent;\n color: #dd0000;\n}\n\n.tabulator-row .tabulator-cell:first-child .tabulator-col-resize-handle.prev {\n display: none;\n}\n\n.tabulator-row .tabulator-cell.tabulator-row-handle {\n display: -ms-inline-flexbox;\n display: inline-flex;\n -ms-flex-align: center;\n align-items: center;\n -moz-user-select: none;\n -khtml-user-select: none;\n -webkit-user-select: none;\n -o-user-select: none;\n}\n\n.tabulator-row .tabulator-cell.tabulator-row-handle .tabulator-row-handle-box {\n width: 80%;\n}\n\n.tabulator-row .tabulator-cell.tabulator-row-handle .tabulator-row-handle-box .tabulator-row-handle-bar {\n width: 100%;\n height: 3px;\n margin-top: 2px;\n background: #666;\n}\n\n.tabulator-row .tabulator-cell .tabulator-data-tree-branch {\n display: inline-block;\n vertical-align: middle;\n height: 9px;\n width: 7px;\n margin-top: -9px;\n margin-right: 5px;\n border-bottom-left-radius: 1px;\n border-left: 2px solid #ddd;\n border-bottom: 2px solid #ddd;\n}\n\n.tabulator-row .tabulator-cell .tabulator-data-tree-control {\n display: -ms-inline-flexbox;\n display: inline-flex;\n -ms-flex-pack: center;\n justify-content: center;\n -ms-flex-align: center;\n align-items: center;\n vertical-align: middle;\n height: 11px;\n width: 11px;\n margin-right: 5px;\n border: 1px solid #333;\n border-radius: 2px;\n background: rgba(0, 0, 0, 0.1);\n overflow: hidden;\n}\n\n.tabulator-row .tabulator-cell .tabulator-data-tree-control:hover {\n cursor: pointer;\n background: rgba(0, 0, 0, 0.2);\n}\n\n.tabulator-row .tabulator-cell .tabulator-data-tree-control .tabulator-data-tree-control-collapse {\n display: inline-block;\n position: relative;\n height: 7px;\n width: 1px;\n background: transparent;\n}\n\n.tabulator-row .tabulator-cell .tabulator-data-tree-control .tabulator-data-tree-control-collapse:after {\n position: absolute;\n content: \"\";\n left: -3px;\n top: 3px;\n height: 1px;\n width: 7px;\n background: #333;\n}\n\n.tabulator-row .tabulator-cell .tabulator-data-tree-control .tabulator-data-tree-control-expand {\n display: inline-block;\n position: relative;\n height: 7px;\n width: 1px;\n background: #333;\n}\n\n.tabulator-row .tabulator-cell .tabulator-data-tree-control .tabulator-data-tree-control-expand:after {\n position: absolute;\n content: \"\";\n left: -3px;\n top: 3px;\n height: 1px;\n width: 7px;\n background: #333;\n}\n\n.tabulator-row .tabulator-cell .tabulator-responsive-collapse-toggle {\n display: -ms-inline-flexbox;\n display: inline-flex;\n -ms-flex-align: center;\n align-items: center;\n -ms-flex-pack: center;\n justify-content: center;\n -moz-user-select: none;\n -khtml-user-select: none;\n -webkit-user-select: none;\n -o-user-select: none;\n height: 15px;\n width: 15px;\n border-radius: 20px;\n background: #666;\n color: #fff;\n font-weight: bold;\n font-size: 1.1em;\n}\n\n.tabulator-row .tabulator-cell .tabulator-responsive-collapse-toggle:hover {\n opacity: .7;\n}\n\n.tabulator-row .tabulator-cell .tabulator-responsive-collapse-toggle.open .tabulator-responsive-collapse-toggle-close {\n display: initial;\n}\n\n.tabulator-row .tabulator-cell .tabulator-responsive-collapse-toggle.open .tabulator-responsive-collapse-toggle-open {\n display: none;\n}\n\n.tabulator-row .tabulator-cell .tabulator-responsive-collapse-toggle .tabulator-responsive-collapse-toggle-close {\n display: none;\n}\n\n.tabulator-row.tabulator-group {\n box-sizing: border-box;\n border-bottom: 1px solid #999;\n border-right: 1px solid #ddd;\n border-top: 1px solid #999;\n padding: 5px;\n padding-left: 10px;\n background: #fafafa;\n font-weight: bold;\n min-width: 100%;\n}\n\n.tabulator-row.tabulator-group:hover {\n cursor: pointer;\n background-color: rgba(0, 0, 0, 0.1);\n}\n\n.tabulator-row.tabulator-group.tabulator-group-visible .tabulator-arrow {\n margin-right: 10px;\n border-left: 6px solid transparent;\n border-right: 6px solid transparent;\n border-top: 6px solid #666;\n border-bottom: 0;\n}\n\n.tabulator-row.tabulator-group.tabulator-group-level-1 .tabulator-arrow {\n margin-left: 20px;\n}\n\n.tabulator-row.tabulator-group.tabulator-group-level-2 .tabulator-arrow {\n margin-left: 40px;\n}\n\n.tabulator-row.tabulator-group.tabulator-group-level-3 .tabulator-arrow {\n margin-left: 60px;\n}\n\n.tabulator-row.tabulator-group.tabulator-group-level-4 .tabulator-arrow {\n margin-left: 80px;\n}\n\n.tabulator-row.tabulator-group.tabulator-group-level-5 .tabulator-arrow {\n margin-left: 100px;\n}\n\n.tabulator-row.tabulator-group .tabulator-arrow {\n display: inline-block;\n width: 0;\n height: 0;\n margin-right: 16px;\n border-top: 6px solid transparent;\n border-bottom: 6px solid transparent;\n border-right: 0;\n border-left: 6px solid #666;\n vertical-align: middle;\n}\n\n.tabulator-row.tabulator-group span {\n margin-left: 10px;\n color: #666;\n}\n\n.tabulator-edit-select-list {\n position: absolute;\n display: inline-block;\n box-sizing: border-box;\n max-height: 200px;\n background: #fff;\n border: 1px solid #ddd;\n font-size: 14px;\n overflow-y: auto;\n -webkit-overflow-scrolling: touch;\n z-index: 10000;\n}\n\n.tabulator-edit-select-list .tabulator-edit-select-list-item {\n padding: 4px;\n}\n\n.tabulator-edit-select-list .tabulator-edit-select-list-item.active {\n color: #fff;\n background: #1D68CD;\n}\n\n.tabulator-edit-select-list .tabulator-edit-select-list-item:hover {\n cursor: pointer;\n color: #fff;\n background: #1D68CD;\n}\n\n.tabulator-edit-select-list .tabulator-edit-select-list-group {\n border-bottom: 1px solid #ddd;\n padding: 4px;\n padding-top: 6px;\n font-weight: bold;\n}\n"]} \ No newline at end of file diff --git a/Gems/AssetMemoryAnalyzer/External/tabulator-master/dist/css/bootstrap/tabulator_bootstrap4.css b/Gems/AssetMemoryAnalyzer/External/tabulator-master/dist/css/bootstrap/tabulator_bootstrap4.css deleted file mode 100644 index 2b437802b3..0000000000 --- a/Gems/AssetMemoryAnalyzer/External/tabulator-master/dist/css/bootstrap/tabulator_bootstrap4.css +++ /dev/null @@ -1,1008 +0,0 @@ -/* Tabulator v4.1.2 (c) Oliver Folkerd */ -.tabulator { - position: relative; - background-color: transparent; - overflow: hidden; - font-size: 1rem; - text-align: left; - width: 100%; - max-width: 100%; - -ms-transform: translatez(0); - transform: translatez(0); -} - -.tabulator[tabulator-layout="fitDataFill"] .tabulator-tableHolder .tabulator-table { - min-width: 100%; -} - -.tabulator.tabulator-block-select { - -webkit-user-select: none; - -moz-user-select: none; - -ms-user-select: none; - user-select: none; -} - -.tabulator .tabulator-header { - position: relative; - box-sizing: border-box; - width: 100%; - border-top: 1px solid #dee2e6; - border-bottom: 2px solid #dee2e6; - background-color: #fff; - font-weight: bold; - white-space: nowrap; - overflow: hidden; - -moz-user-select: none; - -khtml-user-select: none; - -webkit-user-select: none; - -o-user-select: none; -} - -.tabulator .tabulator-header .tabulator-col { - display: inline-block; - position: relative; - box-sizing: border-box; - background-color: #fff; - text-align: left; - vertical-align: bottom; - overflow: hidden; -} - -.tabulator .tabulator-header .tabulator-col.tabulator-moving { - position: absolute; - border: 1px solid #dee2e6; - background: #e6e6e6; - pointer-events: none; -} - -.tabulator .tabulator-header .tabulator-col .tabulator-col-content { - box-sizing: border-box; - position: relative; - padding: 0.75rem; -} - -.tabulator .tabulator-header .tabulator-col .tabulator-col-content .tabulator-col-title { - box-sizing: border-box; - width: 100%; - white-space: nowrap; - overflow: hidden; - text-overflow: ellipsis; - vertical-align: bottom; -} - -.tabulator .tabulator-header .tabulator-col .tabulator-col-content .tabulator-col-title .tabulator-title-editor { - box-sizing: border-box; - width: 100%; - border: 1px solid #999; - padding: 1px; - background: #fff; -} - -.tabulator .tabulator-header .tabulator-col .tabulator-col-content .tabulator-arrow { - display: inline-block; - position: absolute; - top: 14px; - right: 8px; - width: 0; - height: 0; - border-left: 6px solid transparent; - border-right: 6px solid transparent; - border-bottom: 6px solid #bbb; -} - -.tabulator .tabulator-header .tabulator-col.tabulator-col-group .tabulator-col-group-cols { - position: relative; - display: -ms-flexbox; - display: flex; - border-top: 1px solid #dee2e6; - overflow: hidden; -} - -.tabulator .tabulator-header .tabulator-col.tabulator-col-group .tabulator-col-group-cols .tabulator-col:last-child { - margin-right: -1px; -} - -.tabulator .tabulator-header .tabulator-col:first-child .tabulator-col-resize-handle.prev { - display: none; -} - -.tabulator .tabulator-header .tabulator-col.ui-sortable-helper { - position: absolute; - background-color: #e6e6e6 !important; - border: 1px solid #dee2e6; -} - -.tabulator .tabulator-header .tabulator-col .tabulator-header-filter { - position: relative; - box-sizing: border-box; - margin-top: 2px; - width: 100%; - text-align: center; -} - -.tabulator .tabulator-header .tabulator-col .tabulator-header-filter textarea { - height: auto !important; -} - -.tabulator .tabulator-header .tabulator-col .tabulator-header-filter svg { - margin-top: 3px; -} - -.tabulator .tabulator-header .tabulator-col .tabulator-header-filter input::-ms-clear { - width: 0; - height: 0; -} - -.tabulator .tabulator-header .tabulator-col.tabulator-sortable .tabulator-col-title { - padding-right: 25px; -} - -.tabulator .tabulator-header .tabulator-col.tabulator-sortable:hover { - cursor: pointer; - background-color: #e6e6e6; -} - -.tabulator .tabulator-header .tabulator-col.tabulator-sortable[aria-sort="none"] .tabulator-col-content .tabulator-arrow { - border-top: none; - border-bottom: 6px solid #bbb; -} - -.tabulator .tabulator-header .tabulator-col.tabulator-sortable[aria-sort="asc"] .tabulator-col-content .tabulator-arrow { - border-top: none; - border-bottom: 6px solid #666; -} - -.tabulator .tabulator-header .tabulator-col.tabulator-sortable[aria-sort="desc"] .tabulator-col-content .tabulator-arrow { - border-top: 6px solid #666; - border-bottom: none; -} - -.tabulator .tabulator-header .tabulator-col.tabulator-col-vertical .tabulator-col-content .tabulator-col-title { - -webkit-writing-mode: vertical-rl; - -ms-writing-mode: tb-rl; - writing-mode: vertical-rl; - text-orientation: mixed; - display: -ms-flexbox; - display: flex; - -ms-flex-align: center; - align-items: center; - -ms-flex-pack: center; - justify-content: center; -} - -.tabulator .tabulator-header .tabulator-col.tabulator-col-vertical.tabulator-col-vertical-flip .tabulator-col-title { - -ms-transform: rotate(180deg); - transform: rotate(180deg); -} - -.tabulator .tabulator-header .tabulator-col.tabulator-col-vertical.tabulator-sortable .tabulator-col-title { - padding-right: 0; - padding-top: 20px; -} - -.tabulator .tabulator-header .tabulator-col.tabulator-col-vertical.tabulator-sortable.tabulator-col-vertical-flip .tabulator-col-title { - padding-right: 0; - padding-bottom: 20px; -} - -.tabulator .tabulator-header .tabulator-col.tabulator-col-vertical.tabulator-sortable .tabulator-arrow { - right: calc(50% - 6px); -} - -.tabulator .tabulator-header .tabulator-frozen { - display: inline-block; - position: absolute; - z-index: 10; -} - -.tabulator .tabulator-header .tabulator-frozen.tabulator-frozen-left { - border-right: 2px solid #dee2e6; -} - -.tabulator .tabulator-header .tabulator-frozen.tabulator-frozen-right { - border-left: 2px solid #dee2e6; -} - -.tabulator .tabulator-header .tabulator-calcs-holder { - box-sizing: border-box; - width: 100%; - background: white !important; - border-top: 1px solid #dee2e6; - border-bottom: 1px solid #dee2e6; - overflow: hidden; -} - -.tabulator .tabulator-header .tabulator-calcs-holder .tabulator-row { - background: white !important; -} - -.tabulator .tabulator-header .tabulator-calcs-holder .tabulator-row .tabulator-col-resize-handle { - display: none; -} - -.tabulator .tabulator-header .tabulator-frozen-rows-holder { - min-width: 400%; -} - -.tabulator .tabulator-header .tabulator-frozen-rows-holder:empty { - display: none; -} - -.tabulator .tabulator-tableHolder { - position: relative; - width: 100%; - white-space: nowrap; - overflow: auto; - -webkit-overflow-scrolling: touch; -} - -.tabulator .tabulator-tableHolder:focus { - outline: none; -} - -.tabulator .tabulator-tableHolder .tabulator-placeholder { - box-sizing: border-box; - display: -ms-flexbox; - display: flex; - -ms-flex-align: center; - align-items: center; - width: 100%; -} - -.tabulator .tabulator-tableHolder .tabulator-placeholder[tabulator-render-mode="virtual"] { - position: absolute; - top: 0; - left: 0; - height: 100%; -} - -.tabulator .tabulator-tableHolder .tabulator-placeholder span { - display: inline-block; - margin: 0 auto; - padding: 10px; - color: #000; - font-weight: bold; - font-size: 20px; -} - -.tabulator .tabulator-tableHolder .tabulator-table { - position: relative; - display: inline-block; - background-color: transparent; - white-space: nowrap; - overflow: visible; -} - -.tabulator .tabulator-tableHolder .tabulator-table .tabulator-row.tabulator-calcs { - font-weight: bold; - background: rgba(0, 0, 0, 0.05) !important; -} - -.tabulator .tabulator-tableHolder .tabulator-table .tabulator-row.tabulator-calcs.tabulator-calcs-top { - border-bottom: 2px solid #dee2e6; -} - -.tabulator .tabulator-tableHolder .tabulator-table .tabulator-row.tabulator-calcs.tabulator-calcs-bottom { - border-top: 2px solid #dee2e6; -} - -.tabulator .tabulator-col-resize-handle { - position: absolute; - right: 0; - top: 0; - bottom: 0; - width: 5px; -} - -.tabulator .tabulator-col-resize-handle.prev { - left: 0; - right: auto; -} - -.tabulator .tabulator-col-resize-handle:hover { - cursor: ew-resize; -} - -.tabulator .tabulator-footer { - padding: 5px 10px; - border-top: 2px solid #dee2e6; - text-align: right; - font-weight: bold; - white-space: nowrap; - -ms-user-select: none; - user-select: none; - -moz-user-select: none; - -khtml-user-select: none; - -webkit-user-select: none; - -o-user-select: none; -} - -.tabulator .tabulator-footer .tabulator-calcs-holder { - box-sizing: border-box; - width: calc(100% + 20px); - margin: -5px -10px 5px -10px; - text-align: left; - background: rgba(13, 13, 13, 0) !important; - border-bottom: 1px solid #dee2e6; - border-top: 1px solid #dee2e6; - overflow: hidden; -} - -.tabulator .tabulator-footer .tabulator-calcs-holder .tabulator-row { - background: rgba(13, 13, 13, 0) !important; -} - -.tabulator .tabulator-footer .tabulator-calcs-holder .tabulator-row .tabulator-col-resize-handle { - display: none; -} - -.tabulator .tabulator-footer .tabulator-calcs-holder:only-child { - margin-bottom: -5px; - border-bottom: none; -} - -.tabulator .tabulator-footer .tabulator-page { - display: inline-block; - margin: 0; - margin-top: 5px; - padding: 8px 12px; - border: 1px solid #dee2e6; - border-right: none; - background: rgba(255, 255, 255, 0.2); - color: #007bff; - font-family: inherit; - font-weight: normal; - font-size: inherit; -} - -.tabulator .tabulator-footer .tabulator-page[data-page="first"] { - border-top-left-radius: 4px; - border-bottom-left-radius: 4px; -} - -.tabulator .tabulator-footer .tabulator-page[data-page="last"] { - border: 1px solid #dee2e6; - border-top-right-radius: 4px; - border-bottom-right-radius: 4px; -} - -.tabulator .tabulator-footer .tabulator-page.active { - border-color: #007bff; - background-color: #007bff; - color: #fff; -} - -.tabulator .tabulator-footer .tabulator-page:disabled { - border-color: #dee2e6; - background: #fff; - color: #6c757d; -} - -.tabulator .tabulator-footer .tabulator-page:not(.disabled):hover { - cursor: pointer; - border-color: #dee2e6; - background: #e9ecef; - color: #0056b3; -} - -.tabulator .tabulator-loader { - position: absolute; - display: -ms-flexbox; - display: flex; - -ms-flex-align: center; - align-items: center; - top: 0; - left: 0; - z-index: 100; - height: 100%; - width: 100%; - background: rgba(0, 0, 0, 0.4); - text-align: center; -} - -.tabulator .tabulator-loader .tabulator-loader-msg { - display: inline-block; - margin: 0 auto; - padding: 10px 20px; - border-radius: 10px; - background: #fff; - font-weight: bold; - font-size: 16px; -} - -.tabulator .tabulator-loader .tabulator-loader-msg.tabulator-loading { - border: 4px solid #333; - color: #000; -} - -.tabulator .tabulator-loader .tabulator-loader-msg.tabulator-error { - border: 4px solid #D00; - color: #590000; -} - -.tabulator.thead-dark .tabulator-header { - border-color: #32383e; - background-color: #212529; - color: #fff; -} - -.tabulator.thead-dark .tabulator-header .tabulator-col { - border-color: #32383e; - background-color: #212529; - color: #fff; -} - -.tabulator.table-dark { - background-color: #212529; -} - -.tabulator.table-dark:not(.thead-light) .tabulator-header { - border-color: #32383e; - background-color: #212529; - color: #fff; -} - -.tabulator.table-dark:not(.thead-light) .tabulator-header .tabulator-col { - border-color: #32383e; - background-color: #212529; - color: #fff; -} - -.tabulator.table-dark .tabulator-tableHolder { - color: #fff; -} - -.tabulator.table-dark .tabulator-row { - border-color: #32383e; -} - -.tabulator.table-dark .tabulator-row:hover { - background-color: rgba(255, 255, 255, 0.075) !important; -} - -.tabulator.table-striped .tabulator-row:nth-child(even) { - background-color: rgba(0, 0, 0, 0.05); -} - -.tabulator.table-striped .tabulator-row:nth-child(even).tabulator-selected { - background-color: #9ABCEA; -} - -.tabulator.table-striped .tabulator-row:nth-child(even).tabulator-selectable:hover { - background-color: rgba(0, 0, 0, 0.075); - cursor: pointer; -} - -.tabulator.table-striped .tabulator-row:nth-child(even).tabulator-selected:hover { - background-color: #769BCC; - cursor: pointer; -} - -.tabulator.table-striped.table-dark .tabulator-row:nth-child(even) { - background-color: rgba(255, 255, 255, 0.05); -} - -.tabulator.table-bordered { - border: 1px solid #dee2e6; -} - -.tabulator.table-bordered .tabulator-header .tabulator-col { - border-right: 1px solid #dee2e6; -} - -.tabulator.table-bordered .tabulator-tableHolder .tabulator-table .tabulator-row .tabulator-cell { - border-right: 1px solid #dee2e6; -} - -.tabulator.table-borderless .tabulator-header { - border: none; -} - -.tabulator.table-borderless .tabulator-row { - border: none; -} - -.tabulator.table-sm .tabulator-header .tabulator-col .tabulator-col-content { - padding: 0.3rem !important; -} - -.tabulator.table-sm .tabulator-tableHolder .tabulator-table .tabulator-row { - min-height: 1.6rem; -} - -.tabulator.table-sm .tabulator-tableHolder .tabulator-table .tabulator-row .tabulator-cell { - padding: 0.3rem !important; -} - -.tabulator .tabulator-tableHolder .tabulator-table .tabulator-row.table-primary { - background: #b8daff !important; -} - -.tabulator .tabulator-tableHolder .tabulator-table .tabulator-row.table-secondary { - background: #d6d8db !important; -} - -.tabulator .tabulator-tableHolder .tabulator-table .tabulator-row.table-success { - background: #c3e6cb !important; -} - -.tabulator .tabulator-tableHolder .tabulator-table .tabulator-row.table-info { - background: #bee5eb !important; -} - -.tabulator .tabulator-tableHolder .tabulator-table .tabulator-row.table-warning { - background: #ffeeba !important; -} - -.tabulator .tabulator-tableHolder .tabulator-table .tabulator-row.table-danger { - background: #f5c6cb !important; -} - -.tabulator .tabulator-tableHolder .tabulator-table .tabulator-row.table-light { - background: #fdfdfe !important; -} - -.tabulator .tabulator-tableHolder .tabulator-table .tabulator-row.table-dark { - background: #c6c8ca !important; -} - -.tabulator .tabulator-tableHolder .tabulator-table .tabulator-row.table-active { - background: rgba(0, 0, 0, 0.075) !important; -} - -.tabulator .tabulator-tableHolder .tabulator-table .tabulator-row.bg-primary { - background: #007bff !important; -} - -.tabulator .tabulator-tableHolder .tabulator-table .tabulator-row.bg-secondary { - background: #6c757d !important; -} - -.tabulator .tabulator-tableHolder .tabulator-table .tabulator-row.bg-success { - background: #28a745 !important; -} - -.tabulator .tabulator-tableHolder .tabulator-table .tabulator-row.bg-info { - background: #17a2b8 !important; -} - -.tabulator .tabulator-tableHolder .tabulator-table .tabulator-row.bg-warning { - background: #ffc107 !important; -} - -.tabulator .tabulator-tableHolder .tabulator-table .tabulator-row.bg-danger { - background: #dc3545 !important; -} - -.tabulator .tabulator-tableHolder .tabulator-table .tabulator-row.bg-light { - background: #f8f9fa !important; -} - -.tabulator .tabulator-tableHolder .tabulator-table .tabulator-row.bg-dark { - background: #343a40 !important; -} - -.tabulator .tabulator-tableHolder .tabulator-table .tabulator-row.bg-active { - background: rgba(0, 0, 0, 0.075) !important; -} - -.tabulator .tabulator-tableHolder .tabulator-table .tabulator-row .tabulator-cell.table-primary { - background: #b8daff !important; -} - -.tabulator .tabulator-tableHolder .tabulator-table .tabulator-row .tabulator-cell.table-secondary { - background: #d6d8db !important; -} - -.tabulator .tabulator-tableHolder .tabulator-table .tabulator-row .tabulator-cell.table-success { - background: #c3e6cb !important; -} - -.tabulator .tabulator-tableHolder .tabulator-table .tabulator-row .tabulator-cell.table-info { - background: #bee5eb !important; -} - -.tabulator .tabulator-tableHolder .tabulator-table .tabulator-row .tabulator-cell.table-warning { - background: #ffeeba !important; -} - -.tabulator .tabulator-tableHolder .tabulator-table .tabulator-row .tabulator-cell.table-danger { - background: #f5c6cb !important; -} - -.tabulator .tabulator-tableHolder .tabulator-table .tabulator-row .tabulator-cell.table-light { - background: #fdfdfe !important; -} - -.tabulator .tabulator-tableHolder .tabulator-table .tabulator-row .tabulator-cell.table-dark { - background: #c6c8ca !important; -} - -.tabulator .tabulator-tableHolder .tabulator-table .tabulator-row .tabulator-cell.table-active { - background: rgba(0, 0, 0, 0.075) !important; -} - -.tabulator .tabulator-tableHolder .tabulator-table .tabulator-row .tabulator-cell.bg-primary { - background: #007bff !important; -} - -.tabulator .tabulator-tableHolder .tabulator-table .tabulator-row .tabulator-cell.bg-secondary { - background: #6c757d !important; -} - -.tabulator .tabulator-tableHolder .tabulator-table .tabulator-row .tabulator-cell.bg-success { - background: #28a745 !important; -} - -.tabulator .tabulator-tableHolder .tabulator-table .tabulator-row .tabulator-cell.bg-info { - background: #17a2b8 !important; -} - -.tabulator .tabulator-tableHolder .tabulator-table .tabulator-row .tabulator-cell.bg-warning { - background: #ffc107 !important; -} - -.tabulator .tabulator-tableHolder .tabulator-table .tabulator-row .tabulator-cell.bg-danger { - background: #dc3545 !important; -} - -.tabulator .tabulator-tableHolder .tabulator-table .tabulator-row .tabulator-cell.bg-light { - background: #f8f9fa !important; -} - -.tabulator .tabulator-tableHolder .tabulator-table .tabulator-row .tabulator-cell.bg-dark { - background: #343a40 !important; -} - -.tabulator .tabulator-tableHolder .tabulator-table .tabulator-row .tabulator-cell.bg-active { - background: rgba(0, 0, 0, 0.075) !important; -} - -.tabulator-row { - position: relative; - box-sizing: border-box; - min-height: 2.5rem; - background-color: transparent; - border-bottom: 1px solid #dee2e6; -} - -.tabulator-row.tabulator-selectable:hover { - background-color: rgba(0, 0, 0, 0.075); - cursor: pointer; -} - -.tabulator-row.tabulator-selected { - background-color: #9ABCEA; -} - -.tabulator-row.tabulator-selected:hover { - background-color: #769BCC; - cursor: pointer; -} - -.tabulator-row.tabulator-moving { - position: absolute; - border-top: 1px solid #dee2e6; - border-bottom: 1px solid #dee2e6; - pointer-events: none !important; - z-index: 15; -} - -.tabulator-row .tabulator-row-resize-handle { - position: absolute; - right: 0; - bottom: 0; - left: 0; - height: 5px; -} - -.tabulator-row .tabulator-row-resize-handle.prev { - top: 0; - bottom: auto; -} - -.tabulator-row .tabulator-row-resize-handle:hover { - cursor: ns-resize; -} - -.tabulator-row .tabulator-frozen { - display: inline-block; - position: absolute; - background-color: inherit; - z-index: 10; -} - -.tabulator-row .tabulator-frozen.tabulator-frozen-left { - border-right: 2px solid #dee2e6; -} - -.tabulator-row .tabulator-frozen.tabulator-frozen-right { - border-left: 2px solid #dee2e6; -} - -.tabulator-row .tabulator-responsive-collapse { - box-sizing: border-box; - padding: 5px; - border-top: 1px solid #dee2e6; - border-bottom: 1px solid #dee2e6; -} - -.tabulator-row .tabulator-responsive-collapse:empty { - display: none; -} - -.tabulator-row .tabulator-responsive-collapse table { - font-size: 1rem; -} - -.tabulator-row .tabulator-responsive-collapse table tr td { - position: relative; -} - -.tabulator-row .tabulator-responsive-collapse table tr td:first-of-type { - padding-right: 10px; -} - -.tabulator-row .tabulator-cell { - display: inline-block; - position: relative; - box-sizing: border-box; - padding: 0.75rem; - vertical-align: middle; - white-space: nowrap; - overflow: hidden; - text-overflow: ellipsis; -} - -.tabulator-row .tabulator-cell:last-of-type { - border-right: none; -} - -.tabulator-row .tabulator-cell.tabulator-editing { - border: 1px solid #1D68CD; - padding: 0; -} - -.tabulator-row .tabulator-cell.tabulator-editing input, .tabulator-row .tabulator-cell.tabulator-editing select { - border: 1px; - background: transparent; -} - -.tabulator-row .tabulator-cell.tabulator-validation-fail { - border: 1px solid #dd0000; -} - -.tabulator-row .tabulator-cell.tabulator-validation-fail input, .tabulator-row .tabulator-cell.tabulator-validation-fail select { - border: 1px; - background: transparent; - color: #dd0000; -} - -.tabulator-row .tabulator-cell:first-child .tabulator-col-resize-handle.prev { - display: none; -} - -.tabulator-row .tabulator-cell.tabulator-row-handle { - display: -ms-inline-flexbox; - display: inline-flex; - -ms-flex-align: center; - align-items: center; - -moz-user-select: none; - -khtml-user-select: none; - -webkit-user-select: none; - -o-user-select: none; -} - -.tabulator-row .tabulator-cell.tabulator-row-handle .tabulator-row-handle-box { - width: 80%; -} - -.tabulator-row .tabulator-cell.tabulator-row-handle .tabulator-row-handle-box .tabulator-row-handle-bar { - width: 100%; - height: 3px; - margin-top: 2px; - background: #666; -} - -.tabulator-row .tabulator-cell .tabulator-data-tree-branch { - display: inline-block; - vertical-align: middle; - height: 9px; - width: 7px; - margin-top: -9px; - margin-right: 5px; - border-bottom-left-radius: 1px; - border-left: 2px solid #dee2e6; - border-bottom: 2px solid #dee2e6; -} - -.tabulator-row .tabulator-cell .tabulator-data-tree-control { - display: -ms-inline-flexbox; - display: inline-flex; - -ms-flex-pack: center; - justify-content: center; - -ms-flex-align: center; - align-items: center; - vertical-align: middle; - height: 11px; - width: 11px; - margin-right: 5px; - border: 1px solid #ccc; - border-radius: 2px; - background: rgba(0, 0, 0, 0.1); - overflow: hidden; -} - -.tabulator-row .tabulator-cell .tabulator-data-tree-control:hover { - cursor: pointer; - background: rgba(0, 0, 0, 0.2); -} - -.tabulator-row .tabulator-cell .tabulator-data-tree-control .tabulator-data-tree-control-collapse { - display: inline-block; - position: relative; - height: 7px; - width: 1px; - background: transparent; -} - -.tabulator-row .tabulator-cell .tabulator-data-tree-control .tabulator-data-tree-control-collapse:after { - position: absolute; - content: ""; - left: -3px; - top: 3px; - height: 1px; - width: 7px; - background: #ccc; -} - -.tabulator-row .tabulator-cell .tabulator-data-tree-control .tabulator-data-tree-control-expand { - display: inline-block; - position: relative; - height: 7px; - width: 1px; - background: #ccc; -} - -.tabulator-row .tabulator-cell .tabulator-data-tree-control .tabulator-data-tree-control-expand:after { - position: absolute; - content: ""; - left: -3px; - top: 3px; - height: 1px; - width: 7px; - background: #ccc; -} - -.tabulator-row .tabulator-cell .tabulator-responsive-collapse-toggle { - display: -ms-inline-flexbox; - display: inline-flex; - -ms-flex-align: center; - align-items: center; - -ms-flex-pack: center; - justify-content: center; - -moz-user-select: none; - -khtml-user-select: none; - -webkit-user-select: none; - -o-user-select: none; - height: 15px; - width: 15px; - border-radius: 20px; - background: #666; - color: transparent; - font-weight: bold; - font-size: 1.1em; -} - -.tabulator-row .tabulator-cell .tabulator-responsive-collapse-toggle:hover { - opacity: .7; -} - -.tabulator-row .tabulator-cell .tabulator-responsive-collapse-toggle.open .tabulator-responsive-collapse-toggle-close { - display: initial; -} - -.tabulator-row .tabulator-cell .tabulator-responsive-collapse-toggle.open .tabulator-responsive-collapse-toggle-open { - display: none; -} - -.tabulator-row .tabulator-cell .tabulator-responsive-collapse-toggle .tabulator-responsive-collapse-toggle-close { - display: none; -} - -.tabulator-row.tabulator-group { - box-sizing: border-box; - border-bottom: 1px solid #999; - border-right: 1px solid #dee2e6; - border-top: 1px solid #999; - padding: 5px; - padding-left: 10px; - background: #fafafa; - font-weight: bold; - min-width: 100%; -} - -.tabulator-row.tabulator-group:hover { - cursor: pointer; - background-color: rgba(0, 0, 0, 0.1); -} - -.tabulator-row.tabulator-group.tabulator-group-visible .tabulator-arrow { - margin-right: 10px; - border-left: 6px solid transparent; - border-right: 6px solid transparent; - border-top: 6px solid #666; - border-bottom: 0; -} - -.tabulator-row.tabulator-group.tabulator-group-level-1 .tabulator-arrow { - margin-left: 20px; -} - -.tabulator-row.tabulator-group.tabulator-group-level-2 .tabulator-arrow { - margin-left: 40px; -} - -.tabulator-row.tabulator-group.tabulator-group-level-3 .tabulator-arrow { - margin-left: 60px; -} - -.tabulator-row.tabulator-group.tabulator-group-level-4 .tabulator-arrow { - margin-left: 80px; -} - -.tabulator-row.tabulator-group.tabulator-group-level-5 .tabulator-arrow { - margin-left: 100px; -} - -.tabulator-row.tabulator-group .tabulator-arrow { - display: inline-block; - width: 0; - height: 0; - margin-right: 16px; - border-top: 6px solid transparent; - border-bottom: 6px solid transparent; - border-right: 0; - border-left: 6px solid #666; - vertical-align: middle; -} - -.tabulator-row.tabulator-group span { - margin-left: 10px; - color: #666; -} - -.tabulator-edit-select-list { - position: absolute; - display: inline-block; - box-sizing: border-box; - max-height: 200px; - background: transparent; - border: 1px solid #dee2e6; - font-size: 1rem; - overflow-y: auto; - -webkit-overflow-scrolling: touch; - z-index: 10000; -} - -.tabulator-edit-select-list .tabulator-edit-select-list-item { - padding: 4px; -} - -.tabulator-edit-select-list .tabulator-edit-select-list-item.active { - color: transparent; - background: #1D68CD; -} - -.tabulator-edit-select-list .tabulator-edit-select-list-item:hover { - cursor: pointer; - color: transparent; - background: #1D68CD; -} - -.tabulator-edit-select-list .tabulator-edit-select-list-group { - border-bottom: 1px solid #dee2e6; - padding: 4px; - padding-top: 6px; - font-weight: bold; -} diff --git a/Gems/AssetMemoryAnalyzer/External/tabulator-master/dist/css/bootstrap/tabulator_bootstrap4.min.css b/Gems/AssetMemoryAnalyzer/External/tabulator-master/dist/css/bootstrap/tabulator_bootstrap4.min.css deleted file mode 100644 index 9385497885..0000000000 --- a/Gems/AssetMemoryAnalyzer/External/tabulator-master/dist/css/bootstrap/tabulator_bootstrap4.min.css +++ /dev/null @@ -1,3 +0,0 @@ -/* Tabulator v4.1.2 (c) Oliver Folkerd */ -.tabulator{position:relative;background-color:transparent;overflow:hidden;font-size:1rem;text-align:left;width:100%;max-width:100%;transform:translatez(0)}.tabulator[tabulator-layout=fitDataFill] .tabulator-tableHolder .tabulator-table{min-width:100%}.tabulator.tabulator-block-select{-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}.tabulator .tabulator-header{width:100%;border-top:1px solid #dee2e6;border-bottom:2px solid #dee2e6;font-weight:700;white-space:nowrap;-moz-user-select:none;-khtml-user-select:none;-webkit-user-select:none;-o-user-select:none}.tabulator .tabulator-header,.tabulator .tabulator-header .tabulator-col{position:relative;box-sizing:border-box;background-color:#fff;overflow:hidden}.tabulator .tabulator-header .tabulator-col{display:inline-block;text-align:left;vertical-align:bottom}.tabulator .tabulator-header .tabulator-col.tabulator-moving{position:absolute;border:1px solid #dee2e6;background:#e6e6e6;pointer-events:none}.tabulator .tabulator-header .tabulator-col .tabulator-col-content{box-sizing:border-box;position:relative;padding:.75rem}.tabulator .tabulator-header .tabulator-col .tabulator-col-content .tabulator-col-title{box-sizing:border-box;width:100%;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;vertical-align:bottom}.tabulator .tabulator-header .tabulator-col .tabulator-col-content .tabulator-col-title .tabulator-title-editor{box-sizing:border-box;width:100%;border:1px solid #999;padding:1px;background:#fff}.tabulator .tabulator-header .tabulator-col .tabulator-col-content .tabulator-arrow{display:inline-block;position:absolute;top:14px;right:8px;width:0;height:0;border-left:6px solid transparent;border-right:6px solid transparent;border-bottom:6px solid #bbb}.tabulator .tabulator-header .tabulator-col.tabulator-col-group .tabulator-col-group-cols{position:relative;display:-ms-flexbox;display:flex;border-top:1px solid #dee2e6;overflow:hidden}.tabulator .tabulator-header .tabulator-col.tabulator-col-group .tabulator-col-group-cols .tabulator-col:last-child{margin-right:-1px}.tabulator .tabulator-header .tabulator-col:first-child .tabulator-col-resize-handle.prev{display:none}.tabulator .tabulator-header .tabulator-col.ui-sortable-helper{position:absolute;background-color:#e6e6e6!important;border:1px solid #dee2e6}.tabulator .tabulator-header .tabulator-col .tabulator-header-filter{position:relative;box-sizing:border-box;margin-top:2px;width:100%;text-align:center}.tabulator .tabulator-header .tabulator-col .tabulator-header-filter textarea{height:auto!important}.tabulator .tabulator-header .tabulator-col .tabulator-header-filter svg{margin-top:3px}.tabulator .tabulator-header .tabulator-col .tabulator-header-filter input::-ms-clear{width:0;height:0}.tabulator .tabulator-header .tabulator-col.tabulator-sortable .tabulator-col-title{padding-right:25px}.tabulator .tabulator-header .tabulator-col.tabulator-sortable:hover{cursor:pointer;background-color:#e6e6e6}.tabulator .tabulator-header .tabulator-col.tabulator-sortable[aria-sort=none] .tabulator-col-content .tabulator-arrow{border-top:none;border-bottom:6px solid #bbb}.tabulator .tabulator-header .tabulator-col.tabulator-sortable[aria-sort=asc] .tabulator-col-content .tabulator-arrow{border-top:none;border-bottom:6px solid #666}.tabulator .tabulator-header .tabulator-col.tabulator-sortable[aria-sort=desc] .tabulator-col-content .tabulator-arrow{border-top:6px solid #666;border-bottom:none}.tabulator .tabulator-header .tabulator-col.tabulator-col-vertical .tabulator-col-content .tabulator-col-title{-webkit-writing-mode:vertical-rl;-ms-writing-mode:tb-rl;writing-mode:vertical-rl;text-orientation:mixed;display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;-ms-flex-pack:center;justify-content:center}.tabulator .tabulator-header .tabulator-col.tabulator-col-vertical.tabulator-col-vertical-flip .tabulator-col-title{transform:rotate(180deg)}.tabulator .tabulator-header .tabulator-col.tabulator-col-vertical.tabulator-sortable .tabulator-col-title{padding-right:0;padding-top:20px}.tabulator .tabulator-header .tabulator-col.tabulator-col-vertical.tabulator-sortable.tabulator-col-vertical-flip .tabulator-col-title{padding-right:0;padding-bottom:20px}.tabulator .tabulator-header .tabulator-col.tabulator-col-vertical.tabulator-sortable .tabulator-arrow{right:calc(50% - 6px)}.tabulator .tabulator-header .tabulator-frozen{display:inline-block;position:absolute;z-index:1}.tabulator .tabulator-header .tabulator-frozen.tabulator-frozen-left{border-right:2px solid #dee2e6}.tabulator .tabulator-header .tabulator-frozen.tabulator-frozen-right{border-left:2px solid #dee2e6}.tabulator .tabulator-header .tabulator-calcs-holder{box-sizing:border-box;width:100%;background:#fff!important;border-top:1px solid #dee2e6;border-bottom:1px solid #dee2e6;overflow:hidden}.tabulator .tabulator-header .tabulator-calcs-holder .tabulator-row{background:#fff!important}.tabulator .tabulator-header .tabulator-calcs-holder .tabulator-row .tabulator-col-resize-handle{display:none}.tabulator .tabulator-header .tabulator-frozen-rows-holder{min-width:400%}.tabulator .tabulator-header .tabulator-frozen-rows-holder:empty{display:none}.tabulator .tabulator-tableHolder{position:relative;width:100%;white-space:nowrap;overflow:auto;-webkit-overflow-scrolling:touch}.tabulator .tabulator-tableHolder:focus{outline:none}.tabulator .tabulator-tableHolder .tabulator-placeholder{box-sizing:border-box;display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;width:100%}.tabulator .tabulator-tableHolder .tabulator-placeholder[tabulator-render-mode=virtual]{position:absolute;top:0;left:0;height:100%}.tabulator .tabulator-tableHolder .tabulator-placeholder span{display:inline-block;margin:0 auto;padding:10px;color:#000;font-weight:700;font-size:20px}.tabulator .tabulator-tableHolder .tabulator-table{position:relative;display:inline-block;background-color:transparent;white-space:nowrap;overflow:visible}.tabulator .tabulator-tableHolder .tabulator-table .tabulator-row.tabulator-calcs{font-weight:700;background:rgba(0,0,0,.05)!important}.tabulator .tabulator-tableHolder .tabulator-table .tabulator-row.tabulator-calcs.tabulator-calcs-top{border-bottom:2px solid #dee2e6}.tabulator .tabulator-tableHolder .tabulator-table .tabulator-row.tabulator-calcs.tabulator-calcs-bottom{border-top:2px solid #dee2e6}.tabulator .tabulator-col-resize-handle{position:absolute;right:0;top:0;bottom:0;width:5px}.tabulator .tabulator-col-resize-handle.prev{left:0;right:auto}.tabulator .tabulator-col-resize-handle:hover{cursor:ew-resize}.tabulator .tabulator-footer{padding:5px 10px;border-top:2px solid #dee2e6;text-align:right;font-weight:700;white-space:nowrap;-ms-user-select:none;user-select:none;-moz-user-select:none;-khtml-user-select:none;-webkit-user-select:none;-o-user-select:none}.tabulator .tabulator-footer .tabulator-calcs-holder{box-sizing:border-box;width:calc(100% + 20px);margin:-5px -10px 5px;text-align:left;background:hsla(0,0%,5%,0)!important;border-bottom:1px solid #dee2e6;border-top:1px solid #dee2e6;overflow:hidden}.tabulator .tabulator-footer .tabulator-calcs-holder .tabulator-row{background:hsla(0,0%,5%,0)!important}.tabulator .tabulator-footer .tabulator-calcs-holder .tabulator-row .tabulator-col-resize-handle{display:none}.tabulator .tabulator-footer .tabulator-calcs-holder:only-child{margin-bottom:-5px;border-bottom:none}.tabulator .tabulator-footer .tabulator-page{display:inline-block;margin:0;margin-top:5px;padding:8px 12px;border:1px solid #dee2e6;border-right:none;background:hsla(0,0%,100%,.2);color:#007bff;font-family:inherit;font-weight:400;font-size:inherit}.tabulator .tabulator-footer .tabulator-page[data-page=first]{border-top-left-radius:4px;border-bottom-left-radius:4px}.tabulator .tabulator-footer .tabulator-page[data-page=last]{border:1px solid #dee2e6;border-top-right-radius:4px;border-bottom-right-radius:4px}.tabulator .tabulator-footer .tabulator-page.active{border-color:#007bff;background-color:#007bff;color:#fff}.tabulator .tabulator-footer .tabulator-page:disabled{border-color:#dee2e6;background:#fff;color:#6c757d}.tabulator .tabulator-footer .tabulator-page:not(.disabled):hover{cursor:pointer;border-color:#dee2e6;background:#e9ecef;color:#0056b3}.tabulator .tabulator-loader{position:absolute;display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;top:0;left:0;z-index:3;height:100%;width:100%;background:rgba(0,0,0,.4);text-align:center}.tabulator .tabulator-loader .tabulator-loader-msg{display:inline-block;margin:0 auto;padding:10px 20px;border-radius:10px;background:#fff;font-weight:700;font-size:16px}.tabulator .tabulator-loader .tabulator-loader-msg.tabulator-loading{border:4px solid #333;color:#000}.tabulator .tabulator-loader .tabulator-loader-msg.tabulator-error{border:4px solid #d00;color:#590000}.tabulator.thead-dark .tabulator-header,.tabulator.thead-dark .tabulator-header .tabulator-col{border-color:#32383e;background-color:#212529;color:#fff}.tabulator.table-dark{background-color:#212529}.tabulator.table-dark:not(.thead-light) .tabulator-header,.tabulator.table-dark:not(.thead-light) .tabulator-header .tabulator-col{border-color:#32383e;background-color:#212529;color:#fff}.tabulator.table-dark .tabulator-tableHolder{color:#fff}.tabulator.table-dark .tabulator-row{border-color:#32383e}.tabulator.table-dark .tabulator-row:hover{background-color:hsla(0,0%,100%,.075)!important}.tabulator.table-striped .tabulator-row:nth-child(2n){background-color:rgba(0,0,0,.05)}.tabulator.table-striped .tabulator-row:nth-child(2n).tabulator-selected{background-color:#9abcea}.tabulator.table-striped .tabulator-row:nth-child(2n).tabulator-selectable:hover{background-color:rgba(0,0,0,.075);cursor:pointer}.tabulator.table-striped .tabulator-row:nth-child(2n).tabulator-selected:hover{background-color:#769bcc;cursor:pointer}.tabulator.table-striped.table-dark .tabulator-row:nth-child(2n){background-color:hsla(0,0%,100%,.05)}.tabulator.table-bordered{border:1px solid #dee2e6}.tabulator.table-bordered .tabulator-header .tabulator-col,.tabulator.table-bordered .tabulator-tableHolder .tabulator-table .tabulator-row .tabulator-cell{border-right:1px solid #dee2e6}.tabulator.table-borderless .tabulator-header,.tabulator.table-borderless .tabulator-row{border:none}.tabulator.table-sm .tabulator-header .tabulator-col .tabulator-col-content{padding:.3rem!important}.tabulator.table-sm .tabulator-tableHolder .tabulator-table .tabulator-row{min-height:1.6rem}.tabulator.table-sm .tabulator-tableHolder .tabulator-table .tabulator-row .tabulator-cell{padding:.3rem!important}.tabulator .tabulator-tableHolder .tabulator-table .tabulator-row.table-primary{background:#b8daff!important}.tabulator .tabulator-tableHolder .tabulator-table .tabulator-row.table-secondary{background:#d6d8db!important}.tabulator .tabulator-tableHolder .tabulator-table .tabulator-row.table-success{background:#c3e6cb!important}.tabulator .tabulator-tableHolder .tabulator-table .tabulator-row.table-info{background:#bee5eb!important}.tabulator .tabulator-tableHolder .tabulator-table .tabulator-row.table-warning{background:#ffeeba!important}.tabulator .tabulator-tableHolder .tabulator-table .tabulator-row.table-danger{background:#f5c6cb!important}.tabulator .tabulator-tableHolder .tabulator-table .tabulator-row.table-light{background:#fdfdfe!important}.tabulator .tabulator-tableHolder .tabulator-table .tabulator-row.table-dark{background:#c6c8ca!important}.tabulator .tabulator-tableHolder .tabulator-table .tabulator-row.table-active{background:rgba(0,0,0,.075)!important}.tabulator .tabulator-tableHolder .tabulator-table .tabulator-row.bg-primary{background:#007bff!important}.tabulator .tabulator-tableHolder .tabulator-table .tabulator-row.bg-secondary{background:#6c757d!important}.tabulator .tabulator-tableHolder .tabulator-table .tabulator-row.bg-success{background:#28a745!important}.tabulator .tabulator-tableHolder .tabulator-table .tabulator-row.bg-info{background:#17a2b8!important}.tabulator .tabulator-tableHolder .tabulator-table .tabulator-row.bg-warning{background:#ffc107!important}.tabulator .tabulator-tableHolder .tabulator-table .tabulator-row.bg-danger{background:#dc3545!important}.tabulator .tabulator-tableHolder .tabulator-table .tabulator-row.bg-light{background:#f8f9fa!important}.tabulator .tabulator-tableHolder .tabulator-table .tabulator-row.bg-dark{background:#343a40!important}.tabulator .tabulator-tableHolder .tabulator-table .tabulator-row.bg-active{background:rgba(0,0,0,.075)!important}.tabulator .tabulator-tableHolder .tabulator-table .tabulator-row .tabulator-cell.table-primary{background:#b8daff!important}.tabulator .tabulator-tableHolder .tabulator-table .tabulator-row .tabulator-cell.table-secondary{background:#d6d8db!important}.tabulator .tabulator-tableHolder .tabulator-table .tabulator-row .tabulator-cell.table-success{background:#c3e6cb!important}.tabulator .tabulator-tableHolder .tabulator-table .tabulator-row .tabulator-cell.table-info{background:#bee5eb!important}.tabulator .tabulator-tableHolder .tabulator-table .tabulator-row .tabulator-cell.table-warning{background:#ffeeba!important}.tabulator .tabulator-tableHolder .tabulator-table .tabulator-row .tabulator-cell.table-danger{background:#f5c6cb!important}.tabulator .tabulator-tableHolder .tabulator-table .tabulator-row .tabulator-cell.table-light{background:#fdfdfe!important}.tabulator .tabulator-tableHolder .tabulator-table .tabulator-row .tabulator-cell.table-dark{background:#c6c8ca!important}.tabulator .tabulator-tableHolder .tabulator-table .tabulator-row .tabulator-cell.table-active{background:rgba(0,0,0,.075)!important}.tabulator .tabulator-tableHolder .tabulator-table .tabulator-row .tabulator-cell.bg-primary{background:#007bff!important}.tabulator .tabulator-tableHolder .tabulator-table .tabulator-row .tabulator-cell.bg-secondary{background:#6c757d!important}.tabulator .tabulator-tableHolder .tabulator-table .tabulator-row .tabulator-cell.bg-success{background:#28a745!important}.tabulator .tabulator-tableHolder .tabulator-table .tabulator-row .tabulator-cell.bg-info{background:#17a2b8!important}.tabulator .tabulator-tableHolder .tabulator-table .tabulator-row .tabulator-cell.bg-warning{background:#ffc107!important}.tabulator .tabulator-tableHolder .tabulator-table .tabulator-row .tabulator-cell.bg-danger{background:#dc3545!important}.tabulator .tabulator-tableHolder .tabulator-table .tabulator-row .tabulator-cell.bg-light{background:#f8f9fa!important}.tabulator .tabulator-tableHolder .tabulator-table .tabulator-row .tabulator-cell.bg-dark{background:#343a40!important}.tabulator .tabulator-tableHolder .tabulator-table .tabulator-row .tabulator-cell.bg-active{background:rgba(0,0,0,.075)!important}.tabulator-row{position:relative;box-sizing:border-box;min-height:2.5rem;background-color:transparent;border-bottom:1px solid #dee2e6}.tabulator-row.tabulator-selectable:hover{background-color:rgba(0,0,0,.075);cursor:pointer}.tabulator-row.tabulator-selected{background-color:#9abcea}.tabulator-row.tabulator-selected:hover{background-color:#769bcc;cursor:pointer}.tabulator-row.tabulator-moving{position:absolute;border-top:1px solid #dee2e6;border-bottom:1px solid #dee2e6;pointer-events:none!important;z-index:2}.tabulator-row .tabulator-row-resize-handle{position:absolute;right:0;bottom:0;left:0;height:5px}.tabulator-row .tabulator-row-resize-handle.prev{top:0;bottom:auto}.tabulator-row .tabulator-row-resize-handle:hover{cursor:ns-resize}.tabulator-row .tabulator-frozen{display:inline-block;position:absolute;background-color:inherit;z-index:1}.tabulator-row .tabulator-frozen.tabulator-frozen-left{border-right:2px solid #dee2e6}.tabulator-row .tabulator-frozen.tabulator-frozen-right{border-left:2px solid #dee2e6}.tabulator-row .tabulator-responsive-collapse{box-sizing:border-box;padding:5px;border-top:1px solid #dee2e6;border-bottom:1px solid #dee2e6}.tabulator-row .tabulator-responsive-collapse:empty{display:none}.tabulator-row .tabulator-responsive-collapse table{font-size:1rem}.tabulator-row .tabulator-responsive-collapse table tr td{position:relative}.tabulator-row .tabulator-responsive-collapse table tr td:first-of-type{padding-right:10px}.tabulator-row .tabulator-cell{display:inline-block;position:relative;box-sizing:border-box;padding:.75rem;vertical-align:middle;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.tabulator-row .tabulator-cell:last-of-type{border-right:none}.tabulator-row .tabulator-cell.tabulator-editing{border:1px solid #1d68cd;padding:0}.tabulator-row .tabulator-cell.tabulator-editing input,.tabulator-row .tabulator-cell.tabulator-editing select{border:1px;background:transparent}.tabulator-row .tabulator-cell.tabulator-validation-fail{border:1px solid #d00}.tabulator-row .tabulator-cell.tabulator-validation-fail input,.tabulator-row .tabulator-cell.tabulator-validation-fail select{border:1px;background:transparent;color:#d00}.tabulator-row .tabulator-cell:first-child .tabulator-col-resize-handle.prev{display:none}.tabulator-row .tabulator-cell.tabulator-row-handle{display:-ms-inline-flexbox;display:inline-flex;-ms-flex-align:center;align-items:center;-moz-user-select:none;-khtml-user-select:none;-webkit-user-select:none;-o-user-select:none}.tabulator-row .tabulator-cell.tabulator-row-handle .tabulator-row-handle-box{width:80%}.tabulator-row .tabulator-cell.tabulator-row-handle .tabulator-row-handle-box .tabulator-row-handle-bar{width:100%;height:3px;margin-top:2px;background:#666}.tabulator-row .tabulator-cell .tabulator-data-tree-branch{display:inline-block;vertical-align:middle;height:9px;width:7px;margin-top:-9px;margin-right:5px;border-bottom-left-radius:1px;border-left:2px solid #dee2e6;border-bottom:2px solid #dee2e6}.tabulator-row .tabulator-cell .tabulator-data-tree-control{display:-ms-inline-flexbox;display:inline-flex;-ms-flex-pack:center;justify-content:center;-ms-flex-align:center;align-items:center;vertical-align:middle;height:11px;width:11px;margin-right:5px;border:1px solid #ccc;border-radius:2px;background:rgba(0,0,0,.1);overflow:hidden}.tabulator-row .tabulator-cell .tabulator-data-tree-control:hover{cursor:pointer;background:rgba(0,0,0,.2)}.tabulator-row .tabulator-cell .tabulator-data-tree-control .tabulator-data-tree-control-collapse{display:inline-block;position:relative;height:7px;width:1px;background:transparent}.tabulator-row .tabulator-cell .tabulator-data-tree-control .tabulator-data-tree-control-collapse:after{position:absolute;content:"";left:-3px;top:3px;height:1px;width:7px;background:#ccc}.tabulator-row .tabulator-cell .tabulator-data-tree-control .tabulator-data-tree-control-expand{display:inline-block;position:relative;height:7px;width:1px;background:#ccc}.tabulator-row .tabulator-cell .tabulator-data-tree-control .tabulator-data-tree-control-expand:after{position:absolute;content:"";left:-3px;top:3px;height:1px;width:7px;background:#ccc}.tabulator-row .tabulator-cell .tabulator-responsive-collapse-toggle{display:-ms-inline-flexbox;display:inline-flex;-ms-flex-align:center;align-items:center;-ms-flex-pack:center;justify-content:center;-moz-user-select:none;-khtml-user-select:none;-webkit-user-select:none;-o-user-select:none;height:15px;width:15px;border-radius:20px;background:#666;color:transparent;font-weight:700;font-size:1.1em}.tabulator-row .tabulator-cell .tabulator-responsive-collapse-toggle:hover{opacity:.7}.tabulator-row .tabulator-cell .tabulator-responsive-collapse-toggle.open .tabulator-responsive-collapse-toggle-close{display:initial}.tabulator-row .tabulator-cell .tabulator-responsive-collapse-toggle.open .tabulator-responsive-collapse-toggle-open,.tabulator-row .tabulator-cell .tabulator-responsive-collapse-toggle .tabulator-responsive-collapse-toggle-close{display:none}.tabulator-row.tabulator-group{box-sizing:border-box;border-bottom:1px solid #999;border-right:1px solid #dee2e6;border-top:1px solid #999;padding:5px;padding-left:10px;background:#fafafa;font-weight:700;min-width:100%}.tabulator-row.tabulator-group:hover{cursor:pointer;background-color:rgba(0,0,0,.1)}.tabulator-row.tabulator-group.tabulator-group-visible .tabulator-arrow{margin-right:10px;border-left:6px solid transparent;border-right:6px solid transparent;border-top:6px solid #666;border-bottom:0}.tabulator-row.tabulator-group.tabulator-group-level-1 .tabulator-arrow{margin-left:20px}.tabulator-row.tabulator-group.tabulator-group-level-2 .tabulator-arrow{margin-left:40px}.tabulator-row.tabulator-group.tabulator-group-level-3 .tabulator-arrow{margin-left:60px}.tabulator-row.tabulator-group.tabulator-group-level-4 .tabulator-arrow{margin-left:80px}.tabulator-row.tabulator-group.tabulator-group-level-5 .tabulator-arrow{margin-left:100px}.tabulator-row.tabulator-group .tabulator-arrow{display:inline-block;width:0;height:0;margin-right:16px;border-top:6px solid transparent;border-bottom:6px solid transparent;border-right:0;border-left:6px solid #666;vertical-align:middle}.tabulator-row.tabulator-group span{margin-left:10px;color:#666}.tabulator-edit-select-list{position:absolute;display:inline-block;box-sizing:border-box;max-height:200px;background:transparent;border:1px solid #dee2e6;font-size:1rem;overflow-y:auto;-webkit-overflow-scrolling:touch;z-index:4}.tabulator-edit-select-list .tabulator-edit-select-list-item{padding:4px}.tabulator-edit-select-list .tabulator-edit-select-list-item.active{color:transparent;background:#1d68cd}.tabulator-edit-select-list .tabulator-edit-select-list-item:hover{cursor:pointer;color:transparent;background:#1d68cd}.tabulator-edit-select-list .tabulator-edit-select-list-group{border-bottom:1px solid #dee2e6;padding:4px;padding-top:6px;font-weight:700} -/*# sourceMappingURL=tabulator_bootstrap4.min.css.map */ diff --git a/Gems/AssetMemoryAnalyzer/External/tabulator-master/dist/css/bootstrap/tabulator_bootstrap4.min.css.map b/Gems/AssetMemoryAnalyzer/External/tabulator-master/dist/css/bootstrap/tabulator_bootstrap4.min.css.map deleted file mode 100644 index ce13175937..0000000000 --- a/Gems/AssetMemoryAnalyzer/External/tabulator-master/dist/css/bootstrap/tabulator_bootstrap4.min.css.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"sources":["tabulator_bootstrap4.min.css"],"names":[],"mappings":"AACA,WACE,kBAAmB,AACnB,6BAA8B,AAC9B,gBAAiB,AACjB,eAAgB,AAChB,gBAAiB,AACjB,WAAY,AACZ,eAAgB,AAEhB,uBAAyB,CAC1B,AAED,iFACE,cAAgB,CACjB,AAED,kCACE,yBAA0B,AACvB,sBAAuB,AACtB,qBAAsB,AAClB,gBAAkB,CAC3B,AAED,6BAGE,WAAY,AACZ,6BAA8B,AAC9B,gCAAiC,AAEjC,gBAAkB,AAClB,mBAAoB,AAEpB,sBAAuB,AACvB,wBAAyB,AACzB,yBAA0B,AAC1B,mBAAqB,CACtB,AAED,yEAfE,kBAAmB,AACnB,sBAAuB,AAIvB,sBAAuB,AAGvB,eAAiB,CAOnB,AAQC,4CAPC,qBAAsB,AAItB,gBAAiB,AACjB,qBAAuB,CAExB,AAED,6DACE,kBAAmB,AACnB,yBAA0B,AAC1B,mBAAoB,AACpB,mBAAqB,CACtB,AAED,mEACE,sBAAuB,AACvB,kBAAmB,AACnB,cAAiB,CAClB,AAED,wFACE,sBAAuB,AACvB,WAAY,AACZ,mBAAoB,AACpB,gBAAiB,AACjB,uBAAwB,AACxB,qBAAuB,CACxB,AAED,gHACE,sBAAuB,AACvB,WAAY,AACZ,sBAAuB,AACvB,YAAa,AACb,eAAiB,CAClB,AAED,oFACE,qBAAsB,AACtB,kBAAmB,AACnB,SAAU,AACV,UAAW,AACX,QAAS,AACT,SAAU,AACV,kCAAmC,AACnC,mCAAoC,AACpC,4BAA8B,CAC/B,AAED,0FACE,kBAAmB,AACnB,oBAAqB,AACrB,aAAc,AACd,6BAA8B,AAC9B,eAAiB,CAClB,AAED,oHACE,iBAAmB,CACpB,AAED,0FACE,YAAc,CACf,AAED,+DACE,kBAAmB,AACnB,mCAAqC,AACrC,wBAA0B,CAC3B,AAED,qEACE,kBAAmB,AACnB,sBAAuB,AACvB,eAAgB,AAChB,WAAY,AACZ,iBAAmB,CACpB,AAED,8EACE,qBAAwB,CACzB,AAED,yEACE,cAAgB,CACjB,AAED,sFACE,QAAS,AACT,QAAU,CACX,AAED,oFACE,kBAAoB,CACrB,AAED,qEACE,eAAgB,AAChB,wBAA0B,CAC3B,AAED,uHACE,gBAAiB,AACjB,4BAA8B,CAC/B,AAED,sHACE,gBAAiB,AACjB,4BAA8B,CAC/B,AAED,uHACE,0BAA2B,AAC3B,kBAAoB,CACrB,AAED,+GACE,iCAAkC,AAC9B,uBAAwB,AACpB,yBAA0B,AAClC,uBAAwB,AACxB,oBAAqB,AACrB,aAAc,AACd,sBAAuB,AACnB,mBAAoB,AACxB,qBAAsB,AAClB,sBAAwB,CAC7B,AAED,oHAEM,wBAA0B,CAC/B,AAED,2GACE,gBAAiB,AACjB,gBAAkB,CACnB,AAED,uIACE,gBAAiB,AACjB,mBAAqB,CACtB,AAED,uGACE,qBAAuB,CACxB,AAED,+CACE,qBAAsB,AACtB,kBAAmB,AACnB,SAAY,CACb,AAED,qEACE,8BAAgC,CACjC,AAED,sEACE,6BAA+B,CAChC,AAED,qDACE,sBAAuB,AACvB,WAAY,AACZ,0BAA6B,AAC7B,6BAA8B,AAC9B,gCAAiC,AACjC,eAAiB,CAClB,AAED,oEACE,yBAA6B,CAC9B,AAED,iGACE,YAAc,CACf,AAED,2DACE,cAAgB,CACjB,AAED,iEACE,YAAc,CACf,AAED,kCACE,kBAAmB,AACnB,WAAY,AACZ,mBAAoB,AACpB,cAAe,AACf,gCAAkC,CACnC,AAED,wCACE,YAAc,CACf,AAED,yDACE,sBAAuB,AACvB,oBAAqB,AACrB,aAAc,AACd,sBAAuB,AACnB,mBAAoB,AACxB,UAAY,CACb,AAED,wFACE,kBAAmB,AACnB,MAAO,AACP,OAAQ,AACR,WAAa,CACd,AAED,8DACE,qBAAsB,AACtB,cAAe,AACf,aAAc,AACd,WAAY,AACZ,gBAAkB,AAClB,cAAgB,CACjB,AAED,mDACE,kBAAmB,AACnB,qBAAsB,AACtB,6BAA8B,AAC9B,mBAAoB,AACpB,gBAAkB,CACnB,AAED,kFACE,gBAAkB,AAClB,oCAA2C,CAC5C,AAED,sGACE,+BAAiC,CAClC,AAED,yGACE,4BAA8B,CAC/B,AAED,wCACE,kBAAmB,AACnB,QAAS,AACT,MAAO,AACP,SAAU,AACV,SAAW,CACZ,AAED,6CACE,OAAQ,AACR,UAAY,CACb,AAED,8CACE,gBAAkB,CACnB,AAED,6BACE,iBAAkB,AAClB,6BAA8B,AAC9B,iBAAkB,AAClB,gBAAkB,AAClB,mBAAoB,AACpB,qBAAsB,AAClB,iBAAkB,AACtB,sBAAuB,AACvB,wBAAyB,AACzB,yBAA0B,AAC1B,mBAAqB,CACtB,AAED,qDACE,sBAAuB,AACvB,wBAAyB,AACzB,sBAA6B,AAC7B,gBAAiB,AACjB,qCAA2C,AAC3C,gCAAiC,AACjC,6BAA8B,AAC9B,eAAiB,CAClB,AAED,oEACE,oCAA2C,CAC5C,AAED,iGACE,YAAc,CACf,AAED,gEACE,mBAAoB,AACpB,kBAAoB,CACrB,AAED,6CACE,qBAAsB,AACtB,SAAU,AACV,eAAgB,AAChB,iBAAkB,AAClB,yBAA0B,AAC1B,kBAAmB,AACnB,8BAAqC,AACrC,cAAe,AACf,oBAAqB,AACrB,gBAAoB,AACpB,iBAAmB,CACpB,AAED,8DACE,2BAA4B,AAC5B,6BAA+B,CAChC,AAED,6DACE,yBAA0B,AAC1B,4BAA6B,AAC7B,8BAAgC,CACjC,AAED,oDACE,qBAAsB,AACtB,yBAA0B,AAC1B,UAAY,CACb,AAED,sDACE,qBAAsB,AACtB,gBAAiB,AACjB,aAAe,CAChB,AAED,kEACE,eAAgB,AAChB,qBAAsB,AACtB,mBAAoB,AACpB,aAAe,CAChB,AAED,6BACE,kBAAmB,AACnB,oBAAqB,AACrB,aAAc,AACd,sBAAuB,AACnB,mBAAoB,AACxB,MAAO,AACP,OAAQ,AACR,UAAa,AACb,YAAa,AACb,WAAY,AACZ,0BAA+B,AAC/B,iBAAmB,CACpB,AAED,mDACE,qBAAsB,AACtB,cAAe,AACf,kBAAmB,AACnB,mBAAoB,AACpB,gBAAiB,AACjB,gBAAkB,AAClB,cAAgB,CACjB,AAED,qEACE,sBAAuB,AACvB,UAAY,CACb,AAED,mEACE,sBAAuB,AACvB,aAAe,CAChB,AAQD,+FACE,qBAAsB,AACtB,yBAA0B,AAC1B,UAAY,CACb,AAED,sBACE,wBAA0B,CAC3B,AAQD,mIALE,qBAAsB,AACtB,yBAA0B,AAC1B,UAAY,CAOb,AAED,6CACE,UAAY,CACb,AAED,qCACE,oBAAsB,CACvB,AAED,2CACE,+CAAwD,CACzD,AAED,sDACE,gCAAsC,CACvC,AAED,yEACE,wBAA0B,CAC3B,AAED,iFACE,kCAAuC,AACvC,cAAgB,CACjB,AAED,+EACE,yBAA0B,AAC1B,cAAgB,CACjB,AAED,iEACE,oCAA4C,CAC7C,AAED,0BACE,wBAA0B,CAC3B,AAMD,4JACE,8BAAgC,CACjC,AAMD,yFACE,WAAa,CACd,AAED,4EACE,uBAA2B,CAC5B,AAED,2EACE,iBAAmB,CACpB,AAED,2FACE,uBAA2B,CAC5B,AAED,gFACE,4BAA+B,CAChC,AAED,kFACE,4BAA+B,CAChC,AAED,gFACE,4BAA+B,CAChC,AAED,6EACE,4BAA+B,CAChC,AAED,gFACE,4BAA+B,CAChC,AAED,+EACE,4BAA+B,CAChC,AAED,8EACE,4BAA+B,CAChC,AAED,6EACE,4BAA+B,CAChC,AAED,+EACE,qCAA4C,CAC7C,AAED,6EACE,4BAA+B,CAChC,AAED,+EACE,4BAA+B,CAChC,AAED,6EACE,4BAA+B,CAChC,AAED,0EACE,4BAA+B,CAChC,AAED,6EACE,4BAA+B,CAChC,AAED,4EACE,4BAA+B,CAChC,AAED,2EACE,4BAA+B,CAChC,AAED,0EACE,4BAA+B,CAChC,AAED,4EACE,qCAA4C,CAC7C,AAED,gGACE,4BAA+B,CAChC,AAED,kGACE,4BAA+B,CAChC,AAED,gGACE,4BAA+B,CAChC,AAED,6FACE,4BAA+B,CAChC,AAED,gGACE,4BAA+B,CAChC,AAED,+FACE,4BAA+B,CAChC,AAED,8FACE,4BAA+B,CAChC,AAED,6FACE,4BAA+B,CAChC,AAED,+FACE,qCAA4C,CAC7C,AAED,6FACE,4BAA+B,CAChC,AAED,+FACE,4BAA+B,CAChC,AAED,6FACE,4BAA+B,CAChC,AAED,0FACE,4BAA+B,CAChC,AAED,6FACE,4BAA+B,CAChC,AAED,4FACE,4BAA+B,CAChC,AAED,2FACE,4BAA+B,CAChC,AAED,0FACE,4BAA+B,CAChC,AAED,4FACE,qCAA4C,CAC7C,AAED,eACE,kBAAmB,AACnB,sBAAuB,AACvB,kBAAmB,AACnB,6BAA8B,AAC9B,+BAAiC,CAClC,AAED,0CACE,kCAAuC,AACvC,cAAgB,CACjB,AAED,kCACE,wBAA0B,CAC3B,AAED,wCACE,yBAA0B,AAC1B,cAAgB,CACjB,AAED,gCACE,kBAAmB,AACnB,6BAA8B,AAC9B,gCAAiC,AACjC,8BAAgC,AAChC,SAAY,CACb,AAED,4CACE,kBAAmB,AACnB,QAAS,AACT,SAAU,AACV,OAAQ,AACR,UAAY,CACb,AAED,iDACE,MAAO,AACP,WAAa,CACd,AAED,kDACE,gBAAkB,CACnB,AAED,iCACE,qBAAsB,AACtB,kBAAmB,AACnB,yBAA0B,AAC1B,SAAY,CACb,AAED,uDACE,8BAAgC,CACjC,AAED,wDACE,6BAA+B,CAChC,AAED,8CACE,sBAAuB,AACvB,YAAa,AACb,6BAA8B,AAC9B,+BAAiC,CAClC,AAED,oDACE,YAAc,CACf,AAED,oDACE,cAAgB,CACjB,AAED,0DACE,iBAAmB,CACpB,AAED,wEACE,kBAAoB,CACrB,AAED,+BACE,qBAAsB,AACtB,kBAAmB,AACnB,sBAAuB,AACvB,eAAiB,AACjB,sBAAuB,AACvB,mBAAoB,AACpB,gBAAiB,AACjB,sBAAwB,CACzB,AAED,4CACE,iBAAmB,CACpB,AAED,iDACE,yBAA0B,AAC1B,SAAW,CACZ,AAED,+GACE,WAAY,AACZ,sBAAwB,CACzB,AAED,yDACE,qBAA0B,CAC3B,AAED,+HACE,WAAY,AACZ,uBAAwB,AACxB,UAAe,CAChB,AAED,6EACE,YAAc,CACf,AAED,oDACE,2BAA4B,AAC5B,oBAAqB,AACrB,sBAAuB,AACnB,mBAAoB,AACxB,sBAAuB,AACvB,wBAAyB,AACzB,yBAA0B,AAC1B,mBAAqB,CACtB,AAED,8EACE,SAAW,CACZ,AAED,wGACE,WAAY,AACZ,WAAY,AACZ,eAAgB,AAChB,eAAiB,CAClB,AAED,2DACE,qBAAsB,AACtB,sBAAuB,AACvB,WAAY,AACZ,UAAW,AACX,gBAAiB,AACjB,iBAAkB,AAClB,8BAA+B,AAC/B,8BAA+B,AAC/B,+BAAiC,CAClC,AAED,4DACE,2BAA4B,AAC5B,oBAAqB,AACrB,qBAAsB,AAClB,uBAAwB,AAC5B,sBAAuB,AACnB,mBAAoB,AACxB,sBAAuB,AACvB,YAAa,AACb,WAAY,AACZ,iBAAkB,AAClB,sBAAuB,AACvB,kBAAmB,AACnB,0BAA+B,AAC/B,eAAiB,CAClB,AAED,kEACE,eAAgB,AAChB,yBAA+B,CAChC,AAED,kGACE,qBAAsB,AACtB,kBAAmB,AACnB,WAAY,AACZ,UAAW,AACX,sBAAwB,CACzB,AAED,wGACE,kBAAmB,AACnB,WAAY,AACZ,UAAW,AACX,QAAS,AACT,WAAY,AACZ,UAAW,AACX,eAAiB,CAClB,AAED,gGACE,qBAAsB,AACtB,kBAAmB,AACnB,WAAY,AACZ,UAAW,AACX,eAAiB,CAClB,AAED,sGACE,kBAAmB,AACnB,WAAY,AACZ,UAAW,AACX,QAAS,AACT,WAAY,AACZ,UAAW,AACX,eAAiB,CAClB,AAED,qEACE,2BAA4B,AAC5B,oBAAqB,AACrB,sBAAuB,AACnB,mBAAoB,AACxB,qBAAsB,AAClB,uBAAwB,AAC5B,sBAAuB,AACvB,wBAAyB,AACzB,yBAA0B,AAC1B,oBAAqB,AACrB,YAAa,AACb,WAAY,AACZ,mBAAoB,AACpB,gBAAiB,AACjB,kBAAmB,AACnB,gBAAkB,AAClB,eAAiB,CAClB,AAED,2EACE,UAAY,CACb,AAED,sHACE,eAAiB,CAClB,AAMD,sOACE,YAAc,CACf,AAED,+BACE,sBAAuB,AACvB,6BAA8B,AAC9B,+BAAgC,AAChC,0BAA2B,AAC3B,YAAa,AACb,kBAAmB,AACnB,mBAAoB,AACpB,gBAAkB,AAClB,cAAgB,CACjB,AAED,qCACE,eAAgB,AAChB,+BAAqC,CACtC,AAED,wEACE,kBAAmB,AACnB,kCAAmC,AACnC,mCAAoC,AACpC,0BAA2B,AAC3B,eAAiB,CAClB,AAED,wEACE,gBAAkB,CACnB,AAED,wEACE,gBAAkB,CACnB,AAED,wEACE,gBAAkB,CACnB,AAED,wEACE,gBAAkB,CACnB,AAED,wEACE,iBAAmB,CACpB,AAED,gDACE,qBAAsB,AACtB,QAAS,AACT,SAAU,AACV,kBAAmB,AACnB,iCAAkC,AAClC,oCAAqC,AACrC,eAAgB,AAChB,2BAA4B,AAC5B,qBAAuB,CACxB,AAED,oCACE,iBAAkB,AAClB,UAAY,CACb,AAED,4BACE,kBAAmB,AACnB,qBAAsB,AACtB,sBAAuB,AACvB,iBAAkB,AAClB,uBAAwB,AACxB,yBAA0B,AAC1B,eAAgB,AAChB,gBAAiB,AACjB,iCAAkC,AAClC,SAAe,CAChB,AAED,6DACE,WAAa,CACd,AAED,oEACE,kBAAmB,AACnB,kBAAoB,CACrB,AAED,mEACE,eAAgB,AAChB,kBAAmB,AACnB,kBAAoB,CACrB,AAED,8DACE,gCAAiC,AACjC,YAAa,AACb,gBAAiB,AACjB,eAAkB,CACnB","file":"tabulator_bootstrap4.min.css","sourcesContent":["/* Tabulator v4.1.2 (c) Oliver Folkerd */\n.tabulator {\n position: relative;\n background-color: transparent;\n overflow: hidden;\n font-size: 1rem;\n text-align: left;\n width: 100%;\n max-width: 100%;\n -ms-transform: translatez(0);\n transform: translatez(0);\n}\n\n.tabulator[tabulator-layout=\"fitDataFill\"] .tabulator-tableHolder .tabulator-table {\n min-width: 100%;\n}\n\n.tabulator.tabulator-block-select {\n -webkit-user-select: none;\n -moz-user-select: none;\n -ms-user-select: none;\n user-select: none;\n}\n\n.tabulator .tabulator-header {\n position: relative;\n box-sizing: border-box;\n width: 100%;\n border-top: 1px solid #dee2e6;\n border-bottom: 2px solid #dee2e6;\n background-color: #fff;\n font-weight: bold;\n white-space: nowrap;\n overflow: hidden;\n -moz-user-select: none;\n -khtml-user-select: none;\n -webkit-user-select: none;\n -o-user-select: none;\n}\n\n.tabulator .tabulator-header .tabulator-col {\n display: inline-block;\n position: relative;\n box-sizing: border-box;\n background-color: #fff;\n text-align: left;\n vertical-align: bottom;\n overflow: hidden;\n}\n\n.tabulator .tabulator-header .tabulator-col.tabulator-moving {\n position: absolute;\n border: 1px solid #dee2e6;\n background: #e6e6e6;\n pointer-events: none;\n}\n\n.tabulator .tabulator-header .tabulator-col .tabulator-col-content {\n box-sizing: border-box;\n position: relative;\n padding: 0.75rem;\n}\n\n.tabulator .tabulator-header .tabulator-col .tabulator-col-content .tabulator-col-title {\n box-sizing: border-box;\n width: 100%;\n white-space: nowrap;\n overflow: hidden;\n text-overflow: ellipsis;\n vertical-align: bottom;\n}\n\n.tabulator .tabulator-header .tabulator-col .tabulator-col-content .tabulator-col-title .tabulator-title-editor {\n box-sizing: border-box;\n width: 100%;\n border: 1px solid #999;\n padding: 1px;\n background: #fff;\n}\n\n.tabulator .tabulator-header .tabulator-col .tabulator-col-content .tabulator-arrow {\n display: inline-block;\n position: absolute;\n top: 14px;\n right: 8px;\n width: 0;\n height: 0;\n border-left: 6px solid transparent;\n border-right: 6px solid transparent;\n border-bottom: 6px solid #bbb;\n}\n\n.tabulator .tabulator-header .tabulator-col.tabulator-col-group .tabulator-col-group-cols {\n position: relative;\n display: -ms-flexbox;\n display: flex;\n border-top: 1px solid #dee2e6;\n overflow: hidden;\n}\n\n.tabulator .tabulator-header .tabulator-col.tabulator-col-group .tabulator-col-group-cols .tabulator-col:last-child {\n margin-right: -1px;\n}\n\n.tabulator .tabulator-header .tabulator-col:first-child .tabulator-col-resize-handle.prev {\n display: none;\n}\n\n.tabulator .tabulator-header .tabulator-col.ui-sortable-helper {\n position: absolute;\n background-color: #e6e6e6 !important;\n border: 1px solid #dee2e6;\n}\n\n.tabulator .tabulator-header .tabulator-col .tabulator-header-filter {\n position: relative;\n box-sizing: border-box;\n margin-top: 2px;\n width: 100%;\n text-align: center;\n}\n\n.tabulator .tabulator-header .tabulator-col .tabulator-header-filter textarea {\n height: auto !important;\n}\n\n.tabulator .tabulator-header .tabulator-col .tabulator-header-filter svg {\n margin-top: 3px;\n}\n\n.tabulator .tabulator-header .tabulator-col .tabulator-header-filter input::-ms-clear {\n width: 0;\n height: 0;\n}\n\n.tabulator .tabulator-header .tabulator-col.tabulator-sortable .tabulator-col-title {\n padding-right: 25px;\n}\n\n.tabulator .tabulator-header .tabulator-col.tabulator-sortable:hover {\n cursor: pointer;\n background-color: #e6e6e6;\n}\n\n.tabulator .tabulator-header .tabulator-col.tabulator-sortable[aria-sort=\"none\"] .tabulator-col-content .tabulator-arrow {\n border-top: none;\n border-bottom: 6px solid #bbb;\n}\n\n.tabulator .tabulator-header .tabulator-col.tabulator-sortable[aria-sort=\"asc\"] .tabulator-col-content .tabulator-arrow {\n border-top: none;\n border-bottom: 6px solid #666;\n}\n\n.tabulator .tabulator-header .tabulator-col.tabulator-sortable[aria-sort=\"desc\"] .tabulator-col-content .tabulator-arrow {\n border-top: 6px solid #666;\n border-bottom: none;\n}\n\n.tabulator .tabulator-header .tabulator-col.tabulator-col-vertical .tabulator-col-content .tabulator-col-title {\n -webkit-writing-mode: vertical-rl;\n -ms-writing-mode: tb-rl;\n writing-mode: vertical-rl;\n text-orientation: mixed;\n display: -ms-flexbox;\n display: flex;\n -ms-flex-align: center;\n align-items: center;\n -ms-flex-pack: center;\n justify-content: center;\n}\n\n.tabulator .tabulator-header .tabulator-col.tabulator-col-vertical.tabulator-col-vertical-flip .tabulator-col-title {\n -ms-transform: rotate(180deg);\n transform: rotate(180deg);\n}\n\n.tabulator .tabulator-header .tabulator-col.tabulator-col-vertical.tabulator-sortable .tabulator-col-title {\n padding-right: 0;\n padding-top: 20px;\n}\n\n.tabulator .tabulator-header .tabulator-col.tabulator-col-vertical.tabulator-sortable.tabulator-col-vertical-flip .tabulator-col-title {\n padding-right: 0;\n padding-bottom: 20px;\n}\n\n.tabulator .tabulator-header .tabulator-col.tabulator-col-vertical.tabulator-sortable .tabulator-arrow {\n right: calc(50% - 6px);\n}\n\n.tabulator .tabulator-header .tabulator-frozen {\n display: inline-block;\n position: absolute;\n z-index: 10;\n}\n\n.tabulator .tabulator-header .tabulator-frozen.tabulator-frozen-left {\n border-right: 2px solid #dee2e6;\n}\n\n.tabulator .tabulator-header .tabulator-frozen.tabulator-frozen-right {\n border-left: 2px solid #dee2e6;\n}\n\n.tabulator .tabulator-header .tabulator-calcs-holder {\n box-sizing: border-box;\n width: 100%;\n background: white !important;\n border-top: 1px solid #dee2e6;\n border-bottom: 1px solid #dee2e6;\n overflow: hidden;\n}\n\n.tabulator .tabulator-header .tabulator-calcs-holder .tabulator-row {\n background: white !important;\n}\n\n.tabulator .tabulator-header .tabulator-calcs-holder .tabulator-row .tabulator-col-resize-handle {\n display: none;\n}\n\n.tabulator .tabulator-header .tabulator-frozen-rows-holder {\n min-width: 400%;\n}\n\n.tabulator .tabulator-header .tabulator-frozen-rows-holder:empty {\n display: none;\n}\n\n.tabulator .tabulator-tableHolder {\n position: relative;\n width: 100%;\n white-space: nowrap;\n overflow: auto;\n -webkit-overflow-scrolling: touch;\n}\n\n.tabulator .tabulator-tableHolder:focus {\n outline: none;\n}\n\n.tabulator .tabulator-tableHolder .tabulator-placeholder {\n box-sizing: border-box;\n display: -ms-flexbox;\n display: flex;\n -ms-flex-align: center;\n align-items: center;\n width: 100%;\n}\n\n.tabulator .tabulator-tableHolder .tabulator-placeholder[tabulator-render-mode=\"virtual\"] {\n position: absolute;\n top: 0;\n left: 0;\n height: 100%;\n}\n\n.tabulator .tabulator-tableHolder .tabulator-placeholder span {\n display: inline-block;\n margin: 0 auto;\n padding: 10px;\n color: #000;\n font-weight: bold;\n font-size: 20px;\n}\n\n.tabulator .tabulator-tableHolder .tabulator-table {\n position: relative;\n display: inline-block;\n background-color: transparent;\n white-space: nowrap;\n overflow: visible;\n}\n\n.tabulator .tabulator-tableHolder .tabulator-table .tabulator-row.tabulator-calcs {\n font-weight: bold;\n background: rgba(0, 0, 0, 0.05) !important;\n}\n\n.tabulator .tabulator-tableHolder .tabulator-table .tabulator-row.tabulator-calcs.tabulator-calcs-top {\n border-bottom: 2px solid #dee2e6;\n}\n\n.tabulator .tabulator-tableHolder .tabulator-table .tabulator-row.tabulator-calcs.tabulator-calcs-bottom {\n border-top: 2px solid #dee2e6;\n}\n\n.tabulator .tabulator-col-resize-handle {\n position: absolute;\n right: 0;\n top: 0;\n bottom: 0;\n width: 5px;\n}\n\n.tabulator .tabulator-col-resize-handle.prev {\n left: 0;\n right: auto;\n}\n\n.tabulator .tabulator-col-resize-handle:hover {\n cursor: ew-resize;\n}\n\n.tabulator .tabulator-footer {\n padding: 5px 10px;\n border-top: 2px solid #dee2e6;\n text-align: right;\n font-weight: bold;\n white-space: nowrap;\n -ms-user-select: none;\n user-select: none;\n -moz-user-select: none;\n -khtml-user-select: none;\n -webkit-user-select: none;\n -o-user-select: none;\n}\n\n.tabulator .tabulator-footer .tabulator-calcs-holder {\n box-sizing: border-box;\n width: calc(100% + 20px);\n margin: -5px -10px 5px -10px;\n text-align: left;\n background: rgba(13, 13, 13, 0) !important;\n border-bottom: 1px solid #dee2e6;\n border-top: 1px solid #dee2e6;\n overflow: hidden;\n}\n\n.tabulator .tabulator-footer .tabulator-calcs-holder .tabulator-row {\n background: rgba(13, 13, 13, 0) !important;\n}\n\n.tabulator .tabulator-footer .tabulator-calcs-holder .tabulator-row .tabulator-col-resize-handle {\n display: none;\n}\n\n.tabulator .tabulator-footer .tabulator-calcs-holder:only-child {\n margin-bottom: -5px;\n border-bottom: none;\n}\n\n.tabulator .tabulator-footer .tabulator-page {\n display: inline-block;\n margin: 0;\n margin-top: 5px;\n padding: 8px 12px;\n border: 1px solid #dee2e6;\n border-right: none;\n background: rgba(255, 255, 255, 0.2);\n color: #007bff;\n font-family: inherit;\n font-weight: normal;\n font-size: inherit;\n}\n\n.tabulator .tabulator-footer .tabulator-page[data-page=\"first\"] {\n border-top-left-radius: 4px;\n border-bottom-left-radius: 4px;\n}\n\n.tabulator .tabulator-footer .tabulator-page[data-page=\"last\"] {\n border: 1px solid #dee2e6;\n border-top-right-radius: 4px;\n border-bottom-right-radius: 4px;\n}\n\n.tabulator .tabulator-footer .tabulator-page.active {\n border-color: #007bff;\n background-color: #007bff;\n color: #fff;\n}\n\n.tabulator .tabulator-footer .tabulator-page:disabled {\n border-color: #dee2e6;\n background: #fff;\n color: #6c757d;\n}\n\n.tabulator .tabulator-footer .tabulator-page:not(.disabled):hover {\n cursor: pointer;\n border-color: #dee2e6;\n background: #e9ecef;\n color: #0056b3;\n}\n\n.tabulator .tabulator-loader {\n position: absolute;\n display: -ms-flexbox;\n display: flex;\n -ms-flex-align: center;\n align-items: center;\n top: 0;\n left: 0;\n z-index: 100;\n height: 100%;\n width: 100%;\n background: rgba(0, 0, 0, 0.4);\n text-align: center;\n}\n\n.tabulator .tabulator-loader .tabulator-loader-msg {\n display: inline-block;\n margin: 0 auto;\n padding: 10px 20px;\n border-radius: 10px;\n background: #fff;\n font-weight: bold;\n font-size: 16px;\n}\n\n.tabulator .tabulator-loader .tabulator-loader-msg.tabulator-loading {\n border: 4px solid #333;\n color: #000;\n}\n\n.tabulator .tabulator-loader .tabulator-loader-msg.tabulator-error {\n border: 4px solid #D00;\n color: #590000;\n}\n\n.tabulator.thead-dark .tabulator-header {\n border-color: #32383e;\n background-color: #212529;\n color: #fff;\n}\n\n.tabulator.thead-dark .tabulator-header .tabulator-col {\n border-color: #32383e;\n background-color: #212529;\n color: #fff;\n}\n\n.tabulator.table-dark {\n background-color: #212529;\n}\n\n.tabulator.table-dark:not(.thead-light) .tabulator-header {\n border-color: #32383e;\n background-color: #212529;\n color: #fff;\n}\n\n.tabulator.table-dark:not(.thead-light) .tabulator-header .tabulator-col {\n border-color: #32383e;\n background-color: #212529;\n color: #fff;\n}\n\n.tabulator.table-dark .tabulator-tableHolder {\n color: #fff;\n}\n\n.tabulator.table-dark .tabulator-row {\n border-color: #32383e;\n}\n\n.tabulator.table-dark .tabulator-row:hover {\n background-color: rgba(255, 255, 255, 0.075) !important;\n}\n\n.tabulator.table-striped .tabulator-row:nth-child(even) {\n background-color: rgba(0, 0, 0, 0.05);\n}\n\n.tabulator.table-striped .tabulator-row:nth-child(even).tabulator-selected {\n background-color: #9ABCEA;\n}\n\n.tabulator.table-striped .tabulator-row:nth-child(even).tabulator-selectable:hover {\n background-color: rgba(0, 0, 0, 0.075);\n cursor: pointer;\n}\n\n.tabulator.table-striped .tabulator-row:nth-child(even).tabulator-selected:hover {\n background-color: #769BCC;\n cursor: pointer;\n}\n\n.tabulator.table-striped.table-dark .tabulator-row:nth-child(even) {\n background-color: rgba(255, 255, 255, 0.05);\n}\n\n.tabulator.table-bordered {\n border: 1px solid #dee2e6;\n}\n\n.tabulator.table-bordered .tabulator-header .tabulator-col {\n border-right: 1px solid #dee2e6;\n}\n\n.tabulator.table-bordered .tabulator-tableHolder .tabulator-table .tabulator-row .tabulator-cell {\n border-right: 1px solid #dee2e6;\n}\n\n.tabulator.table-borderless .tabulator-header {\n border: none;\n}\n\n.tabulator.table-borderless .tabulator-row {\n border: none;\n}\n\n.tabulator.table-sm .tabulator-header .tabulator-col .tabulator-col-content {\n padding: 0.3rem !important;\n}\n\n.tabulator.table-sm .tabulator-tableHolder .tabulator-table .tabulator-row {\n min-height: 1.6rem;\n}\n\n.tabulator.table-sm .tabulator-tableHolder .tabulator-table .tabulator-row .tabulator-cell {\n padding: 0.3rem !important;\n}\n\n.tabulator .tabulator-tableHolder .tabulator-table .tabulator-row.table-primary {\n background: #b8daff !important;\n}\n\n.tabulator .tabulator-tableHolder .tabulator-table .tabulator-row.table-secondary {\n background: #d6d8db !important;\n}\n\n.tabulator .tabulator-tableHolder .tabulator-table .tabulator-row.table-success {\n background: #c3e6cb !important;\n}\n\n.tabulator .tabulator-tableHolder .tabulator-table .tabulator-row.table-info {\n background: #bee5eb !important;\n}\n\n.tabulator .tabulator-tableHolder .tabulator-table .tabulator-row.table-warning {\n background: #ffeeba !important;\n}\n\n.tabulator .tabulator-tableHolder .tabulator-table .tabulator-row.table-danger {\n background: #f5c6cb !important;\n}\n\n.tabulator .tabulator-tableHolder .tabulator-table .tabulator-row.table-light {\n background: #fdfdfe !important;\n}\n\n.tabulator .tabulator-tableHolder .tabulator-table .tabulator-row.table-dark {\n background: #c6c8ca !important;\n}\n\n.tabulator .tabulator-tableHolder .tabulator-table .tabulator-row.table-active {\n background: rgba(0, 0, 0, 0.075) !important;\n}\n\n.tabulator .tabulator-tableHolder .tabulator-table .tabulator-row.bg-primary {\n background: #007bff !important;\n}\n\n.tabulator .tabulator-tableHolder .tabulator-table .tabulator-row.bg-secondary {\n background: #6c757d !important;\n}\n\n.tabulator .tabulator-tableHolder .tabulator-table .tabulator-row.bg-success {\n background: #28a745 !important;\n}\n\n.tabulator .tabulator-tableHolder .tabulator-table .tabulator-row.bg-info {\n background: #17a2b8 !important;\n}\n\n.tabulator .tabulator-tableHolder .tabulator-table .tabulator-row.bg-warning {\n background: #ffc107 !important;\n}\n\n.tabulator .tabulator-tableHolder .tabulator-table .tabulator-row.bg-danger {\n background: #dc3545 !important;\n}\n\n.tabulator .tabulator-tableHolder .tabulator-table .tabulator-row.bg-light {\n background: #f8f9fa !important;\n}\n\n.tabulator .tabulator-tableHolder .tabulator-table .tabulator-row.bg-dark {\n background: #343a40 !important;\n}\n\n.tabulator .tabulator-tableHolder .tabulator-table .tabulator-row.bg-active {\n background: rgba(0, 0, 0, 0.075) !important;\n}\n\n.tabulator .tabulator-tableHolder .tabulator-table .tabulator-row .tabulator-cell.table-primary {\n background: #b8daff !important;\n}\n\n.tabulator .tabulator-tableHolder .tabulator-table .tabulator-row .tabulator-cell.table-secondary {\n background: #d6d8db !important;\n}\n\n.tabulator .tabulator-tableHolder .tabulator-table .tabulator-row .tabulator-cell.table-success {\n background: #c3e6cb !important;\n}\n\n.tabulator .tabulator-tableHolder .tabulator-table .tabulator-row .tabulator-cell.table-info {\n background: #bee5eb !important;\n}\n\n.tabulator .tabulator-tableHolder .tabulator-table .tabulator-row .tabulator-cell.table-warning {\n background: #ffeeba !important;\n}\n\n.tabulator .tabulator-tableHolder .tabulator-table .tabulator-row .tabulator-cell.table-danger {\n background: #f5c6cb !important;\n}\n\n.tabulator .tabulator-tableHolder .tabulator-table .tabulator-row .tabulator-cell.table-light {\n background: #fdfdfe !important;\n}\n\n.tabulator .tabulator-tableHolder .tabulator-table .tabulator-row .tabulator-cell.table-dark {\n background: #c6c8ca !important;\n}\n\n.tabulator .tabulator-tableHolder .tabulator-table .tabulator-row .tabulator-cell.table-active {\n background: rgba(0, 0, 0, 0.075) !important;\n}\n\n.tabulator .tabulator-tableHolder .tabulator-table .tabulator-row .tabulator-cell.bg-primary {\n background: #007bff !important;\n}\n\n.tabulator .tabulator-tableHolder .tabulator-table .tabulator-row .tabulator-cell.bg-secondary {\n background: #6c757d !important;\n}\n\n.tabulator .tabulator-tableHolder .tabulator-table .tabulator-row .tabulator-cell.bg-success {\n background: #28a745 !important;\n}\n\n.tabulator .tabulator-tableHolder .tabulator-table .tabulator-row .tabulator-cell.bg-info {\n background: #17a2b8 !important;\n}\n\n.tabulator .tabulator-tableHolder .tabulator-table .tabulator-row .tabulator-cell.bg-warning {\n background: #ffc107 !important;\n}\n\n.tabulator .tabulator-tableHolder .tabulator-table .tabulator-row .tabulator-cell.bg-danger {\n background: #dc3545 !important;\n}\n\n.tabulator .tabulator-tableHolder .tabulator-table .tabulator-row .tabulator-cell.bg-light {\n background: #f8f9fa !important;\n}\n\n.tabulator .tabulator-tableHolder .tabulator-table .tabulator-row .tabulator-cell.bg-dark {\n background: #343a40 !important;\n}\n\n.tabulator .tabulator-tableHolder .tabulator-table .tabulator-row .tabulator-cell.bg-active {\n background: rgba(0, 0, 0, 0.075) !important;\n}\n\n.tabulator-row {\n position: relative;\n box-sizing: border-box;\n min-height: 2.5rem;\n background-color: transparent;\n border-bottom: 1px solid #dee2e6;\n}\n\n.tabulator-row.tabulator-selectable:hover {\n background-color: rgba(0, 0, 0, 0.075);\n cursor: pointer;\n}\n\n.tabulator-row.tabulator-selected {\n background-color: #9ABCEA;\n}\n\n.tabulator-row.tabulator-selected:hover {\n background-color: #769BCC;\n cursor: pointer;\n}\n\n.tabulator-row.tabulator-moving {\n position: absolute;\n border-top: 1px solid #dee2e6;\n border-bottom: 1px solid #dee2e6;\n pointer-events: none !important;\n z-index: 15;\n}\n\n.tabulator-row .tabulator-row-resize-handle {\n position: absolute;\n right: 0;\n bottom: 0;\n left: 0;\n height: 5px;\n}\n\n.tabulator-row .tabulator-row-resize-handle.prev {\n top: 0;\n bottom: auto;\n}\n\n.tabulator-row .tabulator-row-resize-handle:hover {\n cursor: ns-resize;\n}\n\n.tabulator-row .tabulator-frozen {\n display: inline-block;\n position: absolute;\n background-color: inherit;\n z-index: 10;\n}\n\n.tabulator-row .tabulator-frozen.tabulator-frozen-left {\n border-right: 2px solid #dee2e6;\n}\n\n.tabulator-row .tabulator-frozen.tabulator-frozen-right {\n border-left: 2px solid #dee2e6;\n}\n\n.tabulator-row .tabulator-responsive-collapse {\n box-sizing: border-box;\n padding: 5px;\n border-top: 1px solid #dee2e6;\n border-bottom: 1px solid #dee2e6;\n}\n\n.tabulator-row .tabulator-responsive-collapse:empty {\n display: none;\n}\n\n.tabulator-row .tabulator-responsive-collapse table {\n font-size: 1rem;\n}\n\n.tabulator-row .tabulator-responsive-collapse table tr td {\n position: relative;\n}\n\n.tabulator-row .tabulator-responsive-collapse table tr td:first-of-type {\n padding-right: 10px;\n}\n\n.tabulator-row .tabulator-cell {\n display: inline-block;\n position: relative;\n box-sizing: border-box;\n padding: 0.75rem;\n vertical-align: middle;\n white-space: nowrap;\n overflow: hidden;\n text-overflow: ellipsis;\n}\n\n.tabulator-row .tabulator-cell:last-of-type {\n border-right: none;\n}\n\n.tabulator-row .tabulator-cell.tabulator-editing {\n border: 1px solid #1D68CD;\n padding: 0;\n}\n\n.tabulator-row .tabulator-cell.tabulator-editing input, .tabulator-row .tabulator-cell.tabulator-editing select {\n border: 1px;\n background: transparent;\n}\n\n.tabulator-row .tabulator-cell.tabulator-validation-fail {\n border: 1px solid #dd0000;\n}\n\n.tabulator-row .tabulator-cell.tabulator-validation-fail input, .tabulator-row .tabulator-cell.tabulator-validation-fail select {\n border: 1px;\n background: transparent;\n color: #dd0000;\n}\n\n.tabulator-row .tabulator-cell:first-child .tabulator-col-resize-handle.prev {\n display: none;\n}\n\n.tabulator-row .tabulator-cell.tabulator-row-handle {\n display: -ms-inline-flexbox;\n display: inline-flex;\n -ms-flex-align: center;\n align-items: center;\n -moz-user-select: none;\n -khtml-user-select: none;\n -webkit-user-select: none;\n -o-user-select: none;\n}\n\n.tabulator-row .tabulator-cell.tabulator-row-handle .tabulator-row-handle-box {\n width: 80%;\n}\n\n.tabulator-row .tabulator-cell.tabulator-row-handle .tabulator-row-handle-box .tabulator-row-handle-bar {\n width: 100%;\n height: 3px;\n margin-top: 2px;\n background: #666;\n}\n\n.tabulator-row .tabulator-cell .tabulator-data-tree-branch {\n display: inline-block;\n vertical-align: middle;\n height: 9px;\n width: 7px;\n margin-top: -9px;\n margin-right: 5px;\n border-bottom-left-radius: 1px;\n border-left: 2px solid #dee2e6;\n border-bottom: 2px solid #dee2e6;\n}\n\n.tabulator-row .tabulator-cell .tabulator-data-tree-control {\n display: -ms-inline-flexbox;\n display: inline-flex;\n -ms-flex-pack: center;\n justify-content: center;\n -ms-flex-align: center;\n align-items: center;\n vertical-align: middle;\n height: 11px;\n width: 11px;\n margin-right: 5px;\n border: 1px solid #ccc;\n border-radius: 2px;\n background: rgba(0, 0, 0, 0.1);\n overflow: hidden;\n}\n\n.tabulator-row .tabulator-cell .tabulator-data-tree-control:hover {\n cursor: pointer;\n background: rgba(0, 0, 0, 0.2);\n}\n\n.tabulator-row .tabulator-cell .tabulator-data-tree-control .tabulator-data-tree-control-collapse {\n display: inline-block;\n position: relative;\n height: 7px;\n width: 1px;\n background: transparent;\n}\n\n.tabulator-row .tabulator-cell .tabulator-data-tree-control .tabulator-data-tree-control-collapse:after {\n position: absolute;\n content: \"\";\n left: -3px;\n top: 3px;\n height: 1px;\n width: 7px;\n background: #ccc;\n}\n\n.tabulator-row .tabulator-cell .tabulator-data-tree-control .tabulator-data-tree-control-expand {\n display: inline-block;\n position: relative;\n height: 7px;\n width: 1px;\n background: #ccc;\n}\n\n.tabulator-row .tabulator-cell .tabulator-data-tree-control .tabulator-data-tree-control-expand:after {\n position: absolute;\n content: \"\";\n left: -3px;\n top: 3px;\n height: 1px;\n width: 7px;\n background: #ccc;\n}\n\n.tabulator-row .tabulator-cell .tabulator-responsive-collapse-toggle {\n display: -ms-inline-flexbox;\n display: inline-flex;\n -ms-flex-align: center;\n align-items: center;\n -ms-flex-pack: center;\n justify-content: center;\n -moz-user-select: none;\n -khtml-user-select: none;\n -webkit-user-select: none;\n -o-user-select: none;\n height: 15px;\n width: 15px;\n border-radius: 20px;\n background: #666;\n color: transparent;\n font-weight: bold;\n font-size: 1.1em;\n}\n\n.tabulator-row .tabulator-cell .tabulator-responsive-collapse-toggle:hover {\n opacity: .7;\n}\n\n.tabulator-row .tabulator-cell .tabulator-responsive-collapse-toggle.open .tabulator-responsive-collapse-toggle-close {\n display: initial;\n}\n\n.tabulator-row .tabulator-cell .tabulator-responsive-collapse-toggle.open .tabulator-responsive-collapse-toggle-open {\n display: none;\n}\n\n.tabulator-row .tabulator-cell .tabulator-responsive-collapse-toggle .tabulator-responsive-collapse-toggle-close {\n display: none;\n}\n\n.tabulator-row.tabulator-group {\n box-sizing: border-box;\n border-bottom: 1px solid #999;\n border-right: 1px solid #dee2e6;\n border-top: 1px solid #999;\n padding: 5px;\n padding-left: 10px;\n background: #fafafa;\n font-weight: bold;\n min-width: 100%;\n}\n\n.tabulator-row.tabulator-group:hover {\n cursor: pointer;\n background-color: rgba(0, 0, 0, 0.1);\n}\n\n.tabulator-row.tabulator-group.tabulator-group-visible .tabulator-arrow {\n margin-right: 10px;\n border-left: 6px solid transparent;\n border-right: 6px solid transparent;\n border-top: 6px solid #666;\n border-bottom: 0;\n}\n\n.tabulator-row.tabulator-group.tabulator-group-level-1 .tabulator-arrow {\n margin-left: 20px;\n}\n\n.tabulator-row.tabulator-group.tabulator-group-level-2 .tabulator-arrow {\n margin-left: 40px;\n}\n\n.tabulator-row.tabulator-group.tabulator-group-level-3 .tabulator-arrow {\n margin-left: 60px;\n}\n\n.tabulator-row.tabulator-group.tabulator-group-level-4 .tabulator-arrow {\n margin-left: 80px;\n}\n\n.tabulator-row.tabulator-group.tabulator-group-level-5 .tabulator-arrow {\n margin-left: 100px;\n}\n\n.tabulator-row.tabulator-group .tabulator-arrow {\n display: inline-block;\n width: 0;\n height: 0;\n margin-right: 16px;\n border-top: 6px solid transparent;\n border-bottom: 6px solid transparent;\n border-right: 0;\n border-left: 6px solid #666;\n vertical-align: middle;\n}\n\n.tabulator-row.tabulator-group span {\n margin-left: 10px;\n color: #666;\n}\n\n.tabulator-edit-select-list {\n position: absolute;\n display: inline-block;\n box-sizing: border-box;\n max-height: 200px;\n background: transparent;\n border: 1px solid #dee2e6;\n font-size: 1rem;\n overflow-y: auto;\n -webkit-overflow-scrolling: touch;\n z-index: 10000;\n}\n\n.tabulator-edit-select-list .tabulator-edit-select-list-item {\n padding: 4px;\n}\n\n.tabulator-edit-select-list .tabulator-edit-select-list-item.active {\n color: transparent;\n background: #1D68CD;\n}\n\n.tabulator-edit-select-list .tabulator-edit-select-list-item:hover {\n cursor: pointer;\n color: transparent;\n background: #1D68CD;\n}\n\n.tabulator-edit-select-list .tabulator-edit-select-list-group {\n border-bottom: 1px solid #dee2e6;\n padding: 4px;\n padding-top: 6px;\n font-weight: bold;\n}\n"]} \ No newline at end of file diff --git a/Gems/AssetMemoryAnalyzer/External/tabulator-master/dist/css/semantic-ui/tabulator_semantic-ui.css b/Gems/AssetMemoryAnalyzer/External/tabulator-master/dist/css/semantic-ui/tabulator_semantic-ui.css deleted file mode 100644 index d825e07830..0000000000 --- a/Gems/AssetMemoryAnalyzer/External/tabulator-master/dist/css/semantic-ui/tabulator_semantic-ui.css +++ /dev/null @@ -1,1284 +0,0 @@ -/* Tabulator v4.1.2 (c) Oliver Folkerd */ -/******************************* - Site Settings -*******************************/ -/*------------------- - Fonts ---------------------*/ -/*------------------- - Base Sizes ---------------------*/ -/* This is the single variable that controls them all */ -/* The size of page text */ -/*------------------- - Exact Pixel Values ---------------------*/ -/* - These are used to specify exact pixel values in em - for things like borders that remain constantly - sized as emSize adjusts - - Since there are many more sizes than names for sizes, - these are named by their original pixel values. - -*/ -/*------------------- - Border Radius ---------------------*/ -/* See Power-user section below - for explanation of $px variables -*/ -/*------------------- - Site Colors ---------------------*/ -/*--- Colors ---*/ -/*--- Light Colors ---*/ -/*--- Neutrals ---*/ -/*--- Colored Backgrounds ---*/ -/*--- Colored Text ---*/ -/*--- Colored Headers ---*/ -/*--- Colored Border ---*/ -/*------------------- - Alpha Colors ---------------------*/ -/*------------------- - Brand Colors ---------------------*/ -/*-------------- - Page Heading ----------------*/ -/*------------------- - Page ---------------------*/ -/*-------------- - Form Input ----------------*/ -/* This adjusts the default form input across all elements */ -/* Input Text Color */ -/* Line Height Default For Inputs in Browser (Descendors are 17px at 14px base em) */ -/*------------------- - Focused Input ---------------------*/ -/* Used on inputs, textarea etc */ -/* Used on dropdowns, other larger blocks */ -/*------------------- - Sizes ---------------------*/ -/* - Sizes are all expressed in terms of 14px/em (default em) - This ensures these "ratios" remain constant despite changes in EM -*/ -/*------------------- - Paragraph ---------------------*/ -/*------------------- - Links ---------------------*/ -/*------------------- - Highlighted Text ---------------------*/ -/*------------------- - Em Sizes ---------------------*/ -/* - This rounds $size values to the closest pixel then expresses that value in (r)em. - This ensures all size values round to exact pixels -*/ -/* em */ -/* rem */ -/*------------------- - Loader ---------------------*/ -/*------------------- - Grid ---------------------*/ -/*------------------- - Transitions ---------------------*/ -/*------------------- - Breakpoints ---------------------*/ -/* Columns */ -/******************************* - Power-User -*******************************/ -/*------------------- - Emotive Colors ---------------------*/ -/* Positive */ -/* Negative */ -/* Info */ -/* Warning */ -/*------------------- - Paths ---------------------*/ -/* For source only. Modified in gulp for dist */ -/*------------------- - Icons ---------------------*/ -/* Maximum Glyph Width of Icon */ -/*------------------- - Neutral Text ---------------------*/ -/*------------------- - Brand Colors ---------------------*/ -/*------------------- - Borders ---------------------*/ -/*------------------- - Accents ---------------------*/ -/* Differentiating Neutrals */ -/* Differentiating Layers */ -/*------------------- - Derived Values ---------------------*/ -/* Loaders Position Offset */ -/* Rendered Scrollbar Width */ -/* Maximum Single Character Glyph Width, aka Capital "W" */ -/* Used to match floats with text */ -/* Header Spacing */ -/* Minimum Mobile Width */ -/* Positive / Negative Dupes */ -/* Responsive */ -/******************************* - States -*******************************/ -/*------------------- - Disabled ---------------------*/ -/*------------------- - Hover ---------------------*/ -/*--- Shadows ---*/ -/*--- Colors ---*/ -/*--- Emotive ---*/ -/*--- Brand ---*/ -/*--- Dark Tones ---*/ -/*--- Light Tones ---*/ -/*------------------- - Focus ---------------------*/ -/*--- Colors ---*/ -/*--- Emotive ---*/ -/*--- Brand ---*/ -/*--- Dark Tones ---*/ -/*--- Light Tones ---*/ -/*------------------- - Down (:active) ---------------------*/ -/*--- Colors ---*/ -/*--- Emotive ---*/ -/*--- Brand ---*/ -/*--- Dark Tones ---*/ -/*--- Light Tones ---*/ -/*------------------- - Active ---------------------*/ -/*--- Colors ---*/ -/*--- Emotive ---*/ -/*--- Brand ---*/ -/*--- Dark Tones ---*/ -/*--- Light Tones ---*/ -/******************************* - Table -*******************************/ -/*------------------- - Element ---------------------*/ -/*-------------- - Parts ----------------*/ -/* Table Row */ -/* Table Cell */ -/* Table Header */ -/* Table Footer */ -/* Responsive Size */ -/*------------------- - Types ---------------------*/ -/* Definition */ -/*-------------- - Couplings ----------------*/ -/*-------------- - States ----------------*/ -/* Positive */ -/* Negative */ -/* Error */ -/* Warning */ -/* Active */ -/*-------------- - Types ----------------*/ -/* Attached */ -/* Striped */ -/* Selectable */ -/* Sortable */ -/* Colors */ -/* Inverted */ -/* Basic */ -/* Padded */ -/* Compact */ -/* Sizes */ -.tabulator { - position: relative; - background-color: #FFFFFF; - overflow: hidden; - font-size: 14px; - text-align: left; - width: 100%; - margin: 1em 0em; - border: 1px solid rgba(34, 36, 38, 0.15); - box-shadow: none; - border-radius: 0.28571/pxrem; - color: rgba(0, 0, 0, 0.87); - -ms-transform: translatez(0); - transform: translatez(0); - /* Red */ - /* Orange */ - /* Yellow */ - /* Olive */ - /* Green */ - /* Teal */ - /* Blue */ - /* Violet */ - /* Purple */ - /* Pink */ - /* Brown */ - /* Grey */ - /* Black */ -} - -.tabulator[tabulator-layout="fitDataFill"] .tabulator-tableHolder .tabulator-table { - min-width: 100%; -} - -.tabulator.tabulator-block-select { - -webkit-user-select: none; - -moz-user-select: none; - -ms-user-select: none; - user-select: none; -} - -.tabulator .tabulator-header { - position: relative; - box-sizing: border-box; - width: 100%; - border-bottom: 1px solid rgba(34, 36, 38, 0.1); - background-color: #F9FAFB; - box-shadow: none; - color: rgba(0, 0, 0, 0.87); - font-style: none; - font-weight: bold; - text-transform: none; - white-space: nowrap; - overflow: hidden; - -moz-user-select: none; - -khtml-user-select: none; - -webkit-user-select: none; - -o-user-select: none; -} - -.tabulator .tabulator-header .tabulator-col { - display: inline-block; - position: relative; - box-sizing: border-box; - background-color: #F9FAFB; - text-align: left; - vertical-align: bottom; - overflow: hidden; -} - -.tabulator .tabulator-header .tabulator-col.tabulator-moving { - position: absolute; - border: 1px solid #999; - background: #dae1e7; - pointer-events: none; -} - -.tabulator .tabulator-header .tabulator-col .tabulator-col-content { - box-sizing: border-box; - position: relative; - padding: 0.92857em 0.78571em; -} - -.tabulator .tabulator-header .tabulator-col .tabulator-col-content .tabulator-col-title { - box-sizing: border-box; - width: 100%; - white-space: nowrap; - overflow: hidden; - text-overflow: ellipsis; - vertical-align: bottom; -} - -.tabulator .tabulator-header .tabulator-col .tabulator-col-content .tabulator-col-title .tabulator-title-editor { - box-sizing: border-box; - width: 100%; - border: 1px solid #999; - padding: 1px; - background: #fff; -} - -.tabulator .tabulator-header .tabulator-col .tabulator-col-content .tabulator-arrow { - display: inline-block; - position: absolute; - top: 18px; - right: 8px; - width: 0; - height: 0; - border-left: 6px solid transparent; - border-right: 6px solid transparent; - border-bottom: 6px solid #bbb; -} - -.tabulator .tabulator-header .tabulator-col.tabulator-col-group .tabulator-col-group-cols { - position: relative; - display: -ms-flexbox; - display: flex; - border-top: 1px solid #ddd; - overflow: hidden; -} - -.tabulator .tabulator-header .tabulator-col.tabulator-col-group .tabulator-col-group-cols .tabulator-col:last-child { - margin-right: -1px; -} - -.tabulator .tabulator-header .tabulator-col:first-child .tabulator-col-resize-handle.prev { - display: none; -} - -.tabulator .tabulator-header .tabulator-col.ui-sortable-helper { - position: absolute; - background-color: #dae1e7 !important; - border: 1px solid #ddd; -} - -.tabulator .tabulator-header .tabulator-col .tabulator-header-filter { - position: relative; - box-sizing: border-box; - margin-top: 2px; - width: 100%; - text-align: center; -} - -.tabulator .tabulator-header .tabulator-col .tabulator-header-filter textarea { - height: auto !important; -} - -.tabulator .tabulator-header .tabulator-col .tabulator-header-filter svg { - margin-top: 3px; -} - -.tabulator .tabulator-header .tabulator-col .tabulator-header-filter input::-ms-clear { - width: 0; - height: 0; -} - -.tabulator .tabulator-header .tabulator-col.tabulator-sortable .tabulator-col-title { - padding-right: 25px; -} - -.tabulator .tabulator-header .tabulator-col.tabulator-sortable:hover { - cursor: pointer; - background-color: #dae1e7; -} - -.tabulator .tabulator-header .tabulator-col.tabulator-sortable[aria-sort="none"] .tabulator-col-content .tabulator-arrow { - border-top: none; - border-bottom: 6px solid #bbb; -} - -.tabulator .tabulator-header .tabulator-col.tabulator-sortable[aria-sort="asc"] .tabulator-col-content .tabulator-arrow { - border-top: none; - border-bottom: 6px solid #666; -} - -.tabulator .tabulator-header .tabulator-col.tabulator-sortable[aria-sort="desc"] .tabulator-col-content .tabulator-arrow { - border-top: 6px solid #666; - border-bottom: none; -} - -.tabulator .tabulator-header .tabulator-col.tabulator-col-vertical .tabulator-col-content .tabulator-col-title { - -webkit-writing-mode: vertical-rl; - -ms-writing-mode: tb-rl; - writing-mode: vertical-rl; - text-orientation: mixed; - display: -ms-flexbox; - display: flex; - -ms-flex-align: center; - align-items: center; - -ms-flex-pack: center; - justify-content: center; -} - -.tabulator .tabulator-header .tabulator-col.tabulator-col-vertical.tabulator-col-vertical-flip .tabulator-col-title { - -ms-transform: rotate(180deg); - transform: rotate(180deg); -} - -.tabulator .tabulator-header .tabulator-col.tabulator-col-vertical.tabulator-sortable .tabulator-col-title { - padding-right: 0; - padding-top: 20px; -} - -.tabulator .tabulator-header .tabulator-col.tabulator-col-vertical.tabulator-sortable.tabulator-col-vertical-flip .tabulator-col-title { - padding-right: 0; - padding-bottom: 20px; -} - -.tabulator .tabulator-header .tabulator-col.tabulator-col-vertical.tabulator-sortable .tabulator-arrow { - right: calc(50% - 6px); -} - -.tabulator .tabulator-header .tabulator-frozen { - display: inline-block; - position: absolute; - z-index: 10; -} - -.tabulator .tabulator-header .tabulator-frozen.tabulator-frozen-left { - border-right: 2px solid #ddd; -} - -.tabulator .tabulator-header .tabulator-frozen.tabulator-frozen-right { - border-left: 2px solid #ddd; -} - -.tabulator .tabulator-header .tabulator-calcs-holder { - box-sizing: border-box; - min-width: 400%; - background: white !important; - border-top: 1px solid #ddd; - border-bottom: 1px solid #ddd; - overflow: hidden; -} - -.tabulator .tabulator-header .tabulator-calcs-holder .tabulator-row { - background: white !important; -} - -.tabulator .tabulator-header .tabulator-calcs-holder .tabulator-row .tabulator-col-resize-handle { - display: none; -} - -.tabulator .tabulator-header .tabulator-frozen-rows-holder { - min-width: 400%; -} - -.tabulator .tabulator-header .tabulator-frozen-rows-holder:empty { - display: none; -} - -.tabulator .tabulator-tableHolder { - position: relative; - width: 100%; - white-space: nowrap; - overflow: auto; - -webkit-overflow-scrolling: touch; -} - -.tabulator .tabulator-tableHolder:focus { - outline: none; -} - -.tabulator .tabulator-tableHolder .tabulator-placeholder { - box-sizing: border-box; - display: -ms-flexbox; - display: flex; - -ms-flex-align: center; - align-items: center; - width: 100%; -} - -.tabulator .tabulator-tableHolder .tabulator-placeholder[tabulator-render-mode="virtual"] { - position: absolute; - top: 0; - left: 0; - height: 100%; -} - -.tabulator .tabulator-tableHolder .tabulator-placeholder span { - display: inline-block; - margin: 0 auto; - padding: 10px; - color: #000; - font-weight: bold; - font-size: 20px; -} - -.tabulator .tabulator-tableHolder .tabulator-table { - position: relative; - display: inline-block; - white-space: nowrap; - overflow: visible; - color: #333; -} - -.tabulator .tabulator-tableHolder .tabulator-table .tabulator-row.tabulator-calcs { - font-weight: bold; - background: #f2f2f2 !important; -} - -.tabulator .tabulator-tableHolder .tabulator-table .tabulator-row.tabulator-calcs.tabulator-calcs-top { - border-bottom: 2px solid #ddd; -} - -.tabulator .tabulator-tableHolder .tabulator-table .tabulator-row.tabulator-calcs.tabulator-calcs-bottom { - border-top: 2px solid #ddd; -} - -.tabulator .tabulator-col-resize-handle { - position: absolute; - right: 0; - top: 0; - bottom: 0; - width: 5px; -} - -.tabulator .tabulator-col-resize-handle.prev { - left: 0; - right: auto; -} - -.tabulator .tabulator-col-resize-handle:hover { - cursor: ew-resize; -} - -.tabulator .tabulator-footer { - padding: 0.78571em 0.78571em; - border-top: 1px solid rgba(34, 36, 38, 0.15); - box-shadow: none; - background: #F9FAFB; - text-align: right; - color: rgba(0, 0, 0, 0.87); - font-style: normal; - font-weight: normal; - text-transform: none; - white-space: nowrap; - -ms-user-select: none; - user-select: none; - -moz-user-select: none; - -khtml-user-select: none; - -webkit-user-select: none; - -o-user-select: none; -} - -.tabulator .tabulator-footer .tabulator-calcs-holder { - box-sizing: border-box; - width: calc(100% + 20px); - margin: -0.78571em -0.78571em 0.78571em -0.78571em; - text-align: left; - background: white !important; - border-bottom: 1px solid #ddd; - border-top: 1px solid #ddd; - overflow: hidden; -} - -.tabulator .tabulator-footer .tabulator-calcs-holder .tabulator-row { - font-weight: bold; - background: white !important; -} - -.tabulator .tabulator-footer .tabulator-calcs-holder .tabulator-row .tabulator-col-resize-handle { - display: none; -} - -.tabulator .tabulator-footer .tabulator-calcs-holder:only-child { - margin-bottom: -0.78571em; - border-bottom: none; -} - -.tabulator .tabulator-footer .tabulator-pages { - margin: 0 7px; -} - -.tabulator .tabulator-footer .tabulator-page { - display: inline-block; - margin: 0 2px; - border: 1px solid #aaa; - border-radius: 3px; - padding: 2px 5px; - background: rgba(255, 255, 255, 0.2); - color: #555; - font-family: inherit; - font-weight: inherit; - font-size: inherit; -} - -.tabulator .tabulator-footer .tabulator-page.active { - color: #d00; -} - -.tabulator .tabulator-footer .tabulator-page:disabled { - opacity: .5; -} - -.tabulator .tabulator-footer .tabulator-page:not(.disabled):hover { - cursor: pointer; - background: rgba(0, 0, 0, 0.2); - color: #fff; -} - -.tabulator .tabulator-loader { - position: absolute; - display: -ms-flexbox; - display: flex; - -ms-flex-align: center; - align-items: center; - top: 0; - left: 0; - z-index: 100; - height: 100%; - width: 100%; - background: rgba(0, 0, 0, 0.4); - text-align: center; -} - -.tabulator .tabulator-loader .tabulator-loader-msg { - display: inline-block; - margin: 0 auto; - padding: 10px 20px; - border-radius: 10px; - background: #fff; - font-weight: bold; - font-size: 16px; -} - -.tabulator .tabulator-loader .tabulator-loader-msg.tabulator-loading { - border: 4px solid #333; - color: #000; -} - -.tabulator .tabulator-loader .tabulator-loader-msg.tabulator-error { - border: 4px solid #D00; - color: #590000; -} - -.tabulator .tabulator-tableHolder .tabulator-table .tabulator-row.positive, .tabulator .tabulator-tableHolder .tabulator-table .tabulator-row .tabulator-cell.positive { - box-shadow: 0px 0px 0px #A3C293 inset; - background: #FCFFF5 !important; - color: #21BA45 !important; -} - -.tabulator .tabulator-tableHolder .tabulator-table .tabulator-row.positive:hover, .tabulator .tabulator-tableHolder .tabulator-table .tabulator-row .tabulator-cell.positive:hover { - background: #f7ffe6 !important; - color: #13ae38 !important; -} - -.tabulator .tabulator-tableHolder .tabulator-table .tabulator-row.negative, .tabulator .tabulator-tableHolder .tabulator-table .tabulator-row .tabulator-cell.negative { - box-shadow: 0px 0px 0px #E0B4B4 inset; - background: #FFF6F6 !important; - color: #DB2828 !important; -} - -.tabulator .tabulator-tableHolder .tabulator-table .tabulator-row.negative:hover, .tabulator .tabulator-tableHolder .tabulator-table .tabulator-row .tabulator-cell.negative:hover { - background: #ffe7e7 !important; - color: #d41616 !important; -} - -.tabulator .tabulator-tableHolder .tabulator-table .tabulator-row.error, .tabulator .tabulator-tableHolder .tabulator-table .tabulator-row .tabulator-cell.error { - box-shadow: 0px 0px 0px #E0B4B4 inset; - background: #FFF6F6 !important; - color: #DB2828 !important; -} - -.tabulator .tabulator-tableHolder .tabulator-table .tabulator-row.error:hover, .tabulator .tabulator-tableHolder .tabulator-table .tabulator-row .tabulator-cell.error:hover { - background: #ffe7e7 !important; - color: #d12323 !important; -} - -.tabulator .tabulator-tableHolder .tabulator-table .tabulator-row.warning, .tabulator .tabulator-tableHolder .tabulator-table .tabulator-row .tabulator-cell.warning { - box-shadow: 0px 0px 0px #C9BA9B inset; - background: #FFFAF3 !important; - color: #F2C037 !important; -} - -.tabulator .tabulator-tableHolder .tabulator-table .tabulator-row.warning:hover, .tabulator .tabulator-tableHolder .tabulator-table .tabulator-row .tabulator-cell.warning:hover { - background: #fff4e4 !important; - color: #f1bb29 !important; -} - -.tabulator .tabulator-tableHolder .tabulator-table .tabulator-row.active, .tabulator .tabulator-tableHolder .tabulator-table .tabulator-row .tabulator-cell.active { - box-shadow: 0px 0px 0px rgba(0, 0, 0, 0.87) inset; - background: #E0E0E0 !important; - color: rgba(0, 0, 0, 0.87) !important; -} - -.tabulator .tabulator-tableHolder .tabulator-table .tabulator-row.active:hover, .tabulator .tabulator-tableHolder .tabulator-table .tabulator-row .tabulator-cell.active:hover { - background: #f7ffe6 !important; - color: #13ae38 !important; -} - -.tabulator .tabulator-tableHolder .tabulator-table .tabulator-row.active, .tabulator .tabulator-tableHolder .tabulator-table .tabulator-row.disabled:hover, .tabulator .tabulator-tableHolder .tabulator-table .tabulator-row .tabulator-cell.active { - pointer-events: none; - color: rgba(0, 0, 0, 0.2); -} - -.tabulator.inverted { - background: #333333; - color: rgba(255, 255, 255, 0.9); - border: none; -} - -.tabulator.inverted .tabulator-header { - background-color: rgba(0, 0, 0, 0.15); - border-color: rgba(255, 255, 255, 0.1) !important; - color: rgba(255, 255, 255, 0.9); -} - -.tabulator.inverted .tabulator-header .tabulator-col { - border-color: rgba(255, 255, 255, 0.1) !important; -} - -.tabulator.inverted .tabulator-tableHolder .tabulator-table .tabulator-row { - color: rgba(255, 255, 255, 0.9); - border: none; -} - -.tabulator.inverted .tabulator-tableHolder .tabulator-table .tabulator-row .tabulator-cell { - border-color: rgba(255, 255, 255, 0.1) !important; -} - -.tabulator.inverted .tabulator-footer { - background: #FFFFFF; -} - -.tabulator.striped .tabulator-tableHolder .tabulator-table .tabulator-row:nth-child(even) { - background-color: rgba(0, 0, 0, 0.05) !important; -} - -.tabulator.celled { - border: 1px solid rgba(34, 36, 38, 0.15); -} - -.tabulator.celled .tabulator-header .tabulator-col { - border-right: 1px solid rgba(34, 36, 38, 0.1); -} - -.tabulator.celled .tabulator-tableHolder .tabulator-table .tabulator-row .tabulator-cell { - border-right: 1px solid rgba(34, 36, 38, 0.1); -} - -.tabulator[class*="single line"] .tabulator-tableHolder .tabulator-table .tabulator-row .tabulator-cell { - border-right: none; -} - -.tabulator.red { - border-top: 0.2em solid #DB2828; -} - -.tabulator.inverted.red { - background-color: #DB2828 !important; - color: #FFFFFF !important; -} - -.tabulator.orange { - border-top: 0.2em solid #F2711C; -} - -.tabulator.inverted.orange { - background-color: #F2711C !important; - color: #FFFFFF !important; -} - -.tabulator.yellow { - border-top: 0.2em solid #FBBD08; -} - -.tabulator.inverted.yellow { - background-color: #FBBD08 !important; - color: #FFFFFF !important; -} - -.tabulator.olive { - border-top: 0.2em solid #B5CC18; -} - -.tabulator.inverted.olive { - background-color: #B5CC18 !important; - color: #FFFFFF !important; -} - -.tabulator.green { - border-top: 0.2em solid #21BA45; -} - -.tabulator.inverted.green { - background-color: #21BA45 !important; - color: #FFFFFF !important; -} - -.tabulator.teal { - border-top: 0.2em solid #00B5AD; -} - -.tabulator.inverted.teal { - background-color: #00B5AD !important; - color: #FFFFFF !important; -} - -.tabulator.blue { - border-top: 0.2em solid #2185D0; -} - -.tabulator.inverted.blue { - background-color: #2185D0 !important; - color: #FFFFFF !important; -} - -.tabulator.violet { - border-top: 0.2em solid #6435C9; -} - -.tabulator.inverted.violet { - background-color: #6435C9 !important; - color: #FFFFFF !important; -} - -.tabulator.purple { - border-top: 0.2em solid #A333C8; -} - -.tabulator.inverted.purple { - background-color: #A333C8 !important; - color: #FFFFFF !important; -} - -.tabulator.pink { - border-top: 0.2em solid #E03997; -} - -.tabulator.inverted.pink { - background-color: #E03997 !important; - color: #FFFFFF !important; -} - -.tabulator.brown { - border-top: 0.2em solid #A5673F; -} - -.tabulator.inverted.brown { - background-color: #A5673F !important; - color: #FFFFFF !important; -} - -.tabulator.grey { - border-top: 0.2em solid #767676; -} - -.tabulator.inverted.grey { - background-color: #767676 !important; - color: #FFFFFF !important; -} - -.tabulator.black { - border-top: 0.2em solid #1B1C1D; -} - -.tabulator.inverted.black { - background-color: #1B1C1D !important; - color: #FFFFFF !important; -} - -.tabulator.padded .tabulator-header .tabulator-col .tabulator-col-content { - padding: 1em 1em; -} - -.tabulator.padded .tabulator-header .tabulator-col .tabulator-col-content .tabulator-arrow { - top: 20px; -} - -.tabulator.padded .tabulator-tableHolder .tabulator-table .tabulator-row .tabulator-cell { - padding: 1em 1em; -} - -.tabulator.padded.very .tabulator-header .tabulator-col .tabulator-col-content { - padding: 1.5em 1.5em; -} - -.tabulator.padded.very .tabulator-header .tabulator-col .tabulator-col-content .tabulator-arrow { - top: 26px; -} - -.tabulator.padded.very .tabulator-tableHolder .tabulator-table .tabulator-row .tabulator-cell { - padding: 1.5em 1.5em; -} - -.tabulator.compact .tabulator-header .tabulator-col .tabulator-col-content { - padding: 0.5em 0.7em; -} - -.tabulator.compact .tabulator-header .tabulator-col .tabulator-col-content .tabulator-arrow { - top: 12px; -} - -.tabulator.compact .tabulator-tableHolder .tabulator-table .tabulator-row .tabulator-cell { - padding: 0.5em 0.7em; -} - -.tabulator.compact.very .tabulator-header .tabulator-col .tabulator-col-content { - padding: 0.4em 0.6em; -} - -.tabulator.compact.very .tabulator-header .tabulator-col .tabulator-col-content .tabulator-arrow { - top: 10px; -} - -.tabulator.compact.very .tabulator-tableHolder .tabulator-table .tabulator-row .tabulator-cell { - padding: 0.4em 0.6em; -} - -.tabulator-row { - position: relative; - box-sizing: border-box; - min-height: 22px; - border-bottom: 1px solid rgba(34, 36, 38, 0.1); -} - -.tabulator-row.tabulator-selectable:hover { - box-shadow: 0px 0px 0px rgba(0, 0, 0, 0.87) inset; - background: #E0E0E0 !important; - color: rgba(0, 0, 0, 0.87) !important; - cursor: pointer; -} - -.tabulator-row.tabulator-selected { - background-color: #9ABCEA; -} - -.tabulator-row.tabulator-selected:hover { - background-color: #769BCC; - cursor: pointer; -} - -.tabulator-row.tabulator-moving { - position: absolute; - border-top: 1px solid #ddd; - border-bottom: 1px solid #ddd; - pointer-events: none !important; - z-index: 15; -} - -.tabulator-row .tabulator-row-resize-handle { - position: absolute; - right: 0; - bottom: 0; - left: 0; - height: 5px; -} - -.tabulator-row .tabulator-row-resize-handle.prev { - top: 0; - bottom: auto; -} - -.tabulator-row .tabulator-row-resize-handle:hover { - cursor: ns-resize; -} - -.tabulator-row .tabulator-frozen { - display: inline-block; - position: absolute; - background-color: inherit; - z-index: 10; -} - -.tabulator-row .tabulator-frozen.tabulator-frozen-left { - border-right: 2px solid #ddd; -} - -.tabulator-row .tabulator-frozen.tabulator-frozen-right { - border-left: 2px solid #ddd; -} - -.tabulator-row .tabulator-responsive-collapse { - box-sizing: border-box; - padding: 5px; - border-top: 1px solid #ddd; - border-bottom: 1px solid #ddd; -} - -.tabulator-row .tabulator-responsive-collapse:empty { - display: none; -} - -.tabulator-row .tabulator-responsive-collapse table { - font-size: 14px; -} - -.tabulator-row .tabulator-responsive-collapse table tr td { - position: relative; -} - -.tabulator-row .tabulator-responsive-collapse table tr td:first-of-type { - padding-right: 10px; -} - -.tabulator-row .tabulator-cell { - display: inline-block; - position: relative; - box-sizing: border-box; - padding: 0.78571em 0.78571em; - vertical-align: middle; - white-space: nowrap; - overflow: hidden; - text-overflow: ellipsis; -} - -.tabulator-row .tabulator-cell:last-of-type { - border-right: none; -} - -.tabulator-row .tabulator-cell.tabulator-editing { - border: 1px solid #1D68CD; - padding: 0; -} - -.tabulator-row .tabulator-cell.tabulator-editing input, .tabulator-row .tabulator-cell.tabulator-editing select { - border: 1px; - background: transparent; -} - -.tabulator-row .tabulator-cell.tabulator-validation-fail { - border: 1px solid #DB2828; -} - -.tabulator-row .tabulator-cell.tabulator-validation-fail input, .tabulator-row .tabulator-cell.tabulator-validation-fail select { - border: 1px; - background: transparent; - color: #DB2828; -} - -.tabulator-row .tabulator-cell:first-child .tabulator-col-resize-handle.prev { - display: none; -} - -.tabulator-row .tabulator-cell.tabulator-row-handle { - display: -ms-inline-flexbox; - display: inline-flex; - -ms-flex-align: center; - align-items: center; - -moz-user-select: none; - -khtml-user-select: none; - -webkit-user-select: none; - -o-user-select: none; -} - -.tabulator-row .tabulator-cell.tabulator-row-handle .tabulator-row-handle-box { - width: 80%; -} - -.tabulator-row .tabulator-cell.tabulator-row-handle .tabulator-row-handle-box .tabulator-row-handle-bar { - width: 100%; - height: 3px; - margin-top: 2px; - background: #666; -} - -.tabulator-row .tabulator-cell .tabulator-data-tree-branch { - display: inline-block; - vertical-align: middle; - height: 9px; - width: 7px; - margin-top: -9px; - margin-right: 5px; - border-bottom-left-radius: 1px; - border-left: 2px solid #ddd; - border-bottom: 2px solid #ddd; -} - -.tabulator-row .tabulator-cell .tabulator-data-tree-control { - display: -ms-inline-flexbox; - display: inline-flex; - -ms-flex-pack: center; - justify-content: center; - -ms-flex-align: center; - align-items: center; - vertical-align: middle; - height: 11px; - width: 11px; - margin-right: 5px; - border: 1px solid #333; - border-radius: 2px; - background: rgba(0, 0, 0, 0.1); - overflow: hidden; -} - -.tabulator-row .tabulator-cell .tabulator-data-tree-control:hover { - cursor: pointer; - background: rgba(0, 0, 0, 0.2); -} - -.tabulator-row .tabulator-cell .tabulator-data-tree-control .tabulator-data-tree-control-collapse { - display: inline-block; - position: relative; - height: 7px; - width: 1px; - background: transparent; -} - -.tabulator-row .tabulator-cell .tabulator-data-tree-control .tabulator-data-tree-control-collapse:after { - position: absolute; - content: ""; - left: -3px; - top: 3px; - height: 1px; - width: 7px; - background: #333; -} - -.tabulator-row .tabulator-cell .tabulator-data-tree-control .tabulator-data-tree-control-expand { - display: inline-block; - position: relative; - height: 7px; - width: 1px; - background: #333; -} - -.tabulator-row .tabulator-cell .tabulator-data-tree-control .tabulator-data-tree-control-expand:after { - position: absolute; - content: ""; - left: -3px; - top: 3px; - height: 1px; - width: 7px; - background: #333; -} - -.tabulator-row .tabulator-cell .tabulator-responsive-collapse-toggle { - display: -ms-inline-flexbox; - display: inline-flex; - -ms-flex-align: center; - align-items: center; - -ms-flex-pack: center; - justify-content: center; - -moz-user-select: none; - -khtml-user-select: none; - -webkit-user-select: none; - -o-user-select: none; - height: 15px; - width: 15px; - border-radius: 20px; - background: #666; - color: #fff; - font-weight: bold; - font-size: 1.1em; -} - -.tabulator-row .tabulator-cell .tabulator-responsive-collapse-toggle:hover { - opacity: .7; -} - -.tabulator-row .tabulator-cell .tabulator-responsive-collapse-toggle.open .tabulator-responsive-collapse-toggle-close { - display: initial; -} - -.tabulator-row .tabulator-cell .tabulator-responsive-collapse-toggle.open .tabulator-responsive-collapse-toggle-open { - display: none; -} - -.tabulator-row .tabulator-cell .tabulator-responsive-collapse-toggle .tabulator-responsive-collapse-toggle-close { - display: none; -} - -.tabulator-row.tabulator-group { - box-sizing: border-box; - border-bottom: 1px solid #999; - border-right: 1px solid #ddd; - border-top: 1px solid #999; - padding: 5px; - padding-left: 10px; - background: #fafafa; - font-weight: bold; - min-width: 100%; -} - -.tabulator-row.tabulator-group:hover { - cursor: pointer; - background-color: rgba(0, 0, 0, 0.1); -} - -.tabulator-row.tabulator-group.tabulator-group-visible .tabulator-arrow { - margin-right: 10px; - border-left: 6px solid transparent; - border-right: 6px solid transparent; - border-top: 6px solid #666; - border-bottom: 0; -} - -.tabulator-row.tabulator-group.tabulator-group-level-1 .tabulator-arrow { - margin-left: 20px; -} - -.tabulator-row.tabulator-group.tabulator-group-level-2 .tabulator-arrow { - margin-left: 40px; -} - -.tabulator-row.tabulator-group.tabulator-group-level-3 .tabulator-arrow { - margin-left: 60px; -} - -.tabulator-row.tabulator-group.tabulator-group-level-4 .tabulator-arrow { - margin-left: 80px; -} - -.tabulator-row.tabulator-group.tabulator-group-level-5 .tabulator-arrow { - margin-left: 100px; -} - -.tabulator-row.tabulator-group .tabulator-arrow { - display: inline-block; - width: 0; - height: 0; - margin-right: 16px; - border-top: 6px solid transparent; - border-bottom: 6px solid transparent; - border-right: 0; - border-left: 6px solid #666; - vertical-align: middle; -} - -.tabulator-row.tabulator-group span { - margin-left: 10px; - color: #666; -} - -.tabulator-edit-select-list { - position: absolute; - display: inline-block; - box-sizing: border-box; - max-height: 200px; - background: #FFFFFF; - border: 1px solid #ddd; - font-size: 14px; - overflow-y: auto; - -webkit-overflow-scrolling: touch; - z-index: 10000; -} - -.tabulator-edit-select-list .tabulator-edit-select-list-item { - padding: 4px; - color: #333; -} - -.tabulator-edit-select-list .tabulator-edit-select-list-item.active { - color: #FFFFFF; - background: #1D68CD; -} - -.tabulator-edit-select-list .tabulator-edit-select-list-item:hover { - cursor: pointer; - color: #FFFFFF; - background: #1D68CD; -} - -.tabulator-edit-select-list .tabulator-edit-select-list-group { - border-bottom: 1px solid #ddd; - padding: 4px; - padding-top: 6px; - color: #333; - font-weight: bold; -} diff --git a/Gems/AssetMemoryAnalyzer/External/tabulator-master/dist/css/semantic-ui/tabulator_semantic-ui.min.css b/Gems/AssetMemoryAnalyzer/External/tabulator-master/dist/css/semantic-ui/tabulator_semantic-ui.min.css deleted file mode 100644 index 13e8572ba7..0000000000 --- a/Gems/AssetMemoryAnalyzer/External/tabulator-master/dist/css/semantic-ui/tabulator_semantic-ui.min.css +++ /dev/null @@ -1,3 +0,0 @@ -/* Tabulator v4.1.2 (c) Oliver Folkerd */ -.tabulator{position:relative;background-color:#fff;overflow:hidden;font-size:14px;text-align:left;width:100%;margin:1em 0;border:1px solid rgba(34,36,38,.15);box-shadow:none;border-radius:.28571/pxrem;color:rgba(0,0,0,.87);transform:translatez(0)}.tabulator[tabulator-layout=fitDataFill] .tabulator-tableHolder .tabulator-table{min-width:100%}.tabulator.tabulator-block-select{-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}.tabulator .tabulator-header{width:100%;border-bottom:1px solid rgba(34,36,38,.1);box-shadow:none;color:rgba(0,0,0,.87);font-style:none;font-weight:700;text-transform:none;white-space:nowrap;-moz-user-select:none;-khtml-user-select:none;-webkit-user-select:none;-o-user-select:none}.tabulator .tabulator-header,.tabulator .tabulator-header .tabulator-col{position:relative;box-sizing:border-box;background-color:#f9fafb;overflow:hidden}.tabulator .tabulator-header .tabulator-col{display:inline-block;text-align:left;vertical-align:bottom}.tabulator .tabulator-header .tabulator-col.tabulator-moving{position:absolute;border:1px solid #999;background:#dae1e7;pointer-events:none}.tabulator .tabulator-header .tabulator-col .tabulator-col-content{box-sizing:border-box;position:relative;padding:.92857em .78571em}.tabulator .tabulator-header .tabulator-col .tabulator-col-content .tabulator-col-title{box-sizing:border-box;width:100%;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;vertical-align:bottom}.tabulator .tabulator-header .tabulator-col .tabulator-col-content .tabulator-col-title .tabulator-title-editor{box-sizing:border-box;width:100%;border:1px solid #999;padding:1px;background:#fff}.tabulator .tabulator-header .tabulator-col .tabulator-col-content .tabulator-arrow{display:inline-block;position:absolute;top:18px;right:8px;width:0;height:0;border-left:6px solid transparent;border-right:6px solid transparent;border-bottom:6px solid #bbb}.tabulator .tabulator-header .tabulator-col.tabulator-col-group .tabulator-col-group-cols{position:relative;display:-ms-flexbox;display:flex;border-top:1px solid #ddd;overflow:hidden}.tabulator .tabulator-header .tabulator-col.tabulator-col-group .tabulator-col-group-cols .tabulator-col:last-child{margin-right:-1px}.tabulator .tabulator-header .tabulator-col:first-child .tabulator-col-resize-handle.prev{display:none}.tabulator .tabulator-header .tabulator-col.ui-sortable-helper{position:absolute;background-color:#dae1e7!important;border:1px solid #ddd}.tabulator .tabulator-header .tabulator-col .tabulator-header-filter{position:relative;box-sizing:border-box;margin-top:2px;width:100%;text-align:center}.tabulator .tabulator-header .tabulator-col .tabulator-header-filter textarea{height:auto!important}.tabulator .tabulator-header .tabulator-col .tabulator-header-filter svg{margin-top:3px}.tabulator .tabulator-header .tabulator-col .tabulator-header-filter input::-ms-clear{width:0;height:0}.tabulator .tabulator-header .tabulator-col.tabulator-sortable .tabulator-col-title{padding-right:25px}.tabulator .tabulator-header .tabulator-col.tabulator-sortable:hover{cursor:pointer;background-color:#dae1e7}.tabulator .tabulator-header .tabulator-col.tabulator-sortable[aria-sort=none] .tabulator-col-content .tabulator-arrow{border-top:none;border-bottom:6px solid #bbb}.tabulator .tabulator-header .tabulator-col.tabulator-sortable[aria-sort=asc] .tabulator-col-content .tabulator-arrow{border-top:none;border-bottom:6px solid #666}.tabulator .tabulator-header .tabulator-col.tabulator-sortable[aria-sort=desc] .tabulator-col-content .tabulator-arrow{border-top:6px solid #666;border-bottom:none}.tabulator .tabulator-header .tabulator-col.tabulator-col-vertical .tabulator-col-content .tabulator-col-title{-webkit-writing-mode:vertical-rl;-ms-writing-mode:tb-rl;writing-mode:vertical-rl;text-orientation:mixed;display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;-ms-flex-pack:center;justify-content:center}.tabulator .tabulator-header .tabulator-col.tabulator-col-vertical.tabulator-col-vertical-flip .tabulator-col-title{transform:rotate(180deg)}.tabulator .tabulator-header .tabulator-col.tabulator-col-vertical.tabulator-sortable .tabulator-col-title{padding-right:0;padding-top:20px}.tabulator .tabulator-header .tabulator-col.tabulator-col-vertical.tabulator-sortable.tabulator-col-vertical-flip .tabulator-col-title{padding-right:0;padding-bottom:20px}.tabulator .tabulator-header .tabulator-col.tabulator-col-vertical.tabulator-sortable .tabulator-arrow{right:calc(50% - 6px)}.tabulator .tabulator-header .tabulator-frozen{display:inline-block;position:absolute;z-index:1}.tabulator .tabulator-header .tabulator-frozen.tabulator-frozen-left{border-right:2px solid #ddd}.tabulator .tabulator-header .tabulator-frozen.tabulator-frozen-right{border-left:2px solid #ddd}.tabulator .tabulator-header .tabulator-calcs-holder{box-sizing:border-box;min-width:400%;background:#fff!important;border-top:1px solid #ddd;border-bottom:1px solid #ddd;overflow:hidden}.tabulator .tabulator-header .tabulator-calcs-holder .tabulator-row{background:#fff!important}.tabulator .tabulator-header .tabulator-calcs-holder .tabulator-row .tabulator-col-resize-handle{display:none}.tabulator .tabulator-header .tabulator-frozen-rows-holder{min-width:400%}.tabulator .tabulator-header .tabulator-frozen-rows-holder:empty{display:none}.tabulator .tabulator-tableHolder{position:relative;width:100%;white-space:nowrap;overflow:auto;-webkit-overflow-scrolling:touch}.tabulator .tabulator-tableHolder:focus{outline:none}.tabulator .tabulator-tableHolder .tabulator-placeholder{box-sizing:border-box;display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;width:100%}.tabulator .tabulator-tableHolder .tabulator-placeholder[tabulator-render-mode=virtual]{position:absolute;top:0;left:0;height:100%}.tabulator .tabulator-tableHolder .tabulator-placeholder span{display:inline-block;margin:0 auto;padding:10px;color:#000;font-weight:700;font-size:20px}.tabulator .tabulator-tableHolder .tabulator-table{position:relative;display:inline-block;white-space:nowrap;overflow:visible;color:#333}.tabulator .tabulator-tableHolder .tabulator-table .tabulator-row.tabulator-calcs{font-weight:700;background:#f2f2f2!important}.tabulator .tabulator-tableHolder .tabulator-table .tabulator-row.tabulator-calcs.tabulator-calcs-top{border-bottom:2px solid #ddd}.tabulator .tabulator-tableHolder .tabulator-table .tabulator-row.tabulator-calcs.tabulator-calcs-bottom{border-top:2px solid #ddd}.tabulator .tabulator-col-resize-handle{position:absolute;right:0;top:0;bottom:0;width:5px}.tabulator .tabulator-col-resize-handle.prev{left:0;right:auto}.tabulator .tabulator-col-resize-handle:hover{cursor:ew-resize}.tabulator .tabulator-footer{padding:.78571em;border-top:1px solid rgba(34,36,38,.15);box-shadow:none;background:#f9fafb;text-align:right;color:rgba(0,0,0,.87);font-style:normal;font-weight:400;text-transform:none;white-space:nowrap;-ms-user-select:none;user-select:none;-moz-user-select:none;-khtml-user-select:none;-webkit-user-select:none;-o-user-select:none}.tabulator .tabulator-footer .tabulator-calcs-holder{box-sizing:border-box;width:calc(100% + 20px);margin:-.78571em -.78571em .78571em;text-align:left;background:#fff!important;border-bottom:1px solid #ddd;border-top:1px solid #ddd;overflow:hidden}.tabulator .tabulator-footer .tabulator-calcs-holder .tabulator-row{font-weight:700;background:#fff!important}.tabulator .tabulator-footer .tabulator-calcs-holder .tabulator-row .tabulator-col-resize-handle{display:none}.tabulator .tabulator-footer .tabulator-calcs-holder:only-child{margin-bottom:-.78571em;border-bottom:none}.tabulator .tabulator-footer .tabulator-pages{margin:0 7px}.tabulator .tabulator-footer .tabulator-page{display:inline-block;margin:0 2px;border:1px solid #aaa;border-radius:3px;padding:2px 5px;background:hsla(0,0%,100%,.2);color:#555;font-family:inherit;font-weight:inherit;font-size:inherit}.tabulator .tabulator-footer .tabulator-page.active{color:#d00}.tabulator .tabulator-footer .tabulator-page:disabled{opacity:.5}.tabulator .tabulator-footer .tabulator-page:not(.disabled):hover{cursor:pointer;background:rgba(0,0,0,.2);color:#fff}.tabulator .tabulator-loader{position:absolute;display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;top:0;left:0;z-index:3;height:100%;width:100%;background:rgba(0,0,0,.4);text-align:center}.tabulator .tabulator-loader .tabulator-loader-msg{display:inline-block;margin:0 auto;padding:10px 20px;border-radius:10px;background:#fff;font-weight:700;font-size:16px}.tabulator .tabulator-loader .tabulator-loader-msg.tabulator-loading{border:4px solid #333;color:#000}.tabulator .tabulator-loader .tabulator-loader-msg.tabulator-error{border:4px solid #d00;color:#590000}.tabulator .tabulator-tableHolder .tabulator-table .tabulator-row.positive,.tabulator .tabulator-tableHolder .tabulator-table .tabulator-row .tabulator-cell.positive{box-shadow:inset 0 0 0 #a3c293;background:#fcfff5!important;color:#21ba45!important}.tabulator .tabulator-tableHolder .tabulator-table .tabulator-row.positive:hover,.tabulator .tabulator-tableHolder .tabulator-table .tabulator-row .tabulator-cell.positive:hover{background:#f7ffe6!important;color:#13ae38!important}.tabulator .tabulator-tableHolder .tabulator-table .tabulator-row.negative,.tabulator .tabulator-tableHolder .tabulator-table .tabulator-row .tabulator-cell.negative{box-shadow:inset 0 0 0 #e0b4b4;background:#fff6f6!important;color:#db2828!important}.tabulator .tabulator-tableHolder .tabulator-table .tabulator-row.negative:hover,.tabulator .tabulator-tableHolder .tabulator-table .tabulator-row .tabulator-cell.negative:hover{background:#ffe7e7!important;color:#d41616!important}.tabulator .tabulator-tableHolder .tabulator-table .tabulator-row.error,.tabulator .tabulator-tableHolder .tabulator-table .tabulator-row .tabulator-cell.error{box-shadow:inset 0 0 0 #e0b4b4;background:#fff6f6!important;color:#db2828!important}.tabulator .tabulator-tableHolder .tabulator-table .tabulator-row.error:hover,.tabulator .tabulator-tableHolder .tabulator-table .tabulator-row .tabulator-cell.error:hover{background:#ffe7e7!important;color:#d12323!important}.tabulator .tabulator-tableHolder .tabulator-table .tabulator-row .tabulator-cell.warning,.tabulator .tabulator-tableHolder .tabulator-table .tabulator-row.warning{box-shadow:inset 0 0 0 #c9ba9b;background:#fffaf3!important;color:#f2c037!important}.tabulator .tabulator-tableHolder .tabulator-table .tabulator-row .tabulator-cell.warning:hover,.tabulator .tabulator-tableHolder .tabulator-table .tabulator-row.warning:hover{background:#fff4e4!important;color:#f1bb29!important}.tabulator .tabulator-tableHolder .tabulator-table .tabulator-row.active,.tabulator .tabulator-tableHolder .tabulator-table .tabulator-row .tabulator-cell.active{box-shadow:inset 0 0 0 rgba(0,0,0,.87);background:#e0e0e0!important;color:rgba(0,0,0,.87)!important}.tabulator .tabulator-tableHolder .tabulator-table .tabulator-row.active:hover,.tabulator .tabulator-tableHolder .tabulator-table .tabulator-row .tabulator-cell.active:hover{background:#f7ffe6!important;color:#13ae38!important}.tabulator .tabulator-tableHolder .tabulator-table .tabulator-row.active,.tabulator .tabulator-tableHolder .tabulator-table .tabulator-row.disabled:hover,.tabulator .tabulator-tableHolder .tabulator-table .tabulator-row .tabulator-cell.active{pointer-events:none;color:rgba(0,0,0,.2)}.tabulator.inverted{background:#333;color:hsla(0,0%,100%,.9);border:none}.tabulator.inverted .tabulator-header{background-color:rgba(0,0,0,.15);color:hsla(0,0%,100%,.9)}.tabulator.inverted .tabulator-header,.tabulator.inverted .tabulator-header .tabulator-col{border-color:hsla(0,0%,100%,.1)!important}.tabulator.inverted .tabulator-tableHolder .tabulator-table .tabulator-row{color:hsla(0,0%,100%,.9);border:none}.tabulator.inverted .tabulator-tableHolder .tabulator-table .tabulator-row .tabulator-cell{border-color:hsla(0,0%,100%,.1)!important}.tabulator.inverted .tabulator-footer{background:#fff}.tabulator.striped .tabulator-tableHolder .tabulator-table .tabulator-row:nth-child(2n){background-color:rgba(0,0,0,.05)!important}.tabulator.celled{border:1px solid rgba(34,36,38,.15)}.tabulator.celled .tabulator-header .tabulator-col,.tabulator.celled .tabulator-tableHolder .tabulator-table .tabulator-row .tabulator-cell{border-right:1px solid rgba(34,36,38,.1)}.tabulator[class*="single line"] .tabulator-tableHolder .tabulator-table .tabulator-row .tabulator-cell{border-right:none}.tabulator.red{border-top:.2em solid #db2828}.tabulator.inverted.red{background-color:#db2828!important;color:#fff!important}.tabulator.orange{border-top:.2em solid #f2711c}.tabulator.inverted.orange{background-color:#f2711c!important;color:#fff!important}.tabulator.yellow{border-top:.2em solid #fbbd08}.tabulator.inverted.yellow{background-color:#fbbd08!important;color:#fff!important}.tabulator.olive{border-top:.2em solid #b5cc18}.tabulator.inverted.olive{background-color:#b5cc18!important;color:#fff!important}.tabulator.green{border-top:.2em solid #21ba45}.tabulator.inverted.green{background-color:#21ba45!important;color:#fff!important}.tabulator.teal{border-top:.2em solid #00b5ad}.tabulator.inverted.teal{background-color:#00b5ad!important;color:#fff!important}.tabulator.blue{border-top:.2em solid #2185d0}.tabulator.inverted.blue{background-color:#2185d0!important;color:#fff!important}.tabulator.violet{border-top:.2em solid #6435c9}.tabulator.inverted.violet{background-color:#6435c9!important;color:#fff!important}.tabulator.purple{border-top:.2em solid #a333c8}.tabulator.inverted.purple{background-color:#a333c8!important;color:#fff!important}.tabulator.pink{border-top:.2em solid #e03997}.tabulator.inverted.pink{background-color:#e03997!important;color:#fff!important}.tabulator.brown{border-top:.2em solid #a5673f}.tabulator.inverted.brown{background-color:#a5673f!important;color:#fff!important}.tabulator.grey{border-top:.2em solid #767676}.tabulator.inverted.grey{background-color:#767676!important;color:#fff!important}.tabulator.black{border-top:.2em solid #1b1c1d}.tabulator.inverted.black{background-color:#1b1c1d!important;color:#fff!important}.tabulator.padded .tabulator-header .tabulator-col .tabulator-col-content{padding:1em}.tabulator.padded .tabulator-header .tabulator-col .tabulator-col-content .tabulator-arrow{top:20px}.tabulator.padded .tabulator-tableHolder .tabulator-table .tabulator-row .tabulator-cell{padding:1em}.tabulator.padded.very .tabulator-header .tabulator-col .tabulator-col-content{padding:1.5em}.tabulator.padded.very .tabulator-header .tabulator-col .tabulator-col-content .tabulator-arrow{top:26px}.tabulator.padded.very .tabulator-tableHolder .tabulator-table .tabulator-row .tabulator-cell{padding:1.5em}.tabulator.compact .tabulator-header .tabulator-col .tabulator-col-content{padding:.5em .7em}.tabulator.compact .tabulator-header .tabulator-col .tabulator-col-content .tabulator-arrow{top:12px}.tabulator.compact .tabulator-tableHolder .tabulator-table .tabulator-row .tabulator-cell{padding:.5em .7em}.tabulator.compact.very .tabulator-header .tabulator-col .tabulator-col-content{padding:.4em .6em}.tabulator.compact.very .tabulator-header .tabulator-col .tabulator-col-content .tabulator-arrow{top:10px}.tabulator.compact.very .tabulator-tableHolder .tabulator-table .tabulator-row .tabulator-cell{padding:.4em .6em}.tabulator-row{position:relative;box-sizing:border-box;min-height:22px;border-bottom:1px solid rgba(34,36,38,.1)}.tabulator-row.tabulator-selectable:hover{box-shadow:inset 0 0 0 rgba(0,0,0,.87);background:#e0e0e0!important;color:rgba(0,0,0,.87)!important;cursor:pointer}.tabulator-row.tabulator-selected{background-color:#9abcea}.tabulator-row.tabulator-selected:hover{background-color:#769bcc;cursor:pointer}.tabulator-row.tabulator-moving{position:absolute;border-top:1px solid #ddd;border-bottom:1px solid #ddd;pointer-events:none!important;z-index:2}.tabulator-row .tabulator-row-resize-handle{position:absolute;right:0;bottom:0;left:0;height:5px}.tabulator-row .tabulator-row-resize-handle.prev{top:0;bottom:auto}.tabulator-row .tabulator-row-resize-handle:hover{cursor:ns-resize}.tabulator-row .tabulator-frozen{display:inline-block;position:absolute;background-color:inherit;z-index:1}.tabulator-row .tabulator-frozen.tabulator-frozen-left{border-right:2px solid #ddd}.tabulator-row .tabulator-frozen.tabulator-frozen-right{border-left:2px solid #ddd}.tabulator-row .tabulator-responsive-collapse{box-sizing:border-box;padding:5px;border-top:1px solid #ddd;border-bottom:1px solid #ddd}.tabulator-row .tabulator-responsive-collapse:empty{display:none}.tabulator-row .tabulator-responsive-collapse table{font-size:14px}.tabulator-row .tabulator-responsive-collapse table tr td{position:relative}.tabulator-row .tabulator-responsive-collapse table tr td:first-of-type{padding-right:10px}.tabulator-row .tabulator-cell{display:inline-block;position:relative;box-sizing:border-box;padding:.78571em;vertical-align:middle;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.tabulator-row .tabulator-cell:last-of-type{border-right:none}.tabulator-row .tabulator-cell.tabulator-editing{border:1px solid #1d68cd;padding:0}.tabulator-row .tabulator-cell.tabulator-editing input,.tabulator-row .tabulator-cell.tabulator-editing select{border:1px;background:transparent}.tabulator-row .tabulator-cell.tabulator-validation-fail{border:1px solid #db2828}.tabulator-row .tabulator-cell.tabulator-validation-fail input,.tabulator-row .tabulator-cell.tabulator-validation-fail select{border:1px;background:transparent;color:#db2828}.tabulator-row .tabulator-cell:first-child .tabulator-col-resize-handle.prev{display:none}.tabulator-row .tabulator-cell.tabulator-row-handle{display:-ms-inline-flexbox;display:inline-flex;-ms-flex-align:center;align-items:center;-moz-user-select:none;-khtml-user-select:none;-webkit-user-select:none;-o-user-select:none}.tabulator-row .tabulator-cell.tabulator-row-handle .tabulator-row-handle-box{width:80%}.tabulator-row .tabulator-cell.tabulator-row-handle .tabulator-row-handle-box .tabulator-row-handle-bar{width:100%;height:3px;margin-top:2px;background:#666}.tabulator-row .tabulator-cell .tabulator-data-tree-branch{display:inline-block;vertical-align:middle;height:9px;width:7px;margin-top:-9px;margin-right:5px;border-bottom-left-radius:1px;border-left:2px solid #ddd;border-bottom:2px solid #ddd}.tabulator-row .tabulator-cell .tabulator-data-tree-control{display:-ms-inline-flexbox;display:inline-flex;-ms-flex-pack:center;justify-content:center;-ms-flex-align:center;align-items:center;vertical-align:middle;height:11px;width:11px;margin-right:5px;border:1px solid #333;border-radius:2px;background:rgba(0,0,0,.1);overflow:hidden}.tabulator-row .tabulator-cell .tabulator-data-tree-control:hover{cursor:pointer;background:rgba(0,0,0,.2)}.tabulator-row .tabulator-cell .tabulator-data-tree-control .tabulator-data-tree-control-collapse{display:inline-block;position:relative;height:7px;width:1px;background:transparent}.tabulator-row .tabulator-cell .tabulator-data-tree-control .tabulator-data-tree-control-collapse:after{position:absolute;content:"";left:-3px;top:3px;height:1px;width:7px;background:#333}.tabulator-row .tabulator-cell .tabulator-data-tree-control .tabulator-data-tree-control-expand{display:inline-block;position:relative;height:7px;width:1px;background:#333}.tabulator-row .tabulator-cell .tabulator-data-tree-control .tabulator-data-tree-control-expand:after{position:absolute;content:"";left:-3px;top:3px;height:1px;width:7px;background:#333}.tabulator-row .tabulator-cell .tabulator-responsive-collapse-toggle{display:-ms-inline-flexbox;display:inline-flex;-ms-flex-align:center;align-items:center;-ms-flex-pack:center;justify-content:center;-moz-user-select:none;-khtml-user-select:none;-webkit-user-select:none;-o-user-select:none;height:15px;width:15px;border-radius:20px;background:#666;color:#fff;font-weight:700;font-size:1.1em}.tabulator-row .tabulator-cell .tabulator-responsive-collapse-toggle:hover{opacity:.7}.tabulator-row .tabulator-cell .tabulator-responsive-collapse-toggle.open .tabulator-responsive-collapse-toggle-close{display:initial}.tabulator-row .tabulator-cell .tabulator-responsive-collapse-toggle.open .tabulator-responsive-collapse-toggle-open,.tabulator-row .tabulator-cell .tabulator-responsive-collapse-toggle .tabulator-responsive-collapse-toggle-close{display:none}.tabulator-row.tabulator-group{box-sizing:border-box;border-bottom:1px solid #999;border-right:1px solid #ddd;border-top:1px solid #999;padding:5px;padding-left:10px;background:#fafafa;font-weight:700;min-width:100%}.tabulator-row.tabulator-group:hover{cursor:pointer;background-color:rgba(0,0,0,.1)}.tabulator-row.tabulator-group.tabulator-group-visible .tabulator-arrow{margin-right:10px;border-left:6px solid transparent;border-right:6px solid transparent;border-top:6px solid #666;border-bottom:0}.tabulator-row.tabulator-group.tabulator-group-level-1 .tabulator-arrow{margin-left:20px}.tabulator-row.tabulator-group.tabulator-group-level-2 .tabulator-arrow{margin-left:40px}.tabulator-row.tabulator-group.tabulator-group-level-3 .tabulator-arrow{margin-left:60px}.tabulator-row.tabulator-group.tabulator-group-level-4 .tabulator-arrow{margin-left:80px}.tabulator-row.tabulator-group.tabulator-group-level-5 .tabulator-arrow{margin-left:100px}.tabulator-row.tabulator-group .tabulator-arrow{display:inline-block;width:0;height:0;margin-right:16px;border-top:6px solid transparent;border-bottom:6px solid transparent;border-right:0;border-left:6px solid #666;vertical-align:middle}.tabulator-row.tabulator-group span{margin-left:10px;color:#666}.tabulator-edit-select-list{position:absolute;display:inline-block;box-sizing:border-box;max-height:200px;background:#fff;border:1px solid #ddd;font-size:14px;overflow-y:auto;-webkit-overflow-scrolling:touch;z-index:4}.tabulator-edit-select-list .tabulator-edit-select-list-item{padding:4px;color:#333}.tabulator-edit-select-list .tabulator-edit-select-list-item.active{color:#fff;background:#1d68cd}.tabulator-edit-select-list .tabulator-edit-select-list-item:hover{cursor:pointer;color:#fff;background:#1d68cd}.tabulator-edit-select-list .tabulator-edit-select-list-group{border-bottom:1px solid #ddd;padding:4px;padding-top:6px;color:#333;font-weight:700} -/*# sourceMappingURL=tabulator_semantic-ui.min.css.map */ diff --git a/Gems/AssetMemoryAnalyzer/External/tabulator-master/dist/css/semantic-ui/tabulator_semantic-ui.min.css.map b/Gems/AssetMemoryAnalyzer/External/tabulator-master/dist/css/semantic-ui/tabulator_semantic-ui.min.css.map deleted file mode 100644 index 9c420c95be..0000000000 --- a/Gems/AssetMemoryAnalyzer/External/tabulator-master/dist/css/semantic-ui/tabulator_semantic-ui.min.css.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"sources":["tabulator_semantic-ui.min.css"],"names":[],"mappings":"AAiOA,WACE,kBAAmB,AACnB,sBAA0B,AAC1B,gBAAiB,AACjB,eAAgB,AAChB,gBAAiB,AACjB,WAAY,AACZ,aAAgB,AAChB,oCAAyC,AACzC,gBAAiB,AACjB,2BAA6B,AAC7B,sBAA2B,AAE3B,uBAAyB,CAc1B,AAED,iFACE,cAAgB,CACjB,AAED,kCACE,yBAA0B,AACvB,sBAAuB,AACtB,qBAAsB,AAClB,gBAAkB,CAC3B,AAED,6BAGE,WAAY,AACZ,0CAA+C,AAE/C,gBAAiB,AACjB,sBAA2B,AAC3B,gBAAiB,AACjB,gBAAkB,AAClB,oBAAqB,AACrB,mBAAoB,AAEpB,sBAAuB,AACvB,wBAAyB,AACzB,yBAA0B,AAC1B,mBAAqB,CACtB,AAED,yEAlBE,kBAAmB,AACnB,sBAAuB,AAGvB,yBAA0B,AAO1B,eAAiB,CAOnB,AAQC,4CAPC,qBAAsB,AAItB,gBAAiB,AACjB,qBAAuB,CAExB,AAED,6DACE,kBAAmB,AACnB,sBAAuB,AACvB,mBAAoB,AACpB,mBAAqB,CACtB,AAED,mEACE,sBAAuB,AACvB,kBAAmB,AACnB,yBAA6B,CAC9B,AAED,wFACE,sBAAuB,AACvB,WAAY,AACZ,mBAAoB,AACpB,gBAAiB,AACjB,uBAAwB,AACxB,qBAAuB,CACxB,AAED,gHACE,sBAAuB,AACvB,WAAY,AACZ,sBAAuB,AACvB,YAAa,AACb,eAAiB,CAClB,AAED,oFACE,qBAAsB,AACtB,kBAAmB,AACnB,SAAU,AACV,UAAW,AACX,QAAS,AACT,SAAU,AACV,kCAAmC,AACnC,mCAAoC,AACpC,4BAA8B,CAC/B,AAED,0FACE,kBAAmB,AACnB,oBAAqB,AACrB,aAAc,AACd,0BAA2B,AAC3B,eAAiB,CAClB,AAED,oHACE,iBAAmB,CACpB,AAED,0FACE,YAAc,CACf,AAED,+DACE,kBAAmB,AACnB,mCAAqC,AACrC,qBAAuB,CACxB,AAED,qEACE,kBAAmB,AACnB,sBAAuB,AACvB,eAAgB,AAChB,WAAY,AACZ,iBAAmB,CACpB,AAED,8EACE,qBAAwB,CACzB,AAED,yEACE,cAAgB,CACjB,AAED,sFACE,QAAS,AACT,QAAU,CACX,AAED,oFACE,kBAAoB,CACrB,AAED,qEACE,eAAgB,AAChB,wBAA0B,CAC3B,AAED,uHACE,gBAAiB,AACjB,4BAA8B,CAC/B,AAED,sHACE,gBAAiB,AACjB,4BAA8B,CAC/B,AAED,uHACE,0BAA2B,AAC3B,kBAAoB,CACrB,AAED,+GACE,iCAAkC,AAC9B,uBAAwB,AACpB,yBAA0B,AAClC,uBAAwB,AACxB,oBAAqB,AACrB,aAAc,AACd,sBAAuB,AACnB,mBAAoB,AACxB,qBAAsB,AAClB,sBAAwB,CAC7B,AAED,oHAEM,wBAA0B,CAC/B,AAED,2GACE,gBAAiB,AACjB,gBAAkB,CACnB,AAED,uIACE,gBAAiB,AACjB,mBAAqB,CACtB,AAED,uGACE,qBAAuB,CACxB,AAED,+CACE,qBAAsB,AACtB,kBAAmB,AACnB,SAAY,CACb,AAED,qEACE,2BAA6B,CAC9B,AAED,sEACE,0BAA4B,CAC7B,AAED,qDACE,sBAAuB,AACvB,eAAgB,AAChB,0BAA6B,AAC7B,0BAA2B,AAC3B,6BAA8B,AAC9B,eAAiB,CAClB,AAED,oEACE,yBAA6B,CAC9B,AAED,iGACE,YAAc,CACf,AAED,2DACE,cAAgB,CACjB,AAED,iEACE,YAAc,CACf,AAED,kCACE,kBAAmB,AACnB,WAAY,AACZ,mBAAoB,AACpB,cAAe,AACf,gCAAkC,CACnC,AAED,wCACE,YAAc,CACf,AAED,yDACE,sBAAuB,AACvB,oBAAqB,AACrB,aAAc,AACd,sBAAuB,AACnB,mBAAoB,AACxB,UAAY,CACb,AAED,wFACE,kBAAmB,AACnB,MAAO,AACP,OAAQ,AACR,WAAa,CACd,AAED,8DACE,qBAAsB,AACtB,cAAe,AACf,aAAc,AACd,WAAY,AACZ,gBAAkB,AAClB,cAAgB,CACjB,AAED,mDACE,kBAAmB,AACnB,qBAAsB,AACtB,mBAAoB,AACpB,iBAAkB,AAClB,UAAY,CACb,AAED,kFACE,gBAAkB,AAClB,4BAA+B,CAChC,AAED,sGACE,4BAA8B,CAC/B,AAED,yGACE,yBAA2B,CAC5B,AAED,wCACE,kBAAmB,AACnB,QAAS,AACT,MAAO,AACP,SAAU,AACV,SAAW,CACZ,AAED,6CACE,OAAQ,AACR,UAAY,CACb,AAED,8CACE,gBAAkB,CACnB,AAED,6BACE,iBAA6B,AAC7B,wCAA6C,AAC7C,gBAAiB,AACjB,mBAAoB,AACpB,iBAAkB,AAClB,sBAA2B,AAC3B,kBAAmB,AACnB,gBAAoB,AACpB,oBAAqB,AACrB,mBAAoB,AACpB,qBAAsB,AAClB,iBAAkB,AACtB,sBAAuB,AACvB,wBAAyB,AACzB,yBAA0B,AAC1B,mBAAqB,CACtB,AAED,qDACE,sBAAuB,AACvB,wBAAyB,AACzB,oCAAmD,AACnD,gBAAiB,AACjB,0BAA6B,AAC7B,6BAA8B,AAC9B,0BAA2B,AAC3B,eAAiB,CAClB,AAED,oEACE,gBAAkB,AAClB,yBAA6B,CAC9B,AAED,iGACE,YAAc,CACf,AAED,gEACE,wBAA0B,AAC1B,kBAAoB,CACrB,AAED,8CACE,YAAc,CACf,AAED,6CACE,qBAAsB,AACtB,aAAc,AACd,sBAAuB,AACvB,kBAAmB,AACnB,gBAAiB,AACjB,8BAAqC,AACrC,WAAY,AACZ,oBAAqB,AACrB,oBAAqB,AACrB,iBAAmB,CACpB,AAED,oDACE,UAAY,CACb,AAED,sDACE,UAAY,CACb,AAED,kEACE,eAAgB,AAChB,0BAA+B,AAC/B,UAAY,CACb,AAED,6BACE,kBAAmB,AACnB,oBAAqB,AACrB,aAAc,AACd,sBAAuB,AACnB,mBAAoB,AACxB,MAAO,AACP,OAAQ,AACR,UAAa,AACb,YAAa,AACb,WAAY,AACZ,0BAA+B,AAC/B,iBAAmB,CACpB,AAED,mDACE,qBAAsB,AACtB,cAAe,AACf,kBAAmB,AACnB,mBAAoB,AACpB,gBAAiB,AACjB,gBAAkB,AAClB,cAAgB,CACjB,AAED,qEACE,sBAAuB,AACvB,UAAY,CACb,AAED,mEACE,sBAAuB,AACvB,aAAe,CAChB,AAED,sKACE,+BAAsC,AACtC,6BAA+B,AAC/B,uBAA0B,CAC3B,AAED,kLACE,6BAA+B,AAC/B,uBAA0B,CAC3B,AAED,sKACE,+BAAsC,AACtC,6BAA+B,AAC/B,uBAA0B,CAC3B,AAED,kLACE,6BAA+B,AAC/B,uBAA0B,CAC3B,AAED,gKACE,+BAAsC,AACtC,6BAA+B,AAC/B,uBAA0B,CAC3B,AAED,4KACE,6BAA+B,AAC/B,uBAA0B,CAC3B,AAED,oKACE,+BAAsC,AACtC,6BAA+B,AAC/B,uBAA0B,CAC3B,AAED,gLACE,6BAA+B,AAC/B,uBAA0B,CAC3B,AAED,kKACE,uCAAkD,AAClD,6BAA+B,AAC/B,+BAAsC,CACvC,AAED,8KACE,6BAA+B,AAC/B,uBAA0B,CAC3B,AAED,mPACE,oBAAqB,AACrB,oBAA0B,CAC3B,AAED,oBACE,gBAAoB,AACpB,yBAAgC,AAChC,WAAa,CACd,AAED,sCACE,iCAAsC,AAEtC,wBAAgC,CACjC,AAED,2FAJE,yCAAkD,CAMnD,AAED,2EACE,yBAAgC,AAChC,WAAa,CACd,AAED,2FACE,yCAAkD,CACnD,AAED,sCACE,eAAoB,CACrB,AAED,wFACE,0CAAiD,CAClD,AAED,kBACE,mCAAyC,CAC1C,AAMD,4IACE,wCAA8C,CAC/C,AAED,wGACE,iBAAmB,CACpB,AAED,eACE,6BAAgC,CACjC,AAED,wBACE,mCAAqC,AACrC,oBAA0B,CAC3B,AAED,kBACE,6BAAgC,CACjC,AAED,2BACE,mCAAqC,AACrC,oBAA0B,CAC3B,AAED,kBACE,6BAAgC,CACjC,AAED,2BACE,mCAAqC,AACrC,oBAA0B,CAC3B,AAED,iBACE,6BAAgC,CACjC,AAED,0BACE,mCAAqC,AACrC,oBAA0B,CAC3B,AAED,iBACE,6BAAgC,CACjC,AAED,0BACE,mCAAqC,AACrC,oBAA0B,CAC3B,AAED,gBACE,6BAAgC,CACjC,AAED,yBACE,mCAAqC,AACrC,oBAA0B,CAC3B,AAED,gBACE,6BAAgC,CACjC,AAED,yBACE,mCAAqC,AACrC,oBAA0B,CAC3B,AAED,kBACE,6BAAgC,CACjC,AAED,2BACE,mCAAqC,AACrC,oBAA0B,CAC3B,AAED,kBACE,6BAAgC,CACjC,AAED,2BACE,mCAAqC,AACrC,oBAA0B,CAC3B,AAED,gBACE,6BAAgC,CACjC,AAED,yBACE,mCAAqC,AACrC,oBAA0B,CAC3B,AAED,iBACE,6BAAgC,CACjC,AAED,0BACE,mCAAqC,AACrC,oBAA0B,CAC3B,AAED,gBACE,6BAAgC,CACjC,AAED,yBACE,mCAAqC,AACrC,oBAA0B,CAC3B,AAED,iBACE,6BAAgC,CACjC,AAED,0BACE,mCAAqC,AACrC,oBAA0B,CAC3B,AAED,0EACE,WAAiB,CAClB,AAED,2FACE,QAAU,CACX,AAED,yFACE,WAAiB,CAClB,AAED,+EACE,aAAqB,CACtB,AAED,gGACE,QAAU,CACX,AAED,8FACE,aAAqB,CACtB,AAED,2EACE,iBAAqB,CACtB,AAED,4FACE,QAAU,CACX,AAED,0FACE,iBAAqB,CACtB,AAED,gFACE,iBAAqB,CACtB,AAED,iGACE,QAAU,CACX,AAED,+FACE,iBAAqB,CACtB,AAED,eACE,kBAAmB,AACnB,sBAAuB,AACvB,gBAAiB,AACjB,yCAA+C,CAChD,AAED,0CACE,uCAAkD,AAClD,6BAA+B,AAC/B,gCAAsC,AACtC,cAAgB,CACjB,AAED,kCACE,wBAA0B,CAC3B,AAED,wCACE,yBAA0B,AAC1B,cAAgB,CACjB,AAED,gCACE,kBAAmB,AACnB,0BAA2B,AAC3B,6BAA8B,AAC9B,8BAAgC,AAChC,SAAY,CACb,AAED,4CACE,kBAAmB,AACnB,QAAS,AACT,SAAU,AACV,OAAQ,AACR,UAAY,CACb,AAED,iDACE,MAAO,AACP,WAAa,CACd,AAED,kDACE,gBAAkB,CACnB,AAED,iCACE,qBAAsB,AACtB,kBAAmB,AACnB,yBAA0B,AAC1B,SAAY,CACb,AAED,uDACE,2BAA6B,CAC9B,AAED,wDACE,0BAA4B,CAC7B,AAED,8CACE,sBAAuB,AACvB,YAAa,AACb,0BAA2B,AAC3B,4BAA8B,CAC/B,AAED,oDACE,YAAc,CACf,AAED,oDACE,cAAgB,CACjB,AAED,0DACE,iBAAmB,CACpB,AAED,wEACE,kBAAoB,CACrB,AAED,+BACE,qBAAsB,AACtB,kBAAmB,AACnB,sBAAuB,AACvB,iBAA6B,AAC7B,sBAAuB,AACvB,mBAAoB,AACpB,gBAAiB,AACjB,sBAAwB,CACzB,AAED,4CACE,iBAAmB,CACpB,AAED,iDACE,yBAA0B,AAC1B,SAAW,CACZ,AAED,+GACE,WAAY,AACZ,sBAAwB,CACzB,AAED,yDACE,wBAA0B,CAC3B,AAED,+HACE,WAAY,AACZ,uBAAwB,AACxB,aAAe,CAChB,AAED,6EACE,YAAc,CACf,AAED,oDACE,2BAA4B,AAC5B,oBAAqB,AACrB,sBAAuB,AACnB,mBAAoB,AACxB,sBAAuB,AACvB,wBAAyB,AACzB,yBAA0B,AAC1B,mBAAqB,CACtB,AAED,8EACE,SAAW,CACZ,AAED,wGACE,WAAY,AACZ,WAAY,AACZ,eAAgB,AAChB,eAAiB,CAClB,AAED,2DACE,qBAAsB,AACtB,sBAAuB,AACvB,WAAY,AACZ,UAAW,AACX,gBAAiB,AACjB,iBAAkB,AAClB,8BAA+B,AAC/B,2BAA4B,AAC5B,4BAA8B,CAC/B,AAED,4DACE,2BAA4B,AAC5B,oBAAqB,AACrB,qBAAsB,AAClB,uBAAwB,AAC5B,sBAAuB,AACnB,mBAAoB,AACxB,sBAAuB,AACvB,YAAa,AACb,WAAY,AACZ,iBAAkB,AAClB,sBAAuB,AACvB,kBAAmB,AACnB,0BAA+B,AAC/B,eAAiB,CAClB,AAED,kEACE,eAAgB,AAChB,yBAA+B,CAChC,AAED,kGACE,qBAAsB,AACtB,kBAAmB,AACnB,WAAY,AACZ,UAAW,AACX,sBAAwB,CACzB,AAED,wGACE,kBAAmB,AACnB,WAAY,AACZ,UAAW,AACX,QAAS,AACT,WAAY,AACZ,UAAW,AACX,eAAiB,CAClB,AAED,gGACE,qBAAsB,AACtB,kBAAmB,AACnB,WAAY,AACZ,UAAW,AACX,eAAiB,CAClB,AAED,sGACE,kBAAmB,AACnB,WAAY,AACZ,UAAW,AACX,QAAS,AACT,WAAY,AACZ,UAAW,AACX,eAAiB,CAClB,AAED,qEACE,2BAA4B,AAC5B,oBAAqB,AACrB,sBAAuB,AACnB,mBAAoB,AACxB,qBAAsB,AAClB,uBAAwB,AAC5B,sBAAuB,AACvB,wBAAyB,AACzB,yBAA0B,AAC1B,oBAAqB,AACrB,YAAa,AACb,WAAY,AACZ,mBAAoB,AACpB,gBAAiB,AACjB,WAAY,AACZ,gBAAkB,AAClB,eAAiB,CAClB,AAED,2EACE,UAAY,CACb,AAED,sHACE,eAAiB,CAClB,AAMD,sOACE,YAAc,CACf,AAED,+BACE,sBAAuB,AACvB,6BAA8B,AAC9B,4BAA6B,AAC7B,0BAA2B,AAC3B,YAAa,AACb,kBAAmB,AACnB,mBAAoB,AACpB,gBAAkB,AAClB,cAAgB,CACjB,AAED,qCACE,eAAgB,AAChB,+BAAqC,CACtC,AAED,wEACE,kBAAmB,AACnB,kCAAmC,AACnC,mCAAoC,AACpC,0BAA2B,AAC3B,eAAiB,CAClB,AAED,wEACE,gBAAkB,CACnB,AAED,wEACE,gBAAkB,CACnB,AAED,wEACE,gBAAkB,CACnB,AAED,wEACE,gBAAkB,CACnB,AAED,wEACE,iBAAmB,CACpB,AAED,gDACE,qBAAsB,AACtB,QAAS,AACT,SAAU,AACV,kBAAmB,AACnB,iCAAkC,AAClC,oCAAqC,AACrC,eAAgB,AAChB,2BAA4B,AAC5B,qBAAuB,CACxB,AAED,oCACE,iBAAkB,AAClB,UAAY,CACb,AAED,4BACE,kBAAmB,AACnB,qBAAsB,AACtB,sBAAuB,AACvB,iBAAkB,AAClB,gBAAoB,AACpB,sBAAuB,AACvB,eAAgB,AAChB,gBAAiB,AACjB,iCAAkC,AAClC,SAAe,CAChB,AAED,6DACE,YAAa,AACb,UAAY,CACb,AAED,oEACE,WAAe,AACf,kBAAoB,CACrB,AAED,mEACE,eAAgB,AAChB,WAAe,AACf,kBAAoB,CACrB,AAED,8DACE,6BAA8B,AAC9B,YAAa,AACb,gBAAiB,AACjB,WAAY,AACZ,eAAkB,CACnB","file":"tabulator_semantic-ui.min.css","sourcesContent":["/* Tabulator v4.1.2 (c) Oliver Folkerd */\n/*******************************\r\n Site Settings\r\n*******************************/\n/*-------------------\r\n Fonts\r\n--------------------*/\n/*-------------------\r\n Base Sizes\r\n--------------------*/\n/* This is the single variable that controls them all */\n/* The size of page text */\n/*-------------------\r\n Exact Pixel Values\r\n--------------------*/\n/*\r\n These are used to specify exact pixel values in em\r\n for things like borders that remain constantly\r\n sized as emSize adjusts\r\n\r\n Since there are many more sizes than names for sizes,\r\n these are named by their original pixel values.\r\n\r\n*/\n/*-------------------\r\n Border Radius\r\n--------------------*/\n/* See Power-user section below\r\n for explanation of $px variables\r\n*/\n/*-------------------\r\n Site Colors\r\n--------------------*/\n/*--- Colors ---*/\n/*--- Light Colors ---*/\n/*--- Neutrals ---*/\n/*--- Colored Backgrounds ---*/\n/*--- Colored Text ---*/\n/*--- Colored Headers ---*/\n/*--- Colored Border ---*/\n/*-------------------\r\n Alpha Colors\r\n--------------------*/\n/*-------------------\r\n Brand Colors\r\n--------------------*/\n/*--------------\r\n Page Heading\r\n---------------*/\n/*-------------------\r\n Page\r\n--------------------*/\n/*--------------\r\n Form Input\r\n---------------*/\n/* This adjusts the default form input across all elements */\n/* Input Text Color */\n/* Line Height Default For Inputs in Browser (Descendors are 17px at 14px base em) */\n/*-------------------\r\n Focused Input\r\n--------------------*/\n/* Used on inputs, textarea etc */\n/* Used on dropdowns, other larger blocks */\n/*-------------------\r\n Sizes\r\n--------------------*/\n/*\r\n Sizes are all expressed in terms of 14px/em (default em)\r\n This ensures these \"ratios\" remain constant despite changes in EM\r\n*/\n/*-------------------\r\n Paragraph\r\n--------------------*/\n/*-------------------\r\n Links\r\n--------------------*/\n/*-------------------\r\n Highlighted Text\r\n--------------------*/\n/*-------------------\r\n Em Sizes\r\n--------------------*/\n/*\r\n This rounds $size values to the closest pixel then expresses that value in (r)em.\r\n This ensures all size values round to exact pixels\r\n*/\n/* em */\n/* rem */\n/*-------------------\r\n Loader\r\n--------------------*/\n/*-------------------\r\n Grid\r\n--------------------*/\n/*-------------------\r\n Transitions\r\n--------------------*/\n/*-------------------\r\n Breakpoints\r\n--------------------*/\n/* Columns */\n/*******************************\r\n Power-User\r\n*******************************/\n/*-------------------\r\n Emotive Colors\r\n--------------------*/\n/* Positive */\n/* Negative */\n/* Info */\n/* Warning */\n/*-------------------\r\n Paths\r\n--------------------*/\n/* For source only. Modified in gulp for dist */\n/*-------------------\r\n Icons\r\n--------------------*/\n/* Maximum Glyph Width of Icon */\n/*-------------------\r\n Neutral Text\r\n--------------------*/\n/*-------------------\r\n Brand Colors\r\n--------------------*/\n/*-------------------\r\n Borders\r\n--------------------*/\n/*-------------------\r\n Accents\r\n--------------------*/\n/* Differentiating Neutrals */\n/* Differentiating Layers */\n/*-------------------\r\n Derived Values\r\n--------------------*/\n/* Loaders Position Offset */\n/* Rendered Scrollbar Width */\n/* Maximum Single Character Glyph Width, aka Capital \"W\" */\n/* Used to match floats with text */\n/* Header Spacing */\n/* Minimum Mobile Width */\n/* Positive / Negative Dupes */\n/* Responsive */\n/*******************************\r\n States\r\n*******************************/\n/*-------------------\r\n Disabled\r\n--------------------*/\n/*-------------------\r\n Hover\r\n--------------------*/\n/*--- Shadows ---*/\n/*--- Colors ---*/\n/*--- Emotive ---*/\n/*--- Brand ---*/\n/*--- Dark Tones ---*/\n/*--- Light Tones ---*/\n/*-------------------\r\n Focus\r\n--------------------*/\n/*--- Colors ---*/\n/*--- Emotive ---*/\n/*--- Brand ---*/\n/*--- Dark Tones ---*/\n/*--- Light Tones ---*/\n/*-------------------\r\n Down (:active)\r\n--------------------*/\n/*--- Colors ---*/\n/*--- Emotive ---*/\n/*--- Brand ---*/\n/*--- Dark Tones ---*/\n/*--- Light Tones ---*/\n/*-------------------\r\n Active\r\n--------------------*/\n/*--- Colors ---*/\n/*--- Emotive ---*/\n/*--- Brand ---*/\n/*--- Dark Tones ---*/\n/*--- Light Tones ---*/\n/*******************************\r\n Table\r\n*******************************/\n/*-------------------\r\n Element\r\n--------------------*/\n/*--------------\r\n Parts\r\n---------------*/\n/* Table Row */\n/* Table Cell */\n/* Table Header */\n/* Table Footer */\n/* Responsive Size */\n/*-------------------\r\n Types\r\n--------------------*/\n/* Definition */\n/*--------------\r\n Couplings\r\n---------------*/\n/*--------------\r\n States\r\n---------------*/\n/* Positive */\n/* Negative */\n/* Error */\n/* Warning */\n/* Active */\n/*--------------\r\n Types\r\n---------------*/\n/* Attached */\n/* Striped */\n/* Selectable */\n/* Sortable */\n/* Colors */\n/* Inverted */\n/* Basic */\n/* Padded */\n/* Compact */\n/* Sizes */\n.tabulator {\n position: relative;\n background-color: #FFFFFF;\n overflow: hidden;\n font-size: 14px;\n text-align: left;\n width: 100%;\n margin: 1em 0em;\n border: 1px solid rgba(34, 36, 38, 0.15);\n box-shadow: none;\n border-radius: 0.28571/pxrem;\n color: rgba(0, 0, 0, 0.87);\n -ms-transform: translatez(0);\n transform: translatez(0);\n /* Red */\n /* Orange */\n /* Yellow */\n /* Olive */\n /* Green */\n /* Teal */\n /* Blue */\n /* Violet */\n /* Purple */\n /* Pink */\n /* Brown */\n /* Grey */\n /* Black */\n}\n\n.tabulator[tabulator-layout=\"fitDataFill\"] .tabulator-tableHolder .tabulator-table {\n min-width: 100%;\n}\n\n.tabulator.tabulator-block-select {\n -webkit-user-select: none;\n -moz-user-select: none;\n -ms-user-select: none;\n user-select: none;\n}\n\n.tabulator .tabulator-header {\n position: relative;\n box-sizing: border-box;\n width: 100%;\n border-bottom: 1px solid rgba(34, 36, 38, 0.1);\n background-color: #F9FAFB;\n box-shadow: none;\n color: rgba(0, 0, 0, 0.87);\n font-style: none;\n font-weight: bold;\n text-transform: none;\n white-space: nowrap;\n overflow: hidden;\n -moz-user-select: none;\n -khtml-user-select: none;\n -webkit-user-select: none;\n -o-user-select: none;\n}\n\n.tabulator .tabulator-header .tabulator-col {\n display: inline-block;\n position: relative;\n box-sizing: border-box;\n background-color: #F9FAFB;\n text-align: left;\n vertical-align: bottom;\n overflow: hidden;\n}\n\n.tabulator .tabulator-header .tabulator-col.tabulator-moving {\n position: absolute;\n border: 1px solid #999;\n background: #dae1e7;\n pointer-events: none;\n}\n\n.tabulator .tabulator-header .tabulator-col .tabulator-col-content {\n box-sizing: border-box;\n position: relative;\n padding: 0.92857em 0.78571em;\n}\n\n.tabulator .tabulator-header .tabulator-col .tabulator-col-content .tabulator-col-title {\n box-sizing: border-box;\n width: 100%;\n white-space: nowrap;\n overflow: hidden;\n text-overflow: ellipsis;\n vertical-align: bottom;\n}\n\n.tabulator .tabulator-header .tabulator-col .tabulator-col-content .tabulator-col-title .tabulator-title-editor {\n box-sizing: border-box;\n width: 100%;\n border: 1px solid #999;\n padding: 1px;\n background: #fff;\n}\n\n.tabulator .tabulator-header .tabulator-col .tabulator-col-content .tabulator-arrow {\n display: inline-block;\n position: absolute;\n top: 18px;\n right: 8px;\n width: 0;\n height: 0;\n border-left: 6px solid transparent;\n border-right: 6px solid transparent;\n border-bottom: 6px solid #bbb;\n}\n\n.tabulator .tabulator-header .tabulator-col.tabulator-col-group .tabulator-col-group-cols {\n position: relative;\n display: -ms-flexbox;\n display: flex;\n border-top: 1px solid #ddd;\n overflow: hidden;\n}\n\n.tabulator .tabulator-header .tabulator-col.tabulator-col-group .tabulator-col-group-cols .tabulator-col:last-child {\n margin-right: -1px;\n}\n\n.tabulator .tabulator-header .tabulator-col:first-child .tabulator-col-resize-handle.prev {\n display: none;\n}\n\n.tabulator .tabulator-header .tabulator-col.ui-sortable-helper {\n position: absolute;\n background-color: #dae1e7 !important;\n border: 1px solid #ddd;\n}\n\n.tabulator .tabulator-header .tabulator-col .tabulator-header-filter {\n position: relative;\n box-sizing: border-box;\n margin-top: 2px;\n width: 100%;\n text-align: center;\n}\n\n.tabulator .tabulator-header .tabulator-col .tabulator-header-filter textarea {\n height: auto !important;\n}\n\n.tabulator .tabulator-header .tabulator-col .tabulator-header-filter svg {\n margin-top: 3px;\n}\n\n.tabulator .tabulator-header .tabulator-col .tabulator-header-filter input::-ms-clear {\n width: 0;\n height: 0;\n}\n\n.tabulator .tabulator-header .tabulator-col.tabulator-sortable .tabulator-col-title {\n padding-right: 25px;\n}\n\n.tabulator .tabulator-header .tabulator-col.tabulator-sortable:hover {\n cursor: pointer;\n background-color: #dae1e7;\n}\n\n.tabulator .tabulator-header .tabulator-col.tabulator-sortable[aria-sort=\"none\"] .tabulator-col-content .tabulator-arrow {\n border-top: none;\n border-bottom: 6px solid #bbb;\n}\n\n.tabulator .tabulator-header .tabulator-col.tabulator-sortable[aria-sort=\"asc\"] .tabulator-col-content .tabulator-arrow {\n border-top: none;\n border-bottom: 6px solid #666;\n}\n\n.tabulator .tabulator-header .tabulator-col.tabulator-sortable[aria-sort=\"desc\"] .tabulator-col-content .tabulator-arrow {\n border-top: 6px solid #666;\n border-bottom: none;\n}\n\n.tabulator .tabulator-header .tabulator-col.tabulator-col-vertical .tabulator-col-content .tabulator-col-title {\n -webkit-writing-mode: vertical-rl;\n -ms-writing-mode: tb-rl;\n writing-mode: vertical-rl;\n text-orientation: mixed;\n display: -ms-flexbox;\n display: flex;\n -ms-flex-align: center;\n align-items: center;\n -ms-flex-pack: center;\n justify-content: center;\n}\n\n.tabulator .tabulator-header .tabulator-col.tabulator-col-vertical.tabulator-col-vertical-flip .tabulator-col-title {\n -ms-transform: rotate(180deg);\n transform: rotate(180deg);\n}\n\n.tabulator .tabulator-header .tabulator-col.tabulator-col-vertical.tabulator-sortable .tabulator-col-title {\n padding-right: 0;\n padding-top: 20px;\n}\n\n.tabulator .tabulator-header .tabulator-col.tabulator-col-vertical.tabulator-sortable.tabulator-col-vertical-flip .tabulator-col-title {\n padding-right: 0;\n padding-bottom: 20px;\n}\n\n.tabulator .tabulator-header .tabulator-col.tabulator-col-vertical.tabulator-sortable .tabulator-arrow {\n right: calc(50% - 6px);\n}\n\n.tabulator .tabulator-header .tabulator-frozen {\n display: inline-block;\n position: absolute;\n z-index: 10;\n}\n\n.tabulator .tabulator-header .tabulator-frozen.tabulator-frozen-left {\n border-right: 2px solid #ddd;\n}\n\n.tabulator .tabulator-header .tabulator-frozen.tabulator-frozen-right {\n border-left: 2px solid #ddd;\n}\n\n.tabulator .tabulator-header .tabulator-calcs-holder {\n box-sizing: border-box;\n min-width: 400%;\n background: white !important;\n border-top: 1px solid #ddd;\n border-bottom: 1px solid #ddd;\n overflow: hidden;\n}\n\n.tabulator .tabulator-header .tabulator-calcs-holder .tabulator-row {\n background: white !important;\n}\n\n.tabulator .tabulator-header .tabulator-calcs-holder .tabulator-row .tabulator-col-resize-handle {\n display: none;\n}\n\n.tabulator .tabulator-header .tabulator-frozen-rows-holder {\n min-width: 400%;\n}\n\n.tabulator .tabulator-header .tabulator-frozen-rows-holder:empty {\n display: none;\n}\n\n.tabulator .tabulator-tableHolder {\n position: relative;\n width: 100%;\n white-space: nowrap;\n overflow: auto;\n -webkit-overflow-scrolling: touch;\n}\n\n.tabulator .tabulator-tableHolder:focus {\n outline: none;\n}\n\n.tabulator .tabulator-tableHolder .tabulator-placeholder {\n box-sizing: border-box;\n display: -ms-flexbox;\n display: flex;\n -ms-flex-align: center;\n align-items: center;\n width: 100%;\n}\n\n.tabulator .tabulator-tableHolder .tabulator-placeholder[tabulator-render-mode=\"virtual\"] {\n position: absolute;\n top: 0;\n left: 0;\n height: 100%;\n}\n\n.tabulator .tabulator-tableHolder .tabulator-placeholder span {\n display: inline-block;\n margin: 0 auto;\n padding: 10px;\n color: #000;\n font-weight: bold;\n font-size: 20px;\n}\n\n.tabulator .tabulator-tableHolder .tabulator-table {\n position: relative;\n display: inline-block;\n white-space: nowrap;\n overflow: visible;\n color: #333;\n}\n\n.tabulator .tabulator-tableHolder .tabulator-table .tabulator-row.tabulator-calcs {\n font-weight: bold;\n background: #f2f2f2 !important;\n}\n\n.tabulator .tabulator-tableHolder .tabulator-table .tabulator-row.tabulator-calcs.tabulator-calcs-top {\n border-bottom: 2px solid #ddd;\n}\n\n.tabulator .tabulator-tableHolder .tabulator-table .tabulator-row.tabulator-calcs.tabulator-calcs-bottom {\n border-top: 2px solid #ddd;\n}\n\n.tabulator .tabulator-col-resize-handle {\n position: absolute;\n right: 0;\n top: 0;\n bottom: 0;\n width: 5px;\n}\n\n.tabulator .tabulator-col-resize-handle.prev {\n left: 0;\n right: auto;\n}\n\n.tabulator .tabulator-col-resize-handle:hover {\n cursor: ew-resize;\n}\n\n.tabulator .tabulator-footer {\n padding: 0.78571em 0.78571em;\n border-top: 1px solid rgba(34, 36, 38, 0.15);\n box-shadow: none;\n background: #F9FAFB;\n text-align: right;\n color: rgba(0, 0, 0, 0.87);\n font-style: normal;\n font-weight: normal;\n text-transform: none;\n white-space: nowrap;\n -ms-user-select: none;\n user-select: none;\n -moz-user-select: none;\n -khtml-user-select: none;\n -webkit-user-select: none;\n -o-user-select: none;\n}\n\n.tabulator .tabulator-footer .tabulator-calcs-holder {\n box-sizing: border-box;\n width: calc(100% + 20px);\n margin: -0.78571em -0.78571em 0.78571em -0.78571em;\n text-align: left;\n background: white !important;\n border-bottom: 1px solid #ddd;\n border-top: 1px solid #ddd;\n overflow: hidden;\n}\n\n.tabulator .tabulator-footer .tabulator-calcs-holder .tabulator-row {\n font-weight: bold;\n background: white !important;\n}\n\n.tabulator .tabulator-footer .tabulator-calcs-holder .tabulator-row .tabulator-col-resize-handle {\n display: none;\n}\n\n.tabulator .tabulator-footer .tabulator-calcs-holder:only-child {\n margin-bottom: -0.78571em;\n border-bottom: none;\n}\n\n.tabulator .tabulator-footer .tabulator-pages {\n margin: 0 7px;\n}\n\n.tabulator .tabulator-footer .tabulator-page {\n display: inline-block;\n margin: 0 2px;\n border: 1px solid #aaa;\n border-radius: 3px;\n padding: 2px 5px;\n background: rgba(255, 255, 255, 0.2);\n color: #555;\n font-family: inherit;\n font-weight: inherit;\n font-size: inherit;\n}\n\n.tabulator .tabulator-footer .tabulator-page.active {\n color: #d00;\n}\n\n.tabulator .tabulator-footer .tabulator-page:disabled {\n opacity: .5;\n}\n\n.tabulator .tabulator-footer .tabulator-page:not(.disabled):hover {\n cursor: pointer;\n background: rgba(0, 0, 0, 0.2);\n color: #fff;\n}\n\n.tabulator .tabulator-loader {\n position: absolute;\n display: -ms-flexbox;\n display: flex;\n -ms-flex-align: center;\n align-items: center;\n top: 0;\n left: 0;\n z-index: 100;\n height: 100%;\n width: 100%;\n background: rgba(0, 0, 0, 0.4);\n text-align: center;\n}\n\n.tabulator .tabulator-loader .tabulator-loader-msg {\n display: inline-block;\n margin: 0 auto;\n padding: 10px 20px;\n border-radius: 10px;\n background: #fff;\n font-weight: bold;\n font-size: 16px;\n}\n\n.tabulator .tabulator-loader .tabulator-loader-msg.tabulator-loading {\n border: 4px solid #333;\n color: #000;\n}\n\n.tabulator .tabulator-loader .tabulator-loader-msg.tabulator-error {\n border: 4px solid #D00;\n color: #590000;\n}\n\n.tabulator .tabulator-tableHolder .tabulator-table .tabulator-row.positive, .tabulator .tabulator-tableHolder .tabulator-table .tabulator-row .tabulator-cell.positive {\n box-shadow: 0px 0px 0px #A3C293 inset;\n background: #FCFFF5 !important;\n color: #21BA45 !important;\n}\n\n.tabulator .tabulator-tableHolder .tabulator-table .tabulator-row.positive:hover, .tabulator .tabulator-tableHolder .tabulator-table .tabulator-row .tabulator-cell.positive:hover {\n background: #f7ffe6 !important;\n color: #13ae38 !important;\n}\n\n.tabulator .tabulator-tableHolder .tabulator-table .tabulator-row.negative, .tabulator .tabulator-tableHolder .tabulator-table .tabulator-row .tabulator-cell.negative {\n box-shadow: 0px 0px 0px #E0B4B4 inset;\n background: #FFF6F6 !important;\n color: #DB2828 !important;\n}\n\n.tabulator .tabulator-tableHolder .tabulator-table .tabulator-row.negative:hover, .tabulator .tabulator-tableHolder .tabulator-table .tabulator-row .tabulator-cell.negative:hover {\n background: #ffe7e7 !important;\n color: #d41616 !important;\n}\n\n.tabulator .tabulator-tableHolder .tabulator-table .tabulator-row.error, .tabulator .tabulator-tableHolder .tabulator-table .tabulator-row .tabulator-cell.error {\n box-shadow: 0px 0px 0px #E0B4B4 inset;\n background: #FFF6F6 !important;\n color: #DB2828 !important;\n}\n\n.tabulator .tabulator-tableHolder .tabulator-table .tabulator-row.error:hover, .tabulator .tabulator-tableHolder .tabulator-table .tabulator-row .tabulator-cell.error:hover {\n background: #ffe7e7 !important;\n color: #d12323 !important;\n}\n\n.tabulator .tabulator-tableHolder .tabulator-table .tabulator-row.warning, .tabulator .tabulator-tableHolder .tabulator-table .tabulator-row .tabulator-cell.warning {\n box-shadow: 0px 0px 0px #C9BA9B inset;\n background: #FFFAF3 !important;\n color: #F2C037 !important;\n}\n\n.tabulator .tabulator-tableHolder .tabulator-table .tabulator-row.warning:hover, .tabulator .tabulator-tableHolder .tabulator-table .tabulator-row .tabulator-cell.warning:hover {\n background: #fff4e4 !important;\n color: #f1bb29 !important;\n}\n\n.tabulator .tabulator-tableHolder .tabulator-table .tabulator-row.active, .tabulator .tabulator-tableHolder .tabulator-table .tabulator-row .tabulator-cell.active {\n box-shadow: 0px 0px 0px rgba(0, 0, 0, 0.87) inset;\n background: #E0E0E0 !important;\n color: rgba(0, 0, 0, 0.87) !important;\n}\n\n.tabulator .tabulator-tableHolder .tabulator-table .tabulator-row.active:hover, .tabulator .tabulator-tableHolder .tabulator-table .tabulator-row .tabulator-cell.active:hover {\n background: #f7ffe6 !important;\n color: #13ae38 !important;\n}\n\n.tabulator .tabulator-tableHolder .tabulator-table .tabulator-row.active, .tabulator .tabulator-tableHolder .tabulator-table .tabulator-row.disabled:hover, .tabulator .tabulator-tableHolder .tabulator-table .tabulator-row .tabulator-cell.active {\n pointer-events: none;\n color: rgba(0, 0, 0, 0.2);\n}\n\n.tabulator.inverted {\n background: #333333;\n color: rgba(255, 255, 255, 0.9);\n border: none;\n}\n\n.tabulator.inverted .tabulator-header {\n background-color: rgba(0, 0, 0, 0.15);\n border-color: rgba(255, 255, 255, 0.1) !important;\n color: rgba(255, 255, 255, 0.9);\n}\n\n.tabulator.inverted .tabulator-header .tabulator-col {\n border-color: rgba(255, 255, 255, 0.1) !important;\n}\n\n.tabulator.inverted .tabulator-tableHolder .tabulator-table .tabulator-row {\n color: rgba(255, 255, 255, 0.9);\n border: none;\n}\n\n.tabulator.inverted .tabulator-tableHolder .tabulator-table .tabulator-row .tabulator-cell {\n border-color: rgba(255, 255, 255, 0.1) !important;\n}\n\n.tabulator.inverted .tabulator-footer {\n background: #FFFFFF;\n}\n\n.tabulator.striped .tabulator-tableHolder .tabulator-table .tabulator-row:nth-child(even) {\n background-color: rgba(0, 0, 0, 0.05) !important;\n}\n\n.tabulator.celled {\n border: 1px solid rgba(34, 36, 38, 0.15);\n}\n\n.tabulator.celled .tabulator-header .tabulator-col {\n border-right: 1px solid rgba(34, 36, 38, 0.1);\n}\n\n.tabulator.celled .tabulator-tableHolder .tabulator-table .tabulator-row .tabulator-cell {\n border-right: 1px solid rgba(34, 36, 38, 0.1);\n}\n\n.tabulator[class*=\"single line\"] .tabulator-tableHolder .tabulator-table .tabulator-row .tabulator-cell {\n border-right: none;\n}\n\n.tabulator.red {\n border-top: 0.2em solid #DB2828;\n}\n\n.tabulator.inverted.red {\n background-color: #DB2828 !important;\n color: #FFFFFF !important;\n}\n\n.tabulator.orange {\n border-top: 0.2em solid #F2711C;\n}\n\n.tabulator.inverted.orange {\n background-color: #F2711C !important;\n color: #FFFFFF !important;\n}\n\n.tabulator.yellow {\n border-top: 0.2em solid #FBBD08;\n}\n\n.tabulator.inverted.yellow {\n background-color: #FBBD08 !important;\n color: #FFFFFF !important;\n}\n\n.tabulator.olive {\n border-top: 0.2em solid #B5CC18;\n}\n\n.tabulator.inverted.olive {\n background-color: #B5CC18 !important;\n color: #FFFFFF !important;\n}\n\n.tabulator.green {\n border-top: 0.2em solid #21BA45;\n}\n\n.tabulator.inverted.green {\n background-color: #21BA45 !important;\n color: #FFFFFF !important;\n}\n\n.tabulator.teal {\n border-top: 0.2em solid #00B5AD;\n}\n\n.tabulator.inverted.teal {\n background-color: #00B5AD !important;\n color: #FFFFFF !important;\n}\n\n.tabulator.blue {\n border-top: 0.2em solid #2185D0;\n}\n\n.tabulator.inverted.blue {\n background-color: #2185D0 !important;\n color: #FFFFFF !important;\n}\n\n.tabulator.violet {\n border-top: 0.2em solid #6435C9;\n}\n\n.tabulator.inverted.violet {\n background-color: #6435C9 !important;\n color: #FFFFFF !important;\n}\n\n.tabulator.purple {\n border-top: 0.2em solid #A333C8;\n}\n\n.tabulator.inverted.purple {\n background-color: #A333C8 !important;\n color: #FFFFFF !important;\n}\n\n.tabulator.pink {\n border-top: 0.2em solid #E03997;\n}\n\n.tabulator.inverted.pink {\n background-color: #E03997 !important;\n color: #FFFFFF !important;\n}\n\n.tabulator.brown {\n border-top: 0.2em solid #A5673F;\n}\n\n.tabulator.inverted.brown {\n background-color: #A5673F !important;\n color: #FFFFFF !important;\n}\n\n.tabulator.grey {\n border-top: 0.2em solid #767676;\n}\n\n.tabulator.inverted.grey {\n background-color: #767676 !important;\n color: #FFFFFF !important;\n}\n\n.tabulator.black {\n border-top: 0.2em solid #1B1C1D;\n}\n\n.tabulator.inverted.black {\n background-color: #1B1C1D !important;\n color: #FFFFFF !important;\n}\n\n.tabulator.padded .tabulator-header .tabulator-col .tabulator-col-content {\n padding: 1em 1em;\n}\n\n.tabulator.padded .tabulator-header .tabulator-col .tabulator-col-content .tabulator-arrow {\n top: 20px;\n}\n\n.tabulator.padded .tabulator-tableHolder .tabulator-table .tabulator-row .tabulator-cell {\n padding: 1em 1em;\n}\n\n.tabulator.padded.very .tabulator-header .tabulator-col .tabulator-col-content {\n padding: 1.5em 1.5em;\n}\n\n.tabulator.padded.very .tabulator-header .tabulator-col .tabulator-col-content .tabulator-arrow {\n top: 26px;\n}\n\n.tabulator.padded.very .tabulator-tableHolder .tabulator-table .tabulator-row .tabulator-cell {\n padding: 1.5em 1.5em;\n}\n\n.tabulator.compact .tabulator-header .tabulator-col .tabulator-col-content {\n padding: 0.5em 0.7em;\n}\n\n.tabulator.compact .tabulator-header .tabulator-col .tabulator-col-content .tabulator-arrow {\n top: 12px;\n}\n\n.tabulator.compact .tabulator-tableHolder .tabulator-table .tabulator-row .tabulator-cell {\n padding: 0.5em 0.7em;\n}\n\n.tabulator.compact.very .tabulator-header .tabulator-col .tabulator-col-content {\n padding: 0.4em 0.6em;\n}\n\n.tabulator.compact.very .tabulator-header .tabulator-col .tabulator-col-content .tabulator-arrow {\n top: 10px;\n}\n\n.tabulator.compact.very .tabulator-tableHolder .tabulator-table .tabulator-row .tabulator-cell {\n padding: 0.4em 0.6em;\n}\n\n.tabulator-row {\n position: relative;\n box-sizing: border-box;\n min-height: 22px;\n border-bottom: 1px solid rgba(34, 36, 38, 0.1);\n}\n\n.tabulator-row.tabulator-selectable:hover {\n box-shadow: 0px 0px 0px rgba(0, 0, 0, 0.87) inset;\n background: #E0E0E0 !important;\n color: rgba(0, 0, 0, 0.87) !important;\n cursor: pointer;\n}\n\n.tabulator-row.tabulator-selected {\n background-color: #9ABCEA;\n}\n\n.tabulator-row.tabulator-selected:hover {\n background-color: #769BCC;\n cursor: pointer;\n}\n\n.tabulator-row.tabulator-moving {\n position: absolute;\n border-top: 1px solid #ddd;\n border-bottom: 1px solid #ddd;\n pointer-events: none !important;\n z-index: 15;\n}\n\n.tabulator-row .tabulator-row-resize-handle {\n position: absolute;\n right: 0;\n bottom: 0;\n left: 0;\n height: 5px;\n}\n\n.tabulator-row .tabulator-row-resize-handle.prev {\n top: 0;\n bottom: auto;\n}\n\n.tabulator-row .tabulator-row-resize-handle:hover {\n cursor: ns-resize;\n}\n\n.tabulator-row .tabulator-frozen {\n display: inline-block;\n position: absolute;\n background-color: inherit;\n z-index: 10;\n}\n\n.tabulator-row .tabulator-frozen.tabulator-frozen-left {\n border-right: 2px solid #ddd;\n}\n\n.tabulator-row .tabulator-frozen.tabulator-frozen-right {\n border-left: 2px solid #ddd;\n}\n\n.tabulator-row .tabulator-responsive-collapse {\n box-sizing: border-box;\n padding: 5px;\n border-top: 1px solid #ddd;\n border-bottom: 1px solid #ddd;\n}\n\n.tabulator-row .tabulator-responsive-collapse:empty {\n display: none;\n}\n\n.tabulator-row .tabulator-responsive-collapse table {\n font-size: 14px;\n}\n\n.tabulator-row .tabulator-responsive-collapse table tr td {\n position: relative;\n}\n\n.tabulator-row .tabulator-responsive-collapse table tr td:first-of-type {\n padding-right: 10px;\n}\n\n.tabulator-row .tabulator-cell {\n display: inline-block;\n position: relative;\n box-sizing: border-box;\n padding: 0.78571em 0.78571em;\n vertical-align: middle;\n white-space: nowrap;\n overflow: hidden;\n text-overflow: ellipsis;\n}\n\n.tabulator-row .tabulator-cell:last-of-type {\n border-right: none;\n}\n\n.tabulator-row .tabulator-cell.tabulator-editing {\n border: 1px solid #1D68CD;\n padding: 0;\n}\n\n.tabulator-row .tabulator-cell.tabulator-editing input, .tabulator-row .tabulator-cell.tabulator-editing select {\n border: 1px;\n background: transparent;\n}\n\n.tabulator-row .tabulator-cell.tabulator-validation-fail {\n border: 1px solid #DB2828;\n}\n\n.tabulator-row .tabulator-cell.tabulator-validation-fail input, .tabulator-row .tabulator-cell.tabulator-validation-fail select {\n border: 1px;\n background: transparent;\n color: #DB2828;\n}\n\n.tabulator-row .tabulator-cell:first-child .tabulator-col-resize-handle.prev {\n display: none;\n}\n\n.tabulator-row .tabulator-cell.tabulator-row-handle {\n display: -ms-inline-flexbox;\n display: inline-flex;\n -ms-flex-align: center;\n align-items: center;\n -moz-user-select: none;\n -khtml-user-select: none;\n -webkit-user-select: none;\n -o-user-select: none;\n}\n\n.tabulator-row .tabulator-cell.tabulator-row-handle .tabulator-row-handle-box {\n width: 80%;\n}\n\n.tabulator-row .tabulator-cell.tabulator-row-handle .tabulator-row-handle-box .tabulator-row-handle-bar {\n width: 100%;\n height: 3px;\n margin-top: 2px;\n background: #666;\n}\n\n.tabulator-row .tabulator-cell .tabulator-data-tree-branch {\n display: inline-block;\n vertical-align: middle;\n height: 9px;\n width: 7px;\n margin-top: -9px;\n margin-right: 5px;\n border-bottom-left-radius: 1px;\n border-left: 2px solid #ddd;\n border-bottom: 2px solid #ddd;\n}\n\n.tabulator-row .tabulator-cell .tabulator-data-tree-control {\n display: -ms-inline-flexbox;\n display: inline-flex;\n -ms-flex-pack: center;\n justify-content: center;\n -ms-flex-align: center;\n align-items: center;\n vertical-align: middle;\n height: 11px;\n width: 11px;\n margin-right: 5px;\n border: 1px solid #333;\n border-radius: 2px;\n background: rgba(0, 0, 0, 0.1);\n overflow: hidden;\n}\n\n.tabulator-row .tabulator-cell .tabulator-data-tree-control:hover {\n cursor: pointer;\n background: rgba(0, 0, 0, 0.2);\n}\n\n.tabulator-row .tabulator-cell .tabulator-data-tree-control .tabulator-data-tree-control-collapse {\n display: inline-block;\n position: relative;\n height: 7px;\n width: 1px;\n background: transparent;\n}\n\n.tabulator-row .tabulator-cell .tabulator-data-tree-control .tabulator-data-tree-control-collapse:after {\n position: absolute;\n content: \"\";\n left: -3px;\n top: 3px;\n height: 1px;\n width: 7px;\n background: #333;\n}\n\n.tabulator-row .tabulator-cell .tabulator-data-tree-control .tabulator-data-tree-control-expand {\n display: inline-block;\n position: relative;\n height: 7px;\n width: 1px;\n background: #333;\n}\n\n.tabulator-row .tabulator-cell .tabulator-data-tree-control .tabulator-data-tree-control-expand:after {\n position: absolute;\n content: \"\";\n left: -3px;\n top: 3px;\n height: 1px;\n width: 7px;\n background: #333;\n}\n\n.tabulator-row .tabulator-cell .tabulator-responsive-collapse-toggle {\n display: -ms-inline-flexbox;\n display: inline-flex;\n -ms-flex-align: center;\n align-items: center;\n -ms-flex-pack: center;\n justify-content: center;\n -moz-user-select: none;\n -khtml-user-select: none;\n -webkit-user-select: none;\n -o-user-select: none;\n height: 15px;\n width: 15px;\n border-radius: 20px;\n background: #666;\n color: #fff;\n font-weight: bold;\n font-size: 1.1em;\n}\n\n.tabulator-row .tabulator-cell .tabulator-responsive-collapse-toggle:hover {\n opacity: .7;\n}\n\n.tabulator-row .tabulator-cell .tabulator-responsive-collapse-toggle.open .tabulator-responsive-collapse-toggle-close {\n display: initial;\n}\n\n.tabulator-row .tabulator-cell .tabulator-responsive-collapse-toggle.open .tabulator-responsive-collapse-toggle-open {\n display: none;\n}\n\n.tabulator-row .tabulator-cell .tabulator-responsive-collapse-toggle .tabulator-responsive-collapse-toggle-close {\n display: none;\n}\n\n.tabulator-row.tabulator-group {\n box-sizing: border-box;\n border-bottom: 1px solid #999;\n border-right: 1px solid #ddd;\n border-top: 1px solid #999;\n padding: 5px;\n padding-left: 10px;\n background: #fafafa;\n font-weight: bold;\n min-width: 100%;\n}\n\n.tabulator-row.tabulator-group:hover {\n cursor: pointer;\n background-color: rgba(0, 0, 0, 0.1);\n}\n\n.tabulator-row.tabulator-group.tabulator-group-visible .tabulator-arrow {\n margin-right: 10px;\n border-left: 6px solid transparent;\n border-right: 6px solid transparent;\n border-top: 6px solid #666;\n border-bottom: 0;\n}\n\n.tabulator-row.tabulator-group.tabulator-group-level-1 .tabulator-arrow {\n margin-left: 20px;\n}\n\n.tabulator-row.tabulator-group.tabulator-group-level-2 .tabulator-arrow {\n margin-left: 40px;\n}\n\n.tabulator-row.tabulator-group.tabulator-group-level-3 .tabulator-arrow {\n margin-left: 60px;\n}\n\n.tabulator-row.tabulator-group.tabulator-group-level-4 .tabulator-arrow {\n margin-left: 80px;\n}\n\n.tabulator-row.tabulator-group.tabulator-group-level-5 .tabulator-arrow {\n margin-left: 100px;\n}\n\n.tabulator-row.tabulator-group .tabulator-arrow {\n display: inline-block;\n width: 0;\n height: 0;\n margin-right: 16px;\n border-top: 6px solid transparent;\n border-bottom: 6px solid transparent;\n border-right: 0;\n border-left: 6px solid #666;\n vertical-align: middle;\n}\n\n.tabulator-row.tabulator-group span {\n margin-left: 10px;\n color: #666;\n}\n\n.tabulator-edit-select-list {\n position: absolute;\n display: inline-block;\n box-sizing: border-box;\n max-height: 200px;\n background: #FFFFFF;\n border: 1px solid #ddd;\n font-size: 14px;\n overflow-y: auto;\n -webkit-overflow-scrolling: touch;\n z-index: 10000;\n}\n\n.tabulator-edit-select-list .tabulator-edit-select-list-item {\n padding: 4px;\n color: #333;\n}\n\n.tabulator-edit-select-list .tabulator-edit-select-list-item.active {\n color: #FFFFFF;\n background: #1D68CD;\n}\n\n.tabulator-edit-select-list .tabulator-edit-select-list-item:hover {\n cursor: pointer;\n color: #FFFFFF;\n background: #1D68CD;\n}\n\n.tabulator-edit-select-list .tabulator-edit-select-list-group {\n border-bottom: 1px solid #ddd;\n padding: 4px;\n padding-top: 6px;\n color: #333;\n font-weight: bold;\n}\n"]} \ No newline at end of file diff --git a/Gems/AssetMemoryAnalyzer/External/tabulator-master/dist/css/tabulator.css b/Gems/AssetMemoryAnalyzer/External/tabulator-master/dist/css/tabulator.css deleted file mode 100644 index f087924868..0000000000 --- a/Gems/AssetMemoryAnalyzer/External/tabulator-master/dist/css/tabulator.css +++ /dev/null @@ -1,769 +0,0 @@ -/* Tabulator v4.1.2 (c) Oliver Folkerd */ -.tabulator { - position: relative; - border: 1px solid #999; - background-color: #888; - font-size: 14px; - text-align: left; - overflow: hidden; - -ms-transform: translatez(0); - transform: translatez(0); -} - -.tabulator[tabulator-layout="fitDataFill"] .tabulator-tableHolder .tabulator-table { - min-width: 100%; -} - -.tabulator.tabulator-block-select { - -webkit-user-select: none; - -moz-user-select: none; - -ms-user-select: none; - user-select: none; -} - -.tabulator .tabulator-header { - position: relative; - box-sizing: border-box; - width: 100%; - border-bottom: 1px solid #999; - background-color: #e6e6e6; - color: #555; - font-weight: bold; - white-space: nowrap; - overflow: hidden; - -moz-user-select: none; - -khtml-user-select: none; - -webkit-user-select: none; - -o-user-select: none; -} - -.tabulator .tabulator-header .tabulator-col { - display: inline-block; - position: relative; - box-sizing: border-box; - border-right: 1px solid #aaa; - background: #e6e6e6; - text-align: left; - vertical-align: bottom; - overflow: hidden; -} - -.tabulator .tabulator-header .tabulator-col.tabulator-moving { - position: absolute; - border: 1px solid #999; - background: #cdcdcd; - pointer-events: none; -} - -.tabulator .tabulator-header .tabulator-col .tabulator-col-content { - box-sizing: border-box; - position: relative; - padding: 4px; -} - -.tabulator .tabulator-header .tabulator-col .tabulator-col-content .tabulator-col-title { - box-sizing: border-box; - width: 100%; - white-space: nowrap; - overflow: hidden; - text-overflow: ellipsis; - vertical-align: bottom; -} - -.tabulator .tabulator-header .tabulator-col .tabulator-col-content .tabulator-col-title .tabulator-title-editor { - box-sizing: border-box; - width: 100%; - border: 1px solid #999; - padding: 1px; - background: #fff; -} - -.tabulator .tabulator-header .tabulator-col .tabulator-col-content .tabulator-arrow { - display: inline-block; - position: absolute; - top: 9px; - right: 8px; - width: 0; - height: 0; - border-left: 6px solid transparent; - border-right: 6px solid transparent; - border-bottom: 6px solid #bbb; -} - -.tabulator .tabulator-header .tabulator-col.tabulator-col-group .tabulator-col-group-cols { - position: relative; - display: -ms-flexbox; - display: flex; - border-top: 1px solid #aaa; - overflow: hidden; -} - -.tabulator .tabulator-header .tabulator-col.tabulator-col-group .tabulator-col-group-cols .tabulator-col:last-child { - margin-right: -1px; -} - -.tabulator .tabulator-header .tabulator-col:first-child .tabulator-col-resize-handle.prev { - display: none; -} - -.tabulator .tabulator-header .tabulator-col.ui-sortable-helper { - position: absolute; - background-color: #e6e6e6 !important; - border: 1px solid #aaa; -} - -.tabulator .tabulator-header .tabulator-col .tabulator-header-filter { - position: relative; - box-sizing: border-box; - margin-top: 2px; - width: 100%; - text-align: center; -} - -.tabulator .tabulator-header .tabulator-col .tabulator-header-filter textarea { - height: auto !important; -} - -.tabulator .tabulator-header .tabulator-col .tabulator-header-filter svg { - margin-top: 3px; -} - -.tabulator .tabulator-header .tabulator-col .tabulator-header-filter input::-ms-clear { - width: 0; - height: 0; -} - -.tabulator .tabulator-header .tabulator-col.tabulator-sortable .tabulator-col-title { - padding-right: 25px; -} - -.tabulator .tabulator-header .tabulator-col.tabulator-sortable:hover { - cursor: pointer; - background-color: #cdcdcd; -} - -.tabulator .tabulator-header .tabulator-col.tabulator-sortable[aria-sort="none"] .tabulator-col-content .tabulator-arrow { - border-top: none; - border-bottom: 6px solid #bbb; -} - -.tabulator .tabulator-header .tabulator-col.tabulator-sortable[aria-sort="asc"] .tabulator-col-content .tabulator-arrow { - border-top: none; - border-bottom: 6px solid #666; -} - -.tabulator .tabulator-header .tabulator-col.tabulator-sortable[aria-sort="desc"] .tabulator-col-content .tabulator-arrow { - border-top: 6px solid #666; - border-bottom: none; -} - -.tabulator .tabulator-header .tabulator-col.tabulator-col-vertical .tabulator-col-content .tabulator-col-title { - -webkit-writing-mode: vertical-rl; - -ms-writing-mode: tb-rl; - writing-mode: vertical-rl; - text-orientation: mixed; - display: -ms-flexbox; - display: flex; - -ms-flex-align: center; - align-items: center; - -ms-flex-pack: center; - justify-content: center; -} - -.tabulator .tabulator-header .tabulator-col.tabulator-col-vertical.tabulator-col-vertical-flip .tabulator-col-title { - -ms-transform: rotate(180deg); - transform: rotate(180deg); -} - -.tabulator .tabulator-header .tabulator-col.tabulator-col-vertical.tabulator-sortable .tabulator-col-title { - padding-right: 0; - padding-top: 20px; -} - -.tabulator .tabulator-header .tabulator-col.tabulator-col-vertical.tabulator-sortable.tabulator-col-vertical-flip .tabulator-col-title { - padding-right: 0; - padding-bottom: 20px; -} - -.tabulator .tabulator-header .tabulator-col.tabulator-col-vertical.tabulator-sortable .tabulator-arrow { - right: calc(50% - 6px); -} - -.tabulator .tabulator-header .tabulator-frozen { - display: inline-block; - position: absolute; - z-index: 10; -} - -.tabulator .tabulator-header .tabulator-frozen.tabulator-frozen-left { - border-right: 2px solid #aaa; -} - -.tabulator .tabulator-header .tabulator-frozen.tabulator-frozen-right { - border-left: 2px solid #aaa; -} - -.tabulator .tabulator-header .tabulator-calcs-holder { - box-sizing: border-box; - min-width: 400%; - background: #f3f3f3 !important; - border-top: 1px solid #aaa; - border-bottom: 1px solid #aaa; - overflow: hidden; -} - -.tabulator .tabulator-header .tabulator-calcs-holder .tabulator-row { - background: #f3f3f3 !important; -} - -.tabulator .tabulator-header .tabulator-calcs-holder .tabulator-row .tabulator-col-resize-handle { - display: none; -} - -.tabulator .tabulator-header .tabulator-frozen-rows-holder { - min-width: 400%; -} - -.tabulator .tabulator-header .tabulator-frozen-rows-holder:empty { - display: none; -} - -.tabulator .tabulator-tableHolder { - position: relative; - width: 100%; - white-space: nowrap; - overflow: auto; - -webkit-overflow-scrolling: touch; -} - -.tabulator .tabulator-tableHolder:focus { - outline: none; -} - -.tabulator .tabulator-tableHolder .tabulator-placeholder { - box-sizing: border-box; - display: -ms-flexbox; - display: flex; - -ms-flex-align: center; - align-items: center; - width: 100%; -} - -.tabulator .tabulator-tableHolder .tabulator-placeholder[tabulator-render-mode="virtual"] { - position: absolute; - top: 0; - left: 0; - height: 100%; -} - -.tabulator .tabulator-tableHolder .tabulator-placeholder span { - display: inline-block; - margin: 0 auto; - padding: 10px; - color: #ccc; - font-weight: bold; - font-size: 20px; -} - -.tabulator .tabulator-tableHolder .tabulator-table { - position: relative; - display: inline-block; - background-color: #fff; - white-space: nowrap; - overflow: visible; - color: #333; -} - -.tabulator .tabulator-tableHolder .tabulator-table .tabulator-row.tabulator-calcs { - font-weight: bold; - background: #e2e2e2 !important; -} - -.tabulator .tabulator-tableHolder .tabulator-table .tabulator-row.tabulator-calcs.tabulator-calcs-top { - border-bottom: 2px solid #aaa; -} - -.tabulator .tabulator-tableHolder .tabulator-table .tabulator-row.tabulator-calcs.tabulator-calcs-bottom { - border-top: 2px solid #aaa; -} - -.tabulator .tabulator-footer { - padding: 5px 10px; - border-top: 1px solid #999; - background-color: #e6e6e6; - text-align: right; - color: #555; - font-weight: bold; - white-space: nowrap; - -ms-user-select: none; - user-select: none; - -moz-user-select: none; - -khtml-user-select: none; - -webkit-user-select: none; - -o-user-select: none; -} - -.tabulator .tabulator-footer .tabulator-calcs-holder { - box-sizing: border-box; - width: calc(100% + 20px); - margin: -5px -10px 5px -10px; - text-align: left; - background: #f3f3f3 !important; - border-bottom: 1px solid #aaa; - border-top: 1px solid #aaa; - overflow: hidden; -} - -.tabulator .tabulator-footer .tabulator-calcs-holder .tabulator-row { - background: #f3f3f3 !important; -} - -.tabulator .tabulator-footer .tabulator-calcs-holder .tabulator-row .tabulator-col-resize-handle { - display: none; -} - -.tabulator .tabulator-footer .tabulator-calcs-holder:only-child { - margin-bottom: -5px; - border-bottom: none; -} - -.tabulator .tabulator-footer .tabulator-pages { - margin: 0 7px; -} - -.tabulator .tabulator-footer .tabulator-page { - display: inline-block; - margin: 0 2px; - padding: 2px 5px; - border: 1px solid #aaa; - border-radius: 3px; - background: rgba(255, 255, 255, 0.2); - color: #555; - font-family: inherit; - font-weight: inherit; - font-size: inherit; -} - -.tabulator .tabulator-footer .tabulator-page.active { - color: #d00; -} - -.tabulator .tabulator-footer .tabulator-page:disabled { - opacity: .5; -} - -.tabulator .tabulator-footer .tabulator-page:not(.disabled):hover { - cursor: pointer; - background: rgba(0, 0, 0, 0.2); - color: #fff; -} - -.tabulator .tabulator-col-resize-handle { - position: absolute; - right: 0; - top: 0; - bottom: 0; - width: 5px; -} - -.tabulator .tabulator-col-resize-handle.prev { - left: 0; - right: auto; -} - -.tabulator .tabulator-col-resize-handle:hover { - cursor: ew-resize; -} - -.tabulator .tabulator-loader { - position: absolute; - display: -ms-flexbox; - display: flex; - -ms-flex-align: center; - align-items: center; - top: 0; - left: 0; - z-index: 100; - height: 100%; - width: 100%; - background: rgba(0, 0, 0, 0.4); - text-align: center; -} - -.tabulator .tabulator-loader .tabulator-loader-msg { - display: inline-block; - margin: 0 auto; - padding: 10px 20px; - border-radius: 10px; - background: #fff; - font-weight: bold; - font-size: 16px; -} - -.tabulator .tabulator-loader .tabulator-loader-msg.tabulator-loading { - border: 4px solid #333; - color: #000; -} - -.tabulator .tabulator-loader .tabulator-loader-msg.tabulator-error { - border: 4px solid #D00; - color: #590000; -} - -.tabulator-row { - position: relative; - box-sizing: border-box; - min-height: 22px; - background-color: #fff; -} - -.tabulator-row.tabulator-row-even { - background-color: #EFEFEF; -} - -.tabulator-row.tabulator-selectable:hover { - background-color: #bbb; - cursor: pointer; -} - -.tabulator-row.tabulator-selected { - background-color: #9ABCEA; -} - -.tabulator-row.tabulator-selected:hover { - background-color: #769BCC; - cursor: pointer; -} - -.tabulator-row.tabulator-row-moving { - border: 1px solid #000; - background: #fff; -} - -.tabulator-row.tabulator-moving { - position: absolute; - border-top: 1px solid #aaa; - border-bottom: 1px solid #aaa; - pointer-events: none; - z-index: 15; -} - -.tabulator-row .tabulator-row-resize-handle { - position: absolute; - right: 0; - bottom: 0; - left: 0; - height: 5px; -} - -.tabulator-row .tabulator-row-resize-handle.prev { - top: 0; - bottom: auto; -} - -.tabulator-row .tabulator-row-resize-handle:hover { - cursor: ns-resize; -} - -.tabulator-row .tabulator-frozen { - display: inline-block; - position: absolute; - background-color: inherit; - z-index: 10; -} - -.tabulator-row .tabulator-frozen.tabulator-frozen-left { - border-right: 2px solid #aaa; -} - -.tabulator-row .tabulator-frozen.tabulator-frozen-right { - border-left: 2px solid #aaa; -} - -.tabulator-row .tabulator-responsive-collapse { - box-sizing: border-box; - padding: 5px; - border-top: 1px solid #aaa; - border-bottom: 1px solid #aaa; -} - -.tabulator-row .tabulator-responsive-collapse:empty { - display: none; -} - -.tabulator-row .tabulator-responsive-collapse table { - font-size: 14px; -} - -.tabulator-row .tabulator-responsive-collapse table tr td { - position: relative; -} - -.tabulator-row .tabulator-responsive-collapse table tr td:first-of-type { - padding-right: 10px; -} - -.tabulator-row .tabulator-cell { - display: inline-block; - position: relative; - box-sizing: border-box; - padding: 4px; - border-right: 1px solid #aaa; - vertical-align: middle; - white-space: nowrap; - overflow: hidden; - text-overflow: ellipsis; -} - -.tabulator-row .tabulator-cell.tabulator-editing { - border: 1px solid #1D68CD; - padding: 0; -} - -.tabulator-row .tabulator-cell.tabulator-editing input, .tabulator-row .tabulator-cell.tabulator-editing select { - border: 1px; - background: transparent; -} - -.tabulator-row .tabulator-cell.tabulator-validation-fail { - border: 1px solid #dd0000; -} - -.tabulator-row .tabulator-cell.tabulator-validation-fail input, .tabulator-row .tabulator-cell.tabulator-validation-fail select { - border: 1px; - background: transparent; - color: #dd0000; -} - -.tabulator-row .tabulator-cell:first-child .tabulator-col-resize-handle.prev { - display: none; -} - -.tabulator-row .tabulator-cell.tabulator-row-handle { - display: -ms-inline-flexbox; - display: inline-flex; - -ms-flex-align: center; - align-items: center; - -ms-flex-pack: center; - justify-content: center; - -moz-user-select: none; - -khtml-user-select: none; - -webkit-user-select: none; - -o-user-select: none; -} - -.tabulator-row .tabulator-cell.tabulator-row-handle .tabulator-row-handle-box { - width: 80%; -} - -.tabulator-row .tabulator-cell.tabulator-row-handle .tabulator-row-handle-box .tabulator-row-handle-bar { - width: 100%; - height: 3px; - margin-top: 2px; - background: #666; -} - -.tabulator-row .tabulator-cell .tabulator-data-tree-branch { - display: inline-block; - vertical-align: middle; - height: 9px; - width: 7px; - margin-top: -9px; - margin-right: 5px; - border-bottom-left-radius: 1px; - border-left: 2px solid #aaa; - border-bottom: 2px solid #aaa; -} - -.tabulator-row .tabulator-cell .tabulator-data-tree-control { - display: -ms-inline-flexbox; - display: inline-flex; - -ms-flex-pack: center; - justify-content: center; - -ms-flex-align: center; - align-items: center; - vertical-align: middle; - height: 11px; - width: 11px; - margin-right: 5px; - border: 1px solid #333; - border-radius: 2px; - background: rgba(0, 0, 0, 0.1); - overflow: hidden; -} - -.tabulator-row .tabulator-cell .tabulator-data-tree-control:hover { - cursor: pointer; - background: rgba(0, 0, 0, 0.2); -} - -.tabulator-row .tabulator-cell .tabulator-data-tree-control .tabulator-data-tree-control-collapse { - display: inline-block; - position: relative; - height: 7px; - width: 1px; - background: transparent; -} - -.tabulator-row .tabulator-cell .tabulator-data-tree-control .tabulator-data-tree-control-collapse:after { - position: absolute; - content: ""; - left: -3px; - top: 3px; - height: 1px; - width: 7px; - background: #333; -} - -.tabulator-row .tabulator-cell .tabulator-data-tree-control .tabulator-data-tree-control-expand { - display: inline-block; - position: relative; - height: 7px; - width: 1px; - background: #333; -} - -.tabulator-row .tabulator-cell .tabulator-data-tree-control .tabulator-data-tree-control-expand:after { - position: absolute; - content: ""; - left: -3px; - top: 3px; - height: 1px; - width: 7px; - background: #333; -} - -.tabulator-row .tabulator-cell .tabulator-responsive-collapse-toggle { - display: -ms-inline-flexbox; - display: inline-flex; - -ms-flex-align: center; - align-items: center; - -ms-flex-pack: center; - justify-content: center; - -moz-user-select: none; - -khtml-user-select: none; - -webkit-user-select: none; - -o-user-select: none; - height: 15px; - width: 15px; - border-radius: 20px; - background: #666; - color: #fff; - font-weight: bold; - font-size: 1.1em; -} - -.tabulator-row .tabulator-cell .tabulator-responsive-collapse-toggle:hover { - opacity: .7; -} - -.tabulator-row .tabulator-cell .tabulator-responsive-collapse-toggle.open .tabulator-responsive-collapse-toggle-close { - display: initial; -} - -.tabulator-row .tabulator-cell .tabulator-responsive-collapse-toggle.open .tabulator-responsive-collapse-toggle-open { - display: none; -} - -.tabulator-row .tabulator-cell .tabulator-responsive-collapse-toggle .tabulator-responsive-collapse-toggle-close { - display: none; -} - -.tabulator-row.tabulator-group { - box-sizing: border-box; - border-bottom: 1px solid #999; - border-right: 1px solid #aaa; - border-top: 1px solid #999; - padding: 5px; - padding-left: 10px; - background: #ccc; - font-weight: bold; - min-width: 100%; -} - -.tabulator-row.tabulator-group:hover { - cursor: pointer; - background-color: rgba(0, 0, 0, 0.1); -} - -.tabulator-row.tabulator-group.tabulator-group-visible .tabulator-arrow { - margin-right: 10px; - border-left: 6px solid transparent; - border-right: 6px solid transparent; - border-top: 6px solid #666; - border-bottom: 0; -} - -.tabulator-row.tabulator-group.tabulator-group-level-1 .tabulator-arrow { - margin-left: 20px; -} - -.tabulator-row.tabulator-group.tabulator-group-level-2 .tabulator-arrow { - margin-left: 40px; -} - -.tabulator-row.tabulator-group.tabulator-group-level-3 .tabulator-arrow { - margin-left: 60px; -} - -.tabulator-row.tabulator-group.tabulator-group-level-4 .tabulator-arrow { - margin-left: 80px; -} - -.tabulator-row.tabulator-group.tabulator-group-level-5 .tabulator-arrow { - margin-left: 100px; -} - -.tabulator-row.tabulator-group .tabulator-arrow { - display: inline-block; - width: 0; - height: 0; - margin-right: 16px; - border-top: 6px solid transparent; - border-bottom: 6px solid transparent; - border-right: 0; - border-left: 6px solid #666; - vertical-align: middle; -} - -.tabulator-row.tabulator-group span { - margin-left: 10px; - color: #d00; -} - -.tabulator-edit-select-list { - position: absolute; - display: inline-block; - box-sizing: border-box; - max-height: 200px; - background: #fff; - border: 1px solid #aaa; - font-size: 14px; - overflow-y: auto; - -webkit-overflow-scrolling: touch; - z-index: 10000; -} - -.tabulator-edit-select-list .tabulator-edit-select-list-item { - padding: 4px; - color: #333; -} - -.tabulator-edit-select-list .tabulator-edit-select-list-item.active { - color: #fff; - background: #1D68CD; -} - -.tabulator-edit-select-list .tabulator-edit-select-list-item:hover { - cursor: pointer; - color: #fff; - background: #1D68CD; -} - -.tabulator-edit-select-list .tabulator-edit-select-list-group { - border-bottom: 1px solid #aaa; - padding: 4px; - padding-top: 6px; - color: #333; - font-weight: bold; -} diff --git a/Gems/AssetMemoryAnalyzer/External/tabulator-master/dist/css/tabulator.min.css b/Gems/AssetMemoryAnalyzer/External/tabulator-master/dist/css/tabulator.min.css deleted file mode 100644 index a8616f5142..0000000000 --- a/Gems/AssetMemoryAnalyzer/External/tabulator-master/dist/css/tabulator.min.css +++ /dev/null @@ -1,3 +0,0 @@ -/* Tabulator v4.1.2 (c) Oliver Folkerd */ -.tabulator{position:relative;border:1px solid #999;background-color:#888;font-size:14px;text-align:left;overflow:hidden;transform:translatez(0)}.tabulator[tabulator-layout=fitDataFill] .tabulator-tableHolder .tabulator-table{min-width:100%}.tabulator.tabulator-block-select{-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}.tabulator .tabulator-header{position:relative;box-sizing:border-box;width:100%;border-bottom:1px solid #999;background-color:#e6e6e6;color:#555;font-weight:700;white-space:nowrap;overflow:hidden;-moz-user-select:none;-khtml-user-select:none;-webkit-user-select:none;-o-user-select:none}.tabulator .tabulator-header .tabulator-col{display:inline-block;position:relative;box-sizing:border-box;border-right:1px solid #aaa;background:#e6e6e6;text-align:left;vertical-align:bottom;overflow:hidden}.tabulator .tabulator-header .tabulator-col.tabulator-moving{position:absolute;border:1px solid #999;background:#cdcdcd;pointer-events:none}.tabulator .tabulator-header .tabulator-col .tabulator-col-content{box-sizing:border-box;position:relative;padding:4px}.tabulator .tabulator-header .tabulator-col .tabulator-col-content .tabulator-col-title{box-sizing:border-box;width:100%;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;vertical-align:bottom}.tabulator .tabulator-header .tabulator-col .tabulator-col-content .tabulator-col-title .tabulator-title-editor{box-sizing:border-box;width:100%;border:1px solid #999;padding:1px;background:#fff}.tabulator .tabulator-header .tabulator-col .tabulator-col-content .tabulator-arrow{display:inline-block;position:absolute;top:9px;right:8px;width:0;height:0;border-left:6px solid transparent;border-right:6px solid transparent;border-bottom:6px solid #bbb}.tabulator .tabulator-header .tabulator-col.tabulator-col-group .tabulator-col-group-cols{position:relative;display:-ms-flexbox;display:flex;border-top:1px solid #aaa;overflow:hidden}.tabulator .tabulator-header .tabulator-col.tabulator-col-group .tabulator-col-group-cols .tabulator-col:last-child{margin-right:-1px}.tabulator .tabulator-header .tabulator-col:first-child .tabulator-col-resize-handle.prev{display:none}.tabulator .tabulator-header .tabulator-col.ui-sortable-helper{position:absolute;background-color:#e6e6e6!important;border:1px solid #aaa}.tabulator .tabulator-header .tabulator-col .tabulator-header-filter{position:relative;box-sizing:border-box;margin-top:2px;width:100%;text-align:center}.tabulator .tabulator-header .tabulator-col .tabulator-header-filter textarea{height:auto!important}.tabulator .tabulator-header .tabulator-col .tabulator-header-filter svg{margin-top:3px}.tabulator .tabulator-header .tabulator-col .tabulator-header-filter input::-ms-clear{width:0;height:0}.tabulator .tabulator-header .tabulator-col.tabulator-sortable .tabulator-col-title{padding-right:25px}.tabulator .tabulator-header .tabulator-col.tabulator-sortable:hover{cursor:pointer;background-color:#cdcdcd}.tabulator .tabulator-header .tabulator-col.tabulator-sortable[aria-sort=none] .tabulator-col-content .tabulator-arrow{border-top:none;border-bottom:6px solid #bbb}.tabulator .tabulator-header .tabulator-col.tabulator-sortable[aria-sort=asc] .tabulator-col-content .tabulator-arrow{border-top:none;border-bottom:6px solid #666}.tabulator .tabulator-header .tabulator-col.tabulator-sortable[aria-sort=desc] .tabulator-col-content .tabulator-arrow{border-top:6px solid #666;border-bottom:none}.tabulator .tabulator-header .tabulator-col.tabulator-col-vertical .tabulator-col-content .tabulator-col-title{-webkit-writing-mode:vertical-rl;-ms-writing-mode:tb-rl;writing-mode:vertical-rl;text-orientation:mixed;display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;-ms-flex-pack:center;justify-content:center}.tabulator .tabulator-header .tabulator-col.tabulator-col-vertical.tabulator-col-vertical-flip .tabulator-col-title{transform:rotate(180deg)}.tabulator .tabulator-header .tabulator-col.tabulator-col-vertical.tabulator-sortable .tabulator-col-title{padding-right:0;padding-top:20px}.tabulator .tabulator-header .tabulator-col.tabulator-col-vertical.tabulator-sortable.tabulator-col-vertical-flip .tabulator-col-title{padding-right:0;padding-bottom:20px}.tabulator .tabulator-header .tabulator-col.tabulator-col-vertical.tabulator-sortable .tabulator-arrow{right:calc(50% - 6px)}.tabulator .tabulator-header .tabulator-frozen{display:inline-block;position:absolute;z-index:1}.tabulator .tabulator-header .tabulator-frozen.tabulator-frozen-left{border-right:2px solid #aaa}.tabulator .tabulator-header .tabulator-frozen.tabulator-frozen-right{border-left:2px solid #aaa}.tabulator .tabulator-header .tabulator-calcs-holder{box-sizing:border-box;min-width:400%;background:#f3f3f3!important;border-top:1px solid #aaa;border-bottom:1px solid #aaa;overflow:hidden}.tabulator .tabulator-header .tabulator-calcs-holder .tabulator-row{background:#f3f3f3!important}.tabulator .tabulator-header .tabulator-calcs-holder .tabulator-row .tabulator-col-resize-handle{display:none}.tabulator .tabulator-header .tabulator-frozen-rows-holder{min-width:400%}.tabulator .tabulator-header .tabulator-frozen-rows-holder:empty{display:none}.tabulator .tabulator-tableHolder{position:relative;width:100%;white-space:nowrap;overflow:auto;-webkit-overflow-scrolling:touch}.tabulator .tabulator-tableHolder:focus{outline:none}.tabulator .tabulator-tableHolder .tabulator-placeholder{box-sizing:border-box;display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;width:100%}.tabulator .tabulator-tableHolder .tabulator-placeholder[tabulator-render-mode=virtual]{position:absolute;top:0;left:0;height:100%}.tabulator .tabulator-tableHolder .tabulator-placeholder span{display:inline-block;margin:0 auto;padding:10px;color:#ccc;font-weight:700;font-size:20px}.tabulator .tabulator-tableHolder .tabulator-table{position:relative;display:inline-block;background-color:#fff;white-space:nowrap;overflow:visible;color:#333}.tabulator .tabulator-tableHolder .tabulator-table .tabulator-row.tabulator-calcs{font-weight:700;background:#e2e2e2!important}.tabulator .tabulator-tableHolder .tabulator-table .tabulator-row.tabulator-calcs.tabulator-calcs-top{border-bottom:2px solid #aaa}.tabulator .tabulator-tableHolder .tabulator-table .tabulator-row.tabulator-calcs.tabulator-calcs-bottom{border-top:2px solid #aaa}.tabulator .tabulator-footer{padding:5px 10px;border-top:1px solid #999;background-color:#e6e6e6;text-align:right;color:#555;font-weight:700;white-space:nowrap;-ms-user-select:none;user-select:none;-moz-user-select:none;-khtml-user-select:none;-webkit-user-select:none;-o-user-select:none}.tabulator .tabulator-footer .tabulator-calcs-holder{box-sizing:border-box;width:calc(100% + 20px);margin:-5px -10px 5px;text-align:left;background:#f3f3f3!important;border-bottom:1px solid #aaa;border-top:1px solid #aaa;overflow:hidden}.tabulator .tabulator-footer .tabulator-calcs-holder .tabulator-row{background:#f3f3f3!important}.tabulator .tabulator-footer .tabulator-calcs-holder .tabulator-row .tabulator-col-resize-handle{display:none}.tabulator .tabulator-footer .tabulator-calcs-holder:only-child{margin-bottom:-5px;border-bottom:none}.tabulator .tabulator-footer .tabulator-pages{margin:0 7px}.tabulator .tabulator-footer .tabulator-page{display:inline-block;margin:0 2px;padding:2px 5px;border:1px solid #aaa;border-radius:3px;background:hsla(0,0%,100%,.2);color:#555;font-family:inherit;font-weight:inherit;font-size:inherit}.tabulator .tabulator-footer .tabulator-page.active{color:#d00}.tabulator .tabulator-footer .tabulator-page:disabled{opacity:.5}.tabulator .tabulator-footer .tabulator-page:not(.disabled):hover{cursor:pointer;background:rgba(0,0,0,.2);color:#fff}.tabulator .tabulator-col-resize-handle{position:absolute;right:0;top:0;bottom:0;width:5px}.tabulator .tabulator-col-resize-handle.prev{left:0;right:auto}.tabulator .tabulator-col-resize-handle:hover{cursor:ew-resize}.tabulator .tabulator-loader{position:absolute;display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;top:0;left:0;z-index:3;height:100%;width:100%;background:rgba(0,0,0,.4);text-align:center}.tabulator .tabulator-loader .tabulator-loader-msg{display:inline-block;margin:0 auto;padding:10px 20px;border-radius:10px;background:#fff;font-weight:700;font-size:16px}.tabulator .tabulator-loader .tabulator-loader-msg.tabulator-loading{border:4px solid #333;color:#000}.tabulator .tabulator-loader .tabulator-loader-msg.tabulator-error{border:4px solid #d00;color:#590000}.tabulator-row{position:relative;box-sizing:border-box;min-height:22px;background-color:#fff}.tabulator-row.tabulator-row-even{background-color:#efefef}.tabulator-row.tabulator-selectable:hover{background-color:#bbb;cursor:pointer}.tabulator-row.tabulator-selected{background-color:#9abcea}.tabulator-row.tabulator-selected:hover{background-color:#769bcc;cursor:pointer}.tabulator-row.tabulator-row-moving{border:1px solid #000;background:#fff}.tabulator-row.tabulator-moving{position:absolute;border-top:1px solid #aaa;border-bottom:1px solid #aaa;pointer-events:none;z-index:2}.tabulator-row .tabulator-row-resize-handle{position:absolute;right:0;bottom:0;left:0;height:5px}.tabulator-row .tabulator-row-resize-handle.prev{top:0;bottom:auto}.tabulator-row .tabulator-row-resize-handle:hover{cursor:ns-resize}.tabulator-row .tabulator-frozen{display:inline-block;position:absolute;background-color:inherit;z-index:1}.tabulator-row .tabulator-frozen.tabulator-frozen-left{border-right:2px solid #aaa}.tabulator-row .tabulator-frozen.tabulator-frozen-right{border-left:2px solid #aaa}.tabulator-row .tabulator-responsive-collapse{box-sizing:border-box;padding:5px;border-top:1px solid #aaa;border-bottom:1px solid #aaa}.tabulator-row .tabulator-responsive-collapse:empty{display:none}.tabulator-row .tabulator-responsive-collapse table{font-size:14px}.tabulator-row .tabulator-responsive-collapse table tr td{position:relative}.tabulator-row .tabulator-responsive-collapse table tr td:first-of-type{padding-right:10px}.tabulator-row .tabulator-cell{display:inline-block;position:relative;box-sizing:border-box;padding:4px;border-right:1px solid #aaa;vertical-align:middle;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.tabulator-row .tabulator-cell.tabulator-editing{border:1px solid #1d68cd;padding:0}.tabulator-row .tabulator-cell.tabulator-editing input,.tabulator-row .tabulator-cell.tabulator-editing select{border:1px;background:transparent}.tabulator-row .tabulator-cell.tabulator-validation-fail{border:1px solid #d00}.tabulator-row .tabulator-cell.tabulator-validation-fail input,.tabulator-row .tabulator-cell.tabulator-validation-fail select{border:1px;background:transparent;color:#d00}.tabulator-row .tabulator-cell:first-child .tabulator-col-resize-handle.prev{display:none}.tabulator-row .tabulator-cell.tabulator-row-handle{display:-ms-inline-flexbox;display:inline-flex;-ms-flex-align:center;align-items:center;-ms-flex-pack:center;justify-content:center;-moz-user-select:none;-khtml-user-select:none;-webkit-user-select:none;-o-user-select:none}.tabulator-row .tabulator-cell.tabulator-row-handle .tabulator-row-handle-box{width:80%}.tabulator-row .tabulator-cell.tabulator-row-handle .tabulator-row-handle-box .tabulator-row-handle-bar{width:100%;height:3px;margin-top:2px;background:#666}.tabulator-row .tabulator-cell .tabulator-data-tree-branch{display:inline-block;vertical-align:middle;height:9px;width:7px;margin-top:-9px;margin-right:5px;border-bottom-left-radius:1px;border-left:2px solid #aaa;border-bottom:2px solid #aaa}.tabulator-row .tabulator-cell .tabulator-data-tree-control{display:-ms-inline-flexbox;display:inline-flex;-ms-flex-pack:center;justify-content:center;-ms-flex-align:center;align-items:center;vertical-align:middle;height:11px;width:11px;margin-right:5px;border:1px solid #333;border-radius:2px;background:rgba(0,0,0,.1);overflow:hidden}.tabulator-row .tabulator-cell .tabulator-data-tree-control:hover{cursor:pointer;background:rgba(0,0,0,.2)}.tabulator-row .tabulator-cell .tabulator-data-tree-control .tabulator-data-tree-control-collapse{display:inline-block;position:relative;height:7px;width:1px;background:transparent}.tabulator-row .tabulator-cell .tabulator-data-tree-control .tabulator-data-tree-control-collapse:after{position:absolute;content:"";left:-3px;top:3px;height:1px;width:7px;background:#333}.tabulator-row .tabulator-cell .tabulator-data-tree-control .tabulator-data-tree-control-expand{display:inline-block;position:relative;height:7px;width:1px;background:#333}.tabulator-row .tabulator-cell .tabulator-data-tree-control .tabulator-data-tree-control-expand:after{position:absolute;content:"";left:-3px;top:3px;height:1px;width:7px;background:#333}.tabulator-row .tabulator-cell .tabulator-responsive-collapse-toggle{display:-ms-inline-flexbox;display:inline-flex;-ms-flex-align:center;align-items:center;-ms-flex-pack:center;justify-content:center;-moz-user-select:none;-khtml-user-select:none;-webkit-user-select:none;-o-user-select:none;height:15px;width:15px;border-radius:20px;background:#666;color:#fff;font-weight:700;font-size:1.1em}.tabulator-row .tabulator-cell .tabulator-responsive-collapse-toggle:hover{opacity:.7}.tabulator-row .tabulator-cell .tabulator-responsive-collapse-toggle.open .tabulator-responsive-collapse-toggle-close{display:initial}.tabulator-row .tabulator-cell .tabulator-responsive-collapse-toggle.open .tabulator-responsive-collapse-toggle-open,.tabulator-row .tabulator-cell .tabulator-responsive-collapse-toggle .tabulator-responsive-collapse-toggle-close{display:none}.tabulator-row.tabulator-group{box-sizing:border-box;border-bottom:1px solid #999;border-right:1px solid #aaa;border-top:1px solid #999;padding:5px;padding-left:10px;background:#ccc;font-weight:700;min-width:100%}.tabulator-row.tabulator-group:hover{cursor:pointer;background-color:rgba(0,0,0,.1)}.tabulator-row.tabulator-group.tabulator-group-visible .tabulator-arrow{margin-right:10px;border-left:6px solid transparent;border-right:6px solid transparent;border-top:6px solid #666;border-bottom:0}.tabulator-row.tabulator-group.tabulator-group-level-1 .tabulator-arrow{margin-left:20px}.tabulator-row.tabulator-group.tabulator-group-level-2 .tabulator-arrow{margin-left:40px}.tabulator-row.tabulator-group.tabulator-group-level-3 .tabulator-arrow{margin-left:60px}.tabulator-row.tabulator-group.tabulator-group-level-4 .tabulator-arrow{margin-left:80px}.tabulator-row.tabulator-group.tabulator-group-level-5 .tabulator-arrow{margin-left:100px}.tabulator-row.tabulator-group .tabulator-arrow{display:inline-block;width:0;height:0;margin-right:16px;border-top:6px solid transparent;border-bottom:6px solid transparent;border-right:0;border-left:6px solid #666;vertical-align:middle}.tabulator-row.tabulator-group span{margin-left:10px;color:#d00}.tabulator-edit-select-list{position:absolute;display:inline-block;box-sizing:border-box;max-height:200px;background:#fff;border:1px solid #aaa;font-size:14px;overflow-y:auto;-webkit-overflow-scrolling:touch;z-index:4}.tabulator-edit-select-list .tabulator-edit-select-list-item{padding:4px;color:#333}.tabulator-edit-select-list .tabulator-edit-select-list-item.active{color:#fff;background:#1d68cd}.tabulator-edit-select-list .tabulator-edit-select-list-item:hover{cursor:pointer;color:#fff;background:#1d68cd}.tabulator-edit-select-list .tabulator-edit-select-list-group{border-bottom:1px solid #aaa;padding:4px;padding-top:6px;color:#333;font-weight:700} -/*# sourceMappingURL=tabulator.min.css.map */ diff --git a/Gems/AssetMemoryAnalyzer/External/tabulator-master/dist/css/tabulator.min.css.map b/Gems/AssetMemoryAnalyzer/External/tabulator-master/dist/css/tabulator.min.css.map deleted file mode 100644 index 825baa6e12..0000000000 --- a/Gems/AssetMemoryAnalyzer/External/tabulator-master/dist/css/tabulator.min.css.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"sources":["tabulator.scss"],"names":[],"mappings":"AA0CA,WACC,kBAAkB,AAElB,sBAxCgB,AA0ChB,sBA3CqB,AA6CrB,eA3Ca,AA4Cb,gBAAgB,AAChB,gBAAe,AAMf,uBAAwB,CAqexB,AApfD,iFAoBI,cAAc,CACd,AArBJ,kCA0BE,yBAAiB,AAAjB,sBAAiB,AAAjB,qBAAiB,AAAjB,gBAAiB,CACjB,AA3BF,6BA+BE,kBAAiB,AACjB,sBAAsB,AAEtB,WAAU,AAEV,6BAlEwB,AAmExB,yBAtE4B,AAuE5B,WAtEmB,AAuEnB,gBAAgB,AAEhB,mBAAmB,AACnB,gBAAe,AAEf,sBAAsB,AACtB,wBAAwB,AACxB,yBAAyB,AACzB,mBAAoB,CA8OpB,AA7RF,4CAmDG,qBAAoB,AACpB,kBAAiB,AACjB,sBAAqB,AACrB,4BArFoB,AAsFpB,mBAxF2B,AAyF3B,gBAAe,AACf,sBAAsB,AACtB,eAAgB,CAoLhB,AA9OH,6DA6DI,kBAAkB,AAClB,sBA5FsB,AA6FtB,mBAA8C,AAC9C,mBAAoB,CACpB,AAjEJ,mEAqEI,sBAAqB,AACrB,kBAAkB,AAClB,WAAW,CAsCX,AA7GJ,wFA2EK,sBAAqB,AACrB,WAAW,AAEX,mBAAmB,AACnB,gBAAgB,AAChB,uBAAuB,AACvB,qBAAqB,CAarB,AA9FL,gHAqFM,sBAAsB,AACtB,WAAW,AAEX,sBAAqB,AAErB,YAAW,AAEX,eAAgB,CAChB,AA7FN,oFAkGK,qBAAqB,AACrB,kBAAkB,AAClB,QAAO,AACP,UAAS,AACT,QAAQ,AACR,SAAS,AACT,kCAAkC,AAClC,mCAAmC,AACnC,4BAnImB,CAoInB,AA3GL,0FAoHK,kBAAiB,AACjB,oBAAa,AAAb,aAAa,AAEb,0BAtJkB,AAuJlB,eAAgB,CAKhB,AA7HL,oHA2HM,iBAAiB,CACjB,AA5HN,0FAmIK,YAAa,CACb,AApIL,+DAyII,kBAAkB,AAClB,mCAAmD,AACnD,qBA1KmB,CA2KnB,AA5IJ,qEAgJI,kBAAkB,AAClB,sBAAsB,AACtB,eAAc,AACd,WAAU,AACV,iBAAkB,CAiBlB,AArKJ,8EAwJK,qBAAsB,CACtB,AAzJL,yEA4JK,cAAe,CACf,AA7JL,sFAiKM,QAAS,AACT,QAAS,CACT,AAnKN,oFA0KK,kBAAkB,CAClB,AA3KL,qEA8KK,eAAc,AACd,wBAAoD,CACpD,AAhLL,uHAoLM,gBAAgB,AAChB,4BA9MkB,CA+MlB,AAtLN,sHA2LM,gBAAgB,AAChB,4BAtNgB,CAuNhB,AA7LN,uHAkMM,0BA5NgB,AA6NhB,kBAAmB,CACnB,AApMN,+GA4MM,iCAAyB,AAAzB,uBAAyB,AAAzB,yBAAyB,AACzB,uBAAuB,AAEvB,oBAAY,AAAZ,aAAY,AACZ,sBAAkB,AAAlB,mBAAkB,AAClB,qBAAsB,AAAtB,sBAAsB,CACtB,AAlNN,oHAuNM,wBAAyB,CACzB,AAxNN,2GA6NM,gBAAe,AACf,gBAAgB,CAChB,AA/NN,uIAmOO,gBAAe,AACf,mBAAmB,CACnB,AArOP,uGA0OM,qBAAqB,CACrB,AA3ON,+CAiPG,qBAAqB,AACrB,kBAAkB,AAIlB,SAAW,CASX,AA/PH,qEAyPI,2BA7QgB,CA8QhB,AA1PJ,sEA6PI,0BAjRgB,CAkRhB,AA9PJ,qDAmQG,sBAAqB,AACrB,eAAc,AAEd,6BAAyD,AAUzD,0BApSiB,AAqSjB,6BAhToB,AAkTpB,eAAgB,CAChB,AApRH,oEAyQI,4BAAyD,CAKzD,AA9QJ,iGA4QK,YAAa,CACb,AA7QL,2DAuRG,cAAc,CAKd,AA5RH,iEA0RI,YAAa,CACb,AA3RJ,kCAiSE,kBAAiB,AACjB,WAAU,AACV,mBAAmB,AACnB,cAAa,AACb,gCAAiC,CA2DjC,AAhWF,wCAwSG,YAAa,CACb,AAzSH,yDA6SG,sBAAqB,AACrB,oBAAa,AAAb,aAAa,AACb,sBAAkB,AAAlB,mBAAkB,AASlB,UAAU,CAYV,AApUH,wFAkTI,kBAAkB,AAClB,MAAK,AACL,OAAM,AACN,WAAW,CACX,AAtTJ,8DA2TI,qBAAqB,AAErB,cAAa,AACb,aAAY,AAEZ,WAAU,AACV,gBAAiB,AACjB,cAAe,CACf,AAnUJ,mDAwUG,kBAAiB,AACjB,qBAAoB,AACpB,sBAhWqB,AAiWrB,mBAAmB,AACnB,iBAAgB,AAChB,UAhWe,CAkXf,AA/VH,kFAkVK,gBAAiB,AACjB,4BAAwD,CASxD,AA5VL,sGAsVM,4BA1Wc,CA2Wd,AAvVN,yGA0VM,yBA9Wc,CA+Wd,AA3VN,6BAsWE,iBAAgB,AAChB,0BA7WwB,AA8WxB,yBAjX4B,AAkX5B,iBAAiB,AACjB,WAlXmB,AAmXnB,gBAAgB,AAChB,mBAAkB,AAClB,qBAAgB,AAAhB,iBAAgB,AAEhB,sBAAsB,AACtB,wBAAwB,AACxB,yBAAyB,AACzB,mBAAoB,CAoEpB,AAtbF,qDAqXG,sBAAqB,AACrB,wBAAuB,AACvB,sBAA2B,AAE3B,gBAAgB,AAEhB,6BAAyD,AAUzD,6BAzZiB,AA0ZjB,0BA1ZiB,AA4ZjB,eAAgB,CAMhB,AA9YH,oEA8XI,4BAAyD,CAKzD,AAnYJ,iGAiYK,YAAa,CACb,AAlYL,gEA2YI,mBAAkB,AAClB,kBAAkB,CAClB,AA7YJ,8CAkZG,YAAY,CACZ,AAnZH,6CAuZG,qBAAoB,AAEpB,aAAY,AACZ,gBAAe,AAEf,sBAnaoB,AAoapB,kBAAiB,AAEjB,8BAA+B,AAE/B,WAzakB,AA0alB,oBAAmB,AACnB,oBAAmB,AACnB,iBAAiB,CAiBjB,AArbH,oDAuaI,UA5amB,CA6anB,AAxaJ,sDA2aI,UAAU,CACV,AA5aJ,kEAgbK,eAAc,AACd,0BAAyB,AACzB,UAAU,CACV,AAnbL,wCA0bE,kBAAiB,AACjB,QAAO,AACP,MAAK,AACL,SAAQ,AACR,SAAS,CAUT,AAxcF,6CAicG,OAAM,AACN,UAAU,CACV,AAncH,8CAscG,gBAAgB,CAChB,AAvcH,6BA6cE,kBAAiB,AACjB,oBAAa,AAAb,aAAa,AACb,sBAAkB,AAAlB,mBAAkB,AAElB,MAAK,AACL,OAAM,AACN,UAAW,AAEX,YAAW,AACX,WAAU,AACV,0BAAyB,AACzB,iBAAiB,CA2BjB,AAnfF,mDA4dG,qBAAoB,AAEpB,cAAa,AACb,kBAAiB,AAEjB,mBAAkB,AAElB,gBAAe,AACf,gBAAgB,AAChB,cAAc,CAad,AAlfH,qEAyeI,sBAAqB,AACrB,UAAU,CACV,AA3eJ,mEA+eI,sBAAqB,AACrB,aAAa,CACb,AAMJ,eACC,kBAAkB,AAClB,sBAAsB,AACtB,gBAA0C,AAC1C,qBAjhBuB,CAg4BvB,AAnXD,kCAQE,wBAphB4B,CAqhB5B,AATF,0CAYE,sBArhBsB,AAshBtB,cAAe,CACf,AAdF,kCAiBE,wBAxhB6B,CAyhB7B,AAlBF,wCAqBE,yBA3hBkC,AA4hBlC,cAAe,CACf,AAvBF,oCA0BE,sBAAqB,AACrB,eAAe,CACf,AA5BF,gCA+BE,kBAAkB,AAElB,0BA5iBkB,AA6iBlB,6BA7iBkB,AA+iBlB,oBAAoB,AACpB,SAAU,CACV,AAtCF,4CA0CE,kBAAiB,AACjB,QAAO,AACP,SAAQ,AACR,OAAM,AACN,UAAU,CAUV,AAxDF,iDAiDG,MAAK,AACL,WAAW,CACX,AAnDH,kDAsDG,gBAAgB,CAChB,AAvDH,iCA2DE,qBAAqB,AACrB,kBAAkB,AAElB,yBAAyB,AAEzB,SAAW,CASX,AAzEF,uDAmEG,2BA9kBiB,CA+kBjB,AApEH,wDAuEG,0BAllBiB,CAmlBjB,AAxEH,8CA4EE,sBAAqB,AAErB,YAAW,AAEX,0BA3lBkB,AA4lBlB,4BA5lBkB,CA+mBlB,AApGF,oDAoFG,YAAY,CACZ,AArFH,oDAwFG,cAnnBW,CA8nBX,AAnGH,0DA4FK,iBAAkB,CAKlB,AAjGL,wEA+FM,kBAAkB,CAClB,AAhGN,+BAwGE,qBAAoB,AACpB,kBAAkB,AAClB,sBAAqB,AACrB,YAAW,AACX,4BAvnBkB,AAwnBlB,sBAAqB,AACrB,mBAAkB,AAClB,gBAAe,AACf,sBAAsB,CAkLtB,AAlSF,iDAoHG,yBAxnBkB,AAynBlB,SAAU,CAMV,AA3HH,+GAwHI,WAAU,AACV,sBAAsB,CACtB,AA1HJ,yDA8HG,qBAjoBgB,CAwoBhB,AArIH,+HAgII,WAAU,AACV,uBAAsB,AAEtB,UAtoBe,CAuoBf,AApIJ,6EA0II,YAAa,CACb,AA3IJ,oDAgJG,2BAAoB,AAApB,oBAAoB,AACpB,sBAAkB,AAAlB,mBAAkB,AAClB,qBAAsB,AAAtB,uBAAsB,AAEtB,sBAAsB,AACtB,wBAAwB,AACxB,yBAAyB,AACzB,mBAAoB,CAcpB,AArKH,8EA2JI,SAAS,CAST,AApKJ,wGA+JK,WAAU,AACV,WAAU,AACV,eAAc,AACd,eAAe,CACf,AAnKL,2DAwKG,qBAAoB,AACpB,sBAAqB,AAErB,WAAU,AACV,UAAS,AAET,gBAAe,AACf,iBAAgB,AAEhB,8BAA6B,AAE7B,2BA9rBiB,AA+rBjB,4BA/rBiB,CAgsBjB,AArLH,4DAyLG,2BAAmB,AAAnB,oBAAmB,AACnB,qBAAsB,AAAtB,uBAAsB,AACtB,sBAAkB,AAAlB,mBAAkB,AAClB,sBAAqB,AAErB,YAAW,AACX,WAAU,AAEV,iBAAgB,AAEhB,sBA7sBe,AA8sBf,kBAAiB,AACjB,0BAA4B,AAE5B,eAAe,CAmDf,AA1PH,kEA0MI,eAAc,AACd,yBAA4B,CAC5B,AA5MJ,kGA+MI,qBAAoB,AACpB,kBAAkB,AAElB,WAAW,AACX,UAAU,AAEV,sBAAuB,CAavB,AAlOJ,wGAwNK,kBAAkB,AAClB,WAAW,AACX,UAAU,AACV,QAAQ,AAER,WAAW,AACX,UAAU,AAEV,eA1uBa,CA2uBb,AAjOL,gGAqOI,qBAAoB,AACpB,kBAAkB,AAElB,WAAW,AACX,UAAU,AAEV,eArvBc,CAkwBd,AAxPJ,sGA8OK,kBAAkB,AAClB,WAAW,AACX,UAAU,AACV,QAAQ,AAER,WAAW,AACX,UAAU,AAEV,eAhwBa,CAiwBb,AAvPL,qEA6PG,2BAAoB,AAApB,oBAAoB,AACpB,sBAAkB,AAAlB,mBAAkB,AAClB,qBAAsB,AAAtB,uBAAsB,AAEtB,sBAAsB,AACtB,wBAAwB,AACxB,yBAAyB,AACzB,oBAAoB,AAEpB,YAAW,AACX,WAAU,AAEV,mBAAkB,AAClB,gBAAe,AAEf,WAzxBqB,AA0xBrB,gBAAgB,AAChB,eAAe,CAmBf,AAjSH,2EAiRI,UAAU,CACV,AAlRJ,sHAsRK,eAAe,CACf,AAvRL,sOA+RI,YAAY,CACZ,AAhSJ,+BAsSE,sBAAqB,AACrB,6BAA4B,AAC5B,4BAnzBkB,AAozBlB,0BAAyB,AACzB,YAAW,AACX,kBAAiB,AACjB,gBAAe,AACf,gBAAgB,AAEhB,cAAe,CAkEf,AAjXF,qCAkTG,eAAc,AACd,+BAA+B,CAC/B,AApTH,wEAyTI,kBAAiB,AACjB,kCAAkC,AAClC,mCAAmC,AACnC,0BA70BkB,AA80BlB,eAAgB,CAChB,AA9TJ,wEAoUI,gBAAgB,CAChB,AArUJ,wEA0UI,gBAAgB,CAChB,AA3UJ,wEAgVI,gBAAgB,CAChB,AAjVJ,wEAsVI,gBAAgB,CAChB,AAvVJ,wEA4VI,iBAAiB,CACjB,AA7VJ,gDAkWG,qBAAqB,AACrB,QAAQ,AACR,SAAS,AACT,kBAAiB,AACjB,iCAAiC,AACjC,oCAAoC,AACpC,eAAe,AACf,2BA13BmB,AA23BnB,qBAAqB,CACrB,AA3WH,oCA8WG,iBAAgB,AAChB,UAAU,CACV,AAKH,4BACC,kBAAkB,AAClB,qBAAoB,AACpB,sBAAqB,AAErB,iBAAgB,AAEhB,gBAz4BuB,AA04BvB,sBAx4BmB,AA04BnB,eA15Ba,AA45Bb,gBAAe,AACf,iCAAiC,AAEjC,SAAc,CA6Bd,AA5CD,6DAkBE,YAAW,AAEX,UAn5BgB,CAg6BhB,AAjCF,oEAuBG,WAz5BqB,AA05BrB,kBAj5BkB,CAk5BlB,AAzBH,mEA4BG,eAAc,AAEd,WAh6BqB,AAi6BrB,kBAx5BkB,CAy5BlB,AAhCH,8DAoCE,6BAp6BkB,AAs6BlB,YAAW,AACX,gBAAe,AAEf,WAx6BgB,AAy6BhB,eAAgB,CAChB","file":"tabulator.min.css","sourcesContent":["/* Tabulator v4.1.2 (c) Oliver Folkerd */\n\n\r\n//Main Theme Variables\r\n$backgroundColor: #888 !default; //background color of tabulator\r\n$borderColor:#999 !default; //border to tabulator\r\n$textSize:14px !default; //table text size\r\n\r\n//header themeing\r\n$headerBackgroundColor:#e6e6e6 !default; //border to tabulator\r\n$headerTextColor:#555 !default; //header text colour\r\n$headerBorderColor:#aaa !default; //header border color\r\n$headerSeperatorColor:#999 !default; //header bottom seperator color\r\n$headerMargin:4px !default; //padding round header\r\n\r\n//column header arrows\r\n$sortArrowActive: #666 !default;\r\n$sortArrowInactive: #bbb !default;\r\n\r\n//row themeing\r\n$rowBackgroundColor:#fff !default; //table row background color\r\n$rowAltBackgroundColor:#EFEFEF !default; //table row background color\r\n$rowBorderColor:#aaa !default; //table border color\r\n$rowTextColor:#333 !default; //table text color\r\n$rowHoverBackground:#bbb !default; //row background color on hover\r\n\r\n$rowSelectedBackground: #9ABCEA !default; //row background color when selected\r\n$rowSelectedBackgroundHover: #769BCC !default;//row background color when selected and hovered\r\n\r\n$editBoxColor:#1D68CD !default; //border color for edit boxes\r\n$errorColor:#dd0000 !default; //error indication\r\n\r\n//footer themeing\r\n$footerBackgroundColor:#e6e6e6 !default; //border to tabulator\r\n$footerTextColor:#555 !default; //footer text colour\r\n$footerBorderColor:#aaa !default; //footer border color\r\n$footerSeperatorColor:#999 !default; //footer bottom seperator color\r\n$footerActiveColor:#d00 !default; //footer bottom active text color\r\n\r\n\r\n\r\n//Tabulator Containing Element\r\n.tabulator{\r\n\tposition: relative;\r\n\r\n\tborder: 1px solid $borderColor;\r\n\r\n\tbackground-color: $backgroundColor;\r\n\r\n\tfont-size:$textSize;\r\n\ttext-align: left;\r\n\toverflow:hidden;\r\n\r\n\t-webkit-transform: translatez(0);\r\n\t-moz-transform: translatez(0);\r\n\t-ms-transform: translatez(0);\r\n\t-o-transform: translatez(0);\r\n\ttransform: translatez(0);\r\n\r\n\t&[tabulator-layout=\"fitDataFill\"]{\r\n\t\t.tabulator-tableHolder{\r\n\t\t\t.tabulator-table{\r\n\t\t\t\tmin-width:100%;\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\r\n\t&.tabulator-block-select{\r\n\t\tuser-select: none;\r\n\t}\r\n\r\n\t//column header containing element\r\n\t.tabulator-header{\r\n\t\tposition:relative;\r\n\t\tbox-sizing: border-box;\r\n\r\n\t\twidth:100%;\r\n\r\n\t\tborder-bottom:1px solid $headerSeperatorColor;\r\n\t\tbackground-color: $headerBackgroundColor;\r\n\t\tcolor: $headerTextColor;\r\n\t\tfont-weight:bold;\r\n\r\n\t\twhite-space: nowrap;\r\n\t\toverflow:hidden;\r\n\r\n\t\t-moz-user-select: none;\r\n\t\t-khtml-user-select: none;\r\n\t\t-webkit-user-select: none;\r\n\t\t-o-user-select: none;\r\n\r\n\t\t//individual column header element\r\n\t\t.tabulator-col{\r\n\t\t\tdisplay:inline-block;\r\n\t\t\tposition:relative;\r\n\t\t\tbox-sizing:border-box;\r\n\t\t\tborder-right:1px solid $headerBorderColor;\r\n\t\t\tbackground:$headerBackgroundColor;\r\n\t\t\ttext-align:left;\r\n\t\t\tvertical-align: bottom;\r\n\t\t\toverflow: hidden;\r\n\r\n\t\t\t&.tabulator-moving{\r\n\t\t\t\tposition: absolute;\r\n\t\t\t\tborder:1px solid $headerSeperatorColor;\r\n\t\t\t\tbackground:darken($headerBackgroundColor, 10%);\r\n\t\t\t\tpointer-events: none;\r\n\t\t\t}\r\n\r\n\t\t\t//hold content of column header\r\n\t\t\t.tabulator-col-content{\r\n\t\t\t\tbox-sizing:border-box;\r\n\t\t\t\tposition: relative;\r\n\t\t\t\tpadding:4px;\r\n\r\n\t\t\t\t//hold title of column header\r\n\t\t\t\t.tabulator-col-title{\r\n\t\t\t\t\tbox-sizing:border-box;\r\n\t\t\t\t\twidth: 100%;\r\n\r\n\t\t\t\t\twhite-space: nowrap;\r\n\t\t\t\t\toverflow: hidden;\r\n\t\t\t\t\ttext-overflow: ellipsis;\r\n\t\t\t\t\tvertical-align:bottom;\r\n\r\n\t\t\t\t\t//element to hold title editor\r\n\t\t\t\t\t.tabulator-title-editor{\r\n\t\t\t\t\t\tbox-sizing: border-box;\r\n\t\t\t\t\t\twidth: 100%;\r\n\r\n\t\t\t\t\t\tborder:1px solid #999;\r\n\r\n\t\t\t\t\t\tpadding:1px;\r\n\r\n\t\t\t\t\t\tbackground: #fff;\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\r\n\t\t\t\t//column sorter arrow\r\n\t\t\t\t.tabulator-arrow{\r\n\t\t\t\t\tdisplay: inline-block;\r\n\t\t\t\t\tposition: absolute;\r\n\t\t\t\t\ttop:9px;\r\n\t\t\t\t\tright:8px;\r\n\t\t\t\t\twidth: 0;\r\n\t\t\t\t\theight: 0;\r\n\t\t\t\t\tborder-left: 6px solid transparent;\r\n\t\t\t\t\tborder-right: 6px solid transparent;\r\n\t\t\t\t\tborder-bottom: 6px solid $sortArrowInactive;\r\n\t\t\t\t}\r\n\r\n\t\t\t}\r\n\r\n\t\t\t//complex header column group\r\n\t\t\t&.tabulator-col-group{\r\n\r\n\t\t\t\t//gelement to hold sub columns in column group\r\n\t\t\t\t.tabulator-col-group-cols{\r\n\t\t\t\t\tposition:relative;\r\n\t\t\t\t\tdisplay: flex;\r\n\r\n\t\t\t\t\tborder-top:1px solid $headerBorderColor;\r\n\t\t\t\t\toverflow: hidden;\r\n\r\n\t\t\t\t\t.tabulator-col:last-child{\r\n\t\t\t\t\t\tmargin-right:-1px;\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t\t//hide left resize handle on first column\r\n\t\t\t&:first-child{\r\n\t\t\t\t.tabulator-col-resize-handle.prev{\r\n\t\t\t\t\tdisplay: none;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t\t//placeholder element for sortable columns\r\n\t\t\t&.ui-sortable-helper{\r\n\t\t\t\tposition: absolute;\r\n\t\t\t\tbackground-color: $headerBackgroundColor !important;\r\n\t\t\t\tborder:1px solid $headerBorderColor;\r\n\t\t\t}\r\n\r\n\t\t\t//header filter containing element\r\n\t\t\t.tabulator-header-filter{\r\n\t\t\t\tposition: relative;\r\n\t\t\t\tbox-sizing: border-box;\r\n\t\t\t\tmargin-top:2px;\r\n\t\t\t\twidth:100%;\r\n\t\t\t\ttext-align: center;\r\n\r\n\t\t\t\t//styling adjustment for inbuilt editors\r\n\t\t\t\ttextarea{\r\n\t\t\t\t\theight:auto !important;\r\n\t\t\t\t}\r\n\r\n\t\t\t\tsvg{\r\n\t\t\t\t\tmargin-top: 3px;\r\n\t\t\t\t}\r\n\r\n\t\t\t\tinput{\r\n\t\t\t\t\t&::-ms-clear {\r\n\t\t\t\t\t\twidth : 0;\r\n\t\t\t\t\t\theight: 0;\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t\t//styling child elements for sortable columns\r\n\t\t\t&.tabulator-sortable{\r\n\t\t\t\t.tabulator-col-title{\r\n\t\t\t\t\tpadding-right:25px;\r\n\t\t\t\t}\r\n\r\n\t\t\t\t&:hover{\r\n\t\t\t\t\tcursor:pointer;\r\n\t\t\t\t\tbackground-color:darken($headerBackgroundColor, 10%);\r\n\t\t\t\t}\r\n\r\n\t\t\t\t&[aria-sort=\"none\"]{\r\n\t\t\t\t\t.tabulator-col-content .tabulator-arrow{\r\n\t\t\t\t\t\tborder-top: none;\r\n\t\t\t\t\t\tborder-bottom: 6px solid $sortArrowInactive;\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\r\n\t\t\t\t&[aria-sort=\"asc\"]{\r\n\t\t\t\t\t.tabulator-col-content .tabulator-arrow{\r\n\t\t\t\t\t\tborder-top: none;\r\n\t\t\t\t\t\tborder-bottom: 6px solid $sortArrowActive;\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\r\n\t\t\t\t&[aria-sort=\"desc\"]{\r\n\t\t\t\t\t.tabulator-col-content .tabulator-arrow{\r\n\t\t\t\t\t\tborder-top: 6px solid $sortArrowActive;\r\n\t\t\t\t\t\tborder-bottom: none;\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\r\n\t\t\t&.tabulator-col-vertical{\r\n\t\t\t\t.tabulator-col-content{\r\n\t\t\t\t\t.tabulator-col-title{\r\n\t\t\t\t\t\twriting-mode: vertical-rl;\r\n\t\t\t\t\t\ttext-orientation: mixed;\r\n\r\n\t\t\t\t\t\tdisplay:flex;\r\n\t\t\t\t\t\talign-items:center;\r\n\t\t\t\t\t\tjustify-content:center;\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\r\n\t\t\t\t&.tabulator-col-vertical-flip{\r\n\t\t\t\t\t.tabulator-col-title{\r\n\t\t\t\t\t\ttransform: rotate(180deg);\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\r\n\t\t\t\t&.tabulator-sortable{\r\n\t\t\t\t\t.tabulator-col-title{\r\n\t\t\t\t\t\tpadding-right:0;\r\n\t\t\t\t\t\tpadding-top:20px;\r\n\t\t\t\t\t}\r\n\r\n\t\t\t\t\t&.tabulator-col-vertical-flip{\r\n\t\t\t\t\t\t.tabulator-col-title{\r\n\t\t\t\t\t\t\tpadding-right:0;\r\n\t\t\t\t\t\t\tpadding-bottom:20px;\r\n\t\t\t\t\t\t}\r\n\r\n\t\t\t\t\t}\r\n\r\n\t\t\t\t\t.tabulator-arrow{\r\n\t\t\t\t\t\tright:calc(50% - 6px);\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\t.tabulator-frozen{\r\n\t\t\tdisplay: inline-block;\r\n\t\t\tposition: absolute;\r\n\r\n\t\t\t// background-color: inherit;\r\n\r\n\t\t\tz-index: 10;\r\n\r\n\t\t\t&.tabulator-frozen-left{\r\n\t\t\t\tborder-right:2px solid $rowBorderColor;\r\n\t\t\t}\r\n\r\n\t\t\t&.tabulator-frozen-right{\r\n\t\t\t\tborder-left:2px solid $rowBorderColor;\r\n\t\t\t}\r\n\t\t}\r\n\r\n\r\n\t\t.tabulator-calcs-holder{\r\n\t\t\tbox-sizing:border-box;\r\n\t\t\tmin-width:400%;\r\n\r\n\t\t\tbackground:lighten($headerBackgroundColor, 5%) !important;\r\n\r\n\t\t\t.tabulator-row{\r\n\t\t\t\tbackground:lighten($headerBackgroundColor, 5%) !important;\r\n\r\n\t\t\t\t.tabulator-col-resize-handle{\r\n\t\t\t\t\tdisplay: none;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t\tborder-top:1px solid $rowBorderColor;\r\n\t\t\tborder-bottom:1px solid $headerBorderColor;\r\n\r\n\t\t\toverflow: hidden;\r\n\t\t}\r\n\r\n\t\t.tabulator-frozen-rows-holder{\r\n\t\t\tmin-width:400%;\r\n\r\n\t\t\t&:empty{\r\n\t\t\t\tdisplay: none;\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\r\n\t//scrolling element to hold table\r\n\t.tabulator-tableHolder{\r\n\t\tposition:relative;\r\n\t\twidth:100%;\r\n\t\twhite-space: nowrap;\r\n\t\toverflow:auto;\r\n\t\t-webkit-overflow-scrolling: touch;\r\n\r\n\t\t&:focus{\r\n\t\t\toutline: none;\r\n\t\t}\r\n\r\n\t\t//default placeholder element\r\n\t\t.tabulator-placeholder{\r\n\t\t\tbox-sizing:border-box;\r\n\t\t\tdisplay: flex;\r\n\t\t\talign-items:center;\r\n\r\n\t\t\t&[tabulator-render-mode=\"virtual\"]{\r\n\t\t\t\tposition: absolute;\r\n\t\t\t\ttop:0;\r\n\t\t\t\tleft:0;\r\n\t\t\t\theight:100%;\r\n\t\t\t}\r\n\r\n\t\t\twidth:100%;\r\n\r\n\t\t\tspan{\r\n\t\t\t\tdisplay: inline-block;\r\n\r\n\t\t\t\tmargin:0 auto;\r\n\t\t\t\tpadding:10px;\r\n\r\n\t\t\t\tcolor:#ccc;\r\n\t\t\t\tfont-weight: bold;\r\n\t\t\t\tfont-size: 20px;\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\t//element to hold table rows\r\n\t\t.tabulator-table{\r\n\t\t\tposition:relative;\r\n\t\t\tdisplay:inline-block;\r\n\t\t\tbackground-color:$rowBackgroundColor;\r\n\t\t\twhite-space: nowrap;\r\n\t\t\toverflow:visible;\r\n\t\t\tcolor:$rowTextColor;\r\n\r\n\t\t\t//row element\r\n\t\t\t.tabulator-row{\r\n\t\t\t\t&.tabulator-calcs{\r\n\t\t\t\t\tfont-weight: bold;\r\n\t\t\t\t\tbackground:darken($rowAltBackgroundColor, 5%) !important;\r\n\r\n\t\t\t\t\t&.tabulator-calcs-top{\r\n\t\t\t\t\t\tborder-bottom:2px solid $rowBorderColor;\r\n\t\t\t\t\t}\r\n\r\n\t\t\t\t\t&.tabulator-calcs-bottom{\r\n\t\t\t\t\t\tborder-top:2px solid $rowBorderColor;\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t}\r\n\t}\r\n\r\n\r\n\r\n\t//footer element\r\n\t.tabulator-footer{\r\n\t\tpadding:5px 10px;\r\n\t\tborder-top:1px solid $footerSeperatorColor;\r\n\t\tbackground-color: $footerBackgroundColor;\r\n\t\ttext-align: right;\r\n\t\tcolor: $footerTextColor;\r\n\t\tfont-weight:bold;\r\n\t\twhite-space:nowrap;\r\n\t\tuser-select:none;\r\n\r\n\t\t-moz-user-select: none;\r\n\t\t-khtml-user-select: none;\r\n\t\t-webkit-user-select: none;\r\n\t\t-o-user-select: none;\r\n\r\n\t\t.tabulator-calcs-holder{\r\n\t\t\tbox-sizing:border-box;\r\n\t\t\twidth:calc(100% + 20px);\r\n\t\t\tmargin:-5px -10px 5px -10px;\r\n\r\n\t\t\ttext-align: left;\r\n\r\n\t\t\tbackground:lighten($footerBackgroundColor, 5%) !important;\r\n\r\n\t\t\t.tabulator-row{\r\n\t\t\t\tbackground:lighten($footerBackgroundColor, 5%) !important;\r\n\r\n\t\t\t\t.tabulator-col-resize-handle{\r\n\t\t\t\t\tdisplay: none;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t\tborder-bottom:1px solid $rowBorderColor;\r\n\t\t\tborder-top:1px solid $rowBorderColor;\r\n\r\n\t\t\toverflow: hidden;\r\n\r\n\t\t\t&:only-child{\r\n\t\t\t\tmargin-bottom:-5px;\r\n\t\t\t\tborder-bottom:none;\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\t//pagination container element\r\n\t\t.tabulator-pages{\r\n\t\t\tmargin:0 7px;\r\n\t\t}\r\n\r\n\t\t//pagination button\r\n\t\t.tabulator-page{\r\n\t\t\tdisplay:inline-block;\r\n\r\n\t\t\tmargin:0 2px;\r\n\t\t\tpadding:2px 5px;\r\n\r\n\t\t\tborder:1px solid $footerBorderColor;\r\n\t\t\tborder-radius:3px;\r\n\r\n\t\t\tbackground:rgba(255,255,255,.2);\r\n\r\n\t\t\tcolor: $footerTextColor;\r\n\t\t\tfont-family:inherit;\r\n\t\t\tfont-weight:inherit;\r\n\t\t\tfont-size:inherit;\r\n\r\n\t\t\t&.active{\r\n\t\t\t\tcolor:$footerActiveColor;\r\n\t\t\t}\r\n\r\n\t\t\t&:disabled{\r\n\t\t\t\topacity:.5;\r\n\t\t\t}\r\n\r\n\t\t\t&:not(.disabled){\r\n\t\t\t\t&:hover{\r\n\t\t\t\t\tcursor:pointer;\r\n\t\t\t\t\tbackground:rgba(0,0,0,.2);\r\n\t\t\t\t\tcolor:#fff;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\r\n\t//column resize handles\r\n\t.tabulator-col-resize-handle{\r\n\t\tposition:absolute;\r\n\t\tright:0;\r\n\t\ttop:0;\r\n\t\tbottom:0;\r\n\t\twidth:5px;\r\n\r\n\t\t&.prev{\r\n\t\t\tleft:0;\r\n\t\t\tright:auto;\r\n\t\t}\r\n\r\n\t\t&:hover{\r\n\t\t\tcursor:ew-resize;\r\n\t\t}\r\n\t}\r\n\r\n\r\n\t//holding div that contains loader and covers tabulator element to prevent interaction\r\n\t.tabulator-loader{\r\n\t\tposition:absolute;\r\n\t\tdisplay: flex;\r\n\t\talign-items:center;\r\n\r\n\t\ttop:0;\r\n\t\tleft:0;\r\n\t\tz-index:100;\r\n\r\n\t\theight:100%;\r\n\t\twidth:100%;\r\n\t\tbackground:rgba(0,0,0,.4);\r\n\t\ttext-align:center;\r\n\r\n\t\t//loading message element\r\n\t\t.tabulator-loader-msg{\r\n\t\t\tdisplay:inline-block;\r\n\r\n\t\t\tmargin:0 auto;\r\n\t\t\tpadding:10px 20px;\r\n\r\n\t\t\tborder-radius:10px;\r\n\r\n\t\t\tbackground:#fff;\r\n\t\t\tfont-weight:bold;\r\n\t\t\tfont-size:16px;\r\n\r\n\t\t\t//loading message\r\n\t\t\t&.tabulator-loading{\r\n\t\t\t\tborder:4px solid #333;\r\n\t\t\t\tcolor:#000;\r\n\t\t\t}\r\n\r\n\t\t\t//error message\r\n\t\t\t&.tabulator-error{\r\n\t\t\t\tborder:4px solid #D00;\r\n\t\t\t\tcolor:#590000;\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n}\r\n\r\n//row element\r\n.tabulator-row{\r\n\tposition: relative;\r\n\tbox-sizing: border-box;\r\n\tmin-height:$textSize + ($headerMargin * 2);\r\n\tbackground-color: $rowBackgroundColor;\r\n\r\n\r\n\t&.tabulator-row-even{\r\n\t\tbackground-color: $rowAltBackgroundColor;\r\n\t}\r\n\r\n\t&.tabulator-selectable:hover{\r\n\t\tbackground-color:$rowHoverBackground;\r\n\t\tcursor: pointer;\r\n\t}\r\n\r\n\t&.tabulator-selected{\r\n\t\tbackground-color:$rowSelectedBackground;\r\n\t}\r\n\r\n\t&.tabulator-selected:hover{\r\n\t\tbackground-color:$rowSelectedBackgroundHover;\r\n\t\tcursor: pointer;\r\n\t}\r\n\r\n\t&.tabulator-row-moving{\r\n\t\tborder:1px solid #000;\r\n\t\tbackground:#fff;\r\n\t}\r\n\r\n\t&.tabulator-moving{\r\n\t\tposition: absolute;\r\n\r\n\t\tborder-top:1px solid $rowBorderColor;\r\n\t\tborder-bottom:1px solid $rowBorderColor;\r\n\r\n\t\tpointer-events: none;\r\n\t\tz-index:15;\r\n\t}\r\n\r\n\t//row resize handles\r\n\t.tabulator-row-resize-handle{\r\n\t\tposition:absolute;\r\n\t\tright:0;\r\n\t\tbottom:0;\r\n\t\tleft:0;\r\n\t\theight:5px;\r\n\r\n\t\t&.prev{\r\n\t\t\ttop:0;\r\n\t\t\tbottom:auto;\r\n\t\t}\r\n\r\n\t\t&:hover{\r\n\t\t\tcursor:ns-resize;\r\n\t\t}\r\n\t}\r\n\r\n\t.tabulator-frozen{\r\n\t\tdisplay: inline-block;\r\n\t\tposition: absolute;\r\n\r\n\t\tbackground-color: inherit;\r\n\r\n\t\tz-index: 10;\r\n\r\n\t\t&.tabulator-frozen-left{\r\n\t\t\tborder-right:2px solid $rowBorderColor;\r\n\t\t}\r\n\r\n\t\t&.tabulator-frozen-right{\r\n\t\t\tborder-left:2px solid $rowBorderColor;\r\n\t\t}\r\n\t}\r\n\r\n\t.tabulator-responsive-collapse{\r\n\t\tbox-sizing:border-box;\r\n\r\n\t\tpadding:5px;\r\n\r\n\t\tborder-top:1px solid $rowBorderColor;\r\n\t\tborder-bottom:1px solid $rowBorderColor;\r\n\r\n\t\t&:empty{\r\n\t\t\tdisplay:none;\r\n\t\t}\r\n\r\n\t\ttable{\r\n\t\t\tfont-size:$textSize;\r\n\r\n\t\t\ttr{\r\n\t\t\t\ttd{\r\n\t\t\t\t\tposition: relative;\r\n\r\n\t\t\t\t\t&:first-of-type{\r\n\t\t\t\t\t\tpadding-right:10px;\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\r\n\t//cell element\r\n\t.tabulator-cell{\r\n\t\tdisplay:inline-block;\r\n\t\tposition: relative;\r\n\t\tbox-sizing:border-box;\r\n\t\tpadding:4px;\r\n\t\tborder-right:1px solid $rowBorderColor;\r\n\t\tvertical-align:middle;\r\n\t\twhite-space:nowrap;\r\n\t\toverflow:hidden;\r\n\t\ttext-overflow:ellipsis;\r\n\r\n\r\n\t\t&.tabulator-editing{\r\n\t\t\tborder:1px solid $editBoxColor;\r\n\t\t\tpadding: 0;\r\n\r\n\t\t\tinput, select{\r\n\t\t\t\tborder:1px;\r\n\t\t\t\tbackground:transparent;\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\t&.tabulator-validation-fail{\r\n\t\t\tborder:1px solid $errorColor;\r\n\t\t\tinput, select{\r\n\t\t\t\tborder:1px;\r\n\t\t\t\tbackground:transparent;\r\n\r\n\t\t\t\tcolor: $errorColor;\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\t//hide left resize handle on first column\r\n\t\t&:first-child{\r\n\t\t\t.tabulator-col-resize-handle.prev{\r\n\t\t\t\tdisplay: none;\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\t//movable row handle\r\n\t\t&.tabulator-row-handle{\r\n\t\t\tdisplay: inline-flex;\r\n\t\t\talign-items:center;\r\n\t\t\tjustify-content:center;\r\n\r\n\t\t\t-moz-user-select: none;\r\n\t\t\t-khtml-user-select: none;\r\n\t\t\t-webkit-user-select: none;\r\n\t\t\t-o-user-select: none;\r\n\r\n\t\t\t//handle holder\r\n\t\t\t.tabulator-row-handle-box{\r\n\t\t\t\twidth:80%;\r\n\r\n\t\t\t\t//Hamburger element\r\n\t\t\t\t.tabulator-row-handle-bar{\r\n\t\t\t\t\twidth:100%;\r\n\t\t\t\t\theight:3px;\r\n\t\t\t\t\tmargin-top:2px;\r\n\t\t\t\t\tbackground:#666;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\t.tabulator-data-tree-branch{\r\n\t\t\tdisplay:inline-block;\r\n\t\t\tvertical-align:middle;\r\n\r\n\t\t\theight:9px;\r\n\t\t\twidth:7px;\r\n\r\n\t\t\tmargin-top:-9px;\r\n\t\t\tmargin-right:5px;\r\n\r\n\t\t\tborder-bottom-left-radius:1px;\r\n\r\n\t\t\tborder-left:2px solid $rowBorderColor;\r\n\t\t\tborder-bottom:2px solid $rowBorderColor;\r\n\t\t}\r\n\r\n\t\t.tabulator-data-tree-control{\r\n\r\n\t\t\tdisplay:inline-flex;\r\n\t\t\tjustify-content:center;\r\n\t\t\talign-items:center;\r\n\t\t\tvertical-align:middle;\r\n\r\n\t\t\theight:11px;\r\n\t\t\twidth:11px;\r\n\r\n\t\t\tmargin-right:5px;\r\n\r\n\t\t\tborder:1px solid $rowTextColor;\r\n\t\t\tborder-radius:2px;\r\n\t\t\tbackground:rgba(0, 0, 0, .1);\r\n\r\n\t\t\toverflow:hidden;\r\n\r\n\t\t\t&:hover{\r\n\t\t\t\tcursor:pointer;\r\n\t\t\t\tbackground:rgba(0, 0, 0, .2);\r\n\t\t\t}\r\n\r\n\t\t\t.tabulator-data-tree-control-collapse{\r\n\t\t\t\tdisplay:inline-block;\r\n\t\t\t\tposition: relative;\r\n\r\n\t\t\t\theight: 7px;\r\n\t\t\t\twidth: 1px;\r\n\r\n\t\t\t\tbackground: transparent;\r\n\r\n\t\t\t\t&:after {\r\n\t\t\t\t\tposition: absolute;\r\n\t\t\t\t\tcontent: \"\";\r\n\t\t\t\t\tleft: -3px;\r\n\t\t\t\t\ttop: 3px;\r\n\r\n\t\t\t\t\theight: 1px;\r\n\t\t\t\t\twidth: 7px;\r\n\r\n\t\t\t\t\tbackground: $rowTextColor;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t\t.tabulator-data-tree-control-expand{\r\n\t\t\t\tdisplay:inline-block;\r\n\t\t\t\tposition: relative;\r\n\r\n\t\t\t\theight: 7px;\r\n\t\t\t\twidth: 1px;\r\n\r\n\t\t\t\tbackground: $rowTextColor;\r\n\r\n\t\t\t\t&:after {\r\n\t\t\t\t\tposition: absolute;\r\n\t\t\t\t\tcontent: \"\";\r\n\t\t\t\t\tleft: -3px;\r\n\t\t\t\t\ttop: 3px;\r\n\r\n\t\t\t\t\theight: 1px;\r\n\t\t\t\t\twidth: 7px;\r\n\r\n\t\t\t\t\tbackground: $rowTextColor;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t}\r\n\r\n\t\t.tabulator-responsive-collapse-toggle{\r\n\t\t\tdisplay: inline-flex;\r\n\t\t\talign-items:center;\r\n\t\t\tjustify-content:center;\r\n\r\n\t\t\t-moz-user-select: none;\r\n\t\t\t-khtml-user-select: none;\r\n\t\t\t-webkit-user-select: none;\r\n\t\t\t-o-user-select: none;\r\n\r\n\t\t\theight:15px;\r\n\t\t\twidth:15px;\r\n\r\n\t\t\tborder-radius:20px;\r\n\t\t\tbackground:#666;\r\n\r\n\t\t\tcolor:$rowBackgroundColor;\r\n\t\t\tfont-weight:bold;\r\n\t\t\tfont-size:1.1em;\r\n\r\n\t\t\t&:hover{\r\n\t\t\t\topacity:.7;\r\n\t\t\t}\r\n\r\n\t\t\t&.open{\r\n\t\t\t\t.tabulator-responsive-collapse-toggle-close{\r\n\t\t\t\t\tdisplay:initial;\r\n\t\t\t\t}\r\n\r\n\t\t\t\t.tabulator-responsive-collapse-toggle-open{\r\n\t\t\t\t\tdisplay:none;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t\t.tabulator-responsive-collapse-toggle-close{\r\n\t\t\t\tdisplay:none;\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\r\n\t//row grouping element\r\n\t&.tabulator-group{\r\n\t\tbox-sizing:border-box;\r\n\t\tborder-bottom:1px solid #999;\r\n\t\tborder-right:1px solid $rowBorderColor;\r\n\t\tborder-top:1px solid #999;\r\n\t\tpadding:5px;\r\n\t\tpadding-left:10px;\r\n\t\tbackground:#ccc;\r\n\t\tfont-weight:bold;\r\n\r\n\t\tmin-width: 100%;\r\n\r\n\t\t&:hover{\r\n\t\t\tcursor:pointer;\r\n\t\t\tbackground-color:rgba(0,0,0,.1);\r\n\t\t}\r\n\r\n\t\t&.tabulator-group-visible{\r\n\r\n\t\t\t.tabulator-arrow{\r\n\t\t\t\tmargin-right:10px;\r\n\t\t\t\tborder-left: 6px solid transparent;\r\n\t\t\t\tborder-right: 6px solid transparent;\r\n\t\t\t\tborder-top: 6px solid $sortArrowActive;\r\n\t\t\t\tborder-bottom: 0;\r\n\t\t\t}\r\n\r\n\t\t}\r\n\r\n\t\t&.tabulator-group-level-1{\r\n\t\t\t.tabulator-arrow{\r\n\t\t\t\tmargin-left:20px;\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\t&.tabulator-group-level-2{\r\n\t\t\t.tabulator-arrow{\r\n\t\t\t\tmargin-left:40px;\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\t&.tabulator-group-level-3{\r\n\t\t\t.tabulator-arrow{\r\n\t\t\t\tmargin-left:60px;\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\t&.tabulator-group-level-4{\r\n\t\t\t.tabulator-arrow{\r\n\t\t\t\tmargin-left:80px;\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\t&.tabulator-group-level-5{\r\n\t\t\t.tabulator-arrow{\r\n\t\t\t\tmargin-left:100px;\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\t//sorting arrow\r\n\t\t.tabulator-arrow{\r\n\t\t\tdisplay: inline-block;\r\n\t\t\twidth: 0;\r\n\t\t\theight: 0;\r\n\t\t\tmargin-right:16px;\r\n\t\t\tborder-top: 6px solid transparent;\r\n\t\t\tborder-bottom: 6px solid transparent;\r\n\t\t\tborder-right: 0;\r\n\t\t\tborder-left: 6px solid $sortArrowActive;\r\n\t\t\tvertical-align:middle;\r\n\t\t}\r\n\r\n\t\tspan{\r\n\t\t\tmargin-left:10px;\r\n\t\t\tcolor:#d00;\r\n\t\t}\r\n\t}\r\n\r\n}\r\n\r\n.tabulator-edit-select-list{\r\n\tposition: absolute;\r\n\tdisplay:inline-block;\r\n\tbox-sizing:border-box;\r\n\r\n\tmax-height:200px;\r\n\r\n\tbackground:$rowBackgroundColor;\r\n\tborder:1px solid $rowBorderColor;\r\n\r\n\tfont-size:$textSize;\r\n\r\n\toverflow-y:auto;\r\n\t-webkit-overflow-scrolling: touch;\r\n\r\n\tz-index: 10000;\r\n\r\n\t.tabulator-edit-select-list-item{\r\n\t\tpadding:4px;\r\n\r\n\t\tcolor:$rowTextColor;\r\n\r\n\t\t&.active{\r\n\t\t\tcolor:$rowBackgroundColor;\r\n\t\t\tbackground:$editBoxColor;\r\n\t\t}\r\n\r\n\t\t&:hover{\r\n\t\t\tcursor:pointer;\r\n\r\n\t\t\tcolor:$rowBackgroundColor;\r\n\t\t\tbackground:$editBoxColor;\r\n\t\t}\r\n\t}\r\n\r\n\t.tabulator-edit-select-list-group{\r\n\t\tborder-bottom:1px solid $rowBorderColor;\r\n\r\n\t\tpadding:4px;\r\n\t\tpadding-top:6px;\r\n\r\n\t\tcolor:$rowTextColor;\r\n\t\tfont-weight:bold;\r\n\t}\r\n}"]} \ No newline at end of file diff --git a/Gems/AssetMemoryAnalyzer/External/tabulator-master/dist/css/tabulator_midnight.css b/Gems/AssetMemoryAnalyzer/External/tabulator-master/dist/css/tabulator_midnight.css deleted file mode 100644 index 40ae915a5a..0000000000 --- a/Gems/AssetMemoryAnalyzer/External/tabulator-master/dist/css/tabulator_midnight.css +++ /dev/null @@ -1,771 +0,0 @@ -/* Tabulator v4.1.2 (c) Oliver Folkerd */ -.tabulator { - position: relative; - border: 1px solid #333; - background-color: #222; - overflow: hidden; - font-size: 14px; - text-align: left; - -ms-transform: translatez(0); - transform: translatez(0); -} - -.tabulator[tabulator-layout="fitDataFill"] .tabulator-tableHolder .tabulator-table { - min-width: 100%; -} - -.tabulator.tabulator-block-select { - -webkit-user-select: none; - -moz-user-select: none; - -ms-user-select: none; - user-select: none; -} - -.tabulator .tabulator-header { - position: relative; - box-sizing: border-box; - width: 100%; - border-bottom: 1px solid #999; - background-color: #333; - color: #fff; - font-weight: bold; - white-space: nowrap; - overflow: hidden; - -moz-user-select: none; - -khtml-user-select: none; - -webkit-user-select: none; - -o-user-select: none; -} - -.tabulator .tabulator-header .tabulator-col { - display: inline-block; - position: relative; - box-sizing: border-box; - border-right: 1px solid #aaa; - background-color: #333; - text-align: left; - vertical-align: bottom; - overflow: hidden; -} - -.tabulator .tabulator-header .tabulator-col.tabulator-moving { - position: absolute; - border: 1px solid #999; - background: #1a1a1a; - pointer-events: none; -} - -.tabulator .tabulator-header .tabulator-col .tabulator-col-content { - box-sizing: border-box; - position: relative; - padding: 4px; -} - -.tabulator .tabulator-header .tabulator-col .tabulator-col-content .tabulator-col-title { - box-sizing: border-box; - width: 100%; - white-space: nowrap; - overflow: hidden; - text-overflow: ellipsis; - vertical-align: bottom; -} - -.tabulator .tabulator-header .tabulator-col .tabulator-col-content .tabulator-col-title .tabulator-title-editor { - box-sizing: border-box; - width: 100%; - border: 1px solid #999; - padding: 1px; - background: #444; - color: #fff; -} - -.tabulator .tabulator-header .tabulator-col .tabulator-col-content .tabulator-arrow { - display: inline-block; - position: absolute; - top: 9px; - right: 8px; - width: 0; - height: 0; - border-left: 6px solid transparent; - border-right: 6px solid transparent; - border-bottom: 6px solid #bbb; -} - -.tabulator .tabulator-header .tabulator-col.tabulator-col-group .tabulator-col-group-cols { - position: relative; - display: -ms-flexbox; - display: flex; - border-top: 1px solid #aaa; - overflow: hidden; -} - -.tabulator .tabulator-header .tabulator-col.tabulator-col-group .tabulator-col-group-cols .tabulator-col:last-child { - margin-right: -1px; -} - -.tabulator .tabulator-header .tabulator-col:first-child .tabulator-col-resize-handle.prev { - display: none; -} - -.tabulator .tabulator-header .tabulator-col.ui-sortable-helper { - position: absolute; - background-color: #1a1a1a !important; - border: 1px solid #aaa; -} - -.tabulator .tabulator-header .tabulator-col .tabulator-header-filter { - position: relative; - box-sizing: border-box; - margin-top: 2px; - width: 100%; - text-align: center; -} - -.tabulator .tabulator-header .tabulator-col .tabulator-header-filter textarea { - height: auto !important; -} - -.tabulator .tabulator-header .tabulator-col .tabulator-header-filter svg { - margin-top: 3px; -} - -.tabulator .tabulator-header .tabulator-col .tabulator-header-filter input, .tabulator .tabulator-header .tabulator-col .tabulator-header-filter select { - border: 1px solid #999; - background: #444; - color: #fff; -} - -.tabulator .tabulator-header .tabulator-col .tabulator-header-filter input::-ms-clear { - width: 0; - height: 0; -} - -.tabulator .tabulator-header .tabulator-col.tabulator-sortable .tabulator-col-title { - padding-right: 25px; -} - -.tabulator .tabulator-header .tabulator-col.tabulator-sortable:hover { - cursor: pointer; - background-color: #1a1a1a; -} - -.tabulator .tabulator-header .tabulator-col.tabulator-sortable[aria-sort="none"] .tabulator-col-content .tabulator-arrow { - border-top: none; - border-bottom: 6px solid #bbb; -} - -.tabulator .tabulator-header .tabulator-col.tabulator-sortable[aria-sort="asc"] .tabulator-col-content .tabulator-arrow { - border-top: none; - border-bottom: 6px solid #666; -} - -.tabulator .tabulator-header .tabulator-col.tabulator-sortable[aria-sort="desc"] .tabulator-col-content .tabulator-arrow { - border-top: 6px solid #666; - border-bottom: none; -} - -.tabulator .tabulator-header .tabulator-col.tabulator-col-vertical .tabulator-col-content .tabulator-col-title { - -webkit-writing-mode: vertical-rl; - -ms-writing-mode: tb-rl; - writing-mode: vertical-rl; - text-orientation: mixed; - display: -ms-flexbox; - display: flex; - -ms-flex-align: center; - align-items: center; - -ms-flex-pack: center; - justify-content: center; -} - -.tabulator .tabulator-header .tabulator-col.tabulator-col-vertical.tabulator-col-vertical-flip .tabulator-col-title { - -ms-transform: rotate(180deg); - transform: rotate(180deg); -} - -.tabulator .tabulator-header .tabulator-col.tabulator-col-vertical.tabulator-sortable .tabulator-col-title { - padding-right: 0; - padding-top: 20px; -} - -.tabulator .tabulator-header .tabulator-col.tabulator-col-vertical.tabulator-sortable.tabulator-col-vertical-flip .tabulator-col-title { - padding-right: 0; - padding-bottom: 20px; -} - -.tabulator .tabulator-header .tabulator-col.tabulator-col-vertical.tabulator-sortable .tabulator-arrow { - right: calc(50% - 6px); -} - -.tabulator .tabulator-header .tabulator-frozen { - display: inline-block; - position: absolute; - z-index: 10; -} - -.tabulator .tabulator-header .tabulator-frozen.tabulator-frozen-left { - border-right: 2px solid #888; -} - -.tabulator .tabulator-header .tabulator-frozen.tabulator-frozen-right { - border-left: 2px solid #888; -} - -.tabulator .tabulator-header .tabulator-calcs-holder { - box-sizing: border-box; - min-width: 400%; - background: #1a1a1a !important; - border-top: 1px solid #888; - border-bottom: 1px solid #aaa; - overflow: hidden; -} - -.tabulator .tabulator-header .tabulator-calcs-holder .tabulator-row { - background: #1a1a1a !important; -} - -.tabulator .tabulator-header .tabulator-calcs-holder .tabulator-row .tabulator-col-resize-handle { - display: none; -} - -.tabulator .tabulator-header .tabulator-frozen-rows-holder { - min-width: 400%; -} - -.tabulator .tabulator-header .tabulator-frozen-rows-holder:empty { - display: none; -} - -.tabulator .tabulator-tableHolder { - position: relative; - width: 100%; - white-space: nowrap; - overflow: auto; - -webkit-overflow-scrolling: touch; -} - -.tabulator .tabulator-tableHolder:focus { - outline: none; -} - -.tabulator .tabulator-tableHolder .tabulator-placeholder { - box-sizing: border-box; - display: -ms-flexbox; - display: flex; - -ms-flex-align: center; - align-items: center; - width: 100%; -} - -.tabulator .tabulator-tableHolder .tabulator-placeholder[tabulator-render-mode="virtual"] { - position: absolute; - top: 0; - left: 0; - height: 100%; -} - -.tabulator .tabulator-tableHolder .tabulator-placeholder span { - display: inline-block; - margin: 0 auto; - padding: 10px; - color: #eee; - font-weight: bold; - font-size: 20px; -} - -.tabulator .tabulator-tableHolder .tabulator-table { - position: relative; - display: inline-block; - background-color: #666; - white-space: nowrap; - overflow: visible; - color: #fff; -} - -.tabulator .tabulator-tableHolder .tabulator-table .tabulator-row.tabulator-calcs { - font-weight: bold; - background: #373737 !important; -} - -.tabulator .tabulator-tableHolder .tabulator-table .tabulator-row.tabulator-calcs.tabulator-calcs-top { - border-bottom: 2px solid #888; -} - -.tabulator .tabulator-tableHolder .tabulator-table .tabulator-row.tabulator-calcs.tabulator-calcs-bottom { - border-top: 2px solid #888; -} - -.tabulator .tabulator-col-resize-handle { - position: absolute; - right: 0; - top: 0; - bottom: 0; - width: 5px; -} - -.tabulator .tabulator-col-resize-handle.prev { - left: 0; - right: auto; -} - -.tabulator .tabulator-col-resize-handle:hover { - cursor: ew-resize; -} - -.tabulator .tabulator-footer { - padding: 5px 10px; - border-top: 1px solid #999; - background-color: #333; - text-align: right; - color: #333; - font-weight: bold; - white-space: nowrap; - -ms-user-select: none; - user-select: none; - -moz-user-select: none; - -khtml-user-select: none; - -webkit-user-select: none; - -o-user-select: none; -} - -.tabulator .tabulator-footer .tabulator-calcs-holder { - box-sizing: border-box; - width: calc(100% + 20px); - margin: -5px -10px 5px -10px; - text-align: left; - background: #262626 !important; - border-bottom: 1px solid #888; - border-top: 1px solid #888; - overflow: hidden; -} - -.tabulator .tabulator-footer .tabulator-calcs-holder .tabulator-row { - background: #262626 !important; - color: #fff; -} - -.tabulator .tabulator-footer .tabulator-calcs-holder .tabulator-row .tabulator-col-resize-handle { - display: none; -} - -.tabulator .tabulator-footer .tabulator-calcs-holder:only-child { - margin-bottom: -5px; - border-bottom: none; -} - -.tabulator .tabulator-footer .tabulator-pages { - margin: 0 7px; -} - -.tabulator .tabulator-footer .tabulator-page { - display: inline-block; - margin: 0 2px; - border: 1px solid #aaa; - border-radius: 3px; - padding: 2px 5px; - background: rgba(255, 255, 255, 0.2); - color: #333; - font-family: inherit; - font-weight: inherit; - font-size: inherit; -} - -.tabulator .tabulator-footer .tabulator-page.active { - color: #fff; -} - -.tabulator .tabulator-footer .tabulator-page:disabled { - opacity: .5; -} - -.tabulator .tabulator-footer .tabulator-page:not(.disabled):hover { - cursor: pointer; - background: rgba(0, 0, 0, 0.2); - color: #fff; -} - -.tabulator .tabulator-loader { - position: absolute; - display: -ms-flexbox; - display: flex; - -ms-flex-align: center; - align-items: center; - top: 0; - left: 0; - z-index: 100; - height: 100%; - width: 100%; - background: rgba(0, 0, 0, 0.4); - text-align: center; -} - -.tabulator .tabulator-loader .tabulator-loader-msg { - display: inline-block; - margin: 0 auto; - padding: 10px 20px; - border-radius: 10px; - background: #fff; - font-weight: bold; - font-size: 16px; -} - -.tabulator .tabulator-loader .tabulator-loader-msg.tabulator-loading { - border: 4px solid #333; - color: #000; -} - -.tabulator .tabulator-loader .tabulator-loader-msg.tabulator-error { - border: 4px solid #D00; - color: #590000; -} - -.tabulator-row { - position: relative; - box-sizing: border-box; - min-height: 22px; - background-color: #666; -} - -.tabulator-row:nth-child(even) { - background-color: #444; -} - -.tabulator-row.tabulator-selectable:hover { - background-color: #999; - cursor: pointer; -} - -.tabulator-row.tabulator-selected { - background-color: #000; -} - -.tabulator-row.tabulator-selected:hover { - background-color: #888; - cursor: pointer; -} - -.tabulator-row.tabulator-moving { - position: absolute; - border-top: 1px solid #888; - border-bottom: 1px solid #888; - pointer-events: none !important; - z-index: 15; -} - -.tabulator-row .tabulator-row-resize-handle { - position: absolute; - right: 0; - bottom: 0; - left: 0; - height: 5px; -} - -.tabulator-row .tabulator-row-resize-handle.prev { - top: 0; - bottom: auto; -} - -.tabulator-row .tabulator-row-resize-handle:hover { - cursor: ns-resize; -} - -.tabulator-row .tabulator-frozen { - display: inline-block; - position: absolute; - background-color: inherit; - z-index: 10; -} - -.tabulator-row .tabulator-frozen.tabulator-frozen-left { - border-right: 2px solid #888; -} - -.tabulator-row .tabulator-frozen.tabulator-frozen-right { - border-left: 2px solid #888; -} - -.tabulator-row .tabulator-responsive-collapse { - box-sizing: border-box; - padding: 5px; - border-top: 1px solid #888; - border-bottom: 1px solid #888; -} - -.tabulator-row .tabulator-responsive-collapse:empty { - display: none; -} - -.tabulator-row .tabulator-responsive-collapse table { - font-size: 14px; -} - -.tabulator-row .tabulator-responsive-collapse table tr td { - position: relative; -} - -.tabulator-row .tabulator-responsive-collapse table tr td:first-of-type { - padding-right: 10px; -} - -.tabulator-row .tabulator-cell { - display: inline-block; - position: relative; - box-sizing: border-box; - padding: 4px; - border-right: 1px solid #888; - vertical-align: middle; - white-space: nowrap; - overflow: hidden; - text-overflow: ellipsis; -} - -.tabulator-row .tabulator-cell.tabulator-editing { - border: 1px solid #999; - padding: 0; -} - -.tabulator-row .tabulator-cell.tabulator-editing input, .tabulator-row .tabulator-cell.tabulator-editing select { - border: 1px; - background: transparent; -} - -.tabulator-row .tabulator-cell.tabulator-validation-fail { - border: 1px solid #dd0000; -} - -.tabulator-row .tabulator-cell.tabulator-validation-fail input, .tabulator-row .tabulator-cell.tabulator-validation-fail select { - border: 1px; - background: transparent; - color: #dd0000; -} - -.tabulator-row .tabulator-cell:first-child .tabulator-col-resize-handle.prev { - display: none; -} - -.tabulator-row .tabulator-cell.tabulator-row-handle { - display: -ms-inline-flexbox; - display: inline-flex; - -ms-flex-align: center; - align-items: center; - -moz-user-select: none; - -khtml-user-select: none; - -webkit-user-select: none; - -o-user-select: none; -} - -.tabulator-row .tabulator-cell.tabulator-row-handle .tabulator-row-handle-box { - width: 80%; -} - -.tabulator-row .tabulator-cell.tabulator-row-handle .tabulator-row-handle-box .tabulator-row-handle-bar { - width: 100%; - height: 3px; - margin-top: 2px; - background: #666; -} - -.tabulator-row .tabulator-cell .tabulator-data-tree-branch { - display: inline-block; - vertical-align: middle; - height: 9px; - width: 7px; - margin-top: -9px; - margin-right: 5px; - border-bottom-left-radius: 1px; - border-left: 2px solid #888; - border-bottom: 2px solid #888; -} - -.tabulator-row .tabulator-cell .tabulator-data-tree-control { - display: -ms-inline-flexbox; - display: inline-flex; - -ms-flex-pack: center; - justify-content: center; - -ms-flex-align: center; - align-items: center; - vertical-align: middle; - height: 11px; - width: 11px; - margin-right: 5px; - border: 1px solid #fff; - border-radius: 2px; - background: rgba(0, 0, 0, 0.1); - overflow: hidden; -} - -.tabulator-row .tabulator-cell .tabulator-data-tree-control:hover { - cursor: pointer; - background: rgba(0, 0, 0, 0.2); -} - -.tabulator-row .tabulator-cell .tabulator-data-tree-control .tabulator-data-tree-control-collapse { - display: inline-block; - position: relative; - height: 7px; - width: 1px; - background: transparent; -} - -.tabulator-row .tabulator-cell .tabulator-data-tree-control .tabulator-data-tree-control-collapse:after { - position: absolute; - content: ""; - left: -3px; - top: 3px; - height: 1px; - width: 7px; - background: #fff; -} - -.tabulator-row .tabulator-cell .tabulator-data-tree-control .tabulator-data-tree-control-expand { - display: inline-block; - position: relative; - height: 7px; - width: 1px; - background: #fff; -} - -.tabulator-row .tabulator-cell .tabulator-data-tree-control .tabulator-data-tree-control-expand:after { - position: absolute; - content: ""; - left: -3px; - top: 3px; - height: 1px; - width: 7px; - background: #fff; -} - -.tabulator-row .tabulator-cell .tabulator-responsive-collapse-toggle { - display: -ms-inline-flexbox; - display: inline-flex; - -ms-flex-align: center; - align-items: center; - -ms-flex-pack: center; - justify-content: center; - -moz-user-select: none; - -khtml-user-select: none; - -webkit-user-select: none; - -o-user-select: none; - height: 15px; - width: 15px; - border-radius: 20px; - background: #fff; - color: #666; - font-weight: bold; - font-size: 1.1em; -} - -.tabulator-row .tabulator-cell .tabulator-responsive-collapse-toggle:hover { - opacity: .7; -} - -.tabulator-row .tabulator-cell .tabulator-responsive-collapse-toggle.open .tabulator-responsive-collapse-toggle-close { - display: initial; -} - -.tabulator-row .tabulator-cell .tabulator-responsive-collapse-toggle.open .tabulator-responsive-collapse-toggle-open { - display: none; -} - -.tabulator-row .tabulator-cell .tabulator-responsive-collapse-toggle .tabulator-responsive-collapse-toggle-close { - display: none; -} - -.tabulator-row.tabulator-group { - box-sizing: border-box; - border-bottom: 1px solid #999; - border-right: 1px solid #888; - border-top: 1px solid #999; - padding: 5px; - padding-left: 10px; - background: #ccc; - font-weight: bold; - color: #333; - min-width: 100%; -} - -.tabulator-row.tabulator-group:hover { - cursor: pointer; - background-color: rgba(0, 0, 0, 0.1); -} - -.tabulator-row.tabulator-group.tabulator-group-visible .tabulator-arrow { - margin-right: 10px; - border-left: 6px solid transparent; - border-right: 6px solid transparent; - border-top: 6px solid #666; - border-bottom: 0; -} - -.tabulator-row.tabulator-group.tabulator-group-level-1 .tabulator-arrow { - margin-left: 20px; -} - -.tabulator-row.tabulator-group.tabulator-group-level-2 .tabulator-arrow { - margin-left: 40px; -} - -.tabulator-row.tabulator-group.tabulator-group-level-3 .tabulator-arrow { - margin-left: 60px; -} - -.tabulator-row.tabulator-group.tabulator-group-level-4 .tabulator-arrow { - margin-left: 80px; -} - -.tabulator-row.tabulator-group.tabulator-group-level-5 .tabulator-arrow { - margin-left: 100px; -} - -.tabulator-row.tabulator-group .tabulator-arrow { - display: inline-block; - width: 0; - height: 0; - margin-right: 16px; - border-top: 6px solid transparent; - border-bottom: 6px solid transparent; - border-right: 0; - border-left: 6px solid #666; - vertical-align: middle; -} - -.tabulator-row.tabulator-group span { - margin-left: 10px; - color: #666; -} - -.tabulator-edit-select-list { - position: absolute; - display: inline-block; - box-sizing: border-box; - max-height: 200px; - background: #666; - border: 1px solid #888; - font-size: 14px; - overflow-y: auto; - -webkit-overflow-scrolling: touch; - z-index: 10000; -} - -.tabulator-edit-select-list .tabulator-edit-select-list-item { - padding: 4px; - color: #fff; -} - -.tabulator-edit-select-list .tabulator-edit-select-list-item.active { - color: #666; - background: #999; -} - -.tabulator-edit-select-list .tabulator-edit-select-list-item:hover { - cursor: pointer; - color: #666; - background: #999; -} - -.tabulator-edit-select-list .tabulator-edit-select-list-group { - border-bottom: 1px solid #888; - padding: 4px; - padding-top: 6px; - color: #fff; - font-weight: bold; -} diff --git a/Gems/AssetMemoryAnalyzer/External/tabulator-master/dist/css/tabulator_midnight.min.css b/Gems/AssetMemoryAnalyzer/External/tabulator-master/dist/css/tabulator_midnight.min.css deleted file mode 100644 index a603d0cbbb..0000000000 --- a/Gems/AssetMemoryAnalyzer/External/tabulator-master/dist/css/tabulator_midnight.min.css +++ /dev/null @@ -1,3 +0,0 @@ -/* Tabulator v4.1.2 (c) Oliver Folkerd */ -.tabulator{position:relative;border:1px solid #333;background-color:#222;overflow:hidden;font-size:14px;text-align:left;transform:translatez(0)}.tabulator[tabulator-layout=fitDataFill] .tabulator-tableHolder .tabulator-table{min-width:100%}.tabulator.tabulator-block-select{-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}.tabulator .tabulator-header{width:100%;border-bottom:1px solid #999;color:#fff;font-weight:700;white-space:nowrap;-moz-user-select:none;-khtml-user-select:none;-webkit-user-select:none;-o-user-select:none}.tabulator .tabulator-header,.tabulator .tabulator-header .tabulator-col{position:relative;box-sizing:border-box;background-color:#333;overflow:hidden}.tabulator .tabulator-header .tabulator-col{display:inline-block;border-right:1px solid #aaa;text-align:left;vertical-align:bottom}.tabulator .tabulator-header .tabulator-col.tabulator-moving{position:absolute;border:1px solid #999;background:#1a1a1a;pointer-events:none}.tabulator .tabulator-header .tabulator-col .tabulator-col-content{box-sizing:border-box;position:relative;padding:4px}.tabulator .tabulator-header .tabulator-col .tabulator-col-content .tabulator-col-title{box-sizing:border-box;width:100%;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;vertical-align:bottom}.tabulator .tabulator-header .tabulator-col .tabulator-col-content .tabulator-col-title .tabulator-title-editor{box-sizing:border-box;width:100%;border:1px solid #999;padding:1px;background:#444;color:#fff}.tabulator .tabulator-header .tabulator-col .tabulator-col-content .tabulator-arrow{display:inline-block;position:absolute;top:9px;right:8px;width:0;height:0;border-left:6px solid transparent;border-right:6px solid transparent;border-bottom:6px solid #bbb}.tabulator .tabulator-header .tabulator-col.tabulator-col-group .tabulator-col-group-cols{position:relative;display:-ms-flexbox;display:flex;border-top:1px solid #aaa;overflow:hidden}.tabulator .tabulator-header .tabulator-col.tabulator-col-group .tabulator-col-group-cols .tabulator-col:last-child{margin-right:-1px}.tabulator .tabulator-header .tabulator-col:first-child .tabulator-col-resize-handle.prev{display:none}.tabulator .tabulator-header .tabulator-col.ui-sortable-helper{position:absolute;background-color:#1a1a1a!important;border:1px solid #aaa}.tabulator .tabulator-header .tabulator-col .tabulator-header-filter{position:relative;box-sizing:border-box;margin-top:2px;width:100%;text-align:center}.tabulator .tabulator-header .tabulator-col .tabulator-header-filter textarea{height:auto!important}.tabulator .tabulator-header .tabulator-col .tabulator-header-filter svg{margin-top:3px}.tabulator .tabulator-header .tabulator-col .tabulator-header-filter input,.tabulator .tabulator-header .tabulator-col .tabulator-header-filter select{border:1px solid #999;background:#444;color:#fff}.tabulator .tabulator-header .tabulator-col .tabulator-header-filter input::-ms-clear{width:0;height:0}.tabulator .tabulator-header .tabulator-col.tabulator-sortable .tabulator-col-title{padding-right:25px}.tabulator .tabulator-header .tabulator-col.tabulator-sortable:hover{cursor:pointer;background-color:#1a1a1a}.tabulator .tabulator-header .tabulator-col.tabulator-sortable[aria-sort=none] .tabulator-col-content .tabulator-arrow{border-top:none;border-bottom:6px solid #bbb}.tabulator .tabulator-header .tabulator-col.tabulator-sortable[aria-sort=asc] .tabulator-col-content .tabulator-arrow{border-top:none;border-bottom:6px solid #666}.tabulator .tabulator-header .tabulator-col.tabulator-sortable[aria-sort=desc] .tabulator-col-content .tabulator-arrow{border-top:6px solid #666;border-bottom:none}.tabulator .tabulator-header .tabulator-col.tabulator-col-vertical .tabulator-col-content .tabulator-col-title{-webkit-writing-mode:vertical-rl;-ms-writing-mode:tb-rl;writing-mode:vertical-rl;text-orientation:mixed;display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;-ms-flex-pack:center;justify-content:center}.tabulator .tabulator-header .tabulator-col.tabulator-col-vertical.tabulator-col-vertical-flip .tabulator-col-title{transform:rotate(180deg)}.tabulator .tabulator-header .tabulator-col.tabulator-col-vertical.tabulator-sortable .tabulator-col-title{padding-right:0;padding-top:20px}.tabulator .tabulator-header .tabulator-col.tabulator-col-vertical.tabulator-sortable.tabulator-col-vertical-flip .tabulator-col-title{padding-right:0;padding-bottom:20px}.tabulator .tabulator-header .tabulator-col.tabulator-col-vertical.tabulator-sortable .tabulator-arrow{right:calc(50% - 6px)}.tabulator .tabulator-header .tabulator-frozen{display:inline-block;position:absolute;z-index:1}.tabulator .tabulator-header .tabulator-frozen.tabulator-frozen-left{border-right:2px solid #888}.tabulator .tabulator-header .tabulator-frozen.tabulator-frozen-right{border-left:2px solid #888}.tabulator .tabulator-header .tabulator-calcs-holder{box-sizing:border-box;min-width:400%;background:#1a1a1a!important;border-top:1px solid #888;border-bottom:1px solid #aaa;overflow:hidden}.tabulator .tabulator-header .tabulator-calcs-holder .tabulator-row{background:#1a1a1a!important}.tabulator .tabulator-header .tabulator-calcs-holder .tabulator-row .tabulator-col-resize-handle{display:none}.tabulator .tabulator-header .tabulator-frozen-rows-holder{min-width:400%}.tabulator .tabulator-header .tabulator-frozen-rows-holder:empty{display:none}.tabulator .tabulator-tableHolder{position:relative;width:100%;white-space:nowrap;overflow:auto;-webkit-overflow-scrolling:touch}.tabulator .tabulator-tableHolder:focus{outline:none}.tabulator .tabulator-tableHolder .tabulator-placeholder{box-sizing:border-box;display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;width:100%}.tabulator .tabulator-tableHolder .tabulator-placeholder[tabulator-render-mode=virtual]{position:absolute;top:0;left:0;height:100%}.tabulator .tabulator-tableHolder .tabulator-placeholder span{display:inline-block;margin:0 auto;padding:10px;color:#eee;font-weight:700;font-size:20px}.tabulator .tabulator-tableHolder .tabulator-table{position:relative;display:inline-block;background-color:#666;white-space:nowrap;overflow:visible;color:#fff}.tabulator .tabulator-tableHolder .tabulator-table .tabulator-row.tabulator-calcs{font-weight:700;background:#373737!important}.tabulator .tabulator-tableHolder .tabulator-table .tabulator-row.tabulator-calcs.tabulator-calcs-top{border-bottom:2px solid #888}.tabulator .tabulator-tableHolder .tabulator-table .tabulator-row.tabulator-calcs.tabulator-calcs-bottom{border-top:2px solid #888}.tabulator .tabulator-col-resize-handle{position:absolute;right:0;top:0;bottom:0;width:5px}.tabulator .tabulator-col-resize-handle.prev{left:0;right:auto}.tabulator .tabulator-col-resize-handle:hover{cursor:ew-resize}.tabulator .tabulator-footer{padding:5px 10px;border-top:1px solid #999;background-color:#333;text-align:right;color:#333;font-weight:700;white-space:nowrap;-ms-user-select:none;user-select:none;-moz-user-select:none;-khtml-user-select:none;-webkit-user-select:none;-o-user-select:none}.tabulator .tabulator-footer .tabulator-calcs-holder{box-sizing:border-box;width:calc(100% + 20px);margin:-5px -10px 5px;text-align:left;background:#262626!important;border-bottom:1px solid #888;border-top:1px solid #888;overflow:hidden}.tabulator .tabulator-footer .tabulator-calcs-holder .tabulator-row{background:#262626!important;color:#fff}.tabulator .tabulator-footer .tabulator-calcs-holder .tabulator-row .tabulator-col-resize-handle{display:none}.tabulator .tabulator-footer .tabulator-calcs-holder:only-child{margin-bottom:-5px;border-bottom:none}.tabulator .tabulator-footer .tabulator-pages{margin:0 7px}.tabulator .tabulator-footer .tabulator-page{display:inline-block;margin:0 2px;border:1px solid #aaa;border-radius:3px;padding:2px 5px;background:hsla(0,0%,100%,.2);color:#333;font-family:inherit;font-weight:inherit;font-size:inherit}.tabulator .tabulator-footer .tabulator-page.active{color:#fff}.tabulator .tabulator-footer .tabulator-page:disabled{opacity:.5}.tabulator .tabulator-footer .tabulator-page:not(.disabled):hover{cursor:pointer;background:rgba(0,0,0,.2);color:#fff}.tabulator .tabulator-loader{position:absolute;display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;top:0;left:0;z-index:3;height:100%;width:100%;background:rgba(0,0,0,.4);text-align:center}.tabulator .tabulator-loader .tabulator-loader-msg{display:inline-block;margin:0 auto;padding:10px 20px;border-radius:10px;background:#fff;font-weight:700;font-size:16px}.tabulator .tabulator-loader .tabulator-loader-msg.tabulator-loading{border:4px solid #333;color:#000}.tabulator .tabulator-loader .tabulator-loader-msg.tabulator-error{border:4px solid #d00;color:#590000}.tabulator-row{position:relative;box-sizing:border-box;min-height:22px;background-color:#666}.tabulator-row:nth-child(2n){background-color:#444}.tabulator-row.tabulator-selectable:hover{background-color:#999;cursor:pointer}.tabulator-row.tabulator-selected{background-color:#000}.tabulator-row.tabulator-selected:hover{background-color:#888;cursor:pointer}.tabulator-row.tabulator-moving{position:absolute;border-top:1px solid #888;border-bottom:1px solid #888;pointer-events:none!important;z-index:2}.tabulator-row .tabulator-row-resize-handle{position:absolute;right:0;bottom:0;left:0;height:5px}.tabulator-row .tabulator-row-resize-handle.prev{top:0;bottom:auto}.tabulator-row .tabulator-row-resize-handle:hover{cursor:ns-resize}.tabulator-row .tabulator-frozen{display:inline-block;position:absolute;background-color:inherit;z-index:1}.tabulator-row .tabulator-frozen.tabulator-frozen-left{border-right:2px solid #888}.tabulator-row .tabulator-frozen.tabulator-frozen-right{border-left:2px solid #888}.tabulator-row .tabulator-responsive-collapse{box-sizing:border-box;padding:5px;border-top:1px solid #888;border-bottom:1px solid #888}.tabulator-row .tabulator-responsive-collapse:empty{display:none}.tabulator-row .tabulator-responsive-collapse table{font-size:14px}.tabulator-row .tabulator-responsive-collapse table tr td{position:relative}.tabulator-row .tabulator-responsive-collapse table tr td:first-of-type{padding-right:10px}.tabulator-row .tabulator-cell{display:inline-block;position:relative;box-sizing:border-box;padding:4px;border-right:1px solid #888;vertical-align:middle;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.tabulator-row .tabulator-cell.tabulator-editing{border:1px solid #999;padding:0}.tabulator-row .tabulator-cell.tabulator-editing input,.tabulator-row .tabulator-cell.tabulator-editing select{border:1px;background:transparent}.tabulator-row .tabulator-cell.tabulator-validation-fail{border:1px solid #d00}.tabulator-row .tabulator-cell.tabulator-validation-fail input,.tabulator-row .tabulator-cell.tabulator-validation-fail select{border:1px;background:transparent;color:#d00}.tabulator-row .tabulator-cell:first-child .tabulator-col-resize-handle.prev{display:none}.tabulator-row .tabulator-cell.tabulator-row-handle{display:-ms-inline-flexbox;display:inline-flex;-ms-flex-align:center;align-items:center;-moz-user-select:none;-khtml-user-select:none;-webkit-user-select:none;-o-user-select:none}.tabulator-row .tabulator-cell.tabulator-row-handle .tabulator-row-handle-box{width:80%}.tabulator-row .tabulator-cell.tabulator-row-handle .tabulator-row-handle-box .tabulator-row-handle-bar{width:100%;height:3px;margin-top:2px;background:#666}.tabulator-row .tabulator-cell .tabulator-data-tree-branch{display:inline-block;vertical-align:middle;height:9px;width:7px;margin-top:-9px;margin-right:5px;border-bottom-left-radius:1px;border-left:2px solid #888;border-bottom:2px solid #888}.tabulator-row .tabulator-cell .tabulator-data-tree-control{display:-ms-inline-flexbox;display:inline-flex;-ms-flex-pack:center;justify-content:center;-ms-flex-align:center;align-items:center;vertical-align:middle;height:11px;width:11px;margin-right:5px;border:1px solid #fff;border-radius:2px;background:rgba(0,0,0,.1);overflow:hidden}.tabulator-row .tabulator-cell .tabulator-data-tree-control:hover{cursor:pointer;background:rgba(0,0,0,.2)}.tabulator-row .tabulator-cell .tabulator-data-tree-control .tabulator-data-tree-control-collapse{display:inline-block;position:relative;height:7px;width:1px;background:transparent}.tabulator-row .tabulator-cell .tabulator-data-tree-control .tabulator-data-tree-control-collapse:after{position:absolute;content:"";left:-3px;top:3px;height:1px;width:7px;background:#fff}.tabulator-row .tabulator-cell .tabulator-data-tree-control .tabulator-data-tree-control-expand{display:inline-block;position:relative;height:7px;width:1px;background:#fff}.tabulator-row .tabulator-cell .tabulator-data-tree-control .tabulator-data-tree-control-expand:after{position:absolute;content:"";left:-3px;top:3px;height:1px;width:7px;background:#fff}.tabulator-row .tabulator-cell .tabulator-responsive-collapse-toggle{display:-ms-inline-flexbox;display:inline-flex;-ms-flex-align:center;align-items:center;-ms-flex-pack:center;justify-content:center;-moz-user-select:none;-khtml-user-select:none;-webkit-user-select:none;-o-user-select:none;height:15px;width:15px;border-radius:20px;background:#fff;color:#666;font-weight:700;font-size:1.1em}.tabulator-row .tabulator-cell .tabulator-responsive-collapse-toggle:hover{opacity:.7}.tabulator-row .tabulator-cell .tabulator-responsive-collapse-toggle.open .tabulator-responsive-collapse-toggle-close{display:initial}.tabulator-row .tabulator-cell .tabulator-responsive-collapse-toggle.open .tabulator-responsive-collapse-toggle-open,.tabulator-row .tabulator-cell .tabulator-responsive-collapse-toggle .tabulator-responsive-collapse-toggle-close{display:none}.tabulator-row.tabulator-group{box-sizing:border-box;border-bottom:1px solid #999;border-right:1px solid #888;border-top:1px solid #999;padding:5px;padding-left:10px;background:#ccc;font-weight:700;color:#333;min-width:100%}.tabulator-row.tabulator-group:hover{cursor:pointer;background-color:rgba(0,0,0,.1)}.tabulator-row.tabulator-group.tabulator-group-visible .tabulator-arrow{margin-right:10px;border-left:6px solid transparent;border-right:6px solid transparent;border-top:6px solid #666;border-bottom:0}.tabulator-row.tabulator-group.tabulator-group-level-1 .tabulator-arrow{margin-left:20px}.tabulator-row.tabulator-group.tabulator-group-level-2 .tabulator-arrow{margin-left:40px}.tabulator-row.tabulator-group.tabulator-group-level-3 .tabulator-arrow{margin-left:60px}.tabulator-row.tabulator-group.tabulator-group-level-4 .tabulator-arrow{margin-left:80px}.tabulator-row.tabulator-group.tabulator-group-level-5 .tabulator-arrow{margin-left:100px}.tabulator-row.tabulator-group .tabulator-arrow{display:inline-block;width:0;height:0;margin-right:16px;border-top:6px solid transparent;border-bottom:6px solid transparent;border-right:0;border-left:6px solid #666;vertical-align:middle}.tabulator-row.tabulator-group span{margin-left:10px;color:#666}.tabulator-edit-select-list{position:absolute;display:inline-block;box-sizing:border-box;max-height:200px;background:#666;border:1px solid #888;font-size:14px;overflow-y:auto;-webkit-overflow-scrolling:touch;z-index:4}.tabulator-edit-select-list .tabulator-edit-select-list-item{padding:4px;color:#fff}.tabulator-edit-select-list .tabulator-edit-select-list-item.active{color:#666;background:#999}.tabulator-edit-select-list .tabulator-edit-select-list-item:hover{cursor:pointer;color:#666;background:#999}.tabulator-edit-select-list .tabulator-edit-select-list-group{border-bottom:1px solid #888;padding:4px;padding-top:6px;color:#fff;font-weight:700} -/*# sourceMappingURL=tabulator_midnight.min.css.map */ diff --git a/Gems/AssetMemoryAnalyzer/External/tabulator-master/dist/css/tabulator_midnight.min.css.map b/Gems/AssetMemoryAnalyzer/External/tabulator-master/dist/css/tabulator_midnight.min.css.map deleted file mode 100644 index d82ee592b8..0000000000 --- a/Gems/AssetMemoryAnalyzer/External/tabulator-master/dist/css/tabulator_midnight.min.css.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"sources":["tabulator_midnight.scss"],"names":[],"mappings":"AAyCA,WACC,kBAAkB,AAClB,sBAtCgB,AAuChB,sBAxCqB,AAyCrB,gBAAe,AACf,eAxCa,AAyCb,gBAAgB,AAMhB,uBAAwB,CAwexB,AApfD,iFAiBI,cAAc,CACd,AAlBJ,kCAuBE,yBAAiB,AAAjB,sBAAiB,AAAjB,qBAAiB,AAAjB,gBAAiB,CACjB,AAxBF,6BA+BE,WAAU,AAEV,6BA9DwB,AAgExB,WAlEmB,AAmEnB,gBAAgB,AAEhB,mBAAmB,AAGnB,sBAAsB,AACtB,wBAAwB,AACxB,yBAAyB,AACzB,mBAAoB,CAwPpB,AApSF,yEA4BE,kBAAiB,AACjB,sBAAsB,AAKtB,sBAlEyB,AAuEzB,eAAe,CAvCjB,AAoPG,4CApMA,qBAAoB,AAGpB,4BAjFoB,AAmFpB,gBAAe,AACf,qBAAsB,CA8LtB,AApPH,6DA0DI,kBAAkB,AAClB,sBAxFsB,AAyFtB,mBAA8C,AAC9C,mBAAoB,CACpB,AA9DJ,mEAkEI,sBAAqB,AACrB,kBAAkB,AAClB,WAAW,CAwCX,AA5GJ,wFAwEK,sBAAqB,AACrB,WAAW,AAEX,mBAAmB,AACnB,gBAAgB,AAChB,uBAAuB,AACvB,qBAAqB,CAerB,AA7FL,gHAkFM,sBAAsB,AACtB,WAAW,AAEX,sBAAqB,AAErB,YAAW,AAEX,gBAAgB,AAChB,UAAW,CACX,AA3FN,oFAiGK,qBAAqB,AACrB,kBAAkB,AAClB,QAAO,AACP,UAAS,AACT,QAAQ,AACR,SAAS,AACT,kCAAkC,AAClC,mCAAmC,AACnC,4BAjImB,CAkInB,AA1GL,0FAmHK,kBAAiB,AACjB,oBAAa,AAAb,aAAa,AAEb,0BApJkB,AAqJlB,eAAgB,CAKhB,AA5HL,oHA0HM,iBAAiB,CACjB,AA3HN,0FAkIK,YAAa,CACb,AAnIL,+DAwII,kBAAkB,AAClB,mCAAgE,AAChE,qBAxKmB,CAyKnB,AA3IJ,qEA+II,kBAAkB,AAClB,sBAAsB,AACtB,eAAc,AACd,WAAU,AACV,iBAAkB,CAuBlB,AA1KJ,8EAuJK,qBAAsB,CACtB,AAxJL,yEA2JK,cAAe,CACf,AA5JL,uJA+JK,sBAAqB,AACrB,gBAAgB,AAChB,UAAW,CACX,AAlKL,sFAsKO,QAAS,AACT,QAAS,CACV,AAxKN,oFA+KK,kBAAkB,CAClB,AAhLL,qEAmLK,eAAc,AACd,wBAAoD,CACpD,AArLL,uHA0LM,gBAAgB,AAChB,4BAnNkB,CAoNlB,AA5LN,sHAiMM,gBAAgB,AAChB,4BA3NgB,CA4NhB,AAnMN,uHAwMM,0BAjOgB,AAkOhB,kBAAmB,CACnB,AA1MN,+GAiNM,iCAAyB,AAAzB,uBAAyB,AAAzB,yBAAyB,AACzB,uBAAuB,AAEvB,oBAAY,AAAZ,aAAY,AACZ,sBAAkB,AAAlB,mBAAkB,AAClB,qBAAsB,AAAtB,sBAAsB,CACtB,AAvNN,oHA4NM,wBAAyB,CACzB,AA7NN,2GAkOM,gBAAe,AACf,gBAAgB,CAChB,AApON,uIAwOO,gBAAe,AACf,mBAAmB,CACnB,AA1OP,uGA+OM,qBAAqB,CACrB,AAhPN,+CAuPG,qBAAqB,AACrB,kBAAkB,AAIlB,SAAW,CASX,AArQH,qEA+PI,2BAlRgB,CAmRhB,AAhQJ,sEAmQI,0BAtRgB,CAuRhB,AApQJ,qDAyQG,sBAAqB,AACrB,eAAc,AAEd,6BAAyD,AAUzD,0BAzSiB,AA0SjB,6BArToB,AAuTpB,eAAgB,CAChB,AA1RH,oEA+QI,4BAAyD,CAKzD,AApRJ,iGAkRK,YAAa,CACb,AAnRL,2DA6RG,cAAc,CAKd,AAlSH,iEAgSI,YAAa,CACb,AAjSJ,kCAwSE,kBAAiB,AACjB,WAAU,AACV,mBAAmB,AACnB,cAAa,AACb,gCAAiC,CAyDjC,AArWF,wCA+SG,YAAa,CACb,AAhTH,yDAoTG,sBAAqB,AACrB,oBAAa,AAAb,aAAa,AACb,sBAAkB,AAAlB,mBAAkB,AASlB,UAAU,CAYV,AA3UH,wFAyTI,kBAAkB,AAClB,MAAK,AACL,OAAM,AACN,WAAW,CACX,AA7TJ,8DAkUI,qBAAqB,AAErB,cAAa,AACb,aAAY,AAEZ,WAAU,AACV,gBAAiB,AACjB,cAAe,CACf,AA1UJ,mDA+UG,kBAAiB,AACjB,qBAAoB,AACpB,sBAtWqB,AAuWrB,mBAAmB,AACnB,iBAAgB,AAChB,UAtWe,CAsXf,AApWH,kFAwVK,gBAAiB,AACjB,4BAAwD,CASxD,AAlWL,sGA4VM,4BA/Wc,CAgXd,AA7VN,yGAgWM,yBAnXc,CAoXd,AAjWN,wCAyWE,kBAAiB,AACjB,QAAO,AACP,MAAK,AACL,SAAQ,AACR,SAAS,CAUT,AAvXF,6CAgXG,OAAM,AACN,UAAU,CACV,AAlXH,8CAqXG,gBAAgB,CAChB,AAtXH,6BA4XE,iBAAgB,AAChB,0BAlYwB,AAmYxB,sBAtYyB,AAuYzB,iBAAgB,AAChB,WAvYmB,AAwYnB,gBAAgB,AAChB,mBAAkB,AAClB,qBAAgB,AAAhB,iBAAgB,AAEhB,sBAAsB,AACtB,wBAAwB,AACxB,yBAAyB,AACzB,mBAAoB,CAiEpB,AAzcF,qDA2YG,sBAAqB,AACrB,wBAAuB,AACvB,sBAA2B,AAE3B,gBAAgB,AAEhB,6BAAwD,AAWxD,6BA/aiB,AAgbjB,0BAhbiB,AAkbjB,eAAgB,CAMhB,AAraH,oEAoZI,6BAAwD,AACxD,UApbiB,CAybjB,AA1ZJ,iGAwZK,YAAa,CACb,AAzZL,gEAkaI,mBAAkB,AAClB,kBAAkB,CAClB,AApaJ,8CAyaG,YAAY,CACZ,AA1aH,6CA8aG,qBAAoB,AACpB,aAAY,AACZ,sBAtboB,AAubpB,kBAAiB,AACjB,gBAAe,AACf,8BAA+B,AAC/B,WA3bkB,AA4blB,oBAAmB,AACnB,oBAAmB,AACnB,iBAAiB,CAiBjB,AAxcH,oDA0bI,UA9bmB,CA+bnB,AA3bJ,sDA8bI,UAAU,CACV,AA/bJ,kEAmcK,eAAc,AACd,0BAAyB,AACzB,UAAU,CACV,AAtcL,6BA6cE,kBAAiB,AACjB,oBAAa,AAAb,aAAa,AACb,sBAAkB,AAAlB,mBAAkB,AAElB,MAAK,AACL,OAAM,AACN,UAAW,AAEX,YAAW,AACX,WAAU,AACV,0BAAyB,AACzB,iBAAiB,CA2BjB,AAnfF,mDA4dG,qBAAoB,AAEpB,cAAa,AACb,kBAAiB,AAEjB,mBAAkB,AAElB,gBAAe,AACf,gBAAgB,AAChB,cAAc,CAad,AAlfH,qEAyeI,sBAAqB,AACrB,UAAU,CACV,AA3eJ,mEA+eI,sBAAqB,AACrB,aAAa,CACb,AAMJ,eACC,kBAAkB,AAClB,sBAAsB,AAEtB,gBAA0C,AAC1C,qBAjhBuB,CA23BvB,AA/WD,6BAQE,qBAnhByB,CAohBzB,AATF,0CAYE,sBAphBsB,AAqhBtB,cAAe,CACf,AAdF,kCAiBE,qBAvhB0B,CAwhB1B,AAlBF,wCAqBE,sBA1hB+B,AA2hB/B,cAAe,CACf,AAvBF,gCA0BE,kBAAkB,AAElB,0BAtiBkB,AAuiBlB,6BAviBkB,AAyiBlB,8BAA+B,AAC/B,SAAU,CACV,AAjCF,4CAqCE,kBAAiB,AACjB,QAAO,AACP,SAAQ,AACR,OAAM,AACN,UAAU,CAUV,AAnDF,iDA4CG,MAAK,AACL,WAAW,CACX,AA9CH,kDAiDG,gBAAgB,CAChB,AAlDH,iCAsDE,qBAAqB,AACrB,kBAAkB,AAElB,yBAAyB,AAEzB,SAAW,CASX,AApEF,uDA8DG,2BAxkBiB,CAykBjB,AA/DH,wDAkEG,0BA5kBiB,CA6kBjB,AAnEH,8CAuEE,sBAAqB,AAErB,YAAW,AAEX,0BArlBkB,AAslBlB,4BAtlBkB,CAymBlB,AA/FF,oDA+EG,YAAY,CACZ,AAhFH,oDAmFG,cA7mBW,CAwnBX,AA9FH,0DAuFK,iBAAkB,CAKlB,AA5FL,wEA0FM,kBAAkB,CAClB,AA3FN,+BAoGE,qBAAoB,AACpB,kBAAkB,AAClB,sBAAqB,AACrB,YAAW,AACX,4BAlnBkB,AAmnBlB,sBAAqB,AACrB,mBAAkB,AAClB,gBAAe,AACf,sBAAsB,CAkLtB,AA9RF,iDAgHG,sBAnnBe,AAonBf,SAAU,CAMV,AAvHH,+GAoHI,WAAU,AACV,sBAAsB,CACtB,AAtHJ,yDA0HG,qBA5nBgB,CAmoBhB,AAjIH,+HA4HI,WAAU,AACV,uBAAsB,AAEtB,UAjoBe,CAkoBf,AAhIJ,6EAsII,YAAa,CACb,AAvIJ,oDA6IG,2BAAoB,AAApB,oBAAoB,AACpB,sBAAkB,AAAlB,mBAAkB,AAElB,sBAAsB,AACtB,wBAAwB,AACxB,yBAAyB,AACzB,mBAAoB,CAcpB,AAjKH,8EAuJI,SAAS,CAST,AAhKJ,wGA2JK,WAAU,AACV,WAAU,AACV,eAAc,AACd,eAAe,CACf,AA/JL,2DAoKG,qBAAoB,AACpB,sBAAqB,AAErB,WAAU,AACV,UAAS,AAET,gBAAe,AACf,iBAAgB,AAEhB,8BAA6B,AAE7B,2BAzrBiB,AA0rBjB,4BA1rBiB,CA2rBjB,AAjLH,4DAqLG,2BAAmB,AAAnB,oBAAmB,AACnB,qBAAsB,AAAtB,uBAAsB,AACtB,sBAAkB,AAAlB,mBAAkB,AAClB,sBAAqB,AAErB,YAAW,AACX,WAAU,AAEV,iBAAgB,AAEhB,sBAxsBe,AAysBf,kBAAiB,AACjB,0BAA4B,AAE5B,eAAe,CAmDf,AAtPH,kEAsMI,eAAc,AACd,yBAA4B,CAC5B,AAxMJ,kGA2MI,qBAAoB,AACpB,kBAAkB,AAElB,WAAW,AACX,UAAU,AAEV,sBAAuB,CAavB,AA9NJ,wGAoNK,kBAAkB,AAClB,WAAW,AACX,UAAU,AACV,QAAQ,AAER,WAAW,AACX,UAAU,AAEV,eAruBa,CAsuBb,AA7NL,gGAiOI,qBAAoB,AACpB,kBAAkB,AAElB,WAAW,AACX,UAAU,AAEV,eAhvBc,CA6vBd,AApPJ,sGA0OK,kBAAkB,AAClB,WAAW,AACX,UAAU,AACV,QAAQ,AAER,WAAW,AACX,UAAU,AAEV,eA3vBa,CA4vBb,AAnPL,qEAyPG,2BAAoB,AAApB,oBAAoB,AACpB,sBAAkB,AAAlB,mBAAkB,AAClB,qBAAsB,AAAtB,uBAAsB,AAEtB,sBAAsB,AACtB,wBAAwB,AACxB,yBAAyB,AACzB,oBAAoB,AAEpB,YAAW,AACX,WAAU,AAEV,mBAAkB,AAClB,gBAAe,AAEf,WApxBqB,AAqxBrB,gBAAgB,AAChB,eAAe,CAmBf,AA7RH,2EA6QI,UAAU,CACV,AA9QJ,sHAkRK,eAAe,CACf,AAnRL,sOA2RI,YAAY,CACZ,AA5RJ,+BAoSE,sBAAqB,AACrB,6BAA4B,AAC5B,4BAhzBkB,AAizBlB,0BAAyB,AACzB,YAAW,AACX,kBAAiB,AACjB,gBAAe,AACf,gBAAgB,AAChB,WAAU,AAEV,cAAe,CAgEf,AA9WF,qCAiTG,eAAc,AACd,+BAA+B,CAC/B,AAnTH,wEAuTI,kBAAiB,AACjB,kCAAkC,AAClC,mCAAmC,AACnC,0BA10BkB,AA20BlB,eAAgB,CAChB,AA5TJ,wEAiUI,gBAAgB,CAChB,AAlUJ,wEAuUI,gBAAgB,CAChB,AAxUJ,wEA6UI,gBAAgB,CAChB,AA9UJ,wEAmVI,gBAAgB,CAChB,AApVJ,wEAyVI,iBAAiB,CACjB,AA1VJ,gDA+VG,qBAAqB,AACrB,QAAQ,AACR,SAAS,AACT,kBAAiB,AACjB,iCAAiC,AACjC,oCAAoC,AACpC,eAAe,AACf,2BAt3BmB,AAu3BnB,qBAAqB,CACrB,AAxWH,oCA2WG,iBAAgB,AAChB,UAAU,CACV,AAIH,4BACC,kBAAkB,AAClB,qBAAoB,AACpB,sBAAqB,AAErB,iBAAgB,AAEhB,gBAp4BuB,AAq4BvB,sBAn4BmB,AAq4BnB,eAr5Ba,AAu5Bb,gBAAe,AACf,iCAAiC,AAEjC,SAAc,CA6Bd,AA5CD,6DAkBE,YAAW,AAEX,UA94BgB,CA25BhB,AAjCF,oEAuBG,WAp5BqB,AAq5BrB,eA54Be,CA64Bf,AAzBH,mEA4BG,eAAc,AAEd,WA35BqB,AA45BrB,eAn5Be,CAo5Bf,AAhCH,8DAoCE,6BA/5BkB,AAi6BlB,YAAW,AACX,gBAAe,AAEf,WAn6BgB,AAo6BhB,eAAgB,CAChB","file":"tabulator_midnight.min.css","sourcesContent":["/* Tabulator v4.1.2 (c) Oliver Folkerd */\n\n\r\n//Main Theme Variables\r\n$backgroundColor: #222 !default; //background color of tabulator\r\n$borderColor:#333 !default; //border to tabulator\r\n$textSize:14px !default; //table text size\r\n\r\n//header themeing\r\n$headerBackgroundColor:#333 !default; //border to tabulator\r\n$headerTextColor:#fff !default; //header text colour\r\n$headerBorderColor:#aaa !default; //header border color\r\n$headerSeperatorColor:#999 !default; //header bottom seperator color\r\n$headerMargin:4px !default; //padding round header\r\n\r\n//column header arrows\r\n$sortArrowActive: #666 !default;\r\n$sortArrowInactive: #bbb !default;\r\n\r\n//row themeing\r\n$rowBackgroundColor:#666 !default; //table row background color\r\n$rowAltBackgroundColor:#444 !default; //table row background color\r\n$rowBorderColor:#888 !default; //table border color\r\n$rowTextColor:#fff !default; //table text color\r\n$rowHoverBackground:#999 !default; //row background color on hover\r\n\r\n$rowSelectedBackground: #000 !default; //row background color when selected\r\n$rowSelectedBackgroundHover: #888 !default;//row background color when selected and hovered\r\n\r\n$editBoxColor:#999 !default; //border color for edit boxes\r\n$errorColor:#dd0000 !default; //error indication\r\n\r\n//footer themeing\r\n$footerBackgroundColor:#333 !default; //border to tabulator\r\n$footerTextColor:#333 !default; //footer text colour\r\n$footerBorderColor:#aaa !default; //footer border color\r\n$footerSeperatorColor:#999 !default; //footer bottom seperator color\r\n$footerActiveColor:#fff !default; //footer bottom active text color\r\n\r\n\r\n//Tabulator Containing Element\r\n.tabulator{\r\n\tposition: relative;\r\n\tborder: 1px solid $borderColor;\r\n\tbackground-color: $backgroundColor;\r\n\toverflow:hidden;\r\n\tfont-size:$textSize;\r\n\ttext-align: left;\r\n\r\n\t-webkit-transform: translatez(0);\r\n\t-moz-transform: translatez(0);\r\n\t-ms-transform: translatez(0);\r\n\t-o-transform: translatez(0);\r\n\ttransform: translatez(0);\r\n\r\n\t&[tabulator-layout=\"fitDataFill\"]{\r\n\t\t.tabulator-tableHolder{\r\n\t\t\t.tabulator-table{\r\n\t\t\t\tmin-width:100%;\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\r\n\t&.tabulator-block-select{\r\n\t\tuser-select: none;\r\n\t}\r\n\r\n\t//column header containing element\r\n\t.tabulator-header{\r\n\t\tposition:relative;\r\n\t\tbox-sizing: border-box;\r\n\r\n\t\twidth:100%;\r\n\r\n\t\tborder-bottom:1px solid $headerSeperatorColor;\r\n\t\tbackground-color: $headerBackgroundColor;\r\n\t\tcolor: $headerTextColor;\r\n\t\tfont-weight:bold;\r\n\r\n\t\twhite-space: nowrap;\r\n\t\toverflow:hidden;\r\n\r\n\t\t-moz-user-select: none;\r\n\t\t-khtml-user-select: none;\r\n\t\t-webkit-user-select: none;\r\n\t\t-o-user-select: none;\r\n\r\n\t\t//individual column header element\r\n\t\t.tabulator-col{\r\n\t\t\tdisplay:inline-block;\r\n\t\t\tposition:relative;\r\n\t\t\tbox-sizing:border-box;\r\n\t\t\tborder-right:1px solid $headerBorderColor;\r\n\t\t\tbackground-color: $headerBackgroundColor;\r\n\t\t\ttext-align:left;\r\n\t\t\tvertical-align: bottom;\r\n\t\t\toverflow: hidden;\r\n\r\n\t\t\t&.tabulator-moving{\r\n\t\t\t\tposition: absolute;\r\n\t\t\t\tborder:1px solid $headerSeperatorColor;\r\n\t\t\t\tbackground:darken($headerBackgroundColor, 10%);\r\n\t\t\t\tpointer-events: none;\r\n\t\t\t}\r\n\r\n\t\t\t//hold content of column header\r\n\t\t\t.tabulator-col-content{\r\n\t\t\t\tbox-sizing:border-box;\r\n\t\t\t\tposition: relative;\r\n\t\t\t\tpadding:4px;\r\n\r\n\t\t\t\t//hold title of column header\r\n\t\t\t\t.tabulator-col-title{\r\n\t\t\t\t\tbox-sizing:border-box;\r\n\t\t\t\t\twidth: 100%;\r\n\r\n\t\t\t\t\twhite-space: nowrap;\r\n\t\t\t\t\toverflow: hidden;\r\n\t\t\t\t\ttext-overflow: ellipsis;\r\n\t\t\t\t\tvertical-align:bottom;\r\n\r\n\t\t\t\t\t//element to hold title editor\r\n\t\t\t\t\t.tabulator-title-editor{\r\n\t\t\t\t\t\tbox-sizing: border-box;\r\n\t\t\t\t\t\twidth: 100%;\r\n\r\n\t\t\t\t\t\tborder:1px solid #999;\r\n\r\n\t\t\t\t\t\tpadding:1px;\r\n\r\n\t\t\t\t\t\tbackground: #444;\r\n\t\t\t\t\t\tcolor: #fff;\r\n\t\t\t\t\t}\r\n\r\n\t\t\t\t}\r\n\r\n\t\t\t\t//column sorter arrow\r\n\t\t\t\t.tabulator-arrow{\r\n\t\t\t\t\tdisplay: inline-block;\r\n\t\t\t\t\tposition: absolute;\r\n\t\t\t\t\ttop:9px;\r\n\t\t\t\t\tright:8px;\r\n\t\t\t\t\twidth: 0;\r\n\t\t\t\t\theight: 0;\r\n\t\t\t\t\tborder-left: 6px solid transparent;\r\n\t\t\t\t\tborder-right: 6px solid transparent;\r\n\t\t\t\t\tborder-bottom: 6px solid $sortArrowInactive;\r\n\t\t\t\t}\r\n\r\n\t\t\t}\r\n\r\n\t\t\t//complex header column group\r\n\t\t\t&.tabulator-col-group{\r\n\r\n\t\t\t\t//gelement to hold sub columns in column group\r\n\t\t\t\t.tabulator-col-group-cols{\r\n\t\t\t\t\tposition:relative;\r\n\t\t\t\t\tdisplay: flex;\r\n\r\n\t\t\t\t\tborder-top:1px solid $headerBorderColor;\r\n\t\t\t\t\toverflow: hidden;\r\n\r\n\t\t\t\t\t.tabulator-col:last-child{\r\n\t\t\t\t\t\tmargin-right:-1px;\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t\t//hide left resize handle on first column\r\n\t\t\t&:first-child{\r\n\t\t\t\t.tabulator-col-resize-handle.prev{\r\n\t\t\t\t\tdisplay: none;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t\t//placeholder element for sortable columns\r\n\t\t\t&.ui-sortable-helper{\r\n\t\t\t\tposition: absolute;\r\n\t\t\t\tbackground-color: darken($headerBackgroundColor, 10%) !important;\r\n\t\t\t\tborder:1px solid $headerBorderColor;\r\n\t\t\t}\r\n\r\n\t\t\t//header filter containing element\r\n\t\t\t.tabulator-header-filter{\r\n\t\t\t\tposition: relative;\r\n\t\t\t\tbox-sizing: border-box;\r\n\t\t\t\tmargin-top:2px;\r\n\t\t\t\twidth:100%;\r\n\t\t\t\ttext-align: center;\r\n\r\n\t\t\t\t//styling adjustment for inbuilt editors\r\n\t\t\t\ttextarea{\r\n\t\t\t\t\theight:auto !important;\r\n\t\t\t\t}\r\n\r\n\t\t\t\tsvg{\r\n\t\t\t\t\tmargin-top: 3px;\r\n\t\t\t\t}\r\n\r\n\t\t\t\tinput, select{\r\n\t\t\t\t\tborder:1px solid #999;\r\n\t\t\t\t\tbackground: #444;\r\n\t\t\t\t\tcolor: #fff;\r\n\t\t\t\t}\r\n\r\n\t\t\t\tinput{\r\n\t\t\t\t\t&::-ms-clear {\r\n\t\t\t\t\t width : 0;\r\n\t\t\t\t\t height: 0;\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t\t//styling child elements for sortable columns\r\n\t\t\t&.tabulator-sortable{\r\n\t\t\t\t.tabulator-col-title{\r\n\t\t\t\t\tpadding-right:25px;\r\n\t\t\t\t}\r\n\r\n\t\t\t\t&:hover{\r\n\t\t\t\t\tcursor:pointer;\r\n\t\t\t\t\tbackground-color:darken($headerBackgroundColor, 10%);\r\n\t\t\t\t}\r\n\r\n\r\n\t\t\t\t&[aria-sort=\"none\"]{\r\n\t\t\t\t\t.tabulator-col-content .tabulator-arrow{\r\n\t\t\t\t\t\tborder-top: none;\r\n\t\t\t\t\t\tborder-bottom: 6px solid $sortArrowInactive;\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\r\n\t\t\t\t&[aria-sort=\"asc\"]{\r\n\t\t\t\t\t.tabulator-col-content .tabulator-arrow{\r\n\t\t\t\t\t\tborder-top: none;\r\n\t\t\t\t\t\tborder-bottom: 6px solid $sortArrowActive;\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\r\n\t\t\t\t&[aria-sort=\"desc\"]{\r\n\t\t\t\t\t.tabulator-col-content .tabulator-arrow{\r\n\t\t\t\t\t\tborder-top: 6px solid $sortArrowActive;\r\n\t\t\t\t\t\tborder-bottom: none;\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t\t&.tabulator-col-vertical{\r\n\t\t\t\t.tabulator-col-content{\r\n\t\t\t\t\t.tabulator-col-title{\r\n\t\t\t\t\t\twriting-mode: vertical-rl;\r\n\t\t\t\t\t\ttext-orientation: mixed;\r\n\r\n\t\t\t\t\t\tdisplay:flex;\r\n\t\t\t\t\t\talign-items:center;\r\n\t\t\t\t\t\tjustify-content:center;\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\r\n\t\t\t\t&.tabulator-col-vertical-flip{\r\n\t\t\t\t\t.tabulator-col-title{\r\n\t\t\t\t\t\ttransform: rotate(180deg);\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\r\n\t\t\t\t&.tabulator-sortable{\r\n\t\t\t\t\t.tabulator-col-title{\r\n\t\t\t\t\t\tpadding-right:0;\r\n\t\t\t\t\t\tpadding-top:20px;\r\n\t\t\t\t\t}\r\n\r\n\t\t\t\t\t&.tabulator-col-vertical-flip{\r\n\t\t\t\t\t\t.tabulator-col-title{\r\n\t\t\t\t\t\t\tpadding-right:0;\r\n\t\t\t\t\t\t\tpadding-bottom:20px;\r\n\t\t\t\t\t\t}\r\n\r\n\t\t\t\t\t}\r\n\r\n\t\t\t\t\t.tabulator-arrow{\r\n\t\t\t\t\t\tright:calc(50% - 6px);\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t}\r\n\r\n\t\t.tabulator-frozen{\r\n\t\t\tdisplay: inline-block;\r\n\t\t\tposition: absolute;\r\n\r\n\t\t\t// background-color: inherit;\r\n\r\n\t\t\tz-index: 10;\r\n\r\n\t\t\t&.tabulator-frozen-left{\r\n\t\t\t\tborder-right:2px solid $rowBorderColor;\r\n\t\t\t}\r\n\r\n\t\t\t&.tabulator-frozen-right{\r\n\t\t\t\tborder-left:2px solid $rowBorderColor;\r\n\t\t\t}\r\n\t\t}\r\n\r\n\r\n\t\t.tabulator-calcs-holder{\r\n\t\t\tbox-sizing:border-box;\r\n\t\t\tmin-width:400%;\r\n\r\n\t\t\tbackground:darken($headerBackgroundColor, 10%) !important;\r\n\r\n\t\t\t.tabulator-row{\r\n\t\t\t\tbackground:darken($headerBackgroundColor, 10%) !important;\r\n\r\n\t\t\t\t.tabulator-col-resize-handle{\r\n\t\t\t\t\tdisplay: none;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t\tborder-top:1px solid $rowBorderColor;\r\n\t\t\tborder-bottom:1px solid $headerBorderColor;\r\n\r\n\t\t\toverflow: hidden;\r\n\t\t}\r\n\r\n\t\t.tabulator-frozen-rows-holder{\r\n\t\t\tmin-width:400%;\r\n\r\n\t\t\t&:empty{\r\n\t\t\t\tdisplay: none;\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t}\r\n\r\n\t//scrolling element to hold table\r\n\t.tabulator-tableHolder{\r\n\t\tposition:relative;\r\n\t\twidth:100%;\r\n\t\twhite-space: nowrap;\r\n\t\toverflow:auto;\r\n\t\t-webkit-overflow-scrolling: touch;\r\n\r\n\t\t&:focus{\r\n\t\t\toutline: none;\r\n\t\t}\r\n\r\n\t\t//default placeholder element\r\n\t\t.tabulator-placeholder{\r\n\t\t\tbox-sizing:border-box;\r\n\t\t\tdisplay: flex;\r\n\t\t\talign-items:center;\r\n\r\n\t\t\t&[tabulator-render-mode=\"virtual\"]{\r\n\t\t\t\tposition: absolute;\r\n\t\t\t\ttop:0;\r\n\t\t\t\tleft:0;\r\n\t\t\t\theight:100%;\r\n\t\t\t}\r\n\r\n\t\t\twidth:100%;\r\n\r\n\t\t\tspan{\r\n\t\t\t\tdisplay: inline-block;\r\n\r\n\t\t\t\tmargin:0 auto;\r\n\t\t\t\tpadding:10px;\r\n\r\n\t\t\t\tcolor:#eee;\r\n\t\t\t\tfont-weight: bold;\r\n\t\t\t\tfont-size: 20px;\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\t//element to hold table rows\r\n\t\t.tabulator-table{\r\n\t\t\tposition:relative;\r\n\t\t\tdisplay:inline-block;\r\n\t\t\tbackground-color:$rowBackgroundColor;\r\n\t\t\twhite-space: nowrap;\r\n\t\t\toverflow:visible;\r\n\t\t\tcolor:$rowTextColor;\r\n\r\n\t\t\t.tabulator-row{\r\n\t\t\t\t&.tabulator-calcs{\r\n\t\t\t\t\tfont-weight: bold;\r\n\t\t\t\t\tbackground:darken($rowAltBackgroundColor, 5%) !important;\r\n\r\n\t\t\t\t\t&.tabulator-calcs-top{\r\n\t\t\t\t\t\tborder-bottom:2px solid $rowBorderColor;\r\n\t\t\t\t\t}\r\n\r\n\t\t\t\t\t&.tabulator-calcs-bottom{\r\n\t\t\t\t\t\tborder-top:2px solid $rowBorderColor;\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\r\n\t//column resize handles\r\n\t.tabulator-col-resize-handle{\r\n\t\tposition:absolute;\r\n\t\tright:0;\r\n\t\ttop:0;\r\n\t\tbottom:0;\r\n\t\twidth:5px;\r\n\r\n\t\t&.prev{\r\n\t\t\tleft:0;\r\n\t\t\tright:auto;\r\n\t\t}\r\n\r\n\t\t&:hover{\r\n\t\t\tcursor:ew-resize;\r\n\t\t}\r\n\t}\r\n\r\n\r\n\t//footer element\r\n\t.tabulator-footer{\r\n\t\tpadding:5px 10px;\r\n\t\tborder-top:1px solid $footerSeperatorColor;\r\n\t\tbackground-color: $footerBackgroundColor;\r\n\t\ttext-align:right;\r\n\t\tcolor: $footerTextColor;\r\n\t\tfont-weight:bold;\r\n\t\twhite-space:nowrap;\r\n\t\tuser-select:none;\r\n\r\n\t\t-moz-user-select: none;\r\n\t\t-khtml-user-select: none;\r\n\t\t-webkit-user-select: none;\r\n\t\t-o-user-select: none;\r\n\r\n\t\t.tabulator-calcs-holder{\r\n\t\t\tbox-sizing:border-box;\r\n\t\t\twidth:calc(100% + 20px);\r\n\t\t\tmargin:-5px -10px 5px -10px;\r\n\r\n\t\t\ttext-align: left;\r\n\r\n\t\t\tbackground:darken($footerBackgroundColor, 5%) !important;\r\n\r\n\t\t\t.tabulator-row{\r\n\t\t\t\tbackground:darken($footerBackgroundColor, 5%) !important;\r\n\t\t\t\tcolor:$headerTextColor;\r\n\r\n\t\t\t\t.tabulator-col-resize-handle{\r\n\t\t\t\t\tdisplay: none;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t\tborder-bottom:1px solid $rowBorderColor;\r\n\t\t\tborder-top:1px solid $rowBorderColor;\r\n\r\n\t\t\toverflow: hidden;\r\n\r\n\t\t\t&:only-child{\r\n\t\t\t\tmargin-bottom:-5px;\r\n\t\t\t\tborder-bottom:none;\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\t//pagination container element\r\n\t\t.tabulator-pages{\r\n\t\t\tmargin:0 7px;\r\n\t\t}\r\n\r\n\t\t//pagination button\r\n\t\t.tabulator-page{\r\n\t\t\tdisplay:inline-block;\r\n\t\t\tmargin:0 2px;\r\n\t\t\tborder:1px solid $footerBorderColor;\r\n\t\t\tborder-radius:3px;\r\n\t\t\tpadding:2px 5px;\r\n\t\t\tbackground:rgba(255,255,255,.2);\r\n\t\t\tcolor: $footerTextColor;\r\n\t\t\tfont-family:inherit;\r\n\t\t\tfont-weight:inherit;\r\n\t\t\tfont-size:inherit;\r\n\r\n\t\t\t&.active{\r\n\t\t\t\tcolor:$footerActiveColor;\r\n\t\t\t}\r\n\r\n\t\t\t&:disabled{\r\n\t\t\t\topacity:.5;\r\n\t\t\t}\r\n\r\n\t\t\t&:not(.disabled){\r\n\t\t\t\t&:hover{\r\n\t\t\t\t\tcursor:pointer;\r\n\t\t\t\t\tbackground:rgba(0,0,0,.2);\r\n\t\t\t\t\tcolor:#fff;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\r\n\t//holding div that contains loader and covers tabulator element to prevent interaction\r\n\t.tabulator-loader{\r\n\t\tposition:absolute;\r\n\t\tdisplay: flex;\r\n\t\talign-items:center;\r\n\r\n\t\ttop:0;\r\n\t\tleft:0;\r\n\t\tz-index:100;\r\n\r\n\t\theight:100%;\r\n\t\twidth:100%;\r\n\t\tbackground:rgba(0,0,0,.4);\r\n\t\ttext-align:center;\r\n\r\n\t\t//loading message element\r\n\t\t.tabulator-loader-msg{\r\n\t\t\tdisplay:inline-block;\r\n\r\n\t\t\tmargin:0 auto;\r\n\t\t\tpadding:10px 20px;\r\n\r\n\t\t\tborder-radius:10px;\r\n\r\n\t\t\tbackground:#fff;\r\n\t\t\tfont-weight:bold;\r\n\t\t\tfont-size:16px;\r\n\r\n\t\t\t//loading message\r\n\t\t\t&.tabulator-loading{\r\n\t\t\t\tborder:4px solid #333;\r\n\t\t\t\tcolor:#000;\r\n\t\t\t}\r\n\r\n\t\t\t//error message\r\n\t\t\t&.tabulator-error{\r\n\t\t\t\tborder:4px solid #D00;\r\n\t\t\t\tcolor:#590000;\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n}\r\n\r\n//row element\r\n.tabulator-row{\r\n\tposition: relative;\r\n\tbox-sizing: border-box;\r\n\r\n\tmin-height:$textSize + ($headerMargin * 2);\r\n\tbackground-color: $rowBackgroundColor;\r\n\r\n\t&:nth-child(even){\r\n\t\tbackground-color: $rowAltBackgroundColor;\r\n\t}\r\n\r\n\t&.tabulator-selectable:hover{\r\n\t\tbackground-color:$rowHoverBackground;\r\n\t\tcursor: pointer;\r\n\t}\r\n\r\n\t&.tabulator-selected{\r\n\t\tbackground-color:$rowSelectedBackground;\r\n\t}\r\n\r\n\t&.tabulator-selected:hover{\r\n\t\tbackground-color:$rowSelectedBackgroundHover;\r\n\t\tcursor: pointer;\r\n\t}\r\n\r\n\t&.tabulator-moving{\r\n\t\tposition: absolute;\r\n\r\n\t\tborder-top:1px solid $rowBorderColor;\r\n\t\tborder-bottom:1px solid $rowBorderColor;\r\n\r\n\t\tpointer-events: none !important;\r\n\t\tz-index:15;\r\n\t}\r\n\r\n\t//row resize handles\r\n\t.tabulator-row-resize-handle{\r\n\t\tposition:absolute;\r\n\t\tright:0;\r\n\t\tbottom:0;\r\n\t\tleft:0;\r\n\t\theight:5px;\r\n\r\n\t\t&.prev{\r\n\t\t\ttop:0;\r\n\t\t\tbottom:auto;\r\n\t\t}\r\n\r\n\t\t&:hover{\r\n\t\t\tcursor:ns-resize;\r\n\t\t}\r\n\t}\r\n\r\n\t.tabulator-frozen{\r\n\t\tdisplay: inline-block;\r\n\t\tposition: absolute;\r\n\r\n\t\tbackground-color: inherit;\r\n\r\n\t\tz-index: 10;\r\n\r\n\t\t&.tabulator-frozen-left{\r\n\t\t\tborder-right:2px solid $rowBorderColor;\r\n\t\t}\r\n\r\n\t\t&.tabulator-frozen-right{\r\n\t\t\tborder-left:2px solid $rowBorderColor;\r\n\t\t}\r\n\t}\r\n\r\n\t.tabulator-responsive-collapse{\r\n\t\tbox-sizing:border-box;\r\n\r\n\t\tpadding:5px;\r\n\r\n\t\tborder-top:1px solid $rowBorderColor;\r\n\t\tborder-bottom:1px solid $rowBorderColor;\r\n\r\n\t\t&:empty{\r\n\t\t\tdisplay:none;\r\n\t\t}\r\n\r\n\t\ttable{\r\n\t\t\tfont-size:$textSize;\r\n\r\n\t\t\ttr{\r\n\t\t\t\ttd{\r\n\t\t\t\t\tposition: relative;\r\n\r\n\t\t\t\t\t&:first-of-type{\r\n\t\t\t\t\t\tpadding-right:10px;\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\r\n\r\n\t//cell element\r\n\t.tabulator-cell{\r\n\t\tdisplay:inline-block;\r\n\t\tposition: relative;\r\n\t\tbox-sizing:border-box;\r\n\t\tpadding:4px;\r\n\t\tborder-right:1px solid $rowBorderColor;\r\n\t\tvertical-align:middle;\r\n\t\twhite-space:nowrap;\r\n\t\toverflow:hidden;\r\n\t\ttext-overflow:ellipsis;\r\n\r\n\r\n\t\t&.tabulator-editing{\r\n\t\t\tborder:1px solid $editBoxColor;\r\n\t\t\tpadding: 0;\r\n\r\n\t\t\tinput, select{\r\n\t\t\t\tborder:1px;\r\n\t\t\t\tbackground:transparent;\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\t&.tabulator-validation-fail{\r\n\t\t\tborder:1px solid $errorColor;\r\n\t\t\tinput, select{\r\n\t\t\t\tborder:1px;\r\n\t\t\t\tbackground:transparent;\r\n\r\n\t\t\t\tcolor: $errorColor;\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\t//hide left resize handle on first column\r\n\t\t&:first-child{\r\n\t\t\t.tabulator-col-resize-handle.prev{\r\n\t\t\t\tdisplay: none;\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\t//movable row handle\r\n\t\t&.tabulator-row-handle{\r\n\r\n\t\t\tdisplay: inline-flex;\r\n\t\t\talign-items:center;\r\n\r\n\t\t\t-moz-user-select: none;\r\n\t\t\t-khtml-user-select: none;\r\n\t\t\t-webkit-user-select: none;\r\n\t\t\t-o-user-select: none;\r\n\r\n\t\t\t//handle holder\r\n\t\t\t.tabulator-row-handle-box{\r\n\t\t\t\twidth:80%;\r\n\r\n\t\t\t\t//Hamburger element\r\n\t\t\t\t.tabulator-row-handle-bar{\r\n\t\t\t\t\twidth:100%;\r\n\t\t\t\t\theight:3px;\r\n\t\t\t\t\tmargin-top:2px;\r\n\t\t\t\t\tbackground:#666;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\t.tabulator-data-tree-branch{\r\n\t\t\tdisplay:inline-block;\r\n\t\t\tvertical-align:middle;\r\n\r\n\t\t\theight:9px;\r\n\t\t\twidth:7px;\r\n\r\n\t\t\tmargin-top:-9px;\r\n\t\t\tmargin-right:5px;\r\n\r\n\t\t\tborder-bottom-left-radius:1px;\r\n\r\n\t\t\tborder-left:2px solid $rowBorderColor;\r\n\t\t\tborder-bottom:2px solid $rowBorderColor;\r\n\t\t}\r\n\r\n\t\t.tabulator-data-tree-control{\r\n\r\n\t\t\tdisplay:inline-flex;\r\n\t\t\tjustify-content:center;\r\n\t\t\talign-items:center;\r\n\t\t\tvertical-align:middle;\r\n\r\n\t\t\theight:11px;\r\n\t\t\twidth:11px;\r\n\r\n\t\t\tmargin-right:5px;\r\n\r\n\t\t\tborder:1px solid $rowTextColor;\r\n\t\t\tborder-radius:2px;\r\n\t\t\tbackground:rgba(0, 0, 0, .1);\r\n\r\n\t\t\toverflow:hidden;\r\n\r\n\t\t\t&:hover{\r\n\t\t\t\tcursor:pointer;\r\n\t\t\t\tbackground:rgba(0, 0, 0, .2);\r\n\t\t\t}\r\n\r\n\t\t\t.tabulator-data-tree-control-collapse{\r\n\t\t\t\tdisplay:inline-block;\r\n\t\t\t\tposition: relative;\r\n\r\n\t\t\t\theight: 7px;\r\n\t\t\t\twidth: 1px;\r\n\r\n\t\t\t\tbackground: transparent;\r\n\r\n\t\t\t\t&:after {\r\n\t\t\t\t\tposition: absolute;\r\n\t\t\t\t\tcontent: \"\";\r\n\t\t\t\t\tleft: -3px;\r\n\t\t\t\t\ttop: 3px;\r\n\r\n\t\t\t\t\theight: 1px;\r\n\t\t\t\t\twidth: 7px;\r\n\r\n\t\t\t\t\tbackground: $rowTextColor;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t\t.tabulator-data-tree-control-expand{\r\n\t\t\t\tdisplay:inline-block;\r\n\t\t\t\tposition: relative;\r\n\r\n\t\t\t\theight: 7px;\r\n\t\t\t\twidth: 1px;\r\n\r\n\t\t\t\tbackground: $rowTextColor;\r\n\r\n\t\t\t\t&:after {\r\n\t\t\t\t\tposition: absolute;\r\n\t\t\t\t\tcontent: \"\";\r\n\t\t\t\t\tleft: -3px;\r\n\t\t\t\t\ttop: 3px;\r\n\r\n\t\t\t\t\theight: 1px;\r\n\t\t\t\t\twidth: 7px;\r\n\r\n\t\t\t\t\tbackground: $rowTextColor;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t}\r\n\r\n\t\t.tabulator-responsive-collapse-toggle{\r\n\t\t\tdisplay: inline-flex;\r\n\t\t\talign-items:center;\r\n\t\t\tjustify-content:center;\r\n\r\n\t\t\t-moz-user-select: none;\r\n\t\t\t-khtml-user-select: none;\r\n\t\t\t-webkit-user-select: none;\r\n\t\t\t-o-user-select: none;\r\n\r\n\t\t\theight:15px;\r\n\t\t\twidth:15px;\r\n\r\n\t\t\tborder-radius:20px;\r\n\t\t\tbackground:#fff;\r\n\r\n\t\t\tcolor:$rowBackgroundColor;\r\n\t\t\tfont-weight:bold;\r\n\t\t\tfont-size:1.1em;\r\n\r\n\t\t\t&:hover{\r\n\t\t\t\topacity:.7;\r\n\t\t\t}\r\n\r\n\t\t\t&.open{\r\n\t\t\t\t.tabulator-responsive-collapse-toggle-close{\r\n\t\t\t\t\tdisplay:initial;\r\n\t\t\t\t}\r\n\r\n\t\t\t\t.tabulator-responsive-collapse-toggle-open{\r\n\t\t\t\t\tdisplay:none;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t\t.tabulator-responsive-collapse-toggle-close{\r\n\t\t\t\tdisplay:none;\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\r\n\r\n\t//row grouping element\r\n\t&.tabulator-group{\r\n\r\n\t\tbox-sizing:border-box;\r\n\t\tborder-bottom:1px solid #999;\r\n\t\tborder-right:1px solid $rowBorderColor;\r\n\t\tborder-top:1px solid #999;\r\n\t\tpadding:5px;\r\n\t\tpadding-left:10px;\r\n\t\tbackground:#ccc;\r\n\t\tfont-weight:bold;\r\n\t\tcolor:#333;\r\n\r\n\t\tmin-width: 100%;\r\n\r\n\t\t&:hover{\r\n\t\t\tcursor:pointer;\r\n\t\t\tbackground-color:rgba(0,0,0,.1);\r\n\t\t}\r\n\r\n\t\t&.tabulator-group-visible{\r\n\t\t\t.tabulator-arrow{\r\n\t\t\t\tmargin-right:10px;\r\n\t\t\t\tborder-left: 6px solid transparent;\r\n\t\t\t\tborder-right: 6px solid transparent;\r\n\t\t\t\tborder-top: 6px solid $sortArrowActive;\r\n\t\t\t\tborder-bottom: 0;\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\t&.tabulator-group-level-1{\r\n\t\t\t.tabulator-arrow{\r\n\t\t\t\tmargin-left:20px;\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\t&.tabulator-group-level-2{\r\n\t\t\t.tabulator-arrow{\r\n\t\t\t\tmargin-left:40px;\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\t&.tabulator-group-level-3{\r\n\t\t\t.tabulator-arrow{\r\n\t\t\t\tmargin-left:60px;\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\t&.tabulator-group-level-4{\r\n\t\t\t.tabulator-arrow{\r\n\t\t\t\tmargin-left:80px;\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\t&.tabulator-group-level-5{\r\n\t\t\t.tabulator-arrow{\r\n\t\t\t\tmargin-left:100px;\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\t//sorting arrow\r\n\t\t.tabulator-arrow{\r\n\t\t\tdisplay: inline-block;\r\n\t\t\twidth: 0;\r\n\t\t\theight: 0;\r\n\t\t\tmargin-right:16px;\r\n\t\t\tborder-top: 6px solid transparent;\r\n\t\t\tborder-bottom: 6px solid transparent;\r\n\t\t\tborder-right: 0;\r\n\t\t\tborder-left: 6px solid $sortArrowActive;\r\n\t\t\tvertical-align:middle;\r\n\t\t}\r\n\r\n\t\tspan{\r\n\t\t\tmargin-left:10px;\r\n\t\t\tcolor:#666;\r\n\t\t}\r\n\t}\r\n}\r\n\r\n.tabulator-edit-select-list{\r\n\tposition: absolute;\r\n\tdisplay:inline-block;\r\n\tbox-sizing:border-box;\r\n\r\n\tmax-height:200px;\r\n\r\n\tbackground:$rowBackgroundColor;\r\n\tborder:1px solid $rowBorderColor;\r\n\r\n\tfont-size:$textSize;\r\n\r\n\toverflow-y:auto;\r\n\t-webkit-overflow-scrolling: touch;\r\n\r\n\tz-index: 10000;\r\n\r\n\t.tabulator-edit-select-list-item{\r\n\t\tpadding:4px;\r\n\r\n\t\tcolor:$rowTextColor;\r\n\r\n\t\t&.active{\r\n\t\t\tcolor:$rowBackgroundColor;\r\n\t\t\tbackground:$editBoxColor;\r\n\t\t}\r\n\r\n\t\t&:hover{\r\n\t\t\tcursor:pointer;\r\n\r\n\t\t\tcolor:$rowBackgroundColor;\r\n\t\t\tbackground:$editBoxColor;\r\n\t\t}\r\n\t}\r\n\r\n\t.tabulator-edit-select-list-group{\r\n\t\tborder-bottom:1px solid $rowBorderColor;\r\n\r\n\t\tpadding:4px;\r\n\t\tpadding-top:6px;\r\n\r\n\t\tcolor:$rowTextColor;\r\n\t\tfont-weight:bold;\r\n\t}\r\n}"]} \ No newline at end of file diff --git a/Gems/AssetMemoryAnalyzer/External/tabulator-master/dist/css/tabulator_modern.css b/Gems/AssetMemoryAnalyzer/External/tabulator-master/dist/css/tabulator_modern.css deleted file mode 100644 index 662b3e842e..0000000000 --- a/Gems/AssetMemoryAnalyzer/External/tabulator-master/dist/css/tabulator_modern.css +++ /dev/null @@ -1,794 +0,0 @@ -/* Tabulator v4.1.2 (c) Oliver Folkerd */ -.tabulator { - position: relative; - border: 1px solid #fff; - background-color: #fff; - overflow: hidden; - font-size: 16px; - text-align: left; - -ms-transform: translatez(0); - transform: translatez(0); -} - -.tabulator[tabulator-layout="fitDataFill"] .tabulator-tableHolder .tabulator-table { - min-width: 100%; -} - -.tabulator.tabulator-block-select { - -webkit-user-select: none; - -moz-user-select: none; - -ms-user-select: none; - user-select: none; -} - -.tabulator .tabulator-header { - position: relative; - box-sizing: border-box; - width: 100%; - border-bottom: 3px solid #3759D7; - margin-bottom: 4px; - background-color: #fff; - color: #3759D7; - font-weight: bold; - white-space: nowrap; - overflow: hidden; - -moz-user-select: none; - -khtml-user-select: none; - -webkit-user-select: none; - -o-user-select: none; - padding-left: 10px; - font-size: 1.1em; -} - -.tabulator .tabulator-header .tabulator-col { - display: inline-block; - position: relative; - box-sizing: border-box; - border-right: 2px solid #fff; - background-color: #fff; - text-align: left; - vertical-align: bottom; - overflow: hidden; -} - -.tabulator .tabulator-header .tabulator-col.tabulator-moving { - position: absolute; - border: 1px solid #3759D7; - background: #e6e6e6; - pointer-events: none; -} - -.tabulator .tabulator-header .tabulator-col .tabulator-col-content { - box-sizing: border-box; - position: relative; - padding: 4px; -} - -.tabulator .tabulator-header .tabulator-col .tabulator-col-content .tabulator-col-title { - box-sizing: border-box; - width: 100%; - white-space: nowrap; - overflow: hidden; - text-overflow: ellipsis; - vertical-align: bottom; -} - -.tabulator .tabulator-header .tabulator-col .tabulator-col-content .tabulator-col-title .tabulator-title-editor { - box-sizing: border-box; - width: 100%; - border: 1px solid #3759D7; - padding: 1px; - background: #fff; - font-size: 1em; - color: #3759D7; -} - -.tabulator .tabulator-header .tabulator-col .tabulator-col-content .tabulator-arrow { - display: inline-block; - position: absolute; - top: 9px; - right: 8px; - width: 0; - height: 0; - border-left: 6px solid transparent; - border-right: 6px solid transparent; - border-bottom: 6px solid #b7c3f1; -} - -.tabulator .tabulator-header .tabulator-col.tabulator-col-group .tabulator-col-group-cols { - position: relative; - display: -ms-flexbox; - display: flex; - border-top: 2px solid #3759D7; - overflow: hidden; -} - -.tabulator .tabulator-header .tabulator-col.tabulator-col-group .tabulator-col-group-cols .tabulator-col:last-child { - margin-right: -1px; -} - -.tabulator .tabulator-header .tabulator-col:first-child .tabulator-col-resize-handle.prev { - display: none; -} - -.tabulator .tabulator-header .tabulator-col.ui-sortable-helper { - position: absolute; - background-color: #e6e6e6 !important; - border: 1px solid #fff; -} - -.tabulator .tabulator-header .tabulator-col .tabulator-header-filter { - position: relative; - box-sizing: border-box; - margin-top: 2px; - width: 100%; - text-align: center; -} - -.tabulator .tabulator-header .tabulator-col .tabulator-header-filter textarea { - height: auto !important; -} - -.tabulator .tabulator-header .tabulator-col .tabulator-header-filter svg { - margin-top: 3px; -} - -.tabulator .tabulator-header .tabulator-col .tabulator-header-filter input::-ms-clear { - width: 0; - height: 0; -} - -.tabulator .tabulator-header .tabulator-col.tabulator-sortable .tabulator-col-title { - padding-right: 25px; -} - -.tabulator .tabulator-header .tabulator-col.tabulator-sortable:hover { - cursor: pointer; - background-color: #e6e6e6; -} - -.tabulator .tabulator-header .tabulator-col.tabulator-sortable[aria-sort="none"] .tabulator-col-content .tabulator-arrow { - border-top: none; - border-bottom: 6px solid #b7c3f1; -} - -.tabulator .tabulator-header .tabulator-col.tabulator-sortable[aria-sort="asc"] .tabulator-col-content .tabulator-arrow { - border-top: none; - border-bottom: 6px solid #3759D7; -} - -.tabulator .tabulator-header .tabulator-col.tabulator-sortable[aria-sort="desc"] .tabulator-col-content .tabulator-arrow { - border-top: 6px solid #3759D7; - border-bottom: none; -} - -.tabulator .tabulator-header .tabulator-col.tabulator-col-vertical .tabulator-col-content .tabulator-col-title { - -webkit-writing-mode: vertical-rl; - -ms-writing-mode: tb-rl; - writing-mode: vertical-rl; - text-orientation: mixed; - display: -ms-flexbox; - display: flex; - -ms-flex-align: center; - align-items: center; - -ms-flex-pack: center; - justify-content: center; -} - -.tabulator .tabulator-header .tabulator-col.tabulator-col-vertical.tabulator-col-vertical-flip .tabulator-col-title { - -ms-transform: rotate(180deg); - transform: rotate(180deg); -} - -.tabulator .tabulator-header .tabulator-col.tabulator-col-vertical.tabulator-sortable .tabulator-col-title { - padding-right: 0; - padding-top: 20px; -} - -.tabulator .tabulator-header .tabulator-col.tabulator-col-vertical.tabulator-sortable.tabulator-col-vertical-flip .tabulator-col-title { - padding-right: 0; - padding-bottom: 20px; -} - -.tabulator .tabulator-header .tabulator-col.tabulator-col-vertical.tabulator-sortable .tabulator-arrow { - right: calc(50% - 6px); -} - -.tabulator .tabulator-header .tabulator-frozen { - display: inline-block; - position: absolute; - z-index: 10; -} - -.tabulator .tabulator-header .tabulator-frozen.tabulator-frozen-left { - padding-left: 10px; - border-right: 2px solid #fff; -} - -.tabulator .tabulator-header .tabulator-frozen.tabulator-frozen-right { - border-left: 2px solid #fff; -} - -.tabulator .tabulator-header .tabulator-calcs-holder { - box-sizing: border-box; - min-width: 400%; - border-top: 2px solid #3759D7 !important; - background: white !important; - border-top: 1px solid #fff; - border-bottom: 1px solid #fff; - overflow: hidden; -} - -.tabulator .tabulator-header .tabulator-calcs-holder .tabulator-row { - padding-left: 0 !important; - background: white !important; -} - -.tabulator .tabulator-header .tabulator-calcs-holder .tabulator-row .tabulator-col-resize-handle { - display: none; -} - -.tabulator .tabulator-header .tabulator-calcs-holder .tabulator-row .tabulator-cell { - background: none; -} - -.tabulator .tabulator-header .tabulator-frozen-rows-holder { - min-width: 400%; -} - -.tabulator .tabulator-header .tabulator-frozen-rows-holder:empty { - display: none; -} - -.tabulator .tabulator-tableHolder { - position: relative; - width: 100%; - white-space: nowrap; - overflow: auto; - -webkit-overflow-scrolling: touch; -} - -.tabulator .tabulator-tableHolder:focus { - outline: none; -} - -.tabulator .tabulator-tableHolder .tabulator-placeholder { - box-sizing: border-box; - display: -ms-flexbox; - display: flex; - -ms-flex-align: center; - align-items: center; - width: 100%; -} - -.tabulator .tabulator-tableHolder .tabulator-placeholder[tabulator-render-mode="virtual"] { - position: absolute; - top: 0; - left: 0; - height: 100%; -} - -.tabulator .tabulator-tableHolder .tabulator-placeholder span { - display: inline-block; - margin: 0 auto; - padding: 10px; - color: #3759D7; - font-weight: bold; - font-size: 20px; -} - -.tabulator .tabulator-tableHolder .tabulator-table { - position: relative; - display: inline-block; - background-color: #f3f3f3; - white-space: nowrap; - overflow: visible; - color: #333; -} - -.tabulator .tabulator-tableHolder .tabulator-table .tabulator-row.tabulator-calcs { - font-weight: bold; - background: #f2f2f2 !important; -} - -.tabulator .tabulator-tableHolder .tabulator-table .tabulator-row.tabulator-calcs.tabulator-calcs-top { - border-bottom: 2px solid #3759D7; -} - -.tabulator .tabulator-tableHolder .tabulator-table .tabulator-row.tabulator-calcs.tabulator-calcs-bottom { - border-top: 2px solid #3759D7; -} - -.tabulator .tabulator-col-resize-handle { - position: absolute; - right: 0; - top: 0; - bottom: 0; - width: 5px; -} - -.tabulator .tabulator-col-resize-handle.prev { - left: 0; - right: auto; -} - -.tabulator .tabulator-col-resize-handle:hover { - cursor: ew-resize; -} - -.tabulator .tabulator-footer { - padding: 5px 10px; - border-top: 1px solid #999; - background-color: #fff; - text-align: right; - color: #3759D7; - font-weight: bold; - white-space: nowrap; - -ms-user-select: none; - user-select: none; - -moz-user-select: none; - -khtml-user-select: none; - -webkit-user-select: none; - -o-user-select: none; -} - -.tabulator .tabulator-footer .tabulator-calcs-holder { - box-sizing: border-box; - width: calc(100% + 20px); - margin: -5px -10px 5px -10px; - text-align: left; - background: white !important; - border-top: 3px solid #3759D7 !important; - border-bottom: 2px solid #3759D7 !important; - border-bottom: 1px solid #fff; - border-top: 1px solid #fff; - overflow: hidden; -} - -.tabulator .tabulator-footer .tabulator-calcs-holder .tabulator-row { - background: white !important; -} - -.tabulator .tabulator-footer .tabulator-calcs-holder .tabulator-row .tabulator-col-resize-handle { - display: none; -} - -.tabulator .tabulator-footer .tabulator-calcs-holder .tabulator-row .tabulator-cell { - background: none; -} - -.tabulator .tabulator-footer .tabulator-calcs-holder:only-child { - margin-bottom: -5px; - border-bottom: none; - border-bottom: none !important; -} - -.tabulator .tabulator-footer .tabulator-pages { - margin: 0 7px; -} - -.tabulator .tabulator-footer .tabulator-page { - display: inline-block; - margin: 0 2px; - border: 1px solid #aaa; - border-radius: 3px; - padding: 2px 5px; - background: rgba(255, 255, 255, 0.2); - color: #3759D7; - font-family: inherit; - font-weight: inherit; - font-size: inherit; -} - -.tabulator .tabulator-footer .tabulator-page.active { - color: #3759D7; -} - -.tabulator .tabulator-footer .tabulator-page:disabled { - opacity: .5; -} - -.tabulator .tabulator-footer .tabulator-page:not(.disabled):hover { - cursor: pointer; - background: rgba(0, 0, 0, 0.2); - color: #fff; -} - -.tabulator .tabulator-loader { - position: absolute; - display: -ms-flexbox; - display: flex; - -ms-flex-align: center; - align-items: center; - top: 0; - left: 0; - z-index: 100; - height: 100%; - width: 100%; - background: rgba(0, 0, 0, 0.4); - text-align: center; -} - -.tabulator .tabulator-loader .tabulator-loader-msg { - display: inline-block; - margin: 0 auto; - padding: 10px 20px; - border-radius: 10px; - background: #fff; - font-weight: bold; - font-size: 16px; -} - -.tabulator .tabulator-loader .tabulator-loader-msg.tabulator-loading { - border: 4px solid #333; - color: #000; -} - -.tabulator .tabulator-loader .tabulator-loader-msg.tabulator-error { - border: 4px solid #D00; - color: #590000; -} - -.tabulator-row { - position: relative; - box-sizing: border-box; - box-sizing: border-box; - min-height: 24px; - background-color: #3759D7; - padding-left: 10px !important; - margin-bottom: 2px; -} - -.tabulator-row:nth-child(even) { - background-color: #627ce0; -} - -.tabulator-row:nth-child(even) .tabulator-cell { - background-color: #fff; -} - -.tabulator-row.tabulator-selectable:hover { - cursor: pointer; -} - -.tabulator-row.tabulator-selectable:hover .tabulator-cell { - background-color: #bbb; -} - -.tabulator-row.tabulator-selected .tabulator-cell { - background-color: #9ABCEA; -} - -.tabulator-row.tabulator-selected:hover .tabulator-cell { - background-color: #769BCC; - cursor: pointer; -} - -.tabulator-row.tabulator-moving { - position: absolute; - border-top: 1px solid #fff; - border-bottom: 1px solid #fff; - pointer-events: none !important; - z-index: 15; -} - -.tabulator-row .tabulator-row-resize-handle { - position: absolute; - right: 0; - bottom: 0; - left: 0; - height: 5px; -} - -.tabulator-row .tabulator-row-resize-handle.prev { - top: 0; - bottom: auto; -} - -.tabulator-row .tabulator-row-resize-handle:hover { - cursor: ns-resize; -} - -.tabulator-row .tabulator-frozen { - display: inline-block; - position: absolute; - background-color: inherit; - z-index: 10; -} - -.tabulator-row .tabulator-frozen.tabulator-frozen-left { - padding-left: 10px; - border-right: 2px solid #fff; -} - -.tabulator-row .tabulator-frozen.tabulator-frozen-right { - border-left: 2px solid #fff; -} - -.tabulator-row .tabulator-responsive-collapse { - box-sizing: border-box; - padding: 5px; - border-top: 1px solid #fff; - border-bottom: 1px solid #fff; -} - -.tabulator-row .tabulator-responsive-collapse:empty { - display: none; -} - -.tabulator-row .tabulator-responsive-collapse table { - font-size: 16px; -} - -.tabulator-row .tabulator-responsive-collapse table tr td { - position: relative; -} - -.tabulator-row .tabulator-responsive-collapse table tr td:first-of-type { - padding-right: 10px; -} - -.tabulator-row .tabulator-cell { - display: inline-block; - position: relative; - box-sizing: border-box; - padding: 6px 4px; - border-right: 2px solid #fff; - vertical-align: middle; - white-space: nowrap; - overflow: hidden; - text-overflow: ellipsis; - background-color: #f3f3f3; -} - -.tabulator-row .tabulator-cell.tabulator-editing { - border: 1px solid #1D68CD; - padding: 0; -} - -.tabulator-row .tabulator-cell.tabulator-editing input, .tabulator-row .tabulator-cell.tabulator-editing select { - border: 1px; - background: transparent; -} - -.tabulator-row .tabulator-cell.tabulator-validation-fail { - border: 1px solid #dd0000; -} - -.tabulator-row .tabulator-cell.tabulator-validation-fail input, .tabulator-row .tabulator-cell.tabulator-validation-fail select { - border: 1px; - background: transparent; - color: #dd0000; -} - -.tabulator-row .tabulator-cell:first-child .tabulator-col-resize-handle.prev { - display: none; -} - -.tabulator-row .tabulator-cell.tabulator-row-handle { - display: -ms-inline-flexbox; - display: inline-flex; - -ms-flex-align: center; - align-items: center; - -moz-user-select: none; - -khtml-user-select: none; - -webkit-user-select: none; - -o-user-select: none; -} - -.tabulator-row .tabulator-cell.tabulator-row-handle .tabulator-row-handle-box { - width: 80%; -} - -.tabulator-row .tabulator-cell.tabulator-row-handle .tabulator-row-handle-box .tabulator-row-handle-bar { - width: 100%; - height: 3px; - margin-top: 2px; - background: #666; -} - -.tabulator-row .tabulator-cell .tabulator-data-tree-branch { - display: inline-block; - vertical-align: middle; - height: 9px; - width: 7px; - margin-top: -9px; - margin-right: 5px; - border-bottom-left-radius: 1px; - border-left: 2px solid #fff; - border-bottom: 2px solid #fff; -} - -.tabulator-row .tabulator-cell .tabulator-data-tree-control { - display: -ms-inline-flexbox; - display: inline-flex; - -ms-flex-pack: center; - justify-content: center; - -ms-flex-align: center; - align-items: center; - vertical-align: middle; - height: 11px; - width: 11px; - margin-right: 5px; - border: 1px solid #333; - border-radius: 2px; - background: rgba(0, 0, 0, 0.1); - overflow: hidden; -} - -.tabulator-row .tabulator-cell .tabulator-data-tree-control:hover { - cursor: pointer; - background: rgba(0, 0, 0, 0.2); -} - -.tabulator-row .tabulator-cell .tabulator-data-tree-control .tabulator-data-tree-control-collapse { - display: inline-block; - position: relative; - height: 7px; - width: 1px; - background: transparent; -} - -.tabulator-row .tabulator-cell .tabulator-data-tree-control .tabulator-data-tree-control-collapse:after { - position: absolute; - content: ""; - left: -3px; - top: 3px; - height: 1px; - width: 7px; - background: #333; -} - -.tabulator-row .tabulator-cell .tabulator-data-tree-control .tabulator-data-tree-control-expand { - display: inline-block; - position: relative; - height: 7px; - width: 1px; - background: #333; -} - -.tabulator-row .tabulator-cell .tabulator-data-tree-control .tabulator-data-tree-control-expand:after { - position: absolute; - content: ""; - left: -3px; - top: 3px; - height: 1px; - width: 7px; - background: #333; -} - -.tabulator-row .tabulator-cell .tabulator-responsive-collapse-toggle { - display: -ms-inline-flexbox; - display: inline-flex; - -ms-flex-align: center; - align-items: center; - -ms-flex-pack: center; - justify-content: center; - -moz-user-select: none; - -khtml-user-select: none; - -webkit-user-select: none; - -o-user-select: none; - height: 15px; - width: 15px; - border-radius: 20px; - background: #666; - color: #f3f3f3; - font-weight: bold; - font-size: 1.1em; -} - -.tabulator-row .tabulator-cell .tabulator-responsive-collapse-toggle:hover { - opacity: .7; -} - -.tabulator-row .tabulator-cell .tabulator-responsive-collapse-toggle.open .tabulator-responsive-collapse-toggle-close { - display: initial; -} - -.tabulator-row .tabulator-cell .tabulator-responsive-collapse-toggle.open .tabulator-responsive-collapse-toggle-open { - display: none; -} - -.tabulator-row .tabulator-cell .tabulator-responsive-collapse-toggle .tabulator-responsive-collapse-toggle-close { - display: none; -} - -.tabulator-row.tabulator-group { - box-sizing: border-box; - border-bottom: 2px solid #3759D7; - border-top: 2px solid #3759D7; - padding: 5px; - padding-left: 10px; - background: #8ca0e8; - font-weight: bold; - color: fff; - margin-bottom: 2px; - min-width: 100%; -} - -.tabulator-row.tabulator-group:hover { - cursor: pointer; - background-color: rgba(0, 0, 0, 0.1); -} - -.tabulator-row.tabulator-group.tabulator-group-visible .tabulator-arrow { - margin-right: 10px; - border-left: 6px solid transparent; - border-right: 6px solid transparent; - border-top: 6px solid #3759D7; - border-bottom: 0; -} - -.tabulator-row.tabulator-group.tabulator-group-level-1 .tabulator-arrow { - margin-left: 20px; -} - -.tabulator-row.tabulator-group.tabulator-group-level-2 .tabulator-arrow { - margin-left: 40px; -} - -.tabulator-row.tabulator-group.tabulator-group-level-3 .tabulator-arrow { - margin-left: 60px; -} - -.tabulator-row.tabulator-group.tabulator-group-level-4 .tabulator-arrow { - margin-left: 80px; -} - -.tabulator-row.tabulator-group.tabulator-group-level-5 .tabulator-arrow { - margin-left: 100px; -} - -.tabulator-row.tabulator-group .tabulator-arrow { - display: inline-block; - width: 0; - height: 0; - margin-right: 16px; - border-top: 6px solid transparent; - border-bottom: 6px solid transparent; - border-right: 0; - border-left: 6px solid #3759D7; - vertical-align: middle; -} - -.tabulator-row.tabulator-group span { - margin-left: 10px; - color: #3759D7; -} - -.tabulator-edit-select-list { - position: absolute; - display: inline-block; - box-sizing: border-box; - max-height: 200px; - background: #f3f3f3; - border: 1px solid #fff; - font-size: 16px; - overflow-y: auto; - -webkit-overflow-scrolling: touch; - z-index: 10000; -} - -.tabulator-edit-select-list .tabulator-edit-select-list-item { - padding: 4px; - color: #333; -} - -.tabulator-edit-select-list .tabulator-edit-select-list-item.active { - color: #f3f3f3; - background: #1D68CD; -} - -.tabulator-edit-select-list .tabulator-edit-select-list-item:hover { - cursor: pointer; - color: #f3f3f3; - background: #1D68CD; -} - -.tabulator-edit-select-list .tabulator-edit-select-list-group { - border-bottom: 1px solid #fff; - padding: 4px; - padding-top: 6px; - color: #333; - font-weight: bold; -} diff --git a/Gems/AssetMemoryAnalyzer/External/tabulator-master/dist/css/tabulator_modern.min.css b/Gems/AssetMemoryAnalyzer/External/tabulator-master/dist/css/tabulator_modern.min.css deleted file mode 100644 index b7cb65fa9a..0000000000 --- a/Gems/AssetMemoryAnalyzer/External/tabulator-master/dist/css/tabulator_modern.min.css +++ /dev/null @@ -1,3 +0,0 @@ -/* Tabulator v4.1.2 (c) Oliver Folkerd */ -.tabulator{position:relative;border:1px solid #fff;background-color:#fff;overflow:hidden;font-size:16px;text-align:left;transform:translatez(0)}.tabulator[tabulator-layout=fitDataFill] .tabulator-tableHolder .tabulator-table{min-width:100%}.tabulator.tabulator-block-select{-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}.tabulator .tabulator-header{width:100%;border-bottom:3px solid #3759d7;margin-bottom:4px;color:#3759d7;font-weight:700;white-space:nowrap;-moz-user-select:none;-khtml-user-select:none;-webkit-user-select:none;-o-user-select:none;padding-left:10px;font-size:1.1em}.tabulator .tabulator-header,.tabulator .tabulator-header .tabulator-col{position:relative;box-sizing:border-box;background-color:#fff;overflow:hidden}.tabulator .tabulator-header .tabulator-col{display:inline-block;border-right:2px solid #fff;text-align:left;vertical-align:bottom}.tabulator .tabulator-header .tabulator-col.tabulator-moving{position:absolute;border:1px solid #3759d7;background:#e6e6e6;pointer-events:none}.tabulator .tabulator-header .tabulator-col .tabulator-col-content{box-sizing:border-box;position:relative;padding:4px}.tabulator .tabulator-header .tabulator-col .tabulator-col-content .tabulator-col-title{box-sizing:border-box;width:100%;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;vertical-align:bottom}.tabulator .tabulator-header .tabulator-col .tabulator-col-content .tabulator-col-title .tabulator-title-editor{box-sizing:border-box;width:100%;border:1px solid #3759d7;padding:1px;background:#fff;font-size:1em;color:#3759d7}.tabulator .tabulator-header .tabulator-col .tabulator-col-content .tabulator-arrow{display:inline-block;position:absolute;top:9px;right:8px;width:0;height:0;border-left:6px solid transparent;border-right:6px solid transparent;border-bottom:6px solid #b7c3f1}.tabulator .tabulator-header .tabulator-col.tabulator-col-group .tabulator-col-group-cols{position:relative;display:-ms-flexbox;display:flex;border-top:2px solid #3759d7;overflow:hidden}.tabulator .tabulator-header .tabulator-col.tabulator-col-group .tabulator-col-group-cols .tabulator-col:last-child{margin-right:-1px}.tabulator .tabulator-header .tabulator-col:first-child .tabulator-col-resize-handle.prev{display:none}.tabulator .tabulator-header .tabulator-col.ui-sortable-helper{position:absolute;background-color:#e6e6e6!important;border:1px solid #fff}.tabulator .tabulator-header .tabulator-col .tabulator-header-filter{position:relative;box-sizing:border-box;margin-top:2px;width:100%;text-align:center}.tabulator .tabulator-header .tabulator-col .tabulator-header-filter textarea{height:auto!important}.tabulator .tabulator-header .tabulator-col .tabulator-header-filter svg{margin-top:3px}.tabulator .tabulator-header .tabulator-col .tabulator-header-filter input::-ms-clear{width:0;height:0}.tabulator .tabulator-header .tabulator-col.tabulator-sortable .tabulator-col-title{padding-right:25px}.tabulator .tabulator-header .tabulator-col.tabulator-sortable:hover{cursor:pointer;background-color:#e6e6e6}.tabulator .tabulator-header .tabulator-col.tabulator-sortable[aria-sort=none] .tabulator-col-content .tabulator-arrow{border-top:none;border-bottom:6px solid #b7c3f1}.tabulator .tabulator-header .tabulator-col.tabulator-sortable[aria-sort=asc] .tabulator-col-content .tabulator-arrow{border-top:none;border-bottom:6px solid #3759d7}.tabulator .tabulator-header .tabulator-col.tabulator-sortable[aria-sort=desc] .tabulator-col-content .tabulator-arrow{border-top:6px solid #3759d7;border-bottom:none}.tabulator .tabulator-header .tabulator-col.tabulator-col-vertical .tabulator-col-content .tabulator-col-title{-webkit-writing-mode:vertical-rl;-ms-writing-mode:tb-rl;writing-mode:vertical-rl;text-orientation:mixed;display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;-ms-flex-pack:center;justify-content:center}.tabulator .tabulator-header .tabulator-col.tabulator-col-vertical.tabulator-col-vertical-flip .tabulator-col-title{transform:rotate(180deg)}.tabulator .tabulator-header .tabulator-col.tabulator-col-vertical.tabulator-sortable .tabulator-col-title{padding-right:0;padding-top:20px}.tabulator .tabulator-header .tabulator-col.tabulator-col-vertical.tabulator-sortable.tabulator-col-vertical-flip .tabulator-col-title{padding-right:0;padding-bottom:20px}.tabulator .tabulator-header .tabulator-col.tabulator-col-vertical.tabulator-sortable .tabulator-arrow{right:calc(50% - 6px)}.tabulator .tabulator-header .tabulator-frozen{display:inline-block;position:absolute;z-index:1}.tabulator .tabulator-header .tabulator-frozen.tabulator-frozen-left{padding-left:10px;border-right:2px solid #fff}.tabulator .tabulator-header .tabulator-frozen.tabulator-frozen-right{border-left:2px solid #fff}.tabulator .tabulator-header .tabulator-calcs-holder{box-sizing:border-box;min-width:400%;border-top:2px solid #3759d7!important;background:#fff!important;border-top:1px solid #fff;border-bottom:1px solid #fff;overflow:hidden}.tabulator .tabulator-header .tabulator-calcs-holder .tabulator-row{padding-left:0!important;background:#fff!important}.tabulator .tabulator-header .tabulator-calcs-holder .tabulator-row .tabulator-col-resize-handle{display:none}.tabulator .tabulator-header .tabulator-calcs-holder .tabulator-row .tabulator-cell{background:none}.tabulator .tabulator-header .tabulator-frozen-rows-holder{min-width:400%}.tabulator .tabulator-header .tabulator-frozen-rows-holder:empty{display:none}.tabulator .tabulator-tableHolder{position:relative;width:100%;white-space:nowrap;overflow:auto;-webkit-overflow-scrolling:touch}.tabulator .tabulator-tableHolder:focus{outline:none}.tabulator .tabulator-tableHolder .tabulator-placeholder{box-sizing:border-box;display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;width:100%}.tabulator .tabulator-tableHolder .tabulator-placeholder[tabulator-render-mode=virtual]{position:absolute;top:0;left:0;height:100%}.tabulator .tabulator-tableHolder .tabulator-placeholder span{display:inline-block;margin:0 auto;padding:10px;color:#3759d7;font-weight:700;font-size:20px}.tabulator .tabulator-tableHolder .tabulator-table{position:relative;display:inline-block;background-color:#f3f3f3;white-space:nowrap;overflow:visible;color:#333}.tabulator .tabulator-tableHolder .tabulator-table .tabulator-row.tabulator-calcs{font-weight:700;background:#f2f2f2!important}.tabulator .tabulator-tableHolder .tabulator-table .tabulator-row.tabulator-calcs.tabulator-calcs-top{border-bottom:2px solid #3759d7}.tabulator .tabulator-tableHolder .tabulator-table .tabulator-row.tabulator-calcs.tabulator-calcs-bottom{border-top:2px solid #3759d7}.tabulator .tabulator-col-resize-handle{position:absolute;right:0;top:0;bottom:0;width:5px}.tabulator .tabulator-col-resize-handle.prev{left:0;right:auto}.tabulator .tabulator-col-resize-handle:hover{cursor:ew-resize}.tabulator .tabulator-footer{padding:5px 10px;border-top:1px solid #999;background-color:#fff;text-align:right;color:#3759d7;font-weight:700;white-space:nowrap;-ms-user-select:none;user-select:none;-moz-user-select:none;-khtml-user-select:none;-webkit-user-select:none;-o-user-select:none}.tabulator .tabulator-footer .tabulator-calcs-holder{box-sizing:border-box;width:calc(100% + 20px);margin:-5px -10px 5px;text-align:left;background:#fff!important;border-top:3px solid #3759d7!important;border-bottom:2px solid #3759d7!important;border-bottom:1px solid #fff;border-top:1px solid #fff;overflow:hidden}.tabulator .tabulator-footer .tabulator-calcs-holder .tabulator-row{background:#fff!important}.tabulator .tabulator-footer .tabulator-calcs-holder .tabulator-row .tabulator-col-resize-handle{display:none}.tabulator .tabulator-footer .tabulator-calcs-holder .tabulator-row .tabulator-cell{background:none}.tabulator .tabulator-footer .tabulator-calcs-holder:only-child{margin-bottom:-5px;border-bottom:none;border-bottom:none!important}.tabulator .tabulator-footer .tabulator-pages{margin:0 7px}.tabulator .tabulator-footer .tabulator-page{display:inline-block;margin:0 2px;border:1px solid #aaa;border-radius:3px;padding:2px 5px;background:hsla(0,0%,100%,.2);color:#3759d7;font-family:inherit;font-weight:inherit;font-size:inherit}.tabulator .tabulator-footer .tabulator-page.active{color:#3759d7}.tabulator .tabulator-footer .tabulator-page:disabled{opacity:.5}.tabulator .tabulator-footer .tabulator-page:not(.disabled):hover{cursor:pointer;background:rgba(0,0,0,.2);color:#fff}.tabulator .tabulator-loader{position:absolute;display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;top:0;left:0;z-index:3;height:100%;width:100%;background:rgba(0,0,0,.4);text-align:center}.tabulator .tabulator-loader .tabulator-loader-msg{display:inline-block;margin:0 auto;padding:10px 20px;border-radius:10px;background:#fff;font-weight:700;font-size:16px}.tabulator .tabulator-loader .tabulator-loader-msg.tabulator-loading{border:4px solid #333;color:#000}.tabulator .tabulator-loader .tabulator-loader-msg.tabulator-error{border:4px solid #d00;color:#590000}.tabulator-row{position:relative;box-sizing:border-box;min-height:24px;background-color:#3759d7;padding-left:10px!important;margin-bottom:2px}.tabulator-row:nth-child(2n){background-color:#627ce0}.tabulator-row:nth-child(2n) .tabulator-cell{background-color:#fff}.tabulator-row.tabulator-selectable:hover{cursor:pointer}.tabulator-row.tabulator-selectable:hover .tabulator-cell{background-color:#bbb}.tabulator-row.tabulator-selected .tabulator-cell{background-color:#9abcea}.tabulator-row.tabulator-selected:hover .tabulator-cell{background-color:#769bcc;cursor:pointer}.tabulator-row.tabulator-moving{position:absolute;border-top:1px solid #fff;border-bottom:1px solid #fff;pointer-events:none!important;z-index:2}.tabulator-row .tabulator-row-resize-handle{position:absolute;right:0;bottom:0;left:0;height:5px}.tabulator-row .tabulator-row-resize-handle.prev{top:0;bottom:auto}.tabulator-row .tabulator-row-resize-handle:hover{cursor:ns-resize}.tabulator-row .tabulator-frozen{display:inline-block;position:absolute;background-color:inherit;z-index:1}.tabulator-row .tabulator-frozen.tabulator-frozen-left{padding-left:10px;border-right:2px solid #fff}.tabulator-row .tabulator-frozen.tabulator-frozen-right{border-left:2px solid #fff}.tabulator-row .tabulator-responsive-collapse{box-sizing:border-box;padding:5px;border-top:1px solid #fff;border-bottom:1px solid #fff}.tabulator-row .tabulator-responsive-collapse:empty{display:none}.tabulator-row .tabulator-responsive-collapse table{font-size:16px}.tabulator-row .tabulator-responsive-collapse table tr td{position:relative}.tabulator-row .tabulator-responsive-collapse table tr td:first-of-type{padding-right:10px}.tabulator-row .tabulator-cell{display:inline-block;position:relative;box-sizing:border-box;padding:6px 4px;border-right:2px solid #fff;vertical-align:middle;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;background-color:#f3f3f3}.tabulator-row .tabulator-cell.tabulator-editing{border:1px solid #1d68cd;padding:0}.tabulator-row .tabulator-cell.tabulator-editing input,.tabulator-row .tabulator-cell.tabulator-editing select{border:1px;background:transparent}.tabulator-row .tabulator-cell.tabulator-validation-fail{border:1px solid #d00}.tabulator-row .tabulator-cell.tabulator-validation-fail input,.tabulator-row .tabulator-cell.tabulator-validation-fail select{border:1px;background:transparent;color:#d00}.tabulator-row .tabulator-cell:first-child .tabulator-col-resize-handle.prev{display:none}.tabulator-row .tabulator-cell.tabulator-row-handle{display:-ms-inline-flexbox;display:inline-flex;-ms-flex-align:center;align-items:center;-moz-user-select:none;-khtml-user-select:none;-webkit-user-select:none;-o-user-select:none}.tabulator-row .tabulator-cell.tabulator-row-handle .tabulator-row-handle-box{width:80%}.tabulator-row .tabulator-cell.tabulator-row-handle .tabulator-row-handle-box .tabulator-row-handle-bar{width:100%;height:3px;margin-top:2px;background:#666}.tabulator-row .tabulator-cell .tabulator-data-tree-branch{display:inline-block;vertical-align:middle;height:9px;width:7px;margin-top:-9px;margin-right:5px;border-bottom-left-radius:1px;border-left:2px solid #fff;border-bottom:2px solid #fff}.tabulator-row .tabulator-cell .tabulator-data-tree-control{display:-ms-inline-flexbox;display:inline-flex;-ms-flex-pack:center;justify-content:center;-ms-flex-align:center;align-items:center;vertical-align:middle;height:11px;width:11px;margin-right:5px;border:1px solid #333;border-radius:2px;background:rgba(0,0,0,.1);overflow:hidden}.tabulator-row .tabulator-cell .tabulator-data-tree-control:hover{cursor:pointer;background:rgba(0,0,0,.2)}.tabulator-row .tabulator-cell .tabulator-data-tree-control .tabulator-data-tree-control-collapse{display:inline-block;position:relative;height:7px;width:1px;background:transparent}.tabulator-row .tabulator-cell .tabulator-data-tree-control .tabulator-data-tree-control-collapse:after{position:absolute;content:"";left:-3px;top:3px;height:1px;width:7px;background:#333}.tabulator-row .tabulator-cell .tabulator-data-tree-control .tabulator-data-tree-control-expand{display:inline-block;position:relative;height:7px;width:1px;background:#333}.tabulator-row .tabulator-cell .tabulator-data-tree-control .tabulator-data-tree-control-expand:after{position:absolute;content:"";left:-3px;top:3px;height:1px;width:7px;background:#333}.tabulator-row .tabulator-cell .tabulator-responsive-collapse-toggle{display:-ms-inline-flexbox;display:inline-flex;-ms-flex-align:center;align-items:center;-ms-flex-pack:center;justify-content:center;-moz-user-select:none;-khtml-user-select:none;-webkit-user-select:none;-o-user-select:none;height:15px;width:15px;border-radius:20px;background:#666;color:#f3f3f3;font-weight:700;font-size:1.1em}.tabulator-row .tabulator-cell .tabulator-responsive-collapse-toggle:hover{opacity:.7}.tabulator-row .tabulator-cell .tabulator-responsive-collapse-toggle.open .tabulator-responsive-collapse-toggle-close{display:initial}.tabulator-row .tabulator-cell .tabulator-responsive-collapse-toggle.open .tabulator-responsive-collapse-toggle-open,.tabulator-row .tabulator-cell .tabulator-responsive-collapse-toggle .tabulator-responsive-collapse-toggle-close{display:none}.tabulator-row.tabulator-group{box-sizing:border-box;border-bottom:2px solid #3759d7;border-top:2px solid #3759d7;padding:5px;padding-left:10px;background:#8ca0e8;font-weight:700;color:fff;margin-bottom:2px;min-width:100%}.tabulator-row.tabulator-group:hover{cursor:pointer;background-color:rgba(0,0,0,.1)}.tabulator-row.tabulator-group.tabulator-group-visible .tabulator-arrow{margin-right:10px;border-left:6px solid transparent;border-right:6px solid transparent;border-top:6px solid #3759d7;border-bottom:0}.tabulator-row.tabulator-group.tabulator-group-level-1 .tabulator-arrow{margin-left:20px}.tabulator-row.tabulator-group.tabulator-group-level-2 .tabulator-arrow{margin-left:40px}.tabulator-row.tabulator-group.tabulator-group-level-3 .tabulator-arrow{margin-left:60px}.tabulator-row.tabulator-group.tabulator-group-level-4 .tabulator-arrow{margin-left:80px}.tabulator-row.tabulator-group.tabulator-group-level-5 .tabulator-arrow{margin-left:100px}.tabulator-row.tabulator-group .tabulator-arrow{display:inline-block;width:0;height:0;margin-right:16px;border-top:6px solid transparent;border-bottom:6px solid transparent;border-right:0;border-left:6px solid #3759d7;vertical-align:middle}.tabulator-row.tabulator-group span{margin-left:10px;color:#3759d7}.tabulator-edit-select-list{position:absolute;display:inline-block;box-sizing:border-box;max-height:200px;background:#f3f3f3;border:1px solid #fff;font-size:16px;overflow-y:auto;-webkit-overflow-scrolling:touch;z-index:4}.tabulator-edit-select-list .tabulator-edit-select-list-item{padding:4px;color:#333}.tabulator-edit-select-list .tabulator-edit-select-list-item.active{color:#f3f3f3;background:#1d68cd}.tabulator-edit-select-list .tabulator-edit-select-list-item:hover{cursor:pointer;color:#f3f3f3;background:#1d68cd}.tabulator-edit-select-list .tabulator-edit-select-list-group{border-bottom:1px solid #fff;padding:4px;padding-top:6px;color:#333;font-weight:700} -/*# sourceMappingURL=tabulator_modern.min.css.map */ diff --git a/Gems/AssetMemoryAnalyzer/External/tabulator-master/dist/css/tabulator_modern.min.css.map b/Gems/AssetMemoryAnalyzer/External/tabulator-master/dist/css/tabulator_modern.min.css.map deleted file mode 100644 index 95bd98527e..0000000000 --- a/Gems/AssetMemoryAnalyzer/External/tabulator-master/dist/css/tabulator_modern.min.css.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"sources":["tabulator_modern.scss"],"names":[],"mappings":"AA+CA,WACC,kBAAkB,AAClB,sBA1CgB,AA2ChB,sBA5CqB,AA6CrB,gBAAe,AACf,eA5Ca,AA6Cb,gBAAgB,AAMhB,uBAAwB,CAyfxB,AArgBD,iFAiBI,cAAc,CACd,AAlBJ,kCAuBE,yBAAiB,AAAjB,sBAAiB,AAAjB,qBAAiB,AAAjB,gBAAiB,CACjB,AAxBF,6BA+BE,WAAU,AAEV,gCA7Ee,AA8Ef,kBAAiB,AAEjB,cAhFe,AAiFf,gBAAgB,AAEhB,mBAAmB,AAGnB,sBAAsB,AACtB,wBAAwB,AACxB,yBAAyB,AACzB,oBAAoB,AAEpB,kBArDe,AAuDf,eAAgB,CA4PhB,AA7SF,yEA4BE,kBAAiB,AACjB,sBAAsB,AAMtB,sBAvEyB,AA4EzB,eAAe,CAxCjB,AAqPG,4CAhMA,qBAAoB,AAGpB,4BA1FoB,AA4FpB,gBAAe,AACf,qBAAsB,CA0LtB,AArPH,6DA+DI,kBAAkB,AAClB,yBA5Ga,AA6Gb,mBAA8C,AAC9C,mBAAoB,CACpB,AAnEJ,mEAuEI,sBAAqB,AACrB,kBAAkB,AAClB,WAAW,CAyCX,AAlHJ,wFA6EK,sBAAqB,AACrB,WAAW,AAEX,mBAAmB,AACnB,gBAAgB,AAChB,uBAAuB,AACvB,qBAAqB,CAgBrB,AAnGL,gHAuFM,sBAAsB,AACtB,WAAW,AAEX,yBAtIW,AAwIX,YAAW,AAEX,gBAAgB,AAEhB,cAAc,AACd,aA7IW,CA8IX,AAlGN,oFAuGK,qBAAqB,AACrB,kBAAkB,AAClB,QAAO,AACP,UAAS,AACT,QAAQ,AACR,SAAS,AACT,kCAAkC,AAClC,mCAAmC,AACnC,+BA3IqC,CA4IrC,AAhHL,0FAyHK,kBAAiB,AACjB,oBAAa,AAAb,aAAa,AAEb,6BAxKY,AAyKZ,eAAgB,CAKhB,AAlIL,oHAgIM,iBAAiB,CACjB,AAjIN,0FAyIK,YAAa,CACb,AA1IL,+DA+II,kBAAkB,AAClB,mCAAgE,AAChE,qBAnLmB,CAoLnB,AAlJJ,qEAsJI,kBAAkB,AAClB,sBAAsB,AACtB,eAAc,AACd,WAAU,AACV,iBAAkB,CAiBlB,AA3KJ,8EA8JK,qBAAsB,CACtB,AA/JL,yEAkKK,cAAe,CACf,AAnKL,sFAuKO,QAAS,AACT,QAAS,CACV,AAzKN,oFAgLK,kBAAkB,CAClB,AAjLL,qEAoLK,eAAc,AACd,wBAAoD,CACpD,AAtLL,uHA2LM,gBAAgB,AAChB,+BAxNoC,CAyNpC,AA7LN,sHAkMM,gBAAgB,AAChB,+BA/OW,CAgPX,AApMN,uHAyMM,6BArPW,AAsPX,kBAAmB,CACnB,AA3MN,+GAkNM,iCAAyB,AAAzB,uBAAyB,AAAzB,yBAAyB,AACzB,uBAAuB,AAEvB,oBAAY,AAAZ,aAAY,AACZ,sBAAkB,AAAlB,mBAAkB,AAClB,qBAAsB,AAAtB,sBAAsB,CACtB,AAxNN,oHA6NM,wBAAyB,CACzB,AA9NN,2GAmOM,gBAAe,AACf,gBAAgB,CAChB,AArON,uIAyOO,gBAAe,AACf,mBAAmB,CACnB,AA3OP,uGAgPM,qBAAqB,CACrB,AAjPN,+CAwPG,qBAAqB,AACrB,kBAAkB,AAIlB,SAAW,CAWX,AAxQH,qEAgQI,kBAtQa,AAwQb,2BAzRgB,CA0RhB,AAnQJ,sEAsQI,0BA7RgB,CA8RhB,AAvQJ,qDA2QG,sBAAqB,AACrB,eAAc,AAEd,uCAAqD,AAErD,0BAAyD,AAgBzD,0BAvTiB,AAwTjB,6BAnUoB,AAqUpB,eAAgB,CAChB,AApSH,oEAmRI,yBAA0B,AAE1B,yBAAyD,CASzD,AA9RJ,iGAwRK,YAAa,CACb,AAzRL,oFA4RK,eAAe,CACf,AA7RL,2DAuSG,cAAc,CAKd,AA5SH,iEA0SI,YAAa,CACb,AA3SJ,kCAiTE,kBAAiB,AACjB,WAAU,AACV,mBAAmB,AACnB,cAAa,AACb,gCAAiC,CAyDjC,AA9WF,wCAwTG,YAAa,CACb,AAzTH,yDA6TG,sBAAqB,AACrB,oBAAa,AAAb,aAAa,AACb,sBAAkB,AAAlB,mBAAkB,AASlB,UAAU,CAYV,AApVH,wFAkUI,kBAAkB,AAClB,MAAK,AACL,OAAM,AACN,WAAW,CACX,AAtUJ,8DA2UI,qBAAqB,AAErB,cAAa,AACb,aAAY,AAEZ,cA5Xa,AA6Xb,gBAAiB,AACjB,cAAe,CACf,AAnVJ,mDAwVG,kBAAiB,AACjB,qBAAoB,AACpB,yBAnXwB,AAoXxB,mBAAmB,AACnB,iBAAgB,AAChB,UAnXe,CAmYf,AA7WH,kFAiWK,gBAAiB,AACjB,4BAAwD,CASxD,AA3WL,sGAqWM,+BAjZW,CAkZX,AAtWN,yGAyWM,4BArZW,CAsZX,AA1WN,wCAmXE,kBAAiB,AACjB,QAAO,AACP,MAAK,AACL,SAAQ,AACR,SAAS,CAUT,AAjYF,6CA0XG,OAAM,AACN,UAAU,CACV,AA5XH,8CA+XG,gBAAgB,CAChB,AAhYH,6BAsYE,iBAAgB,AAChB,0BAhZwB,AAiZxB,sBApZyB,AAqZzB,iBAAgB,AAChB,cAtbe,AAubf,gBAAgB,AAChB,mBAAkB,AAClB,qBAAgB,AAAhB,iBAAgB,AAEhB,sBAAsB,AACtB,wBAAwB,AACxB,yBAAyB,AACzB,mBAAoB,CAwEpB,AA1dF,qDAqZG,sBAAqB,AACrB,wBAAuB,AACvB,sBAA2B,AAE3B,gBAAgB,AAEhB,0BAAyD,AAEzD,uCAAqD,AACrD,0CAAwD,AAcxD,6BAnciB,AAocjB,0BApciB,AAscjB,eAAgB,CAOhB,AAtbH,oEAiaI,yBAAyD,CASzD,AA1aJ,iGAoaK,YAAa,CACb,AAraL,oFAwaK,eAAe,CACf,AAzaL,gEAkbI,mBAAkB,AAClB,mBAAkB,AAClB,4BAA6B,CAC7B,AArbJ,8CA0bG,YAAY,CACZ,AA3bH,6CA+bG,qBAAoB,AACpB,aAAY,AACZ,sBA3coB,AA4cpB,kBAAiB,AACjB,gBAAe,AACf,8BAA+B,AAC/B,cAjfc,AAkfd,oBAAmB,AACnB,oBAAmB,AACnB,iBAAiB,CAiBjB,AAzdH,oDA2cI,aAvfa,CAwfb,AA5cJ,sDA+cI,UAAU,CACV,AAhdJ,kEAodK,eAAc,AACd,0BAAyB,AACzB,UAAU,CACV,AAvdL,6BA8dE,kBAAiB,AACjB,oBAAa,AAAb,aAAa,AACb,sBAAkB,AAAlB,mBAAkB,AAElB,MAAK,AACL,OAAM,AACN,UAAW,AAEX,YAAW,AACX,WAAU,AACV,0BAAyB,AACzB,iBAAiB,CA2BjB,AApgBF,mDA6eG,qBAAoB,AAEpB,cAAa,AACb,kBAAiB,AAEjB,mBAAkB,AAElB,gBAAe,AACf,gBAAgB,AAChB,cAAc,CAad,AAngBH,qEA0fI,sBAAqB,AACrB,UAAU,CACV,AA5fJ,mEAggBI,sBAAqB,AACrB,aAAa,CACb,AAMJ,eACC,kBAAkB,AAGlB,sBAAsB,AACtB,gBAA0C,AAE1C,yBA3jBgB,AA6jBhB,4BAAqC,AAErC,iBAAkB,CAsXlB,AAjYD,6BAcE,wBA1hBqC,CA+hBrC,AAnBF,6CAiBG,qBAjjBwB,CAkjBxB,AAlBH,0CAsBE,cAAe,CAKf,AA3BF,0DAyBG,qBAtjBqB,CAujBrB,AA1BH,kDA+BG,wBA1jB4B,CA2jB5B,AAhCH,wDAqCG,yBA/jBiC,AAgkBjC,cAAe,CACf,AAvCH,gCA2CE,kBAAkB,AAElB,0BA5kBkB,AA6kBlB,6BA7kBkB,AA+kBlB,8BAA+B,AAC/B,SAAU,CACV,AAlDF,4CAsDE,kBAAiB,AACjB,QAAO,AACP,SAAQ,AACR,OAAM,AACN,UAAU,CAUV,AApEF,iDA6DG,MAAK,AACL,WAAW,CACX,AA/DH,kDAkEG,gBAAgB,CAChB,AAnEH,iCAuEE,qBAAqB,AACrB,kBAAkB,AAElB,yBAAyB,AAEzB,SAAW,CAUX,AAtFF,uDA+EG,kBA7lBc,AA8lBd,2BA/mBiB,CAgnBjB,AAjFH,wDAoFG,0BAnnBiB,CAonBjB,AArFH,8CAyFE,sBAAqB,AAErB,YAAW,AAEX,0BA5nBkB,AA6nBlB,4BA7nBkB,CAgpBlB,AAjHF,oDAiGG,YAAY,CACZ,AAlGH,oDAqGG,cAppBW,CA+pBX,AAhHH,0DAyGK,iBAAkB,CAKlB,AA9GL,wEA4GM,kBAAkB,CAClB,AA7GN,+BAqHE,qBAAoB,AACpB,kBAAkB,AAClB,sBAAqB,AACrB,gBAAe,AACf,4BAxpBkB,AAypBlB,sBAAqB,AACrB,mBAAkB,AAClB,gBAAe,AACf,uBAAsB,AAEtB,wBAhqByB,CAi1BzB,AAhTF,iDAkIG,yBA1pBkB,AA2pBlB,SAAU,CAMV,AAzIH,+GAsII,WAAU,AACV,sBAAsB,CACtB,AAxIJ,yDA4IG,qBAnqBgB,CA0qBhB,AAnJH,+HA8II,WAAU,AACV,uBAAsB,AAEtB,UAxqBe,CAyqBf,AAlJJ,6EAwJI,YAAa,CACb,AAzJJ,oDA+JG,2BAAoB,AAApB,oBAAoB,AACpB,sBAAkB,AAAlB,mBAAkB,AAElB,sBAAsB,AACtB,wBAAwB,AACxB,yBAAyB,AACzB,mBAAoB,CAcpB,AAnLH,8EAyKI,SAAS,CAST,AAlLJ,wGA6KK,WAAU,AACV,WAAU,AACV,eAAc,AACd,eAAe,CACf,AAjLL,2DAsLG,qBAAoB,AACpB,sBAAqB,AAErB,WAAU,AACV,UAAS,AAET,gBAAe,AACf,iBAAgB,AAEhB,8BAA6B,AAE7B,2BAhuBiB,AAiuBjB,4BAjuBiB,CAkuBjB,AAnMH,4DAuMG,2BAAmB,AAAnB,oBAAmB,AACnB,qBAAsB,AAAtB,uBAAsB,AACtB,sBAAkB,AAAlB,mBAAkB,AAClB,sBAAqB,AAErB,YAAW,AACX,WAAU,AAEV,iBAAgB,AAEhB,sBA/uBe,AAgvBf,kBAAiB,AACjB,0BAA4B,AAE5B,eAAe,CAmDf,AAxQH,kEAwNI,eAAc,AACd,yBAA4B,CAC5B,AA1NJ,kGA6NI,qBAAoB,AACpB,kBAAkB,AAElB,WAAW,AACX,UAAU,AAEV,sBAAuB,CAavB,AAhPJ,wGAsOK,kBAAkB,AAClB,WAAW,AACX,UAAU,AACV,QAAQ,AAER,WAAW,AACX,UAAU,AAEV,eA5wBa,CA6wBb,AA/OL,gGAmPI,qBAAoB,AACpB,kBAAkB,AAElB,WAAW,AACX,UAAU,AAEV,eAvxBc,CAoyBd,AAtQJ,sGA4PK,kBAAkB,AAClB,WAAW,AACX,UAAU,AACV,QAAQ,AAER,WAAW,AACX,UAAU,AAEV,eAlyBa,CAmyBb,AArQL,qEA2QG,2BAAoB,AAApB,oBAAoB,AACpB,sBAAkB,AAAlB,mBAAkB,AAClB,qBAAsB,AAAtB,uBAAsB,AAEtB,sBAAsB,AACtB,wBAAwB,AACxB,yBAAyB,AACzB,oBAAoB,AAEpB,YAAW,AACX,WAAU,AAEV,mBAAkB,AAClB,gBAAe,AAEf,cA3zBwB,AA4zBxB,gBAAgB,AAChB,eAAe,CAmBf,AA/SH,2EA+RI,UAAU,CACV,AAhSJ,sHAoSK,eAAe,CACf,AArSL,sOA6SI,YAAY,CACZ,AA9SJ,+BAqTE,sBAAqB,AACrB,gCA12Be,AA22Bf,6BA32Be,AA42Bf,YAAW,AACX,kBAAiB,AACjB,mBAAiC,AACjC,gBAAgB,AAChB,UAAS,AACT,kBAAkB,AAElB,cAAe,CAiEf,AAhYF,qCAkUG,eAAc,AACd,+BAA+B,CAC/B,AApUH,wEAyUI,kBAAiB,AACjB,kCAAkC,AAClC,mCAAmC,AACnC,6BAh4Ba,AAi4Bb,eAAgB,CAChB,AA9UJ,wEAmVI,gBAAgB,CAChB,AApVJ,wEAyVI,gBAAgB,CAChB,AA1VJ,wEA+VI,gBAAgB,CAChB,AAhWJ,wEAqWI,gBAAgB,CAChB,AAtWJ,wEA2WI,iBAAiB,CACjB,AA5WJ,gDAiXG,qBAAqB,AACrB,QAAQ,AACR,SAAS,AACT,kBAAiB,AACjB,iCAAiC,AACjC,oCAAoC,AACpC,eAAe,AACf,8BA56Bc,AA66Bd,qBAAqB,CACrB,AA1XH,oCA6XG,iBAAgB,AAChB,aAl7Bc,CAm7Bd,AAIH,4BACC,kBAAkB,AAClB,qBAAoB,AACpB,sBAAqB,AAErB,iBAAgB,AAEhB,mBA36B0B,AA46B1B,sBA16BmB,AA46BnB,eA57Ba,AA87Bb,gBAAe,AACf,iCAAiC,AAEjC,SAAc,CA6Bd,AA5CD,6DAkBE,YAAW,AAEX,UAr7BgB,CAk8BhB,AAjCF,oEAuBG,cA37BwB,AA47BxB,kBAn7BkB,CAo7BlB,AAzBH,mEA4BG,eAAc,AAEd,cAl8BwB,AAm8BxB,kBA17BkB,CA27BlB,AAhCH,8DAoCE,6BAt8BkB,AAw8BlB,YAAW,AACX,gBAAe,AAEf,WA18BgB,AA28BhB,eAAgB,CAChB","file":"tabulator_modern.min.css","sourcesContent":["/* Tabulator v4.1.2 (c) Oliver Folkerd */\n\n\r\n$primary: #3759D7 !default; //the base text color from which the rest of the theme derives\r\n\r\n//Main Theme Variables\r\n$backgroundColor: #fff !default; //background color of tabulator\r\n$borderColor:#fff !default; //border to tabulator\r\n$textSize:16px !default; //table text size\r\n\r\n//header themeing\r\n$headerBackgroundColor:#fff !default; //border to tabulator\r\n$headerTextColor:$primary !default; //header text colour\r\n$headerBorderColor:#fff !default; //header border color\r\n$headerSeperatorColor:$primary !default; //header bottom seperator color\r\n$headerMargin:4px !default; //padding round header\r\n\r\n//column header arrows\r\n$sortArrowActive: $primary !default;\r\n$sortArrowInactive: lighten($primary, 30%) !default;\r\n\r\n//row themeing\r\n$rowBackgroundColor:#f3f3f3 !default; //table row background color\r\n$rowAltBackgroundColor:#fff !default; //table row background color\r\n$rowBorderColor:#fff !default; //table border color\r\n$rowTextColor:#333 !default; //table text color\r\n$rowHoverBackground:#bbb !default; //row background color on hover\r\n\r\n$rowSelectedBackground: #9ABCEA !default; //row background color when selected\r\n$rowSelectedBackgroundHover: #769BCC !default;//row background color when selected and hovered\r\n\r\n$editBoxColor:#1D68CD !default; //border color for edit boxes\r\n$errorColor:#dd0000 !default; //error indication\r\n\r\n//footer themeing\r\n$footerBackgroundColor:#fff !default; //border to tabulator\r\n$footerTextColor:$primary !default; //footer text colour\r\n$footerBorderColor:#aaa !default; //footer border color\r\n$footerSeperatorColor:#999 !default; //footer bottom seperator color\r\n$footerActiveColor:$primary !default; //footer bottom active text color\r\n\r\n$handleWidth:10px !default; //width of the row handle\r\n$handleColor: $primary !default; //color for odd numbered rows\r\n$handleColorAlt: lighten($primary, 10%) !default; //color for even numbered rows\r\n\r\n\r\n//Tabulator Containing Element\r\n.tabulator{\r\n\tposition: relative;\r\n\tborder: 1px solid $borderColor;\r\n\tbackground-color: $backgroundColor;\r\n\toverflow:hidden;\r\n\tfont-size:$textSize;\r\n\ttext-align: left;\r\n\r\n\t-webkit-transform: translatez(0);\r\n\t-moz-transform: translatez(0);\r\n\t-ms-transform: translatez(0);\r\n\t-o-transform: translatez(0);\r\n\ttransform: translatez(0);\r\n\r\n\t&[tabulator-layout=\"fitDataFill\"]{\r\n\t\t.tabulator-tableHolder{\r\n\t\t\t.tabulator-table{\r\n\t\t\t\tmin-width:100%;\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\r\n\t&.tabulator-block-select{\r\n\t\tuser-select: none;\r\n\t}\r\n\r\n\t//column header containing element\r\n\t.tabulator-header{\r\n\t\tposition:relative;\r\n\t\tbox-sizing: border-box;\r\n\r\n\t\twidth:100%;\r\n\r\n\t\tborder-bottom:3px solid $headerSeperatorColor;\r\n\t\tmargin-bottom:4px;\r\n\t\tbackground-color: $headerBackgroundColor;\r\n\t\tcolor: $headerTextColor;\r\n\t\tfont-weight:bold;\r\n\r\n\t\twhite-space: nowrap;\r\n\t\toverflow:hidden;\r\n\r\n\t\t-moz-user-select: none;\r\n\t\t-khtml-user-select: none;\r\n\t\t-webkit-user-select: none;\r\n\t\t-o-user-select: none;\r\n\r\n\t\tpadding-left:$handleWidth;\r\n\r\n\t\tfont-size: 1.1em;\r\n\r\n\t\t//individual column header element\r\n\t\t.tabulator-col{\r\n\t\t\tdisplay:inline-block;\r\n\t\t\tposition:relative;\r\n\t\t\tbox-sizing:border-box;\r\n\t\t\tborder-right:2px solid $headerBorderColor;\r\n\t\t\tbackground-color: $headerBackgroundColor;\r\n\t\t\ttext-align:left;\r\n\t\t\tvertical-align: bottom;\r\n\t\t\toverflow: hidden;\r\n\r\n\t\t\t&.tabulator-moving{\r\n\t\t\t\tposition: absolute;\r\n\t\t\t\tborder:1px solid $headerSeperatorColor;\r\n\t\t\t\tbackground:darken($headerBackgroundColor, 10%);\r\n\t\t\t\tpointer-events: none;\r\n\t\t\t}\r\n\r\n\t\t\t//hold content of column header\r\n\t\t\t.tabulator-col-content{\r\n\t\t\t\tbox-sizing:border-box;\r\n\t\t\t\tposition: relative;\r\n\t\t\t\tpadding:4px;\r\n\r\n\t\t\t\t//hold title of column header\r\n\t\t\t\t.tabulator-col-title{\r\n\t\t\t\t\tbox-sizing:border-box;\r\n\t\t\t\t\twidth: 100%;\r\n\r\n\t\t\t\t\twhite-space: nowrap;\r\n\t\t\t\t\toverflow: hidden;\r\n\t\t\t\t\ttext-overflow: ellipsis;\r\n\t\t\t\t\tvertical-align:bottom;\r\n\r\n\t\t\t\t\t//element to hold title editor\r\n\t\t\t\t\t.tabulator-title-editor{\r\n\t\t\t\t\t\tbox-sizing: border-box;\r\n\t\t\t\t\t\twidth: 100%;\r\n\r\n\t\t\t\t\t\tborder:1px solid $primary;\r\n\r\n\t\t\t\t\t\tpadding:1px;\r\n\r\n\t\t\t\t\t\tbackground: #fff;\r\n\r\n\t\t\t\t\t\tfont-size: 1em;\r\n\t\t\t\t\t\tcolor: $primary;\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\r\n\t\t\t\t//column sorter arrow\r\n\t\t\t\t.tabulator-arrow{\r\n\t\t\t\t\tdisplay: inline-block;\r\n\t\t\t\t\tposition: absolute;\r\n\t\t\t\t\ttop:9px;\r\n\t\t\t\t\tright:8px;\r\n\t\t\t\t\twidth: 0;\r\n\t\t\t\t\theight: 0;\r\n\t\t\t\t\tborder-left: 6px solid transparent;\r\n\t\t\t\t\tborder-right: 6px solid transparent;\r\n\t\t\t\t\tborder-bottom: 6px solid $sortArrowInactive;\r\n\t\t\t\t}\r\n\r\n\t\t\t}\r\n\r\n\t\t\t//complex header column group\r\n\t\t\t&.tabulator-col-group{\r\n\r\n\t\t\t\t//gelement to hold sub columns in column group\r\n\t\t\t\t.tabulator-col-group-cols{\r\n\t\t\t\t\tposition:relative;\r\n\t\t\t\t\tdisplay: flex;\r\n\r\n\t\t\t\t\tborder-top:2px solid $headerSeperatorColor;\r\n\t\t\t\t\toverflow: hidden;\r\n\r\n\t\t\t\t\t.tabulator-col:last-child{\r\n\t\t\t\t\t\tmargin-right:-1px;\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\r\n\t\t\t//hide left resize handle on first column\r\n\t\t\t&:first-child{\r\n\t\t\t\t.tabulator-col-resize-handle.prev{\r\n\t\t\t\t\tdisplay: none;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t\t//placeholder element for sortable columns\r\n\t\t\t&.ui-sortable-helper{\r\n\t\t\t\tposition: absolute;\r\n\t\t\t\tbackground-color: darken($headerBackgroundColor, 10%) !important;\r\n\t\t\t\tborder:1px solid $headerBorderColor;\r\n\t\t\t}\r\n\r\n\t\t\t//header filter containing element\r\n\t\t\t.tabulator-header-filter{\r\n\t\t\t\tposition: relative;\r\n\t\t\t\tbox-sizing: border-box;\r\n\t\t\t\tmargin-top:2px;\r\n\t\t\t\twidth:100%;\r\n\t\t\t\ttext-align: center;\r\n\r\n\t\t\t\t//styling adjustment for inbuilt editors\r\n\t\t\t\ttextarea{\r\n\t\t\t\t\theight:auto !important;\r\n\t\t\t\t}\r\n\r\n\t\t\t\tsvg{\r\n\t\t\t\t\tmargin-top: 3px;\r\n\t\t\t\t}\r\n\r\n\t\t\t\tinput{\r\n\t\t\t\t\t&::-ms-clear {\r\n\t\t\t\t\t width : 0;\r\n\t\t\t\t\t height: 0;\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t\t//styling child elements for sortable columns\r\n\t\t\t&.tabulator-sortable{\r\n\t\t\t\t.tabulator-col-title{\r\n\t\t\t\t\tpadding-right:25px;\r\n\t\t\t\t}\r\n\r\n\t\t\t\t&:hover{\r\n\t\t\t\t\tcursor:pointer;\r\n\t\t\t\t\tbackground-color:darken($headerBackgroundColor, 10%);\r\n\t\t\t\t}\r\n\r\n\r\n\t\t\t\t&[aria-sort=\"none\"]{\r\n\t\t\t\t\t.tabulator-col-content .tabulator-arrow{\r\n\t\t\t\t\t\tborder-top: none;\r\n\t\t\t\t\t\tborder-bottom: 6px solid $sortArrowInactive;\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\r\n\t\t\t\t&[aria-sort=\"asc\"]{\r\n\t\t\t\t\t.tabulator-col-content .tabulator-arrow{\r\n\t\t\t\t\t\tborder-top: none;\r\n\t\t\t\t\t\tborder-bottom: 6px solid $sortArrowActive;\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\r\n\t\t\t\t&[aria-sort=\"desc\"]{\r\n\t\t\t\t\t.tabulator-col-content .tabulator-arrow{\r\n\t\t\t\t\t\tborder-top: 6px solid $sortArrowActive;\r\n\t\t\t\t\t\tborder-bottom: none;\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t\t&.tabulator-col-vertical{\r\n\t\t\t\t.tabulator-col-content{\r\n\t\t\t\t\t.tabulator-col-title{\r\n\t\t\t\t\t\twriting-mode: vertical-rl;\r\n\t\t\t\t\t\ttext-orientation: mixed;\r\n\r\n\t\t\t\t\t\tdisplay:flex;\r\n\t\t\t\t\t\talign-items:center;\r\n\t\t\t\t\t\tjustify-content:center;\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\r\n\t\t\t\t&.tabulator-col-vertical-flip{\r\n\t\t\t\t\t.tabulator-col-title{\r\n\t\t\t\t\t\ttransform: rotate(180deg);\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\r\n\t\t\t\t&.tabulator-sortable{\r\n\t\t\t\t\t.tabulator-col-title{\r\n\t\t\t\t\t\tpadding-right:0;\r\n\t\t\t\t\t\tpadding-top:20px;\r\n\t\t\t\t\t}\r\n\r\n\t\t\t\t\t&.tabulator-col-vertical-flip{\r\n\t\t\t\t\t\t.tabulator-col-title{\r\n\t\t\t\t\t\t\tpadding-right:0;\r\n\t\t\t\t\t\t\tpadding-bottom:20px;\r\n\t\t\t\t\t\t}\r\n\r\n\t\t\t\t\t}\r\n\r\n\t\t\t\t\t.tabulator-arrow{\r\n\t\t\t\t\t\tright:calc(50% - 6px);\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t}\r\n\r\n\t\t.tabulator-frozen{\r\n\t\t\tdisplay: inline-block;\r\n\t\t\tposition: absolute;\r\n\r\n\t\t\t// background-color: inherit;\r\n\r\n\t\t\tz-index: 10;\r\n\r\n\t\t\t&.tabulator-frozen-left{\r\n\t\t\t\tpadding-left: $handleWidth;\r\n\r\n\t\t\t\tborder-right:2px solid $rowBorderColor;\r\n\t\t\t}\r\n\r\n\t\t\t&.tabulator-frozen-right{\r\n\t\t\t\tborder-left:2px solid $rowBorderColor;\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\t.tabulator-calcs-holder{\r\n\t\t\tbox-sizing:border-box;\r\n\t\t\tmin-width:400%;\r\n\r\n\t\t\tborder-top:2px solid $headerSeperatorColor !important;\r\n\r\n\t\t\tbackground:lighten($headerBackgroundColor, 5%) !important;\r\n\r\n\t\t\t.tabulator-row{\r\n\t\t\t\tpadding-left: 0 !important;\r\n\r\n\t\t\t\tbackground:lighten($headerBackgroundColor, 5%) !important;\r\n\r\n\t\t\t\t.tabulator-col-resize-handle{\r\n\t\t\t\t\tdisplay: none;\r\n\t\t\t\t}\r\n\r\n\t\t\t\t.tabulator-cell{\r\n\t\t\t\t\tbackground:none;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t\tborder-top:1px solid $rowBorderColor;\r\n\t\t\tborder-bottom:1px solid $headerBorderColor;\r\n\r\n\t\t\toverflow: hidden;\r\n\t\t}\r\n\r\n\t\t.tabulator-frozen-rows-holder{\r\n\t\t\tmin-width:400%;\r\n\r\n\t\t\t&:empty{\r\n\t\t\t\tdisplay: none;\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\r\n\t//scrolling element to hold table\r\n\t.tabulator-tableHolder{\r\n\t\tposition:relative;\r\n\t\twidth:100%;\r\n\t\twhite-space: nowrap;\r\n\t\toverflow:auto;\r\n\t\t-webkit-overflow-scrolling: touch;\r\n\r\n\t\t&:focus{\r\n\t\t\toutline: none;\r\n\t\t}\r\n\r\n\t\t//default placeholder element\r\n\t\t.tabulator-placeholder{\r\n\t\t\tbox-sizing:border-box;\r\n\t\t\tdisplay: flex;\r\n\t\t\talign-items:center;\r\n\r\n\t\t\t&[tabulator-render-mode=\"virtual\"]{\r\n\t\t\t\tposition: absolute;\r\n\t\t\t\ttop:0;\r\n\t\t\t\tleft:0;\r\n\t\t\t\theight:100%;\r\n\t\t\t}\r\n\r\n\t\t\twidth:100%;\r\n\r\n\t\t\tspan{\r\n\t\t\t\tdisplay: inline-block;\r\n\r\n\t\t\t\tmargin:0 auto;\r\n\t\t\t\tpadding:10px;\r\n\r\n\t\t\t\tcolor:$primary;\r\n\t\t\t\tfont-weight: bold;\r\n\t\t\t\tfont-size: 20px;\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\t//element to hold table rows\r\n\t\t.tabulator-table{\r\n\t\t\tposition:relative;\r\n\t\t\tdisplay:inline-block;\r\n\t\t\tbackground-color:$rowBackgroundColor;\r\n\t\t\twhite-space: nowrap;\r\n\t\t\toverflow:visible;\r\n\t\t\tcolor:$rowTextColor;\r\n\r\n\t\t\t.tabulator-row{\r\n\t\t\t\t&.tabulator-calcs{\r\n\t\t\t\t\tfont-weight: bold;\r\n\t\t\t\t\tbackground:darken($rowAltBackgroundColor, 5%) !important;\r\n\r\n\t\t\t\t\t&.tabulator-calcs-top{\r\n\t\t\t\t\t\tborder-bottom:2px solid $headerSeperatorColor;\r\n\t\t\t\t\t}\r\n\r\n\t\t\t\t\t&.tabulator-calcs-bottom{\r\n\t\t\t\t\t\tborder-top:2px solid $headerSeperatorColor;\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\r\n\r\n\t//column resize handles\r\n\t.tabulator-col-resize-handle{\r\n\t\tposition:absolute;\r\n\t\tright:0;\r\n\t\ttop:0;\r\n\t\tbottom:0;\r\n\t\twidth:5px;\r\n\r\n\t\t&.prev{\r\n\t\t\tleft:0;\r\n\t\t\tright:auto;\r\n\t\t}\r\n\r\n\t\t&:hover{\r\n\t\t\tcursor:ew-resize;\r\n\t\t}\r\n\t}\r\n\r\n\r\n\t//footer element\r\n\t.tabulator-footer{\r\n\t\tpadding:5px 10px;\r\n\t\tborder-top:1px solid $footerSeperatorColor;\r\n\t\tbackground-color: $footerBackgroundColor;\r\n\t\ttext-align:right;\r\n\t\tcolor: $footerTextColor;\r\n\t\tfont-weight:bold;\r\n\t\twhite-space:nowrap;\r\n\t\tuser-select:none;\r\n\r\n\t\t-moz-user-select: none;\r\n\t\t-khtml-user-select: none;\r\n\t\t-webkit-user-select: none;\r\n\t\t-o-user-select: none;\r\n\r\n\t\t.tabulator-calcs-holder{\r\n\t\t\tbox-sizing:border-box;\r\n\t\t\twidth:calc(100% + 20px);\r\n\t\t\tmargin:-5px -10px 5px -10px;\r\n\r\n\t\t\ttext-align: left;\r\n\r\n\t\t\tbackground:lighten($footerBackgroundColor, 5%) !important;\r\n\r\n\t\t\tborder-top:3px solid $headerSeperatorColor !important;\r\n\t\t\tborder-bottom:2px solid $headerSeperatorColor !important;\r\n\r\n\t\t\t.tabulator-row{\r\n\t\t\t\tbackground:lighten($footerBackgroundColor, 5%) !important;\r\n\r\n\t\t\t\t.tabulator-col-resize-handle{\r\n\t\t\t\t\tdisplay: none;\r\n\t\t\t\t}\r\n\r\n\t\t\t\t.tabulator-cell{\r\n\t\t\t\t\tbackground:none;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t\tborder-bottom:1px solid $rowBorderColor;\r\n\t\t\tborder-top:1px solid $rowBorderColor;\r\n\r\n\t\t\toverflow: hidden;\r\n\r\n\t\t\t&:only-child{\r\n\t\t\t\tmargin-bottom:-5px;\r\n\t\t\t\tborder-bottom:none;\r\n\t\t\t\tborder-bottom:none !important;\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\t//pagination container element\r\n\t\t.tabulator-pages{\r\n\t\t\tmargin:0 7px;\r\n\t\t}\r\n\r\n\t\t//pagination button\r\n\t\t.tabulator-page{\r\n\t\t\tdisplay:inline-block;\r\n\t\t\tmargin:0 2px;\r\n\t\t\tborder:1px solid $footerBorderColor;\r\n\t\t\tborder-radius:3px;\r\n\t\t\tpadding:2px 5px;\r\n\t\t\tbackground:rgba(255,255,255,.2);\r\n\t\t\tcolor: $footerTextColor;\r\n\t\t\tfont-family:inherit;\r\n\t\t\tfont-weight:inherit;\r\n\t\t\tfont-size:inherit;\r\n\r\n\t\t\t&.active{\r\n\t\t\t\tcolor:$footerActiveColor;\r\n\t\t\t}\r\n\r\n\t\t\t&:disabled{\r\n\t\t\t\topacity:.5;\r\n\t\t\t}\r\n\r\n\t\t\t&:not(.disabled){\r\n\t\t\t\t&:hover{\r\n\t\t\t\t\tcursor:pointer;\r\n\t\t\t\t\tbackground:rgba(0,0,0,.2);\r\n\t\t\t\t\tcolor:#fff;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\r\n\t//holding div that contains loader and covers tabulator element to prevent interaction\r\n\t.tabulator-loader{\r\n\t\tposition:absolute;\r\n\t\tdisplay: flex;\r\n\t\talign-items:center;\r\n\r\n\t\ttop:0;\r\n\t\tleft:0;\r\n\t\tz-index:100;\r\n\r\n\t\theight:100%;\r\n\t\twidth:100%;\r\n\t\tbackground:rgba(0,0,0,.4);\r\n\t\ttext-align:center;\r\n\r\n\t\t//loading message element\r\n\t\t.tabulator-loader-msg{\r\n\t\t\tdisplay:inline-block;\r\n\r\n\t\t\tmargin:0 auto;\r\n\t\t\tpadding:10px 20px;\r\n\r\n\t\t\tborder-radius:10px;\r\n\r\n\t\t\tbackground:#fff;\r\n\t\t\tfont-weight:bold;\r\n\t\t\tfont-size:16px;\r\n\r\n\t\t\t//loading message\r\n\t\t\t&.tabulator-loading{\r\n\t\t\t\tborder:4px solid #333;\r\n\t\t\t\tcolor:#000;\r\n\t\t\t}\r\n\r\n\t\t\t//error message\r\n\t\t\t&.tabulator-error{\r\n\t\t\t\tborder:4px solid #D00;\r\n\t\t\t\tcolor:#590000;\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n}\r\n\r\n//row element\r\n.tabulator-row{\r\n\tposition: relative;\r\n\tbox-sizing: border-box;\r\n\r\n\tbox-sizing: border-box;\r\n\tmin-height:$textSize + ($headerMargin * 2);\r\n\r\n\tbackground-color: $handleColor;\r\n\r\n\tpadding-left: $handleWidth !important;\r\n\r\n\tmargin-bottom: 2px;\r\n\r\n\t&:nth-child(even){\r\n\t\tbackground-color: $handleColorAlt;\r\n\r\n\t\t.tabulator-cell{\r\n\t\t\tbackground-color: $rowAltBackgroundColor;\r\n\t\t}\r\n\t}\r\n\r\n\t&.tabulator-selectable:hover{\r\n\t\tcursor: pointer;\r\n\r\n\t\t.tabulator-cell{\r\n\t\t\tbackground-color:$rowHoverBackground;\r\n\t\t}\r\n\t}\r\n\r\n\t&.tabulator-selected{\r\n\t\t.tabulator-cell{\r\n\t\t\tbackground-color:$rowSelectedBackground;\r\n\t\t}\r\n\t}\r\n\r\n\t&.tabulator-selected:hover{\r\n\t\t.tabulator-cell{\r\n\t\t\tbackground-color:$rowSelectedBackgroundHover;\r\n\t\t\tcursor: pointer;\r\n\t\t}\r\n\t}\r\n\r\n\t&.tabulator-moving{\r\n\t\tposition: absolute;\r\n\r\n\t\tborder-top:1px solid $rowBorderColor;\r\n\t\tborder-bottom:1px solid $rowBorderColor;\r\n\r\n\t\tpointer-events: none !important;\r\n\t\tz-index:15;\r\n\t}\r\n\r\n\t//row resize handles\r\n\t.tabulator-row-resize-handle{\r\n\t\tposition:absolute;\r\n\t\tright:0;\r\n\t\tbottom:0;\r\n\t\tleft:0;\r\n\t\theight:5px;\r\n\r\n\t\t&.prev{\r\n\t\t\ttop:0;\r\n\t\t\tbottom:auto;\r\n\t\t}\r\n\r\n\t\t&:hover{\r\n\t\t\tcursor:ns-resize;\r\n\t\t}\r\n\t}\r\n\r\n\t.tabulator-frozen{\r\n\t\tdisplay: inline-block;\r\n\t\tposition: absolute;\r\n\r\n\t\tbackground-color: inherit;\r\n\r\n\t\tz-index: 10;\r\n\r\n\t\t&.tabulator-frozen-left{\r\n\t\t\tpadding-left: $handleWidth;\r\n\t\t\tborder-right:2px solid $rowBorderColor;\r\n\t\t}\r\n\r\n\t\t&.tabulator-frozen-right{\r\n\t\t\tborder-left:2px solid $rowBorderColor;\r\n\t\t}\r\n\t}\r\n\r\n\t.tabulator-responsive-collapse{\r\n\t\tbox-sizing:border-box;\r\n\r\n\t\tpadding:5px;\r\n\r\n\t\tborder-top:1px solid $rowBorderColor;\r\n\t\tborder-bottom:1px solid $rowBorderColor;\r\n\r\n\t\t&:empty{\r\n\t\t\tdisplay:none;\r\n\t\t}\r\n\r\n\t\ttable{\r\n\t\t\tfont-size:$textSize;\r\n\r\n\t\t\ttr{\r\n\t\t\t\ttd{\r\n\t\t\t\t\tposition: relative;\r\n\r\n\t\t\t\t\t&:first-of-type{\r\n\t\t\t\t\t\tpadding-right:10px;\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\r\n\t//cell element\r\n\t.tabulator-cell{\r\n\t\tdisplay:inline-block;\r\n\t\tposition: relative;\r\n\t\tbox-sizing:border-box;\r\n\t\tpadding:6px 4px;\r\n\t\tborder-right:2px solid $rowBorderColor;\r\n\t\tvertical-align:middle;\r\n\t\twhite-space:nowrap;\r\n\t\toverflow:hidden;\r\n\t\ttext-overflow:ellipsis;\r\n\r\n\t\tbackground-color: $rowBackgroundColor;\r\n\r\n\t\t&.tabulator-editing{\r\n\t\t\tborder:1px solid $editBoxColor;\r\n\t\t\tpadding: 0;\r\n\r\n\t\t\tinput, select{\r\n\t\t\t\tborder:1px;\r\n\t\t\t\tbackground:transparent;\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\t&.tabulator-validation-fail{\r\n\t\t\tborder:1px solid $errorColor;\r\n\t\t\tinput, select{\r\n\t\t\t\tborder:1px;\r\n\t\t\t\tbackground:transparent;\r\n\r\n\t\t\t\tcolor: $errorColor;\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\t//hide left resize handle on first column\r\n\t\t&:first-child{\r\n\t\t\t.tabulator-col-resize-handle.prev{\r\n\t\t\t\tdisplay: none;\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\t//movable row handle\r\n\t\t&.tabulator-row-handle{\r\n\r\n\t\t\tdisplay: inline-flex;\r\n\t\t\talign-items:center;\r\n\r\n\t\t\t-moz-user-select: none;\r\n\t\t\t-khtml-user-select: none;\r\n\t\t\t-webkit-user-select: none;\r\n\t\t\t-o-user-select: none;\r\n\r\n\t\t\t//handle holder\r\n\t\t\t.tabulator-row-handle-box{\r\n\t\t\t\twidth:80%;\r\n\r\n\t\t\t\t//Hamburger element\r\n\t\t\t\t.tabulator-row-handle-bar{\r\n\t\t\t\t\twidth:100%;\r\n\t\t\t\t\theight:3px;\r\n\t\t\t\t\tmargin-top:2px;\r\n\t\t\t\t\tbackground:#666;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\t.tabulator-data-tree-branch{\r\n\t\t\tdisplay:inline-block;\r\n\t\t\tvertical-align:middle;\r\n\r\n\t\t\theight:9px;\r\n\t\t\twidth:7px;\r\n\r\n\t\t\tmargin-top:-9px;\r\n\t\t\tmargin-right:5px;\r\n\r\n\t\t\tborder-bottom-left-radius:1px;\r\n\r\n\t\t\tborder-left:2px solid $rowBorderColor;\r\n\t\t\tborder-bottom:2px solid $rowBorderColor;\r\n\t\t}\r\n\r\n\t\t.tabulator-data-tree-control{\r\n\r\n\t\t\tdisplay:inline-flex;\r\n\t\t\tjustify-content:center;\r\n\t\t\talign-items:center;\r\n\t\t\tvertical-align:middle;\r\n\r\n\t\t\theight:11px;\r\n\t\t\twidth:11px;\r\n\r\n\t\t\tmargin-right:5px;\r\n\r\n\t\t\tborder:1px solid $rowTextColor;\r\n\t\t\tborder-radius:2px;\r\n\t\t\tbackground:rgba(0, 0, 0, .1);\r\n\r\n\t\t\toverflow:hidden;\r\n\r\n\t\t\t&:hover{\r\n\t\t\t\tcursor:pointer;\r\n\t\t\t\tbackground:rgba(0, 0, 0, .2);\r\n\t\t\t}\r\n\r\n\t\t\t.tabulator-data-tree-control-collapse{\r\n\t\t\t\tdisplay:inline-block;\r\n\t\t\t\tposition: relative;\r\n\r\n\t\t\t\theight: 7px;\r\n\t\t\t\twidth: 1px;\r\n\r\n\t\t\t\tbackground: transparent;\r\n\r\n\t\t\t\t&:after {\r\n\t\t\t\t\tposition: absolute;\r\n\t\t\t\t\tcontent: \"\";\r\n\t\t\t\t\tleft: -3px;\r\n\t\t\t\t\ttop: 3px;\r\n\r\n\t\t\t\t\theight: 1px;\r\n\t\t\t\t\twidth: 7px;\r\n\r\n\t\t\t\t\tbackground: $rowTextColor;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t\t.tabulator-data-tree-control-expand{\r\n\t\t\t\tdisplay:inline-block;\r\n\t\t\t\tposition: relative;\r\n\r\n\t\t\t\theight: 7px;\r\n\t\t\t\twidth: 1px;\r\n\r\n\t\t\t\tbackground: $rowTextColor;\r\n\r\n\t\t\t\t&:after {\r\n\t\t\t\t\tposition: absolute;\r\n\t\t\t\t\tcontent: \"\";\r\n\t\t\t\t\tleft: -3px;\r\n\t\t\t\t\ttop: 3px;\r\n\r\n\t\t\t\t\theight: 1px;\r\n\t\t\t\t\twidth: 7px;\r\n\r\n\t\t\t\t\tbackground: $rowTextColor;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t}\r\n\r\n\t\t.tabulator-responsive-collapse-toggle{\r\n\t\t\tdisplay: inline-flex;\r\n\t\t\talign-items:center;\r\n\t\t\tjustify-content:center;\r\n\r\n\t\t\t-moz-user-select: none;\r\n\t\t\t-khtml-user-select: none;\r\n\t\t\t-webkit-user-select: none;\r\n\t\t\t-o-user-select: none;\r\n\r\n\t\t\theight:15px;\r\n\t\t\twidth:15px;\r\n\r\n\t\t\tborder-radius:20px;\r\n\t\t\tbackground:#666;\r\n\r\n\t\t\tcolor:$rowBackgroundColor;\r\n\t\t\tfont-weight:bold;\r\n\t\t\tfont-size:1.1em;\r\n\r\n\t\t\t&:hover{\r\n\t\t\t\topacity:.7;\r\n\t\t\t}\r\n\r\n\t\t\t&.open{\r\n\t\t\t\t.tabulator-responsive-collapse-toggle-close{\r\n\t\t\t\t\tdisplay:initial;\r\n\t\t\t\t}\r\n\r\n\t\t\t\t.tabulator-responsive-collapse-toggle-open{\r\n\t\t\t\t\tdisplay:none;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t\t.tabulator-responsive-collapse-toggle-close{\r\n\t\t\t\tdisplay:none;\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\r\n\t//row grouping element\r\n\t&.tabulator-group{\r\n\r\n\t\tbox-sizing:border-box;\r\n\t\tborder-bottom:2px solid $primary;\r\n\t\tborder-top:2px solid $primary;\r\n\t\tpadding:5px;\r\n\t\tpadding-left:10px;\r\n\t\tbackground:lighten($primary, 20%);\r\n\t\tfont-weight:bold;\r\n\t\tcolor:fff;\r\n\t\tmargin-bottom: 2px;\r\n\r\n\t\tmin-width: 100%;\r\n\r\n\t\t&:hover{\r\n\t\t\tcursor:pointer;\r\n\t\t\tbackground-color:rgba(0,0,0,.1);\r\n\t\t}\r\n\r\n\r\n\t\t&.tabulator-group-visible{\r\n\t\t\t.tabulator-arrow{\r\n\t\t\t\tmargin-right:10px;\r\n\t\t\t\tborder-left: 6px solid transparent;\r\n\t\t\t\tborder-right: 6px solid transparent;\r\n\t\t\t\tborder-top: 6px solid $sortArrowActive;\r\n\t\t\t\tborder-bottom: 0;\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\t&.tabulator-group-level-1{\r\n\t\t\t.tabulator-arrow{\r\n\t\t\t\tmargin-left:20px;\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\t&.tabulator-group-level-2{\r\n\t\t\t.tabulator-arrow{\r\n\t\t\t\tmargin-left:40px;\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\t&.tabulator-group-level-3{\r\n\t\t\t.tabulator-arrow{\r\n\t\t\t\tmargin-left:60px;\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\t&.tabulator-group-level-4{\r\n\t\t\t.tabulator-arrow{\r\n\t\t\t\tmargin-left:80px;\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\t&.tabulator-group-level-5{\r\n\t\t\t.tabulator-arrow{\r\n\t\t\t\tmargin-left:100px;\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\t//sorting arrow\r\n\t\t.tabulator-arrow{\r\n\t\t\tdisplay: inline-block;\r\n\t\t\twidth: 0;\r\n\t\t\theight: 0;\r\n\t\t\tmargin-right:16px;\r\n\t\t\tborder-top: 6px solid transparent;\r\n\t\t\tborder-bottom: 6px solid transparent;\r\n\t\t\tborder-right: 0;\r\n\t\t\tborder-left: 6px solid $sortArrowActive;\r\n\t\t\tvertical-align:middle;\r\n\t\t}\r\n\r\n\t\tspan{\r\n\t\t\tmargin-left:10px;\r\n\t\t\tcolor:$primary;\r\n\t\t}\r\n\t}\r\n}\r\n\r\n.tabulator-edit-select-list{\r\n\tposition: absolute;\r\n\tdisplay:inline-block;\r\n\tbox-sizing:border-box;\r\n\r\n\tmax-height:200px;\r\n\r\n\tbackground:$rowBackgroundColor;\r\n\tborder:1px solid $rowBorderColor;\r\n\r\n\tfont-size:$textSize;\r\n\r\n\toverflow-y:auto;\r\n\t-webkit-overflow-scrolling: touch;\r\n\r\n\tz-index: 10000;\r\n\r\n\t.tabulator-edit-select-list-item{\r\n\t\tpadding:4px;\r\n\r\n\t\tcolor:$rowTextColor;\r\n\r\n\t\t&.active{\r\n\t\t\tcolor:$rowBackgroundColor;\r\n\t\t\tbackground:$editBoxColor;\r\n\t\t}\r\n\r\n\t\t&:hover{\r\n\t\t\tcursor:pointer;\r\n\r\n\t\t\tcolor:$rowBackgroundColor;\r\n\t\t\tbackground:$editBoxColor;\r\n\t\t}\r\n\t}\r\n\r\n\t.tabulator-edit-select-list-group{\r\n\t\tborder-bottom:1px solid $rowBorderColor;\r\n\r\n\t\tpadding:4px;\r\n\t\tpadding-top:6px;\r\n\r\n\t\tcolor:$rowTextColor;\r\n\t\tfont-weight:bold;\r\n\t}\r\n}"]} \ No newline at end of file diff --git a/Gems/AssetMemoryAnalyzer/External/tabulator-master/dist/css/tabulator_simple.css b/Gems/AssetMemoryAnalyzer/External/tabulator-master/dist/css/tabulator_simple.css deleted file mode 100644 index 51aca5bbca..0000000000 --- a/Gems/AssetMemoryAnalyzer/External/tabulator-master/dist/css/tabulator_simple.css +++ /dev/null @@ -1,766 +0,0 @@ -/* Tabulator v4.1.2 (c) Oliver Folkerd */ -.tabulator { - position: relative; - background-color: #fff; - overflow: hidden; - font-size: 14px; - text-align: left; - -ms-transform: translatez(0); - transform: translatez(0); -} - -.tabulator[tabulator-layout="fitDataFill"] .tabulator-tableHolder .tabulator-table { - min-width: 100%; -} - -.tabulator.tabulator-block-select { - -webkit-user-select: none; - -moz-user-select: none; - -ms-user-select: none; - user-select: none; -} - -.tabulator .tabulator-header { - position: relative; - box-sizing: border-box; - width: 100%; - border-bottom: 1px solid #999; - background-color: #fff; - color: #555; - font-weight: bold; - white-space: nowrap; - overflow: hidden; - -moz-user-select: none; - -khtml-user-select: none; - -webkit-user-select: none; - -o-user-select: none; -} - -.tabulator .tabulator-header .tabulator-col { - display: inline-block; - position: relative; - box-sizing: border-box; - border-right: 1px solid #ddd; - background-color: #fff; - text-align: left; - vertical-align: bottom; - overflow: hidden; -} - -.tabulator .tabulator-header .tabulator-col.tabulator-moving { - position: absolute; - border: 1px solid #999; - background: #e6e6e6; - pointer-events: none; -} - -.tabulator .tabulator-header .tabulator-col .tabulator-col-content { - box-sizing: border-box; - position: relative; - padding: 4px; -} - -.tabulator .tabulator-header .tabulator-col .tabulator-col-content .tabulator-col-title { - box-sizing: border-box; - width: 100%; - white-space: nowrap; - overflow: hidden; - text-overflow: ellipsis; - vertical-align: bottom; -} - -.tabulator .tabulator-header .tabulator-col .tabulator-col-content .tabulator-col-title .tabulator-title-editor { - box-sizing: border-box; - width: 100%; - border: 1px solid #999; - padding: 1px; - background: #fff; -} - -.tabulator .tabulator-header .tabulator-col .tabulator-col-content .tabulator-arrow { - display: inline-block; - position: absolute; - top: 9px; - right: 8px; - width: 0; - height: 0; - border-left: 6px solid transparent; - border-right: 6px solid transparent; - border-bottom: 6px solid #bbb; -} - -.tabulator .tabulator-header .tabulator-col.tabulator-col-group .tabulator-col-group-cols { - position: relative; - display: -ms-flexbox; - display: flex; - border-top: 1px solid #ddd; - overflow: hidden; -} - -.tabulator .tabulator-header .tabulator-col.tabulator-col-group .tabulator-col-group-cols .tabulator-col:last-child { - margin-right: -1px; -} - -.tabulator .tabulator-header .tabulator-col:first-child .tabulator-col-resize-handle.prev { - display: none; -} - -.tabulator .tabulator-header .tabulator-col.ui-sortable-helper { - position: absolute; - background-color: #e6e6e6 !important; - border: 1px solid #ddd; -} - -.tabulator .tabulator-header .tabulator-col .tabulator-header-filter { - position: relative; - box-sizing: border-box; - margin-top: 2px; - width: 100%; - text-align: center; -} - -.tabulator .tabulator-header .tabulator-col .tabulator-header-filter textarea { - height: auto !important; -} - -.tabulator .tabulator-header .tabulator-col .tabulator-header-filter svg { - margin-top: 3px; -} - -.tabulator .tabulator-header .tabulator-col .tabulator-header-filter input::-ms-clear { - width: 0; - height: 0; -} - -.tabulator .tabulator-header .tabulator-col.tabulator-sortable .tabulator-col-title { - padding-right: 25px; -} - -.tabulator .tabulator-header .tabulator-col.tabulator-sortable:hover { - cursor: pointer; - background-color: #e6e6e6; -} - -.tabulator .tabulator-header .tabulator-col.tabulator-sortable[aria-sort="none"] .tabulator-col-content .tabulator-arrow { - border-top: none; - border-bottom: 6px solid #bbb; -} - -.tabulator .tabulator-header .tabulator-col.tabulator-sortable[aria-sort="asc"] .tabulator-col-content .tabulator-arrow { - border-top: none; - border-bottom: 6px solid #666; -} - -.tabulator .tabulator-header .tabulator-col.tabulator-sortable[aria-sort="desc"] .tabulator-col-content .tabulator-arrow { - border-top: 6px solid #666; - border-bottom: none; -} - -.tabulator .tabulator-header .tabulator-col.tabulator-col-vertical .tabulator-col-content .tabulator-col-title { - -webkit-writing-mode: vertical-rl; - -ms-writing-mode: tb-rl; - writing-mode: vertical-rl; - text-orientation: mixed; - display: -ms-flexbox; - display: flex; - -ms-flex-align: center; - align-items: center; - -ms-flex-pack: center; - justify-content: center; -} - -.tabulator .tabulator-header .tabulator-col.tabulator-col-vertical.tabulator-col-vertical-flip .tabulator-col-title { - -ms-transform: rotate(180deg); - transform: rotate(180deg); -} - -.tabulator .tabulator-header .tabulator-col.tabulator-col-vertical.tabulator-sortable .tabulator-col-title { - padding-right: 0; - padding-top: 20px; -} - -.tabulator .tabulator-header .tabulator-col.tabulator-col-vertical.tabulator-sortable.tabulator-col-vertical-flip .tabulator-col-title { - padding-right: 0; - padding-bottom: 20px; -} - -.tabulator .tabulator-header .tabulator-col.tabulator-col-vertical.tabulator-sortable .tabulator-arrow { - right: calc(50% - 6px); -} - -.tabulator .tabulator-header .tabulator-frozen { - display: inline-block; - position: absolute; - z-index: 10; -} - -.tabulator .tabulator-header .tabulator-frozen.tabulator-frozen-left { - border-right: 2px solid #ddd; -} - -.tabulator .tabulator-header .tabulator-frozen.tabulator-frozen-right { - border-left: 2px solid #ddd; -} - -.tabulator .tabulator-header .tabulator-calcs-holder { - box-sizing: border-box; - min-width: 400%; - background: #f2f2f2 !important; - border-top: 1px solid #ddd; - border-bottom: 1px solid #999; - overflow: hidden; -} - -.tabulator .tabulator-header .tabulator-calcs-holder .tabulator-row { - background: #f2f2f2 !important; -} - -.tabulator .tabulator-header .tabulator-calcs-holder .tabulator-row .tabulator-col-resize-handle { - display: none; -} - -.tabulator .tabulator-header .tabulator-frozen-rows-holder { - min-width: 400%; -} - -.tabulator .tabulator-header .tabulator-frozen-rows-holder:empty { - display: none; -} - -.tabulator .tabulator-tableHolder { - position: relative; - width: 100%; - white-space: nowrap; - overflow: auto; - -webkit-overflow-scrolling: touch; -} - -.tabulator .tabulator-tableHolder:focus { - outline: none; -} - -.tabulator .tabulator-tableHolder .tabulator-placeholder { - box-sizing: border-box; - display: -ms-flexbox; - display: flex; - -ms-flex-align: center; - align-items: center; - width: 100%; -} - -.tabulator .tabulator-tableHolder .tabulator-placeholder[tabulator-render-mode="virtual"] { - position: absolute; - top: 0; - left: 0; - height: 100%; -} - -.tabulator .tabulator-tableHolder .tabulator-placeholder span { - display: inline-block; - margin: 0 auto; - padding: 10px; - color: #000; - font-weight: bold; - font-size: 20px; -} - -.tabulator .tabulator-tableHolder .tabulator-table { - position: relative; - display: inline-block; - background-color: #fff; - white-space: nowrap; - overflow: visible; - color: #333; -} - -.tabulator .tabulator-tableHolder .tabulator-table .tabulator-row.tabulator-calcs { - font-weight: bold; - background: #f2f2f2 !important; -} - -.tabulator .tabulator-tableHolder .tabulator-table .tabulator-row.tabulator-calcs.tabulator-calcs-top { - border-bottom: 2px solid #ddd; -} - -.tabulator .tabulator-tableHolder .tabulator-table .tabulator-row.tabulator-calcs.tabulator-calcs-bottom { - border-top: 2px solid #ddd; -} - -.tabulator .tabulator-col-resize-handle { - position: absolute; - right: 0; - top: 0; - bottom: 0; - width: 5px; -} - -.tabulator .tabulator-col-resize-handle.prev { - left: 0; - right: auto; -} - -.tabulator .tabulator-col-resize-handle:hover { - cursor: ew-resize; -} - -.tabulator .tabulator-footer { - padding: 5px 10px; - border-top: 1px solid #999; - background-color: #fff; - text-align: right; - color: #555; - font-weight: bold; - white-space: nowrap; - -ms-user-select: none; - user-select: none; - -moz-user-select: none; - -khtml-user-select: none; - -webkit-user-select: none; - -o-user-select: none; -} - -.tabulator .tabulator-footer .tabulator-calcs-holder { - box-sizing: border-box; - width: calc(100% + 20px); - margin: -5px -10px 5px -10px; - text-align: left; - background: #f2f2f2 !important; - border-bottom: 1px solid #fff; - border-top: 1px solid #ddd; - overflow: hidden; -} - -.tabulator .tabulator-footer .tabulator-calcs-holder .tabulator-row { - background: #f2f2f2 !important; -} - -.tabulator .tabulator-footer .tabulator-calcs-holder .tabulator-row .tabulator-col-resize-handle { - display: none; -} - -.tabulator .tabulator-footer .tabulator-calcs-holder:only-child { - margin-bottom: -5px; - border-bottom: none; -} - -.tabulator .tabulator-footer .tabulator-pages { - margin: 0 7px; -} - -.tabulator .tabulator-footer .tabulator-page { - display: inline-block; - margin: 0 2px; - border: 1px solid #aaa; - border-radius: 3px; - padding: 2px 5px; - background: rgba(255, 255, 255, 0.2); - color: #555; - font-family: inherit; - font-weight: inherit; - font-size: inherit; -} - -.tabulator .tabulator-footer .tabulator-page.active { - color: #d00; -} - -.tabulator .tabulator-footer .tabulator-page:disabled { - opacity: .5; -} - -.tabulator .tabulator-footer .tabulator-page:not(.disabled):hover { - cursor: pointer; - background: rgba(0, 0, 0, 0.2); - color: #fff; -} - -.tabulator .tabulator-loader { - position: absolute; - display: -ms-flexbox; - display: flex; - -ms-flex-align: center; - align-items: center; - top: 0; - left: 0; - z-index: 100; - height: 100%; - width: 100%; - background: rgba(0, 0, 0, 0.4); - text-align: center; -} - -.tabulator .tabulator-loader .tabulator-loader-msg { - display: inline-block; - margin: 0 auto; - padding: 10px 20px; - border-radius: 10px; - background: #fff; - font-weight: bold; - font-size: 16px; -} - -.tabulator .tabulator-loader .tabulator-loader-msg.tabulator-loading { - border: 4px solid #333; - color: #000; -} - -.tabulator .tabulator-loader .tabulator-loader-msg.tabulator-error { - border: 4px solid #D00; - color: #590000; -} - -.tabulator-row { - position: relative; - box-sizing: border-box; - min-height: 22px; - background-color: #fff; - border-bottom: 1px solid #ddd; -} - -.tabulator-row:nth-child(even) { - background-color: #fff; -} - -.tabulator-row.tabulator-selectable:hover { - background-color: #bbb; - cursor: pointer; -} - -.tabulator-row.tabulator-selected { - background-color: #9ABCEA; -} - -.tabulator-row.tabulator-selected:hover { - background-color: #769BCC; - cursor: pointer; -} - -.tabulator-row.tabulator-moving { - position: absolute; - border-top: 1px solid #ddd; - border-bottom: 1px solid #ddd; - pointer-events: none !important; - z-index: 15; -} - -.tabulator-row .tabulator-row-resize-handle { - position: absolute; - right: 0; - bottom: 0; - left: 0; - height: 5px; -} - -.tabulator-row .tabulator-row-resize-handle.prev { - top: 0; - bottom: auto; -} - -.tabulator-row .tabulator-row-resize-handle:hover { - cursor: ns-resize; -} - -.tabulator-row .tabulator-frozen { - display: inline-block; - position: absolute; - background-color: inherit; - z-index: 10; -} - -.tabulator-row .tabulator-frozen.tabulator-frozen-left { - border-right: 2px solid #ddd; -} - -.tabulator-row .tabulator-frozen.tabulator-frozen-right { - border-left: 2px solid #ddd; -} - -.tabulator-row .tabulator-responsive-collapse { - box-sizing: border-box; - padding: 5px; - border-top: 1px solid #ddd; - border-bottom: 1px solid #ddd; -} - -.tabulator-row .tabulator-responsive-collapse:empty { - display: none; -} - -.tabulator-row .tabulator-responsive-collapse table { - font-size: 14px; -} - -.tabulator-row .tabulator-responsive-collapse table tr td { - position: relative; -} - -.tabulator-row .tabulator-responsive-collapse table tr td:first-of-type { - padding-right: 10px; -} - -.tabulator-row .tabulator-cell { - display: inline-block; - position: relative; - box-sizing: border-box; - padding: 4px; - border-right: 1px solid #ddd; - vertical-align: middle; - white-space: nowrap; - overflow: hidden; - text-overflow: ellipsis; -} - -.tabulator-row .tabulator-cell:last-of-type { - border-right: none; -} - -.tabulator-row .tabulator-cell.tabulator-editing { - border: 1px solid #1D68CD; - padding: 0; -} - -.tabulator-row .tabulator-cell.tabulator-editing input, .tabulator-row .tabulator-cell.tabulator-editing select { - border: 1px; - background: transparent; -} - -.tabulator-row .tabulator-cell.tabulator-validation-fail { - border: 1px solid #dd0000; -} - -.tabulator-row .tabulator-cell.tabulator-validation-fail input, .tabulator-row .tabulator-cell.tabulator-validation-fail select { - border: 1px; - background: transparent; - color: #dd0000; -} - -.tabulator-row .tabulator-cell:first-child .tabulator-col-resize-handle.prev { - display: none; -} - -.tabulator-row .tabulator-cell.tabulator-row-handle { - display: -ms-inline-flexbox; - display: inline-flex; - -ms-flex-align: center; - align-items: center; - -moz-user-select: none; - -khtml-user-select: none; - -webkit-user-select: none; - -o-user-select: none; -} - -.tabulator-row .tabulator-cell.tabulator-row-handle .tabulator-row-handle-box { - width: 80%; -} - -.tabulator-row .tabulator-cell.tabulator-row-handle .tabulator-row-handle-box .tabulator-row-handle-bar { - width: 100%; - height: 3px; - margin-top: 2px; - background: #666; -} - -.tabulator-row .tabulator-cell .tabulator-data-tree-branch { - display: inline-block; - vertical-align: middle; - height: 9px; - width: 7px; - margin-top: -9px; - margin-right: 5px; - border-bottom-left-radius: 1px; - border-left: 2px solid #ddd; - border-bottom: 2px solid #ddd; -} - -.tabulator-row .tabulator-cell .tabulator-data-tree-control { - display: -ms-inline-flexbox; - display: inline-flex; - -ms-flex-pack: center; - justify-content: center; - -ms-flex-align: center; - align-items: center; - vertical-align: middle; - height: 11px; - width: 11px; - margin-right: 5px; - border: 1px solid #333; - border-radius: 2px; - background: rgba(0, 0, 0, 0.1); - overflow: hidden; -} - -.tabulator-row .tabulator-cell .tabulator-data-tree-control:hover { - cursor: pointer; - background: rgba(0, 0, 0, 0.2); -} - -.tabulator-row .tabulator-cell .tabulator-data-tree-control .tabulator-data-tree-control-collapse { - display: inline-block; - position: relative; - height: 7px; - width: 1px; - background: transparent; -} - -.tabulator-row .tabulator-cell .tabulator-data-tree-control .tabulator-data-tree-control-collapse:after { - position: absolute; - content: ""; - left: -3px; - top: 3px; - height: 1px; - width: 7px; - background: #333; -} - -.tabulator-row .tabulator-cell .tabulator-data-tree-control .tabulator-data-tree-control-expand { - display: inline-block; - position: relative; - height: 7px; - width: 1px; - background: #333; -} - -.tabulator-row .tabulator-cell .tabulator-data-tree-control .tabulator-data-tree-control-expand:after { - position: absolute; - content: ""; - left: -3px; - top: 3px; - height: 1px; - width: 7px; - background: #333; -} - -.tabulator-row .tabulator-cell .tabulator-responsive-collapse-toggle { - display: -ms-inline-flexbox; - display: inline-flex; - -ms-flex-align: center; - align-items: center; - -ms-flex-pack: center; - justify-content: center; - -moz-user-select: none; - -khtml-user-select: none; - -webkit-user-select: none; - -o-user-select: none; - height: 15px; - width: 15px; - border-radius: 20px; - background: #666; - color: #fff; - font-weight: bold; - font-size: 1.1em; -} - -.tabulator-row .tabulator-cell .tabulator-responsive-collapse-toggle:hover { - opacity: .7; -} - -.tabulator-row .tabulator-cell .tabulator-responsive-collapse-toggle.open .tabulator-responsive-collapse-toggle-close { - display: initial; -} - -.tabulator-row .tabulator-cell .tabulator-responsive-collapse-toggle.open .tabulator-responsive-collapse-toggle-open { - display: none; -} - -.tabulator-row .tabulator-cell .tabulator-responsive-collapse-toggle .tabulator-responsive-collapse-toggle-close { - display: none; -} - -.tabulator-row.tabulator-group { - box-sizing: border-box; - border-bottom: 1px solid #999; - border-right: 1px solid #ddd; - border-top: 1px solid #999; - padding: 5px; - padding-left: 10px; - background: #fafafa; - font-weight: bold; - min-width: 100%; -} - -.tabulator-row.tabulator-group:hover { - cursor: pointer; - background-color: rgba(0, 0, 0, 0.1); -} - -.tabulator-row.tabulator-group.tabulator-group-visible .tabulator-arrow { - margin-right: 10px; - border-left: 6px solid transparent; - border-right: 6px solid transparent; - border-top: 6px solid #666; - border-bottom: 0; -} - -.tabulator-row.tabulator-group.tabulator-group-level-1 .tabulator-arrow { - margin-left: 20px; -} - -.tabulator-row.tabulator-group.tabulator-group-level-2 .tabulator-arrow { - margin-left: 40px; -} - -.tabulator-row.tabulator-group.tabulator-group-level-3 .tabulator-arrow { - margin-left: 60px; -} - -.tabulator-row.tabulator-group.tabulator-group-level-4 .tabulator-arrow { - margin-left: 80px; -} - -.tabulator-row.tabulator-group.tabulator-group-level-5 .tabulator-arrow { - margin-left: 100px; -} - -.tabulator-row.tabulator-group .tabulator-arrow { - display: inline-block; - width: 0; - height: 0; - margin-right: 16px; - border-top: 6px solid transparent; - border-bottom: 6px solid transparent; - border-right: 0; - border-left: 6px solid #666; - vertical-align: middle; -} - -.tabulator-row.tabulator-group span { - margin-left: 10px; - color: #666; -} - -.tabulator-edit-select-list { - position: absolute; - display: inline-block; - box-sizing: border-box; - max-height: 200px; - background: #fff; - border: 1px solid #ddd; - font-size: 14px; - overflow-y: auto; - -webkit-overflow-scrolling: touch; - z-index: 10000; -} - -.tabulator-edit-select-list .tabulator-edit-select-list-item { - padding: 4px; - color: #333; -} - -.tabulator-edit-select-list .tabulator-edit-select-list-item.active { - color: #fff; - background: #1D68CD; -} - -.tabulator-edit-select-list .tabulator-edit-select-list-item:hover { - cursor: pointer; - color: #fff; - background: #1D68CD; -} - -.tabulator-edit-select-list .tabulator-edit-select-list-group { - border-bottom: 1px solid #ddd; - padding: 4px; - padding-top: 6px; - color: #333; - font-weight: bold; -} diff --git a/Gems/AssetMemoryAnalyzer/External/tabulator-master/dist/css/tabulator_simple.min.css b/Gems/AssetMemoryAnalyzer/External/tabulator-master/dist/css/tabulator_simple.min.css deleted file mode 100644 index 13b1828bba..0000000000 --- a/Gems/AssetMemoryAnalyzer/External/tabulator-master/dist/css/tabulator_simple.min.css +++ /dev/null @@ -1,3 +0,0 @@ -/* Tabulator v4.1.2 (c) Oliver Folkerd */ -.tabulator{position:relative;background-color:#fff;overflow:hidden;font-size:14px;text-align:left;transform:translatez(0)}.tabulator[tabulator-layout=fitDataFill] .tabulator-tableHolder .tabulator-table{min-width:100%}.tabulator.tabulator-block-select{-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}.tabulator .tabulator-header{width:100%;border-bottom:1px solid #999;color:#555;font-weight:700;white-space:nowrap;-moz-user-select:none;-khtml-user-select:none;-webkit-user-select:none;-o-user-select:none}.tabulator .tabulator-header,.tabulator .tabulator-header .tabulator-col{position:relative;box-sizing:border-box;background-color:#fff;overflow:hidden}.tabulator .tabulator-header .tabulator-col{display:inline-block;border-right:1px solid #ddd;text-align:left;vertical-align:bottom}.tabulator .tabulator-header .tabulator-col.tabulator-moving{position:absolute;border:1px solid #999;background:#e6e6e6;pointer-events:none}.tabulator .tabulator-header .tabulator-col .tabulator-col-content{box-sizing:border-box;position:relative;padding:4px}.tabulator .tabulator-header .tabulator-col .tabulator-col-content .tabulator-col-title{box-sizing:border-box;width:100%;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;vertical-align:bottom}.tabulator .tabulator-header .tabulator-col .tabulator-col-content .tabulator-col-title .tabulator-title-editor{box-sizing:border-box;width:100%;border:1px solid #999;padding:1px;background:#fff}.tabulator .tabulator-header .tabulator-col .tabulator-col-content .tabulator-arrow{display:inline-block;position:absolute;top:9px;right:8px;width:0;height:0;border-left:6px solid transparent;border-right:6px solid transparent;border-bottom:6px solid #bbb}.tabulator .tabulator-header .tabulator-col.tabulator-col-group .tabulator-col-group-cols{position:relative;display:-ms-flexbox;display:flex;border-top:1px solid #ddd;overflow:hidden}.tabulator .tabulator-header .tabulator-col.tabulator-col-group .tabulator-col-group-cols .tabulator-col:last-child{margin-right:-1px}.tabulator .tabulator-header .tabulator-col:first-child .tabulator-col-resize-handle.prev{display:none}.tabulator .tabulator-header .tabulator-col.ui-sortable-helper{position:absolute;background-color:#e6e6e6!important;border:1px solid #ddd}.tabulator .tabulator-header .tabulator-col .tabulator-header-filter{position:relative;box-sizing:border-box;margin-top:2px;width:100%;text-align:center}.tabulator .tabulator-header .tabulator-col .tabulator-header-filter textarea{height:auto!important}.tabulator .tabulator-header .tabulator-col .tabulator-header-filter svg{margin-top:3px}.tabulator .tabulator-header .tabulator-col .tabulator-header-filter input::-ms-clear{width:0;height:0}.tabulator .tabulator-header .tabulator-col.tabulator-sortable .tabulator-col-title{padding-right:25px}.tabulator .tabulator-header .tabulator-col.tabulator-sortable:hover{cursor:pointer;background-color:#e6e6e6}.tabulator .tabulator-header .tabulator-col.tabulator-sortable[aria-sort=none] .tabulator-col-content .tabulator-arrow{border-top:none;border-bottom:6px solid #bbb}.tabulator .tabulator-header .tabulator-col.tabulator-sortable[aria-sort=asc] .tabulator-col-content .tabulator-arrow{border-top:none;border-bottom:6px solid #666}.tabulator .tabulator-header .tabulator-col.tabulator-sortable[aria-sort=desc] .tabulator-col-content .tabulator-arrow{border-top:6px solid #666;border-bottom:none}.tabulator .tabulator-header .tabulator-col.tabulator-col-vertical .tabulator-col-content .tabulator-col-title{-webkit-writing-mode:vertical-rl;-ms-writing-mode:tb-rl;writing-mode:vertical-rl;text-orientation:mixed;display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;-ms-flex-pack:center;justify-content:center}.tabulator .tabulator-header .tabulator-col.tabulator-col-vertical.tabulator-col-vertical-flip .tabulator-col-title{transform:rotate(180deg)}.tabulator .tabulator-header .tabulator-col.tabulator-col-vertical.tabulator-sortable .tabulator-col-title{padding-right:0;padding-top:20px}.tabulator .tabulator-header .tabulator-col.tabulator-col-vertical.tabulator-sortable.tabulator-col-vertical-flip .tabulator-col-title{padding-right:0;padding-bottom:20px}.tabulator .tabulator-header .tabulator-col.tabulator-col-vertical.tabulator-sortable .tabulator-arrow{right:calc(50% - 6px)}.tabulator .tabulator-header .tabulator-frozen{display:inline-block;position:absolute;z-index:1}.tabulator .tabulator-header .tabulator-frozen.tabulator-frozen-left{border-right:2px solid #ddd}.tabulator .tabulator-header .tabulator-frozen.tabulator-frozen-right{border-left:2px solid #ddd}.tabulator .tabulator-header .tabulator-calcs-holder{box-sizing:border-box;min-width:400%;background:#f2f2f2!important;border-top:1px solid #ddd;border-bottom:1px solid #999;overflow:hidden}.tabulator .tabulator-header .tabulator-calcs-holder .tabulator-row{background:#f2f2f2!important}.tabulator .tabulator-header .tabulator-calcs-holder .tabulator-row .tabulator-col-resize-handle{display:none}.tabulator .tabulator-header .tabulator-frozen-rows-holder{min-width:400%}.tabulator .tabulator-header .tabulator-frozen-rows-holder:empty{display:none}.tabulator .tabulator-tableHolder{position:relative;width:100%;white-space:nowrap;overflow:auto;-webkit-overflow-scrolling:touch}.tabulator .tabulator-tableHolder:focus{outline:none}.tabulator .tabulator-tableHolder .tabulator-placeholder{box-sizing:border-box;display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;width:100%}.tabulator .tabulator-tableHolder .tabulator-placeholder[tabulator-render-mode=virtual]{position:absolute;top:0;left:0;height:100%}.tabulator .tabulator-tableHolder .tabulator-placeholder span{display:inline-block;margin:0 auto;padding:10px;color:#000;font-weight:700;font-size:20px}.tabulator .tabulator-tableHolder .tabulator-table{position:relative;display:inline-block;background-color:#fff;white-space:nowrap;overflow:visible;color:#333}.tabulator .tabulator-tableHolder .tabulator-table .tabulator-row.tabulator-calcs{font-weight:700;background:#f2f2f2!important}.tabulator .tabulator-tableHolder .tabulator-table .tabulator-row.tabulator-calcs.tabulator-calcs-top{border-bottom:2px solid #ddd}.tabulator .tabulator-tableHolder .tabulator-table .tabulator-row.tabulator-calcs.tabulator-calcs-bottom{border-top:2px solid #ddd}.tabulator .tabulator-col-resize-handle{position:absolute;right:0;top:0;bottom:0;width:5px}.tabulator .tabulator-col-resize-handle.prev{left:0;right:auto}.tabulator .tabulator-col-resize-handle:hover{cursor:ew-resize}.tabulator .tabulator-footer{padding:5px 10px;border-top:1px solid #999;background-color:#fff;text-align:right;color:#555;font-weight:700;white-space:nowrap;-ms-user-select:none;user-select:none;-moz-user-select:none;-khtml-user-select:none;-webkit-user-select:none;-o-user-select:none}.tabulator .tabulator-footer .tabulator-calcs-holder{box-sizing:border-box;width:calc(100% + 20px);margin:-5px -10px 5px;text-align:left;background:#f2f2f2!important;border-bottom:1px solid #fff;border-top:1px solid #ddd;overflow:hidden}.tabulator .tabulator-footer .tabulator-calcs-holder .tabulator-row{background:#f2f2f2!important}.tabulator .tabulator-footer .tabulator-calcs-holder .tabulator-row .tabulator-col-resize-handle{display:none}.tabulator .tabulator-footer .tabulator-calcs-holder:only-child{margin-bottom:-5px;border-bottom:none}.tabulator .tabulator-footer .tabulator-pages{margin:0 7px}.tabulator .tabulator-footer .tabulator-page{display:inline-block;margin:0 2px;border:1px solid #aaa;border-radius:3px;padding:2px 5px;background:hsla(0,0%,100%,.2);color:#555;font-family:inherit;font-weight:inherit;font-size:inherit}.tabulator .tabulator-footer .tabulator-page.active{color:#d00}.tabulator .tabulator-footer .tabulator-page:disabled{opacity:.5}.tabulator .tabulator-footer .tabulator-page:not(.disabled):hover{cursor:pointer;background:rgba(0,0,0,.2);color:#fff}.tabulator .tabulator-loader{position:absolute;display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;top:0;left:0;z-index:3;height:100%;width:100%;background:rgba(0,0,0,.4);text-align:center}.tabulator .tabulator-loader .tabulator-loader-msg{display:inline-block;margin:0 auto;padding:10px 20px;border-radius:10px;background:#fff;font-weight:700;font-size:16px}.tabulator .tabulator-loader .tabulator-loader-msg.tabulator-loading{border:4px solid #333;color:#000}.tabulator .tabulator-loader .tabulator-loader-msg.tabulator-error{border:4px solid #d00;color:#590000}.tabulator-row{position:relative;box-sizing:border-box;min-height:22px;border-bottom:1px solid #ddd}.tabulator-row,.tabulator-row:nth-child(2n){background-color:#fff}.tabulator-row.tabulator-selectable:hover{background-color:#bbb;cursor:pointer}.tabulator-row.tabulator-selected{background-color:#9abcea}.tabulator-row.tabulator-selected:hover{background-color:#769bcc;cursor:pointer}.tabulator-row.tabulator-moving{position:absolute;border-top:1px solid #ddd;border-bottom:1px solid #ddd;pointer-events:none!important;z-index:2}.tabulator-row .tabulator-row-resize-handle{position:absolute;right:0;bottom:0;left:0;height:5px}.tabulator-row .tabulator-row-resize-handle.prev{top:0;bottom:auto}.tabulator-row .tabulator-row-resize-handle:hover{cursor:ns-resize}.tabulator-row .tabulator-frozen{display:inline-block;position:absolute;background-color:inherit;z-index:1}.tabulator-row .tabulator-frozen.tabulator-frozen-left{border-right:2px solid #ddd}.tabulator-row .tabulator-frozen.tabulator-frozen-right{border-left:2px solid #ddd}.tabulator-row .tabulator-responsive-collapse{box-sizing:border-box;padding:5px;border-top:1px solid #ddd;border-bottom:1px solid #ddd}.tabulator-row .tabulator-responsive-collapse:empty{display:none}.tabulator-row .tabulator-responsive-collapse table{font-size:14px}.tabulator-row .tabulator-responsive-collapse table tr td{position:relative}.tabulator-row .tabulator-responsive-collapse table tr td:first-of-type{padding-right:10px}.tabulator-row .tabulator-cell{display:inline-block;position:relative;box-sizing:border-box;padding:4px;border-right:1px solid #ddd;vertical-align:middle;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.tabulator-row .tabulator-cell:last-of-type{border-right:none}.tabulator-row .tabulator-cell.tabulator-editing{border:1px solid #1d68cd;padding:0}.tabulator-row .tabulator-cell.tabulator-editing input,.tabulator-row .tabulator-cell.tabulator-editing select{border:1px;background:transparent}.tabulator-row .tabulator-cell.tabulator-validation-fail{border:1px solid #d00}.tabulator-row .tabulator-cell.tabulator-validation-fail input,.tabulator-row .tabulator-cell.tabulator-validation-fail select{border:1px;background:transparent;color:#d00}.tabulator-row .tabulator-cell:first-child .tabulator-col-resize-handle.prev{display:none}.tabulator-row .tabulator-cell.tabulator-row-handle{display:-ms-inline-flexbox;display:inline-flex;-ms-flex-align:center;align-items:center;-moz-user-select:none;-khtml-user-select:none;-webkit-user-select:none;-o-user-select:none}.tabulator-row .tabulator-cell.tabulator-row-handle .tabulator-row-handle-box{width:80%}.tabulator-row .tabulator-cell.tabulator-row-handle .tabulator-row-handle-box .tabulator-row-handle-bar{width:100%;height:3px;margin-top:2px;background:#666}.tabulator-row .tabulator-cell .tabulator-data-tree-branch{display:inline-block;vertical-align:middle;height:9px;width:7px;margin-top:-9px;margin-right:5px;border-bottom-left-radius:1px;border-left:2px solid #ddd;border-bottom:2px solid #ddd}.tabulator-row .tabulator-cell .tabulator-data-tree-control{display:-ms-inline-flexbox;display:inline-flex;-ms-flex-pack:center;justify-content:center;-ms-flex-align:center;align-items:center;vertical-align:middle;height:11px;width:11px;margin-right:5px;border:1px solid #333;border-radius:2px;background:rgba(0,0,0,.1);overflow:hidden}.tabulator-row .tabulator-cell .tabulator-data-tree-control:hover{cursor:pointer;background:rgba(0,0,0,.2)}.tabulator-row .tabulator-cell .tabulator-data-tree-control .tabulator-data-tree-control-collapse{display:inline-block;position:relative;height:7px;width:1px;background:transparent}.tabulator-row .tabulator-cell .tabulator-data-tree-control .tabulator-data-tree-control-collapse:after{position:absolute;content:"";left:-3px;top:3px;height:1px;width:7px;background:#333}.tabulator-row .tabulator-cell .tabulator-data-tree-control .tabulator-data-tree-control-expand{display:inline-block;position:relative;height:7px;width:1px;background:#333}.tabulator-row .tabulator-cell .tabulator-data-tree-control .tabulator-data-tree-control-expand:after{position:absolute;content:"";left:-3px;top:3px;height:1px;width:7px;background:#333}.tabulator-row .tabulator-cell .tabulator-responsive-collapse-toggle{display:-ms-inline-flexbox;display:inline-flex;-ms-flex-align:center;align-items:center;-ms-flex-pack:center;justify-content:center;-moz-user-select:none;-khtml-user-select:none;-webkit-user-select:none;-o-user-select:none;height:15px;width:15px;border-radius:20px;background:#666;color:#fff;font-weight:700;font-size:1.1em}.tabulator-row .tabulator-cell .tabulator-responsive-collapse-toggle:hover{opacity:.7}.tabulator-row .tabulator-cell .tabulator-responsive-collapse-toggle.open .tabulator-responsive-collapse-toggle-close{display:initial}.tabulator-row .tabulator-cell .tabulator-responsive-collapse-toggle.open .tabulator-responsive-collapse-toggle-open,.tabulator-row .tabulator-cell .tabulator-responsive-collapse-toggle .tabulator-responsive-collapse-toggle-close{display:none}.tabulator-row.tabulator-group{box-sizing:border-box;border-bottom:1px solid #999;border-right:1px solid #ddd;border-top:1px solid #999;padding:5px;padding-left:10px;background:#fafafa;font-weight:700;min-width:100%}.tabulator-row.tabulator-group:hover{cursor:pointer;background-color:rgba(0,0,0,.1)}.tabulator-row.tabulator-group.tabulator-group-visible .tabulator-arrow{margin-right:10px;border-left:6px solid transparent;border-right:6px solid transparent;border-top:6px solid #666;border-bottom:0}.tabulator-row.tabulator-group.tabulator-group-level-1 .tabulator-arrow{margin-left:20px}.tabulator-row.tabulator-group.tabulator-group-level-2 .tabulator-arrow{margin-left:40px}.tabulator-row.tabulator-group.tabulator-group-level-3 .tabulator-arrow{margin-left:60px}.tabulator-row.tabulator-group.tabulator-group-level-4 .tabulator-arrow{margin-left:80px}.tabulator-row.tabulator-group.tabulator-group-level-5 .tabulator-arrow{margin-left:100px}.tabulator-row.tabulator-group .tabulator-arrow{display:inline-block;width:0;height:0;margin-right:16px;border-top:6px solid transparent;border-bottom:6px solid transparent;border-right:0;border-left:6px solid #666;vertical-align:middle}.tabulator-row.tabulator-group span{margin-left:10px;color:#666}.tabulator-edit-select-list{position:absolute;display:inline-block;box-sizing:border-box;max-height:200px;background:#fff;border:1px solid #ddd;font-size:14px;overflow-y:auto;-webkit-overflow-scrolling:touch;z-index:4}.tabulator-edit-select-list .tabulator-edit-select-list-item{padding:4px;color:#333}.tabulator-edit-select-list .tabulator-edit-select-list-item.active{color:#fff;background:#1d68cd}.tabulator-edit-select-list .tabulator-edit-select-list-item:hover{cursor:pointer;color:#fff;background:#1d68cd}.tabulator-edit-select-list .tabulator-edit-select-list-group{border-bottom:1px solid #ddd;padding:4px;padding-top:6px;color:#333;font-weight:700} -/*# sourceMappingURL=tabulator_simple.min.css.map */ diff --git a/Gems/AssetMemoryAnalyzer/External/tabulator-master/dist/css/tabulator_simple.min.css.map b/Gems/AssetMemoryAnalyzer/External/tabulator-master/dist/css/tabulator_simple.min.css.map deleted file mode 100644 index 193e31c7ad..0000000000 --- a/Gems/AssetMemoryAnalyzer/External/tabulator-master/dist/css/tabulator_simple.min.css.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"sources":["tabulator_simple.scss"],"names":[],"mappings":"AA0CA,WACC,kBAAkB,AAClB,sBAxCqB,AAyCrB,gBAAe,AACf,eAxCa,AAyCb,gBAAgB,AAMhB,uBAAwB,CAkexB,AA7eD,iFAgBI,cAAc,CACd,AAjBJ,kCAsBE,yBAAiB,AAAjB,sBAAiB,AAAjB,qBAAiB,AAAjB,gBAAiB,CACjB,AAvBF,6BA8BE,WAAU,AAEV,6BA9DwB,AAgExB,WAlEmB,AAmEnB,gBAAgB,AAEhB,mBAAmB,AAGnB,sBAAsB,AACtB,wBAAwB,AACxB,yBAAyB,AACzB,mBAAoB,CAgPpB,AA3RF,yEA2BE,kBAAiB,AACjB,sBAAsB,AAKtB,sBAlEyB,AAuEzB,eAAe,CAtCjB,AA6OG,4CA9LA,qBAAoB,AAGpB,4BAjFoB,AAmFpB,gBAAe,AACf,qBAAsB,CAwLtB,AA7OH,6DAyDI,kBAAkB,AAClB,sBAxFsB,AAyFtB,mBAA8C,AAC9C,mBAAoB,CACpB,AA7DJ,mEAiEI,sBAAqB,AACrB,kBAAkB,AAClB,WAAW,CAsCX,AAzGJ,wFAuEK,sBAAqB,AACrB,WAAW,AAEX,mBAAmB,AACnB,gBAAgB,AAChB,uBAAuB,AACvB,qBAAqB,CAarB,AA1FL,gHAiFM,sBAAsB,AACtB,WAAW,AAEX,sBAAqB,AAErB,YAAW,AAEX,eAAgB,CAChB,AAzFN,oFA8FK,qBAAqB,AACrB,kBAAkB,AAClB,QAAO,AACP,UAAS,AACT,QAAQ,AACR,SAAS,AACT,kCAAkC,AAClC,mCAAmC,AACnC,4BA/HmB,CAgInB,AAvGL,0FAgHK,kBAAiB,AACjB,oBAAa,AAAb,aAAa,AAEb,0BAlJkB,AAmJlB,eAAgB,CAKhB,AAzHL,oHAuHM,iBAAiB,CACjB,AAxHN,0FAgIK,YAAa,CACb,AAjIL,+DAsII,kBAAkB,AAClB,mCAA+D,AAC/D,qBAvKmB,CAwKnB,AAzIJ,qEA6II,kBAAkB,AAClB,sBAAsB,AACtB,eAAc,AACd,WAAU,AACV,iBAAkB,CAiBlB,AAlKJ,8EAqJK,qBAAsB,CACtB,AAtJL,yEAyJK,cAAe,CACf,AA1JL,sFA8JO,QAAS,AACT,QAAS,CACV,AAhKN,oFAwKK,kBAAkB,CAClB,AAzKL,qEA4KK,eAAc,AACd,wBAAoD,CACpD,AA9KL,uHAmLM,gBAAgB,AAChB,4BA7MkB,CA8MlB,AArLN,sHA0LM,gBAAgB,AAChB,4BArNgB,CAsNhB,AA5LN,uHAiMM,0BA3NgB,AA4NhB,kBAAmB,CACnB,AAnMN,+GA0MM,iCAAyB,AAAzB,uBAAyB,AAAzB,yBAAyB,AACzB,uBAAuB,AAEvB,oBAAY,AAAZ,aAAY,AACZ,sBAAkB,AAAlB,mBAAkB,AAClB,qBAAsB,AAAtB,sBAAsB,CACtB,AAhNN,oHAqNM,wBAAyB,CACzB,AAtNN,2GA2NM,gBAAe,AACf,gBAAgB,CAChB,AA7NN,uIAiOO,gBAAe,AACf,mBAAmB,CACnB,AAnOP,uGAwOM,qBAAqB,CACrB,AAzON,+CAgPG,qBAAqB,AACrB,kBAAkB,AAIlB,SAAW,CASX,AA9PH,qEAwPI,2BA5QgB,CA6QhB,AAzPJ,sEA4PI,0BAhRgB,CAiRhB,AA7PJ,qDAiQG,sBAAqB,AACrB,eAAc,AAEd,6BAAwD,AAUxD,0BAlSiB,AAmSjB,6BA7SuB,AA+SvB,eAAgB,CAChB,AAlRH,oEAuQI,4BAAwD,CAKxD,AA5QJ,iGA0QK,YAAa,CACb,AA3QL,2DAqRG,cAAc,CAKd,AA1RH,iEAwRI,YAAa,CACb,AAzRJ,kCAiSE,kBAAiB,AACjB,WAAU,AACV,mBAAmB,AACnB,cAAa,AACb,gCAAiC,CA0DjC,AA/VF,wCAwSG,YAAa,CACb,AAzSH,yDA6SG,sBAAqB,AACrB,oBAAa,AAAb,aAAa,AACb,sBAAkB,AAAlB,mBAAkB,AASlB,UAAU,CAYV,AApUH,wFAkTI,kBAAkB,AAClB,MAAK,AACL,OAAM,AACN,WAAW,CACX,AAtTJ,8DA2TI,qBAAqB,AAErB,cAAa,AACb,aAAY,AAEZ,WAAU,AACV,gBAAiB,AACjB,cAAe,CACf,AAnUJ,mDAwUG,kBAAiB,AACjB,qBAAoB,AACpB,sBAhWqB,AAiWrB,mBAAmB,AACnB,iBAAgB,AAChB,UAhWe,CAiXf,AA9VH,kFAiVK,gBAAiB,AACjB,4BAAwD,CASxD,AA3VL,sGAqVM,4BAzWc,CA0Wd,AAtVN,yGAyVM,yBA7Wc,CA8Wd,AA1VN,wCAmWE,kBAAiB,AACjB,QAAO,AACP,MAAK,AACL,SAAQ,AACR,SAAS,CAUT,AAjXF,6CA0WG,OAAM,AACN,UAAU,CACV,AA5WH,8CA+WG,gBAAgB,CAChB,AAhXH,6BAsXE,iBAAgB,AAChB,0BA5XwB,AA6XxB,sBAhYyB,AAiYzB,iBAAgB,AAChB,WAjYmB,AAkYnB,gBAAgB,AAChB,mBAAkB,AAClB,qBAAgB,AAAhB,iBAAgB,AAEhB,sBAAsB,AACtB,wBAAwB,AACxB,yBAAyB,AACzB,mBAAoB,CAgEpB,AAlcF,qDAqYG,sBAAqB,AACrB,wBAAuB,AACvB,sBAA2B,AAE3B,gBAAgB,AAEhB,6BAAwD,AAUxD,6BA7ZwB,AA8ZxB,0BA1aiB,AA4ajB,eAAgB,CAMhB,AA9ZH,oEA8YI,4BAAwD,CAKxD,AAnZJ,iGAiZK,YAAa,CACb,AAlZL,gEA2ZI,mBAAkB,AAClB,kBAAkB,CAClB,AA7ZJ,8CAkaG,YAAY,CACZ,AAnaH,6CAuaG,qBAAoB,AACpB,aAAY,AACZ,sBA/aoB,AAgbpB,kBAAiB,AACjB,gBAAe,AACf,8BAA+B,AAC/B,WApbkB,AAqblB,oBAAmB,AACnB,oBAAmB,AACnB,iBAAiB,CAiBjB,AAjcH,oDAmbI,UAvbmB,CAwbnB,AApbJ,sDAubI,UAAU,CACV,AAxbJ,kEA4bK,eAAc,AACd,0BAAyB,AACzB,UAAU,CACV,AA/bL,6BAscE,kBAAiB,AACjB,oBAAa,AAAb,aAAa,AACb,sBAAkB,AAAlB,mBAAkB,AAElB,MAAK,AACL,OAAM,AACN,UAAW,AAEX,YAAW,AACX,WAAU,AACV,0BAAyB,AACzB,iBAAiB,CA2BjB,AA5eF,mDAqdG,qBAAoB,AAEpB,cAAa,AACb,kBAAiB,AAEjB,mBAAkB,AAElB,gBAAe,AACf,gBAAgB,AAChB,cAAc,CAad,AA3eH,qEAkeI,sBAAqB,AACrB,UAAU,CACV,AApeJ,mEAweI,sBAAqB,AACrB,aAAa,CACb,AAMJ,eACC,kBAAkB,AAClB,sBAAsB,AAEtB,gBAA0C,AAE1C,4BA1gBmB,CAo3BnB,AAhXD,4CAKC,qBA3gBuB,CAghBtB,AAVF,0CAaE,sBA/gBsB,AAghBtB,cAAe,CACf,AAfF,kCAkBE,wBAlhB6B,CAmhB7B,AAnBF,wCAsBE,yBArhBkC,AAshBlC,cAAe,CACf,AAxBF,gCA2BE,kBAAkB,AAElB,0BAjiBkB,AAkiBlB,6BAliBkB,AAoiBlB,8BAA+B,AAC/B,SAAU,CACV,AAlCF,4CAsCE,kBAAiB,AACjB,QAAO,AACP,SAAQ,AACR,OAAM,AACN,UAAU,CAUV,AApDF,iDA6CG,MAAK,AACL,WAAW,CACX,AA/CH,kDAkDG,gBAAgB,CAChB,AAnDH,iCAuDE,qBAAqB,AACrB,kBAAkB,AAElB,yBAAyB,AAEzB,SAAW,CASX,AArEF,uDA+DG,2BAnkBiB,CAokBjB,AAhEH,wDAmEG,0BAvkBiB,CAwkBjB,AApEH,8CAwEE,sBAAqB,AAErB,YAAW,AAEX,0BAhlBkB,AAilBlB,4BAjlBkB,CAomBlB,AAhGF,oDAgFG,YAAY,CACZ,AAjFH,oDAoFG,cAxmBW,CAmnBX,AA/FH,0DAwFK,iBAAkB,CAKlB,AA7FL,wEA2FM,kBAAkB,CAClB,AA5FN,+BAoGE,qBAAoB,AACpB,kBAAkB,AAClB,sBAAqB,AACrB,YAAW,AACX,4BA5mBkB,AA6mBlB,sBAAqB,AACrB,mBAAkB,AAClB,gBAAe,AACf,sBAAsB,CAqLtB,AAjSF,4CA+GG,iBAAkB,CAClB,AAhHH,iDAmHG,yBA/mBkB,AAgnBlB,SAAU,CAMV,AA1HH,+GAuHI,WAAU,AACV,sBAAsB,CACtB,AAzHJ,yDA6HG,qBAxnBgB,CA+nBhB,AApIH,+HA+HI,WAAU,AACV,uBAAsB,AAEtB,UA7nBe,CA8nBf,AAnIJ,6EAyII,YAAa,CACb,AA1IJ,oDAgJG,2BAAoB,AAApB,oBAAoB,AACpB,sBAAkB,AAAlB,mBAAkB,AAElB,sBAAsB,AACtB,wBAAwB,AACxB,yBAAyB,AACzB,mBAAoB,CAcpB,AApKH,8EA0JI,SAAS,CAST,AAnKJ,wGA8JK,WAAU,AACV,WAAU,AACV,eAAc,AACd,eAAe,CACf,AAlKL,2DAuKG,qBAAoB,AACpB,sBAAqB,AAErB,WAAU,AACV,UAAS,AAET,gBAAe,AACf,iBAAgB,AAEhB,8BAA6B,AAE7B,2BAtrBiB,AAurBjB,4BAvrBiB,CAwrBjB,AApLH,4DAwLG,2BAAmB,AAAnB,oBAAmB,AACnB,qBAAsB,AAAtB,uBAAsB,AACtB,sBAAkB,AAAlB,mBAAkB,AAClB,sBAAqB,AAErB,YAAW,AACX,WAAU,AAEV,iBAAgB,AAEhB,sBArsBe,AAssBf,kBAAiB,AACjB,0BAA4B,AAE5B,eAAe,CAmDf,AAzPH,kEAyMI,eAAc,AACd,yBAA4B,CAC5B,AA3MJ,kGA8MI,qBAAoB,AACpB,kBAAkB,AAElB,WAAW,AACX,UAAU,AAEV,sBAAuB,CAavB,AAjOJ,wGAuNK,kBAAkB,AAClB,WAAW,AACX,UAAU,AACV,QAAQ,AAER,WAAW,AACX,UAAU,AAEV,eAluBa,CAmuBb,AAhOL,gGAoOI,qBAAoB,AACpB,kBAAkB,AAElB,WAAW,AACX,UAAU,AAEV,eA7uBc,CA0vBd,AAvPJ,sGA6OK,kBAAkB,AAClB,WAAW,AACX,UAAU,AACV,QAAQ,AAER,WAAW,AACX,UAAU,AAEV,eAxvBa,CAyvBb,AAtPL,qEA4PG,2BAAoB,AAApB,oBAAoB,AACpB,sBAAkB,AAAlB,mBAAkB,AAClB,qBAAsB,AAAtB,uBAAsB,AAEtB,sBAAsB,AACtB,wBAAwB,AACxB,yBAAyB,AACzB,oBAAoB,AAEpB,YAAW,AACX,WAAU,AAEV,mBAAkB,AAClB,gBAAe,AAEf,WAjxBqB,AAkxBrB,gBAAgB,AAChB,eAAe,CAmBf,AAhSH,2EAgRI,UAAU,CACV,AAjRJ,sHAqRK,eAAe,CACf,AAtRL,sOA8RI,YAAY,CACZ,AA/RJ,+BAsSE,sBAAqB,AACrB,6BAA4B,AAC5B,4BA5yBkB,AA6yBlB,0BAAyB,AACzB,YAAW,AACX,kBAAiB,AACjB,mBAAkB,AAClB,gBAAgB,AAEhB,cAAe,CAgEf,AA/WF,qCAkTG,eAAc,AACd,+BAA+B,CAC/B,AApTH,wEAwTI,kBAAiB,AACjB,kCAAkC,AAClC,mCAAmC,AACnC,0BAr0BkB,AAs0BlB,eAAgB,CAChB,AA7TJ,wEAkUI,gBAAgB,CAChB,AAnUJ,wEAwUI,gBAAgB,CAChB,AAzUJ,wEA8UI,gBAAgB,CAChB,AA/UJ,wEAoVI,gBAAgB,CAChB,AArVJ,wEA0VI,iBAAiB,CACjB,AA3VJ,gDAgWG,qBAAqB,AACrB,QAAQ,AACR,SAAS,AACT,kBAAiB,AACjB,iCAAiC,AACjC,oCAAoC,AACpC,eAAe,AACf,2BAj3BmB,AAk3BnB,qBAAqB,CACrB,AAzWH,oCA4WG,iBAAgB,AAChB,UAAU,CACV,AAIH,4BACC,kBAAkB,AAClB,qBAAoB,AACpB,sBAAqB,AAErB,iBAAgB,AAEhB,gBA/3BuB,AAg4BvB,sBA93BmB,AAg4BnB,eAh5Ba,AAk5Bb,gBAAe,AACf,iCAAiC,AAEjC,SAAc,CA6Bd,AA5CD,6DAkBE,YAAW,AAEX,UAz4BgB,CAs5BhB,AAjCF,oEAuBG,WA/4BqB,AAg5BrB,kBAt4BkB,CAu4BlB,AAzBH,mEA4BG,eAAc,AAEd,WAt5BqB,AAu5BrB,kBA74BkB,CA84BlB,AAhCH,8DAoCE,6BA15BkB,AA45BlB,YAAW,AACX,gBAAe,AAEf,WA95BgB,AA+5BhB,eAAgB,CAChB","file":"tabulator_simple.min.css","sourcesContent":["/* Tabulator v4.1.2 (c) Oliver Folkerd */\n\n\r\n//Main Theme Variables\r\n$backgroundColor: #fff !default; //background color of tabulator\r\n$borderColor:#999 !default; //border to tabulator\r\n$textSize:14px !default; //table text size\r\n\r\n//header themeing\r\n$headerBackgroundColor:#fff !default; //border to tabulator\r\n$headerTextColor:#555 !default; //header text colour\r\n$headerBorderColor:#ddd !default; //header border color\r\n$headerSeperatorColor:#999 !default; //header bottom seperator color\r\n$headerMargin:4px !default; //padding round header\r\n\r\n//column header arrows\r\n$sortArrowActive: #666 !default;\r\n$sortArrowInactive: #bbb !default;\r\n\r\n//row themeing\r\n$rowBackgroundColor:#fff !default; //table row background color\r\n$rowAltBackgroundColor:#fff !default; //table row background color\r\n$rowBorderColor:#ddd !default; //table border color\r\n$rowTextColor:#333 !default; //table text color\r\n$rowHoverBackground:#bbb !default; //row background color on hover\r\n\r\n$rowSelectedBackground: #9ABCEA !default; //row background color when selected\r\n$rowSelectedBackgroundHover: #769BCC !default;//row background color when selected and hovered\r\n\r\n\r\n$editBoxColor:#1D68CD !default; //border color for edit boxes\r\n$errorColor:#dd0000 !default; //error indication\r\n\r\n//footer themeing\r\n$footerBackgroundColor:#fff !default; //border to tabulator\r\n$footerTextColor:#555 !default; //footer text colour\r\n$footerBorderColor:#aaa !default; //footer border color\r\n$footerSeperatorColor:#999 !default; //footer bottom seperator color\r\n$footerActiveColor:#d00 !default; //footer bottom active text color\r\n\r\n\r\n//Tabulator Containing Element\r\n.tabulator{\r\n\tposition: relative;\r\n\tbackground-color: $backgroundColor;\r\n\toverflow:hidden;\r\n\tfont-size:$textSize;\r\n\ttext-align: left;\r\n\r\n\t-webkit-transform: translatez(0);\r\n\t-moz-transform: translatez(0);\r\n\t-ms-transform: translatez(0);\r\n\t-o-transform: translatez(0);\r\n\ttransform: translatez(0);\r\n\r\n\t&[tabulator-layout=\"fitDataFill\"]{\r\n\t\t.tabulator-tableHolder{\r\n\t\t\t.tabulator-table{\r\n\t\t\t\tmin-width:100%;\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\r\n\t&.tabulator-block-select{\r\n\t\tuser-select: none;\r\n\t}\r\n\r\n\t//column header containing element\r\n\t.tabulator-header{\r\n\t\tposition:relative;\r\n\t\tbox-sizing: border-box;\r\n\r\n\t\twidth:100%;\r\n\r\n\t\tborder-bottom:1px solid $headerSeperatorColor;\r\n\t\tbackground-color: $headerBackgroundColor;\r\n\t\tcolor: $headerTextColor;\r\n\t\tfont-weight:bold;\r\n\r\n\t\twhite-space: nowrap;\r\n\t\toverflow:hidden;\r\n\r\n\t\t-moz-user-select: none;\r\n\t\t-khtml-user-select: none;\r\n\t\t-webkit-user-select: none;\r\n\t\t-o-user-select: none;\r\n\r\n\t\t//individual column header element\r\n\t\t.tabulator-col{\r\n\t\t\tdisplay:inline-block;\r\n\t\t\tposition:relative;\r\n\t\t\tbox-sizing:border-box;\r\n\t\t\tborder-right:1px solid $headerBorderColor;\r\n\t\t\tbackground-color: $headerBackgroundColor;\r\n\t\t\ttext-align:left;\r\n\t\t\tvertical-align: bottom;\r\n\t\t\toverflow: hidden;\r\n\r\n\t\t\t&.tabulator-moving{\r\n\t\t\t\tposition: absolute;\r\n\t\t\t\tborder:1px solid $headerSeperatorColor;\r\n\t\t\t\tbackground:darken($headerBackgroundColor, 10%);\r\n\t\t\t\tpointer-events: none;\r\n\t\t\t}\r\n\r\n\t\t\t//hold content of column header\r\n\t\t\t.tabulator-col-content{\r\n\t\t\t\tbox-sizing:border-box;\r\n\t\t\t\tposition: relative;\r\n\t\t\t\tpadding:4px;\r\n\r\n\t\t\t\t//hold title of column header\r\n\t\t\t\t.tabulator-col-title{\r\n\t\t\t\t\tbox-sizing:border-box;\r\n\t\t\t\t\twidth: 100%;\r\n\r\n\t\t\t\t\twhite-space: nowrap;\r\n\t\t\t\t\toverflow: hidden;\r\n\t\t\t\t\ttext-overflow: ellipsis;\r\n\t\t\t\t\tvertical-align:bottom;\r\n\r\n\t\t\t\t\t//element to hold title editor\r\n\t\t\t\t\t.tabulator-title-editor{\r\n\t\t\t\t\t\tbox-sizing: border-box;\r\n\t\t\t\t\t\twidth: 100%;\r\n\r\n\t\t\t\t\t\tborder:1px solid #999;\r\n\r\n\t\t\t\t\t\tpadding:1px;\r\n\r\n\t\t\t\t\t\tbackground: #fff;\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\r\n\t\t\t\t//column sorter arrow\r\n\t\t\t\t.tabulator-arrow{\r\n\t\t\t\t\tdisplay: inline-block;\r\n\t\t\t\t\tposition: absolute;\r\n\t\t\t\t\ttop:9px;\r\n\t\t\t\t\tright:8px;\r\n\t\t\t\t\twidth: 0;\r\n\t\t\t\t\theight: 0;\r\n\t\t\t\t\tborder-left: 6px solid transparent;\r\n\t\t\t\t\tborder-right: 6px solid transparent;\r\n\t\t\t\t\tborder-bottom: 6px solid $sortArrowInactive;\r\n\t\t\t\t}\r\n\r\n\t\t\t}\r\n\r\n\t\t\t//complex header column group\r\n\t\t\t&.tabulator-col-group{\r\n\r\n\t\t\t\t//gelement to hold sub columns in column group\r\n\t\t\t\t.tabulator-col-group-cols{\r\n\t\t\t\t\tposition:relative;\r\n\t\t\t\t\tdisplay: flex;\r\n\r\n\t\t\t\t\tborder-top:1px solid $headerBorderColor;\r\n\t\t\t\t\toverflow: hidden;\r\n\r\n\t\t\t\t\t.tabulator-col:last-child{\r\n\t\t\t\t\t\tmargin-right:-1px;\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\r\n\t\t\t//hide left resize handle on first column\r\n\t\t\t&:first-child{\r\n\t\t\t\t.tabulator-col-resize-handle.prev{\r\n\t\t\t\t\tdisplay: none;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t\t//placeholder element for sortable columns\r\n\t\t\t&.ui-sortable-helper{\r\n\t\t\t\tposition: absolute;\r\n\t\t\t\tbackground-color:darken($headerBackgroundColor, 10%) !important;\r\n\t\t\t\tborder:1px solid $headerBorderColor;\r\n\t\t\t}\r\n\r\n\t\t\t//header filter containing element\r\n\t\t\t.tabulator-header-filter{\r\n\t\t\t\tposition: relative;\r\n\t\t\t\tbox-sizing: border-box;\r\n\t\t\t\tmargin-top:2px;\r\n\t\t\t\twidth:100%;\r\n\t\t\t\ttext-align: center;\r\n\r\n\t\t\t\t//styling adjustment for inbuilt editors\r\n\t\t\t\ttextarea{\r\n\t\t\t\t\theight:auto !important;\r\n\t\t\t\t}\r\n\r\n\t\t\t\tsvg{\r\n\t\t\t\t\tmargin-top: 3px;\r\n\t\t\t\t}\r\n\r\n\t\t\t\tinput{\r\n\t\t\t\t\t&::-ms-clear {\r\n\t\t\t\t\t width : 0;\r\n\t\t\t\t\t height: 0;\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\r\n\t\t\t//styling child elements for sortable columns\r\n\t\t\t&.tabulator-sortable{\r\n\t\t\t\t.tabulator-col-title{\r\n\t\t\t\t\tpadding-right:25px;\r\n\t\t\t\t}\r\n\r\n\t\t\t\t&:hover{\r\n\t\t\t\t\tcursor:pointer;\r\n\t\t\t\t\tbackground-color:darken($headerBackgroundColor, 10%);\r\n\t\t\t\t}\r\n\r\n\r\n\t\t\t\t&[aria-sort=\"none\"]{\r\n\t\t\t\t\t.tabulator-col-content .tabulator-arrow{\r\n\t\t\t\t\t\tborder-top: none;\r\n\t\t\t\t\t\tborder-bottom: 6px solid $sortArrowInactive;\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\r\n\t\t\t\t&[aria-sort=\"asc\"]{\r\n\t\t\t\t\t.tabulator-col-content .tabulator-arrow{\r\n\t\t\t\t\t\tborder-top: none;\r\n\t\t\t\t\t\tborder-bottom: 6px solid $sortArrowActive;\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\r\n\t\t\t\t&[aria-sort=\"desc\"]{\r\n\t\t\t\t\t.tabulator-col-content .tabulator-arrow{\r\n\t\t\t\t\t\tborder-top: 6px solid $sortArrowActive;\r\n\t\t\t\t\t\tborder-bottom: none;\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t\t&.tabulator-col-vertical{\r\n\t\t\t\t.tabulator-col-content{\r\n\t\t\t\t\t.tabulator-col-title{\r\n\t\t\t\t\t\twriting-mode: vertical-rl;\r\n\t\t\t\t\t\ttext-orientation: mixed;\r\n\r\n\t\t\t\t\t\tdisplay:flex;\r\n\t\t\t\t\t\talign-items:center;\r\n\t\t\t\t\t\tjustify-content:center;\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\r\n\t\t\t\t&.tabulator-col-vertical-flip{\r\n\t\t\t\t\t.tabulator-col-title{\r\n\t\t\t\t\t\ttransform: rotate(180deg);\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\r\n\t\t\t\t&.tabulator-sortable{\r\n\t\t\t\t\t.tabulator-col-title{\r\n\t\t\t\t\t\tpadding-right:0;\r\n\t\t\t\t\t\tpadding-top:20px;\r\n\t\t\t\t\t}\r\n\r\n\t\t\t\t\t&.tabulator-col-vertical-flip{\r\n\t\t\t\t\t\t.tabulator-col-title{\r\n\t\t\t\t\t\t\tpadding-right:0;\r\n\t\t\t\t\t\t\tpadding-bottom:20px;\r\n\t\t\t\t\t\t}\r\n\r\n\t\t\t\t\t}\r\n\r\n\t\t\t\t\t.tabulator-arrow{\r\n\t\t\t\t\t\tright:calc(50% - 6px);\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t}\r\n\r\n\t\t.tabulator-frozen{\r\n\t\t\tdisplay: inline-block;\r\n\t\t\tposition: absolute;\r\n\r\n\t\t\t// background-color: inherit;\r\n\r\n\t\t\tz-index: 10;\r\n\r\n\t\t\t&.tabulator-frozen-left{\r\n\t\t\t\tborder-right:2px solid $rowBorderColor;\r\n\t\t\t}\r\n\r\n\t\t\t&.tabulator-frozen-right{\r\n\t\t\t\tborder-left:2px solid $rowBorderColor;\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\t.tabulator-calcs-holder{\r\n\t\t\tbox-sizing:border-box;\r\n\t\t\tmin-width:400%;\r\n\r\n\t\t\tbackground:darken($headerBackgroundColor, 5%) !important;\r\n\r\n\t\t\t.tabulator-row{\r\n\t\t\t\tbackground:darken($headerBackgroundColor, 5%) !important;\r\n\r\n\t\t\t\t.tabulator-col-resize-handle{\r\n\t\t\t\t\tdisplay: none;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t\tborder-top:1px solid $rowBorderColor;\r\n\t\t\tborder-bottom:1px solid $headerSeperatorColor;\r\n\r\n\t\t\toverflow: hidden;\r\n\t\t}\r\n\r\n\t\t.tabulator-frozen-rows-holder{\r\n\t\t\tmin-width:400%;\r\n\r\n\t\t\t&:empty{\r\n\t\t\t\tdisplay: none;\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\r\n\r\n\r\n\t//scrolling element to hold table\r\n\t.tabulator-tableHolder{\r\n\t\tposition:relative;\r\n\t\twidth:100%;\r\n\t\twhite-space: nowrap;\r\n\t\toverflow:auto;\r\n\t\t-webkit-overflow-scrolling: touch;\r\n\r\n\t\t&:focus{\r\n\t\t\toutline: none;\r\n\t\t}\r\n\r\n\t\t//default placeholder element\r\n\t\t.tabulator-placeholder{\r\n\t\t\tbox-sizing:border-box;\r\n\t\t\tdisplay: flex;\r\n\t\t\talign-items:center;\r\n\r\n\t\t\t&[tabulator-render-mode=\"virtual\"]{\r\n\t\t\t\tposition: absolute;\r\n\t\t\t\ttop:0;\r\n\t\t\t\tleft:0;\r\n\t\t\t\theight:100%;\r\n\t\t\t}\r\n\r\n\t\t\twidth:100%;\r\n\r\n\t\t\tspan{\r\n\t\t\t\tdisplay: inline-block;\r\n\r\n\t\t\t\tmargin:0 auto;\r\n\t\t\t\tpadding:10px;\r\n\r\n\t\t\t\tcolor:#000;\r\n\t\t\t\tfont-weight: bold;\r\n\t\t\t\tfont-size: 20px;\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\t//element to hold table rows\r\n\t\t.tabulator-table{\r\n\t\t\tposition:relative;\r\n\t\t\tdisplay:inline-block;\r\n\t\t\tbackground-color:$rowBackgroundColor;\r\n\t\t\twhite-space: nowrap;\r\n\t\t\toverflow:visible;\r\n\t\t\tcolor:$rowTextColor;\r\n\r\n\t\t\t.tabulator-row{\r\n\t\t\t\t&.tabulator-calcs{\r\n\t\t\t\t\tfont-weight: bold;\r\n\t\t\t\t\tbackground:darken($rowAltBackgroundColor, 5%) !important;\r\n\r\n\t\t\t\t\t&.tabulator-calcs-top{\r\n\t\t\t\t\t\tborder-bottom:2px solid $rowBorderColor;\r\n\t\t\t\t\t}\r\n\r\n\t\t\t\t\t&.tabulator-calcs-bottom{\r\n\t\t\t\t\t\tborder-top:2px solid $rowBorderColor;\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t}\r\n\t}\r\n\r\n\t//column resize handles\r\n\t.tabulator-col-resize-handle{\r\n\t\tposition:absolute;\r\n\t\tright:0;\r\n\t\ttop:0;\r\n\t\tbottom:0;\r\n\t\twidth:5px;\r\n\r\n\t\t&.prev{\r\n\t\t\tleft:0;\r\n\t\t\tright:auto;\r\n\t\t}\r\n\r\n\t\t&:hover{\r\n\t\t\tcursor:ew-resize;\r\n\t\t}\r\n\t}\r\n\r\n\r\n\t//footer element\r\n\t.tabulator-footer{\r\n\t\tpadding:5px 10px;\r\n\t\tborder-top:1px solid $footerSeperatorColor;\r\n\t\tbackground-color: $footerBackgroundColor;\r\n\t\ttext-align:right;\r\n\t\tcolor: $footerTextColor;\r\n\t\tfont-weight:bold;\r\n\t\twhite-space:nowrap;\r\n\t\tuser-select:none;\r\n\r\n\t\t-moz-user-select: none;\r\n\t\t-khtml-user-select: none;\r\n\t\t-webkit-user-select: none;\r\n\t\t-o-user-select: none;\r\n\r\n\t\t.tabulator-calcs-holder{\r\n\t\t\tbox-sizing:border-box;\r\n\t\t\twidth:calc(100% + 20px);\r\n\t\t\tmargin:-5px -10px 5px -10px;\r\n\r\n\t\t\ttext-align: left;\r\n\r\n\t\t\tbackground:darken($footerBackgroundColor, 5%) !important;\r\n\r\n\t\t\t.tabulator-row{\r\n\t\t\t\tbackground:darken($footerBackgroundColor, 5%) !important;\r\n\r\n\t\t\t\t.tabulator-col-resize-handle{\r\n\t\t\t\t\tdisplay: none;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t\tborder-bottom:1px solid $footerBackgroundColor;\r\n\t\t\tborder-top:1px solid $rowBorderColor;\r\n\r\n\t\t\toverflow: hidden;\r\n\r\n\t\t\t&:only-child{\r\n\t\t\t\tmargin-bottom:-5px;\r\n\t\t\t\tborder-bottom:none;\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\t//pagination container element\r\n\t\t.tabulator-pages{\r\n\t\t\tmargin:0 7px;\r\n\t\t}\r\n\r\n\t\t//pagination button\r\n\t\t.tabulator-page{\r\n\t\t\tdisplay:inline-block;\r\n\t\t\tmargin:0 2px;\r\n\t\t\tborder:1px solid $footerBorderColor;\r\n\t\t\tborder-radius:3px;\r\n\t\t\tpadding:2px 5px;\r\n\t\t\tbackground:rgba(255,255,255,.2);\r\n\t\t\tcolor: $footerTextColor;\r\n\t\t\tfont-family:inherit;\r\n\t\t\tfont-weight:inherit;\r\n\t\t\tfont-size:inherit;\r\n\r\n\t\t\t&.active{\r\n\t\t\t\tcolor:$footerActiveColor;\r\n\t\t\t}\r\n\r\n\t\t\t&:disabled{\r\n\t\t\t\topacity:.5;\r\n\t\t\t}\r\n\r\n\t\t\t&:not(.disabled){\r\n\t\t\t\t&:hover{\r\n\t\t\t\t\tcursor:pointer;\r\n\t\t\t\t\tbackground:rgba(0,0,0,.2);\r\n\t\t\t\t\tcolor:#fff;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\r\n\t//holding div that contains loader and covers tabulator element to prevent interaction\r\n\t.tabulator-loader{\r\n\t\tposition:absolute;\r\n\t\tdisplay: flex;\r\n\t\talign-items:center;\r\n\r\n\t\ttop:0;\r\n\t\tleft:0;\r\n\t\tz-index:100;\r\n\r\n\t\theight:100%;\r\n\t\twidth:100%;\r\n\t\tbackground:rgba(0,0,0,.4);\r\n\t\ttext-align:center;\r\n\r\n\t\t//loading message element\r\n\t\t.tabulator-loader-msg{\r\n\t\t\tdisplay:inline-block;\r\n\r\n\t\t\tmargin:0 auto;\r\n\t\t\tpadding:10px 20px;\r\n\r\n\t\t\tborder-radius:10px;\r\n\r\n\t\t\tbackground:#fff;\r\n\t\t\tfont-weight:bold;\r\n\t\t\tfont-size:16px;\r\n\r\n\t\t\t//loading message\r\n\t\t\t&.tabulator-loading{\r\n\t\t\t\tborder:4px solid #333;\r\n\t\t\t\tcolor:#000;\r\n\t\t\t}\r\n\r\n\t\t\t//error message\r\n\t\t\t&.tabulator-error{\r\n\t\t\t\tborder:4px solid #D00;\r\n\t\t\t\tcolor:#590000;\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n}\r\n\r\n//row element\r\n.tabulator-row{\r\n\tposition: relative;\r\n\tbox-sizing: border-box;\r\n\r\n\tmin-height:$textSize + ($headerMargin * 2);\r\n\tbackground-color: $rowBackgroundColor;\r\n\tborder-bottom:1px solid $rowBorderColor;\r\n\r\n\t&:nth-child(even){\r\n\t\tbackground-color: $rowAltBackgroundColor;\r\n\t}\r\n\r\n\t&.tabulator-selectable:hover{\r\n\t\tbackground-color:$rowHoverBackground;\r\n\t\tcursor: pointer;\r\n\t}\r\n\r\n\t&.tabulator-selected{\r\n\t\tbackground-color:$rowSelectedBackground;\r\n\t}\r\n\r\n\t&.tabulator-selected:hover{\r\n\t\tbackground-color:$rowSelectedBackgroundHover;\r\n\t\tcursor: pointer;\r\n\t}\r\n\r\n\t&.tabulator-moving{\r\n\t\tposition: absolute;\r\n\r\n\t\tborder-top:1px solid $rowBorderColor;\r\n\t\tborder-bottom:1px solid $rowBorderColor;\r\n\r\n\t\tpointer-events: none !important;\r\n\t\tz-index:15;\r\n\t}\r\n\r\n\t//row resize handles\r\n\t.tabulator-row-resize-handle{\r\n\t\tposition:absolute;\r\n\t\tright:0;\r\n\t\tbottom:0;\r\n\t\tleft:0;\r\n\t\theight:5px;\r\n\r\n\t\t&.prev{\r\n\t\t\ttop:0;\r\n\t\t\tbottom:auto;\r\n\t\t}\r\n\r\n\t\t&:hover{\r\n\t\t\tcursor:ns-resize;\r\n\t\t}\r\n\t}\r\n\r\n\t.tabulator-frozen{\r\n\t\tdisplay: inline-block;\r\n\t\tposition: absolute;\r\n\r\n\t\tbackground-color: inherit;\r\n\r\n\t\tz-index: 10;\r\n\r\n\t\t&.tabulator-frozen-left{\r\n\t\t\tborder-right:2px solid $rowBorderColor;\r\n\t\t}\r\n\r\n\t\t&.tabulator-frozen-right{\r\n\t\t\tborder-left:2px solid $rowBorderColor;\r\n\t\t}\r\n\t}\r\n\r\n\t.tabulator-responsive-collapse{\r\n\t\tbox-sizing:border-box;\r\n\r\n\t\tpadding:5px;\r\n\r\n\t\tborder-top:1px solid $rowBorderColor;\r\n\t\tborder-bottom:1px solid $rowBorderColor;\r\n\r\n\t\t&:empty{\r\n\t\t\tdisplay:none;\r\n\t\t}\r\n\r\n\t\ttable{\r\n\t\t\tfont-size:$textSize;\r\n\r\n\t\t\ttr{\r\n\t\t\t\ttd{\r\n\t\t\t\t\tposition: relative;\r\n\r\n\t\t\t\t\t&:first-of-type{\r\n\t\t\t\t\t\tpadding-right:10px;\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\r\n\t//cell element\r\n\t.tabulator-cell{\r\n\t\tdisplay:inline-block;\r\n\t\tposition: relative;\r\n\t\tbox-sizing:border-box;\r\n\t\tpadding:4px;\r\n\t\tborder-right:1px solid $rowBorderColor;\r\n\t\tvertical-align:middle;\r\n\t\twhite-space:nowrap;\r\n\t\toverflow:hidden;\r\n\t\ttext-overflow:ellipsis;\r\n\r\n\t\t&:last-of-type{\r\n\t\t\tborder-right: none;\r\n\t\t}\r\n\r\n\t\t&.tabulator-editing{\r\n\t\t\tborder:1px solid $editBoxColor;\r\n\t\t\tpadding: 0;\r\n\r\n\t\t\tinput, select{\r\n\t\t\t\tborder:1px;\r\n\t\t\t\tbackground:transparent;\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\t&.tabulator-validation-fail{\r\n\t\t\tborder:1px solid $errorColor;\r\n\t\t\tinput, select{\r\n\t\t\t\tborder:1px;\r\n\t\t\t\tbackground:transparent;\r\n\r\n\t\t\t\tcolor: $errorColor;\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\t//hide left resize handle on first column\r\n\t\t&:first-child{\r\n\t\t\t.tabulator-col-resize-handle.prev{\r\n\t\t\t\tdisplay: none;\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\t//movable row handle\r\n\t\t&.tabulator-row-handle{\r\n\r\n\t\t\tdisplay: inline-flex;\r\n\t\t\talign-items:center;\r\n\r\n\t\t\t-moz-user-select: none;\r\n\t\t\t-khtml-user-select: none;\r\n\t\t\t-webkit-user-select: none;\r\n\t\t\t-o-user-select: none;\r\n\r\n\t\t\t//handle holder\r\n\t\t\t.tabulator-row-handle-box{\r\n\t\t\t\twidth:80%;\r\n\r\n\t\t\t\t//Hamburger element\r\n\t\t\t\t.tabulator-row-handle-bar{\r\n\t\t\t\t\twidth:100%;\r\n\t\t\t\t\theight:3px;\r\n\t\t\t\t\tmargin-top:2px;\r\n\t\t\t\t\tbackground:#666;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\t.tabulator-data-tree-branch{\r\n\t\t\tdisplay:inline-block;\r\n\t\t\tvertical-align:middle;\r\n\r\n\t\t\theight:9px;\r\n\t\t\twidth:7px;\r\n\r\n\t\t\tmargin-top:-9px;\r\n\t\t\tmargin-right:5px;\r\n\r\n\t\t\tborder-bottom-left-radius:1px;\r\n\r\n\t\t\tborder-left:2px solid $rowBorderColor;\r\n\t\t\tborder-bottom:2px solid $rowBorderColor;\r\n\t\t}\r\n\r\n\t\t.tabulator-data-tree-control{\r\n\r\n\t\t\tdisplay:inline-flex;\r\n\t\t\tjustify-content:center;\r\n\t\t\talign-items:center;\r\n\t\t\tvertical-align:middle;\r\n\r\n\t\t\theight:11px;\r\n\t\t\twidth:11px;\r\n\r\n\t\t\tmargin-right:5px;\r\n\r\n\t\t\tborder:1px solid $rowTextColor;\r\n\t\t\tborder-radius:2px;\r\n\t\t\tbackground:rgba(0, 0, 0, .1);\r\n\r\n\t\t\toverflow:hidden;\r\n\r\n\t\t\t&:hover{\r\n\t\t\t\tcursor:pointer;\r\n\t\t\t\tbackground:rgba(0, 0, 0, .2);\r\n\t\t\t}\r\n\r\n\t\t\t.tabulator-data-tree-control-collapse{\r\n\t\t\t\tdisplay:inline-block;\r\n\t\t\t\tposition: relative;\r\n\r\n\t\t\t\theight: 7px;\r\n\t\t\t\twidth: 1px;\r\n\r\n\t\t\t\tbackground: transparent;\r\n\r\n\t\t\t\t&:after {\r\n\t\t\t\t\tposition: absolute;\r\n\t\t\t\t\tcontent: \"\";\r\n\t\t\t\t\tleft: -3px;\r\n\t\t\t\t\ttop: 3px;\r\n\r\n\t\t\t\t\theight: 1px;\r\n\t\t\t\t\twidth: 7px;\r\n\r\n\t\t\t\t\tbackground: $rowTextColor;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t\t.tabulator-data-tree-control-expand{\r\n\t\t\t\tdisplay:inline-block;\r\n\t\t\t\tposition: relative;\r\n\r\n\t\t\t\theight: 7px;\r\n\t\t\t\twidth: 1px;\r\n\r\n\t\t\t\tbackground: $rowTextColor;\r\n\r\n\t\t\t\t&:after {\r\n\t\t\t\t\tposition: absolute;\r\n\t\t\t\t\tcontent: \"\";\r\n\t\t\t\t\tleft: -3px;\r\n\t\t\t\t\ttop: 3px;\r\n\r\n\t\t\t\t\theight: 1px;\r\n\t\t\t\t\twidth: 7px;\r\n\r\n\t\t\t\t\tbackground: $rowTextColor;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t}\r\n\r\n\t\t.tabulator-responsive-collapse-toggle{\r\n\t\t\tdisplay: inline-flex;\r\n\t\t\talign-items:center;\r\n\t\t\tjustify-content:center;\r\n\r\n\t\t\t-moz-user-select: none;\r\n\t\t\t-khtml-user-select: none;\r\n\t\t\t-webkit-user-select: none;\r\n\t\t\t-o-user-select: none;\r\n\r\n\t\t\theight:15px;\r\n\t\t\twidth:15px;\r\n\r\n\t\t\tborder-radius:20px;\r\n\t\t\tbackground:#666;\r\n\r\n\t\t\tcolor:$rowBackgroundColor;\r\n\t\t\tfont-weight:bold;\r\n\t\t\tfont-size:1.1em;\r\n\r\n\t\t\t&:hover{\r\n\t\t\t\topacity:.7;\r\n\t\t\t}\r\n\r\n\t\t\t&.open{\r\n\t\t\t\t.tabulator-responsive-collapse-toggle-close{\r\n\t\t\t\t\tdisplay:initial;\r\n\t\t\t\t}\r\n\r\n\t\t\t\t.tabulator-responsive-collapse-toggle-open{\r\n\t\t\t\t\tdisplay:none;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t\t.tabulator-responsive-collapse-toggle-close{\r\n\t\t\t\tdisplay:none;\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\r\n\t//row grouping element\r\n\t&.tabulator-group{\r\n\r\n\t\tbox-sizing:border-box;\r\n\t\tborder-bottom:1px solid #999;\r\n\t\tborder-right:1px solid $rowBorderColor;\r\n\t\tborder-top:1px solid #999;\r\n\t\tpadding:5px;\r\n\t\tpadding-left:10px;\r\n\t\tbackground:#fafafa;\r\n\t\tfont-weight:bold;\r\n\r\n\t\tmin-width: 100%;\r\n\r\n\t\t&:hover{\r\n\t\t\tcursor:pointer;\r\n\t\t\tbackground-color:rgba(0,0,0,.1);\r\n\t\t}\r\n\r\n\t\t&.tabulator-group-visible{\r\n\t\t\t.tabulator-arrow{\r\n\t\t\t\tmargin-right:10px;\r\n\t\t\t\tborder-left: 6px solid transparent;\r\n\t\t\t\tborder-right: 6px solid transparent;\r\n\t\t\t\tborder-top: 6px solid $sortArrowActive;\r\n\t\t\t\tborder-bottom: 0;\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\t&.tabulator-group-level-1{\r\n\t\t\t.tabulator-arrow{\r\n\t\t\t\tmargin-left:20px;\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\t&.tabulator-group-level-2{\r\n\t\t\t.tabulator-arrow{\r\n\t\t\t\tmargin-left:40px;\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\t&.tabulator-group-level-3{\r\n\t\t\t.tabulator-arrow{\r\n\t\t\t\tmargin-left:60px;\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\t&.tabulator-group-level-4{\r\n\t\t\t.tabulator-arrow{\r\n\t\t\t\tmargin-left:80px;\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\t&.tabulator-group-level-5{\r\n\t\t\t.tabulator-arrow{\r\n\t\t\t\tmargin-left:100px;\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\t//sorting arrow\r\n\t\t.tabulator-arrow{\r\n\t\t\tdisplay: inline-block;\r\n\t\t\twidth: 0;\r\n\t\t\theight: 0;\r\n\t\t\tmargin-right:16px;\r\n\t\t\tborder-top: 6px solid transparent;\r\n\t\t\tborder-bottom: 6px solid transparent;\r\n\t\t\tborder-right: 0;\r\n\t\t\tborder-left: 6px solid $sortArrowActive;\r\n\t\t\tvertical-align:middle;\r\n\t\t}\r\n\r\n\t\tspan{\r\n\t\t\tmargin-left:10px;\r\n\t\t\tcolor:#666;\r\n\t\t}\r\n\t}\r\n}\r\n\r\n.tabulator-edit-select-list{\r\n\tposition: absolute;\r\n\tdisplay:inline-block;\r\n\tbox-sizing:border-box;\r\n\r\n\tmax-height:200px;\r\n\r\n\tbackground:$rowBackgroundColor;\r\n\tborder:1px solid $rowBorderColor;\r\n\r\n\tfont-size:$textSize;\r\n\r\n\toverflow-y:auto;\r\n\t-webkit-overflow-scrolling: touch;\r\n\r\n\tz-index: 10000;\r\n\r\n\t.tabulator-edit-select-list-item{\r\n\t\tpadding:4px;\r\n\r\n\t\tcolor:$rowTextColor;\r\n\r\n\t\t&.active{\r\n\t\t\tcolor:$rowBackgroundColor;\r\n\t\t\tbackground:$editBoxColor;\r\n\t\t}\r\n\r\n\t\t&:hover{\r\n\t\t\tcursor:pointer;\r\n\r\n\t\t\tcolor:$rowBackgroundColor;\r\n\t\t\tbackground:$editBoxColor;\r\n\t\t}\r\n\t}\r\n\r\n\t.tabulator-edit-select-list-group{\r\n\t\tborder-bottom:1px solid $rowBorderColor;\r\n\r\n\t\tpadding:4px;\r\n\t\tpadding-top:6px;\r\n\r\n\t\tcolor:$rowTextColor;\r\n\t\tfont-weight:bold;\r\n\t}\r\n}"]} \ No newline at end of file diff --git a/Gems/AssetMemoryAnalyzer/External/tabulator-master/dist/css/tabulator_site.css b/Gems/AssetMemoryAnalyzer/External/tabulator-master/dist/css/tabulator_site.css deleted file mode 100644 index 0b3137a32b..0000000000 --- a/Gems/AssetMemoryAnalyzer/External/tabulator-master/dist/css/tabulator_site.css +++ /dev/null @@ -1,765 +0,0 @@ -/* Tabulator v4.1.2 (c) Oliver Folkerd */ -.tabulator { - position: relative; - border-bottom: 5px solid #222; - background-color: #fff; - font-size: 14px; - text-align: left; - overflow: hidden; - -ms-transform: translatez(0); - transform: translatez(0); -} - -.tabulator[tabulator-layout="fitDataFill"] .tabulator-tableHolder .tabulator-table { - min-width: 100%; -} - -.tabulator[tabulator-layout="fitColumns"] .tabulator-row .tabulator-cell:last-of-type { - border-right: none; -} - -.tabulator.tabulator-block-select { - -webkit-user-select: none; - -moz-user-select: none; - -ms-user-select: none; - user-select: none; -} - -.tabulator .tabulator-header { - position: relative; - box-sizing: border-box; - width: 100%; - border-bottom: 3px solid #3FB449; - background-color: #222; - color: #fff; - font-weight: bold; - white-space: nowrap; - overflow: hidden; - -moz-user-select: none; - -khtml-user-select: none; - -webkit-user-select: none; - -o-user-select: none; -} - -.tabulator .tabulator-header .tabulator-col { - display: inline-block; - position: relative; - box-sizing: border-box; - border-right: 1px solid #aaa; - background-color: #222; - text-align: left; - vertical-align: bottom; - overflow: hidden; -} - -.tabulator .tabulator-header .tabulator-col.tabulator-moving { - position: absolute; - border: 1px solid #3FB449; - background: #090909; - pointer-events: none; -} - -.tabulator .tabulator-header .tabulator-col .tabulator-col-content { - box-sizing: border-box; - position: relative; - padding: 8px; -} - -.tabulator .tabulator-header .tabulator-col .tabulator-col-content .tabulator-col-title { - box-sizing: border-box; - width: 100%; - white-space: nowrap; - overflow: hidden; - text-overflow: ellipsis; - vertical-align: bottom; -} - -.tabulator .tabulator-header .tabulator-col .tabulator-col-content .tabulator-col-title .tabulator-title-editor { - box-sizing: border-box; - width: 100%; - border: 1px solid #999; - padding: 1px; - background: #fff; -} - -.tabulator .tabulator-header .tabulator-col .tabulator-col-content .tabulator-arrow { - display: inline-block; - position: absolute; - top: 14px; - right: 8px; - width: 0; - height: 0; - border-left: 6px solid transparent; - border-right: 6px solid transparent; - border-bottom: 6px solid #bbb; -} - -.tabulator .tabulator-header .tabulator-col.tabulator-col-group .tabulator-col-group-cols { - position: relative; - display: -ms-flexbox; - display: flex; - border-top: 1px solid #aaa; - overflow: hidden; -} - -.tabulator .tabulator-header .tabulator-col.tabulator-col-group .tabulator-col-group-cols .tabulator-col:last-child { - margin-right: -1px; -} - -.tabulator .tabulator-header .tabulator-col:first-child .tabulator-col-resize-handle.prev { - display: none; -} - -.tabulator .tabulator-header .tabulator-col.ui-sortable-helper { - position: absolute; - background-color: #222 !important; - border: 1px solid #aaa; -} - -.tabulator .tabulator-header .tabulator-col .tabulator-header-filter { - position: relative; - box-sizing: border-box; - margin-top: 2px; - width: 100%; - text-align: center; -} - -.tabulator .tabulator-header .tabulator-col .tabulator-header-filter textarea { - height: auto !important; -} - -.tabulator .tabulator-header .tabulator-col .tabulator-header-filter svg { - margin-top: 3px; -} - -.tabulator .tabulator-header .tabulator-col .tabulator-header-filter input::-ms-clear { - width: 0; - height: 0; -} - -.tabulator .tabulator-header .tabulator-col.tabulator-sortable .tabulator-col-title { - padding-right: 25px; -} - -.tabulator .tabulator-header .tabulator-col.tabulator-sortable:hover { - cursor: pointer; - background-color: #090909; -} - -.tabulator .tabulator-header .tabulator-col.tabulator-sortable[aria-sort="none"] .tabulator-col-content .tabulator-arrow { - border-top: none; - border-bottom: 6px solid #bbb; -} - -.tabulator .tabulator-header .tabulator-col.tabulator-sortable[aria-sort="asc"] .tabulator-col-content .tabulator-arrow { - border-top: none; - border-bottom: 6px solid #3FB449; -} - -.tabulator .tabulator-header .tabulator-col.tabulator-sortable[aria-sort="desc"] .tabulator-col-content .tabulator-arrow { - border-top: 6px solid #3FB449; - border-bottom: none; -} - -.tabulator .tabulator-header .tabulator-col.tabulator-col-vertical .tabulator-col-content .tabulator-col-title { - -webkit-writing-mode: vertical-rl; - -ms-writing-mode: tb-rl; - writing-mode: vertical-rl; - text-orientation: mixed; - display: -ms-flexbox; - display: flex; - -ms-flex-align: center; - align-items: center; - -ms-flex-pack: center; - justify-content: center; -} - -.tabulator .tabulator-header .tabulator-col.tabulator-col-vertical.tabulator-col-vertical-flip .tabulator-col-title { - -ms-transform: rotate(180deg); - transform: rotate(180deg); -} - -.tabulator .tabulator-header .tabulator-col.tabulator-col-vertical.tabulator-sortable .tabulator-col-title { - padding-right: 0; - padding-top: 20px; -} - -.tabulator .tabulator-header .tabulator-col.tabulator-col-vertical.tabulator-sortable.tabulator-col-vertical-flip .tabulator-col-title { - padding-right: 0; - padding-bottom: 20px; -} - -.tabulator .tabulator-header .tabulator-col.tabulator-col-vertical.tabulator-sortable .tabulator-arrow { - right: calc(50% - 6px); -} - -.tabulator .tabulator-header .tabulator-frozen { - display: inline-block; - position: absolute; - z-index: 10; -} - -.tabulator .tabulator-header .tabulator-frozen.tabulator-frozen-left { - border-right: 2px solid #aaa; -} - -.tabulator .tabulator-header .tabulator-frozen.tabulator-frozen-right { - border-left: 2px solid #aaa; -} - -.tabulator .tabulator-header .tabulator-calcs-holder { - box-sizing: border-box; - min-width: 400%; - background: #3c3c3c !important; - border-top: 1px solid #aaa; - overflow: hidden; -} - -.tabulator .tabulator-header .tabulator-calcs-holder .tabulator-row { - background: #3c3c3c !important; -} - -.tabulator .tabulator-header .tabulator-calcs-holder .tabulator-row .tabulator-col-resize-handle { - display: none; -} - -.tabulator .tabulator-header .tabulator-frozen-rows-holder { - min-width: 400%; -} - -.tabulator .tabulator-header .tabulator-frozen-rows-holder:empty { - display: none; -} - -.tabulator .tabulator-tableHolder { - position: relative; - width: 100%; - white-space: nowrap; - overflow: auto; - -webkit-overflow-scrolling: touch; -} - -.tabulator .tabulator-tableHolder:focus { - outline: none; -} - -.tabulator .tabulator-tableHolder .tabulator-placeholder { - box-sizing: border-box; - display: -ms-flexbox; - display: flex; - -ms-flex-align: center; - align-items: center; - width: 100%; -} - -.tabulator .tabulator-tableHolder .tabulator-placeholder[tabulator-render-mode="virtual"] { - position: absolute; - top: 0; - left: 0; - height: 100%; -} - -.tabulator .tabulator-tableHolder .tabulator-placeholder span { - display: inline-block; - margin: 0 auto; - padding: 10px; - color: #3FB449; - font-weight: bold; - font-size: 20px; -} - -.tabulator .tabulator-tableHolder .tabulator-table { - position: relative; - display: inline-block; - background-color: #fff; - white-space: nowrap; - overflow: visible; - color: #333; -} - -.tabulator .tabulator-tableHolder .tabulator-table .tabulator-row.tabulator-calcs { - font-weight: bold; - background: #484848 !important; - color: #fff; -} - -.tabulator .tabulator-footer { - padding: 5px 10px; - padding-top: 8px; - border-top: 3px solid #3FB449; - background-color: #222; - text-align: right; - color: #222; - font-weight: bold; - white-space: nowrap; - -ms-user-select: none; - user-select: none; - -moz-user-select: none; - -khtml-user-select: none; - -webkit-user-select: none; - -o-user-select: none; -} - -.tabulator .tabulator-footer .tabulator-calcs-holder { - box-sizing: border-box; - width: calc(100% + 20px); - margin: -8px -10px 8px -10px; - text-align: left; - background: #3c3c3c !important; - border-bottom: 1px solid #aaa; - overflow: hidden; -} - -.tabulator .tabulator-footer .tabulator-calcs-holder .tabulator-row { - background: #3c3c3c !important; - color: #fff !important; -} - -.tabulator .tabulator-footer .tabulator-calcs-holder .tabulator-row .tabulator-col-resize-handle { - display: none; -} - -.tabulator .tabulator-footer .tabulator-calcs-holder:only-child { - margin-bottom: -5px; - border-bottom: none; -} - -.tabulator .tabulator-footer .tabulator-pages { - margin: 0 7px; -} - -.tabulator .tabulator-footer .tabulator-page { - display: inline-block; - margin: 0 2px; - padding: 2px 5px; - border: 1px solid #aaa; - border-radius: 3px; - background: #fff; - color: #222; - font-family: inherit; - font-weight: inherit; - font-size: inherit; -} - -.tabulator .tabulator-footer .tabulator-page.active { - color: #3FB449; -} - -.tabulator .tabulator-footer .tabulator-page:disabled { - opacity: .5; -} - -.tabulator .tabulator-footer .tabulator-page:not(.disabled):hover { - cursor: pointer; - background: rgba(0, 0, 0, 0.2); - color: #fff; -} - -.tabulator .tabulator-col-resize-handle { - position: absolute; - right: 0; - top: 0; - bottom: 0; - width: 5px; -} - -.tabulator .tabulator-col-resize-handle.prev { - left: 0; - right: auto; -} - -.tabulator .tabulator-col-resize-handle:hover { - cursor: ew-resize; -} - -.tabulator .tabulator-loader { - position: absolute; - display: -ms-flexbox; - display: flex; - -ms-flex-align: center; - align-items: center; - top: 0; - left: 0; - z-index: 100; - height: 100%; - width: 100%; - background: rgba(0, 0, 0, 0.4); - text-align: center; -} - -.tabulator .tabulator-loader .tabulator-loader-msg { - display: inline-block; - margin: 0 auto; - padding: 10px 20px; - border-radius: 10px; - background: #fff; - font-weight: bold; - font-size: 16px; -} - -.tabulator .tabulator-loader .tabulator-loader-msg.tabulator-loading { - border: 4px solid #333; - color: #000; -} - -.tabulator .tabulator-loader .tabulator-loader-msg.tabulator-error { - border: 4px solid #D00; - color: #590000; -} - -.tabulator-row { - position: relative; - box-sizing: border-box; - min-height: 22px; - background-color: #fff; -} - -.tabulator-row.tabulator-row-even { - background-color: #EFEFEF; -} - -.tabulator-row.tabulator-selectable:hover { - background-color: #bbb; - cursor: pointer; -} - -.tabulator-row.tabulator-selected { - background-color: #9ABCEA; -} - -.tabulator-row.tabulator-selected:hover { - background-color: #769BCC; - cursor: pointer; -} - -.tabulator-row.tabulator-row-moving { - border: 1px solid #000; - background: #fff; -} - -.tabulator-row.tabulator-moving { - position: absolute; - border-top: 1px solid #aaa; - border-bottom: 1px solid #aaa; - pointer-events: none !important; - z-index: 15; -} - -.tabulator-row .tabulator-row-resize-handle { - position: absolute; - right: 0; - bottom: 0; - left: 0; - height: 5px; -} - -.tabulator-row .tabulator-row-resize-handle.prev { - top: 0; - bottom: auto; -} - -.tabulator-row .tabulator-row-resize-handle:hover { - cursor: ns-resize; -} - -.tabulator-row .tabulator-frozen { - display: inline-block; - position: absolute; - background-color: inherit; - z-index: 10; -} - -.tabulator-row .tabulator-frozen.tabulator-frozen-left { - border-right: 2px solid #aaa; -} - -.tabulator-row .tabulator-frozen.tabulator-frozen-right { - border-left: 2px solid #aaa; -} - -.tabulator-row .tabulator-responsive-collapse { - box-sizing: border-box; - padding: 5px; - border-top: 1px solid #aaa; - border-bottom: 1px solid #aaa; -} - -.tabulator-row .tabulator-responsive-collapse:empty { - display: none; -} - -.tabulator-row .tabulator-responsive-collapse table { - font-size: 14px; -} - -.tabulator-row .tabulator-responsive-collapse table tr td { - position: relative; -} - -.tabulator-row .tabulator-responsive-collapse table tr td:first-of-type { - padding-right: 10px; -} - -.tabulator-row .tabulator-cell { - display: inline-block; - position: relative; - box-sizing: border-box; - padding: 6px; - border-right: 1px solid #aaa; - vertical-align: middle; - white-space: nowrap; - overflow: hidden; - text-overflow: ellipsis; -} - -.tabulator-row .tabulator-cell.tabulator-editing { - border: 1px solid #1D68CD; - padding: 0; -} - -.tabulator-row .tabulator-cell.tabulator-editing input, .tabulator-row .tabulator-cell.tabulator-editing select { - border: 1px; - background: transparent; -} - -.tabulator-row .tabulator-cell.tabulator-validation-fail { - border: 1px solid #dd0000; -} - -.tabulator-row .tabulator-cell.tabulator-validation-fail input, .tabulator-row .tabulator-cell.tabulator-validation-fail select { - border: 1px; - background: transparent; - color: #dd0000; -} - -.tabulator-row .tabulator-cell:first-child .tabulator-col-resize-handle.prev { - display: none; -} - -.tabulator-row .tabulator-cell.tabulator-row-handle { - display: -ms-inline-flexbox; - display: inline-flex; - -ms-flex-align: center; - align-items: center; - -moz-user-select: none; - -khtml-user-select: none; - -webkit-user-select: none; - -o-user-select: none; -} - -.tabulator-row .tabulator-cell.tabulator-row-handle .tabulator-row-handle-box { - width: 80%; -} - -.tabulator-row .tabulator-cell.tabulator-row-handle .tabulator-row-handle-box .tabulator-row-handle-bar { - width: 100%; - height: 3px; - margin-top: 2px; - background: #3FB449; -} - -.tabulator-row .tabulator-cell .tabulator-data-tree-branch { - display: inline-block; - vertical-align: middle; - height: 9px; - width: 7px; - margin-top: -9px; - margin-right: 5px; - border-bottom-left-radius: 1px; - border-left: 2px solid #aaa; - border-bottom: 2px solid #aaa; -} - -.tabulator-row .tabulator-cell .tabulator-data-tree-control { - display: -ms-inline-flexbox; - display: inline-flex; - -ms-flex-pack: center; - justify-content: center; - -ms-flex-align: center; - align-items: center; - vertical-align: middle; - height: 11px; - width: 11px; - margin-right: 5px; - border: 1px solid #333; - border-radius: 2px; - background: rgba(0, 0, 0, 0.1); - overflow: hidden; -} - -.tabulator-row .tabulator-cell .tabulator-data-tree-control:hover { - cursor: pointer; - background: rgba(0, 0, 0, 0.2); -} - -.tabulator-row .tabulator-cell .tabulator-data-tree-control .tabulator-data-tree-control-collapse { - display: inline-block; - position: relative; - height: 7px; - width: 1px; - background: transparent; -} - -.tabulator-row .tabulator-cell .tabulator-data-tree-control .tabulator-data-tree-control-collapse:after { - position: absolute; - content: ""; - left: -3px; - top: 3px; - height: 1px; - width: 7px; - background: #333; -} - -.tabulator-row .tabulator-cell .tabulator-data-tree-control .tabulator-data-tree-control-expand { - display: inline-block; - position: relative; - height: 7px; - width: 1px; - background: #333; -} - -.tabulator-row .tabulator-cell .tabulator-data-tree-control .tabulator-data-tree-control-expand:after { - position: absolute; - content: ""; - left: -3px; - top: 3px; - height: 1px; - width: 7px; - background: #333; -} - -.tabulator-row .tabulator-cell .tabulator-responsive-collapse-toggle { - display: -ms-inline-flexbox; - display: inline-flex; - -ms-flex-align: center; - align-items: center; - -ms-flex-pack: center; - justify-content: center; - -moz-user-select: none; - -khtml-user-select: none; - -webkit-user-select: none; - -o-user-select: none; - height: 15px; - width: 15px; - border-radius: 20px; - background: #666; - color: #fff; - font-weight: bold; - font-size: 1.1em; -} - -.tabulator-row .tabulator-cell .tabulator-responsive-collapse-toggle:hover { - opacity: .7; -} - -.tabulator-row .tabulator-cell .tabulator-responsive-collapse-toggle.open .tabulator-responsive-collapse-toggle-close { - display: initial; -} - -.tabulator-row .tabulator-cell .tabulator-responsive-collapse-toggle.open .tabulator-responsive-collapse-toggle-open { - display: none; -} - -.tabulator-row .tabulator-cell .tabulator-responsive-collapse-toggle .tabulator-responsive-collapse-toggle-close { - display: none; -} - -.tabulator-row.tabulator-group { - box-sizing: border-box; - border-right: 1px solid #aaa; - border-top: 1px solid #000; - border-bottom: 2px solid #3FB449; - padding: 5px; - padding-left: 10px; - background: #222; - color: #fff; - font-weight: bold; - min-width: 100%; -} - -.tabulator-row.tabulator-group:hover { - cursor: pointer; - background-color: #090909; -} - -.tabulator-row.tabulator-group.tabulator-group-visible .tabulator-arrow { - margin-right: 10px; - border-left: 6px solid transparent; - border-right: 6px solid transparent; - border-top: 6px solid #3FB449; - border-bottom: 0; -} - -.tabulator-row.tabulator-group.tabulator-group-level-1 .tabulator-arrow { - margin-left: 20px; -} - -.tabulator-row.tabulator-group.tabulator-group-level-2 .tabulator-arrow { - margin-left: 40px; -} - -.tabulator-row.tabulator-group.tabulator-group-level-3 .tabulator-arrow { - margin-left: 60px; -} - -.tabulator-row.tabulator-group.tabulator-group-level-4 .tabulator-arrow { - margin-left: 80px; -} - -.tabulator-row.tabulator-group.tabulator-group-level-5 .tabulator-arrow { - margin-left: 100px; -} - -.tabulator-row.tabulator-group .tabulator-arrow { - display: inline-block; - width: 0; - height: 0; - margin-right: 16px; - border-top: 6px solid transparent; - border-bottom: 6px solid transparent; - border-right: 0; - border-left: 6px solid #3FB449; - vertical-align: middle; -} - -.tabulator-row.tabulator-group span { - margin-left: 10px; - color: #3FB449; -} - -.tabulator-edit-select-list { - position: absolute; - display: inline-block; - box-sizing: border-box; - max-height: 200px; - background: #fff; - border: 1px solid #aaa; - font-size: 14px; - overflow-y: auto; - -webkit-overflow-scrolling: touch; - z-index: 10000; -} - -.tabulator-edit-select-list .tabulator-edit-select-list-item { - padding: 4px; - color: #333; -} - -.tabulator-edit-select-list .tabulator-edit-select-list-item.active { - color: #fff; - background: #1D68CD; -} - -.tabulator-edit-select-list .tabulator-edit-select-list-item:hover { - cursor: pointer; - color: #fff; - background: #1D68CD; -} - -.tabulator-edit-select-list .tabulator-edit-select-list-group { - border-bottom: 1px solid #aaa; - padding: 4px; - padding-top: 6px; - color: #333; - font-weight: bold; -} diff --git a/Gems/AssetMemoryAnalyzer/External/tabulator-master/dist/css/tabulator_site.min.css b/Gems/AssetMemoryAnalyzer/External/tabulator-master/dist/css/tabulator_site.min.css deleted file mode 100644 index c2a598371e..0000000000 --- a/Gems/AssetMemoryAnalyzer/External/tabulator-master/dist/css/tabulator_site.min.css +++ /dev/null @@ -1,3 +0,0 @@ -/* Tabulator v4.1.2 (c) Oliver Folkerd */ -.tabulator{position:relative;border-bottom:5px solid #222;background-color:#fff;font-size:14px;text-align:left;overflow:hidden;transform:translatez(0)}.tabulator[tabulator-layout=fitDataFill] .tabulator-tableHolder .tabulator-table{min-width:100%}.tabulator[tabulator-layout=fitColumns] .tabulator-row .tabulator-cell:last-of-type{border-right:none}.tabulator.tabulator-block-select{-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}.tabulator .tabulator-header{width:100%;border-bottom:3px solid #3fb449;color:#fff;font-weight:700;white-space:nowrap;-moz-user-select:none;-khtml-user-select:none;-webkit-user-select:none;-o-user-select:none}.tabulator .tabulator-header,.tabulator .tabulator-header .tabulator-col{position:relative;box-sizing:border-box;background-color:#222;overflow:hidden}.tabulator .tabulator-header .tabulator-col{display:inline-block;border-right:1px solid #aaa;text-align:left;vertical-align:bottom}.tabulator .tabulator-header .tabulator-col.tabulator-moving{position:absolute;border:1px solid #3fb449;background:#090909;pointer-events:none}.tabulator .tabulator-header .tabulator-col .tabulator-col-content{box-sizing:border-box;position:relative;padding:8px}.tabulator .tabulator-header .tabulator-col .tabulator-col-content .tabulator-col-title{box-sizing:border-box;width:100%;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;vertical-align:bottom}.tabulator .tabulator-header .tabulator-col .tabulator-col-content .tabulator-col-title .tabulator-title-editor{box-sizing:border-box;width:100%;border:1px solid #999;padding:1px;background:#fff}.tabulator .tabulator-header .tabulator-col .tabulator-col-content .tabulator-arrow{display:inline-block;position:absolute;top:14px;right:8px;width:0;height:0;border-left:6px solid transparent;border-right:6px solid transparent;border-bottom:6px solid #bbb}.tabulator .tabulator-header .tabulator-col.tabulator-col-group .tabulator-col-group-cols{position:relative;display:-ms-flexbox;display:flex;border-top:1px solid #aaa;overflow:hidden}.tabulator .tabulator-header .tabulator-col.tabulator-col-group .tabulator-col-group-cols .tabulator-col:last-child{margin-right:-1px}.tabulator .tabulator-header .tabulator-col:first-child .tabulator-col-resize-handle.prev{display:none}.tabulator .tabulator-header .tabulator-col.ui-sortable-helper{position:absolute;background-color:#222!important;border:1px solid #aaa}.tabulator .tabulator-header .tabulator-col .tabulator-header-filter{position:relative;box-sizing:border-box;margin-top:2px;width:100%;text-align:center}.tabulator .tabulator-header .tabulator-col .tabulator-header-filter textarea{height:auto!important}.tabulator .tabulator-header .tabulator-col .tabulator-header-filter svg{margin-top:3px}.tabulator .tabulator-header .tabulator-col .tabulator-header-filter input::-ms-clear{width:0;height:0}.tabulator .tabulator-header .tabulator-col.tabulator-sortable .tabulator-col-title{padding-right:25px}.tabulator .tabulator-header .tabulator-col.tabulator-sortable:hover{cursor:pointer;background-color:#090909}.tabulator .tabulator-header .tabulator-col.tabulator-sortable[aria-sort=none] .tabulator-col-content .tabulator-arrow{border-top:none;border-bottom:6px solid #bbb}.tabulator .tabulator-header .tabulator-col.tabulator-sortable[aria-sort=asc] .tabulator-col-content .tabulator-arrow{border-top:none;border-bottom:6px solid #3fb449}.tabulator .tabulator-header .tabulator-col.tabulator-sortable[aria-sort=desc] .tabulator-col-content .tabulator-arrow{border-top:6px solid #3fb449;border-bottom:none}.tabulator .tabulator-header .tabulator-col.tabulator-col-vertical .tabulator-col-content .tabulator-col-title{-webkit-writing-mode:vertical-rl;-ms-writing-mode:tb-rl;writing-mode:vertical-rl;text-orientation:mixed;display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;-ms-flex-pack:center;justify-content:center}.tabulator .tabulator-header .tabulator-col.tabulator-col-vertical.tabulator-col-vertical-flip .tabulator-col-title{transform:rotate(180deg)}.tabulator .tabulator-header .tabulator-col.tabulator-col-vertical.tabulator-sortable .tabulator-col-title{padding-right:0;padding-top:20px}.tabulator .tabulator-header .tabulator-col.tabulator-col-vertical.tabulator-sortable.tabulator-col-vertical-flip .tabulator-col-title{padding-right:0;padding-bottom:20px}.tabulator .tabulator-header .tabulator-col.tabulator-col-vertical.tabulator-sortable .tabulator-arrow{right:calc(50% - 6px)}.tabulator .tabulator-header .tabulator-frozen{display:inline-block;position:absolute;z-index:1}.tabulator .tabulator-header .tabulator-frozen.tabulator-frozen-left{border-right:2px solid #aaa}.tabulator .tabulator-header .tabulator-frozen.tabulator-frozen-right{border-left:2px solid #aaa}.tabulator .tabulator-header .tabulator-calcs-holder{box-sizing:border-box;min-width:400%;background:#3c3c3c!important;border-top:1px solid #aaa;overflow:hidden}.tabulator .tabulator-header .tabulator-calcs-holder .tabulator-row{background:#3c3c3c!important}.tabulator .tabulator-header .tabulator-calcs-holder .tabulator-row .tabulator-col-resize-handle{display:none}.tabulator .tabulator-header .tabulator-frozen-rows-holder{min-width:400%}.tabulator .tabulator-header .tabulator-frozen-rows-holder:empty{display:none}.tabulator .tabulator-tableHolder{position:relative;width:100%;white-space:nowrap;overflow:auto;-webkit-overflow-scrolling:touch}.tabulator .tabulator-tableHolder:focus{outline:none}.tabulator .tabulator-tableHolder .tabulator-placeholder{box-sizing:border-box;display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;width:100%}.tabulator .tabulator-tableHolder .tabulator-placeholder[tabulator-render-mode=virtual]{position:absolute;top:0;left:0;height:100%}.tabulator .tabulator-tableHolder .tabulator-placeholder span{display:inline-block;margin:0 auto;padding:10px;color:#3fb449;font-weight:700;font-size:20px}.tabulator .tabulator-tableHolder .tabulator-table{position:relative;display:inline-block;background-color:#fff;white-space:nowrap;overflow:visible;color:#333}.tabulator .tabulator-tableHolder .tabulator-table .tabulator-row.tabulator-calcs{font-weight:700;background:#484848!important;color:#fff}.tabulator .tabulator-footer{padding:5px 10px;padding-top:8px;border-top:3px solid #3fb449;background-color:#222;text-align:right;color:#222;font-weight:700;white-space:nowrap;-ms-user-select:none;user-select:none;-moz-user-select:none;-khtml-user-select:none;-webkit-user-select:none;-o-user-select:none}.tabulator .tabulator-footer .tabulator-calcs-holder{box-sizing:border-box;width:calc(100% + 20px);margin:-8px -10px 8px;text-align:left;background:#3c3c3c!important;border-bottom:1px solid #aaa;overflow:hidden}.tabulator .tabulator-footer .tabulator-calcs-holder .tabulator-row{background:#3c3c3c!important;color:#fff!important}.tabulator .tabulator-footer .tabulator-calcs-holder .tabulator-row .tabulator-col-resize-handle{display:none}.tabulator .tabulator-footer .tabulator-calcs-holder:only-child{margin-bottom:-5px;border-bottom:none}.tabulator .tabulator-footer .tabulator-pages{margin:0 7px}.tabulator .tabulator-footer .tabulator-page{display:inline-block;margin:0 2px;padding:2px 5px;border:1px solid #aaa;border-radius:3px;background:#fff;color:#222;font-family:inherit;font-weight:inherit;font-size:inherit}.tabulator .tabulator-footer .tabulator-page.active{color:#3fb449}.tabulator .tabulator-footer .tabulator-page:disabled{opacity:.5}.tabulator .tabulator-footer .tabulator-page:not(.disabled):hover{cursor:pointer;background:rgba(0,0,0,.2);color:#fff}.tabulator .tabulator-col-resize-handle{position:absolute;right:0;top:0;bottom:0;width:5px}.tabulator .tabulator-col-resize-handle.prev{left:0;right:auto}.tabulator .tabulator-col-resize-handle:hover{cursor:ew-resize}.tabulator .tabulator-loader{position:absolute;display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;top:0;left:0;z-index:3;height:100%;width:100%;background:rgba(0,0,0,.4);text-align:center}.tabulator .tabulator-loader .tabulator-loader-msg{display:inline-block;margin:0 auto;padding:10px 20px;border-radius:10px;background:#fff;font-weight:700;font-size:16px}.tabulator .tabulator-loader .tabulator-loader-msg.tabulator-loading{border:4px solid #333;color:#000}.tabulator .tabulator-loader .tabulator-loader-msg.tabulator-error{border:4px solid #d00;color:#590000}.tabulator-row{position:relative;box-sizing:border-box;min-height:22px;background-color:#fff}.tabulator-row.tabulator-row-even{background-color:#efefef}.tabulator-row.tabulator-selectable:hover{background-color:#bbb;cursor:pointer}.tabulator-row.tabulator-selected{background-color:#9abcea}.tabulator-row.tabulator-selected:hover{background-color:#769bcc;cursor:pointer}.tabulator-row.tabulator-row-moving{border:1px solid #000;background:#fff}.tabulator-row.tabulator-moving{position:absolute;border-top:1px solid #aaa;border-bottom:1px solid #aaa;pointer-events:none!important;z-index:2}.tabulator-row .tabulator-row-resize-handle{position:absolute;right:0;bottom:0;left:0;height:5px}.tabulator-row .tabulator-row-resize-handle.prev{top:0;bottom:auto}.tabulator-row .tabulator-row-resize-handle:hover{cursor:ns-resize}.tabulator-row .tabulator-frozen{display:inline-block;position:absolute;background-color:inherit;z-index:1}.tabulator-row .tabulator-frozen.tabulator-frozen-left{border-right:2px solid #aaa}.tabulator-row .tabulator-frozen.tabulator-frozen-right{border-left:2px solid #aaa}.tabulator-row .tabulator-responsive-collapse{box-sizing:border-box;padding:5px;border-top:1px solid #aaa;border-bottom:1px solid #aaa}.tabulator-row .tabulator-responsive-collapse:empty{display:none}.tabulator-row .tabulator-responsive-collapse table{font-size:14px}.tabulator-row .tabulator-responsive-collapse table tr td{position:relative}.tabulator-row .tabulator-responsive-collapse table tr td:first-of-type{padding-right:10px}.tabulator-row .tabulator-cell{display:inline-block;position:relative;box-sizing:border-box;padding:6px;border-right:1px solid #aaa;vertical-align:middle;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.tabulator-row .tabulator-cell.tabulator-editing{border:1px solid #1d68cd;padding:0}.tabulator-row .tabulator-cell.tabulator-editing input,.tabulator-row .tabulator-cell.tabulator-editing select{border:1px;background:transparent}.tabulator-row .tabulator-cell.tabulator-validation-fail{border:1px solid #d00}.tabulator-row .tabulator-cell.tabulator-validation-fail input,.tabulator-row .tabulator-cell.tabulator-validation-fail select{border:1px;background:transparent;color:#d00}.tabulator-row .tabulator-cell:first-child .tabulator-col-resize-handle.prev{display:none}.tabulator-row .tabulator-cell.tabulator-row-handle{display:-ms-inline-flexbox;display:inline-flex;-ms-flex-align:center;align-items:center;-moz-user-select:none;-khtml-user-select:none;-webkit-user-select:none;-o-user-select:none}.tabulator-row .tabulator-cell.tabulator-row-handle .tabulator-row-handle-box{width:80%}.tabulator-row .tabulator-cell.tabulator-row-handle .tabulator-row-handle-box .tabulator-row-handle-bar{width:100%;height:3px;margin-top:2px;background:#3fb449}.tabulator-row .tabulator-cell .tabulator-data-tree-branch{display:inline-block;vertical-align:middle;height:9px;width:7px;margin-top:-9px;margin-right:5px;border-bottom-left-radius:1px;border-left:2px solid #aaa;border-bottom:2px solid #aaa}.tabulator-row .tabulator-cell .tabulator-data-tree-control{display:-ms-inline-flexbox;display:inline-flex;-ms-flex-pack:center;justify-content:center;-ms-flex-align:center;align-items:center;vertical-align:middle;height:11px;width:11px;margin-right:5px;border:1px solid #333;border-radius:2px;background:rgba(0,0,0,.1);overflow:hidden}.tabulator-row .tabulator-cell .tabulator-data-tree-control:hover{cursor:pointer;background:rgba(0,0,0,.2)}.tabulator-row .tabulator-cell .tabulator-data-tree-control .tabulator-data-tree-control-collapse{display:inline-block;position:relative;height:7px;width:1px;background:transparent}.tabulator-row .tabulator-cell .tabulator-data-tree-control .tabulator-data-tree-control-collapse:after{position:absolute;content:"";left:-3px;top:3px;height:1px;width:7px;background:#333}.tabulator-row .tabulator-cell .tabulator-data-tree-control .tabulator-data-tree-control-expand{display:inline-block;position:relative;height:7px;width:1px;background:#333}.tabulator-row .tabulator-cell .tabulator-data-tree-control .tabulator-data-tree-control-expand:after{position:absolute;content:"";left:-3px;top:3px;height:1px;width:7px;background:#333}.tabulator-row .tabulator-cell .tabulator-responsive-collapse-toggle{display:-ms-inline-flexbox;display:inline-flex;-ms-flex-align:center;align-items:center;-ms-flex-pack:center;justify-content:center;-moz-user-select:none;-khtml-user-select:none;-webkit-user-select:none;-o-user-select:none;height:15px;width:15px;border-radius:20px;background:#666;color:#fff;font-weight:700;font-size:1.1em}.tabulator-row .tabulator-cell .tabulator-responsive-collapse-toggle:hover{opacity:.7}.tabulator-row .tabulator-cell .tabulator-responsive-collapse-toggle.open .tabulator-responsive-collapse-toggle-close{display:initial}.tabulator-row .tabulator-cell .tabulator-responsive-collapse-toggle.open .tabulator-responsive-collapse-toggle-open,.tabulator-row .tabulator-cell .tabulator-responsive-collapse-toggle .tabulator-responsive-collapse-toggle-close{display:none}.tabulator-row.tabulator-group{box-sizing:border-box;border-right:1px solid #aaa;border-top:1px solid #000;border-bottom:2px solid #3fb449;padding:5px;padding-left:10px;background:#222;color:#fff;font-weight:700;min-width:100%}.tabulator-row.tabulator-group:hover{cursor:pointer;background-color:#090909}.tabulator-row.tabulator-group.tabulator-group-visible .tabulator-arrow{margin-right:10px;border-left:6px solid transparent;border-right:6px solid transparent;border-top:6px solid #3fb449;border-bottom:0}.tabulator-row.tabulator-group.tabulator-group-level-1 .tabulator-arrow{margin-left:20px}.tabulator-row.tabulator-group.tabulator-group-level-2 .tabulator-arrow{margin-left:40px}.tabulator-row.tabulator-group.tabulator-group-level-3 .tabulator-arrow{margin-left:60px}.tabulator-row.tabulator-group.tabulator-group-level-4 .tabulator-arrow{margin-left:80px}.tabulator-row.tabulator-group.tabulator-group-level-5 .tabulator-arrow{margin-left:100px}.tabulator-row.tabulator-group .tabulator-arrow{display:inline-block;width:0;height:0;margin-right:16px;border-top:6px solid transparent;border-bottom:6px solid transparent;border-right:0;border-left:6px solid #3fb449;vertical-align:middle}.tabulator-row.tabulator-group span{margin-left:10px;color:#3fb449}.tabulator-edit-select-list{position:absolute;display:inline-block;box-sizing:border-box;max-height:200px;background:#fff;border:1px solid #aaa;font-size:14px;overflow-y:auto;-webkit-overflow-scrolling:touch;z-index:4}.tabulator-edit-select-list .tabulator-edit-select-list-item{padding:4px;color:#333}.tabulator-edit-select-list .tabulator-edit-select-list-item.active{color:#fff;background:#1d68cd}.tabulator-edit-select-list .tabulator-edit-select-list-item:hover{cursor:pointer;color:#fff;background:#1d68cd}.tabulator-edit-select-list .tabulator-edit-select-list-group{border-bottom:1px solid #aaa;padding:4px;padding-top:6px;color:#333;font-weight:700} -/*# sourceMappingURL=tabulator_site.min.css.map */ diff --git a/Gems/AssetMemoryAnalyzer/External/tabulator-master/dist/css/tabulator_site.min.css.map b/Gems/AssetMemoryAnalyzer/External/tabulator-master/dist/css/tabulator_site.min.css.map deleted file mode 100644 index 39e4544875..0000000000 --- a/Gems/AssetMemoryAnalyzer/External/tabulator-master/dist/css/tabulator_site.min.css.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"sources":["tabulator_site.scss"],"names":[],"mappings":"AAyCA,WACC,kBAAkB,AAElB,6BAvCgB,AAyChB,sBA1CqB,AA4CrB,eA1Ca,AA2Cb,gBAAgB,AAChB,gBAAe,AAMf,uBAAwB,CAwexB,AAvfD,iFAoBI,cAAc,CACd,AArBJ,oFA6BK,iBAAkB,CAClB,AA9BL,kCAqCE,yBAAiB,AAAjB,sBAAiB,AAAjB,qBAAiB,AAAjB,gBAAiB,CACjB,AAtCF,6BA6CE,WAAU,AAEV,gCA5E2B,AA8E3B,WAhFmB,AAiFnB,gBAAgB,AAEhB,mBAAmB,AAGnB,sBAAsB,AACtB,wBAAwB,AACxB,yBAAyB,AACzB,mBAAoB,CA8OpB,AAxSF,yEA0CE,kBAAiB,AACjB,sBAAsB,AAKtB,sBAhFyB,AAqFzB,eAAe,CArDjB,AA0PG,4CA5LA,qBAAoB,AAIpB,4BAhGoB,AAkGpB,gBAAe,AACf,qBAAsB,CAqLtB,AA1PH,6DAyEI,kBAAkB,AAClB,yBAvGyB,AAwGzB,mBAA8C,AAC9C,mBAAoB,CACpB,AA7EJ,mEAiFI,sBAAqB,AACrB,kBAAkB,AAClB,WAAW,CAsCX,AAzHJ,wFAuFK,sBAAqB,AACrB,WAAW,AAEX,mBAAmB,AACnB,gBAAgB,AAChB,uBAAuB,AACvB,qBAAqB,CAarB,AA1GL,gHAiGM,sBAAsB,AACtB,WAAW,AAEX,sBAAqB,AAErB,YAAW,AAEX,eAAgB,CAChB,AAzGN,oFA8GK,qBAAqB,AACrB,kBAAkB,AAClB,SAAQ,AACR,UAAS,AACT,QAAQ,AACR,SAAS,AACT,kCAAkC,AAClC,mCAAmC,AACnC,4BA9ImB,CA+InB,AAvHL,0FAgIK,kBAAiB,AACjB,oBAAa,AAAb,aAAa,AAEb,0BAjKkB,AAkKlB,eAAgB,CAKhB,AAzIL,oHAuIM,iBAAiB,CACjB,AAxIN,0FA+IK,YAAa,CACb,AAhJL,+DAqJI,kBAAkB,AAClB,gCAAmD,AACnD,qBArLmB,CAsLnB,AAxJJ,qEA4JI,kBAAkB,AAClB,sBAAsB,AACtB,eAAc,AACd,WAAU,AACV,iBAAkB,CAiBlB,AAjLJ,8EAoKK,qBAAsB,CACtB,AArKL,yEAwKK,cAAe,CACf,AAzKL,sFA6KO,QAAS,AACT,QAAS,CACV,AA/KN,oFAsLK,kBAAkB,CAClB,AAvLL,qEA0LK,eAAc,AACd,wBAAoD,CACpD,AA5LL,uHAgMM,gBAAgB,AAChB,4BAzNkB,CA0NlB,AAlMN,sHAuMM,gBAAgB,AAChB,+BAjOmB,CAkOnB,AAzMN,uHA8MM,6BAvOmB,AAwOnB,kBAAmB,CACnB,AAhNN,+GAuNM,iCAAyB,AAAzB,uBAAyB,AAAzB,yBAAyB,AACzB,uBAAuB,AAEvB,oBAAY,AAAZ,aAAY,AACZ,sBAAkB,AAAlB,mBAAkB,AAClB,qBAAsB,AAAtB,sBAAsB,CACtB,AA7NN,oHAkOM,wBAAyB,CACzB,AAnON,2GAwOM,gBAAe,AACf,gBAAgB,CAChB,AA1ON,uIA8OO,gBAAe,AACf,mBAAmB,CACnB,AAhPP,uGAqPM,qBAAqB,CACrB,AAtPN,+CA6PG,qBAAqB,AACrB,kBAAkB,AAIlB,SAAW,CASX,AA3QH,qEAqQI,2BAxRgB,CAyRhB,AAtQJ,sEAyQI,0BA5RgB,CA6RhB,AA1QJ,qDA8QG,sBAAqB,AACrB,eAAc,AAEd,6BAA0D,AAU1D,0BA9SiB,AAiTjB,eAAgB,CAChB,AA/RH,oEAoRI,4BAA0D,CAK1D,AAzRJ,iGAuRK,YAAa,CACb,AAxRL,2DAkSG,cAAc,CAKd,AAvSH,iEAqSI,YAAa,CACb,AAtSJ,kCA4SE,kBAAiB,AACjB,WAAU,AACV,mBAAmB,AACnB,cAAa,AACb,gCAAiC,CAkDjC,AAlWF,wCAmTG,YAAa,CACb,AApTH,yDAwTG,sBAAqB,AACrB,oBAAa,AAAb,aAAa,AACb,sBAAkB,AAAlB,mBAAkB,AASlB,UAAU,CAYV,AA/UH,wFA6TI,kBAAkB,AAClB,MAAK,AACL,OAAM,AACN,WAAW,CACX,AAjUJ,8DAsUI,qBAAqB,AAErB,cAAa,AACb,aAAY,AAEZ,cAxWyB,AAyWzB,gBAAiB,AACjB,cAAe,CACf,AA9UJ,mDAmVG,kBAAiB,AACjB,qBAAoB,AACpB,sBA1WqB,AA2WrB,mBAAmB,AACnB,iBAAgB,AAChB,UA1We,CAmXf,AAjWH,kFA4VK,gBAAiB,AACjB,6BAA0D,AAC1D,UA7XgB,CA8XhB,AA/VL,6BAuWE,iBAAgB,AAChB,gBAAe,AACf,6BA9W2B,AA+W3B,sBAlXyB,AAmXzB,iBAAgB,AAChB,WAnXmB,AAoXnB,gBAAgB,AAChB,mBAAkB,AAClB,qBAAgB,AAAhB,iBAAgB,AAEhB,sBAAsB,AACtB,wBAAwB,AACxB,yBAAyB,AACzB,mBAAoB,CAqEpB,AAzbF,qDAuXG,sBAAqB,AACrB,wBAAuB,AACvB,sBAA2B,AAE3B,gBAAgB,AAEhB,6BAA0D,AAY1D,6BA5ZiB,AA8ZjB,eAAgB,CAMhB,AAjZH,oEAgYI,6BAA0D,AAC1D,oBAAiC,CAKjC,AAtYJ,iGAoYK,YAAa,CACb,AArYL,gEA8YI,mBAAkB,AAClB,kBAAkB,CAClB,AAhZJ,8CAqZG,YAAY,CACZ,AAtZH,6CA0ZG,qBAAoB,AAEpB,aAAY,AACZ,gBAAe,AAEf,sBAraoB,AAsapB,kBAAiB,AAEjB,gBAAe,AAEf,WA3akB,AA4alB,oBAAmB,AACnB,oBAAmB,AACnB,iBAAiB,CAiBjB,AAxbH,oDA0aI,aA/ayB,CAgbzB,AA3aJ,sDA8aI,UAAU,CACV,AA/aJ,kEAmbK,eAAc,AACd,0BAAyB,AACzB,UAAU,CACV,AAtbL,wCA6bE,kBAAiB,AACjB,QAAO,AACP,MAAK,AACL,SAAQ,AACR,SAAS,CAUT,AA3cF,6CAocG,OAAM,AACN,UAAU,CACV,AAtcH,8CAycG,gBAAgB,CAChB,AA1cH,6BAgdE,kBAAiB,AACjB,oBAAa,AAAb,aAAa,AACb,sBAAkB,AAAlB,mBAAkB,AAElB,MAAK,AACL,OAAM,AACN,UAAW,AAEX,YAAW,AACX,WAAU,AACV,0BAAyB,AACzB,iBAAiB,CA2BjB,AAtfF,mDA+dG,qBAAoB,AAEpB,cAAa,AACb,kBAAiB,AAEjB,mBAAkB,AAElB,gBAAe,AACf,gBAAgB,AAChB,cAAc,CAad,AArfH,qEA4eI,sBAAqB,AACrB,UAAU,CACV,AA9eJ,mEAkfI,sBAAqB,AACrB,aAAa,CACb,AAMJ,eACC,kBAAkB,AAClB,sBAAsB,AACtB,gBAA0C,AAC1C,qBAnhBuB,CAi4BvB,AAlXD,kCAQE,wBAthB4B,CAuhB5B,AATF,0CAYE,sBAvhBsB,AAwhBtB,cAAe,CACf,AAdF,kCAiBE,wBA1hB6B,CA2hB7B,AAlBF,wCAqBE,yBA7hBkC,AA8hBlC,cAAe,CACf,AAvBF,oCA0BE,sBAAqB,AACrB,eAAe,CACf,AA5BF,gCA+BE,kBAAkB,AAElB,0BA9iBkB,AA+iBlB,6BA/iBkB,AAijBlB,8BAA+B,AAC/B,SAAU,CACV,AAtCF,4CA0CE,kBAAiB,AACjB,QAAO,AACP,SAAQ,AACR,OAAM,AACN,UAAU,CAUV,AAxDF,iDAiDG,MAAK,AACL,WAAW,CACX,AAnDH,kDAsDG,gBAAgB,CAChB,AAvDH,iCA2DE,qBAAqB,AACrB,kBAAkB,AAElB,yBAAyB,AAEzB,SAAW,CASX,AAzEF,uDAmEG,2BAhlBiB,CAilBjB,AApEH,wDAuEG,0BAplBiB,CAqlBjB,AAxEH,8CA4EE,sBAAqB,AAErB,YAAW,AAEX,0BA7lBkB,AA8lBlB,4BA9lBkB,CAinBlB,AApGF,oDAoFG,YAAY,CACZ,AArFH,oDAwFG,cArnBW,CAgoBX,AAnGH,0DA4FK,iBAAkB,CAKlB,AAjGL,wEA+FM,kBAAkB,CAClB,AAhGN,+BAwGE,qBAAoB,AACpB,kBAAkB,AAClB,sBAAqB,AACrB,YAAW,AACX,4BAznBkB,AA0nBlB,sBAAqB,AACrB,mBAAkB,AAClB,gBAAe,AACf,sBAAsB,CAkLtB,AAlSF,iDAoHG,yBA1nBkB,AA2nBlB,SAAU,CAMV,AA3HH,+GAwHI,WAAU,AACV,sBAAsB,CACtB,AA1HJ,yDA8HG,qBAnoBgB,CA0oBhB,AArIH,+HAgII,WAAU,AACV,uBAAsB,AAEtB,UAxoBe,CAyoBf,AApIJ,6EA0II,YAAa,CACb,AA3IJ,oDAiJG,2BAAoB,AAApB,oBAAoB,AACpB,sBAAkB,AAAlB,mBAAkB,AAElB,sBAAsB,AACtB,wBAAwB,AACxB,yBAAyB,AACzB,mBAAoB,CAcpB,AArKH,8EA2JI,SAAS,CAST,AApKJ,wGA+JK,WAAU,AACV,WAAU,AACV,eAAc,AACd,kBArrBoB,CAsrBpB,AAnKL,2DAwKG,qBAAoB,AACpB,sBAAqB,AAErB,WAAU,AACV,UAAS,AAET,gBAAe,AACf,iBAAgB,AAEhB,8BAA6B,AAE7B,2BAhsBiB,AAisBjB,4BAjsBiB,CAksBjB,AArLH,4DAyLG,2BAAmB,AAAnB,oBAAmB,AACnB,qBAAsB,AAAtB,uBAAsB,AACtB,sBAAkB,AAAlB,mBAAkB,AAClB,sBAAqB,AAErB,YAAW,AACX,WAAU,AAEV,iBAAgB,AAEhB,sBA/sBe,AAgtBf,kBAAiB,AACjB,0BAA4B,AAE5B,eAAe,CAmDf,AA1PH,kEA0MI,eAAc,AACd,yBAA4B,CAC5B,AA5MJ,kGA+MI,qBAAoB,AACpB,kBAAkB,AAElB,WAAW,AACX,UAAU,AAEV,sBAAuB,CAavB,AAlOJ,wGAwNK,kBAAkB,AAClB,WAAW,AACX,UAAU,AACV,QAAQ,AAER,WAAW,AACX,UAAU,AAEV,eA5uBa,CA6uBb,AAjOL,gGAqOI,qBAAoB,AACpB,kBAAkB,AAElB,WAAW,AACX,UAAU,AAEV,eAvvBc,CAowBd,AAxPJ,sGA8OK,kBAAkB,AAClB,WAAW,AACX,UAAU,AACV,QAAQ,AAER,WAAW,AACX,UAAU,AAEV,eAlwBa,CAmwBb,AAvPL,qEA6PG,2BAAoB,AAApB,oBAAoB,AACpB,sBAAkB,AAAlB,mBAAkB,AAClB,qBAAsB,AAAtB,uBAAsB,AAEtB,sBAAsB,AACtB,wBAAwB,AACxB,yBAAyB,AACzB,oBAAoB,AAEpB,YAAW,AACX,WAAU,AAEV,mBAAkB,AAClB,gBAAe,AAEf,WA3xBqB,AA4xBrB,gBAAgB,AAChB,eAAe,CAmBf,AAjSH,2EAiRI,UAAU,CACV,AAlRJ,sHAsRK,eAAe,CACf,AAvRL,sOA+RI,YAAY,CACZ,AAhSJ,+BAsSE,sBAAqB,AACrB,4BApzBkB,AAqzBlB,0BAAyB,AACzB,gCAh0B2B,AAi0B3B,YAAW,AACX,kBAAiB,AACjB,gBAt0ByB,AAu0BzB,WAt0BmB,AAu0BnB,gBAAgB,AAEhB,cAAe,CAgEf,AAhXF,qCAmTG,eAAc,AACd,wBAAoD,CACpD,AArTH,wEAyTI,kBAAiB,AACjB,kCAAkC,AAClC,mCAAmC,AACnC,6BA/0BqB,AAg1BrB,eAAgB,CAChB,AA9TJ,wEAmUI,gBAAgB,CAChB,AApUJ,wEAyUI,gBAAgB,CAChB,AA1UJ,wEA+UI,gBAAgB,CAChB,AAhVJ,wEAqVI,gBAAgB,CAChB,AAtVJ,wEA2VI,iBAAiB,CACjB,AA5VJ,gDAiWG,qBAAqB,AACrB,QAAQ,AACR,SAAS,AACT,kBAAiB,AACjB,iCAAiC,AACjC,oCAAoC,AACpC,eAAe,AACf,8BA33BsB,AA43BtB,qBAAqB,CACrB,AA1WH,oCA6WG,iBAAgB,AAChB,aAr4B0B,CAs4B1B,AAKH,4BACC,kBAAkB,AAClB,qBAAoB,AACpB,sBAAqB,AAErB,iBAAgB,AAEhB,gBA14BuB,AA24BvB,sBAz4BmB,AA24BnB,eA35Ba,AA65Bb,gBAAe,AACf,iCAAiC,AAEjC,SAAc,CA6Bd,AA5CD,6DAkBE,YAAW,AAEX,UAp5BgB,CAi6BhB,AAjCF,oEAuBG,WA15BqB,AA25BrB,kBAl5BkB,CAm5BlB,AAzBH,mEA4BG,eAAc,AAEd,WAj6BqB,AAk6BrB,kBAz5BkB,CA05BlB,AAhCH,8DAoCE,6BAr6BkB,AAu6BlB,YAAW,AACX,gBAAe,AAEf,WAz6BgB,AA06BhB,eAAgB,CAChB","file":"tabulator_site.min.css","sourcesContent":["/* Tabulator v4.1.2 (c) Oliver Folkerd */\n\n\r\n//Main Theme Variables\r\n$backgroundColor: #fff !default; //background color of tabulator\r\n$borderColor:#222 !default; //border to tabulator\r\n$textSize:14px !default; //table text size\r\n\r\n//header themeing\r\n$headerBackgroundColor:#222 !default; //border to tabulator\r\n$headerTextColor:#fff !default; //header text colour\r\n$headerBorderColor:#aaa !default; //header border color\r\n$headerSeperatorColor:#3FB449 !default; //header bottom seperator color\r\n$headerMargin:4px !default; //padding round header\r\n\r\n//column header arrows\r\n$sortArrowActive: #3FB449 !default;\r\n$sortArrowInactive: #bbb !default;\r\n\r\n//row themeing\r\n$rowBackgroundColor:#fff !default; //table row background color\r\n$rowAltBackgroundColor:#EFEFEF !default; //table row background color\r\n$rowBorderColor:#aaa !default; //table border color\r\n$rowTextColor:#333 !default; //table text color\r\n$rowHoverBackground:#bbb !default; //row background color on hover\r\n\r\n$rowSelectedBackground: #9ABCEA !default; //row background color when selected\r\n$rowSelectedBackgroundHover: #769BCC !default;//row background color when selected and hovered\r\n\r\n$editBoxColor:#1D68CD !default; //border color for edit boxes\r\n$errorColor:#dd0000 !default; //error indication\r\n\r\n//footer themeing\r\n$footerBackgroundColor:#222 !default; //border to tabulator\r\n$footerTextColor:#222 !default; //footer text colour\r\n$footerBorderColor:#aaa !default; //footer border color\r\n$footerSeperatorColor:#3FB449 !default; //footer bottom seperator color\r\n$footerActiveColor:$footerSeperatorColor !default; //footer bottom active text color\r\n\r\n\r\n//Tabulator Containing Element\r\n.tabulator{\r\n\tposition: relative;\r\n\r\n\tborder-bottom: 5px solid $borderColor;\r\n\r\n\tbackground-color: $backgroundColor;\r\n\r\n\tfont-size:$textSize;\r\n\ttext-align: left;\r\n\toverflow:hidden;\r\n\r\n\t-webkit-transform: translatez(0);\r\n\t-moz-transform: translatez(0);\r\n\t-ms-transform: translatez(0);\r\n\t-o-transform: translatez(0);\r\n\ttransform: translatez(0);\r\n\r\n\t&[tabulator-layout=\"fitDataFill\"]{\r\n\t\t.tabulator-tableHolder{\r\n\t\t\t.tabulator-table{\r\n\t\t\t\tmin-width:100%;\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\r\n\t&[tabulator-layout=\"fitColumns\"]{\r\n\t\t.tabulator-row{\r\n\t\t\t.tabulator-cell{\r\n\t\t\t\t&:last-of-type{\r\n\t\t\t\t\tborder-right: none;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\r\n\r\n\t&.tabulator-block-select{\r\n\t\tuser-select: none;\r\n\t}\r\n\r\n\t//column header containing element\r\n\t.tabulator-header{\r\n\t\tposition:relative;\r\n\t\tbox-sizing: border-box;\r\n\r\n\t\twidth:100%;\r\n\r\n\t\tborder-bottom:3px solid $headerSeperatorColor;\r\n\t\tbackground-color: $headerBackgroundColor;\r\n\t\tcolor: $headerTextColor;\r\n\t\tfont-weight:bold;\r\n\r\n\t\twhite-space: nowrap;\r\n\t\toverflow:hidden;\r\n\r\n\t\t-moz-user-select: none;\r\n\t\t-khtml-user-select: none;\r\n\t\t-webkit-user-select: none;\r\n\t\t-o-user-select: none;\r\n\r\n\t\t//individual column header element\r\n\t\t.tabulator-col{\r\n\t\t\tdisplay:inline-block;\r\n\r\n\t\t\tposition:relative;\r\n\t\t\tbox-sizing:border-box;\r\n\t\t\tborder-right:1px solid $headerBorderColor;\r\n\t\t\tbackground-color: $headerBackgroundColor;\r\n\t\t\ttext-align:left;\r\n\t\t\tvertical-align: bottom;\r\n\t\t\toverflow: hidden;\r\n\r\n\t\t\t&.tabulator-moving{\r\n\t\t\t\tposition: absolute;\r\n\t\t\t\tborder:1px solid $headerSeperatorColor;\r\n\t\t\t\tbackground:darken($headerBackgroundColor, 10%);\r\n\t\t\t\tpointer-events: none;\r\n\t\t\t}\r\n\r\n\t\t\t//hold content of column header\r\n\t\t\t.tabulator-col-content{\r\n\t\t\t\tbox-sizing:border-box;\r\n\t\t\t\tposition: relative;\r\n\t\t\t\tpadding:8px;\r\n\r\n\t\t\t\t//hold title of column header\r\n\t\t\t\t.tabulator-col-title{\r\n\t\t\t\t\tbox-sizing:border-box;\r\n\t\t\t\t\twidth: 100%;\r\n\r\n\t\t\t\t\twhite-space: nowrap;\r\n\t\t\t\t\toverflow: hidden;\r\n\t\t\t\t\ttext-overflow: ellipsis;\r\n\t\t\t\t\tvertical-align:bottom;\r\n\r\n\t\t\t\t\t//element to hold title editor\r\n\t\t\t\t\t.tabulator-title-editor{\r\n\t\t\t\t\t\tbox-sizing: border-box;\r\n\t\t\t\t\t\twidth: 100%;\r\n\r\n\t\t\t\t\t\tborder:1px solid #999;\r\n\r\n\t\t\t\t\t\tpadding:1px;\r\n\r\n\t\t\t\t\t\tbackground: #fff;\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\r\n\t\t\t\t//column sorter arrow\r\n\t\t\t\t.tabulator-arrow{\r\n\t\t\t\t\tdisplay: inline-block;\r\n\t\t\t\t\tposition: absolute;\r\n\t\t\t\t\ttop:14px;\r\n\t\t\t\t\tright:8px;\r\n\t\t\t\t\twidth: 0;\r\n\t\t\t\t\theight: 0;\r\n\t\t\t\t\tborder-left: 6px solid transparent;\r\n\t\t\t\t\tborder-right: 6px solid transparent;\r\n\t\t\t\t\tborder-bottom: 6px solid $sortArrowInactive;\r\n\t\t\t\t}\r\n\r\n\t\t\t}\r\n\r\n\t\t\t//complex header column group\r\n\t\t\t&.tabulator-col-group{\r\n\r\n\t\t\t\t//gelement to hold sub columns in column group\r\n\t\t\t\t.tabulator-col-group-cols{\r\n\t\t\t\t\tposition:relative;\r\n\t\t\t\t\tdisplay: flex;\r\n\r\n\t\t\t\t\tborder-top:1px solid $headerBorderColor;\r\n\t\t\t\t\toverflow: hidden;\r\n\r\n\t\t\t\t\t.tabulator-col:last-child{\r\n\t\t\t\t\t\tmargin-right:-1px;\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t\t//hide left resize handle on first column\r\n\t\t\t&:first-child{\r\n\t\t\t\t.tabulator-col-resize-handle.prev{\r\n\t\t\t\t\tdisplay: none;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t\t//placeholder element for sortable columns\r\n\t\t\t&.ui-sortable-helper{\r\n\t\t\t\tposition: absolute;\r\n\t\t\t\tbackground-color: $headerBackgroundColor !important;\r\n\t\t\t\tborder:1px solid $headerBorderColor;\r\n\t\t\t}\r\n\r\n\t\t\t//header filter containing element\r\n\t\t\t.tabulator-header-filter{\r\n\t\t\t\tposition: relative;\r\n\t\t\t\tbox-sizing: border-box;\r\n\t\t\t\tmargin-top:2px;\r\n\t\t\t\twidth:100%;\r\n\t\t\t\ttext-align: center;\r\n\r\n\t\t\t\t//styling adjustment for inbuilt editors\r\n\t\t\t\ttextarea{\r\n\t\t\t\t\theight:auto !important;\r\n\t\t\t\t}\r\n\r\n\t\t\t\tsvg{\r\n\t\t\t\t\tmargin-top: 3px;\r\n\t\t\t\t}\r\n\r\n\t\t\t\tinput{\r\n\t\t\t\t\t&::-ms-clear {\r\n\t\t\t\t\t width : 0;\r\n\t\t\t\t\t height: 0;\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t\t//styling child elements for sortable columns\r\n\t\t\t&.tabulator-sortable{\r\n\t\t\t\t.tabulator-col-title{\r\n\t\t\t\t\tpadding-right:25px;\r\n\t\t\t\t}\r\n\r\n\t\t\t\t&:hover{\r\n\t\t\t\t\tcursor:pointer;\r\n\t\t\t\t\tbackground-color:darken($headerBackgroundColor, 10%);\r\n\t\t\t\t}\r\n\r\n\t\t\t\t&[aria-sort=\"none\"]{\r\n\t\t\t\t\t.tabulator-col-content .tabulator-arrow{\r\n\t\t\t\t\t\tborder-top: none;\r\n\t\t\t\t\t\tborder-bottom: 6px solid $sortArrowInactive;\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\r\n\t\t\t\t&[aria-sort=\"asc\"]{\r\n\t\t\t\t\t.tabulator-col-content .tabulator-arrow{\r\n\t\t\t\t\t\tborder-top: none;\r\n\t\t\t\t\t\tborder-bottom: 6px solid $sortArrowActive;\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\r\n\t\t\t\t&[aria-sort=\"desc\"]{\r\n\t\t\t\t\t.tabulator-col-content .tabulator-arrow{\r\n\t\t\t\t\t\tborder-top: 6px solid $sortArrowActive;\r\n\t\t\t\t\t\tborder-bottom: none;\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t\t&.tabulator-col-vertical{\r\n\t\t\t\t.tabulator-col-content{\r\n\t\t\t\t\t.tabulator-col-title{\r\n\t\t\t\t\t\twriting-mode: vertical-rl;\r\n\t\t\t\t\t\ttext-orientation: mixed;\r\n\r\n\t\t\t\t\t\tdisplay:flex;\r\n\t\t\t\t\t\talign-items:center;\r\n\t\t\t\t\t\tjustify-content:center;\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\r\n\t\t\t\t&.tabulator-col-vertical-flip{\r\n\t\t\t\t\t.tabulator-col-title{\r\n\t\t\t\t\t\ttransform: rotate(180deg);\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\r\n\t\t\t\t&.tabulator-sortable{\r\n\t\t\t\t\t.tabulator-col-title{\r\n\t\t\t\t\t\tpadding-right:0;\r\n\t\t\t\t\t\tpadding-top:20px;\r\n\t\t\t\t\t}\r\n\r\n\t\t\t\t\t&.tabulator-col-vertical-flip{\r\n\t\t\t\t\t\t.tabulator-col-title{\r\n\t\t\t\t\t\t\tpadding-right:0;\r\n\t\t\t\t\t\t\tpadding-bottom:20px;\r\n\t\t\t\t\t\t}\r\n\r\n\t\t\t\t\t}\r\n\r\n\t\t\t\t\t.tabulator-arrow{\r\n\t\t\t\t\t\tright:calc(50% - 6px);\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t}\r\n\r\n\t\t.tabulator-frozen{\r\n\t\t\tdisplay: inline-block;\r\n\t\t\tposition: absolute;\r\n\r\n\t\t\t// background-color: inherit;\r\n\r\n\t\t\tz-index: 10;\r\n\r\n\t\t\t&.tabulator-frozen-left{\r\n\t\t\t\tborder-right:2px solid $rowBorderColor;\r\n\t\t\t}\r\n\r\n\t\t\t&.tabulator-frozen-right{\r\n\t\t\t\tborder-left:2px solid $rowBorderColor;\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\t.tabulator-calcs-holder{\r\n\t\t\tbox-sizing:border-box;\r\n\t\t\tmin-width:400%;\r\n\r\n\t\t\tbackground:lighten($headerBackgroundColor, 10%) !important;\r\n\r\n\t\t\t.tabulator-row{\r\n\t\t\t\tbackground:lighten($headerBackgroundColor, 10%) !important;\r\n\r\n\t\t\t\t.tabulator-col-resize-handle{\r\n\t\t\t\t\tdisplay: none;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t\tborder-top:1px solid $rowBorderColor;\r\n\t\t\t// border-bottom:1px solid $headerBorderColor;\r\n\r\n\t\t\toverflow: hidden;\r\n\t\t}\r\n\r\n\t\t.tabulator-frozen-rows-holder{\r\n\t\t\tmin-width:400%;\r\n\r\n\t\t\t&:empty{\r\n\t\t\t\tdisplay: none;\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\r\n\t//scrolling element to hold table\r\n\t.tabulator-tableHolder{\r\n\t\tposition:relative;\r\n\t\twidth:100%;\r\n\t\twhite-space: nowrap;\r\n\t\toverflow:auto;\r\n\t\t-webkit-overflow-scrolling: touch;\r\n\r\n\t\t&:focus{\r\n\t\t\toutline: none;\r\n\t\t}\r\n\r\n\t\t//default placeholder element\r\n\t\t.tabulator-placeholder{\r\n\t\t\tbox-sizing:border-box;\r\n\t\t\tdisplay: flex;\r\n\t\t\talign-items:center;\r\n\r\n\t\t\t&[tabulator-render-mode=\"virtual\"]{\r\n\t\t\t\tposition: absolute;\r\n\t\t\t\ttop:0;\r\n\t\t\t\tleft:0;\r\n\t\t\t\theight:100%;\r\n\t\t\t}\r\n\r\n\t\t\twidth:100%;\r\n\r\n\t\t\tspan{\r\n\t\t\t\tdisplay: inline-block;\r\n\r\n\t\t\t\tmargin:0 auto;\r\n\t\t\t\tpadding:10px;\r\n\r\n\t\t\t\tcolor:$headerSeperatorColor;\r\n\t\t\t\tfont-weight: bold;\r\n\t\t\t\tfont-size: 20px;\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\t//element to hold table rows\r\n\t\t.tabulator-table{\r\n\t\t\tposition:relative;\r\n\t\t\tdisplay:inline-block;\r\n\t\t\tbackground-color:$rowBackgroundColor;\r\n\t\t\twhite-space: nowrap;\r\n\t\t\toverflow:visible;\r\n\t\t\tcolor:$rowTextColor;\r\n\r\n\t\t\t.tabulator-row{\r\n\t\t\t\t&.tabulator-calcs{\r\n\t\t\t\t\tfont-weight: bold;\r\n\t\t\t\t\tbackground:lighten($headerBackgroundColor, 15%) !important;\r\n\t\t\t\t\tcolor:$headerTextColor;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\r\n\r\n\t//footer element\r\n\t.tabulator-footer{\r\n\t\tpadding:5px 10px;\r\n\t\tpadding-top:8px;\r\n\t\tborder-top:3px solid $footerSeperatorColor;\r\n\t\tbackground-color: $footerBackgroundColor;\r\n\t\ttext-align:right;\r\n\t\tcolor: $footerTextColor;\r\n\t\tfont-weight:bold;\r\n\t\twhite-space:nowrap;\r\n\t\tuser-select:none;\r\n\r\n\t\t-moz-user-select: none;\r\n\t\t-khtml-user-select: none;\r\n\t\t-webkit-user-select: none;\r\n\t\t-o-user-select: none;\r\n\r\n\t\t.tabulator-calcs-holder{\r\n\t\t\tbox-sizing:border-box;\r\n\t\t\twidth:calc(100% + 20px);\r\n\t\t\tmargin:-8px -10px 8px -10px;\r\n\r\n\t\t\ttext-align: left;\r\n\r\n\t\t\tbackground:lighten($footerBackgroundColor, 10%) !important;\r\n\r\n\t\t\t.tabulator-row{\r\n\t\t\t\tbackground:lighten($footerBackgroundColor, 10%) !important;\r\n\t\t\t\tcolor:$headerTextColor !important;\r\n\r\n\t\t\t\t.tabulator-col-resize-handle{\r\n\t\t\t\t\tdisplay: none;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t\t// border-top:1px solid $rowBorderColor;\r\n\t\t\tborder-bottom:1px solid $rowBorderColor;\r\n\r\n\t\t\toverflow: hidden;\r\n\r\n\t\t\t&:only-child{\r\n\t\t\t\tmargin-bottom:-5px;\r\n\t\t\t\tborder-bottom:none;\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\t//pagination container element\r\n\t\t.tabulator-pages{\r\n\t\t\tmargin:0 7px;\r\n\t\t}\r\n\r\n\t\t//pagination button\r\n\t\t.tabulator-page{\r\n\t\t\tdisplay:inline-block;\r\n\r\n\t\t\tmargin:0 2px;\r\n\t\t\tpadding:2px 5px;\r\n\r\n\t\t\tborder:1px solid $footerBorderColor;\r\n\t\t\tborder-radius:3px;\r\n\r\n\t\t\tbackground:#fff;\r\n\r\n\t\t\tcolor: $footerTextColor;\r\n\t\t\tfont-family:inherit;\r\n\t\t\tfont-weight:inherit;\r\n\t\t\tfont-size:inherit;\r\n\r\n\t\t\t&.active{\r\n\t\t\t\tcolor:$footerActiveColor;\r\n\t\t\t}\r\n\r\n\t\t\t&:disabled{\r\n\t\t\t\topacity:.5;\r\n\t\t\t}\r\n\r\n\t\t\t&:not(.disabled){\r\n\t\t\t\t&:hover{\r\n\t\t\t\t\tcursor:pointer;\r\n\t\t\t\t\tbackground:rgba(0,0,0,.2);\r\n\t\t\t\t\tcolor:#fff;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\r\n\t//column resize handles\r\n\t.tabulator-col-resize-handle{\r\n\t\tposition:absolute;\r\n\t\tright:0;\r\n\t\ttop:0;\r\n\t\tbottom:0;\r\n\t\twidth:5px;\r\n\r\n\t\t&.prev{\r\n\t\t\tleft:0;\r\n\t\t\tright:auto;\r\n\t\t}\r\n\r\n\t\t&:hover{\r\n\t\t\tcursor:ew-resize;\r\n\t\t}\r\n\t}\r\n\r\n\r\n\t//holding div that contains loader and covers tabulator element to prevent interaction\r\n\t.tabulator-loader{\r\n\t\tposition:absolute;\r\n\t\tdisplay: flex;\r\n\t\talign-items:center;\r\n\r\n\t\ttop:0;\r\n\t\tleft:0;\r\n\t\tz-index:100;\r\n\r\n\t\theight:100%;\r\n\t\twidth:100%;\r\n\t\tbackground:rgba(0,0,0,.4);\r\n\t\ttext-align:center;\r\n\r\n\t\t//loading message element\r\n\t\t.tabulator-loader-msg{\r\n\t\t\tdisplay:inline-block;\r\n\r\n\t\t\tmargin:0 auto;\r\n\t\t\tpadding:10px 20px;\r\n\r\n\t\t\tborder-radius:10px;\r\n\r\n\t\t\tbackground:#fff;\r\n\t\t\tfont-weight:bold;\r\n\t\t\tfont-size:16px;\r\n\r\n\t\t\t//loading message\r\n\t\t\t&.tabulator-loading{\r\n\t\t\t\tborder:4px solid #333;\r\n\t\t\t\tcolor:#000;\r\n\t\t\t}\r\n\r\n\t\t\t//error message\r\n\t\t\t&.tabulator-error{\r\n\t\t\t\tborder:4px solid #D00;\r\n\t\t\t\tcolor:#590000;\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n}\r\n\r\n//row element\r\n.tabulator-row{\r\n\tposition: relative;\r\n\tbox-sizing: border-box;\r\n\tmin-height:$textSize + ($headerMargin * 2);\r\n\tbackground-color: $rowBackgroundColor;\r\n\r\n\r\n\t&.tabulator-row-even{\r\n\t\tbackground-color: $rowAltBackgroundColor;\r\n\t}\r\n\r\n\t&.tabulator-selectable:hover{\r\n\t\tbackground-color:$rowHoverBackground;\r\n\t\tcursor: pointer;\r\n\t}\r\n\r\n\t&.tabulator-selected{\r\n\t\tbackground-color:$rowSelectedBackground;\r\n\t}\r\n\r\n\t&.tabulator-selected:hover{\r\n\t\tbackground-color:$rowSelectedBackgroundHover;\r\n\t\tcursor: pointer;\r\n\t}\r\n\r\n\t&.tabulator-row-moving{\r\n\t\tborder:1px solid #000;\r\n\t\tbackground:#fff;\r\n\t}\r\n\r\n\t&.tabulator-moving{\r\n\t\tposition: absolute;\r\n\r\n\t\tborder-top:1px solid $rowBorderColor;\r\n\t\tborder-bottom:1px solid $rowBorderColor;\r\n\r\n\t\tpointer-events: none !important;\r\n\t\tz-index:15;\r\n\t}\r\n\r\n\t//row resize handles\r\n\t.tabulator-row-resize-handle{\r\n\t\tposition:absolute;\r\n\t\tright:0;\r\n\t\tbottom:0;\r\n\t\tleft:0;\r\n\t\theight:5px;\r\n\r\n\t\t&.prev{\r\n\t\t\ttop:0;\r\n\t\t\tbottom:auto;\r\n\t\t}\r\n\r\n\t\t&:hover{\r\n\t\t\tcursor:ns-resize;\r\n\t\t}\r\n\t}\r\n\r\n\t.tabulator-frozen{\r\n\t\tdisplay: inline-block;\r\n\t\tposition: absolute;\r\n\r\n\t\tbackground-color: inherit;\r\n\r\n\t\tz-index: 10;\r\n\r\n\t\t&.tabulator-frozen-left{\r\n\t\t\tborder-right:2px solid $rowBorderColor;\r\n\t\t}\r\n\r\n\t\t&.tabulator-frozen-right{\r\n\t\t\tborder-left:2px solid $rowBorderColor;\r\n\t\t}\r\n\t}\r\n\r\n\t.tabulator-responsive-collapse{\r\n\t\tbox-sizing:border-box;\r\n\r\n\t\tpadding:5px;\r\n\r\n\t\tborder-top:1px solid $rowBorderColor;\r\n\t\tborder-bottom:1px solid $rowBorderColor;\r\n\r\n\t\t&:empty{\r\n\t\t\tdisplay:none;\r\n\t\t}\r\n\r\n\t\ttable{\r\n\t\t\tfont-size:$textSize;\r\n\r\n\t\t\ttr{\r\n\t\t\t\ttd{\r\n\t\t\t\t\tposition: relative;\r\n\r\n\t\t\t\t\t&:first-of-type{\r\n\t\t\t\t\t\tpadding-right:10px;\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\r\n\t//cell element\r\n\t.tabulator-cell{\r\n\t\tdisplay:inline-block;\r\n\t\tposition: relative;\r\n\t\tbox-sizing:border-box;\r\n\t\tpadding:6px;\r\n\t\tborder-right:1px solid $rowBorderColor;\r\n\t\tvertical-align:middle;\r\n\t\twhite-space:nowrap;\r\n\t\toverflow:hidden;\r\n\t\ttext-overflow:ellipsis;\r\n\r\n\r\n\t\t&.tabulator-editing{\r\n\t\t\tborder:1px solid $editBoxColor;\r\n\t\t\tpadding: 0;\r\n\r\n\t\t\tinput, select{\r\n\t\t\t\tborder:1px;\r\n\t\t\t\tbackground:transparent;\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\t&.tabulator-validation-fail{\r\n\t\t\tborder:1px solid $errorColor;\r\n\t\t\tinput, select{\r\n\t\t\t\tborder:1px;\r\n\t\t\t\tbackground:transparent;\r\n\r\n\t\t\t\tcolor: $errorColor;\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\t//hide left resize handle on first column\r\n\t\t&:first-child{\r\n\t\t\t.tabulator-col-resize-handle.prev{\r\n\t\t\t\tdisplay: none;\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\t//movable row handle\r\n\t\t&.tabulator-row-handle{\r\n\r\n\t\t\tdisplay: inline-flex;\r\n\t\t\talign-items:center;\r\n\r\n\t\t\t-moz-user-select: none;\r\n\t\t\t-khtml-user-select: none;\r\n\t\t\t-webkit-user-select: none;\r\n\t\t\t-o-user-select: none;\r\n\r\n\t\t\t//handle holder\r\n\t\t\t.tabulator-row-handle-box{\r\n\t\t\t\twidth:80%;\r\n\r\n\t\t\t\t//Hamburger element\r\n\t\t\t\t.tabulator-row-handle-bar{\r\n\t\t\t\t\twidth:100%;\r\n\t\t\t\t\theight:3px;\r\n\t\t\t\t\tmargin-top:2px;\r\n\t\t\t\t\tbackground:$sortArrowActive;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\t.tabulator-data-tree-branch{\r\n\t\t\tdisplay:inline-block;\r\n\t\t\tvertical-align:middle;\r\n\r\n\t\t\theight:9px;\r\n\t\t\twidth:7px;\r\n\r\n\t\t\tmargin-top:-9px;\r\n\t\t\tmargin-right:5px;\r\n\r\n\t\t\tborder-bottom-left-radius:1px;\r\n\r\n\t\t\tborder-left:2px solid $rowBorderColor;\r\n\t\t\tborder-bottom:2px solid $rowBorderColor;\r\n\t\t}\r\n\r\n\t\t.tabulator-data-tree-control{\r\n\r\n\t\t\tdisplay:inline-flex;\r\n\t\t\tjustify-content:center;\r\n\t\t\talign-items:center;\r\n\t\t\tvertical-align:middle;\r\n\r\n\t\t\theight:11px;\r\n\t\t\twidth:11px;\r\n\r\n\t\t\tmargin-right:5px;\r\n\r\n\t\t\tborder:1px solid $rowTextColor;\r\n\t\t\tborder-radius:2px;\r\n\t\t\tbackground:rgba(0, 0, 0, .1);\r\n\r\n\t\t\toverflow:hidden;\r\n\r\n\t\t\t&:hover{\r\n\t\t\t\tcursor:pointer;\r\n\t\t\t\tbackground:rgba(0, 0, 0, .2);\r\n\t\t\t}\r\n\r\n\t\t\t.tabulator-data-tree-control-collapse{\r\n\t\t\t\tdisplay:inline-block;\r\n\t\t\t\tposition: relative;\r\n\r\n\t\t\t\theight: 7px;\r\n\t\t\t\twidth: 1px;\r\n\r\n\t\t\t\tbackground: transparent;\r\n\r\n\t\t\t\t&:after {\r\n\t\t\t\t\tposition: absolute;\r\n\t\t\t\t\tcontent: \"\";\r\n\t\t\t\t\tleft: -3px;\r\n\t\t\t\t\ttop: 3px;\r\n\r\n\t\t\t\t\theight: 1px;\r\n\t\t\t\t\twidth: 7px;\r\n\r\n\t\t\t\t\tbackground: $rowTextColor;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t\t.tabulator-data-tree-control-expand{\r\n\t\t\t\tdisplay:inline-block;\r\n\t\t\t\tposition: relative;\r\n\r\n\t\t\t\theight: 7px;\r\n\t\t\t\twidth: 1px;\r\n\r\n\t\t\t\tbackground: $rowTextColor;\r\n\r\n\t\t\t\t&:after {\r\n\t\t\t\t\tposition: absolute;\r\n\t\t\t\t\tcontent: \"\";\r\n\t\t\t\t\tleft: -3px;\r\n\t\t\t\t\ttop: 3px;\r\n\r\n\t\t\t\t\theight: 1px;\r\n\t\t\t\t\twidth: 7px;\r\n\r\n\t\t\t\t\tbackground: $rowTextColor;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t}\r\n\r\n\t\t.tabulator-responsive-collapse-toggle{\r\n\t\t\tdisplay: inline-flex;\r\n\t\t\talign-items:center;\r\n\t\t\tjustify-content:center;\r\n\r\n\t\t\t-moz-user-select: none;\r\n\t\t\t-khtml-user-select: none;\r\n\t\t\t-webkit-user-select: none;\r\n\t\t\t-o-user-select: none;\r\n\r\n\t\t\theight:15px;\r\n\t\t\twidth:15px;\r\n\r\n\t\t\tborder-radius:20px;\r\n\t\t\tbackground:#666;\r\n\r\n\t\t\tcolor:$rowBackgroundColor;\r\n\t\t\tfont-weight:bold;\r\n\t\t\tfont-size:1.1em;\r\n\r\n\t\t\t&:hover{\r\n\t\t\t\topacity:.7;\r\n\t\t\t}\r\n\r\n\t\t\t&.open{\r\n\t\t\t\t.tabulator-responsive-collapse-toggle-close{\r\n\t\t\t\t\tdisplay:initial;\r\n\t\t\t\t}\r\n\r\n\t\t\t\t.tabulator-responsive-collapse-toggle-open{\r\n\t\t\t\t\tdisplay:none;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t\t.tabulator-responsive-collapse-toggle-close{\r\n\t\t\t\tdisplay:none;\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\r\n\t//row grouping element\r\n\t&.tabulator-group{\r\n\t\tbox-sizing:border-box;\r\n\t\tborder-right:1px solid $rowBorderColor;\r\n\t\tborder-top:1px solid #000;\r\n\t\tborder-bottom:2px solid $headerSeperatorColor;\r\n\t\tpadding:5px;\r\n\t\tpadding-left:10px;\r\n\t\tbackground:$headerBackgroundColor;\r\n\t\tcolor:$headerTextColor;\r\n\t\tfont-weight:bold;\r\n\r\n\t\tmin-width: 100%;\r\n\r\n\t\t&:hover{\r\n\t\t\tcursor:pointer;\r\n\t\t\tbackground-color:darken($headerBackgroundColor, 10%);\r\n\t\t}\r\n\r\n\t\t&.tabulator-group-visible{\r\n\t\t\t.tabulator-arrow{\r\n\t\t\t\tmargin-right:10px;\r\n\t\t\t\tborder-left: 6px solid transparent;\r\n\t\t\t\tborder-right: 6px solid transparent;\r\n\t\t\t\tborder-top: 6px solid $sortArrowActive;\r\n\t\t\t\tborder-bottom: 0;\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\t&.tabulator-group-level-1{\r\n\t\t\t.tabulator-arrow{\r\n\t\t\t\tmargin-left:20px;\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\t&.tabulator-group-level-2{\r\n\t\t\t.tabulator-arrow{\r\n\t\t\t\tmargin-left:40px;\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\t&.tabulator-group-level-3{\r\n\t\t\t.tabulator-arrow{\r\n\t\t\t\tmargin-left:60px;\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\t&.tabulator-group-level-4{\r\n\t\t\t.tabulator-arrow{\r\n\t\t\t\tmargin-left:80px;\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\t&.tabulator-group-level-5{\r\n\t\t\t.tabulator-arrow{\r\n\t\t\t\tmargin-left:100px;\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\t//sorting arrow\r\n\t\t.tabulator-arrow{\r\n\t\t\tdisplay: inline-block;\r\n\t\t\twidth: 0;\r\n\t\t\theight: 0;\r\n\t\t\tmargin-right:16px;\r\n\t\t\tborder-top: 6px solid transparent;\r\n\t\t\tborder-bottom: 6px solid transparent;\r\n\t\t\tborder-right: 0;\r\n\t\t\tborder-left: 6px solid $sortArrowActive;\r\n\t\t\tvertical-align:middle;\r\n\t\t}\r\n\r\n\t\tspan{\r\n\t\t\tmargin-left:10px;\r\n\t\t\tcolor:$headerSeperatorColor;\r\n\t\t}\r\n\t}\r\n\r\n}\r\n\r\n.tabulator-edit-select-list{\r\n\tposition: absolute;\r\n\tdisplay:inline-block;\r\n\tbox-sizing:border-box;\r\n\r\n\tmax-height:200px;\r\n\r\n\tbackground:$rowBackgroundColor;\r\n\tborder:1px solid $rowBorderColor;\r\n\r\n\tfont-size:$textSize;\r\n\r\n\toverflow-y:auto;\r\n\t-webkit-overflow-scrolling: touch;\r\n\r\n\tz-index: 10000;\r\n\r\n\t.tabulator-edit-select-list-item{\r\n\t\tpadding:4px;\r\n\r\n\t\tcolor:$rowTextColor;\r\n\r\n\t\t&.active{\r\n\t\t\tcolor:$rowBackgroundColor;\r\n\t\t\tbackground:$editBoxColor;\r\n\t\t}\r\n\r\n\t\t&:hover{\r\n\t\t\tcursor:pointer;\r\n\r\n\t\t\tcolor:$rowBackgroundColor;\r\n\t\t\tbackground:$editBoxColor;\r\n\t\t}\r\n\t}\r\n\r\n\t.tabulator-edit-select-list-group{\r\n\t\tborder-bottom:1px solid $rowBorderColor;\r\n\r\n\t\tpadding:4px;\r\n\t\tpadding-top:6px;\r\n\r\n\t\tcolor:$rowTextColor;\r\n\t\tfont-weight:bold;\r\n\t}\r\n}"]} \ No newline at end of file diff --git a/Gems/AssetMemoryAnalyzer/External/tabulator-master/dist/js/jquery_wrapper.js b/Gems/AssetMemoryAnalyzer/External/tabulator-master/dist/js/jquery_wrapper.js deleted file mode 100644 index cd36e31085..0000000000 --- a/Gems/AssetMemoryAnalyzer/External/tabulator-master/dist/js/jquery_wrapper.js +++ /dev/null @@ -1,46 +0,0 @@ -/* Tabulator v4.1.2 (c) Oliver Folkerd */ - -/* - * This file is part of the Tabulator package. - * - * (c) Oliver Folkerd - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - * - * Full Documentation & Demos can be found at: http://olifolkerd.github.io/tabulator/ - * - */ - -(function (factory) { - "use strict"; - - if (typeof define === 'function' && define.amd) { - define(['jquery'], factory); - } else if (typeof module !== 'undefined' && module.exports) { - module.exports = factory(require('jquery')); - } else { - factory(jQuery); - } -})(function ($, undefined) { - $.widget("ui.tabulator", { - _create: function _create() { - this.table = new Tabulator(this.element[0], this.options); - - //map tabulator functions to jquery wrapper - for (var key in Tabulator.prototype) { - if (typeof Tabulator.prototype[key] === "function" && key.charAt(0) !== "_") { - this[key] = this.table[key].bind(this.table); - } - } - }, - - _setOption: function _setOption(option, value) { - console.error("Tabulator jQuery wrapper does not support setting options after the table has been instantiated"); - }, - - _destroy: function _destroy(option, value) { - this.table.destroy(); - } - }); -}); \ No newline at end of file diff --git a/Gems/AssetMemoryAnalyzer/External/tabulator-master/dist/js/jquery_wrapper.min.js b/Gems/AssetMemoryAnalyzer/External/tabulator-master/dist/js/jquery_wrapper.min.js deleted file mode 100644 index 1d9922b9b5..0000000000 --- a/Gems/AssetMemoryAnalyzer/External/tabulator-master/dist/js/jquery_wrapper.min.js +++ /dev/null @@ -1,2 +0,0 @@ -/* Tabulator v4.1.2 (c) Oliver Folkerd */ -!function(t){"use strict";"function"==typeof define&&define.amd?define(["jquery"],t):"undefined"!=typeof module&&module.exports?module.exports=t(require("jquery")):t(jQuery)}(function(t,e){t.widget("ui.tabulator",{_create:function(){this.table=new Tabulator(this.element[0],this.options);for(var t in Tabulator.prototype)"function"==typeof Tabulator.prototype[t]&&"_"!==t.charAt(0)&&(this[t]=this.table[t].bind(this.table))},_setOption:function(t,e){console.error("Tabulator jQuery wrapper does not support setting options after the table has been instantiated")},_destroy:function(t,e){this.table.destroy()}})}); \ No newline at end of file diff --git a/Gems/AssetMemoryAnalyzer/External/tabulator-master/dist/js/modules/accessor.js b/Gems/AssetMemoryAnalyzer/External/tabulator-master/dist/js/modules/accessor.js deleted file mode 100644 index 24899b54e3..0000000000 --- a/Gems/AssetMemoryAnalyzer/External/tabulator-master/dist/js/modules/accessor.js +++ /dev/null @@ -1,91 +0,0 @@ -var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol" ? function (obj) { return typeof obj; } : function (obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; - -/* Tabulator v4.1.2 (c) Oliver Folkerd */ - -var Accessor = function Accessor(table) { - this.table = table; //hold Tabulator object - this.allowedTypes = ["", "data", "download", "clipboard"]; //list of accessor types -}; - -//initialize column accessor -Accessor.prototype.initializeColumn = function (column) { - var self = this, - match = false, - config = {}; - - this.allowedTypes.forEach(function (type) { - var key = "accessor" + (type.charAt(0).toUpperCase() + type.slice(1)), - accessor; - - if (column.definition[key]) { - accessor = self.lookupAccessor(column.definition[key]); - - if (accessor) { - match = true; - - config[key] = { - accessor: accessor, - params: column.definition[key + "Params"] || {} - }; - } - } - }); - - if (match) { - column.modules.accessor = config; - } -}, Accessor.prototype.lookupAccessor = function (value) { - var accessor = false; - - //set column accessor - switch (typeof value === "undefined" ? "undefined" : _typeof(value)) { - case "string": - if (this.accessors[value]) { - accessor = this.accessors[value]; - } else { - console.warn("Accessor Error - No such accessor found, ignoring: ", value); - } - break; - - case "function": - accessor = value; - break; - } - - return accessor; -}; - -//apply accessor to row -Accessor.prototype.transformRow = function (dataIn, type) { - var self = this, - key = "accessor" + (type.charAt(0).toUpperCase() + type.slice(1)); - - //clone data object with deep copy to isolate internal data from returned result - var data = Tabulator.prototype.helpers.deepClone(dataIn || {}); - - self.table.columnManager.traverse(function (column) { - var value, accessor, params, component; - - if (column.modules.accessor) { - - accessor = column.modules.accessor[key] || column.modules.accessor.accessor || false; - - if (accessor) { - value = column.getFieldValue(data); - - if (value != "undefined") { - component = column.getComponent(); - params = typeof accessor.params === "function" ? accessor.params(value, data, type, component) : accessor.params; - column.setFieldValue(data, accessor.accessor(value, data, type, params, component)); - } - } - } - }); - - return data; -}, - -//default accessors -Accessor.prototype.accessors = {}; - -Tabulator.prototype.registerModule("accessor", Accessor); \ No newline at end of file diff --git a/Gems/AssetMemoryAnalyzer/External/tabulator-master/dist/js/modules/accessor.min.js b/Gems/AssetMemoryAnalyzer/External/tabulator-master/dist/js/modules/accessor.min.js deleted file mode 100644 index f09aa24560..0000000000 --- a/Gems/AssetMemoryAnalyzer/External/tabulator-master/dist/js/modules/accessor.min.js +++ /dev/null @@ -1,2 +0,0 @@ -/* Tabulator v4.1.2 (c) Oliver Folkerd */ -var _typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(o){return typeof o}:function(o){return o&&"function"==typeof Symbol&&o.constructor===Symbol&&o!==Symbol.prototype?"symbol":typeof o},Accessor=function(o){this.table=o,this.allowedTypes=["","data","download","clipboard"]};Accessor.prototype.initializeColumn=function(o){var e=this,s=!1,r={};this.allowedTypes.forEach(function(c){var t,a="accessor"+(c.charAt(0).toUpperCase()+c.slice(1));o.definition[a]&&(t=e.lookupAccessor(o.definition[a]))&&(s=!0,r[a]={accessor:t,params:o.definition[a+"Params"]||{}})}),s&&(o.modules.accessor=r)},Accessor.prototype.lookupAccessor=function(o){var e=!1;switch(void 0===o?"undefined":_typeof(o)){case"string":this.accessors[o]?e=this.accessors[o]:console.warn("Accessor Error - No such accessor found, ignoring: ",o);break;case"function":e=o}return e},Accessor.prototype.transformRow=function(o,e){var s=this,r="accessor"+(e.charAt(0).toUpperCase()+e.slice(1)),c=Tabulator.prototype.helpers.deepClone(o||{});return s.table.columnManager.traverse(function(o){var s,t,a,n;o.modules.accessor&&(t=o.modules.accessor[r]||o.modules.accessor.accessor||!1)&&"undefined"!=(s=o.getFieldValue(c))&&(n=o.getComponent(),a="function"==typeof t.params?t.params(s,c,e,n):t.params,o.setFieldValue(c,t.accessor(s,c,e,a,n)))}),c},Accessor.prototype.accessors={},Tabulator.prototype.registerModule("accessor",Accessor); \ No newline at end of file diff --git a/Gems/AssetMemoryAnalyzer/External/tabulator-master/dist/js/modules/ajax.js b/Gems/AssetMemoryAnalyzer/External/tabulator-master/dist/js/modules/ajax.js deleted file mode 100644 index 692b4418c8..0000000000 --- a/Gems/AssetMemoryAnalyzer/External/tabulator-master/dist/js/modules/ajax.js +++ /dev/null @@ -1,429 +0,0 @@ -var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol" ? function (obj) { return typeof obj; } : function (obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; - -/* Tabulator v4.1.2 (c) Oliver Folkerd */ - -var Ajax = function Ajax(table) { - - this.table = table; //hold Tabulator object - this.config = false; //hold config object for ajax request - this.url = ""; //request URL - this.urlGenerator = false; - this.params = false; //request parameters - - this.loaderElement = this.createLoaderElement(); //loader message div - this.msgElement = this.createMsgElement(); //message element - this.loadingElement = false; - this.errorElement = false; - this.loaderPromise = false; - - this.progressiveLoad = false; - this.loading = false; - - this.requestOrder = 0; //prevent requests comming out of sequence if overridden by another load request -}; - -//initialize setup options -Ajax.prototype.initialize = function () { - this.loaderElement.appendChild(this.msgElement); - - if (this.table.options.ajaxLoaderLoading) { - this.loadingElement = this.table.options.ajaxLoaderLoading; - } - - this.loaderPromise = this.table.options.ajaxRequestFunc || this.defaultLoaderPromise; - - this.urlGenerator = this.table.options.ajaxURLGenerator || this.defaultURLGenerator; - - if (this.table.options.ajaxLoaderError) { - this.errorElement = this.table.options.ajaxLoaderError; - } - - if (this.table.options.ajaxParams) { - this.setParams(this.table.options.ajaxParams); - } - - if (this.table.options.ajaxConfig) { - this.setConfig(this.table.options.ajaxConfig); - } - - if (this.table.options.ajaxURL) { - this.setUrl(this.table.options.ajaxURL); - } - - if (this.table.options.ajaxProgressiveLoad) { - if (this.table.options.pagination) { - this.progressiveLoad = false; - console.error("Progressive Load Error - Pagination and progressive load cannot be used at the same time"); - } else { - if (this.table.modExists("page")) { - this.progressiveLoad = this.table.options.ajaxProgressiveLoad; - this.table.modules.page.initializeProgressive(this.progressiveLoad); - } else { - console.error("Pagination plugin is required for progressive ajax loading"); - } - } - } -}; - -Ajax.prototype.createLoaderElement = function () { - var el = document.createElement("div"); - el.classList.add("tabulator-loader"); - return el; -}; - -Ajax.prototype.createMsgElement = function () { - var el = document.createElement("div"); - - el.classList.add("tabulator-loader-msg"); - el.setAttribute("role", "alert"); - - return el; -}; - -//set ajax params -Ajax.prototype.setParams = function (params, update) { - if (update) { - this.params = this.params || {}; - - for (var key in params) { - this.params[key] = params[key]; - } - } else { - this.params = params; - } -}; - -Ajax.prototype.getParams = function () { - return this.params || {}; -}; - -//load config object -Ajax.prototype.setConfig = function (config) { - this._loadDefaultConfig(); - - if (typeof config == "string") { - this.config.method = config; - } else { - for (var key in config) { - this.config[key] = config[key]; - } - } -}; - -//create config object from default -Ajax.prototype._loadDefaultConfig = function (force) { - var self = this; - if (!self.config || force) { - - self.config = {}; - - //load base config from defaults - for (var key in self.defaultConfig) { - self.config[key] = self.defaultConfig[key]; - } - } -}; - -//set request url -Ajax.prototype.setUrl = function (url) { - this.url = url; -}; - -//get request url -Ajax.prototype.getUrl = function () { - return this.url; -}; - -//lstandard loading function -Ajax.prototype.loadData = function (inPosition) { - var self = this; - - if (this.progressiveLoad) { - return this._loadDataProgressive(); - } else { - return this._loadDataStandard(inPosition); - } -}; - -Ajax.prototype.nextPage = function (diff) { - var margin; - - if (!this.loading) { - - margin = this.table.options.ajaxProgressiveLoadScrollMargin || this.table.rowManager.getElement().clientHeight * 2; - - if (diff < margin) { - this.table.modules.page.nextPage().then(function () {}).catch(function () {}); - } - } -}; - -Ajax.prototype.blockActiveRequest = function () { - this.requestOrder++; -}; - -Ajax.prototype._loadDataProgressive = function () { - this.table.rowManager.setData([]); - return this.table.modules.page.setPage(1); -}; - -Ajax.prototype._loadDataStandard = function (inPosition) { - var _this = this; - - return new Promise(function (resolve, reject) { - _this.sendRequest(inPosition).then(function (data) { - _this.table.rowManager.setData(data, inPosition); - resolve(); - }).catch(function (e) { - reject(); - }); - }); -}; - -Ajax.prototype.generateParamsList = function (data, prefix) { - var self = this, - output = []; - - prefix = prefix || ""; - - if (Array.isArray(data)) { - data.forEach(function (item, i) { - output = output.concat(self.generateParamsList(item, prefix ? prefix + "[" + i + "]" : i)); - }); - } else if ((typeof data === "undefined" ? "undefined" : _typeof(data)) === "object") { - for (var key in data) { - output = output.concat(self.generateParamsList(data[key], prefix ? prefix + "[" + key + "]" : key)); - } - } else { - output.push({ key: prefix, value: data }); - } - - return output; -}; - -Ajax.prototype.serializeParams = function (params) { - var output = this.generateParamsList(params), - encoded = []; - - output.forEach(function (item) { - encoded.push(encodeURIComponent(item.key) + "=" + encodeURIComponent(item.value)); - }); - - return encoded.join("&"); -}; - -//send ajax request -Ajax.prototype.sendRequest = function (silent) { - var _this2 = this; - - var self = this, - url = self.url, - requestNo, - esc, - query; - - self.requestOrder++; - requestNo = self.requestOrder; - - self._loadDefaultConfig(); - - return new Promise(function (resolve, reject) { - if (self.table.options.ajaxRequesting.call(_this2.table, self.url, self.params) !== false) { - - self.loading = true; - - if (!silent) { - self.showLoader(); - } - - _this2.loaderPromise(url, self.config, self.params).then(function (data) { - if (requestNo === self.requestOrder) { - if (self.table.options.ajaxResponse) { - data = self.table.options.ajaxResponse.call(self.table, self.url, self.params, data); - } - resolve(data); - } else { - console.warn("Ajax Response Blocked - An active ajax request was blocked by an attempt to change table data while the request was being made"); - } - - self.hideLoader(); - - self.loading = false; - }).catch(function (error) { - console.error("Ajax Load Error: ", error); - self.table.options.ajaxError.call(self.table, error); - - self.showError(); - - setTimeout(function () { - self.hideLoader(); - }, 3000); - - self.loading = false; - - reject(); - }); - } else { - reject(); - } - }); -}; - -Ajax.prototype.showLoader = function () { - var shouldLoad = typeof this.table.options.ajaxLoader === "function" ? this.table.options.ajaxLoader() : this.table.options.ajaxLoader; - - if (shouldLoad) { - - this.hideLoader(); - - while (this.msgElement.firstChild) { - this.msgElement.removeChild(this.msgElement.firstChild); - }this.msgElement.classList.remove("tabulator-error"); - this.msgElement.classList.add("tabulator-loading"); - - if (this.loadingElement) { - this.msgElement.appendChild(this.loadingElement); - } else { - this.msgElement.innerHTML = this.table.modules.localize.getText("ajax|loading"); - } - - this.table.element.appendChild(this.loaderElement); - } -}; - -Ajax.prototype.showError = function () { - this.hideLoader(); - - while (this.msgElement.firstChild) { - this.msgElement.removeChild(this.msgElement.firstChild); - }this.msgElement.classList.remove("tabulator-loading"); - this.msgElement.classList.add("tabulator-error"); - - if (this.errorElement) { - this.msgElement.appendChild(this.errorElement); - } else { - this.msgElement.innerHTML = this.table.modules.localize.getText("ajax|error"); - } - - this.table.element.appendChild(this.loaderElement); -}; - -Ajax.prototype.hideLoader = function () { - if (this.loaderElement.parentNode) { - this.loaderElement.parentNode.removeChild(this.loaderElement); - } -}; - -//default ajax config object -Ajax.prototype.defaultConfig = { - method: "GET" -}; - -Ajax.prototype.defaultURLGenerator = function (url, config, params) { - if (params && Object.keys(params).length) { - if (!config.method || config.method.toLowerCase() == "get") { - config.method = "get"; - url += "?" + this.serializeParams(params); - } - } - - return url; -}; - -Ajax.prototype.defaultLoaderPromise = function (url, config, params) { - var self = this, - contentType; - - return new Promise(function (resolve, reject) { - - //set url - url = self.urlGenerator(url, config, params); - - //set body content if not GET request - if (config.method != "get") { - contentType = _typeof(self.table.options.ajaxContentType) === "object" ? self.table.options.ajaxContentType : self.contentTypeFormatters[self.table.options.ajaxContentType]; - if (contentType) { - - for (var key in contentType.headers) { - if (!config.headers) { - config.headers = {}; - } - - if (typeof config.headers[key] === "undefined") { - config.headers[key] = contentType.headers[key]; - } - } - - config.body = contentType.body.call(self, url, config, params); - } else { - console.warn("Ajax Error - Invalid ajaxContentType value:", self.table.options.ajaxContentType); - } - } - - if (url) { - - //configure headers - if (typeof config.credentials === "undefined") { - config.credentials = 'include'; - } - - if (typeof config.headers === "undefined") { - config.headers = {}; - } - - if (typeof config.headers.Accept === "undefined") { - config.headers.Accept = "application/json"; - } - - if (typeof config.headers["X-Requested-With"] === "undefined") { - config.headers["X-Requested-With"] = "XMLHttpRequest"; - } - - //send request - fetch(url, config).then(function (response) { - if (response.ok) { - response.json().then(function (data) { - resolve(data); - }).catch(function (error) { - reject(error); - console.warn("Ajax Load Error - Invalid JSON returned", error); - }); - } else { - console.error("Ajax Load Error - Connection Error: " + response.status, response.statusText); - reject(response); - } - }).catch(function (error) { - console.error("Ajax Load Error - Connection Error: ", error); - reject(error); - }); - } else { - reject("No URL Set"); - } - }); -}; - -Ajax.prototype.contentTypeFormatters = { - "json": { - headers: { - 'Content-Type': 'application/json' - }, - body: function body(url, config, params) { - return JSON.stringify(params); - } - }, - "form": { - headers: {}, - body: function body(url, config, params) { - var output = this.generateParamsList(params), - form = new FormData(); - - output.forEach(function (item) { - form.append(item.key, item.value); - }); - - return form; - } - } -}; - -Tabulator.prototype.registerModule("ajax", Ajax); \ No newline at end of file diff --git a/Gems/AssetMemoryAnalyzer/External/tabulator-master/dist/js/modules/ajax.min.js b/Gems/AssetMemoryAnalyzer/External/tabulator-master/dist/js/modules/ajax.min.js deleted file mode 100644 index 33ba12c9c6..0000000000 --- a/Gems/AssetMemoryAnalyzer/External/tabulator-master/dist/js/modules/ajax.min.js +++ /dev/null @@ -1,2 +0,0 @@ -/* Tabulator v4.1.2 (c) Oliver Folkerd */ -var _typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Ajax=function(e){this.table=e,this.config=!1,this.url="",this.urlGenerator=!1,this.params=!1,this.loaderElement=this.createLoaderElement(),this.msgElement=this.createMsgElement(),this.loadingElement=!1,this.errorElement=!1,this.loaderPromise=!1,this.progressiveLoad=!1,this.loading=!1,this.requestOrder=0};Ajax.prototype.initialize=function(){this.loaderElement.appendChild(this.msgElement),this.table.options.ajaxLoaderLoading&&(this.loadingElement=this.table.options.ajaxLoaderLoading),this.loaderPromise=this.table.options.ajaxRequestFunc||this.defaultLoaderPromise,this.urlGenerator=this.table.options.ajaxURLGenerator||this.defaultURLGenerator,this.table.options.ajaxLoaderError&&(this.errorElement=this.table.options.ajaxLoaderError),this.table.options.ajaxParams&&this.setParams(this.table.options.ajaxParams),this.table.options.ajaxConfig&&this.setConfig(this.table.options.ajaxConfig),this.table.options.ajaxURL&&this.setUrl(this.table.options.ajaxURL),this.table.options.ajaxProgressiveLoad&&(this.table.options.pagination?(this.progressiveLoad=!1,console.error("Progressive Load Error - Pagination and progressive load cannot be used at the same time")):this.table.modExists("page")?(this.progressiveLoad=this.table.options.ajaxProgressiveLoad,this.table.modules.page.initializeProgressive(this.progressiveLoad)):console.error("Pagination plugin is required for progressive ajax loading"))},Ajax.prototype.createLoaderElement=function(){var e=document.createElement("div");return e.classList.add("tabulator-loader"),e},Ajax.prototype.createMsgElement=function(){var e=document.createElement("div");return e.classList.add("tabulator-loader-msg"),e.setAttribute("role","alert"),e},Ajax.prototype.setParams=function(e,t){if(t){this.params=this.params||{};for(var o in e)this.params[o]=e[o]}else this.params=e},Ajax.prototype.getParams=function(){return this.params||{}},Ajax.prototype.setConfig=function(e){if(this._loadDefaultConfig(),"string"==typeof e)this.config.method=e;else for(var t in e)this.config[t]=e[t]},Ajax.prototype._loadDefaultConfig=function(e){var t=this;if(!t.config||e){t.config={};for(var o in t.defaultConfig)t.config[o]=t.defaultConfig[o]}},Ajax.prototype.setUrl=function(e){this.url=e},Ajax.prototype.getUrl=function(){return this.url},Ajax.prototype.loadData=function(e){return this.progressiveLoad?this._loadDataProgressive():this._loadDataStandard(e)},Ajax.prototype.nextPage=function(e){var t;this.loading||(t=this.table.options.ajaxProgressiveLoadScrollMargin||2*this.table.rowManager.getElement().clientHeight,e output || output === null) { - output = value; - } - }); - - return output !== null ? precision !== false ? output.toFixed(precision) : output : ""; - }, - "min": function min(values, data, calcParams) { - var output = null, - precision = typeof calcParams.precision !== "undefined" ? calcParams.precision : false; - - values.forEach(function (value) { - - value = Number(value); - - if (value < output || output === null) { - output = value; - } - }); - - return output !== null ? precision !== false ? output.toFixed(precision) : output : ""; - }, - "sum": function sum(values, data, calcParams) { - var output = 0, - precision = typeof calcParams.precision !== "undefined" ? calcParams.precision : false; - - if (values.length) { - values.forEach(function (value) { - value = Number(value); - - output += !isNaN(value) ? Number(value) : 0; - }); - } - - return precision !== false ? output.toFixed(precision) : output; - }, - "concat": function concat(values, data, calcParams) { - var output = 0; - - if (values.length) { - output = values.reduce(function (sum, value) { - return String(sum) + String(value); - }); - } - - return output; - }, - "count": function count(values, data, calcParams) { - var output = 0; - - if (values.length) { - values.forEach(function (value) { - if (value) { - output++; - } - }); - } - - return output; - } -}; - -Tabulator.prototype.registerModule("columnCalcs", ColumnCalcs); \ No newline at end of file diff --git a/Gems/AssetMemoryAnalyzer/External/tabulator-master/dist/js/modules/calculation_colums.min.js b/Gems/AssetMemoryAnalyzer/External/tabulator-master/dist/js/modules/calculation_colums.min.js deleted file mode 100644 index a6a3442887..0000000000 --- a/Gems/AssetMemoryAnalyzer/External/tabulator-master/dist/js/modules/calculation_colums.min.js +++ /dev/null @@ -1,2 +0,0 @@ -/* Tabulator v4.1.2 (c) Oliver Folkerd */ -var _typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},ColumnCalcs=function(t){this.table=t,this.topCalcs=[],this.botCalcs=[],this.genColumn=!1,this.topElement=this.createElement(),this.botElement=this.createElement(),this.topRow=!1,this.botRow=!1,this.topInitialized=!1,this.botInitialized=!1,this.initialize()};ColumnCalcs.prototype.createElement=function(){var t=document.createElement("div");return t.classList.add("tabulator-calcs-holder"),t},ColumnCalcs.prototype.initialize=function(){this.genColumn=new Column({field:"value"},this)},ColumnCalcs.prototype.registerColumnField=function(){},ColumnCalcs.prototype.initializeColumn=function(t){var o=t.definition,e={topCalcParams:o.topCalcParams||{},botCalcParams:o.bottomCalcParams||{}};if(o.topCalc){switch(_typeof(o.topCalc)){case"string":this.calculations[o.topCalc]?e.topCalc=this.calculations[o.topCalc]:console.warn("Column Calc Error - No such calculation found, ignoring: ",o.topCalc);break;case"function":e.topCalc=o.topCalc}e.topCalc&&(t.modules.columnCalcs=e,this.topCalcs.push(t),"group"!=this.table.options.columnCalcs&&this.initializeTopRow())}if(o.bottomCalc){switch(_typeof(o.bottomCalc)){case"string":this.calculations[o.bottomCalc]?e.botCalc=this.calculations[o.bottomCalc]:console.warn("Column Calc Error - No such calculation found, ignoring: ",o.bottomCalc);break;case"function":e.botCalc=o.bottomCalc}e.botCalc&&(t.modules.columnCalcs=e,this.botCalcs.push(t),"group"!=this.table.options.columnCalcs&&this.initializeBottomRow())}},ColumnCalcs.prototype.removeCalcs=function(){var t=!1;this.topInitialized&&(this.topInitialized=!1,this.topElement.parentNode.removeChild(this.topElement),t=!0),this.botInitialized&&(this.botInitialized=!1,this.table.footerManager.remove(this.botElement),t=!0),t&&this.table.rowManager.adjustTableSize()},ColumnCalcs.prototype.initializeTopRow=function(){this.topInitialized||(this.table.columnManager.getElement().insertBefore(this.topElement,this.table.columnManager.headersElement.nextSibling),this.topInitialized=!0)},ColumnCalcs.prototype.initializeBottomRow=function(){this.botInitialized||(this.table.footerManager.prepend(this.botElement),this.botInitialized=!0)},ColumnCalcs.prototype.scrollHorizontal=function(t){this.table.columnManager.getElement().scrollWidth,this.table.element.clientWidth;this.botInitialized&&(this.botRow.getElement().style.marginLeft=-t+"px")},ColumnCalcs.prototype.recalc=function(t){var o;if(this.topInitialized||this.botInitialized){if(this.rowsToData(t),this.topInitialized){for(o=this.generateRow("top",this.rowsToData(t)),this.topRow=o;this.topElement.firstChild;)this.topElement.removeChild(this.topElement.firstChild);this.topElement.appendChild(o.getElement()),o.initialize(!0)}if(this.botInitialized){for(o=this.generateRow("bottom",this.rowsToData(t)),this.botRow=o;this.botElement.firstChild;)this.botElement.removeChild(this.botElement.firstChild);this.botElement.appendChild(o.getElement()),o.initialize(!0)}this.table.rowManager.adjustTableSize(),this.table.modExists("frozenColumns")&&this.table.modules.frozenColumns.layout()}},ColumnCalcs.prototype.recalcRowGroup=function(t){this.recalcGroup(this.table.modules.groupRows.getRowGroup(t))},ColumnCalcs.prototype.recalcGroup=function(t){var o,e;t&&t.calcs&&(t.calcs.bottom&&(o=this.rowsToData(t.rows),e=this.generateRowData("bottom",o),t.calcs.bottom.updateData(e),t.calcs.bottom.reinitialize()),t.calcs.top&&(o=this.rowsToData(t.rows),e=this.generateRowData("top",o),t.calcs.top.updateData(e),t.calcs.top.reinitialize()))},ColumnCalcs.prototype.generateTopRow=function(t){return this.generateRow("top",this.rowsToData(t))},ColumnCalcs.prototype.generateBottomRow=function(t){return this.generateRow("bottom",this.rowsToData(t))},ColumnCalcs.prototype.rowsToData=function(t){var o=[];return t.forEach(function(t){o.push(t.getData())}),o},ColumnCalcs.prototype.generateRow=function(t,o){var e,i=this,l=this.generateRowData(t,o);return i.table.modExists("mutator")&&i.table.modules.mutator.disable(),e=new Row(l,this),i.table.modExists("mutator")&&i.table.modules.mutator.enable(),e.getElement().classList.add("tabulator-calcs","tabulator-calcs-"+t),e.type="calc",e.generateCells=function(){var o=[];i.table.columnManager.columnsByIndex.forEach(function(l){if(l.visible){i.genColumn.setField(l.getField()),i.genColumn.hozAlign=l.hozAlign,l.definition[t+"CalcFormatter"]&&i.table.modExists("format")?i.genColumn.modules.format={formatter:i.table.modules.format.getFormatter(l.definition[t+"CalcFormatter"]),params:l.definition[t+"CalcFormatterParams"]}:i.genColumn.modules.format={formatter:i.table.modules.format.getFormatter("plaintext"),params:{}};var a=new Cell(i.genColumn,e);a.column=l,a.setWidth(l.width),l.cells.push(a),o.push(a)}}),this.cells=o},e},ColumnCalcs.prototype.generateRowData=function(t,o){var e,i,l={},a="top"==t?this.topCalcs:this.botCalcs,n="top"==t?"topCalc":"botCalc";return a.forEach(function(t){var a=[];t.modules.columnCalcs&&t.modules.columnCalcs[n]&&(o.forEach(function(o){a.push(t.getFieldValue(o))}),i=n+"Params",e="function"==typeof t.modules.columnCalcs[i]?t.modules.columnCalcs[i](value,o):t.modules.columnCalcs[i],t.setFieldValue(l,t.modules.columnCalcs[n](a,o,e)))}),l},ColumnCalcs.prototype.hasTopCalcs=function(){return!!this.topCalcs.length},ColumnCalcs.prototype.hasBottomCalcs=function(){return!!this.botCalcs.length},ColumnCalcs.prototype.redraw=function(){this.topRow&&this.topRow.normalizeHeight(!0),this.botRow&&this.botRow.normalizeHeight(!0)},ColumnCalcs.prototype.getResults=function(){var t,o=this,e={};return this.table.options.groupBy&&this.table.modExists("groupRows")?(t=this.table.modules.groupRows.getGroups(!0),t.forEach(function(t){e[t.getKey()]=o.getGroupResults(t)})):e={top:this.topRow?this.topRow.getData():{},bottom:this.botRow?this.botRow.getData():{}},e},ColumnCalcs.prototype.getGroupResults=function(t){var o=this,e=t._getSelf(),i=t.getSubGroups(),l={};return i.forEach(function(t){l[t.getKey()]=o.getGroupResults(t)}),{top:e.calcs.top?e.calcs.top.getData():{},bottom:e.calcs.bottom?e.calcs.bottom.getData():{},groups:l}},ColumnCalcs.prototype.calculations={avg:function(t,o,e){var i=0,l=void 0!==e.precision?e.precision:2;return t.length&&(i=t.reduce(function(t,o){return o=Number(o),t+o}),i/=t.length,i=!1!==l?i.toFixed(l):i),parseFloat(i).toString()},max:function(t,o,e){var i=null,l=void 0!==e.precision&&e.precision;return t.forEach(function(t){((t=Number(t))>i||null===i)&&(i=t)}),null!==i?!1!==l?i.toFixed(l):i:""},min:function(t,o,e){var i=null,l=void 0!==e.precision&&e.precision;return t.forEach(function(t){((t=Number(t)) max) { - max = len; - } - }); - - headers.forEach(function (title) { - var len = title.length; - if (len < max) { - for (var i = len; i < max; i++) { - title.push(""); - } - } - }); - } - - columns.forEach(function (column) { - parseColumnGroup(column, 0); - }); - - return headers; -}; - -Clipboard.prototype.rowsToData = function (rows, config, params) { - var columns = this.table.columnManager.columnsByIndex, - data = []; - - rows.forEach(function (row) { - var rowArray = [], - rowData = row.getData("clipboard"); - - columns.forEach(function (column) { - var value = column.getFieldValue(rowData); - - switch (typeof value === "undefined" ? "undefined" : _typeof(value)) { - case "object": - value = JSON.stringify(value); - break; - - case "undefined": - case "null": - value = ""; - break; - - default: - value = value; - } - - rowArray.push(value); - }); - - data.push(rowArray); - }); - - return data; -}; - -Clipboard.prototype.buildComplexRows = function (config) { - var _this3 = this; - - var output = [], - groups = this.table.modules.groupRows.getGroups(); - - groups.forEach(function (group) { - output.push(_this3.processGroupData(group)); - }); - - return output; -}; - -Clipboard.prototype.processGroupData = function (group) { - var _this4 = this; - - var subGroups = group.getSubGroups(); - - var groupData = { - type: "group", - key: group.key - }; - - if (subGroups.length) { - groupData.subGroups = []; - - subGroups.forEach(function (subGroup) { - groupData.subGroups.push(_this4.processGroupData(subGroup)); - }); - } else { - groupData.rows = group.getRows(true); - } - - return groupData; -}; - -Clipboard.prototype.buildOutput = function (rows, config, params) { - var _this5 = this; - - var output = [], - columns = this.table.columnManager.columnsByIndex; - - if (config.columnHeaders) { - - if (config.columnHeaders == "groups") { - columns = this.generateColumnGroupHeaders(this.table.columnManager.columns); - - output = output.concat(this.groupHeadersToRows(columns)); - } else { - output.push(this.generateSimpleHeaders(columns)); - } - } - - //generate styled content - if (this.table.options.clipboardCopyStyled) { - this.generateHTML(rows, columns, config, params); - } - - //generate unstyled content - if (config.rowGroups) { - rows.forEach(function (row) { - output = output.concat(_this5.parseRowGroupData(row, config, params)); - }); - } else { - output = output.concat(this.rowsToData(rows, config, params)); - } - - return output; -}; - -Clipboard.prototype.parseRowGroupData = function (group, config, params) { - var _this6 = this; - - var groupData = []; - - groupData.push([group.key]); - - if (group.subGroups) { - group.subGroups.forEach(function (subGroup) { - groupData = groupData.concat(_this6.parseRowGroupData(subGroup, config, params)); - }); - } else { - - groupData = groupData.concat(this.rowsToData(group.rows, config, params)); - } - - return groupData; -}; - -Clipboard.prototype.generateHTML = function (rows, columns, config, params) { - var self = this, - data = [], - headers = [], - body, - oddRow, - evenRow, - firstRow, - firstCell, - firstGroup, - lastCell, - styleCells; - - //create table element - this.htmlElement = document.createElement("table"); - self.mapElementStyles(this.table.element, this.htmlElement, ["border-top", "border-left", "border-right", "border-bottom"]); - - function generateSimpleHeaders() { - var headerEl = document.createElement("tr"); - - columns.forEach(function (column) { - var columnEl = document.createElement("th"); - columnEl.innerHTML = column.definition.title; - - self.mapElementStyles(column.getElement(), columnEl, ["border-top", "border-left", "border-right", "border-bottom", "background-color", "color", "font-weight", "font-family", "font-size"]); - - headerEl.appendChild(columnEl); - }); - - self.mapElementStyles(self.table.columnManager.getHeadersElement(), headerEl, ["border-top", "border-left", "border-right", "border-bottom", "background-color", "color", "font-weight", "font-family", "font-size"]); - - self.htmlElement.appendChild(document.createElement("thead").appendChild(headerEl)); - } - - function generateHeaders(headers) { - - var headerHolderEl = document.createElement("thead"); - - headers.forEach(function (columns) { - var headerEl = document.createElement("tr"); - - columns.forEach(function (column) { - var columnEl = document.createElement("th"); - - if (column.width > 1) { - columnEl.colSpan = column.width; - } - - if (column.height > 1) { - columnEl.rowSpan = column.height; - } - - columnEl.innerHTML = column.title; - - self.mapElementStyles(column.element, columnEl, ["border-top", "border-left", "border-right", "border-bottom", "background-color", "color", "font-weight", "font-family", "font-size"]); - - headerEl.appendChild(columnEl); - }); - - self.mapElementStyles(self.table.columnManager.getHeadersElement(), headerEl, ["border-top", "border-left", "border-right", "border-bottom", "background-color", "color", "font-weight", "font-family", "font-size"]); - - headerHolderEl.appendChild(headerEl); - }); - - self.htmlElement.appendChild(headerHolderEl); - } - - function parseColumnGroup(column, level) { - - if (typeof headers[level] === "undefined") { - headers[level] = []; - } - - headers[level].push({ - title: column.title, - width: column.width, - height: 1, - children: !!column.subGroups, - element: column.column.getElement() - }); - - if (column.subGroups) { - column.subGroups.forEach(function (subGroup) { - parseColumnGroup(subGroup, level + 1); - }); - } - } - - function padVerticalColumnheaders() { - headers.forEach(function (row, index) { - row.forEach(function (header) { - if (!header.children) { - header.height = headers.length - index; - } - }); - }); - } - - //create headers if needed - if (config.columnHeaders) { - if (config.columnHeaders == "groups") { - columns.forEach(function (column) { - parseColumnGroup(column, 0); - }); - - padVerticalColumnheaders(); - generateHeaders(headers); - } else { - generateSimpleHeaders(); - } - } - - columns = this.table.columnManager.columnsByIndex; - - //create table body - body = document.createElement("tbody"); - - //lookup row styles - if (window.getComputedStyle) { - oddRow = this.table.element.querySelector(".tabulator-row-odd:not(.tabulator-group):not(.tabulator-calcs)"); - evenRow = this.table.element.querySelector(".tabulator-row-even:not(.tabulator-group):not(.tabulator-calcs)"); - firstRow = this.table.element.querySelector(".tabulator-row:not(.tabulator-group):not(.tabulator-calcs)"); - firstGroup = this.table.element.getElementsByClassName("tabulator-group")[0]; - - if (firstRow) { - styleCells = firstRow.getElementsByClassName("tabulator-cell"); - firstCell = styleCells[0]; - lastCell = styleCells[styleCells.length - 1]; - } - } - - function processRows(rowArray) { - //add rows to table - rowArray.forEach(function (row, i) { - var rowEl = document.createElement("tr"), - rowData = row.getData("clipboard"), - styleRow = firstRow; - - columns.forEach(function (column, j) { - var cellEl = document.createElement("td"), - value = column.getFieldValue(rowData); - - switch (typeof value === "undefined" ? "undefined" : _typeof(value)) { - case "object": - value = JSON.stringify(value); - break; - - case "undefined": - case "null": - value = ""; - break; - - default: - value = value; - } - - cellEl.innerHTML = value; - - if (column.definition.align) { - cellEl.style.textAlign = column.definition.align; - } - - if (j < columns.length - 1) { - if (firstCell) { - self.mapElementStyles(firstCell, cellEl, ["border-top", "border-left", "border-right", "border-bottom", "color", "font-weight", "font-family", "font-size"]); - } - } else { - if (firstCell) { - self.mapElementStyles(firstCell, cellEl, ["border-top", "border-left", "border-right", "border-bottom", "color", "font-weight", "font-family", "font-size"]); - } - } - - rowEl.appendChild(cellEl); - }); - - if (!(i % 2) && oddRow) { - styleRow = oddRow; - } - - if (i % 2 && evenRow) { - styleRow = evenRow; - } - - if (styleRow) { - self.mapElementStyles(styleRow, rowEl, ["border-top", "border-left", "border-right", "border-bottom", "color", "font-weight", "font-family", "font-size", "background-color"]); - } - - body.appendChild(rowEl); - }); - } - - function processGroup(group) { - var groupEl = document.createElement("tr"), - groupCellEl = document.createElement("td"); - - groupCellEl.colSpan = columns.length; - - groupCellEl.innerHTML = group.key; - - groupEl.appendChild(groupCellEl); - body.appendChild(groupEl); - - self.mapElementStyles(firstGroup, groupEl, ["border-top", "border-left", "border-right", "border-bottom", "color", "font-weight", "font-family", "font-size", "background-color"]); - - if (group.subGroups) { - group.subGroups.forEach(function (subGroup) { - processGroup(subGroup); - }); - } else { - processRows(group.rows); - } - } - - if (config.rowGroups) { - rows.forEach(function (group) { - processGroup(group); - }); - } else { - processRows(rows); - } - - this.htmlElement.appendChild(body); -}; - -Clipboard.prototype.mapElementStyles = function (from, to, props) { - - var lookup = { - "background-color": "backgroundColor", - "color": "fontColor", - "font-weight": "fontWeight", - "font-family": "fontFamily", - "font-size": "fontSize", - "border-top": "borderTop", - "border-left": "borderLeft", - "border-right": "borderRight", - "border-bottom": "borderBottom" - }; - - if (window.getComputedStyle) { - var fromStyle = window.getComputedStyle(from); - - props.forEach(function (prop) { - to.style[lookup[prop]] = fromStyle.getPropertyValue(prop); - }); - } - - // return window.getComputedStyle ? window.getComputedStyle(element, null).getPropertyValue(property) : element.style[property.replace(/-([a-z])/g, function (g) { return g[1].toUpperCase(); })]; -}; - -Clipboard.prototype.copySelectors = { - userSelection: function userSelection(config, params) { - return params; - }, - selected: function selected(config, params) { - var rows = []; - - if (this.table.modExists("selectRow", true)) { - rows = this.table.modules.selectRow.getSelectedRows(); - } - - if (config.rowGroups) { - console.warn("Clipboard Warning - select coptSelector does not support row groups"); - } - - return this.buildOutput(rows, config, params); - }, - table: function table(config, params) { - if (config.rowGroups) { - console.warn("Clipboard Warning - table coptSelector does not support row groups"); - } - - return this.buildOutput(this.table.rowManager.getComponents(), config, params); - }, - active: function active(config, params) { - var rows; - - if (config.rowGroups) { - rows = this.buildComplexRows(config); - } else { - rows = this.table.rowManager.getComponents(true); - } - - return this.buildOutput(rows, config, params); - } -}; - -Clipboard.prototype.copyFormatters = { - raw: function raw(data, params) { - return data; - }, - table: function table(data, params) { - var output = []; - - data.forEach(function (row) { - row.forEach(function (value) { - if (typeof value == "undefined") { - value = ""; - } - - value = typeof value == "undefined" || value === null ? "" : value.toString(); - - if (value.match(/\r|\n/)) { - value = value.split('"').join('""'); - value = '"' + value + '"'; - } - }); - - output.push(row.join("\t")); - }); - - return output.join("\n"); - } -}; - -Clipboard.prototype.pasteParsers = { - table: function table(clipboard) { - var data = [], - success = false, - headerFindSuccess = true, - columns = this.table.columnManager.columns, - columnMap = [], - rows = []; - - //get data from clipboard into array of columns and rows. - clipboard = clipboard.split("\n"); - - clipboard.forEach(function (row) { - data.push(row.split("\t")); - }); - - if (data.length && !(data.length === 1 && data[0].length < 2)) { - success = true; - - //check if headers are present by title - data[0].forEach(function (value) { - var column = columns.find(function (column) { - return value && column.definition.title && value.trim() && column.definition.title.trim() === value.trim(); - }); - - if (column) { - columnMap.push(column); - } else { - headerFindSuccess = false; - } - }); - - //check if column headers are present by field - if (!headerFindSuccess) { - headerFindSuccess = true; - columnMap = []; - - data[0].forEach(function (value) { - var column = columns.find(function (column) { - return value && column.field && value.trim() && column.field.trim() === value.trim(); - }); - - if (column) { - columnMap.push(column); - } else { - headerFindSuccess = false; - } - }); - - if (!headerFindSuccess) { - columnMap = this.table.columnManager.columnsByIndex; - } - } - - //remove header row if found - if (headerFindSuccess) { - data.shift(); - } - - data.forEach(function (item) { - var row = {}; - - item.forEach(function (value, i) { - if (columnMap[i]) { - row[columnMap[i].field] = value; - } - }); - - rows.push(row); - }); - - return rows; - } else { - return false; - } - } -}; - -Clipboard.prototype.pasteActions = { - replace: function replace(rows) { - return this.table.setData(rows); - }, - update: function update(rows) { - return this.table.updateOrAddData(rows); - }, - insert: function insert(rows) { - return this.table.addData(rows); - } -}; - -Tabulator.prototype.registerModule("clipboard", Clipboard); \ No newline at end of file diff --git a/Gems/AssetMemoryAnalyzer/External/tabulator-master/dist/js/modules/clipboard.min.js b/Gems/AssetMemoryAnalyzer/External/tabulator-master/dist/js/modules/clipboard.min.js deleted file mode 100644 index c96952168c..0000000000 --- a/Gems/AssetMemoryAnalyzer/External/tabulator-master/dist/js/modules/clipboard.min.js +++ /dev/null @@ -1,2 +0,0 @@ -/* Tabulator v4.1.2 (c) Oliver Folkerd */ -var _typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Clipboard=function(t){this.table=t,this.mode=!0,this.copySelector=!1,this.copySelectorParams={},this.copyFormatter=!1,this.copyFormatterParams={},this.pasteParser=function(){},this.pasteAction=function(){},this.htmlElement=!1,this.config={},this.blocked=!0};Clipboard.prototype.initialize=function(){var t=this;this.mode=this.table.options.clipboard,!0!==this.mode&&"copy"!==this.mode||this.table.element.addEventListener("copy",function(e){var o;t.processConfig(),t.blocked||(e.preventDefault(),o=t.generateContent(),window.clipboardData&&window.clipboardData.setData?window.clipboardData.setData("Text",o):e.clipboardData&&e.clipboardData.setData?(e.clipboardData.setData("text/plain",o),t.htmlElement&&e.clipboardData.setData("text/html",t.htmlElement.outerHTML)):e.originalEvent&&e.originalEvent.clipboardData.setData&&(e.originalEvent.clipboardData.setData("text/plain",o),t.htmlElement&&e.originalEvent.clipboardData.setData("text/html",t.htmlElement.outerHTML)),t.table.options.clipboardCopied.call(this.table,o),t.reset())}),!0!==this.mode&&"paste"!==this.mode||this.table.element.addEventListener("paste",function(e){t.paste(e)}),this.setPasteParser(this.table.options.clipboardPasteParser),this.setPasteAction(this.table.options.clipboardPasteAction)},Clipboard.prototype.processConfig=function(){var t={columnHeaders:"groups",rowGroups:!0};if(void 0!==this.table.options.clipboardCopyHeader&&(t.columnHeaders=this.table.options.clipboardCopyHeader,console.warn("DEPRECATION WANRING - clipboardCopyHeader option has been depricated, please use the columnHeaders property on the clipboardCopyConfig option")),this.table.options.clipboardCopyConfig)for(var e in this.table.options.clipboardCopyConfig)t[e]=this.table.options.clipboardCopyConfig[e];t.rowGroups&&this.table.options.groupBy&&this.table.modExists("groupRows")&&(this.config.rowGroups=!0),t.columnHeaders?"groups"!==t.columnHeaders&&!0!==t||this.table.columnManager.columns.length==this.table.columnManager.columnsByIndex.length?this.config.columnHeaders="columns":this.config.columnHeaders="groups":this.config.columnHeaders=!1},Clipboard.prototype.reset=function(){this.blocked=!1,this.originalSelectionText=""},Clipboard.prototype.setPasteAction=function(t){switch(void 0===t?"undefined":_typeof(t)){case"string":this.pasteAction=this.pasteActions[t],this.pasteAction||console.warn("Clipboard Error - No such paste action found:",t);break;case"function":this.pasteAction=t}},Clipboard.prototype.setPasteParser=function(t){switch(void 0===t?"undefined":_typeof(t)){case"string":this.pasteParser=this.pasteParsers[t],this.pasteParser||console.warn("Clipboard Error - No such paste parser found:",t);break;case"function":this.pasteParser=t}},Clipboard.prototype.paste=function(t){var e,o,r;this.checkPaseOrigin(t)&&(e=this.getPasteData(t),o=this.pasteParser.call(this,e),o?(t.preventDefault(),this.table.modExists("mutator")&&(o=this.mutateData(o)),r=this.pasteAction.call(this,o),this.table.options.clipboardPasted.call(this.table,e,o,r)):this.table.options.clipboardPasteError.call(this.table,e))},Clipboard.prototype.mutateData=function(t){var e=this,o=[];return Array.isArray(t)?t.forEach(function(t){o.push(e.table.modules.mutator.transformRow(t,"clipboard"))}):o=t,o},Clipboard.prototype.checkPaseOrigin=function(t){var e=!0;return("DIV"!=t.target.tagName||this.table.modules.edit.currentCell)&&(e=!1),e},Clipboard.prototype.getPasteData=function(t){var e;return window.clipboardData&&window.clipboardData.getData?e=window.clipboardData.getData("Text"):t.clipboardData&&t.clipboardData.getData?e=t.clipboardData.getData("text/plain"):t.originalEvent&&t.originalEvent.clipboardData.getData&&(e=t.originalEvent.clipboardData.getData("text/plain")),e},Clipboard.prototype.copy=function(t,e,o,r,a){var n,i;this.blocked=!1,!0!==this.mode&&"copy"!==this.mode||(void 0!==window.getSelection&&void 0!==document.createRange?(n=document.createRange(),n.selectNodeContents(this.table.element),i=window.getSelection(),i.toString()&&a&&(t="userSelection",o="raw",e=i.toString()),i.removeAllRanges(),i.addRange(n)):void 0!==document.selection&&void 0!==document.body.createTextRange&&(textRange=document.body.createTextRange(),textRange.moveToElementText(this.table.element),textRange.select()),this.setSelector(t),this.copySelectorParams=void 0!==e&&null!=e?e:this.config.columnHeaders,this.setFormatter(o),this.copyFormatterParams=void 0!==r&&null!=r?r:{},document.execCommand("copy"),i&&i.removeAllRanges())},Clipboard.prototype.setSelector=function(t){switch(t=t||this.table.options.clipboardCopySelector,void 0===t?"undefined":_typeof(t)){case"string":this.copySelectors[t]?this.copySelector=this.copySelectors[t]:console.warn("Clipboard Error - No such selector found:",t);break;case"function":this.copySelector=t}},Clipboard.prototype.setFormatter=function(t){switch(t=t||this.table.options.clipboardCopyFormatter,void 0===t?"undefined":_typeof(t)){case"string":this.copyFormatters[t]?this.copyFormatter=this.copyFormatters[t]:console.warn("Clipboard Error - No such formatter found:",t);break;case"function":this.copyFormatter=t}},Clipboard.prototype.generateContent=function(){var t;return this.htmlElement=!1,t=this.copySelector.call(this,this.config,this.copySelectorParams),this.copyFormatter.call(this,t,this.config,this.copyFormatterParams)},Clipboard.prototype.generateSimpleHeaders=function(t){var e=[];return t.forEach(function(t){e.push(t.definition.title)}),e},Clipboard.prototype.generateColumnGroupHeaders=function(t){var e=this,o=[];return this.table.columnManager.columns.forEach(function(t){var r=e.processColumnGroup(t);r&&o.push(r)}),o},Clipboard.prototype.processColumnGroup=function(t){var e=this,o=t.columns,r={type:"group",title:t.definition.title,column:t};if(o.length){if(r.subGroups=[],r.width=0,o.forEach(function(t){var o=e.processColumnGroup(t);o&&(r.width+=o.width,r.subGroups.push(o))}),!r.width)return!1}else{if(!t.field||!t.visible)return!1;r.width=1}return r},Clipboard.prototype.groupHeadersToRows=function(t){function e(t,a){void 0===r[a]&&(r[a]=[]),r[a].push(t.title),t.subGroups?t.subGroups.forEach(function(t){e(t,a+1)}):o()}function o(){var t=0;r.forEach(function(e){var o=e.length;o>t&&(t=o)}),r.forEach(function(e){var o=e.length;if(o1&&(e.colSpan=t.width),t.height>1&&(e.rowSpan=t.height),e.innerHTML=t.title,b.mapElementStyles(t.element,e,["border-top","border-left","border-right","border-bottom","background-color","color","font-weight","font-family","font-size"]),o.appendChild(e)}),b.mapElementStyles(b.table.columnManager.getHeadersElement(),o,["border-top","border-left","border-right","border-bottom","background-color","color","font-weight","font-family","font-size"]),e.appendChild(o)}),b.htmlElement.appendChild(e)}(f)):function(){var t=document.createElement("tr");e.forEach(function(e){var o=document.createElement("th");o.innerHTML=e.definition.title,b.mapElementStyles(e.getElement(),o,["border-top","border-left","border-right","border-bottom","background-color","color","font-weight","font-family","font-size"]),t.appendChild(o)}),b.mapElementStyles(b.table.columnManager.getHeadersElement(),t,["border-top","border-left","border-right","border-bottom","background-color","color","font-weight","font-family","font-size"]),b.htmlElement.appendChild(document.createElement("thead").appendChild(t))}()),e=this.table.columnManager.columnsByIndex,l=document.createElement("tbody"),window.getComputedStyle&&(s=this.table.element.querySelector(".tabulator-row-odd:not(.tabulator-group):not(.tabulator-calcs)"),c=this.table.element.querySelector(".tabulator-row-even:not(.tabulator-group):not(.tabulator-calcs)"),p=this.table.element.querySelector(".tabulator-row:not(.tabulator-group):not(.tabulator-calcs)"),d=this.table.element.getElementsByClassName("tabulator-group")[0],p&&(h=p.getElementsByClassName("tabulator-cell"),u=h[0],h[h.length-1])),o.rowGroups?t.forEach(function(t){i(t)}):n(t),this.htmlElement.appendChild(l)},Clipboard.prototype.mapElementStyles=function(t,e,o){var r={"background-color":"backgroundColor",color:"fontColor","font-weight":"fontWeight","font-family":"fontFamily","font-size":"fontSize","border-top":"borderTop","border-left":"borderLeft","border-right":"borderRight","border-bottom":"borderBottom"};if(window.getComputedStyle){var a=window.getComputedStyle(t);o.forEach(function(t){e.style[r[t]]=a.getPropertyValue(t)})}},Clipboard.prototype.copySelectors={userSelection:function(t,e){return e},selected:function(t,e){var o=[];return this.table.modExists("selectRow",!0)&&(o=this.table.modules.selectRow.getSelectedRows()),t.rowGroups&&console.warn("Clipboard Warning - select coptSelector does not support row groups"),this.buildOutput(o,t,e)},table:function(t,e){return t.rowGroups&&console.warn("Clipboard Warning - table coptSelector does not support row groups"),this.buildOutput(this.table.rowManager.getComponents(),t,e)},active:function(t,e){var o;return o=t.rowGroups?this.buildComplexRows(t):this.table.rowManager.getComponents(!0),this.buildOutput(o,t,e)}},Clipboard.prototype.copyFormatters={raw:function(t,e){return t},table:function(t,e){var o=[];return t.forEach(function(t){t.forEach(function(t){void 0===t&&(t=""),t=void 0===t||null===t?"":t.toString(),t.match(/\r|\n/)&&(t=t.split('"').join('""'),t='"'+t+'"')}),o.push(t.join("\t"))}),o.join("\n")}},Clipboard.prototype.pasteParsers={table:function(t){var e=[],o=!0,r=this.table.columnManager.columns,a=[],n=[];return t=t.split("\n"),t.forEach(function(t){e.push(t.split("\t"))}),!(!e.length||1===e.length&&e[0].length<2)&&(!0,e[0].forEach(function(t){var e=r.find(function(e){return t&&e.definition.title&&t.trim()&&e.definition.title.trim()===t.trim()});e?a.push(e):o=!1}),o||(o=!0,a=[],e[0].forEach(function(t){var e=r.find(function(e){return t&&e.field&&t.trim()&&e.field.trim()===t.trim()});e?a.push(e):o=!1}),o||(a=this.table.columnManager.columnsByIndex)),o&&e.shift(),e.forEach(function(t){var e={};t.forEach(function(t,o){a[o]&&(e[a[o].field]=t)}),n.push(e)}),n)}},Clipboard.prototype.pasteActions={replace:function(t){return this.table.setData(t)},update:function(t){return this.table.updateOrAddData(t)},insert:function(t){return this.table.addData(t)}},Tabulator.prototype.registerModule("clipboard",Clipboard); \ No newline at end of file diff --git a/Gems/AssetMemoryAnalyzer/External/tabulator-master/dist/js/modules/data_tree.js b/Gems/AssetMemoryAnalyzer/External/tabulator-master/dist/js/modules/data_tree.js deleted file mode 100644 index c65efe312f..0000000000 --- a/Gems/AssetMemoryAnalyzer/External/tabulator-master/dist/js/modules/data_tree.js +++ /dev/null @@ -1,301 +0,0 @@ -var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol" ? function (obj) { return typeof obj; } : function (obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; - -/* Tabulator v4.1.2 (c) Oliver Folkerd */ - -var DataTree = function DataTree(table) { - this.table = table; - this.indent = 10; - this.field = ""; - this.collapseEl = null; - this.expandEl = null; - this.branchEl = null; - - this.startOpen = function () {}; - - this.displayIndex = 0; -}; - -DataTree.prototype.initialize = function () { - var dummyEl = null, - options = this.table.options; - - this.field = options.dataTreeChildField; - this.indent = options.dataTreeChildIndent; - - if (options.dataTreeBranchElement) { - - if (options.dataTreeBranchElement === true) { - this.branchEl = document.createElement("div"); - this.branchEl.classList.add("tabulator-data-tree-branch"); - } else { - if (typeof options.dataTreeBranchElement === "string") { - dummyEl = document.createElement("div"); - dummyEl.innerHTML = options.dataTreeBranchElement; - this.branchEl = dummyEl.firstChild; - } else { - this.branchEl = options.dataTreeBranchElement; - } - } - } - - if (options.dataTreeCollapseElement) { - if (typeof options.dataTreeCollapseElement === "string") { - dummyEl = document.createElement("div"); - dummyEl.innerHTML = options.dataTreeCollapseElement; - this.collapseEl = dummyEl.firstChild; - } else { - this.collapseEl = options.dataTreeCollapseElement; - } - } else { - this.collapseEl = document.createElement("div"); - this.collapseEl.classList.add("tabulator-data-tree-control"); - this.collapseEl.innerHTML = "
"; - } - - if (options.dataTreeExpandElement) { - if (typeof options.dataTreeExpandElement === "string") { - dummyEl = document.createElement("div"); - dummyEl.innerHTML = options.dataTreeExpandElement; - this.expandEl = dummyEl.firstChild; - } else { - this.expandEl = options.dataTreeExpandElement; - } - } else { - this.expandEl = document.createElement("div"); - this.expandEl.classList.add("tabulator-data-tree-control"); - this.expandEl.innerHTML = "
"; - } - - switch (_typeof(options.dataTreeStartExpanded)) { - case "boolean": - this.startOpen = function (row, index) { - return options.dataTreeStartExpanded; - }; - break; - - case "function": - this.startOpen = options.dataTreeStartExpanded; - break; - - default: - this.startOpen = function (row, index) { - return options.dataTreeStartExpanded[index]; - }; - break; - } -}; - -DataTree.prototype.initializeRow = function (row) { - - var children = typeof row.getData()[this.field] !== "undefined"; - - row.modules.dataTree = { - index: 0, - open: children ? this.startOpen(row.getComponent(), 0) : false, - controlEl: false, - branchEl: false, - parent: false, - children: children - }; -}; - -DataTree.prototype.layoutRow = function (row) { - var cell = row.getCells()[0], - el = cell.getElement(), - config = row.modules.dataTree; - - el.style.paddingLeft = parseInt(window.getComputedStyle(el, null).getPropertyValue('padding-left')) + config.index * this.indent + "px"; - - if (config.branchEl) { - config.branchEl.parentNode.removeChild(config.branchEl); - } - - this.generateControlElement(row, el); - - if (config.index && this.branchEl) { - config.branchEl = this.branchEl.cloneNode(true); - el.insertBefore(config.branchEl, el.firstChild); - el.style.paddingLeft = parseInt(el.style.paddingLeft) + (config.branchEl.offsetWidth + config.branchEl.style.marginRight) * (config.index - 1) + "px"; - } -}; - -DataTree.prototype.generateControlElement = function (row, el) { - var _this = this; - - var config = row.modules.dataTree, - el = el || row.getCells()[0].getElement(), - oldControl = config.controlEl; - - if (config.children !== false) { - - if (config.open) { - config.controlEl = this.collapseEl.cloneNode(true); - config.controlEl.addEventListener("click", function (e) { - e.stopPropagation(); - _this.collapseRow(row); - }); - } else { - config.controlEl = this.expandEl.cloneNode(true); - config.controlEl.addEventListener("click", function (e) { - e.stopPropagation(); - _this.expandRow(row); - }); - } - - config.controlEl.addEventListener("mousedown", function (e) { - e.stopPropagation(); - }); - - if (oldControl && oldControl.parentNode === el) { - oldControl.parentNode.replaceChild(config.controlEl, oldControl); - } else { - el.insertBefore(config.controlEl, el.firstChild); - } - } -}; - -DataTree.prototype.setDisplayIndex = function (index) { - this.displayIndex = index; -}; - -DataTree.prototype.getDisplayIndex = function () { - return this.displayIndex; -}; - -DataTree.prototype.getRows = function (rows) { - var _this2 = this; - - var output = []; - - rows.forEach(function (row, i) { - var config = row.modules.dataTree.children, - children; - - output.push(row); - - if (!config.index && config.children !== false) { - children = _this2.getChildren(row); - - children.forEach(function (child) { - output.push(child); - }); - } - }); - - return output; -}; - -DataTree.prototype.getChildren = function (row) { - var _this3 = this; - - var config = row.modules.dataTree, - output = []; - - if (config.children !== false && config.open) { - if (!Array.isArray(config.children)) { - config.children = this.generateChildren(row); - } - - config.children.forEach(function (child) { - output.push(child); - - var subChildren = _this3.getChildren(child); - - subChildren.forEach(function (sub) { - output.push(sub); - }); - }); - } - - return output; -}; - -DataTree.prototype.generateChildren = function (row) { - var _this4 = this; - - var children = []; - - row.getData()[this.field].forEach(function (childData) { - var childRow = new Row(childData || {}, _this4.table.rowManager); - childRow.modules.dataTree.index = row.modules.dataTree.index + 1; - childRow.modules.dataTree.parent = row; - childRow.modules.dataTree.open = _this4.startOpen(row, childRow.modules.dataTree.index); - children.push(childRow); - }); - - return children; -}; - -DataTree.prototype.expandRow = function (row, silent) { - var config = row.modules.dataTree; - - if (config.children !== false) { - config.open = true; - - row.reinitialize(); - - this.table.rowManager.refreshActiveData("tree", false, true); - - this.table.options.dataTreeRowExpanded(row.getComponent(), row.modules.dataTree.index); - } -}; - -DataTree.prototype.collapseRow = function (row) { - var config = row.modules.dataTree; - - if (config.children !== false) { - config.open = false; - - row.reinitialize(); - - this.table.rowManager.refreshActiveData("tree", false, true); - - this.table.options.dataTreeRowCollapsed(row.getComponent(), row.modules.dataTree.index); - } -}; - -DataTree.prototype.toggleRow = function (row) { - var config = row.modules.dataTree; - - if (config.children !== false) { - if (config.open) { - this.collapseRow(row); - } else { - this.expandRow(row); - } - } -}; - -DataTree.prototype.getTreeParent = function (row) { - return row.modules.dataTree.parent ? row.modules.dataTree.parent.getComponent() : false; -}; - -DataTree.prototype.getTreeChildren = function (row) { - var config = row.modules.dataTree, - output = []; - - if (config.children) { - - if (!Array.isArray(config.children)) { - config.children = this.generateChildren(row); - } - - config.children.forEach(function (childRow) { - if (childRow instanceof Row) { - output.push(childRow.getComponent()); - } - }); - } - - return output; -}; - -DataTree.prototype.checkForRestyle = function (cell) { - if (!cell.row.cells.indexOf(cell)) { - if (cell.row.modules.dataTree.children !== false) { - cell.row.reinitialize(); - } - } -}; - -Tabulator.prototype.registerModule("dataTree", DataTree); \ No newline at end of file diff --git a/Gems/AssetMemoryAnalyzer/External/tabulator-master/dist/js/modules/data_tree.min.js b/Gems/AssetMemoryAnalyzer/External/tabulator-master/dist/js/modules/data_tree.min.js deleted file mode 100644 index 0cb62526c9..0000000000 --- a/Gems/AssetMemoryAnalyzer/External/tabulator-master/dist/js/modules/data_tree.min.js +++ /dev/null @@ -1,2 +0,0 @@ -/* Tabulator v4.1.2 (c) Oliver Folkerd */ -var _typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},DataTree=function(e){this.table=e,this.indent=10,this.field="",this.collapseEl=null,this.expandEl=null,this.branchEl=null,this.startOpen=function(){},this.displayIndex=0};DataTree.prototype.initialize=function(){var e=null,t=this.table.options;switch(this.field=t.dataTreeChildField,this.indent=t.dataTreeChildIndent,t.dataTreeBranchElement&&(!0===t.dataTreeBranchElement?(this.branchEl=document.createElement("div"),this.branchEl.classList.add("tabulator-data-tree-branch")):"string"==typeof t.dataTreeBranchElement?(e=document.createElement("div"),e.innerHTML=t.dataTreeBranchElement,this.branchEl=e.firstChild):this.branchEl=t.dataTreeBranchElement),t.dataTreeCollapseElement?"string"==typeof t.dataTreeCollapseElement?(e=document.createElement("div"),e.innerHTML=t.dataTreeCollapseElement,this.collapseEl=e.firstChild):this.collapseEl=t.dataTreeCollapseElement:(this.collapseEl=document.createElement("div"),this.collapseEl.classList.add("tabulator-data-tree-control"),this.collapseEl.innerHTML="
"),t.dataTreeExpandElement?"string"==typeof t.dataTreeExpandElement?(e=document.createElement("div"),e.innerHTML=t.dataTreeExpandElement,this.expandEl=e.firstChild):this.expandEl=t.dataTreeExpandElement:(this.expandEl=document.createElement("div"),this.expandEl.classList.add("tabulator-data-tree-control"),this.expandEl.innerHTML="
"),_typeof(t.dataTreeStartExpanded)){case"boolean":this.startOpen=function(e,a){return t.dataTreeStartExpanded};break;case"function":this.startOpen=t.dataTreeStartExpanded;break;default:this.startOpen=function(e,a){return t.dataTreeStartExpanded[a]}}},DataTree.prototype.initializeRow=function(e){var t=void 0!==e.getData()[this.field];e.modules.dataTree={index:0,open:!!t&&this.startOpen(e.getComponent(),0),controlEl:!1,branchEl:!1,parent:!1,children:t}},DataTree.prototype.layoutRow=function(e){var t=e.getCells()[0],a=t.getElement(),n=e.modules.dataTree;a.style.paddingLeft=parseInt(window.getComputedStyle(a,null).getPropertyValue("padding-left"))+n.index*this.indent+"px",n.branchEl&&n.branchEl.parentNode.removeChild(n.branchEl),this.generateControlElement(e,a),n.index&&this.branchEl&&(n.branchEl=this.branchEl.cloneNode(!0),a.insertBefore(n.branchEl,a.firstChild),a.style.paddingLeft=parseInt(a.style.paddingLeft)+(n.branchEl.offsetWidth+n.branchEl.style.marginRight)*(n.index-1)+"px")},DataTree.prototype.generateControlElement=function(e,t){var a=this,n=e.modules.dataTree,t=t||e.getCells()[0].getElement(),r=n.controlEl;!1!==n.children&&(n.open?(n.controlEl=this.collapseEl.cloneNode(!0),n.controlEl.addEventListener("click",function(t){t.stopPropagation(),a.collapseRow(e)})):(n.controlEl=this.expandEl.cloneNode(!0),n.controlEl.addEventListener("click",function(t){t.stopPropagation(),a.expandRow(e)})),n.controlEl.addEventListener("mousedown",function(e){e.stopPropagation()}),r&&r.parentNode===t?r.parentNode.replaceChild(n.controlEl,r):t.insertBefore(n.controlEl,t.firstChild))},DataTree.prototype.setDisplayIndex=function(e){this.displayIndex=e},DataTree.prototype.getDisplayIndex=function(){return this.displayIndex},DataTree.prototype.getRows=function(e){var t=this,a=[];return e.forEach(function(e,n){var r,o=e.modules.dataTree.children;a.push(e),o.index||!1===o.children||(r=t.getChildren(e),r.forEach(function(e){a.push(e)}))}),a},DataTree.prototype.getChildren=function(e){var t=this,a=e.modules.dataTree,n=[];return!1!==a.children&&a.open&&(Array.isArray(a.children)||(a.children=this.generateChildren(e)),a.children.forEach(function(e){n.push(e),t.getChildren(e).forEach(function(e){n.push(e)})})),n},DataTree.prototype.generateChildren=function(e){var t=this,a=[];return e.getData()[this.field].forEach(function(n){var r=new Row(n||{},t.table.rowManager);r.modules.dataTree.index=e.modules.dataTree.index+1,r.modules.dataTree.parent=e,r.modules.dataTree.open=t.startOpen(e,r.modules.dataTree.index),a.push(r)}),a},DataTree.prototype.expandRow=function(e,t){var a=e.modules.dataTree;!1!==a.children&&(a.open=!0,e.reinitialize(),this.table.rowManager.refreshActiveData("tree",!1,!0),this.table.options.dataTreeRowExpanded(e.getComponent(),e.modules.dataTree.index))},DataTree.prototype.collapseRow=function(e){var t=e.modules.dataTree;!1!==t.children&&(t.open=!1,e.reinitialize(),this.table.rowManager.refreshActiveData("tree",!1,!0),this.table.options.dataTreeRowCollapsed(e.getComponent(),e.modules.dataTree.index))},DataTree.prototype.toggleRow=function(e){var t=e.modules.dataTree;!1!==t.children&&(t.open?this.collapseRow(e):this.expandRow(e))},DataTree.prototype.getTreeParent=function(e){return!!e.modules.dataTree.parent&&e.modules.dataTree.parent.getComponent()},DataTree.prototype.getTreeChildren=function(e){var t=e.modules.dataTree,a=[];return t.children&&(Array.isArray(t.children)||(t.children=this.generateChildren(e)),t.children.forEach(function(e){e instanceof Row&&a.push(e.getComponent())})),a},DataTree.prototype.checkForRestyle=function(e){e.row.cells.indexOf(e)||!1!==e.row.modules.dataTree.children&&e.row.reinitialize()},Tabulator.prototype.registerModule("dataTree",DataTree); \ No newline at end of file diff --git a/Gems/AssetMemoryAnalyzer/External/tabulator-master/dist/js/modules/download.js b/Gems/AssetMemoryAnalyzer/External/tabulator-master/dist/js/modules/download.js deleted file mode 100644 index f8af88236a..0000000000 --- a/Gems/AssetMemoryAnalyzer/External/tabulator-master/dist/js/modules/download.js +++ /dev/null @@ -1,736 +0,0 @@ -var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol" ? function (obj) { return typeof obj; } : function (obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; - -/* Tabulator v4.1.2 (c) Oliver Folkerd */ - -var Download = function Download(table) { - this.table = table; //hold Tabulator object - this.fields = {}; //hold filed multi dimension arrays - this.columnsByIndex = []; //hold columns in their order in the table - this.columnsByField = {}; //hold columns with lookup by field name - this.config = {}; -}; - -//trigger file download -Download.prototype.download = function (type, filename, options, interceptCallback) { - var self = this, - downloadFunc = false; - this.processConfig(); - - function buildLink(data, mime) { - if (interceptCallback) { - interceptCallback(data); - } else { - self.triggerDownload(data, mime, type, filename); - } - } - - if (typeof type == "function") { - downloadFunc = type; - } else { - if (self.downloaders[type]) { - downloadFunc = self.downloaders[type]; - } else { - console.warn("Download Error - No such download type found: ", type); - } - } - - this.processColumns(); - - if (downloadFunc) { - downloadFunc.call(this, self.processDefinitions(), self.processData(), options || {}, buildLink, this.config); - } -}; - -Download.prototype.processConfig = function () { - var config = { //download config - columnGroups: true, - rowGroups: true - }; - - if (this.table.options.downloadConfig) { - for (var key in this.table.options.downloadConfig) { - config[key] = this.table.options.downloadConfig[key]; - } - } - - if (config.rowGroups && this.table.options.groupBy && this.table.modExists("groupRows")) { - this.config.rowGroups = true; - } - - if (config.columnGroups && this.table.columnManager.columns.length != this.table.columnManager.columnsByIndex.length) { - this.config.columnGroups = true; - } -}; - -Download.prototype.processColumns = function () { - var self = this; - - self.columnsByIndex = []; - self.columnsByField = {}; - - self.table.columnManager.columnsByIndex.forEach(function (column) { - - if (column.field && column.visible && column.definition.download !== false) { - self.columnsByIndex.push(column); - self.columnsByField[column.field] = column; - } - }); -}; - -Download.prototype.processDefinitions = function () { - var self = this, - processedDefinitions = []; - - if (this.config.columnGroups) { - self.table.columnManager.columns.forEach(function (column) { - var colData = self.processColumnGroup(column); - - if (colData) { - processedDefinitions.push(colData); - } - }); - } else { - self.columnsByIndex.forEach(function (column) { - if (column.download !== false) { - //isolate definiton from defintion object - processedDefinitions.push(self.processDefinition(column)); - } - }); - } - - return processedDefinitions; -}; - -Download.prototype.processColumnGroup = function (column) { - var _this = this; - - var subGroups = column.columns; - - var groupData = { - type: "group", - title: column.definition.title - }; - - if (subGroups.length) { - groupData.subGroups = []; - groupData.width = 0; - - subGroups.forEach(function (subGroup) { - var subGroupData = _this.processColumnGroup(subGroup); - - if (subGroupData) { - groupData.width += subGroupData.width; - groupData.subGroups.push(subGroupData); - } - }); - - if (!groupData.width) { - return false; - } - } else { - if (column.field && column.visible && column.definition.download !== false) { - groupData.width = 1; - groupData.definition = this.processDefinition(column); - } else { - return false; - } - } - - return groupData; -}; - -Download.prototype.processDefinition = function (column) { - var def = {}; - - for (var key in column.definition) { - def[key] = column.definition[key]; - } - - if (typeof column.definition.downloadTitle != "undefined") { - def.title = column.definition.downloadTitle; - } - - return def; -}; - -Download.prototype.processData = function () { - var _this2 = this; - - var self = this, - data = [], - groups = []; - - if (this.config.rowGroups) { - groups = this.table.modules.groupRows.getGroups(); - - groups.forEach(function (group) { - data.push(_this2.processGroupData(group)); - }); - } else { - data = self.table.rowManager.getData(true, "download"); - } - - //bulk data processing - if (typeof self.table.options.downloadDataFormatter == "function") { - data = self.table.options.downloadDataFormatter(data); - } - - return data; -}; - -Download.prototype.processGroupData = function (group) { - var _this3 = this; - - var subGroups = group.getSubGroups(); - - var groupData = { - type: "group", - key: group.key - }; - - if (subGroups.length) { - groupData.subGroups = []; - - subGroups.forEach(function (subGroup) { - groupData.subGroups.push(_this3.processGroupData(subGroup)); - }); - } else { - groupData.rows = group.getData(true, "download"); - } - - return groupData; -}; - -Download.prototype.triggerDownload = function (data, mime, type, filename) { - var element = document.createElement('a'), - blob = new Blob([data], { type: mime }), - filename = filename || "Tabulator." + (typeof type === "function" ? "txt" : type); - - blob = this.table.options.downloadReady.call(this.table, data, blob); - - if (blob) { - - if (navigator.msSaveOrOpenBlob) { - navigator.msSaveOrOpenBlob(blob, filename); - } else { - element.setAttribute('href', window.URL.createObjectURL(blob)); - - //set file title - element.setAttribute('download', filename); - - //trigger download - element.style.display = 'none'; - document.body.appendChild(element); - element.click(); - - //remove temporary link element - document.body.removeChild(element); - } - - if (this.table.options.downloadComplete) { - this.table.options.downloadComplete(); - } - } -}; - -//nested field lookup -Download.prototype.getFieldValue = function (field, data) { - var column = this.columnsByField[field]; - - if (column) { - return column.getFieldValue(data); - } - - return false; -}; - -Download.prototype.commsReceived = function (table, action, data) { - switch (action) { - case "intercept": - this.download(data.type, "", data.options, data.intercept); - break; - } -}; - -//downloaders -Download.prototype.downloaders = { - csv: function csv(columns, data, options, setFileContents, config) { - var self = this, - titles = [], - fields = [], - delimiter = options && options.delimiter ? options.delimiter : ",", - fileContents; - - //build column headers - function parseSimpleTitles() { - columns.forEach(function (column) { - titles.push('"' + String(column.title).split('"').join('""') + '"'); - fields.push(column.field); - }); - } - - function parseColumnGroup(column, level) { - if (column.subGroups) { - column.subGroups.forEach(function (subGroup) { - parseColumnGroup(subGroup, level + 1); - }); - } else { - titles.push('"' + String(column.title).split('"').join('""') + '"'); - fields.push(column.definition.field); - } - } - - if (config.columnGroups) { - console.warn("Download Warning - CSV downloader cannot process column groups"); - - columns.forEach(function (column) { - parseColumnGroup(column, 0); - }); - } else { - parseSimpleTitles(); - } - - //generate header row - fileContents = [titles.join(delimiter)]; - - function parseRows(data) { - //generate each row of the table - data.forEach(function (row) { - var rowData = []; - - fields.forEach(function (field) { - var value = self.getFieldValue(field, row); - - switch (typeof value === "undefined" ? "undefined" : _typeof(value)) { - case "object": - value = JSON.stringify(value); - break; - - case "undefined": - case "null": - value = ""; - break; - - default: - value = value; - } - - //escape quotation marks - rowData.push('"' + String(value).split('"').join('""') + '"'); - }); - - fileContents.push(rowData.join(delimiter)); - }); - } - - function parseGroup(group) { - if (group.subGroups) { - group.subGroups.forEach(function (subGroup) { - parseGroup(subGroup); - }); - } else { - parseRows(group.rows); - } - } - - if (config.rowGroups) { - console.warn("Download Warning - CSV downloader cannot process row groups"); - - data.forEach(function (group) { - parseGroup(group); - }); - } else { - parseRows(data); - } - - setFileContents(fileContents.join("\n"), "text/csv"); - }, - - json: function json(columns, data, options, setFileContents, config) { - var fileContents = JSON.stringify(data, null, '\t'); - - setFileContents(fileContents, "application/json"); - }, - - pdf: function pdf(columns, data, options, setFileContents, config) { - var self = this, - fields = [], - header = [], - body = [], - table = "", - groupRowIndexs = [], - autoTableParams = {}, - rowGroupStyles = {}, - jsPDFParams = options.jsPDF || {}, - title = options && options.title ? options.title : ""; - - if (!jsPDFParams.orientation) { - jsPDFParams.orientation = options.orientation || "landscape"; - } - - if (!jsPDFParams.unit) { - jsPDFParams.unit = "pt"; - } - - //build column headers - function parseSimpleTitles() { - columns.forEach(function (column) { - if (column.field) { - header.push(column.title || ""); - fields.push(column.field); - } - }); - } - - function parseColumnGroup(column, level) { - if (column.subGroups) { - column.subGroups.forEach(function (subGroup) { - parseColumnGroup(subGroup, level + 1); - }); - } else { - header.push(column.title || ""); - fields.push(column.definition.field); - } - } - - if (config.columnGroups) { - console.warn("Download Warning - PDF downloader cannot process column groups"); - - columns.forEach(function (column) { - parseColumnGroup(column, 0); - }); - } else { - parseSimpleTitles(); - } - - function parseValue(value) { - switch (typeof value === "undefined" ? "undefined" : _typeof(value)) { - case "object": - value = JSON.stringify(value); - break; - - case "undefined": - case "null": - value = ""; - break; - - default: - value = value; - } - - return value; - } - - function parseRows(data) { - //build table rows - data.forEach(function (row) { - var rowData = []; - - fields.forEach(function (field) { - var value = self.getFieldValue(field, row); - rowData.push(parseValue(value)); - }); - - body.push(rowData); - }); - } - - function parseGroup(group) { - var groupData = []; - - groupData.push(parseValue(group.key)); - - groupRowIndexs.push(body.length); - - body.push(groupData); - - if (group.subGroups) { - group.subGroups.forEach(function (subGroup) { - parseGroup(subGroup); - }); - } else { - parseRows(group.rows); - } - } - - if (config.rowGroups) { - data.forEach(function (group) { - parseGroup(group); - }); - } else { - parseRows(data); - } - - var doc = new jsPDF(jsPDFParams); //set document to landscape, better for most tables - - if (options && options.autoTable) { - if (typeof options.autoTable === "function") { - autoTableParams = options.autoTable(doc) || {}; - } else { - autoTableParams = options.autoTable; - } - } - - if (config.rowGroups) { - var createdCell = function createdCell(cell, data) { - if (groupRowIndexs.indexOf(data.row.index) > -1) { - for (var key in rowGroupStyles) { - cell.styles[key] = rowGroupStyles[key]; - } - } - }; - - rowGroupStyles = options.rowGroupStyles || { - fontStyle: "bold", - fontSize: 12, - cellPadding: 6, - fillColor: 220 - }; - - if (!autoTableParams.createdCell) { - autoTableParams.createdCell = createdCell; - } else { - var createdCellHolder = autoTableParams.createdCell; - - autoTableParams.createdCell = function (cell, data) { - createdCell(cell, data); - createdCellHolder(cell, data); - }; - } - } - - if (title) { - autoTableParams.addPageContent = function (data) { - doc.text(title, 40, 30); - }; - } - - doc.autoTable(header, body, autoTableParams); - - setFileContents(doc.output("arraybuffer"), "application/pdf"); - }, - - xlsx: function xlsx(columns, data, options, setFileContents, config) { - var self = this, - sheetName = options.sheetName || "Sheet1", - workbook = { SheetNames: [], Sheets: {} }, - groupRowIndexs = [], - groupColumnIndexs = [], - output; - - function generateSheet() { - var titles = [], - fields = [], - rows = [], - worksheet; - - //convert rows to worksheet - function rowsToSheet() { - var sheet = {}; - var range = { s: { c: 0, r: 0 }, e: { c: fields.length, r: rows.length } }; - - XLSX.utils.sheet_add_aoa(sheet, rows); - - sheet['!ref'] = XLSX.utils.encode_range(range); - - var merges = generateMerges(); - - if (merges.length) { - sheet["!merges"] = merges; - } - - return sheet; - } - - function parseSimpleTitles() { - //get field lists - columns.forEach(function (column) { - titles.push(column.title); - fields.push(column.field); - }); - - rows.push(titles); - } - - function parseColumnGroup(column, level) { - - if (typeof titles[level] === "undefined") { - titles[level] = []; - } - - if (typeof groupColumnIndexs[level] === "undefined") { - groupColumnIndexs[level] = []; - } - - if (column.width > 1) { - - groupColumnIndexs[level].push({ - type: "hoz", - start: titles[level].length, - end: titles[level].length + column.width - 1 - }); - } - - titles[level].push(column.title); - - if (column.subGroups) { - column.subGroups.forEach(function (subGroup) { - parseColumnGroup(subGroup, level + 1); - }); - } else { - fields.push(column.definition.field); - padColumnTitles(fields.length - 1, level); - - groupColumnIndexs[level].push({ - type: "vert", - start: fields.length - 1 - }); - } - } - - function padColumnTitles() { - var max = 0; - - titles.forEach(function (title) { - var len = title.length; - if (len > max) { - max = len; - } - }); - - titles.forEach(function (title) { - var len = title.length; - if (len < max) { - for (var i = len; i < max; i++) { - title.push(""); - } - } - }); - } - - if (config.columnGroups) { - columns.forEach(function (column) { - parseColumnGroup(column, 0); - }); - - titles.forEach(function (title) { - rows.push(title); - }); - } else { - parseSimpleTitles(); - } - - function generateMerges() { - var output = []; - - groupRowIndexs.forEach(function (index) { - output.push({ s: { r: index, c: 0 }, e: { r: index, c: fields.length - 1 } }); - }); - - groupColumnIndexs.forEach(function (merges, level) { - merges.forEach(function (merge) { - if (merge.type === "hoz") { - output.push({ s: { r: level, c: merge.start }, e: { r: level, c: merge.end } }); - } else { - if (level != titles.length - 1) { - output.push({ s: { r: level, c: merge.start }, e: { r: titles.length - 1, c: merge.start } }); - } - } - }); - }); - - return output; - } - - //generate each row of the table - function parseRows(data) { - data.forEach(function (row) { - var rowData = []; - - fields.forEach(function (field) { - var value = self.getFieldValue(field, row); - - rowData.push((typeof value === "undefined" ? "undefined" : _typeof(value)) === "object" ? JSON.stringify(value) : value); - }); - - rows.push(rowData); - }); - } - - function parseGroup(group) { - var groupData = []; - - groupData.push(group.key); - - groupRowIndexs.push(rows.length); - - rows.push(groupData); - - if (group.subGroups) { - group.subGroups.forEach(function (subGroup) { - parseGroup(subGroup); - }); - } else { - parseRows(group.rows); - } - } - - if (config.rowGroups) { - data.forEach(function (group) { - parseGroup(group); - }); - } else { - parseRows(data); - } - - worksheet = rowsToSheet(); - - return worksheet; - } - - if (options.sheetOnly) { - setFileContents(generateSheet()); - return; - } - - if (options.sheets) { - for (var sheet in options.sheets) { - - if (options.sheets[sheet] === true) { - workbook.SheetNames.push(sheet); - workbook.Sheets[sheet] = generateSheet(); - } else { - - workbook.SheetNames.push(sheet); - - this.table.modules.comms.send(options.sheets[sheet], "download", "intercept", { - type: "xlsx", - options: { sheetOnly: true }, - intercept: function intercept(data) { - workbook.Sheets[sheet] = data; - } - }); - } - } - } else { - workbook.SheetNames.push(sheetName); - workbook.Sheets[sheetName] = generateSheet(); - } - - //convert workbook to binary array - function s2ab(s) { - var buf = new ArrayBuffer(s.length); - var view = new Uint8Array(buf); - for (var i = 0; i != s.length; ++i) { - view[i] = s.charCodeAt(i) & 0xFF; - }return buf; - } - - output = XLSX.write(workbook, { bookType: 'xlsx', bookSST: true, type: 'binary' }); - - setFileContents(s2ab(output), "application/octet-stream"); - } - -}; - -Tabulator.prototype.registerModule("download", Download); \ No newline at end of file diff --git a/Gems/AssetMemoryAnalyzer/External/tabulator-master/dist/js/modules/download.min.js b/Gems/AssetMemoryAnalyzer/External/tabulator-master/dist/js/modules/download.min.js deleted file mode 100644 index 3c10e672b4..0000000000 --- a/Gems/AssetMemoryAnalyzer/External/tabulator-master/dist/js/modules/download.min.js +++ /dev/null @@ -1,2 +0,0 @@ -/* Tabulator v4.1.2 (c) Oliver Folkerd */ -var _typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(o){return typeof o}:function(o){return o&&"function"==typeof Symbol&&o.constructor===Symbol&&o!==Symbol.prototype?"symbol":typeof o},Download=function(o){this.table=o,this.fields={},this.columnsByIndex=[],this.columnsByField={},this.config={}};Download.prototype.download=function(o,n,t,e){function i(t,i){e?e(t):r.triggerDownload(t,i,o,n)}var r=this,s=!1;this.processConfig(),"function"==typeof o?s=o:r.downloaders[o]?s=r.downloaders[o]:console.warn("Download Error - No such download type found: ",o),this.processColumns(),s&&s.call(this,r.processDefinitions(),r.processData(),t||{},i,this.config)},Download.prototype.processConfig=function(){var o={columnGroups:!0,rowGroups:!0};if(this.table.options.downloadConfig)for(var n in this.table.options.downloadConfig)o[n]=this.table.options.downloadConfig[n];o.rowGroups&&this.table.options.groupBy&&this.table.modExists("groupRows")&&(this.config.rowGroups=!0),o.columnGroups&&this.table.columnManager.columns.length!=this.table.columnManager.columnsByIndex.length&&(this.config.columnGroups=!0)},Download.prototype.processColumns=function(){var o=this;o.columnsByIndex=[],o.columnsByField={},o.table.columnManager.columnsByIndex.forEach(function(n){n.field&&n.visible&&!1!==n.definition.download&&(o.columnsByIndex.push(n),o.columnsByField[n.field]=n)})},Download.prototype.processDefinitions=function(){var o=this,n=[];return this.config.columnGroups?o.table.columnManager.columns.forEach(function(t){var e=o.processColumnGroup(t);e&&n.push(e)}):o.columnsByIndex.forEach(function(t){!1!==t.download&&n.push(o.processDefinition(t))}),n},Download.prototype.processColumnGroup=function(o){var n=this,t=o.columns,e={type:"group",title:o.definition.title};if(t.length){if(e.subGroups=[],e.width=0,t.forEach(function(o){var t=n.processColumnGroup(o);t&&(e.width+=t.width,e.subGroups.push(t))}),!e.width)return!1}else{if(!o.field||!o.visible||!1===o.definition.download)return!1;e.width=1,e.definition=this.processDefinition(o)}return e},Download.prototype.processDefinition=function(o){var n={};for(var t in o.definition)n[t]=o.definition[t];return void 0!==o.definition.downloadTitle&&(n.title=o.definition.downloadTitle),n},Download.prototype.processData=function(){var o=this,n=this,t=[],e=[];return this.config.rowGroups?(e=this.table.modules.groupRows.getGroups(),e.forEach(function(n){t.push(o.processGroupData(n))})):t=n.table.rowManager.getData(!0,"download"),"function"==typeof n.table.options.downloadDataFormatter&&(t=n.table.options.downloadDataFormatter(t)),t},Download.prototype.processGroupData=function(o){var n=this,t=o.getSubGroups(),e={type:"group",key:o.key};return t.length?(e.subGroups=[],t.forEach(function(o){e.subGroups.push(n.processGroupData(o))})):e.rows=o.getData(!0,"download"),e},Download.prototype.triggerDownload=function(o,n,t,e){var i=document.createElement("a"),r=new Blob([o],{type:n}),e=e||"Tabulator."+("function"==typeof t?"txt":t);(r=this.table.options.downloadReady.call(this.table,o,r))&&(navigator.msSaveOrOpenBlob?navigator.msSaveOrOpenBlob(r,e):(i.setAttribute("href",window.URL.createObjectURL(r)),i.setAttribute("download",e),i.style.display="none",document.body.appendChild(i),i.click(),document.body.removeChild(i)),this.table.options.downloadComplete&&this.table.options.downloadComplete())},Download.prototype.getFieldValue=function(o,n){var t=this.columnsByField[o];return!!t&&t.getFieldValue(n)},Download.prototype.commsReceived=function(o,n,t){switch(n){case"intercept":this.download(t.type,"",t.options,t.intercept)}},Download.prototype.downloaders={csv:function(o,n,t,e,i){function r(o,n){o.subGroups?o.subGroups.forEach(function(o){r(o,n+1)}):(c.push('"'+String(o.title).split('"').join('""')+'"'),f.push(o.definition.field))}function s(o){o.forEach(function(o){var n=[];f.forEach(function(t){var e=l.getFieldValue(t,o);switch(void 0===e?"undefined":_typeof(e)){case"object":e=JSON.stringify(e);break;case"undefined":case"null":e="";break;default:e=e}n.push('"'+String(e).split('"').join('""')+'"')}),a.push(n.join(p))})}function u(o){o.subGroups?o.subGroups.forEach(function(o){u(o)}):s(o.rows)}var a,l=this,c=[],f=[],p=t&&t.delimiter?t.delimiter:",";i.columnGroups?(console.warn("Download Warning - CSV downloader cannot process column groups"),o.forEach(function(o){r(o,0)})):function(){o.forEach(function(o){c.push('"'+String(o.title).split('"').join('""')+'"'),f.push(o.field)})}(),a=[c.join(p)],i.rowGroups?(console.warn("Download Warning - CSV downloader cannot process row groups"),n.forEach(function(o){u(o)})):s(n),e(a.join("\n"),"text/csv")},json:function(o,n,t,e,i){e(JSON.stringify(n,null,"\t"),"application/json")},pdf:function(o,n,t,e,i){function r(o,n){o.subGroups?o.subGroups.forEach(function(o){r(o,n+1)}):(f.push(o.title||""),c.push(o.definition.field))}function s(o){switch(void 0===o?"undefined":_typeof(o)){case"object":o=JSON.stringify(o);break;case"undefined":case"null":o="";break;default:o=o}return o}function u(o){o.forEach(function(o){var n=[];c.forEach(function(t){var e=l.getFieldValue(t,o);n.push(s(e))}),p.push(n)})}function a(o){var n=[];n.push(s(o.key)),d.push(p.length),p.push(n),o.subGroups?o.subGroups.forEach(function(o){a(o)}):u(o.rows)}var l=this,c=[],f=[],p=[],d=[],h={},w={},y=t.jsPDF||{},g=t&&t.title?t.title:"";y.orientation||(y.orientation=t.orientation||"landscape"),y.unit||(y.unit="pt"),i.columnGroups?(console.warn("Download Warning - PDF downloader cannot process column groups"),o.forEach(function(o){r(o,0)})):function(){o.forEach(function(o){o.field&&(f.push(o.title||""),c.push(o.field))})}(),i.rowGroups?n.forEach(function(o){a(o)}):u(n);var b=new jsPDF(y);if(t&&t.autoTable&&(h="function"==typeof t.autoTable?t.autoTable(b)||{}:t.autoTable),i.rowGroups){var m=function(o,n){if(d.indexOf(n.row.index)>-1)for(var t in w)o.styles[t]=w[t]};if(w=t.rowGroupStyles||{fontStyle:"bold",fontSize:12,cellPadding:6,fillColor:220},h.createdCell){var v=h.createdCell;h.createdCell=function(o,n){m(o,n),v(o,n)}}else h.createdCell=m}g&&(h.addPageContent=function(o){b.text(g,40,30)}),b.autoTable(f,p,h),e(b.output("arraybuffer"),"application/pdf")},xlsx:function(o,n,t,e,i){function r(){function t(o,n){void 0===l[n]&&(l[n]=[]),void 0===f[n]&&(f[n]=[]),o.width>1&&f[n].push({type:"hoz",start:l[n].length,end:l[n].length+o.width-1}),l[n].push(o.title),o.subGroups?o.subGroups.forEach(function(o){t(o,n+1)}):(p.push(o.definition.field),e(p.length),f[n].push({type:"vert",start:p.length-1}))}function e(){var o=0;l.forEach(function(n){var t=n.length;t>o&&(o=t)}),l.forEach(function(n){var t=n.length;if(t 0) { - setCurrentItem(dataItems[index - 1]); - } - break; - - case 40: - //down arrow - e.stopImmediatePropagation(); - e.stopPropagation(); - - index = dataItems.indexOf(currentItem); - - if (index < dataItems.length - 1) { - if (index == -1) { - setCurrentItem(dataItems[0]); - } else { - setCurrentItem(dataItems[index + 1]); - } - } - break; - - case 13: - //enter - chooseItem(); - break; - - case 27: - //escape - cancelItem(); - break; - } - }); - - input.addEventListener("blur", function (e) { - if (blurable) { - cancelItem(); - } - }); - - input.addEventListener("focus", function (e) { - showList(); - }); - - //style list element - listEl = document.createElement("div"); - listEl.classList.add("tabulator-edit-select-list"); - - onRendered(function () { - input.style.height = "100%"; - input.focus(); - }); - - return input; - }, - - //autocomplete - autocomplete: function autocomplete(cell, onRendered, success, cancel, editorParams) { - var self = this, - cellEl = cell.getElement(), - initialValue = cell.getValue(), - input = document.createElement("input"), - listEl = document.createElement("div"), - allItems = [], - displayItems = [], - currentItem = {}, - blurable = true; - - function getUniqueColumnValues() { - var output = {}, - column = cell.getColumn()._getSelf(), - data = self.table.getData(); - - data.forEach(function (row) { - var val = column.getFieldValue(row); - - if (val !== null && typeof val !== "undefined" && val !== "") { - output[val] = true; - } - }); - - return Object.keys(output); - } - - function parseItems(inputValues, curentValue) { - var itemList = []; - - if (Array.isArray(inputValues)) { - inputValues.forEach(function (value) { - var item = { - title: editorParams.listItemFormatter ? editorParams.listItemFormatter(value, value) : value, - value: value, - element: false - }; - - if (item.value === curentValue) { - setCurrentItem(item); - } - - itemList.push(item); - }); - } else { - for (var key in inputValues) { - var item = { - title: editorParams.listItemFormatter ? editorParams.listItemFormatter(key, inputValues[key]) : inputValues[key], - value: key, - element: false - }; - - if (item.value === curentValue) { - setCurrentItem(item); - } - - itemList.push(item); - } - } - - allItems = itemList; - } - - function filterList(term) { - var matches = []; - - if (editorParams.searchFunc) { - matches = editorParams.searchFunc(term, values); - } else { - if (term === "") { - - if (editorParams.showListOnEmpty) { - allItems.forEach(function (item) { - matches.push(item); - }); - } - } else { - allItems.forEach(function (item) { - - if (item.value !== null || typeof item.value !== "undefined") { - if (String(item.value).toLowerCase().indexOf(String(term).toLowerCase()) > -1) { - matches.push(item); - } - } - }); - } - } - - displayItems = matches; - - fillList(); - } - - function fillList() { - var current = false; - - while (listEl.firstChild) { - listEl.removeChild(listEl.firstChild); - }displayItems.forEach(function (item) { - var el = item.element; - - if (!el) { - el = document.createElement("div"); - el.classList.add("tabulator-edit-select-list-item"); - el.tabIndex = 0; - el.innerHTML = item.title; - - el.addEventListener("click", function () { - setCurrentItem(item); - chooseItem(); - }); - - el.addEventListener("mousedown", function () { - blurable = false; - - setTimeout(function () { - blurable = true; - }, 10); - }); - - item.element = el; - - if (item === currentItem) { - item.element.classList.add("active"); - current = true; - } - } - - listEl.appendChild(el); - }); - - if (!current) { - setCurrentItem(false); - } - } - - function setCurrentItem(item, showInputValue) { - if (currentItem && currentItem.element) { - currentItem.element.classList.remove("active"); - } - - currentItem = item; - - if (item && item.element) { - item.element.classList.add("active"); - } - } - - function chooseItem() { - hideList(); - - if (currentItem) { - if (initialValue !== currentItem.value) { - initialValue = currentItem.value; - input.value = currentItem.value; - success(input.value); - } else { - cancel(); - } - } else { - if (editorParams.freetext) { - initialValue = input.value; - success(input.value); - } else { - if (editorParams.allowEmpty && input.value === "") { - initialValue = input.value; - success(input.value); - } else { - cancel(); - } - } - } - } - - function cancelItem() { - hideList(); - cancel(); - } - - function showList() { - if (!listEl.parentNode) { - while (listEl.firstChild) { - listEl.removeChild(listEl.firstChild); - }if (editorParams.values === true) { - parseItems(getUniqueColumnValues(), initialValue); - } else { - parseItems(editorParams.values || [], initialValue); - } - - var offset = Tabulator.prototype.helpers.elOffset(cellEl); - - listEl.style.minWidth = cellEl.offsetWidth + "px"; - - listEl.style.top = offset.top + cellEl.offsetHeight + "px"; - listEl.style.left = offset.left + "px"; - document.body.appendChild(listEl); - } - } - - function hideList() { - if (listEl.parentNode) { - listEl.parentNode.removeChild(listEl); - } - } - - //style input - input.setAttribute("type", "text"); - - input.style.padding = "4px"; - input.style.width = "100%"; - input.style.boxSizing = "border-box"; - - //allow key based navigation - input.addEventListener("keydown", function (e) { - var index; - - switch (e.keyCode) { - case 38: - //up arrow - e.stopImmediatePropagation(); - e.stopPropagation(); - - index = displayItems.indexOf(currentItem); - - if (index > 0) { - setCurrentItem(displayItems[index - 1]); - } else { - setCurrentItem(false); - } - break; - - case 40: - //down arrow - e.stopImmediatePropagation(); - e.stopPropagation(); - - index = displayItems.indexOf(currentItem); - - if (index < displayItems.length - 1) { - if (index == -1) { - setCurrentItem(displayItems[0]); - } else { - setCurrentItem(displayItems[index + 1]); - } - } - break; - - case 13: - //enter - chooseItem(); - break; - - case 27: - //escape - cancelItem(); - break; - } - }); - - input.addEventListener("keyup", function (e) { - - switch (e.keyCode) { - case 38: //up arrow - case 37: //left arrow - case 39: //up arrow - case 40: //right arrow - case 13: //enter - case 27: - //escape - break; - - default: - filterList(input.value); - } - }); - - input.addEventListener("blur", function (e) { - if (blurable) { - chooseItem(); - } - }); - - input.addEventListener("focus", function (e) { - showList(); - input.value = initialValue; - filterList(initialValue); - }); - - //style list element - listEl = document.createElement("div"); - listEl.classList.add("tabulator-edit-select-list"); - - onRendered(function () { - input.style.height = "100%"; - input.focus(); - }); - - return input; - }, - - //start rating - star: function star(cell, onRendered, success, cancel, editorParams) { - var self = this, - element = cell.getElement(), - value = cell.getValue(), - maxStars = element.getElementsByTagName("svg").length || 5, - size = element.getElementsByTagName("svg")[0] ? element.getElementsByTagName("svg")[0].getAttribute("width") : 14, - stars = [], - starsHolder = document.createElement("div"), - star = document.createElementNS('http://www.w3.org/2000/svg', "svg"); - - //change star type - function starChange(val) { - stars.forEach(function (star, i) { - if (i < val) { - if (self.table.browser == "ie") { - star.setAttribute("class", "tabulator-star-active"); - } else { - star.classList.replace("tabulator-star-inactive", "tabulator-star-active"); - } - - star.innerHTML = ''; - } else { - if (self.table.browser == "ie") { - star.setAttribute("class", "tabulator-star-inactive"); - } else { - star.classList.replace("tabulator-star-active", "tabulator-star-inactive"); - } - - star.innerHTML = ''; - } - }); - } - - //build stars - function buildStar(i) { - var nextStar = star.cloneNode(true); - - stars.push(nextStar); - - nextStar.addEventListener("mouseover", function (e) { - e.stopPropagation(); - starChange(i); - }); - - nextStar.addEventListener("click", function (e) { - e.stopPropagation(); - success(i); - }); - - starsHolder.appendChild(nextStar); - } - - //handle keyboard navigation value change - function changeValue(val) { - value = val; - starChange(val); - } - - //style cell - element.style.whiteSpace = "nowrap"; - element.style.overflow = "hidden"; - element.style.textOverflow = "ellipsis"; - - //style holding element - starsHolder.style.verticalAlign = "middle"; - starsHolder.style.display = "inline-block"; - starsHolder.style.padding = "4px"; - - //style star - star.setAttribute("width", size); - star.setAttribute("height", size); - star.setAttribute("viewBox", "0 0 512 512"); - star.setAttribute("xml:space", "preserve"); - star.style.padding = "0 1px"; - - //create correct number of stars - for (var i = 1; i <= maxStars; i++) { - buildStar(i); - } - - //ensure value does not exceed number of stars - value = Math.min(parseInt(value), maxStars); - - // set initial styling of stars - starChange(value); - - starsHolder.addEventListener("mouseover", function (e) { - starChange(0); - }); - - starsHolder.addEventListener("click", function (e) { - success(0); - }); - - element.addEventListener("blur", function (e) { - cancel(); - }); - - //allow key based navigation - element.addEventListener("keydown", function (e) { - switch (e.keyCode) { - case 39: - //right arrow - changeValue(value + 1); - break; - - case 37: - //left arrow - changeValue(value - 1); - break; - - case 13: - //enter - success(value); - break; - - case 27: - //escape - cancel(); - break; - } - }); - - return starsHolder; - }, - - //draggable progress bar - progress: function progress(cell, onRendered, success, cancel, editorParams) { - var element = cell.getElement(), - max = typeof editorParams.max === "undefined" ? element.getElementsByTagName("div")[0].getAttribute("max") || 100 : editorParams.max, - min = typeof editorParams.min === "undefined" ? element.getElementsByTagName("div")[0].getAttribute("min") || 0 : editorParams.min, - percent = (max - min) / 100, - value = cell.getValue() || 0, - handle = document.createElement("div"), - bar = document.createElement("div"), - mouseDrag, - mouseDragWidth; - - //set new value - function updateValue() { - var calcVal = percent * Math.round(bar.offsetWidth / (element.clientWidth / 100)) + min; - success(calcVal); - element.setAttribute("aria-valuenow", calcVal); - element.setAttribute("aria-label", value); - } - - //style handle - handle.style.position = "absolute"; - handle.style.right = "0"; - handle.style.top = "0"; - handle.style.bottom = "0"; - handle.style.width = "5px"; - handle.classList.add("tabulator-progress-handle"); - - //style bar - bar.style.display = "inline-block"; - bar.style.position = "absolute"; - bar.style.top = "8px"; - bar.style.bottom = "8px"; - bar.style.left = "4px"; - bar.style.marginRight = "4px"; - bar.style.backgroundColor = "#488CE9"; - bar.style.maxWidth = "100%"; - bar.style.minWidth = "0%"; - - //style cell - element.style.padding = "0 4px"; - - //make sure value is in range - value = Math.min(parseFloat(value), max); - value = Math.max(parseFloat(value), min); - - //workout percentage - value = 100 - Math.round((value - min) / percent); - bar.style.right = value + "%"; - - element.setAttribute("aria-valuemin", min); - element.setAttribute("aria-valuemax", max); - - bar.appendChild(handle); - - handle.addEventListener("mousedown", function (e) { - mouseDrag = e.screenX; - mouseDragWidth = bar.offsetWidth; - }); - - handle.addEventListener("mouseover", function () { - handle.style.cursor = "ew-resize"; - }); - - element.addEventListener("mousemove", function (e) { - if (mouseDrag) { - bar.style.width = mouseDragWidth + e.screenX - mouseDrag + "px"; - } - }); - - element.addEventListener("mouseup", function (e) { - if (mouseDrag) { - e.stopPropagation(); - e.stopImmediatePropagation(); - - mouseDrag = false; - mouseDragWidth = false; - - updateValue(); - } - }); - - //allow key based navigation - element.addEventListener("keydown", function (e) { - switch (e.keyCode) { - case 39: - //right arrow - bar.style.width = bar.clientWidth + element.clientWidth / 100 + "px"; - break; - - case 37: - //left arrow - bar.style.width = bar.clientWidth - element.clientWidth / 100 + "px"; - break; - - case 13: - //enter - updateValue(); - break; - - case 27: - //escape - cancel(); - break; - - } - }); - - element.addEventListener("blur", function () { - cancel(); - }); - - return bar; - }, - - //checkbox - tickCross: function tickCross(cell, onRendered, success, cancel, editorParams) { - var value = cell.getValue(), - input = document.createElement("input"), - tristate = editorParams.tristate, - indetermValue = typeof editorParams.indeterminateValue === "undefined" ? null : editorParams.indeterminateValue, - indetermState = false; - - input.setAttribute("type", "checkbox"); - input.style.marginTop = "5px"; - input.style.boxSizing = "border-box"; - - input.value = value; - - if (tristate && (typeof value === "undefined" || value === indetermValue || value === "")) { - indetermState = true; - input.indeterminate = true; - } - - if (this.table.browser != "firefox") { - //prevent blur issue on mac firefox - onRendered(function () { - input.focus(); - }); - } - - input.checked = value === true || value === "true" || value === "True" || value === 1; - - function setValue(blur) { - if (tristate) { - if (!blur) { - if (input.checked && !indetermState) { - input.checked = false; - input.indeterminate = true; - indetermState = true; - return indetermValue; - } else { - indetermState = false; - return input.checked; - } - } else { - if (indetermState) { - return indetermValue; - } else { - return input.checked; - } - } - } else { - return input.checked; - } - } - - //submit new value on blur - input.addEventListener("change", function (e) { - success(setValue()); - }); - - input.addEventListener("blur", function (e) { - success(setValue(true)); - }); - - //submit new value on enter - input.addEventListener("keydown", function (e) { - if (e.keyCode == 13) { - success(setValue()); - } - if (e.keyCode == 27) { - cancel(); - } - }); - - return input; - } -}; - -Tabulator.prototype.registerModule("edit", Edit); \ No newline at end of file diff --git a/Gems/AssetMemoryAnalyzer/External/tabulator-master/dist/js/modules/edit.min.js b/Gems/AssetMemoryAnalyzer/External/tabulator-master/dist/js/modules/edit.min.js deleted file mode 100644 index 0081276b77..0000000000 --- a/Gems/AssetMemoryAnalyzer/External/tabulator-master/dist/js/modules/edit.min.js +++ /dev/null @@ -1,2 +0,0 @@ -/* Tabulator v4.1.2 (c) Oliver Folkerd */ -var _typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Edit=function(e){this.table=e,this.currentCell=!1,this.mouseClick=!1,this.recursionBlock=!1,this.invalidEdit=!1};Edit.prototype.initializeColumn=function(e){var t=this,i={editor:!1,blocked:!1,check:e.definition.editable,params:e.definition.editorParams||{}};switch(_typeof(e.definition.editor)){case"string":"tick"===e.definition.editor&&(e.definition.editor="tickCross",console.warn("DEPRECATION WANRING - the tick editor has been depricated, please use the tickCross editor")),t.editors[e.definition.editor]?i.editor=t.editors[e.definition.editor]:console.warn("Editor Error - No such editor found: ",e.definition.editor);break;case"function":i.editor=e.definition.editor;break;case"boolean":!0===e.definition.editor&&("function"!=typeof e.definition.formatter?("tick"===e.definition.formatter&&(e.definition.formatter="tickCross",console.warn("DEPRECATION WANRING - the tick editor has been depricated, please use the tickCross editor")),t.editors[e.definition.formatter]?i.editor=t.editors[e.definition.formatter]:i.editor=t.editors.input):console.warn("Editor Error - Cannot auto lookup editor for a custom formatter: ",e.definition.formatter))}i.editor&&(e.modules.edit=i)},Edit.prototype.getCurrentCell=function(){return!!this.currentCell&&this.currentCell.getComponent()},Edit.prototype.clearEditor=function(){var e,t=this.currentCell;if(this.invalidEdit=!1,t){for(this.currentCell=!1,e=t.getElement(),e.classList.remove("tabulator-validation-fail"),e.classList.remove("tabulator-editing");e.firstChild;)e.removeChild(e.firstChild);t.row.getElement().classList.remove("tabulator-row-editing")}},Edit.prototype.cancelEdit=function(){if(this.currentCell){var e=this.currentCell,t=this.currentCell.getComponent();this.clearEditor(),e.setValueActual(e.getValue()),e.column.cellEvents.cellEditCancelled&&e.column.cellEvents.cellEditCancelled.call(this.table,t),this.table.options.cellEditCancelled.call(this.table,t)}},Edit.prototype.bindEditor=function(e){var t=this,i=e.getElement();i.setAttribute("tabindex",0),i.addEventListener("click",function(e){i.classList.contains("tabulator-editing")||i.focus()}),i.addEventListener("mousedown",function(e){t.mouseClick=!0}),i.addEventListener("focus",function(i){t.recursionBlock||t.edit(e,i,!1)})},Edit.prototype.focusCellNoEvent=function(e){this.recursionBlock=!0,e.getElement().focus(),this.recursionBlock=!1},Edit.prototype.editCell=function(e,t){this.focusCellNoEvent(e),this.edit(e,!1,t)},Edit.prototype.edit=function(e,t,i){function n(t){if(d.currentCell===e){var i=!0;e.column.modules.validate&&d.table.modExists("validate")&&(i=d.table.modules.validate.validate(e.column.modules.validate,e.getComponent(),t)),!0===i?(d.clearEditor(),e.setValue(t,!0),d.table.options.dataTree&&d.table.modExists("dataTree")&&d.table.modules.dataTree.checkForRestyle(e)):(d.invalidEdit=!0,m.classList.add("tabulator-validation-fail"),d.focusCellNoEvent(e),u(),d.table.options.validationFailed.call(d.table,e.getComponent(),t,i))}}function o(){d.currentCell===e&&(d.cancelEdit(),d.table.options.dataTree&&d.table.modExists("dataTree")&&d.table.modules.dataTree.checkForRestyle(e))}function a(e){u=e}var l,r,s,d=this,c=!0,u=function(){},m=e.getElement();if(this.currentCell)return void(this.invalidEdit||this.cancelEdit());if(e.column.modules.edit.blocked)return this.mouseClick=!1,m.blur(),!1;switch(t&&t.stopPropagation(),_typeof(e.column.modules.edit.check)){case"function":c=e.column.modules.edit.check(e.getComponent());break;case"boolean":c=e.column.modules.edit.check}if(c||i){if(d.cancelEdit(),d.currentCell=e,r=e.getComponent(),this.mouseClick&&(this.mouseClick=!1,e.column.cellEvents.cellClick&&e.column.cellEvents.cellClick.call(this.table,t,r)),e.column.cellEvents.cellEditing&&e.column.cellEvents.cellEditing.call(this.table,r),d.table.options.cellEditing.call(this.table,r),s="function"==typeof e.column.modules.edit.params?e.column.modules.edit.params(r):e.column.modules.edit.params,!1===(l=e.column.modules.edit.editor.call(d,r,a,n,o,s)))return m.blur(),!1;if(!(l instanceof Node))return console.warn("Edit Error - Editor should return an instance of Node, the editor returned:",l),m.blur(),!1;for(m.classList.add("tabulator-editing"),e.row.getElement().classList.add("tabulator-row-editing");m.firstChild;)m.removeChild(m.firstChild);m.appendChild(l),u();for(var f=m.children,v=0;v0&&s(y[t-1]);break;case 40:e.stopImmediatePropagation(),e.stopPropagation(),t=y.indexOf(g),t-1&&t.push(i)}),g=t,s()}function s(){for(var e=!1;y.firstChild;)y.removeChild(y.firstChild);g.forEach(function(t){var i=t.element;i||(i=document.createElement("div"),i.classList.add("tabulator-edit-select-list-item"),i.tabIndex=0,i.innerHTML=t.title,i.addEventListener("click",function(){d(t),c()}),i.addEventListener("mousedown",function(){C=!1,setTimeout(function(){C=!0},10)}),t.element=i,t===k&&(t.element.classList.add("active"),e=!0)),y.appendChild(i)}),e||d(!1)}function d(e,t){k&&k.element&&k.element.classList.remove("active"),k=e,e&&e.element&&e.element.classList.add("active")}function c(){f(),k?h!==k.value?(h=k.value,b.value=k.value,i(b.value)):n():o.freetext?(h=b.value,i(b.value)):o.allowEmpty&&""===b.value?(h=b.value,i(b.value)):n()}function u(){f(),n()}function m(){if(!y.parentNode){for(;y.firstChild;)y.removeChild(y.firstChild);!0===o.values?l(a(),h):l(o.values||[],h);var e=Tabulator.prototype.helpers.elOffset(p);y.style.minWidth=p.offsetWidth+"px",y.style.top=e.top+p.offsetHeight+"px",y.style.left=e.left+"px",document.body.appendChild(y)}}function f(){y.parentNode&&y.parentNode.removeChild(y)}var v=this,p=e.getElement(),h=e.getValue(),b=document.createElement("input"),y=document.createElement("div"),E=[],g=[],k={},C=!0;return b.setAttribute("type","text"),b.style.padding="4px",b.style.width="100%",b.style.boxSizing="border-box",b.addEventListener("keydown",function(e){var t;switch(e.keyCode){case 38:e.stopImmediatePropagation(),e.stopPropagation(),t=g.indexOf(k),d(t>0?g[t-1]:!1);break;case 40:e.stopImmediatePropagation(),e.stopPropagation(),t=g.indexOf(k),t'):("ie"==r.table.browser?t.setAttribute("class","tabulator-star-inactive"):t.classList.replace("tabulator-star-active","tabulator-star-inactive"),t.innerHTML='')})}function l(e){d=e,a(e)}var r=this,s=e.getElement(),d=e.getValue(),c=s.getElementsByTagName("svg").length||5,u=s.getElementsByTagName("svg")[0]?s.getElementsByTagName("svg")[0].getAttribute("width"):14,m=[],f=document.createElement("div"),v=document.createElementNS("http://www.w3.org/2000/svg","svg");s.style.whiteSpace="nowrap",s.style.overflow="hidden",s.style.textOverflow="ellipsis",f.style.verticalAlign="middle",f.style.display="inline-block",f.style.padding="4px",v.setAttribute("width",u),v.setAttribute("height",u),v.setAttribute("viewBox","0 0 512 512"),v.setAttribute("xml:space","preserve"),v.style.padding="0 1px";for(var p=1;p<=c;p++)!function(e){var t=v.cloneNode(!0);m.push(t),t.addEventListener("mouseover",function(t){t.stopPropagation(),a(e)}),t.addEventListener("click",function(t){t.stopPropagation(),i(e)}),f.appendChild(t)}(p);return d=Math.min(parseInt(d),c),a(d),f.addEventListener("mouseover",function(e){a(0)}),f.addEventListener("click",function(e){i(0)}),s.addEventListener("blur",function(e){n()}),s.addEventListener("keydown",function(e){switch(e.keyCode){case 39:l(d+1);break;case 37:l(d-1);break;case 13:i(d);break;case 27:n()}}),f},progress:function(e,t,i,n,o){function a(){var e=u*Math.round(v.offsetWidth/(s.clientWidth/100))+c;i(e),s.setAttribute("aria-valuenow",e),s.setAttribute("aria-label",m)}var l,r,s=e.getElement(),d=void 0===o.max?s.getElementsByTagName("div")[0].getAttribute("max")||100:o.max,c=void 0===o.min?s.getElementsByTagName("div")[0].getAttribute("min")||0:o.min,u=(d-c)/100,m=e.getValue()||0,f=document.createElement("div"),v=document.createElement("div");return f.style.position="absolute",f.style.right="0",f.style.top="0",f.style.bottom="0",f.style.width="5px",f.classList.add("tabulator-progress-handle"),v.style.display="inline-block",v.style.position="absolute",v.style.top="8px",v.style.bottom="8px",v.style.left="4px",v.style.marginRight="4px",v.style.backgroundColor="#488CE9",v.style.maxWidth="100%",v.style.minWidth="0%",s.style.padding="0 4px",m=Math.min(parseFloat(m),d),m=Math.max(parseFloat(m),c),m=100-Math.round((m-c)/u),v.style.right=m+"%",s.setAttribute("aria-valuemin",c),s.setAttribute("aria-valuemax",d),v.appendChild(f),f.addEventListener("mousedown",function(e){l=e.screenX,r=v.offsetWidth}),f.addEventListener("mouseover",function(){f.style.cursor="ew-resize"}),s.addEventListener("mousemove",function(e){l&&(v.style.width=r+e.screenX-l+"px")}),s.addEventListener("mouseup",function(e){l&&(e.stopPropagation(),e.stopImmediatePropagation(),l=!1,r=!1,a())}),s.addEventListener("keydown",function(e){switch(e.keyCode){case 39:v.style.width=v.clientWidth+s.clientWidth/100+"px";break;case 37:v.style.width=v.clientWidth-s.clientWidth/100+"px";break;case 13:a();break;case 27:n()}}),s.addEventListener("blur",function(){n()}),v},tickCross:function(e,t,i,n,o){function a(e){return s?e?c?d:r.checked:r.checked&&!c?(r.checked=!1,r.indeterminate=!0,c=!0,d):(c=!1,r.checked):r.checked}var l=e.getValue(),r=document.createElement("input"),s=o.tristate,d=void 0===o.indeterminateValue?null:o.indeterminateValue,c=!1;return r.setAttribute("type","checkbox"),r.style.marginTop="5px",r.style.boxSizing="border-box",r.value=l,!s||void 0!==l&&l!==d&&""!==l||(c=!0,r.indeterminate=!0),"firefox"!=this.table.browser&&t(function(){r.focus()}),r.checked=!0===l||"true"===l||"True"===l||1===l,r.addEventListener("change",function(e){i(a())}),r.addEventListener("blur",function(e){i(a(!0))}),r.addEventListener("keydown",function(e){13==e.keyCode&&i(a()),27==e.keyCode&&n()}),r}},Tabulator.prototype.registerModule("edit",Edit); \ No newline at end of file diff --git a/Gems/AssetMemoryAnalyzer/External/tabulator-master/dist/js/modules/filter.js b/Gems/AssetMemoryAnalyzer/External/tabulator-master/dist/js/modules/filter.js deleted file mode 100644 index 1a9d5f4888..0000000000 --- a/Gems/AssetMemoryAnalyzer/External/tabulator-master/dist/js/modules/filter.js +++ /dev/null @@ -1,695 +0,0 @@ -var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol" ? function (obj) { return typeof obj; } : function (obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; - -/* Tabulator v4.1.2 (c) Oliver Folkerd */ - -var Filter = function Filter(table) { - - this.table = table; //hold Tabulator object - - this.filterList = []; //hold filter list - this.headerFilters = {}; //hold column filters - this.headerFilterElements = []; //hold header filter elements for manipulation - this.headerFilterColumns = []; //hold columns that use header filters - - this.changed = false; //has filtering changed since last render -}; - -//initialize column header filter -Filter.prototype.initializeColumn = function (column, value) { - var self = this, - field = column.getField(), - prevSuccess, - params; - - //handle successfull value change - function success(value) { - var filterType = column.modules.filter.tagType == "input" && column.modules.filter.attrType == "text" || column.modules.filter.tagType == "textarea" ? "partial" : "match", - type = "", - filterFunc; - - if (typeof prevSuccess === "undefined" || prevSuccess !== value) { - - prevSuccess = value; - - if (!column.modules.filter.emptyFunc(value)) { - column.modules.filter.value = value; - - switch (_typeof(column.definition.headerFilterFunc)) { - case "string": - if (self.filters[column.definition.headerFilterFunc]) { - type = column.definition.headerFilterFunc; - filterFunc = function filterFunc(data) { - return self.filters[column.definition.headerFilterFunc](value, column.getFieldValue(data)); - }; - } else { - console.warn("Header Filter Error - Matching filter function not found: ", column.definition.headerFilterFunc); - } - break; - - case "function": - filterFunc = function filterFunc(data) { - var params = column.definition.headerFilterFuncParams || {}; - var fieldVal = column.getFieldValue(data); - - params = typeof params === "function" ? params(value, fieldVal, data) : params; - - return column.definition.headerFilterFunc(value, fieldVal, data, params); - }; - - type = filterFunc; - break; - } - - if (!filterFunc) { - switch (filterType) { - case "partial": - filterFunc = function filterFunc(data) { - return String(column.getFieldValue(data)).toLowerCase().indexOf(String(value).toLowerCase()) > -1; - }; - type = "like"; - break; - - default: - filterFunc = function filterFunc(data) { - return column.getFieldValue(data) == value; - }; - type = "="; - } - } - - self.headerFilters[field] = { value: value, func: filterFunc, type: type }; - } else { - delete self.headerFilters[field]; - } - - self.changed = true; - - self.table.rowManager.filterRefresh(); - } - } - - column.modules.filter = { - success: success, - attrType: false, - tagType: false, - emptyFunc: false - }; - - this.generateHeaderFilterElement(column); -}; - -Filter.prototype.generateHeaderFilterElement = function (column, initialValue) { - var self = this, - success = column.modules.filter.success, - field = column.getField(), - filterElement, - editor, - editorElement, - cellWrapper, - typingTimer, - searchTrigger, - params; - - //handle aborted edit - function cancel() {} - - if (column.modules.filter.headerElement && column.modules.filter.headerElement.parentNode) { - column.modules.filter.headerElement.parentNode.removeChild(column.modules.filter.headerElement); - } - - if (field) { - - //set empty value function - column.modules.filter.emptyFunc = column.definition.headerFilterEmptyCheck || function (value) { - return !value && value !== "0"; - }; - - filterElement = document.createElement("div"); - filterElement.classList.add("tabulator-header-filter"); - - //set column editor - switch (_typeof(column.definition.headerFilter)) { - case "string": - if (self.table.modules.edit.editors[column.definition.headerFilter]) { - editor = self.table.modules.edit.editors[column.definition.headerFilter]; - - if ((column.definition.headerFilter === "tick" || column.definition.headerFilter === "tickCross") && !column.definition.headerFilterEmptyCheck) { - column.modules.filter.emptyFunc = function (value) { - return value !== true && value !== false; - }; - } - } else { - console.warn("Filter Error - Cannot build header filter, No such editor found: ", column.definition.editor); - } - break; - - case "function": - editor = column.definition.headerFilter; - break; - - case "boolean": - if (column.modules.edit && column.modules.edit.editor) { - editor = column.modules.edit.editor; - } else { - if (column.definition.formatter && self.table.modules.edit.editors[column.definition.formatter]) { - editor = self.table.modules.edit.editors[column.definition.formatter]; - - if ((column.definition.formatter === "tick" || column.definition.formatter === "tickCross") && !column.definition.headerFilterEmptyCheck) { - column.modules.filter.emptyFunc = function (value) { - return value !== true && value !== false; - }; - } - } else { - editor = self.table.modules.edit.editors["input"]; - } - } - break; - } - - if (editor) { - - cellWrapper = { - getValue: function getValue() { - return typeof initialValue !== "undefined" ? initialValue : ""; - }, - getField: function getField() { - return column.definition.field; - }, - getElement: function getElement() { - return filterElement; - }, - getColumn: function getColumn() { - return column.getComponent(); - }, - getRow: function getRow() { - return { - normalizeHeight: function normalizeHeight() {} - }; - } - }; - - params = column.definition.headerFilterParams || {}; - - params = typeof params === "function" ? params.call(self.table) : params; - - editorElement = editor.call(this.table.modules.edit, cellWrapper, function () {}, success, cancel, params); - - if (!editorElement) { - console.warn("Filter Error - Cannot add filter to " + field + " column, editor returned a value of false"); - return; - } - - if (!(editorElement instanceof Node)) { - console.warn("Filter Error - Cannot add filter to " + field + " column, editor should return an instance of Node, the editor returned:", editorElement); - return; - } - - //set Placeholder Text - if (field) { - self.table.modules.localize.bind("headerFilters|columns|" + column.definition.field, function (value) { - editorElement.setAttribute("placeholder", typeof value !== "undefined" && value ? value : self.table.modules.localize.getText("headerFilters|default")); - }); - } else { - self.table.modules.localize.bind("headerFilters|default", function (value) { - editorElement.setAttribute("placeholder", typeof self.column.definition.headerFilterPlaceholder !== "undefined" && self.column.definition.headerFilterPlaceholder ? self.column.definition.headerFilterPlaceholder : value); - }); - } - - //focus on element on click - editorElement.addEventListener("click", function (e) { - e.stopPropagation(); - editorElement.focus(); - }); - - //live update filters as user types - typingTimer = false; - - searchTrigger = function searchTrigger(e) { - if (typingTimer) { - clearTimeout(typingTimer); - } - - typingTimer = setTimeout(function () { - success(editorElement.value); - }, 300); - }; - - column.modules.filter.headerElement = editorElement; - column.modules.filter.attrType = editorElement.hasAttribute("type") ? editorElement.getAttribute("type").toLowerCase() : ""; - column.modules.filter.tagType = editorElement.tagName.toLowerCase(); - - if (column.definition.headerFilterLiveFilter !== false) { - - if (!(column.definition.headerFilter === "autocomplete" || column.definition.editor === "autocomplete" && column.definition.headerFilter === true)) { - editorElement.addEventListener("keyup", searchTrigger); - editorElement.addEventListener("search", searchTrigger); - - //update number filtered columns on change - if (column.modules.filter.attrType == "number") { - editorElement.addEventListener("change", function (e) { - success(editorElement.value); - }); - } - - //change text inputs to search inputs to allow for clearing of field - if (column.modules.filter.attrType == "text" && this.table.browser !== "ie") { - editorElement.setAttribute("type", "search"); - // editorElement.off("change blur"); //prevent blur from triggering filter and preventing selection click - } - } - - //prevent input and select elements from propegating click to column sorters etc - if (column.modules.filter.tagType == "input" || column.modules.filter.tagType == "select" || column.modules.filter.tagType == "textarea") { - editorElement.addEventListener("mousedown", function (e) { - e.stopPropagation(); - }); - } - } - - filterElement.appendChild(editorElement); - - column.contentElement.appendChild(filterElement); - - self.headerFilterElements.push(editorElement); - self.headerFilterColumns.push(column); - } - } else { - console.warn("Filter Error - Cannot add header filter, column has no field set:", column.definition.title); - } -}; - -//hide all header filter elements (used to ensure correct column widths in "fitData" layout mode) -Filter.prototype.hideHeaderFilterElements = function () { - this.headerFilterElements.forEach(function (element) { - element.style.display = 'none'; - }); -}; - -//show all header filter elements (used to ensure correct column widths in "fitData" layout mode) -Filter.prototype.showHeaderFilterElements = function () { - this.headerFilterElements.forEach(function (element) { - element.style.display = ''; - }); -}; - -//programatically set value of header filter -Filter.prototype.setHeaderFilterFocus = function (column) { - if (column.modules.filter && column.modules.filter.headerElement) { - column.modules.filter.headerElement.focus(); - } else { - console.warn("Column Filter Focus Error - No header filter set on column:", column.getField()); - } -}; - -//programatically set value of header filter -Filter.prototype.setHeaderFilterValue = function (column, value) { - if (column) { - if (column.modules.filter && column.modules.filter.headerElement) { - this.generateHeaderFilterElement(column, value); - column.modules.filter.success(value); - } else { - console.warn("Column Filter Error - No header filter set on column:", column.getField()); - } - } -}; - -Filter.prototype.reloadHeaderFilter = function (column) { - if (column) { - if (column.modules.filter && column.modules.filter.headerElement) { - this.generateHeaderFilterElement(column, column.modules.filter.value); - } else { - console.warn("Column Filter Error - No header filter set on column:", column.getField()); - } - } -}; - -//check if the filters has changed since last use -Filter.prototype.hasChanged = function () { - var changed = this.changed; - this.changed = false; - return changed; -}; - -//set standard filters -Filter.prototype.setFilter = function (field, type, value) { - var self = this; - - self.filterList = []; - - if (!Array.isArray(field)) { - field = [{ field: field, type: type, value: value }]; - } - - self.addFilter(field); -}; - -//add filter to array -Filter.prototype.addFilter = function (field, type, value) { - var self = this; - - if (!Array.isArray(field)) { - field = [{ field: field, type: type, value: value }]; - } - - field.forEach(function (filter) { - - filter = self.findFilter(filter); - - if (filter) { - self.filterList.push(filter); - - self.changed = true; - } - }); - - if (this.table.options.persistentFilter && this.table.modExists("persistence", true)) { - this.table.modules.persistence.save("filter"); - } -}; - -Filter.prototype.findFilter = function (filter) { - var self = this, - column; - - if (Array.isArray(filter)) { - return this.findSubFilters(filter); - } - - var filterFunc = false; - - if (typeof filter.field == "function") { - filterFunc = function filterFunc(data) { - return filter.field(data, filter.type || {}); // pass params to custom filter function - }; - } else { - - if (self.filters[filter.type]) { - - column = self.table.columnManager.getColumnByField(filter.field); - - if (column) { - filterFunc = function filterFunc(data) { - return self.filters[filter.type](filter.value, column.getFieldValue(data)); - }; - } else { - filterFunc = function filterFunc(data) { - return self.filters[filter.type](filter.value, data[filter.field]); - }; - } - } else { - console.warn("Filter Error - No such filter type found, ignoring: ", filter.type); - } - } - - filter.func = filterFunc; - - return filter.func ? filter : false; -}; - -Filter.prototype.findSubFilters = function (filters) { - var self = this, - output = []; - - filters.forEach(function (filter) { - filter = self.findFilter(filter); - - if (filter) { - output.push(filter); - } - }); - - return output.length ? output : false; -}; - -//get all filters -Filter.prototype.getFilters = function (all, ajax) { - var self = this, - output = []; - - if (all) { - output = self.getHeaderFilters(); - } - - self.filterList.forEach(function (filter) { - output.push({ field: filter.field, type: filter.type, value: filter.value }); - }); - - if (ajax) { - output.forEach(function (item) { - if (typeof item.type == "function") { - item.type = "function"; - } - }); - } - - return output; -}; - -//get all filters -Filter.prototype.getHeaderFilters = function () { - var self = this, - output = []; - - for (var key in this.headerFilters) { - output.push({ field: key, type: this.headerFilters[key].type, value: this.headerFilters[key].value }); - } - - return output; -}; - -//remove filter from array -Filter.prototype.removeFilter = function (field, type, value) { - var self = this; - - if (!Array.isArray(field)) { - field = [{ field: field, type: type, value: value }]; - } - - field.forEach(function (filter) { - var index = -1; - - if (_typeof(filter.field) == "object") { - index = self.filterList.findIndex(function (element) { - return filter === element; - }); - } else { - index = self.filterList.findIndex(function (element) { - return filter.field === element.field && filter.type === element.type && filter.value === element.value; - }); - } - - if (index > -1) { - self.filterList.splice(index, 1); - self.changed = true; - } else { - console.warn("Filter Error - No matching filter type found, ignoring: ", filter.type); - } - }); - - if (this.table.options.persistentFilter && this.table.modExists("persistence", true)) { - this.table.modules.persistence.save("filter"); - } -}; - -//clear filters -Filter.prototype.clearFilter = function (all) { - this.filterList = []; - - if (all) { - this.clearHeaderFilter(); - } - - this.changed = true; - - if (this.table.options.persistentFilter && this.table.modExists("persistence", true)) { - this.table.modules.persistence.save("filter"); - } -}; - -//clear header filters -Filter.prototype.clearHeaderFilter = function () { - var self = this; - - this.headerFilters = {}; - - this.headerFilterColumns.forEach(function (column) { - column.modules.filter.value = null; - self.reloadHeaderFilter(column); - }); - - this.changed = true; -}; - -//search data and return matching rows -Filter.prototype.search = function (searchType, field, type, value) { - var self = this, - activeRows = [], - filterList = []; - - if (!Array.isArray(field)) { - field = [{ field: field, type: type, value: value }]; - } - - field.forEach(function (filter) { - filter = self.findFilter(filter); - - if (filter) { - filterList.push(filter); - } - }); - - this.table.rowManager.rows.forEach(function (row) { - var match = true; - - filterList.forEach(function (filter) { - if (!self.filterRecurse(filter, row.getData())) { - match = false; - } - }); - - if (match) { - activeRows.push(searchType === "data" ? row.getData("data") : row.getComponent()); - } - }); - - return activeRows; -}; - -//filter row array -Filter.prototype.filter = function (rowList, filters) { - var self = this, - activeRows = [], - activeRowComponents = []; - - if (self.table.options.dataFiltering) { - self.table.options.dataFiltering.call(self.table, self.getFilters()); - } - - if (!self.table.options.ajaxFiltering && (self.filterList.length || Object.keys(self.headerFilters).length)) { - - rowList.forEach(function (row) { - if (self.filterRow(row)) { - activeRows.push(row); - } - }); - } else { - activeRows = rowList.slice(0); - } - - if (self.table.options.dataFiltered) { - - activeRows.forEach(function (row) { - activeRowComponents.push(row.getComponent()); - }); - - self.table.options.dataFiltered.call(self.table, self.getFilters(), activeRowComponents); - } - - return activeRows; -}; - -//filter individual row -Filter.prototype.filterRow = function (row, filters) { - var self = this, - match = true, - data = row.getData(); - - self.filterList.forEach(function (filter) { - if (!self.filterRecurse(filter, data)) { - match = false; - } - }); - - for (var field in self.headerFilters) { - if (!self.headerFilters[field].func(data)) { - match = false; - } - } - - return match; -}; - -Filter.prototype.filterRecurse = function (filter, data) { - var self = this, - match = false; - - if (Array.isArray(filter)) { - filter.forEach(function (subFilter) { - if (self.filterRecurse(subFilter, data)) { - match = true; - } - }); - } else { - match = filter.func(data); - } - - return match; -}; - -//list of available filters -Filter.prototype.filters = { - - //equal to - "=": function _(filterVal, rowVal) { - return rowVal == filterVal ? true : false; - }, - - //less than - "<": function _(filterVal, rowVal) { - return rowVal < filterVal ? true : false; - }, - - //less than or equal to - "<=": function _(filterVal, rowVal) { - return rowVal <= filterVal ? true : false; - }, - - //greater than - ">": function _(filterVal, rowVal) { - return rowVal > filterVal ? true : false; - }, - - //greater than or equal to - ">=": function _(filterVal, rowVal) { - return rowVal >= filterVal ? true : false; - }, - - //not equal to - "!=": function _(filterVal, rowVal) { - return rowVal != filterVal ? true : false; - }, - - "regex": function regex(filterVal, rowVal) { - - if (typeof filterVal == "string") { - filterVal = new RegExp(filterVal); - } - - return filterVal.test(rowVal); - }, - - //contains the string - "like": function like(filterVal, rowVal) { - if (filterVal === null || typeof filterVal === "undefined") { - return rowVal === filterVal ? true : false; - } else { - if (typeof rowVal !== 'undefined' && rowVal !== null) { - return String(rowVal).toLowerCase().indexOf(filterVal.toLowerCase()) > -1 ? true : false; - } else { - return false; - } - } - }, - - //in array - "in": function _in(filterVal, rowVal) { - if (Array.isArray(filterVal)) { - return filterVal.indexOf(rowVal) > -1; - } else { - console.warn("Filter Error - filter value is not an array:", filterVal); - return false; - } - } -}; - -Tabulator.prototype.registerModule("filter", Filter); \ No newline at end of file diff --git a/Gems/AssetMemoryAnalyzer/External/tabulator-master/dist/js/modules/filter.min.js b/Gems/AssetMemoryAnalyzer/External/tabulator-master/dist/js/modules/filter.min.js deleted file mode 100644 index 919f5309c0..0000000000 --- a/Gems/AssetMemoryAnalyzer/External/tabulator-master/dist/js/modules/filter.min.js +++ /dev/null @@ -1,2 +0,0 @@ -/* Tabulator v4.1.2 (c) Oliver Folkerd */ -var _typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Filter=function(e){this.table=e,this.filterList=[],this.headerFilters={},this.headerFilterElements=[],this.headerFilterColumns=[],this.changed=!1};Filter.prototype.initializeColumn=function(e,t){function i(t){var i,o="input"==e.modules.filter.tagType&&"text"==e.modules.filter.attrType||"textarea"==e.modules.filter.tagType?"partial":"match",a="";if(void 0===r||r!==t){if(r=t,e.modules.filter.emptyFunc(t))delete n.headerFilters[l];else{switch(e.modules.filter.value=t,_typeof(e.definition.headerFilterFunc)){case"string":n.filters[e.definition.headerFilterFunc]?(a=e.definition.headerFilterFunc,i=function(i){return n.filters[e.definition.headerFilterFunc](t,e.getFieldValue(i))}):console.warn("Header Filter Error - Matching filter function not found: ",e.definition.headerFilterFunc);break;case"function":i=function(i){var r=e.definition.headerFilterFuncParams||{},n=e.getFieldValue(i);return r="function"==typeof r?r(t,n,i):r,e.definition.headerFilterFunc(t,n,i,r)},a=i}if(!i)switch(o){case"partial":i=function(i){return String(e.getFieldValue(i)).toLowerCase().indexOf(String(t).toLowerCase())>-1},a="like";break;default:i=function(i){return e.getFieldValue(i)==t},a="="}n.headerFilters[l]={value:t,func:i,type:a}}n.changed=!0,n.table.rowManager.filterRefresh()}}var r,n=this,l=e.getField();e.modules.filter={success:i,attrType:!1,tagType:!1,emptyFunc:!1},this.generateHeaderFilterElement(e)},Filter.prototype.generateHeaderFilterElement=function(e,t){function i(){}var r,n,l,o,a,d,s,u=this,f=e.modules.filter.success,c=e.getField();if(e.modules.filter.headerElement&&e.modules.filter.headerElement.parentNode&&e.modules.filter.headerElement.parentNode.removeChild(e.modules.filter.headerElement),c){switch(e.modules.filter.emptyFunc=e.definition.headerFilterEmptyCheck||function(e){return!e&&"0"!==e},r=document.createElement("div"),r.classList.add("tabulator-header-filter"),_typeof(e.definition.headerFilter)){case"string":u.table.modules.edit.editors[e.definition.headerFilter]?(n=u.table.modules.edit.editors[e.definition.headerFilter],"tick"!==e.definition.headerFilter&&"tickCross"!==e.definition.headerFilter||e.definition.headerFilterEmptyCheck||(e.modules.filter.emptyFunc=function(e){return!0!==e&&!1!==e})):console.warn("Filter Error - Cannot build header filter, No such editor found: ",e.definition.editor);break;case"function":n=e.definition.headerFilter;break;case"boolean":e.modules.edit&&e.modules.edit.editor?n=e.modules.edit.editor:e.definition.formatter&&u.table.modules.edit.editors[e.definition.formatter]?(n=u.table.modules.edit.editors[e.definition.formatter],"tick"!==e.definition.formatter&&"tickCross"!==e.definition.formatter||e.definition.headerFilterEmptyCheck||(e.modules.filter.emptyFunc=function(e){return!0!==e&&!1!==e})):n=u.table.modules.edit.editors.input}if(n){if(o={getValue:function(){return void 0!==t?t:""},getField:function(){return e.definition.field},getElement:function(){return r},getColumn:function(){return e.getComponent()},getRow:function(){return{normalizeHeight:function(){}}}},s=e.definition.headerFilterParams||{},s="function"==typeof s?s.call(u.table):s,!(l=n.call(this.table.modules.edit,o,function(){},f,i,s)))return void console.warn("Filter Error - Cannot add filter to "+c+" column, editor returned a value of false");if(!(l instanceof Node))return void console.warn("Filter Error - Cannot add filter to "+c+" column, editor should return an instance of Node, the editor returned:",l);c?u.table.modules.localize.bind("headerFilters|columns|"+e.definition.field,function(e){l.setAttribute("placeholder",void 0!==e&&e?e:u.table.modules.localize.getText("headerFilters|default"))}):u.table.modules.localize.bind("headerFilters|default",function(e){l.setAttribute("placeholder",void 0!==u.column.definition.headerFilterPlaceholder&&u.column.definition.headerFilterPlaceholder?u.column.definition.headerFilterPlaceholder:e)}),l.addEventListener("click",function(e){e.stopPropagation(),l.focus()}),a=!1,d=function(e){a&&clearTimeout(a),a=setTimeout(function(){f(l.value)},300)},e.modules.filter.headerElement=l,e.modules.filter.attrType=l.hasAttribute("type")?l.getAttribute("type").toLowerCase():"",e.modules.filter.tagType=l.tagName.toLowerCase(),!1!==e.definition.headerFilterLiveFilter&&("autocomplete"===e.definition.headerFilter||"autocomplete"===e.definition.editor&&!0===e.definition.headerFilter||(l.addEventListener("keyup",d),l.addEventListener("search",d),"number"==e.modules.filter.attrType&&l.addEventListener("change",function(e){f(l.value)}),"text"==e.modules.filter.attrType&&"ie"!==this.table.browser&&l.setAttribute("type","search")),"input"!=e.modules.filter.tagType&&"select"!=e.modules.filter.tagType&&"textarea"!=e.modules.filter.tagType||l.addEventListener("mousedown",function(e){e.stopPropagation()})),r.appendChild(l),e.contentElement.appendChild(r),u.headerFilterElements.push(l),u.headerFilterColumns.push(e)}}else console.warn("Filter Error - Cannot add header filter, column has no field set:",e.definition.title)},Filter.prototype.hideHeaderFilterElements=function(){this.headerFilterElements.forEach(function(e){e.style.display="none"})},Filter.prototype.showHeaderFilterElements=function(){this.headerFilterElements.forEach(function(e){e.style.display=""})},Filter.prototype.setHeaderFilterFocus=function(e){e.modules.filter&&e.modules.filter.headerElement?e.modules.filter.headerElement.focus():console.warn("Column Filter Focus Error - No header filter set on column:",e.getField())},Filter.prototype.setHeaderFilterValue=function(e,t){e&&(e.modules.filter&&e.modules.filter.headerElement?(this.generateHeaderFilterElement(e,t),e.modules.filter.success(t)):console.warn("Column Filter Error - No header filter set on column:",e.getField()))},Filter.prototype.reloadHeaderFilter=function(e){e&&(e.modules.filter&&e.modules.filter.headerElement?this.generateHeaderFilterElement(e,e.modules.filter.value):console.warn("Column Filter Error - No header filter set on column:",e.getField()))},Filter.prototype.hasChanged=function(){var e=this.changed;return this.changed=!1,e},Filter.prototype.setFilter=function(e,t,i){var r=this;r.filterList=[],Array.isArray(e)||(e=[{field:e,type:t,value:i}]),r.addFilter(e)},Filter.prototype.addFilter=function(e,t,i){var r=this;Array.isArray(e)||(e=[{field:e,type:t,value:i}]),e.forEach(function(e){(e=r.findFilter(e))&&(r.filterList.push(e),r.changed=!0)}),this.table.options.persistentFilter&&this.table.modExists("persistence",!0)&&this.table.modules.persistence.save("filter")},Filter.prototype.findFilter=function(e){var t,i=this;if(Array.isArray(e))return this.findSubFilters(e);var r=!1;return"function"==typeof e.field?r=function(t){return e.field(t,e.type||{})}:i.filters[e.type]?(t=i.table.columnManager.getColumnByField(e.field),r=t?function(r){return i.filters[e.type](e.value,t.getFieldValue(r))}:function(t){return i.filters[e.type](e.value,t[e.field])}):console.warn("Filter Error - No such filter type found, ignoring: ",e.type),e.func=r,!!e.func&&e},Filter.prototype.findSubFilters=function(e){var t=this,i=[];return e.forEach(function(e){(e=t.findFilter(e))&&i.push(e)}),!!i.length&&i},Filter.prototype.getFilters=function(e,t){var i=this,r=[];return e&&(r=i.getHeaderFilters()),i.filterList.forEach(function(e){r.push({field:e.field,type:e.type,value:e.value})}),t&&r.forEach(function(e){"function"==typeof e.type&&(e.type="function")}),r},Filter.prototype.getHeaderFilters=function(){var e=[];for(var t in this.headerFilters)e.push({field:t,type:this.headerFilters[t].type,value:this.headerFilters[t].value});return e},Filter.prototype.removeFilter=function(e,t,i){var r=this;Array.isArray(e)||(e=[{field:e,type:t,value:i}]),e.forEach(function(e){var t=-1;t="object"==_typeof(e.field)?r.filterList.findIndex(function(t){return e===t}):r.filterList.findIndex(function(t){return e.field===t.field&&e.type===t.type&&e.value===t.value}),t>-1?(r.filterList.splice(t,1),r.changed=!0):console.warn("Filter Error - No matching filter type found, ignoring: ",e.type)}),this.table.options.persistentFilter&&this.table.modExists("persistence",!0)&&this.table.modules.persistence.save("filter")},Filter.prototype.clearFilter=function(e){this.filterList=[],e&&this.clearHeaderFilter(),this.changed=!0,this.table.options.persistentFilter&&this.table.modExists("persistence",!0)&&this.table.modules.persistence.save("filter")},Filter.prototype.clearHeaderFilter=function(){var e=this;this.headerFilters={},this.headerFilterColumns.forEach(function(t){t.modules.filter.value=null,e.reloadHeaderFilter(t)}),this.changed=!0},Filter.prototype.search=function(e,t,i,r){var n=this,l=[],o=[];return Array.isArray(t)||(t=[{field:t,type:i,value:r}]),t.forEach(function(e){(e=n.findFilter(e))&&o.push(e)}),this.table.rowManager.rows.forEach(function(t){var i=!0;o.forEach(function(e){n.filterRecurse(e,t.getData())||(i=!1)}),i&&l.push("data"===e?t.getData("data"):t.getComponent())}),l},Filter.prototype.filter=function(e,t){var i=this,r=[],n=[];return i.table.options.dataFiltering&&i.table.options.dataFiltering.call(i.table,i.getFilters()),i.table.options.ajaxFiltering||!i.filterList.length&&!Object.keys(i.headerFilters).length?r=e.slice(0):e.forEach(function(e){i.filterRow(e)&&r.push(e)}),i.table.options.dataFiltered&&(r.forEach(function(e){n.push(e.getComponent())}),i.table.options.dataFiltered.call(i.table,i.getFilters(),n)),r},Filter.prototype.filterRow=function(e,t){var i=this,r=!0,n=e.getData();i.filterList.forEach(function(e){i.filterRecurse(e,n)||(r=!1)});for(var l in i.headerFilters)i.headerFilters[l].func(n)||(r=!1);return r},Filter.prototype.filterRecurse=function(e,t){var i=this,r=!1;return Array.isArray(e)?e.forEach(function(e){i.filterRecurse(e,t)&&(r=!0)}):r=e.func(t),r},Filter.prototype.filters={"=":function(e,t){return t==e},"<":function(e,t){return t":function(e,t){return t>e},">=":function(e,t){return t>=e},"!=":function(e,t){return t!=e},regex:function(e,t){return"string"==typeof e&&(e=new RegExp(e)),e.test(t)},like:function(e,t){return null===e||void 0===e?t===e:void 0!==t&&null!==t&&String(t).toLowerCase().indexOf(e.toLowerCase())>-1},in:function(e,t){return Array.isArray(e)?e.indexOf(t)>-1:(console.warn("Filter Error - filter value is not an array:",e),!1)}},Tabulator.prototype.registerModule("filter",Filter); \ No newline at end of file diff --git a/Gems/AssetMemoryAnalyzer/External/tabulator-master/dist/js/modules/format.js b/Gems/AssetMemoryAnalyzer/External/tabulator-master/dist/js/modules/format.js deleted file mode 100644 index eb6f096636..0000000000 --- a/Gems/AssetMemoryAnalyzer/External/tabulator-master/dist/js/modules/format.js +++ /dev/null @@ -1,539 +0,0 @@ -var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol" ? function (obj) { return typeof obj; } : function (obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; - -/* Tabulator v4.1.2 (c) Oliver Folkerd */ - -var Format = function Format(table) { - this.table = table; //hold Tabulator object -}; - -//initialize column formatter -Format.prototype.initializeColumn = function (column) { - var self = this, - config = { params: column.definition.formatterParams || {} }; - - //set column formatter - switch (_typeof(column.definition.formatter)) { - case "string": - - if (column.definition.formatter === "tick") { - column.definition.formatter = "tickCross"; - - if (typeof config.params.crossElement == "undefined") { - config.params.crossElement = false; - } - - console.warn("DEPRECATION WANRING - the tick formatter has been depricated, please use the tickCross formatter with the crossElement param set to false"); - } - - if (self.formatters[column.definition.formatter]) { - config.formatter = self.formatters[column.definition.formatter]; - } else { - console.warn("Formatter Error - No such formatter found: ", column.definition.formatter); - config.formatter = self.formatters.plaintext; - } - break; - - case "function": - config.formatter = column.definition.formatter; - break; - - default: - config.formatter = self.formatters.plaintext; - break; - } - - column.modules.format = config; -}; - -Format.prototype.cellRendered = function (cell) { - if (cell.column.modules.format.renderedCallback) { - cell.column.modules.format.renderedCallback(); - } -}; - -//return a formatted value for a cell -Format.prototype.formatValue = function (cell) { - var component = cell.getComponent(), - params = typeof cell.column.modules.format.params === "function" ? cell.column.modules.format.params(component) : cell.column.modules.format.params; - - function onRendered(callback) { - cell.column.modules.format.renderedCallback = callback; - } - - return cell.column.modules.format.formatter.call(this, component, params, onRendered); -}; - -Format.prototype.sanitizeHTML = function (value) { - if (value) { - var entityMap = { - '&': '&', - '<': '<', - '>': '>', - '"': '"', - "'": ''', - '/': '/', - '`': '`', - '=': '=' - }; - - return String(value).replace(/[&<>"'`=\/]/g, function (s) { - return entityMap[s]; - }); - } else { - return value; - } -}; - -Format.prototype.emptyToSpace = function (value) { - return value === null || typeof value === "undefined" ? " " : value; -}; - -//get formatter for cell -Format.prototype.getFormatter = function (formatter) { - var formatter; - - switch (typeof formatter === "undefined" ? "undefined" : _typeof(formatter)) { - case "string": - if (this.formatters[formatter]) { - formatter = this.formatters[formatter]; - } else { - console.warn("Formatter Error - No such formatter found: ", formatter); - formatter = this.formatters.plaintext; - } - break; - - case "function": - formatter = formatter; - break; - - default: - formatter = this.formatters.plaintext; - break; - } - - return formatter; -}; - -//default data formatters -Format.prototype.formatters = { - //plain text value - plaintext: function plaintext(cell, formatterParams, onRendered) { - return this.emptyToSpace(this.sanitizeHTML(cell.getValue())); - }, - - //html text value - html: function html(cell, formatterParams, onRendered) { - return cell.getValue(); - }, - - //multiline text area - textarea: function textarea(cell, formatterParams, onRendered) { - cell.getElement().style.whiteSpace = "pre-wrap"; - return this.emptyToSpace(this.sanitizeHTML(cell.getValue())); - }, - - //currency formatting - money: function money(cell, formatterParams, onRendered) { - var floatVal = parseFloat(cell.getValue()), - number, - integer, - decimal, - rgx; - - var decimalSym = formatterParams.decimal || "."; - var thousandSym = formatterParams.thousand || ","; - var symbol = formatterParams.symbol || ""; - var after = !!formatterParams.symbolAfter; - var precision = typeof formatterParams.precision !== "undefined" ? formatterParams.precision : 2; - - if (isNaN(floatVal)) { - return this.emptyToSpace(this.sanitizeHTML(cell.getValue())); - } - - number = precision !== false ? floatVal.toFixed(precision) : floatVal; - number = String(number).split("."); - - integer = number[0]; - decimal = number.length > 1 ? decimalSym + number[1] : ""; - - rgx = /(\d+)(\d{3})/; - - while (rgx.test(integer)) { - integer = integer.replace(rgx, "$1" + thousandSym + "$2"); - } - - return after ? integer + decimal + symbol : symbol + integer + decimal; - }, - - //clickable anchor tag - link: function link(cell, formatterParams, onRendered) { - var value = this.sanitizeHTML(cell.getValue()), - urlPrefix = formatterParams.urlPrefix || "", - label = this.emptyToSpace(value), - el = document.createElement("a"), - data; - - if (formatterParams.labelField) { - data = cell.getData(); - label = data[formatterParams.labelField]; - } - - if (formatterParams.label) { - switch (_typeof(formatterParams.label)) { - case "string": - label = formatterParams.label; - break; - - case "function": - label = formatterParams.label(cell); - break; - } - } - - if (formatterParams.urlField) { - data = cell.getData(); - value = data[formatterParams.urlField]; - } - - if (formatterParams.url) { - switch (_typeof(formatterParams.url)) { - case "string": - value = formatterParams.url; - break; - - case "function": - value = formatterParams.url(cell); - break; - } - } - - el.setAttribute("href", urlPrefix + value); - - if (formatterParams.target) { - el.setAttribute("target", formatterParams.target); - } - - el.innerHTML = this.emptyToSpace(label); - - return el; - }, - - //image element - image: function image(cell, formatterParams, onRendered) { - var el = document.createElement("img"); - el.setAttribute("src", cell.getValue()); - - switch (_typeof(formatterParams.height)) { - case "number": - element.style.height = formatterParams.height + "px"; - break; - - case "string": - element.style.height = formatterParams.height; - break; - } - - switch (_typeof(formatterParams.width)) { - case "number": - element.style.width = formatterParams.width + "px"; - break; - - case "string": - element.style.width = formatterParams.width; - break; - } - - el.addEventListener("load", function () { - cell.getRow().normalizeHeight(); - }); - - return el; - }, - - //tick or cross - tickCross: function tickCross(cell, formatterParams, onRendered) { - var value = cell.getValue(), - element = cell.getElement(), - empty = formatterParams.allowEmpty, - truthy = formatterParams.allowTruthy, - tick = typeof formatterParams.tickElement !== "undefined" ? formatterParams.tickElement : '', - cross = typeof formatterParams.crossElement !== "undefined" ? formatterParams.crossElement : ''; - - if (truthy && value || value === true || value === "true" || value === "True" || value === 1 || value === "1") { - element.setAttribute("aria-checked", true); - return tick || ""; - } else { - if (empty && (value === "null" || value === "" || value === null || typeof value === "undefined")) { - element.setAttribute("aria-checked", "mixed"); - return ""; - } else { - element.setAttribute("aria-checked", false); - return cross || ""; - } - } - }, - - datetime: function datetime(cell, formatterParams, onRendered) { - var inputFormat = formatterParams.inputFormat || "YYYY-MM-DD hh:mm:ss"; - var outputFormat = formatterParams.outputFormat || "DD/MM/YYYY hh:mm:ss"; - var invalid = typeof formatterParams.invalidPlaceholder !== "undefined" ? formatterParams.invalidPlaceholder : ""; - var value = cell.getValue(); - - var newDatetime = moment(value, inputFormat); - - if (newDatetime.isValid()) { - return newDatetime.format(outputFormat); - } else { - - if (invalid === true) { - return value; - } else if (typeof invalid === "function") { - return invalid(value); - } else { - return invalid; - } - } - }, - - datetimediff: function datetime(cell, formatterParams, onRendered) { - var inputFormat = formatterParams.inputFormat || "YYYY-MM-DD hh:mm:ss"; - var invalid = typeof formatterParams.invalidPlaceholder !== "undefined" ? formatterParams.invalidPlaceholder : ""; - var suffix = typeof formatterParams.suffix !== "undefined" ? formatterParams.suffix : false; - var unit = typeof formatterParams.unit !== "undefined" ? formatterParams.unit : undefined; - var humanize = typeof formatterParams.humanize !== "undefined" ? formatterParams.humanize : false; - var date = typeof formatterParams.date !== "undefined" ? formatterParams.date : moment(); - var value = cell.getValue(); - - var newDatetime = moment(value, inputFormat); - - if (newDatetime.isValid()) { - if (humanize) { - return moment.duration(newDatetime.diff(date)).humanize(suffix); - } else { - return newDatetime.diff(date, unit) + (suffix ? " " + suffix : ""); - } - } else { - - if (invalid === true) { - return value; - } else if (typeof invalid === "function") { - return invalid(value); - } else { - return invalid; - } - } - }, - - //select - lookup: function lookup(cell, formatterParams, onRendered) { - var value = cell.getValue(); - - if (typeof formatterParams[value] === "undefined") { - console.warn('Missing display value for ' + value); - return value; - } - - return formatterParams[value]; - }, - - //star rating - star: function star(cell, formatterParams, onRendered) { - var value = cell.getValue(), - element = cell.getElement(), - maxStars = formatterParams && formatterParams.stars ? formatterParams.stars : 5, - stars = document.createElement("span"), - star = document.createElementNS('http://www.w3.org/2000/svg', "svg"), - starActive = '', - starInactive = ''; - - //style stars holder - stars.style.verticalAlign = "middle"; - - //style star - star.setAttribute("width", "14"); - star.setAttribute("height", "14"); - star.setAttribute("viewBox", "0 0 512 512"); - star.setAttribute("xml:space", "preserve"); - star.style.padding = "0 1px"; - - value = parseInt(value) < maxStars ? parseInt(value) : maxStars; - - for (var i = 1; i <= maxStars; i++) { - var nextStar = star.cloneNode(true); - nextStar.innerHTML = i <= value ? starActive : starInactive; - - stars.appendChild(nextStar); - } - - element.style.whiteSpace = "nowrap"; - element.style.overflow = "hidden"; - element.style.textOverflow = "ellipsis"; - - element.setAttribute("aria-label", value); - - return stars; - }, - - //progress bar - progress: function progress(cell, formatterParams, onRendered) { - //progress bar - var value = this.sanitizeHTML(cell.getValue()) || 0, - element = cell.getElement(), - max = formatterParams && formatterParams.max ? formatterParams.max : 100, - min = formatterParams && formatterParams.min ? formatterParams.min : 0, - legendAlign = formatterParams && formatterParams.legendAlign ? formatterParams.legendAlign : "center", - percent, - percentValue, - color, - legend, - legendColor, - top, - left, - right, - bottom; - - //make sure value is in range - percentValue = parseFloat(value) <= max ? parseFloat(value) : max; - percentValue = parseFloat(percentValue) >= min ? parseFloat(percentValue) : min; - - //workout percentage - percent = (max - min) / 100; - percentValue = Math.round((percentValue - min) / percent); - - //set bar color - switch (_typeof(formatterParams.color)) { - case "string": - color = formatterParams.color; - break; - case "function": - color = formatterParams.color(value); - break; - case "object": - if (Array.isArray(formatterParams.color)) { - var unit = 100 / formatterParams.color.length; - var index = Math.floor(percentValue / unit); - - index = Math.min(index, formatterParams.color.length - 1); - index = Math.max(index, 0); - color = formatterParams.color[index]; - break; - } - default: - color = "#2DC214"; - } - - //generate legend - switch (_typeof(formatterParams.legend)) { - case "string": - legend = formatterParams.legend; - break; - case "function": - legend = formatterParams.legend(value); - break; - case "boolean": - legend = value; - break; - default: - legend = false; - } - - //set legend color - switch (_typeof(formatterParams.legendColor)) { - case "string": - legendColor = formatterParams.legendColor; - break; - case "function": - legendColor = formatterParams.legendColor(value); - break; - case "object": - if (Array.isArray(formatterParams.legendColor)) { - var unit = 100 / formatterParams.legendColor.length; - var index = Math.floor(percentValue / unit); - - index = Math.min(index, formatterParams.legendColor.length - 1); - index = Math.max(index, 0); - legendColor = formatterParams.legendColor[index]; - } - break; - default: - legendColor = "#000"; - } - - element.style.minWidth = "30px"; - element.style.position = "relative"; - - element.setAttribute("aria-label", percentValue); - - return "
" + (legend ? "
" + legend + "
" : ""); - }, - - //background color - color: function color(cell, formatterParams, onRendered) { - cell.getElement().style.backgroundColor = this.sanitizeHTML(cell.getValue()); - return ""; - }, - - //tick icon - buttonTick: function buttonTick(cell, formatterParams, onRendered) { - return ''; - }, - - //cross icon - buttonCross: function buttonCross(cell, formatterParams, onRendered) { - return ''; - }, - - //current row number - rownum: function rownum(cell, formatterParams, onRendered) { - return this.table.rowManager.activeRows.indexOf(cell.getRow()._getSelf()) + 1; - }, - - //row handle - handle: function handle(cell, formatterParams, onRendered) { - cell.getElement().classList.add("tabulator-row-handle"); - return "
"; - }, - - responsiveCollapse: function responsiveCollapse(cell, formatterParams, onRendered) { - var self = this, - open = false, - el = document.createElement("div"); - - function toggleList(isOpen) { - var collapse = cell.getRow().getElement().getElementsByClassName("tabulator-responsive-collapse")[0]; - - open = isOpen; - - if (open) { - el.classList.add("open"); - if (collapse) { - collapse.style.display = ''; - } - } else { - el.classList.remove("open"); - if (collapse) { - collapse.style.display = 'none'; - } - } - } - - el.classList.add("tabulator-responsive-collapse-toggle"); - el.innerHTML = "+-"; - - cell.getElement().classList.add("tabulator-row-handle"); - - if (self.table.options.responsiveLayoutCollapseStartOpen) { - open = true; - } - - el.addEventListener("click", function () { - toggleList(!open); - }); - - toggleList(open); - - return el; - } -}; - -Tabulator.prototype.registerModule("format", Format); \ No newline at end of file diff --git a/Gems/AssetMemoryAnalyzer/External/tabulator-master/dist/js/modules/format.min.js b/Gems/AssetMemoryAnalyzer/External/tabulator-master/dist/js/modules/format.min.js deleted file mode 100644 index d625e4344c..0000000000 --- a/Gems/AssetMemoryAnalyzer/External/tabulator-master/dist/js/modules/format.min.js +++ /dev/null @@ -1,2 +0,0 @@ -/* Tabulator v4.1.2 (c) Oliver Folkerd */ -var _typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Format=function(e){this.table=e};Format.prototype.initializeColumn=function(e){var t=this,r={params:e.definition.formatterParams||{}};switch(_typeof(e.definition.formatter)){case"string":"tick"===e.definition.formatter&&(e.definition.formatter="tickCross",void 0===r.params.crossElement&&(r.params.crossElement=!1),console.warn("DEPRECATION WANRING - the tick formatter has been depricated, please use the tickCross formatter with the crossElement param set to false")),t.formatters[e.definition.formatter]?r.formatter=t.formatters[e.definition.formatter]:(console.warn("Formatter Error - No such formatter found: ",e.definition.formatter),r.formatter=t.formatters.plaintext);break;case"function":r.formatter=e.definition.formatter;break;default:r.formatter=t.formatters.plaintext}e.modules.format=r},Format.prototype.cellRendered=function(e){e.column.modules.format.renderedCallback&&e.column.modules.format.renderedCallback()},Format.prototype.formatValue=function(e){function t(t){e.column.modules.format.renderedCallback=t}var r=e.getComponent(),o="function"==typeof e.column.modules.format.params?e.column.modules.format.params(r):e.column.modules.format.params;return e.column.modules.format.formatter.call(this,r,o,t)},Format.prototype.sanitizeHTML=function(e){if(e){var t={"&":"&","<":"<",">":">",'"':""","'":"'","/":"/","`":"`","=":"="};return String(e).replace(/[&<>"'`=\/]/g,function(e){return t[e]})}return e},Format.prototype.emptyToSpace=function(e){return null===e||void 0===e?" ":e},Format.prototype.getFormatter=function(e){var e;switch(void 0===e?"undefined":_typeof(e)){case"string":this.formatters[e]?e=this.formatters[e]:(console.warn("Formatter Error - No such formatter found: ",e),e=this.formatters.plaintext);break;case"function":e=e;break;default:e=this.formatters.plaintext}return e},Format.prototype.formatters={plaintext:function(e,t,r){return this.emptyToSpace(this.sanitizeHTML(e.getValue()))},html:function(e,t,r){return e.getValue()},textarea:function(e,t,r){return e.getElement().style.whiteSpace="pre-wrap",this.emptyToSpace(this.sanitizeHTML(e.getValue()))},money:function(e,t,r){var o,a,i,l,n=parseFloat(e.getValue()),s=t.decimal||".",c=t.thousand||",",u=t.symbol||"",d=!!t.symbolAfter,m=void 0!==t.precision?t.precision:2;if(isNaN(n))return this.emptyToSpace(this.sanitizeHTML(e.getValue()));for(o=!1!==m?n.toFixed(m):n,o=String(o).split("."),a=o[0],i=o.length>1?s+o[1]:"",l=/(\d+)(\d{3})/;l.test(a);)a=a.replace(l,"$1"+c+"$2");return d?a+i+u:u+a+i},link:function(e,t,r){var o,a=this.sanitizeHTML(e.getValue()),i=t.urlPrefix||"",l=this.emptyToSpace(a),n=document.createElement("a");if(t.labelField&&(o=e.getData(),l=o[t.labelField]),t.label)switch(_typeof(t.label)){case"string":l=t.label;break;case"function":l=t.label(e)}if(t.urlField&&(o=e.getData(),a=o[t.urlField]),t.url)switch(_typeof(t.url)){case"string":a=t.url;break;case"function":a=t.url(e)}return n.setAttribute("href",i+a),t.target&&n.setAttribute("target",t.target),n.innerHTML=this.emptyToSpace(l),n},image:function(e,t,r){var o=document.createElement("img");switch(o.setAttribute("src",e.getValue()),_typeof(t.height)){case"number":element.style.height=t.height+"px";break;case"string":element.style.height=t.height}switch(_typeof(t.width)){case"number":element.style.width=t.width+"px";break;case"string":element.style.width=t.width}return o.addEventListener("load",function(){e.getRow().normalizeHeight()}),o},tickCross:function(e,t,r){var o=e.getValue(),a=e.getElement(),i=t.allowEmpty,l=t.allowTruthy,n=void 0!==t.tickElement?t.tickElement:'',s=void 0!==t.crossElement?t.crossElement:'';return l&&o||!0===o||"true"===o||"True"===o||1===o||"1"===o?(a.setAttribute("aria-checked",!0),n||""):!i||"null"!==o&&""!==o&&null!==o&&void 0!==o?(a.setAttribute("aria-checked",!1),s||""):(a.setAttribute("aria-checked","mixed"),"")},datetime:function(e,t,r){var o=t.inputFormat||"YYYY-MM-DD hh:mm:ss",a=t.outputFormat||"DD/MM/YYYY hh:mm:ss",i=void 0!==t.invalidPlaceholder?t.invalidPlaceholder:"",l=e.getValue(),n=moment(l,o);return n.isValid()?n.format(a):!0===i?l:"function"==typeof i?i(l):i},datetimediff:function(e,t,r){var o=t.inputFormat||"YYYY-MM-DD hh:mm:ss",a=void 0!==t.invalidPlaceholder?t.invalidPlaceholder:"",i=void 0!==t.suffix&&t.suffix,l=void 0!==t.unit?t.unit:void 0,n=void 0!==t.humanize&&t.humanize,s=void 0!==t.date?t.date:moment(),c=e.getValue(),u=moment(c,o);return u.isValid()?n?moment.duration(u.diff(s)).humanize(i):u.diff(s,l)+(i?" "+i:""):!0===a?c:"function"==typeof a?a(c):a},lookup:function(e,t,r){var o=e.getValue();return void 0===t[o]?(console.warn("Missing display value for "+o),o):t[o]},star:function(e,t,r){var o=e.getValue(),a=e.getElement(),i=t&&t.stars?t.stars:5,l=document.createElement("span"),n=document.createElementNS("http://www.w3.org/2000/svg","svg");l.style.verticalAlign="middle",n.setAttribute("width","14"),n.setAttribute("height","14"),n.setAttribute("viewBox","0 0 512 512"),n.setAttribute("xml:space","preserve"),n.style.padding="0 1px",o=parseInt(o)':'',l.appendChild(c)}return a.style.whiteSpace="nowrap",a.style.overflow="hidden",a.style.textOverflow="ellipsis",a.setAttribute("aria-label",o),l},progress:function(e,t,r){var o,a,i,l,n,s=this.sanitizeHTML(e.getValue())||0,c=e.getElement(),u=t&&t.max?t.max:100,d=t&&t.min?t.min:0,m=t&&t.legendAlign?t.legendAlign:"center";switch(a=parseFloat(s)<=u?parseFloat(s):u,a=parseFloat(a)>=d?parseFloat(a):d,o=(u-d)/100,a=Math.round((a-d)/o),_typeof(t.color)){case"string":i=t.color;break;case"function":i=t.color(s);break;case"object":if(Array.isArray(t.color)){var p=100/t.color.length,f=Math.floor(a/p);f=Math.min(f,t.color.length-1),f=Math.max(f,0),i=t.color[f];break}default:i="#2DC214"}switch(_typeof(t.legend)){case"string":l=t.legend;break;case"function":l=t.legend(s);break;case"boolean":l=s;break;default:l=!1}switch(_typeof(t.legendColor)){case"string":n=t.legendColor;break;case"function":n=t.legendColor(s);break;case"object":if(Array.isArray(t.legendColor)){var p=100/t.legendColor.length,f=Math.floor(a/p);f=Math.min(f,t.legendColor.length-1),f=Math.max(f,0),n=t.legendColor[f]}break;default:n="#000"}return c.style.minWidth="30px",c.style.position="relative",c.setAttribute("aria-label",a),"
"+(l?"
"+l+"
":"")},color:function(e,t,r){return e.getElement().style.backgroundColor=this.sanitizeHTML(e.getValue()),""},buttonTick:function(e,t,r){return''},buttonCross:function(e,t,r){return''},rownum:function(e,t,r){return this.table.rowManager.activeRows.indexOf(e.getRow()._getSelf())+1},handle:function(e,t,r){return e.getElement().classList.add("tabulator-row-handle"),"
"},responsiveCollapse:function(e,t,r){function o(t){var r=e.getRow().getElement().getElementsByClassName("tabulator-responsive-collapse")[0];i=t,i?(l.classList.add("open"),r&&(r.style.display="")):(l.classList.remove("open"),r&&(r.style.display="none"))}var a=this,i=!1,l=document.createElement("div");return l.classList.add("tabulator-responsive-collapse-toggle"),l.innerHTML="+-",e.getElement().classList.add("tabulator-row-handle"),a.table.options.responsiveLayoutCollapseStartOpen&&(i=!0),l.addEventListener("click",function(){o(!i)}),o(i),l}},Tabulator.prototype.registerModule("format",Format); \ No newline at end of file diff --git a/Gems/AssetMemoryAnalyzer/External/tabulator-master/dist/js/modules/frozen_columns.js b/Gems/AssetMemoryAnalyzer/External/tabulator-master/dist/js/modules/frozen_columns.js deleted file mode 100644 index d3acbe5d2d..0000000000 --- a/Gems/AssetMemoryAnalyzer/External/tabulator-master/dist/js/modules/frozen_columns.js +++ /dev/null @@ -1,160 +0,0 @@ -/* Tabulator v4.1.2 (c) Oliver Folkerd */ - -var FrozenColumns = function FrozenColumns(table) { - this.table = table; //hold Tabulator object - this.leftColumns = []; - this.rightColumns = []; - this.leftMargin = 0; - this.rightMargin = 0; - this.initializationMode = "left"; - this.active = false; -}; - -//reset initial state -FrozenColumns.prototype.reset = function () { - this.initializationMode = "left"; - this.leftColumns = []; - this.rightColumns = []; - this.active = false; -}; - -//initialize specific column -FrozenColumns.prototype.initializeColumn = function (column) { - var config = { margin: 0, edge: false }; - - if (column.definition.frozen) { - - if (!column.parent.isGroup) { - - if (!column.isGroup) { - config.position = this.initializationMode; - - if (this.initializationMode == "left") { - this.leftColumns.push(column); - } else { - this.rightColumns.unshift(column); - } - - this.active = true; - - column.modules.frozen = config; - } else { - console.warn("Frozen Column Error - Column Groups cannot be frozen"); - } - } else { - console.warn("Frozen Column Error - Grouped columns cannot be frozen"); - } - } else { - this.initializationMode = "right"; - } -}; - -//layout columns appropropriatly -FrozenColumns.prototype.layout = function () { - var self = this, - tableHolder = this.table.rowManager.element, - rightMargin = 0; - - if (self.active) { - - //calculate row padding - - self.leftMargin = self._calcSpace(self.leftColumns, self.leftColumns.length); - self.table.columnManager.headersElement.style.marginLeft = self.leftMargin + "px"; - - self.rightMargin = self._calcSpace(self.rightColumns, self.rightColumns.length); - self.table.columnManager.element.style.paddingRight = self.rightMargin + "px"; - - self.table.rowManager.activeRows.forEach(function (row) { - self.layoutRow(row); - }); - - if (self.table.modExists("columnCalcs")) { - if (self.table.modules.columnCalcs.topInitialized && self.table.modules.columnCalcs.topRow) { - self.layoutRow(self.table.modules.columnCalcs.topRow); - } - if (self.table.modules.columnCalcs.botInitialized && self.table.modules.columnCalcs.botRow) { - self.layoutRow(self.table.modules.columnCalcs.botRow); - } - } - - //calculate left columns - self.leftColumns.forEach(function (column, i) { - column.modules.frozen.margin = self._calcSpace(self.leftColumns, i) + self.table.columnManager.scrollLeft; - - if (i == self.leftColumns.length - 1) { - column.modules.frozen.edge = true; - } else { - column.modules.frozen.edge = false; - } - - self.layoutColumn(column); - }); - - //calculate right frozen columns - rightMargin = self.table.rowManager.element.clientWidth + self.table.columnManager.scrollLeft; - - // if(tableHolder.scrollHeight > tableHolder.clientHeight){ - // rightMargin -= tableHolder.offsetWidth - tableHolder.clientWidth; - // } - - self.rightColumns.forEach(function (column, i) { - column.modules.frozen.margin = rightMargin - self._calcSpace(self.rightColumns, i + 1); - - if (i == self.rightColumns.length - 1) { - column.modules.frozen.edge = true; - } else { - column.modules.frozen.edge = false; - } - - self.layoutColumn(column); - }); - - this.table.rowManager.tableElement.style.marginRight = this.rightMargin + "px"; - } -}; - -FrozenColumns.prototype.layoutColumn = function (column) { - var self = this; - - self.layoutElement(column.getElement(), column); - - column.cells.forEach(function (cell) { - self.layoutElement(cell.getElement(), column); - }); -}; - -FrozenColumns.prototype.layoutRow = function (row) { - var rowEl = row.getElement(); - - rowEl.style.paddingLeft = this.leftMargin + "px"; - // rowEl.style.paddingRight = this.rightMargin + "px"; -}; - -FrozenColumns.prototype.layoutElement = function (element, column) { - - if (column.modules.frozen) { - element.style.position = "absolute"; - element.style.left = column.modules.frozen.margin + "px"; - - element.classList.add("tabulator-frozen"); - - if (column.modules.frozen.edge) { - element.classList.add("tabulator-frozen-" + column.modules.frozen.position); - } - } -}; - -FrozenColumns.prototype._calcSpace = function (columns, index) { - var width = 0; - - for (var i = 0; i < index; i++) { - if (columns[i].visible) { - width += columns[i].getWidth(); - } - } - - return width; -}; - -Tabulator.prototype.registerModule("frozenColumns", FrozenColumns); \ No newline at end of file diff --git a/Gems/AssetMemoryAnalyzer/External/tabulator-master/dist/js/modules/frozen_columns.min.js b/Gems/AssetMemoryAnalyzer/External/tabulator-master/dist/js/modules/frozen_columns.min.js deleted file mode 100644 index 0c3f1faecc..0000000000 --- a/Gems/AssetMemoryAnalyzer/External/tabulator-master/dist/js/modules/frozen_columns.min.js +++ /dev/null @@ -1,2 +0,0 @@ -/* Tabulator v4.1.2 (c) Oliver Folkerd */ -var FrozenColumns=function(o){this.table=o,this.leftColumns=[],this.rightColumns=[],this.leftMargin=0,this.rightMargin=0,this.initializationMode="left",this.active=!1};FrozenColumns.prototype.reset=function(){this.initializationMode="left",this.leftColumns=[],this.rightColumns=[],this.active=!1},FrozenColumns.prototype.initializeColumn=function(o){var e={margin:0,edge:!1};o.definition.frozen?o.parent.isGroup?console.warn("Frozen Column Error - Grouped columns cannot be frozen"):o.isGroup?console.warn("Frozen Column Error - Column Groups cannot be frozen"):(e.position=this.initializationMode,"left"==this.initializationMode?this.leftColumns.push(o):this.rightColumns.unshift(o),this.active=!0,o.modules.frozen=e):this.initializationMode="right"},FrozenColumns.prototype.layout=function(){var o=this,e=(this.table.rowManager.element,0);o.active&&(o.leftMargin=o._calcSpace(o.leftColumns,o.leftColumns.length),o.table.columnManager.headersElement.style.marginLeft=o.leftMargin+"px",o.rightMargin=o._calcSpace(o.rightColumns,o.rightColumns.length),o.table.columnManager.element.style.paddingRight=o.rightMargin+"px",o.table.rowManager.activeRows.forEach(function(e){o.layoutRow(e)}),o.table.modExists("columnCalcs")&&(o.table.modules.columnCalcs.topInitialized&&o.table.modules.columnCalcs.topRow&&o.layoutRow(o.table.modules.columnCalcs.topRow),o.table.modules.columnCalcs.botInitialized&&o.table.modules.columnCalcs.botRow&&o.layoutRow(o.table.modules.columnCalcs.botRow)),o.leftColumns.forEach(function(e,t){e.modules.frozen.margin=o._calcSpace(o.leftColumns,t)+o.table.columnManager.scrollLeft,t==o.leftColumns.length-1?e.modules.frozen.edge=!0:e.modules.frozen.edge=!1,o.layoutColumn(e)}),e=o.table.rowManager.element.clientWidth+o.table.columnManager.scrollLeft,o.rightColumns.forEach(function(t,n){t.modules.frozen.margin=e-o._calcSpace(o.rightColumns,n+1),n==o.rightColumns.length-1?t.modules.frozen.edge=!0:t.modules.frozen.edge=!1,o.layoutColumn(t)}),this.table.rowManager.tableElement.style.marginRight=this.rightMargin+"px")},FrozenColumns.prototype.layoutColumn=function(o){var e=this;e.layoutElement(o.getElement(),o),o.cells.forEach(function(t){e.layoutElement(t.getElement(),o)})},FrozenColumns.prototype.layoutRow=function(o){o.getElement().style.paddingLeft=this.leftMargin+"px"},FrozenColumns.prototype.layoutElement=function(o,e){e.modules.frozen&&(o.style.position="absolute",o.style.left=e.modules.frozen.margin+"px",o.classList.add("tabulator-frozen"),e.modules.frozen.edge&&o.classList.add("tabulator-frozen-"+e.modules.frozen.position))},FrozenColumns.prototype._calcSpace=function(o,e){for(var t=0,n=0;n -1) { - output.splice(index, 1); - } - }); - - return output; -}; - -FrozenRows.prototype.freezeRow = function (row) { - if (!row.modules.frozen) { - row.modules.frozen = true; - this.topElement.appendChild(row.getElement()); - row.initialize(); - row.normalizeHeight(); - this.table.rowManager.adjustTableSize(); - - this.rows.push(row); - - this.table.rowManager.refreshActiveData("display"); - - this.styleRows(); - } else { - console.warn("Freeze Error - Row is already frozen"); - } -}; - -FrozenRows.prototype.unfreezeRow = function (row) { - var index = this.rows.indexOf(row); - - if (row.modules.frozen) { - - row.modules.frozen = false; - - var rowEl = row.getElement(); - rowEl.parentNode.removeChild(rowEl); - - this.table.rowManager.adjustTableSize(); - - this.rows.splice(index, 1); - - this.table.rowManager.refreshActiveData("display"); - - if (this.rows.length) { - this.styleRows(); - } - } else { - console.warn("Freeze Error - Row is already unfrozen"); - } -}; - -FrozenRows.prototype.styleRows = function (row) { - var self = this; - - this.rows.forEach(function (row, i) { - self.table.rowManager.styleRow(row, i); - }); -}; - -Tabulator.prototype.registerModule("frozenRows", FrozenRows); \ No newline at end of file diff --git a/Gems/AssetMemoryAnalyzer/External/tabulator-master/dist/js/modules/frozen_rows.min.js b/Gems/AssetMemoryAnalyzer/External/tabulator-master/dist/js/modules/frozen_rows.min.js deleted file mode 100644 index 844367a167..0000000000 --- a/Gems/AssetMemoryAnalyzer/External/tabulator-master/dist/js/modules/frozen_rows.min.js +++ /dev/null @@ -1,2 +0,0 @@ -/* Tabulator v4.1.2 (c) Oliver Folkerd */ -var FrozenRows=function(e){this.table=e,this.topElement=document.createElement("div"),this.rows=[],this.displayIndex=0};FrozenRows.prototype.initialize=function(){this.rows=[],this.topElement.classList.add("tabulator-frozen-rows-holder"),this.table.columnManager.getElement().insertBefore(this.topElement,this.table.columnManager.headersElement.nextSibling)},FrozenRows.prototype.setDisplayIndex=function(e){this.displayIndex=e},FrozenRows.prototype.getDisplayIndex=function(){return this.displayIndex},FrozenRows.prototype.isFrozen=function(){return!!this.rows.length},FrozenRows.prototype.getRows=function(e){var o=e.slice(0);return this.rows.forEach(function(e){var t=o.indexOf(e);t>-1&&o.splice(t,1)}),o},FrozenRows.prototype.freezeRow=function(e){e.modules.frozen?console.warn("Freeze Error - Row is already frozen"):(e.modules.frozen=!0,this.topElement.appendChild(e.getElement()),e.initialize(),e.normalizeHeight(),this.table.rowManager.adjustTableSize(),this.rows.push(e),this.table.rowManager.refreshActiveData("display"),this.styleRows())},FrozenRows.prototype.unfreezeRow=function(e){var o=this.rows.indexOf(e);if(e.modules.frozen){e.modules.frozen=!1;var t=e.getElement();t.parentNode.removeChild(t),this.table.rowManager.adjustTableSize(),this.rows.splice(o,1),this.table.rowManager.refreshActiveData("display"),this.rows.length&&this.styleRows()}else console.warn("Freeze Error - Row is already unfrozen")},FrozenRows.prototype.styleRows=function(e){var o=this;this.rows.forEach(function(e,t){o.table.rowManager.styleRow(e,t)})},Tabulator.prototype.registerModule("frozenRows",FrozenRows); \ No newline at end of file diff --git a/Gems/AssetMemoryAnalyzer/External/tabulator-master/dist/js/modules/group_rows.js b/Gems/AssetMemoryAnalyzer/External/tabulator-master/dist/js/modules/group_rows.js deleted file mode 100644 index 463098ebb1..0000000000 --- a/Gems/AssetMemoryAnalyzer/External/tabulator-master/dist/js/modules/group_rows.js +++ /dev/null @@ -1,975 +0,0 @@ -/* Tabulator v4.1.2 (c) Oliver Folkerd */ - -//public group object -var GroupComponent = function GroupComponent(group) { - this._group = group; - this.type = "GroupComponent"; -}; - -GroupComponent.prototype.getKey = function () { - return this._group.key; -}; - -GroupComponent.prototype.getElement = function () { - return this._group.element; -}; - -GroupComponent.prototype.getRows = function () { - return this._group.getRows(true); -}; - -GroupComponent.prototype.getSubGroups = function () { - return this._group.getSubGroups(true); -}; - -GroupComponent.prototype.getParentGroup = function () { - return this._group.parent ? this._group.parent.getComponent() : false; -}; - -GroupComponent.prototype.getVisibility = function () { - return this._group.visible; -}; - -GroupComponent.prototype.show = function () { - this._group.show(); -}; - -GroupComponent.prototype.hide = function () { - this._group.hide(); -}; - -GroupComponent.prototype.toggle = function () { - this._group.toggleVisibility(); -}; - -GroupComponent.prototype._getSelf = function () { - return this._group; -}; - -GroupComponent.prototype.getTable = function () { - return this._group.table; -}; - -////////////////////////////////////////////////// -//////////////// Group Functions ///////////////// -////////////////////////////////////////////////// - -var Group = function Group(groupManager, parent, level, key, field, generator, oldGroup) { - - this.groupManager = groupManager; - this.parent = parent; - this.key = key; - this.level = level; - this.field = field; - this.hasSubGroups = level < groupManager.groupIDLookups.length - 1; - this.addRow = this.hasSubGroups ? this._addRowToGroup : this._addRow; - this.type = "group"; //type of element - this.old = oldGroup; - this.rows = []; - this.groups = []; - this.groupList = []; - this.generator = generator; - this.elementContents = false; - this.height = 0; - this.outerHeight = 0; - this.initialized = false; - this.calcs = {}; - this.initialized = false; - this.modules = {}; - - this.visible = oldGroup ? oldGroup.visible : typeof groupManager.startOpen[level] !== "undefined" ? groupManager.startOpen[level] : groupManager.startOpen[0]; - - this.createElements(); - this.addBindings(); - - this.createValueGroups(); -}; - -Group.prototype.createElements = function () { - this.element = document.createElement("div"); - this.element.classList.add("tabulator-row"); - this.element.classList.add("tabulator-group"); - this.element.classList.add("tabulator-group-level-" + this.level); - this.element.setAttribute("role", "rowgroup"); - - this.arrowElement = document.createElement("div"); - this.arrowElement.classList.add("tabulator-arrow"); -}; - -Group.prototype.createValueGroups = function () { - var _this = this; - - var level = this.level + 1; - if (this.groupManager.allowedValues && this.groupManager.allowedValues[level]) { - this.groupManager.allowedValues[level].forEach(function (value) { - _this._createGroup(value, level); - }); - } -}; - -Group.prototype.addBindings = function () { - var self = this, - dblTap, - tapHold, - tap, - toggleElement; - - //handle group click events - if (self.groupManager.table.options.groupClick) { - self.element.addEventListener("click", function (e) { - self.groupManager.table.options.groupClick(e, self.getComponent()); - }); - } - - if (self.groupManager.table.options.groupDblClick) { - self.element.addEventListener("dblclick", function (e) { - self.groupManager.table.options.groupDblClick(e, self.getComponent()); - }); - } - - if (self.groupManager.table.options.groupContext) { - self.element.addEventListener("contextmenu", function (e) { - self.groupManager.table.options.groupContext(e, self.getComponent()); - }); - } - - if (self.groupManager.table.options.groupTap) { - - tap = false; - - self.element.addEventListener("touchstart", function (e) { - tap = true; - }); - - self.element.addEventListener("touchend", function (e) { - if (tap) { - self.groupManager.table.options.groupTap(e, self.getComponent()); - } - - tap = false; - }); - } - - if (self.groupManager.table.options.groupDblTap) { - - dblTap = null; - - self.element.addEventListener("touchend", function (e) { - - if (dblTap) { - clearTimeout(dblTap); - dblTap = null; - - self.groupManager.table.options.groupDblTap(e, self.getComponent()); - } else { - - dblTap = setTimeout(function () { - clearTimeout(dblTap); - dblTap = null; - }, 300); - } - }); - } - - if (self.groupManager.table.options.groupTapHold) { - - tapHold = null; - - self.element.addEventListener("touchstart", function (e) { - clearTimeout(tapHold); - - tapHold = setTimeout(function () { - clearTimeout(tapHold); - tapHold = null; - tap = false; - self.groupManager.table.options.groupTapHold(e, self.getComponent()); - }, 1000); - }); - - self.element.addEventListener("touchend", function (e) { - clearTimeout(tapHold); - tapHold = null; - }); - } - - if (self.groupManager.table.options.groupToggleElement) { - toggleElement = self.groupManager.table.options.groupToggleElement == "arrow" ? self.arrowElement : self.element; - - toggleElement.addEventListener("click", function (e) { - e.stopPropagation(); - e.stopImmediatePropagation(); - self.toggleVisibility(); - }); - } -}; - -Group.prototype._createGroup = function (groupID, level) { - var groupKey = level + "_" + groupID; - var group = new Group(this.groupManager, this, level, groupID, this.groupManager.groupIDLookups[level].field, this.groupManager.headerGenerator[level] || this.groupManager.headerGenerator[0], this.old ? this.old.groups[groupKey] : false); - - this.groups[groupKey] = group; - this.groupList.push(group); -}; - -Group.prototype._addRowToGroup = function (row) { - - var level = this.level + 1; - - if (this.hasSubGroups) { - var groupID = this.groupManager.groupIDLookups[level].func(row.getData()), - groupKey = level + "_" + groupID; - - if (this.groupManager.allowedValues && this.groupManager.allowedValues[level]) { - if (this.groups[groupKey]) { - this.groups[groupKey].addRow(row); - } - } else { - if (!this.groups[groupKey]) { - this._createGroup(groupID, level); - } - - this.groups[groupKey].addRow(row); - } - } -}; - -Group.prototype._addRow = function (row) { - this.rows.push(row); - row.modules.group = this; -}; - -Group.prototype.insertRow = function (row, to, after) { - var data = this.conformRowData({}); - - row.updateData(data); - - var toIndex = this.rows.indexOf(to); - - if (toIndex > -1) { - if (after) { - this.rows.splice(toIndex + 1, 0, row); - } else { - this.rows.splice(toIndex, 0, row); - } - } else { - if (after) { - this.rows.push(row); - } else { - this.rows.unshift(row); - } - } - - row.modules.group = this; - - this.generateGroupHeaderContents(); - - if (this.groupManager.table.modExists("columnCalcs") && this.groupManager.table.options.columnCalcs != "table") { - this.groupManager.table.modules.columnCalcs.recalcGroup(this); - } -}; - -Group.prototype.getRowIndex = function (row) {}; - -//update row data to match grouping contraints -Group.prototype.conformRowData = function (data) { - if (this.field) { - data[this.field] = this.key; - } else { - console.warn("Data Conforming Error - Cannot conform row data to match new group as groupBy is a function"); - } - - if (this.parent) { - data = this.parent.conformRowData(data); - } - - return data; -}; - -Group.prototype.removeRow = function (row) { - var index = this.rows.indexOf(row); - - if (index > -1) { - this.rows.splice(index, 1); - } - - if (!this.rows.length) { - if (this.parent) { - this.parent.removeGroup(this); - } else { - this.groupManager.removeGroup(this); - } - - this.groupManager.updateGroupRows(true); - } else { - this.generateGroupHeaderContents(); - if (this.groupManager.table.modExists("columnCalcs") && this.groupManager.table.options.columnCalcs != "table") { - this.groupManager.table.modules.columnCalcs.recalcGroup(this); - } - } -}; - -Group.prototype.removeGroup = function (group) { - var groupKey = group.level + "_" + group.key, - index; - - if (this.groups[groupKey]) { - delete this.groups[groupKey]; - - index = this.groupList.indexOf(group); - - if (index > -1) { - this.groupList.splice(index, 1); - } - - if (!this.groupList.length) { - if (this.parent) { - this.parent.removeGroup(this); - } else { - this.groupManager.removeGroup(this); - } - } - } -}; - -Group.prototype.getHeadersAndRows = function () { - var output = []; - - output.push(this); - - this._visSet(); - - if (this.visible) { - - if (this.groupList.length) { - this.groupList.forEach(function (group) { - output = output.concat(group.getHeadersAndRows()); - }); - } else { - if (this.groupManager.table.options.columnCalcs != "table" && this.groupManager.table.modExists("columnCalcs") && this.groupManager.table.modules.columnCalcs.hasTopCalcs()) { - this.calcs.top = this.groupManager.table.modules.columnCalcs.generateTopRow(this.rows); - output.push(this.calcs.top); - } - - output = output.concat(this.rows); - - if (this.groupManager.table.options.columnCalcs != "table" && this.groupManager.table.modExists("columnCalcs") && this.groupManager.table.modules.columnCalcs.hasBottomCalcs()) { - this.calcs.bottom = this.groupManager.table.modules.columnCalcs.generateBottomRow(this.rows); - output.push(this.calcs.bottom); - } - } - } else { - if (!this.groupList.length && this.groupManager.table.options.columnCalcs != "table" && this.groupManager.table.options.groupClosedShowCalcs) { - if (this.groupManager.table.modExists("columnCalcs")) { - if (this.groupManager.table.modules.columnCalcs.hasTopCalcs()) { - this.calcs.top = this.groupManager.table.modules.columnCalcs.generateTopRow(this.rows); - output.push(this.calcs.top); - } - - if (this.groupManager.table.modules.columnCalcs.hasBottomCalcs()) { - this.calcs.bottom = this.groupManager.table.modules.columnCalcs.generateBottomRow(this.rows); - output.push(this.calcs.bottom); - } - } - } - } - - return output; -}; - -Group.prototype.getData = function (visible, transform) { - var self = this, - output = []; - - this._visSet(); - - if (!visible || visible && this.visible) { - this.rows.forEach(function (row) { - output.push(row.getData(transform || "data")); - }); - } - - return output; -}; - -// Group.prototype.getRows = function(){ -// this._visSet(); - -// return this.visible ? this.rows : []; -// }; - -Group.prototype.getRowCount = function () { - var count = 0; - - if (this.groupList.length) { - this.groupList.forEach(function (group) { - count += group.getRowCount(); - }); - } else { - count = this.rows.length; - } - return count; -}; - -Group.prototype.toggleVisibility = function () { - if (this.visible) { - this.hide(); - } else { - this.show(); - } -}; - -Group.prototype.hide = function () { - this.visible = false; - - if (this.groupManager.table.rowManager.getRenderMode() == "classic" && !this.groupManager.table.options.pagination) { - - this.element.classList.remove("tabulator-group-visible"); - - if (this.groupList.length) { - this.groupList.forEach(function (group) { - - var el; - - if (group.calcs.top) { - el = group.calcs.top.getElement(); - el.parentNode.removeChild(el); - } - - if (group.calcs.bottom) { - el = group.calcs.bottom.getElement(); - el.parentNode.removeChild(el); - } - - var rows = group.getHeadersAndRows(); - - rows.forEach(function (row) { - var rowEl = row.getElement(); - rowEl.parentNode.removeChild(rowEl); - }); - }); - } else { - this.rows.forEach(function (row) { - var rowEl = row.getElement(); - rowEl.parentNode.removeChild(rowEl); - }); - } - - this.groupManager.table.rowManager.setDisplayRows(this.groupManager.updateGroupRows(), this.groupManager.getDisplayIndex()); - } else { - this.groupManager.updateGroupRows(true); - } - - this.groupManager.table.options.groupVisibilityChanged.call(this.table, this.getComponent(), false); -}; - -Group.prototype.show = function () { - var self = this; - - self.visible = true; - - if (this.groupManager.table.rowManager.getRenderMode() == "classic" && !this.groupManager.table.options.pagination) { - - this.element.classList.add("tabulator-group-visible"); - - var prev = self.getElement(); - - if (this.groupList.length) { - this.groupList.forEach(function (group) { - var rows = group.getHeadersAndRows(); - - rows.forEach(function (row) { - var rowEl = row.getElement(); - prev.parentNode.insertBefore(rowEl, prev.nextSibling); - row.initialize(); - prev = rowEl; - }); - }); - } else { - self.rows.forEach(function (row) { - var rowEl = row.getElement(); - prev.parentNode.insertBefore(rowEl, prev.nextSibling); - row.initialize(); - prev = rowEl; - }); - } - - this.groupManager.table.rowManager.setDisplayRows(this.groupManager.updateGroupRows(), this.groupManager.getDisplayIndex()); - } else { - this.groupManager.updateGroupRows(true); - } - - this.groupManager.table.options.groupVisibilityChanged.call(this.table, this.getComponent(), true); -}; - -Group.prototype._visSet = function () { - var data = []; - - if (typeof this.visible == "function") { - - this.rows.forEach(function (row) { - data.push(row.getData()); - }); - - this.visible = this.visible(this.key, this.getRowCount(), data, this.getComponent()); - } -}; - -Group.prototype.getRowGroup = function (row) { - var match = false; - if (this.groupList.length) { - this.groupList.forEach(function (group) { - var result = group.getRowGroup(row); - - if (result) { - match = result; - } - }); - } else { - if (this.rows.find(function (item) { - return item === row; - })) { - match = this; - } - } - - return match; -}; - -Group.prototype.getSubGroups = function (component) { - var output = []; - - this.groupList.forEach(function (child) { - output.push(component ? child.getComponent() : child); - }); - - return output; -}; - -Group.prototype.getRows = function (compoment) { - var output = []; - - this.rows.forEach(function (row) { - output.push(compoment ? row.getComponent() : row); - }); - - return output; -}; - -Group.prototype.generateGroupHeaderContents = function () { - var data = []; - - this.rows.forEach(function (row) { - data.push(row.getData()); - }); - - this.elementContents = this.generator(this.key, this.getRowCount(), data, this.getComponent()); - - while (this.element.firstChild) { - this.element.removeChild(this.element.firstChild); - }if (typeof this.elementContents === "string") { - this.element.innerHTML = this.elementContents; - } else { - this.element.appendChild(this.elementContents); - } - - this.element.insertBefore(this.arrowElement, this.element.firstChild); -}; - -////////////// Standard Row Functions ////////////// - -Group.prototype.getElement = function () { - this.addBindingsd = false; - - this._visSet(); - - if (this.visible) { - this.element.classList.add("tabulator-group-visible"); - } else { - this.element.classList.remove("tabulator-group-visible"); - } - - this.element.childNodes.forEach(function (child) { - child.parentNode.removeChild(child); - }); - - this.generateGroupHeaderContents(); - - // this.addBindings(); - - return this.element; -}; - -//normalize the height of elements in the row -Group.prototype.normalizeHeight = function () { - this.setHeight(this.element.clientHeight); -}; - -Group.prototype.initialize = function (force) { - if (!this.initialized || force) { - this.normalizeHeight(); - this.initialized = true; - } -}; - -Group.prototype.reinitialize = function () { - this.initialized = false; - this.height = 0; - - if (Tabulator.prototype.helpers.elVisible(this.element)) { - this.initialize(true); - } -}; - -Group.prototype.setHeight = function (height) { - if (this.height != height) { - this.height = height; - this.outerHeight = this.element.offsetHeight; - } -}; - -//return rows outer height -Group.prototype.getHeight = function () { - return this.outerHeight; -}; - -Group.prototype.getGroup = function () { - return this; -}; - -Group.prototype.reinitializeHeight = function () {}; -Group.prototype.calcHeight = function () {}; -Group.prototype.setCellHeight = function () {}; -Group.prototype.clearCellHeight = function () {}; - -//////////////// Object Generation ///////////////// -Group.prototype.getComponent = function () { - return new GroupComponent(this); -}; - -////////////////////////////////////////////////// -////////////// Group Row Extension /////////////// -////////////////////////////////////////////////// - -var GroupRows = function GroupRows(table) { - - this.table = table; //hold Tabulator object - - this.groupIDLookups = false; //enable table grouping and set field to group by - this.startOpen = [function () { - return false; - }]; //starting state of group - this.headerGenerator = [function () { - return ""; - }]; - this.groupList = []; //ordered list of groups - this.allowedValues = false; - this.groups = {}; //hold row groups - this.displayIndex = 0; //index in display pipeline -}; - -//initialize group configuration -GroupRows.prototype.initialize = function () { - var self = this, - groupBy = self.table.options.groupBy, - startOpen = self.table.options.groupStartOpen, - groupHeader = self.table.options.groupHeader; - - this.allowedValues = self.table.options.groupValues; - - self.headerGenerator = [function () { - return ""; - }]; - this.startOpen = [function () { - return false; - }]; //starting state of group - - self.table.modules.localize.bind("groups|item", function (langValue, lang) { - self.headerGenerator[0] = function (value, count, data) { - //header layout function - return (typeof value === "undefined" ? "" : value) + "(" + count + " " + (count === 1 ? langValue : lang.groups.items) + ")"; - }; - }); - - this.groupIDLookups = []; - - if (Array.isArray(groupBy) || groupBy) { - if (this.table.modExists("columnCalcs") && this.table.options.columnCalcs != "table" && this.table.options.columnCalcs != "both") { - this.table.modules.columnCalcs.removeCalcs(); - } - } else { - if (this.table.modExists("columnCalcs") && this.table.options.columnCalcs != "group") { - - var cols = this.table.columnManager.getRealColumns(); - - cols.forEach(function (col) { - if (col.definition.topCalc) { - self.table.modules.columnCalcs.initializeTopRow(); - } - - if (col.definition.bottomCalc) { - self.table.modules.columnCalcs.initializeBottomRow(); - } - }); - } - } - - if (!Array.isArray(groupBy)) { - groupBy = [groupBy]; - } - - groupBy.forEach(function (group, i) { - var lookupFunc, column; - - if (typeof group == "function") { - lookupFunc = group; - } else { - column = self.table.columnManager.getColumnByField(group); - - if (column) { - lookupFunc = function lookupFunc(data) { - return column.getFieldValue(data); - }; - } else { - lookupFunc = function lookupFunc(data) { - return data[group]; - }; - } - } - - self.groupIDLookups.push({ - field: typeof group === "function" ? false : group, - func: lookupFunc, - values: self.allowedValues ? self.allowedValues[i] : false - }); - }); - - if (startOpen) { - - if (!Array.isArray(startOpen)) { - startOpen = [startOpen]; - } - - startOpen.forEach(function (level) { - level = typeof level == "function" ? level : function () { - return true; - }; - }); - - self.startOpen = startOpen; - } - - if (groupHeader) { - self.headerGenerator = Array.isArray(groupHeader) ? groupHeader : [groupHeader]; - } - - this.initialized = true; -}; - -GroupRows.prototype.setDisplayIndex = function (index) { - this.displayIndex = index; -}; - -GroupRows.prototype.getDisplayIndex = function () { - return this.displayIndex; -}; - -//return appropriate rows with group headers -GroupRows.prototype.getRows = function (rows) { - if (this.groupIDLookups.length) { - - this.table.options.dataGrouping.call(this.table); - - this.generateGroups(rows); - - if (this.table.options.dataGrouped) { - this.table.options.dataGrouped.call(this.table, this.getGroups(true)); - } - - return this.updateGroupRows(); - } else { - return rows.slice(0); - } -}; - -GroupRows.prototype.getGroups = function (compoment) { - var groupComponents = []; - - this.groupList.forEach(function (group) { - groupComponents.push(compoment ? group.getComponent() : group); - }); - - return groupComponents; -}; - -GroupRows.prototype.pullGroupListData = function (groupList) { - var self = this; - var groupListData = []; - - groupList.forEach(function (group) { - var groupHeader = {}; - groupHeader.level = 0; - groupHeader.rowCount = 0; - groupHeader.headerContent = ""; - var childData = []; - - if (group.hasSubGroups) { - childData = self.pullGroupListData(group.groupList); - - groupHeader.level = group.level; - groupHeader.rowCount = childData.length - group.groupList.length; // data length minus number of sub-headers - groupHeader.headerContent = group.generator(group.key, groupHeader.rowCount, group.rows, group); - - groupListData.push(groupHeader); - groupListData = groupListData.concat(childData); - } else { - groupHeader.level = group.level; - groupHeader.headerContent = group.generator(group.key, group.rows.length, group.rows, group); - groupHeader.rowCount = group.getRows().length; - - groupListData.push(groupHeader); - - group.getRows().forEach(function (row) { - groupListData.push(row.getData("data")); - }); - } - }); - - return groupListData; -}; - -GroupRows.prototype.getGroupedData = function () { - - return this.pullGroupListData(this.groupList); -}; - -GroupRows.prototype.getRowGroup = function (row) { - var match = false; - - this.groupList.forEach(function (group) { - var result = group.getRowGroup(row); - - if (result) { - match = result; - } - }); - - return match; -}; - -GroupRows.prototype.countGroups = function () { - return this.groupList.length; -}; - -GroupRows.prototype.generateGroups = function (rows) { - var self = this, - oldGroups = self.groups; - - self.groups = {}; - self.groupList = []; - - if (this.allowedValues && this.allowedValues[0]) { - this.allowedValues[0].forEach(function (value) { - self.createGroup(value, 0, oldGroups); - }); - - rows.forEach(function (row) { - self.assignRowToExistingGroup(row, oldGroups); - }); - } else { - rows.forEach(function (row) { - self.assignRowToGroup(row, oldGroups); - }); - } -}; - -GroupRows.prototype.createGroup = function (groupID, level, oldGroups) { - var groupKey = level + "_" + groupID, - group; - - oldGroups = oldGroups || []; - - group = new Group(this, false, level, groupID, this.groupIDLookups[0].field, this.headerGenerator[0], oldGroups[groupKey]); - - this.groups[groupKey] = group; - this.groupList.push(group); -}; - -GroupRows.prototype.assignRowToGroup = function (row, oldGroups) { - var groupID = this.groupIDLookups[0].func(row.getData()), - groupKey = "0_" + groupID; - - if (!this.groups[groupKey]) { - this.createGroup(groupID, 0, oldGroups); - } - - this.groups[groupKey].addRow(row); -}; - -GroupRows.prototype.assignRowToExistingGroup = function (row, oldGroups) { - var groupID = this.groupIDLookups[0].func(row.getData()), - groupKey = "0_" + groupID; - - if (this.groups[groupKey]) { - this.groups[groupKey].addRow(row); - } -}; - -GroupRows.prototype.assignRowToGroup = function (row, oldGroups) { - var groupID = this.groupIDLookups[0].func(row.getData()), - newGroupNeeded = !this.groups["0_" + groupID]; - - if (newGroupNeeded) { - this.createGroup(groupID, 0, oldGroups); - } - - this.groups["0_" + groupID].addRow(row); - - return !newGroupNeeded; -}; - -GroupRows.prototype.updateGroupRows = function (force) { - var self = this, - output = [], - oldRowCount; - - self.groupList.forEach(function (group) { - output = output.concat(group.getHeadersAndRows()); - }); - - //force update of table display - if (force) { - - var displayIndex = self.table.rowManager.setDisplayRows(output, this.getDisplayIndex()); - - if (displayIndex !== true) { - this.setDisplayIndex(displayIndex); - } - - self.table.rowManager.refreshActiveData("group", true, true); - } - - return output; -}; - -GroupRows.prototype.scrollHeaders = function (left) { - this.groupList.forEach(function (group) { - group.arrowElement.style.marginLeft = left + "px"; - }); -}; - -GroupRows.prototype.removeGroup = function (group) { - var groupKey = group.level + "_" + group.key, - index; - - if (this.groups[groupKey]) { - delete this.groups[groupKey]; - - index = this.groupList.indexOf(group); - - if (index > -1) { - this.groupList.splice(index, 1); - } - } -}; - -Tabulator.prototype.registerModule("groupRows", GroupRows); \ No newline at end of file diff --git a/Gems/AssetMemoryAnalyzer/External/tabulator-master/dist/js/modules/group_rows.min.js b/Gems/AssetMemoryAnalyzer/External/tabulator-master/dist/js/modules/group_rows.min.js deleted file mode 100644 index 2bf081296a..0000000000 --- a/Gems/AssetMemoryAnalyzer/External/tabulator-master/dist/js/modules/group_rows.min.js +++ /dev/null @@ -1,2 +0,0 @@ -/* Tabulator v4.1.2 (c) Oliver Folkerd */ -var GroupComponent=function(t){this._group=t,this.type="GroupComponent"};GroupComponent.prototype.getKey=function(){return this._group.key},GroupComponent.prototype.getElement=function(){return this._group.element},GroupComponent.prototype.getRows=function(){return this._group.getRows(!0)},GroupComponent.prototype.getSubGroups=function(){return this._group.getSubGroups(!0)},GroupComponent.prototype.getParentGroup=function(){return!!this._group.parent&&this._group.parent.getComponent()},GroupComponent.prototype.getVisibility=function(){return this._group.visible},GroupComponent.prototype.show=function(){this._group.show()},GroupComponent.prototype.hide=function(){this._group.hide()},GroupComponent.prototype.toggle=function(){this._group.toggleVisibility()},GroupComponent.prototype._getSelf=function(){return this._group},GroupComponent.prototype.getTable=function(){return this._group.table};var Group=function(t,o,e,r,i,s,n){this.groupManager=t,this.parent=o,this.key=r,this.level=e,this.field=i,this.hasSubGroups=e-1?e?this.rows.splice(i+1,0,t):this.rows.splice(i,0,t):e?this.rows.push(t):this.rows.unshift(t),t.modules.group=this,this.generateGroupHeaderContents(),this.groupManager.table.modExists("columnCalcs")&&"table"!=this.groupManager.table.options.columnCalcs&&this.groupManager.table.modules.columnCalcs.recalcGroup(this)},Group.prototype.getRowIndex=function(t){},Group.prototype.conformRowData=function(t){return this.field?t[this.field]=this.key:console.warn("Data Conforming Error - Cannot conform row data to match new group as groupBy is a function"),this.parent&&(t=this.parent.conformRowData(t)),t},Group.prototype.removeRow=function(t){var o=this.rows.indexOf(t);o>-1&&this.rows.splice(o,1),this.rows.length?(this.generateGroupHeaderContents(),this.groupManager.table.modExists("columnCalcs")&&"table"!=this.groupManager.table.options.columnCalcs&&this.groupManager.table.modules.columnCalcs.recalcGroup(this)):(this.parent?this.parent.removeGroup(this):this.groupManager.removeGroup(this),this.groupManager.updateGroupRows(!0))},Group.prototype.removeGroup=function(t){var o,e=t.level+"_"+t.key;this.groups[e]&&(delete this.groups[e],o=this.groupList.indexOf(t),o>-1&&this.groupList.splice(o,1),this.groupList.length||(this.parent?this.parent.removeGroup(this):this.groupManager.removeGroup(this)))},Group.prototype.getHeadersAndRows=function(){var t=[];return t.push(this),this._visSet(),this.visible?this.groupList.length?this.groupList.forEach(function(o){t=t.concat(o.getHeadersAndRows())}):("table"!=this.groupManager.table.options.columnCalcs&&this.groupManager.table.modExists("columnCalcs")&&this.groupManager.table.modules.columnCalcs.hasTopCalcs()&&(this.calcs.top=this.groupManager.table.modules.columnCalcs.generateTopRow(this.rows),t.push(this.calcs.top)),t=t.concat(this.rows),"table"!=this.groupManager.table.options.columnCalcs&&this.groupManager.table.modExists("columnCalcs")&&this.groupManager.table.modules.columnCalcs.hasBottomCalcs()&&(this.calcs.bottom=this.groupManager.table.modules.columnCalcs.generateBottomRow(this.rows),t.push(this.calcs.bottom))):!this.groupList.length&&"table"!=this.groupManager.table.options.columnCalcs&&this.groupManager.table.options.groupClosedShowCalcs&&this.groupManager.table.modExists("columnCalcs")&&(this.groupManager.table.modules.columnCalcs.hasTopCalcs()&&(this.calcs.top=this.groupManager.table.modules.columnCalcs.generateTopRow(this.rows),t.push(this.calcs.top)),this.groupManager.table.modules.columnCalcs.hasBottomCalcs()&&(this.calcs.bottom=this.groupManager.table.modules.columnCalcs.generateBottomRow(this.rows),t.push(this.calcs.bottom))),t},Group.prototype.getData=function(t,o){var e=[];return this._visSet(),(!t||t&&this.visible)&&this.rows.forEach(function(t){e.push(t.getData(o||"data"))}),e},Group.prototype.getRowCount=function(){var t=0;return this.groupList.length?this.groupList.forEach(function(o){t+=o.getRowCount()}):t=this.rows.length,t},Group.prototype.toggleVisibility=function(){this.visible?this.hide():this.show()},Group.prototype.hide=function(){this.visible=!1,"classic"!=this.groupManager.table.rowManager.getRenderMode()||this.groupManager.table.options.pagination?this.groupManager.updateGroupRows(!0):(this.element.classList.remove("tabulator-group-visible"),this.groupList.length?this.groupList.forEach(function(t){var o;t.calcs.top&&(o=t.calcs.top.getElement(),o.parentNode.removeChild(o)),t.calcs.bottom&&(o=t.calcs.bottom.getElement(),o.parentNode.removeChild(o)),t.getHeadersAndRows().forEach(function(t){var o=t.getElement();o.parentNode.removeChild(o)})}):this.rows.forEach(function(t){var o=t.getElement();o.parentNode.removeChild(o)}),this.groupManager.table.rowManager.setDisplayRows(this.groupManager.updateGroupRows(),this.groupManager.getDisplayIndex())),this.groupManager.table.options.groupVisibilityChanged.call(this.table,this.getComponent(),!1)},Group.prototype.show=function(){var t=this;if(t.visible=!0,"classic"!=this.groupManager.table.rowManager.getRenderMode()||this.groupManager.table.options.pagination)this.groupManager.updateGroupRows(!0);else{this.element.classList.add("tabulator-group-visible");var o=t.getElement();this.groupList.length?this.groupList.forEach(function(t){t.getHeadersAndRows().forEach(function(t){var e=t.getElement();o.parentNode.insertBefore(e,o.nextSibling),t.initialize(),o=e})}):t.rows.forEach(function(t){var e=t.getElement();o.parentNode.insertBefore(e,o.nextSibling),t.initialize(),o=e}),this.groupManager.table.rowManager.setDisplayRows(this.groupManager.updateGroupRows(),this.groupManager.getDisplayIndex())}this.groupManager.table.options.groupVisibilityChanged.call(this.table,this.getComponent(),!0)},Group.prototype._visSet=function(){var t=[];"function"==typeof this.visible&&(this.rows.forEach(function(o){t.push(o.getData())}),this.visible=this.visible(this.key,this.getRowCount(),t,this.getComponent()))},Group.prototype.getRowGroup=function(t){var o=!1;return this.groupList.length?this.groupList.forEach(function(e){var r=e.getRowGroup(t);r&&(o=r)}):this.rows.find(function(o){return o===t})&&(o=this),o},Group.prototype.getSubGroups=function(t){var o=[];return this.groupList.forEach(function(e){o.push(t?e.getComponent():e)}),o},Group.prototype.getRows=function(t){var o=[];return this.rows.forEach(function(e){o.push(t?e.getComponent():e)}),o},Group.prototype.generateGroupHeaderContents=function(){var t=[];for(this.rows.forEach(function(o){t.push(o.getData())}),this.elementContents=this.generator(this.key,this.getRowCount(),t,this.getComponent());this.element.firstChild;)this.element.removeChild(this.element.firstChild);"string"==typeof this.elementContents?this.element.innerHTML=this.elementContents:this.element.appendChild(this.elementContents),this.element.insertBefore(this.arrowElement,this.element.firstChild)},Group.prototype.getElement=function(){return this.addBindingsd=!1,this._visSet(),this.visible?this.element.classList.add("tabulator-group-visible"):this.element.classList.remove("tabulator-group-visible"),this.element.childNodes.forEach(function(t){t.parentNode.removeChild(t)}),this.generateGroupHeaderContents(),this.element},Group.prototype.normalizeHeight=function(){this.setHeight(this.element.clientHeight)},Group.prototype.initialize=function(t){this.initialized&&!t||(this.normalizeHeight(),this.initialized=!0)},Group.prototype.reinitialize=function(){this.initialized=!1,this.height=0,Tabulator.prototype.helpers.elVisible(this.element)&&this.initialize(!0)},Group.prototype.setHeight=function(t){this.height!=t&&(this.height=t,this.outerHeight=this.element.offsetHeight)},Group.prototype.getHeight=function(){return this.outerHeight},Group.prototype.getGroup=function(){return this},Group.prototype.reinitializeHeight=function(){},Group.prototype.calcHeight=function(){},Group.prototype.setCellHeight=function(){},Group.prototype.clearCellHeight=function(){},Group.prototype.getComponent=function(){return new GroupComponent(this)};var GroupRows=function(t){this.table=t,this.groupIDLookups=!1,this.startOpen=[function(){return!1}],this.headerGenerator=[function(){return""}],this.groupList=[],this.allowedValues=!1,this.groups={},this.displayIndex=0};GroupRows.prototype.initialize=function(){var t=this,o=t.table.options.groupBy,e=t.table.options.groupStartOpen,r=t.table.options.groupHeader;if(this.allowedValues=t.table.options.groupValues,t.headerGenerator=[function(){return""}],this.startOpen=[function(){return!1}],t.table.modules.localize.bind("groups|item",function(o,e){t.headerGenerator[0]=function(t,r,i){return(void 0===t?"":t)+"("+r+" "+(1===r?o:e.groups.items)+")"}}),this.groupIDLookups=[],Array.isArray(o)||o)this.table.modExists("columnCalcs")&&"table"!=this.table.options.columnCalcs&&"both"!=this.table.options.columnCalcs&&this.table.modules.columnCalcs.removeCalcs();else if(this.table.modExists("columnCalcs")&&"group"!=this.table.options.columnCalcs){var i=this.table.columnManager.getRealColumns();i.forEach(function(o){o.definition.topCalc&&t.table.modules.columnCalcs.initializeTopRow(),o.definition.bottomCalc&&t.table.modules.columnCalcs.initializeBottomRow()})}Array.isArray(o)||(o=[o]),o.forEach(function(o,e){var r,i;"function"==typeof o?r=o:(i=t.table.columnManager.getColumnByField(o),r=i?function(t){return i.getFieldValue(t)}:function(t){return t[o]}),t.groupIDLookups.push({field:"function"!=typeof o&&o,func:r,values:!!t.allowedValues&&t.allowedValues[e]})}),e&&(Array.isArray(e)||(e=[e]),e.forEach(function(t){t="function"==typeof t?t:function(){return!0}}),t.startOpen=e),r&&(t.headerGenerator=Array.isArray(r)?r:[r]),this.initialized=!0},GroupRows.prototype.setDisplayIndex=function(t){this.displayIndex=t},GroupRows.prototype.getDisplayIndex=function(){return this.displayIndex},GroupRows.prototype.getRows=function(t){return this.groupIDLookups.length?(this.table.options.dataGrouping.call(this.table),this.generateGroups(t),this.table.options.dataGrouped&&this.table.options.dataGrouped.call(this.table,this.getGroups(!0)),this.updateGroupRows()):t.slice(0)},GroupRows.prototype.getGroups=function(t){var o=[];return this.groupList.forEach(function(e){o.push(t?e.getComponent():e)}),o},GroupRows.prototype.pullGroupListData=function(t){var o=this,e=[];return t.forEach(function(t){var r={};r.level=0,r.rowCount=0,r.headerContent="";var i=[];t.hasSubGroups?(i=o.pullGroupListData(t.groupList),r.level=t.level,r.rowCount=i.length-t.groupList.length,r.headerContent=t.generator(t.key,r.rowCount,t.rows,t),e.push(r),e=e.concat(i)):(r.level=t.level,r.headerContent=t.generator(t.key,t.rows.length,t.rows,t),r.rowCount=t.getRows().length,e.push(r),t.getRows().forEach(function(t){e.push(t.getData("data"))}))}),e},GroupRows.prototype.getGroupedData=function(){return this.pullGroupListData(this.groupList)},GroupRows.prototype.getRowGroup=function(t){var o=!1;return this.groupList.forEach(function(e){var r=e.getRowGroup(t);r&&(o=r)}),o},GroupRows.prototype.countGroups=function(){return this.groupList.length},GroupRows.prototype.generateGroups=function(t){var o=this,e=o.groups;o.groups={},o.groupList=[],this.allowedValues&&this.allowedValues[0]?(this.allowedValues[0].forEach(function(t){o.createGroup(t,0,e)}),t.forEach(function(t){o.assignRowToExistingGroup(t,e)})):t.forEach(function(t){o.assignRowToGroup(t,e)})},GroupRows.prototype.createGroup=function(t,o,e){var r,i=o+"_"+t;e=e||[],r=new Group(this,!1,o,t,this.groupIDLookups[0].field,this.headerGenerator[0],e[i]),this.groups[i]=r,this.groupList.push(r)},GroupRows.prototype.assignRowToGroup=function(t,o){var e=this.groupIDLookups[0].func(t.getData()),r="0_"+e;this.groups[r]||this.createGroup(e,0,o),this.groups[r].addRow(t)},GroupRows.prototype.assignRowToExistingGroup=function(t,o){var e=this.groupIDLookups[0].func(t.getData()),r="0_"+e;this.groups[r]&&this.groups[r].addRow(t)},GroupRows.prototype.assignRowToGroup=function(t,o){var e=this.groupIDLookups[0].func(t.getData()),r=!this.groups["0_"+e];return r&&this.createGroup(e,0,o),this.groups["0_"+e].addRow(t),!r},GroupRows.prototype.updateGroupRows=function(t){var o=this,e=[];if(o.groupList.forEach(function(t){e=e.concat(t.getHeadersAndRows())}),t){var r=o.table.rowManager.setDisplayRows(e,this.getDisplayIndex());!0!==r&&this.setDisplayIndex(r),o.table.rowManager.refreshActiveData("group",!0,!0)}return e},GroupRows.prototype.scrollHeaders=function(t){this.groupList.forEach(function(o){o.arrowElement.style.marginLeft=t+"px"})},GroupRows.prototype.removeGroup=function(t){var o,e=t.level+"_"+t.key;this.groups[e]&&(delete this.groups[e],(o=this.groupList.indexOf(t))>-1&&this.groupList.splice(o,1))},Tabulator.prototype.registerModule("groupRows",GroupRows); \ No newline at end of file diff --git a/Gems/AssetMemoryAnalyzer/External/tabulator-master/dist/js/modules/history.js b/Gems/AssetMemoryAnalyzer/External/tabulator-master/dist/js/modules/history.js deleted file mode 100644 index eaf836fbb3..0000000000 --- a/Gems/AssetMemoryAnalyzer/External/tabulator-master/dist/js/modules/history.js +++ /dev/null @@ -1,133 +0,0 @@ -/* Tabulator v4.1.2 (c) Oliver Folkerd */ - -var History = function History(table) { - this.table = table; //hold Tabulator object - - this.history = []; - this.index = -1; -}; - -History.prototype.clear = function () { - this.history = []; - this.index = -1; -}; - -History.prototype.action = function (type, component, data) { - - this.history = this.history.slice(0, this.index + 1); - - this.history.push({ - type: type, - component: component, - data: data - }); - - this.index++; -}; - -History.prototype.getHistoryUndoSize = function () { - return this.index + 1; -}; - -History.prototype.getHistoryRedoSize = function () { - return this.history.length - (this.index + 1); -}; - -History.prototype.undo = function () { - - if (this.index > -1) { - var action = this.history[this.index]; - - this.undoers[action.type].call(this, action); - - this.index--; - - this.table.options.historyUndo.call(this.table, action.type, action.component.getComponent(), action.data); - - return true; - } else { - console.warn("History Undo Error - No more history to undo"); - return false; - } -}; - -History.prototype.redo = function () { - if (this.history.length - 1 > this.index) { - - this.index++; - - var action = this.history[this.index]; - - this.redoers[action.type].call(this, action); - - this.table.options.historyRedo.call(this.table, action.type, action.component.getComponent(), action.data); - - return true; - } else { - console.warn("History Redo Error - No more history to redo"); - return false; - } -}; - -History.prototype.undoers = { - cellEdit: function cellEdit(action) { - action.component.setValueProcessData(action.data.oldValue); - }, - - rowAdd: function rowAdd(action) { - action.component.deleteActual(); - }, - - rowDelete: function rowDelete(action) { - var newRow = this.table.rowManager.addRowActual(action.data.data, action.data.pos, action.data.index); - - this._rebindRow(action.component, newRow); - }, - - rowMove: function rowMove(action) { - this.table.rowManager.moveRowActual(action.component, this.table.rowManager.rows[action.data.pos], false); - this.table.rowManager.redraw(); - } -}; - -History.prototype.redoers = { - cellEdit: function cellEdit(action) { - action.component.setValueProcessData(action.data.newValue); - }, - - rowAdd: function rowAdd(action) { - var newRow = this.table.rowManager.addRowActual(action.data.data, action.data.pos, action.data.index); - - this._rebindRow(action.component, newRow); - }, - - rowDelete: function rowDelete(action) { - action.component.deleteActual(); - }, - - rowMove: function rowMove(action) { - this.table.rowManager.moveRowActual(action.component, this.table.rowManager.rows[action.data.pos], false); - this.table.rowManager.redraw(); - } -}; - -//rebind rows to new element after deletion -History.prototype._rebindRow = function (oldRow, newRow) { - this.history.forEach(function (action) { - if (action.component instanceof Row) { - if (action.component === oldRow) { - action.component = newRow; - } - } else if (action.component instanceof Cell) { - if (action.component.row === oldRow) { - var field = action.component.column.getField(); - - if (field) { - action.component = newRow.getCell(field); - } - } - } - }); -}; - -Tabulator.prototype.registerModule("history", History); \ No newline at end of file diff --git a/Gems/AssetMemoryAnalyzer/External/tabulator-master/dist/js/modules/history.min.js b/Gems/AssetMemoryAnalyzer/External/tabulator-master/dist/js/modules/history.min.js deleted file mode 100644 index 5a32bd6a02..0000000000 --- a/Gems/AssetMemoryAnalyzer/External/tabulator-master/dist/js/modules/history.min.js +++ /dev/null @@ -1,2 +0,0 @@ -/* Tabulator v4.1.2 (c) Oliver Folkerd */ -var History=function(t){this.table=t,this.history=[],this.index=-1};History.prototype.clear=function(){this.history=[],this.index=-1},History.prototype.action=function(t,o,e){this.history=this.history.slice(0,this.index+1),this.history.push({type:t,component:o,data:e}),this.index++},History.prototype.getHistoryUndoSize=function(){return this.index+1},History.prototype.getHistoryRedoSize=function(){return this.history.length-(this.index+1)},History.prototype.undo=function(){if(this.index>-1){var t=this.history[this.index];return this.undoers[t.type].call(this,t),this.index--,this.table.options.historyUndo.call(this.table,t.type,t.component.getComponent(),t.data),!0}return console.warn("History Undo Error - No more history to undo"),!1},History.prototype.redo=function(){if(this.history.length-1>this.index){this.index++;var t=this.history[this.index];return this.redoers[t.type].call(this,t),this.table.options.historyRedo.call(this.table,t.type,t.component.getComponent(),t.data),!0}return console.warn("History Redo Error - No more history to redo"),!1},History.prototype.undoers={cellEdit:function(t){t.component.setValueProcessData(t.data.oldValue)},rowAdd:function(t){t.component.deleteActual()},rowDelete:function(t){var o=this.table.rowManager.addRowActual(t.data.data,t.data.pos,t.data.index);this._rebindRow(t.component,o)},rowMove:function(t){this.table.rowManager.moveRowActual(t.component,this.table.rowManager.rows[t.data.pos],!1),this.table.rowManager.redraw()}},History.prototype.redoers={cellEdit:function(t){t.component.setValueProcessData(t.data.newValue)},rowAdd:function(t){var o=this.table.rowManager.addRowActual(t.data.data,t.data.pos,t.data.index);this._rebindRow(t.component,o)},rowDelete:function(t){t.component.deleteActual()},rowMove:function(t){this.table.rowManager.moveRowActual(t.component,this.table.rowManager.rows[t.data.pos],!1),this.table.rowManager.redraw()}},History.prototype._rebindRow=function(t,o){this.history.forEach(function(e){if(e.component instanceof Row)e.component===t&&(e.component=o);else if(e.component instanceof Cell&&e.component.row===t){var n=e.component.column.getField();n&&(e.component=o.getCell(n))}})},Tabulator.prototype.registerModule("history",History); \ No newline at end of file diff --git a/Gems/AssetMemoryAnalyzer/External/tabulator-master/dist/js/modules/html_table_import.js b/Gems/AssetMemoryAnalyzer/External/tabulator-master/dist/js/modules/html_table_import.js deleted file mode 100644 index 3235c6a79b..0000000000 --- a/Gems/AssetMemoryAnalyzer/External/tabulator-master/dist/js/modules/html_table_import.js +++ /dev/null @@ -1,199 +0,0 @@ -var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol" ? function (obj) { return typeof obj; } : function (obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; - -/* Tabulator v4.1.2 (c) Oliver Folkerd */ - -var HtmlTableImport = function HtmlTableImport(table) { - this.table = table; //hold Tabulator object - this.fieldIndex = []; - this.hasIndex = false; -}; - -HtmlTableImport.prototype.parseTable = function () { - var self = this, - element = self.table.element, - options = self.table.options, - columns = options.columns, - headers = element.getElementsByTagName("th"), - rows = element.getElementsByTagName("tbody")[0], - data = [], - newTable; - - self.hasIndex = false; - - self.table.options.htmlImporting.call(this.table); - - rows = rows ? rows.getElementsByTagName("tr") : []; - - //check for tablator inline options - self._extractOptions(element, options); - - if (headers.length) { - self._extractHeaders(headers, rows); - } else { - self._generateBlankHeaders(headers, rows); - } - - //iterate through table rows and build data set - for (var index = 0; index < rows.length; index++) { - var row = rows[index], - cells = row.getElementsByTagName("td"), - item = {}; - - //create index if the dont exist in table - if (!self.hasIndex) { - item[options.index] = index; - } - - for (var i = 0; i < cells.length; i++) { - var cell = cells[i]; - if (typeof this.fieldIndex[i] !== "undefined") { - item[this.fieldIndex[i]] = cell.innerHTML; - } - } - - //add row data to item - data.push(item); - } - - //create new element - var newElement = document.createElement("div"); - - //transfer attributes to new element - var attributes = element.attributes; - - // loop through attributes and apply them on div - - for (var i in attributes) { - if (_typeof(attributes[i]) == "object") { - newElement.setAttribute(attributes[i].name, attributes[i].value); - } - } - - // replace table with div element - element.parentNode.replaceChild(newElement, element); - - options.data = data; - - self.table.options.htmlImported.call(this.table); - - // // newElement.tabulator(options); - - this.table.element = newElement; -}; - -//extract tabulator attribute options -HtmlTableImport.prototype._extractOptions = function (element, options) { - var attributes = element.attributes; - - for (var index in attributes) { - var attrib = attributes[index]; - var name; - - if ((typeof attrib === "undefined" ? "undefined" : _typeof(attrib)) == "object" && attrib.name && attrib.name.indexOf("tabulator-") === 0) { - name = attrib.name.replace("tabulator-", ""); - - for (var key in options) { - if (key.toLowerCase() == name) { - options[key] = this._attribValue(attrib.value); - } - } - } - } -}; - -//get value of attribute -HtmlTableImport.prototype._attribValue = function (value) { - if (value === "true") { - return true; - } - - if (value === "false") { - return false; - } - - return value; -}; - -//find column if it has already been defined -HtmlTableImport.prototype._findCol = function (title) { - var match = this.table.options.columns.find(function (column) { - return column.title === title; - }); - - return match || false; -}; - -//extract column from headers -HtmlTableImport.prototype._extractHeaders = function (headers, rows) { - for (var index = 0; index < headers.length; index++) { - var header = headers[index], - exists = false, - col = this._findCol(header.textContent), - width, - attributes; - - if (col) { - exists = true; - } else { - col = { title: header.textContent.trim() }; - } - - if (!col.field) { - col.field = header.textContent.trim().toLowerCase().replace(" ", "_"); - } - - width = header.getAttribute("width"); - - if (width && !col.width) { - col.width = width; - } - - //check for tablator inline options - attributes = header.attributes; - - // //check for tablator inline options - this._extractOptions(header, col); - - for (var i in attributes) { - var attrib = attributes[i], - name; - - if ((typeof attrib === "undefined" ? "undefined" : _typeof(attrib)) == "object" && attrib.name && attrib.name.indexOf("tabulator-") === 0) { - - name = attrib.name.replace("tabulator-", ""); - - col[name] = this._attribValue(attrib.value); - } - } - - this.fieldIndex[index] = col.field; - - if (col.field == this.table.options.index) { - this.hasIndex = true; - } - - if (!exists) { - this.table.options.columns.push(col); - } - } -}; - -//generate blank headers -HtmlTableImport.prototype._generateBlankHeaders = function (headers, rows) { - for (var index = 0; index < headers.length; index++) { - var header = headers[index], - col = { title: "", field: "col" + index }; - - this.fieldIndex[index] = col.field; - - var width = header.getAttribute("width"); - - if (width) { - col.width = width; - } - - this.table.options.columns.push(col); - } -}; - -Tabulator.prototype.registerModule("htmlTableImport", HtmlTableImport); \ No newline at end of file diff --git a/Gems/AssetMemoryAnalyzer/External/tabulator-master/dist/js/modules/html_table_import.min.js b/Gems/AssetMemoryAnalyzer/External/tabulator-master/dist/js/modules/html_table_import.min.js deleted file mode 100644 index ceac6ad5e5..0000000000 --- a/Gems/AssetMemoryAnalyzer/External/tabulator-master/dist/js/modules/html_table_import.min.js +++ /dev/null @@ -1,2 +0,0 @@ -/* Tabulator v4.1.2 (c) Oliver Folkerd */ -var _typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},HtmlTableImport=function(t){this.table=t,this.fieldIndex=[],this.hasIndex=!1};HtmlTableImport.prototype.parseTable=function(){var t=this,e=t.table.element,o=t.table.options,a=(o.columns,e.getElementsByTagName("th")),n=e.getElementsByTagName("tbody")[0],r=[];t.hasIndex=!1,t.table.options.htmlImporting.call(this.table),n=n?n.getElementsByTagName("tr"):[],t._extractOptions(e,o),a.length?t._extractHeaders(a,n):t._generateBlankHeaders(a,n);for(var l=0;l -1) { - self.pressedKeys.splice(index, 1); - } - } - }; - - this.table.element.addEventListener("keydown", this.keyupBinding); - - this.table.element.addEventListener("keyup", this.keydownBinding); -}; - -Keybindings.prototype.clearBindings = function () { - if (this.keyupBinding) { - this.table.element.removeEventListener("keydown", this.keyupBinding); - } - - if (this.keydownBinding) { - this.table.element.removeEventListener("keyup", this.keydownBinding); - } -}; - -Keybindings.prototype.checkBinding = function (e, binding) { - var self = this, - match = true; - - if (e.ctrlKey == binding.ctrl && e.shiftKey == binding.shift) { - binding.keys.forEach(function (key) { - var index = self.pressedKeys.indexOf(key); - - if (index == -1) { - match = false; - } - }); - - if (match) { - binding.action.call(self, e); - } - - return true; - } - - return false; -}; - -//default bindings -Keybindings.prototype.bindings = { - navPrev: "shift + 9", - navNext: 9, - navUp: 38, - navDown: 40, - scrollPageUp: 33, - scrollPageDown: 34, - scrollToStart: 36, - scrollToEnd: 35, - undo: "ctrl + 90", - redo: "ctrl + 89", - copyToClipboard: "ctrl + 67" -}; - -//default actions -Keybindings.prototype.actions = { - keyBlock: function keyBlock(e) { - e.stopPropagation(); - e.preventDefault(); - }, - scrollPageUp: function scrollPageUp(e) { - var rowManager = this.table.rowManager, - newPos = rowManager.scrollTop - rowManager.height, - scrollMax = rowManager.element.scrollHeight; - - e.preventDefault(); - - if (rowManager.displayRowsCount) { - if (newPos >= 0) { - rowManager.element.scrollTop = newPos; - } else { - rowManager.scrollToRow(rowManager.getDisplayRows()[0]); - } - } - - this.table.element.focus(); - }, - scrollPageDown: function scrollPageDown(e) { - var rowManager = this.table.rowManager, - newPos = rowManager.scrollTop + rowManager.height, - scrollMax = rowManager.element.scrollHeight; - - e.preventDefault(); - - if (rowManager.displayRowsCount) { - if (newPos <= scrollMax) { - rowManager.element.scrollTop = newPos; - } else { - rowManager.scrollToRow(rowManager.getDisplayRows()[rowManager.displayRowsCount - 1]); - } - } - - this.table.element.focus(); - }, - scrollToStart: function scrollToStart(e) { - var rowManager = this.table.rowManager; - - e.preventDefault(); - - if (rowManager.displayRowsCount) { - rowManager.scrollToRow(rowManager.getDisplayRows()[0]); - } - - this.table.element.focus(); - }, - scrollToEnd: function scrollToEnd(e) { - var rowManager = this.table.rowManager; - - e.preventDefault(); - - if (rowManager.displayRowsCount) { - rowManager.scrollToRow(rowManager.getDisplayRows()[rowManager.displayRowsCount - 1]); - } - - this.table.element.focus(); - }, - navPrev: function navPrev(e) { - var cell = false; - - if (this.table.modExists("edit")) { - cell = this.table.modules.edit.currentCell; - - if (cell) { - e.preventDefault(); - cell.nav().prev(); - } - } - }, - - navNext: function navNext(e) { - var cell = false; - - if (this.table.modExists("edit")) { - cell = this.table.modules.edit.currentCell; - - if (cell) { - e.preventDefault(); - cell.nav().next(); - } - } - }, - - navLeft: function navLeft(e) { - var cell = false; - - if (this.table.modExists("edit")) { - cell = this.table.modules.edit.currentCell; - - if (cell) { - e.preventDefault(); - cell.nav().left(); - } - } - }, - - navRight: function navRight(e) { - var cell = false; - - if (this.table.modExists("edit")) { - cell = this.table.modules.edit.currentCell; - - if (cell) { - e.preventDefault(); - cell.nav().right(); - } - } - }, - - navUp: function navUp(e) { - var cell = false; - - if (this.table.modExists("edit")) { - cell = this.table.modules.edit.currentCell; - - if (cell) { - e.preventDefault(); - cell.nav().up(); - } - } - }, - - navDown: function navDown(e) { - var cell = false; - - if (this.table.modExists("edit")) { - cell = this.table.modules.edit.currentCell; - - if (cell) { - e.preventDefault(); - cell.nav().down(); - } - } - }, - - undo: function undo(e) { - var cell = false; - if (this.table.options.history && this.table.modExists("history") && this.table.modExists("edit")) { - - cell = this.table.modules.edit.currentCell; - - if (!cell) { - e.preventDefault(); - this.table.modules.history.undo(); - } - } - }, - - redo: function redo(e) { - var cell = false; - if (this.table.options.history && this.table.modExists("history") && this.table.modExists("edit")) { - - cell = this.table.modules.edit.currentCell; - - if (!cell) { - e.preventDefault(); - this.table.modules.history.redo(); - } - } - }, - - copyToClipboard: function copyToClipboard(e) { - if (!this.table.modules.edit.currentCell) { - if (this.table.modExists("clipboard", true)) { - this.table.modules.clipboard.copy(!this.table.options.selectable || this.table.options.selectable == "highlight" ? "active" : "selected", null, null, null, true); - } - } - } -}; - -Tabulator.prototype.registerModule("keybindings", Keybindings); \ No newline at end of file diff --git a/Gems/AssetMemoryAnalyzer/External/tabulator-master/dist/js/modules/keybindings.min.js b/Gems/AssetMemoryAnalyzer/External/tabulator-master/dist/js/modules/keybindings.min.js deleted file mode 100644 index 837370baba..0000000000 --- a/Gems/AssetMemoryAnalyzer/External/tabulator-master/dist/js/modules/keybindings.min.js +++ /dev/null @@ -1,2 +0,0 @@ -/* Tabulator v4.1.2 (c) Oliver Folkerd */ -var _typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Keybindings=function(t){this.table=t,this.watchKeys=null,this.pressedKeys=null,this.keyupBinding=!1,this.keydownBinding=!1};Keybindings.prototype.initialize=function(){var t=this.table.options.keybindings,e={};if(this.watchKeys={},this.pressedKeys=[],!1!==t){for(var i in this.bindings)e[i]=this.bindings[i];if(Object.keys(t).length)for(var n in t)e[n]=t[n];this.mapBindings(e),this.bindEvents()}},Keybindings.prototype.mapBindings=function(t){var e=this,i=this;for(var n in t)!function(n){e.actions[n]?t[n]&&("object"!==_typeof(t[n])&&(t[n]=[t[n]]),t[n].forEach(function(t){i.mapBinding(n,t)})):console.warn("Key Binding Error - no such action:",n)}(n)},Keybindings.prototype.mapBinding=function(t,e){var i=this,n={action:this.actions[t],keys:[],ctrl:!1,shift:!1};e.toString().toLowerCase().split(" ").join("").split("+").forEach(function(t){switch(t){case"ctrl":n.ctrl=!0;break;case"shift":n.shift=!0;break;default:t=parseInt(t),n.keys.push(t),i.watchKeys[t]||(i.watchKeys[t]=[]),i.watchKeys[t].push(n)}})},Keybindings.prototype.bindEvents=function(){var t=this;this.keyupBinding=function(e){var i=e.keyCode,n=t.watchKeys[i];n&&(t.pressedKeys.push(i),n.forEach(function(i){t.checkBinding(e,i)}))},this.keydownBinding=function(e){var i=e.keyCode;if(t.watchKeys[i]){var n=t.pressedKeys.indexOf(i);n>-1&&t.pressedKeys.splice(n,1)}},this.table.element.addEventListener("keydown",this.keyupBinding),this.table.element.addEventListener("keyup",this.keydownBinding)},Keybindings.prototype.clearBindings=function(){this.keyupBinding&&this.table.element.removeEventListener("keydown",this.keyupBinding),this.keydownBinding&&this.table.element.removeEventListener("keyup",this.keydownBinding)},Keybindings.prototype.checkBinding=function(t,e){var i=this,n=!0;return t.ctrlKey==e.ctrl&&t.shiftKey==e.shift&&(e.keys.forEach(function(t){-1==i.pressedKeys.indexOf(t)&&(n=!1)}),n&&e.action.call(i,t),!0)},Keybindings.prototype.bindings={navPrev:"shift + 9",navNext:9,navUp:38,navDown:40,scrollPageUp:33,scrollPageDown:34,scrollToStart:36,scrollToEnd:35,undo:"ctrl + 90",redo:"ctrl + 89",copyToClipboard:"ctrl + 67"},Keybindings.prototype.actions={keyBlock:function(t){t.stopPropagation(),t.preventDefault()},scrollPageUp:function(t){var e=this.table.rowManager,i=e.scrollTop-e.height;e.element.scrollHeight;t.preventDefault(),e.displayRowsCount&&(i>=0?e.element.scrollTop=i:e.scrollToRow(e.getDisplayRows()[0])),this.table.element.focus()},scrollPageDown:function(t){var e=this.table.rowManager,i=e.scrollTop+e.height,n=e.element.scrollHeight;t.preventDefault(),e.displayRowsCount&&(i<=n?e.element.scrollTop=i:e.scrollToRow(e.getDisplayRows()[e.displayRowsCount-1])),this.table.element.focus()},scrollToStart:function(t){var e=this.table.rowManager;t.preventDefault(),e.displayRowsCount&&e.scrollToRow(e.getDisplayRows()[0]),this.table.element.focus()},scrollToEnd:function(t){var e=this.table.rowManager;t.preventDefault(),e.displayRowsCount&&e.scrollToRow(e.getDisplayRows()[e.displayRowsCount-1]),this.table.element.focus()},navPrev:function(t){var e=!1;this.table.modExists("edit")&&(e=this.table.modules.edit.currentCell)&&(t.preventDefault(),e.nav().prev())},navNext:function(t){var e=!1;this.table.modExists("edit")&&(e=this.table.modules.edit.currentCell)&&(t.preventDefault(),e.nav().next())},navLeft:function(t){var e=!1;this.table.modExists("edit")&&(e=this.table.modules.edit.currentCell)&&(t.preventDefault(),e.nav().left())},navRight:function(t){var e=!1;this.table.modExists("edit")&&(e=this.table.modules.edit.currentCell)&&(t.preventDefault(),e.nav().right())},navUp:function(t){var e=!1;this.table.modExists("edit")&&(e=this.table.modules.edit.currentCell)&&(t.preventDefault(),e.nav().up())},navDown:function(t){var e=!1;this.table.modExists("edit")&&(e=this.table.modules.edit.currentCell)&&(t.preventDefault(),e.nav().down())},undo:function(t){this.table.options.history&&this.table.modExists("history")&&this.table.modExists("edit")&&(this.table.modules.edit.currentCell||(t.preventDefault(),this.table.modules.history.undo()))},redo:function(t){this.table.options.history&&this.table.modExists("history")&&this.table.modExists("edit")&&(this.table.modules.edit.currentCell||(t.preventDefault(),this.table.modules.history.redo()))},copyToClipboard:function(t){this.table.modules.edit.currentCell||this.table.modExists("clipboard",!0)&&this.table.modules.clipboard.copy(this.table.options.selectable&&"highlight"!=this.table.options.selectable?"selected":"active",null,null,null,!0)}},Tabulator.prototype.registerModule("keybindings",Keybindings); \ No newline at end of file diff --git a/Gems/AssetMemoryAnalyzer/External/tabulator-master/dist/js/modules/moveable_columns.js b/Gems/AssetMemoryAnalyzer/External/tabulator-master/dist/js/modules/moveable_columns.js deleted file mode 100644 index ddfb57795d..0000000000 --- a/Gems/AssetMemoryAnalyzer/External/tabulator-master/dist/js/modules/moveable_columns.js +++ /dev/null @@ -1,196 +0,0 @@ -/* Tabulator v4.1.2 (c) Oliver Folkerd */ - -var MoveColumns = function MoveColumns(table) { - this.table = table; //hold Tabulator object - this.placeholderElement = this.createPlaceholderElement(); - this.hoverElement = false; //floating column header element - this.checkTimeout = false; //click check timeout holder - this.checkPeriod = 250; //period to wait on mousedown to consider this a move and not a click - this.moving = false; //currently moving column - this.toCol = false; //destination column - this.toColAfter = false; //position of moving column relative to the desitnation column - this.startX = 0; //starting position within header element - this.autoScrollMargin = 40; //auto scroll on edge when within margin - this.autoScrollStep = 5; //auto scroll distance in pixels - this.autoScrollTimeout = false; //auto scroll timeout - - this.moveHover = this.moveHover.bind(this); - this.endMove = this.endMove.bind(this); -}; - -MoveColumns.prototype.createPlaceholderElement = function () { - var el = document.createElement("div"); - - el.classList.add("tabulator-col"); - el.classList.add("tabulator-col-placeholder"); - - return el; -}; - -MoveColumns.prototype.initializeColumn = function (column) { - var self = this, - config = {}, - colEl; - - if (!column.modules.frozen) { - - colEl = column.getElement(); - - config.mousemove = function (e) { - if (column.parent === self.moving.parent) { - if (e.pageX - Tabulator.prototype.helpers.elOffset(colEl).left + self.table.columnManager.element.scrollLeft > column.getWidth() / 2) { - if (self.toCol !== column || !self.toColAfter) { - colEl.parentNode.insertBefore(self.placeholderElement, colEl.nextSibling); - self.moveColumn(column, true); - } - } else { - if (self.toCol !== column || self.toColAfter) { - colEl.parentNode.insertBefore(self.placeholderElement, colEl); - self.moveColumn(column, false); - } - } - } - }.bind(self); - - colEl.addEventListener("mousedown", function (e) { - if (e.which === 1) { - self.checkTimeout = setTimeout(function () { - self.startMove(e, column); - }, self.checkPeriod); - } - }); - - colEl.addEventListener("mouseup", function (e) { - if (e.which === 1) { - if (self.checkTimeout) { - clearTimeout(self.checkTimeout); - } - } - }); - } - - column.modules.moveColumn = config; -}; - -MoveColumns.prototype.startMove = function (e, column) { - var element = column.getElement(); - - this.moving = column; - this.startX = e.pageX - Tabulator.prototype.helpers.elOffset(element).left; - - this.table.element.classList.add("tabulator-block-select"); - - //create placeholder - - this.placeholderElement.style.width = column.getWidth() + "px"; - this.placeholderElement.style.height = column.getHeight() + "px"; - - element.parentNode.insertBefore(this.placeholderElement, element); - element.parentNode.removeChild(element); - - //create hover element - this.hoverElement = element.cloneNode(true); - this.hoverElement.classList.add("tabulator-moving"); - - this.table.columnManager.getElement().appendChild(this.hoverElement); - - this.hoverElement.style.left = "0"; - this.hoverElement.style.bottom = "0"; - - this._bindMouseMove(); - - document.body.addEventListener("mousemove", this.moveHover); - document.body.addEventListener("mouseup", this.endMove); - - this.moveHover(e); -}; - -MoveColumns.prototype._bindMouseMove = function () { - this.table.columnManager.columnsByIndex.forEach(function (column) { - if (column.modules.moveColumn.mousemove) { - column.getElement().addEventListener("mousemove", column.modules.moveColumn.mousemove); - } - }); -}; - -MoveColumns.prototype._unbindMouseMove = function () { - this.table.columnManager.columnsByIndex.forEach(function (column) { - if (column.modules.moveColumn.mousemove) { - column.getElement().removeEventListener("mousemove", column.modules.moveColumn.mousemove); - } - }); -}; - -MoveColumns.prototype.moveColumn = function (column, after) { - var movingCells = this.moving.getCells(); - - this.toCol = column; - this.toColAfter = after; - - if (after) { - column.getCells().forEach(function (cell, i) { - var cellEl = cell.getElement(); - cellEl.parentNode.insertBefore(movingCells[i].getElement(), cellEl.nextSibling); - }); - } else { - column.getCells().forEach(function (cell, i) { - var cellEl = cell.getElement(); - cellEl.parentNode.insertBefore(movingCells[i].getElement(), cellEl); - }); - } -}; - -MoveColumns.prototype.endMove = function (e) { - if (e.which === 1) { - this._unbindMouseMove(); - - this.placeholderElement.parentNode.insertBefore(this.moving.getElement(), this.placeholderElement.nextSibling); - this.placeholderElement.parentNode.removeChild(this.placeholderElement); - this.hoverElement.parentNode.removeChild(this.hoverElement); - - this.table.element.classList.remove("tabulator-block-select"); - - if (this.toCol) { - this.table.columnManager.moveColumn(this.moving, this.toCol, this.toColAfter); - } - - this.moving = false; - this.toCol = false; - this.toColAfter = false; - - document.body.removeEventListener("mousemove", this.moveHover); - document.body.removeEventListener("mouseup", this.endMove); - } -}; - -MoveColumns.prototype.moveHover = function (e) { - var self = this, - columnHolder = self.table.columnManager.getElement(), - scrollLeft = columnHolder.scrollLeft, - xPos = e.pageX - Tabulator.prototype.helpers.elOffset(columnHolder).left + scrollLeft, - scrollPos; - - self.hoverElement.style.left = xPos - self.startX + "px"; - - if (xPos - scrollLeft < self.autoScrollMargin) { - if (!self.autoScrollTimeout) { - self.autoScrollTimeout = setTimeout(function () { - scrollPos = Math.max(0, scrollLeft - 5); - self.table.rowManager.getElement().scrollLeft = scrollPos; - self.autoScrollTimeout = false; - }, 1); - } - } - - if (scrollLeft + columnHolder.clientWidth - xPos < self.autoScrollMargin) { - if (!self.autoScrollTimeout) { - self.autoScrollTimeout = setTimeout(function () { - scrollPos = Math.min(columnHolder.clientWidth, scrollLeft + 5); - self.table.rowManager.getElement().scrollLeft = scrollPos; - self.autoScrollTimeout = false; - }, 1); - } - } -}; - -Tabulator.prototype.registerModule("moveColumn", MoveColumns); \ No newline at end of file diff --git a/Gems/AssetMemoryAnalyzer/External/tabulator-master/dist/js/modules/moveable_columns.min.js b/Gems/AssetMemoryAnalyzer/External/tabulator-master/dist/js/modules/moveable_columns.min.js deleted file mode 100644 index fbcaac7067..0000000000 --- a/Gems/AssetMemoryAnalyzer/External/tabulator-master/dist/js/modules/moveable_columns.min.js +++ /dev/null @@ -1,2 +0,0 @@ -/* Tabulator v4.1.2 (c) Oliver Folkerd */ -var MoveColumns=function(e){this.table=e,this.placeholderElement=this.createPlaceholderElement(),this.hoverElement=!1,this.checkTimeout=!1,this.checkPeriod=250,this.moving=!1,this.toCol=!1,this.toColAfter=!1,this.startX=0,this.autoScrollMargin=40,this.autoScrollStep=5,this.autoScrollTimeout=!1,this.moveHover=this.moveHover.bind(this),this.endMove=this.endMove.bind(this)};MoveColumns.prototype.createPlaceholderElement=function(){var e=document.createElement("div");return e.classList.add("tabulator-col"),e.classList.add("tabulator-col-placeholder"),e},MoveColumns.prototype.initializeColumn=function(e){var t,o=this,l={};e.modules.frozen||(t=e.getElement(),l.mousemove=function(l){e.parent===o.moving.parent&&(l.pageX-Tabulator.prototype.helpers.elOffset(t).left+o.table.columnManager.element.scrollLeft>e.getWidth()/2?o.toCol===e&&o.toColAfter||(t.parentNode.insertBefore(o.placeholderElement,t.nextSibling),o.moveColumn(e,!0)):(o.toCol!==e||o.toColAfter)&&(t.parentNode.insertBefore(o.placeholderElement,t),o.moveColumn(e,!1)))}.bind(o),t.addEventListener("mousedown",function(t){1===t.which&&(o.checkTimeout=setTimeout(function(){o.startMove(t,e)},o.checkPeriod))}),t.addEventListener("mouseup",function(e){1===e.which&&o.checkTimeout&&clearTimeout(o.checkTimeout)})),e.modules.moveColumn=l},MoveColumns.prototype.startMove=function(e,t){var o=t.getElement();this.moving=t,this.startX=e.pageX-Tabulator.prototype.helpers.elOffset(o).left,this.table.element.classList.add("tabulator-block-select"),this.placeholderElement.style.width=t.getWidth()+"px",this.placeholderElement.style.height=t.getHeight()+"px",o.parentNode.insertBefore(this.placeholderElement,o),o.parentNode.removeChild(o),this.hoverElement=o.cloneNode(!0),this.hoverElement.classList.add("tabulator-moving"),this.table.columnManager.getElement().appendChild(this.hoverElement),this.hoverElement.style.left="0",this.hoverElement.style.bottom="0",this._bindMouseMove(),document.body.addEventListener("mousemove",this.moveHover),document.body.addEventListener("mouseup",this.endMove),this.moveHover(e)},MoveColumns.prototype._bindMouseMove=function(){this.table.columnManager.columnsByIndex.forEach(function(e){e.modules.moveColumn.mousemove&&e.getElement().addEventListener("mousemove",e.modules.moveColumn.mousemove)})},MoveColumns.prototype._unbindMouseMove=function(){this.table.columnManager.columnsByIndex.forEach(function(e){e.modules.moveColumn.mousemove&&e.getElement().removeEventListener("mousemove",e.modules.moveColumn.mousemove)})},MoveColumns.prototype.moveColumn=function(e,t){var o=this.moving.getCells();this.toCol=e,this.toColAfter=t,t?e.getCells().forEach(function(e,t){var l=e.getElement();l.parentNode.insertBefore(o[t].getElement(),l.nextSibling)}):e.getCells().forEach(function(e,t){var l=e.getElement();l.parentNode.insertBefore(o[t].getElement(),l)})},MoveColumns.prototype.endMove=function(e){1===e.which&&(this._unbindMouseMove(),this.placeholderElement.parentNode.insertBefore(this.moving.getElement(),this.placeholderElement.nextSibling),this.placeholderElement.parentNode.removeChild(this.placeholderElement),this.hoverElement.parentNode.removeChild(this.hoverElement),this.table.element.classList.remove("tabulator-block-select"),this.toCol&&this.table.columnManager.moveColumn(this.moving,this.toCol,this.toColAfter),this.moving=!1,this.toCol=!1,this.toColAfter=!1,document.body.removeEventListener("mousemove",this.moveHover),document.body.removeEventListener("mouseup",this.endMove))},MoveColumns.prototype.moveHover=function(e){var t,o=this,l=o.table.columnManager.getElement(),n=l.scrollLeft,i=e.pageX-Tabulator.prototype.helpers.elOffset(l).left+n;o.hoverElement.style.left=i-o.startX+"px",i-n row.getHeight() / 2) { - if (self.toRow !== row || !self.toRowAfter) { - var rowEl = row.getElement(); - rowEl.parentNode.insertBefore(self.placeholderElement, rowEl.nextSibling); - self.moveRow(row, true); - } - } else { - if (self.toRow !== row || self.toRowAfter) { - var rowEl = row.getElement(); - rowEl.parentNode.insertBefore(self.placeholderElement, rowEl); - self.moveRow(row, false); - } - } - }.bind(self); - - if (!this.hasHandle) { - - rowEl = row.getElement(); - - rowEl.addEventListener("mousedown", function (e) { - if (e.which === 1) { - self.checkTimeout = setTimeout(function () { - self.startMove(e, row); - }, self.checkPeriod); - } - }); - - rowEl.addEventListener("mouseup", function (e) { - if (e.which === 1) { - if (self.checkTimeout) { - clearTimeout(self.checkTimeout); - } - } - }); - } - - row.modules.moveRow = config; -}; - -MoveRows.prototype.initializeCell = function (cell) { - var self = this, - cellEl = cell.getElement(); - - cellEl.addEventListener("mousedown", function (e) { - if (e.which === 1) { - self.checkTimeout = setTimeout(function () { - self.startMove(e, cell.row); - }, self.checkPeriod); - } - }); - - cellEl.addEventListener("mouseup", function (e) { - if (e.which === 1) { - if (self.checkTimeout) { - clearTimeout(self.checkTimeout); - } - } - }); -}; - -MoveRows.prototype._bindMouseMove = function () { - var self = this; - - self.table.rowManager.getDisplayRows().forEach(function (row) { - if (row.type === "row" && row.modules.moveRow.mousemove) { - row.getElement().addEventListener("mousemove", row.modules.moveRow.mousemove); - } - }); -}; - -MoveRows.prototype._unbindMouseMove = function () { - var self = this; - - self.table.rowManager.getDisplayRows().forEach(function (row) { - if (row.type === "row" && row.modules.moveRow.mousemove) { - row.getElement().removeEventListener("mousemove", row.modules.moveRow.mousemove); - } - }); -}; - -MoveRows.prototype.startMove = function (e, row) { - var element = row.getElement(); - - this.setStartPosition(e, row); - - this.moving = row; - - this.table.element.classList.add("tabulator-block-select"); - - //create placeholder - this.placeholderElement.style.width = row.getWidth() + "px"; - this.placeholderElement.style.height = row.getHeight() + "px"; - - if (!this.connection) { - element.parentNode.insertBefore(this.placeholderElement, element); - element.parentNode.removeChild(element); - } else { - this.table.element.classList.add("tabulator-movingrow-sending"); - this.connectToTables(row); - } - - //create hover element - this.hoverElement = element.cloneNode(true); - this.hoverElement.classList.add("tabulator-moving"); - - if (this.connection) { - document.body.appendChild(this.hoverElement); - this.hoverElement.style.left = "0"; - this.hoverElement.style.top = "0"; - this.hoverElement.style.width = this.table.element.clientWidth + "px"; - this.hoverElement.style.whiteSpace = "nowrap"; - this.hoverElement.style.overflow = "hidden"; - this.hoverElement.style.pointerEvents = "none"; - } else { - this.table.rowManager.getTableElement().appendChild(this.hoverElement); - - this.hoverElement.style.left = "0"; - this.hoverElement.style.top = "0"; - - this._bindMouseMove(); - } - - document.body.addEventListener("mousemove", this.moveHover); - document.body.addEventListener("mouseup", this.endMove); - - this.moveHover(e); -}; - -MoveRows.prototype.setStartPosition = function (e, row) { - var element, position; - - element = row.getElement(); - if (this.connection) { - position = element.getBoundingClientRect(); - - this.startX = position.left - e.pageX + window.scrollX; - this.startY = position.top - e.pageY + window.scrollY; - } else { - this.startY = e.pageY - element.getBoundingClientRect().top; - } -}; - -MoveRows.prototype.endMove = function (e) { - if (!e || e.which === 1) { - this._unbindMouseMove(); - - if (!this.connection) { - this.placeholderElement.parentNode.insertBefore(this.moving.getElement(), this.placeholderElement.nextSibling); - this.placeholderElement.parentNode.removeChild(this.placeholderElement); - } - - this.hoverElement.parentNode.removeChild(this.hoverElement); - - this.table.element.classList.remove("tabulator-block-select"); - - if (this.toRow) { - this.table.rowManager.moveRow(this.moving, this.toRow, this.toRowAfter); - } - - this.moving = false; - this.toRow = false; - this.toRowAfter = false; - - document.body.removeEventListener("mousemove", this.moveHover); - document.body.removeEventListener("mouseup", this.endMove); - - if (this.connection) { - this.table.element.classList.remove("tabulator-movingrow-sending"); - this.disconnectFromTables(); - } - } -}; - -MoveRows.prototype.moveRow = function (row, after) { - this.toRow = row; - this.toRowAfter = after; -}; - -MoveRows.prototype.moveHover = function (e) { - if (this.connection) { - this.moveHoverConnections.call(this, e); - } else { - this.moveHoverTable.call(this, e); - } -}; - -MoveRows.prototype.moveHoverTable = function (e) { - var rowHolder = this.table.rowManager.getElement(), - scrollTop = rowHolder.scrollTop, - yPos = e.pageY - rowHolder.getBoundingClientRect().top + scrollTop, - scrollPos; - - this.hoverElement.style.top = yPos - this.startY + "px"; -}; - -MoveRows.prototype.moveHoverConnections = function (e) { - this.hoverElement.style.left = this.startX + e.pageX + "px"; - this.hoverElement.style.top = this.startY + e.pageY + "px"; -}; - -//establish connection with other tables -MoveRows.prototype.connectToTables = function (row) { - var self = this, - connections = this.table.modules.comms.getConnections(this.connection); - - this.table.options.movableRowsSendingStart.call(this.table, connections); - - this.table.modules.comms.send(this.connection, "moveRow", "connect", { - row: row - }); -}; - -//disconnect from other tables -MoveRows.prototype.disconnectFromTables = function () { - var self = this, - connections = this.table.modules.comms.getConnections(this.connection); - - this.table.options.movableRowsSendingStop.call(this.table, connections); - - this.table.modules.comms.send(this.connection, "moveRow", "disconnect"); -}; - -//accept incomming connection -MoveRows.prototype.connect = function (table, row) { - var self = this; - if (!this.connectedTable) { - this.connectedTable = table; - this.connectedRow = row; - - this.table.element.classList.add("tabulator-movingrow-receiving"); - - self.table.rowManager.getDisplayRows().forEach(function (row) { - if (row.type === "row" && row.modules.moveRow && row.modules.moveRow.mouseup) { - row.getElement().addEventListener("mouseup", row.modules.moveRow.mouseup); - } - }); - - self.tableRowDropEvent = self.tableRowDrop.bind(self); - - self.table.element.addEventListener("mouseup", self.tableRowDropEvent); - - this.table.options.movableRowsReceivingStart.call(this.table, row, table); - - return true; - } else { - console.warn("Move Row Error - Table cannot accept connection, already connected to table:", this.connectedTable); - return false; - } -}; - -//close incomming connection -MoveRows.prototype.disconnect = function (table) { - var self = this; - if (table === this.connectedTable) { - this.connectedTable = false; - this.connectedRow = false; - - this.table.element.classList.remove("tabulator-movingrow-receiving"); - - self.table.rowManager.getDisplayRows().forEach(function (row) { - if (row.type === "row" && row.modules.moveRow && row.modules.moveRow.mouseup) { - row.getElement().removeEventListener("mouseup", row.modules.moveRow.mouseup); - } - }); - - self.table.element.removeEventListener("mouseup", self.tableRowDropEvent); - - this.table.options.movableRowsReceivingStop.call(this.table, table); - } else { - console.warn("Move Row Error - trying to disconnect from non connected table"); - } -}; - -MoveRows.prototype.dropComplete = function (table, row, success) { - var sender = false; - - if (success) { - - switch (_typeof(this.table.options.movableRowsSender)) { - case "string": - sender = this.senders[this.table.options.movableRowsSender]; - break; - - case "function": - sender = this.table.options.movableRowsSender; - break; - } - - if (sender) { - sender.call(this, this.moving.getComponent(), row ? row.getComponent() : undefined, table); - } else { - if (this.table.options.movableRowsSender) { - console.warn("Mover Row Error - no matching sender found:", this.table.options.movableRowsSender); - } - } - - this.table.options.movableRowsSent.call(this.table, this.moving.getComponent(), row ? row.getComponent() : undefined, table); - } else { - this.table.options.movableRowsSentFailed.call(this.table, this.moving.getComponent(), row ? row.getComponent() : undefined, table); - } - - this.endMove(); -}; - -MoveRows.prototype.tableRowDrop = function (e, row) { - var receiver = false, - success = false; - - e.stopImmediatePropagation(); - - switch (_typeof(this.table.options.movableRowsReceiver)) { - case "string": - receiver = this.receivers[this.table.options.movableRowsReceiver]; - break; - - case "function": - receiver = this.table.options.movableRowsReceiver; - break; - } - - if (receiver) { - success = receiver.call(this, this.connectedRow.getComponent(), row ? row.getComponent() : undefined, this.connectedTable); - } else { - console.warn("Mover Row Error - no matching receiver found:", this.table.options.movableRowsReceiver); - } - - if (success) { - this.table.options.movableRowsReceived.call(this.table, this.connectedRow.getComponent(), row ? row.getComponent() : undefined, this.connectedTable); - } else { - this.table.options.movableRowsReceivedFailed.call(this.table, this.connectedRow.getComponent(), row ? row.getComponent() : undefined, this.connectedTable); - } - - this.table.modules.comms.send(this.connectedTable, "moveRow", "dropcomplete", { - row: row, - success: success - }); -}; - -MoveRows.prototype.receivers = { - insert: function insert(fromRow, toRow, fromTable) { - this.table.addRow(fromRow.getData(), undefined, toRow); - return true; - }, - - add: function add(fromRow, toRow, fromTable) { - this.table.addRow(fromRow.getData()); - return true; - }, - - update: function update(fromRow, toRow, fromTable) { - if (toRow) { - toRow.update(fromRow.getData()); - return true; - } - - return false; - }, - - replace: function replace(fromRow, toRow, fromTable) { - if (toRow) { - this.table.addRow(fromRow.getData(), undefined, toRow); - toRow.delete(); - return true; - } - - return false; - } -}; - -MoveRows.prototype.senders = { - delete: function _delete(fromRow, toRow, toTable) { - fromRow.delete(); - } -}; - -MoveRows.prototype.commsReceived = function (table, action, data) { - switch (action) { - case "connect": - return this.connect(table, data.row); - break; - - case "disconnect": - return this.disconnect(table); - break; - - case "dropcomplete": - return this.dropComplete(table, data.row, data.success); - break; - } -}; - -Tabulator.prototype.registerModule("moveRow", MoveRows); \ No newline at end of file diff --git a/Gems/AssetMemoryAnalyzer/External/tabulator-master/dist/js/modules/moveable_rows.min.js b/Gems/AssetMemoryAnalyzer/External/tabulator-master/dist/js/modules/moveable_rows.min.js deleted file mode 100644 index 7624efd615..0000000000 --- a/Gems/AssetMemoryAnalyzer/External/tabulator-master/dist/js/modules/moveable_rows.min.js +++ /dev/null @@ -1,2 +0,0 @@ -/* Tabulator v4.1.2 (c) Oliver Folkerd */ -var _typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},MoveRows=function(e){this.table=e,this.placeholderElement=this.createPlaceholderElement(),this.hoverElement=!1,this.checkTimeout=!1,this.checkPeriod=150,this.moving=!1,this.toRow=!1,this.toRowAfter=!1,this.hasHandle=!1,this.startY=0,this.startX=0,this.moveHover=this.moveHover.bind(this),this.endMove=this.endMove.bind(this),this.tableRowDropEvent=!1,this.connection=!1,this.connections=[],this.connectedTable=!1,this.connectedRow=!1};MoveRows.prototype.createPlaceholderElement=function(){var e=document.createElement("div");return e.classList.add("tabulator-row"),e.classList.add("tabulator-row-placeholder"),e},MoveRows.prototype.initialize=function(e){this.connection=this.table.options.movableRowsConnectedTables},MoveRows.prototype.setHandle=function(e){this.hasHandle=e},MoveRows.prototype.initializeRow=function(e){var t,o=this,n={};n.mouseup=function(t){o.tableRowDrop(t,e)}.bind(o),n.mousemove=function(t){if(t.pageY-Tabulator.prototype.helpers.elOffset(e.element).top+o.table.rowManager.element.scrollTop>e.getHeight()/2){if(o.toRow!==e||!o.toRowAfter){var n=e.getElement();n.parentNode.insertBefore(o.placeholderElement,n.nextSibling),o.moveRow(e,!0)}}else if(o.toRow!==e||o.toRowAfter){var n=e.getElement();n.parentNode.insertBefore(o.placeholderElement,n),o.moveRow(e,!1)}}.bind(o),this.hasHandle||(t=e.getElement(),t.addEventListener("mousedown",function(t){1===t.which&&(o.checkTimeout=setTimeout(function(){o.startMove(t,e)},o.checkPeriod))}),t.addEventListener("mouseup",function(e){1===e.which&&o.checkTimeout&&clearTimeout(o.checkTimeout)})),e.modules.moveRow=n},MoveRows.prototype.initializeCell=function(e){var t=this,o=e.getElement();o.addEventListener("mousedown",function(o){1===o.which&&(t.checkTimeout=setTimeout(function(){t.startMove(o,e.row)},t.checkPeriod))}),o.addEventListener("mouseup",function(e){1===e.which&&t.checkTimeout&&clearTimeout(t.checkTimeout)})},MoveRows.prototype._bindMouseMove=function(){this.table.rowManager.getDisplayRows().forEach(function(e){"row"===e.type&&e.modules.moveRow.mousemove&&e.getElement().addEventListener("mousemove",e.modules.moveRow.mousemove)})},MoveRows.prototype._unbindMouseMove=function(){this.table.rowManager.getDisplayRows().forEach(function(e){"row"===e.type&&e.modules.moveRow.mousemove&&e.getElement().removeEventListener("mousemove",e.modules.moveRow.mousemove)})},MoveRows.prototype.startMove=function(e,t){var o=t.getElement();this.setStartPosition(e,t),this.moving=t,this.table.element.classList.add("tabulator-block-select"),this.placeholderElement.style.width=t.getWidth()+"px",this.placeholderElement.style.height=t.getHeight()+"px",this.connection?(this.table.element.classList.add("tabulator-movingrow-sending"),this.connectToTables(t)):(o.parentNode.insertBefore(this.placeholderElement,o),o.parentNode.removeChild(o)),this.hoverElement=o.cloneNode(!0),this.hoverElement.classList.add("tabulator-moving"),this.connection?(document.body.appendChild(this.hoverElement),this.hoverElement.style.left="0",this.hoverElement.style.top="0",this.hoverElement.style.width=this.table.element.clientWidth+"px",this.hoverElement.style.whiteSpace="nowrap",this.hoverElement.style.overflow="hidden",this.hoverElement.style.pointerEvents="none"):(this.table.rowManager.getTableElement().appendChild(this.hoverElement),this.hoverElement.style.left="0",this.hoverElement.style.top="0",this._bindMouseMove()),document.body.addEventListener("mousemove",this.moveHover),document.body.addEventListener("mouseup",this.endMove),this.moveHover(e)},MoveRows.prototype.setStartPosition=function(e,t){var o,n;o=t.getElement(),this.connection?(n=o.getBoundingClientRect(),this.startX=n.left-e.pageX+window.scrollX,this.startY=n.top-e.pageY+window.scrollY):this.startY=e.pageY-o.getBoundingClientRect().top},MoveRows.prototype.endMove=function(e){e&&1!==e.which||(this._unbindMouseMove(),this.connection||(this.placeholderElement.parentNode.insertBefore(this.moving.getElement(),this.placeholderElement.nextSibling),this.placeholderElement.parentNode.removeChild(this.placeholderElement)),this.hoverElement.parentNode.removeChild(this.hoverElement),this.table.element.classList.remove("tabulator-block-select"),this.toRow&&this.table.rowManager.moveRow(this.moving,this.toRow,this.toRowAfter),this.moving=!1,this.toRow=!1,this.toRowAfter=!1,document.body.removeEventListener("mousemove",this.moveHover),document.body.removeEventListener("mouseup",this.endMove),this.connection&&(this.table.element.classList.remove("tabulator-movingrow-sending"),this.disconnectFromTables()))},MoveRows.prototype.moveRow=function(e,t){this.toRow=e,this.toRowAfter=t},MoveRows.prototype.moveHover=function(e){this.connection?this.moveHoverConnections.call(this,e):this.moveHoverTable.call(this,e)},MoveRows.prototype.moveHoverTable=function(e){var t=this.table.rowManager.getElement(),o=t.scrollTop,n=e.pageY-t.getBoundingClientRect().top+o;this.hoverElement.style.top=n-this.startY+"px"},MoveRows.prototype.moveHoverConnections=function(e){this.hoverElement.style.left=this.startX+e.pageX+"px",this.hoverElement.style.top=this.startY+e.pageY+"px"},MoveRows.prototype.connectToTables=function(e){var t=this.table.modules.comms.getConnections(this.connection);this.table.options.movableRowsSendingStart.call(this.table,t),this.table.modules.comms.send(this.connection,"moveRow","connect",{row:e})},MoveRows.prototype.disconnectFromTables=function(){var e=this.table.modules.comms.getConnections(this.connection);this.table.options.movableRowsSendingStop.call(this.table,e),this.table.modules.comms.send(this.connection,"moveRow","disconnect")},MoveRows.prototype.connect=function(e,t){var o=this;return this.connectedTable?(console.warn("Move Row Error - Table cannot accept connection, already connected to table:",this.connectedTable),!1):(this.connectedTable=e,this.connectedRow=t,this.table.element.classList.add("tabulator-movingrow-receiving"),o.table.rowManager.getDisplayRows().forEach(function(e){"row"===e.type&&e.modules.moveRow&&e.modules.moveRow.mouseup&&e.getElement().addEventListener("mouseup",e.modules.moveRow.mouseup)}),o.tableRowDropEvent=o.tableRowDrop.bind(o),o.table.element.addEventListener("mouseup",o.tableRowDropEvent),this.table.options.movableRowsReceivingStart.call(this.table,t,e),!0)},MoveRows.prototype.disconnect=function(e){var t=this;e===this.connectedTable?(this.connectedTable=!1,this.connectedRow=!1,this.table.element.classList.remove("tabulator-movingrow-receiving"),t.table.rowManager.getDisplayRows().forEach(function(e){"row"===e.type&&e.modules.moveRow&&e.modules.moveRow.mouseup&&e.getElement().removeEventListener("mouseup",e.modules.moveRow.mouseup)}),t.table.element.removeEventListener("mouseup",t.tableRowDropEvent),this.table.options.movableRowsReceivingStop.call(this.table,e)):console.warn("Move Row Error - trying to disconnect from non connected table")},MoveRows.prototype.dropComplete=function(e,t,o){var n=!1;if(o){switch(_typeof(this.table.options.movableRowsSender)){case"string":n=this.senders[this.table.options.movableRowsSender];break;case"function":n=this.table.options.movableRowsSender}n?n.call(this,this.moving.getComponent(),t?t.getComponent():void 0,e):this.table.options.movableRowsSender&&console.warn("Mover Row Error - no matching sender found:",this.table.options.movableRowsSender),this.table.options.movableRowsSent.call(this.table,this.moving.getComponent(),t?t.getComponent():void 0,e)}else this.table.options.movableRowsSentFailed.call(this.table,this.moving.getComponent(),t?t.getComponent():void 0,e);this.endMove()},MoveRows.prototype.tableRowDrop=function(e,t){var o=!1,n=!1;switch(e.stopImmediatePropagation(),_typeof(this.table.options.movableRowsReceiver)){case"string":o=this.receivers[this.table.options.movableRowsReceiver];break;case"function":o=this.table.options.movableRowsReceiver}o?n=o.call(this,this.connectedRow.getComponent(),t?t.getComponent():void 0,this.connectedTable):console.warn("Mover Row Error - no matching receiver found:",this.table.options.movableRowsReceiver),n?this.table.options.movableRowsReceived.call(this.table,this.connectedRow.getComponent(),t?t.getComponent():void 0,this.connectedTable):this.table.options.movableRowsReceivedFailed.call(this.table,this.connectedRow.getComponent(),t?t.getComponent():void 0,this.connectedTable),this.table.modules.comms.send(this.connectedTable,"moveRow","dropcomplete",{row:t,success:n})},MoveRows.prototype.receivers={insert:function(e,t,o){return this.table.addRow(e.getData(),void 0,t),!0},add:function(e,t,o){return this.table.addRow(e.getData()),!0},update:function(e,t,o){return!!t&&(t.update(e.getData()),!0)},replace:function(e,t,o){return!!t&&(this.table.addRow(e.getData(),void 0,t),t.delete(),!0)}},MoveRows.prototype.senders={delete:function(e,t,o){e.delete()}},MoveRows.prototype.commsReceived=function(e,t,o){switch(t){case"connect":return this.connect(e,o.row);case"disconnect":return this.disconnect(e);case"dropcomplete":return this.dropComplete(e,o.row,o.success)}},Tabulator.prototype.registerModule("moveRow",MoveRows); \ No newline at end of file diff --git a/Gems/AssetMemoryAnalyzer/External/tabulator-master/dist/js/modules/mutator.js b/Gems/AssetMemoryAnalyzer/External/tabulator-master/dist/js/modules/mutator.js deleted file mode 100644 index a4f0ae180d..0000000000 --- a/Gems/AssetMemoryAnalyzer/External/tabulator-master/dist/js/modules/mutator.js +++ /dev/null @@ -1,113 +0,0 @@ -var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol" ? function (obj) { return typeof obj; } : function (obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; - -/* Tabulator v4.1.2 (c) Oliver Folkerd */ - -var Mutator = function Mutator(table) { - this.table = table; //hold Tabulator object - this.allowedTypes = ["", "data", "edit", "clipboard"]; //list of muatation types - this.enabled = true; -}; - -//initialize column mutator -Mutator.prototype.initializeColumn = function (column) { - var self = this, - match = false, - config = {}; - - this.allowedTypes.forEach(function (type) { - var key = "mutator" + (type.charAt(0).toUpperCase() + type.slice(1)), - mutator; - - if (column.definition[key]) { - mutator = self.lookupMutator(column.definition[key]); - - if (mutator) { - match = true; - - config[key] = { - mutator: mutator, - params: column.definition[key + "Params"] || {} - }; - } - } - }); - - if (match) { - column.modules.mutate = config; - } -}; - -Mutator.prototype.lookupMutator = function (value) { - var mutator = false; - - //set column mutator - switch (typeof value === "undefined" ? "undefined" : _typeof(value)) { - case "string": - if (this.mutators[value]) { - mutator = this.mutators[value]; - } else { - console.warn("Mutator Error - No such mutator found, ignoring: ", value); - } - break; - - case "function": - mutator = value; - break; - } - - return mutator; -}; - -//apply mutator to row -Mutator.prototype.transformRow = function (data, type, update) { - var self = this, - key = "mutator" + (type.charAt(0).toUpperCase() + type.slice(1)), - value; - - if (this.enabled) { - - self.table.columnManager.traverse(function (column) { - var mutator, params, component; - - if (column.modules.mutate) { - mutator = column.modules.mutate[key] || column.modules.mutate.mutator || false; - - if (mutator) { - value = column.getFieldValue(data); - - if (!update || update && typeof value !== "undefined") { - component = column.getComponent(); - params = typeof mutator.params === "function" ? mutator.params(value, data, type, component) : mutator.params; - column.setFieldValue(data, mutator.mutator(value, data, type, params, component)); - } - } - } - }); - } - - return data; -}; - -//apply mutator to new cell value -Mutator.prototype.transformCell = function (cell, value) { - var mutator = cell.column.modules.mutate.mutatorEdit || cell.column.modules.mutate.mutator || false; - - if (mutator) { - return mutator.mutator(value, cell.row.getData(), "edit", mutator.params, cell.getComponent()); - } else { - return value; - } -}; - -Mutator.prototype.enable = function () { - this.enabled = true; -}; - -Mutator.prototype.disable = function () { - this.enabled = false; -}; - -//default mutators -Mutator.prototype.mutators = {}; - -Tabulator.prototype.registerModule("mutator", Mutator); \ No newline at end of file diff --git a/Gems/AssetMemoryAnalyzer/External/tabulator-master/dist/js/modules/mutator.min.js b/Gems/AssetMemoryAnalyzer/External/tabulator-master/dist/js/modules/mutator.min.js deleted file mode 100644 index 9413c0fdf3..0000000000 --- a/Gems/AssetMemoryAnalyzer/External/tabulator-master/dist/js/modules/mutator.min.js +++ /dev/null @@ -1,2 +0,0 @@ -/* Tabulator v4.1.2 (c) Oliver Folkerd */ -var _typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Mutator=function(t){this.table=t,this.allowedTypes=["","data","edit","clipboard"],this.enabled=!0};Mutator.prototype.initializeColumn=function(t){var o=this,e=!1,a={};this.allowedTypes.forEach(function(r){var u,n="mutator"+(r.charAt(0).toUpperCase()+r.slice(1));t.definition[n]&&(u=o.lookupMutator(t.definition[n]))&&(e=!0,a[n]={mutator:u,params:t.definition[n+"Params"]||{}})}),e&&(t.modules.mutate=a)},Mutator.prototype.lookupMutator=function(t){var o=!1;switch(void 0===t?"undefined":_typeof(t)){case"string":this.mutators[t]?o=this.mutators[t]:console.warn("Mutator Error - No such mutator found, ignoring: ",t);break;case"function":o=t}return o},Mutator.prototype.transformRow=function(t,o,e){var a,r=this,u="mutator"+(o.charAt(0).toUpperCase()+o.slice(1));return this.enabled&&r.table.columnManager.traverse(function(r){var n,i,s;r.modules.mutate&&(n=r.modules.mutate[u]||r.modules.mutate.mutator||!1)&&(a=r.getFieldValue(t),(!e||e&&void 0!==a)&&(s=r.getComponent(),i="function"==typeof n.params?n.params(a,t,o,s):n.params,r.setFieldValue(t,n.mutator(a,t,o,i,s))))}),t},Mutator.prototype.transformCell=function(t,o){var e=t.column.modules.mutate.mutatorEdit||t.column.modules.mutate.mutator||!1;return e?e.mutator(o,t.row.getData(),"edit",e.params,t.getComponent()):o},Mutator.prototype.enable=function(){this.enabled=!0},Mutator.prototype.disable=function(){this.enabled=!1},Mutator.prototype.mutators={},Tabulator.prototype.registerModule("mutator",Mutator); \ No newline at end of file diff --git a/Gems/AssetMemoryAnalyzer/External/tabulator-master/dist/js/modules/page.js b/Gems/AssetMemoryAnalyzer/External/tabulator-master/dist/js/modules/page.js deleted file mode 100644 index ef6ea6e51e..0000000000 --- a/Gems/AssetMemoryAnalyzer/External/tabulator-master/dist/js/modules/page.js +++ /dev/null @@ -1,527 +0,0 @@ -/* Tabulator v4.1.2 (c) Oliver Folkerd */ - -var Page = function Page(table) { - - this.table = table; //hold Tabulator object - - this.mode = "local"; - this.progressiveLoad = false; - - this.size = 0; - this.page = 1; - this.count = 5; - this.max = 1; - - this.displayIndex = 0; //index in display pipeline - - this.createElements(); -}; - -Page.prototype.createElements = function () { - - var button; - - this.element = document.createElement("span"); - this.element.classList.add("tabulator-paginator"); - - this.pagesElement = document.createElement("span"); - this.pagesElement.classList.add("tabulator-pages"); - - button = document.createElement("button"); - button.classList.add("tabulator-page"); - button.setAttribute("type", "button"); - button.setAttribute("role", "button"); - button.setAttribute("aria-label", ""); - button.setAttribute("title", ""); - - this.firstBut = button.cloneNode(true); - this.firstBut.setAttribute("data-page", "first"); - - this.prevBut = button.cloneNode(true); - this.prevBut.setAttribute("data-page", "prev"); - - this.nextBut = button.cloneNode(true); - this.nextBut.setAttribute("data-page", "next"); - - this.lastBut = button.cloneNode(true); - this.lastBut.setAttribute("data-page", "last"); -}; - -//setup pageination -Page.prototype.initialize = function (hidden) { - var self = this; - - //update param names - for (var key in self.table.options.paginationDataSent) { - self.paginationDataSentNames[key] = self.table.options.paginationDataSent[key]; - } - - for (var _key in self.table.options.paginationDataReceived) { - self.paginationDataReceivedNames[_key] = self.table.options.paginationDataReceived[_key]; - } - - //build pagination element - - //bind localizations - self.table.modules.localize.bind("pagination|first", function (value) { - self.firstBut.innerHTML = value; - }); - - self.table.modules.localize.bind("pagination|first_title", function (value) { - self.firstBut.setAttribute("aria-label", value); - self.firstBut.setAttribute("title", value); - }); - - self.table.modules.localize.bind("pagination|prev", function (value) { - self.prevBut.innerHTML = value; - }); - - self.table.modules.localize.bind("pagination|prev_title", function (value) { - self.prevBut.setAttribute("aria-label", value); - self.prevBut.setAttribute("title", value); - }); - - self.table.modules.localize.bind("pagination|next", function (value) { - self.nextBut.innerHTML = value; - }); - - self.table.modules.localize.bind("pagination|next_title", function (value) { - self.nextBut.setAttribute("aria-label", value); - self.nextBut.setAttribute("title", value); - }); - - self.table.modules.localize.bind("pagination|last", function (value) { - self.lastBut.innerHTML = value; - }); - - self.table.modules.localize.bind("pagination|last_title", function (value) { - self.lastBut.setAttribute("aria-label", value); - self.lastBut.setAttribute("title", value); - }); - - //click bindings - self.firstBut.addEventListener("click", function () { - self.setPage(1); - }); - - self.prevBut.addEventListener("click", function () { - self.previousPage(); - }); - - self.nextBut.addEventListener("click", function () { - self.nextPage().then(function () {}).catch(function () {}); - }); - - self.lastBut.addEventListener("click", function () { - self.setPage(self.max); - }); - - if (self.table.options.paginationElement) { - self.element = self.table.options.paginationElement; - } - - //append to DOM - self.element.appendChild(self.firstBut); - self.element.appendChild(self.prevBut); - self.element.appendChild(self.pagesElement); - self.element.appendChild(self.nextBut); - self.element.appendChild(self.lastBut); - - if (!self.table.options.paginationElement && !hidden) { - self.table.footerManager.append(self.element, self); - } - - //set default values - self.mode = self.table.options.pagination; - self.size = self.table.options.paginationSize || Math.floor(self.table.rowManager.getElement().clientHeight / 24); - self.count = self.table.options.paginationButtonCount; -}; - -Page.prototype.initializeProgressive = function (mode) { - this.initialize(true); - this.mode = "progressive_" + mode; - this.progressiveLoad = true; -}; - -Page.prototype.setDisplayIndex = function (index) { - this.displayIndex = index; -}; - -Page.prototype.getDisplayIndex = function () { - return this.displayIndex; -}; - -//calculate maximum page from number of rows -Page.prototype.setMaxRows = function (rowCount) { - if (!rowCount) { - this.max = 1; - } else { - this.max = Math.ceil(rowCount / this.size); - } - - if (this.page > this.max) { - this.page = this.max; - } -}; - -//reset to first page without triggering action -Page.prototype.reset = function (force) { - if (this.mode == "local" || force) { - this.page = 1; - } - return true; -}; - -//set the maxmum page -Page.prototype.setMaxPage = function (max) { - this.max = max || 1; - - if (this.page > this.max) { - this.page = this.max; - this.trigger(); - } -}; - -//set current page number -Page.prototype.setPage = function (page) { - var _this = this; - - return new Promise(function (resolve, reject) { - if (page > 0 && page <= _this.max) { - _this.page = page; - _this.trigger().then(function () { - resolve(); - }).catch(function () { - reject(); - }); - } else { - console.warn("Pagination Error - Requested page is out of range of 1 - " + _this.max + ":", page); - reject(); - } - }); -}; - -Page.prototype.setPageSize = function (size) { - if (size > 0) { - this.size = size; - } -}; - -//setup the pagination buttons -Page.prototype._setPageButtons = function () { - var self = this; - - var leftSize = Math.floor((this.count - 1) / 2); - var rightSize = Math.ceil((this.count - 1) / 2); - var min = this.max - this.page + leftSize + 1 < this.count ? this.max - this.count + 1 : Math.max(this.page - leftSize, 1); - var max = this.page <= rightSize ? Math.min(this.count, this.max) : Math.min(this.page + rightSize, this.max); - - while (self.pagesElement.firstChild) { - self.pagesElement.removeChild(self.pagesElement.firstChild); - }if (self.page == 1) { - self.firstBut.disabled = true; - self.prevBut.disabled = true; - } else { - self.firstBut.disabled = false; - self.prevBut.disabled = false; - } - - if (self.page == self.max) { - self.lastBut.disabled = true; - self.nextBut.disabled = true; - } else { - self.lastBut.disabled = false; - self.nextBut.disabled = false; - } - - for (var i = min; i <= max; i++) { - if (i > 0 && i <= self.max) { - self.pagesElement.appendChild(self._generatePageButton(i)); - } - } - - this.footerRedraw(); -}; - -Page.prototype._generatePageButton = function (page) { - var self = this, - button = document.createElement("button"); - - button.classList.add("tabulator-page"); - if (page == self.page) { - button.classList.add("active"); - } - - button.setAttribute("type", "button"); - button.setAttribute("role", "button"); - button.setAttribute("aria-label", "Show Page " + page); - button.setAttribute("title", "Show Page " + page); - button.setAttribute("data-page", page); - button.textContent = page; - - button.addEventListener("click", function (e) { - self.setPage(page); - }); - - return button; -}; - -//previous page -Page.prototype.previousPage = function () { - var _this2 = this; - - return new Promise(function (resolve, reject) { - if (_this2.page > 1) { - _this2.page--; - _this2.trigger().then(function () { - resolve(); - }).catch(function () { - reject(); - }); - } else { - console.warn("Pagination Error - Previous page would be less than page 1:", 0); - reject(); - } - }); -}; - -//next page -Page.prototype.nextPage = function () { - var _this3 = this; - - return new Promise(function (resolve, reject) { - if (_this3.page < _this3.max) { - _this3.page++; - _this3.trigger().then(function () { - resolve(); - }).catch(function () { - reject(); - }); - } else { - if (!_this3.progressiveLoad) { - console.warn("Pagination Error - Next page would be greater than maximum page of " + _this3.max + ":", _this3.max + 1); - } - reject(); - } - }); -}; - -//return current page number -Page.prototype.getPage = function () { - return this.page; -}; - -//return max page number -Page.prototype.getPageMax = function () { - return this.max; -}; - -Page.prototype.getPageSize = function (size) { - return this.size; -}; - -Page.prototype.getMode = function () { - return this.mode; -}; - -//return appropriate rows for current page -Page.prototype.getRows = function (data) { - var output, start, end; - - if (this.mode == "local") { - output = []; - start = this.size * (this.page - 1); - end = start + parseInt(this.size); - - this._setPageButtons(); - - for (var i = start; i < end; i++) { - if (data[i]) { - output.push(data[i]); - } - } - - return output; - } else { - - this._setPageButtons(); - - return data.slice(0); - } -}; - -Page.prototype.trigger = function () { - var _this4 = this; - - var left; - - return new Promise(function (resolve, reject) { - - switch (_this4.mode) { - case "local": - left = _this4.table.rowManager.scrollLeft; - - _this4.table.rowManager.refreshActiveData("page"); - _this4.table.rowManager.scrollHorizontal(left); - - _this4.table.options.pageLoaded.call(_this4.table, _this4.getPage()); - resolve(); - break; - - case "remote": - case "progressive_load": - case "progressive_scroll": - _this4.table.modules.ajax.blockActiveRequest(); - _this4._getRemotePage().then(function () { - resolve(); - }).catch(function () { - reject(); - }); - break; - - default: - console.warn("Pagination Error - no such pagination mode:", _this4.mode); - reject(); - } - }); -}; - -Page.prototype._getRemotePage = function () { - var _this5 = this; - - var self = this, - oldParams, - pageParams; - - return new Promise(function (resolve, reject) { - - if (!self.table.modExists("ajax", true)) { - reject(); - } - - //record old params and restore after request has been made - oldParams = Tabulator.prototype.helpers.deepClone(self.table.modules.ajax.getParams() || {}); - pageParams = self.table.modules.ajax.getParams(); - - //configure request params - pageParams[_this5.paginationDataSentNames.page] = self.page; - - //set page size if defined - if (_this5.size) { - pageParams[_this5.paginationDataSentNames.size] = _this5.size; - } - - //set sort data if defined - if (_this5.table.options.ajaxSorting && _this5.table.modExists("sort")) { - var sorters = self.table.modules.sort.getSort(); - - sorters.forEach(function (item) { - delete item.column; - }); - - pageParams[_this5.paginationDataSentNames.sorters] = sorters; - } - - //set filter data if defined - if (_this5.table.options.ajaxFiltering && _this5.table.modExists("filter")) { - var filters = self.table.modules.filter.getFilters(true, true); - pageParams[_this5.paginationDataSentNames.filters] = filters; - } - - self.table.modules.ajax.setParams(pageParams); - - self.table.modules.ajax.sendRequest(_this5.progressiveLoad).then(function (data) { - self._parseRemoteData(data); - resolve(); - }).catch(function (e) { - reject(); - }); - - self.table.modules.ajax.setParams(oldParams); - }); -}; - -Page.prototype._parseRemoteData = function (data) { - var self = this, - left, - data, - margin; - - if (typeof data[this.paginationDataReceivedNames.last_page] === "undefined") { - console.warn("Remote Pagination Error - Server response missing '" + this.paginationDataReceivedNames.last_page + "' property"); - } - - if (data[this.paginationDataReceivedNames.data]) { - this.max = parseInt(data[this.paginationDataReceivedNames.last_page]) || 1; - - if (this.progressiveLoad) { - switch (this.mode) { - case "progressive_load": - this.table.rowManager.addRows(data[this.paginationDataReceivedNames.data]); - if (this.page < this.max) { - setTimeout(function () { - self.nextPage().then(function () {}).catch(function () {}); - }, self.table.options.ajaxProgressiveLoadDelay); - } - break; - - case "progressive_scroll": - data = this.table.rowManager.getData().concat(data[this.paginationDataReceivedNames.data]); - - this.table.rowManager.setData(data, true); - - margin = this.table.options.ajaxProgressiveLoadScrollMargin || this.table.rowManager.element.clientHeight * 2; - - if (self.table.rowManager.element.scrollHeight <= self.table.rowManager.element.clientHeight + margin) { - self.nextPage().then(function () {}).catch(function () {}); - } - break; - } - } else { - left = this.table.rowManager.scrollLeft; - - this.table.rowManager.setData(data[this.paginationDataReceivedNames.data]); - - this.table.rowManager.scrollHorizontal(left); - - this.table.columnManager.scrollHorizontal(left); - - this.table.options.pageLoaded.call(this.table, this.getPage()); - } - } else { - console.warn("Remote Pagination Error - Server response missing '" + this.paginationDataReceivedNames.data + "' property"); - } -}; - -//handle the footer element being redrawn -Page.prototype.footerRedraw = function () { - var footer = this.table.footerManager.element; - - if (Math.ceil(footer.clientWidth) - footer.scrollWidth < 0) { - this.pagesElement.style.display = 'none'; - } else { - this.pagesElement.style.display = ''; - - if (Math.ceil(footer.clientWidth) - footer.scrollWidth < 0) { - this.pagesElement.style.display = 'none'; - } - } -}; - -//set the paramter names for pagination requests -Page.prototype.paginationDataSentNames = { - "page": "page", - "size": "size", - "sorters": "sorters", - // "sort_dir":"sort_dir", - "filters": "filters" -}; - -//set the property names for pagination responses -Page.prototype.paginationDataReceivedNames = { - "current_page": "current_page", - "last_page": "last_page", - "data": "data" -}; - -Tabulator.prototype.registerModule("page", Page); \ No newline at end of file diff --git a/Gems/AssetMemoryAnalyzer/External/tabulator-master/dist/js/modules/page.min.js b/Gems/AssetMemoryAnalyzer/External/tabulator-master/dist/js/modules/page.min.js deleted file mode 100644 index 57d8cbe76a..0000000000 --- a/Gems/AssetMemoryAnalyzer/External/tabulator-master/dist/js/modules/page.min.js +++ /dev/null @@ -1,2 +0,0 @@ -/* Tabulator v4.1.2 (c) Oliver Folkerd */ -var Page=function(t){this.table=t,this.mode="local",this.progressiveLoad=!1,this.size=0,this.page=1,this.count=5,this.max=1,this.displayIndex=0,this.createElements()};Page.prototype.createElements=function(){var t;this.element=document.createElement("span"),this.element.classList.add("tabulator-paginator"),this.pagesElement=document.createElement("span"),this.pagesElement.classList.add("tabulator-pages"),t=document.createElement("button"),t.classList.add("tabulator-page"),t.setAttribute("type","button"),t.setAttribute("role","button"),t.setAttribute("aria-label",""),t.setAttribute("title",""),this.firstBut=t.cloneNode(!0),this.firstBut.setAttribute("data-page","first"),this.prevBut=t.cloneNode(!0),this.prevBut.setAttribute("data-page","prev"),this.nextBut=t.cloneNode(!0),this.nextBut.setAttribute("data-page","next"),this.lastBut=t.cloneNode(!0),this.lastBut.setAttribute("data-page","last")},Page.prototype.initialize=function(t){var e=this;for(var a in e.table.options.paginationDataSent)e.paginationDataSentNames[a]=e.table.options.paginationDataSent[a];for(var i in e.table.options.paginationDataReceived)e.paginationDataReceivedNames[i]=e.table.options.paginationDataReceived[i];e.table.modules.localize.bind("pagination|first",function(t){e.firstBut.innerHTML=t}),e.table.modules.localize.bind("pagination|first_title",function(t){e.firstBut.setAttribute("aria-label",t),e.firstBut.setAttribute("title",t)}),e.table.modules.localize.bind("pagination|prev",function(t){e.prevBut.innerHTML=t}),e.table.modules.localize.bind("pagination|prev_title",function(t){e.prevBut.setAttribute("aria-label",t),e.prevBut.setAttribute("title",t)}),e.table.modules.localize.bind("pagination|next",function(t){e.nextBut.innerHTML=t}),e.table.modules.localize.bind("pagination|next_title",function(t){e.nextBut.setAttribute("aria-label",t),e.nextBut.setAttribute("title",t)}),e.table.modules.localize.bind("pagination|last",function(t){e.lastBut.innerHTML=t}),e.table.modules.localize.bind("pagination|last_title",function(t){e.lastBut.setAttribute("aria-label",t),e.lastBut.setAttribute("title",t)}),e.firstBut.addEventListener("click",function(){e.setPage(1)}),e.prevBut.addEventListener("click",function(){e.previousPage()}),e.nextBut.addEventListener("click",function(){e.nextPage().then(function(){}).catch(function(){})}),e.lastBut.addEventListener("click",function(){e.setPage(e.max)}),e.table.options.paginationElement&&(e.element=e.table.options.paginationElement),e.element.appendChild(e.firstBut),e.element.appendChild(e.prevBut),e.element.appendChild(e.pagesElement),e.element.appendChild(e.nextBut),e.element.appendChild(e.lastBut),e.table.options.paginationElement||t||e.table.footerManager.append(e.element,e),e.mode=e.table.options.pagination,e.size=e.table.options.paginationSize||Math.floor(e.table.rowManager.getElement().clientHeight/24),e.count=e.table.options.paginationButtonCount},Page.prototype.initializeProgressive=function(t){this.initialize(!0),this.mode="progressive_"+t,this.progressiveLoad=!0},Page.prototype.setDisplayIndex=function(t){this.displayIndex=t},Page.prototype.getDisplayIndex=function(){return this.displayIndex},Page.prototype.setMaxRows=function(t){this.max=t?Math.ceil(t/this.size):1,this.page>this.max&&(this.page=this.max)},Page.prototype.reset=function(t){return("local"==this.mode||t)&&(this.page=1),!0},Page.prototype.setMaxPage=function(t){this.max=t||1,this.page>this.max&&(this.page=this.max,this.trigger())},Page.prototype.setPage=function(t){var e=this;return new Promise(function(a,i){t>0&&t<=e.max?(e.page=t,e.trigger().then(function(){a()}).catch(function(){i()})):(console.warn("Pagination Error - Requested page is out of range of 1 - "+e.max+":",t),i())})},Page.prototype.setPageSize=function(t){t>0&&(this.size=t)},Page.prototype._setPageButtons=function(){for(var t=this,e=Math.floor((this.count-1)/2),a=Math.ceil((this.count-1)/2),i=this.max-this.page+e+10&&o<=t.max&&t.pagesElement.appendChild(t._generatePageButton(o));this.footerRedraw()},Page.prototype._generatePageButton=function(t){var e=this,a=document.createElement("button");return a.classList.add("tabulator-page"),t==e.page&&a.classList.add("active"),a.setAttribute("type","button"),a.setAttribute("role","button"),a.setAttribute("aria-label","Show Page "+t),a.setAttribute("title","Show Page "+t),a.setAttribute("data-page",t),a.textContent=t,a.addEventListener("click",function(a){e.setPage(t)}),a},Page.prototype.previousPage=function(){var t=this;return new Promise(function(e,a){t.page>1?(t.page--,t.trigger().then(function(){e()}).catch(function(){a()})):(console.warn("Pagination Error - Previous page would be less than page 1:",0),a())})},Page.prototype.nextPage=function(){var t=this;return new Promise(function(e,a){t.page -1) { - cookie = cookie.substr(0, end); - } - - data = cookie.replace(id + "=", ""); - } - break; - - default: - console.warn("Persistance Load Error - invalid mode selected", this.mode); - } - - return data ? JSON.parse(data) : false; -}; - -//merge old and new column defintions -Persistence.prototype.mergeDefinition = function (oldCols, newCols) { - var self = this, - output = []; - - // oldCols = oldCols || []; - newCols = newCols || []; - - newCols.forEach(function (column, to) { - - var from = self._findColumn(oldCols, column); - - if (from) { - - from.width = column.width; - from.visible = column.visible; - - if (from.columns) { - from.columns = self.mergeDefinition(from.columns, column.columns); - } - - output.push(from); - } - }); - oldCols.forEach(function (column, i) { - var from = self._findColumn(newCols, column); - if (!from) { - if (output.length > i) { - output.splice(i, 0, column); - } else { - output.push(column); - } - } - }); - - return output; -}; - -//find matching columns -Persistence.prototype._findColumn = function (columns, subject) { - var type = subject.columns ? "group" : subject.field ? "field" : "object"; - - return columns.find(function (col) { - switch (type) { - case "group": - return col.title === subject.title && col.columns.length === subject.columns.length; - break; - - case "field": - return col.field === subject.field; - break; - - case "object": - return col === subject; - break; - } - }); -}; - -//save data -Persistence.prototype.save = function (type) { - var data = {}; - - switch (type) { - case "columns": - data = this.parseColumns(this.table.columnManager.getColumns()); - break; - - case "filter": - data = this.table.modules.filter.getFilters(); - break; - - case "sort": - data = this.validateSorters(this.table.modules.sort.getSort()); - break; - } - - var id = this.id + (type === "columns" ? "" : "-" + type); - - this.saveData(id, data); -}; - -//ensure sorters contain no function data -Persistence.prototype.validateSorters = function (data) { - data.forEach(function (item) { - item.column = item.field; - delete item.field; - }); - - return data; -}; - -//save data to chosed medium -Persistence.prototype.saveData = function (id, data) { - - data = JSON.stringify(data); - - switch (this.mode) { - case "local": - localStorage.setItem(id, data); - break; - - case "cookie": - var expireDate = new Date(); - expireDate.setDate(expireDate.getDate() + 10000); - - //save cookie - document.cookie = id + "=" + data + "; expires=" + expireDate.toUTCString(); - break; - - default: - console.warn("Persistance Save Error - invalid mode selected", this.mode); - } -}; - -//build premission list -Persistence.prototype.parseColumns = function (columns) { - var self = this, - definitions = []; - - columns.forEach(function (column) { - var def = {}; - - if (column.isGroup) { - def.title = column.getDefinition().title; - def.columns = self.parseColumns(column.getColumns()); - } else { - def.title = column.getDefinition().title; - def.field = column.getField(); - def.width = column.getWidth(); - def.visible = column.visible; - } - - definitions.push(def); - }); - - return definitions; -}; - -Tabulator.prototype.registerModule("persistence", Persistence); \ No newline at end of file diff --git a/Gems/AssetMemoryAnalyzer/External/tabulator-master/dist/js/modules/persistence.min.js b/Gems/AssetMemoryAnalyzer/External/tabulator-master/dist/js/modules/persistence.min.js deleted file mode 100644 index 85aa1be83b..0000000000 --- a/Gems/AssetMemoryAnalyzer/External/tabulator-master/dist/js/modules/persistence.min.js +++ /dev/null @@ -1,2 +0,0 @@ -/* Tabulator v4.1.2 (c) Oliver Folkerd */ -var Persistence=function(e){this.table=e,this.mode="",this.id="",this.persistProps=["field","width","visible"]};Persistence.prototype.initialize=function(e,t){this.mode=!0!==e?e:void 0!==window.localStorage?"local":"cookie",this.id="tabulator-"+(t||this.table.element.getAttribute("id")||"")},Persistence.prototype.load=function(e,t){var i=this.retreiveData(e);return t&&(i=i?this.mergeDefinition(t,i):t),i},Persistence.prototype.retreiveData=function(e){var t="",i=this.id+("columns"===e?"":"-"+e);switch(this.mode){case"local":t=localStorage.getItem(i);break;case"cookie":var o=document.cookie,s=o.indexOf(i+"="),r=void 0;s>-1&&(o=o.substr(s),r=o.indexOf(";"),r>-1&&(o=o.substr(0,r)),t=o.replace(i+"=",""));break;default:console.warn("Persistance Load Error - invalid mode selected",this.mode)}return!!t&&JSON.parse(t)},Persistence.prototype.mergeDefinition=function(e,t){var i=this,o=[];return t=t||[],t.forEach(function(t,s){var r=i._findColumn(e,t);r&&(r.width=t.width,r.visible=t.visible,r.columns&&(r.columns=i.mergeDefinition(r.columns,t.columns)),o.push(r))}),e.forEach(function(e,s){i._findColumn(t,e)||(o.length>s?o.splice(s,0,e):o.push(e))}),o},Persistence.prototype._findColumn=function(e,t){var i=t.columns?"group":t.field?"field":"object";return e.find(function(e){switch(i){case"group":return e.title===t.title&&e.columns.length===t.columns.length;case"field":return e.field===t.field;case"object":return e===t}})},Persistence.prototype.save=function(e){var t={};switch(e){case"columns":t=this.parseColumns(this.table.columnManager.getColumns());break;case"filter":t=this.table.modules.filter.getFilters();break;case"sort":t=this.validateSorters(this.table.modules.sort.getSort())}var i=this.id+("columns"===e?"":"-"+e);this.saveData(i,t)},Persistence.prototype.validateSorters=function(e){return e.forEach(function(e){e.column=e.field,delete e.field}),e},Persistence.prototype.saveData=function(e,t){switch(t=JSON.stringify(t),this.mode){case"local":localStorage.setItem(e,t);break;case"cookie":var i=new Date;i.setDate(i.getDate()+1e4),document.cookie=e+"="+t+"; expires="+i.toUTCString();break;default:console.warn("Persistance Save Error - invalid mode selected",this.mode)}},Persistence.prototype.parseColumns=function(e){var t=this,i=[];return e.forEach(function(e){var o={};e.isGroup?(o.title=e.getDefinition().title,o.columns=t.parseColumns(e.getColumns())):(o.title=e.getDefinition().title,o.field=e.getField(),o.width=e.getWidth(),o.visible=e.visible),i.push(o)}),i},Tabulator.prototype.registerModule("persistence",Persistence); \ No newline at end of file diff --git a/Gems/AssetMemoryAnalyzer/External/tabulator-master/dist/js/modules/resize_columns.js b/Gems/AssetMemoryAnalyzer/External/tabulator-master/dist/js/modules/resize_columns.js deleted file mode 100644 index a3d3b1bb06..0000000000 --- a/Gems/AssetMemoryAnalyzer/External/tabulator-master/dist/js/modules/resize_columns.js +++ /dev/null @@ -1,146 +0,0 @@ -/* Tabulator v4.1.2 (c) Oliver Folkerd */ - -var ResizeColumns = function ResizeColumns(table) { - this.table = table; //hold Tabulator object - this.startColumn = false; - this.startX = false; - this.startWidth = false; - this.handle = null; - this.prevHandle = null; -}; - -ResizeColumns.prototype.initializeColumn = function (type, column, element) { - var self = this, - variableHeight = false, - mode = this.table.options.resizableColumns; - - //set column resize mode - if (type === "header") { - variableHeight = column.definition.formatter == "textarea" || column.definition.variableHeight; - column.modules.resize = { variableHeight: variableHeight }; - } - - if (mode === true || mode == type) { - - var handle = document.createElement('div'); - handle.className = "tabulator-col-resize-handle"; - - var prevHandle = document.createElement('div'); - prevHandle.className = "tabulator-col-resize-handle prev"; - - handle.addEventListener("click", function (e) { - e.stopPropagation(); - }); - - handle.addEventListener("mousedown", function (e) { - var nearestColumn = column.getLastColumn(); - - if (nearestColumn && self._checkResizability(nearestColumn)) { - self.startColumn = column; - self._mouseDown(e, nearestColumn); - } - }); - - //reszie column on double click - handle.addEventListener("dblclick", function (e) { - if (self._checkResizability(column)) { - column.reinitializeWidth(true); - } - }); - - prevHandle.addEventListener("click", function (e) { - e.stopPropagation(); - }); - - prevHandle.addEventListener("mousedown", function (e) { - var nearestColumn, colIndex, prevColumn; - - nearestColumn = column.getFirstColumn(); - - if (nearestColumn) { - colIndex = self.table.columnManager.findColumnIndex(nearestColumn); - prevColumn = colIndex > 0 ? self.table.columnManager.getColumnByIndex(colIndex - 1) : false; - - if (prevColumn && self._checkResizability(prevColumn)) { - self.startColumn = column; - self._mouseDown(e, prevColumn); - } - } - }); - - //resize column on double click - prevHandle.addEventListener("dblclick", function (e) { - var nearestColumn, colIndex, prevColumn; - - nearestColumn = column.getFirstColumn(); - - if (nearestColumn) { - colIndex = self.table.columnManager.findColumnIndex(nearestColumn); - prevColumn = colIndex > 0 ? self.table.columnManager.getColumnByIndex(colIndex - 1) : false; - - if (prevColumn && self._checkResizability(prevColumn)) { - prevColumn.reinitializeWidth(true); - } - } - }); - - element.appendChild(handle); - element.appendChild(prevHandle); - } -}; - -ResizeColumns.prototype._checkResizability = function (column) { - return typeof column.definition.resizable != "undefined" ? column.definition.resizable : this.table.options.resizableColumns; -}; - -ResizeColumns.prototype._mouseDown = function (e, column) { - var self = this; - - self.table.element.classList.add("tabulator-block-select"); - - function mouseMove(e) { - column.setWidth(self.startWidth + (e.screenX - self.startX)); - - if (!self.table.browserSlow && column.modules.resize && column.modules.resize.variableHeight) { - column.checkCellHeights(); - } - } - - function mouseUp(e) { - - //block editor from taking action while resizing is taking place - if (self.startColumn.modules.edit) { - self.startColumn.modules.edit.blocked = false; - } - - if (self.table.browserSlow && column.modules.resize && column.modules.resize.variableHeight) { - column.checkCellHeights(); - } - - document.body.removeEventListener("mouseup", mouseUp); - document.body.removeEventListener("mousemove", mouseMove); - - self.table.element.classList.remove("tabulator-block-select"); - - if (self.table.options.persistentLayout && self.table.modExists("persistence", true)) { - self.table.modules.persistence.save("columns"); - } - - self.table.options.columnResized.call(self.table, self.startColumn.getComponent()); - } - - e.stopPropagation(); //prevent resize from interfereing with movable columns - - //block editor from taking action while resizing is taking place - if (self.startColumn.modules.edit) { - self.startColumn.modules.edit.blocked = true; - } - - self.startX = e.screenX; - self.startWidth = column.getWidth(); - - document.body.addEventListener("mousemove", mouseMove); - document.body.addEventListener("mouseup", mouseUp); -}; - -Tabulator.prototype.registerModule("resizeColumns", ResizeColumns); \ No newline at end of file diff --git a/Gems/AssetMemoryAnalyzer/External/tabulator-master/dist/js/modules/resize_columns.min.js b/Gems/AssetMemoryAnalyzer/External/tabulator-master/dist/js/modules/resize_columns.min.js deleted file mode 100644 index 2b4908860b..0000000000 --- a/Gems/AssetMemoryAnalyzer/External/tabulator-master/dist/js/modules/resize_columns.min.js +++ /dev/null @@ -1,2 +0,0 @@ -/* Tabulator v4.1.2 (c) Oliver Folkerd */ -var ResizeColumns=function(e){this.table=e,this.startColumn=!1,this.startX=!1,this.startWidth=!1,this.handle=null,this.prevHandle=null};ResizeColumns.prototype.initializeColumn=function(e,t,i){var n=this,o=!1,s=this.table.options.resizableColumns;if("header"===e&&(o="textarea"==t.definition.formatter||t.definition.variableHeight,t.modules.resize={variableHeight:o}),!0===s||s==e){var l=document.createElement("div");l.className="tabulator-col-resize-handle";var a=document.createElement("div");a.className="tabulator-col-resize-handle prev",l.addEventListener("click",function(e){e.stopPropagation()}),l.addEventListener("mousedown",function(e){var i=t.getLastColumn();i&&n._checkResizability(i)&&(n.startColumn=t,n._mouseDown(e,i))}),l.addEventListener("dblclick",function(e){n._checkResizability(t)&&t.reinitializeWidth(!0)}),a.addEventListener("click",function(e){e.stopPropagation()}),a.addEventListener("mousedown",function(e){var i,o,s;(i=t.getFirstColumn())&&(o=n.table.columnManager.findColumnIndex(i),(s=o>0&&n.table.columnManager.getColumnByIndex(o-1))&&n._checkResizability(s)&&(n.startColumn=t,n._mouseDown(e,s)))}),a.addEventListener("dblclick",function(e){var i,o,s;(i=t.getFirstColumn())&&(o=n.table.columnManager.findColumnIndex(i),(s=o>0&&n.table.columnManager.getColumnByIndex(o-1))&&n._checkResizability(s)&&s.reinitializeWidth(!0))}),i.appendChild(l),i.appendChild(a)}},ResizeColumns.prototype._checkResizability=function(e){return void 0!==e.definition.resizable?e.definition.resizable:this.table.options.resizableColumns},ResizeColumns.prototype._mouseDown=function(e,t){function i(e){t.setWidth(o.startWidth+(e.screenX-o.startX)),!o.table.browserSlow&&t.modules.resize&&t.modules.resize.variableHeight&&t.checkCellHeights()}function n(e){o.startColumn.modules.edit&&(o.startColumn.modules.edit.blocked=!1),o.table.browserSlow&&t.modules.resize&&t.modules.resize.variableHeight&&t.checkCellHeights(),document.body.removeEventListener("mouseup",n),document.body.removeEventListener("mousemove",i),o.table.element.classList.remove("tabulator-block-select"),o.table.options.persistentLayout&&o.table.modExists("persistence",!0)&&o.table.modules.persistence.save("columns"),o.table.options.columnResized.call(o.table,o.startColumn.getComponent())}var o=this;o.table.element.classList.add("tabulator-block-select"),e.stopPropagation(),o.startColumn.modules.edit&&(o.startColumn.modules.edit.blocked=!0),o.startX=e.screenX,o.startWidth=t.getWidth(),document.body.addEventListener("mousemove",i),document.body.addEventListener("mouseup",n)},Tabulator.prototype.registerModule("resizeColumns",ResizeColumns); \ No newline at end of file diff --git a/Gems/AssetMemoryAnalyzer/External/tabulator-master/dist/js/modules/resize_rows.js b/Gems/AssetMemoryAnalyzer/External/tabulator-master/dist/js/modules/resize_rows.js deleted file mode 100644 index e92144cf93..0000000000 --- a/Gems/AssetMemoryAnalyzer/External/tabulator-master/dist/js/modules/resize_rows.js +++ /dev/null @@ -1,87 +0,0 @@ -/* Tabulator v4.1.2 (c) Oliver Folkerd */ - -var ResizeRows = function ResizeRows(table) { - this.table = table; //hold Tabulator object - this.startColumn = false; - this.startY = false; - this.startHeight = false; - this.handle = null; - this.prevHandle = null; -}; - -ResizeRows.prototype.initializeRow = function (row) { - var self = this, - rowEl = row.getElement(); - - var handle = document.createElement('div'); - handle.className = "tabulator-row-resize-handle"; - - var prevHandle = document.createElement('div'); - prevHandle.className = "tabulator-row-resize-handle prev"; - - handle.addEventListener("click", function (e) { - e.stopPropagation(); - }); - - handle.addEventListener("mousedown", function (e) { - self.startRow = row; - self._mouseDown(e, row); - }); - - prevHandle.addEventListener("click", function (e) { - e.stopPropagation(); - }); - - prevHandle.addEventListener("mousedown", function (e) { - var prevRow = self.table.rowManager.prevDisplayRow(row); - - if (prevRow) { - self.startRow = prevRow; - self._mouseDown(e, prevRow); - } - }); - - rowEl.appendChild(handle); - rowEl.appendChild(prevHandle); -}; - -ResizeRows.prototype._mouseDown = function (e, row) { - var self = this; - - self.table.element.classList.add("tabulator-block-select"); - - function mouseMove(e) { - row.setHeight(self.startHeight + (e.screenY - self.startY)); - } - - function mouseUp(e) { - - // //block editor from taking action while resizing is taking place - // if(self.startColumn.modules.edit){ - // self.startColumn.modules.edit.blocked = false; - // } - - document.body.removeEventListener("mouseup", mouseMove); - document.body.removeEventListener("mousemove", mouseMove); - - self.table.element.classList.remove("tabulator-block-select"); - - self.table.options.rowResized.call(this.table, row.getComponent()); - } - - e.stopPropagation(); //prevent resize from interfereing with movable columns - - //block editor from taking action while resizing is taking place - // if(self.startColumn.modules.edit){ - // self.startColumn.modules.edit.blocked = true; - // } - - self.startY = e.screenY; - self.startHeight = row.getHeight(); - - document.body.addEventListener("mousemove", mouseMove); - - document.body.addEventListener("mouseup", mouseUp); -}; - -Tabulator.prototype.registerModule("resizeRows", ResizeRows); \ No newline at end of file diff --git a/Gems/AssetMemoryAnalyzer/External/tabulator-master/dist/js/modules/resize_rows.min.js b/Gems/AssetMemoryAnalyzer/External/tabulator-master/dist/js/modules/resize_rows.min.js deleted file mode 100644 index 61421f4750..0000000000 --- a/Gems/AssetMemoryAnalyzer/External/tabulator-master/dist/js/modules/resize_rows.min.js +++ /dev/null @@ -1,2 +0,0 @@ -/* Tabulator v4.1.2 (c) Oliver Folkerd */ -var ResizeRows=function(e){this.table=e,this.startColumn=!1,this.startY=!1,this.startHeight=!1,this.handle=null,this.prevHandle=null};ResizeRows.prototype.initializeRow=function(e){var t=this,o=e.getElement(),n=document.createElement("div");n.className="tabulator-row-resize-handle";var s=document.createElement("div");s.className="tabulator-row-resize-handle prev",n.addEventListener("click",function(e){e.stopPropagation()}),n.addEventListener("mousedown",function(o){t.startRow=e,t._mouseDown(o,e)}),s.addEventListener("click",function(e){e.stopPropagation()}),s.addEventListener("mousedown",function(o){var n=t.table.rowManager.prevDisplayRow(e);n&&(t.startRow=n,t._mouseDown(o,n))}),o.appendChild(n),o.appendChild(s)},ResizeRows.prototype._mouseDown=function(e,t){function o(e){t.setHeight(s.startHeight+(e.screenY-s.startY))}function n(e){document.body.removeEventListener("mouseup",o),document.body.removeEventListener("mousemove",o),s.table.element.classList.remove("tabulator-block-select"),s.table.options.rowResized.call(this.table,t.getComponent())}var s=this;s.table.element.classList.add("tabulator-block-select"),e.stopPropagation(),s.startY=e.screenY,s.startHeight=t.getHeight(),document.body.addEventListener("mousemove",o),document.body.addEventListener("mouseup",n)},Tabulator.prototype.registerModule("resizeRows",ResizeRows); \ No newline at end of file diff --git a/Gems/AssetMemoryAnalyzer/External/tabulator-master/dist/js/modules/resize_table.js b/Gems/AssetMemoryAnalyzer/External/tabulator-master/dist/js/modules/resize_table.js deleted file mode 100644 index fda4d489da..0000000000 --- a/Gems/AssetMemoryAnalyzer/External/tabulator-master/dist/js/modules/resize_table.js +++ /dev/null @@ -1,38 +0,0 @@ -/* Tabulator v4.1.2 (c) Oliver Folkerd */ - -var ResizeTable = function ResizeTable(table) { - this.table = table; //hold Tabulator object - this.binding = false; - this.observer = false; -}; - -ResizeTable.prototype.initialize = function (row) { - var table = this.table, - observer; - - if (typeof ResizeObserver !== "undefined" && table.rowManager.getRenderMode() === "virtual") { - this.observer = new ResizeObserver(function (entry) { - table.redraw(); - }); - - this.observer.observe(table.element); - } else { - this.binding = function () { - table.redraw(); - }; - - window.addEventListener("resize", this.binding); - } -}; - -ResizeTable.prototype.clearBindings = function (row) { - if (this.binding) { - window.removeEventListener("resize", this.binding); - } - - if (this.observer) { - this.observer.unobserve(this.table.element); - } -}; - -Tabulator.prototype.registerModule("resizeTable", ResizeTable); \ No newline at end of file diff --git a/Gems/AssetMemoryAnalyzer/External/tabulator-master/dist/js/modules/resize_table.min.js b/Gems/AssetMemoryAnalyzer/External/tabulator-master/dist/js/modules/resize_table.min.js deleted file mode 100644 index 253f36e081..0000000000 --- a/Gems/AssetMemoryAnalyzer/External/tabulator-master/dist/js/modules/resize_table.min.js +++ /dev/null @@ -1,2 +0,0 @@ -/* Tabulator v4.1.2 (c) Oliver Folkerd */ -var ResizeTable=function(e){this.table=e,this.binding=!1,this.observer=!1};ResizeTable.prototype.initialize=function(e){var i=this.table;"undefined"!=typeof ResizeObserver&&"virtual"===i.rowManager.getRenderMode()?(this.observer=new ResizeObserver(function(e){i.redraw()}),this.observer.observe(i.element)):(this.binding=function(){i.redraw()},window.addEventListener("resize",this.binding))},ResizeTable.prototype.clearBindings=function(e){this.binding&&window.removeEventListener("resize",this.binding),this.observer&&this.observer.unobserve(this.table.element)},Tabulator.prototype.registerModule("resizeTable",ResizeTable); \ No newline at end of file diff --git a/Gems/AssetMemoryAnalyzer/External/tabulator-master/dist/js/modules/responsive_layout.js b/Gems/AssetMemoryAnalyzer/External/tabulator-master/dist/js/modules/responsive_layout.js deleted file mode 100644 index e22bcb21ef..0000000000 --- a/Gems/AssetMemoryAnalyzer/External/tabulator-master/dist/js/modules/responsive_layout.js +++ /dev/null @@ -1,243 +0,0 @@ -/* Tabulator v4.1.2 (c) Oliver Folkerd */ - -var ResponsiveLayout = function ResponsiveLayout(table) { - this.table = table; //hold Tabulator object - this.columns = []; - this.hiddenColumns = []; - this.mode = ""; - this.index = 0; - this.collapseFormatter = []; - this.collapseStartOpen = true; -}; - -//generate resposive columns list -ResponsiveLayout.prototype.initialize = function () { - var self = this, - columns = []; - - this.mode = this.table.options.responsiveLayout; - this.collapseFormatter = this.table.options.responsiveLayoutCollapseFormatter || this.formatCollapsedData; - this.collapseStartOpen = this.table.options.responsiveLayoutCollapseStartOpen; - this.hiddenColumns = []; - - //detemine level of responsivity for each column - this.table.columnManager.columnsByIndex.forEach(function (column, i) { - if (column.modules.responsive) { - if (column.modules.responsive.order && column.modules.responsive.visible) { - column.modules.responsive.index = i; - columns.push(column); - - if (!column.visible && self.mode === "collapse") { - self.hiddenColumns.push(column); - } - } - } - }); - - //sort list by responsivity - columns = columns.reverse(); - columns = columns.sort(function (a, b) { - var diff = b.modules.responsive.order - a.modules.responsive.order; - return diff || b.modules.responsive.index - a.modules.responsive.index; - }); - - this.columns = columns; - - if (this.mode === "collapse") { - this.generateCollapsedContent(); - } -}; - -//define layout information -ResponsiveLayout.prototype.initializeColumn = function (column) { - var def = column.getDefinition(); - - column.modules.responsive = { order: typeof def.responsive === "undefined" ? 1 : def.responsive, visible: def.visible === false ? false : true }; -}; - -ResponsiveLayout.prototype.layoutRow = function (row) { - var rowEl = row.getElement(), - el = document.createElement("div"); - - el.classList.add("tabulator-responsive-collapse"); - - if (!rowEl.classList.contains("tabulator-calcs")) { - row.modules.responsiveLayout = { - element: el - }; - - if (!this.collapseStartOpen) { - el.style.display = 'none'; - } - - rowEl.appendChild(el); - - this.generateCollapsedRowContent(row); - } -}; - -//update column visibility -ResponsiveLayout.prototype.updateColumnVisibility = function (column, visible) { - var index; - if (column.modules.responsive) { - column.modules.responsive.visible = visible; - this.initialize(); - } -}; - -ResponsiveLayout.prototype.hideColumn = function (column) { - column.hide(false, true); - - if (this.mode === "collapse") { - this.hiddenColumns.unshift(column); - this.generateCollapsedContent(); - } -}; - -ResponsiveLayout.prototype.showColumn = function (column) { - var index; - - column.show(false, true); - //set column width to prevent calculation loops on uninitialized columns - column.setWidth(column.getWidth()); - - if (this.mode === "collapse") { - index = this.hiddenColumns.indexOf(column); - - if (index > -1) { - this.hiddenColumns.splice(index, 1); - } - - this.generateCollapsedContent(); - } -}; - -//redraw columns to fit space -ResponsiveLayout.prototype.update = function () { - var self = this, - working = true; - - while (working) { - - var width = self.table.modules.layout.getMode() == "fitColumns" ? self.table.columnManager.getFlexBaseWidth() : self.table.columnManager.getWidth(); - - var diff = self.table.columnManager.element.clientWidth - width; - - if (diff < 0) { - //table is too wide - var column = self.columns[self.index]; - - if (column) { - self.hideColumn(column); - self.index++; - } else { - working = false; - } - } else { - - //table has spare space - var _column = self.columns[self.index - 1]; - - if (_column) { - if (diff > 0) { - if (diff >= _column.getWidth()) { - self.showColumn(_column); - self.index--; - } else { - working = false; - } - } else { - working = false; - } - } else { - working = false; - } - } - - if (!self.table.rowManager.activeRowsCount) { - self.table.rowManager.renderEmptyScroll(); - } - } -}; - -ResponsiveLayout.prototype.generateCollapsedContent = function () { - var self = this, - rows = this.table.rowManager.getDisplayRows(); - - rows.forEach(function (row) { - self.generateCollapsedRowContent(row); - }); -}; - -ResponsiveLayout.prototype.generateCollapsedRowContent = function (row) { - var el, contents; - - if (row.modules.responsiveLayout) { - el = row.modules.responsiveLayout.element; - - while (el.firstChild) { - el.removeChild(el.firstChild); - }contents = this.collapseFormatter(this.generateCollapsedRowData(row)); - - if (contents) { - el.appendChild(contents); - } - } -}; - -ResponsiveLayout.prototype.generateCollapsedRowData = function (row) { - var self = this, - data = row.getData(), - output = {}, - mockCellComponent; - - this.hiddenColumns.forEach(function (column) { - var value = column.getFieldValue(data); - - if (column.definition.title && column.field) { - if (column.modules.format && self.table.options.responsiveLayoutCollapseUseFormatters) { - - mockCellComponent = { - value: false, - data: {}, - getValue: function getValue() { - return value; - }, - getData: function getData() { - return data; - }, - getElement: function getElement() { - return document.createElement("div"); - }, - getRow: function getRow() { - return row.getComponent(); - }, - getColumn: function getColumn() { - return column.getComponent(); - } - }; - - output[column.definition.title] = column.modules.format.formatter.call(self.table.modules.format, mockCellComponent, column.modules.format.params); - } else { - output[column.definition.title] = value; - } - } - }); - - return output; -}; - -ResponsiveLayout.prototype.formatCollapsedData = function (data) { - var list = document.createElement("table"), - listContents = ""; - - for (var key in data) { - listContents += "" + key + "" + data[key] + ""; - } - - list.innerHTML = listContents; - - return Object.keys(data).length ? list : ""; -}; - -Tabulator.prototype.registerModule("responsiveLayout", ResponsiveLayout); \ No newline at end of file diff --git a/Gems/AssetMemoryAnalyzer/External/tabulator-master/dist/js/modules/responsive_layout.min.js b/Gems/AssetMemoryAnalyzer/External/tabulator-master/dist/js/modules/responsive_layout.min.js deleted file mode 100644 index 3ca60c8b9f..0000000000 --- a/Gems/AssetMemoryAnalyzer/External/tabulator-master/dist/js/modules/responsive_layout.min.js +++ /dev/null @@ -1,2 +0,0 @@ -/* Tabulator v4.1.2 (c) Oliver Folkerd */ -var ResponsiveLayout=function(e){this.table=e,this.columns=[],this.hiddenColumns=[],this.mode="",this.index=0,this.collapseFormatter=[],this.collapseStartOpen=!0};ResponsiveLayout.prototype.initialize=function(){var e=this,t=[];this.mode=this.table.options.responsiveLayout,this.collapseFormatter=this.table.options.responsiveLayoutCollapseFormatter||this.formatCollapsedData,this.collapseStartOpen=this.table.options.responsiveLayoutCollapseStartOpen,this.hiddenColumns=[],this.table.columnManager.columnsByIndex.forEach(function(o,s){o.modules.responsive&&o.modules.responsive.order&&o.modules.responsive.visible&&(o.modules.responsive.index=s,t.push(o),o.visible||"collapse"!==e.mode||e.hiddenColumns.push(o))}),t=t.reverse(),t=t.sort(function(e,t){return t.modules.responsive.order-e.modules.responsive.order||t.modules.responsive.index-e.modules.responsive.index}),this.columns=t,"collapse"===this.mode&&this.generateCollapsedContent()},ResponsiveLayout.prototype.initializeColumn=function(e){var t=e.getDefinition();e.modules.responsive={order:void 0===t.responsive?1:t.responsive,visible:!1!==t.visible}},ResponsiveLayout.prototype.layoutRow=function(e){var t=e.getElement(),o=document.createElement("div");o.classList.add("tabulator-responsive-collapse"),t.classList.contains("tabulator-calcs")||(e.modules.responsiveLayout={element:o},this.collapseStartOpen||(o.style.display="none"),t.appendChild(o),this.generateCollapsedRowContent(e))},ResponsiveLayout.prototype.updateColumnVisibility=function(e,t){e.modules.responsive&&(e.modules.responsive.visible=t,this.initialize())},ResponsiveLayout.prototype.hideColumn=function(e){e.hide(!1,!0),"collapse"===this.mode&&(this.hiddenColumns.unshift(e),this.generateCollapsedContent())},ResponsiveLayout.prototype.showColumn=function(e){var t;e.show(!1,!0),e.setWidth(e.getWidth()),"collapse"===this.mode&&(t=this.hiddenColumns.indexOf(e),t>-1&&this.hiddenColumns.splice(t,1),this.generateCollapsedContent())},ResponsiveLayout.prototype.update=function(){for(var e=this,t=!0;t;){var o="fitColumns"==e.table.modules.layout.getMode()?e.table.columnManager.getFlexBaseWidth():e.table.columnManager.getWidth(),s=e.table.columnManager.element.clientWidth-o;if(s<0){var n=e.columns[e.index];n?(e.hideColumn(n),e.index++):t=!1}else{var i=e.columns[e.index-1];i&&s>0&&s>=i.getWidth()?(e.showColumn(i),e.index--):t=!1}e.table.rowManager.activeRowsCount||e.table.rowManager.renderEmptyScroll()}},ResponsiveLayout.prototype.generateCollapsedContent=function(){var e=this;this.table.rowManager.getDisplayRows().forEach(function(t){e.generateCollapsedRowContent(t)})},ResponsiveLayout.prototype.generateCollapsedRowContent=function(e){var t,o;if(e.modules.responsiveLayout){for(t=e.modules.responsiveLayout.element;t.firstChild;)t.removeChild(t.firstChild);o=this.collapseFormatter(this.generateCollapsedRowData(e)),o&&t.appendChild(o)}},ResponsiveLayout.prototype.generateCollapsedRowData=function(e){var t,o=this,s=e.getData(),n={};return this.hiddenColumns.forEach(function(i){var a=i.getFieldValue(s);i.definition.title&&i.field&&(i.modules.format&&o.table.options.responsiveLayoutCollapseUseFormatters?(t={value:!1,data:{},getValue:function(){return a},getData:function(){return s},getElement:function(){return document.createElement("div")},getRow:function(){return e.getComponent()},getColumn:function(){return i.getComponent()}},n[i.definition.title]=i.modules.format.formatter.call(o.table.modules.format,t,i.modules.format.params)):n[i.definition.title]=a)}),n},ResponsiveLayout.prototype.formatCollapsedData=function(e){var t=document.createElement("table"),o="";for(var s in e)o+=""+s+""+e[s]+"";return t.innerHTML=o,Object.keys(e).length?t:""},Tabulator.prototype.registerModule("responsiveLayout",ResponsiveLayout); \ No newline at end of file diff --git a/Gems/AssetMemoryAnalyzer/External/tabulator-master/dist/js/modules/select_row.js b/Gems/AssetMemoryAnalyzer/External/tabulator-master/dist/js/modules/select_row.js deleted file mode 100644 index 3f4f76915c..0000000000 --- a/Gems/AssetMemoryAnalyzer/External/tabulator-master/dist/js/modules/select_row.js +++ /dev/null @@ -1,294 +0,0 @@ -var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol" ? function (obj) { return typeof obj; } : function (obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; - -/* Tabulator v4.1.2 (c) Oliver Folkerd */ - -var SelectRow = function SelectRow(table) { - this.table = table; //hold Tabulator object - this.selecting = false; //flag selecting in progress - this.lastClickedRow = false; //last clicked row - this.selectPrev = []; //hold previously selected element for drag drop selection - this.selectedRows = []; //hold selected rows -}; - -SelectRow.prototype.clearSelectionData = function (silent) { - this.selecting = false; - this.lastClickedRow = false; - this.selectPrev = []; - this.selectedRows = []; - - if (!silent) { - this._rowSelectionChanged(); - } -}; - -SelectRow.prototype.initializeRow = function (row) { - var self = this, - element = row.getElement(); - - // trigger end of row selection - var endSelect = function endSelect() { - - setTimeout(function () { - self.selecting = false; - }, 50); - - document.body.removeEventListener("mouseup", endSelect); - }; - - row.modules.select = { selected: false }; - - //set row selection class - if (self.table.options.selectableCheck.call(this.table, row.getComponent())) { - element.classList.add("tabulator-selectable"); - element.classList.remove("tabulator-unselectable"); - - if (self.table.options.selectable && self.table.options.selectable != "highlight") { - if (self.table.options.selectableRangeMode && self.table.options.selectableRangeMode === "click") { - element.addEventListener("click", function (e) { - if (e.shiftKey) { - self.lastClickedRow = self.lastClickedRow || row; - - var lastClickedRowIdx = self.table.rowManager.getDisplayRowIndex(self.lastClickedRow); - var rowIdx = self.table.rowManager.getDisplayRowIndex(row); - - var fromRowIdx = lastClickedRowIdx <= rowIdx ? lastClickedRowIdx : rowIdx; - var toRowIdx = lastClickedRowIdx >= rowIdx ? lastClickedRowIdx : rowIdx; - - var rows = self.table.rowManager.getDisplayRows().slice(0); - var toggledRows = rows.splice(fromRowIdx, toRowIdx - fromRowIdx + 1); - - if (e.ctrlKey) { - toggledRows.forEach(function (toggledRow) { - if (toggledRow !== self.lastClickedRow) { - self.toggleRow(toggledRow); - } - }); - self.lastClickedRow = row; - } else { - self.deselectRows(); - self.selectRows(toggledRows); - } - } else if (e.ctrlKey) { - self.toggleRow(row); - self.lastClickedRow = row; - } else { - self.deselectRows(); - self.selectRows(row); - self.lastClickedRow = row; - } - }); - } else { - element.addEventListener("click", function (e) { - if (!self.selecting) { - self.toggleRow(row); - } - }); - - element.addEventListener("mousedown", function (e) { - if (e.shiftKey) { - self.selecting = true; - - self.selectPrev = []; - - document.body.addEventListener("mouseup", endSelect); - document.body.addEventListener("keyup", endSelect); - - self.toggleRow(row); - - return false; - } - }); - - element.addEventListener("mouseenter", function (e) { - if (self.selecting) { - self.toggleRow(row); - - if (self.selectPrev[1] == row) { - self.toggleRow(self.selectPrev[0]); - } - } - }); - - element.addEventListener("mouseout", function (e) { - if (self.selecting) { - self.selectPrev.unshift(row); - } - }); - } - } - } else { - element.classList.add("tabulator-unselectable"); - element.classList.remove("tabulator-selectable"); - } -}; - -//toggle row selection -SelectRow.prototype.toggleRow = function (row) { - if (this.table.options.selectableCheck.call(this.table, row.getComponent())) { - if (row.modules.select.selected) { - this._deselectRow(row); - } else { - this._selectRow(row); - } - } -}; - -//select a number of rows -SelectRow.prototype.selectRows = function (rows) { - var self = this; - - switch (typeof rows === "undefined" ? "undefined" : _typeof(rows)) { - case "undefined": - self.table.rowManager.rows.forEach(function (row) { - self._selectRow(row, false, true); - }); - - self._rowSelectionChanged(); - break; - - case "boolean": - if (rows === true) { - self.table.rowManager.activeRows.forEach(function (row) { - self._selectRow(row, false, true); - }); - - self._rowSelectionChanged(); - } - break; - - default: - if (Array.isArray(rows)) { - rows.forEach(function (row) { - self._selectRow(row); - }); - - self._rowSelectionChanged(); - } else { - self._selectRow(rows); - } - break; - } -}; - -//select an individual row -SelectRow.prototype._selectRow = function (rowInfo, silent, force) { - var index; - - //handle max row count - if (!isNaN(this.table.options.selectable) && this.table.options.selectable !== true && !force) { - if (this.selectedRows.length >= this.table.options.selectable) { - if (this.table.options.selectableRollingSelection) { - this._deselectRow(this.selectedRows[0]); - } else { - return false; - } - } - } - - var row = this.table.rowManager.findRow(rowInfo); - - if (row) { - if (this.selectedRows.indexOf(row) == -1) { - row.modules.select.selected = true; - row.getElement().classList.add("tabulator-selected"); - - this.selectedRows.push(row); - - if (!silent) { - this.table.options.rowSelected.call(this.table, row.getComponent()); - this._rowSelectionChanged(); - } - } - } else { - if (!silent) { - console.warn("Selection Error - No such row found, ignoring selection:" + rowInfo); - } - } -}; - -SelectRow.prototype.isRowSelected = function (row) { - return this.selectedRows.indexOf(row) !== -1; -}; - -//deselect a number of rows -SelectRow.prototype.deselectRows = function (rows) { - var self = this, - rowCount; - - if (typeof rows == "undefined") { - - rowCount = self.selectedRows.length; - - for (var i = 0; i < rowCount; i++) { - self._deselectRow(self.selectedRows[0], false); - } - - self._rowSelectionChanged(); - } else { - if (Array.isArray(rows)) { - rows.forEach(function (row) { - self._deselectRow(row); - }); - - self._rowSelectionChanged(); - } else { - self._deselectRow(rows); - } - } -}; - -//deselect an individual row -SelectRow.prototype._deselectRow = function (rowInfo, silent) { - var self = this, - row = self.table.rowManager.findRow(rowInfo), - index; - - if (row) { - index = self.selectedRows.findIndex(function (selectedRow) { - return selectedRow == row; - }); - - if (index > -1) { - - row.modules.select.selected = false; - row.getElement().classList.remove("tabulator-selected"); - self.selectedRows.splice(index, 1); - - if (!silent) { - self.table.options.rowDeselected.call(this.table, row.getComponent()); - self._rowSelectionChanged(); - } - } - } else { - if (!silent) { - console.warn("Deselection Error - No such row found, ignoring selection:" + rowInfo); - } - } -}; - -SelectRow.prototype.getSelectedData = function () { - var data = []; - - this.selectedRows.forEach(function (row) { - data.push(row.getData()); - }); - - return data; -}; - -SelectRow.prototype.getSelectedRows = function () { - - var rows = []; - - this.selectedRows.forEach(function (row) { - rows.push(row.getComponent()); - }); - - return rows; -}; - -SelectRow.prototype._rowSelectionChanged = function () { - this.table.options.rowSelectionChanged.call(this.table, this.getSelectedData(), this.getSelectedRows()); -}; - -Tabulator.prototype.registerModule("selectRow", SelectRow); \ No newline at end of file diff --git a/Gems/AssetMemoryAnalyzer/External/tabulator-master/dist/js/modules/select_row.min.js b/Gems/AssetMemoryAnalyzer/External/tabulator-master/dist/js/modules/select_row.min.js deleted file mode 100644 index 8ac199fcc9..0000000000 --- a/Gems/AssetMemoryAnalyzer/External/tabulator-master/dist/js/modules/select_row.min.js +++ /dev/null @@ -1,2 +0,0 @@ -/* Tabulator v4.1.2 (c) Oliver Folkerd */ -var _typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},SelectRow=function(e){this.table=e,this.selecting=!1,this.lastClickedRow=!1,this.selectPrev=[],this.selectedRows=[]};SelectRow.prototype.clearSelectionData=function(e){this.selecting=!1,this.lastClickedRow=!1,this.selectPrev=[],this.selectedRows=[],e||this._rowSelectionChanged()},SelectRow.prototype.initializeRow=function(e){var t=this,o=e.getElement(),l=function e(){setTimeout(function(){t.selecting=!1},50),document.body.removeEventListener("mouseup",e)};e.modules.select={selected:!1},t.table.options.selectableCheck.call(this.table,e.getComponent())?(o.classList.add("tabulator-selectable"),o.classList.remove("tabulator-unselectable"),t.table.options.selectable&&"highlight"!=t.table.options.selectable&&(t.table.options.selectableRangeMode&&"click"===t.table.options.selectableRangeMode?o.addEventListener("click",function(o){if(o.shiftKey){t.lastClickedRow=t.lastClickedRow||e;var l=t.table.rowManager.getDisplayRowIndex(t.lastClickedRow),s=t.table.rowManager.getDisplayRowIndex(e),c=l<=s?l:s,n=l>=s?l:s,i=t.table.rowManager.getDisplayRows().slice(0),a=i.splice(c,n-c+1);o.ctrlKey?(a.forEach(function(e){e!==t.lastClickedRow&&t.toggleRow(e)}),t.lastClickedRow=e):(t.deselectRows(),t.selectRows(a))}else o.ctrlKey?(t.toggleRow(e),t.lastClickedRow=e):(t.deselectRows(),t.selectRows(e),t.lastClickedRow=e)}):(o.addEventListener("click",function(o){t.selecting||t.toggleRow(e)}),o.addEventListener("mousedown",function(o){if(o.shiftKey)return t.selecting=!0,t.selectPrev=[],document.body.addEventListener("mouseup",l),document.body.addEventListener("keyup",l),t.toggleRow(e),!1}),o.addEventListener("mouseenter",function(o){t.selecting&&(t.toggleRow(e),t.selectPrev[1]==e&&t.toggleRow(t.selectPrev[0]))}),o.addEventListener("mouseout",function(o){t.selecting&&t.selectPrev.unshift(e)})))):(o.classList.add("tabulator-unselectable"),o.classList.remove("tabulator-selectable"))},SelectRow.prototype.toggleRow=function(e){this.table.options.selectableCheck.call(this.table,e.getComponent())&&(e.modules.select.selected?this._deselectRow(e):this._selectRow(e))},SelectRow.prototype.selectRows=function(e){var t=this;switch(void 0===e?"undefined":_typeof(e)){case"undefined":t.table.rowManager.rows.forEach(function(e){t._selectRow(e,!1,!0)}),t._rowSelectionChanged();break;case"boolean":!0===e&&(t.table.rowManager.activeRows.forEach(function(e){t._selectRow(e,!1,!0)}),t._rowSelectionChanged());break;default:Array.isArray(e)?(e.forEach(function(e){t._selectRow(e)}),t._rowSelectionChanged()):t._selectRow(e)}},SelectRow.prototype._selectRow=function(e,t,o){if(!isNaN(this.table.options.selectable)&&!0!==this.table.options.selectable&&!o&&this.selectedRows.length>=this.table.options.selectable){if(!this.table.options.selectableRollingSelection)return!1;this._deselectRow(this.selectedRows[0])}var l=this.table.rowManager.findRow(e);l?-1==this.selectedRows.indexOf(l)&&(l.modules.select.selected=!0,l.getElement().classList.add("tabulator-selected"),this.selectedRows.push(l),t||(this.table.options.rowSelected.call(this.table,l.getComponent()),this._rowSelectionChanged())):t||console.warn("Selection Error - No such row found, ignoring selection:"+e)},SelectRow.prototype.isRowSelected=function(e){return-1!==this.selectedRows.indexOf(e)},SelectRow.prototype.deselectRows=function(e){var t,o=this;if(void 0===e){t=o.selectedRows.length;for(var l=0;l-1&&(s.modules.select.selected=!1,s.getElement().classList.remove("tabulator-selected"),l.selectedRows.splice(o,1),t||(l.table.options.rowDeselected.call(this.table,s.getComponent()),l._rowSelectionChanged())):t||console.warn("Deselection Error - No such row found, ignoring selection:"+e)},SelectRow.prototype.getSelectedData=function(){var e=[];return this.selectedRows.forEach(function(t){e.push(t.getData())}),e},SelectRow.prototype.getSelectedRows=function(){var e=[];return this.selectedRows.forEach(function(t){e.push(t.getComponent())}),e},SelectRow.prototype._rowSelectionChanged=function(){this.table.options.rowSelectionChanged.call(this.table,this.getSelectedData(),this.getSelectedRows())},Tabulator.prototype.registerModule("selectRow",SelectRow); \ No newline at end of file diff --git a/Gems/AssetMemoryAnalyzer/External/tabulator-master/dist/js/modules/sort.js b/Gems/AssetMemoryAnalyzer/External/tabulator-master/dist/js/modules/sort.js deleted file mode 100644 index f3a0215487..0000000000 --- a/Gems/AssetMemoryAnalyzer/External/tabulator-master/dist/js/modules/sort.js +++ /dev/null @@ -1,527 +0,0 @@ -var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol" ? function (obj) { return typeof obj; } : function (obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; - -/* Tabulator v4.1.2 (c) Oliver Folkerd */ - -var Sort = function Sort(table) { - this.table = table; //hold Tabulator object - this.sortList = []; //holder current sort - this.changed = false; //has the sort changed since last render -}; - -//initialize column header for sorting -Sort.prototype.initializeColumn = function (column, content) { - var self = this, - sorter = false, - colEl, - arrowEl; - - switch (_typeof(column.definition.sorter)) { - case "string": - if (self.sorters[column.definition.sorter]) { - sorter = self.sorters[column.definition.sorter]; - } else { - console.warn("Sort Error - No such sorter found: ", column.definition.sorter); - } - break; - - case "function": - sorter = column.definition.sorter; - break; - } - - column.modules.sort = { - sorter: sorter, dir: "none", - params: column.definition.sorterParams || {}, - startingDir: column.definition.headerSortStartingDir || "asc" - }; - - if (column.definition.headerSort !== false) { - - colEl = column.getElement(); - - colEl.classList.add("tabulator-sortable"); - - arrowEl = document.createElement("div"); - arrowEl.classList.add("tabulator-arrow"); - //create sorter arrow - content.appendChild(arrowEl); - - //sort on click - colEl.addEventListener("click", function (e) { - var dir = "", - sorters = [], - match = false; - - if (column.modules.sort) { - dir = column.modules.sort.dir == "asc" ? "desc" : column.modules.sort.dir == "desc" ? "asc" : column.modules.sort.startingDir; - - if (self.table.options.columnHeaderSortMulti && (e.shiftKey || e.ctrlKey)) { - sorters = self.getSort(); - - match = sorters.findIndex(function (sorter) { - return sorter.field === column.getField(); - }); - - if (match > -1) { - sorters[match].dir = sorters[match].dir == "asc" ? "desc" : "asc"; - - if (match != sorters.length - 1) { - sorters.push(sorters.splice(match, 1)[0]); - } - } else { - sorters.push({ column: column, dir: dir }); - } - - //add to existing sort - self.setSort(sorters); - } else { - //sort by column only - self.setSort(column, dir); - } - - self.table.rowManager.sorterRefresh(); - } - }); - } -}; - -//check if the sorters have changed since last use -Sort.prototype.hasChanged = function () { - var changed = this.changed; - this.changed = false; - return changed; -}; - -//return current sorters -Sort.prototype.getSort = function () { - var self = this, - sorters = []; - - self.sortList.forEach(function (item) { - if (item.column) { - sorters.push({ column: item.column.getComponent(), field: item.column.getField(), dir: item.dir }); - } - }); - - return sorters; -}; - -//change sort list and trigger sort -Sort.prototype.setSort = function (sortList, dir) { - var self = this, - newSortList = []; - - if (!Array.isArray(sortList)) { - sortList = [{ column: sortList, dir: dir }]; - } - - sortList.forEach(function (item) { - var column; - - column = self.table.columnManager.findColumn(item.column); - - if (column) { - item.column = column; - newSortList.push(item); - self.changed = true; - } else { - console.warn("Sort Warning - Sort field does not exist and is being ignored: ", item.column); - } - }); - - self.sortList = newSortList; - - if (this.table.options.persistentSort && this.table.modExists("persistence", true)) { - this.table.modules.persistence.save("sort"); - } -}; - -//clear sorters -Sort.prototype.clear = function () { - this.setSort([]); -}; - -//find appropriate sorter for column -Sort.prototype.findSorter = function (column) { - var row = this.table.rowManager.activeRows[0], - sorter = "string", - field, - value; - - if (row) { - row = row.getData(); - field = column.getField(); - - if (field) { - - value = column.getFieldValue(row); - - switch (typeof value === "undefined" ? "undefined" : _typeof(value)) { - case "undefined": - sorter = "string"; - break; - - case "boolean": - sorter = "boolean"; - break; - - default: - if (!isNaN(value) && value !== "") { - sorter = "number"; - } else { - if (value.match(/((^[0-9]+[a-z]+)|(^[a-z]+[0-9]+))+$/i)) { - sorter = "alphanum"; - } - } - break; - } - } - } - - return this.sorters[sorter]; -}; - -//work through sort list sorting data -Sort.prototype.sort = function () { - var self = this, - lastSort, - sortList; - - sortList = this.table.options.sortOrderReverse ? self.sortList.slice().reverse() : self.sortList; - - if (self.table.options.dataSorting) { - self.table.options.dataSorting.call(self.table, self.getSort()); - } - - self.clearColumnHeaders(); - - if (!self.table.options.ajaxSorting) { - - sortList.forEach(function (item, i) { - - if (item.column && item.column.modules.sort) { - - //if no sorter has been defined, take a guess - if (!item.column.modules.sort.sorter) { - item.column.modules.sort.sorter = self.findSorter(item.column); - } - - self._sortItem(item.column, item.dir, sortList, i); - } - - self.setColumnHeader(item.column, item.dir); - }); - } else { - sortList.forEach(function (item, i) { - self.setColumnHeader(item.column, item.dir); - }); - } - - if (self.table.options.dataSorted) { - self.table.options.dataSorted.call(self.table, self.getSort(), self.table.rowManager.getComponents(true)); - } -}; - -//clear sort arrows on columns -Sort.prototype.clearColumnHeaders = function () { - this.table.columnManager.getRealColumns().forEach(function (column) { - if (column.modules.sort) { - column.modules.sort.dir = "none"; - column.getElement().setAttribute("aria-sort", "none"); - } - }); -}; - -//set the column header sort direction -Sort.prototype.setColumnHeader = function (column, dir) { - column.modules.sort.dir = dir; - column.getElement().setAttribute("aria-sort", dir); -}; - -//sort each item in sort list -Sort.prototype._sortItem = function (column, dir, sortList, i) { - var self = this; - - var activeRows = self.table.rowManager.activeRows; - - var params = typeof column.modules.sort.params === "function" ? column.modules.sort.params(column.getComponent(), dir) : column.modules.sort.params; - - activeRows.sort(function (a, b) { - - var result = self._sortRow(a, b, column, dir, params); - - //if results match recurse through previous searchs to be sure - if (result === 0 && i) { - for (var j = i - 1; j >= 0; j--) { - result = self._sortRow(a, b, sortList[j].column, sortList[j].dir, params); - - if (result !== 0) { - break; - } - } - } - - return result; - }); -}; - -//process individual rows for a sort function on active data -Sort.prototype._sortRow = function (a, b, column, dir, params) { - var el1Comp, el2Comp, colComp; - - //switch elements depending on search direction - var el1 = dir == "asc" ? a : b; - var el2 = dir == "asc" ? b : a; - - a = column.getFieldValue(el1.getData()); - b = column.getFieldValue(el2.getData()); - - a = typeof a !== "undefined" ? a : ""; - b = typeof b !== "undefined" ? b : ""; - - el1Comp = el1.getComponent(); - el2Comp = el2.getComponent(); - - return column.modules.sort.sorter.call(this, a, b, el1Comp, el2Comp, column.getComponent(), dir, params); -}; - -//default data sorters -Sort.prototype.sorters = { - - //sort numbers - number: function number(a, b, aRow, bRow, column, dir, params) { - var alignEmptyValues = params.alignEmptyValues; - var emptyAlign = 0; - - a = parseFloat(String(a).replace(",", "")); - b = parseFloat(String(b).replace(",", "")); - - //handle non numeric values - if (isNaN(a)) { - emptyAlign = isNaN(b) ? 0 : -1; - } else if (isNaN(b)) { - emptyAlign = 1; - } else { - //compare valid values - return a - b; - } - - //fix empty values in position - if (alignEmptyValues === "top" && dir === "desc" || alignEmptyValues === "bottom" && dir === "asc") { - emptyAlign *= -1; - } - - return emptyAlign; - }, - - //sort strings - string: function string(a, b, aRow, bRow, column, dir, params) { - var alignEmptyValues = params.alignEmptyValues; - var emptyAlign = 0; - var locale; - - //handle empty values - if (!a) { - emptyAlign = !b ? 0 : -1; - } else if (!b) { - emptyAlign = 1; - } else { - //compare valid values - switch (_typeof(params.locale)) { - case "boolean": - if (params.locale) { - locale = this.table.modules.localize.getLocale(); - } - break; - case "string": - locale = params.locale; - break; - } - - return String(a).toLowerCase().localeCompare(String(b).toLowerCase(), locale); - } - - //fix empty values in position - if (alignEmptyValues === "top" && dir === "desc" || alignEmptyValues === "bottom" && dir === "asc") { - emptyAlign *= -1; - } - - return emptyAlign; - }, - - //sort date - date: function date(a, b, aRow, bRow, column, dir, params) { - if (!params.format) { - params.format = "DD/MM/YYYY"; - } - - return this.sorters.datetime.call(this, a, b, aRow, bRow, column, dir, params); - }, - - //sort hh:mm formatted times - time: function time(a, b, aRow, bRow, column, dir, params) { - if (!params.format) { - params.format = "hh:mm"; - } - - return this.sorters.datetime.call(this, a, b, aRow, bRow, column, dir, params); - }, - - //sort datetime - datetime: function datetime(a, b, aRow, bRow, column, dir, params) { - var format = params.format || "DD/MM/YYYY hh:mm:ss", - alignEmptyValues = params.alignEmptyValues, - emptyAlign = 0; - - if (typeof moment != "undefined") { - a = moment(a, format); - b = moment(b, format); - - if (!a.isValid()) { - emptyAlign = !b.isValid() ? 0 : -1; - } else if (!b.isValid()) { - emptyAlign = 1; - } else { - //compare valid values - return a - b; - } - - //fix empty values in position - if (alignEmptyValues === "top" && dir === "desc" || alignEmptyValues === "bottom" && dir === "asc") { - emptyAlign *= -1; - } - - return emptyAlign; - } else { - console.error("Sort Error - 'datetime' sorter is dependant on moment.js"); - } - }, - - //sort booleans - boolean: function boolean(a, b, aRow, bRow, column, dir, params) { - var el1 = a === true || a === "true" || a === "True" || a === 1 ? 1 : 0; - var el2 = b === true || b === "true" || b === "True" || b === 1 ? 1 : 0; - - return el1 - el2; - }, - - //sort if element contains any data - array: function array(a, b, aRow, bRow, column, dir, params) { - var el1 = 0; - var el2 = 0; - var type = params.type || "length"; - var alignEmptyValues = params.alignEmptyValues; - var emptyAlign = 0; - - function calc(value) { - - switch (type) { - case "length": - return value.length; - break; - - case "sum": - return value.reduce(function (c, d) { - return c + d; - }); - break; - - case "max": - return Math.max.apply(null, value); - break; - - case "min": - return Math.min.apply(null, value); - break; - - case "avg": - return value.reduce(function (c, d) { - return c + d; - }) / value.length; - break; - } - } - - //handle non array values - if (!Array.isArray(a)) { - alignEmptyValues = !Array.isArray(b) ? 0 : -1; - } else if (!Array.isArray(b)) { - alignEmptyValues = 1; - } else { - - //compare valid values - el1 = a ? calc(a) : 0; - el2 = b ? calc(b) : 0; - - return el1 - el2; - } - - //fix empty values in position - if (alignEmptyValues === "top" && dir === "desc" || alignEmptyValues === "bottom" && dir === "asc") { - emptyAlign *= -1; - } - - return emptyAlign; - }, - - //sort if element contains any data - exists: function exists(a, b, aRow, bRow, column, dir, params) { - var el1 = typeof a == "undefined" ? 0 : 1; - var el2 = typeof b == "undefined" ? 0 : 1; - - return el1 - el2; - }, - - //sort alpha numeric strings - alphanum: function alphanum(as, bs, aRow, bRow, column, dir, params) { - var a, - b, - a1, - b1, - i = 0, - L, - rx = /(\d+)|(\D+)/g, - rd = /\d/; - var alignEmptyValues = params.alignEmptyValues; - var emptyAlign = 0; - - //handle empty values - if (!as && as !== 0) { - emptyAlign = !bs && bs !== 0 ? 0 : -1; - } else if (!bs && bs !== 0) { - emptyAlign = 1; - } else { - - if (isFinite(as) && isFinite(bs)) return as - bs; - a = String(as).toLowerCase(); - b = String(bs).toLowerCase(); - if (a === b) return 0; - if (!(rd.test(a) && rd.test(b))) return a > b ? 1 : -1; - a = a.match(rx); - b = b.match(rx); - L = a.length > b.length ? b.length : a.length; - while (i < L) { - a1 = a[i]; - b1 = b[i++]; - if (a1 !== b1) { - if (isFinite(a1) && isFinite(b1)) { - if (a1.charAt(0) === "0") a1 = "." + a1; - if (b1.charAt(0) === "0") b1 = "." + b1; - return a1 - b1; - } else return a1 > b1 ? 1 : -1; - } - } - - return a.length > b.length; - } - - //fix empty values in position - if (alignEmptyValues === "top" && dir === "desc" || alignEmptyValues === "bottom" && dir === "asc") { - emptyAlign *= -1; - } - - return emptyAlign; - } -}; - -Tabulator.prototype.registerModule("sort", Sort); \ No newline at end of file diff --git a/Gems/AssetMemoryAnalyzer/External/tabulator-master/dist/js/modules/sort.min.js b/Gems/AssetMemoryAnalyzer/External/tabulator-master/dist/js/modules/sort.min.js deleted file mode 100644 index 5cc1ae4400..0000000000 --- a/Gems/AssetMemoryAnalyzer/External/tabulator-master/dist/js/modules/sort.min.js +++ /dev/null @@ -1,2 +0,0 @@ -/* Tabulator v4.1.2 (c) Oliver Folkerd */ -var _typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Sort=function(t){this.table=t,this.sortList=[],this.changed=!1};Sort.prototype.initializeColumn=function(t,e){var r,o,n=this,s=!1;switch(_typeof(t.definition.sorter)){case"string":n.sorters[t.definition.sorter]?s=n.sorters[t.definition.sorter]:console.warn("Sort Error - No such sorter found: ",t.definition.sorter);break;case"function":s=t.definition.sorter}t.modules.sort={sorter:s,dir:"none",params:t.definition.sorterParams||{},startingDir:t.definition.headerSortStartingDir||"asc"},!1!==t.definition.headerSort&&(r=t.getElement(),r.classList.add("tabulator-sortable"),o=document.createElement("div"),o.classList.add("tabulator-arrow"),e.appendChild(o),r.addEventListener("click",function(e){var r="",o=[],s=!1;t.modules.sort&&(r="asc"==t.modules.sort.dir?"desc":"desc"==t.modules.sort.dir?"asc":t.modules.sort.startingDir,n.table.options.columnHeaderSortMulti&&(e.shiftKey||e.ctrlKey)?(o=n.getSort(),s=o.findIndex(function(e){return e.field===t.getField()}),s>-1?(o[s].dir="asc"==o[s].dir?"desc":"asc",s!=o.length-1&&o.push(o.splice(s,1)[0])):o.push({column:t,dir:r}),n.setSort(o)):n.setSort(t,r),n.table.rowManager.sorterRefresh())}))},Sort.prototype.hasChanged=function(){var t=this.changed;return this.changed=!1,t},Sort.prototype.getSort=function(){var t=this,e=[];return t.sortList.forEach(function(t){t.column&&e.push({column:t.column.getComponent(),field:t.column.getField(),dir:t.dir})}),e},Sort.prototype.setSort=function(t,e){var r=this,o=[];Array.isArray(t)||(t=[{column:t,dir:e}]),t.forEach(function(t){var e;e=r.table.columnManager.findColumn(t.column),e?(t.column=e,o.push(t),r.changed=!0):console.warn("Sort Warning - Sort field does not exist and is being ignored: ",t.column)}),r.sortList=o,this.table.options.persistentSort&&this.table.modExists("persistence",!0)&&this.table.modules.persistence.save("sort")},Sort.prototype.clear=function(){this.setSort([])},Sort.prototype.findSorter=function(t){var e,r=this.table.rowManager.activeRows[0],o="string";if(r&&(r=r.getData(),t.getField()))switch(e=t.getFieldValue(r),void 0===e?"undefined":_typeof(e)){case"undefined":o="string";break;case"boolean":o="boolean";break;default:isNaN(e)||""===e?e.match(/((^[0-9]+[a-z]+)|(^[a-z]+[0-9]+))+$/i)&&(o="alphanum"):o="number"}return this.sorters[o]},Sort.prototype.sort=function(){var t,e=this;t=this.table.options.sortOrderReverse?e.sortList.slice().reverse():e.sortList,e.table.options.dataSorting&&e.table.options.dataSorting.call(e.table,e.getSort()),e.clearColumnHeaders(),e.table.options.ajaxSorting?t.forEach(function(t,r){e.setColumnHeader(t.column,t.dir)}):t.forEach(function(r,o){r.column&&r.column.modules.sort&&(r.column.modules.sort.sorter||(r.column.modules.sort.sorter=e.findSorter(r.column)),e._sortItem(r.column,r.dir,t,o)),e.setColumnHeader(r.column,r.dir)}),e.table.options.dataSorted&&e.table.options.dataSorted.call(e.table,e.getSort(),e.table.rowManager.getComponents(!0))},Sort.prototype.clearColumnHeaders=function(){this.table.columnManager.getRealColumns().forEach(function(t){t.modules.sort&&(t.modules.sort.dir="none",t.getElement().setAttribute("aria-sort","none"))})},Sort.prototype.setColumnHeader=function(t,e){t.modules.sort.dir=e,t.getElement().setAttribute("aria-sort",e)},Sort.prototype._sortItem=function(t,e,r,o){var n=this,s=n.table.rowManager.activeRows,i="function"==typeof t.modules.sort.params?t.modules.sort.params(t.getComponent(),e):t.modules.sort.params;s.sort(function(s,a){var l=n._sortRow(s,a,t,e,i);if(0===l&&o)for(var u=o-1;u>=0&&0===(l=n._sortRow(s,a,r[u].column,r[u].dir,i));u--);return l})},Sort.prototype._sortRow=function(t,e,r,o,n){var s,i,a="asc"==o?t:e,l="asc"==o?e:t;return t=r.getFieldValue(a.getData()),e=r.getFieldValue(l.getData()),t=void 0!==t?t:"",e=void 0!==e?e:"",s=a.getComponent(),i=l.getComponent(),r.modules.sort.sorter.call(this,t,e,s,i,r.getComponent(),o,n)},Sort.prototype.sorters={number:function(t,e,r,o,n,s,i){var a=i.alignEmptyValues,l=0;if(t=parseFloat(String(t).replace(",","")),e=parseFloat(String(e).replace(",","")),isNaN(t))l=isNaN(e)?0:-1;else{if(!isNaN(e))return t-e;l=1}return("top"===a&&"desc"===s||"bottom"===a&&"asc"===s)&&(l*=-1),l},string:function(t,e,r,o,n,s,i){var a,l=i.alignEmptyValues,u=0;if(t){if(e){switch(_typeof(i.locale)){case"boolean":i.locale&&(a=this.table.modules.localize.getLocale());break;case"string":a=i.locale}return String(t).toLowerCase().localeCompare(String(e).toLowerCase(),a)}u=1}else u=e?-1:0;return("top"===l&&"desc"===s||"bottom"===l&&"asc"===s)&&(u*=-1),u},date:function(t,e,r,o,n,s,i){return i.format||(i.format="DD/MM/YYYY"),this.sorters.datetime.call(this,t,e,r,o,n,s,i)},time:function(t,e,r,o,n,s,i){return i.format||(i.format="hh:mm"),this.sorters.datetime.call(this,t,e,r,o,n,s,i)},datetime:function(t,e,r,o,n,s,i){var a=i.format||"DD/MM/YYYY hh:mm:ss",l=i.alignEmptyValues,u=0;if("undefined"!=typeof moment){if(t=moment(t,a),e=moment(e,a),t.isValid()){if(e.isValid())return t-e;u=1}else u=e.isValid()?-1:0;return("top"===l&&"desc"===s||"bottom"===l&&"asc"===s)&&(u*=-1),u}console.error("Sort Error - 'datetime' sorter is dependant on moment.js")},boolean:function(t,e,r,o,n,s,i){return(!0===t||"true"===t||"True"===t||1===t?1:0)-(!0===e||"true"===e||"True"===e||1===e?1:0)},array:function(t,e,r,o,n,s,i){function a(t){switch(c){case"length":return t.length;case"sum":return t.reduce(function(t,e){return t+e});case"max":return Math.max.apply(null,t);case"min":return Math.min.apply(null,t);case"avg":return t.reduce(function(t,e){return t+e})/t.length}}var l=0,u=0,c=i.type||"length",d=i.alignEmptyValues,m=0;if(Array.isArray(t)){if(Array.isArray(e))return l=t?a(t):0,u=e?a(e):0,l-u;d=1}else d=Array.isArray(e)?-1:0;return("top"===d&&"desc"===s||"bottom"===d&&"asc"===s)&&(m*=-1),m},exists:function(t,e,r,o,n,s,i){return(void 0===t?0:1)-(void 0===e?0:1)},alphanum:function(t,e,r,o,n,s,i){var a,l,u,c,d,m=0,f=/(\d+)|(\D+)/g,p=/\d/,g=i.alignEmptyValues,h=0;if(t||0===t){if(e||0===e){if(isFinite(t)&&isFinite(e))return t-e;if(a=String(t).toLowerCase(),l=String(e).toLowerCase(),a===l)return 0;if(!p.test(a)||!p.test(l))return a>l?1:-1;for(a=a.match(f),l=l.match(f),d=a.length>l.length?l.length:a.length;mc?1:-1;return a.length>l.length}h=1}else h=e||0===e?-1:0;return("top"===g&&"desc"===s||"bottom"===g&&"asc"===s)&&(h*=-1),h}},Tabulator.prototype.registerModule("sort",Sort); \ No newline at end of file diff --git a/Gems/AssetMemoryAnalyzer/External/tabulator-master/dist/js/modules/validate.js b/Gems/AssetMemoryAnalyzer/External/tabulator-master/dist/js/modules/validate.js deleted file mode 100644 index dea91a0508..0000000000 --- a/Gems/AssetMemoryAnalyzer/External/tabulator-master/dist/js/modules/validate.js +++ /dev/null @@ -1,212 +0,0 @@ -var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol" ? function (obj) { return typeof obj; } : function (obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; - -/* Tabulator v4.1.2 (c) Oliver Folkerd */ - -var Validate = function Validate(table) { - this.table = table; -}; - -//validate -Validate.prototype.initializeColumn = function (column) { - var self = this, - config = [], - validator; - - if (column.definition.validator) { - - if (Array.isArray(column.definition.validator)) { - column.definition.validator.forEach(function (item) { - validator = self._extractValidator(item); - - if (validator) { - config.push(validator); - } - }); - } else { - validator = this._extractValidator(column.definition.validator); - - if (validator) { - config.push(validator); - } - } - - column.modules.validate = config.length ? config : false; - } -}; - -Validate.prototype._extractValidator = function (value) { - var parts, type, params; - - switch (typeof value === "undefined" ? "undefined" : _typeof(value)) { - case "string": - parts = value.split(":", 2); - type = parts.shift(); - params = parts[0]; - - return this._buildValidator(type, params); - break; - - case "function": - return this._buildValidator(value); - break; - - case "object": - return this._buildValidator(value.type, value.parameters); - break; - } -}; - -Validate.prototype._buildValidator = function (type, params) { - - var func = typeof type == "function" ? type : this.validators[type]; - - if (!func) { - console.warn("Validator Setup Error - No matching validator found:", type); - return false; - } else { - return { - type: typeof type == "function" ? "function" : type, - func: func, - params: params - }; - } -}; - -Validate.prototype.validate = function (validators, cell, value) { - var self = this, - valid = []; - - if (validators) { - validators.forEach(function (item) { - if (!item.func.call(self, cell, value, item.params)) { - valid.push({ - type: item.type, - parameters: item.params - }); - } - }); - } - - return valid.length ? valid : true; -}; - -Validate.prototype.validators = { - - //is integer - integer: function integer(cell, value, parameters) { - if (value === "" || value === null || typeof value === "undefined") { - return true; - } - value = Number(value); - return typeof value === 'number' && isFinite(value) && Math.floor(value) === value; - }, - - //is float - float: function float(cell, value, parameters) { - if (value === "" || value === null || typeof value === "undefined") { - return true; - } - value = Number(value); - return typeof value === 'number' && isFinite(value) && value % 1 !== 0; - }, - - //must be a number - numeric: function numeric(cell, value, parameters) { - if (value === "" || value === null || typeof value === "undefined") { - return true; - } - return !isNaN(value); - }, - - //must be a string - string: function string(cell, value, parameters) { - if (value === "" || value === null || typeof value === "undefined") { - return true; - } - return isNaN(value); - }, - - //maximum value - max: function max(cell, value, parameters) { - if (value === "" || value === null || typeof value === "undefined") { - return true; - } - return parseFloat(value) <= parameters; - }, - - //minimum value - min: function min(cell, value, parameters) { - if (value === "" || value === null || typeof value === "undefined") { - return true; - } - return parseFloat(value) >= parameters; - }, - - //minimum string length - minLength: function minLength(cell, value, parameters) { - if (value === "" || value === null || typeof value === "undefined") { - return true; - } - return String(value).length >= parameters; - }, - - //maximum string length - maxLength: function maxLength(cell, value, parameters) { - if (value === "" || value === null || typeof value === "undefined") { - return true; - } - return String(value).length <= parameters; - }, - - //in provided value list - in: function _in(cell, value, parameters) { - if (value === "" || value === null || typeof value === "undefined") { - return true; - } - if (typeof parameters == "string") { - parameters = parameters.split("|"); - } - - return value === "" || parameters.indexOf(value) > -1; - }, - - //must match provided regex - regex: function regex(cell, value, parameters) { - if (value === "" || value === null || typeof value === "undefined") { - return true; - } - var reg = new RegExp(parameters); - - return reg.test(value); - }, - - //value must be unique in this column - unique: function unique(cell, value, parameters) { - if (value === "" || value === null || typeof value === "undefined") { - return true; - } - var unique = true; - - var cellData = cell.getData(); - var column = cell.getColumn()._getSelf(); - - this.table.rowManager.rows.forEach(function (row) { - var data = row.getData(); - - if (data !== cellData) { - if (value == column.getFieldValue(data)) { - unique = false; - } - } - }); - - return unique; - }, - - //must have a value - required: function required(cell, value, parameters) { - return value !== "" & value !== null && typeof value !== "undefined"; - } -}; - -Tabulator.prototype.registerModule("validate", Validate); \ No newline at end of file diff --git a/Gems/AssetMemoryAnalyzer/External/tabulator-master/dist/js/modules/validate.min.js b/Gems/AssetMemoryAnalyzer/External/tabulator-master/dist/js/modules/validate.min.js deleted file mode 100644 index 443a3fc3f6..0000000000 --- a/Gems/AssetMemoryAnalyzer/External/tabulator-master/dist/js/modules/validate.min.js +++ /dev/null @@ -1,2 +0,0 @@ -/* Tabulator v4.1.2 (c) Oliver Folkerd */ -var _typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Validate=function(t){this.table=t};Validate.prototype.initializeColumn=function(t){var n,i=this,o=[];t.definition.validator&&(Array.isArray(t.definition.validator)?t.definition.validator.forEach(function(t){(n=i._extractValidator(t))&&o.push(n)}):(n=this._extractValidator(t.definition.validator))&&o.push(n),t.modules.validate=!!o.length&&o)},Validate.prototype._extractValidator=function(t){var n,i,o;switch(void 0===t?"undefined":_typeof(t)){case"string":return n=t.split(":",2),i=n.shift(),o=n[0],this._buildValidator(i,o);case"function":return this._buildValidator(t);case"object":return this._buildValidator(t.type,t.parameters)}},Validate.prototype._buildValidator=function(t,n){var i="function"==typeof t?t:this.validators[t];return i?{type:"function"==typeof t?"function":t,func:i,params:n}:(console.warn("Validator Setup Error - No matching validator found:",t),!1)},Validate.prototype.validate=function(t,n,i){var o=this,r=[];return t&&t.forEach(function(t){t.func.call(o,n,i,t.params)||r.push({type:t.type,parameters:t.params})}),!r.length||r},Validate.prototype.validators={integer:function(t,n,i){return""===n||null===n||void 0===n||"number"==typeof(n=Number(n))&&isFinite(n)&&Math.floor(n)===n},float:function(t,n,i){return""===n||null===n||void 0===n||"number"==typeof(n=Number(n))&&isFinite(n)&&n%1!=0},numeric:function(t,n,i){return""===n||null===n||void 0===n||!isNaN(n)},string:function(t,n,i){return""===n||null===n||void 0===n||isNaN(n)},max:function(t,n,i){return""===n||null===n||void 0===n||parseFloat(n)<=i},min:function(t,n,i){return""===n||null===n||void 0===n||parseFloat(n)>=i},minLength:function(t,n,i){return""===n||null===n||void 0===n||String(n).length>=i},maxLength:function(t,n,i){return""===n||null===n||void 0===n||String(n).length<=i},in:function(t,n,i){return""===n||null===n||void 0===n||("string"==typeof i&&(i=i.split("|")),""===n||i.indexOf(n)>-1)},regex:function(t,n,i){return""===n||null===n||void 0===n||new RegExp(i).test(n)},unique:function(t,n,i){if(""===n||null===n||void 0===n)return!0;var o=!0,r=t.getData(),e=t.getColumn()._getSelf();return this.table.rowManager.rows.forEach(function(t){var i=t.getData();i!==r&&n==e.getFieldValue(i)&&(o=!1)}),o},required:function(t,n,i){return""!==n&null!==n&&void 0!==n}},Tabulator.prototype.registerModule("validate",Validate); \ No newline at end of file diff --git a/Gems/AssetMemoryAnalyzer/External/tabulator-master/dist/js/tabulator.js b/Gems/AssetMemoryAnalyzer/External/tabulator-master/dist/js/tabulator.js deleted file mode 100644 index cb271b9fcb..0000000000 --- a/Gems/AssetMemoryAnalyzer/External/tabulator-master/dist/js/tabulator.js +++ /dev/null @@ -1,19704 +0,0 @@ -var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol" ? function (obj) { return typeof obj; } : function (obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; - -/* Tabulator v4.1.2 (c) Oliver Folkerd */ - -;(function (global, factory) { - if ((typeof exports === 'undefined' ? 'undefined' : _typeof(exports)) === 'object' && typeof module !== 'undefined') { - module.exports = factory(); - } else if (typeof define === 'function' && define.amd) { - define(factory); - } else { - global.Tabulator = factory(); - } -})(this, function () { - - 'use strict'; - - // https://tc39.github.io/ecma262/#sec-array.prototype.findIndex - - - if (!Array.prototype.findIndex) { - - Object.defineProperty(Array.prototype, 'findIndex', { - - value: function value(predicate) { - - // 1. Let O be ? ToObject(this value). - - - if (this == null) { - - throw new TypeError('"this" is null or not defined'); - } - - var o = Object(this); - - // 2. Let len be ? ToLength(? Get(O, "length")). - - - var len = o.length >>> 0; - - // 3. If IsCallable(predicate) is false, throw a TypeError exception. - - - if (typeof predicate !== 'function') { - - throw new TypeError('predicate must be a function'); - } - - // 4. If thisArg was supplied, let T be thisArg; else let T be undefined. - - - var thisArg = arguments[1]; - - // 5. Let k be 0. - - - var k = 0; - - // 6. Repeat, while k < len - - - while (k < len) { - - // a. Let Pk be ! ToString(k). - - - // b. Let kValue be ? Get(O, Pk). - - - // c. Let testResult be ToBoolean(? Call(predicate, T, « kValue, k, O »)). - - - // d. If testResult is true, return k. - - - var kValue = o[k]; - - if (predicate.call(thisArg, kValue, k, o)) { - - return k; - } - - // e. Increase k by 1. - - - k++; - } - - // 7. Return -1. - - - return -1; - } - - }); - } - - // https://tc39.github.io/ecma262/#sec-array.prototype.find - - - if (!Array.prototype.find) { - - Object.defineProperty(Array.prototype, 'find', { - - value: function value(predicate) { - - // 1. Let O be ? ToObject(this value). - - - if (this == null) { - - throw new TypeError('"this" is null or not defined'); - } - - var o = Object(this); - - // 2. Let len be ? ToLength(? Get(O, "length")). - - - var len = o.length >>> 0; - - // 3. If IsCallable(predicate) is false, throw a TypeError exception. - - - if (typeof predicate !== 'function') { - - throw new TypeError('predicate must be a function'); - } - - // 4. If thisArg was supplied, let T be thisArg; else let T be undefined. - - - var thisArg = arguments[1]; - - // 5. Let k be 0. - - - var k = 0; - - // 6. Repeat, while k < len - - - while (k < len) { - - // a. Let Pk be ! ToString(k). - - - // b. Let kValue be ? Get(O, Pk). - - - // c. Let testResult be ToBoolean(? Call(predicate, T, « kValue, k, O »)). - - - // d. If testResult is true, return kValue. - - - var kValue = o[k]; - - if (predicate.call(thisArg, kValue, k, o)) { - - return kValue; - } - - // e. Increase k by 1. - - - k++; - } - - // 7. Return undefined. - - - return undefined; - } - - }); - } - - var ColumnManager = function ColumnManager(table) { - - this.table = table; //hold parent table - - - this.headersElement = this.createHeadersElement(); - - this.element = this.createHeaderElement(); //containing element - - - this.rowManager = null; //hold row manager object - - - this.columns = []; // column definition object - - - this.columnsByIndex = []; //columns by index - - - this.columnsByField = []; //columns by field - - - this.scrollLeft = 0; - - this.element.insertBefore(this.headersElement, this.element.firstChild); - }; - - ////////////// Setup Functions ///////////////// - - - ColumnManager.prototype.createHeadersElement = function () { - - var el = document.createElement("div"); - - el.classList.add("tabulator-headers"); - - return el; - }; - - ColumnManager.prototype.createHeaderElement = function () { - - var el = document.createElement("div"); - - el.classList.add("tabulator-header"); - - return el; - }; - - //link to row manager - - - ColumnManager.prototype.setRowManager = function (manager) { - - this.rowManager = manager; - }; - - //return containing element - - - ColumnManager.prototype.getElement = function () { - - return this.element; - }; - - //return header containing element - - - ColumnManager.prototype.getHeadersElement = function () { - - return this.headersElement; - }; - - //scroll horizontally to match table body - - - ColumnManager.prototype.scrollHorizontal = function (left) { - - var hozAdjust = 0, - scrollWidth = this.element.scrollWidth - this.table.element.clientWidth; - - this.element.scrollLeft = left; - - //adjust for vertical scrollbar moving table when present - - - if (left > scrollWidth) { - - hozAdjust = left - scrollWidth; - - this.element.style.marginLeft = -hozAdjust + "px"; - } else { - - this.element.style.marginLeft = 0; - } - - //keep frozen columns fixed in position - - - //this._calcFrozenColumnsPos(hozAdjust + 3); - - - this.scrollLeft = left; - - if (this.table.modExists("frozenColumns")) { - - this.table.modules.frozenColumns.layout(); - } - }; - - ///////////// Column Setup Functions ///////////// - - - ColumnManager.prototype.setColumns = function (cols, row) { - - var self = this; - - while (self.headersElement.firstChild) { - self.headersElement.removeChild(self.headersElement.firstChild); - }self.columns = []; - - self.columnsByIndex = []; - - self.columnsByField = []; - - //reset frozen columns - - - if (self.table.modExists("frozenColumns")) { - - self.table.modules.frozenColumns.reset(); - } - - cols.forEach(function (def, i) { - - self._addColumn(def); - }); - - self._reIndexColumns(); - - if (self.table.options.responsiveLayout && self.table.modExists("responsiveLayout", true)) { - - self.table.modules.responsiveLayout.initialize(); - } - - self.redraw(true); - }; - - ColumnManager.prototype._addColumn = function (definition, before, nextToColumn) { - - var column = new Column(definition, this), - colEl = column.getElement(), - index = nextToColumn ? this.findColumnIndex(nextToColumn) : nextToColumn; - - if (nextToColumn && index > -1) { - - var parentIndex = this.columns.indexOf(nextToColumn.getTopColumn()); - - var nextEl = nextToColumn.getElement(); - - if (before) { - - this.columns.splice(parentIndex, 0, column); - - nextEl.parentNode.insertBefore(colEl, nextEl); - } else { - - this.columns.splice(parentIndex + 1, 0, column); - - nextEl.parentNode.insertBefore(colEl, nextEl.nextSibling); - } - } else { - - if (before) { - - this.columns.unshift(column); - - this.headersElement.insertBefore(column.getElement(), this.headersElement.firstChild); - } else { - - this.columns.push(column); - - this.headersElement.appendChild(column.getElement()); - } - } - - return column; - }; - - ColumnManager.prototype.registerColumnField = function (col) { - - if (col.definition.field) { - - this.columnsByField[col.definition.field] = col; - } - }; - - ColumnManager.prototype.registerColumnPosition = function (col) { - - this.columnsByIndex.push(col); - }; - - ColumnManager.prototype._reIndexColumns = function () { - - this.columnsByIndex = []; - - this.columns.forEach(function (column) { - - column.reRegisterPosition(); - }); - }; - - //ensure column headers take up the correct amount of space in column groups - - - ColumnManager.prototype._verticalAlignHeaders = function () { - - var self = this, - minHeight = 0; - - self.columns.forEach(function (column) { - - var height; - - column.clearVerticalAlign(); - - height = column.getHeight(); - - if (height > minHeight) { - - minHeight = height; - } - }); - - self.columns.forEach(function (column) { - - column.verticalAlign(self.table.options.columnVertAlign, minHeight); - }); - - self.rowManager.adjustTableSize(); - }; - - //////////////// Column Details ///////////////// - - - ColumnManager.prototype.findColumn = function (subject) { - - var self = this; - - if ((typeof subject === 'undefined' ? 'undefined' : _typeof(subject)) == "object") { - - if (subject instanceof Column) { - - //subject is column element - - - return subject; - } else if (subject instanceof ColumnComponent) { - - //subject is public column component - - - return subject._getSelf() || false; - } else if (subject instanceof HTMLElement) { - - //subject is a HTML element of the column header - - - var match = self.columns.find(function (column) { - - return column.element === subject; - }); - - return match || false; - } - } else { - - //subject should be treated as the field name of the column - - - return this.columnsByField[subject] || false; - } - - //catch all for any other type of input - - - return false; - }; - - ColumnManager.prototype.getColumnByField = function (field) { - - return this.columnsByField[field]; - }; - - ColumnManager.prototype.getColumnByIndex = function (index) { - - return this.columnsByIndex[index]; - }; - - ColumnManager.prototype.getColumns = function () { - - return this.columns; - }; - - ColumnManager.prototype.findColumnIndex = function (column) { - - return this.columnsByIndex.findIndex(function (col) { - - return column === col; - }); - }; - - //return all columns that are not groups - - - ColumnManager.prototype.getRealColumns = function () { - - return this.columnsByIndex; - }; - - //travers across columns and call action - - - ColumnManager.prototype.traverse = function (callback) { - - var self = this; - - self.columnsByIndex.forEach(function (column, i) { - - callback(column, i); - }); - }; - - //get defintions of actual columns - - - ColumnManager.prototype.getDefinitions = function (active) { - - var self = this, - output = []; - - self.columnsByIndex.forEach(function (column) { - - if (!active || active && column.visible) { - - output.push(column.getDefinition()); - } - }); - - return output; - }; - - //get full nested definition tree - - - ColumnManager.prototype.getDefinitionTree = function () { - - var self = this, - output = []; - - self.columns.forEach(function (column) { - - output.push(column.getDefinition(true)); - }); - - return output; - }; - - ColumnManager.prototype.getComponents = function (structured) { - - var self = this, - output = [], - columns = structured ? self.columns : self.columnsByIndex; - - columns.forEach(function (column) { - - output.push(column.getComponent()); - }); - - return output; - }; - - ColumnManager.prototype.getWidth = function () { - - var width = 0; - - this.columnsByIndex.forEach(function (column) { - - if (column.visible) { - - width += column.getWidth(); - } - }); - - return width; - }; - - ColumnManager.prototype.moveColumn = function (from, to, after) { - - this._moveColumnInArray(this.columns, from, to, after); - - this._moveColumnInArray(this.columnsByIndex, from, to, after, true); - - if (this.table.options.responsiveLayout && this.table.modExists("responsiveLayout", true)) { - - this.table.modules.responsiveLayout.initialize(); - } - - if (this.table.options.columnMoved) { - - this.table.options.columnMoved.call(this.table, from.getComponent(), this.table.columnManager.getComponents()); - } - - if (this.table.options.persistentLayout && this.table.modExists("persistence", true)) { - - this.table.modules.persistence.save("columns"); - } - }; - - ColumnManager.prototype._moveColumnInArray = function (columns, from, to, after, updateRows) { - - var fromIndex = columns.indexOf(from), - toIndex; - - if (fromIndex > -1) { - - columns.splice(fromIndex, 1); - - toIndex = columns.indexOf(to); - - if (toIndex > -1) { - - if (after) { - - toIndex = toIndex + 1; - } - } else { - - toIndex = fromIndex; - } - - columns.splice(toIndex, 0, from); - - if (updateRows) { - - this.table.rowManager.rows.forEach(function (row) { - - if (row.cells.length) { - - var cell = row.cells.splice(fromIndex, 1)[0]; - - row.cells.splice(toIndex, 0, cell); - } - }); - } - } - }; - - ColumnManager.prototype.scrollToColumn = function (column, position, ifVisible) { - var _this = this; - - var left = 0, - offset = 0, - adjust = 0, - colEl = column.getElement(); - - return new Promise(function (resolve, reject) { - - if (typeof position === "undefined") { - - position = _this.table.options.scrollToColumnPosition; - } - - if (typeof ifVisible === "undefined") { - - ifVisible = _this.table.options.scrollToColumnIfVisible; - } - - if (column.visible) { - - //align to correct position - - - switch (position) { - - case "middle": - - case "center": - - adjust = -_this.element.clientWidth / 2; - - break; - - case "right": - - adjust = colEl.clientWidth - _this.headersElement.clientWidth; - - break; - - } - - //check column visibility - - - if (!ifVisible) { - - offset = colEl.offsetLeft; - - if (offset > 0 && offset + colEl.offsetWidth < _this.element.clientWidth) { - - return false; - } - } - - //calculate scroll position - - - left = colEl.offsetLeft + _this.element.scrollLeft + adjust; - - left = Math.max(Math.min(left, _this.table.rowManager.element.scrollWidth - _this.table.rowManager.element.clientWidth), 0); - - _this.table.rowManager.scrollHorizontal(left); - - _this.scrollHorizontal(left); - - resolve(); - } else { - - console.warn("Scroll Error - Column not visible"); - - reject("Scroll Error - Column not visible"); - } - }); - }; - - //////////////// Cell Management ///////////////// - - - ColumnManager.prototype.generateCells = function (row) { - - var self = this; - - var cells = []; - - self.columnsByIndex.forEach(function (column) { - - cells.push(column.generateCell(row)); - }); - - return cells; - }; - - //////////////// Column Management ///////////////// - - - ColumnManager.prototype.getFlexBaseWidth = function () { - - var self = this, - totalWidth = self.table.element.clientWidth, - //table element width - - - fixedWidth = 0; - - //adjust for vertical scrollbar if present - - - if (self.rowManager.element.scrollHeight > self.rowManager.element.clientHeight) { - - totalWidth -= self.rowManager.element.offsetWidth - self.rowManager.element.clientWidth; - } - - this.columnsByIndex.forEach(function (column) { - - var width, minWidth, colWidth; - - if (column.visible) { - - width = column.definition.width || 0; - - minWidth = typeof column.minWidth == "undefined" ? self.table.options.columnMinWidth : parseInt(column.minWidth); - - if (typeof width == "string") { - - if (width.indexOf("%") > -1) { - - colWidth = totalWidth / 100 * parseInt(width); - } else { - - colWidth = parseInt(width); - } - } else { - - colWidth = width; - } - - fixedWidth += colWidth > minWidth ? colWidth : minWidth; - } - }); - - return fixedWidth; - }; - - ColumnManager.prototype.addColumn = function (definition, before, nextToColumn) { - - var column = this._addColumn(definition, before, nextToColumn); - - this._reIndexColumns(); - - if (this.table.options.responsiveLayout && this.table.modExists("responsiveLayout", true)) { - - this.table.modules.responsiveLayout.initialize(); - } - - if (this.table.modExists("columnCalcs")) { - - this.table.modules.columnCalcs.recalc(this.table.rowManager.activeRows); - } - - this.redraw(); - - if (this.table.modules.layout.getMode() != "fitColumns") { - - column.reinitializeWidth(); - } - - this._verticalAlignHeaders(); - - this.table.rowManager.reinitialize(); - }; - - //remove column from system - - - ColumnManager.prototype.deregisterColumn = function (column) { - - var field = column.getField(), - index; - - //remove from field list - - - if (field) { - - delete this.columnsByField[field]; - } - - //remove from index list - - - index = this.columnsByIndex.indexOf(column); - - if (index > -1) { - - this.columnsByIndex.splice(index, 1); - } - - //remove from column list - - - index = this.columns.indexOf(column); - - if (index > -1) { - - this.columns.splice(index, 1); - } - - if (this.table.options.responsiveLayout && this.table.modExists("responsiveLayout", true)) { - - this.table.modules.responsiveLayout.initialize(); - } - - this.redraw(); - }; - - //redraw columns - - - ColumnManager.prototype.redraw = function (force) { - - if (force) { - - if (Tabulator.prototype.helpers.elVisible(this.element)) { - - this._verticalAlignHeaders(); - } - - this.table.rowManager.resetScroll(); - - this.table.rowManager.reinitialize(); - } - - if (this.table.modules.layout.getMode() == "fitColumns") { - - this.table.modules.layout.layout(); - } else { - - if (force) { - - this.table.modules.layout.layout(); - } else { - - if (this.table.options.responsiveLayout && this.table.modExists("responsiveLayout", true)) { - - this.table.modules.responsiveLayout.update(); - } - } - } - - if (this.table.modExists("frozenColumns")) { - - this.table.modules.frozenColumns.layout(); - } - - if (this.table.modExists("columnCalcs")) { - - this.table.modules.columnCalcs.recalc(this.table.rowManager.activeRows); - } - - if (force) { - - if (this.table.options.persistentLayout && this.table.modExists("persistence", true)) { - - this.table.modules.persistence.save("columns"); - } - - if (this.table.modExists("columnCalcs")) { - - this.table.modules.columnCalcs.redraw(); - } - } - - this.table.footerManager.redraw(); - }; - - //public column object - - var ColumnComponent = function ColumnComponent(column) { - - this._column = column; - - this.type = "ColumnComponent"; - }; - - ColumnComponent.prototype.getElement = function () { - - return this._column.getElement(); - }; - - ColumnComponent.prototype.getDefinition = function () { - - return this._column.getDefinition(); - }; - - ColumnComponent.prototype.getField = function () { - - return this._column.getField(); - }; - - ColumnComponent.prototype.getCells = function () { - - var cells = []; - - this._column.cells.forEach(function (cell) { - - cells.push(cell.getComponent()); - }); - - return cells; - }; - - ColumnComponent.prototype.getVisibility = function () { - - return this._column.visible; - }; - - ColumnComponent.prototype.show = function () { - - if (this._column.isGroup) { - - this._column.columns.forEach(function (column) { - - column.show(); - }); - } else { - - this._column.show(); - } - }; - - ColumnComponent.prototype.hide = function () { - - if (this._column.isGroup) { - - this._column.columns.forEach(function (column) { - - column.hide(); - }); - } else { - - this._column.hide(); - } - }; - - ColumnComponent.prototype.toggle = function () { - - if (this._column.visible) { - - this.hide(); - } else { - - this.show(); - } - }; - - ColumnComponent.prototype.delete = function () { - - this._column.delete(); - }; - - ColumnComponent.prototype.getSubColumns = function () { - - var output = []; - - if (this._column.columns.length) { - - this._column.columns.forEach(function (column) { - - output.push(column.getComponent()); - }); - } - - return output; - }; - - ColumnComponent.prototype.getParentColumn = function () { - - return this._column.parent instanceof Column ? this._column.parent.getComponent() : false; - }; - - ColumnComponent.prototype._getSelf = function () { - - return this._column; - }; - - ColumnComponent.prototype.scrollTo = function () { - - return this._column.table.columnManager.scrollToColumn(this._column); - }; - - ColumnComponent.prototype.getTable = function () { - - return this._column.table; - }; - - ColumnComponent.prototype.headerFilterFocus = function () { - - if (this._column.table.modExists("filter", true)) { - - this._column.table.modules.filter.setHeaderFilterFocus(this._column); - } - }; - - ColumnComponent.prototype.reloadHeaderFilter = function () { - - if (this._column.table.modExists("filter", true)) { - - this._column.table.modules.filter.reloadHeaderFilter(this._column); - } - }; - - ColumnComponent.prototype.setHeaderFilterValue = function (value) { - - if (this._column.table.modExists("filter", true)) { - - this._column.table.modules.filter.setHeaderFilterValue(this._column, value); - } - }; - - var Column = function Column(def, parent) { - - var self = this; - - this.table = parent.table; - - this.definition = def; //column definition - - this.parent = parent; //hold parent object - - this.type = "column"; //type of element - - this.columns = []; //child columns - - this.cells = []; //cells bound to this column - - this.element = this.createElement(); //column header element - - this.contentElement = false; - - this.groupElement = this.createGroupElement(); //column group holder element - - this.isGroup = false; - - this.tooltip = false; //hold column tooltip - - this.hozAlign = ""; //horizontal text alignment - - - //multi dimentional filed handling - - this.field = ""; - - this.fieldStructure = ""; - - this.getFieldValue = ""; - - this.setFieldValue = ""; - - this.setField(this.definition.field); - - this.modules = {}; //hold module variables; - - - this.cellEvents = { - - cellClick: false, - - cellDblClick: false, - - cellContext: false, - - cellTap: false, - - cellDblTap: false, - - cellTapHold: false - - }; - - this.width = null; //column width - - this.minWidth = null; //column minimum width - - this.widthFixed = false; //user has specified a width for this column - - - this.visible = true; //default visible state - - - //initialize column - - if (def.columns) { - - this.isGroup = true; - - def.columns.forEach(function (def, i) { - - var newCol = new Column(def, self); - - self.attachColumn(newCol); - }); - - self.checkColumnVisibility(); - } else { - - parent.registerColumnField(this); - } - - if (def.rowHandle && this.table.options.movableRows !== false && this.table.modExists("moveRow")) { - - this.table.modules.moveRow.setHandle(true); - } - - this._buildHeader(); - }; - - Column.prototype.createElement = function () { - - var el = document.createElement("div"); - - el.classList.add("tabulator-col"); - - el.setAttribute("role", "columnheader"); - - el.setAttribute("aria-sort", "none"); - - return el; - }; - - Column.prototype.createGroupElement = function () { - - var el = document.createElement("div"); - - el.classList.add("tabulator-col-group-cols"); - - return el; - }; - - Column.prototype.setField = function (field) { - - this.field = field; - - this.fieldStructure = field ? this.table.options.nestedFieldSeparator ? field.split(this.table.options.nestedFieldSeparator) : [field] : []; - - this.getFieldValue = this.fieldStructure.length > 1 ? this._getNestedData : this._getFlatData; - - this.setFieldValue = this.fieldStructure.length > 1 ? this._setNesteData : this._setFlatData; - }; - - //register column position with column manager - - Column.prototype.registerColumnPosition = function (column) { - - this.parent.registerColumnPosition(column); - }; - - //register column position with column manager - - Column.prototype.registerColumnField = function (column) { - - this.parent.registerColumnField(column); - }; - - //trigger position registration - - Column.prototype.reRegisterPosition = function () { - - if (this.isGroup) { - - this.columns.forEach(function (column) { - - column.reRegisterPosition(); - }); - } else { - - this.registerColumnPosition(this); - } - }; - - Column.prototype.setTooltip = function () { - - var self = this, - def = self.definition; - - //set header tooltips - - var tooltip = def.headerTooltip || def.tooltip === false ? def.headerTooltip : self.table.options.tooltipsHeader; - - if (tooltip) { - - if (tooltip === true) { - - if (def.field) { - - self.table.modules.localize.bind("columns|" + def.field, function (value) { - - self.element.setAttribute("title", value || def.title); - }); - } else { - - self.element.setAttribute("title", def.title); - } - } else { - - if (typeof tooltip == "function") { - - tooltip = tooltip(self.getComponent()); - - if (tooltip === false) { - - tooltip = ""; - } - } - - self.element.setAttribute("title", tooltip); - } - } else { - - self.element.setAttribute("title", ""); - } - }; - - //build header element - - Column.prototype._buildHeader = function () { - - var self = this, - def = self.definition; - - while (self.element.firstChild) { - self.element.removeChild(self.element.firstChild); - }if (def.headerVertical) { - - self.element.classList.add("tabulator-col-vertical"); - - if (def.headerVertical === "flip") { - - self.element.classList.add("tabulator-col-vertical-flip"); - } - } - - self.contentElement = self._bindEvents(); - - self.contentElement = self._buildColumnHeaderContent(); - - self.element.appendChild(self.contentElement); - - if (self.isGroup) { - - self._buildGroupHeader(); - } else { - - self._buildColumnHeader(); - } - - self.setTooltip(); - - //set resizable handles - - if (self.table.options.resizableColumns && self.table.modExists("resizeColumns")) { - - self.table.modules.resizeColumns.initializeColumn("header", self, self.element); - } - - //set resizable handles - - if (def.headerFilter && self.table.modExists("filter") && self.table.modExists("edit")) { - - if (typeof def.headerFilterPlaceholder !== "undefined" && def.field) { - - self.table.modules.localize.setHeaderFilterColumnPlaceholder(def.field, def.headerFilterPlaceholder); - } - - self.table.modules.filter.initializeColumn(self); - } - - //set resizable handles - - if (self.table.modExists("frozenColumns")) { - - self.table.modules.frozenColumns.initializeColumn(self); - } - - //set movable column - - if (self.table.options.movableColumns && !self.isGroup && self.table.modExists("moveColumn")) { - - self.table.modules.moveColumn.initializeColumn(self); - } - - //set calcs column - - if ((def.topCalc || def.bottomCalc) && self.table.modExists("columnCalcs")) { - - self.table.modules.columnCalcs.initializeColumn(self); - } - - //update header tooltip on mouse enter - - self.element.addEventListener("mouseenter", function (e) { - - self.setTooltip(); - }); - }; - - Column.prototype._bindEvents = function () { - - var self = this, - def = self.definition, - dblTap, - tapHold, - tap; - - //setup header click event bindings - - if (typeof def.headerClick == "function") { - - self.element.addEventListener("click", function (e) { - def.headerClick(e, self.getComponent()); - }); - } - - if (typeof def.headerDblClick == "function") { - - self.element.addEventListener("dblclick", function (e) { - def.headerDblClick(e, self.getComponent()); - }); - } - - if (typeof def.headerContext == "function") { - - self.element.addEventListener("contextmenu", function (e) { - def.headerContext(e, self.getComponent()); - }); - } - - //setup header tap event bindings - - if (typeof def.headerTap == "function") { - - tap = false; - - self.element.addEventListener("touchstart", function (e) { - - tap = true; - }); - - self.element.addEventListener("touchend", function (e) { - - if (tap) { - - def.headerTap(e, self.getComponent()); - } - - tap = false; - }); - } - - if (typeof def.headerDblTap == "function") { - - dblTap = null; - - self.element.addEventListener("touchend", function (e) { - - if (dblTap) { - - clearTimeout(dblTap); - - dblTap = null; - - def.headerDblTap(e, self.getComponent()); - } else { - - dblTap = setTimeout(function () { - - clearTimeout(dblTap); - - dblTap = null; - }, 300); - } - }); - } - - if (typeof def.headerTapHold == "function") { - - tapHold = null; - - self.element.addEventListener("touchstart", function (e) { - - clearTimeout(tapHold); - - tapHold = setTimeout(function () { - - clearTimeout(tapHold); - - tapHold = null; - - tap = false; - - def.headerTapHold(e, self.getComponent()); - }, 1000); - }); - - self.element.addEventListener("touchend", function (e) { - - clearTimeout(tapHold); - - tapHold = null; - }); - } - - //store column cell click event bindings - - if (typeof def.cellClick == "function") { - - self.cellEvents.cellClick = def.cellClick; - } - - if (typeof def.cellDblClick == "function") { - - self.cellEvents.cellDblClick = def.cellDblClick; - } - - if (typeof def.cellContext == "function") { - - self.cellEvents.cellContext = def.cellContext; - } - - //setup column cell tap event bindings - - if (typeof def.cellTap == "function") { - - self.cellEvents.cellTap = def.cellTap; - } - - if (typeof def.cellDblTap == "function") { - - self.cellEvents.cellDblTap = def.cellDblTap; - } - - if (typeof def.cellTapHold == "function") { - - self.cellEvents.cellTapHold = def.cellTapHold; - } - - //setup column cell edit callbacks - - if (typeof def.cellEdited == "function") { - - self.cellEvents.cellEdited = def.cellEdited; - } - - if (typeof def.cellEditing == "function") { - - self.cellEvents.cellEditing = def.cellEditing; - } - - if (typeof def.cellEditCancelled == "function") { - - self.cellEvents.cellEditCancelled = def.cellEditCancelled; - } - }; - - //build header element for header - - Column.prototype._buildColumnHeader = function () { - - var self = this, - def = self.definition, - table = self.table, - sortable; - - //set column sorter - - if (table.modExists("sort")) { - - table.modules.sort.initializeColumn(self, self.contentElement); - } - - //set column formatter - - if (table.modExists("format")) { - - table.modules.format.initializeColumn(self); - } - - //set column editor - - if (typeof def.editor != "undefined" && table.modExists("edit")) { - - table.modules.edit.initializeColumn(self); - } - - //set colum validator - - if (typeof def.validator != "undefined" && table.modExists("validate")) { - - table.modules.validate.initializeColumn(self); - } - - //set column mutator - - if (table.modExists("mutator")) { - - table.modules.mutator.initializeColumn(self); - } - - //set column accessor - - if (table.modExists("accessor")) { - - table.modules.accessor.initializeColumn(self); - } - - //set respoviveLayout - - if (_typeof(table.options.responsiveLayout) && table.modExists("responsiveLayout")) { - - table.modules.responsiveLayout.initializeColumn(self); - } - - //set column visibility - - if (typeof def.visible != "undefined") { - - if (def.visible) { - - self.show(true); - } else { - - self.hide(true); - } - } - - //asign additional css classes to column header - - if (def.cssClass) { - - self.element.classList.add(def.cssClass); - } - - if (def.field) { - - this.element.setAttribute("tabulator-field", def.field); - } - - //set min width if present - - self.setMinWidth(typeof def.minWidth == "undefined" ? self.table.options.columnMinWidth : def.minWidth); - - self.reinitializeWidth(); - - //set tooltip if present - - self.tooltip = self.definition.tooltip || self.definition.tooltip === false ? self.definition.tooltip : self.table.options.tooltips; - - //set orizontal text alignment - - self.hozAlign = typeof self.definition.align == "undefined" ? "" : self.definition.align; - }; - - Column.prototype._buildColumnHeaderContent = function () { - - var self = this, - def = self.definition, - table = self.table; - - var contentElement = document.createElement("div"); - - contentElement.classList.add("tabulator-col-content"); - - contentElement.appendChild(self._buildColumnHeaderTitle()); - - return contentElement; - }; - - //build title element of column - - Column.prototype._buildColumnHeaderTitle = function () { - - var self = this, - def = self.definition, - table = self.table, - title; - - var titleHolderElement = document.createElement("div"); - - titleHolderElement.classList.add("tabulator-col-title"); - - if (def.editableTitle) { - - var titleElement = document.createElement("input"); - - titleElement.classList.add("tabulator-title-editor"); - - titleElement.addEventListener("click", function (e) { - - e.stopPropagation(); - - titleElement.focus(); - }); - - titleElement.addEventListener("change", function () { - - def.title = titleElement.value; - - table.options.columnTitleChanged.call(self.table, self.getComponent()); - }); - - titleHolderElement.appendChild(titleElement); - - if (def.field) { - - table.modules.localize.bind("columns|" + def.field, function (text) { - - titleElement.value = text || def.title || " "; - }); - } else { - - titleElement.value = def.title || " "; - } - } else { - - if (def.field) { - - table.modules.localize.bind("columns|" + def.field, function (text) { - - self._formatColumnHeaderTitle(titleHolderElement, text || def.title || " "); - }); - } else { - - self._formatColumnHeaderTitle(titleHolderElement, def.title || " "); - } - } - - return titleHolderElement; - }; - - Column.prototype._formatColumnHeaderTitle = function (el, title) { - - var formatter, contents, params, mockCell; - - if (this.definition.titleFormatter && this.table.modExists("format")) { - - formatter = this.table.modules.format.getFormatter(this.definition.titleFormatter); - - mockCell = { - - getValue: function getValue() { - - return title; - }, - - getElement: function getElement() { - - return el; - } - - }; - - params = this.definition.titleFormatterParams || {}; - - params = typeof params === "function" ? params() : params; - - contents = formatter.call(this.table.modules.format, mockCell, params); - - switch (typeof contents === 'undefined' ? 'undefined' : _typeof(contents)) { - - case "object": - - if (contents instanceof Node) { - - this.element.appendChild(contents); - } else { - - this.element.innerHTML = ""; - - console.warn("Format Error - Title formatter has returned a type of object, the only valid formatter object return is an instance of Node, the formatter returned:", contents); - } - - break; - - case "undefined": - - case "null": - - this.element.innerHTML = ""; - - break; - - default: - - this.element.innerHTML = contents; - - } - } else { - - el.innerHTML = title; - } - }; - - //build header element for column group - - Column.prototype._buildGroupHeader = function () { - - this.element.classList.add("tabulator-col-group"); - - this.element.setAttribute("role", "columngroup"); - - this.element.setAttribute("aria-title", this.definition.title); - - this.element.appendChild(this.groupElement); - }; - - //flat field lookup - - Column.prototype._getFlatData = function (data) { - - return data[this.field]; - }; - - //nested field lookup - - Column.prototype._getNestedData = function (data) { - - var dataObj = data, - structure = this.fieldStructure, - length = structure.length, - output; - - for (var i = 0; i < length; i++) { - - dataObj = dataObj[structure[i]]; - - output = dataObj; - - if (!dataObj) { - - break; - } - } - - return output; - }; - - //flat field set - - Column.prototype._setFlatData = function (data, value) { - - data[this.field] = value; - }; - - //nested field set - - Column.prototype._setNesteData = function (data, value) { - - var dataObj = data, - structure = this.fieldStructure, - length = structure.length; - - for (var i = 0; i < length; i++) { - - if (i == length - 1) { - - dataObj[structure[i]] = value; - } else { - - if (!dataObj[structure[i]]) { - - dataObj[structure[i]] = {}; - } - - dataObj = dataObj[structure[i]]; - } - } - }; - - //attach column to this group - - Column.prototype.attachColumn = function (column) { - - var self = this; - - if (self.groupElement) { - - self.columns.push(column); - - self.groupElement.appendChild(column.getElement()); - } else { - - console.warn("Column Warning - Column being attached to another column instead of column group"); - } - }; - - //vertically align header in column - - Column.prototype.verticalAlign = function (alignment, height) { - - //calculate height of column header and group holder element - - var parentHeight = this.parent.isGroup ? this.parent.getGroupElement().clientHeight : height || this.parent.getHeadersElement().clientHeight; - - // var parentHeight = this.parent.isGroup ? this.parent.getGroupElement().clientHeight : this.parent.getHeadersElement().clientHeight; - - - this.element.style.height = parentHeight + "px"; - - if (this.isGroup) { - - this.groupElement.style.minHeight = parentHeight - this.contentElement.offsetHeight + "px"; - } - - //vertically align cell contents - - if (!this.isGroup && alignment !== "top") { - - if (alignment === "bottom") { - - this.element.style.paddingTop = this.element.clientHeight - this.contentElement.offsetHeight + "px"; - } else { - - this.element.style.paddingTop = (this.element.clientHeight - this.contentElement.offsetHeight) / 2 + "px"; - } - } - - this.columns.forEach(function (column) { - - column.verticalAlign(alignment); - }); - }; - - //clear vertical alignmenet - - Column.prototype.clearVerticalAlign = function () { - - this.element.style.paddingTop = ""; - - this.element.style.height = ""; - - this.element.style.minHeight = ""; - - this.columns.forEach(function (column) { - - column.clearVerticalAlign(); - }); - }; - - //// Retreive Column Information //// - - - //return column header element - - Column.prototype.getElement = function () { - - return this.element; - }; - - //return colunm group element - - Column.prototype.getGroupElement = function () { - - return this.groupElement; - }; - - //return field name - - Column.prototype.getField = function () { - - return this.field; - }; - - //return the first column in a group - - Column.prototype.getFirstColumn = function () { - - if (!this.isGroup) { - - return this; - } else { - - if (this.columns.length) { - - return this.columns[0].getFirstColumn(); - } else { - - return false; - } - } - }; - - //return the last column in a group - - Column.prototype.getLastColumn = function () { - - if (!this.isGroup) { - - return this; - } else { - - if (this.columns.length) { - - return this.columns[this.columns.length - 1].getLastColumn(); - } else { - - return false; - } - } - }; - - //return all columns in a group - - Column.prototype.getColumns = function () { - - return this.columns; - }; - - //return all columns in a group - - Column.prototype.getCells = function () { - - return this.cells; - }; - - //retreive the top column in a group of columns - - Column.prototype.getTopColumn = function () { - - if (this.parent.isGroup) { - - return this.parent.getTopColumn(); - } else { - - return this; - } - }; - - //return column definition object - - Column.prototype.getDefinition = function (updateBranches) { - - var colDefs = []; - - if (this.isGroup && updateBranches) { - - this.columns.forEach(function (column) { - - colDefs.push(column.getDefinition(true)); - }); - - this.definition.columns = colDefs; - } - - return this.definition; - }; - - //////////////////// Actions //////////////////// - - - Column.prototype.checkColumnVisibility = function () { - - var visible = false; - - this.columns.forEach(function (column) { - - if (column.visible) { - - visible = true; - } - }); - - if (visible) { - - this.show(); - - this.parent.table.options.columnVisibilityChanged.call(this.table, this.getComponent(), false); - } else { - - this.hide(); - } - }; - - //show column - - Column.prototype.show = function (silent, responsiveToggle) { - - if (!this.visible) { - - this.visible = true; - - this.element.style.display = ""; - - this.table.columnManager._verticalAlignHeaders(); - - if (this.parent.isGroup) { - - this.parent.checkColumnVisibility(); - } - - this.cells.forEach(function (cell) { - - cell.show(); - }); - - if (this.table.options.persistentLayout && this.table.modExists("responsiveLayout", true)) { - - this.table.modules.persistence.save("columns"); - } - - if (!responsiveToggle && this.table.options.responsiveLayout && this.table.modExists("responsiveLayout", true)) { - - this.table.modules.responsiveLayout.updateColumnVisibility(this, this.visible); - } - - if (!silent) { - - this.table.options.columnVisibilityChanged.call(this.table, this.getComponent(), true); - } - } - }; - - //hide column - - Column.prototype.hide = function (silent, responsiveToggle) { - - if (this.visible) { - - this.visible = false; - - this.element.style.display = "none"; - - this.table.columnManager._verticalAlignHeaders(); - - if (this.parent.isGroup) { - - this.parent.checkColumnVisibility(); - } - - this.cells.forEach(function (cell) { - - cell.hide(); - }); - - if (this.table.options.persistentLayout && this.table.modExists("persistence", true)) { - - this.table.modules.persistence.save("columns"); - } - - if (!responsiveToggle && this.table.options.responsiveLayout && this.table.modExists("responsiveLayout", true)) { - - this.table.modules.responsiveLayout.updateColumnVisibility(this, this.visible); - } - - if (!silent) { - - this.table.options.columnVisibilityChanged.call(this.table, this.getComponent(), false); - } - } - }; - - Column.prototype.matchChildWidths = function () { - - var childWidth = 0; - - if (this.contentElement && this.columns.length) { - - this.columns.forEach(function (column) { - - childWidth += column.getWidth(); - }); - - this.contentElement.style.maxWidth = childWidth - 1 + "px"; - } - }; - - Column.prototype.setWidth = function (width) { - - this.widthFixed = true; - - this.setWidthActual(width); - }; - - Column.prototype.setWidthActual = function (width) { - - if (isNaN(width)) { - - width = Math.floor(this.table.element.clientWidth / 100 * parseInt(width)); - } - - width = Math.max(this.minWidth, width); - - this.width = width; - - this.element.style.width = width ? width + "px" : ""; - - if (!this.isGroup) { - - this.cells.forEach(function (cell) { - - cell.setWidth(width); - }); - } - - if (this.parent.isGroup) { - - this.parent.matchChildWidths(); - } - - //set resizable handles - - if (this.table.modExists("frozenColumns")) { - - this.table.modules.frozenColumns.layout(); - } - }; - - Column.prototype.checkCellHeights = function () { - - var rows = []; - - this.cells.forEach(function (cell) { - - if (cell.row.heightInitialized) { - - if (cell.row.getElement().offsetParent !== null) { - - rows.push(cell.row); - - cell.row.clearCellHeight(); - } else { - - cell.row.heightInitialized = false; - } - } - }); - - rows.forEach(function (row) { - - row.calcHeight(); - }); - - rows.forEach(function (row) { - - row.setCellHeight(); - }); - }; - - Column.prototype.getWidth = function () { - - // return this.element.offsetWidth; - - return this.width; - }; - - Column.prototype.getHeight = function () { - - return this.element.offsetHeight; - }; - - Column.prototype.setMinWidth = function (minWidth) { - - this.minWidth = minWidth; - - this.element.style.minWidth = minWidth ? minWidth + "px" : ""; - - this.cells.forEach(function (cell) { - - cell.setMinWidth(minWidth); - }); - }; - - Column.prototype.delete = function () { - - if (this.isGroup) { - - this.columns.forEach(function (column) { - - column.delete(); - }); - } - - var cellCount = this.cells.length; - - for (var i = 0; i < cellCount; i++) { - - this.cells[0].delete(); - } - - this.element.parentNode.removeChild(this.element); - - this.table.columnManager.deregisterColumn(this); - }; - - //////////////// Cell Management ///////////////// - - - //generate cell for this column - - Column.prototype.generateCell = function (row) { - - var self = this; - - var cell = new Cell(self, row); - - this.cells.push(cell); - - return cell; - }; - - Column.prototype.reinitializeWidth = function (force) { - - this.widthFixed = false; - - //set width if present - - if (typeof this.definition.width !== "undefined" && !force) { - - this.setWidth(this.definition.width); - } - - //hide header filters to prevent them altering column width - - if (this.table.modExists("filter")) { - - this.table.modules.filter.hideHeaderFilterElements(); - } - - this.fitToData(); - - //show header filters again after layout is complete - - if (this.table.modExists("filter")) { - - this.table.modules.filter.showHeaderFilterElements(); - } - }; - - //set column width to maximum cell width - - Column.prototype.fitToData = function () { - - var self = this; - - if (!this.widthFixed) { - - this.element.width = ""; - - self.cells.forEach(function (cell) { - - cell.setWidth(""); - }); - } - - var maxWidth = this.element.offsetWidth; - - if (!self.width || !this.widthFixed) { - - self.cells.forEach(function (cell) { - - var width = cell.getWidth(); - - if (width > maxWidth) { - - maxWidth = width; - } - }); - - if (maxWidth) { - - self.setWidthActual(maxWidth + 1); - } - } - }; - - Column.prototype.deleteCell = function (cell) { - - var index = this.cells.indexOf(cell); - - if (index > -1) { - - this.cells.splice(index, 1); - } - }; - - //////////////// Event Bindings ///////////////// - - - //////////////// Object Generation ///////////////// - - Column.prototype.getComponent = function () { - - return new ColumnComponent(this); - }; - - var RowManager = function RowManager(table) { - - this.table = table; - - this.element = this.createHolderElement(); //containing element - - this.tableElement = this.createTableElement(); //table element - - this.columnManager = null; //hold column manager object - - this.height = 0; //hold height of table element - - - this.firstRender = false; //handle first render - - this.renderMode = "classic"; //current rendering mode - - - this.rows = []; //hold row data objects - - this.activeRows = []; //rows currently available to on display in the table - - this.activeRowsCount = 0; //count of active rows - - - this.displayRows = []; //rows currently on display in the table - - this.displayRowsCount = 0; //count of display rows - - - this.scrollTop = 0; - - this.scrollLeft = 0; - - this.vDomRowHeight = 20; //approximation of row heights for padding - - - this.vDomTop = 0; //hold position for first rendered row in the virtual DOM - - this.vDomBottom = 0; //hold possition for last rendered row in the virtual DOM - - - this.vDomScrollPosTop = 0; //last scroll position of the vDom top; - - this.vDomScrollPosBottom = 0; //last scroll position of the vDom bottom; - - - this.vDomTopPad = 0; //hold value of padding for top of virtual DOM - - this.vDomBottomPad = 0; //hold value of padding for bottom of virtual DOM - - - this.vDomMaxRenderChain = 90; //the maximum number of dom elements that can be rendered in 1 go - - - this.vDomWindowBuffer = 0; //window row buffer before removing elements, to smooth scrolling - - - this.vDomWindowMinTotalRows = 20; //minimum number of rows to be generated in virtual dom (prevent buffering issues on tables with tall rows) - - this.vDomWindowMinMarginRows = 5; //minimum number of rows to be generated in virtual dom margin - - - this.vDomTopNewRows = []; //rows to normalize after appending to optimize render speed - - this.vDomBottomNewRows = []; //rows to normalize after appending to optimize render speed - }; - - //////////////// Setup Functions ///////////////// - - - RowManager.prototype.createHolderElement = function () { - - var el = document.createElement("div"); - - el.classList.add("tabulator-tableHolder"); - - el.setAttribute("tabindex", 0); - - return el; - }; - - RowManager.prototype.createTableElement = function () { - - var el = document.createElement("div"); - - el.classList.add("tabulator-table"); - - return el; - }; - - //return containing element - - RowManager.prototype.getElement = function () { - - return this.element; - }; - - //return table element - - RowManager.prototype.getTableElement = function () { - - return this.tableElement; - }; - - //return position of row in table - - RowManager.prototype.getRowPosition = function (row, active) { - - if (active) { - - return this.activeRows.indexOf(row); - } else { - - return this.rows.indexOf(row); - } - }; - - //link to column manager - - RowManager.prototype.setColumnManager = function (manager) { - - this.columnManager = manager; - }; - - RowManager.prototype.initialize = function () { - - var self = this; - - self.setRenderMode(); - - //initialize manager - - self.element.appendChild(self.tableElement); - - self.firstRender = true; - - //scroll header along with table body - - self.element.addEventListener("scroll", function () { - - var left = self.element.scrollLeft; - - //handle horizontal scrolling - - if (self.scrollLeft != left) { - - self.columnManager.scrollHorizontal(left); - - if (self.table.options.groupBy) { - - self.table.modules.groupRows.scrollHeaders(left); - } - - if (self.table.modExists("columnCalcs")) { - - self.table.modules.columnCalcs.scrollHorizontal(left); - } - } - - self.scrollLeft = left; - }); - - //handle virtual dom scrolling - - if (this.renderMode === "virtual") { - - self.element.addEventListener("scroll", function () { - - var top = self.element.scrollTop; - - var dir = self.scrollTop > top; - - //handle verical scrolling - - if (self.scrollTop != top) { - - self.scrollTop = top; - - self.scrollVertical(dir); - - if (self.table.options.ajaxProgressiveLoad == "scroll") { - - self.table.modules.ajax.nextPage(self.element.scrollHeight - self.element.clientHeight - top); - } - } else { - - self.scrollTop = top; - } - }); - } - }; - - ////////////////// Row Manipulation ////////////////// - - - RowManager.prototype.findRow = function (subject) { - - var self = this; - - if ((typeof subject === 'undefined' ? 'undefined' : _typeof(subject)) == "object") { - - if (subject instanceof Row) { - - //subject is row element - - return subject; - } else if (subject instanceof RowComponent) { - - //subject is public row component - - return subject._getSelf() || false; - } else if (subject instanceof HTMLElement) { - - //subject is a HTML element of the row - - var match = self.rows.find(function (row) { - - return row.element === subject; - }); - - return match || false; - } - } else if (typeof subject == "undefined" || subject === null) { - - return false; - } else { - - //subject should be treated as the index of the row - - var _match = self.rows.find(function (row) { - - return row.data[self.table.options.index] == subject; - }); - - return _match || false; - } - - //catch all for any other type of input - - - return false; - }; - - RowManager.prototype.getRowFromPosition = function (position, active) { - - if (active) { - - return this.activeRows[position]; - } else { - - return this.rows[position]; - } - }; - - RowManager.prototype.scrollToRow = function (row, position, ifVisible) { - var _this2 = this; - - var rowIndex = this.getDisplayRows().indexOf(row), - rowEl = row.getElement(), - rowTop, - offset = 0; - - return new Promise(function (resolve, reject) { - - if (rowIndex > -1) { - - if (typeof position === "undefined") { - - position = _this2.table.options.scrollToRowPosition; - } - - if (typeof ifVisible === "undefined") { - - ifVisible = _this2.table.options.scrollToRowIfVisible; - } - - if (position === "nearest") { - - switch (_this2.renderMode) { - - case "classic": - - rowTop = Tabulator.prototype.helpers.elOffset(rowEl).top; - - position = Math.abs(_this2.element.scrollTop - rowTop) > Math.abs(_this2.element.scrollTop + _this2.element.clientHeight - rowTop) ? "bottom" : "top"; - - break; - - case "virtual": - - position = Math.abs(_this2.vDomTop - rowIndex) > Math.abs(_this2.vDomBottom - rowIndex) ? "bottom" : "top"; - - break; - - } - } - - //check row visibility - - if (!ifVisible) { - - if (Tabulator.prototype.helpers.elVisible(rowEl)) { - - offset = Tabulator.prototype.helpers.elOffset(rowEl).top - Tabulator.prototype.helpers.elOffset(_this2.element).top; - - if (offset > 0 && offset < _this2.element.clientHeight - rowEl.offsetHeight) { - - return false; - } - } - } - - //scroll to row - - switch (_this2.renderMode) { - - case "classic": - - _this2.element.scrollTop = Tabulator.prototype.helpers.elOffset(rowEl).top - Tabulator.prototype.helpers.elOffset(_this2.element).top + _this2.element.scrollTop; - - break; - - case "virtual": - - _this2._virtualRenderFill(rowIndex, true); - - break; - - } - - //align to correct position - - switch (position) { - - case "middle": - - case "center": - - _this2.element.scrollTop = _this2.element.scrollTop - _this2.element.clientHeight / 2; - - break; - - case "bottom": - - _this2.element.scrollTop = _this2.element.scrollTop - _this2.element.clientHeight + rowEl.offsetHeight; - - break; - - } - - resolve(); - } else { - - console.warn("Scroll Error - Row not visible"); - - reject("Scroll Error - Row not visible"); - } - }); - }; - - ////////////////// Data Handling ////////////////// - - - RowManager.prototype.setData = function (data, renderInPosition) { - var _this3 = this; - - var self = this; - - return new Promise(function (resolve, reject) { - - if (renderInPosition && _this3.getDisplayRows().length) { - - if (self.table.options.pagination) { - - self._setDataActual(data, true); - } else { - - _this3.reRenderInPosition(function () { - - self._setDataActual(data); - }); - } - } else { - - _this3.resetScroll(); - - _this3._setDataActual(data); - } - - resolve(); - }); - }; - - RowManager.prototype._setDataActual = function (data, renderInPosition) { - - var self = this; - - self.table.options.dataLoading.call(this.table, data); - - self.rows.forEach(function (row) { - - row.wipe(); - }); - - self.rows = []; - - if (this.table.options.history && this.table.modExists("history")) { - - this.table.modules.history.clear(); - } - - if (Array.isArray(data)) { - - if (this.table.modExists("selectRow")) { - - this.table.modules.selectRow.clearSelectionData(); - } - - data.forEach(function (def, i) { - - if (def && (typeof def === 'undefined' ? 'undefined' : _typeof(def)) === "object") { - - var row = new Row(def, self); - - self.rows.push(row); - } else { - - console.warn("Data Loading Warning - Invalid row data detected and ignored, expecting object but received:", def); - } - }); - - self.table.options.dataLoaded.call(this.table, data); - - self.refreshActiveData(false, false, renderInPosition); - } else { - - console.error("Data Loading Error - Unable to process data due to invalid data type \nExpecting: array \nReceived: ", typeof data === 'undefined' ? 'undefined' : _typeof(data), "\nData: ", data); - } - }; - - RowManager.prototype.deleteRow = function (row) { - - var allIndex = this.rows.indexOf(row), - activeIndex = this.activeRows.indexOf(row); - - if (activeIndex > -1) { - - this.activeRows.splice(activeIndex, 1); - } - - if (allIndex > -1) { - - this.rows.splice(allIndex, 1); - } - - this.setActiveRows(this.activeRows); - - this.displayRowIterator(function (rows) { - - var displayIndex = rows.indexOf(row); - - if (displayIndex > -1) { - - rows.splice(displayIndex, 1); - } - }); - - this.reRenderInPosition(); - - this.table.options.rowDeleted.call(this.table, row.getComponent()); - - this.table.options.dataEdited.call(this.table, this.getData()); - - if (this.table.options.groupBy && this.table.modExists("groupRows")) { - - this.table.modules.groupRows.updateGroupRows(true); - } else if (this.table.options.pagination && this.table.modExists("page")) { - - this.refreshActiveData(false, false, true); - } else { - - if (this.table.options.pagination && this.table.modExists("page")) { - - this.refreshActiveData("page"); - } - } - }; - - RowManager.prototype.addRow = function (data, pos, index, blockRedraw) { - - var row = this.addRowActual(data, pos, index, blockRedraw); - - if (this.table.options.history && this.table.modExists("history")) { - - this.table.modules.history.action("rowAdd", row, { data: data, pos: pos, index: index }); - } - - return row; - }; - - //add multiple rows - - RowManager.prototype.addRows = function (data, pos, index) { - var _this4 = this; - - var self = this, - length = 0, - rows = []; - - return new Promise(function (resolve, reject) { - - pos = _this4.findAddRowPos(pos); - - if (!Array.isArray(data)) { - - data = [data]; - } - - length = data.length - 1; - - if (typeof index == "undefined" && pos || typeof index !== "undefined" && !pos) { - - data.reverse(); - } - - data.forEach(function (item, i) { - - var row = self.addRow(item, pos, index, true); - - rows.push(row); - }); - - if (_this4.table.options.groupBy && _this4.table.modExists("groupRows")) { - - _this4.table.modules.groupRows.updateGroupRows(true); - } else if (_this4.table.options.pagination && _this4.table.modExists("page")) { - - _this4.refreshActiveData(false, false, true); - } else { - - _this4.reRenderInPosition(); - } - - //recalc column calculations if present - - if (_this4.table.modExists("columnCalcs")) { - - _this4.table.modules.columnCalcs.recalc(_this4.table.rowManager.activeRows); - } - - resolve(rows); - }); - }; - - RowManager.prototype.findAddRowPos = function (pos) { - - if (typeof pos === "undefined") { - - pos = this.table.options.addRowPos; - } - - if (pos === "pos") { - - pos = true; - } - - if (pos === "bottom") { - - pos = false; - } - - return pos; - }; - - RowManager.prototype.addRowActual = function (data, pos, index, blockRedraw) { - - var row = data instanceof Row ? data : new Row(data || {}, this), - top = this.findAddRowPos(pos), - dispRows; - - if (!index && this.table.options.pagination && this.table.options.paginationAddRow == "page") { - - dispRows = this.getDisplayRows(); - - if (top) { - - if (dispRows.length) { - - index = dispRows[0]; - } else { - - if (this.activeRows.length) { - - index = this.activeRows[this.activeRows.length - 1]; - - top = false; - } - } - } else { - - if (dispRows.length) { - - index = dispRows[dispRows.length - 1]; - - top = dispRows.length < this.table.modules.page.getPageSize() ? false : true; - } - } - } - - if (index) { - - index = this.findRow(index); - } - - if (this.table.options.groupBy && this.table.modExists("groupRows")) { - - this.table.modules.groupRows.assignRowToGroup(row); - - var groupRows = row.getGroup().rows; - - if (groupRows.length > 1) { - - if (!index || index && groupRows.indexOf(index) == -1) { - - if (top) { - - if (groupRows[0] !== row) { - - index = groupRows[0]; - - this._moveRowInArray(row.getGroup().rows, row, index, top); - } - } else { - - if (groupRows[groupRows.length - 1] !== row) { - - index = groupRows[groupRows.length - 1]; - - this._moveRowInArray(row.getGroup().rows, row, index, top); - } - } - } else { - - this._moveRowInArray(row.getGroup().rows, row, index, top); - } - } - } - - if (index) { - - var allIndex = this.rows.indexOf(index), - activeIndex = this.activeRows.indexOf(index); - - this.displayRowIterator(function (rows) { - - var displayIndex = rows.indexOf(index); - - if (displayIndex > -1) { - - rows.splice(top ? displayIndex : displayIndex + 1, 0, row); - } - }); - - if (activeIndex > -1) { - - this.activeRows.splice(top ? activeIndex : activeIndex + 1, 0, row); - } - - if (allIndex > -1) { - - this.rows.splice(top ? allIndex : allIndex + 1, 0, row); - } - } else { - - if (top) { - - this.displayRowIterator(function (rows) { - - rows.unshift(row); - }); - - this.activeRows.unshift(row); - - this.rows.unshift(row); - } else { - - this.displayRowIterator(function (rows) { - - rows.push(row); - }); - - this.activeRows.push(row); - - this.rows.push(row); - } - } - - this.setActiveRows(this.activeRows); - - this.table.options.rowAdded.call(this.table, row.getComponent()); - - this.table.options.dataEdited.call(this.table, this.getData()); - - if (!blockRedraw) { - - this.reRenderInPosition(); - } - - return row; - }; - - RowManager.prototype.moveRow = function (from, to, after) { - - if (this.table.options.history && this.table.modExists("history")) { - - this.table.modules.history.action("rowMove", from, { pos: this.getRowPosition(from), to: to, after: after }); - } - - this.moveRowActual(from, to, after); - - this.table.options.rowMoved.call(this.table, from.getComponent()); - }; - - RowManager.prototype.moveRowActual = function (from, to, after) { - - var self = this; - - this._moveRowInArray(this.rows, from, to, after); - - this._moveRowInArray(this.activeRows, from, to, after); - - this.displayRowIterator(function (rows) { - - self._moveRowInArray(rows, from, to, after); - }); - - if (this.table.options.groupBy && this.table.modExists("groupRows")) { - - var toGroup = to.getGroup(); - - var fromGroup = from.getGroup(); - - if (toGroup === fromGroup) { - - this._moveRowInArray(toGroup.rows, from, to, after); - } else { - - if (fromGroup) { - - fromGroup.removeRow(from); - } - - toGroup.insertRow(from, to, after); - } - } - }; - - RowManager.prototype._moveRowInArray = function (rows, from, to, after) { - - var fromIndex, toIndex, start, end; - - if (from !== to) { - - fromIndex = rows.indexOf(from); - - if (fromIndex > -1) { - - rows.splice(fromIndex, 1); - - toIndex = rows.indexOf(to); - - if (toIndex > -1) { - - if (after) { - - rows.splice(toIndex + 1, 0, from); - } else { - - rows.splice(toIndex, 0, from); - } - } else { - - rows.splice(fromIndex, 0, from); - } - } - - //restyle rows - - if (rows === this.getDisplayRows()) { - - start = fromIndex < toIndex ? fromIndex : toIndex; - - end = toIndex > fromIndex ? toIndex : fromIndex + 1; - - for (var i = start; i <= end; i++) { - - if (rows[i]) { - - this.styleRow(rows[i], i); - } - } - } - } - }; - - RowManager.prototype.clearData = function () { - - this.setData([]); - }; - - RowManager.prototype.getRowIndex = function (row) { - - return this.findRowIndex(row, this.rows); - }; - - RowManager.prototype.getDisplayRowIndex = function (row) { - - var index = this.getDisplayRows().indexOf(row); - - return index > -1 ? index : false; - }; - - RowManager.prototype.nextDisplayRow = function (row, rowOnly) { - - var index = this.getDisplayRowIndex(row), - nextRow = false; - - if (index !== false && index < this.displayRowsCount - 1) { - - nextRow = this.getDisplayRows()[index + 1]; - } - - if (nextRow && (!(nextRow instanceof Row) || nextRow.type != "row")) { - - return this.nextDisplayRow(nextRow, rowOnly); - } - - return nextRow; - }; - - RowManager.prototype.prevDisplayRow = function (row, rowOnly) { - - var index = this.getDisplayRowIndex(row), - prevRow = false; - - if (index) { - - prevRow = this.getDisplayRows()[index - 1]; - } - - if (prevRow && (!(prevRow instanceof Row) || prevRow.type != "row")) { - - return this.prevDisplayRow(prevRow, rowOnly); - } - - return prevRow; - }; - - RowManager.prototype.findRowIndex = function (row, list) { - - var rowIndex; - - row = this.findRow(row); - - if (row) { - - rowIndex = list.indexOf(row); - - if (rowIndex > -1) { - - return rowIndex; - } - } - - return false; - }; - - RowManager.prototype.getData = function (active, transform) { - - var self = this, - output = []; - - var rows = active ? self.activeRows : self.rows; - - rows.forEach(function (row) { - - output.push(row.getData(transform || "data")); - }); - - return output; - }; - - RowManager.prototype.getHtml = function (active) { - - var data = this.getData(active), - columns = [], - header = "", - body = "", - table = ""; - - //build header row - - this.table.columnManager.getColumns().forEach(function (column) { - - var def = column.getDefinition(); - - if (column.visible && !def.hideInHtml) { - - header += '' + (def.title || "") + ''; - - columns.push(column); - } - }); - - //build body rows - - data.forEach(function (rowData) { - - var row = ""; - - columns.forEach(function (column) { - - var value = column.getFieldValue(rowData); - - if (typeof value === "undefined" || value === null) { - - value = ":"; - } - - row += '' + value + ''; - }); - - body += '' + row + ''; - }); - - //build table - - table = '\n\n\t\t\t\n\n\t\t\t' + header + '\n\n\t\t\t\n\n\t\t\t' + body + '\n\n\t\t\t
'; - - return table; - }; - - RowManager.prototype.getComponents = function (active) { - - var self = this, - output = []; - - var rows = active ? self.activeRows : self.rows; - - rows.forEach(function (row) { - - output.push(row.getComponent()); - }); - - return output; - }; - - RowManager.prototype.getDataCount = function (active) { - - return active ? this.rows.length : this.activeRows.length; - }; - - RowManager.prototype._genRemoteRequest = function () { - - var self = this, - table = self.table, - options = table.options, - params = {}; - - if (table.modExists("page")) { - - //set sort data if defined - - if (options.ajaxSorting) { - - var sorters = self.table.modules.sort.getSort(); - - sorters.forEach(function (item) { - - delete item.column; - }); - - params[self.table.modules.page.paginationDataSentNames.sorters] = sorters; - } - - //set filter data if defined - - if (options.ajaxFiltering) { - - var filters = self.table.modules.filter.getFilters(true, true); - - params[self.table.modules.page.paginationDataSentNames.filters] = filters; - } - - self.table.modules.ajax.setParams(params, true); - } - - table.modules.ajax.sendRequest().then(function (data) { - - self.setData(data); - }).catch(function (e) {}); - }; - - //choose the path to refresh data after a filter update - - RowManager.prototype.filterRefresh = function () { - - var table = this.table, - options = table.options, - left = this.scrollLeft; - - if (options.ajaxFiltering) { - - if (options.pagination == "remote" && table.modExists("page")) { - - table.modules.page.reset(true); - - table.modules.page.setPage(1); - } else if (options.ajaxProgressiveLoad) { - - table.modules.ajax.loadData(); - } else { - - //assume data is url, make ajax call to url to get data - - this._genRemoteRequest(); - } - } else { - - this.refreshActiveData("filter"); - } - - this.scrollHorizontal(left); - }; - - //choose the path to refresh data after a sorter update - - RowManager.prototype.sorterRefresh = function () { - - var table = this.table, - options = this.table.options, - left = this.scrollLeft; - - if (options.ajaxSorting) { - - if ((options.pagination == "remote" || options.progressiveLoad) && table.modExists("page")) { - - table.modules.page.reset(true); - - table.modules.page.setPage(1); - } else if (options.ajaxProgressiveLoad) { - - table.modules.ajax.loadData(); - } else { - - //assume data is url, make ajax call to url to get data - - this._genRemoteRequest(); - } - } else { - - this.refreshActiveData("sort"); - } - - this.scrollHorizontal(left); - }; - - RowManager.prototype.scrollHorizontal = function (left) { - - this.scrollLeft = left; - - this.element.scrollLeft = left; - - if (this.table.options.groupBy) { - - this.table.modules.groupRows.scrollHeaders(left); - } - - if (this.table.modExists("columnCalcs")) { - - this.table.modules.columnCalcs.scrollHorizontal(left); - } - }; - - //set active data set - - RowManager.prototype.refreshActiveData = function (stage, skipStage, renderInPosition) { - - var self = this, - table = this.table, - displayIndex; - - if (!stage) { - - stage = "all"; - } - - if (table.options.selectable && !table.options.selectablePersistence && table.modExists("selectRow")) { - - table.modules.selectRow.deselectRows(); - } - - //cascade through data refresh stages - - switch (stage) { - - case "all": - - case "filter": - - if (!skipStage) { - - if (table.modExists("filter")) { - - self.setActiveRows(table.modules.filter.filter(self.rows)); - } else { - - self.setActiveRows(self.rows.slice(0)); - } - } else { - - skipStage = false; - } - - case "sort": - - if (!skipStage) { - - if (table.modExists("sort")) { - - table.modules.sort.sort(); - } - } else { - - skipStage = false; - } - - //generic stage to allow for pipeline trigger after the data manipulation stage - - case "display": - - this.resetDisplayRows(); - - case "freeze": - - if (!skipStage) { - - if (this.table.modExists("frozenRows")) { - - if (table.modules.frozenRows.isFrozen()) { - - if (!table.modules.frozenRows.getDisplayIndex()) { - - table.modules.frozenRows.setDisplayIndex(this.getNextDisplayIndex()); - } - - displayIndex = table.modules.frozenRows.getDisplayIndex(); - - displayIndex = self.setDisplayRows(table.modules.frozenRows.getRows(this.getDisplayRows(displayIndex - 1)), displayIndex); - - if (displayIndex !== true) { - - table.modules.frozenRows.setDisplayIndex(displayIndex); - } - } - } - } else { - - skipStage = false; - } - - case "group": - - if (!skipStage) { - - if (table.options.groupBy && table.modExists("groupRows")) { - - if (!table.modules.groupRows.getDisplayIndex()) { - - table.modules.groupRows.setDisplayIndex(this.getNextDisplayIndex()); - } - - displayIndex = table.modules.groupRows.getDisplayIndex(); - - displayIndex = self.setDisplayRows(table.modules.groupRows.getRows(this.getDisplayRows(displayIndex - 1)), displayIndex); - - if (displayIndex !== true) { - - table.modules.groupRows.setDisplayIndex(displayIndex); - } - } - } else { - - skipStage = false; - } - - case "tree": - - if (!skipStage) { - - if (table.options.dataTree && table.modExists("dataTree")) { - - if (!table.modules.dataTree.getDisplayIndex()) { - - table.modules.dataTree.setDisplayIndex(this.getNextDisplayIndex()); - } - - displayIndex = table.modules.dataTree.getDisplayIndex(); - - displayIndex = self.setDisplayRows(table.modules.dataTree.getRows(this.getDisplayRows(displayIndex - 1)), displayIndex); - - if (displayIndex !== true) { - - table.modules.dataTree.setDisplayIndex(displayIndex); - } - } - } else { - - skipStage = false; - } - - if (table.options.pagination && table.modExists("page") && !renderInPosition) { - - if (table.modules.page.getMode() == "local") { - - table.modules.page.reset(); - } - } - - case "page": - - if (!skipStage) { - - if (table.options.pagination && table.modExists("page")) { - - if (!table.modules.page.getDisplayIndex()) { - - table.modules.page.setDisplayIndex(this.getNextDisplayIndex()); - } - - displayIndex = table.modules.page.getDisplayIndex(); - - if (table.modules.page.getMode() == "local") { - - table.modules.page.setMaxRows(this.getDisplayRows(displayIndex - 1).length); - } - - displayIndex = self.setDisplayRows(table.modules.page.getRows(this.getDisplayRows(displayIndex - 1)), displayIndex); - - if (displayIndex !== true) { - - table.modules.page.setDisplayIndex(displayIndex); - } - } - } else { - - skipStage = false; - } - - } - - if (Tabulator.prototype.helpers.elVisible(self.element)) { - - if (renderInPosition) { - - self.reRenderInPosition(); - } else { - - self.renderTable(); - - if (table.options.layoutColumnsOnNewData) { - - self.table.columnManager.redraw(true); - } - } - } - - if (table.modExists("columnCalcs")) { - - table.modules.columnCalcs.recalc(this.activeRows); - } - }; - - RowManager.prototype.setActiveRows = function (activeRows) { - - this.activeRows = activeRows; - - this.activeRowsCount = this.activeRows.length; - }; - - //reset display rows array - - RowManager.prototype.resetDisplayRows = function () { - - this.displayRows = []; - - this.displayRows.push(this.activeRows.slice(0)); - - this.displayRowsCount = this.displayRows[0].length; - - if (this.table.modExists("frozenRows")) { - - this.table.modules.frozenRows.setDisplayIndex(0); - } - - if (this.table.options.groupBy && this.table.modExists("groupRows")) { - - this.table.modules.groupRows.setDisplayIndex(0); - } - - if (this.table.options.pagination && this.table.modExists("page")) { - - this.table.modules.page.setDisplayIndex(0); - } - }; - - RowManager.prototype.getNextDisplayIndex = function () { - - return this.displayRows.length; - }; - - //set display row pipeline data - - RowManager.prototype.setDisplayRows = function (displayRows, index) { - - var output = true; - - if (index && typeof this.displayRows[index] != "undefined") { - - this.displayRows[index] = displayRows; - - output = true; - } else { - - this.displayRows.push(displayRows); - - output = index = this.displayRows.length - 1; - } - - if (index == this.displayRows.length - 1) { - - this.displayRowsCount = this.displayRows[this.displayRows.length - 1].length; - } - - return output; - }; - - RowManager.prototype.getDisplayRows = function (index) { - - if (typeof index == "undefined") { - - return this.displayRows.length ? this.displayRows[this.displayRows.length - 1] : []; - } else { - - return this.displayRows[index] || []; - } - }; - - //repeat action accross display rows - - RowManager.prototype.displayRowIterator = function (callback) { - - this.displayRows.forEach(callback); - - this.displayRowsCount = this.displayRows[this.displayRows.length - 1].length; - }; - - //return only actual rows (not group headers etc) - - RowManager.prototype.getRows = function () { - - return this.rows; - }; - - ///////////////// Table Rendering ///////////////// - - - //trigger rerender of table in current position - - RowManager.prototype.reRenderInPosition = function (callback) { - - if (this.getRenderMode() == "virtual") { - - var scrollTop = this.element.scrollTop; - - var topRow = false; - - var topOffset = false; - - var left = this.scrollLeft; - - var rows = this.getDisplayRows(); - - for (var i = this.vDomTop; i <= this.vDomBottom; i++) { - - if (rows[i]) { - - var diff = scrollTop - rows[i].getElement().offsetTop; - - if (topOffset === false || Math.abs(diff) < topOffset) { - - topOffset = diff; - - topRow = i; - } else { - - break; - } - } - } - - if (callback) { - - callback(); - } - - this._virtualRenderFill(topRow === false ? this.displayRowsCount - 1 : topRow, true, topOffset || 0); - - this.scrollHorizontal(left); - } else { - - this.renderTable(); - } - }; - - RowManager.prototype.setRenderMode = function () { - - if ((this.table.element.clientHeight || this.table.options.height) && this.table.options.virtualDom) { - - this.renderMode = "virtual"; - } else { - - this.renderMode = "classic"; - } - }; - - RowManager.prototype.getRenderMode = function () { - - return this.renderMode; - }; - - RowManager.prototype.renderTable = function () { - - var self = this; - - self.table.options.renderStarted.call(this.table); - - self.element.scrollTop = 0; - - switch (self.renderMode) { - - case "classic": - - self._simpleRender(); - - break; - - case "virtual": - - self._virtualRenderFill(); - - break; - - } - - if (self.firstRender) { - - if (self.displayRowsCount) { - - self.firstRender = false; - - self.table.modules.layout.layout(); - } else { - - self.renderEmptyScroll(); - } - } - - if (self.table.modExists("frozenColumns")) { - - self.table.modules.frozenColumns.layout(); - } - - if (!self.displayRowsCount) { - - if (self.table.options.placeholder) { - - if (this.renderMode) { - - self.table.options.placeholder.setAttribute("tabulator-render-mode", this.renderMode); - } - - self.getElement().appendChild(self.table.options.placeholder); - } - } - - self.table.options.renderComplete.call(this.table); - }; - - //simple render on heightless table - - RowManager.prototype._simpleRender = function () { - - var self = this, - element = this.tableElement; - - self._clearVirtualDom(); - - if (self.displayRowsCount) { - - var onlyGroupHeaders = true; - - self.getDisplayRows().forEach(function (row, index) { - - self.styleRow(row, index); - - element.appendChild(row.getElement()); - - row.initialize(true); - - if (row.type !== "group") { - - onlyGroupHeaders = false; - } - }); - - if (onlyGroupHeaders) { - - element.style.minWidth = self.table.columnManager.getWidth() + "px"; - } - } else { - - self.renderEmptyScroll(); - } - }; - - //show scrollbars on empty table div - - RowManager.prototype.renderEmptyScroll = function () { - - this.tableElement.style.minWidth = this.table.columnManager.getWidth(); - - this.tableElement.style.minHeight = "1px"; - - // this.tableElement.style.visibility = "hidden"; - }; - - RowManager.prototype._clearVirtualDom = function () { - - var element = this.tableElement; - - if (this.table.options.placeholder && this.table.options.placeholder.parentNode) { - - this.table.options.placeholder.parentNode.removeChild(this.table.options.placeholder); - } - - // element.children.detach(); - - while (element.firstChild) { - element.removeChild(element.firstChild); - }element.style.paddingTop = ""; - - element.style.paddingBottom = ""; - - element.style.minWidth = ""; - - element.style.minHeight = ""; - - element.style.visibility = ""; - - this.scrollTop = 0; - - this.scrollLeft = 0; - - this.vDomTop = 0; - - this.vDomBottom = 0; - - this.vDomTopPad = 0; - - this.vDomBottomPad = 0; - }; - - RowManager.prototype.styleRow = function (row, index) { - - var rowEl = row.getElement(); - - if (index % 2) { - - rowEl.classList.add("tabulator-row-even"); - - rowEl.classList.remove("tabulator-row-odd"); - } else { - - rowEl.classList.add("tabulator-row-odd"); - - rowEl.classList.remove("tabulator-row-even"); - } - }; - - //full virtual render - - RowManager.prototype._virtualRenderFill = function (position, forceMove, offset) { - - var self = this, - element = self.tableElement, - holder = self.element, - topPad = 0, - rowsHeight = 0, - topPadHeight = 0, - i = 0, - onlyGroupHeaders = true, - rows = self.getDisplayRows(); - - position = position || 0; - - offset = offset || 0; - - if (!position) { - - self._clearVirtualDom(); - } else { - - // element.children().detach(); - - while (element.firstChild) { - element.removeChild(element.firstChild); - } //check if position is too close to bottom of table - - var heightOccpied = (self.displayRowsCount - position + 1) * self.vDomRowHeight; - - if (heightOccpied < self.height) { - - position -= Math.ceil((self.height - heightOccpied) / self.vDomRowHeight); - - if (position < 0) { - - position = 0; - } - } - - //calculate initial pad - - topPad = Math.min(Math.max(Math.floor(self.vDomWindowBuffer / self.vDomRowHeight), self.vDomWindowMinMarginRows), position); - - position -= topPad; - } - - if (self.displayRowsCount && Tabulator.prototype.helpers.elVisible(self.element)) { - - self.vDomTop = position; - - self.vDomBottom = position - 1; - - while ((rowsHeight <= self.height + self.vDomWindowBuffer || i < self.vDomWindowMinTotalRows) && self.vDomBottom < self.displayRowsCount - 1) { - - var index = self.vDomBottom + 1, - row = rows[index]; - - self.styleRow(row, index); - - element.appendChild(row.getElement()); - - if (!row.initialized) { - - row.initialize(true); - } else { - - if (!row.heightInitialized) { - - row.normalizeHeight(true); - } - } - - if (i < topPad) { - - topPadHeight += row.getHeight(); - } else { - - rowsHeight += row.getHeight(); - } - - if (row.type !== "group") { - - onlyGroupHeaders = false; - } - - self.vDomBottom++; - - i++; - } - - if (!position) { - - this.vDomTopPad = 0; - - //adjust rowheight to match average of rendered elements - - self.vDomRowHeight = Math.floor((rowsHeight + topPadHeight) / i); - - self.vDomBottomPad = self.vDomRowHeight * (self.displayRowsCount - self.vDomBottom - 1); - - self.vDomScrollHeight = topPadHeight + rowsHeight + self.vDomBottomPad - self.height; - } else { - - self.vDomTopPad = !forceMove ? self.scrollTop - topPadHeight : self.vDomRowHeight * this.vDomTop + offset; - - self.vDomBottomPad = self.vDomBottom == self.displayRowsCount - 1 ? 0 : Math.max(self.vDomScrollHeight - self.vDomTopPad - rowsHeight - topPadHeight, 0); - } - - element.style.paddingTop = self.vDomTopPad + "px"; - - element.style.paddingBottom = self.vDomBottomPad + "px"; - - if (forceMove) { - - this.scrollTop = self.vDomTopPad + topPadHeight + offset - (this.element.scrollWidth > this.element.clientWidth ? this.element.offsetHeight - this.element.clientHeight : 0); - } - - this.scrollTop = Math.min(this.scrollTop, this.element.scrollHeight - this.height); - - //adjust for horizontal scrollbar if present - - if (this.element.scrollWidth > this.element.offsetWidth) { - - this.scrollTop += this.element.offsetHeight - this.element.clientHeight; - } - - this.vDomScrollPosTop = this.scrollTop; - - this.vDomScrollPosBottom = this.scrollTop; - - holder.scrollTop = this.scrollTop; - - element.style.minWidth = onlyGroupHeaders ? self.table.columnManager.getWidth() + "px" : ""; - - if (self.table.options.groupBy) { - - if (self.table.modules.layout.getMode() != "fitDataFill" && self.displayRowsCount == self.table.modules.groupRows.countGroups()) { - - self.tableElement.style.minWidth = self.table.columnManager.getWidth(); - } - } - } else { - - this.renderEmptyScroll(); - } - }; - - //handle vertical scrolling - - RowManager.prototype.scrollVertical = function (dir) { - - var topDiff = this.scrollTop - this.vDomScrollPosTop; - - var bottomDiff = this.scrollTop - this.vDomScrollPosBottom; - - var margin = this.vDomWindowBuffer * 2; - - if (-topDiff > margin || bottomDiff > margin) { - - //if big scroll redraw table; - - var left = this.scrollLeft; - - this._virtualRenderFill(Math.floor(this.element.scrollTop / this.element.scrollHeight * this.displayRowsCount)); - - this.scrollHorizontal(left); - } else { - - if (dir) { - - //scrolling up - - if (topDiff < 0) { - - this._addTopRow(-topDiff); - } - - if (topDiff < 0) { - - //hide bottom row if needed - - if (this.vDomScrollHeight - this.scrollTop > this.vDomWindowBuffer) { - - this._removeBottomRow(-bottomDiff); - } - } - } else { - - //scrolling down - - if (topDiff >= 0) { - - //hide top row if needed - - if (this.scrollTop > this.vDomWindowBuffer) { - - this._removeTopRow(topDiff); - } - } - - if (bottomDiff >= 0) { - - this._addBottomRow(bottomDiff); - } - } - } - }; - - RowManager.prototype._addTopRow = function (topDiff) { - var i = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 0; - - - var table = this.tableElement, - rows = this.getDisplayRows(); - - if (this.vDomTop) { - - var index = this.vDomTop - 1, - topRow = rows[index], - topRowHeight = topRow.getHeight() || this.vDomRowHeight; - - //hide top row if needed - - if (topDiff >= topRowHeight) { - - this.styleRow(topRow, index); - - table.insertBefore(topRow.getElement(), table.firstChild); - - if (!topRow.initialized || !topRow.heightInitialized) { - - this.vDomTopNewRows.push(topRow); - - if (!topRow.heightInitialized) { - - topRow.clearCellHeight(); - } - } - - topRow.initialize(); - - this.vDomTopPad -= topRowHeight; - - if (this.vDomTopPad < 0) { - - this.vDomTopPad = index * this.vDomRowHeight; - } - - if (!index) { - - this.vDomTopPad = 0; - } - - table.style.paddingTop = this.vDomTopPad + "px"; - - this.vDomScrollPosTop -= topRowHeight; - - this.vDomTop--; - } - - topDiff = -(this.scrollTop - this.vDomScrollPosTop); - - if (i < this.vDomMaxRenderChain && this.vDomTop && topDiff >= (rows[this.vDomTop - 1].getHeight() || this.vDomRowHeight)) { - - this._addTopRow(topDiff, i + 1); - } else { - - this._quickNormalizeRowHeight(this.vDomTopNewRows); - } - } - }; - - RowManager.prototype._removeTopRow = function (topDiff) { - - var table = this.tableElement, - topRow = this.getDisplayRows()[this.vDomTop], - topRowHeight = topRow.getHeight() || this.vDomRowHeight; - - if (topDiff >= topRowHeight) { - - var rowEl = topRow.getElement(); - - rowEl.parentNode.removeChild(rowEl); - - this.vDomTopPad += topRowHeight; - - table.style.paddingTop = this.vDomTopPad + "px"; - - this.vDomScrollPosTop += this.vDomTop ? topRowHeight : topRowHeight + this.vDomWindowBuffer; - - this.vDomTop++; - - topDiff = this.scrollTop - this.vDomScrollPosTop; - - this._removeTopRow(topDiff); - } - }; - - RowManager.prototype._addBottomRow = function (bottomDiff) { - var i = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 0; - - - var table = this.tableElement, - rows = this.getDisplayRows(); - - if (this.vDomBottom < this.displayRowsCount - 1) { - - var index = this.vDomBottom + 1, - bottomRow = rows[index], - bottomRowHeight = bottomRow.getHeight() || this.vDomRowHeight; - - //hide bottom row if needed - - if (bottomDiff >= bottomRowHeight) { - - this.styleRow(bottomRow, index); - - table.appendChild(bottomRow.getElement()); - - if (!bottomRow.initialized || !bottomRow.heightInitialized) { - - this.vDomBottomNewRows.push(bottomRow); - - if (!bottomRow.heightInitialized) { - - bottomRow.clearCellHeight(); - } - } - - bottomRow.initialize(); - - this.vDomBottomPad -= bottomRowHeight; - - if (this.vDomBottomPad < 0 || index == this.displayRowsCount - 1) { - - this.vDomBottomPad = 0; - } - - table.style.paddingBottom = this.vDomBottomPad + "px"; - - this.vDomScrollPosBottom += bottomRowHeight; - - this.vDomBottom++; - } - - bottomDiff = this.scrollTop - this.vDomScrollPosBottom; - - if (i < this.vDomMaxRenderChain && this.vDomBottom < this.displayRowsCount - 1 && bottomDiff >= (rows[this.vDomBottom + 1].getHeight() || this.vDomRowHeight)) { - - this._addBottomRow(bottomDiff, i + 1); - } else { - - this._quickNormalizeRowHeight(this.vDomBottomNewRows); - } - } - }; - - RowManager.prototype._removeBottomRow = function (bottomDiff) { - - var table = this.tableElement, - bottomRow = this.getDisplayRows()[this.vDomBottom], - bottomRowHeight = bottomRow.getHeight() || this.vDomRowHeight; - - if (bottomDiff >= bottomRowHeight) { - - var rowEl = bottomRow.getElement(); - - if (rowEl.parentNode) { - - rowEl.parentNode.removeChild(rowEl); - } - - this.vDomBottomPad += bottomRowHeight; - - if (this.vDomBottomPad < 0) { - - this.vDomBottomPad = 0; - } - - table.style.paddingBottom = this.vDomBottomPad + "px"; - - this.vDomScrollPosBottom -= bottomRowHeight; - - this.vDomBottom--; - - bottomDiff = -(this.scrollTop - this.vDomScrollPosBottom); - - this._removeBottomRow(bottomDiff); - } - }; - - RowManager.prototype._quickNormalizeRowHeight = function (rows) { - - rows.forEach(function (row) { - - row.calcHeight(); - }); - - rows.forEach(function (row) { - - row.setCellHeight(); - }); - - rows.length = 0; - }; - - //normalize height of active rows - - RowManager.prototype.normalizeHeight = function () { - - this.activeRows.forEach(function (row) { - - row.normalizeHeight(); - }); - }; - - //adjust the height of the table holder to fit in the Tabulator element - - RowManager.prototype.adjustTableSize = function () { - - if (this.renderMode === "virtual") { - - this.height = this.element.clientHeight; - - this.vDomWindowBuffer = this.table.options.virtualDomBuffer || this.height; - - var otherHeight = this.columnManager.getElement().offsetHeight + (this.table.footerManager && !this.table.footerManager.external ? this.table.footerManager.getElement().offsetHeight : 0); - - this.element.style.minHeight = "calc(100% - " + otherHeight + "px)"; - - this.element.style.height = "calc(100% - " + otherHeight + "px)"; - - this.element.style.maxHeight = "calc(100% - " + otherHeight + "px)"; - } - }; - - //renitialize all rows - - RowManager.prototype.reinitialize = function () { - - this.rows.forEach(function (row) { - - row.reinitialize(); - }); - }; - - //redraw table - - RowManager.prototype.redraw = function (force) { - - var pos = 0, - left = this.scrollLeft; - - this.adjustTableSize(); - - if (!force) { - - if (self.renderMode == "classic") { - - if (self.table.options.groupBy) { - - self.refreshActiveData("group", false, false); - } else { - - this._simpleRender(); - } - } else { - - this.reRenderInPosition(); - - this.scrollHorizontal(left); - } - - if (!this.displayRowsCount) { - - if (this.table.options.placeholder) { - - this.getElement().appendChild(this.table.options.placeholder); - } - } - } else { - - this.renderTable(); - } - }; - - RowManager.prototype.resetScroll = function () { - - this.element.scrollLeft = 0; - - this.element.scrollTop = 0; - - if (this.table.browser === "ie") { - - var event = document.createEvent("Event"); - - event.initEvent("scroll", false, true); - - this.element.dispatchEvent(event); - } else { - - this.element.dispatchEvent(new Event('scroll')); - } - }; - - //public row object - - var RowComponent = function RowComponent(row) { - - this._row = row; - }; - - RowComponent.prototype.getData = function (transform) { - - return this._row.getData(transform); - }; - - RowComponent.prototype.getElement = function () { - - return this._row.getElement(); - }; - - RowComponent.prototype.getCells = function () { - - var cells = []; - - this._row.getCells().forEach(function (cell) { - - cells.push(cell.getComponent()); - }); - - return cells; - }; - - RowComponent.prototype.getCell = function (column) { - - var cell = this._row.getCell(column); - - return cell ? cell.getComponent() : false; - }; - - RowComponent.prototype.getIndex = function () { - - return this._row.getData("data")[this._row.table.options.index]; - }; - - RowComponent.prototype.getPosition = function (active) { - - return this._row.table.rowManager.getRowPosition(this._row, active); - }; - - RowComponent.prototype.delete = function () { - - return this._row.delete(); - }; - - RowComponent.prototype.scrollTo = function () { - - return this._row.table.rowManager.scrollToRow(this._row); - }; - - RowComponent.prototype.update = function (data) { - - return this._row.updateData(data); - }; - - RowComponent.prototype.normalizeHeight = function () { - - this._row.normalizeHeight(true); - }; - - RowComponent.prototype.select = function () { - - this._row.table.modules.selectRow.selectRows(this._row); - }; - - RowComponent.prototype.deselect = function () { - - this._row.table.modules.selectRow.deselectRows(this._row); - }; - - RowComponent.prototype.toggleSelect = function () { - - this._row.table.modules.selectRow.toggleRow(this._row); - }; - - RowComponent.prototype.isSelected = function () { - - return this._row.table.modules.selectRow.isRowSelected(this._row); - }; - - RowComponent.prototype._getSelf = function () { - - return this._row; - }; - - RowComponent.prototype.freeze = function () { - - if (this._row.table.modExists("frozenRows", true)) { - - this._row.table.modules.frozenRows.freezeRow(this._row); - } - }; - - RowComponent.prototype.unfreeze = function () { - - if (this._row.table.modExists("frozenRows", true)) { - - this._row.table.modules.frozenRows.unfreezeRow(this._row); - } - }; - - RowComponent.prototype.treeCollapse = function () { - - if (this._row.table.modExists("dataTree", true)) { - - this._row.table.modules.dataTree.collapseRow(this._row); - } - }; - - RowComponent.prototype.treeExpand = function () { - - if (this._row.table.modExists("dataTree", true)) { - - this._row.table.modules.dataTree.expandRow(this._row); - } - }; - - RowComponent.prototype.treeToggle = function () { - - if (this._row.table.modExists("dataTree", true)) { - - this._row.table.modules.dataTree.toggleRow(this._row); - } - }; - - RowComponent.prototype.getTreeParent = function () { - - if (this._row.table.modExists("dataTree", true)) { - - return this._row.table.modules.dataTree.getTreeParent(this._row); - } - - return false; - }; - - RowComponent.prototype.getTreeChildren = function () { - - if (this._row.table.modExists("dataTree", true)) { - - return this._row.table.modules.dataTree.getTreeChildren(this._row); - } - - return false; - }; - - RowComponent.prototype.reformat = function () { - - return this._row.reinitialize(); - }; - - RowComponent.prototype.getGroup = function () { - - return this._row.getGroup().getComponent(); - }; - - RowComponent.prototype.getTable = function () { - - return this._row.table; - }; - - RowComponent.prototype.getNextRow = function () { - - return this._row.nextRow(); - }; - - RowComponent.prototype.getPrevRow = function () { - - return this._row.prevRow(); - }; - - var Row = function Row(data, parent) { - - this.table = parent.table; - - this.parent = parent; - - this.data = {}; - - this.type = "row"; //type of element - - this.element = this.createElement(); - - this.modules = {}; //hold module variables; - - this.cells = []; - - this.height = 0; //hold element height - - this.outerHeight = 0; //holde lements outer height - - this.initialized = false; //element has been rendered - - this.heightInitialized = false; //element has resized cells to fit - - - this.setData(data); - - this.generateElement(); - }; - - Row.prototype.createElement = function () { - - var el = document.createElement("div"); - - el.classList.add("tabulator-row"); - - el.setAttribute("role", "row"); - - return el; - }; - - Row.prototype.getElement = function () { - - return this.element; - }; - - Row.prototype.generateElement = function () { - - var self = this, - dblTap, - tapHold, - tap; - - //set row selection characteristics - - if (self.table.options.selectable !== false && self.table.modExists("selectRow")) { - - self.table.modules.selectRow.initializeRow(this); - } - - //setup movable rows - - if (self.table.options.movableRows !== false && self.table.modExists("moveRow")) { - - self.table.modules.moveRow.initializeRow(this); - } - - //setup data tree - - if (self.table.options.dataTree !== false && self.table.modExists("dataTree")) { - - self.table.modules.dataTree.initializeRow(this); - } - - //handle row click events - - if (self.table.options.rowClick) { - - self.element.addEventListener("click", function (e) { - - self.table.options.rowClick(e, self.getComponent()); - }); - } - - if (self.table.options.rowDblClick) { - - self.element.addEventListener("dblclick", function (e) { - - self.table.options.rowDblClick(e, self.getComponent()); - }); - } - - if (self.table.options.rowContext) { - - self.element.addEventListener("contextmenu", function (e) { - - self.table.options.rowContext(e, self.getComponent()); - }); - } - - if (self.table.options.rowTap) { - - tap = false; - - self.element.addEventListener("touchstart", function (e) { - - tap = true; - }); - - self.element.addEventListener("touchend", function (e) { - - if (tap) { - - self.table.options.rowTap(e, self.getComponent()); - } - - tap = false; - }); - } - - if (self.table.options.rowDblTap) { - - dblTap = null; - - self.element.addEventListener("touchend", function (e) { - - if (dblTap) { - - clearTimeout(dblTap); - - dblTap = null; - - self.table.options.rowDblTap(e, self.getComponent()); - } else { - - dblTap = setTimeout(function () { - - clearTimeout(dblTap); - - dblTap = null; - }, 300); - } - }); - } - - if (self.table.options.rowTapHold) { - - tapHold = null; - - self.element.addEventListener("touchstart", function (e) { - - clearTimeout(tapHold); - - tapHold = setTimeout(function () { - - clearTimeout(tapHold); - - tapHold = null; - - tap = false; - - self.table.options.rowTapHold(e, self.getComponent()); - }, 1000); - }); - - self.element.addEventListener("touchend", function (e) { - - clearTimeout(tapHold); - - tapHold = null; - }); - } - }; - - Row.prototype.generateCells = function () { - - this.cells = this.table.columnManager.generateCells(this); - }; - - //functions to setup on first render - - Row.prototype.initialize = function (force) { - - var self = this; - - if (!self.initialized || force) { - - self.deleteCells(); - - while (self.element.firstChild) { - self.element.removeChild(self.element.firstChild); - } //handle frozen cells - - if (this.table.modExists("frozenColumns")) { - - this.table.modules.frozenColumns.layoutRow(this); - } - - this.generateCells(); - - self.cells.forEach(function (cell) { - - self.element.appendChild(cell.getElement()); - - cell.cellRendered(); - }); - - if (force) { - - self.normalizeHeight(); - } - - //setup movable rows - - if (self.table.options.dataTree && self.table.modExists("dataTree")) { - - self.table.modules.dataTree.layoutRow(this); - } - - //setup movable rows - - if (self.table.options.responsiveLayout === "collapse" && self.table.modExists("responsiveLayout")) { - - self.table.modules.responsiveLayout.layoutRow(this); - } - - if (self.table.options.rowFormatter) { - - self.table.options.rowFormatter(self.getComponent()); - } - - //set resizable handles - - if (self.table.options.resizableRows && self.table.modExists("resizeRows")) { - - self.table.modules.resizeRows.initializeRow(self); - } - - self.initialized = true; - } - }; - - Row.prototype.reinitializeHeight = function () { - - this.heightInitialized = false; - - if (this.element.offsetParent !== null) { - - this.normalizeHeight(true); - } - }; - - Row.prototype.reinitialize = function () { - - this.initialized = false; - - this.heightInitialized = false; - - this.height = 0; - - if (this.element.offsetParent !== null) { - - this.initialize(true); - } - }; - - //get heights when doing bulk row style calcs in virtual DOM - - Row.prototype.calcHeight = function () { - - var maxHeight = 0, - minHeight = this.table.options.resizableRows ? this.element.clientHeight : 0; - - this.cells.forEach(function (cell) { - - var height = cell.getHeight(); - - if (height > maxHeight) { - - maxHeight = height; - } - }); - - this.height = Math.max(maxHeight, minHeight); - - this.outerHeight = this.element.offsetHeight; - }; - - //set of cells - - Row.prototype.setCellHeight = function () { - - var height = this.height; - - this.cells.forEach(function (cell) { - - cell.setHeight(height); - }); - - this.heightInitialized = true; - }; - - Row.prototype.clearCellHeight = function () { - - this.cells.forEach(function (cell) { - - cell.clearHeight(); - }); - }; - - //normalize the height of elements in the row - - Row.prototype.normalizeHeight = function (force) { - - if (force) { - - this.clearCellHeight(); - } - - this.calcHeight(); - - this.setCellHeight(); - }; - - Row.prototype.setHeight = function (height) { - - this.height = height; - - this.setCellHeight(); - }; - - //set height of rows - - Row.prototype.setHeight = function (height, force) { - - if (this.height != height || force) { - - this.height = height; - - this.setCellHeight(); - - // this.outerHeight = this.element.outerHeight(); - - this.outerHeight = this.element.offsetHeight; - } - }; - - //return rows outer height - - Row.prototype.getHeight = function () { - - return this.outerHeight; - }; - - //return rows outer Width - - Row.prototype.getWidth = function () { - - return this.element.offsetWidth; - }; - - //////////////// Cell Management ///////////////// - - - Row.prototype.deleteCell = function (cell) { - - var index = this.cells.indexOf(cell); - - if (index > -1) { - - this.cells.splice(index, 1); - } - }; - - //////////////// Data Management ///////////////// - - - Row.prototype.setData = function (data) { - - var self = this; - - if (self.table.modExists("mutator")) { - - self.data = self.table.modules.mutator.transformRow(data, "data"); - } else { - - self.data = data; - } - }; - - //update the rows data - - Row.prototype.updateData = function (data) { - var _this5 = this; - - var self = this; - - return new Promise(function (resolve, reject) { - - if (typeof data === "string") { - - data = JSON.parse(data); - } - - //mutate incomming data if needed - - if (self.table.modExists("mutator")) { - - data = self.table.modules.mutator.transformRow(data, "data", true); - } - - //set data - - for (var attrname in data) { - - self.data[attrname] = data[attrname]; - } - - //update affected cells only - - for (var attrname in data) { - - var cell = _this5.getCell(attrname); - - if (cell) { - - if (cell.getValue() != data[attrname]) { - - cell.setValueProcessData(data[attrname]); - } - } - } - - //Partial reinitialization if visible - - if (Tabulator.prototype.helpers.elVisible(_this5.element)) { - - self.normalizeHeight(); - - if (self.table.options.rowFormatter) { - - self.table.options.rowFormatter(self.getComponent()); - } - } else { - - _this5.initialized = false; - - _this5.height = 0; - } - - //self.reinitialize(); - - - self.table.options.rowUpdated.call(_this5.table, self.getComponent()); - - resolve(); - }); - }; - - Row.prototype.getData = function (transform) { - - var self = this; - - if (transform) { - - if (self.table.modExists("accessor")) { - - return self.table.modules.accessor.transformRow(self.data, transform); - } - } else { - - return this.data; - } - }; - - Row.prototype.getCell = function (column) { - - var match = false; - - column = this.table.columnManager.findColumn(column); - - match = this.cells.find(function (cell) { - - return cell.column === column; - }); - - return match; - }; - - Row.prototype.getCellIndex = function (findCell) { - - return this.cells.findIndex(function (cell) { - - return cell === findCell; - }); - }; - - Row.prototype.findNextEditableCell = function (index) { - - var nextCell = false; - - if (index < this.cells.length - 1) { - - for (var i = index + 1; i < this.cells.length; i++) { - - var cell = this.cells[i]; - - if (cell.column.modules.edit && Tabulator.prototype.helpers.elVisible(cell.getElement())) { - - var allowEdit = true; - - if (typeof cell.column.modules.edit.check == "function") { - - allowEdit = cell.column.modules.edit.check(cell.getComponent()); - } - - if (allowEdit) { - - nextCell = cell; - - break; - } - } - } - } - - return nextCell; - }; - - Row.prototype.findPrevEditableCell = function (index) { - - var prevCell = false; - - if (index > 0) { - - for (var i = index - 1; i >= 0; i--) { - - var cell = this.cells[i], - allowEdit = true; - - if (cell.column.modules.edit && Tabulator.prototype.helpers.elVisible(cell.getElement())) { - - if (typeof cell.column.modules.edit.check == "function") { - - allowEdit = cell.column.modules.edit.check(cell.getComponent()); - } - - if (allowEdit) { - - prevCell = cell; - - break; - } - } - } - } - - return prevCell; - }; - - Row.prototype.getCells = function () { - - return this.cells; - }; - - Row.prototype.nextRow = function () { - - var row = this.table.rowManager.nextDisplayRow(this, true); - - return row ? row.getComponent() : false; - }; - - Row.prototype.prevRow = function () { - - var row = this.table.rowManager.prevDisplayRow(this, true); - - return row ? row.getComponent() : false; - }; - - ///////////////////// Actions ///////////////////// - - - Row.prototype.delete = function () { - var _this6 = this; - - return new Promise(function (resolve, reject) { - - var index = _this6.table.rowManager.getRowIndex(_this6); - - _this6.deleteActual(); - - if (_this6.table.options.history && _this6.table.modExists("history")) { - - if (index) { - - index = _this6.table.rowManager.rows[index - 1]; - } - - _this6.table.modules.history.action("rowDelete", _this6, { data: _this6.getData(), pos: !index, index: index }); - } - - resolve(); - }); - }; - - Row.prototype.deleteActual = function () { - - var index = this.table.rowManager.getRowIndex(this); - - //deselect row if it is selected - - if (this.table.modExists("selectRow")) { - - this.table.modules.selectRow._deselectRow(this, true); - } - - // if(this.table.options.dataTree && this.table.modExists("dataTree")){ - - // this.table.modules.dataTree.collapseRow(this, true); - - // } - - - this.table.rowManager.deleteRow(this); - - this.deleteCells(); - - this.initialized = false; - - this.heightInitialized = false; - - //remove from group - - if (this.modules.group) { - - this.modules.group.removeRow(this); - } - - //recalc column calculations if present - - if (this.table.modExists("columnCalcs")) { - - if (this.table.options.groupBy && this.table.modExists("groupRows")) { - - this.table.modules.columnCalcs.recalcRowGroup(this); - } else { - - this.table.modules.columnCalcs.recalc(this.table.rowManager.activeRows); - } - } - }; - - Row.prototype.deleteCells = function () { - - var cellCount = this.cells.length; - - for (var i = 0; i < cellCount; i++) { - - this.cells[0].delete(); - } - }; - - Row.prototype.wipe = function () { - - this.deleteCells(); - - // this.element.children().each(function(){ - - // $(this).remove(); - - // }) - - // this.element.empty(); - - - while (this.element.firstChild) { - this.element.removeChild(this.element.firstChild); - } // this.element.remove(); - - if (this.element.parentNode) { - - this.element.parentNode.removeChild(this.element); - } - }; - - Row.prototype.getGroup = function () { - - return this.modules.group || false; - }; - - //////////////// Object Generation ///////////////// - - Row.prototype.getComponent = function () { - - return new RowComponent(this); - }; - - //public row object - - var CellComponent = function CellComponent(cell) { - - this._cell = cell; - }; - - CellComponent.prototype.getValue = function () { - - return this._cell.getValue(); - }; - - CellComponent.prototype.getOldValue = function () { - - return this._cell.getOldValue(); - }; - - CellComponent.prototype.getElement = function () { - - return this._cell.getElement(); - }; - - CellComponent.prototype.getRow = function () { - - return this._cell.row.getComponent(); - }; - - CellComponent.prototype.getData = function () { - - return this._cell.row.getData(); - }; - - CellComponent.prototype.getField = function () { - - return this._cell.column.getField(); - }; - - CellComponent.prototype.getColumn = function () { - - return this._cell.column.getComponent(); - }; - - CellComponent.prototype.setValue = function (value, mutate) { - - if (typeof mutate == "undefined") { - - mutate = true; - } - - this._cell.setValue(value, mutate); - }; - - CellComponent.prototype.restoreOldValue = function () { - - this._cell.setValueActual(this._cell.getOldValue()); - }; - - CellComponent.prototype.edit = function (force) { - - return this._cell.edit(force); - }; - - CellComponent.prototype.cancelEdit = function () { - - this._cell.cancelEdit(); - }; - - CellComponent.prototype.nav = function () { - - return this._cell.nav(); - }; - - CellComponent.prototype.checkHeight = function () { - - this._cell.checkHeight(); - }; - - CellComponent.prototype.getTable = function () { - - return this._cell.table; - }; - - CellComponent.prototype._getSelf = function () { - - return this._cell; - }; - - var Cell = function Cell(column, row) { - - this.table = column.table; - - this.column = column; - - this.row = row; - - this.element = null; - - this.value = null; - - this.oldValue = null; - - this.height = null; - - this.width = null; - - this.minWidth = null; - - this.build(); - }; - - //////////////// Setup Functions ///////////////// - - - //generate element - - Cell.prototype.build = function () { - - this.generateElement(); - - this.setWidth(this.column.width); - - this._configureCell(); - - this.setValueActual(this.column.getFieldValue(this.row.data)); - }; - - Cell.prototype.generateElement = function () { - - this.element = document.createElement('div'); - - this.element.className = "tabulator-cell"; - - this.element.setAttribute("role", "gridcell"); - - this.element = this.element; - }; - - Cell.prototype._configureCell = function () { - - var self = this, - cellEvents = self.column.cellEvents, - element = self.element, - field = this.column.getField(), - dblTap, - tapHold, - tap; - - //set text alignment - - element.style.textAlign = self.column.hozAlign; - - if (field) { - - element.setAttribute("tabulator-field", field); - } - - if (self.column.definition.cssClass) { - - element.classList.add(self.column.definition.cssClass); - } - - //set event bindings - - if (cellEvents.cellClick || self.table.options.cellClick) { - - self.element.addEventListener("click", function (e) { - - var component = self.getComponent(); - - if (cellEvents.cellClick) { - - cellEvents.cellClick.call(self.table, e, component); - } - - if (self.table.options.cellClick) { - - self.table.options.cellClick.call(self.table, e, component); - } - }); - } - - if (cellEvents.cellDblClick || this.table.options.cellDblClick) { - - element.addEventListener("dblclick", function (e) { - - var component = self.getComponent(); - - if (cellEvents.cellDblClick) { - - cellEvents.cellDblClick.call(self.table, e, component); - } - - if (self.table.options.cellDblClick) { - - self.table.options.cellDblClick.call(self.table, e, component); - } - }); - } - - if (cellEvents.cellContext || this.table.options.cellContext) { - - element.addEventListener("contextmenu", function (e) { - - var component = self.getComponent(); - - if (cellEvents.cellContext) { - - cellEvents.cellContext.call(self.table, e, component); - } - - if (self.table.options.cellContext) { - - self.table.options.cellContext.call(self.table, e, component); - } - }); - } - - if (this.table.options.tooltipGenerationMode === "hover") { - - //update tooltip on mouse enter - - element.addEventListener("mouseenter", function (e) { - - self._generateTooltip(); - }); - } - - if (cellEvents.cellTap || this.table.options.cellTap) { - - tap = false; - - element.addEventListener("touchstart", function (e) { - - tap = true; - }); - - element.addEventListener("touchend", function (e) { - - if (tap) { - - var component = self.getComponent(); - - if (cellEvents.cellTap) { - - cellEvents.cellTap.call(self.table, e, component); - } - - if (self.table.options.cellTap) { - - self.table.options.cellTap.call(self.table, e, component); - } - } - - tap = false; - }); - } - - if (cellEvents.cellDblTap || this.table.options.cellDblTap) { - - dblTap = null; - - element.addEventListener("touchend", function (e) { - - if (dblTap) { - - clearTimeout(dblTap); - - dblTap = null; - - var component = self.getComponent(); - - if (cellEvents.cellDblTap) { - - cellEvents.cellDblTap.call(self.table, e, component); - } - - if (self.table.options.cellDblTap) { - - self.table.options.cellDblTap.call(self.table, e, component); - } - } else { - - dblTap = setTimeout(function () { - - clearTimeout(dblTap); - - dblTap = null; - }, 300); - } - }); - } - - if (cellEvents.cellTapHold || this.table.options.cellTapHold) { - - tapHold = null; - - element.addEventListener("touchstart", function (e) { - - clearTimeout(tapHold); - - tapHold = setTimeout(function () { - - clearTimeout(tapHold); - - tapHold = null; - - tap = false; - - var component = self.getComponent(); - - if (cellEvents.cellTapHold) { - - cellEvents.cellTapHold.call(self.table, e, component); - } - - if (self.table.options.cellTapHold) { - - self.table.options.cellTapHold.call(self.table, e, component); - } - }, 1000); - }); - - element.addEventListener("touchend", function (e) { - - clearTimeout(tapHold); - - tapHold = null; - }); - } - - if (self.column.modules.edit) { - - self.table.modules.edit.bindEditor(self); - } - - if (self.column.definition.rowHandle && self.table.options.movableRows !== false && self.table.modExists("moveRow")) { - - self.table.modules.moveRow.initializeCell(self); - } - - //hide cell if not visible - - if (!self.column.visible) { - - self.hide(); - } - }; - - //generate cell contents - - Cell.prototype._generateContents = function () { - - var val; - - if (this.table.modExists("format")) { - - val = this.table.modules.format.formatValue(this); - } else { - - val = this.element.innerHTML = this.value; - } - - switch (typeof val === 'undefined' ? 'undefined' : _typeof(val)) { - - case "object": - - if (val instanceof Node) { - - this.element.appendChild(val); - } else { - - this.element.innerHTML = ""; - - console.warn("Format Error - Formatter has returned a type of object, the only valid formatter object return is an instance of Node, the formatter returned:", val); - } - - break; - - case "undefined": - - case "null": - - this.element.innerHTML = ""; - - break; - - default: - - this.element.innerHTML = val; - - } - }; - - Cell.prototype.cellRendered = function () { - - if (this.table.modExists("format") && this.table.modules.format.cellRendered) { - - this.table.modules.format.cellRendered(this); - } - }; - - //generate tooltip text - - Cell.prototype._generateTooltip = function () { - - var tooltip = this.column.tooltip; - - if (tooltip) { - - if (tooltip === true) { - - tooltip = this.value; - } else if (typeof tooltip == "function") { - - tooltip = tooltip(this.getComponent()); - - if (tooltip === false) { - - tooltip = ""; - } - } - - if (typeof tooltip === "undefined") { - - tooltip = ""; - } - - this.element.setAttribute("title", tooltip); - } else { - - this.element.setAttribute("title", ""); - } - }; - - //////////////////// Getters //////////////////// - - Cell.prototype.getElement = function () { - - return this.element; - }; - - Cell.prototype.getValue = function () { - - return this.value; - }; - - Cell.prototype.getOldValue = function () { - - return this.oldValue; - }; - - //////////////////// Actions //////////////////// - - - Cell.prototype.setValue = function (value, mutate) { - - var changed = this.setValueProcessData(value, mutate), - component; - - if (changed) { - - if (this.table.options.history && this.table.modExists("history")) { - - this.table.modules.history.action("cellEdit", this, { oldValue: this.oldValue, newValue: this.value }); - } - - component = this.getComponent(); - - if (this.column.cellEvents.cellEdited) { - - this.column.cellEvents.cellEdited.call(this.table, component); - } - - this.table.options.cellEdited.call(this.table, component); - - this.table.options.dataEdited.call(this.table, this.table.rowManager.getData()); - } - - if (this.table.modExists("columnCalcs")) { - - if (this.column.definition.topCalc || this.column.definition.bottomCalc) { - - if (this.table.options.groupBy && this.table.modExists("groupRows")) { - - this.table.modules.columnCalcs.recalcRowGroup(this.row); - } else { - - this.table.modules.columnCalcs.recalc(this.table.rowManager.activeRows); - } - } - } - }; - - Cell.prototype.setValueProcessData = function (value, mutate) { - - var changed = false; - - if (this.value != value) { - - changed = true; - - if (mutate) { - - if (this.column.modules.mutate) { - - value = this.table.modules.mutator.transformCell(this, value); - } - } - } - - this.setValueActual(value); - - return changed; - }; - - Cell.prototype.setValueActual = function (value) { - - this.oldValue = this.value; - - this.value = value; - - this.column.setFieldValue(this.row.data, value); - - this._generateContents(); - - this._generateTooltip(); - - //set resizable handles - - if (this.table.options.resizableColumns && this.table.modExists("resizeColumns")) { - - this.table.modules.resizeColumns.initializeColumn("cell", this.column, this.element); - } - - //handle frozen cells - - if (this.table.modExists("frozenColumns")) { - - this.table.modules.frozenColumns.layoutElement(this.element, this.column); - } - }; - - Cell.prototype.setWidth = function (width) { - - this.width = width; - - // this.element.css("width", width || ""); - - this.element.style.width = width ? width + "px" : ""; - }; - - Cell.prototype.getWidth = function () { - - return this.width || this.element.offsetWidth; - }; - - Cell.prototype.setMinWidth = function (minWidth) { - - this.minWidth = minWidth; - - this.element.style.minWidth = minWidth ? minWidth + "px" : ""; - }; - - Cell.prototype.checkHeight = function () { - - // var height = this.element.css("height"); - - - this.row.reinitializeHeight(); - }; - - Cell.prototype.clearHeight = function () { - - this.element.style.height = ""; - - this.height = null; - }; - - Cell.prototype.setHeight = function (height) { - - this.height = height; - - this.element.style.height = height ? height + "px" : ""; - }; - - Cell.prototype.getHeight = function () { - - return this.height || this.element.offsetHeight; - }; - - Cell.prototype.show = function () { - - this.element.style.display = ""; - }; - - Cell.prototype.hide = function () { - - this.element.style.display = "none"; - }; - - Cell.prototype.edit = function (force) { - - if (this.table.modExists("edit", true)) { - - return this.table.modules.edit.editCell(this, force); - } - }; - - Cell.prototype.cancelEdit = function () { - - if (this.table.modExists("edit", true)) { - - var editing = this.table.modules.edit.getCurrentCell(); - - if (editing && editing._getSelf() === this) { - - this.table.modules.edit.cancelEdit(); - } else { - - console.warn("Cancel Editor Error - This cell is not currently being edited "); - } - } - }; - - Cell.prototype.delete = function () { - - this.element.parentNode.removeChild(this.element); - - this.column.deleteCell(this); - - this.row.deleteCell(this); - }; - - //////////////// Navigation ///////////////// - - - Cell.prototype.nav = function () { - - var self = this, - nextCell = false, - index = this.row.getCellIndex(this); - - return { - - next: function next() { - - var nextCell = this.right(), - nextRow; - - if (!nextCell) { - - nextRow = self.table.rowManager.nextDisplayRow(self.row, true); - - if (nextRow) { - - nextCell = nextRow.findNextEditableCell(-1); - - if (nextCell) { - - nextCell.edit(); - - return true; - } - } - } else { - - return true; - } - - return false; - }, - - prev: function prev() { - - var nextCell = this.left(), - prevRow; - - if (!nextCell) { - - prevRow = self.table.rowManager.prevDisplayRow(self.row, true); - - if (prevRow) { - - nextCell = prevRow.findPrevEditableCell(prevRow.cells.length); - - if (nextCell) { - - nextCell.edit(); - - return true; - } - } - } else { - - return true; - } - - return false; - }, - - left: function left() { - - nextCell = self.row.findPrevEditableCell(index); - - if (nextCell) { - - nextCell.edit(); - - return true; - } else { - - return false; - } - }, - - right: function right() { - - nextCell = self.row.findNextEditableCell(index); - - if (nextCell) { - - nextCell.edit(); - - return true; - } else { - - return false; - } - }, - - up: function up() { - - var nextRow = self.table.rowManager.prevDisplayRow(self.row, true); - - if (nextRow) { - - nextRow.cells[index].edit(); - } - }, - - down: function down() { - - var nextRow = self.table.rowManager.nextDisplayRow(self.row, true); - - if (nextRow) { - - nextRow.cells[index].edit(); - } - } - - }; - }; - - Cell.prototype.getIndex = function () { - - this.row.getCellIndex(this); - }; - - //////////////// Object Generation ///////////////// - - Cell.prototype.getComponent = function () { - - return new CellComponent(this); - }; - - var FooterManager = function FooterManager(table) { - - this.table = table; - - this.active = false; - - this.element = this.createElement(); //containing element - - this.external = false; - - this.links = []; - - this._initialize(); - }; - - FooterManager.prototype.createElement = function () { - - var el = document.createElement("div"); - - el.classList.add("tabulator-footer"); - - return el; - }; - - FooterManager.prototype._initialize = function (element) { - - if (this.table.options.footerElement) { - - switch (_typeof(this.table.options.footerElement)) { - - case "string": - - if (this.table.options.footerElement[0] === "<") { - - this.element.innerHTML = this.table.options.footerElement; - } else { - - this.external = true; - - this.element = document.querySelector(this.table.options.footerElement); - } - - break; - - default: - - this.element = this.table.options.footerElement; - - break; - - } - } - }; - - FooterManager.prototype.getElement = function () { - - return this.element; - }; - - FooterManager.prototype.append = function (element, parent) { - - this.activate(parent); - - this.element.appendChild(element); - - this.table.rowManager.adjustTableSize(); - }; - - FooterManager.prototype.prepend = function (element, parent) { - - this.activate(parent); - - this.element.insertBefore(element, this.element.firstChild); - - this.table.rowManager.adjustTableSize(); - }; - - FooterManager.prototype.remove = function (element) { - - element.parentNode.removeChild(element); - - this.deactivate(); - }; - - FooterManager.prototype.deactivate = function (force) { - - if (!this.element.firstChild || force) { - - if (!this.external) { - - this.element.parentNode.removeChild(this.element); - } - - this.active = false; - } - - // this.table.rowManager.adjustTableSize(); - }; - - FooterManager.prototype.activate = function (parent) { - - if (!this.active) { - - this.active = true; - - if (!this.external) { - - this.table.element.appendChild(this.getElement()); - - this.table.element.style.display = ''; - } - } - - if (parent) { - - this.links.push(parent); - } - }; - - FooterManager.prototype.redraw = function () { - - this.links.forEach(function (link) { - - link.footerRedraw(); - }); - }; - - var Tabulator = function Tabulator(element, options) { - - this.options = {}; - - this.columnManager = null; // hold Column Manager - - this.rowManager = null; //hold Row Manager - - this.footerManager = null; //holder Footer Manager - - this.browser = ""; //hold current browser type - - this.browserSlow = false; //handle reduced functionality for slower browsers - - - this.modules = {}; //hold all modules bound to this table - - - this.initializeElement(element); - - this.initializeOptions(options || {}); - - this._create(); - - Tabulator.prototype.comms.register(this); //register table for inderdevice communication - }; - - //default setup options - - Tabulator.prototype.defaultOptions = { - - height: false, //height of tabulator - - - layout: "fitData", ///layout type "fitColumns" | "fitData" - - layoutColumnsOnNewData: false, //update column widths on setData - - - columnMinWidth: 40, //minimum global width for a column - - columnVertAlign: "top", //vertical alignment of column headers - - - resizableColumns: true, //resizable columns - - resizableRows: false, //resizable rows - - autoResize: true, //auto resize table - - - columns: [], //store for colum header info - - - data: [], //default starting data - - - nestedFieldSeparator: ".", //seperatpr for nested data - - - tooltips: false, //Tool tip value - - tooltipsHeader: false, //Tool tip for headers - - tooltipGenerationMode: "load", //when to generate tooltips - - - initialSort: false, //initial sorting criteria - - initialFilter: false, //initial filtering criteria - - - columnHeaderSortMulti: true, //multiple or single column sorting - - - sortOrderReverse: false, //reverse internal sort ordering - - - footerElement: false, //hold footer element - - - index: "id", //filed for row index - - - keybindings: [], //array for keybindings - - - clipboard: false, //enable clipboard - - clipboardCopyStyled: true, //formatted table data - - clipboardCopySelector: "active", //method of chosing which data is coppied to the clipboard - - clipboardCopyFormatter: "table", //convert data to a clipboard string - - clipboardPasteParser: "table", //convert pasted clipboard data to rows - - clipboardPasteAction: "insert", //how to insert pasted data into the table - - clipboardCopyConfig: false, //clipboard config - - - clipboardCopied: function clipboardCopied() {}, //data has been copied to the clipboard - - clipboardPasted: function clipboardPasted() {}, //data has been pasted into the table - - clipboardPasteError: function clipboardPasteError() {}, //data has not successfully been pasted into the table - - - downloadDataFormatter: false, //function to manipulate table data before it is downloaded - - downloadReady: function downloadReady(data, blob) { - return blob; - }, //function to manipulate download data - - downloadComplete: false, //function to manipulate download data - - downloadConfig: false, //download config - - - dataTree: false, //enable data tree - - dataTreeBranchElement: true, //show data tree branch element - - dataTreeChildIndent: 9, //data tree child indent in px - - dataTreeChildField: "_children", //data tre column field to look for child rows - - dataTreeCollapseElement: false, //data tree row collapse element - - dataTreeExpandElement: false, //data tree row expand element - - dataTreeStartExpanded: false, - - dataTreeRowExpanded: function dataTreeRowExpanded() {}, //row has been expanded - - dataTreeRowCollapsed: function dataTreeRowCollapsed() {}, //row has been collapsed - - - addRowPos: "bottom", //position to insert blank rows, top|bottom - - - selectable: "highlight", //highlight rows on hover - - selectableRangeMode: "drag", //highlight rows on hover - - selectableRollingSelection: true, //roll selection once maximum number of selectable rows is reached - - selectablePersistence: true, // maintain selection when table view is updated - - selectableCheck: function selectableCheck(data, row) { - return true; - }, //check wheather row is selectable - - - headerFilterPlaceholder: false, //placeholder text to display in header filters - - - history: false, //enable edit history - - - locale: false, //current system language - - langs: {}, - - virtualDom: true, //enable DOM virtualization - - - persistentLayout: false, //store column layout in memory - - persistentSort: false, //store sorting in memory - - persistentFilter: false, //store filters in memory - - persistenceID: "", //key for persistent storage - - persistenceMode: true, //mode for storing persistence information - - - responsiveLayout: false, //responsive layout flags - - responsiveLayoutCollapseStartOpen: true, //start showing collapsed data - - responsiveLayoutCollapseUseFormatters: true, //responsive layout collapse formatter - - responsiveLayoutCollapseFormatter: false, //responsive layout collapse formatter - - - pagination: false, //set pagination type - - paginationSize: false, //set number of rows to a page - - paginationButtonCount: 5, // set count of page button - - paginationElement: false, //element to hold pagination numbers - - paginationDataSent: {}, //pagination data sent to the server - - paginationDataReceived: {}, //pagination data received from the server - - paginationAddRow: "page", //add rows on table or page - - - ajaxURL: false, //url for ajax loading - - ajaxURLGenerator: false, - - ajaxParams: {}, //params for ajax loading - - ajaxConfig: "get", //ajax request type - - ajaxContentType: "form", //ajax request type - - ajaxRequestFunc: false, //promise function - - ajaxLoader: true, //show loader - - ajaxLoaderLoading: false, //loader element - - ajaxLoaderError: false, //loader element - - ajaxFiltering: false, - - ajaxSorting: false, - - ajaxProgressiveLoad: false, //progressive loading - - ajaxProgressiveLoadDelay: 0, //delay between requests - - ajaxProgressiveLoadScrollMargin: 0, //margin before scroll begins - - - groupBy: false, //enable table grouping and set field to group by - - groupStartOpen: true, //starting state of group - - groupValues: false, - - groupHeader: false, //header generation function - - - movableColumns: false, //enable movable columns - - - movableRows: false, //enable movable rows - - movableRowsConnectedTables: false, //tables for movable rows to be connected to - - movableRowsSender: false, - - movableRowsReceiver: "insert", - - movableRowsSendingStart: function movableRowsSendingStart() {}, - - movableRowsSent: function movableRowsSent() {}, - - movableRowsSentFailed: function movableRowsSentFailed() {}, - - movableRowsSendingStop: function movableRowsSendingStop() {}, - - movableRowsReceivingStart: function movableRowsReceivingStart() {}, - - movableRowsReceived: function movableRowsReceived() {}, - - movableRowsReceivedFailed: function movableRowsReceivedFailed() {}, - - movableRowsReceivingStop: function movableRowsReceivingStop() {}, - - scrollToRowPosition: "top", - - scrollToRowIfVisible: true, - - scrollToColumnPosition: "left", - - scrollToColumnIfVisible: true, - - rowFormatter: false, - - placeholder: false, - - //table building callbacks - - tableBuilding: function tableBuilding() {}, - - tableBuilt: function tableBuilt() {}, - - //render callbacks - - renderStarted: function renderStarted() {}, - - renderComplete: function renderComplete() {}, - - //row callbacks - - rowClick: false, - - rowDblClick: false, - - rowContext: false, - - rowTap: false, - - rowDblTap: false, - - rowTapHold: false, - - rowAdded: function rowAdded() {}, - - rowDeleted: function rowDeleted() {}, - - rowMoved: function rowMoved() {}, - - rowUpdated: function rowUpdated() {}, - - rowSelectionChanged: function rowSelectionChanged() {}, - - rowSelected: function rowSelected() {}, - - rowDeselected: function rowDeselected() {}, - - rowResized: function rowResized() {}, - - //cell callbacks - - //row callbacks - - cellClick: false, - - cellDblClick: false, - - cellContext: false, - - cellTap: false, - - cellDblTap: false, - - cellTapHold: false, - - cellEditing: function cellEditing() {}, - - cellEdited: function cellEdited() {}, - - cellEditCancelled: function cellEditCancelled() {}, - - //column callbacks - - columnMoved: false, - - columnResized: function columnResized() {}, - - columnTitleChanged: function columnTitleChanged() {}, - - columnVisibilityChanged: function columnVisibilityChanged() {}, - - //HTML iport callbacks - - htmlImporting: function htmlImporting() {}, - - htmlImported: function htmlImported() {}, - - //data callbacks - - dataLoading: function dataLoading() {}, - - dataLoaded: function dataLoaded() {}, - - dataEdited: function dataEdited() {}, - - //ajax callbacks - - ajaxRequesting: function ajaxRequesting() {}, - - ajaxResponse: false, - - ajaxError: function ajaxError() {}, - - //filtering callbacks - - dataFiltering: false, - - dataFiltered: false, - - //sorting callbacks - - dataSorting: function dataSorting() {}, - - dataSorted: function dataSorted() {}, - - //grouping callbacks - - groupToggleElement: "arrow", - - groupClosedShowCalcs: false, - - dataGrouping: function dataGrouping() {}, - - dataGrouped: false, - - groupVisibilityChanged: function groupVisibilityChanged() {}, - - groupClick: false, - - groupDblClick: false, - - groupContext: false, - - groupTap: false, - - groupDblTap: false, - - groupTapHold: false, - - columnCalcs: true, - - //pagination callbacks - - pageLoaded: function pageLoaded() {}, - - //localization callbacks - - localized: function localized() {}, - - //validation has failed - - validationFailed: function validationFailed() {}, - - //history callbacks - - historyUndo: function historyUndo() {}, - - historyRedo: function historyRedo() {} - - }; - - Tabulator.prototype.initializeOptions = function (options) { - - for (var key in this.defaultOptions) { - - if (key in options) { - - this.options[key] = options[key]; - } else { - - if (Array.isArray(this.defaultOptions[key])) { - - this.options[key] = []; - } else if (_typeof(this.defaultOptions[key]) === "object") { - - this.options[key] = {}; - } else { - - this.options[key] = this.defaultOptions[key]; - } - } - } - }; - - Tabulator.prototype.initializeElement = function (element) { - - if (element instanceof HTMLElement) { - - this.element = element; - - return true; - } else if (typeof element === "string") { - - this.element = document.querySelector(element); - - if (this.element) { - - return true; - } else { - - console.error("Tabulator Creation Error - no element found matching selector: ", element); - - return false; - } - } else { - - console.error("Tabulator Creation Error - Invalid element provided:", element); - - return false; - } - }; - - //convert depricated functionality to new functions - - Tabulator.prototype._mapDepricatedFunctionality = function () {}; - - //concreate table - - Tabulator.prototype._create = function () { - - this._clearObjectPointers(); - - this._mapDepricatedFunctionality(); - - this.bindModules(); - - if (this.element.tagName === "TABLE") { - - if (this.modExists("htmlTableImport", true)) { - - this.modules.htmlTableImport.parseTable(); - } - } - - this.columnManager = new ColumnManager(this); - - this.rowManager = new RowManager(this); - - this.footerManager = new FooterManager(this); - - this.columnManager.setRowManager(this.rowManager); - - this.rowManager.setColumnManager(this.columnManager); - - this._buildElement(); - - this._loadInitialData(); - }; - - //clear pointers to objects in default config object - - Tabulator.prototype._clearObjectPointers = function () { - - this.options.columns = this.options.columns.slice(0); - - this.options.data = this.options.data.slice(0); - }; - - //build tabulator element - - Tabulator.prototype._buildElement = function () { - - var element = this.element, - mod = this.modules, - options = this.options; - - options.tableBuilding.call(this); - - element.classList.add("tabulator"); - - element.setAttribute("role", "grid"); - - //empty element - - while (element.firstChild) { - element.removeChild(element.firstChild); - } //set table height - - if (options.height) { - - options.height = isNaN(options.height) ? options.height : options.height + "px"; - - element.style.height = options.height; - } - - this.rowManager.initialize(); - - this._detectBrowser(); - - if (this.modExists("layout", true)) { - - mod.layout.initialize(options.layout); - } - - //set localization - - if (options.headerFilterPlaceholder !== false) { - - mod.localize.setHeaderFilterPlaceholder(options.headerFilterPlaceholder); - } - - for (var locale in options.langs) { - - mod.localize.installLang(locale, options.langs[locale]); - } - - mod.localize.setLocale(options.locale); - - //configure placeholder element - - if (typeof options.placeholder == "string") { - - var el = document.createElement("div"); - - el.classList.add("tabulator-placeholder"); - - var span = document.createElement("span"); - - span.innerHTML = options.placeholder; - - el.appendChild(span); - - options.placeholder = el; - } - - //build table elements - - element.appendChild(this.columnManager.getElement()); - - element.appendChild(this.rowManager.getElement()); - - if (options.footerElement) { - - this.footerManager.activate(); - } - - if (options.dataTree && this.modExists("dataTree", true)) { - - mod.dataTree.initialize(); - } - - if ((options.persistentLayout || options.persistentSort || options.persistentFilter) && this.modExists("persistence", true)) { - - mod.persistence.initialize(options.persistenceMode, options.persistenceID); - } - - if (options.persistentLayout && this.modExists("persistence", true)) { - - options.columns = mod.persistence.load("columns", options.columns); - } - - if (options.movableRows && this.modExists("moveRow")) { - - mod.moveRow.initialize(); - } - - if (this.modExists("columnCalcs")) { - - mod.columnCalcs.initialize(); - } - - this.columnManager.setColumns(options.columns); - - if (this.modExists("frozenRows")) { - - this.modules.frozenRows.initialize(); - } - - if ((options.persistentSort || options.initialSort) && this.modExists("sort", true)) { - - var sorters = []; - - if (options.persistentSort && this.modExists("persistence", true)) { - - sorters = mod.persistence.load("sort"); - - if (sorters === false && options.initialSort) { - - sorters = options.initialSort; - } - } else if (options.initialSort) { - - sorters = options.initialSort; - } - - mod.sort.setSort(sorters); - } - - if ((options.persistentFilter || options.initialFilter) && this.modExists("filter", true)) { - - var filters = []; - - if (options.persistentFilter && this.modExists("persistence", true)) { - - filters = mod.persistence.load("filter"); - - if (filters === false && options.initialFilter) { - - filters = options.initialFilter; - } - } else if (options.initialFilter) { - - filters = options.initialFilter; - } - - mod.filter.setFilter(filters); - - // this.setFilter(filters); - } - - if (this.modExists("ajax")) { - - mod.ajax.initialize(); - } - - if (options.pagination && this.modExists("page", true)) { - - mod.page.initialize(); - } - - if (options.groupBy && this.modExists("groupRows", true)) { - - mod.groupRows.initialize(); - } - - if (this.modExists("keybindings")) { - - mod.keybindings.initialize(); - } - - if (this.modExists("selectRow")) { - - mod.selectRow.clearSelectionData(true); - } - - if (options.autoResize && this.modExists("resizeTable")) { - - mod.resizeTable.initialize(); - } - - if (this.modExists("clipboard")) { - - mod.clipboard.initialize(); - } - - options.tableBuilt.call(this); - }; - - Tabulator.prototype._loadInitialData = function () { - - var self = this; - - if (self.options.pagination && self.modExists("page")) { - - self.modules.page.reset(true); - - if (self.options.pagination == "local") { - - if (self.options.data.length) { - - self.rowManager.setData(self.options.data); - } else { - - if ((self.options.ajaxURL || self.options.ajaxURLGenerator) && self.modExists("ajax")) { - - self.modules.ajax.loadData(); - } else { - - self.rowManager.setData(self.options.data); - } - } - } else { - - self.modules.page.setPage(1); - } - } else { - - if (self.options.data.length) { - - self.rowManager.setData(self.options.data); - } else { - - if ((self.options.ajaxURL || self.options.ajaxURLGenerator) && self.modExists("ajax")) { - - self.modules.ajax.loadData(); - } else { - - self.rowManager.setData(self.options.data); - } - } - } - }; - - //deconstructor - - Tabulator.prototype.destroy = function () { - - var element = this.element; - - Tabulator.prototype.comms.deregister(this); //deregister table from inderdevice communication - - - //clear row data - - this.rowManager.rows.forEach(function (row) { - - row.wipe(); - }); - - this.rowManager.rows = []; - - this.rowManager.activeRows = []; - - this.rowManager.displayRows = []; - - //clear event bindings - - if (this.options.autoResize && this.modExists("resizeTable")) { - - this.modules.resizeTable.clearBindings(); - } - - if (this.modExists("keybindings")) { - - this.modules.keybindings.clearBindings(); - } - - //clear DOM - - while (element.firstChild) { - element.removeChild(element.firstChild); - }element.classList.remove("tabulator"); - }; - - Tabulator.prototype._detectBrowser = function () { - - var ua = navigator.userAgent; - - if (ua.indexOf("Trident") > -1) { - - this.browser = "ie"; - - this.browserSlow = true; - } else if (ua.indexOf("Edge") > -1) { - - this.browser = "edge"; - - this.browserSlow = true; - } else if (ua.indexOf("Firefox") > -1) { - - this.browser = "firefox"; - - this.browserSlow = false; - } else { - - this.browser = "other"; - - this.browserSlow = false; - } - }; - - ////////////////// Data Handling ////////////////// - - - //load data - - Tabulator.prototype.setData = function (data, params, config) { - - if (this.modExists("ajax")) { - - this.modules.ajax.blockActiveRequest(); - } - - return this._setData(data, params, config); - }; - - Tabulator.prototype._setData = function (data, params, config, inPosition) { - - var self = this; - - if (typeof data === "string") { - - if (data.indexOf("{") == 0 || data.indexOf("[") == 0) { - - //data is a json encoded string - - return self.rowManager.setData(JSON.parse(data), inPosition); - } else { - - if (self.modExists("ajax", true)) { - - if (params) { - - self.modules.ajax.setParams(params); - } - - if (config) { - - self.modules.ajax.setConfig(config); - } - - self.modules.ajax.setUrl(data); - - if (self.options.pagination == "remote" && self.modExists("page", true)) { - - self.modules.page.reset(true); - - return self.modules.page.setPage(1); - } else { - - //assume data is url, make ajax call to url to get data - - return self.modules.ajax.loadData(inPosition); - } - } - } - } else { - - if (data) { - - //asume data is already an object - - return self.rowManager.setData(data, inPosition); - } else { - - //no data provided, check if ajaxURL is present; - - if (self.modExists("ajax") && (self.modules.ajax.getUrl || self.options.ajaxURLGenerator)) { - - if (self.options.pagination == "remote" && self.modExists("page", true)) { - - self.modules.page.reset(true); - - return self.modules.page.setPage(1); - } else { - - return self.modules.ajax.loadData(inPosition); - } - } else { - - //empty data - - return self.rowManager.setData([], inPosition); - } - } - } - }; - - //clear data - - Tabulator.prototype.clearData = function () { - - if (this.modExists("ajax")) { - - this.modules.ajax.blockActiveRequest(); - } - - this.rowManager.clearData(); - }; - - //get table data array - - Tabulator.prototype.getData = function (active) { - - return this.rowManager.getData(active); - }; - - //get table data array count - - Tabulator.prototype.getDataCount = function (active) { - - return this.rowManager.getDataCount(active); - }; - - //search for specific row components - - Tabulator.prototype.searchRows = function (field, type, value) { - - if (this.modExists("filter", true)) { - - return this.modules.filter.search("rows", field, type, value); - } - }; - - //search for specific data - - Tabulator.prototype.searchData = function (field, type, value) { - - if (this.modExists("filter", true)) { - - return this.modules.filter.search("data", field, type, value); - } - }; - - //get table html - - Tabulator.prototype.getHtml = function (active) { - - return this.rowManager.getHtml(active); - }; - - //retrieve Ajax URL - - Tabulator.prototype.getAjaxUrl = function () { - - if (this.modExists("ajax", true)) { - - return this.modules.ajax.getUrl(); - } - }; - - //replace data, keeping table in position with same sort - - Tabulator.prototype.replaceData = function (data, params, config) { - - if (this.modExists("ajax")) { - - this.modules.ajax.blockActiveRequest(); - } - - return this._setData(data, params, config, true); - }; - - //update table data - - Tabulator.prototype.updateData = function (data) { - var _this7 = this; - - var self = this; - - var responses = 0; - - return new Promise(function (resolve, reject) { - - if (_this7.modExists("ajax")) { - - _this7.modules.ajax.blockActiveRequest(); - } - - if (typeof data === "string") { - - data = JSON.parse(data); - } - - if (data) { - - data.forEach(function (item) { - - var row = self.rowManager.findRow(item[self.options.index]); - - if (row) { - - responses++; - - row.updateData(item).then(function () { - - responses--; - - if (!responses) { - - resolve(); - } - }); - } - }); - } else { - - console.warn("Update Error - No data provided"); - - reject("Update Error - No data provided"); - } - }); - }; - - Tabulator.prototype.addData = function (data, pos, index) { - var _this8 = this; - - return new Promise(function (resolve, reject) { - - if (_this8.modExists("ajax")) { - - _this8.modules.ajax.blockActiveRequest(); - } - - if (typeof data === "string") { - - data = JSON.parse(data); - } - - if (data) { - - _this8.rowManager.addRows(data, pos, index).then(function (rows) { - - var output = []; - - rows.forEach(function (row) { - - output.push(row.getComponent()); - }); - - resolve(output); - }); - } else { - - console.warn("Update Error - No data provided"); - - reject("Update Error - No data provided"); - } - }); - }; - - //update table data - - Tabulator.prototype.updateOrAddData = function (data) { - var _this9 = this; - - var self = this, - rows = [], - responses = 0; - - return new Promise(function (resolve, reject) { - - if (_this9.modExists("ajax")) { - - _this9.modules.ajax.blockActiveRequest(); - } - - if (typeof data === "string") { - - data = JSON.parse(data); - } - - if (data) { - - data.forEach(function (item) { - - var row = self.rowManager.findRow(item[self.options.index]); - - responses++; - - if (row) { - - row.updateData(item).then(function () { - - responses--; - - rows.push(row.getComponent()); - - if (!responses) { - - resolve(rows); - } - }); - } else { - - self.rowManager.addRows(item).then(function (newRows) { - - responses--; - - rows.push(newRows[0].getComponent()); - - if (!responses) { - - resolve(rows); - } - }); - } - }); - } else { - - console.warn("Update Error - No data provided"); - - reject("Update Error - No data provided"); - } - }); - }; - - //get row object - - Tabulator.prototype.getRow = function (index) { - - var row = this.rowManager.findRow(index); - - if (row) { - - return row.getComponent(); - } else { - - console.warn("Find Error - No matching row found:", index); - - return false; - } - }; - - //get row object - - Tabulator.prototype.getRowFromPosition = function (position, active) { - - var row = this.rowManager.getRowFromPosition(position, active); - - if (row) { - - return row.getComponent(); - } else { - - console.warn("Find Error - No matching row found:", position); - - return false; - } - }; - - //delete row from table - - Tabulator.prototype.deleteRow = function (index) { - var _this10 = this; - - return new Promise(function (resolve, reject) { - - var row = _this10.rowManager.findRow(index); - - if (row) { - - row.delete().then(function () { - - resolve(); - }).catch(function (err) { - - reject(err); - }); - } else { - - console.warn("Delete Error - No matching row found:", index); - - reject("Delete Error - No matching row found"); - } - }); - }; - - //add row to table - - Tabulator.prototype.addRow = function (data, pos, index) { - var _this11 = this; - - return new Promise(function (resolve, reject) { - - if (typeof data === "string") { - - data = JSON.parse(data); - } - - _this11.rowManager.addRows(data, pos, index).then(function (rows) { - - //recalc column calculations if present - - if (_this11.modExists("columnCalcs")) { - - _this11.modules.columnCalcs.recalc(_this11.rowManager.activeRows); - } - - resolve(rows[0].getComponent()); - }); - }); - }; - - //update a row if it exitsts otherwise create it - - Tabulator.prototype.updateOrAddRow = function (index, data) { - var _this12 = this; - - return new Promise(function (resolve, reject) { - - var row = _this12.rowManager.findRow(index); - - if (typeof data === "string") { - - data = JSON.parse(data); - } - - if (row) { - - row.updateData(data).then(function () { - - //recalc column calculations if present - - if (_this12.modExists("columnCalcs")) { - - _this12.modules.columnCalcs.recalc(_this12.rowManager.activeRows); - } - - resolve(row.getComponent()); - }).catch(function (err) { - - reject(err); - }); - } else { - - row = _this12.rowManager.addRows(data).then(function (rows) { - - //recalc column calculations if present - - if (_this12.modExists("columnCalcs")) { - - _this12.modules.columnCalcs.recalc(_this12.rowManager.activeRows); - } - - resolve(rows[0].getComponent()); - }).catch(function (err) { - - reject(err); - }); - } - }); - }; - - //update row data - - Tabulator.prototype.updateRow = function (index, data) { - var _this13 = this; - - return new Promise(function (resolve, reject) { - - var row = _this13.rowManager.findRow(index); - - if (typeof data === "string") { - - data = JSON.parse(data); - } - - if (row) { - - row.updateData(data).then(function () { - - resolve(row.getComponent()); - }).catch(function (err) { - - reject(err); - }); - } else { - - console.warn("Update Error - No matching row found:", index); - - reject("Update Error - No matching row found"); - } - }); - }; - - //scroll to row in DOM - - Tabulator.prototype.scrollToRow = function (index, position, ifVisible) { - var _this14 = this; - - return new Promise(function (resolve, reject) { - - var row = _this14.rowManager.findRow(index); - - if (row) { - - _this14.rowManager.scrollToRow(row, position, ifVisible).then(function () { - - resolve(); - }).catch(function (err) { - - reject(err); - }); - } else { - - console.warn("Scroll Error - No matching row found:", index); - - reject("Scroll Error - No matching row found"); - } - }); - }; - - Tabulator.prototype.getRows = function (active) { - - return this.rowManager.getComponents(active); - }; - - //get position of row in table - - Tabulator.prototype.getRowPosition = function (index, active) { - - var row = this.rowManager.findRow(index); - - if (row) { - - return this.rowManager.getRowPosition(row, active); - } else { - - console.warn("Position Error - No matching row found:", index); - - return false; - } - }; - - //copy table data to clipboard - - Tabulator.prototype.copyToClipboard = function (selector, selectorParams, formatter, formatterParams) { - - if (this.modExists("clipboard", true)) { - - this.modules.clipboard.copy(selector, selectorParams, formatter, formatterParams); - } - }; - - /////////////// Column Functions /////////////// - - - Tabulator.prototype.setColumns = function (definition) { - - this.columnManager.setColumns(definition); - }; - - Tabulator.prototype.getColumns = function (structured) { - - return this.columnManager.getComponents(structured); - }; - - Tabulator.prototype.getColumn = function (field) { - - var col = this.columnManager.findColumn(field); - - if (col) { - - return col.getComponent(); - } else { - - console.warn("Find Error - No matching column found:", field); - - return false; - } - }; - - Tabulator.prototype.getColumnDefinitions = function () { - - return this.columnManager.getDefinitionTree(); - }; - - Tabulator.prototype.getColumnLayout = function () { - - if (this.modExists("persistence", true)) { - - return this.modules.persistence.parseColumns(this.columnManager.getColumns()); - } - }; - - Tabulator.prototype.setColumnLayout = function (layout) { - - if (this.modExists("persistence", true)) { - - this.columnManager.setColumns(this.modules.persistence.mergeDefinition(this.options.columns, layout)); - - return true; - } - - return false; - }; - - Tabulator.prototype.showColumn = function (field) { - - var column = this.columnManager.findColumn(field); - - if (column) { - - column.show(); - - if (this.options.responsiveLayout && this.modExists("responsiveLayout", true)) { - - this.modules.responsiveLayout.update(); - } - } else { - - console.warn("Column Show Error - No matching column found:", field); - - return false; - } - }; - - Tabulator.prototype.hideColumn = function (field) { - - var column = this.columnManager.findColumn(field); - - if (column) { - - column.hide(); - - if (this.options.responsiveLayout && this.modExists("responsiveLayout", true)) { - - this.modules.responsiveLayout.update(); - } - } else { - - console.warn("Column Hide Error - No matching column found:", field); - - return false; - } - }; - - Tabulator.prototype.toggleColumn = function (field) { - - var column = this.columnManager.findColumn(field); - - if (column) { - - if (column.visible) { - - column.hide(); - } else { - - column.show(); - } - } else { - - console.warn("Column Visibility Toggle Error - No matching column found:", field); - - return false; - } - }; - - Tabulator.prototype.addColumn = function (definition, before, field) { - - var column = this.columnManager.findColumn(field); - - this.columnManager.addColumn(definition, before, column); - }; - - Tabulator.prototype.deleteColumn = function (field) { - - var column = this.columnManager.findColumn(field); - - if (column) { - - column.delete(); - } else { - - console.warn("Column Delete Error - No matching column found:", field); - - return false; - } - }; - - //scroll to column in DOM - - Tabulator.prototype.scrollToColumn = function (field, position, ifVisible) { - var _this15 = this; - - return new Promise(function (resolve, reject) { - - var column = _this15.columnManager.findColumn(field); - - if (column) { - - _this15.columnManager.scrollToColumn(column, position, ifVisible).then(function () { - - resolve(); - }).catch(function (err) { - - reject(err); - }); - } else { - - console.warn("Scroll Error - No matching column found:", field); - - reject("Scroll Error - No matching column found"); - } - }); - }; - - //////////// Localization Functions //////////// - - Tabulator.prototype.setLocale = function (locale) { - - this.modules.localize.setLocale(locale); - }; - - Tabulator.prototype.getLocale = function () { - - return this.modules.localize.getLocale(); - }; - - Tabulator.prototype.getLang = function (locale) { - - return this.modules.localize.getLang(locale); - }; - - //////////// General Public Functions //////////// - - - //redraw list without updating data - - Tabulator.prototype.redraw = function (force) { - - this.columnManager.redraw(force); - - this.rowManager.redraw(force); - }; - - Tabulator.prototype.setHeight = function (height) { - - this.options.height = isNaN(height) ? height : height + "px"; - - this.element.style.height = this.options.height; - - this.rowManager.redraw(); - }; - - ///////////////////// Sorting //////////////////// - - - //trigger sort - - Tabulator.prototype.setSort = function (sortList, dir) { - - if (this.modExists("sort", true)) { - - this.modules.sort.setSort(sortList, dir); - - this.rowManager.sorterRefresh(); - } - }; - - Tabulator.prototype.getSorters = function () { - - if (this.modExists("sort", true)) { - - return this.modules.sort.getSort(); - } - }; - - Tabulator.prototype.clearSort = function () { - - if (this.modExists("sort", true)) { - - this.modules.sort.clear(); - - this.rowManager.sorterRefresh(); - } - }; - - ///////////////////// Filtering //////////////////// - - - //set standard filters - - Tabulator.prototype.setFilter = function (field, type, value) { - - if (this.modExists("filter", true)) { - - this.modules.filter.setFilter(field, type, value); - - this.rowManager.filterRefresh(); - } - }; - - //add filter to array - - Tabulator.prototype.addFilter = function (field, type, value) { - - if (this.modExists("filter", true)) { - - this.modules.filter.addFilter(field, type, value); - - this.rowManager.filterRefresh(); - } - }; - - //get all filters - - Tabulator.prototype.getFilters = function (all) { - - if (this.modExists("filter", true)) { - - return this.modules.filter.getFilters(all); - } - }; - - Tabulator.prototype.setHeaderFilterFocus = function (field) { - - if (this.modExists("filter", true)) { - - var column = this.columnManager.findColumn(field); - - if (column) { - - this.modules.filter.setHeaderFilterFocus(column); - } else { - - console.warn("Column Filter Focus Error - No matching column found:", field); - - return false; - } - } - }; - - Tabulator.prototype.setHeaderFilterValue = function (field, value) { - - if (this.modExists("filter", true)) { - - var column = this.columnManager.findColumn(field); - - if (column) { - - this.modules.filter.setHeaderFilterValue(column, value); - } else { - - console.warn("Column Filter Error - No matching column found:", field); - - return false; - } - } - }; - - Tabulator.prototype.getHeaderFilters = function () { - - if (this.modExists("filter", true)) { - - return this.modules.filter.getHeaderFilters(); - } - }; - - //remove filter from array - - Tabulator.prototype.removeFilter = function (field, type, value) { - - if (this.modExists("filter", true)) { - - this.modules.filter.removeFilter(field, type, value); - - this.rowManager.filterRefresh(); - } - }; - - //clear filters - - Tabulator.prototype.clearFilter = function (all) { - - if (this.modExists("filter", true)) { - - this.modules.filter.clearFilter(all); - - this.rowManager.filterRefresh(); - } - }; - - //clear header filters - - Tabulator.prototype.clearHeaderFilter = function () { - - if (this.modExists("filter", true)) { - - this.modules.filter.clearHeaderFilter(); - - this.rowManager.filterRefresh(); - } - }; - - ///////////////////// Filtering //////////////////// - - Tabulator.prototype.selectRow = function (rows) { - - if (this.modExists("selectRow", true)) { - - this.modules.selectRow.selectRows(rows); - } - }; - - Tabulator.prototype.deselectRow = function (rows) { - - if (this.modExists("selectRow", true)) { - - this.modules.selectRow.deselectRows(rows); - } - }; - - Tabulator.prototype.toggleSelectRow = function (row) { - - if (this.modExists("selectRow", true)) { - - this.modules.selectRow.toggleRow(row); - } - }; - - Tabulator.prototype.getSelectedRows = function () { - - if (this.modExists("selectRow", true)) { - - return this.modules.selectRow.getSelectedRows(); - } - }; - - Tabulator.prototype.getSelectedData = function () { - - if (this.modExists("selectRow", true)) { - - return this.modules.selectRow.getSelectedData(); - } - }; - - //////////// Pagination Functions //////////// - - - Tabulator.prototype.setMaxPage = function (max) { - - if (this.options.pagination && this.modExists("page")) { - - this.modules.page.setMaxPage(max); - } else { - - return false; - } - }; - - Tabulator.prototype.setPage = function (page) { - - if (this.options.pagination && this.modExists("page")) { - - this.modules.page.setPage(page); - } else { - - return false; - } - }; - - Tabulator.prototype.setPageSize = function (size) { - - if (this.options.pagination && this.modExists("page")) { - - this.modules.page.setPageSize(size); - - this.modules.page.setPage(1); - } else { - - return false; - } - }; - - Tabulator.prototype.getPageSize = function () { - - if (this.options.pagination && this.modExists("page", true)) { - - return this.modules.page.getPageSize(); - } - }; - - Tabulator.prototype.previousPage = function () { - - if (this.options.pagination && this.modExists("page")) { - - this.modules.page.previousPage(); - } else { - - return false; - } - }; - - Tabulator.prototype.nextPage = function () { - - if (this.options.pagination && this.modExists("page")) { - - this.modules.page.nextPage(); - } else { - - return false; - } - }; - - Tabulator.prototype.getPage = function () { - - if (this.options.pagination && this.modExists("page")) { - - return this.modules.page.getPage(); - } else { - - return false; - } - }; - - Tabulator.prototype.getPageMax = function () { - - if (this.options.pagination && this.modExists("page")) { - - return this.modules.page.getPageMax(); - } else { - - return false; - } - }; - - ///////////////// Grouping Functions /////////////// - - - Tabulator.prototype.setGroupBy = function (groups) { - - if (this.modExists("groupRows", true)) { - - this.options.groupBy = groups; - - this.modules.groupRows.initialize(); - - this.rowManager.refreshActiveData("display"); - } else { - - return false; - } - }; - - Tabulator.prototype.setGroupStartOpen = function (values) { - - if (this.modExists("groupRows", true)) { - - this.options.groupStartOpen = values; - - this.modules.groupRows.initialize(); - - if (this.options.groupBy) { - - this.rowManager.refreshActiveData("group"); - } else { - - console.warn("Grouping Update - cant refresh view, no groups have been set"); - } - } else { - - return false; - } - }; - - Tabulator.prototype.setGroupHeader = function (values) { - - if (this.modExists("groupRows", true)) { - - this.options.groupHeader = values; - - this.modules.groupRows.initialize(); - - if (this.options.groupBy) { - - this.rowManager.refreshActiveData("group"); - } else { - - console.warn("Grouping Update - cant refresh view, no groups have been set"); - } - } else { - - return false; - } - }; - - Tabulator.prototype.getGroups = function (values) { - - if (this.modExists("groupRows", true)) { - - return this.modules.groupRows.getGroups(true); - } else { - - return false; - } - }; - - // get grouped table data in the same format as getData() - - Tabulator.prototype.getGroupedData = function () { - - if (this.modExists("groupRows", true)) { - - return this.options.groupBy ? this.modules.groupRows.getGroupedData() : this.getData(); - } - }; - - ///////////////// Column Calculation Functions /////////////// - - Tabulator.prototype.getCalcResults = function () { - - if (this.modExists("columnCalcs", true)) { - - return this.modules.columnCalcs.getResults(); - } else { - - return false; - } - }; - - /////////////// Navigation Management ////////////// - - - Tabulator.prototype.navigatePrev = function () { - - var cell = false; - - if (this.modExists("edit", true)) { - - cell = this.modules.edit.currentCell; - - if (cell) { - - e.preventDefault(); - - return cell.nav().prev(); - } - } - - return false; - }; - - Tabulator.prototype.navigateNext = function () { - - var cell = false; - - if (this.modExists("edit", true)) { - - cell = this.modules.edit.currentCell; - - if (cell) { - - e.preventDefault(); - - return cell.nav().next(); - } - } - - return false; - }; - - Tabulator.prototype.navigateLeft = function () { - - var cell = false; - - if (this.modExists("edit", true)) { - - cell = this.modules.edit.currentCell; - - if (cell) { - - e.preventDefault(); - - return cell.nav().left(); - } - } - - return false; - }; - - Tabulator.prototype.navigateRight = function () { - - var cell = false; - - if (this.modExists("edit", true)) { - - cell = this.modules.edit.currentCell; - - if (cell) { - - e.preventDefault(); - - return cell.nav().right(); - } - } - - return false; - }; - - Tabulator.prototype.navigateUp = function () { - - var cell = false; - - if (this.modExists("edit", true)) { - - cell = this.modules.edit.currentCell; - - if (cell) { - - e.preventDefault(); - - return cell.nav().up(); - } - } - - return false; - }; - - Tabulator.prototype.navigateDown = function () { - - var cell = false; - - if (this.modExists("edit", true)) { - - cell = this.modules.edit.currentCell; - - if (cell) { - - e.preventDefault(); - - return cell.nav().dpwn(); - } - } - - return false; - }; - - /////////////// History Management ////////////// - - Tabulator.prototype.undo = function () { - - if (this.options.history && this.modExists("history", true)) { - - return this.modules.history.undo(); - } else { - - return false; - } - }; - - Tabulator.prototype.redo = function () { - - if (this.options.history && this.modExists("history", true)) { - - return this.modules.history.redo(); - } else { - - return false; - } - }; - - Tabulator.prototype.getHistoryUndoSize = function () { - - if (this.options.history && this.modExists("history", true)) { - - return this.modules.history.getHistoryUndoSize(); - } else { - - return false; - } - }; - - Tabulator.prototype.getHistoryRedoSize = function () { - - if (this.options.history && this.modExists("history", true)) { - - return this.modules.history.getHistoryRedoSize(); - } else { - - return false; - } - }; - - /////////////// Download Management ////////////// - - - Tabulator.prototype.download = function (type, filename, options) { - - if (this.modExists("download", true)) { - - this.modules.download.download(type, filename, options); - } - }; - - /////////// Inter Table Communications /////////// - - - Tabulator.prototype.tableComms = function (table, module, action, data) { - - this.modules.comms.receive(table, module, action, data); - }; - - ////////////// Extension Management ////////////// - - - //object to hold module - - Tabulator.prototype.moduleBindings = {}; - - //extend module - - Tabulator.prototype.extendModule = function (name, property, values) { - - if (Tabulator.prototype.moduleBindings[name]) { - - var source = Tabulator.prototype.moduleBindings[name].prototype[property]; - - if (source) { - - if ((typeof values === 'undefined' ? 'undefined' : _typeof(values)) == "object") { - - for (var key in values) { - - source[key] = values[key]; - } - } else { - - console.warn("Module Error - Invalid value type, it must be an object"); - } - } else { - - console.warn("Module Error - property does not exist:", property); - } - } else { - - console.warn("Module Error - module does not exist:", name); - } - }; - - //add module to tabulator - - Tabulator.prototype.registerModule = function (name, module) { - - var self = this; - - Tabulator.prototype.moduleBindings[name] = module; - }; - - //ensure that module are bound to instantiated function - - Tabulator.prototype.bindModules = function () { - - this.modules = {}; - - for (var name in Tabulator.prototype.moduleBindings) { - - this.modules[name] = new Tabulator.prototype.moduleBindings[name](this); - } - }; - - //Check for module - - Tabulator.prototype.modExists = function (plugin, required) { - - if (this.modules[plugin]) { - - return true; - } else { - - if (required) { - - console.error("Tabulator Module Not Installed: " + plugin); - } - - return false; - } - }; - - Tabulator.prototype.helpers = { - - elVisible: function elVisible(el) { - - return !(el.offsetWidth <= 0 && el.offsetHeight <= 0); - }, - - elOffset: function elOffset(el) { - - var box = el.getBoundingClientRect(); - - return { - - top: box.top + window.pageYOffset - document.documentElement.clientTop, - - left: box.left + window.pageXOffset - document.documentElement.clientLeft - - }; - }, - - deepClone: function deepClone(obj) { - - var clone = Array.isArray(obj) ? [] : {}; - - for (var i in obj) { - - if (obj[i] != null && _typeof(obj[i]) === "object") { - - if (obj[i] instanceof Date) { - - clone[i] = new Date(obj[i]); - } else { - - clone[i] = this.deepClone(obj[i]); - } - } else { - - clone[i] = obj[i]; - } - } - - return clone; - } - - }; - - Tabulator.prototype.comms = { - - tables: [], - - register: function register(table) { - - Tabulator.prototype.comms.tables.push(table); - }, - - deregister: function deregister(table) { - - var index = Tabulator.prototype.comms.tables.indexOf(table); - - if (index > -1) { - - Tabulator.prototype.comms.tables.splice(index, 1); - } - }, - - lookupTable: function lookupTable(query) { - - var results = [], - matches, - match; - - if (typeof query === "string") { - - matches = document.querySelectorAll(query); - - if (matches.length) { - - for (var i = 0; i < matches.length; i++) { - - match = Tabulator.prototype.comms.matchElement(matches[i]); - - if (match) { - - results.push(match); - } - } - } - } else if (query instanceof HTMLElement || query instanceof Tabulator) { - - match = Tabulator.prototype.comms.matchElement(query); - - if (match) { - - results.push(match); - } - } else if (Array.isArray(query)) { - - query.forEach(function (item) { - - results = results.concat(Tabulator.prototype.comms.lookupTable(item)); - }); - } else { - - console.warn("Table Connection Error - Invalid Selector", query); - } - - return results; - }, - - matchElement: function matchElement(element) { - - return Tabulator.prototype.comms.tables.find(function (table) { - - return element instanceof Tabulator ? table === element : table.element === element; - }); - } - - }; - - var Layout = function Layout(table) { - - this.table = table; - - this.mode = null; - }; - - //initialize layout system - - - Layout.prototype.initialize = function (layout) { - - if (this.modes[layout]) { - - this.mode = layout; - } else { - - console.warn("Layout Error - invalid mode set, defaulting to 'fitData' : " + layout); - - this.mode = 'fitData'; - } - - this.table.element.setAttribute("tabulator-layout", this.mode); - }; - - Layout.prototype.getMode = function () { - - return this.mode; - }; - - //trigger table layout - - - Layout.prototype.layout = function () { - - this.modes[this.mode].call(this, this.table.columnManager.columnsByIndex); - }; - - //layout render functions - - - Layout.prototype.modes = { - - //resize columns to fit data the contain - - - "fitData": function fitData(columns) { - - columns.forEach(function (column) { - - column.reinitializeWidth(); - }); - - if (this.table.options.responsiveLayout && this.table.modExists("responsiveLayout", true)) { - - this.table.modules.responsiveLayout.update(); - } - }, - - //resize columns to fit data the contain - - - "fitDataFill": function fitDataFill(columns) { - - columns.forEach(function (column) { - - column.reinitializeWidth(); - }); - - if (this.table.options.responsiveLayout && this.table.modExists("responsiveLayout", true)) { - - this.table.modules.responsiveLayout.update(); - } - }, - - //resize columns to fit - - - "fitColumns": function fitColumns(columns) { - - var self = this; - - var totalWidth = self.table.element.clientWidth; //table element width - - - var fixedWidth = 0; //total width of columns with a defined width - - - var flexWidth = 0; //total width available to flexible columns - - - var flexGrowUnits = 0; //total number of widthGrow blocks accross all columns - - - var flexColWidth = 0; //desired width of flexible columns - - - var flexColumns = []; //array of flexible width columns - - - var fixedShrinkColumns = []; //array of fixed width columns that can shrink - - - var flexShrinkUnits = 0; //total number of widthShrink blocks accross all columns - - - var overflowWidth = 0; //horizontal overflow width - - - var gapFill = 0; //number of pixels to be added to final column to close and half pixel gaps - - - function calcWidth(width) { - - var colWidth; - - if (typeof width == "string") { - - if (width.indexOf("%") > -1) { - - colWidth = totalWidth / 100 * parseInt(width); - } else { - - colWidth = parseInt(width); - } - } else { - - colWidth = width; - } - - return colWidth; - } - - //ensure columns resize to take up the correct amount of space - - - function scaleColumns(columns, freeSpace, colWidth, shrinkCols) { - - var oversizeCols = [], - oversizeSpace = 0, - remainingSpace = 0, - nextColWidth = 0, - gap = 0, - changeUnits = 0, - undersizeCols = []; - - function calcGrow(col) { - - return colWidth * (col.column.definition.widthGrow || 1); - } - - function calcShrink(col) { - - return calcWidth(col.width) - colWidth * (col.column.definition.widthShrink || 0); - } - - columns.forEach(function (col, i) { - - var width = shrinkCols ? calcShrink(col) : calcGrow(col); - - if (col.column.minWidth >= width) { - - oversizeCols.push(col); - } else { - - undersizeCols.push(col); - - changeUnits += shrinkCols ? col.column.definition.widthShrink || 1 : col.column.definition.widthGrow || 1; - } - }); - - if (oversizeCols.length) { - - oversizeCols.forEach(function (col) { - - oversizeSpace += shrinkCols ? col.width - col.column.minWidth : col.column.minWidth; - - col.width = col.column.minWidth; - }); - - remainingSpace = freeSpace - oversizeSpace; - - nextColWidth = changeUnits ? Math.floor(remainingSpace / changeUnits) : remainingSpace; - - gap = remainingSpace - nextColWidth * changeUnits; - - gap += scaleColumns(undersizeCols, remainingSpace, nextColWidth, shrinkCols); - } else { - - gap = changeUnits ? freeSpace - Math.floor(freeSpace / changeUnits) * changeUnits : freeSpace; - - undersizeCols.forEach(function (column) { - - column.width = shrinkCols ? calcShrink(column) : calcGrow(column); - }); - } - - return gap; - } - - if (this.table.options.responsiveLayout && this.table.modExists("responsiveLayout", true)) { - - this.table.modules.responsiveLayout.update(); - } - - //adjust for vertical scrollbar if present - - - if (this.table.rowManager.element.scrollHeight > this.table.rowManager.element.clientHeight) { - - totalWidth -= this.table.rowManager.element.offsetWidth - this.table.rowManager.element.clientWidth; - } - - columns.forEach(function (column) { - - var width, minWidth, colWidth; - - if (column.visible) { - - width = column.definition.width; - - minWidth = parseInt(column.minWidth); - - if (width) { - - colWidth = calcWidth(width); - - fixedWidth += colWidth > minWidth ? colWidth : minWidth; - - if (column.definition.widthShrink) { - - fixedShrinkColumns.push({ - - column: column, - - width: colWidth > minWidth ? colWidth : minWidth - - }); - - flexShrinkUnits += column.definition.widthShrink; - } - } else { - - flexColumns.push({ - - column: column, - - width: 0 - - }); - - flexGrowUnits += column.definition.widthGrow || 1; - } - } - }); - - //calculate available space - - - flexWidth = totalWidth - fixedWidth; - - //calculate correct column size - - - flexColWidth = Math.floor(flexWidth / flexGrowUnits); - - //generate column widths - - - var gapFill = scaleColumns(flexColumns, flexWidth, flexColWidth, false); - - //increase width of last column to account for rounding errors - - - if (flexColumns.length && gapFill > 0) { - - flexColumns[flexColumns.length - 1].width += +gapFill; - } - - //caculate space for columns to be shrunk into - - - flexColumns.forEach(function (col) { - - flexWidth -= col.width; - }); - - overflowWidth = Math.abs(gapFill) + flexWidth; - - //shrink oversize columns if there is no available space - - - if (overflowWidth > 0 && flexShrinkUnits) { - - gapFill = scaleColumns(fixedShrinkColumns, overflowWidth, Math.floor(overflowWidth / flexShrinkUnits), true); - } - - //decrease width of last column to account for rounding errors - - - if (fixedShrinkColumns.length) { - - fixedShrinkColumns[fixedShrinkColumns.length - 1].width -= gapFill; - } - - flexColumns.forEach(function (col) { - - col.column.setWidth(col.width); - }); - - fixedShrinkColumns.forEach(function (col) { - - col.column.setWidth(col.width); - }); - } - - }; - - Tabulator.prototype.registerModule("layout", Layout); - - var Localize = function Localize(table) { - - this.table = table; //hold Tabulator object - - this.locale = "default"; //current locale - - this.lang = false; //current language - - this.bindings = {}; //update events to call when locale is changed - }; - - //set header placehoder - - Localize.prototype.setHeaderFilterPlaceholder = function (placeholder) { - - this.langs.default.headerFilters.default = placeholder; - }; - - //set header filter placeholder by column - - Localize.prototype.setHeaderFilterColumnPlaceholder = function (column, placeholder) { - - this.langs.default.headerFilters.columns[column] = placeholder; - - if (this.lang && !this.lang.headerFilters.columns[column]) { - - this.lang.headerFilters.columns[column] = placeholder; - } - }; - - //setup a lang description object - - Localize.prototype.installLang = function (locale, lang) { - - if (this.langs[locale]) { - - this._setLangProp(this.langs[locale], lang); - } else { - - this.langs[locale] = lang; - } - }; - - Localize.prototype._setLangProp = function (lang, values) { - - for (var key in values) { - - if (lang[key] && _typeof(lang[key]) == "object") { - - this._setLangProp(lang[key], values[key]); - } else { - - lang[key] = values[key]; - } - } - }; - - //set current locale - - Localize.prototype.setLocale = function (desiredLocale) { - - var self = this; - - desiredLocale = desiredLocale || "default"; - - //fill in any matching languge values - - function traverseLang(trans, path) { - - for (var prop in trans) { - - if (_typeof(trans[prop]) == "object") { - - if (!path[prop]) { - - path[prop] = {}; - } - - traverseLang(trans[prop], path[prop]); - } else { - - path[prop] = trans[prop]; - } - } - } - - //determing correct locale to load - - if (desiredLocale === true && navigator.language) { - - //get local from system - - desiredLocale = navigator.language.toLowerCase(); - } - - if (desiredLocale) { - - //if locale is not set, check for matching top level locale else use default - - if (!self.langs[desiredLocale]) { - - var prefix = desiredLocale.split("-")[0]; - - if (self.langs[prefix]) { - - console.warn("Localization Error - Exact matching locale not found, using closest match: ", desiredLocale, prefix); - - desiredLocale = prefix; - } else { - - console.warn("Localization Error - Matching locale not found, using default: ", desiredLocale); - - desiredLocale = "default"; - } - } - } - - self.locale = desiredLocale; - - //load default lang template - - self.lang = Tabulator.prototype.helpers.deepClone(self.langs.default || {}); - - if (desiredLocale != "default") { - - traverseLang(self.langs[desiredLocale], self.lang); - } - - self.table.options.localized.call(self.table, self.locale, self.lang); - - self._executeBindings(); - }; - - //get current locale - - Localize.prototype.getLocale = function (locale) { - - return self.locale; - }; - - //get lang object for given local or current if none provided - - Localize.prototype.getLang = function (locale) { - - return locale ? this.langs[locale] : this.lang; - }; - - //get text for current locale - - Localize.prototype.getText = function (path, value) { - - var path = value ? path + "|" + value : path, - pathArray = path.split("|"), - text = this._getLangElement(pathArray, this.locale); - - // if(text === false){ - - // console.warn("Localization Error - Matching localized text not found for given path: ", path); - - // } - - - return text || ""; - }; - - //traverse langs object and find localized copy - - Localize.prototype._getLangElement = function (path, locale) { - - var self = this; - - var root = self.lang; - - path.forEach(function (level) { - - var rootPath; - - if (root) { - - rootPath = root[level]; - - if (typeof rootPath != "undefined") { - - root = rootPath; - } else { - - root = false; - } - } - }); - - return root; - }; - - //set update binding - - Localize.prototype.bind = function (path, callback) { - - if (!this.bindings[path]) { - - this.bindings[path] = []; - } - - this.bindings[path].push(callback); - - callback(this.getText(path), this.lang); - }; - - //itterate through bindings and trigger updates - - Localize.prototype._executeBindings = function () { - - var self = this; - - var _loop = function _loop(path) { - - self.bindings[path].forEach(function (binding) { - - binding(self.getText(path), self.lang); - }); - }; - - for (var path in self.bindings) { - _loop(path); - } - }; - - //Localized text listings - - Localize.prototype.langs = { - - "default": { //hold default locale text - - "groups": { - - "item": "item", - - "items": "items" - - }, - - "columns": {}, - - "ajax": { - - "loading": "Loading", - - "error": "Error" - - }, - - "pagination": { - - "first": "First", - - "first_title": "First Page", - - "last": "Last", - - "last_title": "Last Page", - - "prev": "Prev", - - "prev_title": "Prev Page", - - "next": "Next", - - "next_title": "Next Page" - - }, - - "headerFilters": { - - "default": "filter column...", - - "columns": {} - - } - - } - - }; - - Tabulator.prototype.registerModule("localize", Localize); - - var Comms = function Comms(table) { - - this.table = table; - }; - - Comms.prototype.getConnections = function (selectors) { - - var self = this, - connections = [], - connection; - - connection = Tabulator.prototype.comms.lookupTable(selectors); - - connection.forEach(function (con) { - - if (self.table !== con) { - - connections.push(con); - } - }); - - return connections; - }; - - Comms.prototype.send = function (selectors, module, action, data) { - - var self = this, - connections = this.getConnections(selectors); - - connections.forEach(function (connection) { - - connection.tableComms(self.table.element, module, action, data); - }); - - if (!connections.length && selectors) { - - console.warn("Table Connection Error - No tables matching selector found", selectors); - } - }; - - Comms.prototype.receive = function (table, module, action, data) { - - if (this.table.modExists(module)) { - - return this.table.modules[module].commsReceived(table, action, data); - } else { - - console.warn("Inter-table Comms Error - no such module:", module); - } - }; - - Tabulator.prototype.registerModule("comms", Comms); - - var Accessor = function Accessor(table) { - this.table = table; //hold Tabulator object - this.allowedTypes = ["", "data", "download", "clipboard"]; //list of accessor types - }; - - //initialize column accessor - Accessor.prototype.initializeColumn = function (column) { - var self = this, - match = false, - config = {}; - - this.allowedTypes.forEach(function (type) { - var key = "accessor" + (type.charAt(0).toUpperCase() + type.slice(1)), - accessor; - - if (column.definition[key]) { - accessor = self.lookupAccessor(column.definition[key]); - - if (accessor) { - match = true; - - config[key] = { - accessor: accessor, - params: column.definition[key + "Params"] || {} - }; - } - } - }); - - if (match) { - column.modules.accessor = config; - } - }, Accessor.prototype.lookupAccessor = function (value) { - var accessor = false; - - //set column accessor - switch (typeof value === 'undefined' ? 'undefined' : _typeof(value)) { - case "string": - if (this.accessors[value]) { - accessor = this.accessors[value]; - } else { - console.warn("Accessor Error - No such accessor found, ignoring: ", value); - } - break; - - case "function": - accessor = value; - break; - } - - return accessor; - }; - - //apply accessor to row - Accessor.prototype.transformRow = function (dataIn, type) { - var self = this, - key = "accessor" + (type.charAt(0).toUpperCase() + type.slice(1)); - - //clone data object with deep copy to isolate internal data from returned result - var data = Tabulator.prototype.helpers.deepClone(dataIn || {}); - - self.table.columnManager.traverse(function (column) { - var value, accessor, params, component; - - if (column.modules.accessor) { - - accessor = column.modules.accessor[key] || column.modules.accessor.accessor || false; - - if (accessor) { - value = column.getFieldValue(data); - - if (value != "undefined") { - component = column.getComponent(); - params = typeof accessor.params === "function" ? accessor.params(value, data, type, component) : accessor.params; - column.setFieldValue(data, accessor.accessor(value, data, type, params, component)); - } - } - } - }); - - return data; - }, - - //default accessors - Accessor.prototype.accessors = {}; - - Tabulator.prototype.registerModule("accessor", Accessor); - var Ajax = function Ajax(table) { - - this.table = table; //hold Tabulator object - this.config = false; //hold config object for ajax request - this.url = ""; //request URL - this.urlGenerator = false; - this.params = false; //request parameters - - this.loaderElement = this.createLoaderElement(); //loader message div - this.msgElement = this.createMsgElement(); //message element - this.loadingElement = false; - this.errorElement = false; - this.loaderPromise = false; - - this.progressiveLoad = false; - this.loading = false; - - this.requestOrder = 0; //prevent requests comming out of sequence if overridden by another load request - }; - - //initialize setup options - Ajax.prototype.initialize = function () { - this.loaderElement.appendChild(this.msgElement); - - if (this.table.options.ajaxLoaderLoading) { - this.loadingElement = this.table.options.ajaxLoaderLoading; - } - - this.loaderPromise = this.table.options.ajaxRequestFunc || this.defaultLoaderPromise; - - this.urlGenerator = this.table.options.ajaxURLGenerator || this.defaultURLGenerator; - - if (this.table.options.ajaxLoaderError) { - this.errorElement = this.table.options.ajaxLoaderError; - } - - if (this.table.options.ajaxParams) { - this.setParams(this.table.options.ajaxParams); - } - - if (this.table.options.ajaxConfig) { - this.setConfig(this.table.options.ajaxConfig); - } - - if (this.table.options.ajaxURL) { - this.setUrl(this.table.options.ajaxURL); - } - - if (this.table.options.ajaxProgressiveLoad) { - if (this.table.options.pagination) { - this.progressiveLoad = false; - console.error("Progressive Load Error - Pagination and progressive load cannot be used at the same time"); - } else { - if (this.table.modExists("page")) { - this.progressiveLoad = this.table.options.ajaxProgressiveLoad; - this.table.modules.page.initializeProgressive(this.progressiveLoad); - } else { - console.error("Pagination plugin is required for progressive ajax loading"); - } - } - } - }; - - Ajax.prototype.createLoaderElement = function () { - var el = document.createElement("div"); - el.classList.add("tabulator-loader"); - return el; - }; - - Ajax.prototype.createMsgElement = function () { - var el = document.createElement("div"); - - el.classList.add("tabulator-loader-msg"); - el.setAttribute("role", "alert"); - - return el; - }; - - //set ajax params - Ajax.prototype.setParams = function (params, update) { - if (update) { - this.params = this.params || {}; - - for (var key in params) { - this.params[key] = params[key]; - } - } else { - this.params = params; - } - }; - - Ajax.prototype.getParams = function () { - return this.params || {}; - }; - - //load config object - Ajax.prototype.setConfig = function (config) { - this._loadDefaultConfig(); - - if (typeof config == "string") { - this.config.method = config; - } else { - for (var key in config) { - this.config[key] = config[key]; - } - } - }; - - //create config object from default - Ajax.prototype._loadDefaultConfig = function (force) { - var self = this; - if (!self.config || force) { - - self.config = {}; - - //load base config from defaults - for (var key in self.defaultConfig) { - self.config[key] = self.defaultConfig[key]; - } - } - }; - - //set request url - Ajax.prototype.setUrl = function (url) { - this.url = url; - }; - - //get request url - Ajax.prototype.getUrl = function () { - return this.url; - }; - - //lstandard loading function - Ajax.prototype.loadData = function (inPosition) { - var self = this; - - if (this.progressiveLoad) { - return this._loadDataProgressive(); - } else { - return this._loadDataStandard(inPosition); - } - }; - - Ajax.prototype.nextPage = function (diff) { - var margin; - - if (!this.loading) { - - margin = this.table.options.ajaxProgressiveLoadScrollMargin || this.table.rowManager.getElement().clientHeight * 2; - - if (diff < margin) { - this.table.modules.page.nextPage().then(function () {}).catch(function () {}); - } - } - }; - - Ajax.prototype.blockActiveRequest = function () { - this.requestOrder++; - }; - - Ajax.prototype._loadDataProgressive = function () { - this.table.rowManager.setData([]); - return this.table.modules.page.setPage(1); - }; - - Ajax.prototype._loadDataStandard = function (inPosition) { - var _this16 = this; - - return new Promise(function (resolve, reject) { - _this16.sendRequest(inPosition).then(function (data) { - _this16.table.rowManager.setData(data, inPosition); - resolve(); - }).catch(function (e) { - reject(); - }); - }); - }; - - Ajax.prototype.generateParamsList = function (data, prefix) { - var self = this, - output = []; - - prefix = prefix || ""; - - if (Array.isArray(data)) { - data.forEach(function (item, i) { - output = output.concat(self.generateParamsList(item, prefix ? prefix + "[" + i + "]" : i)); - }); - } else if ((typeof data === 'undefined' ? 'undefined' : _typeof(data)) === "object") { - for (var key in data) { - output = output.concat(self.generateParamsList(data[key], prefix ? prefix + "[" + key + "]" : key)); - } - } else { - output.push({ key: prefix, value: data }); - } - - return output; - }; - - Ajax.prototype.serializeParams = function (params) { - var output = this.generateParamsList(params), - encoded = []; - - output.forEach(function (item) { - encoded.push(encodeURIComponent(item.key) + "=" + encodeURIComponent(item.value)); - }); - - return encoded.join("&"); - }; - - //send ajax request - Ajax.prototype.sendRequest = function (silent) { - var _this17 = this; - - var self = this, - url = self.url, - requestNo, - esc, - query; - - self.requestOrder++; - requestNo = self.requestOrder; - - self._loadDefaultConfig(); - - return new Promise(function (resolve, reject) { - if (self.table.options.ajaxRequesting.call(_this17.table, self.url, self.params) !== false) { - - self.loading = true; - - if (!silent) { - self.showLoader(); - } - - _this17.loaderPromise(url, self.config, self.params).then(function (data) { - if (requestNo === self.requestOrder) { - if (self.table.options.ajaxResponse) { - data = self.table.options.ajaxResponse.call(self.table, self.url, self.params, data); - } - resolve(data); - } else { - console.warn("Ajax Response Blocked - An active ajax request was blocked by an attempt to change table data while the request was being made"); - } - - self.hideLoader(); - - self.loading = false; - }).catch(function (error) { - console.error("Ajax Load Error: ", error); - self.table.options.ajaxError.call(self.table, error); - - self.showError(); - - setTimeout(function () { - self.hideLoader(); - }, 3000); - - self.loading = false; - - reject(); - }); - } else { - reject(); - } - }); - }; - - Ajax.prototype.showLoader = function () { - var shouldLoad = typeof this.table.options.ajaxLoader === "function" ? this.table.options.ajaxLoader() : this.table.options.ajaxLoader; - - if (shouldLoad) { - - this.hideLoader(); - - while (this.msgElement.firstChild) { - this.msgElement.removeChild(this.msgElement.firstChild); - }this.msgElement.classList.remove("tabulator-error"); - this.msgElement.classList.add("tabulator-loading"); - - if (this.loadingElement) { - this.msgElement.appendChild(this.loadingElement); - } else { - this.msgElement.innerHTML = this.table.modules.localize.getText("ajax|loading"); - } - - this.table.element.appendChild(this.loaderElement); - } - }; - - Ajax.prototype.showError = function () { - this.hideLoader(); - - while (this.msgElement.firstChild) { - this.msgElement.removeChild(this.msgElement.firstChild); - }this.msgElement.classList.remove("tabulator-loading"); - this.msgElement.classList.add("tabulator-error"); - - if (this.errorElement) { - this.msgElement.appendChild(this.errorElement); - } else { - this.msgElement.innerHTML = this.table.modules.localize.getText("ajax|error"); - } - - this.table.element.appendChild(this.loaderElement); - }; - - Ajax.prototype.hideLoader = function () { - if (this.loaderElement.parentNode) { - this.loaderElement.parentNode.removeChild(this.loaderElement); - } - }; - - //default ajax config object - Ajax.prototype.defaultConfig = { - method: "GET" - }; - - Ajax.prototype.defaultURLGenerator = function (url, config, params) { - if (params && Object.keys(params).length) { - if (!config.method || config.method.toLowerCase() == "get") { - config.method = "get"; - url += "?" + this.serializeParams(params); - } - } - - return url; - }; - - Ajax.prototype.defaultLoaderPromise = function (url, config, params) { - var self = this, - contentType; - - return new Promise(function (resolve, reject) { - - //set url - url = self.urlGenerator(url, config, params); - - //set body content if not GET request - if (config.method != "get") { - contentType = _typeof(self.table.options.ajaxContentType) === "object" ? self.table.options.ajaxContentType : self.contentTypeFormatters[self.table.options.ajaxContentType]; - if (contentType) { - - for (var key in contentType.headers) { - if (!config.headers) { - config.headers = {}; - } - - if (typeof config.headers[key] === "undefined") { - config.headers[key] = contentType.headers[key]; - } - } - - config.body = contentType.body.call(self, url, config, params); - } else { - console.warn("Ajax Error - Invalid ajaxContentType value:", self.table.options.ajaxContentType); - } - } - - if (url) { - - //configure headers - if (typeof config.credentials === "undefined") { - config.credentials = 'include'; - } - - if (typeof config.headers === "undefined") { - config.headers = {}; - } - - if (typeof config.headers.Accept === "undefined") { - config.headers.Accept = "application/json"; - } - - if (typeof config.headers["X-Requested-With"] === "undefined") { - config.headers["X-Requested-With"] = "XMLHttpRequest"; - } - - //send request - fetch(url, config).then(function (response) { - if (response.ok) { - response.json().then(function (data) { - resolve(data); - }).catch(function (error) { - reject(error); - console.warn("Ajax Load Error - Invalid JSON returned", error); - }); - } else { - console.error("Ajax Load Error - Connection Error: " + response.status, response.statusText); - reject(response); - } - }).catch(function (error) { - console.error("Ajax Load Error - Connection Error: ", error); - reject(error); - }); - } else { - reject("No URL Set"); - } - }); - }; - - Ajax.prototype.contentTypeFormatters = { - "json": { - headers: { - 'Content-Type': 'application/json' - }, - body: function body(url, config, params) { - return JSON.stringify(params); - } - }, - "form": { - headers: {}, - body: function body(url, config, params) { - var output = this.generateParamsList(params), - form = new FormData(); - - output.forEach(function (item) { - form.append(item.key, item.value); - }); - - return form; - } - } - }; - - Tabulator.prototype.registerModule("ajax", Ajax); - var ColumnCalcs = function ColumnCalcs(table) { - this.table = table; //hold Tabulator object - this.topCalcs = []; - this.botCalcs = []; - this.genColumn = false; - this.topElement = this.createElement(); - this.botElement = this.createElement(); - this.topRow = false; - this.botRow = false; - this.topInitialized = false; - this.botInitialized = false; - - this.initialize(); - }; - - ColumnCalcs.prototype.createElement = function () { - var el = document.createElement("div"); - el.classList.add("tabulator-calcs-holder"); - return el; - }; - - ColumnCalcs.prototype.initialize = function () { - this.genColumn = new Column({ field: "value" }, this); - }; - - //dummy functions to handle being mock column manager - ColumnCalcs.prototype.registerColumnField = function () {}; - - //initialize column calcs - ColumnCalcs.prototype.initializeColumn = function (column) { - var def = column.definition; - - var config = { - topCalcParams: def.topCalcParams || {}, - botCalcParams: def.bottomCalcParams || {} - }; - - if (def.topCalc) { - - switch (_typeof(def.topCalc)) { - case "string": - if (this.calculations[def.topCalc]) { - config.topCalc = this.calculations[def.topCalc]; - } else { - console.warn("Column Calc Error - No such calculation found, ignoring: ", def.topCalc); - } - break; - - case "function": - config.topCalc = def.topCalc; - break; - - } - - if (config.topCalc) { - column.modules.columnCalcs = config; - this.topCalcs.push(column); - - if (this.table.options.columnCalcs != "group") { - this.initializeTopRow(); - } - } - } - - if (def.bottomCalc) { - switch (_typeof(def.bottomCalc)) { - case "string": - if (this.calculations[def.bottomCalc]) { - config.botCalc = this.calculations[def.bottomCalc]; - } else { - console.warn("Column Calc Error - No such calculation found, ignoring: ", def.bottomCalc); - } - break; - - case "function": - config.botCalc = def.bottomCalc; - break; - - } - - if (config.botCalc) { - column.modules.columnCalcs = config; - this.botCalcs.push(column); - - if (this.table.options.columnCalcs != "group") { - this.initializeBottomRow(); - } - } - } - }; - - ColumnCalcs.prototype.removeCalcs = function () { - var changed = false; - - if (this.topInitialized) { - this.topInitialized = false; - this.topElement.parentNode.removeChild(this.topElement); - changed = true; - } - - if (this.botInitialized) { - this.botInitialized = false; - this.table.footerManager.remove(this.botElement); - changed = true; - } - - if (changed) { - this.table.rowManager.adjustTableSize(); - } - }; - - ColumnCalcs.prototype.initializeTopRow = function () { - if (!this.topInitialized) { - // this.table.columnManager.headersElement.after(this.topElement); - this.table.columnManager.getElement().insertBefore(this.topElement, this.table.columnManager.headersElement.nextSibling); - this.topInitialized = true; - } - }; - - ColumnCalcs.prototype.initializeBottomRow = function () { - if (!this.botInitialized) { - this.table.footerManager.prepend(this.botElement); - this.botInitialized = true; - } - }; - - ColumnCalcs.prototype.scrollHorizontal = function (left) { - var hozAdjust = 0, - scrollWidth = this.table.columnManager.getElement().scrollWidth - this.table.element.clientWidth; - - if (this.botInitialized) { - this.botRow.getElement().style.marginLeft = -left + "px"; - } - }; - - ColumnCalcs.prototype.recalc = function (rows) { - var data, row; - - if (this.topInitialized || this.botInitialized) { - data = this.rowsToData(rows); - - if (this.topInitialized) { - row = this.generateRow("top", this.rowsToData(rows)); - this.topRow = row; - while (this.topElement.firstChild) { - this.topElement.removeChild(this.topElement.firstChild); - }this.topElement.appendChild(row.getElement()); - row.initialize(true); - } - - if (this.botInitialized) { - row = this.generateRow("bottom", this.rowsToData(rows)); - this.botRow = row; - while (this.botElement.firstChild) { - this.botElement.removeChild(this.botElement.firstChild); - }this.botElement.appendChild(row.getElement()); - row.initialize(true); - } - - this.table.rowManager.adjustTableSize(); - - //set resizable handles - if (this.table.modExists("frozenColumns")) { - this.table.modules.frozenColumns.layout(); - } - } - }; - - ColumnCalcs.prototype.recalcRowGroup = function (row) { - this.recalcGroup(this.table.modules.groupRows.getRowGroup(row)); - }; - - ColumnCalcs.prototype.recalcGroup = function (group) { - var data, rowData; - - if (group) { - if (group.calcs) { - if (group.calcs.bottom) { - data = this.rowsToData(group.rows); - rowData = this.generateRowData("bottom", data); - - group.calcs.bottom.updateData(rowData); - group.calcs.bottom.reinitialize(); - } - - if (group.calcs.top) { - data = this.rowsToData(group.rows); - rowData = this.generateRowData("top", data); - - group.calcs.top.updateData(rowData); - group.calcs.top.reinitialize(); - } - } - } - }; - - //generate top stats row - ColumnCalcs.prototype.generateTopRow = function (rows) { - return this.generateRow("top", this.rowsToData(rows)); - }; - //generate bottom stats row - ColumnCalcs.prototype.generateBottomRow = function (rows) { - return this.generateRow("bottom", this.rowsToData(rows)); - }; - - ColumnCalcs.prototype.rowsToData = function (rows) { - var data = []; - - rows.forEach(function (row) { - data.push(row.getData()); - }); - - return data; - }; - - //generate stats row - ColumnCalcs.prototype.generateRow = function (pos, data) { - var self = this, - rowData = this.generateRowData(pos, data), - row; - - if (self.table.modExists("mutator")) { - self.table.modules.mutator.disable(); - } - - row = new Row(rowData, this); - - if (self.table.modExists("mutator")) { - self.table.modules.mutator.enable(); - } - - row.getElement().classList.add("tabulator-calcs", "tabulator-calcs-" + pos); - row.type = "calc"; - - row.generateCells = function () { - - var cells = []; - - self.table.columnManager.columnsByIndex.forEach(function (column) { - - if (column.visible) { - //set field name of mock column - self.genColumn.setField(column.getField()); - self.genColumn.hozAlign = column.hozAlign; - - if (column.definition[pos + "CalcFormatter"] && self.table.modExists("format")) { - - self.genColumn.modules.format = { - formatter: self.table.modules.format.getFormatter(column.definition[pos + "CalcFormatter"]), - params: column.definition[pos + "CalcFormatterParams"] - }; - } else { - self.genColumn.modules.format = { - formatter: self.table.modules.format.getFormatter("plaintext"), - params: {} - }; - } - - //generate cell and assign to correct column - var cell = new Cell(self.genColumn, row); - cell.column = column; - cell.setWidth(column.width); - - column.cells.push(cell); - cells.push(cell); - } - }); - - this.cells = cells; - }; - - return row; - }; - - //generate stats row - ColumnCalcs.prototype.generateRowData = function (pos, data) { - var rowData = {}, - calcs = pos == "top" ? this.topCalcs : this.botCalcs, - type = pos == "top" ? "topCalc" : "botCalc", - params, - paramKey; - - calcs.forEach(function (column) { - var values = []; - - if (column.modules.columnCalcs && column.modules.columnCalcs[type]) { - data.forEach(function (item) { - values.push(column.getFieldValue(item)); - }); - - paramKey = type + "Params"; - params = typeof column.modules.columnCalcs[paramKey] === "function" ? column.modules.columnCalcs[paramKey](value, data) : column.modules.columnCalcs[paramKey]; - - column.setFieldValue(rowData, column.modules.columnCalcs[type](values, data, params)); - } - }); - - return rowData; - }; - - ColumnCalcs.prototype.hasTopCalcs = function () { - return !!this.topCalcs.length; - }, ColumnCalcs.prototype.hasBottomCalcs = function () { - return !!this.botCalcs.length; - }, - - //handle table redraw - ColumnCalcs.prototype.redraw = function () { - if (this.topRow) { - this.topRow.normalizeHeight(true); - } - if (this.botRow) { - this.botRow.normalizeHeight(true); - } - }; - - //return the calculated - ColumnCalcs.prototype.getResults = function () { - var self = this, - results = {}, - groups; - - if (this.table.options.groupBy && this.table.modExists("groupRows")) { - groups = this.table.modules.groupRows.getGroups(true); - - groups.forEach(function (group) { - results[group.getKey()] = self.getGroupResults(group); - }); - } else { - results = { - top: this.topRow ? this.topRow.getData() : {}, - bottom: this.botRow ? this.botRow.getData() : {} - }; - } - - return results; - }; - - //get results from a group - ColumnCalcs.prototype.getGroupResults = function (group) { - var self = this, - groupObj = group._getSelf(), - subGroups = group.getSubGroups(), - subGroupResults = {}, - results = {}; - - subGroups.forEach(function (subgroup) { - subGroupResults[subgroup.getKey()] = self.getGroupResults(subgroup); - }); - - results = { - top: groupObj.calcs.top ? groupObj.calcs.top.getData() : {}, - bottom: groupObj.calcs.bottom ? groupObj.calcs.bottom.getData() : {}, - groups: subGroupResults - }; - - return results; - }; - - //default calculations - ColumnCalcs.prototype.calculations = { - "avg": function avg(values, data, calcParams) { - var output = 0, - precision = typeof calcParams.precision !== "undefined" ? calcParams.precision : 2; - - if (values.length) { - output = values.reduce(function (sum, value) { - value = Number(value); - return sum + value; - }); - - output = output / values.length; - - output = precision !== false ? output.toFixed(precision) : output; - } - - return parseFloat(output).toString(); - }, - "max": function max(values, data, calcParams) { - var output = null, - precision = typeof calcParams.precision !== "undefined" ? calcParams.precision : false; - - values.forEach(function (value) { - - value = Number(value); - - if (value > output || output === null) { - output = value; - } - }); - - return output !== null ? precision !== false ? output.toFixed(precision) : output : ""; - }, - "min": function min(values, data, calcParams) { - var output = null, - precision = typeof calcParams.precision !== "undefined" ? calcParams.precision : false; - - values.forEach(function (value) { - - value = Number(value); - - if (value < output || output === null) { - output = value; - } - }); - - return output !== null ? precision !== false ? output.toFixed(precision) : output : ""; - }, - "sum": function sum(values, data, calcParams) { - var output = 0, - precision = typeof calcParams.precision !== "undefined" ? calcParams.precision : false; - - if (values.length) { - values.forEach(function (value) { - value = Number(value); - - output += !isNaN(value) ? Number(value) : 0; - }); - } - - return precision !== false ? output.toFixed(precision) : output; - }, - "concat": function concat(values, data, calcParams) { - var output = 0; - - if (values.length) { - output = values.reduce(function (sum, value) { - return String(sum) + String(value); - }); - } - - return output; - }, - "count": function count(values, data, calcParams) { - var output = 0; - - if (values.length) { - values.forEach(function (value) { - if (value) { - output++; - } - }); - } - - return output; - } - }; - - Tabulator.prototype.registerModule("columnCalcs", ColumnCalcs); - var Clipboard = function Clipboard(table) { - this.table = table; - this.mode = true; - this.copySelector = false; - this.copySelectorParams = {}; - this.copyFormatter = false; - this.copyFormatterParams = {}; - this.pasteParser = function () {}; - this.pasteAction = function () {}; - this.htmlElement = false; - this.config = {}; - - this.blocked = true; //block copy actions not originating from this command - }; - - Clipboard.prototype.initialize = function () { - var self = this; - - this.mode = this.table.options.clipboard; - - if (this.mode === true || this.mode === "copy") { - this.table.element.addEventListener("copy", function (e) { - var data; - - self.processConfig(); - - if (!self.blocked) { - e.preventDefault(); - - data = self.generateContent(); - - if (window.clipboardData && window.clipboardData.setData) { - window.clipboardData.setData('Text', data); - } else if (e.clipboardData && e.clipboardData.setData) { - e.clipboardData.setData('text/plain', data); - if (self.htmlElement) { - e.clipboardData.setData('text/html', self.htmlElement.outerHTML); - } - } else if (e.originalEvent && e.originalEvent.clipboardData.setData) { - e.originalEvent.clipboardData.setData('text/plain', data); - if (self.htmlElement) { - e.originalEvent.clipboardData.setData('text/html', self.htmlElement.outerHTML); - } - } - - self.table.options.clipboardCopied.call(this.table, data); - - self.reset(); - } - }); - } - - if (this.mode === true || this.mode === "paste") { - this.table.element.addEventListener("paste", function (e) { - self.paste(e); - }); - } - - this.setPasteParser(this.table.options.clipboardPasteParser); - this.setPasteAction(this.table.options.clipboardPasteAction); - }; - - Clipboard.prototype.processConfig = function () { - var config = { - columnHeaders: "groups", - rowGroups: true - }; - - if (typeof this.table.options.clipboardCopyHeader !== "undefined") { - config.columnHeaders = this.table.options.clipboardCopyHeader; - console.warn("DEPRECATION WANRING - clipboardCopyHeader option has been depricated, please use the columnHeaders property on the clipboardCopyConfig option"); - } - - if (this.table.options.clipboardCopyConfig) { - for (var key in this.table.options.clipboardCopyConfig) { - config[key] = this.table.options.clipboardCopyConfig[key]; - } - } - - if (config.rowGroups && this.table.options.groupBy && this.table.modExists("groupRows")) { - this.config.rowGroups = true; - } - - if (config.columnHeaders) { - if ((config.columnHeaders === "groups" || config === true) && this.table.columnManager.columns.length != this.table.columnManager.columnsByIndex.length) { - this.config.columnHeaders = "groups"; - } else { - this.config.columnHeaders = "columns"; - } - } else { - this.config.columnHeaders = false; - } - }; - - Clipboard.prototype.reset = function () { - this.blocked = false; - this.originalSelectionText = ""; - }; - - Clipboard.prototype.setPasteAction = function (action) { - - switch (typeof action === 'undefined' ? 'undefined' : _typeof(action)) { - case "string": - this.pasteAction = this.pasteActions[action]; - - if (!this.pasteAction) { - console.warn("Clipboard Error - No such paste action found:", action); - } - break; - - case "function": - this.pasteAction = action; - break; - } - }; - - Clipboard.prototype.setPasteParser = function (parser) { - switch (typeof parser === 'undefined' ? 'undefined' : _typeof(parser)) { - case "string": - this.pasteParser = this.pasteParsers[parser]; - - if (!this.pasteParser) { - console.warn("Clipboard Error - No such paste parser found:", parser); - } - break; - - case "function": - this.pasteParser = parser; - break; - } - }; - - Clipboard.prototype.paste = function (e) { - var data, rowData, rows; - - if (this.checkPaseOrigin(e)) { - - data = this.getPasteData(e); - - rowData = this.pasteParser.call(this, data); - - if (rowData) { - e.preventDefault(); - - if (this.table.modExists("mutator")) { - rowData = this.mutateData(rowData); - } - - rows = this.pasteAction.call(this, rowData); - this.table.options.clipboardPasted.call(this.table, data, rowData, rows); - } else { - this.table.options.clipboardPasteError.call(this.table, data); - } - } - }; - - Clipboard.prototype.mutateData = function (data) { - var self = this, - output = []; - - if (Array.isArray(data)) { - data.forEach(function (row) { - output.push(self.table.modules.mutator.transformRow(row, "clipboard")); - }); - } else { - output = data; - } - - return output; - }; - - Clipboard.prototype.checkPaseOrigin = function (e) { - var valid = true; - - if (e.target.tagName != "DIV" || this.table.modules.edit.currentCell) { - valid = false; - } - - return valid; - }; - - Clipboard.prototype.getPasteData = function (e) { - var data; - - if (window.clipboardData && window.clipboardData.getData) { - data = window.clipboardData.getData('Text'); - } else if (e.clipboardData && e.clipboardData.getData) { - data = e.clipboardData.getData('text/plain'); - } else if (e.originalEvent && e.originalEvent.clipboardData.getData) { - data = e.originalEvent.clipboardData.getData('text/plain'); - } - - return data; - }; - - Clipboard.prototype.copy = function (selector, selectorParams, formatter, formatterParams, internal) { - var range, sel; - this.blocked = false; - - if (this.mode === true || this.mode === "copy") { - - if (typeof window.getSelection != "undefined" && typeof document.createRange != "undefined") { - range = document.createRange(); - range.selectNodeContents(this.table.element); - sel = window.getSelection(); - - if (sel.toString() && internal) { - selector = "userSelection"; - formatter = "raw"; - selectorParams = sel.toString(); - } - - sel.removeAllRanges(); - sel.addRange(range); - } else if (typeof document.selection != "undefined" && typeof document.body.createTextRange != "undefined") { - textRange = document.body.createTextRange(); - textRange.moveToElementText(this.table.element); - textRange.select(); - } - - this.setSelector(selector); - this.copySelectorParams = typeof selectorParams != "undefined" && selectorParams != null ? selectorParams : this.config.columnHeaders; - this.setFormatter(formatter); - this.copyFormatterParams = typeof formatterParams != "undefined" && formatterParams != null ? formatterParams : {}; - - document.execCommand('copy'); - - if (sel) { - sel.removeAllRanges(); - } - } - }; - - Clipboard.prototype.setSelector = function (selector) { - selector = selector || this.table.options.clipboardCopySelector; - - switch (typeof selector === 'undefined' ? 'undefined' : _typeof(selector)) { - case "string": - if (this.copySelectors[selector]) { - this.copySelector = this.copySelectors[selector]; - } else { - console.warn("Clipboard Error - No such selector found:", selector); - } - break; - - case "function": - this.copySelector = selector; - break; - } - }; - - Clipboard.prototype.setFormatter = function (formatter) { - - formatter = formatter || this.table.options.clipboardCopyFormatter; - - switch (typeof formatter === 'undefined' ? 'undefined' : _typeof(formatter)) { - case "string": - if (this.copyFormatters[formatter]) { - this.copyFormatter = this.copyFormatters[formatter]; - } else { - console.warn("Clipboard Error - No such formatter found:", formatter); - } - break; - - case "function": - this.copyFormatter = formatter; - break; - } - }; - - Clipboard.prototype.generateContent = function () { - var data; - - this.htmlElement = false; - data = this.copySelector.call(this, this.config, this.copySelectorParams); - - return this.copyFormatter.call(this, data, this.config, this.copyFormatterParams); - }; - - Clipboard.prototype.generateSimpleHeaders = function (columns) { - var headers = []; - - columns.forEach(function (column) { - headers.push(column.definition.title); - }); - - return headers; - }; - - Clipboard.prototype.generateColumnGroupHeaders = function (columns) { - var _this18 = this; - - var output = []; - - this.table.columnManager.columns.forEach(function (column) { - var colData = _this18.processColumnGroup(column); - - if (colData) { - output.push(colData); - } - }); - - return output; - }; - - Clipboard.prototype.processColumnGroup = function (column) { - var _this19 = this; - - var subGroups = column.columns; - - var groupData = { - type: "group", - title: column.definition.title, - column: column - }; - - if (subGroups.length) { - groupData.subGroups = []; - groupData.width = 0; - - subGroups.forEach(function (subGroup) { - var subGroupData = _this19.processColumnGroup(subGroup); - - if (subGroupData) { - groupData.width += subGroupData.width; - groupData.subGroups.push(subGroupData); - } - }); - - if (!groupData.width) { - return false; - } - } else { - if (column.field && column.visible) { - groupData.width = 1; - } else { - return false; - } - } - - return groupData; - }; - - Clipboard.prototype.groupHeadersToRows = function (columns) { - - var headers = []; - - function parseColumnGroup(column, level) { - - if (typeof headers[level] === "undefined") { - headers[level] = []; - } - - headers[level].push(column.title); - - if (column.subGroups) { - column.subGroups.forEach(function (subGroup) { - parseColumnGroup(subGroup, level + 1); - }); - } else { - padColumnheaders(); - } - } - - function padColumnheaders() { - var max = 0; - - headers.forEach(function (title) { - var len = title.length; - if (len > max) { - max = len; - } - }); - - headers.forEach(function (title) { - var len = title.length; - if (len < max) { - for (var i = len; i < max; i++) { - title.push(""); - } - } - }); - } - - columns.forEach(function (column) { - parseColumnGroup(column, 0); - }); - - return headers; - }; - - Clipboard.prototype.rowsToData = function (rows, config, params) { - var columns = this.table.columnManager.columnsByIndex, - data = []; - - rows.forEach(function (row) { - var rowArray = [], - rowData = row.getData("clipboard"); - - columns.forEach(function (column) { - var value = column.getFieldValue(rowData); - - switch (typeof value === 'undefined' ? 'undefined' : _typeof(value)) { - case "object": - value = JSON.stringify(value); - break; - - case "undefined": - case "null": - value = ""; - break; - - default: - value = value; - } - - rowArray.push(value); - }); - - data.push(rowArray); - }); - - return data; - }; - - Clipboard.prototype.buildComplexRows = function (config) { - var _this20 = this; - - var output = [], - groups = this.table.modules.groupRows.getGroups(); - - groups.forEach(function (group) { - output.push(_this20.processGroupData(group)); - }); - - return output; - }; - - Clipboard.prototype.processGroupData = function (group) { - var _this21 = this; - - var subGroups = group.getSubGroups(); - - var groupData = { - type: "group", - key: group.key - }; - - if (subGroups.length) { - groupData.subGroups = []; - - subGroups.forEach(function (subGroup) { - groupData.subGroups.push(_this21.processGroupData(subGroup)); - }); - } else { - groupData.rows = group.getRows(true); - } - - return groupData; - }; - - Clipboard.prototype.buildOutput = function (rows, config, params) { - var _this22 = this; - - var output = [], - columns = this.table.columnManager.columnsByIndex; - - if (config.columnHeaders) { - - if (config.columnHeaders == "groups") { - columns = this.generateColumnGroupHeaders(this.table.columnManager.columns); - - output = output.concat(this.groupHeadersToRows(columns)); - } else { - output.push(this.generateSimpleHeaders(columns)); - } - } - - //generate styled content - if (this.table.options.clipboardCopyStyled) { - this.generateHTML(rows, columns, config, params); - } - - //generate unstyled content - if (config.rowGroups) { - rows.forEach(function (row) { - output = output.concat(_this22.parseRowGroupData(row, config, params)); - }); - } else { - output = output.concat(this.rowsToData(rows, config, params)); - } - - return output; - }; - - Clipboard.prototype.parseRowGroupData = function (group, config, params) { - var _this23 = this; - - var groupData = []; - - groupData.push([group.key]); - - if (group.subGroups) { - group.subGroups.forEach(function (subGroup) { - groupData = groupData.concat(_this23.parseRowGroupData(subGroup, config, params)); - }); - } else { - - groupData = groupData.concat(this.rowsToData(group.rows, config, params)); - } - - return groupData; - }; - - Clipboard.prototype.generateHTML = function (rows, columns, config, params) { - var self = this, - data = [], - headers = [], - body, - oddRow, - evenRow, - firstRow, - firstCell, - firstGroup, - lastCell, - styleCells; - - //create table element - this.htmlElement = document.createElement("table"); - self.mapElementStyles(this.table.element, this.htmlElement, ["border-top", "border-left", "border-right", "border-bottom"]); - - function generateSimpleHeaders() { - var headerEl = document.createElement("tr"); - - columns.forEach(function (column) { - var columnEl = document.createElement("th"); - columnEl.innerHTML = column.definition.title; - - self.mapElementStyles(column.getElement(), columnEl, ["border-top", "border-left", "border-right", "border-bottom", "background-color", "color", "font-weight", "font-family", "font-size"]); - - headerEl.appendChild(columnEl); - }); - - self.mapElementStyles(self.table.columnManager.getHeadersElement(), headerEl, ["border-top", "border-left", "border-right", "border-bottom", "background-color", "color", "font-weight", "font-family", "font-size"]); - - self.htmlElement.appendChild(document.createElement("thead").appendChild(headerEl)); - } - - function generateHeaders(headers) { - - var headerHolderEl = document.createElement("thead"); - - headers.forEach(function (columns) { - var headerEl = document.createElement("tr"); - - columns.forEach(function (column) { - var columnEl = document.createElement("th"); - - if (column.width > 1) { - columnEl.colSpan = column.width; - } - - if (column.height > 1) { - columnEl.rowSpan = column.height; - } - - columnEl.innerHTML = column.title; - - self.mapElementStyles(column.element, columnEl, ["border-top", "border-left", "border-right", "border-bottom", "background-color", "color", "font-weight", "font-family", "font-size"]); - - headerEl.appendChild(columnEl); - }); - - self.mapElementStyles(self.table.columnManager.getHeadersElement(), headerEl, ["border-top", "border-left", "border-right", "border-bottom", "background-color", "color", "font-weight", "font-family", "font-size"]); - - headerHolderEl.appendChild(headerEl); - }); - - self.htmlElement.appendChild(headerHolderEl); - } - - function parseColumnGroup(column, level) { - - if (typeof headers[level] === "undefined") { - headers[level] = []; - } - - headers[level].push({ - title: column.title, - width: column.width, - height: 1, - children: !!column.subGroups, - element: column.column.getElement() - }); - - if (column.subGroups) { - column.subGroups.forEach(function (subGroup) { - parseColumnGroup(subGroup, level + 1); - }); - } - } - - function padVerticalColumnheaders() { - headers.forEach(function (row, index) { - row.forEach(function (header) { - if (!header.children) { - header.height = headers.length - index; - } - }); - }); - } - - //create headers if needed - if (config.columnHeaders) { - if (config.columnHeaders == "groups") { - columns.forEach(function (column) { - parseColumnGroup(column, 0); - }); - - padVerticalColumnheaders(); - generateHeaders(headers); - } else { - generateSimpleHeaders(); - } - } - - columns = this.table.columnManager.columnsByIndex; - - //create table body - body = document.createElement("tbody"); - - //lookup row styles - if (window.getComputedStyle) { - oddRow = this.table.element.querySelector(".tabulator-row-odd:not(.tabulator-group):not(.tabulator-calcs)"); - evenRow = this.table.element.querySelector(".tabulator-row-even:not(.tabulator-group):not(.tabulator-calcs)"); - firstRow = this.table.element.querySelector(".tabulator-row:not(.tabulator-group):not(.tabulator-calcs)"); - firstGroup = this.table.element.getElementsByClassName("tabulator-group")[0]; - - if (firstRow) { - styleCells = firstRow.getElementsByClassName("tabulator-cell"); - firstCell = styleCells[0]; - lastCell = styleCells[styleCells.length - 1]; - } - } - - function processRows(rowArray) { - //add rows to table - rowArray.forEach(function (row, i) { - var rowEl = document.createElement("tr"), - rowData = row.getData("clipboard"), - styleRow = firstRow; - - columns.forEach(function (column, j) { - var cellEl = document.createElement("td"), - value = column.getFieldValue(rowData); - - switch (typeof value === 'undefined' ? 'undefined' : _typeof(value)) { - case "object": - value = JSON.stringify(value); - break; - - case "undefined": - case "null": - value = ""; - break; - - default: - value = value; - } - - cellEl.innerHTML = value; - - if (column.definition.align) { - cellEl.style.textAlign = column.definition.align; - } - - if (j < columns.length - 1) { - if (firstCell) { - self.mapElementStyles(firstCell, cellEl, ["border-top", "border-left", "border-right", "border-bottom", "color", "font-weight", "font-family", "font-size"]); - } - } else { - if (firstCell) { - self.mapElementStyles(firstCell, cellEl, ["border-top", "border-left", "border-right", "border-bottom", "color", "font-weight", "font-family", "font-size"]); - } - } - - rowEl.appendChild(cellEl); - }); - - if (!(i % 2) && oddRow) { - styleRow = oddRow; - } - - if (i % 2 && evenRow) { - styleRow = evenRow; - } - - if (styleRow) { - self.mapElementStyles(styleRow, rowEl, ["border-top", "border-left", "border-right", "border-bottom", "color", "font-weight", "font-family", "font-size", "background-color"]); - } - - body.appendChild(rowEl); - }); - } - - function processGroup(group) { - var groupEl = document.createElement("tr"), - groupCellEl = document.createElement("td"); - - groupCellEl.colSpan = columns.length; - - groupCellEl.innerHTML = group.key; - - groupEl.appendChild(groupCellEl); - body.appendChild(groupEl); - - self.mapElementStyles(firstGroup, groupEl, ["border-top", "border-left", "border-right", "border-bottom", "color", "font-weight", "font-family", "font-size", "background-color"]); - - if (group.subGroups) { - group.subGroups.forEach(function (subGroup) { - processGroup(subGroup); - }); - } else { - processRows(group.rows); - } - } - - if (config.rowGroups) { - rows.forEach(function (group) { - processGroup(group); - }); - } else { - processRows(rows); - } - - this.htmlElement.appendChild(body); - }; - - Clipboard.prototype.mapElementStyles = function (from, to, props) { - - var lookup = { - "background-color": "backgroundColor", - "color": "fontColor", - "font-weight": "fontWeight", - "font-family": "fontFamily", - "font-size": "fontSize", - "border-top": "borderTop", - "border-left": "borderLeft", - "border-right": "borderRight", - "border-bottom": "borderBottom" - }; - - if (window.getComputedStyle) { - var fromStyle = window.getComputedStyle(from); - - props.forEach(function (prop) { - to.style[lookup[prop]] = fromStyle.getPropertyValue(prop); - }); - } - - // return window.getComputedStyle ? window.getComputedStyle(element, null).getPropertyValue(property) : element.style[property.replace(/-([a-z])/g, function (g) { return g[1].toUpperCase(); })]; - }; - - Clipboard.prototype.copySelectors = { - userSelection: function userSelection(config, params) { - return params; - }, - selected: function selected(config, params) { - var rows = []; - - if (this.table.modExists("selectRow", true)) { - rows = this.table.modules.selectRow.getSelectedRows(); - } - - if (config.rowGroups) { - console.warn("Clipboard Warning - select coptSelector does not support row groups"); - } - - return this.buildOutput(rows, config, params); - }, - table: function table(config, params) { - if (config.rowGroups) { - console.warn("Clipboard Warning - table coptSelector does not support row groups"); - } - - return this.buildOutput(this.table.rowManager.getComponents(), config, params); - }, - active: function active(config, params) { - var rows; - - if (config.rowGroups) { - rows = this.buildComplexRows(config); - } else { - rows = this.table.rowManager.getComponents(true); - } - - return this.buildOutput(rows, config, params); - } - }; - - Clipboard.prototype.copyFormatters = { - raw: function raw(data, params) { - return data; - }, - table: function table(data, params) { - var output = []; - - data.forEach(function (row) { - row.forEach(function (value) { - if (typeof value == "undefined") { - value = ""; - } - - value = typeof value == "undefined" || value === null ? "" : value.toString(); - - if (value.match(/\r|\n/)) { - value = value.split('"').join('""'); - value = '"' + value + '"'; - } - }); - - output.push(row.join("\t")); - }); - - return output.join("\n"); - } - }; - - Clipboard.prototype.pasteParsers = { - table: function table(clipboard) { - var data = [], - success = false, - headerFindSuccess = true, - columns = this.table.columnManager.columns, - columnMap = [], - rows = []; - - //get data from clipboard into array of columns and rows. - clipboard = clipboard.split("\n"); - - clipboard.forEach(function (row) { - data.push(row.split("\t")); - }); - - if (data.length && !(data.length === 1 && data[0].length < 2)) { - success = true; - - //check if headers are present by title - data[0].forEach(function (value) { - var column = columns.find(function (column) { - return value && column.definition.title && value.trim() && column.definition.title.trim() === value.trim(); - }); - - if (column) { - columnMap.push(column); - } else { - headerFindSuccess = false; - } - }); - - //check if column headers are present by field - if (!headerFindSuccess) { - headerFindSuccess = true; - columnMap = []; - - data[0].forEach(function (value) { - var column = columns.find(function (column) { - return value && column.field && value.trim() && column.field.trim() === value.trim(); - }); - - if (column) { - columnMap.push(column); - } else { - headerFindSuccess = false; - } - }); - - if (!headerFindSuccess) { - columnMap = this.table.columnManager.columnsByIndex; - } - } - - //remove header row if found - if (headerFindSuccess) { - data.shift(); - } - - data.forEach(function (item) { - var row = {}; - - item.forEach(function (value, i) { - if (columnMap[i]) { - row[columnMap[i].field] = value; - } - }); - - rows.push(row); - }); - - return rows; - } else { - return false; - } - } - }; - - Clipboard.prototype.pasteActions = { - replace: function replace(rows) { - return this.table.setData(rows); - }, - update: function update(rows) { - return this.table.updateOrAddData(rows); - }, - insert: function insert(rows) { - return this.table.addData(rows); - } - }; - - Tabulator.prototype.registerModule("clipboard", Clipboard); - - var DataTree = function DataTree(table) { - this.table = table; - this.indent = 10; - this.field = ""; - this.collapseEl = null; - this.expandEl = null; - this.branchEl = null; - - this.startOpen = function () {}; - - this.displayIndex = 0; - }; - - DataTree.prototype.initialize = function () { - var dummyEl = null, - options = this.table.options; - - this.field = options.dataTreeChildField; - this.indent = options.dataTreeChildIndent; - - if (options.dataTreeBranchElement) { - - if (options.dataTreeBranchElement === true) { - this.branchEl = document.createElement("div"); - this.branchEl.classList.add("tabulator-data-tree-branch"); - } else { - if (typeof options.dataTreeBranchElement === "string") { - dummyEl = document.createElement("div"); - dummyEl.innerHTML = options.dataTreeBranchElement; - this.branchEl = dummyEl.firstChild; - } else { - this.branchEl = options.dataTreeBranchElement; - } - } - } - - if (options.dataTreeCollapseElement) { - if (typeof options.dataTreeCollapseElement === "string") { - dummyEl = document.createElement("div"); - dummyEl.innerHTML = options.dataTreeCollapseElement; - this.collapseEl = dummyEl.firstChild; - } else { - this.collapseEl = options.dataTreeCollapseElement; - } - } else { - this.collapseEl = document.createElement("div"); - this.collapseEl.classList.add("tabulator-data-tree-control"); - this.collapseEl.innerHTML = "
"; - } - - if (options.dataTreeExpandElement) { - if (typeof options.dataTreeExpandElement === "string") { - dummyEl = document.createElement("div"); - dummyEl.innerHTML = options.dataTreeExpandElement; - this.expandEl = dummyEl.firstChild; - } else { - this.expandEl = options.dataTreeExpandElement; - } - } else { - this.expandEl = document.createElement("div"); - this.expandEl.classList.add("tabulator-data-tree-control"); - this.expandEl.innerHTML = "
"; - } - - switch (_typeof(options.dataTreeStartExpanded)) { - case "boolean": - this.startOpen = function (row, index) { - return options.dataTreeStartExpanded; - }; - break; - - case "function": - this.startOpen = options.dataTreeStartExpanded; - break; - - default: - this.startOpen = function (row, index) { - return options.dataTreeStartExpanded[index]; - }; - break; - } - }; - - DataTree.prototype.initializeRow = function (row) { - - var children = typeof row.getData()[this.field] !== "undefined"; - - row.modules.dataTree = { - index: 0, - open: children ? this.startOpen(row.getComponent(), 0) : false, - controlEl: false, - branchEl: false, - parent: false, - children: children - }; - }; - - DataTree.prototype.layoutRow = function (row) { - var cell = row.getCells()[0], - el = cell.getElement(), - config = row.modules.dataTree; - - el.style.paddingLeft = parseInt(window.getComputedStyle(el, null).getPropertyValue('padding-left')) + config.index * this.indent + "px"; - - if (config.branchEl) { - config.branchEl.parentNode.removeChild(config.branchEl); - } - - this.generateControlElement(row, el); - - if (config.index && this.branchEl) { - config.branchEl = this.branchEl.cloneNode(true); - el.insertBefore(config.branchEl, el.firstChild); - el.style.paddingLeft = parseInt(el.style.paddingLeft) + (config.branchEl.offsetWidth + config.branchEl.style.marginRight) * (config.index - 1) + "px"; - } - }; - - DataTree.prototype.generateControlElement = function (row, el) { - var _this24 = this; - - var config = row.modules.dataTree, - el = el || row.getCells()[0].getElement(), - oldControl = config.controlEl; - - if (config.children !== false) { - - if (config.open) { - config.controlEl = this.collapseEl.cloneNode(true); - config.controlEl.addEventListener("click", function (e) { - e.stopPropagation(); - _this24.collapseRow(row); - }); - } else { - config.controlEl = this.expandEl.cloneNode(true); - config.controlEl.addEventListener("click", function (e) { - e.stopPropagation(); - _this24.expandRow(row); - }); - } - - config.controlEl.addEventListener("mousedown", function (e) { - e.stopPropagation(); - }); - - if (oldControl && oldControl.parentNode === el) { - oldControl.parentNode.replaceChild(config.controlEl, oldControl); - } else { - el.insertBefore(config.controlEl, el.firstChild); - } - } - }; - - DataTree.prototype.setDisplayIndex = function (index) { - this.displayIndex = index; - }; - - DataTree.prototype.getDisplayIndex = function () { - return this.displayIndex; - }; - - DataTree.prototype.getRows = function (rows) { - var _this25 = this; - - var output = []; - - rows.forEach(function (row, i) { - var config = row.modules.dataTree.children, - children; - - output.push(row); - - if (!config.index && config.children !== false) { - children = _this25.getChildren(row); - - children.forEach(function (child) { - output.push(child); - }); - } - }); - - return output; - }; - - DataTree.prototype.getChildren = function (row) { - var _this26 = this; - - var config = row.modules.dataTree, - output = []; - - if (config.children !== false && config.open) { - if (!Array.isArray(config.children)) { - config.children = this.generateChildren(row); - } - - config.children.forEach(function (child) { - output.push(child); - - var subChildren = _this26.getChildren(child); - - subChildren.forEach(function (sub) { - output.push(sub); - }); - }); - } - - return output; - }; - - DataTree.prototype.generateChildren = function (row) { - var _this27 = this; - - var children = []; - - row.getData()[this.field].forEach(function (childData) { - var childRow = new Row(childData || {}, _this27.table.rowManager); - childRow.modules.dataTree.index = row.modules.dataTree.index + 1; - childRow.modules.dataTree.parent = row; - childRow.modules.dataTree.open = _this27.startOpen(row, childRow.modules.dataTree.index); - children.push(childRow); - }); - - return children; - }; - - DataTree.prototype.expandRow = function (row, silent) { - var config = row.modules.dataTree; - - if (config.children !== false) { - config.open = true; - - row.reinitialize(); - - this.table.rowManager.refreshActiveData("tree", false, true); - - this.table.options.dataTreeRowExpanded(row.getComponent(), row.modules.dataTree.index); - } - }; - - DataTree.prototype.collapseRow = function (row) { - var config = row.modules.dataTree; - - if (config.children !== false) { - config.open = false; - - row.reinitialize(); - - this.table.rowManager.refreshActiveData("tree", false, true); - - this.table.options.dataTreeRowCollapsed(row.getComponent(), row.modules.dataTree.index); - } - }; - - DataTree.prototype.toggleRow = function (row) { - var config = row.modules.dataTree; - - if (config.children !== false) { - if (config.open) { - this.collapseRow(row); - } else { - this.expandRow(row); - } - } - }; - - DataTree.prototype.getTreeParent = function (row) { - return row.modules.dataTree.parent ? row.modules.dataTree.parent.getComponent() : false; - }; - - DataTree.prototype.getTreeChildren = function (row) { - var config = row.modules.dataTree, - output = []; - - if (config.children) { - - if (!Array.isArray(config.children)) { - config.children = this.generateChildren(row); - } - - config.children.forEach(function (childRow) { - if (childRow instanceof Row) { - output.push(childRow.getComponent()); - } - }); - } - - return output; - }; - - DataTree.prototype.checkForRestyle = function (cell) { - if (!cell.row.cells.indexOf(cell)) { - if (cell.row.modules.dataTree.children !== false) { - cell.row.reinitialize(); - } - } - }; - - Tabulator.prototype.registerModule("dataTree", DataTree); - var Download = function Download(table) { - this.table = table; //hold Tabulator object - this.fields = {}; //hold filed multi dimension arrays - this.columnsByIndex = []; //hold columns in their order in the table - this.columnsByField = {}; //hold columns with lookup by field name - this.config = {}; - }; - - //trigger file download - Download.prototype.download = function (type, filename, options, interceptCallback) { - var self = this, - downloadFunc = false; - this.processConfig(); - - function buildLink(data, mime) { - if (interceptCallback) { - interceptCallback(data); - } else { - self.triggerDownload(data, mime, type, filename); - } - } - - if (typeof type == "function") { - downloadFunc = type; - } else { - if (self.downloaders[type]) { - downloadFunc = self.downloaders[type]; - } else { - console.warn("Download Error - No such download type found: ", type); - } - } - - this.processColumns(); - - if (downloadFunc) { - downloadFunc.call(this, self.processDefinitions(), self.processData(), options || {}, buildLink, this.config); - } - }; - - Download.prototype.processConfig = function () { - var config = { //download config - columnGroups: true, - rowGroups: true - }; - - if (this.table.options.downloadConfig) { - for (var key in this.table.options.downloadConfig) { - config[key] = this.table.options.downloadConfig[key]; - } - } - - if (config.rowGroups && this.table.options.groupBy && this.table.modExists("groupRows")) { - this.config.rowGroups = true; - } - - if (config.columnGroups && this.table.columnManager.columns.length != this.table.columnManager.columnsByIndex.length) { - this.config.columnGroups = true; - } - }; - - Download.prototype.processColumns = function () { - var self = this; - - self.columnsByIndex = []; - self.columnsByField = {}; - - self.table.columnManager.columnsByIndex.forEach(function (column) { - - if (column.field && column.visible && column.definition.download !== false) { - self.columnsByIndex.push(column); - self.columnsByField[column.field] = column; - } - }); - }; - - Download.prototype.processDefinitions = function () { - var self = this, - processedDefinitions = []; - - if (this.config.columnGroups) { - self.table.columnManager.columns.forEach(function (column) { - var colData = self.processColumnGroup(column); - - if (colData) { - processedDefinitions.push(colData); - } - }); - } else { - self.columnsByIndex.forEach(function (column) { - if (column.download !== false) { - //isolate definiton from defintion object - processedDefinitions.push(self.processDefinition(column)); - } - }); - } - - return processedDefinitions; - }; - - Download.prototype.processColumnGroup = function (column) { - var _this28 = this; - - var subGroups = column.columns; - - var groupData = { - type: "group", - title: column.definition.title - }; - - if (subGroups.length) { - groupData.subGroups = []; - groupData.width = 0; - - subGroups.forEach(function (subGroup) { - var subGroupData = _this28.processColumnGroup(subGroup); - - if (subGroupData) { - groupData.width += subGroupData.width; - groupData.subGroups.push(subGroupData); - } - }); - - if (!groupData.width) { - return false; - } - } else { - if (column.field && column.visible && column.definition.download !== false) { - groupData.width = 1; - groupData.definition = this.processDefinition(column); - } else { - return false; - } - } - - return groupData; - }; - - Download.prototype.processDefinition = function (column) { - var def = {}; - - for (var key in column.definition) { - def[key] = column.definition[key]; - } - - if (typeof column.definition.downloadTitle != "undefined") { - def.title = column.definition.downloadTitle; - } - - return def; - }; - - Download.prototype.processData = function () { - var _this29 = this; - - var self = this, - data = [], - groups = []; - - if (this.config.rowGroups) { - groups = this.table.modules.groupRows.getGroups(); - - groups.forEach(function (group) { - data.push(_this29.processGroupData(group)); - }); - } else { - data = self.table.rowManager.getData(true, "download"); - } - - //bulk data processing - if (typeof self.table.options.downloadDataFormatter == "function") { - data = self.table.options.downloadDataFormatter(data); - } - - return data; - }; - - Download.prototype.processGroupData = function (group) { - var _this30 = this; - - var subGroups = group.getSubGroups(); - - var groupData = { - type: "group", - key: group.key - }; - - if (subGroups.length) { - groupData.subGroups = []; - - subGroups.forEach(function (subGroup) { - groupData.subGroups.push(_this30.processGroupData(subGroup)); - }); - } else { - groupData.rows = group.getData(true, "download"); - } - - return groupData; - }; - - Download.prototype.triggerDownload = function (data, mime, type, filename) { - var element = document.createElement('a'), - blob = new Blob([data], { type: mime }), - filename = filename || "Tabulator." + (typeof type === "function" ? "txt" : type); - - blob = this.table.options.downloadReady.call(this.table, data, blob); - - if (blob) { - - if (navigator.msSaveOrOpenBlob) { - navigator.msSaveOrOpenBlob(blob, filename); - } else { - element.setAttribute('href', window.URL.createObjectURL(blob)); - - //set file title - element.setAttribute('download', filename); - - //trigger download - element.style.display = 'none'; - document.body.appendChild(element); - element.click(); - - //remove temporary link element - document.body.removeChild(element); - } - - if (this.table.options.downloadComplete) { - this.table.options.downloadComplete(); - } - } - }; - - //nested field lookup - Download.prototype.getFieldValue = function (field, data) { - var column = this.columnsByField[field]; - - if (column) { - return column.getFieldValue(data); - } - - return false; - }; - - Download.prototype.commsReceived = function (table, action, data) { - switch (action) { - case "intercept": - this.download(data.type, "", data.options, data.intercept); - break; - } - }; - - //downloaders - Download.prototype.downloaders = { - csv: function csv(columns, data, options, setFileContents, config) { - var self = this, - titles = [], - fields = [], - delimiter = options && options.delimiter ? options.delimiter : ",", - fileContents; - - //build column headers - function parseSimpleTitles() { - columns.forEach(function (column) { - titles.push('"' + String(column.title).split('"').join('""') + '"'); - fields.push(column.field); - }); - } - - function parseColumnGroup(column, level) { - if (column.subGroups) { - column.subGroups.forEach(function (subGroup) { - parseColumnGroup(subGroup, level + 1); - }); - } else { - titles.push('"' + String(column.title).split('"').join('""') + '"'); - fields.push(column.definition.field); - } - } - - if (config.columnGroups) { - console.warn("Download Warning - CSV downloader cannot process column groups"); - - columns.forEach(function (column) { - parseColumnGroup(column, 0); - }); - } else { - parseSimpleTitles(); - } - - //generate header row - fileContents = [titles.join(delimiter)]; - - function parseRows(data) { - //generate each row of the table - data.forEach(function (row) { - var rowData = []; - - fields.forEach(function (field) { - var value = self.getFieldValue(field, row); - - switch (typeof value === 'undefined' ? 'undefined' : _typeof(value)) { - case "object": - value = JSON.stringify(value); - break; - - case "undefined": - case "null": - value = ""; - break; - - default: - value = value; - } - - //escape quotation marks - rowData.push('"' + String(value).split('"').join('""') + '"'); - }); - - fileContents.push(rowData.join(delimiter)); - }); - } - - function parseGroup(group) { - if (group.subGroups) { - group.subGroups.forEach(function (subGroup) { - parseGroup(subGroup); - }); - } else { - parseRows(group.rows); - } - } - - if (config.rowGroups) { - console.warn("Download Warning - CSV downloader cannot process row groups"); - - data.forEach(function (group) { - parseGroup(group); - }); - } else { - parseRows(data); - } - - setFileContents(fileContents.join("\n"), "text/csv"); - }, - - json: function json(columns, data, options, setFileContents, config) { - var fileContents = JSON.stringify(data, null, '\t'); - - setFileContents(fileContents, "application/json"); - }, - - pdf: function pdf(columns, data, options, setFileContents, config) { - var self = this, - fields = [], - header = [], - body = [], - table = "", - groupRowIndexs = [], - autoTableParams = {}, - rowGroupStyles = {}, - jsPDFParams = options.jsPDF || {}, - title = options && options.title ? options.title : ""; - - if (!jsPDFParams.orientation) { - jsPDFParams.orientation = options.orientation || "landscape"; - } - - if (!jsPDFParams.unit) { - jsPDFParams.unit = "pt"; - } - - //build column headers - function parseSimpleTitles() { - columns.forEach(function (column) { - if (column.field) { - header.push(column.title || ""); - fields.push(column.field); - } - }); - } - - function parseColumnGroup(column, level) { - if (column.subGroups) { - column.subGroups.forEach(function (subGroup) { - parseColumnGroup(subGroup, level + 1); - }); - } else { - header.push(column.title || ""); - fields.push(column.definition.field); - } - } - - if (config.columnGroups) { - console.warn("Download Warning - PDF downloader cannot process column groups"); - - columns.forEach(function (column) { - parseColumnGroup(column, 0); - }); - } else { - parseSimpleTitles(); - } - - function parseValue(value) { - switch (typeof value === 'undefined' ? 'undefined' : _typeof(value)) { - case "object": - value = JSON.stringify(value); - break; - - case "undefined": - case "null": - value = ""; - break; - - default: - value = value; - } - - return value; - } - - function parseRows(data) { - //build table rows - data.forEach(function (row) { - var rowData = []; - - fields.forEach(function (field) { - var value = self.getFieldValue(field, row); - rowData.push(parseValue(value)); - }); - - body.push(rowData); - }); - } - - function parseGroup(group) { - var groupData = []; - - groupData.push(parseValue(group.key)); - - groupRowIndexs.push(body.length); - - body.push(groupData); - - if (group.subGroups) { - group.subGroups.forEach(function (subGroup) { - parseGroup(subGroup); - }); - } else { - parseRows(group.rows); - } - } - - if (config.rowGroups) { - data.forEach(function (group) { - parseGroup(group); - }); - } else { - parseRows(data); - } - - var doc = new jsPDF(jsPDFParams); //set document to landscape, better for most tables - - if (options && options.autoTable) { - if (typeof options.autoTable === "function") { - autoTableParams = options.autoTable(doc) || {}; - } else { - autoTableParams = options.autoTable; - } - } - - if (config.rowGroups) { - var createdCell = function createdCell(cell, data) { - if (groupRowIndexs.indexOf(data.row.index) > -1) { - for (var key in rowGroupStyles) { - cell.styles[key] = rowGroupStyles[key]; - } - } - }; - - rowGroupStyles = options.rowGroupStyles || { - fontStyle: "bold", - fontSize: 12, - cellPadding: 6, - fillColor: 220 - }; - - if (!autoTableParams.createdCell) { - autoTableParams.createdCell = createdCell; - } else { - var createdCellHolder = autoTableParams.createdCell; - - autoTableParams.createdCell = function (cell, data) { - createdCell(cell, data); - createdCellHolder(cell, data); - }; - } - } - - if (title) { - autoTableParams.addPageContent = function (data) { - doc.text(title, 40, 30); - }; - } - - doc.autoTable(header, body, autoTableParams); - - setFileContents(doc.output("arraybuffer"), "application/pdf"); - }, - - xlsx: function xlsx(columns, data, options, setFileContents, config) { - var self = this, - sheetName = options.sheetName || "Sheet1", - workbook = { SheetNames: [], Sheets: {} }, - groupRowIndexs = [], - groupColumnIndexs = [], - output; - - function generateSheet() { - var titles = [], - fields = [], - rows = [], - worksheet; - - //convert rows to worksheet - function rowsToSheet() { - var sheet = {}; - var range = { s: { c: 0, r: 0 }, e: { c: fields.length, r: rows.length } }; - - XLSX.utils.sheet_add_aoa(sheet, rows); - - sheet['!ref'] = XLSX.utils.encode_range(range); - - var merges = generateMerges(); - - if (merges.length) { - sheet["!merges"] = merges; - } - - return sheet; - } - - function parseSimpleTitles() { - //get field lists - columns.forEach(function (column) { - titles.push(column.title); - fields.push(column.field); - }); - - rows.push(titles); - } - - function parseColumnGroup(column, level) { - - if (typeof titles[level] === "undefined") { - titles[level] = []; - } - - if (typeof groupColumnIndexs[level] === "undefined") { - groupColumnIndexs[level] = []; - } - - if (column.width > 1) { - - groupColumnIndexs[level].push({ - type: "hoz", - start: titles[level].length, - end: titles[level].length + column.width - 1 - }); - } - - titles[level].push(column.title); - - if (column.subGroups) { - column.subGroups.forEach(function (subGroup) { - parseColumnGroup(subGroup, level + 1); - }); - } else { - fields.push(column.definition.field); - padColumnTitles(fields.length - 1, level); - - groupColumnIndexs[level].push({ - type: "vert", - start: fields.length - 1 - }); - } - } - - function padColumnTitles() { - var max = 0; - - titles.forEach(function (title) { - var len = title.length; - if (len > max) { - max = len; - } - }); - - titles.forEach(function (title) { - var len = title.length; - if (len < max) { - for (var i = len; i < max; i++) { - title.push(""); - } - } - }); - } - - if (config.columnGroups) { - columns.forEach(function (column) { - parseColumnGroup(column, 0); - }); - - titles.forEach(function (title) { - rows.push(title); - }); - } else { - parseSimpleTitles(); - } - - function generateMerges() { - var output = []; - - groupRowIndexs.forEach(function (index) { - output.push({ s: { r: index, c: 0 }, e: { r: index, c: fields.length - 1 } }); - }); - - groupColumnIndexs.forEach(function (merges, level) { - merges.forEach(function (merge) { - if (merge.type === "hoz") { - output.push({ s: { r: level, c: merge.start }, e: { r: level, c: merge.end } }); - } else { - if (level != titles.length - 1) { - output.push({ s: { r: level, c: merge.start }, e: { r: titles.length - 1, c: merge.start } }); - } - } - }); - }); - - return output; - } - - //generate each row of the table - function parseRows(data) { - data.forEach(function (row) { - var rowData = []; - - fields.forEach(function (field) { - var value = self.getFieldValue(field, row); - - rowData.push((typeof value === 'undefined' ? 'undefined' : _typeof(value)) === "object" ? JSON.stringify(value) : value); - }); - - rows.push(rowData); - }); - } - - function parseGroup(group) { - var groupData = []; - - groupData.push(group.key); - - groupRowIndexs.push(rows.length); - - rows.push(groupData); - - if (group.subGroups) { - group.subGroups.forEach(function (subGroup) { - parseGroup(subGroup); - }); - } else { - parseRows(group.rows); - } - } - - if (config.rowGroups) { - data.forEach(function (group) { - parseGroup(group); - }); - } else { - parseRows(data); - } - - worksheet = rowsToSheet(); - - return worksheet; - } - - if (options.sheetOnly) { - setFileContents(generateSheet()); - return; - } - - if (options.sheets) { - for (var sheet in options.sheets) { - - if (options.sheets[sheet] === true) { - workbook.SheetNames.push(sheet); - workbook.Sheets[sheet] = generateSheet(); - } else { - - workbook.SheetNames.push(sheet); - - this.table.modules.comms.send(options.sheets[sheet], "download", "intercept", { - type: "xlsx", - options: { sheetOnly: true }, - intercept: function intercept(data) { - workbook.Sheets[sheet] = data; - } - }); - } - } - } else { - workbook.SheetNames.push(sheetName); - workbook.Sheets[sheetName] = generateSheet(); - } - - //convert workbook to binary array - function s2ab(s) { - var buf = new ArrayBuffer(s.length); - var view = new Uint8Array(buf); - for (var i = 0; i != s.length; ++i) { - view[i] = s.charCodeAt(i) & 0xFF; - }return buf; - } - - output = XLSX.write(workbook, { bookType: 'xlsx', bookSST: true, type: 'binary' }); - - setFileContents(s2ab(output), "application/octet-stream"); - } - - }; - - Tabulator.prototype.registerModule("download", Download); - var Edit = function Edit(table) { - this.table = table; //hold Tabulator object - this.currentCell = false; //hold currently editing cell - this.mouseClick = false; //hold mousedown state to prevent click binding being overriden by editor opening - this.recursionBlock = false; //prevent focus recursion - this.invalidEdit = false; - }; - - //initialize column editor - Edit.prototype.initializeColumn = function (column) { - var self = this, - config = { - editor: false, - blocked: false, - check: column.definition.editable, - params: column.definition.editorParams || {} - }; - - //set column editor - switch (_typeof(column.definition.editor)) { - case "string": - - if (column.definition.editor === "tick") { - column.definition.editor = "tickCross"; - console.warn("DEPRECATION WANRING - the tick editor has been depricated, please use the tickCross editor"); - } - - if (self.editors[column.definition.editor]) { - config.editor = self.editors[column.definition.editor]; - } else { - console.warn("Editor Error - No such editor found: ", column.definition.editor); - } - break; - - case "function": - config.editor = column.definition.editor; - break; - - case "boolean": - - if (column.definition.editor === true) { - - if (typeof column.definition.formatter !== "function") { - - if (column.definition.formatter === "tick") { - column.definition.formatter = "tickCross"; - console.warn("DEPRECATION WANRING - the tick editor has been depricated, please use the tickCross editor"); - } - - if (self.editors[column.definition.formatter]) { - config.editor = self.editors[column.definition.formatter]; - } else { - config.editor = self.editors["input"]; - } - } else { - console.warn("Editor Error - Cannot auto lookup editor for a custom formatter: ", column.definition.formatter); - } - } - break; - } - - if (config.editor) { - column.modules.edit = config; - } - }; - - Edit.prototype.getCurrentCell = function () { - return this.currentCell ? this.currentCell.getComponent() : false; - }; - - Edit.prototype.clearEditor = function () { - var cell = this.currentCell, - cellEl; - - this.invalidEdit = false; - - if (cell) { - this.currentCell = false; - - cellEl = cell.getElement(); - cellEl.classList.remove("tabulator-validation-fail"); - cellEl.classList.remove("tabulator-editing"); - while (cellEl.firstChild) { - cellEl.removeChild(cellEl.firstChild); - }cell.row.getElement().classList.remove("tabulator-row-editing"); - } - }; - - Edit.prototype.cancelEdit = function () { - - if (this.currentCell) { - var cell = this.currentCell; - var component = this.currentCell.getComponent(); - - this.clearEditor(); - cell.setValueActual(cell.getValue()); - - if (cell.column.cellEvents.cellEditCancelled) { - cell.column.cellEvents.cellEditCancelled.call(this.table, component); - } - - this.table.options.cellEditCancelled.call(this.table, component); - } - }; - - //return a formatted value for a cell - Edit.prototype.bindEditor = function (cell) { - var self = this, - element = cell.getElement(); - - element.setAttribute("tabindex", 0); - - element.addEventListener("click", function (e) { - if (!element.classList.contains("tabulator-editing")) { - element.focus(); - } - }); - - element.addEventListener("mousedown", function (e) { - self.mouseClick = true; - }); - - element.addEventListener("focus", function (e) { - if (!self.recursionBlock) { - self.edit(cell, e, false); - } - }); - }; - - Edit.prototype.focusCellNoEvent = function (cell) { - this.recursionBlock = true; - cell.getElement().focus(); - this.recursionBlock = false; - }; - - Edit.prototype.editCell = function (cell, forceEdit) { - this.focusCellNoEvent(cell); - this.edit(cell, false, forceEdit); - }; - - Edit.prototype.edit = function (cell, e, forceEdit) { - var self = this, - allowEdit = true, - rendered = function rendered() {}, - element = cell.getElement(), - cellEditor, - component, - params; - - //prevent editing if another cell is refusing to leave focus (eg. validation fail) - if (this.currentCell) { - if (!this.invalidEdit) { - this.cancelEdit(); - } - return; - } - - //handle successfull value change - function success(value) { - - if (self.currentCell === cell) { - var valid = true; - - if (cell.column.modules.validate && self.table.modExists("validate")) { - valid = self.table.modules.validate.validate(cell.column.modules.validate, cell.getComponent(), value); - } - - if (valid === true) { - self.clearEditor(); - cell.setValue(value, true); - - if (self.table.options.dataTree && self.table.modExists("dataTree")) { - self.table.modules.dataTree.checkForRestyle(cell); - } - } else { - self.invalidEdit = true; - element.classList.add("tabulator-validation-fail"); - self.focusCellNoEvent(cell); - rendered(); - self.table.options.validationFailed.call(self.table, cell.getComponent(), value, valid); - } - } else { - // console.warn("Edit Success Error - cannot call success on a cell that is no longer being edited"); - } - } - - //handle aborted edit - function cancel() { - if (self.currentCell === cell) { - self.cancelEdit(); - - if (self.table.options.dataTree && self.table.modExists("dataTree")) { - self.table.modules.dataTree.checkForRestyle(cell); - } - } else { - // console.warn("Edit Success Error - cannot call cancel on a cell that is no longer being edited"); - } - } - - function onRendered(callback) { - rendered = callback; - } - - if (!cell.column.modules.edit.blocked) { - if (e) { - e.stopPropagation(); - } - - switch (_typeof(cell.column.modules.edit.check)) { - case "function": - allowEdit = cell.column.modules.edit.check(cell.getComponent()); - break; - - case "boolean": - allowEdit = cell.column.modules.edit.check; - break; - } - - if (allowEdit || forceEdit) { - - self.cancelEdit(); - - self.currentCell = cell; - - component = cell.getComponent(); - - if (this.mouseClick) { - this.mouseClick = false; - - if (cell.column.cellEvents.cellClick) { - cell.column.cellEvents.cellClick.call(this.table, e, component); - } - } - - if (cell.column.cellEvents.cellEditing) { - cell.column.cellEvents.cellEditing.call(this.table, component); - } - - self.table.options.cellEditing.call(this.table, component); - - params = typeof cell.column.modules.edit.params === "function" ? cell.column.modules.edit.params(component) : cell.column.modules.edit.params; - - cellEditor = cell.column.modules.edit.editor.call(self, component, onRendered, success, cancel, params); - - //if editor returned, add to DOM, if false, abort edit - if (cellEditor !== false) { - - if (cellEditor instanceof Node) { - element.classList.add("tabulator-editing"); - cell.row.getElement().classList.add("tabulator-row-editing"); - while (element.firstChild) { - element.removeChild(element.firstChild); - }element.appendChild(cellEditor); - - //trigger onRendered Callback - rendered(); - - //prevent editing from triggering rowClick event - var children = element.children; - - for (var i = 0; i < children.length; i++) { - children[i].addEventListener("click", function (e) { - e.stopPropagation(); - }); - } - } else { - console.warn("Edit Error - Editor should return an instance of Node, the editor returned:", cellEditor); - element.blur(); - return false; - } - } else { - element.blur(); - return false; - } - - return true; - } else { - this.mouseClick = false; - element.blur(); - return false; - } - } else { - this.mouseClick = false; - element.blur(); - return false; - } - }; - - //default data editors - Edit.prototype.editors = { - - //input element - input: function input(cell, onRendered, success, cancel, editorParams) { - - //create and style input - var cellValue = cell.getValue(), - input = document.createElement("input"); - - input.setAttribute("type", "text"); - - input.style.padding = "4px"; - input.style.width = "100%"; - input.style.boxSizing = "border-box"; - - input.value = typeof cellValue !== "undefined" ? cellValue : ""; - - onRendered(function () { - input.focus(); - input.style.height = "100%"; - }); - - function onChange(e) { - if ((cellValue === null || typeof cellValue === "undefined") && input.value !== "" || input.value != cellValue) { - success(input.value); - } else { - cancel(); - } - } - - //submit new value on blur or change - input.addEventListener("change", onChange); - input.addEventListener("blur", onChange); - - //submit new value on enter - input.addEventListener("keydown", function (e) { - switch (e.keyCode) { - case 13: - success(input.value); - break; - - case 27: - cancel(); - break; - } - }); - - return input; - }, - - //resizable text area element - textarea: function textarea(cell, onRendered, success, cancel, editorParams) { - var self = this, - cellValue = cell.getValue(), - value = String(typeof cellValue == "null" || typeof cellValue == "undefined" ? "" : cellValue), - count = (value.match(/(?:\r\n|\r|\n)/g) || []).length + 1, - input = document.createElement("textarea"), - scrollHeight = 0; - - //create and style input - input.style.display = "block"; - input.style.padding = "2px"; - input.style.height = "100%"; - input.style.width = "100%"; - input.style.boxSizing = "border-box"; - input.style.whiteSpace = "pre-wrap"; - input.style.resize = "none"; - - input.value = value; - - onRendered(function () { - input.focus(); - input.style.height = "100%"; - }); - - function onChange(e) { - - if ((cellValue === null || typeof cellValue === "undefined") && input.value !== "" || input.value != cellValue) { - success(input.value); - setTimeout(function () { - cell.getRow().normalizeHeight(); - }, 300); - } else { - cancel(); - } - } - - //submit new value on blur or change - input.addEventListener("change", onChange); - input.addEventListener("blur", onChange); - - input.addEventListener("keyup", function () { - - input.style.height = ""; - - var heightNow = input.scrollHeight; - - input.style.height = heightNow + "px"; - - if (heightNow != scrollHeight) { - scrollHeight = heightNow; - cell.getRow().normalizeHeight(); - } - }); - - input.addEventListener("keydown", function (e) { - if (e.keyCode == 27) { - cancel(); - } - }); - - return input; - }, - - //input element with type of number - number: function number(cell, onRendered, success, cancel, editorParams) { - - var cellValue = cell.getValue(), - input = document.createElement("input"); - - input.setAttribute("type", "number"); - - if (typeof editorParams.max != "undefined") { - input.setAttribute("max", editorParams.max); - } - - if (typeof editorParams.min != "undefined") { - input.setAttribute("min", editorParams.min); - } - - if (typeof editorParams.step != "undefined") { - input.setAttribute("step", editorParams.step); - } - - //create and style input - input.style.padding = "4px"; - input.style.width = "100%"; - input.style.boxSizing = "border-box"; - - input.value = cellValue; - - onRendered(function () { - input.focus(); - input.style.height = "100%"; - }); - - function onChange() { - var value = input.value; - - if (!isNaN(value) && value !== "") { - value = Number(value); - } - - if (value != cellValue) { - success(value); - } else { - cancel(); - } - } - - //submit new value on blur - input.addEventListener("blur", function (e) { - onChange(); - }); - - //submit new value on enter - input.addEventListener("keydown", function (e) { - switch (e.keyCode) { - case 13: - case 9: - onChange(); - break; - - case 27: - cancel(); - break; - } - }); - - return input; - }, - - //input element with type of number - range: function range(cell, onRendered, success, cancel, editorParams) { - - var cellValue = cell.getValue(), - input = document.createElement("input"); - - input.setAttribute("type", "range"); - - if (typeof editorParams.max != "undefined") { - input.setAttribute("max", editorParams.max); - } - - if (typeof editorParams.min != "undefined") { - input.setAttribute("min", editorParams.min); - } - - if (typeof editorParams.step != "undefined") { - input.setAttribute("step", editorParams.step); - } - - //create and style input - input.style.padding = "4px"; - input.style.width = "100%"; - input.style.boxSizing = "border-box"; - - input.value = cellValue; - - onRendered(function () { - input.focus(); - input.style.height = "100%"; - }); - - function onChange() { - var value = input.value; - - if (!isNaN(value) && value !== "") { - value = Number(value); - } - - if (value != cellValue) { - success(value); - } else { - cancel(); - } - } - - //submit new value on blur - input.addEventListener("blur", function (e) { - onChange(); - }); - - //submit new value on enter - input.addEventListener("keydown", function (e) { - switch (e.keyCode) { - case 13: - case 9: - onChange(); - break; - - case 27: - cancel(); - break; - } - }); - - return input; - }, - - //select - select: function select(cell, onRendered, success, cancel, editorParams) { - var self = this, - cellEl = cell.getElement(), - initialValue = cell.getValue(), - input = document.createElement("input"), - listEl = document.createElement("div"), - dataItems = [], - displayItems = [], - currentItem = {}, - blurable = true; - - if (Array.isArray(editorParams) || !Array.isArray(editorParams) && (typeof editorParams === 'undefined' ? 'undefined' : _typeof(editorParams)) === "object" && !editorParams.values) { - console.warn("DEPRECATION WANRING - values for the select editor must now be passed into the values property of the editorParams object, not as the editorParams object"); - editorParams = { values: editorParams }; - } - - function getUniqueColumnValues() { - var output = {}, - column = cell.getColumn()._getSelf(), - data = self.table.getData(); - - data.forEach(function (row) { - var val = column.getFieldValue(row); - - if (val !== null && typeof val !== "undefined" && val !== "") { - output[val] = true; - } - }); - - return Object.keys(output); - } - - function parseItems(inputValues, curentValue) { - var dataList = []; - var displayList = []; - - function processComplexListItem(item) { - var item = { - label: editorParams.listItemFormatter ? editorParams.listItemFormatter(item.value, item.label) : item.label, - value: item.value, - element: false - }; - - if (item.value === curentValue) { - setCurrentItem(item); - } - - dataList.push(item); - displayList.push(item); - - return item; - } - - if (typeof inputValues == "function") { - inputValues = inputValues(cell); - } - - if (Array.isArray(inputValues)) { - inputValues.forEach(function (value) { - var item; - - if ((typeof value === 'undefined' ? 'undefined' : _typeof(value)) === "object") { - - if (value.options) { - item = { - label: value.label, - group: true, - element: false - }; - - displayList.push(item); - - value.options.forEach(function (item) { - processComplexListItem(item); - }); - } else { - processComplexListItem(value); - } - } else { - item = { - label: editorParams.listItemFormatter ? editorParams.listItemFormatter(value, value) : value, - value: value, - element: false - }; - - if (item.value === curentValue) { - setCurrentItem(item); - } - - dataList.push(item); - displayList.push(item); - } - }); - } else { - for (var key in inputValues) { - var item = { - label: editorParams.listItemFormatter ? editorParams.listItemFormatter(key, inputValues[key]) : inputValues[key], - value: key, - element: false - }; - - if (item.value === curentValue) { - setCurrentItem(item); - } - - dataList.push(item); - displayList.push(item); - } - } - - dataItems = dataList; - displayItems = displayList; - - fillList(); - } - - function fillList() { - while (listEl.firstChild) { - listEl.removeChild(listEl.firstChild); - }displayItems.forEach(function (item) { - var el = item.element; - - if (!el) { - - if (item.group) { - el = document.createElement("div"); - el.classList.add("tabulator-edit-select-list-group"); - el.tabIndex = 0; - el.innerHTML = item.label === "" ? " " : item.label; - } else { - el = document.createElement("div"); - el.classList.add("tabulator-edit-select-list-item"); - el.tabIndex = 0; - el.innerHTML = item.label === "" ? " " : item.label; - - el.addEventListener("click", function () { - setCurrentItem(item); - chooseItem(); - }); - - if (item === currentItem) { - el.classList.add("active"); - } - } - - el.addEventListener("mousedown", function () { - blurable = false; - - setTimeout(function () { - blurable = true; - }, 10); - }); - - item.element = el; - } - - listEl.appendChild(el); - }); - } - - function setCurrentItem(item) { - - if (currentItem && currentItem.element) { - currentItem.element.classList.remove("active"); - } - - currentItem = item; - input.value = item.label === " " ? "" : item.label; - - if (item.element) { - item.element.classList.add("active"); - } - } - - function chooseItem() { - hideList(); - - if (initialValue !== currentItem.value) { - initialValue = currentItem.value; - success(currentItem.value); - } else { - cancel(); - } - } - - function cancelItem() { - hideList(); - cancel(); - } - - function showList() { - if (!listEl.parentNode) { - - if (editorParams.values === true) { - parseItems(getUniqueColumnValues(), initialValue); - } else { - parseItems(editorParams.values || [], initialValue); - } - - var offset = Tabulator.prototype.helpers.elOffset(cellEl); - - listEl.style.minWidth = cellEl.offsetWidth + "px"; - - listEl.style.top = offset.top + cellEl.offsetHeight + "px"; - listEl.style.left = offset.left + "px"; - document.body.appendChild(listEl); - } - } - - function hideList() { - if (listEl.parentNode) { - listEl.parentNode.removeChild(listEl); - } - } - - //style input - input.setAttribute("type", "text"); - - input.style.padding = "4px"; - input.style.width = "100%"; - input.style.boxSizing = "border-box"; - input.readonly = true; - - //allow key based navigation - input.addEventListener("keydown", function (e) { - var index; - - switch (e.keyCode) { - case 38: - //up arrow - e.stopImmediatePropagation(); - e.stopPropagation(); - - index = dataItems.indexOf(currentItem); - - if (index > 0) { - setCurrentItem(dataItems[index - 1]); - } - break; - - case 40: - //down arrow - e.stopImmediatePropagation(); - e.stopPropagation(); - - index = dataItems.indexOf(currentItem); - - if (index < dataItems.length - 1) { - if (index == -1) { - setCurrentItem(dataItems[0]); - } else { - setCurrentItem(dataItems[index + 1]); - } - } - break; - - case 13: - //enter - chooseItem(); - break; - - case 27: - //escape - cancelItem(); - break; - } - }); - - input.addEventListener("blur", function (e) { - if (blurable) { - cancelItem(); - } - }); - - input.addEventListener("focus", function (e) { - showList(); - }); - - //style list element - listEl = document.createElement("div"); - listEl.classList.add("tabulator-edit-select-list"); - - onRendered(function () { - input.style.height = "100%"; - input.focus(); - }); - - return input; - }, - - //autocomplete - autocomplete: function autocomplete(cell, onRendered, success, cancel, editorParams) { - var self = this, - cellEl = cell.getElement(), - initialValue = cell.getValue(), - input = document.createElement("input"), - listEl = document.createElement("div"), - allItems = [], - displayItems = [], - currentItem = {}, - blurable = true; - - function getUniqueColumnValues() { - var output = {}, - column = cell.getColumn()._getSelf(), - data = self.table.getData(); - - data.forEach(function (row) { - var val = column.getFieldValue(row); - - if (val !== null && typeof val !== "undefined" && val !== "") { - output[val] = true; - } - }); - - return Object.keys(output); - } - - function parseItems(inputValues, curentValue) { - var itemList = []; - - if (Array.isArray(inputValues)) { - inputValues.forEach(function (value) { - var item = { - title: editorParams.listItemFormatter ? editorParams.listItemFormatter(value, value) : value, - value: value, - element: false - }; - - if (item.value === curentValue) { - setCurrentItem(item); - } - - itemList.push(item); - }); - } else { - for (var key in inputValues) { - var item = { - title: editorParams.listItemFormatter ? editorParams.listItemFormatter(key, inputValues[key]) : inputValues[key], - value: key, - element: false - }; - - if (item.value === curentValue) { - setCurrentItem(item); - } - - itemList.push(item); - } - } - - allItems = itemList; - } - - function filterList(term) { - var matches = []; - - if (editorParams.searchFunc) { - matches = editorParams.searchFunc(term, values); - } else { - if (term === "") { - - if (editorParams.showListOnEmpty) { - allItems.forEach(function (item) { - matches.push(item); - }); - } - } else { - allItems.forEach(function (item) { - - if (item.value !== null || typeof item.value !== "undefined") { - if (String(item.value).toLowerCase().indexOf(String(term).toLowerCase()) > -1) { - matches.push(item); - } - } - }); - } - } - - displayItems = matches; - - fillList(); - } - - function fillList() { - var current = false; - - while (listEl.firstChild) { - listEl.removeChild(listEl.firstChild); - }displayItems.forEach(function (item) { - var el = item.element; - - if (!el) { - el = document.createElement("div"); - el.classList.add("tabulator-edit-select-list-item"); - el.tabIndex = 0; - el.innerHTML = item.title; - - el.addEventListener("click", function () { - setCurrentItem(item); - chooseItem(); - }); - - el.addEventListener("mousedown", function () { - blurable = false; - - setTimeout(function () { - blurable = true; - }, 10); - }); - - item.element = el; - - if (item === currentItem) { - item.element.classList.add("active"); - current = true; - } - } - - listEl.appendChild(el); - }); - - if (!current) { - setCurrentItem(false); - } - } - - function setCurrentItem(item, showInputValue) { - if (currentItem && currentItem.element) { - currentItem.element.classList.remove("active"); - } - - currentItem = item; - - if (item && item.element) { - item.element.classList.add("active"); - } - } - - function chooseItem() { - hideList(); - - if (currentItem) { - if (initialValue !== currentItem.value) { - initialValue = currentItem.value; - input.value = currentItem.value; - success(input.value); - } else { - cancel(); - } - } else { - if (editorParams.freetext) { - initialValue = input.value; - success(input.value); - } else { - if (editorParams.allowEmpty && input.value === "") { - initialValue = input.value; - success(input.value); - } else { - cancel(); - } - } - } - } - - function cancelItem() { - hideList(); - cancel(); - } - - function showList() { - if (!listEl.parentNode) { - while (listEl.firstChild) { - listEl.removeChild(listEl.firstChild); - }if (editorParams.values === true) { - parseItems(getUniqueColumnValues(), initialValue); - } else { - parseItems(editorParams.values || [], initialValue); - } - - var offset = Tabulator.prototype.helpers.elOffset(cellEl); - - listEl.style.minWidth = cellEl.offsetWidth + "px"; - - listEl.style.top = offset.top + cellEl.offsetHeight + "px"; - listEl.style.left = offset.left + "px"; - document.body.appendChild(listEl); - } - } - - function hideList() { - if (listEl.parentNode) { - listEl.parentNode.removeChild(listEl); - } - } - - //style input - input.setAttribute("type", "text"); - - input.style.padding = "4px"; - input.style.width = "100%"; - input.style.boxSizing = "border-box"; - - //allow key based navigation - input.addEventListener("keydown", function (e) { - var index; - - switch (e.keyCode) { - case 38: - //up arrow - e.stopImmediatePropagation(); - e.stopPropagation(); - - index = displayItems.indexOf(currentItem); - - if (index > 0) { - setCurrentItem(displayItems[index - 1]); - } else { - setCurrentItem(false); - } - break; - - case 40: - //down arrow - e.stopImmediatePropagation(); - e.stopPropagation(); - - index = displayItems.indexOf(currentItem); - - if (index < displayItems.length - 1) { - if (index == -1) { - setCurrentItem(displayItems[0]); - } else { - setCurrentItem(displayItems[index + 1]); - } - } - break; - - case 13: - //enter - chooseItem(); - break; - - case 27: - //escape - cancelItem(); - break; - } - }); - - input.addEventListener("keyup", function (e) { - - switch (e.keyCode) { - case 38: //up arrow - case 37: //left arrow - case 39: //up arrow - case 40: //right arrow - case 13: //enter - case 27: - //escape - break; - - default: - filterList(input.value); - } - }); - - input.addEventListener("blur", function (e) { - if (blurable) { - chooseItem(); - } - }); - - input.addEventListener("focus", function (e) { - showList(); - input.value = initialValue; - filterList(initialValue); - }); - - //style list element - listEl = document.createElement("div"); - listEl.classList.add("tabulator-edit-select-list"); - - onRendered(function () { - input.style.height = "100%"; - input.focus(); - }); - - return input; - }, - - //start rating - star: function star(cell, onRendered, success, cancel, editorParams) { - var self = this, - element = cell.getElement(), - value = cell.getValue(), - maxStars = element.getElementsByTagName("svg").length || 5, - size = element.getElementsByTagName("svg")[0] ? element.getElementsByTagName("svg")[0].getAttribute("width") : 14, - stars = [], - starsHolder = document.createElement("div"), - star = document.createElementNS('http://www.w3.org/2000/svg', "svg"); - - //change star type - function starChange(val) { - stars.forEach(function (star, i) { - if (i < val) { - if (self.table.browser == "ie") { - star.setAttribute("class", "tabulator-star-active"); - } else { - star.classList.replace("tabulator-star-inactive", "tabulator-star-active"); - } - - star.innerHTML = ''; - } else { - if (self.table.browser == "ie") { - star.setAttribute("class", "tabulator-star-inactive"); - } else { - star.classList.replace("tabulator-star-active", "tabulator-star-inactive"); - } - - star.innerHTML = ''; - } - }); - } - - //build stars - function buildStar(i) { - var nextStar = star.cloneNode(true); - - stars.push(nextStar); - - nextStar.addEventListener("mouseover", function (e) { - e.stopPropagation(); - starChange(i); - }); - - nextStar.addEventListener("click", function (e) { - e.stopPropagation(); - success(i); - }); - - starsHolder.appendChild(nextStar); - } - - //handle keyboard navigation value change - function changeValue(val) { - value = val; - starChange(val); - } - - //style cell - element.style.whiteSpace = "nowrap"; - element.style.overflow = "hidden"; - element.style.textOverflow = "ellipsis"; - - //style holding element - starsHolder.style.verticalAlign = "middle"; - starsHolder.style.display = "inline-block"; - starsHolder.style.padding = "4px"; - - //style star - star.setAttribute("width", size); - star.setAttribute("height", size); - star.setAttribute("viewBox", "0 0 512 512"); - star.setAttribute("xml:space", "preserve"); - star.style.padding = "0 1px"; - - //create correct number of stars - for (var i = 1; i <= maxStars; i++) { - buildStar(i); - } - - //ensure value does not exceed number of stars - value = Math.min(parseInt(value), maxStars); - - // set initial styling of stars - starChange(value); - - starsHolder.addEventListener("mouseover", function (e) { - starChange(0); - }); - - starsHolder.addEventListener("click", function (e) { - success(0); - }); - - element.addEventListener("blur", function (e) { - cancel(); - }); - - //allow key based navigation - element.addEventListener("keydown", function (e) { - switch (e.keyCode) { - case 39: - //right arrow - changeValue(value + 1); - break; - - case 37: - //left arrow - changeValue(value - 1); - break; - - case 13: - //enter - success(value); - break; - - case 27: - //escape - cancel(); - break; - } - }); - - return starsHolder; - }, - - //draggable progress bar - progress: function progress(cell, onRendered, success, cancel, editorParams) { - var element = cell.getElement(), - max = typeof editorParams.max === "undefined" ? element.getElementsByTagName("div")[0].getAttribute("max") || 100 : editorParams.max, - min = typeof editorParams.min === "undefined" ? element.getElementsByTagName("div")[0].getAttribute("min") || 0 : editorParams.min, - percent = (max - min) / 100, - value = cell.getValue() || 0, - handle = document.createElement("div"), - bar = document.createElement("div"), - mouseDrag, - mouseDragWidth; - - //set new value - function updateValue() { - var calcVal = percent * Math.round(bar.offsetWidth / (element.clientWidth / 100)) + min; - success(calcVal); - element.setAttribute("aria-valuenow", calcVal); - element.setAttribute("aria-label", value); - } - - //style handle - handle.style.position = "absolute"; - handle.style.right = "0"; - handle.style.top = "0"; - handle.style.bottom = "0"; - handle.style.width = "5px"; - handle.classList.add("tabulator-progress-handle"); - - //style bar - bar.style.display = "inline-block"; - bar.style.position = "absolute"; - bar.style.top = "8px"; - bar.style.bottom = "8px"; - bar.style.left = "4px"; - bar.style.marginRight = "4px"; - bar.style.backgroundColor = "#488CE9"; - bar.style.maxWidth = "100%"; - bar.style.minWidth = "0%"; - - //style cell - element.style.padding = "0 4px"; - - //make sure value is in range - value = Math.min(parseFloat(value), max); - value = Math.max(parseFloat(value), min); - - //workout percentage - value = 100 - Math.round((value - min) / percent); - bar.style.right = value + "%"; - - element.setAttribute("aria-valuemin", min); - element.setAttribute("aria-valuemax", max); - - bar.appendChild(handle); - - handle.addEventListener("mousedown", function (e) { - mouseDrag = e.screenX; - mouseDragWidth = bar.offsetWidth; - }); - - handle.addEventListener("mouseover", function () { - handle.style.cursor = "ew-resize"; - }); - - element.addEventListener("mousemove", function (e) { - if (mouseDrag) { - bar.style.width = mouseDragWidth + e.screenX - mouseDrag + "px"; - } - }); - - element.addEventListener("mouseup", function (e) { - if (mouseDrag) { - e.stopPropagation(); - e.stopImmediatePropagation(); - - mouseDrag = false; - mouseDragWidth = false; - - updateValue(); - } - }); - - //allow key based navigation - element.addEventListener("keydown", function (e) { - switch (e.keyCode) { - case 39: - //right arrow - bar.style.width = bar.clientWidth + element.clientWidth / 100 + "px"; - break; - - case 37: - //left arrow - bar.style.width = bar.clientWidth - element.clientWidth / 100 + "px"; - break; - - case 13: - //enter - updateValue(); - break; - - case 27: - //escape - cancel(); - break; - - } - }); - - element.addEventListener("blur", function () { - cancel(); - }); - - return bar; - }, - - //checkbox - tickCross: function tickCross(cell, onRendered, success, cancel, editorParams) { - var value = cell.getValue(), - input = document.createElement("input"), - tristate = editorParams.tristate, - indetermValue = typeof editorParams.indeterminateValue === "undefined" ? null : editorParams.indeterminateValue, - indetermState = false; - - input.setAttribute("type", "checkbox"); - input.style.marginTop = "5px"; - input.style.boxSizing = "border-box"; - - input.value = value; - - if (tristate && (typeof value === "undefined" || value === indetermValue || value === "")) { - indetermState = true; - input.indeterminate = true; - } - - if (this.table.browser != "firefox") { - //prevent blur issue on mac firefox - onRendered(function () { - input.focus(); - }); - } - - input.checked = value === true || value === "true" || value === "True" || value === 1; - - function setValue(blur) { - if (tristate) { - if (!blur) { - if (input.checked && !indetermState) { - input.checked = false; - input.indeterminate = true; - indetermState = true; - return indetermValue; - } else { - indetermState = false; - return input.checked; - } - } else { - if (indetermState) { - return indetermValue; - } else { - return input.checked; - } - } - } else { - return input.checked; - } - } - - //submit new value on blur - input.addEventListener("change", function (e) { - success(setValue()); - }); - - input.addEventListener("blur", function (e) { - success(setValue(true)); - }); - - //submit new value on enter - input.addEventListener("keydown", function (e) { - if (e.keyCode == 13) { - success(setValue()); - } - if (e.keyCode == 27) { - cancel(); - } - }); - - return input; - } - }; - - Tabulator.prototype.registerModule("edit", Edit); - var Filter = function Filter(table) { - - this.table = table; //hold Tabulator object - - this.filterList = []; //hold filter list - this.headerFilters = {}; //hold column filters - this.headerFilterElements = []; //hold header filter elements for manipulation - this.headerFilterColumns = []; //hold columns that use header filters - - this.changed = false; //has filtering changed since last render - }; - - //initialize column header filter - Filter.prototype.initializeColumn = function (column, value) { - var self = this, - field = column.getField(), - prevSuccess, - params; - - //handle successfull value change - function success(value) { - var filterType = column.modules.filter.tagType == "input" && column.modules.filter.attrType == "text" || column.modules.filter.tagType == "textarea" ? "partial" : "match", - type = "", - filterFunc; - - if (typeof prevSuccess === "undefined" || prevSuccess !== value) { - - prevSuccess = value; - - if (!column.modules.filter.emptyFunc(value)) { - column.modules.filter.value = value; - - switch (_typeof(column.definition.headerFilterFunc)) { - case "string": - if (self.filters[column.definition.headerFilterFunc]) { - type = column.definition.headerFilterFunc; - filterFunc = function filterFunc(data) { - return self.filters[column.definition.headerFilterFunc](value, column.getFieldValue(data)); - }; - } else { - console.warn("Header Filter Error - Matching filter function not found: ", column.definition.headerFilterFunc); - } - break; - - case "function": - filterFunc = function filterFunc(data) { - var params = column.definition.headerFilterFuncParams || {}; - var fieldVal = column.getFieldValue(data); - - params = typeof params === "function" ? params(value, fieldVal, data) : params; - - return column.definition.headerFilterFunc(value, fieldVal, data, params); - }; - - type = filterFunc; - break; - } - - if (!filterFunc) { - switch (filterType) { - case "partial": - filterFunc = function filterFunc(data) { - return String(column.getFieldValue(data)).toLowerCase().indexOf(String(value).toLowerCase()) > -1; - }; - type = "like"; - break; - - default: - filterFunc = function filterFunc(data) { - return column.getFieldValue(data) == value; - }; - type = "="; - } - } - - self.headerFilters[field] = { value: value, func: filterFunc, type: type }; - } else { - delete self.headerFilters[field]; - } - - self.changed = true; - - self.table.rowManager.filterRefresh(); - } - } - - column.modules.filter = { - success: success, - attrType: false, - tagType: false, - emptyFunc: false - }; - - this.generateHeaderFilterElement(column); - }; - - Filter.prototype.generateHeaderFilterElement = function (column, initialValue) { - var self = this, - success = column.modules.filter.success, - field = column.getField(), - filterElement, - editor, - editorElement, - cellWrapper, - typingTimer, - searchTrigger, - params; - - //handle aborted edit - function cancel() {} - - if (column.modules.filter.headerElement && column.modules.filter.headerElement.parentNode) { - column.modules.filter.headerElement.parentNode.removeChild(column.modules.filter.headerElement); - } - - if (field) { - - //set empty value function - column.modules.filter.emptyFunc = column.definition.headerFilterEmptyCheck || function (value) { - return !value && value !== "0"; - }; - - filterElement = document.createElement("div"); - filterElement.classList.add("tabulator-header-filter"); - - //set column editor - switch (_typeof(column.definition.headerFilter)) { - case "string": - if (self.table.modules.edit.editors[column.definition.headerFilter]) { - editor = self.table.modules.edit.editors[column.definition.headerFilter]; - - if ((column.definition.headerFilter === "tick" || column.definition.headerFilter === "tickCross") && !column.definition.headerFilterEmptyCheck) { - column.modules.filter.emptyFunc = function (value) { - return value !== true && value !== false; - }; - } - } else { - console.warn("Filter Error - Cannot build header filter, No such editor found: ", column.definition.editor); - } - break; - - case "function": - editor = column.definition.headerFilter; - break; - - case "boolean": - if (column.modules.edit && column.modules.edit.editor) { - editor = column.modules.edit.editor; - } else { - if (column.definition.formatter && self.table.modules.edit.editors[column.definition.formatter]) { - editor = self.table.modules.edit.editors[column.definition.formatter]; - - if ((column.definition.formatter === "tick" || column.definition.formatter === "tickCross") && !column.definition.headerFilterEmptyCheck) { - column.modules.filter.emptyFunc = function (value) { - return value !== true && value !== false; - }; - } - } else { - editor = self.table.modules.edit.editors["input"]; - } - } - break; - } - - if (editor) { - - cellWrapper = { - getValue: function getValue() { - return typeof initialValue !== "undefined" ? initialValue : ""; - }, - getField: function getField() { - return column.definition.field; - }, - getElement: function getElement() { - return filterElement; - }, - getColumn: function getColumn() { - return column.getComponent(); - }, - getRow: function getRow() { - return { - normalizeHeight: function normalizeHeight() {} - }; - } - }; - - params = column.definition.headerFilterParams || {}; - - params = typeof params === "function" ? params.call(self.table) : params; - - editorElement = editor.call(this.table.modules.edit, cellWrapper, function () {}, success, cancel, params); - - if (!editorElement) { - console.warn("Filter Error - Cannot add filter to " + field + " column, editor returned a value of false"); - return; - } - - if (!(editorElement instanceof Node)) { - console.warn("Filter Error - Cannot add filter to " + field + " column, editor should return an instance of Node, the editor returned:", editorElement); - return; - } - - //set Placeholder Text - if (field) { - self.table.modules.localize.bind("headerFilters|columns|" + column.definition.field, function (value) { - editorElement.setAttribute("placeholder", typeof value !== "undefined" && value ? value : self.table.modules.localize.getText("headerFilters|default")); - }); - } else { - self.table.modules.localize.bind("headerFilters|default", function (value) { - editorElement.setAttribute("placeholder", typeof self.column.definition.headerFilterPlaceholder !== "undefined" && self.column.definition.headerFilterPlaceholder ? self.column.definition.headerFilterPlaceholder : value); - }); - } - - //focus on element on click - editorElement.addEventListener("click", function (e) { - e.stopPropagation(); - editorElement.focus(); - }); - - //live update filters as user types - typingTimer = false; - - searchTrigger = function searchTrigger(e) { - if (typingTimer) { - clearTimeout(typingTimer); - } - - typingTimer = setTimeout(function () { - success(editorElement.value); - }, 300); - }; - - column.modules.filter.headerElement = editorElement; - column.modules.filter.attrType = editorElement.hasAttribute("type") ? editorElement.getAttribute("type").toLowerCase() : ""; - column.modules.filter.tagType = editorElement.tagName.toLowerCase(); - - if (column.definition.headerFilterLiveFilter !== false) { - - if (!(column.definition.headerFilter === "autocomplete" || column.definition.editor === "autocomplete" && column.definition.headerFilter === true)) { - editorElement.addEventListener("keyup", searchTrigger); - editorElement.addEventListener("search", searchTrigger); - - //update number filtered columns on change - if (column.modules.filter.attrType == "number") { - editorElement.addEventListener("change", function (e) { - success(editorElement.value); - }); - } - - //change text inputs to search inputs to allow for clearing of field - if (column.modules.filter.attrType == "text" && this.table.browser !== "ie") { - editorElement.setAttribute("type", "search"); - // editorElement.off("change blur"); //prevent blur from triggering filter and preventing selection click - } - } - - //prevent input and select elements from propegating click to column sorters etc - if (column.modules.filter.tagType == "input" || column.modules.filter.tagType == "select" || column.modules.filter.tagType == "textarea") { - editorElement.addEventListener("mousedown", function (e) { - e.stopPropagation(); - }); - } - } - - filterElement.appendChild(editorElement); - - column.contentElement.appendChild(filterElement); - - self.headerFilterElements.push(editorElement); - self.headerFilterColumns.push(column); - } - } else { - console.warn("Filter Error - Cannot add header filter, column has no field set:", column.definition.title); - } - }; - - //hide all header filter elements (used to ensure correct column widths in "fitData" layout mode) - Filter.prototype.hideHeaderFilterElements = function () { - this.headerFilterElements.forEach(function (element) { - element.style.display = 'none'; - }); - }; - - //show all header filter elements (used to ensure correct column widths in "fitData" layout mode) - Filter.prototype.showHeaderFilterElements = function () { - this.headerFilterElements.forEach(function (element) { - element.style.display = ''; - }); - }; - - //programatically set value of header filter - Filter.prototype.setHeaderFilterFocus = function (column) { - if (column.modules.filter && column.modules.filter.headerElement) { - column.modules.filter.headerElement.focus(); - } else { - console.warn("Column Filter Focus Error - No header filter set on column:", column.getField()); - } - }; - - //programatically set value of header filter - Filter.prototype.setHeaderFilterValue = function (column, value) { - if (column) { - if (column.modules.filter && column.modules.filter.headerElement) { - this.generateHeaderFilterElement(column, value); - column.modules.filter.success(value); - } else { - console.warn("Column Filter Error - No header filter set on column:", column.getField()); - } - } - }; - - Filter.prototype.reloadHeaderFilter = function (column) { - if (column) { - if (column.modules.filter && column.modules.filter.headerElement) { - this.generateHeaderFilterElement(column, column.modules.filter.value); - } else { - console.warn("Column Filter Error - No header filter set on column:", column.getField()); - } - } - }; - - //check if the filters has changed since last use - Filter.prototype.hasChanged = function () { - var changed = this.changed; - this.changed = false; - return changed; - }; - - //set standard filters - Filter.prototype.setFilter = function (field, type, value) { - var self = this; - - self.filterList = []; - - if (!Array.isArray(field)) { - field = [{ field: field, type: type, value: value }]; - } - - self.addFilter(field); - }; - - //add filter to array - Filter.prototype.addFilter = function (field, type, value) { - var self = this; - - if (!Array.isArray(field)) { - field = [{ field: field, type: type, value: value }]; - } - - field.forEach(function (filter) { - - filter = self.findFilter(filter); - - if (filter) { - self.filterList.push(filter); - - self.changed = true; - } - }); - - if (this.table.options.persistentFilter && this.table.modExists("persistence", true)) { - this.table.modules.persistence.save("filter"); - } - }; - - Filter.prototype.findFilter = function (filter) { - var self = this, - column; - - if (Array.isArray(filter)) { - return this.findSubFilters(filter); - } - - var filterFunc = false; - - if (typeof filter.field == "function") { - filterFunc = function filterFunc(data) { - return filter.field(data, filter.type || {}); // pass params to custom filter function - }; - } else { - - if (self.filters[filter.type]) { - - column = self.table.columnManager.getColumnByField(filter.field); - - if (column) { - filterFunc = function filterFunc(data) { - return self.filters[filter.type](filter.value, column.getFieldValue(data)); - }; - } else { - filterFunc = function filterFunc(data) { - return self.filters[filter.type](filter.value, data[filter.field]); - }; - } - } else { - console.warn("Filter Error - No such filter type found, ignoring: ", filter.type); - } - } - - filter.func = filterFunc; - - return filter.func ? filter : false; - }; - - Filter.prototype.findSubFilters = function (filters) { - var self = this, - output = []; - - filters.forEach(function (filter) { - filter = self.findFilter(filter); - - if (filter) { - output.push(filter); - } - }); - - return output.length ? output : false; - }; - - //get all filters - Filter.prototype.getFilters = function (all, ajax) { - var self = this, - output = []; - - if (all) { - output = self.getHeaderFilters(); - } - - self.filterList.forEach(function (filter) { - output.push({ field: filter.field, type: filter.type, value: filter.value }); - }); - - if (ajax) { - output.forEach(function (item) { - if (typeof item.type == "function") { - item.type = "function"; - } - }); - } - - return output; - }; - - //get all filters - Filter.prototype.getHeaderFilters = function () { - var self = this, - output = []; - - for (var key in this.headerFilters) { - output.push({ field: key, type: this.headerFilters[key].type, value: this.headerFilters[key].value }); - } - - return output; - }; - - //remove filter from array - Filter.prototype.removeFilter = function (field, type, value) { - var self = this; - - if (!Array.isArray(field)) { - field = [{ field: field, type: type, value: value }]; - } - - field.forEach(function (filter) { - var index = -1; - - if (_typeof(filter.field) == "object") { - index = self.filterList.findIndex(function (element) { - return filter === element; - }); - } else { - index = self.filterList.findIndex(function (element) { - return filter.field === element.field && filter.type === element.type && filter.value === element.value; - }); - } - - if (index > -1) { - self.filterList.splice(index, 1); - self.changed = true; - } else { - console.warn("Filter Error - No matching filter type found, ignoring: ", filter.type); - } - }); - - if (this.table.options.persistentFilter && this.table.modExists("persistence", true)) { - this.table.modules.persistence.save("filter"); - } - }; - - //clear filters - Filter.prototype.clearFilter = function (all) { - this.filterList = []; - - if (all) { - this.clearHeaderFilter(); - } - - this.changed = true; - - if (this.table.options.persistentFilter && this.table.modExists("persistence", true)) { - this.table.modules.persistence.save("filter"); - } - }; - - //clear header filters - Filter.prototype.clearHeaderFilter = function () { - var self = this; - - this.headerFilters = {}; - - this.headerFilterColumns.forEach(function (column) { - column.modules.filter.value = null; - self.reloadHeaderFilter(column); - }); - - this.changed = true; - }; - - //search data and return matching rows - Filter.prototype.search = function (searchType, field, type, value) { - var self = this, - activeRows = [], - filterList = []; - - if (!Array.isArray(field)) { - field = [{ field: field, type: type, value: value }]; - } - - field.forEach(function (filter) { - filter = self.findFilter(filter); - - if (filter) { - filterList.push(filter); - } - }); - - this.table.rowManager.rows.forEach(function (row) { - var match = true; - - filterList.forEach(function (filter) { - if (!self.filterRecurse(filter, row.getData())) { - match = false; - } - }); - - if (match) { - activeRows.push(searchType === "data" ? row.getData("data") : row.getComponent()); - } - }); - - return activeRows; - }; - - //filter row array - Filter.prototype.filter = function (rowList, filters) { - var self = this, - activeRows = [], - activeRowComponents = []; - - if (self.table.options.dataFiltering) { - self.table.options.dataFiltering.call(self.table, self.getFilters()); - } - - if (!self.table.options.ajaxFiltering && (self.filterList.length || Object.keys(self.headerFilters).length)) { - - rowList.forEach(function (row) { - if (self.filterRow(row)) { - activeRows.push(row); - } - }); - } else { - activeRows = rowList.slice(0); - } - - if (self.table.options.dataFiltered) { - - activeRows.forEach(function (row) { - activeRowComponents.push(row.getComponent()); - }); - - self.table.options.dataFiltered.call(self.table, self.getFilters(), activeRowComponents); - } - - return activeRows; - }; - - //filter individual row - Filter.prototype.filterRow = function (row, filters) { - var self = this, - match = true, - data = row.getData(); - - self.filterList.forEach(function (filter) { - if (!self.filterRecurse(filter, data)) { - match = false; - } - }); - - for (var field in self.headerFilters) { - if (!self.headerFilters[field].func(data)) { - match = false; - } - } - - return match; - }; - - Filter.prototype.filterRecurse = function (filter, data) { - var self = this, - match = false; - - if (Array.isArray(filter)) { - filter.forEach(function (subFilter) { - if (self.filterRecurse(subFilter, data)) { - match = true; - } - }); - } else { - match = filter.func(data); - } - - return match; - }; - - //list of available filters - Filter.prototype.filters = { - - //equal to - "=": function _(filterVal, rowVal) { - return rowVal == filterVal ? true : false; - }, - - //less than - "<": function _(filterVal, rowVal) { - return rowVal < filterVal ? true : false; - }, - - //less than or equal to - "<=": function _(filterVal, rowVal) { - return rowVal <= filterVal ? true : false; - }, - - //greater than - ">": function _(filterVal, rowVal) { - return rowVal > filterVal ? true : false; - }, - - //greater than or equal to - ">=": function _(filterVal, rowVal) { - return rowVal >= filterVal ? true : false; - }, - - //not equal to - "!=": function _(filterVal, rowVal) { - return rowVal != filterVal ? true : false; - }, - - "regex": function regex(filterVal, rowVal) { - - if (typeof filterVal == "string") { - filterVal = new RegExp(filterVal); - } - - return filterVal.test(rowVal); - }, - - //contains the string - "like": function like(filterVal, rowVal) { - if (filterVal === null || typeof filterVal === "undefined") { - return rowVal === filterVal ? true : false; - } else { - if (typeof rowVal !== 'undefined' && rowVal !== null) { - return String(rowVal).toLowerCase().indexOf(filterVal.toLowerCase()) > -1 ? true : false; - } else { - return false; - } - } - }, - - //in array - "in": function _in(filterVal, rowVal) { - if (Array.isArray(filterVal)) { - return filterVal.indexOf(rowVal) > -1; - } else { - console.warn("Filter Error - filter value is not an array:", filterVal); - return false; - } - } - }; - - Tabulator.prototype.registerModule("filter", Filter); - var Format = function Format(table) { - this.table = table; //hold Tabulator object - }; - - //initialize column formatter - Format.prototype.initializeColumn = function (column) { - var self = this, - config = { params: column.definition.formatterParams || {} }; - - //set column formatter - switch (_typeof(column.definition.formatter)) { - case "string": - - if (column.definition.formatter === "tick") { - column.definition.formatter = "tickCross"; - - if (typeof config.params.crossElement == "undefined") { - config.params.crossElement = false; - } - - console.warn("DEPRECATION WANRING - the tick formatter has been depricated, please use the tickCross formatter with the crossElement param set to false"); - } - - if (self.formatters[column.definition.formatter]) { - config.formatter = self.formatters[column.definition.formatter]; - } else { - console.warn("Formatter Error - No such formatter found: ", column.definition.formatter); - config.formatter = self.formatters.plaintext; - } - break; - - case "function": - config.formatter = column.definition.formatter; - break; - - default: - config.formatter = self.formatters.plaintext; - break; - } - - column.modules.format = config; - }; - - Format.prototype.cellRendered = function (cell) { - if (cell.column.modules.format.renderedCallback) { - cell.column.modules.format.renderedCallback(); - } - }; - - //return a formatted value for a cell - Format.prototype.formatValue = function (cell) { - var component = cell.getComponent(), - params = typeof cell.column.modules.format.params === "function" ? cell.column.modules.format.params(component) : cell.column.modules.format.params; - - function onRendered(callback) { - cell.column.modules.format.renderedCallback = callback; - } - - return cell.column.modules.format.formatter.call(this, component, params, onRendered); - }; - - Format.prototype.sanitizeHTML = function (value) { - if (value) { - var entityMap = { - '&': '&', - '<': '<', - '>': '>', - '"': '"', - "'": ''', - '/': '/', - '`': '`', - '=': '=' - }; - - return String(value).replace(/[&<>"'`=\/]/g, function (s) { - return entityMap[s]; - }); - } else { - return value; - } - }; - - Format.prototype.emptyToSpace = function (value) { - return value === null || typeof value === "undefined" ? " " : value; - }; - - //get formatter for cell - Format.prototype.getFormatter = function (formatter) { - var formatter; - - switch (typeof formatter === 'undefined' ? 'undefined' : _typeof(formatter)) { - case "string": - if (this.formatters[formatter]) { - formatter = this.formatters[formatter]; - } else { - console.warn("Formatter Error - No such formatter found: ", formatter); - formatter = this.formatters.plaintext; - } - break; - - case "function": - formatter = formatter; - break; - - default: - formatter = this.formatters.plaintext; - break; - } - - return formatter; - }; - - //default data formatters - Format.prototype.formatters = { - //plain text value - plaintext: function plaintext(cell, formatterParams, onRendered) { - return this.emptyToSpace(this.sanitizeHTML(cell.getValue())); - }, - - //html text value - html: function html(cell, formatterParams, onRendered) { - return cell.getValue(); - }, - - //multiline text area - textarea: function textarea(cell, formatterParams, onRendered) { - cell.getElement().style.whiteSpace = "pre-wrap"; - return this.emptyToSpace(this.sanitizeHTML(cell.getValue())); - }, - - //currency formatting - money: function money(cell, formatterParams, onRendered) { - var floatVal = parseFloat(cell.getValue()), - number, - integer, - decimal, - rgx; - - var decimalSym = formatterParams.decimal || "."; - var thousandSym = formatterParams.thousand || ","; - var symbol = formatterParams.symbol || ""; - var after = !!formatterParams.symbolAfter; - var precision = typeof formatterParams.precision !== "undefined" ? formatterParams.precision : 2; - - if (isNaN(floatVal)) { - return this.emptyToSpace(this.sanitizeHTML(cell.getValue())); - } - - number = precision !== false ? floatVal.toFixed(precision) : floatVal; - number = String(number).split("."); - - integer = number[0]; - decimal = number.length > 1 ? decimalSym + number[1] : ""; - - rgx = /(\d+)(\d{3})/; - - while (rgx.test(integer)) { - integer = integer.replace(rgx, "$1" + thousandSym + "$2"); - } - - return after ? integer + decimal + symbol : symbol + integer + decimal; - }, - - //clickable anchor tag - link: function link(cell, formatterParams, onRendered) { - var value = this.sanitizeHTML(cell.getValue()), - urlPrefix = formatterParams.urlPrefix || "", - label = this.emptyToSpace(value), - el = document.createElement("a"), - data; - - if (formatterParams.labelField) { - data = cell.getData(); - label = data[formatterParams.labelField]; - } - - if (formatterParams.label) { - switch (_typeof(formatterParams.label)) { - case "string": - label = formatterParams.label; - break; - - case "function": - label = formatterParams.label(cell); - break; - } - } - - if (formatterParams.urlField) { - data = cell.getData(); - value = data[formatterParams.urlField]; - } - - if (formatterParams.url) { - switch (_typeof(formatterParams.url)) { - case "string": - value = formatterParams.url; - break; - - case "function": - value = formatterParams.url(cell); - break; - } - } - - el.setAttribute("href", urlPrefix + value); - - if (formatterParams.target) { - el.setAttribute("target", formatterParams.target); - } - - el.innerHTML = this.emptyToSpace(label); - - return el; - }, - - //image element - image: function image(cell, formatterParams, onRendered) { - var el = document.createElement("img"); - el.setAttribute("src", cell.getValue()); - - switch (_typeof(formatterParams.height)) { - case "number": - element.style.height = formatterParams.height + "px"; - break; - - case "string": - element.style.height = formatterParams.height; - break; - } - - switch (_typeof(formatterParams.width)) { - case "number": - element.style.width = formatterParams.width + "px"; - break; - - case "string": - element.style.width = formatterParams.width; - break; - } - - el.addEventListener("load", function () { - cell.getRow().normalizeHeight(); - }); - - return el; - }, - - //tick or cross - tickCross: function tickCross(cell, formatterParams, onRendered) { - var value = cell.getValue(), - element = cell.getElement(), - empty = formatterParams.allowEmpty, - truthy = formatterParams.allowTruthy, - tick = typeof formatterParams.tickElement !== "undefined" ? formatterParams.tickElement : '', - cross = typeof formatterParams.crossElement !== "undefined" ? formatterParams.crossElement : ''; - - if (truthy && value || value === true || value === "true" || value === "True" || value === 1 || value === "1") { - element.setAttribute("aria-checked", true); - return tick || ""; - } else { - if (empty && (value === "null" || value === "" || value === null || typeof value === "undefined")) { - element.setAttribute("aria-checked", "mixed"); - return ""; - } else { - element.setAttribute("aria-checked", false); - return cross || ""; - } - } - }, - - datetime: function datetime(cell, formatterParams, onRendered) { - var inputFormat = formatterParams.inputFormat || "YYYY-MM-DD hh:mm:ss"; - var outputFormat = formatterParams.outputFormat || "DD/MM/YYYY hh:mm:ss"; - var invalid = typeof formatterParams.invalidPlaceholder !== "undefined" ? formatterParams.invalidPlaceholder : ""; - var value = cell.getValue(); - - var newDatetime = moment(value, inputFormat); - - if (newDatetime.isValid()) { - return newDatetime.format(outputFormat); - } else { - - if (invalid === true) { - return value; - } else if (typeof invalid === "function") { - return invalid(value); - } else { - return invalid; - } - } - }, - - datetimediff: function datetime(cell, formatterParams, onRendered) { - var inputFormat = formatterParams.inputFormat || "YYYY-MM-DD hh:mm:ss"; - var invalid = typeof formatterParams.invalidPlaceholder !== "undefined" ? formatterParams.invalidPlaceholder : ""; - var suffix = typeof formatterParams.suffix !== "undefined" ? formatterParams.suffix : false; - var unit = typeof formatterParams.unit !== "undefined" ? formatterParams.unit : undefined; - var humanize = typeof formatterParams.humanize !== "undefined" ? formatterParams.humanize : false; - var date = typeof formatterParams.date !== "undefined" ? formatterParams.date : moment(); - var value = cell.getValue(); - - var newDatetime = moment(value, inputFormat); - - if (newDatetime.isValid()) { - if (humanize) { - return moment.duration(newDatetime.diff(date)).humanize(suffix); - } else { - return newDatetime.diff(date, unit) + (suffix ? " " + suffix : ""); - } - } else { - - if (invalid === true) { - return value; - } else if (typeof invalid === "function") { - return invalid(value); - } else { - return invalid; - } - } - }, - - //select - lookup: function lookup(cell, formatterParams, onRendered) { - var value = cell.getValue(); - - if (typeof formatterParams[value] === "undefined") { - console.warn('Missing display value for ' + value); - return value; - } - - return formatterParams[value]; - }, - - //star rating - star: function star(cell, formatterParams, onRendered) { - var value = cell.getValue(), - element = cell.getElement(), - maxStars = formatterParams && formatterParams.stars ? formatterParams.stars : 5, - stars = document.createElement("span"), - star = document.createElementNS('http://www.w3.org/2000/svg', "svg"), - starActive = '', - starInactive = ''; - - //style stars holder - stars.style.verticalAlign = "middle"; - - //style star - star.setAttribute("width", "14"); - star.setAttribute("height", "14"); - star.setAttribute("viewBox", "0 0 512 512"); - star.setAttribute("xml:space", "preserve"); - star.style.padding = "0 1px"; - - value = parseInt(value) < maxStars ? parseInt(value) : maxStars; - - for (var i = 1; i <= maxStars; i++) { - var nextStar = star.cloneNode(true); - nextStar.innerHTML = i <= value ? starActive : starInactive; - - stars.appendChild(nextStar); - } - - element.style.whiteSpace = "nowrap"; - element.style.overflow = "hidden"; - element.style.textOverflow = "ellipsis"; - - element.setAttribute("aria-label", value); - - return stars; - }, - - //progress bar - progress: function progress(cell, formatterParams, onRendered) { - //progress bar - var value = this.sanitizeHTML(cell.getValue()) || 0, - element = cell.getElement(), - max = formatterParams && formatterParams.max ? formatterParams.max : 100, - min = formatterParams && formatterParams.min ? formatterParams.min : 0, - legendAlign = formatterParams && formatterParams.legendAlign ? formatterParams.legendAlign : "center", - percent, - percentValue, - color, - legend, - legendColor, - top, - left, - right, - bottom; - - //make sure value is in range - percentValue = parseFloat(value) <= max ? parseFloat(value) : max; - percentValue = parseFloat(percentValue) >= min ? parseFloat(percentValue) : min; - - //workout percentage - percent = (max - min) / 100; - percentValue = Math.round((percentValue - min) / percent); - - //set bar color - switch (_typeof(formatterParams.color)) { - case "string": - color = formatterParams.color; - break; - case "function": - color = formatterParams.color(value); - break; - case "object": - if (Array.isArray(formatterParams.color)) { - var unit = 100 / formatterParams.color.length; - var index = Math.floor(percentValue / unit); - - index = Math.min(index, formatterParams.color.length - 1); - index = Math.max(index, 0); - color = formatterParams.color[index]; - break; - } - default: - color = "#2DC214"; - } - - //generate legend - switch (_typeof(formatterParams.legend)) { - case "string": - legend = formatterParams.legend; - break; - case "function": - legend = formatterParams.legend(value); - break; - case "boolean": - legend = value; - break; - default: - legend = false; - } - - //set legend color - switch (_typeof(formatterParams.legendColor)) { - case "string": - legendColor = formatterParams.legendColor; - break; - case "function": - legendColor = formatterParams.legendColor(value); - break; - case "object": - if (Array.isArray(formatterParams.legendColor)) { - var unit = 100 / formatterParams.legendColor.length; - var index = Math.floor(percentValue / unit); - - index = Math.min(index, formatterParams.legendColor.length - 1); - index = Math.max(index, 0); - legendColor = formatterParams.legendColor[index]; - } - break; - default: - legendColor = "#000"; - } - - element.style.minWidth = "30px"; - element.style.position = "relative"; - - element.setAttribute("aria-label", percentValue); - - return "
" + (legend ? "
" + legend + "
" : ""); - }, - - //background color - color: function color(cell, formatterParams, onRendered) { - cell.getElement().style.backgroundColor = this.sanitizeHTML(cell.getValue()); - return ""; - }, - - //tick icon - buttonTick: function buttonTick(cell, formatterParams, onRendered) { - return ''; - }, - - //cross icon - buttonCross: function buttonCross(cell, formatterParams, onRendered) { - return ''; - }, - - //current row number - rownum: function rownum(cell, formatterParams, onRendered) { - return this.table.rowManager.activeRows.indexOf(cell.getRow()._getSelf()) + 1; - }, - - //row handle - handle: function handle(cell, formatterParams, onRendered) { - cell.getElement().classList.add("tabulator-row-handle"); - return "
"; - }, - - responsiveCollapse: function responsiveCollapse(cell, formatterParams, onRendered) { - var self = this, - open = false, - el = document.createElement("div"); - - function toggleList(isOpen) { - var collapse = cell.getRow().getElement().getElementsByClassName("tabulator-responsive-collapse")[0]; - - open = isOpen; - - if (open) { - el.classList.add("open"); - if (collapse) { - collapse.style.display = ''; - } - } else { - el.classList.remove("open"); - if (collapse) { - collapse.style.display = 'none'; - } - } - } - - el.classList.add("tabulator-responsive-collapse-toggle"); - el.innerHTML = "+-"; - - cell.getElement().classList.add("tabulator-row-handle"); - - if (self.table.options.responsiveLayoutCollapseStartOpen) { - open = true; - } - - el.addEventListener("click", function () { - toggleList(!open); - }); - - toggleList(open); - - return el; - } - }; - - Tabulator.prototype.registerModule("format", Format); - var FrozenColumns = function FrozenColumns(table) { - this.table = table; //hold Tabulator object - this.leftColumns = []; - this.rightColumns = []; - this.leftMargin = 0; - this.rightMargin = 0; - this.initializationMode = "left"; - this.active = false; - }; - - //reset initial state - FrozenColumns.prototype.reset = function () { - this.initializationMode = "left"; - this.leftColumns = []; - this.rightColumns = []; - this.active = false; - }; - - //initialize specific column - FrozenColumns.prototype.initializeColumn = function (column) { - var config = { margin: 0, edge: false }; - - if (column.definition.frozen) { - - if (!column.parent.isGroup) { - - if (!column.isGroup) { - config.position = this.initializationMode; - - if (this.initializationMode == "left") { - this.leftColumns.push(column); - } else { - this.rightColumns.unshift(column); - } - - this.active = true; - - column.modules.frozen = config; - } else { - console.warn("Frozen Column Error - Column Groups cannot be frozen"); - } - } else { - console.warn("Frozen Column Error - Grouped columns cannot be frozen"); - } - } else { - this.initializationMode = "right"; - } - }; - - //layout columns appropropriatly - FrozenColumns.prototype.layout = function () { - var self = this, - tableHolder = this.table.rowManager.element, - rightMargin = 0; - - if (self.active) { - - //calculate row padding - - self.leftMargin = self._calcSpace(self.leftColumns, self.leftColumns.length); - self.table.columnManager.headersElement.style.marginLeft = self.leftMargin + "px"; - - self.rightMargin = self._calcSpace(self.rightColumns, self.rightColumns.length); - self.table.columnManager.element.style.paddingRight = self.rightMargin + "px"; - - self.table.rowManager.activeRows.forEach(function (row) { - self.layoutRow(row); - }); - - if (self.table.modExists("columnCalcs")) { - if (self.table.modules.columnCalcs.topInitialized && self.table.modules.columnCalcs.topRow) { - self.layoutRow(self.table.modules.columnCalcs.topRow); - } - if (self.table.modules.columnCalcs.botInitialized && self.table.modules.columnCalcs.botRow) { - self.layoutRow(self.table.modules.columnCalcs.botRow); - } - } - - //calculate left columns - self.leftColumns.forEach(function (column, i) { - column.modules.frozen.margin = self._calcSpace(self.leftColumns, i) + self.table.columnManager.scrollLeft; - - if (i == self.leftColumns.length - 1) { - column.modules.frozen.edge = true; - } else { - column.modules.frozen.edge = false; - } - - self.layoutColumn(column); - }); - - //calculate right frozen columns - rightMargin = self.table.rowManager.element.clientWidth + self.table.columnManager.scrollLeft; - - // if(tableHolder.scrollHeight > tableHolder.clientHeight){ - // rightMargin -= tableHolder.offsetWidth - tableHolder.clientWidth; - // } - - self.rightColumns.forEach(function (column, i) { - column.modules.frozen.margin = rightMargin - self._calcSpace(self.rightColumns, i + 1); - - if (i == self.rightColumns.length - 1) { - column.modules.frozen.edge = true; - } else { - column.modules.frozen.edge = false; - } - - self.layoutColumn(column); - }); - - this.table.rowManager.tableElement.style.marginRight = this.rightMargin + "px"; - } - }; - - FrozenColumns.prototype.layoutColumn = function (column) { - var self = this; - - self.layoutElement(column.getElement(), column); - - column.cells.forEach(function (cell) { - self.layoutElement(cell.getElement(), column); - }); - }; - - FrozenColumns.prototype.layoutRow = function (row) { - var rowEl = row.getElement(); - - rowEl.style.paddingLeft = this.leftMargin + "px"; - // rowEl.style.paddingRight = this.rightMargin + "px"; - }; - - FrozenColumns.prototype.layoutElement = function (element, column) { - - if (column.modules.frozen) { - element.style.position = "absolute"; - element.style.left = column.modules.frozen.margin + "px"; - - element.classList.add("tabulator-frozen"); - - if (column.modules.frozen.edge) { - element.classList.add("tabulator-frozen-" + column.modules.frozen.position); - } - } - }; - - FrozenColumns.prototype._calcSpace = function (columns, index) { - var width = 0; - - for (var i = 0; i < index; i++) { - if (columns[i].visible) { - width += columns[i].getWidth(); - } - } - - return width; - }; - - Tabulator.prototype.registerModule("frozenColumns", FrozenColumns); - var FrozenRows = function FrozenRows(table) { - this.table = table; //hold Tabulator object - this.topElement = document.createElement("div"); - this.rows = []; - this.displayIndex = 0; //index in display pipeline - }; - - FrozenRows.prototype.initialize = function () { - this.rows = []; - - this.topElement.classList.add("tabulator-frozen-rows-holder"); - - // this.table.columnManager.element.append(this.topElement); - this.table.columnManager.getElement().insertBefore(this.topElement, this.table.columnManager.headersElement.nextSibling); - }; - - FrozenRows.prototype.setDisplayIndex = function (index) { - this.displayIndex = index; - }; - - FrozenRows.prototype.getDisplayIndex = function () { - return this.displayIndex; - }; - - FrozenRows.prototype.isFrozen = function () { - return !!this.rows.length; - }; - - //filter frozen rows out of display data - FrozenRows.prototype.getRows = function (rows) { - var self = this, - frozen = [], - output = rows.slice(0); - - this.rows.forEach(function (row) { - var index = output.indexOf(row); - - if (index > -1) { - output.splice(index, 1); - } - }); - - return output; - }; - - FrozenRows.prototype.freezeRow = function (row) { - if (!row.modules.frozen) { - row.modules.frozen = true; - this.topElement.appendChild(row.getElement()); - row.initialize(); - row.normalizeHeight(); - this.table.rowManager.adjustTableSize(); - - this.rows.push(row); - - this.table.rowManager.refreshActiveData("display"); - - this.styleRows(); - } else { - console.warn("Freeze Error - Row is already frozen"); - } - }; - - FrozenRows.prototype.unfreezeRow = function (row) { - var index = this.rows.indexOf(row); - - if (row.modules.frozen) { - - row.modules.frozen = false; - - var rowEl = row.getElement(); - rowEl.parentNode.removeChild(rowEl); - - this.table.rowManager.adjustTableSize(); - - this.rows.splice(index, 1); - - this.table.rowManager.refreshActiveData("display"); - - if (this.rows.length) { - this.styleRows(); - } - } else { - console.warn("Freeze Error - Row is already unfrozen"); - } - }; - - FrozenRows.prototype.styleRows = function (row) { - var self = this; - - this.rows.forEach(function (row, i) { - self.table.rowManager.styleRow(row, i); - }); - }; - - Tabulator.prototype.registerModule("frozenRows", FrozenRows); - - //public group object - var GroupComponent = function GroupComponent(group) { - this._group = group; - this.type = "GroupComponent"; - }; - - GroupComponent.prototype.getKey = function () { - return this._group.key; - }; - - GroupComponent.prototype.getElement = function () { - return this._group.element; - }; - - GroupComponent.prototype.getRows = function () { - return this._group.getRows(true); - }; - - GroupComponent.prototype.getSubGroups = function () { - return this._group.getSubGroups(true); - }; - - GroupComponent.prototype.getParentGroup = function () { - return this._group.parent ? this._group.parent.getComponent() : false; - }; - - GroupComponent.prototype.getVisibility = function () { - return this._group.visible; - }; - - GroupComponent.prototype.show = function () { - this._group.show(); - }; - - GroupComponent.prototype.hide = function () { - this._group.hide(); - }; - - GroupComponent.prototype.toggle = function () { - this._group.toggleVisibility(); - }; - - GroupComponent.prototype._getSelf = function () { - return this._group; - }; - - GroupComponent.prototype.getTable = function () { - return this._group.table; - }; - - ////////////////////////////////////////////////// - //////////////// Group Functions ///////////////// - ////////////////////////////////////////////////// - - var Group = function Group(groupManager, parent, level, key, field, generator, oldGroup) { - - this.groupManager = groupManager; - this.parent = parent; - this.key = key; - this.level = level; - this.field = field; - this.hasSubGroups = level < groupManager.groupIDLookups.length - 1; - this.addRow = this.hasSubGroups ? this._addRowToGroup : this._addRow; - this.type = "group"; //type of element - this.old = oldGroup; - this.rows = []; - this.groups = []; - this.groupList = []; - this.generator = generator; - this.elementContents = false; - this.height = 0; - this.outerHeight = 0; - this.initialized = false; - this.calcs = {}; - this.initialized = false; - this.modules = {}; - - this.visible = oldGroup ? oldGroup.visible : typeof groupManager.startOpen[level] !== "undefined" ? groupManager.startOpen[level] : groupManager.startOpen[0]; - - this.createElements(); - this.addBindings(); - - this.createValueGroups(); - }; - - Group.prototype.createElements = function () { - this.element = document.createElement("div"); - this.element.classList.add("tabulator-row"); - this.element.classList.add("tabulator-group"); - this.element.classList.add("tabulator-group-level-" + this.level); - this.element.setAttribute("role", "rowgroup"); - - this.arrowElement = document.createElement("div"); - this.arrowElement.classList.add("tabulator-arrow"); - }; - - Group.prototype.createValueGroups = function () { - var _this31 = this; - - var level = this.level + 1; - if (this.groupManager.allowedValues && this.groupManager.allowedValues[level]) { - this.groupManager.allowedValues[level].forEach(function (value) { - _this31._createGroup(value, level); - }); - } - }; - - Group.prototype.addBindings = function () { - var self = this, - dblTap, - tapHold, - tap, - toggleElement; - - //handle group click events - if (self.groupManager.table.options.groupClick) { - self.element.addEventListener("click", function (e) { - self.groupManager.table.options.groupClick(e, self.getComponent()); - }); - } - - if (self.groupManager.table.options.groupDblClick) { - self.element.addEventListener("dblclick", function (e) { - self.groupManager.table.options.groupDblClick(e, self.getComponent()); - }); - } - - if (self.groupManager.table.options.groupContext) { - self.element.addEventListener("contextmenu", function (e) { - self.groupManager.table.options.groupContext(e, self.getComponent()); - }); - } - - if (self.groupManager.table.options.groupTap) { - - tap = false; - - self.element.addEventListener("touchstart", function (e) { - tap = true; - }); - - self.element.addEventListener("touchend", function (e) { - if (tap) { - self.groupManager.table.options.groupTap(e, self.getComponent()); - } - - tap = false; - }); - } - - if (self.groupManager.table.options.groupDblTap) { - - dblTap = null; - - self.element.addEventListener("touchend", function (e) { - - if (dblTap) { - clearTimeout(dblTap); - dblTap = null; - - self.groupManager.table.options.groupDblTap(e, self.getComponent()); - } else { - - dblTap = setTimeout(function () { - clearTimeout(dblTap); - dblTap = null; - }, 300); - } - }); - } - - if (self.groupManager.table.options.groupTapHold) { - - tapHold = null; - - self.element.addEventListener("touchstart", function (e) { - clearTimeout(tapHold); - - tapHold = setTimeout(function () { - clearTimeout(tapHold); - tapHold = null; - tap = false; - self.groupManager.table.options.groupTapHold(e, self.getComponent()); - }, 1000); - }); - - self.element.addEventListener("touchend", function (e) { - clearTimeout(tapHold); - tapHold = null; - }); - } - - if (self.groupManager.table.options.groupToggleElement) { - toggleElement = self.groupManager.table.options.groupToggleElement == "arrow" ? self.arrowElement : self.element; - - toggleElement.addEventListener("click", function (e) { - e.stopPropagation(); - e.stopImmediatePropagation(); - self.toggleVisibility(); - }); - } - }; - - Group.prototype._createGroup = function (groupID, level) { - var groupKey = level + "_" + groupID; - var group = new Group(this.groupManager, this, level, groupID, this.groupManager.groupIDLookups[level].field, this.groupManager.headerGenerator[level] || this.groupManager.headerGenerator[0], this.old ? this.old.groups[groupKey] : false); - - this.groups[groupKey] = group; - this.groupList.push(group); - }; - - Group.prototype._addRowToGroup = function (row) { - - var level = this.level + 1; - - if (this.hasSubGroups) { - var groupID = this.groupManager.groupIDLookups[level].func(row.getData()), - groupKey = level + "_" + groupID; - - if (this.groupManager.allowedValues && this.groupManager.allowedValues[level]) { - if (this.groups[groupKey]) { - this.groups[groupKey].addRow(row); - } - } else { - if (!this.groups[groupKey]) { - this._createGroup(groupID, level); - } - - this.groups[groupKey].addRow(row); - } - } - }; - - Group.prototype._addRow = function (row) { - this.rows.push(row); - row.modules.group = this; - }; - - Group.prototype.insertRow = function (row, to, after) { - var data = this.conformRowData({}); - - row.updateData(data); - - var toIndex = this.rows.indexOf(to); - - if (toIndex > -1) { - if (after) { - this.rows.splice(toIndex + 1, 0, row); - } else { - this.rows.splice(toIndex, 0, row); - } - } else { - if (after) { - this.rows.push(row); - } else { - this.rows.unshift(row); - } - } - - row.modules.group = this; - - this.generateGroupHeaderContents(); - - if (this.groupManager.table.modExists("columnCalcs") && this.groupManager.table.options.columnCalcs != "table") { - this.groupManager.table.modules.columnCalcs.recalcGroup(this); - } - }; - - Group.prototype.getRowIndex = function (row) {}; - - //update row data to match grouping contraints - Group.prototype.conformRowData = function (data) { - if (this.field) { - data[this.field] = this.key; - } else { - console.warn("Data Conforming Error - Cannot conform row data to match new group as groupBy is a function"); - } - - if (this.parent) { - data = this.parent.conformRowData(data); - } - - return data; - }; - - Group.prototype.removeRow = function (row) { - var index = this.rows.indexOf(row); - - if (index > -1) { - this.rows.splice(index, 1); - } - - if (!this.rows.length) { - if (this.parent) { - this.parent.removeGroup(this); - } else { - this.groupManager.removeGroup(this); - } - - this.groupManager.updateGroupRows(true); - } else { - this.generateGroupHeaderContents(); - if (this.groupManager.table.modExists("columnCalcs") && this.groupManager.table.options.columnCalcs != "table") { - this.groupManager.table.modules.columnCalcs.recalcGroup(this); - } - } - }; - - Group.prototype.removeGroup = function (group) { - var groupKey = group.level + "_" + group.key, - index; - - if (this.groups[groupKey]) { - delete this.groups[groupKey]; - - index = this.groupList.indexOf(group); - - if (index > -1) { - this.groupList.splice(index, 1); - } - - if (!this.groupList.length) { - if (this.parent) { - this.parent.removeGroup(this); - } else { - this.groupManager.removeGroup(this); - } - } - } - }; - - Group.prototype.getHeadersAndRows = function () { - var output = []; - - output.push(this); - - this._visSet(); - - if (this.visible) { - - if (this.groupList.length) { - this.groupList.forEach(function (group) { - output = output.concat(group.getHeadersAndRows()); - }); - } else { - if (this.groupManager.table.options.columnCalcs != "table" && this.groupManager.table.modExists("columnCalcs") && this.groupManager.table.modules.columnCalcs.hasTopCalcs()) { - this.calcs.top = this.groupManager.table.modules.columnCalcs.generateTopRow(this.rows); - output.push(this.calcs.top); - } - - output = output.concat(this.rows); - - if (this.groupManager.table.options.columnCalcs != "table" && this.groupManager.table.modExists("columnCalcs") && this.groupManager.table.modules.columnCalcs.hasBottomCalcs()) { - this.calcs.bottom = this.groupManager.table.modules.columnCalcs.generateBottomRow(this.rows); - output.push(this.calcs.bottom); - } - } - } else { - if (!this.groupList.length && this.groupManager.table.options.columnCalcs != "table" && this.groupManager.table.options.groupClosedShowCalcs) { - if (this.groupManager.table.modExists("columnCalcs")) { - if (this.groupManager.table.modules.columnCalcs.hasTopCalcs()) { - this.calcs.top = this.groupManager.table.modules.columnCalcs.generateTopRow(this.rows); - output.push(this.calcs.top); - } - - if (this.groupManager.table.modules.columnCalcs.hasBottomCalcs()) { - this.calcs.bottom = this.groupManager.table.modules.columnCalcs.generateBottomRow(this.rows); - output.push(this.calcs.bottom); - } - } - } - } - - return output; - }; - - Group.prototype.getData = function (visible, transform) { - var self = this, - output = []; - - this._visSet(); - - if (!visible || visible && this.visible) { - this.rows.forEach(function (row) { - output.push(row.getData(transform || "data")); - }); - } - - return output; - }; - - // Group.prototype.getRows = function(){ - // this._visSet(); - - // return this.visible ? this.rows : []; - // }; - - Group.prototype.getRowCount = function () { - var count = 0; - - if (this.groupList.length) { - this.groupList.forEach(function (group) { - count += group.getRowCount(); - }); - } else { - count = this.rows.length; - } - return count; - }; - - Group.prototype.toggleVisibility = function () { - if (this.visible) { - this.hide(); - } else { - this.show(); - } - }; - - Group.prototype.hide = function () { - this.visible = false; - - if (this.groupManager.table.rowManager.getRenderMode() == "classic" && !this.groupManager.table.options.pagination) { - - this.element.classList.remove("tabulator-group-visible"); - - if (this.groupList.length) { - this.groupList.forEach(function (group) { - - var el; - - if (group.calcs.top) { - el = group.calcs.top.getElement(); - el.parentNode.removeChild(el); - } - - if (group.calcs.bottom) { - el = group.calcs.bottom.getElement(); - el.parentNode.removeChild(el); - } - - var rows = group.getHeadersAndRows(); - - rows.forEach(function (row) { - var rowEl = row.getElement(); - rowEl.parentNode.removeChild(rowEl); - }); - }); - } else { - this.rows.forEach(function (row) { - var rowEl = row.getElement(); - rowEl.parentNode.removeChild(rowEl); - }); - } - - this.groupManager.table.rowManager.setDisplayRows(this.groupManager.updateGroupRows(), this.groupManager.getDisplayIndex()); - } else { - this.groupManager.updateGroupRows(true); - } - - this.groupManager.table.options.groupVisibilityChanged.call(this.table, this.getComponent(), false); - }; - - Group.prototype.show = function () { - var self = this; - - self.visible = true; - - if (this.groupManager.table.rowManager.getRenderMode() == "classic" && !this.groupManager.table.options.pagination) { - - this.element.classList.add("tabulator-group-visible"); - - var prev = self.getElement(); - - if (this.groupList.length) { - this.groupList.forEach(function (group) { - var rows = group.getHeadersAndRows(); - - rows.forEach(function (row) { - var rowEl = row.getElement(); - prev.parentNode.insertBefore(rowEl, prev.nextSibling); - row.initialize(); - prev = rowEl; - }); - }); - } else { - self.rows.forEach(function (row) { - var rowEl = row.getElement(); - prev.parentNode.insertBefore(rowEl, prev.nextSibling); - row.initialize(); - prev = rowEl; - }); - } - - this.groupManager.table.rowManager.setDisplayRows(this.groupManager.updateGroupRows(), this.groupManager.getDisplayIndex()); - } else { - this.groupManager.updateGroupRows(true); - } - - this.groupManager.table.options.groupVisibilityChanged.call(this.table, this.getComponent(), true); - }; - - Group.prototype._visSet = function () { - var data = []; - - if (typeof this.visible == "function") { - - this.rows.forEach(function (row) { - data.push(row.getData()); - }); - - this.visible = this.visible(this.key, this.getRowCount(), data, this.getComponent()); - } - }; - - Group.prototype.getRowGroup = function (row) { - var match = false; - if (this.groupList.length) { - this.groupList.forEach(function (group) { - var result = group.getRowGroup(row); - - if (result) { - match = result; - } - }); - } else { - if (this.rows.find(function (item) { - return item === row; - })) { - match = this; - } - } - - return match; - }; - - Group.prototype.getSubGroups = function (component) { - var output = []; - - this.groupList.forEach(function (child) { - output.push(component ? child.getComponent() : child); - }); - - return output; - }; - - Group.prototype.getRows = function (compoment) { - var output = []; - - this.rows.forEach(function (row) { - output.push(compoment ? row.getComponent() : row); - }); - - return output; - }; - - Group.prototype.generateGroupHeaderContents = function () { - var data = []; - - this.rows.forEach(function (row) { - data.push(row.getData()); - }); - - this.elementContents = this.generator(this.key, this.getRowCount(), data, this.getComponent()); - - while (this.element.firstChild) { - this.element.removeChild(this.element.firstChild); - }if (typeof this.elementContents === "string") { - this.element.innerHTML = this.elementContents; - } else { - this.element.appendChild(this.elementContents); - } - - this.element.insertBefore(this.arrowElement, this.element.firstChild); - }; - - ////////////// Standard Row Functions ////////////// - - Group.prototype.getElement = function () { - this.addBindingsd = false; - - this._visSet(); - - if (this.visible) { - this.element.classList.add("tabulator-group-visible"); - } else { - this.element.classList.remove("tabulator-group-visible"); - } - - this.element.childNodes.forEach(function (child) { - child.parentNode.removeChild(child); - }); - - this.generateGroupHeaderContents(); - - // this.addBindings(); - - return this.element; - }; - - //normalize the height of elements in the row - Group.prototype.normalizeHeight = function () { - this.setHeight(this.element.clientHeight); - }; - - Group.prototype.initialize = function (force) { - if (!this.initialized || force) { - this.normalizeHeight(); - this.initialized = true; - } - }; - - Group.prototype.reinitialize = function () { - this.initialized = false; - this.height = 0; - - if (Tabulator.prototype.helpers.elVisible(this.element)) { - this.initialize(true); - } - }; - - Group.prototype.setHeight = function (height) { - if (this.height != height) { - this.height = height; - this.outerHeight = this.element.offsetHeight; - } - }; - - //return rows outer height - Group.prototype.getHeight = function () { - return this.outerHeight; - }; - - Group.prototype.getGroup = function () { - return this; - }; - - Group.prototype.reinitializeHeight = function () {}; - Group.prototype.calcHeight = function () {}; - Group.prototype.setCellHeight = function () {}; - Group.prototype.clearCellHeight = function () {}; - - //////////////// Object Generation ///////////////// - Group.prototype.getComponent = function () { - return new GroupComponent(this); - }; - - ////////////////////////////////////////////////// - ////////////// Group Row Extension /////////////// - ////////////////////////////////////////////////// - - var GroupRows = function GroupRows(table) { - - this.table = table; //hold Tabulator object - - this.groupIDLookups = false; //enable table grouping and set field to group by - this.startOpen = [function () { - return false; - }]; //starting state of group - this.headerGenerator = [function () { - return ""; - }]; - this.groupList = []; //ordered list of groups - this.allowedValues = false; - this.groups = {}; //hold row groups - this.displayIndex = 0; //index in display pipeline - }; - - //initialize group configuration - GroupRows.prototype.initialize = function () { - var self = this, - groupBy = self.table.options.groupBy, - startOpen = self.table.options.groupStartOpen, - groupHeader = self.table.options.groupHeader; - - this.allowedValues = self.table.options.groupValues; - - self.headerGenerator = [function () { - return ""; - }]; - this.startOpen = [function () { - return false; - }]; //starting state of group - - self.table.modules.localize.bind("groups|item", function (langValue, lang) { - self.headerGenerator[0] = function (value, count, data) { - //header layout function - return (typeof value === "undefined" ? "" : value) + "(" + count + " " + (count === 1 ? langValue : lang.groups.items) + ")"; - }; - }); - - this.groupIDLookups = []; - - if (Array.isArray(groupBy) || groupBy) { - if (this.table.modExists("columnCalcs") && this.table.options.columnCalcs != "table" && this.table.options.columnCalcs != "both") { - this.table.modules.columnCalcs.removeCalcs(); - } - } else { - if (this.table.modExists("columnCalcs") && this.table.options.columnCalcs != "group") { - - var cols = this.table.columnManager.getRealColumns(); - - cols.forEach(function (col) { - if (col.definition.topCalc) { - self.table.modules.columnCalcs.initializeTopRow(); - } - - if (col.definition.bottomCalc) { - self.table.modules.columnCalcs.initializeBottomRow(); - } - }); - } - } - - if (!Array.isArray(groupBy)) { - groupBy = [groupBy]; - } - - groupBy.forEach(function (group, i) { - var lookupFunc, column; - - if (typeof group == "function") { - lookupFunc = group; - } else { - column = self.table.columnManager.getColumnByField(group); - - if (column) { - lookupFunc = function lookupFunc(data) { - return column.getFieldValue(data); - }; - } else { - lookupFunc = function lookupFunc(data) { - return data[group]; - }; - } - } - - self.groupIDLookups.push({ - field: typeof group === "function" ? false : group, - func: lookupFunc, - values: self.allowedValues ? self.allowedValues[i] : false - }); - }); - - if (startOpen) { - - if (!Array.isArray(startOpen)) { - startOpen = [startOpen]; - } - - startOpen.forEach(function (level) { - level = typeof level == "function" ? level : function () { - return true; - }; - }); - - self.startOpen = startOpen; - } - - if (groupHeader) { - self.headerGenerator = Array.isArray(groupHeader) ? groupHeader : [groupHeader]; - } - - this.initialized = true; - }; - - GroupRows.prototype.setDisplayIndex = function (index) { - this.displayIndex = index; - }; - - GroupRows.prototype.getDisplayIndex = function () { - return this.displayIndex; - }; - - //return appropriate rows with group headers - GroupRows.prototype.getRows = function (rows) { - if (this.groupIDLookups.length) { - - this.table.options.dataGrouping.call(this.table); - - this.generateGroups(rows); - - if (this.table.options.dataGrouped) { - this.table.options.dataGrouped.call(this.table, this.getGroups(true)); - } - - return this.updateGroupRows(); - } else { - return rows.slice(0); - } - }; - - GroupRows.prototype.getGroups = function (compoment) { - var groupComponents = []; - - this.groupList.forEach(function (group) { - groupComponents.push(compoment ? group.getComponent() : group); - }); - - return groupComponents; - }; - - GroupRows.prototype.pullGroupListData = function (groupList) { - var self = this; - var groupListData = []; - - groupList.forEach(function (group) { - var groupHeader = {}; - groupHeader.level = 0; - groupHeader.rowCount = 0; - groupHeader.headerContent = ""; - var childData = []; - - if (group.hasSubGroups) { - childData = self.pullGroupListData(group.groupList); - - groupHeader.level = group.level; - groupHeader.rowCount = childData.length - group.groupList.length; // data length minus number of sub-headers - groupHeader.headerContent = group.generator(group.key, groupHeader.rowCount, group.rows, group); - - groupListData.push(groupHeader); - groupListData = groupListData.concat(childData); - } else { - groupHeader.level = group.level; - groupHeader.headerContent = group.generator(group.key, group.rows.length, group.rows, group); - groupHeader.rowCount = group.getRows().length; - - groupListData.push(groupHeader); - - group.getRows().forEach(function (row) { - groupListData.push(row.getData("data")); - }); - } - }); - - return groupListData; - }; - - GroupRows.prototype.getGroupedData = function () { - - return this.pullGroupListData(this.groupList); - }; - - GroupRows.prototype.getRowGroup = function (row) { - var match = false; - - this.groupList.forEach(function (group) { - var result = group.getRowGroup(row); - - if (result) { - match = result; - } - }); - - return match; - }; - - GroupRows.prototype.countGroups = function () { - return this.groupList.length; - }; - - GroupRows.prototype.generateGroups = function (rows) { - var self = this, - oldGroups = self.groups; - - self.groups = {}; - self.groupList = []; - - if (this.allowedValues && this.allowedValues[0]) { - this.allowedValues[0].forEach(function (value) { - self.createGroup(value, 0, oldGroups); - }); - - rows.forEach(function (row) { - self.assignRowToExistingGroup(row, oldGroups); - }); - } else { - rows.forEach(function (row) { - self.assignRowToGroup(row, oldGroups); - }); - } - }; - - GroupRows.prototype.createGroup = function (groupID, level, oldGroups) { - var groupKey = level + "_" + groupID, - group; - - oldGroups = oldGroups || []; - - group = new Group(this, false, level, groupID, this.groupIDLookups[0].field, this.headerGenerator[0], oldGroups[groupKey]); - - this.groups[groupKey] = group; - this.groupList.push(group); - }; - - GroupRows.prototype.assignRowToGroup = function (row, oldGroups) { - var groupID = this.groupIDLookups[0].func(row.getData()), - groupKey = "0_" + groupID; - - if (!this.groups[groupKey]) { - this.createGroup(groupID, 0, oldGroups); - } - - this.groups[groupKey].addRow(row); - }; - - GroupRows.prototype.assignRowToExistingGroup = function (row, oldGroups) { - var groupID = this.groupIDLookups[0].func(row.getData()), - groupKey = "0_" + groupID; - - if (this.groups[groupKey]) { - this.groups[groupKey].addRow(row); - } - }; - - GroupRows.prototype.assignRowToGroup = function (row, oldGroups) { - var groupID = this.groupIDLookups[0].func(row.getData()), - newGroupNeeded = !this.groups["0_" + groupID]; - - if (newGroupNeeded) { - this.createGroup(groupID, 0, oldGroups); - } - - this.groups["0_" + groupID].addRow(row); - - return !newGroupNeeded; - }; - - GroupRows.prototype.updateGroupRows = function (force) { - var self = this, - output = [], - oldRowCount; - - self.groupList.forEach(function (group) { - output = output.concat(group.getHeadersAndRows()); - }); - - //force update of table display - if (force) { - - var displayIndex = self.table.rowManager.setDisplayRows(output, this.getDisplayIndex()); - - if (displayIndex !== true) { - this.setDisplayIndex(displayIndex); - } - - self.table.rowManager.refreshActiveData("group", true, true); - } - - return output; - }; - - GroupRows.prototype.scrollHeaders = function (left) { - this.groupList.forEach(function (group) { - group.arrowElement.style.marginLeft = left + "px"; - }); - }; - - GroupRows.prototype.removeGroup = function (group) { - var groupKey = group.level + "_" + group.key, - index; - - if (this.groups[groupKey]) { - delete this.groups[groupKey]; - - index = this.groupList.indexOf(group); - - if (index > -1) { - this.groupList.splice(index, 1); - } - } - }; - - Tabulator.prototype.registerModule("groupRows", GroupRows); - var History = function History(table) { - this.table = table; //hold Tabulator object - - this.history = []; - this.index = -1; - }; - - History.prototype.clear = function () { - this.history = []; - this.index = -1; - }; - - History.prototype.action = function (type, component, data) { - - this.history = this.history.slice(0, this.index + 1); - - this.history.push({ - type: type, - component: component, - data: data - }); - - this.index++; - }; - - History.prototype.getHistoryUndoSize = function () { - return this.index + 1; - }; - - History.prototype.getHistoryRedoSize = function () { - return this.history.length - (this.index + 1); - }; - - History.prototype.undo = function () { - - if (this.index > -1) { - var action = this.history[this.index]; - - this.undoers[action.type].call(this, action); - - this.index--; - - this.table.options.historyUndo.call(this.table, action.type, action.component.getComponent(), action.data); - - return true; - } else { - console.warn("History Undo Error - No more history to undo"); - return false; - } - }; - - History.prototype.redo = function () { - if (this.history.length - 1 > this.index) { - - this.index++; - - var action = this.history[this.index]; - - this.redoers[action.type].call(this, action); - - this.table.options.historyRedo.call(this.table, action.type, action.component.getComponent(), action.data); - - return true; - } else { - console.warn("History Redo Error - No more history to redo"); - return false; - } - }; - - History.prototype.undoers = { - cellEdit: function cellEdit(action) { - action.component.setValueProcessData(action.data.oldValue); - }, - - rowAdd: function rowAdd(action) { - action.component.deleteActual(); - }, - - rowDelete: function rowDelete(action) { - var newRow = this.table.rowManager.addRowActual(action.data.data, action.data.pos, action.data.index); - - this._rebindRow(action.component, newRow); - }, - - rowMove: function rowMove(action) { - this.table.rowManager.moveRowActual(action.component, this.table.rowManager.rows[action.data.pos], false); - this.table.rowManager.redraw(); - } - }; - - History.prototype.redoers = { - cellEdit: function cellEdit(action) { - action.component.setValueProcessData(action.data.newValue); - }, - - rowAdd: function rowAdd(action) { - var newRow = this.table.rowManager.addRowActual(action.data.data, action.data.pos, action.data.index); - - this._rebindRow(action.component, newRow); - }, - - rowDelete: function rowDelete(action) { - action.component.deleteActual(); - }, - - rowMove: function rowMove(action) { - this.table.rowManager.moveRowActual(action.component, this.table.rowManager.rows[action.data.pos], false); - this.table.rowManager.redraw(); - } - }; - - //rebind rows to new element after deletion - History.prototype._rebindRow = function (oldRow, newRow) { - this.history.forEach(function (action) { - if (action.component instanceof Row) { - if (action.component === oldRow) { - action.component = newRow; - } - } else if (action.component instanceof Cell) { - if (action.component.row === oldRow) { - var field = action.component.column.getField(); - - if (field) { - action.component = newRow.getCell(field); - } - } - } - }); - }; - - Tabulator.prototype.registerModule("history", History); - var HtmlTableImport = function HtmlTableImport(table) { - this.table = table; //hold Tabulator object - this.fieldIndex = []; - this.hasIndex = false; - }; - - HtmlTableImport.prototype.parseTable = function () { - var self = this, - element = self.table.element, - options = self.table.options, - columns = options.columns, - headers = element.getElementsByTagName("th"), - rows = element.getElementsByTagName("tbody")[0], - data = [], - newTable; - - self.hasIndex = false; - - self.table.options.htmlImporting.call(this.table); - - rows = rows ? rows.getElementsByTagName("tr") : []; - - //check for tablator inline options - self._extractOptions(element, options); - - if (headers.length) { - self._extractHeaders(headers, rows); - } else { - self._generateBlankHeaders(headers, rows); - } - - //iterate through table rows and build data set - for (var index = 0; index < rows.length; index++) { - var row = rows[index], - cells = row.getElementsByTagName("td"), - item = {}; - - //create index if the dont exist in table - if (!self.hasIndex) { - item[options.index] = index; - } - - for (var i = 0; i < cells.length; i++) { - var cell = cells[i]; - if (typeof this.fieldIndex[i] !== "undefined") { - item[this.fieldIndex[i]] = cell.innerHTML; - } - } - - //add row data to item - data.push(item); - } - - //create new element - var newElement = document.createElement("div"); - - //transfer attributes to new element - var attributes = element.attributes; - - // loop through attributes and apply them on div - - for (var i in attributes) { - if (_typeof(attributes[i]) == "object") { - newElement.setAttribute(attributes[i].name, attributes[i].value); - } - } - - // replace table with div element - element.parentNode.replaceChild(newElement, element); - - options.data = data; - - self.table.options.htmlImported.call(this.table); - - // // newElement.tabulator(options); - - this.table.element = newElement; - }; - - //extract tabulator attribute options - HtmlTableImport.prototype._extractOptions = function (element, options) { - var attributes = element.attributes; - - for (var index in attributes) { - var attrib = attributes[index]; - var name; - - if ((typeof attrib === 'undefined' ? 'undefined' : _typeof(attrib)) == "object" && attrib.name && attrib.name.indexOf("tabulator-") === 0) { - name = attrib.name.replace("tabulator-", ""); - - for (var key in options) { - if (key.toLowerCase() == name) { - options[key] = this._attribValue(attrib.value); - } - } - } - } - }; - - //get value of attribute - HtmlTableImport.prototype._attribValue = function (value) { - if (value === "true") { - return true; - } - - if (value === "false") { - return false; - } - - return value; - }; - - //find column if it has already been defined - HtmlTableImport.prototype._findCol = function (title) { - var match = this.table.options.columns.find(function (column) { - return column.title === title; - }); - - return match || false; - }; - - //extract column from headers - HtmlTableImport.prototype._extractHeaders = function (headers, rows) { - for (var index = 0; index < headers.length; index++) { - var header = headers[index], - exists = false, - col = this._findCol(header.textContent), - width, - attributes; - - if (col) { - exists = true; - } else { - col = { title: header.textContent.trim() }; - } - - if (!col.field) { - col.field = header.textContent.trim().toLowerCase().replace(" ", "_"); - } - - width = header.getAttribute("width"); - - if (width && !col.width) { - col.width = width; - } - - //check for tablator inline options - attributes = header.attributes; - - // //check for tablator inline options - this._extractOptions(header, col); - - for (var i in attributes) { - var attrib = attributes[i], - name; - - if ((typeof attrib === 'undefined' ? 'undefined' : _typeof(attrib)) == "object" && attrib.name && attrib.name.indexOf("tabulator-") === 0) { - - name = attrib.name.replace("tabulator-", ""); - - col[name] = this._attribValue(attrib.value); - } - } - - this.fieldIndex[index] = col.field; - - if (col.field == this.table.options.index) { - this.hasIndex = true; - } - - if (!exists) { - this.table.options.columns.push(col); - } - } - }; - - //generate blank headers - HtmlTableImport.prototype._generateBlankHeaders = function (headers, rows) { - for (var index = 0; index < headers.length; index++) { - var header = headers[index], - col = { title: "", field: "col" + index }; - - this.fieldIndex[index] = col.field; - - var width = header.getAttribute("width"); - - if (width) { - col.width = width; - } - - this.table.options.columns.push(col); - } - }; - - Tabulator.prototype.registerModule("htmlTableImport", HtmlTableImport); - var Keybindings = function Keybindings(table) { - this.table = table; //hold Tabulator object - this.watchKeys = null; - this.pressedKeys = null; - this.keyupBinding = false; - this.keydownBinding = false; - }; - - Keybindings.prototype.initialize = function () { - var bindings = this.table.options.keybindings, - mergedBindings = {}; - - this.watchKeys = {}; - this.pressedKeys = []; - - if (bindings !== false) { - - for (var key in this.bindings) { - mergedBindings[key] = this.bindings[key]; - } - - if (Object.keys(bindings).length) { - - for (var _key in bindings) { - mergedBindings[_key] = bindings[_key]; - } - } - - this.mapBindings(mergedBindings); - this.bindEvents(); - } - }; - - Keybindings.prototype.mapBindings = function (bindings) { - var _this32 = this; - - var self = this; - - var _loop2 = function _loop2(key) { - - if (_this32.actions[key]) { - - if (bindings[key]) { - - if (_typeof(bindings[key]) !== "object") { - bindings[key] = [bindings[key]]; - } - - bindings[key].forEach(function (binding) { - self.mapBinding(key, binding); - }); - } - } else { - console.warn("Key Binding Error - no such action:", key); - } - }; - - for (var key in bindings) { - _loop2(key); - } - }; - - Keybindings.prototype.mapBinding = function (action, symbolsList) { - var self = this; - - var binding = { - action: this.actions[action], - keys: [], - ctrl: false, - shift: false - }; - - var symbols = symbolsList.toString().toLowerCase().split(" ").join("").split("+"); - - symbols.forEach(function (symbol) { - switch (symbol) { - case "ctrl": - binding.ctrl = true; - break; - - case "shift": - binding.shift = true; - break; - - default: - symbol = parseInt(symbol); - binding.keys.push(symbol); - - if (!self.watchKeys[symbol]) { - self.watchKeys[symbol] = []; - } - - self.watchKeys[symbol].push(binding); - } - }); - }; - - Keybindings.prototype.bindEvents = function () { - var self = this; - - this.keyupBinding = function (e) { - var code = e.keyCode; - var bindings = self.watchKeys[code]; - - if (bindings) { - - self.pressedKeys.push(code); - - bindings.forEach(function (binding) { - self.checkBinding(e, binding); - }); - } - }; - - this.keydownBinding = function (e) { - var code = e.keyCode; - var bindings = self.watchKeys[code]; - - if (bindings) { - - var index = self.pressedKeys.indexOf(code); - - if (index > -1) { - self.pressedKeys.splice(index, 1); - } - } - }; - - this.table.element.addEventListener("keydown", this.keyupBinding); - - this.table.element.addEventListener("keyup", this.keydownBinding); - }; - - Keybindings.prototype.clearBindings = function () { - if (this.keyupBinding) { - this.table.element.removeEventListener("keydown", this.keyupBinding); - } - - if (this.keydownBinding) { - this.table.element.removeEventListener("keyup", this.keydownBinding); - } - }; - - Keybindings.prototype.checkBinding = function (e, binding) { - var self = this, - match = true; - - if (e.ctrlKey == binding.ctrl && e.shiftKey == binding.shift) { - binding.keys.forEach(function (key) { - var index = self.pressedKeys.indexOf(key); - - if (index == -1) { - match = false; - } - }); - - if (match) { - binding.action.call(self, e); - } - - return true; - } - - return false; - }; - - //default bindings - Keybindings.prototype.bindings = { - navPrev: "shift + 9", - navNext: 9, - navUp: 38, - navDown: 40, - scrollPageUp: 33, - scrollPageDown: 34, - scrollToStart: 36, - scrollToEnd: 35, - undo: "ctrl + 90", - redo: "ctrl + 89", - copyToClipboard: "ctrl + 67" - }; - - //default actions - Keybindings.prototype.actions = { - keyBlock: function keyBlock(e) { - e.stopPropagation(); - e.preventDefault(); - }, - scrollPageUp: function scrollPageUp(e) { - var rowManager = this.table.rowManager, - newPos = rowManager.scrollTop - rowManager.height, - scrollMax = rowManager.element.scrollHeight; - - e.preventDefault(); - - if (rowManager.displayRowsCount) { - if (newPos >= 0) { - rowManager.element.scrollTop = newPos; - } else { - rowManager.scrollToRow(rowManager.getDisplayRows()[0]); - } - } - - this.table.element.focus(); - }, - scrollPageDown: function scrollPageDown(e) { - var rowManager = this.table.rowManager, - newPos = rowManager.scrollTop + rowManager.height, - scrollMax = rowManager.element.scrollHeight; - - e.preventDefault(); - - if (rowManager.displayRowsCount) { - if (newPos <= scrollMax) { - rowManager.element.scrollTop = newPos; - } else { - rowManager.scrollToRow(rowManager.getDisplayRows()[rowManager.displayRowsCount - 1]); - } - } - - this.table.element.focus(); - }, - scrollToStart: function scrollToStart(e) { - var rowManager = this.table.rowManager; - - e.preventDefault(); - - if (rowManager.displayRowsCount) { - rowManager.scrollToRow(rowManager.getDisplayRows()[0]); - } - - this.table.element.focus(); - }, - scrollToEnd: function scrollToEnd(e) { - var rowManager = this.table.rowManager; - - e.preventDefault(); - - if (rowManager.displayRowsCount) { - rowManager.scrollToRow(rowManager.getDisplayRows()[rowManager.displayRowsCount - 1]); - } - - this.table.element.focus(); - }, - navPrev: function navPrev(e) { - var cell = false; - - if (this.table.modExists("edit")) { - cell = this.table.modules.edit.currentCell; - - if (cell) { - e.preventDefault(); - cell.nav().prev(); - } - } - }, - - navNext: function navNext(e) { - var cell = false; - - if (this.table.modExists("edit")) { - cell = this.table.modules.edit.currentCell; - - if (cell) { - e.preventDefault(); - cell.nav().next(); - } - } - }, - - navLeft: function navLeft(e) { - var cell = false; - - if (this.table.modExists("edit")) { - cell = this.table.modules.edit.currentCell; - - if (cell) { - e.preventDefault(); - cell.nav().left(); - } - } - }, - - navRight: function navRight(e) { - var cell = false; - - if (this.table.modExists("edit")) { - cell = this.table.modules.edit.currentCell; - - if (cell) { - e.preventDefault(); - cell.nav().right(); - } - } - }, - - navUp: function navUp(e) { - var cell = false; - - if (this.table.modExists("edit")) { - cell = this.table.modules.edit.currentCell; - - if (cell) { - e.preventDefault(); - cell.nav().up(); - } - } - }, - - navDown: function navDown(e) { - var cell = false; - - if (this.table.modExists("edit")) { - cell = this.table.modules.edit.currentCell; - - if (cell) { - e.preventDefault(); - cell.nav().down(); - } - } - }, - - undo: function undo(e) { - var cell = false; - if (this.table.options.history && this.table.modExists("history") && this.table.modExists("edit")) { - - cell = this.table.modules.edit.currentCell; - - if (!cell) { - e.preventDefault(); - this.table.modules.history.undo(); - } - } - }, - - redo: function redo(e) { - var cell = false; - if (this.table.options.history && this.table.modExists("history") && this.table.modExists("edit")) { - - cell = this.table.modules.edit.currentCell; - - if (!cell) { - e.preventDefault(); - this.table.modules.history.redo(); - } - } - }, - - copyToClipboard: function copyToClipboard(e) { - if (!this.table.modules.edit.currentCell) { - if (this.table.modExists("clipboard", true)) { - this.table.modules.clipboard.copy(!this.table.options.selectable || this.table.options.selectable == "highlight" ? "active" : "selected", null, null, null, true); - } - } - } - }; - - Tabulator.prototype.registerModule("keybindings", Keybindings); - var MoveColumns = function MoveColumns(table) { - this.table = table; //hold Tabulator object - this.placeholderElement = this.createPlaceholderElement(); - this.hoverElement = false; //floating column header element - this.checkTimeout = false; //click check timeout holder - this.checkPeriod = 250; //period to wait on mousedown to consider this a move and not a click - this.moving = false; //currently moving column - this.toCol = false; //destination column - this.toColAfter = false; //position of moving column relative to the desitnation column - this.startX = 0; //starting position within header element - this.autoScrollMargin = 40; //auto scroll on edge when within margin - this.autoScrollStep = 5; //auto scroll distance in pixels - this.autoScrollTimeout = false; //auto scroll timeout - - this.moveHover = this.moveHover.bind(this); - this.endMove = this.endMove.bind(this); - }; - - MoveColumns.prototype.createPlaceholderElement = function () { - var el = document.createElement("div"); - - el.classList.add("tabulator-col"); - el.classList.add("tabulator-col-placeholder"); - - return el; - }; - - MoveColumns.prototype.initializeColumn = function (column) { - var self = this, - config = {}, - colEl; - - if (!column.modules.frozen) { - - colEl = column.getElement(); - - config.mousemove = function (e) { - if (column.parent === self.moving.parent) { - if (e.pageX - Tabulator.prototype.helpers.elOffset(colEl).left + self.table.columnManager.element.scrollLeft > column.getWidth() / 2) { - if (self.toCol !== column || !self.toColAfter) { - colEl.parentNode.insertBefore(self.placeholderElement, colEl.nextSibling); - self.moveColumn(column, true); - } - } else { - if (self.toCol !== column || self.toColAfter) { - colEl.parentNode.insertBefore(self.placeholderElement, colEl); - self.moveColumn(column, false); - } - } - } - }.bind(self); - - colEl.addEventListener("mousedown", function (e) { - if (e.which === 1) { - self.checkTimeout = setTimeout(function () { - self.startMove(e, column); - }, self.checkPeriod); - } - }); - - colEl.addEventListener("mouseup", function (e) { - if (e.which === 1) { - if (self.checkTimeout) { - clearTimeout(self.checkTimeout); - } - } - }); - } - - column.modules.moveColumn = config; - }; - - MoveColumns.prototype.startMove = function (e, column) { - var element = column.getElement(); - - this.moving = column; - this.startX = e.pageX - Tabulator.prototype.helpers.elOffset(element).left; - - this.table.element.classList.add("tabulator-block-select"); - - //create placeholder - - this.placeholderElement.style.width = column.getWidth() + "px"; - this.placeholderElement.style.height = column.getHeight() + "px"; - - element.parentNode.insertBefore(this.placeholderElement, element); - element.parentNode.removeChild(element); - - //create hover element - this.hoverElement = element.cloneNode(true); - this.hoverElement.classList.add("tabulator-moving"); - - this.table.columnManager.getElement().appendChild(this.hoverElement); - - this.hoverElement.style.left = "0"; - this.hoverElement.style.bottom = "0"; - - this._bindMouseMove(); - - document.body.addEventListener("mousemove", this.moveHover); - document.body.addEventListener("mouseup", this.endMove); - - this.moveHover(e); - }; - - MoveColumns.prototype._bindMouseMove = function () { - this.table.columnManager.columnsByIndex.forEach(function (column) { - if (column.modules.moveColumn.mousemove) { - column.getElement().addEventListener("mousemove", column.modules.moveColumn.mousemove); - } - }); - }; - - MoveColumns.prototype._unbindMouseMove = function () { - this.table.columnManager.columnsByIndex.forEach(function (column) { - if (column.modules.moveColumn.mousemove) { - column.getElement().removeEventListener("mousemove", column.modules.moveColumn.mousemove); - } - }); - }; - - MoveColumns.prototype.moveColumn = function (column, after) { - var movingCells = this.moving.getCells(); - - this.toCol = column; - this.toColAfter = after; - - if (after) { - column.getCells().forEach(function (cell, i) { - var cellEl = cell.getElement(); - cellEl.parentNode.insertBefore(movingCells[i].getElement(), cellEl.nextSibling); - }); - } else { - column.getCells().forEach(function (cell, i) { - var cellEl = cell.getElement(); - cellEl.parentNode.insertBefore(movingCells[i].getElement(), cellEl); - }); - } - }; - - MoveColumns.prototype.endMove = function (e) { - if (e.which === 1) { - this._unbindMouseMove(); - - this.placeholderElement.parentNode.insertBefore(this.moving.getElement(), this.placeholderElement.nextSibling); - this.placeholderElement.parentNode.removeChild(this.placeholderElement); - this.hoverElement.parentNode.removeChild(this.hoverElement); - - this.table.element.classList.remove("tabulator-block-select"); - - if (this.toCol) { - this.table.columnManager.moveColumn(this.moving, this.toCol, this.toColAfter); - } - - this.moving = false; - this.toCol = false; - this.toColAfter = false; - - document.body.removeEventListener("mousemove", this.moveHover); - document.body.removeEventListener("mouseup", this.endMove); - } - }; - - MoveColumns.prototype.moveHover = function (e) { - var self = this, - columnHolder = self.table.columnManager.getElement(), - scrollLeft = columnHolder.scrollLeft, - xPos = e.pageX - Tabulator.prototype.helpers.elOffset(columnHolder).left + scrollLeft, - scrollPos; - - self.hoverElement.style.left = xPos - self.startX + "px"; - - if (xPos - scrollLeft < self.autoScrollMargin) { - if (!self.autoScrollTimeout) { - self.autoScrollTimeout = setTimeout(function () { - scrollPos = Math.max(0, scrollLeft - 5); - self.table.rowManager.getElement().scrollLeft = scrollPos; - self.autoScrollTimeout = false; - }, 1); - } - } - - if (scrollLeft + columnHolder.clientWidth - xPos < self.autoScrollMargin) { - if (!self.autoScrollTimeout) { - self.autoScrollTimeout = setTimeout(function () { - scrollPos = Math.min(columnHolder.clientWidth, scrollLeft + 5); - self.table.rowManager.getElement().scrollLeft = scrollPos; - self.autoScrollTimeout = false; - }, 1); - } - } - }; - - Tabulator.prototype.registerModule("moveColumn", MoveColumns); - var MoveRows = function MoveRows(table) { - - this.table = table; //hold Tabulator object - this.placeholderElement = this.createPlaceholderElement(); - this.hoverElement = false; //floating row header element - this.checkTimeout = false; //click check timeout holder - this.checkPeriod = 150; //period to wait on mousedown to consider this a move and not a click - this.moving = false; //currently moving row - this.toRow = false; //destination row - this.toRowAfter = false; //position of moving row relative to the desitnation row - this.hasHandle = false; //row has handle instead of fully movable row - this.startY = 0; //starting Y position within header element - this.startX = 0; //starting X position within header element - - this.moveHover = this.moveHover.bind(this); - this.endMove = this.endMove.bind(this); - this.tableRowDropEvent = false; - - this.connection = false; - this.connections = []; - - this.connectedTable = false; - this.connectedRow = false; - }; - - MoveRows.prototype.createPlaceholderElement = function () { - var el = document.createElement("div"); - - el.classList.add("tabulator-row"); - el.classList.add("tabulator-row-placeholder"); - - return el; - }; - - MoveRows.prototype.initialize = function (handle) { - this.connection = this.table.options.movableRowsConnectedTables; - }; - - MoveRows.prototype.setHandle = function (handle) { - this.hasHandle = handle; - }; - - MoveRows.prototype.initializeRow = function (row) { - var self = this, - config = {}, - rowEl; - - //inter table drag drop - config.mouseup = function (e) { - self.tableRowDrop(e, row); - }.bind(self); - - //same table drag drop - config.mousemove = function (e) { - if (e.pageY - Tabulator.prototype.helpers.elOffset(row.element).top + self.table.rowManager.element.scrollTop > row.getHeight() / 2) { - if (self.toRow !== row || !self.toRowAfter) { - var rowEl = row.getElement(); - rowEl.parentNode.insertBefore(self.placeholderElement, rowEl.nextSibling); - self.moveRow(row, true); - } - } else { - if (self.toRow !== row || self.toRowAfter) { - var rowEl = row.getElement(); - rowEl.parentNode.insertBefore(self.placeholderElement, rowEl); - self.moveRow(row, false); - } - } - }.bind(self); - - if (!this.hasHandle) { - - rowEl = row.getElement(); - - rowEl.addEventListener("mousedown", function (e) { - if (e.which === 1) { - self.checkTimeout = setTimeout(function () { - self.startMove(e, row); - }, self.checkPeriod); - } - }); - - rowEl.addEventListener("mouseup", function (e) { - if (e.which === 1) { - if (self.checkTimeout) { - clearTimeout(self.checkTimeout); - } - } - }); - } - - row.modules.moveRow = config; - }; - - MoveRows.prototype.initializeCell = function (cell) { - var self = this, - cellEl = cell.getElement(); - - cellEl.addEventListener("mousedown", function (e) { - if (e.which === 1) { - self.checkTimeout = setTimeout(function () { - self.startMove(e, cell.row); - }, self.checkPeriod); - } - }); - - cellEl.addEventListener("mouseup", function (e) { - if (e.which === 1) { - if (self.checkTimeout) { - clearTimeout(self.checkTimeout); - } - } - }); - }; - - MoveRows.prototype._bindMouseMove = function () { - var self = this; - - self.table.rowManager.getDisplayRows().forEach(function (row) { - if (row.type === "row" && row.modules.moveRow.mousemove) { - row.getElement().addEventListener("mousemove", row.modules.moveRow.mousemove); - } - }); - }; - - MoveRows.prototype._unbindMouseMove = function () { - var self = this; - - self.table.rowManager.getDisplayRows().forEach(function (row) { - if (row.type === "row" && row.modules.moveRow.mousemove) { - row.getElement().removeEventListener("mousemove", row.modules.moveRow.mousemove); - } - }); - }; - - MoveRows.prototype.startMove = function (e, row) { - var element = row.getElement(); - - this.setStartPosition(e, row); - - this.moving = row; - - this.table.element.classList.add("tabulator-block-select"); - - //create placeholder - this.placeholderElement.style.width = row.getWidth() + "px"; - this.placeholderElement.style.height = row.getHeight() + "px"; - - if (!this.connection) { - element.parentNode.insertBefore(this.placeholderElement, element); - element.parentNode.removeChild(element); - } else { - this.table.element.classList.add("tabulator-movingrow-sending"); - this.connectToTables(row); - } - - //create hover element - this.hoverElement = element.cloneNode(true); - this.hoverElement.classList.add("tabulator-moving"); - - if (this.connection) { - document.body.appendChild(this.hoverElement); - this.hoverElement.style.left = "0"; - this.hoverElement.style.top = "0"; - this.hoverElement.style.width = this.table.element.clientWidth + "px"; - this.hoverElement.style.whiteSpace = "nowrap"; - this.hoverElement.style.overflow = "hidden"; - this.hoverElement.style.pointerEvents = "none"; - } else { - this.table.rowManager.getTableElement().appendChild(this.hoverElement); - - this.hoverElement.style.left = "0"; - this.hoverElement.style.top = "0"; - - this._bindMouseMove(); - } - - document.body.addEventListener("mousemove", this.moveHover); - document.body.addEventListener("mouseup", this.endMove); - - this.moveHover(e); - }; - - MoveRows.prototype.setStartPosition = function (e, row) { - var element, position; - - element = row.getElement(); - if (this.connection) { - position = element.getBoundingClientRect(); - - this.startX = position.left - e.pageX + window.scrollX; - this.startY = position.top - e.pageY + window.scrollY; - } else { - this.startY = e.pageY - element.getBoundingClientRect().top; - } - }; - - MoveRows.prototype.endMove = function (e) { - if (!e || e.which === 1) { - this._unbindMouseMove(); - - if (!this.connection) { - this.placeholderElement.parentNode.insertBefore(this.moving.getElement(), this.placeholderElement.nextSibling); - this.placeholderElement.parentNode.removeChild(this.placeholderElement); - } - - this.hoverElement.parentNode.removeChild(this.hoverElement); - - this.table.element.classList.remove("tabulator-block-select"); - - if (this.toRow) { - this.table.rowManager.moveRow(this.moving, this.toRow, this.toRowAfter); - } - - this.moving = false; - this.toRow = false; - this.toRowAfter = false; - - document.body.removeEventListener("mousemove", this.moveHover); - document.body.removeEventListener("mouseup", this.endMove); - - if (this.connection) { - this.table.element.classList.remove("tabulator-movingrow-sending"); - this.disconnectFromTables(); - } - } - }; - - MoveRows.prototype.moveRow = function (row, after) { - this.toRow = row; - this.toRowAfter = after; - }; - - MoveRows.prototype.moveHover = function (e) { - if (this.connection) { - this.moveHoverConnections.call(this, e); - } else { - this.moveHoverTable.call(this, e); - } - }; - - MoveRows.prototype.moveHoverTable = function (e) { - var rowHolder = this.table.rowManager.getElement(), - scrollTop = rowHolder.scrollTop, - yPos = e.pageY - rowHolder.getBoundingClientRect().top + scrollTop, - scrollPos; - - this.hoverElement.style.top = yPos - this.startY + "px"; - }; - - MoveRows.prototype.moveHoverConnections = function (e) { - this.hoverElement.style.left = this.startX + e.pageX + "px"; - this.hoverElement.style.top = this.startY + e.pageY + "px"; - }; - - //establish connection with other tables - MoveRows.prototype.connectToTables = function (row) { - var self = this, - connections = this.table.modules.comms.getConnections(this.connection); - - this.table.options.movableRowsSendingStart.call(this.table, connections); - - this.table.modules.comms.send(this.connection, "moveRow", "connect", { - row: row - }); - }; - - //disconnect from other tables - MoveRows.prototype.disconnectFromTables = function () { - var self = this, - connections = this.table.modules.comms.getConnections(this.connection); - - this.table.options.movableRowsSendingStop.call(this.table, connections); - - this.table.modules.comms.send(this.connection, "moveRow", "disconnect"); - }; - - //accept incomming connection - MoveRows.prototype.connect = function (table, row) { - var self = this; - if (!this.connectedTable) { - this.connectedTable = table; - this.connectedRow = row; - - this.table.element.classList.add("tabulator-movingrow-receiving"); - - self.table.rowManager.getDisplayRows().forEach(function (row) { - if (row.type === "row" && row.modules.moveRow && row.modules.moveRow.mouseup) { - row.getElement().addEventListener("mouseup", row.modules.moveRow.mouseup); - } - }); - - self.tableRowDropEvent = self.tableRowDrop.bind(self); - - self.table.element.addEventListener("mouseup", self.tableRowDropEvent); - - this.table.options.movableRowsReceivingStart.call(this.table, row, table); - - return true; - } else { - console.warn("Move Row Error - Table cannot accept connection, already connected to table:", this.connectedTable); - return false; - } - }; - - //close incomming connection - MoveRows.prototype.disconnect = function (table) { - var self = this; - if (table === this.connectedTable) { - this.connectedTable = false; - this.connectedRow = false; - - this.table.element.classList.remove("tabulator-movingrow-receiving"); - - self.table.rowManager.getDisplayRows().forEach(function (row) { - if (row.type === "row" && row.modules.moveRow && row.modules.moveRow.mouseup) { - row.getElement().removeEventListener("mouseup", row.modules.moveRow.mouseup); - } - }); - - self.table.element.removeEventListener("mouseup", self.tableRowDropEvent); - - this.table.options.movableRowsReceivingStop.call(this.table, table); - } else { - console.warn("Move Row Error - trying to disconnect from non connected table"); - } - }; - - MoveRows.prototype.dropComplete = function (table, row, success) { - var sender = false; - - if (success) { - - switch (_typeof(this.table.options.movableRowsSender)) { - case "string": - sender = this.senders[this.table.options.movableRowsSender]; - break; - - case "function": - sender = this.table.options.movableRowsSender; - break; - } - - if (sender) { - sender.call(this, this.moving.getComponent(), row ? row.getComponent() : undefined, table); - } else { - if (this.table.options.movableRowsSender) { - console.warn("Mover Row Error - no matching sender found:", this.table.options.movableRowsSender); - } - } - - this.table.options.movableRowsSent.call(this.table, this.moving.getComponent(), row ? row.getComponent() : undefined, table); - } else { - this.table.options.movableRowsSentFailed.call(this.table, this.moving.getComponent(), row ? row.getComponent() : undefined, table); - } - - this.endMove(); - }; - - MoveRows.prototype.tableRowDrop = function (e, row) { - var receiver = false, - success = false; - - e.stopImmediatePropagation(); - - switch (_typeof(this.table.options.movableRowsReceiver)) { - case "string": - receiver = this.receivers[this.table.options.movableRowsReceiver]; - break; - - case "function": - receiver = this.table.options.movableRowsReceiver; - break; - } - - if (receiver) { - success = receiver.call(this, this.connectedRow.getComponent(), row ? row.getComponent() : undefined, this.connectedTable); - } else { - console.warn("Mover Row Error - no matching receiver found:", this.table.options.movableRowsReceiver); - } - - if (success) { - this.table.options.movableRowsReceived.call(this.table, this.connectedRow.getComponent(), row ? row.getComponent() : undefined, this.connectedTable); - } else { - this.table.options.movableRowsReceivedFailed.call(this.table, this.connectedRow.getComponent(), row ? row.getComponent() : undefined, this.connectedTable); - } - - this.table.modules.comms.send(this.connectedTable, "moveRow", "dropcomplete", { - row: row, - success: success - }); - }; - - MoveRows.prototype.receivers = { - insert: function insert(fromRow, toRow, fromTable) { - this.table.addRow(fromRow.getData(), undefined, toRow); - return true; - }, - - add: function add(fromRow, toRow, fromTable) { - this.table.addRow(fromRow.getData()); - return true; - }, - - update: function update(fromRow, toRow, fromTable) { - if (toRow) { - toRow.update(fromRow.getData()); - return true; - } - - return false; - }, - - replace: function replace(fromRow, toRow, fromTable) { - if (toRow) { - this.table.addRow(fromRow.getData(), undefined, toRow); - toRow.delete(); - return true; - } - - return false; - } - }; - - MoveRows.prototype.senders = { - delete: function _delete(fromRow, toRow, toTable) { - fromRow.delete(); - } - }; - - MoveRows.prototype.commsReceived = function (table, action, data) { - switch (action) { - case "connect": - return this.connect(table, data.row); - break; - - case "disconnect": - return this.disconnect(table); - break; - - case "dropcomplete": - return this.dropComplete(table, data.row, data.success); - break; - } - }; - - Tabulator.prototype.registerModule("moveRow", MoveRows); - var Mutator = function Mutator(table) { - this.table = table; //hold Tabulator object - this.allowedTypes = ["", "data", "edit", "clipboard"]; //list of muatation types - this.enabled = true; - }; - - //initialize column mutator - Mutator.prototype.initializeColumn = function (column) { - var self = this, - match = false, - config = {}; - - this.allowedTypes.forEach(function (type) { - var key = "mutator" + (type.charAt(0).toUpperCase() + type.slice(1)), - mutator; - - if (column.definition[key]) { - mutator = self.lookupMutator(column.definition[key]); - - if (mutator) { - match = true; - - config[key] = { - mutator: mutator, - params: column.definition[key + "Params"] || {} - }; - } - } - }); - - if (match) { - column.modules.mutate = config; - } - }; - - Mutator.prototype.lookupMutator = function (value) { - var mutator = false; - - //set column mutator - switch (typeof value === 'undefined' ? 'undefined' : _typeof(value)) { - case "string": - if (this.mutators[value]) { - mutator = this.mutators[value]; - } else { - console.warn("Mutator Error - No such mutator found, ignoring: ", value); - } - break; - - case "function": - mutator = value; - break; - } - - return mutator; - }; - - //apply mutator to row - Mutator.prototype.transformRow = function (data, type, update) { - var self = this, - key = "mutator" + (type.charAt(0).toUpperCase() + type.slice(1)), - value; - - if (this.enabled) { - - self.table.columnManager.traverse(function (column) { - var mutator, params, component; - - if (column.modules.mutate) { - mutator = column.modules.mutate[key] || column.modules.mutate.mutator || false; - - if (mutator) { - value = column.getFieldValue(data); - - if (!update || update && typeof value !== "undefined") { - component = column.getComponent(); - params = typeof mutator.params === "function" ? mutator.params(value, data, type, component) : mutator.params; - column.setFieldValue(data, mutator.mutator(value, data, type, params, component)); - } - } - } - }); - } - - return data; - }; - - //apply mutator to new cell value - Mutator.prototype.transformCell = function (cell, value) { - var mutator = cell.column.modules.mutate.mutatorEdit || cell.column.modules.mutate.mutator || false; - - if (mutator) { - return mutator.mutator(value, cell.row.getData(), "edit", mutator.params, cell.getComponent()); - } else { - return value; - } - }; - - Mutator.prototype.enable = function () { - this.enabled = true; - }; - - Mutator.prototype.disable = function () { - this.enabled = false; - }; - - //default mutators - Mutator.prototype.mutators = {}; - - Tabulator.prototype.registerModule("mutator", Mutator); - var Page = function Page(table) { - - this.table = table; //hold Tabulator object - - this.mode = "local"; - this.progressiveLoad = false; - - this.size = 0; - this.page = 1; - this.count = 5; - this.max = 1; - - this.displayIndex = 0; //index in display pipeline - - this.createElements(); - }; - - Page.prototype.createElements = function () { - - var button; - - this.element = document.createElement("span"); - this.element.classList.add("tabulator-paginator"); - - this.pagesElement = document.createElement("span"); - this.pagesElement.classList.add("tabulator-pages"); - - button = document.createElement("button"); - button.classList.add("tabulator-page"); - button.setAttribute("type", "button"); - button.setAttribute("role", "button"); - button.setAttribute("aria-label", ""); - button.setAttribute("title", ""); - - this.firstBut = button.cloneNode(true); - this.firstBut.setAttribute("data-page", "first"); - - this.prevBut = button.cloneNode(true); - this.prevBut.setAttribute("data-page", "prev"); - - this.nextBut = button.cloneNode(true); - this.nextBut.setAttribute("data-page", "next"); - - this.lastBut = button.cloneNode(true); - this.lastBut.setAttribute("data-page", "last"); - }; - - //setup pageination - Page.prototype.initialize = function (hidden) { - var self = this; - - //update param names - for (var key in self.table.options.paginationDataSent) { - self.paginationDataSentNames[key] = self.table.options.paginationDataSent[key]; - } - - for (var _key2 in self.table.options.paginationDataReceived) { - self.paginationDataReceivedNames[_key2] = self.table.options.paginationDataReceived[_key2]; - } - - //build pagination element - - //bind localizations - self.table.modules.localize.bind("pagination|first", function (value) { - self.firstBut.innerHTML = value; - }); - - self.table.modules.localize.bind("pagination|first_title", function (value) { - self.firstBut.setAttribute("aria-label", value); - self.firstBut.setAttribute("title", value); - }); - - self.table.modules.localize.bind("pagination|prev", function (value) { - self.prevBut.innerHTML = value; - }); - - self.table.modules.localize.bind("pagination|prev_title", function (value) { - self.prevBut.setAttribute("aria-label", value); - self.prevBut.setAttribute("title", value); - }); - - self.table.modules.localize.bind("pagination|next", function (value) { - self.nextBut.innerHTML = value; - }); - - self.table.modules.localize.bind("pagination|next_title", function (value) { - self.nextBut.setAttribute("aria-label", value); - self.nextBut.setAttribute("title", value); - }); - - self.table.modules.localize.bind("pagination|last", function (value) { - self.lastBut.innerHTML = value; - }); - - self.table.modules.localize.bind("pagination|last_title", function (value) { - self.lastBut.setAttribute("aria-label", value); - self.lastBut.setAttribute("title", value); - }); - - //click bindings - self.firstBut.addEventListener("click", function () { - self.setPage(1); - }); - - self.prevBut.addEventListener("click", function () { - self.previousPage(); - }); - - self.nextBut.addEventListener("click", function () { - self.nextPage().then(function () {}).catch(function () {}); - }); - - self.lastBut.addEventListener("click", function () { - self.setPage(self.max); - }); - - if (self.table.options.paginationElement) { - self.element = self.table.options.paginationElement; - } - - //append to DOM - self.element.appendChild(self.firstBut); - self.element.appendChild(self.prevBut); - self.element.appendChild(self.pagesElement); - self.element.appendChild(self.nextBut); - self.element.appendChild(self.lastBut); - - if (!self.table.options.paginationElement && !hidden) { - self.table.footerManager.append(self.element, self); - } - - //set default values - self.mode = self.table.options.pagination; - self.size = self.table.options.paginationSize || Math.floor(self.table.rowManager.getElement().clientHeight / 24); - self.count = self.table.options.paginationButtonCount; - }; - - Page.prototype.initializeProgressive = function (mode) { - this.initialize(true); - this.mode = "progressive_" + mode; - this.progressiveLoad = true; - }; - - Page.prototype.setDisplayIndex = function (index) { - this.displayIndex = index; - }; - - Page.prototype.getDisplayIndex = function () { - return this.displayIndex; - }; - - //calculate maximum page from number of rows - Page.prototype.setMaxRows = function (rowCount) { - if (!rowCount) { - this.max = 1; - } else { - this.max = Math.ceil(rowCount / this.size); - } - - if (this.page > this.max) { - this.page = this.max; - } - }; - - //reset to first page without triggering action - Page.prototype.reset = function (force) { - if (this.mode == "local" || force) { - this.page = 1; - } - return true; - }; - - //set the maxmum page - Page.prototype.setMaxPage = function (max) { - this.max = max || 1; - - if (this.page > this.max) { - this.page = this.max; - this.trigger(); - } - }; - - //set current page number - Page.prototype.setPage = function (page) { - var _this33 = this; - - return new Promise(function (resolve, reject) { - if (page > 0 && page <= _this33.max) { - _this33.page = page; - _this33.trigger().then(function () { - resolve(); - }).catch(function () { - reject(); - }); - } else { - console.warn("Pagination Error - Requested page is out of range of 1 - " + _this33.max + ":", page); - reject(); - } - }); - }; - - Page.prototype.setPageSize = function (size) { - if (size > 0) { - this.size = size; - } - }; - - //setup the pagination buttons - Page.prototype._setPageButtons = function () { - var self = this; - - var leftSize = Math.floor((this.count - 1) / 2); - var rightSize = Math.ceil((this.count - 1) / 2); - var min = this.max - this.page + leftSize + 1 < this.count ? this.max - this.count + 1 : Math.max(this.page - leftSize, 1); - var max = this.page <= rightSize ? Math.min(this.count, this.max) : Math.min(this.page + rightSize, this.max); - - while (self.pagesElement.firstChild) { - self.pagesElement.removeChild(self.pagesElement.firstChild); - }if (self.page == 1) { - self.firstBut.disabled = true; - self.prevBut.disabled = true; - } else { - self.firstBut.disabled = false; - self.prevBut.disabled = false; - } - - if (self.page == self.max) { - self.lastBut.disabled = true; - self.nextBut.disabled = true; - } else { - self.lastBut.disabled = false; - self.nextBut.disabled = false; - } - - for (var i = min; i <= max; i++) { - if (i > 0 && i <= self.max) { - self.pagesElement.appendChild(self._generatePageButton(i)); - } - } - - this.footerRedraw(); - }; - - Page.prototype._generatePageButton = function (page) { - var self = this, - button = document.createElement("button"); - - button.classList.add("tabulator-page"); - if (page == self.page) { - button.classList.add("active"); - } - - button.setAttribute("type", "button"); - button.setAttribute("role", "button"); - button.setAttribute("aria-label", "Show Page " + page); - button.setAttribute("title", "Show Page " + page); - button.setAttribute("data-page", page); - button.textContent = page; - - button.addEventListener("click", function (e) { - self.setPage(page); - }); - - return button; - }; - - //previous page - Page.prototype.previousPage = function () { - var _this34 = this; - - return new Promise(function (resolve, reject) { - if (_this34.page > 1) { - _this34.page--; - _this34.trigger().then(function () { - resolve(); - }).catch(function () { - reject(); - }); - } else { - console.warn("Pagination Error - Previous page would be less than page 1:", 0); - reject(); - } - }); - }; - - //next page - Page.prototype.nextPage = function () { - var _this35 = this; - - return new Promise(function (resolve, reject) { - if (_this35.page < _this35.max) { - _this35.page++; - _this35.trigger().then(function () { - resolve(); - }).catch(function () { - reject(); - }); - } else { - if (!_this35.progressiveLoad) { - console.warn("Pagination Error - Next page would be greater than maximum page of " + _this35.max + ":", _this35.max + 1); - } - reject(); - } - }); - }; - - //return current page number - Page.prototype.getPage = function () { - return this.page; - }; - - //return max page number - Page.prototype.getPageMax = function () { - return this.max; - }; - - Page.prototype.getPageSize = function (size) { - return this.size; - }; - - Page.prototype.getMode = function () { - return this.mode; - }; - - //return appropriate rows for current page - Page.prototype.getRows = function (data) { - var output, start, end; - - if (this.mode == "local") { - output = []; - start = this.size * (this.page - 1); - end = start + parseInt(this.size); - - this._setPageButtons(); - - for (var i = start; i < end; i++) { - if (data[i]) { - output.push(data[i]); - } - } - - return output; - } else { - - this._setPageButtons(); - - return data.slice(0); - } - }; - - Page.prototype.trigger = function () { - var _this36 = this; - - var left; - - return new Promise(function (resolve, reject) { - - switch (_this36.mode) { - case "local": - left = _this36.table.rowManager.scrollLeft; - - _this36.table.rowManager.refreshActiveData("page"); - _this36.table.rowManager.scrollHorizontal(left); - - _this36.table.options.pageLoaded.call(_this36.table, _this36.getPage()); - resolve(); - break; - - case "remote": - case "progressive_load": - case "progressive_scroll": - _this36.table.modules.ajax.blockActiveRequest(); - _this36._getRemotePage().then(function () { - resolve(); - }).catch(function () { - reject(); - }); - break; - - default: - console.warn("Pagination Error - no such pagination mode:", _this36.mode); - reject(); - } - }); - }; - - Page.prototype._getRemotePage = function () { - var _this37 = this; - - var self = this, - oldParams, - pageParams; - - return new Promise(function (resolve, reject) { - - if (!self.table.modExists("ajax", true)) { - reject(); - } - - //record old params and restore after request has been made - oldParams = Tabulator.prototype.helpers.deepClone(self.table.modules.ajax.getParams() || {}); - pageParams = self.table.modules.ajax.getParams(); - - //configure request params - pageParams[_this37.paginationDataSentNames.page] = self.page; - - //set page size if defined - if (_this37.size) { - pageParams[_this37.paginationDataSentNames.size] = _this37.size; - } - - //set sort data if defined - if (_this37.table.options.ajaxSorting && _this37.table.modExists("sort")) { - var sorters = self.table.modules.sort.getSort(); - - sorters.forEach(function (item) { - delete item.column; - }); - - pageParams[_this37.paginationDataSentNames.sorters] = sorters; - } - - //set filter data if defined - if (_this37.table.options.ajaxFiltering && _this37.table.modExists("filter")) { - var filters = self.table.modules.filter.getFilters(true, true); - pageParams[_this37.paginationDataSentNames.filters] = filters; - } - - self.table.modules.ajax.setParams(pageParams); - - self.table.modules.ajax.sendRequest(_this37.progressiveLoad).then(function (data) { - self._parseRemoteData(data); - resolve(); - }).catch(function (e) { - reject(); - }); - - self.table.modules.ajax.setParams(oldParams); - }); - }; - - Page.prototype._parseRemoteData = function (data) { - var self = this, - left, - data, - margin; - - if (typeof data[this.paginationDataReceivedNames.last_page] === "undefined") { - console.warn("Remote Pagination Error - Server response missing '" + this.paginationDataReceivedNames.last_page + "' property"); - } - - if (data[this.paginationDataReceivedNames.data]) { - this.max = parseInt(data[this.paginationDataReceivedNames.last_page]) || 1; - - if (this.progressiveLoad) { - switch (this.mode) { - case "progressive_load": - this.table.rowManager.addRows(data[this.paginationDataReceivedNames.data]); - if (this.page < this.max) { - setTimeout(function () { - self.nextPage().then(function () {}).catch(function () {}); - }, self.table.options.ajaxProgressiveLoadDelay); - } - break; - - case "progressive_scroll": - data = this.table.rowManager.getData().concat(data[this.paginationDataReceivedNames.data]); - - this.table.rowManager.setData(data, true); - - margin = this.table.options.ajaxProgressiveLoadScrollMargin || this.table.rowManager.element.clientHeight * 2; - - if (self.table.rowManager.element.scrollHeight <= self.table.rowManager.element.clientHeight + margin) { - self.nextPage().then(function () {}).catch(function () {}); - } - break; - } - } else { - left = this.table.rowManager.scrollLeft; - - this.table.rowManager.setData(data[this.paginationDataReceivedNames.data]); - - this.table.rowManager.scrollHorizontal(left); - - this.table.columnManager.scrollHorizontal(left); - - this.table.options.pageLoaded.call(this.table, this.getPage()); - } - } else { - console.warn("Remote Pagination Error - Server response missing '" + this.paginationDataReceivedNames.data + "' property"); - } - }; - - //handle the footer element being redrawn - Page.prototype.footerRedraw = function () { - var footer = this.table.footerManager.element; - - if (Math.ceil(footer.clientWidth) - footer.scrollWidth < 0) { - this.pagesElement.style.display = 'none'; - } else { - this.pagesElement.style.display = ''; - - if (Math.ceil(footer.clientWidth) - footer.scrollWidth < 0) { - this.pagesElement.style.display = 'none'; - } - } - }; - - //set the paramter names for pagination requests - Page.prototype.paginationDataSentNames = { - "page": "page", - "size": "size", - "sorters": "sorters", - // "sort_dir":"sort_dir", - "filters": "filters" - }; - - //set the property names for pagination responses - Page.prototype.paginationDataReceivedNames = { - "current_page": "current_page", - "last_page": "last_page", - "data": "data" - }; - - Tabulator.prototype.registerModule("page", Page); - - var Persistence = function Persistence(table) { - this.table = table; //hold Tabulator object - this.mode = ""; - this.id = ""; - this.persistProps = ["field", "width", "visible"]; - }; - - //setup parameters - Persistence.prototype.initialize = function (mode, id) { - //determine persistent layout storage type - this.mode = mode !== true ? mode : typeof window.localStorage !== 'undefined' ? "local" : "cookie"; - - //set storage tag - this.id = "tabulator-" + (id || this.table.element.getAttribute("id") || ""); - }; - - //load saved definitions - Persistence.prototype.load = function (type, current) { - - var data = this.retreiveData(type); - - if (current) { - data = data ? this.mergeDefinition(current, data) : current; - } - - return data; - }; - - //retreive data from memory - Persistence.prototype.retreiveData = function (type) { - var data = "", - id = this.id + (type === "columns" ? "" : "-" + type); - - switch (this.mode) { - case "local": - data = localStorage.getItem(id); - break; - - case "cookie": - - //find cookie - var cookie = document.cookie, - cookiePos = cookie.indexOf(id + "="), - end = void 0; - - //if cookie exists, decode and load column data into tabulator - if (cookiePos > -1) { - cookie = cookie.substr(cookiePos); - - end = cookie.indexOf(";"); - - if (end > -1) { - cookie = cookie.substr(0, end); - } - - data = cookie.replace(id + "=", ""); - } - break; - - default: - console.warn("Persistance Load Error - invalid mode selected", this.mode); - } - - return data ? JSON.parse(data) : false; - }; - - //merge old and new column defintions - Persistence.prototype.mergeDefinition = function (oldCols, newCols) { - var self = this, - output = []; - - // oldCols = oldCols || []; - newCols = newCols || []; - - newCols.forEach(function (column, to) { - - var from = self._findColumn(oldCols, column); - - if (from) { - - from.width = column.width; - from.visible = column.visible; - - if (from.columns) { - from.columns = self.mergeDefinition(from.columns, column.columns); - } - - output.push(from); - } - }); - oldCols.forEach(function (column, i) { - var from = self._findColumn(newCols, column); - if (!from) { - if (output.length > i) { - output.splice(i, 0, column); - } else { - output.push(column); - } - } - }); - - return output; - }; - - //find matching columns - Persistence.prototype._findColumn = function (columns, subject) { - var type = subject.columns ? "group" : subject.field ? "field" : "object"; - - return columns.find(function (col) { - switch (type) { - case "group": - return col.title === subject.title && col.columns.length === subject.columns.length; - break; - - case "field": - return col.field === subject.field; - break; - - case "object": - return col === subject; - break; - } - }); - }; - - //save data - Persistence.prototype.save = function (type) { - var data = {}; - - switch (type) { - case "columns": - data = this.parseColumns(this.table.columnManager.getColumns()); - break; - - case "filter": - data = this.table.modules.filter.getFilters(); - break; - - case "sort": - data = this.validateSorters(this.table.modules.sort.getSort()); - break; - } - - var id = this.id + (type === "columns" ? "" : "-" + type); - - this.saveData(id, data); - }; - - //ensure sorters contain no function data - Persistence.prototype.validateSorters = function (data) { - data.forEach(function (item) { - item.column = item.field; - delete item.field; - }); - - return data; - }; - - //save data to chosed medium - Persistence.prototype.saveData = function (id, data) { - - data = JSON.stringify(data); - - switch (this.mode) { - case "local": - localStorage.setItem(id, data); - break; - - case "cookie": - var expireDate = new Date(); - expireDate.setDate(expireDate.getDate() + 10000); - - //save cookie - document.cookie = id + "=" + data + "; expires=" + expireDate.toUTCString(); - break; - - default: - console.warn("Persistance Save Error - invalid mode selected", this.mode); - } - }; - - //build premission list - Persistence.prototype.parseColumns = function (columns) { - var self = this, - definitions = []; - - columns.forEach(function (column) { - var def = {}; - - if (column.isGroup) { - def.title = column.getDefinition().title; - def.columns = self.parseColumns(column.getColumns()); - } else { - def.title = column.getDefinition().title; - def.field = column.getField(); - def.width = column.getWidth(); - def.visible = column.visible; - } - - definitions.push(def); - }); - - return definitions; - }; - - Tabulator.prototype.registerModule("persistence", Persistence); - - var ResizeColumns = function ResizeColumns(table) { - this.table = table; //hold Tabulator object - this.startColumn = false; - this.startX = false; - this.startWidth = false; - this.handle = null; - this.prevHandle = null; - }; - - ResizeColumns.prototype.initializeColumn = function (type, column, element) { - var self = this, - variableHeight = false, - mode = this.table.options.resizableColumns; - - //set column resize mode - if (type === "header") { - variableHeight = column.definition.formatter == "textarea" || column.definition.variableHeight; - column.modules.resize = { variableHeight: variableHeight }; - } - - if (mode === true || mode == type) { - - var handle = document.createElement('div'); - handle.className = "tabulator-col-resize-handle"; - - var prevHandle = document.createElement('div'); - prevHandle.className = "tabulator-col-resize-handle prev"; - - handle.addEventListener("click", function (e) { - e.stopPropagation(); - }); - - handle.addEventListener("mousedown", function (e) { - var nearestColumn = column.getLastColumn(); - - if (nearestColumn && self._checkResizability(nearestColumn)) { - self.startColumn = column; - self._mouseDown(e, nearestColumn); - } - }); - - //reszie column on double click - handle.addEventListener("dblclick", function (e) { - if (self._checkResizability(column)) { - column.reinitializeWidth(true); - } - }); - - prevHandle.addEventListener("click", function (e) { - e.stopPropagation(); - }); - - prevHandle.addEventListener("mousedown", function (e) { - var nearestColumn, colIndex, prevColumn; - - nearestColumn = column.getFirstColumn(); - - if (nearestColumn) { - colIndex = self.table.columnManager.findColumnIndex(nearestColumn); - prevColumn = colIndex > 0 ? self.table.columnManager.getColumnByIndex(colIndex - 1) : false; - - if (prevColumn && self._checkResizability(prevColumn)) { - self.startColumn = column; - self._mouseDown(e, prevColumn); - } - } - }); - - //resize column on double click - prevHandle.addEventListener("dblclick", function (e) { - var nearestColumn, colIndex, prevColumn; - - nearestColumn = column.getFirstColumn(); - - if (nearestColumn) { - colIndex = self.table.columnManager.findColumnIndex(nearestColumn); - prevColumn = colIndex > 0 ? self.table.columnManager.getColumnByIndex(colIndex - 1) : false; - - if (prevColumn && self._checkResizability(prevColumn)) { - prevColumn.reinitializeWidth(true); - } - } - }); - - element.appendChild(handle); - element.appendChild(prevHandle); - } - }; - - ResizeColumns.prototype._checkResizability = function (column) { - return typeof column.definition.resizable != "undefined" ? column.definition.resizable : this.table.options.resizableColumns; - }; - - ResizeColumns.prototype._mouseDown = function (e, column) { - var self = this; - - self.table.element.classList.add("tabulator-block-select"); - - function mouseMove(e) { - column.setWidth(self.startWidth + (e.screenX - self.startX)); - - if (!self.table.browserSlow && column.modules.resize && column.modules.resize.variableHeight) { - column.checkCellHeights(); - } - } - - function mouseUp(e) { - - //block editor from taking action while resizing is taking place - if (self.startColumn.modules.edit) { - self.startColumn.modules.edit.blocked = false; - } - - if (self.table.browserSlow && column.modules.resize && column.modules.resize.variableHeight) { - column.checkCellHeights(); - } - - document.body.removeEventListener("mouseup", mouseUp); - document.body.removeEventListener("mousemove", mouseMove); - - self.table.element.classList.remove("tabulator-block-select"); - - if (self.table.options.persistentLayout && self.table.modExists("persistence", true)) { - self.table.modules.persistence.save("columns"); - } - - self.table.options.columnResized.call(self.table, self.startColumn.getComponent()); - } - - e.stopPropagation(); //prevent resize from interfereing with movable columns - - //block editor from taking action while resizing is taking place - if (self.startColumn.modules.edit) { - self.startColumn.modules.edit.blocked = true; - } - - self.startX = e.screenX; - self.startWidth = column.getWidth(); - - document.body.addEventListener("mousemove", mouseMove); - document.body.addEventListener("mouseup", mouseUp); - }; - - Tabulator.prototype.registerModule("resizeColumns", ResizeColumns); - var ResizeRows = function ResizeRows(table) { - this.table = table; //hold Tabulator object - this.startColumn = false; - this.startY = false; - this.startHeight = false; - this.handle = null; - this.prevHandle = null; - }; - - ResizeRows.prototype.initializeRow = function (row) { - var self = this, - rowEl = row.getElement(); - - var handle = document.createElement('div'); - handle.className = "tabulator-row-resize-handle"; - - var prevHandle = document.createElement('div'); - prevHandle.className = "tabulator-row-resize-handle prev"; - - handle.addEventListener("click", function (e) { - e.stopPropagation(); - }); - - handle.addEventListener("mousedown", function (e) { - self.startRow = row; - self._mouseDown(e, row); - }); - - prevHandle.addEventListener("click", function (e) { - e.stopPropagation(); - }); - - prevHandle.addEventListener("mousedown", function (e) { - var prevRow = self.table.rowManager.prevDisplayRow(row); - - if (prevRow) { - self.startRow = prevRow; - self._mouseDown(e, prevRow); - } - }); - - rowEl.appendChild(handle); - rowEl.appendChild(prevHandle); - }; - - ResizeRows.prototype._mouseDown = function (e, row) { - var self = this; - - self.table.element.classList.add("tabulator-block-select"); - - function mouseMove(e) { - row.setHeight(self.startHeight + (e.screenY - self.startY)); - } - - function mouseUp(e) { - - // //block editor from taking action while resizing is taking place - // if(self.startColumn.modules.edit){ - // self.startColumn.modules.edit.blocked = false; - // } - - document.body.removeEventListener("mouseup", mouseMove); - document.body.removeEventListener("mousemove", mouseMove); - - self.table.element.classList.remove("tabulator-block-select"); - - self.table.options.rowResized.call(this.table, row.getComponent()); - } - - e.stopPropagation(); //prevent resize from interfereing with movable columns - - //block editor from taking action while resizing is taking place - // if(self.startColumn.modules.edit){ - // self.startColumn.modules.edit.blocked = true; - // } - - self.startY = e.screenY; - self.startHeight = row.getHeight(); - - document.body.addEventListener("mousemove", mouseMove); - - document.body.addEventListener("mouseup", mouseUp); - }; - - Tabulator.prototype.registerModule("resizeRows", ResizeRows); - var ResizeTable = function ResizeTable(table) { - this.table = table; //hold Tabulator object - this.binding = false; - this.observer = false; - }; - - ResizeTable.prototype.initialize = function (row) { - var table = this.table, - observer; - - if (typeof ResizeObserver !== "undefined" && table.rowManager.getRenderMode() === "virtual") { - this.observer = new ResizeObserver(function (entry) { - table.redraw(); - }); - - this.observer.observe(table.element); - } else { - this.binding = function () { - table.redraw(); - }; - - window.addEventListener("resize", this.binding); - } - }; - - ResizeTable.prototype.clearBindings = function (row) { - if (this.binding) { - window.removeEventListener("resize", this.binding); - } - - if (this.observer) { - this.observer.unobserve(this.table.element); - } - }; - - Tabulator.prototype.registerModule("resizeTable", ResizeTable); - var ResponsiveLayout = function ResponsiveLayout(table) { - this.table = table; //hold Tabulator object - this.columns = []; - this.hiddenColumns = []; - this.mode = ""; - this.index = 0; - this.collapseFormatter = []; - this.collapseStartOpen = true; - }; - - //generate resposive columns list - ResponsiveLayout.prototype.initialize = function () { - var self = this, - columns = []; - - this.mode = this.table.options.responsiveLayout; - this.collapseFormatter = this.table.options.responsiveLayoutCollapseFormatter || this.formatCollapsedData; - this.collapseStartOpen = this.table.options.responsiveLayoutCollapseStartOpen; - this.hiddenColumns = []; - - //detemine level of responsivity for each column - this.table.columnManager.columnsByIndex.forEach(function (column, i) { - if (column.modules.responsive) { - if (column.modules.responsive.order && column.modules.responsive.visible) { - column.modules.responsive.index = i; - columns.push(column); - - if (!column.visible && self.mode === "collapse") { - self.hiddenColumns.push(column); - } - } - } - }); - - //sort list by responsivity - columns = columns.reverse(); - columns = columns.sort(function (a, b) { - var diff = b.modules.responsive.order - a.modules.responsive.order; - return diff || b.modules.responsive.index - a.modules.responsive.index; - }); - - this.columns = columns; - - if (this.mode === "collapse") { - this.generateCollapsedContent(); - } - }; - - //define layout information - ResponsiveLayout.prototype.initializeColumn = function (column) { - var def = column.getDefinition(); - - column.modules.responsive = { order: typeof def.responsive === "undefined" ? 1 : def.responsive, visible: def.visible === false ? false : true }; - }; - - ResponsiveLayout.prototype.layoutRow = function (row) { - var rowEl = row.getElement(), - el = document.createElement("div"); - - el.classList.add("tabulator-responsive-collapse"); - - if (!rowEl.classList.contains("tabulator-calcs")) { - row.modules.responsiveLayout = { - element: el - }; - - if (!this.collapseStartOpen) { - el.style.display = 'none'; - } - - rowEl.appendChild(el); - - this.generateCollapsedRowContent(row); - } - }; - - //update column visibility - ResponsiveLayout.prototype.updateColumnVisibility = function (column, visible) { - var index; - if (column.modules.responsive) { - column.modules.responsive.visible = visible; - this.initialize(); - } - }; - - ResponsiveLayout.prototype.hideColumn = function (column) { - column.hide(false, true); - - if (this.mode === "collapse") { - this.hiddenColumns.unshift(column); - this.generateCollapsedContent(); - } - }; - - ResponsiveLayout.prototype.showColumn = function (column) { - var index; - - column.show(false, true); - //set column width to prevent calculation loops on uninitialized columns - column.setWidth(column.getWidth()); - - if (this.mode === "collapse") { - index = this.hiddenColumns.indexOf(column); - - if (index > -1) { - this.hiddenColumns.splice(index, 1); - } - - this.generateCollapsedContent(); - } - }; - - //redraw columns to fit space - ResponsiveLayout.prototype.update = function () { - var self = this, - working = true; - - while (working) { - - var width = self.table.modules.layout.getMode() == "fitColumns" ? self.table.columnManager.getFlexBaseWidth() : self.table.columnManager.getWidth(); - - var diff = self.table.columnManager.element.clientWidth - width; - - if (diff < 0) { - //table is too wide - var column = self.columns[self.index]; - - if (column) { - self.hideColumn(column); - self.index++; - } else { - working = false; - } - } else { - - //table has spare space - var _column = self.columns[self.index - 1]; - - if (_column) { - if (diff > 0) { - if (diff >= _column.getWidth()) { - self.showColumn(_column); - self.index--; - } else { - working = false; - } - } else { - working = false; - } - } else { - working = false; - } - } - - if (!self.table.rowManager.activeRowsCount) { - self.table.rowManager.renderEmptyScroll(); - } - } - }; - - ResponsiveLayout.prototype.generateCollapsedContent = function () { - var self = this, - rows = this.table.rowManager.getDisplayRows(); - - rows.forEach(function (row) { - self.generateCollapsedRowContent(row); - }); - }; - - ResponsiveLayout.prototype.generateCollapsedRowContent = function (row) { - var el, contents; - - if (row.modules.responsiveLayout) { - el = row.modules.responsiveLayout.element; - - while (el.firstChild) { - el.removeChild(el.firstChild); - }contents = this.collapseFormatter(this.generateCollapsedRowData(row)); - - if (contents) { - el.appendChild(contents); - } - } - }; - - ResponsiveLayout.prototype.generateCollapsedRowData = function (row) { - var self = this, - data = row.getData(), - output = {}, - mockCellComponent; - - this.hiddenColumns.forEach(function (column) { - var value = column.getFieldValue(data); - - if (column.definition.title && column.field) { - if (column.modules.format && self.table.options.responsiveLayoutCollapseUseFormatters) { - - mockCellComponent = { - value: false, - data: {}, - getValue: function getValue() { - return value; - }, - getData: function getData() { - return data; - }, - getElement: function getElement() { - return document.createElement("div"); - }, - getRow: function getRow() { - return row.getComponent(); - }, - getColumn: function getColumn() { - return column.getComponent(); - } - }; - - output[column.definition.title] = column.modules.format.formatter.call(self.table.modules.format, mockCellComponent, column.modules.format.params); - } else { - output[column.definition.title] = value; - } - } - }); - - return output; - }; - - ResponsiveLayout.prototype.formatCollapsedData = function (data) { - var list = document.createElement("table"), - listContents = ""; - - for (var key in data) { - listContents += "" + key + "" + data[key] + ""; - } - - list.innerHTML = listContents; - - return Object.keys(data).length ? list : ""; - }; - - Tabulator.prototype.registerModule("responsiveLayout", ResponsiveLayout); - - var SelectRow = function SelectRow(table) { - this.table = table; //hold Tabulator object - this.selecting = false; //flag selecting in progress - this.lastClickedRow = false; //last clicked row - this.selectPrev = []; //hold previously selected element for drag drop selection - this.selectedRows = []; //hold selected rows - }; - - SelectRow.prototype.clearSelectionData = function (silent) { - this.selecting = false; - this.lastClickedRow = false; - this.selectPrev = []; - this.selectedRows = []; - - if (!silent) { - this._rowSelectionChanged(); - } - }; - - SelectRow.prototype.initializeRow = function (row) { - var self = this, - element = row.getElement(); - - // trigger end of row selection - var endSelect = function endSelect() { - - setTimeout(function () { - self.selecting = false; - }, 50); - - document.body.removeEventListener("mouseup", endSelect); - }; - - row.modules.select = { selected: false }; - - //set row selection class - if (self.table.options.selectableCheck.call(this.table, row.getComponent())) { - element.classList.add("tabulator-selectable"); - element.classList.remove("tabulator-unselectable"); - - if (self.table.options.selectable && self.table.options.selectable != "highlight") { - if (self.table.options.selectableRangeMode && self.table.options.selectableRangeMode === "click") { - element.addEventListener("click", function (e) { - if (e.shiftKey) { - self.lastClickedRow = self.lastClickedRow || row; - - var lastClickedRowIdx = self.table.rowManager.getDisplayRowIndex(self.lastClickedRow); - var rowIdx = self.table.rowManager.getDisplayRowIndex(row); - - var fromRowIdx = lastClickedRowIdx <= rowIdx ? lastClickedRowIdx : rowIdx; - var toRowIdx = lastClickedRowIdx >= rowIdx ? lastClickedRowIdx : rowIdx; - - var rows = self.table.rowManager.getDisplayRows().slice(0); - var toggledRows = rows.splice(fromRowIdx, toRowIdx - fromRowIdx + 1); - - if (e.ctrlKey) { - toggledRows.forEach(function (toggledRow) { - if (toggledRow !== self.lastClickedRow) { - self.toggleRow(toggledRow); - } - }); - self.lastClickedRow = row; - } else { - self.deselectRows(); - self.selectRows(toggledRows); - } - } else if (e.ctrlKey) { - self.toggleRow(row); - self.lastClickedRow = row; - } else { - self.deselectRows(); - self.selectRows(row); - self.lastClickedRow = row; - } - }); - } else { - element.addEventListener("click", function (e) { - if (!self.selecting) { - self.toggleRow(row); - } - }); - - element.addEventListener("mousedown", function (e) { - if (e.shiftKey) { - self.selecting = true; - - self.selectPrev = []; - - document.body.addEventListener("mouseup", endSelect); - document.body.addEventListener("keyup", endSelect); - - self.toggleRow(row); - - return false; - } - }); - - element.addEventListener("mouseenter", function (e) { - if (self.selecting) { - self.toggleRow(row); - - if (self.selectPrev[1] == row) { - self.toggleRow(self.selectPrev[0]); - } - } - }); - - element.addEventListener("mouseout", function (e) { - if (self.selecting) { - self.selectPrev.unshift(row); - } - }); - } - } - } else { - element.classList.add("tabulator-unselectable"); - element.classList.remove("tabulator-selectable"); - } - }; - - //toggle row selection - SelectRow.prototype.toggleRow = function (row) { - if (this.table.options.selectableCheck.call(this.table, row.getComponent())) { - if (row.modules.select.selected) { - this._deselectRow(row); - } else { - this._selectRow(row); - } - } - }; - - //select a number of rows - SelectRow.prototype.selectRows = function (rows) { - var self = this; - - switch (typeof rows === 'undefined' ? 'undefined' : _typeof(rows)) { - case "undefined": - self.table.rowManager.rows.forEach(function (row) { - self._selectRow(row, false, true); - }); - - self._rowSelectionChanged(); - break; - - case "boolean": - if (rows === true) { - self.table.rowManager.activeRows.forEach(function (row) { - self._selectRow(row, false, true); - }); - - self._rowSelectionChanged(); - } - break; - - default: - if (Array.isArray(rows)) { - rows.forEach(function (row) { - self._selectRow(row); - }); - - self._rowSelectionChanged(); - } else { - self._selectRow(rows); - } - break; - } - }; - - //select an individual row - SelectRow.prototype._selectRow = function (rowInfo, silent, force) { - var index; - - //handle max row count - if (!isNaN(this.table.options.selectable) && this.table.options.selectable !== true && !force) { - if (this.selectedRows.length >= this.table.options.selectable) { - if (this.table.options.selectableRollingSelection) { - this._deselectRow(this.selectedRows[0]); - } else { - return false; - } - } - } - - var row = this.table.rowManager.findRow(rowInfo); - - if (row) { - if (this.selectedRows.indexOf(row) == -1) { - row.modules.select.selected = true; - row.getElement().classList.add("tabulator-selected"); - - this.selectedRows.push(row); - - if (!silent) { - this.table.options.rowSelected.call(this.table, row.getComponent()); - this._rowSelectionChanged(); - } - } - } else { - if (!silent) { - console.warn("Selection Error - No such row found, ignoring selection:" + rowInfo); - } - } - }; - - SelectRow.prototype.isRowSelected = function (row) { - return this.selectedRows.indexOf(row) !== -1; - }; - - //deselect a number of rows - SelectRow.prototype.deselectRows = function (rows) { - var self = this, - rowCount; - - if (typeof rows == "undefined") { - - rowCount = self.selectedRows.length; - - for (var i = 0; i < rowCount; i++) { - self._deselectRow(self.selectedRows[0], false); - } - - self._rowSelectionChanged(); - } else { - if (Array.isArray(rows)) { - rows.forEach(function (row) { - self._deselectRow(row); - }); - - self._rowSelectionChanged(); - } else { - self._deselectRow(rows); - } - } - }; - - //deselect an individual row - SelectRow.prototype._deselectRow = function (rowInfo, silent) { - var self = this, - row = self.table.rowManager.findRow(rowInfo), - index; - - if (row) { - index = self.selectedRows.findIndex(function (selectedRow) { - return selectedRow == row; - }); - - if (index > -1) { - - row.modules.select.selected = false; - row.getElement().classList.remove("tabulator-selected"); - self.selectedRows.splice(index, 1); - - if (!silent) { - self.table.options.rowDeselected.call(this.table, row.getComponent()); - self._rowSelectionChanged(); - } - } - } else { - if (!silent) { - console.warn("Deselection Error - No such row found, ignoring selection:" + rowInfo); - } - } - }; - - SelectRow.prototype.getSelectedData = function () { - var data = []; - - this.selectedRows.forEach(function (row) { - data.push(row.getData()); - }); - - return data; - }; - - SelectRow.prototype.getSelectedRows = function () { - - var rows = []; - - this.selectedRows.forEach(function (row) { - rows.push(row.getComponent()); - }); - - return rows; - }; - - SelectRow.prototype._rowSelectionChanged = function () { - this.table.options.rowSelectionChanged.call(this.table, this.getSelectedData(), this.getSelectedRows()); - }; - - Tabulator.prototype.registerModule("selectRow", SelectRow); - - var Sort = function Sort(table) { - this.table = table; //hold Tabulator object - this.sortList = []; //holder current sort - this.changed = false; //has the sort changed since last render - }; - - //initialize column header for sorting - Sort.prototype.initializeColumn = function (column, content) { - var self = this, - sorter = false, - colEl, - arrowEl; - - switch (_typeof(column.definition.sorter)) { - case "string": - if (self.sorters[column.definition.sorter]) { - sorter = self.sorters[column.definition.sorter]; - } else { - console.warn("Sort Error - No such sorter found: ", column.definition.sorter); - } - break; - - case "function": - sorter = column.definition.sorter; - break; - } - - column.modules.sort = { - sorter: sorter, dir: "none", - params: column.definition.sorterParams || {}, - startingDir: column.definition.headerSortStartingDir || "asc" - }; - - if (column.definition.headerSort !== false) { - - colEl = column.getElement(); - - colEl.classList.add("tabulator-sortable"); - - arrowEl = document.createElement("div"); - arrowEl.classList.add("tabulator-arrow"); - //create sorter arrow - content.appendChild(arrowEl); - - //sort on click - colEl.addEventListener("click", function (e) { - var dir = "", - sorters = [], - match = false; - - if (column.modules.sort) { - dir = column.modules.sort.dir == "asc" ? "desc" : column.modules.sort.dir == "desc" ? "asc" : column.modules.sort.startingDir; - - if (self.table.options.columnHeaderSortMulti && (e.shiftKey || e.ctrlKey)) { - sorters = self.getSort(); - - match = sorters.findIndex(function (sorter) { - return sorter.field === column.getField(); - }); - - if (match > -1) { - sorters[match].dir = sorters[match].dir == "asc" ? "desc" : "asc"; - - if (match != sorters.length - 1) { - sorters.push(sorters.splice(match, 1)[0]); - } - } else { - sorters.push({ column: column, dir: dir }); - } - - //add to existing sort - self.setSort(sorters); - } else { - //sort by column only - self.setSort(column, dir); - } - - self.table.rowManager.sorterRefresh(); - } - }); - } - }; - - //check if the sorters have changed since last use - Sort.prototype.hasChanged = function () { - var changed = this.changed; - this.changed = false; - return changed; - }; - - //return current sorters - Sort.prototype.getSort = function () { - var self = this, - sorters = []; - - self.sortList.forEach(function (item) { - if (item.column) { - sorters.push({ column: item.column.getComponent(), field: item.column.getField(), dir: item.dir }); - } - }); - - return sorters; - }; - - //change sort list and trigger sort - Sort.prototype.setSort = function (sortList, dir) { - var self = this, - newSortList = []; - - if (!Array.isArray(sortList)) { - sortList = [{ column: sortList, dir: dir }]; - } - - sortList.forEach(function (item) { - var column; - - column = self.table.columnManager.findColumn(item.column); - - if (column) { - item.column = column; - newSortList.push(item); - self.changed = true; - } else { - console.warn("Sort Warning - Sort field does not exist and is being ignored: ", item.column); - } - }); - - self.sortList = newSortList; - - if (this.table.options.persistentSort && this.table.modExists("persistence", true)) { - this.table.modules.persistence.save("sort"); - } - }; - - //clear sorters - Sort.prototype.clear = function () { - this.setSort([]); - }; - - //find appropriate sorter for column - Sort.prototype.findSorter = function (column) { - var row = this.table.rowManager.activeRows[0], - sorter = "string", - field, - value; - - if (row) { - row = row.getData(); - field = column.getField(); - - if (field) { - - value = column.getFieldValue(row); - - switch (typeof value === 'undefined' ? 'undefined' : _typeof(value)) { - case "undefined": - sorter = "string"; - break; - - case "boolean": - sorter = "boolean"; - break; - - default: - if (!isNaN(value) && value !== "") { - sorter = "number"; - } else { - if (value.match(/((^[0-9]+[a-z]+)|(^[a-z]+[0-9]+))+$/i)) { - sorter = "alphanum"; - } - } - break; - } - } - } - - return this.sorters[sorter]; - }; - - //work through sort list sorting data - Sort.prototype.sort = function () { - var self = this, - lastSort, - sortList; - - sortList = this.table.options.sortOrderReverse ? self.sortList.slice().reverse() : self.sortList; - - if (self.table.options.dataSorting) { - self.table.options.dataSorting.call(self.table, self.getSort()); - } - - self.clearColumnHeaders(); - - if (!self.table.options.ajaxSorting) { - - sortList.forEach(function (item, i) { - - if (item.column && item.column.modules.sort) { - - //if no sorter has been defined, take a guess - if (!item.column.modules.sort.sorter) { - item.column.modules.sort.sorter = self.findSorter(item.column); - } - - self._sortItem(item.column, item.dir, sortList, i); - } - - self.setColumnHeader(item.column, item.dir); - }); - } else { - sortList.forEach(function (item, i) { - self.setColumnHeader(item.column, item.dir); - }); - } - - if (self.table.options.dataSorted) { - self.table.options.dataSorted.call(self.table, self.getSort(), self.table.rowManager.getComponents(true)); - } - }; - - //clear sort arrows on columns - Sort.prototype.clearColumnHeaders = function () { - this.table.columnManager.getRealColumns().forEach(function (column) { - if (column.modules.sort) { - column.modules.sort.dir = "none"; - column.getElement().setAttribute("aria-sort", "none"); - } - }); - }; - - //set the column header sort direction - Sort.prototype.setColumnHeader = function (column, dir) { - column.modules.sort.dir = dir; - column.getElement().setAttribute("aria-sort", dir); - }; - - //sort each item in sort list - Sort.prototype._sortItem = function (column, dir, sortList, i) { - var self = this; - - var activeRows = self.table.rowManager.activeRows; - - var params = typeof column.modules.sort.params === "function" ? column.modules.sort.params(column.getComponent(), dir) : column.modules.sort.params; - - activeRows.sort(function (a, b) { - - var result = self._sortRow(a, b, column, dir, params); - - //if results match recurse through previous searchs to be sure - if (result === 0 && i) { - for (var j = i - 1; j >= 0; j--) { - result = self._sortRow(a, b, sortList[j].column, sortList[j].dir, params); - - if (result !== 0) { - break; - } - } - } - - return result; - }); - }; - - //process individual rows for a sort function on active data - Sort.prototype._sortRow = function (a, b, column, dir, params) { - var el1Comp, el2Comp, colComp; - - //switch elements depending on search direction - var el1 = dir == "asc" ? a : b; - var el2 = dir == "asc" ? b : a; - - a = column.getFieldValue(el1.getData()); - b = column.getFieldValue(el2.getData()); - - a = typeof a !== "undefined" ? a : ""; - b = typeof b !== "undefined" ? b : ""; - - el1Comp = el1.getComponent(); - el2Comp = el2.getComponent(); - - return column.modules.sort.sorter.call(this, a, b, el1Comp, el2Comp, column.getComponent(), dir, params); - }; - - //default data sorters - Sort.prototype.sorters = { - - //sort numbers - number: function number(a, b, aRow, bRow, column, dir, params) { - var alignEmptyValues = params.alignEmptyValues; - var emptyAlign = 0; - - a = parseFloat(String(a).replace(",", "")); - b = parseFloat(String(b).replace(",", "")); - - //handle non numeric values - if (isNaN(a)) { - emptyAlign = isNaN(b) ? 0 : -1; - } else if (isNaN(b)) { - emptyAlign = 1; - } else { - //compare valid values - return a - b; - } - - //fix empty values in position - if (alignEmptyValues === "top" && dir === "desc" || alignEmptyValues === "bottom" && dir === "asc") { - emptyAlign *= -1; - } - - return emptyAlign; - }, - - //sort strings - string: function string(a, b, aRow, bRow, column, dir, params) { - var alignEmptyValues = params.alignEmptyValues; - var emptyAlign = 0; - var locale; - - //handle empty values - if (!a) { - emptyAlign = !b ? 0 : -1; - } else if (!b) { - emptyAlign = 1; - } else { - //compare valid values - switch (_typeof(params.locale)) { - case "boolean": - if (params.locale) { - locale = this.table.modules.localize.getLocale(); - } - break; - case "string": - locale = params.locale; - break; - } - - return String(a).toLowerCase().localeCompare(String(b).toLowerCase(), locale); - } - - //fix empty values in position - if (alignEmptyValues === "top" && dir === "desc" || alignEmptyValues === "bottom" && dir === "asc") { - emptyAlign *= -1; - } - - return emptyAlign; - }, - - //sort date - date: function date(a, b, aRow, bRow, column, dir, params) { - if (!params.format) { - params.format = "DD/MM/YYYY"; - } - - return this.sorters.datetime.call(this, a, b, aRow, bRow, column, dir, params); - }, - - //sort hh:mm formatted times - time: function time(a, b, aRow, bRow, column, dir, params) { - if (!params.format) { - params.format = "hh:mm"; - } - - return this.sorters.datetime.call(this, a, b, aRow, bRow, column, dir, params); - }, - - //sort datetime - datetime: function datetime(a, b, aRow, bRow, column, dir, params) { - var format = params.format || "DD/MM/YYYY hh:mm:ss", - alignEmptyValues = params.alignEmptyValues, - emptyAlign = 0; - - if (typeof moment != "undefined") { - a = moment(a, format); - b = moment(b, format); - - if (!a.isValid()) { - emptyAlign = !b.isValid() ? 0 : -1; - } else if (!b.isValid()) { - emptyAlign = 1; - } else { - //compare valid values - return a - b; - } - - //fix empty values in position - if (alignEmptyValues === "top" && dir === "desc" || alignEmptyValues === "bottom" && dir === "asc") { - emptyAlign *= -1; - } - - return emptyAlign; - } else { - console.error("Sort Error - 'datetime' sorter is dependant on moment.js"); - } - }, - - //sort booleans - boolean: function boolean(a, b, aRow, bRow, column, dir, params) { - var el1 = a === true || a === "true" || a === "True" || a === 1 ? 1 : 0; - var el2 = b === true || b === "true" || b === "True" || b === 1 ? 1 : 0; - - return el1 - el2; - }, - - //sort if element contains any data - array: function array(a, b, aRow, bRow, column, dir, params) { - var el1 = 0; - var el2 = 0; - var type = params.type || "length"; - var alignEmptyValues = params.alignEmptyValues; - var emptyAlign = 0; - - function calc(value) { - - switch (type) { - case "length": - return value.length; - break; - - case "sum": - return value.reduce(function (c, d) { - return c + d; - }); - break; - - case "max": - return Math.max.apply(null, value); - break; - - case "min": - return Math.min.apply(null, value); - break; - - case "avg": - return value.reduce(function (c, d) { - return c + d; - }) / value.length; - break; - } - } - - //handle non array values - if (!Array.isArray(a)) { - alignEmptyValues = !Array.isArray(b) ? 0 : -1; - } else if (!Array.isArray(b)) { - alignEmptyValues = 1; - } else { - - //compare valid values - el1 = a ? calc(a) : 0; - el2 = b ? calc(b) : 0; - - return el1 - el2; - } - - //fix empty values in position - if (alignEmptyValues === "top" && dir === "desc" || alignEmptyValues === "bottom" && dir === "asc") { - emptyAlign *= -1; - } - - return emptyAlign; - }, - - //sort if element contains any data - exists: function exists(a, b, aRow, bRow, column, dir, params) { - var el1 = typeof a == "undefined" ? 0 : 1; - var el2 = typeof b == "undefined" ? 0 : 1; - - return el1 - el2; - }, - - //sort alpha numeric strings - alphanum: function alphanum(as, bs, aRow, bRow, column, dir, params) { - var a, - b, - a1, - b1, - i = 0, - L, - rx = /(\d+)|(\D+)/g, - rd = /\d/; - var alignEmptyValues = params.alignEmptyValues; - var emptyAlign = 0; - - //handle empty values - if (!as && as !== 0) { - emptyAlign = !bs && bs !== 0 ? 0 : -1; - } else if (!bs && bs !== 0) { - emptyAlign = 1; - } else { - - if (isFinite(as) && isFinite(bs)) return as - bs; - a = String(as).toLowerCase(); - b = String(bs).toLowerCase(); - if (a === b) return 0; - if (!(rd.test(a) && rd.test(b))) return a > b ? 1 : -1; - a = a.match(rx); - b = b.match(rx); - L = a.length > b.length ? b.length : a.length; - while (i < L) { - a1 = a[i]; - b1 = b[i++]; - if (a1 !== b1) { - if (isFinite(a1) && isFinite(b1)) { - if (a1.charAt(0) === "0") a1 = "." + a1; - if (b1.charAt(0) === "0") b1 = "." + b1; - return a1 - b1; - } else return a1 > b1 ? 1 : -1; - } - } - - return a.length > b.length; - } - - //fix empty values in position - if (alignEmptyValues === "top" && dir === "desc" || alignEmptyValues === "bottom" && dir === "asc") { - emptyAlign *= -1; - } - - return emptyAlign; - } - }; - - Tabulator.prototype.registerModule("sort", Sort); - - var Validate = function Validate(table) { - this.table = table; - }; - - //validate - Validate.prototype.initializeColumn = function (column) { - var self = this, - config = [], - validator; - - if (column.definition.validator) { - - if (Array.isArray(column.definition.validator)) { - column.definition.validator.forEach(function (item) { - validator = self._extractValidator(item); - - if (validator) { - config.push(validator); - } - }); - } else { - validator = this._extractValidator(column.definition.validator); - - if (validator) { - config.push(validator); - } - } - - column.modules.validate = config.length ? config : false; - } - }; - - Validate.prototype._extractValidator = function (value) { - var parts, type, params; - - switch (typeof value === 'undefined' ? 'undefined' : _typeof(value)) { - case "string": - parts = value.split(":", 2); - type = parts.shift(); - params = parts[0]; - - return this._buildValidator(type, params); - break; - - case "function": - return this._buildValidator(value); - break; - - case "object": - return this._buildValidator(value.type, value.parameters); - break; - } - }; - - Validate.prototype._buildValidator = function (type, params) { - - var func = typeof type == "function" ? type : this.validators[type]; - - if (!func) { - console.warn("Validator Setup Error - No matching validator found:", type); - return false; - } else { - return { - type: typeof type == "function" ? "function" : type, - func: func, - params: params - }; - } - }; - - Validate.prototype.validate = function (validators, cell, value) { - var self = this, - valid = []; - - if (validators) { - validators.forEach(function (item) { - if (!item.func.call(self, cell, value, item.params)) { - valid.push({ - type: item.type, - parameters: item.params - }); - } - }); - } - - return valid.length ? valid : true; - }; - - Validate.prototype.validators = { - - //is integer - integer: function integer(cell, value, parameters) { - if (value === "" || value === null || typeof value === "undefined") { - return true; - } - value = Number(value); - return typeof value === 'number' && isFinite(value) && Math.floor(value) === value; - }, - - //is float - float: function float(cell, value, parameters) { - if (value === "" || value === null || typeof value === "undefined") { - return true; - } - value = Number(value); - return typeof value === 'number' && isFinite(value) && value % 1 !== 0; - }, - - //must be a number - numeric: function numeric(cell, value, parameters) { - if (value === "" || value === null || typeof value === "undefined") { - return true; - } - return !isNaN(value); - }, - - //must be a string - string: function string(cell, value, parameters) { - if (value === "" || value === null || typeof value === "undefined") { - return true; - } - return isNaN(value); - }, - - //maximum value - max: function max(cell, value, parameters) { - if (value === "" || value === null || typeof value === "undefined") { - return true; - } - return parseFloat(value) <= parameters; - }, - - //minimum value - min: function min(cell, value, parameters) { - if (value === "" || value === null || typeof value === "undefined") { - return true; - } - return parseFloat(value) >= parameters; - }, - - //minimum string length - minLength: function minLength(cell, value, parameters) { - if (value === "" || value === null || typeof value === "undefined") { - return true; - } - return String(value).length >= parameters; - }, - - //maximum string length - maxLength: function maxLength(cell, value, parameters) { - if (value === "" || value === null || typeof value === "undefined") { - return true; - } - return String(value).length <= parameters; - }, - - //in provided value list - in: function _in(cell, value, parameters) { - if (value === "" || value === null || typeof value === "undefined") { - return true; - } - if (typeof parameters == "string") { - parameters = parameters.split("|"); - } - - return value === "" || parameters.indexOf(value) > -1; - }, - - //must match provided regex - regex: function regex(cell, value, parameters) { - if (value === "" || value === null || typeof value === "undefined") { - return true; - } - var reg = new RegExp(parameters); - - return reg.test(value); - }, - - //value must be unique in this column - unique: function unique(cell, value, parameters) { - if (value === "" || value === null || typeof value === "undefined") { - return true; - } - var unique = true; - - var cellData = cell.getData(); - var column = cell.getColumn()._getSelf(); - - this.table.rowManager.rows.forEach(function (row) { - var data = row.getData(); - - if (data !== cellData) { - if (value == column.getFieldValue(data)) { - unique = false; - } - } - }); - - return unique; - }, - - //must have a value - required: function required(cell, value, parameters) { - return value !== "" & value !== null && typeof value !== "undefined"; - } - }; - - Tabulator.prototype.registerModule("validate", Validate); - - return Tabulator; -}); \ No newline at end of file diff --git a/Gems/AssetMemoryAnalyzer/External/tabulator-master/dist/js/tabulator.min.js b/Gems/AssetMemoryAnalyzer/External/tabulator-master/dist/js/tabulator.min.js deleted file mode 100644 index 4fc653dfa1..0000000000 --- a/Gems/AssetMemoryAnalyzer/External/tabulator-master/dist/js/tabulator.min.js +++ /dev/null @@ -1,9 +0,0 @@ -/* Tabulator v4.1.2 (c) Oliver Folkerd */ -var _typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t};!function(t,e){"object"===("undefined"==typeof exports?"undefined":_typeof(exports))&&"undefined"!=typeof module?module.exports=e():"function"==typeof define&&define.amd?define(e):t.Tabulator=e()}(this,function(){"use strict";Array.prototype.findIndex||Object.defineProperty(Array.prototype,"findIndex",{value:function(t){if(null==this)throw new TypeError('"this" is null or not defined');var e=Object(this),o=e.length>>>0;if("function"!=typeof t)throw new TypeError("predicate must be a function");for(var i=arguments[1],n=0;n>>0;if("function"!=typeof t)throw new TypeError("predicate must be a function");for(var i=arguments[1],n=0;no?(e=t-o,this.element.style.marginLeft=-e+"px"):this.element.style.marginLeft=0,this.scrollLeft=t,this.table.modExists("frozenColumns")&&this.table.modules.frozenColumns.layout()},t.prototype.setColumns=function(t,e){for(var o=this;o.headersElement.firstChild;)o.headersElement.removeChild(o.headersElement.firstChild);o.columns=[],o.columnsByIndex=[],o.columnsByField=[],o.table.modExists("frozenColumns")&&o.table.modules.frozenColumns.reset(),t.forEach(function(t,e){o._addColumn(t)}),o._reIndexColumns(),o.table.options.responsiveLayout&&o.table.modExists("responsiveLayout",!0)&&o.table.modules.responsiveLayout.initialize(),o.redraw(!0)},t.prototype._addColumn=function(t,e,o){var n=new i(t,this),s=n.getElement(),r=o?this.findColumnIndex(o):o;if(o&&r>-1){var a=this.columns.indexOf(o.getTopColumn()),l=o.getElement();e?(this.columns.splice(a,0,n),l.parentNode.insertBefore(s,l)):(this.columns.splice(a+1,0,n),l.parentNode.insertBefore(s,l.nextSibling))}else e?(this.columns.unshift(n),this.headersElement.insertBefore(n.getElement(),this.headersElement.firstChild)):(this.columns.push(n),this.headersElement.appendChild(n.getElement()));return n},t.prototype.registerColumnField=function(t){t.definition.field&&(this.columnsByField[t.definition.field]=t)},t.prototype.registerColumnPosition=function(t){this.columnsByIndex.push(t)},t.prototype._reIndexColumns=function(){this.columnsByIndex=[],this.columns.forEach(function(t){t.reRegisterPosition()})},t.prototype._verticalAlignHeaders=function(){var t=this,e=0;t.columns.forEach(function(t){var o;t.clearVerticalAlign(),(o=t.getHeight())>e&&(e=o)}),t.columns.forEach(function(o){o.verticalAlign(t.table.options.columnVertAlign,e)}),t.rowManager.adjustTableSize()},t.prototype.findColumn=function(t){var e=this;if("object"!=(void 0===t?"undefined":_typeof(t)))return this.columnsByField[t]||!1;if(t instanceof i)return t;if(t instanceof o)return t._getSelf()||!1;if(t instanceof HTMLElement){return e.columns.find(function(e){return e.element===t})||!1}return!1},t.prototype.getColumnByField=function(t){return this.columnsByField[t]},t.prototype.getColumnByIndex=function(t){return this.columnsByIndex[t]},t.prototype.getColumns=function(){return this.columns},t.prototype.findColumnIndex=function(t){return this.columnsByIndex.findIndex(function(e){return t===e})},t.prototype.getRealColumns=function(){return this.columnsByIndex},t.prototype.traverse=function(t){this.columnsByIndex.forEach(function(e,o){t(e,o)})},t.prototype.getDefinitions=function(t){var e=this,o=[];return e.columnsByIndex.forEach(function(e){(!t||t&&e.visible)&&o.push(e.getDefinition())}),o},t.prototype.getDefinitionTree=function(){var t=this,e=[];return t.columns.forEach(function(t){e.push(t.getDefinition(!0))}),e},t.prototype.getComponents=function(t){var e=this,o=[];return(t?e.columns:e.columnsByIndex).forEach(function(t){o.push(t.getComponent())}),o},t.prototype.getWidth=function(){var t=0;return this.columnsByIndex.forEach(function(e){e.visible&&(t+=e.getWidth())}),t},t.prototype.moveColumn=function(t,e,o){this._moveColumnInArray(this.columns,t,e,o),this._moveColumnInArray(this.columnsByIndex,t,e,o,!0),this.table.options.responsiveLayout&&this.table.modExists("responsiveLayout",!0)&&this.table.modules.responsiveLayout.initialize(),this.table.options.columnMoved&&this.table.options.columnMoved.call(this.table,t.getComponent(),this.table.columnManager.getComponents()),this.table.options.persistentLayout&&this.table.modExists("persistence",!0)&&this.table.modules.persistence.save("columns")},t.prototype._moveColumnInArray=function(t,e,o,i,n){var s,r=t.indexOf(e);r>-1&&(t.splice(r,1),s=t.indexOf(o),s>-1?i&&(s+=1):s=r,t.splice(s,0,e),n&&this.table.rowManager.rows.forEach(function(t){if(t.cells.length){var e=t.cells.splice(r,1)[0];t.cells.splice(s,0,e)}}))},t.prototype.scrollToColumn=function(t,e,o){var i=this,n=0,s=0,r=0,a=t.getElement();return new Promise(function(l,u){if(void 0===e&&(e=i.table.options.scrollToColumnPosition),void 0===o&&(o=i.table.options.scrollToColumnIfVisible),t.visible){switch(e){case"middle":case"center":r=-i.element.clientWidth/2;break;case"right":r=a.clientWidth-i.headersElement.clientWidth}if(!o&&(s=a.offsetLeft)>0&&s+a.offsetWidtht.rowManager.element.clientHeight&&(e-=t.rowManager.element.offsetWidth-t.rowManager.element.clientWidth),this.columnsByIndex.forEach(function(i){var n,s,r;i.visible&&(n=i.definition.width||0,s=void 0===i.minWidth?t.table.options.columnMinWidth:parseInt(i.minWidth),r="string"==typeof n?n.indexOf("%")>-1?e/100*parseInt(n):parseInt(n):n,o+=r>s?r:s)}),o},t.prototype.addColumn=function(t,e,o){var i=this._addColumn(t,e,o);this._reIndexColumns(),this.table.options.responsiveLayout&&this.table.modExists("responsiveLayout",!0)&&this.table.modules.responsiveLayout.initialize(),this.table.modExists("columnCalcs")&&this.table.modules.columnCalcs.recalc(this.table.rowManager.activeRows),this.redraw(),"fitColumns"!=this.table.modules.layout.getMode()&&i.reinitializeWidth(),this._verticalAlignHeaders(),this.table.rowManager.reinitialize()},t.prototype.deregisterColumn=function(t){var e,o=t.getField();o&&delete this.columnsByField[o],e=this.columnsByIndex.indexOf(t),e>-1&&this.columnsByIndex.splice(e,1),e=this.columns.indexOf(t),e>-1&&this.columns.splice(e,1),this.table.options.responsiveLayout&&this.table.modExists("responsiveLayout",!0)&&this.table.modules.responsiveLayout.initialize(),this.redraw()},t.prototype.redraw=function(t){t&&(c.prototype.helpers.elVisible(this.element)&&this._verticalAlignHeaders(),this.table.rowManager.resetScroll(),this.table.rowManager.reinitialize()),"fitColumns"==this.table.modules.layout.getMode()?this.table.modules.layout.layout():t?this.table.modules.layout.layout():this.table.options.responsiveLayout&&this.table.modExists("responsiveLayout",!0)&&this.table.modules.responsiveLayout.update(),this.table.modExists("frozenColumns")&&this.table.modules.frozenColumns.layout(),this.table.modExists("columnCalcs")&&this.table.modules.columnCalcs.recalc(this.table.rowManager.activeRows),t&&(this.table.options.persistentLayout&&this.table.modExists("persistence",!0)&&this.table.modules.persistence.save("columns"),this.table.modExists("columnCalcs")&&this.table.modules.columnCalcs.redraw()),this.table.footerManager.redraw()};var o=function(t){this._column=t,this.type="ColumnComponent"};o.prototype.getElement=function(){return this._column.getElement()},o.prototype.getDefinition=function(){return this._column.getDefinition()},o.prototype.getField=function(){return this._column.getField()},o.prototype.getCells=function(){var t=[];return this._column.cells.forEach(function(e){t.push(e.getComponent())}),t},o.prototype.getVisibility=function(){return this._column.visible},o.prototype.show=function(){this._column.isGroup?this._column.columns.forEach(function(t){t.show()}):this._column.show()},o.prototype.hide=function(){this._column.isGroup?this._column.columns.forEach(function(t){t.hide()}):this._column.hide()},o.prototype.toggle=function(){this._column.visible?this.hide():this.show()},o.prototype.delete=function(){this._column.delete()},o.prototype.getSubColumns=function(){var t=[];return this._column.columns.length&&this._column.columns.forEach(function(e){t.push(e.getComponent())}),t},o.prototype.getParentColumn=function(){return this._column.parent instanceof i&&this._column.parent.getComponent()},o.prototype._getSelf=function(){return this._column},o.prototype.scrollTo=function(){return this._column.table.columnManager.scrollToColumn(this._column)},o.prototype.getTable=function(){return this._column.table},o.prototype.headerFilterFocus=function(){this._column.table.modExists("filter",!0)&&this._column.table.modules.filter.setHeaderFilterFocus(this._column)},o.prototype.reloadHeaderFilter=function(){this._column.table.modExists("filter",!0)&&this._column.table.modules.filter.reloadHeaderFilter(this._column)},o.prototype.setHeaderFilterValue=function(t){this._column.table.modExists("filter",!0)&&this._column.table.modules.filter.setHeaderFilterValue(this._column,t)};var i=function t(e,o){var i=this;this.table=o.table,this.definition=e,this.parent=o,this.type="column",this.columns=[],this.cells=[],this.element=this.createElement(),this.contentElement=!1,this.groupElement=this.createGroupElement(),this.isGroup=!1,this.tooltip=!1,this.hozAlign="",this.field="",this.fieldStructure="",this.getFieldValue="",this.setFieldValue="",this.setField(this.definition.field),this.modules={},this.cellEvents={cellClick:!1,cellDblClick:!1,cellContext:!1,cellTap:!1,cellDblTap:!1,cellTapHold:!1},this.width=null,this.minWidth=null,this.widthFixed=!1,this.visible=!0,e.columns?(this.isGroup=!0,e.columns.forEach(function(e,o){var n=new t(e,i);i.attachColumn(n)}),i.checkColumnVisibility()):o.registerColumnField(this),e.rowHandle&&!1!==this.table.options.movableRows&&this.table.modExists("moveRow")&&this.table.modules.moveRow.setHandle(!0),this._buildHeader()};i.prototype.createElement=function(){var t=document.createElement("div");return t.classList.add("tabulator-col"),t.setAttribute("role","columnheader"),t.setAttribute("aria-sort","none"),t},i.prototype.createGroupElement=function(){var t=document.createElement("div");return t.classList.add("tabulator-col-group-cols"),t},i.prototype.setField=function(t){this.field=t,this.fieldStructure=t?this.table.options.nestedFieldSeparator?t.split(this.table.options.nestedFieldSeparator):[t]:[],this.getFieldValue=this.fieldStructure.length>1?this._getNestedData:this._getFlatData,this.setFieldValue=this.fieldStructure.length>1?this._setNesteData:this._setFlatData},i.prototype.registerColumnPosition=function(t){this.parent.registerColumnPosition(t)},i.prototype.registerColumnField=function(t){this.parent.registerColumnField(t)},i.prototype.reRegisterPosition=function(){this.isGroup?this.columns.forEach(function(t){t.reRegisterPosition()}):this.registerColumnPosition(this)},i.prototype.setTooltip=function(){var t=this,e=t.definition,o=e.headerTooltip||!1===e.tooltip?e.headerTooltip:t.table.options.tooltipsHeader;o?!0===o?e.field?t.table.modules.localize.bind("columns|"+e.field,function(o){t.element.setAttribute("title",o||e.title)}):t.element.setAttribute("title",e.title):("function"==typeof o&&!1===(o=o(t.getComponent()))&&(o=""),t.element.setAttribute("title",o)):t.element.setAttribute("title","")},i.prototype._buildHeader=function(){for(var t=this,e=t.definition;t.element.firstChild;)t.element.removeChild(t.element.firstChild);e.headerVertical&&(t.element.classList.add("tabulator-col-vertical"),"flip"===e.headerVertical&&t.element.classList.add("tabulator-col-vertical-flip")),t.contentElement=t._bindEvents(),t.contentElement=t._buildColumnHeaderContent(),t.element.appendChild(t.contentElement),t.isGroup?t._buildGroupHeader():t._buildColumnHeader(),t.setTooltip(),t.table.options.resizableColumns&&t.table.modExists("resizeColumns")&&t.table.modules.resizeColumns.initializeColumn("header",t,t.element),e.headerFilter&&t.table.modExists("filter")&&t.table.modExists("edit")&&(void 0!==e.headerFilterPlaceholder&&e.field&&t.table.modules.localize.setHeaderFilterColumnPlaceholder(e.field,e.headerFilterPlaceholder),t.table.modules.filter.initializeColumn(t)),t.table.modExists("frozenColumns")&&t.table.modules.frozenColumns.initializeColumn(t),t.table.options.movableColumns&&!t.isGroup&&t.table.modExists("moveColumn")&&t.table.modules.moveColumn.initializeColumn(t),(e.topCalc||e.bottomCalc)&&t.table.modExists("columnCalcs")&&t.table.modules.columnCalcs.initializeColumn(t),t.element.addEventListener("mouseenter",function(e){t.setTooltip()})},i.prototype._bindEvents=function(){var t,e,o,i=this,n=i.definition;"function"==typeof n.headerClick&&i.element.addEventListener("click",function(t){n.headerClick(t,i.getComponent())}),"function"==typeof n.headerDblClick&&i.element.addEventListener("dblclick",function(t){n.headerDblClick(t,i.getComponent())}),"function"==typeof n.headerContext&&i.element.addEventListener("contextmenu",function(t){n.headerContext(t,i.getComponent())}),"function"==typeof n.headerTap&&(o=!1,i.element.addEventListener("touchstart",function(t){o=!0}),i.element.addEventListener("touchend",function(t){o&&n.headerTap(t,i.getComponent()),o=!1})),"function"==typeof n.headerDblTap&&(t=null,i.element.addEventListener("touchend",function(e){t?(clearTimeout(t),t=null,n.headerDblTap(e,i.getComponent())):t=setTimeout(function(){clearTimeout(t),t=null},300)})),"function"==typeof n.headerTapHold&&(e=null,i.element.addEventListener("touchstart",function(t){clearTimeout(e),e=setTimeout(function(){clearTimeout(e),e=null,o=!1,n.headerTapHold(t,i.getComponent())},1e3)}),i.element.addEventListener("touchend",function(t){clearTimeout(e),e=null})),"function"==typeof n.cellClick&&(i.cellEvents.cellClick=n.cellClick),"function"==typeof n.cellDblClick&&(i.cellEvents.cellDblClick=n.cellDblClick),"function"==typeof n.cellContext&&(i.cellEvents.cellContext=n.cellContext),"function"==typeof n.cellTap&&(i.cellEvents.cellTap=n.cellTap),"function"==typeof n.cellDblTap&&(i.cellEvents.cellDblTap=n.cellDblTap),"function"==typeof n.cellTapHold&&(i.cellEvents.cellTapHold=n.cellTapHold),"function"==typeof n.cellEdited&&(i.cellEvents.cellEdited=n.cellEdited),"function"==typeof n.cellEditing&&(i.cellEvents.cellEditing=n.cellEditing),"function"==typeof n.cellEditCancelled&&(i.cellEvents.cellEditCancelled=n.cellEditCancelled)},i.prototype._buildColumnHeader=function(){var t=this,e=t.definition,o=t.table;o.modExists("sort")&&o.modules.sort.initializeColumn(t,t.contentElement),o.modExists("format")&&o.modules.format.initializeColumn(t),void 0!==e.editor&&o.modExists("edit")&&o.modules.edit.initializeColumn(t),void 0!==e.validator&&o.modExists("validate")&&o.modules.validate.initializeColumn(t),o.modExists("mutator")&&o.modules.mutator.initializeColumn(t),o.modExists("accessor")&&o.modules.accessor.initializeColumn(t),_typeof(o.options.responsiveLayout)&&o.modExists("responsiveLayout")&&o.modules.responsiveLayout.initializeColumn(t),void 0!==e.visible&&(e.visible?t.show(!0):t.hide(!0)),e.cssClass&&t.element.classList.add(e.cssClass),e.field&&this.element.setAttribute("tabulator-field",e.field),t.setMinWidth(void 0===e.minWidth?t.table.options.columnMinWidth:e.minWidth),t.reinitializeWidth(),t.tooltip=t.definition.tooltip||!1===t.definition.tooltip?t.definition.tooltip:t.table.options.tooltips,t.hozAlign=void 0===t.definition.align?"":t.definition.align},i.prototype._buildColumnHeaderContent=function(){var t=this,e=(t.definition,t.table,document.createElement("div"));return e.classList.add("tabulator-col-content"),e.appendChild(t._buildColumnHeaderTitle()),e},i.prototype._buildColumnHeaderTitle=function(){var t=this,e=t.definition,o=t.table,i=document.createElement("div");if(i.classList.add("tabulator-col-title"),e.editableTitle){var n=document.createElement("input");n.classList.add("tabulator-title-editor"),n.addEventListener("click",function(t){t.stopPropagation(),n.focus()}),n.addEventListener("change",function(){e.title=n.value,o.options.columnTitleChanged.call(t.table,t.getComponent())}),i.appendChild(n),e.field?o.modules.localize.bind("columns|"+e.field,function(t){n.value=t||e.title||" "}):n.value=e.title||" "}else e.field?o.modules.localize.bind("columns|"+e.field,function(o){t._formatColumnHeaderTitle(i,o||e.title||" ")}):t._formatColumnHeaderTitle(i,e.title||" ");return i},i.prototype._formatColumnHeaderTitle=function(t,e){var o,i,n,s;if(this.definition.titleFormatter&&this.table.modExists("format"))switch(o=this.table.modules.format.getFormatter(this.definition.titleFormatter),s={getValue:function(){return e},getElement:function(){return t}},n=this.definition.titleFormatterParams||{},n="function"==typeof n?n():n,i=o.call(this.table.modules.format,s,n),void 0===i?"undefined":_typeof(i)){case"object":i instanceof Node?this.element.appendChild(i):(this.element.innerHTML="",console.warn("Format Error - Title formatter has returned a type of object, the only valid formatter object return is an instance of Node, the formatter returned:",i));break;case"undefined":case"null":this.element.innerHTML="";break;default:this.element.innerHTML=i}else t.innerHTML=e},i.prototype._buildGroupHeader=function(){this.element.classList.add("tabulator-col-group"),this.element.setAttribute("role","columngroup"),this.element.setAttribute("aria-title",this.definition.title),this.element.appendChild(this.groupElement)},i.prototype._getFlatData=function(t){return t[this.field]},i.prototype._getNestedData=function(t){for(var e,o=t,i=this.fieldStructure,n=i.length,s=0;se&&(e=o)}),e&&t.setWidthActual(e+1))},i.prototype.deleteCell=function(t){var e=this.cells.indexOf(t);e>-1&&this.cells.splice(e,1)},i.prototype.getComponent=function(){return new o(this)};var n=function(t){this.table=t,this.element=this.createHolderElement(),this.tableElement=this.createTableElement(),this.columnManager=null,this.height=0,this.firstRender=!1,this.renderMode="classic",this.rows=[],this.activeRows=[],this.activeRowsCount=0,this.displayRows=[],this.displayRowsCount=0,this.scrollTop=0,this.scrollLeft=0,this.vDomRowHeight=20,this.vDomTop=0,this.vDomBottom=0,this.vDomScrollPosTop=0,this.vDomScrollPosBottom=0,this.vDomTopPad=0,this.vDomBottomPad=0,this.vDomMaxRenderChain=90,this.vDomWindowBuffer=0,this.vDomWindowMinTotalRows=20,this.vDomWindowMinMarginRows=5,this.vDomTopNewRows=[],this.vDomBottomNewRows=[]};n.prototype.createHolderElement=function(){var t=document.createElement("div");return t.classList.add("tabulator-tableHolder"),t.setAttribute("tabindex",0),t},n.prototype.createTableElement=function(){var t=document.createElement("div");return t.classList.add("tabulator-table"),t},n.prototype.getElement=function(){return this.element},n.prototype.getTableElement=function(){return this.tableElement},n.prototype.getRowPosition=function(t,e){return e?this.activeRows.indexOf(t):this.rows.indexOf(t)},n.prototype.setColumnManager=function(t){this.columnManager=t},n.prototype.initialize=function(){var t=this;t.setRenderMode(),t.element.appendChild(t.tableElement),t.firstRender=!0,t.element.addEventListener("scroll",function(){var e=t.element.scrollLeft;t.scrollLeft!=e&&(t.columnManager.scrollHorizontal(e),t.table.options.groupBy&&t.table.modules.groupRows.scrollHeaders(e),t.table.modExists("columnCalcs")&&t.table.modules.columnCalcs.scrollHorizontal(e)),t.scrollLeft=e}),"virtual"===this.renderMode&&t.element.addEventListener("scroll",function(){var e=t.element.scrollTop,o=t.scrollTop>e;t.scrollTop!=e?(t.scrollTop=e,t.scrollVertical(o),"scroll"==t.table.options.ajaxProgressiveLoad&&t.table.modules.ajax.nextPage(t.element.scrollHeight-t.element.clientHeight-e)):t.scrollTop=e})},n.prototype.findRow=function(t){var e=this;if("object"!=(void 0===t?"undefined":_typeof(t))){if(void 0===t||null===t)return!1;return e.rows.find(function(o){return o.data[e.table.options.index]==t})||!1}if(t instanceof r)return t;if(t instanceof s)return t._getSelf()||!1;if(t instanceof HTMLElement){return e.rows.find(function(e){return e.element===t})||!1}return!1},n.prototype.getRowFromPosition=function(t,e){return e?this.activeRows[t]:this.rows[t]},n.prototype.scrollToRow=function(t,e,o){var i,n=this,s=this.getDisplayRows().indexOf(t),r=t.getElement(),a=0;return new Promise(function(t,l){if(s>-1){if(void 0===e&&(e=n.table.options.scrollToRowPosition),void 0===o&&(o=n.table.options.scrollToRowIfVisible),"nearest"===e)switch(n.renderMode){case"classic":i=c.prototype.helpers.elOffset(r).top,e=Math.abs(n.element.scrollTop-i)>Math.abs(n.element.scrollTop+n.element.clientHeight-i)?"bottom":"top";break;case"virtual":e=Math.abs(n.vDomTop-s)>Math.abs(n.vDomBottom-s)?"bottom":"top"}if(!o&&c.prototype.helpers.elVisible(r)&&(a=c.prototype.helpers.elOffset(r).top-c.prototype.helpers.elOffset(n.element).top)>0&&a-1&&this.activeRows.splice(o,1),e>-1&&this.rows.splice(e,1),this.setActiveRows(this.activeRows),this.displayRowIterator(function(e){var o=e.indexOf(t);o>-1&&e.splice(o,1)}),this.reRenderInPosition(),this.table.options.rowDeleted.call(this.table,t.getComponent()),this.table.options.dataEdited.call(this.table,this.getData()),this.table.options.groupBy&&this.table.modExists("groupRows")?this.table.modules.groupRows.updateGroupRows(!0):this.table.options.pagination&&this.table.modExists("page")?this.refreshActiveData(!1,!1,!0):this.table.options.pagination&&this.table.modExists("page")&&this.refreshActiveData("page")},n.prototype.addRow=function(t,e,o,i){var n=this.addRowActual(t,e,o,i);return this.table.options.history&&this.table.modExists("history")&&this.table.modules.history.action("rowAdd",n,{data:t,pos:e,index:o}),n},n.prototype.addRows=function(t,e,o){var i=this,n=this,s=0,r=[];return new Promise(function(a,l){e=i.findAddRowPos(e),Array.isArray(t)||(t=[t]),s=t.length-1,(void 0===o&&e||void 0!==o&&!e)&&t.reverse(),t.forEach(function(t,i){var s=n.addRow(t,e,o,!0);r.push(s)}),i.table.options.groupBy&&i.table.modExists("groupRows")?i.table.modules.groupRows.updateGroupRows(!0):i.table.options.pagination&&i.table.modExists("page")?i.refreshActiveData(!1,!1,!0):i.reRenderInPosition(),i.table.modExists("columnCalcs")&&i.table.modules.columnCalcs.recalc(i.table.rowManager.activeRows),a(r)})},n.prototype.findAddRowPos=function(t){return void 0===t&&(t=this.table.options.addRowPos),"pos"===t&&(t=!0),"bottom"===t&&(t=!1),t},n.prototype.addRowActual=function(t,e,o,i){var n,s=t instanceof r?t:new r(t||{},this),a=this.findAddRowPos(e);if(!o&&this.table.options.pagination&&"page"==this.table.options.paginationAddRow&&(n=this.getDisplayRows(),a?n.length?o=n[0]:this.activeRows.length&&(o=this.activeRows[this.activeRows.length-1],a=!1):n.length&&(o=n[n.length-1],a=!(n.length1&&(!o||o&&-1==l.indexOf(o)?a?l[0]!==s&&(o=l[0],this._moveRowInArray(s.getGroup().rows,s,o,a)):l[l.length-1]!==s&&(o=l[l.length-1], -this._moveRowInArray(s.getGroup().rows,s,o,a)):this._moveRowInArray(s.getGroup().rows,s,o,a))}if(o){var u=this.rows.indexOf(o),c=this.activeRows.indexOf(o);this.displayRowIterator(function(t){var e=t.indexOf(o);e>-1&&t.splice(a?e:e+1,0,s)}),c>-1&&this.activeRows.splice(a?c:c+1,0,s),u>-1&&this.rows.splice(a?u:u+1,0,s)}else a?(this.displayRowIterator(function(t){t.unshift(s)}),this.activeRows.unshift(s),this.rows.unshift(s)):(this.displayRowIterator(function(t){t.push(s)}),this.activeRows.push(s),this.rows.push(s));return this.setActiveRows(this.activeRows),this.table.options.rowAdded.call(this.table,s.getComponent()),this.table.options.dataEdited.call(this.table,this.getData()),i||this.reRenderInPosition(),s},n.prototype.moveRow=function(t,e,o){this.table.options.history&&this.table.modExists("history")&&this.table.modules.history.action("rowMove",t,{pos:this.getRowPosition(t),to:e,after:o}),this.moveRowActual(t,e,o),this.table.options.rowMoved.call(this.table,t.getComponent())},n.prototype.moveRowActual=function(t,e,o){var i=this;if(this._moveRowInArray(this.rows,t,e,o),this._moveRowInArray(this.activeRows,t,e,o),this.displayRowIterator(function(n){i._moveRowInArray(n,t,e,o)}),this.table.options.groupBy&&this.table.modExists("groupRows")){var n=e.getGroup(),s=t.getGroup();n===s?this._moveRowInArray(n.rows,t,e,o):(s&&s.removeRow(t),n.insertRow(t,e,o))}},n.prototype._moveRowInArray=function(t,e,o,i){var n,s,r,a;if(e!==o&&(n=t.indexOf(e),n>-1&&(t.splice(n,1),s=t.indexOf(o),s>-1?i?t.splice(s+1,0,e):t.splice(s,0,e):t.splice(n,0,e)),t===this.getDisplayRows())){r=nn?s:n+1;for(var l=r;l<=a;l++)t[l]&&this.styleRow(t[l],l)}},n.prototype.clearData=function(){this.setData([])},n.prototype.getRowIndex=function(t){return this.findRowIndex(t,this.rows)},n.prototype.getDisplayRowIndex=function(t){var e=this.getDisplayRows().indexOf(t);return e>-1&&e},n.prototype.nextDisplayRow=function(t,e){var o=this.getDisplayRowIndex(t),i=!1;return!1!==o&&o-1)&&o},n.prototype.getData=function(t,e){var o=this,i=[];return(t?o.activeRows:o.rows).forEach(function(t){i.push(t.getData(e||"data"))}),i},n.prototype.getHtml=function(t){var e=this.getData(t),o=[],i="",n="";return this.table.columnManager.getColumns().forEach(function(t){var e=t.getDefinition();t.visible&&!e.hideInHtml&&(i+=""+(e.title||"")+"",o.push(t))}),e.forEach(function(t){var e="";o.forEach(function(o){var i=o.getFieldValue(t);void 0!==i&&null!==i||(i=":"),e+=""+i+""}),n+=""+e+""}),"\n\n\t\t\t\n\n\t\t\t"+i+"\n\n\t\t\t\n\n\t\t\t"+n+"\n\n\t\t\t
"},n.prototype.getComponents=function(t){var e=this,o=[];return(t?e.activeRows:e.rows).forEach(function(t){o.push(t.getComponent())}),o},n.prototype.getDataCount=function(t){return t?this.rows.length:this.activeRows.length},n.prototype._genRemoteRequest=function(){var t=this,e=t.table,o=e.options,i={};if(e.modExists("page")){if(o.ajaxSorting){var n=t.table.modules.sort.getSort();n.forEach(function(t){delete t.column}),i[t.table.modules.page.paginationDataSentNames.sorters]=n}if(o.ajaxFiltering){var s=t.table.modules.filter.getFilters(!0,!0);i[t.table.modules.page.paginationDataSentNames.filters]=s}t.table.modules.ajax.setParams(i,!0)}e.modules.ajax.sendRequest().then(function(e){t.setData(e)}).catch(function(t){})},n.prototype.filterRefresh=function(){var t=this.table,e=t.options,o=this.scrollLeft;e.ajaxFiltering?"remote"==e.pagination&&t.modExists("page")?(t.modules.page.reset(!0),t.modules.page.setPage(1)):e.ajaxProgressiveLoad?t.modules.ajax.loadData():this._genRemoteRequest():this.refreshActiveData("filter"),this.scrollHorizontal(o)},n.prototype.sorterRefresh=function(){var t=this.table,e=this.table.options,o=this.scrollLeft;e.ajaxSorting?("remote"==e.pagination||e.progressiveLoad)&&t.modExists("page")?(t.modules.page.reset(!0),t.modules.page.setPage(1)):e.ajaxProgressiveLoad?t.modules.ajax.loadData():this._genRemoteRequest():this.refreshActiveData("sort"),this.scrollHorizontal(o)},n.prototype.scrollHorizontal=function(t){this.scrollLeft=t,this.element.scrollLeft=t,this.table.options.groupBy&&this.table.modules.groupRows.scrollHeaders(t),this.table.modExists("columnCalcs")&&this.table.modules.columnCalcs.scrollHorizontal(t)},n.prototype.refreshActiveData=function(t,e,o){var i,n=this,s=this.table;switch(t||(t="all"),s.options.selectable&&!s.options.selectablePersistence&&s.modExists("selectRow")&&s.modules.selectRow.deselectRows(),t){case"all":case"filter":e?e=!1:s.modExists("filter")?n.setActiveRows(s.modules.filter.filter(n.rows)):n.setActiveRows(n.rows.slice(0));case"sort":e?e=!1:s.modExists("sort")&&s.modules.sort.sort();case"display":this.resetDisplayRows();case"freeze":e?e=!1:this.table.modExists("frozenRows")&&s.modules.frozenRows.isFrozen()&&(s.modules.frozenRows.getDisplayIndex()||s.modules.frozenRows.setDisplayIndex(this.getNextDisplayIndex()),i=s.modules.frozenRows.getDisplayIndex(),!0!==(i=n.setDisplayRows(s.modules.frozenRows.getRows(this.getDisplayRows(i-1)),i))&&s.modules.frozenRows.setDisplayIndex(i));case"group":e?e=!1:s.options.groupBy&&s.modExists("groupRows")&&(s.modules.groupRows.getDisplayIndex()||s.modules.groupRows.setDisplayIndex(this.getNextDisplayIndex()),i=s.modules.groupRows.getDisplayIndex(),!0!==(i=n.setDisplayRows(s.modules.groupRows.getRows(this.getDisplayRows(i-1)),i))&&s.modules.groupRows.setDisplayIndex(i));case"tree":e?e=!1:s.options.dataTree&&s.modExists("dataTree")&&(s.modules.dataTree.getDisplayIndex()||s.modules.dataTree.setDisplayIndex(this.getNextDisplayIndex()),i=s.modules.dataTree.getDisplayIndex(),!0!==(i=n.setDisplayRows(s.modules.dataTree.getRows(this.getDisplayRows(i-1)),i))&&s.modules.dataTree.setDisplayIndex(i)),s.options.pagination&&s.modExists("page")&&!o&&"local"==s.modules.page.getMode()&&s.modules.page.reset();case"page":e?e=!1:s.options.pagination&&s.modExists("page")&&(s.modules.page.getDisplayIndex()||s.modules.page.setDisplayIndex(this.getNextDisplayIndex()),i=s.modules.page.getDisplayIndex(),"local"==s.modules.page.getMode()&&s.modules.page.setMaxRows(this.getDisplayRows(i-1).length),!0!==(i=n.setDisplayRows(s.modules.page.getRows(this.getDisplayRows(i-1)),i))&&s.modules.page.setDisplayIndex(i))}c.prototype.helpers.elVisible(n.element)&&(o?n.reRenderInPosition():(n.renderTable(),s.options.layoutColumnsOnNewData&&n.table.columnManager.redraw(!0))),s.modExists("columnCalcs")&&s.modules.columnCalcs.recalc(this.activeRows)},n.prototype.setActiveRows=function(t){this.activeRows=t,this.activeRowsCount=this.activeRows.length},n.prototype.resetDisplayRows=function(){this.displayRows=[],this.displayRows.push(this.activeRows.slice(0)),this.displayRowsCount=this.displayRows[0].length,this.table.modExists("frozenRows")&&this.table.modules.frozenRows.setDisplayIndex(0),this.table.options.groupBy&&this.table.modExists("groupRows")&&this.table.modules.groupRows.setDisplayIndex(0),this.table.options.pagination&&this.table.modExists("page")&&this.table.modules.page.setDisplayIndex(0)},n.prototype.getNextDisplayIndex=function(){return this.displayRows.length},n.prototype.setDisplayRows=function(t,e){var o=!0;return e&&void 0!==this.displayRows[e]?(this.displayRows[e]=t,o=!0):(this.displayRows.push(t),o=e=this.displayRows.length-1),e==this.displayRows.length-1&&(this.displayRowsCount=this.displayRows[this.displayRows.length-1].length),o},n.prototype.getDisplayRows=function(t){return void 0===t?this.displayRows.length?this.displayRows[this.displayRows.length-1]:[]:this.displayRows[t]||[]},n.prototype.displayRowIterator=function(t){this.displayRows.forEach(t),this.displayRowsCount=this.displayRows[this.displayRows.length-1].length},n.prototype.getRows=function(){return this.rows},n.prototype.reRenderInPosition=function(t){if("virtual"==this.getRenderMode()){for(var e=this.element.scrollTop,o=!1,i=!1,n=this.scrollLeft,s=this.getDisplayRows(),r=this.vDomTop;r<=this.vDomBottom;r++)if(s[r]){var a=e-s[r].getElement().offsetTop;if(!(!1===i||Math.abs(a)this.element.clientWidth?this.element.offsetHeight-this.element.clientHeight:0)),this.scrollTop=Math.min(this.scrollTop,this.element.scrollHeight-this.height),this.element.scrollWidth>this.element.offsetWidth&&(this.scrollTop+=this.element.offsetHeight-this.element.clientHeight),this.vDomScrollPosTop=this.scrollTop,this.vDomScrollPosBottom=this.scrollTop,s.scrollTop=this.scrollTop,n.style.minWidth=d?i.table.columnManager.getWidth()+"px":"",i.table.options.groupBy&&"fitDataFill"!=i.table.modules.layout.getMode()&&i.displayRowsCount==i.table.modules.groupRows.countGroups()&&(i.tableElement.style.minWidth=i.table.columnManager.getWidth())}else this.renderEmptyScroll()},n.prototype.scrollVertical=function(t){var e=this.scrollTop-this.vDomScrollPosTop,o=this.scrollTop-this.vDomScrollPosBottom,i=2*this.vDomWindowBuffer;if(-e>i||o>i){var n=this.scrollLeft;this._virtualRenderFill(Math.floor(this.element.scrollTop/this.element.scrollHeight*this.displayRowsCount)),this.scrollHorizontal(n)}else t?(e<0&&this._addTopRow(-e),e<0&&this.vDomScrollHeight-this.scrollTop>this.vDomWindowBuffer&&this._removeBottomRow(-o)):(e>=0&&this.scrollTop>this.vDomWindowBuffer&&this._removeTopRow(e),o>=0&&this._addBottomRow(o))},n.prototype._addTopRow=function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,o=this.tableElement,i=this.getDisplayRows();if(this.vDomTop){var n=this.vDomTop-1,s=i[n],r=s.getHeight()||this.vDomRowHeight;t>=r&&(this.styleRow(s,n),o.insertBefore(s.getElement(),o.firstChild),s.initialized&&s.heightInitialized||(this.vDomTopNewRows.push(s),s.heightInitialized||s.clearCellHeight()),s.initialize(),this.vDomTopPad-=r,this.vDomTopPad<0&&(this.vDomTopPad=n*this.vDomRowHeight),n||(this.vDomTopPad=0),o.style.paddingTop=this.vDomTopPad+"px",this.vDomScrollPosTop-=r,this.vDomTop--),t=-(this.scrollTop-this.vDomScrollPosTop),e=(i[this.vDomTop-1].getHeight()||this.vDomRowHeight)?this._addTopRow(t,e+1):this._quickNormalizeRowHeight(this.vDomTopNewRows)}},n.prototype._removeTopRow=function(t){var e=this.tableElement,o=this.getDisplayRows()[this.vDomTop],i=o.getHeight()||this.vDomRowHeight;if(t>=i){var n=o.getElement();n.parentNode.removeChild(n),this.vDomTopPad+=i,e.style.paddingTop=this.vDomTopPad+"px",this.vDomScrollPosTop+=this.vDomTop?i:i+this.vDomWindowBuffer,this.vDomTop++,t=this.scrollTop-this.vDomScrollPosTop,this._removeTopRow(t)}},n.prototype._addBottomRow=function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,o=this.tableElement,i=this.getDisplayRows();if(this.vDomBottom=r&&(this.styleRow(s,n),o.appendChild(s.getElement()),s.initialized&&s.heightInitialized||(this.vDomBottomNewRows.push(s),s.heightInitialized||s.clearCellHeight()),s.initialize(),this.vDomBottomPad-=r,(this.vDomBottomPad<0||n==this.displayRowsCount-1)&&(this.vDomBottomPad=0),o.style.paddingBottom=this.vDomBottomPad+"px",this.vDomScrollPosBottom+=r,this.vDomBottom++),t=this.scrollTop-this.vDomScrollPosBottom,e=(i[this.vDomBottom+1].getHeight()||this.vDomRowHeight)?this._addBottomRow(t,e+1):this._quickNormalizeRowHeight(this.vDomBottomNewRows)}},n.prototype._removeBottomRow=function(t){var e=this.tableElement,o=this.getDisplayRows()[this.vDomBottom],i=o.getHeight()||this.vDomRowHeight;if(t>=i){var n=o.getElement();n.parentNode&&n.parentNode.removeChild(n),this.vDomBottomPad+=i,this.vDomBottomPad<0&&(this.vDomBottomPad=0),e.style.paddingBottom=this.vDomBottomPad+"px",this.vDomScrollPosBottom-=i,this.vDomBottom--,t=-(this.scrollTop-this.vDomScrollPosBottom),this._removeBottomRow(t)}},n.prototype._quickNormalizeRowHeight=function(t){t.forEach(function(t){t.calcHeight()}),t.forEach(function(t){t.setCellHeight()}),t.length=0},n.prototype.normalizeHeight=function(){this.activeRows.forEach(function(t){t.normalizeHeight()})},n.prototype.adjustTableSize=function(){if("virtual"===this.renderMode){this.height=this.element.clientHeight,this.vDomWindowBuffer=this.table.options.virtualDomBuffer||this.height;var t=this.columnManager.getElement().offsetHeight+(this.table.footerManager&&!this.table.footerManager.external?this.table.footerManager.getElement().offsetHeight:0);this.element.style.minHeight="calc(100% - "+t+"px)",this.element.style.height="calc(100% - "+t+"px)",this.element.style.maxHeight="calc(100% - "+t+"px)"}},n.prototype.reinitialize=function(){this.rows.forEach(function(t){t.reinitialize()})},n.prototype.redraw=function(t){var e=this.scrollLeft;this.adjustTableSize(),t?this.renderTable():("classic"==self.renderMode?self.table.options.groupBy?self.refreshActiveData("group",!1,!1):this._simpleRender():(this.reRenderInPosition(),this.scrollHorizontal(e)),this.displayRowsCount||this.table.options.placeholder&&this.getElement().appendChild(this.table.options.placeholder))},n.prototype.resetScroll=function(){if(this.element.scrollLeft=0,this.element.scrollTop=0,"ie"===this.table.browser){var t=document.createEvent("Event");t.initEvent("scroll",!1,!0),this.element.dispatchEvent(t)}else this.element.dispatchEvent(new Event("scroll"))};var s=function(t){this._row=t};s.prototype.getData=function(t){return this._row.getData(t)},s.prototype.getElement=function(){return this._row.getElement()},s.prototype.getCells=function(){var t=[];return this._row.getCells().forEach(function(e){t.push(e.getComponent())}),t},s.prototype.getCell=function(t){var e=this._row.getCell(t);return!!e&&e.getComponent()},s.prototype.getIndex=function(){return this._row.getData("data")[this._row.table.options.index]},s.prototype.getPosition=function(t){return this._row.table.rowManager.getRowPosition(this._row,t)},s.prototype.delete=function(){return this._row.delete()},s.prototype.scrollTo=function(){return this._row.table.rowManager.scrollToRow(this._row)},s.prototype.update=function(t){return this._row.updateData(t)},s.prototype.normalizeHeight=function(){this._row.normalizeHeight(!0)},s.prototype.select=function(){this._row.table.modules.selectRow.selectRows(this._row)},s.prototype.deselect=function(){this._row.table.modules.selectRow.deselectRows(this._row)},s.prototype.toggleSelect=function(){this._row.table.modules.selectRow.toggleRow(this._row)},s.prototype.isSelected=function(){return this._row.table.modules.selectRow.isRowSelected(this._row)},s.prototype._getSelf=function(){return this._row},s.prototype.freeze=function(){this._row.table.modExists("frozenRows",!0)&&this._row.table.modules.frozenRows.freezeRow(this._row)},s.prototype.unfreeze=function(){this._row.table.modExists("frozenRows",!0)&&this._row.table.modules.frozenRows.unfreezeRow(this._row)},s.prototype.treeCollapse=function(){this._row.table.modExists("dataTree",!0)&&this._row.table.modules.dataTree.collapseRow(this._row)},s.prototype.treeExpand=function(){this._row.table.modExists("dataTree",!0)&&this._row.table.modules.dataTree.expandRow(this._row)},s.prototype.treeToggle=function(){this._row.table.modExists("dataTree",!0)&&this._row.table.modules.dataTree.toggleRow(this._row)},s.prototype.getTreeParent=function(){return!!this._row.table.modExists("dataTree",!0)&&this._row.table.modules.dataTree.getTreeParent(this._row)},s.prototype.getTreeChildren=function(){return!!this._row.table.modExists("dataTree",!0)&&this._row.table.modules.dataTree.getTreeChildren(this._row)},s.prototype.reformat=function(){return this._row.reinitialize()},s.prototype.getGroup=function(){return this._row.getGroup().getComponent()},s.prototype.getTable=function(){return this._row.table},s.prototype.getNextRow=function(){return this._row.nextRow()},s.prototype.getPrevRow=function(){return this._row.prevRow()};var r=function(t,e){this.table=e.table,this.parent=e,this.data={},this.type="row",this.element=this.createElement(),this.modules={},this.cells=[],this.height=0,this.outerHeight=0,this.initialized=!1,this.heightInitialized=!1,this.setData(t),this.generateElement()};r.prototype.createElement=function(){var t=document.createElement("div");return t.classList.add("tabulator-row"),t.setAttribute("role","row"),t},r.prototype.getElement=function(){return this.element},r.prototype.generateElement=function(){var t,e,o,i=this;!1!==i.table.options.selectable&&i.table.modExists("selectRow")&&i.table.modules.selectRow.initializeRow(this),!1!==i.table.options.movableRows&&i.table.modExists("moveRow")&&i.table.modules.moveRow.initializeRow(this),!1!==i.table.options.dataTree&&i.table.modExists("dataTree")&&i.table.modules.dataTree.initializeRow(this),i.table.options.rowClick&&i.element.addEventListener("click",function(t){i.table.options.rowClick(t,i.getComponent())}),i.table.options.rowDblClick&&i.element.addEventListener("dblclick",function(t){i.table.options.rowDblClick(t,i.getComponent())}),i.table.options.rowContext&&i.element.addEventListener("contextmenu",function(t){i.table.options.rowContext(t,i.getComponent())}),i.table.options.rowTap&&(o=!1,i.element.addEventListener("touchstart",function(t){o=!0}),i.element.addEventListener("touchend",function(t){o&&i.table.options.rowTap(t,i.getComponent()),o=!1})),i.table.options.rowDblTap&&(t=null,i.element.addEventListener("touchend",function(e){t?(clearTimeout(t),t=null,i.table.options.rowDblTap(e,i.getComponent())):t=setTimeout(function(){clearTimeout(t),t=null},300)})),i.table.options.rowTapHold&&(e=null,i.element.addEventListener("touchstart",function(t){clearTimeout(e),e=setTimeout(function(){clearTimeout(e),e=null,o=!1,i.table.options.rowTapHold(t,i.getComponent())},1e3)}),i.element.addEventListener("touchend",function(t){clearTimeout(e),e=null}))},r.prototype.generateCells=function(){this.cells=this.table.columnManager.generateCells(this)},r.prototype.initialize=function(t){var e=this;if(!e.initialized||t){for(e.deleteCells();e.element.firstChild;)e.element.removeChild(e.element.firstChild);this.table.modExists("frozenColumns")&&this.table.modules.frozenColumns.layoutRow(this),this.generateCells(),e.cells.forEach(function(t){e.element.appendChild(t.getElement()),t.cellRendered()}),t&&e.normalizeHeight(),e.table.options.dataTree&&e.table.modExists("dataTree")&&e.table.modules.dataTree.layoutRow(this),"collapse"===e.table.options.responsiveLayout&&e.table.modExists("responsiveLayout")&&e.table.modules.responsiveLayout.layoutRow(this),e.table.options.rowFormatter&&e.table.options.rowFormatter(e.getComponent()),e.table.options.resizableRows&&e.table.modExists("resizeRows")&&e.table.modules.resizeRows.initializeRow(e),e.initialized=!0}},r.prototype.reinitializeHeight=function(){this.heightInitialized=!1,null!==this.element.offsetParent&&this.normalizeHeight(!0)},r.prototype.reinitialize=function(){this.initialized=!1,this.heightInitialized=!1,this.height=0,null!==this.element.offsetParent&&this.initialize(!0)},r.prototype.calcHeight=function(){var t=0,e=this.table.options.resizableRows?this.element.clientHeight:0;this.cells.forEach(function(e){var o=e.getHeight();o>t&&(t=o)}),this.height=Math.max(t,e),this.outerHeight=this.element.offsetHeight},r.prototype.setCellHeight=function(){var t=this.height;this.cells.forEach(function(e){e.setHeight(t)}),this.heightInitialized=!0},r.prototype.clearCellHeight=function(){this.cells.forEach(function(t){t.clearHeight()})},r.prototype.normalizeHeight=function(t){t&&this.clearCellHeight(),this.calcHeight(),this.setCellHeight()},r.prototype.setHeight=function(t){this.height=t,this.setCellHeight()},r.prototype.setHeight=function(t,e){(this.height!=t||e)&&(this.height=t,this.setCellHeight(),this.outerHeight=this.element.offsetHeight)},r.prototype.getHeight=function(){return this.outerHeight},r.prototype.getWidth=function(){return this.element.offsetWidth},r.prototype.deleteCell=function(t){var e=this.cells.indexOf(t);e>-1&&this.cells.splice(e,1)},r.prototype.setData=function(t){var e=this;e.table.modExists("mutator")?e.data=e.table.modules.mutator.transformRow(t,"data"):e.data=t},r.prototype.updateData=function(t){var e=this,o=this;return new Promise(function(i,n){"string"==typeof t&&(t=JSON.parse(t)),o.table.modExists("mutator")&&(t=o.table.modules.mutator.transformRow(t,"data",!0));for(var s in t)o.data[s]=t[s];for(var s in t){var r=e.getCell(s);r&&r.getValue()!=t[s]&&r.setValueProcessData(t[s])}c.prototype.helpers.elVisible(e.element)?(o.normalizeHeight(),o.table.options.rowFormatter&&o.table.options.rowFormatter(o.getComponent())):(e.initialized=!1,e.height=0),o.table.options.rowUpdated.call(e.table,o.getComponent()),i()})},r.prototype.getData=function(t){var e=this;return t?e.table.modExists("accessor")?e.table.modules.accessor.transformRow(e.data,t):void 0:this.data},r.prototype.getCell=function(t){return t=this.table.columnManager.findColumn(t),this.cells.find(function(e){return e.column===t})},r.prototype.getCellIndex=function(t){return this.cells.findIndex(function(e){return e===t})},r.prototype.findNextEditableCell=function(t){var e=!1;if(t0)for(var o=t-1;o>=0;o--){var i=this.cells[o],n=!0;if(i.column.modules.edit&&c.prototype.helpers.elVisible(i.getElement())&&("function"==typeof i.column.modules.edit.check&&(n=i.column.modules.edit.check(i.getComponent())),n)){e=i;break}}return e},r.prototype.getCells=function(){return this.cells},r.prototype.nextRow=function(){var t=this.table.rowManager.nextDisplayRow(this,!0);return!!t&&t.getComponent()},r.prototype.prevRow=function(){var t=this.table.rowManager.prevDisplayRow(this,!0);return!!t&&t.getComponent()},r.prototype.delete=function(){var t=this;return new Promise(function(e,o){var i=t.table.rowManager.getRowIndex(t);t.deleteActual(),t.table.options.history&&t.table.modExists("history")&&(i&&(i=t.table.rowManager.rows[i-1]),t.table.modules.history.action("rowDelete",t,{data:t.getData(),pos:!i,index:i})),e()})},r.prototype.deleteActual=function(){this.table.rowManager.getRowIndex(this);this.table.modExists("selectRow")&&this.table.modules.selectRow._deselectRow(this,!0),this.table.rowManager.deleteRow(this),this.deleteCells(),this.initialized=!1,this.heightInitialized=!1,this.modules.group&&this.modules.group.removeRow(this),this.table.modExists("columnCalcs")&&(this.table.options.groupBy&&this.table.modExists("groupRows")?this.table.modules.columnCalcs.recalcRowGroup(this):this.table.modules.columnCalcs.recalc(this.table.rowManager.activeRows))},r.prototype.deleteCells=function(){for(var t=this.cells.length,e=0;e-1?(this.browser="ie",this.browserSlow=!0):t.indexOf("Edge")>-1?(this.browser="edge",this.browserSlow=!0):t.indexOf("Firefox")>-1?(this.browser="firefox",this.browserSlow=!1):(this.browser="other",this.browserSlow=!1)},c.prototype.setData=function(t,e,o){return this.modExists("ajax")&&this.modules.ajax.blockActiveRequest(),this._setData(t,e,o)},c.prototype._setData=function(t,e,o,i){var n=this;return"string"!=typeof t?t?n.rowManager.setData(t,i):n.modExists("ajax")&&(n.modules.ajax.getUrl||n.options.ajaxURLGenerator)?"remote"==n.options.pagination&&n.modExists("page",!0)?(n.modules.page.reset(!0),n.modules.page.setPage(1)):n.modules.ajax.loadData(i):n.rowManager.setData([],i):0==t.indexOf("{")||0==t.indexOf("[")?n.rowManager.setData(JSON.parse(t),i):n.modExists("ajax",!0)?(e&&n.modules.ajax.setParams(e),o&&n.modules.ajax.setConfig(o),n.modules.ajax.setUrl(t),"remote"==n.options.pagination&&n.modExists("page",!0)?(n.modules.page.reset(!0),n.modules.page.setPage(1)):n.modules.ajax.loadData(i)):void 0},c.prototype.clearData=function(){this.modExists("ajax")&&this.modules.ajax.blockActiveRequest(),this.rowManager.clearData()},c.prototype.getData=function(t){return this.rowManager.getData(t)},c.prototype.getDataCount=function(t){return this.rowManager.getDataCount(t)},c.prototype.searchRows=function(t,e,o){if(this.modExists("filter",!0))return this.modules.filter.search("rows",t,e,o)},c.prototype.searchData=function(t,e,o){if(this.modExists("filter",!0))return this.modules.filter.search("data",t,e,o)},c.prototype.getHtml=function(t){return this.rowManager.getHtml(t)},c.prototype.getAjaxUrl=function(){if(this.modExists("ajax",!0))return this.modules.ajax.getUrl()},c.prototype.replaceData=function(t,e,o){return this.modExists("ajax")&&this.modules.ajax.blockActiveRequest(),this._setData(t,e,o,!0)},c.prototype.updateData=function(t){var e=this,o=this,i=0;return new Promise(function(n,s){e.modExists("ajax")&&e.modules.ajax.blockActiveRequest(),"string"==typeof t&&(t=JSON.parse(t)),t?t.forEach(function(t){var e=o.rowManager.findRow(t[o.options.index]);e&&(i++,e.updateData(t).then(function(){--i||n()}))}):(console.warn("Update Error - No data provided"),s("Update Error - No data provided"))})},c.prototype.addData=function(t,e,o){var i=this;return new Promise(function(n,s){i.modExists("ajax")&&i.modules.ajax.blockActiveRequest(),"string"==typeof t&&(t=JSON.parse(t)),t?i.rowManager.addRows(t,e,o).then(function(t){var e=[];t.forEach(function(t){e.push(t.getComponent())}),n(e)}):(console.warn("Update Error - No data provided"),s("Update Error - No data provided"))})},c.prototype.updateOrAddData=function(t){var e=this,o=this,i=[],n=0;return new Promise(function(s,r){e.modExists("ajax")&&e.modules.ajax.blockActiveRequest(),"string"==typeof t&&(t=JSON.parse(t)),t?t.forEach(function(t){var e=o.rowManager.findRow(t[o.options.index]);n++,e?e.updateData(t).then(function(){n--,i.push(e.getComponent()),n||s(i)}):o.rowManager.addRows(t).then(function(t){n--,i.push(t[0].getComponent()),n||s(i)})}):(console.warn("Update Error - No data provided"),r("Update Error - No data provided"))})},c.prototype.getRow=function(t){var e=this.rowManager.findRow(t);return e?e.getComponent():(console.warn("Find Error - No matching row found:",t),!1)},c.prototype.getRowFromPosition=function(t,e){var o=this.rowManager.getRowFromPosition(t,e);return o?o.getComponent():(console.warn("Find Error - No matching row found:",t),!1)},c.prototype.deleteRow=function(t){var e=this;return new Promise(function(o,i){var n=e.rowManager.findRow(t);n?n.delete().then(function(){o()}).catch(function(t){i(t)}):(console.warn("Delete Error - No matching row found:",t),i("Delete Error - No matching row found"))})},c.prototype.addRow=function(t,e,o){var i=this;return new Promise(function(n,s){"string"==typeof t&&(t=JSON.parse(t)),i.rowManager.addRows(t,e,o).then(function(t){i.modExists("columnCalcs")&&i.modules.columnCalcs.recalc(i.rowManager.activeRows),n(t[0].getComponent())})})},c.prototype.updateOrAddRow=function(t,e){var o=this;return new Promise(function(i,n){var s=o.rowManager.findRow(t);"string"==typeof e&&(e=JSON.parse(e)),s?s.updateData(e).then(function(){o.modExists("columnCalcs")&&o.modules.columnCalcs.recalc(o.rowManager.activeRows),i(s.getComponent())}).catch(function(t){n(t)}):s=o.rowManager.addRows(e).then(function(t){o.modExists("columnCalcs")&&o.modules.columnCalcs.recalc(o.rowManager.activeRows),i(t[0].getComponent())}).catch(function(t){n(t)})})},c.prototype.updateRow=function(t,e){var o=this;return new Promise(function(i,n){var s=o.rowManager.findRow(t);"string"==typeof e&&(e=JSON.parse(e)),s?s.updateData(e).then(function(){i(s.getComponent())}).catch(function(t){n(t)}):(console.warn("Update Error - No matching row found:",t),n("Update Error - No matching row found"))})},c.prototype.scrollToRow=function(t,e,o){var i=this;return new Promise(function(n,s){var r=i.rowManager.findRow(t);r?i.rowManager.scrollToRow(r,e,o).then(function(){n()}).catch(function(t){s(t)}):(console.warn("Scroll Error - No matching row found:",t),s("Scroll Error - No matching row found"))})},c.prototype.getRows=function(t){return this.rowManager.getComponents(t)},c.prototype.getRowPosition=function(t,e){var o=this.rowManager.findRow(t);return o?this.rowManager.getRowPosition(o,e):(console.warn("Position Error - No matching row found:",t),!1)},c.prototype.copyToClipboard=function(t,e,o,i){this.modExists("clipboard",!0)&&this.modules.clipboard.copy(t,e,o,i)},c.prototype.setColumns=function(t){this.columnManager.setColumns(t)},c.prototype.getColumns=function(t){return this.columnManager.getComponents(t)},c.prototype.getColumn=function(t){var e=this.columnManager.findColumn(t);return e?e.getComponent():(console.warn("Find Error - No matching column found:",t),!1)},c.prototype.getColumnDefinitions=function(){return this.columnManager.getDefinitionTree()},c.prototype.getColumnLayout=function(){if(this.modExists("persistence",!0))return this.modules.persistence.parseColumns(this.columnManager.getColumns())},c.prototype.setColumnLayout=function(t){return!!this.modExists("persistence",!0)&&(this.columnManager.setColumns(this.modules.persistence.mergeDefinition(this.options.columns,t)),!0)},c.prototype.showColumn=function(t){var e=this.columnManager.findColumn(t);if(!e)return console.warn("Column Show Error - No matching column found:",t),!1;e.show(),this.options.responsiveLayout&&this.modExists("responsiveLayout",!0)&&this.modules.responsiveLayout.update()},c.prototype.hideColumn=function(t){var e=this.columnManager.findColumn(t);if(!e)return console.warn("Column Hide Error - No matching column found:",t),!1;e.hide(),this.options.responsiveLayout&&this.modExists("responsiveLayout",!0)&&this.modules.responsiveLayout.update()},c.prototype.toggleColumn=function(t){var e=this.columnManager.findColumn(t);if(!e)return console.warn("Column Visibility Toggle Error - No matching column found:",t),!1;e.visible?e.hide():e.show()},c.prototype.addColumn=function(t,e,o){var i=this.columnManager.findColumn(o);this.columnManager.addColumn(t,e,i)},c.prototype.deleteColumn=function(t){var e=this.columnManager.findColumn(t);if(!e)return console.warn("Column Delete Error - No matching column found:",t),!1;e.delete()},c.prototype.scrollToColumn=function(t,e,o){var i=this;return new Promise(function(n,s){var r=i.columnManager.findColumn(t);r?i.columnManager.scrollToColumn(r,e,o).then(function(){n()}).catch(function(t){s(t)}):(console.warn("Scroll Error - No matching column found:",t),s("Scroll Error - No matching column found"))})},c.prototype.setLocale=function(t){this.modules.localize.setLocale(t)},c.prototype.getLocale=function(){return this.modules.localize.getLocale()},c.prototype.getLang=function(t){return this.modules.localize.getLang(t)},c.prototype.redraw=function(t){this.columnManager.redraw(t),this.rowManager.redraw(t)},c.prototype.setHeight=function(t){this.options.height=isNaN(t)?t:t+"px",this.element.style.height=this.options.height,this.rowManager.redraw()},c.prototype.setSort=function(t,e){this.modExists("sort",!0)&&(this.modules.sort.setSort(t,e),this.rowManager.sorterRefresh())},c.prototype.getSorters=function(){if(this.modExists("sort",!0))return this.modules.sort.getSort()},c.prototype.clearSort=function(){this.modExists("sort",!0)&&(this.modules.sort.clear(),this.rowManager.sorterRefresh())},c.prototype.setFilter=function(t,e,o){this.modExists("filter",!0)&&(this.modules.filter.setFilter(t,e,o),this.rowManager.filterRefresh())},c.prototype.addFilter=function(t,e,o){this.modExists("filter",!0)&&(this.modules.filter.addFilter(t,e,o),this.rowManager.filterRefresh())},c.prototype.getFilters=function(t){if(this.modExists("filter",!0))return this.modules.filter.getFilters(t)},c.prototype.setHeaderFilterFocus=function(t){if(this.modExists("filter",!0)){var e=this.columnManager.findColumn(t);if(!e)return console.warn("Column Filter Focus Error - No matching column found:",t),!1;this.modules.filter.setHeaderFilterFocus(e)}},c.prototype.setHeaderFilterValue=function(t,e){if(this.modExists("filter",!0)){var o=this.columnManager.findColumn(t);if(!o)return console.warn("Column Filter Error - No matching column found:",t),!1;this.modules.filter.setHeaderFilterValue(o,e)}},c.prototype.getHeaderFilters=function(){if(this.modExists("filter",!0))return this.modules.filter.getHeaderFilters()},c.prototype.removeFilter=function(t,e,o){this.modExists("filter",!0)&&(this.modules.filter.removeFilter(t,e,o),this.rowManager.filterRefresh())},c.prototype.clearFilter=function(t){this.modExists("filter",!0)&&(this.modules.filter.clearFilter(t),this.rowManager.filterRefresh())},c.prototype.clearHeaderFilter=function(){this.modExists("filter",!0)&&(this.modules.filter.clearHeaderFilter(),this.rowManager.filterRefresh())},c.prototype.selectRow=function(t){this.modExists("selectRow",!0)&&this.modules.selectRow.selectRows(t)},c.prototype.deselectRow=function(t){this.modExists("selectRow",!0)&&this.modules.selectRow.deselectRows(t)},c.prototype.toggleSelectRow=function(t){this.modExists("selectRow",!0)&&this.modules.selectRow.toggleRow(t)},c.prototype.getSelectedRows=function(){if(this.modExists("selectRow",!0))return this.modules.selectRow.getSelectedRows()},c.prototype.getSelectedData=function(){if(this.modExists("selectRow",!0))return this.modules.selectRow.getSelectedData()},c.prototype.setMaxPage=function(t){if(!this.options.pagination||!this.modExists("page"))return!1;this.modules.page.setMaxPage(t)},c.prototype.setPage=function(t){if(!this.options.pagination||!this.modExists("page"))return!1;this.modules.page.setPage(t)},c.prototype.setPageSize=function(t){if(!this.options.pagination||!this.modExists("page"))return!1;this.modules.page.setPageSize(t),this.modules.page.setPage(1)},c.prototype.getPageSize=function(){if(this.options.pagination&&this.modExists("page",!0))return this.modules.page.getPageSize()},c.prototype.previousPage=function(){if(!this.options.pagination||!this.modExists("page"))return!1;this.modules.page.previousPage()},c.prototype.nextPage=function(){if(!this.options.pagination||!this.modExists("page"))return!1;this.modules.page.nextPage()},c.prototype.getPage=function(){return!(!this.options.pagination||!this.modExists("page"))&&this.modules.page.getPage()},c.prototype.getPageMax=function(){return!(!this.options.pagination||!this.modExists("page"))&&this.modules.page.getPageMax()},c.prototype.setGroupBy=function(t){if(!this.modExists("groupRows",!0))return!1;this.options.groupBy=t,this.modules.groupRows.initialize(),this.rowManager.refreshActiveData("display")},c.prototype.setGroupStartOpen=function(t){if(!this.modExists("groupRows",!0))return!1;this.options.groupStartOpen=t,this.modules.groupRows.initialize(),this.options.groupBy?this.rowManager.refreshActiveData("group"):console.warn("Grouping Update - cant refresh view, no groups have been set")},c.prototype.setGroupHeader=function(t){if(!this.modExists("groupRows",!0))return!1;this.options.groupHeader=t,this.modules.groupRows.initialize(),this.options.groupBy?this.rowManager.refreshActiveData("group"):console.warn("Grouping Update - cant refresh view, no groups have been set")},c.prototype.getGroups=function(t){return!!this.modExists("groupRows",!0)&&this.modules.groupRows.getGroups(!0)},c.prototype.getGroupedData=function(){if(this.modExists("groupRows",!0))return this.options.groupBy?this.modules.groupRows.getGroupedData():this.getData()},c.prototype.getCalcResults=function(){return!!this.modExists("columnCalcs",!0)&&this.modules.columnCalcs.getResults()},c.prototype.navigatePrev=function(){var t=!1;return!(!this.modExists("edit",!0)||!(t=this.modules.edit.currentCell))&&(e.preventDefault(),t.nav().prev())},c.prototype.navigateNext=function(){var t=!1;return!(!this.modExists("edit",!0)||!(t=this.modules.edit.currentCell))&&(e.preventDefault(),t.nav().next())},c.prototype.navigateLeft=function(){var t=!1;return!(!this.modExists("edit",!0)||!(t=this.modules.edit.currentCell))&&(e.preventDefault(),t.nav().left())},c.prototype.navigateRight=function(){var t=!1;return!(!this.modExists("edit",!0)||!(t=this.modules.edit.currentCell))&&(e.preventDefault(),t.nav().right())},c.prototype.navigateUp=function(){var t=!1;return!(!this.modExists("edit",!0)||!(t=this.modules.edit.currentCell))&&(e.preventDefault(),t.nav().up())},c.prototype.navigateDown=function(){var t=!1;return!(!this.modExists("edit",!0)||!(t=this.modules.edit.currentCell))&&(e.preventDefault(),t.nav().dpwn())},c.prototype.undo=function(){return!(!this.options.history||!this.modExists("history",!0))&&this.modules.history.undo()},c.prototype.redo=function(){return!(!this.options.history||!this.modExists("history",!0))&&this.modules.history.redo()},c.prototype.getHistoryUndoSize=function(){return!(!this.options.history||!this.modExists("history",!0))&&this.modules.history.getHistoryUndoSize()},c.prototype.getHistoryRedoSize=function(){return!(!this.options.history||!this.modExists("history",!0))&&this.modules.history.getHistoryRedoSize()},c.prototype.download=function(t,e,o){this.modExists("download",!0)&&this.modules.download.download(t,e,o)},c.prototype.tableComms=function(t,e,o,i){this.modules.comms.receive(t,e,o,i)},c.prototype.moduleBindings={},c.prototype.extendModule=function(t,e,o){if(c.prototype.moduleBindings[t]){var i=c.prototype.moduleBindings[t].prototype[e];if(i)if("object"==(void 0===o?"undefined":_typeof(o)))for(var n in o)i[n]=o[n];else console.warn("Module Error - Invalid value type, it must be an object");else console.warn("Module Error - property does not exist:",e)}else console.warn("Module Error - module does not exist:",t)},c.prototype.registerModule=function(t,e){c.prototype.moduleBindings[t]=e},c.prototype.bindModules=function(){this.modules={};for(var t in c.prototype.moduleBindings)this.modules[t]=new c.prototype.moduleBindings[t](this)},c.prototype.modExists=function(t,e){return!!this.modules[t]||(e&&console.error("Tabulator Module Not Installed: "+t),!1)},c.prototype.helpers={elVisible:function(t){return!(t.offsetWidth<=0&&t.offsetHeight<=0)},elOffset:function(t){var e=t.getBoundingClientRect();return{top:e.top+window.pageYOffset-document.documentElement.clientTop,left:e.left+window.pageXOffset-document.documentElement.clientLeft}},deepClone:function(t){var e=Array.isArray(t)?[]:{};for(var o in t)null!=t[o]&&"object"===_typeof(t[o])?t[o]instanceof Date?e[o]=new Date(t[o]):e[o]=this.deepClone(t[o]):e[o]=t[o];return e}},c.prototype.comms={tables:[],register:function(t){c.prototype.comms.tables.push(t)},deregister:function(t){var e=c.prototype.comms.tables.indexOf(t);e>-1&&c.prototype.comms.tables.splice(e,1)},lookupTable:function(t){var e,o,i=[];if("string"==typeof t){if(e=document.querySelectorAll(t),e.length)for(var n=0;n-1?n/100*parseInt(t):parseInt(t):t}function o(t,i,n,s){function r(t){return n*(t.column.definition.widthGrow||1)}function a(t){return e(t.width)-n*(t.column.definition.widthShrink||0)}var l=[],u=0,c=0,d=0,h=0,p=0,m=[];return t.forEach(function(t,e){var o=s?a(t):r(t);t.column.minWidth>=o?l.push(t):(m.push(t),p+=s?t.column.definition.widthShrink||1:t.column.definition.widthGrow||1)}),l.length?(l.forEach(function(t){u+=s?t.width-t.column.minWidth:t.column.minWidth,t.width=t.column.minWidth}),c=i-u,d=p?Math.floor(c/p):c,h=c-d*p,h+=o(m,c,d,s)):(h=p?i-Math.floor(i/p)*p:i,m.forEach(function(t){t.width=s?a(t):r(t)})),h}var i=this,n=i.table.element.clientWidth,s=0,r=0,a=0,l=0,u=[],c=[],d=0,h=0,p=0;this.table.options.responsiveLayout&&this.table.modExists("responsiveLayout",!0)&&this.table.modules.responsiveLayout.update(),this.table.rowManager.element.scrollHeight>this.table.rowManager.element.clientHeight&&(n-=this.table.rowManager.element.offsetWidth-this.table.rowManager.element.clientWidth), -t.forEach(function(t){var o,i,n;t.visible&&(o=t.definition.width,i=parseInt(t.minWidth),o?(n=e(o),s+=n>i?n:i,t.definition.widthShrink&&(c.push({column:t,width:n>i?n:i}),d+=t.definition.widthShrink)):(u.push({column:t,width:0}),a+=t.definition.widthGrow||1))}),r=n-s,l=Math.floor(r/a);var p=o(u,r,l,!1);u.length&&p>0&&(u[u.length-1].width+=+p),u.forEach(function(t){r-=t.width}),h=Math.abs(p)+r,h>0&&d&&(p=o(c,h,Math.floor(h/d),!0)),c.length&&(c[c.length-1].width-=p),u.forEach(function(t){t.column.setWidth(t.width)}),c.forEach(function(t){t.column.setWidth(t.width)})}},c.prototype.registerModule("layout",d);var h=function(t){this.table=t,this.locale="default",this.lang=!1,this.bindings={}};h.prototype.setHeaderFilterPlaceholder=function(t){this.langs.default.headerFilters.default=t},h.prototype.setHeaderFilterColumnPlaceholder=function(t,e){this.langs.default.headerFilters.columns[t]=e,this.lang&&!this.lang.headerFilters.columns[t]&&(this.lang.headerFilters.columns[t]=e)},h.prototype.installLang=function(t,e){this.langs[t]?this._setLangProp(this.langs[t],e):this.langs[t]=e},h.prototype._setLangProp=function(t,e){for(var o in e)t[o]&&"object"==_typeof(t[o])?this._setLangProp(t[o],e[o]):t[o]=e[o]},h.prototype.setLocale=function(t){function e(t,o){for(var i in t)"object"==_typeof(t[i])?(o[i]||(o[i]={}),e(t[i],o[i])):o[i]=t[i]}var o=this;if(t=t||"default",!0===t&&navigator.language&&(t=navigator.language.toLowerCase()),t&&!o.langs[t]){var i=t.split("-")[0];o.langs[i]?(console.warn("Localization Error - Exact matching locale not found, using closest match: ",t,i),t=i):(console.warn("Localization Error - Matching locale not found, using default: ",t),t="default")}o.locale=t,o.lang=c.prototype.helpers.deepClone(o.langs.default||{}),"default"!=t&&e(o.langs[t],o.lang),o.table.options.localized.call(o.table,o.locale,o.lang),o._executeBindings()},h.prototype.getLocale=function(t){return self.locale},h.prototype.getLang=function(t){return t?this.langs[t]:this.lang},h.prototype.getText=function(t,e){var t=e?t+"|"+e:t,o=t.split("|");return this._getLangElement(o,this.locale)||""},h.prototype._getLangElement=function(t,e){var o=this,i=o.lang;return t.forEach(function(t){var e;i&&(e=i[t],i=void 0!==e&&e)}),i},h.prototype.bind=function(t,e){this.bindings[t]||(this.bindings[t]=[]),this.bindings[t].push(e),e(this.getText(t),this.lang)},h.prototype._executeBindings=function(){var t=this;for(var e in t.bindings)!function(e){t.bindings[e].forEach(function(o){o(t.getText(e),t.lang)})}(e)},h.prototype.langs={default:{groups:{item:"item",items:"items"},columns:{},ajax:{loading:"Loading",error:"Error"},pagination:{first:"First",first_title:"First Page",last:"Last",last_title:"Last Page",prev:"Prev",prev_title:"Prev Page",next:"Next",next_title:"Next Page"},headerFilters:{default:"filter column...",columns:{}}}},c.prototype.registerModule("localize",h);var p=function(t){this.table=t};p.prototype.getConnections=function(t){var e,o=this,i=[];return e=c.prototype.comms.lookupTable(t),e.forEach(function(t){o.table!==t&&i.push(t)}),i},p.prototype.send=function(t,e,o,i){var n=this,s=this.getConnections(t);s.forEach(function(t){t.tableComms(n.table.element,e,o,i)}),!s.length&&t&&console.warn("Table Connection Error - No tables matching selector found",t)},p.prototype.receive=function(t,e,o,i){if(this.table.modExists(e))return this.table.modules[e].commsReceived(t,o,i);console.warn("Inter-table Comms Error - no such module:",e)},c.prototype.registerModule("comms",p);var m=function(t){this.table=t,this.allowedTypes=["","data","download","clipboard"]};m.prototype.initializeColumn=function(t){var e=this,o=!1,i={};this.allowedTypes.forEach(function(n){var s,r="accessor"+(n.charAt(0).toUpperCase()+n.slice(1));t.definition[r]&&(s=e.lookupAccessor(t.definition[r]))&&(o=!0,i[r]={accessor:s,params:t.definition[r+"Params"]||{}})}),o&&(t.modules.accessor=i)},m.prototype.lookupAccessor=function(t){var e=!1;switch(void 0===t?"undefined":_typeof(t)){case"string":this.accessors[t]?e=this.accessors[t]:console.warn("Accessor Error - No such accessor found, ignoring: ",t);break;case"function":e=t}return e},m.prototype.transformRow=function(t,e){var o=this,i="accessor"+(e.charAt(0).toUpperCase()+e.slice(1)),n=c.prototype.helpers.deepClone(t||{});return o.table.columnManager.traverse(function(t){var o,s,r,a;t.modules.accessor&&(s=t.modules.accessor[i]||t.modules.accessor.accessor||!1)&&"undefined"!=(o=t.getFieldValue(n))&&(a=t.getComponent(),r="function"==typeof s.params?s.params(o,n,e,a):s.params,t.setFieldValue(n,s.accessor(o,n,e,r,a)))}),n},m.prototype.accessors={},c.prototype.registerModule("accessor",m);var f=function(t){this.table=t,this.config=!1,this.url="",this.urlGenerator=!1,this.params=!1,this.loaderElement=this.createLoaderElement(),this.msgElement=this.createMsgElement(),this.loadingElement=!1,this.errorElement=!1,this.loaderPromise=!1,this.progressiveLoad=!1,this.loading=!1,this.requestOrder=0};f.prototype.initialize=function(){this.loaderElement.appendChild(this.msgElement),this.table.options.ajaxLoaderLoading&&(this.loadingElement=this.table.options.ajaxLoaderLoading),this.loaderPromise=this.table.options.ajaxRequestFunc||this.defaultLoaderPromise,this.urlGenerator=this.table.options.ajaxURLGenerator||this.defaultURLGenerator,this.table.options.ajaxLoaderError&&(this.errorElement=this.table.options.ajaxLoaderError),this.table.options.ajaxParams&&this.setParams(this.table.options.ajaxParams),this.table.options.ajaxConfig&&this.setConfig(this.table.options.ajaxConfig),this.table.options.ajaxURL&&this.setUrl(this.table.options.ajaxURL),this.table.options.ajaxProgressiveLoad&&(this.table.options.pagination?(this.progressiveLoad=!1,console.error("Progressive Load Error - Pagination and progressive load cannot be used at the same time")):this.table.modExists("page")?(this.progressiveLoad=this.table.options.ajaxProgressiveLoad,this.table.modules.page.initializeProgressive(this.progressiveLoad)):console.error("Pagination plugin is required for progressive ajax loading"))},f.prototype.createLoaderElement=function(){var t=document.createElement("div");return t.classList.add("tabulator-loader"),t},f.prototype.createMsgElement=function(){var t=document.createElement("div");return t.classList.add("tabulator-loader-msg"),t.setAttribute("role","alert"),t},f.prototype.setParams=function(t,e){if(e){this.params=this.params||{};for(var o in t)this.params[o]=t[o]}else this.params=t},f.prototype.getParams=function(){return this.params||{}},f.prototype.setConfig=function(t){if(this._loadDefaultConfig(),"string"==typeof t)this.config.method=t;else for(var e in t)this.config[e]=t[e]},f.prototype._loadDefaultConfig=function(t){var e=this;if(!e.config||t){e.config={};for(var o in e.defaultConfig)e.config[o]=e.defaultConfig[o]}},f.prototype.setUrl=function(t){this.url=t},f.prototype.getUrl=function(){return this.url},f.prototype.loadData=function(t){return this.progressiveLoad?this._loadDataProgressive():this._loadDataStandard(t)},f.prototype.nextPage=function(t){var e;this.loading||(e=this.table.options.ajaxProgressiveLoadScrollMargin||2*this.table.rowManager.getElement().clientHeight,ti||null===i)&&(i=t)}),null!==i?!1!==n?i.toFixed(n):i:""},min:function(t,e,o){var i=null,n=void 0!==o.precision&&o.precision;return t.forEach(function(t){((t=Number(t))t&&(t=o)}),i.forEach(function(e){var o=e.length;if(o1&&(e.colSpan=t.width),t.height>1&&(e.rowSpan=t.height),e.innerHTML=t.title,m.mapElementStyles(t.element,e,["border-top","border-left","border-right","border-bottom","background-color","color","font-weight","font-family","font-size"]),o.appendChild(e)}),m.mapElementStyles(m.table.columnManager.getHeadersElement(),o,["border-top","border-left","border-right","border-bottom","background-color","color","font-weight","font-family","font-size"]),e.appendChild(o)}),m.htmlElement.appendChild(e)}(f)):function(){var t=document.createElement("tr");e.forEach(function(e){var o=document.createElement("th");o.innerHTML=e.definition.title,m.mapElementStyles(e.getElement(),o,["border-top","border-left","border-right","border-bottom","background-color","color","font-weight","font-family","font-size"]),t.appendChild(o)}),m.mapElementStyles(m.table.columnManager.getHeadersElement(),t,["border-top","border-left","border-right","border-bottom","background-color","color","font-weight","font-family","font-size"]),m.htmlElement.appendChild(document.createElement("thead").appendChild(t))}()),e=this.table.columnManager.columnsByIndex,a=document.createElement("tbody"),window.getComputedStyle&&(l=this.table.element.querySelector(".tabulator-row-odd:not(.tabulator-group):not(.tabulator-calcs)"),u=this.table.element.querySelector(".tabulator-row-even:not(.tabulator-group):not(.tabulator-calcs)"),c=this.table.element.querySelector(".tabulator-row:not(.tabulator-group):not(.tabulator-calcs)"),h=this.table.element.getElementsByClassName("tabulator-group")[0],c&&(p=c.getElementsByClassName("tabulator-cell"),d=p[0],p[p.length-1])),o.rowGroups?t.forEach(function(t){r(t)}):s(t),this.htmlElement.appendChild(a)},b.prototype.mapElementStyles=function(t,e,o){var i={"background-color":"backgroundColor",color:"fontColor","font-weight":"fontWeight","font-family":"fontFamily","font-size":"fontSize","border-top":"borderTop","border-left":"borderLeft","border-right":"borderRight","border-bottom":"borderBottom"};if(window.getComputedStyle){var n=window.getComputedStyle(t);o.forEach(function(t){e.style[i[t]]=n.getPropertyValue(t)})}},b.prototype.copySelectors={userSelection:function(t,e){return e},selected:function(t,e){var o=[];return this.table.modExists("selectRow",!0)&&(o=this.table.modules.selectRow.getSelectedRows()),t.rowGroups&&console.warn("Clipboard Warning - select coptSelector does not support row groups"),this.buildOutput(o,t,e)},table:function(t,e){return t.rowGroups&&console.warn("Clipboard Warning - table coptSelector does not support row groups"),this.buildOutput(this.table.rowManager.getComponents(),t,e)},active:function(t,e){var o;return o=t.rowGroups?this.buildComplexRows(t):this.table.rowManager.getComponents(!0),this.buildOutput(o,t,e)}},b.prototype.copyFormatters={raw:function(t,e){return t},table:function(t,e){var o=[];return t.forEach(function(t){t.forEach(function(t){void 0===t&&(t=""),t=void 0===t||null===t?"":t.toString(),t.match(/\r|\n/)&&(t=t.split('"').join('""'),t='"'+t+'"')}),o.push(t.join("\t"))}),o.join("\n")}},b.prototype.pasteParsers={table:function(t){var e=[],o=!0,i=this.table.columnManager.columns,n=[],s=[];return t=t.split("\n"),t.forEach(function(t){e.push(t.split("\t"))}),!(!e.length||1===e.length&&e[0].length<2)&&(!0,e[0].forEach(function(t){var e=i.find(function(e){return t&&e.definition.title&&t.trim()&&e.definition.title.trim()===t.trim()});e?n.push(e):o=!1}),o||(o=!0,n=[],e[0].forEach(function(t){var e=i.find(function(e){return t&&e.field&&t.trim()&&e.field.trim()===t.trim()});e?n.push(e):o=!1}),o||(n=this.table.columnManager.columnsByIndex)),o&&e.shift(),e.forEach(function(t){var e={};t.forEach(function(t,o){n[o]&&(e[n[o].field]=t)}),s.push(e)}),s)}},b.prototype.pasteActions={replace:function(t){return this.table.setData(t)},update:function(t){return this.table.updateOrAddData(t)},insert:function(t){return this.table.addData(t)}},c.prototype.registerModule("clipboard",b);var v=function(t){this.table=t,this.indent=10,this.field="",this.collapseEl=null,this.expandEl=null,this.branchEl=null, -this.startOpen=function(){},this.displayIndex=0};v.prototype.initialize=function(){var t=null,e=this.table.options;switch(this.field=e.dataTreeChildField,this.indent=e.dataTreeChildIndent,e.dataTreeBranchElement&&(!0===e.dataTreeBranchElement?(this.branchEl=document.createElement("div"),this.branchEl.classList.add("tabulator-data-tree-branch")):"string"==typeof e.dataTreeBranchElement?(t=document.createElement("div"),t.innerHTML=e.dataTreeBranchElement,this.branchEl=t.firstChild):this.branchEl=e.dataTreeBranchElement),e.dataTreeCollapseElement?"string"==typeof e.dataTreeCollapseElement?(t=document.createElement("div"),t.innerHTML=e.dataTreeCollapseElement,this.collapseEl=t.firstChild):this.collapseEl=e.dataTreeCollapseElement:(this.collapseEl=document.createElement("div"),this.collapseEl.classList.add("tabulator-data-tree-control"),this.collapseEl.innerHTML="
"),e.dataTreeExpandElement?"string"==typeof e.dataTreeExpandElement?(t=document.createElement("div"),t.innerHTML=e.dataTreeExpandElement,this.expandEl=t.firstChild):this.expandEl=e.dataTreeExpandElement:(this.expandEl=document.createElement("div"),this.expandEl.classList.add("tabulator-data-tree-control"),this.expandEl.innerHTML="
"),_typeof(e.dataTreeStartExpanded)){case"boolean":this.startOpen=function(t,o){return e.dataTreeStartExpanded};break;case"function":this.startOpen=e.dataTreeStartExpanded;break;default:this.startOpen=function(t,o){return e.dataTreeStartExpanded[o]}}},v.prototype.initializeRow=function(t){var e=void 0!==t.getData()[this.field];t.modules.dataTree={index:0,open:!!e&&this.startOpen(t.getComponent(),0),controlEl:!1,branchEl:!1,parent:!1,children:e}},v.prototype.layoutRow=function(t){var e=t.getCells()[0],o=e.getElement(),i=t.modules.dataTree;o.style.paddingLeft=parseInt(window.getComputedStyle(o,null).getPropertyValue("padding-left"))+i.index*this.indent+"px",i.branchEl&&i.branchEl.parentNode.removeChild(i.branchEl),this.generateControlElement(t,o),i.index&&this.branchEl&&(i.branchEl=this.branchEl.cloneNode(!0),o.insertBefore(i.branchEl,o.firstChild),o.style.paddingLeft=parseInt(o.style.paddingLeft)+(i.branchEl.offsetWidth+i.branchEl.style.marginRight)*(i.index-1)+"px")},v.prototype.generateControlElement=function(t,e){var o=this,i=t.modules.dataTree,e=e||t.getCells()[0].getElement(),n=i.controlEl;!1!==i.children&&(i.open?(i.controlEl=this.collapseEl.cloneNode(!0),i.controlEl.addEventListener("click",function(e){e.stopPropagation(),o.collapseRow(t)})):(i.controlEl=this.expandEl.cloneNode(!0),i.controlEl.addEventListener("click",function(e){e.stopPropagation(),o.expandRow(t)})),i.controlEl.addEventListener("mousedown",function(t){t.stopPropagation()}),n&&n.parentNode===e?n.parentNode.replaceChild(i.controlEl,n):e.insertBefore(i.controlEl,e.firstChild))},v.prototype.setDisplayIndex=function(t){this.displayIndex=t},v.prototype.getDisplayIndex=function(){return this.displayIndex},v.prototype.getRows=function(t){var e=this,o=[];return t.forEach(function(t,i){var n,s=t.modules.dataTree.children;o.push(t),s.index||!1===s.children||(n=e.getChildren(t),n.forEach(function(t){o.push(t)}))}),o},v.prototype.getChildren=function(t){var e=this,o=t.modules.dataTree,i=[];return!1!==o.children&&o.open&&(Array.isArray(o.children)||(o.children=this.generateChildren(t)),o.children.forEach(function(t){i.push(t),e.getChildren(t).forEach(function(t){i.push(t)})})),i},v.prototype.generateChildren=function(t){var e=this,o=[];return t.getData()[this.field].forEach(function(i){var n=new r(i||{},e.table.rowManager);n.modules.dataTree.index=t.modules.dataTree.index+1,n.modules.dataTree.parent=t,n.modules.dataTree.open=e.startOpen(t,n.modules.dataTree.index),o.push(n)}),o},v.prototype.expandRow=function(t,e){var o=t.modules.dataTree;!1!==o.children&&(o.open=!0,t.reinitialize(),this.table.rowManager.refreshActiveData("tree",!1,!0),this.table.options.dataTreeRowExpanded(t.getComponent(),t.modules.dataTree.index))},v.prototype.collapseRow=function(t){var e=t.modules.dataTree;!1!==e.children&&(e.open=!1,t.reinitialize(),this.table.rowManager.refreshActiveData("tree",!1,!0),this.table.options.dataTreeRowCollapsed(t.getComponent(),t.modules.dataTree.index))},v.prototype.toggleRow=function(t){var e=t.modules.dataTree;!1!==e.children&&(e.open?this.collapseRow(t):this.expandRow(t))},v.prototype.getTreeParent=function(t){return!!t.modules.dataTree.parent&&t.modules.dataTree.parent.getComponent()},v.prototype.getTreeChildren=function(t){var e=t.modules.dataTree,o=[];return e.children&&(Array.isArray(e.children)||(e.children=this.generateChildren(t)),e.children.forEach(function(t){t instanceof r&&o.push(t.getComponent())})),o},v.prototype.checkForRestyle=function(t){t.row.cells.indexOf(t)||!1!==t.row.modules.dataTree.children&&t.row.reinitialize()},c.prototype.registerModule("dataTree",v);var y=function(t){this.table=t,this.fields={},this.columnsByIndex=[],this.columnsByField={},this.config={}};y.prototype.download=function(t,e,o,i){function n(o,n){i?i(o):s.triggerDownload(o,n,t,e)}var s=this,r=!1;this.processConfig(),"function"==typeof t?r=t:s.downloaders[t]?r=s.downloaders[t]:console.warn("Download Error - No such download type found: ",t),this.processColumns(),r&&r.call(this,s.processDefinitions(),s.processData(),o||{},n,this.config)},y.prototype.processConfig=function(){var t={columnGroups:!0,rowGroups:!0};if(this.table.options.downloadConfig)for(var e in this.table.options.downloadConfig)t[e]=this.table.options.downloadConfig[e];t.rowGroups&&this.table.options.groupBy&&this.table.modExists("groupRows")&&(this.config.rowGroups=!0),t.columnGroups&&this.table.columnManager.columns.length!=this.table.columnManager.columnsByIndex.length&&(this.config.columnGroups=!0)},y.prototype.processColumns=function(){var t=this;t.columnsByIndex=[],t.columnsByField={},t.table.columnManager.columnsByIndex.forEach(function(e){e.field&&e.visible&&!1!==e.definition.download&&(t.columnsByIndex.push(e),t.columnsByField[e.field]=e)})},y.prototype.processDefinitions=function(){var t=this,e=[];return this.config.columnGroups?t.table.columnManager.columns.forEach(function(o){var i=t.processColumnGroup(o);i&&e.push(i)}):t.columnsByIndex.forEach(function(o){!1!==o.download&&e.push(t.processDefinition(o))}),e},y.prototype.processColumnGroup=function(t){var e=this,o=t.columns,i={type:"group",title:t.definition.title};if(o.length){if(i.subGroups=[],i.width=0,o.forEach(function(t){var o=e.processColumnGroup(t);o&&(i.width+=o.width,i.subGroups.push(o))}),!i.width)return!1}else{if(!t.field||!t.visible||!1===t.definition.download)return!1;i.width=1,i.definition=this.processDefinition(t)}return i},y.prototype.processDefinition=function(t){var e={};for(var o in t.definition)e[o]=t.definition[o];return void 0!==t.definition.downloadTitle&&(e.title=t.definition.downloadTitle),e},y.prototype.processData=function(){var t=this,e=this,o=[],i=[];return this.config.rowGroups?(i=this.table.modules.groupRows.getGroups(),i.forEach(function(e){o.push(t.processGroupData(e))})):o=e.table.rowManager.getData(!0,"download"),"function"==typeof e.table.options.downloadDataFormatter&&(o=e.table.options.downloadDataFormatter(o)),o},y.prototype.processGroupData=function(t){var e=this,o=t.getSubGroups(),i={type:"group",key:t.key};return o.length?(i.subGroups=[],o.forEach(function(t){i.subGroups.push(e.processGroupData(t))})):i.rows=t.getData(!0,"download"),i},y.prototype.triggerDownload=function(t,e,o,i){var n=document.createElement("a"),s=new Blob([t],{type:e}),i=i||"Tabulator."+("function"==typeof o?"txt":o);(s=this.table.options.downloadReady.call(this.table,t,s))&&(navigator.msSaveOrOpenBlob?navigator.msSaveOrOpenBlob(s,i):(n.setAttribute("href",window.URL.createObjectURL(s)),n.setAttribute("download",i),n.style.display="none",document.body.appendChild(n),n.click(),document.body.removeChild(n)),this.table.options.downloadComplete&&this.table.options.downloadComplete())},y.prototype.getFieldValue=function(t,e){var o=this.columnsByField[t];return!!o&&o.getFieldValue(e)},y.prototype.commsReceived=function(t,e,o){switch(e){case"intercept":this.download(o.type,"",o.options,o.intercept)}},y.prototype.downloaders={csv:function(t,e,o,i,n){function s(t,e){t.subGroups?t.subGroups.forEach(function(t){s(t,e+1)}):(c.push('"'+String(t.title).split('"').join('""')+'"'),d.push(t.definition.field))}function r(t){t.forEach(function(t){var e=[];d.forEach(function(o){var i=u.getFieldValue(o,t);switch(void 0===i?"undefined":_typeof(i)){case"object":i=JSON.stringify(i);break;case"undefined":case"null":i="";break;default:i=i}e.push('"'+String(i).split('"').join('""')+'"')}),l.push(e.join(h))})}function a(t){t.subGroups?t.subGroups.forEach(function(t){a(t)}):r(t.rows)}var l,u=this,c=[],d=[],h=o&&o.delimiter?o.delimiter:",";n.columnGroups?(console.warn("Download Warning - CSV downloader cannot process column groups"),t.forEach(function(t){s(t,0)})):function(){t.forEach(function(t){c.push('"'+String(t.title).split('"').join('""')+'"'),d.push(t.field)})}(),l=[c.join(h)],n.rowGroups?(console.warn("Download Warning - CSV downloader cannot process row groups"),e.forEach(function(t){a(t)})):r(e),i(l.join("\n"),"text/csv")},json:function(t,e,o,i,n){i(JSON.stringify(e,null,"\t"),"application/json")},pdf:function(t,e,o,i,n){function s(t,e){t.subGroups?t.subGroups.forEach(function(t){s(t,e+1)}):(d.push(t.title||""),c.push(t.definition.field))}function r(t){switch(void 0===t?"undefined":_typeof(t)){case"object":t=JSON.stringify(t);break;case"undefined":case"null":t="";break;default:t=t}return t}function a(t){t.forEach(function(t){var e=[];c.forEach(function(o){var i=u.getFieldValue(o,t);e.push(r(i))}),h.push(e)})}function l(t){var e=[];e.push(r(t.key)),p.push(h.length),h.push(e),t.subGroups?t.subGroups.forEach(function(t){l(t)}):a(t.rows)}var u=this,c=[],d=[],h=[],p=[],m={},f={},g=o.jsPDF||{},b=o&&o.title?o.title:"";g.orientation||(g.orientation=o.orientation||"landscape"),g.unit||(g.unit="pt"),n.columnGroups?(console.warn("Download Warning - PDF downloader cannot process column groups"),t.forEach(function(t){s(t,0)})):function(){t.forEach(function(t){t.field&&(d.push(t.title||""),c.push(t.field))})}(),n.rowGroups?e.forEach(function(t){l(t)}):a(e);var v=new jsPDF(g);if(o&&o.autoTable&&(m="function"==typeof o.autoTable?o.autoTable(v)||{}:o.autoTable),n.rowGroups){var y=function(t,e){if(p.indexOf(e.row.index)>-1)for(var o in f)t.styles[o]=f[o]};if(f=o.rowGroupStyles||{fontStyle:"bold",fontSize:12,cellPadding:6,fillColor:220},m.createdCell){var w=m.createdCell;m.createdCell=function(t,e){y(t,e),w(t,e)}}else m.createdCell=y}b&&(m.addPageContent=function(t){v.text(b,40,30)}),v.autoTable(d,h,m),i(v.output("arraybuffer"),"application/pdf")},xlsx:function(t,e,o,i,n){function s(){function o(t,e){void 0===u[e]&&(u[e]=[]),void 0===d[e]&&(d[e]=[]),t.width>1&&d[e].push({type:"hoz",start:u[e].length,end:u[e].length+t.width-1}),u[e].push(t.title),t.subGroups?t.subGroups.forEach(function(t){o(t,e+1)}):(h.push(t.definition.field),i(h.length),d[e].push({type:"vert",start:h.length-1}))}function i(){var t=0;u.forEach(function(e){var o=e.length;o>t&&(t=o)}),u.forEach(function(e){var o=e.length;if(o0&&l(y[e-1]);break;case 40:t.stopImmediatePropagation(),t.stopPropagation(),e=y.indexOf(E),e-1&&e.push(o)}),E=e,l()}function l(){for(var t=!1;y.firstChild;)y.removeChild(y.firstChild);E.forEach(function(e){var o=e.element;o||(o=document.createElement("div"),o.classList.add("tabulator-edit-select-list-item"),o.tabIndex=0,o.innerHTML=e.title,o.addEventListener("click",function(){u(e),d()}),o.addEventListener("mousedown",function(){x=!1,setTimeout(function(){x=!0},10)}),e.element=o,e===C&&(e.element.classList.add("active"),t=!0)),y.appendChild(o)}),t||u(!1)}function u(t,e){C&&C.element&&C.element.classList.remove("active"),C=t,t&&t.element&&t.element.classList.add("active")}function d(){m(),C?b!==C.value?(b=C.value,v.value=C.value,o(v.value)):i():n.freetext?(b=v.value,o(v.value)):n.allowEmpty&&""===v.value?(b=v.value,o(v.value)):i()}function h(){m(),i()}function p(){if(!y.parentNode){for(;y.firstChild;)y.removeChild(y.firstChild);!0===n.values?r(s(),b):r(n.values||[],b);var t=c.prototype.helpers.elOffset(g);y.style.minWidth=g.offsetWidth+"px",y.style.top=t.top+g.offsetHeight+"px",y.style.left=t.left+"px",document.body.appendChild(y)}}function m(){y.parentNode&&y.parentNode.removeChild(y)}var f=this,g=t.getElement(),b=t.getValue(),v=document.createElement("input"),y=document.createElement("div"),w=[],E=[],C={},x=!0;return v.setAttribute("type","text"),v.style.padding="4px",v.style.width="100%",v.style.boxSizing="border-box",v.addEventListener("keydown",function(t){var e;switch(t.keyCode){case 38:t.stopImmediatePropagation(),t.stopPropagation(),e=E.indexOf(C),u(e>0?E[e-1]:!1);break;case 40:t.stopImmediatePropagation(),t.stopPropagation(),e=E.indexOf(C),e'):("ie"==a.table.browser?e.setAttribute("class","tabulator-star-inactive"):e.classList.replace("tabulator-star-active","tabulator-star-inactive"),e.innerHTML='')})}function r(t){u=t,s(t)}var a=this,l=t.getElement(),u=t.getValue(),c=l.getElementsByTagName("svg").length||5,d=l.getElementsByTagName("svg")[0]?l.getElementsByTagName("svg")[0].getAttribute("width"):14,h=[],p=document.createElement("div"),m=document.createElementNS("http://www.w3.org/2000/svg","svg");l.style.whiteSpace="nowrap",l.style.overflow="hidden",l.style.textOverflow="ellipsis",p.style.verticalAlign="middle",p.style.display="inline-block",p.style.padding="4px",m.setAttribute("width",d),m.setAttribute("height",d),m.setAttribute("viewBox","0 0 512 512"),m.setAttribute("xml:space","preserve"),m.style.padding="0 1px";for(var f=1;f<=c;f++)!function(t){var e=m.cloneNode(!0);h.push(e),e.addEventListener("mouseover",function(e){e.stopPropagation(),s(t)}),e.addEventListener("click",function(e){e.stopPropagation(),o(t)}),p.appendChild(e)}(f);return u=Math.min(parseInt(u),c),s(u),p.addEventListener("mouseover",function(t){s(0)}),p.addEventListener("click",function(t){o(0)}),l.addEventListener("blur",function(t){i()}),l.addEventListener("keydown",function(t){switch(t.keyCode){case 39:r(u+1);break;case 37:r(u-1);break;case 13:o(u);break;case 27:i()}}),p},progress:function(t,e,o,i,n){function s(){var t=d*Math.round(m.offsetWidth/(l.clientWidth/100))+c;o(t),l.setAttribute("aria-valuenow",t),l.setAttribute("aria-label",h)}var r,a,l=t.getElement(),u=void 0===n.max?l.getElementsByTagName("div")[0].getAttribute("max")||100:n.max,c=void 0===n.min?l.getElementsByTagName("div")[0].getAttribute("min")||0:n.min,d=(u-c)/100,h=t.getValue()||0,p=document.createElement("div"),m=document.createElement("div");return p.style.position="absolute",p.style.right="0",p.style.top="0",p.style.bottom="0",p.style.width="5px",p.classList.add("tabulator-progress-handle"),m.style.display="inline-block",m.style.position="absolute",m.style.top="8px",m.style.bottom="8px",m.style.left="4px",m.style.marginRight="4px",m.style.backgroundColor="#488CE9",m.style.maxWidth="100%",m.style.minWidth="0%",l.style.padding="0 4px",h=Math.min(parseFloat(h),u),h=Math.max(parseFloat(h),c),h=100-Math.round((h-c)/d),m.style.right=h+"%",l.setAttribute("aria-valuemin",c),l.setAttribute("aria-valuemax",u),m.appendChild(p),p.addEventListener("mousedown",function(t){r=t.screenX,a=m.offsetWidth}),p.addEventListener("mouseover",function(){p.style.cursor="ew-resize"}),l.addEventListener("mousemove",function(t){r&&(m.style.width=a+t.screenX-r+"px")}),l.addEventListener("mouseup",function(t){r&&(t.stopPropagation(),t.stopImmediatePropagation(),r=!1,a=!1,s())}),l.addEventListener("keydown",function(t){switch(t.keyCode){case 39:m.style.width=m.clientWidth+l.clientWidth/100+"px";break;case 37:m.style.width=m.clientWidth-l.clientWidth/100+"px";break;case 13:s();break;case 27:i()}}),l.addEventListener("blur",function(){i()}),m},tickCross:function(t,e,o,i,n){function s(t){return l?t?c?u:a.checked:a.checked&&!c?(a.checked=!1,a.indeterminate=!0,c=!0,u):(c=!1,a.checked):a.checked}var r=t.getValue(),a=document.createElement("input"),l=n.tristate,u=void 0===n.indeterminateValue?null:n.indeterminateValue,c=!1;return a.setAttribute("type","checkbox"),a.style.marginTop="5px",a.style.boxSizing="border-box",a.value=r,!l||void 0!==r&&r!==u&&""!==r||(c=!0,a.indeterminate=!0),"firefox"!=this.table.browser&&e(function(){a.focus()}),a.checked=!0===r||"true"===r||"True"===r||1===r,a.addEventListener("change",function(t){o(s())}),a.addEventListener("blur",function(t){o(s(!0))}),a.addEventListener("keydown",function(t){13==t.keyCode&&o(s()),27==t.keyCode&&i()}),a}},c.prototype.registerModule("edit",w);var E=function(t){this.table=t,this.filterList=[],this.headerFilters={},this.headerFilterElements=[],this.headerFilterColumns=[],this.changed=!1};E.prototype.initializeColumn=function(t,e){function o(e){var o,r="input"==t.modules.filter.tagType&&"text"==t.modules.filter.attrType||"textarea"==t.modules.filter.tagType?"partial":"match",a="";if(void 0===i||i!==e){if(i=e,t.modules.filter.emptyFunc(e))delete n.headerFilters[s];else{switch(t.modules.filter.value=e,_typeof(t.definition.headerFilterFunc)){case"string":n.filters[t.definition.headerFilterFunc]?(a=t.definition.headerFilterFunc,o=function(o){return n.filters[t.definition.headerFilterFunc](e,t.getFieldValue(o))}):console.warn("Header Filter Error - Matching filter function not found: ",t.definition.headerFilterFunc);break;case"function":o=function(o){var i=t.definition.headerFilterFuncParams||{},n=t.getFieldValue(o);return i="function"==typeof i?i(e,n,o):i,t.definition.headerFilterFunc(e,n,o,i)},a=o}if(!o)switch(r){case"partial":o=function(o){return String(t.getFieldValue(o)).toLowerCase().indexOf(String(e).toLowerCase())>-1},a="like";break;default:o=function(o){return t.getFieldValue(o)==e},a="="}n.headerFilters[s]={value:e,func:o,type:a}}n.changed=!0,n.table.rowManager.filterRefresh()}}var i,n=this,s=t.getField();t.modules.filter={success:o,attrType:!1,tagType:!1,emptyFunc:!1},this.generateHeaderFilterElement(t)},E.prototype.generateHeaderFilterElement=function(t,e){function o(){}var i,n,s,r,a,l,u,c=this,d=t.modules.filter.success,h=t.getField() -;if(t.modules.filter.headerElement&&t.modules.filter.headerElement.parentNode&&t.modules.filter.headerElement.parentNode.removeChild(t.modules.filter.headerElement),h){switch(t.modules.filter.emptyFunc=t.definition.headerFilterEmptyCheck||function(t){return!t&&"0"!==t},i=document.createElement("div"),i.classList.add("tabulator-header-filter"),_typeof(t.definition.headerFilter)){case"string":c.table.modules.edit.editors[t.definition.headerFilter]?(n=c.table.modules.edit.editors[t.definition.headerFilter],"tick"!==t.definition.headerFilter&&"tickCross"!==t.definition.headerFilter||t.definition.headerFilterEmptyCheck||(t.modules.filter.emptyFunc=function(t){return!0!==t&&!1!==t})):console.warn("Filter Error - Cannot build header filter, No such editor found: ",t.definition.editor);break;case"function":n=t.definition.headerFilter;break;case"boolean":t.modules.edit&&t.modules.edit.editor?n=t.modules.edit.editor:t.definition.formatter&&c.table.modules.edit.editors[t.definition.formatter]?(n=c.table.modules.edit.editors[t.definition.formatter],"tick"!==t.definition.formatter&&"tickCross"!==t.definition.formatter||t.definition.headerFilterEmptyCheck||(t.modules.filter.emptyFunc=function(t){return!0!==t&&!1!==t})):n=c.table.modules.edit.editors.input}if(n){if(r={getValue:function(){return void 0!==e?e:""},getField:function(){return t.definition.field},getElement:function(){return i},getColumn:function(){return t.getComponent()},getRow:function(){return{normalizeHeight:function(){}}}},u=t.definition.headerFilterParams||{},u="function"==typeof u?u.call(c.table):u,!(s=n.call(this.table.modules.edit,r,function(){},d,o,u)))return void console.warn("Filter Error - Cannot add filter to "+h+" column, editor returned a value of false");if(!(s instanceof Node))return void console.warn("Filter Error - Cannot add filter to "+h+" column, editor should return an instance of Node, the editor returned:",s);h?c.table.modules.localize.bind("headerFilters|columns|"+t.definition.field,function(t){s.setAttribute("placeholder",void 0!==t&&t?t:c.table.modules.localize.getText("headerFilters|default"))}):c.table.modules.localize.bind("headerFilters|default",function(t){s.setAttribute("placeholder",void 0!==c.column.definition.headerFilterPlaceholder&&c.column.definition.headerFilterPlaceholder?c.column.definition.headerFilterPlaceholder:t)}),s.addEventListener("click",function(t){t.stopPropagation(),s.focus()}),a=!1,l=function(t){a&&clearTimeout(a),a=setTimeout(function(){d(s.value)},300)},t.modules.filter.headerElement=s,t.modules.filter.attrType=s.hasAttribute("type")?s.getAttribute("type").toLowerCase():"",t.modules.filter.tagType=s.tagName.toLowerCase(),!1!==t.definition.headerFilterLiveFilter&&("autocomplete"===t.definition.headerFilter||"autocomplete"===t.definition.editor&&!0===t.definition.headerFilter||(s.addEventListener("keyup",l),s.addEventListener("search",l),"number"==t.modules.filter.attrType&&s.addEventListener("change",function(t){d(s.value)}),"text"==t.modules.filter.attrType&&"ie"!==this.table.browser&&s.setAttribute("type","search")),"input"!=t.modules.filter.tagType&&"select"!=t.modules.filter.tagType&&"textarea"!=t.modules.filter.tagType||s.addEventListener("mousedown",function(t){t.stopPropagation()})),i.appendChild(s),t.contentElement.appendChild(i),c.headerFilterElements.push(s),c.headerFilterColumns.push(t)}}else console.warn("Filter Error - Cannot add header filter, column has no field set:",t.definition.title)},E.prototype.hideHeaderFilterElements=function(){this.headerFilterElements.forEach(function(t){t.style.display="none"})},E.prototype.showHeaderFilterElements=function(){this.headerFilterElements.forEach(function(t){t.style.display=""})},E.prototype.setHeaderFilterFocus=function(t){t.modules.filter&&t.modules.filter.headerElement?t.modules.filter.headerElement.focus():console.warn("Column Filter Focus Error - No header filter set on column:",t.getField())},E.prototype.setHeaderFilterValue=function(t,e){t&&(t.modules.filter&&t.modules.filter.headerElement?(this.generateHeaderFilterElement(t,e),t.modules.filter.success(e)):console.warn("Column Filter Error - No header filter set on column:",t.getField()))},E.prototype.reloadHeaderFilter=function(t){t&&(t.modules.filter&&t.modules.filter.headerElement?this.generateHeaderFilterElement(t,t.modules.filter.value):console.warn("Column Filter Error - No header filter set on column:",t.getField()))},E.prototype.hasChanged=function(){var t=this.changed;return this.changed=!1,t},E.prototype.setFilter=function(t,e,o){var i=this;i.filterList=[],Array.isArray(t)||(t=[{field:t,type:e,value:o}]),i.addFilter(t)},E.prototype.addFilter=function(t,e,o){var i=this;Array.isArray(t)||(t=[{field:t,type:e,value:o}]),t.forEach(function(t){(t=i.findFilter(t))&&(i.filterList.push(t),i.changed=!0)}),this.table.options.persistentFilter&&this.table.modExists("persistence",!0)&&this.table.modules.persistence.save("filter")},E.prototype.findFilter=function(t){var e,o=this;if(Array.isArray(t))return this.findSubFilters(t);var i=!1;return"function"==typeof t.field?i=function(e){return t.field(e,t.type||{})}:o.filters[t.type]?(e=o.table.columnManager.getColumnByField(t.field),i=e?function(i){return o.filters[t.type](t.value,e.getFieldValue(i))}:function(e){return o.filters[t.type](t.value,e[t.field])}):console.warn("Filter Error - No such filter type found, ignoring: ",t.type),t.func=i,!!t.func&&t},E.prototype.findSubFilters=function(t){var e=this,o=[];return t.forEach(function(t){(t=e.findFilter(t))&&o.push(t)}),!!o.length&&o},E.prototype.getFilters=function(t,e){var o=this,i=[];return t&&(i=o.getHeaderFilters()),o.filterList.forEach(function(t){i.push({field:t.field,type:t.type,value:t.value})}),e&&i.forEach(function(t){"function"==typeof t.type&&(t.type="function")}),i},E.prototype.getHeaderFilters=function(){var t=[];for(var e in this.headerFilters)t.push({field:e,type:this.headerFilters[e].type,value:this.headerFilters[e].value});return t},E.prototype.removeFilter=function(t,e,o){var i=this;Array.isArray(t)||(t=[{field:t,type:e,value:o}]),t.forEach(function(t){var e=-1;e="object"==_typeof(t.field)?i.filterList.findIndex(function(e){return t===e}):i.filterList.findIndex(function(e){return t.field===e.field&&t.type===e.type&&t.value===e.value}),e>-1?(i.filterList.splice(e,1),i.changed=!0):console.warn("Filter Error - No matching filter type found, ignoring: ",t.type)}),this.table.options.persistentFilter&&this.table.modExists("persistence",!0)&&this.table.modules.persistence.save("filter")},E.prototype.clearFilter=function(t){this.filterList=[],t&&this.clearHeaderFilter(),this.changed=!0,this.table.options.persistentFilter&&this.table.modExists("persistence",!0)&&this.table.modules.persistence.save("filter")},E.prototype.clearHeaderFilter=function(){var t=this;this.headerFilters={},this.headerFilterColumns.forEach(function(e){e.modules.filter.value=null,t.reloadHeaderFilter(e)}),this.changed=!0},E.prototype.search=function(t,e,o,i){var n=this,s=[],r=[];return Array.isArray(e)||(e=[{field:e,type:o,value:i}]),e.forEach(function(t){(t=n.findFilter(t))&&r.push(t)}),this.table.rowManager.rows.forEach(function(e){var o=!0;r.forEach(function(t){n.filterRecurse(t,e.getData())||(o=!1)}),o&&s.push("data"===t?e.getData("data"):e.getComponent())}),s},E.prototype.filter=function(t,e){var o=this,i=[],n=[];return o.table.options.dataFiltering&&o.table.options.dataFiltering.call(o.table,o.getFilters()),o.table.options.ajaxFiltering||!o.filterList.length&&!Object.keys(o.headerFilters).length?i=t.slice(0):t.forEach(function(t){o.filterRow(t)&&i.push(t)}),o.table.options.dataFiltered&&(i.forEach(function(t){n.push(t.getComponent())}),o.table.options.dataFiltered.call(o.table,o.getFilters(),n)),i},E.prototype.filterRow=function(t,e){var o=this,i=!0,n=t.getData();o.filterList.forEach(function(t){o.filterRecurse(t,n)||(i=!1)});for(var s in o.headerFilters)o.headerFilters[s].func(n)||(i=!1);return i},E.prototype.filterRecurse=function(t,e){var o=this,i=!1;return Array.isArray(t)?t.forEach(function(t){o.filterRecurse(t,e)&&(i=!0)}):i=t.func(e),i},E.prototype.filters={"=":function(t,e){return e==t},"<":function(t,e){return e":function(t,e){return e>t},">=":function(t,e){return e>=t},"!=":function(t,e){return e!=t},regex:function(t,e){return"string"==typeof t&&(t=new RegExp(t)),t.test(e)},like:function(t,e){return null===t||void 0===t?e===t:void 0!==e&&null!==e&&String(e).toLowerCase().indexOf(t.toLowerCase())>-1},in:function(t,e){return Array.isArray(t)?t.indexOf(e)>-1:(console.warn("Filter Error - filter value is not an array:",t),!1)}},c.prototype.registerModule("filter",E);var C=function(t){this.table=t};C.prototype.initializeColumn=function(t){var e=this,o={params:t.definition.formatterParams||{}};switch(_typeof(t.definition.formatter)){case"string":"tick"===t.definition.formatter&&(t.definition.formatter="tickCross",void 0===o.params.crossElement&&(o.params.crossElement=!1),console.warn("DEPRECATION WANRING - the tick formatter has been depricated, please use the tickCross formatter with the crossElement param set to false")),e.formatters[t.definition.formatter]?o.formatter=e.formatters[t.definition.formatter]:(console.warn("Formatter Error - No such formatter found: ",t.definition.formatter),o.formatter=e.formatters.plaintext);break;case"function":o.formatter=t.definition.formatter;break;default:o.formatter=e.formatters.plaintext}t.modules.format=o},C.prototype.cellRendered=function(t){t.column.modules.format.renderedCallback&&t.column.modules.format.renderedCallback()},C.prototype.formatValue=function(t){function e(e){t.column.modules.format.renderedCallback=e}var o=t.getComponent(),i="function"==typeof t.column.modules.format.params?t.column.modules.format.params(o):t.column.modules.format.params;return t.column.modules.format.formatter.call(this,o,i,e)},C.prototype.sanitizeHTML=function(t){if(t){var e={"&":"&","<":"<",">":">",'"':""","'":"'","/":"/","`":"`","=":"="};return String(t).replace(/[&<>"'`=\/]/g,function(t){return e[t]})}return t},C.prototype.emptyToSpace=function(t){return null===t||void 0===t?" ":t},C.prototype.getFormatter=function(t){var t;switch(void 0===t?"undefined":_typeof(t)){case"string":this.formatters[t]?t=this.formatters[t]:(console.warn("Formatter Error - No such formatter found: ",t),t=this.formatters.plaintext);break;case"function":t=t;break;default:t=this.formatters.plaintext}return t},C.prototype.formatters={plaintext:function(t,e,o){return this.emptyToSpace(this.sanitizeHTML(t.getValue()))},html:function(t,e,o){return t.getValue()},textarea:function(t,e,o){return t.getElement().style.whiteSpace="pre-wrap",this.emptyToSpace(this.sanitizeHTML(t.getValue()))},money:function(t,e,o){var i,n,s,r,a=parseFloat(t.getValue()),l=e.decimal||".",u=e.thousand||",",c=e.symbol||"",d=!!e.symbolAfter,h=void 0!==e.precision?e.precision:2;if(isNaN(a))return this.emptyToSpace(this.sanitizeHTML(t.getValue()));for(i=!1!==h?a.toFixed(h):a,i=String(i).split("."),n=i[0],s=i.length>1?l+i[1]:"",r=/(\d+)(\d{3})/;r.test(n);)n=n.replace(r,"$1"+u+"$2");return d?n+s+c:c+n+s},link:function(t,e,o){var i,n=this.sanitizeHTML(t.getValue()),s=e.urlPrefix||"",r=this.emptyToSpace(n),a=document.createElement("a");if(e.labelField&&(i=t.getData(),r=i[e.labelField]),e.label)switch(_typeof(e.label)){case"string":r=e.label;break;case"function":r=e.label(t)}if(e.urlField&&(i=t.getData(),n=i[e.urlField]),e.url)switch(_typeof(e.url)){case"string":n=e.url;break;case"function":n=e.url(t)}return a.setAttribute("href",s+n),e.target&&a.setAttribute("target",e.target),a.innerHTML=this.emptyToSpace(r),a},image:function(t,e,o){var i=document.createElement("img");switch(i.setAttribute("src",t.getValue()),_typeof(e.height)){case"number":element.style.height=e.height+"px";break;case"string":element.style.height=e.height}switch(_typeof(e.width)){case"number":element.style.width=e.width+"px";break;case"string":element.style.width=e.width}return i.addEventListener("load",function(){t.getRow().normalizeHeight()}),i},tickCross:function(t,e,o){var i=t.getValue(),n=t.getElement(),s=e.allowEmpty,r=e.allowTruthy,a=void 0!==e.tickElement?e.tickElement:'',l=void 0!==e.crossElement?e.crossElement:'';return r&&i||!0===i||"true"===i||"True"===i||1===i||"1"===i?(n.setAttribute("aria-checked",!0),a||""):!s||"null"!==i&&""!==i&&null!==i&&void 0!==i?(n.setAttribute("aria-checked",!1),l||""):(n.setAttribute("aria-checked","mixed"),"")},datetime:function(t,e,o){var i=e.inputFormat||"YYYY-MM-DD hh:mm:ss",n=e.outputFormat||"DD/MM/YYYY hh:mm:ss",s=void 0!==e.invalidPlaceholder?e.invalidPlaceholder:"",r=t.getValue(),a=moment(r,i);return a.isValid()?a.format(n):!0===s?r:"function"==typeof s?s(r):s},datetimediff:function(t,e,o){var i=e.inputFormat||"YYYY-MM-DD hh:mm:ss",n=void 0!==e.invalidPlaceholder?e.invalidPlaceholder:"",s=void 0!==e.suffix&&e.suffix,r=void 0!==e.unit?e.unit:void 0,a=void 0!==e.humanize&&e.humanize,l=void 0!==e.date?e.date:moment(),u=t.getValue(),c=moment(u,i);return c.isValid()?a?moment.duration(c.diff(l)).humanize(s):c.diff(l,r)+(s?" "+s:""):!0===n?u:"function"==typeof n?n(u):n},lookup:function(t,e,o){var i=t.getValue();return void 0===e[i]?(console.warn("Missing display value for "+i),i):e[i]},star:function(t,e,o){var i=t.getValue(),n=t.getElement(),s=e&&e.stars?e.stars:5,r=document.createElement("span"),a=document.createElementNS("http://www.w3.org/2000/svg","svg");r.style.verticalAlign="middle",a.setAttribute("width","14"),a.setAttribute("height","14"),a.setAttribute("viewBox","0 0 512 512"),a.setAttribute("xml:space","preserve"),a.style.padding="0 1px",i=parseInt(i)':'',r.appendChild(u)}return n.style.whiteSpace="nowrap",n.style.overflow="hidden",n.style.textOverflow="ellipsis",n.setAttribute("aria-label",i),r},progress:function(t,e,o){var i,n,s,r,a,l=this.sanitizeHTML(t.getValue())||0,u=t.getElement(),c=e&&e.max?e.max:100,d=e&&e.min?e.min:0,h=e&&e.legendAlign?e.legendAlign:"center";switch(n=parseFloat(l)<=c?parseFloat(l):c,n=parseFloat(n)>=d?parseFloat(n):d,i=(c-d)/100,n=Math.round((n-d)/i),_typeof(e.color)){case"string":s=e.color;break;case"function":s=e.color(l);break;case"object":if(Array.isArray(e.color)){var p=100/e.color.length,m=Math.floor(n/p);m=Math.min(m,e.color.length-1),m=Math.max(m,0),s=e.color[m];break}default:s="#2DC214"}switch(_typeof(e.legend)){case"string":r=e.legend;break;case"function":r=e.legend(l);break;case"boolean":r=l;break;default:r=!1}switch(_typeof(e.legendColor)){case"string":a=e.legendColor;break;case"function":a=e.legendColor(l);break;case"object":if(Array.isArray(e.legendColor)){var p=100/e.legendColor.length,m=Math.floor(n/p);m=Math.min(m,e.legendColor.length-1),m=Math.max(m,0),a=e.legendColor[m]}break;default:a="#000"}return u.style.minWidth="30px",u.style.position="relative",u.setAttribute("aria-label",n),"
"+(r?"
"+r+"
":"")},color:function(t,e,o){return t.getElement().style.backgroundColor=this.sanitizeHTML(t.getValue()),""},buttonTick:function(t,e,o){return''},buttonCross:function(t,e,o){return''},rownum:function(t,e,o){return this.table.rowManager.activeRows.indexOf(t.getRow()._getSelf())+1},handle:function(t,e,o){return t.getElement().classList.add("tabulator-row-handle"),"
"},responsiveCollapse:function(t,e,o){function i(e){var o=t.getRow().getElement().getElementsByClassName("tabulator-responsive-collapse")[0];s=e,s?(r.classList.add("open"),o&&(o.style.display="")):(r.classList.remove("open"),o&&(o.style.display="none"))}var n=this,s=!1,r=document.createElement("div");return r.classList.add("tabulator-responsive-collapse-toggle"),r.innerHTML="+-",t.getElement().classList.add("tabulator-row-handle"),n.table.options.responsiveLayoutCollapseStartOpen&&(s=!0),r.addEventListener("click",function(){i(!s)}),i(s),r}},c.prototype.registerModule("format",C);var x=function(t){this.table=t,this.leftColumns=[],this.rightColumns=[],this.leftMargin=0,this.rightMargin=0,this.initializationMode="left",this.active=!1};x.prototype.reset=function(){this.initializationMode="left",this.leftColumns=[],this.rightColumns=[],this.active=!1},x.prototype.initializeColumn=function(t){var e={margin:0,edge:!1};t.definition.frozen?t.parent.isGroup?console.warn("Frozen Column Error - Grouped columns cannot be frozen"):t.isGroup?console.warn("Frozen Column Error - Column Groups cannot be frozen"):(e.position=this.initializationMode,"left"==this.initializationMode?this.leftColumns.push(t):this.rightColumns.unshift(t),this.active=!0,t.modules.frozen=e):this.initializationMode="right"},x.prototype.layout=function(){var t=this,e=(this.table.rowManager.element,0);t.active&&(t.leftMargin=t._calcSpace(t.leftColumns,t.leftColumns.length),t.table.columnManager.headersElement.style.marginLeft=t.leftMargin+"px",t.rightMargin=t._calcSpace(t.rightColumns,t.rightColumns.length),t.table.columnManager.element.style.paddingRight=t.rightMargin+"px",t.table.rowManager.activeRows.forEach(function(e){t.layoutRow(e)}),t.table.modExists("columnCalcs")&&(t.table.modules.columnCalcs.topInitialized&&t.table.modules.columnCalcs.topRow&&t.layoutRow(t.table.modules.columnCalcs.topRow),t.table.modules.columnCalcs.botInitialized&&t.table.modules.columnCalcs.botRow&&t.layoutRow(t.table.modules.columnCalcs.botRow)),t.leftColumns.forEach(function(e,o){e.modules.frozen.margin=t._calcSpace(t.leftColumns,o)+t.table.columnManager.scrollLeft,o==t.leftColumns.length-1?e.modules.frozen.edge=!0:e.modules.frozen.edge=!1,t.layoutColumn(e)}),e=t.table.rowManager.element.clientWidth+t.table.columnManager.scrollLeft,t.rightColumns.forEach(function(o,i){o.modules.frozen.margin=e-t._calcSpace(t.rightColumns,i+1),i==t.rightColumns.length-1?o.modules.frozen.edge=!0:o.modules.frozen.edge=!1,t.layoutColumn(o)}),this.table.rowManager.tableElement.style.marginRight=this.rightMargin+"px")},x.prototype.layoutColumn=function(t){var e=this;e.layoutElement(t.getElement(),t),t.cells.forEach(function(o){e.layoutElement(o.getElement(),t)})},x.prototype.layoutRow=function(t){t.getElement().style.paddingLeft=this.leftMargin+"px"},x.prototype.layoutElement=function(t,e){e.modules.frozen&&(t.style.position="absolute",t.style.left=e.modules.frozen.margin+"px",t.classList.add("tabulator-frozen"),e.modules.frozen.edge&&t.classList.add("tabulator-frozen-"+e.modules.frozen.position))},x.prototype._calcSpace=function(t,e){for(var o=0,i=0;i-1&&e.splice(o,1)}),e},R.prototype.freezeRow=function(t){t.modules.frozen?console.warn("Freeze Error - Row is already frozen"):(t.modules.frozen=!0,this.topElement.appendChild(t.getElement()),t.initialize(),t.normalizeHeight(),this.table.rowManager.adjustTableSize(),this.rows.push(t),this.table.rowManager.refreshActiveData("display"),this.styleRows())},R.prototype.unfreezeRow=function(t){var e=this.rows.indexOf(t);if(t.modules.frozen){t.modules.frozen=!1;var o=t.getElement();o.parentNode.removeChild(o),this.table.rowManager.adjustTableSize(),this.rows.splice(e,1),this.table.rowManager.refreshActiveData("display"),this.rows.length&&this.styleRows()}else console.warn("Freeze Error - Row is already unfrozen")},R.prototype.styleRows=function(t){var e=this;this.rows.forEach(function(t,o){e.table.rowManager.styleRow(t,o)})},c.prototype.registerModule("frozenRows",R);var D=function(t){this._group=t,this.type="GroupComponent"};D.prototype.getKey=function(){return this._group.key},D.prototype.getElement=function(){return this._group.element},D.prototype.getRows=function(){return this._group.getRows(!0)},D.prototype.getSubGroups=function(){return this._group.getSubGroups(!0)},D.prototype.getParentGroup=function(){return!!this._group.parent&&this._group.parent.getComponent()},D.prototype.getVisibility=function(){return this._group.visible},D.prototype.show=function(){this._group.show()},D.prototype.hide=function(){this._group.hide()},D.prototype.toggle=function(){this._group.toggleVisibility()},D.prototype._getSelf=function(){return this._group},D.prototype.getTable=function(){return this._group.table};var M=function(t,e,o,i,n,s,r){this.groupManager=t,this.parent=e,this.key=i,this.level=o,this.field=n,this.hasSubGroups=o-1?o?this.rows.splice(n+1,0,t):this.rows.splice(n,0,t):o?this.rows.push(t):this.rows.unshift(t),t.modules.group=this,this.generateGroupHeaderContents(),this.groupManager.table.modExists("columnCalcs")&&"table"!=this.groupManager.table.options.columnCalcs&&this.groupManager.table.modules.columnCalcs.recalcGroup(this)},M.prototype.getRowIndex=function(t){},M.prototype.conformRowData=function(t){return this.field?t[this.field]=this.key:console.warn("Data Conforming Error - Cannot conform row data to match new group as groupBy is a function"),this.parent&&(t=this.parent.conformRowData(t)),t},M.prototype.removeRow=function(t){var e=this.rows.indexOf(t);e>-1&&this.rows.splice(e,1),this.rows.length?(this.generateGroupHeaderContents(),this.groupManager.table.modExists("columnCalcs")&&"table"!=this.groupManager.table.options.columnCalcs&&this.groupManager.table.modules.columnCalcs.recalcGroup(this)):(this.parent?this.parent.removeGroup(this):this.groupManager.removeGroup(this),this.groupManager.updateGroupRows(!0))},M.prototype.removeGroup=function(t){var e,o=t.level+"_"+t.key;this.groups[o]&&(delete this.groups[o],e=this.groupList.indexOf(t),e>-1&&this.groupList.splice(e,1),this.groupList.length||(this.parent?this.parent.removeGroup(this):this.groupManager.removeGroup(this)))},M.prototype.getHeadersAndRows=function(){var t=[];return t.push(this),this._visSet(),this.visible?this.groupList.length?this.groupList.forEach(function(e){t=t.concat(e.getHeadersAndRows())}):("table"!=this.groupManager.table.options.columnCalcs&&this.groupManager.table.modExists("columnCalcs")&&this.groupManager.table.modules.columnCalcs.hasTopCalcs()&&(this.calcs.top=this.groupManager.table.modules.columnCalcs.generateTopRow(this.rows),t.push(this.calcs.top)),t=t.concat(this.rows),"table"!=this.groupManager.table.options.columnCalcs&&this.groupManager.table.modExists("columnCalcs")&&this.groupManager.table.modules.columnCalcs.hasBottomCalcs()&&(this.calcs.bottom=this.groupManager.table.modules.columnCalcs.generateBottomRow(this.rows),t.push(this.calcs.bottom))):!this.groupList.length&&"table"!=this.groupManager.table.options.columnCalcs&&this.groupManager.table.options.groupClosedShowCalcs&&this.groupManager.table.modExists("columnCalcs")&&(this.groupManager.table.modules.columnCalcs.hasTopCalcs()&&(this.calcs.top=this.groupManager.table.modules.columnCalcs.generateTopRow(this.rows),t.push(this.calcs.top)),this.groupManager.table.modules.columnCalcs.hasBottomCalcs()&&(this.calcs.bottom=this.groupManager.table.modules.columnCalcs.generateBottomRow(this.rows),t.push(this.calcs.bottom))),t},M.prototype.getData=function(t,e){var o=[];return this._visSet(),(!t||t&&this.visible)&&this.rows.forEach(function(t){o.push(t.getData(e||"data"))}),o},M.prototype.getRowCount=function(){var t=0;return this.groupList.length?this.groupList.forEach(function(e){t+=e.getRowCount()}):t=this.rows.length,t},M.prototype.toggleVisibility=function(){this.visible?this.hide():this.show()},M.prototype.hide=function(){this.visible=!1,"classic"!=this.groupManager.table.rowManager.getRenderMode()||this.groupManager.table.options.pagination?this.groupManager.updateGroupRows(!0):(this.element.classList.remove("tabulator-group-visible"),this.groupList.length?this.groupList.forEach(function(t){var e;t.calcs.top&&(e=t.calcs.top.getElement(),e.parentNode.removeChild(e)),t.calcs.bottom&&(e=t.calcs.bottom.getElement(),e.parentNode.removeChild(e)),t.getHeadersAndRows().forEach(function(t){var e=t.getElement();e.parentNode.removeChild(e)})}):this.rows.forEach(function(t){var e=t.getElement();e.parentNode.removeChild(e)}),this.groupManager.table.rowManager.setDisplayRows(this.groupManager.updateGroupRows(),this.groupManager.getDisplayIndex())),this.groupManager.table.options.groupVisibilityChanged.call(this.table,this.getComponent(),!1)},M.prototype.show=function(){var t=this;if(t.visible=!0, -"classic"!=this.groupManager.table.rowManager.getRenderMode()||this.groupManager.table.options.pagination)this.groupManager.updateGroupRows(!0);else{this.element.classList.add("tabulator-group-visible");var e=t.getElement();this.groupList.length?this.groupList.forEach(function(t){t.getHeadersAndRows().forEach(function(t){var o=t.getElement();e.parentNode.insertBefore(o,e.nextSibling),t.initialize(),e=o})}):t.rows.forEach(function(t){var o=t.getElement();e.parentNode.insertBefore(o,e.nextSibling),t.initialize(),e=o}),this.groupManager.table.rowManager.setDisplayRows(this.groupManager.updateGroupRows(),this.groupManager.getDisplayIndex())}this.groupManager.table.options.groupVisibilityChanged.call(this.table,this.getComponent(),!0)},M.prototype._visSet=function(){var t=[];"function"==typeof this.visible&&(this.rows.forEach(function(e){t.push(e.getData())}),this.visible=this.visible(this.key,this.getRowCount(),t,this.getComponent()))},M.prototype.getRowGroup=function(t){var e=!1;return this.groupList.length?this.groupList.forEach(function(o){var i=o.getRowGroup(t);i&&(e=i)}):this.rows.find(function(e){return e===t})&&(e=this),e},M.prototype.getSubGroups=function(t){var e=[];return this.groupList.forEach(function(o){e.push(t?o.getComponent():o)}),e},M.prototype.getRows=function(t){var e=[];return this.rows.forEach(function(o){e.push(t?o.getComponent():o)}),e},M.prototype.generateGroupHeaderContents=function(){var t=[];for(this.rows.forEach(function(e){t.push(e.getData())}),this.elementContents=this.generator(this.key,this.getRowCount(),t,this.getComponent());this.element.firstChild;)this.element.removeChild(this.element.firstChild);"string"==typeof this.elementContents?this.element.innerHTML=this.elementContents:this.element.appendChild(this.elementContents),this.element.insertBefore(this.arrowElement,this.element.firstChild)},M.prototype.getElement=function(){return this.addBindingsd=!1,this._visSet(),this.visible?this.element.classList.add("tabulator-group-visible"):this.element.classList.remove("tabulator-group-visible"),this.element.childNodes.forEach(function(t){t.parentNode.removeChild(t)}),this.generateGroupHeaderContents(),this.element},M.prototype.normalizeHeight=function(){this.setHeight(this.element.clientHeight)},M.prototype.initialize=function(t){this.initialized&&!t||(this.normalizeHeight(),this.initialized=!0)},M.prototype.reinitialize=function(){this.initialized=!1,this.height=0,c.prototype.helpers.elVisible(this.element)&&this.initialize(!0)},M.prototype.setHeight=function(t){this.height!=t&&(this.height=t,this.outerHeight=this.element.offsetHeight)},M.prototype.getHeight=function(){return this.outerHeight},M.prototype.getGroup=function(){return this},M.prototype.reinitializeHeight=function(){},M.prototype.calcHeight=function(){},M.prototype.setCellHeight=function(){},M.prototype.clearCellHeight=function(){},M.prototype.getComponent=function(){return new D(this)};var L=function(t){this.table=t,this.groupIDLookups=!1,this.startOpen=[function(){return!1}],this.headerGenerator=[function(){return""}],this.groupList=[],this.allowedValues=!1,this.groups={},this.displayIndex=0};L.prototype.initialize=function(){var t=this,e=t.table.options.groupBy,o=t.table.options.groupStartOpen,i=t.table.options.groupHeader;if(this.allowedValues=t.table.options.groupValues,t.headerGenerator=[function(){return""}],this.startOpen=[function(){return!1}],t.table.modules.localize.bind("groups|item",function(e,o){t.headerGenerator[0]=function(t,i,n){return(void 0===t?"":t)+"("+i+" "+(1===i?e:o.groups.items)+")"}}),this.groupIDLookups=[],Array.isArray(e)||e)this.table.modExists("columnCalcs")&&"table"!=this.table.options.columnCalcs&&"both"!=this.table.options.columnCalcs&&this.table.modules.columnCalcs.removeCalcs();else if(this.table.modExists("columnCalcs")&&"group"!=this.table.options.columnCalcs){var n=this.table.columnManager.getRealColumns();n.forEach(function(e){e.definition.topCalc&&t.table.modules.columnCalcs.initializeTopRow(),e.definition.bottomCalc&&t.table.modules.columnCalcs.initializeBottomRow()})}Array.isArray(e)||(e=[e]),e.forEach(function(e,o){var i,n;"function"==typeof e?i=e:(n=t.table.columnManager.getColumnByField(e),i=n?function(t){return n.getFieldValue(t)}:function(t){return t[e]}),t.groupIDLookups.push({field:"function"!=typeof e&&e,func:i,values:!!t.allowedValues&&t.allowedValues[o]})}),o&&(Array.isArray(o)||(o=[o]),o.forEach(function(t){t="function"==typeof t?t:function(){return!0}}),t.startOpen=o),i&&(t.headerGenerator=Array.isArray(i)?i:[i]),this.initialized=!0},L.prototype.setDisplayIndex=function(t){this.displayIndex=t},L.prototype.getDisplayIndex=function(){return this.displayIndex},L.prototype.getRows=function(t){return this.groupIDLookups.length?(this.table.options.dataGrouping.call(this.table),this.generateGroups(t),this.table.options.dataGrouped&&this.table.options.dataGrouped.call(this.table,this.getGroups(!0)),this.updateGroupRows()):t.slice(0)},L.prototype.getGroups=function(t){var e=[];return this.groupList.forEach(function(o){e.push(t?o.getComponent():o)}),e},L.prototype.pullGroupListData=function(t){var e=this,o=[];return t.forEach(function(t){var i={};i.level=0,i.rowCount=0,i.headerContent="";var n=[];t.hasSubGroups?(n=e.pullGroupListData(t.groupList),i.level=t.level,i.rowCount=n.length-t.groupList.length,i.headerContent=t.generator(t.key,i.rowCount,t.rows,t),o.push(i),o=o.concat(n)):(i.level=t.level,i.headerContent=t.generator(t.key,t.rows.length,t.rows,t),i.rowCount=t.getRows().length,o.push(i),t.getRows().forEach(function(t){o.push(t.getData("data"))}))}),o},L.prototype.getGroupedData=function(){return this.pullGroupListData(this.groupList)},L.prototype.getRowGroup=function(t){var e=!1;return this.groupList.forEach(function(o){var i=o.getRowGroup(t);i&&(e=i)}),e},L.prototype.countGroups=function(){return this.groupList.length},L.prototype.generateGroups=function(t){var e=this,o=e.groups;e.groups={},e.groupList=[],this.allowedValues&&this.allowedValues[0]?(this.allowedValues[0].forEach(function(t){e.createGroup(t,0,o)}),t.forEach(function(t){e.assignRowToExistingGroup(t,o)})):t.forEach(function(t){e.assignRowToGroup(t,o)})},L.prototype.createGroup=function(t,e,o){var i,n=e+"_"+t;o=o||[],i=new M(this,!1,e,t,this.groupIDLookups[0].field,this.headerGenerator[0],o[n]),this.groups[n]=i,this.groupList.push(i)},L.prototype.assignRowToGroup=function(t,e){var o=this.groupIDLookups[0].func(t.getData()),i="0_"+o;this.groups[i]||this.createGroup(o,0,e),this.groups[i].addRow(t)},L.prototype.assignRowToExistingGroup=function(t,e){var o=this.groupIDLookups[0].func(t.getData()),i="0_"+o;this.groups[i]&&this.groups[i].addRow(t)},L.prototype.assignRowToGroup=function(t,e){var o=this.groupIDLookups[0].func(t.getData()),i=!this.groups["0_"+o];return i&&this.createGroup(o,0,e),this.groups["0_"+o].addRow(t),!i},L.prototype.updateGroupRows=function(t){var e=this,o=[];if(e.groupList.forEach(function(t){o=o.concat(t.getHeadersAndRows())}),t){var i=e.table.rowManager.setDisplayRows(o,this.getDisplayIndex());!0!==i&&this.setDisplayIndex(i),e.table.rowManager.refreshActiveData("group",!0,!0)}return o},L.prototype.scrollHeaders=function(t){this.groupList.forEach(function(e){e.arrowElement.style.marginLeft=t+"px"})},L.prototype.removeGroup=function(t){var e,o=t.level+"_"+t.key;this.groups[o]&&(delete this.groups[o],(e=this.groupList.indexOf(t))>-1&&this.groupList.splice(e,1))},c.prototype.registerModule("groupRows",L);var T=function(t){this.table=t,this.history=[],this.index=-1};T.prototype.clear=function(){this.history=[],this.index=-1},T.prototype.action=function(t,e,o){this.history=this.history.slice(0,this.index+1),this.history.push({type:t,component:e,data:o}),this.index++},T.prototype.getHistoryUndoSize=function(){return this.index+1},T.prototype.getHistoryRedoSize=function(){return this.history.length-(this.index+1)},T.prototype.undo=function(){if(this.index>-1){var t=this.history[this.index];return this.undoers[t.type].call(this,t),this.index--,this.table.options.historyUndo.call(this.table,t.type,t.component.getComponent(),t.data),!0}return console.warn("History Undo Error - No more history to undo"),!1},T.prototype.redo=function(){if(this.history.length-1>this.index){this.index++;var t=this.history[this.index];return this.redoers[t.type].call(this,t),this.table.options.historyRedo.call(this.table,t.type,t.component.getComponent(),t.data),!0}return console.warn("History Redo Error - No more history to redo"),!1},T.prototype.undoers={cellEdit:function(t){t.component.setValueProcessData(t.data.oldValue)},rowAdd:function(t){t.component.deleteActual()},rowDelete:function(t){var e=this.table.rowManager.addRowActual(t.data.data,t.data.pos,t.data.index);this._rebindRow(t.component,e)},rowMove:function(t){this.table.rowManager.moveRowActual(t.component,this.table.rowManager.rows[t.data.pos],!1),this.table.rowManager.redraw()}},T.prototype.redoers={cellEdit:function(t){t.component.setValueProcessData(t.data.newValue)},rowAdd:function(t){var e=this.table.rowManager.addRowActual(t.data.data,t.data.pos,t.data.index);this._rebindRow(t.component,e)},rowDelete:function(t){t.component.deleteActual()},rowMove:function(t){this.table.rowManager.moveRowActual(t.component,this.table.rowManager.rows[t.data.pos],!1),this.table.rowManager.redraw()}},T.prototype._rebindRow=function(t,e){this.history.forEach(function(o){if(o.component instanceof r)o.component===t&&(o.component=e);else if(o.component instanceof l&&o.component.row===t){var i=o.component.column.getField();i&&(o.component=e.getCell(i))}})},c.prototype.registerModule("history",T);var k=function(t){this.table=t,this.fieldIndex=[],this.hasIndex=!1};k.prototype.parseTable=function(){var t=this,e=t.table.element,o=t.table.options,i=(o.columns,e.getElementsByTagName("th")),n=e.getElementsByTagName("tbody")[0],s=[];t.hasIndex=!1,t.table.options.htmlImporting.call(this.table),n=n?n.getElementsByTagName("tr"):[],t._extractOptions(e,o),i.length?t._extractHeaders(i,n):t._generateBlankHeaders(i,n);for(var r=0;r-1&&t.pressedKeys.splice(i,1)}},this.table.element.addEventListener("keydown",this.keyupBinding),this.table.element.addEventListener("keyup",this.keydownBinding)},z.prototype.clearBindings=function(){this.keyupBinding&&this.table.element.removeEventListener("keydown",this.keyupBinding),this.keydownBinding&&this.table.element.removeEventListener("keyup",this.keydownBinding)},z.prototype.checkBinding=function(t,e){var o=this,i=!0;return t.ctrlKey==e.ctrl&&t.shiftKey==e.shift&&(e.keys.forEach(function(t){-1==o.pressedKeys.indexOf(t)&&(i=!1)}),i&&e.action.call(o,t),!0)},z.prototype.bindings={navPrev:"shift + 9",navNext:9,navUp:38,navDown:40,scrollPageUp:33,scrollPageDown:34,scrollToStart:36,scrollToEnd:35,undo:"ctrl + 90",redo:"ctrl + 89",copyToClipboard:"ctrl + 67"},z.prototype.actions={keyBlock:function(t){t.stopPropagation(),t.preventDefault()},scrollPageUp:function(t){var e=this.table.rowManager,o=e.scrollTop-e.height;e.element.scrollHeight;t.preventDefault(),e.displayRowsCount&&(o>=0?e.element.scrollTop=o:e.scrollToRow(e.getDisplayRows()[0])),this.table.element.focus()},scrollPageDown:function(t){var e=this.table.rowManager,o=e.scrollTop+e.height,i=e.element.scrollHeight;t.preventDefault(),e.displayRowsCount&&(o<=i?e.element.scrollTop=o:e.scrollToRow(e.getDisplayRows()[e.displayRowsCount-1])),this.table.element.focus()},scrollToStart:function(t){var e=this.table.rowManager;t.preventDefault(),e.displayRowsCount&&e.scrollToRow(e.getDisplayRows()[0]),this.table.element.focus()},scrollToEnd:function(t){var e=this.table.rowManager;t.preventDefault(),e.displayRowsCount&&e.scrollToRow(e.getDisplayRows()[e.displayRowsCount-1]),this.table.element.focus()},navPrev:function(t){var e=!1;this.table.modExists("edit")&&(e=this.table.modules.edit.currentCell)&&(t.preventDefault(),e.nav().prev())},navNext:function(t){var e=!1;this.table.modExists("edit")&&(e=this.table.modules.edit.currentCell)&&(t.preventDefault(),e.nav().next())},navLeft:function(t){var e=!1;this.table.modExists("edit")&&(e=this.table.modules.edit.currentCell)&&(t.preventDefault(),e.nav().left())},navRight:function(t){var e=!1;this.table.modExists("edit")&&(e=this.table.modules.edit.currentCell)&&(t.preventDefault(),e.nav().right())},navUp:function(t){var e=!1;this.table.modExists("edit")&&(e=this.table.modules.edit.currentCell)&&(t.preventDefault(),e.nav().up())},navDown:function(t){var e=!1;this.table.modExists("edit")&&(e=this.table.modules.edit.currentCell)&&(t.preventDefault(),e.nav().down())},undo:function(t){this.table.options.history&&this.table.modExists("history")&&this.table.modExists("edit")&&(this.table.modules.edit.currentCell||(t.preventDefault(),this.table.modules.history.undo()))},redo:function(t){this.table.options.history&&this.table.modExists("history")&&this.table.modExists("edit")&&(this.table.modules.edit.currentCell||(t.preventDefault(),this.table.modules.history.redo()))},copyToClipboard:function(t){this.table.modules.edit.currentCell||this.table.modExists("clipboard",!0)&&this.table.modules.clipboard.copy(this.table.options.selectable&&"highlight"!=this.table.options.selectable?"selected":"active",null,null,null,!0)}},c.prototype.registerModule("keybindings",z);var S=function(t){this.table=t,this.placeholderElement=this.createPlaceholderElement(),this.hoverElement=!1,this.checkTimeout=!1,this.checkPeriod=250,this.moving=!1,this.toCol=!1,this.toColAfter=!1,this.startX=0,this.autoScrollMargin=40,this.autoScrollStep=5,this.autoScrollTimeout=!1,this.moveHover=this.moveHover.bind(this),this.endMove=this.endMove.bind(this)};S.prototype.createPlaceholderElement=function(){var t=document.createElement("div");return t.classList.add("tabulator-col"),t.classList.add("tabulator-col-placeholder"),t},S.prototype.initializeColumn=function(t){var e,o=this,i={};t.modules.frozen||(e=t.getElement(),i.mousemove=function(i){t.parent===o.moving.parent&&(i.pageX-c.prototype.helpers.elOffset(e).left+o.table.columnManager.element.scrollLeft>t.getWidth()/2?o.toCol===t&&o.toColAfter||(e.parentNode.insertBefore(o.placeholderElement,e.nextSibling),o.moveColumn(t,!0)):(o.toCol!==t||o.toColAfter)&&(e.parentNode.insertBefore(o.placeholderElement,e),o.moveColumn(t,!1)))}.bind(o),e.addEventListener("mousedown",function(e){1===e.which&&(o.checkTimeout=setTimeout(function(){o.startMove(e,t)},o.checkPeriod))}),e.addEventListener("mouseup",function(t){1===t.which&&o.checkTimeout&&clearTimeout(o.checkTimeout)})),t.modules.moveColumn=i},S.prototype.startMove=function(t,e){var o=e.getElement();this.moving=e,this.startX=t.pageX-c.prototype.helpers.elOffset(o).left,this.table.element.classList.add("tabulator-block-select"),this.placeholderElement.style.width=e.getWidth()+"px",this.placeholderElement.style.height=e.getHeight()+"px",o.parentNode.insertBefore(this.placeholderElement,o),o.parentNode.removeChild(o),this.hoverElement=o.cloneNode(!0),this.hoverElement.classList.add("tabulator-moving"),this.table.columnManager.getElement().appendChild(this.hoverElement),this.hoverElement.style.left="0",this.hoverElement.style.bottom="0",this._bindMouseMove(),document.body.addEventListener("mousemove",this.moveHover),document.body.addEventListener("mouseup",this.endMove),this.moveHover(t)},S.prototype._bindMouseMove=function(){this.table.columnManager.columnsByIndex.forEach(function(t){t.modules.moveColumn.mousemove&&t.getElement().addEventListener("mousemove",t.modules.moveColumn.mousemove)})},S.prototype._unbindMouseMove=function(){this.table.columnManager.columnsByIndex.forEach(function(t){t.modules.moveColumn.mousemove&&t.getElement().removeEventListener("mousemove",t.modules.moveColumn.mousemove)})},S.prototype.moveColumn=function(t,e){var o=this.moving.getCells();this.toCol=t,this.toColAfter=e,e?t.getCells().forEach(function(t,e){var i=t.getElement();i.parentNode.insertBefore(o[e].getElement(),i.nextSibling)}):t.getCells().forEach(function(t,e){var i=t.getElement();i.parentNode.insertBefore(o[e].getElement(),i)})},S.prototype.endMove=function(t){1===t.which&&(this._unbindMouseMove(),this.placeholderElement.parentNode.insertBefore(this.moving.getElement(),this.placeholderElement.nextSibling),this.placeholderElement.parentNode.removeChild(this.placeholderElement),this.hoverElement.parentNode.removeChild(this.hoverElement),this.table.element.classList.remove("tabulator-block-select"),this.toCol&&this.table.columnManager.moveColumn(this.moving,this.toCol,this.toColAfter),this.moving=!1,this.toCol=!1,this.toColAfter=!1,document.body.removeEventListener("mousemove",this.moveHover),document.body.removeEventListener("mouseup",this.endMove))},S.prototype.moveHover=function(t){var e,o=this,i=o.table.columnManager.getElement(),n=i.scrollLeft,s=t.pageX-c.prototype.helpers.elOffset(i).left+n;o.hoverElement.style.left=s-o.startX+"px",s-nt.getHeight()/2){if(o.toRow!==t||!o.toRowAfter){var i=t.getElement();i.parentNode.insertBefore(o.placeholderElement,i.nextSibling),o.moveRow(t,!0)}}else if(o.toRow!==t||o.toRowAfter){var i=t.getElement();i.parentNode.insertBefore(o.placeholderElement,i),o.moveRow(t,!1)}}.bind(o),this.hasHandle||(e=t.getElement(),e.addEventListener("mousedown",function(e){1===e.which&&(o.checkTimeout=setTimeout(function(){o.startMove(e,t)},o.checkPeriod))}),e.addEventListener("mouseup",function(t){1===t.which&&o.checkTimeout&&clearTimeout(o.checkTimeout)})),t.modules.moveRow=i},_.prototype.initializeCell=function(t){var e=this,o=t.getElement();o.addEventListener("mousedown",function(o){1===o.which&&(e.checkTimeout=setTimeout(function(){e.startMove(o,t.row)},e.checkPeriod))}),o.addEventListener("mouseup",function(t){1===t.which&&e.checkTimeout&&clearTimeout(e.checkTimeout)})},_.prototype._bindMouseMove=function(){this.table.rowManager.getDisplayRows().forEach(function(t){"row"===t.type&&t.modules.moveRow.mousemove&&t.getElement().addEventListener("mousemove",t.modules.moveRow.mousemove)})},_.prototype._unbindMouseMove=function(){this.table.rowManager.getDisplayRows().forEach(function(t){"row"===t.type&&t.modules.moveRow.mousemove&&t.getElement().removeEventListener("mousemove",t.modules.moveRow.mousemove)})},_.prototype.startMove=function(t,e){var o=e.getElement();this.setStartPosition(t,e),this.moving=e,this.table.element.classList.add("tabulator-block-select"),this.placeholderElement.style.width=e.getWidth()+"px",this.placeholderElement.style.height=e.getHeight()+"px",this.connection?(this.table.element.classList.add("tabulator-movingrow-sending"),this.connectToTables(e)):(o.parentNode.insertBefore(this.placeholderElement,o),o.parentNode.removeChild(o)),this.hoverElement=o.cloneNode(!0),this.hoverElement.classList.add("tabulator-moving"),this.connection?(document.body.appendChild(this.hoverElement),this.hoverElement.style.left="0",this.hoverElement.style.top="0",this.hoverElement.style.width=this.table.element.clientWidth+"px",this.hoverElement.style.whiteSpace="nowrap",this.hoverElement.style.overflow="hidden",this.hoverElement.style.pointerEvents="none"):(this.table.rowManager.getTableElement().appendChild(this.hoverElement),this.hoverElement.style.left="0",this.hoverElement.style.top="0",this._bindMouseMove()),document.body.addEventListener("mousemove",this.moveHover),document.body.addEventListener("mouseup",this.endMove),this.moveHover(t)},_.prototype.setStartPosition=function(t,e){var o,i;o=e.getElement(),this.connection?(i=o.getBoundingClientRect(),this.startX=i.left-t.pageX+window.scrollX,this.startY=i.top-t.pageY+window.scrollY):this.startY=t.pageY-o.getBoundingClientRect().top},_.prototype.endMove=function(t){t&&1!==t.which||(this._unbindMouseMove(),this.connection||(this.placeholderElement.parentNode.insertBefore(this.moving.getElement(),this.placeholderElement.nextSibling),this.placeholderElement.parentNode.removeChild(this.placeholderElement)),this.hoverElement.parentNode.removeChild(this.hoverElement),this.table.element.classList.remove("tabulator-block-select"),this.toRow&&this.table.rowManager.moveRow(this.moving,this.toRow,this.toRowAfter),this.moving=!1,this.toRow=!1,this.toRowAfter=!1,document.body.removeEventListener("mousemove",this.moveHover),document.body.removeEventListener("mouseup",this.endMove),this.connection&&(this.table.element.classList.remove("tabulator-movingrow-sending"),this.disconnectFromTables()))},_.prototype.moveRow=function(t,e){this.toRow=t,this.toRowAfter=e},_.prototype.moveHover=function(t){this.connection?this.moveHoverConnections.call(this,t):this.moveHoverTable.call(this,t)},_.prototype.moveHoverTable=function(t){var e=this.table.rowManager.getElement(),o=e.scrollTop,i=t.pageY-e.getBoundingClientRect().top+o;this.hoverElement.style.top=i-this.startY+"px"},_.prototype.moveHoverConnections=function(t){this.hoverElement.style.left=this.startX+t.pageX+"px",this.hoverElement.style.top=this.startY+t.pageY+"px"},_.prototype.connectToTables=function(t){var e=this.table.modules.comms.getConnections(this.connection);this.table.options.movableRowsSendingStart.call(this.table,e),this.table.modules.comms.send(this.connection,"moveRow","connect",{row:t})},_.prototype.disconnectFromTables=function(){var t=this.table.modules.comms.getConnections(this.connection);this.table.options.movableRowsSendingStop.call(this.table,t),this.table.modules.comms.send(this.connection,"moveRow","disconnect")},_.prototype.connect=function(t,e){var o=this;return this.connectedTable?(console.warn("Move Row Error - Table cannot accept connection, already connected to table:",this.connectedTable),!1):(this.connectedTable=t,this.connectedRow=e,this.table.element.classList.add("tabulator-movingrow-receiving"),o.table.rowManager.getDisplayRows().forEach(function(t){"row"===t.type&&t.modules.moveRow&&t.modules.moveRow.mouseup&&t.getElement().addEventListener("mouseup",t.modules.moveRow.mouseup)}),o.tableRowDropEvent=o.tableRowDrop.bind(o),o.table.element.addEventListener("mouseup",o.tableRowDropEvent),this.table.options.movableRowsReceivingStart.call(this.table,e,t),!0)},_.prototype.disconnect=function(t){var e=this;t===this.connectedTable?(this.connectedTable=!1,this.connectedRow=!1,this.table.element.classList.remove("tabulator-movingrow-receiving"),e.table.rowManager.getDisplayRows().forEach(function(t){"row"===t.type&&t.modules.moveRow&&t.modules.moveRow.mouseup&&t.getElement().removeEventListener("mouseup",t.modules.moveRow.mouseup)}),e.table.element.removeEventListener("mouseup",e.tableRowDropEvent),this.table.options.movableRowsReceivingStop.call(this.table,t)):console.warn("Move Row Error - trying to disconnect from non connected table")},_.prototype.dropComplete=function(t,e,o){var i=!1;if(o){switch(_typeof(this.table.options.movableRowsSender)){case"string":i=this.senders[this.table.options.movableRowsSender];break;case"function":i=this.table.options.movableRowsSender}i?i.call(this,this.moving.getComponent(),e?e.getComponent():void 0,t):this.table.options.movableRowsSender&&console.warn("Mover Row Error - no matching sender found:",this.table.options.movableRowsSender),this.table.options.movableRowsSent.call(this.table,this.moving.getComponent(),e?e.getComponent():void 0,t)}else this.table.options.movableRowsSentFailed.call(this.table,this.moving.getComponent(),e?e.getComponent():void 0,t);this.endMove()},_.prototype.tableRowDrop=function(t,e){var o=!1,i=!1;switch(t.stopImmediatePropagation(),_typeof(this.table.options.movableRowsReceiver)){case"string":o=this.receivers[this.table.options.movableRowsReceiver];break;case"function":o=this.table.options.movableRowsReceiver}o?i=o.call(this,this.connectedRow.getComponent(),e?e.getComponent():void 0,this.connectedTable):console.warn("Mover Row Error - no matching receiver found:",this.table.options.movableRowsReceiver),i?this.table.options.movableRowsReceived.call(this.table,this.connectedRow.getComponent(),e?e.getComponent():void 0,this.connectedTable):this.table.options.movableRowsReceivedFailed.call(this.table,this.connectedRow.getComponent(),e?e.getComponent():void 0,this.connectedTable),this.table.modules.comms.send(this.connectedTable,"moveRow","dropcomplete",{row:e,success:i})},_.prototype.receivers={insert:function(t,e,o){return this.table.addRow(t.getData(),void 0,e),!0},add:function(t,e,o){return this.table.addRow(t.getData()),!0},update:function(t,e,o){return!!e&&(e.update(t.getData()),!0)},replace:function(t,e,o){return!!e&&(this.table.addRow(t.getData(),void 0,e),e.delete(),!0)}},_.prototype.senders={delete:function(t,e,o){t.delete()}},_.prototype.commsReceived=function(t,e,o){switch(e){case"connect":return this.connect(t,o.row);case"disconnect":return this.disconnect(t);case"dropcomplete":return this.dropComplete(t,o.row,o.success)}},c.prototype.registerModule("moveRow",_);var F=function(t){this.table=t,this.allowedTypes=["","data","edit","clipboard"],this.enabled=!0};F.prototype.initializeColumn=function(t){var e=this,o=!1,i={};this.allowedTypes.forEach(function(n){var s,r="mutator"+(n.charAt(0).toUpperCase()+n.slice(1));t.definition[r]&&(s=e.lookupMutator(t.definition[r]))&&(o=!0,i[r]={mutator:s,params:t.definition[r+"Params"]||{}})}),o&&(t.modules.mutate=i)},F.prototype.lookupMutator=function(t){var e=!1;switch(void 0===t?"undefined":_typeof(t)){case"string":this.mutators[t]?e=this.mutators[t]:console.warn("Mutator Error - No such mutator found, ignoring: ",t);break;case"function":e=t}return e},F.prototype.transformRow=function(t,e,o){var i,n=this,s="mutator"+(e.charAt(0).toUpperCase()+e.slice(1));return this.enabled&&n.table.columnManager.traverse(function(n){var r,a,l;n.modules.mutate&&(r=n.modules.mutate[s]||n.modules.mutate.mutator||!1)&&(i=n.getFieldValue(t),(!o||o&&void 0!==i)&&(l=n.getComponent(),a="function"==typeof r.params?r.params(i,t,e,l):r.params,n.setFieldValue(t,r.mutator(i,t,e,a,l))))}),t},F.prototype.transformCell=function(t,e){var o=t.column.modules.mutate.mutatorEdit||t.column.modules.mutate.mutator||!1;return o?o.mutator(e,t.row.getData(),"edit",o.params,t.getComponent()):e},F.prototype.enable=function(){this.enabled=!0},F.prototype.disable=function(){this.enabled=!1},F.prototype.mutators={},c.prototype.registerModule("mutator",F);var H=function(t){this.table=t,this.mode="local",this.progressiveLoad=!1,this.size=0,this.page=1,this.count=5,this.max=1,this.displayIndex=0,this.createElements()};H.prototype.createElements=function(){var t;this.element=document.createElement("span"),this.element.classList.add("tabulator-paginator"),this.pagesElement=document.createElement("span"),this.pagesElement.classList.add("tabulator-pages"),t=document.createElement("button"),t.classList.add("tabulator-page"),t.setAttribute("type","button"),t.setAttribute("role","button"),t.setAttribute("aria-label",""),t.setAttribute("title",""),this.firstBut=t.cloneNode(!0),this.firstBut.setAttribute("data-page","first"),this.prevBut=t.cloneNode(!0),this.prevBut.setAttribute("data-page","prev"),this.nextBut=t.cloneNode(!0),this.nextBut.setAttribute("data-page","next"),this.lastBut=t.cloneNode(!0),this.lastBut.setAttribute("data-page","last")},H.prototype.initialize=function(t){var e=this;for(var o in e.table.options.paginationDataSent)e.paginationDataSentNames[o]=e.table.options.paginationDataSent[o];for(var i in e.table.options.paginationDataReceived)e.paginationDataReceivedNames[i]=e.table.options.paginationDataReceived[i];e.table.modules.localize.bind("pagination|first",function(t){e.firstBut.innerHTML=t}),e.table.modules.localize.bind("pagination|first_title",function(t){e.firstBut.setAttribute("aria-label",t),e.firstBut.setAttribute("title",t) -}),e.table.modules.localize.bind("pagination|prev",function(t){e.prevBut.innerHTML=t}),e.table.modules.localize.bind("pagination|prev_title",function(t){e.prevBut.setAttribute("aria-label",t),e.prevBut.setAttribute("title",t)}),e.table.modules.localize.bind("pagination|next",function(t){e.nextBut.innerHTML=t}),e.table.modules.localize.bind("pagination|next_title",function(t){e.nextBut.setAttribute("aria-label",t),e.nextBut.setAttribute("title",t)}),e.table.modules.localize.bind("pagination|last",function(t){e.lastBut.innerHTML=t}),e.table.modules.localize.bind("pagination|last_title",function(t){e.lastBut.setAttribute("aria-label",t),e.lastBut.setAttribute("title",t)}),e.firstBut.addEventListener("click",function(){e.setPage(1)}),e.prevBut.addEventListener("click",function(){e.previousPage()}),e.nextBut.addEventListener("click",function(){e.nextPage().then(function(){}).catch(function(){})}),e.lastBut.addEventListener("click",function(){e.setPage(e.max)}),e.table.options.paginationElement&&(e.element=e.table.options.paginationElement),e.element.appendChild(e.firstBut),e.element.appendChild(e.prevBut),e.element.appendChild(e.pagesElement),e.element.appendChild(e.nextBut),e.element.appendChild(e.lastBut),e.table.options.paginationElement||t||e.table.footerManager.append(e.element,e),e.mode=e.table.options.pagination,e.size=e.table.options.paginationSize||Math.floor(e.table.rowManager.getElement().clientHeight/24),e.count=e.table.options.paginationButtonCount},H.prototype.initializeProgressive=function(t){this.initialize(!0),this.mode="progressive_"+t,this.progressiveLoad=!0},H.prototype.setDisplayIndex=function(t){this.displayIndex=t},H.prototype.getDisplayIndex=function(){return this.displayIndex},H.prototype.setMaxRows=function(t){this.max=t?Math.ceil(t/this.size):1,this.page>this.max&&(this.page=this.max)},H.prototype.reset=function(t){return("local"==this.mode||t)&&(this.page=1),!0},H.prototype.setMaxPage=function(t){this.max=t||1,this.page>this.max&&(this.page=this.max,this.trigger())},H.prototype.setPage=function(t){var e=this;return new Promise(function(o,i){t>0&&t<=e.max?(e.page=t,e.trigger().then(function(){o()}).catch(function(){i()})):(console.warn("Pagination Error - Requested page is out of range of 1 - "+e.max+":",t),i())})},H.prototype.setPageSize=function(t){t>0&&(this.size=t)},H.prototype._setPageButtons=function(){for(var t=this,e=Math.floor((this.count-1)/2),o=Math.ceil((this.count-1)/2),i=this.max-this.page+e+10&&s<=t.max&&t.pagesElement.appendChild(t._generatePageButton(s));this.footerRedraw()},H.prototype._generatePageButton=function(t){var e=this,o=document.createElement("button");return o.classList.add("tabulator-page"),t==e.page&&o.classList.add("active"),o.setAttribute("type","button"),o.setAttribute("role","button"),o.setAttribute("aria-label","Show Page "+t),o.setAttribute("title","Show Page "+t),o.setAttribute("data-page",t),o.textContent=t,o.addEventListener("click",function(o){e.setPage(t)}),o},H.prototype.previousPage=function(){var t=this;return new Promise(function(e,o){t.page>1?(t.page--,t.trigger().then(function(){e()}).catch(function(){o()})):(console.warn("Pagination Error - Previous page would be less than page 1:",0),o())})},H.prototype.nextPage=function(){var t=this;return new Promise(function(e,o){t.page-1&&(i=i.substr(n),s=i.indexOf(";"),s>-1&&(i=i.substr(0,s)),e=i.replace(o+"=",""));break;default:console.warn("Persistance Load Error - invalid mode selected",this.mode)}return!!e&&JSON.parse(e)},P.prototype.mergeDefinition=function(t,e){var o=this,i=[];return e=e||[],e.forEach(function(e,n){var s=o._findColumn(t,e);s&&(s.width=e.width,s.visible=e.visible,s.columns&&(s.columns=o.mergeDefinition(s.columns,e.columns)),i.push(s))}),t.forEach(function(t,n){o._findColumn(e,t)||(i.length>n?i.splice(n,0,t):i.push(t))}),i},P.prototype._findColumn=function(t,e){var o=e.columns?"group":e.field?"field":"object";return t.find(function(t){switch(o){case"group":return t.title===e.title&&t.columns.length===e.columns.length;case"field":return t.field===e.field;case"object":return t===e}})},P.prototype.save=function(t){var e={};switch(t){case"columns":e=this.parseColumns(this.table.columnManager.getColumns());break;case"filter":e=this.table.modules.filter.getFilters();break;case"sort":e=this.validateSorters(this.table.modules.sort.getSort())}var o=this.id+("columns"===t?"":"-"+t);this.saveData(o,e)},P.prototype.validateSorters=function(t){return t.forEach(function(t){t.column=t.field,delete t.field}),t},P.prototype.saveData=function(t,e){switch(e=JSON.stringify(e),this.mode){case"local":localStorage.setItem(t,e);break;case"cookie":var o=new Date;o.setDate(o.getDate()+1e4),document.cookie=t+"="+e+"; expires="+o.toUTCString();break;default:console.warn("Persistance Save Error - invalid mode selected",this.mode)}},P.prototype.parseColumns=function(t){var e=this,o=[];return t.forEach(function(t){var i={};t.isGroup?(i.title=t.getDefinition().title,i.columns=e.parseColumns(t.getColumns())):(i.title=t.getDefinition().title,i.field=t.getField(),i.width=t.getWidth(),i.visible=t.visible),o.push(i)}),o},c.prototype.registerModule("persistence",P);var A=function(t){this.table=t,this.startColumn=!1,this.startX=!1,this.startWidth=!1,this.handle=null,this.prevHandle=null};A.prototype.initializeColumn=function(t,e,o){var i=this,n=!1,s=this.table.options.resizableColumns;if("header"===t&&(n="textarea"==e.definition.formatter||e.definition.variableHeight,e.modules.resize={variableHeight:n}),!0===s||s==t){var r=document.createElement("div");r.className="tabulator-col-resize-handle";var a=document.createElement("div");a.className="tabulator-col-resize-handle prev",r.addEventListener("click",function(t){t.stopPropagation()}),r.addEventListener("mousedown",function(t){var o=e.getLastColumn();o&&i._checkResizability(o)&&(i.startColumn=e,i._mouseDown(t,o))}),r.addEventListener("dblclick",function(t){i._checkResizability(e)&&e.reinitializeWidth(!0)}),a.addEventListener("click",function(t){t.stopPropagation()}),a.addEventListener("mousedown",function(t){var o,n,s;(o=e.getFirstColumn())&&(n=i.table.columnManager.findColumnIndex(o),(s=n>0&&i.table.columnManager.getColumnByIndex(n-1))&&i._checkResizability(s)&&(i.startColumn=e,i._mouseDown(t,s)))}),a.addEventListener("dblclick",function(t){var o,n,s;(o=e.getFirstColumn())&&(n=i.table.columnManager.findColumnIndex(o),(s=n>0&&i.table.columnManager.getColumnByIndex(n-1))&&i._checkResizability(s)&&s.reinitializeWidth(!0))}),o.appendChild(r),o.appendChild(a)}},A.prototype._checkResizability=function(t){return void 0!==t.definition.resizable?t.definition.resizable:this.table.options.resizableColumns},A.prototype._mouseDown=function(t,e){function o(t){e.setWidth(n.startWidth+(t.screenX-n.startX)),!n.table.browserSlow&&e.modules.resize&&e.modules.resize.variableHeight&&e.checkCellHeights()}function i(t){n.startColumn.modules.edit&&(n.startColumn.modules.edit.blocked=!1),n.table.browserSlow&&e.modules.resize&&e.modules.resize.variableHeight&&e.checkCellHeights(),document.body.removeEventListener("mouseup",i),document.body.removeEventListener("mousemove",o),n.table.element.classList.remove("tabulator-block-select"),n.table.options.persistentLayout&&n.table.modExists("persistence",!0)&&n.table.modules.persistence.save("columns"),n.table.options.columnResized.call(n.table,n.startColumn.getComponent())}var n=this;n.table.element.classList.add("tabulator-block-select"),t.stopPropagation(),n.startColumn.modules.edit&&(n.startColumn.modules.edit.blocked=!0),n.startX=t.screenX,n.startWidth=e.getWidth(),document.body.addEventListener("mousemove",o),document.body.addEventListener("mouseup",i)},c.prototype.registerModule("resizeColumns",A);var B=function(t){this.table=t,this.startColumn=!1,this.startY=!1,this.startHeight=!1,this.handle=null,this.prevHandle=null};B.prototype.initializeRow=function(t){var e=this,o=t.getElement(),i=document.createElement("div");i.className="tabulator-row-resize-handle";var n=document.createElement("div");n.className="tabulator-row-resize-handle prev",i.addEventListener("click",function(t){t.stopPropagation()}),i.addEventListener("mousedown",function(o){e.startRow=t,e._mouseDown(o,t)}),n.addEventListener("click",function(t){t.stopPropagation()}),n.addEventListener("mousedown",function(o){var i=e.table.rowManager.prevDisplayRow(t);i&&(e.startRow=i,e._mouseDown(o,i))}),o.appendChild(i),o.appendChild(n)},B.prototype._mouseDown=function(t,e){function o(t){e.setHeight(n.startHeight+(t.screenY-n.startY))}function i(t){document.body.removeEventListener("mouseup",o),document.body.removeEventListener("mousemove",o),n.table.element.classList.remove("tabulator-block-select"),n.table.options.rowResized.call(this.table,e.getComponent())}var n=this;n.table.element.classList.add("tabulator-block-select"),t.stopPropagation(),n.startY=t.screenY,n.startHeight=e.getHeight(),document.body.addEventListener("mousemove",o),document.body.addEventListener("mouseup",i)},c.prototype.registerModule("resizeRows",B);var N=function(t){this.table=t,this.binding=!1,this.observer=!1};N.prototype.initialize=function(t){var e=this.table;"undefined"!=typeof ResizeObserver&&"virtual"===e.rowManager.getRenderMode()?(this.observer=new ResizeObserver(function(t){e.redraw()}),this.observer.observe(e.element)):(this.binding=function(){e.redraw()},window.addEventListener("resize",this.binding))},N.prototype.clearBindings=function(t){this.binding&&window.removeEventListener("resize",this.binding),this.observer&&this.observer.unobserve(this.table.element)},c.prototype.registerModule("resizeTable",N);var I=function(t){this.table=t,this.columns=[],this.hiddenColumns=[],this.mode="",this.index=0,this.collapseFormatter=[],this.collapseStartOpen=!0};I.prototype.initialize=function(){var t=this,e=[];this.mode=this.table.options.responsiveLayout,this.collapseFormatter=this.table.options.responsiveLayoutCollapseFormatter||this.formatCollapsedData,this.collapseStartOpen=this.table.options.responsiveLayoutCollapseStartOpen,this.hiddenColumns=[],this.table.columnManager.columnsByIndex.forEach(function(o,i){o.modules.responsive&&o.modules.responsive.order&&o.modules.responsive.visible&&(o.modules.responsive.index=i,e.push(o),o.visible||"collapse"!==t.mode||t.hiddenColumns.push(o))}),e=e.reverse(),e=e.sort(function(t,e){return e.modules.responsive.order-t.modules.responsive.order||e.modules.responsive.index-t.modules.responsive.index}),this.columns=e,"collapse"===this.mode&&this.generateCollapsedContent()},I.prototype.initializeColumn=function(t){var e=t.getDefinition();t.modules.responsive={order:void 0===e.responsive?1:e.responsive,visible:!1!==e.visible}},I.prototype.layoutRow=function(t){var e=t.getElement(),o=document.createElement("div");o.classList.add("tabulator-responsive-collapse"),e.classList.contains("tabulator-calcs")||(t.modules.responsiveLayout={element:o},this.collapseStartOpen||(o.style.display="none"),e.appendChild(o),this.generateCollapsedRowContent(t))},I.prototype.updateColumnVisibility=function(t,e){t.modules.responsive&&(t.modules.responsive.visible=e,this.initialize())},I.prototype.hideColumn=function(t){t.hide(!1,!0),"collapse"===this.mode&&(this.hiddenColumns.unshift(t),this.generateCollapsedContent())},I.prototype.showColumn=function(t){var e;t.show(!1,!0),t.setWidth(t.getWidth()),"collapse"===this.mode&&(e=this.hiddenColumns.indexOf(t),e>-1&&this.hiddenColumns.splice(e,1),this.generateCollapsedContent())},I.prototype.update=function(){for(var t=this,e=!0;e;){var o="fitColumns"==t.table.modules.layout.getMode()?t.table.columnManager.getFlexBaseWidth():t.table.columnManager.getWidth(),i=t.table.columnManager.element.clientWidth-o;if(i<0){var n=t.columns[t.index];n?(t.hideColumn(n),t.index++):e=!1}else{var s=t.columns[t.index-1];s&&i>0&&i>=s.getWidth()?(t.showColumn(s),t.index--):e=!1}t.table.rowManager.activeRowsCount||t.table.rowManager.renderEmptyScroll()}},I.prototype.generateCollapsedContent=function(){var t=this;this.table.rowManager.getDisplayRows().forEach(function(e){t.generateCollapsedRowContent(e)})},I.prototype.generateCollapsedRowContent=function(t){var e,o;if(t.modules.responsiveLayout){for(e=t.modules.responsiveLayout.element;e.firstChild;)e.removeChild(e.firstChild);o=this.collapseFormatter(this.generateCollapsedRowData(t)),o&&e.appendChild(o)}},I.prototype.generateCollapsedRowData=function(t){var e,o=this,i=t.getData(),n={};return this.hiddenColumns.forEach(function(s){var r=s.getFieldValue(i);s.definition.title&&s.field&&(s.modules.format&&o.table.options.responsiveLayoutCollapseUseFormatters?(e={value:!1,data:{},getValue:function(){return r},getData:function(){return i},getElement:function(){return document.createElement("div")},getRow:function(){return t.getComponent()},getColumn:function(){return s.getComponent()}},n[s.definition.title]=s.modules.format.formatter.call(o.table.modules.format,e,s.modules.format.params)):n[s.definition.title]=r)}),n},I.prototype.formatCollapsedData=function(t){var e=document.createElement("table"),o="";for(var i in t)o+=""+i+""+t[i]+"";return e.innerHTML=o,Object.keys(t).length?e:""},c.prototype.registerModule("responsiveLayout",I);var G=function(t){this.table=t,this.selecting=!1,this.lastClickedRow=!1,this.selectPrev=[],this.selectedRows=[]};G.prototype.clearSelectionData=function(t){this.selecting=!1,this.lastClickedRow=!1,this.selectPrev=[],this.selectedRows=[],t||this._rowSelectionChanged()},G.prototype.initializeRow=function(t){var e=this,o=t.getElement(),i=function t(){setTimeout(function(){e.selecting=!1},50),document.body.removeEventListener("mouseup",t)};t.modules.select={selected:!1},e.table.options.selectableCheck.call(this.table,t.getComponent())?(o.classList.add("tabulator-selectable"),o.classList.remove("tabulator-unselectable"),e.table.options.selectable&&"highlight"!=e.table.options.selectable&&(e.table.options.selectableRangeMode&&"click"===e.table.options.selectableRangeMode?o.addEventListener("click",function(o){if(o.shiftKey){e.lastClickedRow=e.lastClickedRow||t;var i=e.table.rowManager.getDisplayRowIndex(e.lastClickedRow),n=e.table.rowManager.getDisplayRowIndex(t),s=i<=n?i:n,r=i>=n?i:n,a=e.table.rowManager.getDisplayRows().slice(0),l=a.splice(s,r-s+1);o.ctrlKey?(l.forEach(function(t){t!==e.lastClickedRow&&e.toggleRow(t)}),e.lastClickedRow=t):(e.deselectRows(),e.selectRows(l))}else o.ctrlKey?(e.toggleRow(t),e.lastClickedRow=t):(e.deselectRows(),e.selectRows(t),e.lastClickedRow=t)}):(o.addEventListener("click",function(o){e.selecting||e.toggleRow(t)}),o.addEventListener("mousedown",function(o){if(o.shiftKey)return e.selecting=!0,e.selectPrev=[],document.body.addEventListener("mouseup",i),document.body.addEventListener("keyup",i),e.toggleRow(t),!1}),o.addEventListener("mouseenter",function(o){e.selecting&&(e.toggleRow(t),e.selectPrev[1]==t&&e.toggleRow(e.selectPrev[0]))}),o.addEventListener("mouseout",function(o){e.selecting&&e.selectPrev.unshift(t)})))):(o.classList.add("tabulator-unselectable"),o.classList.remove("tabulator-selectable"))},G.prototype.toggleRow=function(t){this.table.options.selectableCheck.call(this.table,t.getComponent())&&(t.modules.select.selected?this._deselectRow(t):this._selectRow(t))},G.prototype.selectRows=function(t){var e=this;switch(void 0===t?"undefined":_typeof(t)){case"undefined":e.table.rowManager.rows.forEach(function(t){e._selectRow(t,!1,!0)}),e._rowSelectionChanged();break;case"boolean":!0===t&&(e.table.rowManager.activeRows.forEach(function(t){e._selectRow(t,!1,!0)}),e._rowSelectionChanged());break;default:Array.isArray(t)?(t.forEach(function(t){e._selectRow(t)}),e._rowSelectionChanged()):e._selectRow(t)}},G.prototype._selectRow=function(t,e,o){if(!isNaN(this.table.options.selectable)&&!0!==this.table.options.selectable&&!o&&this.selectedRows.length>=this.table.options.selectable){if(!this.table.options.selectableRollingSelection)return!1;this._deselectRow(this.selectedRows[0])}var i=this.table.rowManager.findRow(t);i?-1==this.selectedRows.indexOf(i)&&(i.modules.select.selected=!0,i.getElement().classList.add("tabulator-selected"),this.selectedRows.push(i),e||(this.table.options.rowSelected.call(this.table,i.getComponent()),this._rowSelectionChanged())):e||console.warn("Selection Error - No such row found, ignoring selection:"+t)},G.prototype.isRowSelected=function(t){return-1!==this.selectedRows.indexOf(t)},G.prototype.deselectRows=function(t){var e,o=this;if(void 0===t){e=o.selectedRows.length;for(var i=0;i-1&&(n.modules.select.selected=!1,n.getElement().classList.remove("tabulator-selected"),i.selectedRows.splice(o,1),e||(i.table.options.rowDeselected.call(this.table,n.getComponent()),i._rowSelectionChanged())):e||console.warn("Deselection Error - No such row found, ignoring selection:"+t)},G.prototype.getSelectedData=function(){var t=[];return this.selectedRows.forEach(function(e){t.push(e.getData())}),t},G.prototype.getSelectedRows=function(){var t=[];return this.selectedRows.forEach(function(e){t.push(e.getComponent())}),t},G.prototype._rowSelectionChanged=function(){this.table.options.rowSelectionChanged.call(this.table,this.getSelectedData(),this.getSelectedRows())},c.prototype.registerModule("selectRow",G);var j=function(t){this.table=t,this.sortList=[],this.changed=!1};j.prototype.initializeColumn=function(t,e){var o,i,n=this,s=!1;switch(_typeof(t.definition.sorter)){case"string":n.sorters[t.definition.sorter]?s=n.sorters[t.definition.sorter]:console.warn("Sort Error - No such sorter found: ",t.definition.sorter);break;case"function":s=t.definition.sorter}t.modules.sort={sorter:s,dir:"none",params:t.definition.sorterParams||{},startingDir:t.definition.headerSortStartingDir||"asc"},!1!==t.definition.headerSort&&(o=t.getElement(),o.classList.add("tabulator-sortable"),i=document.createElement("div"),i.classList.add("tabulator-arrow"),e.appendChild(i),o.addEventListener("click",function(e){var o="",i=[],s=!1;t.modules.sort&&(o="asc"==t.modules.sort.dir?"desc":"desc"==t.modules.sort.dir?"asc":t.modules.sort.startingDir,n.table.options.columnHeaderSortMulti&&(e.shiftKey||e.ctrlKey)?(i=n.getSort(),s=i.findIndex(function(e){return e.field===t.getField()}),s>-1?(i[s].dir="asc"==i[s].dir?"desc":"asc",s!=i.length-1&&i.push(i.splice(s,1)[0])):i.push({column:t,dir:o}),n.setSort(i)):n.setSort(t,o),n.table.rowManager.sorterRefresh())}))},j.prototype.hasChanged=function(){var t=this.changed;return this.changed=!1,t},j.prototype.getSort=function(){var t=this,e=[];return t.sortList.forEach(function(t){t.column&&e.push({column:t.column.getComponent(),field:t.column.getField(),dir:t.dir})}),e},j.prototype.setSort=function(t,e){var o=this,i=[];Array.isArray(t)||(t=[{column:t,dir:e}]),t.forEach(function(t){var e;e=o.table.columnManager.findColumn(t.column),e?(t.column=e,i.push(t),o.changed=!0):console.warn("Sort Warning - Sort field does not exist and is being ignored: ",t.column)}),o.sortList=i,this.table.options.persistentSort&&this.table.modExists("persistence",!0)&&this.table.modules.persistence.save("sort")},j.prototype.clear=function(){this.setSort([])},j.prototype.findSorter=function(t){var e,o=this.table.rowManager.activeRows[0],i="string";if(o&&(o=o.getData(),t.getField()))switch(e=t.getFieldValue(o),void 0===e?"undefined":_typeof(e)){case"undefined":i="string";break;case"boolean":i="boolean";break;default:isNaN(e)||""===e?e.match(/((^[0-9]+[a-z]+)|(^[a-z]+[0-9]+))+$/i)&&(i="alphanum"):i="number"}return this.sorters[i]},j.prototype.sort=function(){var t,e=this;t=this.table.options.sortOrderReverse?e.sortList.slice().reverse():e.sortList,e.table.options.dataSorting&&e.table.options.dataSorting.call(e.table,e.getSort()),e.clearColumnHeaders(),e.table.options.ajaxSorting?t.forEach(function(t,o){e.setColumnHeader(t.column,t.dir)}):t.forEach(function(o,i){o.column&&o.column.modules.sort&&(o.column.modules.sort.sorter||(o.column.modules.sort.sorter=e.findSorter(o.column)),e._sortItem(o.column,o.dir,t,i)),e.setColumnHeader(o.column,o.dir)}),e.table.options.dataSorted&&e.table.options.dataSorted.call(e.table,e.getSort(),e.table.rowManager.getComponents(!0))},j.prototype.clearColumnHeaders=function(){this.table.columnManager.getRealColumns().forEach(function(t){t.modules.sort&&(t.modules.sort.dir="none",t.getElement().setAttribute("aria-sort","none"))})},j.prototype.setColumnHeader=function(t,e){t.modules.sort.dir=e,t.getElement().setAttribute("aria-sort",e)},j.prototype._sortItem=function(t,e,o,i){var n=this,s=n.table.rowManager.activeRows,r="function"==typeof t.modules.sort.params?t.modules.sort.params(t.getComponent(),e):t.modules.sort.params;s.sort(function(s,a){var l=n._sortRow(s,a,t,e,r);if(0===l&&i)for(var u=i-1;u>=0&&0===(l=n._sortRow(s,a,o[u].column,o[u].dir,r));u--);return l})},j.prototype._sortRow=function(t,e,o,i,n){var s,r,a="asc"==i?t:e,l="asc"==i?e:t;return t=o.getFieldValue(a.getData()),e=o.getFieldValue(l.getData()),t=void 0!==t?t:"",e=void 0!==e?e:"",s=a.getComponent(),r=l.getComponent(),o.modules.sort.sorter.call(this,t,e,s,r,o.getComponent(),i,n)},j.prototype.sorters={number:function(t,e,o,i,n,s,r){var a=r.alignEmptyValues,l=0;if(t=parseFloat(String(t).replace(",","")),e=parseFloat(String(e).replace(",","")),isNaN(t))l=isNaN(e)?0:-1;else{if(!isNaN(e))return t-e;l=1}return("top"===a&&"desc"===s||"bottom"===a&&"asc"===s)&&(l*=-1),l},string:function(t,e,o,i,n,s,r){var a,l=r.alignEmptyValues,u=0;if(t){if(e){switch(_typeof(r.locale)){case"boolean":r.locale&&(a=this.table.modules.localize.getLocale());break;case"string":a=r.locale}return String(t).toLowerCase().localeCompare(String(e).toLowerCase(),a)}u=1}else u=e?-1:0;return("top"===l&&"desc"===s||"bottom"===l&&"asc"===s)&&(u*=-1),u},date:function(t,e,o,i,n,s,r){return r.format||(r.format="DD/MM/YYYY"),this.sorters.datetime.call(this,t,e,o,i,n,s,r)},time:function(t,e,o,i,n,s,r){return r.format||(r.format="hh:mm"),this.sorters.datetime.call(this,t,e,o,i,n,s,r)},datetime:function(t,e,o,i,n,s,r){var a=r.format||"DD/MM/YYYY hh:mm:ss",l=r.alignEmptyValues,u=0;if("undefined"!=typeof moment){if(t=moment(t,a),e=moment(e,a),t.isValid()){if(e.isValid())return t-e;u=1}else u=e.isValid()?-1:0;return("top"===l&&"desc"===s||"bottom"===l&&"asc"===s)&&(u*=-1),u}console.error("Sort Error - 'datetime' sorter is dependant on moment.js")},boolean:function(t,e,o,i,n,s,r){return(!0===t||"true"===t||"True"===t||1===t?1:0)-(!0===e||"true"===e||"True"===e||1===e?1:0)},array:function(t,e,o,i,n,s,r){function a(t){switch(c){case"length":return t.length;case"sum":return t.reduce(function(t,e){return t+e});case"max":return Math.max.apply(null,t);case"min":return Math.min.apply(null,t);case"avg":return t.reduce(function(t,e){return t+e})/t.length}}var l=0,u=0,c=r.type||"length",d=r.alignEmptyValues,h=0;if(Array.isArray(t)){if(Array.isArray(e))return l=t?a(t):0,u=e?a(e):0,l-u;d=1}else d=Array.isArray(e)?-1:0;return("top"===d&&"desc"===s||"bottom"===d&&"asc"===s)&&(h*=-1),h},exists:function(t,e,o,i,n,s,r){return(void 0===t?0:1)-(void 0===e?0:1)},alphanum:function(t,e,o,i,n,s,r){var a,l,u,c,d,h=0,p=/(\d+)|(\D+)/g,m=/\d/,f=r.alignEmptyValues,g=0;if(t||0===t){if(e||0===e){if(isFinite(t)&&isFinite(e))return t-e;if(a=String(t).toLowerCase(),l=String(e).toLowerCase(),a===l)return 0;if(!m.test(a)||!m.test(l))return a>l?1:-1;for(a=a.match(p),l=l.match(p),d=a.length>l.length?l.length:a.length;hc?1:-1;return a.length>l.length}g=1}else g=e||0===e?-1:0;return("top"===f&&"desc"===s||"bottom"===f&&"asc"===s)&&(g*=-1),g}},c.prototype.registerModule("sort",j);var V=function(t){this.table=t};return V.prototype.initializeColumn=function(t){var e,o=this,i=[];t.definition.validator&&(Array.isArray(t.definition.validator)?t.definition.validator.forEach(function(t){(e=o._extractValidator(t))&&i.push(e)}):(e=this._extractValidator(t.definition.validator))&&i.push(e),t.modules.validate=!!i.length&&i)},V.prototype._extractValidator=function(t){var e,o,i;switch(void 0===t?"undefined":_typeof(t)){case"string":return e=t.split(":",2),o=e.shift(),i=e[0],this._buildValidator(o,i);case"function":return this._buildValidator(t);case"object":return this._buildValidator(t.type,t.parameters)}},V.prototype._buildValidator=function(t,e){var o="function"==typeof t?t:this.validators[t];return o?{type:"function"==typeof t?"function":t,func:o,params:e}:(console.warn("Validator Setup Error - No matching validator found:",t),!1)},V.prototype.validate=function(t,e,o){var i=this,n=[];return t&&t.forEach(function(t){t.func.call(i,e,o,t.params)||n.push({type:t.type,parameters:t.params})}),!n.length||n},V.prototype.validators={integer:function(t,e,o){return""===e||null===e||void 0===e||"number"==typeof(e=Number(e))&&isFinite(e)&&Math.floor(e)===e},float:function(t,e,o){return""===e||null===e||void 0===e||"number"==typeof(e=Number(e))&&isFinite(e)&&e%1!=0},numeric:function(t,e,o){return""===e||null===e||void 0===e||!isNaN(e)},string:function(t,e,o){return""===e||null===e||void 0===e||isNaN(e)},max:function(t,e,o){return""===e||null===e||void 0===e||parseFloat(e)<=o},min:function(t,e,o){return""===e||null===e||void 0===e||parseFloat(e)>=o},minLength:function(t,e,o){return""===e||null===e||void 0===e||String(e).length>=o},maxLength:function(t,e,o){return""===e||null===e||void 0===e||String(e).length<=o},in:function(t,e,o){return""===e||null===e||void 0===e||("string"==typeof o&&(o=o.split("|")),""===e||o.indexOf(e)>-1)},regex:function(t,e,o){return""===e||null===e||void 0===e||new RegExp(o).test(e)},unique:function(t,e,o){if(""===e||null===e||void 0===e)return!0;var i=!0,n=t.getData(),s=t.getColumn()._getSelf();return this.table.rowManager.rows.forEach(function(t){var o=t.getData();o!==n&&e==s.getFieldValue(o)&&(i=!1)}),i},required:function(t,e,o){return""!==e&null!==e&&void 0!==e}},c.prototype.registerModule("validate",V),c}); \ No newline at end of file diff --git a/Gems/AssetMemoryAnalyzer/External/tabulator-master/dist/js/tabulator_core.js b/Gems/AssetMemoryAnalyzer/External/tabulator-master/dist/js/tabulator_core.js deleted file mode 100644 index 9df66af27c..0000000000 --- a/Gems/AssetMemoryAnalyzer/External/tabulator-master/dist/js/tabulator_core.js +++ /dev/null @@ -1,7057 +0,0 @@ -/* Tabulator v4.1.2 (c) Oliver Folkerd */ - -'use strict'; - -// https://tc39.github.io/ecma262/#sec-array.prototype.findIndex - -var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol" ? function (obj) { return typeof obj; } : function (obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; - -if (!Array.prototype.findIndex) { - - Object.defineProperty(Array.prototype, 'findIndex', { - - value: function value(predicate) { - - // 1. Let O be ? ToObject(this value). - - if (this == null) { - - throw new TypeError('"this" is null or not defined'); - } - - var o = Object(this); - - // 2. Let len be ? ToLength(? Get(O, "length")). - - var len = o.length >>> 0; - - // 3. If IsCallable(predicate) is false, throw a TypeError exception. - - if (typeof predicate !== 'function') { - - throw new TypeError('predicate must be a function'); - } - - // 4. If thisArg was supplied, let T be thisArg; else let T be undefined. - - var thisArg = arguments[1]; - - // 5. Let k be 0. - - var k = 0; - - // 6. Repeat, while k < len - - while (k < len) { - - // a. Let Pk be ! ToString(k). - - // b. Let kValue be ? Get(O, Pk). - - // c. Let testResult be ToBoolean(? Call(predicate, T, « kValue, k, O »)). - - // d. If testResult is true, return k. - - var kValue = o[k]; - - if (predicate.call(thisArg, kValue, k, o)) { - - return k; - } - - // e. Increase k by 1. - - k++; - } - - // 7. Return -1. - - return -1; - } - - }); -} - -// https://tc39.github.io/ecma262/#sec-array.prototype.find - -if (!Array.prototype.find) { - - Object.defineProperty(Array.prototype, 'find', { - - value: function value(predicate) { - - // 1. Let O be ? ToObject(this value). - - if (this == null) { - - throw new TypeError('"this" is null or not defined'); - } - - var o = Object(this); - - // 2. Let len be ? ToLength(? Get(O, "length")). - - var len = o.length >>> 0; - - // 3. If IsCallable(predicate) is false, throw a TypeError exception. - - if (typeof predicate !== 'function') { - - throw new TypeError('predicate must be a function'); - } - - // 4. If thisArg was supplied, let T be thisArg; else let T be undefined. - - var thisArg = arguments[1]; - - // 5. Let k be 0. - - var k = 0; - - // 6. Repeat, while k < len - - while (k < len) { - - // a. Let Pk be ! ToString(k). - - // b. Let kValue be ? Get(O, Pk). - - // c. Let testResult be ToBoolean(? Call(predicate, T, « kValue, k, O »)). - - // d. If testResult is true, return kValue. - - var kValue = o[k]; - - if (predicate.call(thisArg, kValue, k, o)) { - - return kValue; - } - - // e. Increase k by 1. - - k++; - } - - // 7. Return undefined. - - return undefined; - } - - }); -} - -var ColumnManager = function ColumnManager(table) { - - this.table = table; //hold parent table - - this.headersElement = this.createHeadersElement(); - - this.element = this.createHeaderElement(); //containing element - - this.rowManager = null; //hold row manager object - - this.columns = []; // column definition object - - this.columnsByIndex = []; //columns by index - - this.columnsByField = []; //columns by field - - this.scrollLeft = 0; - - this.element.insertBefore(this.headersElement, this.element.firstChild); -}; - -////////////// Setup Functions ///////////////// - - -ColumnManager.prototype.createHeadersElement = function () { - - var el = document.createElement("div"); - - el.classList.add("tabulator-headers"); - - return el; -}; - -ColumnManager.prototype.createHeaderElement = function () { - - var el = document.createElement("div"); - - el.classList.add("tabulator-header"); - - return el; -}; - -//link to row manager - -ColumnManager.prototype.setRowManager = function (manager) { - - this.rowManager = manager; -}; - -//return containing element - -ColumnManager.prototype.getElement = function () { - - return this.element; -}; - -//return header containing element - -ColumnManager.prototype.getHeadersElement = function () { - - return this.headersElement; -}; - -//scroll horizontally to match table body - -ColumnManager.prototype.scrollHorizontal = function (left) { - - var hozAdjust = 0, - scrollWidth = this.element.scrollWidth - this.table.element.clientWidth; - - this.element.scrollLeft = left; - - //adjust for vertical scrollbar moving table when present - - if (left > scrollWidth) { - - hozAdjust = left - scrollWidth; - - this.element.style.marginLeft = -hozAdjust + "px"; - } else { - - this.element.style.marginLeft = 0; - } - - //keep frozen columns fixed in position - - //this._calcFrozenColumnsPos(hozAdjust + 3); - - - this.scrollLeft = left; - - if (this.table.modExists("frozenColumns")) { - - this.table.modules.frozenColumns.layout(); - } -}; - -///////////// Column Setup Functions ///////////// - - -ColumnManager.prototype.setColumns = function (cols, row) { - - var self = this; - - while (self.headersElement.firstChild) { - self.headersElement.removeChild(self.headersElement.firstChild); - }self.columns = []; - - self.columnsByIndex = []; - - self.columnsByField = []; - - //reset frozen columns - - if (self.table.modExists("frozenColumns")) { - - self.table.modules.frozenColumns.reset(); - } - - cols.forEach(function (def, i) { - - self._addColumn(def); - }); - - self._reIndexColumns(); - - if (self.table.options.responsiveLayout && self.table.modExists("responsiveLayout", true)) { - - self.table.modules.responsiveLayout.initialize(); - } - - self.redraw(true); -}; - -ColumnManager.prototype._addColumn = function (definition, before, nextToColumn) { - - var column = new Column(definition, this), - colEl = column.getElement(), - index = nextToColumn ? this.findColumnIndex(nextToColumn) : nextToColumn; - - if (nextToColumn && index > -1) { - - var parentIndex = this.columns.indexOf(nextToColumn.getTopColumn()); - - var nextEl = nextToColumn.getElement(); - - if (before) { - - this.columns.splice(parentIndex, 0, column); - - nextEl.parentNode.insertBefore(colEl, nextEl); - } else { - - this.columns.splice(parentIndex + 1, 0, column); - - nextEl.parentNode.insertBefore(colEl, nextEl.nextSibling); - } - } else { - - if (before) { - - this.columns.unshift(column); - - this.headersElement.insertBefore(column.getElement(), this.headersElement.firstChild); - } else { - - this.columns.push(column); - - this.headersElement.appendChild(column.getElement()); - } - } - - return column; -}; - -ColumnManager.prototype.registerColumnField = function (col) { - - if (col.definition.field) { - - this.columnsByField[col.definition.field] = col; - } -}; - -ColumnManager.prototype.registerColumnPosition = function (col) { - - this.columnsByIndex.push(col); -}; - -ColumnManager.prototype._reIndexColumns = function () { - - this.columnsByIndex = []; - - this.columns.forEach(function (column) { - - column.reRegisterPosition(); - }); -}; - -//ensure column headers take up the correct amount of space in column groups - -ColumnManager.prototype._verticalAlignHeaders = function () { - - var self = this, - minHeight = 0; - - self.columns.forEach(function (column) { - - var height; - - column.clearVerticalAlign(); - - height = column.getHeight(); - - if (height > minHeight) { - - minHeight = height; - } - }); - - self.columns.forEach(function (column) { - - column.verticalAlign(self.table.options.columnVertAlign, minHeight); - }); - - self.rowManager.adjustTableSize(); -}; - -//////////////// Column Details ///////////////// - - -ColumnManager.prototype.findColumn = function (subject) { - - var self = this; - - if ((typeof subject === 'undefined' ? 'undefined' : _typeof(subject)) == "object") { - - if (subject instanceof Column) { - - //subject is column element - - return subject; - } else if (subject instanceof ColumnComponent) { - - //subject is public column component - - return subject._getSelf() || false; - } else if (subject instanceof HTMLElement) { - - //subject is a HTML element of the column header - - var match = self.columns.find(function (column) { - - return column.element === subject; - }); - - return match || false; - } - } else { - - //subject should be treated as the field name of the column - - return this.columnsByField[subject] || false; - } - - //catch all for any other type of input - - - return false; -}; - -ColumnManager.prototype.getColumnByField = function (field) { - - return this.columnsByField[field]; -}; - -ColumnManager.prototype.getColumnByIndex = function (index) { - - return this.columnsByIndex[index]; -}; - -ColumnManager.prototype.getColumns = function () { - - return this.columns; -}; - -ColumnManager.prototype.findColumnIndex = function (column) { - - return this.columnsByIndex.findIndex(function (col) { - - return column === col; - }); -}; - -//return all columns that are not groups - -ColumnManager.prototype.getRealColumns = function () { - - return this.columnsByIndex; -}; - -//travers across columns and call action - -ColumnManager.prototype.traverse = function (callback) { - - var self = this; - - self.columnsByIndex.forEach(function (column, i) { - - callback(column, i); - }); -}; - -//get defintions of actual columns - -ColumnManager.prototype.getDefinitions = function (active) { - - var self = this, - output = []; - - self.columnsByIndex.forEach(function (column) { - - if (!active || active && column.visible) { - - output.push(column.getDefinition()); - } - }); - - return output; -}; - -//get full nested definition tree - -ColumnManager.prototype.getDefinitionTree = function () { - - var self = this, - output = []; - - self.columns.forEach(function (column) { - - output.push(column.getDefinition(true)); - }); - - return output; -}; - -ColumnManager.prototype.getComponents = function (structured) { - - var self = this, - output = [], - columns = structured ? self.columns : self.columnsByIndex; - - columns.forEach(function (column) { - - output.push(column.getComponent()); - }); - - return output; -}; - -ColumnManager.prototype.getWidth = function () { - - var width = 0; - - this.columnsByIndex.forEach(function (column) { - - if (column.visible) { - - width += column.getWidth(); - } - }); - - return width; -}; - -ColumnManager.prototype.moveColumn = function (from, to, after) { - - this._moveColumnInArray(this.columns, from, to, after); - - this._moveColumnInArray(this.columnsByIndex, from, to, after, true); - - if (this.table.options.responsiveLayout && this.table.modExists("responsiveLayout", true)) { - - this.table.modules.responsiveLayout.initialize(); - } - - if (this.table.options.columnMoved) { - - this.table.options.columnMoved.call(this.table, from.getComponent(), this.table.columnManager.getComponents()); - } - - if (this.table.options.persistentLayout && this.table.modExists("persistence", true)) { - - this.table.modules.persistence.save("columns"); - } -}; - -ColumnManager.prototype._moveColumnInArray = function (columns, from, to, after, updateRows) { - - var fromIndex = columns.indexOf(from), - toIndex; - - if (fromIndex > -1) { - - columns.splice(fromIndex, 1); - - toIndex = columns.indexOf(to); - - if (toIndex > -1) { - - if (after) { - - toIndex = toIndex + 1; - } - } else { - - toIndex = fromIndex; - } - - columns.splice(toIndex, 0, from); - - if (updateRows) { - - this.table.rowManager.rows.forEach(function (row) { - - if (row.cells.length) { - - var cell = row.cells.splice(fromIndex, 1)[0]; - - row.cells.splice(toIndex, 0, cell); - } - }); - } - } -}; - -ColumnManager.prototype.scrollToColumn = function (column, position, ifVisible) { - var _this = this; - - var left = 0, - offset = 0, - adjust = 0, - colEl = column.getElement(); - - return new Promise(function (resolve, reject) { - - if (typeof position === "undefined") { - - position = _this.table.options.scrollToColumnPosition; - } - - if (typeof ifVisible === "undefined") { - - ifVisible = _this.table.options.scrollToColumnIfVisible; - } - - if (column.visible) { - - //align to correct position - - switch (position) { - - case "middle": - - case "center": - - adjust = -_this.element.clientWidth / 2; - - break; - - case "right": - - adjust = colEl.clientWidth - _this.headersElement.clientWidth; - - break; - - } - - //check column visibility - - if (!ifVisible) { - - offset = colEl.offsetLeft; - - if (offset > 0 && offset + colEl.offsetWidth < _this.element.clientWidth) { - - return false; - } - } - - //calculate scroll position - - left = colEl.offsetLeft + _this.element.scrollLeft + adjust; - - left = Math.max(Math.min(left, _this.table.rowManager.element.scrollWidth - _this.table.rowManager.element.clientWidth), 0); - - _this.table.rowManager.scrollHorizontal(left); - - _this.scrollHorizontal(left); - - resolve(); - } else { - - console.warn("Scroll Error - Column not visible"); - - reject("Scroll Error - Column not visible"); - } - }); -}; - -//////////////// Cell Management ///////////////// - - -ColumnManager.prototype.generateCells = function (row) { - - var self = this; - - var cells = []; - - self.columnsByIndex.forEach(function (column) { - - cells.push(column.generateCell(row)); - }); - - return cells; -}; - -//////////////// Column Management ///////////////// - - -ColumnManager.prototype.getFlexBaseWidth = function () { - - var self = this, - totalWidth = self.table.element.clientWidth, - //table element width - - fixedWidth = 0; - - //adjust for vertical scrollbar if present - - if (self.rowManager.element.scrollHeight > self.rowManager.element.clientHeight) { - - totalWidth -= self.rowManager.element.offsetWidth - self.rowManager.element.clientWidth; - } - - this.columnsByIndex.forEach(function (column) { - - var width, minWidth, colWidth; - - if (column.visible) { - - width = column.definition.width || 0; - - minWidth = typeof column.minWidth == "undefined" ? self.table.options.columnMinWidth : parseInt(column.minWidth); - - if (typeof width == "string") { - - if (width.indexOf("%") > -1) { - - colWidth = totalWidth / 100 * parseInt(width); - } else { - - colWidth = parseInt(width); - } - } else { - - colWidth = width; - } - - fixedWidth += colWidth > minWidth ? colWidth : minWidth; - } - }); - - return fixedWidth; -}; - -ColumnManager.prototype.addColumn = function (definition, before, nextToColumn) { - - var column = this._addColumn(definition, before, nextToColumn); - - this._reIndexColumns(); - - if (this.table.options.responsiveLayout && this.table.modExists("responsiveLayout", true)) { - - this.table.modules.responsiveLayout.initialize(); - } - - if (this.table.modExists("columnCalcs")) { - - this.table.modules.columnCalcs.recalc(this.table.rowManager.activeRows); - } - - this.redraw(); - - if (this.table.modules.layout.getMode() != "fitColumns") { - - column.reinitializeWidth(); - } - - this._verticalAlignHeaders(); - - this.table.rowManager.reinitialize(); -}; - -//remove column from system - -ColumnManager.prototype.deregisterColumn = function (column) { - - var field = column.getField(), - index; - - //remove from field list - - if (field) { - - delete this.columnsByField[field]; - } - - //remove from index list - - index = this.columnsByIndex.indexOf(column); - - if (index > -1) { - - this.columnsByIndex.splice(index, 1); - } - - //remove from column list - - index = this.columns.indexOf(column); - - if (index > -1) { - - this.columns.splice(index, 1); - } - - if (this.table.options.responsiveLayout && this.table.modExists("responsiveLayout", true)) { - - this.table.modules.responsiveLayout.initialize(); - } - - this.redraw(); -}; - -//redraw columns - -ColumnManager.prototype.redraw = function (force) { - - if (force) { - - if (Tabulator.prototype.helpers.elVisible(this.element)) { - - this._verticalAlignHeaders(); - } - - this.table.rowManager.resetScroll(); - - this.table.rowManager.reinitialize(); - } - - if (this.table.modules.layout.getMode() == "fitColumns") { - - this.table.modules.layout.layout(); - } else { - - if (force) { - - this.table.modules.layout.layout(); - } else { - - if (this.table.options.responsiveLayout && this.table.modExists("responsiveLayout", true)) { - - this.table.modules.responsiveLayout.update(); - } - } - } - - if (this.table.modExists("frozenColumns")) { - - this.table.modules.frozenColumns.layout(); - } - - if (this.table.modExists("columnCalcs")) { - - this.table.modules.columnCalcs.recalc(this.table.rowManager.activeRows); - } - - if (force) { - - if (this.table.options.persistentLayout && this.table.modExists("persistence", true)) { - - this.table.modules.persistence.save("columns"); - } - - if (this.table.modExists("columnCalcs")) { - - this.table.modules.columnCalcs.redraw(); - } - } - - this.table.footerManager.redraw(); -}; - -//public column object -var ColumnComponent = function ColumnComponent(column) { - this._column = column; - this.type = "ColumnComponent"; -}; - -ColumnComponent.prototype.getElement = function () { - return this._column.getElement(); -}; - -ColumnComponent.prototype.getDefinition = function () { - return this._column.getDefinition(); -}; - -ColumnComponent.prototype.getField = function () { - return this._column.getField(); -}; - -ColumnComponent.prototype.getCells = function () { - var cells = []; - - this._column.cells.forEach(function (cell) { - cells.push(cell.getComponent()); - }); - - return cells; -}; - -ColumnComponent.prototype.getVisibility = function () { - return this._column.visible; -}; - -ColumnComponent.prototype.show = function () { - if (this._column.isGroup) { - this._column.columns.forEach(function (column) { - column.show(); - }); - } else { - this._column.show(); - } -}; - -ColumnComponent.prototype.hide = function () { - if (this._column.isGroup) { - this._column.columns.forEach(function (column) { - column.hide(); - }); - } else { - this._column.hide(); - } -}; - -ColumnComponent.prototype.toggle = function () { - if (this._column.visible) { - this.hide(); - } else { - this.show(); - } -}; - -ColumnComponent.prototype.delete = function () { - this._column.delete(); -}; - -ColumnComponent.prototype.getSubColumns = function () { - var output = []; - - if (this._column.columns.length) { - this._column.columns.forEach(function (column) { - output.push(column.getComponent()); - }); - } - - return output; -}; - -ColumnComponent.prototype.getParentColumn = function () { - return this._column.parent instanceof Column ? this._column.parent.getComponent() : false; -}; - -ColumnComponent.prototype._getSelf = function () { - return this._column; -}; - -ColumnComponent.prototype.scrollTo = function () { - return this._column.table.columnManager.scrollToColumn(this._column); -}; - -ColumnComponent.prototype.getTable = function () { - return this._column.table; -}; - -ColumnComponent.prototype.headerFilterFocus = function () { - if (this._column.table.modExists("filter", true)) { - this._column.table.modules.filter.setHeaderFilterFocus(this._column); - } -}; - -ColumnComponent.prototype.reloadHeaderFilter = function () { - if (this._column.table.modExists("filter", true)) { - this._column.table.modules.filter.reloadHeaderFilter(this._column); - } -}; - -ColumnComponent.prototype.setHeaderFilterValue = function (value) { - if (this._column.table.modExists("filter", true)) { - this._column.table.modules.filter.setHeaderFilterValue(this._column, value); - } -}; - -var Column = function Column(def, parent) { - var self = this; - - this.table = parent.table; - this.definition = def; //column definition - this.parent = parent; //hold parent object - this.type = "column"; //type of element - this.columns = []; //child columns - this.cells = []; //cells bound to this column - this.element = this.createElement(); //column header element - this.contentElement = false; - this.groupElement = this.createGroupElement(); //column group holder element - this.isGroup = false; - this.tooltip = false; //hold column tooltip - this.hozAlign = ""; //horizontal text alignment - - //multi dimentional filed handling - this.field = ""; - this.fieldStructure = ""; - this.getFieldValue = ""; - this.setFieldValue = ""; - - this.setField(this.definition.field); - - this.modules = {}; //hold module variables; - - this.cellEvents = { - cellClick: false, - cellDblClick: false, - cellContext: false, - cellTap: false, - cellDblTap: false, - cellTapHold: false - }; - - this.width = null; //column width - this.minWidth = null; //column minimum width - this.widthFixed = false; //user has specified a width for this column - - this.visible = true; //default visible state - - //initialize column - if (def.columns) { - - this.isGroup = true; - - def.columns.forEach(function (def, i) { - var newCol = new Column(def, self); - self.attachColumn(newCol); - }); - - self.checkColumnVisibility(); - } else { - parent.registerColumnField(this); - } - - if (def.rowHandle && this.table.options.movableRows !== false && this.table.modExists("moveRow")) { - this.table.modules.moveRow.setHandle(true); - } - - this._buildHeader(); -}; - -Column.prototype.createElement = function () { - var el = document.createElement("div"); - - el.classList.add("tabulator-col"); - el.setAttribute("role", "columnheader"); - el.setAttribute("aria-sort", "none"); - - return el; -}; - -Column.prototype.createGroupElement = function () { - var el = document.createElement("div"); - - el.classList.add("tabulator-col-group-cols"); - - return el; -}; - -Column.prototype.setField = function (field) { - this.field = field; - this.fieldStructure = field ? this.table.options.nestedFieldSeparator ? field.split(this.table.options.nestedFieldSeparator) : [field] : []; - this.getFieldValue = this.fieldStructure.length > 1 ? this._getNestedData : this._getFlatData; - this.setFieldValue = this.fieldStructure.length > 1 ? this._setNesteData : this._setFlatData; -}; - -//register column position with column manager -Column.prototype.registerColumnPosition = function (column) { - this.parent.registerColumnPosition(column); -}; - -//register column position with column manager -Column.prototype.registerColumnField = function (column) { - this.parent.registerColumnField(column); -}; - -//trigger position registration -Column.prototype.reRegisterPosition = function () { - if (this.isGroup) { - this.columns.forEach(function (column) { - column.reRegisterPosition(); - }); - } else { - this.registerColumnPosition(this); - } -}; - -Column.prototype.setTooltip = function () { - var self = this, - def = self.definition; - - //set header tooltips - var tooltip = def.headerTooltip || def.tooltip === false ? def.headerTooltip : self.table.options.tooltipsHeader; - - if (tooltip) { - if (tooltip === true) { - if (def.field) { - self.table.modules.localize.bind("columns|" + def.field, function (value) { - self.element.setAttribute("title", value || def.title); - }); - } else { - self.element.setAttribute("title", def.title); - } - } else { - if (typeof tooltip == "function") { - tooltip = tooltip(self.getComponent()); - - if (tooltip === false) { - tooltip = ""; - } - } - - self.element.setAttribute("title", tooltip); - } - } else { - self.element.setAttribute("title", ""); - } -}; - -//build header element -Column.prototype._buildHeader = function () { - var self = this, - def = self.definition; - - while (self.element.firstChild) { - self.element.removeChild(self.element.firstChild); - }if (def.headerVertical) { - self.element.classList.add("tabulator-col-vertical"); - - if (def.headerVertical === "flip") { - self.element.classList.add("tabulator-col-vertical-flip"); - } - } - - self.contentElement = self._bindEvents(); - - self.contentElement = self._buildColumnHeaderContent(); - - self.element.appendChild(self.contentElement); - - if (self.isGroup) { - self._buildGroupHeader(); - } else { - self._buildColumnHeader(); - } - - self.setTooltip(); - - //set resizable handles - if (self.table.options.resizableColumns && self.table.modExists("resizeColumns")) { - self.table.modules.resizeColumns.initializeColumn("header", self, self.element); - } - - //set resizable handles - if (def.headerFilter && self.table.modExists("filter") && self.table.modExists("edit")) { - if (typeof def.headerFilterPlaceholder !== "undefined" && def.field) { - self.table.modules.localize.setHeaderFilterColumnPlaceholder(def.field, def.headerFilterPlaceholder); - } - - self.table.modules.filter.initializeColumn(self); - } - - //set resizable handles - if (self.table.modExists("frozenColumns")) { - self.table.modules.frozenColumns.initializeColumn(self); - } - - //set movable column - if (self.table.options.movableColumns && !self.isGroup && self.table.modExists("moveColumn")) { - self.table.modules.moveColumn.initializeColumn(self); - } - - //set calcs column - if ((def.topCalc || def.bottomCalc) && self.table.modExists("columnCalcs")) { - self.table.modules.columnCalcs.initializeColumn(self); - } - - //update header tooltip on mouse enter - self.element.addEventListener("mouseenter", function (e) { - self.setTooltip(); - }); -}; - -Column.prototype._bindEvents = function () { - - var self = this, - def = self.definition, - dblTap, - tapHold, - tap; - - //setup header click event bindings - if (typeof def.headerClick == "function") { - self.element.addEventListener("click", function (e) { - def.headerClick(e, self.getComponent()); - }); - } - - if (typeof def.headerDblClick == "function") { - self.element.addEventListener("dblclick", function (e) { - def.headerDblClick(e, self.getComponent()); - }); - } - - if (typeof def.headerContext == "function") { - self.element.addEventListener("contextmenu", function (e) { - def.headerContext(e, self.getComponent()); - }); - } - - //setup header tap event bindings - if (typeof def.headerTap == "function") { - tap = false; - - self.element.addEventListener("touchstart", function (e) { - tap = true; - }); - - self.element.addEventListener("touchend", function (e) { - if (tap) { - def.headerTap(e, self.getComponent()); - } - - tap = false; - }); - } - - if (typeof def.headerDblTap == "function") { - dblTap = null; - - self.element.addEventListener("touchend", function (e) { - - if (dblTap) { - clearTimeout(dblTap); - dblTap = null; - - def.headerDblTap(e, self.getComponent()); - } else { - - dblTap = setTimeout(function () { - clearTimeout(dblTap); - dblTap = null; - }, 300); - } - }); - } - - if (typeof def.headerTapHold == "function") { - tapHold = null; - - self.element.addEventListener("touchstart", function (e) { - clearTimeout(tapHold); - - tapHold = setTimeout(function () { - clearTimeout(tapHold); - tapHold = null; - tap = false; - def.headerTapHold(e, self.getComponent()); - }, 1000); - }); - - self.element.addEventListener("touchend", function (e) { - clearTimeout(tapHold); - tapHold = null; - }); - } - - //store column cell click event bindings - if (typeof def.cellClick == "function") { - self.cellEvents.cellClick = def.cellClick; - } - - if (typeof def.cellDblClick == "function") { - self.cellEvents.cellDblClick = def.cellDblClick; - } - - if (typeof def.cellContext == "function") { - self.cellEvents.cellContext = def.cellContext; - } - - //setup column cell tap event bindings - if (typeof def.cellTap == "function") { - self.cellEvents.cellTap = def.cellTap; - } - - if (typeof def.cellDblTap == "function") { - self.cellEvents.cellDblTap = def.cellDblTap; - } - - if (typeof def.cellTapHold == "function") { - self.cellEvents.cellTapHold = def.cellTapHold; - } - - //setup column cell edit callbacks - if (typeof def.cellEdited == "function") { - self.cellEvents.cellEdited = def.cellEdited; - } - - if (typeof def.cellEditing == "function") { - self.cellEvents.cellEditing = def.cellEditing; - } - - if (typeof def.cellEditCancelled == "function") { - self.cellEvents.cellEditCancelled = def.cellEditCancelled; - } -}; - -//build header element for header -Column.prototype._buildColumnHeader = function () { - var self = this, - def = self.definition, - table = self.table, - sortable; - - //set column sorter - if (table.modExists("sort")) { - table.modules.sort.initializeColumn(self, self.contentElement); - } - - //set column formatter - if (table.modExists("format")) { - table.modules.format.initializeColumn(self); - } - - //set column editor - if (typeof def.editor != "undefined" && table.modExists("edit")) { - table.modules.edit.initializeColumn(self); - } - - //set colum validator - if (typeof def.validator != "undefined" && table.modExists("validate")) { - table.modules.validate.initializeColumn(self); - } - - //set column mutator - if (table.modExists("mutator")) { - table.modules.mutator.initializeColumn(self); - } - - //set column accessor - if (table.modExists("accessor")) { - table.modules.accessor.initializeColumn(self); - } - - //set respoviveLayout - if (_typeof(table.options.responsiveLayout) && table.modExists("responsiveLayout")) { - table.modules.responsiveLayout.initializeColumn(self); - } - - //set column visibility - if (typeof def.visible != "undefined") { - if (def.visible) { - self.show(true); - } else { - self.hide(true); - } - } - - //asign additional css classes to column header - if (def.cssClass) { - self.element.classList.add(def.cssClass); - } - - if (def.field) { - this.element.setAttribute("tabulator-field", def.field); - } - - //set min width if present - self.setMinWidth(typeof def.minWidth == "undefined" ? self.table.options.columnMinWidth : def.minWidth); - - self.reinitializeWidth(); - - //set tooltip if present - self.tooltip = self.definition.tooltip || self.definition.tooltip === false ? self.definition.tooltip : self.table.options.tooltips; - - //set orizontal text alignment - self.hozAlign = typeof self.definition.align == "undefined" ? "" : self.definition.align; -}; - -Column.prototype._buildColumnHeaderContent = function () { - var self = this, - def = self.definition, - table = self.table; - - var contentElement = document.createElement("div"); - contentElement.classList.add("tabulator-col-content"); - - contentElement.appendChild(self._buildColumnHeaderTitle()); - - return contentElement; -}; - -//build title element of column -Column.prototype._buildColumnHeaderTitle = function () { - var self = this, - def = self.definition, - table = self.table, - title; - - var titleHolderElement = document.createElement("div"); - titleHolderElement.classList.add("tabulator-col-title"); - - if (def.editableTitle) { - var titleElement = document.createElement("input"); - titleElement.classList.add("tabulator-title-editor"); - - titleElement.addEventListener("click", function (e) { - e.stopPropagation(); - titleElement.focus(); - }); - - titleElement.addEventListener("change", function () { - def.title = titleElement.value; - table.options.columnTitleChanged.call(self.table, self.getComponent()); - }); - - titleHolderElement.appendChild(titleElement); - - if (def.field) { - table.modules.localize.bind("columns|" + def.field, function (text) { - titleElement.value = text || def.title || " "; - }); - } else { - titleElement.value = def.title || " "; - } - } else { - if (def.field) { - table.modules.localize.bind("columns|" + def.field, function (text) { - self._formatColumnHeaderTitle(titleHolderElement, text || def.title || " "); - }); - } else { - self._formatColumnHeaderTitle(titleHolderElement, def.title || " "); - } - } - - return titleHolderElement; -}; - -Column.prototype._formatColumnHeaderTitle = function (el, title) { - var formatter, contents, params, mockCell; - - if (this.definition.titleFormatter && this.table.modExists("format")) { - - formatter = this.table.modules.format.getFormatter(this.definition.titleFormatter); - - mockCell = { - getValue: function getValue() { - return title; - }, - getElement: function getElement() { - return el; - } - }; - - params = this.definition.titleFormatterParams || {}; - - params = typeof params === "function" ? params() : params; - - contents = formatter.call(this.table.modules.format, mockCell, params); - - switch (typeof contents === 'undefined' ? 'undefined' : _typeof(contents)) { - case "object": - if (contents instanceof Node) { - this.element.appendChild(contents); - } else { - this.element.innerHTML = ""; - console.warn("Format Error - Title formatter has returned a type of object, the only valid formatter object return is an instance of Node, the formatter returned:", contents); - } - break; - case "undefined": - case "null": - this.element.innerHTML = ""; - break; - default: - this.element.innerHTML = contents; - } - } else { - el.innerHTML = title; - } -}; - -//build header element for column group -Column.prototype._buildGroupHeader = function () { - this.element.classList.add("tabulator-col-group"); - this.element.setAttribute("role", "columngroup"); - this.element.setAttribute("aria-title", this.definition.title); - - this.element.appendChild(this.groupElement); -}; - -//flat field lookup -Column.prototype._getFlatData = function (data) { - return data[this.field]; -}; - -//nested field lookup -Column.prototype._getNestedData = function (data) { - var dataObj = data, - structure = this.fieldStructure, - length = structure.length, - output; - - for (var i = 0; i < length; i++) { - - dataObj = dataObj[structure[i]]; - - output = dataObj; - - if (!dataObj) { - break; - } - } - - return output; -}; - -//flat field set -Column.prototype._setFlatData = function (data, value) { - data[this.field] = value; -}; - -//nested field set -Column.prototype._setNesteData = function (data, value) { - var dataObj = data, - structure = this.fieldStructure, - length = structure.length; - - for (var i = 0; i < length; i++) { - - if (i == length - 1) { - dataObj[structure[i]] = value; - } else { - if (!dataObj[structure[i]]) { - dataObj[structure[i]] = {}; - } - - dataObj = dataObj[structure[i]]; - } - } -}; - -//attach column to this group -Column.prototype.attachColumn = function (column) { - var self = this; - - if (self.groupElement) { - self.columns.push(column); - self.groupElement.appendChild(column.getElement()); - } else { - console.warn("Column Warning - Column being attached to another column instead of column group"); - } -}; - -//vertically align header in column -Column.prototype.verticalAlign = function (alignment, height) { - - //calculate height of column header and group holder element - var parentHeight = this.parent.isGroup ? this.parent.getGroupElement().clientHeight : height || this.parent.getHeadersElement().clientHeight; - // var parentHeight = this.parent.isGroup ? this.parent.getGroupElement().clientHeight : this.parent.getHeadersElement().clientHeight; - - this.element.style.height = parentHeight + "px"; - - if (this.isGroup) { - this.groupElement.style.minHeight = parentHeight - this.contentElement.offsetHeight + "px"; - } - - //vertically align cell contents - if (!this.isGroup && alignment !== "top") { - if (alignment === "bottom") { - this.element.style.paddingTop = this.element.clientHeight - this.contentElement.offsetHeight + "px"; - } else { - this.element.style.paddingTop = (this.element.clientHeight - this.contentElement.offsetHeight) / 2 + "px"; - } - } - - this.columns.forEach(function (column) { - column.verticalAlign(alignment); - }); -}; - -//clear vertical alignmenet -Column.prototype.clearVerticalAlign = function () { - this.element.style.paddingTop = ""; - this.element.style.height = ""; - this.element.style.minHeight = ""; - - this.columns.forEach(function (column) { - column.clearVerticalAlign(); - }); -}; - -//// Retreive Column Information //// - -//return column header element -Column.prototype.getElement = function () { - return this.element; -}; - -//return colunm group element -Column.prototype.getGroupElement = function () { - return this.groupElement; -}; - -//return field name -Column.prototype.getField = function () { - return this.field; -}; - -//return the first column in a group -Column.prototype.getFirstColumn = function () { - if (!this.isGroup) { - return this; - } else { - if (this.columns.length) { - return this.columns[0].getFirstColumn(); - } else { - return false; - } - } -}; - -//return the last column in a group -Column.prototype.getLastColumn = function () { - if (!this.isGroup) { - return this; - } else { - if (this.columns.length) { - return this.columns[this.columns.length - 1].getLastColumn(); - } else { - return false; - } - } -}; - -//return all columns in a group -Column.prototype.getColumns = function () { - return this.columns; -}; - -//return all columns in a group -Column.prototype.getCells = function () { - return this.cells; -}; - -//retreive the top column in a group of columns -Column.prototype.getTopColumn = function () { - if (this.parent.isGroup) { - return this.parent.getTopColumn(); - } else { - return this; - } -}; - -//return column definition object -Column.prototype.getDefinition = function (updateBranches) { - var colDefs = []; - - if (this.isGroup && updateBranches) { - this.columns.forEach(function (column) { - colDefs.push(column.getDefinition(true)); - }); - - this.definition.columns = colDefs; - } - - return this.definition; -}; - -//////////////////// Actions //////////////////// - -Column.prototype.checkColumnVisibility = function () { - var visible = false; - - this.columns.forEach(function (column) { - if (column.visible) { - visible = true; - } - }); - - if (visible) { - this.show(); - this.parent.table.options.columnVisibilityChanged.call(this.table, this.getComponent(), false); - } else { - this.hide(); - } -}; - -//show column -Column.prototype.show = function (silent, responsiveToggle) { - if (!this.visible) { - this.visible = true; - - this.element.style.display = ""; - - this.table.columnManager._verticalAlignHeaders(); - - if (this.parent.isGroup) { - this.parent.checkColumnVisibility(); - } - - this.cells.forEach(function (cell) { - cell.show(); - }); - - if (this.table.options.persistentLayout && this.table.modExists("responsiveLayout", true)) { - this.table.modules.persistence.save("columns"); - } - - if (!responsiveToggle && this.table.options.responsiveLayout && this.table.modExists("responsiveLayout", true)) { - this.table.modules.responsiveLayout.updateColumnVisibility(this, this.visible); - } - - if (!silent) { - this.table.options.columnVisibilityChanged.call(this.table, this.getComponent(), true); - } - } -}; - -//hide column -Column.prototype.hide = function (silent, responsiveToggle) { - if (this.visible) { - this.visible = false; - - this.element.style.display = "none"; - - this.table.columnManager._verticalAlignHeaders(); - - if (this.parent.isGroup) { - this.parent.checkColumnVisibility(); - } - - this.cells.forEach(function (cell) { - cell.hide(); - }); - - if (this.table.options.persistentLayout && this.table.modExists("persistence", true)) { - this.table.modules.persistence.save("columns"); - } - - if (!responsiveToggle && this.table.options.responsiveLayout && this.table.modExists("responsiveLayout", true)) { - this.table.modules.responsiveLayout.updateColumnVisibility(this, this.visible); - } - - if (!silent) { - this.table.options.columnVisibilityChanged.call(this.table, this.getComponent(), false); - } - } -}; - -Column.prototype.matchChildWidths = function () { - var childWidth = 0; - - if (this.contentElement && this.columns.length) { - this.columns.forEach(function (column) { - childWidth += column.getWidth(); - }); - - this.contentElement.style.maxWidth = childWidth - 1 + "px"; - } -}; - -Column.prototype.setWidth = function (width) { - this.widthFixed = true; - this.setWidthActual(width); -}; - -Column.prototype.setWidthActual = function (width) { - - if (isNaN(width)) { - width = Math.floor(this.table.element.clientWidth / 100 * parseInt(width)); - } - - width = Math.max(this.minWidth, width); - - this.width = width; - - this.element.style.width = width ? width + "px" : ""; - - if (!this.isGroup) { - this.cells.forEach(function (cell) { - cell.setWidth(width); - }); - } - - if (this.parent.isGroup) { - this.parent.matchChildWidths(); - } - - //set resizable handles - if (this.table.modExists("frozenColumns")) { - this.table.modules.frozenColumns.layout(); - } -}; - -Column.prototype.checkCellHeights = function () { - var rows = []; - - this.cells.forEach(function (cell) { - if (cell.row.heightInitialized) { - if (cell.row.getElement().offsetParent !== null) { - rows.push(cell.row); - cell.row.clearCellHeight(); - } else { - cell.row.heightInitialized = false; - } - } - }); - - rows.forEach(function (row) { - row.calcHeight(); - }); - - rows.forEach(function (row) { - row.setCellHeight(); - }); -}; - -Column.prototype.getWidth = function () { - // return this.element.offsetWidth; - return this.width; -}; - -Column.prototype.getHeight = function () { - return this.element.offsetHeight; -}; - -Column.prototype.setMinWidth = function (minWidth) { - this.minWidth = minWidth; - - this.element.style.minWidth = minWidth ? minWidth + "px" : ""; - - this.cells.forEach(function (cell) { - cell.setMinWidth(minWidth); - }); -}; - -Column.prototype.delete = function () { - if (this.isGroup) { - this.columns.forEach(function (column) { - column.delete(); - }); - } - - var cellCount = this.cells.length; - - for (var i = 0; i < cellCount; i++) { - this.cells[0].delete(); - } - - this.element.parentNode.removeChild(this.element); - - this.table.columnManager.deregisterColumn(this); -}; - -//////////////// Cell Management ///////////////// - -//generate cell for this column -Column.prototype.generateCell = function (row) { - var self = this; - - var cell = new Cell(self, row); - - this.cells.push(cell); - - return cell; -}; - -Column.prototype.reinitializeWidth = function (force) { - - this.widthFixed = false; - - //set width if present - if (typeof this.definition.width !== "undefined" && !force) { - this.setWidth(this.definition.width); - } - - //hide header filters to prevent them altering column width - if (this.table.modExists("filter")) { - this.table.modules.filter.hideHeaderFilterElements(); - } - - this.fitToData(); - - //show header filters again after layout is complete - if (this.table.modExists("filter")) { - this.table.modules.filter.showHeaderFilterElements(); - } -}; - -//set column width to maximum cell width -Column.prototype.fitToData = function () { - var self = this; - - if (!this.widthFixed) { - this.element.width = ""; - - self.cells.forEach(function (cell) { - cell.setWidth(""); - }); - } - - var maxWidth = this.element.offsetWidth; - - if (!self.width || !this.widthFixed) { - self.cells.forEach(function (cell) { - var width = cell.getWidth(); - - if (width > maxWidth) { - maxWidth = width; - } - }); - - if (maxWidth) { - self.setWidthActual(maxWidth + 1); - } - } -}; - -Column.prototype.deleteCell = function (cell) { - var index = this.cells.indexOf(cell); - - if (index > -1) { - this.cells.splice(index, 1); - } -}; - -//////////////// Event Bindings ///////////////// - -//////////////// Object Generation ///////////////// -Column.prototype.getComponent = function () { - return new ColumnComponent(this); -}; -var RowManager = function RowManager(table) { - - this.table = table; - this.element = this.createHolderElement(); //containing element - this.tableElement = this.createTableElement(); //table element - this.columnManager = null; //hold column manager object - this.height = 0; //hold height of table element - - this.firstRender = false; //handle first render - this.renderMode = "classic"; //current rendering mode - - this.rows = []; //hold row data objects - this.activeRows = []; //rows currently available to on display in the table - this.activeRowsCount = 0; //count of active rows - - this.displayRows = []; //rows currently on display in the table - this.displayRowsCount = 0; //count of display rows - - this.scrollTop = 0; - this.scrollLeft = 0; - - this.vDomRowHeight = 20; //approximation of row heights for padding - - this.vDomTop = 0; //hold position for first rendered row in the virtual DOM - this.vDomBottom = 0; //hold possition for last rendered row in the virtual DOM - - this.vDomScrollPosTop = 0; //last scroll position of the vDom top; - this.vDomScrollPosBottom = 0; //last scroll position of the vDom bottom; - - this.vDomTopPad = 0; //hold value of padding for top of virtual DOM - this.vDomBottomPad = 0; //hold value of padding for bottom of virtual DOM - - this.vDomMaxRenderChain = 90; //the maximum number of dom elements that can be rendered in 1 go - - this.vDomWindowBuffer = 0; //window row buffer before removing elements, to smooth scrolling - - this.vDomWindowMinTotalRows = 20; //minimum number of rows to be generated in virtual dom (prevent buffering issues on tables with tall rows) - this.vDomWindowMinMarginRows = 5; //minimum number of rows to be generated in virtual dom margin - - this.vDomTopNewRows = []; //rows to normalize after appending to optimize render speed - this.vDomBottomNewRows = []; //rows to normalize after appending to optimize render speed -}; - -//////////////// Setup Functions ///////////////// - -RowManager.prototype.createHolderElement = function () { - var el = document.createElement("div"); - - el.classList.add("tabulator-tableHolder"); - el.setAttribute("tabindex", 0); - - return el; -}; - -RowManager.prototype.createTableElement = function () { - var el = document.createElement("div"); - - el.classList.add("tabulator-table"); - - return el; -}; - -//return containing element -RowManager.prototype.getElement = function () { - return this.element; -}; - -//return table element -RowManager.prototype.getTableElement = function () { - return this.tableElement; -}; - -//return position of row in table -RowManager.prototype.getRowPosition = function (row, active) { - if (active) { - return this.activeRows.indexOf(row); - } else { - return this.rows.indexOf(row); - } -}; - -//link to column manager -RowManager.prototype.setColumnManager = function (manager) { - this.columnManager = manager; -}; - -RowManager.prototype.initialize = function () { - var self = this; - - self.setRenderMode(); - - //initialize manager - self.element.appendChild(self.tableElement); - - self.firstRender = true; - - //scroll header along with table body - self.element.addEventListener("scroll", function () { - var left = self.element.scrollLeft; - - //handle horizontal scrolling - if (self.scrollLeft != left) { - self.columnManager.scrollHorizontal(left); - - if (self.table.options.groupBy) { - self.table.modules.groupRows.scrollHeaders(left); - } - - if (self.table.modExists("columnCalcs")) { - self.table.modules.columnCalcs.scrollHorizontal(left); - } - } - - self.scrollLeft = left; - }); - - //handle virtual dom scrolling - if (this.renderMode === "virtual") { - - self.element.addEventListener("scroll", function () { - var top = self.element.scrollTop; - var dir = self.scrollTop > top; - - //handle verical scrolling - if (self.scrollTop != top) { - self.scrollTop = top; - self.scrollVertical(dir); - - if (self.table.options.ajaxProgressiveLoad == "scroll") { - self.table.modules.ajax.nextPage(self.element.scrollHeight - self.element.clientHeight - top); - } - } else { - self.scrollTop = top; - } - }); - } -}; - -////////////////// Row Manipulation ////////////////// - -RowManager.prototype.findRow = function (subject) { - var self = this; - - if ((typeof subject === 'undefined' ? 'undefined' : _typeof(subject)) == "object") { - - if (subject instanceof Row) { - //subject is row element - return subject; - } else if (subject instanceof RowComponent) { - //subject is public row component - return subject._getSelf() || false; - } else if (subject instanceof HTMLElement) { - //subject is a HTML element of the row - var match = self.rows.find(function (row) { - return row.element === subject; - }); - - return match || false; - } - } else if (typeof subject == "undefined" || subject === null) { - return false; - } else { - //subject should be treated as the index of the row - var _match = self.rows.find(function (row) { - return row.data[self.table.options.index] == subject; - }); - - return _match || false; - } - - //catch all for any other type of input - - return false; -}; - -RowManager.prototype.getRowFromPosition = function (position, active) { - if (active) { - return this.activeRows[position]; - } else { - return this.rows[position]; - } -}; - -RowManager.prototype.scrollToRow = function (row, position, ifVisible) { - var _this2 = this; - - var rowIndex = this.getDisplayRows().indexOf(row), - rowEl = row.getElement(), - rowTop, - offset = 0; - - return new Promise(function (resolve, reject) { - if (rowIndex > -1) { - - if (typeof position === "undefined") { - position = _this2.table.options.scrollToRowPosition; - } - - if (typeof ifVisible === "undefined") { - ifVisible = _this2.table.options.scrollToRowIfVisible; - } - - if (position === "nearest") { - switch (_this2.renderMode) { - case "classic": - rowTop = Tabulator.prototype.helpers.elOffset(rowEl).top; - position = Math.abs(_this2.element.scrollTop - rowTop) > Math.abs(_this2.element.scrollTop + _this2.element.clientHeight - rowTop) ? "bottom" : "top"; - break; - case "virtual": - position = Math.abs(_this2.vDomTop - rowIndex) > Math.abs(_this2.vDomBottom - rowIndex) ? "bottom" : "top"; - break; - } - } - - //check row visibility - if (!ifVisible) { - if (Tabulator.prototype.helpers.elVisible(rowEl)) { - offset = Tabulator.prototype.helpers.elOffset(rowEl).top - Tabulator.prototype.helpers.elOffset(_this2.element).top; - - if (offset > 0 && offset < _this2.element.clientHeight - rowEl.offsetHeight) { - return false; - } - } - } - - //scroll to row - switch (_this2.renderMode) { - case "classic": - _this2.element.scrollTop = Tabulator.prototype.helpers.elOffset(rowEl).top - Tabulator.prototype.helpers.elOffset(_this2.element).top + _this2.element.scrollTop; - break; - case "virtual": - _this2._virtualRenderFill(rowIndex, true); - break; - } - - //align to correct position - switch (position) { - case "middle": - case "center": - _this2.element.scrollTop = _this2.element.scrollTop - _this2.element.clientHeight / 2; - break; - - case "bottom": - _this2.element.scrollTop = _this2.element.scrollTop - _this2.element.clientHeight + rowEl.offsetHeight; - break; - } - - resolve(); - } else { - console.warn("Scroll Error - Row not visible"); - reject("Scroll Error - Row not visible"); - } - }); -}; - -////////////////// Data Handling ////////////////// - -RowManager.prototype.setData = function (data, renderInPosition) { - var _this3 = this; - - var self = this; - - return new Promise(function (resolve, reject) { - if (renderInPosition && _this3.getDisplayRows().length) { - if (self.table.options.pagination) { - self._setDataActual(data, true); - } else { - _this3.reRenderInPosition(function () { - self._setDataActual(data); - }); - } - } else { - _this3.resetScroll(); - _this3._setDataActual(data); - } - - resolve(); - }); -}; - -RowManager.prototype._setDataActual = function (data, renderInPosition) { - var self = this; - - self.table.options.dataLoading.call(this.table, data); - - self.rows.forEach(function (row) { - row.wipe(); - }); - - self.rows = []; - - if (this.table.options.history && this.table.modExists("history")) { - this.table.modules.history.clear(); - } - - if (Array.isArray(data)) { - - if (this.table.modExists("selectRow")) { - this.table.modules.selectRow.clearSelectionData(); - } - - data.forEach(function (def, i) { - if (def && (typeof def === 'undefined' ? 'undefined' : _typeof(def)) === "object") { - var row = new Row(def, self); - self.rows.push(row); - } else { - console.warn("Data Loading Warning - Invalid row data detected and ignored, expecting object but received:", def); - } - }); - - self.table.options.dataLoaded.call(this.table, data); - - self.refreshActiveData(false, false, renderInPosition); - } else { - console.error("Data Loading Error - Unable to process data due to invalid data type \nExpecting: array \nReceived: ", typeof data === 'undefined' ? 'undefined' : _typeof(data), "\nData: ", data); - } -}; - -RowManager.prototype.deleteRow = function (row) { - var allIndex = this.rows.indexOf(row), - activeIndex = this.activeRows.indexOf(row); - - if (activeIndex > -1) { - this.activeRows.splice(activeIndex, 1); - } - - if (allIndex > -1) { - this.rows.splice(allIndex, 1); - } - - this.setActiveRows(this.activeRows); - - this.displayRowIterator(function (rows) { - var displayIndex = rows.indexOf(row); - - if (displayIndex > -1) { - rows.splice(displayIndex, 1); - } - }); - - this.reRenderInPosition(); - - this.table.options.rowDeleted.call(this.table, row.getComponent()); - - this.table.options.dataEdited.call(this.table, this.getData()); - - if (this.table.options.groupBy && this.table.modExists("groupRows")) { - this.table.modules.groupRows.updateGroupRows(true); - } else if (this.table.options.pagination && this.table.modExists("page")) { - this.refreshActiveData(false, false, true); - } else { - if (this.table.options.pagination && this.table.modExists("page")) { - this.refreshActiveData("page"); - } - } -}; - -RowManager.prototype.addRow = function (data, pos, index, blockRedraw) { - - var row = this.addRowActual(data, pos, index, blockRedraw); - - if (this.table.options.history && this.table.modExists("history")) { - this.table.modules.history.action("rowAdd", row, { data: data, pos: pos, index: index }); - } - - return row; -}; - -//add multiple rows -RowManager.prototype.addRows = function (data, pos, index) { - var _this4 = this; - - var self = this, - length = 0, - rows = []; - - return new Promise(function (resolve, reject) { - pos = _this4.findAddRowPos(pos); - - if (!Array.isArray(data)) { - data = [data]; - } - - length = data.length - 1; - - if (typeof index == "undefined" && pos || typeof index !== "undefined" && !pos) { - data.reverse(); - } - - data.forEach(function (item, i) { - var row = self.addRow(item, pos, index, true); - rows.push(row); - }); - - if (_this4.table.options.groupBy && _this4.table.modExists("groupRows")) { - _this4.table.modules.groupRows.updateGroupRows(true); - } else if (_this4.table.options.pagination && _this4.table.modExists("page")) { - _this4.refreshActiveData(false, false, true); - } else { - _this4.reRenderInPosition(); - } - - //recalc column calculations if present - if (_this4.table.modExists("columnCalcs")) { - _this4.table.modules.columnCalcs.recalc(_this4.table.rowManager.activeRows); - } - - resolve(rows); - }); -}; - -RowManager.prototype.findAddRowPos = function (pos) { - if (typeof pos === "undefined") { - pos = this.table.options.addRowPos; - } - - if (pos === "pos") { - pos = true; - } - - if (pos === "bottom") { - pos = false; - } - - return pos; -}; - -RowManager.prototype.addRowActual = function (data, pos, index, blockRedraw) { - var row = data instanceof Row ? data : new Row(data || {}, this), - top = this.findAddRowPos(pos), - dispRows; - - if (!index && this.table.options.pagination && this.table.options.paginationAddRow == "page") { - dispRows = this.getDisplayRows(); - - if (top) { - if (dispRows.length) { - index = dispRows[0]; - } else { - if (this.activeRows.length) { - index = this.activeRows[this.activeRows.length - 1]; - top = false; - } - } - } else { - if (dispRows.length) { - index = dispRows[dispRows.length - 1]; - top = dispRows.length < this.table.modules.page.getPageSize() ? false : true; - } - } - } - - if (index) { - index = this.findRow(index); - } - - if (this.table.options.groupBy && this.table.modExists("groupRows")) { - this.table.modules.groupRows.assignRowToGroup(row); - - var groupRows = row.getGroup().rows; - - if (groupRows.length > 1) { - - if (!index || index && groupRows.indexOf(index) == -1) { - if (top) { - if (groupRows[0] !== row) { - index = groupRows[0]; - this._moveRowInArray(row.getGroup().rows, row, index, top); - } - } else { - if (groupRows[groupRows.length - 1] !== row) { - index = groupRows[groupRows.length - 1]; - this._moveRowInArray(row.getGroup().rows, row, index, top); - } - } - } else { - this._moveRowInArray(row.getGroup().rows, row, index, top); - } - } - } - - if (index) { - var allIndex = this.rows.indexOf(index), - activeIndex = this.activeRows.indexOf(index); - - this.displayRowIterator(function (rows) { - var displayIndex = rows.indexOf(index); - - if (displayIndex > -1) { - rows.splice(top ? displayIndex : displayIndex + 1, 0, row); - } - }); - - if (activeIndex > -1) { - this.activeRows.splice(top ? activeIndex : activeIndex + 1, 0, row); - } - - if (allIndex > -1) { - this.rows.splice(top ? allIndex : allIndex + 1, 0, row); - } - } else { - - if (top) { - - this.displayRowIterator(function (rows) { - rows.unshift(row); - }); - - this.activeRows.unshift(row); - this.rows.unshift(row); - } else { - this.displayRowIterator(function (rows) { - rows.push(row); - }); - - this.activeRows.push(row); - this.rows.push(row); - } - } - - this.setActiveRows(this.activeRows); - - this.table.options.rowAdded.call(this.table, row.getComponent()); - - this.table.options.dataEdited.call(this.table, this.getData()); - - if (!blockRedraw) { - this.reRenderInPosition(); - } - - return row; -}; - -RowManager.prototype.moveRow = function (from, to, after) { - if (this.table.options.history && this.table.modExists("history")) { - this.table.modules.history.action("rowMove", from, { pos: this.getRowPosition(from), to: to, after: after }); - } - - this.moveRowActual(from, to, after); - - this.table.options.rowMoved.call(this.table, from.getComponent()); -}; - -RowManager.prototype.moveRowActual = function (from, to, after) { - var self = this; - this._moveRowInArray(this.rows, from, to, after); - this._moveRowInArray(this.activeRows, from, to, after); - - this.displayRowIterator(function (rows) { - self._moveRowInArray(rows, from, to, after); - }); - - if (this.table.options.groupBy && this.table.modExists("groupRows")) { - var toGroup = to.getGroup(); - var fromGroup = from.getGroup(); - - if (toGroup === fromGroup) { - this._moveRowInArray(toGroup.rows, from, to, after); - } else { - if (fromGroup) { - fromGroup.removeRow(from); - } - - toGroup.insertRow(from, to, after); - } - } -}; - -RowManager.prototype._moveRowInArray = function (rows, from, to, after) { - var fromIndex, toIndex, start, end; - - if (from !== to) { - - fromIndex = rows.indexOf(from); - - if (fromIndex > -1) { - - rows.splice(fromIndex, 1); - - toIndex = rows.indexOf(to); - - if (toIndex > -1) { - - if (after) { - rows.splice(toIndex + 1, 0, from); - } else { - rows.splice(toIndex, 0, from); - } - } else { - rows.splice(fromIndex, 0, from); - } - } - - //restyle rows - if (rows === this.getDisplayRows()) { - - start = fromIndex < toIndex ? fromIndex : toIndex; - end = toIndex > fromIndex ? toIndex : fromIndex + 1; - - for (var i = start; i <= end; i++) { - if (rows[i]) { - this.styleRow(rows[i], i); - } - } - } - } -}; - -RowManager.prototype.clearData = function () { - this.setData([]); -}; - -RowManager.prototype.getRowIndex = function (row) { - return this.findRowIndex(row, this.rows); -}; - -RowManager.prototype.getDisplayRowIndex = function (row) { - var index = this.getDisplayRows().indexOf(row); - return index > -1 ? index : false; -}; - -RowManager.prototype.nextDisplayRow = function (row, rowOnly) { - var index = this.getDisplayRowIndex(row), - nextRow = false; - - if (index !== false && index < this.displayRowsCount - 1) { - nextRow = this.getDisplayRows()[index + 1]; - } - - if (nextRow && (!(nextRow instanceof Row) || nextRow.type != "row")) { - return this.nextDisplayRow(nextRow, rowOnly); - } - - return nextRow; -}; - -RowManager.prototype.prevDisplayRow = function (row, rowOnly) { - var index = this.getDisplayRowIndex(row), - prevRow = false; - - if (index) { - prevRow = this.getDisplayRows()[index - 1]; - } - - if (prevRow && (!(prevRow instanceof Row) || prevRow.type != "row")) { - return this.prevDisplayRow(prevRow, rowOnly); - } - - return prevRow; -}; - -RowManager.prototype.findRowIndex = function (row, list) { - var rowIndex; - - row = this.findRow(row); - - if (row) { - rowIndex = list.indexOf(row); - - if (rowIndex > -1) { - return rowIndex; - } - } - - return false; -}; - -RowManager.prototype.getData = function (active, transform) { - var self = this, - output = []; - - var rows = active ? self.activeRows : self.rows; - - rows.forEach(function (row) { - output.push(row.getData(transform || "data")); - }); - - return output; -}; - -RowManager.prototype.getHtml = function (active) { - var data = this.getData(active), - columns = [], - header = "", - body = "", - table = ""; - - //build header row - this.table.columnManager.getColumns().forEach(function (column) { - var def = column.getDefinition(); - - if (column.visible && !def.hideInHtml) { - header += '' + (def.title || "") + ''; - columns.push(column); - } - }); - - //build body rows - data.forEach(function (rowData) { - var row = ""; - - columns.forEach(function (column) { - var value = column.getFieldValue(rowData); - - if (typeof value === "undefined" || value === null) { - value = ":"; - } - - row += '' + value + ''; - }); - - body += '' + row + ''; - }); - - //build table - table = '\n\t\t\n\t\t' + header + '\n\t\t\n\t\t' + body + '\n\t\t
'; - - return table; -}; - -RowManager.prototype.getComponents = function (active) { - var self = this, - output = []; - - var rows = active ? self.activeRows : self.rows; - - rows.forEach(function (row) { - output.push(row.getComponent()); - }); - - return output; -}; - -RowManager.prototype.getDataCount = function (active) { - return active ? this.rows.length : this.activeRows.length; -}; - -RowManager.prototype._genRemoteRequest = function () { - var self = this, - table = self.table, - options = table.options, - params = {}; - - if (table.modExists("page")) { - //set sort data if defined - if (options.ajaxSorting) { - var sorters = self.table.modules.sort.getSort(); - - sorters.forEach(function (item) { - delete item.column; - }); - - params[self.table.modules.page.paginationDataSentNames.sorters] = sorters; - } - - //set filter data if defined - if (options.ajaxFiltering) { - var filters = self.table.modules.filter.getFilters(true, true); - - params[self.table.modules.page.paginationDataSentNames.filters] = filters; - } - - self.table.modules.ajax.setParams(params, true); - } - - table.modules.ajax.sendRequest().then(function (data) { - self.setData(data); - }).catch(function (e) {}); -}; - -//choose the path to refresh data after a filter update -RowManager.prototype.filterRefresh = function () { - var table = this.table, - options = table.options, - left = this.scrollLeft; - - if (options.ajaxFiltering) { - if (options.pagination == "remote" && table.modExists("page")) { - table.modules.page.reset(true); - table.modules.page.setPage(1); - } else if (options.ajaxProgressiveLoad) { - table.modules.ajax.loadData(); - } else { - //assume data is url, make ajax call to url to get data - this._genRemoteRequest(); - } - } else { - this.refreshActiveData("filter"); - } - - this.scrollHorizontal(left); -}; - -//choose the path to refresh data after a sorter update -RowManager.prototype.sorterRefresh = function () { - var table = this.table, - options = this.table.options, - left = this.scrollLeft; - - if (options.ajaxSorting) { - if ((options.pagination == "remote" || options.progressiveLoad) && table.modExists("page")) { - table.modules.page.reset(true); - table.modules.page.setPage(1); - } else if (options.ajaxProgressiveLoad) { - table.modules.ajax.loadData(); - } else { - //assume data is url, make ajax call to url to get data - this._genRemoteRequest(); - } - } else { - this.refreshActiveData("sort"); - } - - this.scrollHorizontal(left); -}; - -RowManager.prototype.scrollHorizontal = function (left) { - this.scrollLeft = left; - this.element.scrollLeft = left; - - if (this.table.options.groupBy) { - this.table.modules.groupRows.scrollHeaders(left); - } - - if (this.table.modExists("columnCalcs")) { - this.table.modules.columnCalcs.scrollHorizontal(left); - } -}; - -//set active data set -RowManager.prototype.refreshActiveData = function (stage, skipStage, renderInPosition) { - var self = this, - table = this.table, - displayIndex; - - if (!stage) { - stage = "all"; - } - - if (table.options.selectable && !table.options.selectablePersistence && table.modExists("selectRow")) { - table.modules.selectRow.deselectRows(); - } - - //cascade through data refresh stages - switch (stage) { - case "all": - - case "filter": - if (!skipStage) { - if (table.modExists("filter")) { - self.setActiveRows(table.modules.filter.filter(self.rows)); - } else { - self.setActiveRows(self.rows.slice(0)); - } - } else { - skipStage = false; - } - - case "sort": - if (!skipStage) { - if (table.modExists("sort")) { - table.modules.sort.sort(); - } - } else { - skipStage = false; - } - - //generic stage to allow for pipeline trigger after the data manipulation stage - case "display": - this.resetDisplayRows(); - - case "freeze": - if (!skipStage) { - if (this.table.modExists("frozenRows")) { - if (table.modules.frozenRows.isFrozen()) { - if (!table.modules.frozenRows.getDisplayIndex()) { - table.modules.frozenRows.setDisplayIndex(this.getNextDisplayIndex()); - } - - displayIndex = table.modules.frozenRows.getDisplayIndex(); - - displayIndex = self.setDisplayRows(table.modules.frozenRows.getRows(this.getDisplayRows(displayIndex - 1)), displayIndex); - - if (displayIndex !== true) { - table.modules.frozenRows.setDisplayIndex(displayIndex); - } - } - } - } else { - skipStage = false; - } - - case "group": - if (!skipStage) { - if (table.options.groupBy && table.modExists("groupRows")) { - - if (!table.modules.groupRows.getDisplayIndex()) { - table.modules.groupRows.setDisplayIndex(this.getNextDisplayIndex()); - } - - displayIndex = table.modules.groupRows.getDisplayIndex(); - - displayIndex = self.setDisplayRows(table.modules.groupRows.getRows(this.getDisplayRows(displayIndex - 1)), displayIndex); - - if (displayIndex !== true) { - table.modules.groupRows.setDisplayIndex(displayIndex); - } - } - } else { - skipStage = false; - } - - case "tree": - - if (!skipStage) { - if (table.options.dataTree && table.modExists("dataTree")) { - if (!table.modules.dataTree.getDisplayIndex()) { - table.modules.dataTree.setDisplayIndex(this.getNextDisplayIndex()); - } - - displayIndex = table.modules.dataTree.getDisplayIndex(); - - displayIndex = self.setDisplayRows(table.modules.dataTree.getRows(this.getDisplayRows(displayIndex - 1)), displayIndex); - - if (displayIndex !== true) { - table.modules.dataTree.setDisplayIndex(displayIndex); - } - } - } else { - skipStage = false; - } - - if (table.options.pagination && table.modExists("page") && !renderInPosition) { - if (table.modules.page.getMode() == "local") { - table.modules.page.reset(); - } - } - - case "page": - if (!skipStage) { - if (table.options.pagination && table.modExists("page")) { - - if (!table.modules.page.getDisplayIndex()) { - table.modules.page.setDisplayIndex(this.getNextDisplayIndex()); - } - - displayIndex = table.modules.page.getDisplayIndex(); - - if (table.modules.page.getMode() == "local") { - table.modules.page.setMaxRows(this.getDisplayRows(displayIndex - 1).length); - } - - displayIndex = self.setDisplayRows(table.modules.page.getRows(this.getDisplayRows(displayIndex - 1)), displayIndex); - - if (displayIndex !== true) { - table.modules.page.setDisplayIndex(displayIndex); - } - } - } else { - skipStage = false; - } - } - - if (Tabulator.prototype.helpers.elVisible(self.element)) { - if (renderInPosition) { - self.reRenderInPosition(); - } else { - self.renderTable(); - if (table.options.layoutColumnsOnNewData) { - self.table.columnManager.redraw(true); - } - } - } - - if (table.modExists("columnCalcs")) { - table.modules.columnCalcs.recalc(this.activeRows); - } -}; - -RowManager.prototype.setActiveRows = function (activeRows) { - this.activeRows = activeRows; - this.activeRowsCount = this.activeRows.length; -}; - -//reset display rows array -RowManager.prototype.resetDisplayRows = function () { - this.displayRows = []; - - this.displayRows.push(this.activeRows.slice(0)); - - this.displayRowsCount = this.displayRows[0].length; - - if (this.table.modExists("frozenRows")) { - this.table.modules.frozenRows.setDisplayIndex(0); - } - - if (this.table.options.groupBy && this.table.modExists("groupRows")) { - this.table.modules.groupRows.setDisplayIndex(0); - } - - if (this.table.options.pagination && this.table.modExists("page")) { - this.table.modules.page.setDisplayIndex(0); - } -}; - -RowManager.prototype.getNextDisplayIndex = function () { - return this.displayRows.length; -}; - -//set display row pipeline data -RowManager.prototype.setDisplayRows = function (displayRows, index) { - - var output = true; - - if (index && typeof this.displayRows[index] != "undefined") { - this.displayRows[index] = displayRows; - output = true; - } else { - this.displayRows.push(displayRows); - output = index = this.displayRows.length - 1; - } - - if (index == this.displayRows.length - 1) { - this.displayRowsCount = this.displayRows[this.displayRows.length - 1].length; - } - - return output; -}; - -RowManager.prototype.getDisplayRows = function (index) { - if (typeof index == "undefined") { - return this.displayRows.length ? this.displayRows[this.displayRows.length - 1] : []; - } else { - return this.displayRows[index] || []; - } -}; - -//repeat action accross display rows -RowManager.prototype.displayRowIterator = function (callback) { - this.displayRows.forEach(callback); - - this.displayRowsCount = this.displayRows[this.displayRows.length - 1].length; -}; - -//return only actual rows (not group headers etc) -RowManager.prototype.getRows = function () { - return this.rows; -}; - -///////////////// Table Rendering ///////////////// - -//trigger rerender of table in current position -RowManager.prototype.reRenderInPosition = function (callback) { - if (this.getRenderMode() == "virtual") { - - var scrollTop = this.element.scrollTop; - var topRow = false; - var topOffset = false; - - var left = this.scrollLeft; - - var rows = this.getDisplayRows(); - - for (var i = this.vDomTop; i <= this.vDomBottom; i++) { - - if (rows[i]) { - var diff = scrollTop - rows[i].getElement().offsetTop; - - if (topOffset === false || Math.abs(diff) < topOffset) { - topOffset = diff; - topRow = i; - } else { - break; - } - } - } - - if (callback) { - callback(); - } - - this._virtualRenderFill(topRow === false ? this.displayRowsCount - 1 : topRow, true, topOffset || 0); - - this.scrollHorizontal(left); - } else { - this.renderTable(); - } -}; - -RowManager.prototype.setRenderMode = function () { - if ((this.table.element.clientHeight || this.table.options.height) && this.table.options.virtualDom) { - this.renderMode = "virtual"; - } else { - this.renderMode = "classic"; - } -}; - -RowManager.prototype.getRenderMode = function () { - return this.renderMode; -}; - -RowManager.prototype.renderTable = function () { - var self = this; - - self.table.options.renderStarted.call(this.table); - - self.element.scrollTop = 0; - - switch (self.renderMode) { - case "classic": - self._simpleRender(); - break; - - case "virtual": - self._virtualRenderFill(); - break; - } - - if (self.firstRender) { - if (self.displayRowsCount) { - self.firstRender = false; - self.table.modules.layout.layout(); - } else { - self.renderEmptyScroll(); - } - } - - if (self.table.modExists("frozenColumns")) { - self.table.modules.frozenColumns.layout(); - } - - if (!self.displayRowsCount) { - if (self.table.options.placeholder) { - - if (this.renderMode) { - self.table.options.placeholder.setAttribute("tabulator-render-mode", this.renderMode); - } - - self.getElement().appendChild(self.table.options.placeholder); - } - } - - self.table.options.renderComplete.call(this.table); -}; - -//simple render on heightless table -RowManager.prototype._simpleRender = function () { - var self = this, - element = this.tableElement; - - self._clearVirtualDom(); - - if (self.displayRowsCount) { - - var onlyGroupHeaders = true; - - self.getDisplayRows().forEach(function (row, index) { - self.styleRow(row, index); - element.appendChild(row.getElement()); - row.initialize(true); - - if (row.type !== "group") { - onlyGroupHeaders = false; - } - }); - - if (onlyGroupHeaders) { - element.style.minWidth = self.table.columnManager.getWidth() + "px"; - } - } else { - self.renderEmptyScroll(); - } -}; - -//show scrollbars on empty table div -RowManager.prototype.renderEmptyScroll = function () { - this.tableElement.style.minWidth = this.table.columnManager.getWidth(); - this.tableElement.style.minHeight = "1px"; - // this.tableElement.style.visibility = "hidden"; -}; - -RowManager.prototype._clearVirtualDom = function () { - var element = this.tableElement; - - if (this.table.options.placeholder && this.table.options.placeholder.parentNode) { - this.table.options.placeholder.parentNode.removeChild(this.table.options.placeholder); - } - - // element.children.detach(); - while (element.firstChild) { - element.removeChild(element.firstChild); - }element.style.paddingTop = ""; - element.style.paddingBottom = ""; - element.style.minWidth = ""; - element.style.minHeight = ""; - element.style.visibility = ""; - - this.scrollTop = 0; - this.scrollLeft = 0; - this.vDomTop = 0; - this.vDomBottom = 0; - this.vDomTopPad = 0; - this.vDomBottomPad = 0; -}; - -RowManager.prototype.styleRow = function (row, index) { - var rowEl = row.getElement(); - - if (index % 2) { - rowEl.classList.add("tabulator-row-even"); - rowEl.classList.remove("tabulator-row-odd"); - } else { - rowEl.classList.add("tabulator-row-odd"); - rowEl.classList.remove("tabulator-row-even"); - } -}; - -//full virtual render -RowManager.prototype._virtualRenderFill = function (position, forceMove, offset) { - var self = this, - element = self.tableElement, - holder = self.element, - topPad = 0, - rowsHeight = 0, - topPadHeight = 0, - i = 0, - onlyGroupHeaders = true, - rows = self.getDisplayRows(); - - position = position || 0; - - offset = offset || 0; - - if (!position) { - self._clearVirtualDom(); - } else { - // element.children().detach(); - while (element.firstChild) { - element.removeChild(element.firstChild); - } //check if position is too close to bottom of table - var heightOccpied = (self.displayRowsCount - position + 1) * self.vDomRowHeight; - - if (heightOccpied < self.height) { - position -= Math.ceil((self.height - heightOccpied) / self.vDomRowHeight); - - if (position < 0) { - position = 0; - } - } - - //calculate initial pad - topPad = Math.min(Math.max(Math.floor(self.vDomWindowBuffer / self.vDomRowHeight), self.vDomWindowMinMarginRows), position); - position -= topPad; - } - - if (self.displayRowsCount && Tabulator.prototype.helpers.elVisible(self.element)) { - - self.vDomTop = position; - - self.vDomBottom = position - 1; - - while ((rowsHeight <= self.height + self.vDomWindowBuffer || i < self.vDomWindowMinTotalRows) && self.vDomBottom < self.displayRowsCount - 1) { - var index = self.vDomBottom + 1, - row = rows[index]; - - self.styleRow(row, index); - - element.appendChild(row.getElement()); - if (!row.initialized) { - row.initialize(true); - } else { - if (!row.heightInitialized) { - row.normalizeHeight(true); - } - } - - if (i < topPad) { - topPadHeight += row.getHeight(); - } else { - rowsHeight += row.getHeight(); - } - - if (row.type !== "group") { - onlyGroupHeaders = false; - } - - self.vDomBottom++; - i++; - } - - if (!position) { - this.vDomTopPad = 0; - //adjust rowheight to match average of rendered elements - self.vDomRowHeight = Math.floor((rowsHeight + topPadHeight) / i); - self.vDomBottomPad = self.vDomRowHeight * (self.displayRowsCount - self.vDomBottom - 1); - - self.vDomScrollHeight = topPadHeight + rowsHeight + self.vDomBottomPad - self.height; - } else { - self.vDomTopPad = !forceMove ? self.scrollTop - topPadHeight : self.vDomRowHeight * this.vDomTop + offset; - self.vDomBottomPad = self.vDomBottom == self.displayRowsCount - 1 ? 0 : Math.max(self.vDomScrollHeight - self.vDomTopPad - rowsHeight - topPadHeight, 0); - } - - element.style.paddingTop = self.vDomTopPad + "px"; - element.style.paddingBottom = self.vDomBottomPad + "px"; - - if (forceMove) { - this.scrollTop = self.vDomTopPad + topPadHeight + offset - (this.element.scrollWidth > this.element.clientWidth ? this.element.offsetHeight - this.element.clientHeight : 0); - } - - this.scrollTop = Math.min(this.scrollTop, this.element.scrollHeight - this.height); - - //adjust for horizontal scrollbar if present - if (this.element.scrollWidth > this.element.offsetWidth) { - this.scrollTop += this.element.offsetHeight - this.element.clientHeight; - } - - this.vDomScrollPosTop = this.scrollTop; - this.vDomScrollPosBottom = this.scrollTop; - - holder.scrollTop = this.scrollTop; - - element.style.minWidth = onlyGroupHeaders ? self.table.columnManager.getWidth() + "px" : ""; - - if (self.table.options.groupBy) { - if (self.table.modules.layout.getMode() != "fitDataFill" && self.displayRowsCount == self.table.modules.groupRows.countGroups()) { - self.tableElement.style.minWidth = self.table.columnManager.getWidth(); - } - } - } else { - this.renderEmptyScroll(); - } -}; - -//handle vertical scrolling -RowManager.prototype.scrollVertical = function (dir) { - var topDiff = this.scrollTop - this.vDomScrollPosTop; - var bottomDiff = this.scrollTop - this.vDomScrollPosBottom; - var margin = this.vDomWindowBuffer * 2; - - if (-topDiff > margin || bottomDiff > margin) { - //if big scroll redraw table; - var left = this.scrollLeft; - this._virtualRenderFill(Math.floor(this.element.scrollTop / this.element.scrollHeight * this.displayRowsCount)); - this.scrollHorizontal(left); - } else { - - if (dir) { - //scrolling up - if (topDiff < 0) { - this._addTopRow(-topDiff); - } - - if (topDiff < 0) { - - //hide bottom row if needed - if (this.vDomScrollHeight - this.scrollTop > this.vDomWindowBuffer) { - this._removeBottomRow(-bottomDiff); - } - } - } else { - //scrolling down - if (topDiff >= 0) { - - //hide top row if needed - if (this.scrollTop > this.vDomWindowBuffer) { - this._removeTopRow(topDiff); - } - } - - if (bottomDiff >= 0) { - this._addBottomRow(bottomDiff); - } - } - } -}; - -RowManager.prototype._addTopRow = function (topDiff) { - var i = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 0; - - var table = this.tableElement, - rows = this.getDisplayRows(); - - if (this.vDomTop) { - var index = this.vDomTop - 1, - topRow = rows[index], - topRowHeight = topRow.getHeight() || this.vDomRowHeight; - - //hide top row if needed - if (topDiff >= topRowHeight) { - this.styleRow(topRow, index); - table.insertBefore(topRow.getElement(), table.firstChild); - if (!topRow.initialized || !topRow.heightInitialized) { - this.vDomTopNewRows.push(topRow); - - if (!topRow.heightInitialized) { - topRow.clearCellHeight(); - } - } - topRow.initialize(); - - this.vDomTopPad -= topRowHeight; - - if (this.vDomTopPad < 0) { - this.vDomTopPad = index * this.vDomRowHeight; - } - - if (!index) { - this.vDomTopPad = 0; - } - - table.style.paddingTop = this.vDomTopPad + "px"; - this.vDomScrollPosTop -= topRowHeight; - this.vDomTop--; - } - - topDiff = -(this.scrollTop - this.vDomScrollPosTop); - - if (i < this.vDomMaxRenderChain && this.vDomTop && topDiff >= (rows[this.vDomTop - 1].getHeight() || this.vDomRowHeight)) { - this._addTopRow(topDiff, i + 1); - } else { - this._quickNormalizeRowHeight(this.vDomTopNewRows); - } - } -}; - -RowManager.prototype._removeTopRow = function (topDiff) { - var table = this.tableElement, - topRow = this.getDisplayRows()[this.vDomTop], - topRowHeight = topRow.getHeight() || this.vDomRowHeight; - - if (topDiff >= topRowHeight) { - - var rowEl = topRow.getElement(); - rowEl.parentNode.removeChild(rowEl); - - this.vDomTopPad += topRowHeight; - table.style.paddingTop = this.vDomTopPad + "px"; - this.vDomScrollPosTop += this.vDomTop ? topRowHeight : topRowHeight + this.vDomWindowBuffer; - this.vDomTop++; - - topDiff = this.scrollTop - this.vDomScrollPosTop; - - this._removeTopRow(topDiff); - } -}; - -RowManager.prototype._addBottomRow = function (bottomDiff) { - var i = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 0; - - var table = this.tableElement, - rows = this.getDisplayRows(); - - if (this.vDomBottom < this.displayRowsCount - 1) { - var index = this.vDomBottom + 1, - bottomRow = rows[index], - bottomRowHeight = bottomRow.getHeight() || this.vDomRowHeight; - - //hide bottom row if needed - if (bottomDiff >= bottomRowHeight) { - this.styleRow(bottomRow, index); - table.appendChild(bottomRow.getElement()); - - if (!bottomRow.initialized || !bottomRow.heightInitialized) { - this.vDomBottomNewRows.push(bottomRow); - - if (!bottomRow.heightInitialized) { - bottomRow.clearCellHeight(); - } - } - - bottomRow.initialize(); - - this.vDomBottomPad -= bottomRowHeight; - - if (this.vDomBottomPad < 0 || index == this.displayRowsCount - 1) { - this.vDomBottomPad = 0; - } - - table.style.paddingBottom = this.vDomBottomPad + "px"; - this.vDomScrollPosBottom += bottomRowHeight; - this.vDomBottom++; - } - - bottomDiff = this.scrollTop - this.vDomScrollPosBottom; - - if (i < this.vDomMaxRenderChain && this.vDomBottom < this.displayRowsCount - 1 && bottomDiff >= (rows[this.vDomBottom + 1].getHeight() || this.vDomRowHeight)) { - this._addBottomRow(bottomDiff, i + 1); - } else { - this._quickNormalizeRowHeight(this.vDomBottomNewRows); - } - } -}; - -RowManager.prototype._removeBottomRow = function (bottomDiff) { - var table = this.tableElement, - bottomRow = this.getDisplayRows()[this.vDomBottom], - bottomRowHeight = bottomRow.getHeight() || this.vDomRowHeight; - - if (bottomDiff >= bottomRowHeight) { - - var rowEl = bottomRow.getElement(); - - if (rowEl.parentNode) { - rowEl.parentNode.removeChild(rowEl); - } - - this.vDomBottomPad += bottomRowHeight; - - if (this.vDomBottomPad < 0) { - this.vDomBottomPad = 0; - } - - table.style.paddingBottom = this.vDomBottomPad + "px"; - this.vDomScrollPosBottom -= bottomRowHeight; - this.vDomBottom--; - - bottomDiff = -(this.scrollTop - this.vDomScrollPosBottom); - - this._removeBottomRow(bottomDiff); - } -}; - -RowManager.prototype._quickNormalizeRowHeight = function (rows) { - rows.forEach(function (row) { - row.calcHeight(); - }); - - rows.forEach(function (row) { - row.setCellHeight(); - }); - - rows.length = 0; -}; - -//normalize height of active rows -RowManager.prototype.normalizeHeight = function () { - this.activeRows.forEach(function (row) { - row.normalizeHeight(); - }); -}; - -//adjust the height of the table holder to fit in the Tabulator element -RowManager.prototype.adjustTableSize = function () { - - if (this.renderMode === "virtual") { - this.height = this.element.clientHeight; - this.vDomWindowBuffer = this.table.options.virtualDomBuffer || this.height; - - var otherHeight = this.columnManager.getElement().offsetHeight + (this.table.footerManager && !this.table.footerManager.external ? this.table.footerManager.getElement().offsetHeight : 0); - - this.element.style.minHeight = "calc(100% - " + otherHeight + "px)"; - this.element.style.height = "calc(100% - " + otherHeight + "px)"; - this.element.style.maxHeight = "calc(100% - " + otherHeight + "px)"; - } -}; - -//renitialize all rows -RowManager.prototype.reinitialize = function () { - this.rows.forEach(function (row) { - row.reinitialize(); - }); -}; - -//redraw table -RowManager.prototype.redraw = function (force) { - var pos = 0, - left = this.scrollLeft; - - this.adjustTableSize(); - - if (!force) { - - if (self.renderMode == "classic") { - - if (self.table.options.groupBy) { - self.refreshActiveData("group", false, false); - } else { - this._simpleRender(); - } - } else { - this.reRenderInPosition(); - this.scrollHorizontal(left); - } - - if (!this.displayRowsCount) { - if (this.table.options.placeholder) { - this.getElement().appendChild(this.table.options.placeholder); - } - } - } else { - this.renderTable(); - } -}; - -RowManager.prototype.resetScroll = function () { - this.element.scrollLeft = 0; - this.element.scrollTop = 0; - - if (this.table.browser === "ie") { - var event = document.createEvent("Event"); - event.initEvent("scroll", false, true); - this.element.dispatchEvent(event); - } else { - this.element.dispatchEvent(new Event('scroll')); - } -}; - -//public row object -var RowComponent = function RowComponent(row) { - this._row = row; -}; - -RowComponent.prototype.getData = function (transform) { - return this._row.getData(transform); -}; - -RowComponent.prototype.getElement = function () { - return this._row.getElement(); -}; - -RowComponent.prototype.getCells = function () { - var cells = []; - - this._row.getCells().forEach(function (cell) { - cells.push(cell.getComponent()); - }); - - return cells; -}; - -RowComponent.prototype.getCell = function (column) { - var cell = this._row.getCell(column); - return cell ? cell.getComponent() : false; -}; - -RowComponent.prototype.getIndex = function () { - return this._row.getData("data")[this._row.table.options.index]; -}; - -RowComponent.prototype.getPosition = function (active) { - return this._row.table.rowManager.getRowPosition(this._row, active); -}; - -RowComponent.prototype.delete = function () { - return this._row.delete(); -}; - -RowComponent.prototype.scrollTo = function () { - return this._row.table.rowManager.scrollToRow(this._row); -}; - -RowComponent.prototype.update = function (data) { - return this._row.updateData(data); -}; - -RowComponent.prototype.normalizeHeight = function () { - this._row.normalizeHeight(true); -}; - -RowComponent.prototype.select = function () { - this._row.table.modules.selectRow.selectRows(this._row); -}; - -RowComponent.prototype.deselect = function () { - this._row.table.modules.selectRow.deselectRows(this._row); -}; - -RowComponent.prototype.toggleSelect = function () { - this._row.table.modules.selectRow.toggleRow(this._row); -}; - -RowComponent.prototype.isSelected = function () { - return this._row.table.modules.selectRow.isRowSelected(this._row); -}; - -RowComponent.prototype._getSelf = function () { - return this._row; -}; - -RowComponent.prototype.freeze = function () { - if (this._row.table.modExists("frozenRows", true)) { - this._row.table.modules.frozenRows.freezeRow(this._row); - } -}; - -RowComponent.prototype.unfreeze = function () { - if (this._row.table.modExists("frozenRows", true)) { - this._row.table.modules.frozenRows.unfreezeRow(this._row); - } -}; - -RowComponent.prototype.treeCollapse = function () { - if (this._row.table.modExists("dataTree", true)) { - this._row.table.modules.dataTree.collapseRow(this._row); - } -}; - -RowComponent.prototype.treeExpand = function () { - if (this._row.table.modExists("dataTree", true)) { - this._row.table.modules.dataTree.expandRow(this._row); - } -}; - -RowComponent.prototype.treeToggle = function () { - if (this._row.table.modExists("dataTree", true)) { - this._row.table.modules.dataTree.toggleRow(this._row); - } -}; - -RowComponent.prototype.getTreeParent = function () { - if (this._row.table.modExists("dataTree", true)) { - return this._row.table.modules.dataTree.getTreeParent(this._row); - } - - return false; -}; - -RowComponent.prototype.getTreeChildren = function () { - if (this._row.table.modExists("dataTree", true)) { - return this._row.table.modules.dataTree.getTreeChildren(this._row); - } - - return false; -}; - -RowComponent.prototype.reformat = function () { - return this._row.reinitialize(); -}; - -RowComponent.prototype.getGroup = function () { - return this._row.getGroup().getComponent(); -}; - -RowComponent.prototype.getTable = function () { - return this._row.table; -}; - -RowComponent.prototype.getNextRow = function () { - return this._row.nextRow(); -}; - -RowComponent.prototype.getPrevRow = function () { - return this._row.prevRow(); -}; - -var Row = function Row(data, parent) { - this.table = parent.table; - this.parent = parent; - this.data = {}; - this.type = "row"; //type of element - this.element = this.createElement(); - this.modules = {}; //hold module variables; - this.cells = []; - this.height = 0; //hold element height - this.outerHeight = 0; //holde lements outer height - this.initialized = false; //element has been rendered - this.heightInitialized = false; //element has resized cells to fit - - this.setData(data); - this.generateElement(); -}; - -Row.prototype.createElement = function () { - var el = document.createElement("div"); - - el.classList.add("tabulator-row"); - el.setAttribute("role", "row"); - - return el; -}; - -Row.prototype.getElement = function () { - return this.element; -}; - -Row.prototype.generateElement = function () { - var self = this, - dblTap, - tapHold, - tap; - - //set row selection characteristics - if (self.table.options.selectable !== false && self.table.modExists("selectRow")) { - self.table.modules.selectRow.initializeRow(this); - } - - //setup movable rows - if (self.table.options.movableRows !== false && self.table.modExists("moveRow")) { - self.table.modules.moveRow.initializeRow(this); - } - - //setup data tree - if (self.table.options.dataTree !== false && self.table.modExists("dataTree")) { - self.table.modules.dataTree.initializeRow(this); - } - - //handle row click events - if (self.table.options.rowClick) { - self.element.addEventListener("click", function (e) { - self.table.options.rowClick(e, self.getComponent()); - }); - } - - if (self.table.options.rowDblClick) { - self.element.addEventListener("dblclick", function (e) { - self.table.options.rowDblClick(e, self.getComponent()); - }); - } - - if (self.table.options.rowContext) { - self.element.addEventListener("contextmenu", function (e) { - self.table.options.rowContext(e, self.getComponent()); - }); - } - - if (self.table.options.rowTap) { - - tap = false; - - self.element.addEventListener("touchstart", function (e) { - tap = true; - }); - - self.element.addEventListener("touchend", function (e) { - if (tap) { - self.table.options.rowTap(e, self.getComponent()); - } - - tap = false; - }); - } - - if (self.table.options.rowDblTap) { - - dblTap = null; - - self.element.addEventListener("touchend", function (e) { - - if (dblTap) { - clearTimeout(dblTap); - dblTap = null; - - self.table.options.rowDblTap(e, self.getComponent()); - } else { - - dblTap = setTimeout(function () { - clearTimeout(dblTap); - dblTap = null; - }, 300); - } - }); - } - - if (self.table.options.rowTapHold) { - - tapHold = null; - - self.element.addEventListener("touchstart", function (e) { - clearTimeout(tapHold); - - tapHold = setTimeout(function () { - clearTimeout(tapHold); - tapHold = null; - tap = false; - self.table.options.rowTapHold(e, self.getComponent()); - }, 1000); - }); - - self.element.addEventListener("touchend", function (e) { - clearTimeout(tapHold); - tapHold = null; - }); - } -}; - -Row.prototype.generateCells = function () { - this.cells = this.table.columnManager.generateCells(this); -}; - -//functions to setup on first render -Row.prototype.initialize = function (force) { - var self = this; - - if (!self.initialized || force) { - - self.deleteCells(); - - while (self.element.firstChild) { - self.element.removeChild(self.element.firstChild); - } //handle frozen cells - if (this.table.modExists("frozenColumns")) { - this.table.modules.frozenColumns.layoutRow(this); - } - - this.generateCells(); - - self.cells.forEach(function (cell) { - self.element.appendChild(cell.getElement()); - cell.cellRendered(); - }); - - if (force) { - self.normalizeHeight(); - } - - //setup movable rows - if (self.table.options.dataTree && self.table.modExists("dataTree")) { - self.table.modules.dataTree.layoutRow(this); - } - - //setup movable rows - if (self.table.options.responsiveLayout === "collapse" && self.table.modExists("responsiveLayout")) { - self.table.modules.responsiveLayout.layoutRow(this); - } - - if (self.table.options.rowFormatter) { - self.table.options.rowFormatter(self.getComponent()); - } - - //set resizable handles - if (self.table.options.resizableRows && self.table.modExists("resizeRows")) { - self.table.modules.resizeRows.initializeRow(self); - } - - self.initialized = true; - } -}; - -Row.prototype.reinitializeHeight = function () { - this.heightInitialized = false; - - if (this.element.offsetParent !== null) { - this.normalizeHeight(true); - } -}; - -Row.prototype.reinitialize = function () { - this.initialized = false; - this.heightInitialized = false; - this.height = 0; - - if (this.element.offsetParent !== null) { - this.initialize(true); - } -}; - -//get heights when doing bulk row style calcs in virtual DOM -Row.prototype.calcHeight = function () { - - var maxHeight = 0, - minHeight = this.table.options.resizableRows ? this.element.clientHeight : 0; - - this.cells.forEach(function (cell) { - var height = cell.getHeight(); - if (height > maxHeight) { - maxHeight = height; - } - }); - - this.height = Math.max(maxHeight, minHeight); - this.outerHeight = this.element.offsetHeight; -}; - -//set of cells -Row.prototype.setCellHeight = function () { - var height = this.height; - - this.cells.forEach(function (cell) { - cell.setHeight(height); - }); - - this.heightInitialized = true; -}; - -Row.prototype.clearCellHeight = function () { - this.cells.forEach(function (cell) { - - cell.clearHeight(); - }); -}; - -//normalize the height of elements in the row -Row.prototype.normalizeHeight = function (force) { - - if (force) { - this.clearCellHeight(); - } - - this.calcHeight(); - - this.setCellHeight(); -}; - -Row.prototype.setHeight = function (height) { - this.height = height; - - this.setCellHeight(); -}; - -//set height of rows -Row.prototype.setHeight = function (height, force) { - if (this.height != height || force) { - - this.height = height; - - this.setCellHeight(); - - // this.outerHeight = this.element.outerHeight(); - this.outerHeight = this.element.offsetHeight; - } -}; - -//return rows outer height -Row.prototype.getHeight = function () { - return this.outerHeight; -}; - -//return rows outer Width -Row.prototype.getWidth = function () { - return this.element.offsetWidth; -}; - -//////////////// Cell Management ///////////////// - -Row.prototype.deleteCell = function (cell) { - var index = this.cells.indexOf(cell); - - if (index > -1) { - this.cells.splice(index, 1); - } -}; - -//////////////// Data Management ///////////////// - -Row.prototype.setData = function (data) { - var self = this; - - if (self.table.modExists("mutator")) { - self.data = self.table.modules.mutator.transformRow(data, "data"); - } else { - self.data = data; - } -}; - -//update the rows data -Row.prototype.updateData = function (data) { - var _this5 = this; - - var self = this; - - return new Promise(function (resolve, reject) { - - if (typeof data === "string") { - data = JSON.parse(data); - } - - //mutate incomming data if needed - if (self.table.modExists("mutator")) { - data = self.table.modules.mutator.transformRow(data, "data", true); - } - - //set data - for (var attrname in data) { - self.data[attrname] = data[attrname]; - } - - //update affected cells only - for (var attrname in data) { - var cell = _this5.getCell(attrname); - - if (cell) { - if (cell.getValue() != data[attrname]) { - cell.setValueProcessData(data[attrname]); - } - } - } - - //Partial reinitialization if visible - if (Tabulator.prototype.helpers.elVisible(_this5.element)) { - self.normalizeHeight(); - - if (self.table.options.rowFormatter) { - self.table.options.rowFormatter(self.getComponent()); - } - } else { - _this5.initialized = false; - _this5.height = 0; - } - - //self.reinitialize(); - - self.table.options.rowUpdated.call(_this5.table, self.getComponent()); - - resolve(); - }); -}; - -Row.prototype.getData = function (transform) { - var self = this; - - if (transform) { - if (self.table.modExists("accessor")) { - return self.table.modules.accessor.transformRow(self.data, transform); - } - } else { - return this.data; - } -}; - -Row.prototype.getCell = function (column) { - var match = false; - - column = this.table.columnManager.findColumn(column); - - match = this.cells.find(function (cell) { - return cell.column === column; - }); - - return match; -}; - -Row.prototype.getCellIndex = function (findCell) { - return this.cells.findIndex(function (cell) { - return cell === findCell; - }); -}; - -Row.prototype.findNextEditableCell = function (index) { - var nextCell = false; - - if (index < this.cells.length - 1) { - for (var i = index + 1; i < this.cells.length; i++) { - var cell = this.cells[i]; - - if (cell.column.modules.edit && Tabulator.prototype.helpers.elVisible(cell.getElement())) { - var allowEdit = true; - - if (typeof cell.column.modules.edit.check == "function") { - allowEdit = cell.column.modules.edit.check(cell.getComponent()); - } - - if (allowEdit) { - nextCell = cell; - break; - } - } - } - } - - return nextCell; -}; - -Row.prototype.findPrevEditableCell = function (index) { - var prevCell = false; - - if (index > 0) { - for (var i = index - 1; i >= 0; i--) { - var cell = this.cells[i], - allowEdit = true; - - if (cell.column.modules.edit && Tabulator.prototype.helpers.elVisible(cell.getElement())) { - if (typeof cell.column.modules.edit.check == "function") { - allowEdit = cell.column.modules.edit.check(cell.getComponent()); - } - - if (allowEdit) { - prevCell = cell; - break; - } - } - } - } - - return prevCell; -}; - -Row.prototype.getCells = function () { - return this.cells; -}; - -Row.prototype.nextRow = function () { - var row = this.table.rowManager.nextDisplayRow(this, true); - return row ? row.getComponent() : false; -}; - -Row.prototype.prevRow = function () { - var row = this.table.rowManager.prevDisplayRow(this, true); - return row ? row.getComponent() : false; -}; - -///////////////////// Actions ///////////////////// - -Row.prototype.delete = function () { - var _this6 = this; - - return new Promise(function (resolve, reject) { - var index = _this6.table.rowManager.getRowIndex(_this6); - - _this6.deleteActual(); - - if (_this6.table.options.history && _this6.table.modExists("history")) { - - if (index) { - index = _this6.table.rowManager.rows[index - 1]; - } - - _this6.table.modules.history.action("rowDelete", _this6, { data: _this6.getData(), pos: !index, index: index }); - } - - resolve(); - }); -}; - -Row.prototype.deleteActual = function () { - - var index = this.table.rowManager.getRowIndex(this); - - //deselect row if it is selected - if (this.table.modExists("selectRow")) { - this.table.modules.selectRow._deselectRow(this, true); - } - - // if(this.table.options.dataTree && this.table.modExists("dataTree")){ - // this.table.modules.dataTree.collapseRow(this, true); - // } - - this.table.rowManager.deleteRow(this); - - this.deleteCells(); - - this.initialized = false; - this.heightInitialized = false; - - //remove from group - if (this.modules.group) { - this.modules.group.removeRow(this); - } - - //recalc column calculations if present - if (this.table.modExists("columnCalcs")) { - if (this.table.options.groupBy && this.table.modExists("groupRows")) { - this.table.modules.columnCalcs.recalcRowGroup(this); - } else { - this.table.modules.columnCalcs.recalc(this.table.rowManager.activeRows); - } - } -}; - -Row.prototype.deleteCells = function () { - var cellCount = this.cells.length; - - for (var i = 0; i < cellCount; i++) { - this.cells[0].delete(); - } -}; - -Row.prototype.wipe = function () { - this.deleteCells(); - - // this.element.children().each(function(){ - // $(this).remove(); - // }) - // this.element.empty(); - - while (this.element.firstChild) { - this.element.removeChild(this.element.firstChild); - } // this.element.remove(); - if (this.element.parentNode) { - this.element.parentNode.removeChild(this.element); - } -}; - -Row.prototype.getGroup = function () { - return this.modules.group || false; -}; - -//////////////// Object Generation ///////////////// -Row.prototype.getComponent = function () { - return new RowComponent(this); -}; - -//public row object -var CellComponent = function CellComponent(cell) { - this._cell = cell; -}; - -CellComponent.prototype.getValue = function () { - return this._cell.getValue(); -}; - -CellComponent.prototype.getOldValue = function () { - return this._cell.getOldValue(); -}; - -CellComponent.prototype.getElement = function () { - return this._cell.getElement(); -}; - -CellComponent.prototype.getRow = function () { - return this._cell.row.getComponent(); -}; - -CellComponent.prototype.getData = function () { - return this._cell.row.getData(); -}; - -CellComponent.prototype.getField = function () { - return this._cell.column.getField(); -}; - -CellComponent.prototype.getColumn = function () { - return this._cell.column.getComponent(); -}; - -CellComponent.prototype.setValue = function (value, mutate) { - if (typeof mutate == "undefined") { - mutate = true; - } - - this._cell.setValue(value, mutate); -}; - -CellComponent.prototype.restoreOldValue = function () { - this._cell.setValueActual(this._cell.getOldValue()); -}; - -CellComponent.prototype.edit = function (force) { - return this._cell.edit(force); -}; - -CellComponent.prototype.cancelEdit = function () { - this._cell.cancelEdit(); -}; - -CellComponent.prototype.nav = function () { - return this._cell.nav(); -}; - -CellComponent.prototype.checkHeight = function () { - this._cell.checkHeight(); -}; - -CellComponent.prototype.getTable = function () { - return this._cell.table; -}; - -CellComponent.prototype._getSelf = function () { - return this._cell; -}; - -var Cell = function Cell(column, row) { - - this.table = column.table; - this.column = column; - this.row = row; - this.element = null; - this.value = null; - this.oldValue = null; - - this.height = null; - this.width = null; - this.minWidth = null; - - this.build(); -}; - -//////////////// Setup Functions ///////////////// - -//generate element -Cell.prototype.build = function () { - this.generateElement(); - - this.setWidth(this.column.width); - - this._configureCell(); - - this.setValueActual(this.column.getFieldValue(this.row.data)); -}; - -Cell.prototype.generateElement = function () { - this.element = document.createElement('div'); - this.element.className = "tabulator-cell"; - this.element.setAttribute("role", "gridcell"); - this.element = this.element; -}; - -Cell.prototype._configureCell = function () { - var self = this, - cellEvents = self.column.cellEvents, - element = self.element, - field = this.column.getField(), - dblTap, - tapHold, - tap; - - //set text alignment - element.style.textAlign = self.column.hozAlign; - - if (field) { - element.setAttribute("tabulator-field", field); - } - - if (self.column.definition.cssClass) { - element.classList.add(self.column.definition.cssClass); - } - - //set event bindings - if (cellEvents.cellClick || self.table.options.cellClick) { - self.element.addEventListener("click", function (e) { - var component = self.getComponent(); - - if (cellEvents.cellClick) { - cellEvents.cellClick.call(self.table, e, component); - } - - if (self.table.options.cellClick) { - self.table.options.cellClick.call(self.table, e, component); - } - }); - } - - if (cellEvents.cellDblClick || this.table.options.cellDblClick) { - element.addEventListener("dblclick", function (e) { - var component = self.getComponent(); - - if (cellEvents.cellDblClick) { - cellEvents.cellDblClick.call(self.table, e, component); - } - - if (self.table.options.cellDblClick) { - self.table.options.cellDblClick.call(self.table, e, component); - } - }); - } - - if (cellEvents.cellContext || this.table.options.cellContext) { - element.addEventListener("contextmenu", function (e) { - var component = self.getComponent(); - - if (cellEvents.cellContext) { - cellEvents.cellContext.call(self.table, e, component); - } - - if (self.table.options.cellContext) { - self.table.options.cellContext.call(self.table, e, component); - } - }); - } - - if (this.table.options.tooltipGenerationMode === "hover") { - //update tooltip on mouse enter - element.addEventListener("mouseenter", function (e) { - self._generateTooltip(); - }); - } - - if (cellEvents.cellTap || this.table.options.cellTap) { - tap = false; - - element.addEventListener("touchstart", function (e) { - tap = true; - }); - - element.addEventListener("touchend", function (e) { - if (tap) { - var component = self.getComponent(); - - if (cellEvents.cellTap) { - cellEvents.cellTap.call(self.table, e, component); - } - - if (self.table.options.cellTap) { - self.table.options.cellTap.call(self.table, e, component); - } - } - - tap = false; - }); - } - - if (cellEvents.cellDblTap || this.table.options.cellDblTap) { - dblTap = null; - - element.addEventListener("touchend", function (e) { - - if (dblTap) { - clearTimeout(dblTap); - dblTap = null; - - var component = self.getComponent(); - - if (cellEvents.cellDblTap) { - cellEvents.cellDblTap.call(self.table, e, component); - } - - if (self.table.options.cellDblTap) { - self.table.options.cellDblTap.call(self.table, e, component); - } - } else { - - dblTap = setTimeout(function () { - clearTimeout(dblTap); - dblTap = null; - }, 300); - } - }); - } - - if (cellEvents.cellTapHold || this.table.options.cellTapHold) { - tapHold = null; - - element.addEventListener("touchstart", function (e) { - clearTimeout(tapHold); - - tapHold = setTimeout(function () { - clearTimeout(tapHold); - tapHold = null; - tap = false; - var component = self.getComponent(); - - if (cellEvents.cellTapHold) { - cellEvents.cellTapHold.call(self.table, e, component); - } - - if (self.table.options.cellTapHold) { - self.table.options.cellTapHold.call(self.table, e, component); - } - }, 1000); - }); - - element.addEventListener("touchend", function (e) { - clearTimeout(tapHold); - tapHold = null; - }); - } - - if (self.column.modules.edit) { - self.table.modules.edit.bindEditor(self); - } - - if (self.column.definition.rowHandle && self.table.options.movableRows !== false && self.table.modExists("moveRow")) { - self.table.modules.moveRow.initializeCell(self); - } - - //hide cell if not visible - if (!self.column.visible) { - self.hide(); - } -}; - -//generate cell contents -Cell.prototype._generateContents = function () { - var val; - - if (this.table.modExists("format")) { - val = this.table.modules.format.formatValue(this); - } else { - val = this.element.innerHTML = this.value; - } - - switch (typeof val === 'undefined' ? 'undefined' : _typeof(val)) { - case "object": - if (val instanceof Node) { - this.element.appendChild(val); - } else { - this.element.innerHTML = ""; - console.warn("Format Error - Formatter has returned a type of object, the only valid formatter object return is an instance of Node, the formatter returned:", val); - } - break; - case "undefined": - case "null": - this.element.innerHTML = ""; - break; - default: - this.element.innerHTML = val; - } -}; - -Cell.prototype.cellRendered = function () { - if (this.table.modExists("format") && this.table.modules.format.cellRendered) { - this.table.modules.format.cellRendered(this); - } -}; - -//generate tooltip text -Cell.prototype._generateTooltip = function () { - var tooltip = this.column.tooltip; - - if (tooltip) { - if (tooltip === true) { - tooltip = this.value; - } else if (typeof tooltip == "function") { - tooltip = tooltip(this.getComponent()); - - if (tooltip === false) { - tooltip = ""; - } - } - - if (typeof tooltip === "undefined") { - tooltip = ""; - } - - this.element.setAttribute("title", tooltip); - } else { - this.element.setAttribute("title", ""); - } -}; - -//////////////////// Getters //////////////////// -Cell.prototype.getElement = function () { - return this.element; -}; - -Cell.prototype.getValue = function () { - return this.value; -}; - -Cell.prototype.getOldValue = function () { - return this.oldValue; -}; - -//////////////////// Actions //////////////////// - -Cell.prototype.setValue = function (value, mutate) { - - var changed = this.setValueProcessData(value, mutate), - component; - - if (changed) { - if (this.table.options.history && this.table.modExists("history")) { - this.table.modules.history.action("cellEdit", this, { oldValue: this.oldValue, newValue: this.value }); - } - - component = this.getComponent(); - - if (this.column.cellEvents.cellEdited) { - this.column.cellEvents.cellEdited.call(this.table, component); - } - - this.table.options.cellEdited.call(this.table, component); - - this.table.options.dataEdited.call(this.table, this.table.rowManager.getData()); - } - - if (this.table.modExists("columnCalcs")) { - if (this.column.definition.topCalc || this.column.definition.bottomCalc) { - if (this.table.options.groupBy && this.table.modExists("groupRows")) { - this.table.modules.columnCalcs.recalcRowGroup(this.row); - } else { - this.table.modules.columnCalcs.recalc(this.table.rowManager.activeRows); - } - } - } -}; - -Cell.prototype.setValueProcessData = function (value, mutate) { - var changed = false; - - if (this.value != value) { - - changed = true; - - if (mutate) { - if (this.column.modules.mutate) { - value = this.table.modules.mutator.transformCell(this, value); - } - } - } - - this.setValueActual(value); - - return changed; -}; - -Cell.prototype.setValueActual = function (value) { - this.oldValue = this.value; - - this.value = value; - - this.column.setFieldValue(this.row.data, value); - - this._generateContents(); - this._generateTooltip(); - - //set resizable handles - if (this.table.options.resizableColumns && this.table.modExists("resizeColumns")) { - this.table.modules.resizeColumns.initializeColumn("cell", this.column, this.element); - } - - //handle frozen cells - if (this.table.modExists("frozenColumns")) { - this.table.modules.frozenColumns.layoutElement(this.element, this.column); - } -}; - -Cell.prototype.setWidth = function (width) { - this.width = width; - // this.element.css("width", width || ""); - this.element.style.width = width ? width + "px" : ""; -}; - -Cell.prototype.getWidth = function () { - return this.width || this.element.offsetWidth; -}; - -Cell.prototype.setMinWidth = function (minWidth) { - this.minWidth = minWidth; - this.element.style.minWidth = minWidth ? minWidth + "px" : ""; -}; - -Cell.prototype.checkHeight = function () { - // var height = this.element.css("height"); - - this.row.reinitializeHeight(); -}; - -Cell.prototype.clearHeight = function () { - this.element.style.height = ""; - this.height = null; -}; - -Cell.prototype.setHeight = function (height) { - this.height = height; - this.element.style.height = height ? height + "px" : ""; -}; - -Cell.prototype.getHeight = function () { - return this.height || this.element.offsetHeight; -}; - -Cell.prototype.show = function () { - this.element.style.display = ""; -}; - -Cell.prototype.hide = function () { - this.element.style.display = "none"; -}; - -Cell.prototype.edit = function (force) { - if (this.table.modExists("edit", true)) { - return this.table.modules.edit.editCell(this, force); - } -}; - -Cell.prototype.cancelEdit = function () { - if (this.table.modExists("edit", true)) { - var editing = this.table.modules.edit.getCurrentCell(); - - if (editing && editing._getSelf() === this) { - this.table.modules.edit.cancelEdit(); - } else { - console.warn("Cancel Editor Error - This cell is not currently being edited "); - } - } -}; - -Cell.prototype.delete = function () { - this.element.parentNode.removeChild(this.element); - this.column.deleteCell(this); - this.row.deleteCell(this); -}; - -//////////////// Navigation ///////////////// - -Cell.prototype.nav = function () { - - var self = this, - nextCell = false, - index = this.row.getCellIndex(this); - - return { - next: function next() { - var nextCell = this.right(), - nextRow; - - if (!nextCell) { - nextRow = self.table.rowManager.nextDisplayRow(self.row, true); - - if (nextRow) { - nextCell = nextRow.findNextEditableCell(-1); - - if (nextCell) { - nextCell.edit(); - return true; - } - } - } else { - return true; - } - - return false; - }, - prev: function prev() { - var nextCell = this.left(), - prevRow; - - if (!nextCell) { - prevRow = self.table.rowManager.prevDisplayRow(self.row, true); - - if (prevRow) { - nextCell = prevRow.findPrevEditableCell(prevRow.cells.length); - - if (nextCell) { - nextCell.edit(); - return true; - } - } - } else { - return true; - } - - return false; - }, - left: function left() { - - nextCell = self.row.findPrevEditableCell(index); - - if (nextCell) { - nextCell.edit(); - return true; - } else { - return false; - } - }, - right: function right() { - nextCell = self.row.findNextEditableCell(index); - - if (nextCell) { - nextCell.edit(); - return true; - } else { - return false; - } - }, - up: function up() { - var nextRow = self.table.rowManager.prevDisplayRow(self.row, true); - - if (nextRow) { - nextRow.cells[index].edit(); - } - }, - down: function down() { - var nextRow = self.table.rowManager.nextDisplayRow(self.row, true); - - if (nextRow) { - nextRow.cells[index].edit(); - } - } - - }; -}; - -Cell.prototype.getIndex = function () { - this.row.getCellIndex(this); -}; - -//////////////// Object Generation ///////////////// -Cell.prototype.getComponent = function () { - return new CellComponent(this); -}; -var FooterManager = function FooterManager(table) { - this.table = table; - this.active = false; - this.element = this.createElement(); //containing element - this.external = false; - this.links = []; - - this._initialize(); -}; - -FooterManager.prototype.createElement = function () { - var el = document.createElement("div"); - - el.classList.add("tabulator-footer"); - - return el; -}; - -FooterManager.prototype._initialize = function (element) { - if (this.table.options.footerElement) { - - switch (_typeof(this.table.options.footerElement)) { - case "string": - - if (this.table.options.footerElement[0] === "<") { - this.element.innerHTML = this.table.options.footerElement; - } else { - this.external = true; - this.element = document.querySelector(this.table.options.footerElement); - } - break; - default: - this.element = this.table.options.footerElement; - break; - } - } -}; - -FooterManager.prototype.getElement = function () { - return this.element; -}; - -FooterManager.prototype.append = function (element, parent) { - this.activate(parent); - - this.element.appendChild(element); - this.table.rowManager.adjustTableSize(); -}; - -FooterManager.prototype.prepend = function (element, parent) { - this.activate(parent); - - this.element.insertBefore(element, this.element.firstChild); - this.table.rowManager.adjustTableSize(); -}; - -FooterManager.prototype.remove = function (element) { - element.parentNode.removeChild(element); - this.deactivate(); -}; - -FooterManager.prototype.deactivate = function (force) { - if (!this.element.firstChild || force) { - if (!this.external) { - this.element.parentNode.removeChild(this.element); - } - this.active = false; - } - - // this.table.rowManager.adjustTableSize(); -}; - -FooterManager.prototype.activate = function (parent) { - if (!this.active) { - this.active = true; - if (!this.external) { - this.table.element.appendChild(this.getElement()); - this.table.element.style.display = ''; - } - } - - if (parent) { - this.links.push(parent); - } -}; - -FooterManager.prototype.redraw = function () { - this.links.forEach(function (link) { - link.footerRedraw(); - }); -}; - -var Tabulator = function Tabulator(element, options) { - - this.options = {}; - - this.columnManager = null; // hold Column Manager - this.rowManager = null; //hold Row Manager - this.footerManager = null; //holder Footer Manager - this.browser = ""; //hold current browser type - this.browserSlow = false; //handle reduced functionality for slower browsers - - this.modules = {}; //hold all modules bound to this table - - this.initializeElement(element); - this.initializeOptions(options || {}); - this._create(); - - Tabulator.prototype.comms.register(this); //register table for inderdevice communication -}; - -//default setup options -Tabulator.prototype.defaultOptions = { - - height: false, //height of tabulator - - layout: "fitData", ///layout type "fitColumns" | "fitData" - layoutColumnsOnNewData: false, //update column widths on setData - - columnMinWidth: 40, //minimum global width for a column - columnVertAlign: "top", //vertical alignment of column headers - - resizableColumns: true, //resizable columns - resizableRows: false, //resizable rows - autoResize: true, //auto resize table - - columns: [], //store for colum header info - - data: [], //default starting data - - nestedFieldSeparator: ".", //seperatpr for nested data - - tooltips: false, //Tool tip value - tooltipsHeader: false, //Tool tip for headers - tooltipGenerationMode: "load", //when to generate tooltips - - initialSort: false, //initial sorting criteria - initialFilter: false, //initial filtering criteria - - columnHeaderSortMulti: true, //multiple or single column sorting - - sortOrderReverse: false, //reverse internal sort ordering - - footerElement: false, //hold footer element - - index: "id", //filed for row index - - keybindings: [], //array for keybindings - - clipboard: false, //enable clipboard - clipboardCopyStyled: true, //formatted table data - clipboardCopySelector: "active", //method of chosing which data is coppied to the clipboard - clipboardCopyFormatter: "table", //convert data to a clipboard string - clipboardPasteParser: "table", //convert pasted clipboard data to rows - clipboardPasteAction: "insert", //how to insert pasted data into the table - clipboardCopyConfig: false, //clipboard config - - clipboardCopied: function clipboardCopied() {}, //data has been copied to the clipboard - clipboardPasted: function clipboardPasted() {}, //data has been pasted into the table - clipboardPasteError: function clipboardPasteError() {}, //data has not successfully been pasted into the table - - downloadDataFormatter: false, //function to manipulate table data before it is downloaded - downloadReady: function downloadReady(data, blob) { - return blob; - }, //function to manipulate download data - downloadComplete: false, //function to manipulate download data - downloadConfig: false, //download config - - dataTree: false, //enable data tree - dataTreeBranchElement: true, //show data tree branch element - dataTreeChildIndent: 9, //data tree child indent in px - dataTreeChildField: "_children", //data tre column field to look for child rows - dataTreeCollapseElement: false, //data tree row collapse element - dataTreeExpandElement: false, //data tree row expand element - dataTreeStartExpanded: false, - dataTreeRowExpanded: function dataTreeRowExpanded() {}, //row has been expanded - dataTreeRowCollapsed: function dataTreeRowCollapsed() {}, //row has been collapsed - - - addRowPos: "bottom", //position to insert blank rows, top|bottom - - selectable: "highlight", //highlight rows on hover - selectableRangeMode: "drag", //highlight rows on hover - selectableRollingSelection: true, //roll selection once maximum number of selectable rows is reached - selectablePersistence: true, // maintain selection when table view is updated - selectableCheck: function selectableCheck(data, row) { - return true; - }, //check wheather row is selectable - - headerFilterPlaceholder: false, //placeholder text to display in header filters - - history: false, //enable edit history - - locale: false, //current system language - langs: {}, - - virtualDom: true, //enable DOM virtualization - - persistentLayout: false, //store column layout in memory - persistentSort: false, //store sorting in memory - persistentFilter: false, //store filters in memory - persistenceID: "", //key for persistent storage - persistenceMode: true, //mode for storing persistence information - - responsiveLayout: false, //responsive layout flags - responsiveLayoutCollapseStartOpen: true, //start showing collapsed data - responsiveLayoutCollapseUseFormatters: true, //responsive layout collapse formatter - responsiveLayoutCollapseFormatter: false, //responsive layout collapse formatter - - pagination: false, //set pagination type - paginationSize: false, //set number of rows to a page - paginationButtonCount: 5, // set count of page button - paginationElement: false, //element to hold pagination numbers - paginationDataSent: {}, //pagination data sent to the server - paginationDataReceived: {}, //pagination data received from the server - paginationAddRow: "page", //add rows on table or page - - ajaxURL: false, //url for ajax loading - ajaxURLGenerator: false, - ajaxParams: {}, //params for ajax loading - ajaxConfig: "get", //ajax request type - ajaxContentType: "form", //ajax request type - ajaxRequestFunc: false, //promise function - ajaxLoader: true, //show loader - ajaxLoaderLoading: false, //loader element - ajaxLoaderError: false, //loader element - ajaxFiltering: false, - ajaxSorting: false, - ajaxProgressiveLoad: false, //progressive loading - ajaxProgressiveLoadDelay: 0, //delay between requests - ajaxProgressiveLoadScrollMargin: 0, //margin before scroll begins - - groupBy: false, //enable table grouping and set field to group by - groupStartOpen: true, //starting state of group - groupValues: false, - - groupHeader: false, //header generation function - - movableColumns: false, //enable movable columns - - movableRows: false, //enable movable rows - movableRowsConnectedTables: false, //tables for movable rows to be connected to - movableRowsSender: false, - movableRowsReceiver: "insert", - movableRowsSendingStart: function movableRowsSendingStart() {}, - movableRowsSent: function movableRowsSent() {}, - movableRowsSentFailed: function movableRowsSentFailed() {}, - movableRowsSendingStop: function movableRowsSendingStop() {}, - movableRowsReceivingStart: function movableRowsReceivingStart() {}, - movableRowsReceived: function movableRowsReceived() {}, - movableRowsReceivedFailed: function movableRowsReceivedFailed() {}, - movableRowsReceivingStop: function movableRowsReceivingStop() {}, - - scrollToRowPosition: "top", - scrollToRowIfVisible: true, - - scrollToColumnPosition: "left", - scrollToColumnIfVisible: true, - - rowFormatter: false, - - placeholder: false, - - //table building callbacks - tableBuilding: function tableBuilding() {}, - tableBuilt: function tableBuilt() {}, - - //render callbacks - renderStarted: function renderStarted() {}, - renderComplete: function renderComplete() {}, - - //row callbacks - rowClick: false, - rowDblClick: false, - rowContext: false, - rowTap: false, - rowDblTap: false, - rowTapHold: false, - rowAdded: function rowAdded() {}, - rowDeleted: function rowDeleted() {}, - rowMoved: function rowMoved() {}, - rowUpdated: function rowUpdated() {}, - rowSelectionChanged: function rowSelectionChanged() {}, - rowSelected: function rowSelected() {}, - rowDeselected: function rowDeselected() {}, - rowResized: function rowResized() {}, - - //cell callbacks - //row callbacks - cellClick: false, - cellDblClick: false, - cellContext: false, - cellTap: false, - cellDblTap: false, - cellTapHold: false, - cellEditing: function cellEditing() {}, - cellEdited: function cellEdited() {}, - cellEditCancelled: function cellEditCancelled() {}, - - //column callbacks - columnMoved: false, - columnResized: function columnResized() {}, - columnTitleChanged: function columnTitleChanged() {}, - columnVisibilityChanged: function columnVisibilityChanged() {}, - - //HTML iport callbacks - htmlImporting: function htmlImporting() {}, - htmlImported: function htmlImported() {}, - - //data callbacks - dataLoading: function dataLoading() {}, - dataLoaded: function dataLoaded() {}, - dataEdited: function dataEdited() {}, - - //ajax callbacks - ajaxRequesting: function ajaxRequesting() {}, - ajaxResponse: false, - ajaxError: function ajaxError() {}, - - //filtering callbacks - dataFiltering: false, - dataFiltered: false, - - //sorting callbacks - dataSorting: function dataSorting() {}, - dataSorted: function dataSorted() {}, - - //grouping callbacks - groupToggleElement: "arrow", - groupClosedShowCalcs: false, - dataGrouping: function dataGrouping() {}, - dataGrouped: false, - groupVisibilityChanged: function groupVisibilityChanged() {}, - groupClick: false, - groupDblClick: false, - groupContext: false, - groupTap: false, - groupDblTap: false, - groupTapHold: false, - - columnCalcs: true, - - //pagination callbacks - pageLoaded: function pageLoaded() {}, - - //localization callbacks - localized: function localized() {}, - - //validation has failed - validationFailed: function validationFailed() {}, - - //history callbacks - historyUndo: function historyUndo() {}, - historyRedo: function historyRedo() {} - -}; - -Tabulator.prototype.initializeOptions = function (options) { - for (var key in this.defaultOptions) { - if (key in options) { - this.options[key] = options[key]; - } else { - if (Array.isArray(this.defaultOptions[key])) { - this.options[key] = []; - } else if (_typeof(this.defaultOptions[key]) === "object") { - this.options[key] = {}; - } else { - this.options[key] = this.defaultOptions[key]; - } - } - } -}; - -Tabulator.prototype.initializeElement = function (element) { - - if (element instanceof HTMLElement) { - this.element = element; - return true; - } else if (typeof element === "string") { - this.element = document.querySelector(element); - - if (this.element) { - return true; - } else { - console.error("Tabulator Creation Error - no element found matching selector: ", element); - return false; - } - } else { - console.error("Tabulator Creation Error - Invalid element provided:", element); - return false; - } -}; - -//convert depricated functionality to new functions -Tabulator.prototype._mapDepricatedFunctionality = function () {}; - -//concreate table -Tabulator.prototype._create = function () { - this._clearObjectPointers(); - - this._mapDepricatedFunctionality(); - - this.bindModules(); - - if (this.element.tagName === "TABLE") { - if (this.modExists("htmlTableImport", true)) { - this.modules.htmlTableImport.parseTable(); - } - } - - this.columnManager = new ColumnManager(this); - this.rowManager = new RowManager(this); - this.footerManager = new FooterManager(this); - - this.columnManager.setRowManager(this.rowManager); - this.rowManager.setColumnManager(this.columnManager); - - this._buildElement(); - - this._loadInitialData(); -}; - -//clear pointers to objects in default config object -Tabulator.prototype._clearObjectPointers = function () { - this.options.columns = this.options.columns.slice(0); - this.options.data = this.options.data.slice(0); -}; - -//build tabulator element -Tabulator.prototype._buildElement = function () { - var element = this.element, - mod = this.modules, - options = this.options; - - options.tableBuilding.call(this); - - element.classList.add("tabulator"); - element.setAttribute("role", "grid"); - - //empty element - while (element.firstChild) { - element.removeChild(element.firstChild); - } //set table height - if (options.height) { - options.height = isNaN(options.height) ? options.height : options.height + "px"; - element.style.height = options.height; - } - - this.rowManager.initialize(); - - this._detectBrowser(); - - if (this.modExists("layout", true)) { - mod.layout.initialize(options.layout); - } - - //set localization - if (options.headerFilterPlaceholder !== false) { - mod.localize.setHeaderFilterPlaceholder(options.headerFilterPlaceholder); - } - - for (var locale in options.langs) { - mod.localize.installLang(locale, options.langs[locale]); - } - - mod.localize.setLocale(options.locale); - - //configure placeholder element - if (typeof options.placeholder == "string") { - - var el = document.createElement("div"); - el.classList.add("tabulator-placeholder"); - - var span = document.createElement("span"); - span.innerHTML = options.placeholder; - - el.appendChild(span); - - options.placeholder = el; - } - - //build table elements - element.appendChild(this.columnManager.getElement()); - element.appendChild(this.rowManager.getElement()); - - if (options.footerElement) { - this.footerManager.activate(); - } - - if (options.dataTree && this.modExists("dataTree", true)) { - mod.dataTree.initialize(); - } - - if ((options.persistentLayout || options.persistentSort || options.persistentFilter) && this.modExists("persistence", true)) { - mod.persistence.initialize(options.persistenceMode, options.persistenceID); - } - - if (options.persistentLayout && this.modExists("persistence", true)) { - options.columns = mod.persistence.load("columns", options.columns); - } - - if (options.movableRows && this.modExists("moveRow")) { - mod.moveRow.initialize(); - } - - if (this.modExists("columnCalcs")) { - mod.columnCalcs.initialize(); - } - - this.columnManager.setColumns(options.columns); - - if (this.modExists("frozenRows")) { - this.modules.frozenRows.initialize(); - } - - if ((options.persistentSort || options.initialSort) && this.modExists("sort", true)) { - var sorters = []; - - if (options.persistentSort && this.modExists("persistence", true)) { - sorters = mod.persistence.load("sort"); - - if (sorters === false && options.initialSort) { - sorters = options.initialSort; - } - } else if (options.initialSort) { - sorters = options.initialSort; - } - - mod.sort.setSort(sorters); - } - - if ((options.persistentFilter || options.initialFilter) && this.modExists("filter", true)) { - var filters = []; - - if (options.persistentFilter && this.modExists("persistence", true)) { - filters = mod.persistence.load("filter"); - - if (filters === false && options.initialFilter) { - filters = options.initialFilter; - } - } else if (options.initialFilter) { - filters = options.initialFilter; - } - - mod.filter.setFilter(filters); - // this.setFilter(filters); - } - - if (this.modExists("ajax")) { - mod.ajax.initialize(); - } - - if (options.pagination && this.modExists("page", true)) { - mod.page.initialize(); - } - - if (options.groupBy && this.modExists("groupRows", true)) { - mod.groupRows.initialize(); - } - - if (this.modExists("keybindings")) { - mod.keybindings.initialize(); - } - - if (this.modExists("selectRow")) { - mod.selectRow.clearSelectionData(true); - } - - if (options.autoResize && this.modExists("resizeTable")) { - mod.resizeTable.initialize(); - } - - if (this.modExists("clipboard")) { - mod.clipboard.initialize(); - } - - options.tableBuilt.call(this); -}; - -Tabulator.prototype._loadInitialData = function () { - var self = this; - - if (self.options.pagination && self.modExists("page")) { - self.modules.page.reset(true); - - if (self.options.pagination == "local") { - if (self.options.data.length) { - self.rowManager.setData(self.options.data); - } else { - if ((self.options.ajaxURL || self.options.ajaxURLGenerator) && self.modExists("ajax")) { - self.modules.ajax.loadData(); - } else { - self.rowManager.setData(self.options.data); - } - } - } else { - self.modules.page.setPage(1); - } - } else { - if (self.options.data.length) { - self.rowManager.setData(self.options.data); - } else { - if ((self.options.ajaxURL || self.options.ajaxURLGenerator) && self.modExists("ajax")) { - self.modules.ajax.loadData(); - } else { - self.rowManager.setData(self.options.data); - } - } - } -}; - -//deconstructor -Tabulator.prototype.destroy = function () { - var element = this.element; - - Tabulator.prototype.comms.deregister(this); //deregister table from inderdevice communication - - //clear row data - this.rowManager.rows.forEach(function (row) { - row.wipe(); - }); - - this.rowManager.rows = []; - this.rowManager.activeRows = []; - this.rowManager.displayRows = []; - - //clear event bindings - if (this.options.autoResize && this.modExists("resizeTable")) { - this.modules.resizeTable.clearBindings(); - } - - if (this.modExists("keybindings")) { - this.modules.keybindings.clearBindings(); - } - - //clear DOM - while (element.firstChild) { - element.removeChild(element.firstChild); - }element.classList.remove("tabulator"); -}; - -Tabulator.prototype._detectBrowser = function () { - var ua = navigator.userAgent; - - if (ua.indexOf("Trident") > -1) { - this.browser = "ie"; - this.browserSlow = true; - } else if (ua.indexOf("Edge") > -1) { - this.browser = "edge"; - this.browserSlow = true; - } else if (ua.indexOf("Firefox") > -1) { - this.browser = "firefox"; - this.browserSlow = false; - } else { - this.browser = "other"; - this.browserSlow = false; - } -}; - -////////////////// Data Handling ////////////////// - - -//load data -Tabulator.prototype.setData = function (data, params, config) { - if (this.modExists("ajax")) { - this.modules.ajax.blockActiveRequest(); - } - - return this._setData(data, params, config); -}; - -Tabulator.prototype._setData = function (data, params, config, inPosition) { - var self = this; - - if (typeof data === "string") { - if (data.indexOf("{") == 0 || data.indexOf("[") == 0) { - //data is a json encoded string - return self.rowManager.setData(JSON.parse(data), inPosition); - } else { - - if (self.modExists("ajax", true)) { - if (params) { - self.modules.ajax.setParams(params); - } - - if (config) { - self.modules.ajax.setConfig(config); - } - - self.modules.ajax.setUrl(data); - - if (self.options.pagination == "remote" && self.modExists("page", true)) { - self.modules.page.reset(true); - return self.modules.page.setPage(1); - } else { - //assume data is url, make ajax call to url to get data - return self.modules.ajax.loadData(inPosition); - } - } - } - } else { - if (data) { - //asume data is already an object - return self.rowManager.setData(data, inPosition); - } else { - - //no data provided, check if ajaxURL is present; - if (self.modExists("ajax") && (self.modules.ajax.getUrl || self.options.ajaxURLGenerator)) { - - if (self.options.pagination == "remote" && self.modExists("page", true)) { - self.modules.page.reset(true); - return self.modules.page.setPage(1); - } else { - return self.modules.ajax.loadData(inPosition); - } - } else { - //empty data - return self.rowManager.setData([], inPosition); - } - } - } -}; - -//clear data -Tabulator.prototype.clearData = function () { - if (this.modExists("ajax")) { - this.modules.ajax.blockActiveRequest(); - } - - this.rowManager.clearData(); -}; - -//get table data array -Tabulator.prototype.getData = function (active) { - return this.rowManager.getData(active); -}; - -//get table data array count -Tabulator.prototype.getDataCount = function (active) { - return this.rowManager.getDataCount(active); -}; - -//search for specific row components -Tabulator.prototype.searchRows = function (field, type, value) { - if (this.modExists("filter", true)) { - return this.modules.filter.search("rows", field, type, value); - } -}; - -//search for specific data -Tabulator.prototype.searchData = function (field, type, value) { - if (this.modExists("filter", true)) { - return this.modules.filter.search("data", field, type, value); - } -}; - -//get table html -Tabulator.prototype.getHtml = function (active) { - return this.rowManager.getHtml(active); -}; - -//retrieve Ajax URL -Tabulator.prototype.getAjaxUrl = function () { - if (this.modExists("ajax", true)) { - return this.modules.ajax.getUrl(); - } -}; - -//replace data, keeping table in position with same sort -Tabulator.prototype.replaceData = function (data, params, config) { - if (this.modExists("ajax")) { - this.modules.ajax.blockActiveRequest(); - } - - return this._setData(data, params, config, true); -}; - -//update table data -Tabulator.prototype.updateData = function (data) { - var _this7 = this; - - var self = this; - var responses = 0; - - return new Promise(function (resolve, reject) { - if (_this7.modExists("ajax")) { - _this7.modules.ajax.blockActiveRequest(); - } - - if (typeof data === "string") { - data = JSON.parse(data); - } - - if (data) { - data.forEach(function (item) { - var row = self.rowManager.findRow(item[self.options.index]); - - if (row) { - responses++; - - row.updateData(item).then(function () { - responses--; - - if (!responses) { - resolve(); - } - }); - } - }); - } else { - console.warn("Update Error - No data provided"); - reject("Update Error - No data provided"); - } - }); -}; - -Tabulator.prototype.addData = function (data, pos, index) { - var _this8 = this; - - return new Promise(function (resolve, reject) { - if (_this8.modExists("ajax")) { - _this8.modules.ajax.blockActiveRequest(); - } - - if (typeof data === "string") { - data = JSON.parse(data); - } - - if (data) { - _this8.rowManager.addRows(data, pos, index).then(function (rows) { - var output = []; - - rows.forEach(function (row) { - output.push(row.getComponent()); - }); - - resolve(output); - }); - } else { - console.warn("Update Error - No data provided"); - reject("Update Error - No data provided"); - } - }); -}; - -//update table data -Tabulator.prototype.updateOrAddData = function (data) { - var _this9 = this; - - var self = this, - rows = [], - responses = 0; - - return new Promise(function (resolve, reject) { - if (_this9.modExists("ajax")) { - _this9.modules.ajax.blockActiveRequest(); - } - - if (typeof data === "string") { - data = JSON.parse(data); - } - - if (data) { - data.forEach(function (item) { - var row = self.rowManager.findRow(item[self.options.index]); - - responses++; - - if (row) { - row.updateData(item).then(function () { - responses--; - rows.push(row.getComponent()); - - if (!responses) { - resolve(rows); - } - }); - } else { - self.rowManager.addRows(item).then(function (newRows) { - responses--; - rows.push(newRows[0].getComponent()); - - if (!responses) { - resolve(rows); - } - }); - } - }); - } else { - console.warn("Update Error - No data provided"); - reject("Update Error - No data provided"); - } - }); -}; - -//get row object -Tabulator.prototype.getRow = function (index) { - var row = this.rowManager.findRow(index); - - if (row) { - return row.getComponent(); - } else { - console.warn("Find Error - No matching row found:", index); - return false; - } -}; - -//get row object -Tabulator.prototype.getRowFromPosition = function (position, active) { - var row = this.rowManager.getRowFromPosition(position, active); - - if (row) { - return row.getComponent(); - } else { - console.warn("Find Error - No matching row found:", position); - return false; - } -}; - -//delete row from table -Tabulator.prototype.deleteRow = function (index) { - var _this10 = this; - - return new Promise(function (resolve, reject) { - var row = _this10.rowManager.findRow(index); - - if (row) { - row.delete().then(function () { - resolve(); - }).catch(function (err) { - reject(err); - }); - } else { - console.warn("Delete Error - No matching row found:", index); - reject("Delete Error - No matching row found"); - } - }); -}; - -//add row to table -Tabulator.prototype.addRow = function (data, pos, index) { - var _this11 = this; - - return new Promise(function (resolve, reject) { - if (typeof data === "string") { - data = JSON.parse(data); - } - - _this11.rowManager.addRows(data, pos, index).then(function (rows) { - //recalc column calculations if present - if (_this11.modExists("columnCalcs")) { - _this11.modules.columnCalcs.recalc(_this11.rowManager.activeRows); - } - - resolve(rows[0].getComponent()); - }); - }); -}; - -//update a row if it exitsts otherwise create it -Tabulator.prototype.updateOrAddRow = function (index, data) { - var _this12 = this; - - return new Promise(function (resolve, reject) { - var row = _this12.rowManager.findRow(index); - - if (typeof data === "string") { - data = JSON.parse(data); - } - - if (row) { - row.updateData(data).then(function () { - //recalc column calculations if present - if (_this12.modExists("columnCalcs")) { - _this12.modules.columnCalcs.recalc(_this12.rowManager.activeRows); - } - - resolve(row.getComponent()); - }).catch(function (err) { - reject(err); - }); - } else { - row = _this12.rowManager.addRows(data).then(function (rows) { - //recalc column calculations if present - if (_this12.modExists("columnCalcs")) { - _this12.modules.columnCalcs.recalc(_this12.rowManager.activeRows); - } - - resolve(rows[0].getComponent()); - }).catch(function (err) { - reject(err); - }); - } - }); -}; - -//update row data -Tabulator.prototype.updateRow = function (index, data) { - var _this13 = this; - - return new Promise(function (resolve, reject) { - var row = _this13.rowManager.findRow(index); - - if (typeof data === "string") { - data = JSON.parse(data); - } - - if (row) { - row.updateData(data).then(function () { - resolve(row.getComponent()); - }).catch(function (err) { - reject(err); - }); - } else { - console.warn("Update Error - No matching row found:", index); - reject("Update Error - No matching row found"); - } - }); -}; - -//scroll to row in DOM -Tabulator.prototype.scrollToRow = function (index, position, ifVisible) { - var _this14 = this; - - return new Promise(function (resolve, reject) { - var row = _this14.rowManager.findRow(index); - - if (row) { - _this14.rowManager.scrollToRow(row, position, ifVisible).then(function () { - resolve(); - }).catch(function (err) { - reject(err); - }); - } else { - console.warn("Scroll Error - No matching row found:", index); - reject("Scroll Error - No matching row found"); - } - }); -}; - -Tabulator.prototype.getRows = function (active) { - return this.rowManager.getComponents(active); -}; - -//get position of row in table -Tabulator.prototype.getRowPosition = function (index, active) { - var row = this.rowManager.findRow(index); - - if (row) { - return this.rowManager.getRowPosition(row, active); - } else { - console.warn("Position Error - No matching row found:", index); - return false; - } -}; - -//copy table data to clipboard -Tabulator.prototype.copyToClipboard = function (selector, selectorParams, formatter, formatterParams) { - if (this.modExists("clipboard", true)) { - this.modules.clipboard.copy(selector, selectorParams, formatter, formatterParams); - } -}; - -/////////////// Column Functions /////////////// - -Tabulator.prototype.setColumns = function (definition) { - this.columnManager.setColumns(definition); -}; - -Tabulator.prototype.getColumns = function (structured) { - return this.columnManager.getComponents(structured); -}; - -Tabulator.prototype.getColumn = function (field) { - var col = this.columnManager.findColumn(field); - - if (col) { - return col.getComponent(); - } else { - console.warn("Find Error - No matching column found:", field); - return false; - } -}; - -Tabulator.prototype.getColumnDefinitions = function () { - return this.columnManager.getDefinitionTree(); -}; - -Tabulator.prototype.getColumnLayout = function () { - if (this.modExists("persistence", true)) { - return this.modules.persistence.parseColumns(this.columnManager.getColumns()); - } -}; - -Tabulator.prototype.setColumnLayout = function (layout) { - if (this.modExists("persistence", true)) { - this.columnManager.setColumns(this.modules.persistence.mergeDefinition(this.options.columns, layout)); - return true; - } - return false; -}; - -Tabulator.prototype.showColumn = function (field) { - var column = this.columnManager.findColumn(field); - - if (column) { - column.show(); - - if (this.options.responsiveLayout && this.modExists("responsiveLayout", true)) { - this.modules.responsiveLayout.update(); - } - } else { - console.warn("Column Show Error - No matching column found:", field); - return false; - } -}; - -Tabulator.prototype.hideColumn = function (field) { - var column = this.columnManager.findColumn(field); - - if (column) { - column.hide(); - - if (this.options.responsiveLayout && this.modExists("responsiveLayout", true)) { - this.modules.responsiveLayout.update(); - } - } else { - console.warn("Column Hide Error - No matching column found:", field); - return false; - } -}; - -Tabulator.prototype.toggleColumn = function (field) { - var column = this.columnManager.findColumn(field); - - if (column) { - if (column.visible) { - column.hide(); - } else { - column.show(); - } - } else { - console.warn("Column Visibility Toggle Error - No matching column found:", field); - return false; - } -}; - -Tabulator.prototype.addColumn = function (definition, before, field) { - var column = this.columnManager.findColumn(field); - - this.columnManager.addColumn(definition, before, column); -}; - -Tabulator.prototype.deleteColumn = function (field) { - var column = this.columnManager.findColumn(field); - - if (column) { - column.delete(); - } else { - console.warn("Column Delete Error - No matching column found:", field); - return false; - } -}; - -//scroll to column in DOM -Tabulator.prototype.scrollToColumn = function (field, position, ifVisible) { - var _this15 = this; - - return new Promise(function (resolve, reject) { - var column = _this15.columnManager.findColumn(field); - - if (column) { - _this15.columnManager.scrollToColumn(column, position, ifVisible).then(function () { - resolve(); - }).catch(function (err) { - reject(err); - }); - } else { - console.warn("Scroll Error - No matching column found:", field); - reject("Scroll Error - No matching column found"); - } - }); -}; - -//////////// Localization Functions //////////// -Tabulator.prototype.setLocale = function (locale) { - this.modules.localize.setLocale(locale); -}; - -Tabulator.prototype.getLocale = function () { - return this.modules.localize.getLocale(); -}; - -Tabulator.prototype.getLang = function (locale) { - return this.modules.localize.getLang(locale); -}; - -//////////// General Public Functions //////////// - -//redraw list without updating data -Tabulator.prototype.redraw = function (force) { - this.columnManager.redraw(force); - this.rowManager.redraw(force); -}; - -Tabulator.prototype.setHeight = function (height) { - this.options.height = isNaN(height) ? height : height + "px"; - this.element.style.height = this.options.height; - this.rowManager.redraw(); -}; - -///////////////////// Sorting //////////////////// - -//trigger sort -Tabulator.prototype.setSort = function (sortList, dir) { - if (this.modExists("sort", true)) { - this.modules.sort.setSort(sortList, dir); - this.rowManager.sorterRefresh(); - } -}; - -Tabulator.prototype.getSorters = function () { - if (this.modExists("sort", true)) { - return this.modules.sort.getSort(); - } -}; - -Tabulator.prototype.clearSort = function () { - if (this.modExists("sort", true)) { - this.modules.sort.clear(); - this.rowManager.sorterRefresh(); - } -}; - -///////////////////// Filtering //////////////////// - -//set standard filters -Tabulator.prototype.setFilter = function (field, type, value) { - if (this.modExists("filter", true)) { - this.modules.filter.setFilter(field, type, value); - this.rowManager.filterRefresh(); - } -}; - -//add filter to array -Tabulator.prototype.addFilter = function (field, type, value) { - if (this.modExists("filter", true)) { - this.modules.filter.addFilter(field, type, value); - this.rowManager.filterRefresh(); - } -}; - -//get all filters -Tabulator.prototype.getFilters = function (all) { - if (this.modExists("filter", true)) { - return this.modules.filter.getFilters(all); - } -}; - -Tabulator.prototype.setHeaderFilterFocus = function (field) { - if (this.modExists("filter", true)) { - var column = this.columnManager.findColumn(field); - - if (column) { - this.modules.filter.setHeaderFilterFocus(column); - } else { - console.warn("Column Filter Focus Error - No matching column found:", field); - return false; - } - } -}; - -Tabulator.prototype.setHeaderFilterValue = function (field, value) { - if (this.modExists("filter", true)) { - var column = this.columnManager.findColumn(field); - - if (column) { - this.modules.filter.setHeaderFilterValue(column, value); - } else { - console.warn("Column Filter Error - No matching column found:", field); - return false; - } - } -}; - -Tabulator.prototype.getHeaderFilters = function () { - if (this.modExists("filter", true)) { - return this.modules.filter.getHeaderFilters(); - } -}; - -//remove filter from array -Tabulator.prototype.removeFilter = function (field, type, value) { - if (this.modExists("filter", true)) { - this.modules.filter.removeFilter(field, type, value); - this.rowManager.filterRefresh(); - } -}; - -//clear filters -Tabulator.prototype.clearFilter = function (all) { - if (this.modExists("filter", true)) { - this.modules.filter.clearFilter(all); - this.rowManager.filterRefresh(); - } -}; - -//clear header filters -Tabulator.prototype.clearHeaderFilter = function () { - if (this.modExists("filter", true)) { - this.modules.filter.clearHeaderFilter(); - this.rowManager.filterRefresh(); - } -}; - -///////////////////// Filtering //////////////////// -Tabulator.prototype.selectRow = function (rows) { - if (this.modExists("selectRow", true)) { - this.modules.selectRow.selectRows(rows); - } -}; - -Tabulator.prototype.deselectRow = function (rows) { - if (this.modExists("selectRow", true)) { - this.modules.selectRow.deselectRows(rows); - } -}; - -Tabulator.prototype.toggleSelectRow = function (row) { - if (this.modExists("selectRow", true)) { - this.modules.selectRow.toggleRow(row); - } -}; - -Tabulator.prototype.getSelectedRows = function () { - if (this.modExists("selectRow", true)) { - return this.modules.selectRow.getSelectedRows(); - } -}; - -Tabulator.prototype.getSelectedData = function () { - if (this.modExists("selectRow", true)) { - return this.modules.selectRow.getSelectedData(); - } -}; - -//////////// Pagination Functions //////////// - -Tabulator.prototype.setMaxPage = function (max) { - if (this.options.pagination && this.modExists("page")) { - this.modules.page.setMaxPage(max); - } else { - return false; - } -}; - -Tabulator.prototype.setPage = function (page) { - if (this.options.pagination && this.modExists("page")) { - this.modules.page.setPage(page); - } else { - return false; - } -}; - -Tabulator.prototype.setPageSize = function (size) { - if (this.options.pagination && this.modExists("page")) { - this.modules.page.setPageSize(size); - this.modules.page.setPage(1); - } else { - return false; - } -}; - -Tabulator.prototype.getPageSize = function () { - if (this.options.pagination && this.modExists("page", true)) { - return this.modules.page.getPageSize(); - } -}; - -Tabulator.prototype.previousPage = function () { - if (this.options.pagination && this.modExists("page")) { - this.modules.page.previousPage(); - } else { - return false; - } -}; - -Tabulator.prototype.nextPage = function () { - if (this.options.pagination && this.modExists("page")) { - this.modules.page.nextPage(); - } else { - return false; - } -}; - -Tabulator.prototype.getPage = function () { - if (this.options.pagination && this.modExists("page")) { - return this.modules.page.getPage(); - } else { - return false; - } -}; - -Tabulator.prototype.getPageMax = function () { - if (this.options.pagination && this.modExists("page")) { - return this.modules.page.getPageMax(); - } else { - return false; - } -}; - -///////////////// Grouping Functions /////////////// - -Tabulator.prototype.setGroupBy = function (groups) { - if (this.modExists("groupRows", true)) { - this.options.groupBy = groups; - this.modules.groupRows.initialize(); - this.rowManager.refreshActiveData("display"); - } else { - return false; - } -}; - -Tabulator.prototype.setGroupStartOpen = function (values) { - if (this.modExists("groupRows", true)) { - this.options.groupStartOpen = values; - this.modules.groupRows.initialize(); - if (this.options.groupBy) { - this.rowManager.refreshActiveData("group"); - } else { - console.warn("Grouping Update - cant refresh view, no groups have been set"); - } - } else { - return false; - } -}; - -Tabulator.prototype.setGroupHeader = function (values) { - if (this.modExists("groupRows", true)) { - this.options.groupHeader = values; - this.modules.groupRows.initialize(); - if (this.options.groupBy) { - this.rowManager.refreshActiveData("group"); - } else { - console.warn("Grouping Update - cant refresh view, no groups have been set"); - } - } else { - return false; - } -}; - -Tabulator.prototype.getGroups = function (values) { - if (this.modExists("groupRows", true)) { - return this.modules.groupRows.getGroups(true); - } else { - return false; - } -}; - -// get grouped table data in the same format as getData() -Tabulator.prototype.getGroupedData = function () { - if (this.modExists("groupRows", true)) { - return this.options.groupBy ? this.modules.groupRows.getGroupedData() : this.getData(); - } -}; - -///////////////// Column Calculation Functions /////////////// -Tabulator.prototype.getCalcResults = function () { - if (this.modExists("columnCalcs", true)) { - return this.modules.columnCalcs.getResults(); - } else { - return false; - } -}; - -/////////////// Navigation Management ////////////// - -Tabulator.prototype.navigatePrev = function () { - var cell = false; - - if (this.modExists("edit", true)) { - cell = this.modules.edit.currentCell; - - if (cell) { - e.preventDefault(); - return cell.nav().prev(); - } - } - - return false; -}; - -Tabulator.prototype.navigateNext = function () { - var cell = false; - - if (this.modExists("edit", true)) { - cell = this.modules.edit.currentCell; - - if (cell) { - e.preventDefault(); - return cell.nav().next(); - } - } - - return false; -}; - -Tabulator.prototype.navigateLeft = function () { - var cell = false; - - if (this.modExists("edit", true)) { - cell = this.modules.edit.currentCell; - - if (cell) { - e.preventDefault(); - return cell.nav().left(); - } - } - - return false; -}; - -Tabulator.prototype.navigateRight = function () { - var cell = false; - - if (this.modExists("edit", true)) { - cell = this.modules.edit.currentCell; - - if (cell) { - e.preventDefault(); - return cell.nav().right(); - } - } - - return false; -}; - -Tabulator.prototype.navigateUp = function () { - var cell = false; - - if (this.modExists("edit", true)) { - cell = this.modules.edit.currentCell; - - if (cell) { - e.preventDefault(); - return cell.nav().up(); - } - } - - return false; -}; - -Tabulator.prototype.navigateDown = function () { - var cell = false; - - if (this.modExists("edit", true)) { - cell = this.modules.edit.currentCell; - - if (cell) { - e.preventDefault(); - return cell.nav().dpwn(); - } - } - - return false; -}; - -/////////////// History Management ////////////// -Tabulator.prototype.undo = function () { - if (this.options.history && this.modExists("history", true)) { - return this.modules.history.undo(); - } else { - return false; - } -}; - -Tabulator.prototype.redo = function () { - if (this.options.history && this.modExists("history", true)) { - return this.modules.history.redo(); - } else { - return false; - } -}; - -Tabulator.prototype.getHistoryUndoSize = function () { - if (this.options.history && this.modExists("history", true)) { - return this.modules.history.getHistoryUndoSize(); - } else { - return false; - } -}; - -Tabulator.prototype.getHistoryRedoSize = function () { - if (this.options.history && this.modExists("history", true)) { - return this.modules.history.getHistoryRedoSize(); - } else { - return false; - } -}; - -/////////////// Download Management ////////////// - -Tabulator.prototype.download = function (type, filename, options) { - if (this.modExists("download", true)) { - this.modules.download.download(type, filename, options); - } -}; - -/////////// Inter Table Communications /////////// - -Tabulator.prototype.tableComms = function (table, module, action, data) { - this.modules.comms.receive(table, module, action, data); -}; - -////////////// Extension Management ////////////// - -//object to hold module -Tabulator.prototype.moduleBindings = {}; - -//extend module -Tabulator.prototype.extendModule = function (name, property, values) { - - if (Tabulator.prototype.moduleBindings[name]) { - var source = Tabulator.prototype.moduleBindings[name].prototype[property]; - - if (source) { - if ((typeof values === 'undefined' ? 'undefined' : _typeof(values)) == "object") { - for (var key in values) { - source[key] = values[key]; - } - } else { - console.warn("Module Error - Invalid value type, it must be an object"); - } - } else { - console.warn("Module Error - property does not exist:", property); - } - } else { - console.warn("Module Error - module does not exist:", name); - } -}; - -//add module to tabulator -Tabulator.prototype.registerModule = function (name, module) { - var self = this; - Tabulator.prototype.moduleBindings[name] = module; -}; - -//ensure that module are bound to instantiated function -Tabulator.prototype.bindModules = function () { - this.modules = {}; - - for (var name in Tabulator.prototype.moduleBindings) { - this.modules[name] = new Tabulator.prototype.moduleBindings[name](this); - } -}; - -//Check for module -Tabulator.prototype.modExists = function (plugin, required) { - if (this.modules[plugin]) { - return true; - } else { - if (required) { - console.error("Tabulator Module Not Installed: " + plugin); - } - return false; - } -}; - -Tabulator.prototype.helpers = { - - elVisible: function elVisible(el) { - return !(el.offsetWidth <= 0 && el.offsetHeight <= 0); - }, - - elOffset: function elOffset(el) { - var box = el.getBoundingClientRect(); - - return { - top: box.top + window.pageYOffset - document.documentElement.clientTop, - left: box.left + window.pageXOffset - document.documentElement.clientLeft - }; - }, - - deepClone: function deepClone(obj) { - var clone = Array.isArray(obj) ? [] : {}; - - for (var i in obj) { - if (obj[i] != null && _typeof(obj[i]) === "object") { - if (obj[i] instanceof Date) { - clone[i] = new Date(obj[i]); - } else { - clone[i] = this.deepClone(obj[i]); - } - } else { - clone[i] = obj[i]; - } - } - return clone; - } -}; - -Tabulator.prototype.comms = { - tables: [], - register: function register(table) { - Tabulator.prototype.comms.tables.push(table); - }, - deregister: function deregister(table) { - var index = Tabulator.prototype.comms.tables.indexOf(table); - - if (index > -1) { - Tabulator.prototype.comms.tables.splice(index, 1); - } - }, - lookupTable: function lookupTable(query) { - var results = [], - matches, - match; - - if (typeof query === "string") { - matches = document.querySelectorAll(query); - - if (matches.length) { - for (var i = 0; i < matches.length; i++) { - match = Tabulator.prototype.comms.matchElement(matches[i]); - - if (match) { - results.push(match); - } - } - } - } else if (query instanceof HTMLElement || query instanceof Tabulator) { - match = Tabulator.prototype.comms.matchElement(query); - - if (match) { - results.push(match); - } - } else if (Array.isArray(query)) { - query.forEach(function (item) { - results = results.concat(Tabulator.prototype.comms.lookupTable(item)); - }); - } else { - console.warn("Table Connection Error - Invalid Selector", query); - } - - return results; - }, - matchElement: function matchElement(element) { - return Tabulator.prototype.comms.tables.find(function (table) { - return element instanceof Tabulator ? table === element : table.element === element; - }); - } -}; - -var Layout = function Layout(table) { - - this.table = table; - - this.mode = null; -}; - -//initialize layout system - -Layout.prototype.initialize = function (layout) { - - if (this.modes[layout]) { - - this.mode = layout; - } else { - - console.warn("Layout Error - invalid mode set, defaulting to 'fitData' : " + layout); - - this.mode = 'fitData'; - } - - this.table.element.setAttribute("tabulator-layout", this.mode); -}; - -Layout.prototype.getMode = function () { - - return this.mode; -}; - -//trigger table layout - -Layout.prototype.layout = function () { - - this.modes[this.mode].call(this, this.table.columnManager.columnsByIndex); -}; - -//layout render functions - -Layout.prototype.modes = { - - //resize columns to fit data the contain - - "fitData": function fitData(columns) { - - columns.forEach(function (column) { - - column.reinitializeWidth(); - }); - - if (this.table.options.responsiveLayout && this.table.modExists("responsiveLayout", true)) { - - this.table.modules.responsiveLayout.update(); - } - }, - - //resize columns to fit data the contain - - "fitDataFill": function fitDataFill(columns) { - - columns.forEach(function (column) { - - column.reinitializeWidth(); - }); - - if (this.table.options.responsiveLayout && this.table.modExists("responsiveLayout", true)) { - - this.table.modules.responsiveLayout.update(); - } - }, - - //resize columns to fit - - "fitColumns": function fitColumns(columns) { - - var self = this; - - var totalWidth = self.table.element.clientWidth; //table element width - - var fixedWidth = 0; //total width of columns with a defined width - - var flexWidth = 0; //total width available to flexible columns - - var flexGrowUnits = 0; //total number of widthGrow blocks accross all columns - - var flexColWidth = 0; //desired width of flexible columns - - var flexColumns = []; //array of flexible width columns - - var fixedShrinkColumns = []; //array of fixed width columns that can shrink - - var flexShrinkUnits = 0; //total number of widthShrink blocks accross all columns - - var overflowWidth = 0; //horizontal overflow width - - var gapFill = 0; //number of pixels to be added to final column to close and half pixel gaps - - - function calcWidth(width) { - - var colWidth; - - if (typeof width == "string") { - - if (width.indexOf("%") > -1) { - - colWidth = totalWidth / 100 * parseInt(width); - } else { - - colWidth = parseInt(width); - } - } else { - - colWidth = width; - } - - return colWidth; - } - - //ensure columns resize to take up the correct amount of space - - function scaleColumns(columns, freeSpace, colWidth, shrinkCols) { - - var oversizeCols = [], - oversizeSpace = 0, - remainingSpace = 0, - nextColWidth = 0, - gap = 0, - changeUnits = 0, - undersizeCols = []; - - function calcGrow(col) { - - return colWidth * (col.column.definition.widthGrow || 1); - } - - function calcShrink(col) { - - return calcWidth(col.width) - colWidth * (col.column.definition.widthShrink || 0); - } - - columns.forEach(function (col, i) { - - var width = shrinkCols ? calcShrink(col) : calcGrow(col); - - if (col.column.minWidth >= width) { - - oversizeCols.push(col); - } else { - - undersizeCols.push(col); - - changeUnits += shrinkCols ? col.column.definition.widthShrink || 1 : col.column.definition.widthGrow || 1; - } - }); - - if (oversizeCols.length) { - - oversizeCols.forEach(function (col) { - - oversizeSpace += shrinkCols ? col.width - col.column.minWidth : col.column.minWidth; - - col.width = col.column.minWidth; - }); - - remainingSpace = freeSpace - oversizeSpace; - - nextColWidth = changeUnits ? Math.floor(remainingSpace / changeUnits) : remainingSpace; - - gap = remainingSpace - nextColWidth * changeUnits; - - gap += scaleColumns(undersizeCols, remainingSpace, nextColWidth, shrinkCols); - } else { - - gap = changeUnits ? freeSpace - Math.floor(freeSpace / changeUnits) * changeUnits : freeSpace; - - undersizeCols.forEach(function (column) { - - column.width = shrinkCols ? calcShrink(column) : calcGrow(column); - }); - } - - return gap; - } - - if (this.table.options.responsiveLayout && this.table.modExists("responsiveLayout", true)) { - - this.table.modules.responsiveLayout.update(); - } - - //adjust for vertical scrollbar if present - - if (this.table.rowManager.element.scrollHeight > this.table.rowManager.element.clientHeight) { - - totalWidth -= this.table.rowManager.element.offsetWidth - this.table.rowManager.element.clientWidth; - } - - columns.forEach(function (column) { - - var width, minWidth, colWidth; - - if (column.visible) { - - width = column.definition.width; - - minWidth = parseInt(column.minWidth); - - if (width) { - - colWidth = calcWidth(width); - - fixedWidth += colWidth > minWidth ? colWidth : minWidth; - - if (column.definition.widthShrink) { - - fixedShrinkColumns.push({ - - column: column, - - width: colWidth > minWidth ? colWidth : minWidth - - }); - - flexShrinkUnits += column.definition.widthShrink; - } - } else { - - flexColumns.push({ - - column: column, - - width: 0 - - }); - - flexGrowUnits += column.definition.widthGrow || 1; - } - } - }); - - //calculate available space - - flexWidth = totalWidth - fixedWidth; - - //calculate correct column size - - flexColWidth = Math.floor(flexWidth / flexGrowUnits); - - //generate column widths - - var gapFill = scaleColumns(flexColumns, flexWidth, flexColWidth, false); - - //increase width of last column to account for rounding errors - - if (flexColumns.length && gapFill > 0) { - - flexColumns[flexColumns.length - 1].width += +gapFill; - } - - //caculate space for columns to be shrunk into - - flexColumns.forEach(function (col) { - - flexWidth -= col.width; - }); - - overflowWidth = Math.abs(gapFill) + flexWidth; - - //shrink oversize columns if there is no available space - - if (overflowWidth > 0 && flexShrinkUnits) { - - gapFill = scaleColumns(fixedShrinkColumns, overflowWidth, Math.floor(overflowWidth / flexShrinkUnits), true); - } - - //decrease width of last column to account for rounding errors - - if (fixedShrinkColumns.length) { - - fixedShrinkColumns[fixedShrinkColumns.length - 1].width -= gapFill; - } - - flexColumns.forEach(function (col) { - - col.column.setWidth(col.width); - }); - - fixedShrinkColumns.forEach(function (col) { - - col.column.setWidth(col.width); - }); - } - -}; - -Tabulator.prototype.registerModule("layout", Layout); -var Localize = function Localize(table) { - this.table = table; //hold Tabulator object - this.locale = "default"; //current locale - this.lang = false; //current language - this.bindings = {}; //update events to call when locale is changed -}; - -//set header placehoder -Localize.prototype.setHeaderFilterPlaceholder = function (placeholder) { - this.langs.default.headerFilters.default = placeholder; -}; - -//set header filter placeholder by column -Localize.prototype.setHeaderFilterColumnPlaceholder = function (column, placeholder) { - this.langs.default.headerFilters.columns[column] = placeholder; - - if (this.lang && !this.lang.headerFilters.columns[column]) { - this.lang.headerFilters.columns[column] = placeholder; - } -}; - -//setup a lang description object -Localize.prototype.installLang = function (locale, lang) { - if (this.langs[locale]) { - this._setLangProp(this.langs[locale], lang); - } else { - this.langs[locale] = lang; - } -}; - -Localize.prototype._setLangProp = function (lang, values) { - for (var key in values) { - if (lang[key] && _typeof(lang[key]) == "object") { - this._setLangProp(lang[key], values[key]); - } else { - lang[key] = values[key]; - } - } -}; - -//set current locale -Localize.prototype.setLocale = function (desiredLocale) { - var self = this; - - desiredLocale = desiredLocale || "default"; - - //fill in any matching languge values - function traverseLang(trans, path) { - for (var prop in trans) { - - if (_typeof(trans[prop]) == "object") { - if (!path[prop]) { - path[prop] = {}; - } - traverseLang(trans[prop], path[prop]); - } else { - path[prop] = trans[prop]; - } - } - } - - //determing correct locale to load - if (desiredLocale === true && navigator.language) { - //get local from system - desiredLocale = navigator.language.toLowerCase(); - } - - if (desiredLocale) { - - //if locale is not set, check for matching top level locale else use default - if (!self.langs[desiredLocale]) { - var prefix = desiredLocale.split("-")[0]; - - if (self.langs[prefix]) { - console.warn("Localization Error - Exact matching locale not found, using closest match: ", desiredLocale, prefix); - desiredLocale = prefix; - } else { - console.warn("Localization Error - Matching locale not found, using default: ", desiredLocale); - desiredLocale = "default"; - } - } - } - - self.locale = desiredLocale; - - //load default lang template - self.lang = Tabulator.prototype.helpers.deepClone(self.langs.default || {}); - - if (desiredLocale != "default") { - traverseLang(self.langs[desiredLocale], self.lang); - } - - self.table.options.localized.call(self.table, self.locale, self.lang); - - self._executeBindings(); -}; - -//get current locale -Localize.prototype.getLocale = function (locale) { - return self.locale; -}; - -//get lang object for given local or current if none provided -Localize.prototype.getLang = function (locale) { - return locale ? this.langs[locale] : this.lang; -}; - -//get text for current locale -Localize.prototype.getText = function (path, value) { - var path = value ? path + "|" + value : path, - pathArray = path.split("|"), - text = this._getLangElement(pathArray, this.locale); - - // if(text === false){ - // console.warn("Localization Error - Matching localized text not found for given path: ", path); - // } - - return text || ""; -}; - -//traverse langs object and find localized copy -Localize.prototype._getLangElement = function (path, locale) { - var self = this; - var root = self.lang; - - path.forEach(function (level) { - var rootPath; - - if (root) { - rootPath = root[level]; - - if (typeof rootPath != "undefined") { - root = rootPath; - } else { - root = false; - } - } - }); - - return root; -}; - -//set update binding -Localize.prototype.bind = function (path, callback) { - if (!this.bindings[path]) { - this.bindings[path] = []; - } - - this.bindings[path].push(callback); - - callback(this.getText(path), this.lang); -}; - -//itterate through bindings and trigger updates -Localize.prototype._executeBindings = function () { - var self = this; - - var _loop = function _loop(path) { - self.bindings[path].forEach(function (binding) { - binding(self.getText(path), self.lang); - }); - }; - - for (var path in self.bindings) { - _loop(path); - } -}; - -//Localized text listings -Localize.prototype.langs = { - "default": { //hold default locale text - "groups": { - "item": "item", - "items": "items" - }, - "columns": {}, - "ajax": { - "loading": "Loading", - "error": "Error" - }, - "pagination": { - "first": "First", - "first_title": "First Page", - "last": "Last", - "last_title": "Last Page", - "prev": "Prev", - "prev_title": "Prev Page", - "next": "Next", - "next_title": "Next Page" - }, - "headerFilters": { - "default": "filter column...", - "columns": {} - } - } -}; - -Tabulator.prototype.registerModule("localize", Localize); -var Comms = function Comms(table) { - this.table = table; -}; - -Comms.prototype.getConnections = function (selectors) { - var self = this, - connections = [], - connection; - - connection = Tabulator.prototype.comms.lookupTable(selectors); - - connection.forEach(function (con) { - if (self.table !== con) { - connections.push(con); - } - }); - - return connections; -}; - -Comms.prototype.send = function (selectors, module, action, data) { - var self = this, - connections = this.getConnections(selectors); - - connections.forEach(function (connection) { - connection.tableComms(self.table.element, module, action, data); - }); - - if (!connections.length && selectors) { - console.warn("Table Connection Error - No tables matching selector found", selectors); - } -}; - -Comms.prototype.receive = function (table, module, action, data) { - if (this.table.modExists(module)) { - return this.table.modules[module].commsReceived(table, action, data); - } else { - console.warn("Inter-table Comms Error - no such module:", module); - } -}; - -Tabulator.prototype.registerModule("comms", Comms); \ No newline at end of file diff --git a/Gems/AssetMemoryAnalyzer/External/tabulator-master/dist/js/tabulator_core.min.js b/Gems/AssetMemoryAnalyzer/External/tabulator-master/dist/js/tabulator_core.min.js deleted file mode 100644 index 53ff575991..0000000000 --- a/Gems/AssetMemoryAnalyzer/External/tabulator-master/dist/js/tabulator_core.min.js +++ /dev/null @@ -1,5 +0,0 @@ -/* Tabulator v4.1.2 (c) Oliver Folkerd */ -"use strict";var _typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t};Array.prototype.findIndex||Object.defineProperty(Array.prototype,"findIndex",{value:function(t){if(null==this)throw new TypeError('"this" is null or not defined');var e=Object(this),o=e.length>>>0;if("function"!=typeof t)throw new TypeError("predicate must be a function");for(var i=arguments[1],n=0;n>>0;if("function"!=typeof t)throw new TypeError("predicate must be a function");for(var i=arguments[1],n=0;no?(e=t-o,this.element.style.marginLeft=-e+"px"):this.element.style.marginLeft=0,this.scrollLeft=t,this.table.modExists("frozenColumns")&&this.table.modules.frozenColumns.layout()},ColumnManager.prototype.setColumns=function(t,e){for(var o=this;o.headersElement.firstChild;)o.headersElement.removeChild(o.headersElement.firstChild);o.columns=[],o.columnsByIndex=[],o.columnsByField=[],o.table.modExists("frozenColumns")&&o.table.modules.frozenColumns.reset(),t.forEach(function(t,e){o._addColumn(t)}),o._reIndexColumns(),o.table.options.responsiveLayout&&o.table.modExists("responsiveLayout",!0)&&o.table.modules.responsiveLayout.initialize(),o.redraw(!0)},ColumnManager.prototype._addColumn=function(t,e,o){var i=new Column(t,this),n=i.getElement(),l=o?this.findColumnIndex(o):o;if(o&&l>-1){var s=this.columns.indexOf(o.getTopColumn()),a=o.getElement();e?(this.columns.splice(s,0,i),a.parentNode.insertBefore(n,a)):(this.columns.splice(s+1,0,i),a.parentNode.insertBefore(n,a.nextSibling))}else e?(this.columns.unshift(i),this.headersElement.insertBefore(i.getElement(),this.headersElement.firstChild)):(this.columns.push(i),this.headersElement.appendChild(i.getElement()));return i},ColumnManager.prototype.registerColumnField=function(t){t.definition.field&&(this.columnsByField[t.definition.field]=t)},ColumnManager.prototype.registerColumnPosition=function(t){this.columnsByIndex.push(t)},ColumnManager.prototype._reIndexColumns=function(){this.columnsByIndex=[],this.columns.forEach(function(t){t.reRegisterPosition()})},ColumnManager.prototype._verticalAlignHeaders=function(){var t=this,e=0;t.columns.forEach(function(t){var o;t.clearVerticalAlign(),(o=t.getHeight())>e&&(e=o)}),t.columns.forEach(function(o){o.verticalAlign(t.table.options.columnVertAlign,e)}),t.rowManager.adjustTableSize()},ColumnManager.prototype.findColumn=function(t){var e=this;if("object"!=(void 0===t?"undefined":_typeof(t)))return this.columnsByField[t]||!1;if(t instanceof Column)return t;if(t instanceof ColumnComponent)return t._getSelf()||!1;if(t instanceof HTMLElement){return e.columns.find(function(e){return e.element===t})||!1}return!1},ColumnManager.prototype.getColumnByField=function(t){return this.columnsByField[t]},ColumnManager.prototype.getColumnByIndex=function(t){return this.columnsByIndex[t]},ColumnManager.prototype.getColumns=function(){return this.columns},ColumnManager.prototype.findColumnIndex=function(t){return this.columnsByIndex.findIndex(function(e){return t===e})},ColumnManager.prototype.getRealColumns=function(){return this.columnsByIndex},ColumnManager.prototype.traverse=function(t){this.columnsByIndex.forEach(function(e,o){t(e,o)})},ColumnManager.prototype.getDefinitions=function(t){var e=this,o=[];return e.columnsByIndex.forEach(function(e){(!t||t&&e.visible)&&o.push(e.getDefinition())}),o},ColumnManager.prototype.getDefinitionTree=function(){var t=this,e=[];return t.columns.forEach(function(t){e.push(t.getDefinition(!0))}),e},ColumnManager.prototype.getComponents=function(t){var e=this,o=[];return(t?e.columns:e.columnsByIndex).forEach(function(t){o.push(t.getComponent())}),o},ColumnManager.prototype.getWidth=function(){var t=0;return this.columnsByIndex.forEach(function(e){e.visible&&(t+=e.getWidth())}),t},ColumnManager.prototype.moveColumn=function(t,e,o){this._moveColumnInArray(this.columns,t,e,o),this._moveColumnInArray(this.columnsByIndex,t,e,o,!0),this.table.options.responsiveLayout&&this.table.modExists("responsiveLayout",!0)&&this.table.modules.responsiveLayout.initialize(),this.table.options.columnMoved&&this.table.options.columnMoved.call(this.table,t.getComponent(),this.table.columnManager.getComponents()),this.table.options.persistentLayout&&this.table.modExists("persistence",!0)&&this.table.modules.persistence.save("columns")},ColumnManager.prototype._moveColumnInArray=function(t,e,o,i,n){var l,s=t.indexOf(e);s>-1&&(t.splice(s,1),l=t.indexOf(o),l>-1?i&&(l+=1):l=s,t.splice(l,0,e),n&&this.table.rowManager.rows.forEach(function(t){if(t.cells.length){var e=t.cells.splice(s,1)[0];t.cells.splice(l,0,e)}}))},ColumnManager.prototype.scrollToColumn=function(t,e,o){var i=this,n=0,l=0,s=0,a=t.getElement();return new Promise(function(r,u){if(void 0===e&&(e=i.table.options.scrollToColumnPosition),void 0===o&&(o=i.table.options.scrollToColumnIfVisible),t.visible){switch(e){case"middle":case"center":s=-i.element.clientWidth/2;break;case"right":s=a.clientWidth-i.headersElement.clientWidth}if(!o&&(l=a.offsetLeft)>0&&l+a.offsetWidtht.rowManager.element.clientHeight&&(e-=t.rowManager.element.offsetWidth-t.rowManager.element.clientWidth),this.columnsByIndex.forEach(function(i){var n,l,s;i.visible&&(n=i.definition.width||0,l=void 0===i.minWidth?t.table.options.columnMinWidth:parseInt(i.minWidth),s="string"==typeof n?n.indexOf("%")>-1?e/100*parseInt(n):parseInt(n):n,o+=s>l?s:l)}),o},ColumnManager.prototype.addColumn=function(t,e,o){var i=this._addColumn(t,e,o);this._reIndexColumns(),this.table.options.responsiveLayout&&this.table.modExists("responsiveLayout",!0)&&this.table.modules.responsiveLayout.initialize(),this.table.modExists("columnCalcs")&&this.table.modules.columnCalcs.recalc(this.table.rowManager.activeRows),this.redraw(),"fitColumns"!=this.table.modules.layout.getMode()&&i.reinitializeWidth(),this._verticalAlignHeaders(),this.table.rowManager.reinitialize()},ColumnManager.prototype.deregisterColumn=function(t){var e,o=t.getField();o&&delete this.columnsByField[o],e=this.columnsByIndex.indexOf(t),e>-1&&this.columnsByIndex.splice(e,1),e=this.columns.indexOf(t),e>-1&&this.columns.splice(e,1),this.table.options.responsiveLayout&&this.table.modExists("responsiveLayout",!0)&&this.table.modules.responsiveLayout.initialize(),this.redraw()},ColumnManager.prototype.redraw=function(t){t&&(Tabulator.prototype.helpers.elVisible(this.element)&&this._verticalAlignHeaders(),this.table.rowManager.resetScroll(),this.table.rowManager.reinitialize()),"fitColumns"==this.table.modules.layout.getMode()?this.table.modules.layout.layout():t?this.table.modules.layout.layout():this.table.options.responsiveLayout&&this.table.modExists("responsiveLayout",!0)&&this.table.modules.responsiveLayout.update(),this.table.modExists("frozenColumns")&&this.table.modules.frozenColumns.layout(),this.table.modExists("columnCalcs")&&this.table.modules.columnCalcs.recalc(this.table.rowManager.activeRows),t&&(this.table.options.persistentLayout&&this.table.modExists("persistence",!0)&&this.table.modules.persistence.save("columns"),this.table.modExists("columnCalcs")&&this.table.modules.columnCalcs.redraw()),this.table.footerManager.redraw()};var ColumnComponent=function(t){this._column=t,this.type="ColumnComponent"};ColumnComponent.prototype.getElement=function(){return this._column.getElement()},ColumnComponent.prototype.getDefinition=function(){return this._column.getDefinition()},ColumnComponent.prototype.getField=function(){return this._column.getField()},ColumnComponent.prototype.getCells=function(){var t=[];return this._column.cells.forEach(function(e){t.push(e.getComponent())}),t},ColumnComponent.prototype.getVisibility=function(){return this._column.visible},ColumnComponent.prototype.show=function(){this._column.isGroup?this._column.columns.forEach(function(t){t.show()}):this._column.show()},ColumnComponent.prototype.hide=function(){this._column.isGroup?this._column.columns.forEach(function(t){t.hide()}):this._column.hide()},ColumnComponent.prototype.toggle=function(){this._column.visible?this.hide():this.show()},ColumnComponent.prototype.delete=function(){this._column.delete()},ColumnComponent.prototype.getSubColumns=function(){var t=[];return this._column.columns.length&&this._column.columns.forEach(function(e){t.push(e.getComponent())}),t},ColumnComponent.prototype.getParentColumn=function(){return this._column.parent instanceof Column&&this._column.parent.getComponent()},ColumnComponent.prototype._getSelf=function(){return this._column},ColumnComponent.prototype.scrollTo=function(){return this._column.table.columnManager.scrollToColumn(this._column)},ColumnComponent.prototype.getTable=function(){return this._column.table},ColumnComponent.prototype.headerFilterFocus=function(){this._column.table.modExists("filter",!0)&&this._column.table.modules.filter.setHeaderFilterFocus(this._column)},ColumnComponent.prototype.reloadHeaderFilter=function(){this._column.table.modExists("filter",!0)&&this._column.table.modules.filter.reloadHeaderFilter(this._column)},ColumnComponent.prototype.setHeaderFilterValue=function(t){this._column.table.modExists("filter",!0)&&this._column.table.modules.filter.setHeaderFilterValue(this._column,t)};var Column=function t(e,o){var i=this;this.table=o.table,this.definition=e,this.parent=o,this.type="column",this.columns=[],this.cells=[],this.element=this.createElement(),this.contentElement=!1,this.groupElement=this.createGroupElement(),this.isGroup=!1,this.tooltip=!1,this.hozAlign="",this.field="",this.fieldStructure="",this.getFieldValue="",this.setFieldValue="",this.setField(this.definition.field),this.modules={},this.cellEvents={cellClick:!1,cellDblClick:!1,cellContext:!1,cellTap:!1,cellDblTap:!1,cellTapHold:!1},this.width=null,this.minWidth=null,this.widthFixed=!1,this.visible=!0,e.columns?(this.isGroup=!0,e.columns.forEach(function(e,o){var n=new t(e,i);i.attachColumn(n)}),i.checkColumnVisibility()):o.registerColumnField(this),e.rowHandle&&!1!==this.table.options.movableRows&&this.table.modExists("moveRow")&&this.table.modules.moveRow.setHandle(!0),this._buildHeader()};Column.prototype.createElement=function(){var t=document.createElement("div");return t.classList.add("tabulator-col"),t.setAttribute("role","columnheader"),t.setAttribute("aria-sort","none"),t},Column.prototype.createGroupElement=function(){var t=document.createElement("div");return t.classList.add("tabulator-col-group-cols"),t},Column.prototype.setField=function(t){this.field=t,this.fieldStructure=t?this.table.options.nestedFieldSeparator?t.split(this.table.options.nestedFieldSeparator):[t]:[],this.getFieldValue=this.fieldStructure.length>1?this._getNestedData:this._getFlatData,this.setFieldValue=this.fieldStructure.length>1?this._setNesteData:this._setFlatData},Column.prototype.registerColumnPosition=function(t){this.parent.registerColumnPosition(t)},Column.prototype.registerColumnField=function(t){this.parent.registerColumnField(t)},Column.prototype.reRegisterPosition=function(){this.isGroup?this.columns.forEach(function(t){t.reRegisterPosition()}):this.registerColumnPosition(this)},Column.prototype.setTooltip=function(){var t=this,e=t.definition,o=e.headerTooltip||!1===e.tooltip?e.headerTooltip:t.table.options.tooltipsHeader;o?!0===o?e.field?t.table.modules.localize.bind("columns|"+e.field,function(o){t.element.setAttribute("title",o||e.title)}):t.element.setAttribute("title",e.title):("function"==typeof o&&!1===(o=o(t.getComponent()))&&(o=""),t.element.setAttribute("title",o)):t.element.setAttribute("title","")},Column.prototype._buildHeader=function(){for(var t=this,e=t.definition;t.element.firstChild;)t.element.removeChild(t.element.firstChild);e.headerVertical&&(t.element.classList.add("tabulator-col-vertical"),"flip"===e.headerVertical&&t.element.classList.add("tabulator-col-vertical-flip")),t.contentElement=t._bindEvents(),t.contentElement=t._buildColumnHeaderContent(),t.element.appendChild(t.contentElement),t.isGroup?t._buildGroupHeader():t._buildColumnHeader(),t.setTooltip(),t.table.options.resizableColumns&&t.table.modExists("resizeColumns")&&t.table.modules.resizeColumns.initializeColumn("header",t,t.element),e.headerFilter&&t.table.modExists("filter")&&t.table.modExists("edit")&&(void 0!==e.headerFilterPlaceholder&&e.field&&t.table.modules.localize.setHeaderFilterColumnPlaceholder(e.field,e.headerFilterPlaceholder),t.table.modules.filter.initializeColumn(t)),t.table.modExists("frozenColumns")&&t.table.modules.frozenColumns.initializeColumn(t),t.table.options.movableColumns&&!t.isGroup&&t.table.modExists("moveColumn")&&t.table.modules.moveColumn.initializeColumn(t),(e.topCalc||e.bottomCalc)&&t.table.modExists("columnCalcs")&&t.table.modules.columnCalcs.initializeColumn(t),t.element.addEventListener("mouseenter",function(e){t.setTooltip()})},Column.prototype._bindEvents=function(){var t,e,o,i=this,n=i.definition;"function"==typeof n.headerClick&&i.element.addEventListener("click",function(t){n.headerClick(t,i.getComponent())}),"function"==typeof n.headerDblClick&&i.element.addEventListener("dblclick",function(t){n.headerDblClick(t,i.getComponent())}),"function"==typeof n.headerContext&&i.element.addEventListener("contextmenu",function(t){n.headerContext(t,i.getComponent())}),"function"==typeof n.headerTap&&(o=!1,i.element.addEventListener("touchstart",function(t){o=!0}),i.element.addEventListener("touchend",function(t){o&&n.headerTap(t,i.getComponent()),o=!1})),"function"==typeof n.headerDblTap&&(t=null,i.element.addEventListener("touchend",function(e){t?(clearTimeout(t),t=null,n.headerDblTap(e,i.getComponent())):t=setTimeout(function(){clearTimeout(t),t=null},300)})),"function"==typeof n.headerTapHold&&(e=null,i.element.addEventListener("touchstart",function(t){clearTimeout(e),e=setTimeout(function(){clearTimeout(e),e=null,o=!1,n.headerTapHold(t,i.getComponent())},1e3)}),i.element.addEventListener("touchend",function(t){clearTimeout(e),e=null})),"function"==typeof n.cellClick&&(i.cellEvents.cellClick=n.cellClick),"function"==typeof n.cellDblClick&&(i.cellEvents.cellDblClick=n.cellDblClick),"function"==typeof n.cellContext&&(i.cellEvents.cellContext=n.cellContext),"function"==typeof n.cellTap&&(i.cellEvents.cellTap=n.cellTap),"function"==typeof n.cellDblTap&&(i.cellEvents.cellDblTap=n.cellDblTap),"function"==typeof n.cellTapHold&&(i.cellEvents.cellTapHold=n.cellTapHold),"function"==typeof n.cellEdited&&(i.cellEvents.cellEdited=n.cellEdited),"function"==typeof n.cellEditing&&(i.cellEvents.cellEditing=n.cellEditing),"function"==typeof n.cellEditCancelled&&(i.cellEvents.cellEditCancelled=n.cellEditCancelled)},Column.prototype._buildColumnHeader=function(){var t=this,e=t.definition,o=t.table;o.modExists("sort")&&o.modules.sort.initializeColumn(t,t.contentElement),o.modExists("format")&&o.modules.format.initializeColumn(t),void 0!==e.editor&&o.modExists("edit")&&o.modules.edit.initializeColumn(t),void 0!==e.validator&&o.modExists("validate")&&o.modules.validate.initializeColumn(t),o.modExists("mutator")&&o.modules.mutator.initializeColumn(t),o.modExists("accessor")&&o.modules.accessor.initializeColumn(t),_typeof(o.options.responsiveLayout)&&o.modExists("responsiveLayout")&&o.modules.responsiveLayout.initializeColumn(t),void 0!==e.visible&&(e.visible?t.show(!0):t.hide(!0)),e.cssClass&&t.element.classList.add(e.cssClass),e.field&&this.element.setAttribute("tabulator-field",e.field),t.setMinWidth(void 0===e.minWidth?t.table.options.columnMinWidth:e.minWidth),t.reinitializeWidth(),t.tooltip=t.definition.tooltip||!1===t.definition.tooltip?t.definition.tooltip:t.table.options.tooltips,t.hozAlign=void 0===t.definition.align?"":t.definition.align},Column.prototype._buildColumnHeaderContent=function(){var t=this,e=(t.definition,t.table,document.createElement("div"));return e.classList.add("tabulator-col-content"),e.appendChild(t._buildColumnHeaderTitle()),e},Column.prototype._buildColumnHeaderTitle=function(){var t=this,e=t.definition,o=t.table,i=document.createElement("div");if(i.classList.add("tabulator-col-title"),e.editableTitle){var n=document.createElement("input");n.classList.add("tabulator-title-editor"),n.addEventListener("click",function(t){t.stopPropagation(),n.focus()}),n.addEventListener("change",function(){e.title=n.value,o.options.columnTitleChanged.call(t.table,t.getComponent())}),i.appendChild(n),e.field?o.modules.localize.bind("columns|"+e.field,function(t){n.value=t||e.title||" "}):n.value=e.title||" "}else e.field?o.modules.localize.bind("columns|"+e.field,function(o){t._formatColumnHeaderTitle(i,o||e.title||" ")}):t._formatColumnHeaderTitle(i,e.title||" ");return i},Column.prototype._formatColumnHeaderTitle=function(t,e){var o,i,n,l;if(this.definition.titleFormatter&&this.table.modExists("format"))switch(o=this.table.modules.format.getFormatter(this.definition.titleFormatter),l={getValue:function(){return e},getElement:function(){return t}},n=this.definition.titleFormatterParams||{},n="function"==typeof n?n():n,i=o.call(this.table.modules.format,l,n),void 0===i?"undefined":_typeof(i)){case"object":i instanceof Node?this.element.appendChild(i):(this.element.innerHTML="",console.warn("Format Error - Title formatter has returned a type of object, the only valid formatter object return is an instance of Node, the formatter returned:",i));break;case"undefined":case"null":this.element.innerHTML="";break;default:this.element.innerHTML=i}else t.innerHTML=e},Column.prototype._buildGroupHeader=function(){this.element.classList.add("tabulator-col-group"),this.element.setAttribute("role","columngroup"),this.element.setAttribute("aria-title",this.definition.title),this.element.appendChild(this.groupElement)},Column.prototype._getFlatData=function(t){return t[this.field]},Column.prototype._getNestedData=function(t){for(var e,o=t,i=this.fieldStructure,n=i.length,l=0;le&&(e=o)}),e&&t.setWidthActual(e+1))},Column.prototype.deleteCell=function(t){var e=this.cells.indexOf(t);e>-1&&this.cells.splice(e,1)},Column.prototype.getComponent=function(){return new ColumnComponent(this)};var RowManager=function(t){this.table=t,this.element=this.createHolderElement(),this.tableElement=this.createTableElement(),this.columnManager=null,this.height=0,this.firstRender=!1,this.renderMode="classic",this.rows=[],this.activeRows=[],this.activeRowsCount=0,this.displayRows=[],this.displayRowsCount=0,this.scrollTop=0,this.scrollLeft=0,this.vDomRowHeight=20,this.vDomTop=0,this.vDomBottom=0,this.vDomScrollPosTop=0,this.vDomScrollPosBottom=0,this.vDomTopPad=0,this.vDomBottomPad=0,this.vDomMaxRenderChain=90,this.vDomWindowBuffer=0,this.vDomWindowMinTotalRows=20,this.vDomWindowMinMarginRows=5,this.vDomTopNewRows=[],this.vDomBottomNewRows=[]};RowManager.prototype.createHolderElement=function(){var t=document.createElement("div");return t.classList.add("tabulator-tableHolder"),t.setAttribute("tabindex",0),t},RowManager.prototype.createTableElement=function(){var t=document.createElement("div");return t.classList.add("tabulator-table"),t},RowManager.prototype.getElement=function(){return this.element},RowManager.prototype.getTableElement=function(){return this.tableElement},RowManager.prototype.getRowPosition=function(t,e){return e?this.activeRows.indexOf(t):this.rows.indexOf(t)},RowManager.prototype.setColumnManager=function(t){this.columnManager=t},RowManager.prototype.initialize=function(){var t=this;t.setRenderMode(),t.element.appendChild(t.tableElement),t.firstRender=!0,t.element.addEventListener("scroll",function(){var e=t.element.scrollLeft;t.scrollLeft!=e&&(t.columnManager.scrollHorizontal(e),t.table.options.groupBy&&t.table.modules.groupRows.scrollHeaders(e),t.table.modExists("columnCalcs")&&t.table.modules.columnCalcs.scrollHorizontal(e)),t.scrollLeft=e}),"virtual"===this.renderMode&&t.element.addEventListener("scroll",function(){var e=t.element.scrollTop,o=t.scrollTop>e;t.scrollTop!=e?(t.scrollTop=e,t.scrollVertical(o),"scroll"==t.table.options.ajaxProgressiveLoad&&t.table.modules.ajax.nextPage(t.element.scrollHeight-t.element.clientHeight-e)):t.scrollTop=e})},RowManager.prototype.findRow=function(t){var e=this;if("object"!=(void 0===t?"undefined":_typeof(t))){if(void 0===t||null===t)return!1;return e.rows.find(function(o){return o.data[e.table.options.index]==t})||!1}if(t instanceof Row)return t;if(t instanceof RowComponent)return t._getSelf()||!1;if(t instanceof HTMLElement){return e.rows.find(function(e){return e.element===t})||!1}return!1},RowManager.prototype.getRowFromPosition=function(t,e){return e?this.activeRows[t]:this.rows[t]},RowManager.prototype.scrollToRow=function(t,e,o){var i,n=this,l=this.getDisplayRows().indexOf(t),s=t.getElement(),a=0;return new Promise(function(t,r){if(l>-1){if(void 0===e&&(e=n.table.options.scrollToRowPosition),void 0===o&&(o=n.table.options.scrollToRowIfVisible),"nearest"===e)switch(n.renderMode){case"classic":i=Tabulator.prototype.helpers.elOffset(s).top,e=Math.abs(n.element.scrollTop-i)>Math.abs(n.element.scrollTop+n.element.clientHeight-i)?"bottom":"top";break;case"virtual":e=Math.abs(n.vDomTop-l)>Math.abs(n.vDomBottom-l)?"bottom":"top"}if(!o&&Tabulator.prototype.helpers.elVisible(s)&&(a=Tabulator.prototype.helpers.elOffset(s).top-Tabulator.prototype.helpers.elOffset(n.element).top)>0&&a-1&&this.activeRows.splice(o,1),e>-1&&this.rows.splice(e,1),this.setActiveRows(this.activeRows),this.displayRowIterator(function(e){var o=e.indexOf(t);o>-1&&e.splice(o,1)}),this.reRenderInPosition(),this.table.options.rowDeleted.call(this.table,t.getComponent()),this.table.options.dataEdited.call(this.table,this.getData()),this.table.options.groupBy&&this.table.modExists("groupRows")?this.table.modules.groupRows.updateGroupRows(!0):this.table.options.pagination&&this.table.modExists("page")?this.refreshActiveData(!1,!1,!0):this.table.options.pagination&&this.table.modExists("page")&&this.refreshActiveData("page")},RowManager.prototype.addRow=function(t,e,o,i){var n=this.addRowActual(t,e,o,i);return this.table.options.history&&this.table.modExists("history")&&this.table.modules.history.action("rowAdd",n,{data:t,pos:e,index:o}),n},RowManager.prototype.addRows=function(t,e,o){var i=this,n=this,l=0,s=[];return new Promise(function(a,r){e=i.findAddRowPos(e),Array.isArray(t)||(t=[t]),l=t.length-1,(void 0===o&&e||void 0!==o&&!e)&&t.reverse(),t.forEach(function(t,i){var l=n.addRow(t,e,o,!0);s.push(l)}),i.table.options.groupBy&&i.table.modExists("groupRows")?i.table.modules.groupRows.updateGroupRows(!0):i.table.options.pagination&&i.table.modExists("page")?i.refreshActiveData(!1,!1,!0):i.reRenderInPosition(), -i.table.modExists("columnCalcs")&&i.table.modules.columnCalcs.recalc(i.table.rowManager.activeRows),a(s)})},RowManager.prototype.findAddRowPos=function(t){return void 0===t&&(t=this.table.options.addRowPos),"pos"===t&&(t=!0),"bottom"===t&&(t=!1),t},RowManager.prototype.addRowActual=function(t,e,o,i){var n,l=t instanceof Row?t:new Row(t||{},this),s=this.findAddRowPos(e);if(!o&&this.table.options.pagination&&"page"==this.table.options.paginationAddRow&&(n=this.getDisplayRows(),s?n.length?o=n[0]:this.activeRows.length&&(o=this.activeRows[this.activeRows.length-1],s=!1):n.length&&(o=n[n.length-1],s=!(n.length1&&(!o||o&&-1==a.indexOf(o)?s?a[0]!==l&&(o=a[0],this._moveRowInArray(l.getGroup().rows,l,o,s)):a[a.length-1]!==l&&(o=a[a.length-1],this._moveRowInArray(l.getGroup().rows,l,o,s)):this._moveRowInArray(l.getGroup().rows,l,o,s))}if(o){var r=this.rows.indexOf(o),u=this.activeRows.indexOf(o);this.displayRowIterator(function(t){var e=t.indexOf(o);e>-1&&t.splice(s?e:e+1,0,l)}),u>-1&&this.activeRows.splice(s?u:u+1,0,l),r>-1&&this.rows.splice(s?r:r+1,0,l)}else s?(this.displayRowIterator(function(t){t.unshift(l)}),this.activeRows.unshift(l),this.rows.unshift(l)):(this.displayRowIterator(function(t){t.push(l)}),this.activeRows.push(l),this.rows.push(l));return this.setActiveRows(this.activeRows),this.table.options.rowAdded.call(this.table,l.getComponent()),this.table.options.dataEdited.call(this.table,this.getData()),i||this.reRenderInPosition(),l},RowManager.prototype.moveRow=function(t,e,o){this.table.options.history&&this.table.modExists("history")&&this.table.modules.history.action("rowMove",t,{pos:this.getRowPosition(t),to:e,after:o}),this.moveRowActual(t,e,o),this.table.options.rowMoved.call(this.table,t.getComponent())},RowManager.prototype.moveRowActual=function(t,e,o){var i=this;if(this._moveRowInArray(this.rows,t,e,o),this._moveRowInArray(this.activeRows,t,e,o),this.displayRowIterator(function(n){i._moveRowInArray(n,t,e,o)}),this.table.options.groupBy&&this.table.modExists("groupRows")){var n=e.getGroup(),l=t.getGroup();n===l?this._moveRowInArray(n.rows,t,e,o):(l&&l.removeRow(t),n.insertRow(t,e,o))}},RowManager.prototype._moveRowInArray=function(t,e,o,i){var n,l,s,a;if(e!==o&&(n=t.indexOf(e),n>-1&&(t.splice(n,1),l=t.indexOf(o),l>-1?i?t.splice(l+1,0,e):t.splice(l,0,e):t.splice(n,0,e)),t===this.getDisplayRows())){s=nn?l:n+1;for(var r=s;r<=a;r++)t[r]&&this.styleRow(t[r],r)}},RowManager.prototype.clearData=function(){this.setData([])},RowManager.prototype.getRowIndex=function(t){return this.findRowIndex(t,this.rows)},RowManager.prototype.getDisplayRowIndex=function(t){var e=this.getDisplayRows().indexOf(t);return e>-1&&e},RowManager.prototype.nextDisplayRow=function(t,e){var o=this.getDisplayRowIndex(t),i=!1;return!1!==o&&o-1)&&o},RowManager.prototype.getData=function(t,e){var o=this,i=[];return(t?o.activeRows:o.rows).forEach(function(t){i.push(t.getData(e||"data"))}),i},RowManager.prototype.getHtml=function(t){var e=this.getData(t),o=[],i="",n="";return this.table.columnManager.getColumns().forEach(function(t){var e=t.getDefinition();t.visible&&!e.hideInHtml&&(i+=""+(e.title||"")+"",o.push(t))}),e.forEach(function(t){var e="";o.forEach(function(o){var i=o.getFieldValue(t);void 0!==i&&null!==i||(i=":"),e+=""+i+""}),n+=""+e+""}),"\n\t\t\n\t\t"+i+"\n\t\t\n\t\t"+n+"\n\t\t
"},RowManager.prototype.getComponents=function(t){var e=this,o=[];return(t?e.activeRows:e.rows).forEach(function(t){o.push(t.getComponent())}),o},RowManager.prototype.getDataCount=function(t){return t?this.rows.length:this.activeRows.length},RowManager.prototype._genRemoteRequest=function(){var t=this,e=t.table,o=e.options,i={};if(e.modExists("page")){if(o.ajaxSorting){var n=t.table.modules.sort.getSort();n.forEach(function(t){delete t.column}),i[t.table.modules.page.paginationDataSentNames.sorters]=n}if(o.ajaxFiltering){var l=t.table.modules.filter.getFilters(!0,!0);i[t.table.modules.page.paginationDataSentNames.filters]=l}t.table.modules.ajax.setParams(i,!0)}e.modules.ajax.sendRequest().then(function(e){t.setData(e)}).catch(function(t){})},RowManager.prototype.filterRefresh=function(){var t=this.table,e=t.options,o=this.scrollLeft;e.ajaxFiltering?"remote"==e.pagination&&t.modExists("page")?(t.modules.page.reset(!0),t.modules.page.setPage(1)):e.ajaxProgressiveLoad?t.modules.ajax.loadData():this._genRemoteRequest():this.refreshActiveData("filter"),this.scrollHorizontal(o)},RowManager.prototype.sorterRefresh=function(){var t=this.table,e=this.table.options,o=this.scrollLeft;e.ajaxSorting?("remote"==e.pagination||e.progressiveLoad)&&t.modExists("page")?(t.modules.page.reset(!0),t.modules.page.setPage(1)):e.ajaxProgressiveLoad?t.modules.ajax.loadData():this._genRemoteRequest():this.refreshActiveData("sort"),this.scrollHorizontal(o)},RowManager.prototype.scrollHorizontal=function(t){this.scrollLeft=t,this.element.scrollLeft=t,this.table.options.groupBy&&this.table.modules.groupRows.scrollHeaders(t),this.table.modExists("columnCalcs")&&this.table.modules.columnCalcs.scrollHorizontal(t)},RowManager.prototype.refreshActiveData=function(t,e,o){var i,n=this,l=this.table;switch(t||(t="all"),l.options.selectable&&!l.options.selectablePersistence&&l.modExists("selectRow")&&l.modules.selectRow.deselectRows(),t){case"all":case"filter":e?e=!1:l.modExists("filter")?n.setActiveRows(l.modules.filter.filter(n.rows)):n.setActiveRows(n.rows.slice(0));case"sort":e?e=!1:l.modExists("sort")&&l.modules.sort.sort();case"display":this.resetDisplayRows();case"freeze":e?e=!1:this.table.modExists("frozenRows")&&l.modules.frozenRows.isFrozen()&&(l.modules.frozenRows.getDisplayIndex()||l.modules.frozenRows.setDisplayIndex(this.getNextDisplayIndex()),i=l.modules.frozenRows.getDisplayIndex(),!0!==(i=n.setDisplayRows(l.modules.frozenRows.getRows(this.getDisplayRows(i-1)),i))&&l.modules.frozenRows.setDisplayIndex(i));case"group":e?e=!1:l.options.groupBy&&l.modExists("groupRows")&&(l.modules.groupRows.getDisplayIndex()||l.modules.groupRows.setDisplayIndex(this.getNextDisplayIndex()),i=l.modules.groupRows.getDisplayIndex(),!0!==(i=n.setDisplayRows(l.modules.groupRows.getRows(this.getDisplayRows(i-1)),i))&&l.modules.groupRows.setDisplayIndex(i));case"tree":e?e=!1:l.options.dataTree&&l.modExists("dataTree")&&(l.modules.dataTree.getDisplayIndex()||l.modules.dataTree.setDisplayIndex(this.getNextDisplayIndex()),i=l.modules.dataTree.getDisplayIndex(),!0!==(i=n.setDisplayRows(l.modules.dataTree.getRows(this.getDisplayRows(i-1)),i))&&l.modules.dataTree.setDisplayIndex(i)),l.options.pagination&&l.modExists("page")&&!o&&"local"==l.modules.page.getMode()&&l.modules.page.reset();case"page":e?e=!1:l.options.pagination&&l.modExists("page")&&(l.modules.page.getDisplayIndex()||l.modules.page.setDisplayIndex(this.getNextDisplayIndex()),i=l.modules.page.getDisplayIndex(),"local"==l.modules.page.getMode()&&l.modules.page.setMaxRows(this.getDisplayRows(i-1).length),!0!==(i=n.setDisplayRows(l.modules.page.getRows(this.getDisplayRows(i-1)),i))&&l.modules.page.setDisplayIndex(i))}Tabulator.prototype.helpers.elVisible(n.element)&&(o?n.reRenderInPosition():(n.renderTable(),l.options.layoutColumnsOnNewData&&n.table.columnManager.redraw(!0))),l.modExists("columnCalcs")&&l.modules.columnCalcs.recalc(this.activeRows)},RowManager.prototype.setActiveRows=function(t){this.activeRows=t,this.activeRowsCount=this.activeRows.length},RowManager.prototype.resetDisplayRows=function(){this.displayRows=[],this.displayRows.push(this.activeRows.slice(0)),this.displayRowsCount=this.displayRows[0].length,this.table.modExists("frozenRows")&&this.table.modules.frozenRows.setDisplayIndex(0),this.table.options.groupBy&&this.table.modExists("groupRows")&&this.table.modules.groupRows.setDisplayIndex(0),this.table.options.pagination&&this.table.modExists("page")&&this.table.modules.page.setDisplayIndex(0)},RowManager.prototype.getNextDisplayIndex=function(){return this.displayRows.length},RowManager.prototype.setDisplayRows=function(t,e){var o=!0;return e&&void 0!==this.displayRows[e]?(this.displayRows[e]=t,o=!0):(this.displayRows.push(t),o=e=this.displayRows.length-1),e==this.displayRows.length-1&&(this.displayRowsCount=this.displayRows[this.displayRows.length-1].length),o},RowManager.prototype.getDisplayRows=function(t){return void 0===t?this.displayRows.length?this.displayRows[this.displayRows.length-1]:[]:this.displayRows[t]||[]},RowManager.prototype.displayRowIterator=function(t){this.displayRows.forEach(t),this.displayRowsCount=this.displayRows[this.displayRows.length-1].length},RowManager.prototype.getRows=function(){return this.rows},RowManager.prototype.reRenderInPosition=function(t){if("virtual"==this.getRenderMode()){for(var e=this.element.scrollTop,o=!1,i=!1,n=this.scrollLeft,l=this.getDisplayRows(),s=this.vDomTop;s<=this.vDomBottom;s++)if(l[s]){var a=e-l[s].getElement().offsetTop;if(!(!1===i||Math.abs(a)this.element.clientWidth?this.element.offsetHeight-this.element.clientHeight:0)),this.scrollTop=Math.min(this.scrollTop,this.element.scrollHeight-this.height),this.element.scrollWidth>this.element.offsetWidth&&(this.scrollTop+=this.element.offsetHeight-this.element.clientHeight),this.vDomScrollPosTop=this.scrollTop,this.vDomScrollPosBottom=this.scrollTop,l.scrollTop=this.scrollTop,n.style.minWidth=h?i.table.columnManager.getWidth()+"px":"",i.table.options.groupBy&&"fitDataFill"!=i.table.modules.layout.getMode()&&i.displayRowsCount==i.table.modules.groupRows.countGroups()&&(i.tableElement.style.minWidth=i.table.columnManager.getWidth())}else this.renderEmptyScroll()},RowManager.prototype.scrollVertical=function(t){var e=this.scrollTop-this.vDomScrollPosTop,o=this.scrollTop-this.vDomScrollPosBottom,i=2*this.vDomWindowBuffer;if(-e>i||o>i){var n=this.scrollLeft;this._virtualRenderFill(Math.floor(this.element.scrollTop/this.element.scrollHeight*this.displayRowsCount)),this.scrollHorizontal(n)}else t?(e<0&&this._addTopRow(-e),e<0&&this.vDomScrollHeight-this.scrollTop>this.vDomWindowBuffer&&this._removeBottomRow(-o)):(e>=0&&this.scrollTop>this.vDomWindowBuffer&&this._removeTopRow(e),o>=0&&this._addBottomRow(o))},RowManager.prototype._addTopRow=function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,o=this.tableElement,i=this.getDisplayRows();if(this.vDomTop){var n=this.vDomTop-1,l=i[n],s=l.getHeight()||this.vDomRowHeight;t>=s&&(this.styleRow(l,n),o.insertBefore(l.getElement(),o.firstChild),l.initialized&&l.heightInitialized||(this.vDomTopNewRows.push(l),l.heightInitialized||l.clearCellHeight()),l.initialize(),this.vDomTopPad-=s,this.vDomTopPad<0&&(this.vDomTopPad=n*this.vDomRowHeight),n||(this.vDomTopPad=0),o.style.paddingTop=this.vDomTopPad+"px",this.vDomScrollPosTop-=s,this.vDomTop--),t=-(this.scrollTop-this.vDomScrollPosTop),e=(i[this.vDomTop-1].getHeight()||this.vDomRowHeight)?this._addTopRow(t,e+1):this._quickNormalizeRowHeight(this.vDomTopNewRows)}},RowManager.prototype._removeTopRow=function(t){var e=this.tableElement,o=this.getDisplayRows()[this.vDomTop],i=o.getHeight()||this.vDomRowHeight;if(t>=i){var n=o.getElement();n.parentNode.removeChild(n),this.vDomTopPad+=i,e.style.paddingTop=this.vDomTopPad+"px",this.vDomScrollPosTop+=this.vDomTop?i:i+this.vDomWindowBuffer,this.vDomTop++,t=this.scrollTop-this.vDomScrollPosTop,this._removeTopRow(t)}},RowManager.prototype._addBottomRow=function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,o=this.tableElement,i=this.getDisplayRows();if(this.vDomBottom=s&&(this.styleRow(l,n),o.appendChild(l.getElement()),l.initialized&&l.heightInitialized||(this.vDomBottomNewRows.push(l),l.heightInitialized||l.clearCellHeight()),l.initialize(),this.vDomBottomPad-=s,(this.vDomBottomPad<0||n==this.displayRowsCount-1)&&(this.vDomBottomPad=0),o.style.paddingBottom=this.vDomBottomPad+"px",this.vDomScrollPosBottom+=s,this.vDomBottom++),t=this.scrollTop-this.vDomScrollPosBottom,e=(i[this.vDomBottom+1].getHeight()||this.vDomRowHeight)?this._addBottomRow(t,e+1):this._quickNormalizeRowHeight(this.vDomBottomNewRows)}},RowManager.prototype._removeBottomRow=function(t){var e=this.tableElement,o=this.getDisplayRows()[this.vDomBottom],i=o.getHeight()||this.vDomRowHeight;if(t>=i){var n=o.getElement();n.parentNode&&n.parentNode.removeChild(n),this.vDomBottomPad+=i,this.vDomBottomPad<0&&(this.vDomBottomPad=0),e.style.paddingBottom=this.vDomBottomPad+"px",this.vDomScrollPosBottom-=i,this.vDomBottom--,t=-(this.scrollTop-this.vDomScrollPosBottom),this._removeBottomRow(t)}},RowManager.prototype._quickNormalizeRowHeight=function(t){t.forEach(function(t){t.calcHeight()}),t.forEach(function(t){t.setCellHeight()}),t.length=0},RowManager.prototype.normalizeHeight=function(){this.activeRows.forEach(function(t){t.normalizeHeight()})},RowManager.prototype.adjustTableSize=function(){if("virtual"===this.renderMode){this.height=this.element.clientHeight,this.vDomWindowBuffer=this.table.options.virtualDomBuffer||this.height;var t=this.columnManager.getElement().offsetHeight+(this.table.footerManager&&!this.table.footerManager.external?this.table.footerManager.getElement().offsetHeight:0);this.element.style.minHeight="calc(100% - "+t+"px)",this.element.style.height="calc(100% - "+t+"px)",this.element.style.maxHeight="calc(100% - "+t+"px)"}},RowManager.prototype.reinitialize=function(){this.rows.forEach(function(t){t.reinitialize()})},RowManager.prototype.redraw=function(t){var e=this.scrollLeft;this.adjustTableSize(),t?this.renderTable():("classic"==self.renderMode?self.table.options.groupBy?self.refreshActiveData("group",!1,!1):this._simpleRender():(this.reRenderInPosition(),this.scrollHorizontal(e)),this.displayRowsCount||this.table.options.placeholder&&this.getElement().appendChild(this.table.options.placeholder))},RowManager.prototype.resetScroll=function(){if(this.element.scrollLeft=0,this.element.scrollTop=0,"ie"===this.table.browser){var t=document.createEvent("Event");t.initEvent("scroll",!1,!0),this.element.dispatchEvent(t)}else this.element.dispatchEvent(new Event("scroll"))};var RowComponent=function(t){this._row=t};RowComponent.prototype.getData=function(t){return this._row.getData(t)},RowComponent.prototype.getElement=function(){return this._row.getElement()},RowComponent.prototype.getCells=function(){var t=[];return this._row.getCells().forEach(function(e){t.push(e.getComponent())}),t},RowComponent.prototype.getCell=function(t){var e=this._row.getCell(t);return!!e&&e.getComponent()},RowComponent.prototype.getIndex=function(){return this._row.getData("data")[this._row.table.options.index]},RowComponent.prototype.getPosition=function(t){return this._row.table.rowManager.getRowPosition(this._row,t)},RowComponent.prototype.delete=function(){return this._row.delete()},RowComponent.prototype.scrollTo=function(){return this._row.table.rowManager.scrollToRow(this._row)},RowComponent.prototype.update=function(t){return this._row.updateData(t)},RowComponent.prototype.normalizeHeight=function(){this._row.normalizeHeight(!0)},RowComponent.prototype.select=function(){this._row.table.modules.selectRow.selectRows(this._row)},RowComponent.prototype.deselect=function(){this._row.table.modules.selectRow.deselectRows(this._row)},RowComponent.prototype.toggleSelect=function(){this._row.table.modules.selectRow.toggleRow(this._row)},RowComponent.prototype.isSelected=function(){return this._row.table.modules.selectRow.isRowSelected(this._row)},RowComponent.prototype._getSelf=function(){return this._row},RowComponent.prototype.freeze=function(){this._row.table.modExists("frozenRows",!0)&&this._row.table.modules.frozenRows.freezeRow(this._row)},RowComponent.prototype.unfreeze=function(){this._row.table.modExists("frozenRows",!0)&&this._row.table.modules.frozenRows.unfreezeRow(this._row)},RowComponent.prototype.treeCollapse=function(){this._row.table.modExists("dataTree",!0)&&this._row.table.modules.dataTree.collapseRow(this._row)},RowComponent.prototype.treeExpand=function(){this._row.table.modExists("dataTree",!0)&&this._row.table.modules.dataTree.expandRow(this._row)},RowComponent.prototype.treeToggle=function(){this._row.table.modExists("dataTree",!0)&&this._row.table.modules.dataTree.toggleRow(this._row)},RowComponent.prototype.getTreeParent=function(){return!!this._row.table.modExists("dataTree",!0)&&this._row.table.modules.dataTree.getTreeParent(this._row)},RowComponent.prototype.getTreeChildren=function(){return!!this._row.table.modExists("dataTree",!0)&&this._row.table.modules.dataTree.getTreeChildren(this._row)},RowComponent.prototype.reformat=function(){return this._row.reinitialize()},RowComponent.prototype.getGroup=function(){return this._row.getGroup().getComponent()},RowComponent.prototype.getTable=function(){return this._row.table},RowComponent.prototype.getNextRow=function(){return this._row.nextRow()},RowComponent.prototype.getPrevRow=function(){return this._row.prevRow()};var Row=function(t,e){this.table=e.table,this.parent=e,this.data={},this.type="row",this.element=this.createElement(),this.modules={},this.cells=[],this.height=0,this.outerHeight=0,this.initialized=!1,this.heightInitialized=!1,this.setData(t),this.generateElement()};Row.prototype.createElement=function(){var t=document.createElement("div");return t.classList.add("tabulator-row"),t.setAttribute("role","row"),t},Row.prototype.getElement=function(){return this.element},Row.prototype.generateElement=function(){var t,e,o,i=this;!1!==i.table.options.selectable&&i.table.modExists("selectRow")&&i.table.modules.selectRow.initializeRow(this),!1!==i.table.options.movableRows&&i.table.modExists("moveRow")&&i.table.modules.moveRow.initializeRow(this),!1!==i.table.options.dataTree&&i.table.modExists("dataTree")&&i.table.modules.dataTree.initializeRow(this),i.table.options.rowClick&&i.element.addEventListener("click",function(t){i.table.options.rowClick(t,i.getComponent())}),i.table.options.rowDblClick&&i.element.addEventListener("dblclick",function(t){i.table.options.rowDblClick(t,i.getComponent())}),i.table.options.rowContext&&i.element.addEventListener("contextmenu",function(t){i.table.options.rowContext(t,i.getComponent())}),i.table.options.rowTap&&(o=!1,i.element.addEventListener("touchstart",function(t){o=!0}),i.element.addEventListener("touchend",function(t){o&&i.table.options.rowTap(t,i.getComponent()),o=!1})),i.table.options.rowDblTap&&(t=null,i.element.addEventListener("touchend",function(e){t?(clearTimeout(t),t=null,i.table.options.rowDblTap(e,i.getComponent())):t=setTimeout(function(){clearTimeout(t),t=null},300)})),i.table.options.rowTapHold&&(e=null,i.element.addEventListener("touchstart",function(t){clearTimeout(e),e=setTimeout(function(){clearTimeout(e),e=null,o=!1,i.table.options.rowTapHold(t,i.getComponent())},1e3)}),i.element.addEventListener("touchend",function(t){clearTimeout(e),e=null}))},Row.prototype.generateCells=function(){this.cells=this.table.columnManager.generateCells(this)},Row.prototype.initialize=function(t){var e=this;if(!e.initialized||t){for(e.deleteCells();e.element.firstChild;)e.element.removeChild(e.element.firstChild);this.table.modExists("frozenColumns")&&this.table.modules.frozenColumns.layoutRow(this),this.generateCells(),e.cells.forEach(function(t){e.element.appendChild(t.getElement()),t.cellRendered()}),t&&e.normalizeHeight(),e.table.options.dataTree&&e.table.modExists("dataTree")&&e.table.modules.dataTree.layoutRow(this),"collapse"===e.table.options.responsiveLayout&&e.table.modExists("responsiveLayout")&&e.table.modules.responsiveLayout.layoutRow(this),e.table.options.rowFormatter&&e.table.options.rowFormatter(e.getComponent()),e.table.options.resizableRows&&e.table.modExists("resizeRows")&&e.table.modules.resizeRows.initializeRow(e),e.initialized=!0}},Row.prototype.reinitializeHeight=function(){this.heightInitialized=!1,null!==this.element.offsetParent&&this.normalizeHeight(!0)},Row.prototype.reinitialize=function(){this.initialized=!1,this.heightInitialized=!1,this.height=0,null!==this.element.offsetParent&&this.initialize(!0)},Row.prototype.calcHeight=function(){var t=0,e=this.table.options.resizableRows?this.element.clientHeight:0;this.cells.forEach(function(e){var o=e.getHeight();o>t&&(t=o)}),this.height=Math.max(t,e),this.outerHeight=this.element.offsetHeight},Row.prototype.setCellHeight=function(){var t=this.height;this.cells.forEach(function(e){e.setHeight(t)}),this.heightInitialized=!0},Row.prototype.clearCellHeight=function(){this.cells.forEach(function(t){t.clearHeight()})},Row.prototype.normalizeHeight=function(t){t&&this.clearCellHeight(),this.calcHeight(),this.setCellHeight()},Row.prototype.setHeight=function(t){this.height=t,this.setCellHeight()},Row.prototype.setHeight=function(t,e){(this.height!=t||e)&&(this.height=t,this.setCellHeight(),this.outerHeight=this.element.offsetHeight)},Row.prototype.getHeight=function(){return this.outerHeight},Row.prototype.getWidth=function(){return this.element.offsetWidth},Row.prototype.deleteCell=function(t){var e=this.cells.indexOf(t);e>-1&&this.cells.splice(e,1)},Row.prototype.setData=function(t){var e=this;e.table.modExists("mutator")?e.data=e.table.modules.mutator.transformRow(t,"data"):e.data=t},Row.prototype.updateData=function(t){var e=this,o=this;return new Promise(function(i,n){"string"==typeof t&&(t=JSON.parse(t)),o.table.modExists("mutator")&&(t=o.table.modules.mutator.transformRow(t,"data",!0));for(var l in t)o.data[l]=t[l];for(var l in t){var s=e.getCell(l);s&&s.getValue()!=t[l]&&s.setValueProcessData(t[l])}Tabulator.prototype.helpers.elVisible(e.element)?(o.normalizeHeight(),o.table.options.rowFormatter&&o.table.options.rowFormatter(o.getComponent())):(e.initialized=!1,e.height=0),o.table.options.rowUpdated.call(e.table,o.getComponent()),i()})},Row.prototype.getData=function(t){var e=this;return t?e.table.modExists("accessor")?e.table.modules.accessor.transformRow(e.data,t):void 0:this.data},Row.prototype.getCell=function(t){return t=this.table.columnManager.findColumn(t),this.cells.find(function(e){return e.column===t})},Row.prototype.getCellIndex=function(t){return this.cells.findIndex(function(e){return e===t})},Row.prototype.findNextEditableCell=function(t){var e=!1;if(t0)for(var o=t-1;o>=0;o--){var i=this.cells[o],n=!0;if(i.column.modules.edit&&Tabulator.prototype.helpers.elVisible(i.getElement())&&("function"==typeof i.column.modules.edit.check&&(n=i.column.modules.edit.check(i.getComponent())),n)){e=i;break}}return e},Row.prototype.getCells=function(){return this.cells},Row.prototype.nextRow=function(){var t=this.table.rowManager.nextDisplayRow(this,!0);return!!t&&t.getComponent()},Row.prototype.prevRow=function(){var t=this.table.rowManager.prevDisplayRow(this,!0);return!!t&&t.getComponent()},Row.prototype.delete=function(){var t=this;return new Promise(function(e,o){var i=t.table.rowManager.getRowIndex(t);t.deleteActual(),t.table.options.history&&t.table.modExists("history")&&(i&&(i=t.table.rowManager.rows[i-1]),t.table.modules.history.action("rowDelete",t,{data:t.getData(),pos:!i,index:i})),e()})},Row.prototype.deleteActual=function(){this.table.rowManager.getRowIndex(this);this.table.modExists("selectRow")&&this.table.modules.selectRow._deselectRow(this,!0),this.table.rowManager.deleteRow(this),this.deleteCells(),this.initialized=!1,this.heightInitialized=!1,this.modules.group&&this.modules.group.removeRow(this),this.table.modExists("columnCalcs")&&(this.table.options.groupBy&&this.table.modExists("groupRows")?this.table.modules.columnCalcs.recalcRowGroup(this):this.table.modules.columnCalcs.recalc(this.table.rowManager.activeRows))},Row.prototype.deleteCells=function(){for(var t=this.cells.length,e=0;e-1?(this.browser="ie",this.browserSlow=!0):t.indexOf("Edge")>-1?(this.browser="edge",this.browserSlow=!0):t.indexOf("Firefox")>-1?(this.browser="firefox",this.browserSlow=!1):(this.browser="other",this.browserSlow=!1)},Tabulator.prototype.setData=function(t,e,o){return this.modExists("ajax")&&this.modules.ajax.blockActiveRequest(),this._setData(t,e,o)},Tabulator.prototype._setData=function(t,e,o,i){var n=this;return"string"!=typeof t?t?n.rowManager.setData(t,i):n.modExists("ajax")&&(n.modules.ajax.getUrl||n.options.ajaxURLGenerator)?"remote"==n.options.pagination&&n.modExists("page",!0)?(n.modules.page.reset(!0),n.modules.page.setPage(1)):n.modules.ajax.loadData(i):n.rowManager.setData([],i):0==t.indexOf("{")||0==t.indexOf("[")?n.rowManager.setData(JSON.parse(t),i):n.modExists("ajax",!0)?(e&&n.modules.ajax.setParams(e),o&&n.modules.ajax.setConfig(o),n.modules.ajax.setUrl(t),"remote"==n.options.pagination&&n.modExists("page",!0)?(n.modules.page.reset(!0),n.modules.page.setPage(1)):n.modules.ajax.loadData(i)):void 0},Tabulator.prototype.clearData=function(){this.modExists("ajax")&&this.modules.ajax.blockActiveRequest(),this.rowManager.clearData()},Tabulator.prototype.getData=function(t){return this.rowManager.getData(t)},Tabulator.prototype.getDataCount=function(t){return this.rowManager.getDataCount(t)},Tabulator.prototype.searchRows=function(t,e,o){if(this.modExists("filter",!0))return this.modules.filter.search("rows",t,e,o)},Tabulator.prototype.searchData=function(t,e,o){if(this.modExists("filter",!0))return this.modules.filter.search("data",t,e,o)},Tabulator.prototype.getHtml=function(t){return this.rowManager.getHtml(t)},Tabulator.prototype.getAjaxUrl=function(){if(this.modExists("ajax",!0))return this.modules.ajax.getUrl()},Tabulator.prototype.replaceData=function(t,e,o){return this.modExists("ajax")&&this.modules.ajax.blockActiveRequest(),this._setData(t,e,o,!0)},Tabulator.prototype.updateData=function(t){var e=this,o=this,i=0;return new Promise(function(n,l){e.modExists("ajax")&&e.modules.ajax.blockActiveRequest(),"string"==typeof t&&(t=JSON.parse(t)),t?t.forEach(function(t){var e=o.rowManager.findRow(t[o.options.index]);e&&(i++,e.updateData(t).then(function(){--i||n()}))}):(console.warn("Update Error - No data provided"),l("Update Error - No data provided"))})},Tabulator.prototype.addData=function(t,e,o){var i=this;return new Promise(function(n,l){i.modExists("ajax")&&i.modules.ajax.blockActiveRequest(),"string"==typeof t&&(t=JSON.parse(t)),t?i.rowManager.addRows(t,e,o).then(function(t){var e=[];t.forEach(function(t){e.push(t.getComponent())}),n(e)}):(console.warn("Update Error - No data provided"),l("Update Error - No data provided"))})},Tabulator.prototype.updateOrAddData=function(t){var e=this,o=this,i=[],n=0;return new Promise(function(l,s){e.modExists("ajax")&&e.modules.ajax.blockActiveRequest(),"string"==typeof t&&(t=JSON.parse(t)),t?t.forEach(function(t){var e=o.rowManager.findRow(t[o.options.index]);n++,e?e.updateData(t).then(function(){n--,i.push(e.getComponent()),n||l(i)}):o.rowManager.addRows(t).then(function(t){n--,i.push(t[0].getComponent()),n||l(i)})}):(console.warn("Update Error - No data provided"),s("Update Error - No data provided"))})},Tabulator.prototype.getRow=function(t){var e=this.rowManager.findRow(t);return e?e.getComponent():(console.warn("Find Error - No matching row found:",t),!1)},Tabulator.prototype.getRowFromPosition=function(t,e){var o=this.rowManager.getRowFromPosition(t,e);return o?o.getComponent():(console.warn("Find Error - No matching row found:",t),!1)},Tabulator.prototype.deleteRow=function(t){var e=this;return new Promise(function(o,i){var n=e.rowManager.findRow(t);n?n.delete().then(function(){o()}).catch(function(t){i(t)}):(console.warn("Delete Error - No matching row found:",t),i("Delete Error - No matching row found"))})},Tabulator.prototype.addRow=function(t,e,o){var i=this;return new Promise(function(n,l){"string"==typeof t&&(t=JSON.parse(t)),i.rowManager.addRows(t,e,o).then(function(t){i.modExists("columnCalcs")&&i.modules.columnCalcs.recalc(i.rowManager.activeRows),n(t[0].getComponent())})})},Tabulator.prototype.updateOrAddRow=function(t,e){var o=this;return new Promise(function(i,n){var l=o.rowManager.findRow(t);"string"==typeof e&&(e=JSON.parse(e)),l?l.updateData(e).then(function(){o.modExists("columnCalcs")&&o.modules.columnCalcs.recalc(o.rowManager.activeRows),i(l.getComponent())}).catch(function(t){n(t)}):l=o.rowManager.addRows(e).then(function(t){o.modExists("columnCalcs")&&o.modules.columnCalcs.recalc(o.rowManager.activeRows),i(t[0].getComponent())}).catch(function(t){n(t)})})},Tabulator.prototype.updateRow=function(t,e){var o=this;return new Promise(function(i,n){var l=o.rowManager.findRow(t);"string"==typeof e&&(e=JSON.parse(e)),l?l.updateData(e).then(function(){i(l.getComponent())}).catch(function(t){n(t)}):(console.warn("Update Error - No matching row found:",t),n("Update Error - No matching row found"))})},Tabulator.prototype.scrollToRow=function(t,e,o){var i=this;return new Promise(function(n,l){var s=i.rowManager.findRow(t);s?i.rowManager.scrollToRow(s,e,o).then(function(){n()}).catch(function(t){l(t)}):(console.warn("Scroll Error - No matching row found:",t),l("Scroll Error - No matching row found"))})},Tabulator.prototype.getRows=function(t){return this.rowManager.getComponents(t)},Tabulator.prototype.getRowPosition=function(t,e){var o=this.rowManager.findRow(t);return o?this.rowManager.getRowPosition(o,e):(console.warn("Position Error - No matching row found:",t),!1)},Tabulator.prototype.copyToClipboard=function(t,e,o,i){this.modExists("clipboard",!0)&&this.modules.clipboard.copy(t,e,o,i)},Tabulator.prototype.setColumns=function(t){this.columnManager.setColumns(t)},Tabulator.prototype.getColumns=function(t){return this.columnManager.getComponents(t)},Tabulator.prototype.getColumn=function(t){var e=this.columnManager.findColumn(t);return e?e.getComponent():(console.warn("Find Error - No matching column found:",t),!1)},Tabulator.prototype.getColumnDefinitions=function(){return this.columnManager.getDefinitionTree()},Tabulator.prototype.getColumnLayout=function(){if(this.modExists("persistence",!0))return this.modules.persistence.parseColumns(this.columnManager.getColumns())},Tabulator.prototype.setColumnLayout=function(t){return!!this.modExists("persistence",!0)&&(this.columnManager.setColumns(this.modules.persistence.mergeDefinition(this.options.columns,t)),!0)},Tabulator.prototype.showColumn=function(t){var e=this.columnManager.findColumn(t);if(!e)return console.warn("Column Show Error - No matching column found:",t),!1;e.show(),this.options.responsiveLayout&&this.modExists("responsiveLayout",!0)&&this.modules.responsiveLayout.update()},Tabulator.prototype.hideColumn=function(t){var e=this.columnManager.findColumn(t);if(!e)return console.warn("Column Hide Error - No matching column found:",t),!1;e.hide(),this.options.responsiveLayout&&this.modExists("responsiveLayout",!0)&&this.modules.responsiveLayout.update()},Tabulator.prototype.toggleColumn=function(t){var e=this.columnManager.findColumn(t);if(!e)return console.warn("Column Visibility Toggle Error - No matching column found:",t),!1;e.visible?e.hide():e.show()},Tabulator.prototype.addColumn=function(t,e,o){var i=this.columnManager.findColumn(o);this.columnManager.addColumn(t,e,i)},Tabulator.prototype.deleteColumn=function(t){var e=this.columnManager.findColumn(t);if(!e)return console.warn("Column Delete Error - No matching column found:",t),!1;e.delete()},Tabulator.prototype.scrollToColumn=function(t,e,o){var i=this;return new Promise(function(n,l){var s=i.columnManager.findColumn(t);s?i.columnManager.scrollToColumn(s,e,o).then(function(){n()}).catch(function(t){l(t)}):(console.warn("Scroll Error - No matching column found:",t),l("Scroll Error - No matching column found"))})},Tabulator.prototype.setLocale=function(t){this.modules.localize.setLocale(t)},Tabulator.prototype.getLocale=function(){return this.modules.localize.getLocale()},Tabulator.prototype.getLang=function(t){return this.modules.localize.getLang(t)},Tabulator.prototype.redraw=function(t){this.columnManager.redraw(t),this.rowManager.redraw(t)},Tabulator.prototype.setHeight=function(t){this.options.height=isNaN(t)?t:t+"px",this.element.style.height=this.options.height,this.rowManager.redraw()},Tabulator.prototype.setSort=function(t,e){this.modExists("sort",!0)&&(this.modules.sort.setSort(t,e),this.rowManager.sorterRefresh())},Tabulator.prototype.getSorters=function(){if(this.modExists("sort",!0))return this.modules.sort.getSort()},Tabulator.prototype.clearSort=function(){this.modExists("sort",!0)&&(this.modules.sort.clear(),this.rowManager.sorterRefresh())},Tabulator.prototype.setFilter=function(t,e,o){this.modExists("filter",!0)&&(this.modules.filter.setFilter(t,e,o),this.rowManager.filterRefresh())},Tabulator.prototype.addFilter=function(t,e,o){this.modExists("filter",!0)&&(this.modules.filter.addFilter(t,e,o),this.rowManager.filterRefresh())},Tabulator.prototype.getFilters=function(t){if(this.modExists("filter",!0))return this.modules.filter.getFilters(t)},Tabulator.prototype.setHeaderFilterFocus=function(t){if(this.modExists("filter",!0)){var e=this.columnManager.findColumn(t);if(!e)return console.warn("Column Filter Focus Error - No matching column found:",t),!1;this.modules.filter.setHeaderFilterFocus(e)}},Tabulator.prototype.setHeaderFilterValue=function(t,e){if(this.modExists("filter",!0)){var o=this.columnManager.findColumn(t);if(!o)return console.warn("Column Filter Error - No matching column found:",t),!1;this.modules.filter.setHeaderFilterValue(o,e)}},Tabulator.prototype.getHeaderFilters=function(){if(this.modExists("filter",!0))return this.modules.filter.getHeaderFilters()},Tabulator.prototype.removeFilter=function(t,e,o){this.modExists("filter",!0)&&(this.modules.filter.removeFilter(t,e,o),this.rowManager.filterRefresh())},Tabulator.prototype.clearFilter=function(t){this.modExists("filter",!0)&&(this.modules.filter.clearFilter(t),this.rowManager.filterRefresh())},Tabulator.prototype.clearHeaderFilter=function(){this.modExists("filter",!0)&&(this.modules.filter.clearHeaderFilter(),this.rowManager.filterRefresh())},Tabulator.prototype.selectRow=function(t){this.modExists("selectRow",!0)&&this.modules.selectRow.selectRows(t)},Tabulator.prototype.deselectRow=function(t){this.modExists("selectRow",!0)&&this.modules.selectRow.deselectRows(t)},Tabulator.prototype.toggleSelectRow=function(t){this.modExists("selectRow",!0)&&this.modules.selectRow.toggleRow(t)},Tabulator.prototype.getSelectedRows=function(){if(this.modExists("selectRow",!0))return this.modules.selectRow.getSelectedRows()},Tabulator.prototype.getSelectedData=function(){if(this.modExists("selectRow",!0))return this.modules.selectRow.getSelectedData()},Tabulator.prototype.setMaxPage=function(t){if(!this.options.pagination||!this.modExists("page"))return!1;this.modules.page.setMaxPage(t)},Tabulator.prototype.setPage=function(t){if(!this.options.pagination||!this.modExists("page"))return!1;this.modules.page.setPage(t)},Tabulator.prototype.setPageSize=function(t){if(!this.options.pagination||!this.modExists("page"))return!1;this.modules.page.setPageSize(t),this.modules.page.setPage(1)},Tabulator.prototype.getPageSize=function(){if(this.options.pagination&&this.modExists("page",!0))return this.modules.page.getPageSize()},Tabulator.prototype.previousPage=function(){if(!this.options.pagination||!this.modExists("page"))return!1;this.modules.page.previousPage()},Tabulator.prototype.nextPage=function(){if(!this.options.pagination||!this.modExists("page"))return!1;this.modules.page.nextPage()},Tabulator.prototype.getPage=function(){return!(!this.options.pagination||!this.modExists("page"))&&this.modules.page.getPage()},Tabulator.prototype.getPageMax=function(){return!(!this.options.pagination||!this.modExists("page"))&&this.modules.page.getPageMax()},Tabulator.prototype.setGroupBy=function(t){if(!this.modExists("groupRows",!0))return!1;this.options.groupBy=t,this.modules.groupRows.initialize(),this.rowManager.refreshActiveData("display")},Tabulator.prototype.setGroupStartOpen=function(t){if(!this.modExists("groupRows",!0))return!1;this.options.groupStartOpen=t,this.modules.groupRows.initialize(),this.options.groupBy?this.rowManager.refreshActiveData("group"):console.warn("Grouping Update - cant refresh view, no groups have been set")},Tabulator.prototype.setGroupHeader=function(t){if(!this.modExists("groupRows",!0))return!1;this.options.groupHeader=t,this.modules.groupRows.initialize(),this.options.groupBy?this.rowManager.refreshActiveData("group"):console.warn("Grouping Update - cant refresh view, no groups have been set")},Tabulator.prototype.getGroups=function(t){return!!this.modExists("groupRows",!0)&&this.modules.groupRows.getGroups(!0)},Tabulator.prototype.getGroupedData=function(){if(this.modExists("groupRows",!0))return this.options.groupBy?this.modules.groupRows.getGroupedData():this.getData()},Tabulator.prototype.getCalcResults=function(){return!!this.modExists("columnCalcs",!0)&&this.modules.columnCalcs.getResults()},Tabulator.prototype.navigatePrev=function(){var t=!1;return!(!this.modExists("edit",!0)||!(t=this.modules.edit.currentCell))&&(e.preventDefault(),t.nav().prev())},Tabulator.prototype.navigateNext=function(){var t=!1;return!(!this.modExists("edit",!0)||!(t=this.modules.edit.currentCell))&&(e.preventDefault(),t.nav().next())},Tabulator.prototype.navigateLeft=function(){var t=!1;return!(!this.modExists("edit",!0)||!(t=this.modules.edit.currentCell))&&(e.preventDefault(),t.nav().left())},Tabulator.prototype.navigateRight=function(){var t=!1;return!(!this.modExists("edit",!0)||!(t=this.modules.edit.currentCell))&&(e.preventDefault(),t.nav().right())},Tabulator.prototype.navigateUp=function(){var t=!1;return!(!this.modExists("edit",!0)||!(t=this.modules.edit.currentCell))&&(e.preventDefault(),t.nav().up())},Tabulator.prototype.navigateDown=function(){var t=!1;return!(!this.modExists("edit",!0)||!(t=this.modules.edit.currentCell))&&(e.preventDefault(),t.nav().dpwn())},Tabulator.prototype.undo=function(){return!(!this.options.history||!this.modExists("history",!0))&&this.modules.history.undo()},Tabulator.prototype.redo=function(){return!(!this.options.history||!this.modExists("history",!0))&&this.modules.history.redo()},Tabulator.prototype.getHistoryUndoSize=function(){return!(!this.options.history||!this.modExists("history",!0))&&this.modules.history.getHistoryUndoSize()},Tabulator.prototype.getHistoryRedoSize=function(){return!(!this.options.history||!this.modExists("history",!0))&&this.modules.history.getHistoryRedoSize()},Tabulator.prototype.download=function(t,e,o){this.modExists("download",!0)&&this.modules.download.download(t,e,o)},Tabulator.prototype.tableComms=function(t,e,o,i){this.modules.comms.receive(t,e,o,i)},Tabulator.prototype.moduleBindings={},Tabulator.prototype.extendModule=function(t,e,o){if(Tabulator.prototype.moduleBindings[t]){var i=Tabulator.prototype.moduleBindings[t].prototype[e];if(i)if("object"==(void 0===o?"undefined":_typeof(o)))for(var n in o)i[n]=o[n];else console.warn("Module Error - Invalid value type, it must be an object");else console.warn("Module Error - property does not exist:",e)}else console.warn("Module Error - module does not exist:",t)},Tabulator.prototype.registerModule=function(t,e){Tabulator.prototype.moduleBindings[t]=e},Tabulator.prototype.bindModules=function(){this.modules={};for(var t in Tabulator.prototype.moduleBindings)this.modules[t]=new Tabulator.prototype.moduleBindings[t](this)},Tabulator.prototype.modExists=function(t,e){return!!this.modules[t]||(e&&console.error("Tabulator Module Not Installed: "+t),!1)},Tabulator.prototype.helpers={elVisible:function(t){return!(t.offsetWidth<=0&&t.offsetHeight<=0)},elOffset:function(t){ -var e=t.getBoundingClientRect();return{top:e.top+window.pageYOffset-document.documentElement.clientTop,left:e.left+window.pageXOffset-document.documentElement.clientLeft}},deepClone:function(t){var e=Array.isArray(t)?[]:{};for(var o in t)null!=t[o]&&"object"===_typeof(t[o])?t[o]instanceof Date?e[o]=new Date(t[o]):e[o]=this.deepClone(t[o]):e[o]=t[o];return e}},Tabulator.prototype.comms={tables:[],register:function(t){Tabulator.prototype.comms.tables.push(t)},deregister:function(t){var e=Tabulator.prototype.comms.tables.indexOf(t);e>-1&&Tabulator.prototype.comms.tables.splice(e,1)},lookupTable:function(t){var e,o,i=[];if("string"==typeof t){if(e=document.querySelectorAll(t),e.length)for(var n=0;n-1?n/100*parseInt(t):parseInt(t):t}function o(t,i,n,l){function s(t){return n*(t.column.definition.widthGrow||1)}function a(t){return e(t.width)-n*(t.column.definition.widthShrink||0)}var r=[],u=0,h=0,c=0,p=0,d=0,m=[];return t.forEach(function(t,e){var o=l?a(t):s(t);t.column.minWidth>=o?r.push(t):(m.push(t),d+=l?t.column.definition.widthShrink||1:t.column.definition.widthGrow||1)}),r.length?(r.forEach(function(t){u+=l?t.width-t.column.minWidth:t.column.minWidth,t.width=t.column.minWidth}),h=i-u,c=d?Math.floor(h/d):h,p=h-c*d,p+=o(m,h,c,l)):(p=d?i-Math.floor(i/d)*d:i,m.forEach(function(t){t.width=l?a(t):s(t)})),p}var i=this,n=i.table.element.clientWidth,l=0,s=0,a=0,r=0,u=[],h=[],c=0,p=0,d=0;this.table.options.responsiveLayout&&this.table.modExists("responsiveLayout",!0)&&this.table.modules.responsiveLayout.update(),this.table.rowManager.element.scrollHeight>this.table.rowManager.element.clientHeight&&(n-=this.table.rowManager.element.offsetWidth-this.table.rowManager.element.clientWidth),t.forEach(function(t){var o,i,n;t.visible&&(o=t.definition.width,i=parseInt(t.minWidth),o?(n=e(o),l+=n>i?n:i,t.definition.widthShrink&&(h.push({column:t,width:n>i?n:i}),c+=t.definition.widthShrink)):(u.push({column:t,width:0}),a+=t.definition.widthGrow||1))}),s=n-l,r=Math.floor(s/a);var d=o(u,s,r,!1);u.length&&d>0&&(u[u.length-1].width+=+d),u.forEach(function(t){s-=t.width}),p=Math.abs(d)+s,p>0&&c&&(d=o(h,p,Math.floor(p/c),!0)),h.length&&(h[h.length-1].width-=d),u.forEach(function(t){t.column.setWidth(t.width)}),h.forEach(function(t){t.column.setWidth(t.width)})}},Tabulator.prototype.registerModule("layout",Layout);var Localize=function(t){this.table=t,this.locale="default",this.lang=!1,this.bindings={}};Localize.prototype.setHeaderFilterPlaceholder=function(t){this.langs.default.headerFilters.default=t},Localize.prototype.setHeaderFilterColumnPlaceholder=function(t,e){this.langs.default.headerFilters.columns[t]=e,this.lang&&!this.lang.headerFilters.columns[t]&&(this.lang.headerFilters.columns[t]=e)},Localize.prototype.installLang=function(t,e){this.langs[t]?this._setLangProp(this.langs[t],e):this.langs[t]=e},Localize.prototype._setLangProp=function(t,e){for(var o in e)t[o]&&"object"==_typeof(t[o])?this._setLangProp(t[o],e[o]):t[o]=e[o]},Localize.prototype.setLocale=function(t){function e(t,o){for(var i in t)"object"==_typeof(t[i])?(o[i]||(o[i]={}),e(t[i],o[i])):o[i]=t[i]}var o=this;if(t=t||"default",!0===t&&navigator.language&&(t=navigator.language.toLowerCase()),t&&!o.langs[t]){var i=t.split("-")[0];o.langs[i]?(console.warn("Localization Error - Exact matching locale not found, using closest match: ",t,i),t=i):(console.warn("Localization Error - Matching locale not found, using default: ",t),t="default")}o.locale=t,o.lang=Tabulator.prototype.helpers.deepClone(o.langs.default||{}),"default"!=t&&e(o.langs[t],o.lang),o.table.options.localized.call(o.table,o.locale,o.lang),o._executeBindings()},Localize.prototype.getLocale=function(t){return self.locale},Localize.prototype.getLang=function(t){return t?this.langs[t]:this.lang},Localize.prototype.getText=function(t,e){var t=e?t+"|"+e:t,o=t.split("|");return this._getLangElement(o,this.locale)||""},Localize.prototype._getLangElement=function(t,e){var o=this,i=o.lang;return t.forEach(function(t){var e;i&&(e=i[t],i=void 0!==e&&e)}),i},Localize.prototype.bind=function(t,e){this.bindings[t]||(this.bindings[t]=[]),this.bindings[t].push(e),e(this.getText(t),this.lang)},Localize.prototype._executeBindings=function(){var t=this;for(var e in t.bindings)!function(e){t.bindings[e].forEach(function(o){o(t.getText(e),t.lang)})}(e)},Localize.prototype.langs={default:{groups:{item:"item",items:"items"},columns:{},ajax:{loading:"Loading",error:"Error"},pagination:{first:"First",first_title:"First Page",last:"Last",last_title:"Last Page",prev:"Prev",prev_title:"Prev Page",next:"Next",next_title:"Next Page"},headerFilters:{default:"filter column...",columns:{}}}},Tabulator.prototype.registerModule("localize",Localize);var Comms=function(t){this.table=t};Comms.prototype.getConnections=function(t){var e,o=this,i=[];return e=Tabulator.prototype.comms.lookupTable(t),e.forEach(function(t){o.table!==t&&i.push(t)}),i},Comms.prototype.send=function(t,e,o,i){var n=this,l=this.getConnections(t);l.forEach(function(t){t.tableComms(n.table.element,e,o,i)}),!l.length&&t&&console.warn("Table Connection Error - No tables matching selector found",t)},Comms.prototype.receive=function(t,e,o,i){if(this.table.modExists(e))return this.table.modules[e].commsReceived(t,o,i);console.warn("Inter-table Comms Error - no such module:",e)},Tabulator.prototype.registerModule("comms",Comms); \ No newline at end of file diff --git a/Gems/AssetMemoryAnalyzer/External/tabulator-master/gulpfile.js b/Gems/AssetMemoryAnalyzer/External/tabulator-master/gulpfile.js deleted file mode 100644 index 0ae7810200..0000000000 --- a/Gems/AssetMemoryAnalyzer/External/tabulator-master/gulpfile.js +++ /dev/null @@ -1,200 +0,0 @@ -var gulp = require('gulp'), -sass = require('gulp-sass'), -autoprefixer = require('gulp-autoprefixer'), -cssnano = require('gulp-cssnano'), -jshint = require('gulp-jshint'), -uglify = require('gulp-uglify'), -imagemin = require('gulp-imagemin'), -rename = require('gulp-rename'), -concat = require('gulp-concat'), -notify = require('gulp-notify'), -cache = require('gulp-cache'), -livereload = require('gulp-livereload'), -del = require('del'); -include = require('gulp-include'), -sourcemaps = require('gulp-sourcemaps'), -babel = require('gulp-babel'), -plumber = require('gulp-plumber'), -gutil = require('gulp-util'), -insert = require('gulp-insert'), -fs = require('fs'); - -var version_no = "4.1.2", - -version = "/* Tabulator v" + version_no + " (c) Oliver Folkerd */\n"; - -var gulp_src = gulp.src; -gulp.src = function() { - return gulp_src.apply(gulp, arguments) - .pipe(plumber(function(error) { - // Output an error message - gutil.log(gutil.colors.red('Error (' + error.plugin + '): ' + error.message)); - // emit the end event, to properly end the task - this.emit('end'); - }) - ); -}; - -//build css -gulp.task('styles', function() { - return gulp.src('src/scss/**/tabulator*.scss') - .pipe(sourcemaps.init()) - .pipe(insert.prepend(version + "\n")) - .pipe(sass({outputStyle: 'expanded'}).on('error', sass.logError)) - .pipe(autoprefixer('last 4 version')) - .pipe(gulp.dest('dist/css')) - .pipe(rename({suffix: '.min'})) - .pipe(cssnano()) - .pipe(insert.prepend(version)) - .pipe(sourcemaps.write('.')) - .pipe(gulp.dest('dist/css')) - .on('end', function(){ gutil.log('Styles task complete'); }) - }); - - -//build tabulator -gulp.task('tabulator', function() { - //return gulp.src('src/js/**/*.js') - return gulp.src('src/js/core_modules.js') - .pipe(insert.prepend(version + "\n")) - //.pipe(sourcemaps.init()) - .pipe(include()) - //.pipe(jshint()) - // .pipe(jshint.reporter('default')) - .pipe(babel({ - //presets:['es2015'] - presets: [["env",{ - "targets": { - "browsers": ["last 4 versions"] - }, - loose: true, - modules: false, - }, ], { }] - })) - .pipe(concat('tabulator.js')) - .pipe(gulp.dest('dist/js')) - .pipe(rename({suffix: '.min'})) - .pipe(uglify()) - .pipe(insert.prepend(version)) - // .pipe(sourcemaps.write('.')) - .pipe(gulp.dest('dist/js')) - //.pipe(notify({ message: 'Scripts task complete' })); - .on('end', function(){ gutil.log('Tabulator Complete'); }) - //.on("error", console.log) - }); - - -//simplified core js -gulp.task('core', function() { - return gulp.src('src/js/core.js') - .pipe(insert.prepend(version + "\n")) - .pipe(include()) - .pipe(babel({ - presets: [["env", { - "targets": { - "browsers": ["last 4 versions"] - }, - loose: true, - modules: false, - }] - ] - })) - .pipe(concat('tabulator_core.js')) - .pipe(gulp.dest('dist/js')) - .pipe(rename({suffix: '.min'})) - .pipe(uglify()) - .pipe(insert.prepend(version)) - .pipe(gulp.dest('dist/js')) - .on('end', function(){ gutil.log('Core complete'); }) - }); - - - -//make jquery wrapper -gulp.task('modules', function(){ - - var path = __dirname + "/src/js/modules/"; - - var files = fs.readdirSync(path); - - var core = ["layout.js", "localize.js", "comms.js"]; - - files.forEach(function(file, index){ - - if(!core.includes(file)){ - return gulp.src('src/js/modules/' + file) - .pipe(insert.prepend(version + "\n")) - .pipe(include()) - .pipe(babel({ - presets: [["env", { - "targets": { - "browsers": ["last 4 versions"] - }, - loose: true, - modules: false, - }] - ] - })) - .pipe(concat(file)) - .pipe(gulp.dest('dist/js/modules/')) - .pipe(rename({suffix: '.min'})) - .pipe(uglify()) - .pipe(insert.prepend(version)) - .pipe(gulp.dest('dist/js/modules/')) - } - }); - - }); - -//make jquery wrapper -gulp.task('jquery', function(){ - return gulp.src('src/js/jquery_wrapper.js') - .pipe(insert.prepend(version + "\n")) - .pipe(include()) - .pipe(babel({ - presets: [["env", { - "targets": { - "browsers": ["last 4 versions"] - }, - loose: true, - modules: false, - }] - ] - })) - .pipe(concat('jquery_wrapper.js')) - .pipe(gulp.dest('dist/js')) - .pipe(rename({suffix: '.min'})) - .pipe(uglify()) - .pipe(insert.prepend(version)) - .pipe(gulp.dest('dist/js')) - .on('end', function(){ gutil.log('jQuery wrapper complete'); }) - - }); - - -gulp.task('scripts', function() { - gulp.start('tabulator'); - gulp.start('core'); - gulp.start('modules'); - gulp.start('jquery'); - }); - -gulp.task('clean', function() { - return del(['dist/css', 'dist/js']); - }); - - -gulp.task('default', ['clean'], function() { - gulp.start('styles', 'scripts'); - }); - - -gulp.task('watch', function() { - - // Watch .scss files - gulp.watch('src/scss/**/*.scss', ['styles']); - - // Watch .js files - gulp.watch('src/js/**/*.js', ['scripts']); - - }); \ No newline at end of file diff --git a/Gems/AssetMemoryAnalyzer/External/tabulator-master/package.json b/Gems/AssetMemoryAnalyzer/External/tabulator-master/package.json deleted file mode 100644 index 23a56135d1..0000000000 --- a/Gems/AssetMemoryAnalyzer/External/tabulator-master/package.json +++ /dev/null @@ -1,64 +0,0 @@ -{ - "name": "tabulator-tables", - "version": "4.1.2", - "description": "Interactive table generation JavaScript library", - "main": "dist/js/tabulator.js", - "scripts": { - "test": "echo \"Error: no test specified\" && exit 1" - }, - "repository": { - "type": "git", - "url": "https://github.com/olifolkerd/tabulator.git" - }, - "keywords": [ - "table", - "grid", - "datagrid", - "tabulator", - "editable", - "cookie", - "sort", - "format", - "resizable", - "list", - "scrollable", - "ajax", - "json", - "widget", - "jquery", - "react", - "angular", - "vue" - ], - "author": "Oli Folkerd", - "license": "MIT", - "bugs": { - "url": "https://github.com/olifolkerd/tabulator/issues" - }, - "homepage": "http://tabulator.info/", - "devDependencies": { - "babel-preset-env": "^1.4.0", - "babel-preset-es2015": "^6.24.1", - "babel-preset-stage-2": "^6.24.1", - "del": "^2.2.2", - "gulp": "^3.9.1", - "gulp-autoprefixer": "^3.1.1", - "gulp-babel": "^6.1.2", - "gulp-cache": "^0.4.6", - "gulp-concat": "^2.6.1", - "gulp-cssnano": "^2.1.2", - "gulp-imagemin": "^3.2.0", - "gulp-include": "^2.3.1", - "gulp-insert": "^0.5.0", - "gulp-jshint": "^2.0.4", - "gulp-livereload": "^3.8.1", - "gulp-notify": "^3.0.0", - "gulp-plumber": "^1.1.0", - "gulp-rename": "^1.2.2", - "gulp-sass": "^3.1.0", - "gulp-sourcemaps": "^2.6.0", - "gulp-uglify": "^2.1.2", - "gulp-util": "^3.0.8", - "jshint": "^2.9.4" - } -} diff --git a/Gems/AssetMemoryAnalyzer/External/tabulator-master/src/js/cell.js b/Gems/AssetMemoryAnalyzer/External/tabulator-master/src/js/cell.js deleted file mode 100644 index 7b54f0cb84..0000000000 --- a/Gems/AssetMemoryAnalyzer/External/tabulator-master/src/js/cell.js +++ /dev/null @@ -1,593 +0,0 @@ - -//public row object -var CellComponent = function (cell){ - this._cell = cell; -}; - -CellComponent.prototype.getValue = function(){ - return this._cell.getValue(); -}; - -CellComponent.prototype.getOldValue = function(){ - return this._cell.getOldValue(); -}; - -CellComponent.prototype.getElement = function(){ - return this._cell.getElement(); -}; - -CellComponent.prototype.getRow = function(){ - return this._cell.row.getComponent(); -}; - -CellComponent.prototype.getData = function(){ - return this._cell.row.getData(); -}; - -CellComponent.prototype.getField = function(){ - return this._cell.column.getField(); -}; - -CellComponent.prototype.getColumn = function(){ - return this._cell.column.getComponent(); -}; - -CellComponent.prototype.setValue = function(value, mutate){ - if(typeof mutate == "undefined"){ - mutate = true; - } - - this._cell.setValue(value, mutate); -}; - -CellComponent.prototype.restoreOldValue = function(){ - this._cell.setValueActual(this._cell.getOldValue()); -}; - -CellComponent.prototype.edit = function(force){ - return this._cell.edit(force); -}; - -CellComponent.prototype.cancelEdit = function(){ - this._cell.cancelEdit(); -}; - - -CellComponent.prototype.nav = function(){ - return this._cell.nav(); -}; - -CellComponent.prototype.checkHeight = function(){ - this._cell.checkHeight(); -}; - -CellComponent.prototype.getTable = function(){ - return this._cell.table; -}; - -CellComponent.prototype._getSelf = function(){ - return this._cell; -}; - - - -var Cell = function(column, row){ - - this.table = column.table; - this.column = column; - this.row = row; - this.element = null; - this.value = null; - this.oldValue = null; - - this.height = null; - this.width = null; - this.minWidth = null; - - this.build(); -}; - -//////////////// Setup Functions ///////////////// - -//generate element -Cell.prototype.build = function(){ - this.generateElement(); - - this.setWidth(this.column.width); - - this._configureCell(); - - this.setValueActual(this.column.getFieldValue(this.row.data)); -}; - -Cell.prototype.generateElement = function(){ - this.element = document.createElement('div'); - this.element.className = "tabulator-cell"; - this.element.setAttribute("role", "gridcell"); - this.element = this.element; -}; - - -Cell.prototype._configureCell = function(){ - var self = this, - cellEvents = self.column.cellEvents, - element = self.element, - field = this.column.getField(), - dblTap, tapHold, tap; - - //set text alignment - element.style.textAlign = self.column.hozAlign; - - if(field){ - element.setAttribute("tabulator-field", field); - } - - if(self.column.definition.cssClass){ - element.classList.add(self.column.definition.cssClass); - } - - //set event bindings - if (cellEvents.cellClick || self.table.options.cellClick){ - self.element.addEventListener("click", function(e){ - var component = self.getComponent(); - - if(cellEvents.cellClick){ - cellEvents.cellClick.call(self.table, e, component); - } - - if(self.table.options.cellClick){ - self.table.options.cellClick.call(self.table, e, component); - } - }); - } - - if (cellEvents.cellDblClick || this.table.options.cellDblClick){ - element.addEventListener("dblclick", function(e){ - var component = self.getComponent(); - - if(cellEvents.cellDblClick){ - cellEvents.cellDblClick.call(self.table, e, component); - } - - if(self.table.options.cellDblClick){ - self.table.options.cellDblClick.call(self.table, e, component); - } - }); - } - - if (cellEvents.cellContext || this.table.options.cellContext){ - element.addEventListener("contextmenu", function(e){ - var component = self.getComponent(); - - if(cellEvents.cellContext){ - cellEvents.cellContext.call(self.table, e, component); - } - - if(self.table.options.cellContext){ - self.table.options.cellContext.call(self.table, e, component); - } - }); - } - - if (this.table.options.tooltipGenerationMode === "hover"){ - //update tooltip on mouse enter - element.addEventListener("mouseenter", function(e){ - self._generateTooltip(); - }); - } - - if (cellEvents.cellTap || this.table.options.cellTap){ - tap = false; - - element.addEventListener("touchstart", function(e){ - tap = true; - }); - - element.addEventListener("touchend", function(e){ - if(tap){ - var component = self.getComponent(); - - if(cellEvents.cellTap){ - cellEvents.cellTap.call(self.table, e, component); - } - - if(self.table.options.cellTap){ - self.table.options.cellTap.call(self.table, e, component); - } - } - - tap = false; - }); - } - - if (cellEvents.cellDblTap || this.table.options.cellDblTap){ - dblTap = null; - - element.addEventListener("touchend", function(e){ - - if(dblTap){ - clearTimeout(dblTap); - dblTap = null; - - var component = self.getComponent(); - - if(cellEvents.cellDblTap){ - cellEvents.cellDblTap.call(self.table, e, component); - } - - if(self.table.options.cellDblTap){ - self.table.options.cellDblTap.call(self.table, e, component); - } - }else{ - - dblTap = setTimeout(function(){ - clearTimeout(dblTap); - dblTap = null; - }, 300); - } - - }); - } - - if (cellEvents.cellTapHold || this.table.options.cellTapHold){ - tapHold = null; - - element.addEventListener("touchstart", function(e){ - clearTimeout(tapHold); - - tapHold = setTimeout(function(){ - clearTimeout(tapHold); - tapHold = null; - tap = false; - var component = self.getComponent(); - - if(cellEvents.cellTapHold){ - cellEvents.cellTapHold.call(self.table, e, component); - } - - if(self.table.options.cellTapHold){ - self.table.options.cellTapHold.call(self.table, e, component); - } - }, 1000); - - }); - - element.addEventListener("touchend", function(e){ - clearTimeout(tapHold); - tapHold = null; - }); - } - - if(self.column.modules.edit){ - self.table.modules.edit.bindEditor(self); - } - - if(self.column.definition.rowHandle && self.table.options.movableRows !== false && self.table.modExists("moveRow")){ - self.table.modules.moveRow.initializeCell(self); - } - - //hide cell if not visible - if(!self.column.visible){ - self.hide(); - } -}; - -//generate cell contents -Cell.prototype._generateContents = function(){ - var val; - - if(this.table.modExists("format")){ - val = this.table.modules.format.formatValue(this); - }else{ - val = this.element.innerHTML = this.value; - } - - switch(typeof val){ - case "object": - if(val instanceof Node){ - this.element.appendChild(val); - }else{ - this.element.innerHTML = ""; - console.warn("Format Error - Formatter has returned a type of object, the only valid formatter object return is an instance of Node, the formatter returned:", val); - } - break; - case "undefined": - case "null": - this.element.innerHTML = ""; - break; - default: - this.element.innerHTML = val; - } -}; - -Cell.prototype.cellRendered = function(){ - if(this.table.modExists("format") && this.table.modules.format.cellRendered){ - this.table.modules.format.cellRendered(this); - } -}; - -//generate tooltip text -Cell.prototype._generateTooltip = function(){ - var tooltip = this.column.tooltip; - - if(tooltip){ - if(tooltip === true){ - tooltip = this.value; - }else if(typeof(tooltip) == "function"){ - tooltip = tooltip(this.getComponent()); - - if(tooltip === false){ - tooltip = ""; - } - } - - if(typeof tooltip === "undefined"){ - tooltip = ""; - } - - this.element.setAttribute("title", tooltip); - }else{ - this.element.setAttribute("title", ""); - } -}; - - -//////////////////// Getters //////////////////// -Cell.prototype.getElement = function(){ - return this.element; -}; - -Cell.prototype.getValue = function(){ - return this.value; -}; - -Cell.prototype.getOldValue = function(){ - return this.oldValue; -}; - -//////////////////// Actions //////////////////// - -Cell.prototype.setValue = function(value, mutate){ - - var changed = this.setValueProcessData(value, mutate), - component; - - if(changed){ - if(this.table.options.history && this.table.modExists("history")){ - this.table.modules.history.action("cellEdit", this, {oldValue:this.oldValue, newValue:this.value}); - } - - component = this.getComponent(); - - if(this.column.cellEvents.cellEdited){ - this.column.cellEvents.cellEdited.call(this.table, component); - } - - this.table.options.cellEdited.call(this.table, component); - - this.table.options.dataEdited.call(this.table, this.table.rowManager.getData()); - } - - if(this.table.modExists("columnCalcs")){ - if(this.column.definition.topCalc || this.column.definition.bottomCalc){ - if(this.table.options.groupBy && this.table.modExists("groupRows")){ - this.table.modules.columnCalcs.recalcRowGroup(this.row); - }else{ - this.table.modules.columnCalcs.recalc(this.table.rowManager.activeRows); - } - } - } - -}; - -Cell.prototype.setValueProcessData = function(value, mutate){ - var changed = false; - - if(this.value != value){ - - changed = true; - - if(mutate){ - if(this.column.modules.mutate){ - value = this.table.modules.mutator.transformCell(this, value); - } - } - } - - this.setValueActual(value); - - return changed; -}; - -Cell.prototype.setValueActual = function(value){ - this.oldValue = this.value; - - this.value = value; - - this.column.setFieldValue(this.row.data, value); - - this._generateContents(); - this._generateTooltip(); - - //set resizable handles - if(this.table.options.resizableColumns && this.table.modExists("resizeColumns")){ - this.table.modules.resizeColumns.initializeColumn("cell", this.column, this.element); - } - - //handle frozen cells - if(this.table.modExists("frozenColumns")){ - this.table.modules.frozenColumns.layoutElement(this.element, this.column); - } -}; - -Cell.prototype.setWidth = function(width){ - this.width = width; - // this.element.css("width", width || ""); - this.element.style.width = (width ? width + "px" : ""); -}; - -Cell.prototype.getWidth = function(){ - return this.width || this.element.offsetWidth; -}; - -Cell.prototype.setMinWidth = function(minWidth){ - this.minWidth = minWidth; - this.element.style.minWidth = (minWidth ? minWidth + "px" : ""); -}; - -Cell.prototype.checkHeight = function(){ - // var height = this.element.css("height"); - - this.row.reinitializeHeight(); -}; - -Cell.prototype.clearHeight = function(){ - this.element.style.height = ""; - this.height = null; -}; - - -Cell.prototype.setHeight = function(height){ - this.height = height; - this.element.style.height = (height ? height + "px" : ""); -}; - -Cell.prototype.getHeight = function(){ - return this.height || this.element.offsetHeight; -}; - -Cell.prototype.show = function(){ - this.element.style.display = ""; -}; - -Cell.prototype.hide = function(){ - this.element.style.display = "none"; -}; - -Cell.prototype.edit = function(force){ - if(this.table.modExists("edit", true)){ - return this.table.modules.edit.editCell(this, force); - } -}; - -Cell.prototype.cancelEdit = function(){ - if(this.table.modExists("edit", true)){ - var editing = this.table.modules.edit.getCurrentCell(); - - if(editing && editing._getSelf() === this){ - this.table.modules.edit.cancelEdit(); - }else{ - console.warn("Cancel Editor Error - This cell is not currently being edited "); - } - } -}; - - - - -Cell.prototype.delete = function(){ - this.element.parentNode.removeChild(this.element); - this.column.deleteCell(this); - this.row.deleteCell(this); -}; - -//////////////// Navigation ///////////////// - -Cell.prototype.nav = function(){ - - var self = this, - nextCell = false, - index = this.row.getCellIndex(this); - - return { - next:function(){ - var nextCell = this.right(), - nextRow; - - if(!nextCell){ - nextRow = self.table.rowManager.nextDisplayRow(self.row, true); - - if(nextRow){ - nextCell = nextRow.findNextEditableCell(-1); - - if(nextCell){ - nextCell.edit(); - return true; - } - } - }else{ - return true; - } - - return false; - }, - prev:function(){ - var nextCell = this.left(), - prevRow; - - if(!nextCell){ - prevRow = self.table.rowManager.prevDisplayRow(self.row, true); - - if(prevRow){ - nextCell = prevRow.findPrevEditableCell(prevRow.cells.length); - - if(nextCell){ - nextCell.edit(); - return true; - } - } - - }else{ - return true; - } - - return false; - }, - left:function(){ - - nextCell = self.row.findPrevEditableCell(index); - - if(nextCell){ - nextCell.edit(); - return true; - }else{ - return false; - } - }, - right:function(){ - nextCell = self.row.findNextEditableCell(index); - - if(nextCell){ - nextCell.edit(); - return true; - }else{ - return false; - } - }, - up:function(){ - var nextRow = self.table.rowManager.prevDisplayRow(self.row, true); - - if(nextRow){ - nextRow.cells[index].edit(); - } - }, - down:function(){ - var nextRow = self.table.rowManager.nextDisplayRow(self.row, true); - - if(nextRow){ - nextRow.cells[index].edit(); - } - }, - - }; - -}; - -Cell.prototype.getIndex = function(){ - this.row.getCellIndex(this); -}; - -//////////////// Object Generation ///////////////// -Cell.prototype.getComponent = function(){ - return new CellComponent(this); -}; \ No newline at end of file diff --git a/Gems/AssetMemoryAnalyzer/External/tabulator-master/src/js/column.js b/Gems/AssetMemoryAnalyzer/External/tabulator-master/src/js/column.js deleted file mode 100644 index 026cd59889..0000000000 --- a/Gems/AssetMemoryAnalyzer/External/tabulator-master/src/js/column.js +++ /dev/null @@ -1,1074 +0,0 @@ - -//public column object -var ColumnComponent = function (column){ - this._column = column; - this.type = "ColumnComponent"; -}; - -ColumnComponent.prototype.getElement = function(){ - return this._column.getElement(); -}; - -ColumnComponent.prototype.getDefinition = function(){ - return this._column.getDefinition(); -}; - -ColumnComponent.prototype.getField = function(){ - return this._column.getField(); -}; - -ColumnComponent.prototype.getCells = function(){ - var cells = []; - - this._column.cells.forEach(function(cell){ - cells.push(cell.getComponent()); - }); - - return cells; -}; - -ColumnComponent.prototype.getVisibility = function(){ - return this._column.visible; -}; - -ColumnComponent.prototype.show = function(){ - if(this._column.isGroup){ - this._column.columns.forEach(function(column){ - column.show(); - }); - }else{ - this._column.show(); - } -}; - -ColumnComponent.prototype.hide = function(){ - if(this._column.isGroup){ - this._column.columns.forEach(function(column){ - column.hide(); - }); - }else{ - this._column.hide(); - } -}; - -ColumnComponent.prototype.toggle = function(){ - if(this._column.visible){ - this.hide(); - }else{ - this.show(); - } -}; - -ColumnComponent.prototype.delete = function(){ - this._column.delete(); -}; - -ColumnComponent.prototype.getSubColumns = function(){ - var output = []; - - if(this._column.columns.length){ - this._column.columns.forEach(function(column){ - output.push(column.getComponent()); - }); - } - - return output; -}; - -ColumnComponent.prototype.getParentColumn = function(){ - return this._column.parent instanceof Column ? this._column.parent.getComponent() : false; -}; - - -ColumnComponent.prototype._getSelf = function(){ - return this._column; -}; - -ColumnComponent.prototype.scrollTo = function(){ - return this._column.table.columnManager.scrollToColumn(this._column); -}; - -ColumnComponent.prototype.getTable = function(){ - return this._column.table; -}; - -ColumnComponent.prototype.headerFilterFocus = function(){ - if(this._column.table.modExists("filter", true)){ - this._column.table.modules.filter.setHeaderFilterFocus(this._column); - } -}; - -ColumnComponent.prototype.reloadHeaderFilter = function(){ - if(this._column.table.modExists("filter", true)){ - this._column.table.modules.filter.reloadHeaderFilter(this._column); - } -}; - -ColumnComponent.prototype.setHeaderFilterValue = function(value){ - if(this._column.table.modExists("filter", true)){ - this._column.table.modules.filter.setHeaderFilterValue(this._column, value); - } -}; - - - -var Column = function(def, parent){ - var self = this; - - this.table = parent.table; - this.definition = def; //column definition - this.parent = parent; //hold parent object - this.type = "column"; //type of element - this.columns = []; //child columns - this.cells = []; //cells bound to this column - this.element = this.createElement(); //column header element - this.contentElement = false; - this.groupElement = this.createGroupElement(); //column group holder element - this.isGroup = false; - this.tooltip = false; //hold column tooltip - this.hozAlign = ""; //horizontal text alignment - - //multi dimentional filed handling - this.field =""; - this.fieldStructure = ""; - this.getFieldValue = ""; - this.setFieldValue = ""; - - this.setField(this.definition.field); - - - this.modules = {}; //hold module variables; - - this.cellEvents = { - cellClick:false, - cellDblClick:false, - cellContext:false, - cellTap:false, - cellDblTap:false, - cellTapHold:false - }; - - this.width = null; //column width - this.minWidth = null; //column minimum width - this.widthFixed = false; //user has specified a width for this column - - this.visible = true; //default visible state - - //initialize column - if(def.columns){ - - this.isGroup = true; - - def.columns.forEach(function(def, i){ - var newCol = new Column(def, self); - self.attachColumn(newCol); - }); - - self.checkColumnVisibility(); - }else{ - parent.registerColumnField(this); - } - - if(def.rowHandle && this.table.options.movableRows !== false && this.table.modExists("moveRow")){ - this.table.modules.moveRow.setHandle(true); - } - - this._buildHeader(); -}; - -Column.prototype.createElement = function (){ - var el = document.createElement("div"); - - el.classList.add("tabulator-col"); - el.setAttribute("role", "columnheader"); - el.setAttribute("aria-sort", "none"); - - return el; -}; - -Column.prototype.createGroupElement = function (){ - var el = document.createElement("div"); - - el.classList.add("tabulator-col-group-cols"); - - return el; -}; - -Column.prototype.setField = function(field){ - this.field = field; - this.fieldStructure = field ? (this.table.options.nestedFieldSeparator ? field.split(this.table.options.nestedFieldSeparator) : [field]) : []; - this.getFieldValue = this.fieldStructure.length > 1 ? this._getNestedData : this._getFlatData; - this.setFieldValue = this.fieldStructure.length > 1 ? this._setNesteData : this._setFlatData; -}; - -//register column position with column manager -Column.prototype.registerColumnPosition = function(column){ - this.parent.registerColumnPosition(column); -}; - -//register column position with column manager -Column.prototype.registerColumnField = function(column){ - this.parent.registerColumnField(column); -}; - -//trigger position registration -Column.prototype.reRegisterPosition = function(){ - if(this.isGroup){ - this.columns.forEach(function(column){ - column.reRegisterPosition(); - }); - }else{ - this.registerColumnPosition(this); - } -}; - -Column.prototype.setTooltip = function(){ - var self = this, - def = self.definition; - - //set header tooltips - var tooltip = def.headerTooltip || def.tooltip === false ? def.headerTooltip : self.table.options.tooltipsHeader; - - if(tooltip){ - if(tooltip === true){ - if(def.field){ - self.table.modules.localize.bind("columns|" + def.field, function(value){ - self.element.setAttribute("title", value || def.title); - }); - }else{ - self.element.setAttribute("title", def.title); - } - - }else{ - if(typeof(tooltip) == "function"){ - tooltip = tooltip(self.getComponent()); - - if(tooltip === false){ - tooltip = ""; - } - } - - self.element.setAttribute("title", tooltip); - } - - }else{ - self.element.setAttribute("title", ""); - } -}; - -//build header element -Column.prototype._buildHeader = function(){ - var self = this, - def = self.definition; - - while(self.element.firstChild) self.element.removeChild(self.element.firstChild); - - if(def.headerVertical){ - self.element.classList.add("tabulator-col-vertical"); - - if(def.headerVertical === "flip"){ - self.element.classList.add("tabulator-col-vertical-flip"); - } - } - - self.contentElement = self._bindEvents(); - - self.contentElement = self._buildColumnHeaderContent(); - - self.element.appendChild(self.contentElement); - - if(self.isGroup){ - self._buildGroupHeader(); - }else{ - self._buildColumnHeader(); - } - - self.setTooltip(); - - //set resizable handles - if(self.table.options.resizableColumns && self.table.modExists("resizeColumns")){ - self.table.modules.resizeColumns.initializeColumn("header", self, self.element); - } - - //set resizable handles - if(def.headerFilter && self.table.modExists("filter") && self.table.modExists("edit")){ - if(typeof def.headerFilterPlaceholder !== "undefined" && def.field){ - self.table.modules.localize.setHeaderFilterColumnPlaceholder(def.field, def.headerFilterPlaceholder); - } - - self.table.modules.filter.initializeColumn(self); - } - - - //set resizable handles - if(self.table.modExists("frozenColumns")){ - self.table.modules.frozenColumns.initializeColumn(self); - } - - //set movable column - if(self.table.options.movableColumns && !self.isGroup && self.table.modExists("moveColumn")){ - self.table.modules.moveColumn.initializeColumn(self); - } - - //set calcs column - if((def.topCalc || def.bottomCalc) && self.table.modExists("columnCalcs")){ - self.table.modules.columnCalcs.initializeColumn(self); - } - - - //update header tooltip on mouse enter - self.element.addEventListener("mouseenter", function(e){ - self.setTooltip(); - }); -}; - -Column.prototype._bindEvents = function(){ - - var self = this, - def = self.definition, - dblTap, tapHold, tap; - - //setup header click event bindings - if(typeof(def.headerClick) == "function"){ - self.element.addEventListener("click", function(e){def.headerClick(e, self.getComponent());}); - } - - if(typeof(def.headerDblClick) == "function"){ - self.element.addEventListener("dblclick", function(e){def.headerDblClick(e, self.getComponent());}); - } - - if(typeof(def.headerContext) == "function"){ - self.element.addEventListener("contextmenu", function(e){def.headerContext(e, self.getComponent());}); - } - - //setup header tap event bindings - if(typeof(def.headerTap) == "function"){ - tap = false; - - self.element.addEventListener("touchstart", function(e){ - tap = true; - }); - - self.element.addEventListener("touchend", function(e){ - if(tap){ - def.headerTap(e, self.getComponent()); - } - - tap = false; - }); - } - - if(typeof(def.headerDblTap) == "function"){ - dblTap = null; - - self.element.addEventListener("touchend", function(e){ - - if(dblTap){ - clearTimeout(dblTap); - dblTap = null; - - def.headerDblTap(e, self.getComponent()); - }else{ - - dblTap = setTimeout(function(){ - clearTimeout(dblTap); - dblTap = null; - }, 300); - } - - }); - } - - if(typeof(def.headerTapHold) == "function"){ - tapHold = null; - - self.element.addEventListener("touchstart", function(e){ - clearTimeout(tapHold); - - tapHold = setTimeout(function(){ - clearTimeout(tapHold); - tapHold = null; - tap = false; - def.headerTapHold(e, self.getComponent()); - }, 1000); - - }); - - self.element.addEventListener("touchend", function(e){ - clearTimeout(tapHold); - tapHold = null; - }); - } - - //store column cell click event bindings - if(typeof(def.cellClick) == "function"){ - self.cellEvents.cellClick = def.cellClick; - } - - if(typeof(def.cellDblClick) == "function"){ - self.cellEvents.cellDblClick = def.cellDblClick; - } - - if(typeof(def.cellContext) == "function"){ - self.cellEvents.cellContext = def.cellContext; - } - - //setup column cell tap event bindings - if(typeof(def.cellTap) == "function"){ - self.cellEvents.cellTap = def.cellTap; - } - - if(typeof(def.cellDblTap) == "function"){ - self.cellEvents.cellDblTap = def.cellDblTap; - } - - if(typeof(def.cellTapHold) == "function"){ - self.cellEvents.cellTapHold = def.cellTapHold; - } - - //setup column cell edit callbacks - if(typeof(def.cellEdited) == "function"){ - self.cellEvents.cellEdited = def.cellEdited; - } - - if(typeof(def.cellEditing) == "function"){ - self.cellEvents.cellEditing = def.cellEditing; - } - - if(typeof(def.cellEditCancelled) == "function"){ - self.cellEvents.cellEditCancelled = def.cellEditCancelled; - } -}; - -//build header element for header -Column.prototype._buildColumnHeader = function(){ - var self = this, - def = self.definition, - table = self.table, - sortable; - - //set column sorter - if(table.modExists("sort")){ - table.modules.sort.initializeColumn(self, self.contentElement); - } - - //set column formatter - if(table.modExists("format")){ - table.modules.format.initializeColumn(self); - } - - //set column editor - if(typeof def.editor != "undefined" && table.modExists("edit")){ - table.modules.edit.initializeColumn(self); - } - - //set colum validator - if(typeof def.validator != "undefined" && table.modExists("validate")){ - table.modules.validate.initializeColumn(self); - } - - - //set column mutator - if(table.modExists("mutator")){ - table.modules.mutator.initializeColumn(self); - } - - //set column accessor - if(table.modExists("accessor")){ - table.modules.accessor.initializeColumn(self); - } - - //set respoviveLayout - if(typeof table.options.responsiveLayout && table.modExists("responsiveLayout")){ - table.modules.responsiveLayout.initializeColumn(self); - } - - //set column visibility - if(typeof def.visible != "undefined"){ - if(def.visible){ - self.show(true); - }else{ - self.hide(true); - } - } - - //asign additional css classes to column header - if(def.cssClass){ - self.element.classList.add(def.cssClass); - } - - if(def.field){ - this.element.setAttribute("tabulator-field", def.field); - } - - //set min width if present - self.setMinWidth(typeof def.minWidth == "undefined" ? self.table.options.columnMinWidth : def.minWidth); - - self.reinitializeWidth(); - - //set tooltip if present - self.tooltip = self.definition.tooltip || self.definition.tooltip === false ? self.definition.tooltip : self.table.options.tooltips; - - //set orizontal text alignment - self.hozAlign = typeof(self.definition.align) == "undefined" ? "" : self.definition.align; -}; - -Column.prototype._buildColumnHeaderContent = function(){ - var self = this, - def = self.definition, - table = self.table; - - var contentElement = document.createElement("div"); - contentElement.classList.add("tabulator-col-content"); - - contentElement.appendChild(self._buildColumnHeaderTitle()); - - return contentElement; -}; - -//build title element of column -Column.prototype._buildColumnHeaderTitle = function(){ - var self = this, - def = self.definition, - table = self.table, - title; - - var titleHolderElement = document.createElement("div"); - titleHolderElement.classList.add("tabulator-col-title"); - - if(def.editableTitle){ - var titleElement = document.createElement("input"); - titleElement.classList.add("tabulator-title-editor"); - - titleElement.addEventListener("click", function(e){ - e.stopPropagation(); - titleElement.focus(); - }); - - titleElement.addEventListener("change", function(){ - def.title = titleElement.value; - table.options.columnTitleChanged.call(self.table, self.getComponent()); - }); - - titleHolderElement.appendChild(titleElement); - - if(def.field){ - table.modules.localize.bind("columns|" + def.field, function(text){ - titleElement.value = text || (def.title || " "); - }); - }else{ - titleElement.value = def.title || " "; - } - - }else{ - if(def.field){ - table.modules.localize.bind("columns|" + def.field, function(text){ - self._formatColumnHeaderTitle(titleHolderElement, text || (def.title || " ")); - }); - }else{ - self._formatColumnHeaderTitle(titleHolderElement, def.title || " "); - } - } - - return titleHolderElement; -}; - -Column.prototype._formatColumnHeaderTitle = function(el, title){ - var formatter, contents, params, mockCell; - - if(this.definition.titleFormatter && this.table.modExists("format")){ - - formatter = this.table.modules.format.getFormatter(this.definition.titleFormatter); - - mockCell = { - getValue:function(){ - return title; - }, - getElement:function(){ - return el; - } - }; - - params = this.definition.titleFormatterParams || {}; - - params = typeof params === "function" ? params() : params; - - contents = formatter.call(this.table.modules.format, mockCell, params); - - switch(typeof contents){ - case "object": - if(contents instanceof Node){ - this.element.appendChild(contents); - }else{ - this.element.innerHTML = ""; - console.warn("Format Error - Title formatter has returned a type of object, the only valid formatter object return is an instance of Node, the formatter returned:", contents); - } - break; - case "undefined": - case "null": - this.element.innerHTML = ""; - break; - default: - this.element.innerHTML = contents; - } - }else{ - el.innerHTML = title; - } -}; - - -//build header element for column group -Column.prototype._buildGroupHeader = function(){ - this.element.classList.add("tabulator-col-group"); - this.element.setAttribute("role", "columngroup"); - this.element.setAttribute("aria-title", this.definition.title); - - this.element.appendChild(this.groupElement); -}; - -//flat field lookup -Column.prototype._getFlatData = function(data){ - return data[this.field]; -}; - -//nested field lookup -Column.prototype._getNestedData = function(data){ - var dataObj = data, - structure = this.fieldStructure, - length = structure.length, - output; - - for(let i = 0; i < length; i++){ - - dataObj = dataObj[structure[i]]; - - output = dataObj; - - if(!dataObj){ - break; - } - } - - return output; -}; - -//flat field set -Column.prototype._setFlatData = function(data, value){ - data[this.field] = value; -}; - -//nested field set -Column.prototype._setNesteData = function(data, value){ - var dataObj = data, - structure = this.fieldStructure, - length = structure.length; - - for(let i = 0; i < length; i++){ - - if(i == length -1){ - dataObj[structure[i]] = value; - }else{ - if(!dataObj[structure[i]]){ - dataObj[structure[i]] = {}; - } - - dataObj = dataObj[structure[i]]; - } - } -}; - - -//attach column to this group -Column.prototype.attachColumn = function(column){ - var self = this; - - if(self.groupElement){ - self.columns.push(column); - self.groupElement.appendChild(column.getElement()); - }else{ - console.warn("Column Warning - Column being attached to another column instead of column group"); - } -}; - -//vertically align header in column -Column.prototype.verticalAlign = function(alignment, height){ - - //calculate height of column header and group holder element - var parentHeight = this.parent.isGroup ? this.parent.getGroupElement().clientHeight : (height || this.parent.getHeadersElement().clientHeight); - // var parentHeight = this.parent.isGroup ? this.parent.getGroupElement().clientHeight : this.parent.getHeadersElement().clientHeight; - - this.element.style.height = parentHeight + "px"; - - if(this.isGroup){ - this.groupElement.style.minHeight = (parentHeight - this.contentElement.offsetHeight) + "px"; - } - - //vertically align cell contents - if(!this.isGroup && alignment !== "top"){ - if(alignment === "bottom"){ - this.element.style.paddingTop = (this.element.clientHeight - this.contentElement.offsetHeight) + "px"; - }else{ - this.element.style.paddingTop = ((this.element.clientHeight - this.contentElement.offsetHeight) / 2) + "px"; - } - } - - this.columns.forEach(function(column){ - column.verticalAlign(alignment); - }); -}; - -//clear vertical alignmenet -Column.prototype.clearVerticalAlign = function(){ - this.element.style.paddingTop = ""; - this.element.style.height = ""; - this.element.style.minHeight = ""; - - this.columns.forEach(function(column){ - column.clearVerticalAlign(); - }); -}; - -//// Retreive Column Information //// - -//return column header element -Column.prototype.getElement = function(){ - return this.element; -}; - -//return colunm group element -Column.prototype.getGroupElement = function(){ - return this.groupElement; -}; - -//return field name -Column.prototype.getField = function(){ - return this.field; -}; - -//return the first column in a group -Column.prototype.getFirstColumn = function(){ - if(!this.isGroup){ - return this; - }else{ - if(this.columns.length){ - return this.columns[0].getFirstColumn(); - }else{ - return false; - } - } -}; - -//return the last column in a group -Column.prototype.getLastColumn = function(){ - if(!this.isGroup){ - return this; - }else{ - if(this.columns.length){ - return this.columns[this.columns.length -1].getLastColumn(); - }else{ - return false; - } - } -}; - -//return all columns in a group -Column.prototype.getColumns = function(){ - return this.columns; -}; - -//return all columns in a group -Column.prototype.getCells = function(){ - return this.cells; -}; - -//retreive the top column in a group of columns -Column.prototype.getTopColumn = function(){ - if(this.parent.isGroup){ - return this.parent.getTopColumn(); - }else{ - return this; - } -}; - -//return column definition object -Column.prototype.getDefinition = function(updateBranches){ - var colDefs = []; - - if(this.isGroup && updateBranches){ - this.columns.forEach(function(column){ - colDefs.push(column.getDefinition(true)); - }); - - this.definition.columns = colDefs; - } - - return this.definition; -}; - -//////////////////// Actions //////////////////// - -Column.prototype.checkColumnVisibility = function(){ - var visible = false; - - this.columns.forEach(function(column){ - if(column.visible){ - visible = true; - } - }); - - if(visible){ - this.show(); - this.parent.table.options.columnVisibilityChanged.call(this.table, this.getComponent(), false); - }else{ - this.hide(); - } - -}; - -//show column -Column.prototype.show = function(silent, responsiveToggle){ - if(!this.visible){ - this.visible = true; - - this.element.style.display = ""; - - this.table.columnManager._verticalAlignHeaders(); - - if(this.parent.isGroup){ - this.parent.checkColumnVisibility(); - } - - this.cells.forEach(function(cell){ - cell.show(); - }); - - if(this.table.options.persistentLayout && this.table.modExists("responsiveLayout", true)){ - this.table.modules.persistence.save("columns"); - } - - if(!responsiveToggle && this.table.options.responsiveLayout && this.table.modExists("responsiveLayout", true)){ - this.table.modules.responsiveLayout.updateColumnVisibility(this, this.visible); - } - - if(!silent){ - this.table.options.columnVisibilityChanged.call(this.table, this.getComponent(), true); - } - } -}; - -//hide column -Column.prototype.hide = function(silent, responsiveToggle){ - if(this.visible){ - this.visible = false; - - this.element.style.display = "none"; - - this.table.columnManager._verticalAlignHeaders(); - - if(this.parent.isGroup){ - this.parent.checkColumnVisibility(); - } - - this.cells.forEach(function(cell){ - cell.hide(); - }); - - if(this.table.options.persistentLayout && this.table.modExists("persistence", true)){ - this.table.modules.persistence.save("columns"); - } - - if(!responsiveToggle && this.table.options.responsiveLayout && this.table.modExists("responsiveLayout", true)){ - this.table.modules.responsiveLayout.updateColumnVisibility(this, this.visible); - } - - if(!silent){ - this.table.options.columnVisibilityChanged.call(this.table, this.getComponent(), false); - } - } -}; - -Column.prototype.matchChildWidths = function(){ - var childWidth = 0; - - if(this.contentElement && this.columns.length){ - this.columns.forEach(function(column){ - childWidth += column.getWidth(); - }); - - this.contentElement.style.maxWidth = (childWidth - 1) + "px"; - } -}; - -Column.prototype.setWidth = function(width){ - this.widthFixed = true; - this.setWidthActual(width); -}; - -Column.prototype.setWidthActual = function(width){ - - if(isNaN(width)){ - width = Math.floor((this.table.element.clientWidth/100) * parseInt(width)); - } - - width = Math.max(this.minWidth, width); - - this.width = width; - - this.element.style.width = width ? width + "px" : ""; - - if(!this.isGroup){ - this.cells.forEach(function(cell){ - cell.setWidth(width); - }); - } - - if(this.parent.isGroup){ - this.parent.matchChildWidths(); - } - - //set resizable handles - if(this.table.modExists("frozenColumns")){ - this.table.modules.frozenColumns.layout(); - } -}; - - -Column.prototype.checkCellHeights = function(){ - var rows = []; - - this.cells.forEach(function(cell){ - if(cell.row.heightInitialized){ - if(cell.row.getElement().offsetParent !== null){ - rows.push(cell.row); - cell.row.clearCellHeight(); - }else{ - cell.row.heightInitialized = false; - } - } - }); - - rows.forEach(function(row){ - row.calcHeight(); - }); - - rows.forEach(function(row){ - row.setCellHeight(); - }); -}; - -Column.prototype.getWidth = function(){ - // return this.element.offsetWidth; - return this.width; -}; - -Column.prototype.getHeight = function(){ - return this.element.offsetHeight; -}; - -Column.prototype.setMinWidth = function(minWidth){ - this.minWidth = minWidth; - - this.element.style.minWidth = minWidth ? minWidth + "px" : ""; - - this.cells.forEach(function(cell){ - cell.setMinWidth(minWidth); - }); -}; - -Column.prototype.delete = function(){ - if(this.isGroup){ - this.columns.forEach(function(column){ - column.delete(); - }); - } - - var cellCount = this.cells.length; - - for(let i = 0; i < cellCount; i++){ - this.cells[0].delete(); - } - - this.element.parentNode.removeChild(this.element); - - this.table.columnManager.deregisterColumn(this); -}; - -//////////////// Cell Management ///////////////// - -//generate cell for this column -Column.prototype.generateCell = function(row){ - var self = this; - - var cell = new Cell(self, row); - - this.cells.push(cell); - - return cell; -}; - -Column.prototype.reinitializeWidth = function(force){ - - this.widthFixed = false; - - //set width if present - if(typeof this.definition.width !== "undefined" && !force){ - this.setWidth(this.definition.width); - } - - //hide header filters to prevent them altering column width - if(this.table.modExists("filter")){ - this.table.modules.filter.hideHeaderFilterElements(); - } - - this.fitToData(); - - //show header filters again after layout is complete - if(this.table.modExists("filter")){ - this.table.modules.filter.showHeaderFilterElements(); - } -}; - -//set column width to maximum cell width -Column.prototype.fitToData = function(){ - var self = this; - - if(!this.widthFixed){ - this.element.width = ""; - - self.cells.forEach(function(cell){ - cell.setWidth(""); - }); - } - - var maxWidth = this.element.offsetWidth; - - if(!self.width || !this.widthFixed){ - self.cells.forEach(function(cell){ - var width = cell.getWidth(); - - if(width > maxWidth){ - maxWidth = width; - } - }); - - if(maxWidth){ - self.setWidthActual(maxWidth + 1); - } - - } -}; - -Column.prototype.deleteCell = function(cell){ - var index = this.cells.indexOf(cell); - - if(index > -1){ - this.cells.splice(index, 1); - } -}; - -//////////////// Event Bindings ///////////////// - -//////////////// Object Generation ///////////////// -Column.prototype.getComponent = function(){ - return new ColumnComponent(this); -}; \ No newline at end of file diff --git a/Gems/AssetMemoryAnalyzer/External/tabulator-master/src/js/column_manager.js b/Gems/AssetMemoryAnalyzer/External/tabulator-master/src/js/column_manager.js deleted file mode 100644 index 9dc1056977..0000000000 --- a/Gems/AssetMemoryAnalyzer/External/tabulator-master/src/js/column_manager.js +++ /dev/null @@ -1,553 +0,0 @@ -var ColumnManager = function(table){ - this.table = table; //hold parent table - this.headersElement = this.createHeadersElement(); - this.element = this.createHeaderElement(); //containing element - this.rowManager = null; //hold row manager object - this.columns = []; // column definition object - this.columnsByIndex = []; //columns by index - this.columnsByField = []; //columns by field - this.scrollLeft = 0; - - this.element.insertBefore(this.headersElement, this.element.firstChild); -}; - -////////////// Setup Functions ///////////////// - -ColumnManager.prototype.createHeadersElement = function (){ - var el = document.createElement("div"); - - el.classList.add("tabulator-headers"); - - return el; -}; - -ColumnManager.prototype.createHeaderElement = function (){ - var el = document.createElement("div"); - - el.classList.add("tabulator-header"); - - return el; -}; - -//link to row manager -ColumnManager.prototype.setRowManager = function(manager){ - this.rowManager = manager; -}; - -//return containing element -ColumnManager.prototype.getElement = function(){ - return this.element; -}; - -//return header containing element -ColumnManager.prototype.getHeadersElement = function(){ - return this.headersElement; -}; - -//scroll horizontally to match table body -ColumnManager.prototype.scrollHorizontal = function(left){ - var hozAdjust = 0, - scrollWidth = this.element.scrollWidth - this.table.element.clientWidth; - - this.element.scrollLeft = left; - - //adjust for vertical scrollbar moving table when present - if(left > scrollWidth){ - hozAdjust = left - scrollWidth; - this.element.style.marginLeft = (-(hozAdjust)) + "px"; - }else{ - this.element.style.marginLeft = 0; - } - - //keep frozen columns fixed in position - //this._calcFrozenColumnsPos(hozAdjust + 3); - - this.scrollLeft = left; - - if(this.table.modExists("frozenColumns")){ - this.table.modules.frozenColumns.layout(); - } -}; - - -///////////// Column Setup Functions ///////////// - -ColumnManager.prototype.setColumns = function(cols, row){ - var self = this; - - while(self.headersElement.firstChild) self.headersElement.removeChild(self.headersElement.firstChild); - - self.columns = []; - self.columnsByIndex = []; - self.columnsByField = []; - - - //reset frozen columns - if(self.table.modExists("frozenColumns")){ - self.table.modules.frozenColumns.reset(); - } - - cols.forEach(function(def, i){ - self._addColumn(def); - }); - - self._reIndexColumns(); - - if(self.table.options.responsiveLayout && self.table.modExists("responsiveLayout", true)){ - self.table.modules.responsiveLayout.initialize(); - } - - self.redraw(true); -}; - -ColumnManager.prototype._addColumn = function(definition, before, nextToColumn){ - var column = new Column(definition, this), - colEl = column.getElement(), - index = nextToColumn ? this.findColumnIndex(nextToColumn) : nextToColumn; - - if(nextToColumn && index > -1){ - - var parentIndex = this.columns.indexOf(nextToColumn.getTopColumn()); - var nextEl = nextToColumn.getElement(); - - if(before){ - this.columns.splice(parentIndex, 0, column); - nextEl.parentNode.insertBefore(colEl, nextEl); - }else{ - this.columns.splice(parentIndex + 1, 0, column); - nextEl.parentNode.insertBefore(colEl, nextEl.nextSibling); - } - - }else{ - if(before){ - this.columns.unshift(column); - this.headersElement.insertBefore(column.getElement(), this.headersElement.firstChild); - }else{ - this.columns.push(column); - this.headersElement.appendChild(column.getElement()); - } - } - - return column; -}; - -ColumnManager.prototype.registerColumnField = function(col){ - if(col.definition.field){ - this.columnsByField[col.definition.field] = col; - } -}; - -ColumnManager.prototype.registerColumnPosition = function(col){ - this.columnsByIndex.push(col); -}; - -ColumnManager.prototype._reIndexColumns = function(){ - this.columnsByIndex = []; - - this.columns.forEach(function(column){ - column.reRegisterPosition(); - }); -}; - -//ensure column headers take up the correct amount of space in column groups -ColumnManager.prototype._verticalAlignHeaders = function(){ - var self = this, minHeight = 0; - - self.columns.forEach(function(column){ - var height; - - column.clearVerticalAlign(); - - height = column.getHeight(); - - if(height > minHeight){ - minHeight = height; - } - }); - - self.columns.forEach(function(column){ - column.verticalAlign(self.table.options.columnVertAlign, minHeight); - }); - - self.rowManager.adjustTableSize(); -}; - -//////////////// Column Details ///////////////// - -ColumnManager.prototype.findColumn = function(subject){ - var self = this; - - if(typeof subject == "object"){ - - if(subject instanceof Column){ - //subject is column element - return subject; - }else if(subject instanceof ColumnComponent){ - //subject is public column component - return subject._getSelf() || false; - }else if(subject instanceof HTMLElement){ - //subject is a HTML element of the column header - let match = self.columns.find(function(column){ - return column.element === subject; - }); - - return match || false; - } - - }else{ - //subject should be treated as the field name of the column - return this.columnsByField[subject] || false; - } - - //catch all for any other type of input - - return false; -}; - -ColumnManager.prototype.getColumnByField = function(field){ - return this.columnsByField[field]; -}; - -ColumnManager.prototype.getColumnByIndex = function(index){ - return this.columnsByIndex[index]; -}; - -ColumnManager.prototype.getColumns = function(){ - return this.columns; -}; - -ColumnManager.prototype.findColumnIndex = function(column){ - return this.columnsByIndex.findIndex(function(col){ - return column === col; - }); -}; - -//return all columns that are not groups -ColumnManager.prototype.getRealColumns = function(){ - return this.columnsByIndex; -}; - -//travers across columns and call action -ColumnManager.prototype.traverse = function(callback){ - var self = this; - - self.columnsByIndex.forEach(function(column,i){ - callback(column, i); - }); -}; - -//get defintions of actual columns -ColumnManager.prototype.getDefinitions = function(active){ - var self = this, - output = []; - - self.columnsByIndex.forEach(function(column){ - if(!active || (active && column.visible)){ - output.push(column.getDefinition()); - } - }); - - return output; -}; - -//get full nested definition tree -ColumnManager.prototype.getDefinitionTree = function(){ - var self = this, - output = []; - - self.columns.forEach(function(column){ - output.push(column.getDefinition(true)); - }); - - return output; -}; - -ColumnManager.prototype.getComponents = function(structured){ - var self = this, - output = [], - columns = structured ? self.columns : self.columnsByIndex; - - columns.forEach(function(column){ - output.push(column.getComponent()); - }); - - return output; -}; - -ColumnManager.prototype.getWidth = function(){ - var width = 0; - - this.columnsByIndex.forEach(function(column){ - if(column.visible){ - width += column.getWidth(); - } - }); - - return width; -}; - -ColumnManager.prototype.moveColumn = function(from, to, after){ - - this._moveColumnInArray(this.columns, from, to, after); - this._moveColumnInArray(this.columnsByIndex, from, to, after, true); - - if(this.table.options.responsiveLayout && this.table.modExists("responsiveLayout", true)){ - this.table.modules.responsiveLayout.initialize(); - } - - if(this.table.options.columnMoved){ - this.table.options.columnMoved.call(this.table, from.getComponent(), this.table.columnManager.getComponents()); - } - - if(this.table.options.persistentLayout && this.table.modExists("persistence", true)){ - this.table.modules.persistence.save("columns"); - } -}; - -ColumnManager.prototype._moveColumnInArray = function(columns, from, to, after, updateRows){ - var fromIndex = columns.indexOf(from), - toIndex; - - if (fromIndex > -1) { - - columns.splice(fromIndex, 1); - - toIndex = columns.indexOf(to); - - if (toIndex > -1) { - - if(after){ - toIndex = toIndex+1; - } - - }else{ - toIndex = fromIndex; - } - - columns.splice(toIndex, 0, from); - - if(updateRows){ - - this.table.rowManager.rows.forEach(function(row){ - if(row.cells.length){ - var cell = row.cells.splice(fromIndex, 1)[0]; - row.cells.splice(toIndex, 0, cell); - } - }); - } - } -}; - -ColumnManager.prototype.scrollToColumn = function(column, position, ifVisible){ - var left = 0, - offset = 0, - adjust = 0, - colEl = column.getElement(); - - return new Promise((resolve, reject) => { - - if(typeof position === "undefined"){ - position = this.table.options.scrollToColumnPosition; - } - - if(typeof ifVisible === "undefined"){ - ifVisible = this.table.options.scrollToColumnIfVisible; - } - - if(column.visible){ - - //align to correct position - switch(position){ - case "middle": - case "center": - adjust = -this.element.clientWidth / 2; - break; - - case "right": - adjust = colEl.clientWidth - this.headersElement.clientWidth; - break; - } - - //check column visibility - if(!ifVisible){ - - offset = colEl.offsetLeft; - - if(offset > 0 && offset + colEl.offsetWidth < this.element.clientWidth){ - return false; - } - } - - //calculate scroll position - left = colEl.offsetLeft + this.element.scrollLeft + adjust; - - left = Math.max(Math.min(left, this.table.rowManager.element.scrollWidth - this.table.rowManager.element.clientWidth),0); - - this.table.rowManager.scrollHorizontal(left); - this.scrollHorizontal(left); - - resolve(); - }else{ - console.warn("Scroll Error - Column not visible"); - reject("Scroll Error - Column not visible"); - } - - }); -}; - -//////////////// Cell Management ///////////////// - -ColumnManager.prototype.generateCells = function(row){ - var self = this; - - var cells = []; - - self.columnsByIndex.forEach(function(column){ - cells.push(column.generateCell(row)); - }); - - return cells; -}; - -//////////////// Column Management ///////////////// - - -ColumnManager.prototype.getFlexBaseWidth = function(){ - var self = this, - totalWidth = self.table.element.clientWidth, //table element width - fixedWidth = 0; - - //adjust for vertical scrollbar if present - if(self.rowManager.element.scrollHeight > self.rowManager.element.clientHeight){ - totalWidth -= self.rowManager.element.offsetWidth - self.rowManager.element.clientWidth; - } - - this.columnsByIndex.forEach(function(column){ - var width, minWidth, colWidth; - - if(column.visible){ - - width = column.definition.width || 0; - - minWidth = typeof column.minWidth == "undefined" ? self.table.options.columnMinWidth : parseInt(column.minWidth); - - if(typeof(width) == "string"){ - if(width.indexOf("%") > -1){ - colWidth = (totalWidth / 100) * parseInt(width) ; - }else{ - colWidth = parseInt(width); - } - }else{ - colWidth = width; - } - - fixedWidth += colWidth > minWidth ? colWidth : minWidth; - - } - }); - - return fixedWidth; -}; - -ColumnManager.prototype.addColumn = function(definition, before, nextToColumn){ - var column = this._addColumn(definition, before, nextToColumn); - - this._reIndexColumns(); - - if(this.table.options.responsiveLayout && this.table.modExists("responsiveLayout", true)){ - this.table.modules.responsiveLayout.initialize(); - } - - if(this.table.modExists("columnCalcs")){ - this.table.modules.columnCalcs.recalc(this.table.rowManager.activeRows); - } - - this.redraw(); - - if(this.table.modules.layout.getMode() != "fitColumns"){ - column.reinitializeWidth(); - } - - this._verticalAlignHeaders(); - - this.table.rowManager.reinitialize(); -}; - -//remove column from system -ColumnManager.prototype.deregisterColumn = function(column){ - var field = column.getField(), - index; - - //remove from field list - if(field){ - delete this.columnsByField[field]; - } - - //remove from index list - index = this.columnsByIndex.indexOf(column); - - if(index > -1){ - this.columnsByIndex.splice(index, 1); - } - - //remove from column list - index = this.columns.indexOf(column); - - if(index > -1){ - this.columns.splice(index, 1); - } - - if(this.table.options.responsiveLayout && this.table.modExists("responsiveLayout", true)){ - this.table.modules.responsiveLayout.initialize(); - } - - this.redraw(); -}; - -//redraw columns -ColumnManager.prototype.redraw = function(force){ - if(force){ - - if(Tabulator.prototype.helpers.elVisible(this.element)){ - this._verticalAlignHeaders(); - } - - this.table.rowManager.resetScroll(); - this.table.rowManager.reinitialize(); - } - - if(this.table.modules.layout.getMode() == "fitColumns"){ - this.table.modules.layout.layout(); - }else{ - if(force){ - this.table.modules.layout.layout(); - }else{ - if(this.table.options.responsiveLayout && this.table.modExists("responsiveLayout", true)){ - this.table.modules.responsiveLayout.update(); - } - } - } - - if(this.table.modExists("frozenColumns")){ - this.table.modules.frozenColumns.layout(); - } - - if(this.table.modExists("columnCalcs")){ - this.table.modules.columnCalcs.recalc(this.table.rowManager.activeRows); - } - - if(force){ - if(this.table.options.persistentLayout && this.table.modExists("persistence", true)){ - this.table.modules.persistence.save("columns"); - } - - if(this.table.modExists("columnCalcs")){ - this.table.modules.columnCalcs.redraw(); - } - } - - this.table.footerManager.redraw(); - - - -}; diff --git a/Gems/AssetMemoryAnalyzer/External/tabulator-master/src/js/core.js b/Gems/AssetMemoryAnalyzer/External/tabulator-master/src/js/core.js deleted file mode 100644 index 3a3d69f910..0000000000 --- a/Gems/AssetMemoryAnalyzer/External/tabulator-master/src/js/core.js +++ /dev/null @@ -1,1691 +0,0 @@ -'use strict'; - -/*=include polyfills.js */ - -/*=include column_manager.js */ -/*=include column.js */ -/*=include row_manager.js */ -/*=include row.js */ -/*=include cell.js */ -/*=include footer_manager.js */ - -var Tabulator = function(element, options){ - - this.options = {}; - - this.columnManager = null; // hold Column Manager - this.rowManager = null; //hold Row Manager - this.footerManager = null; //holder Footer Manager - this.browser = ""; //hold current browser type - this.browserSlow = false; //handle reduced functionality for slower browsers - - this.modules = {}; //hold all modules bound to this table - - this.initializeElement(element); - this.initializeOptions(options || {}); - this._create(); - - Tabulator.prototype.comms.register(this); //register table for inderdevice communication -}; - -//default setup options -Tabulator.prototype.defaultOptions = { - - height:false, //height of tabulator - - layout:"fitData", ///layout type "fitColumns" | "fitData" - layoutColumnsOnNewData:false, //update column widths on setData - - columnMinWidth:40, //minimum global width for a column - columnVertAlign:"top", //vertical alignment of column headers - - resizableColumns:true, //resizable columns - resizableRows:false, //resizable rows - autoResize:true, //auto resize table - - columns:[],//store for colum header info - - data:[], //default starting data - - nestedFieldSeparator:".", //seperatpr for nested data - - tooltips: false, //Tool tip value - tooltipsHeader: false, //Tool tip for headers - tooltipGenerationMode:"load", //when to generate tooltips - - initialSort:false, //initial sorting criteria - initialFilter:false, //initial filtering criteria - - columnHeaderSortMulti: true, //multiple or single column sorting - - sortOrderReverse:false, //reverse internal sort ordering - - footerElement:false, //hold footer element - - index:"id", //filed for row index - - keybindings:[], //array for keybindings - - clipboard:false, //enable clipboard - clipboardCopyStyled:true, //formatted table data - clipboardCopySelector:"active", //method of chosing which data is coppied to the clipboard - clipboardCopyFormatter:"table", //convert data to a clipboard string - clipboardPasteParser:"table", //convert pasted clipboard data to rows - clipboardPasteAction:"insert", //how to insert pasted data into the table - clipboardCopyConfig:false, //clipboard config - - clipboardCopied:function(){}, //data has been copied to the clipboard - clipboardPasted:function(){}, //data has been pasted into the table - clipboardPasteError:function(){}, //data has not successfully been pasted into the table - - downloadDataFormatter:false, //function to manipulate table data before it is downloaded - downloadReady:function(data, blob){return blob;}, //function to manipulate download data - downloadComplete:false, //function to manipulate download data - downloadConfig:false, //download config - - dataTree:false, //enable data tree - dataTreeBranchElement: true, //show data tree branch element - dataTreeChildIndent:9, //data tree child indent in px - dataTreeChildField:"_children", //data tre column field to look for child rows - dataTreeCollapseElement:false, //data tree row collapse element - dataTreeExpandElement:false, //data tree row expand element - dataTreeStartExpanded:false, - dataTreeRowExpanded:function(){}, //row has been expanded - dataTreeRowCollapsed:function(){}, //row has been collapsed - - - addRowPos:"bottom", //position to insert blank rows, top|bottom - - selectable:"highlight", //highlight rows on hover - selectableRangeMode: "drag", //highlight rows on hover - selectableRollingSelection:true, //roll selection once maximum number of selectable rows is reached - selectablePersistence:true, // maintain selection when table view is updated - selectableCheck:function(data, row){return true;}, //check wheather row is selectable - - headerFilterPlaceholder: false, //placeholder text to display in header filters - - history:false, //enable edit history - - locale:false, //current system language - langs:{}, - - virtualDom:true, //enable DOM virtualization - - persistentLayout:false, //store column layout in memory - persistentSort:false, //store sorting in memory - persistentFilter:false, //store filters in memory - persistenceID:"", //key for persistent storage - persistenceMode:true, //mode for storing persistence information - - responsiveLayout:false, //responsive layout flags - responsiveLayoutCollapseStartOpen:true, //start showing collapsed data - responsiveLayoutCollapseUseFormatters:true, //responsive layout collapse formatter - responsiveLayoutCollapseFormatter:false, //responsive layout collapse formatter - - pagination:false, //set pagination type - paginationSize:false, //set number of rows to a page - paginationButtonCount: 5, // set count of page button - paginationElement:false, //element to hold pagination numbers - paginationDataSent:{}, //pagination data sent to the server - paginationDataReceived:{}, //pagination data received from the server - paginationAddRow: "page", //add rows on table or page - - ajaxURL:false, //url for ajax loading - ajaxURLGenerator:false, - ajaxParams:{}, //params for ajax loading - ajaxConfig:"get", //ajax request type - ajaxContentType:"form", //ajax request type - ajaxRequestFunc:false, //promise function - ajaxLoader:true, //show loader - ajaxLoaderLoading:false, //loader element - ajaxLoaderError:false, //loader element - ajaxFiltering:false, - ajaxSorting:false, - ajaxProgressiveLoad:false, //progressive loading - ajaxProgressiveLoadDelay:0, //delay between requests - ajaxProgressiveLoadScrollMargin:0, //margin before scroll begins - - groupBy:false, //enable table grouping and set field to group by - groupStartOpen:true, //starting state of group - groupValues:false, - - groupHeader:false, //header generation function - - movableColumns:false, //enable movable columns - - movableRows:false, //enable movable rows - movableRowsConnectedTables:false, //tables for movable rows to be connected to - movableRowsSender:false, - movableRowsReceiver:"insert", - movableRowsSendingStart:function(){}, - movableRowsSent:function(){}, - movableRowsSentFailed:function(){}, - movableRowsSendingStop:function(){}, - movableRowsReceivingStart:function(){}, - movableRowsReceived:function(){}, - movableRowsReceivedFailed:function(){}, - movableRowsReceivingStop:function(){}, - - scrollToRowPosition:"top", - scrollToRowIfVisible:true, - - scrollToColumnPosition:"left", - scrollToColumnIfVisible:true, - - rowFormatter:false, - - placeholder:false, - - //table building callbacks - tableBuilding:function(){}, - tableBuilt:function(){}, - - //render callbacks - renderStarted:function(){}, - renderComplete:function(){}, - - //row callbacks - rowClick:false, - rowDblClick:false, - rowContext:false, - rowTap:false, - rowDblTap:false, - rowTapHold:false, - rowAdded:function(){}, - rowDeleted:function(){}, - rowMoved:function(){}, - rowUpdated:function(){}, - rowSelectionChanged:function(){}, - rowSelected:function(){}, - rowDeselected:function(){}, - rowResized:function(){}, - - //cell callbacks - //row callbacks - cellClick:false, - cellDblClick:false, - cellContext:false, - cellTap:false, - cellDblTap:false, - cellTapHold:false, - cellEditing:function(){}, - cellEdited:function(){}, - cellEditCancelled:function(){}, - - //column callbacks - columnMoved:false, - columnResized:function(){}, - columnTitleChanged:function(){}, - columnVisibilityChanged:function(){}, - - //HTML iport callbacks - htmlImporting:function(){}, - htmlImported:function(){}, - - //data callbacks - dataLoading:function(){}, - dataLoaded:function(){}, - dataEdited:function(){}, - - //ajax callbacks - ajaxRequesting:function(){}, - ajaxResponse:false, - ajaxError:function(){}, - - //filtering callbacks - dataFiltering:false, - dataFiltered:false, - - //sorting callbacks - dataSorting:function(){}, - dataSorted:function(){}, - - //grouping callbacks - groupToggleElement:"arrow", - groupClosedShowCalcs:false, - dataGrouping:function(){}, - dataGrouped:false, - groupVisibilityChanged:function(){}, - groupClick:false, - groupDblClick:false, - groupContext:false, - groupTap:false, - groupDblTap:false, - groupTapHold:false, - - columnCalcs:true, - - //pagination callbacks - pageLoaded:function(){}, - - //localization callbacks - localized:function(){}, - - //validation has failed - validationFailed:function(){}, - - //history callbacks - historyUndo:function(){}, - historyRedo:function(){}, - -}; - -Tabulator.prototype.initializeOptions = function(options){ - for (var key in this.defaultOptions){ - if(key in options){ - this.options[key] = options[key]; - }else{ - if(Array.isArray(this.defaultOptions[key])){ - this.options[key] = []; - }else if(typeof this.defaultOptions[key] === "object"){ - this.options[key] = {}; - }else{ - this.options[key] = this.defaultOptions[key]; - } - } - } -}; - -Tabulator.prototype.initializeElement = function(element){ - - if(element instanceof HTMLElement){ - this.element = element; - return true; - }else if(typeof element === "string"){ - this.element = document.querySelector(element); - - if(this.element){ - return true; - }else{ - console.error("Tabulator Creation Error - no element found matching selector: ", element); - return false; - } - }else{ - console.error("Tabulator Creation Error - Invalid element provided:", element); - return false; - } - -}; - - -//convert depricated functionality to new functions -Tabulator.prototype._mapDepricatedFunctionality = function(){ - -}; - -//concreate table -Tabulator.prototype._create = function(){ - this._clearObjectPointers(); - - this._mapDepricatedFunctionality(); - - this.bindModules(); - - if(this.element.tagName === "TABLE"){ - if(this.modExists("htmlTableImport", true)){ - this.modules.htmlTableImport.parseTable(); - } - } - - this.columnManager = new ColumnManager(this); - this.rowManager = new RowManager(this); - this.footerManager = new FooterManager(this); - - this.columnManager.setRowManager(this.rowManager); - this.rowManager.setColumnManager(this.columnManager); - - this._buildElement(); - - this._loadInitialData(); -}; - -//clear pointers to objects in default config object -Tabulator.prototype._clearObjectPointers = function(){ - this.options.columns = this.options.columns.slice(0); - this.options.data = this.options.data.slice(0); -}; - - -//build tabulator element -Tabulator.prototype._buildElement = function(){ - var element = this.element, - mod = this.modules, - options = this.options; - - options.tableBuilding.call(this); - - element.classList.add("tabulator"); - element.setAttribute("role", "grid"); - - //empty element - while(element.firstChild) element.removeChild(element.firstChild); - - //set table height - if(options.height){ - options.height = isNaN(options.height) ? options.height : options.height + "px"; - element.style.height = options.height; - } - - this.rowManager.initialize(); - - this._detectBrowser(); - - if(this.modExists("layout", true)){ - mod.layout.initialize(options.layout); - } - - //set localization - if(options.headerFilterPlaceholder !== false){ - mod.localize.setHeaderFilterPlaceholder(options.headerFilterPlaceholder); - } - - for(let locale in options.langs){ - mod.localize.installLang(locale, options.langs[locale]); - } - - mod.localize.setLocale(options.locale); - - //configure placeholder element - if(typeof options.placeholder == "string"){ - - var el = document.createElement("div"); - el.classList.add("tabulator-placeholder"); - - var span = document.createElement("span"); - span.innerHTML = options.placeholder; - - el.appendChild(span); - - options.placeholder = el; - } - - //build table elements - element.appendChild(this.columnManager.getElement()); - element.appendChild(this.rowManager.getElement()); - - - if(options.footerElement){ - this.footerManager.activate(); - } - - if(options.dataTree && this.modExists("dataTree", true)){ - mod.dataTree.initialize(); - } - - if( (options.persistentLayout || options.persistentSort || options.persistentFilter) && this.modExists("persistence", true)){ - mod.persistence.initialize(options.persistenceMode, options.persistenceID); - } - - if(options.persistentLayout && this.modExists("persistence", true)){ - options.columns = mod.persistence.load("columns", options.columns) ; - } - - if(options.movableRows && this.modExists("moveRow")){ - mod.moveRow.initialize(); - } - - if(this.modExists("columnCalcs")){ - mod.columnCalcs.initialize(); - } - - this.columnManager.setColumns(options.columns); - - if(this.modExists("frozenRows")){ - this.modules.frozenRows.initialize(); - } - - if((options.persistentSort || options.initialSort) && this.modExists("sort", true)){ - var sorters = []; - - if(options.persistentSort && this.modExists("persistence", true)){ - sorters = mod.persistence.load("sort"); - - if(sorters === false && options.initialSort){ - sorters = options.initialSort; - } - }else if(options.initialSort){ - sorters = options.initialSort; - } - - mod.sort.setSort(sorters); - } - - if((options.persistentFilter || options.initialFilter) && this.modExists("filter", true)){ - var filters = []; - - - if(options.persistentFilter && this.modExists("persistence", true)){ - filters = mod.persistence.load("filter"); - - if(filters === false && options.initialFilter){ - filters = options.initialFilter; - } - }else if(options.initialFilter){ - filters = options.initialFilter; - } - - mod.filter.setFilter(filters); - // this.setFilter(filters); - } - - if(this.modExists("ajax")){ - mod.ajax.initialize(); - } - - if(options.pagination && this.modExists("page", true)){ - mod.page.initialize(); - } - - if(options.groupBy && this.modExists("groupRows", true)){ - mod.groupRows.initialize(); - } - - if(this.modExists("keybindings")){ - mod.keybindings.initialize(); - } - - if(this.modExists("selectRow")){ - mod.selectRow.clearSelectionData(true); - } - - if(options.autoResize && this.modExists("resizeTable")){ - mod.resizeTable.initialize(); - } - - if(this.modExists("clipboard")){ - mod.clipboard.initialize(); - } - - options.tableBuilt.call(this); -}; - -Tabulator.prototype._loadInitialData = function(){ - var self = this; - - if(self.options.pagination && self.modExists("page")){ - self.modules.page.reset(true); - - if(self.options.pagination == "local"){ - if(self.options.data.length){ - self.rowManager.setData(self.options.data); - }else{ - if((self.options.ajaxURL || self.options.ajaxURLGenerator) && self.modExists("ajax")){ - self.modules.ajax.loadData(); - }else{ - self.rowManager.setData(self.options.data); - } - } - }else{ - self.modules.page.setPage(1); - } - }else{ - if(self.options.data.length){ - self.rowManager.setData(self.options.data); - }else{ - if((self.options.ajaxURL || self.options.ajaxURLGenerator) && self.modExists("ajax")){ - self.modules.ajax.loadData(); - }else{ - self.rowManager.setData(self.options.data); - } - } - } -}; - -//deconstructor -Tabulator.prototype.destroy = function(){ - var element = this.element; - - Tabulator.prototype.comms.deregister(this); //deregister table from inderdevice communication - - //clear row data - this.rowManager.rows.forEach(function(row){ - row.wipe(); - }); - - this.rowManager.rows = []; - this.rowManager.activeRows = []; - this.rowManager.displayRows = []; - - //clear event bindings - if(this.options.autoResize && this.modExists("resizeTable")){ - this.modules.resizeTable.clearBindings(); - } - - if(this.modExists("keybindings")){ - this.modules.keybindings.clearBindings(); - } - - //clear DOM - while(element.firstChild) element.removeChild(element.firstChild); - element.classList.remove("tabulator"); -}; - -Tabulator.prototype._detectBrowser = function(){ - var ua = navigator.userAgent; - - if(ua.indexOf("Trident") > -1){ - this.browser = "ie"; - this.browserSlow = true; - }else if(ua.indexOf("Edge") > -1){ - this.browser = "edge"; - this.browserSlow = true; - }else if(ua.indexOf("Firefox") > -1){ - this.browser = "firefox"; - this.browserSlow = false; - }else{ - this.browser = "other"; - this.browserSlow = false; - } -}; - -////////////////// Data Handling ////////////////// - - -//load data -Tabulator.prototype.setData = function(data, params, config){ - if(this.modExists("ajax")){ - this.modules.ajax.blockActiveRequest(); - } - - return this._setData(data, params, config); -}; - -Tabulator.prototype._setData = function(data, params, config, inPosition){ - var self = this; - - if(typeof(data) === "string"){ - if (data.indexOf("{") == 0 || data.indexOf("[") == 0){ - //data is a json encoded string - return self.rowManager.setData(JSON.parse(data), inPosition); - }else{ - - if(self.modExists("ajax", true)){ - if(params){ - self.modules.ajax.setParams(params); - } - - if(config){ - self.modules.ajax.setConfig(config); - } - - self.modules.ajax.setUrl(data); - - if(self.options.pagination == "remote" && self.modExists("page", true)){ - self.modules.page.reset(true); - return self.modules.page.setPage(1); - }else{ - //assume data is url, make ajax call to url to get data - return self.modules.ajax.loadData(inPosition); - } - } - } - }else{ - if(data){ - //asume data is already an object - return self.rowManager.setData(data, inPosition); - }else{ - - //no data provided, check if ajaxURL is present; - if(self.modExists("ajax") && (self.modules.ajax.getUrl || self.options.ajaxURLGenerator)){ - - if(self.options.pagination == "remote" && self.modExists("page", true)){ - self.modules.page.reset(true); - return self.modules.page.setPage(1); - }else{ - return self.modules.ajax.loadData(inPosition); - } - - }else{ - //empty data - return self.rowManager.setData([], inPosition); - } - } - } - }; - -//clear data -Tabulator.prototype.clearData = function(){ - if(this.modExists("ajax")){ - this.modules.ajax.blockActiveRequest(); - } - - this.rowManager.clearData(); -}; - -//get table data array -Tabulator.prototype.getData = function(active){ - return this.rowManager.getData(active); -}; - -//get table data array count -Tabulator.prototype.getDataCount = function(active){ - return this.rowManager.getDataCount(active); -}; - -//search for specific row components -Tabulator.prototype.searchRows = function(field, type, value){ - if(this.modExists("filter", true)){ - return this.modules.filter.search("rows", field, type, value); - } -}; - -//search for specific data -Tabulator.prototype.searchData = function(field, type, value){ - if(this.modExists("filter", true)){ - return this.modules.filter.search("data", field, type, value); - } -}; - -//get table html -Tabulator.prototype.getHtml = function(active){ - return this.rowManager.getHtml(active); -}; - -//retrieve Ajax URL -Tabulator.prototype.getAjaxUrl = function(){ - if(this.modExists("ajax", true)){ - return this.modules.ajax.getUrl(); - } -}; - -//replace data, keeping table in position with same sort -Tabulator.prototype.replaceData = function(data, params, config){ - if(this.modExists("ajax")){ - this.modules.ajax.blockActiveRequest(); - } - - return this._setData(data, params, config, true); -}; - - -//update table data -Tabulator.prototype.updateData = function(data){ - var self = this; - var responses = 0; - - return new Promise((resolve, reject) => { - if(this.modExists("ajax")){ - this.modules.ajax.blockActiveRequest(); - } - - if(typeof data === "string"){ - data = JSON.parse(data); - } - - if(data){ - data.forEach(function(item){ - var row = self.rowManager.findRow(item[self.options.index]); - - if(row){ - responses++; - - row.updateData(item) - .then(()=>{ - responses--; - - if(!responses){ - resolve(); - } - }); - } - }); - }else{ - console.warn("Update Error - No data provided"); - reject("Update Error - No data provided"); - } - }); - -}; - -Tabulator.prototype.addData = function(data, pos, index){ - return new Promise((resolve, reject) => { - if(this.modExists("ajax")){ - this.modules.ajax.blockActiveRequest(); - } - - if(typeof data === "string"){ - data = JSON.parse(data); - } - - if(data){ - this.rowManager.addRows(data, pos, index) - .then((rows) => { - var output = []; - - rows.forEach(function(row){ - output.push(row.getComponent()); - }); - - resolve(output); - }); - }else{ - console.warn("Update Error - No data provided"); - reject("Update Error - No data provided"); - } - }); -}; - -//update table data -Tabulator.prototype.updateOrAddData = function(data){ - var self = this, - rows = [], - responses = 0; - - return new Promise((resolve, reject) => { - if(this.modExists("ajax")){ - this.modules.ajax.blockActiveRequest(); - } - - if(typeof data === "string"){ - data = JSON.parse(data); - } - - if(data){ - data.forEach(function(item){ - var row = self.rowManager.findRow(item[self.options.index]); - - responses++; - - if(row){ - row.updateData(item) - .then(()=>{ - responses--; - rows.push(row.getComponent()); - - if(!responses){ - resolve(rows); - } - }); - }else{ - self.rowManager.addRows(item) - .then((newRows)=>{ - responses--; - rows.push(newRows[0].getComponent()); - - if(!responses){ - resolve(rows); - } - }); - } - }); - }else{ - console.warn("Update Error - No data provided"); - reject("Update Error - No data provided"); - } - }); -}; - -//get row object -Tabulator.prototype.getRow = function(index){ - var row = this.rowManager.findRow(index); - - if(row){ - return row.getComponent(); - }else{ - console.warn("Find Error - No matching row found:", index); - return false; - } -}; - -//get row object -Tabulator.prototype.getRowFromPosition = function(position, active){ - var row = this.rowManager.getRowFromPosition(position, active); - - if(row){ - return row.getComponent(); - }else{ - console.warn("Find Error - No matching row found:", position); - return false; - } -}; - -//delete row from table -Tabulator.prototype.deleteRow = function(index){ - return new Promise((resolve, reject) => { - var row = this.rowManager.findRow(index); - - if(row){ - row.delete() - .then(() => { - resolve(); - }) - .catch((err) => { - reject(err); - }); - - }else{ - console.warn("Delete Error - No matching row found:", index); - reject("Delete Error - No matching row found") - } - }); -}; - -//add row to table -Tabulator.prototype.addRow = function(data, pos, index){ - return new Promise((resolve, reject) => { - if(typeof data === "string"){ - data = JSON.parse(data); - } - - this.rowManager.addRows(data, pos, index) - .then((rows)=>{ - //recalc column calculations if present - if(this.modExists("columnCalcs")){ - this.modules.columnCalcs.recalc(this.rowManager.activeRows); - } - - resolve(rows[0].getComponent()); - }); - }); -}; - -//update a row if it exitsts otherwise create it -Tabulator.prototype.updateOrAddRow = function(index, data){ - return new Promise((resolve, reject) => { - var row = this.rowManager.findRow(index); - - if(typeof data === "string"){ - data = JSON.parse(data); - } - - if(row){ - row.updateData(data) - .then(()=>{ - //recalc column calculations if present - if(this.modExists("columnCalcs")){ - this.modules.columnCalcs.recalc(this.rowManager.activeRows); - } - - resolve(row.getComponent()); - }) - .catch((err)=>{ - reject(err); - }); - }else{ - row = this.rowManager.addRows(data) - .then((rows)=>{ - //recalc column calculations if present - if(this.modExists("columnCalcs")){ - this.modules.columnCalcs.recalc(this.rowManager.activeRows); - } - - resolve(rows[0].getComponent()); - }) - .catch((err)=>{ - reject(err); - }); - } - }); -}; - -//update row data -Tabulator.prototype.updateRow = function(index, data){ - return new Promise((resolve, reject) => { - var row = this.rowManager.findRow(index); - - if(typeof data === "string"){ - data = JSON.parse(data); - } - - if(row){ - row.updateData(data).then(()=>{ - resolve(row.getComponent()); - }) - .catch((err)=>{ - reject(err); - }); - }else{ - console.warn("Update Error - No matching row found:", index); - reject("Update Error - No matching row found"); - } - }); -}; - -//scroll to row in DOM -Tabulator.prototype.scrollToRow = function(index, position, ifVisible){ - return new Promise((resolve, reject) => { - var row = this.rowManager.findRow(index); - - if(row){ - this.rowManager.scrollToRow(row, position, ifVisible) - .then(()=>{ - resolve(); - }) - .catch((err)=>{ - reject(err); - }); - }else{ - console.warn("Scroll Error - No matching row found:", index); - reject("Scroll Error - No matching row found"); - } - }); -}; - -Tabulator.prototype.getRows = function(active){ - return this.rowManager.getComponents(active); -}; - -//get position of row in table -Tabulator.prototype.getRowPosition = function(index, active){ - var row = this.rowManager.findRow(index); - - if(row){ - return this.rowManager.getRowPosition(row, active); - }else{ - console.warn("Position Error - No matching row found:", index); - return false; - } -}; - -//copy table data to clipboard -Tabulator.prototype.copyToClipboard = function(selector, selectorParams, formatter, formatterParams){ - if(this.modExists("clipboard", true)){ - this.modules.clipboard.copy(selector, selectorParams, formatter, formatterParams); - } -}; - -/////////////// Column Functions /////////////// - -Tabulator.prototype.setColumns = function(definition){ - this.columnManager.setColumns(definition); -}; - -Tabulator.prototype.getColumns = function(structured){ - return this.columnManager.getComponents(structured); -}; - -Tabulator.prototype.getColumn = function(field){ - var col = this.columnManager.findColumn(field); - - if(col){ - return col.getComponent(); - }else{ - console.warn("Find Error - No matching column found:", field); - return false; - } -}; - -Tabulator.prototype.getColumnDefinitions = function(){ - return this.columnManager.getDefinitionTree(); -}; - -Tabulator.prototype.getColumnLayout = function(){ - if(this.modExists("persistence", true)){ - return this.modules.persistence.parseColumns(this.columnManager.getColumns()); - } -}; - -Tabulator.prototype.setColumnLayout = function(layout){ - if(this.modExists("persistence", true)){ - this.columnManager.setColumns(this.modules.persistence.mergeDefinition(this.options.columns, layout)) - return true; - } - return false; -}; - -Tabulator.prototype.showColumn = function(field){ - var column = this.columnManager.findColumn(field); - - if(column){ - column.show(); - - if(this.options.responsiveLayout && this.modExists("responsiveLayout", true)){ - this.modules.responsiveLayout.update(); - } - }else{ - console.warn("Column Show Error - No matching column found:", field); - return false; - } -}; - -Tabulator.prototype.hideColumn = function(field){ - var column = this.columnManager.findColumn(field); - - if(column){ - column.hide(); - - if(this.options.responsiveLayout && this.modExists("responsiveLayout", true)){ - this.modules.responsiveLayout.update(); - } - }else{ - console.warn("Column Hide Error - No matching column found:", field); - return false; - } -}; - - -Tabulator.prototype.toggleColumn = function(field){ - var column = this.columnManager.findColumn(field); - - if(column){ - if(column.visible){ - column.hide(); - }else{ - column.show(); - } - }else{ - console.warn("Column Visibility Toggle Error - No matching column found:", field); - return false; - } -}; - -Tabulator.prototype.addColumn = function(definition, before, field){ - var column = this.columnManager.findColumn(field); - - this.columnManager.addColumn(definition, before, column) -}; - -Tabulator.prototype.deleteColumn = function(field){ - var column = this.columnManager.findColumn(field); - - if(column){ - column.delete(); - }else{ - console.warn("Column Delete Error - No matching column found:", field); - return false; - } -}; - -//scroll to column in DOM -Tabulator.prototype.scrollToColumn = function(field, position, ifVisible){ - - return new Promise((resolve, reject) => { - var column = this.columnManager.findColumn(field); - - if(column){ - this.columnManager.scrollToColumn(column, position, ifVisible) - .then(()=>{ - resolve(); - }) - .catch((err)=>{ - reject(err); - }); - }else{ - console.warn("Scroll Error - No matching column found:", field); - reject("Scroll Error - No matching column found"); - } - }); - -}; - - -//////////// Localization Functions //////////// -Tabulator.prototype.setLocale = function(locale){ - this.modules.localize.setLocale(locale); -}; - -Tabulator.prototype.getLocale = function(){ - return this.modules.localize.getLocale(); -}; - -Tabulator.prototype.getLang = function(locale){ - return this.modules.localize.getLang(locale); -}; - -//////////// General Public Functions //////////// - -//redraw list without updating data -Tabulator.prototype.redraw = function(force){ - this.columnManager.redraw(force); - this.rowManager.redraw(force); -}; - -Tabulator.prototype.setHeight = function(height){ - this.options.height = isNaN(height) ? height : height + "px"; - this.element.style.height = this.options.height; - this.rowManager.redraw(); -}; - -///////////////////// Sorting //////////////////// - -//trigger sort -Tabulator.prototype.setSort = function(sortList, dir){ - if(this.modExists("sort", true)){ - this.modules.sort.setSort(sortList, dir); - this.rowManager.sorterRefresh(); - } -}; - -Tabulator.prototype.getSorters = function(){ - if(this.modExists("sort", true)){ - return this.modules.sort.getSort(); - } -}; - -Tabulator.prototype.clearSort = function(){ - if(this.modExists("sort", true)){ - this.modules.sort.clear(); - this.rowManager.sorterRefresh(); - } -}; - - -///////////////////// Filtering //////////////////// - -//set standard filters -Tabulator.prototype.setFilter = function(field, type, value){ - if(this.modExists("filter", true)){ - this.modules.filter.setFilter(field, type, value); - this.rowManager.filterRefresh(); - } -}; - -//add filter to array -Tabulator.prototype.addFilter = function(field, type, value){ - if(this.modExists("filter", true)){ - this.modules.filter.addFilter(field, type, value); - this.rowManager.filterRefresh(); - } -}; - -//get all filters -Tabulator.prototype.getFilters = function(all){ - if(this.modExists("filter", true)){ - return this.modules.filter.getFilters(all); - } -}; - -Tabulator.prototype.setHeaderFilterFocus = function(field){ - if(this.modExists("filter", true)){ - var column = this.columnManager.findColumn(field); - - if(column){ - this.modules.filter.setHeaderFilterFocus(column); - }else{ - console.warn("Column Filter Focus Error - No matching column found:", field); - return false; - } - } -}; - - -Tabulator.prototype.setHeaderFilterValue = function(field, value){ - if(this.modExists("filter", true)){ - var column = this.columnManager.findColumn(field); - - if(column){ - this.modules.filter.setHeaderFilterValue(column, value); - }else{ - console.warn("Column Filter Error - No matching column found:", field); - return false; - } - } -}; - -Tabulator.prototype.getHeaderFilters = function(){ - if(this.modExists("filter", true)){ - return this.modules.filter.getHeaderFilters(); - } -}; - - -//remove filter from array -Tabulator.prototype.removeFilter = function(field, type, value){ - if(this.modExists("filter", true)){ - this.modules.filter.removeFilter(field, type, value); - this.rowManager.filterRefresh(); - } -}; - -//clear filters -Tabulator.prototype.clearFilter = function(all){ - if(this.modExists("filter", true)){ - this.modules.filter.clearFilter(all); - this.rowManager.filterRefresh(); - } -}; - -//clear header filters -Tabulator.prototype.clearHeaderFilter = function(){ - if(this.modExists("filter", true)){ - this.modules.filter.clearHeaderFilter(); - this.rowManager.filterRefresh(); - } -}; - -///////////////////// Filtering //////////////////// -Tabulator.prototype.selectRow = function(rows){ - if(this.modExists("selectRow", true)){ - this.modules.selectRow.selectRows(rows); - } -}; - -Tabulator.prototype.deselectRow = function(rows){ - if(this.modExists("selectRow", true)){ - this.modules.selectRow.deselectRows(rows); - } -}; - -Tabulator.prototype.toggleSelectRow = function(row){ - if(this.modExists("selectRow", true)){ - this.modules.selectRow.toggleRow(row); - } -}; - -Tabulator.prototype.getSelectedRows = function(){ - if(this.modExists("selectRow", true)){ - return this.modules.selectRow.getSelectedRows(); - } -}; - -Tabulator.prototype.getSelectedData = function(){ - if(this.modExists("selectRow", true)){ - return this.modules.selectRow.getSelectedData(); - } -}; - -//////////// Pagination Functions //////////// - -Tabulator.prototype.setMaxPage = function(max){ - if(this.options.pagination && this.modExists("page")){ - this.modules.page.setMaxPage(max); - }else{ - return false; - } -}; - -Tabulator.prototype.setPage = function(page){ - if(this.options.pagination && this.modExists("page")){ - this.modules.page.setPage(page); - }else{ - return false; - } -}; - -Tabulator.prototype.setPageSize = function(size){ - if(this.options.pagination && this.modExists("page")){ - this.modules.page.setPageSize(size); - this.modules.page.setPage(1); - }else{ - return false; - } -}; - -Tabulator.prototype.getPageSize = function(){ - if(this.options.pagination && this.modExists("page", true)){ - return this.modules.page.getPageSize(); - } -}; - -Tabulator.prototype.previousPage = function(){ - if(this.options.pagination && this.modExists("page")){ - this.modules.page.previousPage(); - }else{ - return false; - } -}; - -Tabulator.prototype.nextPage = function(){ - if(this.options.pagination && this.modExists("page")){ - this.modules.page.nextPage(); - }else{ - return false; - } -}; - -Tabulator.prototype.getPage = function(){ - if(this.options.pagination && this.modExists("page")){ - return this.modules.page.getPage(); - }else{ - return false; - } -}; - -Tabulator.prototype.getPageMax = function(){ - if(this.options.pagination && this.modExists("page")){ - return this.modules.page.getPageMax(); - }else{ - return false; - } -}; - -///////////////// Grouping Functions /////////////// - -Tabulator.prototype.setGroupBy = function(groups){ - if(this.modExists("groupRows", true)){ - this.options.groupBy = groups; - this.modules.groupRows.initialize(); - this.rowManager.refreshActiveData("display"); - }else{ - return false; - } -}; - -Tabulator.prototype.setGroupStartOpen = function(values){ - if(this.modExists("groupRows", true)){ - this.options.groupStartOpen = values; - this.modules.groupRows.initialize(); - if(this.options.groupBy){ - this.rowManager.refreshActiveData("group"); - }else{ - console.warn("Grouping Update - cant refresh view, no groups have been set"); - } - }else{ - return false; - } -}; - -Tabulator.prototype.setGroupHeader = function(values){ - if(this.modExists("groupRows", true)){ - this.options.groupHeader = values; - this.modules.groupRows.initialize(); - if(this.options.groupBy){ - this.rowManager.refreshActiveData("group"); - }else{ - console.warn("Grouping Update - cant refresh view, no groups have been set"); - } - }else{ - return false; - } -}; - -Tabulator.prototype.getGroups = function(values){ - if(this.modExists("groupRows", true)){ - return this.modules.groupRows.getGroups(true); - }else{ - return false; - } -}; - -// get grouped table data in the same format as getData() -Tabulator.prototype.getGroupedData = function(){ - if (this.modExists("groupRows", true)){ - return this.options.groupBy ? - this.modules.groupRows.getGroupedData() : this.getData() - } -} - -///////////////// Column Calculation Functions /////////////// -Tabulator.prototype.getCalcResults = function(){ - if(this.modExists("columnCalcs", true)){ - return this.modules.columnCalcs.getResults(); - }else{ - return false; - } -}; - -/////////////// Navigation Management ////////////// - -Tabulator.prototype.navigatePrev = function(){ - var cell = false; - - if(this.modExists("edit", true)){ - cell = this.modules.edit.currentCell; - - if(cell){ - e.preventDefault(); - return cell.nav().prev(); - } - } - - return false; -}; - -Tabulator.prototype.navigateNext = function(){ - var cell = false; - - if(this.modExists("edit", true)){ - cell = this.modules.edit.currentCell; - - if(cell){ - e.preventDefault(); - return cell.nav().next(); - } - } - - return false; -}; - -Tabulator.prototype.navigateLeft = function(){ - var cell = false; - - if(this.modExists("edit", true)){ - cell = this.modules.edit.currentCell; - - if(cell){ - e.preventDefault(); - return cell.nav().left(); - } - } - - return false; -}; - -Tabulator.prototype.navigateRight = function(){ - var cell = false; - - if(this.modExists("edit", true)){ - cell = this.modules.edit.currentCell; - - if(cell){ - e.preventDefault(); - return cell.nav().right(); - } - } - - return false; -}; - -Tabulator.prototype.navigateUp = function(){ - var cell = false; - - if(this.modExists("edit", true)){ - cell = this.modules.edit.currentCell; - - if(cell){ - e.preventDefault(); - return cell.nav().up(); - } - } - - return false; -}; - -Tabulator.prototype.navigateDown = function(){ - var cell = false; - - if(this.modExists("edit", true)){ - cell = this.modules.edit.currentCell; - - if(cell){ - e.preventDefault(); - return cell.nav().dpwn(); - } - } - - return false; -}; - - -/////////////// History Management ////////////// -Tabulator.prototype.undo = function(){ - if(this.options.history && this.modExists("history", true)){ - return this.modules.history.undo(); - }else{ - return false; - } -}; - -Tabulator.prototype.redo = function(){ - if(this.options.history && this.modExists("history", true)){ - return this.modules.history.redo(); - }else{ - return false; - } -}; - -Tabulator.prototype.getHistoryUndoSize = function(){ - if(this.options.history && this.modExists("history", true)){ - return this.modules.history.getHistoryUndoSize(); - }else{ - return false; - } -}; - -Tabulator.prototype.getHistoryRedoSize = function(){ - if(this.options.history && this.modExists("history", true)){ - return this.modules.history.getHistoryRedoSize(); - }else{ - return false; - } -}; - -/////////////// Download Management ////////////// - -Tabulator.prototype.download = function(type, filename, options){ - if(this.modExists("download", true)){ - this.modules.download.download(type, filename, options); - } -}; - -/////////// Inter Table Communications /////////// - -Tabulator.prototype.tableComms = function(table, module, action, data){ - this.modules.comms.receive(table, module, action, data); -}; - -////////////// Extension Management ////////////// - -//object to hold module -Tabulator.prototype.moduleBindings = {}; - -//extend module -Tabulator.prototype.extendModule = function(name, property, values){ - - if(Tabulator.prototype.moduleBindings[name]){ - var source = Tabulator.prototype.moduleBindings[name].prototype[property]; - - if(source){ - if(typeof values == "object"){ - for(let key in values){ - source[key] = values[key]; - } - }else{ - console.warn("Module Error - Invalid value type, it must be an object"); - } - }else{ - console.warn("Module Error - property does not exist:", property); - } - }else{ - console.warn("Module Error - module does not exist:", name); - } - -}; - -//add module to tabulator -Tabulator.prototype.registerModule = function(name, module){ - var self = this; - Tabulator.prototype.moduleBindings[name] = module; -}; - -//ensure that module are bound to instantiated function -Tabulator.prototype.bindModules = function(){ - this.modules = {}; - - for(var name in Tabulator.prototype.moduleBindings){ - this.modules[name] = new Tabulator.prototype.moduleBindings[name](this); - } -}; - -//Check for module -Tabulator.prototype.modExists = function(plugin, required){ - if(this.modules[plugin]){ - return true; - }else{ - if(required){ - console.error("Tabulator Module Not Installed: " + plugin); - } - return false; - } -}; - - -Tabulator.prototype.helpers = { - - elVisible: function(el){ - return !(el.offsetWidth <= 0 && el.offsetHeight <= 0); - }, - - elOffset: function(el){ - var box = el.getBoundingClientRect(); - - return { - top: box.top + window.pageYOffset - document.documentElement.clientTop, - left: box.left + window.pageXOffset - document.documentElement.clientLeft - }; - }, - - deepClone: function(obj){ - var clone = Array.isArray(obj) ? [] : {}; - - for(var i in obj) { - if(obj[i] != null && typeof(obj[i]) === "object"){ - if (obj[i] instanceof Date) { - clone[i] = new Date(obj[i]); - } else { - clone[i] = this.deepClone(obj[i]); - } - } - else{ - clone[i] = obj[i]; - } - } - return clone; - } -}; - -Tabulator.prototype.comms = { - tables:[], - register:function(table){ - Tabulator.prototype.comms.tables.push(table); - }, - deregister:function(table){ - var index = Tabulator.prototype.comms.tables.indexOf(table); - - if(index > -1){ - Tabulator.prototype.comms.tables.splice(index, 1); - } - }, - lookupTable:function(query){ - var results = [], - matches, match; - - if(typeof query === "string"){ - matches = document.querySelectorAll(query); - - if(matches.length){ - for(var i = 0; i < matches.length; i++){ - match = Tabulator.prototype.comms.matchElement(matches[i]); - - if(match){ - results.push(match); - } - } - } - - }else if(query instanceof HTMLElement || query instanceof Tabulator){ - match = Tabulator.prototype.comms.matchElement(query); - - if(match){ - results.push(match); - } - }else if(Array.isArray(query)){ - query.forEach(function(item){ - results = results.concat(Tabulator.prototype.comms.lookupTable(item)); - }); - }else{ - console.warn("Table Connection Error - Invalid Selector", query); - } - - return results; - }, - matchElement:function(element){ - return Tabulator.prototype.comms.tables.find(function(table){ - return element instanceof Tabulator ? table === element : table.element === element; - }); - } -}; - -/*=include modules/layout.js */ -/*=include modules/localize.js */ -/*=include modules/comms.js */ diff --git a/Gems/AssetMemoryAnalyzer/External/tabulator-master/src/js/core_modules.js b/Gems/AssetMemoryAnalyzer/External/tabulator-master/src/js/core_modules.js deleted file mode 100644 index 4d2e328d15..0000000000 --- a/Gems/AssetMemoryAnalyzer/External/tabulator-master/src/js/core_modules.js +++ /dev/null @@ -1,16 +0,0 @@ -;(function (global, factory) { - if(typeof exports === 'object' && typeof module !== 'undefined'){ - module.exports = factory(); - }else if(typeof define === 'function' && define.amd){ - define(factory); - }else{ - global.Tabulator = factory(); - } -}(this, (function () { - - /*=include core.js */ - /*=include modules_enabled.js */ - - return Tabulator; - -}))); \ No newline at end of file diff --git a/Gems/AssetMemoryAnalyzer/External/tabulator-master/src/js/footer_manager.js b/Gems/AssetMemoryAnalyzer/External/tabulator-master/src/js/footer_manager.js deleted file mode 100644 index d2bd50f108..0000000000 --- a/Gems/AssetMemoryAnalyzer/External/tabulator-master/src/js/footer_manager.js +++ /dev/null @@ -1,93 +0,0 @@ -var FooterManager = function(table){ - this.table = table; - this.active = false; - this.element = this.createElement(); //containing element - this.external = false; - this.links = []; - - this._initialize(); -}; - -FooterManager.prototype.createElement = function (){ - var el = document.createElement("div"); - - el.classList.add("tabulator-footer"); - - return el; -}; - -FooterManager.prototype._initialize = function(element){ - if(this.table.options.footerElement){ - - switch(typeof this.table.options.footerElement){ - case "string": - - if(this.table.options.footerElement[0] === "<"){ - this.element.innerHTML = this.table.options.footerElement; - }else{ - this.external = true; - this.element = document.querySelector(this.table.options.footerElement); - } - break; - default: - this.element = this.table.options.footerElement; - break; - } - - } -}; - -FooterManager.prototype.getElement = function(){ - return this.element; -}; - - -FooterManager.prototype.append = function(element, parent){ - this.activate(parent); - - this.element.appendChild(element); - this.table.rowManager.adjustTableSize(); -}; - -FooterManager.prototype.prepend = function(element, parent){ - this.activate(parent); - - this.element.insertBefore(element, this.element.firstChild); - this.table.rowManager.adjustTableSize(); -}; - -FooterManager.prototype.remove = function(element){ - element.parentNode.removeChild(element); - this.deactivate(); -}; - -FooterManager.prototype.deactivate = function(force){ - if(!this.element.firstChild || force){ - if(!this.external){ - this.element.parentNode.removeChild(this.element); - } - this.active = false; - } - - // this.table.rowManager.adjustTableSize(); -}; - -FooterManager.prototype.activate = function(parent){ - if(!this.active){ - this.active = true; - if(!this.external){ - this.table.element.appendChild(this.getElement()); - this.table.element.style.display = ''; - } - } - - if(parent){ - this.links.push(parent); - } -}; - -FooterManager.prototype.redraw = function(){ - this.links.forEach(function(link){ - link.footerRedraw(); - }); -}; \ No newline at end of file diff --git a/Gems/AssetMemoryAnalyzer/External/tabulator-master/src/js/jquery_wrapper.js b/Gems/AssetMemoryAnalyzer/External/tabulator-master/src/js/jquery_wrapper.js deleted file mode 100644 index 1f72fca8a5..0000000000 --- a/Gems/AssetMemoryAnalyzer/External/tabulator-master/src/js/jquery_wrapper.js +++ /dev/null @@ -1,47 +0,0 @@ -/* - * This file is part of the Tabulator package. - * - * (c) Oliver Folkerd - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - * - * Full Documentation & Demos can be found at: http://olifolkerd.github.io/tabulator/ - * - */ - - (function (factory) { - "use strict"; - if (typeof define === 'function' && define.amd) { - define(['jquery'], factory); - } - else if(typeof module !== 'undefined' && module.exports) { - module.exports = factory(require('jquery')); - } - else { - factory(jQuery); - } - }(function ($, undefined) { - $.widget("ui.tabulator", { - _create:function(){ - this.table = new Tabulator(this.element[0], this.options); - - //map tabulator functions to jquery wrapper - for(var key in Tabulator.prototype){ - if(typeof Tabulator.prototype[key] === "function" && key.charAt(0) !== "_"){ - this[key] = this.table[key].bind(this.table); - } - } - }, - - _setOption: function(option, value){ - console.error("Tabulator jQuery wrapper does not support setting options after the table has been instantiated"); - }, - - _destroy: function(option, value){ - this.table.destroy(); - }, - }); - })); - - diff --git a/Gems/AssetMemoryAnalyzer/External/tabulator-master/src/js/modules/accessor.js b/Gems/AssetMemoryAnalyzer/External/tabulator-master/src/js/modules/accessor.js deleted file mode 100644 index b0cb780256..0000000000 --- a/Gems/AssetMemoryAnalyzer/External/tabulator-master/src/js/modules/accessor.js +++ /dev/null @@ -1,93 +0,0 @@ -var Accessor = function(table){ - this.table = table; //hold Tabulator object - this.allowedTypes = ["", "data", "download", "clipboard"] //list of accessor types -}; - - -//initialize column accessor -Accessor.prototype.initializeColumn = function(column){ - var self = this, - match = false, - config = {}; - - this.allowedTypes.forEach(function(type){ - var key = "accessor" + (type.charAt(0).toUpperCase() + type.slice(1)), - accessor; - - if(column.definition[key]){ - accessor = self.lookupAccessor(column.definition[key]); - - if(accessor){ - match = true; - - config[key] = { - accessor:accessor, - params: column.definition[key + "Params"] || {}, - } - } - } - }); - - if(match){ - column.modules.accessor = config; - } -}, - -Accessor.prototype.lookupAccessor = function(value){ - var accessor = false; - - //set column accessor - switch(typeof value){ - case "string": - if(this.accessors[value]){ - accessor = this.accessors[value] - }else{ - console.warn("Accessor Error - No such accessor found, ignoring: ", value); - } - break; - - case "function": - accessor = value; - break; - } - - return accessor; -} - - -//apply accessor to row -Accessor.prototype.transformRow = function(dataIn, type){ - var self = this, - key = "accessor" + (type.charAt(0).toUpperCase() + type.slice(1)); - - //clone data object with deep copy to isolate internal data from returned result - var data = Tabulator.prototype.helpers.deepClone(dataIn || {}); - - self.table.columnManager.traverse(function(column){ - var value, accessor, params, component; - - if(column.modules.accessor){ - - accessor = column.modules.accessor[key] || column.modules.accessor.accessor || false; - - if(accessor){ - value = column.getFieldValue(data); - - if(value != "undefined"){ - component = column.getComponent(); - params = typeof accessor.params === "function" ? accessor.params(value, data, type, component) : accessor.params; - column.setFieldValue(data, accessor.accessor(value, data, type, params, component)); - } - } - } - }); - - return data; -}, - -//default accessors -Accessor.prototype.accessors = {}; - - - -Tabulator.prototype.registerModule("accessor", Accessor); \ No newline at end of file diff --git a/Gems/AssetMemoryAnalyzer/External/tabulator-master/src/js/modules/ajax.js b/Gems/AssetMemoryAnalyzer/External/tabulator-master/src/js/modules/ajax.js deleted file mode 100644 index 4bc737f338..0000000000 --- a/Gems/AssetMemoryAnalyzer/External/tabulator-master/src/js/modules/ajax.js +++ /dev/null @@ -1,428 +0,0 @@ -var Ajax = function(table){ - - this.table = table; //hold Tabulator object - this.config = false; //hold config object for ajax request - this.url = ""; //request URL - this.urlGenerator = false; - this.params = false; //request parameters - - this.loaderElement = this.createLoaderElement(); //loader message div - this.msgElement = this.createMsgElement(); //message element - this.loadingElement = false; - this.errorElement = false; - this.loaderPromise = false; - - this.progressiveLoad = false; - this.loading = false; - - this.requestOrder = 0; //prevent requests comming out of sequence if overridden by another load request -}; - -//initialize setup options -Ajax.prototype.initialize = function(){ - this.loaderElement.appendChild(this.msgElement); - - if(this.table.options.ajaxLoaderLoading){ - this.loadingElement = this.table.options.ajaxLoaderLoading; - } - - this.loaderPromise = this.table.options.ajaxRequestFunc || this.defaultLoaderPromise; - - this.urlGenerator = this.table.options.ajaxURLGenerator || this.defaultURLGenerator; - - if(this.table.options.ajaxLoaderError){ - this.errorElement = this.table.options.ajaxLoaderError; - } - - if(this.table.options.ajaxParams){ - this.setParams(this.table.options.ajaxParams); - } - - if(this.table.options.ajaxConfig){ - this.setConfig(this.table.options.ajaxConfig); - } - - if(this.table.options.ajaxURL){ - this.setUrl(this.table.options.ajaxURL); - } - - if(this.table.options.ajaxProgressiveLoad){ - if(this.table.options.pagination){ - this.progressiveLoad = false; - console.error("Progressive Load Error - Pagination and progressive load cannot be used at the same time"); - }else{ - if(this.table.modExists("page")){ - this.progressiveLoad = this.table.options.ajaxProgressiveLoad; - this.table.modules.page.initializeProgressive(this.progressiveLoad); - }else{ - console.error("Pagination plugin is required for progressive ajax loading"); - } - } - } -}; - -Ajax.prototype.createLoaderElement = function (){ - var el = document.createElement("div"); - el.classList.add("tabulator-loader"); - return el; -}; - -Ajax.prototype.createMsgElement = function (){ - var el = document.createElement("div"); - - el.classList.add("tabulator-loader-msg"); - el.setAttribute("role", "alert"); - - return el; -}; - -//set ajax params -Ajax.prototype.setParams = function(params, update){ - if(update){ - this.params = this.params || {}; - - for(let key in params){ - this.params[key] = params[key]; - } - }else{ - this.params = params; - } -}; - -Ajax.prototype.getParams = function(){ - return this.params || {}; -}; - -//load config object -Ajax.prototype.setConfig = function(config){ - this._loadDefaultConfig(); - - if(typeof config == "string"){ - this.config.method = config; - }else{ - for(let key in config){ - this.config[key] = config[key]; - } - } -}; - -//create config object from default -Ajax.prototype._loadDefaultConfig = function(force){ - var self = this; - if(!self.config || force){ - - self.config = {}; - - //load base config from defaults - for(let key in self.defaultConfig){ - self.config[key] = self.defaultConfig[key]; - } - } -}; - -//set request url -Ajax.prototype.setUrl = function(url){ - this.url = url; -}; - -//get request url -Ajax.prototype.getUrl = function(){ - return this.url; -}; - -//lstandard loading function -Ajax.prototype.loadData = function(inPosition){ - var self = this; - - if(this.progressiveLoad){ - return this._loadDataProgressive(); - }else{ - return this._loadDataStandard(inPosition); - } -}; - -Ajax.prototype.nextPage = function(diff){ - var margin; - - if(!this.loading){ - - margin = this.table.options.ajaxProgressiveLoadScrollMargin || (this.table.rowManager.getElement().clientHeight * 2); - - if(diff < margin){ - this.table.modules.page.nextPage() - .then(()=>{}).catch(()=>{}); - } - } -}; - -Ajax.prototype.blockActiveRequest = function(){ - this.requestOrder ++; -}; - -Ajax.prototype._loadDataProgressive = function(){ - this.table.rowManager.setData([]); - return this.table.modules.page.setPage(1); -}; - -Ajax.prototype._loadDataStandard = function(inPosition){ - return new Promise((resolve, reject)=>{ - this.sendRequest(inPosition) - .then((data)=>{ - this.table.rowManager.setData(data, inPosition); - resolve(); - }) - .catch((e)=>{reject()}); - }); -}; - -Ajax.prototype.generateParamsList = function(data, prefix){ - var self = this, - output = []; - - prefix = prefix || ""; - - if ( Array.isArray(data) ) { - data.forEach(function(item, i){ - output = output.concat(self.generateParamsList(item, prefix ? prefix + "[" + i + "]" : i)); - }); - }else if (typeof data === "object"){ - for (var key in data){ - output = output.concat(self.generateParamsList(data[key], prefix ? prefix + "[" + key + "]" : key)); - } - }else{ - output.push({key:prefix, value:data}); - } - - return output; -}; - - -Ajax.prototype.serializeParams = function(params){ - var output = this.generateParamsList(params), - encoded = []; - - output.forEach(function(item){ - encoded.push(encodeURIComponent(item.key) + "=" + encodeURIComponent(item.value)); - }); - - return encoded.join("&"); -}; - - -//send ajax request -Ajax.prototype.sendRequest = function(silent){ - var self = this, - url = self.url, - requestNo, esc, query; - - self.requestOrder ++; - requestNo = self.requestOrder; - - self._loadDefaultConfig(); - - return new Promise((resolve, reject)=>{ - if(self.table.options.ajaxRequesting.call(this.table, self.url, self.params) !== false){ - - self.loading = true; - - if(!silent){ - self.showLoader(); - } - - this.loaderPromise(url, self.config, self.params).then((data)=>{ - if(requestNo === self.requestOrder){ - if(self.table.options.ajaxResponse){ - data = self.table.options.ajaxResponse.call(self.table, self.url, self.params, data); - } - resolve(data); - }else{ - console.warn("Ajax Response Blocked - An active ajax request was blocked by an attempt to change table data while the request was being made"); - } - - self.hideLoader(); - - self.loading = false; - }) - .catch((error)=>{ - console.error("Ajax Load Error: ", error); - self.table.options.ajaxError.call(self.table, error); - - self.showError(); - - setTimeout(function(){ - self.hideLoader(); - }, 3000); - - self.loading = false; - - reject(); - }); - }else{ - reject(); - } - }); - - -}; - -Ajax.prototype.showLoader = function(){ - var shouldLoad = typeof this.table.options.ajaxLoader === "function" ? this.table.options.ajaxLoader() : this.table.options.ajaxLoader; - - if(shouldLoad){ - - this.hideLoader(); - - while(this.msgElement.firstChild) this.msgElement.removeChild(this.msgElement.firstChild); - this.msgElement.classList.remove("tabulator-error"); - this.msgElement.classList.add("tabulator-loading"); - - if(this.loadingElement){ - this.msgElement.appendChild(this.loadingElement); - }else{ - this.msgElement.innerHTML = this.table.modules.localize.getText("ajax|loading"); - } - - this.table.element.appendChild(this.loaderElement); - } -}; - -Ajax.prototype.showError = function(){ - this.hideLoader(); - - while(this.msgElement.firstChild) this.msgElement.removeChild(this.msgElement.firstChild); - this.msgElement.classList.remove("tabulator-loading"); - this.msgElement.classList.add("tabulator-error"); - - if(this.errorElement){ - this.msgElement.appendChild(this.errorElement); - }else{ - this.msgElement.innerHTML = this.table.modules.localize.getText("ajax|error"); - } - - this.table.element.appendChild(this.loaderElement); -}; - -Ajax.prototype.hideLoader = function(){ - if(this.loaderElement.parentNode){ - this.loaderElement.parentNode.removeChild(this.loaderElement); - } -}; - -//default ajax config object -Ajax.prototype.defaultConfig = { - method: "GET", -}; - -Ajax.prototype.defaultURLGenerator = function(url, config, params){ - if(params && Object.keys(params).length){ - if(!config.method || config.method.toLowerCase() == "get"){ - config.method = "get"; - url += "?" + this.serializeParams(params); - } - } - - return url; -}; - -Ajax.prototype.defaultLoaderPromise = function(url, config, params){ - var self = this, contentType; - - return new Promise(function(resolve, reject){ - - //set url - url = self.urlGenerator(url, config, params); - - //set body content if not GET request - if(config.method != "get"){ - contentType = typeof self.table.options.ajaxContentType === "object" ? self.table.options.ajaxContentType : self.contentTypeFormatters[self.table.options.ajaxContentType]; - if(contentType){ - - for(var key in contentType.headers){ - if(!config.headers){ - config.headers = {}; - } - - if(typeof config.headers[key] === "undefined"){ - config.headers[key] = contentType.headers[key]; - } - } - - config.body = contentType.body.call(self, url, config, params); - - }else{ - console.warn("Ajax Error - Invalid ajaxContentType value:", self.table.options.ajaxContentType); - } - } - - if(url){ - - //configure headers - if(typeof config.credentials === "undefined"){ - config.credentials = 'include'; - } - - if(typeof config.headers === "undefined"){ - config.headers = {}; - } - - if(typeof config.headers.Accept === "undefined"){ - config.headers.Accept = "application/json"; - } - - if(typeof config.headers["X-Requested-With"] === "undefined"){ - config.headers["X-Requested-With"] = "XMLHttpRequest"; - } - - //send request - fetch(url, config) - .then((response)=>{ - if(response.ok) { - response.json() - .then((data)=>{ - resolve(data); - }).catch((error)=>{ - reject(error); - console.warn("Ajax Load Error - Invalid JSON returned", error); - }); - }else{ - console.error("Ajax Load Error - Connection Error: " + response.status, response.statusText); - reject(response); - } - }) - .catch((error)=>{ - console.error("Ajax Load Error - Connection Error: ", error); - reject(error); - }); - }else{ - reject("No URL Set"); - } - - }); -}; - -Ajax.prototype.contentTypeFormatters = { - "json":{ - headers:{ - 'Content-Type': 'application/json', - }, - body:function(url, config, params){ - return JSON.stringify(params); - }, - }, - "form":{ - headers:{ - }, - body:function(url, config, params){ - var output = this.generateParamsList(params), - form = new FormData(); - - output.forEach(function(item){ - form.append(item.key, item.value); - }); - - return form; - }, - }, -} - -Tabulator.prototype.registerModule("ajax", Ajax); \ No newline at end of file diff --git a/Gems/AssetMemoryAnalyzer/External/tabulator-master/src/js/modules/calculation_colums.js b/Gems/AssetMemoryAnalyzer/External/tabulator-master/src/js/modules/calculation_colums.js deleted file mode 100644 index 87adbe38e1..0000000000 --- a/Gems/AssetMemoryAnalyzer/External/tabulator-master/src/js/modules/calculation_colums.js +++ /dev/null @@ -1,457 +0,0 @@ -var ColumnCalcs = function(table){ - this.table = table; //hold Tabulator object - this.topCalcs = []; - this.botCalcs = []; - this.genColumn = false; - this.topElement = this.createElement(); - this.botElement = this.createElement(); - this.topRow = false; - this.botRow = false; - this.topInitialized = false; - this.botInitialized = false; - - this.initialize(); -}; - -ColumnCalcs.prototype.createElement = function (){ - var el = document.createElement("div"); - el.classList.add("tabulator-calcs-holder"); - return el; -}; - -ColumnCalcs.prototype.initialize = function(){ - this.genColumn = new Column({field:"value"}, this); -}; - -//dummy functions to handle being mock column manager -ColumnCalcs.prototype.registerColumnField = function(){}; - -//initialize column calcs -ColumnCalcs.prototype.initializeColumn = function(column){ - var def = column.definition - - var config = { - topCalcParams:def.topCalcParams || {}, - botCalcParams:def.bottomCalcParams || {}, - }; - - if(def.topCalc){ - - switch(typeof def.topCalc){ - case "string": - if(this.calculations[def.topCalc]){ - config.topCalc = this.calculations[def.topCalc] - }else{ - console.warn("Column Calc Error - No such calculation found, ignoring: ", def.topCalc); - } - break; - - case "function": - config.topCalc = def.topCalc; - break - - } - - if(config.topCalc){ - column.modules.columnCalcs = config; - this.topCalcs.push(column); - - if(this.table.options.columnCalcs != "group"){ - this.initializeTopRow(); - } - } - - } - - if(def.bottomCalc){ - switch(typeof def.bottomCalc){ - case "string": - if(this.calculations[def.bottomCalc]){ - config.botCalc = this.calculations[def.bottomCalc] - }else{ - console.warn("Column Calc Error - No such calculation found, ignoring: ", def.bottomCalc); - } - break; - - case "function": - config.botCalc = def.bottomCalc; - break - - } - - if(config.botCalc){ - column.modules.columnCalcs = config; - this.botCalcs.push(column); - - if(this.table.options.columnCalcs != "group"){ - this.initializeBottomRow(); - } - } - } - -}; - -ColumnCalcs.prototype.removeCalcs = function(){ - var changed = false; - - if(this.topInitialized){ - this.topInitialized = false; - this.topElement.parentNode.removeChild(this.topElement); - changed = true; - } - - if(this.botInitialized){ - this.botInitialized = false; - this.table.footerManager.remove(this.botElement); - changed = true; - } - - if(changed){ - this.table.rowManager.adjustTableSize(); - } -}; - -ColumnCalcs.prototype.initializeTopRow = function(){ - if(!this.topInitialized){ - // this.table.columnManager.headersElement.after(this.topElement); - this.table.columnManager.getElement().insertBefore(this.topElement, this.table.columnManager.headersElement.nextSibling); - this.topInitialized = true; - } -}; - -ColumnCalcs.prototype.initializeBottomRow = function(){ - if(!this.botInitialized){ - this.table.footerManager.prepend(this.botElement); - this.botInitialized = true; - } -}; - - -ColumnCalcs.prototype.scrollHorizontal = function(left){ - var hozAdjust = 0, - scrollWidth = this.table.columnManager.getElement().scrollWidth - this.table.element.clientWidth; - - if(this.botInitialized){ - this.botRow.getElement().style.marginLeft = (-left) + "px"; - } -}; - - -ColumnCalcs.prototype.recalc = function(rows){ - var data, row; - - if(this.topInitialized || this.botInitialized){ - data = this.rowsToData(rows); - - if(this.topInitialized){ - row = this.generateRow("top", this.rowsToData(rows)) - this.topRow = row; - while(this.topElement.firstChild) this.topElement.removeChild(this.topElement.firstChild); - this.topElement.appendChild(row.getElement()); - row.initialize(true); - } - - if(this.botInitialized){ - row = this.generateRow("bottom", this.rowsToData(rows)) - this.botRow = row; - while(this.botElement.firstChild) this.botElement.removeChild(this.botElement.firstChild); - this.botElement.appendChild(row.getElement()); - row.initialize(true); - } - - this.table.rowManager.adjustTableSize(); - - //set resizable handles - if(this.table.modExists("frozenColumns")){ - this.table.modules.frozenColumns.layout(); - } - } -}; - -ColumnCalcs.prototype.recalcRowGroup = function(row){ - this.recalcGroup(this.table.modules.groupRows.getRowGroup(row)); -}; - -ColumnCalcs.prototype.recalcGroup = function(group){ - var data, rowData; - - if(group){ - if(group.calcs){ - if(group.calcs.bottom){ - data = this.rowsToData(group.rows); - rowData = this.generateRowData("bottom", data); - - group.calcs.bottom.updateData(rowData); - group.calcs.bottom.reinitialize(); - } - - if(group.calcs.top){ - data = this.rowsToData(group.rows); - rowData = this.generateRowData("top", data); - - group.calcs.top.updateData(rowData); - group.calcs.top.reinitialize(); - } - } - } -}; - - - -//generate top stats row -ColumnCalcs.prototype.generateTopRow = function(rows){ - return this.generateRow("top", this.rowsToData(rows)); -}; -//generate bottom stats row -ColumnCalcs.prototype.generateBottomRow = function(rows){ - return this.generateRow("bottom", this.rowsToData(rows)); -}; - -ColumnCalcs.prototype.rowsToData = function(rows){ - var data = []; - - rows.forEach(function(row){ - data.push(row.getData()); - }); - - return data; -}; - -//generate stats row -ColumnCalcs.prototype.generateRow = function(pos, data){ - var self = this, - rowData = this.generateRowData(pos, data), - row; - - if(self.table.modExists("mutator")){ - self.table.modules.mutator.disable(); - } - - row = new Row(rowData, this); - - if(self.table.modExists("mutator")){ - self.table.modules.mutator.enable(); - } - - row.getElement().classList.add("tabulator-calcs", "tabulator-calcs-" + pos); - row.type = "calc"; - - row.generateCells = function(){ - - var cells = []; - - self.table.columnManager.columnsByIndex.forEach(function(column){ - - if(column.visible){ - //set field name of mock column - self.genColumn.setField(column.getField()); - self.genColumn.hozAlign = column.hozAlign; - - if(column.definition[pos + "CalcFormatter"] && self.table.modExists("format")){ - - self.genColumn.modules.format = { - formatter: self.table.modules.format.getFormatter(column.definition[pos + "CalcFormatter"]), - params: column.definition[pos + "CalcFormatterParams"] - }; - }else{ - self.genColumn.modules.format = { - formatter: self.table.modules.format.getFormatter("plaintext"), - params:{} - }; - } - - //generate cell and assign to correct column - var cell = new Cell(self.genColumn, row); - cell.column = column; - cell.setWidth(column.width); - - column.cells.push(cell); - cells.push(cell); - } - }); - - this.cells = cells; - } - - return row; -}; - -//generate stats row -ColumnCalcs.prototype.generateRowData = function(pos, data){ - var rowData = {}, - calcs = pos == "top" ? this.topCalcs : this.botCalcs, - type = pos == "top" ? "topCalc" : "botCalc", - params, paramKey; - - calcs.forEach(function(column){ - var values = []; - - if(column.modules.columnCalcs && column.modules.columnCalcs[type]){ - data.forEach(function(item){ - values.push(column.getFieldValue(item)); - }); - - paramKey = type + "Params"; - params = typeof column.modules.columnCalcs[paramKey] === "function" ? column.modules.columnCalcs[paramKey](value, data) : column.modules.columnCalcs[paramKey]; - - column.setFieldValue(rowData, column.modules.columnCalcs[type](values, data, params)); - } - }); - - return rowData; -}; - -ColumnCalcs.prototype.hasTopCalcs = function(){ - return !!(this.topCalcs.length); -}, - -ColumnCalcs.prototype.hasBottomCalcs = function(){ - return !!(this.botCalcs.length); -}, - -//handle table redraw -ColumnCalcs.prototype.redraw = function(){ - if(this.topRow){ - this.topRow.normalizeHeight(true); - } - if(this.botRow){ - this.botRow.normalizeHeight(true); - } -}; - -//return the calculated -ColumnCalcs.prototype.getResults = function(){ - var self = this, - results = {}, - groups; - - if(this.table.options.groupBy && this.table.modExists("groupRows")){ - groups = this.table.modules.groupRows.getGroups(true); - - groups.forEach(function(group){ - results[group.getKey()] = self.getGroupResults(group); - }); - }else{ - results = { - top: this.topRow ? this.topRow.getData() : {}, - bottom: this.botRow ? this.botRow.getData() : {}, - } - } - - return results; -} - -//get results from a group -ColumnCalcs.prototype.getGroupResults = function(group){ - var self = this, - groupObj = group._getSelf(), - subGroups = group.getSubGroups(), - subGroupResults = {}, - results = {}; - - subGroups.forEach(function(subgroup){ - subGroupResults[subgroup.getKey()] = self.getGroupResults(subgroup); - }); - - results = { - top: groupObj.calcs.top ? groupObj.calcs.top.getData() : {}, - bottom: groupObj.calcs.bottom ? groupObj.calcs.bottom.getData() : {}, - groups: subGroupResults, - } - - return results; -} - - -//default calculations -ColumnCalcs.prototype.calculations = { - "avg":function(values, data, calcParams){ - var output = 0, - precision = typeof calcParams.precision !== "undefined" ? calcParams.precision : 2 - - if(values.length){ - output = values.reduce(function(sum, value){ - value = Number(value); - return sum + value; - }); - - output = output / values.length; - - output = precision !== false ? output.toFixed(precision) : output; - } - - return parseFloat(output).toString(); - }, - "max":function(values, data, calcParams){ - var output = null, - precision = typeof calcParams.precision !== "undefined" ? calcParams.precision : false; - - values.forEach(function(value){ - - value = Number(value); - - if(value > output || output === null){ - output = value; - } - }); - - return output !== null ? (precision !== false ? output.toFixed(precision) : output) : ""; - }, - "min":function(values, data, calcParams){ - var output = null, - precision = typeof calcParams.precision !== "undefined" ? calcParams.precision : false; - - values.forEach(function(value){ - - value = Number(value); - - if(value < output || output === null){ - output = value; - } - }); - - return output !== null ? (precision !== false ? output.toFixed(precision) : output) : ""; - }, - "sum":function(values, data, calcParams){ - var output = 0, - precision = typeof calcParams.precision !== "undefined" ? calcParams.precision : false; - - if(values.length){ - values.forEach(function(value){ - value = Number(value); - - output += !isNaN(value) ? Number(value) : 0; - }); - } - - return precision !== false ? output.toFixed(precision) : output; - }, - "concat":function(values, data, calcParams){ - var output = 0; - - if(values.length){ - output = values.reduce(function(sum, value){ - return String(sum) + String(value); - }); - } - - return output; - }, - "count":function(values, data, calcParams){ - var output = 0; - - if(values.length){ - values.forEach(function(value){ - if(value){ - output ++; - } - }); - } - - return output; - }, -}; - - - -Tabulator.prototype.registerModule("columnCalcs", ColumnCalcs); \ No newline at end of file diff --git a/Gems/AssetMemoryAnalyzer/External/tabulator-master/src/js/modules/clipboard.js b/Gems/AssetMemoryAnalyzer/External/tabulator-master/src/js/modules/clipboard.js deleted file mode 100644 index 0f2993d580..0000000000 --- a/Gems/AssetMemoryAnalyzer/External/tabulator-master/src/js/modules/clipboard.js +++ /dev/null @@ -1,916 +0,0 @@ -var Clipboard = function(table){ - this.table = table; - this.mode = true; - this.copySelector = false; - this.copySelectorParams = {}; - this.copyFormatter = false; - this.copyFormatterParams = {}; - this.pasteParser = function(){}; - this.pasteAction = function(){}; - this.htmlElement = false; - this.config = {}; - - this.blocked = true; //block copy actions not originating from this command -}; - -Clipboard.prototype.initialize = function(){ - var self = this; - - this.mode = this.table.options.clipboard; - - if(this.mode === true || this.mode === "copy"){ - this.table.element.addEventListener("copy", function(e){ - var data; - - self.processConfig(); - - if(!self.blocked){ - e.preventDefault(); - - data = self.generateContent(); - - if (window.clipboardData && window.clipboardData.setData) { - window.clipboardData.setData('Text', data); - } else if (e.clipboardData && e.clipboardData.setData) { - e.clipboardData.setData('text/plain', data); - if(self.htmlElement){ - e.clipboardData.setData('text/html', self.htmlElement.outerHTML); - } - } else if (e.originalEvent && e.originalEvent.clipboardData.setData) { - e.originalEvent.clipboardData.setData('text/plain', data); - if(self.htmlElement){ - e.originalEvent.clipboardData.setData('text/html', self.htmlElement.outerHTML); - } - } - - self.table.options.clipboardCopied.call(this.table, data); - - self.reset(); - } - }); - } - - if(this.mode === true || this.mode === "paste"){ - this.table.element.addEventListener("paste", function(e){ - self.paste(e); - }); - } - - this.setPasteParser(this.table.options.clipboardPasteParser); - this.setPasteAction(this.table.options.clipboardPasteAction); -}; - -Clipboard.prototype.processConfig = function(){ - var config = { - columnHeaders:"groups", - rowGroups:true, - }; - - if(typeof this.table.options.clipboardCopyHeader !== "undefined"){ - config.columnHeaders = this.table.options.clipboardCopyHeader; - console.warn("DEPRECATION WANRING - clipboardCopyHeader option has been depricated, please use the columnHeaders property on the clipboardCopyConfig option"); - } - - if(this.table.options.clipboardCopyConfig){ - for(var key in this.table.options.clipboardCopyConfig){ - config[key] = this.table.options.clipboardCopyConfig[key]; - } - } - - if (config.rowGroups && this.table.options.groupBy && this.table.modExists("groupRows")){ - this.config.rowGroups = true; - } - - if(config.columnHeaders){ - if((config.columnHeaders === "groups" || config === true) && this.table.columnManager.columns.length != this.table.columnManager.columnsByIndex.length){ - this.config.columnHeaders = "groups"; - }else{ - this.config.columnHeaders = "columns"; - } - }else{ - this.config.columnHeaders = false; - } -}; - - -Clipboard.prototype.reset = function(){ - this.blocked = false; - this.originalSelectionText = ""; -}; - - -Clipboard.prototype.setPasteAction = function(action){ - - switch(typeof action){ - case "string": - this.pasteAction = this.pasteActions[action]; - - if(!this.pasteAction){ - console.warn("Clipboard Error - No such paste action found:", action); - } - break; - - case "function": - this.pasteAction = action; - break; - } -}; - -Clipboard.prototype.setPasteParser = function(parser){ - switch(typeof parser){ - case "string": - this.pasteParser = this.pasteParsers[parser]; - - if(!this.pasteParser){ - console.warn("Clipboard Error - No such paste parser found:", parser); - } - break; - - case "function": - this.pasteParser = parser; - break; - } -}; - - -Clipboard.prototype.paste = function(e){ - var data, rowData, rows; - - if(this.checkPaseOrigin(e)){ - - data = this.getPasteData(e); - - rowData = this.pasteParser.call(this, data); - - if(rowData){ - e.preventDefault(); - - if(this.table.modExists("mutator")){ - rowData = this.mutateData(rowData); - } - - rows = this.pasteAction.call(this, rowData); - this.table.options.clipboardPasted.call(this.table, data, rowData, rows); - }else{ - this.table.options.clipboardPasteError.call(this.table, data); - } - } -}; - -Clipboard.prototype.mutateData = function(data){ - var self = this, - output = []; - - if(Array.isArray(data)){ - data.forEach(function(row){ - output.push(self.table.modules.mutator.transformRow(row, "clipboard")); - }); - }else{ - output = data; - } - - return output; -}; - - -Clipboard.prototype.checkPaseOrigin = function(e){ - var valid = true; - - if(e.target.tagName != "DIV" || this.table.modules.edit.currentCell){ - valid = false; - } - - return valid; -}; - -Clipboard.prototype.getPasteData = function(e){ - var data; - - if (window.clipboardData && window.clipboardData.getData) { - data = window.clipboardData.getData('Text'); - } else if (e.clipboardData && e.clipboardData.getData) { - data = e.clipboardData.getData('text/plain'); - } else if (e.originalEvent && e.originalEvent.clipboardData.getData) { - data = e.originalEvent.clipboardData.getData('text/plain'); - } - - return data; -}; - - -Clipboard.prototype.copy = function(selector, selectorParams, formatter, formatterParams, internal){ - var range, sel; - this.blocked = false; - - if(this.mode === true || this.mode === "copy"){ - - if (typeof window.getSelection != "undefined" && typeof document.createRange != "undefined") { - range = document.createRange(); - range.selectNodeContents(this.table.element); - sel = window.getSelection(); - - if(sel.toString() && internal){ - selector = "userSelection"; - formatter = "raw"; - selectorParams = sel.toString(); - } - - sel.removeAllRanges(); - sel.addRange(range); - } else if (typeof document.selection != "undefined" && typeof document.body.createTextRange != "undefined") { - textRange = document.body.createTextRange(); - textRange.moveToElementText(this.table.element); - textRange.select(); - } - - this.setSelector(selector); - this.copySelectorParams = typeof selectorParams != "undefined" && selectorParams != null ? selectorParams : this.config.columnHeaders; - this.setFormatter(formatter); - this.copyFormatterParams = typeof formatterParams != "undefined" && formatterParams != null ? formatterParams : {}; - - document.execCommand('copy'); - - if(sel){ - sel.removeAllRanges(); - } - } -}; - -Clipboard.prototype.setSelector = function(selector){ - selector = selector || this.table.options.clipboardCopySelector; - - switch(typeof selector){ - case "string": - if(this.copySelectors[selector]){ - this.copySelector = this.copySelectors[selector]; - }else{ - console.warn("Clipboard Error - No such selector found:", selector); - } - break; - - case "function": - this.copySelector = selector; - break; - } -}; - -Clipboard.prototype.setFormatter = function(formatter){ - - formatter = formatter || this.table.options.clipboardCopyFormatter; - - switch(typeof formatter){ - case "string": - if(this.copyFormatters[formatter]){ - this.copyFormatter = this.copyFormatters[formatter]; - }else{ - console.warn("Clipboard Error - No such formatter found:", formatter); - } - break; - - case "function": - this.copyFormatter = formatter; - break; - } -}; - - -Clipboard.prototype.generateContent = function(){ - var data; - - this.htmlElement = false; - data = this.copySelector.call(this, this.config, this.copySelectorParams); - - return this.copyFormatter.call(this, data, this.config, this.copyFormatterParams); -}; - -Clipboard.prototype.generateSimpleHeaders = function(columns){ - var headers = []; - - columns.forEach(function(column){ - headers.push(column.definition.title); - }); - - return headers; -}; - -Clipboard.prototype.generateColumnGroupHeaders = function(columns){ - var output = []; - - this.table.columnManager.columns.forEach((column) => { - var colData = this.processColumnGroup(column); - - if(colData){ - output.push(colData); - } - }); - - return output; -}; - -Clipboard.prototype.processColumnGroup = function(column){ - var subGroups = column.columns; - - var groupData = { - type:"group", - title:column.definition.title, - column:column, - }; - - if(subGroups.length){ - groupData.subGroups = []; - groupData.width = 0; - - subGroups.forEach((subGroup) => { - var subGroupData = this.processColumnGroup(subGroup); - - if(subGroupData){ - groupData.width += subGroupData.width; - groupData.subGroups.push(subGroupData); - } - }); - - if(!groupData.width){ - return false; - } - }else{ - if(column.field && column.visible){ - groupData.width = 1; - }else{ - return false; - } - } - - return groupData; -}; - -Clipboard.prototype.groupHeadersToRows = function(columns){ - - var headers = []; - - function parseColumnGroup(column, level){ - - if(typeof headers[level] === "undefined"){ - headers[level] = []; - } - - headers[level].push(column.title); - - if(column.subGroups){ - column.subGroups.forEach(function(subGroup){ - parseColumnGroup(subGroup, level+1); - }); - }else{ - padColumnheaders(); - } - } - - function padColumnheaders(){ - var max = 0; - - headers.forEach(function(title){ - var len = title.length; - if(len > max){ - max = len; - } - }); - - headers.forEach(function(title){ - var len = title.length; - if(len < max){ - for(var i = len; i < max; i++){ - title.push(""); - } - } - }); - } - - columns.forEach(function(column){ - parseColumnGroup(column,0); - }); - - return headers; -}; - -Clipboard.prototype.rowsToData = function(rows, config, params){ - var columns = this.table.columnManager.columnsByIndex, - data = []; - - rows.forEach(function(row){ - var rowArray = [], - rowData = row.getData("clipboard"); - - columns.forEach(function(column){ - var value = column.getFieldValue(rowData); - - switch(typeof value){ - case "object": - value = JSON.stringify(value); - break; - - case "undefined": - case "null": - value = ""; - break; - - default: - value = value; - } - - rowArray.push(value); - }); - - data.push(rowArray); - }); - - return data; -}; - -Clipboard.prototype.buildComplexRows = function(config){ - var output = [], - groups = this.table.modules.groupRows.getGroups(); - - groups.forEach((group) => { - output.push(this.processGroupData(group)); - }); - - return output; -}; - - - -Clipboard.prototype.processGroupData = function(group){ - var subGroups = group.getSubGroups(); - - var groupData = { - type:"group", - key:group.key - }; - - if(subGroups.length){ - groupData.subGroups = []; - - subGroups.forEach((subGroup) => { - groupData.subGroups.push(this.processGroupData(subGroup)); - }); - }else{ - groupData.rows = group.getRows(true); - } - - return groupData; -}; - - -Clipboard.prototype.buildOutput = function(rows, config, params){ - var output = [], - columns = this.table.columnManager.columnsByIndex; - - if(config.columnHeaders){ - - if(config.columnHeaders == "groups"){ - columns = this.generateColumnGroupHeaders(this.table.columnManager.columns); - - output = output.concat(this.groupHeadersToRows(columns)); - }else{ - output.push(this.generateSimpleHeaders(columns)); - } - - } - - //generate styled content - if(this.table.options.clipboardCopyStyled){ - this.generateHTML(rows, columns, config, params); - } - - //generate unstyled content - if(config.rowGroups){ - rows.forEach((row) => { - output = output.concat(this.parseRowGroupData(row, config, params)); - }); - }else{ - output = output.concat(this.rowsToData(rows, config, params)); - } - - return output; -}; - - -Clipboard.prototype.parseRowGroupData = function (group, config, params){ - var groupData = []; - - groupData.push([group.key]); - - if(group.subGroups){ - group.subGroups.forEach((subGroup) => { - groupData = groupData.concat(this.parseRowGroupData(subGroup, config, params)); - }); - }else{ - - groupData = groupData.concat(this.rowsToData(group.rows, config, params)); - } - - return groupData; -}; - - -Clipboard.prototype.generateHTML = function (rows, columns, config, params){ - var self = this, - data = [], - headers = [], body, oddRow, evenRow, firstRow, firstCell, firstGroup, lastCell, styleCells; - - //create table element - this.htmlElement = document.createElement("table"); - self.mapElementStyles(this.table.element, this.htmlElement, ["border-top", "border-left", "border-right", "border-bottom"]); - - function generateSimpleHeaders(){ - var headerEl = document.createElement("tr"); - - columns.forEach(function(column){ - var columnEl = document.createElement("th"); - columnEl.innerHTML = column.definition.title; - - self.mapElementStyles(column.getElement(), columnEl, ["border-top", "border-left", "border-right", "border-bottom", "background-color", "color", "font-weight", "font-family", "font-size"]); - - headerEl.appendChild(columnEl); - }); - - self.mapElementStyles(self.table.columnManager.getHeadersElement(), headerEl, ["border-top", "border-left", "border-right", "border-bottom", "background-color", "color", "font-weight", "font-family", "font-size"]); - - self.htmlElement.appendChild(document.createElement("thead").appendChild(headerEl)); - } - - - function generateHeaders(headers){ - - var headerHolderEl = document.createElement("thead"); - - headers.forEach(function(columns){ - var headerEl = document.createElement("tr"); - - columns.forEach(function(column){ - var columnEl = document.createElement("th"); - - if(column.width > 1){ - columnEl.colSpan = column.width; - } - - if(column.height > 1){ - columnEl.rowSpan = column.height; - } - - columnEl.innerHTML = column.title; - - self.mapElementStyles(column.element, columnEl, ["border-top", "border-left", "border-right", "border-bottom", "background-color", "color", "font-weight", "font-family", "font-size"]); - - headerEl.appendChild(columnEl); - }); - - self.mapElementStyles(self.table.columnManager.getHeadersElement(), headerEl, ["border-top", "border-left", "border-right", "border-bottom", "background-color", "color", "font-weight", "font-family", "font-size"]); - - headerHolderEl.appendChild(headerEl); - }); - - self.htmlElement.appendChild(headerHolderEl); - - } - - function parseColumnGroup(column, level){ - - if(typeof headers[level] === "undefined"){ - headers[level] = []; - } - - headers[level].push({ - title:column.title, - width:column.width, - height:1, - children:!!column.subGroups, - element:column.column.getElement(), - }); - - if(column.subGroups){ - column.subGroups.forEach(function(subGroup){ - parseColumnGroup(subGroup, level+1); - }); - } - } - - function padVerticalColumnheaders(){ - headers.forEach(function(row, index){ - row.forEach(function(header){ - if(!header.children){ - header.height = headers.length - index; - } - }); - }); - } - - //create headers if needed - if(config.columnHeaders){ - if(config.columnHeaders == "groups"){ - columns.forEach(function(column){ - parseColumnGroup(column,0); - }); - - padVerticalColumnheaders(); - generateHeaders(headers); - }else{ - generateSimpleHeaders(); - } - } - - columns = this.table.columnManager.columnsByIndex; - - //create table body - body = document.createElement("tbody"); - - //lookup row styles - if(window.getComputedStyle){ - oddRow = this.table.element.querySelector(".tabulator-row-odd:not(.tabulator-group):not(.tabulator-calcs)"); - evenRow = this.table.element.querySelector(".tabulator-row-even:not(.tabulator-group):not(.tabulator-calcs)"); - firstRow = this.table.element.querySelector(".tabulator-row:not(.tabulator-group):not(.tabulator-calcs)"); - firstGroup = this.table.element.getElementsByClassName("tabulator-group")[0]; - - if(firstRow){ - styleCells = firstRow.getElementsByClassName("tabulator-cell"); - firstCell = styleCells[0]; - lastCell = styleCells[styleCells.length - 1]; - } - } - - function processRows(rowArray){ - //add rows to table - rowArray.forEach(function(row, i){ - var rowEl = document.createElement("tr"), - rowData = row.getData("clipboard"), - styleRow = firstRow; - - columns.forEach(function(column, j){ - var cellEl = document.createElement("td"), - value = column.getFieldValue(rowData); - - switch(typeof value){ - case "object": - value = JSON.stringify(value); - break; - - case "undefined": - case "null": - value = ""; - break; - - default: - value = value; - } - - cellEl.innerHTML = value; - - if(column.definition.align){ - cellEl.style.textAlign = column.definition.align; - } - - if(j < columns.length - 1){ - if(firstCell){ - self.mapElementStyles(firstCell, cellEl, ["border-top", "border-left", "border-right", "border-bottom", "color", "font-weight", "font-family", "font-size"]); - } - }else{ - if(firstCell){ - self.mapElementStyles(firstCell, cellEl, ["border-top", "border-left", "border-right", "border-bottom", "color", "font-weight", "font-family", "font-size"]); - } - } - - rowEl.appendChild(cellEl); - }); - - if(!(i % 2) && oddRow){ - styleRow = oddRow; - } - - if((i % 2) && evenRow){ - styleRow = evenRow; - } - - if(styleRow){ - self.mapElementStyles(styleRow, rowEl, ["border-top", "border-left", "border-right", "border-bottom", "color", "font-weight", "font-family", "font-size", "background-color"]); - } - - body.appendChild(rowEl); - }); - } - - function processGroup(group){ - var groupEl = document.createElement("tr"), - groupCellEl = document.createElement("td"); - - groupCellEl.colSpan = columns.length; - - groupCellEl.innerHTML = group.key; - - groupEl.appendChild(groupCellEl); - body.appendChild(groupEl); - - self.mapElementStyles(firstGroup, groupEl, ["border-top", "border-left", "border-right", "border-bottom", "color", "font-weight", "font-family", "font-size", "background-color"]); - - if(group.subGroups){ - group.subGroups.forEach((subGroup) => { - processGroup(subGroup); - }); - }else{ - processRows(group.rows); - } - } - - if(config.rowGroups){ - rows.forEach((group) => { - processGroup(group); - }); - }else{ - processRows(rows); - } - - this.htmlElement.appendChild(body); -}; - -Clipboard.prototype.mapElementStyles = function(from, to, props){ - - var lookup = { - "background-color" : "backgroundColor", - "color" : "fontColor", - "font-weight" : "fontWeight", - "font-family" : "fontFamily", - "font-size" : "fontSize", - "border-top" : "borderTop", - "border-left" : "borderLeft", - "border-right" : "borderRight", - "border-bottom" : "borderBottom", - }; - - if(window.getComputedStyle){ - var fromStyle = window.getComputedStyle(from); - - props.forEach(function(prop){ - to.style[lookup[prop]] = fromStyle.getPropertyValue(prop); - }); - } - - // return window.getComputedStyle ? window.getComputedStyle(element, null).getPropertyValue(property) : element.style[property.replace(/-([a-z])/g, function (g) { return g[1].toUpperCase(); })]; -}; - - -Clipboard.prototype.copySelectors = { - userSelection: function(config, params){ - return params; - }, - selected: function(config, params){ - var rows = []; - - if(this.table.modExists("selectRow", true)){ - rows = this.table.modules.selectRow.getSelectedRows(); - } - - if(config.rowGroups){ - console.warn("Clipboard Warning - select coptSelector does not support row groups"); - } - - return this.buildOutput(rows, config, params) - }, - table: function(config, params){ - if(config.rowGroups){ - console.warn("Clipboard Warning - table coptSelector does not support row groups"); - } - - return this.buildOutput(this.table.rowManager.getComponents(), config, params); - }, - active: function(config, params){ - var rows; - - if(config.rowGroups){ - rows = this.buildComplexRows(config); - }else{ - rows = this.table.rowManager.getComponents(true); - } - - return this.buildOutput(rows, config, params); - }, -}; - -Clipboard.prototype.copyFormatters = { - raw: function(data, params){ - return data; - }, - table: function(data, params){ - var output = []; - - data.forEach(function(row){ - row.forEach(function(value){ - if(typeof value == "undefined"){ - value = ""; - } - - value = typeof value == "undefined" || value === null ? "" : value.toString(); - - if(value.match(/\r|\n/)){ - value = value.split('"').join('""'); - value = '"' + value + '"'; - } - }); - - output.push(row.join("\t")); - }); - - return output.join("\n"); - }, -}; - -Clipboard.prototype.pasteParsers = { - table:function(clipboard){ - var data = [], - success = false, - headerFindSuccess = true, - columns = this.table.columnManager.columns, - columnMap = [], - rows = []; - - //get data from clipboard into array of columns and rows. - clipboard = clipboard.split("\n"); - - clipboard.forEach(function(row){ - data.push(row.split("\t")); - }); - - if(data.length && !(data.length === 1 && data[0].length < 2)){ - success = true; - - //check if headers are present by title - data[0].forEach(function(value){ - var column = columns.find(function(column){ - return value && column.definition.title && value.trim() && column.definition.title.trim() === value.trim(); - }); - - if(column){ - columnMap.push(column); - }else{ - headerFindSuccess = false; - } - }); - - //check if column headers are present by field - if(!headerFindSuccess){ - headerFindSuccess = true; - columnMap = []; - - data[0].forEach(function(value){ - var column = columns.find(function(column){ - return value && column.field && value.trim() && column.field.trim() === value.trim(); - }); - - if(column){ - columnMap.push(column); - }else{ - headerFindSuccess = false; - } - }); - - if(!headerFindSuccess){ - columnMap = this.table.columnManager.columnsByIndex; - } - } - - //remove header row if found - if(headerFindSuccess){ - data.shift(); - } - - data.forEach(function(item){ - var row = {}; - - item.forEach(function(value, i){ - if(columnMap[i]){ - row[columnMap[i].field] = value; - } - }); - - rows.push(row); - }); - - return rows; - }else{ - return false; - } - } -}; - -Clipboard.prototype.pasteActions = { - replace:function(rows){ - return this.table.setData(rows); - }, - update:function(rows){ - return this.table.updateOrAddData(rows); - }, - insert:function(rows){ - return this.table.addData(rows); - }, -}; - - - -Tabulator.prototype.registerModule("clipboard", Clipboard); diff --git a/Gems/AssetMemoryAnalyzer/External/tabulator-master/src/js/modules/comms.js b/Gems/AssetMemoryAnalyzer/External/tabulator-master/src/js/modules/comms.js deleted file mode 100644 index c5c727ea85..0000000000 --- a/Gems/AssetMemoryAnalyzer/External/tabulator-master/src/js/modules/comms.js +++ /dev/null @@ -1,45 +0,0 @@ -var Comms = function(table){ - this.table = table; -}; - - -Comms.prototype.getConnections = function(selectors){ - var self = this, - connections = [], - connection; - - connection = Tabulator.prototype.comms.lookupTable(selectors); - - connection.forEach(function(con){ - if(self.table !== con){ - connections.push(con); - } - }); - - return connections; -}; - -Comms.prototype.send = function(selectors, module, action, data){ - var self = this, - connections = this.getConnections(selectors); - - connections.forEach(function(connection){ - connection.tableComms(self.table.element, module, action, data); - }); - - if(!connections.length && selectors){ - console.warn("Table Connection Error - No tables matching selector found", selectors); - } -}; - - -Comms.prototype.receive = function(table, module, action, data){ - if(this.table.modExists(module)){ - return this.table.modules[module].commsReceived(table, action, data); - }else{ - console.warn("Inter-table Comms Error - no such module:", module); - } -}; - - -Tabulator.prototype.registerModule("comms", Comms); \ No newline at end of file diff --git a/Gems/AssetMemoryAnalyzer/External/tabulator-master/src/js/modules/data_tree.js b/Gems/AssetMemoryAnalyzer/External/tabulator-master/src/js/modules/data_tree.js deleted file mode 100644 index 9381f18187..0000000000 --- a/Gems/AssetMemoryAnalyzer/External/tabulator-master/src/js/modules/data_tree.js +++ /dev/null @@ -1,301 +0,0 @@ -var DataTree = function(table){ - this.table = table; - this.indent = 10; - this.field = ""; - this.collapseEl = null; - this.expandEl = null; - this.branchEl = null; - - this.startOpen = function(){}; - - this.displayIndex = 0; -}; - -DataTree.prototype.initialize = function(){ - var dummyEl = null, - options = this.table.options; - - this.field = options.dataTreeChildField; - this.indent = options.dataTreeChildIndent; - - if(options.dataTreeBranchElement){ - - if(options.dataTreeBranchElement === true){ - this.branchEl = document.createElement("div"); - this.branchEl.classList.add("tabulator-data-tree-branch"); - }else{ - if(typeof options.dataTreeBranchElement === "string"){ - dummyEl = document.createElement("div"); - dummyEl.innerHTML = options.dataTreeBranchElement; - this.branchEl = dummyEl.firstChild; - }else{ - this.branchEl = options.dataTreeBranchElement; - } - } - } - - if(options.dataTreeCollapseElement){ - if(typeof options.dataTreeCollapseElement === "string"){ - dummyEl = document.createElement("div"); - dummyEl.innerHTML = options.dataTreeCollapseElement; - this.collapseEl = dummyEl.firstChild; - }else{ - this.collapseEl = options.dataTreeCollapseElement; - } - }else{ - this.collapseEl = document.createElement("div"); - this.collapseEl.classList.add("tabulator-data-tree-control"); - this.collapseEl.innerHTML = "
"; - } - - if(options.dataTreeExpandElement){ - if(typeof options.dataTreeExpandElement === "string"){ - dummyEl = document.createElement("div"); - dummyEl.innerHTML = options.dataTreeExpandElement; - this.expandEl = dummyEl.firstChild; - }else{ - this.expandEl = options.dataTreeExpandElement; - } - }else{ - this.expandEl = document.createElement("div"); - this.expandEl.classList.add("tabulator-data-tree-control"); - this.expandEl.innerHTML = "
"; - } - - - switch(typeof options.dataTreeStartExpanded){ - case "boolean": - this.startOpen = function(row, index){ - return options.dataTreeStartExpanded; - }; - break; - - case "function": - this.startOpen = options.dataTreeStartExpanded; - break; - - default: - this.startOpen = function(row, index){ - return options.dataTreeStartExpanded[index]; - }; - break; - } - - - - -}; - -DataTree.prototype.initializeRow = function(row){ - - var children = typeof row.getData()[this.field] !== "undefined"; - - row.modules.dataTree = { - index:0, - open:children ? this.startOpen(row.getComponent(), 0) : false, - controlEl:false, - branchEl:false, - parent:false, - children:children, - }; -}; - - -DataTree.prototype.layoutRow = function(row){ - var cell = row.getCells()[0], - el = cell.getElement(), - config = row.modules.dataTree; - - el.style.paddingLeft = parseInt(window.getComputedStyle(el, null).getPropertyValue('padding-left')) + (config.index * this.indent) + "px"; - - if(config.branchEl){ - config.branchEl.parentNode.removeChild(config.branchEl); - } - - this.generateControlElement(row, el); - - if(config.index && this.branchEl){ - config.branchEl = this.branchEl.cloneNode(true); - el.insertBefore(config.branchEl, el.firstChild); - el.style.paddingLeft = (parseInt(el.style.paddingLeft) + ((config.branchEl.offsetWidth + config.branchEl.style.marginRight) * (config.index - 1))) + "px"; - } -}; - -DataTree.prototype.generateControlElement = function(row, el){ - var config = row.modules.dataTree, - el = el || row.getCells()[0].getElement(), - oldControl = config.controlEl; - - if(config.children !== false){ - - if(config.open){ - config.controlEl = this.collapseEl.cloneNode(true); - config.controlEl.addEventListener("click", (e) => { - e.stopPropagation(); - this.collapseRow(row); - }); - }else{ - config.controlEl = this.expandEl.cloneNode(true); - config.controlEl.addEventListener("click", (e) => { - e.stopPropagation(); - this.expandRow(row); - }); - } - - config.controlEl.addEventListener("mousedown", (e) => { - e.stopPropagation(); - }); - - if(oldControl && oldControl.parentNode === el){ - oldControl.parentNode.replaceChild(config.controlEl,oldControl); - }else{ - el.insertBefore(config.controlEl, el.firstChild); - } - } -}; - -DataTree.prototype.setDisplayIndex = function (index) { - this.displayIndex = index; -}; - -DataTree.prototype.getDisplayIndex = function () { - return this.displayIndex; -}; - -DataTree.prototype.getRows = function(rows){ - var output = []; - - rows.forEach((row, i) => { - var config = row.modules.dataTree.children, - children; - - output.push(row); - - if(!config.index && config.children !== false){ - children = this.getChildren(row); - - children.forEach((child) => { - output.push(child); - }); - } - }); - - return output; -}; - - -DataTree.prototype.getChildren = function(row){ - var config = row.modules.dataTree, - output = []; - - if(config.children !== false && config.open){ - if(!Array.isArray(config.children)){ - config.children = this.generateChildren(row); - } - - config.children.forEach((child) => { - output.push(child); - - var subChildren = this.getChildren(child); - - subChildren.forEach((sub) => { - output.push(sub); - }); - }); - } - - return output; -}; - - -DataTree.prototype.generateChildren = function(row){ - var children = []; - - row.getData()[this.field].forEach((childData) => { - var childRow = new Row(childData || {}, this.table.rowManager); - childRow.modules.dataTree.index = row.modules.dataTree.index + 1; - childRow.modules.dataTree.parent = row; - childRow.modules.dataTree.open = this.startOpen(row, childRow.modules.dataTree.index); - children.push(childRow); - }); - - return children; -}; - - - -DataTree.prototype.expandRow = function(row, silent){ - var config = row.modules.dataTree; - - if(config.children !== false){ - config.open = true; - - row.reinitialize(); - - this.table.rowManager.refreshActiveData("tree", false, true); - - this.table.options.dataTreeRowExpanded(row.getComponent(), row.modules.dataTree.index); - } -}; - -DataTree.prototype.collapseRow = function(row){ - var config = row.modules.dataTree; - - if(config.children !== false){ - config.open = false; - - row.reinitialize(); - - this.table.rowManager.refreshActiveData("tree", false, true); - - this.table.options.dataTreeRowCollapsed(row.getComponent(), row.modules.dataTree.index); - } -}; - -DataTree.prototype.toggleRow = function(row){ - var config = row.modules.dataTree; - - if(config.children !== false){ - if(config.open){ - this.collapseRow(row); - }else{ - this.expandRow(row); - } - } -}; - -DataTree.prototype.getTreeParent = function(row){ - return row.modules.dataTree.parent ? row.modules.dataTree.parent.getComponent() : false; -}; - -DataTree.prototype.getTreeChildren = function(row){ - var config = row.modules.dataTree, - output = []; - - if(config.children){ - - if(!Array.isArray(config.children)){ - config.children = this.generateChildren(row); - } - - config.children.forEach((childRow) => { - if(childRow instanceof Row){ - output.push(childRow.getComponent()); - } - }); - } - - return output; -}; - - -DataTree.prototype.checkForRestyle = function(cell){ - if(!cell.row.cells.indexOf(cell)){ - if(cell.row.modules.dataTree.children !== false){ - cell.row.reinitialize(); - } - } -}; - - -Tabulator.prototype.registerModule("dataTree", DataTree); \ No newline at end of file diff --git a/Gems/AssetMemoryAnalyzer/External/tabulator-master/src/js/modules/download.js b/Gems/AssetMemoryAnalyzer/External/tabulator-master/src/js/modules/download.js deleted file mode 100644 index 79c2b46010..0000000000 --- a/Gems/AssetMemoryAnalyzer/External/tabulator-master/src/js/modules/download.js +++ /dev/null @@ -1,735 +0,0 @@ -var Download = function(table){ - this.table = table; //hold Tabulator object - this.fields = {}; //hold filed multi dimension arrays - this.columnsByIndex = []; //hold columns in their order in the table - this.columnsByField = {}; //hold columns with lookup by field name - this.config = {}; -}; - -//trigger file download -Download.prototype.download = function(type, filename, options, interceptCallback){ - var self = this, - downloadFunc = false; - this.processConfig(); - - function buildLink(data, mime){ - if(interceptCallback){ - interceptCallback(data); - }else{ - self.triggerDownload(data, mime, type, filename); - } - } - - if(typeof type == "function"){ - downloadFunc = type; - }else{ - if(self.downloaders[type]){ - downloadFunc = self.downloaders[type]; - }else{ - console.warn("Download Error - No such download type found: ", type); - } - } - - this.processColumns(); - - if(downloadFunc){ - downloadFunc.call(this, self.processDefinitions(), self.processData() , options || {}, buildLink, this.config); - } -}; - - -Download.prototype.processConfig = function(){ - var config = { //download config - columnGroups:true, - rowGroups:true, - }; - - if(this.table.options.downloadConfig){ - for(var key in this.table.options.downloadConfig){ - config[key] = this.table.options.downloadConfig[key]; - } - } - - if (config.rowGroups && this.table.options.groupBy && this.table.modExists("groupRows")){ - this.config.rowGroups = true; - } - - if (config.columnGroups && this.table.columnManager.columns.length != this.table.columnManager.columnsByIndex.length){ - this.config.columnGroups = true; - } -}; - -Download.prototype.processColumns = function () { - var self = this; - - self.columnsByIndex = []; - self.columnsByField = {}; - - self.table.columnManager.columnsByIndex.forEach(function (column) { - - if (column.field && column.visible && column.definition.download !== false) { - self.columnsByIndex.push(column); - self.columnsByField[column.field] = column; - } - }); -}; - -Download.prototype.processDefinitions = function(){ - var self = this, - processedDefinitions = []; - - if(this.config.columnGroups){ - self.table.columnManager.columns.forEach(function(column){ - var colData = self.processColumnGroup(column); - - if(colData){ - processedDefinitions.push(colData); - } - }); - }else{ - self.columnsByIndex.forEach(function(column){ - if(column.download !== false){ - //isolate definiton from defintion object - processedDefinitions.push(self.processDefinition(column)); - } - }); - } - - return processedDefinitions; -}; - -Download.prototype.processColumnGroup = function(column){ - var subGroups = column.columns; - - var groupData = { - type:"group", - title:column.definition.title, - }; - - if(subGroups.length){ - groupData.subGroups = []; - groupData.width = 0; - - subGroups.forEach((subGroup) => { - var subGroupData = this.processColumnGroup(subGroup); - - if(subGroupData){ - groupData.width += subGroupData.width; - groupData.subGroups.push(subGroupData); - } - }); - - if(!groupData.width){ - return false; - } - }else{ - if(column.field && column.visible && column.definition.download !== false){ - groupData.width = 1; - groupData.definition = this.processDefinition(column); - }else{ - return false; - } - } - - return groupData; -}; - -Download.prototype.processDefinition = function(column){ - var def = {}; - - for(var key in column.definition){ - def[key] = column.definition[key]; - } - - if(typeof column.definition.downloadTitle != "undefined"){ - def.title = column.definition.downloadTitle; - } - - return def; -}; - -Download.prototype.processData = function(){ - var self = this, - data = [], - groups = []; - - if(this.config.rowGroups){ - groups = this.table.modules.groupRows.getGroups(); - - groups.forEach((group) => { - data.push(this.processGroupData(group)); - }); - }else{ - data = self.table.rowManager.getData(true, "download"); - } - - //bulk data processing - if(typeof self.table.options.downloadDataFormatter == "function"){ - data = self.table.options.downloadDataFormatter(data); - } - - return data; -}; - -Download.prototype.processGroupData = function(group){ - var subGroups = group.getSubGroups(); - - var groupData = { - type:"group", - key:group.key - }; - - if(subGroups.length){ - groupData.subGroups = []; - - subGroups.forEach((subGroup) => { - groupData.subGroups.push(this.processGroupData(subGroup)); - }); - }else{ - groupData.rows = group.getData(true, "download"); - } - - return groupData; -}; - -Download.prototype.triggerDownload = function(data, mime, type, filename){ - var element = document.createElement('a'), - blob = new Blob([data],{type:mime}), - filename = filename || "Tabulator." + (typeof type === "function" ? "txt" : type); - - blob = this.table.options.downloadReady.call(this.table, data, blob); - - if(blob){ - - if(navigator.msSaveOrOpenBlob){ - navigator.msSaveOrOpenBlob(blob, filename); - }else{ - element.setAttribute('href', window.URL.createObjectURL(blob)); - - //set file title - element.setAttribute('download', filename); - - //trigger download - element.style.display = 'none'; - document.body.appendChild(element); - element.click(); - - //remove temporary link element - document.body.removeChild(element); - } - - - if(this.table.options.downloadComplete){ - this.table.options.downloadComplete(); - } - } - -}; - -//nested field lookup -Download.prototype.getFieldValue = function(field, data){ - var column = this.columnsByField[field]; - - if(column){ - return column.getFieldValue(data); - } - - return false; -}; - - -Download.prototype.commsReceived = function(table, action, data){ - switch(action){ - case "intercept": - this.download(data.type, "", data.options, data.intercept); - break; - } -}; - - -//downloaders -Download.prototype.downloaders = { - csv:function(columns, data, options, setFileContents, config){ - var self = this, - titles = [], - fields = [], - delimiter = options && options.delimiter ? options.delimiter : ",", - fileContents; - - //build column headers - function parseSimpleTitles(){ - columns.forEach(function(column){ - titles.push('"' + String(column.title).split('"').join('""') + '"'); - fields.push(column.field); - }); - } - - function parseColumnGroup(column, level){ - if(column.subGroups){ - column.subGroups.forEach(function(subGroup){ - parseColumnGroup(subGroup, level+1); - }); - }else{ - titles.push('"' + String(column.title).split('"').join('""') + '"'); - fields.push(column.definition.field); - } - } - - if(config.columnGroups){ - console.warn("Download Warning - CSV downloader cannot process column groups"); - - columns.forEach(function(column){ - parseColumnGroup(column,0); - }); - }else{ - parseSimpleTitles(); - } - - - //generate header row - fileContents = [titles.join(delimiter)]; - - function parseRows(data){ - //generate each row of the table - data.forEach(function(row){ - var rowData = []; - - fields.forEach(function(field){ - var value = self.getFieldValue(field, row); - - switch(typeof value){ - case "object": - value = JSON.stringify(value); - break; - - case "undefined": - case "null": - value = ""; - break; - - default: - value = value; - } - - //escape quotation marks - rowData.push('"' + String(value).split('"').join('""') + '"'); - }); - - fileContents.push(rowData.join(delimiter)); - }); - } - - function parseGroup(group){ - if(group.subGroups){ - group.subGroups.forEach(function(subGroup){ - parseGroup(subGroup); - }); - }else{ - parseRows(group.rows); - } - } - - if(config.rowGroups){ - console.warn("Download Warning - CSV downloader cannot process row groups"); - - data.forEach(function(group){ - parseGroup(group); - }); - }else{ - parseRows(data); - } - - setFileContents(fileContents.join("\n"), "text/csv"); - }, - - json:function(columns, data, options, setFileContents, config){ - var fileContents = JSON.stringify(data, null, '\t'); - - setFileContents(fileContents, "application/json"); - }, - - pdf:function(columns, data, options, setFileContents, config){ - var self = this, - fields = [], - header = [], - body = [], - table = "", - groupRowIndexs = [], - autoTableParams = {}, - rowGroupStyles = {}, - jsPDFParams = options.jsPDF || {}, - title = options && options.title ? options.title : ""; - - if(!jsPDFParams.orientation){ - jsPDFParams.orientation = options.orientation || "landscape"; - } - - if(!jsPDFParams.unit){ - jsPDFParams.unit = "pt"; - } - - //build column headers - function parseSimpleTitles(){ - columns.forEach(function(column){ - if(column.field){ - header.push(column.title || ""); - fields.push(column.field); - } - }); - } - - function parseColumnGroup(column, level){ - if(column.subGroups){ - column.subGroups.forEach(function(subGroup){ - parseColumnGroup(subGroup, level+1); - }); - }else{ - header.push(column.title || ""); - fields.push(column.definition.field); - } - } - - if(config.columnGroups){ - console.warn("Download Warning - PDF downloader cannot process column groups"); - - columns.forEach(function(column){ - parseColumnGroup(column,0); - }); - }else{ - parseSimpleTitles(); - } - - function parseValue(value){ - switch(typeof value){ - case "object": - value = JSON.stringify(value); - break; - - case "undefined": - case "null": - value = ""; - break; - - default: - value = value; - } - - return value; - } - - function parseRows(data){ - //build table rows - data.forEach(function(row){ - var rowData = []; - - fields.forEach(function(field){ - var value = self.getFieldValue(field, row); - rowData.push(parseValue(value)); - }); - - body.push(rowData); - }); - } - - function parseGroup(group){ - var groupData = []; - - groupData.push(parseValue(group.key)); - - groupRowIndexs.push(body.length); - - body.push(groupData); - - if(group.subGroups){ - group.subGroups.forEach(function(subGroup){ - parseGroup(subGroup); - }); - }else{ - parseRows(group.rows); - } - } - - if(config.rowGroups){ - data.forEach(function(group){ - parseGroup(group); - }); - }else{ - parseRows(data); - } - - var doc = new jsPDF(jsPDFParams); //set document to landscape, better for most tables - - if(options && options.autoTable){ - if(typeof options.autoTable === "function"){ - autoTableParams = options.autoTable(doc) || {}; - }else{ - autoTableParams = options.autoTable; - } - } - - if(config.rowGroups){ - - rowGroupStyles = options.rowGroupStyles || { - fontStyle: "bold", - fontSize: 12, - cellPadding: 6, - fillColor: 220, - }; - - function createdCell (cell, data){ - if(groupRowIndexs.indexOf(data.row.index) > -1){ - for(var key in rowGroupStyles){ - cell.styles[key] = rowGroupStyles[key]; - } - } - } - - if(!autoTableParams.createdCell){ - autoTableParams.createdCell = createdCell; - }else{ - var createdCellHolder = autoTableParams.createdCell; - - autoTableParams.createdCell = function(cell, data){ - createdCell(cell, data); - createdCellHolder(cell, data); - }; - } - } - - if(title){ - autoTableParams.addPageContent = function(data) { - doc.text(title, 40, 30); - }; - } - - doc.autoTable(header, body, autoTableParams); - - setFileContents(doc.output("arraybuffer"), "application/pdf"); - }, - - xlsx:function(columns, data, options, setFileContents, config){ - var self = this, - sheetName = options.sheetName || "Sheet1", - workbook = {SheetNames:[], Sheets:{}}, - groupRowIndexs = [], - groupColumnIndexs = [], - output; - - function generateSheet(){ - var titles = [], - fields = [], - rows = [], - worksheet; - - //convert rows to worksheet - function rowsToSheet(){ - var sheet = {}; - var range = {s: {c:0, r:0}, e: {c:fields.length, r:rows.length }}; - - XLSX.utils.sheet_add_aoa(sheet, rows); - - sheet['!ref'] = XLSX.utils.encode_range(range); - - var merges = generateMerges(); - - if(merges.length){ - sheet["!merges"] = merges; - } - - return sheet; - } - - function parseSimpleTitles(){ - //get field lists - columns.forEach(function(column){ - titles.push(column.title); - fields.push(column.field); - }); - - rows.push(titles); - } - - function parseColumnGroup(column, level){ - - if(typeof titles[level] === "undefined"){ - titles[level] = []; - } - - if(typeof groupColumnIndexs[level] === "undefined"){ - groupColumnIndexs[level] = []; - } - - if(column.width > 1){ - - groupColumnIndexs[level].push({ - type:"hoz", - start:titles[level].length, - end:titles[level].length + column.width - 1, - }); - } - - titles[level].push(column.title); - - if(column.subGroups){ - column.subGroups.forEach(function(subGroup){ - parseColumnGroup(subGroup, level+1); - }); - }else{ - fields.push(column.definition.field); - padColumnTitles(fields.length - 1, level); - - groupColumnIndexs[level].push({ - type:"vert", - start:fields.length - 1, - }); - - } - } - - - function padColumnTitles(){ - var max = 0; - - titles.forEach(function(title){ - var len = title.length; - if(len > max){ - max = len; - } - }); - - titles.forEach(function(title){ - var len = title.length; - if(len < max){ - for(var i = len; i < max; i++){ - title.push(""); - } - } - }); - } - - if(config.columnGroups){ - columns.forEach(function(column){ - parseColumnGroup(column,0); - }); - - titles.forEach(function(title){ - rows.push(title); - }); - }else{ - parseSimpleTitles(); - } - - function generateMerges(){ - var output = []; - - groupRowIndexs.forEach(function(index){ - output.push({s:{r:index,c:0},e:{r:index,c:fields.length - 1}}); - }); - - groupColumnIndexs.forEach(function(merges, level){ - merges.forEach(function(merge){ - if(merge.type === "hoz"){ - output.push({s:{r:level,c:merge.start},e:{r:level,c:merge.end}}); - }else{ - if(level != titles.length - 1){ - output.push({s:{r:level,c:merge.start},e:{r:titles.length - 1,c:merge.start}}); - } - } - }); - }); - - return output; - } - - //generate each row of the table - function parseRows(data){ - data.forEach(function(row){ - var rowData = []; - - fields.forEach(function(field){ - var value = self.getFieldValue(field, row); - - rowData.push(typeof value === "object" ? JSON.stringify(value) : value); - }); - - rows.push(rowData); - }); - } - - function parseGroup(group){ - var groupData = []; - - groupData.push(group.key); - - groupRowIndexs.push(rows.length); - - rows.push(groupData); - - if(group.subGroups){ - group.subGroups.forEach(function(subGroup){ - parseGroup(subGroup); - }); - }else{ - parseRows(group.rows); - } - } - - if(config.rowGroups){ - data.forEach(function(group){ - parseGroup(group); - }); - }else{ - parseRows(data); - } - - worksheet = rowsToSheet(); - - return worksheet; - } - - if(options.sheetOnly){ - setFileContents(generateSheet()); - return; - } - - if(options.sheets){ - for(var sheet in options.sheets){ - - if(options.sheets[sheet] === true){ - workbook.SheetNames.push(sheet); - workbook.Sheets[sheet] = generateSheet(); - }else{ - - workbook.SheetNames.push(sheet); - - this.table.modules.comms.send(options.sheets[sheet], "download", "intercept",{ - type:"xlsx", - options:{sheetOnly:true}, - intercept:function(data){ - workbook.Sheets[sheet] = data; - } - }); - } - } - }else{ - workbook.SheetNames.push(sheetName); - workbook.Sheets[sheetName] = generateSheet(); - } - - //convert workbook to binary array - function s2ab(s) { - var buf = new ArrayBuffer(s.length); - var view = new Uint8Array(buf); - for (var i=0; i!=s.length; ++i) view[i] = s.charCodeAt(i) & 0xFF; - return buf; - } - - output = XLSX.write(workbook, {bookType:'xlsx', bookSST:true, type: 'binary'}); - - setFileContents(s2ab(output), "application/octet-stream"); - }, - -}; - - -Tabulator.prototype.registerModule("download", Download); \ No newline at end of file diff --git a/Gems/AssetMemoryAnalyzer/External/tabulator-master/src/js/modules/edit.js b/Gems/AssetMemoryAnalyzer/External/tabulator-master/src/js/modules/edit.js deleted file mode 100644 index ecb311fb19..0000000000 --- a/Gems/AssetMemoryAnalyzer/External/tabulator-master/src/js/modules/edit.js +++ /dev/null @@ -1,1439 +0,0 @@ -var Edit = function(table){ - this.table = table; //hold Tabulator object - this.currentCell = false; //hold currently editing cell - this.mouseClick = false; //hold mousedown state to prevent click binding being overriden by editor opening - this.recursionBlock = false; //prevent focus recursion - this.invalidEdit = false; -}; - - -//initialize column editor -Edit.prototype.initializeColumn = function(column){ - var self = this, - config = { - editor:false, - blocked:false, - check:column.definition.editable, - params:column.definition.editorParams || {} - }; - - //set column editor - switch(typeof column.definition.editor){ - case "string": - - if(column.definition.editor === "tick"){ - column.definition.editor = "tickCross"; - console.warn("DEPRECATION WANRING - the tick editor has been depricated, please use the tickCross editor"); - } - - if(self.editors[column.definition.editor]){ - config.editor = self.editors[column.definition.editor]; - }else{ - console.warn("Editor Error - No such editor found: ", column.definition.editor); - } - break; - - case "function": - config.editor = column.definition.editor; - break; - - case "boolean": - - if(column.definition.editor === true){ - - if(typeof column.definition.formatter !== "function"){ - - if(column.definition.formatter === "tick"){ - column.definition.formatter = "tickCross"; - console.warn("DEPRECATION WANRING - the tick editor has been depricated, please use the tickCross editor"); - } - - if(self.editors[column.definition.formatter]){ - config.editor = self.editors[column.definition.formatter]; - }else{ - config.editor = self.editors["input"]; - } - }else{ - console.warn("Editor Error - Cannot auto lookup editor for a custom formatter: ", column.definition.formatter); - } - } - break; - } - - if(config.editor){ - column.modules.edit = config; - } -}; - -Edit.prototype.getCurrentCell = function(){ - return this.currentCell ? this.currentCell.getComponent() : false; -}; - -Edit.prototype.clearEditor = function(){ - var cell = this.currentCell, - cellEl; - - this.invalidEdit = false; - - if(cell){ - this.currentCell = false; - - cellEl = cell.getElement(); - cellEl.classList.remove("tabulator-validation-fail"); - cellEl.classList.remove("tabulator-editing"); - while(cellEl.firstChild) cellEl.removeChild(cellEl.firstChild); - - cell.row.getElement().classList.remove("tabulator-row-editing"); - } -}; - -Edit.prototype.cancelEdit = function(){ - - if(this.currentCell){ - var cell = this.currentCell; - var component = this.currentCell.getComponent(); - - this.clearEditor(); - cell.setValueActual(cell.getValue()); - - if(cell.column.cellEvents.cellEditCancelled){ - cell.column.cellEvents.cellEditCancelled.call(this.table, component); - } - - this.table.options.cellEditCancelled.call(this.table, component); - } -}; - -//return a formatted value for a cell -Edit.prototype.bindEditor = function(cell){ - var self = this, - element = cell.getElement(); - - element.setAttribute("tabindex", 0); - - element.addEventListener("click", function(e){ - if(!element.classList.contains("tabulator-editing")){ - element.focus(); - } - }); - - element.addEventListener("mousedown", function(e){ - self.mouseClick = true; - }); - - element.addEventListener("focus", function(e){ - if(!self.recursionBlock){ - self.edit(cell, e, false); - } - }); -}; - -Edit.prototype.focusCellNoEvent = function(cell){ - this.recursionBlock = true; - cell.getElement().focus(); - this.recursionBlock = false; -}; - -Edit.prototype.editCell = function(cell, forceEdit){ - this.focusCellNoEvent(cell); - this.edit(cell, false, forceEdit); -}; - -Edit.prototype.edit = function(cell, e, forceEdit){ - var self = this, - allowEdit = true, - rendered = function(){}, - element = cell.getElement(), - cellEditor, component, params; - - //prevent editing if another cell is refusing to leave focus (eg. validation fail) - if(this.currentCell){ - if(!this.invalidEdit){ - this.cancelEdit(); - } - return; - } - - //handle successfull value change - function success(value){ - - if(self.currentCell === cell){ - var valid = true; - - if(cell.column.modules.validate && self.table.modExists("validate")){ - valid = self.table.modules.validate.validate(cell.column.modules.validate, cell.getComponent(), value); - } - - if(valid === true){ - self.clearEditor(); - cell.setValue(value, true); - - if(self.table.options.dataTree && self.table.modExists("dataTree")){ - self.table.modules.dataTree.checkForRestyle(cell); - } - }else{ - self.invalidEdit = true; - element.classList.add("tabulator-validation-fail"); - self.focusCellNoEvent(cell); - rendered(); - self.table.options.validationFailed.call(self.table, cell.getComponent(), value, valid); - } - }else{ - // console.warn("Edit Success Error - cannot call success on a cell that is no longer being edited"); - } - } - - //handle aborted edit - function cancel(){ - if(self.currentCell === cell){ - self.cancelEdit(); - - if(self.table.options.dataTree && self.table.modExists("dataTree")){ - self.table.modules.dataTree.checkForRestyle(cell); - } - }else{ - // console.warn("Edit Success Error - cannot call cancel on a cell that is no longer being edited"); - } - } - - function onRendered(callback){ - rendered = callback; - } - - if(!cell.column.modules.edit.blocked){ - if(e){ - e.stopPropagation(); - } - - switch(typeof cell.column.modules.edit.check){ - case "function": - allowEdit = cell.column.modules.edit.check(cell.getComponent()); - break; - - case "boolean": - allowEdit = cell.column.modules.edit.check; - break; - } - - if(allowEdit || forceEdit){ - - self.cancelEdit(); - - self.currentCell = cell; - - component = cell.getComponent(); - - if(this.mouseClick){ - this.mouseClick = false; - - if(cell.column.cellEvents.cellClick){ - cell.column.cellEvents.cellClick.call(this.table, e, component); - } - } - - if(cell.column.cellEvents.cellEditing){ - cell.column.cellEvents.cellEditing.call(this.table, component); - } - - self.table.options.cellEditing.call(this.table, component); - - params = typeof cell.column.modules.edit.params === "function" ? cell.column.modules.edit.params(component) : cell.column.modules.edit.params; - - cellEditor = cell.column.modules.edit.editor.call(self, component, onRendered, success, cancel, params); - - //if editor returned, add to DOM, if false, abort edit - if(cellEditor !== false){ - - if(cellEditor instanceof Node){ - element.classList.add("tabulator-editing"); - cell.row.getElement().classList.add("tabulator-row-editing"); - while(element.firstChild) element.removeChild(element.firstChild); - element.appendChild(cellEditor); - - //trigger onRendered Callback - rendered(); - - //prevent editing from triggering rowClick event - var children = element.children; - - for (var i = 0; i < children.length; i++) { - children[i].addEventListener("click", function(e){ - e.stopPropagation(); - }); - } - }else{ - console.warn("Edit Error - Editor should return an instance of Node, the editor returned:", cellEditor); - element.blur(); - return false; - } - - }else{ - element.blur(); - return false; - } - - return true; - }else{ - this.mouseClick = false; - element.blur(); - return false; - } - }else{ - this.mouseClick = false; - element.blur(); - return false; - } -}; - -//default data editors -Edit.prototype.editors = { - - //input element - input:function(cell, onRendered, success, cancel, editorParams){ - - //create and style input - var cellValue = cell.getValue(), - input = document.createElement("input"); - - input.setAttribute("type", "text"); - - input.style.padding = "4px"; - input.style.width = "100%"; - input.style.boxSizing = "border-box"; - - input.value = typeof cellValue !== "undefined" ? cellValue : ""; - - onRendered(function(){ - input.focus(); - input.style.height = "100%"; - }); - - function onChange(e){ - if(((cellValue === null || typeof cellValue === "undefined") && input.value !== "") || input.value != cellValue){ - success(input.value); - }else{ - cancel(); - } - } - - //submit new value on blur or change - input.addEventListener("change", onChange); - input.addEventListener("blur", onChange); - - //submit new value on enter - input.addEventListener("keydown", function(e){ - switch(e.keyCode){ - case 13: - success(input.value); - break; - - case 27: - cancel(); - break; - } - }); - - return input; - }, - - //resizable text area element - textarea:function(cell, onRendered, success, cancel, editorParams){ - var self = this, - cellValue = cell.getValue(), - value = String(typeof cellValue == "null" || typeof cellValue == "undefined" ? "" : cellValue), - count = (value.match(/(?:\r\n|\r|\n)/g) || []).length + 1, - input = document.createElement("textarea"), - scrollHeight = 0; - - //create and style input - input.style.display = "block"; - input.style.padding = "2px"; - input.style.height = "100%"; - input.style.width = "100%"; - input.style.boxSizing = "border-box"; - input.style.whiteSpace = "pre-wrap"; - input.style.resize = "none"; - - input.value = value; - - onRendered(function(){ - input.focus(); - input.style.height = "100%"; - }); - - function onChange(e){ - - if(((cellValue === null || typeof cellValue === "undefined") && input.value !== "") || input.value != cellValue){ - success(input.value); - setTimeout(function(){ - cell.getRow().normalizeHeight(); - },300) - }else{ - cancel(); - } - } - - //submit new value on blur or change - input.addEventListener("change", onChange); - input.addEventListener("blur", onChange); - - input.addEventListener("keyup", function(){ - - input.style.height = ""; - - var heightNow = input.scrollHeight; - - input.style.height = heightNow + "px"; - - if(heightNow != scrollHeight){ - scrollHeight = heightNow; - cell.getRow().normalizeHeight(); - } - }); - - input.addEventListener("keydown", function(e){ - if(e.keyCode == 27){ - cancel(); - } - }); - - return input; - }, - - //input element with type of number - number:function(cell, onRendered, success, cancel, editorParams){ - - var cellValue = cell.getValue(), - input = document.createElement("input"); - - input.setAttribute("type", "number"); - - if(typeof editorParams.max != "undefined"){ - input.setAttribute("max", editorParams.max); - } - - if(typeof editorParams.min != "undefined"){ - input.setAttribute("min", editorParams.min); - } - - if(typeof editorParams.step != "undefined"){ - input.setAttribute("step", editorParams.step); - } - - //create and style input - input.style.padding = "4px"; - input.style.width = "100%"; - input.style.boxSizing = "border-box"; - - input.value = cellValue; - - onRendered(function () { - input.focus(); - input.style.height = "100%"; - }); - - function onChange(){ - var value = input.value; - - if(!isNaN(value) && value !==""){ - value = Number(value); - } - - if(value != cellValue){ - success(value); - }else{ - cancel(); - } - } - - //submit new value on blur - input.addEventListener("blur", function(e){ - onChange(); - }); - - //submit new value on enter - input.addEventListener("keydown", function(e){ - switch(e.keyCode){ - case 13: - case 9: - onChange(); - break; - - case 27: - cancel(); - break; - } - }); - - return input; - }, - - //input element with type of number - range:function(cell, onRendered, success, cancel, editorParams){ - - var cellValue = cell.getValue(), - input = document.createElement("input"); - - input.setAttribute("type", "range"); - - if (typeof editorParams.max != "undefined") { - input.setAttribute("max", editorParams.max); - } - - if (typeof editorParams.min != "undefined") { - input.setAttribute("min", editorParams.min); - } - - if (typeof editorParams.step != "undefined") { - input.setAttribute("step", editorParams.step); - } - - //create and style input - input.style.padding = "4px"; - input.style.width = "100%"; - input.style.boxSizing = "border-box"; - - input.value = cellValue; - - onRendered(function () { - input.focus(); - input.style.height = "100%"; - }); - - function onChange(){ - var value = input.value; - - if(!isNaN(value) && value !==""){ - value = Number(value); - } - - if(value != cellValue){ - success(value); - }else{ - cancel(); - } - } - - //submit new value on blur - input.addEventListener("blur", function(e){ - onChange(); - }); - - //submit new value on enter - input.addEventListener("keydown", function(e){ - switch(e.keyCode){ - case 13: - case 9: - onChange(); - break; - - case 27: - cancel(); - break; - } - }); - - return input; - }, - - //select - select:function(cell, onRendered, success, cancel, editorParams){ - var self = this, - cellEl = cell.getElement(), - initialValue = cell.getValue(), - input = document.createElement("input"), - listEl = document.createElement("div"), - dataItems = [], - displayItems = [], - currentItem = {}, - blurable = true; - - if(Array.isArray(editorParams) || (!Array.isArray(editorParams) && typeof editorParams === "object" && !editorParams.values)){ - console.warn("DEPRECATION WANRING - values for the select editor must now be passed into the values property of the editorParams object, not as the editorParams object"); - editorParams = {values:editorParams}; - } - - function getUniqueColumnValues(){ - var output = {}, - column = cell.getColumn()._getSelf(), - data = self.table.getData(); - - data.forEach(function(row){ - var val = column.getFieldValue(row); - - if(val !== null && typeof val !== "undefined" && val !== ""){ - output[val] = true; - } - }); - - return Object.keys(output); - } - - function parseItems(inputValues, curentValue){ - var dataList = []; - var displayList = []; - - function processComplexListItem(item){ - var item = { - label:editorParams.listItemFormatter ? editorParams.listItemFormatter(item.value, item.label) : item.label, - value:item.value, - element:false, - }; - - if(item.value === curentValue){ - setCurrentItem(item); - } - - dataList.push(item); - displayList.push(item); - - return item; - } - - if(typeof inputValues == "function"){ - inputValues = inputValues(cell); - } - - if(Array.isArray(inputValues)){ - inputValues.forEach(function(value){ - var item; - - if(typeof value === "object"){ - - if(value.options){ - item = { - label:value.label, - group:true, - element:false, - }; - - displayList.push(item); - - value.options.forEach(function(item){ - processComplexListItem(item); - }); - }else{ - processComplexListItem(value); - } - - }else{ - item = { - label:editorParams.listItemFormatter ? editorParams.listItemFormatter(value, value) : value, - value:value, - element:false, - }; - - if(item.value === curentValue){ - setCurrentItem(item); - } - - dataList.push(item); - displayList.push(item); - } - }); - }else{ - for(var key in inputValues){ - var item = { - label:editorParams.listItemFormatter ? editorParams.listItemFormatter(key, inputValues[key]) : inputValues[key], - value:key, - element:false, - }; - - if(item.value === curentValue){ - setCurrentItem(item); - } - - dataList.push(item); - displayList.push(item); - } - } - - dataItems = dataList; - displayItems = displayList; - - fillList(); - } - - function fillList(){ - while(listEl.firstChild) listEl.removeChild(listEl.firstChild); - - displayItems.forEach(function(item){ - var el = item.element; - - if(!el){ - - if(item.group){ - el = document.createElement("div"); - el.classList.add("tabulator-edit-select-list-group"); - el.tabIndex = 0; - el.innerHTML = item.label === "" ? " " : item.label; - }else{ - el = document.createElement("div"); - el.classList.add("tabulator-edit-select-list-item"); - el.tabIndex = 0; - el.innerHTML = item.label === "" ? " " : item.label; - - el.addEventListener("click", function(){ - setCurrentItem(item); - chooseItem(); - }); - - if(item === currentItem){ - el.classList.add("active"); - } - } - - el.addEventListener("mousedown", function(){ - blurable = false; - - setTimeout(function(){ - blurable = true; - }, 10); - }); - - item.element = el; - - - } - - listEl.appendChild(el); - }); - } - - - function setCurrentItem(item){ - - if(currentItem && currentItem.element){ - currentItem.element.classList.remove("active"); - } - - currentItem = item; - input.value = item.label === " " ? "" : item.label; - - if(item.element){ - item.element.classList.add("active"); - } - } - - - function chooseItem(){ - hideList(); - - if(initialValue !== currentItem.value){ - initialValue = currentItem.value; - success(currentItem.value); - }else{ - cancel(); - } - } - - function cancelItem(){ - hideList(); - cancel(); - } - - function showList(){ - if(!listEl.parentNode){ - - if(editorParams.values === true){ - parseItems(getUniqueColumnValues(), initialValue); - }else{ - parseItems(editorParams.values || [], initialValue); - } - - - var offset = Tabulator.prototype.helpers.elOffset(cellEl); - - listEl.style.minWidth = cellEl.offsetWidth + "px"; - - listEl.style.top = (offset.top + cellEl.offsetHeight) + "px"; - listEl.style.left = offset.left + "px"; - document.body.appendChild(listEl); - } - } - - function hideList(){ - if(listEl.parentNode){ - listEl.parentNode.removeChild(listEl); - } - } - - //style input - input.setAttribute("type", "text"); - - input.style.padding = "4px"; - input.style.width = "100%"; - input.style.boxSizing = "border-box"; - input.readonly = true; - - //allow key based navigation - input.addEventListener("keydown", function(e){ - var index; - - switch(e.keyCode){ - case 38: //up arrow - e.stopImmediatePropagation(); - e.stopPropagation(); - - index = dataItems.indexOf(currentItem); - - if(index > 0){ - setCurrentItem(dataItems[index - 1]); - } - break; - - case 40: //down arrow - e.stopImmediatePropagation(); - e.stopPropagation(); - - index = dataItems.indexOf(currentItem); - - if(index < dataItems.length - 1){ - if(index == -1){ - setCurrentItem(dataItems[0]); - }else{ - setCurrentItem(dataItems[index + 1]); - } - } - break; - - case 13: //enter - chooseItem(); - break; - - case 27: //escape - cancelItem(); - break; - } - }); - - input.addEventListener("blur", function(e){ - if(blurable){ - cancelItem(); - } - }); - - input.addEventListener("focus", function(e){ - showList(); - }); - - //style list element - listEl = document.createElement("div"); - listEl.classList.add("tabulator-edit-select-list"); - - onRendered(function(){ - input.style.height = "100%"; - input.focus(); - }); - - return input; - }, - - - //autocomplete - autocomplete:function(cell, onRendered, success, cancel, editorParams){ - var self = this, - cellEl = cell.getElement(), - initialValue = cell.getValue(), - input = document.createElement("input"), - listEl = document.createElement("div"), - allItems = [], - displayItems = [], - currentItem = {}, - blurable = true; - - function getUniqueColumnValues(){ - var output = {}, - column = cell.getColumn()._getSelf(), - data = self.table.getData(); - - data.forEach(function(row){ - var val = column.getFieldValue(row); - - if(val !== null && typeof val !== "undefined" && val !== ""){ - output[val] = true; - } - }); - - return Object.keys(output); - } - - function parseItems(inputValues, curentValue){ - var itemList = []; - - if(Array.isArray(inputValues)){ - inputValues.forEach(function(value){ - var item = { - title:editorParams.listItemFormatter ? editorParams.listItemFormatter(value, value) : value, - value:value, - element:false, - }; - - if(item.value === curentValue){ - setCurrentItem(item); - } - - itemList.push(item); - }); - }else{ - for(var key in inputValues){ - var item = { - title:editorParams.listItemFormatter ? editorParams.listItemFormatter(key, inputValues[key]) : inputValues[key], - value:key, - element:false, - }; - - if(item.value === curentValue){ - setCurrentItem(item); - } - - itemList.push(item); - } - } - - allItems = itemList; - } - - function filterList(term){ - var matches = []; - - if(editorParams.searchFunc){ - matches = editorParams.searchFunc(term, values); - }else{ - if(term === ""){ - - if(editorParams.showListOnEmpty){ - allItems.forEach(function(item){ - matches.push(item); - }); - } - }else{ - allItems.forEach(function(item){ - - if(item.value !== null || typeof item.value !== "undefined"){ - if(String(item.value).toLowerCase().indexOf(String(term).toLowerCase()) > -1){ - matches.push(item); - } - } - }); - } - } - - displayItems = matches; - - fillList(); - } - - function fillList(){ - var current = false; - - while(listEl.firstChild) listEl.removeChild(listEl.firstChild); - - displayItems.forEach(function(item){ - var el = item.element; - - if(!el){ - el = document.createElement("div"); - el.classList.add("tabulator-edit-select-list-item"); - el.tabIndex = 0; - el.innerHTML = item.title; - - el.addEventListener("click", function(){ - setCurrentItem(item); - chooseItem(); - }); - - el.addEventListener("mousedown", function(){ - blurable = false; - - setTimeout(function(){ - blurable = true; - }, 10); - }); - - item.element = el; - - if(item === currentItem){ - item.element.classList.add("active"); - current = true; - } - } - - listEl.appendChild(el); - }); - - if(!current){ - setCurrentItem(false); - } - } - - - function setCurrentItem(item, showInputValue){ - if(currentItem && currentItem.element){ - currentItem.element.classList.remove("active"); - } - - currentItem = item; - - if(item && item.element){ - item.element.classList.add("active"); - } - } - - - function chooseItem(){ - hideList(); - - if(currentItem){ - if(initialValue !== currentItem.value){ - initialValue = currentItem.value; - input.value = currentItem.value; - success(input.value); - }else{ - cancel(); - } - }else{ - if(editorParams.freetext){ - initialValue = input.value; - success(input.value); - }else{ - if(editorParams.allowEmpty && input.value === ""){ - initialValue = input.value; - success(input.value); - }else{ - cancel(); - } - } - } - } - - function cancelItem(){ - hideList(); - cancel(); - } - - function showList(){ - if(!listEl.parentNode){ - while(listEl.firstChild) listEl.removeChild(listEl.firstChild); - - if(editorParams.values === true){ - parseItems(getUniqueColumnValues(), initialValue); - }else{ - parseItems(editorParams.values || [], initialValue); - } - - var offset = Tabulator.prototype.helpers.elOffset(cellEl); - - listEl.style.minWidth = cellEl.offsetWidth + "px"; - - listEl.style.top = (offset.top + cellEl.offsetHeight) + "px"; - listEl.style.left = offset.left + "px"; - document.body.appendChild(listEl); - } - } - - function hideList(){ - if(listEl.parentNode){ - listEl.parentNode.removeChild(listEl); - } - } - - //style input - input.setAttribute("type", "text"); - - input.style.padding = "4px"; - input.style.width = "100%"; - input.style.boxSizing = "border-box"; - - //allow key based navigation - input.addEventListener("keydown", function(e){ - var index; - - switch(e.keyCode){ - case 38: //up arrow - e.stopImmediatePropagation(); - e.stopPropagation(); - - index = displayItems.indexOf(currentItem); - - if(index > 0){ - setCurrentItem(displayItems[index - 1]); - }else{ - setCurrentItem(false); - } - break; - - case 40: //down arrow - e.stopImmediatePropagation(); - e.stopPropagation(); - - index = displayItems.indexOf(currentItem); - - if(index < displayItems.length - 1){ - if(index == -1){ - setCurrentItem(displayItems[0]); - }else{ - setCurrentItem(displayItems[index + 1]); - } - } - break; - - case 13: //enter - chooseItem(); - break; - - case 27: //escape - cancelItem(); - break; - } - }); - - input.addEventListener("keyup", function(e){ - - switch(e.keyCode){ - case 38: //up arrow - case 37: //left arrow - case 39: //up arrow - case 40: //right arrow - case 13: //enter - case 27: //escape - break; - - default: - filterList(input.value); - } - - }); - - input.addEventListener("blur", function(e){ - if(blurable){ - chooseItem(); - } - }); - - input.addEventListener("focus", function(e){ - showList(); - input.value = initialValue; - filterList(initialValue); - }); - - //style list element - listEl = document.createElement("div"); - listEl.classList.add("tabulator-edit-select-list"); - - onRendered(function(){ - input.style.height = "100%"; - input.focus(); - }); - - return input; - }, - - //start rating - star:function(cell, onRendered, success, cancel, editorParams){ - var self = this, - element = cell.getElement(), - value = cell.getValue(), - maxStars = element.getElementsByTagName("svg").length || 5, - size = element.getElementsByTagName("svg")[0] ? element.getElementsByTagName("svg")[0].getAttribute("width") : 14, - stars = [], - starsHolder = document.createElement("div"), - star = document.createElementNS('http://www.w3.org/2000/svg', "svg"); - - //change star type - function starChange(val){ - stars.forEach(function(star, i){ - if(i < val){ - if(self.table.browser == "ie"){ - star.setAttribute("class", "tabulator-star-active"); - }else{ - star.classList.replace("tabulator-star-inactive", "tabulator-star-active"); - } - - star.innerHTML = ''; - }else{ - if(self.table.browser == "ie"){ - star.setAttribute("class", "tabulator-star-inactive"); - }else{ - star.classList.replace("tabulator-star-active", "tabulator-star-inactive"); - } - - star.innerHTML = ''; - } - }); - } - - //build stars - function buildStar(i){ - var nextStar = star.cloneNode(true); - - stars.push(nextStar); - - nextStar.addEventListener("mouseover", function(e){ - e.stopPropagation(); - starChange(i); - }); - - nextStar.addEventListener("click", function(e){ - e.stopPropagation(); - success(i); - }); - - starsHolder.appendChild(nextStar); - } - - //handle keyboard navigation value change - function changeValue(val){ - value = val; - starChange(val); - } - - //style cell - element.style.whiteSpace = "nowrap"; - element.style.overflow = "hidden"; - element.style.textOverflow = "ellipsis"; - - //style holding element - starsHolder.style.verticalAlign = "middle"; - starsHolder.style.display = "inline-block"; - starsHolder.style.padding = "4px"; - - //style star - star.setAttribute("width", size); - star.setAttribute("height", size); - star.setAttribute("viewBox", "0 0 512 512"); - star.setAttribute("xml:space", "preserve"); - star.style.padding = "0 1px"; - - //create correct number of stars - for(var i=1;i<= maxStars;i++){ - buildStar(i); - } - - //ensure value does not exceed number of stars - value = Math.min(parseInt(value), maxStars); - - // set initial styling of stars - starChange(value); - - starsHolder.addEventListener("mouseover", function(e){ - starChange(0); - }); - - starsHolder.addEventListener("click", function(e){ - success(0); - }); - - element.addEventListener("blur", function(e){ - cancel(); - }); - - //allow key based navigation - element.addEventListener("keydown", function(e){ - switch(e.keyCode){ - case 39: //right arrow - changeValue(value + 1); - break; - - case 37: //left arrow - changeValue(value - 1); - break; - - case 13: //enter - success(value); - break; - - case 27: //escape - cancel(); - break; - } - }); - - return starsHolder; - }, - - //draggable progress bar - progress:function(cell, onRendered, success, cancel, editorParams){ - var element = cell.getElement(), - max = typeof editorParams.max === "undefined" ? ( element.getElementsByTagName("div")[0].getAttribute("max") || 100) : editorParams.max, - min = typeof editorParams.min === "undefined" ? ( element.getElementsByTagName("div")[0].getAttribute("min") || 0) : editorParams.min, - percent = (max - min) / 100, - value = cell.getValue() || 0, - handle = document.createElement("div"), - bar = document.createElement("div"), - mouseDrag, mouseDragWidth; - - //set new value - function updateValue(){ - var calcVal = (percent * Math.round(bar.offsetWidth / (element.clientWidth/100))) + min; - success(calcVal); - element.setAttribute("aria-valuenow", calcVal); - element.setAttribute("aria-label", value); - } - - //style handle - handle.style.position = "absolute"; - handle.style.right = "0"; - handle.style.top = "0"; - handle.style.bottom = "0"; - handle.style.width = "5px"; - handle.classList.add("tabulator-progress-handle"); - - //style bar - bar.style.display = "inline-block"; - bar.style.position = "absolute"; - bar.style.top = "8px"; - bar.style.bottom = "8px"; - bar.style.left = "4px"; - bar.style.marginRight = "4px"; - bar.style.backgroundColor = "#488CE9"; - bar.style.maxWidth = "100%"; - bar.style.minWidth = "0%"; - - //style cell - element.style.padding = "0 4px"; - - //make sure value is in range - value = Math.min(parseFloat(value), max); - value = Math.max(parseFloat(value), min); - - //workout percentage - value = 100 - Math.round((value - min) / percent); - bar.style.right = value + "%"; - - element.setAttribute("aria-valuemin", min); - element.setAttribute("aria-valuemax", max); - - bar.appendChild(handle); - - handle.addEventListener("mousedown", function(e){ - mouseDrag = e.screenX; - mouseDragWidth = bar.offsetWidth; - }); - - handle.addEventListener("mouseover", function(){ - handle.style.cursor = "ew-resize"; - }); - - element.addEventListener("mousemove", function(e){ - if(mouseDrag){ - bar.style.width = (mouseDragWidth + e.screenX - mouseDrag) + "px"; - } - }); - - element.addEventListener("mouseup", function(e){ - if(mouseDrag){ - e.stopPropagation(); - e.stopImmediatePropagation(); - - mouseDrag = false; - mouseDragWidth = false; - - updateValue(); - } - }); - - //allow key based navigation - element.addEventListener("keydown", function(e){ - switch(e.keyCode){ - case 39: //right arrow - bar.style.width = (bar.clientWidth + element.clientWidth/100) + "px"; - break; - - case 37: //left arrow - bar.style.width = (bar.clientWidth - element.clientWidth/100) + "px"; - break; - - case 13: //enter - updateValue(); - break; - - case 27: //escape - cancel(); - break; - - } - }); - - element.addEventListener("blur", function(){ - cancel(); - }); - - return bar; - }, - - //checkbox - tickCross:function(cell, onRendered, success, cancel, editorParams){ - var value = cell.getValue(), - input = document.createElement("input"), - tristate = editorParams.tristate, - indetermValue = typeof editorParams.indeterminateValue === "undefined" ? null : editorParams.indeterminateValue, - indetermState = false; - - input.setAttribute("type", "checkbox"); - input.style.marginTop = "5px"; - input.style.boxSizing = "border-box"; - - input.value = value; - - if(tristate && (typeof value === "undefined" || value === indetermValue || value === "")){ - indetermState = true; - input.indeterminate = true; - } - - if(this.table.browser != "firefox"){ //prevent blur issue on mac firefox - onRendered(function(){ - input.focus(); - }); - } - - input.checked = value === true || value === "true" || value === "True" || value === 1; - - function setValue(blur){ - if(tristate){ - if(!blur){ - if(input.checked && !indetermState){ - input.checked = false; - input.indeterminate = true; - indetermState = true; - return indetermValue; - }else{ - indetermState = false; - return input.checked; - } - }else{ - if(indetermState){ - return indetermValue; - }else{ - return input.checked; - } - } - }else{ - return input.checked; - } - } - - //submit new value on blur - input.addEventListener("change", function(e){ - success(setValue()); - }); - - input.addEventListener("blur", function(e){ - success(setValue(true)); - }); - - //submit new value on enter - input.addEventListener("keydown", function(e){ - if(e.keyCode == 13){ - success(setValue()); - } - if(e.keyCode == 27){ - cancel(); - } - }); - - return input; - }, -}; - -Tabulator.prototype.registerModule("edit", Edit); \ No newline at end of file diff --git a/Gems/AssetMemoryAnalyzer/External/tabulator-master/src/js/modules/filter.js b/Gems/AssetMemoryAnalyzer/External/tabulator-master/src/js/modules/filter.js deleted file mode 100644 index d8296b5e54..0000000000 --- a/Gems/AssetMemoryAnalyzer/External/tabulator-master/src/js/modules/filter.js +++ /dev/null @@ -1,711 +0,0 @@ -var Filter = function(table){ - - this.table = table; //hold Tabulator object - - this.filterList = []; //hold filter list - this.headerFilters = {}; //hold column filters - this.headerFilterElements = []; //hold header filter elements for manipulation - this.headerFilterColumns = []; //hold columns that use header filters - - this.changed = false; //has filtering changed since last render -}; - - -//initialize column header filter -Filter.prototype.initializeColumn = function(column, value){ - var self = this, - field = column.getField(), - prevSuccess, params; - - - //handle successfull value change - function success(value){ - var filterType = (column.modules.filter.tagType == "input" && column.modules.filter.attrType == "text") || column.modules.filter.tagType == "textarea" ? "partial" : "match", - type = "", - filterFunc; - - if(typeof prevSuccess === "undefined" || prevSuccess !== value){ - - prevSuccess = value; - - if(!column.modules.filter.emptyFunc(value)){ - column.modules.filter.value = value; - - switch(typeof column.definition.headerFilterFunc){ - case "string": - if(self.filters[column.definition.headerFilterFunc]){ - type = column.definition.headerFilterFunc; - filterFunc = function(data){ - return self.filters[column.definition.headerFilterFunc](value, column.getFieldValue(data)); - }; - }else{ - console.warn("Header Filter Error - Matching filter function not found: ", column.definition.headerFilterFunc); - } - break; - - case "function": - filterFunc = function(data){ - var params = column.definition.headerFilterFuncParams || {}; - var fieldVal = column.getFieldValue(data); - - params = typeof params === "function" ? params(value, fieldVal, data) : params; - - return column.definition.headerFilterFunc(value, fieldVal, data, params); - }; - - type = filterFunc; - break; - } - - if(!filterFunc){ - switch(filterType){ - case "partial": - filterFunc = function(data){ - return String(column.getFieldValue(data)).toLowerCase().indexOf(String(value).toLowerCase()) > -1; - }; - type = "like"; - break; - - default: - filterFunc = function(data){ - return column.getFieldValue(data) == value; - }; - type = "="; - } - } - - self.headerFilters[field] = {value:value, func:filterFunc, type:type}; - - }else{ - delete self.headerFilters[field]; - } - - self.changed = true; - - self.table.rowManager.filterRefresh(); - } - } - - column.modules.filter = { - success:success, - attrType:false, - tagType:false, - emptyFunc:false, - }; - - this.generateHeaderFilterElement(column); -}; - -Filter.prototype.generateHeaderFilterElement = function(column, initialValue){ - var self = this, - success = column.modules.filter.success, - field = column.getField(), - filterElement, editor, editorElement, cellWrapper, typingTimer, searchTrigger, params; - - //handle aborted edit - function cancel(){} - - if(column.modules.filter.headerElement && column.modules.filter.headerElement.parentNode){ - column.modules.filter.headerElement.parentNode.removeChild(column.modules.filter.headerElement); - } - - if(field){ - - //set empty value function - column.modules.filter.emptyFunc = column.definition.headerFilterEmptyCheck || function(value){ - return !value && value !== "0"; - }; - - filterElement = document.createElement("div"); - filterElement.classList.add("tabulator-header-filter"); - - //set column editor - switch(typeof column.definition.headerFilter){ - case "string": - if(self.table.modules.edit.editors[column.definition.headerFilter]){ - editor = self.table.modules.edit.editors[column.definition.headerFilter]; - - if((column.definition.headerFilter === "tick" || column.definition.headerFilter === "tickCross") && !column.definition.headerFilterEmptyCheck){ - column.modules.filter.emptyFunc = function(value){ - return value !== true && value !== false; - }; - } - }else{ - console.warn("Filter Error - Cannot build header filter, No such editor found: ", column.definition.editor); - } - break; - - case "function": - editor = column.definition.headerFilter; - break; - - case "boolean": - if(column.modules.edit && column.modules.edit.editor){ - editor = column.modules.edit.editor; - }else{ - if(column.definition.formatter && self.table.modules.edit.editors[column.definition.formatter]){ - editor = self.table.modules.edit.editors[column.definition.formatter]; - - if((column.definition.formatter === "tick" || column.definition.formatter === "tickCross") && !column.definition.headerFilterEmptyCheck){ - column.modules.filter.emptyFunc = function(value){ - return value !== true && value !== false; - }; - } - }else{ - editor = self.table.modules.edit.editors["input"]; - } - } - break; - } - - if(editor){ - - cellWrapper = { - getValue:function(){ - return typeof initialValue !== "undefined" ? initialValue : ""; - }, - getField:function(){ - return column.definition.field; - }, - getElement:function(){ - return filterElement; - }, - getColumn:function(){ - return column.getComponent(); - }, - getRow:function(){ - return { - normalizeHeight:function(){ - - } - }; - } - }; - - params = column.definition.headerFilterParams || {}; - - params = typeof params === "function" ? params.call(self.table) : params; - - editorElement = editor.call(this.table.modules.edit, cellWrapper, function(){}, success, cancel, params); - - if(!editorElement){ - console.warn("Filter Error - Cannot add filter to " + field + " column, editor returned a value of false"); - return; - } - - if(!(editorElement instanceof Node)){ - console.warn("Filter Error - Cannot add filter to " + field + " column, editor should return an instance of Node, the editor returned:", editorElement); - return; - } - - //set Placeholder Text - if(field){ - self.table.modules.localize.bind("headerFilters|columns|" + column.definition.field, function(value){ - editorElement.setAttribute("placeholder", typeof value !== "undefined" && value ? value : self.table.modules.localize.getText("headerFilters|default")); - }); - }else{ - self.table.modules.localize.bind("headerFilters|default", function(value){ - editorElement.setAttribute("placeholder", typeof self.column.definition.headerFilterPlaceholder !== "undefined" && self.column.definition.headerFilterPlaceholder ? self.column.definition.headerFilterPlaceholder : value); - }); - } - - //focus on element on click - editorElement.addEventListener("click", function(e){ - e.stopPropagation(); - editorElement.focus(); - }); - - //live update filters as user types - typingTimer = false; - - searchTrigger = function(e){ - if(typingTimer){ - clearTimeout(typingTimer); - } - - typingTimer = setTimeout(function(){ - success(editorElement.value); - },300); - }; - - column.modules.filter.headerElement = editorElement; - column.modules.filter.attrType = editorElement.hasAttribute("type") ? editorElement.getAttribute("type").toLowerCase() : "" ; - column.modules.filter.tagType = editorElement.tagName.toLowerCase(); - - if(column.definition.headerFilterLiveFilter !== false){ - - if(!(column.definition.headerFilter === "autocomplete" || (column.definition.editor === "autocomplete" && column.definition.headerFilter === true))){ - editorElement.addEventListener("keyup", searchTrigger); - editorElement.addEventListener("search", searchTrigger); - - - //update number filtered columns on change - if(column.modules.filter.attrType == "number"){ - editorElement.addEventListener("change", function(e){ - success(editorElement.value); - }); - } - - //change text inputs to search inputs to allow for clearing of field - if(column.modules.filter.attrType == "text" && this.table.browser !== "ie"){ - editorElement.setAttribute("type", "search"); - // editorElement.off("change blur"); //prevent blur from triggering filter and preventing selection click - } - - } - - //prevent input and select elements from propegating click to column sorters etc - if(column.modules.filter.tagType == "input" || column.modules.filter.tagType == "select" || column.modules.filter.tagType == "textarea"){ - editorElement.addEventListener("mousedown",function(e){ - e.stopPropagation(); - }); - } - } - - filterElement.appendChild(editorElement); - - column.contentElement.appendChild(filterElement); - - self.headerFilterElements.push(editorElement); - self.headerFilterColumns.push(column); - } - }else{ - console.warn("Filter Error - Cannot add header filter, column has no field set:", column.definition.title); - } - -}; - -//hide all header filter elements (used to ensure correct column widths in "fitData" layout mode) -Filter.prototype.hideHeaderFilterElements = function(){ - this.headerFilterElements.forEach(function(element){ - element.style.display = 'none'; - }); -}; - -//show all header filter elements (used to ensure correct column widths in "fitData" layout mode) -Filter.prototype.showHeaderFilterElements = function(){ - this.headerFilterElements.forEach(function(element){ - element.style.display = ''; - }); -}; - - -//programatically set value of header filter -Filter.prototype.setHeaderFilterFocus = function(column){ - if(column.modules.filter && column.modules.filter.headerElement){ - column.modules.filter.headerElement.focus(); - }else{ - console.warn("Column Filter Focus Error - No header filter set on column:", column.getField()); - } -}; - -//programatically set value of header filter -Filter.prototype.setHeaderFilterValue = function(column, value){ - if (column){ - if(column.modules.filter && column.modules.filter.headerElement){ - this.generateHeaderFilterElement(column, value); - column.modules.filter.success(value); - }else{ - console.warn("Column Filter Error - No header filter set on column:", column.getField()); - } - } -}; - -Filter.prototype.reloadHeaderFilter = function(column){ - if (column){ - if(column.modules.filter && column.modules.filter.headerElement){ - this.generateHeaderFilterElement(column, column.modules.filter.value); - }else{ - console.warn("Column Filter Error - No header filter set on column:", column.getField()); - } - } -} - -//check if the filters has changed since last use -Filter.prototype.hasChanged = function(){ - var changed = this.changed; - this.changed = false; - return changed; -}; - -//set standard filters -Filter.prototype.setFilter = function(field, type, value){ - var self = this; - - self.filterList = []; - - if(!Array.isArray(field)){ - field = [{field:field, type:type, value:value}]; - } - - self.addFilter(field); - -}; - -//add filter to array -Filter.prototype.addFilter = function(field, type, value){ - var self = this; - - if(!Array.isArray(field)){ - field = [{field:field, type:type, value:value}]; - } - - field.forEach(function(filter){ - - filter = self.findFilter(filter); - - if(filter){ - self.filterList.push(filter); - - self.changed = true; - } - }); - - if(this.table.options.persistentFilter && this.table.modExists("persistence", true)){ - this.table.modules.persistence.save("filter"); - } - -}; - -Filter.prototype.findFilter = function(filter){ - var self = this, - column; - - if(Array.isArray(filter)){ - return this.findSubFilters(filter); - } - - - var filterFunc = false; - - if(typeof filter.field == "function"){ - filterFunc = function(data){ - return filter.field(data, filter.type || {})// pass params to custom filter function - } - }else{ - - if(self.filters[filter.type]){ - - column = self.table.columnManager.getColumnByField(filter.field); - - if(column){ - filterFunc = function(data){ - return self.filters[filter.type](filter.value, column.getFieldValue(data)); - } - }else{ - filterFunc = function(data){ - return self.filters[filter.type](filter.value, data[filter.field]); - } - } - - - }else{ - console.warn("Filter Error - No such filter type found, ignoring: ", filter.type); - } - } - - - filter.func = filterFunc; - - - - return filter.func ? filter : false; -}; - -Filter.prototype.findSubFilters = function(filters){ - var self = this, - output = []; - - filters.forEach(function(filter){ - filter = self.findFilter(filter); - - if(filter){ - output.push(filter); - } - }); - - return output.length ? output : false; -} - - -//get all filters -Filter.prototype.getFilters = function(all, ajax){ - var self = this, - output = []; - - if(all){ - output = self.getHeaderFilters(); - } - - self.filterList.forEach(function(filter){ - output.push({field:filter.field, type:filter.type, value:filter.value}); - }); - - if(ajax){ - output.forEach(function(item){ - if(typeof item.type == "function"){ - item.type = "function"; - } - }) - } - - return output; -}; - -//get all filters -Filter.prototype.getHeaderFilters = function(){ - var self = this, - output = []; - - for(var key in this.headerFilters){ - output.push({field:key, type:this.headerFilters[key].type, value:this.headerFilters[key].value}); - } - - return output; -}; - -//remove filter from array -Filter.prototype.removeFilter = function(field, type, value){ - var self = this; - - if(!Array.isArray(field)){ - field = [{field:field, type:type, value:value}]; - } - - field.forEach(function(filter){ - var index = -1; - - if(typeof filter.field == "object"){ - index = self.filterList.findIndex(function(element){ - return filter === element; - }); - }else{ - index = self.filterList.findIndex(function(element){ - return filter.field === element.field && filter.type === element.type && filter.value === element.value - }); - } - - if(index > -1){ - self.filterList.splice(index, 1); - self.changed = true; - }else{ - console.warn("Filter Error - No matching filter type found, ignoring: ", filter.type); - } - - }); - - if(this.table.options.persistentFilter && this.table.modExists("persistence", true)){ - this.table.modules.persistence.save("filter"); - } - -}; - -//clear filters -Filter.prototype.clearFilter = function(all){ - this.filterList = []; - - if(all){ - this.clearHeaderFilter(); - } - - this.changed = true; - - if(this.table.options.persistentFilter && this.table.modExists("persistence", true)){ - this.table.modules.persistence.save("filter"); - } -}; - -//clear header filters -Filter.prototype.clearHeaderFilter = function(){ - var self = this; - - this.headerFilters = {}; - - this.headerFilterColumns.forEach(function(column){ - column.modules.filter.value = null; - self.reloadHeaderFilter(column); - }); - - this.changed = true; -}; - -//search data and return matching rows -Filter.prototype.search = function (searchType, field, type, value){ - var self = this, - activeRows = [], - filterList = []; - - if(!Array.isArray(field)){ - field = [{field:field, type:type, value:value}]; - } - - field.forEach(function(filter){ - filter = self.findFilter(filter); - - if(filter){ - filterList.push(filter); - } - }); - - this.table.rowManager.rows.forEach(function(row){ - var match = true; - - filterList.forEach(function(filter){ - if(!self.filterRecurse(filter, row.getData())){ - match = false; - } - }); - - if(match){ - activeRows.push(searchType === "data" ? row.getData("data") : row.getComponent()); - } - - }); - - return activeRows; -}; - -//filter row array -Filter.prototype.filter = function(rowList, filters){ - var self = this, - activeRows = [], - activeRowComponents = []; - - if(self.table.options.dataFiltering){ - self.table.options.dataFiltering.call(self.table, self.getFilters()); - } - - if(!self.table.options.ajaxFiltering && (self.filterList.length || Object.keys(self.headerFilters).length)){ - - rowList.forEach(function(row){ - if(self.filterRow(row)){ - activeRows.push(row); - } - }); - - }else{ - activeRows = rowList.slice(0); - } - - if(self.table.options.dataFiltered){ - - activeRows.forEach(function(row){ - activeRowComponents.push(row.getComponent()); - }); - - self.table.options.dataFiltered.call(self.table, self.getFilters(), activeRowComponents); - } - - return activeRows; - -}; - -//filter individual row -Filter.prototype.filterRow = function(row, filters){ - var self = this, - match = true, - data = row.getData(); - - self.filterList.forEach(function(filter){ - if(!self.filterRecurse(filter, data)){ - match = false; - } - }); - - - for(var field in self.headerFilters){ - if(!self.headerFilters[field].func(data)){ - match = false; - } - } - - return match; -}; - -Filter.prototype.filterRecurse = function(filter, data){ - var self = this, - match = false; - - if(Array.isArray(filter)){ - filter.forEach(function(subFilter){ - if(self.filterRecurse(subFilter, data)){ - match = true; - } - }); - }else{ - match = filter.func(data); - } - - return match; -}; - - - -//list of available filters -Filter.prototype.filters ={ - - //equal to - "=":function(filterVal, rowVal){ - return rowVal == filterVal ? true : false; - }, - - //less than - "<":function(filterVal, rowVal){ - return rowVal < filterVal ? true : false; - }, - - //less than or equal to - "<=":function(filterVal, rowVal){ - return rowVal <= filterVal ? true : false; - }, - - //greater than - ">":function(filterVal, rowVal){ - return rowVal > filterVal ? true : false; - }, - - //greater than or equal to - ">=":function(filterVal, rowVal){ - return rowVal >= filterVal ? true : false; - }, - - //not equal to - "!=":function(filterVal, rowVal){ - return rowVal != filterVal ? true : false; - }, - - "regex":function(filterVal, rowVal){ - - if(typeof filterVal == "string"){ - filterVal = new RegExp(filterVal); - } - - return filterVal.test(rowVal); - }, - - //contains the string - "like":function(filterVal, rowVal){ - if(filterVal === null || typeof filterVal === "undefined"){ - return rowVal === filterVal ? true : false; - }else{ - if(typeof rowVal !== 'undefined' && rowVal !== null){ - return String(rowVal).toLowerCase().indexOf(filterVal.toLowerCase()) > -1 ? true : false; - } - else{ - return false; - } - } - }, - - //in array - "in":function(filterVal, rowVal){ - if(Array.isArray(filterVal)){ - return filterVal.indexOf(rowVal) > -1; - }else{ - console.warn("Filter Error - filter value is not an array:", filterVal); - return false; - } - }, -}; - -Tabulator.prototype.registerModule("filter", Filter); \ No newline at end of file diff --git a/Gems/AssetMemoryAnalyzer/External/tabulator-master/src/js/modules/format.js b/Gems/AssetMemoryAnalyzer/External/tabulator-master/src/js/modules/format.js deleted file mode 100644 index b76a38ca3a..0000000000 --- a/Gems/AssetMemoryAnalyzer/External/tabulator-master/src/js/modules/format.js +++ /dev/null @@ -1,526 +0,0 @@ -var Format = function(table){ - this.table = table; //hold Tabulator object -}; - -//initialize column formatter -Format.prototype.initializeColumn = function(column){ - var self = this, - config = {params:column.definition.formatterParams || {}}; - - //set column formatter - switch(typeof column.definition.formatter){ - case "string": - - if(column.definition.formatter === "tick"){ - column.definition.formatter = "tickCross"; - - if(typeof config.params.crossElement == "undefined"){ - config.params.crossElement = false; - } - - console.warn("DEPRECATION WANRING - the tick formatter has been depricated, please use the tickCross formatter with the crossElement param set to false"); - } - - if(self.formatters[column.definition.formatter]){ - config.formatter = self.formatters[column.definition.formatter]; - }else{ - console.warn("Formatter Error - No such formatter found: ", column.definition.formatter); - config.formatter = self.formatters.plaintext; - } - break; - - case "function": - config.formatter = column.definition.formatter; - break; - - default: - config.formatter = self.formatters.plaintext; - break; - } - - column.modules.format = config; -}; - -Format.prototype.cellRendered = function(cell){ - if(cell.column.modules.format.renderedCallback){ - cell.column.modules.format.renderedCallback(); - } -}; - -//return a formatted value for a cell -Format.prototype.formatValue = function(cell){ - var component = cell.getComponent(), - params = typeof cell.column.modules.format.params === "function" ? cell.column.modules.format.params(component) : cell.column.modules.format.params; - - function onRendered(callback){ - cell.column.modules.format.renderedCallback = callback; - } - - return cell.column.modules.format.formatter.call(this, component, params, onRendered); -}; - - -Format.prototype.sanitizeHTML = function(value){ - if(value){ - var entityMap = { - '&': '&', - '<': '<', - '>': '>', - '"': '"', - "'": ''', - '/': '/', - '`': '`', - '=': '=' - }; - - return String(value).replace(/[&<>"'`=\/]/g, function (s) { - return entityMap[s]; - }); - }else{ - return value; - } -}; - -Format.prototype.emptyToSpace = function(value){ - return value === null || typeof value === "undefined" ? " " : value; -}; - -//get formatter for cell -Format.prototype.getFormatter = function(formatter){ - var formatter; - - switch(typeof formatter){ - case "string": - if(this.formatters[formatter]){ - formatter = this.formatters[formatter] - }else{ - console.warn("Formatter Error - No such formatter found: ", formatter); - formatter = this.formatters.plaintext; - } - break; - - case "function": - formatter = formatter; - break; - - default: - formatter = this.formatters.plaintext; - break; - } - - return formatter; - -}; - -//default data formatters -Format.prototype.formatters = { - //plain text value - plaintext:function(cell, formatterParams, onRendered){ - return this.emptyToSpace(this.sanitizeHTML(cell.getValue())); - }, - - //html text value - html:function(cell, formatterParams, onRendered){ - return cell.getValue(); - }, - - //multiline text area - textarea:function(cell, formatterParams, onRendered){ - cell.getElement().style.whiteSpace = "pre-wrap"; - return this.emptyToSpace(this.sanitizeHTML(cell.getValue())); - }, - - //currency formatting - money:function(cell, formatterParams, onRendered){ - var floatVal = parseFloat(cell.getValue()), - number, integer, decimal, rgx; - - var decimalSym = formatterParams.decimal || "."; - var thousandSym = formatterParams.thousand || ","; - var symbol = formatterParams.symbol || ""; - var after = !!formatterParams.symbolAfter; - var precision = typeof formatterParams.precision !== "undefined" ? formatterParams.precision : 2; - - if(isNaN(floatVal)){ - return this.emptyToSpace(this.sanitizeHTML(cell.getValue())); - } - - number = precision !== false ? floatVal.toFixed(precision) : floatVal; - number = String(number).split("."); - - integer = number[0]; - decimal = number.length > 1 ? decimalSym + number[1] : ""; - - rgx = /(\d+)(\d{3})/; - - while (rgx.test(integer)){ - integer = integer.replace(rgx, "$1" + thousandSym + "$2"); - } - - return after ? integer + decimal + symbol : symbol + integer + decimal; - }, - - //clickable anchor tag - link:function(cell, formatterParams, onRendered){ - var value = this.sanitizeHTML(cell.getValue()), - urlPrefix = formatterParams.urlPrefix || "", - label = this.emptyToSpace(value), - el = document.createElement("a"), - data; - - if(formatterParams.labelField){ - data = cell.getData(); - label = data[formatterParams.labelField]; - } - - if(formatterParams.label){ - switch(typeof formatterParams.label){ - case "string": - label = formatterParams.label; - break; - - case "function": - label = formatterParams.label(cell); - break; - } - } - - if(formatterParams.urlField){ - data = cell.getData(); - value = data[formatterParams.urlField]; - } - - if(formatterParams.url){ - switch(typeof formatterParams.url){ - case "string": - value = formatterParams.url; - break; - - case "function": - value = formatterParams.url(cell); - break; - } - } - - el.setAttribute("href", urlPrefix + value); - - if(formatterParams.target){ - el.setAttribute("target", formatterParams.target); - } - - el.innerHTML = this.emptyToSpace(label); - - return el; - }, - - //image element - image:function(cell, formatterParams, onRendered){ - var el = document.createElement("img"); - el.setAttribute("src", cell.getValue()); - - switch(typeof formatterParams.height){ - case "number": - element.style.height = formatterParams.height + "px"; - break; - - case "string": - element.style.height = formatterParams.height; - break; - } - - switch(typeof formatterParams.width){ - case "number": - element.style.width = formatterParams.width + "px"; - break; - - case "string": - element.style.width = formatterParams.width; - break; - } - - el.addEventListener("load", function(){ - cell.getRow().normalizeHeight(); - }); - - return el; - }, - - //tick or cross - tickCross:function(cell, formatterParams, onRendered){ - var value = cell.getValue(), - element = cell.getElement(), - empty = formatterParams.allowEmpty, - truthy = formatterParams.allowTruthy, - tick = typeof formatterParams.tickElement !== "undefined" ? formatterParams.tickElement : '', - cross = typeof formatterParams.crossElement !== "undefined" ? formatterParams.crossElement : ''; - - if((truthy && value) || (value === true || value === "true" || value === "True" || value === 1 || value === "1")){ - element.setAttribute("aria-checked", true); - return tick || ""; - }else{ - if(empty && (value === "null" || value === "" || value === null || typeof value === "undefined")){ - element.setAttribute("aria-checked", "mixed"); - return ""; - }else{ - element.setAttribute("aria-checked", false); - return cross || ""; - } - } - }, - - datetime:function(cell, formatterParams, onRendered){ - var inputFormat = formatterParams.inputFormat || "YYYY-MM-DD hh:mm:ss"; - var outputFormat = formatterParams.outputFormat || "DD/MM/YYYY hh:mm:ss"; - var invalid = typeof formatterParams.invalidPlaceholder !== "undefined" ? formatterParams.invalidPlaceholder : ""; - var value = cell.getValue(); - - var newDatetime = moment(value, inputFormat); - - if(newDatetime.isValid()){ - return newDatetime.format(outputFormat); - }else{ - - if(invalid === true){ - return value; - }else if(typeof invalid === "function"){ - return invalid(value); - }else{ - return invalid; - } - } - }, - - datetimediff: function datetime(cell, formatterParams, onRendered) { - var inputFormat = formatterParams.inputFormat || "YYYY-MM-DD hh:mm:ss"; - var invalid = typeof formatterParams.invalidPlaceholder !== "undefined" ? formatterParams.invalidPlaceholder : ""; - var suffix = typeof formatterParams.suffix !== "undefined" ? formatterParams.suffix : false; - var unit = typeof formatterParams.unit !== "undefined" ? formatterParams.unit : undefined; - var humanize = typeof formatterParams.humanize !== "undefined" ? formatterParams.humanize : false; - var date = typeof formatterParams.date !== "undefined" ? formatterParams.date : moment(); - var value = cell.getValue(); - - var newDatetime = moment(value, inputFormat); - - if (newDatetime.isValid()) { - if(humanize){ - return moment.duration(newDatetime.diff(date)).humanize(suffix); - }else{ - return newDatetime.diff(date, unit) + (suffix ? " " + suffix : ""); - } - - } else { - - if (invalid === true) { - return value; - } else if (typeof invalid === "function") { - return invalid(value); - } else { - return invalid; - } - } - }, - - //select - lookup: function (cell, formatterParams, onRendered) { - var value = cell.getValue(); - - if (typeof formatterParams[value] === "undefined") { - console.warn('Missing display value for ' + value); - return value; - } - - return formatterParams[value]; - }, - - //star rating - star:function(cell, formatterParams, onRendered){ - var value = cell.getValue(), - element = cell.getElement(), - maxStars = formatterParams && formatterParams.stars ? formatterParams.stars : 5, - stars = document.createElement("span"), - star = document.createElementNS('http://www.w3.org/2000/svg', "svg"), - starActive = '', - starInactive = ''; - - //style stars holder - stars.style.verticalAlign = "middle"; - - //style star - star.setAttribute("width", "14"); - star.setAttribute("height", "14"); - star.setAttribute("viewBox", "0 0 512 512"); - star.setAttribute("xml:space", "preserve"); - star.style.padding = "0 1px"; - - value = parseInt(value) < maxStars ? parseInt(value) : maxStars; - - for(var i=1;i<= maxStars;i++){ - var nextStar = star.cloneNode(true); - nextStar.innerHTML = i <= value ? starActive : starInactive; - - stars.appendChild(nextStar); - } - - element.style.whiteSpace = "nowrap"; - element.style.overflow = "hidden"; - element.style.textOverflow = "ellipsis"; - - element.setAttribute("aria-label", value); - - return stars; - }, - - //progress bar - progress:function(cell, formatterParams, onRendered){ //progress bar - var value = this.sanitizeHTML(cell.getValue()) || 0, - element = cell.getElement(), - max = formatterParams && formatterParams.max ? formatterParams.max : 100, - min = formatterParams && formatterParams.min ? formatterParams.min : 0, - legendAlign = formatterParams && formatterParams.legendAlign ? formatterParams.legendAlign : "center", - percent, percentValue, color, legend, legendColor, top, left, right, bottom; - - //make sure value is in range - percentValue = parseFloat(value) <= max ? parseFloat(value) : max; - percentValue = parseFloat(percentValue) >= min ? parseFloat(percentValue) : min; - - //workout percentage - percent = (max - min) / 100; - percentValue = Math.round((percentValue - min) / percent); - - //set bar color - switch(typeof formatterParams.color){ - case "string": - color = formatterParams.color; - break; - case "function": - color = formatterParams.color(value); - break; - case "object": - if(Array.isArray(formatterParams.color)){ - var unit = 100 / formatterParams.color.length; - var index = Math.floor(percentValue / unit); - - index = Math.min(index, formatterParams.color.length - 1); - index = Math.max(index, 0); - color = formatterParams.color[index]; - break; - } - default: - color = "#2DC214"; - } - - //generate legend - switch(typeof formatterParams.legend){ - case "string": - legend = formatterParams.legend; - break; - case "function": - legend = formatterParams.legend(value); - break; - case "boolean": - legend = value; - break; - default: - legend = false; - } - - //set legend color - switch(typeof formatterParams.legendColor){ - case "string": - legendColor = formatterParams.legendColor; - break; - case "function": - legendColor = formatterParams.legendColor(value); - break; - case "object": - if(Array.isArray(formatterParams.legendColor)){ - var unit = 100 / formatterParams.legendColor.length; - var index = Math.floor(percentValue / unit); - - index = Math.min(index, formatterParams.legendColor.length - 1); - index = Math.max(index, 0); - legendColor = formatterParams.legendColor[index]; - } - break; - default: - legendColor = "#000"; - } - - element.style.minWidth = "30px"; - element.style.position = "relative"; - - element.setAttribute("aria-label", percentValue); - - return "
" + (legend ? "
" + legend + "
" : ""); - }, - - //background color - color:function(cell, formatterParams, onRendered){ - cell.getElement().style.backgroundColor = this.sanitizeHTML(cell.getValue()); - return ""; - }, - - //tick icon - buttonTick:function(cell, formatterParams, onRendered){ - return ''; - }, - - //cross icon - buttonCross:function(cell, formatterParams, onRendered){ - return ''; - }, - - //current row number - rownum:function(cell, formatterParams, onRendered){ - return this.table.rowManager.activeRows.indexOf(cell.getRow()._getSelf()) + 1; - }, - - //row handle - handle:function(cell, formatterParams, onRendered){ - cell.getElement().classList.add("tabulator-row-handle"); - return "
"; - }, - - responsiveCollapse:function(cell, formatterParams, onRendered){ - var self = this, - open = false, - el = document.createElement("div"); - - function toggleList(isOpen){ - var collapse = cell.getRow().getElement().getElementsByClassName("tabulator-responsive-collapse")[0]; - - open = isOpen; - - if(open){ - el.classList.add("open"); - if(collapse){ - collapse.style.display = ''; - } - }else{ - el.classList.remove("open"); - if(collapse){ - collapse.style.display = 'none'; - } - } - } - - el.classList.add("tabulator-responsive-collapse-toggle"); - el.innerHTML = "+-"; - - cell.getElement().classList.add("tabulator-row-handle"); - - if(self.table.options.responsiveLayoutCollapseStartOpen){ - open = true; - } - - el.addEventListener("click", function(){ - toggleList(!open); - }); - - toggleList(open); - - return el; - }, -}; - -Tabulator.prototype.registerModule("format", Format); \ No newline at end of file diff --git a/Gems/AssetMemoryAnalyzer/External/tabulator-master/src/js/modules/frozen_columns.js b/Gems/AssetMemoryAnalyzer/External/tabulator-master/src/js/modules/frozen_columns.js deleted file mode 100644 index f9fecfae56..0000000000 --- a/Gems/AssetMemoryAnalyzer/External/tabulator-master/src/js/modules/frozen_columns.js +++ /dev/null @@ -1,160 +0,0 @@ -var FrozenColumns = function(table){ - this.table = table; //hold Tabulator object - this.leftColumns = []; - this.rightColumns = []; - this.leftMargin = 0; - this.rightMargin = 0; - this.initializationMode = "left"; - this.active = false; -}; - -//reset initial state -FrozenColumns.prototype.reset = function(){ - this.initializationMode = "left"; - this.leftColumns = []; - this.rightColumns = []; - this.active = false; -}; - -//initialize specific column -FrozenColumns.prototype.initializeColumn = function(column){ - var config = {margin:0, edge:false}; - - if(column.definition.frozen){ - - if(!column.parent.isGroup){ - - - if(!column.isGroup){ - config.position = this.initializationMode; - - if(this.initializationMode == "left"){ - this.leftColumns.push(column); - }else{ - this.rightColumns.unshift(column); - } - - this.active = true; - - column.modules.frozen = config; - }else{ - console.warn("Frozen Column Error - Column Groups cannot be frozen"); - } - }else{ - console.warn("Frozen Column Error - Grouped columns cannot be frozen"); - } - - }else{ - this.initializationMode = "right"; - } -}; - -//layout columns appropropriatly -FrozenColumns.prototype.layout = function(){ - var self = this, - tableHolder = this.table.rowManager.element, - rightMargin = 0; - - if(self.active){ - - //calculate row padding - - self.leftMargin = self._calcSpace(self.leftColumns, self.leftColumns.length); - self.table.columnManager.headersElement.style.marginLeft = self.leftMargin + "px"; - - self.rightMargin = self._calcSpace(self.rightColumns, self.rightColumns.length); - self.table.columnManager.element.style.paddingRight = self.rightMargin + "px"; - - self.table.rowManager.activeRows.forEach(function(row){ - self.layoutRow(row); - }); - - if(self.table.modExists("columnCalcs")){ - if(self.table.modules.columnCalcs.topInitialized && self.table.modules.columnCalcs.topRow){ - self.layoutRow(self.table.modules.columnCalcs.topRow); - } - if(self.table.modules.columnCalcs.botInitialized && self.table.modules.columnCalcs.botRow){ - self.layoutRow(self.table.modules.columnCalcs.botRow); - } - } - - //calculate left columns - self.leftColumns.forEach(function(column, i){ - column.modules.frozen.margin = self._calcSpace(self.leftColumns, i) + self.table.columnManager.scrollLeft; - - if(i == self.leftColumns.length - 1){ - column.modules.frozen.edge = true; - }else{ - column.modules.frozen.edge = false; - } - - self.layoutColumn(column); - }); - - //calculate right frozen columns - rightMargin = self.table.rowManager.element.clientWidth + self.table.columnManager.scrollLeft; - - // if(tableHolder.scrollHeight > tableHolder.clientHeight){ - // rightMargin -= tableHolder.offsetWidth - tableHolder.clientWidth; - // } - - self.rightColumns.forEach(function(column, i){ - column.modules.frozen.margin = rightMargin - self._calcSpace(self.rightColumns, i + 1); - - if(i == self.rightColumns.length - 1){ - column.modules.frozen.edge = true; - }else{ - column.modules.frozen.edge = false; - } - - self.layoutColumn(column); - }); - - this.table.rowManager.tableElement.style.marginRight = this.rightMargin + "px"; - } -}; - -FrozenColumns.prototype.layoutColumn = function(column){ - var self = this; - - self.layoutElement(column.getElement(), column); - - column.cells.forEach(function(cell){ - self.layoutElement(cell.getElement(), column); - }); -}; - -FrozenColumns.prototype.layoutRow = function(row){ - var rowEl = row.getElement(); - - rowEl.style.paddingLeft = this.leftMargin + "px"; - // rowEl.style.paddingRight = this.rightMargin + "px"; -}; - -FrozenColumns.prototype.layoutElement = function(element, column){ - - if(column.modules.frozen){ - element.style.position = "absolute"; - element.style.left = column.modules.frozen.margin + "px"; - - element.classList.add("tabulator-frozen"); - - if(column.modules.frozen.edge){ - element.classList.add("tabulator-frozen-" + column.modules.frozen.position); - } - } -}; - -FrozenColumns.prototype._calcSpace = function(columns, index){ - var width = 0; - - for (let i = 0; i < index; i++){ - if(columns[i].visible){ - width += columns[i].getWidth(); - } - } - - return width; -}; - -Tabulator.prototype.registerModule("frozenColumns", FrozenColumns); \ No newline at end of file diff --git a/Gems/AssetMemoryAnalyzer/External/tabulator-master/src/js/modules/frozen_rows.js b/Gems/AssetMemoryAnalyzer/External/tabulator-master/src/js/modules/frozen_rows.js deleted file mode 100644 index 5dbf7cc3b3..0000000000 --- a/Gems/AssetMemoryAnalyzer/External/tabulator-master/src/js/modules/frozen_rows.js +++ /dev/null @@ -1,99 +0,0 @@ -var FrozenRows = function(table){ - this.table = table; //hold Tabulator object - this.topElement = document.createElement("div"); - this.rows = []; - this.displayIndex = 0; //index in display pipeline -}; - -FrozenRows.prototype.initialize = function(){ - this.rows = []; - - this.topElement.classList.add("tabulator-frozen-rows-holder"); - - // this.table.columnManager.element.append(this.topElement); - this.table.columnManager.getElement().insertBefore(this.topElement, this.table.columnManager.headersElement.nextSibling); -}; - -FrozenRows.prototype.setDisplayIndex = function(index){ - this.displayIndex = index; -}; - -FrozenRows.prototype.getDisplayIndex = function(){ - return this.displayIndex; -}; - -FrozenRows.prototype.isFrozen = function(){ - return !!this.rows.length; -}; - -//filter frozen rows out of display data -FrozenRows.prototype.getRows = function(rows){ - var self = this, - frozen = [], - output = rows.slice(0); - - this.rows.forEach(function(row){ - var index = output.indexOf(row); - - if(index > -1){ - output.splice(index, 1); - } - }); - - return output; -}; - -FrozenRows.prototype.freezeRow = function(row){ - if(!row.modules.frozen){ - row.modules.frozen = true; - this.topElement.appendChild(row.getElement()); - row.initialize(); - row.normalizeHeight(); - this.table.rowManager.adjustTableSize(); - - this.rows.push(row); - - this.table.rowManager.refreshActiveData("display"); - - this.styleRows(); - - }else{ - console.warn("Freeze Error - Row is already frozen"); - } -}; - -FrozenRows.prototype.unfreezeRow = function(row){ - var index = this.rows.indexOf(row); - - if(row.modules.frozen){ - - row.modules.frozen = false; - - var rowEl = row.getElement(); - rowEl.parentNode.removeChild(rowEl); - - this.table.rowManager.adjustTableSize(); - - this.rows.splice(index, 1); - - this.table.rowManager.refreshActiveData("display"); - - if(this.rows.length){ - this.styleRows(); - } - - }else{ - console.warn("Freeze Error - Row is already unfrozen"); - } -}; - -FrozenRows.prototype.styleRows = function(row){ - var self = this; - - this.rows.forEach(function(row, i){ - self.table.rowManager.styleRow(row, i); - }); -} - - -Tabulator.prototype.registerModule("frozenRows", FrozenRows); \ No newline at end of file diff --git a/Gems/AssetMemoryAnalyzer/External/tabulator-master/src/js/modules/group_rows.js b/Gems/AssetMemoryAnalyzer/External/tabulator-master/src/js/modules/group_rows.js deleted file mode 100644 index 9efa3480b9..0000000000 --- a/Gems/AssetMemoryAnalyzer/External/tabulator-master/src/js/modules/group_rows.js +++ /dev/null @@ -1,995 +0,0 @@ - - -//public group object -var GroupComponent = function (group){ - this._group = group; - this.type = "GroupComponent"; -}; - -GroupComponent.prototype.getKey = function(){ - return this._group.key; -}; - -GroupComponent.prototype.getElement = function(){ - return this._group.element; -}; - -GroupComponent.prototype.getRows = function(){ - return this._group.getRows(true); -}; - -GroupComponent.prototype.getSubGroups = function(){ - return this._group.getSubGroups(true); -}; - -GroupComponent.prototype.getParentGroup = function(){ - return this._group.parent ? this._group.parent.getComponent() : false; -}; - -GroupComponent.prototype.getVisibility = function(){ - return this._group.visible; -}; - -GroupComponent.prototype.show = function(){ - this._group.show(); -}; - -GroupComponent.prototype.hide = function(){ - this._group.hide(); -}; - -GroupComponent.prototype.toggle = function(){ - this._group.toggleVisibility(); -}; - -GroupComponent.prototype._getSelf = function(){ - return this._group; -}; - -GroupComponent.prototype.getTable = function(){ - return this._group.table; -}; - -////////////////////////////////////////////////// -//////////////// Group Functions ///////////////// -////////////////////////////////////////////////// - -var Group = function(groupManager, parent, level, key, field, generator, oldGroup){ - - this.groupManager = groupManager; - this.parent = parent; - this.key = key; - this.level = level; - this.field = field; - this.hasSubGroups = level < (groupManager.groupIDLookups.length - 1); - this.addRow = this.hasSubGroups ? this._addRowToGroup : this._addRow; - this.type = "group"; //type of element - this.old = oldGroup; - this.rows = []; - this.groups = []; - this.groupList = []; - this.generator = generator; - this.elementContents = false; - this.height = 0; - this.outerHeight = 0; - this.initialized = false; - this.calcs = {}; - this.initialized = false; - this.modules = {}; - - this.visible = oldGroup ? oldGroup.visible : (typeof groupManager.startOpen[level] !== "undefined" ? groupManager.startOpen[level] : groupManager.startOpen[0]); - - this.createElements(); - this.addBindings(); - - this.createValueGroups(); -}; - -Group.prototype.createElements = function(){ - this.element = document.createElement("div"); - this.element.classList.add("tabulator-row"); - this.element.classList.add("tabulator-group"); - this.element.classList.add("tabulator-group-level-" + this.level); - this.element.setAttribute("role", "rowgroup"); - - this.arrowElement = document.createElement("div"); - this.arrowElement.classList.add("tabulator-arrow"); -}; - -Group.prototype.createValueGroups = function(){ - var level = this.level + 1; - if(this.groupManager.allowedValues && this.groupManager.allowedValues[level]){ - this.groupManager.allowedValues[level].forEach((value) => { - this._createGroup(value, level); - }); - } -}; - -Group.prototype.addBindings = function(){ - var self = this, - dblTap, tapHold, tap, toggleElement; - - - //handle group click events - if (self.groupManager.table.options.groupClick){ - self.element.addEventListener("click", function(e){ - self.groupManager.table.options.groupClick(e, self.getComponent()); - }); - } - - if (self.groupManager.table.options.groupDblClick){ - self.element.addEventListener("dblclick", function(e){ - self.groupManager.table.options.groupDblClick(e, self.getComponent()); - }); - } - - if (self.groupManager.table.options.groupContext){ - self.element.addEventListener("contextmenu", function(e){ - self.groupManager.table.options.groupContext(e, self.getComponent()); - }); - } - - if (self.groupManager.table.options.groupTap){ - - tap = false; - - self.element.addEventListener("touchstart", function(e){ - tap = true; - }); - - self.element.addEventListener("touchend", function(e){ - if(tap){ - self.groupManager.table.options.groupTap(e, self.getComponent()); - } - - tap = false; - }); - } - - if (self.groupManager.table.options.groupDblTap){ - - dblTap = null; - - self.element.addEventListener("touchend", function(e){ - - if(dblTap){ - clearTimeout(dblTap); - dblTap = null; - - self.groupManager.table.options.groupDblTap(e, self.getComponent()); - }else{ - - dblTap = setTimeout(function(){ - clearTimeout(dblTap); - dblTap = null; - }, 300); - } - - }); - } - - - if (self.groupManager.table.options.groupTapHold){ - - tapHold = null; - - self.element.addEventListener("touchstart", function(e){ - clearTimeout(tapHold); - - tapHold = setTimeout(function(){ - clearTimeout(tapHold); - tapHold = null; - tap = false; - self.groupManager.table.options.groupTapHold(e, self.getComponent()); - }, 1000); - - }); - - self.element.addEventListener("touchend", function(e){ - clearTimeout(tapHold); - tapHold = null; - }); - } - - - - if(self.groupManager.table.options.groupToggleElement){ - toggleElement = self.groupManager.table.options.groupToggleElement == "arrow" ? self.arrowElement : self.element; - - toggleElement.addEventListener("click", function(e){ - e.stopPropagation(); - e.stopImmediatePropagation(); - self.toggleVisibility(); - }); - } - -}; - - -Group.prototype._createGroup = function(groupID, level){ - var groupKey = level + "_" + groupID; - var group = new Group(this.groupManager, this, level, groupID, this.groupManager.groupIDLookups[level].field, this.groupManager.headerGenerator[level] || this.groupManager.headerGenerator[0], this.old ? this.old.groups[groupKey] : false); - - this.groups[groupKey] = group; - this.groupList.push(group); -}; - -Group.prototype._addRowToGroup = function(row){ - - var level = this.level + 1; - - if(this.hasSubGroups){ - var groupID = this.groupManager.groupIDLookups[level].func(row.getData()), - groupKey = level + "_" + groupID; - - if(this.groupManager.allowedValues && this.groupManager.allowedValues[level]){ - if(this.groups[groupKey]){ - this.groups[groupKey].addRow(row); - } - }else{ - if(!this.groups[groupKey]){ - this._createGroup(groupID, level); - } - - this.groups[groupKey].addRow(row); - } - } -}; - -Group.prototype._addRow = function(row){ - this.rows.push(row); - row.modules.group = this; -}; - -Group.prototype.insertRow = function(row, to, after){ - var data = this.conformRowData({}); - - row.updateData(data); - - var toIndex = this.rows.indexOf(to); - - if(toIndex > -1){ - if(after){ - this.rows.splice(toIndex+1, 0, row); - }else{ - this.rows.splice(toIndex, 0, row); - } - }else{ - if(after){ - this.rows.push(row); - }else{ - this.rows.unshift(row); - } - } - - row.modules.group = this; - - this.generateGroupHeaderContents(); - - if(this.groupManager.table.modExists("columnCalcs") && this.groupManager.table.options.columnCalcs != "table"){ - this.groupManager.table.modules.columnCalcs.recalcGroup(this); - } -}; - -Group.prototype.getRowIndex = function(row){ - -}; - -//update row data to match grouping contraints -Group.prototype.conformRowData = function(data){ - if(this.field){ - data[this.field] = this.key; - }else{ - console.warn("Data Conforming Error - Cannot conform row data to match new group as groupBy is a function"); - } - - if(this.parent){ - data = this.parent.conformRowData(data); - } - - return data; -}; - - - -Group.prototype.removeRow = function(row){ - var index = this.rows.indexOf(row); - - if(index > -1){ - this.rows.splice(index, 1); - } - - if(!this.rows.length){ - if(this.parent){ - this.parent.removeGroup(this); - }else{ - this.groupManager.removeGroup(this); - } - - this.groupManager.updateGroupRows(true); - }else{ - this.generateGroupHeaderContents(); - if(this.groupManager.table.modExists("columnCalcs") && this.groupManager.table.options.columnCalcs != "table"){ - this.groupManager.table.modules.columnCalcs.recalcGroup(this); - } - } -}; - -Group.prototype.removeGroup = function(group){ - var groupKey = group.level + "_" + group.key, - index; - - if(this.groups[groupKey]){ - delete this.groups[groupKey]; - - index = this.groupList.indexOf(group); - - if(index > -1){ - this.groupList.splice(index, 1); - } - - if(!this.groupList.length){ - if(this.parent){ - this.parent.removeGroup(this); - }else{ - this.groupManager.removeGroup(this); - } - } - } -}; - -Group.prototype.getHeadersAndRows = function(){ - var output = []; - - output.push(this); - - this._visSet(); - - if(this.visible){ - - if(this.groupList.length){ - this.groupList.forEach(function(group){ - output = output.concat(group.getHeadersAndRows()); - }); - - }else{ - if(this.groupManager.table.options.columnCalcs != "table" && this.groupManager.table.modExists("columnCalcs") && this.groupManager.table.modules.columnCalcs.hasTopCalcs()){ - this.calcs.top = this.groupManager.table.modules.columnCalcs.generateTopRow(this.rows); - output.push(this.calcs.top); - } - - output = output.concat(this.rows); - - if(this.groupManager.table.options.columnCalcs != "table" && this.groupManager.table.modExists("columnCalcs") && this.groupManager.table.modules.columnCalcs.hasBottomCalcs()){ - this.calcs.bottom = this.groupManager.table.modules.columnCalcs.generateBottomRow(this.rows); - output.push(this.calcs.bottom); - } - } - }else{ - if(!this.groupList.length && this.groupManager.table.options.columnCalcs != "table" && this.groupManager.table.options.groupClosedShowCalcs){ - if(this.groupManager.table.modExists("columnCalcs")){ - if(this.groupManager.table.modules.columnCalcs.hasTopCalcs()){ - this.calcs.top = this.groupManager.table.modules.columnCalcs.generateTopRow(this.rows); - output.push(this.calcs.top); - } - - if(this.groupManager.table.modules.columnCalcs.hasBottomCalcs()){ - this.calcs.bottom = this.groupManager.table.modules.columnCalcs.generateBottomRow(this.rows); - output.push(this.calcs.bottom); - } - } - } - } - - return output; -}; - -Group.prototype.getData = function(visible, transform){ - var self = this, - output = []; - - this._visSet(); - - if(!visible || (visible && this.visible)){ - this.rows.forEach(function(row){ - output.push(row.getData(transform || "data")); - }); - } - - return output; -}; - -// Group.prototype.getRows = function(){ -// this._visSet(); - -// return this.visible ? this.rows : []; -// }; - -Group.prototype.getRowCount = function(){ - var count = 0; - - if(this.groupList.length){ - this.groupList.forEach(function(group){ - count += group.getRowCount(); - }); - }else{ - count = this.rows.length; - } - return count; -}; - -Group.prototype.toggleVisibility = function(){ - if(this.visible){ - this.hide(); - }else{ - this.show(); - } -}; - -Group.prototype.hide = function(){ - this.visible = false; - - if(this.groupManager.table.rowManager.getRenderMode() == "classic" && !this.groupManager.table.options.pagination){ - - this.element.classList.remove("tabulator-group-visible"); - - if(this.groupList.length){ - this.groupList.forEach(function(group){ - - var el; - - if(group.calcs.top){ - el = group.calcs.top.getElement(); - el.parentNode.removeChild(el); - } - - if(group.calcs.bottom){ - el = group.calcs.bottom.getElement(); - el.parentNode.removeChild(el); - } - - var rows = group.getHeadersAndRows(); - - rows.forEach(function(row){ - var rowEl = row.getElement(); - rowEl.parentNode.removeChild(rowEl); - }); - }); - - }else{ - this.rows.forEach(function(row){ - var rowEl = row.getElement(); - rowEl.parentNode.removeChild(rowEl); - }); - } - - this.groupManager.table.rowManager.setDisplayRows(this.groupManager.updateGroupRows(), this.groupManager.getDisplayIndex()); - - }else{ - this.groupManager.updateGroupRows(true); - } - - this.groupManager.table.options.groupVisibilityChanged.call(this.table, this.getComponent(), false); -}; - -Group.prototype.show = function(){ - var self = this; - - self.visible = true; - - if(this.groupManager.table.rowManager.getRenderMode() == "classic" && !this.groupManager.table.options.pagination){ - - this.element.classList.add("tabulator-group-visible"); - - var prev = self.getElement(); - - if(this.groupList.length){ - this.groupList.forEach(function(group){ - var rows = group.getHeadersAndRows(); - - rows.forEach(function(row){ - var rowEl = row.getElement(); - prev.parentNode.insertBefore(rowEl, prev.nextSibling); - row.initialize(); - prev = rowEl; - }); - }); - - }else{ - self.rows.forEach(function(row){ - var rowEl = row.getElement(); - prev.parentNode.insertBefore(rowEl, prev.nextSibling); - row.initialize(); - prev = rowEl; - }); - } - - this.groupManager.table.rowManager.setDisplayRows(this.groupManager.updateGroupRows(), this.groupManager.getDisplayIndex()); - }else{ - this.groupManager.updateGroupRows(true); - } - - this.groupManager.table.options.groupVisibilityChanged.call(this.table, this.getComponent(), true); -}; - -Group.prototype._visSet = function(){ - var data = []; - - if(typeof this.visible == "function"){ - - this.rows.forEach(function(row){ - data.push(row.getData()); - }); - - this.visible = this.visible(this.key, this.getRowCount(), data, this.getComponent()); - } -}; - -Group.prototype.getRowGroup = function(row){ - var match = false; - if(this.groupList.length){ - this.groupList.forEach(function(group){ - var result = group.getRowGroup(row); - - if(result){ - match = result; - } - }); - }else{ - if(this.rows.find(function(item){ - return item === row; - })){ - match = this; - } - } - - return match; -}; - -Group.prototype.getSubGroups = function(component){ - var output = []; - - this.groupList.forEach(function(child){ - output.push(component ? child.getComponent() : child); - }); - - return output; -}; - -Group.prototype.getRows = function(compoment){ - var output = []; - - this.rows.forEach(function(row){ - output.push(compoment ? row.getComponent() : row); - }); - - return output; -}; - -Group.prototype.generateGroupHeaderContents = function(){ - var data = []; - - this.rows.forEach(function(row){ - data.push(row.getData()); - }); - - this.elementContents = this.generator(this.key, this.getRowCount(), data, this.getComponent()); - - while(this.element.firstChild) this.element.removeChild(this.element.firstChild); - - if(typeof this.elementContents === "string"){ - this.element.innerHTML = this.elementContents; - }else{ - this.element.appendChild(this.elementContents); - } - - this.element.insertBefore(this.arrowElement, this.element.firstChild); -}; - -////////////// Standard Row Functions ////////////// - -Group.prototype.getElement = function(){ - this.addBindingsd = false; - - this._visSet(); - - - if(this.visible){ - this.element.classList.add("tabulator-group-visible"); - }else{ - this.element.classList.remove("tabulator-group-visible"); - } - - this.element.childNodes.forEach(function(child){ - child.parentNode.removeChild(child); - }); - - this.generateGroupHeaderContents(); - - // this.addBindings(); - - return this.element; -}; - -//normalize the height of elements in the row -Group.prototype.normalizeHeight = function(){ - this.setHeight(this.element.clientHeight); -}; - -Group.prototype.initialize = function(force){ - if(!this.initialized || force){ - this.normalizeHeight(); - this.initialized = true; - } -}; - -Group.prototype.reinitialize = function(){ - this.initialized = false; - this.height = 0; - - if(Tabulator.prototype.helpers.elVisible(this.element)){ - this.initialize(true); - } -}; - -Group.prototype.setHeight = function(height){ - if(this.height != height){ - this.height = height; - this.outerHeight = this.element.offsetHeight; - } -}; - -//return rows outer height -Group.prototype.getHeight = function(){ - return this.outerHeight; -}; - -Group.prototype.getGroup = function(){ - return this; -}; - -Group.prototype.reinitializeHeight = function(){ -}; -Group.prototype.calcHeight = function(){ -}; -Group.prototype.setCellHeight = function(){ -}; -Group.prototype.clearCellHeight = function(){ -}; - - -//////////////// Object Generation ///////////////// -Group.prototype.getComponent = function(){ - return new GroupComponent(this); -}; - -////////////////////////////////////////////////// -////////////// Group Row Extension /////////////// -////////////////////////////////////////////////// - -var GroupRows = function(table){ - - this.table = table; //hold Tabulator object - - this.groupIDLookups = false; //enable table grouping and set field to group by - this.startOpen = [function(){return false;}]; //starting state of group - this.headerGenerator = [function(){return "";}]; - this.groupList = []; //ordered list of groups - this.allowedValues = false; - this.groups = {}; //hold row groups - this.displayIndex = 0; //index in display pipeline -}; - -//initialize group configuration -GroupRows.prototype.initialize = function(){ - var self = this, - groupBy = self.table.options.groupBy, - startOpen = self.table.options.groupStartOpen, - groupHeader = self.table.options.groupHeader; - - this.allowedValues = self.table.options.groupValues; - - self.headerGenerator = [function(){return "";}]; - this.startOpen = [function(){return false;}]; //starting state of group - - self.table.modules.localize.bind("groups|item", function(langValue, lang){ - self.headerGenerator[0] = function(value, count, data){ //header layout function - return (typeof value === "undefined" ? "" : value) + "(" + count + " " + ((count === 1) ? langValue : lang.groups.items) + ")"; - }; - }); - - this.groupIDLookups = []; - - if(Array.isArray(groupBy) || groupBy){ - if(this.table.modExists("columnCalcs") && this.table.options.columnCalcs != "table" && this.table.options.columnCalcs != "both"){ - this.table.modules.columnCalcs.removeCalcs(); - } - }else{ - if(this.table.modExists("columnCalcs") && this.table.options.columnCalcs != "group"){ - - var cols = this.table.columnManager.getRealColumns(); - - cols.forEach(function(col){ - if(col.definition.topCalc){ - self.table.modules.columnCalcs.initializeTopRow(); - } - - if(col.definition.bottomCalc){ - self.table.modules.columnCalcs.initializeBottomRow(); - } - }); - } - } - - - - if(!Array.isArray(groupBy)){ - groupBy = [groupBy]; - } - - groupBy.forEach(function(group, i){ - var lookupFunc, column; - - if(typeof group == "function"){ - lookupFunc = group; - }else{ - column = self.table.columnManager.getColumnByField(group); - - if(column){ - lookupFunc = function(data){ - return column.getFieldValue(data); - }; - }else{ - lookupFunc = function(data){ - return data[group]; - }; - } - } - - self.groupIDLookups.push({ - field: typeof group === "function" ? false : group, - func:lookupFunc, - values:self.allowedValues ? self.allowedValues[i] : false, - }); - }); - - - - if(startOpen){ - - if(!Array.isArray(startOpen)){ - startOpen = [startOpen]; - } - - startOpen.forEach(function(level){ - level = typeof level == "function" ? level : function(){return true;}; - }); - - self.startOpen = startOpen; - } - - if(groupHeader){ - self.headerGenerator = Array.isArray(groupHeader) ? groupHeader : [groupHeader]; - } - - this.initialized = true; - -}; - -GroupRows.prototype.setDisplayIndex = function(index){ - this.displayIndex = index; -}; - -GroupRows.prototype.getDisplayIndex = function(){ - return this.displayIndex; -}; - - -//return appropriate rows with group headers -GroupRows.prototype.getRows = function(rows){ - if(this.groupIDLookups.length){ - - this.table.options.dataGrouping.call(this.table); - - this.generateGroups(rows); - - if(this.table.options.dataGrouped){ - this.table.options.dataGrouped.call(this.table, this.getGroups(true)); - } - - return this.updateGroupRows(); - - }else{ - return rows.slice(0); - } - -}; - -GroupRows.prototype.getGroups = function(compoment){ - var groupComponents = []; - - this.groupList.forEach(function(group){ - groupComponents.push(compoment ? group.getComponent() : group); - }); - - return groupComponents; -}; - -GroupRows.prototype.pullGroupListData = function(groupList) { - var self = this; - var groupListData = []; - - groupList.forEach( function(group) { - var groupHeader = {}; - groupHeader.level = 0; - groupHeader.rowCount = 0; - groupHeader.headerContent = ""; - var childData = []; - - if (group.hasSubGroups) { - childData = self.pullGroupListData(group.groupList); - - groupHeader.level = group.level; - groupHeader.rowCount = childData.length - group.groupList.length; // data length minus number of sub-headers - groupHeader.headerContent = group.generator(group.key, groupHeader.rowCount, group.rows, group); - - groupListData.push(groupHeader); - groupListData = groupListData.concat(childData); - } - - else { - groupHeader.level = group.level; - groupHeader.headerContent = group.generator(group.key, group.rows.length, group.rows, group); - groupHeader.rowCount = group.getRows().length; - - groupListData.push(groupHeader); - - group.getRows().forEach( function(row) { - groupListData.push(row.getData("data")); - }); - } - }); - - return groupListData -}; - -GroupRows.prototype.getGroupedData = function(){ - - return this.pullGroupListData(this.groupList); -}; - -GroupRows.prototype.getRowGroup = function(row){ - var match = false; - - this.groupList.forEach(function(group){ - var result = group.getRowGroup(row); - - if(result){ - match = result; - } - }); - - return match; -}; - -GroupRows.prototype.countGroups = function(){ - return this.groupList.length; -}; - -GroupRows.prototype.generateGroups = function(rows){ - var self = this, - oldGroups = self.groups; - - self.groups = {}; - self.groupList =[]; - - if(this.allowedValues && this.allowedValues[0]){ - this.allowedValues[0].forEach(function(value){ - self.createGroup(value, 0, oldGroups); - }); - - rows.forEach(function(row){ - self.assignRowToExistingGroup(row, oldGroups); - }); - }else{ - rows.forEach(function(row){ - self.assignRowToGroup(row, oldGroups); - }); - } - -}; - -GroupRows.prototype.createGroup = function(groupID, level, oldGroups){ - var groupKey = level + "_" + groupID, - group; - - oldGroups = oldGroups || []; - - group = new Group(this, false, level, groupID, this.groupIDLookups[0].field, this.headerGenerator[0], oldGroups[groupKey]); - - this.groups[groupKey] = group; - this.groupList.push(group); -}; - -GroupRows.prototype.assignRowToGroup = function(row, oldGroups){ - var groupID = this.groupIDLookups[0].func(row.getData()), - groupKey = "0_" + groupID; - - if(!this.groups[groupKey]){ - this.createGroup(groupID, 0, oldGroups); - } - - this.groups[groupKey].addRow(row); -}; - -GroupRows.prototype.assignRowToExistingGroup = function(row, oldGroups){ - var groupID = this.groupIDLookups[0].func(row.getData()), - groupKey = "0_" + groupID; - - if(this.groups[groupKey]){ - this.groups[groupKey].addRow(row); - } -}; - - -GroupRows.prototype.assignRowToGroup = function(row, oldGroups){ - var groupID = this.groupIDLookups[0].func(row.getData()), - newGroupNeeded = !this.groups["0_" + groupID]; - - if(newGroupNeeded){ - this.createGroup(groupID, 0, oldGroups); - } - - this.groups["0_" + groupID].addRow(row); - - return !newGroupNeeded; -}; - - - -GroupRows.prototype.updateGroupRows = function(force){ - var self = this, - output = [], - oldRowCount; - - self.groupList.forEach(function(group){ - output = output.concat(group.getHeadersAndRows()); - }); - - //force update of table display - if(force){ - - var displayIndex = self.table.rowManager.setDisplayRows(output, this.getDisplayIndex()); - - if(displayIndex !== true){ - this.setDisplayIndex(displayIndex); - } - - self.table.rowManager.refreshActiveData("group", true, true); - } - - return output; -}; - -GroupRows.prototype.scrollHeaders = function(left){ - this.groupList.forEach(function(group){ - group.arrowElement.style.marginLeft = left + "px"; - }); -}; - -GroupRows.prototype.removeGroup = function(group){ - var groupKey = group.level + "_" + group.key, - index; - - if(this.groups[groupKey]){ - delete this.groups[groupKey]; - - index = this.groupList.indexOf(group); - - if(index > -1){ - this.groupList.splice(index, 1); - } - } -}; - -Tabulator.prototype.registerModule("groupRows", GroupRows); \ No newline at end of file diff --git a/Gems/AssetMemoryAnalyzer/External/tabulator-master/src/js/modules/history.js b/Gems/AssetMemoryAnalyzer/External/tabulator-master/src/js/modules/history.js deleted file mode 100644 index 17be37623a..0000000000 --- a/Gems/AssetMemoryAnalyzer/External/tabulator-master/src/js/modules/history.js +++ /dev/null @@ -1,135 +0,0 @@ -var History = function(table){ - this.table = table; //hold Tabulator object - - this.history = []; - this.index = -1; -}; - - -History.prototype.clear = function(){ - this.history = []; - this.index = -1; -}; - -History.prototype.action = function(type, component, data){ - - this.history = this.history.slice(0, this.index + 1); - - this.history.push({ - type:type, - component:component, - data:data, - }); - - this.index ++; -}; - -History.prototype.getHistoryUndoSize = function(){ - return this.index + 1; -}; - -History.prototype.getHistoryRedoSize = function(){ - return this.history.length - (this.index + 1); -}; - -History.prototype.undo = function(){ - - if(this.index > -1){ - let action = this.history[this.index]; - - this.undoers[action.type].call(this, action); - - this.index--; - - this.table.options.historyUndo.call(this.table, action.type, action.component.getComponent(), action.data); - - return true; - }else{ - console.warn("History Undo Error - No more history to undo"); - return false; - } -}; - -History.prototype.redo = function(){ - if(this.history.length-1 > this.index){ - - this.index++; - - let action = this.history[this.index]; - - this.redoers[action.type].call(this, action); - - this.table.options.historyRedo.call(this.table, action.type, action.component.getComponent(), action.data); - - return true; - }else{ - console.warn("History Redo Error - No more history to redo"); - return false; - } -}; - - -History.prototype.undoers = { - cellEdit: function(action){ - action.component.setValueProcessData(action.data.oldValue); - }, - - rowAdd: function(action){ - action.component.deleteActual(); - }, - - rowDelete: function(action){ - var newRow = this.table.rowManager.addRowActual(action.data.data, action.data.pos, action.data.index); - - this._rebindRow(action.component, newRow); - }, - - rowMove: function(action){ - this.table.rowManager.moveRowActual(action.component, this.table.rowManager.rows[action.data.pos], false); - this.table.rowManager.redraw(); - }, -}; - - -History.prototype.redoers = { - cellEdit: function(action){ - action.component.setValueProcessData(action.data.newValue); - }, - - rowAdd: function(action){ - var newRow = this.table.rowManager.addRowActual(action.data.data, action.data.pos, action.data.index); - - this._rebindRow(action.component, newRow); - }, - - rowDelete:function(action){ - action.component.deleteActual(); - }, - - rowMove: function(action){ - this.table.rowManager.moveRowActual(action.component, this.table.rowManager.rows[action.data.pos], false); - this.table.rowManager.redraw(); - }, -}; - -//rebind rows to new element after deletion -History.prototype._rebindRow = function(oldRow, newRow){ - this.history.forEach(function(action){ - if(action.component instanceof Row){ - if(action.component === oldRow){ - action.component = newRow; - } - }else if(action.component instanceof Cell){ - if(action.component.row === oldRow){ - var field = action.component.column.getField(); - - if(field){ - action.component = newRow.getCell(field); - } - - } - } - }); -}; - -Tabulator.prototype.registerModule("history", History); \ No newline at end of file diff --git a/Gems/AssetMemoryAnalyzer/External/tabulator-master/src/js/modules/html_table_import.js b/Gems/AssetMemoryAnalyzer/External/tabulator-master/src/js/modules/html_table_import.js deleted file mode 100644 index b841738d97..0000000000 --- a/Gems/AssetMemoryAnalyzer/External/tabulator-master/src/js/modules/html_table_import.js +++ /dev/null @@ -1,196 +0,0 @@ -var HtmlTableImport = function(table){ - this.table = table; //hold Tabulator object - this.fieldIndex = []; - this.hasIndex = false; -}; - -HtmlTableImport.prototype.parseTable = function(){ - var self = this, - element = self.table.element, - options = self.table.options, - columns = options.columns, - headers = element.getElementsByTagName("th"), - rows = element.getElementsByTagName("tbody")[0], - data = [], - newTable; - - self.hasIndex = false; - - self.table.options.htmlImporting.call(this.table); - - rows = rows ? rows.getElementsByTagName("tr") : []; - - //check for tablator inline options - self._extractOptions(element, options); - - if(headers.length){ - self._extractHeaders(headers, rows); - }else{ - self._generateBlankHeaders(headers, rows); - } - - - //iterate through table rows and build data set - for(var index = 0; index < rows.length; index++){ - var row = rows[index], - cells = row.getElementsByTagName("td"), - item = {}; - - //create index if the dont exist in table - if(!self.hasIndex){ - item[options.index] = index; - } - - for(var i = 0; i < cells.length; i++){ - var cell = cells[i]; - if(typeof this.fieldIndex[i] !== "undefined"){ - item[this.fieldIndex[i]] = cell.innerHTML; - } - } - - //add row data to item - data.push(item); - } - - //create new element - var newElement = document.createElement("div"); - - //transfer attributes to new element - var attributes = element.attributes; - - // loop through attributes and apply them on div - - for(var i in attributes){ - if(typeof attributes[i] == "object"){ - newElement.setAttribute(attributes[i].name, attributes[i].value); - } - } - - // replace table with div element - element.parentNode.replaceChild(newElement, element); - - options.data = data; - - self.table.options.htmlImported.call(this.table); - - // // newElement.tabulator(options); - - this.table.element = newElement; -}; - -//extract tabulator attribute options -HtmlTableImport.prototype._extractOptions = function(element, options){ - var attributes = element.attributes; - - for(var index in attributes){ - var attrib = attributes[index]; - var name; - - if(typeof attrib == "object" && attrib.name && attrib.name.indexOf("tabulator-") === 0){ - name = attrib.name.replace("tabulator-", ""); - - for(var key in options){ - if(key.toLowerCase() == name){ - options[key] = this._attribValue(attrib.value); - } - } - } - } -}; - -//get value of attribute -HtmlTableImport.prototype._attribValue = function(value){ - if(value === "true"){ - return true; - } - - if(value === "false"){ - return false; - } - - return value; -}; - -//find column if it has already been defined -HtmlTableImport.prototype._findCol = function(title){ - var match = this.table.options.columns.find(function(column){ - return column.title === title; - }); - - return match || false; -}; - -//extract column from headers -HtmlTableImport.prototype._extractHeaders = function(headers, rows){ - for(var index = 0; index < headers.length; index++){ - var header = headers[index], - exists = false, - col = this._findCol(header.textContent), - width, attributes; - - if(col){ - exists = true; - }else{ - col = {title:header.textContent.trim()}; - } - - if(!col.field) { - col.field = header.textContent.trim().toLowerCase().replace(" ", "_"); - } - - width = header.getAttribute("width"); - - if(width && !col.width) { - col.width = width; - } - - //check for tablator inline options - attributes = header.attributes; - - // //check for tablator inline options - this._extractOptions(header, col); - - for(var i in attributes){ - var attrib = attributes[i], - name; - - if(typeof attrib == "object" && attrib.name && attrib.name.indexOf("tabulator-") === 0){ - - name = attrib.name.replace("tabulator-", ""); - - col[name] = this._attribValue(attrib.value); - } - } - - this.fieldIndex[index] = col.field; - - if(col.field == this.table.options.index){ - this.hasIndex = true; - } - - if(!exists){ - this.table.options.columns.push(col); - } - - } -}; - -//generate blank headers -HtmlTableImport.prototype._generateBlankHeaders = function(headers, rows){ - for(var index = 0; index < headers.length; index++){ - var header = headers[index], - col = {title:"", field:"col" + index}; - - this.fieldIndex[index] = col.field; - - var width = header.getAttribute("width"); - - if(width){ - col.width = width; - } - - this.table.options.columns.push(col); - } -}; - -Tabulator.prototype.registerModule("htmlTableImport", HtmlTableImport); \ No newline at end of file diff --git a/Gems/AssetMemoryAnalyzer/External/tabulator-master/src/js/modules/keybindings.js b/Gems/AssetMemoryAnalyzer/External/tabulator-master/src/js/modules/keybindings.js deleted file mode 100644 index 6dd3ca3560..0000000000 --- a/Gems/AssetMemoryAnalyzer/External/tabulator-master/src/js/modules/keybindings.js +++ /dev/null @@ -1,355 +0,0 @@ -var Keybindings = function(table){ - this.table = table; //hold Tabulator object - this.watchKeys = null; - this.pressedKeys = null; - this.keyupBinding = false; - this.keydownBinding = false; -}; - -Keybindings.prototype.initialize = function(){ - var bindings = this.table.options.keybindings, - mergedBindings = {}; - - this.watchKeys = {}; - this.pressedKeys = []; - - if(bindings !== false){ - - for(let key in this.bindings){ - mergedBindings[key] = this.bindings[key]; - } - - if(Object.keys(bindings).length){ - - for(let key in bindings){ - mergedBindings[key] = bindings[key]; - } - } - - this.mapBindings(mergedBindings); - this.bindEvents(); - } -}; - -Keybindings.prototype.mapBindings = function(bindings){ - var self = this; - - for(let key in bindings){ - - if(this.actions[key]){ - - if(bindings[key]){ - - if(typeof bindings[key] !== "object"){ - bindings[key] = [bindings[key]]; - } - - bindings[key].forEach(function(binding){ - self.mapBinding(key, binding); - }); - } - - }else{ - console.warn("Key Binding Error - no such action:", key); - } - } -}; - -Keybindings.prototype.mapBinding = function(action, symbolsList){ - var self = this; - - var binding = { - action: this.actions[action], - keys: [], - ctrl: false, - shift: false, - }; - - var symbols = symbolsList.toString().toLowerCase().split(" ").join("").split("+"); - - symbols.forEach(function(symbol){ - switch(symbol){ - case "ctrl": - binding.ctrl = true; - break; - - case "shift": - binding.shift = true; - break; - - default: - symbol = parseInt(symbol); - binding.keys.push(symbol); - - if(!self.watchKeys[symbol]){ - self.watchKeys[symbol] = []; - } - - self.watchKeys[symbol].push(binding); - } - }); -}; - -Keybindings.prototype.bindEvents = function(){ - var self = this; - - this.keyupBinding = function(e){ - var code = e.keyCode; - var bindings = self.watchKeys[code]; - - if(bindings){ - - self.pressedKeys.push(code); - - bindings.forEach(function(binding){ - self.checkBinding(e, binding); - }); - } - }; - - this.keydownBinding = function(e){ - var code = e.keyCode; - var bindings = self.watchKeys[code]; - - if(bindings){ - - var index = self.pressedKeys.indexOf(code); - - if(index > -1){ - self.pressedKeys.splice(index, 1); - } - } - }; - - this.table.element.addEventListener("keydown", this.keyupBinding); - - this.table.element.addEventListener("keyup", this.keydownBinding); -}; - -Keybindings.prototype.clearBindings = function(){ - if(this.keyupBinding){ - this.table.element.removeEventListener("keydown", this.keyupBinding); - } - - if(this.keydownBinding){ - this.table.element.removeEventListener("keyup", this.keydownBinding); - } -}; - - -Keybindings.prototype.checkBinding = function(e, binding){ - var self = this, - match = true; - - if(e.ctrlKey == binding.ctrl && e.shiftKey == binding.shift){ - binding.keys.forEach(function(key){ - var index = self.pressedKeys.indexOf(key); - - if(index == -1){ - match = false; - } - }); - - if(match){ - binding.action.call(self, e); - } - - return true; - } - - return false; -}; - -//default bindings -Keybindings.prototype.bindings = { - navPrev:"shift + 9", - navNext:9, - navUp:38, - navDown:40, - scrollPageUp:33, - scrollPageDown:34, - scrollToStart:36, - scrollToEnd:35, - undo:"ctrl + 90", - redo:"ctrl + 89", - copyToClipboard:"ctrl + 67", -}; - -//default actions -Keybindings.prototype.actions = { - keyBlock:function(e){ - e.stopPropagation(); - e.preventDefault(); - }, - scrollPageUp:function(e){ - var rowManager = this.table.rowManager, - newPos = rowManager.scrollTop - rowManager.height, - scrollMax = rowManager.element.scrollHeight; - - e.preventDefault(); - - if(rowManager.displayRowsCount){ - if(newPos >= 0){ - rowManager.element.scrollTop = newPos; - }else{ - rowManager.scrollToRow(rowManager.getDisplayRows()[0]); - } - } - - this.table.element.focus(); - }, - scrollPageDown:function(e){ - var rowManager = this.table.rowManager, - newPos = rowManager.scrollTop + rowManager.height, - scrollMax = rowManager.element.scrollHeight; - - e.preventDefault(); - - if(rowManager.displayRowsCount){ - if(newPos <= scrollMax){ - rowManager.element.scrollTop = newPos; - }else{ - rowManager.scrollToRow(rowManager.getDisplayRows()[rowManager.displayRowsCount - 1]); - } - } - - this.table.element.focus(); - - }, - scrollToStart:function(e){ - var rowManager = this.table.rowManager; - - e.preventDefault(); - - if(rowManager.displayRowsCount){ - rowManager.scrollToRow(rowManager.getDisplayRows()[0]); - } - - this.table.element.focus(); - }, - scrollToEnd:function(e){ - var rowManager = this.table.rowManager; - - e.preventDefault(); - - if(rowManager.displayRowsCount){ - rowManager.scrollToRow(rowManager.getDisplayRows()[rowManager.displayRowsCount - 1]); - } - - this.table.element.focus(); - }, - navPrev:function(e){ - var cell = false; - - if(this.table.modExists("edit")){ - cell = this.table.modules.edit.currentCell; - - if(cell){ - e.preventDefault(); - cell.nav().prev(); - } - } - }, - - navNext:function(e){ - var cell = false; - - if(this.table.modExists("edit")){ - cell = this.table.modules.edit.currentCell; - - if(cell){ - e.preventDefault(); - cell.nav().next(); - } - } - }, - - navLeft:function(e){ - var cell = false; - - if(this.table.modExists("edit")){ - cell = this.table.modules.edit.currentCell; - - if(cell){ - e.preventDefault(); - cell.nav().left(); - } - } - }, - - navRight:function(e){ - var cell = false; - - if(this.table.modExists("edit")){ - cell = this.table.modules.edit.currentCell; - - if(cell){ - e.preventDefault(); - cell.nav().right(); - } - } - }, - - navUp:function(e){ - var cell = false; - - if(this.table.modExists("edit")){ - cell = this.table.modules.edit.currentCell; - - if(cell){ - e.preventDefault(); - cell.nav().up(); - } - } - }, - - navDown:function(e){ - var cell = false; - - if(this.table.modExists("edit")){ - cell = this.table.modules.edit.currentCell; - - if(cell){ - e.preventDefault(); - cell.nav().down(); - } - } - }, - - undo:function(e){ - var cell = false; - if(this.table.options.history && this.table.modExists("history") && this.table.modExists("edit")){ - - cell = this.table.modules.edit.currentCell; - - if(!cell){ - e.preventDefault(); - this.table.modules.history.undo(); - } - } - }, - - redo:function(e){ - var cell = false; - if(this.table.options.history && this.table.modExists("history") && this.table.modExists("edit")){ - - cell = this.table.modules.edit.currentCell; - - if(!cell){ - e.preventDefault(); - this.table.modules.history.redo(); - } - } - }, - - copyToClipboard:function(e){ - if(!this.table.modules.edit.currentCell){ - if(this.table.modExists("clipboard", true)){ - this.table.modules.clipboard.copy(!this.table.options.selectable || this.table.options.selectable == "highlight" ? "active" : "selected", null, null, null, true); - } - } - }, -}; - - -Tabulator.prototype.registerModule("keybindings", Keybindings); \ No newline at end of file diff --git a/Gems/AssetMemoryAnalyzer/External/tabulator-master/src/js/modules/layout.js b/Gems/AssetMemoryAnalyzer/External/tabulator-master/src/js/modules/layout.js deleted file mode 100644 index 8242659722..0000000000 --- a/Gems/AssetMemoryAnalyzer/External/tabulator-master/src/js/modules/layout.js +++ /dev/null @@ -1,225 +0,0 @@ -var Layout = function(table){ - this.table = table; - this.mode = null; -}; - -//initialize layout system -Layout.prototype.initialize = function(layout){ - - if(this.modes[layout]){ - this.mode = layout; - }else{ - console.warn("Layout Error - invalid mode set, defaulting to 'fitData' : " + layout); - this.mode = 'fitData'; - } - - this.table.element.setAttribute("tabulator-layout", this.mode); -}; - -Layout.prototype.getMode = function(){ - return this.mode; -}; - -//trigger table layout -Layout.prototype.layout = function(){ - this.modes[this.mode].call(this, this.table.columnManager.columnsByIndex); -}; - -//layout render functions -Layout.prototype.modes = { - - //resize columns to fit data the contain - "fitData": function(columns){ - columns.forEach(function(column){ - column.reinitializeWidth(); - }); - - if(this.table.options.responsiveLayout && this.table.modExists("responsiveLayout", true)){ - this.table.modules.responsiveLayout.update(); - } - }, - - //resize columns to fit data the contain - "fitDataFill": function(columns){ - columns.forEach(function(column){ - column.reinitializeWidth(); - }); - - if(this.table.options.responsiveLayout && this.table.modExists("responsiveLayout", true)){ - this.table.modules.responsiveLayout.update(); - } - }, - - //resize columns to fit - "fitColumns": function(columns){ - var self = this; - - var totalWidth = self.table.element.clientWidth; //table element width - var fixedWidth = 0; //total width of columns with a defined width - var flexWidth = 0; //total width available to flexible columns - var flexGrowUnits = 0; //total number of widthGrow blocks accross all columns - var flexColWidth = 0; //desired width of flexible columns - var flexColumns = []; //array of flexible width columns - var fixedShrinkColumns = []; //array of fixed width columns that can shrink - var flexShrinkUnits = 0; //total number of widthShrink blocks accross all columns - var overflowWidth = 0; //horizontal overflow width - var gapFill=0; //number of pixels to be added to final column to close and half pixel gaps - - function calcWidth(width){ - var colWidth; - - if(typeof(width) == "string"){ - if(width.indexOf("%") > -1){ - colWidth = (totalWidth / 100) * parseInt(width); - }else{ - colWidth = parseInt(width); - } - }else{ - colWidth = width; - } - - return colWidth; - } - - //ensure columns resize to take up the correct amount of space - function scaleColumns(columns, freeSpace, colWidth, shrinkCols){ - - var oversizeCols = [], - oversizeSpace = 0, - remainingSpace = 0, - nextColWidth = 0, - gap = 0, - changeUnits = 0, - undersizeCols = []; - - function calcGrow(col){ - return (colWidth * (col.column.definition.widthGrow || 1)); - } - - function calcShrink(col){ - return (calcWidth(col.width) - (colWidth * (col.column.definition.widthShrink || 0))) - } - - columns.forEach(function(col, i){ - var width = shrinkCols ? calcShrink(col) : calcGrow(col); - if(col.column.minWidth >= width){ - oversizeCols.push(col); - }else{ - undersizeCols.push(col); - changeUnits += shrinkCols ? (col.column.definition.widthShrink || 1) : (col.column.definition.widthGrow || 1); - } - }); - - if(oversizeCols.length){ - oversizeCols.forEach(function(col){ - oversizeSpace += shrinkCols ? col.width - col.column.minWidth : col.column.minWidth; - col.width = col.column.minWidth; - }); - - remainingSpace = freeSpace - oversizeSpace; - - nextColWidth = changeUnits ? Math.floor(remainingSpace/changeUnits) : remainingSpace; - - gap = remainingSpace - (nextColWidth * changeUnits); - - gap += scaleColumns(undersizeCols, remainingSpace, nextColWidth, shrinkCols); - }else{ - gap = changeUnits ? freeSpace - (Math.floor(freeSpace/changeUnits) * changeUnits) : freeSpace; - - undersizeCols.forEach(function(column){ - column.width = shrinkCols ? calcShrink(column) : calcGrow(column); - }); - } - - return gap; - } - - - if(this.table.options.responsiveLayout && this.table.modExists("responsiveLayout", true)){ - this.table.modules.responsiveLayout.update(); - } - - //adjust for vertical scrollbar if present - if(this.table.rowManager.element.scrollHeight > this.table.rowManager.element.clientHeight){ - totalWidth -= this.table.rowManager.element.offsetWidth - this.table.rowManager.element.clientWidth; - } - - columns.forEach(function(column){ - var width, minWidth, colWidth; - - if(column.visible){ - - width = column.definition.width; - minWidth = parseInt(column.minWidth); - - if(width){ - - colWidth = calcWidth(width); - - fixedWidth += colWidth > minWidth ? colWidth : minWidth; - - if(column.definition.widthShrink){ - fixedShrinkColumns.push({ - column:column, - width:colWidth > minWidth ? colWidth : minWidth - }); - flexShrinkUnits += column.definition.widthShrink; - } - - }else{ - flexColumns.push({ - column:column, - width:0, - }); - flexGrowUnits += column.definition.widthGrow || 1; - } - } - }); - - - //calculate available space - flexWidth = totalWidth - fixedWidth; - - //calculate correct column size - flexColWidth = Math.floor(flexWidth / flexGrowUnits) - - //generate column widths - var gapFill = scaleColumns(flexColumns, flexWidth, flexColWidth, false); - - //increase width of last column to account for rounding errors - if(flexColumns.length && gapFill > 0){ - flexColumns[flexColumns.length-1].width += + gapFill; - } - - //caculate space for columns to be shrunk into - flexColumns.forEach(function(col){ - flexWidth -= col.width; - }) - - overflowWidth = Math.abs(gapFill) + flexWidth; - - - //shrink oversize columns if there is no available space - if(overflowWidth > 0 && flexShrinkUnits){ - gapFill = scaleColumns(fixedShrinkColumns, overflowWidth, Math.floor(overflowWidth / flexShrinkUnits), true); - } - - //decrease width of last column to account for rounding errors - if(fixedShrinkColumns.length){ - fixedShrinkColumns[fixedShrinkColumns.length-1].width -= gapFill; - } - - - flexColumns.forEach(function(col){ - col.column.setWidth(col.width); - }); - - fixedShrinkColumns.forEach(function(col){ - col.column.setWidth(col.width); - }); - - }, -}; - - -Tabulator.prototype.registerModule("layout", Layout); \ No newline at end of file diff --git a/Gems/AssetMemoryAnalyzer/External/tabulator-master/src/js/modules/localize.js b/Gems/AssetMemoryAnalyzer/External/tabulator-master/src/js/modules/localize.js deleted file mode 100644 index f066525449..0000000000 --- a/Gems/AssetMemoryAnalyzer/External/tabulator-master/src/js/modules/localize.js +++ /dev/null @@ -1,196 +0,0 @@ -var Localize = function(table){ - this.table = table; //hold Tabulator object - this.locale = "default"; //current locale - this.lang = false; //current language - this.bindings = {}; //update events to call when locale is changed -}; - -//set header placehoder -Localize.prototype.setHeaderFilterPlaceholder = function(placeholder){ - this.langs.default.headerFilters.default = placeholder; -}; - -//set header filter placeholder by column -Localize.prototype.setHeaderFilterColumnPlaceholder = function(column, placeholder){ - this.langs.default.headerFilters.columns[column] = placeholder; - - if(this.lang && !this.lang.headerFilters.columns[column]){ - this.lang.headerFilters.columns[column] = placeholder; - } -}; - -//setup a lang description object -Localize.prototype.installLang = function(locale, lang){ - if(this.langs[locale]){ - this._setLangProp(this.langs[locale], lang); - }else{ - this.langs[locale] = lang; - } -}; - -Localize.prototype._setLangProp = function(lang, values){ - for(let key in values){ - if(lang[key] && typeof lang[key] == "object"){ - this._setLangProp(lang[key], values[key]) - }else{ - lang[key] = values[key]; - } - } -}; - - -//set current locale -Localize.prototype.setLocale = function(desiredLocale){ - var self = this; - - desiredLocale = desiredLocale || "default"; - - //fill in any matching languge values - function traverseLang(trans, path){ - for(var prop in trans){ - - if(typeof trans[prop] == "object"){ - if(!path[prop]){ - path[prop] = {}; - } - traverseLang(trans[prop], path[prop]); - }else{ - path[prop] = trans[prop]; - } - } - } - - //determing correct locale to load - if(desiredLocale === true && navigator.language){ - //get local from system - desiredLocale = navigator.language.toLowerCase(); - } - - if(desiredLocale){ - - //if locale is not set, check for matching top level locale else use default - if(!self.langs[desiredLocale]){ - let prefix = desiredLocale.split("-")[0]; - - if(self.langs[prefix]){ - console.warn("Localization Error - Exact matching locale not found, using closest match: ", desiredLocale, prefix); - desiredLocale = prefix; - }else{ - console.warn("Localization Error - Matching locale not found, using default: ", desiredLocale); - desiredLocale = "default"; - } - } - } - - self.locale = desiredLocale; - - //load default lang template - self.lang = Tabulator.prototype.helpers.deepClone(self.langs.default || {}); - - if(desiredLocale != "default"){ - traverseLang(self.langs[desiredLocale], self.lang); - } - - self.table.options.localized.call(self.table, self.locale, self.lang); - - self._executeBindings(); -}; - -//get current locale -Localize.prototype.getLocale = function(locale){ - return self.locale; -}; - -//get lang object for given local or current if none provided -Localize.prototype.getLang = function(locale){ - return locale ? this.langs[locale] : this.lang; -}; - -//get text for current locale -Localize.prototype.getText = function(path, value){ - var path = value ? path + "|" + value : path, - pathArray = path.split("|"), - text = this._getLangElement(pathArray, this.locale); - - // if(text === false){ - // console.warn("Localization Error - Matching localized text not found for given path: ", path); - // } - - return text || ""; -}; - -//traverse langs object and find localized copy -Localize.prototype._getLangElement = function(path, locale){ - var self = this; - var root = self.lang; - - path.forEach(function(level){ - var rootPath; - - if(root){ - rootPath = root[level]; - - if(typeof rootPath != "undefined"){ - root = rootPath; - }else{ - root = false; - } - } - }); - - return root; -}; - -//set update binding -Localize.prototype.bind = function(path, callback){ - if(!this.bindings[path]){ - this.bindings[path] = []; - } - - this.bindings[path].push(callback); - - callback(this.getText(path), this.lang); -}; - -//itterate through bindings and trigger updates -Localize.prototype._executeBindings = function(){ - var self = this; - - for(let path in self.bindings){ - self.bindings[path].forEach(function(binding){ - binding(self.getText(path), self.lang); - }); - } -}; - -//Localized text listings -Localize.prototype.langs = { - "default":{ //hold default locale text - "groups":{ - "item":"item", - "items":"items", - }, - "columns":{ - }, - "ajax":{ - "loading":"Loading", - "error":"Error", - }, - "pagination":{ - "first":"First", - "first_title":"First Page", - "last":"Last", - "last_title":"Last Page", - "prev":"Prev", - "prev_title":"Prev Page", - "next":"Next", - "next_title":"Next Page", - }, - "headerFilters":{ - "default":"filter column...", - "columns":{} - } - }, -}; - -Tabulator.prototype.registerModule("localize", Localize); \ No newline at end of file diff --git a/Gems/AssetMemoryAnalyzer/External/tabulator-master/src/js/modules/moveable_columns.js b/Gems/AssetMemoryAnalyzer/External/tabulator-master/src/js/modules/moveable_columns.js deleted file mode 100644 index 9891b8bed2..0000000000 --- a/Gems/AssetMemoryAnalyzer/External/tabulator-master/src/js/modules/moveable_columns.js +++ /dev/null @@ -1,195 +0,0 @@ -var MoveColumns = function(table){ - this.table = table; //hold Tabulator object - this.placeholderElement = this.createPlaceholderElement(); - this.hoverElement = false; //floating column header element - this.checkTimeout = false; //click check timeout holder - this.checkPeriod = 250; //period to wait on mousedown to consider this a move and not a click - this.moving = false; //currently moving column - this.toCol = false; //destination column - this.toColAfter = false; //position of moving column relative to the desitnation column - this.startX = 0; //starting position within header element - this.autoScrollMargin = 40; //auto scroll on edge when within margin - this.autoScrollStep = 5; //auto scroll distance in pixels - this.autoScrollTimeout = false; //auto scroll timeout - - this.moveHover = this.moveHover.bind(this); - this.endMove = this.endMove.bind(this); -}; - -MoveColumns.prototype.createPlaceholderElement = function(){ - var el = document.createElement("div"); - - el.classList.add("tabulator-col"); - el.classList.add("tabulator-col-placeholder"); - - return el; -}; - -MoveColumns.prototype.initializeColumn = function(column){ - var self = this, - config = {}, - colEl; - - if(!column.modules.frozen){ - - colEl = column.getElement(); - - config.mousemove = function(e){ - if(column.parent === self.moving.parent){ - if(((e.pageX - Tabulator.prototype.helpers.elOffset(colEl).left) + self.table.columnManager.element.scrollLeft) > (column.getWidth() / 2)){ - if(self.toCol !== column || !self.toColAfter){ - colEl.parentNode.insertBefore(self.placeholderElement, colEl.nextSibling); - self.moveColumn(column, true); - } - }else{ - if(self.toCol !== column || self.toColAfter){ - colEl.parentNode.insertBefore(self.placeholderElement, colEl); - self.moveColumn(column, false); - } - } - } - }.bind(self); - - colEl.addEventListener("mousedown", function(e){ - if(e.which === 1){ - self.checkTimeout = setTimeout(function(){ - self.startMove(e, column); - }, self.checkPeriod); - } - }); - - colEl.addEventListener("mouseup", function(e){ - if(e.which === 1){ - if(self.checkTimeout){ - clearTimeout(self.checkTimeout); - } - } - }); - } - - column.modules.moveColumn = config; -}; - -MoveColumns.prototype.startMove = function(e, column){ - var element = column.getElement(); - - - this.moving = column; - this.startX = e.pageX - Tabulator.prototype.helpers.elOffset(element).left; - - this.table.element.classList.add("tabulator-block-select"); - - //create placeholder - - this.placeholderElement.style.width = column.getWidth() + "px"; - this.placeholderElement.style.height = column.getHeight() + "px"; - - element.parentNode.insertBefore(this.placeholderElement, element); - element.parentNode.removeChild(element); - - //create hover element - this.hoverElement = element.cloneNode(true); - this.hoverElement.classList.add("tabulator-moving"); - - this.table.columnManager.getElement().appendChild(this.hoverElement); - - this.hoverElement.style.left = "0"; - this.hoverElement.style.bottom = "0"; - - this._bindMouseMove(); - - document.body.addEventListener("mousemove", this.moveHover); - document.body.addEventListener("mouseup", this.endMove); - - this.moveHover(e); -}; - -MoveColumns.prototype._bindMouseMove = function(){ - this.table.columnManager.columnsByIndex.forEach(function(column){ - if(column.modules.moveColumn.mousemove){ - column.getElement().addEventListener("mousemove", column.modules.moveColumn.mousemove); - } - }); -}; - -MoveColumns.prototype._unbindMouseMove = function(){ - this.table.columnManager.columnsByIndex.forEach(function(column){ - if(column.modules.moveColumn.mousemove){ - column.getElement().removeEventListener("mousemove", column.modules.moveColumn.mousemove); - } - }); -}; - -MoveColumns.prototype.moveColumn = function(column, after){ - var movingCells = this.moving.getCells(); - - this.toCol = column; - this.toColAfter = after; - - if(after){ - column.getCells().forEach(function(cell, i){ - var cellEl = cell.getElement(); - cellEl.parentNode.insertBefore(movingCells[i].getElement(), cellEl.nextSibling); - }); - }else{ - column.getCells().forEach(function(cell, i){ - var cellEl = cell.getElement(); - cellEl.parentNode.insertBefore(movingCells[i].getElement(), cellEl); - }); - } -}; - -MoveColumns.prototype.endMove = function(e){ - if(e.which === 1){ - this._unbindMouseMove(); - - this.placeholderElement.parentNode.insertBefore(this.moving.getElement(), this.placeholderElement.nextSibling); - this.placeholderElement.parentNode.removeChild(this.placeholderElement); - this.hoverElement.parentNode.removeChild(this.hoverElement); - - this.table.element.classList.remove("tabulator-block-select"); - - if(this.toCol){ - this.table.columnManager.moveColumn(this.moving, this.toCol, this.toColAfter); - } - - this.moving = false; - this.toCol = false; - this.toColAfter = false; - - document.body.removeEventListener("mousemove", this.moveHover); - document.body.removeEventListener("mouseup", this.endMove); - } -}; - -MoveColumns.prototype.moveHover = function(e){ - var self = this, - columnHolder = self.table.columnManager.getElement(), - scrollLeft = columnHolder.scrollLeft, - xPos = (e.pageX - Tabulator.prototype.helpers.elOffset(columnHolder).left) + scrollLeft, - scrollPos; - - self.hoverElement.style.left = (xPos - self.startX) + "px"; - - if(xPos - scrollLeft < self.autoScrollMargin){ - if(!self.autoScrollTimeout){ - self.autoScrollTimeout = setTimeout(function(){ - scrollPos = Math.max(0,scrollLeft-5); - self.table.rowManager.getElement().scrollLeft = scrollPos; - self.autoScrollTimeout = false; - }, 1); - } - } - - if(scrollLeft + columnHolder.clientWidth - xPos < self.autoScrollMargin){ - if(!self.autoScrollTimeout){ - self.autoScrollTimeout = setTimeout(function(){ - scrollPos = Math.min(columnHolder.clientWidth, scrollLeft+5); - self.table.rowManager.getElement().scrollLeft = scrollPos; - self.autoScrollTimeout = false; - }, 1); - } - } -}; - -Tabulator.prototype.registerModule("moveColumn", MoveColumns); \ No newline at end of file diff --git a/Gems/AssetMemoryAnalyzer/External/tabulator-master/src/js/modules/moveable_rows.js b/Gems/AssetMemoryAnalyzer/External/tabulator-master/src/js/modules/moveable_rows.js deleted file mode 100644 index 2477e6fdd3..0000000000 --- a/Gems/AssetMemoryAnalyzer/External/tabulator-master/src/js/modules/moveable_rows.js +++ /dev/null @@ -1,460 +0,0 @@ -var MoveRows = function(table){ - - this.table = table; //hold Tabulator object - this.placeholderElement = this.createPlaceholderElement(); - this.hoverElement = false; //floating row header element - this.checkTimeout = false; //click check timeout holder - this.checkPeriod = 150; //period to wait on mousedown to consider this a move and not a click - this.moving = false; //currently moving row - this.toRow = false; //destination row - this.toRowAfter = false; //position of moving row relative to the desitnation row - this.hasHandle = false; //row has handle instead of fully movable row - this.startY = 0; //starting Y position within header element - this.startX = 0; //starting X position within header element - - this.moveHover = this.moveHover.bind(this); - this.endMove = this.endMove.bind(this); - this.tableRowDropEvent = false; - - this.connection = false; - this.connections = []; - - this.connectedTable = false; - this.connectedRow = false; -}; - -MoveRows.prototype.createPlaceholderElement = function(){ - var el = document.createElement("div"); - - el.classList.add("tabulator-row"); - el.classList.add("tabulator-row-placeholder"); - - return el; -}; - - -MoveRows.prototype.initialize = function(handle){ - this.connection = this.table.options.movableRowsConnectedTables; -}; - -MoveRows.prototype.setHandle = function(handle){ - this.hasHandle = handle; -}; - -MoveRows.prototype.initializeRow = function(row){ - var self = this, - config = {}, - rowEl; - - //inter table drag drop - config.mouseup = function(e){ - self.tableRowDrop(e, row); - }.bind(self); - - //same table drag drop - config.mousemove = function(e){ - if(((e.pageY - Tabulator.prototype.helpers.elOffset(row.element).top) + self.table.rowManager.element.scrollTop) > (row.getHeight() / 2)){ - if(self.toRow !== row || !self.toRowAfter){ - var rowEl = row.getElement(); - rowEl.parentNode.insertBefore(self.placeholderElement, rowEl.nextSibling); - self.moveRow(row, true); - } - }else{ - if(self.toRow !== row || self.toRowAfter){ - var rowEl = row.getElement(); - rowEl.parentNode.insertBefore(self.placeholderElement, rowEl); - self.moveRow(row, false); - } - } - }.bind(self); - - - if(!this.hasHandle){ - - rowEl = row.getElement(); - - rowEl.addEventListener("mousedown", function(e){ - if(e.which === 1){ - self.checkTimeout = setTimeout(function(){ - self.startMove(e, row); - }, self.checkPeriod); - } - }); - - rowEl.addEventListener("mouseup", function(e){ - if(e.which === 1){ - if(self.checkTimeout){ - clearTimeout(self.checkTimeout); - } - } - }); - } - - row.modules.moveRow = config; -}; - -MoveRows.prototype.initializeCell = function(cell){ - var self = this, - cellEl = cell.getElement(); - - cellEl.addEventListener("mousedown", function(e){ - if(e.which === 1){ - self.checkTimeout = setTimeout(function(){ - self.startMove(e, cell.row); - }, self.checkPeriod); - } - }); - - cellEl.addEventListener("mouseup", function(e){ - if(e.which === 1){ - if(self.checkTimeout){ - clearTimeout(self.checkTimeout); - } - } - }); -}; - -MoveRows.prototype._bindMouseMove = function(){ - var self = this; - - self.table.rowManager.getDisplayRows().forEach(function(row){ - if(row.type === "row" && row.modules.moveRow.mousemove){ - row.getElement().addEventListener("mousemove", row.modules.moveRow.mousemove); - } - }); -}; - -MoveRows.prototype._unbindMouseMove = function(){ - var self = this; - - self.table.rowManager.getDisplayRows().forEach(function(row){ - if(row.type === "row" && row.modules.moveRow.mousemove){ - row.getElement().removeEventListener("mousemove", row.modules.moveRow.mousemove); - } - }); -}; - -MoveRows.prototype.startMove = function(e, row){ - var element = row.getElement(); - - this.setStartPosition(e, row); - - this.moving = row; - - this.table.element.classList.add("tabulator-block-select"); - - //create placeholder - this.placeholderElement.style.width = row.getWidth() + "px"; - this.placeholderElement.style.height = row.getHeight() + "px"; - - if(!this.connection){ - element.parentNode.insertBefore(this.placeholderElement, element); - element.parentNode.removeChild(element); - }else{ - this.table.element.classList.add("tabulator-movingrow-sending"); - this.connectToTables(row); - } - - //create hover element - this.hoverElement = element.cloneNode(true); - this.hoverElement.classList.add("tabulator-moving"); - - if(this.connection){ - document.body.appendChild(this.hoverElement); - this.hoverElement.style.left = "0"; - this.hoverElement.style.top = "0"; - this.hoverElement.style.width = this.table.element.clientWidth + "px"; - this.hoverElement.style.whiteSpace = "nowrap"; - this.hoverElement.style.overflow = "hidden"; - this.hoverElement.style.pointerEvents = "none"; - }else{ - this.table.rowManager.getTableElement().appendChild(this.hoverElement); - - this.hoverElement.style.left = "0"; - this.hoverElement.style.top = "0"; - - this._bindMouseMove(); - } - - document.body.addEventListener("mousemove", this.moveHover); - document.body.addEventListener("mouseup", this.endMove); - - this.moveHover(e); -}; - - -MoveRows.prototype.setStartPosition = function(e, row){ - var element, position; - - element = row.getElement(); - if(this.connection){ - position = element.getBoundingClientRect(); - - this.startX = position.left - e.pageX + window.scrollX; - this.startY = position.top - e.pageY + window.scrollY; - }else{ - this.startY = (e.pageY - element.getBoundingClientRect().top); - } -}; - -MoveRows.prototype.endMove = function(e){ - if(!e || e.which === 1){ - this._unbindMouseMove(); - - if(!this.connection){ - this.placeholderElement.parentNode.insertBefore(this.moving.getElement(), this.placeholderElement.nextSibling); - this.placeholderElement.parentNode.removeChild(this.placeholderElement); - } - - this.hoverElement.parentNode.removeChild(this.hoverElement); - - this.table.element.classList.remove("tabulator-block-select"); - - if(this.toRow){ - this.table.rowManager.moveRow(this.moving, this.toRow, this.toRowAfter); - } - - this.moving = false; - this.toRow = false; - this.toRowAfter = false; - - document.body.removeEventListener("mousemove", this.moveHover); - document.body.removeEventListener("mouseup", this.endMove); - - if(this.connection){ - this.table.element.classList.remove("tabulator-movingrow-sending"); - this.disconnectFromTables(); - } - } -}; - -MoveRows.prototype.moveRow = function(row, after){ - this.toRow = row; - this.toRowAfter = after; -}; - -MoveRows.prototype.moveHover = function(e){ - if(this.connection){ - this.moveHoverConnections.call(this, e); - }else{ - this.moveHoverTable.call(this, e); - } -}; - -MoveRows.prototype.moveHoverTable = function(e){ - var rowHolder = this.table.rowManager.getElement(), - scrollTop = rowHolder.scrollTop, - yPos = (e.pageY - rowHolder.getBoundingClientRect().top) + scrollTop, - scrollPos; - - this.hoverElement.style.top = (yPos - this.startY) + "px"; -}; - - -MoveRows.prototype.moveHoverConnections = function(e){ - this.hoverElement.style.left = (this.startX + e.pageX) + "px"; - this.hoverElement.style.top = (this.startY + e.pageY) + "px"; -}; - - -//establish connection with other tables -MoveRows.prototype.connectToTables = function(row){ - var self = this, - connections = this.table.modules.comms.getConnections(this.connection); - - this.table.options.movableRowsSendingStart.call(this.table, connections); - - this.table.modules.comms.send(this.connection, "moveRow", "connect", { - row:row, - }); -}; - - -//disconnect from other tables -MoveRows.prototype.disconnectFromTables = function(){ - var self = this, - connections = this.table.modules.comms.getConnections(this.connection); - - this.table.options.movableRowsSendingStop.call(this.table, connections); - - this.table.modules.comms.send(this.connection, "moveRow", "disconnect"); -}; - - -//accept incomming connection -MoveRows.prototype.connect = function(table, row){ - var self = this; - if(!this.connectedTable){ - this.connectedTable = table; - this.connectedRow = row; - - this.table.element.classList.add("tabulator-movingrow-receiving"); - - self.table.rowManager.getDisplayRows().forEach(function(row){ - if(row.type === "row" && row.modules.moveRow && row.modules.moveRow.mouseup){ - row.getElement().addEventListener("mouseup", row.modules.moveRow.mouseup); - } - }); - - self.tableRowDropEvent = self.tableRowDrop.bind(self); - - self.table.element.addEventListener("mouseup", self.tableRowDropEvent); - - this.table.options.movableRowsReceivingStart.call(this.table, row, table); - - return true; - }else{ - console.warn("Move Row Error - Table cannot accept connection, already connected to table:", this.connectedTable); - return false; - } -}; - -//close incomming connection -MoveRows.prototype.disconnect = function(table){ - var self = this; - if(table === this.connectedTable){ - this.connectedTable = false; - this.connectedRow = false; - - this.table.element.classList.remove("tabulator-movingrow-receiving"); - - self.table.rowManager.getDisplayRows().forEach(function(row){ - if(row.type === "row" && row.modules.moveRow && row.modules.moveRow.mouseup){ - row.getElement().removeEventListener("mouseup", row.modules.moveRow.mouseup); - } - }); - - self.table.element.removeEventListener("mouseup", self.tableRowDropEvent); - - this.table.options.movableRowsReceivingStop.call(this.table, table); - }else{ - console.warn("Move Row Error - trying to disconnect from non connected table") - } -}; - -MoveRows.prototype.dropComplete = function(table, row, success){ - var sender = false; - - if(success){ - - switch(typeof this.table.options.movableRowsSender){ - case "string": - sender = this.senders[this.table.options.movableRowsSender]; - break; - - case "function": - sender = this.table.options.movableRowsSender; - break; - } - - if(sender){ - sender.call(this, this.moving.getComponent(), row ? row.getComponent() : undefined, table) - }else{ - if(this.table.options.movableRowsSender){ - console.warn("Mover Row Error - no matching sender found:", this.table.options.movableRowsSender); - } - } - - this.table.options.movableRowsSent.call(this.table, this.moving.getComponent(), row ? row.getComponent() : undefined, table); - - }else{ - this.table.options.movableRowsSentFailed.call(this.table, this.moving.getComponent(), row ? row.getComponent() : undefined, table); - } - - this.endMove(); - -}; - - -MoveRows.prototype.tableRowDrop = function(e, row){ - var receiver = false, - success = false; - - e.stopImmediatePropagation(); - - switch(typeof this.table.options.movableRowsReceiver){ - case "string": - receiver = this.receivers[this.table.options.movableRowsReceiver]; - break; - - case "function": - receiver = this.table.options.movableRowsReceiver; - break; - } - - if(receiver){ - success = receiver.call(this, this.connectedRow.getComponent(), row ? row.getComponent() : undefined, this.connectedTable) - }else{ - console.warn("Mover Row Error - no matching receiver found:", this.table.options.movableRowsReceiver) - } - - if(success){ - this.table.options.movableRowsReceived.call(this.table, this.connectedRow.getComponent(), row ? row.getComponent() : undefined, this.connectedTable); - }else{ - this.table.options.movableRowsReceivedFailed.call(this.table, this.connectedRow.getComponent(), row ? row.getComponent() : undefined, this.connectedTable); - } - - this.table.modules.comms.send(this.connectedTable, "moveRow", "dropcomplete", { - row:row, - success:success, - }); -}; - - - -MoveRows.prototype.receivers = { - insert:function(fromRow, toRow, fromTable){ - this.table.addRow(fromRow.getData(), undefined, toRow); - return true; - }, - - add:function(fromRow, toRow, fromTable){ - this.table.addRow(fromRow.getData()); - return true; - }, - - update:function(fromRow, toRow, fromTable){ - if(toRow){ - toRow.update(fromRow.getData()); - return true; - } - - return false; - }, - - replace:function(fromRow, toRow, fromTable){ - if(toRow){ - this.table.addRow(fromRow.getData(), undefined, toRow); - toRow.delete(); - return true; - } - - return false; - }, -}; - -MoveRows.prototype.senders = { - delete:function(fromRow, toRow, toTable){ - fromRow.delete(); - } -}; - - -MoveRows.prototype.commsReceived = function(table, action, data){ - switch(action){ - case "connect": - return this.connect(table, data.row); - break; - - case "disconnect": - return this.disconnect(table); - break; - - case "dropcomplete": - return this.dropComplete(table, data.row, data.success); - break; - } -}; - - -Tabulator.prototype.registerModule("moveRow", MoveRows); \ No newline at end of file diff --git a/Gems/AssetMemoryAnalyzer/External/tabulator-master/src/js/modules/mutator.js b/Gems/AssetMemoryAnalyzer/External/tabulator-master/src/js/modules/mutator.js deleted file mode 100644 index b6044ba5aa..0000000000 --- a/Gems/AssetMemoryAnalyzer/External/tabulator-master/src/js/modules/mutator.js +++ /dev/null @@ -1,110 +0,0 @@ -var Mutator = function(table){ - this.table = table; //hold Tabulator object - this.allowedTypes = ["", "data", "edit", "clipboard"]; //list of muatation types - this.enabled = true; -}; - -//initialize column mutator -Mutator.prototype.initializeColumn = function(column){ - var self = this, - match = false, - config = {}; - - this.allowedTypes.forEach(function(type){ - var key = "mutator" + (type.charAt(0).toUpperCase() + type.slice(1)), - mutator; - - if(column.definition[key]){ - mutator = self.lookupMutator(column.definition[key]); - - if(mutator){ - match = true; - - config[key] = { - mutator:mutator, - params: column.definition[key + "Params"] || {}, - }; - } - } - }); - - if(match){ - column.modules.mutate = config; - } -}; - -Mutator.prototype.lookupMutator = function(value){ - var mutator = false; - - //set column mutator - switch(typeof value){ - case "string": - if(this.mutators[value]){ - mutator = this.mutators[value]; - }else{ - console.warn("Mutator Error - No such mutator found, ignoring: ", value); - } - break; - - case "function": - mutator = value; - break; - } - - return mutator; -}; - -//apply mutator to row -Mutator.prototype.transformRow = function(data, type, update){ - var self = this, - key = "mutator" + (type.charAt(0).toUpperCase() + type.slice(1)), - value; - - if(this.enabled){ - - self.table.columnManager.traverse(function(column){ - var mutator, params, component; - - if(column.modules.mutate){ - mutator = column.modules.mutate[key] || column.modules.mutate.mutator || false; - - if(mutator){ - value = column.getFieldValue(data); - - if(!update || (update && typeof value !== "undefined")){ - component = column.getComponent(); - params = typeof mutator.params === "function" ? mutator.params(value, data, type, component) : mutator.params; - column.setFieldValue(data, mutator.mutator(value, data, type, params, component)); - } - } - } - }); - } - - return data; -}; - -//apply mutator to new cell value -Mutator.prototype.transformCell = function(cell, value){ - var mutator = cell.column.modules.mutate.mutatorEdit || cell.column.modules.mutate.mutator || false; - - if(mutator){ - return mutator.mutator(value, cell.row.getData(), "edit", mutator.params, cell.getComponent()); - }else{ - return value; - } -}; - -Mutator.prototype.enable = function(){ - this.enabled = true; -}; - -Mutator.prototype.disable = function(){ - this.enabled = false; -}; - - -//default mutators -Mutator.prototype.mutators = {}; - -Tabulator.prototype.registerModule("mutator", Mutator); \ No newline at end of file diff --git a/Gems/AssetMemoryAnalyzer/External/tabulator-master/src/js/modules/page.js b/Gems/AssetMemoryAnalyzer/External/tabulator-master/src/js/modules/page.js deleted file mode 100644 index 5ff005f2f2..0000000000 --- a/Gems/AssetMemoryAnalyzer/External/tabulator-master/src/js/modules/page.js +++ /dev/null @@ -1,532 +0,0 @@ -var Page = function(table){ - - this.table = table; //hold Tabulator object - - this.mode = "local"; - this.progressiveLoad = false; - - this.size = 0; - this.page = 1; - this.count = 5; - this.max = 1; - - this.displayIndex = 0; //index in display pipeline - - this.createElements(); -}; - -Page.prototype.createElements = function(){ - - var button; - - this.element = document.createElement("span"); - this.element.classList.add("tabulator-paginator"); - - this.pagesElement = document.createElement("span"); - this.pagesElement.classList.add("tabulator-pages"); - - button = document.createElement("button"); - button.classList.add("tabulator-page"); - button.setAttribute("type", "button"); - button.setAttribute("role", "button"); - button.setAttribute("aria-label", ""); - button.setAttribute("title", ""); - - this.firstBut = button.cloneNode(true); - this.firstBut.setAttribute("data-page", "first"); - - this.prevBut = button.cloneNode(true); - this.prevBut.setAttribute("data-page", "prev"); - - this.nextBut = button.cloneNode(true); - this.nextBut.setAttribute("data-page", "next"); - - this.lastBut = button.cloneNode(true); - this.lastBut.setAttribute("data-page", "last"); -}; - -//setup pageination -Page.prototype.initialize = function(hidden){ - var self = this; - - //update param names - for(let key in self.table.options.paginationDataSent){ - self.paginationDataSentNames[key] = self.table.options.paginationDataSent[key]; - } - - for(let key in self.table.options.paginationDataReceived){ - self.paginationDataReceivedNames[key] = self.table.options.paginationDataReceived[key]; - } - - //build pagination element - - //bind localizations - self.table.modules.localize.bind("pagination|first", function(value){ - self.firstBut.innerHTML = value; - }); - - self.table.modules.localize.bind("pagination|first_title", function(value){ - self.firstBut.setAttribute("aria-label", value); - self.firstBut.setAttribute("title", value); - }); - - self.table.modules.localize.bind("pagination|prev", function(value){ - self.prevBut.innerHTML = value; - }); - - self.table.modules.localize.bind("pagination|prev_title", function(value){ - self.prevBut.setAttribute("aria-label", value); - self.prevBut.setAttribute("title", value); - }); - - self.table.modules.localize.bind("pagination|next", function(value){ - self.nextBut.innerHTML = value; - }); - - self.table.modules.localize.bind("pagination|next_title", function(value){ - self.nextBut.setAttribute("aria-label", value); - self.nextBut.setAttribute("title", value); - }); - - self.table.modules.localize.bind("pagination|last", function(value){ - self.lastBut.innerHTML = value; - }); - - self.table.modules.localize.bind("pagination|last_title", function(value){ - self.lastBut.setAttribute("aria-label", value); - self.lastBut.setAttribute("title", value); - }); - - //click bindings - self.firstBut.addEventListener("click", function(){ - self.setPage(1); - }); - - self.prevBut.addEventListener("click", function(){ - self.previousPage(); - }); - - self.nextBut.addEventListener("click", function(){ - self.nextPage().then(()=>{}).catch(()=>{}); - }); - - self.lastBut.addEventListener("click", function(){ - self.setPage(self.max); - }); - - if(self.table.options.paginationElement){ - self.element = self.table.options.paginationElement; - } - - //append to DOM - self.element.appendChild(self.firstBut); - self.element.appendChild(self.prevBut); - self.element.appendChild(self.pagesElement); - self.element.appendChild(self.nextBut); - self.element.appendChild(self.lastBut); - - if(!self.table.options.paginationElement && !hidden){ - self.table.footerManager.append(self.element, self); - } - - //set default values - self.mode = self.table.options.pagination; - self.size = self.table.options.paginationSize || Math.floor(self.table.rowManager.getElement().clientHeight / 24); - self.count = self.table.options.paginationButtonCount; -}; - -Page.prototype.initializeProgressive = function(mode){ - this.initialize(true); - this.mode = "progressive_" + mode; - this.progressiveLoad = true; -}; - -Page.prototype.setDisplayIndex = function(index){ - this.displayIndex = index; -}; - -Page.prototype.getDisplayIndex = function(){ - return this.displayIndex; -}; - - -//calculate maximum page from number of rows -Page.prototype.setMaxRows = function(rowCount){ - if(!rowCount){ - this.max = 1; - }else{ - this.max = Math.ceil(rowCount/this.size); - } - - if(this.page > this.max){ - this.page = this.max; - } -}; - -//reset to first page without triggering action -Page.prototype.reset = function(force){ - if(this.mode == "local" || force){ - this.page = 1; - } - return true; -}; - -//set the maxmum page -Page.prototype.setMaxPage = function(max){ - this.max = max || 1; - - if(this.page > this.max){ - this.page = this.max; - this.trigger(); - } -}; - -//set current page number -Page.prototype.setPage = function(page){ - return new Promise((resolve, reject)=>{ - if(page > 0 && page <= this.max){ - this.page = page; - this.trigger() - .then(()=>{ - resolve(); - }) - .catch(()=>{ - reject(); - }); - }else{ - console.warn("Pagination Error - Requested page is out of range of 1 - " + this.max + ":", page); - reject(); - } - }); -}; - -Page.prototype.setPageSize = function(size){ - if(size > 0){ - this.size = size; - } -}; - - -//setup the pagination buttons -Page.prototype._setPageButtons = function(){ - var self = this; - - let leftSize = Math.floor((this.count-1) / 2); - let rightSize = Math.ceil((this.count-1) / 2); - let min = this.max - this.page + leftSize + 1 < this.count ? this.max-this.count+1: Math.max(this.page-leftSize,1); - let max = this.page <= rightSize? Math.min(this.count, this.max) :Math.min(this.page+rightSize, this.max); - - while(self.pagesElement.firstChild) self.pagesElement.removeChild(self.pagesElement.firstChild); - - if(self.page == 1){ - self.firstBut.disabled = true; - self.prevBut.disabled = true; - }else{ - self.firstBut.disabled = false; - self.prevBut.disabled = false; - } - - if(self.page == self.max){ - self.lastBut.disabled = true; - self.nextBut.disabled = true; - }else{ - self.lastBut.disabled = false; - self.nextBut.disabled = false; - } - - for(let i = min; i <= max; i++){ - if(i>0 && i <= self.max){ - self.pagesElement.appendChild(self._generatePageButton(i)); - } - } - - this.footerRedraw(); -}; - -Page.prototype._generatePageButton = function(page){ - var self = this, - button = document.createElement("button"); - - button.classList.add("tabulator-page"); - if(page == self.page){ - button.classList.add("active"); - } - - button.setAttribute("type", "button"); - button.setAttribute("role", "button"); - button.setAttribute("aria-label", "Show Page " + page); - button.setAttribute("title", "Show Page " + page); - button.setAttribute("data-page", page); - button.textContent = page; - - button.addEventListener("click", function(e){ - self.setPage(page); - }); - - return button; -}; - -//previous page -Page.prototype.previousPage = function(){ - return new Promise((resolve, reject)=>{ - if(this.page > 1){ - this.page--; - this.trigger() - .then(()=>{ - resolve(); - }) - .catch(()=>{ - reject(); - }); - }else{ - console.warn("Pagination Error - Previous page would be less than page 1:", 0); - reject() - } - }); -}; - -//next page -Page.prototype.nextPage = function(){ - return new Promise((resolve, reject)=>{ - if(this.page < this.max){ - this.page++; - this.trigger() - .then(()=>{ - resolve(); - }) - .catch(()=>{ - reject(); - }); - }else{ - if(!this.progressiveLoad){ - console.warn("Pagination Error - Next page would be greater than maximum page of " + this.max + ":", this.max + 1); - } - reject(); - } - }); -}; - -//return current page number -Page.prototype.getPage = function(){ - return this.page; -}; - -//return max page number -Page.prototype.getPageMax = function(){ - return this.max; -}; - -Page.prototype.getPageSize = function(size){ - return this.size; -}; - -Page.prototype.getMode = function(){ - return this.mode; -}; - -//return appropriate rows for current page -Page.prototype.getRows = function(data){ - var output, start, end; - - if(this.mode == "local"){ - output = []; - start = this.size * (this.page - 1); - end = start + parseInt(this.size); - - this._setPageButtons(); - - for(let i = start; i < end; i++){ - if(data[i]){ - output.push(data[i]); - } - } - - return output; - }else{ - - this._setPageButtons(); - - return data.slice(0); - } -}; - -Page.prototype.trigger = function(){ - var left; - - return new Promise((resolve, reject)=>{ - - switch(this.mode){ - case "local": - left = this.table.rowManager.scrollLeft; - - this.table.rowManager.refreshActiveData("page"); - this.table.rowManager.scrollHorizontal(left); - - this.table.options.pageLoaded.call(this.table, this.getPage()); - resolve(); - break; - - case "remote": - case "progressive_load": - case "progressive_scroll": - this.table.modules.ajax.blockActiveRequest(); - this._getRemotePage() - .then(()=>{ - resolve(); - }) - .catch(()=>{ - reject(); - }); - break; - - default: - console.warn("Pagination Error - no such pagination mode:", this.mode); - reject(); - } - }); -}; - -Page.prototype._getRemotePage = function(){ - var self = this, - oldParams, pageParams; - - - return new Promise((resolve, reject)=>{ - - if(!self.table.modExists("ajax", true)){ - reject() - } - - //record old params and restore after request has been made - oldParams = Tabulator.prototype.helpers.deepClone(self.table.modules.ajax.getParams() || {}); - pageParams = self.table.modules.ajax.getParams(); - - //configure request params - pageParams[this.paginationDataSentNames.page] = self.page; - - //set page size if defined - if(this.size){ - pageParams[this.paginationDataSentNames.size] = this.size; - } - - //set sort data if defined - if(this.table.options.ajaxSorting && this.table.modExists("sort")){ - let sorters = self.table.modules.sort.getSort(); - - sorters.forEach(function(item){ - delete item.column; - }); - - pageParams[this.paginationDataSentNames.sorters] = sorters; - } - - //set filter data if defined - if(this.table.options.ajaxFiltering && this.table.modExists("filter")){ - let filters = self.table.modules.filter.getFilters(true, true); - pageParams[this.paginationDataSentNames.filters] = filters; - } - - self.table.modules.ajax.setParams(pageParams); - - self.table.modules.ajax.sendRequest(this.progressiveLoad) - .then((data)=>{ - self._parseRemoteData(data); - resolve(); - }) - .catch((e)=>{reject()}); - - self.table.modules.ajax.setParams(oldParams); - }); -}; - - - -Page.prototype._parseRemoteData = function(data){ - var self = this, - left, data, margin; - - if(typeof data[this.paginationDataReceivedNames.last_page] === "undefined"){ - console.warn("Remote Pagination Error - Server response missing '" + this.paginationDataReceivedNames.last_page + "' property"); - } - - if(data[this.paginationDataReceivedNames.data]){ - this.max = parseInt(data[this.paginationDataReceivedNames.last_page]) || 1; - - if(this.progressiveLoad){ - switch(this.mode){ - case "progressive_load": - this.table.rowManager.addRows(data[this.paginationDataReceivedNames.data]); - if(this.page < this.max){ - setTimeout(function(){ - self.nextPage().then(()=>{}).catch(()=>{}); - }, self.table.options.ajaxProgressiveLoadDelay); - } - break; - - case "progressive_scroll": - data = this.table.rowManager.getData().concat(data[this.paginationDataReceivedNames.data]); - - this.table.rowManager.setData(data, true); - - margin = this.table.options.ajaxProgressiveLoadScrollMargin || (this.table.rowManager.element.clientHeight * 2); - - if(self.table.rowManager.element.scrollHeight <= (self.table.rowManager.element.clientHeight + margin)){ - self.nextPage().then(()=>{}).catch(()=>{}); - } - break; - } - }else{ - left = this.table.rowManager.scrollLeft; - - this.table.rowManager.setData(data[this.paginationDataReceivedNames.data]); - - this.table.rowManager.scrollHorizontal(left); - - this.table.columnManager.scrollHorizontal(left); - - this.table.options.pageLoaded.call(this.table, this.getPage()); - } - - }else{ - console.warn("Remote Pagination Error - Server response missing '" + this.paginationDataReceivedNames.data + "' property"); - } - -}; - - - - -//handle the footer element being redrawn -Page.prototype.footerRedraw = function(){ - var footer = this.table.footerManager.element; - - if((Math.ceil(footer.clientWidth) - footer.scrollWidth) < 0){ - this.pagesElement.style.display = 'none'; - }else{ - this.pagesElement.style.display = ''; - - if((Math.ceil(footer.clientWidth) - footer.scrollWidth) < 0){ - this.pagesElement.style.display = 'none'; - } - } -}; - -//set the paramter names for pagination requests -Page.prototype.paginationDataSentNames = { - "page":"page", - "size":"size", - "sorters":"sorters", - // "sort_dir":"sort_dir", - "filters":"filters", - // "filter_value":"filter_value", - // "filter_type":"filter_type", -}; - -//set the property names for pagination responses -Page.prototype.paginationDataReceivedNames = { - "current_page":"current_page", - "last_page":"last_page", - "data":"data", -}; - -Tabulator.prototype.registerModule("page", Page); diff --git a/Gems/AssetMemoryAnalyzer/External/tabulator-master/src/js/modules/persistence.js b/Gems/AssetMemoryAnalyzer/External/tabulator-master/src/js/modules/persistence.js deleted file mode 100644 index 41baf9ada3..0000000000 --- a/Gems/AssetMemoryAnalyzer/External/tabulator-master/src/js/modules/persistence.js +++ /dev/null @@ -1,208 +0,0 @@ -var Persistence = function(table){ - this.table = table; //hold Tabulator object - this.mode = ""; - this.id = ""; - this.persistProps = ["field", "width", "visible"]; -}; - -//setup parameters -Persistence.prototype.initialize = function(mode, id){ - //determine persistent layout storage type - this.mode = mode !== true ? mode : (typeof window.localStorage !== 'undefined' ? "local" : "cookie"); - - //set storage tag - this.id = "tabulator-" + (id || (this.table.element.getAttribute("id") || "")); -}; - -//load saved definitions -Persistence.prototype.load = function(type, current){ - - var data = this.retreiveData(type); - - if(current){ - data = data ? this.mergeDefinition(current, data) : current; - } - - return data; -}; - -//retreive data from memory -Persistence.prototype.retreiveData = function(type){ - var data = "", - id = this.id + (type === "columns" ? "" : "-" + type); - - switch(this.mode){ - case "local": - data = localStorage.getItem(id); - break; - - case "cookie": - - //find cookie - let cookie = document.cookie, - cookiePos = cookie.indexOf(id + "="), - end; - - //if cookie exists, decode and load column data into tabulator - if(cookiePos > -1){ - cookie = cookie.substr(cookiePos); - - end = cookie.indexOf(";"); - - if(end > -1){ - cookie = cookie.substr(0, end); - } - - data = cookie.replace(id + "=", ""); - } - break; - - default: - console.warn("Persistance Load Error - invalid mode selected", this.mode); - } - - return data ? JSON.parse(data) : false; -}; - -//merge old and new column defintions -Persistence.prototype.mergeDefinition = function(oldCols, newCols){ - var self = this, - output = []; - - // oldCols = oldCols || []; - newCols = newCols || []; - - newCols.forEach(function(column, to){ - - var from = self._findColumn(oldCols, column); - - if(from){ - - from.width = column.width; - from.visible = column.visible; - - if(from.columns){ - from.columns = self.mergeDefinition(from.columns, column.columns); - } - - output.push(from); - } - - }); - oldCols.forEach(function (column, i) { - var from = self._findColumn(newCols, column); - if (!from) { - if(output.length>i){ - output.splice(i, 0, column); - }else{ - output.push(column); - } - } - }); - - return output; -}; - -//find matching columns -Persistence.prototype._findColumn = function(columns, subject){ - var type = subject.columns ? "group" : (subject.field ? "field" : "object"); - - return columns.find(function(col){ - switch(type){ - case "group": - return col.title === subject.title && col.columns.length === subject.columns.length; - break; - - case "field": - return col.field === subject.field; - break; - - case "object": - return col === subject; - break; - } - }); -}; - -//save data -Persistence.prototype.save = function(type){ - var data = {}; - - - switch(type){ - case "columns": - data = this.parseColumns(this.table.columnManager.getColumns()) - break; - - case "filter": - data = this.table.modules.filter.getFilters(); - break; - - case "sort": - data = this.validateSorters(this.table.modules.sort.getSort()); - break; - } - - var id = this.id + (type === "columns" ? "" : "-" + type); - - this.saveData(id, data); -}; - -//ensure sorters contain no function data -Persistence.prototype.validateSorters = function(data){ - data.forEach(function(item){ - item.column = item.field; - delete item.field; - }); - - return data; -}; - -//save data to chosed medium -Persistence.prototype.saveData = function(id, data){ - - data = JSON.stringify(data); - - switch(this.mode){ - case "local": - localStorage.setItem(id, data); - break; - - case "cookie": - let expireDate = new Date(); - expireDate.setDate(expireDate.getDate() + 10000); - - //save cookie - document.cookie = id + "=" + data + "; expires=" + expireDate.toUTCString(); - break; - - default: - console.warn("Persistance Save Error - invalid mode selected", this.mode); - } -}; - -//build premission list -Persistence.prototype.parseColumns = function(columns){ - var self = this, - definitions = []; - - columns.forEach(function(column){ - var def = {}; - - if(column.isGroup){ - def.title = column.getDefinition().title; - def.columns = self.parseColumns(column.getColumns()); - }else{ - def.title = column.getDefinition().title; - def.field = column.getField(); - def.width = column.getWidth(); - def.visible = column.visible; - } - - definitions.push(def); - }); - - return definitions; -}; - -Tabulator.prototype.registerModule("persistence", Persistence); diff --git a/Gems/AssetMemoryAnalyzer/External/tabulator-master/src/js/modules/resize_columns.js b/Gems/AssetMemoryAnalyzer/External/tabulator-master/src/js/modules/resize_columns.js deleted file mode 100644 index a74f101fec..0000000000 --- a/Gems/AssetMemoryAnalyzer/External/tabulator-master/src/js/modules/resize_columns.js +++ /dev/null @@ -1,147 +0,0 @@ -var ResizeColumns = function(table){ - this.table = table; //hold Tabulator object - this.startColumn = false; - this.startX = false; - this.startWidth = false; - this.handle = null; - this.prevHandle = null; -}; - -ResizeColumns.prototype.initializeColumn = function(type, column, element){ - var self = this, - variableHeight =false, - mode = this.table.options.resizableColumns; - - //set column resize mode - if(type === "header"){ - variableHeight = column.definition.formatter == "textarea" || column.definition.variableHeight; - column.modules.resize = {variableHeight:variableHeight}; - } - - if(mode === true || mode == type){ - - var handle = document.createElement('div'); - handle.className = "tabulator-col-resize-handle"; - - - var prevHandle = document.createElement('div'); - prevHandle.className = "tabulator-col-resize-handle prev"; - - handle.addEventListener("click", function(e){ - e.stopPropagation(); - }); - - handle.addEventListener("mousedown", function(e){ - var nearestColumn = column.getLastColumn(); - - if(nearestColumn && self._checkResizability(nearestColumn)){ - self.startColumn = column; - self._mouseDown(e, nearestColumn); - } - }); - - //reszie column on double click - handle.addEventListener("dblclick", function(e){ - if(self._checkResizability(column)){ - column.reinitializeWidth(true); - } - }); - - - prevHandle.addEventListener("click", function(e){ - e.stopPropagation(); - }); - - prevHandle.addEventListener("mousedown", function(e){ - var nearestColumn, colIndex, prevColumn; - - nearestColumn = column.getFirstColumn(); - - if(nearestColumn){ - colIndex = self.table.columnManager.findColumnIndex(nearestColumn); - prevColumn = colIndex > 0 ? self.table.columnManager.getColumnByIndex(colIndex - 1) : false; - - if(prevColumn && self._checkResizability(prevColumn)){ - self.startColumn = column; - self._mouseDown(e, prevColumn); - } - } - }); - - //resize column on double click - prevHandle.addEventListener("dblclick", function(e){ - var nearestColumn, colIndex, prevColumn; - - nearestColumn = column.getFirstColumn(); - - if(nearestColumn){ - colIndex = self.table.columnManager.findColumnIndex(nearestColumn); - prevColumn = colIndex > 0 ? self.table.columnManager.getColumnByIndex(colIndex - 1) : false; - - if(prevColumn && self._checkResizability(prevColumn)){ - prevColumn.reinitializeWidth(true); - } - } - }); - - element.appendChild(handle); - element.appendChild(prevHandle); - } -}; - - -ResizeColumns.prototype._checkResizability = function(column){ - return typeof column.definition.resizable != "undefined" ? column.definition.resizable : this.table.options.resizableColumns; -}; - -ResizeColumns.prototype._mouseDown = function(e, column){ - var self = this; - - self.table.element.classList.add("tabulator-block-select"); - - function mouseMove(e){ - column.setWidth(self.startWidth + (e.screenX - self.startX)); - - if(!self.table.browserSlow && column.modules.resize && column.modules.resize.variableHeight){ - column.checkCellHeights(); - } - } - - function mouseUp(e){ - - //block editor from taking action while resizing is taking place - if(self.startColumn.modules.edit){ - self.startColumn.modules.edit.blocked = false; - } - - if(self.table.browserSlow && column.modules.resize && column.modules.resize.variableHeight){ - column.checkCellHeights(); - } - - document.body.removeEventListener("mouseup", mouseUp); - document.body.removeEventListener("mousemove", mouseMove); - - self.table.element.classList.remove("tabulator-block-select"); - - if(self.table.options.persistentLayout && self.table.modExists("persistence", true)){ - self.table.modules.persistence.save("columns"); - } - - self.table.options.columnResized.call(self.table, self.startColumn.getComponent()); - } - - e.stopPropagation(); //prevent resize from interfereing with movable columns - - //block editor from taking action while resizing is taking place - if(self.startColumn.modules.edit){ - self.startColumn.modules.edit.blocked = true; - } - - self.startX = e.screenX; - self.startWidth = column.getWidth(); - - document.body.addEventListener("mousemove", mouseMove); - document.body.addEventListener("mouseup", mouseUp); -}; - -Tabulator.prototype.registerModule("resizeColumns", ResizeColumns); \ No newline at end of file diff --git a/Gems/AssetMemoryAnalyzer/External/tabulator-master/src/js/modules/resize_rows.js b/Gems/AssetMemoryAnalyzer/External/tabulator-master/src/js/modules/resize_rows.js deleted file mode 100644 index d95b313eb7..0000000000 --- a/Gems/AssetMemoryAnalyzer/External/tabulator-master/src/js/modules/resize_rows.js +++ /dev/null @@ -1,85 +0,0 @@ -var ResizeRows = function(table){ - this.table = table; //hold Tabulator object - this.startColumn = false; - this.startY = false; - this.startHeight = false; - this.handle = null; - this.prevHandle = null; -}; - -ResizeRows.prototype.initializeRow = function(row){ - var self = this, - rowEl = row.getElement(); - - var handle = document.createElement('div'); - handle.className = "tabulator-row-resize-handle"; - - var prevHandle = document.createElement('div'); - prevHandle.className = "tabulator-row-resize-handle prev"; - - handle.addEventListener("click", function(e){ - e.stopPropagation(); - }); - - handle.addEventListener("mousedown", function(e){ - self.startRow = row; - self._mouseDown(e, row); - }); - - prevHandle.addEventListener("click", function(e){ - e.stopPropagation(); - }); - - prevHandle.addEventListener("mousedown", function(e){ - var prevRow = self.table.rowManager.prevDisplayRow(row); - - if(prevRow){ - self.startRow = prevRow; - self._mouseDown(e, prevRow); - } - }); - - rowEl.appendChild(handle); - rowEl.appendChild(prevHandle); -}; - -ResizeRows.prototype._mouseDown = function(e, row){ - var self = this; - - self.table.element.classList.add("tabulator-block-select"); - - function mouseMove(e){ - row.setHeight(self.startHeight + (e.screenY - self.startY)); - } - - function mouseUp(e){ - - // //block editor from taking action while resizing is taking place - // if(self.startColumn.modules.edit){ - // self.startColumn.modules.edit.blocked = false; - // } - - document.body.removeEventListener("mouseup", mouseMove); - document.body.removeEventListener("mousemove", mouseMove); - - self.table.element.classList.remove("tabulator-block-select"); - - self.table.options.rowResized.call(this.table, row.getComponent()); - } - - e.stopPropagation(); //prevent resize from interfereing with movable columns - - //block editor from taking action while resizing is taking place - // if(self.startColumn.modules.edit){ - // self.startColumn.modules.edit.blocked = true; - // } - - self.startY = e.screenY; - self.startHeight = row.getHeight(); - - document.body.addEventListener("mousemove", mouseMove); - - document.body.addEventListener("mouseup", mouseUp); -}; - -Tabulator.prototype.registerModule("resizeRows", ResizeRows); \ No newline at end of file diff --git a/Gems/AssetMemoryAnalyzer/External/tabulator-master/src/js/modules/resize_table.js b/Gems/AssetMemoryAnalyzer/External/tabulator-master/src/js/modules/resize_table.js deleted file mode 100644 index 6c019f6043..0000000000 --- a/Gems/AssetMemoryAnalyzer/External/tabulator-master/src/js/modules/resize_table.js +++ /dev/null @@ -1,36 +0,0 @@ -var ResizeTable = function(table){ - this.table = table; //hold Tabulator object - this.binding = false; - this.observer = false; -}; - -ResizeTable.prototype.initialize = function(row){ - var table = this.table, - observer; - - if(typeof ResizeObserver !== "undefined" && table.rowManager.getRenderMode() === "virtual"){ - this.observer = new ResizeObserver(function(entry){ - table.redraw(); - }); - - this.observer.observe(table.element); - }else{ - this.binding = function(){ - table.redraw(); - }; - - window.addEventListener("resize", this.binding); - } -}; - -ResizeTable.prototype.clearBindings = function(row){ - if(this.binding){ - window.removeEventListener("resize", this.binding); - } - - if(this.observer){ - this.observer.unobserve(this.table.element); - } -}; - -Tabulator.prototype.registerModule("resizeTable", ResizeTable); \ No newline at end of file diff --git a/Gems/AssetMemoryAnalyzer/External/tabulator-master/src/js/modules/responsive_layout.js b/Gems/AssetMemoryAnalyzer/External/tabulator-master/src/js/modules/responsive_layout.js deleted file mode 100644 index db3748177f..0000000000 --- a/Gems/AssetMemoryAnalyzer/External/tabulator-master/src/js/modules/responsive_layout.js +++ /dev/null @@ -1,242 +0,0 @@ -var ResponsiveLayout = function(table){ - this.table = table; //hold Tabulator object - this.columns = []; - this.hiddenColumns = []; - this.mode = ""; - this.index = 0; - this.collapseFormatter = []; - this.collapseStartOpen = true; -}; - -//generate resposive columns list -ResponsiveLayout.prototype.initialize = function(){ - var self = this, - columns = []; - - this.mode = this.table.options.responsiveLayout; - this.collapseFormatter = this.table.options.responsiveLayoutCollapseFormatter || this.formatCollapsedData; - this.collapseStartOpen = this.table.options.responsiveLayoutCollapseStartOpen; - this.hiddenColumns = []; - - //detemine level of responsivity for each column - this.table.columnManager.columnsByIndex.forEach(function(column, i){ - if(column.modules.responsive){ - if(column.modules.responsive.order && column.modules.responsive.visible){ - column.modules.responsive.index = i; - columns.push(column); - - if(!column.visible && self.mode === "collapse"){ - self.hiddenColumns.push(column); - } - } - } - }); - - //sort list by responsivity - columns = columns.reverse(); - columns = columns.sort(function(a, b){ - var diff = b.modules.responsive.order - a.modules.responsive.order; - return diff || (b.modules.responsive.index - a.modules.responsive.index); - }); - - this.columns = columns; - - if(this.mode === "collapse"){ - this.generateCollapsedContent(); - } -}; - -//define layout information -ResponsiveLayout.prototype.initializeColumn = function(column){ - var def = column.getDefinition(); - - column.modules.responsive = {order: typeof def.responsive === "undefined" ? 1 : def.responsive, visible:def.visible === false ? false : true}; -}; - -ResponsiveLayout.prototype.layoutRow = function(row){ - var rowEl = row.getElement(), - el = document.createElement("div"); - - el.classList.add("tabulator-responsive-collapse"); - - if(!rowEl.classList.contains("tabulator-calcs")){ - row.modules.responsiveLayout = { - element:el, - }; - - if(!this.collapseStartOpen){ - el.style.display = 'none'; - } - - rowEl.appendChild(el); - - this.generateCollapsedRowContent(row); - } -}; - -//update column visibility -ResponsiveLayout.prototype.updateColumnVisibility = function(column, visible){ - var index; - if(column.modules.responsive){ - column.modules.responsive.visible = visible; - this.initialize(); - } -}; - -ResponsiveLayout.prototype.hideColumn = function(column){ - column.hide(false, true); - - if(this.mode === "collapse"){ - this.hiddenColumns.unshift(column); - this.generateCollapsedContent(); - } -}; - -ResponsiveLayout.prototype.showColumn = function(column){ - var index; - - column.show(false, true); - //set column width to prevent calculation loops on uninitialized columns - column.setWidth(column.getWidth()); - - if(this.mode === "collapse"){ - index = this.hiddenColumns.indexOf(column); - - if(index > -1){ - this.hiddenColumns.splice(index, 1); - } - - this.generateCollapsedContent(); - } -}; - -//redraw columns to fit space -ResponsiveLayout.prototype.update = function(){ - var self = this, - working = true; - - while(working){ - - let width = self.table.modules.layout.getMode() == "fitColumns" ? self.table.columnManager.getFlexBaseWidth() : self.table.columnManager.getWidth(); - - let diff = self.table.columnManager.element.clientWidth - width; - - if(diff < 0){ - //table is too wide - let column = self.columns[self.index]; - - if(column){ - self.hideColumn(column); - self.index ++; - }else{ - working = false; - } - - }else{ - - //table has spare space - let column = self.columns[self.index -1]; - - if(column){ - if(diff > 0){ - if(diff >= column.getWidth()){ - self.showColumn(column); - self.index --; - }else{ - working = false; - } - }else{ - working = false; - } - }else{ - working = false; - } - } - - if(!self.table.rowManager.activeRowsCount){ - self.table.rowManager.renderEmptyScroll(); - } - } -}; - -ResponsiveLayout.prototype.generateCollapsedContent = function(){ - var self = this, - rows = this.table.rowManager.getDisplayRows(); - - rows.forEach(function(row){ - self.generateCollapsedRowContent(row); - }); -}; - -ResponsiveLayout.prototype.generateCollapsedRowContent = function(row){ - var el, contents; - - if(row.modules.responsiveLayout){ - el = row.modules.responsiveLayout.element; - - while(el.firstChild) el.removeChild(el.firstChild); - - contents = this.collapseFormatter(this.generateCollapsedRowData(row)); - - if(contents){ - el.appendChild(contents); - } - } -}; - -ResponsiveLayout.prototype.generateCollapsedRowData = function(row){ - var self = this, - data = row.getData(), - output = {}, - mockCellComponent; - - this.hiddenColumns.forEach(function(column){ - var value = column.getFieldValue(data); - - if(column.definition.title && column.field){ - if(column.modules.format && self.table.options.responsiveLayoutCollapseUseFormatters){ - - mockCellComponent = { - value:false, - data:{}, - getValue:function(){ - return value; - }, - getData:function(){ - return data; - }, - getElement:function(){ - return document.createElement("div"); - }, - getRow:function(){ - return row.getComponent(); - }, - getColumn:function(){ - return column.getComponent(); - }, - }; - - output[column.definition.title] = column.modules.format.formatter.call(self.table.modules.format, mockCellComponent, column.modules.format.params); - }else{ - output[column.definition.title] = value; - } - } - }); - - return output; -}; - -ResponsiveLayout.prototype.formatCollapsedData = function(data){ - var list = document.createElement("table"), - listContents = ""; - - for(var key in data){ - listContents += "" + key + "" + data[key] + ""; - } - - list.innerHTML = listContents; - - return Object.keys(data).length ? list : ""; -}; - -Tabulator.prototype.registerModule("responsiveLayout", ResponsiveLayout); diff --git a/Gems/AssetMemoryAnalyzer/External/tabulator-master/src/js/modules/select_row.js b/Gems/AssetMemoryAnalyzer/External/tabulator-master/src/js/modules/select_row.js deleted file mode 100644 index 29002faebc..0000000000 --- a/Gems/AssetMemoryAnalyzer/External/tabulator-master/src/js/modules/select_row.js +++ /dev/null @@ -1,293 +0,0 @@ -var SelectRow = function(table){ - this.table = table; //hold Tabulator object - this.selecting = false; //flag selecting in progress - this.lastClickedRow = false; //last clicked row - this.selectPrev = []; //hold previously selected element for drag drop selection - this.selectedRows = []; //hold selected rows -}; - -SelectRow.prototype.clearSelectionData = function(silent){ - this.selecting = false; - this.lastClickedRow = false; - this.selectPrev = []; - this.selectedRows = []; - - if(!silent){ - this._rowSelectionChanged(); - } -}; - -SelectRow.prototype.initializeRow = function(row){ - var self = this, - element = row.getElement(); - - // trigger end of row selection - var endSelect = function(){ - - setTimeout(function(){ - self.selecting = false; - }, 50); - - document.body.removeEventListener("mouseup", endSelect); - }; - - - row.modules.select = {selected:false}; - - //set row selection class - if(self.table.options.selectableCheck.call(this.table, row.getComponent())){ - element.classList.add("tabulator-selectable"); - element.classList.remove("tabulator-unselectable"); - - if(self.table.options.selectable && self.table.options.selectable != "highlight"){ - if(self.table.options.selectableRangeMode && self.table.options.selectableRangeMode === "click"){ - element.addEventListener("click", function(e){ - if(e.shiftKey){ - self.lastClickedRow = self.lastClickedRow || row; - - var lastClickedRowIdx = self.table.rowManager.getDisplayRowIndex(self.lastClickedRow); - var rowIdx = self.table.rowManager.getDisplayRowIndex(row); - - var fromRowIdx = lastClickedRowIdx <= rowIdx ? lastClickedRowIdx : rowIdx; - var toRowIdx = lastClickedRowIdx >= rowIdx ? lastClickedRowIdx : rowIdx; - - var rows = self.table.rowManager.getDisplayRows().slice(0); - var toggledRows = rows.splice(fromRowIdx, toRowIdx - fromRowIdx + 1); - - if(e.ctrlKey){ - toggledRows.forEach(function(toggledRow){ - if(toggledRow !== self.lastClickedRow){ - self.toggleRow(toggledRow) - } - }); - self.lastClickedRow = row; - }else{ - self.deselectRows(); - self.selectRows(toggledRows); - } - } - else if(e.ctrlKey){ - self.toggleRow(row); - self.lastClickedRow = row; - }else{ - self.deselectRows(); - self.selectRows(row); - self.lastClickedRow = row; - } - }); - }else{ - element.addEventListener("click", function(e){ - if(!self.selecting){ - self.toggleRow(row); - } - }); - - element.addEventListener("mousedown", function(e){ - if(e.shiftKey){ - self.selecting = true; - - self.selectPrev = []; - - document.body.addEventListener("mouseup", endSelect); - document.body.addEventListener("keyup", endSelect); - - self.toggleRow(row); - - return false; - } - }); - - element.addEventListener("mouseenter", function(e){ - if(self.selecting){ - self.toggleRow(row); - - if(self.selectPrev[1] == row){ - self.toggleRow(self.selectPrev[0]); - } - } - }); - - element.addEventListener("mouseout", function(e){ - if(self.selecting){ - self.selectPrev.unshift(row); - } - }); - } - } - - }else{ - element.classList.add("tabulator-unselectable"); - element.classList.remove("tabulator-selectable"); - } -}; - -//toggle row selection -SelectRow.prototype.toggleRow = function(row){ - if(this.table.options.selectableCheck.call(this.table, row.getComponent())){ - if(row.modules.select.selected){ - this._deselectRow(row); - }else{ - this._selectRow(row); - } - } -}; - -//select a number of rows -SelectRow.prototype.selectRows = function(rows){ - var self = this; - - switch(typeof rows){ - case "undefined": - self.table.rowManager.rows.forEach(function(row){ - self._selectRow(row, false, true); - }); - - self._rowSelectionChanged(); - break; - - case "boolean": - if(rows === true){ - self.table.rowManager.activeRows.forEach(function(row){ - self._selectRow(row, false, true); - }); - - self._rowSelectionChanged(); - } - break; - - default: - if(Array.isArray(rows)){ - rows.forEach(function(row){ - self._selectRow(row); - }); - - self._rowSelectionChanged(); - }else{ - self._selectRow(rows); - } - break; - } -}; - -//select an individual row -SelectRow.prototype._selectRow = function(rowInfo, silent, force){ - var index; - - //handle max row count - if(!isNaN(this.table.options.selectable) && this.table.options.selectable !== true && !force){ - if(this.selectedRows.length >= this.table.options.selectable){ - if(this.table.options.selectableRollingSelection){ - this._deselectRow(this.selectedRows[0]); - }else{ - return false; - } - } - } - - var row = this.table.rowManager.findRow(rowInfo); - - if(row){ - if(this.selectedRows.indexOf(row) == -1){ - row.modules.select.selected = true; - row.getElement().classList.add("tabulator-selected"); - - this.selectedRows.push(row); - - if(!silent){ - this.table.options.rowSelected.call(this.table, row.getComponent()); - this._rowSelectionChanged(); - } - } - }else{ - if(!silent){ - console.warn("Selection Error - No such row found, ignoring selection:" + rowInfo); - } - } -}; - -SelectRow.prototype.isRowSelected = function(row){ - return this.selectedRows.indexOf(row) !== -1; -}; - -//deselect a number of rows -SelectRow.prototype.deselectRows = function(rows){ - var self = this, - rowCount; - - if(typeof rows == "undefined"){ - - rowCount = self.selectedRows.length; - - for(let i = 0; i < rowCount; i++){ - self._deselectRow(self.selectedRows[0], false); - } - - self._rowSelectionChanged(); - }else{ - if(Array.isArray(rows)){ - rows.forEach(function(row){ - self._deselectRow(row); - }); - - self._rowSelectionChanged(); - }else{ - self._deselectRow(rows); - } - } -}; - -//deselect an individual row -SelectRow.prototype._deselectRow = function(rowInfo, silent){ - var self = this, - row = self.table.rowManager.findRow(rowInfo), - index; - - if(row){ - index = self.selectedRows.findIndex(function(selectedRow){ - return selectedRow == row; - }); - - if(index > -1){ - - row.modules.select.selected = false; - row.getElement().classList.remove("tabulator-selected"); - self.selectedRows.splice(index, 1); - - if(!silent){ - self.table.options.rowDeselected.call(this.table, row.getComponent()); - self._rowSelectionChanged(); - } - } - }else{ - if(!silent){ - console.warn("Deselection Error - No such row found, ignoring selection:" + rowInfo); - } - } -}; - -SelectRow.prototype.getSelectedData = function(){ - var data = []; - - this.selectedRows.forEach(function(row){ - data.push(row.getData()); - }); - - return data; -}; - -SelectRow.prototype.getSelectedRows = function(){ - - var rows = []; - - this.selectedRows.forEach(function(row){ - rows.push(row.getComponent()); - }); - - return rows; -}; - -SelectRow.prototype._rowSelectionChanged = function(){ - this.table.options.rowSelectionChanged.call(this.table, this.getSelectedData(), this.getSelectedRows()); -}; - -Tabulator.prototype.registerModule("selectRow", SelectRow); diff --git a/Gems/AssetMemoryAnalyzer/External/tabulator-master/src/js/modules/sort.js b/Gems/AssetMemoryAnalyzer/External/tabulator-master/src/js/modules/sort.js deleted file mode 100644 index 3d36374e41..0000000000 --- a/Gems/AssetMemoryAnalyzer/External/tabulator-master/src/js/modules/sort.js +++ /dev/null @@ -1,522 +0,0 @@ -var Sort = function(table){ - this.table = table; //hold Tabulator object - this.sortList = []; //holder current sort - this.changed = false; //has the sort changed since last render - }; - -//initialize column header for sorting -Sort.prototype.initializeColumn = function(column, content){ - var self = this, - sorter = false, - colEl, - arrowEl; - - - switch(typeof column.definition.sorter){ - case "string": - if(self.sorters[column.definition.sorter]){ - sorter = self.sorters[column.definition.sorter]; - }else{ - console.warn("Sort Error - No such sorter found: ", column.definition.sorter); - } - break; - - case "function": - sorter = column.definition.sorter; - break; - } - - column.modules.sort = { - sorter:sorter, dir:"none", - params:column.definition.sorterParams || {}, - startingDir:column.definition.headerSortStartingDir || "asc", - }; - - if(column.definition.headerSort !== false){ - - colEl = column.getElement(); - - colEl.classList.add("tabulator-sortable"); - - - arrowEl = document.createElement("div"); - arrowEl.classList.add("tabulator-arrow"); - //create sorter arrow - content.appendChild(arrowEl); - - //sort on click - colEl.addEventListener("click", function(e){ - var dir = "", - sorters=[], - match = false; - - if(column.modules.sort){ - dir = column.modules.sort.dir == "asc" ? "desc" : (column.modules.sort.dir == "desc" ? "asc" : column.modules.sort.startingDir); - - if (self.table.options.columnHeaderSortMulti && (e.shiftKey || e.ctrlKey)) { - sorters = self.getSort(); - - - match = sorters.findIndex(function(sorter){ - return sorter.field === column.getField(); - }); - - if(match > -1){ - sorters[match].dir = sorters[match].dir == "asc" ? "desc" : "asc"; - - if(match != sorters.length -1){ - sorters.push(sorters.splice(match, 1)[0]); - } - }else{ - sorters.push({column:column, dir:dir}); - } - - //add to existing sort - self.setSort(sorters); - }else{ - //sort by column only - self.setSort(column, dir); - } - - self.table.rowManager.sorterRefresh(); - } - }); - } -}; - -//check if the sorters have changed since last use -Sort.prototype.hasChanged = function(){ - var changed = this.changed; - this.changed = false; - return changed; -}; - -//return current sorters -Sort.prototype.getSort = function(){ - var self = this, - sorters = []; - - self.sortList.forEach(function(item){ - if(item.column){ - sorters.push({column:item.column.getComponent(), field:item.column.getField(), dir:item.dir}); - } - }); - - return sorters; -}; - -//change sort list and trigger sort -Sort.prototype.setSort = function(sortList, dir){ - var self = this, - newSortList = []; - - if(!Array.isArray(sortList)){ - sortList = [{column: sortList, dir:dir}]; - } - - sortList.forEach(function(item){ - var column; - - column = self.table.columnManager.findColumn(item.column); - - if(column){ - item.column = column; - newSortList.push(item); - self.changed = true; - }else{ - console.warn("Sort Warning - Sort field does not exist and is being ignored: ", item.column); - } - - }); - - self.sortList = newSortList; - - if(this.table.options.persistentSort && this.table.modExists("persistence", true)){ - this.table.modules.persistence.save("sort"); - } -}; - -//clear sorters -Sort.prototype.clear = function(){ - this.setSort([]); -}; - -//find appropriate sorter for column -Sort.prototype.findSorter = function(column){ - var row = this.table.rowManager.activeRows[0], - sorter = "string", - field, value; - - if(row){ - row = row.getData(); - field = column.getField(); - - if(field){ - - value = column.getFieldValue(row); - - switch(typeof value){ - case "undefined": - sorter = "string"; - break; - - case "boolean": - sorter = "boolean"; - break; - - default: - if(!isNaN(value) && value !== ""){ - sorter = "number"; - }else{ - if(value.match(/((^[0-9]+[a-z]+)|(^[a-z]+[0-9]+))+$/i)){ - sorter = "alphanum"; - } - } - break; - } - } - } - - return this.sorters[sorter]; -}; - -//work through sort list sorting data -Sort.prototype.sort = function(){ - var self = this, lastSort, sortList; - - sortList = this.table.options.sortOrderReverse ? self.sortList.slice().reverse() : self.sortList; - - if(self.table.options.dataSorting){ - self.table.options.dataSorting.call(self.table, self.getSort()); - } - - self.clearColumnHeaders(); - - if(!self.table.options.ajaxSorting){ - - sortList.forEach(function(item, i){ - - if(item.column && item.column.modules.sort){ - - //if no sorter has been defined, take a guess - if(!item.column.modules.sort.sorter){ - item.column.modules.sort.sorter = self.findSorter(item.column); - } - - self._sortItem(item.column, item.dir, sortList, i); - } - - self.setColumnHeader(item.column, item.dir); - }); - }else{ - sortList.forEach(function(item, i){ - self.setColumnHeader(item.column, item.dir); - }); - } - - if(self.table.options.dataSorted){ - self.table.options.dataSorted.call(self.table, self.getSort(), self.table.rowManager.getComponents(true)); - } - -}; - -//clear sort arrows on columns -Sort.prototype.clearColumnHeaders = function(){ - this.table.columnManager.getRealColumns().forEach(function(column){ - if(column.modules.sort){ - column.modules.sort.dir = "none"; - column.getElement().setAttribute("aria-sort", "none"); - } - }); -}; - -//set the column header sort direction -Sort.prototype.setColumnHeader = function(column, dir){ - column.modules.sort.dir = dir; - column.getElement().setAttribute("aria-sort", dir); -}; - -//sort each item in sort list -Sort.prototype._sortItem = function(column, dir, sortList, i){ - var self = this; - - var activeRows = self.table.rowManager.activeRows; - - var params = typeof column.modules.sort.params === "function" ? column.modules.sort.params(column.getComponent(), dir) : column.modules.sort.params; - - activeRows.sort(function(a, b){ - - var result = self._sortRow(a, b, column, dir, params); - - //if results match recurse through previous searchs to be sure - if(result === 0 && i){ - for(var j = i-1; j>= 0; j--){ - result = self._sortRow(a, b, sortList[j].column, sortList[j].dir, params); - - if(result !== 0){ - break; - } - } - } - - return result; - }); -}; - -//process individual rows for a sort function on active data -Sort.prototype._sortRow = function(a, b, column, dir, params){ - var el1Comp, el2Comp, colComp; - - //switch elements depending on search direction - var el1 = dir == "asc" ? a : b; - var el2 = dir == "asc" ? b : a; - - a = column.getFieldValue(el1.getData()); - b = column.getFieldValue(el2.getData()); - - a = typeof a !== "undefined" ? a : ""; - b = typeof b !== "undefined" ? b : ""; - - el1Comp = el1.getComponent(); - el2Comp = el2.getComponent(); - - return column.modules.sort.sorter.call(this, a, b, el1Comp, el2Comp, column.getComponent(), dir, params); -}; - - -//default data sorters -Sort.prototype.sorters = { - - //sort numbers - number:function(a, b, aRow, bRow, column, dir, params){ - var alignEmptyValues = params.alignEmptyValues; - var emptyAlign = 0; - - a = parseFloat(String(a).replace(",","")); - b = parseFloat(String(b).replace(",","")); - - //handle non numeric values - if(isNaN(a)){ - emptyAlign = isNaN(b) ? 0 : -1; - }else if(isNaN(b)){ - emptyAlign = 1; - }else{ - //compare valid values - return a - b; - } - - //fix empty values in position - if((alignEmptyValues === "top" && dir === "desc") || (alignEmptyValues === "bottom" && dir === "asc")){ - emptyAlign *= -1; - } - - return emptyAlign; - }, - - //sort strings - string:function(a, b, aRow, bRow, column, dir, params){ - var alignEmptyValues = params.alignEmptyValues; - var emptyAlign = 0; - var locale; - - //handle empty values - if(!a){ - emptyAlign = !b ? 0 : -1; - }else if(!b){ - emptyAlign = 1; - }else{ - //compare valid values - switch(typeof params.locale){ - case "boolean": - if(params.locale){ - locale = this.table.modules.localize.getLocale(); - } - break; - case "string": - locale = params.locale; - break; - } - - return String(a).toLowerCase().localeCompare(String(b).toLowerCase(), locale); - } - - //fix empty values in position - if((alignEmptyValues === "top" && dir === "desc") || (alignEmptyValues === "bottom" && dir === "asc")){ - emptyAlign *= -1; - } - - return emptyAlign; - }, - - //sort date - date:function(a, b, aRow, bRow, column, dir, params){ - if(!params.format){ - params.format = "DD/MM/YYYY"; - } - - return this.sorters.datetime.call(this, a, b, aRow, bRow, column, dir, params); - }, - - //sort hh:mm formatted times - time:function(a, b, aRow, bRow, column, dir, params){ - if(!params.format){ - params.format = "hh:mm"; - } - - return this.sorters.datetime.call(this, a, b, aRow, bRow, column, dir, params); - }, - - //sort datetime - datetime:function(a, b, aRow, bRow, column, dir, params){ - var format = params.format || "DD/MM/YYYY hh:mm:ss", - alignEmptyValues = params.alignEmptyValues, - emptyAlign = 0; - - if(typeof moment != "undefined"){ - a = moment(a, format); - b = moment(b, format); - - if(!a.isValid()){ - emptyAlign = !b.isValid() ? 0 : -1; - }else if(!b.isValid()){ - emptyAlign = 1; - }else{ - //compare valid values - return a - b; - } - - //fix empty values in position - if((alignEmptyValues === "top" && dir === "desc") || (alignEmptyValues === "bottom" && dir === "asc")){ - emptyAlign *= -1; - } - - return emptyAlign; - - }else{ - console.error("Sort Error - 'datetime' sorter is dependant on moment.js"); - } - }, - - //sort booleans - boolean:function(a, b, aRow, bRow, column, dir, params){ - var el1 = a === true || a === "true" || a === "True" || a === 1 ? 1 : 0; - var el2 = b === true || b === "true" || b === "True" || b === 1 ? 1 : 0; - - return el1 - el2; - }, - - //sort if element contains any data - array:function(a, b, aRow, bRow, column, dir, params){ - var el1 = 0; - var el2 = 0; - var type = params.type || "length"; - var alignEmptyValues = params.alignEmptyValues; - var emptyAlign = 0; - - function calc(value){ - - switch(type){ - case "length": - return value.length; - break; - - case "sum": - return value.reduce(function(c, d){ - return c + d; - }); - break; - - case "max": - return Math.max.apply(null, value) ; - break; - - case "min": - return Math.min.apply(null, value) ; - break; - - case "avg": - return value.reduce(function(c, d){ - return c + d; - }) / value.length; - break; - } - } - - //handle non array values - if(!Array.isArray(a)){ - alignEmptyValues = !Array.isArray(b) ? 0 : -1; - }else if(!Array.isArray(b)){ - alignEmptyValues = 1; - }else{ - - //compare valid values - el1 = a ? calc(a) : 0; - el2 = b ? calc(b) : 0; - - return el1 - el2; - } - - //fix empty values in position - if((alignEmptyValues === "top" && dir === "desc") || (alignEmptyValues === "bottom" && dir === "asc")){ - emptyAlign *= -1; - } - - return emptyAlign; - }, - - - //sort if element contains any data - exists:function(a, b, aRow, bRow, column, dir, params){ - var el1 = typeof a == "undefined" ? 0 : 1; - var el2 = typeof b == "undefined" ? 0 : 1; - - return el1 - el2; - }, - - //sort alpha numeric strings - alphanum:function(as, bs, aRow, bRow, column, dir, params){ - var a, b, a1, b1, i= 0, L, rx = /(\d+)|(\D+)/g, rd = /\d/; - var alignEmptyValues = params.alignEmptyValues; - var emptyAlign = 0; - - //handle empty values - if(!as && as!== 0){ - emptyAlign = !bs && bs!== 0 ? 0 : -1; - }else if(!bs && bs!== 0){ - emptyAlign = 1; - }else{ - - if(isFinite(as) && isFinite(bs)) return as - bs; - a = String(as).toLowerCase(); - b = String(bs).toLowerCase(); - if(a === b) return 0; - if(!(rd.test(a) && rd.test(b))) return a > b ? 1 : -1; - a = a.match(rx); - b = b.match(rx); - L = a.length > b.length ? b.length : a.length; - while(i < L){ - a1= a[i]; - b1= b[i++]; - if(a1 !== b1){ - if(isFinite(a1) && isFinite(b1)){ - if(a1.charAt(0) === "0") a1 = "." + a1; - if(b1.charAt(0) === "0") b1 = "." + b1; - return a1 - b1; - } - else return a1 > b1 ? 1 : -1; - } - } - - return a.length > b.length; - } - - //fix empty values in position - if((alignEmptyValues === "top" && dir === "desc") || (alignEmptyValues === "bottom" && dir === "asc")){ - emptyAlign *= -1; - } - - return emptyAlign; - }, -}; - -Tabulator.prototype.registerModule("sort", Sort); diff --git a/Gems/AssetMemoryAnalyzer/External/tabulator-master/src/js/modules/validate.js b/Gems/AssetMemoryAnalyzer/External/tabulator-master/src/js/modules/validate.js deleted file mode 100644 index 5276ba3680..0000000000 --- a/Gems/AssetMemoryAnalyzer/External/tabulator-master/src/js/modules/validate.js +++ /dev/null @@ -1,211 +0,0 @@ -var Validate = function(table){ - this.table = table; -}; - -//validate -Validate.prototype.initializeColumn = function(column){ - var self = this, - config = [], - validator; - - if(column.definition.validator){ - - if(Array.isArray(column.definition.validator)){ - column.definition.validator.forEach(function(item){ - validator = self._extractValidator(item); - - if(validator){ - config.push(validator); - } - }); - - }else{ - validator = this._extractValidator(column.definition.validator); - - if(validator){ - config.push(validator); - } - } - - column.modules.validate = config.length ? config : false; - } -}; - -Validate.prototype._extractValidator = function(value){ - var parts, type, params; - - switch(typeof value){ - case "string": - parts = value.split(":",2); - type = parts.shift(); - params = parts[0]; - - return this._buildValidator(type, params); - break; - - case "function": - return this._buildValidator(value); - break; - - case "object": - return this._buildValidator(value.type, value.parameters); - break; - } -}; - -Validate.prototype._buildValidator = function(type, params){ - - var func = typeof type == "function" ? type : this.validators[type]; - - if(!func){ - console.warn("Validator Setup Error - No matching validator found:", type); - return false; - }else{ - return { - type:typeof type == "function" ? "function" : type, - func:func, - params:params, - }; - } -}; - - -Validate.prototype.validate = function(validators, cell, value){ - var self = this, - valid = []; - - if(validators){ - validators.forEach(function(item){ - if(!item.func.call(self, cell, value, item.params)){ - valid.push({ - type:item.type, - parameters:item.params - }); - } - }); - } - - return valid.length ? valid : true; -}; - -Validate.prototype.validators = { - - //is integer - integer: function(cell, value, parameters){ - if(value === "" || value === null || typeof value === "undefined"){ - return true; - } - value = Number(value); - return typeof value === 'number' && isFinite(value) && Math.floor(value) === value; - }, - - //is float - float: function(cell, value, parameters){ - if(value === "" || value === null || typeof value === "undefined"){ - return true; - } - value = Number(value); - return typeof value === 'number' && isFinite(value) && value % 1 !== 0; - }, - - //must be a number - numeric: function(cell, value, parameters){ - if(value === "" || value === null || typeof value === "undefined"){ - return true; - } - return !isNaN(value); - }, - - //must be a string - string: function(cell, value, parameters){ - if(value === "" || value === null || typeof value === "undefined"){ - return true; - } - return isNaN(value); - }, - - //maximum value - max: function(cell, value, parameters){ - if(value === "" || value === null || typeof value === "undefined"){ - return true; - } - return parseFloat(value) <= parameters; - }, - - //minimum value - min: function(cell, value, parameters){ - if(value === "" || value === null || typeof value === "undefined"){ - return true; - } - return parseFloat(value) >= parameters; - }, - - //minimum string length - minLength: function(cell, value, parameters){ - if(value === "" || value === null || typeof value === "undefined"){ - return true; - } - return String(value).length >= parameters; - }, - - //maximum string length - maxLength: function(cell, value, parameters){ - if(value === "" || value === null || typeof value === "undefined"){ - return true; - } - return String(value).length <= parameters; - }, - - //in provided value list - in: function(cell, value, parameters){ - if(value === "" || value === null || typeof value === "undefined"){ - return true; - } - if(typeof parameters == "string"){ - parameters = parameters.split("|"); - } - - return value === "" || parameters.indexOf(value) > -1; - }, - - //must match provided regex - regex: function(cell, value, parameters){ - if(value === "" || value === null || typeof value === "undefined"){ - return true; - } - var reg = new RegExp(parameters); - - return reg.test(value); - }, - - //value must be unique in this column - unique: function(cell, value, parameters){ - if(value === "" || value === null || typeof value === "undefined"){ - return true; - } - var unique = true; - - var cellData = cell.getData(); - var column = cell.getColumn()._getSelf(); - - this.table.rowManager.rows.forEach(function(row){ - var data = row.getData(); - - if(data !== cellData){ - if(value == column.getFieldValue(data)){ - unique = false; - } - } - }); - - return unique; - }, - - //must have a value - required:function(cell, value, parameters){ - return value !== "" & value !== null && typeof value !== "undefined"; - }, -}; - - -Tabulator.prototype.registerModule("validate", Validate); diff --git a/Gems/AssetMemoryAnalyzer/External/tabulator-master/src/js/modules_enabled.js b/Gems/AssetMemoryAnalyzer/External/tabulator-master/src/js/modules_enabled.js deleted file mode 100644 index a83a22a56b..0000000000 --- a/Gems/AssetMemoryAnalyzer/External/tabulator-master/src/js/modules_enabled.js +++ /dev/null @@ -1,27 +0,0 @@ -/*=include modules/accessor.js */ -/*=include modules/ajax.js */ -/*=include modules/calculation_colums.js */ -/*=include modules/clipboard.js */ -/*=include modules/data_tree.js */ -/*=include modules/download.js */ -/*=include modules/edit.js */ -/*=include modules/filter.js */ -/*=include modules/format.js */ -/*=include modules/frozen_columns.js */ -/*=include modules/frozen_rows.js */ -/*=include modules/group_rows.js */ -/*=include modules/history.js */ -/*=include modules/html_table_import.js */ -/*=include modules/keybindings.js */ -/*=include modules/moveable_columns.js */ -/*=include modules/moveable_rows.js */ -/*=include modules/mutator.js */ -/*=include modules/page.js */ -/*=include modules/persistence.js */ -/*=include modules/resize_columns.js */ -/*=include modules/resize_rows.js */ -/*=include modules/resize_table.js */ -/*=include modules/responsive_layout.js */ -/*=include modules/select_row.js */ -/*=include modules/sort.js */ -/*=include modules/validate.js */ \ No newline at end of file diff --git a/Gems/AssetMemoryAnalyzer/External/tabulator-master/src/js/polyfills.js b/Gems/AssetMemoryAnalyzer/External/tabulator-master/src/js/polyfills.js deleted file mode 100644 index 965d6a4c12..0000000000 --- a/Gems/AssetMemoryAnalyzer/External/tabulator-master/src/js/polyfills.js +++ /dev/null @@ -1,92 +0,0 @@ - - - -// https://tc39.github.io/ecma262/#sec-array.prototype.findIndex -if (!Array.prototype.findIndex) { - Object.defineProperty(Array.prototype, 'findIndex', { - value: function(predicate) { - // 1. Let O be ? ToObject(this value). - if (this == null) { - throw new TypeError('"this" is null or not defined'); - } - - var o = Object(this); - - // 2. Let len be ? ToLength(? Get(O, "length")). - var len = o.length >>> 0; - - // 3. If IsCallable(predicate) is false, throw a TypeError exception. - if (typeof predicate !== 'function') { - throw new TypeError('predicate must be a function'); - } - - // 4. If thisArg was supplied, let T be thisArg; else let T be undefined. - var thisArg = arguments[1]; - - // 5. Let k be 0. - var k = 0; - - // 6. Repeat, while k < len - while (k < len) { - // a. Let Pk be ! ToString(k). - // b. Let kValue be ? Get(O, Pk). - // c. Let testResult be ToBoolean(? Call(predicate, T, « kValue, k, O »)). - // d. If testResult is true, return k. - var kValue = o[k]; - if (predicate.call(thisArg, kValue, k, o)) { - return k; - } - // e. Increase k by 1. - k++; - } - - // 7. Return -1. - return -1; - } - }); -} - -// https://tc39.github.io/ecma262/#sec-array.prototype.find -if (!Array.prototype.find) { - Object.defineProperty(Array.prototype, 'find', { - value: function(predicate) { - // 1. Let O be ? ToObject(this value). - if (this == null) { - throw new TypeError('"this" is null or not defined'); - } - - var o = Object(this); - - // 2. Let len be ? ToLength(? Get(O, "length")). - var len = o.length >>> 0; - - // 3. If IsCallable(predicate) is false, throw a TypeError exception. - if (typeof predicate !== 'function') { - throw new TypeError('predicate must be a function'); - } - - // 4. If thisArg was supplied, let T be thisArg; else let T be undefined. - var thisArg = arguments[1]; - - // 5. Let k be 0. - var k = 0; - - // 6. Repeat, while k < len - while (k < len) { - // a. Let Pk be ! ToString(k). - // b. Let kValue be ? Get(O, Pk). - // c. Let testResult be ToBoolean(? Call(predicate, T, « kValue, k, O »)). - // d. If testResult is true, return kValue. - var kValue = o[k]; - if (predicate.call(thisArg, kValue, k, o)) { - return kValue; - } - // e. Increase k by 1. - k++; - } - - // 7. Return undefined. - return undefined; - } - }); -} \ No newline at end of file diff --git a/Gems/AssetMemoryAnalyzer/External/tabulator-master/src/js/row.js b/Gems/AssetMemoryAnalyzer/External/tabulator-master/src/js/row.js deleted file mode 100644 index 1d8e401a6f..0000000000 --- a/Gems/AssetMemoryAnalyzer/External/tabulator-master/src/js/row.js +++ /dev/null @@ -1,681 +0,0 @@ - -//public row object -var RowComponent = function (row){ - this._row = row; -}; - -RowComponent.prototype.getData = function(transform){ - return this._row.getData(transform); -}; - -RowComponent.prototype.getElement = function(){ - return this._row.getElement(); -}; - -RowComponent.prototype.getCells = function(){ - var cells = []; - - this._row.getCells().forEach(function(cell){ - cells.push(cell.getComponent()); - }); - - return cells; -}; - -RowComponent.prototype.getCell = function(column){ - var cell = this._row.getCell(column); - return cell ? cell.getComponent() : false; -}; - -RowComponent.prototype.getIndex = function(){ - return this._row.getData("data")[this._row.table.options.index]; -}; - -RowComponent.prototype.getPosition = function(active){ - return this._row.table.rowManager.getRowPosition(this._row, active); -}; - -RowComponent.prototype.delete = function(){ - return this._row.delete(); -}; - -RowComponent.prototype.scrollTo = function(){ - return this._row.table.rowManager.scrollToRow(this._row); -}; - -RowComponent.prototype.update = function(data){ - return this._row.updateData(data); -}; - -RowComponent.prototype.normalizeHeight = function(){ - this._row.normalizeHeight(true); -}; - -RowComponent.prototype.select = function(){ - this._row.table.modules.selectRow.selectRows(this._row); -}; - -RowComponent.prototype.deselect = function(){ - this._row.table.modules.selectRow.deselectRows(this._row); -}; - -RowComponent.prototype.toggleSelect = function(){ - this._row.table.modules.selectRow.toggleRow(this._row); -}; - -RowComponent.prototype.isSelected = function(){ - return this._row.table.modules.selectRow.isRowSelected(this._row); -}; - -RowComponent.prototype._getSelf = function(){ - return this._row; -}; - -RowComponent.prototype.freeze = function(){ - if(this._row.table.modExists("frozenRows", true)){ - this._row.table.modules.frozenRows.freezeRow(this._row); - } -}; - -RowComponent.prototype.unfreeze = function(){ - if(this._row.table.modExists("frozenRows", true)){ - this._row.table.modules.frozenRows.unfreezeRow(this._row); - } -}; - -RowComponent.prototype.treeCollapse = function(){ - if(this._row.table.modExists("dataTree", true)){ - this._row.table.modules.dataTree.collapseRow(this._row); - } -}; - -RowComponent.prototype.treeExpand = function(){ - if(this._row.table.modExists("dataTree", true)){ - this._row.table.modules.dataTree.expandRow(this._row); - } -}; - -RowComponent.prototype.treeToggle = function(){ - if(this._row.table.modExists("dataTree", true)){ - this._row.table.modules.dataTree.toggleRow(this._row); - } -}; - -RowComponent.prototype.getTreeParent = function(){ - if(this._row.table.modExists("dataTree", true)){ - return this._row.table.modules.dataTree.getTreeParent(this._row); - } - - return false; -}; - -RowComponent.prototype.getTreeChildren = function(){ - if(this._row.table.modExists("dataTree", true)){ - return this._row.table.modules.dataTree.getTreeChildren(this._row); - } - - return false; -}; - -RowComponent.prototype.reformat = function(){ - return this._row.reinitialize(); -}; - -RowComponent.prototype.getGroup = function(){ - return this._row.getGroup().getComponent(); -}; - -RowComponent.prototype.getTable = function(){ - return this._row.table; -}; - -RowComponent.prototype.getNextRow = function(){ - return this._row.nextRow(); -}; - -RowComponent.prototype.getPrevRow = function(){ - return this._row.prevRow(); -}; - - -var Row = function(data, parent){ - this.table = parent.table; - this.parent = parent; - this.data = {}; - this.type = "row"; //type of element - this.element = this.createElement(); - this.modules = {}; //hold module variables; - this.cells = []; - this.height = 0; //hold element height - this.outerHeight = 0; //holde lements outer height - this.initialized = false; //element has been rendered - this.heightInitialized = false; //element has resized cells to fit - - this.setData(data); - this.generateElement(); -}; - -Row.prototype.createElement = function (){ - var el = document.createElement("div"); - - el.classList.add("tabulator-row"); - el.setAttribute("role", "row"); - - return el; -}; - -Row.prototype.getElement = function(){ - return this.element; -}; - - -Row.prototype.generateElement = function(){ - var self = this, - dblTap, tapHold, tap; - - //set row selection characteristics - if(self.table.options.selectable !== false && self.table.modExists("selectRow")){ - self.table.modules.selectRow.initializeRow(this); - } - - //setup movable rows - if(self.table.options.movableRows !== false && self.table.modExists("moveRow")){ - self.table.modules.moveRow.initializeRow(this); - } - - //setup data tree - if(self.table.options.dataTree !== false && self.table.modExists("dataTree")){ - self.table.modules.dataTree.initializeRow(this); - } - - //handle row click events - if (self.table.options.rowClick){ - self.element.addEventListener("click", function(e){ - self.table.options.rowClick(e, self.getComponent()); - }); - } - - if (self.table.options.rowDblClick){ - self.element.addEventListener("dblclick", function(e){ - self.table.options.rowDblClick(e, self.getComponent()); - }); - } - - if (self.table.options.rowContext){ - self.element.addEventListener("contextmenu", function(e){ - self.table.options.rowContext(e, self.getComponent()); - }); - } - - if (self.table.options.rowTap){ - - tap = false; - - self.element.addEventListener("touchstart", function(e){ - tap = true; - }); - - self.element.addEventListener("touchend", function(e){ - if(tap){ - self.table.options.rowTap(e, self.getComponent()); - } - - tap = false; - }); - } - - if (self.table.options.rowDblTap){ - - dblTap = null; - - self.element.addEventListener("touchend", function(e){ - - if(dblTap){ - clearTimeout(dblTap); - dblTap = null; - - self.table.options.rowDblTap(e, self.getComponent()); - }else{ - - dblTap = setTimeout(function(){ - clearTimeout(dblTap); - dblTap = null; - }, 300); - } - - }); - } - - - if (self.table.options.rowTapHold){ - - tapHold = null; - - self.element.addEventListener("touchstart", function(e){ - clearTimeout(tapHold); - - tapHold = setTimeout(function(){ - clearTimeout(tapHold); - tapHold = null; - tap = false; - self.table.options.rowTapHold(e, self.getComponent()); - }, 1000); - - }); - - self.element.addEventListener("touchend", function(e){ - clearTimeout(tapHold); - tapHold = null; - }); - } -}; - -Row.prototype.generateCells = function(){ - this.cells = this.table.columnManager.generateCells(this); -}; - -//functions to setup on first render -Row.prototype.initialize = function(force){ - var self = this; - - if(!self.initialized || force){ - - self.deleteCells(); - - while(self.element.firstChild) self.element.removeChild(self.element.firstChild); - - //handle frozen cells - if(this.table.modExists("frozenColumns")){ - this.table.modules.frozenColumns.layoutRow(this); - } - - this.generateCells(); - - self.cells.forEach(function(cell){ - self.element.appendChild(cell.getElement()); - cell.cellRendered(); - }); - - if(force){ - self.normalizeHeight(); - } - - //setup movable rows - if(self.table.options.dataTree && self.table.modExists("dataTree")){ - self.table.modules.dataTree.layoutRow(this); - } - - //setup movable rows - if(self.table.options.responsiveLayout === "collapse" && self.table.modExists("responsiveLayout")){ - self.table.modules.responsiveLayout.layoutRow(this); - } - - if(self.table.options.rowFormatter){ - self.table.options.rowFormatter(self.getComponent()); - } - - //set resizable handles - if(self.table.options.resizableRows && self.table.modExists("resizeRows")){ - self.table.modules.resizeRows.initializeRow(self); - } - - self.initialized = true; - } -}; - -Row.prototype.reinitializeHeight = function(){ - this.heightInitialized = false; - - if(this.element.offsetParent !== null){ - this.normalizeHeight(true); - } -}; - - -Row.prototype.reinitialize = function(){ - this.initialized = false; - this.heightInitialized = false; - this.height = 0; - - if(this.element.offsetParent !== null){ - this.initialize(true); - } -}; - -//get heights when doing bulk row style calcs in virtual DOM -Row.prototype.calcHeight = function(){ - - var maxHeight = 0, - minHeight = this.table.options.resizableRows ? this.element.clientHeight : 0; - - this.cells.forEach(function(cell){ - var height = cell.getHeight(); - if(height > maxHeight){ - maxHeight = height; - } - }); - - this.height = Math.max(maxHeight, minHeight); - this.outerHeight = this.element.offsetHeight; -}; - -//set of cells -Row.prototype.setCellHeight = function(){ - var height = this.height; - - this.cells.forEach(function(cell){ - cell.setHeight(height); - }); - - this.heightInitialized = true; -}; - -Row.prototype.clearCellHeight = function(){ - this.cells.forEach(function(cell){ - - cell.clearHeight(); - }); -}; - -//normalize the height of elements in the row -Row.prototype.normalizeHeight = function(force){ - - if(force){ - this.clearCellHeight(); - } - - this.calcHeight(); - - this.setCellHeight(); -}; - -Row.prototype.setHeight = function(height){ - this.height = height; - - this.setCellHeight(); -}; - -//set height of rows -Row.prototype.setHeight = function(height, force){ - if(this.height != height || force){ - - this.height = height; - - this.setCellHeight(); - - // this.outerHeight = this.element.outerHeight(); - this.outerHeight = this.element.offsetHeight; - } -}; - -//return rows outer height -Row.prototype.getHeight = function(){ - return this.outerHeight; -}; - -//return rows outer Width -Row.prototype.getWidth = function(){ - return this.element.offsetWidth; -}; - - -//////////////// Cell Management ///////////////// - -Row.prototype.deleteCell = function(cell){ - var index = this.cells.indexOf(cell); - - if(index > -1){ - this.cells.splice(index, 1); - } -}; - -//////////////// Data Management ///////////////// - -Row.prototype.setData = function(data){ - var self = this; - - if(self.table.modExists("mutator")){ - self.data = self.table.modules.mutator.transformRow(data, "data"); - }else{ - self.data = data; - } -}; - -//update the rows data -Row.prototype.updateData = function(data){ - var self = this; - - return new Promise((resolve, reject) => { - - if(typeof data === "string"){ - data = JSON.parse(data); - } - - //mutate incomming data if needed - if(self.table.modExists("mutator")){ - data = self.table.modules.mutator.transformRow(data, "data", true); - } - - //set data - for (var attrname in data) { - self.data[attrname] = data[attrname]; - } - - //update affected cells only - for (var attrname in data) { - let cell = this.getCell(attrname); - - if(cell){ - if(cell.getValue() != data[attrname]){ - cell.setValueProcessData(data[attrname]); - } - } - } - - //Partial reinitialization if visible - if(Tabulator.prototype.helpers.elVisible(this.element)){ - self.normalizeHeight(); - - if(self.table.options.rowFormatter){ - self.table.options.rowFormatter(self.getComponent()); - } - }else{ - this.initialized = false; - this.height = 0; - } - - //self.reinitialize(); - - self.table.options.rowUpdated.call(this.table, self.getComponent()); - - resolve(); - }); -}; - -Row.prototype.getData = function(transform){ - var self = this; - - if(transform){ - if(self.table.modExists("accessor")){ - return self.table.modules.accessor.transformRow(self.data, transform); - } - }else{ - return this.data; - } - -}; - -Row.prototype.getCell = function(column){ - var match = false; - - column = this.table.columnManager.findColumn(column); - - match = this.cells.find(function(cell){ - return cell.column === column; - }); - - return match; -}; - -Row.prototype.getCellIndex = function(findCell){ - return this.cells.findIndex(function(cell){ - return cell === findCell; - }); -}; - - -Row.prototype.findNextEditableCell = function(index){ - var nextCell = false; - - if(index < this.cells.length-1){ - for(var i = index+1; i < this.cells.length; i++){ - let cell = this.cells[i]; - - if(cell.column.modules.edit && Tabulator.prototype.helpers.elVisible(cell.getElement())){ - let allowEdit = true; - - if(typeof cell.column.modules.edit.check == "function"){ - allowEdit = cell.column.modules.edit.check(cell.getComponent()); - } - - if(allowEdit){ - nextCell = cell; - break; - } - } - } - } - - return nextCell; -}; - -Row.prototype.findPrevEditableCell = function(index){ - var prevCell = false; - - if(index > 0){ - for(var i = index-1; i >= 0; i--){ - let cell = this.cells[i], - allowEdit = true; - - if(cell.column.modules.edit && Tabulator.prototype.helpers.elVisible(cell.getElement())){ - if(typeof cell.column.modules.edit.check == "function"){ - allowEdit = cell.column.modules.edit.check(cell.getComponent()); - } - - if(allowEdit){ - prevCell = cell; - break; - } - } - } - } - - return prevCell; -}; - - -Row.prototype.getCells = function(){ - return this.cells; -}; - -Row.prototype.nextRow = function(){ - var row = this.table.rowManager.nextDisplayRow(this, true); - return row ? row.getComponent() : false; -}; - -Row.prototype.prevRow = function(){ - var row = this.table.rowManager.prevDisplayRow(this, true); - return row ? row.getComponent() : false; -}; - -///////////////////// Actions ///////////////////// - -Row.prototype.delete = function(){ - return new Promise((resolve, reject) => { - var index = this.table.rowManager.getRowIndex(this); - - this.deleteActual(); - - if(this.table.options.history && this.table.modExists("history")){ - - if(index){ - index = this.table.rowManager.rows[index-1]; - } - - this.table.modules.history.action("rowDelete", this, {data:this.getData(), pos:!index, index:index}); - } - - resolve(); - }); -}; - - -Row.prototype.deleteActual = function(){ - - var index = this.table.rowManager.getRowIndex(this); - - //deselect row if it is selected - if(this.table.modExists("selectRow")){ - this.table.modules.selectRow._deselectRow(this, true); - } - - // if(this.table.options.dataTree && this.table.modExists("dataTree")){ - // this.table.modules.dataTree.collapseRow(this, true); - // } - - this.table.rowManager.deleteRow(this); - - this.deleteCells(); - - this.initialized = false; - this.heightInitialized = false; - - //remove from group - if(this.modules.group){ - this.modules.group.removeRow(this); - } - - //recalc column calculations if present - if(this.table.modExists("columnCalcs")){ - if(this.table.options.groupBy && this.table.modExists("groupRows")){ - this.table.modules.columnCalcs.recalcRowGroup(this); - }else{ - this.table.modules.columnCalcs.recalc(this.table.rowManager.activeRows); - } - } -}; - - -Row.prototype.deleteCells = function(){ - var cellCount = this.cells.length; - - for(let i = 0; i < cellCount; i++){ - this.cells[0].delete(); - } -}; - -Row.prototype.wipe = function(){ - this.deleteCells(); - - // this.element.children().each(function(){ - // $(this).remove(); - // }) - // this.element.empty(); - - while(this.element.firstChild) this.element.removeChild(this.element.firstChild); - // this.element.remove(); - if(this.element.parentNode){ - this.element.parentNode.removeChild(this.element); - } -}; - - -Row.prototype.getGroup = function(){ - return this.modules.group || false; -}; - - -//////////////// Object Generation ///////////////// -Row.prototype.getComponent = function(){ - return new RowComponent(this); -}; diff --git a/Gems/AssetMemoryAnalyzer/External/tabulator-master/src/js/row_manager.js b/Gems/AssetMemoryAnalyzer/External/tabulator-master/src/js/row_manager.js deleted file mode 100644 index 38f73a94dd..0000000000 --- a/Gems/AssetMemoryAnalyzer/External/tabulator-master/src/js/row_manager.js +++ /dev/null @@ -1,1637 +0,0 @@ -var RowManager = function(table){ - - this.table = table; - this.element = this.createHolderElement(); //containing element - this.tableElement = this.createTableElement(); //table element - this.columnManager = null; //hold column manager object - this.height = 0; //hold height of table element - - this.firstRender = false; //handle first render - this.renderMode = "classic"; //current rendering mode - - this.rows = []; //hold row data objects - this.activeRows = []; //rows currently available to on display in the table - this.activeRowsCount = 0; //count of active rows - - this.displayRows = []; //rows currently on display in the table - this.displayRowsCount = 0; //count of display rows - - this.scrollTop = 0; - this.scrollLeft = 0; - - this.vDomRowHeight = 20; //approximation of row heights for padding - - this.vDomTop = 0; //hold position for first rendered row in the virtual DOM - this.vDomBottom = 0; //hold possition for last rendered row in the virtual DOM - - this.vDomScrollPosTop = 0; //last scroll position of the vDom top; - this.vDomScrollPosBottom = 0; //last scroll position of the vDom bottom; - - this.vDomTopPad = 0; //hold value of padding for top of virtual DOM - this.vDomBottomPad = 0; //hold value of padding for bottom of virtual DOM - - this.vDomMaxRenderChain = 90; //the maximum number of dom elements that can be rendered in 1 go - - this.vDomWindowBuffer = 0; //window row buffer before removing elements, to smooth scrolling - - this.vDomWindowMinTotalRows = 20; //minimum number of rows to be generated in virtual dom (prevent buffering issues on tables with tall rows) - this.vDomWindowMinMarginRows = 5; //minimum number of rows to be generated in virtual dom margin - - this.vDomTopNewRows = []; //rows to normalize after appending to optimize render speed - this.vDomBottomNewRows = []; //rows to normalize after appending to optimize render speed -}; - -//////////////// Setup Functions ///////////////// - -RowManager.prototype.createHolderElement = function (){ - var el = document.createElement("div"); - - el.classList.add("tabulator-tableHolder"); - el.setAttribute("tabindex", 0); - - return el; -}; - -RowManager.prototype.createTableElement = function (){ - var el = document.createElement("div"); - - el.classList.add("tabulator-table"); - - return el; -}; - -//return containing element -RowManager.prototype.getElement = function(){ - return this.element; -}; - -//return table element -RowManager.prototype.getTableElement = function(){ - return this.tableElement; -}; - -//return position of row in table -RowManager.prototype.getRowPosition = function(row, active){ - if(active){ - return this.activeRows.indexOf(row); - }else{ - return this.rows.indexOf(row); - } -}; - - -//link to column manager -RowManager.prototype.setColumnManager = function(manager){ - this.columnManager = manager; -}; - -RowManager.prototype.initialize = function(){ - var self = this; - - self.setRenderMode(); - - //initialize manager - self.element.appendChild(self.tableElement); - - self.firstRender = true; - - //scroll header along with table body - self.element.addEventListener("scroll", function(){ - var left = self.element.scrollLeft; - - //handle horizontal scrolling - if(self.scrollLeft != left){ - self.columnManager.scrollHorizontal(left); - - if(self.table.options.groupBy){ - self.table.modules.groupRows.scrollHeaders(left); - } - - if(self.table.modExists("columnCalcs")){ - self.table.modules.columnCalcs.scrollHorizontal(left); - } - } - - self.scrollLeft = left; - }); - - //handle virtual dom scrolling - if(this.renderMode === "virtual"){ - - self.element.addEventListener("scroll", function(){ - var top = self.element.scrollTop; - var dir = self.scrollTop > top; - - //handle verical scrolling - if(self.scrollTop != top){ - self.scrollTop = top; - self.scrollVertical(dir); - - if(self.table.options.ajaxProgressiveLoad == "scroll"){ - self.table.modules.ajax.nextPage(self.element.scrollHeight - self.element.clientHeight - top); - } - }else{ - self.scrollTop = top; - } - - }); - } -}; - - -////////////////// Row Manipulation ////////////////// - -RowManager.prototype.findRow = function(subject){ - var self = this; - - if(typeof subject == "object"){ - - if(subject instanceof Row){ - //subject is row element - return subject; - }else if(subject instanceof RowComponent){ - //subject is public row component - return subject._getSelf() || false; - }else if(subject instanceof HTMLElement){ - //subject is a HTML element of the row - let match = self.rows.find(function(row){ - return row.element === subject; - }); - - return match || false; - } - - }else if(typeof subject == "undefined" || subject === null){ - return false; - }else{ - //subject should be treated as the index of the row - let match = self.rows.find(function(row){ - return row.data[self.table.options.index] == subject; - }); - - return match || false; - } - - //catch all for any other type of input - - return false; -}; - -RowManager.prototype.getRowFromPosition = function(position, active){ - if(active){ - return this.activeRows[position]; - }else{ - return this.rows[position]; - } -}; - -RowManager.prototype.scrollToRow = function(row, position, ifVisible){ - var rowIndex = this.getDisplayRows().indexOf(row), - rowEl = row.getElement(), - rowTop, - offset = 0; - - return new Promise((resolve, reject) => { - if(rowIndex > -1){ - - if(typeof position === "undefined"){ - position = this.table.options.scrollToRowPosition; - } - - if(typeof ifVisible === "undefined"){ - ifVisible = this.table.options.scrollToRowIfVisible; - } - - - if(position === "nearest"){ - switch(this.renderMode){ - case"classic": - rowTop = Tabulator.prototype.helpers.elOffset(rowEl).top; - position = Math.abs(this.element.scrollTop - rowTop) > Math.abs(this.element.scrollTop + this.element.clientHeight - rowTop) ? "bottom" : "top"; - break; - case"virtual": - position = Math.abs(this.vDomTop - rowIndex) > Math.abs(this.vDomBottom - rowIndex) ? "bottom" : "top"; - break; - } - } - - //check row visibility - if(!ifVisible){ - if(Tabulator.prototype.helpers.elVisible(rowEl)){ - offset = Tabulator.prototype.helpers.elOffset(rowEl).top - Tabulator.prototype.helpers.elOffset(this.element).top; - - if(offset > 0 && offset < this.element.clientHeight - rowEl.offsetHeight){ - return false; - } - } - } - - //scroll to row - switch(this.renderMode){ - case"classic": - this.element.scrollTop = Tabulator.prototype.helpers.elOffset(rowEl).top - Tabulator.prototype.helpers.elOffset(this.element).top + this.element.scrollTop; - break; - case"virtual": - this._virtualRenderFill(rowIndex, true); - break; - } - - //align to correct position - switch(position){ - case "middle": - case "center": - this.element.scrollTop = this.element.scrollTop - (this.element.clientHeight / 2); - break; - - case "bottom": - this.element.scrollTop = this.element.scrollTop - this.element.clientHeight + rowEl.offsetHeight; - break; - } - - resolve(); - - }else{ - console.warn("Scroll Error - Row not visible"); - reject("Scroll Error - Row not visible"); - } - }); -}; - - -////////////////// Data Handling ////////////////// - -RowManager.prototype.setData = function(data, renderInPosition){ - var self = this; - - return new Promise((resolve, reject)=>{ - if(renderInPosition && this.getDisplayRows().length){ - if(self.table.options.pagination){ - self._setDataActual(data, true); - }else{ - this.reRenderInPosition(function(){ - self._setDataActual(data); - }); - } - }else{ - this.resetScroll(); - this._setDataActual(data); - } - - resolve(); - }); -}; - -RowManager.prototype._setDataActual = function(data, renderInPosition){ - var self = this; - - self.table.options.dataLoading.call(this.table, data); - - self.rows.forEach(function(row){ - row.wipe(); - }); - - self.rows = []; - - if(this.table.options.history && this.table.modExists("history")){ - this.table.modules.history.clear(); - } - - if(Array.isArray(data)){ - - if(this.table.modExists("selectRow")){ - this.table.modules.selectRow.clearSelectionData(); - } - - data.forEach(function(def, i){ - if(def && typeof def === "object"){ - var row = new Row(def, self); - self.rows.push(row); - }else{ - console.warn("Data Loading Warning - Invalid row data detected and ignored, expecting object but received:", def); - } - }); - - self.table.options.dataLoaded.call(this.table, data); - - self.refreshActiveData(false, false, renderInPosition); - }else{ - console.error("Data Loading Error - Unable to process data due to invalid data type \nExpecting: array \nReceived: ", typeof data, "\nData: ", data); - } -}; - -RowManager.prototype.deleteRow = function(row){ - var allIndex = this.rows.indexOf(row), - activeIndex = this.activeRows.indexOf(row); - - if(activeIndex > -1){ - this.activeRows.splice(activeIndex, 1); - } - - if(allIndex > -1){ - this.rows.splice(allIndex, 1); - } - - this.setActiveRows(this.activeRows); - - this.displayRowIterator(function(rows){ - var displayIndex = rows.indexOf(row); - - if(displayIndex > -1){ - rows.splice(displayIndex, 1); - } - }); - - this.reRenderInPosition(); - - this.table.options.rowDeleted.call(this.table, row.getComponent()); - - this.table.options.dataEdited.call(this.table, this.getData()); - - if(this.table.options.groupBy && this.table.modExists("groupRows")){ - this.table.modules.groupRows.updateGroupRows(true); - }else if(this.table.options.pagination && this.table.modExists("page")){ - this.refreshActiveData(false, false, true); - }else{ - if(this.table.options.pagination && this.table.modExists("page")){ - this.refreshActiveData("page"); - } - } - -}; - -RowManager.prototype.addRow = function(data, pos, index, blockRedraw){ - - var row = this.addRowActual(data, pos, index, blockRedraw); - - if(this.table.options.history && this.table.modExists("history")){ - this.table.modules.history.action("rowAdd", row, {data:data, pos:pos, index:index}); - } - - return row; -}; - -//add multiple rows -RowManager.prototype.addRows = function(data, pos, index){ - var self = this, - length = 0, - rows = []; - - return new Promise((resolve, reject) => { - pos = this.findAddRowPos(pos); - - if(!Array.isArray(data)){ - data = [data]; - } - - length = data.length - 1; - - if((typeof index == "undefined" && pos) || (typeof index !== "undefined" && !pos)){ - data.reverse(); - } - - data.forEach(function(item, i){ - var row = self.addRow(item, pos, index, true); - rows.push(row); - }); - - if(this.table.options.groupBy && this.table.modExists("groupRows")){ - this.table.modules.groupRows.updateGroupRows(true); - }else if(this.table.options.pagination && this.table.modExists("page")){ - this.refreshActiveData(false, false, true); - }else{ - this.reRenderInPosition(); - } - - //recalc column calculations if present - if(this.table.modExists("columnCalcs")){ - this.table.modules.columnCalcs.recalc(this.table.rowManager.activeRows); - } - - resolve(rows); - }); -}; - -RowManager.prototype.findAddRowPos = function(pos){ - if(typeof pos === "undefined"){ - pos = this.table.options.addRowPos; - } - - if(pos === "pos"){ - pos = true; - } - - if(pos === "bottom"){ - pos = false; - } - - return pos; -}; - - -RowManager.prototype.addRowActual = function(data, pos, index, blockRedraw){ - var row = data instanceof Row ? data : new Row(data || {}, this), - top = this.findAddRowPos(pos), - dispRows; - - if(!index && this.table.options.pagination && this.table.options.paginationAddRow == "page"){ - dispRows = this.getDisplayRows(); - - if(top){ - if(dispRows.length){ - index = dispRows[0]; - }else{ - if(this.activeRows.length){ - index = this.activeRows[this.activeRows.length-1]; - top = false; - } - } - }else{ - if(dispRows.length){ - index = dispRows[dispRows.length - 1]; - top = dispRows.length < this.table.modules.page.getPageSize() ? false : true; - } - } - } - - if(index){ - index = this.findRow(index); - } - - if(this.table.options.groupBy && this.table.modExists("groupRows")){ - this.table.modules.groupRows.assignRowToGroup(row); - - var groupRows = row.getGroup().rows; - - if(groupRows.length > 1){ - - if(!index || (index && groupRows.indexOf(index) == -1)){ - if(top){ - if(groupRows[0] !== row){ - index = groupRows[0]; - this._moveRowInArray(row.getGroup().rows, row, index, top); - } - }else{ - if(groupRows[groupRows.length -1] !== row){ - index = groupRows[groupRows.length -1]; - this._moveRowInArray(row.getGroup().rows, row, index, top); - } - } - }else{ - this._moveRowInArray(row.getGroup().rows, row, index, top); - } - } - } - - if(index){ - let allIndex = this.rows.indexOf(index), - activeIndex = this.activeRows.indexOf(index); - - this.displayRowIterator(function(rows){ - var displayIndex = rows.indexOf(index); - - if(displayIndex > -1){ - rows.splice((top ? displayIndex : displayIndex + 1), 0, row); - } - }); - - if(activeIndex > -1){ - this.activeRows.splice((top ? activeIndex : activeIndex + 1), 0, row); - } - - if(allIndex > -1){ - this.rows.splice((top ? allIndex : allIndex + 1), 0, row); - } - - }else{ - - if(top){ - - this.displayRowIterator(function(rows){ - rows.unshift(row); - }); - - this.activeRows.unshift(row); - this.rows.unshift(row); - }else{ - this.displayRowIterator(function(rows){ - rows.push(row); - }); - - this.activeRows.push(row); - this.rows.push(row); - } - } - - this.setActiveRows(this.activeRows); - - this.table.options.rowAdded.call(this.table, row.getComponent()); - - this.table.options.dataEdited.call(this.table, this.getData()); - - if(!blockRedraw){ - this.reRenderInPosition(); - } - - return row; -}; - -RowManager.prototype.moveRow = function(from, to, after){ - if(this.table.options.history && this.table.modExists("history")){ - this.table.modules.history.action("rowMove", from, {pos:this.getRowPosition(from), to:to, after:after}); - } - - this.moveRowActual(from, to, after); - - this.table.options.rowMoved.call(this.table, from.getComponent()); -}; - - -RowManager.prototype.moveRowActual = function(from, to, after){ - var self = this; - this._moveRowInArray(this.rows, from, to, after); - this._moveRowInArray(this.activeRows, from, to, after); - - this.displayRowIterator(function(rows){ - self._moveRowInArray(rows, from, to, after); - }); - - if(this.table.options.groupBy && this.table.modExists("groupRows")){ - var toGroup = to.getGroup(); - var fromGroup = from.getGroup(); - - if(toGroup === fromGroup){ - this._moveRowInArray(toGroup.rows, from, to, after); - }else{ - if(fromGroup){ - fromGroup.removeRow(from); - } - - toGroup.insertRow(from, to, after); - } - } -}; - - -RowManager.prototype._moveRowInArray = function(rows, from, to, after){ - var fromIndex, toIndex, start, end; - - if(from !== to){ - - fromIndex = rows.indexOf(from); - - if (fromIndex > -1) { - - rows.splice(fromIndex, 1); - - toIndex = rows.indexOf(to); - - if (toIndex > -1) { - - if(after){ - rows.splice(toIndex+1, 0, from); - }else{ - rows.splice(toIndex, 0, from); - } - - }else{ - rows.splice(fromIndex, 0, from); - } - } - - //restyle rows - if(rows === this.getDisplayRows()){ - - start = fromIndex < toIndex ? fromIndex : toIndex; - end = toIndex > fromIndex ? toIndex : fromIndex +1; - - for(let i = start; i <= end; i++){ - if(rows[i]){ - this.styleRow(rows[i], i); - } - } - } - } -}; - -RowManager.prototype.clearData = function(){ - this.setData([]); -}; - -RowManager.prototype.getRowIndex = function(row){ - return this.findRowIndex(row, this.rows); -}; - - -RowManager.prototype.getDisplayRowIndex = function(row){ - var index = this.getDisplayRows().indexOf(row); - return index > -1 ? index : false; -}; - -RowManager.prototype.nextDisplayRow = function(row, rowOnly){ - var index = this.getDisplayRowIndex(row), - nextRow = false; - - - if(index !== false && index < this.displayRowsCount -1){ - nextRow = this.getDisplayRows()[index+1]; - } - - if(nextRow && (!(nextRow instanceof Row) || nextRow.type != "row")){ - return this.nextDisplayRow(nextRow, rowOnly); - } - - return nextRow; -}; - -RowManager.prototype.prevDisplayRow = function(row, rowOnly){ - var index = this.getDisplayRowIndex(row), - prevRow = false; - - if(index){ - prevRow = this.getDisplayRows()[index-1]; - } - - if(prevRow && (!(prevRow instanceof Row) || prevRow.type != "row")){ - return this.prevDisplayRow(prevRow, rowOnly); - } - - return prevRow; -}; - -RowManager.prototype.findRowIndex = function(row, list){ - var rowIndex; - - row = this.findRow(row); - - if(row){ - rowIndex = list.indexOf(row); - - if(rowIndex > -1){ - return rowIndex; - } - } - - return false; -}; - - -RowManager.prototype.getData = function(active, transform){ - var self = this, - output = []; - - var rows = active ? self.activeRows : self.rows; - - rows.forEach(function(row){ - output.push(row.getData(transform || "data")); - }); - - return output; -}; - -RowManager.prototype.getHtml = function(active){ - var data = this.getData(active), - columns = [], - header = "", - body = "", - table = ""; - - //build header row - this.table.columnManager.getColumns().forEach(function(column){ - var def = column.getDefinition(); - - if(column.visible && !def.hideInHtml){ - header += `${(def.title || "")}`; - columns.push(column); - } - }); - - //build body rows - data.forEach(function(rowData){ - var row = ""; - - columns.forEach(function(column){ - var value = column.getFieldValue(rowData); - - if(typeof value === "undefined" || value === null){ - value = ":"; - } - - row += `${value}`; - }); - - body += `${row}`; - }); - - //build table - table = ` - - ${header} - - ${body} -
`; - - return table; - }; - - RowManager.prototype.getComponents = function(active){ - var self = this, - output = []; - - var rows = active ? self.activeRows : self.rows; - - rows.forEach(function(row){ - output.push(row.getComponent()); - }); - - return output; - } - - RowManager.prototype.getDataCount = function(active){ - return active ? this.rows.length : this.activeRows.length; - }; - - RowManager.prototype._genRemoteRequest = function(){ - var self = this, - table = self.table, - options = table.options, - params = {}; - - if(table.modExists("page")){ - //set sort data if defined - if(options.ajaxSorting){ - let sorters = self.table.modules.sort.getSort(); - - sorters.forEach(function(item){ - delete item.column; - }); - - params[self.table.modules.page.paginationDataSentNames.sorters] = sorters; - } - - //set filter data if defined - if(options.ajaxFiltering){ - let filters = self.table.modules.filter.getFilters(true, true); - - params[self.table.modules.page.paginationDataSentNames.filters] = filters; - } - - - self.table.modules.ajax.setParams(params, true); - } - - table.modules.ajax.sendRequest() - .then((data)=>{ - self.setData(data); - }) - .catch((e)=>{}); - -}; - -//choose the path to refresh data after a filter update -RowManager.prototype.filterRefresh = function(){ - var table = this.table, - options = table.options, - left = this.scrollLeft; - - - if(options.ajaxFiltering){ - if(options.pagination == "remote" && table.modExists("page")){ - table.modules.page.reset(true); - table.modules.page.setPage(1); - }else if(options.ajaxProgressiveLoad){ - table.modules.ajax.loadData(); - }else{ - //assume data is url, make ajax call to url to get data - this._genRemoteRequest(); - } - }else{ - this.refreshActiveData("filter"); - } - - this.scrollHorizontal(left); -}; - -//choose the path to refresh data after a sorter update -RowManager.prototype.sorterRefresh = function(){ - var table = this.table, - options = this.table.options, - left = this.scrollLeft; - - if(options.ajaxSorting){ - if((options.pagination == "remote" || options.progressiveLoad) && table.modExists("page")){ - table.modules.page.reset(true); - table.modules.page.setPage(1); - }else if(options.ajaxProgressiveLoad){ - table.modules.ajax.loadData(); - }else{ - //assume data is url, make ajax call to url to get data - this._genRemoteRequest(); - } - }else{ - this.refreshActiveData("sort"); - } - - this.scrollHorizontal(left); -}; - -RowManager.prototype.scrollHorizontal = function(left){ - this.scrollLeft = left; - this.element.scrollLeft = left; - - if(this.table.options.groupBy){ - this.table.modules.groupRows.scrollHeaders(left); - } - - if(this.table.modExists("columnCalcs")){ - this.table.modules.columnCalcs.scrollHorizontal(left); - } -}; - -//set active data set -RowManager.prototype.refreshActiveData = function(stage, skipStage, renderInPosition){ - var self = this, - table = this.table, - displayIndex; - - if(!stage){ - stage = "all"; - } - - if(table.options.selectable && !table.options.selectablePersistence && table.modExists("selectRow")){ - table.modules.selectRow.deselectRows(); - } - - //cascade through data refresh stages - switch(stage){ - case "all": - - case "filter": - if(!skipStage){ - if(table.modExists("filter")){ - self.setActiveRows(table.modules.filter.filter(self.rows)); - }else{ - self.setActiveRows(self.rows.slice(0)); - } - }else{ - skipStage = false; - } - - case "sort": - if(!skipStage){ - if(table.modExists("sort")){ - table.modules.sort.sort(); - } - }else{ - skipStage = false; - } - - //generic stage to allow for pipeline trigger after the data manipulation stage - case "display": - this.resetDisplayRows(); - - case "freeze": - if(!skipStage){ - if(this.table.modExists("frozenRows")){ - if(table.modules.frozenRows.isFrozen()){ - if(!table.modules.frozenRows.getDisplayIndex()){ - table.modules.frozenRows.setDisplayIndex(this.getNextDisplayIndex()); - } - - displayIndex = table.modules.frozenRows.getDisplayIndex(); - - displayIndex = self.setDisplayRows(table.modules.frozenRows.getRows(this.getDisplayRows(displayIndex - 1)), displayIndex); - - if(displayIndex !== true){ - table.modules.frozenRows.setDisplayIndex(displayIndex); - } - } - } - }else{ - skipStage = false; - } - - case "group": - if(!skipStage){ - if(table.options.groupBy && table.modExists("groupRows")){ - - if(!table.modules.groupRows.getDisplayIndex()){ - table.modules.groupRows.setDisplayIndex(this.getNextDisplayIndex()); - } - - displayIndex = table.modules.groupRows.getDisplayIndex(); - - displayIndex = self.setDisplayRows(table.modules.groupRows.getRows(this.getDisplayRows(displayIndex - 1)), displayIndex); - - if(displayIndex !== true){ - table.modules.groupRows.setDisplayIndex(displayIndex); - } - } - }else{ - skipStage = false; - } - - - - case "tree": - - if(!skipStage){ - if(table.options.dataTree && table.modExists("dataTree")){ - if(!table.modules.dataTree.getDisplayIndex()){ - table.modules.dataTree.setDisplayIndex(this.getNextDisplayIndex()); - } - - displayIndex = table.modules.dataTree.getDisplayIndex(); - - displayIndex = self.setDisplayRows(table.modules.dataTree.getRows(this.getDisplayRows(displayIndex - 1)), displayIndex); - - if(displayIndex !== true){ - table.modules.dataTree.setDisplayIndex(displayIndex); - } - } - }else{ - skipStage = false; - } - - if(table.options.pagination && table.modExists("page") && !renderInPosition){ - if(table.modules.page.getMode() == "local"){ - table.modules.page.reset(); - } - } - - case "page": - if(!skipStage){ - if(table.options.pagination && table.modExists("page")){ - - if(!table.modules.page.getDisplayIndex()){ - table.modules.page.setDisplayIndex(this.getNextDisplayIndex()); - } - - displayIndex = table.modules.page.getDisplayIndex(); - - if(table.modules.page.getMode() == "local"){ - table.modules.page.setMaxRows(this.getDisplayRows(displayIndex - 1).length); - } - - - displayIndex = self.setDisplayRows(table.modules.page.getRows(this.getDisplayRows(displayIndex - 1)), displayIndex); - - if(displayIndex !== true){ - table.modules.page.setDisplayIndex(displayIndex); - } - } - }else{ - skipStage = false; - } - } - - - if(Tabulator.prototype.helpers.elVisible(self.element)){ - if(renderInPosition){ - self.reRenderInPosition(); - }else{ - self.renderTable(); - if(table.options.layoutColumnsOnNewData){ - self.table.columnManager.redraw(true); - } - } - } - - if(table.modExists("columnCalcs")){ - table.modules.columnCalcs.recalc(this.activeRows); - } -}; - -RowManager.prototype.setActiveRows = function(activeRows){ - this.activeRows = activeRows; - this.activeRowsCount = this.activeRows.length; -}; - -//reset display rows array -RowManager.prototype.resetDisplayRows = function(){ - this.displayRows = []; - - this.displayRows.push(this.activeRows.slice(0)); - - this.displayRowsCount = this.displayRows[0].length; - - if(this.table.modExists("frozenRows")){ - this.table.modules.frozenRows.setDisplayIndex(0); - } - - if(this.table.options.groupBy && this.table.modExists("groupRows")){ - this.table.modules.groupRows.setDisplayIndex(0); - } - - if(this.table.options.pagination && this.table.modExists("page")){ - this.table.modules.page.setDisplayIndex(0); - } -}; - - -RowManager.prototype.getNextDisplayIndex = function(){ - return this.displayRows.length; -}; - -//set display row pipeline data -RowManager.prototype.setDisplayRows = function(displayRows, index){ - - var output = true; - - if(index && typeof this.displayRows[index] != "undefined"){ - this.displayRows[index] = displayRows; - output = true; - }else{ - this.displayRows.push(displayRows); - output = index = this.displayRows.length -1; - } - - if(index == this.displayRows.length -1){ - this.displayRowsCount = this.displayRows[this.displayRows.length -1].length; - } - - return output; -}; - -RowManager.prototype.getDisplayRows = function(index){ - if(typeof index == "undefined"){ - return this.displayRows.length ? this.displayRows[this.displayRows.length -1] : []; - }else{ - return this.displayRows[index] || []; - } - -}; - -//repeat action accross display rows -RowManager.prototype.displayRowIterator = function(callback){ - this.displayRows.forEach(callback); - - this.displayRowsCount = this.displayRows[this.displayRows.length -1].length; -}; - -//return only actual rows (not group headers etc) -RowManager.prototype.getRows = function(){ - return this.rows; -}; - -///////////////// Table Rendering ///////////////// - -//trigger rerender of table in current position -RowManager.prototype.reRenderInPosition = function(callback){ - if(this.getRenderMode() == "virtual"){ - - var scrollTop = this.element.scrollTop; - var topRow = false; - var topOffset = false; - - var left = this.scrollLeft; - - var rows = this.getDisplayRows(); - - for(var i = this.vDomTop; i <= this.vDomBottom; i++){ - - if(rows[i]){ - var diff = scrollTop - rows[i].getElement().offsetTop; - - if(topOffset === false || Math.abs(diff) < topOffset){ - topOffset = diff; - topRow = i; - }else{ - break; - } - } - } - - if(callback){ - callback(); - } - - this._virtualRenderFill((topRow === false ? this.displayRowsCount - 1 : topRow), true, topOffset || 0); - - this.scrollHorizontal(left); - }else{ - this.renderTable(); - } -}; - -RowManager.prototype.setRenderMode = function(){ - if((this.table.element.clientHeight || this.table.options.height) && this.table.options.virtualDom){ - this.renderMode = "virtual"; - }else{ - this.renderMode = "classic"; - } -}; - - -RowManager.prototype.getRenderMode = function(){ - return this.renderMode; -}; - -RowManager.prototype.renderTable = function(){ - var self = this; - - self.table.options.renderStarted.call(this.table); - - self.element.scrollTop = 0; - - switch(self.renderMode){ - case "classic": - self._simpleRender(); - break; - - case "virtual": - self._virtualRenderFill(); - break; - } - - if(self.firstRender){ - if(self.displayRowsCount){ - self.firstRender = false; - self.table.modules.layout.layout(); - }else{ - self.renderEmptyScroll(); - } - } - - if(self.table.modExists("frozenColumns")){ - self.table.modules.frozenColumns.layout(); - } - - - if(!self.displayRowsCount){ - if(self.table.options.placeholder){ - - if(this.renderMode){ - self.table.options.placeholder.setAttribute("tabulator-render-mode", this.renderMode); - } - - self.getElement().appendChild(self.table.options.placeholder); - } - } - - self.table.options.renderComplete.call(this.table); -}; - -//simple render on heightless table -RowManager.prototype._simpleRender = function(){ - var self = this, - element = this.tableElement; - - self._clearVirtualDom(); - - if(self.displayRowsCount){ - - var onlyGroupHeaders = true; - - self.getDisplayRows().forEach(function(row, index){ - self.styleRow(row, index); - element.appendChild(row.getElement()); - row.initialize(true); - - if(row.type !== "group"){ - onlyGroupHeaders = false; - } - }); - - if(onlyGroupHeaders){ - element.style.minWidth = self.table.columnManager.getWidth() + "px"; - } - }else{ - self.renderEmptyScroll(); - } -}; - -//show scrollbars on empty table div -RowManager.prototype.renderEmptyScroll = function(){ - this.tableElement.style.minWidth = this.table.columnManager.getWidth(); - this.tableElement.style.minHeight = "1px"; - // this.tableElement.style.visibility = "hidden"; -}; - -RowManager.prototype._clearVirtualDom = function(){ - var element = this.tableElement; - - if(this.table.options.placeholder && this.table.options.placeholder.parentNode){ - this.table.options.placeholder.parentNode.removeChild(this.table.options.placeholder); - } - - // element.children.detach(); - while(element.firstChild) element.removeChild(element.firstChild); - - element.style.paddingTop = ""; - element.style.paddingBottom = ""; - element.style.minWidth = ""; - element.style.minHeight = ""; - element.style.visibility = ""; - - this.scrollTop = 0; - this.scrollLeft = 0; - this.vDomTop = 0; - this.vDomBottom = 0; - this.vDomTopPad = 0; - this.vDomBottomPad = 0; -}; - -RowManager.prototype.styleRow = function(row, index){ - var rowEl = row.getElement(); - - if(index % 2){ - rowEl.classList.add("tabulator-row-even"); - rowEl.classList.remove("tabulator-row-odd"); - }else{ - rowEl.classList.add("tabulator-row-odd"); - rowEl.classList.remove("tabulator-row-even"); - } -}; - -//full virtual render -RowManager.prototype._virtualRenderFill = function(position, forceMove, offset){ - var self = this, - element = self.tableElement, - holder = self.element, - topPad = 0, - rowsHeight = 0, - topPadHeight = 0, - i = 0, - onlyGroupHeaders = true, - rows = self.getDisplayRows(); - - position = position || 0; - - offset = offset || 0; - - if(!position){ - self._clearVirtualDom(); - }else{ - // element.children().detach(); - while(element.firstChild) element.removeChild(element.firstChild); - - //check if position is too close to bottom of table - let heightOccpied = (self.displayRowsCount - position + 1) * self.vDomRowHeight; - - if(heightOccpied < self.height){ - position -= Math.ceil((self.height - heightOccpied) / self.vDomRowHeight); - - if(position < 0){ - position = 0; - } - } - - //calculate initial pad - topPad = Math.min(Math.max(Math.floor(self.vDomWindowBuffer / self.vDomRowHeight), self.vDomWindowMinMarginRows), position); - position -= topPad; - } - - if(self.displayRowsCount && Tabulator.prototype.helpers.elVisible(self.element)){ - - self.vDomTop = position; - - self.vDomBottom = position -1; - - while ((rowsHeight <= self.height + self.vDomWindowBuffer || i < self.vDomWindowMinTotalRows) && self.vDomBottom < self.displayRowsCount -1){ - var index = self.vDomBottom + 1, - row = rows[index]; - - self.styleRow(row, index); - - element.appendChild(row.getElement()); - if(!row.initialized){ - row.initialize(true); - }else{ - if(!row.heightInitialized){ - row.normalizeHeight(true); - } - } - - if(i < topPad){ - topPadHeight += row.getHeight(); - }else{ - rowsHeight += row.getHeight(); - } - - if(row.type !== "group"){ - onlyGroupHeaders = false; - } - - self.vDomBottom ++; - i++; - } - - if(!position){ - this.vDomTopPad = 0; - //adjust rowheight to match average of rendered elements - self.vDomRowHeight = Math.floor((rowsHeight + topPadHeight) / i); - self.vDomBottomPad = self.vDomRowHeight * (self.displayRowsCount - self.vDomBottom -1); - - self.vDomScrollHeight = topPadHeight + rowsHeight + self.vDomBottomPad - self.height; - }else{ - self.vDomTopPad = !forceMove ? self.scrollTop - topPadHeight : (self.vDomRowHeight * this.vDomTop) + offset; - self.vDomBottomPad = self.vDomBottom == self.displayRowsCount-1 ? 0 : Math.max(self.vDomScrollHeight - self.vDomTopPad - rowsHeight - topPadHeight, 0); - } - - element.style.paddingTop = self.vDomTopPad + "px"; - element.style.paddingBottom = self.vDomBottomPad + "px"; - - if(forceMove){ - this.scrollTop = self.vDomTopPad + (topPadHeight) + offset - (this.element.scrollWidth > this.element.clientWidth ? this.element.offsetHeight - this.element.clientHeight : 0); - } - - this.scrollTop = Math.min(this.scrollTop, this.element.scrollHeight - this.height); - - //adjust for horizontal scrollbar if present - if(this.element.scrollWidth > this.element.offsetWidth){ - this.scrollTop += this.element.offsetHeight - this.element.clientHeight; - } - - this.vDomScrollPosTop = this.scrollTop; - this.vDomScrollPosBottom = this.scrollTop; - - holder.scrollTop = this.scrollTop; - - element.style.minWidth = onlyGroupHeaders ? self.table.columnManager.getWidth() + "px" : ""; - - if(self.table.options.groupBy){ - if(self.table.modules.layout.getMode() != "fitDataFill" && self.displayRowsCount == self.table.modules.groupRows.countGroups()){ - self.tableElement.style.minWidth = self.table.columnManager.getWidth(); - } - } - - }else{ - this.renderEmptyScroll(); - } -}; - -//handle vertical scrolling -RowManager.prototype.scrollVertical = function(dir){ - var topDiff = this.scrollTop - this.vDomScrollPosTop; - var bottomDiff = this.scrollTop - this.vDomScrollPosBottom; - var margin = this.vDomWindowBuffer * 2; - - if(-topDiff > margin || bottomDiff > margin){ - //if big scroll redraw table; - var left = this.scrollLeft; - this._virtualRenderFill(Math.floor((this.element.scrollTop / this.element.scrollHeight) * this.displayRowsCount)); - this.scrollHorizontal(left); - }else{ - - if(dir){ - //scrolling up - if(topDiff < 0){ - this._addTopRow(-topDiff); - } - - if(topDiff < 0){ - - //hide bottom row if needed - if(this.vDomScrollHeight - this.scrollTop > this.vDomWindowBuffer){ - this._removeBottomRow(-bottomDiff); - } - } - }else{ - //scrolling down - if(topDiff >= 0){ - - //hide top row if needed - if(this.scrollTop > this.vDomWindowBuffer){ - this._removeTopRow(topDiff); - } - } - - if(bottomDiff >= 0){ - this._addBottomRow(bottomDiff); - } - } - } -}; - -RowManager.prototype._addTopRow = function(topDiff, i=0){ - var table = this.tableElement, - rows = this.getDisplayRows(); - - if(this.vDomTop){ - let index = this.vDomTop -1, - topRow = rows[index], - topRowHeight = topRow.getHeight() || this.vDomRowHeight; - - //hide top row if needed - if(topDiff >= topRowHeight){ - this.styleRow(topRow, index); - table.insertBefore(topRow.getElement(), table.firstChild); - if(!topRow.initialized || !topRow.heightInitialized){ - this.vDomTopNewRows.push(topRow); - - if(!topRow.heightInitialized){ - topRow.clearCellHeight(); - } - } - topRow.initialize(); - - this.vDomTopPad -= topRowHeight; - - if(this.vDomTopPad < 0){ - this.vDomTopPad = index * this.vDomRowHeight; - } - - if(!index){ - this.vDomTopPad = 0; - } - - table.style.paddingTop = this.vDomTopPad + "px"; - this.vDomScrollPosTop -= topRowHeight; - this.vDomTop--; - } - - topDiff = -(this.scrollTop - this.vDomScrollPosTop); - - if(i < this.vDomMaxRenderChain && this.vDomTop && topDiff >= (rows[this.vDomTop -1].getHeight() || this.vDomRowHeight)){ - this._addTopRow(topDiff, i+1); - }else{ - this._quickNormalizeRowHeight(this.vDomTopNewRows); - } - - } - -}; - -RowManager.prototype._removeTopRow = function(topDiff){ - var table = this.tableElement, - topRow = this.getDisplayRows()[this.vDomTop], - topRowHeight = topRow.getHeight() || this.vDomRowHeight; - - if(topDiff >= topRowHeight){ - - var rowEl = topRow.getElement(); - rowEl.parentNode.removeChild(rowEl); - - this.vDomTopPad += topRowHeight; - table.style.paddingTop = this.vDomTopPad + "px"; - this.vDomScrollPosTop += this.vDomTop ? topRowHeight : topRowHeight + this.vDomWindowBuffer; - this.vDomTop++; - - topDiff = this.scrollTop - this.vDomScrollPosTop; - - this._removeTopRow(topDiff); - } - -}; - -RowManager.prototype._addBottomRow = function(bottomDiff, i=0){ - var table = this.tableElement, - rows = this.getDisplayRows(); - - if(this.vDomBottom < this.displayRowsCount -1){ - let index = this.vDomBottom + 1, - bottomRow = rows[index], - bottomRowHeight = bottomRow.getHeight() || this.vDomRowHeight; - - //hide bottom row if needed - if(bottomDiff >= bottomRowHeight){ - this.styleRow(bottomRow, index); - table.appendChild(bottomRow.getElement()); - - if(!bottomRow.initialized || !bottomRow.heightInitialized){ - this.vDomBottomNewRows.push(bottomRow); - - if(!bottomRow.heightInitialized){ - bottomRow.clearCellHeight(); - } - } - - bottomRow.initialize(); - - this.vDomBottomPad -= bottomRowHeight; - - if(this.vDomBottomPad < 0 || index == this.displayRowsCount -1){ - this.vDomBottomPad = 0; - } - - table.style.paddingBottom = this.vDomBottomPad + "px"; - this.vDomScrollPosBottom += bottomRowHeight; - this.vDomBottom++; - } - - bottomDiff = this.scrollTop - this.vDomScrollPosBottom; - - if(i < this.vDomMaxRenderChain && this.vDomBottom < this.displayRowsCount -1 && bottomDiff >= (rows[this.vDomBottom + 1].getHeight() || this.vDomRowHeight)){ - this._addBottomRow(bottomDiff, i+1); - }else{ - this._quickNormalizeRowHeight(this.vDomBottomNewRows); - } - } -}; - -RowManager.prototype._removeBottomRow = function(bottomDiff){ - var table = this.tableElement, - bottomRow = this.getDisplayRows()[this.vDomBottom], - bottomRowHeight = bottomRow.getHeight() || this.vDomRowHeight; - - if(bottomDiff >= bottomRowHeight){ - - var rowEl = bottomRow.getElement(); - - if(rowEl.parentNode){ - rowEl.parentNode.removeChild(rowEl); - } - - this.vDomBottomPad += bottomRowHeight; - - if(this.vDomBottomPad < 0){ - this.vDomBottomPad = 0; - } - - table.style.paddingBottom = this.vDomBottomPad + "px"; - this.vDomScrollPosBottom -= bottomRowHeight; - this.vDomBottom--; - - bottomDiff = -(this.scrollTop - this.vDomScrollPosBottom); - - this._removeBottomRow(bottomDiff); - } -}; - -RowManager.prototype._quickNormalizeRowHeight = function(rows){ - rows.forEach(function(row){ - row.calcHeight(); - }); - - rows.forEach(function(row){ - row.setCellHeight(); - }); - - rows.length = 0; -}; - -//normalize height of active rows -RowManager.prototype.normalizeHeight = function(){ - this.activeRows.forEach(function(row){ - row.normalizeHeight(); - }); -}; - -//adjust the height of the table holder to fit in the Tabulator element -RowManager.prototype.adjustTableSize = function(){ - - if(this.renderMode === "virtual"){ - this.height = this.element.clientHeight; - this.vDomWindowBuffer = this.table.options.virtualDomBuffer || this.height; - - let otherHeight = this.columnManager.getElement().offsetHeight + (this.table.footerManager && !this.table.footerManager.external ? this.table.footerManager.getElement().offsetHeight : 0); - - this.element.style.minHeight = "calc(100% - " + otherHeight + "px)"; - this.element.style.height = "calc(100% - " + otherHeight + "px)"; - this.element.style.maxHeight = "calc(100% - " + otherHeight + "px)"; - } -}; - -//renitialize all rows -RowManager.prototype.reinitialize = function(){ - this.rows.forEach(function(row){ - row.reinitialize(); - }); -}; - - -//redraw table -RowManager.prototype.redraw = function (force){ - var pos = 0, - left = this.scrollLeft; - - this.adjustTableSize(); - - if(!force){ - - if(self.renderMode == "classic"){ - - if(self.table.options.groupBy){ - self.refreshActiveData("group", false, false); - }else{ - this._simpleRender(); - } - - }else{ - this.reRenderInPosition(); - this.scrollHorizontal(left); - } - - if(!this.displayRowsCount){ - if(this.table.options.placeholder){ - this.getElement().appendChild(this.table.options.placeholder); - } - } - - }else{ - this.renderTable(); - } -}; - -RowManager.prototype.resetScroll = function(){ - this.element.scrollLeft = 0; - this.element.scrollTop = 0; - - if(this.table.browser === "ie"){ - var event = document.createEvent("Event"); - event.initEvent("scroll", false, true); - this.element.dispatchEvent(event); - }else{ - this.element.dispatchEvent(new Event('scroll')); - } -}; diff --git a/Gems/AssetMemoryAnalyzer/External/tabulator-master/src/scss/bootstrap/functions4.scss b/Gems/AssetMemoryAnalyzer/External/tabulator-master/src/scss/bootstrap/functions4.scss deleted file mode 100644 index ca2dea30d6..0000000000 --- a/Gems/AssetMemoryAnalyzer/External/tabulator-master/src/scss/bootstrap/functions4.scss +++ /dev/null @@ -1,118 +0,0 @@ -// Bootstrap functions -// -// Utility mixins and functions for evalutating source code across our variables, maps, and mixins. - -// Ascending -// Used to evaluate Sass maps like our grid breakpoints. -@mixin _assert-ascending($map, $map-name) { - $prev-key: null; - $prev-num: null; - @each $key, $num in $map { - @if $prev-num == null { - // Do nothing - } @else if not comparable($prev-num, $num) { - @warn "Potentially invalid value for #{$map-name}: This map must be in ascending order, but key '#{$key}' has value #{$num} whose unit makes it incomparable to #{$prev-num}, the value of the previous key '#{$prev-key}' !"; - } @else if $prev-num >= $num { - @warn "Invalid value for #{$map-name}: This map must be in ascending order, but key '#{$key}' has value #{$num} which isn't greater than #{$prev-num}, the value of the previous key '#{$prev-key}' !"; - } - $prev-key: $key; - $prev-num: $num; - } -} - -// Starts at zero -// Another grid mixin that ensures the min-width of the lowest breakpoint starts at 0. -@mixin _assert-starts-at-zero($map) { - $values: map-values($map); - $first-value: nth($values, 1); - @if $first-value != 0 { - @warn "First breakpoint in `$grid-breakpoints` must start at 0, but starts at #{$first-value}."; - } -} - -// Replace `$search` with `$replace` in `$string` -// Used on our SVG icon backgrounds for custom forms. -// -// @author Hugo Giraudel -// @param {String} $string - Initial string -// @param {String} $search - Substring to replace -// @param {String} $replace ('') - New value -// @return {String} - Updated string -@function str-replace($string, $search, $replace: "") { - $index: str-index($string, $search); - - @if $index { - @return str-slice($string, 1, $index - 1) + $replace + str-replace(str-slice($string, $index + str-length($search)), $search, $replace); - } - - @return $string; -} - -// Color contrast -@function color-yiq($color) { - $r: red($color); - $g: green($color); - $b: blue($color); - - $yiq: (($r * 299) + ($g * 587) + ($b * 114)) / 1000; - - @if ($yiq >= $yiq-contrasted-threshold) { - @return $yiq-text-dark; - } @else { - @return $yiq-text-light; - } -} - -// Retrieve color Sass maps -@function color($key: "blue") { - @return map-get($colors, $key); -} - -@function theme-color($key: "primary") { - @return map-get($theme-colors, $key); -} - -@function gray($key: "100") { - @return map-get($grays, $key); -} - -// Request a theme color level -@function theme-color-level($color-name: "primary", $level: 0) { - $color: theme-color($color-name); - $color-base: if($level > 0, $black, $white); - $level: abs($level); - - @return mix($color-base, $color, $level * $theme-color-interval); -} - - -// Tables - -@mixin table-row-variant($state, $background) { - // Exact selectors below required to override `.table-striped` and prevent - // inheritance to nested tables. - .table-#{$state} { - &, - > th, - > td { - background-color: $background; - } - } - - // Hover states for `.table-hover` - // Note: this is not available for cells or rows within `thead` or `tfoot`. - .table-hover { - $hover-background: darken($background, 5%); - - .table-#{$state} { - @include hover { - background-color: $hover-background; - - > td, - > th { - background-color: $hover-background; - } - } - } - } -} diff --git a/Gems/AssetMemoryAnalyzer/External/tabulator-master/src/scss/bootstrap/tabulator_bootstrap.scss b/Gems/AssetMemoryAnalyzer/External/tabulator-master/src/scss/bootstrap/tabulator_bootstrap.scss deleted file mode 100644 index afacfee1c7..0000000000 --- a/Gems/AssetMemoryAnalyzer/External/tabulator-master/src/scss/bootstrap/tabulator_bootstrap.scss +++ /dev/null @@ -1,1021 +0,0 @@ -@import "variables.scss"; - -// Style conversion file, bootstrap to tabulator - -//Main Theme Variables -$backgroundColor: $table-bg !default; //background color of tabulator -$borderColor:$table-border-color !default; //border to tabulator -$textSize:$font-size-base !default; //table text size - -//header themeing -$headerBackgroundColor:#fff !default; //border to tabulator -$headerSeperatorColor:$table-border-color !default; //header bottom seperator color - -$cellPadding:$table-cell-padding !default; //padding round header -$cellPaddingCondensed:$table-condensed-cell-padding !default; //padding round header - -//column header arrows -$sortArrowActive: #666 !default; -$sortArrowInactive: #bbb !default; - -//row themeing -$rowBackgroundColor:$backgroundColor !default; //table row background color -$rowAltBackgroundColor:$table-bg-accent !default; //table row background color -$rowBorderColor:$table-border-color !default; //table border color -$rowHoverBackground:$table-bg-hover !default; //row background color on hover - -$rowSelectedBackground: #9ABCEA !default; //row background color when selected -$rowSelectedBackgroundHover: #769BCC !default;//row background color when selected and hovered - - -$editBoxColor:#1D68CD !default; //border color for edit boxes -$errorColor:#dd0000 !default; //error indication - -//footer themeing -$footerBorderColor:$table-border-color !default; //footer border color -$footerSeperatorColor:$table-border-color !default; //footer bottom seperator color -$footerActiveColor:#d00 !default; //footer bottom active text color - - -//Tabulator Containing Element -.tabulator{ - position: relative; - background-color: $backgroundColor; - overflow:hidden; - font-size:$textSize; - text-align: left; - width: 100%; - max-width: 100%; - margin-bottom: $line-height-computed; - - -webkit-transform: translatez(0); - -moz-transform: translatez(0); - -ms-transform: translatez(0); - -o-transform: translatez(0); - transform: translatez(0); - - &[tabulator-layout="fitDataFill"]{ - .tabulator-tableHolder{ - .tabulator-table{ - min-width:100%; - } - } - } - - &.tabulator-block-select{ - user-select: none; - } - - //column header containing element - .tabulator-header{ - position:relative; - box-sizing: border-box; - - width:100%; - - border-bottom:2px solid $headerSeperatorColor; - background-color: $headerBackgroundColor; - font-weight:bold; - - white-space: nowrap; - overflow:hidden; - - -moz-user-select: none; - -khtml-user-select: none; - -webkit-user-select: none; - -o-user-select: none; - - //individual column header element - .tabulator-col{ - display:inline-block; - position:relative; - box-sizing:border-box; - background-color: $headerBackgroundColor; - text-align:left; - vertical-align: bottom; - overflow: hidden; - - &.tabulator-moving{ - position: absolute; - border:1px solid $headerSeperatorColor; - background:darken($headerBackgroundColor, 10%); - pointer-events: none; - } - - //hold content of column header - .tabulator-col-content{ - box-sizing:border-box; - position: relative; - padding:$cellPadding; - - //hold title of column header - .tabulator-col-title{ - box-sizing:border-box; - width: 100%; - - white-space: nowrap; - overflow: hidden; - text-overflow: ellipsis; - vertical-align:bottom; - - //element to hold title editor - .tabulator-title-editor{ - box-sizing: border-box; - width: 100%; - - border:1px solid #999; - - padding:1px; - - background: #fff; - } - } - - //column sorter arrow - .tabulator-arrow{ - display: inline-block; - position: absolute; - top:14px; - right:8px; - width: 0; - height: 0; - border-left: 6px solid transparent; - border-right: 6px solid transparent; - border-bottom: 6px solid $sortArrowInactive; - } - - } - - //complex header column group - &.tabulator-col-group{ - - //gelement to hold sub columns in column group - .tabulator-col-group-cols{ - position:relative; - display: flex; - - border-top:1px solid $borderColor; - overflow: hidden; - - .tabulator-col:last-child{ - margin-right:-1px; - } - } - } - - - //hide left resize handle on first column - &:first-child{ - .tabulator-col-resize-handle.prev{ - display: none; - } - } - - //placeholder element for sortable columns - &.ui-sortable-helper{ - position: absolute; - background-color:darken($headerBackgroundColor, 10%) !important; - border:1px solid $borderColor; - } - - //header filter containing element - .tabulator-header-filter{ - position: relative; - box-sizing: border-box; - margin-top:2px; - width:100%; - text-align: center; - - //styling adjustment for inbuilt editors - textarea{ - height:auto !important; - } - - svg{ - margin-top: 3px; - } - - input{ - &::-ms-clear { - width : 0; - height: 0; - } - } - } - - - //styling child elements for sortable columns - &.tabulator-sortable{ - .tabulator-col-title{ - padding-right:25px; - } - - &:hover{ - cursor:pointer; - background-color:darken($headerBackgroundColor, 10%); - } - - &[aria-sort="none"]{ - .tabulator-col-content .tabulator-arrow{ - border-top: none; - border-bottom: 6px solid $sortArrowInactive; - } - } - - &[aria-sort="asc"]{ - .tabulator-col-content .tabulator-arrow{ - border-top: none; - border-bottom: 6px solid $sortArrowActive; - } - } - - &[aria-sort="desc"]{ - .tabulator-col-content .tabulator-arrow{ - border-top: 6px solid $sortArrowActive; - border-bottom: none; - } - } - } - - &.tabulator-col-vertical{ - .tabulator-col-content{ - .tabulator-col-title{ - writing-mode: vertical-rl; - text-orientation: mixed; - - display:flex; - align-items:center; - justify-content:center; - } - } - - &.tabulator-col-vertical-flip{ - .tabulator-col-title{ - transform: rotate(180deg); - } - } - - &.tabulator-sortable{ - .tabulator-col-title{ - padding-right:0; - padding-top:20px; - } - - &.tabulator-col-vertical-flip{ - .tabulator-col-title{ - padding-right:0; - padding-bottom:20px; - } - - } - - .tabulator-arrow{ - right:calc(50% - 6px); - } - } - } - - } - - .tabulator-frozen{ - display: inline-block; - position: absolute; - - // background-color: inherit; - - z-index: 10; - - &.tabulator-frozen-left{ - border-right:2px solid $rowBorderColor; - } - - &.tabulator-frozen-right{ - border-left:2px solid $rowBorderColor; - } - } - - .tabulator-calcs-holder{ - box-sizing:border-box; - width:100%; - - background:lighten($headerBackgroundColor, 5%) !important; - - .tabulator-row{ - background:lighten($headerBackgroundColor, 5%) !important; - - .tabulator-col-resize-handle{ - display: none; - } - } - - border-top:1px solid $rowBorderColor; - border-bottom:1px solid $headerSeperatorColor; - - overflow: hidden; - } - - .tabulator-frozen-rows-holder{ - min-width:400%; - - &:empty{ - display: none; - } - } - } - - - - //scrolling element to hold table - .tabulator-tableHolder{ - position:relative; - width:100%; - white-space: nowrap; - overflow:auto; - -webkit-overflow-scrolling: touch; - - &:focus{ - outline: none; - } - - //default placeholder element - .tabulator-placeholder{ - box-sizing:border-box; - display: flex; - align-items:center; - - &[tabulator-render-mode="virtual"]{ - position: absolute; - top:0; - left:0; - height:100%; - } - - width:100%; - - span{ - display: inline-block; - - margin:0 auto; - padding:10px; - - color:#000; - font-weight: bold; - font-size: 20px; - } - } - - //element to hold table rows - .tabulator-table{ - position:relative; - display:inline-block; - background-color:$rowBackgroundColor; - white-space: nowrap; - overflow:visible; - - .tabulator-row{ - &.tabulator-calcs{ - font-weight: bold; - background:darken($rowAltBackgroundColor, 5%) !important; - - &.tabulator-calcs-top{ - border-bottom:2px solid $rowBorderColor; - } - - &.tabulator-calcs-bottom{ - border-top:2px solid $rowBorderColor; - } - } - } - } - } - - - //column resize handles - .tabulator-col-resize-handle{ - position:absolute; - right:0; - top:0; - bottom:0; - width:5px; - - &.prev{ - left:0; - right:auto; - } - - &:hover{ - cursor:ew-resize; - } - } - - - //footer element - .tabulator-footer{ - padding:5px 10px; - border-top:2px solid $footerSeperatorColor; - text-align:right; - font-weight:bold; - white-space:nowrap; - user-select:none; - - -moz-user-select: none; - -khtml-user-select: none; - -webkit-user-select: none; - -o-user-select: none; - - .tabulator-calcs-holder{ - box-sizing:border-box; - width:calc(100% + 20px); - margin:-5px -10px 5px -10px; - - text-align: left; - - background:lighten($backgroundColor, 5%) !important; - - .tabulator-row{ - background:lighten($backgroundColor, 5%) !important; - - .tabulator-col-resize-handle{ - display: none; - } - } - - border-bottom:1px solid $rowBorderColor; - border-top:1px solid $rowBorderColor; - - overflow: hidden; - - &:only-child{ - margin-bottom:-5px; - border-bottom:none; - } - } - - //pagination container element - .tabulator-pages{ - margin:0 7px; - } - - //pagination button - .tabulator-page{ - display:inline-block; - margin:0 2px; - border:1px solid $footerBorderColor; - border-radius:3px; - padding:2px 5px; - background:rgba(255,255,255,.2); - font-family:inherit; - font-weight:inherit; - font-size:inherit; - - - &.active{ - color:$footerActiveColor; - } - - &:disabled{ - opacity:.5; - } - - &:not(.disabled){ - &:hover{ - cursor:pointer; - background:rgba(0,0,0,.2); - color:#fff; - } - } - } - } - - //holding div that contains loader and covers tabulator element to prevent interaction - .tabulator-loader{ - position:absolute; - display: flex; - align-items:center; - - top:0; - left:0; - z-index:100; - - height:100%; - width:100%; - background:rgba(0,0,0,.4); - text-align:center; - - //loading message element - .tabulator-loader-msg{ - display:inline-block; - - margin:0 auto; - padding:10px 20px; - - border-radius:10px; - - background:#fff; - font-weight:bold; - font-size:16px; - - //loading message - &.tabulator-loading{ - border:4px solid #333; - color:#000; - } - - //error message - &.tabulator-error{ - border:4px solid #D00; - color:#590000; - } - } - } - - - - //Bootstrap theming classes - - &.table-striped{ - .tabulator-row{ - &:nth-child(even){ - background-color: $rowAltBackgroundColor; - } - } - } - - &.table-bordered{ - border:1px solid $borderColor; - - .tabulator-header{ - .tabulator-col{ - border-right:1px solid $borderColor; - } - } - - .tabulator-tableHolder{ - .tabulator-table{ - .tabulator-row{ - .tabulator-cell{ - border-right:1px solid $borderColor; - } - } - } - } - - } - - &.table-condensed{ - .tabulator-header{ - .tabulator-col{ - .tabulator-col-content{ - padding:$cellPaddingCondensed; - } - } - } - - .tabulator-tableHolder{ - .tabulator-table{ - .tabulator-row{ - min-height:$textSize + ($cellPaddingCondensed * 2); - - .tabulator-cell{ - padding:$cellPaddingCondensed; - } - } - } - } - } - - - //row colors - .tabulator-tableHolder{ - .tabulator-table{ - .tabulator-row{ - &.active{ - background:$table-bg-active!important; - } - &.success{ - background:$state-success-bg!important; - } - &.info{ - background: $state-info-bg!important; - } - &.warning{ - background:$state-warning-bg!important; - } - &.danger{ - background:$state-danger-bg!important; - } - } - } - } - -} - -//row element -.tabulator-row{ - position: relative; - box-sizing: border-box; - - min-height:$textSize + ($cellPadding * 2); - background-color: $rowBackgroundColor; - border-bottom:1px solid $rowBorderColor; - - &.tabulator-selectable:hover{ - background-color:$rowHoverBackground !important; - cursor: pointer; - } - - &.tabulator-selected{ - background-color:$rowSelectedBackground; - } - - &.tabulator-selected:hover{ - background-color:$rowSelectedBackgroundHover; - cursor: pointer; - } - - &.tabulator-moving{ - position: absolute; - - border-top:1px solid $rowBorderColor; - border-bottom:1px solid $rowBorderColor; - - pointer-events: none !important; - z-index:15; - } - - //row resize handles - .tabulator-row-resize-handle{ - position:absolute; - right:0; - bottom:0; - left:0; - height:5px; - - &.prev{ - top:0; - bottom:auto; - } - - &:hover{ - cursor:ns-resize; - } - } - - .tabulator-frozen{ - display: inline-block; - position: absolute; - - background-color: inherit; - - z-index: 10; - - &.tabulator-frozen-left{ - border-right:2px solid $rowBorderColor; - } - - &.tabulator-frozen-right{ - border-left:2px solid $rowBorderColor; - } - } - - - .tabulator-responsive-collapse{ - box-sizing:border-box; - - padding:5px; - - border-top:1px solid $rowBorderColor; - border-bottom:1px solid $rowBorderColor; - - &:empty{ - display:none; - } - - table{ - font-size:$textSize; - - tr{ - td{ - position: relative; - - &:first-of-type{ - padding-right:10px; - } - } - } - } - } - - - //cell element - .tabulator-cell{ - display:inline-block; - position: relative; - box-sizing:border-box; - padding:$cellPadding; - vertical-align:middle; - white-space:nowrap; - overflow:hidden; - text-overflow:ellipsis; - - &:last-of-type{ - border-right: none; - } - - &.tabulator-editing{ - border:1px solid $editBoxColor; - padding: 0; - - input, select{ - border:1px; - background:transparent; - } - } - - &.tabulator-validation-fail{ - border:1px solid $errorColor; - input, select{ - border:1px; - background:transparent; - - color: $errorColor; - } - } - - //hide left resize handle on first column - &:first-child{ - .tabulator-col-resize-handle.prev{ - display: none; - } - } - - //movable row handle - &.tabulator-row-handle{ - - display: inline-flex; - align-items:center; - - -moz-user-select: none; - -khtml-user-select: none; - -webkit-user-select: none; - -o-user-select: none; - - //handle holder - .tabulator-row-handle-box{ - width:80%; - - //Hamburger element - .tabulator-row-handle-bar{ - width:100%; - height:3px; - margin-top:2px; - background:#666; - } - } - } - - .tabulator-data-tree-branch{ - display:inline-block; - vertical-align:middle; - - height:9px; - width:7px; - - margin-top:-9px; - margin-right:5px; - - border-bottom-left-radius:1px; - - border-left:2px solid $rowBorderColor; - border-bottom:2px solid $rowBorderColor; - } - - .tabulator-data-tree-control{ - - display:inline-flex; - justify-content:center; - align-items:center; - vertical-align:middle; - - height:11px; - width:11px; - - margin-right:5px; - - border:1px solid #333; - border-radius:2px; - background:rgba(0, 0, 0, .1); - - overflow:hidden; - - &:hover{ - cursor:pointer; - background:rgba(0, 0, 0, .2); - } - - .tabulator-data-tree-control-collapse{ - display:inline-block; - position: relative; - - height: 7px; - width: 1px; - - background: transparent; - - &:after { - position: absolute; - content: ""; - left: -3px; - top: 3px; - - height: 1px; - width: 7px; - - background: #333; - } - } - - .tabulator-data-tree-control-expand{ - display:inline-block; - position: relative; - - height: 7px; - width: 1px; - - background: #333; - - &:after { - position: absolute; - content: ""; - left: -3px; - top: 3px; - - height: 1px; - width: 7px; - - background: #333; - } - } - - } - - .tabulator-responsive-collapse-toggle{ - display: inline-flex; - align-items:center; - justify-content:center; - - -moz-user-select: none; - -khtml-user-select: none; - -webkit-user-select: none; - -o-user-select: none; - - height:15px; - width:15px; - - border-radius:20px; - background:#666; - - color:$rowBackgroundColor; - font-weight:bold; - font-size:1.1em; - - &:hover{ - opacity:.7; - } - - &.open{ - .tabulator-responsive-collapse-toggle-close{ - display:initial; - } - - .tabulator-responsive-collapse-toggle-open{ - display:none; - } - } - - .tabulator-responsive-collapse-toggle-close{ - display:none; - } - } - } - //row grouping element - &.tabulator-group{ - - box-sizing:border-box; - border-bottom:1px solid #999; - border-right:1px solid $rowBorderColor; - border-top:1px solid #999; - padding:5px; - padding-left:10px; - background:#fafafa; - font-weight:bold; - - min-width: 100%; - - &:hover{ - cursor:pointer; - background-color:rgba(0,0,0,.1); - } - - &.tabulator-group-visible{ - .tabulator-arrow{ - margin-right:10px; - border-left: 6px solid transparent; - border-right: 6px solid transparent; - border-top: 6px solid $sortArrowActive; - border-bottom: 0; - } - } - - &.tabulator-group-level-1{ - .tabulator-arrow{ - margin-left:20px; - } - } - - &.tabulator-group-level-2{ - .tabulator-arrow{ - margin-left:40px; - } - } - - &.tabulator-group-level-3{ - .tabulator-arrow{ - margin-left:60px; - } - } - - &.tabulator-group-level-4{ - .tabulator-arrow{ - margin-left:80px; - } - } - - &.tabulator-group-level-5{ - .tabulator-arrow{ - margin-left:100px; - } - } - - //sorting arrow - .tabulator-arrow{ - display: inline-block; - width: 0; - height: 0; - margin-right:16px; - border-top: 6px solid transparent; - border-bottom: 6px solid transparent; - border-right: 0; - border-left: 6px solid $sortArrowActive; - vertical-align:middle; - } - - span{ - margin-left:10px; - color:#666; - } - } -} - -.tabulator-edit-select-list{ - position: absolute; - display:inline-block; - box-sizing:border-box; - - max-height:200px; - - background:$rowBackgroundColor; - border:1px solid $rowBorderColor; - - font-size:$textSize; - - overflow-y:auto; - -webkit-overflow-scrolling: touch; - - z-index: 10000; - - .tabulator-edit-select-list-item{ - padding:4px; - - &.active{ - color:$rowBackgroundColor; - background:$editBoxColor; - } - - &:hover{ - cursor:pointer; - - color:$rowBackgroundColor; - background:$editBoxColor; - } - } - - .tabulator-edit-select-list-group{ - border-bottom:1px solid $rowBorderColor; - - padding:4px; - padding-top:6px; - - font-weight:bold; - } -} \ No newline at end of file diff --git a/Gems/AssetMemoryAnalyzer/External/tabulator-master/src/scss/bootstrap/tabulator_bootstrap4.scss b/Gems/AssetMemoryAnalyzer/External/tabulator-master/src/scss/bootstrap/tabulator_bootstrap4.scss deleted file mode 100644 index 93823a2f56..0000000000 --- a/Gems/AssetMemoryAnalyzer/External/tabulator-master/src/scss/bootstrap/tabulator_bootstrap4.scss +++ /dev/null @@ -1,1215 +0,0 @@ -@import "functions4.scss"; -@import "variables4.scss"; - -// Style conversion file, bootstrap to tabulator - -//Main Theme Variables -$backgroundColor: $table-bg !default; //background color of tabulator -$borderColor:$table-border-color !default; //border to tabulator -$textSize:$font-size-base !default; //table text size - -//header themeing -$headerBackgroundColor:#fff !default; //border to tabulator -$headerSeperatorColor:$table-border-color !default; //header bottom seperator color - -$cellPadding:$table-cell-padding !default; //padding round header - -//column header arrows -$sortArrowActive: #666 !default; -$sortArrowInactive: #bbb !default; - -//row themeing -$rowBackgroundColor:$backgroundColor !default; //table row background color -$rowAltBackgroundColor: $table-accent-bg !default; //table row background color -$rowBorderColor:$table-border-color !default; //table border color -$rowHoverBackground:$table-hover-bg !default; //row background color on hover - -$rowSelectedBackground: #9ABCEA !default; //row background color when selected -$rowSelectedBackgroundHover: #769BCC !default;//row background color when selected and hovered - - -$editBoxColor:#1D68CD !default; //border color for edit boxes -$errorColor:#dd0000 !default; //error indication - -//footer themeing -$footerBorderColor:$pagination-border-color !default; //footer border color -$footerSeperatorColor:$table-border-color !default; //footer bottom seperator color -$footerActiveColor:$pagination-active-color !default; //footer bottom active text color - - -//Tabulator Containing Element -.tabulator{ - position: relative; - background-color: $backgroundColor; - overflow:hidden; - font-size:$textSize; - text-align: left; - width: 100%; - max-width: 100%; - // margin-bottom: $line-height-computed; - - -webkit-transform: translatez(0); - -moz-transform: translatez(0); - -ms-transform: translatez(0); - -o-transform: translatez(0); - transform: translatez(0); - - &[tabulator-layout="fitDataFill"]{ - .tabulator-tableHolder{ - .tabulator-table{ - min-width:100%; - } - } - } - - &.tabulator-block-select{ - user-select: none; - } - - //column header containing element - .tabulator-header{ - position:relative; - box-sizing: border-box; - - width:100%; - - border-top:1px solid $headerSeperatorColor; - border-bottom:2px solid $headerSeperatorColor; - background-color: $headerBackgroundColor; - font-weight:bold; - - white-space: nowrap; - overflow:hidden; - - -moz-user-select: none; - -khtml-user-select: none; - -webkit-user-select: none; - -o-user-select: none; - - //individual column header element - .tabulator-col{ - display:inline-block; - position:relative; - box-sizing:border-box; - background-color: $headerBackgroundColor; - text-align:left; - vertical-align: bottom; - overflow: hidden; - - &.tabulator-moving{ - position: absolute; - border:1px solid $headerSeperatorColor; - background:darken($headerBackgroundColor, 10%); - pointer-events: none; - } - - //hold content of column header - .tabulator-col-content{ - box-sizing:border-box; - position: relative; - padding:$cellPadding; - - //hold title of column header - .tabulator-col-title{ - box-sizing:border-box; - width: 100%; - - white-space: nowrap; - overflow: hidden; - text-overflow: ellipsis; - vertical-align:bottom; - - //element to hold title editor - .tabulator-title-editor{ - box-sizing: border-box; - width: 100%; - - border:1px solid #999; - - padding:1px; - - background: #fff; - } - } - - //column sorter arrow - .tabulator-arrow{ - display: inline-block; - position: absolute; - top:14px; - right:8px; - width: 0; - height: 0; - border-left: 6px solid transparent; - border-right: 6px solid transparent; - border-bottom: 6px solid $sortArrowInactive; - } - - } - - //complex header column group - &.tabulator-col-group{ - - //gelement to hold sub columns in column group - .tabulator-col-group-cols{ - position:relative; - display: flex; - - border-top:1px solid $borderColor; - overflow: hidden; - - .tabulator-col:last-child{ - margin-right:-1px; - } - } - } - - - //hide left resize handle on first column - &:first-child{ - .tabulator-col-resize-handle.prev{ - display: none; - } - } - - //placeholder element for sortable columns - &.ui-sortable-helper{ - position: absolute; - background-color:darken($headerBackgroundColor, 10%) !important; - border:1px solid $borderColor; - } - - //header filter containing element - .tabulator-header-filter{ - position: relative; - box-sizing: border-box; - margin-top:2px; - width:100%; - text-align: center; - - //styling adjustment for inbuilt editors - textarea{ - height:auto !important; - } - - svg{ - margin-top: 3px; - } - - input{ - &::-ms-clear { - width : 0; - height: 0; - } - } - } - - - //styling child elements for sortable columns - &.tabulator-sortable{ - .tabulator-col-title{ - padding-right:25px; - } - - &:hover{ - cursor:pointer; - background-color:darken($headerBackgroundColor, 10%); - } - - &[aria-sort="none"]{ - .tabulator-col-content .tabulator-arrow{ - border-top: none; - border-bottom: 6px solid $sortArrowInactive; - } - } - - &[aria-sort="asc"]{ - .tabulator-col-content .tabulator-arrow{ - border-top: none; - border-bottom: 6px solid $sortArrowActive; - } - } - - &[aria-sort="desc"]{ - .tabulator-col-content .tabulator-arrow{ - border-top: 6px solid $sortArrowActive; - border-bottom: none; - } - } - } - - &.tabulator-col-vertical{ - .tabulator-col-content{ - .tabulator-col-title{ - writing-mode: vertical-rl; - text-orientation: mixed; - - display:flex; - align-items:center; - justify-content:center; - } - } - - &.tabulator-col-vertical-flip{ - .tabulator-col-title{ - transform: rotate(180deg); - } - } - - &.tabulator-sortable{ - .tabulator-col-title{ - padding-right:0; - padding-top:20px; - } - - &.tabulator-col-vertical-flip{ - .tabulator-col-title{ - padding-right:0; - padding-bottom:20px; - } - - } - - .tabulator-arrow{ - right:calc(50% - 6px); - } - } - } - - } - - .tabulator-frozen{ - display: inline-block; - position: absolute; - - // background-color: inherit; - - z-index: 10; - - &.tabulator-frozen-left{ - border-right:2px solid $rowBorderColor; - } - - &.tabulator-frozen-right{ - border-left:2px solid $rowBorderColor; - } - } - - .tabulator-calcs-holder{ - box-sizing:border-box; - width:100%; - - background:lighten($headerBackgroundColor, 5%) !important; - - .tabulator-row{ - background:lighten($headerBackgroundColor, 5%) !important; - - .tabulator-col-resize-handle{ - display: none; - } - } - - border-top:1px solid $rowBorderColor; - border-bottom:1px solid $headerSeperatorColor; - - overflow: hidden; - } - - .tabulator-frozen-rows-holder{ - min-width:400%; - - &:empty{ - display: none; - } - } - } - - - - //scrolling element to hold table - .tabulator-tableHolder{ - position:relative; - width:100%; - white-space: nowrap; - overflow:auto; - -webkit-overflow-scrolling: touch; - - &:focus{ - outline: none; - } - - //default placeholder element - .tabulator-placeholder{ - box-sizing:border-box; - display: flex; - align-items:center; - - &[tabulator-render-mode="virtual"]{ - position: absolute; - top:0; - left:0; - height:100%; - } - - width:100%; - - span{ - display: inline-block; - - margin:0 auto; - padding:10px; - - color:#000; - font-weight: bold; - font-size: 20px; - } - } - - //element to hold table rows - .tabulator-table{ - position:relative; - display:inline-block; - background-color:$rowBackgroundColor; - white-space: nowrap; - overflow:visible; - - .tabulator-row{ - &.tabulator-calcs{ - font-weight: bold; - background:darken($rowAltBackgroundColor, 5%) !important; - - &.tabulator-calcs-top{ - border-bottom:2px solid $rowBorderColor; - } - - &.tabulator-calcs-bottom{ - border-top:2px solid $rowBorderColor; - } - } - } - } - } - - - //column resize handles - .tabulator-col-resize-handle{ - position:absolute; - right:0; - top:0; - bottom:0; - width:5px; - - &.prev{ - left:0; - right:auto; - } - - &:hover{ - cursor:ew-resize; - } - } - - - //footer element - .tabulator-footer{ - padding:5px 10px; - border-top:2px solid $footerSeperatorColor; - text-align:right; - font-weight:bold; - white-space:nowrap; - user-select:none; - - -moz-user-select: none; - -khtml-user-select: none; - -webkit-user-select: none; - -o-user-select: none; - - .tabulator-calcs-holder{ - box-sizing:border-box; - width:calc(100% + 20px); - margin:-5px -10px 5px -10px; - - text-align: left; - - background:lighten($backgroundColor, 5%) !important; - - .tabulator-row{ - background:lighten($backgroundColor, 5%) !important; - - .tabulator-col-resize-handle{ - display: none; - } - } - - border-bottom:1px solid $rowBorderColor; - border-top:1px solid $rowBorderColor; - - overflow: hidden; - - &:only-child{ - margin-bottom:-5px; - border-bottom:none; - } - } - - //pagination container element - .tabulator-pages{ - // margin:0 7px; - } - - //pagination button - .tabulator-page{ - display:inline-block; - - margin:0; - margin-top:5px; - padding:8px 12px; - - border:1px solid $footerBorderColor; - border-right:none; - - background:rgba(255,255,255,.2); - - color: $pagination-color; - font-family:inherit; - font-weight:normal; - font-size:inherit; - - &[data-page="first"]{ - border-top-left-radius:4px; - border-bottom-left-radius:4px; - } - - &[data-page="last"]{ - border:1px solid $footerBorderColor; - border-top-right-radius:4px; - border-bottom-right-radius:4px; - } - - &.active{ - border-color:$pagination-active-border-color; - background-color:$pagination-active-bg; - color:$footerActiveColor; - } - - &:disabled{ - border-color:$pagination-disabled-border-color; - background:$pagination-disabled-bg; - color:$pagination-disabled-color; - } - - &:not(.disabled){ - &:hover{ - cursor:pointer; - border-color:$pagination-hover-border-color; - background:$pagination-hover-bg; - color:$pagination-hover-color; - } - } - } - } - - //holding div that contains loader and covers tabulator element to prevent interaction - .tabulator-loader{ - position:absolute; - display: flex; - align-items:center; - - top:0; - left:0; - z-index:100; - - height:100%; - width:100%; - background:rgba(0,0,0,.4); - text-align:center; - - //loading message element - .tabulator-loader-msg{ - display:inline-block; - - margin:0 auto; - padding:10px 20px; - - border-radius:10px; - - background:#fff; - font-weight:bold; - font-size:16px; - - //loading message - &.tabulator-loading{ - border:4px solid #333; - color:#000; - } - - //error message - &.tabulator-error{ - border:4px solid #D00; - color:#590000; - } - } - } - - - - //Bootstrap theming classes - - &.thead-dark{ - .tabulator-header{ - border-color: $table-dark-border-color; - background-color: $table-dark-bg; - color: $table-dark-color; - - .tabulator-col{ - border-color: $table-dark-border-color; - background-color: $table-dark-bg; - color: $table-dark-color; - } - } - } - - &.table-dark{ - background-color: $table-dark-bg; - - &:not(.thead-light) .tabulator-header{ - border-color: $table-dark-border-color; - background-color: $table-dark-bg; - color: $table-dark-color; - - .tabulator-col{ - border-color: $table-dark-border-color; - background-color: $table-dark-bg; - color: $table-dark-color; - } - } - - .tabulator-tableHolder{ - color: $table-dark-color; - } - - - .tabulator-row{ - border-color: $table-dark-border-color; - - &:hover{ - background-color: $table-dark-hover-bg !important; - } - } - } - - &.table-striped{ - .tabulator-row{ - &:nth-child(even){ - background-color: $rowAltBackgroundColor; - - &.tabulator-selected{ - background-color:$rowSelectedBackground; - } - - &.tabulator-selectable:hover{ - background-color:$rowHoverBackground; - cursor: pointer; - } - - &.tabulator-selected:hover{ - background-color:$rowSelectedBackgroundHover; - cursor: pointer; - } - } - } - - &.table-dark{ - .tabulator-row{ - &:nth-child(even){ - background-color: $table-dark-accent-bg; - } - } - } - } - - &.table-bordered{ - border:1px solid $borderColor; - - .tabulator-header{ - .tabulator-col{ - border-right:1px solid $borderColor; - } - } - - .tabulator-tableHolder{ - .tabulator-table{ - .tabulator-row{ - .tabulator-cell{ - border-right:1px solid $borderColor; - } - } - } - } - } - - - &.table-borderless{ - .tabulator-header{ - border:none; - } - - .tabulator-row{ - border:none; - } - } - - &.table-sm{ - .tabulator-header{ - .tabulator-col{ - .tabulator-col-content{ - padding:$table-cell-padding-sm !important; - } - } - } - - .tabulator-tableHolder{ - .tabulator-table{ - .tabulator-row{ - min-height:$textSize + ($table-cell-padding-sm * 2); - - .tabulator-cell{ - padding:$table-cell-padding-sm !important; - } - } - } - } - } - - - //row colors - .tabulator-tableHolder{ - .tabulator-table{ - .tabulator-row{ - &.table-primary{ - background:theme-color-level("primary", -9) !important; - } - &.table-secondary{ - background:theme-color-level("secondary", -9) !important; - } - &.table-success{ - background:theme-color-level("success", -9) !important; - } - &.table-info{ - background:theme-color-level("info", -9) !important; - } - &.table-warning{ - background:theme-color-level("warning", -9) !important; - } - &.table-danger{ - background:theme-color-level("danger", -9) !important; - } - &.table-light{ - background:theme-color-level("light", -9) !important; - } - &.table-dark{ - background:theme-color-level("dark", -9) !important; - } - &.table-active{ - background:$table-active-bg !important; - } - - &.bg-primary{ - background:theme-color-level("primary", 0) !important; - } - &.bg-secondary{ - background:theme-color-level("secondary", 0) !important; - } - &.bg-success{ - background:theme-color-level("success", 0) !important; - } - &.bg-info{ - background:theme-color-level("info", 0) !important; - } - &.bg-warning{ - background:theme-color-level("warning", 0) !important; - } - &.bg-danger{ - background:theme-color-level("danger", 0) !important; - } - &.bg-light{ - background:theme-color-level("light", 0) !important; - } - &.bg-dark{ - background:theme-color-level("dark", 0) !important; - } - &.bg-active{ - background:$table-active-bg !important; - } - - .tabulator-cell{ - &.table-primary{ - background:theme-color-level("primary", -9) !important; - } - &.table-secondary{ - background:theme-color-level("secondary", -9) !important; - } - &.table-success{ - background:theme-color-level("success", -9) !important; - } - &.table-info{ - background:theme-color-level("info", -9) !important; - } - &.table-warning{ - background:theme-color-level("warning", -9) !important; - } - &.table-danger{ - background:theme-color-level("danger", -9) !important; - } - &.table-light{ - background:theme-color-level("light", -9) !important; - } - &.table-dark{ - background:theme-color-level("dark", -9) !important; - } - &.table-active{ - background:$table-active-bg !important; - } - - &.bg-primary{ - background:theme-color-level("primary", 0) !important; - } - &.bg-secondary{ - background:theme-color-level("secondary", 0) !important; - } - &.bg-success{ - background:theme-color-level("success", 0) !important; - } - &.bg-info{ - background:theme-color-level("info", 0) !important; - } - &.bg-warning{ - background:theme-color-level("warning", 0) !important; - } - &.bg-danger{ - background:theme-color-level("danger", 0) !important; - } - &.bg-light{ - background:theme-color-level("light", 0) !important; - } - &.bg-dark{ - background:theme-color-level("dark", 0) !important; - } - &.bg-active{ - background:$table-active-bg !important; - } - } - } - } - } - -} - -//row element -.tabulator-row{ - position: relative; - box-sizing: border-box; - - min-height:$textSize + ($cellPadding * 2); - background-color: $rowBackgroundColor; - border-bottom:1px solid $rowBorderColor; - - &.tabulator-selectable:hover{ - background-color:$rowHoverBackground; - cursor: pointer; - } - - &.tabulator-selected{ - background-color:$rowSelectedBackground; - } - - &.tabulator-selected:hover{ - background-color:$rowSelectedBackgroundHover; - cursor: pointer; - } - - &.tabulator-moving{ - position: absolute; - - border-top:1px solid $rowBorderColor; - border-bottom:1px solid $rowBorderColor; - - pointer-events: none !important; - z-index:15; - } - - //row resize handles - .tabulator-row-resize-handle{ - position:absolute; - right:0; - bottom:0; - left:0; - height:5px; - - &.prev{ - top:0; - bottom:auto; - } - - &:hover{ - cursor:ns-resize; - } - } - - .tabulator-frozen{ - display: inline-block; - position: absolute; - - background-color: inherit; - - z-index: 10; - - &.tabulator-frozen-left{ - border-right:2px solid $rowBorderColor; - } - - &.tabulator-frozen-right{ - border-left:2px solid $rowBorderColor; - } - } - - .tabulator-responsive-collapse{ - box-sizing:border-box; - - padding:5px; - - border-top:1px solid $rowBorderColor; - border-bottom:1px solid $rowBorderColor; - - &:empty{ - display:none; - } - - table{ - font-size:$textSize; - - tr{ - td{ - position: relative; - - &:first-of-type{ - padding-right:10px; - } - } - } - } - } - - //cell element - .tabulator-cell{ - display:inline-block; - position: relative; - box-sizing:border-box; - padding:$cellPadding; - vertical-align:middle; - white-space:nowrap; - overflow:hidden; - text-overflow:ellipsis; - - &:last-of-type{ - border-right: none; - } - - &.tabulator-editing{ - border:1px solid $editBoxColor; - padding: 0; - - input, select{ - border:1px; - background:transparent; - } - } - - &.tabulator-validation-fail{ - border:1px solid $errorColor; - input, select{ - border:1px; - background:transparent; - - color: $errorColor; - } - } - - //hide left resize handle on first column - &:first-child{ - .tabulator-col-resize-handle.prev{ - display: none; - } - } - - //movable row handle - &.tabulator-row-handle{ - - display: inline-flex; - align-items:center; - - -moz-user-select: none; - -khtml-user-select: none; - -webkit-user-select: none; - -o-user-select: none; - - //handle holder - .tabulator-row-handle-box{ - width:80%; - - //Hamburger element - .tabulator-row-handle-bar{ - width:100%; - height:3px; - margin-top:2px; - background:#666; - } - } - } - - .tabulator-data-tree-branch{ - display:inline-block; - vertical-align:middle; - - height:9px; - width:7px; - - margin-top:-9px; - margin-right:5px; - - border-bottom-left-radius:1px; - - border-left:2px solid $rowBorderColor; - border-bottom:2px solid $rowBorderColor; - } - - .tabulator-data-tree-control{ - - display:inline-flex; - justify-content:center; - align-items:center; - vertical-align:middle; - - height:11px; - width:11px; - - margin-right:5px; - - border:1px solid #ccc; - border-radius:2px; - background:rgba(0, 0, 0, .1); - - overflow:hidden; - - &:hover{ - cursor:pointer; - background:rgba(0, 0, 0, .2); - } - - .tabulator-data-tree-control-collapse{ - display:inline-block; - position: relative; - - height: 7px; - width: 1px; - - background: transparent; - - &:after { - position: absolute; - content: ""; - left: -3px; - top: 3px; - - height: 1px; - width: 7px; - - background: #ccc; - } - } - - .tabulator-data-tree-control-expand{ - display:inline-block; - position: relative; - - height: 7px; - width: 1px; - - background: #ccc; - - &:after { - position: absolute; - content: ""; - left: -3px; - top: 3px; - - height: 1px; - width: 7px; - - background: #ccc; - } - } - - } - - .tabulator-responsive-collapse-toggle{ - display: inline-flex; - align-items:center; - justify-content:center; - - -moz-user-select: none; - -khtml-user-select: none; - -webkit-user-select: none; - -o-user-select: none; - - height:15px; - width:15px; - - border-radius:20px; - background:#666; - - color:$rowBackgroundColor; - font-weight:bold; - font-size:1.1em; - - &:hover{ - opacity:.7; - } - - &.open{ - .tabulator-responsive-collapse-toggle-close{ - display:initial; - } - - .tabulator-responsive-collapse-toggle-open{ - display:none; - } - } - - .tabulator-responsive-collapse-toggle-close{ - display:none; - } - } - } - - //row grouping element - &.tabulator-group{ - - box-sizing:border-box; - border-bottom:1px solid #999; - border-right:1px solid $rowBorderColor; - border-top:1px solid #999; - padding:5px; - padding-left:10px; - background:#fafafa; - font-weight:bold; - - min-width: 100%; - - &:hover{ - cursor:pointer; - background-color:rgba(0,0,0,.1); - } - - &.tabulator-group-visible{ - .tabulator-arrow{ - margin-right:10px; - border-left: 6px solid transparent; - border-right: 6px solid transparent; - border-top: 6px solid $sortArrowActive; - border-bottom: 0; - } - } - - &.tabulator-group-level-1{ - .tabulator-arrow{ - margin-left:20px; - } - } - - &.tabulator-group-level-2{ - .tabulator-arrow{ - margin-left:40px; - } - } - - &.tabulator-group-level-3{ - .tabulator-arrow{ - margin-left:60px; - } - } - - &.tabulator-group-level-4{ - .tabulator-arrow{ - margin-left:80px; - } - } - - &.tabulator-group-level-5{ - .tabulator-arrow{ - margin-left:100px; - } - } - - //sorting arrow - .tabulator-arrow{ - display: inline-block; - width: 0; - height: 0; - margin-right:16px; - border-top: 6px solid transparent; - border-bottom: 6px solid transparent; - border-right: 0; - border-left: 6px solid $sortArrowActive; - vertical-align:middle; - } - - span{ - margin-left:10px; - color:#666; - } - } -} - -.tabulator-edit-select-list{ - position: absolute; - display:inline-block; - box-sizing:border-box; - - max-height:200px; - - background:$rowBackgroundColor; - border:1px solid $rowBorderColor; - - font-size:$textSize; - - overflow-y:auto; - -webkit-overflow-scrolling: touch; - - z-index: 10000; - - .tabulator-edit-select-list-item{ - padding:4px; - - &.active{ - color:$rowBackgroundColor; - background:$editBoxColor; - } - - &:hover{ - cursor:pointer; - - color:$rowBackgroundColor; - background:$editBoxColor; - } - } - - .tabulator-edit-select-list-group{ - border-bottom:1px solid $rowBorderColor; - - padding:4px; - padding-top:6px; - - font-weight:bold; - } -} \ No newline at end of file diff --git a/Gems/AssetMemoryAnalyzer/External/tabulator-master/src/scss/bootstrap/variables.scss b/Gems/AssetMemoryAnalyzer/External/tabulator-master/src/scss/bootstrap/variables.scss deleted file mode 100644 index 572c983d08..0000000000 --- a/Gems/AssetMemoryAnalyzer/External/tabulator-master/src/scss/bootstrap/variables.scss +++ /dev/null @@ -1,870 +0,0 @@ -// -// Variables -// -------------------------------------------------- - - -//== Colors -// -//## Gray and brand colors for use across Bootstrap. - -$gray-base: #000 !default; -$gray-darker: lighten($gray-base, 13.5%) !default; // #222 -$gray-dark: lighten($gray-base, 20%) !default; // #333 -$gray: lighten($gray-base, 33.5%) !default; // #555 -$gray-light: lighten($gray-base, 46.7%) !default; // #777 -$gray-lighter: lighten($gray-base, 93.5%) !default; // #eee - -$brand-primary: darken(#428bca, 6.5%) !default; // #337ab7 -$brand-success: #5cb85c !default; -$brand-info: #5bc0de !default; -$brand-warning: #f0ad4e !default; -$brand-danger: #d9534f !default; - - -//== Scaffolding -// -//## Settings for some of the most global styles. - -//** Background color for ``. -$body-bg: #fff !default; -//** Global text color on ``. -$text-color: $gray-dark !default; - -//** Global textual link color. -$link-color: $brand-primary !default; -//** Link hover color set via `darken()` function. -$link-hover-color: darken($link-color, 15%) !default; -//** Link hover decoration. -$link-hover-decoration: underline !default; - - -//== Typography -// -//## Font, line-height, and color for body text, headings, and more. - -$font-family-sans-serif: "Helvetica Neue", Helvetica, Arial, sans-serif !default; -$font-family-serif: Georgia, "Times New Roman", Times, serif !default; -//** Default monospace fonts for ``, ``, and `
`.
-$font-family-monospace:   Menlo, Monaco, Consolas, "Courier New", monospace !default;
-$font-family-base:        $font-family-sans-serif !default;
-
-$font-size-base:          14px !default;
-$font-size-large:         ceil(($font-size-base * 1.25)) !default; // ~18px
-$font-size-small:         ceil(($font-size-base * 0.85)) !default; // ~12px
-
-$font-size-h1:            floor(($font-size-base * 2.6)) !default; // ~36px
-$font-size-h2:            floor(($font-size-base * 2.15)) !default; // ~30px
-$font-size-h3:            ceil(($font-size-base * 1.7)) !default; // ~24px
-$font-size-h4:            ceil(($font-size-base * 1.25)) !default; // ~18px
-$font-size-h5:            $font-size-base !default;
-$font-size-h6:            ceil(($font-size-base * 0.85)) !default; // ~12px
-
-//** Unit-less `line-height` for use in components like buttons.
-$line-height-base:        1.428571429 !default; // 20/14
-//** Computed "line-height" (`font-size` * `line-height`) for use with `margin`, `padding`, etc.
-$line-height-computed:    floor(($font-size-base * $line-height-base)) !default; // ~20px
-
-//** By default, this inherits from the ``.
-$headings-font-family:    inherit !default;
-$headings-font-weight:    500 !default;
-$headings-line-height:    1.1 !default;
-$headings-color:          inherit !default;
-
-
-//== Iconography
-//
-//## Specify custom location and filename of the included Glyphicons icon font. Useful for those including Bootstrap via Bower.
-
-//** Load fonts from this directory.
-$icon-font-path:          "../fonts/" !default;
-//** File name for all font files.
-$icon-font-name:          "glyphicons-halflings-regular" !default;
-//** Element ID within SVG icon file.
-$icon-font-svg-id:        "glyphicons_halflingsregular" !default;
-
-
-//== Components
-//
-//## Define common padding and border radius sizes and more. Values based on 14px text and 1@mixin 428 line-height (~20px to start).
-
-$padding-base-vertical:     6px !default;
-$padding-base-horizontal:   12px !default;
-
-$padding-large-vertical:    10px !default;
-$padding-large-horizontal:  16px !default;
-
-$padding-small-vertical:    5px !default;
-$padding-small-horizontal:  10px !default;
-
-$padding-xs-vertical:       1px !default;
-$padding-xs-horizontal:     5px !default;
-
-$line-height-large:         1.3333333 !default; // extra decimals for Win 8.1 Chrome
-$line-height-small:         1.5 !default;
-
-$border-radius-base:        4px !default;
-$border-radius-large:       6px !default;
-$border-radius-small:       3px !default;
-
-//** Global color for active items (e.g., navs or dropdowns).
-$component-active-color:    #fff !default;
-//** Global background color for active items (e.g., navs or dropdowns).
-$component-active-bg:       $brand-primary !default;
-
-//** Width of the `border` for generating carets that indicator dropdowns.
-$caret-width-base:          4px !default;
-//** Carets increase slightly in size for larger components.
-$caret-width-large:         5px !default;
-
-
-//== Tables
-//
-//## Customizes the `.table` component with basic values, each used across all table variations.
-
-//** Padding for ``s and ``s.
-$table-cell-padding:            8px !default;
-//** Padding for cells in `.table-condensed`.
-$table-condensed-cell-padding:  5px !default;
-
-//** Default background color used for all tables.
-// $table-bg:                      transparent !default;
-$table-bg:                      #fff !default;
-//** Background color used for `.table-striped`.
-$table-bg-accent:               #f9f9f9 !default;
-//** Background color used for `.table-hover`.
-$table-bg-hover:                #f5f5f5 !default;
-$table-bg-active:               $table-bg-hover !default;
-
-//** Border color for table and cell borders.
-$table-border-color:            #ddd !default;
-
-
-//== Buttons
-//
-//## For each of Bootstrap's buttons, define text, background and border color.
-
-$btn-font-weight:                normal !default;
-
-$btn-default-color:              #333 !default;
-$btn-default-bg:                 #fff !default;
-$btn-default-border:             #ccc !default;
-
-$btn-primary-color:              #fff !default;
-$btn-primary-bg:                 $brand-primary !default;
-$btn-primary-border:             darken($btn-primary-bg, 5%) !default;
-
-$btn-success-color:              #fff !default;
-$btn-success-bg:                 $brand-success !default;
-$btn-success-border:             darken($btn-success-bg, 5%) !default;
-
-$btn-info-color:                 #fff !default;
-$btn-info-bg:                    $brand-info !default;
-$btn-info-border:                darken($btn-info-bg, 5%) !default;
-
-$btn-warning-color:              #fff !default;
-$btn-warning-bg:                 $brand-warning !default;
-$btn-warning-border:             darken($btn-warning-bg, 5%) !default;
-
-$btn-danger-color:               #fff !default;
-$btn-danger-bg:                  $brand-danger !default;
-$btn-danger-border:              darken($btn-danger-bg, 5%) !default;
-
-$btn-link-disabled-color:        $gray-light !default;
-
-// Allows for customizing button radius independently from global border radius
-$btn-border-radius-base:         $border-radius-base !default;
-$btn-border-radius-large:        $border-radius-large !default;
-$btn-border-radius-small:        $border-radius-small !default;
-
-
-//== Forms
-//
-//##
-
-//** `` background color
-$input-bg:                       #fff !default;
-//** `` background color
-$input-bg-disabled:              $gray-lighter !default;
-
-//** Text color for ``s
-$input-color:                    $gray !default;
-//** `` border color
-$input-border:                   #ccc !default;
-
-// TODO: Rename `$input-border-radius` to `$input-border-radius-base` in v4
-//** Default `.form-control` border radius
-// This has no effect on ``s in CSS.
-$input-border-radius:            $border-radius-base !default;
-//** Large `.form-control` border radius
-$input-border-radius-large:      $border-radius-large !default;
-//** Small `.form-control` border radius
-$input-border-radius-small:      $border-radius-small !default;
-
-//** Border color for inputs on focus
-$input-border-focus:             #66afe9 !default;
-
-//** Placeholder text color
-$input-color-placeholder:        #999 !default;
-
-//** Default `.form-control` height
-$input-height-base:              ($line-height-computed + ($padding-base-vertical * 2) + 2) !default;
-//** Large `.form-control` height
-$input-height-large:             (ceil($font-size-large * $line-height-large) + ($padding-large-vertical * 2) + 2) !default;
-//** Small `.form-control` height
-$input-height-small:             (floor($font-size-small * $line-height-small) + ($padding-small-vertical * 2) + 2) !default;
-
-//** `.form-group` margin
-$form-group-margin-bottom:       15px !default;
-
-$legend-color:                   $gray-dark !default;
-$legend-border-color:            #e5e5e5 !default;
-
-//** Background color for textual input addons
-$input-group-addon-bg:           $gray-lighter !default;
-//** Border color for textual input addons
-$input-group-addon-border-color: $input-border !default;
-
-//** Disabled cursor for form controls and buttons.
-$cursor-disabled:                not-allowed !default;
-
-
-//== Dropdowns
-//
-//## Dropdown menu container and contents.
-
-//** Background for the dropdown menu.
-$dropdown-bg:                    #fff !default;
-//** Dropdown menu `border-color`.
-$dropdown-border:                rgba(0,0,0,.15) !default;
-//** Dropdown menu `border-color` **for IE8**.
-$dropdown-fallback-border:       #ccc !default;
-//** Divider color for between dropdown items.
-$dropdown-divider-bg:            #e5e5e5 !default;
-
-//** Dropdown link text color.
-$dropdown-link-color:            $gray-dark !default;
-//** Hover color for dropdown links.
-$dropdown-link-hover-color:      darken($gray-dark, 5%) !default;
-//** Hover background for dropdown links.
-$dropdown-link-hover-bg:         #f5f5f5 !default;
-
-//** Active dropdown menu item text color.
-$dropdown-link-active-color:     $component-active-color !default;
-//** Active dropdown menu item background color.
-$dropdown-link-active-bg:        $component-active-bg !default;
-
-//** Disabled dropdown menu item background color.
-$dropdown-link-disabled-color:   $gray-light !default;
-
-//** Text color for headers within dropdown menus.
-$dropdown-header-color:          $gray-light !default;
-
-//** Deprecated `$dropdown-caret-color` as of v3.1.0
-$dropdown-caret-color:           #000 !default;
-
-
-//-- Z-index master list
-//
-// Warning: Avoid customizing these values. They're used for a bird's eye view
-// of components dependent on the z-axis and are designed to all work together.
-//
-// Note: These variables are not generated into the Customizer.
-
-$zindex-navbar:            1000 !default;
-$zindex-dropdown:          1000 !default;
-$zindex-popover:           1060 !default;
-$zindex-tooltip:           1070 !default;
-$zindex-navbar-fixed:      1030 !default;
-$zindex-modal-background:  1040 !default;
-$zindex-modal:             1050 !default;
-
-
-//== Media queries breakpoints
-//
-//## Define the breakpoints at which your layout will change, adapting to different screen sizes.
-
-// Extra small screen / phone
-//** Deprecated `$screen-xs` as of v3.0.1
-$screen-xs:                  480px !default;
-//** Deprecated `$screen-xs-min` as of v3.2.0
-$screen-xs-min:              $screen-xs !default;
-//** Deprecated `$screen-phone` as of v3.0.1
-$screen-phone:               $screen-xs-min !default;
-
-// Small screen / tablet
-//** Deprecated `$screen-sm` as of v3.0.1
-$screen-sm:                  768px !default;
-$screen-sm-min:              $screen-sm !default;
-//** Deprecated `$screen-tablet` as of v3.0.1
-$screen-tablet:              $screen-sm-min !default;
-
-// Medium screen / desktop
-//** Deprecated `$screen-md` as of v3.0.1
-$screen-md:                  992px !default;
-$screen-md-min:              $screen-md !default;
-//** Deprecated `$screen-desktop` as of v3.0.1
-$screen-desktop:             $screen-md-min !default;
-
-// Large screen / wide desktop
-//** Deprecated `$screen-lg` as of v3.0.1
-$screen-lg:                  1200px !default;
-$screen-lg-min:              $screen-lg !default;
-//** Deprecated `$screen-lg-desktop` as of v3.0.1
-$screen-lg-desktop:          $screen-lg-min !default;
-
-// So media queries don't overlap when required, provide a maximum
-$screen-xs-max:              ($screen-sm-min - 1) !default;
-$screen-sm-max:              ($screen-md-min - 1) !default;
-$screen-md-max:              ($screen-lg-min - 1) !default;
-
-
-//== Grid system
-//
-//## Define your custom responsive grid.
-
-//** Number of columns in the grid.
-$grid-columns:              12 !default;
-//** Padding between columns. Gets divided in half for the left and right.
-$grid-gutter-width:         30px !default;
-// Navbar collapse
-//** Point at which the navbar becomes uncollapsed.
-$grid-float-breakpoint:     $screen-sm-min !default;
-//** Point at which the navbar begins collapsing.
-$grid-float-breakpoint-max: ($grid-float-breakpoint - 1) !default;
-
-
-//== Container sizes
-//
-//## Define the maximum width of `.container` for different screen sizes.
-
-// Small screen / tablet
-$container-tablet:             (720px + $grid-gutter-width) !default;
-//** For `$screen-sm-min` and up.
-$container-sm:                 $container-tablet !default;
-
-// Medium screen / desktop
-$container-desktop:            (940px + $grid-gutter-width) !default;
-//** For `$screen-md-min` and up.
-$container-md:                 $container-desktop !default;
-
-// Large screen / wide desktop
-$container-large-desktop:      (1140px + $grid-gutter-width) !default;
-//** For `$screen-lg-min` and up.
-$container-lg:                 $container-large-desktop !default;
-
-
-//== Navbar
-//
-//##
-
-// Basics of a navbar
-$navbar-height:                    50px !default;
-$navbar-margin-bottom:             $line-height-computed !default;
-$navbar-border-radius:             $border-radius-base !default;
-$navbar-padding-horizontal:        floor(($grid-gutter-width / 2)) !default;
-$navbar-padding-vertical:          (($navbar-height - $line-height-computed) / 2) !default;
-$navbar-collapse-max-height:       340px !default;
-
-$navbar-default-color:             #777 !default;
-$navbar-default-bg:                #f8f8f8 !default;
-$navbar-default-border:            darken($navbar-default-bg, 6.5%) !default;
-
-// Navbar links
-$navbar-default-link-color:                #777 !default;
-$navbar-default-link-hover-color:          #333 !default;
-$navbar-default-link-hover-bg:             transparent !default;
-$navbar-default-link-active-color:         #555 !default;
-$navbar-default-link-active-bg:            darken($navbar-default-bg, 6.5%) !default;
-$navbar-default-link-disabled-color:       #ccc !default;
-$navbar-default-link-disabled-bg:          transparent !default;
-
-// Navbar brand label
-$navbar-default-brand-color:               $navbar-default-link-color !default;
-$navbar-default-brand-hover-color:         darken($navbar-default-brand-color, 10%) !default;
-$navbar-default-brand-hover-bg:            transparent !default;
-
-// Navbar toggle
-$navbar-default-toggle-hover-bg:           #ddd !default;
-$navbar-default-toggle-icon-bar-bg:        #888 !default;
-$navbar-default-toggle-border-color:       #ddd !default;
-
-
-//=== Inverted navbar
-// Reset inverted navbar basics
-$navbar-inverse-color:                      lighten($gray-light, 15%) !default;
-$navbar-inverse-bg:                         #222 !default;
-$navbar-inverse-border:                     darken($navbar-inverse-bg, 10%) !default;
-
-// Inverted navbar links
-$navbar-inverse-link-color:                 lighten($gray-light, 15%) !default;
-$navbar-inverse-link-hover-color:           #fff !default;
-$navbar-inverse-link-hover-bg:              transparent !default;
-$navbar-inverse-link-active-color:          $navbar-inverse-link-hover-color !default;
-$navbar-inverse-link-active-bg:             darken($navbar-inverse-bg, 10%) !default;
-$navbar-inverse-link-disabled-color:        #444 !default;
-$navbar-inverse-link-disabled-bg:           transparent !default;
-
-// Inverted navbar brand label
-$navbar-inverse-brand-color:                $navbar-inverse-link-color !default;
-$navbar-inverse-brand-hover-color:          #fff !default;
-$navbar-inverse-brand-hover-bg:             transparent !default;
-
-// Inverted navbar toggle
-$navbar-inverse-toggle-hover-bg:            #333 !default;
-$navbar-inverse-toggle-icon-bar-bg:         #fff !default;
-$navbar-inverse-toggle-border-color:        #333 !default;
-
-
-//== Navs
-//
-//##
-
-//=== Shared nav styles
-$nav-link-padding:                          10px 15px !default;
-$nav-link-hover-bg:                         $gray-lighter !default;
-
-$nav-disabled-link-color:                   $gray-light !default;
-$nav-disabled-link-hover-color:             $gray-light !default;
-
-//== Tabs
-$nav-tabs-border-color:                     #ddd !default;
-
-$nav-tabs-link-hover-border-color:          $gray-lighter !default;
-
-$nav-tabs-active-link-hover-bg:             $body-bg !default;
-$nav-tabs-active-link-hover-color:          $gray !default;
-$nav-tabs-active-link-hover-border-color:   #ddd !default;
-
-$nav-tabs-justified-link-border-color:            #ddd !default;
-$nav-tabs-justified-active-link-border-color:     $body-bg !default;
-
-//== Pills
-$nav-pills-border-radius:                   $border-radius-base !default;
-$nav-pills-active-link-hover-bg:            $component-active-bg !default;
-$nav-pills-active-link-hover-color:         $component-active-color !default;
-
-
-//== Pagination
-//
-//##
-
-$pagination-color:                     $link-color !default;
-$pagination-bg:                        #fff !default;
-$pagination-border:                    #ddd !default;
-
-$pagination-hover-color:               $link-hover-color !default;
-$pagination-hover-bg:                  $gray-lighter !default;
-$pagination-hover-border:              #ddd !default;
-
-$pagination-active-color:              #fff !default;
-$pagination-active-bg:                 $brand-primary !default;
-$pagination-active-border:             $brand-primary !default;
-
-$pagination-disabled-color:            $gray-light !default;
-$pagination-disabled-bg:               #fff !default;
-$pagination-disabled-border:           #ddd !default;
-
-
-//== Pager
-//
-//##
-
-$pager-bg:                             $pagination-bg !default;
-$pager-border:                         $pagination-border !default;
-$pager-border-radius:                  15px !default;
-
-$pager-hover-bg:                       $pagination-hover-bg !default;
-
-$pager-active-bg:                      $pagination-active-bg !default;
-$pager-active-color:                   $pagination-active-color !default;
-
-$pager-disabled-color:                 $pagination-disabled-color !default;
-
-
-//== Jumbotron
-//
-//##
-
-$jumbotron-padding:              30px !default;
-$jumbotron-color:                inherit !default;
-$jumbotron-bg:                   $gray-lighter !default;
-$jumbotron-heading-color:        inherit !default;
-$jumbotron-font-size:            ceil(($font-size-base * 1.5)) !default;
-$jumbotron-heading-font-size:    ceil(($font-size-base * 4.5)) !default;
-
-
-//== Form states and alerts
-//
-//## Define colors for form feedback states and, by default, alerts.
-
-$state-success-text:             #3c763d !default;
-$state-success-bg:               #dff0d8 !default;
-$state-success-border:           darken(adjust-hue($state-success-bg, -10%), 5%) !default;
-
-$state-info-text:                #31708f !default;
-$state-info-bg:                  #d9edf7 !default;
-$state-info-border:              darken(adjust-hue($state-info-bg, -10%), 7%) !default;
-
-$state-warning-text:             #8a6d3b !default;
-$state-warning-bg:               #fcf8e3 !default;
-$state-warning-border:           darken(adjust-hue($state-warning-bg, -10%), 5%) !default;
-
-$state-danger-text:              #a94442 !default;
-$state-danger-bg:                #f2dede !default;
-$state-danger-border:            darken(adjust-hue($state-danger-bg, -10%), 5%) !default;
-
-
-//== Tooltips
-//
-//##
-
-//** Tooltip max width
-$tooltip-max-width:           200px !default;
-//** Tooltip text color
-$tooltip-color:               #fff !default;
-//** Tooltip background color
-$tooltip-bg:                  #000 !default;
-$tooltip-opacity:             .9 !default;
-
-//** Tooltip arrow width
-$tooltip-arrow-width:         5px !default;
-//** Tooltip arrow color
-$tooltip-arrow-color:         $tooltip-bg !default;
-
-
-//== Popovers
-//
-//##
-
-//** Popover body background color
-$popover-bg:                          #fff !default;
-//** Popover maximum width
-$popover-max-width:                   276px !default;
-//** Popover border color
-$popover-border-color:                rgba(0,0,0,.2) !default;
-//** Popover fallback border color
-$popover-fallback-border-color:       #ccc !default;
-
-//** Popover title background color
-$popover-title-bg:                    darken($popover-bg, 3%) !default;
-
-//** Popover arrow width
-$popover-arrow-width:                 10px !default;
-//** Popover arrow color
-$popover-arrow-color:                 $popover-bg !default;
-
-//** Popover outer arrow width
-$popover-arrow-outer-width:           ($popover-arrow-width + 1) !default;
-//** Popover outer arrow color
-$popover-arrow-outer-color:           fadein($popover-border-color, 5%) !default;
-//** Popover outer arrow fallback color
-$popover-arrow-outer-fallback-color:  darken($popover-fallback-border-color, 20%) !default;
-
-
-//== Labels
-//
-//##
-
-//** Default label background color
-$label-default-bg:            $gray-light !default;
-//** Primary label background color
-$label-primary-bg:            $brand-primary !default;
-//** Success label background color
-$label-success-bg:            $brand-success !default;
-//** Info label background color
-$label-info-bg:               $brand-info !default;
-//** Warning label background color
-$label-warning-bg:            $brand-warning !default;
-//** Danger label background color
-$label-danger-bg:             $brand-danger !default;
-
-//** Default label text color
-$label-color:                 #fff !default;
-//** Default text color of a linked label
-$label-link-hover-color:      #fff !default;
-
-
-//== Modals
-//
-//##
-
-//** Padding applied to the modal body
-$modal-inner-padding:         15px !default;
-
-//** Padding applied to the modal title
-$modal-title-padding:         15px !default;
-//** Modal title line-height
-$modal-title-line-height:     $line-height-base !default;
-
-//** Background color of modal content area
-$modal-content-bg:                             #fff !default;
-//** Modal content border color
-$modal-content-border-color:                   rgba(0,0,0,.2) !default;
-//** Modal content border color **for IE8**
-$modal-content-fallback-border-color:          #999 !default;
-
-//** Modal backdrop background color
-$modal-backdrop-bg:           #000 !default;
-//** Modal backdrop opacity
-$modal-backdrop-opacity:      .5 !default;
-//** Modal header border color
-$modal-header-border-color:   #e5e5e5 !default;
-//** Modal footer border color
-$modal-footer-border-color:   $modal-header-border-color !default;
-
-$modal-lg:                    900px !default;
-$modal-md:                    600px !default;
-$modal-sm:                    300px !default;
-
-
-//== Alerts
-//
-//## Define alert colors, border radius, and padding.
-
-$alert-padding:               15px !default;
-$alert-border-radius:         $border-radius-base !default;
-$alert-link-font-weight:      bold !default;
-
-$alert-success-bg:            $state-success-bg !default;
-$alert-success-text:          $state-success-text !default;
-$alert-success-border:        $state-success-border !default;
-
-$alert-info-bg:               $state-info-bg !default;
-$alert-info-text:             $state-info-text !default;
-$alert-info-border:           $state-info-border !default;
-
-$alert-warning-bg:            $state-warning-bg !default;
-$alert-warning-text:          $state-warning-text !default;
-$alert-warning-border:        $state-warning-border !default;
-
-$alert-danger-bg:             $state-danger-bg !default;
-$alert-danger-text:           $state-danger-text !default;
-$alert-danger-border:         $state-danger-border !default;
-
-
-//== Progress bars
-//
-//##
-
-//** Background color of the whole progress component
-$progress-bg:                 #f5f5f5 !default;
-//** Progress bar text color
-$progress-bar-color:          #fff !default;
-//** Variable for setting rounded corners on progress bar.
-$progress-border-radius:      $border-radius-base !default;
-
-//** Default progress bar color
-$progress-bar-bg:             $brand-primary !default;
-//** Success progress bar color
-$progress-bar-success-bg:     $brand-success !default;
-//** Warning progress bar color
-$progress-bar-warning-bg:     $brand-warning !default;
-//** Danger progress bar color
-$progress-bar-danger-bg:      $brand-danger !default;
-//** Info progress bar color
-$progress-bar-info-bg:        $brand-info !default;
-
-
-//== List group
-//
-//##
-
-//** Background color on `.list-group-item`
-$list-group-bg:                 #fff !default;
-//** `.list-group-item` border color
-$list-group-border:             #ddd !default;
-//** List group border radius
-$list-group-border-radius:      $border-radius-base !default;
-
-//** Background color of single list items on hover
-$list-group-hover-bg:           #f5f5f5 !default;
-//** Text color of active list items
-$list-group-active-color:       $component-active-color !default;
-//** Background color of active list items
-$list-group-active-bg:          $component-active-bg !default;
-//** Border color of active list elements
-$list-group-active-border:      $list-group-active-bg !default;
-//** Text color for content within active list items
-$list-group-active-text-color:  lighten($list-group-active-bg, 40%) !default;
-
-//** Text color of disabled list items
-$list-group-disabled-color:      $gray-light !default;
-//** Background color of disabled list items
-$list-group-disabled-bg:         $gray-lighter !default;
-//** Text color for content within disabled list items
-$list-group-disabled-text-color: $list-group-disabled-color !default;
-
-$list-group-link-color:         #555 !default;
-$list-group-link-hover-color:   $list-group-link-color !default;
-$list-group-link-heading-color: #333 !default;
-
-
-//== Panels
-//
-//##
-
-$panel-bg:                    #fff !default;
-$panel-body-padding:          15px !default;
-$panel-heading-padding:       10px 15px !default;
-$panel-footer-padding:        $panel-heading-padding !default;
-$panel-border-radius:         $border-radius-base !default;
-
-//** Border color for elements within panels
-$panel-inner-border:          #ddd !default;
-$panel-footer-bg:             #f5f5f5 !default;
-
-$panel-default-text:          $gray-dark !default;
-$panel-default-border:        #ddd !default;
-$panel-default-heading-bg:    #f5f5f5 !default;
-
-$panel-primary-text:          #fff !default;
-$panel-primary-border:        $brand-primary !default;
-$panel-primary-heading-bg:    $brand-primary !default;
-
-$panel-success-text:          $state-success-text !default;
-$panel-success-border:        $state-success-border !default;
-$panel-success-heading-bg:    $state-success-bg !default;
-
-$panel-info-text:             $state-info-text !default;
-$panel-info-border:           $state-info-border !default;
-$panel-info-heading-bg:       $state-info-bg !default;
-
-$panel-warning-text:          $state-warning-text !default;
-$panel-warning-border:        $state-warning-border !default;
-$panel-warning-heading-bg:    $state-warning-bg !default;
-
-$panel-danger-text:           $state-danger-text !default;
-$panel-danger-border:         $state-danger-border !default;
-$panel-danger-heading-bg:     $state-danger-bg !default;
-
-
-//== Thumbnails
-//
-//##
-
-//** Padding around the thumbnail image
-$thumbnail-padding:           4px !default;
-//** Thumbnail background color
-$thumbnail-bg:                $body-bg !default;
-//** Thumbnail border color
-$thumbnail-border:            #ddd !default;
-//** Thumbnail border radius
-$thumbnail-border-radius:     $border-radius-base !default;
-
-//** Custom text color for thumbnail captions
-$thumbnail-caption-color:     $text-color !default;
-//** Padding around the thumbnail caption
-$thumbnail-caption-padding:   9px !default;
-
-
-//== Wells
-//
-//##
-
-$well-bg:                     #f5f5f5 !default;
-$well-border:                 darken($well-bg, 7%) !default;
-
-
-//== Badges
-//
-//##
-
-$badge-color:                 #fff !default;
-//** Linked badge text color on hover
-$badge-link-hover-color:      #fff !default;
-$badge-bg:                    $gray-light !default;
-
-//** Badge text color in active nav link
-$badge-active-color:          $link-color !default;
-//** Badge background color in active nav link
-$badge-active-bg:             #fff !default;
-
-$badge-font-weight:           bold !default;
-$badge-line-height:           1 !default;
-$badge-border-radius:         10px !default;
-
-
-//== Breadcrumbs
-//
-//##
-
-$breadcrumb-padding-vertical:   8px !default;
-$breadcrumb-padding-horizontal: 15px !default;
-//** Breadcrumb background color
-$breadcrumb-bg:                 #f5f5f5 !default;
-//** Breadcrumb text color
-$breadcrumb-color:              #ccc !default;
-//** Text color of current page in the breadcrumb
-$breadcrumb-active-color:       $gray-light !default;
-//** Textual separator for between breadcrumb elements
-$breadcrumb-separator:          "/" !default;
-
-
-//== Carousel
-//
-//##
-
-$carousel-text-shadow:                        0 1px 2px rgba(0,0,0,.6) !default;
-
-$carousel-control-color:                      #fff !default;
-$carousel-control-width:                      15% !default;
-$carousel-control-opacity:                    .5 !default;
-$carousel-control-font-size:                  20px !default;
-
-$carousel-indicator-active-bg:                #fff !default;
-$carousel-indicator-border-color:             #fff !default;
-
-$carousel-caption-color:                      #fff !default;
-
-
-//== Close
-//
-//##
-
-$close-font-weight:           bold !default;
-$close-color:                 #000 !default;
-$close-text-shadow:           0 1px 0 #fff !default;
-
-
-//== Code
-//
-//##
-
-$code-color:                  #c7254e !default;
-$code-bg:                     #f9f2f4 !default;
-
-$kbd-color:                   #fff !default;
-$kbd-bg:                      #333 !default;
-
-$pre-bg:                      #f5f5f5 !default;
-$pre-color:                   $gray-dark !default;
-$pre-border-color:            #ccc !default;
-$pre-scrollable-max-height:   340px !default;
-
-
-//== Type
-//
-//##
-
-//** Horizontal offset for forms and lists.
-$component-offset-horizontal: 180px !default;
-//** Text muted color
-$text-muted:                  $gray-light !default;
-//** Abbreviations and acronyms border color
-$abbr-border-color:           $gray-light !default;
-//** Headings small color
-$headings-small-color:        $gray-light !default;
-//** Blockquote small color
-$blockquote-small-color:      $gray-light !default;
-//** Blockquote font size
-$blockquote-font-size:        ($font-size-base * 1.25) !default;
-//** Blockquote border color
-$blockquote-border-color:     $gray-lighter !default;
-//** Page header border color
-$page-header-border-color:    $gray-lighter !default;
-//** Width of horizontal description list titles
-$dl-horizontal-offset:        $component-offset-horizontal !default;
-//** Point at which .dl-horizontal becomes horizontal
-$dl-horizontal-breakpoint:    $grid-float-breakpoint !default;
-//** Horizontal line color.
-$hr-border:                   $gray-lighter !default;
diff --git a/Gems/AssetMemoryAnalyzer/External/tabulator-master/src/scss/bootstrap/variables4.scss b/Gems/AssetMemoryAnalyzer/External/tabulator-master/src/scss/bootstrap/variables4.scss
deleted file mode 100644
index 9a1d9485ab..0000000000
--- a/Gems/AssetMemoryAnalyzer/External/tabulator-master/src/scss/bootstrap/variables4.scss
+++ /dev/null
@@ -1,930 +0,0 @@
-
-
-// Variables
-//
-// Variables should follow the `$component-state-property-size` formula for
-// consistent naming. Ex: $nav-link-disabled-color and $modal-content-box-shadow-xs.
-
-
-//
-// Color system
-//
-
-// stylelint-disable
-$white:    #fff !default;
-$gray-100: #f8f9fa !default;
-$gray-200: #e9ecef !default;
-$gray-300: #dee2e6 !default;
-$gray-400: #ced4da !default;
-$gray-500: #adb5bd !default;
-$gray-600: #6c757d !default;
-$gray-700: #495057 !default;
-$gray-800: #343a40 !default;
-$gray-900: #212529 !default;
-$black:    #000 !default;
-
-$grays: () !default;
-$grays: map-merge((
-  "100": $gray-100,
-  "200": $gray-200,
-  "300": $gray-300,
-  "400": $gray-400,
-  "500": $gray-500,
-  "600": $gray-600,
-  "700": $gray-700,
-  "800": $gray-800,
-  "900": $gray-900
-), $grays);
-
-$blue:    #007bff !default;
-$indigo:  #6610f2 !default;
-$purple:  #6f42c1 !default;
-$pink:    #e83e8c !default;
-$red:     #dc3545 !default;
-$orange:  #fd7e14 !default;
-$yellow:  #ffc107 !default;
-$green:   #28a745 !default;
-$teal:    #20c997 !default;
-$cyan:    #17a2b8 !default;
-
-$colors: () !default;
-$colors: map-merge((
-  "blue":       $blue,
-  "indigo":     $indigo,
-  "purple":     $purple,
-  "pink":       $pink,
-  "red":        $red,
-  "orange":     $orange,
-  "yellow":     $yellow,
-  "green":      $green,
-  "teal":       $teal,
-  "cyan":       $cyan,
-  "white":      $white,
-  "gray":       $gray-600,
-  "gray-dark":  $gray-800
-), $colors);
-
-$primary:       $blue !default;
-$secondary:     $gray-600 !default;
-$success:       $green !default;
-$info:          $cyan !default;
-$warning:       $yellow !default;
-$danger:        $red !default;
-$light:         $gray-100 !default;
-$dark:          $gray-800 !default;
-
-$theme-colors: () !default;
-$theme-colors: map-merge((
-  "primary":    $primary,
-  "secondary":  $secondary,
-  "success":    $success,
-  "info":       $info,
-  "warning":    $warning,
-  "danger":     $danger,
-  "light":      $light,
-  "dark":       $dark
-), $theme-colors);
-// stylelint-enable
-
-// Set a specific jump point for requesting color jumps
-$theme-color-interval:      8% !default;
-
-// The yiq lightness value that determines when the lightness of color changes from "dark" to "light". Acceptable values are between 0 and 255.
-$yiq-contrasted-threshold:  150 !default;
-
-// Customize the light and dark text colors for use in our YIQ color contrast function.
-$yiq-text-dark:             $gray-900 !default;
-$yiq-text-light:            $white !default;
-
-// Options
-//
-// Quickly modify global styling by enabling or disabling optional features.
-
-$enable-caret:              true !default;
-$enable-rounded:            true !default;
-$enable-shadows:            false !default;
-$enable-gradients:          false !default;
-$enable-transitions:        true !default;
-$enable-hover-media-query:  false !default; // Deprecated, no longer affects any compiled CSS
-$enable-grid-classes:       true !default;
-$enable-print-styles:       true !default;
-
-
-// Spacing
-//
-// Control the default styling of most Bootstrap elements by modifying these
-// variables. Mostly focused on spacing.
-// You can add more entries to the $spacers map, should you need more variation.
-
-// stylelint-disable
-$spacer: 1rem !default;
-$spacers: () !default;
-$spacers: map-merge((
-  0: 0,
-  1: ($spacer * .25),
-  2: ($spacer * .5),
-  3: $spacer,
-  4: ($spacer * 1.5),
-  5: ($spacer * 3)
-), $spacers);
-
-// This variable affects the `.h-*` and `.w-*` classes.
-$sizes: () !default;
-$sizes: map-merge((
-  25: 25%,
-  50: 50%,
-  75: 75%,
-  100: 100%,
-  auto: auto
-), $sizes);
-// stylelint-enable
-
-// Body
-//
-// Settings for the `` element.
-
-$body-bg:                   $white !default;
-$body-color:                $gray-900 !default;
-
-// Links
-//
-// Style anchor elements.
-
-$link-color:                theme-color("primary") !default;
-$link-decoration:           none !default;
-$link-hover-color:          darken($link-color, 15%) !default;
-$link-hover-decoration:     underline !default;
-
-// Paragraphs
-//
-// Style p element.
-
-$paragraph-margin-bottom:   1rem !default;
-
-
-// Grid breakpoints
-//
-// Define the minimum dimensions at which your layout will change,
-// adapting to different screen sizes, for use in media queries.
-
-$grid-breakpoints: (
-  xs: 0,
-  sm: 576px,
-  md: 768px,
-  lg: 992px,
-  xl: 1200px
-) !default;
-
-@include _assert-ascending($grid-breakpoints, "$grid-breakpoints");
-@include _assert-starts-at-zero($grid-breakpoints);
-
-
-// Grid containers
-//
-// Define the maximum width of `.container` for different screen sizes.
-
-$container-max-widths: (
-  sm: 540px,
-  md: 720px,
-  lg: 960px,
-  xl: 1140px
-) !default;
-
-@include _assert-ascending($container-max-widths, "$container-max-widths");
-
-
-// Grid columns
-//
-// Set the number of columns and specify the width of the gutters.
-
-$grid-columns:                12 !default;
-$grid-gutter-width:           30px !default;
-
-// Components
-//
-// Define common padding and border radius sizes and more.
-
-$line-height-lg:              1.5 !default;
-$line-height-sm:              1.5 !default;
-
-$border-width:                1px !default;
-$border-color:                $gray-300 !default;
-
-$border-radius:               .25rem !default;
-$border-radius-lg:            .3rem !default;
-$border-radius-sm:            .2rem !default;
-
-$box-shadow-sm:               0 .125rem .25rem rgba($black, .075) !default;
-$box-shadow:                  0 .5rem 1rem rgba($black, .15) !default;
-$box-shadow-lg:               0 1rem 3rem rgba($black, .175) !default;
-
-$component-active-color:      $white !default;
-$component-active-bg:         theme-color("primary") !default;
-
-$caret-width:                 .3em !default;
-
-$transition-base:             all .2s ease-in-out !default;
-$transition-fade:             opacity .15s linear !default;
-$transition-collapse:         height .35s ease !default;
-
-
-// Fonts
-//
-// Font, line-height, and color for body text, headings, and more.
-
-// stylelint-disable value-keyword-case
-$font-family-sans-serif:      -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol" !default;
-$font-family-monospace:       SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace !default;
-$font-family-base:            $font-family-sans-serif !default;
-// stylelint-enable value-keyword-case
-
-$font-size-base:              1rem !default; // Assumes the browser default, typically `16px`
-$font-size-lg:                ($font-size-base * 1.25) !default;
-$font-size-sm:                ($font-size-base * .875) !default;
-
-$font-weight-light:           300 !default;
-$font-weight-normal:          400 !default;
-$font-weight-bold:            700 !default;
-
-$font-weight-base:            $font-weight-normal !default;
-$line-height-base:            1.5 !default;
-
-$h1-font-size:                $font-size-base * 2.5 !default;
-$h2-font-size:                $font-size-base * 2 !default;
-$h3-font-size:                $font-size-base * 1.75 !default;
-$h4-font-size:                $font-size-base * 1.5 !default;
-$h5-font-size:                $font-size-base * 1.25 !default;
-$h6-font-size:                $font-size-base !default;
-
-$headings-margin-bottom:      ($spacer / 2) !default;
-$headings-font-family:        inherit !default;
-$headings-font-weight:        500 !default;
-$headings-line-height:        1.2 !default;
-$headings-color:              inherit !default;
-
-$display1-size:               6rem !default;
-$display2-size:               5.5rem !default;
-$display3-size:               4.5rem !default;
-$display4-size:               3.5rem !default;
-
-$display1-weight:             300 !default;
-$display2-weight:             300 !default;
-$display3-weight:             300 !default;
-$display4-weight:             300 !default;
-$display-line-height:         $headings-line-height !default;
-
-$lead-font-size:              ($font-size-base * 1.25) !default;
-$lead-font-weight:            300 !default;
-
-$small-font-size:             80% !default;
-
-$text-muted:                  $gray-600 !default;
-
-$blockquote-small-color:      $gray-600 !default;
-$blockquote-font-size:        ($font-size-base * 1.25) !default;
-
-$hr-border-color:             rgba($black, .1) !default;
-$hr-border-width:             $border-width !default;
-
-$mark-padding:                .2em !default;
-
-$dt-font-weight:              $font-weight-bold !default;
-
-$kbd-box-shadow:              inset 0 -.1rem 0 rgba($black, .25) !default;
-$nested-kbd-font-weight:      $font-weight-bold !default;
-
-$list-inline-padding:         .5rem !default;
-
-$mark-bg:                     #fcf8e3 !default;
-
-$hr-margin-y:                 $spacer !default;
-
-
-// Tables
-//
-// Customizes the `.table` component with basic values, each used across all table variations.
-
-$table-cell-padding:          .75rem !default;
-$table-cell-padding-sm:       .3rem !default;
-
-$table-bg:                    transparent !default;
-$table-accent-bg:             rgba($black, .05) !default;
-$table-hover-bg:              rgba($black, .075) !default;
-$table-active-bg:             $table-hover-bg !default;
-
-$table-border-width:          $border-width !default;
-$table-border-color:          $gray-300 !default;
-
-$table-head-bg:               $gray-200 !default;
-$table-head-color:            $gray-700 !default;
-
-$table-dark-bg:               $gray-900 !default;
-$table-dark-accent-bg:        rgba($white, .05) !default;
-$table-dark-hover-bg:         rgba($white, .075) !default;
-$table-dark-border-color:     lighten($gray-900, 7.5%) !default;
-$table-dark-color:            $body-bg !default;
-
-$table-striped-order:         odd !default;
-
-$table-caption-color:         $text-muted !default;
-
-// Buttons + Forms
-//
-// Shared variables that are reassigned to `$input-` and `$btn-` specific variables.
-
-$input-btn-padding-y:         .375rem !default;
-$input-btn-padding-x:         .75rem !default;
-$input-btn-line-height:       $line-height-base !default;
-
-$input-btn-focus-width:       .2rem !default;
-$input-btn-focus-color:       rgba($component-active-bg, .25) !default;
-$input-btn-focus-box-shadow:  0 0 0 $input-btn-focus-width $input-btn-focus-color !default;
-
-$input-btn-padding-y-sm:      .25rem !default;
-$input-btn-padding-x-sm:      .5rem !default;
-$input-btn-line-height-sm:    $line-height-sm !default;
-
-$input-btn-padding-y-lg:      .5rem !default;
-$input-btn-padding-x-lg:      1rem !default;
-$input-btn-line-height-lg:    $line-height-lg !default;
-
-$input-btn-border-width:      $border-width !default;
-
-
-// Buttons
-//
-// For each of Bootstrap's buttons, define text, background, and border color.
-
-$btn-padding-y:               $input-btn-padding-y !default;
-$btn-padding-x:               $input-btn-padding-x !default;
-$btn-line-height:             $input-btn-line-height !default;
-
-$btn-padding-y-sm:            $input-btn-padding-y-sm !default;
-$btn-padding-x-sm:            $input-btn-padding-x-sm !default;
-$btn-line-height-sm:          $input-btn-line-height-sm !default;
-
-$btn-padding-y-lg:            $input-btn-padding-y-lg !default;
-$btn-padding-x-lg:            $input-btn-padding-x-lg !default;
-$btn-line-height-lg:          $input-btn-line-height-lg !default;
-
-$btn-border-width:            $input-btn-border-width !default;
-
-$btn-font-weight:             $font-weight-normal !default;
-$btn-box-shadow:              inset 0 1px 0 rgba($white, .15), 0 1px 1px rgba($black, .075) !default;
-$btn-focus-width:             $input-btn-focus-width !default;
-$btn-focus-box-shadow:        $input-btn-focus-box-shadow !default;
-$btn-disabled-opacity:        .65 !default;
-$btn-active-box-shadow:       inset 0 3px 5px rgba($black, .125) !default;
-
-$btn-link-disabled-color:     $gray-600 !default;
-
-$btn-block-spacing-y:         .5rem !default;
-
-// Allows for customizing button radius independently from global border radius
-$btn-border-radius:           $border-radius !default;
-$btn-border-radius-lg:        $border-radius-lg !default;
-$btn-border-radius-sm:        $border-radius-sm !default;
-
-$btn-transition:              color .15s ease-in-out, background-color .15s ease-in-out, border-color .15s ease-in-out, box-shadow .15s ease-in-out !default;
-
-
-// Forms
-
-$label-margin-bottom:                   .5rem !default;
-
-$input-padding-y:                       $input-btn-padding-y !default;
-$input-padding-x:                       $input-btn-padding-x !default;
-$input-line-height:                     $input-btn-line-height !default;
-
-$input-padding-y-sm:                    $input-btn-padding-y-sm !default;
-$input-padding-x-sm:                    $input-btn-padding-x-sm !default;
-$input-line-height-sm:                  $input-btn-line-height-sm !default;
-
-$input-padding-y-lg:                    $input-btn-padding-y-lg !default;
-$input-padding-x-lg:                    $input-btn-padding-x-lg !default;
-$input-line-height-lg:                  $input-btn-line-height-lg !default;
-
-$input-bg:                              $white !default;
-$input-disabled-bg:                     $gray-200 !default;
-
-$input-color:                           $gray-700 !default;
-$input-border-color:                    $gray-400 !default;
-$input-border-width:                    $input-btn-border-width !default;
-$input-box-shadow:                      inset 0 1px 1px rgba($black, .075) !default;
-
-$input-border-radius:                   $border-radius !default;
-$input-border-radius-lg:                $border-radius-lg !default;
-$input-border-radius-sm:                $border-radius-sm !default;
-
-$input-focus-bg:                        $input-bg !default;
-$input-focus-border-color:              lighten($component-active-bg, 25%) !default;
-$input-focus-color:                     $input-color !default;
-$input-focus-width:                     $input-btn-focus-width !default;
-$input-focus-box-shadow:                $input-btn-focus-box-shadow !default;
-
-$input-placeholder-color:               $gray-600 !default;
-$input-plaintext-color:                 $body-color !default;
-
-$input-height-border:                   $input-border-width * 2 !default;
-
-$input-height-inner:                    ($font-size-base * $input-btn-line-height) + ($input-btn-padding-y * 2) !default;
-$input-height:                          calc(#{$input-height-inner} + #{$input-height-border}) !default;
-
-$input-height-inner-sm:                 ($font-size-sm * $input-btn-line-height-sm) + ($input-btn-padding-y-sm * 2) !default;
-$input-height-sm:                       calc(#{$input-height-inner-sm} + #{$input-height-border}) !default;
-
-$input-height-inner-lg:                 ($font-size-lg * $input-btn-line-height-lg) + ($input-btn-padding-y-lg * 2) !default;
-$input-height-lg:                       calc(#{$input-height-inner-lg} + #{$input-height-border}) !default;
-
-$input-transition:                      border-color .15s ease-in-out, box-shadow .15s ease-in-out !default;
-
-$form-text-margin-top:                  .25rem !default;
-
-$form-check-input-gutter:               1.25rem !default;
-$form-check-input-margin-y:             .3rem !default;
-$form-check-input-margin-x:             .25rem !default;
-
-$form-check-inline-margin-x:            .75rem !default;
-$form-check-inline-input-margin-x:      .3125rem !default;
-
-$form-group-margin-bottom:              1rem !default;
-
-$input-group-addon-color:               $input-color !default;
-$input-group-addon-bg:                  $gray-200 !default;
-$input-group-addon-border-color:        $input-border-color !default;
-
-$custom-control-gutter:                 1.5rem !default;
-$custom-control-spacer-x:               1rem !default;
-
-$custom-control-indicator-size:         1rem !default;
-$custom-control-indicator-bg:           $gray-300 !default;
-$custom-control-indicator-bg-size:      50% 50% !default;
-$custom-control-indicator-box-shadow:   inset 0 .25rem .25rem rgba($black, .1) !default;
-
-$custom-control-indicator-disabled-bg:          $gray-200 !default;
-$custom-control-label-disabled-color:           $gray-600 !default;
-
-$custom-control-indicator-checked-color:        $component-active-color !default;
-$custom-control-indicator-checked-bg:           $component-active-bg !default;
-$custom-control-indicator-checked-disabled-bg:  rgba(theme-color("primary"), .5) !default;
-$custom-control-indicator-checked-box-shadow:   none !default;
-
-$custom-control-indicator-focus-box-shadow:     0 0 0 1px $body-bg, $input-btn-focus-box-shadow !default;
-
-$custom-control-indicator-active-color:         $component-active-color !default;
-$custom-control-indicator-active-bg:            lighten($component-active-bg, 35%) !default;
-$custom-control-indicator-active-box-shadow:    none !default;
-
-$custom-checkbox-indicator-border-radius:       $border-radius !default;
-$custom-checkbox-indicator-icon-checked:        str-replace(url("data:image/svg+xml;charset=utf8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 8 8'%3E%3Cpath fill='#{$custom-control-indicator-checked-color}' d='M6.564.75l-3.59 3.612-1.538-1.55L0 4.26 2.974 7.25 8 2.193z'/%3E%3C/svg%3E"), "#", "%23") !default;
-
-$custom-checkbox-indicator-indeterminate-bg:          $component-active-bg !default;
-$custom-checkbox-indicator-indeterminate-color:       $custom-control-indicator-checked-color !default;
-$custom-checkbox-indicator-icon-indeterminate:        str-replace(url("data:image/svg+xml;charset=utf8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 4 4'%3E%3Cpath stroke='#{$custom-checkbox-indicator-indeterminate-color}' d='M0 2h4'/%3E%3C/svg%3E"), "#", "%23") !default;
-$custom-checkbox-indicator-indeterminate-box-shadow:  none !default;
-
-$custom-radio-indicator-border-radius:          50% !default;
-$custom-radio-indicator-icon-checked:           str-replace(url("data:image/svg+xml;charset=utf8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='-4 -4 8 8'%3E%3Ccircle r='3' fill='#{$custom-control-indicator-checked-color}'/%3E%3C/svg%3E"), "#", "%23") !default;
-
-$custom-select-padding-y:           .375rem !default;
-$custom-select-padding-x:           .75rem !default;
-$custom-select-height:              $input-height !default;
-$custom-select-indicator-padding:   1rem !default; // Extra padding to account for the presence of the background-image based indicator
-$custom-select-line-height:         $input-btn-line-height !default;
-$custom-select-color:               $input-color !default;
-$custom-select-disabled-color:      $gray-600 !default;
-$custom-select-bg:                  $input-bg !default;
-$custom-select-disabled-bg:         $gray-200 !default;
-$custom-select-bg-size:             8px 10px !default; // In pixels because image dimensions
-$custom-select-indicator-color:     $gray-800 !default;
-$custom-select-indicator:           str-replace(url("data:image/svg+xml;charset=utf8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 4 5'%3E%3Cpath fill='#{$custom-select-indicator-color}' d='M2 0L0 2h4zm0 5L0 3h4z'/%3E%3C/svg%3E"), "#", "%23") !default;
-$custom-select-border-width:        $input-btn-border-width !default;
-$custom-select-border-color:        $input-border-color !default;
-$custom-select-border-radius:       $border-radius !default;
-
-$custom-select-focus-border-color:  $input-focus-border-color !default;
-$custom-select-focus-box-shadow:    inset 0 1px 2px rgba($black, .075), 0 0 5px rgba($custom-select-focus-border-color, .5) !default;
-
-$custom-select-font-size-sm:        75% !default;
-$custom-select-height-sm:           $input-height-sm !default;
-
-$custom-select-font-size-lg:        125% !default;
-$custom-select-height-lg:           $input-height-lg !default;
-
-$custom-range-track-width:          100% !default;
-$custom-range-track-height:         .5rem !default;
-$custom-range-track-cursor:         pointer !default;
-$custom-range-track-bg:             $gray-300 !default;
-$custom-range-track-border-radius:  1rem !default;
-$custom-range-track-box-shadow:     inset 0 .25rem .25rem rgba($black, .1) !default;
-
-$custom-range-thumb-width:            1rem !default;
-$custom-range-thumb-height:           $custom-range-thumb-width !default;
-$custom-range-thumb-bg:               $component-active-bg !default;
-$custom-range-thumb-border:           0 !default;
-$custom-range-thumb-border-radius:    1rem !default;
-$custom-range-thumb-box-shadow:       0 .1rem .25rem rgba($black, .1) !default;
-$custom-range-thumb-focus-box-shadow: 0 0 0 1px $body-bg, $input-btn-focus-box-shadow !default;
-$custom-range-thumb-active-bg:        lighten($component-active-bg, 35%) !default;
-
-$custom-file-height:                $input-height !default;
-$custom-file-focus-border-color:    $input-focus-border-color !default;
-$custom-file-focus-box-shadow:      $input-btn-focus-box-shadow !default;
-
-$custom-file-padding-y:             $input-btn-padding-y !default;
-$custom-file-padding-x:             $input-btn-padding-x !default;
-$custom-file-line-height:           $input-btn-line-height !default;
-$custom-file-color:                 $input-color !default;
-$custom-file-bg:                    $input-bg !default;
-$custom-file-border-width:          $input-btn-border-width !default;
-$custom-file-border-color:          $input-border-color !default;
-$custom-file-border-radius:         $input-border-radius !default;
-$custom-file-box-shadow:            $input-box-shadow !default;
-$custom-file-button-color:          $custom-file-color !default;
-$custom-file-button-bg:             $input-group-addon-bg !default;
-$custom-file-text: (
-  en: "Browse"
-) !default;
-
-
-// Form validation
-$form-feedback-margin-top:          $form-text-margin-top !default;
-$form-feedback-font-size:           $small-font-size !default;
-$form-feedback-valid-color:         theme-color("success") !default;
-$form-feedback-invalid-color:       theme-color("danger") !default;
-
-
-// Dropdowns
-//
-// Dropdown menu container and contents.
-
-$dropdown-min-width:                10rem !default;
-$dropdown-padding-y:                .5rem !default;
-$dropdown-spacer:                   .125rem !default;
-$dropdown-bg:                       $white !default;
-$dropdown-border-color:             rgba($black, .15) !default;
-$dropdown-border-radius:            $border-radius !default;
-$dropdown-border-width:             $border-width !default;
-$dropdown-divider-bg:               $gray-200 !default;
-$dropdown-box-shadow:               0 .5rem 1rem rgba($black, .175) !default;
-
-$dropdown-link-color:               $gray-900 !default;
-$dropdown-link-hover-color:         darken($gray-900, 5%) !default;
-$dropdown-link-hover-bg:            $gray-100 !default;
-
-$dropdown-link-active-color:        $component-active-color !default;
-$dropdown-link-active-bg:           $component-active-bg !default;
-
-$dropdown-link-disabled-color:      $gray-600 !default;
-
-$dropdown-item-padding-y:           .25rem !default;
-$dropdown-item-padding-x:           1.5rem !default;
-
-$dropdown-header-color:             $gray-600 !default;
-
-
-// Z-index master list
-//
-// Warning: Avoid customizing these values. They're used for a bird's eye view
-// of components dependent on the z-axis and are designed to all work together.
-
-$zindex-dropdown:                   1000 !default;
-$zindex-sticky:                     1020 !default;
-$zindex-fixed:                      1030 !default;
-$zindex-modal-backdrop:             1040 !default;
-$zindex-modal:                      1050 !default;
-$zindex-popover:                    1060 !default;
-$zindex-tooltip:                    1070 !default;
-
-// Navs
-
-$nav-link-padding-y:                .5rem !default;
-$nav-link-padding-x:                1rem !default;
-$nav-link-disabled-color:           $gray-600 !default;
-
-$nav-tabs-border-color:             $gray-300 !default;
-$nav-tabs-border-width:             $border-width !default;
-$nav-tabs-border-radius:            $border-radius !default;
-$nav-tabs-link-hover-border-color:  $gray-200 $gray-200 $nav-tabs-border-color !default;
-$nav-tabs-link-active-color:        $gray-700 !default;
-$nav-tabs-link-active-bg:           $body-bg !default;
-$nav-tabs-link-active-border-color: $gray-300 $gray-300 $nav-tabs-link-active-bg !default;
-
-$nav-pills-border-radius:           $border-radius !default;
-$nav-pills-link-active-color:       $component-active-color !default;
-$nav-pills-link-active-bg:          $component-active-bg !default;
-
-$nav-divider-color:                 $gray-200 !default;
-$nav-divider-margin-y:              ($spacer / 2) !default;
-
-// Navbar
-
-$navbar-padding-y:                  ($spacer / 2) !default;
-$navbar-padding-x:                  $spacer !default;
-
-$navbar-nav-link-padding-x:         .5rem !default;
-
-$navbar-brand-font-size:            $font-size-lg !default;
-// Compute the navbar-brand padding-y so the navbar-brand will have the same height as navbar-text and nav-link
-$nav-link-height:                   ($font-size-base * $line-height-base + $nav-link-padding-y * 2) !default;
-$navbar-brand-height:               $navbar-brand-font-size * $line-height-base !default;
-$navbar-brand-padding-y:            ($nav-link-height - $navbar-brand-height) / 2 !default;
-
-$navbar-toggler-padding-y:          .25rem !default;
-$navbar-toggler-padding-x:          .75rem !default;
-$navbar-toggler-font-size:          $font-size-lg !default;
-$navbar-toggler-border-radius:      $btn-border-radius !default;
-
-$navbar-dark-color:                 rgba($white, .5) !default;
-$navbar-dark-hover-color:           rgba($white, .75) !default;
-$navbar-dark-active-color:          $white !default;
-$navbar-dark-disabled-color:        rgba($white, .25) !default;
-$navbar-dark-toggler-icon-bg:       str-replace(url("data:image/svg+xml;charset=utf8,%3Csvg viewBox='0 0 30 30' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath stroke='#{$navbar-dark-color}' stroke-width='2' stroke-linecap='round' stroke-miterlimit='10' d='M4 7h22M4 15h22M4 23h22'/%3E%3C/svg%3E"), "#", "%23") !default;
-$navbar-dark-toggler-border-color:  rgba($white, .1) !default;
-
-$navbar-light-color:                rgba($black, .5) !default;
-$navbar-light-hover-color:          rgba($black, .7) !default;
-$navbar-light-active-color:         rgba($black, .9) !default;
-$navbar-light-disabled-color:       rgba($black, .3) !default;
-$navbar-light-toggler-icon-bg:      str-replace(url("data:image/svg+xml;charset=utf8,%3Csvg viewBox='0 0 30 30' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath stroke='#{$navbar-light-color}' stroke-width='2' stroke-linecap='round' stroke-miterlimit='10' d='M4 7h22M4 15h22M4 23h22'/%3E%3C/svg%3E"), "#", "%23") !default;
-$navbar-light-toggler-border-color: rgba($black, .1) !default;
-
-// Pagination
-
-$pagination-padding-y:              .5rem !default;
-$pagination-padding-x:              .75rem !default;
-$pagination-padding-y-sm:           .25rem !default;
-$pagination-padding-x-sm:           .5rem !default;
-$pagination-padding-y-lg:           .75rem !default;
-$pagination-padding-x-lg:           1.5rem !default;
-$pagination-line-height:            1.25 !default;
-
-$pagination-color:                  $link-color !default;
-$pagination-bg:                     $white !default;
-$pagination-border-width:           $border-width !default;
-$pagination-border-color:           $gray-300 !default;
-
-$pagination-focus-box-shadow:       $input-btn-focus-box-shadow !default;
-$pagination-focus-outline:          0 !default;
-
-$pagination-hover-color:            $link-hover-color !default;
-$pagination-hover-bg:               $gray-200 !default;
-$pagination-hover-border-color:     $gray-300 !default;
-
-$pagination-active-color:           $component-active-color !default;
-$pagination-active-bg:              $component-active-bg !default;
-$pagination-active-border-color:    $pagination-active-bg !default;
-
-$pagination-disabled-color:         $gray-600 !default;
-$pagination-disabled-bg:            $white !default;
-$pagination-disabled-border-color:  $gray-300 !default;
-
-
-// Jumbotron
-
-$jumbotron-padding:                 2rem !default;
-$jumbotron-bg:                      $gray-200 !default;
-
-
-// Cards
-
-$card-spacer-y:                     .75rem !default;
-$card-spacer-x:                     1.25rem !default;
-$card-border-width:                 $border-width !default;
-$card-border-radius:                $border-radius !default;
-$card-border-color:                 rgba($black, .125) !default;
-$card-inner-border-radius:          calc(#{$card-border-radius} - #{$card-border-width}) !default;
-$card-cap-bg:                       rgba($black, .03) !default;
-$card-bg:                           $white !default;
-
-$card-img-overlay-padding:          1.25rem !default;
-
-$card-group-margin:                 ($grid-gutter-width / 2) !default;
-$card-deck-margin:                  $card-group-margin !default;
-
-$card-columns-count:                3 !default;
-$card-columns-gap:                  1.25rem !default;
-$card-columns-margin:               $card-spacer-y !default;
-
-
-// Tooltips
-
-$tooltip-font-size:                 $font-size-sm !default;
-$tooltip-max-width:                 200px !default;
-$tooltip-color:                     $white !default;
-$tooltip-bg:                        $black !default;
-$tooltip-border-radius:             $border-radius !default;
-$tooltip-opacity:                   .9 !default;
-$tooltip-padding-y:                 .25rem !default;
-$tooltip-padding-x:                 .5rem !default;
-$tooltip-margin:                    0 !default;
-
-$tooltip-arrow-width:               .8rem !default;
-$tooltip-arrow-height:              .4rem !default;
-$tooltip-arrow-color:               $tooltip-bg !default;
-
-
-// Popovers
-
-$popover-font-size:                 $font-size-sm !default;
-$popover-bg:                        $white !default;
-$popover-max-width:                 276px !default;
-$popover-border-width:              $border-width !default;
-$popover-border-color:              rgba($black, .2) !default;
-$popover-border-radius:             $border-radius-lg !default;
-$popover-box-shadow:                0 .25rem .5rem rgba($black, .2) !default;
-
-$popover-header-bg:                 darken($popover-bg, 3%) !default;
-$popover-header-color:              $headings-color !default;
-$popover-header-padding-y:          .5rem !default;
-$popover-header-padding-x:          .75rem !default;
-
-$popover-body-color:                $body-color !default;
-$popover-body-padding-y:            $popover-header-padding-y !default;
-$popover-body-padding-x:            $popover-header-padding-x !default;
-
-$popover-arrow-width:               1rem !default;
-$popover-arrow-height:              .5rem !default;
-$popover-arrow-color:               $popover-bg !default;
-
-$popover-arrow-outer-color:         fade-in($popover-border-color, .05) !default;
-
-
-// Badges
-
-$badge-font-size:                   75% !default;
-$badge-font-weight:                 $font-weight-bold !default;
-$badge-padding-y:                   .25em !default;
-$badge-padding-x:                   .4em !default;
-$badge-border-radius:               $border-radius !default;
-
-$badge-pill-padding-x:              .6em !default;
-// Use a higher than normal value to ensure completely rounded edges when
-// customizing padding or font-size on labels.
-$badge-pill-border-radius:          10rem !default;
-
-
-// Modals
-
-// Padding applied to the modal body
-$modal-inner-padding:               1rem !default;
-
-$modal-dialog-margin:               .5rem !default;
-$modal-dialog-margin-y-sm-up:       1.75rem !default;
-
-$modal-title-line-height:           $line-height-base !default;
-
-$modal-content-bg:                  $white !default;
-$modal-content-border-color:        rgba($black, .2) !default;
-$modal-content-border-width:        $border-width !default;
-$modal-content-border-radius:       $border-radius-lg !default;
-$modal-content-box-shadow-xs:       0 .25rem .5rem rgba($black, .5) !default;
-$modal-content-box-shadow-sm-up:    0 .5rem 1rem rgba($black, .5) !default;
-
-$modal-backdrop-bg:                 $black !default;
-$modal-backdrop-opacity:            .5 !default;
-$modal-header-border-color:         $gray-200 !default;
-$modal-footer-border-color:         $modal-header-border-color !default;
-$modal-header-border-width:         $modal-content-border-width !default;
-$modal-footer-border-width:         $modal-header-border-width !default;
-$modal-header-padding:              1rem !default;
-
-$modal-lg:                          800px !default;
-$modal-md:                          500px !default;
-$modal-sm:                          300px !default;
-
-$modal-transition:                  transform .3s ease-out !default;
-
-
-// Alerts
-//
-// Define alert colors, border radius, and padding.
-
-$alert-padding-y:                   .75rem !default;
-$alert-padding-x:                   1.25rem !default;
-$alert-margin-bottom:               1rem !default;
-$alert-border-radius:               $border-radius !default;
-$alert-link-font-weight:            $font-weight-bold !default;
-$alert-border-width:                $border-width !default;
-
-$alert-bg-level:                    -10 !default;
-$alert-border-level:                -9 !default;
-$alert-color-level:                 6 !default;
-
-
-// Progress bars
-
-$progress-height:                   1rem !default;
-$progress-font-size:                ($font-size-base * .75) !default;
-$progress-bg:                       $gray-200 !default;
-$progress-border-radius:            $border-radius !default;
-$progress-box-shadow:               inset 0 .1rem .1rem rgba($black, .1) !default;
-$progress-bar-color:                $white !default;
-$progress-bar-bg:                   theme-color("primary") !default;
-$progress-bar-animation-timing:     1s linear infinite !default;
-$progress-bar-transition:           width .6s ease !default;
-
-// List group
-
-$list-group-bg:                     $white !default;
-$list-group-border-color:           rgba($black, .125) !default;
-$list-group-border-width:           $border-width !default;
-$list-group-border-radius:          $border-radius !default;
-
-$list-group-item-padding-y:         .75rem !default;
-$list-group-item-padding-x:         1.25rem !default;
-
-$list-group-hover-bg:               $gray-100 !default;
-$list-group-active-color:           $component-active-color !default;
-$list-group-active-bg:              $component-active-bg !default;
-$list-group-active-border-color:    $list-group-active-bg !default;
-
-$list-group-disabled-color:         $gray-600 !default;
-$list-group-disabled-bg:            $list-group-bg !default;
-
-$list-group-action-color:           $gray-700 !default;
-$list-group-action-hover-color:     $list-group-action-color !default;
-
-$list-group-action-active-color:    $body-color !default;
-$list-group-action-active-bg:       $gray-200 !default;
-
-
-// Image thumbnails
-
-$thumbnail-padding:                 .25rem !default;
-$thumbnail-bg:                      $body-bg !default;
-$thumbnail-border-width:            $border-width !default;
-$thumbnail-border-color:            $gray-300 !default;
-$thumbnail-border-radius:           $border-radius !default;
-$thumbnail-box-shadow:              0 1px 2px rgba($black, .075) !default;
-
-
-// Figures
-
-$figure-caption-font-size:          90% !default;
-$figure-caption-color:              $gray-600 !default;
-
-
-// Breadcrumbs
-
-$breadcrumb-padding-y:              .75rem !default;
-$breadcrumb-padding-x:              1rem !default;
-$breadcrumb-item-padding:           .5rem !default;
-
-$breadcrumb-margin-bottom:          1rem !default;
-
-$breadcrumb-bg:                     $gray-200 !default;
-$breadcrumb-divider-color:          $gray-600 !default;
-$breadcrumb-active-color:           $gray-600 !default;
-$breadcrumb-divider:                quote("/") !default;
-
-$breadcrumb-border-radius:          $border-radius !default;
-
-
-// Carousel
-
-$carousel-control-color:            $white !default;
-$carousel-control-width:            15% !default;
-$carousel-control-opacity:          .5 !default;
-
-$carousel-indicator-width:          30px !default;
-$carousel-indicator-height:         3px !default;
-$carousel-indicator-spacer:         3px !default;
-$carousel-indicator-active-bg:      $white !default;
-
-$carousel-caption-width:            70% !default;
-$carousel-caption-color:            $white !default;
-
-$carousel-control-icon-width:       20px !default;
-
-$carousel-control-prev-icon-bg:     str-replace(url("data:image/svg+xml;charset=utf8,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='#{$carousel-control-color}' viewBox='0 0 8 8'%3E%3Cpath d='M5.25 0l-4 4 4 4 1.5-1.5-2.5-2.5 2.5-2.5-1.5-1.5z'/%3E%3C/svg%3E"), "#", "%23") !default;
-$carousel-control-next-icon-bg:     str-replace(url("data:image/svg+xml;charset=utf8,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='#{$carousel-control-color}' viewBox='0 0 8 8'%3E%3Cpath d='M2.75 0l-1.5 1.5 2.5 2.5-2.5 2.5 1.5 1.5 4-4-4-4z'/%3E%3C/svg%3E"), "#", "%23") !default;
-
-$carousel-transition:               transform .6s ease !default; // Define transform transition first if using multiple transitons (e.g., `transform 2s ease, opacity .5s ease-out`)
-
-
-// Close
-
-$close-font-size:                   $font-size-base * 1.5 !default;
-$close-font-weight:                 $font-weight-bold !default;
-$close-color:                       $black !default;
-$close-text-shadow:                 0 1px 0 $white !default;
-
-// Code
-
-$code-font-size:                    87.5% !default;
-$code-color:                        $pink !default;
-
-$kbd-padding-y:                     .2rem !default;
-$kbd-padding-x:                     .4rem !default;
-$kbd-font-size:                     $code-font-size !default;
-$kbd-color:                         $white !default;
-$kbd-bg:                            $gray-900 !default;
-
-$pre-color:                         $gray-900 !default;
-$pre-scrollable-max-height:         340px !default;
-
-
-// Printing
-$print-page-size:                   a3 !default;
-$print-body-min-width:              map-get($grid-breakpoints, "lg") !default;
diff --git a/Gems/AssetMemoryAnalyzer/External/tabulator-master/src/scss/semantic-ui/tabulator_semantic-ui.scss b/Gems/AssetMemoryAnalyzer/External/tabulator-master/src/scss/semantic-ui/tabulator_semantic-ui.scss
deleted file mode 100644
index 054b6181c9..0000000000
--- a/Gems/AssetMemoryAnalyzer/External/tabulator-master/src/scss/semantic-ui/tabulator_semantic-ui.scss
+++ /dev/null
@@ -1,1332 +0,0 @@
-
-@import "variables_table.scss";
-
-
-
-//Main Theme Variables
-$backgroundColor: $background !default; //background color of tabulator
-$textSize:14px !default; //table text size
-
-//header themeing
-$headerBackgroundColor:$headerBackground !default; //border to tabulator
-$headerTextColor:$headerColor !default; //header text colour
-$headerBorderColor:#ddd !default;  //header border color
-$headerSeperatorColor:#999 !default; //header bottom seperator color
-$headerMargin:4px !default; //padding round header
-
-//column header arrows
-$sortArrowActive: #666 !default;
-$sortArrowInactive: #bbb !default;
-
-//row themeing
-$rowBorderColor:#ddd !default; //table border color
-$rowTextColor:#333 !default; //table text color
-
-$rowSelectedBackground: #9ABCEA !default; //row background color when selected
-$rowSelectedBackgroundHover: #769BCC !default;//row background color when selected and hovered
-
-
-$editBoxColor:#1D68CD !default; //border color for edit boxes
-$errorColor:#dd0000 !default; //error indication
-
-//footer themeing
-$footerBackgroundColor:#fff !default; //border to tabulator
-$footerTextColor:#555 !default; //footer text colour
-$footerBorderColor:#aaa !default; //footer border color
-$footerSeperatorColor:#999 !default; //footer bottom seperator color
-$footerActiveColor:#d00 !default; //footer bottom active text color
-
-
-//Tabulator Containing Element
-.tabulator{
-	position: relative;
-	background-color: $backgroundColor;
-	overflow:hidden;
-	font-size:$textSize;
-	text-align: left;
-	width: 100%;
-
-	margin: $margin;
-	border: $border;
-	box-shadow: $boxShadow;
-	border-radius: $borderRadius;
-	color: $color;
-
-	-webkit-transform: translatez(0);
-	-moz-transform: translatez(0);
-	-ms-transform: translatez(0);
-	-o-transform: translatez(0);
-	transform: translatez(0);
-
-	&[tabulator-layout="fitDataFill"]{
-		.tabulator-tableHolder{
-			.tabulator-table{
-				min-width:100%;
-			}
-		}
-	}
-
-	&.tabulator-block-select{
-		user-select: none;
-	}
-
-	//column header containing element
-	.tabulator-header{
-		position:relative;
-		box-sizing: border-box;
-
-		width:100%;
-
-		border-bottom: $headerBorder;
-		background-color: $headerBackgroundColor;
-
-		box-shadow: $headerBoxShadow;
-
-		color: $headerTextColor;
-		font-style: $headerFontStyle;
-		font-weight: $headerFontWeight;
-		text-transform: $headerTextTransform;
-
-		white-space: nowrap;
-		overflow:hidden;
-
-		-moz-user-select: none;
-		-khtml-user-select: none;
-		-webkit-user-select: none;
-		-o-user-select: none;
-
-		//individual column header element
-		.tabulator-col{
-			display:inline-block;
-
-			position:relative;
-			box-sizing:border-box;
-			// border-right: $headerDivider;
-			background-color: $headerBackgroundColor;
-			text-align:left;
-			vertical-align: bottom;
-			overflow: hidden;
-
-			&.tabulator-moving{
-				position: absolute;
-				border:1px solid  $headerSeperatorColor;
-				background:darken($headerBackgroundColor, 10%);
-				pointer-events: none;
-			}
-
-			//hold content of column header
-			.tabulator-col-content{
-				box-sizing:border-box;
-				position: relative;
-				padding: $headerVerticalPadding $headerHorizontalPadding;
-
-				//hold title of column header
-				.tabulator-col-title{
-					box-sizing:border-box;
-					width: 100%;
-
-					white-space: nowrap;
-					overflow: hidden;
-					text-overflow: ellipsis;
-					vertical-align:bottom;
-
-					//element to hold title editor
-					.tabulator-title-editor{
-						box-sizing: border-box;
-						width: 100%;
-
-						border:1px solid #999;
-
-						padding:1px;
-
-						background: #fff;
-					}
-				}
-
-				//column sorter arrow
-				.tabulator-arrow{
-					display: inline-block;
-					position: absolute;
-					top:18px;
-					right:8px;
-					width: 0;
-					height: 0;
-					border-left: 6px solid transparent;
-					border-right: 6px solid transparent;
-					border-bottom: 6px solid $sortArrowInactive;
-				}
-
-			}
-
-			//complex header column group
-			&.tabulator-col-group{
-
-				//gelement to hold sub columns in column group
-				.tabulator-col-group-cols{
-					position:relative;
-					display: flex;
-
-					border-top:1px solid $headerBorderColor;
-					overflow: hidden;
-
-					.tabulator-col:last-child{
-						margin-right:-1px;
-					}
-				}
-			}
-
-
-			//hide left resize handle on first column
-			&:first-child{
-				.tabulator-col-resize-handle.prev{
-					display: none;
-				}
-			}
-
-			//placeholder element for sortable columns
-			&.ui-sortable-helper{
-				position: absolute;
-				background-color:darken($headerBackgroundColor, 10%) !important;
-				border:1px solid $headerBorderColor;
-			}
-
-			//header filter containing element
-			.tabulator-header-filter{
-				position: relative;
-				box-sizing: border-box;
-				margin-top:2px;
-				width:100%;
-				text-align: center;
-
-				//styling adjustment for inbuilt editors
-				textarea{
-					height:auto !important;
-				}
-
-				svg{
-					margin-top: 3px;
-				}
-
-				input{
-					&::-ms-clear {
-					  width : 0;
-					  height: 0;
-					}
-				}
-			}
-
-
-			//styling child elements for sortable columns
-			&.tabulator-sortable{
-				.tabulator-col-title{
-					padding-right:25px;
-				}
-
-				&:hover{
-					cursor:pointer;
-					background-color:darken($headerBackgroundColor, 10%);
-				}
-
-				&[aria-sort="none"]{
-					.tabulator-col-content .tabulator-arrow{
-						border-top: none;
-						border-bottom: 6px solid $sortArrowInactive;
-					}
-				}
-
-				&[aria-sort="asc"]{
-					.tabulator-col-content .tabulator-arrow{
-						border-top: none;
-						border-bottom: 6px solid $sortArrowActive;
-					}
-				}
-
-				&[aria-sort="desc"]{
-					.tabulator-col-content .tabulator-arrow{
-						border-top: 6px solid $sortArrowActive;
-						border-bottom: none;
-					}
-				}
-			}
-
-			&.tabulator-col-vertical{
-				.tabulator-col-content{
-					.tabulator-col-title{
-						writing-mode: vertical-rl;
-						text-orientation: mixed;
-
-						display:flex;
-						align-items:center;
-						justify-content:center;
-					}
-				}
-
-				&.tabulator-col-vertical-flip{
-					.tabulator-col-title{
-						transform: rotate(180deg);
-					}
-				}
-
-				&.tabulator-sortable{
-					.tabulator-col-title{
-						padding-right:0;
-						padding-top:20px;
-					}
-
-					&.tabulator-col-vertical-flip{
-						.tabulator-col-title{
-							padding-right:0;
-							padding-bottom:20px;
-						}
-
-					}
-
-					.tabulator-arrow{
-						right:calc(50% - 6px);
-					}
-				}
-			}
-
-		}
-
-		.tabulator-frozen{
-			display: inline-block;
-			position: absolute;
-
-			// background-color: inherit;
-
-			z-index: 10;
-
-			&.tabulator-frozen-left{
-				border-right:2px solid $rowBorderColor;
-			}
-
-			&.tabulator-frozen-right{
-				border-left:2px solid $rowBorderColor;
-			}
-		}
-
-
-		.tabulator-calcs-holder{
-			box-sizing:border-box;
-			min-width:400%;
-
-			background:lighten($headerBackgroundColor, 5%) !important;
-
-			.tabulator-row{
-				background:lighten($headerBackgroundColor, 5%) !important;
-
-				.tabulator-col-resize-handle{
-					display: none;
-				}
-			}
-
-			border-top:1px solid $rowBorderColor;
-			border-bottom:1px solid $headerBorderColor;
-
-			overflow: hidden;
-		}
-
-		.tabulator-frozen-rows-holder{
-			min-width:400%;
-
-			&:empty{
-				display: none;
-			}
-		}
-	}
-
-
-
-	//scrolling element to hold table
-	.tabulator-tableHolder{
-		position:relative;
-		width:100%;
-		white-space: nowrap;
-		overflow:auto;
-		-webkit-overflow-scrolling: touch;
-
-		&:focus{
-			outline: none;
-		}
-
-		//default placeholder element
-		.tabulator-placeholder{
-			box-sizing:border-box;
-			display: flex;
-			align-items:center;
-
-			&[tabulator-render-mode="virtual"]{
-				position: absolute;
-				top:0;
-				left:0;
-				height:100%;
-			}
-
-			width:100%;
-
-			span{
-				display: inline-block;
-
-				margin:0 auto;
-				padding:10px;
-
-				color:#000;
-				font-weight: bold;
-				font-size: 20px;
-			}
-		}
-
-		//element to hold table rows
-		.tabulator-table{
-			position:relative;
-			display:inline-block;
-			white-space: nowrap;
-			overflow:visible;
-			color:$rowTextColor;
-
-			.tabulator-row{
-				&.tabulator-calcs{
-					font-weight: bold;
-					background:darken($background, 5%) !important;
-
-					&.tabulator-calcs-top{
-						border-bottom:2px solid $rowBorderColor;
-					}
-
-					&.tabulator-calcs-bottom{
-						border-top:2px solid $rowBorderColor;
-					}
-				}
-			}
-		}
-	}
-
-
-	//column resize handles
-	.tabulator-col-resize-handle{
-		position:absolute;
-		right:0;
-		top:0;
-		bottom:0;
-		width:5px;
-
-		&.prev{
-			left:0;
-			right:auto;
-		}
-
-		&:hover{
-			cursor:ew-resize;
-		}
-	}
-
-
-	//footer element
-	.tabulator-footer{
-		padding: $footerVerticalPadding $footerHorizontalPadding;
-
-		border-top: $footerBorder;
-		box-shadow: $footerBoxShadow;
-
-		background: $footerBackground;
-
-
-		text-align:right;
-		color: $footerColor;
-
-		font-style: $footerFontStyle;
-		font-weight: $footerFontWeight;
-		text-transform: $footerTextTransform;
-
-		white-space:nowrap;
-		user-select:none;
-
-		-moz-user-select: none;
-		-khtml-user-select: none;
-		-webkit-user-select: none;
-		-o-user-select: none;
-
-		.tabulator-calcs-holder{
-			box-sizing:border-box;
-			width:calc(100% + 20px);
-			margin:(-$footerVerticalPadding) (-$footerHorizontalPadding) $footerVerticalPadding (-$footerHorizontalPadding);
-
-			text-align: left;
-
-			background:lighten($footerBackground, 5%) !important;
-
-			.tabulator-row{
-				font-weight: bold;
-				background:lighten($footerBackground, 5%) !important;
-
-				.tabulator-col-resize-handle{
-					display: none;
-				}
-			}
-
-			border-bottom:1px solid $rowBorderColor;
-			border-top:1px solid $rowBorderColor;
-
-			overflow: hidden;
-
-			&:only-child{
-				margin-bottom:-$footerVerticalPadding;
-				border-bottom:none;
-			}
-		}
-
-		//pagination container element
-		.tabulator-pages{
-			margin:0 7px;
-		}
-
-		//pagination button
-		.tabulator-page{
-			display:inline-block;
-			margin:0 2px;
-			border:1px solid $footerBorderColor;
-			border-radius:3px;
-			padding:2px 5px;
-			background:rgba(255,255,255,.2);
-			color: $footerTextColor;
-			font-family:inherit;
-			font-weight:inherit;
-			font-size:inherit;
-
-			&.active{
-				color:$footerActiveColor;
-			}
-
-			&:disabled{
-				opacity:.5;
-			}
-
-			&:not(.disabled){
-				&:hover{
-					cursor:pointer;
-					background:rgba(0,0,0,.2);
-					color:#fff;
-				}
-			}
-		}
-	}
-
-	//holding div that contains loader and covers tabulator element to prevent interaction
-	.tabulator-loader{
-		position:absolute;
-		display: flex;
-		align-items:center;
-
-		top:0;
-		left:0;
-		z-index:100;
-
-		height:100%;
-		width:100%;
-		background:rgba(0,0,0,.4);
-		text-align:center;
-
-		//loading message element
-		.tabulator-loader-msg{
-			display:inline-block;
-
-			margin:0 auto;
-			padding:10px 20px;
-
-			border-radius:10px;
-
-			background:#fff;
-			font-weight:bold;
-			font-size:16px;
-
-			//loading message
-			&.tabulator-loading{
-				border:4px solid #333;
-				color:#000;
-			}
-
-			//error message
-			&.tabulator-error{
-				border:4px solid #D00;
-				color:#590000;
-			}
-		}
-	}
-
-
-	//Semantic-ui theming classes
-
-	.tabulator-tableHolder{
-		.tabulator-table{
-			.tabulator-row{
-				&.positive, .tabulator-cell.positive{
-					box-shadow: $positiveBoxShadow;
-					background: $positiveBackgroundColor !important;
-					color: $positiveColor !important;
-
-					&:hover{
-						background: $positiveBackgroundHover !important;
-						color: $positiveColorHover !important;
-					}
-				}
-
-				&.negative, .tabulator-cell.negative{
-					box-shadow: $negativeBoxShadow;
-					background: $negativeBackgroundColor !important;
-					color: $negativeColor !important;
-
-					&:hover{
-						background: $negativeBackgroundHover !important;
-						color: $negativeColorHover !important;
-					}
-				}
-
-				&.error, .tabulator-cell.error{
-					box-shadow: $errorBoxShadow;
-					background: $errorBackgroundColor !important;
-					color: $errorColor !important;
-
-					&:hover{
-						background: $errorBackgroundHover !important;
-						color: $errorColorHover !important;
-					}
-				}
-
-				&.warning, .tabulator-cell.warning{
-					box-shadow: $warningBoxShadow;
-					background: $warningBackgroundColor !important;
-					color: $warningColor !important;
-
-					&:hover{
-						background: $warningBackgroundHover !important;
-						color: $warningColorHover !important;
-					}
-				}
-
-				&.active, .tabulator-cell.active{
-					box-shadow: $activeBoxShadow;
-					background: $activeBackgroundColor !important;
-					color: $activeColor !important;
-
-					&:hover{
-						background: $positiveBackgroundHover !important;
-						color: $positiveColorHover !important;
-					}
-				}
-
-				&.active, &.disabled:hover, .tabulator-cell.active{
-					pointer-events: none;
-					color: $disabledTextColor;
-				}
-			}
-		}
-	}
-
-
-	&.inverted{
-
-		background: $invertedBackground;
-		color: $invertedCellColor;
-		border: $invertedBorder;
-
-		.tabulator-header{
-			background-color: $invertedHeaderBackground;
-			border-color: $invertedHeaderBorderColor !important;
-			color: $invertedHeaderColor;
-
-			.tabulator-col{
-				border-color: $invertedCellBorderColor !important;
-			}
-		}
-
-		.tabulator-tableHolder{
-			.tabulator-table{
-				.tabulator-row{
-					color: $invertedCellColor;
-					border: $invertedBorder;
-
-					.tabulator-cell{
-						border-color: $invertedCellBorderColor !important;
-					}
-				}
-			}
-		}
-
-		.tabulator-footer{
-			background: $definitionPageBackground;
-		}
-	}
-
-	&.striped{
-		.tabulator-tableHolder{
-			.tabulator-table{
-				.tabulator-row{
-					&:nth-child(even){
-						background-color: $basicTableStripedBackground !important;
-					}
-				}
-			}
-		}
-	}
-
-	&.celled{
-		border:1px solid $borderColor;
-
-		.tabulator-header{
-			.tabulator-col{
-				border-right:$cellBorder;
-			}
-		}
-
-		.tabulator-tableHolder{
-			.tabulator-table{
-				.tabulator-row{
-					.tabulator-cell{
-						border-right:$cellBorder;
-					}
-				}
-			}
-		}
-
-	}
-
-
-	&[class*="single line"]{
-		.tabulator-tableHolder{
-			.tabulator-table{
-				.tabulator-row{
-					.tabulator-cell{
-						border-right:none;
-					}
-				}
-			}
-		}
-	}
-
-	//coloured table varients
-	/* Red */
-	&.red {
-		border-top: $coloredBorderSize solid $red;
-	}
-	&.inverted.red {
-		background-color: $red !important;
-		color: $white !important;
-	}
-
-	/* Orange */
-	&.orange {
-		border-top: $coloredBorderSize solid $orange;
-	}
-	&.inverted.orange {
-		background-color: $orange !important;
-		color: $white !important;
-	}
-
-	/* Yellow */
-	&.yellow {
-		border-top: $coloredBorderSize solid $yellow;
-	}
-	&.inverted.yellow {
-		background-color: $yellow !important;
-		color: $white !important;
-	}
-
-	/* Olive */
-	&.olive {
-		border-top: $coloredBorderSize solid $olive;
-	}
-	&.inverted.olive {
-		background-color: $olive !important;
-		color: $white !important;
-	}
-
-	/* Green */
-	&.green {
-		border-top: $coloredBorderSize solid $green;
-	}
-	&.inverted.green {
-		background-color: $green !important;
-		color: $white !important;
-	}
-
-	/* Teal */
-	&.teal {
-		border-top: $coloredBorderSize solid $teal;
-	}
-	&.inverted.teal {
-		background-color: $teal !important;
-		color: $white !important;
-	}
-
-	/* Blue */
-	&.blue {
-		border-top: $coloredBorderSize solid $blue;
-	}
-	&.inverted.blue {
-		background-color: $blue !important;
-		color: $white !important;
-	}
-
-	/* Violet */
-	&.violet {
-		border-top: $coloredBorderSize solid $violet;
-	}
-	&.inverted.violet {
-		background-color: $violet !important;
-		color: $white !important;
-	}
-
-	/* Purple */
-	&.purple {
-		border-top: $coloredBorderSize solid $purple;
-	}
-	&.inverted.purple {
-		background-color: $purple !important;
-		color: $white !important;
-	}
-
-	/* Pink */
-	&.pink {
-		border-top: $coloredBorderSize solid $pink;
-	}
-	&.inverted.pink {
-		background-color: $pink !important;
-		color: $white !important;
-	}
-
-	/* Brown */
-	&.brown {
-		border-top: $coloredBorderSize solid $brown;
-	}
-	&.inverted.brown {
-		background-color: $brown !important;
-		color: $white !important;
-	}
-
-	/* Grey */
-	&.grey {
-		border-top: $coloredBorderSize solid $grey;
-	}
-	&.inverted.grey {
-		background-color: $grey !important;
-		color: $white !important;
-	}
-
-	/* Black */
-	&.black {
-		border-top: $coloredBorderSize solid $black;
-	}
-	&.inverted.black {
-		background-color: $black !important;
-		color: $white !important;
-	}
-
-	&.padded{
-		.tabulator-header{
-			.tabulator-col{
-				.tabulator-col-content{
-					padding: $paddedVerticalPadding $paddedHorizontalPadding;
-
-					.tabulator-arrow{
-						top:20px;
-					}
-				}
-			}
-		}
-		.tabulator-tableHolder{
-			.tabulator-table{
-				.tabulator-row{
-					.tabulator-cell{
-						padding: $paddedVerticalPadding $paddedHorizontalPadding;
-					}
-				}
-			}
-		}
-
-		&.very{
-			.tabulator-header{
-				.tabulator-col{
-					.tabulator-col-content{
-						padding: $veryPaddedVerticalPadding $veryPaddedHorizontalPadding;
-
-						.tabulator-arrow{
-							top:26px;
-						}
-					}
-				}
-			}
-			.tabulator-tableHolder{
-				.tabulator-table{
-					.tabulator-row{
-						.tabulator-cell{
-							padding: $veryPaddedVerticalPadding $veryPaddedHorizontalPadding;
-						}
-					}
-				}
-			}
-		}
-	}
-
-	&.compact{
-		.tabulator-header{
-			.tabulator-col{
-				.tabulator-col-content{
-					padding: $compactVerticalPadding $compactHorizontalPadding;
-
-					.tabulator-arrow{
-						top:12px;
-					}
-				}
-			}
-		}
-		.tabulator-tableHolder{
-			.tabulator-table{
-				.tabulator-row{
-					.tabulator-cell{
-						padding: $compactVerticalPadding $compactHorizontalPadding;
-					}
-				}
-			}
-		}
-
-		&.very{
-			.tabulator-header{
-				.tabulator-col{
-					.tabulator-col-content{
-						padding: $veryCompactVerticalPadding $veryCompactHorizontalPadding;
-
-						.tabulator-arrow{
-							top:10px;
-						}
-					}
-				}
-			}
-			.tabulator-tableHolder{
-				.tabulator-table{
-					.tabulator-row{
-						.tabulator-cell{
-							padding: $veryCompactVerticalPadding $veryCompactHorizontalPadding;
-						}
-					}
-				}
-			}
-		}
-	}
-}
-
-
-//row element
-.tabulator-row{
-	position: relative;
-	box-sizing: border-box;
-
-	min-height: $textSize + ($headerMargin * 2);
-	border-bottom: $rowBorder;
-
-	&.tabulator-selectable:hover{
-		box-shadow: $activeBoxShadow;
-		background: $activeBackgroundColor !important;
-		color: $activeColor !important;
-		cursor: pointer;
-	}
-
-	&.tabulator-selected{
-		background-color:$rowSelectedBackground;
-	}
-
-	&.tabulator-selected:hover{
-		background-color:$rowSelectedBackgroundHover;
-		cursor: pointer;
-	}
-
-	&.tabulator-moving{
-		position: absolute;
-
-		border-top:1px solid  $rowBorderColor;
-		border-bottom:1px solid  $rowBorderColor;
-
-		pointer-events: none !important;
-		z-index:15;
-	}
-
-	//row resize handles
-	.tabulator-row-resize-handle{
-		position:absolute;
-		right:0;
-		bottom:0;
-		left:0;
-		height:5px;
-
-		&.prev{
-			top:0;
-			bottom:auto;
-		}
-
-		&:hover{
-			cursor:ns-resize;
-		}
-	}
-
-	.tabulator-frozen{
-		display: inline-block;
-		position: absolute;
-
-		background-color: inherit;
-
-		z-index: 10;
-
-		&.tabulator-frozen-left{
-			border-right:2px solid $rowBorderColor;
-		}
-
-		&.tabulator-frozen-right{
-			border-left:2px solid $rowBorderColor;
-		}
-	}
-
-	.tabulator-responsive-collapse{
-		box-sizing:border-box;
-
-		padding:5px;
-
-		border-top:1px solid $rowBorderColor;
-		border-bottom:1px solid $rowBorderColor;
-
-		&:empty{
-			display:none;
-		}
-
-		table{
-			font-size:$textSize;
-
-			tr{
-				td{
-					position: relative;
-
-					&:first-of-type{
-						padding-right:10px;
-					}
-				}
-			}
-		}
-	}
-
-
-	//cell element
-	.tabulator-cell{
-		display:inline-block;
-		position: relative;
-		box-sizing:border-box;
-		padding: $cellVerticalPadding $cellHorizontalPadding;
-		// border-right:1px solid $rowBorderColor;
-		vertical-align:middle;
-		white-space:nowrap;
-		overflow:hidden;
-		text-overflow:ellipsis;
-
-		&:last-of-type{
-			border-right: none;
-		}
-
-		&.tabulator-editing{
-			border:1px solid  $editBoxColor;
-			padding: 0;
-
-			input, select{
-				border:1px;
-				background:transparent;
-			}
-		}
-
-		&.tabulator-validation-fail{
-			border:1px solid $errorColor;
-			input, select{
-				border:1px;
-				background:transparent;
-
-				color: $errorColor;
-			}
-		}
-
-		//hide left resize handle on first column
-		&:first-child{
-			.tabulator-col-resize-handle.prev{
-				display: none;
-			}
-		}
-
-		//movable row handle
-		&.tabulator-row-handle{
-
-			display: inline-flex;
-			align-items:center;
-
-			-moz-user-select: none;
-			-khtml-user-select: none;
-			-webkit-user-select: none;
-			-o-user-select: none;
-
-			//handle holder
-			.tabulator-row-handle-box{
-				width:80%;
-
-				//Hamburger element
-				.tabulator-row-handle-bar{
-					width:100%;
-					height:3px;
-					margin-top:2px;
-					background:#666;
-				}
-			}
-		}
-
-		.tabulator-data-tree-branch{
-			display:inline-block;
-			vertical-align:middle;
-
-			height:9px;
-			width:7px;
-
-			margin-top:-9px;
-			margin-right:5px;
-
-			border-bottom-left-radius:1px;
-
-			border-left:2px solid $rowBorderColor;
-			border-bottom:2px solid $rowBorderColor;
-		}
-
-		.tabulator-data-tree-control{
-
-			display:inline-flex;
-			justify-content:center;
-			align-items:center;
-			vertical-align:middle;
-
-			height:11px;
-			width:11px;
-
-			margin-right:5px;
-
-			border:1px solid $rowTextColor;
-			border-radius:2px;
-			background:rgba(0, 0, 0, .1);
-
-			overflow:hidden;
-
-			&:hover{
-				cursor:pointer;
-				background:rgba(0, 0, 0, .2);
-			}
-
-			.tabulator-data-tree-control-collapse{
-				display:inline-block;
-				position: relative;
-
-				height: 7px;
-				width: 1px;
-
-				background: transparent;
-
-				&:after {
-					position: absolute;
-					content: "";
-					left: -3px;
-					top: 3px;
-
-					height: 1px;
-					width: 7px;
-
-					background: $rowTextColor;
-				}
-			}
-
-			.tabulator-data-tree-control-expand{
-				display:inline-block;
-				position: relative;
-
-				height: 7px;
-				width: 1px;
-
-				background: $rowTextColor;
-
-				&:after {
-					position: absolute;
-					content: "";
-					left: -3px;
-					top: 3px;
-
-					height: 1px;
-					width: 7px;
-
-					background: $rowTextColor;
-				}
-			}
-
-		}
-
-		.tabulator-responsive-collapse-toggle{
-			display: inline-flex;
-			align-items:center;
-			justify-content:center;
-
-			-moz-user-select: none;
-			-khtml-user-select: none;
-			-webkit-user-select: none;
-			-o-user-select: none;
-
-			height:15px;
-			width:15px;
-
-			border-radius:20px;
-			background:#666;
-
-			color:#fff;
-			font-weight:bold;
-			font-size:1.1em;
-
-			&:hover{
-				opacity:.7;
-			}
-
-			&.open{
-				.tabulator-responsive-collapse-toggle-close{
-					display:initial;
-				}
-
-				.tabulator-responsive-collapse-toggle-open{
-					display:none;
-				}
-			}
-
-			.tabulator-responsive-collapse-toggle-close{
-				display:none;
-			}
-		}
-	}
-
-	//row grouping element
-	&.tabulator-group{
-
-		box-sizing:border-box;
-		border-bottom:1px solid #999;
-		border-right:1px solid $rowBorderColor;
-		border-top:1px solid #999;
-		padding:5px;
-		padding-left:10px;
-		background:#fafafa;
-		font-weight:bold;
-
-		min-width: 100%;
-
-		&:hover{
-			cursor:pointer;
-			background-color:rgba(0,0,0,.1);
-		}
-
-		&.tabulator-group-visible{
-			.tabulator-arrow{
-				margin-right:10px;
-				border-left: 6px solid transparent;
-				border-right: 6px solid transparent;
-				border-top: 6px solid $sortArrowActive;
-				border-bottom: 0;
-			}
-		}
-
-		&.tabulator-group-level-1{
-			.tabulator-arrow{
-				margin-left:20px;
-			}
-		}
-
-		&.tabulator-group-level-2{
-			.tabulator-arrow{
-				margin-left:40px;
-			}
-		}
-
-		&.tabulator-group-level-3{
-			.tabulator-arrow{
-				margin-left:60px;
-			}
-		}
-
-		&.tabulator-group-level-4{
-			.tabulator-arrow{
-				margin-left:80px;
-			}
-		}
-
-		&.tabulator-group-level-5{
-			.tabulator-arrow{
-				margin-left:100px;
-			}
-		}
-
-		//sorting arrow
-		.tabulator-arrow{
-			display: inline-block;
-			width: 0;
-			height: 0;
-			margin-right:16px;
-			border-top: 6px solid transparent;
-			border-bottom: 6px solid transparent;
-			border-right: 0;
-			border-left: 6px solid $sortArrowActive;
-			vertical-align:middle;
-		}
-
-		span{
-			margin-left:10px;
-			color:#666;
-		}
-	}
-}
-
-.tabulator-edit-select-list{
-	position: absolute;
-	display:inline-block;
-	box-sizing:border-box;
-
-	max-height:200px;
-
-	background:$backgroundColor;
-	border:1px solid $rowBorderColor;
-
-	font-size:$textSize;
-
-	overflow-y:auto;
-	-webkit-overflow-scrolling: touch;
-
-	z-index: 10000;
-
-	.tabulator-edit-select-list-item{
-		padding:4px;
-
-		color:$rowTextColor;
-
-		&.active{
-			color:$backgroundColor;
-			background:$editBoxColor;
-		}
-
-		&:hover{
-			cursor:pointer;
-
-			color:$backgroundColor;
-			background:$editBoxColor;
-		}
-	}
-
-	.tabulator-edit-select-list-group{
-		border-bottom:1px solid $rowBorderColor;
-
-		padding:4px;
-		padding-top:6px;
-
-		color:$rowTextColor;
-		font-weight:bold;
-	}
-}
\ No newline at end of file
diff --git a/Gems/AssetMemoryAnalyzer/External/tabulator-master/src/scss/semantic-ui/variables.scss b/Gems/AssetMemoryAnalyzer/External/tabulator-master/src/scss/semantic-ui/variables.scss
deleted file mode 100644
index a003bf0676..0000000000
--- a/Gems/AssetMemoryAnalyzer/External/tabulator-master/src/scss/semantic-ui/variables.scss
+++ /dev/null
@@ -1,829 +0,0 @@
-
-
-/*******************************
-         Site Settings
-*******************************/
-
-/*-------------------
-       Fonts
---------------------*/
-
-$fontName          : 'Lato' !default;
-$fontSmoothing     : antialiased !default;
-
-$headerFont        : $fontName, 'Helvetica Neue', Arial, Helvetica, sans-serif !default;
-$pageFont          : $fontName, 'Helvetica Neue', Arial, Helvetica, sans-serif !default;
-
-$googleFontName    : $fontName !default;
-$importGoogleFonts : true !default;
-$googleFontSizes   : '400,700,400italic,700italic' !default;
-$googleSubset      : 'latin' !default;
-
-$googleProtocol    : 'https://' !default;
-$googleFontRequest : '${googleFontName}:${googleFontSizes}&subset=${googleSubset}' !default;
-
-/*-------------------
-      Base Sizes
---------------------*/
-
-/* This is the single variable that controls them all */
-$emSize   : 14px !default;
-
-/* The size of page text  */
-$fontSize : 14px !default;
-
-/*-------------------
-  Exact Pixel Values
---------------------*/
-/*
-  These are used to specify exact pixel values in em
-  for things like borders that remain constantly
-  sized as emSize adjusts
-
-  Since there are many more sizes than names for sizes,
-  these are named by their original pixel values.
-
-*/
-
-
-$a1px  : (1 / $emSize) + rem !default;
-$a4px  : (4 / $emSize) + rem !default;
-$a11px  : (11 / $emSize) + rem !default;
-$a14px  : (14 / $emSize) + rem !default;
-
-$relative1px  : (1 / $emSize) + em !default;
-$relative4px  : (4 / $emSize) + em !default;
-$relative11px  : (11 / $emSize) + em !default;
-$relative14px  : (14 / $emSize) + em !default;
-
-
-
-/*-------------------
-    Border Radius
---------------------*/
-
-/* See Power-user section below
-   for explanation of $px variables
-*/
-$relativeBorderRadius: $relative4px !default;
-$absoluteBorderRadius: $a4px !default;
-
-$defaultBorderRadius: $absoluteBorderRadius !default;
-
-
-
-/*-------------------
-      Site Colors
---------------------*/
-
-/*---  Colors  ---*/
-$red              : #DB2828 !default;
-$orange           : #F2711C !default;
-$yellow           : #FBBD08 !default;
-$olive            : #B5CC18 !default;
-$green            : #21BA45 !default;
-$teal             : #00B5AD !default;
-$blue             : #2185D0 !default;
-$violet           : #6435C9 !default;
-$purple           : #A333C8 !default;
-$pink             : #E03997 !default;
-$brown            : #A5673F !default;
-$grey             : #767676 !default;
-$black            : #1B1C1D !default;
-
-/*---  Light Colors  ---*/
-$lightRed         : #FF695E !default;
-$lightOrange      : #FF851B !default;
-$lightYellow      : #FFE21F !default;
-$lightOlive       : #D9E778 !default;
-$lightGreen       : #2ECC40 !default;
-$lightTeal        : #6DFFFF !default;
-$lightBlue        : #54C8FF !default;
-$lightViolet      : #A291FB !default;
-$lightPurple      : #DC73FF !default;
-$lightPink        : #FF8EDF !default;
-$lightBrown       : #D67C1C !default;
-$lightGrey        : #DCDDDE !default;
-$lightBlack       : #545454 !default;
-
-/*---   Neutrals  ---*/
-$fullBlack        : #000000 !default;
-$offWhite         : #F9FAFB !default;
-$darkWhite        : #F3F4F5 !default;
-$midWhite         : #DCDDDE !default;
-$white            : #FFFFFF !default;
-
-/*--- Colored Backgrounds ---*/
-$redBackground    : #FFE8E6 !default;
-$orangeBackground : #FFEDDE !default;
-$yellowBackground : #FFF8DB !default;
-$oliveBackground  : #FBFDEF !default;
-$greenBackground  : #E5F9E7 !default;
-$tealBackground   : #E1F7F7 !default;
-$blueBackground   : #DFF0FF !default;
-$violetBackground : #EAE7FF !default;
-$purpleBackground : #F6E7FF !default;
-$pinkBackground   : #FFE3FB !default;
-$brownBackground  : #F1E2D3 !default;
-
-/*--- Colored Text ---*/
-$redTextColor    : $red !default;
-$orangeTextColor : $orange !default;
-$yellowTextColor : #B58105 !default; // Yellow text is difficult to read
-$oliveTextColor  : #8ABC1E !default; // Olive is difficult to read
-$greenTextColor  : #1EBC30 !default; // Green is difficult to read
-$tealTextColor   : #10A3A3 !default; // Teal text is difficult to read
-$blueTextColor   : $blue !default;
-$violetTextColor : $violet !default;
-$purpleTextColor : $purple !default;
-$pinkTextColor   : $pink !default;
-$brownTextColor  : $brown !default;
-
-/*--- Colored Headers ---*/
-$redHeaderColor    : darken($redTextColor, 5) !default;
-$oliveHeaderColor  : darken($oliveTextColor, 5) !default;
-$greenHeaderColor  : darken($greenTextColor, 5) !default;
-$yellowHeaderColor : darken($yellowTextColor, 5) !default;
-$blueHeaderColor   : darken($blueTextColor, 5) !default;
-$tealHeaderColor   : darken($tealTextColor, 5) !default;
-$pinkHeaderColor   : darken($pinkTextColor, 5) !default;
-$violetHeaderColor : darken($violetTextColor, 5) !default;
-$purpleHeaderColor : darken($purpleTextColor, 5) !default;
-$orangeHeaderColor : darken($orangeTextColor, 5) !default;
-$brownHeaderColor  : darken($brownTextColor, 5) !default;
-
-/*--- Colored Border ---*/
-$redBorderColor    : $redTextColor !default;
-$orangeBorderColor : $orangeTextColor !default;
-$yellowBorderColor : $yellowTextColor !default;
-$oliveBorderColor  : $oliveTextColor !default;
-$greenBorderColor  : $greenTextColor !default;
-$tealBorderColor   : $tealTextColor !default;
-$blueBorderColor   : $blueTextColor !default;
-$violetBorderColor : $violetTextColor !default;
-$purpleBorderColor : $purpleTextColor !default;
-$pinkBorderColor   : $pinkTextColor !default;
-$brownBorderColor  : $brownTextColor !default;
-
-/*-------------------
-     Alpha Colors
---------------------*/
-
-$subtleTransparentBlack     : rgba(0, 0, 0, 0.03) !default;
-$transparentBlack           : rgba(0, 0, 0, 0.05) !default;
-$strongTransparentBlack     : rgba(0, 0, 0, 0.10) !default;
-$veryStrongTransparentBlack : rgba(0, 0, 0, 0.15) !default;
-
-$subtleTransparentWhite     : rgba(255, 255, 255, 0.02) !default;
-$transparentWhite           : rgba(255, 255, 255, 0.08) !default;
-$strongTransparentWhite     : rgba(255, 255, 255, 0.15) !default;
-
-
-
-/*-------------------
-    Brand Colors
---------------------*/
-
-$primaryColor        : $blue !default;
-$secondaryColor      : $black !default;
-
-$lightPrimaryColor   : $lightBlue !default;
-$lightSecondaryColor : $lightBlack !default;
-
-/*--------------
-  Page Heading
----------------*/
-
-$headerFontWeight : bold !default;
-$headerLineHeight : (18 / 14) * 1em !default;
-
-$h1 : (28 / 14) * 1rem !default;
-$h2 : (24 / 14) * 1rem !default;
-$h3 : (18 / 14) * 1rem !default;
-$h4 : (15 / 14) * 1rem !default;
-$h5 : (14 / 14) * 1rem !default;
-
-
-/*-------------------
-        Page
---------------------*/
-
-$pageBackground      : #FFFFFF !default;
-$pageOverflowX       : hidden !default;
-
-$lineHeight          : 1.4285em !default;
-$textColor           : rgba(0, 0, 0, 0.87) !default;
-
-
-/*--------------
-   Form Input
----------------*/
-
-/* This adjusts the default form input across all elements */
-$inputBackground        : $white !default;
-$inputVerticalPadding   : $relative11px !default;
-$inputHorizontalPadding : $relative14px !default;
-$inputPadding           : $inputVerticalPadding $inputHorizontalPadding !default;
-
-/* Input Text Color */
-$inputColor: $textColor !default;
-$inputPlaceholderColor: lighten($inputColor, 75) !default;
-$inputPlaceholderFocusColor: lighten($inputColor, 45) !default;
-
-/* Line Height Default For Inputs in Browser (Descendors are 17px at 14px base em) */
-$inputLineHeight: (17 / 14) * 1em !default;
-
-/*-------------------
-    Focused Input
---------------------*/
-
-/* Used on inputs, textarea etc */
-$focusedFormBorderColor: #85B7D9 !default;
-
-/* Used on dropdowns, other larger blocks */
-$focusedFormMutedBorderColor: #96C8DA !default;
-
-/*-------------------
-        Sizes
---------------------*/
-
-/*
-  Sizes are all expressed in terms of 14px/em (default em)
-  This ensures these "ratios" remain constant despite changes in EM
-*/
-
-$miniSize        : (11 / 14) !default;
-$tinySize        : (12 / 14) !default;
-$smallSize       : (13 / 14) !default;
-$mediumSize      : (14 / 14) !default;
-$largeSize       : (16 / 14) !default;
-$bigSize         : (18 / 14) !default;
-$hugeSize        : (20 / 14) !default;
-$massiveSize     : (24 / 14) !default;
-
-
-/*-------------------
-      Paragraph
---------------------*/
-
-$paragraphMargin     : 0em 0em 1em !default;
-$paragraphLineHeight : $lineHeight !default;
-
-/*-------------------
-       Links
---------------------*/
-
-$linkColor           : #4183C4 !default;
-$linkUnderline       : none !default;
-$linkHoverColor      : darken(saturate($linkColor, 20), 15) !default;
-$linkHoverUnderline  : $linkUnderline !default;
-
-/*-------------------
-  Highlighted Text
---------------------*/
-
-$highlightBackground      : #CCE2FF !default;
-$highlightColor           : $textColor !default;
-
-$inputHighlightBackground : rgba(100, 100, 100, 0.4) !default;
-$inputHighlightColor      : $textColor !default;
-
-/*-------------------
-       Em Sizes
---------------------*/
-
-/*
-  This rounds $size values to the closest pixel then expresses that value in (r)em.
-  This ensures all size values round to exact pixels
-*/
-$mini            : (round($miniSize * $emSize) / $emSize) * 1rem !default;
-$tiny            : (round($tinySize * $emSize) / $emSize) * 1rem !default;
-$small           : (round($smallSize * $emSize) / $emSize) * 1rem !default;
-$medium          : (round($mediumSize * $emSize) / $emSize) * 1rem !default;
-$large           : (round($largeSize * $emSize) / $emSize) * 1rem !default;
-$big             : (round($bigSize * $emSize) / $emSize) * 1rem !default;
-$huge            : (round($hugeSize * $emSize) / $emSize) * 1rem !default;
-$massive         : (round($massiveSize * $emSize) / $emSize) * 1rem !default;
-
-/* em */
-$relativeMini    : (round($miniSize * $emSize) / $emSize) * 1em !default;
-$relativeTiny    : (round($tinySize * $emSize) / $emSize) * 1em !default;
-$relativeSmall   : (round($smallSize * $emSize) / $emSize) * 1em !default;
-$relativeMedium  : (round($mediumSize * $emSize) / $emSize) * 1em !default;
-$relativeLarge   : (round($largeSize * $emSize) / $emSize) * 1em !default;
-$relativeBig     : (round($bigSize * $emSize) / $emSize) * 1em !default;
-$relativeHuge    : (round($hugeSize * $emSize) / $emSize) * 1em !default;
-$relativeMassive : (round($massiveSize * $emSize) / $emSize) * 1em !default;
-
-/* rem */
-$absoluteMini    : (round($miniSize * $emSize) / $emSize) * 1rem !default;
-$absoluteTiny    : (round($tinySize * $emSize) / $emSize) * 1rem !default;
-$absoluteSmall   : (round($smallSize * $emSize) / $emSize) * 1rem !default;
-$absoluteMedium  : (round($mediumSize * $emSize) / $emSize) * 1rem !default;
-$absoluteLarge   : (round($largeSize * $emSize) / $emSize) * 1rem !default;
-$absoluteBig     : (round($bigSize * $emSize) / $emSize) * 1rem !default;
-$absoluteHuge    : (round($hugeSize * $emSize) / $emSize) * 1rem !default;
-$absoluteMassive : (round($massiveSize * $emSize) / $emSize) * 1rem !default;
-
-
-/*-------------------
-       Loader
---------------------*/
-
-$loaderSize              : $relativeBig !default;
-$loaderSpeed             : 0.6s !default;
-$loaderLineWidth         : 0.2em !default;
-$loaderFillColor         : rgba(0, 0, 0, 0.1) !default;
-$loaderLineColor         : $grey !default;
-
-$invertedLoaderFillColor : rgba(255, 255, 255, 0.15) !default;
-$invertedLoaderLineColor : $white !default;
-
-/*-------------------
-        Grid
---------------------*/
-
-$columnCount: 16 !default;
-
-/*-------------------
-     Transitions
---------------------*/
-
-$defaultDuration : 0.1s !default;
-$defaultEasing   : ease !default;
-
-/*-------------------
-     Breakpoints
---------------------*/
-
-$mobileBreakpoint            : 320px !default;
-$tabletBreakpoint            : 768px !default;
-$computerBreakpoint          : 992px !default;
-$largeMonitorBreakpoint      : 1200px !default;
-$widescreenMonitorBreakpoint : 1920px !default;
-
-
-
-/* Columns */
-$oneWide        : (1 / $columnCount * 100%) !default;
-$twoWide        : (2 / $columnCount * 100%) !default;
-$threeWide      : (3 / $columnCount * 100%) !default;
-$fourWide       : (4 / $columnCount * 100%) !default;
-$fiveWide       : (5 / $columnCount * 100%) !default;
-$sixWide        : (6 / $columnCount * 100%) !default;
-$sevenWide      : (7 / $columnCount * 100%) !default;
-$eightWide      : (8 / $columnCount * 100%) !default;
-$nineWide       : (9 / $columnCount * 100%) !default;
-$tenWide        : (10 / $columnCount * 100%) !default;
-$elevenWide     : (11 / $columnCount * 100%) !default;
-$twelveWide     : (12 / $columnCount * 100%) !default;
-$thirteenWide   : (13 / $columnCount * 100%) !default;
-$fourteenWide   : (14 / $columnCount * 100%) !default;
-$fifteenWide    : (15 / $columnCount * 100%) !default;
-$sixteenWide    : (16 / $columnCount * 100%) !default;
-
-$oneColumn      : (1 / 1 * 100%) !default;
-$twoColumn      : (1 / 2 * 100%) !default;
-$threeColumn    : (1 / 3 * 100%) !default;
-$fourColumn     : (1 / 4 * 100%) !default;
-$fiveColumn     : (1 / 5 * 100%) !default;
-$sixColumn      : (1 / 6 * 100%) !default;
-$sevenColumn    : (1 / 7 * 100%) !default;
-$eightColumn    : (1 / 8 * 100%) !default;
-$nineColumn     : (1 / 9 * 100%) !default;
-$tenColumn      : (1 / 10 * 100%) !default;
-$elevenColumn   : (1 / 11 * 100%) !default;
-$twelveColumn   : (1 / 12 * 100%) !default;
-$thirteenColumn : (1 / 13 * 100%) !default;
-$fourteenColumn : (1 / 14 * 100%) !default;
-$fifteenColumn  : (1 / 15 * 100%) !default;
-$sixteenColumn  : (1 / 16 * 100%) !default;
-
-
-/*******************************
-           Power-User
-*******************************/
-
-
-/*-------------------
-    Emotive Colors
---------------------*/
-
-/* Positive */
-$positiveColor           : $green !default;
-$positiveBackgroundColor : #FCFFF5 !default;
-$positiveBorderColor     : #A3C293 !default;
-$positiveHeaderColor     : #1A531B !default;
-$positiveTextColor       : #2C662D !default;
-
-/* Negative */
-$negativeColor           : $red !default;
-$negativeBackgroundColor : #FFF6F6 !default;
-$negativeBorderColor     : #E0B4B4 !default;
-$negativeHeaderColor     : #912D2B !default;
-$negativeTextColor       : #9F3A38 !default;
-
-/* Info */
-$infoColor              : #31CCEC !default;
-$infoBackgroundColor    : #F8FFFF !default;
-$infoBorderColor        : #A9D5DE !default;
-$infoHeaderColor        : #0E566C !default;
-$infoTextColor          : #276F86 !default;
-
-/* Warning */
-$warningColor           : #F2C037 !default;
-$warningBorderColor     : #C9BA9B !default;
-$warningBackgroundColor : #FFFAF3 !default;
-$warningHeaderColor     : #794B02 !default;
-$warningTextColor       : #573A08 !default;
-
-/*-------------------
-        Paths
---------------------*/
-
-/* For source only. Modified in gulp for dist */
-$imagePath : '../../themes/default/assets/images' !default;
-$fontPath  : '../../themes/default/assets/fonts' !default;
-
-
-/*-------------------
-       Icons
---------------------*/
-
-/* Maximum Glyph Width of Icon */
-$iconWidth : 1.18em !default;
-
-/*-------------------
-     Neutral Text
---------------------*/
-
-$darkTextColor               : rgba(0, 0, 0, 0.85) !default;
-$mutedTextColor              : rgba(0, 0, 0, 0.6) !default;
-$lightTextColor              : rgba(0, 0, 0, 0.4) !default;
-
-$unselectedTextColor         : rgba(0, 0, 0, 0.4) !default;
-$hoveredTextColor            : rgba(0, 0, 0, 0.8) !default;
-$pressedTextColor            : rgba(0, 0, 0, 0.9) !default;
-$selectedTextColor           : rgba(0, 0, 0, 0.95) !default;
-$disabledTextColor           : rgba(0, 0, 0, 0.2) !default;
-
-$invertedTextColor           : rgba(255, 255, 255, 0.9) !default;
-$invertedMutedTextColor      : rgba(255, 255, 255, 0.8) !default;
-$invertedLightTextColor      : rgba(255, 255, 255, 0.7) !default;
-$invertedUnselectedTextColor : rgba(255, 255, 255, 0.5) !default;
-$invertedHoveredTextColor    : rgba(255, 255, 255, 1) !default;
-$invertedPressedTextColor    : rgba(255, 255, 255, 1) !default;
-$invertedSelectedTextColor   : rgba(255, 255, 255, 1) !default;
-$invertedDisabledTextColor   : rgba(255, 255, 255, 0.2) !default;
-
-/*-------------------
-     Brand Colors
---------------------*/
-
-$facebookColor   : #3B5998 !default;
-$twitterColor    : #55ACEE !default;
-$googlePlusColor : #DD4B39 !default;
-$linkedInColor   : #1F88BE !default;
-$youtubeColor    : #CC181E !default;
-$pinterestColor  : #BD081C !default;
-$vkColor         : #4D7198 !default;
-$instagramColor  : #49769C !default;
-
-/*-------------------
-      Borders
---------------------*/
-
-$circularRadius                : 500rem !default;
-
-$borderColor               : rgba(34, 36, 38, 0.15) !default;
-$strongBorderColor         : rgba(34, 36, 38, 0.22) !default;
-$internalBorderColor       : rgba(34, 36, 38, 0.1) !default;
-$selectedBorderColor       : rgba(34, 36, 38, 0.35) !default;
-$strongSelectedBorderColor : rgba(34, 36, 38, 0.5) !default;
-$disabledBorderColor       : rgba(34, 36, 38, 0.5) !default;
-
-$solidInternalBorderColor  : #FAFAFA !default;
-$solidBorderColor          : #D4D4D5 !default;
-$solidSelectedBorderColor  : #BCBDBD !default;
-
-$whiteBorderColor              : rgba(255, 255, 255, 0.1) !default;
-$selectedWhiteBorderColor      : rgba(255, 255, 255, 0.8) !default;
-
-$solidWhiteBorderColor         : #555555 !default;
-$selectedSolidWhiteBorderColor : #999999 !default;
-
-/*-------------------
-       Accents
---------------------*/
-
-/* Differentiating Neutrals */
-$subtleGradient: linear-gradient(transparent, $transparentBlack) !default;
-
-/* Differentiating Layers */
-$subtleShadow:
-  0px 1px 2px 0 $borderColor
- !default;
-$floatingShadow:
-  0px 2px 4px 0px rgba(34, 36, 38, 0.12),
-  0px 2px 10px 0px rgba(34, 36, 38, 0.15)
- !default;
-
-
-/*-------------------
-    Derived Values
---------------------*/
-
-/* Loaders Position Offset */
-$loaderOffset : -($loaderSize / 2) !default;
-$loaderMargin : $loaderOffset 0em 0em $loaderOffset !default;
-
-/* Rendered Scrollbar Width */
-$scrollbarWidth: 17px !default;
-
-/* Maximum Single Character Glyph Width, aka Capital "W" */
-$glyphWidth: 1.1em !default;
-
-/* Used to match floats with text */
-$lineHeightOffset       : (($lineHeight - 1em) / 2) !default;
-$headerLineHeightOffset : ($headerLineHeight - 1em) / 2 !default;
-
-/* Header Spacing */
-$headerTopMargin    : calc(2rem - #{$headerLineHeightOffset}) !default;
-$headerBottomMargin : 1rem !default;
-
-/* Minimum Mobile Width */
-$pageMinWidth       : 320px !default;
-
-/* Positive / Negative Dupes */
-$successBackgroundColor : $positiveBackgroundColor !default;
-$successColor           : $positiveColor !default;
-$successBorderColor     : $positiveBorderColor !default;
-$successHeaderColor     : $positiveHeaderColor !default;
-$successTextColor       : $positiveTextColor !default;
-
-$errorBackgroundColor   : $negativeBackgroundColor !default;
-$errorColor             : $negativeColor !default;
-$errorBorderColor       : $negativeBorderColor !default;
-$errorHeaderColor       : $negativeHeaderColor !default;
-$errorTextColor         : $negativeTextColor !default;
-
-
-/* Responsive */
-$largestMobileScreen : ($tabletBreakpoint - 1px) !default;
-$largestTabletScreen : ($computerBreakpoint - 1px) !default;
-$largestSmallMonitor : ($largeMonitorBreakpoint - 1px) !default;
-$largestLargeMonitor : ($widescreenMonitorBreakpoint - 1px) !default;
-
-
-
-/*******************************
-             States
-*******************************/
-
-/*-------------------
-      Disabled
---------------------*/
-
-$disabledOpacity: 0.45 !default;
-$disabledTextColor: rgba(40, 40, 40, 0.3) !default;
-$invertedDisabledTextColor: rgba(225, 225, 225, 0.3) !default;
-
-/*-------------------
-        Hover
---------------------*/
-
-/*---  Shadows  ---*/
-$floatingShadowHover:
-  0px 2px 4px 0px rgba(34, 36, 38, 0.15),
-  0px 2px 10px 0px rgba(34, 36, 38, 0.25)
- !default;
-
-/*---  Colors  ---*/
-$primaryColorHover    : saturate(darken($primaryColor, 5), 10) !default;
-$secondaryColorHover  : saturate(lighten($secondaryColor, 5), 10) !default;
-
-$redHover             : saturate(darken($red, 5), 10) !default;
-$orangeHover          : saturate(darken($orange, 5), 10) !default;
-$yellowHover          : saturate(darken($yellow, 5), 10) !default;
-$oliveHover           : saturate(darken($olive, 5), 10) !default;
-$greenHover           : saturate(darken($green, 5), 10) !default;
-$tealHover            : saturate(darken($teal, 5), 10) !default;
-$blueHover            : saturate(darken($blue, 5), 10) !default;
-$violetHover          : saturate(darken($violet, 5), 10) !default;
-$purpleHover          : saturate(darken($purple, 5), 10) !default;
-$pinkHover            : saturate(darken($pink, 5), 10) !default;
-$brownHover           : saturate(darken($brown, 5), 10) !default;
-
-$lightRedHover        : saturate(darken($lightRed, 5), 10) !default;
-$lightOrangeHover     : saturate(darken($lightOrange, 5), 10) !default;
-$lightYellowHover     : saturate(darken($lightYellow, 5), 10) !default;
-$lightOliveHover      : saturate(darken($lightOlive, 5), 10) !default;
-$lightGreenHover      : saturate(darken($lightGreen, 5), 10) !default;
-$lightTealHover       : saturate(darken($lightTeal, 5), 10) !default;
-$lightBlueHover       : saturate(darken($lightBlue, 5), 10) !default;
-$lightVioletHover     : saturate(darken($lightViolet, 5), 10) !default;
-$lightPurpleHover     : saturate(darken($lightPurple, 5), 10) !default;
-$lightPinkHover       : saturate(darken($lightPink, 5), 10) !default;
-$lightBrownHover      : saturate(darken($lightBrown, 5), 10) !default;
-$lightGreyHover       : saturate(darken($lightGrey, 5), 10) !default;
-$lightBlackHover      : saturate(darken($fullBlack, 5), 10) !default;
-
-/*---  Emotive  ---*/
-$positiveColorHover   : saturate(darken($positiveColor, 5), 10) !default;
-$negativeColorHover   : saturate(darken($negativeColor, 5), 10) !default;
-
-/*---  Brand   ---*/
-$facebookHoverColor   : saturate(darken($facebookColor, 5), 10) !default;
-$twitterHoverColor    : saturate(darken($twitterColor, 5), 10) !default;
-$googlePlusHoverColor : saturate(darken($googlePlusColor, 5), 10) !default;
-$linkedInHoverColor   : saturate(darken($linkedInColor, 5), 10) !default;
-$youtubeHoverColor    : saturate(darken($youtubeColor, 5), 10) !default;
-$instagramHoverColor  : saturate(darken($instagramColor, 5), 10) !default;
-$pinterestHoverColor  : saturate(darken($pinterestColor, 5), 10) !default;
-$vkHoverColor         : saturate(darken($vkColor, 5), 10) !default;
-
-/*---  Dark Tones  ---*/
-$fullBlackHover       : lighten($fullBlack, 5) !default;
-$blackHover           : lighten($black, 5) !default;
-$greyHover            : lighten($grey, 5) !default;
-
-/*---  Light Tones  ---*/
-$whiteHover           : darken($white, 5) !default;
-$offWhiteHover        : darken($offWhite, 5) !default;
-$darkWhiteHover       : darken($darkWhite, 5) !default;
-
-/*-------------------
-        Focus
---------------------*/
-
-/*---  Colors  ---*/
-$primaryColorFocus    : saturate(darken($primaryColor, 8), 20) !default;
-$secondaryColorFocus  : saturate(lighten($secondaryColor, 8), 20) !default;
-
-$redFocus             : saturate(darken($red, 8), 20) !default;
-$orangeFocus          : saturate(darken($orange, 8), 20) !default;
-$yellowFocus          : saturate(darken($yellow, 8), 20) !default;
-$oliveFocus           : saturate(darken($olive, 8), 20) !default;
-$greenFocus           : saturate(darken($green, 8), 20) !default;
-$tealFocus            : saturate(darken($teal, 8), 20) !default;
-$blueFocus            : saturate(darken($blue, 8), 20) !default;
-$violetFocus          : saturate(darken($violet, 8), 20) !default;
-$purpleFocus          : saturate(darken($purple, 8), 20) !default;
-$pinkFocus            : saturate(darken($pink, 8), 20) !default;
-$brownFocus           : saturate(darken($brown, 8), 20) !default;
-
-$lightRedFocus        : saturate(darken($lightRed, 8), 20) !default;
-$lightOrangeFocus     : saturate(darken($lightOrange, 8), 20) !default;
-$lightYellowFocus     : saturate(darken($lightYellow, 8), 20) !default;
-$lightOliveFocus      : saturate(darken($lightOlive, 8), 20) !default;
-$lightGreenFocus      : saturate(darken($lightGreen, 8), 20) !default;
-$lightTealFocus       : saturate(darken($lightTeal, 8), 20) !default;
-$lightBlueFocus       : saturate(darken($lightBlue, 8), 20) !default;
-$lightVioletFocus     : saturate(darken($lightViolet, 8), 20) !default;
-$lightPurpleFocus     : saturate(darken($lightPurple, 8), 20) !default;
-$lightPinkFocus       : saturate(darken($lightPink, 8), 20) !default;
-$lightBrownFocus      : saturate(darken($lightBrown, 8), 20) !default;
-$lightGreyFocus       : saturate(darken($lightGrey, 8), 20) !default;
-$lightBlackFocus      : saturate(darken($fullBlack, 8), 20) !default;
-
-/*---  Emotive  ---*/
-$positiveColorFocus   : saturate(darken($positiveColor, 8), 20) !default;
-$negativeColorFocus   : saturate(darken($negativeColor, 8), 20) !default;
-
-/*---  Brand   ---*/
-$facebookFocusColor   : saturate(darken($facebookColor, 8), 20) !default;
-$twitterFocusColor    : saturate(darken($twitterColor, 8), 20) !default;
-$googlePlusFocusColor : saturate(darken($googlePlusColor, 8), 20) !default;
-$linkedInFocusColor   : saturate(darken($linkedInColor, 8), 20) !default;
-$youtubeFocusColor    : saturate(darken($youtubeColor, 8), 20) !default;
-$instagramFocusColor  : saturate(darken($instagramColor, 8), 20) !default;
-$pinterestFocusColor  : saturate(darken($pinterestColor, 8), 20) !default;
-$vkFocusColor         : saturate(darken($vkColor, 8), 20) !default;
-
-/*---  Dark Tones  ---*/
-$fullBlackFocus       : lighten($fullBlack, 8) !default;
-$blackFocus           : lighten($black, 8) !default;
-$greyFocus            : lighten($grey, 8) !default;
-
-/*---  Light Tones  ---*/
-$whiteFocus           : darken($white, 8) !default;
-$offWhiteFocus        : darken($offWhite, 8) !default;
-$darkWhiteFocus       : darken($darkWhite, 8) !default;
-
-
-/*-------------------
-    Down (:active)
---------------------*/
-
-/*---  Colors  ---*/
-$primaryColorDown    : darken($primaryColor, 10) !default;
-$secondaryColorDown  : lighten($secondaryColor, 10) !default;
-
-$redDown             : darken($red, 10) !default;
-$orangeDown          : darken($orange, 10) !default;
-$yellowDown          : darken($yellow, 10) !default;
-$oliveDown           : darken($olive, 10) !default;
-$greenDown           : darken($green, 10) !default;
-$tealDown            : darken($teal, 10) !default;
-$blueDown            : darken($blue, 10) !default;
-$violetDown          : darken($violet, 10) !default;
-$purpleDown          : darken($purple, 10) !default;
-$pinkDown            : darken($pink, 10) !default;
-$brownDown           : darken($brown, 10) !default;
-
-$lightRedDown        : darken($lightRed, 10) !default;
-$lightOrangeDown     : darken($lightOrange, 10) !default;
-$lightYellowDown     : darken($lightYellow, 10) !default;
-$lightOliveDown      : darken($lightOlive, 10) !default;
-$lightGreenDown      : darken($lightGreen, 10) !default;
-$lightTealDown       : darken($lightTeal, 10) !default;
-$lightBlueDown       : darken($lightBlue, 10) !default;
-$lightVioletDown     : darken($lightViolet, 10) !default;
-$lightPurpleDown     : darken($lightPurple, 10) !default;
-$lightPinkDown       : darken($lightPink, 10) !default;
-$lightBrownDown      : darken($lightBrown, 10) !default;
-$lightGreyDown       : darken($lightGrey, 10) !default;
-$lightBlackDown      : darken($fullBlack, 10) !default;
-
-/*---  Emotive  ---*/
-$positiveColorDown   : darken($positiveColor, 10) !default;
-$negativeColorDown   : darken($negativeColor, 10) !default;
-
-/*---  Brand   ---*/
-$facebookDownColor   : darken($facebookColor, 10) !default;
-$twitterDownColor    : darken($twitterColor, 10) !default;
-$googlePlusDownColor : darken($googlePlusColor, 10) !default;
-$linkedInDownColor   : darken($linkedInColor, 10) !default;
-$youtubeDownColor    : darken($youtubeColor, 10) !default;
-$instagramDownColor  : darken($instagramColor, 10) !default;
-$pinterestDownColor  : darken($pinterestColor, 10) !default;
-$vkDownColor         : darken($vkColor, 10) !default;
-
-/*---  Dark Tones  ---*/
-$fullBlackDown       : lighten($fullBlack, 10) !default;
-$blackDown           : lighten($black, 10) !default;
-$greyDown            : lighten($grey, 10) !default;
-
-/*---  Light Tones  ---*/
-$whiteDown           : darken($white, 10) !default;
-$offWhiteDown        : darken($offWhite, 10) !default;
-$darkWhiteDown       : darken($darkWhite, 10) !default;
-
-
-/*-------------------
-        Active
---------------------*/
-
-/*---  Colors  ---*/
-$primaryColorActive    : saturate(darken($primaryColor, 5), 15) !default;
-$secondaryColorActive  : saturate(lighten($secondaryColor, 5), 15) !default;
-
-$redActive             : saturate(darken($red, 5), 15) !default;
-$orangeActive          : saturate(darken($orange, 5), 15) !default;
-$yellowActive          : saturate(darken($yellow, 5), 15) !default;
-$oliveActive           : saturate(darken($olive, 5), 15) !default;
-$greenActive           : saturate(darken($green, 5), 15) !default;
-$tealActive            : saturate(darken($teal, 5), 15) !default;
-$blueActive            : saturate(darken($blue, 5), 15) !default;
-$violetActive          : saturate(darken($violet, 5), 15) !default;
-$purpleActive          : saturate(darken($purple, 5), 15) !default;
-$pinkActive            : saturate(darken($pink, 5), 15) !default;
-$brownActive           : saturate(darken($brown, 5), 15) !default;
-
-$lightRedActive        : saturate(darken($lightRed, 5), 15) !default;
-$lightOrangeActive     : saturate(darken($lightOrange, 5), 15) !default;
-$lightYellowActive     : saturate(darken($lightYellow, 5), 15) !default;
-$lightOliveActive      : saturate(darken($lightOlive, 5), 15) !default;
-$lightGreenActive      : saturate(darken($lightGreen, 5), 15) !default;
-$lightTealActive       : saturate(darken($lightTeal, 5), 15) !default;
-$lightBlueActive       : saturate(darken($lightBlue, 5), 15) !default;
-$lightVioletActive     : saturate(darken($lightViolet, 5), 15) !default;
-$lightPurpleActive     : saturate(darken($lightPurple, 5), 15) !default;
-$lightPinkActive       : saturate(darken($lightPink, 5), 15) !default;
-$lightBrownActive      : saturate(darken($lightBrown, 5), 15) !default;
-$lightGreyActive       : saturate(darken($lightGrey, 5), 15) !default;
-$lightBlackActive      : saturate(darken($fullBlack, 5), 15) !default;
-
-/*---  Emotive  ---*/
-$positiveColorActive   : saturate(darken($positiveColor, 5), 15) !default;
-$negativeColorActive   : saturate(darken($negativeColor, 5), 15) !default;
-
-/*---  Brand   ---*/
-$facebookActiveColor   : saturate(darken($facebookColor, 5), 15) !default;
-$twitterActiveColor    : saturate(darken($twitterColor, 5), 15) !default;
-$googlePlusActiveColor : saturate(darken($googlePlusColor, 5), 15) !default;
-$linkedInActiveColor   : saturate(darken($linkedInColor, 5), 15) !default;
-$youtubeActiveColor    : saturate(darken($youtubeColor, 5), 15) !default;
-$instagramActiveColor  : saturate(darken($instagramColor, 5), 15) !default;
-$pinterestActiveColor  : saturate(darken($pinterestColor, 5), 15) !default;
-$vkActiveColor         : saturate(darken($vkColor, 5), 15) !default;
-
-/*---  Dark Tones  ---*/
-$fullBlackActive       : darken($fullBlack, 5) !default;
-$blackActive           : darken($black, 5) !default;
-$greyActive            : darken($grey, 5) !default;
-
-/*---  Light Tones  ---*/
-$whiteActive           : darken($white, 5) !default;
-$offWhiteActive        : darken($offWhite, 5) !default;
-$darkWhiteActive       : darken($darkWhite, 5) !default;
diff --git a/Gems/AssetMemoryAnalyzer/External/tabulator-master/src/scss/semantic-ui/variables_table.scss b/Gems/AssetMemoryAnalyzer/External/tabulator-master/src/scss/semantic-ui/variables_table.scss
deleted file mode 100644
index ab244453a5..0000000000
--- a/Gems/AssetMemoryAnalyzer/External/tabulator-master/src/scss/semantic-ui/variables_table.scss
+++ /dev/null
@@ -1,247 +0,0 @@
-@import "variables.scss";
-
-/*******************************
-             Table
-*******************************/
-
-/*-------------------
-       Element
---------------------*/
-
-$verticalMargin: 1em !default;
-$horizontalMargin: 0em !default;
-$margin: $verticalMargin $horizontalMargin !default;
-$borderCollapse: separate !default;
-$borderSpacing: 0px !default;
-$borderRadius: $defaultBorderRadius !default;
-$transition:
-  background $defaultDuration $defaultEasing,
-  color $defaultDuration $defaultEasing !default;
-$background: $white !default;
-$color: $textColor !default;
-$borderWidth: 1px !default;
-$border: $borderWidth solid $borderColor !default;
-$boxShadow: none !default;
-$textAlign: left !default;
-
-/*--------------
-     Parts
----------------*/
-
-/* Table Row */
-$rowBorder: 1px solid $internalBorderColor !default;
-
-/* Table Cell */
-$cellVerticalPadding: $relativeMini !default;
-$cellHorizontalPadding: $relativeMini !default;
-$cellVerticalAlign: inherit !default;
-$cellTextAlign: inherit !default;
-$cellBorder: 1px solid $internalBorderColor !default;
-
-/* Table Header */
-$headerBorder: 1px solid $internalBorderColor !default;
-$headerDivider: none !default;
-$headerBackground: $offWhite !default;
-$headerAlign: inherit !default;
-$headerVerticalAlign: inherit !default;
-$headerColor: $textColor !default;
-$headerVerticalPadding: $relativeSmall !default;
-$headerHorizontalPadding: $cellHorizontalPadding !default;
-$headerFontStyle: none !default;
-$headerFontWeight: bold !default;
-$headerTextTransform: none !default;
-$headerBoxShadow: none !default;
-
-/* Table Footer */
-$footerBoxShadow: none !default;
-$footerBorder: 1px solid $borderColor !default;
-$footerDivider: none !default;
-$footerBackground: $offWhite !default;
-$footerAlign: inherit !default;
-$footerVerticalAlign: middle !default;
-$footerColor: $textColor !default;
-$footerVerticalPadding: $cellVerticalPadding !default;
-$footerHorizontalPadding: $cellHorizontalPadding !default;
-$footerFontStyle: normal !default;
-$footerFontWeight: normal !default;
-$footerTextTransform: none !default;
-
-/* Responsive Size */
-$responsiveHeaderDisplay: block !default;
-$responsiveFooterDisplay: block !default;
-$responsiveRowVerticalPadding: 1em !default;
-$responsiveRowBoxShadow: 0px -1px 0px 0px rgba(0, 0, 0, 0.1) inset !important !default;
-$responsiveCellVerticalPadding: 0.25em !default;
-$responsiveCellHorizontalPadding: 0.75em !default;
-$responsiveCellBoxShadow: none !important !default;
-
-/*-------------------
-       Types
---------------------*/
-
-/* Definition */
-$definitionPageBackground: $white !default;
-
-$definitionHeaderBackground: transparent !default;
-$definitionHeaderColor: $unselectedTextColor !default;
-$definitionHeaderFontWeight: normal !default;
-
-$definitionFooterBackground: $definitionHeaderBackground !default;
-$definitionFooterColor: $definitionHeaderColor !default;
-$definitionFooterFontWeight: $definitionHeaderFontWeight !default;
-
-$definitionColumnBackground: $subtleTransparentBlack !default;
-$definitionColumnFontWeight: bold !default;
-$definitionColumnColor: $selectedTextColor !default;
-$definitionColumnFontSize: $relativeMedium !default;
-$definitionColumnTextTransform: '' !default;
-$definitionColumnBoxShadow: '' !default;
-$definitionColumnTextAlign: '' !default;
-$definitionColumnHorizontalPadding: '' !default;
-
-
-/*--------------
-    Couplings
----------------*/
-
-$iconVerticalAlign: baseline !default;
-
-/*--------------
-     States
----------------*/
-
-$stateMarkerWidth: 0px !default;
-
-/* Positive */
-$positiveColor: $positiveTextColor !default;
-$positiveBoxShadow: $stateMarkerWidth 0px 0px $positiveBorderColor inset !default;
-$positiveBackgroundHover: darken($positiveBackgroundColor, 3) !default;
-$positiveColorHover: darken($positiveColor, 3) !default;
-
-/* Negative */
-$negativeColor: $negativeTextColor !default;
-$negativeBoxShadow: $stateMarkerWidth 0px 0px $negativeBorderColor inset !default;
-$negativeBackgroundHover: darken($negativeBackgroundColor, 3) !default;
-$negativeColorHover: darken($negativeColor, 3) !default;
-
-/* Error */
-$errorColor: $errorTextColor !default;
-$errorBoxShadow: $stateMarkerWidth 0px 0px $errorBorderColor inset !default;
-$errorBackgroundHover: darken($errorBackgroundColor, 3) !default;
-$errorColorHover: darken($errorColor, 3) !default;
-
-/* Warning */
-$warningColor: $warningTextColor !default;
-$warningBoxShadow: $stateMarkerWidth 0px 0px $warningBorderColor inset !default;
-$warningBackgroundHover: darken($warningBackgroundColor, 3) !default;
-$warningColorHover: darken($warningColor, 3) !default;
-
-/* Active */
-$activeColor: $textColor !default;
-$activeBackgroundColor: #E0E0E0 !default;
-$activeBoxShadow: $stateMarkerWidth 0px 0px $activeColor inset !default;
-
-$activeBackgroundHover: #EFEFEF !default;
-$activeColorHover: $selectedTextColor !default;
-
-/*--------------
-     Types
----------------*/
-
-/* Attached */
-$attachedTopOffset: 0px !default;
-$attachedBottomOffset: 0px !default;
-$attachedHorizontalOffset: -$borderWidth !default;
-$attachedWidth: calc(100% + #{$attachedHorizontalOffset * -2}) !default;
-$attachedBoxShadow: none !default;
-$attachedBorder: $borderWidth solid $solidBorderColor !default;
-$attachedBottomBoxShadow:
-  $boxShadow,
-  $attachedBoxShadow
- !default;
-
-/* Striped */
-$stripedBackground: rgba(0, 0, 50, 0.02) !default;
-$invertedStripedBackground: rgba(255, 255, 255, 0.05) !default;
-
-/* Selectable */
-$selectableBackground: $transparentBlack !default;
-$selectableTextColor: $selectedTextColor !default;
-$selectableInvertedBackground: $transparentWhite !default;
-$selectableInvertedTextColor: $invertedSelectedTextColor !default;
-
-/* Sortable */
-$sortableBackground: '' !default;
-$sortableColor: $textColor !default;
-
-$sortableBorder: 1px solid $borderColor !default;
-$sortableIconWidth: auto !default;
-$sortableIconDistance: 0.5em !default;
-$sortableIconOpacity: 0.8 !default;
-$sortableIconFont: 'Icons' !default;
-$sortableIconAscending: '\f0d8' !default;
-$sortableIconDescending: '\f0d7' !default;
-$sortableDisabledColor: $disabledTextColor !default;
-
-$sortableHoverBackground: $transparentBlack !default;
-$sortableHoverColor: $hoveredTextColor !default;
-
-$sortableActiveBackground: $transparentBlack !default;
-$sortableActiveColor: $selectedTextColor !default;
-
-$sortableActiveHoverBackground: $transparentBlack !default;
-$sortableActiveHoverColor: $selectedTextColor !default;
-
-$sortableInvertedBorderColor: transparent !default;
-$sortableInvertedHoverBackground: $transparentWhite $subtleGradient !default;
-$sortableInvertedHoverColor: $invertedHoveredTextColor !default;
-$sortableInvertedActiveBackground: $strongTransparentWhite $subtleGradient !default;
-$sortableInvertedActiveColor: $invertedSelectedTextColor !default;
-
-/* Colors */
-$coloredBorderSize: 0.2em !default;
-$coloredBorderRadius: 0em 0em $borderRadius $borderRadius !default;
-
-/* Inverted */
-$invertedBackground: #333333 !default;
-$invertedBorder: none !default;
-$invertedCellBorderColor: $whiteBorderColor !default;
-$invertedCellColor: $invertedTextColor !default;
-
-$invertedHeaderBackground: $veryStrongTransparentBlack !default;
-$invertedHeaderColor: $invertedTextColor !default;
-$invertedHeaderBorderColor: $invertedCellBorderColor !default;
-
-$invertedDefinitionColumnBackground: $subtleTransparentWhite !default;
-$invertedDefinitionColumnColor: $invertedSelectedTextColor !default;
-$invertedDefinitionColumnFontWeight: bold !default;
-
-/* Basic */
-$basicTableBackground: transparent !default;
-$basicTableBorder: $borderWidth solid $borderColor !default;
-$basicBoxShadow: none !default;
-
-$basicTableHeaderBackground: transparent !default;
-$basicTableCellBackground: transparent !default;
-$basicTableHeaderDivider: none !default;
-$basicTableCellBorder: 1px solid rgba(0, 0, 0, 0.1) !default;
-$basicTableCellPadding: '' !default;
-$basicTableStripedBackground: $transparentBlack !default;
-
-/* Padded */
-$paddedVerticalPadding: 1em !default;
-$paddedHorizontalPadding: 1em !default;
-$veryPaddedVerticalPadding: 1.5em !default;
-$veryPaddedHorizontalPadding: 1.5em !default;
-
-/* Compact */
-$compactVerticalPadding: 0.5em !default;
-$compactHorizontalPadding: 0.7em !default;
-$veryCompactVerticalPadding: 0.4em !default;
-$veryCompactHorizontalPadding: 0.6em !default;
-
-
-/* Sizes */
-$small: 0.9em !default;
-$medium: 1em !default;
-$large: 1.1em !default;
diff --git a/Gems/AssetMemoryAnalyzer/External/tabulator-master/src/scss/tabulator.scss b/Gems/AssetMemoryAnalyzer/External/tabulator-master/src/scss/tabulator.scss
deleted file mode 100644
index 644d7b50c0..0000000000
--- a/Gems/AssetMemoryAnalyzer/External/tabulator-master/src/scss/tabulator.scss
+++ /dev/null
@@ -1,961 +0,0 @@
-
-//Main Theme Variables
-$backgroundColor: #888 !default; //background color of tabulator
-$borderColor:#999 !default; //border to tabulator
-$textSize:14px !default; //table text size
-
-//header themeing
-$headerBackgroundColor:#e6e6e6 !default; //border to tabulator
-$headerTextColor:#555 !default; //header text colour
-$headerBorderColor:#aaa !default;  //header border color
-$headerSeperatorColor:#999 !default; //header bottom seperator color
-$headerMargin:4px !default; //padding round header
-
-//column header arrows
-$sortArrowActive: #666 !default;
-$sortArrowInactive: #bbb !default;
-
-//row themeing
-$rowBackgroundColor:#fff !default; //table row background color
-$rowAltBackgroundColor:#EFEFEF !default; //table row background color
-$rowBorderColor:#aaa !default; //table border color
-$rowTextColor:#333 !default; //table text color
-$rowHoverBackground:#bbb !default; //row background color on hover
-
-$rowSelectedBackground: #9ABCEA !default; //row background color when selected
-$rowSelectedBackgroundHover: #769BCC !default;//row background color when selected and hovered
-
-$editBoxColor:#1D68CD !default; //border color for edit boxes
-$errorColor:#dd0000 !default; //error indication
-
-//footer themeing
-$footerBackgroundColor:#e6e6e6 !default; //border to tabulator
-$footerTextColor:#555 !default; //footer text colour
-$footerBorderColor:#aaa !default; //footer border color
-$footerSeperatorColor:#999 !default; //footer bottom seperator color
-$footerActiveColor:#d00 !default; //footer bottom active text color
-
-
-
-//Tabulator Containing Element
-.tabulator{
-	position: relative;
-
-	border: 1px solid $borderColor;
-
-	background-color: $backgroundColor;
-
-	font-size:$textSize;
-	text-align: left;
-	overflow:hidden;
-
-	-webkit-transform: translatez(0);
-	-moz-transform: translatez(0);
-	-ms-transform: translatez(0);
-	-o-transform: translatez(0);
-	transform: translatez(0);
-
-	&[tabulator-layout="fitDataFill"]{
-		.tabulator-tableHolder{
-			.tabulator-table{
-				min-width:100%;
-			}
-		}
-	}
-
-	&.tabulator-block-select{
-		user-select: none;
-	}
-
-	//column header containing element
-	.tabulator-header{
-		position:relative;
-		box-sizing: border-box;
-
-		width:100%;
-
-		border-bottom:1px solid $headerSeperatorColor;
-		background-color: $headerBackgroundColor;
-		color: $headerTextColor;
-		font-weight:bold;
-
-		white-space: nowrap;
-		overflow:hidden;
-
-		-moz-user-select: none;
-		-khtml-user-select: none;
-		-webkit-user-select: none;
-		-o-user-select: none;
-
-		//individual column header element
-		.tabulator-col{
-			display:inline-block;
-			position:relative;
-			box-sizing:border-box;
-			border-right:1px solid $headerBorderColor;
-			background:$headerBackgroundColor;
-			text-align:left;
-			vertical-align: bottom;
-			overflow: hidden;
-
-			&.tabulator-moving{
-				position: absolute;
-				border:1px solid  $headerSeperatorColor;
-				background:darken($headerBackgroundColor, 10%);
-				pointer-events: none;
-			}
-
-			//hold content of column header
-			.tabulator-col-content{
-				box-sizing:border-box;
-				position: relative;
-				padding:4px;
-
-				//hold title of column header
-				.tabulator-col-title{
-					box-sizing:border-box;
-					width: 100%;
-
-					white-space: nowrap;
-					overflow: hidden;
-					text-overflow: ellipsis;
-					vertical-align:bottom;
-
-					//element to hold title editor
-					.tabulator-title-editor{
-						box-sizing: border-box;
-						width: 100%;
-
-						border:1px solid #999;
-
-						padding:1px;
-
-						background: #fff;
-					}
-				}
-
-				//column sorter arrow
-				.tabulator-arrow{
-					display: inline-block;
-					position: absolute;
-					top:9px;
-					right:8px;
-					width: 0;
-					height: 0;
-					border-left: 6px solid transparent;
-					border-right: 6px solid transparent;
-					border-bottom: 6px solid $sortArrowInactive;
-				}
-
-			}
-
-			//complex header column group
-			&.tabulator-col-group{
-
-				//gelement to hold sub columns in column group
-				.tabulator-col-group-cols{
-					position:relative;
-					display: flex;
-
-					border-top:1px solid $headerBorderColor;
-					overflow: hidden;
-
-					.tabulator-col:last-child{
-						margin-right:-1px;
-					}
-				}
-			}
-
-			//hide left resize handle on first column
-			&:first-child{
-				.tabulator-col-resize-handle.prev{
-					display: none;
-				}
-			}
-
-			//placeholder element for sortable columns
-			&.ui-sortable-helper{
-				position: absolute;
-				background-color: $headerBackgroundColor !important;
-				border:1px solid $headerBorderColor;
-			}
-
-			//header filter containing element
-			.tabulator-header-filter{
-				position: relative;
-				box-sizing: border-box;
-				margin-top:2px;
-				width:100%;
-				text-align: center;
-
-				//styling adjustment for inbuilt editors
-				textarea{
-					height:auto !important;
-				}
-
-				svg{
-					margin-top: 3px;
-				}
-
-				input{
-					&::-ms-clear {
-						width : 0;
-						height: 0;
-					}
-				}
-			}
-
-			//styling child elements for sortable columns
-			&.tabulator-sortable{
-				.tabulator-col-title{
-					padding-right:25px;
-				}
-
-				&:hover{
-					cursor:pointer;
-					background-color:darken($headerBackgroundColor, 10%);
-				}
-
-				&[aria-sort="none"]{
-					.tabulator-col-content .tabulator-arrow{
-						border-top: none;
-						border-bottom: 6px solid $sortArrowInactive;
-					}
-				}
-
-				&[aria-sort="asc"]{
-					.tabulator-col-content .tabulator-arrow{
-						border-top: none;
-						border-bottom: 6px solid $sortArrowActive;
-					}
-				}
-
-				&[aria-sort="desc"]{
-					.tabulator-col-content .tabulator-arrow{
-						border-top: 6px solid $sortArrowActive;
-						border-bottom: none;
-					}
-				}
-			}
-
-
-			&.tabulator-col-vertical{
-				.tabulator-col-content{
-					.tabulator-col-title{
-						writing-mode: vertical-rl;
-						text-orientation: mixed;
-
-						display:flex;
-						align-items:center;
-						justify-content:center;
-					}
-				}
-
-				&.tabulator-col-vertical-flip{
-					.tabulator-col-title{
-						transform: rotate(180deg);
-					}
-				}
-
-				&.tabulator-sortable{
-					.tabulator-col-title{
-						padding-right:0;
-						padding-top:20px;
-					}
-
-					&.tabulator-col-vertical-flip{
-						.tabulator-col-title{
-							padding-right:0;
-							padding-bottom:20px;
-						}
-
-					}
-
-					.tabulator-arrow{
-						right:calc(50% - 6px);
-					}
-				}
-			}
-		}
-
-		.tabulator-frozen{
-			display: inline-block;
-			position: absolute;
-
-			// background-color: inherit;
-
-			z-index: 10;
-
-			&.tabulator-frozen-left{
-				border-right:2px solid $rowBorderColor;
-			}
-
-			&.tabulator-frozen-right{
-				border-left:2px solid $rowBorderColor;
-			}
-		}
-
-
-		.tabulator-calcs-holder{
-			box-sizing:border-box;
-			min-width:400%;
-
-			background:lighten($headerBackgroundColor, 5%) !important;
-
-			.tabulator-row{
-				background:lighten($headerBackgroundColor, 5%) !important;
-
-				.tabulator-col-resize-handle{
-					display: none;
-				}
-			}
-
-			border-top:1px solid $rowBorderColor;
-			border-bottom:1px solid $headerBorderColor;
-
-			overflow: hidden;
-		}
-
-		.tabulator-frozen-rows-holder{
-			min-width:400%;
-
-			&:empty{
-				display: none;
-			}
-		}
-	}
-
-	//scrolling element to hold table
-	.tabulator-tableHolder{
-		position:relative;
-		width:100%;
-		white-space: nowrap;
-		overflow:auto;
-		-webkit-overflow-scrolling: touch;
-
-		&:focus{
-			outline: none;
-		}
-
-		//default placeholder element
-		.tabulator-placeholder{
-			box-sizing:border-box;
-			display: flex;
-			align-items:center;
-
-			&[tabulator-render-mode="virtual"]{
-				position: absolute;
-				top:0;
-				left:0;
-				height:100%;
-			}
-
-			width:100%;
-
-			span{
-				display: inline-block;
-
-				margin:0 auto;
-				padding:10px;
-
-				color:#ccc;
-				font-weight: bold;
-				font-size: 20px;
-			}
-		}
-
-		//element to hold table rows
-		.tabulator-table{
-			position:relative;
-			display:inline-block;
-			background-color:$rowBackgroundColor;
-			white-space: nowrap;
-			overflow:visible;
-			color:$rowTextColor;
-
-			//row element
-			.tabulator-row{
-				&.tabulator-calcs{
-					font-weight: bold;
-					background:darken($rowAltBackgroundColor, 5%) !important;
-
-					&.tabulator-calcs-top{
-						border-bottom:2px solid $rowBorderColor;
-					}
-
-					&.tabulator-calcs-bottom{
-						border-top:2px solid $rowBorderColor;
-					}
-				}
-			}
-
-		}
-	}
-
-
-
-	//footer element
-	.tabulator-footer{
-		padding:5px 10px;
-		border-top:1px solid $footerSeperatorColor;
-		background-color: $footerBackgroundColor;
-		text-align: right;
-		color: $footerTextColor;
-		font-weight:bold;
-		white-space:nowrap;
-		user-select:none;
-
-		-moz-user-select: none;
-		-khtml-user-select: none;
-		-webkit-user-select: none;
-		-o-user-select: none;
-
-		.tabulator-calcs-holder{
-			box-sizing:border-box;
-			width:calc(100% + 20px);
-			margin:-5px -10px 5px -10px;
-
-			text-align: left;
-
-			background:lighten($footerBackgroundColor, 5%) !important;
-
-			.tabulator-row{
-				background:lighten($footerBackgroundColor, 5%) !important;
-
-				.tabulator-col-resize-handle{
-					display: none;
-				}
-			}
-
-			border-bottom:1px solid $rowBorderColor;
-			border-top:1px solid $rowBorderColor;
-
-			overflow: hidden;
-
-			&:only-child{
-				margin-bottom:-5px;
-				border-bottom:none;
-			}
-		}
-
-		//pagination container element
-		.tabulator-pages{
-			margin:0 7px;
-		}
-
-		//pagination button
-		.tabulator-page{
-			display:inline-block;
-
-			margin:0 2px;
-			padding:2px 5px;
-
-			border:1px solid $footerBorderColor;
-			border-radius:3px;
-
-			background:rgba(255,255,255,.2);
-
-			color: $footerTextColor;
-			font-family:inherit;
-			font-weight:inherit;
-			font-size:inherit;
-
-			&.active{
-				color:$footerActiveColor;
-			}
-
-			&:disabled{
-				opacity:.5;
-			}
-
-			&:not(.disabled){
-				&:hover{
-					cursor:pointer;
-					background:rgba(0,0,0,.2);
-					color:#fff;
-				}
-			}
-		}
-	}
-
-	//column resize handles
-	.tabulator-col-resize-handle{
-		position:absolute;
-		right:0;
-		top:0;
-		bottom:0;
-		width:5px;
-
-		&.prev{
-			left:0;
-			right:auto;
-		}
-
-		&:hover{
-			cursor:ew-resize;
-		}
-	}
-
-
-	//holding div that contains loader and covers tabulator element to prevent interaction
-	.tabulator-loader{
-		position:absolute;
-		display: flex;
-		align-items:center;
-
-		top:0;
-		left:0;
-		z-index:100;
-
-		height:100%;
-		width:100%;
-		background:rgba(0,0,0,.4);
-		text-align:center;
-
-		//loading message element
-		.tabulator-loader-msg{
-			display:inline-block;
-
-			margin:0 auto;
-			padding:10px 20px;
-
-			border-radius:10px;
-
-			background:#fff;
-			font-weight:bold;
-			font-size:16px;
-
-			//loading message
-			&.tabulator-loading{
-				border:4px solid #333;
-				color:#000;
-			}
-
-			//error message
-			&.tabulator-error{
-				border:4px solid #D00;
-				color:#590000;
-			}
-		}
-	}
-}
-
-//row element
-.tabulator-row{
-	position: relative;
-	box-sizing: border-box;
-	min-height:$textSize + ($headerMargin * 2);
-	background-color: $rowBackgroundColor;
-
-
-	&.tabulator-row-even{
-		background-color: $rowAltBackgroundColor;
-	}
-
-	&.tabulator-selectable:hover{
-		background-color:$rowHoverBackground;
-		cursor: pointer;
-	}
-
-	&.tabulator-selected{
-		background-color:$rowSelectedBackground;
-	}
-
-	&.tabulator-selected:hover{
-		background-color:$rowSelectedBackgroundHover;
-		cursor: pointer;
-	}
-
-	&.tabulator-row-moving{
-		border:1px solid #000;
-		background:#fff;
-	}
-
-	&.tabulator-moving{
-		position: absolute;
-
-		border-top:1px solid  $rowBorderColor;
-		border-bottom:1px solid  $rowBorderColor;
-
-		pointer-events: none;
-		z-index:15;
-	}
-
-	//row resize handles
-	.tabulator-row-resize-handle{
-		position:absolute;
-		right:0;
-		bottom:0;
-		left:0;
-		height:5px;
-
-		&.prev{
-			top:0;
-			bottom:auto;
-		}
-
-		&:hover{
-			cursor:ns-resize;
-		}
-	}
-
-	.tabulator-frozen{
-		display: inline-block;
-		position: absolute;
-
-		background-color: inherit;
-
-		z-index: 10;
-
-		&.tabulator-frozen-left{
-			border-right:2px solid $rowBorderColor;
-		}
-
-		&.tabulator-frozen-right{
-			border-left:2px solid $rowBorderColor;
-		}
-	}
-
-	.tabulator-responsive-collapse{
-		box-sizing:border-box;
-
-		padding:5px;
-
-		border-top:1px solid $rowBorderColor;
-		border-bottom:1px solid $rowBorderColor;
-
-		&:empty{
-			display:none;
-		}
-
-		table{
-			font-size:$textSize;
-
-			tr{
-				td{
-					position: relative;
-
-					&:first-of-type{
-						padding-right:10px;
-					}
-				}
-			}
-		}
-	}
-
-	//cell element
-	.tabulator-cell{
-		display:inline-block;
-		position: relative;
-		box-sizing:border-box;
-		padding:4px;
-		border-right:1px solid $rowBorderColor;
-		vertical-align:middle;
-		white-space:nowrap;
-		overflow:hidden;
-		text-overflow:ellipsis;
-
-
-		&.tabulator-editing{
-			border:1px solid  $editBoxColor;
-			padding: 0;
-
-			input, select{
-				border:1px;
-				background:transparent;
-			}
-		}
-
-		&.tabulator-validation-fail{
-			border:1px solid $errorColor;
-			input, select{
-				border:1px;
-				background:transparent;
-
-				color: $errorColor;
-			}
-		}
-
-		//hide left resize handle on first column
-		&:first-child{
-			.tabulator-col-resize-handle.prev{
-				display: none;
-			}
-		}
-
-		//movable row handle
-		&.tabulator-row-handle{
-			display: inline-flex;
-			align-items:center;
-			justify-content:center;
-
-			-moz-user-select: none;
-			-khtml-user-select: none;
-			-webkit-user-select: none;
-			-o-user-select: none;
-
-			//handle holder
-			.tabulator-row-handle-box{
-				width:80%;
-
-				//Hamburger element
-				.tabulator-row-handle-bar{
-					width:100%;
-					height:3px;
-					margin-top:2px;
-					background:#666;
-				}
-			}
-		}
-
-		.tabulator-data-tree-branch{
-			display:inline-block;
-			vertical-align:middle;
-
-			height:9px;
-			width:7px;
-
-			margin-top:-9px;
-			margin-right:5px;
-
-			border-bottom-left-radius:1px;
-
-			border-left:2px solid $rowBorderColor;
-			border-bottom:2px solid $rowBorderColor;
-		}
-
-		.tabulator-data-tree-control{
-
-			display:inline-flex;
-			justify-content:center;
-			align-items:center;
-			vertical-align:middle;
-
-			height:11px;
-			width:11px;
-
-			margin-right:5px;
-
-			border:1px solid $rowTextColor;
-			border-radius:2px;
-			background:rgba(0, 0, 0, .1);
-
-			overflow:hidden;
-
-			&:hover{
-				cursor:pointer;
-				background:rgba(0, 0, 0, .2);
-			}
-
-			.tabulator-data-tree-control-collapse{
-				display:inline-block;
-				position: relative;
-
-				height: 7px;
-				width: 1px;
-
-				background: transparent;
-
-				&:after {
-					position: absolute;
-					content: "";
-					left: -3px;
-					top: 3px;
-
-					height: 1px;
-					width: 7px;
-
-					background: $rowTextColor;
-				}
-			}
-
-			.tabulator-data-tree-control-expand{
-				display:inline-block;
-				position: relative;
-
-				height: 7px;
-				width: 1px;
-
-				background: $rowTextColor;
-
-				&:after {
-					position: absolute;
-					content: "";
-					left: -3px;
-					top: 3px;
-
-					height: 1px;
-					width: 7px;
-
-					background: $rowTextColor;
-				}
-			}
-
-		}
-
-		.tabulator-responsive-collapse-toggle{
-			display: inline-flex;
-			align-items:center;
-			justify-content:center;
-
-			-moz-user-select: none;
-			-khtml-user-select: none;
-			-webkit-user-select: none;
-			-o-user-select: none;
-
-			height:15px;
-			width:15px;
-
-			border-radius:20px;
-			background:#666;
-
-			color:$rowBackgroundColor;
-			font-weight:bold;
-			font-size:1.1em;
-
-			&:hover{
-				opacity:.7;
-			}
-
-			&.open{
-				.tabulator-responsive-collapse-toggle-close{
-					display:initial;
-				}
-
-				.tabulator-responsive-collapse-toggle-open{
-					display:none;
-				}
-			}
-
-			.tabulator-responsive-collapse-toggle-close{
-				display:none;
-			}
-		}
-	}
-
-	//row grouping element
-	&.tabulator-group{
-		box-sizing:border-box;
-		border-bottom:1px solid #999;
-		border-right:1px solid $rowBorderColor;
-		border-top:1px solid #999;
-		padding:5px;
-		padding-left:10px;
-		background:#ccc;
-		font-weight:bold;
-
-		min-width: 100%;
-
-		&:hover{
-			cursor:pointer;
-			background-color:rgba(0,0,0,.1);
-		}
-
-		&.tabulator-group-visible{
-
-			.tabulator-arrow{
-				margin-right:10px;
-				border-left: 6px solid transparent;
-				border-right: 6px solid transparent;
-				border-top: 6px solid $sortArrowActive;
-				border-bottom: 0;
-			}
-
-		}
-
-		&.tabulator-group-level-1{
-			.tabulator-arrow{
-				margin-left:20px;
-			}
-		}
-
-		&.tabulator-group-level-2{
-			.tabulator-arrow{
-				margin-left:40px;
-			}
-		}
-
-		&.tabulator-group-level-3{
-			.tabulator-arrow{
-				margin-left:60px;
-			}
-		}
-
-		&.tabulator-group-level-4{
-			.tabulator-arrow{
-				margin-left:80px;
-			}
-		}
-
-		&.tabulator-group-level-5{
-			.tabulator-arrow{
-				margin-left:100px;
-			}
-		}
-
-		//sorting arrow
-		.tabulator-arrow{
-			display: inline-block;
-			width: 0;
-			height: 0;
-			margin-right:16px;
-			border-top: 6px solid transparent;
-			border-bottom: 6px solid transparent;
-			border-right: 0;
-			border-left: 6px solid $sortArrowActive;
-			vertical-align:middle;
-		}
-
-		span{
-			margin-left:10px;
-			color:#d00;
-		}
-	}
-
-}
-
-.tabulator-edit-select-list{
-	position: absolute;
-	display:inline-block;
-	box-sizing:border-box;
-
-	max-height:200px;
-
-	background:$rowBackgroundColor;
-	border:1px solid $rowBorderColor;
-
-	font-size:$textSize;
-
-	overflow-y:auto;
-	-webkit-overflow-scrolling: touch;
-
-	z-index: 10000;
-
-	.tabulator-edit-select-list-item{
-		padding:4px;
-
-		color:$rowTextColor;
-
-		&.active{
-			color:$rowBackgroundColor;
-			background:$editBoxColor;
-		}
-
-		&:hover{
-			cursor:pointer;
-
-			color:$rowBackgroundColor;
-			background:$editBoxColor;
-		}
-	}
-
-	.tabulator-edit-select-list-group{
-		border-bottom:1px solid $rowBorderColor;
-
-		padding:4px;
-		padding-top:6px;
-
-		color:$rowTextColor;
-		font-weight:bold;
-	}
-}
\ No newline at end of file
diff --git a/Gems/AssetMemoryAnalyzer/External/tabulator-master/src/scss/tabulator_midnight.scss b/Gems/AssetMemoryAnalyzer/External/tabulator-master/src/scss/tabulator_midnight.scss
deleted file mode 100644
index 1eee0bcb08..0000000000
--- a/Gems/AssetMemoryAnalyzer/External/tabulator-master/src/scss/tabulator_midnight.scss
+++ /dev/null
@@ -1,956 +0,0 @@
-
-//Main Theme Variables
-$backgroundColor: #222 !default; //background color of tabulator
-$borderColor:#333 !default; //border to tabulator
-$textSize:14px !default; //table text size
-
-//header themeing
-$headerBackgroundColor:#333 !default; //border to tabulator
-$headerTextColor:#fff !default; //header text colour
-$headerBorderColor:#aaa !default;  //header border color
-$headerSeperatorColor:#999 !default; //header bottom seperator color
-$headerMargin:4px !default; //padding round header
-
-//column header arrows
-$sortArrowActive: #666 !default;
-$sortArrowInactive: #bbb !default;
-
-//row themeing
-$rowBackgroundColor:#666 !default; //table row background color
-$rowAltBackgroundColor:#444 !default; //table row background color
-$rowBorderColor:#888 !default; //table border color
-$rowTextColor:#fff !default; //table text color
-$rowHoverBackground:#999 !default; //row background color on hover
-
-$rowSelectedBackground: #000 !default; //row background color when selected
-$rowSelectedBackgroundHover: #888 !default;//row background color when selected and hovered
-
-$editBoxColor:#999 !default; //border color for edit boxes
-$errorColor:#dd0000 !default; //error indication
-
-//footer themeing
-$footerBackgroundColor:#333 !default; //border to tabulator
-$footerTextColor:#333 !default; //footer text colour
-$footerBorderColor:#aaa !default; //footer border color
-$footerSeperatorColor:#999 !default; //footer bottom seperator color
-$footerActiveColor:#fff !default; //footer bottom active text color
-
-
-//Tabulator Containing Element
-.tabulator{
-	position: relative;
-	border: 1px solid $borderColor;
-	background-color: $backgroundColor;
-	overflow:hidden;
-	font-size:$textSize;
-	text-align: left;
-
-	-webkit-transform: translatez(0);
-	-moz-transform: translatez(0);
-	-ms-transform: translatez(0);
-	-o-transform: translatez(0);
-	transform: translatez(0);
-
-	&[tabulator-layout="fitDataFill"]{
-		.tabulator-tableHolder{
-			.tabulator-table{
-				min-width:100%;
-			}
-		}
-	}
-
-	&.tabulator-block-select{
-		user-select: none;
-	}
-
-	//column header containing element
-	.tabulator-header{
-		position:relative;
-		box-sizing: border-box;
-
-		width:100%;
-
-		border-bottom:1px solid $headerSeperatorColor;
-		background-color: $headerBackgroundColor;
-		color: $headerTextColor;
-		font-weight:bold;
-
-		white-space: nowrap;
-		overflow:hidden;
-
-		-moz-user-select: none;
-		-khtml-user-select: none;
-		-webkit-user-select: none;
-		-o-user-select: none;
-
-		//individual column header element
-		.tabulator-col{
-			display:inline-block;
-			position:relative;
-			box-sizing:border-box;
-			border-right:1px solid $headerBorderColor;
-			background-color: $headerBackgroundColor;
-			text-align:left;
-			vertical-align: bottom;
-			overflow: hidden;
-
-			&.tabulator-moving{
-				position: absolute;
-				border:1px solid  $headerSeperatorColor;
-				background:darken($headerBackgroundColor, 10%);
-				pointer-events: none;
-			}
-
-			//hold content of column header
-			.tabulator-col-content{
-				box-sizing:border-box;
-				position: relative;
-				padding:4px;
-
-				//hold title of column header
-				.tabulator-col-title{
-					box-sizing:border-box;
-					width: 100%;
-
-					white-space: nowrap;
-					overflow: hidden;
-					text-overflow: ellipsis;
-					vertical-align:bottom;
-
-					//element to hold title editor
-					.tabulator-title-editor{
-						box-sizing: border-box;
-						width: 100%;
-
-						border:1px solid #999;
-
-						padding:1px;
-
-						background: #444;
-						color: #fff;
-					}
-
-				}
-
-				//column sorter arrow
-				.tabulator-arrow{
-					display: inline-block;
-					position: absolute;
-					top:9px;
-					right:8px;
-					width: 0;
-					height: 0;
-					border-left: 6px solid transparent;
-					border-right: 6px solid transparent;
-					border-bottom: 6px solid $sortArrowInactive;
-				}
-
-			}
-
-			//complex header column group
-			&.tabulator-col-group{
-
-				//gelement to hold sub columns in column group
-				.tabulator-col-group-cols{
-					position:relative;
-					display: flex;
-
-					border-top:1px solid $headerBorderColor;
-					overflow: hidden;
-
-					.tabulator-col:last-child{
-						margin-right:-1px;
-					}
-				}
-			}
-
-			//hide left resize handle on first column
-			&:first-child{
-				.tabulator-col-resize-handle.prev{
-					display: none;
-				}
-			}
-
-			//placeholder element for sortable columns
-			&.ui-sortable-helper{
-				position: absolute;
-				background-color: darken($headerBackgroundColor, 10%) !important;
-				border:1px solid $headerBorderColor;
-			}
-
-			//header filter containing element
-			.tabulator-header-filter{
-				position: relative;
-				box-sizing: border-box;
-				margin-top:2px;
-				width:100%;
-				text-align: center;
-
-				//styling adjustment for inbuilt editors
-				textarea{
-					height:auto !important;
-				}
-
-				svg{
-					margin-top: 3px;
-				}
-
-				input, select{
-					border:1px solid #999;
-					background: #444;
-					color: #fff;
-				}
-
-				input{
-					&::-ms-clear {
-					  width : 0;
-					  height: 0;
-					}
-				}
-			}
-
-			//styling child elements for sortable columns
-			&.tabulator-sortable{
-				.tabulator-col-title{
-					padding-right:25px;
-				}
-
-				&:hover{
-					cursor:pointer;
-					background-color:darken($headerBackgroundColor, 10%);
-				}
-
-
-				&[aria-sort="none"]{
-					.tabulator-col-content .tabulator-arrow{
-						border-top: none;
-						border-bottom: 6px solid $sortArrowInactive;
-					}
-				}
-
-				&[aria-sort="asc"]{
-					.tabulator-col-content .tabulator-arrow{
-						border-top: none;
-						border-bottom: 6px solid $sortArrowActive;
-					}
-				}
-
-				&[aria-sort="desc"]{
-					.tabulator-col-content .tabulator-arrow{
-						border-top: 6px solid $sortArrowActive;
-						border-bottom: none;
-					}
-				}
-			}
-
-			&.tabulator-col-vertical{
-				.tabulator-col-content{
-					.tabulator-col-title{
-						writing-mode: vertical-rl;
-						text-orientation: mixed;
-
-						display:flex;
-						align-items:center;
-						justify-content:center;
-					}
-				}
-
-				&.tabulator-col-vertical-flip{
-					.tabulator-col-title{
-						transform: rotate(180deg);
-					}
-				}
-
-				&.tabulator-sortable{
-					.tabulator-col-title{
-						padding-right:0;
-						padding-top:20px;
-					}
-
-					&.tabulator-col-vertical-flip{
-						.tabulator-col-title{
-							padding-right:0;
-							padding-bottom:20px;
-						}
-
-					}
-
-					.tabulator-arrow{
-						right:calc(50% - 6px);
-					}
-				}
-			}
-
-		}
-
-		.tabulator-frozen{
-			display: inline-block;
-			position: absolute;
-
-			// background-color: inherit;
-
-			z-index: 10;
-
-			&.tabulator-frozen-left{
-				border-right:2px solid $rowBorderColor;
-			}
-
-			&.tabulator-frozen-right{
-				border-left:2px solid $rowBorderColor;
-			}
-		}
-
-
-		.tabulator-calcs-holder{
-			box-sizing:border-box;
-			min-width:400%;
-
-			background:darken($headerBackgroundColor, 10%) !important;
-
-			.tabulator-row{
-				background:darken($headerBackgroundColor, 10%) !important;
-
-				.tabulator-col-resize-handle{
-					display: none;
-				}
-			}
-
-			border-top:1px solid $rowBorderColor;
-			border-bottom:1px solid $headerBorderColor;
-
-			overflow: hidden;
-		}
-
-		.tabulator-frozen-rows-holder{
-			min-width:400%;
-
-			&:empty{
-				display: none;
-			}
-		}
-
-	}
-
-	//scrolling element to hold table
-	.tabulator-tableHolder{
-		position:relative;
-		width:100%;
-		white-space: nowrap;
-		overflow:auto;
-		-webkit-overflow-scrolling: touch;
-
-		&:focus{
-			outline: none;
-		}
-
-		//default placeholder element
-		.tabulator-placeholder{
-			box-sizing:border-box;
-			display: flex;
-			align-items:center;
-
-			&[tabulator-render-mode="virtual"]{
-				position: absolute;
-				top:0;
-				left:0;
-				height:100%;
-			}
-
-			width:100%;
-
-			span{
-				display: inline-block;
-
-				margin:0 auto;
-				padding:10px;
-
-				color:#eee;
-				font-weight: bold;
-				font-size: 20px;
-			}
-		}
-
-		//element to hold table rows
-		.tabulator-table{
-			position:relative;
-			display:inline-block;
-			background-color:$rowBackgroundColor;
-			white-space: nowrap;
-			overflow:visible;
-			color:$rowTextColor;
-
-			.tabulator-row{
-				&.tabulator-calcs{
-					font-weight: bold;
-					background:darken($rowAltBackgroundColor, 5%) !important;
-
-					&.tabulator-calcs-top{
-						border-bottom:2px solid $rowBorderColor;
-					}
-
-					&.tabulator-calcs-bottom{
-						border-top:2px solid $rowBorderColor;
-					}
-				}
-			}
-		}
-	}
-
-	//column resize handles
-	.tabulator-col-resize-handle{
-		position:absolute;
-		right:0;
-		top:0;
-		bottom:0;
-		width:5px;
-
-		&.prev{
-			left:0;
-			right:auto;
-		}
-
-		&:hover{
-			cursor:ew-resize;
-		}
-	}
-
-
-	//footer element
-	.tabulator-footer{
-		padding:5px 10px;
-		border-top:1px solid $footerSeperatorColor;
-		background-color: $footerBackgroundColor;
-		text-align:right;
-		color: $footerTextColor;
-		font-weight:bold;
-		white-space:nowrap;
-		user-select:none;
-
-		-moz-user-select: none;
-		-khtml-user-select: none;
-		-webkit-user-select: none;
-		-o-user-select: none;
-
-		.tabulator-calcs-holder{
-			box-sizing:border-box;
-			width:calc(100% + 20px);
-			margin:-5px -10px 5px -10px;
-
-			text-align: left;
-
-			background:darken($footerBackgroundColor, 5%) !important;
-
-			.tabulator-row{
-				background:darken($footerBackgroundColor, 5%) !important;
-				color:$headerTextColor;
-
-				.tabulator-col-resize-handle{
-					display: none;
-				}
-			}
-
-			border-bottom:1px solid $rowBorderColor;
-			border-top:1px solid $rowBorderColor;
-
-			overflow: hidden;
-
-			&:only-child{
-				margin-bottom:-5px;
-				border-bottom:none;
-			}
-		}
-
-		//pagination container element
-		.tabulator-pages{
-			margin:0 7px;
-		}
-
-		//pagination button
-		.tabulator-page{
-			display:inline-block;
-			margin:0 2px;
-			border:1px solid $footerBorderColor;
-			border-radius:3px;
-			padding:2px 5px;
-			background:rgba(255,255,255,.2);
-			color: $footerTextColor;
-			font-family:inherit;
-			font-weight:inherit;
-			font-size:inherit;
-
-			&.active{
-				color:$footerActiveColor;
-			}
-
-			&:disabled{
-				opacity:.5;
-			}
-
-			&:not(.disabled){
-				&:hover{
-					cursor:pointer;
-					background:rgba(0,0,0,.2);
-					color:#fff;
-				}
-			}
-		}
-	}
-
-	//holding div that contains loader and covers tabulator element to prevent interaction
-	.tabulator-loader{
-		position:absolute;
-		display: flex;
-		align-items:center;
-
-		top:0;
-		left:0;
-		z-index:100;
-
-		height:100%;
-		width:100%;
-		background:rgba(0,0,0,.4);
-		text-align:center;
-
-		//loading message element
-		.tabulator-loader-msg{
-			display:inline-block;
-
-			margin:0 auto;
-			padding:10px 20px;
-
-			border-radius:10px;
-
-			background:#fff;
-			font-weight:bold;
-			font-size:16px;
-
-			//loading message
-			&.tabulator-loading{
-				border:4px solid #333;
-				color:#000;
-			}
-
-			//error message
-			&.tabulator-error{
-				border:4px solid #D00;
-				color:#590000;
-			}
-		}
-	}
-}
-
-//row element
-.tabulator-row{
-	position: relative;
-	box-sizing: border-box;
-
-	min-height:$textSize + ($headerMargin * 2);
-	background-color: $rowBackgroundColor;
-
-	&:nth-child(even){
-		background-color: $rowAltBackgroundColor;
-	}
-
-	&.tabulator-selectable:hover{
-		background-color:$rowHoverBackground;
-		cursor: pointer;
-	}
-
-	&.tabulator-selected{
-		background-color:$rowSelectedBackground;
-	}
-
-	&.tabulator-selected:hover{
-		background-color:$rowSelectedBackgroundHover;
-		cursor: pointer;
-	}
-
-	&.tabulator-moving{
-		position: absolute;
-
-		border-top:1px solid  $rowBorderColor;
-		border-bottom:1px solid  $rowBorderColor;
-
-		pointer-events: none !important;
-		z-index:15;
-	}
-
-	//row resize handles
-	.tabulator-row-resize-handle{
-		position:absolute;
-		right:0;
-		bottom:0;
-		left:0;
-		height:5px;
-
-		&.prev{
-			top:0;
-			bottom:auto;
-		}
-
-		&:hover{
-			cursor:ns-resize;
-		}
-	}
-
-	.tabulator-frozen{
-		display: inline-block;
-		position: absolute;
-
-		background-color: inherit;
-
-		z-index: 10;
-
-		&.tabulator-frozen-left{
-			border-right:2px solid $rowBorderColor;
-		}
-
-		&.tabulator-frozen-right{
-			border-left:2px solid $rowBorderColor;
-		}
-	}
-
-	.tabulator-responsive-collapse{
-		box-sizing:border-box;
-
-		padding:5px;
-
-		border-top:1px solid $rowBorderColor;
-		border-bottom:1px solid $rowBorderColor;
-
-		&:empty{
-			display:none;
-		}
-
-		table{
-			font-size:$textSize;
-
-			tr{
-				td{
-					position: relative;
-
-					&:first-of-type{
-						padding-right:10px;
-					}
-				}
-			}
-		}
-	}
-
-
-	//cell element
-	.tabulator-cell{
-		display:inline-block;
-		position: relative;
-		box-sizing:border-box;
-		padding:4px;
-		border-right:1px solid $rowBorderColor;
-		vertical-align:middle;
-		white-space:nowrap;
-		overflow:hidden;
-		text-overflow:ellipsis;
-
-
-		&.tabulator-editing{
-			border:1px solid  $editBoxColor;
-			padding: 0;
-
-			input, select{
-				border:1px;
-				background:transparent;
-			}
-		}
-
-		&.tabulator-validation-fail{
-			border:1px solid $errorColor;
-			input, select{
-				border:1px;
-				background:transparent;
-
-				color: $errorColor;
-			}
-		}
-
-		//hide left resize handle on first column
-		&:first-child{
-			.tabulator-col-resize-handle.prev{
-				display: none;
-			}
-		}
-
-		//movable row handle
-		&.tabulator-row-handle{
-
-			display: inline-flex;
-			align-items:center;
-
-			-moz-user-select: none;
-			-khtml-user-select: none;
-			-webkit-user-select: none;
-			-o-user-select: none;
-
-			//handle holder
-			.tabulator-row-handle-box{
-				width:80%;
-
-				//Hamburger element
-				.tabulator-row-handle-bar{
-					width:100%;
-					height:3px;
-					margin-top:2px;
-					background:#666;
-				}
-			}
-		}
-
-		.tabulator-data-tree-branch{
-			display:inline-block;
-			vertical-align:middle;
-
-			height:9px;
-			width:7px;
-
-			margin-top:-9px;
-			margin-right:5px;
-
-			border-bottom-left-radius:1px;
-
-			border-left:2px solid $rowBorderColor;
-			border-bottom:2px solid $rowBorderColor;
-		}
-
-		.tabulator-data-tree-control{
-
-			display:inline-flex;
-			justify-content:center;
-			align-items:center;
-			vertical-align:middle;
-
-			height:11px;
-			width:11px;
-
-			margin-right:5px;
-
-			border:1px solid $rowTextColor;
-			border-radius:2px;
-			background:rgba(0, 0, 0, .1);
-
-			overflow:hidden;
-
-			&:hover{
-				cursor:pointer;
-				background:rgba(0, 0, 0, .2);
-			}
-
-			.tabulator-data-tree-control-collapse{
-				display:inline-block;
-				position: relative;
-
-				height: 7px;
-				width: 1px;
-
-				background: transparent;
-
-				&:after {
-					position: absolute;
-					content: "";
-					left: -3px;
-					top: 3px;
-
-					height: 1px;
-					width: 7px;
-
-					background: $rowTextColor;
-				}
-			}
-
-			.tabulator-data-tree-control-expand{
-				display:inline-block;
-				position: relative;
-
-				height: 7px;
-				width: 1px;
-
-				background: $rowTextColor;
-
-				&:after {
-					position: absolute;
-					content: "";
-					left: -3px;
-					top: 3px;
-
-					height: 1px;
-					width: 7px;
-
-					background: $rowTextColor;
-				}
-			}
-
-		}
-
-		.tabulator-responsive-collapse-toggle{
-			display: inline-flex;
-			align-items:center;
-			justify-content:center;
-
-			-moz-user-select: none;
-			-khtml-user-select: none;
-			-webkit-user-select: none;
-			-o-user-select: none;
-
-			height:15px;
-			width:15px;
-
-			border-radius:20px;
-			background:#fff;
-
-			color:$rowBackgroundColor;
-			font-weight:bold;
-			font-size:1.1em;
-
-			&:hover{
-				opacity:.7;
-			}
-
-			&.open{
-				.tabulator-responsive-collapse-toggle-close{
-					display:initial;
-				}
-
-				.tabulator-responsive-collapse-toggle-open{
-					display:none;
-				}
-			}
-
-			.tabulator-responsive-collapse-toggle-close{
-				display:none;
-			}
-		}
-	}
-
-
-	//row grouping element
-	&.tabulator-group{
-
-		box-sizing:border-box;
-		border-bottom:1px solid #999;
-		border-right:1px solid $rowBorderColor;
-		border-top:1px solid #999;
-		padding:5px;
-		padding-left:10px;
-		background:#ccc;
-		font-weight:bold;
-		color:#333;
-
-		min-width: 100%;
-
-		&:hover{
-			cursor:pointer;
-			background-color:rgba(0,0,0,.1);
-		}
-
-		&.tabulator-group-visible{
-			.tabulator-arrow{
-				margin-right:10px;
-				border-left: 6px solid transparent;
-				border-right: 6px solid transparent;
-				border-top: 6px solid $sortArrowActive;
-				border-bottom: 0;
-			}
-		}
-
-		&.tabulator-group-level-1{
-			.tabulator-arrow{
-				margin-left:20px;
-			}
-		}
-
-		&.tabulator-group-level-2{
-			.tabulator-arrow{
-				margin-left:40px;
-			}
-		}
-
-		&.tabulator-group-level-3{
-			.tabulator-arrow{
-				margin-left:60px;
-			}
-		}
-
-		&.tabulator-group-level-4{
-			.tabulator-arrow{
-				margin-left:80px;
-			}
-		}
-
-		&.tabulator-group-level-5{
-			.tabulator-arrow{
-				margin-left:100px;
-			}
-		}
-
-		//sorting arrow
-		.tabulator-arrow{
-			display: inline-block;
-			width: 0;
-			height: 0;
-			margin-right:16px;
-			border-top: 6px solid transparent;
-			border-bottom: 6px solid transparent;
-			border-right: 0;
-			border-left: 6px solid $sortArrowActive;
-			vertical-align:middle;
-		}
-
-		span{
-			margin-left:10px;
-			color:#666;
-		}
-	}
-}
-
-.tabulator-edit-select-list{
-	position: absolute;
-	display:inline-block;
-	box-sizing:border-box;
-
-	max-height:200px;
-
-	background:$rowBackgroundColor;
-	border:1px solid $rowBorderColor;
-
-	font-size:$textSize;
-
-	overflow-y:auto;
-	-webkit-overflow-scrolling: touch;
-
-	z-index: 10000;
-
-	.tabulator-edit-select-list-item{
-		padding:4px;
-
-		color:$rowTextColor;
-
-		&.active{
-			color:$rowBackgroundColor;
-			background:$editBoxColor;
-		}
-
-		&:hover{
-			cursor:pointer;
-
-			color:$rowBackgroundColor;
-			background:$editBoxColor;
-		}
-	}
-
-	.tabulator-edit-select-list-group{
-		border-bottom:1px solid $rowBorderColor;
-
-		padding:4px;
-		padding-top:6px;
-
-		color:$rowTextColor;
-		font-weight:bold;
-	}
-}
\ No newline at end of file
diff --git a/Gems/AssetMemoryAnalyzer/External/tabulator-master/src/scss/tabulator_modern.scss b/Gems/AssetMemoryAnalyzer/External/tabulator-master/src/scss/tabulator_modern.scss
deleted file mode 100644
index 48ba110a2e..0000000000
--- a/Gems/AssetMemoryAnalyzer/External/tabulator-master/src/scss/tabulator_modern.scss
+++ /dev/null
@@ -1,997 +0,0 @@
-
-$primary: #3759D7 !default; //the base text color from which the rest of the theme derives
-
-//Main Theme Variables
-$backgroundColor: #fff !default; //background color of tabulator
-$borderColor:#fff !default; //border to tabulator
-$textSize:16px !default; //table text size
-
-//header themeing
-$headerBackgroundColor:#fff !default; //border to tabulator
-$headerTextColor:$primary !default; //header text colour
-$headerBorderColor:#fff !default;  //header border color
-$headerSeperatorColor:$primary !default; //header bottom seperator color
-$headerMargin:4px !default; //padding round header
-
-//column header arrows
-$sortArrowActive: $primary !default;
-$sortArrowInactive: lighten($primary, 30%) !default;
-
-//row themeing
-$rowBackgroundColor:#f3f3f3 !default; //table row background color
-$rowAltBackgroundColor:#fff !default; //table row background color
-$rowBorderColor:#fff !default; //table border color
-$rowTextColor:#333 !default; //table text color
-$rowHoverBackground:#bbb !default; //row background color on hover
-
-$rowSelectedBackground: #9ABCEA !default; //row background color when selected
-$rowSelectedBackgroundHover: #769BCC !default;//row background color when selected and hovered
-
-$editBoxColor:#1D68CD !default; //border color for edit boxes
-$errorColor:#dd0000 !default; //error indication
-
-//footer themeing
-$footerBackgroundColor:#fff !default; //border to tabulator
-$footerTextColor:$primary !default; //footer text colour
-$footerBorderColor:#aaa !default; //footer border color
-$footerSeperatorColor:#999 !default; //footer bottom seperator color
-$footerActiveColor:$primary !default; //footer bottom active text color
-
-$handleWidth:10px !default; //width of the row handle
-$handleColor: $primary !default; //color for odd numbered rows
-$handleColorAlt: lighten($primary, 10%) !default; //color for even numbered rows
-
-
-//Tabulator Containing Element
-.tabulator{
-	position: relative;
-	border: 1px solid $borderColor;
-	background-color: $backgroundColor;
-	overflow:hidden;
-	font-size:$textSize;
-	text-align: left;
-
-	-webkit-transform: translatez(0);
-	-moz-transform: translatez(0);
-	-ms-transform: translatez(0);
-	-o-transform: translatez(0);
-	transform: translatez(0);
-
-	&[tabulator-layout="fitDataFill"]{
-		.tabulator-tableHolder{
-			.tabulator-table{
-				min-width:100%;
-			}
-		}
-	}
-
-	&.tabulator-block-select{
-		user-select: none;
-	}
-
-	//column header containing element
-	.tabulator-header{
-		position:relative;
-		box-sizing: border-box;
-
-		width:100%;
-
-		border-bottom:3px solid $headerSeperatorColor;
-		margin-bottom:4px;
-		background-color: $headerBackgroundColor;
-		color: $headerTextColor;
-		font-weight:bold;
-
-		white-space: nowrap;
-		overflow:hidden;
-
-		-moz-user-select: none;
-		-khtml-user-select: none;
-		-webkit-user-select: none;
-		-o-user-select: none;
-
-		padding-left:$handleWidth;
-
-		font-size: 1.1em;
-
-		//individual column header element
-		.tabulator-col{
-			display:inline-block;
-			position:relative;
-			box-sizing:border-box;
-			border-right:2px solid $headerBorderColor;
-			background-color: $headerBackgroundColor;
-			text-align:left;
-			vertical-align: bottom;
-			overflow: hidden;
-
-			&.tabulator-moving{
-				position: absolute;
-				border:1px solid  $headerSeperatorColor;
-				background:darken($headerBackgroundColor, 10%);
-				pointer-events: none;
-			}
-
-			//hold content of column header
-			.tabulator-col-content{
-				box-sizing:border-box;
-				position: relative;
-				padding:4px;
-
-				//hold title of column header
-				.tabulator-col-title{
-					box-sizing:border-box;
-					width: 100%;
-
-					white-space: nowrap;
-					overflow: hidden;
-					text-overflow: ellipsis;
-					vertical-align:bottom;
-
-					//element to hold title editor
-					.tabulator-title-editor{
-						box-sizing: border-box;
-						width: 100%;
-
-						border:1px solid $primary;
-
-						padding:1px;
-
-						background: #fff;
-
-						font-size: 1em;
-						color: $primary;
-					}
-				}
-
-				//column sorter arrow
-				.tabulator-arrow{
-					display: inline-block;
-					position: absolute;
-					top:9px;
-					right:8px;
-					width: 0;
-					height: 0;
-					border-left: 6px solid transparent;
-					border-right: 6px solid transparent;
-					border-bottom: 6px solid $sortArrowInactive;
-				}
-
-			}
-
-			//complex header column group
-			&.tabulator-col-group{
-
-				//gelement to hold sub columns in column group
-				.tabulator-col-group-cols{
-					position:relative;
-					display: flex;
-
-					border-top:2px solid $headerSeperatorColor;
-					overflow: hidden;
-
-					.tabulator-col:last-child{
-						margin-right:-1px;
-					}
-				}
-			}
-
-
-			//hide left resize handle on first column
-			&:first-child{
-				.tabulator-col-resize-handle.prev{
-					display: none;
-				}
-			}
-
-			//placeholder element for sortable columns
-			&.ui-sortable-helper{
-				position: absolute;
-				background-color: darken($headerBackgroundColor, 10%) !important;
-				border:1px solid $headerBorderColor;
-			}
-
-			//header filter containing element
-			.tabulator-header-filter{
-				position: relative;
-				box-sizing: border-box;
-				margin-top:2px;
-				width:100%;
-				text-align: center;
-
-				//styling adjustment for inbuilt editors
-				textarea{
-					height:auto !important;
-				}
-
-				svg{
-					margin-top: 3px;
-				}
-
-				input{
-					&::-ms-clear {
-					  width : 0;
-					  height: 0;
-					}
-				}
-			}
-
-			//styling child elements for sortable columns
-			&.tabulator-sortable{
-				.tabulator-col-title{
-					padding-right:25px;
-				}
-
-				&:hover{
-					cursor:pointer;
-					background-color:darken($headerBackgroundColor, 10%);
-				}
-
-
-				&[aria-sort="none"]{
-					.tabulator-col-content .tabulator-arrow{
-						border-top: none;
-						border-bottom: 6px solid $sortArrowInactive;
-					}
-				}
-
-				&[aria-sort="asc"]{
-					.tabulator-col-content .tabulator-arrow{
-						border-top: none;
-						border-bottom: 6px solid $sortArrowActive;
-					}
-				}
-
-				&[aria-sort="desc"]{
-					.tabulator-col-content .tabulator-arrow{
-						border-top: 6px solid $sortArrowActive;
-						border-bottom: none;
-					}
-				}
-			}
-
-			&.tabulator-col-vertical{
-				.tabulator-col-content{
-					.tabulator-col-title{
-						writing-mode: vertical-rl;
-						text-orientation: mixed;
-
-						display:flex;
-						align-items:center;
-						justify-content:center;
-					}
-				}
-
-				&.tabulator-col-vertical-flip{
-					.tabulator-col-title{
-						transform: rotate(180deg);
-					}
-				}
-
-				&.tabulator-sortable{
-					.tabulator-col-title{
-						padding-right:0;
-						padding-top:20px;
-					}
-
-					&.tabulator-col-vertical-flip{
-						.tabulator-col-title{
-							padding-right:0;
-							padding-bottom:20px;
-						}
-
-					}
-
-					.tabulator-arrow{
-						right:calc(50% - 6px);
-					}
-				}
-			}
-
-		}
-
-		.tabulator-frozen{
-			display: inline-block;
-			position: absolute;
-
-			// background-color: inherit;
-
-			z-index: 10;
-
-			&.tabulator-frozen-left{
-				padding-left: $handleWidth;
-
-				border-right:2px solid $rowBorderColor;
-			}
-
-			&.tabulator-frozen-right{
-				border-left:2px solid $rowBorderColor;
-			}
-		}
-
-		.tabulator-calcs-holder{
-			box-sizing:border-box;
-			min-width:400%;
-
-			border-top:2px solid $headerSeperatorColor !important;
-
-			background:lighten($headerBackgroundColor, 5%) !important;
-
-			.tabulator-row{
-				padding-left: 0 !important;
-
-				background:lighten($headerBackgroundColor, 5%) !important;
-
-				.tabulator-col-resize-handle{
-					display: none;
-				}
-
-				.tabulator-cell{
-					background:none;
-				}
-			}
-
-			border-top:1px solid $rowBorderColor;
-			border-bottom:1px solid $headerBorderColor;
-
-			overflow: hidden;
-		}
-
-		.tabulator-frozen-rows-holder{
-			min-width:400%;
-
-			&:empty{
-				display: none;
-			}
-		}
-	}
-
-	//scrolling element to hold table
-	.tabulator-tableHolder{
-		position:relative;
-		width:100%;
-		white-space: nowrap;
-		overflow:auto;
-		-webkit-overflow-scrolling: touch;
-
-		&:focus{
-			outline: none;
-		}
-
-		//default placeholder element
-		.tabulator-placeholder{
-			box-sizing:border-box;
-			display: flex;
-			align-items:center;
-
-			&[tabulator-render-mode="virtual"]{
-				position: absolute;
-				top:0;
-				left:0;
-				height:100%;
-			}
-
-			width:100%;
-
-			span{
-				display: inline-block;
-
-				margin:0 auto;
-				padding:10px;
-
-				color:$primary;
-				font-weight: bold;
-				font-size: 20px;
-			}
-		}
-
-		//element to hold table rows
-		.tabulator-table{
-			position:relative;
-			display:inline-block;
-			background-color:$rowBackgroundColor;
-			white-space: nowrap;
-			overflow:visible;
-			color:$rowTextColor;
-
-			.tabulator-row{
-				&.tabulator-calcs{
-					font-weight: bold;
-					background:darken($rowAltBackgroundColor, 5%) !important;
-
-					&.tabulator-calcs-top{
-						border-bottom:2px solid $headerSeperatorColor;
-					}
-
-					&.tabulator-calcs-bottom{
-						border-top:2px solid $headerSeperatorColor;
-					}
-				}
-			}
-		}
-	}
-
-
-	//column resize handles
-	.tabulator-col-resize-handle{
-		position:absolute;
-		right:0;
-		top:0;
-		bottom:0;
-		width:5px;
-
-		&.prev{
-			left:0;
-			right:auto;
-		}
-
-		&:hover{
-			cursor:ew-resize;
-		}
-	}
-
-
-	//footer element
-	.tabulator-footer{
-		padding:5px 10px;
-		border-top:1px solid $footerSeperatorColor;
-		background-color: $footerBackgroundColor;
-		text-align:right;
-		color: $footerTextColor;
-		font-weight:bold;
-		white-space:nowrap;
-		user-select:none;
-
-		-moz-user-select: none;
-		-khtml-user-select: none;
-		-webkit-user-select: none;
-		-o-user-select: none;
-
-		.tabulator-calcs-holder{
-			box-sizing:border-box;
-			width:calc(100% + 20px);
-			margin:-5px -10px 5px -10px;
-
-			text-align: left;
-
-			background:lighten($footerBackgroundColor, 5%) !important;
-
-			border-top:3px solid $headerSeperatorColor !important;
-			border-bottom:2px solid $headerSeperatorColor !important;
-
-			.tabulator-row{
-				background:lighten($footerBackgroundColor, 5%) !important;
-
-				.tabulator-col-resize-handle{
-					display: none;
-				}
-
-				.tabulator-cell{
-					background:none;
-				}
-			}
-
-			border-bottom:1px solid $rowBorderColor;
-			border-top:1px solid $rowBorderColor;
-
-			overflow: hidden;
-
-			&:only-child{
-				margin-bottom:-5px;
-				border-bottom:none;
-				border-bottom:none !important;
-			}
-		}
-
-		//pagination container element
-		.tabulator-pages{
-			margin:0 7px;
-		}
-
-		//pagination button
-		.tabulator-page{
-			display:inline-block;
-			margin:0 2px;
-			border:1px solid $footerBorderColor;
-			border-radius:3px;
-			padding:2px 5px;
-			background:rgba(255,255,255,.2);
-			color: $footerTextColor;
-			font-family:inherit;
-			font-weight:inherit;
-			font-size:inherit;
-
-			&.active{
-				color:$footerActiveColor;
-			}
-
-			&:disabled{
-				opacity:.5;
-			}
-
-			&:not(.disabled){
-				&:hover{
-					cursor:pointer;
-					background:rgba(0,0,0,.2);
-					color:#fff;
-				}
-			}
-		}
-	}
-
-	//holding div that contains loader and covers tabulator element to prevent interaction
-	.tabulator-loader{
-		position:absolute;
-		display: flex;
-		align-items:center;
-
-		top:0;
-		left:0;
-		z-index:100;
-
-		height:100%;
-		width:100%;
-		background:rgba(0,0,0,.4);
-		text-align:center;
-
-		//loading message element
-		.tabulator-loader-msg{
-			display:inline-block;
-
-			margin:0 auto;
-			padding:10px 20px;
-
-			border-radius:10px;
-
-			background:#fff;
-			font-weight:bold;
-			font-size:16px;
-
-			//loading message
-			&.tabulator-loading{
-				border:4px solid #333;
-				color:#000;
-			}
-
-			//error message
-			&.tabulator-error{
-				border:4px solid #D00;
-				color:#590000;
-			}
-		}
-	}
-}
-
-//row element
-.tabulator-row{
-	position: relative;
-	box-sizing: border-box;
-
-	box-sizing: border-box;
-	min-height:$textSize + ($headerMargin * 2);
-
-	background-color: $handleColor;
-
-	padding-left: $handleWidth !important;
-
-	margin-bottom: 2px;
-
-	&:nth-child(even){
-		background-color: $handleColorAlt;
-
-		.tabulator-cell{
-			background-color: $rowAltBackgroundColor;
-		}
-	}
-
-	&.tabulator-selectable:hover{
-		cursor: pointer;
-
-		.tabulator-cell{
-			background-color:$rowHoverBackground;
-		}
-	}
-
-	&.tabulator-selected{
-		.tabulator-cell{
-			background-color:$rowSelectedBackground;
-		}
-	}
-
-	&.tabulator-selected:hover{
-		.tabulator-cell{
-			background-color:$rowSelectedBackgroundHover;
-			cursor: pointer;
-		}
-	}
-
-	&.tabulator-moving{
-		position: absolute;
-
-		border-top:1px solid  $rowBorderColor;
-		border-bottom:1px solid  $rowBorderColor;
-
-		pointer-events: none !important;
-		z-index:15;
-	}
-
-	//row resize handles
-	.tabulator-row-resize-handle{
-		position:absolute;
-		right:0;
-		bottom:0;
-		left:0;
-		height:5px;
-
-		&.prev{
-			top:0;
-			bottom:auto;
-		}
-
-		&:hover{
-			cursor:ns-resize;
-		}
-	}
-
-	.tabulator-frozen{
-		display: inline-block;
-		position: absolute;
-
-		background-color: inherit;
-
-		z-index: 10;
-
-		&.tabulator-frozen-left{
-			padding-left: $handleWidth;
-			border-right:2px solid $rowBorderColor;
-		}
-
-		&.tabulator-frozen-right{
-			border-left:2px solid $rowBorderColor;
-		}
-	}
-
-	.tabulator-responsive-collapse{
-		box-sizing:border-box;
-
-		padding:5px;
-
-		border-top:1px solid $rowBorderColor;
-		border-bottom:1px solid $rowBorderColor;
-
-		&:empty{
-			display:none;
-		}
-
-		table{
-			font-size:$textSize;
-
-			tr{
-				td{
-					position: relative;
-
-					&:first-of-type{
-						padding-right:10px;
-					}
-				}
-			}
-		}
-	}
-
-	//cell element
-	.tabulator-cell{
-		display:inline-block;
-		position: relative;
-		box-sizing:border-box;
-		padding:6px 4px;
-		border-right:2px solid $rowBorderColor;
-		vertical-align:middle;
-		white-space:nowrap;
-		overflow:hidden;
-		text-overflow:ellipsis;
-
-		background-color: $rowBackgroundColor;
-
-		&.tabulator-editing{
-			border:1px solid  $editBoxColor;
-			padding: 0;
-
-			input, select{
-				border:1px;
-				background:transparent;
-			}
-		}
-
-		&.tabulator-validation-fail{
-			border:1px solid $errorColor;
-			input, select{
-				border:1px;
-				background:transparent;
-
-				color: $errorColor;
-			}
-		}
-
-		//hide left resize handle on first column
-		&:first-child{
-			.tabulator-col-resize-handle.prev{
-				display: none;
-			}
-		}
-
-		//movable row handle
-		&.tabulator-row-handle{
-
-			display: inline-flex;
-			align-items:center;
-
-			-moz-user-select: none;
-			-khtml-user-select: none;
-			-webkit-user-select: none;
-			-o-user-select: none;
-
-			//handle holder
-			.tabulator-row-handle-box{
-				width:80%;
-
-				//Hamburger element
-				.tabulator-row-handle-bar{
-					width:100%;
-					height:3px;
-					margin-top:2px;
-					background:#666;
-				}
-			}
-		}
-
-		.tabulator-data-tree-branch{
-			display:inline-block;
-			vertical-align:middle;
-
-			height:9px;
-			width:7px;
-
-			margin-top:-9px;
-			margin-right:5px;
-
-			border-bottom-left-radius:1px;
-
-			border-left:2px solid $rowBorderColor;
-			border-bottom:2px solid $rowBorderColor;
-		}
-
-		.tabulator-data-tree-control{
-
-			display:inline-flex;
-			justify-content:center;
-			align-items:center;
-			vertical-align:middle;
-
-			height:11px;
-			width:11px;
-
-			margin-right:5px;
-
-			border:1px solid $rowTextColor;
-			border-radius:2px;
-			background:rgba(0, 0, 0, .1);
-
-			overflow:hidden;
-
-			&:hover{
-				cursor:pointer;
-				background:rgba(0, 0, 0, .2);
-			}
-
-			.tabulator-data-tree-control-collapse{
-				display:inline-block;
-				position: relative;
-
-				height: 7px;
-				width: 1px;
-
-				background: transparent;
-
-				&:after {
-					position: absolute;
-					content: "";
-					left: -3px;
-					top: 3px;
-
-					height: 1px;
-					width: 7px;
-
-					background: $rowTextColor;
-				}
-			}
-
-			.tabulator-data-tree-control-expand{
-				display:inline-block;
-				position: relative;
-
-				height: 7px;
-				width: 1px;
-
-				background: $rowTextColor;
-
-				&:after {
-					position: absolute;
-					content: "";
-					left: -3px;
-					top: 3px;
-
-					height: 1px;
-					width: 7px;
-
-					background: $rowTextColor;
-				}
-			}
-
-		}
-
-		.tabulator-responsive-collapse-toggle{
-			display: inline-flex;
-			align-items:center;
-			justify-content:center;
-
-			-moz-user-select: none;
-			-khtml-user-select: none;
-			-webkit-user-select: none;
-			-o-user-select: none;
-
-			height:15px;
-			width:15px;
-
-			border-radius:20px;
-			background:#666;
-
-			color:$rowBackgroundColor;
-			font-weight:bold;
-			font-size:1.1em;
-
-			&:hover{
-				opacity:.7;
-			}
-
-			&.open{
-				.tabulator-responsive-collapse-toggle-close{
-					display:initial;
-				}
-
-				.tabulator-responsive-collapse-toggle-open{
-					display:none;
-				}
-			}
-
-			.tabulator-responsive-collapse-toggle-close{
-				display:none;
-			}
-		}
-	}
-
-	//row grouping element
-	&.tabulator-group{
-
-		box-sizing:border-box;
-		border-bottom:2px solid $primary;
-		border-top:2px solid $primary;
-		padding:5px;
-		padding-left:10px;
-		background:lighten($primary, 20%);
-		font-weight:bold;
-		color:fff;
-		margin-bottom: 2px;
-
-		min-width: 100%;
-
-		&:hover{
-			cursor:pointer;
-			background-color:rgba(0,0,0,.1);
-		}
-
-
-		&.tabulator-group-visible{
-			.tabulator-arrow{
-				margin-right:10px;
-				border-left: 6px solid transparent;
-				border-right: 6px solid transparent;
-				border-top: 6px solid $sortArrowActive;
-				border-bottom: 0;
-			}
-		}
-
-		&.tabulator-group-level-1{
-			.tabulator-arrow{
-				margin-left:20px;
-			}
-		}
-
-		&.tabulator-group-level-2{
-			.tabulator-arrow{
-				margin-left:40px;
-			}
-		}
-
-		&.tabulator-group-level-3{
-			.tabulator-arrow{
-				margin-left:60px;
-			}
-		}
-
-		&.tabulator-group-level-4{
-			.tabulator-arrow{
-				margin-left:80px;
-			}
-		}
-
-		&.tabulator-group-level-5{
-			.tabulator-arrow{
-				margin-left:100px;
-			}
-		}
-
-		//sorting arrow
-		.tabulator-arrow{
-			display: inline-block;
-			width: 0;
-			height: 0;
-			margin-right:16px;
-			border-top: 6px solid transparent;
-			border-bottom: 6px solid transparent;
-			border-right: 0;
-			border-left: 6px solid $sortArrowActive;
-			vertical-align:middle;
-		}
-
-		span{
-			margin-left:10px;
-			color:$primary;
-		}
-	}
-}
-
-.tabulator-edit-select-list{
-	position: absolute;
-	display:inline-block;
-	box-sizing:border-box;
-
-	max-height:200px;
-
-	background:$rowBackgroundColor;
-	border:1px solid $rowBorderColor;
-
-	font-size:$textSize;
-
-	overflow-y:auto;
-	-webkit-overflow-scrolling: touch;
-
-	z-index: 10000;
-
-	.tabulator-edit-select-list-item{
-		padding:4px;
-
-		color:$rowTextColor;
-
-		&.active{
-			color:$rowBackgroundColor;
-			background:$editBoxColor;
-		}
-
-		&:hover{
-			cursor:pointer;
-
-			color:$rowBackgroundColor;
-			background:$editBoxColor;
-		}
-	}
-
-	.tabulator-edit-select-list-group{
-		border-bottom:1px solid $rowBorderColor;
-
-		padding:4px;
-		padding-top:6px;
-
-		color:$rowTextColor;
-		font-weight:bold;
-	}
-}
\ No newline at end of file
diff --git a/Gems/AssetMemoryAnalyzer/External/tabulator-master/src/scss/tabulator_simple.scss b/Gems/AssetMemoryAnalyzer/External/tabulator-master/src/scss/tabulator_simple.scss
deleted file mode 100644
index 1174074f58..0000000000
--- a/Gems/AssetMemoryAnalyzer/External/tabulator-master/src/scss/tabulator_simple.scss
+++ /dev/null
@@ -1,951 +0,0 @@
-
-//Main Theme Variables
-$backgroundColor: #fff !default; //background color of tabulator
-$borderColor:#999 !default; //border to tabulator
-$textSize:14px !default; //table text size
-
-//header themeing
-$headerBackgroundColor:#fff !default; //border to tabulator
-$headerTextColor:#555 !default; //header text colour
-$headerBorderColor:#ddd !default;  //header border color
-$headerSeperatorColor:#999 !default; //header bottom seperator color
-$headerMargin:4px !default; //padding round header
-
-//column header arrows
-$sortArrowActive: #666 !default;
-$sortArrowInactive: #bbb !default;
-
-//row themeing
-$rowBackgroundColor:#fff !default; //table row background color
-$rowAltBackgroundColor:#fff !default; //table row background color
-$rowBorderColor:#ddd !default; //table border color
-$rowTextColor:#333 !default; //table text color
-$rowHoverBackground:#bbb !default; //row background color on hover
-
-$rowSelectedBackground: #9ABCEA !default; //row background color when selected
-$rowSelectedBackgroundHover: #769BCC !default;//row background color when selected and hovered
-
-
-$editBoxColor:#1D68CD !default; //border color for edit boxes
-$errorColor:#dd0000 !default; //error indication
-
-//footer themeing
-$footerBackgroundColor:#fff !default; //border to tabulator
-$footerTextColor:#555 !default; //footer text colour
-$footerBorderColor:#aaa !default; //footer border color
-$footerSeperatorColor:#999 !default; //footer bottom seperator color
-$footerActiveColor:#d00 !default; //footer bottom active text color
-
-
-//Tabulator Containing Element
-.tabulator{
-	position: relative;
-	background-color: $backgroundColor;
-	overflow:hidden;
-	font-size:$textSize;
-	text-align: left;
-
-	-webkit-transform: translatez(0);
-	-moz-transform: translatez(0);
-	-ms-transform: translatez(0);
-	-o-transform: translatez(0);
-	transform: translatez(0);
-
-	&[tabulator-layout="fitDataFill"]{
-		.tabulator-tableHolder{
-			.tabulator-table{
-				min-width:100%;
-			}
-		}
-	}
-
-	&.tabulator-block-select{
-		user-select: none;
-	}
-
-	//column header containing element
-	.tabulator-header{
-		position:relative;
-		box-sizing: border-box;
-
-		width:100%;
-
-		border-bottom:1px solid $headerSeperatorColor;
-		background-color: $headerBackgroundColor;
-		color: $headerTextColor;
-		font-weight:bold;
-
-		white-space: nowrap;
-		overflow:hidden;
-
-		-moz-user-select: none;
-		-khtml-user-select: none;
-		-webkit-user-select: none;
-		-o-user-select: none;
-
-		//individual column header element
-		.tabulator-col{
-			display:inline-block;
-			position:relative;
-			box-sizing:border-box;
-			border-right:1px solid $headerBorderColor;
-			background-color: $headerBackgroundColor;
-			text-align:left;
-			vertical-align: bottom;
-			overflow: hidden;
-
-			&.tabulator-moving{
-				position: absolute;
-				border:1px solid  $headerSeperatorColor;
-				background:darken($headerBackgroundColor, 10%);
-				pointer-events: none;
-			}
-
-			//hold content of column header
-			.tabulator-col-content{
-				box-sizing:border-box;
-				position: relative;
-				padding:4px;
-
-				//hold title of column header
-				.tabulator-col-title{
-					box-sizing:border-box;
-					width: 100%;
-
-					white-space: nowrap;
-					overflow: hidden;
-					text-overflow: ellipsis;
-					vertical-align:bottom;
-
-					//element to hold title editor
-					.tabulator-title-editor{
-						box-sizing: border-box;
-						width: 100%;
-
-						border:1px solid #999;
-
-						padding:1px;
-
-						background: #fff;
-					}
-				}
-
-				//column sorter arrow
-				.tabulator-arrow{
-					display: inline-block;
-					position: absolute;
-					top:9px;
-					right:8px;
-					width: 0;
-					height: 0;
-					border-left: 6px solid transparent;
-					border-right: 6px solid transparent;
-					border-bottom: 6px solid $sortArrowInactive;
-				}
-
-			}
-
-			//complex header column group
-			&.tabulator-col-group{
-
-				//gelement to hold sub columns in column group
-				.tabulator-col-group-cols{
-					position:relative;
-					display: flex;
-
-					border-top:1px solid $headerBorderColor;
-					overflow: hidden;
-
-					.tabulator-col:last-child{
-						margin-right:-1px;
-					}
-				}
-			}
-
-
-			//hide left resize handle on first column
-			&:first-child{
-				.tabulator-col-resize-handle.prev{
-					display: none;
-				}
-			}
-
-			//placeholder element for sortable columns
-			&.ui-sortable-helper{
-				position: absolute;
-				background-color:darken($headerBackgroundColor, 10%) !important;
-				border:1px solid $headerBorderColor;
-			}
-
-			//header filter containing element
-			.tabulator-header-filter{
-				position: relative;
-				box-sizing: border-box;
-				margin-top:2px;
-				width:100%;
-				text-align: center;
-
-				//styling adjustment for inbuilt editors
-				textarea{
-					height:auto !important;
-				}
-
-				svg{
-					margin-top: 3px;
-				}
-
-				input{
-					&::-ms-clear {
-					  width : 0;
-					  height: 0;
-					}
-				}
-			}
-
-
-			//styling child elements for sortable columns
-			&.tabulator-sortable{
-				.tabulator-col-title{
-					padding-right:25px;
-				}
-
-				&:hover{
-					cursor:pointer;
-					background-color:darken($headerBackgroundColor, 10%);
-				}
-
-
-				&[aria-sort="none"]{
-					.tabulator-col-content .tabulator-arrow{
-						border-top: none;
-						border-bottom: 6px solid $sortArrowInactive;
-					}
-				}
-
-				&[aria-sort="asc"]{
-					.tabulator-col-content .tabulator-arrow{
-						border-top: none;
-						border-bottom: 6px solid $sortArrowActive;
-					}
-				}
-
-				&[aria-sort="desc"]{
-					.tabulator-col-content .tabulator-arrow{
-						border-top: 6px solid $sortArrowActive;
-						border-bottom: none;
-					}
-				}
-			}
-
-			&.tabulator-col-vertical{
-				.tabulator-col-content{
-					.tabulator-col-title{
-						writing-mode: vertical-rl;
-						text-orientation: mixed;
-
-						display:flex;
-						align-items:center;
-						justify-content:center;
-					}
-				}
-
-				&.tabulator-col-vertical-flip{
-					.tabulator-col-title{
-						transform: rotate(180deg);
-					}
-				}
-
-				&.tabulator-sortable{
-					.tabulator-col-title{
-						padding-right:0;
-						padding-top:20px;
-					}
-
-					&.tabulator-col-vertical-flip{
-						.tabulator-col-title{
-							padding-right:0;
-							padding-bottom:20px;
-						}
-
-					}
-
-					.tabulator-arrow{
-						right:calc(50% - 6px);
-					}
-				}
-			}
-
-		}
-
-		.tabulator-frozen{
-			display: inline-block;
-			position: absolute;
-
-			// background-color: inherit;
-
-			z-index: 10;
-
-			&.tabulator-frozen-left{
-				border-right:2px solid $rowBorderColor;
-			}
-
-			&.tabulator-frozen-right{
-				border-left:2px solid $rowBorderColor;
-			}
-		}
-
-		.tabulator-calcs-holder{
-			box-sizing:border-box;
-			min-width:400%;
-
-			background:darken($headerBackgroundColor, 5%) !important;
-
-			.tabulator-row{
-				background:darken($headerBackgroundColor, 5%) !important;
-
-				.tabulator-col-resize-handle{
-					display: none;
-				}
-			}
-
-			border-top:1px solid $rowBorderColor;
-			border-bottom:1px solid $headerSeperatorColor;
-
-			overflow: hidden;
-		}
-
-		.tabulator-frozen-rows-holder{
-			min-width:400%;
-
-			&:empty{
-				display: none;
-			}
-		}
-	}
-
-
-
-	//scrolling element to hold table
-	.tabulator-tableHolder{
-		position:relative;
-		width:100%;
-		white-space: nowrap;
-		overflow:auto;
-		-webkit-overflow-scrolling: touch;
-
-		&:focus{
-			outline: none;
-		}
-
-		//default placeholder element
-		.tabulator-placeholder{
-			box-sizing:border-box;
-			display: flex;
-			align-items:center;
-
-			&[tabulator-render-mode="virtual"]{
-				position: absolute;
-				top:0;
-				left:0;
-				height:100%;
-			}
-
-			width:100%;
-
-			span{
-				display: inline-block;
-
-				margin:0 auto;
-				padding:10px;
-
-				color:#000;
-				font-weight: bold;
-				font-size: 20px;
-			}
-		}
-
-		//element to hold table rows
-		.tabulator-table{
-			position:relative;
-			display:inline-block;
-			background-color:$rowBackgroundColor;
-			white-space: nowrap;
-			overflow:visible;
-			color:$rowTextColor;
-
-			.tabulator-row{
-				&.tabulator-calcs{
-					font-weight: bold;
-					background:darken($rowAltBackgroundColor, 5%) !important;
-
-					&.tabulator-calcs-top{
-						border-bottom:2px solid $rowBorderColor;
-					}
-
-					&.tabulator-calcs-bottom{
-						border-top:2px solid $rowBorderColor;
-					}
-				}
-			}
-
-		}
-	}
-
-	//column resize handles
-	.tabulator-col-resize-handle{
-		position:absolute;
-		right:0;
-		top:0;
-		bottom:0;
-		width:5px;
-
-		&.prev{
-			left:0;
-			right:auto;
-		}
-
-		&:hover{
-			cursor:ew-resize;
-		}
-	}
-
-
-	//footer element
-	.tabulator-footer{
-		padding:5px 10px;
-		border-top:1px solid $footerSeperatorColor;
-		background-color: $footerBackgroundColor;
-		text-align:right;
-		color: $footerTextColor;
-		font-weight:bold;
-		white-space:nowrap;
-		user-select:none;
-
-		-moz-user-select: none;
-		-khtml-user-select: none;
-		-webkit-user-select: none;
-		-o-user-select: none;
-
-		.tabulator-calcs-holder{
-			box-sizing:border-box;
-			width:calc(100% + 20px);
-			margin:-5px -10px 5px -10px;
-
-			text-align: left;
-
-			background:darken($footerBackgroundColor, 5%) !important;
-
-			.tabulator-row{
-				background:darken($footerBackgroundColor, 5%) !important;
-
-				.tabulator-col-resize-handle{
-					display: none;
-				}
-			}
-
-			border-bottom:1px solid $footerBackgroundColor;
-			border-top:1px solid $rowBorderColor;
-
-			overflow: hidden;
-
-			&:only-child{
-				margin-bottom:-5px;
-				border-bottom:none;
-			}
-		}
-
-		//pagination container element
-		.tabulator-pages{
-			margin:0 7px;
-		}
-
-		//pagination button
-		.tabulator-page{
-			display:inline-block;
-			margin:0 2px;
-			border:1px solid $footerBorderColor;
-			border-radius:3px;
-			padding:2px 5px;
-			background:rgba(255,255,255,.2);
-			color: $footerTextColor;
-			font-family:inherit;
-			font-weight:inherit;
-			font-size:inherit;
-
-			&.active{
-				color:$footerActiveColor;
-			}
-
-			&:disabled{
-				opacity:.5;
-			}
-
-			&:not(.disabled){
-				&:hover{
-					cursor:pointer;
-					background:rgba(0,0,0,.2);
-					color:#fff;
-				}
-			}
-		}
-	}
-
-	//holding div that contains loader and covers tabulator element to prevent interaction
-	.tabulator-loader{
-		position:absolute;
-		display: flex;
-		align-items:center;
-
-		top:0;
-		left:0;
-		z-index:100;
-
-		height:100%;
-		width:100%;
-		background:rgba(0,0,0,.4);
-		text-align:center;
-
-		//loading message element
-		.tabulator-loader-msg{
-			display:inline-block;
-
-			margin:0 auto;
-			padding:10px 20px;
-
-			border-radius:10px;
-
-			background:#fff;
-			font-weight:bold;
-			font-size:16px;
-
-			//loading message
-			&.tabulator-loading{
-				border:4px solid #333;
-				color:#000;
-			}
-
-			//error message
-			&.tabulator-error{
-				border:4px solid #D00;
-				color:#590000;
-			}
-		}
-	}
-}
-
-//row element
-.tabulator-row{
-	position: relative;
-	box-sizing: border-box;
-
-	min-height:$textSize + ($headerMargin * 2);
-	background-color: $rowBackgroundColor;
-	border-bottom:1px solid $rowBorderColor;
-
-	&:nth-child(even){
-		background-color: $rowAltBackgroundColor;
-	}
-
-	&.tabulator-selectable:hover{
-		background-color:$rowHoverBackground;
-		cursor: pointer;
-	}
-
-	&.tabulator-selected{
-		background-color:$rowSelectedBackground;
-	}
-
-	&.tabulator-selected:hover{
-		background-color:$rowSelectedBackgroundHover;
-		cursor: pointer;
-	}
-
-	&.tabulator-moving{
-		position: absolute;
-
-		border-top:1px solid  $rowBorderColor;
-		border-bottom:1px solid  $rowBorderColor;
-
-		pointer-events: none !important;
-		z-index:15;
-	}
-
-	//row resize handles
-	.tabulator-row-resize-handle{
-		position:absolute;
-		right:0;
-		bottom:0;
-		left:0;
-		height:5px;
-
-		&.prev{
-			top:0;
-			bottom:auto;
-		}
-
-		&:hover{
-			cursor:ns-resize;
-		}
-	}
-
-	.tabulator-frozen{
-		display: inline-block;
-		position: absolute;
-
-		background-color: inherit;
-
-		z-index: 10;
-
-		&.tabulator-frozen-left{
-			border-right:2px solid $rowBorderColor;
-		}
-
-		&.tabulator-frozen-right{
-			border-left:2px solid $rowBorderColor;
-		}
-	}
-
-	.tabulator-responsive-collapse{
-		box-sizing:border-box;
-
-		padding:5px;
-
-		border-top:1px solid $rowBorderColor;
-		border-bottom:1px solid $rowBorderColor;
-
-		&:empty{
-			display:none;
-		}
-
-		table{
-			font-size:$textSize;
-
-			tr{
-				td{
-					position: relative;
-
-					&:first-of-type{
-						padding-right:10px;
-					}
-				}
-			}
-		}
-	}
-
-	//cell element
-	.tabulator-cell{
-		display:inline-block;
-		position: relative;
-		box-sizing:border-box;
-		padding:4px;
-		border-right:1px solid $rowBorderColor;
-		vertical-align:middle;
-		white-space:nowrap;
-		overflow:hidden;
-		text-overflow:ellipsis;
-
-		&:last-of-type{
-			border-right: none;
-		}
-
-		&.tabulator-editing{
-			border:1px solid  $editBoxColor;
-			padding: 0;
-
-			input, select{
-				border:1px;
-				background:transparent;
-			}
-		}
-
-		&.tabulator-validation-fail{
-			border:1px solid $errorColor;
-			input, select{
-				border:1px;
-				background:transparent;
-
-				color: $errorColor;
-			}
-		}
-
-		//hide left resize handle on first column
-		&:first-child{
-			.tabulator-col-resize-handle.prev{
-				display: none;
-			}
-		}
-
-		//movable row handle
-		&.tabulator-row-handle{
-
-			display: inline-flex;
-			align-items:center;
-
-			-moz-user-select: none;
-			-khtml-user-select: none;
-			-webkit-user-select: none;
-			-o-user-select: none;
-
-			//handle holder
-			.tabulator-row-handle-box{
-				width:80%;
-
-				//Hamburger element
-				.tabulator-row-handle-bar{
-					width:100%;
-					height:3px;
-					margin-top:2px;
-					background:#666;
-				}
-			}
-		}
-
-		.tabulator-data-tree-branch{
-			display:inline-block;
-			vertical-align:middle;
-
-			height:9px;
-			width:7px;
-
-			margin-top:-9px;
-			margin-right:5px;
-
-			border-bottom-left-radius:1px;
-
-			border-left:2px solid $rowBorderColor;
-			border-bottom:2px solid $rowBorderColor;
-		}
-
-		.tabulator-data-tree-control{
-
-			display:inline-flex;
-			justify-content:center;
-			align-items:center;
-			vertical-align:middle;
-
-			height:11px;
-			width:11px;
-
-			margin-right:5px;
-
-			border:1px solid $rowTextColor;
-			border-radius:2px;
-			background:rgba(0, 0, 0, .1);
-
-			overflow:hidden;
-
-			&:hover{
-				cursor:pointer;
-				background:rgba(0, 0, 0, .2);
-			}
-
-			.tabulator-data-tree-control-collapse{
-				display:inline-block;
-				position: relative;
-
-				height: 7px;
-				width: 1px;
-
-				background: transparent;
-
-				&:after {
-					position: absolute;
-					content: "";
-					left: -3px;
-					top: 3px;
-
-					height: 1px;
-					width: 7px;
-
-					background: $rowTextColor;
-				}
-			}
-
-			.tabulator-data-tree-control-expand{
-				display:inline-block;
-				position: relative;
-
-				height: 7px;
-				width: 1px;
-
-				background: $rowTextColor;
-
-				&:after {
-					position: absolute;
-					content: "";
-					left: -3px;
-					top: 3px;
-
-					height: 1px;
-					width: 7px;
-
-					background: $rowTextColor;
-				}
-			}
-
-		}
-
-		.tabulator-responsive-collapse-toggle{
-			display: inline-flex;
-			align-items:center;
-			justify-content:center;
-
-			-moz-user-select: none;
-			-khtml-user-select: none;
-			-webkit-user-select: none;
-			-o-user-select: none;
-
-			height:15px;
-			width:15px;
-
-			border-radius:20px;
-			background:#666;
-
-			color:$rowBackgroundColor;
-			font-weight:bold;
-			font-size:1.1em;
-
-			&:hover{
-				opacity:.7;
-			}
-
-			&.open{
-				.tabulator-responsive-collapse-toggle-close{
-					display:initial;
-				}
-
-				.tabulator-responsive-collapse-toggle-open{
-					display:none;
-				}
-			}
-
-			.tabulator-responsive-collapse-toggle-close{
-				display:none;
-			}
-		}
-	}
-
-	//row grouping element
-	&.tabulator-group{
-
-		box-sizing:border-box;
-		border-bottom:1px solid #999;
-		border-right:1px solid $rowBorderColor;
-		border-top:1px solid #999;
-		padding:5px;
-		padding-left:10px;
-		background:#fafafa;
-		font-weight:bold;
-
-		min-width: 100%;
-
-		&:hover{
-			cursor:pointer;
-			background-color:rgba(0,0,0,.1);
-		}
-
-		&.tabulator-group-visible{
-			.tabulator-arrow{
-				margin-right:10px;
-				border-left: 6px solid transparent;
-				border-right: 6px solid transparent;
-				border-top: 6px solid $sortArrowActive;
-				border-bottom: 0;
-			}
-		}
-
-		&.tabulator-group-level-1{
-			.tabulator-arrow{
-				margin-left:20px;
-			}
-		}
-
-		&.tabulator-group-level-2{
-			.tabulator-arrow{
-				margin-left:40px;
-			}
-		}
-
-		&.tabulator-group-level-3{
-			.tabulator-arrow{
-				margin-left:60px;
-			}
-		}
-
-		&.tabulator-group-level-4{
-			.tabulator-arrow{
-				margin-left:80px;
-			}
-		}
-
-		&.tabulator-group-level-5{
-			.tabulator-arrow{
-				margin-left:100px;
-			}
-		}
-
-		//sorting arrow
-		.tabulator-arrow{
-			display: inline-block;
-			width: 0;
-			height: 0;
-			margin-right:16px;
-			border-top: 6px solid transparent;
-			border-bottom: 6px solid transparent;
-			border-right: 0;
-			border-left: 6px solid $sortArrowActive;
-			vertical-align:middle;
-		}
-
-		span{
-			margin-left:10px;
-			color:#666;
-		}
-	}
-}
-
-.tabulator-edit-select-list{
-	position: absolute;
-	display:inline-block;
-	box-sizing:border-box;
-
-	max-height:200px;
-
-	background:$rowBackgroundColor;
-	border:1px solid $rowBorderColor;
-
-	font-size:$textSize;
-
-	overflow-y:auto;
-	-webkit-overflow-scrolling: touch;
-
-	z-index: 10000;
-
-	.tabulator-edit-select-list-item{
-		padding:4px;
-
-		color:$rowTextColor;
-
-		&.active{
-			color:$rowBackgroundColor;
-			background:$editBoxColor;
-		}
-
-		&:hover{
-			cursor:pointer;
-
-			color:$rowBackgroundColor;
-			background:$editBoxColor;
-		}
-	}
-
-	.tabulator-edit-select-list-group{
-		border-bottom:1px solid $rowBorderColor;
-
-		padding:4px;
-		padding-top:6px;
-
-		color:$rowTextColor;
-		font-weight:bold;
-	}
-}
\ No newline at end of file
diff --git a/Gems/AssetMemoryAnalyzer/External/tabulator-master/src/scss/tabulator_site.scss b/Gems/AssetMemoryAnalyzer/External/tabulator-master/src/scss/tabulator_site.scss
deleted file mode 100644
index cdf30ccae7..0000000000
--- a/Gems/AssetMemoryAnalyzer/External/tabulator-master/src/scss/tabulator_site.scss
+++ /dev/null
@@ -1,962 +0,0 @@
-
-//Main Theme Variables
-$backgroundColor: #fff !default; //background color of tabulator
-$borderColor:#222 !default; //border to tabulator
-$textSize:14px !default; //table text size
-
-//header themeing
-$headerBackgroundColor:#222 !default; //border to tabulator
-$headerTextColor:#fff !default; //header text colour
-$headerBorderColor:#aaa !default;  //header border color
-$headerSeperatorColor:#3FB449 !default; //header bottom seperator color
-$headerMargin:4px !default; //padding round header
-
-//column header arrows
-$sortArrowActive: #3FB449 !default;
-$sortArrowInactive: #bbb !default;
-
-//row themeing
-$rowBackgroundColor:#fff !default; //table row background color
-$rowAltBackgroundColor:#EFEFEF !default; //table row background color
-$rowBorderColor:#aaa !default; //table border color
-$rowTextColor:#333 !default; //table text color
-$rowHoverBackground:#bbb !default; //row background color on hover
-
-$rowSelectedBackground: #9ABCEA !default; //row background color when selected
-$rowSelectedBackgroundHover: #769BCC !default;//row background color when selected and hovered
-
-$editBoxColor:#1D68CD !default; //border color for edit boxes
-$errorColor:#dd0000 !default; //error indication
-
-//footer themeing
-$footerBackgroundColor:#222 !default; //border to tabulator
-$footerTextColor:#222 !default; //footer text colour
-$footerBorderColor:#aaa !default; //footer border color
-$footerSeperatorColor:#3FB449 !default; //footer bottom seperator color
-$footerActiveColor:$footerSeperatorColor !default; //footer bottom active text color
-
-
-//Tabulator Containing Element
-.tabulator{
-	position: relative;
-
-	border-bottom: 5px solid $borderColor;
-
-	background-color: $backgroundColor;
-
-	font-size:$textSize;
-	text-align: left;
-	overflow:hidden;
-
-	-webkit-transform: translatez(0);
-	-moz-transform: translatez(0);
-	-ms-transform: translatez(0);
-	-o-transform: translatez(0);
-	transform: translatez(0);
-
-	&[tabulator-layout="fitDataFill"]{
-		.tabulator-tableHolder{
-			.tabulator-table{
-				min-width:100%;
-			}
-		}
-	}
-
-	&[tabulator-layout="fitColumns"]{
-		.tabulator-row{
-			.tabulator-cell{
-				&:last-of-type{
-					border-right: none;
-				}
-			}
-		}
-	}
-
-
-	&.tabulator-block-select{
-		user-select: none;
-	}
-
-	//column header containing element
-	.tabulator-header{
-		position:relative;
-		box-sizing: border-box;
-
-		width:100%;
-
-		border-bottom:3px solid $headerSeperatorColor;
-		background-color: $headerBackgroundColor;
-		color: $headerTextColor;
-		font-weight:bold;
-
-		white-space: nowrap;
-		overflow:hidden;
-
-		-moz-user-select: none;
-		-khtml-user-select: none;
-		-webkit-user-select: none;
-		-o-user-select: none;
-
-		//individual column header element
-		.tabulator-col{
-			display:inline-block;
-
-			position:relative;
-			box-sizing:border-box;
-			border-right:1px solid $headerBorderColor;
-			background-color: $headerBackgroundColor;
-			text-align:left;
-			vertical-align: bottom;
-			overflow: hidden;
-
-			&.tabulator-moving{
-				position: absolute;
-				border:1px solid  $headerSeperatorColor;
-				background:darken($headerBackgroundColor, 10%);
-				pointer-events: none;
-			}
-
-			//hold content of column header
-			.tabulator-col-content{
-				box-sizing:border-box;
-				position: relative;
-				padding:8px;
-
-				//hold title of column header
-				.tabulator-col-title{
-					box-sizing:border-box;
-					width: 100%;
-
-					white-space: nowrap;
-					overflow: hidden;
-					text-overflow: ellipsis;
-					vertical-align:bottom;
-
-					//element to hold title editor
-					.tabulator-title-editor{
-						box-sizing: border-box;
-						width: 100%;
-
-						border:1px solid #999;
-
-						padding:1px;
-
-						background: #fff;
-					}
-				}
-
-				//column sorter arrow
-				.tabulator-arrow{
-					display: inline-block;
-					position: absolute;
-					top:14px;
-					right:8px;
-					width: 0;
-					height: 0;
-					border-left: 6px solid transparent;
-					border-right: 6px solid transparent;
-					border-bottom: 6px solid $sortArrowInactive;
-				}
-
-			}
-
-			//complex header column group
-			&.tabulator-col-group{
-
-				//gelement to hold sub columns in column group
-				.tabulator-col-group-cols{
-					position:relative;
-					display: flex;
-
-					border-top:1px solid $headerBorderColor;
-					overflow: hidden;
-
-					.tabulator-col:last-child{
-						margin-right:-1px;
-					}
-				}
-			}
-
-			//hide left resize handle on first column
-			&:first-child{
-				.tabulator-col-resize-handle.prev{
-					display: none;
-				}
-			}
-
-			//placeholder element for sortable columns
-			&.ui-sortable-helper{
-				position: absolute;
-				background-color: $headerBackgroundColor !important;
-				border:1px solid $headerBorderColor;
-			}
-
-			//header filter containing element
-			.tabulator-header-filter{
-				position: relative;
-				box-sizing: border-box;
-				margin-top:2px;
-				width:100%;
-				text-align: center;
-
-				//styling adjustment for inbuilt editors
-				textarea{
-					height:auto !important;
-				}
-
-				svg{
-					margin-top: 3px;
-				}
-
-				input{
-					&::-ms-clear {
-					  width : 0;
-					  height: 0;
-					}
-				}
-			}
-
-			//styling child elements for sortable columns
-			&.tabulator-sortable{
-				.tabulator-col-title{
-					padding-right:25px;
-				}
-
-				&:hover{
-					cursor:pointer;
-					background-color:darken($headerBackgroundColor, 10%);
-				}
-
-				&[aria-sort="none"]{
-					.tabulator-col-content .tabulator-arrow{
-						border-top: none;
-						border-bottom: 6px solid $sortArrowInactive;
-					}
-				}
-
-				&[aria-sort="asc"]{
-					.tabulator-col-content .tabulator-arrow{
-						border-top: none;
-						border-bottom: 6px solid $sortArrowActive;
-					}
-				}
-
-				&[aria-sort="desc"]{
-					.tabulator-col-content .tabulator-arrow{
-						border-top: 6px solid $sortArrowActive;
-						border-bottom: none;
-					}
-				}
-			}
-
-			&.tabulator-col-vertical{
-				.tabulator-col-content{
-					.tabulator-col-title{
-						writing-mode: vertical-rl;
-						text-orientation: mixed;
-
-						display:flex;
-						align-items:center;
-						justify-content:center;
-					}
-				}
-
-				&.tabulator-col-vertical-flip{
-					.tabulator-col-title{
-						transform: rotate(180deg);
-					}
-				}
-
-				&.tabulator-sortable{
-					.tabulator-col-title{
-						padding-right:0;
-						padding-top:20px;
-					}
-
-					&.tabulator-col-vertical-flip{
-						.tabulator-col-title{
-							padding-right:0;
-							padding-bottom:20px;
-						}
-
-					}
-
-					.tabulator-arrow{
-						right:calc(50% - 6px);
-					}
-				}
-			}
-
-		}
-
-		.tabulator-frozen{
-			display: inline-block;
-			position: absolute;
-
-			// background-color: inherit;
-
-			z-index: 10;
-
-			&.tabulator-frozen-left{
-				border-right:2px solid $rowBorderColor;
-			}
-
-			&.tabulator-frozen-right{
-				border-left:2px solid $rowBorderColor;
-			}
-		}
-
-		.tabulator-calcs-holder{
-			box-sizing:border-box;
-			min-width:400%;
-
-			background:lighten($headerBackgroundColor, 10%) !important;
-
-			.tabulator-row{
-				background:lighten($headerBackgroundColor, 10%) !important;
-
-				.tabulator-col-resize-handle{
-					display: none;
-				}
-			}
-
-			border-top:1px solid $rowBorderColor;
-			// border-bottom:1px solid $headerBorderColor;
-
-			overflow: hidden;
-		}
-
-		.tabulator-frozen-rows-holder{
-			min-width:400%;
-
-			&:empty{
-				display: none;
-			}
-		}
-	}
-
-	//scrolling element to hold table
-	.tabulator-tableHolder{
-		position:relative;
-		width:100%;
-		white-space: nowrap;
-		overflow:auto;
-		-webkit-overflow-scrolling: touch;
-
-		&:focus{
-			outline: none;
-		}
-
-		//default placeholder element
-		.tabulator-placeholder{
-			box-sizing:border-box;
-			display: flex;
-			align-items:center;
-
-			&[tabulator-render-mode="virtual"]{
-				position: absolute;
-				top:0;
-				left:0;
-				height:100%;
-			}
-
-			width:100%;
-
-			span{
-				display: inline-block;
-
-				margin:0 auto;
-				padding:10px;
-
-				color:$headerSeperatorColor;
-				font-weight: bold;
-				font-size: 20px;
-			}
-		}
-
-		//element to hold table rows
-		.tabulator-table{
-			position:relative;
-			display:inline-block;
-			background-color:$rowBackgroundColor;
-			white-space: nowrap;
-			overflow:visible;
-			color:$rowTextColor;
-
-			.tabulator-row{
-				&.tabulator-calcs{
-					font-weight: bold;
-					background:lighten($headerBackgroundColor, 15%) !important;
-					color:$headerTextColor;
-				}
-			}
-		}
-	}
-
-
-	//footer element
-	.tabulator-footer{
-		padding:5px 10px;
-		padding-top:8px;
-		border-top:3px solid $footerSeperatorColor;
-		background-color: $footerBackgroundColor;
-		text-align:right;
-		color: $footerTextColor;
-		font-weight:bold;
-		white-space:nowrap;
-		user-select:none;
-
-		-moz-user-select: none;
-		-khtml-user-select: none;
-		-webkit-user-select: none;
-		-o-user-select: none;
-
-		.tabulator-calcs-holder{
-			box-sizing:border-box;
-			width:calc(100% + 20px);
-			margin:-8px -10px 8px -10px;
-
-			text-align: left;
-
-			background:lighten($footerBackgroundColor, 10%) !important;
-
-			.tabulator-row{
-				background:lighten($footerBackgroundColor, 10%) !important;
-				color:$headerTextColor !important;
-
-				.tabulator-col-resize-handle{
-					display: none;
-				}
-			}
-
-			// border-top:1px solid $rowBorderColor;
-			border-bottom:1px solid $rowBorderColor;
-
-			overflow: hidden;
-
-			&:only-child{
-				margin-bottom:-5px;
-				border-bottom:none;
-			}
-		}
-
-		//pagination container element
-		.tabulator-pages{
-			margin:0 7px;
-		}
-
-		//pagination button
-		.tabulator-page{
-			display:inline-block;
-
-			margin:0 2px;
-			padding:2px 5px;
-
-			border:1px solid $footerBorderColor;
-			border-radius:3px;
-
-			background:#fff;
-
-			color: $footerTextColor;
-			font-family:inherit;
-			font-weight:inherit;
-			font-size:inherit;
-
-			&.active{
-				color:$footerActiveColor;
-			}
-
-			&:disabled{
-				opacity:.5;
-			}
-
-			&:not(.disabled){
-				&:hover{
-					cursor:pointer;
-					background:rgba(0,0,0,.2);
-					color:#fff;
-				}
-			}
-		}
-	}
-
-	//column resize handles
-	.tabulator-col-resize-handle{
-		position:absolute;
-		right:0;
-		top:0;
-		bottom:0;
-		width:5px;
-
-		&.prev{
-			left:0;
-			right:auto;
-		}
-
-		&:hover{
-			cursor:ew-resize;
-		}
-	}
-
-
-	//holding div that contains loader and covers tabulator element to prevent interaction
-	.tabulator-loader{
-		position:absolute;
-		display: flex;
-		align-items:center;
-
-		top:0;
-		left:0;
-		z-index:100;
-
-		height:100%;
-		width:100%;
-		background:rgba(0,0,0,.4);
-		text-align:center;
-
-		//loading message element
-		.tabulator-loader-msg{
-			display:inline-block;
-
-			margin:0 auto;
-			padding:10px 20px;
-
-			border-radius:10px;
-
-			background:#fff;
-			font-weight:bold;
-			font-size:16px;
-
-			//loading message
-			&.tabulator-loading{
-				border:4px solid #333;
-				color:#000;
-			}
-
-			//error message
-			&.tabulator-error{
-				border:4px solid #D00;
-				color:#590000;
-			}
-		}
-	}
-}
-
-//row element
-.tabulator-row{
-	position: relative;
-	box-sizing: border-box;
-	min-height:$textSize + ($headerMargin * 2);
-	background-color: $rowBackgroundColor;
-
-
-	&.tabulator-row-even{
-		background-color: $rowAltBackgroundColor;
-	}
-
-	&.tabulator-selectable:hover{
-		background-color:$rowHoverBackground;
-		cursor: pointer;
-	}
-
-	&.tabulator-selected{
-		background-color:$rowSelectedBackground;
-	}
-
-	&.tabulator-selected:hover{
-		background-color:$rowSelectedBackgroundHover;
-		cursor: pointer;
-	}
-
-	&.tabulator-row-moving{
-		border:1px solid #000;
-		background:#fff;
-	}
-
-	&.tabulator-moving{
-		position: absolute;
-
-		border-top:1px solid  $rowBorderColor;
-		border-bottom:1px solid  $rowBorderColor;
-
-		pointer-events: none !important;
-		z-index:15;
-	}
-
-	//row resize handles
-	.tabulator-row-resize-handle{
-		position:absolute;
-		right:0;
-		bottom:0;
-		left:0;
-		height:5px;
-
-		&.prev{
-			top:0;
-			bottom:auto;
-		}
-
-		&:hover{
-			cursor:ns-resize;
-		}
-	}
-
-	.tabulator-frozen{
-		display: inline-block;
-		position: absolute;
-
-		background-color: inherit;
-
-		z-index: 10;
-
-		&.tabulator-frozen-left{
-			border-right:2px solid $rowBorderColor;
-		}
-
-		&.tabulator-frozen-right{
-			border-left:2px solid $rowBorderColor;
-		}
-	}
-
-	.tabulator-responsive-collapse{
-		box-sizing:border-box;
-
-		padding:5px;
-
-		border-top:1px solid $rowBorderColor;
-		border-bottom:1px solid $rowBorderColor;
-
-		&:empty{
-			display:none;
-		}
-
-		table{
-			font-size:$textSize;
-
-			tr{
-				td{
-					position: relative;
-
-					&:first-of-type{
-						padding-right:10px;
-					}
-				}
-			}
-		}
-	}
-
-	//cell element
-	.tabulator-cell{
-		display:inline-block;
-		position: relative;
-		box-sizing:border-box;
-		padding:6px;
-		border-right:1px solid $rowBorderColor;
-		vertical-align:middle;
-		white-space:nowrap;
-		overflow:hidden;
-		text-overflow:ellipsis;
-
-
-		&.tabulator-editing{
-			border:1px solid  $editBoxColor;
-			padding: 0;
-
-			input, select{
-				border:1px;
-				background:transparent;
-			}
-		}
-
-		&.tabulator-validation-fail{
-			border:1px solid $errorColor;
-			input, select{
-				border:1px;
-				background:transparent;
-
-				color: $errorColor;
-			}
-		}
-
-		//hide left resize handle on first column
-		&:first-child{
-			.tabulator-col-resize-handle.prev{
-				display: none;
-			}
-		}
-
-		//movable row handle
-		&.tabulator-row-handle{
-
-			display: inline-flex;
-			align-items:center;
-
-			-moz-user-select: none;
-			-khtml-user-select: none;
-			-webkit-user-select: none;
-			-o-user-select: none;
-
-			//handle holder
-			.tabulator-row-handle-box{
-				width:80%;
-
-				//Hamburger element
-				.tabulator-row-handle-bar{
-					width:100%;
-					height:3px;
-					margin-top:2px;
-					background:$sortArrowActive;
-				}
-			}
-		}
-
-		.tabulator-data-tree-branch{
-			display:inline-block;
-			vertical-align:middle;
-
-			height:9px;
-			width:7px;
-
-			margin-top:-9px;
-			margin-right:5px;
-
-			border-bottom-left-radius:1px;
-
-			border-left:2px solid $rowBorderColor;
-			border-bottom:2px solid $rowBorderColor;
-		}
-
-		.tabulator-data-tree-control{
-
-			display:inline-flex;
-			justify-content:center;
-			align-items:center;
-			vertical-align:middle;
-
-			height:11px;
-			width:11px;
-
-			margin-right:5px;
-
-			border:1px solid $rowTextColor;
-			border-radius:2px;
-			background:rgba(0, 0, 0, .1);
-
-			overflow:hidden;
-
-			&:hover{
-				cursor:pointer;
-				background:rgba(0, 0, 0, .2);
-			}
-
-			.tabulator-data-tree-control-collapse{
-				display:inline-block;
-				position: relative;
-
-				height: 7px;
-				width: 1px;
-
-				background: transparent;
-
-				&:after {
-					position: absolute;
-					content: "";
-					left: -3px;
-					top: 3px;
-
-					height: 1px;
-					width: 7px;
-
-					background: $rowTextColor;
-				}
-			}
-
-			.tabulator-data-tree-control-expand{
-				display:inline-block;
-				position: relative;
-
-				height: 7px;
-				width: 1px;
-
-				background: $rowTextColor;
-
-				&:after {
-					position: absolute;
-					content: "";
-					left: -3px;
-					top: 3px;
-
-					height: 1px;
-					width: 7px;
-
-					background: $rowTextColor;
-				}
-			}
-
-		}
-
-		.tabulator-responsive-collapse-toggle{
-			display: inline-flex;
-			align-items:center;
-			justify-content:center;
-
-			-moz-user-select: none;
-			-khtml-user-select: none;
-			-webkit-user-select: none;
-			-o-user-select: none;
-
-			height:15px;
-			width:15px;
-
-			border-radius:20px;
-			background:#666;
-
-			color:$rowBackgroundColor;
-			font-weight:bold;
-			font-size:1.1em;
-
-			&:hover{
-				opacity:.7;
-			}
-
-			&.open{
-				.tabulator-responsive-collapse-toggle-close{
-					display:initial;
-				}
-
-				.tabulator-responsive-collapse-toggle-open{
-					display:none;
-				}
-			}
-
-			.tabulator-responsive-collapse-toggle-close{
-				display:none;
-			}
-		}
-	}
-
-	//row grouping element
-	&.tabulator-group{
-		box-sizing:border-box;
-		border-right:1px solid $rowBorderColor;
-		border-top:1px solid #000;
-		border-bottom:2px solid $headerSeperatorColor;
-		padding:5px;
-		padding-left:10px;
-		background:$headerBackgroundColor;
-		color:$headerTextColor;
-		font-weight:bold;
-
-		min-width: 100%;
-
-		&:hover{
-			cursor:pointer;
-			background-color:darken($headerBackgroundColor, 10%);
-		}
-
-		&.tabulator-group-visible{
-			.tabulator-arrow{
-				margin-right:10px;
-				border-left: 6px solid transparent;
-				border-right: 6px solid transparent;
-				border-top: 6px solid $sortArrowActive;
-				border-bottom: 0;
-			}
-		}
-
-		&.tabulator-group-level-1{
-			.tabulator-arrow{
-				margin-left:20px;
-			}
-		}
-
-		&.tabulator-group-level-2{
-			.tabulator-arrow{
-				margin-left:40px;
-			}
-		}
-
-		&.tabulator-group-level-3{
-			.tabulator-arrow{
-				margin-left:60px;
-			}
-		}
-
-		&.tabulator-group-level-4{
-			.tabulator-arrow{
-				margin-left:80px;
-			}
-		}
-
-		&.tabulator-group-level-5{
-			.tabulator-arrow{
-				margin-left:100px;
-			}
-		}
-
-		//sorting arrow
-		.tabulator-arrow{
-			display: inline-block;
-			width: 0;
-			height: 0;
-			margin-right:16px;
-			border-top: 6px solid transparent;
-			border-bottom: 6px solid transparent;
-			border-right: 0;
-			border-left: 6px solid $sortArrowActive;
-			vertical-align:middle;
-		}
-
-		span{
-			margin-left:10px;
-			color:$headerSeperatorColor;
-		}
-	}
-
-}
-
-.tabulator-edit-select-list{
-	position: absolute;
-	display:inline-block;
-	box-sizing:border-box;
-
-	max-height:200px;
-
-	background:$rowBackgroundColor;
-	border:1px solid $rowBorderColor;
-
-	font-size:$textSize;
-
-	overflow-y:auto;
-	-webkit-overflow-scrolling: touch;
-
-	z-index: 10000;
-
-	.tabulator-edit-select-list-item{
-		padding:4px;
-
-		color:$rowTextColor;
-
-		&.active{
-			color:$rowBackgroundColor;
-			background:$editBoxColor;
-		}
-
-		&:hover{
-			cursor:pointer;
-
-			color:$rowBackgroundColor;
-			background:$editBoxColor;
-		}
-	}
-
-	.tabulator-edit-select-list-group{
-		border-bottom:1px solid $rowBorderColor;
-
-		padding:4px;
-		padding-top:6px;
-
-		color:$rowTextColor;
-		font-weight:bold;
-	}
-}
\ No newline at end of file
diff --git a/Gems/AssetMemoryAnalyzer/External/tabulator-master/yarn.lock b/Gems/AssetMemoryAnalyzer/External/tabulator-master/yarn.lock
deleted file mode 100644
index 01198bc3c7..0000000000
--- a/Gems/AssetMemoryAnalyzer/External/tabulator-master/yarn.lock
+++ /dev/null
@@ -1,5974 +0,0 @@
-# THIS IS AN AUTOGENERATED FILE. DO NOT EDIT THIS FILE DIRECTLY.
-# yarn lockfile v1
-
-
-"@gulp-sourcemaps/identity-map@1.X":
-  version "1.0.2"
-  resolved "https://registry.yarnpkg.com/@gulp-sourcemaps/identity-map/-/identity-map-1.0.2.tgz#1e6fe5d8027b1f285dc0d31762f566bccd73d5a9"
-  dependencies:
-    acorn "^5.0.3"
-    css "^2.2.1"
-    normalize-path "^2.1.1"
-    source-map "^0.6.0"
-    through2 "^2.0.3"
-
-"@gulp-sourcemaps/map-sources@1.X":
-  version "1.0.0"
-  resolved "https://registry.yarnpkg.com/@gulp-sourcemaps/map-sources/-/map-sources-1.0.0.tgz#890ae7c5d8c877f6d384860215ace9d7ec945bda"
-  dependencies:
-    normalize-path "^2.0.1"
-    through2 "^2.0.3"
-
-abbrev@1:
-  version "1.1.1"
-  resolved "https://registry.yarnpkg.com/abbrev/-/abbrev-1.1.1.tgz#f8f2c887ad10bf67f634f005b6987fed3179aac8"
-
-acorn@5.X, acorn@^5.0.3:
-  version "5.7.3"
-  resolved "https://registry.yarnpkg.com/acorn/-/acorn-5.7.3.tgz#67aa231bf8812974b85235a96771eb6bd07ea279"
-
-ajv@^5.1.0, ajv@^5.3.0:
-  version "5.5.2"
-  resolved "https://registry.yarnpkg.com/ajv/-/ajv-5.5.2.tgz#73b5eeca3fab653e3d3f9422b341ad42205dc965"
-  dependencies:
-    co "^4.6.0"
-    fast-deep-equal "^1.0.0"
-    fast-json-stable-stringify "^2.0.0"
-    json-schema-traverse "^0.3.0"
-
-align-text@^0.1.1, align-text@^0.1.3:
-  version "0.1.4"
-  resolved "https://registry.yarnpkg.com/align-text/-/align-text-0.1.4.tgz#0cd90a561093f35d0a99256c22b7069433fad117"
-  dependencies:
-    kind-of "^3.0.2"
-    longest "^1.0.1"
-    repeat-string "^1.5.2"
-
-alphanum-sort@^1.0.1, alphanum-sort@^1.0.2:
-  version "1.0.2"
-  resolved "https://registry.yarnpkg.com/alphanum-sort/-/alphanum-sort-1.0.2.tgz#97a1119649b211ad33691d9f9f486a8ec9fbe0a3"
-
-amdefine@>=0.0.4:
-  version "1.0.1"
-  resolved "https://registry.yarnpkg.com/amdefine/-/amdefine-1.0.1.tgz#4a5282ac164729e93619bcfd3ad151f817ce91f5"
-
-ansi-colors@^1.0.1:
-  version "1.1.0"
-  resolved "http://registry.npmjs.org/ansi-colors/-/ansi-colors-1.1.0.tgz#6374b4dd5d4718ff3ce27a671a3b1cad077132a9"
-  dependencies:
-    ansi-wrap "^0.1.0"
-
-ansi-cyan@^0.1.1:
-  version "0.1.1"
-  resolved "https://registry.yarnpkg.com/ansi-cyan/-/ansi-cyan-0.1.1.tgz#538ae528af8982f28ae30d86f2f17456d2609873"
-  dependencies:
-    ansi-wrap "0.1.0"
-
-ansi-gray@^0.1.1:
-  version "0.1.1"
-  resolved "https://registry.yarnpkg.com/ansi-gray/-/ansi-gray-0.1.1.tgz#2962cf54ec9792c48510a3deb524436861ef7251"
-  dependencies:
-    ansi-wrap "0.1.0"
-
-ansi-red@^0.1.1:
-  version "0.1.1"
-  resolved "https://registry.yarnpkg.com/ansi-red/-/ansi-red-0.1.1.tgz#8c638f9d1080800a353c9c28c8a81ca4705d946c"
-  dependencies:
-    ansi-wrap "0.1.0"
-
-ansi-regex@^0.2.0, ansi-regex@^0.2.1:
-  version "0.2.1"
-  resolved "http://registry.npmjs.org/ansi-regex/-/ansi-regex-0.2.1.tgz#0d8e946967a3d8143f93e24e298525fc1b2235f9"
-
-ansi-regex@^2.0.0:
-  version "2.1.1"
-  resolved "https://registry.yarnpkg.com/ansi-regex/-/ansi-regex-2.1.1.tgz#c3b33ab5ee360d86e0e628f0468ae7ef27d654df"
-
-ansi-regex@^3.0.0:
-  version "3.0.0"
-  resolved "https://registry.yarnpkg.com/ansi-regex/-/ansi-regex-3.0.0.tgz#ed0317c322064f79466c02966bddb605ab37d998"
-
-ansi-styles@^1.1.0:
-  version "1.1.0"
-  resolved "https://registry.yarnpkg.com/ansi-styles/-/ansi-styles-1.1.0.tgz#eaecbf66cd706882760b2f4691582b8f55d7a7de"
-
-ansi-styles@^2.2.1:
-  version "2.2.1"
-  resolved "https://registry.yarnpkg.com/ansi-styles/-/ansi-styles-2.2.1.tgz#b432dd3358b634cf75e1e4664368240533c1ddbe"
-
-ansi-styles@^3.2.1:
-  version "3.2.1"
-  resolved "https://registry.yarnpkg.com/ansi-styles/-/ansi-styles-3.2.1.tgz#41fbb20243e50b12be0f04b8dedbf07520ce841d"
-  dependencies:
-    color-convert "^1.9.0"
-
-ansi-wrap@0.1.0, ansi-wrap@^0.1.0:
-  version "0.1.0"
-  resolved "https://registry.yarnpkg.com/ansi-wrap/-/ansi-wrap-0.1.0.tgz#a82250ddb0015e9a27ca82e82ea603bbfa45efaf"
-
-aproba@^1.0.3:
-  version "1.2.0"
-  resolved "https://registry.yarnpkg.com/aproba/-/aproba-1.2.0.tgz#6802e6264efd18c790a1b0d517f0f2627bf2c94a"
-
-archive-type@^3.0.0, archive-type@^3.0.1:
-  version "3.2.0"
-  resolved "https://registry.yarnpkg.com/archive-type/-/archive-type-3.2.0.tgz#9cd9c006957ebe95fadad5bd6098942a813737f6"
-  dependencies:
-    file-type "^3.1.0"
-
-archy@^1.0.0:
-  version "1.0.0"
-  resolved "https://registry.yarnpkg.com/archy/-/archy-1.0.0.tgz#f9c8c13757cc1dd7bc379ac77b2c62a5c2868c40"
-
-are-we-there-yet@~1.1.2:
-  version "1.1.5"
-  resolved "https://registry.yarnpkg.com/are-we-there-yet/-/are-we-there-yet-1.1.5.tgz#4b35c2944f062a8bfcda66410760350fe9ddfc21"
-  dependencies:
-    delegates "^1.0.0"
-    readable-stream "^2.0.6"
-
-argparse@^1.0.7:
-  version "1.0.10"
-  resolved "https://registry.yarnpkg.com/argparse/-/argparse-1.0.10.tgz#bcd6791ea5ae09725e17e5ad988134cd40b3d911"
-  dependencies:
-    sprintf-js "~1.0.2"
-
-arr-diff@^1.0.1:
-  version "1.1.0"
-  resolved "https://registry.yarnpkg.com/arr-diff/-/arr-diff-1.1.0.tgz#687c32758163588fef7de7b36fabe495eb1a399a"
-  dependencies:
-    arr-flatten "^1.0.1"
-    array-slice "^0.2.3"
-
-arr-diff@^2.0.0:
-  version "2.0.0"
-  resolved "https://registry.yarnpkg.com/arr-diff/-/arr-diff-2.0.0.tgz#8f3b827f955a8bd669697e4a4256ac3ceae356cf"
-  dependencies:
-    arr-flatten "^1.0.1"
-
-arr-diff@^4.0.0:
-  version "4.0.0"
-  resolved "https://registry.yarnpkg.com/arr-diff/-/arr-diff-4.0.0.tgz#d6461074febfec71e7e15235761a329a5dc7c520"
-
-arr-flatten@^1.0.1, arr-flatten@^1.1.0:
-  version "1.1.0"
-  resolved "https://registry.yarnpkg.com/arr-flatten/-/arr-flatten-1.1.0.tgz#36048bbff4e7b47e136644316c99669ea5ae91f1"
-
-arr-union@^2.0.1:
-  version "2.1.0"
-  resolved "https://registry.yarnpkg.com/arr-union/-/arr-union-2.1.0.tgz#20f9eab5ec70f5c7d215b1077b1c39161d292c7d"
-
-arr-union@^3.1.0:
-  version "3.1.0"
-  resolved "https://registry.yarnpkg.com/arr-union/-/arr-union-3.1.0.tgz#e39b09aea9def866a8f206e288af63919bae39c4"
-
-array-differ@^1.0.0:
-  version "1.0.0"
-  resolved "https://registry.yarnpkg.com/array-differ/-/array-differ-1.0.0.tgz#eff52e3758249d33be402b8bb8e564bb2b5d4031"
-
-array-each@^1.0.1:
-  version "1.0.1"
-  resolved "https://registry.yarnpkg.com/array-each/-/array-each-1.0.1.tgz#a794af0c05ab1752846ee753a1f211a05ba0c44f"
-
-array-find-index@^1.0.1:
-  version "1.0.2"
-  resolved "https://registry.yarnpkg.com/array-find-index/-/array-find-index-1.0.2.tgz#df010aa1287e164bbda6f9723b0a96a1ec4187a1"
-
-array-slice@^0.2.3:
-  version "0.2.3"
-  resolved "https://registry.yarnpkg.com/array-slice/-/array-slice-0.2.3.tgz#dd3cfb80ed7973a75117cdac69b0b99ec86186f5"
-
-array-slice@^1.0.0:
-  version "1.1.0"
-  resolved "https://registry.yarnpkg.com/array-slice/-/array-slice-1.1.0.tgz#e368ea15f89bc7069f7ffb89aec3a6c7d4ac22d4"
-
-array-union@^1.0.1:
-  version "1.0.2"
-  resolved "https://registry.yarnpkg.com/array-union/-/array-union-1.0.2.tgz#9a34410e4f4e3da23dea375be5be70f24778ec39"
-  dependencies:
-    array-uniq "^1.0.1"
-
-array-uniq@^1.0.0, array-uniq@^1.0.1, array-uniq@^1.0.2:
-  version "1.0.3"
-  resolved "https://registry.yarnpkg.com/array-uniq/-/array-uniq-1.0.3.tgz#af6ac877a25cc7f74e058894753858dfdb24fdb6"
-
-array-unique@^0.2.1:
-  version "0.2.1"
-  resolved "https://registry.yarnpkg.com/array-unique/-/array-unique-0.2.1.tgz#a1d97ccafcbc2625cc70fadceb36a50c58b01a53"
-
-array-unique@^0.3.2:
-  version "0.3.2"
-  resolved "https://registry.yarnpkg.com/array-unique/-/array-unique-0.3.2.tgz#a894b75d4bc4f6cd679ef3244a9fd8f46ae2d428"
-
-arrify@^1.0.0:
-  version "1.0.1"
-  resolved "https://registry.yarnpkg.com/arrify/-/arrify-1.0.1.tgz#898508da2226f380df904728456849c1501a4b0d"
-
-asn1@~0.2.3:
-  version "0.2.4"
-  resolved "https://registry.yarnpkg.com/asn1/-/asn1-0.2.4.tgz#8d2475dfab553bb33e77b54e59e880bb8ce23136"
-  dependencies:
-    safer-buffer "~2.1.0"
-
-assert-plus@1.0.0, assert-plus@^1.0.0:
-  version "1.0.0"
-  resolved "https://registry.yarnpkg.com/assert-plus/-/assert-plus-1.0.0.tgz#f12e0f3c5d77b0b1cdd9146942e4e96c1e4dd525"
-
-assign-symbols@^1.0.0:
-  version "1.0.0"
-  resolved "https://registry.yarnpkg.com/assign-symbols/-/assign-symbols-1.0.0.tgz#59667f41fadd4f20ccbc2bb96b8d4f7f78ec0367"
-
-async-each-series@^1.1.0:
-  version "1.1.0"
-  resolved "https://registry.yarnpkg.com/async-each-series/-/async-each-series-1.1.0.tgz#f42fd8155d38f21a5b8ea07c28e063ed1700b138"
-
-async-foreach@^0.1.3:
-  version "0.1.3"
-  resolved "https://registry.yarnpkg.com/async-foreach/-/async-foreach-0.1.3.tgz#36121f845c0578172de419a97dbeb1d16ec34542"
-
-async@~1.0.0:
-  version "1.0.0"
-  resolved "https://registry.yarnpkg.com/async/-/async-1.0.0.tgz#f8fc04ca3a13784ade9e1641af98578cfbd647a9"
-
-asynckit@^0.4.0:
-  version "0.4.0"
-  resolved "https://registry.yarnpkg.com/asynckit/-/asynckit-0.4.0.tgz#c79ed97f7f34cb8f2ba1bc9790bcc366474b4b79"
-
-atob@^2.1.1:
-  version "2.1.2"
-  resolved "https://registry.yarnpkg.com/atob/-/atob-2.1.2.tgz#6d9517eb9e030d2436666651e86bd9f6f13533c9"
-
-autoprefixer@^6.0.0, autoprefixer@^6.3.1:
-  version "6.7.7"
-  resolved "https://registry.yarnpkg.com/autoprefixer/-/autoprefixer-6.7.7.tgz#1dbd1c835658e35ce3f9984099db00585c782014"
-  dependencies:
-    browserslist "^1.7.6"
-    caniuse-db "^1.0.30000634"
-    normalize-range "^0.1.2"
-    num2fraction "^1.2.2"
-    postcss "^5.2.16"
-    postcss-value-parser "^3.2.3"
-
-aws-sign2@~0.7.0:
-  version "0.7.0"
-  resolved "https://registry.yarnpkg.com/aws-sign2/-/aws-sign2-0.7.0.tgz#b46e890934a9591f2d2f6f86d7e6a9f1b3fe76a8"
-
-aws4@^1.6.0, aws4@^1.8.0:
-  version "1.8.0"
-  resolved "https://registry.yarnpkg.com/aws4/-/aws4-1.8.0.tgz#f0e003d9ca9e7f59c7a508945d7b2ef9a04a542f"
-
-babel-code-frame@^6.26.0:
-  version "6.26.0"
-  resolved "https://registry.yarnpkg.com/babel-code-frame/-/babel-code-frame-6.26.0.tgz#63fd43f7dc1e3bb7ce35947db8fe369a3f58c74b"
-  dependencies:
-    chalk "^1.1.3"
-    esutils "^2.0.2"
-    js-tokens "^3.0.2"
-
-babel-core@^6.23.1, babel-core@^6.26.0:
-  version "6.26.3"
-  resolved "https://registry.yarnpkg.com/babel-core/-/babel-core-6.26.3.tgz#b2e2f09e342d0f0c88e2f02e067794125e75c207"
-  dependencies:
-    babel-code-frame "^6.26.0"
-    babel-generator "^6.26.0"
-    babel-helpers "^6.24.1"
-    babel-messages "^6.23.0"
-    babel-register "^6.26.0"
-    babel-runtime "^6.26.0"
-    babel-template "^6.26.0"
-    babel-traverse "^6.26.0"
-    babel-types "^6.26.0"
-    babylon "^6.18.0"
-    convert-source-map "^1.5.1"
-    debug "^2.6.9"
-    json5 "^0.5.1"
-    lodash "^4.17.4"
-    minimatch "^3.0.4"
-    path-is-absolute "^1.0.1"
-    private "^0.1.8"
-    slash "^1.0.0"
-    source-map "^0.5.7"
-
-babel-generator@^6.26.0:
-  version "6.26.1"
-  resolved "https://registry.yarnpkg.com/babel-generator/-/babel-generator-6.26.1.tgz#1844408d3b8f0d35a404ea7ac180f087a601bd90"
-  dependencies:
-    babel-messages "^6.23.0"
-    babel-runtime "^6.26.0"
-    babel-types "^6.26.0"
-    detect-indent "^4.0.0"
-    jsesc "^1.3.0"
-    lodash "^4.17.4"
-    source-map "^0.5.7"
-    trim-right "^1.0.1"
-
-babel-helper-bindify-decorators@^6.24.1:
-  version "6.24.1"
-  resolved "https://registry.yarnpkg.com/babel-helper-bindify-decorators/-/babel-helper-bindify-decorators-6.24.1.tgz#14c19e5f142d7b47f19a52431e52b1ccbc40a330"
-  dependencies:
-    babel-runtime "^6.22.0"
-    babel-traverse "^6.24.1"
-    babel-types "^6.24.1"
-
-babel-helper-builder-binary-assignment-operator-visitor@^6.24.1:
-  version "6.24.1"
-  resolved "https://registry.yarnpkg.com/babel-helper-builder-binary-assignment-operator-visitor/-/babel-helper-builder-binary-assignment-operator-visitor-6.24.1.tgz#cce4517ada356f4220bcae8a02c2b346f9a56664"
-  dependencies:
-    babel-helper-explode-assignable-expression "^6.24.1"
-    babel-runtime "^6.22.0"
-    babel-types "^6.24.1"
-
-babel-helper-call-delegate@^6.24.1:
-  version "6.24.1"
-  resolved "https://registry.yarnpkg.com/babel-helper-call-delegate/-/babel-helper-call-delegate-6.24.1.tgz#ece6aacddc76e41c3461f88bfc575bd0daa2df8d"
-  dependencies:
-    babel-helper-hoist-variables "^6.24.1"
-    babel-runtime "^6.22.0"
-    babel-traverse "^6.24.1"
-    babel-types "^6.24.1"
-
-babel-helper-define-map@^6.24.1:
-  version "6.26.0"
-  resolved "https://registry.yarnpkg.com/babel-helper-define-map/-/babel-helper-define-map-6.26.0.tgz#a5f56dab41a25f97ecb498c7ebaca9819f95be5f"
-  dependencies:
-    babel-helper-function-name "^6.24.1"
-    babel-runtime "^6.26.0"
-    babel-types "^6.26.0"
-    lodash "^4.17.4"
-
-babel-helper-explode-assignable-expression@^6.24.1:
-  version "6.24.1"
-  resolved "https://registry.yarnpkg.com/babel-helper-explode-assignable-expression/-/babel-helper-explode-assignable-expression-6.24.1.tgz#f25b82cf7dc10433c55f70592d5746400ac22caa"
-  dependencies:
-    babel-runtime "^6.22.0"
-    babel-traverse "^6.24.1"
-    babel-types "^6.24.1"
-
-babel-helper-explode-class@^6.24.1:
-  version "6.24.1"
-  resolved "https://registry.yarnpkg.com/babel-helper-explode-class/-/babel-helper-explode-class-6.24.1.tgz#7dc2a3910dee007056e1e31d640ced3d54eaa9eb"
-  dependencies:
-    babel-helper-bindify-decorators "^6.24.1"
-    babel-runtime "^6.22.0"
-    babel-traverse "^6.24.1"
-    babel-types "^6.24.1"
-
-babel-helper-function-name@^6.24.1:
-  version "6.24.1"
-  resolved "https://registry.yarnpkg.com/babel-helper-function-name/-/babel-helper-function-name-6.24.1.tgz#d3475b8c03ed98242a25b48351ab18399d3580a9"
-  dependencies:
-    babel-helper-get-function-arity "^6.24.1"
-    babel-runtime "^6.22.0"
-    babel-template "^6.24.1"
-    babel-traverse "^6.24.1"
-    babel-types "^6.24.1"
-
-babel-helper-get-function-arity@^6.24.1:
-  version "6.24.1"
-  resolved "https://registry.yarnpkg.com/babel-helper-get-function-arity/-/babel-helper-get-function-arity-6.24.1.tgz#8f7782aa93407c41d3aa50908f89b031b1b6853d"
-  dependencies:
-    babel-runtime "^6.22.0"
-    babel-types "^6.24.1"
-
-babel-helper-hoist-variables@^6.24.1:
-  version "6.24.1"
-  resolved "https://registry.yarnpkg.com/babel-helper-hoist-variables/-/babel-helper-hoist-variables-6.24.1.tgz#1ecb27689c9d25513eadbc9914a73f5408be7a76"
-  dependencies:
-    babel-runtime "^6.22.0"
-    babel-types "^6.24.1"
-
-babel-helper-optimise-call-expression@^6.24.1:
-  version "6.24.1"
-  resolved "https://registry.yarnpkg.com/babel-helper-optimise-call-expression/-/babel-helper-optimise-call-expression-6.24.1.tgz#f7a13427ba9f73f8f4fa993c54a97882d1244257"
-  dependencies:
-    babel-runtime "^6.22.0"
-    babel-types "^6.24.1"
-
-babel-helper-regex@^6.24.1:
-  version "6.26.0"
-  resolved "https://registry.yarnpkg.com/babel-helper-regex/-/babel-helper-regex-6.26.0.tgz#325c59f902f82f24b74faceed0363954f6495e72"
-  dependencies:
-    babel-runtime "^6.26.0"
-    babel-types "^6.26.0"
-    lodash "^4.17.4"
-
-babel-helper-remap-async-to-generator@^6.24.1:
-  version "6.24.1"
-  resolved "https://registry.yarnpkg.com/babel-helper-remap-async-to-generator/-/babel-helper-remap-async-to-generator-6.24.1.tgz#5ec581827ad723fecdd381f1c928390676e4551b"
-  dependencies:
-    babel-helper-function-name "^6.24.1"
-    babel-runtime "^6.22.0"
-    babel-template "^6.24.1"
-    babel-traverse "^6.24.1"
-    babel-types "^6.24.1"
-
-babel-helper-replace-supers@^6.24.1:
-  version "6.24.1"
-  resolved "https://registry.yarnpkg.com/babel-helper-replace-supers/-/babel-helper-replace-supers-6.24.1.tgz#bf6dbfe43938d17369a213ca8a8bf74b6a90ab1a"
-  dependencies:
-    babel-helper-optimise-call-expression "^6.24.1"
-    babel-messages "^6.23.0"
-    babel-runtime "^6.22.0"
-    babel-template "^6.24.1"
-    babel-traverse "^6.24.1"
-    babel-types "^6.24.1"
-
-babel-helpers@^6.24.1:
-  version "6.24.1"
-  resolved "https://registry.yarnpkg.com/babel-helpers/-/babel-helpers-6.24.1.tgz#3471de9caec388e5c850e597e58a26ddf37602b2"
-  dependencies:
-    babel-runtime "^6.22.0"
-    babel-template "^6.24.1"
-
-babel-messages@^6.23.0:
-  version "6.23.0"
-  resolved "https://registry.yarnpkg.com/babel-messages/-/babel-messages-6.23.0.tgz#f3cdf4703858035b2a2951c6ec5edf6c62f2630e"
-  dependencies:
-    babel-runtime "^6.22.0"
-
-babel-plugin-check-es2015-constants@^6.22.0:
-  version "6.22.0"
-  resolved "https://registry.yarnpkg.com/babel-plugin-check-es2015-constants/-/babel-plugin-check-es2015-constants-6.22.0.tgz#35157b101426fd2ffd3da3f75c7d1e91835bbf8a"
-  dependencies:
-    babel-runtime "^6.22.0"
-
-babel-plugin-syntax-async-functions@^6.8.0:
-  version "6.13.0"
-  resolved "http://registry.npmjs.org/babel-plugin-syntax-async-functions/-/babel-plugin-syntax-async-functions-6.13.0.tgz#cad9cad1191b5ad634bf30ae0872391e0647be95"
-
-babel-plugin-syntax-async-generators@^6.5.0:
-  version "6.13.0"
-  resolved "http://registry.npmjs.org/babel-plugin-syntax-async-generators/-/babel-plugin-syntax-async-generators-6.13.0.tgz#6bc963ebb16eccbae6b92b596eb7f35c342a8b9a"
-
-babel-plugin-syntax-class-properties@^6.8.0:
-  version "6.13.0"
-  resolved "http://registry.npmjs.org/babel-plugin-syntax-class-properties/-/babel-plugin-syntax-class-properties-6.13.0.tgz#d7eb23b79a317f8543962c505b827c7d6cac27de"
-
-babel-plugin-syntax-decorators@^6.13.0:
-  version "6.13.0"
-  resolved "http://registry.npmjs.org/babel-plugin-syntax-decorators/-/babel-plugin-syntax-decorators-6.13.0.tgz#312563b4dbde3cc806cee3e416cceeaddd11ac0b"
-
-babel-plugin-syntax-dynamic-import@^6.18.0:
-  version "6.18.0"
-  resolved "http://registry.npmjs.org/babel-plugin-syntax-dynamic-import/-/babel-plugin-syntax-dynamic-import-6.18.0.tgz#8d6a26229c83745a9982a441051572caa179b1da"
-
-babel-plugin-syntax-exponentiation-operator@^6.8.0:
-  version "6.13.0"
-  resolved "http://registry.npmjs.org/babel-plugin-syntax-exponentiation-operator/-/babel-plugin-syntax-exponentiation-operator-6.13.0.tgz#9ee7e8337290da95288201a6a57f4170317830de"
-
-babel-plugin-syntax-object-rest-spread@^6.8.0:
-  version "6.13.0"
-  resolved "http://registry.npmjs.org/babel-plugin-syntax-object-rest-spread/-/babel-plugin-syntax-object-rest-spread-6.13.0.tgz#fd6536f2bce13836ffa3a5458c4903a597bb3bf5"
-
-babel-plugin-syntax-trailing-function-commas@^6.22.0:
-  version "6.22.0"
-  resolved "https://registry.yarnpkg.com/babel-plugin-syntax-trailing-function-commas/-/babel-plugin-syntax-trailing-function-commas-6.22.0.tgz#ba0360937f8d06e40180a43fe0d5616fff532cf3"
-
-babel-plugin-transform-async-generator-functions@^6.24.1:
-  version "6.24.1"
-  resolved "https://registry.yarnpkg.com/babel-plugin-transform-async-generator-functions/-/babel-plugin-transform-async-generator-functions-6.24.1.tgz#f058900145fd3e9907a6ddf28da59f215258a5db"
-  dependencies:
-    babel-helper-remap-async-to-generator "^6.24.1"
-    babel-plugin-syntax-async-generators "^6.5.0"
-    babel-runtime "^6.22.0"
-
-babel-plugin-transform-async-to-generator@^6.22.0, babel-plugin-transform-async-to-generator@^6.24.1:
-  version "6.24.1"
-  resolved "https://registry.yarnpkg.com/babel-plugin-transform-async-to-generator/-/babel-plugin-transform-async-to-generator-6.24.1.tgz#6536e378aff6cb1d5517ac0e40eb3e9fc8d08761"
-  dependencies:
-    babel-helper-remap-async-to-generator "^6.24.1"
-    babel-plugin-syntax-async-functions "^6.8.0"
-    babel-runtime "^6.22.0"
-
-babel-plugin-transform-class-properties@^6.24.1:
-  version "6.24.1"
-  resolved "https://registry.yarnpkg.com/babel-plugin-transform-class-properties/-/babel-plugin-transform-class-properties-6.24.1.tgz#6a79763ea61d33d36f37b611aa9def81a81b46ac"
-  dependencies:
-    babel-helper-function-name "^6.24.1"
-    babel-plugin-syntax-class-properties "^6.8.0"
-    babel-runtime "^6.22.0"
-    babel-template "^6.24.1"
-
-babel-plugin-transform-decorators@^6.24.1:
-  version "6.24.1"
-  resolved "https://registry.yarnpkg.com/babel-plugin-transform-decorators/-/babel-plugin-transform-decorators-6.24.1.tgz#788013d8f8c6b5222bdf7b344390dfd77569e24d"
-  dependencies:
-    babel-helper-explode-class "^6.24.1"
-    babel-plugin-syntax-decorators "^6.13.0"
-    babel-runtime "^6.22.0"
-    babel-template "^6.24.1"
-    babel-types "^6.24.1"
-
-babel-plugin-transform-es2015-arrow-functions@^6.22.0:
-  version "6.22.0"
-  resolved "https://registry.yarnpkg.com/babel-plugin-transform-es2015-arrow-functions/-/babel-plugin-transform-es2015-arrow-functions-6.22.0.tgz#452692cb711d5f79dc7f85e440ce41b9f244d221"
-  dependencies:
-    babel-runtime "^6.22.0"
-
-babel-plugin-transform-es2015-block-scoped-functions@^6.22.0:
-  version "6.22.0"
-  resolved "https://registry.yarnpkg.com/babel-plugin-transform-es2015-block-scoped-functions/-/babel-plugin-transform-es2015-block-scoped-functions-6.22.0.tgz#bbc51b49f964d70cb8d8e0b94e820246ce3a6141"
-  dependencies:
-    babel-runtime "^6.22.0"
-
-babel-plugin-transform-es2015-block-scoping@^6.23.0, babel-plugin-transform-es2015-block-scoping@^6.24.1:
-  version "6.26.0"
-  resolved "https://registry.yarnpkg.com/babel-plugin-transform-es2015-block-scoping/-/babel-plugin-transform-es2015-block-scoping-6.26.0.tgz#d70f5299c1308d05c12f463813b0a09e73b1895f"
-  dependencies:
-    babel-runtime "^6.26.0"
-    babel-template "^6.26.0"
-    babel-traverse "^6.26.0"
-    babel-types "^6.26.0"
-    lodash "^4.17.4"
-
-babel-plugin-transform-es2015-classes@^6.23.0, babel-plugin-transform-es2015-classes@^6.24.1:
-  version "6.24.1"
-  resolved "https://registry.yarnpkg.com/babel-plugin-transform-es2015-classes/-/babel-plugin-transform-es2015-classes-6.24.1.tgz#5a4c58a50c9c9461e564b4b2a3bfabc97a2584db"
-  dependencies:
-    babel-helper-define-map "^6.24.1"
-    babel-helper-function-name "^6.24.1"
-    babel-helper-optimise-call-expression "^6.24.1"
-    babel-helper-replace-supers "^6.24.1"
-    babel-messages "^6.23.0"
-    babel-runtime "^6.22.0"
-    babel-template "^6.24.1"
-    babel-traverse "^6.24.1"
-    babel-types "^6.24.1"
-
-babel-plugin-transform-es2015-computed-properties@^6.22.0, babel-plugin-transform-es2015-computed-properties@^6.24.1:
-  version "6.24.1"
-  resolved "https://registry.yarnpkg.com/babel-plugin-transform-es2015-computed-properties/-/babel-plugin-transform-es2015-computed-properties-6.24.1.tgz#6fe2a8d16895d5634f4cd999b6d3480a308159b3"
-  dependencies:
-    babel-runtime "^6.22.0"
-    babel-template "^6.24.1"
-
-babel-plugin-transform-es2015-destructuring@^6.22.0, babel-plugin-transform-es2015-destructuring@^6.23.0:
-  version "6.23.0"
-  resolved "https://registry.yarnpkg.com/babel-plugin-transform-es2015-destructuring/-/babel-plugin-transform-es2015-destructuring-6.23.0.tgz#997bb1f1ab967f682d2b0876fe358d60e765c56d"
-  dependencies:
-    babel-runtime "^6.22.0"
-
-babel-plugin-transform-es2015-duplicate-keys@^6.22.0, babel-plugin-transform-es2015-duplicate-keys@^6.24.1:
-  version "6.24.1"
-  resolved "https://registry.yarnpkg.com/babel-plugin-transform-es2015-duplicate-keys/-/babel-plugin-transform-es2015-duplicate-keys-6.24.1.tgz#73eb3d310ca969e3ef9ec91c53741a6f1576423e"
-  dependencies:
-    babel-runtime "^6.22.0"
-    babel-types "^6.24.1"
-
-babel-plugin-transform-es2015-for-of@^6.22.0, babel-plugin-transform-es2015-for-of@^6.23.0:
-  version "6.23.0"
-  resolved "https://registry.yarnpkg.com/babel-plugin-transform-es2015-for-of/-/babel-plugin-transform-es2015-for-of-6.23.0.tgz#f47c95b2b613df1d3ecc2fdb7573623c75248691"
-  dependencies:
-    babel-runtime "^6.22.0"
-
-babel-plugin-transform-es2015-function-name@^6.22.0, babel-plugin-transform-es2015-function-name@^6.24.1:
-  version "6.24.1"
-  resolved "https://registry.yarnpkg.com/babel-plugin-transform-es2015-function-name/-/babel-plugin-transform-es2015-function-name-6.24.1.tgz#834c89853bc36b1af0f3a4c5dbaa94fd8eacaa8b"
-  dependencies:
-    babel-helper-function-name "^6.24.1"
-    babel-runtime "^6.22.0"
-    babel-types "^6.24.1"
-
-babel-plugin-transform-es2015-literals@^6.22.0:
-  version "6.22.0"
-  resolved "https://registry.yarnpkg.com/babel-plugin-transform-es2015-literals/-/babel-plugin-transform-es2015-literals-6.22.0.tgz#4f54a02d6cd66cf915280019a31d31925377ca2e"
-  dependencies:
-    babel-runtime "^6.22.0"
-
-babel-plugin-transform-es2015-modules-amd@^6.22.0, babel-plugin-transform-es2015-modules-amd@^6.24.1:
-  version "6.24.1"
-  resolved "https://registry.yarnpkg.com/babel-plugin-transform-es2015-modules-amd/-/babel-plugin-transform-es2015-modules-amd-6.24.1.tgz#3b3e54017239842d6d19c3011c4bd2f00a00d154"
-  dependencies:
-    babel-plugin-transform-es2015-modules-commonjs "^6.24.1"
-    babel-runtime "^6.22.0"
-    babel-template "^6.24.1"
-
-babel-plugin-transform-es2015-modules-commonjs@^6.23.0, babel-plugin-transform-es2015-modules-commonjs@^6.24.1:
-  version "6.26.2"
-  resolved "https://registry.yarnpkg.com/babel-plugin-transform-es2015-modules-commonjs/-/babel-plugin-transform-es2015-modules-commonjs-6.26.2.tgz#58a793863a9e7ca870bdc5a881117ffac27db6f3"
-  dependencies:
-    babel-plugin-transform-strict-mode "^6.24.1"
-    babel-runtime "^6.26.0"
-    babel-template "^6.26.0"
-    babel-types "^6.26.0"
-
-babel-plugin-transform-es2015-modules-systemjs@^6.23.0, babel-plugin-transform-es2015-modules-systemjs@^6.24.1:
-  version "6.24.1"
-  resolved "https://registry.yarnpkg.com/babel-plugin-transform-es2015-modules-systemjs/-/babel-plugin-transform-es2015-modules-systemjs-6.24.1.tgz#ff89a142b9119a906195f5f106ecf305d9407d23"
-  dependencies:
-    babel-helper-hoist-variables "^6.24.1"
-    babel-runtime "^6.22.0"
-    babel-template "^6.24.1"
-
-babel-plugin-transform-es2015-modules-umd@^6.23.0, babel-plugin-transform-es2015-modules-umd@^6.24.1:
-  version "6.24.1"
-  resolved "https://registry.yarnpkg.com/babel-plugin-transform-es2015-modules-umd/-/babel-plugin-transform-es2015-modules-umd-6.24.1.tgz#ac997e6285cd18ed6176adb607d602344ad38468"
-  dependencies:
-    babel-plugin-transform-es2015-modules-amd "^6.24.1"
-    babel-runtime "^6.22.0"
-    babel-template "^6.24.1"
-
-babel-plugin-transform-es2015-object-super@^6.22.0, babel-plugin-transform-es2015-object-super@^6.24.1:
-  version "6.24.1"
-  resolved "https://registry.yarnpkg.com/babel-plugin-transform-es2015-object-super/-/babel-plugin-transform-es2015-object-super-6.24.1.tgz#24cef69ae21cb83a7f8603dad021f572eb278f8d"
-  dependencies:
-    babel-helper-replace-supers "^6.24.1"
-    babel-runtime "^6.22.0"
-
-babel-plugin-transform-es2015-parameters@^6.23.0, babel-plugin-transform-es2015-parameters@^6.24.1:
-  version "6.24.1"
-  resolved "https://registry.yarnpkg.com/babel-plugin-transform-es2015-parameters/-/babel-plugin-transform-es2015-parameters-6.24.1.tgz#57ac351ab49caf14a97cd13b09f66fdf0a625f2b"
-  dependencies:
-    babel-helper-call-delegate "^6.24.1"
-    babel-helper-get-function-arity "^6.24.1"
-    babel-runtime "^6.22.0"
-    babel-template "^6.24.1"
-    babel-traverse "^6.24.1"
-    babel-types "^6.24.1"
-
-babel-plugin-transform-es2015-shorthand-properties@^6.22.0, babel-plugin-transform-es2015-shorthand-properties@^6.24.1:
-  version "6.24.1"
-  resolved "https://registry.yarnpkg.com/babel-plugin-transform-es2015-shorthand-properties/-/babel-plugin-transform-es2015-shorthand-properties-6.24.1.tgz#24f875d6721c87661bbd99a4622e51f14de38aa0"
-  dependencies:
-    babel-runtime "^6.22.0"
-    babel-types "^6.24.1"
-
-babel-plugin-transform-es2015-spread@^6.22.0:
-  version "6.22.0"
-  resolved "https://registry.yarnpkg.com/babel-plugin-transform-es2015-spread/-/babel-plugin-transform-es2015-spread-6.22.0.tgz#d6d68a99f89aedc4536c81a542e8dd9f1746f8d1"
-  dependencies:
-    babel-runtime "^6.22.0"
-
-babel-plugin-transform-es2015-sticky-regex@^6.22.0, babel-plugin-transform-es2015-sticky-regex@^6.24.1:
-  version "6.24.1"
-  resolved "https://registry.yarnpkg.com/babel-plugin-transform-es2015-sticky-regex/-/babel-plugin-transform-es2015-sticky-regex-6.24.1.tgz#00c1cdb1aca71112cdf0cf6126c2ed6b457ccdbc"
-  dependencies:
-    babel-helper-regex "^6.24.1"
-    babel-runtime "^6.22.0"
-    babel-types "^6.24.1"
-
-babel-plugin-transform-es2015-template-literals@^6.22.0:
-  version "6.22.0"
-  resolved "https://registry.yarnpkg.com/babel-plugin-transform-es2015-template-literals/-/babel-plugin-transform-es2015-template-literals-6.22.0.tgz#a84b3450f7e9f8f1f6839d6d687da84bb1236d8d"
-  dependencies:
-    babel-runtime "^6.22.0"
-
-babel-plugin-transform-es2015-typeof-symbol@^6.22.0, babel-plugin-transform-es2015-typeof-symbol@^6.23.0:
-  version "6.23.0"
-  resolved "https://registry.yarnpkg.com/babel-plugin-transform-es2015-typeof-symbol/-/babel-plugin-transform-es2015-typeof-symbol-6.23.0.tgz#dec09f1cddff94b52ac73d505c84df59dcceb372"
-  dependencies:
-    babel-runtime "^6.22.0"
-
-babel-plugin-transform-es2015-unicode-regex@^6.22.0, babel-plugin-transform-es2015-unicode-regex@^6.24.1:
-  version "6.24.1"
-  resolved "https://registry.yarnpkg.com/babel-plugin-transform-es2015-unicode-regex/-/babel-plugin-transform-es2015-unicode-regex-6.24.1.tgz#d38b12f42ea7323f729387f18a7c5ae1faeb35e9"
-  dependencies:
-    babel-helper-regex "^6.24.1"
-    babel-runtime "^6.22.0"
-    regexpu-core "^2.0.0"
-
-babel-plugin-transform-exponentiation-operator@^6.22.0, babel-plugin-transform-exponentiation-operator@^6.24.1:
-  version "6.24.1"
-  resolved "https://registry.yarnpkg.com/babel-plugin-transform-exponentiation-operator/-/babel-plugin-transform-exponentiation-operator-6.24.1.tgz#2ab0c9c7f3098fa48907772bb813fe41e8de3a0e"
-  dependencies:
-    babel-helper-builder-binary-assignment-operator-visitor "^6.24.1"
-    babel-plugin-syntax-exponentiation-operator "^6.8.0"
-    babel-runtime "^6.22.0"
-
-babel-plugin-transform-object-rest-spread@^6.22.0:
-  version "6.26.0"
-  resolved "https://registry.yarnpkg.com/babel-plugin-transform-object-rest-spread/-/babel-plugin-transform-object-rest-spread-6.26.0.tgz#0f36692d50fef6b7e2d4b3ac1478137a963b7b06"
-  dependencies:
-    babel-plugin-syntax-object-rest-spread "^6.8.0"
-    babel-runtime "^6.26.0"
-
-babel-plugin-transform-regenerator@^6.22.0, babel-plugin-transform-regenerator@^6.24.1:
-  version "6.26.0"
-  resolved "https://registry.yarnpkg.com/babel-plugin-transform-regenerator/-/babel-plugin-transform-regenerator-6.26.0.tgz#e0703696fbde27f0a3efcacf8b4dca2f7b3a8f2f"
-  dependencies:
-    regenerator-transform "^0.10.0"
-
-babel-plugin-transform-strict-mode@^6.24.1:
-  version "6.24.1"
-  resolved "https://registry.yarnpkg.com/babel-plugin-transform-strict-mode/-/babel-plugin-transform-strict-mode-6.24.1.tgz#d5faf7aa578a65bbe591cf5edae04a0c67020758"
-  dependencies:
-    babel-runtime "^6.22.0"
-    babel-types "^6.24.1"
-
-babel-preset-env@^1.4.0:
-  version "1.7.0"
-  resolved "https://registry.yarnpkg.com/babel-preset-env/-/babel-preset-env-1.7.0.tgz#dea79fa4ebeb883cd35dab07e260c1c9c04df77a"
-  dependencies:
-    babel-plugin-check-es2015-constants "^6.22.0"
-    babel-plugin-syntax-trailing-function-commas "^6.22.0"
-    babel-plugin-transform-async-to-generator "^6.22.0"
-    babel-plugin-transform-es2015-arrow-functions "^6.22.0"
-    babel-plugin-transform-es2015-block-scoped-functions "^6.22.0"
-    babel-plugin-transform-es2015-block-scoping "^6.23.0"
-    babel-plugin-transform-es2015-classes "^6.23.0"
-    babel-plugin-transform-es2015-computed-properties "^6.22.0"
-    babel-plugin-transform-es2015-destructuring "^6.23.0"
-    babel-plugin-transform-es2015-duplicate-keys "^6.22.0"
-    babel-plugin-transform-es2015-for-of "^6.23.0"
-    babel-plugin-transform-es2015-function-name "^6.22.0"
-    babel-plugin-transform-es2015-literals "^6.22.0"
-    babel-plugin-transform-es2015-modules-amd "^6.22.0"
-    babel-plugin-transform-es2015-modules-commonjs "^6.23.0"
-    babel-plugin-transform-es2015-modules-systemjs "^6.23.0"
-    babel-plugin-transform-es2015-modules-umd "^6.23.0"
-    babel-plugin-transform-es2015-object-super "^6.22.0"
-    babel-plugin-transform-es2015-parameters "^6.23.0"
-    babel-plugin-transform-es2015-shorthand-properties "^6.22.0"
-    babel-plugin-transform-es2015-spread "^6.22.0"
-    babel-plugin-transform-es2015-sticky-regex "^6.22.0"
-    babel-plugin-transform-es2015-template-literals "^6.22.0"
-    babel-plugin-transform-es2015-typeof-symbol "^6.23.0"
-    babel-plugin-transform-es2015-unicode-regex "^6.22.0"
-    babel-plugin-transform-exponentiation-operator "^6.22.0"
-    babel-plugin-transform-regenerator "^6.22.0"
-    browserslist "^3.2.6"
-    invariant "^2.2.2"
-    semver "^5.3.0"
-
-babel-preset-es2015@^6.24.1:
-  version "6.24.1"
-  resolved "https://registry.yarnpkg.com/babel-preset-es2015/-/babel-preset-es2015-6.24.1.tgz#d44050d6bc2c9feea702aaf38d727a0210538939"
-  dependencies:
-    babel-plugin-check-es2015-constants "^6.22.0"
-    babel-plugin-transform-es2015-arrow-functions "^6.22.0"
-    babel-plugin-transform-es2015-block-scoped-functions "^6.22.0"
-    babel-plugin-transform-es2015-block-scoping "^6.24.1"
-    babel-plugin-transform-es2015-classes "^6.24.1"
-    babel-plugin-transform-es2015-computed-properties "^6.24.1"
-    babel-plugin-transform-es2015-destructuring "^6.22.0"
-    babel-plugin-transform-es2015-duplicate-keys "^6.24.1"
-    babel-plugin-transform-es2015-for-of "^6.22.0"
-    babel-plugin-transform-es2015-function-name "^6.24.1"
-    babel-plugin-transform-es2015-literals "^6.22.0"
-    babel-plugin-transform-es2015-modules-amd "^6.24.1"
-    babel-plugin-transform-es2015-modules-commonjs "^6.24.1"
-    babel-plugin-transform-es2015-modules-systemjs "^6.24.1"
-    babel-plugin-transform-es2015-modules-umd "^6.24.1"
-    babel-plugin-transform-es2015-object-super "^6.24.1"
-    babel-plugin-transform-es2015-parameters "^6.24.1"
-    babel-plugin-transform-es2015-shorthand-properties "^6.24.1"
-    babel-plugin-transform-es2015-spread "^6.22.0"
-    babel-plugin-transform-es2015-sticky-regex "^6.24.1"
-    babel-plugin-transform-es2015-template-literals "^6.22.0"
-    babel-plugin-transform-es2015-typeof-symbol "^6.22.0"
-    babel-plugin-transform-es2015-unicode-regex "^6.24.1"
-    babel-plugin-transform-regenerator "^6.24.1"
-
-babel-preset-stage-2@^6.24.1:
-  version "6.24.1"
-  resolved "https://registry.yarnpkg.com/babel-preset-stage-2/-/babel-preset-stage-2-6.24.1.tgz#d9e2960fb3d71187f0e64eec62bc07767219bdc1"
-  dependencies:
-    babel-plugin-syntax-dynamic-import "^6.18.0"
-    babel-plugin-transform-class-properties "^6.24.1"
-    babel-plugin-transform-decorators "^6.24.1"
-    babel-preset-stage-3 "^6.24.1"
-
-babel-preset-stage-3@^6.24.1:
-  version "6.24.1"
-  resolved "https://registry.yarnpkg.com/babel-preset-stage-3/-/babel-preset-stage-3-6.24.1.tgz#836ada0a9e7a7fa37cb138fb9326f87934a48395"
-  dependencies:
-    babel-plugin-syntax-trailing-function-commas "^6.22.0"
-    babel-plugin-transform-async-generator-functions "^6.24.1"
-    babel-plugin-transform-async-to-generator "^6.24.1"
-    babel-plugin-transform-exponentiation-operator "^6.24.1"
-    babel-plugin-transform-object-rest-spread "^6.22.0"
-
-babel-register@^6.26.0:
-  version "6.26.0"
-  resolved "https://registry.yarnpkg.com/babel-register/-/babel-register-6.26.0.tgz#6ed021173e2fcb486d7acb45c6009a856f647071"
-  dependencies:
-    babel-core "^6.26.0"
-    babel-runtime "^6.26.0"
-    core-js "^2.5.0"
-    home-or-tmp "^2.0.0"
-    lodash "^4.17.4"
-    mkdirp "^0.5.1"
-    source-map-support "^0.4.15"
-
-babel-runtime@^6.18.0, babel-runtime@^6.22.0, babel-runtime@^6.26.0:
-  version "6.26.0"
-  resolved "https://registry.yarnpkg.com/babel-runtime/-/babel-runtime-6.26.0.tgz#965c7058668e82b55d7bfe04ff2337bc8b5647fe"
-  dependencies:
-    core-js "^2.4.0"
-    regenerator-runtime "^0.11.0"
-
-babel-template@^6.24.1, babel-template@^6.26.0:
-  version "6.26.0"
-  resolved "https://registry.yarnpkg.com/babel-template/-/babel-template-6.26.0.tgz#de03e2d16396b069f46dd9fff8521fb1a0e35e02"
-  dependencies:
-    babel-runtime "^6.26.0"
-    babel-traverse "^6.26.0"
-    babel-types "^6.26.0"
-    babylon "^6.18.0"
-    lodash "^4.17.4"
-
-babel-traverse@^6.24.1, babel-traverse@^6.26.0:
-  version "6.26.0"
-  resolved "https://registry.yarnpkg.com/babel-traverse/-/babel-traverse-6.26.0.tgz#46a9cbd7edcc62c8e5c064e2d2d8d0f4035766ee"
-  dependencies:
-    babel-code-frame "^6.26.0"
-    babel-messages "^6.23.0"
-    babel-runtime "^6.26.0"
-    babel-types "^6.26.0"
-    babylon "^6.18.0"
-    debug "^2.6.8"
-    globals "^9.18.0"
-    invariant "^2.2.2"
-    lodash "^4.17.4"
-
-babel-types@^6.19.0, babel-types@^6.24.1, babel-types@^6.26.0:
-  version "6.26.0"
-  resolved "https://registry.yarnpkg.com/babel-types/-/babel-types-6.26.0.tgz#a3b073f94ab49eb6fa55cd65227a334380632497"
-  dependencies:
-    babel-runtime "^6.26.0"
-    esutils "^2.0.2"
-    lodash "^4.17.4"
-    to-fast-properties "^1.0.3"
-
-babylon@^6.18.0:
-  version "6.18.0"
-  resolved "https://registry.yarnpkg.com/babylon/-/babylon-6.18.0.tgz#af2f3b88fa6f5c1e4c634d1a0f8eac4f55b395e3"
-
-balanced-match@^0.4.2:
-  version "0.4.2"
-  resolved "https://registry.yarnpkg.com/balanced-match/-/balanced-match-0.4.2.tgz#cb3f3e3c732dc0f01ee70b403f302e61d7709838"
-
-balanced-match@^1.0.0:
-  version "1.0.0"
-  resolved "https://registry.yarnpkg.com/balanced-match/-/balanced-match-1.0.0.tgz#89b4d199ab2bee49de164ea02b89ce462d71b767"
-
-base@^0.11.1:
-  version "0.11.2"
-  resolved "https://registry.yarnpkg.com/base/-/base-0.11.2.tgz#7bde5ced145b6d551a90db87f83c558b4eb48a8f"
-  dependencies:
-    cache-base "^1.0.1"
-    class-utils "^0.3.5"
-    component-emitter "^1.2.1"
-    define-property "^1.0.0"
-    isobject "^3.0.1"
-    mixin-deep "^1.2.0"
-    pascalcase "^0.1.1"
-
-bcrypt-pbkdf@^1.0.0:
-  version "1.0.2"
-  resolved "https://registry.yarnpkg.com/bcrypt-pbkdf/-/bcrypt-pbkdf-1.0.2.tgz#a4301d389b6a43f9b67ff3ca11a3f6637e360e9e"
-  dependencies:
-    tweetnacl "^0.14.3"
-
-beeper@^1.0.0:
-  version "1.1.1"
-  resolved "https://registry.yarnpkg.com/beeper/-/beeper-1.1.1.tgz#e6d5ea8c5dad001304a70b22638447f69cb2f809"
-
-bin-build@^2.0.0:
-  version "2.2.0"
-  resolved "https://registry.yarnpkg.com/bin-build/-/bin-build-2.2.0.tgz#11f8dd61f70ffcfa2bdcaa5b46f5e8fedd4221cc"
-  dependencies:
-    archive-type "^3.0.1"
-    decompress "^3.0.0"
-    download "^4.1.2"
-    exec-series "^1.0.0"
-    rimraf "^2.2.6"
-    tempfile "^1.0.0"
-    url-regex "^3.0.0"
-
-bin-check@^2.0.0:
-  version "2.0.0"
-  resolved "https://registry.yarnpkg.com/bin-check/-/bin-check-2.0.0.tgz#86f8e6f4253893df60dc316957f5af02acb05930"
-  dependencies:
-    executable "^1.0.0"
-
-bin-version-check@^2.1.0:
-  version "2.1.0"
-  resolved "https://registry.yarnpkg.com/bin-version-check/-/bin-version-check-2.1.0.tgz#e4e5df290b9069f7d111324031efc13fdd11a5b0"
-  dependencies:
-    bin-version "^1.0.0"
-    minimist "^1.1.0"
-    semver "^4.0.3"
-    semver-truncate "^1.0.0"
-
-bin-version@^1.0.0:
-  version "1.0.4"
-  resolved "https://registry.yarnpkg.com/bin-version/-/bin-version-1.0.4.tgz#9eb498ee6fd76f7ab9a7c160436f89579435d78e"
-  dependencies:
-    find-versions "^1.0.0"
-
-bin-wrapper@^3.0.0:
-  version "3.0.2"
-  resolved "https://registry.yarnpkg.com/bin-wrapper/-/bin-wrapper-3.0.2.tgz#67d3306262e4b1a5f2f88ee23464f6a655677aeb"
-  dependencies:
-    bin-check "^2.0.0"
-    bin-version-check "^2.1.0"
-    download "^4.0.0"
-    each-async "^1.1.1"
-    lazy-req "^1.0.0"
-    os-filter-obj "^1.0.0"
-
-bl@^1.0.0:
-  version "1.2.2"
-  resolved "https://registry.yarnpkg.com/bl/-/bl-1.2.2.tgz#a160911717103c07410cef63ef51b397c025af9c"
-  dependencies:
-    readable-stream "^2.3.5"
-    safe-buffer "^5.1.1"
-
-block-stream@*:
-  version "0.0.9"
-  resolved "https://registry.yarnpkg.com/block-stream/-/block-stream-0.0.9.tgz#13ebfe778a03205cfe03751481ebb4b3300c126a"
-  dependencies:
-    inherits "~2.0.0"
-
-bluebird@^3.0.5:
-  version "3.5.2"
-  resolved "https://registry.yarnpkg.com/bluebird/-/bluebird-3.5.2.tgz#1be0908e054a751754549c270489c1505d4ab15a"
-
-body-parser@~1.14.0:
-  version "1.14.2"
-  resolved "https://registry.yarnpkg.com/body-parser/-/body-parser-1.14.2.tgz#1015cb1fe2c443858259581db53332f8d0cf50f9"
-  dependencies:
-    bytes "2.2.0"
-    content-type "~1.0.1"
-    debug "~2.2.0"
-    depd "~1.1.0"
-    http-errors "~1.3.1"
-    iconv-lite "0.4.13"
-    on-finished "~2.3.0"
-    qs "5.2.0"
-    raw-body "~2.1.5"
-    type-is "~1.6.10"
-
-brace-expansion@^1.0.0, brace-expansion@^1.1.7:
-  version "1.1.11"
-  resolved "https://registry.yarnpkg.com/brace-expansion/-/brace-expansion-1.1.11.tgz#3c7fcbf529d87226f3d2f52b966ff5271eb441dd"
-  dependencies:
-    balanced-match "^1.0.0"
-    concat-map "0.0.1"
-
-braces@^1.8.2:
-  version "1.8.5"
-  resolved "https://registry.yarnpkg.com/braces/-/braces-1.8.5.tgz#ba77962e12dff969d6b76711e914b737857bf6a7"
-  dependencies:
-    expand-range "^1.8.1"
-    preserve "^0.2.0"
-    repeat-element "^1.1.2"
-
-braces@^2.3.1:
-  version "2.3.2"
-  resolved "https://registry.yarnpkg.com/braces/-/braces-2.3.2.tgz#5979fd3f14cd531565e5fa2df1abfff1dfaee729"
-  dependencies:
-    arr-flatten "^1.1.0"
-    array-unique "^0.3.2"
-    extend-shallow "^2.0.1"
-    fill-range "^4.0.0"
-    isobject "^3.0.1"
-    repeat-element "^1.1.2"
-    snapdragon "^0.8.1"
-    snapdragon-node "^2.0.1"
-    split-string "^3.0.2"
-    to-regex "^3.0.1"
-
-browserslist@^1.3.6, browserslist@^1.5.2, browserslist@^1.7.6:
-  version "1.7.7"
-  resolved "https://registry.yarnpkg.com/browserslist/-/browserslist-1.7.7.tgz#0bd76704258be829b2398bb50e4b62d1a166b0b9"
-  dependencies:
-    caniuse-db "^1.0.30000639"
-    electron-to-chromium "^1.2.7"
-
-browserslist@^3.2.6:
-  version "3.2.8"
-  resolved "https://registry.yarnpkg.com/browserslist/-/browserslist-3.2.8.tgz#b0005361d6471f0f5952797a76fc985f1f978fc6"
-  dependencies:
-    caniuse-lite "^1.0.30000844"
-    electron-to-chromium "^1.3.47"
-
-buffer-alloc-unsafe@^1.1.0:
-  version "1.1.0"
-  resolved "https://registry.yarnpkg.com/buffer-alloc-unsafe/-/buffer-alloc-unsafe-1.1.0.tgz#bd7dc26ae2972d0eda253be061dba992349c19f0"
-
-buffer-alloc@^1.2.0:
-  version "1.2.0"
-  resolved "https://registry.yarnpkg.com/buffer-alloc/-/buffer-alloc-1.2.0.tgz#890dd90d923a873e08e10e5fd51a57e5b7cce0ec"
-  dependencies:
-    buffer-alloc-unsafe "^1.1.0"
-    buffer-fill "^1.0.0"
-
-buffer-crc32@~0.2.3:
-  version "0.2.13"
-  resolved "https://registry.yarnpkg.com/buffer-crc32/-/buffer-crc32-0.2.13.tgz#0d333e3f00eac50aa1454abd30ef8c2a5d9a7242"
-
-buffer-fill@^1.0.0:
-  version "1.0.0"
-  resolved "https://registry.yarnpkg.com/buffer-fill/-/buffer-fill-1.0.0.tgz#f8f78b76789888ef39f205cd637f68e702122b2c"
-
-buffer-from@^1.0.0:
-  version "1.1.1"
-  resolved "https://registry.yarnpkg.com/buffer-from/-/buffer-from-1.1.1.tgz#32713bc028f75c02fdb710d7c7bcec1f2c6070ef"
-
-buffer-to-vinyl@^1.0.0:
-  version "1.1.0"
-  resolved "https://registry.yarnpkg.com/buffer-to-vinyl/-/buffer-to-vinyl-1.1.0.tgz#00f15faee3ab7a1dda2cde6d9121bffdd07b2262"
-  dependencies:
-    file-type "^3.1.0"
-    readable-stream "^2.0.2"
-    uuid "^2.0.1"
-    vinyl "^1.0.0"
-
-builtin-modules@^1.0.0:
-  version "1.1.1"
-  resolved "https://registry.yarnpkg.com/builtin-modules/-/builtin-modules-1.1.1.tgz#270f076c5a72c02f5b65a47df94c5fe3a278892f"
-
-bytes@2.2.0:
-  version "2.2.0"
-  resolved "https://registry.yarnpkg.com/bytes/-/bytes-2.2.0.tgz#fd35464a403f6f9117c2de3609ecff9cae000588"
-
-bytes@2.4.0:
-  version "2.4.0"
-  resolved "https://registry.yarnpkg.com/bytes/-/bytes-2.4.0.tgz#7d97196f9d5baf7f6935e25985549edd2a6c2339"
-
-cache-base@^1.0.1:
-  version "1.0.1"
-  resolved "https://registry.yarnpkg.com/cache-base/-/cache-base-1.0.1.tgz#0a7f46416831c8b662ee36fe4e7c59d76f666ab2"
-  dependencies:
-    collection-visit "^1.0.0"
-    component-emitter "^1.2.1"
-    get-value "^2.0.6"
-    has-value "^1.0.0"
-    isobject "^3.0.1"
-    set-value "^2.0.0"
-    to-object-path "^0.3.0"
-    union-value "^1.0.0"
-    unset-value "^1.0.0"
-
-cache-swap@^0.3.0:
-  version "0.3.0"
-  resolved "https://registry.yarnpkg.com/cache-swap/-/cache-swap-0.3.0.tgz#1c541aa108a50106f630bdd98fe1dec8ba133f51"
-  dependencies:
-    graceful-fs "^4.1.2"
-    mkdirp "^0.5.1"
-    object-assign "^4.0.1"
-    rimraf "^2.4.0"
-
-camelcase-keys@^2.0.0:
-  version "2.1.0"
-  resolved "https://registry.yarnpkg.com/camelcase-keys/-/camelcase-keys-2.1.0.tgz#308beeaffdf28119051efa1d932213c91b8f92e7"
-  dependencies:
-    camelcase "^2.0.0"
-    map-obj "^1.0.0"
-
-camelcase@^1.0.2:
-  version "1.2.1"
-  resolved "https://registry.yarnpkg.com/camelcase/-/camelcase-1.2.1.tgz#9bb5304d2e0b56698b2c758b08a3eaa9daa58a39"
-
-camelcase@^2.0.0:
-  version "2.1.1"
-  resolved "https://registry.yarnpkg.com/camelcase/-/camelcase-2.1.1.tgz#7c1d16d679a1bbe59ca02cacecfb011e201f5a1f"
-
-camelcase@^3.0.0:
-  version "3.0.0"
-  resolved "https://registry.yarnpkg.com/camelcase/-/camelcase-3.0.0.tgz#32fc4b9fcdaf845fcdf7e73bb97cac2261f0ab0a"
-
-caniuse-api@^1.5.2:
-  version "1.6.1"
-  resolved "https://registry.yarnpkg.com/caniuse-api/-/caniuse-api-1.6.1.tgz#b534e7c734c4f81ec5fbe8aca2ad24354b962c6c"
-  dependencies:
-    browserslist "^1.3.6"
-    caniuse-db "^1.0.30000529"
-    lodash.memoize "^4.1.2"
-    lodash.uniq "^4.5.0"
-
-caniuse-db@^1.0.30000529, caniuse-db@^1.0.30000634, caniuse-db@^1.0.30000639:
-  version "1.0.30000887"
-  resolved "https://registry.yarnpkg.com/caniuse-db/-/caniuse-db-1.0.30000887.tgz#9abf538610e3349870ed525f7062de649cc3c570"
-
-caniuse-lite@^1.0.30000844:
-  version "1.0.30000887"
-  resolved "https://registry.yarnpkg.com/caniuse-lite/-/caniuse-lite-1.0.30000887.tgz#1769458c27bbdcf61b0cb6b5072bb6cd11fd9c23"
-
-capture-stack-trace@^1.0.0:
-  version "1.0.1"
-  resolved "https://registry.yarnpkg.com/capture-stack-trace/-/capture-stack-trace-1.0.1.tgz#a6c0bbe1f38f3aa0b92238ecb6ff42c344d4135d"
-
-caseless@~0.12.0:
-  version "0.12.0"
-  resolved "https://registry.yarnpkg.com/caseless/-/caseless-0.12.0.tgz#1b681c21ff84033c826543090689420d187151dc"
-
-caw@^1.0.1:
-  version "1.2.0"
-  resolved "https://registry.yarnpkg.com/caw/-/caw-1.2.0.tgz#ffb226fe7efc547288dc62ee3e97073c212d1034"
-  dependencies:
-    get-proxy "^1.0.1"
-    is-obj "^1.0.0"
-    object-assign "^3.0.0"
-    tunnel-agent "^0.4.0"
-
-center-align@^0.1.1:
-  version "0.1.3"
-  resolved "https://registry.yarnpkg.com/center-align/-/center-align-0.1.3.tgz#aa0d32629b6ee972200411cbd4461c907bc2b7ad"
-  dependencies:
-    align-text "^0.1.3"
-    lazy-cache "^1.0.3"
-
-chalk@^0.5.0, chalk@^0.5.1:
-  version "0.5.1"
-  resolved "http://registry.npmjs.org/chalk/-/chalk-0.5.1.tgz#663b3a648b68b55d04690d49167aa837858f2174"
-  dependencies:
-    ansi-styles "^1.1.0"
-    escape-string-regexp "^1.0.0"
-    has-ansi "^0.1.0"
-    strip-ansi "^0.3.0"
-    supports-color "^0.2.0"
-
-chalk@^1.0.0, chalk@^1.1.1, chalk@^1.1.3:
-  version "1.1.3"
-  resolved "http://registry.npmjs.org/chalk/-/chalk-1.1.3.tgz#a8115c55e4a702fe4d150abd3872822a7e09fc98"
-  dependencies:
-    ansi-styles "^2.2.1"
-    escape-string-regexp "^1.0.2"
-    has-ansi "^2.0.0"
-    strip-ansi "^3.0.0"
-    supports-color "^2.0.0"
-
-chalk@^2.1.0:
-  version "2.4.1"
-  resolved "https://registry.yarnpkg.com/chalk/-/chalk-2.4.1.tgz#18c49ab16a037b6eb0152cc83e3471338215b66e"
-  dependencies:
-    ansi-styles "^3.2.1"
-    escape-string-regexp "^1.0.5"
-    supports-color "^5.3.0"
-
-clap@^1.0.9:
-  version "1.2.3"
-  resolved "https://registry.yarnpkg.com/clap/-/clap-1.2.3.tgz#4f36745b32008492557f46412d66d50cb99bce51"
-  dependencies:
-    chalk "^1.1.3"
-
-class-utils@^0.3.5:
-  version "0.3.6"
-  resolved "https://registry.yarnpkg.com/class-utils/-/class-utils-0.3.6.tgz#f93369ae8b9a7ce02fd41faad0ca83033190c463"
-  dependencies:
-    arr-union "^3.1.0"
-    define-property "^0.2.5"
-    isobject "^3.0.0"
-    static-extend "^0.1.1"
-
-cli@~1.0.0:
-  version "1.0.1"
-  resolved "https://registry.yarnpkg.com/cli/-/cli-1.0.1.tgz#22817534f24bfa4950c34d532d48ecbc621b8c14"
-  dependencies:
-    exit "0.1.2"
-    glob "^7.1.1"
-
-cliui@^2.1.0:
-  version "2.1.0"
-  resolved "https://registry.yarnpkg.com/cliui/-/cliui-2.1.0.tgz#4b475760ff80264c762c3a1719032e91c7fea0d1"
-  dependencies:
-    center-align "^0.1.1"
-    right-align "^0.1.1"
-    wordwrap "0.0.2"
-
-cliui@^3.2.0:
-  version "3.2.0"
-  resolved "https://registry.yarnpkg.com/cliui/-/cliui-3.2.0.tgz#120601537a916d29940f934da3b48d585a39213d"
-  dependencies:
-    string-width "^1.0.1"
-    strip-ansi "^3.0.1"
-    wrap-ansi "^2.0.0"
-
-clone-buffer@^1.0.0:
-  version "1.0.0"
-  resolved "https://registry.yarnpkg.com/clone-buffer/-/clone-buffer-1.0.0.tgz#e3e25b207ac4e701af721e2cb5a16792cac3dc58"
-
-clone-stats@^0.0.1, clone-stats@~0.0.1:
-  version "0.0.1"
-  resolved "https://registry.yarnpkg.com/clone-stats/-/clone-stats-0.0.1.tgz#b88f94a82cf38b8791d58046ea4029ad88ca99d1"
-
-clone-stats@^1.0.0:
-  version "1.0.0"
-  resolved "https://registry.yarnpkg.com/clone-stats/-/clone-stats-1.0.0.tgz#b3782dff8bb5474e18b9b6bf0fdfe782f8777680"
-
-clone@^0.2.0:
-  version "0.2.0"
-  resolved "https://registry.yarnpkg.com/clone/-/clone-0.2.0.tgz#c6126a90ad4f72dbf5acdb243cc37724fe93fc1f"
-
-clone@^1.0.0, clone@^1.0.2:
-  version "1.0.4"
-  resolved "https://registry.yarnpkg.com/clone/-/clone-1.0.4.tgz#da309cc263df15994c688ca902179ca3c7cd7c7e"
-
-clone@^2.1.1:
-  version "2.1.2"
-  resolved "https://registry.yarnpkg.com/clone/-/clone-2.1.2.tgz#1b7f4b9f591f1e8f83670401600345a02887435f"
-
-cloneable-readable@^1.0.0:
-  version "1.1.2"
-  resolved "https://registry.yarnpkg.com/cloneable-readable/-/cloneable-readable-1.1.2.tgz#d591dee4a8f8bc15da43ce97dceeba13d43e2a65"
-  dependencies:
-    inherits "^2.0.1"
-    process-nextick-args "^2.0.0"
-    readable-stream "^2.3.5"
-
-co@3.1.0:
-  version "3.1.0"
-  resolved "https://registry.yarnpkg.com/co/-/co-3.1.0.tgz#4ea54ea5a08938153185e15210c68d9092bc1b78"
-
-co@^4.6.0:
-  version "4.6.0"
-  resolved "https://registry.yarnpkg.com/co/-/co-4.6.0.tgz#6ea6bdf3d853ae54ccb8e47bfa0bf3f9031fb184"
-
-coa@~1.0.1:
-  version "1.0.4"
-  resolved "https://registry.yarnpkg.com/coa/-/coa-1.0.4.tgz#a9ef153660d6a86a8bdec0289a5c684d217432fd"
-  dependencies:
-    q "^1.1.2"
-
-code-point-at@^1.0.0:
-  version "1.1.0"
-  resolved "https://registry.yarnpkg.com/code-point-at/-/code-point-at-1.1.0.tgz#0d070b4d043a5bea33a2f1a40e2edb3d9a4ccf77"
-
-collection-visit@^1.0.0:
-  version "1.0.0"
-  resolved "https://registry.yarnpkg.com/collection-visit/-/collection-visit-1.0.0.tgz#4bc0373c164bc3291b4d368c829cf1a80a59dca0"
-  dependencies:
-    map-visit "^1.0.0"
-    object-visit "^1.0.0"
-
-color-convert@^1.3.0, color-convert@^1.9.0:
-  version "1.9.3"
-  resolved "https://registry.yarnpkg.com/color-convert/-/color-convert-1.9.3.tgz#bb71850690e1f136567de629d2d5471deda4c1e8"
-  dependencies:
-    color-name "1.1.3"
-
-color-name@1.1.3:
-  version "1.1.3"
-  resolved "https://registry.yarnpkg.com/color-name/-/color-name-1.1.3.tgz#a7d0558bd89c42f795dd42328f740831ca53bc25"
-
-color-name@^1.0.0:
-  version "1.1.4"
-  resolved "https://registry.yarnpkg.com/color-name/-/color-name-1.1.4.tgz#c2a09a87acbde69543de6f63fa3995c826c536a2"
-
-color-string@^0.3.0:
-  version "0.3.0"
-  resolved "https://registry.yarnpkg.com/color-string/-/color-string-0.3.0.tgz#27d46fb67025c5c2fa25993bfbf579e47841b991"
-  dependencies:
-    color-name "^1.0.0"
-
-color-support@^1.1.3:
-  version "1.1.3"
-  resolved "https://registry.yarnpkg.com/color-support/-/color-support-1.1.3.tgz#93834379a1cc9a0c61f82f52f0d04322251bd5a2"
-
-color@^0.11.0:
-  version "0.11.4"
-  resolved "https://registry.yarnpkg.com/color/-/color-0.11.4.tgz#6d7b5c74fb65e841cd48792ad1ed5e07b904d764"
-  dependencies:
-    clone "^1.0.2"
-    color-convert "^1.3.0"
-    color-string "^0.3.0"
-
-colormin@^1.0.5:
-  version "1.1.2"
-  resolved "https://registry.yarnpkg.com/colormin/-/colormin-1.1.2.tgz#ea2f7420a72b96881a38aae59ec124a6f7298133"
-  dependencies:
-    color "^0.11.0"
-    css-color-names "0.0.4"
-    has "^1.0.1"
-
-colors@1.0.x:
-  version "1.0.3"
-  resolved "https://registry.yarnpkg.com/colors/-/colors-1.0.3.tgz#0433f44d809680fdeb60ed260f1b0c262e82a40b"
-
-colors@~1.1.2:
-  version "1.1.2"
-  resolved "https://registry.yarnpkg.com/colors/-/colors-1.1.2.tgz#168a4701756b6a7f51a12ce0c97bfa28c084ed63"
-
-combined-stream@1.0.6:
-  version "1.0.6"
-  resolved "http://registry.npmjs.org/combined-stream/-/combined-stream-1.0.6.tgz#723e7df6e801ac5613113a7e445a9b69cb632818"
-  dependencies:
-    delayed-stream "~1.0.0"
-
-combined-stream@~1.0.5, combined-stream@~1.0.6:
-  version "1.0.7"
-  resolved "https://registry.yarnpkg.com/combined-stream/-/combined-stream-1.0.7.tgz#2d1d24317afb8abe95d6d2c0b07b57813539d828"
-  dependencies:
-    delayed-stream "~1.0.0"
-
-commander@~2.8.1:
-  version "2.8.1"
-  resolved "http://registry.npmjs.org/commander/-/commander-2.8.1.tgz#06be367febfda0c330aa1e2a072d3dc9762425d4"
-  dependencies:
-    graceful-readlink ">= 1.0.0"
-
-component-emitter@^1.2.1:
-  version "1.2.1"
-  resolved "https://registry.yarnpkg.com/component-emitter/-/component-emitter-1.2.1.tgz#137918d6d78283f7df7a6b7c5a63e140e69425e6"
-
-concat-map@0.0.1:
-  version "0.0.1"
-  resolved "https://registry.yarnpkg.com/concat-map/-/concat-map-0.0.1.tgz#d8a96bd77fd68df7793a73036a3ba0d5405d477b"
-
-concat-stream@1.6.2, concat-stream@^1.4.6, concat-stream@^1.4.7:
-  version "1.6.2"
-  resolved "https://registry.yarnpkg.com/concat-stream/-/concat-stream-1.6.2.tgz#904bdf194cd3122fc675c77fc4ac3d4ff0fd1a34"
-  dependencies:
-    buffer-from "^1.0.0"
-    inherits "^2.0.3"
-    readable-stream "^2.2.2"
-    typedarray "^0.0.6"
-
-concat-with-sourcemaps@^1.0.0:
-  version "1.1.0"
-  resolved "https://registry.yarnpkg.com/concat-with-sourcemaps/-/concat-with-sourcemaps-1.1.0.tgz#d4ea93f05ae25790951b99e7b3b09e3908a4082e"
-  dependencies:
-    source-map "^0.6.1"
-
-console-browserify@1.1.x:
-  version "1.1.0"
-  resolved "https://registry.yarnpkg.com/console-browserify/-/console-browserify-1.1.0.tgz#f0241c45730a9fc6323b206dbf38edc741d0bb10"
-  dependencies:
-    date-now "^0.1.4"
-
-console-control-strings@^1.0.0, console-control-strings@~1.1.0:
-  version "1.1.0"
-  resolved "https://registry.yarnpkg.com/console-control-strings/-/console-control-strings-1.1.0.tgz#3d7cf4464db6446ea644bf4b39507f9851008e8e"
-
-console-stream@^0.1.1:
-  version "0.1.1"
-  resolved "https://registry.yarnpkg.com/console-stream/-/console-stream-0.1.1.tgz#a095fe07b20465955f2fafd28b5d72bccd949d44"
-
-content-type@~1.0.1:
-  version "1.0.4"
-  resolved "https://registry.yarnpkg.com/content-type/-/content-type-1.0.4.tgz#e138cc75e040c727b1966fe5e5f8c9aee256fe3b"
-
-convert-source-map@1.X, convert-source-map@^1.1.1, convert-source-map@^1.5.1:
-  version "1.6.0"
-  resolved "https://registry.yarnpkg.com/convert-source-map/-/convert-source-map-1.6.0.tgz#51b537a8c43e0f04dec1993bffcdd504e758ac20"
-  dependencies:
-    safe-buffer "~5.1.1"
-
-copy-descriptor@^0.1.0:
-  version "0.1.1"
-  resolved "https://registry.yarnpkg.com/copy-descriptor/-/copy-descriptor-0.1.1.tgz#676f6eb3c39997c2ee1ac3a924fd6124748f578d"
-
-core-js@^2.4.0, core-js@^2.5.0:
-  version "2.5.7"
-  resolved "https://registry.yarnpkg.com/core-js/-/core-js-2.5.7.tgz#f972608ff0cead68b841a16a932d0b183791814e"
-
-core-util-is@1.0.2, core-util-is@~1.0.0:
-  version "1.0.2"
-  resolved "https://registry.yarnpkg.com/core-util-is/-/core-util-is-1.0.2.tgz#b5fd54220aa2bc5ab57aab7140c940754503c1a7"
-
-create-error-class@^3.0.1:
-  version "3.0.2"
-  resolved "https://registry.yarnpkg.com/create-error-class/-/create-error-class-3.0.2.tgz#06be7abef947a3f14a30fd610671d401bca8b7b6"
-  dependencies:
-    capture-stack-trace "^1.0.0"
-
-cross-spawn@^3.0.0:
-  version "3.0.1"
-  resolved "https://registry.yarnpkg.com/cross-spawn/-/cross-spawn-3.0.1.tgz#1256037ecb9f0c5f79e3d6ef135e30770184b982"
-  dependencies:
-    lru-cache "^4.0.1"
-    which "^1.2.9"
-
-cross-spawn@^5.0.1:
-  version "5.1.0"
-  resolved "https://registry.yarnpkg.com/cross-spawn/-/cross-spawn-5.1.0.tgz#e8bd0efee58fcff6f8f94510a0a554bbfa235449"
-  dependencies:
-    lru-cache "^4.0.1"
-    shebang-command "^1.2.0"
-    which "^1.2.9"
-
-css-color-names@0.0.4:
-  version "0.0.4"
-  resolved "https://registry.yarnpkg.com/css-color-names/-/css-color-names-0.0.4.tgz#808adc2e79cf84738069b646cb20ec27beb629e0"
-
-css@2.X, css@^2.2.1:
-  version "2.2.4"
-  resolved "https://registry.yarnpkg.com/css/-/css-2.2.4.tgz#c646755c73971f2bba6a601e2cf2fd71b1298929"
-  dependencies:
-    inherits "^2.0.3"
-    source-map "^0.6.1"
-    source-map-resolve "^0.5.2"
-    urix "^0.1.0"
-
-cssnano@^3.0.0:
-  version "3.10.0"
-  resolved "http://registry.npmjs.org/cssnano/-/cssnano-3.10.0.tgz#4f38f6cea2b9b17fa01490f23f1dc68ea65c1c38"
-  dependencies:
-    autoprefixer "^6.3.1"
-    decamelize "^1.1.2"
-    defined "^1.0.0"
-    has "^1.0.1"
-    object-assign "^4.0.1"
-    postcss "^5.0.14"
-    postcss-calc "^5.2.0"
-    postcss-colormin "^2.1.8"
-    postcss-convert-values "^2.3.4"
-    postcss-discard-comments "^2.0.4"
-    postcss-discard-duplicates "^2.0.1"
-    postcss-discard-empty "^2.0.1"
-    postcss-discard-overridden "^0.1.1"
-    postcss-discard-unused "^2.2.1"
-    postcss-filter-plugins "^2.0.0"
-    postcss-merge-idents "^2.1.5"
-    postcss-merge-longhand "^2.0.1"
-    postcss-merge-rules "^2.0.3"
-    postcss-minify-font-values "^1.0.2"
-    postcss-minify-gradients "^1.0.1"
-    postcss-minify-params "^1.0.4"
-    postcss-minify-selectors "^2.0.4"
-    postcss-normalize-charset "^1.1.0"
-    postcss-normalize-url "^3.0.7"
-    postcss-ordered-values "^2.1.0"
-    postcss-reduce-idents "^2.2.2"
-    postcss-reduce-initial "^1.0.0"
-    postcss-reduce-transforms "^1.0.3"
-    postcss-svgo "^2.1.1"
-    postcss-unique-selectors "^2.0.2"
-    postcss-value-parser "^3.2.3"
-    postcss-zindex "^2.0.1"
-
-csso@~2.3.1:
-  version "2.3.2"
-  resolved "https://registry.yarnpkg.com/csso/-/csso-2.3.2.tgz#ddd52c587033f49e94b71fc55569f252e8ff5f85"
-  dependencies:
-    clap "^1.0.9"
-    source-map "^0.5.3"
-
-currently-unhandled@^0.4.1:
-  version "0.4.1"
-  resolved "https://registry.yarnpkg.com/currently-unhandled/-/currently-unhandled-0.4.1.tgz#988df33feab191ef799a61369dd76c17adf957ea"
-  dependencies:
-    array-find-index "^1.0.1"
-
-cycle@1.0.x:
-  version "1.0.3"
-  resolved "https://registry.yarnpkg.com/cycle/-/cycle-1.0.3.tgz#21e80b2be8580f98b468f379430662b046c34ad2"
-
-d@1:
-  version "1.0.0"
-  resolved "https://registry.yarnpkg.com/d/-/d-1.0.0.tgz#754bb5bfe55451da69a58b94d45f4c5b0462d58f"
-  dependencies:
-    es5-ext "^0.10.9"
-
-dashdash@^1.12.0:
-  version "1.14.1"
-  resolved "https://registry.yarnpkg.com/dashdash/-/dashdash-1.14.1.tgz#853cfa0f7cbe2fed5de20326b8dd581035f6e2f0"
-  dependencies:
-    assert-plus "^1.0.0"
-
-date-now@^0.1.4:
-  version "0.1.4"
-  resolved "https://registry.yarnpkg.com/date-now/-/date-now-0.1.4.tgz#eaf439fd4d4848ad74e5cc7dbef200672b9e345b"
-
-dateformat@^1.0.7-1.2.3:
-  version "1.0.12"
-  resolved "https://registry.yarnpkg.com/dateformat/-/dateformat-1.0.12.tgz#9f124b67594c937ff706932e4a642cca8dbbfee9"
-  dependencies:
-    get-stdin "^4.0.1"
-    meow "^3.3.0"
-
-dateformat@^2.0.0:
-  version "2.2.0"
-  resolved "https://registry.yarnpkg.com/dateformat/-/dateformat-2.2.0.tgz#4065e2013cf9fb916ddfd82efb506ad4c6769062"
-
-debug-fabulous@1.X:
-  version "1.1.0"
-  resolved "https://registry.yarnpkg.com/debug-fabulous/-/debug-fabulous-1.1.0.tgz#af8a08632465224ef4174a9f06308c3c2a1ebc8e"
-  dependencies:
-    debug "3.X"
-    memoizee "0.4.X"
-    object-assign "4.X"
-
-debug@2.6.9, debug@^2.1.0, debug@^2.2.0, debug@^2.3.3, debug@^2.6.8, debug@^2.6.9:
-  version "2.6.9"
-  resolved "https://registry.yarnpkg.com/debug/-/debug-2.6.9.tgz#5d128515df134ff327e90a4c93f4e077a536341f"
-  dependencies:
-    ms "2.0.0"
-
-debug@3.X:
-  version "3.2.5"
-  resolved "https://registry.yarnpkg.com/debug/-/debug-3.2.5.tgz#c2418fbfd7a29f4d4f70ff4cea604d4b64c46407"
-  dependencies:
-    ms "^2.1.1"
-
-debug@~2.2.0:
-  version "2.2.0"
-  resolved "http://registry.npmjs.org/debug/-/debug-2.2.0.tgz#f87057e995b1a1f6ae6a4960664137bc56f039da"
-  dependencies:
-    ms "0.7.1"
-
-decamelize@^1.0.0, decamelize@^1.1.1, decamelize@^1.1.2:
-  version "1.2.0"
-  resolved "https://registry.yarnpkg.com/decamelize/-/decamelize-1.2.0.tgz#f6534d15148269b20352e7bee26f501f9a191290"
-
-decode-uri-component@^0.2.0:
-  version "0.2.0"
-  resolved "https://registry.yarnpkg.com/decode-uri-component/-/decode-uri-component-0.2.0.tgz#eb3913333458775cb84cd1a1fae062106bb87545"
-
-decompress-tar@^3.0.0:
-  version "3.1.0"
-  resolved "https://registry.yarnpkg.com/decompress-tar/-/decompress-tar-3.1.0.tgz#217c789f9b94450efaadc5c5e537978fc333c466"
-  dependencies:
-    is-tar "^1.0.0"
-    object-assign "^2.0.0"
-    strip-dirs "^1.0.0"
-    tar-stream "^1.1.1"
-    through2 "^0.6.1"
-    vinyl "^0.4.3"
-
-decompress-tarbz2@^3.0.0:
-  version "3.1.0"
-  resolved "https://registry.yarnpkg.com/decompress-tarbz2/-/decompress-tarbz2-3.1.0.tgz#8b23935681355f9f189d87256a0f8bdd96d9666d"
-  dependencies:
-    is-bzip2 "^1.0.0"
-    object-assign "^2.0.0"
-    seek-bzip "^1.0.3"
-    strip-dirs "^1.0.0"
-    tar-stream "^1.1.1"
-    through2 "^0.6.1"
-    vinyl "^0.4.3"
-
-decompress-targz@^3.0.0:
-  version "3.1.0"
-  resolved "https://registry.yarnpkg.com/decompress-targz/-/decompress-targz-3.1.0.tgz#b2c13df98166268991b715d6447f642e9696f5a0"
-  dependencies:
-    is-gzip "^1.0.0"
-    object-assign "^2.0.0"
-    strip-dirs "^1.0.0"
-    tar-stream "^1.1.1"
-    through2 "^0.6.1"
-    vinyl "^0.4.3"
-
-decompress-unzip@^3.0.0:
-  version "3.4.0"
-  resolved "https://registry.yarnpkg.com/decompress-unzip/-/decompress-unzip-3.4.0.tgz#61475b4152066bbe3fee12f9d629d15fe6478eeb"
-  dependencies:
-    is-zip "^1.0.0"
-    read-all-stream "^3.0.0"
-    stat-mode "^0.2.0"
-    strip-dirs "^1.0.0"
-    through2 "^2.0.0"
-    vinyl "^1.0.0"
-    yauzl "^2.2.1"
-
-decompress@^3.0.0:
-  version "3.0.0"
-  resolved "https://registry.yarnpkg.com/decompress/-/decompress-3.0.0.tgz#af1dd50d06e3bfc432461d37de11b38c0d991bed"
-  dependencies:
-    buffer-to-vinyl "^1.0.0"
-    concat-stream "^1.4.6"
-    decompress-tar "^3.0.0"
-    decompress-tarbz2 "^3.0.0"
-    decompress-targz "^3.0.0"
-    decompress-unzip "^3.0.0"
-    stream-combiner2 "^1.1.1"
-    vinyl-assign "^1.0.1"
-    vinyl-fs "^2.2.0"
-
-deep-extend@^0.6.0:
-  version "0.6.0"
-  resolved "https://registry.yarnpkg.com/deep-extend/-/deep-extend-0.6.0.tgz#c4fa7c95404a17a9c3e8ca7e1537312b736330ac"
-
-defaults@^1.0.0:
-  version "1.0.3"
-  resolved "https://registry.yarnpkg.com/defaults/-/defaults-1.0.3.tgz#c656051e9817d9ff08ed881477f3fe4019f3ef7d"
-  dependencies:
-    clone "^1.0.2"
-
-define-property@^0.2.5:
-  version "0.2.5"
-  resolved "https://registry.yarnpkg.com/define-property/-/define-property-0.2.5.tgz#c35b1ef918ec3c990f9a5bc57be04aacec5c8116"
-  dependencies:
-    is-descriptor "^0.1.0"
-
-define-property@^1.0.0:
-  version "1.0.0"
-  resolved "https://registry.yarnpkg.com/define-property/-/define-property-1.0.0.tgz#769ebaaf3f4a63aad3af9e8d304c9bbe79bfb0e6"
-  dependencies:
-    is-descriptor "^1.0.0"
-
-define-property@^2.0.2:
-  version "2.0.2"
-  resolved "https://registry.yarnpkg.com/define-property/-/define-property-2.0.2.tgz#d459689e8d654ba77e02a817f8710d702cb16e9d"
-  dependencies:
-    is-descriptor "^1.0.2"
-    isobject "^3.0.1"
-
-defined@^1.0.0:
-  version "1.0.0"
-  resolved "https://registry.yarnpkg.com/defined/-/defined-1.0.0.tgz#c98d9bcef75674188e110969151199e39b1fa693"
-
-del@^2.2.2:
-  version "2.2.2"
-  resolved "https://registry.yarnpkg.com/del/-/del-2.2.2.tgz#c12c981d067846c84bcaf862cff930d907ffd1a8"
-  dependencies:
-    globby "^5.0.0"
-    is-path-cwd "^1.0.0"
-    is-path-in-cwd "^1.0.0"
-    object-assign "^4.0.1"
-    pify "^2.0.0"
-    pinkie-promise "^2.0.0"
-    rimraf "^2.2.8"
-
-delayed-stream@~1.0.0:
-  version "1.0.0"
-  resolved "https://registry.yarnpkg.com/delayed-stream/-/delayed-stream-1.0.0.tgz#df3ae199acadfb7d440aaae0b29e2272b24ec619"
-
-delegates@^1.0.0:
-  version "1.0.0"
-  resolved "https://registry.yarnpkg.com/delegates/-/delegates-1.0.0.tgz#84c6e159b81904fdca59a0ef44cd870d31250f9a"
-
-depd@~1.1.0:
-  version "1.1.2"
-  resolved "https://registry.yarnpkg.com/depd/-/depd-1.1.2.tgz#9bcd52e14c097763e749b274c4346ed2e560b5a9"
-
-deprecated@^0.0.1:
-  version "0.0.1"
-  resolved "https://registry.yarnpkg.com/deprecated/-/deprecated-0.0.1.tgz#f9c9af5464afa1e7a971458a8bdef2aa94d5bb19"
-
-detect-file@^1.0.0:
-  version "1.0.0"
-  resolved "https://registry.yarnpkg.com/detect-file/-/detect-file-1.0.0.tgz#f0d66d03672a825cb1b73bdb3fe62310c8e552b7"
-
-detect-indent@^4.0.0:
-  version "4.0.0"
-  resolved "https://registry.yarnpkg.com/detect-indent/-/detect-indent-4.0.0.tgz#f76d064352cdf43a1cb6ce619c4ee3a9475de208"
-  dependencies:
-    repeating "^2.0.0"
-
-detect-newline@2.X:
-  version "2.1.0"
-  resolved "https://registry.yarnpkg.com/detect-newline/-/detect-newline-2.1.0.tgz#f41f1c10be4b00e87b5f13da680759f2c5bfd3e2"
-
-dom-serializer@0:
-  version "0.1.0"
-  resolved "https://registry.yarnpkg.com/dom-serializer/-/dom-serializer-0.1.0.tgz#073c697546ce0780ce23be4a28e293e40bc30c82"
-  dependencies:
-    domelementtype "~1.1.1"
-    entities "~1.1.1"
-
-domelementtype@1:
-  version "1.3.0"
-  resolved "https://registry.yarnpkg.com/domelementtype/-/domelementtype-1.3.0.tgz#b17aed82e8ab59e52dd9c19b1756e0fc187204c2"
-
-domelementtype@~1.1.1:
-  version "1.1.3"
-  resolved "https://registry.yarnpkg.com/domelementtype/-/domelementtype-1.1.3.tgz#bd28773e2642881aec51544924299c5cd822185b"
-
-domhandler@2.3:
-  version "2.3.0"
-  resolved "https://registry.yarnpkg.com/domhandler/-/domhandler-2.3.0.tgz#2de59a0822d5027fabff6f032c2b25a2a8abe738"
-  dependencies:
-    domelementtype "1"
-
-domutils@1.5:
-  version "1.5.1"
-  resolved "https://registry.yarnpkg.com/domutils/-/domutils-1.5.1.tgz#dcd8488a26f563d61079e48c9f7b7e32373682cf"
-  dependencies:
-    dom-serializer "0"
-    domelementtype "1"
-
-download@^4.0.0, download@^4.1.2:
-  version "4.4.3"
-  resolved "https://registry.yarnpkg.com/download/-/download-4.4.3.tgz#aa55fdad392d95d4b68e8c2be03e0c2aa21ba9ac"
-  dependencies:
-    caw "^1.0.1"
-    concat-stream "^1.4.7"
-    each-async "^1.0.0"
-    filenamify "^1.0.1"
-    got "^5.0.0"
-    gulp-decompress "^1.2.0"
-    gulp-rename "^1.2.0"
-    is-url "^1.2.0"
-    object-assign "^4.0.1"
-    read-all-stream "^3.0.0"
-    readable-stream "^2.0.2"
-    stream-combiner2 "^1.1.1"
-    vinyl "^1.0.0"
-    vinyl-fs "^2.2.0"
-    ware "^1.2.0"
-
-duplexer2@0.0.2:
-  version "0.0.2"
-  resolved "https://registry.yarnpkg.com/duplexer2/-/duplexer2-0.0.2.tgz#c614dcf67e2fb14995a91711e5a617e8a60a31db"
-  dependencies:
-    readable-stream "~1.1.9"
-
-duplexer2@^0.1.4, duplexer2@~0.1.0:
-  version "0.1.4"
-  resolved "https://registry.yarnpkg.com/duplexer2/-/duplexer2-0.1.4.tgz#8b12dab878c0d69e3e7891051662a32fc6bddcc1"
-  dependencies:
-    readable-stream "^2.0.2"
-
-duplexer@^0.1.1, duplexer@~0.1.1:
-  version "0.1.1"
-  resolved "http://registry.npmjs.org/duplexer/-/duplexer-0.1.1.tgz#ace6ff808c1ce66b57d1ebf97977acb02334cfc1"
-
-duplexify@^3.2.0:
-  version "3.6.0"
-  resolved "https://registry.yarnpkg.com/duplexify/-/duplexify-3.6.0.tgz#592903f5d80b38d037220541264d69a198fb3410"
-  dependencies:
-    end-of-stream "^1.0.0"
-    inherits "^2.0.1"
-    readable-stream "^2.0.0"
-    stream-shift "^1.0.0"
-
-each-async@^1.0.0, each-async@^1.1.1:
-  version "1.1.1"
-  resolved "https://registry.yarnpkg.com/each-async/-/each-async-1.1.1.tgz#dee5229bdf0ab6ba2012a395e1b869abf8813473"
-  dependencies:
-    onetime "^1.0.0"
-    set-immediate-shim "^1.0.0"
-
-ecc-jsbn@~0.1.1:
-  version "0.1.2"
-  resolved "https://registry.yarnpkg.com/ecc-jsbn/-/ecc-jsbn-0.1.2.tgz#3a83a904e54353287874c564b7549386849a98c9"
-  dependencies:
-    jsbn "~0.1.0"
-    safer-buffer "^2.1.0"
-
-ee-first@1.1.1:
-  version "1.1.1"
-  resolved "https://registry.yarnpkg.com/ee-first/-/ee-first-1.1.1.tgz#590c61156b0ae2f4f0255732a158b266bc56b21d"
-
-electron-to-chromium@^1.2.7, electron-to-chromium@^1.3.47:
-  version "1.3.71"
-  resolved "https://registry.yarnpkg.com/electron-to-chromium/-/electron-to-chromium-1.3.71.tgz#baecb282e8b27247bbfcf2f3e0254d6fe9a76789"
-
-end-of-stream@^1.0.0:
-  version "1.4.1"
-  resolved "https://registry.yarnpkg.com/end-of-stream/-/end-of-stream-1.4.1.tgz#ed29634d19baba463b6ce6b80a37213eab71ec43"
-  dependencies:
-    once "^1.4.0"
-
-end-of-stream@~0.1.5:
-  version "0.1.5"
-  resolved "https://registry.yarnpkg.com/end-of-stream/-/end-of-stream-0.1.5.tgz#8e177206c3c80837d85632e8b9359dfe8b2f6eaf"
-  dependencies:
-    once "~1.3.0"
-
-entities@1.0:
-  version "1.0.0"
-  resolved "https://registry.yarnpkg.com/entities/-/entities-1.0.0.tgz#b2987aa3821347fcde642b24fdfc9e4fb712bf26"
-
-entities@~1.1.1:
-  version "1.1.1"
-  resolved "https://registry.yarnpkg.com/entities/-/entities-1.1.1.tgz#6e5c2d0a5621b5dadaecef80b90edfb5cd7772f0"
-
-error-ex@^1.2.0:
-  version "1.3.2"
-  resolved "https://registry.yarnpkg.com/error-ex/-/error-ex-1.3.2.tgz#b4ac40648107fdcdcfae242f428bea8a14d4f1bf"
-  dependencies:
-    is-arrayish "^0.2.1"
-
-es5-ext@^0.10.14, es5-ext@^0.10.35, es5-ext@^0.10.45, es5-ext@^0.10.9, es5-ext@~0.10.14, es5-ext@~0.10.2:
-  version "0.10.46"
-  resolved "https://registry.yarnpkg.com/es5-ext/-/es5-ext-0.10.46.tgz#efd99f67c5a7ec789baa3daa7f79870388f7f572"
-  dependencies:
-    es6-iterator "~2.0.3"
-    es6-symbol "~3.1.1"
-    next-tick "1"
-
-es6-iterator@^2.0.1, es6-iterator@~2.0.3:
-  version "2.0.3"
-  resolved "https://registry.yarnpkg.com/es6-iterator/-/es6-iterator-2.0.3.tgz#a7de889141a05a94b0854403b2d0a0fbfa98f3b7"
-  dependencies:
-    d "1"
-    es5-ext "^0.10.35"
-    es6-symbol "^3.1.1"
-
-es6-promise@^4.0.3:
-  version "4.2.5"
-  resolved "https://registry.yarnpkg.com/es6-promise/-/es6-promise-4.2.5.tgz#da6d0d5692efb461e082c14817fe2427d8f5d054"
-
-es6-symbol@^3.1.1, es6-symbol@~3.1.1:
-  version "3.1.1"
-  resolved "https://registry.yarnpkg.com/es6-symbol/-/es6-symbol-3.1.1.tgz#bf00ef4fdab6ba1b46ecb7b629b4c7ed5715cc77"
-  dependencies:
-    d "1"
-    es5-ext "~0.10.14"
-
-es6-weak-map@^2.0.2:
-  version "2.0.2"
-  resolved "https://registry.yarnpkg.com/es6-weak-map/-/es6-weak-map-2.0.2.tgz#5e3ab32251ffd1538a1f8e5ffa1357772f92d96f"
-  dependencies:
-    d "1"
-    es5-ext "^0.10.14"
-    es6-iterator "^2.0.1"
-    es6-symbol "^3.1.1"
-
-escape-string-regexp@^1.0.0, escape-string-regexp@^1.0.2, escape-string-regexp@^1.0.5:
-  version "1.0.5"
-  resolved "https://registry.yarnpkg.com/escape-string-regexp/-/escape-string-regexp-1.0.5.tgz#1b61c0562190a8dff6ae3bb2cf0200ca130b86d4"
-
-esprima@^2.6.0:
-  version "2.7.3"
-  resolved "https://registry.yarnpkg.com/esprima/-/esprima-2.7.3.tgz#96e3b70d5779f6ad49cd032673d1c312767ba581"
-
-esutils@^2.0.2:
-  version "2.0.2"
-  resolved "https://registry.yarnpkg.com/esutils/-/esutils-2.0.2.tgz#0abf4f1caa5bcb1f7a9d8acc6dea4faaa04bac9b"
-
-event-emitter@^0.3.5:
-  version "0.3.5"
-  resolved "https://registry.yarnpkg.com/event-emitter/-/event-emitter-0.3.5.tgz#df8c69eef1647923c7157b9ce83840610b02cc39"
-  dependencies:
-    d "1"
-    es5-ext "~0.10.14"
-
-event-stream@^3.1.7:
-  version "3.3.6"
-  resolved "https://registry.yarnpkg.com/event-stream/-/event-stream-3.3.6.tgz#cac1230890e07e73ec9cacd038f60a5b66173eef"
-  dependencies:
-    duplexer "^0.1.1"
-    flatmap-stream "^0.1.0"
-    from "^0.1.7"
-    map-stream "0.0.7"
-    pause-stream "^0.0.11"
-    split "^1.0.1"
-    stream-combiner "^0.2.2"
-    through "^2.3.8"
-
-event-stream@~3.1.0:
-  version "3.1.7"
-  resolved "http://registry.npmjs.org/event-stream/-/event-stream-3.1.7.tgz#b4c540012d0fe1498420f3d8946008db6393c37a"
-  dependencies:
-    duplexer "~0.1.1"
-    from "~0"
-    map-stream "~0.1.0"
-    pause-stream "0.0.11"
-    split "0.2"
-    stream-combiner "~0.0.4"
-    through "~2.3.1"
-
-exec-buffer@^3.0.0:
-  version "3.2.0"
-  resolved "https://registry.yarnpkg.com/exec-buffer/-/exec-buffer-3.2.0.tgz#b1686dbd904c7cf982e652c1f5a79b1e5573082b"
-  dependencies:
-    execa "^0.7.0"
-    p-finally "^1.0.0"
-    pify "^3.0.0"
-    rimraf "^2.5.4"
-    tempfile "^2.0.0"
-
-exec-series@^1.0.0:
-  version "1.0.3"
-  resolved "https://registry.yarnpkg.com/exec-series/-/exec-series-1.0.3.tgz#6d257a9beac482a872c7783bc8615839fc77143a"
-  dependencies:
-    async-each-series "^1.1.0"
-    object-assign "^4.1.0"
-
-execa@^0.7.0:
-  version "0.7.0"
-  resolved "https://registry.yarnpkg.com/execa/-/execa-0.7.0.tgz#944becd34cc41ee32a63a9faf27ad5a65fc59777"
-  dependencies:
-    cross-spawn "^5.0.1"
-    get-stream "^3.0.0"
-    is-stream "^1.1.0"
-    npm-run-path "^2.0.0"
-    p-finally "^1.0.0"
-    signal-exit "^3.0.0"
-    strip-eof "^1.0.0"
-
-executable@^1.0.0:
-  version "1.1.0"
-  resolved "https://registry.yarnpkg.com/executable/-/executable-1.1.0.tgz#877980e9112f3391066da37265de7ad8434ab4d9"
-  dependencies:
-    meow "^3.1.0"
-
-exit@0.1.2, exit@0.1.x:
-  version "0.1.2"
-  resolved "https://registry.yarnpkg.com/exit/-/exit-0.1.2.tgz#0632638f8d877cc82107d30a0fff1a17cba1cd0c"
-
-expand-brackets@^0.1.4:
-  version "0.1.5"
-  resolved "https://registry.yarnpkg.com/expand-brackets/-/expand-brackets-0.1.5.tgz#df07284e342a807cd733ac5af72411e581d1177b"
-  dependencies:
-    is-posix-bracket "^0.1.0"
-
-expand-brackets@^2.1.4:
-  version "2.1.4"
-  resolved "https://registry.yarnpkg.com/expand-brackets/-/expand-brackets-2.1.4.tgz#b77735e315ce30f6b6eff0f83b04151a22449622"
-  dependencies:
-    debug "^2.3.3"
-    define-property "^0.2.5"
-    extend-shallow "^2.0.1"
-    posix-character-classes "^0.1.0"
-    regex-not "^1.0.0"
-    snapdragon "^0.8.1"
-    to-regex "^3.0.1"
-
-expand-range@^1.8.1:
-  version "1.8.2"
-  resolved "https://registry.yarnpkg.com/expand-range/-/expand-range-1.8.2.tgz#a299effd335fe2721ebae8e257ec79644fc85337"
-  dependencies:
-    fill-range "^2.1.0"
-
-expand-tilde@^2.0.0, expand-tilde@^2.0.2:
-  version "2.0.2"
-  resolved "https://registry.yarnpkg.com/expand-tilde/-/expand-tilde-2.0.2.tgz#97e801aa052df02454de46b02bf621642cdc8502"
-  dependencies:
-    homedir-polyfill "^1.0.1"
-
-extend-shallow@^1.1.2:
-  version "1.1.4"
-  resolved "https://registry.yarnpkg.com/extend-shallow/-/extend-shallow-1.1.4.tgz#19d6bf94dfc09d76ba711f39b872d21ff4dd9071"
-  dependencies:
-    kind-of "^1.1.0"
-
-extend-shallow@^2.0.1:
-  version "2.0.1"
-  resolved "https://registry.yarnpkg.com/extend-shallow/-/extend-shallow-2.0.1.tgz#51af7d614ad9a9f610ea1bafbb989d6b1c56890f"
-  dependencies:
-    is-extendable "^0.1.0"
-
-extend-shallow@^3.0.0, extend-shallow@^3.0.2:
-  version "3.0.2"
-  resolved "https://registry.yarnpkg.com/extend-shallow/-/extend-shallow-3.0.2.tgz#26a71aaf073b39fb2127172746131c2704028db8"
-  dependencies:
-    assign-symbols "^1.0.0"
-    is-extendable "^1.0.1"
-
-extend@^3.0.0, extend@~3.0.1, extend@~3.0.2:
-  version "3.0.2"
-  resolved "https://registry.yarnpkg.com/extend/-/extend-3.0.2.tgz#f8b1136b4071fbd8eb140aff858b1019ec2915fa"
-
-extglob@^0.3.1:
-  version "0.3.2"
-  resolved "https://registry.yarnpkg.com/extglob/-/extglob-0.3.2.tgz#2e18ff3d2f49ab2765cec9023f011daa8d8349a1"
-  dependencies:
-    is-extglob "^1.0.0"
-
-extglob@^2.0.4:
-  version "2.0.4"
-  resolved "https://registry.yarnpkg.com/extglob/-/extglob-2.0.4.tgz#ad00fe4dc612a9232e8718711dc5cb5ab0285543"
-  dependencies:
-    array-unique "^0.3.2"
-    define-property "^1.0.0"
-    expand-brackets "^2.1.4"
-    extend-shallow "^2.0.1"
-    fragment-cache "^0.2.1"
-    regex-not "^1.0.0"
-    snapdragon "^0.8.1"
-    to-regex "^3.0.1"
-
-extract-zip@^1.6.5:
-  version "1.6.7"
-  resolved "https://registry.yarnpkg.com/extract-zip/-/extract-zip-1.6.7.tgz#a840b4b8af6403264c8db57f4f1a74333ef81fe9"
-  dependencies:
-    concat-stream "1.6.2"
-    debug "2.6.9"
-    mkdirp "0.5.1"
-    yauzl "2.4.1"
-
-extsprintf@1.3.0:
-  version "1.3.0"
-  resolved "https://registry.yarnpkg.com/extsprintf/-/extsprintf-1.3.0.tgz#96918440e3041a7a414f8c52e3c574eb3c3e1e05"
-
-extsprintf@^1.2.0:
-  version "1.4.0"
-  resolved "https://registry.yarnpkg.com/extsprintf/-/extsprintf-1.4.0.tgz#e2689f8f356fad62cca65a3a91c5df5f9551692f"
-
-eyes@0.1.x:
-  version "0.1.8"
-  resolved "https://registry.yarnpkg.com/eyes/-/eyes-0.1.8.tgz#62cf120234c683785d902348a800ef3e0cc20bc0"
-
-fancy-log@^1.1.0, fancy-log@^1.3.2:
-  version "1.3.2"
-  resolved "https://registry.yarnpkg.com/fancy-log/-/fancy-log-1.3.2.tgz#f41125e3d84f2e7d89a43d06d958c8f78be16be1"
-  dependencies:
-    ansi-gray "^0.1.1"
-    color-support "^1.1.3"
-    time-stamp "^1.0.0"
-
-fast-deep-equal@^1.0.0:
-  version "1.1.0"
-  resolved "https://registry.yarnpkg.com/fast-deep-equal/-/fast-deep-equal-1.1.0.tgz#c053477817c86b51daa853c81e059b733d023614"
-
-fast-json-stable-stringify@^2.0.0:
-  version "2.0.0"
-  resolved "https://registry.yarnpkg.com/fast-json-stable-stringify/-/fast-json-stable-stringify-2.0.0.tgz#d5142c0caee6b1189f87d3a76111064f86c8bbf2"
-
-faye-websocket@~0.7.2:
-  version "0.7.3"
-  resolved "https://registry.yarnpkg.com/faye-websocket/-/faye-websocket-0.7.3.tgz#cc4074c7f4a4dfd03af54dd65c354b135132ce11"
-  dependencies:
-    websocket-driver ">=0.3.6"
-
-fd-slicer@~1.0.1:
-  version "1.0.1"
-  resolved "https://registry.yarnpkg.com/fd-slicer/-/fd-slicer-1.0.1.tgz#8b5bcbd9ec327c5041bf9ab023fd6750f1177e65"
-  dependencies:
-    pend "~1.2.0"
-
-fd-slicer@~1.1.0:
-  version "1.1.0"
-  resolved "https://registry.yarnpkg.com/fd-slicer/-/fd-slicer-1.1.0.tgz#25c7c89cb1f9077f8891bbe61d8f390eae256f1e"
-  dependencies:
-    pend "~1.2.0"
-
-figures@^1.3.5:
-  version "1.7.0"
-  resolved "https://registry.yarnpkg.com/figures/-/figures-1.7.0.tgz#cbe1e3affcf1cd44b80cadfed28dc793a9701d2e"
-  dependencies:
-    escape-string-regexp "^1.0.5"
-    object-assign "^4.1.0"
-
-file-type@^3.1.0:
-  version "3.9.0"
-  resolved "https://registry.yarnpkg.com/file-type/-/file-type-3.9.0.tgz#257a078384d1db8087bc449d107d52a52672b9e9"
-
-file-type@^4.1.0:
-  version "4.4.0"
-  resolved "https://registry.yarnpkg.com/file-type/-/file-type-4.4.0.tgz#1b600e5fca1fbdc6e80c0a70c71c8dba5f7906c5"
-
-filename-regex@^2.0.0:
-  version "2.0.1"
-  resolved "https://registry.yarnpkg.com/filename-regex/-/filename-regex-2.0.1.tgz#c1c4b9bee3e09725ddb106b75c1e301fe2f18b26"
-
-filename-reserved-regex@^1.0.0:
-  version "1.0.0"
-  resolved "https://registry.yarnpkg.com/filename-reserved-regex/-/filename-reserved-regex-1.0.0.tgz#e61cf805f0de1c984567d0386dc5df50ee5af7e4"
-
-filenamify@^1.0.1:
-  version "1.2.1"
-  resolved "https://registry.yarnpkg.com/filenamify/-/filenamify-1.2.1.tgz#a9f2ffd11c503bed300015029272378f1f1365a5"
-  dependencies:
-    filename-reserved-regex "^1.0.0"
-    strip-outer "^1.0.0"
-    trim-repeated "^1.0.0"
-
-fill-range@^2.1.0:
-  version "2.2.4"
-  resolved "https://registry.yarnpkg.com/fill-range/-/fill-range-2.2.4.tgz#eb1e773abb056dcd8df2bfdf6af59b8b3a936565"
-  dependencies:
-    is-number "^2.1.0"
-    isobject "^2.0.0"
-    randomatic "^3.0.0"
-    repeat-element "^1.1.2"
-    repeat-string "^1.5.2"
-
-fill-range@^4.0.0:
-  version "4.0.0"
-  resolved "https://registry.yarnpkg.com/fill-range/-/fill-range-4.0.0.tgz#d544811d428f98eb06a63dc402d2403c328c38f7"
-  dependencies:
-    extend-shallow "^2.0.1"
-    is-number "^3.0.0"
-    repeat-string "^1.6.1"
-    to-regex-range "^2.1.0"
-
-find-index@^0.1.1:
-  version "0.1.1"
-  resolved "https://registry.yarnpkg.com/find-index/-/find-index-0.1.1.tgz#675d358b2ca3892d795a1ab47232f8b6e2e0dde4"
-
-find-up@^1.0.0:
-  version "1.1.2"
-  resolved "https://registry.yarnpkg.com/find-up/-/find-up-1.1.2.tgz#6b2e9822b1a2ce0a60ab64d610eccad53cb24d0f"
-  dependencies:
-    path-exists "^2.0.0"
-    pinkie-promise "^2.0.0"
-
-find-versions@^1.0.0:
-  version "1.2.1"
-  resolved "https://registry.yarnpkg.com/find-versions/-/find-versions-1.2.1.tgz#cbde9f12e38575a0af1be1b9a2c5d5fd8f186b62"
-  dependencies:
-    array-uniq "^1.0.0"
-    get-stdin "^4.0.1"
-    meow "^3.5.0"
-    semver-regex "^1.0.0"
-
-findup-sync@^2.0.0:
-  version "2.0.0"
-  resolved "https://registry.yarnpkg.com/findup-sync/-/findup-sync-2.0.0.tgz#9326b1488c22d1a6088650a86901b2d9a90a2cbc"
-  dependencies:
-    detect-file "^1.0.0"
-    is-glob "^3.1.0"
-    micromatch "^3.0.4"
-    resolve-dir "^1.0.1"
-
-fined@^1.0.1:
-  version "1.1.0"
-  resolved "https://registry.yarnpkg.com/fined/-/fined-1.1.0.tgz#b37dc844b76a2f5e7081e884f7c0ae344f153476"
-  dependencies:
-    expand-tilde "^2.0.2"
-    is-plain-object "^2.0.3"
-    object.defaults "^1.1.0"
-    object.pick "^1.2.0"
-    parse-filepath "^1.0.1"
-
-first-chunk-stream@^1.0.0:
-  version "1.0.0"
-  resolved "https://registry.yarnpkg.com/first-chunk-stream/-/first-chunk-stream-1.0.0.tgz#59bfb50cd905f60d7c394cd3d9acaab4e6ad934e"
-
-flagged-respawn@^1.0.0:
-  version "1.0.0"
-  resolved "https://registry.yarnpkg.com/flagged-respawn/-/flagged-respawn-1.0.0.tgz#4e79ae9b2eb38bf86b3bb56bf3e0a56aa5fcabd7"
-
-flatmap-stream@^0.1.0:
-  version "0.1.0"
-  resolved "https://registry.yarnpkg.com/flatmap-stream/-/flatmap-stream-0.1.0.tgz#ed54e01422cd29281800914fcb968d58b685d5f1"
-
-flatten@^1.0.2:
-  version "1.0.2"
-  resolved "https://registry.yarnpkg.com/flatten/-/flatten-1.0.2.tgz#dae46a9d78fbe25292258cc1e780a41d95c03782"
-
-for-in@^1.0.1, for-in@^1.0.2:
-  version "1.0.2"
-  resolved "https://registry.yarnpkg.com/for-in/-/for-in-1.0.2.tgz#81068d295a8142ec0ac726c6e2200c30fb6d5e80"
-
-for-own@^0.1.4:
-  version "0.1.5"
-  resolved "https://registry.yarnpkg.com/for-own/-/for-own-0.1.5.tgz#5265c681a4f294dabbf17c9509b6763aa84510ce"
-  dependencies:
-    for-in "^1.0.1"
-
-for-own@^1.0.0:
-  version "1.0.0"
-  resolved "https://registry.yarnpkg.com/for-own/-/for-own-1.0.0.tgz#c63332f415cedc4b04dbfe70cf836494c53cb44b"
-  dependencies:
-    for-in "^1.0.1"
-
-forever-agent@~0.6.1:
-  version "0.6.1"
-  resolved "https://registry.yarnpkg.com/forever-agent/-/forever-agent-0.6.1.tgz#fbc71f0c41adeb37f96c577ad1ed42d8fdacca91"
-
-form-data@~2.3.1, form-data@~2.3.2:
-  version "2.3.2"
-  resolved "https://registry.yarnpkg.com/form-data/-/form-data-2.3.2.tgz#4970498be604c20c005d4f5c23aecd21d6b49099"
-  dependencies:
-    asynckit "^0.4.0"
-    combined-stream "1.0.6"
-    mime-types "^2.1.12"
-
-fragment-cache@^0.2.1:
-  version "0.2.1"
-  resolved "https://registry.yarnpkg.com/fragment-cache/-/fragment-cache-0.2.1.tgz#4290fad27f13e89be7f33799c6bc5a0abfff0d19"
-  dependencies:
-    map-cache "^0.2.2"
-
-from@^0.1.7, from@~0:
-  version "0.1.7"
-  resolved "https://registry.yarnpkg.com/from/-/from-0.1.7.tgz#83c60afc58b9c56997007ed1a768b3ab303a44fe"
-
-fs-constants@^1.0.0:
-  version "1.0.0"
-  resolved "https://registry.yarnpkg.com/fs-constants/-/fs-constants-1.0.0.tgz#6be0de9be998ce16af8afc24497b9ee9b7ccd9ad"
-
-fs-extra@^1.0.0:
-  version "1.0.0"
-  resolved "https://registry.yarnpkg.com/fs-extra/-/fs-extra-1.0.0.tgz#cd3ce5f7e7cb6145883fcae3191e9877f8587950"
-  dependencies:
-    graceful-fs "^4.1.2"
-    jsonfile "^2.1.0"
-    klaw "^1.0.0"
-
-fs.realpath@^1.0.0:
-  version "1.0.0"
-  resolved "https://registry.yarnpkg.com/fs.realpath/-/fs.realpath-1.0.0.tgz#1504ad2523158caa40db4a2787cb01411994ea4f"
-
-fstream@^1.0.0, fstream@^1.0.2:
-  version "1.0.11"
-  resolved "https://registry.yarnpkg.com/fstream/-/fstream-1.0.11.tgz#5c1fb1f117477114f0632a0eb4b71b3cb0fd3171"
-  dependencies:
-    graceful-fs "^4.1.2"
-    inherits "~2.0.0"
-    mkdirp ">=0.5 0"
-    rimraf "2"
-
-function-bind@^1.1.1:
-  version "1.1.1"
-  resolved "https://registry.yarnpkg.com/function-bind/-/function-bind-1.1.1.tgz#a56899d3ea3c9bab874bb9773b7c5ede92f4895d"
-
-gauge@~2.7.3:
-  version "2.7.4"
-  resolved "https://registry.yarnpkg.com/gauge/-/gauge-2.7.4.tgz#2c03405c7538c39d7eb37b317022e325fb018bf7"
-  dependencies:
-    aproba "^1.0.3"
-    console-control-strings "^1.0.0"
-    has-unicode "^2.0.0"
-    object-assign "^4.1.0"
-    signal-exit "^3.0.0"
-    string-width "^1.0.1"
-    strip-ansi "^3.0.1"
-    wide-align "^1.1.0"
-
-gaze@^0.5.1:
-  version "0.5.2"
-  resolved "https://registry.yarnpkg.com/gaze/-/gaze-0.5.2.tgz#40b709537d24d1d45767db5a908689dfe69ac44f"
-  dependencies:
-    globule "~0.1.0"
-
-gaze@^1.0.0:
-  version "1.1.3"
-  resolved "https://registry.yarnpkg.com/gaze/-/gaze-1.1.3.tgz#c441733e13b927ac8c0ff0b4c3b033f28812924a"
-  dependencies:
-    globule "^1.0.0"
-
-get-caller-file@^1.0.1:
-  version "1.0.3"
-  resolved "https://registry.yarnpkg.com/get-caller-file/-/get-caller-file-1.0.3.tgz#f978fa4c90d1dfe7ff2d6beda2a515e713bdcf4a"
-
-get-proxy@^1.0.1:
-  version "1.1.0"
-  resolved "https://registry.yarnpkg.com/get-proxy/-/get-proxy-1.1.0.tgz#894854491bc591b0f147d7ae570f5c678b7256eb"
-  dependencies:
-    rc "^1.1.2"
-
-get-stdin@^4.0.1:
-  version "4.0.1"
-  resolved "https://registry.yarnpkg.com/get-stdin/-/get-stdin-4.0.1.tgz#b968c6b0a04384324902e8bf1a5df32579a450fe"
-
-get-stream@^3.0.0:
-  version "3.0.0"
-  resolved "https://registry.yarnpkg.com/get-stream/-/get-stream-3.0.0.tgz#8e943d1358dc37555054ecbe2edb05aa174ede14"
-
-get-value@^2.0.3, get-value@^2.0.6:
-  version "2.0.6"
-  resolved "https://registry.yarnpkg.com/get-value/-/get-value-2.0.6.tgz#dc15ca1c672387ca76bd37ac0a395ba2042a2c28"
-
-getpass@^0.1.1:
-  version "0.1.7"
-  resolved "https://registry.yarnpkg.com/getpass/-/getpass-0.1.7.tgz#5eff8e3e684d569ae4cb2b1282604e8ba62149fa"
-  dependencies:
-    assert-plus "^1.0.0"
-
-gifsicle@^3.0.0:
-  version "3.0.4"
-  resolved "https://registry.yarnpkg.com/gifsicle/-/gifsicle-3.0.4.tgz#f45cb5ed10165b665dc929e0e9328b6c821dfa3b"
-  dependencies:
-    bin-build "^2.0.0"
-    bin-wrapper "^3.0.0"
-    logalot "^2.0.0"
-
-glob-base@^0.3.0:
-  version "0.3.0"
-  resolved "https://registry.yarnpkg.com/glob-base/-/glob-base-0.3.0.tgz#dbb164f6221b1c0b1ccf82aea328b497df0ea3c4"
-  dependencies:
-    glob-parent "^2.0.0"
-    is-glob "^2.0.0"
-
-glob-parent@^2.0.0:
-  version "2.0.0"
-  resolved "https://registry.yarnpkg.com/glob-parent/-/glob-parent-2.0.0.tgz#81383d72db054fcccf5336daa902f182f6edbb28"
-  dependencies:
-    is-glob "^2.0.0"
-
-glob-parent@^3.0.0:
-  version "3.1.0"
-  resolved "https://registry.yarnpkg.com/glob-parent/-/glob-parent-3.1.0.tgz#9e6af6299d8d3bd2bd40430832bd113df906c5ae"
-  dependencies:
-    is-glob "^3.1.0"
-    path-dirname "^1.0.0"
-
-glob-stream@^3.1.5:
-  version "3.1.18"
-  resolved "https://registry.yarnpkg.com/glob-stream/-/glob-stream-3.1.18.tgz#9170a5f12b790306fdfe598f313f8f7954fd143b"
-  dependencies:
-    glob "^4.3.1"
-    glob2base "^0.0.12"
-    minimatch "^2.0.1"
-    ordered-read-streams "^0.1.0"
-    through2 "^0.6.1"
-    unique-stream "^1.0.0"
-
-glob-stream@^5.3.2:
-  version "5.3.5"
-  resolved "https://registry.yarnpkg.com/glob-stream/-/glob-stream-5.3.5.tgz#a55665a9a8ccdc41915a87c701e32d4e016fad22"
-  dependencies:
-    extend "^3.0.0"
-    glob "^5.0.3"
-    glob-parent "^3.0.0"
-    micromatch "^2.3.7"
-    ordered-read-streams "^0.3.0"
-    through2 "^0.6.0"
-    to-absolute-glob "^0.1.1"
-    unique-stream "^2.0.2"
-
-glob-watcher@^0.0.6:
-  version "0.0.6"
-  resolved "https://registry.yarnpkg.com/glob-watcher/-/glob-watcher-0.0.6.tgz#b95b4a8df74b39c83298b0c05c978b4d9a3b710b"
-  dependencies:
-    gaze "^0.5.1"
-
-glob2base@^0.0.12:
-  version "0.0.12"
-  resolved "https://registry.yarnpkg.com/glob2base/-/glob2base-0.0.12.tgz#9d419b3e28f12e83a362164a277055922c9c0d56"
-  dependencies:
-    find-index "^0.1.1"
-
-glob@^4.3.1:
-  version "4.5.3"
-  resolved "https://registry.yarnpkg.com/glob/-/glob-4.5.3.tgz#c6cb73d3226c1efef04de3c56d012f03377ee15f"
-  dependencies:
-    inflight "^1.0.4"
-    inherits "2"
-    minimatch "^2.0.1"
-    once "^1.3.0"
-
-glob@^5.0.12, glob@^5.0.3:
-  version "5.0.15"
-  resolved "https://registry.yarnpkg.com/glob/-/glob-5.0.15.tgz#1bc936b9e02f4a603fcc222ecf7633d30b8b93b1"
-  dependencies:
-    inflight "^1.0.4"
-    inherits "2"
-    minimatch "2 || 3"
-    once "^1.3.0"
-    path-is-absolute "^1.0.0"
-
-glob@^7.0.0, glob@^7.0.3, glob@^7.0.5, glob@^7.1.1, glob@^7.1.2, glob@~7.1.1:
-  version "7.1.3"
-  resolved "https://registry.yarnpkg.com/glob/-/glob-7.1.3.tgz#3960832d3f1574108342dafd3a67b332c0969df1"
-  dependencies:
-    fs.realpath "^1.0.0"
-    inflight "^1.0.4"
-    inherits "2"
-    minimatch "^3.0.4"
-    once "^1.3.0"
-    path-is-absolute "^1.0.0"
-
-glob@~3.1.21:
-  version "3.1.21"
-  resolved "https://registry.yarnpkg.com/glob/-/glob-3.1.21.tgz#d29e0a055dea5138f4d07ed40e8982e83c2066cd"
-  dependencies:
-    graceful-fs "~1.2.0"
-    inherits "1"
-    minimatch "~0.2.11"
-
-global-modules@^1.0.0:
-  version "1.0.0"
-  resolved "https://registry.yarnpkg.com/global-modules/-/global-modules-1.0.0.tgz#6d770f0eb523ac78164d72b5e71a8877265cc3ea"
-  dependencies:
-    global-prefix "^1.0.1"
-    is-windows "^1.0.1"
-    resolve-dir "^1.0.0"
-
-global-prefix@^1.0.1:
-  version "1.0.2"
-  resolved "https://registry.yarnpkg.com/global-prefix/-/global-prefix-1.0.2.tgz#dbf743c6c14992593c655568cb66ed32c0122ebe"
-  dependencies:
-    expand-tilde "^2.0.2"
-    homedir-polyfill "^1.0.1"
-    ini "^1.3.4"
-    is-windows "^1.0.1"
-    which "^1.2.14"
-
-globals@^9.18.0:
-  version "9.18.0"
-  resolved "https://registry.yarnpkg.com/globals/-/globals-9.18.0.tgz#aa3896b3e69b487f17e31ed2143d69a8e30c2d8a"
-
-globby@^5.0.0:
-  version "5.0.0"
-  resolved "https://registry.yarnpkg.com/globby/-/globby-5.0.0.tgz#ebd84667ca0dbb330b99bcfc68eac2bc54370e0d"
-  dependencies:
-    array-union "^1.0.1"
-    arrify "^1.0.0"
-    glob "^7.0.3"
-    object-assign "^4.0.1"
-    pify "^2.0.0"
-    pinkie-promise "^2.0.0"
-
-globby@^6.1.0:
-  version "6.1.0"
-  resolved "https://registry.yarnpkg.com/globby/-/globby-6.1.0.tgz#f5a6d70e8395e21c858fb0489d64df02424d506c"
-  dependencies:
-    array-union "^1.0.1"
-    glob "^7.0.3"
-    object-assign "^4.0.1"
-    pify "^2.0.0"
-    pinkie-promise "^2.0.0"
-
-globule@^1.0.0:
-  version "1.2.1"
-  resolved "https://registry.yarnpkg.com/globule/-/globule-1.2.1.tgz#5dffb1b191f22d20797a9369b49eab4e9839696d"
-  dependencies:
-    glob "~7.1.1"
-    lodash "~4.17.10"
-    minimatch "~3.0.2"
-
-globule@~0.1.0:
-  version "0.1.0"
-  resolved "https://registry.yarnpkg.com/globule/-/globule-0.1.0.tgz#d9c8edde1da79d125a151b79533b978676346ae5"
-  dependencies:
-    glob "~3.1.21"
-    lodash "~1.0.1"
-    minimatch "~0.2.11"
-
-glogg@^1.0.0:
-  version "1.0.1"
-  resolved "https://registry.yarnpkg.com/glogg/-/glogg-1.0.1.tgz#dcf758e44789cc3f3d32c1f3562a3676e6a34810"
-  dependencies:
-    sparkles "^1.0.0"
-
-got@^5.0.0:
-  version "5.7.1"
-  resolved "http://registry.npmjs.org/got/-/got-5.7.1.tgz#5f81635a61e4a6589f180569ea4e381680a51f35"
-  dependencies:
-    create-error-class "^3.0.1"
-    duplexer2 "^0.1.4"
-    is-redirect "^1.0.0"
-    is-retry-allowed "^1.0.0"
-    is-stream "^1.0.0"
-    lowercase-keys "^1.0.0"
-    node-status-codes "^1.0.0"
-    object-assign "^4.0.1"
-    parse-json "^2.1.0"
-    pinkie-promise "^2.0.0"
-    read-all-stream "^3.0.0"
-    readable-stream "^2.0.5"
-    timed-out "^3.0.0"
-    unzip-response "^1.0.2"
-    url-parse-lax "^1.0.0"
-
-graceful-fs@4.X, graceful-fs@^4.0.0, graceful-fs@^4.1.2, graceful-fs@^4.1.6, graceful-fs@^4.1.9:
-  version "4.1.11"
-  resolved "https://registry.yarnpkg.com/graceful-fs/-/graceful-fs-4.1.11.tgz#0e8bdfe4d1ddb8854d64e04ea7c00e2a026e5658"
-
-graceful-fs@^3.0.0:
-  version "3.0.11"
-  resolved "https://registry.yarnpkg.com/graceful-fs/-/graceful-fs-3.0.11.tgz#7613c778a1afea62f25c630a086d7f3acbbdd818"
-  dependencies:
-    natives "^1.1.0"
-
-graceful-fs@~1.2.0:
-  version "1.2.3"
-  resolved "https://registry.yarnpkg.com/graceful-fs/-/graceful-fs-1.2.3.tgz#15a4806a57547cb2d2dbf27f42e89a8c3451b364"
-
-"graceful-readlink@>= 1.0.0":
-  version "1.0.1"
-  resolved "https://registry.yarnpkg.com/graceful-readlink/-/graceful-readlink-1.0.1.tgz#4cafad76bc62f02fa039b2f94e9a3dd3a391a725"
-
-growly@^1.3.0:
-  version "1.3.0"
-  resolved "https://registry.yarnpkg.com/growly/-/growly-1.3.0.tgz#f10748cbe76af964b7c96c93c6bcc28af120c081"
-
-gulp-autoprefixer@^3.1.1:
-  version "3.1.1"
-  resolved "https://registry.yarnpkg.com/gulp-autoprefixer/-/gulp-autoprefixer-3.1.1.tgz#75230051cd0d171343d783b7e9b5d1120eeef9b0"
-  dependencies:
-    autoprefixer "^6.0.0"
-    gulp-util "^3.0.0"
-    postcss "^5.0.4"
-    through2 "^2.0.0"
-    vinyl-sourcemaps-apply "^0.2.0"
-
-gulp-babel@^6.1.2:
-  version "6.1.3"
-  resolved "https://registry.yarnpkg.com/gulp-babel/-/gulp-babel-6.1.3.tgz#5aad8acb0db6b7f2f0be19eeee9528f2064df631"
-  dependencies:
-    babel-core "^6.23.1"
-    object-assign "^4.0.1"
-    plugin-error "^1.0.1"
-    replace-ext "0.0.1"
-    through2 "^2.0.0"
-    vinyl-sourcemaps-apply "^0.2.0"
-
-gulp-cache@^0.4.6:
-  version "0.4.6"
-  resolved "https://registry.yarnpkg.com/gulp-cache/-/gulp-cache-0.4.6.tgz#2d03b52db4f6a553ae1d5bef01e483e907e9f796"
-  dependencies:
-    bluebird "^3.0.5"
-    cache-swap "^0.3.0"
-    gulp-util "^3.0.7"
-    object-assign "^4.0.1"
-    object.omit "^2.0.0"
-    object.pick "^1.1.1"
-    readable-stream "^2.0.4"
-    try-json-parse "^0.1.1"
-    vinyl "^1.1.0"
-
-gulp-concat@^2.6.1:
-  version "2.6.1"
-  resolved "https://registry.yarnpkg.com/gulp-concat/-/gulp-concat-2.6.1.tgz#633d16c95d88504628ad02665663cee5a4793353"
-  dependencies:
-    concat-with-sourcemaps "^1.0.0"
-    through2 "^2.0.0"
-    vinyl "^2.0.0"
-
-gulp-cssnano@^2.1.2:
-  version "2.1.3"
-  resolved "https://registry.yarnpkg.com/gulp-cssnano/-/gulp-cssnano-2.1.3.tgz#02007e2817af09b3688482b430ad7db807aebf72"
-  dependencies:
-    buffer-from "^1.0.0"
-    cssnano "^3.0.0"
-    object-assign "^4.0.1"
-    plugin-error "^1.0.1"
-    vinyl-sourcemaps-apply "^0.2.1"
-
-gulp-decompress@^1.2.0:
-  version "1.2.0"
-  resolved "https://registry.yarnpkg.com/gulp-decompress/-/gulp-decompress-1.2.0.tgz#8eeb65a5e015f8ed8532cafe28454960626f0dc7"
-  dependencies:
-    archive-type "^3.0.0"
-    decompress "^3.0.0"
-    gulp-util "^3.0.1"
-    readable-stream "^2.0.2"
-
-gulp-imagemin@^3.2.0:
-  version "3.4.0"
-  resolved "https://registry.yarnpkg.com/gulp-imagemin/-/gulp-imagemin-3.4.0.tgz#23a8d4c5133f50a2a708aca87ca4b2d6eb7c4403"
-  dependencies:
-    chalk "^2.1.0"
-    gulp-util "^3.0.8"
-    imagemin "^5.3.1"
-    plur "^2.1.2"
-    pretty-bytes "^4.0.2"
-    through2-concurrent "^1.1.1"
-  optionalDependencies:
-    imagemin-gifsicle "^5.2.0"
-    imagemin-jpegtran "^5.0.2"
-    imagemin-optipng "^5.2.1"
-    imagemin-svgo "^5.2.2"
-
-gulp-include@^2.3.1:
-  version "2.3.1"
-  resolved "https://registry.yarnpkg.com/gulp-include/-/gulp-include-2.3.1.tgz#f1e0ed3f0fd074c347c7e59f9cf038d3dbdb3e30"
-  dependencies:
-    event-stream "~3.1.0"
-    glob "^5.0.12"
-    gulp-util "~2.2.10"
-    source-map "^0.5.1"
-    strip-bom "^2.0.0"
-    vinyl-sourcemaps-apply "^0.2.0"
-
-gulp-insert@^0.5.0:
-  version "0.5.0"
-  resolved "https://registry.yarnpkg.com/gulp-insert/-/gulp-insert-0.5.0.tgz#32313f13e4a23cf5acca5ce5f0c080923c778602"
-  dependencies:
-    readable-stream "^1.0.26-4"
-    streamqueue "0.0.6"
-
-gulp-jshint@^2.0.4:
-  version "2.1.0"
-  resolved "https://registry.yarnpkg.com/gulp-jshint/-/gulp-jshint-2.1.0.tgz#bfaf927f78eee263c5bbac5f63e314d44a7bd41e"
-  dependencies:
-    lodash "^4.12.0"
-    minimatch "^3.0.3"
-    plugin-error "^0.1.2"
-    rcloader "^0.2.2"
-    through2 "^2.0.0"
-
-gulp-livereload@^3.8.1:
-  version "3.8.1"
-  resolved "https://registry.yarnpkg.com/gulp-livereload/-/gulp-livereload-3.8.1.tgz#00f744b2d749d3e9e3746589c8a44acac779b50f"
-  dependencies:
-    chalk "^0.5.1"
-    debug "^2.1.0"
-    event-stream "^3.1.7"
-    gulp-util "^3.0.2"
-    lodash.assign "^3.0.0"
-    mini-lr "^0.1.8"
-
-gulp-notify@^3.0.0:
-  version "3.2.0"
-  resolved "https://registry.yarnpkg.com/gulp-notify/-/gulp-notify-3.2.0.tgz#2ae8225009df881eef59be5dd5a2f1337387764e"
-  dependencies:
-    ansi-colors "^1.0.1"
-    fancy-log "^1.3.2"
-    lodash.template "^4.4.0"
-    node-notifier "^5.2.1"
-    node.extend "^2.0.0"
-    plugin-error "^0.1.2"
-    through2 "^2.0.3"
-
-gulp-plumber@^1.1.0:
-  version "1.2.0"
-  resolved "https://registry.yarnpkg.com/gulp-plumber/-/gulp-plumber-1.2.0.tgz#18ea03912c9ee483f8a5499973b5954cd90f6ad8"
-  dependencies:
-    chalk "^1.1.3"
-    fancy-log "^1.3.2"
-    plugin-error "^0.1.2"
-    through2 "^2.0.3"
-
-gulp-rename@^1.2.0, gulp-rename@^1.2.2:
-  version "1.4.0"
-  resolved "https://registry.yarnpkg.com/gulp-rename/-/gulp-rename-1.4.0.tgz#de1c718e7c4095ae861f7296ef4f3248648240bd"
-
-gulp-sass@^3.1.0:
-  version "3.2.1"
-  resolved "https://registry.yarnpkg.com/gulp-sass/-/gulp-sass-3.2.1.tgz#2e3688a96fd8be1c0c01340750c191b2e79fab94"
-  dependencies:
-    gulp-util "^3.0"
-    lodash.clonedeep "^4.3.2"
-    node-sass "^4.8.3"
-    through2 "^2.0.0"
-    vinyl-sourcemaps-apply "^0.2.0"
-
-gulp-sourcemaps@1.6.0:
-  version "1.6.0"
-  resolved "https://registry.yarnpkg.com/gulp-sourcemaps/-/gulp-sourcemaps-1.6.0.tgz#b86ff349d801ceb56e1d9e7dc7bbcb4b7dee600c"
-  dependencies:
-    convert-source-map "^1.1.1"
-    graceful-fs "^4.1.2"
-    strip-bom "^2.0.0"
-    through2 "^2.0.0"
-    vinyl "^1.0.0"
-
-gulp-sourcemaps@^2.6.0:
-  version "2.6.4"
-  resolved "https://registry.yarnpkg.com/gulp-sourcemaps/-/gulp-sourcemaps-2.6.4.tgz#cbb2008450b1bcce6cd23bf98337be751bf6e30a"
-  dependencies:
-    "@gulp-sourcemaps/identity-map" "1.X"
-    "@gulp-sourcemaps/map-sources" "1.X"
-    acorn "5.X"
-    convert-source-map "1.X"
-    css "2.X"
-    debug-fabulous "1.X"
-    detect-newline "2.X"
-    graceful-fs "4.X"
-    source-map "~0.6.0"
-    strip-bom-string "1.X"
-    through2 "2.X"
-
-gulp-uglify@^2.1.2:
-  version "2.1.2"
-  resolved "https://registry.yarnpkg.com/gulp-uglify/-/gulp-uglify-2.1.2.tgz#6db85b1d0ee63d18058592b658649d65c2ec4541"
-  dependencies:
-    gulplog "^1.0.0"
-    has-gulplog "^0.1.0"
-    lodash "^4.13.1"
-    make-error-cause "^1.1.1"
-    through2 "^2.0.0"
-    uglify-js "~2.8.10"
-    uglify-save-license "^0.4.1"
-    vinyl-sourcemaps-apply "^0.2.0"
-
-gulp-util@^3.0, gulp-util@^3.0.0, gulp-util@^3.0.1, gulp-util@^3.0.2, gulp-util@^3.0.7, gulp-util@^3.0.8:
-  version "3.0.8"
-  resolved "https://registry.yarnpkg.com/gulp-util/-/gulp-util-3.0.8.tgz#0054e1e744502e27c04c187c3ecc505dd54bbb4f"
-  dependencies:
-    array-differ "^1.0.0"
-    array-uniq "^1.0.2"
-    beeper "^1.0.0"
-    chalk "^1.0.0"
-    dateformat "^2.0.0"
-    fancy-log "^1.1.0"
-    gulplog "^1.0.0"
-    has-gulplog "^0.1.0"
-    lodash._reescape "^3.0.0"
-    lodash._reevaluate "^3.0.0"
-    lodash._reinterpolate "^3.0.0"
-    lodash.template "^3.0.0"
-    minimist "^1.1.0"
-    multipipe "^0.1.2"
-    object-assign "^3.0.0"
-    replace-ext "0.0.1"
-    through2 "^2.0.0"
-    vinyl "^0.5.0"
-
-gulp-util@~2.2.10:
-  version "2.2.20"
-  resolved "https://registry.yarnpkg.com/gulp-util/-/gulp-util-2.2.20.tgz#d7146e5728910bd8f047a6b0b1e549bc22dbd64c"
-  dependencies:
-    chalk "^0.5.0"
-    dateformat "^1.0.7-1.2.3"
-    lodash._reinterpolate "^2.4.1"
-    lodash.template "^2.4.1"
-    minimist "^0.2.0"
-    multipipe "^0.1.0"
-    through2 "^0.5.0"
-    vinyl "^0.2.1"
-
-gulp@^3.9.1:
-  version "3.9.1"
-  resolved "https://registry.yarnpkg.com/gulp/-/gulp-3.9.1.tgz#571ce45928dd40af6514fc4011866016c13845b4"
-  dependencies:
-    archy "^1.0.0"
-    chalk "^1.0.0"
-    deprecated "^0.0.1"
-    gulp-util "^3.0.0"
-    interpret "^1.0.0"
-    liftoff "^2.1.0"
-    minimist "^1.1.0"
-    orchestrator "^0.3.0"
-    pretty-hrtime "^1.0.0"
-    semver "^4.1.0"
-    tildify "^1.0.0"
-    v8flags "^2.0.2"
-    vinyl-fs "^0.3.0"
-
-gulplog@^1.0.0:
-  version "1.0.0"
-  resolved "https://registry.yarnpkg.com/gulplog/-/gulplog-1.0.0.tgz#e28c4d45d05ecbbed818363ce8f9c5926229ffe5"
-  dependencies:
-    glogg "^1.0.0"
-
-har-schema@^2.0.0:
-  version "2.0.0"
-  resolved "https://registry.yarnpkg.com/har-schema/-/har-schema-2.0.0.tgz#a94c2224ebcac04782a0d9035521f24735b7ec92"
-
-har-validator@~5.0.3:
-  version "5.0.3"
-  resolved "https://registry.yarnpkg.com/har-validator/-/har-validator-5.0.3.tgz#ba402c266194f15956ef15e0fcf242993f6a7dfd"
-  dependencies:
-    ajv "^5.1.0"
-    har-schema "^2.0.0"
-
-har-validator@~5.1.0:
-  version "5.1.0"
-  resolved "https://registry.yarnpkg.com/har-validator/-/har-validator-5.1.0.tgz#44657f5688a22cfd4b72486e81b3a3fb11742c29"
-  dependencies:
-    ajv "^5.3.0"
-    har-schema "^2.0.0"
-
-has-ansi@^0.1.0:
-  version "0.1.0"
-  resolved "https://registry.yarnpkg.com/has-ansi/-/has-ansi-0.1.0.tgz#84f265aae8c0e6a88a12d7022894b7568894c62e"
-  dependencies:
-    ansi-regex "^0.2.0"
-
-has-ansi@^2.0.0:
-  version "2.0.0"
-  resolved "https://registry.yarnpkg.com/has-ansi/-/has-ansi-2.0.0.tgz#34f5049ce1ecdf2b0649af3ef24e45ed35416d91"
-  dependencies:
-    ansi-regex "^2.0.0"
-
-has-flag@^1.0.0:
-  version "1.0.0"
-  resolved "https://registry.yarnpkg.com/has-flag/-/has-flag-1.0.0.tgz#9d9e793165ce017a00f00418c43f942a7b1d11fa"
-
-has-flag@^3.0.0:
-  version "3.0.0"
-  resolved "https://registry.yarnpkg.com/has-flag/-/has-flag-3.0.0.tgz#b5d454dc2199ae225699f3467e5a07f3b955bafd"
-
-has-gulplog@^0.1.0:
-  version "0.1.0"
-  resolved "https://registry.yarnpkg.com/has-gulplog/-/has-gulplog-0.1.0.tgz#6414c82913697da51590397dafb12f22967811ce"
-  dependencies:
-    sparkles "^1.0.0"
-
-has-unicode@^2.0.0:
-  version "2.0.1"
-  resolved "https://registry.yarnpkg.com/has-unicode/-/has-unicode-2.0.1.tgz#e0e6fe6a28cf51138855e086d1691e771de2a8b9"
-
-has-value@^0.3.1:
-  version "0.3.1"
-  resolved "https://registry.yarnpkg.com/has-value/-/has-value-0.3.1.tgz#7b1f58bada62ca827ec0a2078025654845995e1f"
-  dependencies:
-    get-value "^2.0.3"
-    has-values "^0.1.4"
-    isobject "^2.0.0"
-
-has-value@^1.0.0:
-  version "1.0.0"
-  resolved "https://registry.yarnpkg.com/has-value/-/has-value-1.0.0.tgz#18b281da585b1c5c51def24c930ed29a0be6b177"
-  dependencies:
-    get-value "^2.0.6"
-    has-values "^1.0.0"
-    isobject "^3.0.0"
-
-has-values@^0.1.4:
-  version "0.1.4"
-  resolved "https://registry.yarnpkg.com/has-values/-/has-values-0.1.4.tgz#6d61de95d91dfca9b9a02089ad384bff8f62b771"
-
-has-values@^1.0.0:
-  version "1.0.0"
-  resolved "https://registry.yarnpkg.com/has-values/-/has-values-1.0.0.tgz#95b0b63fec2146619a6fe57fe75628d5a39efe4f"
-  dependencies:
-    is-number "^3.0.0"
-    kind-of "^4.0.0"
-
-has@^1.0.1:
-  version "1.0.3"
-  resolved "https://registry.yarnpkg.com/has/-/has-1.0.3.tgz#722d7cbfc1f6aa8241f16dd814e011e1f41e8796"
-  dependencies:
-    function-bind "^1.1.1"
-
-hasha@^2.2.0:
-  version "2.2.0"
-  resolved "https://registry.yarnpkg.com/hasha/-/hasha-2.2.0.tgz#78d7cbfc1e6d66303fe79837365984517b2f6ee1"
-  dependencies:
-    is-stream "^1.0.1"
-    pinkie-promise "^2.0.0"
-
-home-or-tmp@^2.0.0:
-  version "2.0.0"
-  resolved "https://registry.yarnpkg.com/home-or-tmp/-/home-or-tmp-2.0.0.tgz#e36c3f2d2cae7d746a857e38d18d5f32a7882db8"
-  dependencies:
-    os-homedir "^1.0.0"
-    os-tmpdir "^1.0.1"
-
-homedir-polyfill@^1.0.1:
-  version "1.0.1"
-  resolved "https://registry.yarnpkg.com/homedir-polyfill/-/homedir-polyfill-1.0.1.tgz#4c2bbc8a758998feebf5ed68580f76d46768b4bc"
-  dependencies:
-    parse-passwd "^1.0.0"
-
-hosted-git-info@^2.1.4:
-  version "2.7.1"
-  resolved "https://registry.yarnpkg.com/hosted-git-info/-/hosted-git-info-2.7.1.tgz#97f236977bd6e125408930ff6de3eec6281ec047"
-
-html-comment-regex@^1.1.0:
-  version "1.1.1"
-  resolved "https://registry.yarnpkg.com/html-comment-regex/-/html-comment-regex-1.1.1.tgz#668b93776eaae55ebde8f3ad464b307a4963625e"
-
-htmlparser2@3.8.x:
-  version "3.8.3"
-  resolved "https://registry.yarnpkg.com/htmlparser2/-/htmlparser2-3.8.3.tgz#996c28b191516a8be86501a7d79757e5c70c1068"
-  dependencies:
-    domelementtype "1"
-    domhandler "2.3"
-    domutils "1.5"
-    entities "1.0"
-    readable-stream "1.1"
-
-http-errors@~1.3.1:
-  version "1.3.1"
-  resolved "http://registry.npmjs.org/http-errors/-/http-errors-1.3.1.tgz#197e22cdebd4198585e8694ef6786197b91ed942"
-  dependencies:
-    inherits "~2.0.1"
-    statuses "1"
-
-http-parser-js@>=0.4.0:
-  version "0.4.13"
-  resolved "https://registry.yarnpkg.com/http-parser-js/-/http-parser-js-0.4.13.tgz#3bd6d6fde6e3172c9334c3b33b6c193d80fe1137"
-
-http-signature@~1.2.0:
-  version "1.2.0"
-  resolved "https://registry.yarnpkg.com/http-signature/-/http-signature-1.2.0.tgz#9aecd925114772f3d95b65a60abb8f7c18fbace1"
-  dependencies:
-    assert-plus "^1.0.0"
-    jsprim "^1.2.2"
-    sshpk "^1.7.0"
-
-iconv-lite@0.4.13:
-  version "0.4.13"
-  resolved "http://registry.npmjs.org/iconv-lite/-/iconv-lite-0.4.13.tgz#1f88aba4ab0b1508e8312acc39345f36e992e2f2"
-
-imagemin-gifsicle@^5.2.0:
-  version "5.2.0"
-  resolved "https://registry.yarnpkg.com/imagemin-gifsicle/-/imagemin-gifsicle-5.2.0.tgz#3781524c457612ef04916af34241a2b42bfcb40a"
-  dependencies:
-    exec-buffer "^3.0.0"
-    gifsicle "^3.0.0"
-    is-gif "^1.0.0"
-
-imagemin-jpegtran@^5.0.2:
-  version "5.0.2"
-  resolved "https://registry.yarnpkg.com/imagemin-jpegtran/-/imagemin-jpegtran-5.0.2.tgz#e6882263b8f7916fddb800640cf75d2e970d2ad6"
-  dependencies:
-    exec-buffer "^3.0.0"
-    is-jpg "^1.0.0"
-    jpegtran-bin "^3.0.0"
-
-imagemin-optipng@^5.2.1:
-  version "5.2.1"
-  resolved "https://registry.yarnpkg.com/imagemin-optipng/-/imagemin-optipng-5.2.1.tgz#d22da412c09f5ff00a4339960b98a88b1dbe8695"
-  dependencies:
-    exec-buffer "^3.0.0"
-    is-png "^1.0.0"
-    optipng-bin "^3.0.0"
-
-imagemin-svgo@^5.2.2:
-  version "5.2.4"
-  resolved "https://registry.yarnpkg.com/imagemin-svgo/-/imagemin-svgo-5.2.4.tgz#6cd5d342cae4bcd8b483594e5315695df02b9e9b"
-  dependencies:
-    is-svg "^2.0.0"
-    svgo "^0.7.0"
-
-imagemin@^5.3.1:
-  version "5.3.1"
-  resolved "https://registry.yarnpkg.com/imagemin/-/imagemin-5.3.1.tgz#f19c2eee1e71ba6c6558c515f9fc96680189a6d4"
-  dependencies:
-    file-type "^4.1.0"
-    globby "^6.1.0"
-    make-dir "^1.0.0"
-    p-pipe "^1.1.0"
-    pify "^2.3.0"
-    replace-ext "^1.0.0"
-
-in-publish@^2.0.0:
-  version "2.0.0"
-  resolved "https://registry.yarnpkg.com/in-publish/-/in-publish-2.0.0.tgz#e20ff5e3a2afc2690320b6dc552682a9c7fadf51"
-
-indent-string@^2.1.0:
-  version "2.1.0"
-  resolved "https://registry.yarnpkg.com/indent-string/-/indent-string-2.1.0.tgz#8e2d48348742121b4a8218b7a137e9a52049dc80"
-  dependencies:
-    repeating "^2.0.0"
-
-indexes-of@^1.0.1:
-  version "1.0.1"
-  resolved "https://registry.yarnpkg.com/indexes-of/-/indexes-of-1.0.1.tgz#f30f716c8e2bd346c7b67d3df3915566a7c05607"
-
-inflight@^1.0.4:
-  version "1.0.6"
-  resolved "https://registry.yarnpkg.com/inflight/-/inflight-1.0.6.tgz#49bd6331d7d02d0c09bc910a1075ba8165b56df9"
-  dependencies:
-    once "^1.3.0"
-    wrappy "1"
-
-inherits@1:
-  version "1.0.2"
-  resolved "https://registry.yarnpkg.com/inherits/-/inherits-1.0.2.tgz#ca4309dadee6b54cc0b8d247e8d7c7a0975bdc9b"
-
-inherits@2, inherits@^2.0.1, inherits@^2.0.3, inherits@~2.0.0, inherits@~2.0.1, inherits@~2.0.3:
-  version "2.0.3"
-  resolved "https://registry.yarnpkg.com/inherits/-/inherits-2.0.3.tgz#633c2c83e3da42a502f52466022480f4208261de"
-
-ini@^1.3.4, ini@~1.3.0:
-  version "1.3.5"
-  resolved "https://registry.yarnpkg.com/ini/-/ini-1.3.5.tgz#eee25f56db1c9ec6085e0c22778083f596abf927"
-
-interpret@^1.0.0:
-  version "1.1.0"
-  resolved "https://registry.yarnpkg.com/interpret/-/interpret-1.1.0.tgz#7ed1b1410c6a0e0f78cf95d3b8440c63f78b8614"
-
-invariant@^2.2.2:
-  version "2.2.4"
-  resolved "https://registry.yarnpkg.com/invariant/-/invariant-2.2.4.tgz#610f3c92c9359ce1db616e538008d23ff35158e6"
-  dependencies:
-    loose-envify "^1.0.0"
-
-invert-kv@^1.0.0:
-  version "1.0.0"
-  resolved "https://registry.yarnpkg.com/invert-kv/-/invert-kv-1.0.0.tgz#104a8e4aaca6d3d8cd157a8ef8bfab2d7a3ffdb6"
-
-ip-regex@^1.0.1:
-  version "1.0.3"
-  resolved "https://registry.yarnpkg.com/ip-regex/-/ip-regex-1.0.3.tgz#dc589076f659f419c222039a33316f1c7387effd"
-
-irregular-plurals@^1.0.0:
-  version "1.4.0"
-  resolved "https://registry.yarnpkg.com/irregular-plurals/-/irregular-plurals-1.4.0.tgz#2ca9b033651111855412f16be5d77c62a458a766"
-
-is-absolute-url@^2.0.0:
-  version "2.1.0"
-  resolved "https://registry.yarnpkg.com/is-absolute-url/-/is-absolute-url-2.1.0.tgz#50530dfb84fcc9aa7dbe7852e83a37b93b9f2aa6"
-
-is-absolute@^0.1.5:
-  version "0.1.7"
-  resolved "https://registry.yarnpkg.com/is-absolute/-/is-absolute-0.1.7.tgz#847491119fccb5fb436217cc737f7faad50f603f"
-  dependencies:
-    is-relative "^0.1.0"
-
-is-absolute@^1.0.0:
-  version "1.0.0"
-  resolved "https://registry.yarnpkg.com/is-absolute/-/is-absolute-1.0.0.tgz#395e1ae84b11f26ad1795e73c17378e48a301576"
-  dependencies:
-    is-relative "^1.0.0"
-    is-windows "^1.0.1"
-
-is-accessor-descriptor@^0.1.6:
-  version "0.1.6"
-  resolved "https://registry.yarnpkg.com/is-accessor-descriptor/-/is-accessor-descriptor-0.1.6.tgz#a9e12cb3ae8d876727eeef3843f8a0897b5c98d6"
-  dependencies:
-    kind-of "^3.0.2"
-
-is-accessor-descriptor@^1.0.0:
-  version "1.0.0"
-  resolved "https://registry.yarnpkg.com/is-accessor-descriptor/-/is-accessor-descriptor-1.0.0.tgz#169c2f6d3df1f992618072365c9b0ea1f6878656"
-  dependencies:
-    kind-of "^6.0.0"
-
-is-arrayish@^0.2.1:
-  version "0.2.1"
-  resolved "https://registry.yarnpkg.com/is-arrayish/-/is-arrayish-0.2.1.tgz#77c99840527aa8ecb1a8ba697b80645a7a926a9d"
-
-is-buffer@^1.1.5:
-  version "1.1.6"
-  resolved "https://registry.yarnpkg.com/is-buffer/-/is-buffer-1.1.6.tgz#efaa2ea9daa0d7ab2ea13a97b2b8ad51fefbe8be"
-
-is-builtin-module@^1.0.0:
-  version "1.0.0"
-  resolved "http://registry.npmjs.org/is-builtin-module/-/is-builtin-module-1.0.0.tgz#540572d34f7ac3119f8f76c30cbc1b1e037affbe"
-  dependencies:
-    builtin-modules "^1.0.0"
-
-is-bzip2@^1.0.0:
-  version "1.0.0"
-  resolved "https://registry.yarnpkg.com/is-bzip2/-/is-bzip2-1.0.0.tgz#5ee58eaa5a2e9c80e21407bedf23ae5ac091b3fc"
-
-is-data-descriptor@^0.1.4:
-  version "0.1.4"
-  resolved "https://registry.yarnpkg.com/is-data-descriptor/-/is-data-descriptor-0.1.4.tgz#0b5ee648388e2c860282e793f1856fec3f301b56"
-  dependencies:
-    kind-of "^3.0.2"
-
-is-data-descriptor@^1.0.0:
-  version "1.0.0"
-  resolved "https://registry.yarnpkg.com/is-data-descriptor/-/is-data-descriptor-1.0.0.tgz#d84876321d0e7add03990406abbbbd36ba9268c7"
-  dependencies:
-    kind-of "^6.0.0"
-
-is-descriptor@^0.1.0:
-  version "0.1.6"
-  resolved "https://registry.yarnpkg.com/is-descriptor/-/is-descriptor-0.1.6.tgz#366d8240dde487ca51823b1ab9f07a10a78251ca"
-  dependencies:
-    is-accessor-descriptor "^0.1.6"
-    is-data-descriptor "^0.1.4"
-    kind-of "^5.0.0"
-
-is-descriptor@^1.0.0, is-descriptor@^1.0.2:
-  version "1.0.2"
-  resolved "https://registry.yarnpkg.com/is-descriptor/-/is-descriptor-1.0.2.tgz#3b159746a66604b04f8c81524ba365c5f14d86ec"
-  dependencies:
-    is-accessor-descriptor "^1.0.0"
-    is-data-descriptor "^1.0.0"
-    kind-of "^6.0.2"
-
-is-dotfile@^1.0.0:
-  version "1.0.3"
-  resolved "https://registry.yarnpkg.com/is-dotfile/-/is-dotfile-1.0.3.tgz#a6a2f32ffd2dfb04f5ca25ecd0f6b83cf798a1e1"
-
-is-equal-shallow@^0.1.3:
-  version "0.1.3"
-  resolved "https://registry.yarnpkg.com/is-equal-shallow/-/is-equal-shallow-0.1.3.tgz#2238098fc221de0bcfa5d9eac4c45d638aa1c534"
-  dependencies:
-    is-primitive "^2.0.0"
-
-is-extendable@^0.1.0, is-extendable@^0.1.1:
-  version "0.1.1"
-  resolved "https://registry.yarnpkg.com/is-extendable/-/is-extendable-0.1.1.tgz#62b110e289a471418e3ec36a617d472e301dfc89"
-
-is-extendable@^1.0.1:
-  version "1.0.1"
-  resolved "https://registry.yarnpkg.com/is-extendable/-/is-extendable-1.0.1.tgz#a7470f9e426733d81bd81e1155264e3a3507cab4"
-  dependencies:
-    is-plain-object "^2.0.4"
-
-is-extglob@^1.0.0:
-  version "1.0.0"
-  resolved "https://registry.yarnpkg.com/is-extglob/-/is-extglob-1.0.0.tgz#ac468177c4943405a092fc8f29760c6ffc6206c0"
-
-is-extglob@^2.1.0:
-  version "2.1.1"
-  resolved "https://registry.yarnpkg.com/is-extglob/-/is-extglob-2.1.1.tgz#a88c02535791f02ed37c76a1b9ea9773c833f8c2"
-
-is-finite@^1.0.0:
-  version "1.0.2"
-  resolved "https://registry.yarnpkg.com/is-finite/-/is-finite-1.0.2.tgz#cc6677695602be550ef11e8b4aa6305342b6d0aa"
-  dependencies:
-    number-is-nan "^1.0.0"
-
-is-fullwidth-code-point@^1.0.0:
-  version "1.0.0"
-  resolved "https://registry.yarnpkg.com/is-fullwidth-code-point/-/is-fullwidth-code-point-1.0.0.tgz#ef9e31386f031a7f0d643af82fde50c457ef00cb"
-  dependencies:
-    number-is-nan "^1.0.0"
-
-is-fullwidth-code-point@^2.0.0:
-  version "2.0.0"
-  resolved "https://registry.yarnpkg.com/is-fullwidth-code-point/-/is-fullwidth-code-point-2.0.0.tgz#a3b30a5c4f199183167aaab93beefae3ddfb654f"
-
-is-gif@^1.0.0:
-  version "1.0.0"
-  resolved "https://registry.yarnpkg.com/is-gif/-/is-gif-1.0.0.tgz#a6d2ae98893007bffa97a1d8c01d63205832097e"
-
-is-glob@^2.0.0, is-glob@^2.0.1:
-  version "2.0.1"
-  resolved "https://registry.yarnpkg.com/is-glob/-/is-glob-2.0.1.tgz#d096f926a3ded5600f3fdfd91198cb0888c2d863"
-  dependencies:
-    is-extglob "^1.0.0"
-
-is-glob@^3.1.0:
-  version "3.1.0"
-  resolved "https://registry.yarnpkg.com/is-glob/-/is-glob-3.1.0.tgz#7ba5ae24217804ac70707b96922567486cc3e84a"
-  dependencies:
-    is-extglob "^2.1.0"
-
-is-gzip@^1.0.0:
-  version "1.0.0"
-  resolved "https://registry.yarnpkg.com/is-gzip/-/is-gzip-1.0.0.tgz#6ca8b07b99c77998025900e555ced8ed80879a83"
-
-is-jpg@^1.0.0:
-  version "1.0.1"
-  resolved "https://registry.yarnpkg.com/is-jpg/-/is-jpg-1.0.1.tgz#296d57fdd99ce010434a7283e346ab9a1035e975"
-
-is-natural-number@^2.0.0:
-  version "2.1.1"
-  resolved "https://registry.yarnpkg.com/is-natural-number/-/is-natural-number-2.1.1.tgz#7d4c5728377ef386c3e194a9911bf57c6dc335e7"
-
-is-number@^2.1.0:
-  version "2.1.0"
-  resolved "https://registry.yarnpkg.com/is-number/-/is-number-2.1.0.tgz#01fcbbb393463a548f2f466cce16dece49db908f"
-  dependencies:
-    kind-of "^3.0.2"
-
-is-number@^3.0.0:
-  version "3.0.0"
-  resolved "https://registry.yarnpkg.com/is-number/-/is-number-3.0.0.tgz#24fd6201a4782cf50561c810276afc7d12d71195"
-  dependencies:
-    kind-of "^3.0.2"
-
-is-number@^4.0.0:
-  version "4.0.0"
-  resolved "https://registry.yarnpkg.com/is-number/-/is-number-4.0.0.tgz#0026e37f5454d73e356dfe6564699867c6a7f0ff"
-
-is-obj@^1.0.0:
-  version "1.0.1"
-  resolved "http://registry.npmjs.org/is-obj/-/is-obj-1.0.1.tgz#3e4729ac1f5fde025cd7d83a896dab9f4f67db0f"
-
-is-path-cwd@^1.0.0:
-  version "1.0.0"
-  resolved "https://registry.yarnpkg.com/is-path-cwd/-/is-path-cwd-1.0.0.tgz#d225ec23132e89edd38fda767472e62e65f1106d"
-
-is-path-in-cwd@^1.0.0:
-  version "1.0.1"
-  resolved "https://registry.yarnpkg.com/is-path-in-cwd/-/is-path-in-cwd-1.0.1.tgz#5ac48b345ef675339bd6c7a48a912110b241cf52"
-  dependencies:
-    is-path-inside "^1.0.0"
-
-is-path-inside@^1.0.0:
-  version "1.0.1"
-  resolved "https://registry.yarnpkg.com/is-path-inside/-/is-path-inside-1.0.1.tgz#8ef5b7de50437a3fdca6b4e865ef7aa55cb48036"
-  dependencies:
-    path-is-inside "^1.0.1"
-
-is-plain-obj@^1.0.0:
-  version "1.1.0"
-  resolved "https://registry.yarnpkg.com/is-plain-obj/-/is-plain-obj-1.1.0.tgz#71a50c8429dfca773c92a390a4a03b39fcd51d3e"
-
-is-plain-object@^2.0.1, is-plain-object@^2.0.3, is-plain-object@^2.0.4:
-  version "2.0.4"
-  resolved "https://registry.yarnpkg.com/is-plain-object/-/is-plain-object-2.0.4.tgz#2c163b3fafb1b606d9d17928f05c2a1c38e07677"
-  dependencies:
-    isobject "^3.0.1"
-
-is-png@^1.0.0:
-  version "1.1.0"
-  resolved "https://registry.yarnpkg.com/is-png/-/is-png-1.1.0.tgz#d574b12bf275c0350455570b0e5b57ab062077ce"
-
-is-posix-bracket@^0.1.0:
-  version "0.1.1"
-  resolved "https://registry.yarnpkg.com/is-posix-bracket/-/is-posix-bracket-0.1.1.tgz#3334dc79774368e92f016e6fbc0a88f5cd6e6bc4"
-
-is-primitive@^2.0.0:
-  version "2.0.0"
-  resolved "https://registry.yarnpkg.com/is-primitive/-/is-primitive-2.0.0.tgz#207bab91638499c07b2adf240a41a87210034575"
-
-is-promise@^2.1:
-  version "2.1.0"
-  resolved "https://registry.yarnpkg.com/is-promise/-/is-promise-2.1.0.tgz#79a2a9ece7f096e80f36d2b2f3bc16c1ff4bf3fa"
-
-is-redirect@^1.0.0:
-  version "1.0.0"
-  resolved "https://registry.yarnpkg.com/is-redirect/-/is-redirect-1.0.0.tgz#1d03dded53bd8db0f30c26e4f95d36fc7c87dc24"
-
-is-relative@^0.1.0:
-  version "0.1.3"
-  resolved "https://registry.yarnpkg.com/is-relative/-/is-relative-0.1.3.tgz#905fee8ae86f45b3ec614bc3c15c869df0876e82"
-
-is-relative@^1.0.0:
-  version "1.0.0"
-  resolved "https://registry.yarnpkg.com/is-relative/-/is-relative-1.0.0.tgz#a1bb6935ce8c5dba1e8b9754b9b2dcc020e2260d"
-  dependencies:
-    is-unc-path "^1.0.0"
-
-is-retry-allowed@^1.0.0:
-  version "1.1.0"
-  resolved "https://registry.yarnpkg.com/is-retry-allowed/-/is-retry-allowed-1.1.0.tgz#11a060568b67339444033d0125a61a20d564fb34"
-
-is-stream@^1.0.0, is-stream@^1.0.1, is-stream@^1.1.0:
-  version "1.1.0"
-  resolved "https://registry.yarnpkg.com/is-stream/-/is-stream-1.1.0.tgz#12d4a3dd4e68e0b79ceb8dbc84173ae80d91ca44"
-
-is-svg@^2.0.0:
-  version "2.1.0"
-  resolved "https://registry.yarnpkg.com/is-svg/-/is-svg-2.1.0.tgz#cf61090da0d9efbcab8722deba6f032208dbb0e9"
-  dependencies:
-    html-comment-regex "^1.1.0"
-
-is-tar@^1.0.0:
-  version "1.0.0"
-  resolved "https://registry.yarnpkg.com/is-tar/-/is-tar-1.0.0.tgz#2f6b2e1792c1f5bb36519acaa9d65c0d26fe853d"
-
-is-typedarray@~1.0.0:
-  version "1.0.0"
-  resolved "https://registry.yarnpkg.com/is-typedarray/-/is-typedarray-1.0.0.tgz#e479c80858df0c1b11ddda6940f96011fcda4a9a"
-
-is-unc-path@^1.0.0:
-  version "1.0.0"
-  resolved "https://registry.yarnpkg.com/is-unc-path/-/is-unc-path-1.0.0.tgz#d731e8898ed090a12c352ad2eaed5095ad322c9d"
-  dependencies:
-    unc-path-regex "^0.1.2"
-
-is-url@^1.2.0:
-  version "1.2.4"
-  resolved "https://registry.yarnpkg.com/is-url/-/is-url-1.2.4.tgz#04a4df46d28c4cff3d73d01ff06abeb318a1aa52"
-
-is-utf8@^0.2.0:
-  version "0.2.1"
-  resolved "https://registry.yarnpkg.com/is-utf8/-/is-utf8-0.2.1.tgz#4b0da1442104d1b336340e80797e865cf39f7d72"
-
-is-valid-glob@^0.3.0:
-  version "0.3.0"
-  resolved "https://registry.yarnpkg.com/is-valid-glob/-/is-valid-glob-0.3.0.tgz#d4b55c69f51886f9b65c70d6c2622d37e29f48fe"
-
-is-windows@^1.0.1, is-windows@^1.0.2:
-  version "1.0.2"
-  resolved "https://registry.yarnpkg.com/is-windows/-/is-windows-1.0.2.tgz#d1850eb9791ecd18e6182ce12a30f396634bb19d"
-
-is-zip@^1.0.0:
-  version "1.0.0"
-  resolved "https://registry.yarnpkg.com/is-zip/-/is-zip-1.0.0.tgz#47b0a8ff4d38a76431ccfd99a8e15a4c86ba2325"
-
-is@^3.2.1:
-  version "3.2.1"
-  resolved "https://registry.yarnpkg.com/is/-/is-3.2.1.tgz#d0ac2ad55eb7b0bec926a5266f6c662aaa83dca5"
-
-isarray@0.0.1:
-  version "0.0.1"
-  resolved "https://registry.yarnpkg.com/isarray/-/isarray-0.0.1.tgz#8a18acfca9a8f4177e09abfc6038939b05d1eedf"
-
-isarray@1.0.0, isarray@~1.0.0:
-  version "1.0.0"
-  resolved "https://registry.yarnpkg.com/isarray/-/isarray-1.0.0.tgz#bb935d48582cba168c06834957a54a3e07124f11"
-
-isexe@^2.0.0:
-  version "2.0.0"
-  resolved "https://registry.yarnpkg.com/isexe/-/isexe-2.0.0.tgz#e8fbf374dc556ff8947a10dcb0572d633f2cfa10"
-
-isobject@^2.0.0:
-  version "2.1.0"
-  resolved "https://registry.yarnpkg.com/isobject/-/isobject-2.1.0.tgz#f065561096a3f1da2ef46272f815c840d87e0c89"
-  dependencies:
-    isarray "1.0.0"
-
-isobject@^3.0.0, isobject@^3.0.1:
-  version "3.0.1"
-  resolved "https://registry.yarnpkg.com/isobject/-/isobject-3.0.1.tgz#4e431e92b11a9731636aa1f9c8d1ccbcfdab78df"
-
-isstream@0.1.x, isstream@~0.1.2:
-  version "0.1.2"
-  resolved "https://registry.yarnpkg.com/isstream/-/isstream-0.1.2.tgz#47e63f7af55afa6f92e1500e690eb8b8529c099a"
-
-jpegtran-bin@^3.0.0:
-  version "3.2.0"
-  resolved "https://registry.yarnpkg.com/jpegtran-bin/-/jpegtran-bin-3.2.0.tgz#f60ecf4ae999c0bdad2e9fbcdf2b6f0981e7a29b"
-  dependencies:
-    bin-build "^2.0.0"
-    bin-wrapper "^3.0.0"
-    logalot "^2.0.0"
-
-js-base64@^2.1.8, js-base64@^2.1.9:
-  version "2.4.9"
-  resolved "https://registry.yarnpkg.com/js-base64/-/js-base64-2.4.9.tgz#748911fb04f48a60c4771b375cac45a80df11c03"
-
-"js-tokens@^3.0.0 || ^4.0.0":
-  version "4.0.0"
-  resolved "https://registry.yarnpkg.com/js-tokens/-/js-tokens-4.0.0.tgz#19203fb59991df98e3a287050d4647cdeaf32499"
-
-js-tokens@^3.0.2:
-  version "3.0.2"
-  resolved "https://registry.yarnpkg.com/js-tokens/-/js-tokens-3.0.2.tgz#9866df395102130e38f7f996bceb65443209c25b"
-
-js-yaml@~3.7.0:
-  version "3.7.0"
-  resolved "https://registry.yarnpkg.com/js-yaml/-/js-yaml-3.7.0.tgz#5c967ddd837a9bfdca5f2de84253abe8a1c03b80"
-  dependencies:
-    argparse "^1.0.7"
-    esprima "^2.6.0"
-
-jsbn@~0.1.0:
-  version "0.1.1"
-  resolved "https://registry.yarnpkg.com/jsbn/-/jsbn-0.1.1.tgz#a5e654c2e5a2deb5f201d96cefbca80c0ef2f513"
-
-jsesc@^1.3.0:
-  version "1.3.0"
-  resolved "https://registry.yarnpkg.com/jsesc/-/jsesc-1.3.0.tgz#46c3fec8c1892b12b0833db9bc7622176dbab34b"
-
-jsesc@~0.5.0:
-  version "0.5.0"
-  resolved "https://registry.yarnpkg.com/jsesc/-/jsesc-0.5.0.tgz#e7dee66e35d6fc16f710fe91d5cf69f70f08911d"
-
-jshint@^2.9.4:
-  version "2.9.6"
-  resolved "https://registry.yarnpkg.com/jshint/-/jshint-2.9.6.tgz#19b34e578095a34928fe006135a6cb70137b9c08"
-  dependencies:
-    cli "~1.0.0"
-    console-browserify "1.1.x"
-    exit "0.1.x"
-    htmlparser2 "3.8.x"
-    lodash "~4.17.10"
-    minimatch "~3.0.2"
-    shelljs "0.3.x"
-    strip-json-comments "1.0.x"
-    unicode-5.2.0 "^0.7.5"
-  optionalDependencies:
-    phantom "~4.0.1"
-    phantomjs-prebuilt "~2.1.7"
-
-json-schema-traverse@^0.3.0:
-  version "0.3.1"
-  resolved "https://registry.yarnpkg.com/json-schema-traverse/-/json-schema-traverse-0.3.1.tgz#349a6d44c53a51de89b40805c5d5e59b417d3340"
-
-json-schema@0.2.3:
-  version "0.2.3"
-  resolved "https://registry.yarnpkg.com/json-schema/-/json-schema-0.2.3.tgz#b480c892e59a2f05954ce727bd3f2a4e882f9e13"
-
-json-stable-stringify@^1.0.0:
-  version "1.0.1"
-  resolved "https://registry.yarnpkg.com/json-stable-stringify/-/json-stable-stringify-1.0.1.tgz#9a759d39c5f2ff503fd5300646ed445f88c4f9af"
-  dependencies:
-    jsonify "~0.0.0"
-
-json-stringify-safe@~5.0.1:
-  version "5.0.1"
-  resolved "https://registry.yarnpkg.com/json-stringify-safe/-/json-stringify-safe-5.0.1.tgz#1296a2d58fd45f19a0f6ce01d65701e2c735b6eb"
-
-json5@^0.5.1:
-  version "0.5.1"
-  resolved "https://registry.yarnpkg.com/json5/-/json5-0.5.1.tgz#1eade7acc012034ad84e2396767ead9fa5495821"
-
-jsonfile@^2.1.0:
-  version "2.4.0"
-  resolved "http://registry.npmjs.org/jsonfile/-/jsonfile-2.4.0.tgz#3736a2b428b87bbda0cc83b53fa3d633a35c2ae8"
-  optionalDependencies:
-    graceful-fs "^4.1.6"
-
-jsonify@~0.0.0:
-  version "0.0.0"
-  resolved "https://registry.yarnpkg.com/jsonify/-/jsonify-0.0.0.tgz#2c74b6ee41d93ca51b7b5aaee8f503631d252a73"
-
-jsprim@^1.2.2:
-  version "1.4.1"
-  resolved "https://registry.yarnpkg.com/jsprim/-/jsprim-1.4.1.tgz#313e66bc1e5cc06e438bc1b7499c2e5c56acb6a2"
-  dependencies:
-    assert-plus "1.0.0"
-    extsprintf "1.3.0"
-    json-schema "0.2.3"
-    verror "1.10.0"
-
-kew@^0.7.0:
-  version "0.7.0"
-  resolved "https://registry.yarnpkg.com/kew/-/kew-0.7.0.tgz#79d93d2d33363d6fdd2970b335d9141ad591d79b"
-
-kind-of@^1.1.0:
-  version "1.1.0"
-  resolved "https://registry.yarnpkg.com/kind-of/-/kind-of-1.1.0.tgz#140a3d2d41a36d2efcfa9377b62c24f8495a5c44"
-
-kind-of@^3.0.2, kind-of@^3.0.3, kind-of@^3.2.0:
-  version "3.2.2"
-  resolved "https://registry.yarnpkg.com/kind-of/-/kind-of-3.2.2.tgz#31ea21a734bab9bbb0f32466d893aea51e4a3c64"
-  dependencies:
-    is-buffer "^1.1.5"
-
-kind-of@^4.0.0:
-  version "4.0.0"
-  resolved "https://registry.yarnpkg.com/kind-of/-/kind-of-4.0.0.tgz#20813df3d712928b207378691a45066fae72dd57"
-  dependencies:
-    is-buffer "^1.1.5"
-
-kind-of@^5.0.0:
-  version "5.1.0"
-  resolved "https://registry.yarnpkg.com/kind-of/-/kind-of-5.1.0.tgz#729c91e2d857b7a419a1f9aa65685c4c33f5845d"
-
-kind-of@^6.0.0, kind-of@^6.0.2:
-  version "6.0.2"
-  resolved "https://registry.yarnpkg.com/kind-of/-/kind-of-6.0.2.tgz#01146b36a6218e64e58f3a8d66de5d7fc6f6d051"
-
-klaw@^1.0.0:
-  version "1.3.1"
-  resolved "https://registry.yarnpkg.com/klaw/-/klaw-1.3.1.tgz#4088433b46b3b1ba259d78785d8e96f73ba02439"
-  optionalDependencies:
-    graceful-fs "^4.1.9"
-
-lazy-cache@^1.0.3:
-  version "1.0.4"
-  resolved "https://registry.yarnpkg.com/lazy-cache/-/lazy-cache-1.0.4.tgz#a1d78fc3a50474cb80845d3b3b6e1da49a446e8e"
-
-lazy-req@^1.0.0:
-  version "1.1.0"
-  resolved "https://registry.yarnpkg.com/lazy-req/-/lazy-req-1.1.0.tgz#bdaebead30f8d824039ce0ce149d4daa07ba1fac"
-
-lazystream@^1.0.0:
-  version "1.0.0"
-  resolved "https://registry.yarnpkg.com/lazystream/-/lazystream-1.0.0.tgz#f6995fe0f820392f61396be89462407bb77168e4"
-  dependencies:
-    readable-stream "^2.0.5"
-
-lcid@^1.0.0:
-  version "1.0.0"
-  resolved "https://registry.yarnpkg.com/lcid/-/lcid-1.0.0.tgz#308accafa0bc483a3867b4b6f2b9506251d1b835"
-  dependencies:
-    invert-kv "^1.0.0"
-
-liftoff@^2.1.0:
-  version "2.5.0"
-  resolved "https://registry.yarnpkg.com/liftoff/-/liftoff-2.5.0.tgz#2009291bb31cea861bbf10a7c15a28caf75c31ec"
-  dependencies:
-    extend "^3.0.0"
-    findup-sync "^2.0.0"
-    fined "^1.0.1"
-    flagged-respawn "^1.0.0"
-    is-plain-object "^2.0.4"
-    object.map "^1.0.0"
-    rechoir "^0.6.2"
-    resolve "^1.1.7"
-
-livereload-js@^2.2.0:
-  version "2.3.0"
-  resolved "https://registry.yarnpkg.com/livereload-js/-/livereload-js-2.3.0.tgz#c3ab22e8aaf5bf3505d80d098cbad67726548c9a"
-
-load-json-file@^1.0.0:
-  version "1.1.0"
-  resolved "http://registry.npmjs.org/load-json-file/-/load-json-file-1.1.0.tgz#956905708d58b4bab4c2261b04f59f31c99374c0"
-  dependencies:
-    graceful-fs "^4.1.2"
-    parse-json "^2.2.0"
-    pify "^2.0.0"
-    pinkie-promise "^2.0.0"
-    strip-bom "^2.0.0"
-
-lodash._baseassign@^3.0.0:
-  version "3.2.0"
-  resolved "https://registry.yarnpkg.com/lodash._baseassign/-/lodash._baseassign-3.2.0.tgz#8c38a099500f215ad09e59f1722fd0c52bfe0a4e"
-  dependencies:
-    lodash._basecopy "^3.0.0"
-    lodash.keys "^3.0.0"
-
-lodash._basecopy@^3.0.0:
-  version "3.0.1"
-  resolved "https://registry.yarnpkg.com/lodash._basecopy/-/lodash._basecopy-3.0.1.tgz#8da0e6a876cf344c0ad8a54882111dd3c5c7ca36"
-
-lodash._basetostring@^3.0.0:
-  version "3.0.1"
-  resolved "https://registry.yarnpkg.com/lodash._basetostring/-/lodash._basetostring-3.0.1.tgz#d1861d877f824a52f669832dcaf3ee15566a07d5"
-
-lodash._basevalues@^3.0.0:
-  version "3.0.0"
-  resolved "https://registry.yarnpkg.com/lodash._basevalues/-/lodash._basevalues-3.0.0.tgz#5b775762802bde3d3297503e26300820fdf661b7"
-
-lodash._bindcallback@^3.0.0:
-  version "3.0.1"
-  resolved "https://registry.yarnpkg.com/lodash._bindcallback/-/lodash._bindcallback-3.0.1.tgz#e531c27644cf8b57a99e17ed95b35c748789392e"
-
-lodash._createassigner@^3.0.0:
-  version "3.1.1"
-  resolved "https://registry.yarnpkg.com/lodash._createassigner/-/lodash._createassigner-3.1.1.tgz#838a5bae2fdaca63ac22dee8e19fa4e6d6970b11"
-  dependencies:
-    lodash._bindcallback "^3.0.0"
-    lodash._isiterateecall "^3.0.0"
-    lodash.restparam "^3.0.0"
-
-lodash._escapehtmlchar@~2.4.1:
-  version "2.4.1"
-  resolved "https://registry.yarnpkg.com/lodash._escapehtmlchar/-/lodash._escapehtmlchar-2.4.1.tgz#df67c3bb6b7e8e1e831ab48bfa0795b92afe899d"
-  dependencies:
-    lodash._htmlescapes "~2.4.1"
-
-lodash._escapestringchar@~2.4.1:
-  version "2.4.1"
-  resolved "https://registry.yarnpkg.com/lodash._escapestringchar/-/lodash._escapestringchar-2.4.1.tgz#ecfe22618a2ade50bfeea43937e51df66f0edb72"
-
-lodash._getnative@^3.0.0:
-  version "3.9.1"
-  resolved "https://registry.yarnpkg.com/lodash._getnative/-/lodash._getnative-3.9.1.tgz#570bc7dede46d61cdcde687d65d3eecbaa3aaff5"
-
-lodash._htmlescapes@~2.4.1:
-  version "2.4.1"
-  resolved "https://registry.yarnpkg.com/lodash._htmlescapes/-/lodash._htmlescapes-2.4.1.tgz#32d14bf0844b6de6f8b62a051b4f67c228b624cb"
-
-lodash._isiterateecall@^3.0.0:
-  version "3.0.9"
-  resolved "https://registry.yarnpkg.com/lodash._isiterateecall/-/lodash._isiterateecall-3.0.9.tgz#5203ad7ba425fae842460e696db9cf3e6aac057c"
-
-lodash._isnative@~2.4.1:
-  version "2.4.1"
-  resolved "https://registry.yarnpkg.com/lodash._isnative/-/lodash._isnative-2.4.1.tgz#3ea6404b784a7be836c7b57580e1cdf79b14832c"
-
-lodash._objecttypes@~2.4.1:
-  version "2.4.1"
-  resolved "https://registry.yarnpkg.com/lodash._objecttypes/-/lodash._objecttypes-2.4.1.tgz#7c0b7f69d98a1f76529f890b0cdb1b4dfec11c11"
-
-lodash._reescape@^3.0.0:
-  version "3.0.0"
-  resolved "https://registry.yarnpkg.com/lodash._reescape/-/lodash._reescape-3.0.0.tgz#2b1d6f5dfe07c8a355753e5f27fac7f1cde1616a"
-
-lodash._reevaluate@^3.0.0:
-  version "3.0.0"
-  resolved "https://registry.yarnpkg.com/lodash._reevaluate/-/lodash._reevaluate-3.0.0.tgz#58bc74c40664953ae0b124d806996daca431e2ed"
-
-lodash._reinterpolate@^2.4.1, lodash._reinterpolate@~2.4.1:
-  version "2.4.1"
-  resolved "https://registry.yarnpkg.com/lodash._reinterpolate/-/lodash._reinterpolate-2.4.1.tgz#4f1227aa5a8711fc632f5b07a1f4607aab8b3222"
-
-lodash._reinterpolate@^3.0.0, lodash._reinterpolate@~3.0.0:
-  version "3.0.0"
-  resolved "https://registry.yarnpkg.com/lodash._reinterpolate/-/lodash._reinterpolate-3.0.0.tgz#0ccf2d89166af03b3663c796538b75ac6e114d9d"
-
-lodash._reunescapedhtml@~2.4.1:
-  version "2.4.1"
-  resolved "https://registry.yarnpkg.com/lodash._reunescapedhtml/-/lodash._reunescapedhtml-2.4.1.tgz#747c4fc40103eb3bb8a0976e571f7a2659e93ba7"
-  dependencies:
-    lodash._htmlescapes "~2.4.1"
-    lodash.keys "~2.4.1"
-
-lodash._root@^3.0.0:
-  version "3.0.1"
-  resolved "https://registry.yarnpkg.com/lodash._root/-/lodash._root-3.0.1.tgz#fba1c4524c19ee9a5f8136b4609f017cf4ded692"
-
-lodash._shimkeys@~2.4.1:
-  version "2.4.1"
-  resolved "https://registry.yarnpkg.com/lodash._shimkeys/-/lodash._shimkeys-2.4.1.tgz#6e9cc9666ff081f0b5a6c978b83e242e6949d203"
-  dependencies:
-    lodash._objecttypes "~2.4.1"
-
-lodash.assign@^3.0.0:
-  version "3.2.0"
-  resolved "https://registry.yarnpkg.com/lodash.assign/-/lodash.assign-3.2.0.tgz#3ce9f0234b4b2223e296b8fa0ac1fee8ebca64fa"
-  dependencies:
-    lodash._baseassign "^3.0.0"
-    lodash._createassigner "^3.0.0"
-    lodash.keys "^3.0.0"
-
-lodash.assign@^4.2.0:
-  version "4.2.0"
-  resolved "https://registry.yarnpkg.com/lodash.assign/-/lodash.assign-4.2.0.tgz#0d99f3ccd7a6d261d19bdaeb9245005d285808e7"
-
-lodash.clonedeep@^4.3.2:
-  version "4.5.0"
-  resolved "https://registry.yarnpkg.com/lodash.clonedeep/-/lodash.clonedeep-4.5.0.tgz#e23f3f9c4f8fbdde872529c1071857a086e5ccef"
-
-lodash.defaults@~2.4.1:
-  version "2.4.1"
-  resolved "https://registry.yarnpkg.com/lodash.defaults/-/lodash.defaults-2.4.1.tgz#a7e8885f05e68851144b6e12a8f3678026bc4c54"
-  dependencies:
-    lodash._objecttypes "~2.4.1"
-    lodash.keys "~2.4.1"
-
-lodash.escape@^3.0.0:
-  version "3.2.0"
-  resolved "https://registry.yarnpkg.com/lodash.escape/-/lodash.escape-3.2.0.tgz#995ee0dc18c1b48cc92effae71a10aab5b487698"
-  dependencies:
-    lodash._root "^3.0.0"
-
-lodash.escape@~2.4.1:
-  version "2.4.1"
-  resolved "https://registry.yarnpkg.com/lodash.escape/-/lodash.escape-2.4.1.tgz#2ce12c5e084db0a57dda5e5d1eeeb9f5d175a3b4"
-  dependencies:
-    lodash._escapehtmlchar "~2.4.1"
-    lodash._reunescapedhtml "~2.4.1"
-    lodash.keys "~2.4.1"
-
-lodash.isarguments@^3.0.0:
-  version "3.1.0"
-  resolved "https://registry.yarnpkg.com/lodash.isarguments/-/lodash.isarguments-3.1.0.tgz#2f573d85c6a24289ff00663b491c1d338ff3458a"
-
-lodash.isarray@^3.0.0:
-  version "3.0.4"
-  resolved "https://registry.yarnpkg.com/lodash.isarray/-/lodash.isarray-3.0.4.tgz#79e4eb88c36a8122af86f844aa9bcd851b5fbb55"
-
-lodash.isequal@^4.0.0:
-  version "4.5.0"
-  resolved "https://registry.yarnpkg.com/lodash.isequal/-/lodash.isequal-4.5.0.tgz#415c4478f2bcc30120c22ce10ed3226f7d3e18e0"
-
-lodash.isobject@^3.0.2:
-  version "3.0.2"
-  resolved "https://registry.yarnpkg.com/lodash.isobject/-/lodash.isobject-3.0.2.tgz#3c8fb8d5b5bf4bf90ae06e14f2a530a4ed935e1d"
-
-lodash.isobject@~2.4.1:
-  version "2.4.1"
-  resolved "https://registry.yarnpkg.com/lodash.isobject/-/lodash.isobject-2.4.1.tgz#5a2e47fe69953f1ee631a7eba1fe64d2d06558f5"
-  dependencies:
-    lodash._objecttypes "~2.4.1"
-
-lodash.keys@^3.0.0:
-  version "3.1.2"
-  resolved "https://registry.yarnpkg.com/lodash.keys/-/lodash.keys-3.1.2.tgz#4dbc0472b156be50a0b286855d1bd0b0c656098a"
-  dependencies:
-    lodash._getnative "^3.0.0"
-    lodash.isarguments "^3.0.0"
-    lodash.isarray "^3.0.0"
-
-lodash.keys@~2.4.1:
-  version "2.4.1"
-  resolved "https://registry.yarnpkg.com/lodash.keys/-/lodash.keys-2.4.1.tgz#48dea46df8ff7632b10d706b8acb26591e2b3727"
-  dependencies:
-    lodash._isnative "~2.4.1"
-    lodash._shimkeys "~2.4.1"
-    lodash.isobject "~2.4.1"
-
-lodash.memoize@^4.1.2:
-  version "4.1.2"
-  resolved "https://registry.yarnpkg.com/lodash.memoize/-/lodash.memoize-4.1.2.tgz#bcc6c49a42a2840ed997f323eada5ecd182e0bfe"
-
-lodash.merge@^4.6.0:
-  version "4.6.1"
-  resolved "https://registry.yarnpkg.com/lodash.merge/-/lodash.merge-4.6.1.tgz#adc25d9cb99b9391c59624f379fbba60d7111d54"
-
-lodash.mergewith@^4.6.0:
-  version "4.6.1"
-  resolved "https://registry.yarnpkg.com/lodash.mergewith/-/lodash.mergewith-4.6.1.tgz#639057e726c3afbdb3e7d42741caa8d6e4335927"
-
-lodash.restparam@^3.0.0:
-  version "3.6.1"
-  resolved "https://registry.yarnpkg.com/lodash.restparam/-/lodash.restparam-3.6.1.tgz#936a4e309ef330a7645ed4145986c85ae5b20805"
-
-lodash.template@^2.4.1:
-  version "2.4.1"
-  resolved "https://registry.yarnpkg.com/lodash.template/-/lodash.template-2.4.1.tgz#9e611007edf629129a974ab3c48b817b3e1cf20d"
-  dependencies:
-    lodash._escapestringchar "~2.4.1"
-    lodash._reinterpolate "~2.4.1"
-    lodash.defaults "~2.4.1"
-    lodash.escape "~2.4.1"
-    lodash.keys "~2.4.1"
-    lodash.templatesettings "~2.4.1"
-    lodash.values "~2.4.1"
-
-lodash.template@^3.0.0:
-  version "3.6.2"
-  resolved "https://registry.yarnpkg.com/lodash.template/-/lodash.template-3.6.2.tgz#f8cdecc6169a255be9098ae8b0c53d378931d14f"
-  dependencies:
-    lodash._basecopy "^3.0.0"
-    lodash._basetostring "^3.0.0"
-    lodash._basevalues "^3.0.0"
-    lodash._isiterateecall "^3.0.0"
-    lodash._reinterpolate "^3.0.0"
-    lodash.escape "^3.0.0"
-    lodash.keys "^3.0.0"
-    lodash.restparam "^3.0.0"
-    lodash.templatesettings "^3.0.0"
-
-lodash.template@^4.4.0:
-  version "4.4.0"
-  resolved "https://registry.yarnpkg.com/lodash.template/-/lodash.template-4.4.0.tgz#e73a0385c8355591746e020b99679c690e68fba0"
-  dependencies:
-    lodash._reinterpolate "~3.0.0"
-    lodash.templatesettings "^4.0.0"
-
-lodash.templatesettings@^3.0.0:
-  version "3.1.1"
-  resolved "https://registry.yarnpkg.com/lodash.templatesettings/-/lodash.templatesettings-3.1.1.tgz#fb307844753b66b9f1afa54e262c745307dba8e5"
-  dependencies:
-    lodash._reinterpolate "^3.0.0"
-    lodash.escape "^3.0.0"
-
-lodash.templatesettings@^4.0.0:
-  version "4.1.0"
-  resolved "https://registry.yarnpkg.com/lodash.templatesettings/-/lodash.templatesettings-4.1.0.tgz#2b4d4e95ba440d915ff08bc899e4553666713316"
-  dependencies:
-    lodash._reinterpolate "~3.0.0"
-
-lodash.templatesettings@~2.4.1:
-  version "2.4.1"
-  resolved "https://registry.yarnpkg.com/lodash.templatesettings/-/lodash.templatesettings-2.4.1.tgz#ea76c75d11eb86d4dbe89a83893bb861929ac699"
-  dependencies:
-    lodash._reinterpolate "~2.4.1"
-    lodash.escape "~2.4.1"
-
-lodash.uniq@^4.5.0:
-  version "4.5.0"
-  resolved "https://registry.yarnpkg.com/lodash.uniq/-/lodash.uniq-4.5.0.tgz#d0225373aeb652adc1bc82e4945339a842754773"
-
-lodash.values@~2.4.1:
-  version "2.4.1"
-  resolved "https://registry.yarnpkg.com/lodash.values/-/lodash.values-2.4.1.tgz#abf514436b3cb705001627978cbcf30b1280eea4"
-  dependencies:
-    lodash.keys "~2.4.1"
-
-lodash@^4.0.0, lodash@^4.12.0, lodash@^4.13.1, lodash@^4.17.4, lodash@~4.17.10:
-  version "4.17.11"
-  resolved "https://registry.yarnpkg.com/lodash/-/lodash-4.17.11.tgz#b39ea6229ef607ecd89e2c8df12536891cac9b8d"
-
-lodash@~1.0.1:
-  version "1.0.2"
-  resolved "http://registry.npmjs.org/lodash/-/lodash-1.0.2.tgz#8f57560c83b59fc270bd3d561b690043430e2551"
-
-logalot@^2.0.0:
-  version "2.1.0"
-  resolved "https://registry.yarnpkg.com/logalot/-/logalot-2.1.0.tgz#5f8e8c90d304edf12530951a5554abb8c5e3f552"
-  dependencies:
-    figures "^1.3.5"
-    squeak "^1.0.0"
-
-longest@^1.0.0, longest@^1.0.1:
-  version "1.0.1"
-  resolved "https://registry.yarnpkg.com/longest/-/longest-1.0.1.tgz#30a0b2da38f73770e8294a0d22e6625ed77d0097"
-
-loose-envify@^1.0.0:
-  version "1.4.0"
-  resolved "https://registry.yarnpkg.com/loose-envify/-/loose-envify-1.4.0.tgz#71ee51fa7be4caec1a63839f7e682d8132d30caf"
-  dependencies:
-    js-tokens "^3.0.0 || ^4.0.0"
-
-loud-rejection@^1.0.0:
-  version "1.6.0"
-  resolved "https://registry.yarnpkg.com/loud-rejection/-/loud-rejection-1.6.0.tgz#5b46f80147edee578870f086d04821cf998e551f"
-  dependencies:
-    currently-unhandled "^0.4.1"
-    signal-exit "^3.0.0"
-
-lowercase-keys@^1.0.0:
-  version "1.0.1"
-  resolved "https://registry.yarnpkg.com/lowercase-keys/-/lowercase-keys-1.0.1.tgz#6f9e30b47084d971a7c820ff15a6c5167b74c26f"
-
-lpad-align@^1.0.1:
-  version "1.1.2"
-  resolved "https://registry.yarnpkg.com/lpad-align/-/lpad-align-1.1.2.tgz#21f600ac1c3095c3c6e497ee67271ee08481fe9e"
-  dependencies:
-    get-stdin "^4.0.1"
-    indent-string "^2.1.0"
-    longest "^1.0.0"
-    meow "^3.3.0"
-
-lru-cache@2:
-  version "2.7.3"
-  resolved "https://registry.yarnpkg.com/lru-cache/-/lru-cache-2.7.3.tgz#6d4524e8b955f95d4f5b58851ce21dd72fb4e952"
-
-lru-cache@^4.0.1:
-  version "4.1.3"
-  resolved "https://registry.yarnpkg.com/lru-cache/-/lru-cache-4.1.3.tgz#a1175cf3496dfc8436c156c334b4955992bce69c"
-  dependencies:
-    pseudomap "^1.0.2"
-    yallist "^2.1.2"
-
-lru-queue@0.1:
-  version "0.1.0"
-  resolved "https://registry.yarnpkg.com/lru-queue/-/lru-queue-0.1.0.tgz#2738bd9f0d3cf4f84490c5736c48699ac632cda3"
-  dependencies:
-    es5-ext "~0.10.2"
-
-make-dir@^1.0.0:
-  version "1.3.0"
-  resolved "https://registry.yarnpkg.com/make-dir/-/make-dir-1.3.0.tgz#79c1033b80515bd6d24ec9933e860ca75ee27f0c"
-  dependencies:
-    pify "^3.0.0"
-
-make-error-cause@^1.1.1:
-  version "1.2.2"
-  resolved "https://registry.yarnpkg.com/make-error-cause/-/make-error-cause-1.2.2.tgz#df0388fcd0b37816dff0a5fb8108939777dcbc9d"
-  dependencies:
-    make-error "^1.2.0"
-
-make-error@^1.2.0:
-  version "1.3.5"
-  resolved "https://registry.yarnpkg.com/make-error/-/make-error-1.3.5.tgz#efe4e81f6db28cadd605c70f29c831b58ef776c8"
-
-make-iterator@^1.0.0:
-  version "1.0.1"
-  resolved "https://registry.yarnpkg.com/make-iterator/-/make-iterator-1.0.1.tgz#29b33f312aa8f547c4a5e490f56afcec99133ad6"
-  dependencies:
-    kind-of "^6.0.2"
-
-map-cache@^0.2.0, map-cache@^0.2.2:
-  version "0.2.2"
-  resolved "https://registry.yarnpkg.com/map-cache/-/map-cache-0.2.2.tgz#c32abd0bd6525d9b051645bb4f26ac5dc98a0dbf"
-
-map-obj@^1.0.0, map-obj@^1.0.1:
-  version "1.0.1"
-  resolved "https://registry.yarnpkg.com/map-obj/-/map-obj-1.0.1.tgz#d933ceb9205d82bdcf4886f6742bdc2b4dea146d"
-
-map-stream@0.0.7:
-  version "0.0.7"
-  resolved "https://registry.yarnpkg.com/map-stream/-/map-stream-0.0.7.tgz#8a1f07896d82b10926bd3744a2420009f88974a8"
-
-map-stream@~0.1.0:
-  version "0.1.0"
-  resolved "http://registry.npmjs.org/map-stream/-/map-stream-0.1.0.tgz#e56aa94c4c8055a16404a0674b78f215f7c8e194"
-
-map-visit@^1.0.0:
-  version "1.0.0"
-  resolved "https://registry.yarnpkg.com/map-visit/-/map-visit-1.0.0.tgz#ecdca8f13144e660f1b5bd41f12f3479d98dfb8f"
-  dependencies:
-    object-visit "^1.0.0"
-
-math-expression-evaluator@^1.2.14:
-  version "1.2.17"
-  resolved "https://registry.yarnpkg.com/math-expression-evaluator/-/math-expression-evaluator-1.2.17.tgz#de819fdbcd84dccd8fae59c6aeb79615b9d266ac"
-
-math-random@^1.0.1:
-  version "1.0.1"
-  resolved "https://registry.yarnpkg.com/math-random/-/math-random-1.0.1.tgz#8b3aac588b8a66e4975e3cdea67f7bb329601fac"
-
-media-typer@0.3.0:
-  version "0.3.0"
-  resolved "https://registry.yarnpkg.com/media-typer/-/media-typer-0.3.0.tgz#8710d7af0aa626f8fffa1ce00168545263255748"
-
-memoizee@0.4.X:
-  version "0.4.14"
-  resolved "https://registry.yarnpkg.com/memoizee/-/memoizee-0.4.14.tgz#07a00f204699f9a95c2d9e77218271c7cd610d57"
-  dependencies:
-    d "1"
-    es5-ext "^0.10.45"
-    es6-weak-map "^2.0.2"
-    event-emitter "^0.3.5"
-    is-promise "^2.1"
-    lru-queue "0.1"
-    next-tick "1"
-    timers-ext "^0.1.5"
-
-meow@^3.1.0, meow@^3.3.0, meow@^3.5.0, meow@^3.7.0:
-  version "3.7.0"
-  resolved "https://registry.yarnpkg.com/meow/-/meow-3.7.0.tgz#72cb668b425228290abbfa856892587308a801fb"
-  dependencies:
-    camelcase-keys "^2.0.0"
-    decamelize "^1.1.2"
-    loud-rejection "^1.0.0"
-    map-obj "^1.0.1"
-    minimist "^1.1.3"
-    normalize-package-data "^2.3.4"
-    object-assign "^4.0.1"
-    read-pkg-up "^1.0.1"
-    redent "^1.0.0"
-    trim-newlines "^1.0.0"
-
-merge-stream@^1.0.0:
-  version "1.0.1"
-  resolved "https://registry.yarnpkg.com/merge-stream/-/merge-stream-1.0.1.tgz#4041202d508a342ba00174008df0c251b8c135e1"
-  dependencies:
-    readable-stream "^2.0.1"
-
-micromatch@^2.3.7:
-  version "2.3.11"
-  resolved "https://registry.yarnpkg.com/micromatch/-/micromatch-2.3.11.tgz#86677c97d1720b363431d04d0d15293bd38c1565"
-  dependencies:
-    arr-diff "^2.0.0"
-    array-unique "^0.2.1"
-    braces "^1.8.2"
-    expand-brackets "^0.1.4"
-    extglob "^0.3.1"
-    filename-regex "^2.0.0"
-    is-extglob "^1.0.0"
-    is-glob "^2.0.1"
-    kind-of "^3.0.2"
-    normalize-path "^2.0.1"
-    object.omit "^2.0.0"
-    parse-glob "^3.0.4"
-    regex-cache "^0.4.2"
-
-micromatch@^3.0.4:
-  version "3.1.10"
-  resolved "https://registry.yarnpkg.com/micromatch/-/micromatch-3.1.10.tgz#70859bc95c9840952f359a068a3fc49f9ecfac23"
-  dependencies:
-    arr-diff "^4.0.0"
-    array-unique "^0.3.2"
-    braces "^2.3.1"
-    define-property "^2.0.2"
-    extend-shallow "^3.0.2"
-    extglob "^2.0.4"
-    fragment-cache "^0.2.1"
-    kind-of "^6.0.2"
-    nanomatch "^1.2.9"
-    object.pick "^1.3.0"
-    regex-not "^1.0.0"
-    snapdragon "^0.8.1"
-    to-regex "^3.0.2"
-
-mime-db@~1.36.0:
-  version "1.36.0"
-  resolved "https://registry.yarnpkg.com/mime-db/-/mime-db-1.36.0.tgz#5020478db3c7fe93aad7bbcc4dcf869c43363397"
-
-mime-types@^2.1.12, mime-types@~2.1.17, mime-types@~2.1.18, mime-types@~2.1.19:
-  version "2.1.20"
-  resolved "https://registry.yarnpkg.com/mime-types/-/mime-types-2.1.20.tgz#930cb719d571e903738520f8470911548ca2cc19"
-  dependencies:
-    mime-db "~1.36.0"
-
-mini-lr@^0.1.8:
-  version "0.1.9"
-  resolved "https://registry.yarnpkg.com/mini-lr/-/mini-lr-0.1.9.tgz#02199d27347953d1fd1d6dbded4261f187b2d0f6"
-  dependencies:
-    body-parser "~1.14.0"
-    debug "^2.2.0"
-    faye-websocket "~0.7.2"
-    livereload-js "^2.2.0"
-    parseurl "~1.3.0"
-    qs "~2.2.3"
-
-"minimatch@2 || 3", minimatch@^3.0.3, minimatch@^3.0.4, minimatch@~3.0.2:
-  version "3.0.4"
-  resolved "https://registry.yarnpkg.com/minimatch/-/minimatch-3.0.4.tgz#5166e286457f03306064be5497e8dbb0c3d32083"
-  dependencies:
-    brace-expansion "^1.1.7"
-
-minimatch@^2.0.1:
-  version "2.0.10"
-  resolved "https://registry.yarnpkg.com/minimatch/-/minimatch-2.0.10.tgz#8d087c39c6b38c001b97fca7ce6d0e1e80afbac7"
-  dependencies:
-    brace-expansion "^1.0.0"
-
-minimatch@~0.2.11:
-  version "0.2.14"
-  resolved "https://registry.yarnpkg.com/minimatch/-/minimatch-0.2.14.tgz#c74e780574f63c6f9a090e90efbe6ef53a6a756a"
-  dependencies:
-    lru-cache "2"
-    sigmund "~1.0.0"
-
-minimist@0.0.8:
-  version "0.0.8"
-  resolved "http://registry.npmjs.org/minimist/-/minimist-0.0.8.tgz#857fcabfc3397d2625b8228262e86aa7a011b05d"
-
-minimist@^0.2.0:
-  version "0.2.0"
-  resolved "http://registry.npmjs.org/minimist/-/minimist-0.2.0.tgz#4dffe525dae2b864c66c2e23c6271d7afdecefce"
-
-minimist@^1.1.0, minimist@^1.1.3, minimist@^1.2.0:
-  version "1.2.0"
-  resolved "http://registry.npmjs.org/minimist/-/minimist-1.2.0.tgz#a35008b20f41383eec1fb914f4cd5df79a264284"
-
-mixin-deep@^1.2.0:
-  version "1.3.1"
-  resolved "https://registry.yarnpkg.com/mixin-deep/-/mixin-deep-1.3.1.tgz#a49e7268dce1a0d9698e45326c5626df3543d0fe"
-  dependencies:
-    for-in "^1.0.2"
-    is-extendable "^1.0.1"
-
-mkdirp@0.5.1, "mkdirp@>=0.5 0", mkdirp@^0.5.0, mkdirp@^0.5.1, mkdirp@~0.5.1:
-  version "0.5.1"
-  resolved "http://registry.npmjs.org/mkdirp/-/mkdirp-0.5.1.tgz#30057438eac6cf7f8c4767f38648d6697d75c903"
-  dependencies:
-    minimist "0.0.8"
-
-ms@0.7.1:
-  version "0.7.1"
-  resolved "https://registry.yarnpkg.com/ms/-/ms-0.7.1.tgz#9cd13c03adbff25b65effde7ce864ee952017098"
-
-ms@2.0.0:
-  version "2.0.0"
-  resolved "https://registry.yarnpkg.com/ms/-/ms-2.0.0.tgz#5608aeadfc00be6c2901df5f9861788de0d597c8"
-
-ms@^2.1.1:
-  version "2.1.1"
-  resolved "https://registry.yarnpkg.com/ms/-/ms-2.1.1.tgz#30a5864eb3ebb0a66f2ebe6d727af06a09d86e0a"
-
-multipipe@^0.1.0, multipipe@^0.1.2:
-  version "0.1.2"
-  resolved "https://registry.yarnpkg.com/multipipe/-/multipipe-0.1.2.tgz#2a8f2ddf70eed564dff2d57f1e1a137d9f05078b"
-  dependencies:
-    duplexer2 "0.0.2"
-
-nan@^2.10.0:
-  version "2.11.0"
-  resolved "https://registry.yarnpkg.com/nan/-/nan-2.11.0.tgz#574e360e4d954ab16966ec102c0c049fd961a099"
-
-nanomatch@^1.2.9:
-  version "1.2.13"
-  resolved "https://registry.yarnpkg.com/nanomatch/-/nanomatch-1.2.13.tgz#b87a8aa4fc0de8fe6be88895b38983ff265bd119"
-  dependencies:
-    arr-diff "^4.0.0"
-    array-unique "^0.3.2"
-    define-property "^2.0.2"
-    extend-shallow "^3.0.2"
-    fragment-cache "^0.2.1"
-    is-windows "^1.0.2"
-    kind-of "^6.0.2"
-    object.pick "^1.3.0"
-    regex-not "^1.0.0"
-    snapdragon "^0.8.1"
-    to-regex "^3.0.1"
-
-natives@^1.1.0:
-  version "1.1.5"
-  resolved "https://registry.yarnpkg.com/natives/-/natives-1.1.5.tgz#3bdbdb4104023e5dd239b56fc7ef3d9a17acc6aa"
-
-next-tick@1:
-  version "1.0.0"
-  resolved "https://registry.yarnpkg.com/next-tick/-/next-tick-1.0.0.tgz#ca86d1fe8828169b0120208e3dc8424b9db8342c"
-
-node-gyp@^3.8.0:
-  version "3.8.0"
-  resolved "https://registry.yarnpkg.com/node-gyp/-/node-gyp-3.8.0.tgz#540304261c330e80d0d5edce253a68cb3964218c"
-  dependencies:
-    fstream "^1.0.0"
-    glob "^7.0.3"
-    graceful-fs "^4.1.2"
-    mkdirp "^0.5.0"
-    nopt "2 || 3"
-    npmlog "0 || 1 || 2 || 3 || 4"
-    osenv "0"
-    request "^2.87.0"
-    rimraf "2"
-    semver "~5.3.0"
-    tar "^2.0.0"
-    which "1"
-
-node-notifier@^5.2.1:
-  version "5.2.1"
-  resolved "https://registry.yarnpkg.com/node-notifier/-/node-notifier-5.2.1.tgz#fa313dd08f5517db0e2502e5758d664ac69f9dea"
-  dependencies:
-    growly "^1.3.0"
-    semver "^5.4.1"
-    shellwords "^0.1.1"
-    which "^1.3.0"
-
-node-sass@^4.8.3:
-  version "4.9.3"
-  resolved "https://registry.yarnpkg.com/node-sass/-/node-sass-4.9.3.tgz#f407cf3d66f78308bb1e346b24fa428703196224"
-  dependencies:
-    async-foreach "^0.1.3"
-    chalk "^1.1.1"
-    cross-spawn "^3.0.0"
-    gaze "^1.0.0"
-    get-stdin "^4.0.1"
-    glob "^7.0.3"
-    in-publish "^2.0.0"
-    lodash.assign "^4.2.0"
-    lodash.clonedeep "^4.3.2"
-    lodash.mergewith "^4.6.0"
-    meow "^3.7.0"
-    mkdirp "^0.5.1"
-    nan "^2.10.0"
-    node-gyp "^3.8.0"
-    npmlog "^4.0.0"
-    request "2.87.0"
-    sass-graph "^2.2.4"
-    stdout-stream "^1.4.0"
-    "true-case-path" "^1.0.2"
-
-node-status-codes@^1.0.0:
-  version "1.0.0"
-  resolved "https://registry.yarnpkg.com/node-status-codes/-/node-status-codes-1.0.0.tgz#5ae5541d024645d32a58fcddc9ceecea7ae3ac2f"
-
-node.extend@^2.0.0:
-  version "2.0.0"
-  resolved "https://registry.yarnpkg.com/node.extend/-/node.extend-2.0.0.tgz#7525a2875677ea534784a5e10ac78956139614df"
-  dependencies:
-    is "^3.2.1"
-
-"nopt@2 || 3":
-  version "3.0.6"
-  resolved "https://registry.yarnpkg.com/nopt/-/nopt-3.0.6.tgz#c6465dbf08abcd4db359317f79ac68a646b28ff9"
-  dependencies:
-    abbrev "1"
-
-normalize-package-data@^2.3.2, normalize-package-data@^2.3.4:
-  version "2.4.0"
-  resolved "https://registry.yarnpkg.com/normalize-package-data/-/normalize-package-data-2.4.0.tgz#12f95a307d58352075a04907b84ac8be98ac012f"
-  dependencies:
-    hosted-git-info "^2.1.4"
-    is-builtin-module "^1.0.0"
-    semver "2 || 3 || 4 || 5"
-    validate-npm-package-license "^3.0.1"
-
-normalize-path@^2.0.1, normalize-path@^2.1.1:
-  version "2.1.1"
-  resolved "https://registry.yarnpkg.com/normalize-path/-/normalize-path-2.1.1.tgz#1ab28b556e198363a8c1a6f7e6fa20137fe6aed9"
-  dependencies:
-    remove-trailing-separator "^1.0.1"
-
-normalize-range@^0.1.2:
-  version "0.1.2"
-  resolved "https://registry.yarnpkg.com/normalize-range/-/normalize-range-0.1.2.tgz#2d10c06bdfd312ea9777695a4d28439456b75942"
-
-normalize-url@^1.4.0:
-  version "1.9.1"
-  resolved "https://registry.yarnpkg.com/normalize-url/-/normalize-url-1.9.1.tgz#2cc0d66b31ea23036458436e3620d85954c66c3c"
-  dependencies:
-    object-assign "^4.0.1"
-    prepend-http "^1.0.0"
-    query-string "^4.1.0"
-    sort-keys "^1.0.0"
-
-npm-run-path@^2.0.0:
-  version "2.0.2"
-  resolved "https://registry.yarnpkg.com/npm-run-path/-/npm-run-path-2.0.2.tgz#35a9232dfa35d7067b4cb2ddf2357b1871536c5f"
-  dependencies:
-    path-key "^2.0.0"
-
-"npmlog@0 || 1 || 2 || 3 || 4", npmlog@^4.0.0:
-  version "4.1.2"
-  resolved "https://registry.yarnpkg.com/npmlog/-/npmlog-4.1.2.tgz#08a7f2a8bf734604779a9efa4ad5cc717abb954b"
-  dependencies:
-    are-we-there-yet "~1.1.2"
-    console-control-strings "~1.1.0"
-    gauge "~2.7.3"
-    set-blocking "~2.0.0"
-
-num2fraction@^1.2.2:
-  version "1.2.2"
-  resolved "https://registry.yarnpkg.com/num2fraction/-/num2fraction-1.2.2.tgz#6f682b6a027a4e9ddfa4564cd2589d1d4e669ede"
-
-number-is-nan@^1.0.0:
-  version "1.0.1"
-  resolved "https://registry.yarnpkg.com/number-is-nan/-/number-is-nan-1.0.1.tgz#097b602b53422a522c1afb8790318336941a011d"
-
-oauth-sign@~0.8.2:
-  version "0.8.2"
-  resolved "https://registry.yarnpkg.com/oauth-sign/-/oauth-sign-0.8.2.tgz#46a6ab7f0aead8deae9ec0565780b7d4efeb9d43"
-
-oauth-sign@~0.9.0:
-  version "0.9.0"
-  resolved "https://registry.yarnpkg.com/oauth-sign/-/oauth-sign-0.9.0.tgz#47a7b016baa68b5fa0ecf3dee08a85c679ac6455"
-
-object-assign@4.X, object-assign@^4.0.0, object-assign@^4.0.1, object-assign@^4.1.0:
-  version "4.1.1"
-  resolved "https://registry.yarnpkg.com/object-assign/-/object-assign-4.1.1.tgz#2109adc7965887cfc05cbbd442cac8bfbb360863"
-
-object-assign@^2.0.0:
-  version "2.1.1"
-  resolved "https://registry.yarnpkg.com/object-assign/-/object-assign-2.1.1.tgz#43c36e5d569ff8e4816c4efa8be02d26967c18aa"
-
-object-assign@^3.0.0:
-  version "3.0.0"
-  resolved "https://registry.yarnpkg.com/object-assign/-/object-assign-3.0.0.tgz#9bedd5ca0897949bca47e7ff408062d549f587f2"
-
-object-copy@^0.1.0:
-  version "0.1.0"
-  resolved "https://registry.yarnpkg.com/object-copy/-/object-copy-0.1.0.tgz#7e7d858b781bd7c991a41ba975ed3812754e998c"
-  dependencies:
-    copy-descriptor "^0.1.0"
-    define-property "^0.2.5"
-    kind-of "^3.0.3"
-
-object-visit@^1.0.0:
-  version "1.0.1"
-  resolved "https://registry.yarnpkg.com/object-visit/-/object-visit-1.0.1.tgz#f79c4493af0c5377b59fe39d395e41042dd045bb"
-  dependencies:
-    isobject "^3.0.0"
-
-object.defaults@^1.1.0:
-  version "1.1.0"
-  resolved "https://registry.yarnpkg.com/object.defaults/-/object.defaults-1.1.0.tgz#3a7f868334b407dea06da16d88d5cd29e435fecf"
-  dependencies:
-    array-each "^1.0.1"
-    array-slice "^1.0.0"
-    for-own "^1.0.0"
-    isobject "^3.0.0"
-
-object.map@^1.0.0:
-  version "1.0.1"
-  resolved "https://registry.yarnpkg.com/object.map/-/object.map-1.0.1.tgz#cf83e59dc8fcc0ad5f4250e1f78b3b81bd801d37"
-  dependencies:
-    for-own "^1.0.0"
-    make-iterator "^1.0.0"
-
-object.omit@^2.0.0:
-  version "2.0.1"
-  resolved "https://registry.yarnpkg.com/object.omit/-/object.omit-2.0.1.tgz#1a9c744829f39dbb858c76ca3579ae2a54ebd1fa"
-  dependencies:
-    for-own "^0.1.4"
-    is-extendable "^0.1.1"
-
-object.pick@^1.1.1, object.pick@^1.2.0, object.pick@^1.3.0:
-  version "1.3.0"
-  resolved "https://registry.yarnpkg.com/object.pick/-/object.pick-1.3.0.tgz#87a10ac4c1694bd2e1cbf53591a66141fb5dd747"
-  dependencies:
-    isobject "^3.0.1"
-
-on-finished@~2.3.0:
-  version "2.3.0"
-  resolved "https://registry.yarnpkg.com/on-finished/-/on-finished-2.3.0.tgz#20f1336481b083cd75337992a16971aa2d906947"
-  dependencies:
-    ee-first "1.1.1"
-
-once@^1.3.0, once@^1.4.0:
-  version "1.4.0"
-  resolved "https://registry.yarnpkg.com/once/-/once-1.4.0.tgz#583b1aa775961d4b113ac17d9c50baef9dd76bd1"
-  dependencies:
-    wrappy "1"
-
-once@~1.3.0:
-  version "1.3.3"
-  resolved "https://registry.yarnpkg.com/once/-/once-1.3.3.tgz#b2e261557ce4c314ec8304f3fa82663e4297ca20"
-  dependencies:
-    wrappy "1"
-
-onetime@^1.0.0:
-  version "1.1.0"
-  resolved "http://registry.npmjs.org/onetime/-/onetime-1.1.0.tgz#a1f7838f8314c516f05ecefcbc4ccfe04b4ed789"
-
-optipng-bin@^3.0.0:
-  version "3.1.4"
-  resolved "https://registry.yarnpkg.com/optipng-bin/-/optipng-bin-3.1.4.tgz#95d34f2c488704f6fd70606bfea0c659f1d95d84"
-  dependencies:
-    bin-build "^2.0.0"
-    bin-wrapper "^3.0.0"
-    logalot "^2.0.0"
-
-orchestrator@^0.3.0:
-  version "0.3.8"
-  resolved "https://registry.yarnpkg.com/orchestrator/-/orchestrator-0.3.8.tgz#14e7e9e2764f7315fbac184e506c7aa6df94ad7e"
-  dependencies:
-    end-of-stream "~0.1.5"
-    sequencify "~0.0.7"
-    stream-consume "~0.1.0"
-
-ordered-read-streams@^0.1.0:
-  version "0.1.0"
-  resolved "https://registry.yarnpkg.com/ordered-read-streams/-/ordered-read-streams-0.1.0.tgz#fd565a9af8eb4473ba69b6ed8a34352cb552f126"
-
-ordered-read-streams@^0.3.0:
-  version "0.3.0"
-  resolved "https://registry.yarnpkg.com/ordered-read-streams/-/ordered-read-streams-0.3.0.tgz#7137e69b3298bb342247a1bbee3881c80e2fd78b"
-  dependencies:
-    is-stream "^1.0.1"
-    readable-stream "^2.0.1"
-
-os-filter-obj@^1.0.0:
-  version "1.0.3"
-  resolved "https://registry.yarnpkg.com/os-filter-obj/-/os-filter-obj-1.0.3.tgz#5915330d90eced557d2d938a31c6dd214d9c63ad"
-
-os-homedir@^1.0.0:
-  version "1.0.2"
-  resolved "https://registry.yarnpkg.com/os-homedir/-/os-homedir-1.0.2.tgz#ffbc4988336e0e833de0c168c7ef152121aa7fb3"
-
-os-locale@^1.4.0:
-  version "1.4.0"
-  resolved "http://registry.npmjs.org/os-locale/-/os-locale-1.4.0.tgz#20f9f17ae29ed345e8bde583b13d2009803c14d9"
-  dependencies:
-    lcid "^1.0.0"
-
-os-tmpdir@^1.0.0, os-tmpdir@^1.0.1:
-  version "1.0.2"
-  resolved "https://registry.yarnpkg.com/os-tmpdir/-/os-tmpdir-1.0.2.tgz#bbe67406c79aa85c5cfec766fe5734555dfa1274"
-
-osenv@0:
-  version "0.1.5"
-  resolved "https://registry.yarnpkg.com/osenv/-/osenv-0.1.5.tgz#85cdfafaeb28e8677f416e287592b5f3f49ea410"
-  dependencies:
-    os-homedir "^1.0.0"
-    os-tmpdir "^1.0.0"
-
-p-finally@^1.0.0:
-  version "1.0.0"
-  resolved "https://registry.yarnpkg.com/p-finally/-/p-finally-1.0.0.tgz#3fbcfb15b899a44123b34b6dcc18b724336a2cae"
-
-p-pipe@^1.1.0:
-  version "1.2.0"
-  resolved "https://registry.yarnpkg.com/p-pipe/-/p-pipe-1.2.0.tgz#4b1a11399a11520a67790ee5a0c1d5881d6befe9"
-
-parse-filepath@^1.0.1:
-  version "1.0.2"
-  resolved "https://registry.yarnpkg.com/parse-filepath/-/parse-filepath-1.0.2.tgz#a632127f53aaf3d15876f5872f3ffac763d6c891"
-  dependencies:
-    is-absolute "^1.0.0"
-    map-cache "^0.2.0"
-    path-root "^0.1.1"
-
-parse-glob@^3.0.4:
-  version "3.0.4"
-  resolved "https://registry.yarnpkg.com/parse-glob/-/parse-glob-3.0.4.tgz#b2c376cfb11f35513badd173ef0bb6e3a388391c"
-  dependencies:
-    glob-base "^0.3.0"
-    is-dotfile "^1.0.0"
-    is-extglob "^1.0.0"
-    is-glob "^2.0.0"
-
-parse-json@^2.1.0, parse-json@^2.2.0:
-  version "2.2.0"
-  resolved "https://registry.yarnpkg.com/parse-json/-/parse-json-2.2.0.tgz#f480f40434ef80741f8469099f8dea18f55a4dc9"
-  dependencies:
-    error-ex "^1.2.0"
-
-parse-passwd@^1.0.0:
-  version "1.0.0"
-  resolved "https://registry.yarnpkg.com/parse-passwd/-/parse-passwd-1.0.0.tgz#6d5b934a456993b23d37f40a382d6f1666a8e5c6"
-
-parseurl@~1.3.0:
-  version "1.3.2"
-  resolved "https://registry.yarnpkg.com/parseurl/-/parseurl-1.3.2.tgz#fc289d4ed8993119460c156253262cdc8de65bf3"
-
-pascalcase@^0.1.1:
-  version "0.1.1"
-  resolved "https://registry.yarnpkg.com/pascalcase/-/pascalcase-0.1.1.tgz#b363e55e8006ca6fe21784d2db22bd15d7917f14"
-
-path-dirname@^1.0.0:
-  version "1.0.2"
-  resolved "https://registry.yarnpkg.com/path-dirname/-/path-dirname-1.0.2.tgz#cc33d24d525e099a5388c0336c6e32b9160609e0"
-
-path-exists@^2.0.0:
-  version "2.1.0"
-  resolved "https://registry.yarnpkg.com/path-exists/-/path-exists-2.1.0.tgz#0feb6c64f0fc518d9a754dd5efb62c7022761f4b"
-  dependencies:
-    pinkie-promise "^2.0.0"
-
-path-is-absolute@^1.0.0, path-is-absolute@^1.0.1:
-  version "1.0.1"
-  resolved "https://registry.yarnpkg.com/path-is-absolute/-/path-is-absolute-1.0.1.tgz#174b9268735534ffbc7ace6bf53a5a9e1b5c5f5f"
-
-path-is-inside@^1.0.1:
-  version "1.0.2"
-  resolved "https://registry.yarnpkg.com/path-is-inside/-/path-is-inside-1.0.2.tgz#365417dede44430d1c11af61027facf074bdfc53"
-
-path-key@^2.0.0:
-  version "2.0.1"
-  resolved "https://registry.yarnpkg.com/path-key/-/path-key-2.0.1.tgz#411cadb574c5a140d3a4b1910d40d80cc9f40b40"
-
-path-parse@^1.0.5:
-  version "1.0.6"
-  resolved "https://registry.yarnpkg.com/path-parse/-/path-parse-1.0.6.tgz#d62dbb5679405d72c4737ec58600e9ddcf06d24c"
-
-path-root-regex@^0.1.0:
-  version "0.1.2"
-  resolved "https://registry.yarnpkg.com/path-root-regex/-/path-root-regex-0.1.2.tgz#bfccdc8df5b12dc52c8b43ec38d18d72c04ba96d"
-
-path-root@^0.1.1:
-  version "0.1.1"
-  resolved "https://registry.yarnpkg.com/path-root/-/path-root-0.1.1.tgz#9a4a6814cac1c0cd73360a95f32083c8ea4745b7"
-  dependencies:
-    path-root-regex "^0.1.0"
-
-path-type@^1.0.0:
-  version "1.1.0"
-  resolved "https://registry.yarnpkg.com/path-type/-/path-type-1.1.0.tgz#59c44f7ee491da704da415da5a4070ba4f8fe441"
-  dependencies:
-    graceful-fs "^4.1.2"
-    pify "^2.0.0"
-    pinkie-promise "^2.0.0"
-
-pause-stream@0.0.11, pause-stream@^0.0.11:
-  version "0.0.11"
-  resolved "http://registry.npmjs.org/pause-stream/-/pause-stream-0.0.11.tgz#fe5a34b0cbce12b5aa6a2b403ee2e73b602f1445"
-  dependencies:
-    through "~2.3"
-
-pend@~1.2.0:
-  version "1.2.0"
-  resolved "https://registry.yarnpkg.com/pend/-/pend-1.2.0.tgz#7a57eb550a6783f9115331fcf4663d5c8e007a50"
-
-performance-now@^2.1.0:
-  version "2.1.0"
-  resolved "https://registry.yarnpkg.com/performance-now/-/performance-now-2.1.0.tgz#6309f4e0e5fa913ec1c69307ae364b4b377c9e7b"
-
-phantom@~4.0.1:
-  version "4.0.12"
-  resolved "https://registry.yarnpkg.com/phantom/-/phantom-4.0.12.tgz#78d18cf3f2a76fea4909f6160fcabf2742d7dbf0"
-  dependencies:
-    phantomjs-prebuilt "^2.1.16"
-    split "^1.0.1"
-    winston "^2.4.0"
-
-phantomjs-prebuilt@^2.1.16, phantomjs-prebuilt@~2.1.7:
-  version "2.1.16"
-  resolved "https://registry.yarnpkg.com/phantomjs-prebuilt/-/phantomjs-prebuilt-2.1.16.tgz#efd212a4a3966d3647684ea8ba788549be2aefef"
-  dependencies:
-    es6-promise "^4.0.3"
-    extract-zip "^1.6.5"
-    fs-extra "^1.0.0"
-    hasha "^2.2.0"
-    kew "^0.7.0"
-    progress "^1.1.8"
-    request "^2.81.0"
-    request-progress "^2.0.1"
-    which "^1.2.10"
-
-pify@^2.0.0, pify@^2.3.0:
-  version "2.3.0"
-  resolved "https://registry.yarnpkg.com/pify/-/pify-2.3.0.tgz#ed141a6ac043a849ea588498e7dca8b15330e90c"
-
-pify@^3.0.0:
-  version "3.0.0"
-  resolved "https://registry.yarnpkg.com/pify/-/pify-3.0.0.tgz#e5a4acd2c101fdf3d9a4d07f0dbc4db49dd28176"
-
-pinkie-promise@^2.0.0:
-  version "2.0.1"
-  resolved "https://registry.yarnpkg.com/pinkie-promise/-/pinkie-promise-2.0.1.tgz#2135d6dfa7a358c069ac9b178776288228450ffa"
-  dependencies:
-    pinkie "^2.0.0"
-
-pinkie@^2.0.0:
-  version "2.0.4"
-  resolved "https://registry.yarnpkg.com/pinkie/-/pinkie-2.0.4.tgz#72556b80cfa0d48a974e80e77248e80ed4f7f870"
-
-plugin-error@^0.1.2:
-  version "0.1.2"
-  resolved "https://registry.yarnpkg.com/plugin-error/-/plugin-error-0.1.2.tgz#3b9bb3335ccf00f425e07437e19276967da47ace"
-  dependencies:
-    ansi-cyan "^0.1.1"
-    ansi-red "^0.1.1"
-    arr-diff "^1.0.1"
-    arr-union "^2.0.1"
-    extend-shallow "^1.1.2"
-
-plugin-error@^1.0.1:
-  version "1.0.1"
-  resolved "https://registry.yarnpkg.com/plugin-error/-/plugin-error-1.0.1.tgz#77016bd8919d0ac377fdcdd0322328953ca5781c"
-  dependencies:
-    ansi-colors "^1.0.1"
-    arr-diff "^4.0.0"
-    arr-union "^3.1.0"
-    extend-shallow "^3.0.2"
-
-plur@^2.1.2:
-  version "2.1.2"
-  resolved "https://registry.yarnpkg.com/plur/-/plur-2.1.2.tgz#7482452c1a0f508e3e344eaec312c91c29dc655a"
-  dependencies:
-    irregular-plurals "^1.0.0"
-
-posix-character-classes@^0.1.0:
-  version "0.1.1"
-  resolved "https://registry.yarnpkg.com/posix-character-classes/-/posix-character-classes-0.1.1.tgz#01eac0fe3b5af71a2a6c02feabb8c1fef7e00eab"
-
-postcss-calc@^5.2.0:
-  version "5.3.1"
-  resolved "http://registry.npmjs.org/postcss-calc/-/postcss-calc-5.3.1.tgz#77bae7ca928ad85716e2fda42f261bf7c1d65b5e"
-  dependencies:
-    postcss "^5.0.2"
-    postcss-message-helpers "^2.0.0"
-    reduce-css-calc "^1.2.6"
-
-postcss-colormin@^2.1.8:
-  version "2.2.2"
-  resolved "https://registry.yarnpkg.com/postcss-colormin/-/postcss-colormin-2.2.2.tgz#6631417d5f0e909a3d7ec26b24c8a8d1e4f96e4b"
-  dependencies:
-    colormin "^1.0.5"
-    postcss "^5.0.13"
-    postcss-value-parser "^3.2.3"
-
-postcss-convert-values@^2.3.4:
-  version "2.6.1"
-  resolved "https://registry.yarnpkg.com/postcss-convert-values/-/postcss-convert-values-2.6.1.tgz#bbd8593c5c1fd2e3d1c322bb925dcae8dae4d62d"
-  dependencies:
-    postcss "^5.0.11"
-    postcss-value-parser "^3.1.2"
-
-postcss-discard-comments@^2.0.4:
-  version "2.0.4"
-  resolved "http://registry.npmjs.org/postcss-discard-comments/-/postcss-discard-comments-2.0.4.tgz#befe89fafd5b3dace5ccce51b76b81514be00e3d"
-  dependencies:
-    postcss "^5.0.14"
-
-postcss-discard-duplicates@^2.0.1:
-  version "2.1.0"
-  resolved "https://registry.yarnpkg.com/postcss-discard-duplicates/-/postcss-discard-duplicates-2.1.0.tgz#b9abf27b88ac188158a5eb12abcae20263b91932"
-  dependencies:
-    postcss "^5.0.4"
-
-postcss-discard-empty@^2.0.1:
-  version "2.1.0"
-  resolved "http://registry.npmjs.org/postcss-discard-empty/-/postcss-discard-empty-2.1.0.tgz#d2b4bd9d5ced5ebd8dcade7640c7d7cd7f4f92b5"
-  dependencies:
-    postcss "^5.0.14"
-
-postcss-discard-overridden@^0.1.1:
-  version "0.1.1"
-  resolved "http://registry.npmjs.org/postcss-discard-overridden/-/postcss-discard-overridden-0.1.1.tgz#8b1eaf554f686fb288cd874c55667b0aa3668d58"
-  dependencies:
-    postcss "^5.0.16"
-
-postcss-discard-unused@^2.2.1:
-  version "2.2.3"
-  resolved "http://registry.npmjs.org/postcss-discard-unused/-/postcss-discard-unused-2.2.3.tgz#bce30b2cc591ffc634322b5fb3464b6d934f4433"
-  dependencies:
-    postcss "^5.0.14"
-    uniqs "^2.0.0"
-
-postcss-filter-plugins@^2.0.0:
-  version "2.0.3"
-  resolved "https://registry.yarnpkg.com/postcss-filter-plugins/-/postcss-filter-plugins-2.0.3.tgz#82245fdf82337041645e477114d8e593aa18b8ec"
-  dependencies:
-    postcss "^5.0.4"
-
-postcss-merge-idents@^2.1.5:
-  version "2.1.7"
-  resolved "http://registry.npmjs.org/postcss-merge-idents/-/postcss-merge-idents-2.1.7.tgz#4c5530313c08e1d5b3bbf3d2bbc747e278eea270"
-  dependencies:
-    has "^1.0.1"
-    postcss "^5.0.10"
-    postcss-value-parser "^3.1.1"
-
-postcss-merge-longhand@^2.0.1:
-  version "2.0.2"
-  resolved "https://registry.yarnpkg.com/postcss-merge-longhand/-/postcss-merge-longhand-2.0.2.tgz#23d90cd127b0a77994915332739034a1a4f3d658"
-  dependencies:
-    postcss "^5.0.4"
-
-postcss-merge-rules@^2.0.3:
-  version "2.1.2"
-  resolved "https://registry.yarnpkg.com/postcss-merge-rules/-/postcss-merge-rules-2.1.2.tgz#d1df5dfaa7b1acc3be553f0e9e10e87c61b5f721"
-  dependencies:
-    browserslist "^1.5.2"
-    caniuse-api "^1.5.2"
-    postcss "^5.0.4"
-    postcss-selector-parser "^2.2.2"
-    vendors "^1.0.0"
-
-postcss-message-helpers@^2.0.0:
-  version "2.0.0"
-  resolved "https://registry.yarnpkg.com/postcss-message-helpers/-/postcss-message-helpers-2.0.0.tgz#a4f2f4fab6e4fe002f0aed000478cdf52f9ba60e"
-
-postcss-minify-font-values@^1.0.2:
-  version "1.0.5"
-  resolved "http://registry.npmjs.org/postcss-minify-font-values/-/postcss-minify-font-values-1.0.5.tgz#4b58edb56641eba7c8474ab3526cafd7bbdecb69"
-  dependencies:
-    object-assign "^4.0.1"
-    postcss "^5.0.4"
-    postcss-value-parser "^3.0.2"
-
-postcss-minify-gradients@^1.0.1:
-  version "1.0.5"
-  resolved "http://registry.npmjs.org/postcss-minify-gradients/-/postcss-minify-gradients-1.0.5.tgz#5dbda11373703f83cfb4a3ea3881d8d75ff5e6e1"
-  dependencies:
-    postcss "^5.0.12"
-    postcss-value-parser "^3.3.0"
-
-postcss-minify-params@^1.0.4:
-  version "1.2.2"
-  resolved "http://registry.npmjs.org/postcss-minify-params/-/postcss-minify-params-1.2.2.tgz#ad2ce071373b943b3d930a3fa59a358c28d6f1f3"
-  dependencies:
-    alphanum-sort "^1.0.1"
-    postcss "^5.0.2"
-    postcss-value-parser "^3.0.2"
-    uniqs "^2.0.0"
-
-postcss-minify-selectors@^2.0.4:
-  version "2.1.1"
-  resolved "http://registry.npmjs.org/postcss-minify-selectors/-/postcss-minify-selectors-2.1.1.tgz#b2c6a98c0072cf91b932d1a496508114311735bf"
-  dependencies:
-    alphanum-sort "^1.0.2"
-    has "^1.0.1"
-    postcss "^5.0.14"
-    postcss-selector-parser "^2.0.0"
-
-postcss-normalize-charset@^1.1.0:
-  version "1.1.1"
-  resolved "http://registry.npmjs.org/postcss-normalize-charset/-/postcss-normalize-charset-1.1.1.tgz#ef9ee71212d7fe759c78ed162f61ed62b5cb93f1"
-  dependencies:
-    postcss "^5.0.5"
-
-postcss-normalize-url@^3.0.7:
-  version "3.0.8"
-  resolved "http://registry.npmjs.org/postcss-normalize-url/-/postcss-normalize-url-3.0.8.tgz#108f74b3f2fcdaf891a2ffa3ea4592279fc78222"
-  dependencies:
-    is-absolute-url "^2.0.0"
-    normalize-url "^1.4.0"
-    postcss "^5.0.14"
-    postcss-value-parser "^3.2.3"
-
-postcss-ordered-values@^2.1.0:
-  version "2.2.3"
-  resolved "https://registry.yarnpkg.com/postcss-ordered-values/-/postcss-ordered-values-2.2.3.tgz#eec6c2a67b6c412a8db2042e77fe8da43f95c11d"
-  dependencies:
-    postcss "^5.0.4"
-    postcss-value-parser "^3.0.1"
-
-postcss-reduce-idents@^2.2.2:
-  version "2.4.0"
-  resolved "http://registry.npmjs.org/postcss-reduce-idents/-/postcss-reduce-idents-2.4.0.tgz#c2c6d20cc958284f6abfbe63f7609bf409059ad3"
-  dependencies:
-    postcss "^5.0.4"
-    postcss-value-parser "^3.0.2"
-
-postcss-reduce-initial@^1.0.0:
-  version "1.0.1"
-  resolved "http://registry.npmjs.org/postcss-reduce-initial/-/postcss-reduce-initial-1.0.1.tgz#68f80695f045d08263a879ad240df8dd64f644ea"
-  dependencies:
-    postcss "^5.0.4"
-
-postcss-reduce-transforms@^1.0.3:
-  version "1.0.4"
-  resolved "http://registry.npmjs.org/postcss-reduce-transforms/-/postcss-reduce-transforms-1.0.4.tgz#ff76f4d8212437b31c298a42d2e1444025771ae1"
-  dependencies:
-    has "^1.0.1"
-    postcss "^5.0.8"
-    postcss-value-parser "^3.0.1"
-
-postcss-selector-parser@^2.0.0, postcss-selector-parser@^2.2.2:
-  version "2.2.3"
-  resolved "https://registry.yarnpkg.com/postcss-selector-parser/-/postcss-selector-parser-2.2.3.tgz#f9437788606c3c9acee16ffe8d8b16297f27bb90"
-  dependencies:
-    flatten "^1.0.2"
-    indexes-of "^1.0.1"
-    uniq "^1.0.1"
-
-postcss-svgo@^2.1.1:
-  version "2.1.6"
-  resolved "http://registry.npmjs.org/postcss-svgo/-/postcss-svgo-2.1.6.tgz#b6df18aa613b666e133f08adb5219c2684ac108d"
-  dependencies:
-    is-svg "^2.0.0"
-    postcss "^5.0.14"
-    postcss-value-parser "^3.2.3"
-    svgo "^0.7.0"
-
-postcss-unique-selectors@^2.0.2:
-  version "2.0.2"
-  resolved "http://registry.npmjs.org/postcss-unique-selectors/-/postcss-unique-selectors-2.0.2.tgz#981d57d29ddcb33e7b1dfe1fd43b8649f933ca1d"
-  dependencies:
-    alphanum-sort "^1.0.1"
-    postcss "^5.0.4"
-    uniqs "^2.0.0"
-
-postcss-value-parser@^3.0.1, postcss-value-parser@^3.0.2, postcss-value-parser@^3.1.1, postcss-value-parser@^3.1.2, postcss-value-parser@^3.2.3, postcss-value-parser@^3.3.0:
-  version "3.3.0"
-  resolved "https://registry.yarnpkg.com/postcss-value-parser/-/postcss-value-parser-3.3.0.tgz#87f38f9f18f774a4ab4c8a232f5c5ce8872a9d15"
-
-postcss-zindex@^2.0.1:
-  version "2.2.0"
-  resolved "http://registry.npmjs.org/postcss-zindex/-/postcss-zindex-2.2.0.tgz#d2109ddc055b91af67fc4cb3b025946639d2af22"
-  dependencies:
-    has "^1.0.1"
-    postcss "^5.0.4"
-    uniqs "^2.0.0"
-
-postcss@^5.0.10, postcss@^5.0.11, postcss@^5.0.12, postcss@^5.0.13, postcss@^5.0.14, postcss@^5.0.16, postcss@^5.0.2, postcss@^5.0.4, postcss@^5.0.5, postcss@^5.0.8, postcss@^5.2.16:
-  version "5.2.18"
-  resolved "https://registry.yarnpkg.com/postcss/-/postcss-5.2.18.tgz#badfa1497d46244f6390f58b319830d9107853c5"
-  dependencies:
-    chalk "^1.1.3"
-    js-base64 "^2.1.9"
-    source-map "^0.5.6"
-    supports-color "^3.2.3"
-
-prepend-http@^1.0.0, prepend-http@^1.0.1:
-  version "1.0.4"
-  resolved "https://registry.yarnpkg.com/prepend-http/-/prepend-http-1.0.4.tgz#d4f4562b0ce3696e41ac52d0e002e57a635dc6dc"
-
-preserve@^0.2.0:
-  version "0.2.0"
-  resolved "https://registry.yarnpkg.com/preserve/-/preserve-0.2.0.tgz#815ed1f6ebc65926f865b310c0713bcb3315ce4b"
-
-pretty-bytes@^4.0.2:
-  version "4.0.2"
-  resolved "https://registry.yarnpkg.com/pretty-bytes/-/pretty-bytes-4.0.2.tgz#b2bf82e7350d65c6c33aa95aaa5a4f6327f61cd9"
-
-pretty-hrtime@^1.0.0:
-  version "1.0.3"
-  resolved "https://registry.yarnpkg.com/pretty-hrtime/-/pretty-hrtime-1.0.3.tgz#b7e3ea42435a4c9b2759d99e0f201eb195802ee1"
-
-private@^0.1.6, private@^0.1.8:
-  version "0.1.8"
-  resolved "https://registry.yarnpkg.com/private/-/private-0.1.8.tgz#2381edb3689f7a53d653190060fcf822d2f368ff"
-
-process-nextick-args@^2.0.0, process-nextick-args@~2.0.0:
-  version "2.0.0"
-  resolved "https://registry.yarnpkg.com/process-nextick-args/-/process-nextick-args-2.0.0.tgz#a37d732f4271b4ab1ad070d35508e8290788ffaa"
-
-progress@^1.1.8:
-  version "1.1.8"
-  resolved "https://registry.yarnpkg.com/progress/-/progress-1.1.8.tgz#e260c78f6161cdd9b0e56cc3e0a85de17c7a57be"
-
-pseudomap@^1.0.2:
-  version "1.0.2"
-  resolved "https://registry.yarnpkg.com/pseudomap/-/pseudomap-1.0.2.tgz#f052a28da70e618917ef0a8ac34c1ae5a68286b3"
-
-psl@^1.1.24:
-  version "1.1.29"
-  resolved "https://registry.yarnpkg.com/psl/-/psl-1.1.29.tgz#60f580d360170bb722a797cc704411e6da850c67"
-
-punycode@^1.4.1:
-  version "1.4.1"
-  resolved "https://registry.yarnpkg.com/punycode/-/punycode-1.4.1.tgz#c0d5a63b2718800ad8e1eb0fa5269c84dd41845e"
-
-q@^1.1.2:
-  version "1.5.1"
-  resolved "https://registry.yarnpkg.com/q/-/q-1.5.1.tgz#7e32f75b41381291d04611f1bf14109ac00651d7"
-
-qs@5.2.0:
-  version "5.2.0"
-  resolved "https://registry.yarnpkg.com/qs/-/qs-5.2.0.tgz#a9f31142af468cb72b25b30136ba2456834916be"
-
-qs@~2.2.3:
-  version "2.2.5"
-  resolved "https://registry.yarnpkg.com/qs/-/qs-2.2.5.tgz#1088abaf9dcc0ae5ae45b709e6c6b5888b23923c"
-
-qs@~6.5.1, qs@~6.5.2:
-  version "6.5.2"
-  resolved "https://registry.yarnpkg.com/qs/-/qs-6.5.2.tgz#cb3ae806e8740444584ef154ce8ee98d403f3e36"
-
-query-string@^4.1.0:
-  version "4.3.4"
-  resolved "https://registry.yarnpkg.com/query-string/-/query-string-4.3.4.tgz#bbb693b9ca915c232515b228b1a02b609043dbeb"
-  dependencies:
-    object-assign "^4.1.0"
-    strict-uri-encode "^1.0.0"
-
-randomatic@^3.0.0:
-  version "3.1.0"
-  resolved "https://registry.yarnpkg.com/randomatic/-/randomatic-3.1.0.tgz#36f2ca708e9e567f5ed2ec01949026d50aa10116"
-  dependencies:
-    is-number "^4.0.0"
-    kind-of "^6.0.0"
-    math-random "^1.0.1"
-
-raw-body@~2.1.5:
-  version "2.1.7"
-  resolved "https://registry.yarnpkg.com/raw-body/-/raw-body-2.1.7.tgz#adfeace2e4fb3098058014d08c072dcc59758774"
-  dependencies:
-    bytes "2.4.0"
-    iconv-lite "0.4.13"
-    unpipe "1.0.0"
-
-rc@^1.1.2:
-  version "1.2.8"
-  resolved "https://registry.yarnpkg.com/rc/-/rc-1.2.8.tgz#cd924bf5200a075b83c188cd6b9e211b7fc0d3ed"
-  dependencies:
-    deep-extend "^0.6.0"
-    ini "~1.3.0"
-    minimist "^1.2.0"
-    strip-json-comments "~2.0.1"
-
-rcfinder@^0.1.6:
-  version "0.1.9"
-  resolved "https://registry.yarnpkg.com/rcfinder/-/rcfinder-0.1.9.tgz#f3e80f387ddf9ae80ae30a4100329642eae81115"
-  dependencies:
-    lodash.clonedeep "^4.3.2"
-
-rcloader@^0.2.2:
-  version "0.2.2"
-  resolved "https://registry.yarnpkg.com/rcloader/-/rcloader-0.2.2.tgz#58d2298b462d0b9bfd2133d2a1ec74fbd705c717"
-  dependencies:
-    lodash.assign "^4.2.0"
-    lodash.isobject "^3.0.2"
-    lodash.merge "^4.6.0"
-    rcfinder "^0.1.6"
-
-read-all-stream@^3.0.0:
-  version "3.1.0"
-  resolved "https://registry.yarnpkg.com/read-all-stream/-/read-all-stream-3.1.0.tgz#35c3e177f2078ef789ee4bfafa4373074eaef4fa"
-  dependencies:
-    pinkie-promise "^2.0.0"
-    readable-stream "^2.0.0"
-
-read-pkg-up@^1.0.1:
-  version "1.0.1"
-  resolved "https://registry.yarnpkg.com/read-pkg-up/-/read-pkg-up-1.0.1.tgz#9d63c13276c065918d57f002a57f40a1b643fb02"
-  dependencies:
-    find-up "^1.0.0"
-    read-pkg "^1.0.0"
-
-read-pkg@^1.0.0:
-  version "1.1.0"
-  resolved "https://registry.yarnpkg.com/read-pkg/-/read-pkg-1.1.0.tgz#f5ffaa5ecd29cb31c0474bca7d756b6bb29e3f28"
-  dependencies:
-    load-json-file "^1.0.0"
-    normalize-package-data "^2.3.2"
-    path-type "^1.0.0"
-
-readable-stream@1.1:
-  version "1.1.13"
-  resolved "http://registry.npmjs.org/readable-stream/-/readable-stream-1.1.13.tgz#f6eef764f514c89e2b9e23146a75ba106756d23e"
-  dependencies:
-    core-util-is "~1.0.0"
-    inherits "~2.0.1"
-    isarray "0.0.1"
-    string_decoder "~0.10.x"
-
-"readable-stream@>=1.0.33-1 <1.1.0-0", readable-stream@~1.0.17:
-  version "1.0.34"
-  resolved "http://registry.npmjs.org/readable-stream/-/readable-stream-1.0.34.tgz#125820e34bc842d2f2aaafafe4c2916ee32c157c"
-  dependencies:
-    core-util-is "~1.0.0"
-    inherits "~2.0.1"
-    isarray "0.0.1"
-    string_decoder "~0.10.x"
-
-readable-stream@^1.0.26-2, readable-stream@^1.0.26-4, readable-stream@~1.1.9:
-  version "1.1.14"
-  resolved "http://registry.npmjs.org/readable-stream/-/readable-stream-1.1.14.tgz#7cf4c54ef648e3813084c636dd2079e166c081d9"
-  dependencies:
-    core-util-is "~1.0.0"
-    inherits "~2.0.1"
-    isarray "0.0.1"
-    string_decoder "~0.10.x"
-
-readable-stream@^2.0.0, readable-stream@^2.0.1, readable-stream@^2.0.2, readable-stream@^2.0.4, readable-stream@^2.0.5, readable-stream@^2.0.6, readable-stream@^2.1.5, readable-stream@^2.2.2, readable-stream@^2.3.0, readable-stream@^2.3.5:
-  version "2.3.6"
-  resolved "http://registry.npmjs.org/readable-stream/-/readable-stream-2.3.6.tgz#b11c27d88b8ff1fbe070643cf94b0c79ae1b0aaf"
-  dependencies:
-    core-util-is "~1.0.0"
-    inherits "~2.0.3"
-    isarray "~1.0.0"
-    process-nextick-args "~2.0.0"
-    safe-buffer "~5.1.1"
-    string_decoder "~1.1.1"
-    util-deprecate "~1.0.1"
-
-rechoir@^0.6.2:
-  version "0.6.2"
-  resolved "https://registry.yarnpkg.com/rechoir/-/rechoir-0.6.2.tgz#85204b54dba82d5742e28c96756ef43af50e3384"
-  dependencies:
-    resolve "^1.1.6"
-
-redent@^1.0.0:
-  version "1.0.0"
-  resolved "https://registry.yarnpkg.com/redent/-/redent-1.0.0.tgz#cf916ab1fd5f1f16dfb20822dd6ec7f730c2afde"
-  dependencies:
-    indent-string "^2.1.0"
-    strip-indent "^1.0.1"
-
-reduce-css-calc@^1.2.6:
-  version "1.3.0"
-  resolved "http://registry.npmjs.org/reduce-css-calc/-/reduce-css-calc-1.3.0.tgz#747c914e049614a4c9cfbba629871ad1d2927716"
-  dependencies:
-    balanced-match "^0.4.2"
-    math-expression-evaluator "^1.2.14"
-    reduce-function-call "^1.0.1"
-
-reduce-function-call@^1.0.1:
-  version "1.0.2"
-  resolved "https://registry.yarnpkg.com/reduce-function-call/-/reduce-function-call-1.0.2.tgz#5a200bf92e0e37751752fe45b0ab330fd4b6be99"
-  dependencies:
-    balanced-match "^0.4.2"
-
-regenerate@^1.2.1:
-  version "1.4.0"
-  resolved "https://registry.yarnpkg.com/regenerate/-/regenerate-1.4.0.tgz#4a856ec4b56e4077c557589cae85e7a4c8869a11"
-
-regenerator-runtime@^0.11.0:
-  version "0.11.1"
-  resolved "https://registry.yarnpkg.com/regenerator-runtime/-/regenerator-runtime-0.11.1.tgz#be05ad7f9bf7d22e056f9726cee5017fbf19e2e9"
-
-regenerator-transform@^0.10.0:
-  version "0.10.1"
-  resolved "https://registry.yarnpkg.com/regenerator-transform/-/regenerator-transform-0.10.1.tgz#1e4996837231da8b7f3cf4114d71b5691a0680dd"
-  dependencies:
-    babel-runtime "^6.18.0"
-    babel-types "^6.19.0"
-    private "^0.1.6"
-
-regex-cache@^0.4.2:
-  version "0.4.4"
-  resolved "https://registry.yarnpkg.com/regex-cache/-/regex-cache-0.4.4.tgz#75bdc58a2a1496cec48a12835bc54c8d562336dd"
-  dependencies:
-    is-equal-shallow "^0.1.3"
-
-regex-not@^1.0.0, regex-not@^1.0.2:
-  version "1.0.2"
-  resolved "https://registry.yarnpkg.com/regex-not/-/regex-not-1.0.2.tgz#1f4ece27e00b0b65e0247a6810e6a85d83a5752c"
-  dependencies:
-    extend-shallow "^3.0.2"
-    safe-regex "^1.1.0"
-
-regexpu-core@^2.0.0:
-  version "2.0.0"
-  resolved "https://registry.yarnpkg.com/regexpu-core/-/regexpu-core-2.0.0.tgz#49d038837b8dcf8bfa5b9a42139938e6ea2ae240"
-  dependencies:
-    regenerate "^1.2.1"
-    regjsgen "^0.2.0"
-    regjsparser "^0.1.4"
-
-regjsgen@^0.2.0:
-  version "0.2.0"
-  resolved "https://registry.yarnpkg.com/regjsgen/-/regjsgen-0.2.0.tgz#6c016adeac554f75823fe37ac05b92d5a4edb1f7"
-
-regjsparser@^0.1.4:
-  version "0.1.5"
-  resolved "https://registry.yarnpkg.com/regjsparser/-/regjsparser-0.1.5.tgz#7ee8f84dc6fa792d3fd0ae228d24bd949ead205c"
-  dependencies:
-    jsesc "~0.5.0"
-
-remove-trailing-separator@^1.0.1:
-  version "1.1.0"
-  resolved "https://registry.yarnpkg.com/remove-trailing-separator/-/remove-trailing-separator-1.1.0.tgz#c24bce2a283adad5bc3f58e0d48249b92379d8ef"
-
-repeat-element@^1.1.2:
-  version "1.1.3"
-  resolved "https://registry.yarnpkg.com/repeat-element/-/repeat-element-1.1.3.tgz#782e0d825c0c5a3bb39731f84efee6b742e6b1ce"
-
-repeat-string@^1.5.2, repeat-string@^1.6.1:
-  version "1.6.1"
-  resolved "https://registry.yarnpkg.com/repeat-string/-/repeat-string-1.6.1.tgz#8dcae470e1c88abc2d600fff4a776286da75e637"
-
-repeating@^2.0.0:
-  version "2.0.1"
-  resolved "https://registry.yarnpkg.com/repeating/-/repeating-2.0.1.tgz#5214c53a926d3552707527fbab415dbc08d06dda"
-  dependencies:
-    is-finite "^1.0.0"
-
-replace-ext@0.0.1:
-  version "0.0.1"
-  resolved "https://registry.yarnpkg.com/replace-ext/-/replace-ext-0.0.1.tgz#29bbd92078a739f0bcce2b4ee41e837953522924"
-
-replace-ext@^1.0.0:
-  version "1.0.0"
-  resolved "https://registry.yarnpkg.com/replace-ext/-/replace-ext-1.0.0.tgz#de63128373fcbf7c3ccfa4de5a480c45a67958eb"
-
-request-progress@^2.0.1:
-  version "2.0.1"
-  resolved "https://registry.yarnpkg.com/request-progress/-/request-progress-2.0.1.tgz#5d36bb57961c673aa5b788dbc8141fdf23b44e08"
-  dependencies:
-    throttleit "^1.0.0"
-
-request@2.87.0:
-  version "2.87.0"
-  resolved "https://registry.yarnpkg.com/request/-/request-2.87.0.tgz#32f00235cd08d482b4d0d68db93a829c0ed5756e"
-  dependencies:
-    aws-sign2 "~0.7.0"
-    aws4 "^1.6.0"
-    caseless "~0.12.0"
-    combined-stream "~1.0.5"
-    extend "~3.0.1"
-    forever-agent "~0.6.1"
-    form-data "~2.3.1"
-    har-validator "~5.0.3"
-    http-signature "~1.2.0"
-    is-typedarray "~1.0.0"
-    isstream "~0.1.2"
-    json-stringify-safe "~5.0.1"
-    mime-types "~2.1.17"
-    oauth-sign "~0.8.2"
-    performance-now "^2.1.0"
-    qs "~6.5.1"
-    safe-buffer "^5.1.1"
-    tough-cookie "~2.3.3"
-    tunnel-agent "^0.6.0"
-    uuid "^3.1.0"
-
-request@^2.81.0, request@^2.87.0:
-  version "2.88.0"
-  resolved "https://registry.yarnpkg.com/request/-/request-2.88.0.tgz#9c2fca4f7d35b592efe57c7f0a55e81052124fef"
-  dependencies:
-    aws-sign2 "~0.7.0"
-    aws4 "^1.8.0"
-    caseless "~0.12.0"
-    combined-stream "~1.0.6"
-    extend "~3.0.2"
-    forever-agent "~0.6.1"
-    form-data "~2.3.2"
-    har-validator "~5.1.0"
-    http-signature "~1.2.0"
-    is-typedarray "~1.0.0"
-    isstream "~0.1.2"
-    json-stringify-safe "~5.0.1"
-    mime-types "~2.1.19"
-    oauth-sign "~0.9.0"
-    performance-now "^2.1.0"
-    qs "~6.5.2"
-    safe-buffer "^5.1.2"
-    tough-cookie "~2.4.3"
-    tunnel-agent "^0.6.0"
-    uuid "^3.3.2"
-
-require-directory@^2.1.1:
-  version "2.1.1"
-  resolved "https://registry.yarnpkg.com/require-directory/-/require-directory-2.1.1.tgz#8c64ad5fd30dab1c976e2344ffe7f792a6a6df42"
-
-require-main-filename@^1.0.1:
-  version "1.0.1"
-  resolved "https://registry.yarnpkg.com/require-main-filename/-/require-main-filename-1.0.1.tgz#97f717b69d48784f5f526a6c5aa8ffdda055a4d1"
-
-resolve-dir@^1.0.0, resolve-dir@^1.0.1:
-  version "1.0.1"
-  resolved "https://registry.yarnpkg.com/resolve-dir/-/resolve-dir-1.0.1.tgz#79a40644c362be82f26effe739c9bb5382046f43"
-  dependencies:
-    expand-tilde "^2.0.0"
-    global-modules "^1.0.0"
-
-resolve-url@^0.2.1:
-  version "0.2.1"
-  resolved "https://registry.yarnpkg.com/resolve-url/-/resolve-url-0.2.1.tgz#2c637fe77c893afd2a663fe21aa9080068e2052a"
-
-resolve@^1.1.6, resolve@^1.1.7:
-  version "1.8.1"
-  resolved "https://registry.yarnpkg.com/resolve/-/resolve-1.8.1.tgz#82f1ec19a423ac1fbd080b0bab06ba36e84a7a26"
-  dependencies:
-    path-parse "^1.0.5"
-
-ret@~0.1.10:
-  version "0.1.15"
-  resolved "https://registry.yarnpkg.com/ret/-/ret-0.1.15.tgz#b8a4825d5bdb1fc3f6f53c2bc33f81388681c7bc"
-
-right-align@^0.1.1:
-  version "0.1.3"
-  resolved "https://registry.yarnpkg.com/right-align/-/right-align-0.1.3.tgz#61339b722fe6a3515689210d24e14c96148613ef"
-  dependencies:
-    align-text "^0.1.1"
-
-rimraf@2, rimraf@^2.2.6, rimraf@^2.2.8, rimraf@^2.4.0, rimraf@^2.5.4:
-  version "2.6.2"
-  resolved "https://registry.yarnpkg.com/rimraf/-/rimraf-2.6.2.tgz#2ed8150d24a16ea8651e6d6ef0f47c4158ce7a36"
-  dependencies:
-    glob "^7.0.5"
-
-safe-buffer@^5.0.1, safe-buffer@^5.1.1, safe-buffer@^5.1.2, safe-buffer@~5.1.0, safe-buffer@~5.1.1:
-  version "5.1.2"
-  resolved "https://registry.yarnpkg.com/safe-buffer/-/safe-buffer-5.1.2.tgz#991ec69d296e0313747d59bdfd2b745c35f8828d"
-
-safe-regex@^1.1.0:
-  version "1.1.0"
-  resolved "https://registry.yarnpkg.com/safe-regex/-/safe-regex-1.1.0.tgz#40a3669f3b077d1e943d44629e157dd48023bf2e"
-  dependencies:
-    ret "~0.1.10"
-
-safer-buffer@^2.0.2, safer-buffer@^2.1.0, safer-buffer@~2.1.0:
-  version "2.1.2"
-  resolved "https://registry.yarnpkg.com/safer-buffer/-/safer-buffer-2.1.2.tgz#44fa161b0187b9549dd84bb91802f9bd8385cd6a"
-
-sass-graph@^2.2.4:
-  version "2.2.4"
-  resolved "https://registry.yarnpkg.com/sass-graph/-/sass-graph-2.2.4.tgz#13fbd63cd1caf0908b9fd93476ad43a51d1e0b49"
-  dependencies:
-    glob "^7.0.0"
-    lodash "^4.0.0"
-    scss-tokenizer "^0.2.3"
-    yargs "^7.0.0"
-
-sax@~1.2.1:
-  version "1.2.4"
-  resolved "https://registry.yarnpkg.com/sax/-/sax-1.2.4.tgz#2816234e2378bddc4e5354fab5caa895df7100d9"
-
-scss-tokenizer@^0.2.3:
-  version "0.2.3"
-  resolved "https://registry.yarnpkg.com/scss-tokenizer/-/scss-tokenizer-0.2.3.tgz#8eb06db9a9723333824d3f5530641149847ce5d1"
-  dependencies:
-    js-base64 "^2.1.8"
-    source-map "^0.4.2"
-
-seek-bzip@^1.0.3:
-  version "1.0.5"
-  resolved "https://registry.yarnpkg.com/seek-bzip/-/seek-bzip-1.0.5.tgz#cfe917cb3d274bcffac792758af53173eb1fabdc"
-  dependencies:
-    commander "~2.8.1"
-
-semver-regex@^1.0.0:
-  version "1.0.0"
-  resolved "https://registry.yarnpkg.com/semver-regex/-/semver-regex-1.0.0.tgz#92a4969065f9c70c694753d55248fc68f8f652c9"
-
-semver-truncate@^1.0.0:
-  version "1.1.2"
-  resolved "https://registry.yarnpkg.com/semver-truncate/-/semver-truncate-1.1.2.tgz#57f41de69707a62709a7e0104ba2117109ea47e8"
-  dependencies:
-    semver "^5.3.0"
-
-"semver@2 || 3 || 4 || 5", semver@^5.3.0, semver@^5.4.1:
-  version "5.5.1"
-  resolved "https://registry.yarnpkg.com/semver/-/semver-5.5.1.tgz#7dfdd8814bdb7cabc7be0fb1d734cfb66c940477"
-
-semver@^4.0.3, semver@^4.1.0:
-  version "4.3.6"
-  resolved "https://registry.yarnpkg.com/semver/-/semver-4.3.6.tgz#300bc6e0e86374f7ba61068b5b1ecd57fc6532da"
-
-semver@~5.3.0:
-  version "5.3.0"
-  resolved "https://registry.yarnpkg.com/semver/-/semver-5.3.0.tgz#9b2ce5d3de02d17c6012ad326aa6b4d0cf54f94f"
-
-sequencify@~0.0.7:
-  version "0.0.7"
-  resolved "https://registry.yarnpkg.com/sequencify/-/sequencify-0.0.7.tgz#90cff19d02e07027fd767f5ead3e7b95d1e7380c"
-
-set-blocking@^2.0.0, set-blocking@~2.0.0:
-  version "2.0.0"
-  resolved "https://registry.yarnpkg.com/set-blocking/-/set-blocking-2.0.0.tgz#045f9782d011ae9a6803ddd382b24392b3d890f7"
-
-set-immediate-shim@^1.0.0:
-  version "1.0.1"
-  resolved "https://registry.yarnpkg.com/set-immediate-shim/-/set-immediate-shim-1.0.1.tgz#4b2b1b27eb808a9f8dcc481a58e5e56f599f3f61"
-
-set-value@^0.4.3:
-  version "0.4.3"
-  resolved "https://registry.yarnpkg.com/set-value/-/set-value-0.4.3.tgz#7db08f9d3d22dc7f78e53af3c3bf4666ecdfccf1"
-  dependencies:
-    extend-shallow "^2.0.1"
-    is-extendable "^0.1.1"
-    is-plain-object "^2.0.1"
-    to-object-path "^0.3.0"
-
-set-value@^2.0.0:
-  version "2.0.0"
-  resolved "https://registry.yarnpkg.com/set-value/-/set-value-2.0.0.tgz#71ae4a88f0feefbbf52d1ea604f3fb315ebb6274"
-  dependencies:
-    extend-shallow "^2.0.1"
-    is-extendable "^0.1.1"
-    is-plain-object "^2.0.3"
-    split-string "^3.0.1"
-
-shebang-command@^1.2.0:
-  version "1.2.0"
-  resolved "https://registry.yarnpkg.com/shebang-command/-/shebang-command-1.2.0.tgz#44aac65b695b03398968c39f363fee5deafdf1ea"
-  dependencies:
-    shebang-regex "^1.0.0"
-
-shebang-regex@^1.0.0:
-  version "1.0.0"
-  resolved "https://registry.yarnpkg.com/shebang-regex/-/shebang-regex-1.0.0.tgz#da42f49740c0b42db2ca9728571cb190c98efea3"
-
-shelljs@0.3.x:
-  version "0.3.0"
-  resolved "https://registry.yarnpkg.com/shelljs/-/shelljs-0.3.0.tgz#3596e6307a781544f591f37da618360f31db57b1"
-
-shellwords@^0.1.1:
-  version "0.1.1"
-  resolved "https://registry.yarnpkg.com/shellwords/-/shellwords-0.1.1.tgz#d6b9181c1a48d397324c84871efbcfc73fc0654b"
-
-sigmund@~1.0.0:
-  version "1.0.1"
-  resolved "https://registry.yarnpkg.com/sigmund/-/sigmund-1.0.1.tgz#3ff21f198cad2175f9f3b781853fd94d0d19b590"
-
-signal-exit@^3.0.0:
-  version "3.0.2"
-  resolved "https://registry.yarnpkg.com/signal-exit/-/signal-exit-3.0.2.tgz#b5fdc08f1287ea1178628e415e25132b73646c6d"
-
-slash@^1.0.0:
-  version "1.0.0"
-  resolved "https://registry.yarnpkg.com/slash/-/slash-1.0.0.tgz#c41f2f6c39fc16d1cd17ad4b5d896114ae470d55"
-
-snapdragon-node@^2.0.1:
-  version "2.1.1"
-  resolved "https://registry.yarnpkg.com/snapdragon-node/-/snapdragon-node-2.1.1.tgz#6c175f86ff14bdb0724563e8f3c1b021a286853b"
-  dependencies:
-    define-property "^1.0.0"
-    isobject "^3.0.0"
-    snapdragon-util "^3.0.1"
-
-snapdragon-util@^3.0.1:
-  version "3.0.1"
-  resolved "https://registry.yarnpkg.com/snapdragon-util/-/snapdragon-util-3.0.1.tgz#f956479486f2acd79700693f6f7b805e45ab56e2"
-  dependencies:
-    kind-of "^3.2.0"
-
-snapdragon@^0.8.1:
-  version "0.8.2"
-  resolved "https://registry.yarnpkg.com/snapdragon/-/snapdragon-0.8.2.tgz#64922e7c565b0e14204ba1aa7d6964278d25182d"
-  dependencies:
-    base "^0.11.1"
-    debug "^2.2.0"
-    define-property "^0.2.5"
-    extend-shallow "^2.0.1"
-    map-cache "^0.2.2"
-    source-map "^0.5.6"
-    source-map-resolve "^0.5.0"
-    use "^3.1.0"
-
-sort-keys@^1.0.0:
-  version "1.1.2"
-  resolved "https://registry.yarnpkg.com/sort-keys/-/sort-keys-1.1.2.tgz#441b6d4d346798f1b4e49e8920adfba0e543f9ad"
-  dependencies:
-    is-plain-obj "^1.0.0"
-
-source-map-resolve@^0.5.0, source-map-resolve@^0.5.2:
-  version "0.5.2"
-  resolved "https://registry.yarnpkg.com/source-map-resolve/-/source-map-resolve-0.5.2.tgz#72e2cc34095543e43b2c62b2c4c10d4a9054f259"
-  dependencies:
-    atob "^2.1.1"
-    decode-uri-component "^0.2.0"
-    resolve-url "^0.2.1"
-    source-map-url "^0.4.0"
-    urix "^0.1.0"
-
-source-map-support@^0.4.15:
-  version "0.4.18"
-  resolved "https://registry.yarnpkg.com/source-map-support/-/source-map-support-0.4.18.tgz#0286a6de8be42641338594e97ccea75f0a2c585f"
-  dependencies:
-    source-map "^0.5.6"
-
-source-map-url@^0.4.0:
-  version "0.4.0"
-  resolved "https://registry.yarnpkg.com/source-map-url/-/source-map-url-0.4.0.tgz#3e935d7ddd73631b97659956d55128e87b5084a3"
-
-source-map@^0.4.2:
-  version "0.4.4"
-  resolved "https://registry.yarnpkg.com/source-map/-/source-map-0.4.4.tgz#eba4f5da9c0dc999de68032d8b4f76173652036b"
-  dependencies:
-    amdefine ">=0.0.4"
-
-source-map@^0.5.1, source-map@^0.5.3, source-map@^0.5.6, source-map@^0.5.7, source-map@~0.5.1:
-  version "0.5.7"
-  resolved "https://registry.yarnpkg.com/source-map/-/source-map-0.5.7.tgz#8a039d2d1021d22d1ea14c80d8ea468ba2ef3fcc"
-
-source-map@^0.6.0, source-map@^0.6.1, source-map@~0.6.0:
-  version "0.6.1"
-  resolved "https://registry.yarnpkg.com/source-map/-/source-map-0.6.1.tgz#74722af32e9614e9c287a8d0bbde48b5e2f1a263"
-
-sparkles@^1.0.0:
-  version "1.0.1"
-  resolved "https://registry.yarnpkg.com/sparkles/-/sparkles-1.0.1.tgz#008db65edce6c50eec0c5e228e1945061dd0437c"
-
-spdx-correct@^3.0.0:
-  version "3.0.0"
-  resolved "https://registry.yarnpkg.com/spdx-correct/-/spdx-correct-3.0.0.tgz#05a5b4d7153a195bc92c3c425b69f3b2a9524c82"
-  dependencies:
-    spdx-expression-parse "^3.0.0"
-    spdx-license-ids "^3.0.0"
-
-spdx-exceptions@^2.1.0:
-  version "2.1.0"
-  resolved "https://registry.yarnpkg.com/spdx-exceptions/-/spdx-exceptions-2.1.0.tgz#2c7ae61056c714a5b9b9b2b2af7d311ef5c78fe9"
-
-spdx-expression-parse@^3.0.0:
-  version "3.0.0"
-  resolved "https://registry.yarnpkg.com/spdx-expression-parse/-/spdx-expression-parse-3.0.0.tgz#99e119b7a5da00e05491c9fa338b7904823b41d0"
-  dependencies:
-    spdx-exceptions "^2.1.0"
-    spdx-license-ids "^3.0.0"
-
-spdx-license-ids@^3.0.0:
-  version "3.0.1"
-  resolved "https://registry.yarnpkg.com/spdx-license-ids/-/spdx-license-ids-3.0.1.tgz#e2a303236cac54b04031fa7a5a79c7e701df852f"
-
-split-string@^3.0.1, split-string@^3.0.2:
-  version "3.1.0"
-  resolved "https://registry.yarnpkg.com/split-string/-/split-string-3.1.0.tgz#7cb09dda3a86585705c64b39a6466038682e8fe2"
-  dependencies:
-    extend-shallow "^3.0.0"
-
-split@0.2:
-  version "0.2.10"
-  resolved "http://registry.npmjs.org/split/-/split-0.2.10.tgz#67097c601d697ce1368f418f06cd201cf0521a57"
-  dependencies:
-    through "2"
-
-split@^1.0.1:
-  version "1.0.1"
-  resolved "https://registry.yarnpkg.com/split/-/split-1.0.1.tgz#605bd9be303aa59fb35f9229fbea0ddec9ea07d9"
-  dependencies:
-    through "2"
-
-sprintf-js@~1.0.2:
-  version "1.0.3"
-  resolved "https://registry.yarnpkg.com/sprintf-js/-/sprintf-js-1.0.3.tgz#04e6926f662895354f3dd015203633b857297e2c"
-
-squeak@^1.0.0:
-  version "1.3.0"
-  resolved "https://registry.yarnpkg.com/squeak/-/squeak-1.3.0.tgz#33045037b64388b567674b84322a6521073916c3"
-  dependencies:
-    chalk "^1.0.0"
-    console-stream "^0.1.1"
-    lpad-align "^1.0.1"
-
-sshpk@^1.7.0:
-  version "1.14.2"
-  resolved "https://registry.yarnpkg.com/sshpk/-/sshpk-1.14.2.tgz#c6fc61648a3d9c4e764fd3fcdf4ea105e492ba98"
-  dependencies:
-    asn1 "~0.2.3"
-    assert-plus "^1.0.0"
-    dashdash "^1.12.0"
-    getpass "^0.1.1"
-    safer-buffer "^2.0.2"
-  optionalDependencies:
-    bcrypt-pbkdf "^1.0.0"
-    ecc-jsbn "~0.1.1"
-    jsbn "~0.1.0"
-    tweetnacl "~0.14.0"
-
-stack-trace@0.0.x:
-  version "0.0.10"
-  resolved "https://registry.yarnpkg.com/stack-trace/-/stack-trace-0.0.10.tgz#547c70b347e8d32b4e108ea1a2a159e5fdde19c0"
-
-stat-mode@^0.2.0:
-  version "0.2.2"
-  resolved "https://registry.yarnpkg.com/stat-mode/-/stat-mode-0.2.2.tgz#e6c80b623123d7d80cf132ce538f346289072502"
-
-static-extend@^0.1.1:
-  version "0.1.2"
-  resolved "https://registry.yarnpkg.com/static-extend/-/static-extend-0.1.2.tgz#60809c39cbff55337226fd5e0b520f341f1fb5c6"
-  dependencies:
-    define-property "^0.2.5"
-    object-copy "^0.1.0"
-
-statuses@1:
-  version "1.5.0"
-  resolved "https://registry.yarnpkg.com/statuses/-/statuses-1.5.0.tgz#161c7dac177659fd9811f43771fa99381478628c"
-
-stdout-stream@^1.4.0:
-  version "1.4.1"
-  resolved "https://registry.yarnpkg.com/stdout-stream/-/stdout-stream-1.4.1.tgz#5ac174cdd5cd726104aa0c0b2bd83815d8d535de"
-  dependencies:
-    readable-stream "^2.0.1"
-
-stream-combiner2@^1.1.1:
-  version "1.1.1"
-  resolved "https://registry.yarnpkg.com/stream-combiner2/-/stream-combiner2-1.1.1.tgz#fb4d8a1420ea362764e21ad4780397bebcb41cbe"
-  dependencies:
-    duplexer2 "~0.1.0"
-    readable-stream "^2.0.2"
-
-stream-combiner@^0.2.2:
-  version "0.2.2"
-  resolved "http://registry.npmjs.org/stream-combiner/-/stream-combiner-0.2.2.tgz#aec8cbac177b56b6f4fa479ced8c1912cee52858"
-  dependencies:
-    duplexer "~0.1.1"
-    through "~2.3.4"
-
-stream-combiner@~0.0.4:
-  version "0.0.4"
-  resolved "http://registry.npmjs.org/stream-combiner/-/stream-combiner-0.0.4.tgz#4d5e433c185261dde623ca3f44c586bcf5c4ad14"
-  dependencies:
-    duplexer "~0.1.1"
-
-stream-consume@~0.1.0:
-  version "0.1.1"
-  resolved "https://registry.yarnpkg.com/stream-consume/-/stream-consume-0.1.1.tgz#d3bdb598c2bd0ae82b8cac7ac50b1107a7996c48"
-
-stream-shift@^1.0.0:
-  version "1.0.0"
-  resolved "https://registry.yarnpkg.com/stream-shift/-/stream-shift-1.0.0.tgz#d5c752825e5367e786f78e18e445ea223a155952"
-
-streamqueue@0.0.6:
-  version "0.0.6"
-  resolved "https://registry.yarnpkg.com/streamqueue/-/streamqueue-0.0.6.tgz#66f5f5ec94e9b8af249e4aec2dd1f741bfe94de3"
-  dependencies:
-    readable-stream "^1.0.26-2"
-
-strict-uri-encode@^1.0.0:
-  version "1.1.0"
-  resolved "https://registry.yarnpkg.com/strict-uri-encode/-/strict-uri-encode-1.1.0.tgz#279b225df1d582b1f54e65addd4352e18faa0713"
-
-string-width@^1.0.1, string-width@^1.0.2:
-  version "1.0.2"
-  resolved "https://registry.yarnpkg.com/string-width/-/string-width-1.0.2.tgz#118bdf5b8cdc51a2a7e70d211e07e2b0b9b107d3"
-  dependencies:
-    code-point-at "^1.0.0"
-    is-fullwidth-code-point "^1.0.0"
-    strip-ansi "^3.0.0"
-
-"string-width@^1.0.2 || 2":
-  version "2.1.1"
-  resolved "https://registry.yarnpkg.com/string-width/-/string-width-2.1.1.tgz#ab93f27a8dc13d28cac815c462143a6d9012ae9e"
-  dependencies:
-    is-fullwidth-code-point "^2.0.0"
-    strip-ansi "^4.0.0"
-
-string_decoder@~0.10.x:
-  version "0.10.31"
-  resolved "https://registry.yarnpkg.com/string_decoder/-/string_decoder-0.10.31.tgz#62e203bc41766c6c28c9fc84301dab1c5310fa94"
-
-string_decoder@~1.1.1:
-  version "1.1.1"
-  resolved "https://registry.yarnpkg.com/string_decoder/-/string_decoder-1.1.1.tgz#9cf1611ba62685d7030ae9e4ba34149c3af03fc8"
-  dependencies:
-    safe-buffer "~5.1.0"
-
-strip-ansi@^0.3.0:
-  version "0.3.0"
-  resolved "https://registry.yarnpkg.com/strip-ansi/-/strip-ansi-0.3.0.tgz#25f48ea22ca79187f3174a4db8759347bb126220"
-  dependencies:
-    ansi-regex "^0.2.1"
-
-strip-ansi@^3.0.0, strip-ansi@^3.0.1:
-  version "3.0.1"
-  resolved "https://registry.yarnpkg.com/strip-ansi/-/strip-ansi-3.0.1.tgz#6a385fb8853d952d5ff05d0e8aaf94278dc63dcf"
-  dependencies:
-    ansi-regex "^2.0.0"
-
-strip-ansi@^4.0.0:
-  version "4.0.0"
-  resolved "https://registry.yarnpkg.com/strip-ansi/-/strip-ansi-4.0.0.tgz#a8479022eb1ac368a871389b635262c505ee368f"
-  dependencies:
-    ansi-regex "^3.0.0"
-
-strip-bom-stream@^1.0.0:
-  version "1.0.0"
-  resolved "https://registry.yarnpkg.com/strip-bom-stream/-/strip-bom-stream-1.0.0.tgz#e7144398577d51a6bed0fa1994fa05f43fd988ee"
-  dependencies:
-    first-chunk-stream "^1.0.0"
-    strip-bom "^2.0.0"
-
-strip-bom-string@1.X:
-  version "1.0.0"
-  resolved "https://registry.yarnpkg.com/strip-bom-string/-/strip-bom-string-1.0.0.tgz#e5211e9224369fbb81d633a2f00044dc8cedad92"
-
-strip-bom@^1.0.0:
-  version "1.0.0"
-  resolved "https://registry.yarnpkg.com/strip-bom/-/strip-bom-1.0.0.tgz#85b8862f3844b5a6d5ec8467a93598173a36f794"
-  dependencies:
-    first-chunk-stream "^1.0.0"
-    is-utf8 "^0.2.0"
-
-strip-bom@^2.0.0:
-  version "2.0.0"
-  resolved "https://registry.yarnpkg.com/strip-bom/-/strip-bom-2.0.0.tgz#6219a85616520491f35788bdbf1447a99c7e6b0e"
-  dependencies:
-    is-utf8 "^0.2.0"
-
-strip-dirs@^1.0.0:
-  version "1.1.1"
-  resolved "http://registry.npmjs.org/strip-dirs/-/strip-dirs-1.1.1.tgz#960bbd1287844f3975a4558aa103a8255e2456a0"
-  dependencies:
-    chalk "^1.0.0"
-    get-stdin "^4.0.1"
-    is-absolute "^0.1.5"
-    is-natural-number "^2.0.0"
-    minimist "^1.1.0"
-    sum-up "^1.0.1"
-
-strip-eof@^1.0.0:
-  version "1.0.0"
-  resolved "https://registry.yarnpkg.com/strip-eof/-/strip-eof-1.0.0.tgz#bb43ff5598a6eb05d89b59fcd129c983313606bf"
-
-strip-indent@^1.0.1:
-  version "1.0.1"
-  resolved "https://registry.yarnpkg.com/strip-indent/-/strip-indent-1.0.1.tgz#0c7962a6adefa7bbd4ac366460a638552ae1a0a2"
-  dependencies:
-    get-stdin "^4.0.1"
-
-strip-json-comments@1.0.x:
-  version "1.0.4"
-  resolved "https://registry.yarnpkg.com/strip-json-comments/-/strip-json-comments-1.0.4.tgz#1e15fbcac97d3ee99bf2d73b4c656b082bbafb91"
-
-strip-json-comments@~2.0.1:
-  version "2.0.1"
-  resolved "https://registry.yarnpkg.com/strip-json-comments/-/strip-json-comments-2.0.1.tgz#3c531942e908c2697c0ec344858c286c7ca0a60a"
-
-strip-outer@^1.0.0:
-  version "1.0.1"
-  resolved "https://registry.yarnpkg.com/strip-outer/-/strip-outer-1.0.1.tgz#b2fd2abf6604b9d1e6013057195df836b8a9d631"
-  dependencies:
-    escape-string-regexp "^1.0.2"
-
-sum-up@^1.0.1:
-  version "1.0.3"
-  resolved "https://registry.yarnpkg.com/sum-up/-/sum-up-1.0.3.tgz#1c661f667057f63bcb7875aa1438bc162525156e"
-  dependencies:
-    chalk "^1.0.0"
-
-supports-color@^0.2.0:
-  version "0.2.0"
-  resolved "https://registry.yarnpkg.com/supports-color/-/supports-color-0.2.0.tgz#d92de2694eb3f67323973d7ae3d8b55b4c22190a"
-
-supports-color@^2.0.0:
-  version "2.0.0"
-  resolved "https://registry.yarnpkg.com/supports-color/-/supports-color-2.0.0.tgz#535d045ce6b6363fa40117084629995e9df324c7"
-
-supports-color@^3.2.3:
-  version "3.2.3"
-  resolved "https://registry.yarnpkg.com/supports-color/-/supports-color-3.2.3.tgz#65ac0504b3954171d8a64946b2ae3cbb8a5f54f6"
-  dependencies:
-    has-flag "^1.0.0"
-
-supports-color@^5.3.0:
-  version "5.5.0"
-  resolved "https://registry.yarnpkg.com/supports-color/-/supports-color-5.5.0.tgz#e2e69a44ac8772f78a1ec0b35b689df6530efc8f"
-  dependencies:
-    has-flag "^3.0.0"
-
-svgo@^0.7.0:
-  version "0.7.2"
-  resolved "https://registry.yarnpkg.com/svgo/-/svgo-0.7.2.tgz#9f5772413952135c6fefbf40afe6a4faa88b4bb5"
-  dependencies:
-    coa "~1.0.1"
-    colors "~1.1.2"
-    csso "~2.3.1"
-    js-yaml "~3.7.0"
-    mkdirp "~0.5.1"
-    sax "~1.2.1"
-    whet.extend "~0.9.9"
-
-tar-stream@^1.1.1:
-  version "1.6.2"
-  resolved "https://registry.yarnpkg.com/tar-stream/-/tar-stream-1.6.2.tgz#8ea55dab37972253d9a9af90fdcd559ae435c555"
-  dependencies:
-    bl "^1.0.0"
-    buffer-alloc "^1.2.0"
-    end-of-stream "^1.0.0"
-    fs-constants "^1.0.0"
-    readable-stream "^2.3.0"
-    to-buffer "^1.1.1"
-    xtend "^4.0.0"
-
-tar@^2.0.0:
-  version "2.2.1"
-  resolved "https://registry.yarnpkg.com/tar/-/tar-2.2.1.tgz#8e4d2a256c0e2185c6b18ad694aec968b83cb1d1"
-  dependencies:
-    block-stream "*"
-    fstream "^1.0.2"
-    inherits "2"
-
-temp-dir@^1.0.0:
-  version "1.0.0"
-  resolved "https://registry.yarnpkg.com/temp-dir/-/temp-dir-1.0.0.tgz#0a7c0ea26d3a39afa7e0ebea9c1fc0bc4daa011d"
-
-tempfile@^1.0.0:
-  version "1.1.1"
-  resolved "https://registry.yarnpkg.com/tempfile/-/tempfile-1.1.1.tgz#5bcc4eaecc4ab2c707d8bc11d99ccc9a2cb287f2"
-  dependencies:
-    os-tmpdir "^1.0.0"
-    uuid "^2.0.1"
-
-tempfile@^2.0.0:
-  version "2.0.0"
-  resolved "https://registry.yarnpkg.com/tempfile/-/tempfile-2.0.0.tgz#6b0446856a9b1114d1856ffcbe509cccb0977265"
-  dependencies:
-    temp-dir "^1.0.0"
-    uuid "^3.0.1"
-
-throttleit@^1.0.0:
-  version "1.0.0"
-  resolved "https://registry.yarnpkg.com/throttleit/-/throttleit-1.0.0.tgz#9e785836daf46743145a5984b6268d828528ac6c"
-
-through2-concurrent@^1.1.1:
-  version "1.1.1"
-  resolved "https://registry.yarnpkg.com/through2-concurrent/-/through2-concurrent-1.1.1.tgz#11cb4ea4c9e31bca6e4c1e6dba48d1c728c3524b"
-  dependencies:
-    through2 "^2.0.0"
-
-through2-filter@^2.0.0:
-  version "2.0.0"
-  resolved "https://registry.yarnpkg.com/through2-filter/-/through2-filter-2.0.0.tgz#60bc55a0dacb76085db1f9dae99ab43f83d622ec"
-  dependencies:
-    through2 "~2.0.0"
-    xtend "~4.0.0"
-
-through2@2.X, through2@^2.0.0, through2@^2.0.3, through2@~2.0.0:
-  version "2.0.3"
-  resolved "https://registry.yarnpkg.com/through2/-/through2-2.0.3.tgz#0004569b37c7c74ba39c43f3ced78d1ad94140be"
-  dependencies:
-    readable-stream "^2.1.5"
-    xtend "~4.0.1"
-
-through2@^0.5.0:
-  version "0.5.1"
-  resolved "https://registry.yarnpkg.com/through2/-/through2-0.5.1.tgz#dfdd012eb9c700e2323fd334f38ac622ab372da7"
-  dependencies:
-    readable-stream "~1.0.17"
-    xtend "~3.0.0"
-
-through2@^0.6.0, through2@^0.6.1:
-  version "0.6.5"
-  resolved "https://registry.yarnpkg.com/through2/-/through2-0.6.5.tgz#41ab9c67b29d57209071410e1d7a7a968cd3ad48"
-  dependencies:
-    readable-stream ">=1.0.33-1 <1.1.0-0"
-    xtend ">=4.0.0 <4.1.0-0"
-
-through@2, through@^2.3.8, through@~2.3, through@~2.3.1, through@~2.3.4:
-  version "2.3.8"
-  resolved "http://registry.npmjs.org/through/-/through-2.3.8.tgz#0dd4c9ffaabc357960b1b724115d7e0e86a2e1f5"
-
-tildify@^1.0.0:
-  version "1.2.0"
-  resolved "https://registry.yarnpkg.com/tildify/-/tildify-1.2.0.tgz#dcec03f55dca9b7aa3e5b04f21817eb56e63588a"
-  dependencies:
-    os-homedir "^1.0.0"
-
-time-stamp@^1.0.0:
-  version "1.1.0"
-  resolved "https://registry.yarnpkg.com/time-stamp/-/time-stamp-1.1.0.tgz#764a5a11af50561921b133f3b44e618687e0f5c3"
-
-timed-out@^3.0.0:
-  version "3.1.3"
-  resolved "https://registry.yarnpkg.com/timed-out/-/timed-out-3.1.3.tgz#95860bfcc5c76c277f8f8326fd0f5b2e20eba217"
-
-timers-ext@^0.1.5:
-  version "0.1.5"
-  resolved "https://registry.yarnpkg.com/timers-ext/-/timers-ext-0.1.5.tgz#77147dd4e76b660c2abb8785db96574cbbd12922"
-  dependencies:
-    es5-ext "~0.10.14"
-    next-tick "1"
-
-to-absolute-glob@^0.1.1:
-  version "0.1.1"
-  resolved "https://registry.yarnpkg.com/to-absolute-glob/-/to-absolute-glob-0.1.1.tgz#1cdfa472a9ef50c239ee66999b662ca0eb39937f"
-  dependencies:
-    extend-shallow "^2.0.1"
-
-to-buffer@^1.1.1:
-  version "1.1.1"
-  resolved "https://registry.yarnpkg.com/to-buffer/-/to-buffer-1.1.1.tgz#493bd48f62d7c43fcded313a03dcadb2e1213a80"
-
-to-fast-properties@^1.0.3:
-  version "1.0.3"
-  resolved "https://registry.yarnpkg.com/to-fast-properties/-/to-fast-properties-1.0.3.tgz#b83571fa4d8c25b82e231b06e3a3055de4ca1a47"
-
-to-object-path@^0.3.0:
-  version "0.3.0"
-  resolved "https://registry.yarnpkg.com/to-object-path/-/to-object-path-0.3.0.tgz#297588b7b0e7e0ac08e04e672f85c1f4999e17af"
-  dependencies:
-    kind-of "^3.0.2"
-
-to-regex-range@^2.1.0:
-  version "2.1.1"
-  resolved "https://registry.yarnpkg.com/to-regex-range/-/to-regex-range-2.1.1.tgz#7c80c17b9dfebe599e27367e0d4dd5590141db38"
-  dependencies:
-    is-number "^3.0.0"
-    repeat-string "^1.6.1"
-
-to-regex@^3.0.1, to-regex@^3.0.2:
-  version "3.0.2"
-  resolved "https://registry.yarnpkg.com/to-regex/-/to-regex-3.0.2.tgz#13cfdd9b336552f30b51f33a8ae1b42a7a7599ce"
-  dependencies:
-    define-property "^2.0.2"
-    extend-shallow "^3.0.2"
-    regex-not "^1.0.2"
-    safe-regex "^1.1.0"
-
-tough-cookie@~2.3.3:
-  version "2.3.4"
-  resolved "https://registry.yarnpkg.com/tough-cookie/-/tough-cookie-2.3.4.tgz#ec60cee38ac675063ffc97a5c18970578ee83655"
-  dependencies:
-    punycode "^1.4.1"
-
-tough-cookie@~2.4.3:
-  version "2.4.3"
-  resolved "https://registry.yarnpkg.com/tough-cookie/-/tough-cookie-2.4.3.tgz#53f36da3f47783b0925afa06ff9f3b165280f781"
-  dependencies:
-    psl "^1.1.24"
-    punycode "^1.4.1"
-
-trim-newlines@^1.0.0:
-  version "1.0.0"
-  resolved "https://registry.yarnpkg.com/trim-newlines/-/trim-newlines-1.0.0.tgz#5887966bb582a4503a41eb524f7d35011815a613"
-
-trim-repeated@^1.0.0:
-  version "1.0.0"
-  resolved "https://registry.yarnpkg.com/trim-repeated/-/trim-repeated-1.0.0.tgz#e3646a2ea4e891312bf7eace6cfb05380bc01c21"
-  dependencies:
-    escape-string-regexp "^1.0.2"
-
-trim-right@^1.0.1:
-  version "1.0.1"
-  resolved "https://registry.yarnpkg.com/trim-right/-/trim-right-1.0.1.tgz#cb2e1203067e0c8de1f614094b9fe45704ea6003"
-
-"true-case-path@^1.0.2":
-  version "1.0.3"
-  resolved "https://registry.yarnpkg.com/true-case-path/-/true-case-path-1.0.3.tgz#f813b5a8c86b40da59606722b144e3225799f47d"
-  dependencies:
-    glob "^7.1.2"
-
-try-json-parse@^0.1.1:
-  version "0.1.1"
-  resolved "https://registry.yarnpkg.com/try-json-parse/-/try-json-parse-0.1.1.tgz#8db01622e877e51b83140caee7c80864ad390c82"
-
-tunnel-agent@^0.4.0:
-  version "0.4.3"
-  resolved "https://registry.yarnpkg.com/tunnel-agent/-/tunnel-agent-0.4.3.tgz#6373db76909fe570e08d73583365ed828a74eeeb"
-
-tunnel-agent@^0.6.0:
-  version "0.6.0"
-  resolved "https://registry.yarnpkg.com/tunnel-agent/-/tunnel-agent-0.6.0.tgz#27a5dea06b36b04a0a9966774b290868f0fc40fd"
-  dependencies:
-    safe-buffer "^5.0.1"
-
-tweetnacl@^0.14.3, tweetnacl@~0.14.0:
-  version "0.14.5"
-  resolved "https://registry.yarnpkg.com/tweetnacl/-/tweetnacl-0.14.5.tgz#5ae68177f192d4456269d108afa93ff8743f4f64"
-
-type-is@~1.6.10:
-  version "1.6.16"
-  resolved "https://registry.yarnpkg.com/type-is/-/type-is-1.6.16.tgz#f89ce341541c672b25ee7ae3c73dee3b2be50194"
-  dependencies:
-    media-typer "0.3.0"
-    mime-types "~2.1.18"
-
-typedarray@^0.0.6:
-  version "0.0.6"
-  resolved "https://registry.yarnpkg.com/typedarray/-/typedarray-0.0.6.tgz#867ac74e3864187b1d3d47d996a78ec5c8830777"
-
-uglify-js@~2.8.10:
-  version "2.8.29"
-  resolved "https://registry.yarnpkg.com/uglify-js/-/uglify-js-2.8.29.tgz#29c5733148057bb4e1f75df35b7a9cb72e6a59dd"
-  dependencies:
-    source-map "~0.5.1"
-    yargs "~3.10.0"
-  optionalDependencies:
-    uglify-to-browserify "~1.0.0"
-
-uglify-save-license@^0.4.1:
-  version "0.4.1"
-  resolved "https://registry.yarnpkg.com/uglify-save-license/-/uglify-save-license-0.4.1.tgz#95726c17cc6fd171c3617e3bf4d8d82aa8c4cce1"
-
-uglify-to-browserify@~1.0.0:
-  version "1.0.2"
-  resolved "https://registry.yarnpkg.com/uglify-to-browserify/-/uglify-to-browserify-1.0.2.tgz#6e0924d6bda6b5afe349e39a6d632850a0f882b7"
-
-unc-path-regex@^0.1.2:
-  version "0.1.2"
-  resolved "https://registry.yarnpkg.com/unc-path-regex/-/unc-path-regex-0.1.2.tgz#e73dd3d7b0d7c5ed86fbac6b0ae7d8c6a69d50fa"
-
-unicode-5.2.0@^0.7.5:
-  version "0.7.5"
-  resolved "https://registry.yarnpkg.com/unicode-5.2.0/-/unicode-5.2.0-0.7.5.tgz#e0df129431a28a95263d8c480fb5e9ab2b0973f0"
-
-union-value@^1.0.0:
-  version "1.0.0"
-  resolved "https://registry.yarnpkg.com/union-value/-/union-value-1.0.0.tgz#5c71c34cb5bad5dcebe3ea0cd08207ba5aa1aea4"
-  dependencies:
-    arr-union "^3.1.0"
-    get-value "^2.0.6"
-    is-extendable "^0.1.1"
-    set-value "^0.4.3"
-
-uniq@^1.0.1:
-  version "1.0.1"
-  resolved "https://registry.yarnpkg.com/uniq/-/uniq-1.0.1.tgz#b31c5ae8254844a3a8281541ce2b04b865a734ff"
-
-uniqs@^2.0.0:
-  version "2.0.0"
-  resolved "https://registry.yarnpkg.com/uniqs/-/uniqs-2.0.0.tgz#ffede4b36b25290696e6e165d4a59edb998e6b02"
-
-unique-stream@^1.0.0:
-  version "1.0.0"
-  resolved "https://registry.yarnpkg.com/unique-stream/-/unique-stream-1.0.0.tgz#d59a4a75427447d9aa6c91e70263f8d26a4b104b"
-
-unique-stream@^2.0.2:
-  version "2.2.1"
-  resolved "https://registry.yarnpkg.com/unique-stream/-/unique-stream-2.2.1.tgz#5aa003cfbe94c5ff866c4e7d668bb1c4dbadb369"
-  dependencies:
-    json-stable-stringify "^1.0.0"
-    through2-filter "^2.0.0"
-
-unpipe@1.0.0:
-  version "1.0.0"
-  resolved "https://registry.yarnpkg.com/unpipe/-/unpipe-1.0.0.tgz#b2bf4ee8514aae6165b4817829d21b2ef49904ec"
-
-unset-value@^1.0.0:
-  version "1.0.0"
-  resolved "https://registry.yarnpkg.com/unset-value/-/unset-value-1.0.0.tgz#8376873f7d2335179ffb1e6fc3a8ed0dfc8ab559"
-  dependencies:
-    has-value "^0.3.1"
-    isobject "^3.0.0"
-
-unzip-response@^1.0.2:
-  version "1.0.2"
-  resolved "https://registry.yarnpkg.com/unzip-response/-/unzip-response-1.0.2.tgz#b984f0877fc0a89c2c773cc1ef7b5b232b5b06fe"
-
-urix@^0.1.0:
-  version "0.1.0"
-  resolved "https://registry.yarnpkg.com/urix/-/urix-0.1.0.tgz#da937f7a62e21fec1fd18d49b35c2935067a6c72"
-
-url-parse-lax@^1.0.0:
-  version "1.0.0"
-  resolved "https://registry.yarnpkg.com/url-parse-lax/-/url-parse-lax-1.0.0.tgz#7af8f303645e9bd79a272e7a14ac68bc0609da73"
-  dependencies:
-    prepend-http "^1.0.1"
-
-url-regex@^3.0.0:
-  version "3.2.0"
-  resolved "https://registry.yarnpkg.com/url-regex/-/url-regex-3.2.0.tgz#dbad1e0c9e29e105dd0b1f09f6862f7fdb482724"
-  dependencies:
-    ip-regex "^1.0.1"
-
-use@^3.1.0:
-  version "3.1.1"
-  resolved "https://registry.yarnpkg.com/use/-/use-3.1.1.tgz#d50c8cac79a19fbc20f2911f56eb973f4e10070f"
-
-user-home@^1.1.1:
-  version "1.1.1"
-  resolved "https://registry.yarnpkg.com/user-home/-/user-home-1.1.1.tgz#2b5be23a32b63a7c9deb8d0f28d485724a3df190"
-
-util-deprecate@~1.0.1:
-  version "1.0.2"
-  resolved "https://registry.yarnpkg.com/util-deprecate/-/util-deprecate-1.0.2.tgz#450d4dc9fa70de732762fbd2d4a28981419a0ccf"
-
-uuid@^2.0.1:
-  version "2.0.3"
-  resolved "https://registry.yarnpkg.com/uuid/-/uuid-2.0.3.tgz#67e2e863797215530dff318e5bf9dcebfd47b21a"
-
-uuid@^3.0.1, uuid@^3.1.0, uuid@^3.3.2:
-  version "3.3.2"
-  resolved "https://registry.yarnpkg.com/uuid/-/uuid-3.3.2.tgz#1b4af4955eb3077c501c23872fc6513811587131"
-
-v8flags@^2.0.2:
-  version "2.1.1"
-  resolved "https://registry.yarnpkg.com/v8flags/-/v8flags-2.1.1.tgz#aab1a1fa30d45f88dd321148875ac02c0b55e5b4"
-  dependencies:
-    user-home "^1.1.1"
-
-vali-date@^1.0.0:
-  version "1.0.0"
-  resolved "https://registry.yarnpkg.com/vali-date/-/vali-date-1.0.0.tgz#1b904a59609fb328ef078138420934f6b86709a6"
-
-validate-npm-package-license@^3.0.1:
-  version "3.0.4"
-  resolved "https://registry.yarnpkg.com/validate-npm-package-license/-/validate-npm-package-license-3.0.4.tgz#fc91f6b9c7ba15c857f4cb2c5defeec39d4f410a"
-  dependencies:
-    spdx-correct "^3.0.0"
-    spdx-expression-parse "^3.0.0"
-
-vendors@^1.0.0:
-  version "1.0.2"
-  resolved "https://registry.yarnpkg.com/vendors/-/vendors-1.0.2.tgz#7fcb5eef9f5623b156bcea89ec37d63676f21801"
-
-verror@1.10.0:
-  version "1.10.0"
-  resolved "https://registry.yarnpkg.com/verror/-/verror-1.10.0.tgz#3a105ca17053af55d6e270c1f8288682e18da400"
-  dependencies:
-    assert-plus "^1.0.0"
-    core-util-is "1.0.2"
-    extsprintf "^1.2.0"
-
-vinyl-assign@^1.0.1:
-  version "1.2.1"
-  resolved "https://registry.yarnpkg.com/vinyl-assign/-/vinyl-assign-1.2.1.tgz#4d198891b5515911d771a8cd9c5480a46a074a45"
-  dependencies:
-    object-assign "^4.0.1"
-    readable-stream "^2.0.0"
-
-vinyl-fs@^0.3.0:
-  version "0.3.14"
-  resolved "https://registry.yarnpkg.com/vinyl-fs/-/vinyl-fs-0.3.14.tgz#9a6851ce1cac1c1cea5fe86c0931d620c2cfa9e6"
-  dependencies:
-    defaults "^1.0.0"
-    glob-stream "^3.1.5"
-    glob-watcher "^0.0.6"
-    graceful-fs "^3.0.0"
-    mkdirp "^0.5.0"
-    strip-bom "^1.0.0"
-    through2 "^0.6.1"
-    vinyl "^0.4.0"
-
-vinyl-fs@^2.2.0:
-  version "2.4.4"
-  resolved "https://registry.yarnpkg.com/vinyl-fs/-/vinyl-fs-2.4.4.tgz#be6ff3270cb55dfd7d3063640de81f25d7532239"
-  dependencies:
-    duplexify "^3.2.0"
-    glob-stream "^5.3.2"
-    graceful-fs "^4.0.0"
-    gulp-sourcemaps "1.6.0"
-    is-valid-glob "^0.3.0"
-    lazystream "^1.0.0"
-    lodash.isequal "^4.0.0"
-    merge-stream "^1.0.0"
-    mkdirp "^0.5.0"
-    object-assign "^4.0.0"
-    readable-stream "^2.0.4"
-    strip-bom "^2.0.0"
-    strip-bom-stream "^1.0.0"
-    through2 "^2.0.0"
-    through2-filter "^2.0.0"
-    vali-date "^1.0.0"
-    vinyl "^1.0.0"
-
-vinyl-sourcemaps-apply@^0.2.0, vinyl-sourcemaps-apply@^0.2.1:
-  version "0.2.1"
-  resolved "https://registry.yarnpkg.com/vinyl-sourcemaps-apply/-/vinyl-sourcemaps-apply-0.2.1.tgz#ab6549d61d172c2b1b87be5c508d239c8ef87705"
-  dependencies:
-    source-map "^0.5.1"
-
-vinyl@^0.2.1:
-  version "0.2.3"
-  resolved "https://registry.yarnpkg.com/vinyl/-/vinyl-0.2.3.tgz#bca938209582ec5a49ad538a00fa1f125e513252"
-  dependencies:
-    clone-stats "~0.0.1"
-
-vinyl@^0.4.0, vinyl@^0.4.3:
-  version "0.4.6"
-  resolved "https://registry.yarnpkg.com/vinyl/-/vinyl-0.4.6.tgz#2f356c87a550a255461f36bbeb2a5ba8bf784847"
-  dependencies:
-    clone "^0.2.0"
-    clone-stats "^0.0.1"
-
-vinyl@^0.5.0:
-  version "0.5.3"
-  resolved "https://registry.yarnpkg.com/vinyl/-/vinyl-0.5.3.tgz#b0455b38fc5e0cf30d4325132e461970c2091cde"
-  dependencies:
-    clone "^1.0.0"
-    clone-stats "^0.0.1"
-    replace-ext "0.0.1"
-
-vinyl@^1.0.0, vinyl@^1.1.0:
-  version "1.2.0"
-  resolved "https://registry.yarnpkg.com/vinyl/-/vinyl-1.2.0.tgz#5c88036cf565e5df05558bfc911f8656df218884"
-  dependencies:
-    clone "^1.0.0"
-    clone-stats "^0.0.1"
-    replace-ext "0.0.1"
-
-vinyl@^2.0.0:
-  version "2.2.0"
-  resolved "https://registry.yarnpkg.com/vinyl/-/vinyl-2.2.0.tgz#d85b07da96e458d25b2ffe19fece9f2caa13ed86"
-  dependencies:
-    clone "^2.1.1"
-    clone-buffer "^1.0.0"
-    clone-stats "^1.0.0"
-    cloneable-readable "^1.0.0"
-    remove-trailing-separator "^1.0.1"
-    replace-ext "^1.0.0"
-
-ware@^1.2.0:
-  version "1.3.0"
-  resolved "https://registry.yarnpkg.com/ware/-/ware-1.3.0.tgz#d1b14f39d2e2cb4ab8c4098f756fe4b164e473d4"
-  dependencies:
-    wrap-fn "^0.1.0"
-
-websocket-driver@>=0.3.6:
-  version "0.7.0"
-  resolved "https://registry.yarnpkg.com/websocket-driver/-/websocket-driver-0.7.0.tgz#0caf9d2d755d93aee049d4bdd0d3fe2cca2a24eb"
-  dependencies:
-    http-parser-js ">=0.4.0"
-    websocket-extensions ">=0.1.1"
-
-websocket-extensions@>=0.1.1:
-  version "0.1.3"
-  resolved "https://registry.yarnpkg.com/websocket-extensions/-/websocket-extensions-0.1.3.tgz#5d2ff22977003ec687a4b87073dfbbac146ccf29"
-
-whet.extend@~0.9.9:
-  version "0.9.9"
-  resolved "https://registry.yarnpkg.com/whet.extend/-/whet.extend-0.9.9.tgz#f877d5bf648c97e5aa542fadc16d6a259b9c11a1"
-
-which-module@^1.0.0:
-  version "1.0.0"
-  resolved "https://registry.yarnpkg.com/which-module/-/which-module-1.0.0.tgz#bba63ca861948994ff307736089e3b96026c2a4f"
-
-which@1, which@^1.2.10, which@^1.2.14, which@^1.2.9, which@^1.3.0:
-  version "1.3.1"
-  resolved "https://registry.yarnpkg.com/which/-/which-1.3.1.tgz#a45043d54f5805316da8d62f9f50918d3da70b0a"
-  dependencies:
-    isexe "^2.0.0"
-
-wide-align@^1.1.0:
-  version "1.1.3"
-  resolved "https://registry.yarnpkg.com/wide-align/-/wide-align-1.1.3.tgz#ae074e6bdc0c14a431e804e624549c633b000457"
-  dependencies:
-    string-width "^1.0.2 || 2"
-
-window-size@0.1.0:
-  version "0.1.0"
-  resolved "https://registry.yarnpkg.com/window-size/-/window-size-0.1.0.tgz#5438cd2ea93b202efa3a19fe8887aee7c94f9c9d"
-
-winston@^2.4.0:
-  version "2.4.4"
-  resolved "https://registry.yarnpkg.com/winston/-/winston-2.4.4.tgz#a01e4d1d0a103cf4eada6fc1f886b3110d71c34b"
-  dependencies:
-    async "~1.0.0"
-    colors "1.0.x"
-    cycle "1.0.x"
-    eyes "0.1.x"
-    isstream "0.1.x"
-    stack-trace "0.0.x"
-
-wordwrap@0.0.2:
-  version "0.0.2"
-  resolved "https://registry.yarnpkg.com/wordwrap/-/wordwrap-0.0.2.tgz#b79669bb42ecb409f83d583cad52ca17eaa1643f"
-
-wrap-ansi@^2.0.0:
-  version "2.1.0"
-  resolved "http://registry.npmjs.org/wrap-ansi/-/wrap-ansi-2.1.0.tgz#d8fc3d284dd05794fe84973caecdd1cf824fdd85"
-  dependencies:
-    string-width "^1.0.1"
-    strip-ansi "^3.0.1"
-
-wrap-fn@^0.1.0:
-  version "0.1.5"
-  resolved "https://registry.yarnpkg.com/wrap-fn/-/wrap-fn-0.1.5.tgz#f21b6e41016ff4a7e31720dbc63a09016bdf9845"
-  dependencies:
-    co "3.1.0"
-
-wrappy@1:
-  version "1.0.2"
-  resolved "https://registry.yarnpkg.com/wrappy/-/wrappy-1.0.2.tgz#b5243d8f3ec1aa35f1364605bc0d1036e30ab69f"
-
-"xtend@>=4.0.0 <4.1.0-0", xtend@^4.0.0, xtend@~4.0.0, xtend@~4.0.1:
-  version "4.0.1"
-  resolved "https://registry.yarnpkg.com/xtend/-/xtend-4.0.1.tgz#a5c6d532be656e23db820efb943a1f04998d63af"
-
-xtend@~3.0.0:
-  version "3.0.0"
-  resolved "https://registry.yarnpkg.com/xtend/-/xtend-3.0.0.tgz#5cce7407baf642cba7becda568111c493f59665a"
-
-y18n@^3.2.1:
-  version "3.2.1"
-  resolved "https://registry.yarnpkg.com/y18n/-/y18n-3.2.1.tgz#6d15fba884c08679c0d77e88e7759e811e07fa41"
-
-yallist@^2.1.2:
-  version "2.1.2"
-  resolved "https://registry.yarnpkg.com/yallist/-/yallist-2.1.2.tgz#1c11f9218f076089a47dd512f93c6699a6a81d52"
-
-yargs-parser@^5.0.0:
-  version "5.0.0"
-  resolved "https://registry.yarnpkg.com/yargs-parser/-/yargs-parser-5.0.0.tgz#275ecf0d7ffe05c77e64e7c86e4cd94bf0e1228a"
-  dependencies:
-    camelcase "^3.0.0"
-
-yargs@^7.0.0:
-  version "7.1.0"
-  resolved "https://registry.yarnpkg.com/yargs/-/yargs-7.1.0.tgz#6ba318eb16961727f5d284f8ea003e8d6154d0c8"
-  dependencies:
-    camelcase "^3.0.0"
-    cliui "^3.2.0"
-    decamelize "^1.1.1"
-    get-caller-file "^1.0.1"
-    os-locale "^1.4.0"
-    read-pkg-up "^1.0.1"
-    require-directory "^2.1.1"
-    require-main-filename "^1.0.1"
-    set-blocking "^2.0.0"
-    string-width "^1.0.2"
-    which-module "^1.0.0"
-    y18n "^3.2.1"
-    yargs-parser "^5.0.0"
-
-yargs@~3.10.0:
-  version "3.10.0"
-  resolved "http://registry.npmjs.org/yargs/-/yargs-3.10.0.tgz#f7ee7bd857dd7c1d2d38c0e74efbd681d1431fd1"
-  dependencies:
-    camelcase "^1.0.2"
-    cliui "^2.1.0"
-    decamelize "^1.0.0"
-    window-size "0.1.0"
-
-yauzl@2.4.1:
-  version "2.4.1"
-  resolved "https://registry.yarnpkg.com/yauzl/-/yauzl-2.4.1.tgz#9528f442dab1b2284e58b4379bb194e22e0c4005"
-  dependencies:
-    fd-slicer "~1.0.1"
-
-yauzl@^2.2.1:
-  version "2.10.0"
-  resolved "https://registry.yarnpkg.com/yauzl/-/yauzl-2.10.0.tgz#c7eb17c93e112cb1086fa6d8e51fb0667b79a5f9"
-  dependencies:
-    buffer-crc32 "~0.2.3"
-    fd-slicer "~1.1.0"
diff --git a/Gems/AssetMemoryAnalyzer/gem.json b/Gems/AssetMemoryAnalyzer/gem.json
deleted file mode 100644
index 902102fa27..0000000000
--- a/Gems/AssetMemoryAnalyzer/gem.json
+++ /dev/null
@@ -1,22 +0,0 @@
-{
-    "gem_name": "AssetMemoryAnalyzer",
-    "display_name": "Asset Memory Analyzer",
-    "license": "Apache-2.0 Or MIT",
-    "origin": "Open 3D Engine - o3de.org",
-    "type": "Code",
-    "summary": "The Asset Memory Analyzer Gem provides tools to profile asset memory usage in Open 3D Engine through ImGUI (Immediate Mode Graphical User Interface).",
-    "canonical_tags": [
-        "Gem"
-    ],
-    "user_tags": [
-        "Debug",
-        "Utility",
-        "Tools"
-    ],
-    "icon_path": "preview.png",
-    "requirements": "",
-    "documentation_url": "https://o3de.org/docs/user-guide/gems/reference/debug/asset-memory-analyzer/",
-    "dependencies": [
-        "ImGui"
-    ]
-}
diff --git a/Gems/AssetMemoryAnalyzer/preview.png b/Gems/AssetMemoryAnalyzer/preview.png
deleted file mode 100644
index 2f1ed47754..0000000000
--- a/Gems/AssetMemoryAnalyzer/preview.png
+++ /dev/null
@@ -1,3 +0,0 @@
-version https://git-lfs.github.com/spec/v1
-oid sha256:6d6204c6730e5675791765ca194e9b1cbec282208e280507de830afc2805e5fa
-size 41127
diff --git a/Gems/AssetMemoryAnalyzer/www/AssetMemoryViewer/index.html b/Gems/AssetMemoryAnalyzer/www/AssetMemoryViewer/index.html
deleted file mode 100644
index 85a4e47db8..0000000000
--- a/Gems/AssetMemoryAnalyzer/www/AssetMemoryViewer/index.html
+++ /dev/null
@@ -1,268 +0,0 @@
-
-
-Lumberyard Asset Memory Viewer
-
-
-
-
-
-
-
-
-
-
-
- Drop your assetmem JSON file here, or click to browse to it. -
- - - - -
- -
-
- - - - diff --git a/Gems/AssetValidation/Code/Source/AssetValidationSystemComponent.cpp b/Gems/AssetValidation/Code/Source/AssetValidationSystemComponent.cpp index 56f28856af..8f8fb48212 100644 --- a/Gems/AssetValidation/Code/Source/AssetValidationSystemComponent.cpp +++ b/Gems/AssetValidation/Code/Source/AssetValidationSystemComponent.cpp @@ -439,13 +439,6 @@ namespace AssetValidation bool GetDefaultSeedListFiles(AZStd::vector& defaultSeedListFiles) { - const char* engineRoot = nullptr; - AzFramework::ApplicationRequests::Bus::BroadcastResult(engineRoot, &AzFramework::ApplicationRequests::GetEngineRoot); - - const char* appRoot = nullptr; - AzFramework::ApplicationRequests::Bus::BroadcastResult(appRoot, &AzFramework::ApplicationRequests::GetAppRoot); - - auto settingsRegistry = AZ::SettingsRegistry::Get(); AZ::SettingsRegistryInterface::FixedValueString gameFolder; auto projectKey = AZ::SettingsRegistryInterface::FixedValueString::format("%s/project_path", AZ::SettingsRegistryMergeUtils::BootstrapSettingsRootKey); @@ -509,30 +502,28 @@ namespace AssetValidation AZ::Outcome AssetValidationSystemComponent::LoadSeedList(const char* seedPath, AZStd::string& seedListPath) { - AZStd::string absoluteSeedPath = seedPath; + AZ::IO::Path absoluteSeedPath = seedPath; if (AZ::StringFunc::Path::IsRelative(seedPath)) { - const char* appRoot = nullptr; - AzFramework::ApplicationRequests::Bus::BroadcastResult(appRoot, &AzFramework::ApplicationRequests::GetEngineRoot); + AZ::IO::FixedMaxPath engineRoot = AZ::Utils::GetEnginePath(); - if (!appRoot) + if (engineRoot.empty()) { return AZ::Failure(AZStd::string("Couldn't get engine root")); } - absoluteSeedPath = AZStd::string::format("%s/%s", appRoot, seedPath); + absoluteSeedPath = (engineRoot / seedPath).String(); } - AzFramework::StringFunc::Path::Normalize(absoluteSeedPath); AzFramework::AssetSeedList seedList; - if (!AZ::Utils::LoadObjectFromFileInPlace(absoluteSeedPath, seedList)) + if (!AZ::Utils::LoadObjectFromFileInPlace(absoluteSeedPath.Native(), seedList)) { return AZ::Failure(AZStd::string::format("Failed to load seed list %s", absoluteSeedPath.c_str())); } - seedListPath = absoluteSeedPath; + seedListPath = AZStd::move(absoluteSeedPath.Native()); return AZ::Success(seedList); } diff --git a/Gems/AssetValidation/Code/Tests/AssetValidationTestShared.h b/Gems/AssetValidation/Code/Tests/AssetValidationTestShared.h index 456afd0006..8da3ae1b34 100644 --- a/Gems/AssetValidation/Code/Tests/AssetValidationTestShared.h +++ b/Gems/AssetValidation/Code/Tests/AssetValidationTestShared.h @@ -150,13 +150,13 @@ struct AssetValidationTest auto projectPathKey = AZ::SettingsRegistryInterface::FixedValueString(AZ::SettingsRegistryMergeUtils::BootstrapSettingsRootKey) + "/project_path"; - m_registry.Set(projectPathKey, "AutomatedTesting"); + m_registry.Set(projectPathKey, (AZ::IO::FixedMaxPath(m_tempDir.GetDirectory()) / "AutomatedTesting").Native()); AZ::SettingsRegistryMergeUtils::MergeSettingsToRegistry_AddRuntimeFilePaths(m_registry); // Set the engine root to the temporary directory and re-update the runtime file paths auto enginePathKey = AZ::SettingsRegistryInterface::FixedValueString(AZ::SettingsRegistryMergeUtils::BootstrapSettingsRootKey) + "/engine_path"; - m_registry.Set(enginePathKey, GetEngineRoot()); + m_registry.Set(enginePathKey, m_tempDir.GetDirectory()); AZ::SettingsRegistryMergeUtils::MergeSettingsToRegistry_AddRuntimeFilePaths(m_registry); } } @@ -176,11 +176,6 @@ struct AssetValidationTest AZ_Assert(false, "Not implemented"); } - const char* GetEngineRoot() const override - { - return m_tempDir.GetDirectory(); - } - void SetUp() override { using namespace ::testing; diff --git a/Gems/AssetValidation/gem.json b/Gems/AssetValidation/gem.json index 1e57f60dc4..55cdffb9f3 100644 --- a/Gems/AssetValidation/gem.json +++ b/Gems/AssetValidation/gem.json @@ -2,6 +2,7 @@ "gem_name": "AssetValidation", "display_name": "Asset Validation", "license": "Apache-2.0 Or MIT", + "license_url": "https://github.com/o3de/o3de/blob/development/LICENSE.txt", "origin": "Open 3D Engine - o3de.org", "type": "Code", "summary": "The Asset Validation Gem provides seed-related commands to ensure assets have valid seeds for asset bundling.", diff --git a/Gems/Atom/Asset/ImageProcessingAtom/Assets/Config/Albedo.preset b/Gems/Atom/Asset/ImageProcessingAtom/Assets/Config/Albedo.preset new file mode 100644 index 0000000000..dc1f38d2da --- /dev/null +++ b/Gems/Atom/Asset/ImageProcessingAtom/Assets/Config/Albedo.preset @@ -0,0 +1,66 @@ +{ + "Type": "JsonSerialization", + "Version": 1, + "ClassName": "MultiplatformPresetSettings", + "ClassData": { + "DefaultPreset": { + "UUID": "{08A95286-ADB2-41E4-96EB-DB48F4726D6A}", + "Name": "Albedo", + "RGB_Weight": "CIEXYZ", + "PixelFormat": "BC1", + "DiscardAlpha": true, + "IsPowerOf2": true, + "MipMapSetting": { + "MipGenType": "Box" + } + }, + "PlatformsPresets": { + "android": { + "UUID": "{08A95286-ADB2-41E4-96EB-DB48F4726D6A}", + "Name": "Albedo", + "RGB_Weight": "CIEXYZ", + "PixelFormat": "ASTC_6x6", + "MaxTextureSize": 2048, + "DiscardAlpha": true, + "IsPowerOf2": true, + "MipMapSetting": { + "MipGenType": "Box" + } + }, + "ios": { + "UUID": "{08A95286-ADB2-41E4-96EB-DB48F4726D6A}", + "Name": "Albedo", + "RGB_Weight": "CIEXYZ", + "PixelFormat": "ASTC_6x6", + "MaxTextureSize": 2048, + "DiscardAlpha": true, + "IsPowerOf2": true, + "MipMapSetting": { + "MipGenType": "Box" + } + }, + "mac": { + "UUID": "{08A95286-ADB2-41E4-96EB-DB48F4726D6A}", + "Name": "Albedo", + "RGB_Weight": "CIEXYZ", + "PixelFormat": "BC1", + "DiscardAlpha": true, + "IsPowerOf2": true, + "MipMapSetting": { + "MipGenType": "Box" + } + }, + "provo": { + "UUID": "{08A95286-ADB2-41E4-96EB-DB48F4726D6A}", + "Name": "Albedo", + "RGB_Weight": "CIEXYZ", + "PixelFormat": "BC1", + "DiscardAlpha": true, + "IsPowerOf2": true, + "MipMapSetting": { + "MipGenType": "Box" + } + } + } + } +} diff --git a/Gems/Atom/Asset/ImageProcessingAtom/Assets/Config/AlbedoWithCoverage.preset b/Gems/Atom/Asset/ImageProcessingAtom/Assets/Config/AlbedoWithCoverage.preset new file mode 100644 index 0000000000..439a057410 --- /dev/null +++ b/Gems/Atom/Asset/ImageProcessingAtom/Assets/Config/AlbedoWithCoverage.preset @@ -0,0 +1,59 @@ +{ + "Type": "JsonSerialization", + "Version": 1, + "ClassName": "MultiplatformPresetSettings", + "ClassData": { + "DefaultPreset": { + "UUID": "{57ED16B1-407B-4E29-BCFC-D3BAE60F2C85}", + "Name": "AlbedoWithCoverage", + "RGB_Weight": "CIEXYZ", + "PixelFormat": "BC1a", + "IsPowerOf2": true, + "MipMapSetting": { + "MipGenType": "Box" + } + }, + "PlatformsPresets": { + "android": { + "UUID": "{57ED16B1-407B-4E29-BCFC-D3BAE60F2C85}", + "Name": "AlbedoWithCoverage", + "RGB_Weight": "CIEXYZ", + "PixelFormat": "ASTC_6x6", + "IsPowerOf2": true, + "MipMapSetting": { + "MipGenType": "Box" + } + }, + "ios": { + "UUID": "{57ED16B1-407B-4E29-BCFC-D3BAE60F2C85}", + "Name": "AlbedoWithCoverage", + "RGB_Weight": "CIEXYZ", + "PixelFormat": "ASTC_6x6", + "IsPowerOf2": true, + "MipMapSetting": { + "MipGenType": "Box" + } + }, + "mac": { + "UUID": "{57ED16B1-407B-4E29-BCFC-D3BAE60F2C85}", + "Name": "AlbedoWithCoverage", + "RGB_Weight": "CIEXYZ", + "PixelFormat": "BC1a", + "IsPowerOf2": true, + "MipMapSetting": { + "MipGenType": "Box" + } + }, + "provo": { + "UUID": "{57ED16B1-407B-4E29-BCFC-D3BAE60F2C85}", + "Name": "AlbedoWithCoverage", + "RGB_Weight": "CIEXYZ", + "PixelFormat": "BC1a", + "IsPowerOf2": true, + "MipMapSetting": { + "MipGenType": "Box" + } + } + } + } +} diff --git a/Gems/Atom/Asset/ImageProcessingAtom/Assets/Config/AlbedoWithGenericAlpha.preset b/Gems/Atom/Asset/ImageProcessingAtom/Assets/Config/AlbedoWithGenericAlpha.preset new file mode 100644 index 0000000000..3340fd39e4 --- /dev/null +++ b/Gems/Atom/Asset/ImageProcessingAtom/Assets/Config/AlbedoWithGenericAlpha.preset @@ -0,0 +1,56 @@ +{ + "Type": "JsonSerialization", + "Version": 1, + "ClassName": "MultiplatformPresetSettings", + "ClassData": { + "DefaultPreset": { + "UUID": "{5D9ECB52-4CD9-4CB8-80E3-10CAE5EFB8A2}", + "Name": "AlbedoWithGenericAlpha", + "RGB_Weight": "CIEXYZ", + "PixelFormat": "BC3", + "MipMapSetting": { + "MipGenType": "Box" + } + }, + "PlatformsPresets": { + "android": { + "UUID": "{5D9ECB52-4CD9-4CB8-80E3-10CAE5EFB8A2}", + "Name": "AlbedoWithGenericAlpha", + "RGB_Weight": "CIEXYZ", + "PixelFormat": "ASTC_6x6", + "MaxTextureSize": 2048, + "MipMapSetting": { + "MipGenType": "Box" + } + }, + "ios": { + "UUID": "{5D9ECB52-4CD9-4CB8-80E3-10CAE5EFB8A2}", + "Name": "AlbedoWithGenericAlpha", + "RGB_Weight": "CIEXYZ", + "PixelFormat": "ASTC_6x6", + "MaxTextureSize": 2048, + "MipMapSetting": { + "MipGenType": "Box" + } + }, + "mac": { + "UUID": "{5D9ECB52-4CD9-4CB8-80E3-10CAE5EFB8A2}", + "Name": "AlbedoWithGenericAlpha", + "RGB_Weight": "CIEXYZ", + "PixelFormat": "BC3", + "MipMapSetting": { + "MipGenType": "Box" + } + }, + "provo": { + "UUID": "{5D9ECB52-4CD9-4CB8-80E3-10CAE5EFB8A2}", + "Name": "AlbedoWithGenericAlpha", + "RGB_Weight": "CIEXYZ", + "PixelFormat": "BC3", + "MipMapSetting": { + "MipGenType": "Box" + } + } + } + } +} diff --git a/Gems/Atom/Asset/ImageProcessingAtom/Assets/Config/AmbientOcclusion.preset b/Gems/Atom/Asset/ImageProcessingAtom/Assets/Config/AmbientOcclusion.preset new file mode 100644 index 0000000000..573de18b88 --- /dev/null +++ b/Gems/Atom/Asset/ImageProcessingAtom/Assets/Config/AmbientOcclusion.preset @@ -0,0 +1,46 @@ +{ + "Type": "JsonSerialization", + "Version": 1, + "ClassName": "MultiplatformPresetSettings", + "ClassData": { + "DefaultPreset": { + "UUID": "{02ED0ECE-B198-49D9-85BC-CEBA6C28546C}", + "Name": "AmbientOcclusion", + "SourceColor": "Linear", + "DestColor": "Linear", + "PixelFormat": "BC4" + }, + "PlatformsPresets": { + "android": { + "UUID": "{02ED0ECE-B198-49D9-85BC-CEBA6C28546C}", + "Name": "AmbientOcclusion", + "SourceColor": "Linear", + "DestColor": "Linear", + "MaxTextureSize": 2048, + "PixelFormat": "ASTC_4x4" + }, + "ios": { + "UUID": "{02ED0ECE-B198-49D9-85BC-CEBA6C28546C}", + "Name": "AmbientOcclusion", + "SourceColor": "Linear", + "DestColor": "Linear", + "MaxTextureSize": 2048, + "PixelFormat": "ASTC_4x4" + }, + "mac": { + "UUID": "{02ED0ECE-B198-49D9-85BC-CEBA6C28546C}", + "Name": "AmbientOcclusion", + "SourceColor": "Linear", + "DestColor": "Linear", + "PixelFormat": "BC4" + }, + "provo": { + "UUID": "{02ED0ECE-B198-49D9-85BC-CEBA6C28546C}", + "Name": "AmbientOcclusion", + "SourceColor": "Linear", + "DestColor": "Linear", + "PixelFormat": "BC4" + } + } + } +} diff --git a/Gems/Atom/Asset/ImageProcessingAtom/Config/ConvolvedCubemap.preset b/Gems/Atom/Asset/ImageProcessingAtom/Assets/Config/ConvolvedCubemap.preset similarity index 88% rename from Gems/Atom/Asset/ImageProcessingAtom/Config/ConvolvedCubemap.preset rename to Gems/Atom/Asset/ImageProcessingAtom/Assets/Config/ConvolvedCubemap.preset index abdf6501be..1ef15ada45 100644 --- a/Gems/Atom/Asset/ImageProcessingAtom/Config/ConvolvedCubemap.preset +++ b/Gems/Atom/Asset/ImageProcessingAtom/Assets/Config/ConvolvedCubemap.preset @@ -8,10 +8,6 @@ "Name": "ConvolvedCubemap", "SourceColor": "Linear", "DestColor": "Linear", - "FileMasks": [ - "_ccm", - "_convolvedcubemap" - ], "SuppressEngineReduce": true, "PixelFormat": "R9G9B9E5", "DiscardAlpha": true, @@ -35,10 +31,6 @@ "Name": "ConvolvedCubemap", "SourceColor": "Linear", "DestColor": "Linear", - "FileMasks": [ - "_ccm", - "_convolvedcubemap" - ], "SuppressEngineReduce": true, "PixelFormat": "R9G9B9E5", "DiscardAlpha": true, @@ -61,10 +53,6 @@ "Name": "ConvolvedCubemap", "SourceColor": "Linear", "DestColor": "Linear", - "FileMasks": [ - "_ccm", - "_convolvedcubemap" - ], "SuppressEngineReduce": true, "PixelFormat": "R9G9B9E5", "DiscardAlpha": true, @@ -87,10 +75,6 @@ "Name": "ConvolvedCubemap", "SourceColor": "Linear", "DestColor": "Linear", - "FileMasks": [ - "_ccm", - "_convolvedcubemap" - ], "SuppressEngineReduce": true, "PixelFormat": "R9G9B9E5", "DiscardAlpha": true, @@ -113,10 +97,6 @@ "Name": "ConvolvedCubemap", "SourceColor": "Linear", "DestColor": "Linear", - "FileMasks": [ - "_ccm", - "_convolvedcubemap" - ], "SuppressEngineReduce": true, "PixelFormat": "R9G9B9E5", "DiscardAlpha": true, diff --git a/Gems/Atom/Asset/ImageProcessingAtom/Config/Decal_AlbedoWithOpacity.preset b/Gems/Atom/Asset/ImageProcessingAtom/Assets/Config/Decal_AlbedoWithOpacity.preset similarity index 86% rename from Gems/Atom/Asset/ImageProcessingAtom/Config/Decal_AlbedoWithOpacity.preset rename to Gems/Atom/Asset/ImageProcessingAtom/Assets/Config/Decal_AlbedoWithOpacity.preset index e2e009afc5..873d434380 100644 --- a/Gems/Atom/Asset/ImageProcessingAtom/Config/Decal_AlbedoWithOpacity.preset +++ b/Gems/Atom/Asset/ImageProcessingAtom/Assets/Config/Decal_AlbedoWithOpacity.preset @@ -6,9 +6,6 @@ "DefaultPreset": { "UUID": "{E06B5087-2640-49B6-B9BA-D40048162B90}", "Name": "Decal_AlbedoWithOpacity", - "FileMasks": [ - "_decal" - ], "PixelFormat": "BC7t", "IsPowerOf2": true, "MipMapSetting": { @@ -21,9 +18,6 @@ "android": { "UUID": "{E06B5087-2640-49B6-B9BA-D40048162B90}", "Name": "Decal_AlbedoWithOpacity", - "FileMasks": [ - "_decal" - ], "PixelFormat": "ASTC_4x4", "MaxTextureSize": 2048, "IsPowerOf2": true, @@ -36,9 +30,6 @@ "ios": { "UUID": "{E06B5087-2640-49B6-B9BA-D40048162B90}", "Name": "Decal_AlbedoWithOpacity", - "FileMasks": [ - "_decal" - ], "PixelFormat": "ASTC_4x4", "MaxTextureSize": 2048, "IsPowerOf2": true, @@ -51,9 +42,6 @@ "mac": { "UUID": "{E06B5087-2640-49B6-B9BA-D40048162B90}", "Name": "Decal_AlbedoWithOpacity", - "FileMasks": [ - "_decal" - ], "PixelFormat": "BC3", "IsPowerOf2": true, "MipMapSetting": { @@ -65,9 +53,6 @@ "provo": { "UUID": "{E06B5087-2640-49B6-B9BA-D40048162B90}", "Name": "Decal_AlbedoWithOpacity", - "FileMasks": [ - "_decal" - ], "PixelFormat": "BC7t", "IsPowerOf2": true, "MipMapSetting": { diff --git a/Gems/Atom/Asset/ImageProcessingAtom/Assets/Config/Displacement.preset b/Gems/Atom/Asset/ImageProcessingAtom/Assets/Config/Displacement.preset new file mode 100644 index 0000000000..04f35dbd6f --- /dev/null +++ b/Gems/Atom/Asset/ImageProcessingAtom/Assets/Config/Displacement.preset @@ -0,0 +1,72 @@ +{ + "Type": "JsonSerialization", + "Version": 1, + "ClassName": "MultiplatformPresetSettings", + "ClassData": { + "DefaultPreset": { + "UUID": "{D7B4BEA6-6427-4295-B61B-62776D0056DE}", + "Name": "Displacement", + "SourceColor": "Linear", + "DestColor": "Linear", + "PixelFormat": "BC4", + "DiscardAlpha": true, + "IsPowerOf2": true, + "MipMapSetting": { + "MipGenType": "Box" + } + }, + "PlatformsPresets": { + "android": { + "UUID": "{D7B4BEA6-6427-4295-B61B-62776D0056DE}", + "Name": "Displacement", + "SourceColor": "Linear", + "DestColor": "Linear", + "PixelFormat": "ASTC_4x4", + "MaxTextureSize": 2048, + "DiscardAlpha": true, + "IsPowerOf2": true, + "SizeReduceLevel": 3, + "MipMapSetting": { + "MipGenType": "Box" + } + }, + "ios": { + "UUID": "{D7B4BEA6-6427-4295-B61B-62776D0056DE}", + "Name": "Displacement", + "SourceColor": "Linear", + "DestColor": "Linear", + "PixelFormat": "ASTC_4x4", + "MaxTextureSize": 2048, + "DiscardAlpha": true, + "IsPowerOf2": true, + "MipMapSetting": { + "MipGenType": "Box" + } + }, + "mac": { + "UUID": "{D7B4BEA6-6427-4295-B61B-62776D0056DE}", + "Name": "Displacement", + "SourceColor": "Linear", + "DestColor": "Linear", + "PixelFormat": "BC4", + "DiscardAlpha": true, + "IsPowerOf2": true, + "MipMapSetting": { + "MipGenType": "Box" + } + }, + "provo": { + "UUID": "{D7B4BEA6-6427-4295-B61B-62776D0056DE}", + "Name": "Displacement", + "SourceColor": "Linear", + "DestColor": "Linear", + "PixelFormat": "BC4", + "DiscardAlpha": true, + "IsPowerOf2": true, + "MipMapSetting": { + "MipGenType": "Box" + } + } + } + } +} diff --git a/Gems/Atom/Asset/ImageProcessingAtom/Assets/Config/Emissive.preset b/Gems/Atom/Asset/ImageProcessingAtom/Assets/Config/Emissive.preset new file mode 100644 index 0000000000..798b8d1657 --- /dev/null +++ b/Gems/Atom/Asset/ImageProcessingAtom/Assets/Config/Emissive.preset @@ -0,0 +1,46 @@ +{ + "Type": "JsonSerialization", + "Version": 1, + "ClassName": "MultiplatformPresetSettings", + "ClassData": { + "DefaultPreset": { + "UUID": "{07041D83-E0C3-4726-8735-CA0FE550C9A0}", + "Name": "Emissive", + "RGB_Weight": "CIEXYZ", + "PixelFormat": "BC7", + "DiscardAlpha": true + }, + "PlatformsPresets": { + "android": { + "UUID": "{07041D83-E0C3-4726-8735-CA0FE550C9A0}", + "Name": "Emissive", + "RGB_Weight": "CIEXYZ", + "PixelFormat": "ASTC_6x6", + "MaxTextureSize": 2048, + "DiscardAlpha": true + }, + "ios": { + "UUID": "{07041D83-E0C3-4726-8735-CA0FE550C9A0}", + "Name": "Emissive", + "RGB_Weight": "CIEXYZ", + "PixelFormat": "ASTC_6x6", + "MaxTextureSize": 2048, + "DiscardAlpha": true + }, + "mac": { + "UUID": "{07041D83-E0C3-4726-8735-CA0FE550C9A0}", + "Name": "Emissive", + "RGB_Weight": "CIEXYZ", + "PixelFormat": "BC7", + "DiscardAlpha": true + }, + "provo": { + "UUID": "{07041D83-E0C3-4726-8735-CA0FE550C9A0}", + "Name": "Emissive", + "RGB_Weight": "CIEXYZ", + "PixelFormat": "BC7", + "DiscardAlpha": true + } + } + } +} diff --git a/Gems/Atom/Asset/ImageProcessingAtom/Config/Gradient.preset b/Gems/Atom/Asset/ImageProcessingAtom/Assets/Config/Gradient.preset similarity index 100% rename from Gems/Atom/Asset/ImageProcessingAtom/Config/Gradient.preset rename to Gems/Atom/Asset/ImageProcessingAtom/Assets/Config/Gradient.preset diff --git a/Gems/Atom/Asset/ImageProcessingAtom/Config/Greyscale.preset b/Gems/Atom/Asset/ImageProcessingAtom/Assets/Config/Greyscale.preset similarity index 77% rename from Gems/Atom/Asset/ImageProcessingAtom/Config/Greyscale.preset rename to Gems/Atom/Asset/ImageProcessingAtom/Assets/Config/Greyscale.preset index c71ada1269..19439bad2d 100644 --- a/Gems/Atom/Asset/ImageProcessingAtom/Config/Greyscale.preset +++ b/Gems/Atom/Asset/ImageProcessingAtom/Assets/Config/Greyscale.preset @@ -8,11 +8,8 @@ "Name": "Greyscale", "SourceColor": "Linear", "DestColor": "Linear", - "FileMasks": [ - "_mask" - ], "PixelFormat": "BC4", - "IsPowerOf2": true, + "Swizzle": "rrr1", "MipMapSetting": { "MipGenType": "Box" } @@ -23,11 +20,8 @@ "Name": "Greyscale", "SourceColor": "Linear", "DestColor": "Linear", - "FileMasks": [ - "_mask" - ], "PixelFormat": "ASTC_4x4", - "IsPowerOf2": true, + "Swizzle": "rrr1", "MipMapSetting": { "MipGenType": "Box" } @@ -37,11 +31,8 @@ "Name": "Greyscale", "SourceColor": "Linear", "DestColor": "Linear", - "FileMasks": [ - "_mask" - ], "PixelFormat": "ASTC_4x4", - "IsPowerOf2": true, + "Swizzle": "rrr1", "MipMapSetting": { "MipGenType": "Box" } @@ -51,11 +42,8 @@ "Name": "Greyscale", "SourceColor": "Linear", "DestColor": "Linear", - "FileMasks": [ - "_mask" - ], "PixelFormat": "BC4", - "IsPowerOf2": true, + "Swizzle": "rrr1", "MipMapSetting": { "MipGenType": "Box" } @@ -65,11 +53,8 @@ "Name": "Greyscale", "SourceColor": "Linear", "DestColor": "Linear", - "FileMasks": [ - "_mask" - ], "PixelFormat": "BC4", - "IsPowerOf2": true, + "Swizzle": "rrr1", "MipMapSetting": { "MipGenType": "Box" } diff --git a/Gems/Atom/Asset/ImageProcessingAtom/Config/IBLDiffuse.preset b/Gems/Atom/Asset/ImageProcessingAtom/Assets/Config/IBLDiffuse.preset similarity index 90% rename from Gems/Atom/Asset/ImageProcessingAtom/Config/IBLDiffuse.preset rename to Gems/Atom/Asset/ImageProcessingAtom/Assets/Config/IBLDiffuse.preset index 8bd6b348d1..845f8e13e4 100644 --- a/Gems/Atom/Asset/ImageProcessingAtom/Config/IBLDiffuse.preset +++ b/Gems/Atom/Asset/ImageProcessingAtom/Assets/Config/IBLDiffuse.preset @@ -7,9 +7,6 @@ "UUID": "{E3706342-BF21-4D9C-AE28-9670EB3EF3C5}", "Name": "IBLDiffuse", "Description": "The input cubemap generates an IBL diffuse output cubemap.", - "FileMasks": [ - "_ibldiffusecm" - ], "SourceColor": "Linear", "DestColor": "Linear", "SuppressEngineReduce": true, @@ -31,9 +28,6 @@ "android": { "UUID": "{E3706342-BF21-4D9C-AE28-9670EB3EF3C5}", "Name": "IBLDiffuse", - "FileMasks": [ - "_ibldiffusecm" - ], "SourceColor": "Linear", "DestColor": "Linear", "SuppressEngineReduce": true, @@ -54,9 +48,6 @@ "ios": { "UUID": "{E3706342-BF21-4D9C-AE28-9670EB3EF3C5}", "Name": "IBLDiffuse", - "FileMasks": [ - "_ibldiffusecm" - ], "SourceColor": "Linear", "DestColor": "Linear", "SuppressEngineReduce": true, @@ -77,9 +68,6 @@ "mac": { "UUID": "{E3706342-BF21-4D9C-AE28-9670EB3EF3C5}", "Name": "IBLDiffuse", - "FileMasks": [ - "_ibldiffusecm" - ], "SourceColor": "Linear", "DestColor": "Linear", "SuppressEngineReduce": true, @@ -100,9 +88,6 @@ "provo": { "UUID": "{E3706342-BF21-4D9C-AE28-9670EB3EF3C5}", "Name": "IBLDiffuse", - "FileMasks": [ - "_ibldiffusecm" - ], "SourceColor": "Linear", "DestColor": "Linear", "SuppressEngineReduce": true, diff --git a/Gems/Atom/Asset/ImageProcessingAtom/Config/IBLGlobal.preset b/Gems/Atom/Asset/ImageProcessingAtom/Assets/Config/IBLGlobal.preset similarity index 83% rename from Gems/Atom/Asset/ImageProcessingAtom/Config/IBLGlobal.preset rename to Gems/Atom/Asset/ImageProcessingAtom/Assets/Config/IBLGlobal.preset index 717157f2aa..51daf44d6e 100644 --- a/Gems/Atom/Asset/ImageProcessingAtom/Config/IBLGlobal.preset +++ b/Gems/Atom/Asset/ImageProcessingAtom/Assets/Config/IBLGlobal.preset @@ -8,11 +8,6 @@ "Name": "IBLGlobal", "Description": "The input cubemap generates IBL specular and diffuse cubemaps.", "GenerateIBLOnly": true, - "FileMasks": [ - "_iblglobalcm", - "_cubemap", - "_cm" - ], "CubemapSettings": { "GenerateIBLSpecular": true, "IBLSpecularPreset": "IBLSpecular", diff --git a/Gems/Atom/Asset/ImageProcessingAtom/Config/IBLSkybox.preset b/Gems/Atom/Asset/ImageProcessingAtom/Assets/Config/IBLSkybox.preset similarity index 90% rename from Gems/Atom/Asset/ImageProcessingAtom/Config/IBLSkybox.preset rename to Gems/Atom/Asset/ImageProcessingAtom/Assets/Config/IBLSkybox.preset index eee9af4cea..1a596468bd 100644 --- a/Gems/Atom/Asset/ImageProcessingAtom/Config/IBLSkybox.preset +++ b/Gems/Atom/Asset/ImageProcessingAtom/Assets/Config/IBLSkybox.preset @@ -7,9 +7,6 @@ "UUID": "{E6441EAC-9843-484B-8EFC-C03B2935B48D}", "Name": "IBLSkybox", "Description": "The input cubemap generates a skybox, IBL specular, and IBL diffuse output cubemaps.", - "FileMasks": [ - "_iblskyboxcm" - ], "SourceColor": "Linear", "DestColor": "Linear", "SuppressEngineReduce": true, @@ -29,9 +26,6 @@ "android": { "UUID": "{E6441EAC-9843-484B-8EFC-C03B2935B48D}", "Name": "IBLSkybox", - "FileMasks": [ - "_iblskyboxcm" - ], "SourceColor": "Linear", "DestColor": "Linear", "SuppressEngineReduce": true, @@ -50,9 +44,6 @@ "ios": { "UUID": "{E6441EAC-9843-484B-8EFC-C03B2935B48D}", "Name": "IBLSkybox", - "FileMasks": [ - "_iblskyboxcm" - ], "SourceColor": "Linear", "DestColor": "Linear", "SuppressEngineReduce": true, @@ -71,9 +62,6 @@ "mac": { "UUID": "{E6441EAC-9843-484B-8EFC-C03B2935B48D}", "Name": "IBLSkybox", - "FileMasks": [ - "_iblskyboxcm" - ], "SourceColor": "Linear", "DestColor": "Linear", "SuppressEngineReduce": true, @@ -92,9 +80,6 @@ "provo": { "UUID": "{E6441EAC-9843-484B-8EFC-C03B2935B48D}", "Name": "IBLSkybox", - "FileMasks": [ - "_iblskyboxcm" - ], "SourceColor": "Linear", "DestColor": "Linear", "SuppressEngineReduce": true, diff --git a/Gems/Atom/Asset/ImageProcessingAtom/Config/IBLSpecular.preset b/Gems/Atom/Asset/ImageProcessingAtom/Assets/Config/IBLSpecular.preset similarity index 87% rename from Gems/Atom/Asset/ImageProcessingAtom/Config/IBLSpecular.preset rename to Gems/Atom/Asset/ImageProcessingAtom/Assets/Config/IBLSpecular.preset index 4f935c73ff..691f554540 100644 --- a/Gems/Atom/Asset/ImageProcessingAtom/Config/IBLSpecular.preset +++ b/Gems/Atom/Asset/ImageProcessingAtom/Assets/Config/IBLSpecular.preset @@ -7,10 +7,6 @@ "UUID": "{908DA68C-97FB-4C4A-97BC-5A55F30F14FA}", "Name": "IBLSpecular", "Description": "The input cubemap generates an IBL specular output cubemap.", - "FileMasks": [ - "_iblspecularcm", - "_iblspecularcm256" - ], "SourceColor": "Linear", "DestColor": "Linear", "SuppressEngineReduce": true, @@ -34,10 +30,6 @@ "android": { "UUID": "{908DA68C-97FB-4C4A-97BC-5A55F30F14FA}", "Name": "IBLSpecular", - "FileMasks": [ - "_iblspecularcm", - "_iblspecularcm256" - ], "SourceColor": "Linear", "DestColor": "Linear", "SuppressEngineReduce": true, @@ -60,10 +52,6 @@ "ios": { "UUID": "{908DA68C-97FB-4C4A-97BC-5A55F30F14FA}", "Name": "IBLSpecular", - "FileMasks": [ - "_iblspecularcm", - "_iblspecularcm256" - ], "SourceColor": "Linear", "DestColor": "Linear", "SuppressEngineReduce": true, @@ -86,10 +74,6 @@ "mac": { "UUID": "{908DA68C-97FB-4C4A-97BC-5A55F30F14FA}", "Name": "IBLSpecular", - "FileMasks": [ - "_iblspecularcm", - "_iblspecularcm256" - ], "SourceColor": "Linear", "DestColor": "Linear", "SuppressEngineReduce": true, @@ -112,10 +96,6 @@ "provo": { "UUID": "{908DA68C-97FB-4C4A-97BC-5A55F30F14FA}", "Name": "IBLSpecular", - "FileMasks": [ - "_iblspecularcm", - "_iblspecularcm256" - ], "SourceColor": "Linear", "DestColor": "Linear", "SuppressEngineReduce": true, diff --git a/Gems/Atom/Asset/ImageProcessingAtom/Config/IBLSpecularHigh.preset b/Gems/Atom/Asset/ImageProcessingAtom/Assets/Config/IBLSpecularHigh.preset similarity index 90% rename from Gems/Atom/Asset/ImageProcessingAtom/Config/IBLSpecularHigh.preset rename to Gems/Atom/Asset/ImageProcessingAtom/Assets/Config/IBLSpecularHigh.preset index ff4e143326..b436386864 100644 --- a/Gems/Atom/Asset/ImageProcessingAtom/Config/IBLSpecularHigh.preset +++ b/Gems/Atom/Asset/ImageProcessingAtom/Assets/Config/IBLSpecularHigh.preset @@ -7,9 +7,6 @@ "UUID": "{B66395E1-8D0E-4159-989B-FC2B9F091B75}", "Name": "IBLSpecularHigh", "Description": "The input cubemap generates an IBL specular output cubemap.", - "FileMasks": [ - "_iblspecularcm512" - ], "SourceColor": "Linear", "DestColor": "Linear", "SuppressEngineReduce": true, @@ -33,9 +30,6 @@ "android": { "UUID": "{B66395E1-8D0E-4159-989B-FC2B9F091B75}", "Name": "IBLSpecularHigh", - "FileMasks": [ - "_iblspecularcm512" - ], "SourceColor": "Linear", "DestColor": "Linear", "SuppressEngineReduce": true, @@ -58,9 +52,6 @@ "ios": { "UUID": "{B66395E1-8D0E-4159-989B-FC2B9F091B75}", "Name": "IBLSpecularHigh", - "FileMasks": [ - "_iblspecularcm512" - ], "SourceColor": "Linear", "DestColor": "Linear", "SuppressEngineReduce": true, @@ -83,9 +74,6 @@ "mac": { "UUID": "{B66395E1-8D0E-4159-989B-FC2B9F091B75}", "Name": "IBLSpecularHigh", - "FileMasks": [ - "_iblspecularcm512" - ], "SourceColor": "Linear", "DestColor": "Linear", "SuppressEngineReduce": true, @@ -108,9 +96,6 @@ "provo": { "UUID": "{B66395E1-8D0E-4159-989B-FC2B9F091B75}", "Name": "IBLSpecularHigh", - "FileMasks": [ - "_iblspecularcm512" - ], "SourceColor": "Linear", "DestColor": "Linear", "SuppressEngineReduce": true, diff --git a/Gems/Atom/Asset/ImageProcessingAtom/Config/IBLSpecularLow.preset b/Gems/Atom/Asset/ImageProcessingAtom/Assets/Config/IBLSpecularLow.preset similarity index 90% rename from Gems/Atom/Asset/ImageProcessingAtom/Config/IBLSpecularLow.preset rename to Gems/Atom/Asset/ImageProcessingAtom/Assets/Config/IBLSpecularLow.preset index ee9ddd6ac7..7810028efa 100644 --- a/Gems/Atom/Asset/ImageProcessingAtom/Config/IBLSpecularLow.preset +++ b/Gems/Atom/Asset/ImageProcessingAtom/Assets/Config/IBLSpecularLow.preset @@ -7,9 +7,6 @@ "UUID": "{7273ACAE-6E34-487C-AF71-99423A6E1CB0}", "Name": "IBLSpecularLow", "Description": "The input cubemap generates an IBL specular output cubemap.", - "FileMasks": [ - "_iblspecularcm128" - ], "SourceColor": "Linear", "DestColor": "Linear", "SuppressEngineReduce": true, @@ -33,9 +30,6 @@ "android": { "UUID": "{7273ACAE-6E34-487C-AF71-99423A6E1CB0}", "Name": "IBLSpecularLow", - "FileMasks": [ - "_iblspecularcm128" - ], "SourceColor": "Linear", "DestColor": "Linear", "SuppressEngineReduce": true, @@ -58,9 +52,6 @@ "ios": { "UUID": "{7273ACAE-6E34-487C-AF71-99423A6E1CB0}", "Name": "IBLSpecularLow", - "FileMasks": [ - "_iblspecularcm128" - ], "SourceColor": "Linear", "DestColor": "Linear", "SuppressEngineReduce": true, @@ -83,9 +74,6 @@ "mac": { "UUID": "{7273ACAE-6E34-487C-AF71-99423A6E1CB0}", "Name": "IBLSpecularLow", - "FileMasks": [ - "_iblspecularcm128" - ], "SourceColor": "Linear", "DestColor": "Linear", "SuppressEngineReduce": true, @@ -108,9 +96,6 @@ "provo": { "UUID": "{7273ACAE-6E34-487C-AF71-99423A6E1CB0}", "Name": "IBLSpecularLow", - "FileMasks": [ - "_iblspecularcm128" - ], "SourceColor": "Linear", "DestColor": "Linear", "SuppressEngineReduce": true, diff --git a/Gems/Atom/Asset/ImageProcessingAtom/Config/IBLSpecularVeryHigh.preset b/Gems/Atom/Asset/ImageProcessingAtom/Assets/Config/IBLSpecularVeryHigh.preset similarity index 90% rename from Gems/Atom/Asset/ImageProcessingAtom/Config/IBLSpecularVeryHigh.preset rename to Gems/Atom/Asset/ImageProcessingAtom/Assets/Config/IBLSpecularVeryHigh.preset index 08d9416935..a18885dad9 100644 --- a/Gems/Atom/Asset/ImageProcessingAtom/Config/IBLSpecularVeryHigh.preset +++ b/Gems/Atom/Asset/ImageProcessingAtom/Assets/Config/IBLSpecularVeryHigh.preset @@ -7,9 +7,6 @@ "UUID": "{5CD1AFA6-915B-4716-893C-A5B1F4074C22}", "Name": "IBLSpecularVeryHigh", "Description": "The input cubemap generates an IBL specular output cubemap.", - "FileMasks": [ - "_iblspecularcm1024" - ], "SourceColor": "Linear", "DestColor": "Linear", "SuppressEngineReduce": true, @@ -33,9 +30,6 @@ "android": { "UUID": "{5CD1AFA6-915B-4716-893C-A5B1F4074C22}", "Name": "IBLSpecularVeryHigh", - "FileMasks": [ - "_iblspecularcm1024" - ], "SourceColor": "Linear", "DestColor": "Linear", "SuppressEngineReduce": true, @@ -58,9 +52,6 @@ "ios": { "UUID": "{5CD1AFA6-915B-4716-893C-A5B1F4074C22}", "Name": "IBLSpecularVeryHigh", - "FileMasks": [ - "_iblspecularcm1024" - ], "SourceColor": "Linear", "DestColor": "Linear", "SuppressEngineReduce": true, @@ -83,9 +74,6 @@ "mac": { "UUID": "{5CD1AFA6-915B-4716-893C-A5B1F4074C22}", "Name": "IBLSpecularVeryHigh", - "FileMasks": [ - "_iblspecularcm1024" - ], "SourceColor": "Linear", "DestColor": "Linear", "SuppressEngineReduce": true, @@ -108,9 +96,6 @@ "provo": { "UUID": "{5CD1AFA6-915B-4716-893C-A5B1F4074C22}", "Name": "IBLSpecularVeryHigh", - "FileMasks": [ - "_iblspecularcm1024" - ], "SourceColor": "Linear", "DestColor": "Linear", "SuppressEngineReduce": true, diff --git a/Gems/Atom/Asset/ImageProcessingAtom/Config/IBLSpecularVeryLow.preset b/Gems/Atom/Asset/ImageProcessingAtom/Assets/Config/IBLSpecularVeryLow.preset similarity index 90% rename from Gems/Atom/Asset/ImageProcessingAtom/Config/IBLSpecularVeryLow.preset rename to Gems/Atom/Asset/ImageProcessingAtom/Assets/Config/IBLSpecularVeryLow.preset index c5c0788848..fb910b563a 100644 --- a/Gems/Atom/Asset/ImageProcessingAtom/Config/IBLSpecularVeryLow.preset +++ b/Gems/Atom/Asset/ImageProcessingAtom/Assets/Config/IBLSpecularVeryLow.preset @@ -7,9 +7,6 @@ "UUID": "{8293C236-D3E8-4352-8B18-C2E82EEE6547}", "Name": "IBLSpecularVeryLow", "Description": "The input cubemap generates an IBL specular output cubemap.", - "FileMasks": [ - "_iblspecularcm64" - ], "SourceColor": "Linear", "DestColor": "Linear", "SuppressEngineReduce": true, @@ -33,9 +30,6 @@ "android": { "UUID": "{8293C236-D3E8-4352-8B18-C2E82EEE6547}", "Name": "IBLSpecularVeryLow", - "FileMasks": [ - "_iblspecularcm64" - ], "SourceColor": "Linear", "DestColor": "Linear", "SuppressEngineReduce": true, @@ -58,9 +52,6 @@ "ios": { "UUID": "{8293C236-D3E8-4352-8B18-C2E82EEE6547}", "Name": "IBLSpecularVeryLow", - "FileMasks": [ - "_iblspecularcm64" - ], "SourceColor": "Linear", "DestColor": "Linear", "SuppressEngineReduce": true, @@ -83,9 +74,6 @@ "mac": { "UUID": "{8293C236-D3E8-4352-8B18-C2E82EEE6547}", "Name": "IBLSpecularVeryLow", - "FileMasks": [ - "_iblspecularcm64" - ], "SourceColor": "Linear", "DestColor": "Linear", "SuppressEngineReduce": true, @@ -108,9 +96,6 @@ "provo": { "UUID": "{8293C236-D3E8-4352-8B18-C2E82EEE6547}", "Name": "IBLSpecularVeryLow", - "FileMasks": [ - "_iblspecularcm64" - ], "SourceColor": "Linear", "DestColor": "Linear", "SuppressEngineReduce": true, diff --git a/Gems/Atom/Asset/ImageProcessingAtom/Assets/Config/ImageBuilder.settings b/Gems/Atom/Asset/ImageProcessingAtom/Assets/Config/ImageBuilder.settings new file mode 100644 index 0000000000..bba2855650 --- /dev/null +++ b/Gems/Atom/Asset/ImageProcessingAtom/Assets/Config/ImageBuilder.settings @@ -0,0 +1,154 @@ +{ + "Type": "JsonSerialization", + "Version": 1, + "ClassName": "BuilderSettingManager", + "ClassData": { + "BuildSettings": { + "android": { + "GlossScale": 16.0, + "GlossBias": 0.0, + "Streaming": false, + "Enable": true + }, + "ios": { + "GlossScale": 16.0, + "GlossBias": 0.0, + "Streaming": false, + "Enable": true + }, + "mac": { + "GlossScale": 16.0, + "GlossBias": 0.0, + "Streaming": false, + "Enable": true + }, + "pc": { + "GlossScale": 16.0, + "GlossBias": 0.0, + "Streaming": false, + "Enable": true + }, + "linux": { + "GlossScale": 16.0, + "GlossBias": 0.0, + "Streaming": false, + "Enable": true + }, + "provo": { + "GlossScale": 16.0, + "GlossBias": 0.0, + "Streaming": false, + "Enable": false + } + }, + "PresetsByFileMask": { + // albedo + "_basecolor": [ "Albedo", "AlbedoWithGenericAlpha", "AlbedoWithCoverage" ], + "_diff": [ "Albedo", "AlbedoWithGenericAlpha", "AlbedoWithCoverage" ], + "_diffuse": [ "Albedo", "AlbedoWithGenericAlpha", "AlbedoWithCoverage" ], + "_color": [ "Albedo", "AlbedoWithGenericAlpha", "AlbedoWithCoverage" ], + "_col": [ "Albedo", "AlbedoWithGenericAlpha", "AlbedoWithCoverage" ], + "_albedo": [ "Albedo", "AlbedoWithGenericAlpha", "AlbedoWithCoverage" ], + "_alb": [ "Albedo", "AlbedoWithGenericAlpha", "AlbedoWithCoverage" ], + "_bc": [ "Albedo", "AlbedoWithGenericAlpha", "AlbedoWithCoverage" ], + // normals + "_ddn": [ "Normals" ], + "_normal": [ "Normals" ], + "_normalmap": [ "Normals" ], + "_normals": [ "Normals" ], + "_norm": [ "Normals" ], + "_nor": [ "Normals" ], + "_nrm": [ "Normals" ], + "_nm": [ "Normals" ], + "_n": [ "Normals" ], + "_ddna": [ "NormalsWithSmoothness" ], + "_normala": [ "NormalsWithSmoothness" ], + "_nrma": [ "NormalsWithSmoothness" ], + "_nma": [ "NormalsWithSmoothness" ], + "_na": [ "NormalsWithSmoothness" ], + // refelctance + "_spec": [ "Reflectance" ], + "_specular": [ "Reflectance" ], + "_metallic": [ "Reflectance" ], + "_refl": [ "Reflectance" ], + "_ref": [ "Reflectance" ], + "_rf": [ "Reflectance" ], + "_gloss": [ "Reflectance" ], + "_g": [ "Reflectance" ], + "_f0": [ "Reflectance" ], + "_specf0": [ "Reflectance" ], + "_metal": [ "Reflectance" ], + "_mtl": [ "Reflectance" ], + "_m": [ "Reflectance" ], + "_mt": [ "Reflectance" ], + "_metalness": [ "Reflectance" ], + "_rough": [ "Reflectance" ], + "_roughness": [ "Reflectance" ], + // opacity + "_sss": [ "Opacity" ], + "_trans": [ "Opacity" ], + "_opac": [ "Opacity" ], + "_opacity": [ "Opacity" ], + "_o": [ "Opacity" ], + "_op": [ "Opacity" ], + "_mask": [ "Opacity", "Greyscale" ], + "_msk": [ "Opacity" ], + "_blend": [ "Opacity" ], + // AO + "_ao": [ "AmbientOcclusion" ], + "_ambocc": [ "AmbientOcclusion" ], + "_amb": [ "AmbientOcclusion" ], + "_ambientocclusion": [ "AmbientOcclusion" ], + // emissive + "_emissive": [ "Emissive" ], + "_e": [ "Emissive" ], + "_glow": [ "Emissive" ], + "_em": [ "Emissive" ], + "_emit": [ "Emissive" ], + // displacement + "_displ": [ "Displacement" ], + "_disp": [ "Displacement" ], + "_dsp": [ "Displacement" ], + "_d": [ "Displacement" ], + "_dm": [ "Displacement" ], + "_displacement": [ "Displacement" ], + "_height": [ "Displacement" ], + "_hm": [ "Displacement" ], + "_ht": [ "Displacement" ], + "_h": [ "Displacement" ], + // cubemap + "_ibldiffusecm": [ "IBLDiffuse" ], + "_iblskyboxcm": [ "IBLSkybox" ], + "_iblspecularcm": [ "IBLSpecular" ], + "_iblspecularcm64": [ "IBLSpecularVeryLow" ], + "_iblspecularcm128": [ "IBLSpecularLow" ], + "_iblspecularcm256": [ "IBLSpecular" ], + "_iblspecularcm512": [ "IBLSpecularHigh" ], + "_iblspecularcm1024": [ "IBLSpecularVeryHigh" ], + "_skyboxcm": [ "Skybox" ], + "_ccm": [ "ConvolvedCubemap" ], + "_convolvedcubemap": [ "ConvolvedCubemap" ], + "_iblglobalcm": [ "IBLGlobal" ], + "_cubemap": [ "IBLGlobal" ], + "_cm": [ "IBLGlobal" ], + // lut + "_lut": [ "LUT_RG8" ], + "_lutr32f": [ "LUT_R32F" ], + "_lutrgba8": [ "LUT_RGBA8" ], + "_lutrgba16": [ "LUT_RGBA16" ], + "_lutrgba16f": [ "LUT_RGBA16F" ], + "_lutrg16": [ "LUT_RG16" ], + "_lutrg32f": [ "LUT_RG32F" ], + "_lutrgba32f": [ "LUT_RGBA32F" ], + // layer mask + "_layers": [ "LayerMask" ], + "_rgbmask": [ "LayerMask" ], + // decal + "_decal": [ "Decal_AlbedoWithOpacity" ], + // ui + "_ui": [ "UserInterface_Compressed","UserInterface_Lossless" ] + }, + "DefaultPreset": "Albedo", + "DefaultPresetAlpha": "AlbedoWithGenericAlpha" + } +} diff --git a/Gems/Atom/Asset/ImageProcessingAtom/Config/LUT_R32F.preset b/Gems/Atom/Asset/ImageProcessingAtom/Assets/Config/LUT_R32F.preset similarity index 97% rename from Gems/Atom/Asset/ImageProcessingAtom/Config/LUT_R32F.preset rename to Gems/Atom/Asset/ImageProcessingAtom/Assets/Config/LUT_R32F.preset index 1bb23c6e96..693f268304 100644 --- a/Gems/Atom/Asset/ImageProcessingAtom/Config/LUT_R32F.preset +++ b/Gems/Atom/Asset/ImageProcessingAtom/Assets/Config/LUT_R32F.preset @@ -6,7 +6,6 @@ "DefaultPreset": { "UUID": "{10D4D7D8-23E2-4FC5-BE6A-DA9949D2C603}", "Name": "LUT_R32F", - "FileMasks": ["_lutr32f"], "SourceColor": "Linear", "DestColor": "Linear", "PixelFormat": "R32F" diff --git a/Gems/Atom/Asset/ImageProcessingAtom/Config/LUT_RG16.preset b/Gems/Atom/Asset/ImageProcessingAtom/Assets/Config/LUT_RG16.preset similarity index 100% rename from Gems/Atom/Asset/ImageProcessingAtom/Config/LUT_RG16.preset rename to Gems/Atom/Asset/ImageProcessingAtom/Assets/Config/LUT_RG16.preset diff --git a/Gems/Atom/Asset/ImageProcessingAtom/Config/LUT_RG32F.preset b/Gems/Atom/Asset/ImageProcessingAtom/Assets/Config/LUT_RG32F.preset similarity index 97% rename from Gems/Atom/Asset/ImageProcessingAtom/Config/LUT_RG32F.preset rename to Gems/Atom/Asset/ImageProcessingAtom/Assets/Config/LUT_RG32F.preset index 2cf0c6ca0a..7277a4b111 100644 --- a/Gems/Atom/Asset/ImageProcessingAtom/Config/LUT_RG32F.preset +++ b/Gems/Atom/Asset/ImageProcessingAtom/Assets/Config/LUT_RG32F.preset @@ -6,7 +6,6 @@ "DefaultPreset": { "UUID": "{52470B8B-0798-4E03-B0D3-039D5141CFEC}", "Name": "LUT_RG32F", - "FileMasks": ["_lutrg32f"], "SourceColor": "Linear", "DestColor": "Linear", "PixelFormat": "R32G32F" diff --git a/Gems/Atom/Asset/ImageProcessingAtom/Config/LUT_RG8.preset b/Gems/Atom/Asset/ImageProcessingAtom/Assets/Config/LUT_RG8.preset similarity index 79% rename from Gems/Atom/Asset/ImageProcessingAtom/Config/LUT_RG8.preset rename to Gems/Atom/Asset/ImageProcessingAtom/Assets/Config/LUT_RG8.preset index 9838d532b2..051cc2bedc 100644 --- a/Gems/Atom/Asset/ImageProcessingAtom/Config/LUT_RG8.preset +++ b/Gems/Atom/Asset/ImageProcessingAtom/Assets/Config/LUT_RG8.preset @@ -8,9 +8,6 @@ "Name": "LUT_RG8", "SourceColor": "Linear", "DestColor": "Linear", - "FileMasks": [ - "_lut" - ], "PixelFormat": "R8G8" }, "PlatformsPresets": { @@ -19,9 +16,6 @@ "Name": "LUT_RG8", "SourceColor": "Linear", "DestColor": "Linear", - "FileMasks": [ - "_lut" - ], "PixelFormat": "R8G8" }, "ios": { @@ -29,9 +23,6 @@ "Name": "LUT_RG8", "SourceColor": "Linear", "DestColor": "Linear", - "FileMasks": [ - "_lut" - ], "PixelFormat": "R8G8" }, "mac": { @@ -39,9 +30,6 @@ "Name": "LUT_RG8", "SourceColor": "Linear", "DestColor": "Linear", - "FileMasks": [ - "_lut" - ], "PixelFormat": "R8G8" }, "provo": { @@ -49,9 +37,6 @@ "Name": "LUT_RG8", "SourceColor": "Linear", "DestColor": "Linear", - "FileMasks": [ - "_lut" - ], "PixelFormat": "R8G8" } } diff --git a/Gems/Atom/Asset/ImageProcessingAtom/Config/LUT_RGBA16.preset b/Gems/Atom/Asset/ImageProcessingAtom/Assets/Config/LUT_RGBA16.preset similarity index 78% rename from Gems/Atom/Asset/ImageProcessingAtom/Config/LUT_RGBA16.preset rename to Gems/Atom/Asset/ImageProcessingAtom/Assets/Config/LUT_RGBA16.preset index f36d566d7e..ed940e5f25 100644 --- a/Gems/Atom/Asset/ImageProcessingAtom/Config/LUT_RGBA16.preset +++ b/Gems/Atom/Asset/ImageProcessingAtom/Assets/Config/LUT_RGBA16.preset @@ -8,9 +8,6 @@ "Name": "LUT_RGBA16", "SourceColor": "Linear", "DestColor": "Linear", - "FileMasks": [ - "_lutrgba16" - ], "PixelFormat": "R16G16B16A16" }, "PlatformsPresets": { @@ -19,9 +16,6 @@ "Name": "LUT_RGBA16", "SourceColor": "Linear", "DestColor": "Linear", - "FileMasks": [ - "_lutrgba16" - ], "PixelFormat": "R16G16B16A16" }, "ios": { @@ -29,9 +23,6 @@ "Name": "LUT_RGBA16", "SourceColor": "Linear", "DestColor": "Linear", - "FileMasks": [ - "_lutrgba16" - ], "PixelFormat": "R16G16B16A16" }, "osx_gl": { @@ -39,9 +30,6 @@ "Name": "LUT_RGBA16", "SourceColor": "Linear", "DestColor": "Linear", - "FileMasks": [ - "_lutrgba16" - ], "PixelFormat": "R16G16B16A16" }, "provo": { @@ -49,9 +37,6 @@ "Name": "LUT_RGBA16", "SourceColor": "Linear", "DestColor": "Linear", - "FileMasks": [ - "_lutrgba16" - ], "PixelFormat": "R16G16B16A16" } } diff --git a/Gems/Atom/Asset/ImageProcessingAtom/Config/LUT_RGBA16F.preset b/Gems/Atom/Asset/ImageProcessingAtom/Assets/Config/LUT_RGBA16F.preset similarity index 78% rename from Gems/Atom/Asset/ImageProcessingAtom/Config/LUT_RGBA16F.preset rename to Gems/Atom/Asset/ImageProcessingAtom/Assets/Config/LUT_RGBA16F.preset index 367c5101b3..f5d109b4a1 100644 --- a/Gems/Atom/Asset/ImageProcessingAtom/Config/LUT_RGBA16F.preset +++ b/Gems/Atom/Asset/ImageProcessingAtom/Assets/Config/LUT_RGBA16F.preset @@ -8,9 +8,6 @@ "Name": "LUT_RGBA16F", "SourceColor": "Linear", "DestColor": "Linear", - "FileMasks": [ - "_lutrgba16f" - ], "PixelFormat": "R16G16B16A16F" }, "PlatformsPresets": { @@ -19,9 +16,6 @@ "Name": "LUT_RGBA16F", "SourceColor": "Linear", "DestColor": "Linear", - "FileMasks": [ - "_lutrgba16f" - ], "PixelFormat": "R16G16B16A16F" }, "ios": { @@ -29,9 +23,6 @@ "Name": "LUT_RGBA16F", "SourceColor": "Linear", "DestColor": "Linear", - "FileMasks": [ - "_lutrgba16f" - ], "PixelFormat": "R16G16B16A16F" }, "osx_gl": { @@ -39,9 +30,6 @@ "Name": "LUT_RGBA16F", "SourceColor": "Linear", "DestColor": "Linear", - "FileMasks": [ - "_lutrgba16f" - ], "PixelFormat": "R16G16B16A16F" }, "provo": { @@ -49,9 +37,6 @@ "Name": "LUT_RGBA16F", "SourceColor": "Linear", "DestColor": "Linear", - "FileMasks": [ - "_lutrgba16f" - ], "PixelFormat": "R16G16B16A16F" } } diff --git a/Gems/Atom/Asset/ImageProcessingAtom/Config/LUT_RGBA32F.preset b/Gems/Atom/Asset/ImageProcessingAtom/Assets/Config/LUT_RGBA32F.preset similarity index 97% rename from Gems/Atom/Asset/ImageProcessingAtom/Config/LUT_RGBA32F.preset rename to Gems/Atom/Asset/ImageProcessingAtom/Assets/Config/LUT_RGBA32F.preset index 3a456825bf..b85cb66c9d 100644 --- a/Gems/Atom/Asset/ImageProcessingAtom/Config/LUT_RGBA32F.preset +++ b/Gems/Atom/Asset/ImageProcessingAtom/Assets/Config/LUT_RGBA32F.preset @@ -6,7 +6,6 @@ "DefaultPreset": { "UUID": "{AC4C49D4-2C70-425A-8DBF-E7FB2C61CF8D}", "Name": "LUT_RGBA32F", - "FileMasks": ["_lutrgba32f"], "SourceColor": "Linear", "DestColor": "Linear", "PixelFormat": "R32G32B32A32F" diff --git a/Gems/Atom/Asset/ImageProcessingAtom/Config/LUT_RGBA8.preset b/Gems/Atom/Asset/ImageProcessingAtom/Assets/Config/LUT_RGBA8.preset similarity index 100% rename from Gems/Atom/Asset/ImageProcessingAtom/Config/LUT_RGBA8.preset rename to Gems/Atom/Asset/ImageProcessingAtom/Assets/Config/LUT_RGBA8.preset diff --git a/Gems/Atom/Asset/ImageProcessingAtom/Assets/Config/LayerMask.preset b/Gems/Atom/Asset/ImageProcessingAtom/Assets/Config/LayerMask.preset new file mode 100644 index 0000000000..d33db40547 --- /dev/null +++ b/Gems/Atom/Asset/ImageProcessingAtom/Assets/Config/LayerMask.preset @@ -0,0 +1,44 @@ +{ + "Type": "JsonSerialization", + "Version": 1, + "ClassName": "MultiplatformPresetSettings", + "ClassData": { + "DefaultPreset": { + "UUID": "{B1AC2F76-CB1A-46A8-B92D-B8DFBB564FCF}", + "Name": "LayerMask", + "SourceColor": "Linear", + "DestColor": "Linear", + "PixelFormat": "R8G8B8X8" + }, + "PlatformsPresets": { + "android": { + "UUID": "{B1AC2F76-CB1A-46A8-B92D-B8DFBB564FCF}", + "Name": "LayerMask", + "SourceColor": "Linear", + "DestColor": "Linear", + "PixelFormat": "R8G8B8X8" + }, + "ios": { + "UUID": "{B1AC2F76-CB1A-46A8-B92D-B8DFBB564FCF}", + "Name": "LayerMask", + "SourceColor": "Linear", + "DestColor": "Linear", + "PixelFormat": "R8G8B8X8" + }, + "mac": { + "UUID": "{B1AC2F76-CB1A-46A8-B92D-B8DFBB564FCF}", + "Name": "LayerMask", + "SourceColor": "Linear", + "DestColor": "Linear", + "PixelFormat": "R8G8B8X8" + }, + "provo": { + "UUID": "{B1AC2F76-CB1A-46A8-B92D-B8DFBB564FCF}", + "Name": "LayerMask", + "SourceColor": "Linear", + "DestColor": "Linear", + "PixelFormat": "R8G8B8X8" + } + } + } +} diff --git a/Gems/Atom/Asset/ImageProcessingAtom/Assets/Config/Normals.preset b/Gems/Atom/Asset/ImageProcessingAtom/Assets/Config/Normals.preset new file mode 100644 index 0000000000..3f7a9ff111 --- /dev/null +++ b/Gems/Atom/Asset/ImageProcessingAtom/Assets/Config/Normals.preset @@ -0,0 +1,76 @@ +{ + "Type": "JsonSerialization", + "Version": 1, + "ClassName": "MultiplatformPresetSettings", + "ClassData": { + "DefaultPreset": { + "UUID": "{508B21D5-5250-4003-97EC-1CF28D571ACF}", + "Name": "Normals", + "SourceColor": "Linear", + "DestColor": "Linear", + "PixelFormat": "BC5s", + "DiscardAlpha": true, + "IsPowerOf2": true, + "MipRenormalize": true, + "MipMapSetting": { + "MipGenType": "Box" + } + }, + "PlatformsPresets": { + "android": { + "UUID": "{508B21D5-5250-4003-97EC-1CF28D571ACF}", + "Name": "Normals", + "SourceColor": "Linear", + "DestColor": "Linear", + "PixelFormat": "ASTC_4x4", + "DiscardAlpha": true, + "MaxTextureSize": 1024, + "IsPowerOf2": true, + "MipRenormalize": true, + "MipMapSetting": { + "MipGenType": "Box" + } + }, + "ios": { + "UUID": "{508B21D5-5250-4003-97EC-1CF28D571ACF}", + "Name": "Normals", + "SourceColor": "Linear", + "DestColor": "Linear", + "PixelFormat": "ASTC_4x4", + "DiscardAlpha": true, + "MaxTextureSize": 1024, + "IsPowerOf2": true, + "MipRenormalize": true, + "MipMapSetting": { + "MipGenType": "Box" + } + }, + "mac": { + "UUID": "{508B21D5-5250-4003-97EC-1CF28D571ACF}", + "Name": "Normals", + "SourceColor": "Linear", + "DestColor": "Linear", + "PixelFormat": "BC5s", + "DiscardAlpha": true, + "IsPowerOf2": true, + "MipRenormalize": true, + "MipMapSetting": { + "MipGenType": "Box" + } + }, + "provo": { + "UUID": "{508B21D5-5250-4003-97EC-1CF28D571ACF}", + "Name": "Normals", + "SourceColor": "Linear", + "DestColor": "Linear", + "PixelFormat": "BC5s", + "DiscardAlpha": true, + "IsPowerOf2": true, + "MipRenormalize": true, + "MipMapSetting": { + "MipGenType": "Box" + } + } + } + } +} diff --git a/Gems/Atom/Asset/ImageProcessingAtom/Assets/Config/NormalsWithSmoothness.preset b/Gems/Atom/Asset/ImageProcessingAtom/Assets/Config/NormalsWithSmoothness.preset new file mode 100644 index 0000000000..fd0abf3467 --- /dev/null +++ b/Gems/Atom/Asset/ImageProcessingAtom/Assets/Config/NormalsWithSmoothness.preset @@ -0,0 +1,81 @@ +{ + "Type": "JsonSerialization", + "Version": 1, + "ClassName": "MultiplatformPresetSettings", + "ClassData": { + "DefaultPreset": { + "UUID": "{6EE749F4-846E-4F7A-878C-F211F85EA59F}", + "Name": "NormalsWithSmoothness", + "SourceColor": "Linear", + "DestColor": "Linear", + "PixelFormat": "BC5s", + "PixelFormatAlpha": "BC4", + "IsPowerOf2": true, + "GlossFromNormal": 1, + "MipRenormalize": true, + "MipMapSetting": { + "MipGenType": "Box" + } + }, + "PlatformsPresets": { + "android": { + "UUID": "{6EE749F4-846E-4F7A-878C-F211F85EA59F}", + "Name": "NormalsWithSmoothness", + "SourceColor": "Linear", + "DestColor": "Linear", + "PixelFormat": "ASTC_4x4", + "PixelFormatAlpha": "ASTC_4x4", + "MaxTextureSize": 2048, + "IsPowerOf2": true, + "GlossFromNormal": 1, + "MipRenormalize": true, + "MipMapSetting": { + "MipGenType": "Box" + } + }, + "ios": { + "UUID": "{6EE749F4-846E-4F7A-878C-F211F85EA59F}", + "Name": "NormalsWithSmoothness", + "SourceColor": "Linear", + "DestColor": "Linear", + "PixelFormat": "ASTC_4x4", + "PixelFormatAlpha": "ASTC_4x4", + "MaxTextureSize": 2048, + "IsPowerOf2": true, + "GlossFromNormal": 1, + "MipRenormalize": true, + "MipMapSetting": { + "MipGenType": "Box" + } + }, + "mac": { + "UUID": "{6EE749F4-846E-4F7A-878C-F211F85EA59F}", + "Name": "NormalsWithSmoothness", + "SourceColor": "Linear", + "DestColor": "Linear", + "PixelFormat": "BC5s", + "PixelFormatAlpha": "BC4", + "IsPowerOf2": true, + "GlossFromNormal": 1, + "MipRenormalize": true, + "MipMapSetting": { + "MipGenType": "Box" + } + }, + "provo": { + "UUID": "{6EE749F4-846E-4F7A-878C-F211F85EA59F}", + "Name": "NormalsWithSmoothness", + "SourceColor": "Linear", + "DestColor": "Linear", + "PixelFormat": "BC5s", + "PixelFormatAlpha": "BC4", + "IsPowerOf2": true, + "GlossFromNormal": 1, + "MipRenormalize": true, + "MipMapSetting": { + "MipGenType": "Box" + } + } + } + } +} diff --git a/Gems/Atom/Asset/ImageProcessingAtom/Assets/Config/Opacity.preset b/Gems/Atom/Asset/ImageProcessingAtom/Assets/Config/Opacity.preset new file mode 100644 index 0000000000..e896b74522 --- /dev/null +++ b/Gems/Atom/Asset/ImageProcessingAtom/Assets/Config/Opacity.preset @@ -0,0 +1,71 @@ +{ + "Type": "JsonSerialization", + "Version": 1, + "ClassName": "MultiplatformPresetSettings", + "ClassData": { + "DefaultPreset": { + "UUID": "{F3D5E572-A3CF-435A-A2AB-75D2B6907847}", + "Name": "Opacity", + "SourceColor": "Linear", + "DestColor": "Linear", + "PixelFormat": "BC4", + "Swizzle": "rrr1", + "IsPowerOf2": true, + "MipMapSetting": { + "MipGenType": "Box" + } + }, + "PlatformsPresets": { + "android": { + "UUID": "{F3D5E572-A3CF-435A-A2AB-75D2B6907847}", + "Name": "Opacity", + "SourceColor": "Linear", + "DestColor": "Linear", + "PixelFormat": "ASTC_4x4", + "Swizzle": "rrr1", + "MaxTextureSize": 2048, + "IsPowerOf2": true, + "MipMapSetting": { + "MipGenType": "Box" + } + }, + "ios": { + "UUID": "{F3D5E572-A3CF-435A-A2AB-75D2B6907847}", + "Name": "Opacity", + "SourceColor": "Linear", + "DestColor": "Linear", + "PixelFormat": "ASTC_4x4", + "Swizzle": "rrr1", + "MaxTextureSize": 2048, + "IsPowerOf2": true, + "MipMapSetting": { + "MipGenType": "Box" + } + }, + "mac": { + "UUID": "{F3D5E572-A3CF-435A-A2AB-75D2B6907847}", + "Name": "Opacity", + "SourceColor": "Linear", + "DestColor": "Linear", + "PixelFormat": "BC4", + "Swizzle": "rrr1", + "IsPowerOf2": true, + "MipMapSetting": { + "MipGenType": "Box" + } + }, + "provo": { + "UUID": "{F3D5E572-A3CF-435A-A2AB-75D2B6907847}", + "Name": "Opacity", + "SourceColor": "Linear", + "DestColor": "Linear", + "PixelFormat": "BC4", + "Swizzle": "rrr1", + "IsPowerOf2": true, + "MipMapSetting": { + "MipGenType": "Box" + } + } + } + } +} diff --git a/Gems/Atom/Asset/ImageProcessingAtom/Config/ReferenceImage.preset b/Gems/Atom/Asset/ImageProcessingAtom/Assets/Config/ReferenceImage.preset similarity index 100% rename from Gems/Atom/Asset/ImageProcessingAtom/Config/ReferenceImage.preset rename to Gems/Atom/Asset/ImageProcessingAtom/Assets/Config/ReferenceImage.preset diff --git a/Gems/Atom/Asset/ImageProcessingAtom/Config/ReferenceImage_HDRLinear.preset b/Gems/Atom/Asset/ImageProcessingAtom/Assets/Config/ReferenceImage_HDRLinear.preset similarity index 100% rename from Gems/Atom/Asset/ImageProcessingAtom/Config/ReferenceImage_HDRLinear.preset rename to Gems/Atom/Asset/ImageProcessingAtom/Assets/Config/ReferenceImage_HDRLinear.preset diff --git a/Gems/Atom/Asset/ImageProcessingAtom/Config/ReferenceImage_HDRLinearUncompressed.preset b/Gems/Atom/Asset/ImageProcessingAtom/Assets/Config/ReferenceImage_HDRLinearUncompressed.preset similarity index 100% rename from Gems/Atom/Asset/ImageProcessingAtom/Config/ReferenceImage_HDRLinearUncompressed.preset rename to Gems/Atom/Asset/ImageProcessingAtom/Assets/Config/ReferenceImage_HDRLinearUncompressed.preset diff --git a/Gems/Atom/Asset/ImageProcessingAtom/Config/ReferenceImage_Linear.preset b/Gems/Atom/Asset/ImageProcessingAtom/Assets/Config/ReferenceImage_Linear.preset similarity index 100% rename from Gems/Atom/Asset/ImageProcessingAtom/Config/ReferenceImage_Linear.preset rename to Gems/Atom/Asset/ImageProcessingAtom/Assets/Config/ReferenceImage_Linear.preset diff --git a/Gems/Atom/Asset/ImageProcessingAtom/Assets/Config/Reflectance.preset b/Gems/Atom/Asset/ImageProcessingAtom/Assets/Config/Reflectance.preset new file mode 100644 index 0000000000..9e3c718978 --- /dev/null +++ b/Gems/Atom/Asset/ImageProcessingAtom/Assets/Config/Reflectance.preset @@ -0,0 +1,68 @@ +{ + "Type": "JsonSerialization", + "Version": 1, + "ClassName": "MultiplatformPresetSettings", + "ClassData": { + "DefaultPreset": { + "UUID": "{7A3CC95E-0A0C-4CA1-8357-5712B028B77D}", + "Name": "Reflectance", + "SourceColor": "Linear", + "DestColor": "Linear", + "PixelFormat": "BC4", + "IsPowerOf2": true, + "MipMapSetting": { + "MipGenType": "Box" + } + }, + "PlatformsPresets": { + "android": { + "UUID": "{7A3CC95E-0A0C-4CA1-8357-5712B028B77D}", + "Name": "Reflectance", + "SourceColor": "Linear", + "DestColor": "Linear", + "PixelFormat": "ASTC_6x6", + "Swizzle": "rrr1", + "MaxTextureSize": 2048, + "IsPowerOf2": true, + "MipMapSetting": { + "MipGenType": "Box" + } + }, + "ios": { + "UUID": "{7A3CC95E-0A0C-4CA1-8357-5712B028B77D}", + "Name": "Reflectance", + "SourceColor": "Linear", + "DestColor": "Linear", + "PixelFormat": "ASTC_6x6", + "Swizzle": "rrr1", + "MaxTextureSize": 2048, + "IsPowerOf2": true, + "MipMapSetting": { + "MipGenType": "Box" + } + }, + "mac": { + "UUID": "{7A3CC95E-0A0C-4CA1-8357-5712B028B77D}", + "Name": "Reflectance", + "SourceColor": "Linear", + "DestColor": "Linear", + "PixelFormat": "BC4", + "IsPowerOf2": true, + "MipMapSetting": { + "MipGenType": "Box" + } + }, + "provo": { + "UUID": "{7A3CC95E-0A0C-4CA1-8357-5712B028B77D}", + "Name": "Reflectance", + "SourceColor": "Linear", + "DestColor": "Linear", + "PixelFormat": "BC4", + "IsPowerOf2": true, + "MipMapSetting": { + "MipGenType": "Box" + } + } + } + } +} diff --git a/Gems/Atom/Asset/ImageProcessingAtom/Config/Skybox.preset b/Gems/Atom/Asset/ImageProcessingAtom/Assets/Config/Skybox.preset similarity index 86% rename from Gems/Atom/Asset/ImageProcessingAtom/Config/Skybox.preset rename to Gems/Atom/Asset/ImageProcessingAtom/Assets/Config/Skybox.preset index 4f71855ecf..b502872f92 100644 --- a/Gems/Atom/Asset/ImageProcessingAtom/Config/Skybox.preset +++ b/Gems/Atom/Asset/ImageProcessingAtom/Assets/Config/Skybox.preset @@ -6,9 +6,6 @@ "DefaultPreset": { "UUID": "{F359CD3B-37E6-4627-B4F6-2DFC2C0E3C1C}", "Name": "Skybox", - "FileMasks": [ - "_skyboxcm" - ], "SourceColor": "Linear", "DestColor": "Linear", "SuppressEngineReduce": true, @@ -24,9 +21,6 @@ "android": { "UUID": "{F359CD3B-37E6-4627-B4F6-2DFC2C0E3C1C}", "Name": "Skybox", - "FileMasks": [ - "_skyboxcm" - ], "SourceColor": "Linear", "DestColor": "Linear", "SuppressEngineReduce": true, @@ -41,9 +35,6 @@ "ios": { "UUID": "{F359CD3B-37E6-4627-B4F6-2DFC2C0E3C1C}", "Name": "Skybox", - "FileMasks": [ - "_skyboxcm" - ], "SourceColor": "Linear", "DestColor": "Linear", "SuppressEngineReduce": true, @@ -58,9 +49,6 @@ "mac": { "UUID": "{F359CD3B-37E6-4627-B4F6-2DFC2C0E3C1C}", "Name": "Skybox", - "FileMasks": [ - "_skyboxcm" - ], "SourceColor": "Linear", "DestColor": "Linear", "SuppressEngineReduce": true, @@ -75,9 +63,6 @@ "provo": { "UUID": "{F359CD3B-37E6-4627-B4F6-2DFC2C0E3C1C}", "Name": "Skybox", - "FileMasks": [ - "_skyboxcm" - ], "SourceColor": "Linear", "DestColor": "Linear", "SuppressEngineReduce": true, diff --git a/Gems/Atom/Asset/ImageProcessingAtom/Config/UserInterface_Compressed.preset b/Gems/Atom/Asset/ImageProcessingAtom/Assets/Config/UserInterface_Compressed.preset similarity index 95% rename from Gems/Atom/Asset/ImageProcessingAtom/Config/UserInterface_Compressed.preset rename to Gems/Atom/Asset/ImageProcessingAtom/Assets/Config/UserInterface_Compressed.preset index 13334de700..7e2c42fa6b 100644 --- a/Gems/Atom/Asset/ImageProcessingAtom/Config/UserInterface_Compressed.preset +++ b/Gems/Atom/Asset/ImageProcessingAtom/Assets/Config/UserInterface_Compressed.preset @@ -9,8 +9,7 @@ "SuppressEngineReduce": true, "PixelFormat": "R8G8B8A8", "SourceColor": "Linear", - "DestColor": "Linear", - "FileMasks": [ "_ui" ] + "DestColor": "Linear" }, "PlatformsPresets": { "android": { diff --git a/Gems/Atom/Asset/ImageProcessingAtom/Config/UserInterface_Lossless.preset b/Gems/Atom/Asset/ImageProcessingAtom/Assets/Config/UserInterface_Lossless.preset similarity index 95% rename from Gems/Atom/Asset/ImageProcessingAtom/Config/UserInterface_Lossless.preset rename to Gems/Atom/Asset/ImageProcessingAtom/Assets/Config/UserInterface_Lossless.preset index 39066b242b..bec6a604ef 100644 --- a/Gems/Atom/Asset/ImageProcessingAtom/Config/UserInterface_Lossless.preset +++ b/Gems/Atom/Asset/ImageProcessingAtom/Assets/Config/UserInterface_Lossless.preset @@ -9,8 +9,7 @@ "SuppressEngineReduce": true, "PixelFormat": "R8G8B8A8", "SourceColor": "Linear", - "DestColor": "Linear", - "FileMasks": [ "_ui" ] + "DestColor": "Linear" }, "PlatformsPresets": { "android": { diff --git a/Gems/Atom/Asset/ImageProcessingAtom/Code/Include/Atom/ImageProcessing/ImageObject.h b/Gems/Atom/Asset/ImageProcessingAtom/Code/Include/Atom/ImageProcessing/ImageObject.h index 5796a0c84d..475c72c0eb 100644 --- a/Gems/Atom/Asset/ImageProcessingAtom/Code/Include/Atom/ImageProcessing/ImageObject.h +++ b/Gems/Atom/Asset/ImageProcessingAtom/Code/Include/Atom/ImageProcessing/ImageObject.h @@ -100,13 +100,6 @@ namespace ImageProcessingAtom //compare whether two images are same. return true if they are same. virtual bool CompareImage(const IImageObjectPtr otherImage) const = 0; - // Writes this image to file used for runtime, overwrites any existing file. - // It may write alpha image as attached image into the same file - // outFilePaths will save filenames finally saved to since the image might be split and saved to multiple files - virtual bool SaveImage(const char* filename, IImageObjectPtr alphaImage, AZStd::vector& outFilePaths) const = 0; - virtual bool SaveImage(AZ::IO::SystemFileStream& out) const = 0; - virtual bool SaveMipToFile(AZ::u32 mip, const AZStd::string& filename) const = 0; - //get total image data size in memory of all mipmaps. Not includs header and flags. virtual AZ::u32 GetTextureMemory() const = 0; @@ -135,9 +128,6 @@ namespace ImageProcessingAtom // The algorithm is based on the Frequency Domain Normal Mapping implementation presented by Neubelt and Pettineo at Siggraph 2013. virtual void GlossFromNormals(bool hasAuthoredGloss) = 0; - //convert gloss map from legacy distribution to new one. New World is still using legacy gloss map. - virtual void ConvertLegacyGloss() = 0; - //clear image with color virtual void ClearColor(float r, float g, float b, float a) = 0; }; diff --git a/Gems/Atom/Asset/ImageProcessingAtom/Code/Include/Atom/ImageProcessing/PixelFormats.h b/Gems/Atom/Asset/ImageProcessingAtom/Code/Include/Atom/ImageProcessing/PixelFormats.h index 4da996dbde..1d11a05c17 100644 --- a/Gems/Atom/Asset/ImageProcessingAtom/Code/Include/Atom/ImageProcessing/PixelFormats.h +++ b/Gems/Atom/Asset/ImageProcessingAtom/Code/Include/Atom/ImageProcessing/PixelFormats.h @@ -79,6 +79,7 @@ namespace ImageProcessingAtom }; bool IsASTCFormat(EPixelFormat fmt); + bool IsHDRFormat(EPixelFormat fmt); } // namespace ImageProcessingAtom namespace AZ diff --git a/Gems/Atom/Asset/ImageProcessingAtom/Code/Source/BuilderSettings/BuilderSettingManager.cpp b/Gems/Atom/Asset/ImageProcessingAtom/Code/Source/BuilderSettings/BuilderSettingManager.cpp index a4ba846f1b..0e9681f38b 100644 --- a/Gems/Atom/Asset/ImageProcessingAtom/Code/Source/BuilderSettings/BuilderSettingManager.cpp +++ b/Gems/Atom/Asset/ImageProcessingAtom/Code/Source/BuilderSettings/BuilderSettingManager.cpp @@ -8,6 +8,7 @@ #include "BuilderSettingManager.h" +#include #include #include #include @@ -17,8 +18,9 @@ #include #include #include -#include #include +#include +#include #include #include @@ -41,13 +43,18 @@ namespace ImageProcessingAtom { - const char* BuilderSettingManager::s_defaultConfigRelativeFolder = "Gems/Atom/Asset/ImageProcessingAtom/Config/"; + const char* BuilderSettingManager::s_defaultConfigRelativeFolder = "Gems/Atom/Asset/ImageProcessingAtom/Assets/Config/"; const char* BuilderSettingManager::s_projectConfigRelativeFolder = "Config/AtomImageBuilder/"; const char* BuilderSettingManager::s_builderSettingFileName = "ImageBuilder.settings"; - const char* BuilderSettingManager::s_presetFileExtension = ".preset"; + const char* BuilderSettingManager::s_presetFileExtension = "preset"; const char FileMaskDelimiter = '_'; + namespace + { + [[maybe_unused]] static constexpr const char* const LogWindow = "Image Processing"; + } + #if defined(AZ_TOOLS_EXPAND_FOR_RESTRICTED_PLATFORMS) #define AZ_RESTRICTED_PLATFORM_EXPANSION(CodeName, CODENAME, codename, PrivateName, PRIVATENAME, privatename, PublicName, PUBLICNAME, publicname, PublicAuxName1, PublicAuxName2, PublicAuxName3) \ namespace ImageProcess##PrivateName \ @@ -69,13 +76,15 @@ namespace ImageProcessingAtom if (serialize) { serialize->Class() - ->Version(1) - ->Field("AnalysisFingerprint", &BuilderSettingManager::m_analysisFingerprint) + ->Version(2) ->Field("BuildSettings", &BuilderSettingManager::m_builderSettings) - ->Field("DefaultPresetsByFileMask", &BuilderSettingManager::m_defaultPresetByFileMask) + ->Field("PresetsByFileMask", &BuilderSettingManager::m_presetFilterMap) ->Field("DefaultPreset", &BuilderSettingManager::m_defaultPreset) ->Field("DefaultPresetAlpha", &BuilderSettingManager::m_defaultPresetAlpha) - ->Field("DefaultPresetNonePOT", &BuilderSettingManager::m_defaultPresetNonePOT); + ->Field("DefaultPresetNonePOT", &BuilderSettingManager::m_defaultPresetNonePOT) + // deprecated properties + ->Field("DefaultPresetsByFileMask", &BuilderSettingManager::m_defaultPresetByFileMask) + ->Field("AnalysisFingerprint", &BuilderSettingManager::m_analysisFingerprint); } } @@ -122,7 +131,7 @@ namespace ImageProcessingAtom s_globalInstance.Reset(); } - const PresetSettings* BuilderSettingManager::GetPreset(const PresetName& presetName, const PlatformName& platform, AZStd::string_view* settingsFilePathOut) + const PresetSettings* BuilderSettingManager::GetPreset(const PresetName& presetName, const PlatformName& platform, AZStd::string_view* settingsFilePathOut) const { AZStd::lock_guard lock(m_presetMapLock); auto itr = m_presets.find(presetName); @@ -137,16 +146,36 @@ namespace ImageProcessingAtom return nullptr; } - const BuilderSettings* BuilderSettingManager::GetBuilderSetting(const PlatformName& platform) + AZStd::vector BuilderSettingManager::GetFileMasksForPreset(const PresetName& presetName) const { - if (m_builderSettings.find(platform) != m_builderSettings.end()) + AZStd::vector fileMasks; + + AZStd::lock_guard lock(m_presetMapLock); + for (const auto& mapping:m_presetFilterMap) { - return &m_builderSettings[platform]; + for (const auto& preset : mapping.second) + { + if (preset == presetName) + { + fileMasks.push_back(mapping.first); + break; + } + } + } + return fileMasks; + } + + const BuilderSettings* BuilderSettingManager::GetBuilderSetting(const PlatformName& platform) const + { + auto itr = m_builderSettings.find(platform); + if (itr != m_builderSettings.end()) + { + return &itr->second; } return nullptr; } - const PlatformNameList BuilderSettingManager::GetPlatformList() + const PlatformNameList BuilderSettingManager::GetPlatformList() const { PlatformNameList platforms; @@ -161,12 +190,19 @@ namespace ImageProcessingAtom return platforms; } - const AZStd::map >& BuilderSettingManager::GetPresetFilterMap() + const AZStd::map >& BuilderSettingManager::GetPresetFilterMap() const { AZStd::lock_guard lock(m_presetMapLock); return m_presetFilterMap; } + const AZStd::unordered_set& BuilderSettingManager::GetFullPresetList() const + { + AZStd::lock_guard lock(m_presetMapLock); + AZStd::string noFilter = AZStd::string(); + return m_presetFilterMap.find(noFilter)->second; + } + const PresetName BuilderSettingManager::GetPresetNameFromId(const AZ::Uuid& presetId) { AZStd::lock_guard lock(m_presetMapLock); @@ -188,7 +224,6 @@ namespace ImageProcessingAtom m_presetFilterMap.clear(); m_builderSettings.clear(); m_presets.clear(); - m_defaultPresetByFileMask.clear(); } StringOutcome BuilderSettingManager::LoadConfig() @@ -198,44 +233,53 @@ namespace ImageProcessingAtom auto fileIoBase = AZ::IO::FileIOBase::GetInstance(); if (fileIoBase == nullptr) { - return AZ::Failure(AZStd::string("File IO instance needs to be initialized to resolve ImageProcessing builder file aliases")); + return AZ::Failure( + AZStd::string("File IO instance needs to be initialized to resolve ImageProcessing builder file aliases")); } - // Construct the default setting path - - AZ::IO::FixedMaxPath defaultConfigFolder; if (auto engineRoot = fileIoBase->ResolvePath("@engroot@"); engineRoot.has_value()) { - defaultConfigFolder = *engineRoot; - defaultConfigFolder /= s_defaultConfigRelativeFolder; + m_defaultConfigFolder = *engineRoot; + m_defaultConfigFolder /= s_defaultConfigRelativeFolder; } - AZ::IO::FixedMaxPath projectConfigFolder; if (auto sourceGameRoot = fileIoBase->ResolvePath("@projectroot@"); sourceGameRoot.has_value()) { - projectConfigFolder = *sourceGameRoot; - projectConfigFolder /= s_projectConfigRelativeFolder; + m_projectConfigFolder = *sourceGameRoot; + m_projectConfigFolder /= s_projectConfigRelativeFolder; } AZStd::lock_guard lock(m_presetMapLock); ClearSettings(); - outcome = LoadSettings((projectConfigFolder / s_builderSettingFileName).Native()); - - if (!outcome.IsSuccess()) - { - outcome = LoadSettings((defaultConfigFolder / s_builderSettingFileName).Native()); - } + outcome = LoadSettings(); if (outcome.IsSuccess()) { // Load presets in default folder first, then load from project folder. // The same presets which loaded last will overwrite previous loaded one. - LoadPresets(defaultConfigFolder.Native()); - LoadPresets(projectConfigFolder.Native()); + LoadPresets(m_defaultConfigFolder.Native()); + LoadPresets(m_projectConfigFolder.Native()); + } - // Regenerate file mask mapping after all presets loaded - RegenerateMappings(); + // Collect extra file masks from preset files + CollectFileMasksFromPresets(); + + + if (QCoreApplication::instance()) + { + m_fileWatcher.reset(new QFileSystemWatcher); + // track preset files + // Note, the QT signal would only works for AP but not AssetBuilder + // We use file time stamp to track preset file change in builder's CreateJob + for (auto& preset : m_presets) + { + m_fileWatcher.data()->addPath(QString(preset.second.m_presetFilePath.c_str())); + } + m_fileWatcher.data()->addPath(QString(m_defaultConfigFolder.c_str())); + m_fileWatcher.data()->addPath(QString(m_projectConfigFolder.c_str())); + QObject::connect(m_fileWatcher.data(), &QFileSystemWatcher::fileChanged, this, &BuilderSettingManager::OnFileChanged); + QObject::connect(m_fileWatcher.data(), &QFileSystemWatcher::directoryChanged, this, &BuilderSettingManager::OnFolderChanged); } return outcome; @@ -243,36 +287,84 @@ namespace ImageProcessingAtom void BuilderSettingManager::LoadPresets(AZStd::string_view presetFolder) { - AZStd::lock_guard lock(m_presetMapLock); - QDirIterator it(presetFolder.data(), QStringList() << "*.preset", QDir::Files, QDirIterator::NoIteratorFlags); while (it.hasNext()) { QString filePath = it.next(); - QFileInfo fileInfo = it.fileInfo(); + LoadPreset(filePath.toUtf8().data()); + } + } - MultiplatformPresetSettings preset; - auto result = AZ::JsonSerializationUtils::LoadObjectFromFile(preset, filePath.toUtf8().data()); - if (!result.IsSuccess()) + bool BuilderSettingManager::LoadPreset(const AZStd::string& filePath) + { + QFileInfo fileInfo (filePath.c_str()); + + if (!fileInfo.exists()) + { + return false; + } + + MultiplatformPresetSettings preset; + auto result = AZ::JsonSerializationUtils::LoadObjectFromFile(preset, filePath); + if (!result.IsSuccess()) + { + AZ_Warning(LogWindow, false, "Failed to load preset file %s. Error: %s", + filePath.c_str(), result.GetError().c_str()); + return false; + } + + PresetName presetName(fileInfo.baseName().toUtf8().data()); + + AZ_Warning(LogWindow, presetName == preset.GetPresetName(), "Preset file name '%s' is not" + " same as preset name '%s'. Using preset file name as preset name", + filePath.c_str(), preset.GetPresetName().GetCStr()); + + preset.SetPresetName(presetName); + + m_presets[presetName] = PresetEntry{preset, filePath.c_str(), fileInfo.lastModified()}; + return true; + } + + void BuilderSettingManager::ReloadPreset(const PresetName& presetName) + { + // Find the preset file from project or default config folder + AZStd::string presetFileName = AZStd::string::format("%s.%s", presetName.GetCStr(), s_presetFileExtension); + AZ::IO::FixedMaxPath filePath = m_projectConfigFolder/presetFileName; + QFileInfo fileInfo (filePath.c_str()); + if (!fileInfo.exists()) + { + filePath = (m_defaultConfigFolder/presetFileName).c_str(); + fileInfo = QFileInfo(filePath.c_str()); + } + + AZStd::lock_guard lock(m_presetMapLock); + + //Skip the loading if the file wasn't chagned + if (fileInfo.exists()) + { + if (m_presets.find(presetName) != m_presets.end()) { - AZ_Warning("Image Processing", false, "Failed to load preset file %s. Error: %s", - filePath.toUtf8().data(), result.GetError().c_str()); + if (m_presets[presetName].m_lastModifiedTime == fileInfo.lastModified() + && m_presets[presetName].m_presetFilePath == filePath.c_str()) + { + return; + } } + } - PresetName presetName(fileInfo.baseName().toUtf8().data()); + // remove preset + m_presets.erase(presetName); - AZ_Warning("Image Processing", presetName == preset.GetPresetName(), "Preset file name '%s' is not" - " same as preset name '%s'. Using preset file name as preset name", - filePath.toUtf8().data(), preset.GetPresetName().GetCStr()); - - preset.SetPresetName(presetName); - - m_presets[presetName] = PresetEntry{preset, filePath.toUtf8().data()}; + if (fileInfo.exists()) + { + LoadPreset(filePath.c_str()); } } StringOutcome BuilderSettingManager::LoadConfigFromFolder(AZStd::string_view configFolder) { + AZStd::lock_guard lock(m_presetMapLock); + // Load builder settings AZStd::string settingFilePath = AZStd::string::format("%.*s%s", aznumeric_cast(configFolder.size()), configFolder.data(), s_builderSettingFileName); @@ -282,12 +374,108 @@ namespace ImageProcessingAtom if (result.IsSuccess()) { LoadPresets(configFolder); - RegenerateMappings(); } return result; } + void BuilderSettingManager::ReportDeprecatedSettings() + { + // reported deprecated attributes in image builder settings + if (!m_analysisFingerprint.empty()) + { + AZ_Warning(LogWindow, false, "'AnalysisFingerprint' is deprecated and it should be removed from file [%s]", s_builderSettingFileName); + } + if (!m_defaultPresetByFileMask.empty()) + { + AZ_Warning(LogWindow, false, "'DefaultPresetsByFileMask' is deprecated and it should be removed from file [%s]. Use PresetsByFileMask instead", s_builderSettingFileName); + } + } + + StringOutcome BuilderSettingManager::LoadSettings() + { + // If the project image build setting file exist, it will merge image builder settings from project folder to the settings from default config folder. + bool needMerge = false; + AZStd::string projectSettingFile{ (m_projectConfigFolder / s_builderSettingFileName).Native() }; + + if (AZ::IO::SystemFile::Exists(projectSettingFile.c_str())) + { + needMerge = true; + } + + AZ::Outcome outcome; + AZStd::string defaultSettingFile{ (m_defaultConfigFolder / s_builderSettingFileName).Native() }; + if (needMerge) + { + auto outcome1 = AZ::JsonSerializationUtils::ReadJsonFile(defaultSettingFile); + auto outcome2 = AZ::JsonSerializationUtils::ReadJsonFile(projectSettingFile); + + // return error if it failed to load default settings + if (!outcome1.IsSuccess()) + { + return STRING_OUTCOME_ERROR(outcome1.GetError()); + } + + // if project config was loaded successfully, apply merge patch + rapidjson::Document& originDoc = outcome1.GetValue(); + if (outcome2.IsSuccess()) + { + const rapidjson::Document& patchDoc = outcome2.GetValue(); + AZ::JsonSerializationResult::ResultCode result = + AZ::JsonSerialization::ApplyPatch(originDoc, originDoc.GetAllocator(), patchDoc, AZ::JsonMergeApproach::JsonMergePatch); + + if (result.GetProcessing() == AZ::JsonSerializationResult::Processing::Completed) + { + AZStd::vector outBuffer; + AZ::IO::ByteContainerStream> outStream{ &outBuffer }; + AZ::JsonSerializationUtils::WriteJsonStream(originDoc, outStream); + + outStream.Seek(0, AZ::IO::GenericStream::ST_SEEK_BEGIN); + + outcome = AZ::JsonSerializationUtils::LoadObjectFromStream(*this, outStream); + if (!outcome.IsSuccess()) + { + return STRING_OUTCOME_ERROR(outcome.GetError()); + } + + ReportDeprecatedSettings(); + + + // Generate config file fingerprint + outStream.Seek(0, AZ::IO::GenericStream::ST_SEEK_BEGIN); + AZ::u64 hash = AssetBuilderSDK::GetHashFromIOStream(outStream); + m_analysisFingerprint = AZStd::string::format("%llX", hash); + } + else + { + needMerge = false; + AZ_Warning(LogWindow, false, "Failed to fully merge data into image builder settings. Skipping project build setting file [%s]", projectSettingFile.c_str()); + } + } + else + { + AZ_Warning(LogWindow, false, "Failed to load project setting file [%s]. Skipping", projectSettingFile.c_str()); + } + } + + if (!needMerge) + { + outcome = AZ::JsonSerializationUtils::LoadObjectFromFile(*this, defaultSettingFile); + if (!outcome.IsSuccess()) + { + return STRING_OUTCOME_ERROR(outcome.GetError()); + } + + ReportDeprecatedSettings(); + + // Generate config file fingerprint + AZ::u64 hash = AssetBuilderSDK::GetFileHash(defaultSettingFile.c_str()); + m_analysisFingerprint = AZStd::string::format("%llX", hash); + } + + return STRING_OUTCOME_SUCCESS; + } + StringOutcome BuilderSettingManager::LoadSettings(AZStd::string_view filepath) { AZStd::lock_guard lock(m_presetMapLock); @@ -336,13 +524,13 @@ namespace ImageProcessingAtom return m_analysisFingerprint; } - void BuilderSettingManager::RegenerateMappings() + void BuilderSettingManager::CollectFileMasksFromPresets() { AZStd::lock_guard lock(m_presetMapLock); AZStd::string noFilter = AZStd::string(); - - m_presetFilterMap.clear(); + + AZStd::string extraString; for (const auto& presetIter : m_presets) { @@ -357,22 +545,31 @@ namespace ImageProcessingAtom { if (filemask.empty() || filemask[0] != FileMaskDelimiter) { - AZ_Warning("Image Processing", false, "File mask '%s' is invalid. It must start with '%c'.", filemask.c_str(), FileMaskDelimiter); + AZ_Warning(LogWindow, false, "File mask '%s' is invalid. It must start with '%c'.", filemask.c_str(), FileMaskDelimiter); continue; } else if (filemask.size() < 2) { - AZ_Warning("Image Processing", false, "File mask '%s' is invalid. The '%c' must be followed by at least one other character.", filemask.c_str()); + AZ_Warning(LogWindow, false, "File mask '%s' is invalid. The '%c' must be followed by at least one other character.", filemask.c_str()); continue; } else if (filemask.find(FileMaskDelimiter, 1) != AZStd::string::npos) { - AZ_Warning("Image Processing", false, "File mask '%s' is invalid. It must contain only a single '%c' character.", filemask.c_str(), FileMaskDelimiter); + AZ_Warning(LogWindow, false, "File mask '%s' is invalid. It must contain only a single '%c' character.", filemask.c_str(), FileMaskDelimiter); continue; } + + extraString += (filemask + preset.m_name.GetCStr()); + m_presetFilterMap[filemask].insert(preset.m_name); } } + + if (!extraString.empty()) + { + AZ::u64 hash = AZStd::hash{}(extraString); + m_analysisFingerprint += AZStd::string::format("%llX", hash); + } } void BuilderSettingManager::MetafilePathFromImagePath(AZStd::string_view imagePath, AZStd::string& metafilePath) @@ -419,38 +616,16 @@ namespace ImageProcessingAtom return m_presets.find(presetName) != m_presets.end(); } - PresetName BuilderSettingManager::GetSuggestedPreset(AZStd::string_view imageFilePath, IImageObjectPtr imageFromFile) + PresetName BuilderSettingManager::GetSuggestedPreset(AZStd::string_view imageFilePath) const { PresetName emptyPreset; - //load the image to get its size for later use - IImageObjectPtr image = imageFromFile; - //if the input image is empty we will try to load it from the path - if (imageFromFile == nullptr) - { - image = IImageObjectPtr(LoadImageFromFile(imageFilePath)); - } - - if (image == nullptr) - { - return emptyPreset; - } //get file mask of this image file AZStd::string fileMask = GetFileMask(imageFilePath); PresetName outPreset = emptyPreset; - //check default presets for some file masks - if (m_defaultPresetByFileMask.find(fileMask) != m_defaultPresetByFileMask.end()) - { - outPreset = m_defaultPresetByFileMask[fileMask]; - if (!IsValidPreset(outPreset)) - { - outPreset = emptyPreset; - } - } - //use the preset filter map to find if (outPreset.IsEmpty() && !fileMask.empty()) { @@ -461,26 +636,11 @@ namespace ImageProcessingAtom } } - const PresetSettings* presetInfo = nullptr; - - if (!outPreset.IsEmpty()) - { - presetInfo = GetPreset(outPreset); - - //special case for cubemap - if (presetInfo && presetInfo->m_cubemapSetting) - { - // If it's not a latitude-longitude map or it doesn't match any cubemap layouts then reset its preset - if (!IsValidLatLongMap(image) && CubemapLayout::GetCubemapLayoutInfo(image) == nullptr) - { - outPreset = emptyPreset; - } - } - } - if (outPreset == emptyPreset) - { - if (image->GetAlphaContent() == EAlphaContent::eAlphaContent_Absent) + { + auto image = IImageObjectPtr(LoadImageFromFile(imageFilePath)); + if (image->GetAlphaContent() == EAlphaContent::eAlphaContent_Absent + || image->GetAlphaContent() == EAlphaContent::eAlphaContent_OnlyWhite) { outPreset = m_defaultPreset; } @@ -490,25 +650,16 @@ namespace ImageProcessingAtom } } - //get the pixel format for selected preset - presetInfo = GetPreset(outPreset); + return outPreset; + } - if (presetInfo) - { - //valid whether image size work with pixel format - if (CPixelFormats::GetInstance().IsImageSizeValid(presetInfo->m_pixelFormat, - image->GetWidth(0), image->GetHeight(0), false)) - { - return outPreset; - } - else - { - AZ_Warning("Image Processing", false, "Image dimensions are not compatible with preset '%s'. The default preset will be used.", presetInfo->m_name.GetCStr()); - } - } - - //uncompressed one which could be used for almost everything - return m_defaultPresetNonePOT; + AZStd::vector BuilderSettingManager::GetPossiblePresetPaths(const PresetName& presetName) const + { + AZStd::vector paths; + AZStd::string presetFile = AZStd::string::format("%s.preset", presetName.GetCStr()); + paths.push_back((m_defaultConfigFolder / presetFile).c_str()); + paths.push_back((m_projectConfigFolder / presetFile).c_str()); + return paths; } bool BuilderSettingManager::DoesSupportPlatform(AZStd::string_view platformId) @@ -526,18 +677,50 @@ namespace ImageProcessingAtom AZStd::string filePath; if (!AzFramework::StringFunc::Path::Join(outputFolder.data(), fileName.c_str(), filePath)) { - AZ_Warning("Image Processing", false, "Failed to construct path with folder '%.*s' and file: '%s' to save preset", + AZ_Warning(LogWindow, false, "Failed to construct path with folder '%.*s' and file: '%s' to save preset", aznumeric_cast(outputFolder.size()), outputFolder.data(), filePath.c_str()); continue; } auto result = AZ::JsonSerializationUtils::SaveObjectToFile(&presetEntry.m_multiPreset, filePath); if (!result.IsSuccess()) { - AZ_Warning("Image Processing", false, "Failed to save preset '%s' to file '%s'. Error: %s", + AZ_Warning(LogWindow, false, "Failed to save preset '%s' to file '%s'. Error: %s", presetEntry.m_multiPreset.GetDefaultPreset().m_name.GetCStr(), filePath.c_str(), result.GetError().c_str()); } } } + void BuilderSettingManager::OnFileChanged(const QString &path) + { + // handles preset file change + // Note: this signal only works with AP but not AssetBuilder + AZ_TracePrintf(LogWindow, "File changed %s\n", path.toUtf8().data()); + QFileInfo info(path); + // skip if the file is not a preset file + // Note: for .settings file change it's handled when restart AP. + if (info.suffix() != s_presetFileExtension) + { + return; + } + + ReloadPreset(PresetName(info.baseName().toUtf8().data())); + } + + void BuilderSettingManager::OnFolderChanged([[maybe_unused]] const QString &path) + { + // handles new file added or removed + // Note: this signal only works with AP but not AssetBuilder + AZ_TracePrintf(LogWindow, "folder changed %s\n", path.toUtf8().data()); + + AZStd::lock_guard lock(m_presetMapLock); + m_presets.clear(); + LoadPresets(m_defaultConfigFolder.Native()); + LoadPresets(m_projectConfigFolder.Native()); + + for (auto& preset : m_presets) + { + m_fileWatcher.data()->addPath(QString(preset.second.m_presetFilePath.c_str())); + } + } } // namespace ImageProcessingAtom diff --git a/Gems/Atom/Asset/ImageProcessingAtom/Code/Source/BuilderSettings/BuilderSettingManager.h b/Gems/Atom/Asset/ImageProcessingAtom/Code/Source/BuilderSettings/BuilderSettingManager.h index 3bbb71ea43..443b91bc07 100644 --- a/Gems/Atom/Asset/ImageProcessingAtom/Code/Source/BuilderSettings/BuilderSettingManager.h +++ b/Gems/Atom/Asset/ImageProcessingAtom/Code/Source/BuilderSettings/BuilderSettingManager.h @@ -10,10 +10,15 @@ #include #include -#include #include +#include +#include #include +#include +#include +#include + class QSettings; class QString; @@ -36,6 +41,7 @@ namespace ImageProcessingAtom * Each preset setting may have different values on different platform, but they are using same uuid. */ class BuilderSettingManager + : public QObject // required for using QFileSystemWatcher { friend class ImageProcessingTest; @@ -49,17 +55,21 @@ namespace ImageProcessingAtom static void DestroyInstance(); static void Reflect(AZ::ReflectContext* context); - const PresetSettings* GetPreset(const PresetName& presetName, const PlatformName& platform = "", AZStd::string_view* settingsFilePathOut = nullptr); + const PresetSettings* GetPreset(const PresetName& presetName, const PlatformName& platform = "", AZStd::string_view* settingsFilePathOut = nullptr) const; - const BuilderSettings* GetBuilderSetting(const PlatformName& platform); + AZStd::vector GetFileMasksForPreset(const PresetName& presetName) const; + + const BuilderSettings* GetBuilderSetting(const PlatformName& platform) const; //! Return A list of platform supported - const PlatformNameList GetPlatformList(); + const PlatformNameList GetPlatformList() const; //! Return A map of preset settings based on their filemasks. //! @key filemask string, empty string means no filemask //! @value set of preset setting names supporting the specified filemask - const AZStd::map>& GetPresetFilterMap(); + const AZStd::map>& GetPresetFilterMap() const; + + const AZStd::unordered_set& GetFullPresetList() const; //! Find preset name based on the preset id. const PresetName GetPresetNameFromId(const AZ::Uuid& presetId); @@ -68,7 +78,11 @@ namespace ImageProcessingAtom StringOutcome LoadConfig(); //! Load configurations files from a folder which includes builder settings and presets - StringOutcome LoadConfigFromFolder(AZStd::string_view configFolder); + //! Note: this is only used for unit test. Use LoadConfig() for editor or game launcher + StringOutcome LoadConfigFromFolder(AZStd::string_view configFolder); + + //! Reload preset from config folders + void ReloadPreset(const PresetName& presetName); const AZStd::string& GetAnalysisFingerprint() const; @@ -81,7 +95,12 @@ namespace ImageProcessingAtom //! @param imageFilePath: Filepath string of the image file. The function may load the image from the path for better detection //! @param image: an optional image object which can be used for preset selection if there is no match based file mask. //! @return suggested preset name. - PresetName GetSuggestedPreset(AZStd::string_view imageFilePath, IImageObjectPtr image = nullptr); + PresetName GetSuggestedPreset(AZStd::string_view imageFilePath) const; + + //! Get the possible preset config's full file paths + //! This function is only used for setting up image's source dependency if a preset file is missing + //! Otherwise, the preset's file path can be retrieved in GetPreset() function + AZStd::vector GetPossiblePresetPaths(const PresetName& presetName) const; bool IsValidPreset(PresetName presetName) const; @@ -105,25 +124,41 @@ namespace ImageProcessingAtom private: // functions AZ_DISABLE_COPY_MOVE(BuilderSettingManager); + // Write image builder setting to the file specified by filepath StringOutcome WriteSettings(AZStd::string_view filepath); + // Load image builder settings from the file specified by filepath StringOutcome LoadSettings(AZStd::string_view filepath); + // Load merge image builder settings (project and default) + StringOutcome LoadSettings(); + + // report warnings for the deprecated properties in image builder setting data + void ReportDeprecatedSettings(); + // Clear Builder Settings and any cached maps/lists void ClearSettings(); - // Regenerate Builder Settings and any cached maps/lists - void RegenerateMappings(); + // collect file masks + void CollectFileMasksFromPresets(); // Functions to save/load preset from a folder void SavePresets(AZStd::string_view outputFolder); void LoadPresets(AZStd::string_view presetFolder); + // Load a preset to m_presets and return true if success + bool LoadPreset(const AZStd::string& filePath); + + // handle preset files changes + void OnFileChanged(const QString &path); + void OnFolderChanged(const QString &path); + private: // variables struct PresetEntry { MultiplatformPresetSettings m_multiPreset; AZStd::string m_presetFilePath; // Can be used for debug output + QDateTime m_lastModifiedTime; }; // Builder settings for each platform @@ -131,13 +166,13 @@ namespace ImageProcessingAtom AZStd::unordered_map m_presets; - // Cached list of presets mapped by their file masks. + // a list of presets mapped by their file masks. // @Key file mask, use empty string to indicate all presets without filtering // @Value set of preset names that matches the file mask AZStd::map > m_presetFilterMap; - // A mutex to protect when modifying any map in this manager - AZStd::recursive_mutex m_presetMapLock; + // A mutex to protect when modifying any map in this manager + mutable AZStd::recursive_mutex m_presetMapLock; // Default presets for certain file masks AZStd::map m_defaultPresetByFileMask; @@ -153,5 +188,14 @@ namespace ImageProcessingAtom // Image builder's version AZStd::string m_analysisFingerprint; + + // default config folder + AZ::IO::FixedMaxPath m_defaultConfigFolder; + + // project config folder + AZ::IO::FixedMaxPath m_projectConfigFolder; + + // File system watcher to detect preset file changes + QScopedPointer m_fileWatcher; }; } // namespace ImageProcessingAtom diff --git a/Gems/Atom/Asset/ImageProcessingAtom/Code/Source/BuilderSettings/CubemapSettings.h b/Gems/Atom/Asset/ImageProcessingAtom/Code/Source/BuilderSettings/CubemapSettings.h index 9135a0f4d1..77f804b646 100644 --- a/Gems/Atom/Asset/ImageProcessingAtom/Code/Source/BuilderSettings/CubemapSettings.h +++ b/Gems/Atom/Asset/ImageProcessingAtom/Code/Source/BuilderSettings/CubemapSettings.h @@ -26,19 +26,19 @@ namespace ImageProcessingAtom static void Reflect(AZ::ReflectContext* context); // "cm_ftype", cubemap angular filter type: gaussian, cone, disc, cosine, cosine_power, ggx - CubemapFilterType m_filter; + CubemapFilterType m_filter = CubemapFilterType::ggx; // "cm_fangle", base filter angle for cubemap filtering(degrees), 0 - disabled - float m_angle; + float m_angle = 0; // "cm_fmipangle", initial mip filter angle for cubemap filtering(degrees), 0 - disabled - float m_mipAngle; + float m_mipAngle = 0; // "cm_fmipslope", mip filter angle multiplier for cubemap filtering, 1 - default" - float m_mipSlope; + float m_mipSlope = 1; // "cm_edgefixup", cubemap edge fix-up width, 0 - disabled - float m_edgeFixup; + float m_edgeFixup = 0; // generate an IBL specular cubemap bool m_generateIBLSpecular = false; diff --git a/Gems/Atom/Asset/ImageProcessingAtom/Code/Source/BuilderSettings/ImageProcessingDefines.h b/Gems/Atom/Asset/ImageProcessingAtom/Code/Source/BuilderSettings/ImageProcessingDefines.h index e421715995..7c35a0634e 100644 --- a/Gems/Atom/Asset/ImageProcessingAtom/Code/Source/BuilderSettings/ImageProcessingDefines.h +++ b/Gems/Atom/Asset/ImageProcessingAtom/Code/Source/BuilderSettings/ImageProcessingDefines.h @@ -39,7 +39,8 @@ namespace ImageProcessingAtom #define STRING_OUTCOME_ERROR(error) AZ::Failure(AZStd::string(error)) // Common typedefs (with dependent forward-declarations) - typedef AZStd::string PlatformName, FileMask; + typedef AZStd::string PlatformName; + typedef AZStd::string FileMask; typedef AZ::Name PresetName; typedef AZStd::vector PlatformNameVector; typedef AZStd::list PlatformNameList; diff --git a/Gems/Atom/Asset/ImageProcessingAtom/Code/Source/BuilderSettings/PresetSettings.cpp b/Gems/Atom/Asset/ImageProcessingAtom/Code/Source/BuilderSettings/PresetSettings.cpp index 3812b86026..046c4faa87 100644 --- a/Gems/Atom/Asset/ImageProcessingAtom/Code/Source/BuilderSettings/PresetSettings.cpp +++ b/Gems/Atom/Asset/ImageProcessingAtom/Code/Source/BuilderSettings/PresetSettings.cpp @@ -45,10 +45,7 @@ namespace ImageProcessingAtom ->Field("MinTextureSize", &PresetSettings::m_minTextureSize) ->Field("IsPowerOf2", &PresetSettings::m_isPowerOf2) ->Field("SizeReduceLevel", &PresetSettings::m_sizeReduceLevel) - ->Field("IsColorChart", &PresetSettings::m_isColorChart) - ->Field("HighPassMip", &PresetSettings::m_highPassMip) ->Field("GlossFromNormal", &PresetSettings::m_glossFromNormals) - ->Field("UseLegacyGloss", &PresetSettings::m_isLegacyGloss) ->Field("MipRenormalize", &PresetSettings::m_isMipRenormalize) ->Field("NumberResidentMips", &PresetSettings::m_numResidentMips) ->Field("Swizzle", &PresetSettings::m_swizzle) @@ -200,10 +197,7 @@ namespace ImageProcessingAtom m_maxTextureSize == other.m_maxTextureSize && m_isPowerOf2 == other.m_isPowerOf2 && m_sizeReduceLevel == other.m_sizeReduceLevel && - m_isColorChart == other.m_isColorChart && - m_highPassMip == other.m_highPassMip && m_glossFromNormals == other.m_glossFromNormals && - m_isLegacyGloss == other.m_isLegacyGloss && m_swizzle == other.m_swizzle && m_isMipRenormalize == other.m_isMipRenormalize && m_numResidentMips == other.m_numResidentMips; @@ -239,10 +233,7 @@ namespace ImageProcessingAtom m_maxTextureSize = other.m_maxTextureSize; m_isPowerOf2 = other.m_isPowerOf2; m_sizeReduceLevel = other.m_sizeReduceLevel; - m_isColorChart = other.m_isColorChart; - m_highPassMip = other.m_highPassMip; m_glossFromNormals = other.m_glossFromNormals; - m_isLegacyGloss = other.m_isLegacyGloss; m_swizzle = other.m_swizzle; m_isMipRenormalize = other.m_isMipRenormalize; m_numResidentMips = other.m_numResidentMips; diff --git a/Gems/Atom/Asset/ImageProcessingAtom/Code/Source/BuilderSettings/PresetSettings.h b/Gems/Atom/Asset/ImageProcessingAtom/Code/Source/BuilderSettings/PresetSettings.h index 941437bbf4..3dc223cf80 100644 --- a/Gems/Atom/Asset/ImageProcessingAtom/Code/Source/BuilderSettings/PresetSettings.h +++ b/Gems/Atom/Asset/ImageProcessingAtom/Code/Source/BuilderSettings/PresetSettings.h @@ -84,16 +84,7 @@ namespace ImageProcessingAtom //settings for mipmap generation. it's null if this preset disable mipmap. AZStd::unique_ptr m_mipmapSetting; - - //some specific settings - // "colorchart". This is to indicate if need to extract color chart from the image and output the color chart data. - // This is very specific usage for cryEngine. Check ColorChart.cpp for better explanation. - bool m_isColorChart = false; - - //"highpass". Defines which mip level is subtracted when applying the high pass filter - //this is only used for terrain asset. we might remove it later since it can be done with source image directly - AZ::u32 m_highPassMip = 0; - + //"glossfromnormals". Bake normal variance into smoothness stored in alpha channel AZ::u32 m_glossFromNormals = 0; @@ -109,10 +100,6 @@ namespace ImageProcessingAtom //that add up to 64K or lower AZ::u8 m_numResidentMips = 0; - //legacy options might be removed later - //"glosslegacydist". If the gloss map use legacy distribution. NW is still using legacy dist - bool m_isLegacyGloss = false; - //"swizzle". need to be 4 character and each character need to be one of "rgba01" AZStd::string m_swizzle; diff --git a/Gems/Atom/Asset/ImageProcessingAtom/Code/Source/Compressors/ASTCCompressor.cpp b/Gems/Atom/Asset/ImageProcessingAtom/Code/Source/Compressors/ASTCCompressor.cpp index 4ef47c043d..91829bb5be 100644 --- a/Gems/Atom/Asset/ImageProcessingAtom/Code/Source/Compressors/ASTCCompressor.cpp +++ b/Gems/Atom/Asset/ImageProcessingAtom/Code/Source/Compressors/ASTCCompressor.cpp @@ -78,7 +78,7 @@ namespace ImageProcessingAtom return true; } - astcenc_profile GetAstcProfile(bool isSrgb, EPixelFormat pixelFormat) + astcenc_profile GetAstcProfile(bool isSrgb, bool isHDR) { // select profile depends on LDR or HDR, SRGB or Linear // ASTCENC_PRF_LDR @@ -86,8 +86,6 @@ namespace ImageProcessingAtom // ASTCENC_PRF_HDR_RGB_LDR_A // ASTCENC_PRF_HDR - auto formatInfo = CPixelFormats::GetInstance().GetPixelFormatInfo(pixelFormat); - bool isHDR = formatInfo->eSampleType == ESampleType::eSampleType_Half || formatInfo->eSampleType == ESampleType::eSampleType_Float; astcenc_profile profile; if (isHDR) { @@ -170,7 +168,7 @@ namespace ImageProcessingAtom auto dstFormatInfo = CPixelFormats::GetInstance().GetPixelFormatInfo(fmtDst); const float quality = GetAstcCompressQuality(compressOption->compressQuality); - const astcenc_profile profile = GetAstcProfile(srcImage->HasImageFlags(EIF_SRGBRead), fmtSrc); + const astcenc_profile profile = GetAstcProfile(srcImage->HasImageFlags(EIF_SRGBRead), srcImage->HasImageFlags(EIF_HDR)); astcenc_config config; astcenc_error status; @@ -182,10 +180,12 @@ namespace ImageProcessingAtom // Create a context based on the configuration astcenc_context* context; AZ::u32 blockCount = ((srcImage->GetWidth(0)+ dstFormatInfo->blockWidth-1)/dstFormatInfo->blockWidth) * ((srcImage->GetHeight(0) + dstFormatInfo->blockHeight-1)/dstFormatInfo->blockHeight); - AZ::u32 threadCount = AZStd::min(AZStd::thread::hardware_concurrency(), blockCount); + AZ::u32 threadCount = AZStd::min(AZStd::thread::hardware_concurrency()/2, blockCount); status = astcenc_context_alloc(&config, threadCount, &context); AZ_Assert( status == ASTCENC_SUCCESS, "ERROR: Codec context alloc failed: %s\n", astcenc_get_error_string(status)); + AZ::Job* currentJob = AZ::JobContext::GetGlobalContext()->GetJobManager().GetCurrentJob(); + const astcenc_type dataType =GetAstcDataType(fmtSrc); // Compress the image for each mips @@ -209,29 +209,65 @@ namespace ImageProcessingAtom dstImage->GetImagePointer(mip, dstMem, dstPitch); AZ::u32 dataSize = dstImage->GetMipBufSize(mip); - // Create jobs for each compression thread - auto completionJob = aznew AZ::JobCompletion(); - for (AZ::u32 threadIdx = 0; threadIdx < threadCount; threadIdx++) + if (threadCount == 1) { - const auto jobLambda = [&status, context, &image, &swizzle, dstMem, dataSize, threadIdx]() + astcenc_error error = astcenc_compress_image(context, &image, &swizzle, dstMem, dataSize, 0); + if (error != ASTCENC_SUCCESS) { + status = error; + } + } + else + { + AZ::JobCompletion* completionJob = nullptr; + if (!currentJob) + { + completionJob = aznew AZ::JobCompletion(); + } + // Create jobs for each compression thread + for (AZ::u32 threadIdx = 0; threadIdx < threadCount; threadIdx++) + { + const auto jobLambda = [&status, context, &image, &swizzle, dstMem, dataSize, threadIdx]() + { + astcenc_error error = astcenc_compress_image(context, &image, &swizzle, dstMem, dataSize, threadIdx); + if (error != ASTCENC_SUCCESS) + { + status = error; + } + }; + + AZ::Job* simulationJob = AZ::CreateJobFunction(AZStd::move(jobLambda), true, nullptr); //auto-deletes + + // adds this job as child to current job if there is a current job + // otherwise adds it as a dependent for the complete job + if (currentJob) + { + currentJob->StartAsChild(simulationJob); + } + else + { + simulationJob->SetDependent(completionJob); + simulationJob->Start(); + } + astcenc_error error = astcenc_compress_image(context, &image, &swizzle, dstMem, dataSize, threadIdx); if (error != ASTCENC_SUCCESS) { status = error; } - }; + } + + if (currentJob) + { + currentJob->WaitForChildren(); + } - AZ::Job* simulationJob = AZ::CreateJobFunction(AZStd::move(jobLambda), true, nullptr); //auto-deletes - simulationJob->SetDependent(completionJob); - simulationJob->Start(); - } - - if (completionJob) - { - completionJob->StartAndWaitForCompletion(); - delete completionJob; - completionJob = nullptr; + if (completionJob) + { + completionJob->StartAndWaitForCompletion(); + delete completionJob; + completionJob = nullptr; + } } if (status != ASTCENC_SUCCESS) diff --git a/Gems/Atom/Asset/ImageProcessingAtom/Code/Source/Converters/ColorChart.cpp b/Gems/Atom/Asset/ImageProcessingAtom/Code/Source/Converters/ColorChart.cpp deleted file mode 100644 index b6e9cf4c8c..0000000000 --- a/Gems/Atom/Asset/ImageProcessingAtom/Code/Source/Converters/ColorChart.cpp +++ /dev/null @@ -1,307 +0,0 @@ -/* - * Copyright (c) Contributors to the Open 3D Engine Project. - * For complete copyright and license terms please see the LICENSE at the root of this distribution. - * - * SPDX-License-Identifier: Apache-2.0 OR MIT - * - */ - - -#include -#include - -namespace ImageProcessingAtom -{ - const int COLORCHART_IMAGE_WIDTH = 78; - const int COLORCHART_IMAGE_HEIGHT = 66; - - // color chart in cry engine is a special image data, with size 78x66, you may see in game screenshot which is defined by a rectangle - // area with a yellow-black dash line boarder - // Create color chart function is to read that block of image data and convert it to a color table then save it to another image - // with size 256x16. - - class C3dLutColorChart - { - public: - C3dLutColorChart() {} - ~C3dLutColorChart() {}; - - //generate default color chart data - void GenerateDefault(); - - //generate color chart data from input image - bool GenerateFromInput(IImageObjectPtr image); - - //ouput the color chart data to an image object - IImageObjectPtr GenerateChartImage(); - - protected: - //extract color chart data from specified location in an image - void ExtractFromImageAt(IImageObjectPtr pImg, AZ::u32 x, AZ::u32 y); - - //find color chart location in an image - static bool FindColorChart(const IImageObjectPtr pImg, AZ::u32& outLocX, AZ::u32& outLocY); - - //if there is a color chart at specified location - static bool IsColorChartAt(AZ::u32 x, AZ::u32 y, void* pData, AZ::u32 pitch); - - private: - enum EPrimaryShades - { - ePS_Red = 16, - ePS_Green = 16, - ePS_Blue = 16, - - ePS_NumColors = ePS_Red * ePS_Green * ePS_Blue - }; - - struct SColor - { - unsigned char r, g, b, _padding; - }; - - typedef AZStd::vector ColorMapping; - - ColorMapping m_mapping; - }; - - void C3dLutColorChart::GenerateDefault() - { - m_mapping.reserve(ePS_NumColors); - - for (int b = 0; b < ePS_Blue; ++b) - { - for (int g = 0; g < ePS_Green; ++g) - { - for (int r = 0; r < ePS_Red; ++r) - { - SColor col; - col.r = static_cast(255 * r / (ePS_Red)); - col.g = static_cast(255 * g / (ePS_Green)); - col.b = static_cast(255 * b / (ePS_Blue)); - int l = 255 - (col.r * 3 + col.g * 6 + col.b) / 10; - col.r = col.g = col.b = (unsigned char)l; - m_mapping.push_back(col); - } - } - } - } - - //find color chart location in a image - bool C3dLutColorChart::FindColorChart(const IImageObjectPtr pImg, AZ::u32& outLocX, AZ::u32& outLocY) - { - const AZ::u32 width = pImg->GetWidth(0); - const AZ::u32 height = pImg->GetHeight(0); - - //the origin image is too small to have a color chart - if (width < COLORCHART_IMAGE_WIDTH || height < COLORCHART_IMAGE_HEIGHT) - { - return false; - } - - AZ::u8* pData; - AZ::u32 pitch; - pImg->GetImagePointer(0, pData, pitch); - - //check all the posible start location on whether there might be a color chart - for (AZ::u32 y = 0; y <= height - COLORCHART_IMAGE_HEIGHT; ++y) - { - for (AZ::u32 x = 0; x <= width - COLORCHART_IMAGE_WIDTH; ++x) - { - if (IsColorChartAt(x, y, pData, pitch)) - { - outLocX = x; - outLocY = y; - return true; - } - } - } - - return false; - } - - bool C3dLutColorChart::GenerateFromInput(IImageObjectPtr image) - { - AZ::u32 outLocX, outLocY; - if (FindColorChart(image, outLocX, outLocY)) - { - ExtractFromImageAt(image, outLocX, outLocY); - return true; - } - return false; - } - - IImageObjectPtr C3dLutColorChart::GenerateChartImage() - { - IImageObjectPtr image(IImageObject::CreateImage(ePS_Red* ePS_Blue, ePS_Green, 1, ePixelFormat_R8G8B8A8)); - - { - AZ::u8* pData; - AZ::u32 pitch; - image->GetImagePointer(0, pData, pitch); - - size_t nSlicePitch = (pitch / ePS_Blue); - AZ::u32 src = 0; - for (int b = 0; b < ePS_Blue; ++b) - { - for (int g = 0; g < ePS_Green; ++g) - { - AZ::u8* p = pData + g * pitch + b * nSlicePitch; - for (int r = 0; r < ePS_Red; ++r) - { - const SColor& c = m_mapping[src]; - p[0] = c.r; - p[1] = c.g; - p[2] = c.b; - p[3] = 255; - ++src; - p += 4; - } - } - } - } - - return image; - } - - void C3dLutColorChart::ExtractFromImageAt(IImageObjectPtr image, AZ::u32 x, AZ::u32 y) - { - int ox = x + 1; - int oy = y + 1; - - AZ::u8* pData; - AZ::u32 pitch; - image->GetImagePointer(0, pData, pitch); - - m_mapping.reserve(ePS_NumColors); - - for (int b = 0; b < ePS_Blue; ++b) - { - int px = ox + ePS_Red * (b % 4); - int py = oy + ePS_Green * (b / 4); - - for (int g = 0; g < ePS_Green; ++g) - { - for (int r = 0; r < ePS_Red; ++r) - { - AZ::u8* p = pData + pitch * (py + g) + (px + r) * 4; - - SColor col; - col.r = p[0]; - col.g = p[1]; - col.b = p[2]; - m_mapping.push_back(col); - } - } - } - } - - //check if image data at location x and y could be a color chart - //based on if the boarder is dash lines with two pixel each segement - //the idea and implementation are both coming from CryEngine. - bool C3dLutColorChart::IsColorChartAt(AZ::u32 x, AZ::u32 y, void* pData, AZ::u32 pitch) - { - struct Color - { - private: - int c[3]; - - public: - Color(AZ::u32 x, AZ::u32 y, void* pPixels, AZ::u32 pitch) - { - const uint8* p = (const uint8*)pPixels + pitch * y + x * 4; - c[0] = p[0]; - c[1] = p[1]; - c[2] = p[2]; - } - - bool isSimilar(const Color& a, int maxDiff) const - { - return - abs(a.c[0] - c[0]) <= maxDiff && - abs(a.c[1] - c[1]) <= maxDiff && - abs(a.c[2] - c[2]) <= maxDiff; - } - }; - - const Color colorRef[2] = - { - Color(x, y, pData, pitch), - Color(x + 2, y, pData, pitch) - }; - - // We require two colors of the border to be at least a bit different - if (colorRef[0].isSimilar(colorRef[1], 15)) - { - return false; - } - - static const int kMaxDiff = 3; - - int refIdx = 0; - //rectangle's top - for (int i = 0; i < COLORCHART_IMAGE_WIDTH; i += 2) - { - if (!colorRef[refIdx].isSimilar(Color(x + i, y, pData, pitch), kMaxDiff) || - !colorRef[refIdx].isSimilar(Color(x + i + 1, y, pData, pitch), kMaxDiff)) - { - return false; - } - refIdx ^= 1; - } - - refIdx = 0; - //left - for (int i = 0; i < COLORCHART_IMAGE_HEIGHT; i += 2) - { - if (!colorRef[refIdx].isSimilar(Color(x, y + i, pData, pitch), kMaxDiff) || - !colorRef[refIdx].isSimilar(Color(x, y + i + 1, pData, pitch), kMaxDiff)) - { - return false; - } - refIdx ^= 1; - } - - refIdx = 0; - //right - for (int i = 0; i < COLORCHART_IMAGE_HEIGHT; i += 2) - { - if (!colorRef[refIdx].isSimilar(Color(x + COLORCHART_IMAGE_WIDTH - 1, y + i, pData, pitch), kMaxDiff) || - !colorRef[refIdx].isSimilar(Color(x + COLORCHART_IMAGE_WIDTH - 1, y + i + 1, pData, pitch), kMaxDiff)) - { - return false; - } - refIdx ^= 1; - } - - refIdx = 0; - //bottom - for (int i = 0; i < COLORCHART_IMAGE_WIDTH; i += 2) - { - if (!colorRef[refIdx].isSimilar(Color(x + i, y + COLORCHART_IMAGE_HEIGHT - 1, pData, pitch), kMaxDiff) || - !colorRef[refIdx].isSimilar(Color(x + i + 1, y + COLORCHART_IMAGE_HEIGHT - 1, pData, pitch), kMaxDiff)) - { - return false; - } - refIdx ^= 1; - } - - return true; - } - - - void ImageToProcess::CreateColorChart() - { - C3dLutColorChart colorChart; - - //get color chart data from source image. - if (!colorChart.GenerateFromInput(m_img)) - { - //if load from image failed then generate default color data - colorChart.GenerateDefault(); - } - - //save color chart data to an image and save as current - m_img = colorChart.GenerateChartImage(); - } -} diff --git a/Gems/Atom/Asset/ImageProcessingAtom/Code/Source/Converters/ConvertPixelFormat.cpp b/Gems/Atom/Asset/ImageProcessingAtom/Code/Source/Converters/ConvertPixelFormat.cpp index b0f78d60a3..3219bef582 100644 --- a/Gems/Atom/Asset/ImageProcessingAtom/Code/Source/Converters/ConvertPixelFormat.cpp +++ b/Gems/Atom/Asset/ImageProcessingAtom/Code/Source/Converters/ConvertPixelFormat.cpp @@ -32,10 +32,9 @@ namespace ImageProcessingAtom return; } - uint32 dwWidth, dwHeight, dwMips; + uint32 dwWidth, dwHeight; dwWidth = Get()->GetWidth(0); dwHeight = Get()->GetHeight(0); - dwMips = Get()->GetMipCount(); //if the output image size doesn't work the desired pixel format. set to fallback format const PixelFormatInfo* dstFmtInfo = CPixelFormats::GetInstance().GetPixelFormatInfo(fmtDst); diff --git a/Gems/Atom/Asset/ImageProcessingAtom/Code/Source/Converters/Cubemap.cpp b/Gems/Atom/Asset/ImageProcessingAtom/Code/Source/Converters/Cubemap.cpp index 4f13c6f9bf..d373f399e1 100644 --- a/Gems/Atom/Asset/ImageProcessingAtom/Code/Source/Converters/Cubemap.cpp +++ b/Gems/Atom/Asset/ImageProcessingAtom/Code/Source/Converters/Cubemap.cpp @@ -547,7 +547,7 @@ namespace ImageProcessingAtom } //generate box filtered source image mip chain - IImageObjectPtr mippedSourceImage(IImageObject::CreateImage(outWidth, outHeight, maxMipCount, ePixelFormat_R32G32B32A32F)); + IImageObjectPtr mippedSourceImage(IImageObject::CreateImage(outWidth, outHeight, maxMipCount, srcPixelFormat)); mippedSourceImage->CopyPropertiesFrom(m_image->Get()); for (int iSide = 0; iSide < 6; ++iSide) diff --git a/Gems/Atom/Asset/ImageProcessingAtom/Code/Source/Converters/HighPass.cpp b/Gems/Atom/Asset/ImageProcessingAtom/Code/Source/Converters/HighPass.cpp deleted file mode 100644 index e2071fb586..0000000000 --- a/Gems/Atom/Asset/ImageProcessingAtom/Code/Source/Converters/HighPass.cpp +++ /dev/null @@ -1,100 +0,0 @@ -/* - * Copyright (c) Contributors to the Open 3D Engine Project. - * For complete copyright and license terms please see the LICENSE at the root of this distribution. - * - * SPDX-License-Identifier: Apache-2.0 OR MIT - * - */ - - -#include -#include -#include -#include -#include -#include - -namespace ImageProcessingAtom -{ - // higher mip level is subtracted by lower mip level when applying the [cheap] high pass filter - void ImageToProcess::CreateHighPass(AZ::u32 dwMipDown) - { - //no need to convert if mip go down 0 - if (dwMipDown == 0) - { - return; - } - - const EPixelFormat ePixelFormat = m_img->GetPixelFormat(); - - if (ePixelFormat != ePixelFormat_R32G32B32A32F) - { - AZ_Assert(false, "You need convert the orginal image to ePixelFormat_R32G32B32A32F before call this function"); - return; - } - - - AZ::u32 dwWidth, dwHeight, dwMips; - dwWidth = m_img->GetWidth(0); - dwHeight = m_img->GetHeight(0); - dwMips = m_img->GetMipCount(); - - if (dwMipDown >= dwMips) - { - AZ_Warning("Image Processing", false, "CreateHighPass can't go down %i MIP levels for high pass as there are not\ - enough MIP levels available, going down by %i instead", dwMipDown, dwMips - 1); - dwMipDown = dwMips - 1; - } - - IImageObjectPtr newImage(IImageObject::CreateImage(dwWidth, dwHeight, dwMips, ePixelFormat)); - newImage->CopyPropertiesFrom(m_img); - - IPixelOperationPtr pixelOp = CreatePixelOperation(ePixelFormat); - AZ::u32 pixelBytes = CPixelFormats::GetInstance().GetPixelFormatInfo(ePixelFormat)->bitsPerBlock / 8; - - AZ::u32 dstMips = newImage->GetMipCount(); - for (AZ::u32 dstMip = 0; dstMip < dwMipDown; ++dstMip) - { - // linear interpolation - FilterImage(MipGenType::triangle, MipGenEvalType::sum, 0.0f, 0.0f, m_img, dwMipDown, newImage, dstMip, NULL, NULL); - - //substraction - AZ::u8* srcPixelBuf; - AZ::u32 srcPitch; - m_img->GetImagePointer(dstMip, srcPixelBuf, srcPitch); - AZ::u8* dstPixelBuf; - AZ::u32 dstPitch; - newImage->GetImagePointer(dstMip, dstPixelBuf, dstPitch); - const AZ::u32 pixelCount = newImage->GetPixelCount(dstMip); - - for (AZ::u32 i = 0; i < pixelCount; ++i, srcPixelBuf += pixelBytes, dstPixelBuf += pixelBytes) - { - float r1, g1, b1, a1, r2, g2, b2, a2; - pixelOp->GetRGBA(srcPixelBuf, r1, g1, b1, a1); - pixelOp->GetRGBA(dstPixelBuf, r2, g2, b2, a2); - - r2 = AZ::GetClamp(r1 - r2 + 0.5f, 0.0f, 1.0f); - g2 = AZ::GetClamp(g1 - g2 + 0.5f, 0.0f, 1.0f); - b2 = AZ::GetClamp(b1 - b2 + 0.5f, 0.0f, 1.0f); - a2 = AZ::GetClamp(a1 - a2 + 0.5f, 0.0f, 1.0f); - pixelOp->SetRGBA(dstPixelBuf, r2, g2, b2, a2); - } - } - - // mips below the chosen highpass mip are grey - for (AZ::u32 dstMip = dwMipDown; dstMip < dstMips; ++dstMip) - { - AZ::u8* dstPixelBuf; - AZ::u32 dstPitch; - newImage->GetImagePointer(dstMip, dstPixelBuf, dstPitch); - const AZ::u32 pixelCount = newImage->GetPixelCount(dstMip); - - for (AZ::u32 i = 0; i < pixelCount; ++i, dstPixelBuf += pixelBytes) - { - pixelOp->SetRGBA(dstPixelBuf, 0.5f, 0.5f, 0.5f, 1.0f); - } - } - - m_img = newImage; - } -} // namespace ImageProcessingAtom diff --git a/Gems/Atom/Asset/ImageProcessingAtom/Code/Source/Editor/EditorCommon.cpp b/Gems/Atom/Asset/ImageProcessingAtom/Code/Source/Editor/EditorCommon.cpp index 067faf3dab..f9fe1b791f 100644 --- a/Gems/Atom/Asset/ImageProcessingAtom/Code/Source/Editor/EditorCommon.cpp +++ b/Gems/Atom/Asset/ImageProcessingAtom/Code/Source/Editor/EditorCommon.cpp @@ -123,6 +123,10 @@ namespace ImageProcessingAtomEditor { readableString = "iOS"; } + else if (platformStrLowerCase == "salem") + { + readableString = "Salem"; + } else if (platformStrLowerCase == "jasper") { readableString = "Jasper"; @@ -171,7 +175,7 @@ namespace ImageProcessingAtomEditor if (!preset) { AZ_Warning("Texture Editor", false, "Cannot find preset %s! Will assign a suggested one for the texture.", presetName.GetCStr()); - presetName = BuilderSettingManager::Instance()->GetSuggestedPreset(m_fullPath, m_img); + presetName = BuilderSettingManager::Instance()->GetSuggestedPreset(m_fullPath); for (auto& settingIter : m_settingsMap) { @@ -257,15 +261,22 @@ namespace ImageProcessingAtomEditor // Update input width and height if it's a cubemap if (presetSetting->m_cubemapSetting != nullptr) { - CubemapLayout *srcCubemap = CubemapLayout::CreateCubemapLayout(m_img); - if (srcCubemap == nullptr) + if (IsValidLatLongMap(m_img)) { - return false; + inputWidth = inputWidth/4; + } + else + { + CubemapLayout *srcCubemap = CubemapLayout::CreateCubemapLayout(m_img); + if (srcCubemap == nullptr) + { + return false; + } + inputWidth = srcCubemap->GetFaceSize(); + delete srcCubemap; } - inputWidth = srcCubemap->GetFaceSize(); inputHeight = inputWidth; outResolutionInfo.arrayCount = 6; - delete srcCubemap; } GetOutputExtent(inputWidth, inputHeight, outResolutionInfo.width, outResolutionInfo.height, outResolutionInfo.reduce, &textureSetting, presetSetting); diff --git a/Gems/Atom/Asset/ImageProcessingAtom/Code/Source/Editor/PresetInfoPopup.cpp b/Gems/Atom/Asset/ImageProcessingAtom/Code/Source/Editor/PresetInfoPopup.cpp index a5b942fa58..fe5703ceb6 100644 --- a/Gems/Atom/Asset/ImageProcessingAtom/Code/Source/Editor/PresetInfoPopup.cpp +++ b/Gems/Atom/Asset/ImageProcessingAtom/Code/Source/Editor/PresetInfoPopup.cpp @@ -82,10 +82,7 @@ namespace ImageProcessingAtomEditor presetInfoText += "\n"; presetInfoText += QString("Suppress Engine Reduce: %1\n").arg(presetSettings->m_suppressEngineReduce ? "True" : "False"); presetInfoText += QString("Discard Alpha: %1\n").arg(presetSettings->m_discardAlpha ? "True" : "False"); - presetInfoText += QString("Is Color Chart: %1\n").arg(presetSettings->m_isColorChart ? "True" : "False"); - presetInfoText += QString("High Pass Mip: %1\n").arg(presetSettings->m_highPassMip); presetInfoText += QString("Gloss From Normal: %1\n").arg(presetSettings->m_glossFromNormals); - presetInfoText += QString("Use Legacy Gloss: %1\n").arg(presetSettings->m_isLegacyGloss ? "True" : "False"); presetInfoText += QString("Mip Re-normalize: %1\n").arg(presetSettings->m_isMipRenormalize ? "True" : "False"); presetInfoText += QString("Resident Mips Number: %1\n").arg(presetSettings->m_numResidentMips); presetInfoText += QString("Swizzle: %1\n").arg(presetSettings->m_swizzle.c_str()); diff --git a/Gems/Atom/Asset/ImageProcessingAtom/Code/Source/Editor/TexturePresetSelectionWidget.cpp b/Gems/Atom/Asset/ImageProcessingAtom/Code/Source/Editor/TexturePresetSelectionWidget.cpp index e50d95b907..cc341c5e31 100644 --- a/Gems/Atom/Asset/ImageProcessingAtom/Code/Source/Editor/TexturePresetSelectionWidget.cpp +++ b/Gems/Atom/Asset/ImageProcessingAtom/Code/Source/Editor/TexturePresetSelectionWidget.cpp @@ -18,6 +18,27 @@ namespace ImageProcessingAtomEditor { using namespace ImageProcessingAtom; + + AZStd::string GetImageFileMask(const AZStd::string& imageFilePath) + { + const char FileMaskDelimiter = '_'; + + //get file name + AZStd::string fileName; + QString lowerFileName = imageFilePath.data(); + lowerFileName = lowerFileName.toLower(); + AzFramework::StringFunc::Path::GetFileName(lowerFileName.toUtf8().constData(), fileName); + + //get the substring from last '_' + size_t lastUnderScore = fileName.find_last_of(FileMaskDelimiter); + if (lastUnderScore != AZStd::string::npos) + { + return fileName.substr(lastUnderScore); + } + + return AZStd::string(); + } + TexturePresetSelectionWidget::TexturePresetSelectionWidget(EditorTextureSetting& textureSetting, QWidget* parent /*= nullptr*/) : QWidget(parent) , m_ui(new Ui::TexturePresetSelectionWidget) @@ -29,33 +50,31 @@ namespace ImageProcessingAtomEditor m_presetList.clear(); auto& presetFilterMap = BuilderSettingManager::Instance()->GetPresetFilterMap(); - AZStd::unordered_set noFilterPresetList; - - // Check if there is any filtered preset list first - for(auto& presetFilter : presetFilterMap) + if (m_listAllPresets) { - if (presetFilter.first.empty()) + m_presetList = BuilderSettingManager::Instance()->GetFullPresetList(); + } + else + { + auto fileMask = GetImageFileMask(m_textureSetting->m_textureName); + auto itr = presetFilterMap.find(fileMask); + if (itr != presetFilterMap.end()) { - noFilterPresetList = presetFilter.second; + m_presetList = itr->second; } - else if (IsMatchingWithFileMask(m_textureSetting->m_textureName, presetFilter.first)) + else { - for(const auto& presetName : presetFilter.second) - { - m_presetList.insert(presetName); - } + m_presetList = BuilderSettingManager::Instance()->GetFullPresetList(); } } - // If no filtered preset list available or should list all presets, use non-filter list - if (m_presetList.size() == 0 || m_listAllPresets) - { - m_presetList = noFilterPresetList; - } + QStringList stringList; foreach (const auto& presetName, m_presetList) { - m_ui->presetComboBox->addItem(QString(presetName.GetCStr())); + stringList.append(QString(presetName.GetCStr())); } + stringList.sort(); + m_ui->presetComboBox->addItems(stringList); // Set current preset const auto& currPreset = m_textureSetting->GetMultiplatformTextureSetting().m_preset; @@ -173,8 +192,9 @@ namespace ImageProcessingAtomEditor AZStd::string conventionText = ""; if (presetSettings) { + auto fileMasks = BuilderSettingManager::Instance()->GetFileMasksForPreset(presetSettings->m_name); int i = 0; - for (const PlatformName& filemask : presetSettings->m_fileMasks) + for (const auto& filemask : fileMasks) { conventionText += i > 0 ? " " + filemask : filemask; i++; diff --git a/Gems/Atom/Asset/ImageProcessingAtom/Code/Source/ImageBuilderComponent.cpp b/Gems/Atom/Asset/ImageProcessingAtom/Code/Source/ImageBuilderComponent.cpp index a489c8da5e..5e021a3fdd 100644 --- a/Gems/Atom/Asset/ImageProcessingAtom/Code/Source/ImageBuilderComponent.cpp +++ b/Gems/Atom/Asset/ImageProcessingAtom/Code/Source/ImageBuilderComponent.cpp @@ -74,7 +74,7 @@ namespace ImageProcessingAtom builderDescriptor.m_busId = azrtti_typeid(); builderDescriptor.m_createJobFunction = AZStd::bind(&ImageBuilderWorker::CreateJobs, &m_imageBuilder, AZStd::placeholders::_1, AZStd::placeholders::_2); builderDescriptor.m_processJobFunction = AZStd::bind(&ImageBuilderWorker::ProcessJob, &m_imageBuilder, AZStd::placeholders::_1, AZStd::placeholders::_2); - builderDescriptor.m_version = 25; // [ATOM-16575] + builderDescriptor.m_version = 27; // [ATOM-16958] builderDescriptor.m_analysisFingerprint = ImageProcessingAtom::BuilderSettingManager::Instance()->GetAnalysisFingerprint(); m_imageBuilder.BusConnect(builderDescriptor.m_busId); AssetBuilderSDK::AssetBuilderBus::Broadcast(&AssetBuilderSDK::AssetBuilderBusTraits::RegisterBuilderInformation, builderDescriptor); @@ -221,6 +221,59 @@ namespace ImageProcessingAtom m_isShuttingDown = true; } + PresetName GetImagePreset(const AZStd::string& imageFileFullPath) + { + // first let preset from asset info + TextureSettings textureSettings; + AZStd::string settingFilePath = imageFileFullPath + TextureSettings::ExtensionName; + TextureSettings::LoadTextureSetting(settingFilePath, textureSettings); + + if (!textureSettings.m_preset.IsEmpty()) + { + return textureSettings.m_preset; + } + + return BuilderSettingManager::Instance()->GetSuggestedPreset(imageFileFullPath); + } + + void HandlePresetDependency(PresetName presetName, AZStd::vector& sourceDependencyList) + { + // Reload preset if it was changed + ImageProcessingAtom::BuilderSettingManager::Instance()->ReloadPreset(presetName); + + AZStd::string_view filePath; + auto presetSettings = BuilderSettingManager::Instance()->GetPreset(presetName, /*default platform*/"", &filePath); + + AssetBuilderSDK::SourceFileDependency sourceFileDependency; + sourceFileDependency.m_sourceDependencyType = AssetBuilderSDK::SourceFileDependency::SourceFileDependencyType::Absolute; + + // Need to watch any possibe preset paths + AZStd::vector possiblePresetPaths = BuilderSettingManager::Instance()->GetPossiblePresetPaths(presetName); + for (const auto& path:possiblePresetPaths) + { + sourceFileDependency.m_sourceFileDependencyPath = path; + sourceDependencyList.push_back(sourceFileDependency); + } + + if (presetSettings) + { + // handle special case here + // Cubemap setting may reference some other presets + if (presetSettings->m_cubemapSetting) + { + if (presetSettings->m_cubemapSetting->m_generateIBLDiffuse && !presetSettings->m_cubemapSetting->m_iblDiffusePreset.IsEmpty()) + { + HandlePresetDependency(presetSettings->m_cubemapSetting->m_iblDiffusePreset, sourceDependencyList); + } + + if (presetSettings->m_cubemapSetting->m_generateIBLSpecular && !presetSettings->m_cubemapSetting->m_iblSpecularPreset.IsEmpty()) + { + HandlePresetDependency(presetSettings->m_cubemapSetting->m_iblSpecularPreset, sourceDependencyList); + } + } + } + } + // this happens early on in the file scanning pass // this function should consistently always create the same jobs, and should do no checking whether the job is up to date or not - just be consistent. void ImageBuilderWorker::CreateJobs(const AssetBuilderSDK::CreateJobsRequest& request, AssetBuilderSDK::CreateJobsResponse& response) @@ -231,6 +284,10 @@ namespace ImageProcessingAtom return; } + // Full path of the image file + AZStd::string fullPath; + AzFramework::StringFunc::Path::Join(request.m_watchFolder.data(), request.m_sourceFile.data(), fullPath, true, true); + // Get the extension of the file AZStd::string ext; AzFramework::StringFunc::Path::GetExtension(request.m_sourceFile.c_str(), ext, false); @@ -242,13 +299,25 @@ namespace ImageProcessingAtom if (ImageProcessingAtom::BuilderSettingManager::Instance()->DoesSupportPlatform(platformInfo.m_identifier)) { AssetBuilderSDK::JobDescriptor descriptor; - descriptor.m_jobKey = ext + " Atom Compile"; + descriptor.m_jobKey = "Image Compile: " + ext; descriptor.SetPlatformIdentifier(platformInfo.m_identifier.c_str()); descriptor.m_critical = false; + descriptor.m_additionalFingerprintInfo = ""; response.m_createJobOutputs.push_back(descriptor); } } + // add source dependency for .assetinfo file + AssetBuilderSDK::SourceFileDependency sourceFileDependency; + sourceFileDependency.m_sourceDependencyType = AssetBuilderSDK::SourceFileDependency::SourceFileDependencyType::Absolute; + sourceFileDependency.m_sourceFileDependencyPath = fullPath + TextureSettings::ExtensionName; + response.m_sourceFileDependencyList.push_back(sourceFileDependency); + + // add source dependencies for .preset files + // Get the preset for this file + auto presetName = GetImagePreset(fullPath.c_str()); + HandlePresetDependency(presetName, response.m_sourceFileDependencyList); + response.m_result = AssetBuilderSDK::CreateJobsResultCode::Success; return; } diff --git a/Gems/Atom/Asset/ImageProcessingAtom/Code/Source/ImageLoader/ImageLoaders.cpp b/Gems/Atom/Asset/ImageProcessingAtom/Code/Source/ImageLoader/ImageLoaders.cpp index e756174810..74517f5b18 100644 --- a/Gems/Atom/Asset/ImageProcessingAtom/Code/Source/ImageLoader/ImageLoaders.cpp +++ b/Gems/Atom/Asset/ImageProcessingAtom/Code/Source/ImageLoader/ImageLoaders.cpp @@ -8,6 +8,7 @@ #include +#include #include // warning C4251: class QT_Type needs to have dll-interface to be used by clients of class 'QT_Type' AZ_PUSH_DISABLE_WARNING(4251, "-Wunknown-warning-option") @@ -26,21 +27,31 @@ namespace ImageProcessingAtom return nullptr; } + IImageObject* loadedImage = nullptr; if (TIFFLoader::IsExtensionSupported(ext.toUtf8())) { - return TIFFLoader::LoadImageFromTIFF(filename); + loadedImage = TIFFLoader::LoadImageFromTIFF(filename); } else if (DdsLoader::IsExtensionSupported(ext.toUtf8())) { - return DdsLoader::LoadImageFromFile(filename); + loadedImage = DdsLoader::LoadImageFromFile(filename); } else if (QtImageLoader::IsExtensionSupported(ext.toUtf8())) { - return QtImageLoader::LoadImageFromFile(filename); + loadedImage = QtImageLoader::LoadImageFromFile(filename); } else if (ExrLoader::IsExtensionSupported(ext.toUtf8())) { - return ExrLoader::LoadImageFromFile(filename); + loadedImage = ExrLoader::LoadImageFromFile(filename); + } + + if (loadedImage) + { + if (IsHDRFormat(loadedImage->GetPixelFormat())) + { + loadedImage->AddImageFlags(EIF_HDR); + } + return loadedImage; } AZ_Warning("ImageProcessing", false, "No proper image loader to load file: %s", filename.c_str()); diff --git a/Gems/Atom/Asset/ImageProcessingAtom/Code/Source/ImageLoader/TIFFLoader.cpp b/Gems/Atom/Asset/ImageProcessingAtom/Code/Source/ImageLoader/TIFFLoader.cpp index 057605a089..9bd6bcbdf3 100644 --- a/Gems/Atom/Asset/ImageProcessingAtom/Code/Source/ImageLoader/TIFFLoader.cpp +++ b/Gems/Atom/Asset/ImageProcessingAtom/Code/Source/ImageLoader/TIFFLoader.cpp @@ -99,11 +99,9 @@ namespace ImageProcessingAtom return pRet; } - const char* pFormatText; if (dwBitsPerChannel == 8) { // R8, GR8, BGR8, BGRA8 - pFormatText = "8-bit"; pRet = Load8BitImageFromTIFF(tif); } else if (dwBitsPerChannel == 16) @@ -111,19 +109,16 @@ namespace ImageProcessingAtom // A/L/R16, R16F, GR16, GR16f, ARGB16, ARGB16f if (dwFormat == SAMPLEFORMAT_IEEEFP) { - pFormatText = "16-bit float"; pRet = Load16BitHDRImageFromTIFF(tif); } else { - pFormatText = "16-bit int"; pRet = Load16BitImageFromTIFF(tif); } } else if (dwBitsPerChannel == 32 && dwFormat == SAMPLEFORMAT_IEEEFP) { // A/L/R32f, GR32f, ARGB32f - pFormatText = "32-bit float"; pRet = Load32BitHDRImageFromTIFF(tif); } else diff --git a/Gems/Atom/Asset/ImageProcessingAtom/Code/Source/Processing/ImageConvert.cpp b/Gems/Atom/Asset/ImageProcessingAtom/Code/Source/Processing/ImageConvert.cpp index 977359e4f6..058daf7ca4 100644 --- a/Gems/Atom/Asset/ImageProcessingAtom/Code/Source/Processing/ImageConvert.cpp +++ b/Gems/Atom/Asset/ImageProcessingAtom/Code/Source/Processing/ImageConvert.cpp @@ -11,6 +11,7 @@ #include #include #include +#include #include #include #include @@ -46,7 +47,6 @@ namespace ImageProcessingAtom enum ConvertStep { StepValidateInput = 0, - StepGenerateColorChart, StepConvertToLinear, StepSwizzle, StepCubemapLayout, @@ -55,9 +55,7 @@ namespace ImageProcessingAtom StepMipmap, StepGlossFromNormal, StepPostNormalize, - StepCreateHighPass, StepConvertOutputColorSpace, - StepAlphaImage, StepConvertPixelFormat, StepSaveToFile, StepAll @@ -66,7 +64,6 @@ namespace ImageProcessingAtom [[maybe_unused]] const char ProcessStepNames[StepAll][64] = { "ValidateInput", - "GenerateColorChart", "ConvertToLinear", "Swizzle", "CubemapLayout", @@ -75,9 +72,7 @@ namespace ImageProcessingAtom "Mipmap", "GlossFromNormal", "PostNormalize", - "CreateHighPass", "ConvertOutputColorSpace", - "AlphaImage", "ConvertPixelFormat", "SaveToFile", }; @@ -94,11 +89,6 @@ namespace ImageProcessingAtom return nullptr; } - IImageObjectPtr ImageConvertProcess::GetOutputAlphaImage() - { - return m_alphaImage; - } - IImageObjectPtr ImageConvertProcess::GetOutputIBLSpecularCubemap() { return m_iblSpecularCubemapImage; @@ -180,59 +170,38 @@ namespace ImageProcessingAtom m_image = new ImageToProcess(IImageObjectPtr(m_input->m_inputImage->Clone(mipsToClone))); } - break; - case StepGenerateIBL: - if (IsConvertToCubemap()) - { - // check and generate IBL specular and diffuse, if necessary - AZStd::unique_ptr& cubemapSettings = m_input->m_presetSetting.m_cubemapSetting; - if (cubemapSettings->m_generateIBLSpecular && !cubemapSettings->m_iblSpecularPreset.IsEmpty()) - { - CreateIBLCubemap(cubemapSettings->m_iblSpecularPreset, SpecularCubemapSuffix, m_iblSpecularCubemapImage); - } - - if (cubemapSettings->m_generateIBLDiffuse && !cubemapSettings->m_iblDiffusePreset.IsEmpty()) - { - CreateIBLCubemap(cubemapSettings->m_iblDiffusePreset, DiffuseCubemapSuffix, m_iblDiffuseCubemapImage); - } - } - - if (m_input->m_presetSetting.m_generateIBLOnly) - { - // this preset doesn't output an image of its own, just the IBL cubemaps - m_isSucceed = true; - m_isFinished = true; - } - break; - case StepGenerateColorChart: - // GenerateColorChart. - if (m_input->m_presetSetting.m_isColorChart) - { - // Convert to uncompressed format if it's compressed format. For example, loaded from DDS file. - if (!CPixelFormats::GetInstance().IsPixelFormatUncompressed(m_image->Get()->GetPixelFormat())) - { - m_image->ConvertFormat(ePixelFormat_R32G32B32A32F); - } - - m_image->CreateColorChart(); - } break; case StepConvertToLinear: // convert to linear space and the output image pixel format should be rgba32f ConvertToLinear(); break; case StepSwizzle: - // convert texture format. - if (m_input->m_presetSetting.m_swizzle.size() >= 4) { - m_image->Get()->Swizzle(m_input->m_presetSetting.m_swizzle.substr(0, 4).c_str()); - m_alphaContent = m_image->Get()->GetAlphaContent(); - } + // swizzle if swizzle was set or decard alpha + bool swizzleWasSet = m_input->m_presetSetting.m_swizzle.size() >= 4; + if (swizzleWasSet || m_input->m_presetSetting.m_discardAlpha) + { + AZStd::string swizzle = "rgba"; + if (swizzleWasSet) + { + swizzle = m_input->m_presetSetting.m_swizzle.substr(0, 4); + } - // convert gloss map (alhpa channel) from legacy distribution to new one - if (m_input->m_presetSetting.m_isLegacyGloss) - { - m_image->Get()->ConvertLegacyGloss(); + if (m_input->m_presetSetting.m_discardAlpha) + { + swizzle[3] = '1'; + } + + m_image->Get()->Swizzle(swizzle.c_str()); + if (m_input->m_presetSetting.m_discardAlpha) + { + m_alphaContent = EAlphaContent::eAlphaContent_Absent; + } + else + { + m_alphaContent = m_image->Get()->GetAlphaContent(); + } + } } break; case StepCubemapLayout: @@ -254,13 +223,53 @@ namespace ImageProcessingAtom m_image->Get()->NormalizeVectors(0, 1); } break; + case StepGenerateIBL: + if (IsConvertToCubemap()) + { + // check and generate IBL specular and diffuse, if necessary + AZStd::unique_ptr& cubemapSettings = m_input->m_presetSetting.m_cubemapSetting; + if (cubemapSettings->m_generateIBLSpecular && !cubemapSettings->m_iblSpecularPreset.IsEmpty()) + { + bool success = CreateIBLCubemap(cubemapSettings->m_iblSpecularPreset, SpecularCubemapSuffix, m_iblSpecularCubemapImage); + if (!success) + { + m_isSucceed = false; + m_isFinished = true; + break; + } + } + + if (cubemapSettings->m_generateIBLDiffuse && !cubemapSettings->m_iblDiffusePreset.IsEmpty()) + { + bool success = CreateIBLCubemap(cubemapSettings->m_iblDiffusePreset, DiffuseCubemapSuffix, m_iblDiffuseCubemapImage); + if (!success) + { + m_isSucceed = false; + m_isFinished = true; + break; + } + } + } + + if (m_input->m_presetSetting.m_generateIBLOnly) + { + // this preset doesn't output an image of its own, just the IBL cubemaps + m_isSucceed = true; + m_isFinished = true; + } + break; case StepMipmap: // generate mipmaps if (IsConvertToCubemap()) { if (m_input->m_presetSetting.m_cubemapSetting->m_requiresConvolve) { - FillCubemapMipmaps(); + bool success = FillCubemapMipmaps(); + if (!success) + { + m_isSucceed = false; + m_isFinished = true; + } } } else @@ -277,9 +286,7 @@ namespace ImageProcessingAtom // get gloss from normal for all mipmaps and save to alpha channel if (m_input->m_presetSetting.m_glossFromNormals) { - bool hasAlpha = (m_alphaContent == EAlphaContent::eAlphaContent_OnlyBlack - || m_alphaContent == EAlphaContent::eAlphaContent_OnlyBlackAndWhite - || m_alphaContent == EAlphaContent::eAlphaContent_Greyscale); + bool hasAlpha = Utils::NeedAlphaChannel(m_alphaContent); m_image->Get()->GlossFromNormals(hasAlpha); // set alpha content so it won't be ignored later. @@ -304,20 +311,10 @@ namespace ImageProcessingAtom m_image->Get()->AddImageFlags(EIF_RenormalizedTexture); } break; - case StepCreateHighPass: - if (m_input->m_presetSetting.m_highPassMip > 0) - { - m_image->CreateHighPass(m_input->m_presetSetting.m_highPassMip); - } - break; case StepConvertOutputColorSpace: // convert image from linear space to desired output color space ConvertToOuputColorSpace(); break; - case StepAlphaImage: - // save alpha channel to separate image if it's needed - CreateAlphaImage(); - break; case StepConvertPixelFormat: // convert pixel format ConvertPixelformat(); @@ -366,7 +363,11 @@ namespace ImageProcessingAtom } else { - AZ_TracePrintf("Image Processing", "Image converted with preset [%s] [%s] and saved to [%s] (%d bytes) taking %f seconds\n", + + [[maybe_unused]] const PixelFormatInfo* formatInfo = CPixelFormats::GetInstance().GetPixelFormatInfo(m_image->Get()->GetPixelFormat()); + AZ_TracePrintf("Image Processing", "Image [%dx%d] [%s] converted with preset [%s] [%s] and saved to [%s] (%d bytes) taking %f seconds\n", + m_image->Get()->GetWidth(0), m_image->Get()->GetHeight(0), + formatInfo->szName, m_input->m_presetSetting.m_name.GetCStr(), m_input->m_filePath.c_str(), m_input->m_outputFolder.c_str(), sizeTotal, m_processTime); @@ -411,12 +412,6 @@ namespace ImageProcessingAtom return; } - // don't do any reduce for color chart - if (presetSettings->m_isColorChart) - { - return; - } - // get suitable size for dest pixel format CPixelFormats::GetInstance().GetSuitableImageSize(presetSettings->m_pixelFormat, inputWidth, inputHeight, outWidth, outHeight); @@ -446,6 +441,17 @@ namespace ImageProcessingAtom outHeight >>= 1; outReduce++; } + + // resize to min texture size if it's smaller + if (outWidth < presetSettings->m_minTextureSize) + { + outWidth = presetSettings->m_minTextureSize; + } + + if (outHeight < presetSettings->m_minTextureSize) + { + outHeight = presetSettings->m_minTextureSize; + } } bool ImageConvertProcess::ConvertToLinear() @@ -510,52 +516,6 @@ namespace ImageProcessingAtom return true; } - void ImageConvertProcess::CreateAlphaImage() - { - // if alpha content doesn't have alpha or we need to discard alpha, skip - // we won't create alpha image for cubemap too - if (m_alphaContent == EAlphaContent::eAlphaContent_Absent - || m_alphaContent == EAlphaContent::eAlphaContent_OnlyWhite - || m_input->m_presetSetting.m_discardAlpha || IsConvertToCubemap()) - { - return; - } - - // if dest format could save alpha, skip too - if (!CPixelFormats::GetInstance().IsPixelFormatWithoutAlpha(m_input->m_presetSetting.m_pixelFormat)) - { - return; - } - - // now create alpha image - ImageToProcess alphaImage(m_image->Get()); - alphaImage.ConvertFormat(ePixelFormat_A8); - - // validate pixelformatalpha - if (CPixelFormats::GetInstance().IsFormatSingleChannel(m_input->m_presetSetting.m_pixelFormatAlpha)) - { - alphaImage.ConvertFormat(m_input->m_presetSetting.m_pixelFormatAlpha); - } - else - { - //For ASTC compression we need to clear out the alpha to get accurate rgb compression. - if (IsASTCFormat(m_input->m_presetSetting.m_pixelFormat)) - { - alphaImage.ConvertFormat(ePixelFormat_R8G8B8X8); - alphaImage.ConvertFormat(m_input->m_presetSetting.m_pixelFormatAlpha); - } - else - { - AZ_Assert(false, "PixelFormatAlpha only supports single channel pixel formats or ASTC formats"); - } - } - - // get final result and save it to member variable for later use - m_alphaImage = alphaImage.Get(); - - m_image->Get()->AddImageFlags(EIF_AttachedAlpha); - } - // pixel format conversion bool ImageConvertProcess::ConvertPixelformat() { @@ -575,12 +535,6 @@ namespace ImageProcessingAtom m_image->GetCompressOption().rgbWeight = m_input->m_presetSetting.GetColorWeight(); m_image->GetCompressOption().discardAlpha = m_input->m_presetSetting.m_discardAlpha; - //For ASTC compression we need to clear out the alpha to get accurate rgb compression. - if(m_alphaImage && IsASTCFormat(m_input->m_presetSetting.m_pixelFormat)) - { - m_image->GetCompressOption().discardAlpha = true; - } - m_image->ConvertFormat(m_input->m_presetSetting.m_pixelFormat); return true; @@ -724,7 +678,7 @@ namespace ImageProcessingAtom } else if (!CPixelFormats::GetInstance().IsImageSizeValid(dstFmt, dwWidth, dwHeight, false)) { - AZ_Warning("Image Processing", false, "Image size will be scaled for pixel format %s", CPixelFormats::GetInstance().GetPixelFormatInfo(dstFmt)->szName); + AZ_TracePrintf("Image processing", "Image size will be scaled for pixel format %s\n", CPixelFormats::GetInstance().GetPixelFormatInfo(dstFmt)->szName); } #if defined(AZ_TOOLS_EXPAND_FOR_RESTRICTED_PLATFORMS) @@ -762,7 +716,6 @@ namespace ImageProcessingAtom if (ImageProcess##PrivateName::DoesSupport(m_input->m_platform)) \ { \ ImageProcess##PrivateName::PrepareImageForExport(m_image->Get()); \ - ImageProcess##PrivateName::PrepareImageForExport(m_alphaImage); \ } AZ_TOOLS_EXPAND_FOR_RESTRICTED_PLATFORMS #undef AZ_RESTRICTED_PLATFORM_EXPANSION @@ -836,7 +789,7 @@ namespace ImageProcessingAtom // in very rare user case, an old texture setting file may not have a preset. We fix it over here too. if (textureSettings.m_preset.IsEmpty()) { - textureSettings.m_preset = BuilderSettingManager::Instance()->GetSuggestedPreset(imageFilePath, srcImage); + textureSettings.m_preset = BuilderSettingManager::Instance()->GetSuggestedPreset(imageFilePath); } // Get preset @@ -873,7 +826,7 @@ namespace ImageProcessingAtom return process; } - void ImageConvertProcess::CreateIBLCubemap(PresetName preset, const char* fileNameSuffix, IImageObjectPtr& cubemapImage) + bool ImageConvertProcess::CreateIBLCubemap(PresetName preset, const char* fileNameSuffix, IImageObjectPtr& cubemapImage) { const AZStd::string& platformId = m_input->m_platform; AZStd::string_view filePath; @@ -881,7 +834,7 @@ namespace ImageProcessingAtom if (presetSettings == nullptr) { AZ_Error("Image Processing", false, "Couldn't find preset for IBL cubemap generation"); - return; + return false; } // generate export file name @@ -916,14 +869,14 @@ namespace ImageProcessingAtom if (!imageConvertProcess) { AZ_Error("Image Processing", false, "Failed to create image convert process for the IBL cubemap"); - return; + return false; } imageConvertProcess->ProcessAll(); if (!imageConvertProcess->IsSucceed()) { AZ_Error("Image Processing", false, "Image convert process for the IBL cubemap failed"); - return; + return false; } // append the output products to the job's product list @@ -931,6 +884,7 @@ namespace ImageProcessingAtom // store the output cubemap so it can be accessed by unit tests cubemapImage = imageConvertProcess->m_image->Get(); + return true; } bool ConvertImageFile(const AZStd::string& imageFilePath, const AZStd::string& exportDir, @@ -951,68 +905,6 @@ namespace ImageProcessingAtom return result; } - IImageObjectPtr MergeOutputImageForPreview(IImageObjectPtr image, IImageObjectPtr alphaImage) - { - if (!image) - { - return IImageObjectPtr(); - } - - ImageToProcess imageToProcess(image); - imageToProcess.ConvertFormat(ePixelFormat_R8G8B8A8); - IImageObjectPtr previewImage = imageToProcess.Get(); - - // If there is separate Alpha image, combine it with output - if (alphaImage) - { - // Create pixel operation function for rgb and alpha images - IPixelOperationPtr imageOp = CreatePixelOperation(ePixelFormat_R8G8B8A8); - IPixelOperationPtr alphaOp = CreatePixelOperation(ePixelFormat_A8); - - // Convert the alpha image to A8 first - ImageToProcess imageToProcess2(alphaImage); - imageToProcess2.ConvertFormat(ePixelFormat_A8); - IImageObjectPtr previewImageAlpha = imageToProcess2.Get(); - - const uint32 imageMips = previewImage->GetMipCount(); - [[maybe_unused]] const uint32 alphaMips = previewImageAlpha->GetMipCount(); - - // Get count of bytes per pixel for both rgb and alpha images - uint32 imagePixelBytes = CPixelFormats::GetInstance().GetPixelFormatInfo(ePixelFormat_R8G8B8A8)->bitsPerBlock / 8; - uint32 alphaPixelBytes = CPixelFormats::GetInstance().GetPixelFormatInfo(ePixelFormat_A8)->bitsPerBlock / 8; - - AZ_Assert(imageMips <= alphaMips, "Mip level of alpha image is less than origin image!"); - - // For each mip level, set the alpha value to the image - for (uint32 mipLevel = 0; mipLevel < imageMips; ++mipLevel) - { - const uint32 pixelCount = previewImage->GetPixelCount(mipLevel); - [[maybe_unused]] const uint32 alphaPixelCount = previewImageAlpha->GetPixelCount(mipLevel); - - AZ_Assert(pixelCount == alphaPixelCount, "Pixel count for image and alpha image at mip level %d is not equal!", mipLevel); - - uint8* imageBuf; - uint32 pitch; - previewImage->GetImagePointer(mipLevel, imageBuf, pitch); - - uint8* alphaBuf; - uint32 alphaPitch; - previewImageAlpha->GetImagePointer(mipLevel, alphaBuf, alphaPitch); - - float rAlpha, gAlpha, bAlpha, aAlpha, rImage, gImage, bImage, aImage; - - for (uint32 i = 0; i < pixelCount; ++i, imageBuf += imagePixelBytes, alphaBuf += alphaPixelBytes) - { - alphaOp->GetRGBA(alphaBuf, rAlpha, gAlpha, bAlpha, aAlpha); - imageOp->GetRGBA(imageBuf, rImage, gImage, bImage, aImage); - imageOp->SetRGBA(imageBuf, rImage, gImage, bImage, aAlpha); - } - } - } - - return previewImage; - } - IImageObjectPtr ConvertImageForPreview(IImageObjectPtr image) { if (!image) diff --git a/Gems/Atom/Asset/ImageProcessingAtom/Code/Source/Processing/ImageConvert.h b/Gems/Atom/Asset/ImageProcessingAtom/Code/Source/Processing/ImageConvert.h index eaf05c3280..ba3d21191f 100644 --- a/Gems/Atom/Asset/ImageProcessingAtom/Code/Source/Processing/ImageConvert.h +++ b/Gems/Atom/Asset/ImageProcessingAtom/Code/Source/Processing/ImageConvert.h @@ -51,9 +51,6 @@ namespace ImageProcessingAtom //Converts the image to a RGBA8 format that can be displayed in a preview UI. IImageObjectPtr ConvertImageForPreview(IImageObjectPtr image); - //Combine image with alpha image if any and output as RGBA8 - IImageObjectPtr MergeOutputImageForPreview(IImageObjectPtr image, IImageObjectPtr alphaImage); - //get output image size and mip count based on the texture setting and preset setting //other helper functions @@ -115,7 +112,6 @@ namespace ImageProcessingAtom //get output images IImageObjectPtr GetOutputImage(); - IImageObjectPtr GetOutputAlphaImage(); IImageObjectPtr GetOutputIBLSpecularCubemap(); IImageObjectPtr GetOutputIBLDiffuseCubemap(); @@ -131,8 +127,6 @@ namespace ImageProcessingAtom //for alpha //to indicate the current alpha channel content EAlphaContent m_alphaContent; - //An image object to hold alpha channel in a separate image - IImageObjectPtr m_alphaImage; //output results of IBL cubemap generation, used in unit tests IImageObjectPtr m_iblSpecularCubemapImage; @@ -163,7 +157,7 @@ namespace ImageProcessingAtom bool FillCubemapMipmaps(); //IBL cubemap generation, this creates a separate ImageConvertProcess - void CreateIBLCubemap(PresetName preset, const char* fileNameSuffix, IImageObjectPtr& cubemapImage); + bool CreateIBLCubemap(PresetName preset, const char* fileNameSuffix, IImageObjectPtr& cubemapImage); //convert color space to linear with pixel format rgba32f bool ConvertToLinear(); @@ -171,9 +165,6 @@ namespace ImageProcessingAtom //convert to output color space before compression bool ConvertToOuputColorSpace(); - //create alpha image if it's needed - void CreateAlphaImage(); - //pixel format convertion/compression bool ConvertPixelformat(); diff --git a/Gems/Atom/Asset/ImageProcessingAtom/Code/Source/Processing/ImageConvertJob.cpp b/Gems/Atom/Asset/ImageProcessingAtom/Code/Source/Processing/ImageConvertJob.cpp index 1465e7993f..d81685f0c6 100644 --- a/Gems/Atom/Asset/ImageProcessingAtom/Code/Source/Processing/ImageConvertJob.cpp +++ b/Gems/Atom/Asset/ImageProcessingAtom/Code/Source/Processing/ImageConvertJob.cpp @@ -16,28 +16,14 @@ namespace ImageProcessingAtom { - IImageObjectPtr ImageConvertOutput::GetOutputImage(OutputImageType type) const + IImageObjectPtr ImageConvertOutput::GetOutputImage() const { - if (type < OutputImageType::Count) - { - return m_outputImage[static_cast(type)]; - } - else - { - return IImageObjectPtr(); - } + return m_outputImage; } - void ImageConvertOutput::SetOutputImage(IImageObjectPtr image, OutputImageType type) + void ImageConvertOutput::SetOutputImage(IImageObjectPtr image) { - if (type < OutputImageType::Count) - { - m_outputImage[static_cast(type)] = image; - } - else - { - AZ_Error("ImageProcess", false, "Cannot set output image to %d", type); - } + m_outputImage = image; } void ImageConvertOutput::SetReady(bool ready) @@ -62,10 +48,7 @@ namespace ImageProcessingAtom void ImageConvertOutput::Reset() { - for (int i = 0; i < static_cast(OutputImageType::Count); i++) - { - m_outputImage[i] = nullptr; - } + m_outputImage = nullptr; m_outputReady = false; m_progress = 0.0f; } @@ -108,17 +91,13 @@ namespace ImageProcessingAtom } IImageObjectPtr outputImage = m_process->GetOutputImage(); - IImageObjectPtr outputImageAlpha = m_process->GetOutputAlphaImage(); - - m_output->SetOutputImage(outputImage, ImageConvertOutput::Base); - m_output->SetOutputImage(outputImageAlpha, ImageConvertOutput::Alpha); if (!IsJobCancelled()) { - // For preview, combine image output with alpha if any + // convert the output image to RGBA format for preview m_output->SetProgress(1.0f / static_cast(m_previewProcessStep)); - IImageObjectPtr combinedImage = MergeOutputImageForPreview(outputImage, outputImageAlpha); - m_output->SetOutputImage(combinedImage, ImageConvertOutput::Preview); + IImageObjectPtr uncompressedImage = ConvertImageForPreview(outputImage); + m_output->SetOutputImage(uncompressedImage); } m_output->SetReady(true); diff --git a/Gems/Atom/Asset/ImageProcessingAtom/Code/Source/Processing/ImageConvertJob.h b/Gems/Atom/Asset/ImageProcessingAtom/Code/Source/Processing/ImageConvertJob.h index 9baa5dd1b4..ac15d47806 100644 --- a/Gems/Atom/Asset/ImageProcessingAtom/Code/Source/Processing/ImageConvertJob.h +++ b/Gems/Atom/Asset/ImageProcessingAtom/Code/Source/Processing/ImageConvertJob.h @@ -21,16 +21,8 @@ namespace ImageProcessingAtom class ImageConvertOutput { public: - enum OutputImageType - { - Base = 0, // Might contains alpha or not - Alpha, // Separate alpha image - Preview, // Combine base image with alpha if any, format RGBA8 - Count - }; - - IImageObjectPtr GetOutputImage(OutputImageType type) const; - void SetOutputImage(IImageObjectPtr image, OutputImageType type); + IImageObjectPtr GetOutputImage() const; + void SetOutputImage(IImageObjectPtr image); void SetReady(bool ready); bool IsReady() const; float GetProgress() const; @@ -38,7 +30,7 @@ namespace ImageProcessingAtom void Reset(); private: - IImageObjectPtr m_outputImage[OutputImageType::Count]; + IImageObjectPtr m_outputImage; bool m_outputReady = false; float m_progress = 0.0f; }; diff --git a/Gems/Atom/Asset/ImageProcessingAtom/Code/Source/Processing/ImageFlags.h b/Gems/Atom/Asset/ImageProcessingAtom/Code/Source/Processing/ImageFlags.h index 99e752c90a..cefd315448 100644 --- a/Gems/Atom/Asset/ImageProcessingAtom/Code/Source/Processing/ImageFlags.h +++ b/Gems/Atom/Asset/ImageProcessingAtom/Code/Source/Processing/ImageFlags.h @@ -19,8 +19,8 @@ namespace ImageProcessingAtom const static AZ::u32 EIF_Decal = 0x4; // this is usually set through the preset const static AZ::u32 EIF_Greyscale = 0x8; // hint for the engine (e.g. greyscale light beams can be applied to shadow mask), can be for DXT1 because compression artfacts don't count as color const static AZ::u32 EIF_SupressEngineReduce = 0x10; // info for the engine: don't reduce texture resolution on this texture - const static AZ::u32 EIF_UNUSED_BIT = 0x40; // Free to use - const static AZ::u32 EIF_AttachedAlpha = 0x400; // info for the engine: it's a texture with attached alpha channel + const static AZ::u32 EIF_HDR = 0x40; // the image contains HDR data + const static AZ::u32 EIF_AttachedAlpha = 0x400; // deprecated: info for the engine: it's a texture with attached alpha channel const static AZ::u32 EIF_SRGBRead = 0x800; // info for the engine: if gamma corrected rendering is on, this texture requires SRGBRead (it's not stored in linear) const static AZ::u32 EIF_DontResize = 0x8000; // info for the engine: for dds textures that shouldn't be resized const static AZ::u32 EIF_RenormalizedTexture = 0x10000; // info for the engine: for dds textures that have renormalized color range diff --git a/Gems/Atom/Asset/ImageProcessingAtom/Code/Source/Processing/ImageObjectImpl.cpp b/Gems/Atom/Asset/ImageProcessingAtom/Code/Source/Processing/ImageObjectImpl.cpp index 8504f5e074..758df462ec 100644 --- a/Gems/Atom/Asset/ImageProcessingAtom/Code/Source/Processing/ImageObjectImpl.cpp +++ b/Gems/Atom/Asset/ImageProcessingAtom/Code/Source/Processing/ImageObjectImpl.cpp @@ -183,10 +183,9 @@ namespace ImageProcessingAtom return EAlphaContent::eAlphaContent_Absent; } - //if it's compressed format, return indeterminate. if user really want to know the content, they may convert the format to ARGB8 first if (!CPixelFormats::GetInstance().IsPixelFormatUncompressed(m_pixelFormat)) { - AZ_Assert(false, "the function only works right with uncompressed formats. convert to uncompressed format if you get accurate result"); + AZ_TracePrintf("Image processing", "GetAlphaContent() was called for compressed format\n"); return EAlphaContent::eAlphaContent_Indeterminate; } @@ -316,130 +315,6 @@ namespace ImageProcessingAtom m_mips.clear(); } - //note: there are some unreasonable parts of the save files formats for cry textures. We might need to rethink about - // it for new renderer - bool CImageObject::SaveImage(const char* filename, IImageObjectPtr alphaImage, AZStd::vector& outFilePaths) const - { - AZ::IO::SystemFile file; - file.Open(filename, AZ::IO::SystemFile::SF_OPEN_CREATE | AZ::IO::SystemFile::SF_OPEN_CREATE_PATH | AZ::IO::SystemFile::SF_OPEN_WRITE_ONLY); - - AZ::IO::SystemFileStream fileSaveStream(&file, true); - if (!fileSaveStream.IsOpen()) - { - AZ_Warning("Image Processing", false, "%s: failed to create file %s", __FUNCTION__, filename); - return false; - } - - if (alphaImage) - { - AZ_Assert(HasImageFlags(EIF_AttachedAlpha), "attached alpha image flag wasn't set"); - AZ_Assert(!alphaImage->HasImageFlags(EIF_AttachedAlpha), "alpha image shouldn't have attached alpha image flag"); - - // inherit cubemap and decal image flags to attached alpha image - alphaImage->AddImageFlags(GetImageFlags() & (EIF_Cubemap - | EIF_Decal | EIF_Splitted)); - alphaImage->SetNumPersistentMips(m_numPersistentMips); - } - - bool bOk = SaveImage(fileSaveStream); - bool hasSplitFlag = HasImageFlags(EIF_Splitted); - - //append alpha image data in the end if there is no split - if (bOk && alphaImage && !hasSplitFlag) - { - //4 bytes extension tag, 4 bytes attached alpha tag, then 4 bytes of chunk size - fileSaveStream.Write(sizeof(FOURCC_CExt), &FOURCC_CExt); // marker for the start of O3DE Extended data - fileSaveStream.Write(sizeof(FOURCC_AttC), &FOURCC_AttC); // Attached Channel chunk - - uint32_t size = 0; - uint32_t sizeBytes = sizeof(size); - fileSaveStream.Write(sizeBytes, &size); //size of attached chunk - - //save alpha image and get the size - AZ::IO::SizeType startPos = fileSaveStream.GetCurPos(); - bOk = alphaImage->SaveImage(fileSaveStream); - AZ::IO::SizeType endPos = fileSaveStream.GetCurPos(); - size = static_cast(endPos - startPos); - - //move back to beginning of chunk and write chunk size then move back to end - fileSaveStream.Seek(startPos - sizeBytes, AZ::IO::GenericStream::ST_SEEK_BEGIN); - fileSaveStream.Write(sizeBytes, &size); - fileSaveStream.Seek(endPos, AZ::IO::GenericStream::ST_SEEK_BEGIN); - - // marker for the end of O3DE Extended data - fileSaveStream.Write(sizeof(FOURCC_CEnd), &FOURCC_CEnd); - } - - if (!bOk) - { - AZ::IO::SystemFile::Delete(filename); - return false; - } - - // It's important to maintain the product output sequence. Asset Database/Browser will use the first product to determine the source type! - outFilePaths.push_back(filename); - - // save stand alone products - if (hasSplitFlag) - { - // alpha - if (alphaImage) - { - AZStd::string alphaFile = AZStd::string::format("%s.a", filename); - - AZ::IO::SystemFile outAlphaFile; - outAlphaFile.Open(alphaFile.c_str(), AZ::IO::SystemFile::SF_OPEN_CREATE | AZ::IO::SystemFile::SF_OPEN_CREATE_PATH | AZ::IO::SystemFile::SF_OPEN_WRITE_ONLY); - - AZ::IO::SystemFileStream alphaFileSaveStream(&outAlphaFile, true); - - if (alphaFileSaveStream.IsOpen()) - { - alphaImage->SaveImage(alphaFileSaveStream); - outFilePaths.push_back(alphaFile); - } - else - { - AZ_Warning("Image Processing", false, "%s: failed to create file %s", __FUNCTION__, alphaFile.c_str()); - } - } - - // mips - AZ::u32 numStreamable = GetMipCount() - m_numPersistentMips; - for (AZ::u32 mip = 0; mip < numStreamable; mip++) - { - AZ::u32 nameIdx = numStreamable - mip; - AZStd::string mipFileName = AZStd::string::format("%s.%d", filename, nameIdx); - SaveMipToFile(mip, mipFileName); - outFilePaths.push_back(mipFileName); - if (alphaImage) - { - AZStd::string mipAlphaFileName = mipFileName + "a"; - alphaImage->SaveMipToFile(mip, mipAlphaFileName); - outFilePaths.push_back(mipAlphaFileName); - } - } - } - - return bOk; - } - - bool CImageObject::SaveMipToFile(AZ::u32 mip, const AZStd::string& filename) const - { - AZ::IO::SystemFile saveFile; - saveFile.Open(filename.c_str(), AZ::IO::SystemFile::SF_OPEN_CREATE | AZ::IO::SystemFile::SF_OPEN_CREATE_PATH | AZ::IO::SystemFile::SF_OPEN_WRITE_ONLY); - - AZ::IO::SystemFileStream saveFileStream(&saveFile, true); - - if (!saveFileStream.IsOpen()) - { - AZ_Warning("Image Processing", false, "%s: failed to create file %s", __FUNCTION__, filename.c_str()); - return false; - } - - saveFileStream.Write(GetMipBufSize(mip), m_mips[mip]->m_pData); - return true; - } - float CImageObject::CalculateAverageBrightness() const { //if it's compressed format, return a default value @@ -642,63 +517,6 @@ namespace ImageProcessingAtom return true; } - bool CImageObject::SaveImage(AZ::IO::SystemFileStream& saveFileStream) const - { - DDS_FILE_DESC_LEGACY desc; - DDS_HEADER_DXT10 exthead; - - desc.dwMagic = FOURCC_DDS; - - if (!BuildSurfaceHeader(desc.header)) - { - return false; - } - - if (desc.header.IsDX10Ext() && !BuildSurfaceExtendedHeader(exthead)) - { - return false; - } - - saveFileStream.Write(sizeof(desc), &desc); - - if (desc.header.IsDX10Ext()) - { - saveFileStream.Write(sizeof(exthead), &exthead); - } - - AZ::u32 faces = 1; - - //for cubemap. export each face and its mipmap - if (HasImageFlags(EIF_Cubemap)) - { - faces = 6; - } - - AZ::u32 mipStart = 0; - if (HasImageFlags(EIF_Splitted)) - { - if (m_numPersistentMips < m_mips.size()) - { - mipStart = (AZ::u32)m_mips.size() - m_numPersistentMips; - } - else - { - AZ_Assert(false, "numPersistentMips wasn't setup correctly"); - } - } - - for (AZ::u32 face = 0; face < faces; face++) - { - for (AZ::u32 mip = mipStart; mip < m_mips.size(); ++mip) - { - const MipLevel& level = *m_mips[mip]; - AZ::u32 faceBufSize = level.m_pitch * level.m_rowCount / faces; - saveFileStream.Write(faceBufSize, level.m_pData + faceBufSize * face); - } - } - return true; - } - void CImageObject::GetExtent(AZ::u32& width, AZ::u32& height, AZ::u32& mipCount) const { mipCount = (AZ::u32)m_mips.size(); @@ -953,35 +771,4 @@ namespace ImageProcessingAtom } } } - - void CImageObject::ConvertLegacyGloss() - { - if (!(CPixelFormats::GetInstance().IsPixelFormatUncompressed(m_pixelFormat))) - { - AZ_Assert(false, "%s function only works with uncompressed pixel format", __FUNCTION__); - return; - } - - //create pixel operation function - IPixelOperationPtr pixelOp = CreatePixelOperation(m_pixelFormat); - - //get count of bytes per pixel - AZ::u32 pixelBytes = CPixelFormats::GetInstance().GetPixelFormatInfo(m_pixelFormat)->bitsPerBlock / 8; - - const AZ::u32 mips = (AZ::u32)m_mips.size(); - float color[4]; - for (AZ::u32 mip = 0; mip < mips; ++mip) - { - AZ::u8* pixelBuf = m_mips[mip]->m_pData; - const AZ::u32 pixelCount = GetPixelCount(mip); - - for (AZ::u32 i = 0; i < pixelCount; ++i, pixelBuf += pixelBytes) - { - pixelOp->GetRGBA(pixelBuf, color[0], color[1], color[2], color[3]); - // Convert from (1 - s * 0.7)^6 to (1 - s)^2 - color[3] = 1 - pow(1.0f - color[3] * 0.7f, 3.0f); - pixelOp->SetRGBA(pixelBuf, color[0], color[1], color[2], color[3]); - } - } - } } // namespace ImageProcessingAtom diff --git a/Gems/Atom/Asset/ImageProcessingAtom/Code/Source/Processing/ImageObjectImpl.h b/Gems/Atom/Asset/ImageProcessingAtom/Code/Source/Processing/ImageObjectImpl.h index c8b8ced496..7fa02f464e 100644 --- a/Gems/Atom/Asset/ImageProcessingAtom/Code/Source/Processing/ImageObjectImpl.h +++ b/Gems/Atom/Asset/ImageProcessingAtom/Code/Source/Processing/ImageObjectImpl.h @@ -57,10 +57,6 @@ namespace ImageProcessingAtom bool CompareImage(const IImageObjectPtr otherImage) const override; - bool SaveImage(const char* filename, IImageObjectPtr alphaImage, AZStd::vector& outFilePaths) const override; - bool SaveImage(AZ::IO::SystemFileStream& out) const override; - bool SaveMipToFile(AZ::u32 mip, const AZStd::string& filename) const override; - uint32_t GetTextureMemory() const override; EAlphaContent GetAlphaContent() const override; @@ -79,7 +75,6 @@ namespace ImageProcessingAtom void SetNumPersistentMips(AZ::u32 nMips) override; void GlossFromNormals(bool hasAuthoredGloss) override; - void ConvertLegacyGloss() override; void ClearColor(float r, float g, float b, float a) override; //end virtual functions from IImageObject diff --git a/Gems/Atom/Asset/ImageProcessingAtom/Code/Source/Processing/ImagePreview.cpp b/Gems/Atom/Asset/ImageProcessingAtom/Code/Source/Processing/ImagePreview.cpp index f51741eba9..ff7fa911d7 100644 --- a/Gems/Atom/Asset/ImageProcessingAtom/Code/Source/Processing/ImagePreview.cpp +++ b/Gems/Atom/Asset/ImageProcessingAtom/Code/Source/Processing/ImagePreview.cpp @@ -86,7 +86,7 @@ namespace ImageProcessingAtom IImageObjectPtr ImagePreview::GetOutputImage() { - return m_output.GetOutputImage(ImageConvertOutput::Preview); + return m_output.GetOutputImage(); } ImagePreview::~ImagePreview() @@ -101,6 +101,8 @@ namespace ImageProcessingAtom void ImagePreview::InitializeJobSettings() { AZ::JobManagerDesc desc; + desc.m_jobManagerName = "ImagePreview"; + AZ::JobManagerThreadDesc threadDesc; desc.m_workerThreads.push_back(threadDesc); // Check to ensure these have not already been initialized. diff --git a/Gems/Atom/Asset/ImageProcessingAtom/Code/Source/Processing/ImageToProcess.h b/Gems/Atom/Asset/ImageProcessingAtom/Code/Source/Processing/ImageToProcess.h index e6fe6ce142..ed0b21b56c 100644 --- a/Gems/Atom/Asset/ImageProcessingAtom/Code/Source/Processing/ImageToProcess.h +++ b/Gems/Atom/Asset/ImageProcessingAtom/Code/Source/Processing/ImageToProcess.h @@ -66,13 +66,6 @@ namespace ImageProcessingAtom bool GammaToLinearRGBA32F(bool bDeGamma); void LinearToGamma(); - // --------------------------------------------------------------------------------- - // Tools for A32B32G32R32F - - void CreateHighPass(uint32 dwMipDown); - - void CreateColorChart(); - //convert various original cubemap layouts to new layout bool ConvertCubemapLayout(CubemapLayoutType newLayout); }; diff --git a/Gems/Atom/Asset/ImageProcessingAtom/Code/Source/Processing/PixelFormatInfo.cpp b/Gems/Atom/Asset/ImageProcessingAtom/Code/Source/Processing/PixelFormatInfo.cpp index 8a741d6637..a413a29862 100644 --- a/Gems/Atom/Asset/ImageProcessingAtom/Code/Source/Processing/PixelFormatInfo.cpp +++ b/Gems/Atom/Asset/ImageProcessingAtom/Code/Source/Processing/PixelFormatInfo.cpp @@ -52,6 +52,24 @@ namespace ImageProcessingAtom return false; } + bool IsHDRFormat(EPixelFormat fmt) + { + switch (fmt) + { + case ePixelFormat_BC6UH: + case ePixelFormat_R9G9B9E5: + case ePixelFormat_R32G32B32A32F: + case ePixelFormat_R32G32F: + case ePixelFormat_R32F: + case ePixelFormat_R16G16B16A16F: + case ePixelFormat_R16G16F: + case ePixelFormat_R16F: + return true; + default: + return false; + } + } + PixelFormatInfo::PixelFormatInfo( uint32_t a_bitsPerPixel, uint32_t a_Channels, diff --git a/Gems/Atom/Asset/ImageProcessingAtom/Code/Source/Processing/Utils.cpp b/Gems/Atom/Asset/ImageProcessingAtom/Code/Source/Processing/Utils.cpp index 29ba8c3351..20e1b18e77 100644 --- a/Gems/Atom/Asset/ImageProcessingAtom/Code/Source/Processing/Utils.cpp +++ b/Gems/Atom/Asset/ImageProcessingAtom/Code/Source/Processing/Utils.cpp @@ -385,6 +385,13 @@ namespace ImageProcessingAtom } return true; } + + bool NeedAlphaChannel(EAlphaContent alphaContent) + { + return (alphaContent == EAlphaContent::eAlphaContent_OnlyBlack + || alphaContent == EAlphaContent::eAlphaContent_OnlyBlackAndWhite + || alphaContent == EAlphaContent::eAlphaContent_Greyscale); + } } } // namespace ImageProcessingAtom diff --git a/Gems/Atom/Asset/ImageProcessingAtom/Code/Source/Processing/Utils.h b/Gems/Atom/Asset/ImageProcessingAtom/Code/Source/Processing/Utils.h index d5905eddbc..59503a2366 100644 --- a/Gems/Atom/Asset/ImageProcessingAtom/Code/Source/Processing/Utils.h +++ b/Gems/Atom/Asset/ImageProcessingAtom/Code/Source/Processing/Utils.h @@ -26,5 +26,7 @@ namespace ImageProcessingAtom IImageObjectPtr LoadImageFromImageAsset(const AZ::Data::Asset& asset); bool SaveImageToDdsFile(IImageObjectPtr image, AZStd::string_view filePath); + + bool NeedAlphaChannel(EAlphaContent alphaContent); } } diff --git a/Gems/Atom/Asset/ImageProcessingAtom/Code/Tests/ImageProcessing_Test.cpp b/Gems/Atom/Asset/ImageProcessingAtom/Code/Tests/ImageProcessing_Test.cpp index 3e0bbd89eb..91b0952a06 100644 --- a/Gems/Atom/Asset/ImageProcessingAtom/Code/Tests/ImageProcessing_Test.cpp +++ b/Gems/Atom/Asset/ImageProcessingAtom/Code/Tests/ImageProcessing_Test.cpp @@ -111,7 +111,6 @@ namespace UnitTest AZ::SerializeContext* GetSerializeContext() override { return m_context.get(); } AZ::BehaviorContext* GetBehaviorContext() override { return nullptr; } AZ::JsonRegistrationContext* GetJsonRegistrationContext() override { return m_jsonRegistrationContext.get(); } - const char* GetAppRoot() const override { return nullptr; } const char* GetEngineRoot() const override { return nullptr; } const char* GetExecutableFolder() const override { return nullptr; } void EnumerateEntities(const AZ::ComponentApplicationRequests::EntityCallback& /*callback*/) override {} @@ -204,7 +203,7 @@ namespace UnitTest m_gemFolder = AZ::Test::GetEngineRootPath() + "/Gems/Atom/Asset/ImageProcessingAtom/"; m_outputFolder = m_gemFolder + AZStd::string("Code/Tests/TestAssets/temp/"); - m_defaultSettingFolder = m_gemFolder + AZStd::string("Config/"); + m_defaultSettingFolder = m_gemFolder + AZStd::string("Assets/Config/"); m_testFileFolder = m_gemFolder + AZStd::string("Code/Tests/TestAssets/"); InitialImageFilenames(); @@ -988,7 +987,6 @@ namespace UnitTest ASSERT_TRUE(process->IsSucceed()); SaveImageToFile(process->GetOutputImage(), "rgb", 10); - SaveImageToFile(process->GetOutputAlphaImage(), "alpha", 10); process->GetAppendOutputProducts(outProducts); diff --git a/Gems/Atom/Asset/ImageProcessingAtom/Code/imageprocessing_files.cmake b/Gems/Atom/Asset/ImageProcessingAtom/Code/imageprocessing_files.cmake index aad400518d..a6fe09bfa6 100644 --- a/Gems/Atom/Asset/ImageProcessingAtom/Code/imageprocessing_files.cmake +++ b/Gems/Atom/Asset/ImageProcessingAtom/Code/imageprocessing_files.cmake @@ -103,8 +103,6 @@ set(FILES Source/Converters/ConvertPixelFormat.cpp Source/Converters/Cubemap.h Source/Converters/Cubemap.cpp - Source/Converters/ColorChart.cpp - Source/Converters/HighPass.cpp Source/Converters/Histogram.cpp Source/Converters/Histogram.h ../External/CubeMapGen/CBBoxInt32.cpp diff --git a/Gems/Atom/Asset/ImageProcessingAtom/Config/Albedo.preset b/Gems/Atom/Asset/ImageProcessingAtom/Config/Albedo.preset deleted file mode 100644 index fe2e7e0cb4..0000000000 --- a/Gems/Atom/Asset/ImageProcessingAtom/Config/Albedo.preset +++ /dev/null @@ -1,116 +0,0 @@ -{ - "Type": "JsonSerialization", - "Version": 1, - "ClassName": "MultiplatformPresetSettings", - "ClassData": { - "DefaultPreset": { - "UUID": "{08A95286-ADB2-41E4-96EB-DB48F4726D6A}", - "Name": "Albedo", - "RGB_Weight": "CIEXYZ", - "FileMasks": [ - "_basecolor", - "_diff", - "_color", - "_col", - "_albedo", - "_alb", - "_bc", - "_diffuse" - ], - "PixelFormat": "BC1", - "DiscardAlpha": true, - "IsPowerOf2": true, - "MipMapSetting": { - "MipGenType": "Box" - } - }, - "PlatformsPresets": { - "android": { - "UUID": "{08A95286-ADB2-41E4-96EB-DB48F4726D6A}", - "Name": "Albedo", - "RGB_Weight": "CIEXYZ", - "FileMasks": [ - "_diff", - "_color", - "_col", - "_albedo", - "_alb", - "_basecolor", - "_bc", - "_diffuse" - ], - "PixelFormat": "ASTC_6x6", - "MaxTextureSize": 2048, - "DiscardAlpha": true, - "IsPowerOf2": true, - "MipMapSetting": { - "MipGenType": "Box" - } - }, - "ios": { - "UUID": "{08A95286-ADB2-41E4-96EB-DB48F4726D6A}", - "Name": "Albedo", - "RGB_Weight": "CIEXYZ", - "FileMasks": [ - "_diff", - "_color", - "_col", - "_albedo", - "_alb", - "_basecolor", - "_bc", - "_diffuse" - ], - "PixelFormat": "ASTC_6x6", - "MaxTextureSize": 2048, - "DiscardAlpha": true, - "IsPowerOf2": true, - "MipMapSetting": { - "MipGenType": "Box" - } - }, - "mac": { - "UUID": "{08A95286-ADB2-41E4-96EB-DB48F4726D6A}", - "Name": "Albedo", - "RGB_Weight": "CIEXYZ", - "FileMasks": [ - "_diff", - "_color", - "_col", - "_albedo", - "_alb", - "_basecolor", - "_bc", - "_diffuse" - ], - "PixelFormat": "BC1", - "DiscardAlpha": true, - "IsPowerOf2": true, - "MipMapSetting": { - "MipGenType": "Box" - } - }, - "provo": { - "UUID": "{08A95286-ADB2-41E4-96EB-DB48F4726D6A}", - "Name": "Albedo", - "RGB_Weight": "CIEXYZ", - "FileMasks": [ - "_diff", - "_color", - "_col", - "_albedo", - "_alb", - "_basecolor", - "_bc", - "_diffuse" - ], - "PixelFormat": "BC1", - "DiscardAlpha": true, - "IsPowerOf2": true, - "MipMapSetting": { - "MipGenType": "Box" - } - } - } - } -} diff --git a/Gems/Atom/Asset/ImageProcessingAtom/Config/AlbedoWithCoverage.preset b/Gems/Atom/Asset/ImageProcessingAtom/Config/AlbedoWithCoverage.preset deleted file mode 100644 index fda5a9cc52..0000000000 --- a/Gems/Atom/Asset/ImageProcessingAtom/Config/AlbedoWithCoverage.preset +++ /dev/null @@ -1,104 +0,0 @@ -{ - "Type": "JsonSerialization", - "Version": 1, - "ClassName": "MultiplatformPresetSettings", - "ClassData": { - "DefaultPreset": { - "UUID": "{57ED16B1-407B-4E29-BCFC-D3BAE60F2C85}", - "Name": "AlbedoWithCoverage", - "RGB_Weight": "CIEXYZ", - "FileMasks": [ - "_diff", - "_color", - "_albedo", - "_alb", - "_basecolor", - "_bc", - "_diffuse" - ], - "PixelFormat": "BC1a", - "IsPowerOf2": true, - "MipMapSetting": { - "MipGenType": "Box" - } - }, - "PlatformsPresets": { - "android": { - "UUID": "{57ED16B1-407B-4E29-BCFC-D3BAE60F2C85}", - "Name": "AlbedoWithCoverage", - "RGB_Weight": "CIEXYZ", - "FileMasks": [ - "_diff", - "_color", - "_albedo", - "_alb", - "_basecolor", - "_bc", - "_diffuse" - ], - "PixelFormat": "ASTC_6x6", - "IsPowerOf2": true, - "MipMapSetting": { - "MipGenType": "Box" - } - }, - "ios": { - "UUID": "{57ED16B1-407B-4E29-BCFC-D3BAE60F2C85}", - "Name": "AlbedoWithCoverage", - "RGB_Weight": "CIEXYZ", - "FileMasks": [ - "_diff", - "_color", - "_albedo", - "_alb", - "_basecolor", - "_bc", - "_diffuse" - ], - "PixelFormat": "ASTC_6x6", - "IsPowerOf2": true, - "MipMapSetting": { - "MipGenType": "Box" - } - }, - "mac": { - "UUID": "{57ED16B1-407B-4E29-BCFC-D3BAE60F2C85}", - "Name": "AlbedoWithCoverage", - "RGB_Weight": "CIEXYZ", - "FileMasks": [ - "_diff", - "_color", - "_albedo", - "_alb", - "_basecolor", - "_bc", - "_diffuse" - ], - "PixelFormat": "BC1a", - "IsPowerOf2": true, - "MipMapSetting": { - "MipGenType": "Box" - } - }, - "provo": { - "UUID": "{57ED16B1-407B-4E29-BCFC-D3BAE60F2C85}", - "Name": "AlbedoWithCoverage", - "RGB_Weight": "CIEXYZ", - "FileMasks": [ - "_diff", - "_color", - "_albedo", - "_alb", - "_basecolor", - "_bc", - "_diffuse" - ], - "PixelFormat": "BC1a", - "IsPowerOf2": true, - "MipMapSetting": { - "MipGenType": "Box" - } - } - } - } -} diff --git a/Gems/Atom/Asset/ImageProcessingAtom/Config/AlbedoWithGenericAlpha.preset b/Gems/Atom/Asset/ImageProcessingAtom/Config/AlbedoWithGenericAlpha.preset deleted file mode 100644 index 19d2b2bbe6..0000000000 --- a/Gems/Atom/Asset/ImageProcessingAtom/Config/AlbedoWithGenericAlpha.preset +++ /dev/null @@ -1,106 +0,0 @@ -{ - "Type": "JsonSerialization", - "Version": 1, - "ClassName": "MultiplatformPresetSettings", - "ClassData": { - "DefaultPreset": { - "UUID": "{5D9ECB52-4CD9-4CB8-80E3-10CAE5EFB8A2}", - "Name": "AlbedoWithGenericAlpha", - "RGB_Weight": "CIEXYZ", - "FileMasks": [ - "_diff", - "_color", - "_albedo", - "_alb", - "_basecolor", - "_bc", - "_diffuse" - ], - "PixelFormat": "BC3", - "IsPowerOf2": true, - "MipMapSetting": { - "MipGenType": "Box" - } - }, - "PlatformsPresets": { - "android": { - "UUID": "{5D9ECB52-4CD9-4CB8-80E3-10CAE5EFB8A2}", - "Name": "AlbedoWithGenericAlpha", - "RGB_Weight": "CIEXYZ", - "FileMasks": [ - "_diff", - "_color", - "_albedo", - "_alb", - "_basecolor", - "_bc", - "_diffuse" - ], - "PixelFormat": "ASTC_6x6", - "MaxTextureSize": 2048, - "IsPowerOf2": true, - "MipMapSetting": { - "MipGenType": "Box" - } - }, - "ios": { - "UUID": "{5D9ECB52-4CD9-4CB8-80E3-10CAE5EFB8A2}", - "Name": "AlbedoWithGenericAlpha", - "RGB_Weight": "CIEXYZ", - "FileMasks": [ - "_diff", - "_color", - "_albedo", - "_alb", - "_basecolor", - "_bc", - "_diffuse" - ], - "PixelFormat": "ASTC_6x6", - "MaxTextureSize": 2048, - "IsPowerOf2": true, - "MipMapSetting": { - "MipGenType": "Box" - } - }, - "mac": { - "UUID": "{5D9ECB52-4CD9-4CB8-80E3-10CAE5EFB8A2}", - "Name": "AlbedoWithGenericAlpha", - "RGB_Weight": "CIEXYZ", - "FileMasks": [ - "_diff", - "_color", - "_albedo", - "_alb", - "_basecolor", - "_bc", - "_diffuse" - ], - "PixelFormat": "BC3", - "IsPowerOf2": true, - "MipMapSetting": { - "MipGenType": "Box" - } - }, - "provo": { - "UUID": "{5D9ECB52-4CD9-4CB8-80E3-10CAE5EFB8A2}", - "Name": "AlbedoWithGenericAlpha", - "RGB_Weight": "CIEXYZ", - "FileMasks": [ - "_diff", - "_color", - "_albedo", - "_alb", - "_basecolor", - "_bc", - "_diffuse" - ], - "PixelFormat": "BC3", - "IsPowerOf2": true, - "MipMapSetting": { - "MipGenType": "Box" - } - } - } - } -} diff --git a/Gems/Atom/Asset/ImageProcessingAtom/Config/AmbientOcclusion.preset b/Gems/Atom/Asset/ImageProcessingAtom/Config/AmbientOcclusion.preset deleted file mode 100644 index d5acef34d6..0000000000 --- a/Gems/Atom/Asset/ImageProcessingAtom/Config/AmbientOcclusion.preset +++ /dev/null @@ -1,76 +0,0 @@ -{ - "Type": "JsonSerialization", - "Version": 1, - "ClassName": "MultiplatformPresetSettings", - "ClassData": { - "DefaultPreset": { - "UUID": "{02ED0ECE-B198-49D9-85BC-CEBA6C28546C}", - "Name": "AmbientOcclusion", - "SourceColor": "Linear", - "DestColor": "Linear", - "FileMasks": [ - "_ao", - "_ambocc", - "_amb", - "_ambientocclusion" - ], - "PixelFormat": "BC4" - }, - "PlatformsPresets": { - "android": { - "UUID": "{02ED0ECE-B198-49D9-85BC-CEBA6C28546C}", - "Name": "AmbientOcclusion", - "SourceColor": "Linear", - "DestColor": "Linear", - "FileMasks": [ - "_ao", - "_ambocc", - "_amb", - "_ambientocclusion" - ], - "MaxTextureSize": 2048, - "PixelFormat": "ASTC_4x4" - }, - "ios": { - "UUID": "{02ED0ECE-B198-49D9-85BC-CEBA6C28546C}", - "Name": "AmbientOcclusion", - "SourceColor": "Linear", - "DestColor": "Linear", - "FileMasks": [ - "_ao", - "_ambocc", - "_amb", - "_ambientocclusion" - ], - "MaxTextureSize": 2048, - "PixelFormat": "ASTC_4x4" - }, - "mac": { - "UUID": "{02ED0ECE-B198-49D9-85BC-CEBA6C28546C}", - "Name": "AmbientOcclusion", - "SourceColor": "Linear", - "DestColor": "Linear", - "FileMasks": [ - "_ao", - "_ambocc", - "_amb", - "_ambientocclusion" - ], - "PixelFormat": "BC4" - }, - "provo": { - "UUID": "{02ED0ECE-B198-49D9-85BC-CEBA6C28546C}", - "Name": "AmbientOcclusion", - "SourceColor": "Linear", - "DestColor": "Linear", - "FileMasks": [ - "_ao", - "_ambocc", - "_amb", - "_ambientocclusion" - ], - "PixelFormat": "BC4" - } - } - } -} diff --git a/Gems/Atom/Asset/ImageProcessingAtom/Config/Displacement.preset b/Gems/Atom/Asset/ImageProcessingAtom/Config/Displacement.preset deleted file mode 100644 index 28ac84d646..0000000000 --- a/Gems/Atom/Asset/ImageProcessingAtom/Config/Displacement.preset +++ /dev/null @@ -1,132 +0,0 @@ -{ - "Type": "JsonSerialization", - "Version": 1, - "ClassName": "MultiplatformPresetSettings", - "ClassData": { - "DefaultPreset": { - "UUID": "{D7B4BEA6-6427-4295-B61B-62776D0056DE}", - "Name": "Displacement", - "SourceColor": "Linear", - "DestColor": "Linear", - "FileMasks": [ - "_displ", - "_disp", - "_dsp", - "_d", - "_dm", - "_displacement", - "_height", - "_hm", - "_ht", - "_h" - ], - "PixelFormat": "BC4", - "DiscardAlpha": true, - "IsPowerOf2": true, - "MipMapSetting": { - "MipGenType": "Box" - } - }, - "PlatformsPresets": { - "android": { - "UUID": "{D7B4BEA6-6427-4295-B61B-62776D0056DE}", - "Name": "Displacement", - "SourceColor": "Linear", - "DestColor": "Linear", - "FileMasks": [ - "_displ", - "_disp", - "_dsp", - "_d", - "_dm", - "_displacement", - "_height", - "_hm", - "_ht", - "_h" - ], - "PixelFormat": "ASTC_4x4", - "MaxTextureSize": 2048, - "DiscardAlpha": true, - "IsPowerOf2": true, - "SizeReduceLevel": 3, - "MipMapSetting": { - "MipGenType": "Box" - } - }, - "ios": { - "UUID": "{D7B4BEA6-6427-4295-B61B-62776D0056DE}", - "Name": "Displacement", - "SourceColor": "Linear", - "DestColor": "Linear", - "FileMasks": [ - "_displ", - "_disp", - "_dsp", - "_d", - "_dm", - "_displacement", - "_height", - "_hm", - "_ht", - "_h" - ], - "PixelFormat": "ASTC_4x4", - "MaxTextureSize": 2048, - "DiscardAlpha": true, - "IsPowerOf2": true, - "MipMapSetting": { - "MipGenType": "Box" - } - }, - "mac": { - "UUID": "{D7B4BEA6-6427-4295-B61B-62776D0056DE}", - "Name": "Displacement", - "SourceColor": "Linear", - "DestColor": "Linear", - "FileMasks": [ - "_displ", - "_disp", - "_dsp", - "_d", - "_dm", - "_displacement", - "_height", - "_hm", - "_ht", - "_h" - ], - "PixelFormat": "BC4", - "DiscardAlpha": true, - "IsPowerOf2": true, - "MipMapSetting": { - "MipGenType": "Box" - } - }, - "provo": { - "UUID": "{D7B4BEA6-6427-4295-B61B-62776D0056DE}", - "Name": "Displacement", - "SourceColor": "Linear", - "DestColor": "Linear", - "FileMasks": [ - "_displ", - "_disp", - "_dsp", - "_d", - "_dm", - "_displacement", - "_height", - "_hm", - "_ht", - "_h" - ], - "PixelFormat": "BC4", - "DiscardAlpha": true, - "IsPowerOf2": true, - "MipMapSetting": { - "MipGenType": "Box" - } - } - } - } -} diff --git a/Gems/Atom/Asset/ImageProcessingAtom/Config/Emissive.preset b/Gems/Atom/Asset/ImageProcessingAtom/Config/Emissive.preset deleted file mode 100644 index f5e3a79357..0000000000 --- a/Gems/Atom/Asset/ImageProcessingAtom/Config/Emissive.preset +++ /dev/null @@ -1,81 +0,0 @@ -{ - "Type": "JsonSerialization", - "Version": 1, - "ClassName": "MultiplatformPresetSettings", - "ClassData": { - "DefaultPreset": { - "UUID": "{07041D83-E0C3-4726-8735-CA0FE550C9A0}", - "Name": "Emissive", - "RGB_Weight": "CIEXYZ", - "FileMasks": [ - "_emissive", - "_e", - "_glow", - "_em", - "_emit" - ], - "PixelFormat": "BC7", - "DiscardAlpha": true - }, - "PlatformsPresets": { - "android": { - "UUID": "{07041D83-E0C3-4726-8735-CA0FE550C9A0}", - "Name": "Emissive", - "RGB_Weight": "CIEXYZ", - "FileMasks": [ - "_emissive", - "_e", - "_glow", - "_em", - "_emit" - ], - "PixelFormat": "ASTC_6x6", - "MaxTextureSize": 2048, - "DiscardAlpha": true - }, - "ios": { - "UUID": "{07041D83-E0C3-4726-8735-CA0FE550C9A0}", - "Name": "Emissive", - "RGB_Weight": "CIEXYZ", - "FileMasks": [ - "_emissive", - "_e", - "_glow", - "_em", - "_emit" - ], - "PixelFormat": "ASTC_6x6", - "MaxTextureSize": 2048, - "DiscardAlpha": true - }, - "mac": { - "UUID": "{07041D83-E0C3-4726-8735-CA0FE550C9A0}", - "Name": "Emissive", - "RGB_Weight": "CIEXYZ", - "FileMasks": [ - "_emissive", - "_e", - "_glow", - "_em", - "_emit" - ], - "PixelFormat": "BC7", - "DiscardAlpha": true - }, - "provo": { - "UUID": "{07041D83-E0C3-4726-8735-CA0FE550C9A0}", - "Name": "Emissive", - "RGB_Weight": "CIEXYZ", - "FileMasks": [ - "_emissive", - "_e", - "_glow", - "_em", - "_emit" - ], - "PixelFormat": "BC7", - "DiscardAlpha": true - } - } - } -} diff --git a/Gems/Atom/Asset/ImageProcessingAtom/Config/ImageBuilder.settings b/Gems/Atom/Asset/ImageProcessingAtom/Config/ImageBuilder.settings deleted file mode 100644 index 466ac4b71d..0000000000 --- a/Gems/Atom/Asset/ImageProcessingAtom/Config/ImageBuilder.settings +++ /dev/null @@ -1,67 +0,0 @@ -{ - "Type": "JsonSerialization", - "Version": 1, - "ClassName": "BuilderSettingManager", - "ClassData": { - "AnalysisFingerprint": "2", - "BuildSettings": { - "android": { - "GlossScale": 16.0, - "GlossBias": 0.0, - "Streaming": false, - "Enable": true - }, - "ios": { - "GlossScale": 16.0, - "GlossBias": 0.0, - "Streaming": false, - "Enable": true - }, - "mac": { - "GlossScale": 16.0, - "GlossBias": 0.0, - "Streaming": false, - "Enable": true - }, - "pc": { - "GlossScale": 16.0, - "GlossBias": 0.0, - "Streaming": false, - "Enable": true - }, - "linux": { - "GlossScale": 16.0, - "GlossBias": 0.0, - "Streaming": false, - "Enable": true - }, - "provo": { - "GlossScale": 16.0, - "GlossBias": 0.0, - "Streaming": false, - "Enable": false - } - }, - "DefaultPresetsByFileMask": { - "_basecolor": "Albedo", - "_diff": "Albedo", - "_diffuse": "Albedo", - "_ddn": "Normals", - "_normal": "Normals", - "_ddna": "NormalsWithSmoothness", - "_glossness": "Reflectance", - "_spec": "Reflectance", - "_specular": "Reflectance", - "_metallic": "Reflectance", - "_refl": "Reflectance", - "_roughness": "Reflectance", - "_ibldiffusecm": "IBLDiffuse", - "_iblskyboxcm": "IBLSkybox", - "_iblspecularcm": "IBLSpecular", - "_skyboxcm": "Skybox" - }, - "DefaultPreset": "Albedo", - "DefaultPresetAlpha": "AlbedoWithGenericAlpha", - "DefaultPresetNonePOT": "ReferenceImage" - } -} diff --git a/Gems/Atom/Asset/ImageProcessingAtom/Config/LayerMask.preset b/Gems/Atom/Asset/ImageProcessingAtom/Config/LayerMask.preset deleted file mode 100644 index 5ce06aaea2..0000000000 --- a/Gems/Atom/Asset/ImageProcessingAtom/Config/LayerMask.preset +++ /dev/null @@ -1,64 +0,0 @@ -{ - "Type": "JsonSerialization", - "Version": 1, - "ClassName": "MultiplatformPresetSettings", - "ClassData": { - "DefaultPreset": { - "UUID": "{B1AC2F76-CB1A-46A8-B92D-B8DFBB564FCF}", - "Name": "LayerMask", - "SourceColor": "Linear", - "DestColor": "Linear", - "FileMasks": [ - "_layers", - "_rgbmask" - ], - "PixelFormat": "R8G8B8X8" - }, - "PlatformsPresets": { - "android": { - "UUID": "{B1AC2F76-CB1A-46A8-B92D-B8DFBB564FCF}", - "Name": "LayerMask", - "SourceColor": "Linear", - "DestColor": "Linear", - "FileMasks": [ - "_layers", - "_rgbmask" - ], - "PixelFormat": "R8G8B8X8" - }, - "ios": { - "UUID": "{B1AC2F76-CB1A-46A8-B92D-B8DFBB564FCF}", - "Name": "LayerMask", - "SourceColor": "Linear", - "DestColor": "Linear", - "FileMasks": [ - "_layers", - "_rgbmask" - ], - "PixelFormat": "R8G8B8X8" - }, - "mac": { - "UUID": "{B1AC2F76-CB1A-46A8-B92D-B8DFBB564FCF}", - "Name": "LayerMask", - "SourceColor": "Linear", - "DestColor": "Linear", - "FileMasks": [ - "_layers", - "_rgbmask" - ], - "PixelFormat": "R8G8B8X8" - }, - "provo": { - "UUID": "{B1AC2F76-CB1A-46A8-B92D-B8DFBB564FCF}", - "Name": "LayerMask", - "SourceColor": "Linear", - "DestColor": "Linear", - "FileMasks": [ - "_layers", - "_rgbmask" - ], - "PixelFormat": "R8G8B8X8" - } - } - } -} diff --git a/Gems/Atom/Asset/ImageProcessingAtom/Config/Normals.preset b/Gems/Atom/Asset/ImageProcessingAtom/Config/Normals.preset deleted file mode 100644 index eee0b88686..0000000000 --- a/Gems/Atom/Asset/ImageProcessingAtom/Config/Normals.preset +++ /dev/null @@ -1,131 +0,0 @@ -{ - "Type": "JsonSerialization", - "Version": 1, - "ClassName": "MultiplatformPresetSettings", - "ClassData": { - "DefaultPreset": { - "UUID": "{508B21D5-5250-4003-97EC-1CF28D571ACF}", - "Name": "Normals", - "SourceColor": "Linear", - "DestColor": "Linear", - "FileMasks": [ - "_ddn", - "_normal", - "_normalmap", - "_normals", - "_norm", - "_nor", - "_nrm", - "_nm", - "_n" - ], - "PixelFormat": "BC5s", - "DiscardAlpha": true, - "IsPowerOf2": true, - "MipRenormalize": true, - "MipMapSetting": { - "MipGenType": "Box" - } - }, - "PlatformsPresets": { - "android": { - "UUID": "{508B21D5-5250-4003-97EC-1CF28D571ACF}", - "Name": "Normals", - "SourceColor": "Linear", - "DestColor": "Linear", - "FileMasks": [ - "_ddn", - "_normal", - "_normalmap", - "_normals", - "_norm", - "_nor", - "_nrm", - "_nm", - "_n" - ], - "PixelFormat": "ASTC_4x4", - "DiscardAlpha": true, - "MaxTextureSize": 1024, - "IsPowerOf2": true, - "MipRenormalize": true, - "MipMapSetting": { - "MipGenType": "Box" - } - }, - "ios": { - "UUID": "{508B21D5-5250-4003-97EC-1CF28D571ACF}", - "Name": "Normals", - "SourceColor": "Linear", - "DestColor": "Linear", - "FileMasks": [ - "_ddn", - "_normal", - "_normalmap", - "_normals", - "_norm", - "_nor", - "_nrm", - "_nm", - "_n" - ], - "PixelFormat": "ASTC_4x4", - "DiscardAlpha": true, - "MaxTextureSize": 1024, - "IsPowerOf2": true, - "MipRenormalize": true, - "MipMapSetting": { - "MipGenType": "Box" - } - }, - "mac": { - "UUID": "{508B21D5-5250-4003-97EC-1CF28D571ACF}", - "Name": "Normals", - "SourceColor": "Linear", - "DestColor": "Linear", - "FileMasks": [ - "_ddn", - "_normal", - "_normalmap", - "_normals", - "_norm", - "_nor", - "_nrm", - "_nm", - "_n" - ], - "PixelFormat": "BC5s", - "DiscardAlpha": true, - "IsPowerOf2": true, - "MipRenormalize": true, - "MipMapSetting": { - "MipGenType": "Box" - } - }, - "provo": { - "UUID": "{508B21D5-5250-4003-97EC-1CF28D571ACF}", - "Name": "Normals", - "SourceColor": "Linear", - "DestColor": "Linear", - "FileMasks": [ - "_ddn", - "_normal", - "_normalmap", - "_normals", - "_norm", - "_nor", - "_nrm", - "_nm", - "_n" - ], - "PixelFormat": "BC5s", - "DiscardAlpha": true, - "IsPowerOf2": true, - "MipRenormalize": true, - "MipMapSetting": { - "MipGenType": "Box" - } - } - } - } -} diff --git a/Gems/Atom/Asset/ImageProcessingAtom/Config/NormalsWithSmoothness.preset b/Gems/Atom/Asset/ImageProcessingAtom/Config/NormalsWithSmoothness.preset deleted file mode 100644 index 2c66cf9190..0000000000 --- a/Gems/Atom/Asset/ImageProcessingAtom/Config/NormalsWithSmoothness.preset +++ /dev/null @@ -1,116 +0,0 @@ -{ - "Type": "JsonSerialization", - "Version": 1, - "ClassName": "MultiplatformPresetSettings", - "ClassData": { - "DefaultPreset": { - "UUID": "{6EE749F4-846E-4F7A-878C-F211F85EA59F}", - "Name": "NormalsWithSmoothness", - "SourceColor": "Linear", - "DestColor": "Linear", - "FileMasks": [ - "_ddna", - "_normala", - "_nrma", - "_nma", - "_na" - ], - "PixelFormat": "BC5s", - "PixelFormatAlpha": "BC4", - "IsPowerOf2": true, - "GlossFromNormal": 1, - "MipRenormalize": true, - "MipMapSetting": { - "MipGenType": "Box" - } - }, - "PlatformsPresets": { - "android": { - "UUID": "{6EE749F4-846E-4F7A-878C-F211F85EA59F}", - "Name": "NormalsWithSmoothness", - "SourceColor": "Linear", - "DestColor": "Linear", - "FileMasks": [ - "_ddna", - "_normala", - "_nrma", - "_nma", - "_na" - ], - "PixelFormat": "ASTC_4x4", - "PixelFormatAlpha": "ASTC_4x4", - "MaxTextureSize": 2048, - "IsPowerOf2": true, - "GlossFromNormal": 1, - "MipRenormalize": true, - "MipMapSetting": { - "MipGenType": "Box" - } - }, - "ios": { - "UUID": "{6EE749F4-846E-4F7A-878C-F211F85EA59F}", - "Name": "NormalsWithSmoothness", - "SourceColor": "Linear", - "DestColor": "Linear", - "FileMasks": [ - "_ddna", - "_normala", - "_nrma", - "_nma", - "_na" - ], - "PixelFormat": "ASTC_4x4", - "PixelFormatAlpha": "ASTC_4x4", - "MaxTextureSize": 2048, - "IsPowerOf2": true, - "GlossFromNormal": 1, - "MipRenormalize": true, - "MipMapSetting": { - "MipGenType": "Box" - } - }, - "mac": { - "UUID": "{6EE749F4-846E-4F7A-878C-F211F85EA59F}", - "Name": "NormalsWithSmoothness", - "SourceColor": "Linear", - "DestColor": "Linear", - "FileMasks": [ - "_ddna", - "_normala", - "_nrma", - "_nma", - "_na" - ], - "PixelFormat": "BC5s", - "PixelFormatAlpha": "BC4", - "IsPowerOf2": true, - "GlossFromNormal": 1, - "MipRenormalize": true, - "MipMapSetting": { - "MipGenType": "Box" - } - }, - "provo": { - "UUID": "{6EE749F4-846E-4F7A-878C-F211F85EA59F}", - "Name": "NormalsWithSmoothness", - "SourceColor": "Linear", - "DestColor": "Linear", - "FileMasks": [ - "_ddna", - "_normala", - "_nrma", - "_nma", - "_na" - ], - "PixelFormat": "BC5s", - "PixelFormatAlpha": "BC4", - "IsPowerOf2": true, - "GlossFromNormal": 1, - "MipRenormalize": true, - "MipMapSetting": { - "MipGenType": "Box" - } - } - } - } -} diff --git a/Gems/Atom/Asset/ImageProcessingAtom/Config/Opacity.preset b/Gems/Atom/Asset/ImageProcessingAtom/Config/Opacity.preset deleted file mode 100644 index 53998583cc..0000000000 --- a/Gems/Atom/Asset/ImageProcessingAtom/Config/Opacity.preset +++ /dev/null @@ -1,126 +0,0 @@ -{ - "Type": "JsonSerialization", - "Version": 1, - "ClassName": "MultiplatformPresetSettings", - "ClassData": { - "DefaultPreset": { - "UUID": "{F3D5E572-A3CF-435A-A2AB-75D2B6907847}", - "Name": "Opacity", - "SourceColor": "Linear", - "DestColor": "Linear", - "FileMasks": [ - "_sss", - "_trans", - "_opac", - "_opacity", - "_o", - "_opac", - "_op", - "_mask", - "_msk", - "_blend" - ], - "PixelFormat": "BC4", - "IsPowerOf2": true, - "MipMapSetting": { - "MipGenType": "Box" - } - }, - "PlatformsPresets": { - "android": { - "UUID": "{F3D5E572-A3CF-435A-A2AB-75D2B6907847}", - "Name": "Opacity", - "SourceColor": "Linear", - "DestColor": "Linear", - "FileMasks": [ - "_sss", - "_trans", - "_opac", - "_opacity", - "_o", - "_opac", - "_op", - "_mask", - "_msk", - "_blend" - ], - "PixelFormat": "ASTC_4x4", - "MaxTextureSize": 2048, - "IsPowerOf2": true, - "MipMapSetting": { - "MipGenType": "Box" - } - }, - "ios": { - "UUID": "{F3D5E572-A3CF-435A-A2AB-75D2B6907847}", - "Name": "Opacity", - "SourceColor": "Linear", - "DestColor": "Linear", - "FileMasks": [ - "_sss", - "_trans", - "_opac", - "_opacity", - "_o", - "_opac", - "_op", - "_mask", - "_msk", - "_blend" - ], - "PixelFormat": "ASTC_4x4", - "MaxTextureSize": 2048, - "IsPowerOf2": true, - "MipMapSetting": { - "MipGenType": "Box" - } - }, - "mac": { - "UUID": "{F3D5E572-A3CF-435A-A2AB-75D2B6907847}", - "Name": "Opacity", - "SourceColor": "Linear", - "DestColor": "Linear", - "FileMasks": [ - "_sss", - "_trans", - "_opac", - "_opacity", - "_o", - "_opac", - "_op", - "_mask", - "_msk", - "_blend" - ], - "PixelFormat": "BC4", - "IsPowerOf2": true, - "MipMapSetting": { - "MipGenType": "Box" - } - }, - "provo": { - "UUID": "{F3D5E572-A3CF-435A-A2AB-75D2B6907847}", - "Name": "Opacity", - "SourceColor": "Linear", - "DestColor": "Linear", - "FileMasks": [ - "_sss", - "_trans", - "_opac", - "_opacity", - "_o", - "_opac", - "_op", - "_mask", - "_msk", - "_blend" - ], - "PixelFormat": "BC4", - "IsPowerOf2": true, - "MipMapSetting": { - "MipGenType": "Box" - } - } - } - } -} diff --git a/Gems/Atom/Asset/ImageProcessingAtom/Config/Reflectance.preset b/Gems/Atom/Asset/ImageProcessingAtom/Config/Reflectance.preset deleted file mode 100644 index 2ac88dca85..0000000000 --- a/Gems/Atom/Asset/ImageProcessingAtom/Config/Reflectance.preset +++ /dev/null @@ -1,157 +0,0 @@ -{ - "Type": "JsonSerialization", - "Version": 1, - "ClassName": "MultiplatformPresetSettings", - "ClassData": { - "DefaultPreset": { - "UUID": "{7A3CC95E-0A0C-4CA1-8357-5712B028B77D}", - "Name": "Reflectance", - "SourceColor": "Linear", - "DestColor": "Linear", - "FileMasks": [ - "_spec", - "_refl", - "_ref", - "_rf", - "_gloss", - "_g", - "_f0", - "_specf0", - "_specular", - "_metal", - "_mtl", - "_m", - "_mt", - "_metalness", - "_metallic", - "_roughness", - "_rough" - ], - "PixelFormat": "BC1", - "IsPowerOf2": true, - "MipMapSetting": { - "MipGenType": "Box" - } - }, - "PlatformsPresets": { - "android": { - "UUID": "{7A3CC95E-0A0C-4CA1-8357-5712B028B77D}", - "Name": "Reflectance", - "SourceColor": "Linear", - "DestColor": "Linear", - "FileMasks": [ - "_spec", - "_refl", - "_ref", - "_rf", - "_gloss", - "_g", - "_f0", - "_specf0", - "_metal", - "_mtl", - "_m", - "_mt", - "_metalness", - "_metallic", - "_roughness", - "_rough" - ], - "PixelFormat": "ASTC_6x6", - "MaxTextureSize": 2048, - "IsPowerOf2": true, - "MipMapSetting": { - "MipGenType": "Box" - } - }, - "ios": { - "UUID": "{7A3CC95E-0A0C-4CA1-8357-5712B028B77D}", - "Name": "Reflectance", - "SourceColor": "Linear", - "DestColor": "Linear", - "FileMasks": [ - "_spec", - "_refl", - "_ref", - "_rf", - "_gloss", - "_g", - "_f0", - "_specf0", - "_metal", - "_mtl", - "_m", - "_mt", - "_metalness", - "_metallic", - "_roughness", - "_rough" - ], - "PixelFormat": "ASTC_6x6", - "MaxTextureSize": 2048, - "IsPowerOf2": true, - "MipMapSetting": { - "MipGenType": "Box" - } - }, - "mac": { - "UUID": "{7A3CC95E-0A0C-4CA1-8357-5712B028B77D}", - "Name": "Reflectance", - "SourceColor": "Linear", - "DestColor": "Linear", - "FileMasks": [ - "_spec", - "_refl", - "_ref", - "_rf", - "_gloss", - "_g", - "_f0", - "_specf0", - "_metal", - "_mtl", - "_m", - "_mt", - "_metalness", - "_metallic", - "_roughness", - "_rough" - ], - "PixelFormat": "BC1", - "IsPowerOf2": true, - "MipMapSetting": { - "MipGenType": "Box" - } - }, - "provo": { - "UUID": "{7A3CC95E-0A0C-4CA1-8357-5712B028B77D}", - "Name": "Reflectance", - "SourceColor": "Linear", - "DestColor": "Linear", - "FileMasks": [ - "_spec", - "_refl", - "_ref", - "_rf", - "_gloss", - "_g", - "_f0", - "_specf0", - "_metal", - "_mtl", - "_m", - "_mt", - "_metalness", - "_metallic", - "_roughness", - "_rough" - ], - "PixelFormat": "BC1", - "IsPowerOf2": true, - "MipMapSetting": { - "MipGenType": "Box" - } - } - } - } -} diff --git a/Gems/Atom/Asset/ImageProcessingAtom/External/CubeMapGen/CCubeMapProcessor.cpp b/Gems/Atom/Asset/ImageProcessingAtom/External/CubeMapGen/CCubeMapProcessor.cpp index dc8af67877..6ba119943e 100644 --- a/Gems/Atom/Asset/ImageProcessingAtom/External/CubeMapGen/CCubeMapProcessor.cpp +++ b/Gems/Atom/Asset/ImageProcessingAtom/External/CubeMapGen/CCubeMapProcessor.cpp @@ -1438,15 +1438,12 @@ namespace ImageProcessingAtom int32 a_Channel2Src, int32 a_Channel3Src ) { int32 iFace, iMipLevel, u, v, k; - int32 size; CP_ITYPE texelData[4]; int32 channelSrcArray[4]; //since output is being modified, terminate any active filtering threads TerminateActiveThreads(); - size = m_OutputSize; - channelSrcArray[0] = a_Channel0Src; channelSrcArray[1] = a_Channel1Src; channelSrcArray[2] = a_Channel2Src; diff --git a/Gems/Atom/Asset/ImageProcessingAtom/gem.json b/Gems/Atom/Asset/ImageProcessingAtom/gem.json index 1424841256..4fd437d298 100644 --- a/Gems/Atom/Asset/ImageProcessingAtom/gem.json +++ b/Gems/Atom/Asset/ImageProcessingAtom/gem.json @@ -2,6 +2,7 @@ "gem_name": "ImageProcessingAtom", "display_name": "Atom Image Processing", "license": "Apache-2.0 Or MIT", + "license_url": "https://github.com/o3de/o3de/blob/development/LICENSE.txt", "origin": "Open 3D Engine - o3de.org", "type": "Code", "summary": "", diff --git a/Gems/Atom/Asset/Shader/Code/CMakeLists.txt b/Gems/Atom/Asset/Shader/Code/CMakeLists.txt index efbedb0a38..ed5aa45bbf 100644 --- a/Gems/Atom/Asset/Shader/Code/CMakeLists.txt +++ b/Gems/Atom/Asset/Shader/Code/CMakeLists.txt @@ -53,7 +53,6 @@ ly_add_target( ${pal_source_dir} COMPILE_DEFINITIONS PRIVATE - NOT_USE_CRY_MEMORY_MANAGER _SCL_SECURE_NO_WARNINGS BUILD_DEPENDENCIES PUBLIC diff --git a/Gems/Atom/Asset/Shader/Code/Source/Editor/AzslShaderBuilderSystemComponent.cpp b/Gems/Atom/Asset/Shader/Code/Source/Editor/AzslShaderBuilderSystemComponent.cpp index e41c04a0be..cc80b38b85 100644 --- a/Gems/Atom/Asset/Shader/Code/Source/Editor/AzslShaderBuilderSystemComponent.cpp +++ b/Gems/Atom/Asset/Shader/Code/Source/Editor/AzslShaderBuilderSystemComponent.cpp @@ -82,8 +82,7 @@ namespace AZ // Register Shader Asset Builder AssetBuilderSDK::AssetBuilderDesc shaderAssetBuilderDescriptor; shaderAssetBuilderDescriptor.m_name = "Shader Asset Builder"; - shaderAssetBuilderDescriptor.m_version = 107; // Required .azsl extension in .shader file references - // .shader file changes trigger rebuilds + shaderAssetBuilderDescriptor.m_version = 109; // Modify Metal shader platform to permit the precise keyword to fix depth bitwise mismatch between passes shaderAssetBuilderDescriptor.m_patterns.push_back(AssetBuilderSDK::AssetBuilderPattern( AZStd::string::format("*.%s", RPI::ShaderSourceData::Extension), AssetBuilderSDK::AssetBuilderPattern::PatternType::Wildcard)); shaderAssetBuilderDescriptor.m_busId = azrtti_typeid(); shaderAssetBuilderDescriptor.m_createJobFunction = AZStd::bind(&ShaderAssetBuilder::CreateJobs, &m_shaderAssetBuilder, AZStd::placeholders::_1, AZStd::placeholders::_2); @@ -108,7 +107,7 @@ namespace AZ shaderVariantAssetBuilderDescriptor.m_name = "Shader Variant Asset Builder"; // Both "Shader Variant Asset Builder" and "Shader Asset Builder" produce ShaderVariantAsset products. If you update // ShaderVariantAsset you will need to update BOTH version numbers, not just "Shader Variant Asset Builder". - shaderVariantAssetBuilderDescriptor.m_version = 26; // [AZSL] Changing inlineConstant to rootConstant keyword work. + shaderVariantAssetBuilderDescriptor.m_version = 27; // The Build Time Stamp of ShaderAsset And ShaderVariantAsset Should Be Based On GetTimeUTCMilliSecond(). shaderVariantAssetBuilderDescriptor.m_patterns.push_back(AssetBuilderSDK::AssetBuilderPattern(AZStd::string::format("*.%s", RPI::ShaderVariantListSourceData::Extension), AssetBuilderSDK::AssetBuilderPattern::PatternType::Wildcard)); shaderVariantAssetBuilderDescriptor.m_busId = azrtti_typeid(); shaderVariantAssetBuilderDescriptor.m_createJobFunction = AZStd::bind(&ShaderVariantAssetBuilder::CreateJobs, &m_shaderVariantAssetBuilder, AZStd::placeholders::_1, AZStd::placeholders::_2); diff --git a/Gems/Atom/Asset/Shader/Code/Source/Editor/ShaderAssetBuilder.cpp b/Gems/Atom/Asset/Shader/Code/Source/Editor/ShaderAssetBuilder.cpp index 89e202a4bc..e431b74282 100644 --- a/Gems/Atom/Asset/Shader/Code/Source/Editor/ShaderAssetBuilder.cpp +++ b/Gems/Atom/Asset/Shader/Code/Source/Editor/ShaderAssetBuilder.cpp @@ -162,7 +162,7 @@ namespace AZ // has the same value, because later the ShaderVariantTreeAsset job will fetch this value from the local ShaderAsset // which could cross platforms (i.e. building an android ShaderVariantTreeAsset on PC would fetch the tiemstamp from // the PC's ShaderAsset). - AZStd::sys_time_t shaderAssetBuildTimestamp = AZStd::GetTimeNowMicroSecond(); + AZ::u64 shaderAssetBuildTimestamp = AZStd::GetTimeUTCMilliSecond(); // Need to get the name of the azsl file from the .shader source asset, to be able to declare a dependency to SRG Layout Job. // and the macro options to preprocess. @@ -229,8 +229,8 @@ namespace AZ } // for all request.m_enabledPlatforms AZ_TracePrintf( - ShaderAssetBuilderName, "CreateJobs for %s took %llu microseconds", shaderAssetSourceFileFullPath.c_str(), - AZStd::GetTimeNowMicroSecond() - shaderAssetBuildTimestamp); + ShaderAssetBuilderName, "CreateJobs for %s took %llu milliseconds", shaderAssetSourceFileFullPath.c_str(), + AZStd::GetTimeUTCMilliSecond() - shaderAssetBuildTimestamp); response.m_result = AssetBuilderSDK::CreateJobsResultCode::Success; } @@ -355,8 +355,8 @@ namespace AZ return; } - // Get the time stamp string as sys_time_t, and also convert back to string to make sure it was converted correctly. - AZStd::sys_time_t shaderAssetBuildTimestamp = 0; + // Get the time stamp string as u64, and also convert back to string to make sure it was converted correctly. + AZ::u64 shaderAssetBuildTimestamp = 0; auto shaderAssetBuildTimestampIterator = request.m_jobDescription.m_jobParameters.find(ShaderAssetBuildTimestampParam); if (shaderAssetBuildTimestampIterator != request.m_jobDescription.m_jobParameters.end()) { diff --git a/Gems/Atom/Asset/Shader/Code/Source/Editor/ShaderBuilderUtility.cpp b/Gems/Atom/Asset/Shader/Code/Source/Editor/ShaderBuilderUtility.cpp index e6c99630b2..911981142b 100644 --- a/Gems/Atom/Asset/Shader/Code/Source/Editor/ShaderBuilderUtility.cpp +++ b/Gems/Atom/Asset/Shader/Code/Source/Editor/ShaderBuilderUtility.cpp @@ -492,6 +492,14 @@ namespace AZ { platformId = AzFramework::PlatformId::IOS; } + else if (platformIdentifier == "salem") + { + platformId = AzFramework::PlatformId::SALEM; + } + else if (platformIdentifier == "jasper") + { + platformId = AzFramework::PlatformId::JASPER; + } else if (platformIdentifier == "server") { platformId = AzFramework::PlatformId::SERVER; diff --git a/Gems/Atom/Asset/Shader/Code/Source/Editor/ShaderVariantAssetBuilder.cpp b/Gems/Atom/Asset/Shader/Code/Source/Editor/ShaderVariantAssetBuilder.cpp index bb40baca7d..5eaa0d9ddb 100644 --- a/Gems/Atom/Asset/Shader/Code/Source/Editor/ShaderVariantAssetBuilder.cpp +++ b/Gems/Atom/Asset/Shader/Code/Source/Editor/ShaderVariantAssetBuilder.cpp @@ -765,7 +765,7 @@ namespace AZ return; } - const AZStd::sys_time_t shaderVariantAssetBuildTimestamp = AZStd::GetTimeNowMicroSecond(); + const AZ::u64 shaderVariantAssetBuildTimestamp = AZStd::GetTimeUTCMilliSecond(); auto supervariantList = ShaderBuilderUtility::GetSupervariantListFromShaderSourceData(shaderSourceDescriptor); diff --git a/Gems/Atom/Asset/Shader/Code/Source/Editor/ShaderVariantAssetBuilder.h b/Gems/Atom/Asset/Shader/Code/Source/Editor/ShaderVariantAssetBuilder.h index 2eaf1d9d8b..b0457656af 100644 --- a/Gems/Atom/Asset/Shader/Code/Source/Editor/ShaderVariantAssetBuilder.h +++ b/Gems/Atom/Asset/Shader/Code/Source/Editor/ShaderVariantAssetBuilder.h @@ -38,7 +38,7 @@ namespace AZ const AZStd::string& m_tempDirPath; //! Used to synchronize versions of the ShaderAsset and ShaderVariantAsset, //! especially during hot-reload. A (ShaderVariantAsset.timestamp) >= (ShaderAsset.timestamp). - const AZStd::sys_time_t m_assetBuildTimestamp; + const AZ::u64 m_assetBuildTimestamp; const RPI::ShaderSourceData& m_shaderSourceDataDescriptor; const RPI::ShaderOptionGroupLayout& m_shaderOptionGroupLayout; const MapOfStringToStageType& m_shaderEntryPoints; diff --git a/Gems/Atom/Asset/Shader/gem.json b/Gems/Atom/Asset/Shader/gem.json index 6d5e9f4dbe..9f59c65f78 100644 --- a/Gems/Atom/Asset/Shader/gem.json +++ b/Gems/Atom/Asset/Shader/gem.json @@ -2,6 +2,7 @@ "gem_name": "AtomShader", "display_name": "Atom Shader Builder", "license": "Apache-2.0 Or MIT", + "license_url": "https://github.com/o3de/o3de/blob/development/LICENSE.txt", "origin": "Open 3D Engine - o3de.org", "type": "Code", "summary": "", diff --git a/Gems/Atom/Bootstrap/Assets/seedList.seed b/Gems/Atom/Bootstrap/Assets/seedList.seed new file mode 100644 index 0000000000..0f42b7790a --- /dev/null +++ b/Gems/Atom/Bootstrap/Assets/seedList.seed @@ -0,0 +1,13 @@ + + + + + + + + + + + + + diff --git a/Gems/Atom/Bootstrap/Code/Source/BootstrapSystemComponent.cpp b/Gems/Atom/Bootstrap/Code/Source/BootstrapSystemComponent.cpp index 84fc58718c..ef03a839d7 100644 --- a/Gems/Atom/Bootstrap/Code/Source/BootstrapSystemComponent.cpp +++ b/Gems/Atom/Bootstrap/Code/Source/BootstrapSystemComponent.cpp @@ -155,7 +155,7 @@ namespace AZ { Initialize(); }, - "LegacySystemInterfaceCreated"); + "CriticalAssetsCompiled"); } } diff --git a/Gems/Atom/Bootstrap/gem.json b/Gems/Atom/Bootstrap/gem.json index 5e98a1887d..df615366da 100644 --- a/Gems/Atom/Bootstrap/gem.json +++ b/Gems/Atom/Bootstrap/gem.json @@ -2,6 +2,7 @@ "gem_name": "Atom_Bootstrap", "display_name": "Atom Bootstrap", "license": "Apache-2.0 Or MIT", + "license_url": "https://github.com/o3de/o3de/blob/development/LICENSE.txt", "origin": "Open 3D Engine - o3de.org", "type": "Code", "summary": "", diff --git a/Gems/Atom/Component/DebugCamera/gem.json b/Gems/Atom/Component/DebugCamera/gem.json index 586cb37058..8eab74f41d 100644 --- a/Gems/Atom/Component/DebugCamera/gem.json +++ b/Gems/Atom/Component/DebugCamera/gem.json @@ -2,6 +2,7 @@ "gem_name": "Atom_Component_DebugCamera", "display_name": "Atom Debug Camera Component", "license": "Apache-2.0 Or MIT", + "license_url": "https://github.com/o3de/o3de/blob/development/LICENSE.txt", "origin": "Open 3D Engine - o3de.org", "type": "Code", "summary": "", diff --git a/Gems/Atom/Feature/Common/Assets/Materials/Presets/MacBeth/00_illuminant.material b/Gems/Atom/Feature/Common/Assets/Materials/Presets/MacBeth/00_illuminant.material index d49ca5dfe8..070c275b51 100644 --- a/Gems/Atom/Feature/Common/Assets/Materials/Presets/MacBeth/00_illuminant.material +++ b/Gems/Atom/Feature/Common/Assets/Materials/Presets/MacBeth/00_illuminant.material @@ -1,8 +1,8 @@ { "description": "", - "materialType": "Materials\\Types\\StandardPBR.materialtype", "parentMaterial": "", - "propertyLayoutVersion": 3, + "materialType": "../../Types/StandardPBR.materialtype", + "materialTypeVersion": 4, "properties": { "metallic": { "useTexture": false @@ -18,4 +18,4 @@ "useTexture": false } } -} +} \ No newline at end of file diff --git a/Gems/Atom/Feature/Common/Assets/Materials/Presets/MacBeth/00_illuminant_tex.material b/Gems/Atom/Feature/Common/Assets/Materials/Presets/MacBeth/00_illuminant_tex.material index 49014ae2b1..191073e26a 100644 --- a/Gems/Atom/Feature/Common/Assets/Materials/Presets/MacBeth/00_illuminant_tex.material +++ b/Gems/Atom/Feature/Common/Assets/Materials/Presets/MacBeth/00_illuminant_tex.material @@ -1,11 +1,12 @@ { "description": "", - "materialType": "Materials\\Types\\StandardPBR.materialtype", - "parentMaterial": "Materials\\Presets\\MacBeth\\00_illuminant.material", - "propertyLayoutVersion": 3, + "parentMaterial": "00_illuminant.material", + "materialType": "../../Types/StandardPBR.materialtype", + "materialTypeVersion": 4, "properties": { "baseColor": { - "textureMap": "Materials/Presets/MacBeth/00_illuminant_sRGB.tif" + "textureBlendMode": "Lerp", + "textureMap": "00_illuminant_sRGB.tif" } } -} +} \ No newline at end of file diff --git a/Gems/Atom/Feature/Common/Assets/Materials/Presets/MacBeth/01_dark_skin.material b/Gems/Atom/Feature/Common/Assets/Materials/Presets/MacBeth/01_dark_skin.material index 0fcedddf9d..46666228bf 100644 --- a/Gems/Atom/Feature/Common/Assets/Materials/Presets/MacBeth/01_dark_skin.material +++ b/Gems/Atom/Feature/Common/Assets/Materials/Presets/MacBeth/01_dark_skin.material @@ -1,18 +1,17 @@ { "description": "", - "materialType": "Materials\\Types\\StandardPBR.materialtype", - "parentMaterial": "Materials\\Presets\\MacBeth\\00_illuminant.material", - "propertyLayoutVersion": 3, + "parentMaterial": "00_illuminant.material", + "materialType": "../../Types/StandardPBR.materialtype", + "materialTypeVersion": 4, "properties": { "baseColor": { "color": [ - 0.17143511772155763, + 0.17143511772155762, 0.08227664977312088, - 0.056122682988643649, + 0.056122682988643646, 1.0 ], - "textureMap": "Materials/Presets/MacBeth/01_dark_skin_sRGB.tif", "useTexture": false } } -} +} \ No newline at end of file diff --git a/Gems/Atom/Feature/Common/Assets/Materials/Presets/MacBeth/01_dark_skin_tex.material b/Gems/Atom/Feature/Common/Assets/Materials/Presets/MacBeth/01_dark_skin_tex.material index 7b10a3b5f5..487ef2c279 100644 --- a/Gems/Atom/Feature/Common/Assets/Materials/Presets/MacBeth/01_dark_skin_tex.material +++ b/Gems/Atom/Feature/Common/Assets/Materials/Presets/MacBeth/01_dark_skin_tex.material @@ -1,8 +1,8 @@ { "description": "", - "materialType": "Materials\\Types\\StandardPBR.materialtype", - "parentMaterial": "Materials\\Presets\\MacBeth\\01_dark_skin.material", - "propertyLayoutVersion": 3, + "parentMaterial": "01_dark_skin.material", + "materialType": "../../Types/StandardPBR.materialtype", + "materialTypeVersion": 4, "properties": { "baseColor": { "color": [ @@ -11,7 +11,9 @@ 1.0, 1.0 ], + "textureBlendMode": "Lerp", + "textureMap": "01_dark_skin_sRGB.tif", "useTexture": true } } -} +} \ No newline at end of file diff --git a/Gems/Atom/Feature/Common/Assets/Materials/Presets/MacBeth/02_light_skin.material b/Gems/Atom/Feature/Common/Assets/Materials/Presets/MacBeth/02_light_skin.material index 2ca339cadc..bd6f235f51 100644 --- a/Gems/Atom/Feature/Common/Assets/Materials/Presets/MacBeth/02_light_skin.material +++ b/Gems/Atom/Feature/Common/Assets/Materials/Presets/MacBeth/02_light_skin.material @@ -1,8 +1,8 @@ { "description": "", - "materialType": "Materials\\Types\\StandardPBR.materialtype", - "parentMaterial": "Materials\\Presets\\MacBeth\\00_illuminant.material", - "propertyLayoutVersion": 3, + "parentMaterial": "00_illuminant.material", + "materialType": "../../Types/StandardPBR.materialtype", + "materialTypeVersion": 4, "properties": { "baseColor": { "color": [ @@ -11,8 +11,7 @@ 0.21953155100345612, 1.0 ], - "textureMap": "Materials/Presets/MacBeth/02_light_skin_sRGB.tif", "useTexture": false } } -} +} \ No newline at end of file diff --git a/Gems/Atom/Feature/Common/Assets/Materials/Presets/MacBeth/02_light_skin_tex.material b/Gems/Atom/Feature/Common/Assets/Materials/Presets/MacBeth/02_light_skin_tex.material index b2f9c271b9..f452446dad 100644 --- a/Gems/Atom/Feature/Common/Assets/Materials/Presets/MacBeth/02_light_skin_tex.material +++ b/Gems/Atom/Feature/Common/Assets/Materials/Presets/MacBeth/02_light_skin_tex.material @@ -1,8 +1,8 @@ { "description": "", - "materialType": "Materials\\Types\\StandardPBR.materialtype", - "parentMaterial": "Materials\\Presets\\MacBeth\\02_light_skin.material", - "propertyLayoutVersion": 3, + "parentMaterial": "02_light_skin.material", + "materialType": "../../Types/StandardPBR.materialtype", + "materialTypeVersion": 4, "properties": { "baseColor": { "color": [ @@ -11,7 +11,9 @@ 1.0, 1.0 ], + "textureBlendMode": "Lerp", + "textureMap": "02_light_skin_sRGB.tif", "useTexture": true } } -} +} \ No newline at end of file diff --git a/Gems/Atom/Feature/Common/Assets/Materials/Presets/MacBeth/03_blue_sky.material b/Gems/Atom/Feature/Common/Assets/Materials/Presets/MacBeth/03_blue_sky.material index 6432314ff2..fad628e885 100644 --- a/Gems/Atom/Feature/Common/Assets/Materials/Presets/MacBeth/03_blue_sky.material +++ b/Gems/Atom/Feature/Common/Assets/Materials/Presets/MacBeth/03_blue_sky.material @@ -1,18 +1,17 @@ { "description": "", - "materialType": "Materials\\Types\\StandardPBR.materialtype", - "parentMaterial": "Materials\\Presets\\MacBeth\\00_illuminant.material", - "propertyLayoutVersion": 3, + "parentMaterial": "00_illuminant.material", + "materialType": "../../Types/StandardPBR.materialtype", + "materialTypeVersion": 4, "properties": { "baseColor": { "color": [ 0.10946822166442871, - 0.19806210696697236, - 0.33716335892677309, + 0.19806210696697235, + 0.33716335892677307, 1.0 ], - "textureMap": "Materials/Presets/MacBeth/03_blue_sky_sRGB.tif", "useTexture": false } } -} +} \ No newline at end of file diff --git a/Gems/Atom/Feature/Common/Assets/Materials/Presets/MacBeth/03_blue_sky_tex.material b/Gems/Atom/Feature/Common/Assets/Materials/Presets/MacBeth/03_blue_sky_tex.material index 606d958818..9a64b15f79 100644 --- a/Gems/Atom/Feature/Common/Assets/Materials/Presets/MacBeth/03_blue_sky_tex.material +++ b/Gems/Atom/Feature/Common/Assets/Materials/Presets/MacBeth/03_blue_sky_tex.material @@ -1,8 +1,8 @@ { "description": "", - "materialType": "Materials\\Types\\StandardPBR.materialtype", - "parentMaterial": "Materials\\Presets\\MacBeth\\03_blue_sky.material", - "propertyLayoutVersion": 3, + "parentMaterial": "03_blue_sky.material", + "materialType": "../../Types/StandardPBR.materialtype", + "materialTypeVersion": 4, "properties": { "baseColor": { "color": [ @@ -11,7 +11,9 @@ 1.0, 1.0 ], + "textureBlendMode": "Lerp", + "textureMap": "03_blue_sky_sRGB.tif", "useTexture": true } } -} +} \ No newline at end of file diff --git a/Gems/Atom/Feature/Common/Assets/Materials/Presets/MacBeth/04_foliage.material b/Gems/Atom/Feature/Common/Assets/Materials/Presets/MacBeth/04_foliage.material index 6b43cabedb..2f833f57ee 100644 --- a/Gems/Atom/Feature/Common/Assets/Materials/Presets/MacBeth/04_foliage.material +++ b/Gems/Atom/Feature/Common/Assets/Materials/Presets/MacBeth/04_foliage.material @@ -1,16 +1,16 @@ { "description": "", - "materialType": "Materials\\Types\\StandardPBR.materialtype", - "parentMaterial": "Materials\\Presets\\MacBeth\\00_illuminant.material", - "propertyLayoutVersion": 3, + "parentMaterial": "00_illuminant.material", + "materialType": "../../Types/StandardPBR.materialtype", + "materialTypeVersion": 4, "properties": { "baseColor": { "color": [ 0.10223544389009476, - 0.14996567368507386, - 0.052857253700494769, + 0.14996567368507385, + 0.052857253700494766, 1.0 ] } } -} +} \ No newline at end of file diff --git a/Gems/Atom/Feature/Common/Assets/Materials/Presets/MacBeth/04_foliage_tex.material b/Gems/Atom/Feature/Common/Assets/Materials/Presets/MacBeth/04_foliage_tex.material index 5ea1a31afc..406508701d 100644 --- a/Gems/Atom/Feature/Common/Assets/Materials/Presets/MacBeth/04_foliage_tex.material +++ b/Gems/Atom/Feature/Common/Assets/Materials/Presets/MacBeth/04_foliage_tex.material @@ -1,8 +1,8 @@ { "description": "", - "materialType": "Materials\\Types\\StandardPBR.materialtype", - "parentMaterial": "Materials\\Presets\\MacBeth\\04_foliage.material", - "propertyLayoutVersion": 3, + "parentMaterial": "04_foliage.material", + "materialType": "../../Types/StandardPBR.materialtype", + "materialTypeVersion": 4, "properties": { "baseColor": { "color": [ @@ -11,7 +11,8 @@ 1.0, 1.0 ], - "textureMap": "Materials/Presets/MacBeth/04_foliage_sRGB.tif" + "textureBlendMode": "Lerp", + "textureMap": "04_foliage_sRGB.tif" } } -} +} \ No newline at end of file diff --git a/Gems/Atom/Feature/Common/Assets/Materials/Presets/MacBeth/05_blue_flower.material b/Gems/Atom/Feature/Common/Assets/Materials/Presets/MacBeth/05_blue_flower.material index fa8302b859..bf6ee703da 100644 --- a/Gems/Atom/Feature/Common/Assets/Materials/Presets/MacBeth/05_blue_flower.material +++ b/Gems/Atom/Feature/Common/Assets/Materials/Presets/MacBeth/05_blue_flower.material @@ -1,16 +1,16 @@ { "description": "", - "materialType": "Materials\\Types\\StandardPBR.materialtype", - "parentMaterial": "Materials\\Presets\\MacBeth\\00_illuminant.material", - "propertyLayoutVersion": 3, + "parentMaterial": "00_illuminant.material", + "materialType": "../../Types/StandardPBR.materialtype", + "materialTypeVersion": 4, "properties": { "baseColor": { "color": [ 0.2232242375612259, 0.21953155100345612, - 0.43414968252182009, + 0.43414968252182007, 1.0 ] } } -} +} \ No newline at end of file diff --git a/Gems/Atom/Feature/Common/Assets/Materials/Presets/MacBeth/05_blue_flower_tex.material b/Gems/Atom/Feature/Common/Assets/Materials/Presets/MacBeth/05_blue_flower_tex.material index 2d3ecdea6f..5e9085f53f 100644 --- a/Gems/Atom/Feature/Common/Assets/Materials/Presets/MacBeth/05_blue_flower_tex.material +++ b/Gems/Atom/Feature/Common/Assets/Materials/Presets/MacBeth/05_blue_flower_tex.material @@ -1,8 +1,8 @@ { "description": "", - "materialType": "Materials\\Types\\StandardPBR.materialtype", - "parentMaterial": "Materials\\Presets\\MacBeth\\05_blue_flower.material", - "propertyLayoutVersion": 3, + "parentMaterial": "05_blue_flower.material", + "materialType": "../../Types/StandardPBR.materialtype", + "materialTypeVersion": 4, "properties": { "baseColor": { "color": [ @@ -11,7 +11,8 @@ 1.0, 1.0 ], - "textureMap": "Materials/Presets/MacBeth/05_blue_flower_sRGB.tif" + "textureBlendMode": "Lerp", + "textureMap": "05_blue_flower_sRGB.tif" } } -} +} \ No newline at end of file diff --git a/Gems/Atom/Feature/Common/Assets/Materials/Presets/MacBeth/06_bluish_green.material b/Gems/Atom/Feature/Common/Assets/Materials/Presets/MacBeth/06_bluish_green.material index 86e4fcb19d..a8e411ddcd 100644 --- a/Gems/Atom/Feature/Common/Assets/Materials/Presets/MacBeth/06_bluish_green.material +++ b/Gems/Atom/Feature/Common/Assets/Materials/Presets/MacBeth/06_bluish_green.material @@ -1,18 +1,17 @@ { "description": "", - "materialType": "Materials\\Types\\StandardPBR.materialtype", - "parentMaterial": "Materials\\Presets\\MacBeth\\00_illuminant.material", - "propertyLayoutVersion": 3, + "parentMaterial": "00_illuminant.material", + "materialType": "../../Types/StandardPBR.materialtype", + "materialTypeVersion": 4, "properties": { "baseColor": { "color": [ 0.12477302551269531, 0.5209887623786926, - 0.40723279118537905, + 0.40723279118537903, 1.0 ], - "textureMap": "Materials/Presets/MacBeth/06_bluish_green_sRGB.tif", "useTexture": false } } -} +} \ No newline at end of file diff --git a/Gems/Atom/Feature/Common/Assets/Materials/Presets/MacBeth/06_bluish_green_tex.material b/Gems/Atom/Feature/Common/Assets/Materials/Presets/MacBeth/06_bluish_green_tex.material index 13b3cf293d..63392a2ced 100644 --- a/Gems/Atom/Feature/Common/Assets/Materials/Presets/MacBeth/06_bluish_green_tex.material +++ b/Gems/Atom/Feature/Common/Assets/Materials/Presets/MacBeth/06_bluish_green_tex.material @@ -1,8 +1,8 @@ { "description": "", - "materialType": "Materials\\Types\\StandardPBR.materialtype", - "parentMaterial": "Materials\\Presets\\MacBeth\\06_bluish_green.material", - "propertyLayoutVersion": 3, + "parentMaterial": "06_bluish_green.material", + "materialType": "../../Types/StandardPBR.materialtype", + "materialTypeVersion": 4, "properties": { "baseColor": { "color": [ @@ -11,7 +11,9 @@ 1.0, 1.0 ], + "textureBlendMode": "Lerp", + "textureMap": "06_bluish_green_sRGB.tif", "useTexture": true } } -} +} \ No newline at end of file diff --git a/Gems/Atom/Feature/Common/Assets/Materials/Presets/MacBeth/07_orange.material b/Gems/Atom/Feature/Common/Assets/Materials/Presets/MacBeth/07_orange.material index f60f82f16c..c1c76e8eaf 100644 --- a/Gems/Atom/Feature/Common/Assets/Materials/Presets/MacBeth/07_orange.material +++ b/Gems/Atom/Feature/Common/Assets/Materials/Presets/MacBeth/07_orange.material @@ -1,16 +1,16 @@ { "description": "", - "materialType": "Materials\\Types\\StandardPBR.materialtype", - "parentMaterial": "Materials\\Presets\\MacBeth\\00_illuminant.material", - "propertyLayoutVersion": 3, + "parentMaterial": "00_illuminant.material", + "materialType": "../../Types/StandardPBR.materialtype", + "materialTypeVersion": 4, "properties": { "baseColor": { "color": [ 0.7156938910484314, - 0.19806210696697236, - 0.026245517656207086, + 0.19806210696697235, + 0.026245517656207085, 1.0 ] } } -} +} \ No newline at end of file diff --git a/Gems/Atom/Feature/Common/Assets/Materials/Presets/MacBeth/07_orange_tex.material b/Gems/Atom/Feature/Common/Assets/Materials/Presets/MacBeth/07_orange_tex.material index 8db258d41f..c39a5283f5 100644 --- a/Gems/Atom/Feature/Common/Assets/Materials/Presets/MacBeth/07_orange_tex.material +++ b/Gems/Atom/Feature/Common/Assets/Materials/Presets/MacBeth/07_orange_tex.material @@ -1,8 +1,8 @@ { "description": "", - "materialType": "Materials\\Types\\StandardPBR.materialtype", - "parentMaterial": "Materials\\Presets\\MacBeth\\07_orange.material", - "propertyLayoutVersion": 3, + "parentMaterial": "07_orange.material", + "materialType": "../../Types/StandardPBR.materialtype", + "materialTypeVersion": 4, "properties": { "baseColor": { "color": [ @@ -11,7 +11,8 @@ 1.0, 1.0 ], - "textureMap": "Materials/Presets/MacBeth/07_orange_sRGB.tif" + "textureBlendMode": "Lerp", + "textureMap": "07_orange_sRGB.tif" } } -} +} \ No newline at end of file diff --git a/Gems/Atom/Feature/Common/Assets/Materials/Presets/MacBeth/08_purplish_blue.material b/Gems/Atom/Feature/Common/Assets/Materials/Presets/MacBeth/08_purplish_blue.material index 5e978ea495..4abdf60285 100644 --- a/Gems/Atom/Feature/Common/Assets/Materials/Presets/MacBeth/08_purplish_blue.material +++ b/Gems/Atom/Feature/Common/Assets/Materials/Presets/MacBeth/08_purplish_blue.material @@ -1,18 +1,17 @@ { "description": "", - "materialType": "Materials\\Types\\StandardPBR.materialtype", - "parentMaterial": "Materials\\Presets\\MacBeth\\00_illuminant.material", - "propertyLayoutVersion": 3, + "parentMaterial": "00_illuminant.material", + "materialType": "../../Types/StandardPBR.materialtype", + "materialTypeVersion": 4, "properties": { "baseColor": { "color": [ 0.06480506807565689, 0.10702677816152573, - 0.39157700538635256, + 0.39157700538635254, 1.0 ], - "textureMap": "Materials/Presets/MacBeth/08_purplish_blue_sRGB.tif", "useTexture": false } } -} +} \ No newline at end of file diff --git a/Gems/Atom/Feature/Common/Assets/Materials/Presets/MacBeth/08_purplish_blue_tex.material b/Gems/Atom/Feature/Common/Assets/Materials/Presets/MacBeth/08_purplish_blue_tex.material index 0ae7ea5e92..867065b3c8 100644 --- a/Gems/Atom/Feature/Common/Assets/Materials/Presets/MacBeth/08_purplish_blue_tex.material +++ b/Gems/Atom/Feature/Common/Assets/Materials/Presets/MacBeth/08_purplish_blue_tex.material @@ -1,8 +1,8 @@ { "description": "", - "materialType": "Materials\\Types\\StandardPBR.materialtype", - "parentMaterial": "Materials\\Presets\\MacBeth\\08_purplish_blue.material", - "propertyLayoutVersion": 3, + "parentMaterial": "08_purplish_blue.material", + "materialType": "../../Types/StandardPBR.materialtype", + "materialTypeVersion": 4, "properties": { "baseColor": { "color": [ @@ -11,7 +11,9 @@ 1.0, 1.0 ], + "textureBlendMode": "Lerp", + "textureMap": "08_purplish_blue_sRGB.tif", "useTexture": true } } -} +} \ No newline at end of file diff --git a/Gems/Atom/Feature/Common/Assets/Materials/Presets/MacBeth/09_moderate_red.material b/Gems/Atom/Feature/Common/Assets/Materials/Presets/MacBeth/09_moderate_red.material index 86d9714b41..0e38da555b 100644 --- a/Gems/Atom/Feature/Common/Assets/Materials/Presets/MacBeth/09_moderate_red.material +++ b/Gems/Atom/Feature/Common/Assets/Materials/Presets/MacBeth/09_moderate_red.material @@ -1,8 +1,8 @@ { "description": "", - "materialType": "Materials\\Types\\StandardPBR.materialtype", - "parentMaterial": "Materials\\Presets\\MacBeth\\00_illuminant.material", - "propertyLayoutVersion": 3, + "parentMaterial": "00_illuminant.material", + "materialType": "../../Types/StandardPBR.materialtype", + "materialTypeVersion": 4, "properties": { "baseColor": { "color": [ @@ -11,8 +11,7 @@ 0.12213321030139923, 1.0 ], - "textureMap": "Materials/Presets/MacBeth/09_moderate_red_sRGB.tif", "useTexture": false } } -} +} \ No newline at end of file diff --git a/Gems/Atom/Feature/Common/Assets/Materials/Presets/MacBeth/09_moderate_red_tex.material b/Gems/Atom/Feature/Common/Assets/Materials/Presets/MacBeth/09_moderate_red_tex.material index a738a10dfd..5beb254b70 100644 --- a/Gems/Atom/Feature/Common/Assets/Materials/Presets/MacBeth/09_moderate_red_tex.material +++ b/Gems/Atom/Feature/Common/Assets/Materials/Presets/MacBeth/09_moderate_red_tex.material @@ -1,8 +1,8 @@ { "description": "", - "materialType": "Materials\\Types\\StandardPBR.materialtype", - "parentMaterial": "Materials\\Presets\\MacBeth\\09_moderate_red.material", - "propertyLayoutVersion": 3, + "parentMaterial": "09_moderate_red.material", + "materialType": "../../Types/StandardPBR.materialtype", + "materialTypeVersion": 4, "properties": { "baseColor": { "color": [ @@ -11,7 +11,9 @@ 1.0, 1.0 ], + "textureBlendMode": "Lerp", + "textureMap": "09_moderate_red_sRGB.tif", "useTexture": true } } -} +} \ No newline at end of file diff --git a/Gems/Atom/Feature/Common/Assets/Materials/Presets/MacBeth/10_purple.material b/Gems/Atom/Feature/Common/Assets/Materials/Presets/MacBeth/10_purple.material index cf9d9c2f03..98ba44f372 100644 --- a/Gems/Atom/Feature/Common/Assets/Materials/Presets/MacBeth/10_purple.material +++ b/Gems/Atom/Feature/Common/Assets/Materials/Presets/MacBeth/10_purple.material @@ -1,18 +1,17 @@ { "description": "", - "materialType": "Materials\\Types\\StandardPBR.materialtype", - "parentMaterial": "Materials\\Presets\\MacBeth\\00_illuminant.material", - "propertyLayoutVersion": 3, + "parentMaterial": "00_illuminant.material", + "materialType": "../../Types/StandardPBR.materialtype", + "materialTypeVersion": 4, "properties": { "baseColor": { "color": [ 0.10461585223674774, - 0.043732356280088428, + 0.043732356280088425, 0.1412680298089981, 1.0 ], - "textureMap": "Materials/Presets/MacBeth/10_purple_sRGB.tif", "useTexture": false } } -} +} \ No newline at end of file diff --git a/Gems/Atom/Feature/Common/Assets/Materials/Presets/MacBeth/10_purple_tex.material b/Gems/Atom/Feature/Common/Assets/Materials/Presets/MacBeth/10_purple_tex.material index f0deb97c0c..0e2b397bbf 100644 --- a/Gems/Atom/Feature/Common/Assets/Materials/Presets/MacBeth/10_purple_tex.material +++ b/Gems/Atom/Feature/Common/Assets/Materials/Presets/MacBeth/10_purple_tex.material @@ -1,8 +1,8 @@ { "description": "", - "materialType": "Materials\\Types\\StandardPBR.materialtype", - "parentMaterial": "Materials\\Presets\\MacBeth\\10_purple.material", - "propertyLayoutVersion": 3, + "parentMaterial": "10_purple.material", + "materialType": "../../Types/StandardPBR.materialtype", + "materialTypeVersion": 4, "properties": { "baseColor": { "color": [ @@ -11,7 +11,9 @@ 1.0, 1.0 ], + "textureBlendMode": "Lerp", + "textureMap": "10_purple_sRGB.tif", "useTexture": true } } -} +} \ No newline at end of file diff --git a/Gems/Atom/Feature/Common/Assets/Materials/Presets/MacBeth/11_yellow_green.material b/Gems/Atom/Feature/Common/Assets/Materials/Presets/MacBeth/11_yellow_green.material index 11b67ee518..e31941cea0 100644 --- a/Gems/Atom/Feature/Common/Assets/Materials/Presets/MacBeth/11_yellow_green.material +++ b/Gems/Atom/Feature/Common/Assets/Materials/Presets/MacBeth/11_yellow_green.material @@ -1,8 +1,8 @@ { "description": "", - "materialType": "Materials\\Types\\StandardPBR.materialtype", - "parentMaterial": "Materials\\Presets\\MacBeth\\00_illuminant.material", - "propertyLayoutVersion": 3, + "parentMaterial": "00_illuminant.material", + "materialType": "../../Types/StandardPBR.materialtype", + "materialTypeVersion": 4, "properties": { "baseColor": { "color": [ @@ -11,8 +11,7 @@ 0.0481727309525013, 1.0 ], - "textureMap": "Materials/Presets/MacBeth/11_yellow_green_sRGB.tif", "useTexture": false } } -} +} \ No newline at end of file diff --git a/Gems/Atom/Feature/Common/Assets/Materials/Presets/MacBeth/11_yellow_green_tex.material b/Gems/Atom/Feature/Common/Assets/Materials/Presets/MacBeth/11_yellow_green_tex.material index e7c081c496..ff46c8d451 100644 --- a/Gems/Atom/Feature/Common/Assets/Materials/Presets/MacBeth/11_yellow_green_tex.material +++ b/Gems/Atom/Feature/Common/Assets/Materials/Presets/MacBeth/11_yellow_green_tex.material @@ -1,8 +1,8 @@ { "description": "", - "materialType": "Materials\\Types\\StandardPBR.materialtype", - "parentMaterial": "Materials\\Presets\\MacBeth\\11_yellow_green.material", - "propertyLayoutVersion": 3, + "parentMaterial": "11_yellow_green.material", + "materialType": "../../Types/StandardPBR.materialtype", + "materialTypeVersion": 4, "properties": { "baseColor": { "color": [ @@ -11,7 +11,9 @@ 1.0, 1.0 ], + "textureBlendMode": "Lerp", + "textureMap": "11_yellow_green_sRGB.tif", "useTexture": true } } -} +} \ No newline at end of file diff --git a/Gems/Atom/Feature/Common/Assets/Materials/Presets/MacBeth/12_orange_yellow.material b/Gems/Atom/Feature/Common/Assets/Materials/Presets/MacBeth/12_orange_yellow.material index eb194f7990..101fadbe5d 100644 --- a/Gems/Atom/Feature/Common/Assets/Materials/Presets/MacBeth/12_orange_yellow.material +++ b/Gems/Atom/Feature/Common/Assets/Materials/Presets/MacBeth/12_orange_yellow.material @@ -1,18 +1,17 @@ { "description": "", - "materialType": "Materials\\Types\\StandardPBR.materialtype", - "parentMaterial": "Materials\\Presets\\MacBeth\\00_illuminant.material", - "propertyLayoutVersion": 3, + "parentMaterial": "00_illuminant.material", + "materialType": "../../Types/StandardPBR.materialtype", + "materialTypeVersion": 4, "properties": { "baseColor": { "color": [ 0.7835355401039124, - 0.35640496015548708, + 0.35640496015548706, 0.02217135950922966, 1.0 ], - "textureMap": "Materials/Presets/MacBeth/12_orange_yellow_sRGB.tif", "useTexture": false } } -} +} \ No newline at end of file diff --git a/Gems/Atom/Feature/Common/Assets/Materials/Presets/MacBeth/12_orange_yellow_tex.material b/Gems/Atom/Feature/Common/Assets/Materials/Presets/MacBeth/12_orange_yellow_tex.material index 392c99b0ba..96d112c42b 100644 --- a/Gems/Atom/Feature/Common/Assets/Materials/Presets/MacBeth/12_orange_yellow_tex.material +++ b/Gems/Atom/Feature/Common/Assets/Materials/Presets/MacBeth/12_orange_yellow_tex.material @@ -1,8 +1,8 @@ { "description": "", - "materialType": "Materials\\Types\\StandardPBR.materialtype", - "parentMaterial": "Materials\\Presets\\MacBeth\\12_orange_yellow.material", - "propertyLayoutVersion": 3, + "parentMaterial": "12_orange_yellow.material", + "materialType": "../../Types/StandardPBR.materialtype", + "materialTypeVersion": 4, "properties": { "baseColor": { "color": [ @@ -11,7 +11,9 @@ 1.0, 1.0 ], + "textureBlendMode": "Lerp", + "textureMap": "12_orange_yellow_sRGB.tif", "useTexture": true } } -} +} \ No newline at end of file diff --git a/Gems/Atom/Feature/Common/Assets/Materials/Presets/MacBeth/13_blue.material b/Gems/Atom/Feature/Common/Assets/Materials/Presets/MacBeth/13_blue.material index 0403aff6fe..cc607f8812 100644 --- a/Gems/Atom/Feature/Common/Assets/Materials/Presets/MacBeth/13_blue.material +++ b/Gems/Atom/Feature/Common/Assets/Materials/Presets/MacBeth/13_blue.material @@ -1,18 +1,17 @@ { "description": "", - "materialType": "Materials\\Types\\StandardPBR.materialtype", - "parentMaterial": "Materials\\Presets\\MacBeth\\00_illuminant.material", - "propertyLayoutVersion": 3, + "parentMaterial": "00_illuminant.material", + "materialType": "../../Types/StandardPBR.materialtype", + "materialTypeVersion": 4, "properties": { "baseColor": { "color": [ - 0.024155031889677049, + 0.024155031889677048, 0.0481727309525013, - 0.29176774621009829, + 0.29176774621009827, 1.0 ], - "textureMap": "Materials/Presets/MacBeth/13_blue_sRGB.tif", "useTexture": false } } -} +} \ No newline at end of file diff --git a/Gems/Atom/Feature/Common/Assets/Materials/Presets/MacBeth/13_blue_tex.material b/Gems/Atom/Feature/Common/Assets/Materials/Presets/MacBeth/13_blue_tex.material index fe9929f7d4..51ffbee6ed 100644 --- a/Gems/Atom/Feature/Common/Assets/Materials/Presets/MacBeth/13_blue_tex.material +++ b/Gems/Atom/Feature/Common/Assets/Materials/Presets/MacBeth/13_blue_tex.material @@ -1,8 +1,8 @@ { "description": "", - "materialType": "Materials\\Types\\StandardPBR.materialtype", - "parentMaterial": "Materials\\Presets\\MacBeth\\13_blue.material", - "propertyLayoutVersion": 3, + "parentMaterial": "13_blue.material", + "materialType": "../../Types/StandardPBR.materialtype", + "materialTypeVersion": 4, "properties": { "baseColor": { "color": [ @@ -11,7 +11,9 @@ 1.0, 1.0 ], + "textureBlendMode": "Lerp", + "textureMap": "13_blue_sRGB.tif", "useTexture": true } } -} +} \ No newline at end of file diff --git a/Gems/Atom/Feature/Common/Assets/Materials/Presets/MacBeth/14_green.material b/Gems/Atom/Feature/Common/Assets/Materials/Presets/MacBeth/14_green.material index f199575b58..22ea9ceb44 100644 --- a/Gems/Atom/Feature/Common/Assets/Materials/Presets/MacBeth/14_green.material +++ b/Gems/Atom/Feature/Common/Assets/Materials/Presets/MacBeth/14_green.material @@ -1,8 +1,8 @@ { "description": "", - "materialType": "Materials\\Types\\StandardPBR.materialtype", - "parentMaterial": "Materials\\Presets\\MacBeth\\00_illuminant.material", - "propertyLayoutVersion": 3, + "parentMaterial": "00_illuminant.material", + "materialType": "../../Types/StandardPBR.materialtype", + "materialTypeVersion": 4, "properties": { "baseColor": { "color": [ @@ -11,8 +11,7 @@ 0.06480506807565689, 1.0 ], - "textureMap": "Materials/Presets/MacBeth/14_green_sRGB.tif", "useTexture": false } } -} +} \ No newline at end of file diff --git a/Gems/Atom/Feature/Common/Assets/Materials/Presets/MacBeth/14_green_tex.material b/Gems/Atom/Feature/Common/Assets/Materials/Presets/MacBeth/14_green_tex.material index 15adcf4788..703b755f8e 100644 --- a/Gems/Atom/Feature/Common/Assets/Materials/Presets/MacBeth/14_green_tex.material +++ b/Gems/Atom/Feature/Common/Assets/Materials/Presets/MacBeth/14_green_tex.material @@ -1,8 +1,8 @@ { "description": "", - "materialType": "Materials\\Types\\StandardPBR.materialtype", - "parentMaterial": "Materials\\Presets\\MacBeth\\14_green.material", - "propertyLayoutVersion": 3, + "parentMaterial": "14_green.material", + "materialType": "../../Types/StandardPBR.materialtype", + "materialTypeVersion": 4, "properties": { "baseColor": { "color": [ @@ -11,7 +11,9 @@ 1.0, 1.0 ], + "textureBlendMode": "Lerp", + "textureMap": "14_green_sRGB.tif", "useTexture": true } } -} +} \ No newline at end of file diff --git a/Gems/Atom/Feature/Common/Assets/Materials/Presets/MacBeth/15_red.material b/Gems/Atom/Feature/Common/Assets/Materials/Presets/MacBeth/15_red.material index 6489638ba6..3f689a9ee8 100644 --- a/Gems/Atom/Feature/Common/Assets/Materials/Presets/MacBeth/15_red.material +++ b/Gems/Atom/Feature/Common/Assets/Materials/Presets/MacBeth/15_red.material @@ -1,18 +1,17 @@ { "description": "", - "materialType": "Materials\\Types\\StandardPBR.materialtype", - "parentMaterial": "Materials\\Presets\\MacBeth\\00_illuminant.material", - "propertyLayoutVersion": 3, + "parentMaterial": "00_illuminant.material", + "materialType": "../../Types/StandardPBR.materialtype", + "materialTypeVersion": 4, "properties": { "baseColor": { "color": [ - 0.43414968252182009, - 0.029556725174188615, - 0.03955138474702835, + 0.43244872157, + 0.0297351510059, + 0.0399429307193, 1.0 ], - "textureMap": "Materials/Presets/MacBeth/15_red_sRGB.tif", "useTexture": false } } -} +} \ No newline at end of file diff --git a/Gems/Atom/Feature/Common/Assets/Materials/Presets/MacBeth/15_red_sRGB.tif b/Gems/Atom/Feature/Common/Assets/Materials/Presets/MacBeth/15_red_sRGB.tif index eccc30b408..4c150db62f 100644 --- a/Gems/Atom/Feature/Common/Assets/Materials/Presets/MacBeth/15_red_sRGB.tif +++ b/Gems/Atom/Feature/Common/Assets/Materials/Presets/MacBeth/15_red_sRGB.tif @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:19e05a0f796d3a9de91ae56b4e802af8e6ad683b79275365c3220564f9eea05c -size 19460 +oid sha256:b53b8ca6b7062239398820aef6fb4145a0b6c8c7e3aae90c17b6b87f806d3579 +size 19426 diff --git a/Gems/Atom/Feature/Common/Assets/Materials/Presets/MacBeth/15_red_tex.material b/Gems/Atom/Feature/Common/Assets/Materials/Presets/MacBeth/15_red_tex.material index 79ce245674..83d2983bec 100644 --- a/Gems/Atom/Feature/Common/Assets/Materials/Presets/MacBeth/15_red_tex.material +++ b/Gems/Atom/Feature/Common/Assets/Materials/Presets/MacBeth/15_red_tex.material @@ -1,8 +1,8 @@ { "description": "", - "materialType": "Materials\\Types\\StandardPBR.materialtype", - "parentMaterial": "Materials\\Presets\\MacBeth\\15_red.material", - "propertyLayoutVersion": 3, + "parentMaterial": "15_red.material", + "materialType": "../../Types/StandardPBR.materialtype", + "materialTypeVersion": 4, "properties": { "baseColor": { "color": [ @@ -11,7 +11,9 @@ 1.0, 1.0 ], + "textureBlendMode": "Lerp", + "textureMap": "15_red_sRGB.tif", "useTexture": true } } -} +} \ No newline at end of file diff --git a/Gems/Atom/Feature/Common/Assets/Materials/Presets/MacBeth/16_yellow.material b/Gems/Atom/Feature/Common/Assets/Materials/Presets/MacBeth/16_yellow.material index f5d302126f..5dc609aa14 100644 --- a/Gems/Atom/Feature/Common/Assets/Materials/Presets/MacBeth/16_yellow.material +++ b/Gems/Atom/Feature/Common/Assets/Materials/Presets/MacBeth/16_yellow.material @@ -1,8 +1,8 @@ { "description": "", - "materialType": "Materials\\Types\\StandardPBR.materialtype", - "parentMaterial": "Materials\\Presets\\MacBeth\\00_illuminant.material", - "propertyLayoutVersion": 3, + "parentMaterial": "00_illuminant.material", + "materialType": "../../Types/StandardPBR.materialtype", + "materialTypeVersion": 4, "properties": { "baseColor": { "color": [ @@ -11,8 +11,7 @@ 0.00802624598145485, 1.0 ], - "textureMap": "Materials/Presets/MacBeth/16_yellow_sRGB.tif", "useTexture": false } } -} +} \ No newline at end of file diff --git a/Gems/Atom/Feature/Common/Assets/Materials/Presets/MacBeth/16_yellow_tex.material b/Gems/Atom/Feature/Common/Assets/Materials/Presets/MacBeth/16_yellow_tex.material index 6daa82a310..79dc6ccdcd 100644 --- a/Gems/Atom/Feature/Common/Assets/Materials/Presets/MacBeth/16_yellow_tex.material +++ b/Gems/Atom/Feature/Common/Assets/Materials/Presets/MacBeth/16_yellow_tex.material @@ -1,8 +1,8 @@ { "description": "", - "materialType": "Materials\\Types\\StandardPBR.materialtype", - "parentMaterial": "Materials\\Presets\\MacBeth\\16_yellow.material", - "propertyLayoutVersion": 3, + "parentMaterial": "16_yellow.material", + "materialType": "../../Types/StandardPBR.materialtype", + "materialTypeVersion": 4, "properties": { "baseColor": { "color": [ @@ -11,7 +11,9 @@ 1.0, 1.0 ], + "textureBlendMode": "Lerp", + "textureMap": "16_yellow_sRGB.tif", "useTexture": true } } -} +} \ No newline at end of file diff --git a/Gems/Atom/Feature/Common/Assets/Materials/Presets/MacBeth/17_magenta.material b/Gems/Atom/Feature/Common/Assets/Materials/Presets/MacBeth/17_magenta.material index 7d3019913d..1401e77bd6 100644 --- a/Gems/Atom/Feature/Common/Assets/Materials/Presets/MacBeth/17_magenta.material +++ b/Gems/Atom/Feature/Common/Assets/Materials/Presets/MacBeth/17_magenta.material @@ -1,8 +1,8 @@ { "description": "", - "materialType": "Materials\\Types\\StandardPBR.materialtype", - "parentMaterial": "Materials\\Presets\\MacBeth\\00_illuminant.material", - "propertyLayoutVersion": 3, + "parentMaterial": "00_illuminant.material", + "materialType": "../../Types/StandardPBR.materialtype", + "materialTypeVersion": 4, "properties": { "baseColor": { "color": [ @@ -11,8 +11,7 @@ 0.30498206615448, 1.0 ], - "textureMap": "Materials/Presets/MacBeth/17_magenta_sRGB.tif", "useTexture": false } } -} +} \ No newline at end of file diff --git a/Gems/Atom/Feature/Common/Assets/Materials/Presets/MacBeth/17_magenta_tex.material b/Gems/Atom/Feature/Common/Assets/Materials/Presets/MacBeth/17_magenta_tex.material index c346a3e29d..cfba129671 100644 --- a/Gems/Atom/Feature/Common/Assets/Materials/Presets/MacBeth/17_magenta_tex.material +++ b/Gems/Atom/Feature/Common/Assets/Materials/Presets/MacBeth/17_magenta_tex.material @@ -1,8 +1,8 @@ { "description": "", - "materialType": "Materials\\Types\\StandardPBR.materialtype", - "parentMaterial": "Materials\\Presets\\MacBeth\\17_magenta.material", - "propertyLayoutVersion": 3, + "parentMaterial": "17_magenta.material", + "materialType": "../../Types/StandardPBR.materialtype", + "materialTypeVersion": 4, "properties": { "baseColor": { "color": [ @@ -11,7 +11,9 @@ 1.0, 1.0 ], + "textureBlendMode": "Lerp", + "textureMap": "17_magenta_sRGB.tif", "useTexture": true } } -} +} \ No newline at end of file diff --git a/Gems/Atom/Feature/Common/Assets/Materials/Presets/MacBeth/18_cyan.material b/Gems/Atom/Feature/Common/Assets/Materials/Presets/MacBeth/18_cyan.material index 6b2ab75dbd..8a98ff95b5 100644 --- a/Gems/Atom/Feature/Common/Assets/Materials/Presets/MacBeth/18_cyan.material +++ b/Gems/Atom/Feature/Common/Assets/Materials/Presets/MacBeth/18_cyan.material @@ -1,18 +1,17 @@ { "description": "", - "materialType": "Materials\\Types\\StandardPBR.materialtype", - "parentMaterial": "Materials\\Presets\\MacBeth\\00_illuminant.material", - "propertyLayoutVersion": 3, + "parentMaterial": "00_illuminant.material", + "materialType": "../../Types/StandardPBR.materialtype", + "materialTypeVersion": 4, "properties": { "baseColor": { "color": [ 0.0, - 0.24620431661605836, + 0.24620431661605835, 0.3813229501247406, 1.0 ], - "textureMap": "Materials/Presets/MacBeth/18_cyan_sRGB.tif", "useTexture": false } } -} +} \ No newline at end of file diff --git a/Gems/Atom/Feature/Common/Assets/Materials/Presets/MacBeth/18_cyan_tex.material b/Gems/Atom/Feature/Common/Assets/Materials/Presets/MacBeth/18_cyan_tex.material index d0d5234498..a16b776687 100644 --- a/Gems/Atom/Feature/Common/Assets/Materials/Presets/MacBeth/18_cyan_tex.material +++ b/Gems/Atom/Feature/Common/Assets/Materials/Presets/MacBeth/18_cyan_tex.material @@ -1,8 +1,8 @@ { "description": "", - "materialType": "Materials\\Types\\StandardPBR.materialtype", - "parentMaterial": "Materials\\Presets\\MacBeth\\18_cyan.material", - "propertyLayoutVersion": 3, + "parentMaterial": "18_cyan.material", + "materialType": "../../Types/StandardPBR.materialtype", + "materialTypeVersion": 4, "properties": { "baseColor": { "color": [ @@ -11,7 +11,9 @@ 1.0, 1.0 ], + "textureBlendMode": "Lerp", + "textureMap": "18_cyan_sRGB.tif", "useTexture": true } } -} +} \ No newline at end of file diff --git a/Gems/Atom/Feature/Common/Assets/Materials/Presets/MacBeth/19_white_9-5_0-05D.material b/Gems/Atom/Feature/Common/Assets/Materials/Presets/MacBeth/19_white_9-5_0-05D.material index de5c5f6281..11dbd6b84d 100644 --- a/Gems/Atom/Feature/Common/Assets/Materials/Presets/MacBeth/19_white_9-5_0-05D.material +++ b/Gems/Atom/Feature/Common/Assets/Materials/Presets/MacBeth/19_white_9-5_0-05D.material @@ -1,8 +1,8 @@ { "description": "", - "materialType": "Materials\\Types\\StandardPBR.materialtype", - "parentMaterial": "Materials\\Presets\\MacBeth\\00_illuminant.material", - "propertyLayoutVersion": 3, + "parentMaterial": "00_illuminant.material", + "materialType": "../../Types/StandardPBR.materialtype", + "materialTypeVersion": 4, "properties": { "baseColor": { "color": [ @@ -11,8 +11,7 @@ 0.8713664412498474, 1.0 ], - "textureMap": "Materials/Presets/MacBeth/19_white_9-5_0-05D_sRGB.tif", "useTexture": false } } -} +} \ No newline at end of file diff --git a/Gems/Atom/Feature/Common/Assets/Materials/Presets/MacBeth/19_white_9-5_0-05D_tex.material b/Gems/Atom/Feature/Common/Assets/Materials/Presets/MacBeth/19_white_9-5_0-05D_tex.material index 9fd79a1633..424366ced6 100644 --- a/Gems/Atom/Feature/Common/Assets/Materials/Presets/MacBeth/19_white_9-5_0-05D_tex.material +++ b/Gems/Atom/Feature/Common/Assets/Materials/Presets/MacBeth/19_white_9-5_0-05D_tex.material @@ -1,8 +1,8 @@ { "description": "", - "materialType": "Materials\\Types\\StandardPBR.materialtype", - "parentMaterial": "Materials\\Presets\\MacBeth\\19_white_9-5_0-05D.material", - "propertyLayoutVersion": 3, + "parentMaterial": "19_white_9-5_0-05D.material", + "materialType": "../../Types/StandardPBR.materialtype", + "materialTypeVersion": 4, "properties": { "baseColor": { "color": [ @@ -11,7 +11,9 @@ 1.0, 1.0 ], + "textureBlendMode": "Lerp", + "textureMap": "19_white_9-5_0-05D_sRGB.tif", "useTexture": true } } -} +} \ No newline at end of file diff --git a/Gems/Atom/Feature/Common/Assets/Materials/Presets/MacBeth/20_neutral_8-0_0-23D.material b/Gems/Atom/Feature/Common/Assets/Materials/Presets/MacBeth/20_neutral_8-0_0-23D.material index 748471138d..63ba366588 100644 --- a/Gems/Atom/Feature/Common/Assets/Materials/Presets/MacBeth/20_neutral_8-0_0-23D.material +++ b/Gems/Atom/Feature/Common/Assets/Materials/Presets/MacBeth/20_neutral_8-0_0-23D.material @@ -1,8 +1,8 @@ { "description": "", - "materialType": "Materials\\Types\\StandardPBR.materialtype", - "parentMaterial": "Materials\\Presets\\MacBeth\\00_illuminant.material", - "propertyLayoutVersion": 3, + "parentMaterial": "00_illuminant.material", + "materialType": "../../Types/StandardPBR.materialtype", + "materialTypeVersion": 4, "properties": { "baseColor": { "color": [ @@ -11,8 +11,7 @@ 0.5840848684310913, 1.0 ], - "textureMap": "Materials/Presets/MacBeth/20_neutral_8-0_0-23D_sRGB.tif", "useTexture": false } } -} +} \ No newline at end of file diff --git a/Gems/Atom/Feature/Common/Assets/Materials/Presets/MacBeth/20_neutral_8-0_0-23D_tex.material b/Gems/Atom/Feature/Common/Assets/Materials/Presets/MacBeth/20_neutral_8-0_0-23D_tex.material index 3a23f07bfa..5cd5c32c7b 100644 --- a/Gems/Atom/Feature/Common/Assets/Materials/Presets/MacBeth/20_neutral_8-0_0-23D_tex.material +++ b/Gems/Atom/Feature/Common/Assets/Materials/Presets/MacBeth/20_neutral_8-0_0-23D_tex.material @@ -1,8 +1,8 @@ { "description": "", - "materialType": "Materials\\Types\\StandardPBR.materialtype", - "parentMaterial": "Materials\\Presets\\MacBeth\\20_neutral_8-0_0-23D.material", - "propertyLayoutVersion": 3, + "parentMaterial": "20_neutral_8-0_0-23D.material", + "materialType": "../../Types/StandardPBR.materialtype", + "materialTypeVersion": 4, "properties": { "baseColor": { "color": [ @@ -11,7 +11,9 @@ 1.0, 1.0 ], + "textureBlendMode": "Lerp", + "textureMap": "20_neutral_8-0_0-23D_sRGB.tif", "useTexture": true } } -} +} \ No newline at end of file diff --git a/Gems/Atom/Feature/Common/Assets/Materials/Presets/MacBeth/21_neutral_6-5_0-44D.material b/Gems/Atom/Feature/Common/Assets/Materials/Presets/MacBeth/21_neutral_6-5_0-44D.material index edfae0689f..4e7379e704 100644 --- a/Gems/Atom/Feature/Common/Assets/Materials/Presets/MacBeth/21_neutral_6-5_0-44D.material +++ b/Gems/Atom/Feature/Common/Assets/Materials/Presets/MacBeth/21_neutral_6-5_0-44D.material @@ -1,18 +1,17 @@ { "description": "", - "materialType": "Materials\\Types\\StandardPBR.materialtype", - "parentMaterial": "Materials\\Presets\\MacBeth\\00_illuminant.material", - "propertyLayoutVersion": 3, + "parentMaterial": "00_illuminant.material", + "materialType": "../../Types/StandardPBR.materialtype", + "materialTypeVersion": 4, "properties": { "baseColor": { "color": [ 0.3515373468399048, - 0.35640496015548708, - 0.35640496015548708, + 0.35640496015548706, + 0.35640496015548706, 1.0 ], - "textureMap": "Materials/Presets/MacBeth/21_neutral_6-5_0-44D_sRGB.tif", "useTexture": false } } -} +} \ No newline at end of file diff --git a/Gems/Atom/Feature/Common/Assets/Materials/Presets/MacBeth/21_neutral_6-5_0-44D_tex.material b/Gems/Atom/Feature/Common/Assets/Materials/Presets/MacBeth/21_neutral_6-5_0-44D_tex.material index bf4fe1218a..276177699a 100644 --- a/Gems/Atom/Feature/Common/Assets/Materials/Presets/MacBeth/21_neutral_6-5_0-44D_tex.material +++ b/Gems/Atom/Feature/Common/Assets/Materials/Presets/MacBeth/21_neutral_6-5_0-44D_tex.material @@ -1,8 +1,8 @@ { "description": "", - "materialType": "Materials\\Types\\StandardPBR.materialtype", - "parentMaterial": "Materials\\Presets\\MacBeth\\21_neutral_6-5_0-44D.material", - "propertyLayoutVersion": 3, + "parentMaterial": "21_neutral_6-5_0-44D.material", + "materialType": "../../Types/StandardPBR.materialtype", + "materialTypeVersion": 4, "properties": { "baseColor": { "color": [ @@ -11,7 +11,9 @@ 1.0, 1.0 ], + "textureBlendMode": "Lerp", + "textureMap": "21_neutral_6-5_0-44D_sRGB.tif", "useTexture": true } } -} +} \ No newline at end of file diff --git a/Gems/Atom/Feature/Common/Assets/Materials/Presets/MacBeth/22_neutral_5-0_0-70D.material b/Gems/Atom/Feature/Common/Assets/Materials/Presets/MacBeth/22_neutral_5-0_0-70D.material index a758b474f7..894c3826c3 100644 --- a/Gems/Atom/Feature/Common/Assets/Materials/Presets/MacBeth/22_neutral_5-0_0-70D.material +++ b/Gems/Atom/Feature/Common/Assets/Materials/Presets/MacBeth/22_neutral_5-0_0-70D.material @@ -1,18 +1,17 @@ { "description": "", - "materialType": "Materials\\Types\\StandardPBR.materialtype", - "parentMaterial": "Materials\\Presets\\MacBeth\\00_illuminant.material", - "propertyLayoutVersion": 3, + "parentMaterial": "00_illuminant.material", + "materialType": "../../Types/StandardPBR.materialtype", + "materialTypeVersion": 4, "properties": { "baseColor": { "color": [ - 0.18782329559326173, + 0.18782329559326172, 0.191195547580719, 0.191195547580719, 1.0 ], - "textureMap": "Materials/Presets/MacBeth/22_neutral_5-0_0-70D_sRGB.tif", "useTexture": false } } -} +} \ No newline at end of file diff --git a/Gems/Atom/Feature/Common/Assets/Materials/Presets/MacBeth/22_neutral_5-0_0-70D_tex.material b/Gems/Atom/Feature/Common/Assets/Materials/Presets/MacBeth/22_neutral_5-0_0-70D_tex.material index 69b18cb115..b365408fae 100644 --- a/Gems/Atom/Feature/Common/Assets/Materials/Presets/MacBeth/22_neutral_5-0_0-70D_tex.material +++ b/Gems/Atom/Feature/Common/Assets/Materials/Presets/MacBeth/22_neutral_5-0_0-70D_tex.material @@ -1,8 +1,8 @@ { "description": "", - "materialType": "Materials\\Types\\StandardPBR.materialtype", - "parentMaterial": "Materials\\Presets\\MacBeth\\22_neutral_5-0_0-70D.material", - "propertyLayoutVersion": 3, + "parentMaterial": "22_neutral_5-0_0-70D.material", + "materialType": "../../Types/StandardPBR.materialtype", + "materialTypeVersion": 4, "properties": { "baseColor": { "color": [ @@ -11,7 +11,9 @@ 1.0, 1.0 ], + "textureBlendMode": "Lerp", + "textureMap": "22_neutral_5-0_0-70D_sRGB.tif", "useTexture": true } } -} +} \ No newline at end of file diff --git a/Gems/Atom/Feature/Common/Assets/Materials/Presets/MacBeth/23_neutral_3-5_1-05D.material b/Gems/Atom/Feature/Common/Assets/Materials/Presets/MacBeth/23_neutral_3-5_1-05D.material index 7ce60b545b..33a89bae94 100644 --- a/Gems/Atom/Feature/Common/Assets/Materials/Presets/MacBeth/23_neutral_3-5_1-05D.material +++ b/Gems/Atom/Feature/Common/Assets/Materials/Presets/MacBeth/23_neutral_3-5_1-05D.material @@ -1,8 +1,8 @@ { "description": "", - "materialType": "Materials\\Types\\StandardPBR.materialtype", - "parentMaterial": "Materials\\Presets\\MacBeth\\00_illuminant.material", - "propertyLayoutVersion": 3, + "parentMaterial": "00_illuminant.material", + "materialType": "../../Types/StandardPBR.materialtype", + "materialTypeVersion": 4, "properties": { "baseColor": { "color": [ @@ -11,8 +11,7 @@ 0.09083695709705353, 1.0 ], - "textureMap": "Materials/Presets/MacBeth/23_neutral_3-5_1-05D_sRGB.tif", "useTexture": false } } -} +} \ No newline at end of file diff --git a/Gems/Atom/Feature/Common/Assets/Materials/Presets/MacBeth/23_neutral_3-5_1-05D_tex.material b/Gems/Atom/Feature/Common/Assets/Materials/Presets/MacBeth/23_neutral_3-5_1-05D_tex.material index 1b77a786c9..ddade882b3 100644 --- a/Gems/Atom/Feature/Common/Assets/Materials/Presets/MacBeth/23_neutral_3-5_1-05D_tex.material +++ b/Gems/Atom/Feature/Common/Assets/Materials/Presets/MacBeth/23_neutral_3-5_1-05D_tex.material @@ -1,8 +1,8 @@ { "description": "", - "materialType": "Materials\\Types\\StandardPBR.materialtype", - "parentMaterial": "Materials\\Presets\\MacBeth\\23_neutral_3-5_1-05D.material", - "propertyLayoutVersion": 3, + "parentMaterial": "23_neutral_3-5_1-05D.material", + "materialType": "../../Types/StandardPBR.materialtype", + "materialTypeVersion": 4, "properties": { "baseColor": { "color": [ @@ -11,7 +11,9 @@ 1.0, 1.0 ], + "textureBlendMode": "Lerp", + "textureMap": "23_neutral_3-5_1-05D_sRGB.tif", "useTexture": true } } -} +} \ No newline at end of file diff --git a/Gems/Atom/Feature/Common/Assets/Materials/Presets/MacBeth/24_black_2-0_1-50D.material b/Gems/Atom/Feature/Common/Assets/Materials/Presets/MacBeth/24_black_2-0_1-50D.material index f448eea265..0e7f6a7bc1 100644 --- a/Gems/Atom/Feature/Common/Assets/Materials/Presets/MacBeth/24_black_2-0_1-50D.material +++ b/Gems/Atom/Feature/Common/Assets/Materials/Presets/MacBeth/24_black_2-0_1-50D.material @@ -1,8 +1,8 @@ { "description": "", - "materialType": "Materials\\Types\\StandardPBR.materialtype", - "parentMaterial": "Materials\\Presets\\MacBeth\\00_illuminant.material", - "propertyLayoutVersion": 3, + "parentMaterial": "00_illuminant.material", + "materialType": "../../Types/StandardPBR.materialtype", + "materialTypeVersion": 4, "properties": { "baseColor": { "color": [ @@ -11,8 +11,7 @@ 0.0318913571536541, 1.0 ], - "textureMap": "Materials/Presets/MacBeth/24_black_2-0_1-50D_sRGB.tif", "useTexture": false } } -} +} \ No newline at end of file diff --git a/Gems/Atom/Feature/Common/Assets/Materials/Presets/MacBeth/24_black_2-0_1-50D_tex.material b/Gems/Atom/Feature/Common/Assets/Materials/Presets/MacBeth/24_black_2-0_1-50D_tex.material index 8530dc7ffc..a3c95a8e71 100644 --- a/Gems/Atom/Feature/Common/Assets/Materials/Presets/MacBeth/24_black_2-0_1-50D_tex.material +++ b/Gems/Atom/Feature/Common/Assets/Materials/Presets/MacBeth/24_black_2-0_1-50D_tex.material @@ -1,8 +1,8 @@ { "description": "", - "materialType": "Materials\\Types\\StandardPBR.materialtype", - "parentMaterial": "Materials\\Presets\\MacBeth\\24_black_2-0_1-50D.material", - "propertyLayoutVersion": 3, + "parentMaterial": "24_black_2-0_1-50D.material", + "materialType": "../../Types/StandardPBR.materialtype", + "materialTypeVersion": 4, "properties": { "baseColor": { "color": [ @@ -11,7 +11,9 @@ 1.0, 1.0 ], + "textureBlendMode": "Lerp", + "textureMap": "24_black_2-0_1-50D_sRGB.tif", "useTexture": true } } -} +} \ No newline at end of file diff --git a/Gems/Atom/Feature/Common/Assets/Materials/Presets/MacBeth/macbeth_lab_16bit_2014_sRGB.material b/Gems/Atom/Feature/Common/Assets/Materials/Presets/MacBeth/macbeth_lab_16bit_2014_sRGB.material index a67b484c31..f70b3538aa 100644 --- a/Gems/Atom/Feature/Common/Assets/Materials/Presets/MacBeth/macbeth_lab_16bit_2014_sRGB.material +++ b/Gems/Atom/Feature/Common/Assets/Materials/Presets/MacBeth/macbeth_lab_16bit_2014_sRGB.material @@ -1,11 +1,11 @@ { "description": "", - "materialType": "Materials\\Types\\StandardPBR.materialtype", - "parentMaterial": "Materials\\Presets\\MacBeth\\00_illuminant.material", - "propertyLayoutVersion": 3, + "parentMaterial": "00_illuminant.material", + "materialType": "../../Types/StandardPBR.materialtype", + "materialTypeVersion": 4, "properties": { "baseColor": { - "textureMap": "Materials/Presets/MacBeth/ColorChecker_sRGB_from_Lab_16bit_AfterNov2014.tif" + "textureMap": "ColorChecker_sRGB_from_Lab_16bit_AfterNov2014.tif" } } -} +} \ No newline at end of file diff --git a/Gems/Atom/Feature/Common/Assets/Materials/Types/EnhancedPBR.materialtype b/Gems/Atom/Feature/Common/Assets/Materials/Types/EnhancedPBR.materialtype index 5de756067a..d4b5882f21 100644 --- a/Gems/Atom/Feature/Common/Assets/Materials/Types/EnhancedPBR.materialtype +++ b/Gems/Atom/Feature/Common/Assets/Materials/Types/EnhancedPBR.materialtype @@ -1652,6 +1652,12 @@ "file": "EnhancedPBR_SubsurfaceState.lua" } }, + { + "type": "Lua", + "args": { + "file": "EnhancedPBR_Anisotropy.lua" + } + }, { "type": "Lua", "args": { diff --git a/Gems/Atom/Feature/Common/Assets/Materials/Types/EnhancedPBR_Anisotropy.lua b/Gems/Atom/Feature/Common/Assets/Materials/Types/EnhancedPBR_Anisotropy.lua new file mode 100644 index 0000000000..575a3a3d5e --- /dev/null +++ b/Gems/Atom/Feature/Common/Assets/Materials/Types/EnhancedPBR_Anisotropy.lua @@ -0,0 +1,41 @@ +-------------------------------------------------------------------------------------- +-- +-- Copyright (c) Contributors to the Open 3D Engine Project. +-- For complete copyright and license terms please see the LICENSE at the root of this distribution. +-- +-- SPDX-License-Identifier: Apache-2.0 OR MIT +-- +-- +-- +---------------------------------------------------------------------------------------------------- + +function GetMaterialPropertyDependencies() + return { + "anisotropy.enableAnisotropy" + , "anisotropy.factor" + , "anisotropy.anisotropyAngle" + } +end + +function GetShaderOptionDependencies() + return {"o_enableAnisotropy"} +end + +function Process(context) + local enableAnisotropy = context:GetMaterialPropertyValue_bool("anisotropy.enableAnisotropy") +end + +function ProcessEditor(context) + + local enableAnisotropy = context:GetMaterialPropertyValue_bool("anisotropy.enableAnisotropy") + + local visibility + if(enableAnisotropy) then + visibility = MaterialPropertyVisibility_Enabled + else + visibility = MaterialPropertyVisibility_Hidden + end + + context:SetMaterialPropertyVisibility("anisotropy.factor", visibility) + context:SetMaterialPropertyVisibility("anisotropy.anisotropyAngle", visibility) +end diff --git a/Gems/Atom/Feature/Common/Assets/Materials/Types/Skin.materialtype b/Gems/Atom/Feature/Common/Assets/Materials/Types/Skin.materialtype index e2a05aa916..a49eba7975 100644 --- a/Gems/Atom/Feature/Common/Assets/Materials/Types/Skin.materialtype +++ b/Gems/Atom/Feature/Common/Assets/Materials/Types/Skin.materialtype @@ -1084,6 +1084,12 @@ "file": "Skin_WrinkleMaps.lua" } }, + { + "type": "Lua", + "args": { + "file": "Skin_SpecularF0.lua" + } + }, { "type": "Lua", "args": { diff --git a/Gems/Atom/Feature/Common/Assets/Materials/Types/Skin_SpecularF0.lua b/Gems/Atom/Feature/Common/Assets/Materials/Types/Skin_SpecularF0.lua new file mode 100644 index 0000000000..d727e8f301 --- /dev/null +++ b/Gems/Atom/Feature/Common/Assets/Materials/Types/Skin_SpecularF0.lua @@ -0,0 +1,30 @@ +-------------------------------------------------------------------------------------- +-- +-- Copyright (c) Contributors to the Open 3D Engine Project. +-- For complete copyright and license terms please see the LICENSE at the root of this distribution. +-- +-- SPDX-License-Identifier: Apache-2.0 OR MIT +-- +-- +-- +---------------------------------------------------------------------------------------------------- + +function GetMaterialPropertyDependencies() + return { + "specularF0.enableMultiScatterCompensation" + } +end + +function GetShaderOptionDependencies() + return { + "o_specularF0_enableMultiScatterCompensation" + } +end + +function Process(context) + local enableMultiScatterCompensation = context:GetMaterialPropertyValue_bool("specularF0.enableMultiScatterCompensation") +end + +function ProcessEditor(context) + context:SetMaterialPropertyVisibility("specularF0.enableMultiScatterCompensation", MaterialPropertyVisibility_Hidden) +end \ No newline at end of file diff --git a/Gems/Atom/Feature/Common/Assets/Materials/Types/StandardMultilayerPBR_ForwardPass.azsl b/Gems/Atom/Feature/Common/Assets/Materials/Types/StandardMultilayerPBR_ForwardPass.azsl index a53dab7a01..8f58c6dd33 100644 --- a/Gems/Atom/Feature/Common/Assets/Materials/Types/StandardMultilayerPBR_ForwardPass.azsl +++ b/Gems/Atom/Feature/Common/Assets/Materials/Types/StandardMultilayerPBR_ForwardPass.azsl @@ -153,7 +153,7 @@ struct StandardMaterialInputs float2 m_vertexUv[UvSetCount]; float3x3 m_uvMatrix; - float m_normal; + float3 m_normal; float3 m_tangents[UvSetCount]; float3 m_bitangents[UvSetCount]; diff --git a/Gems/Atom/Feature/Common/Assets/Materials/Types/StandardPBR_ClearCoatState.lua b/Gems/Atom/Feature/Common/Assets/Materials/Types/StandardPBR_ClearCoatState.lua index 3d7eca134e..50644adef4 100644 --- a/Gems/Atom/Feature/Common/Assets/Materials/Types/StandardPBR_ClearCoatState.lua +++ b/Gems/Atom/Feature/Common/Assets/Materials/Types/StandardPBR_ClearCoatState.lua @@ -58,6 +58,15 @@ function UpdateTextureDependentPropertyVisibility(context, textureMapPropertyNam end end +function UpdateNormalStrengthPropertyVisibility(context, textureMapPropertyName, useTexturePropertyName) + local textureMap = context:GetMaterialPropertyValue_Image(textureMapPropertyName) + local useTexture = context:GetMaterialPropertyValue_bool(useTexturePropertyName) + + if(textureMap == nil) or (not useTexture) then + context:SetMaterialPropertyVisibility("clearCoat.normalStrength", MaterialPropertyVisibility_Hidden) + end +end + function ProcessEditor(context) local enable = context:GetMaterialPropertyValue_bool("clearCoat.enable") @@ -79,10 +88,12 @@ function ProcessEditor(context) context:SetMaterialPropertyVisibility("clearCoat.normalMap", mainVisibility) context:SetMaterialPropertyVisibility("clearCoat.useNormalMap", mainVisibility) context:SetMaterialPropertyVisibility("clearCoat.normalMapUv", mainVisibility) + context:SetMaterialPropertyVisibility("clearCoat.normalStrength", mainVisibility) if(enable) then UpdateTextureDependentPropertyVisibility(context, "clearCoat.influenceMap", "clearCoat.useInfluenceMap", "clearCoat.influenceMapUv") UpdateTextureDependentPropertyVisibility(context, "clearCoat.roughnessMap", "clearCoat.useRoughnessMap", "clearCoat.roughnessMapUv") UpdateTextureDependentPropertyVisibility(context, "clearCoat.normalMap", "clearCoat.useNormalMap", "clearCoat.normalMapUv") + UpdateNormalStrengthPropertyVisibility(context, "clearCoat.normalMap", "clearCoat.useNormalMap") end end diff --git a/Gems/Atom/Feature/Common/Assets/Materials/Types/StandardPBR_DepthPass_WithPS.azsl b/Gems/Atom/Feature/Common/Assets/Materials/Types/StandardPBR_DepthPass_WithPS.azsl index 136841907b..04fd104407 100644 --- a/Gems/Atom/Feature/Common/Assets/Materials/Types/StandardPBR_DepthPass_WithPS.azsl +++ b/Gems/Atom/Feature/Common/Assets/Materials/Types/StandardPBR_DepthPass_WithPS.azsl @@ -29,7 +29,7 @@ struct VSInput struct VSDepthOutput { // "centroid" is needed for SV_Depth to compile - linear centroid float4 m_position : SV_Position; + precise linear centroid float4 m_position : SV_Position; float2 m_uv[UvSetCount] : UV1; // only used for parallax depth calculation @@ -63,7 +63,7 @@ VSDepthOutput MainVS(VSInput IN) struct PSDepthOutput { - float m_depth : SV_Depth; + precise float m_depth : SV_Depth; }; PSDepthOutput MainPS(VSDepthOutput IN, bool isFrontFace : SV_IsFrontFace) diff --git a/Gems/Atom/Feature/Common/Assets/Materials/Types/StandardPBR_ForwardPass.azsl b/Gems/Atom/Feature/Common/Assets/Materials/Types/StandardPBR_ForwardPass.azsl index 1d5e4ad9e3..b99ea734af 100644 --- a/Gems/Atom/Feature/Common/Assets/Materials/Types/StandardPBR_ForwardPass.azsl +++ b/Gems/Atom/Feature/Common/Assets/Materials/Types/StandardPBR_ForwardPass.azsl @@ -62,7 +62,7 @@ struct VSOutput { // Base fields (required by the template azsli file)... // "centroid" is needed for SV_Depth to compile - linear centroid float4 m_position : SV_Position; + precise linear centroid float4 m_position : SV_Position; float3 m_normal: NORMAL; float3 m_tangent : TANGENT; float3 m_bitangent : BITANGENT; diff --git a/Gems/Atom/Feature/Common/Assets/Materials/Types/StandardPBR_HandleOpacityMode.lua b/Gems/Atom/Feature/Common/Assets/Materials/Types/StandardPBR_HandleOpacityMode.lua index 9315131e44..462d433d34 100644 --- a/Gems/Atom/Feature/Common/Assets/Materials/Types/StandardPBR_HandleOpacityMode.lua +++ b/Gems/Atom/Feature/Common/Assets/Materials/Types/StandardPBR_HandleOpacityMode.lua @@ -91,6 +91,10 @@ function ProcessEditor(context) if(mainVisibility == MaterialPropertyVisibility_Enabled) then local alphaSource = context:GetMaterialPropertyValue_enum("opacity.alphaSource") + if (opacityMode == OpacityMode_Cutout and alphaSource == AlphaSource_None) then + context:SetMaterialPropertyVisibility("opacity.factor", MaterialPropertyVisibility_Hidden) + end + if(alphaSource ~= AlphaSource_Split) then context:SetMaterialPropertyVisibility("opacity.textureMap", MaterialPropertyVisibility_Hidden) context:SetMaterialPropertyVisibility("opacity.textureMapUv", MaterialPropertyVisibility_Hidden) diff --git a/Gems/Atom/Feature/Common/Assets/Passes/DiffuseGlobalIllumination.pass b/Gems/Atom/Feature/Common/Assets/Passes/DiffuseGlobalIllumination.pass index bd17939925..45278cd511 100644 --- a/Gems/Atom/Feature/Common/Assets/Passes/DiffuseGlobalIllumination.pass +++ b/Gems/Atom/Feature/Common/Assets/Passes/DiffuseGlobalIllumination.pass @@ -26,6 +26,54 @@ "Name": "DepthStencilInputOutput", "SlotType": "InputOutput", "ScopeAttachmentUsage": "DepthStencil" + }, + { + "Name": "IrradianceOutput", + "SlotType": "InputOutput", + "ScopeAttachmentUsage": "RenderTarget", + "LoadStoreAction": { + "ClearValue": { + "Value": [ + 0.0, + 0.0, + 0.0, + 0.0 + ] + }, + "LoadAction": "Clear" + } + } + ], + "ImageAttachments": [ + { + "Name": "IrradianceImage", + "SizeSource": { + "Source": { + "Pass": "This", + "Attachment": "NormalInput" + }, + "Multipliers": { + "WidthMultiplier": 0.25, + "HeightMultiplier": 0.25 + } + }, + "MultisampleSource": { + "Pass": "This", + "Attachment": "NormalInput" + }, + "ImageDescriptor": { + "Format": "R16G16B16A16_FLOAT", + "SharedQueueMask": "Graphics" + } + } + ], + "Connections": [ + { + "LocalSlot": "IrradianceOutput", + "AttachmentRef": { + "Pass": "This", + "Attachment": "IrradianceImage" + } } ], "PassRequests": [ @@ -78,7 +126,7 @@ { "LocalSlot": "Output", "AttachmentRef": { - "Pass": "DiffuseProbeGridDownsamplePass", + "Pass": "Parent", "Attachment": "IrradianceOutput" } } diff --git a/Gems/Atom/Feature/Common/Assets/Passes/DiffuseProbeGridDownsample.pass b/Gems/Atom/Feature/Common/Assets/Passes/DiffuseProbeGridDownsample.pass index 266f65f37b..0560cc2d75 100644 --- a/Gems/Atom/Feature/Common/Assets/Passes/DiffuseProbeGridDownsample.pass +++ b/Gems/Atom/Feature/Common/Assets/Passes/DiffuseProbeGridDownsample.pass @@ -5,7 +5,7 @@ "ClassData": { "PassTemplate": { "Name": "DiffuseProbeGridDownsamplePassTemplate", - "PassClass": "FullScreenTriangle", + "PassClass": "DiffuseProbeGridDownsamplePass", "Slots": [ { "Name": "NormalInput", @@ -38,24 +38,6 @@ "LoadStoreAction": { "LoadAction": "DontCare" } - }, - { - // Note: this is attached here to ensure that the image is cleared, - // but it is not used as an output from the shader - "Name": "IrradianceOutput", - "SlotType": "Output", - "ScopeAttachmentUsage": "RenderTarget", - "LoadStoreAction": { - "ClearValue": { - "Value": [ - 0.0, - 0.0, - 0.0, - 0.0 - ] - }, - "LoadAction": "Clear" - } } ], "ImageAttachments": [ @@ -103,27 +85,6 @@ "Format": "R16G16B16A16_FLOAT", "SharedQueueMask": "Graphics" } - }, - { - "Name": "IrradianceImage", - "SizeSource": { - "Source": { - "Pass": "This", - "Attachment": "NormalInput" - }, - "Multipliers": { - "WidthMultiplier": 0.25, - "HeightMultiplier": 0.25 - } - }, - "MultisampleSource": { - "Pass": "This", - "Attachment": "NormalInput" - }, - "ImageDescriptor": { - "Format": "R16G16B16A16_FLOAT", - "SharedQueueMask": "Graphics" - } } ], "Connections": [ @@ -140,13 +101,6 @@ "Pass": "This", "Attachment": "DownsampledDepthImage" } - }, - { - "LocalSlot": "IrradianceOutput", - "AttachmentRef": { - "Pass": "This", - "Attachment": "IrradianceImage" - } } ], "PassData": { diff --git a/Gems/Atom/Feature/Common/Assets/Passes/DiffuseProbeGridRender.pass b/Gems/Atom/Feature/Common/Assets/Passes/DiffuseProbeGridRender.pass index 69c5f48c9c..825a8bad2a 100644 --- a/Gems/Atom/Feature/Common/Assets/Passes/DiffuseProbeGridRender.pass +++ b/Gems/Atom/Feature/Common/Assets/Passes/DiffuseProbeGridRender.pass @@ -25,7 +25,12 @@ { "Name": "DepthStencilInput", "SlotType": "Input", - "ScopeAttachmentUsage": "DepthStencil" + "ScopeAttachmentUsage": "DepthStencil", + "ImageViewDesc": { + "AspectFlags": [ + "Depth" + ] + } }, { "Name": "Output", diff --git a/Gems/Atom/Feature/Common/Assets/Passes/EnvironmentCubeMapForwardMSAA.pass b/Gems/Atom/Feature/Common/Assets/Passes/EnvironmentCubeMapForwardMSAA.pass index 877ae489c0..683346c291 100644 --- a/Gems/Atom/Feature/Common/Assets/Passes/EnvironmentCubeMapForwardMSAA.pass +++ b/Gems/Atom/Feature/Common/Assets/Passes/EnvironmentCubeMapForwardMSAA.pass @@ -91,10 +91,10 @@ "LoadStoreAction": { "ClearValue": { "Value": [ - 0.4000000059604645, - 0.4000000059604645, - 0.4000000059604645, - {} + 0.0, + 0.0, + 0.0, + 0.0 ] }, "LoadAction": "Clear" @@ -107,10 +107,10 @@ "LoadStoreAction": { "ClearValue": { "Value": [ - 0.4000000059604645, - 0.4000000059604645, - 0.4000000059604645, - {} + 0.0, + 0.0, + 0.0, + 0.0 ] }, "LoadAction": "Clear" diff --git a/Gems/Atom/Feature/Common/Assets/Passes/EnvironmentCubeMapForwardSubsurfaceMSAA.pass b/Gems/Atom/Feature/Common/Assets/Passes/EnvironmentCubeMapForwardSubsurfaceMSAA.pass new file mode 100644 index 0000000000..f6f7dd1e2d --- /dev/null +++ b/Gems/Atom/Feature/Common/Assets/Passes/EnvironmentCubeMapForwardSubsurfaceMSAA.pass @@ -0,0 +1,158 @@ +{ + "Type": "JsonSerialization", + "Version": 1, + "ClassName": "PassAsset", + "ClassData": { + "PassTemplate": { + "Name": "EnvironmentCubeMapForwardSubsurfaceMSAAPassTemplate", + "PassClass": "RasterPass", + "Slots": [ + // Inputs... + { + "Name": "BRDFTextureInput", + "ShaderInputName": "m_brdfMap", + "SlotType": "Input", + "ScopeAttachmentUsage": "Shader" + }, + { + "Name": "DirectionalLightShadowmap", + "ShaderInputName": "m_directionalLightShadowmap", + "SlotType": "Input", + "ScopeAttachmentUsage": "Shader", + "ImageViewDesc": { + "IsArray": 1 + } + }, + { + "Name": "ExponentialShadowmapDirectional", + "ShaderInputName": "m_directionalLightExponentialShadowmap", + "SlotType": "Input", + "ScopeAttachmentUsage": "Shader", + "ImageViewDesc": { + "IsArray": 1 + } + }, + { + "Name": "ProjectedShadowmap", + "ShaderInputName": "m_projectedShadowmaps", + "SlotType": "Input", + "ScopeAttachmentUsage": "Shader", + "ImageViewDesc": { + "IsArray": 1 + } + }, + { + "Name": "ExponentialShadowmapProjected", + "ShaderInputName": "m_projectedExponentialShadowmap", + "SlotType": "Input", + "ScopeAttachmentUsage": "Shader", + "ImageViewDesc": { + "IsArray": 1 + } + }, + { + "Name": "TileLightData", + "SlotType": "Input", + "ShaderInputName": "m_tileLightData", + "ScopeAttachmentUsage": "Shader" + }, + { + "Name": "LightListRemapped", + "SlotType": "Input", + "ShaderInputName": "m_lightListRemapped", + "ScopeAttachmentUsage": "Shader" + }, + // Input/Outputs... + { + "Name": "DepthStencilInputOutput", + "SlotType": "InputOutput", + "ScopeAttachmentUsage": "DepthStencil" + }, + { + "Name": "DiffuseOutput", + "SlotType": "InputOutput", + "ScopeAttachmentUsage": "RenderTarget" + }, + { + "Name": "SpecularOutput", + "SlotType": "InputOutput", + "ScopeAttachmentUsage": "RenderTarget" + }, + { + "Name": "AlbedoOutput", + "SlotType": "InputOutput", + "ScopeAttachmentUsage": "RenderTarget" + }, + { + "Name": "SpecularF0Output", + "SlotType": "InputOutput", + "ScopeAttachmentUsage": "RenderTarget" + }, + { + "Name": "NormalOutput", + "SlotType": "InputOutput", + "ScopeAttachmentUsage": "RenderTarget" + }, + // Outputs... + { + "Name": "ScatterDistanceOutput", + "SlotType": "Output", + "ScopeAttachmentUsage": "RenderTarget", + "LoadStoreAction": { + "ClearValue": { + "Value": [ + 0.0, + 0.0, + 0.0, + 0.0 + ] + }, + "LoadAction": "Clear" + } + } + ], + "ImageAttachments": [ + { + "Name": "BRDFTexture", + "Lifetime": "Imported", + "AssetRef": { + "FilePath": "Textures/BRDFTexture.attimage" + } + }, + { + "Name": "ScatterDistanceImage", + "SizeSource": { + "Source": { + "Pass": "Parent", + "Attachment": "Output" + } + }, + "MultisampleSource": { + "Pass": "This", + "Attachment": "DepthStencilInputOutput" + }, + "ImageDescriptor": { + "Format": "R11G11B10_FLOAT", + "SharedQueueMask": "Graphics" + } + } + ], + "Connections": [ + { + "LocalSlot": "BRDFTextureInput", + "AttachmentRef": { + "Pass": "This", + "Attachment": "BRDFTexture" + } + }, + { + "LocalSlot": "ScatterDistanceOutput", + "AttachmentRef": { + "Pass": "This", + "Attachment": "ScatterDistanceImage" + } + } + ] + } + } +} \ No newline at end of file diff --git a/Gems/Atom/Feature/Common/Assets/Passes/EnvironmentCubeMapPipeline.pass b/Gems/Atom/Feature/Common/Assets/Passes/EnvironmentCubeMapPipeline.pass index 70f1999d8c..3bd0401011 100644 --- a/Gems/Atom/Feature/Common/Assets/Passes/EnvironmentCubeMapPipeline.pass +++ b/Gems/Atom/Feature/Common/Assets/Passes/EnvironmentCubeMapPipeline.pass @@ -211,6 +211,105 @@ } } }, + { + "Name": "ForwardSubsurfaceMSAAPass", + "TemplateName": "EnvironmentCubeMapForwardSubsurfaceMSAAPassTemplate", + "Connections": [ + { + "LocalSlot": "DirectionalLightShadowmap", + "AttachmentRef": { + "Pass": "CascadedShadowmapsPass", + "Attachment": "Shadowmap" + } + }, + { + "LocalSlot": "ExponentialShadowmapDirectional", + "AttachmentRef": { + "Pass": "EsmShadowmapsPassDirectional", + "Attachment": "EsmShadowmaps" + } + }, + { + "LocalSlot": "ProjectedShadowmap", + "AttachmentRef": { + "Pass": "ProjectedShadowmapsPass", + "Attachment": "Shadowmap" + } + }, + { + "LocalSlot": "ExponentialShadowmapProjected", + "AttachmentRef": { + "Pass": "EsmShadowmapsPassProjected", + "Attachment": "EsmShadowmaps" + } + }, + { + "LocalSlot": "TileLightData", + "AttachmentRef": { + "Pass": "LightCullingPass", + "Attachment": "TileLightData" + } + }, + { + "LocalSlot": "LightListRemapped", + "AttachmentRef": { + "Pass": "LightCullingPass", + "Attachment": "LightListRemapped" + } + }, + // Input/Outputs... + { + "LocalSlot": "DepthStencilInputOutput", + "AttachmentRef": { + "Pass": "DepthPrePass", + "Attachment": "DepthMSAA" + } + }, + { + "LocalSlot": "DiffuseOutput", + "AttachmentRef": { + "Pass": "ForwardMSAAPass", + "Attachment": "DiffuseOutput" + } + }, + { + "LocalSlot": "SpecularOutput", + "AttachmentRef": { + "Pass": "ForwardMSAAPass", + "Attachment": "SpecularOutput" + } + }, + { + "LocalSlot": "AlbedoOutput", + "AttachmentRef": { + "Pass": "ForwardMSAAPass", + "Attachment": "AlbedoOutput" + } + }, + { + "LocalSlot": "SpecularF0Output", + "AttachmentRef": { + "Pass": "ForwardMSAAPass", + "Attachment": "SpecularF0Output" + } + }, + { + "LocalSlot": "NormalOutput", + "AttachmentRef": { + "Pass": "ForwardMSAAPass", + "Attachment": "NormalOutput" + } + } + ], + "PassData": { + "$type": "RasterPassData", + "DrawListTag": "forwardWithSubsurfaceOutput", + "PipelineViewTag": "MainCamera", + "PassSrgShaderAsset": { + "FilePath": "Shaders/ForwardPassSrg.shader" + } + } + }, { "Name": "SkyBoxPass", "TemplateName": "EnvironmentCubeMapSkyBoxPassTemplate", @@ -325,6 +424,75 @@ } ] }, + { + "Name": "MSAAResolveScatterDistancePass", + "TemplateName": "MSAAResolveColorTemplate", + "Connections": [ + { + "LocalSlot": "Input", + "AttachmentRef": { + "Pass": "ForwardSubsurfaceMSAAPass", + "Attachment": "ScatterDistanceOutput" + } + } + ] + }, + { + "Name": "SubsurfaceScatteringPass", + "TemplateName": "SubsurfaceScatteringPassTemplate", + "Enabled": true, + "Connections": [ + { + "LocalSlot": "InputDiffuse", + "AttachmentRef": { + "Pass": "MSAAResolveDiffusePass", + "Attachment": "Output" + } + }, + { + "LocalSlot": "InputLinearDepth", + "AttachmentRef": { + "Pass": "DepthPrePass", + "Attachment": "DepthLinear" + } + }, + { + "LocalSlot": "InputScatterDistance", + "AttachmentRef": { + "Pass": "MSAAResolveScatterDistancePass", + "Attachment": "Output" + } + } + ], + "PassData": { + "$type": "ComputePassData", + "ShaderAsset": { + "FilePath": "Shaders/PostProcessing/ScreenSpaceSubsurfaceScatteringCS.shader" + }, + "Make Fullscreen Pass": true, + "PipelineViewTag": "MainCamera" + } + }, + { + "Name": "Ssao", + "TemplateName": "SsaoParentTemplate", + "Connections": [ + { + "LocalSlot": "LinearDepth", + "AttachmentRef": { + "Pass": "DepthPrePass", + "Attachment": "DepthLinear" + } + }, + { + "LocalSlot": "Modulate", + "AttachmentRef": { + "Pass": "SubsurfaceScatteringPass", + "Attachment": "Output" + } + } + ] + }, { "Name": "DiffuseSpecularMergePass", "TemplateName": "DiffuseSpecularMergeTemplate", @@ -332,7 +500,7 @@ { "LocalSlot": "InputDiffuse", "AttachmentRef": { - "Pass": "MSAAResolveDiffusePass", + "Pass": "Ssao", "Attachment": "Output" } }, diff --git a/Gems/Atom/Feature/Common/Assets/Passes/NewDepthOfFieldComposite.pass b/Gems/Atom/Feature/Common/Assets/Passes/NewDepthOfFieldComposite.pass index 522ae78fa5..c96039f159 100644 --- a/Gems/Atom/Feature/Common/Assets/Passes/NewDepthOfFieldComposite.pass +++ b/Gems/Atom/Feature/Common/Assets/Passes/NewDepthOfFieldComposite.pass @@ -11,6 +11,11 @@ "Name": "Depth", "SlotType": "Input", "ScopeAttachmentUsage": "Shader", + "ImageViewDesc": { + "AspectFlags": [ + "Depth" + ] + }, "ShaderImageDimensionsConstant": "m_fullResDimensions" }, { diff --git a/Gems/Atom/Feature/Common/Assets/Passes/PassTemplates.azasset b/Gems/Atom/Feature/Common/Assets/Passes/PassTemplates.azasset index f2df085228..96cf769690 100644 --- a/Gems/Atom/Feature/Common/Assets/Passes/PassTemplates.azasset +++ b/Gems/Atom/Feature/Common/Assets/Passes/PassTemplates.azasset @@ -64,6 +64,10 @@ "Name": "CascadedShadowmapsTemplate", "Path": "Passes/CascadedShadowmaps.pass" }, + { + "Name": "SlowClearPassTemplate", + "Path": "Passes/SlowClear.pass" + }, { "Name": "FullscreenCopyTemplate", "Path": "Passes/FullscreenCopy.pass" @@ -252,6 +256,10 @@ "Name": "EnvironmentCubeMapForwardMSAAPassTemplate", "Path": "Passes/EnvironmentCubeMapForwardMSAA.pass" }, + { + "Name": "EnvironmentCubeMapForwardSubsurfaceMSAAPassTemplate", + "Path": "Passes/EnvironmentCubeMapForwardSubsurfaceMSAA.pass" + }, { "Name": "EnvironmentCubeMapDepthMSAAPassTemplate", "Path": "Passes/EnvironmentCubeMapDepthMSAA.pass" diff --git a/Gems/Atom/Feature/Common/Assets/Passes/ReflectionScreenSpace.pass b/Gems/Atom/Feature/Common/Assets/Passes/ReflectionScreenSpace.pass index 4972f0f494..d1825be820 100644 --- a/Gems/Atom/Feature/Common/Assets/Passes/ReflectionScreenSpace.pass +++ b/Gems/Atom/Feature/Common/Assets/Passes/ReflectionScreenSpace.pass @@ -34,10 +34,6 @@ } ], "PassRequests": [ - { - "Name": "ReflectionScreenSpaceBlurPass", - "TemplateName": "ReflectionScreenSpaceBlurPassTemplate" - }, { "Name": "ReflectionScreenSpaceTracePass", "TemplateName": "ReflectionScreenSpaceTracePassTemplate", @@ -56,42 +52,65 @@ "Attachment": "NormalInput" } }, - { - "LocalSlot": "DepthStencilInput", - "AttachmentRef": { - "Pass": "Parent", - "Attachment": "DepthStencilInput" - - } - }, { "LocalSlot": "SpecularF0Input", "AttachmentRef": { "Pass": "Parent", "Attachment": "SpecularF0Input" } + }, + { + "LocalSlot": "ReflectionInputOutput", + "AttachmentRef": { + "Pass": "Parent", + "Attachment": "ReflectionInputOutput" + } + } + ] + }, + { + "Name": "ReflectionScreenSpaceBlurPass", + "TemplateName": "ReflectionScreenSpaceBlurPassTemplate", + "Connections": [ + { + "LocalSlot": "DepthInput", + "AttachmentRef": { + "Pass": "Parent", + "Attachment": "DepthStencilInput" + } + }, + { + "LocalSlot": "ScreenSpaceReflectionInputOutput", + "AttachmentRef": { + "Pass": "ReflectionScreenSpaceTracePass", + "Attachment": "ScreenSpaceReflectionOutput" + } + }, + { + "LocalSlot": "DownsampledDepthInputOutput", + "AttachmentRef": { + "Pass": "ReflectionScreenSpaceTracePass", + "Attachment": "DownsampledDepthOutput" + } } ] }, { "Name": "ReflectionScreenSpaceCompositePass", "TemplateName": "ReflectionScreenSpaceCompositePassTemplate", - "ExecuteAfter": [ - "ReflectionScreenSpaceBlurPass" - ], "Connections": [ { - "LocalSlot": "TraceInput", + "LocalSlot": "ReflectionInput", "AttachmentRef": { - "Pass": "ReflectionScreenSpaceTracePass", - "Attachment": "Output" + "Pass": "ReflectionScreenSpaceBlurPass", + "Attachment": "ScreenSpaceReflectionInputOutput" } }, { - "LocalSlot": "PreviousFrameBufferInput", + "LocalSlot": "DownsampledDepthInput", "AttachmentRef": { "Pass": "ReflectionScreenSpaceBlurPass", - "Attachment": "PreviousFrameInputOutput" + "Attachment": "DownsampledDepthInputOutput" } }, { @@ -115,6 +134,13 @@ "Attachment": "DepthStencilInput" } }, + { + "LocalSlot": "PreviousFrameInputOutput", + "AttachmentRef": { + "Pass": "ReflectionScreenSpaceTracePass", + "Attachment": "PreviousFrameInputOutput" + } + }, { "LocalSlot": "DepthStencilInput", "AttachmentRef": { diff --git a/Gems/Atom/Feature/Common/Assets/Passes/ReflectionScreenSpaceBlur.pass b/Gems/Atom/Feature/Common/Assets/Passes/ReflectionScreenSpaceBlur.pass index e2fde2d4ef..a5fd2fdfb1 100644 --- a/Gems/Atom/Feature/Common/Assets/Passes/ReflectionScreenSpaceBlur.pass +++ b/Gems/Atom/Feature/Common/Assets/Passes/ReflectionScreenSpaceBlur.pass @@ -8,34 +8,19 @@ "PassClass": "ReflectionScreenSpaceBlurPass", "Slots": [ { - "Name": "PreviousFrameInputOutput", + "Name": "DepthInput", + "SlotType": "Input", + "ScopeAttachmentUsage": "Shader" + }, + { + "Name": "ScreenSpaceReflectionInputOutput", "SlotType": "InputOutput", "ScopeAttachmentUsage": "Shader" - } - ], - "ImageAttachments": [ + }, { - "Name": "PreviousFrameImage", - "SizeSource": { - "Source": { - "Pass": "Parent", - "Attachment": "SpecularInput" - } - }, - "ImageDescriptor": { - "Format": "R16G16B16A16_FLOAT", - "SharedQueueMask": "Graphics" - }, - "GenerateFullMipChain": true - } - ], - "Connections": [ - { - "LocalSlot": "PreviousFrameInputOutput", - "AttachmentRef": { - "Pass": "This", - "Attachment": "PreviousFrameImage" - } + "Name": "DownsampledDepthInputOutput", + "SlotType": "InputOutput", + "ScopeAttachmentUsage": "DepthStencil" } ] } diff --git a/Gems/Atom/Feature/Common/Assets/Passes/ReflectionScreenSpaceBlurVertical.pass b/Gems/Atom/Feature/Common/Assets/Passes/ReflectionScreenSpaceBlurVertical.pass index a616ed4c8e..af3878cf6b 100644 --- a/Gems/Atom/Feature/Common/Assets/Passes/ReflectionScreenSpaceBlurVertical.pass +++ b/Gems/Atom/Feature/Common/Assets/Passes/ReflectionScreenSpaceBlurVertical.pass @@ -7,6 +7,11 @@ "Name": "ReflectionScreenSpaceBlurVerticalPassTemplate", "PassClass": "ReflectionScreenSpaceBlurChildPass", "Slots": [ + { + "Name": "DepthInput", + "SlotType": "Input", + "ScopeAttachmentUsage": "Shader" + }, { "Name": "Input", "SlotType": "InputOutput", @@ -16,6 +21,20 @@ "Name": "Output", "SlotType": "InputOutput", "ScopeAttachmentUsage": "RenderTarget" + }, + { + "Name": "DownsampledDepthOutput", + "SlotType": "InputOutput", + "ScopeAttachmentUsage": "DepthStencil" + } + ], + "Connections": [ + { + "LocalSlot": "DepthInput", + "AttachmentRef": { + "Pass": "Parent", + "Attachment": "DepthInput" + } } ], "PassData": { diff --git a/Gems/Atom/Feature/Common/Assets/Passes/ReflectionScreenSpaceComposite.pass b/Gems/Atom/Feature/Common/Assets/Passes/ReflectionScreenSpaceComposite.pass index 5443c32406..17b58dbc9e 100644 --- a/Gems/Atom/Feature/Common/Assets/Passes/ReflectionScreenSpaceComposite.pass +++ b/Gems/Atom/Feature/Common/Assets/Passes/ReflectionScreenSpaceComposite.pass @@ -8,12 +8,12 @@ "PassClass": "ReflectionScreenSpaceCompositePass", "Slots": [ { - "Name": "TraceInput", + "Name": "ReflectionInput", "SlotType": "Input", "ScopeAttachmentUsage": "Shader" }, { - "Name": "PreviousFrameBufferInput", + "Name": "DownsampledDepthInput", "SlotType": "Input", "ScopeAttachmentUsage": "Shader" }, @@ -37,6 +37,11 @@ ] } }, + { + "Name": "PreviousFrameInputOutput", + "SlotType": "InputOutput", + "ScopeAttachmentUsage": "Shader" + }, { "Name": "DepthStencilInput", "SlotType": "Input", diff --git a/Gems/Atom/Feature/Common/Assets/Passes/ReflectionScreenSpaceTrace.pass b/Gems/Atom/Feature/Common/Assets/Passes/ReflectionScreenSpaceTrace.pass index 370db1f45a..824d23a046 100644 --- a/Gems/Atom/Feature/Common/Assets/Passes/ReflectionScreenSpaceTrace.pass +++ b/Gems/Atom/Feature/Common/Assets/Passes/ReflectionScreenSpaceTrace.pass @@ -5,7 +5,7 @@ "ClassData": { "PassTemplate": { "Name": "ReflectionScreenSpaceTracePassTemplate", - "PassClass": "FullScreenTriangle", + "PassClass": "ReflectionScreenSpaceTracePass", "Slots": [ { "Name": "DepthStencilTextureInput", @@ -28,24 +28,52 @@ "ScopeAttachmentUsage": "Shader" }, { - "Name": "DepthStencilInput", + "Name": "ReflectionInputOutput", "SlotType": "Input", - "ScopeAttachmentUsage": "DepthStencil", - "ImageViewDesc": { - "AspectFlags": [ - "Stencil" - ] + "ScopeAttachmentUsage": "Shader" + }, + { + "Name": "PreviousFrameInputOutput", + "SlotType": "Input", + "ScopeAttachmentUsage": "Shader" + }, + { + "Name": "ScreenSpaceReflectionOutput", + "SlotType": "Output", + "ScopeAttachmentUsage": "RenderTarget", + "LoadStoreAction": { + "ClearValue": { + "Value": [ + 0.0, + 0.0, + 0.0, + 0.0 + ] + }, + "LoadAction": "Clear" } }, { - "Name": "Output", + "Name": "DownsampledDepthOutput", "SlotType": "Output", - "ScopeAttachmentUsage": "RenderTarget" + "ScopeAttachmentUsage": "DepthStencil", + "LoadStoreAction": { + "ClearValue": { + "Type": "DepthStencil", + "Value": [ + 1.0, + {}, + {}, + {} + ] + }, + "LoadAction": "Clear" + } } ], "ImageAttachments": [ { - "Name": "TraceImage", + "Name": "ScreenSpaceReflectionImage", "SizeSource": { "Source": { "Pass": "This", @@ -56,9 +84,40 @@ "HeightMultiplier": 0.5 } }, - "MultisampleSource": { - "Pass": "This", - "Attachment": "SpecularF0Input" + "ImageDescriptor": { + "Format": "R16G16B16A16_FLOAT", + "MipLevels": "5", + "SharedQueueMask": "Graphics" + } + }, + { + "Name": "DownsampledDepthImage", + "SizeSource": { + "Source": { + "Pass": "Parent", + "Attachment": "DepthStencilInput" + }, + "Multipliers": { + "WidthMultiplier": 0.5, + "HeightMultiplier": 0.5 + } + }, + "FormatSource": { + "Pass": "Parent", + "Attachment": "DepthStencilInput" + }, + "ImageDescriptor": { + "MipLevels": "5", + "SharedQueueMask": "Graphics" + } + }, + { + "Name": "PreviousFrameImage", + "SizeSource": { + "Source": { + "Pass": "Parent", + "Attachment": "SpecularInput" + } }, "ImageDescriptor": { "Format": "R16G16B16A16_FLOAT", @@ -68,15 +127,28 @@ ], "Connections": [ { - "LocalSlot": "Output", + "LocalSlot": "ScreenSpaceReflectionOutput", "AttachmentRef": { "Pass": "This", - "Attachment": "TraceImage" + "Attachment": "ScreenSpaceReflectionImage" + } + }, + { + "LocalSlot": "DownsampledDepthOutput", + "AttachmentRef": { + "Pass": "This", + "Attachment": "DownsampledDepthImage" + } + }, + { + "LocalSlot": "PreviousFrameInputOutput", + "AttachmentRef": { + "Pass": "This", + "Attachment": "PreviousFrameImage" } } ], - "PassData": - { + "PassData": { "$type": "FullscreenTrianglePassData", "ShaderAsset": { "FilePath": "Shaders/Reflections/ReflectionScreenSpaceTrace.shader" diff --git a/Gems/Atom/Feature/Common/Assets/Passes/SMAA1xApplyLinearHDRColor.pass b/Gems/Atom/Feature/Common/Assets/Passes/SMAA1xApplyLinearHDRColor.pass index 70604fba25..9ae0f62bc7 100644 --- a/Gems/Atom/Feature/Common/Assets/Passes/SMAA1xApplyLinearHDRColor.pass +++ b/Gems/Atom/Feature/Common/Assets/Passes/SMAA1xApplyLinearHDRColor.pass @@ -25,10 +25,7 @@ { "Name": "OutputColor", "SlotType": "Output", - "ScopeAttachmentUsage": "RenderTarget", - "LoadStoreAction": { - "LoadAction": "DontCare" - } + "ScopeAttachmentUsage": "RenderTarget" } ], "Connections": [ diff --git a/Gems/Atom/Feature/Common/Assets/Passes/SMAA1xApplyPerceptualColor.pass b/Gems/Atom/Feature/Common/Assets/Passes/SMAA1xApplyPerceptualColor.pass index 27fcff21cf..04484e1f17 100644 --- a/Gems/Atom/Feature/Common/Assets/Passes/SMAA1xApplyPerceptualColor.pass +++ b/Gems/Atom/Feature/Common/Assets/Passes/SMAA1xApplyPerceptualColor.pass @@ -25,10 +25,7 @@ { "Name": "OutputColor", "SlotType": "Output", - "ScopeAttachmentUsage": "RenderTarget", - "LoadStoreAction": { - "LoadAction": "DontCare" - } + "ScopeAttachmentUsage": "RenderTarget" } ], "Connections": [ diff --git a/Gems/Atom/Feature/Common/Assets/Passes/SMAAEdgeDetection.pass b/Gems/Atom/Feature/Common/Assets/Passes/SMAAEdgeDetection.pass index ab03ea01ef..674acdd3a0 100644 --- a/Gems/Atom/Feature/Common/Assets/Passes/SMAAEdgeDetection.pass +++ b/Gems/Atom/Feature/Common/Assets/Passes/SMAAEdgeDetection.pass @@ -15,7 +15,12 @@ { "Name": "InputDepth", "SlotType": "Input", - "ScopeAttachmentUsage": "Shader" + "ScopeAttachmentUsage": "Shader", + "ImageViewDesc": { + "AspectFlags": [ + "Depth" + ] + } }, { "Name": "OutputEdgeDetectionResult", diff --git a/Gems/Atom/Feature/Common/Assets/Passes/SlowClear.pass b/Gems/Atom/Feature/Common/Assets/Passes/SlowClear.pass new file mode 100644 index 0000000000..97b486191a --- /dev/null +++ b/Gems/Atom/Feature/Common/Assets/Passes/SlowClear.pass @@ -0,0 +1,34 @@ +{ + "Type": "JsonSerialization", + "Version": 1, + "ClassName": "PassAsset", + "ClassData": { + "PassTemplate": { + + // This is for debug purposes and edge cases only + // If you want to clear an attachment you should + // use the LoadStoreAction on your pass slot. + "Name": "SlowClearPassTemplate", + "PassClass": "SlowClearPass", + "Slots": [ + { + "Name": "ClearInputOutput", + "SlotType": "InputOutput", + "ScopeAttachmentUsage": "RenderTarget", + "LoadStoreAction": { + "ClearValue": { + "Value": [ + 0.0, + 0.0, + 0.0, + 0.0 + ] + }, + "LoadAction": "Clear", + "LoadActionStencil": "Clear" + } + } + ] + } + } +} diff --git a/Gems/Atom/Feature/Common/Assets/Passes/SsaoHalfRes.pass b/Gems/Atom/Feature/Common/Assets/Passes/SsaoHalfRes.pass deleted file mode 100644 index d34ae4161d..0000000000 --- a/Gems/Atom/Feature/Common/Assets/Passes/SsaoHalfRes.pass +++ /dev/null @@ -1,88 +0,0 @@ -{ - "Type": "JsonSerialization", - "Version": 1, - "ClassName": "PassAsset", - "ClassData": { - "PassTemplate": { - "Name": "SsaoHalfResTemplate", - "PassClass": "ParentPass", - "Slots": [ - { - "Name": "LinearDepth", - "SlotType": "Input", - "ScopeAttachmentUsage": "Shader" - }, - { - "Name": "Output", - "SlotType": "Output", - "ScopeAttachmentUsage": "Shader" - } - ], - "Connections": [ - { - "LocalSlot": "Output", - "AttachmentRef": { - "Pass": "Upsample", - "Attachment": "Output" - } - } - ], - "PassRequests": [ - { - "Name": "DepthDownsample", - "TemplateName": "DepthDownsampleTemplate", - "Connections": [ - { - "LocalSlot": "FullResDepth", - "AttachmentRef": { - "Pass": "Parent", - "Attachment": "LinearDepth" - } - } - ] - }, - { - "Name": "DownsampledSsao", - "TemplateName": "SsaoParentTemplate", - "Connections": [ - { - "LocalSlot": "LinearDepth", - "AttachmentRef": { - "Pass": "DepthDownsample", - "Attachment": "HalfResDepth" - } - } - ] - }, - { - "Name": "Upsample", - "TemplateName": "DepthUpsampleTemplate", - "Enabled": true, - "Connections": [ - { - "LocalSlot": "FullResDepth", - "AttachmentRef": { - "Pass": "Parent", - "Attachment": "LinearDepth" - } - }, - { - "LocalSlot": "HalfResDepth", - "AttachmentRef": { - "Pass": "DepthDownsample", - "Attachment": "HalfResDepth" - } - }, - { - "LocalSlot": "HalfResSource", - "AttachmentRef": { - "Pass": "DownsampledSsao", - "Attachment": "Output" - } - } - ] - } - ] - } - } -} diff --git a/Gems/Atom/Feature/Common/Assets/Passes/UIParent.pass b/Gems/Atom/Feature/Common/Assets/Passes/UIParent.pass index 4ae67b9b09..54491216dd 100644 --- a/Gems/Atom/Feature/Common/Assets/Passes/UIParent.pass +++ b/Gems/Atom/Feature/Common/Assets/Passes/UIParent.pass @@ -41,7 +41,8 @@ "PassData": { "$type": "RasterPassData", "DrawListTag": "2dpass", - "PipelineViewTag": "MainCamera" + "PipelineViewTag": "MainCamera", + "DrawListSortType": "KeyThenReverseDepth" } }, { diff --git a/Gems/Atom/Feature/Common/Assets/ShaderLib/Atom/Features/LightCulling/LightCullingTileIterator.azsli b/Gems/Atom/Feature/Common/Assets/ShaderLib/Atom/Features/LightCulling/LightCullingTileIterator.azsli index 9b191eb06a..69958edebe 100644 --- a/Gems/Atom/Feature/Common/Assets/ShaderLib/Atom/Features/LightCulling/LightCullingTileIterator.azsli +++ b/Gems/Atom/Feature/Common/Assets/ShaderLib/Atom/Features/LightCulling/LightCullingTileIterator.azsli @@ -27,6 +27,7 @@ class LightCullingTileIterator tileLightDataTex.GetDimensions(tileWidth, tileHeight); TileLightData tileLightData = Tile_UnpackData(tileLightDataTex[tileId]); + m_overflow = tileLightData.overflow; uint bin = NVLC_GetBin(viewz, tileLightData); m_readIndex = ((tileId.y * tileWidth + tileId.x) * NVLC_MAX_BINS + bin) * NVLC_MAX_POSSIBLE_LIGHTS_PER_BIN; m_value = 0; @@ -53,6 +54,10 @@ class LightCullingTileIterator } uint m_readIndex; - uint m_value; + uint m_value; + + // true if the maximum number of lights per tile is exceeded + // lights will probably flicker if this happens + bool m_overflow; StructuredBuffer m_lightListRemapped; }; diff --git a/Gems/Atom/Feature/Common/Assets/ShaderLib/Atom/Features/LightCulling/NVLC.azsli b/Gems/Atom/Feature/Common/Assets/ShaderLib/Atom/Features/LightCulling/NVLC.azsli index 60d5bf38f2..7878d946b8 100644 --- a/Gems/Atom/Feature/Common/Assets/ShaderLib/Atom/Features/LightCulling/NVLC.azsli +++ b/Gems/Atom/Feature/Common/Assets/ShaderLib/Atom/Features/LightCulling/NVLC.azsli @@ -67,12 +67,14 @@ struct TileLightData // If there is a pixel of opaque geometry there, we mark a bit in this bin. uint mask; uint logMaxBins; + // true if there are too many lights or decals assigned to this tile + bool overflow; }; bool Light_IsInsideBin(uint package, uint bin) { - return (package & (1 << bin)) != 0; + return (package & (1u << bin)) != 0; } uint PackLightIndexWithBinMask(uint ind, uint bins) @@ -115,7 +117,8 @@ TileLightData Tile_UnpackData(uint4 pack) data.zFar = asfloat( pack.y | NVLC_BINS_MASK ); data.mask = pack.z; data.logMaxBins = pack.y & NVLC_BINS_MASK; - + // unpack the "lights overflowed" bit + data.overflow = pack.w >> 31; return data; } @@ -127,7 +130,7 @@ uint NVLC_GetBin(const float viewZ, const TileLightData data) const float zFarCoordSystemAdjusted = data.zFar * RH_COORD_SYSTEM_REVERSE; float f = saturate( (abs(viewZCoordSystemAdjusted) - zNearCoordSystemAdjusted) / (zFarCoordSystemAdjusted - zNearCoordSystemAdjusted) ); - float bin = min(f, 0.999999) * float(1 << data.logMaxBins); + float bin = min(f, 0.999999) * float(1u << data.logMaxBins); return uint(bin); } diff --git a/Gems/Atom/Feature/Common/Assets/ShaderLib/Atom/Features/Math/Filter.azsli b/Gems/Atom/Feature/Common/Assets/ShaderLib/Atom/Features/Math/Filter.azsli index 8271aa46fb..11dac7b81c 100644 --- a/Gems/Atom/Feature/Common/Assets/ShaderLib/Atom/Features/Math/Filter.azsli +++ b/Gems/Atom/Feature/Common/Assets/ShaderLib/Atom/Features/Math/Filter.azsli @@ -41,97 +41,3 @@ bool IsInsideOfImageSize( return IsInsideOfImageSize(coord, inputImageSize) && IsInsideOfImageSize(coord, outputImageSize); } - -//! This returns filtered value of "source" with weights in "filterTable" in 1 direction. -//! @param coord the center coordinate (in Texture2DArray) of the filtered area. -//! the xy coordinate is in pixel, and z is array slice index. -//! @param source image resource which is used as the source of the filtering. -//! Note that it contains entire of the shadowmap atlas, not a single shadowmap. -//! @param direction either (1,0) or (0,1). -//! If (1,0), the filtering direction is horizontal, -//! and if (0,1), it is vertical. -//! @param sourceMin the minimum (left/top most) index of the shadowmap. -//! @param sourceMax the maximum (right/bottom most) index of the shadowmap. -//! @param filterTable the weight table for this table. -//! Since the weight table of a Gaussian filter is left-right symmetry, -//! the right half is omitted in this filterTable. -//! @param filterOffset the offset of the filtering parameter in filterTable. -//! @param filterCount the element count of filtering parameter in filterTable. -//! For example, the weight table has size 11 in the original meaning -//! of Gaussian filter, filterCount == 6 by omitting the right half. -float FilteredFloat( - uint3 coord, - Texture2DArray source, - int2 direction, - int sourceMin, - int sourceMax, - Buffer filterTable, - uint filterOffset, - uint filterCount) -{ - if (filterCount == 0) - { - return 0.; // if no filtering info, early return. - } - - const int centerIndex = (int)dot(coord.xy, direction); - float result = 0.; - int index = 0; - - // This function summarizes the values stored in "source" - // from minIndex to maxIndex with weight in "filterTable". - // In the case that some point in [minIndex, maxIndex] go outside of - // the shadowmap (indicated by sourceMin and sourceMax), - // the edge value of the shadowmap is used. - - // 1. littler index side (left/up side) - const int minIndex = centerIndex - ((int)filterCount - 1); - - // 1-1. outside of shadowmap (littler) - // Assuming outside values are equal to the edge value, - // it first summarize the weights for outside of shadowmap - // then multiply it by the edge value. - float weight = 0.; // summation of weights of outside of shadowmap - for (index = minIndex; index < sourceMin; ++index) - { - weight += filterTable[filterOffset + index - minIndex]; - } - int2 edgeOffset = direction * (sourceMin - centerIndex); - int3 edgeCoord = coord + int3(edgeOffset, 0); - result += weight * source[edgeCoord]; - - // 1-2. inside of shadowmap (littler) - for (index = max(sourceMin, minIndex); index < centerIndex; ++index) - { - const int2 offset = direction * (index - centerIndex); - result += filterTable[filterOffset + index - minIndex] * - source[coord + int3(offset, 0)]; - } - - // 2. greater index side (right/down side) - const int maxIndex = centerIndex + ((int)filterCount - 1); - - // 2-1. outside of shadowmap (greater) - // This is similar to 1-1 above. - weight = 0.; // summation of weights of outside of shadowmap - for (index = maxIndex; index > sourceMax; --index) - { - weight += filterTable[filterOffset + maxIndex - index]; - } - edgeOffset = direction * (sourceMax - centerIndex); - edgeCoord = coord + int3(edgeOffset, 0); - result += weight * source[edgeCoord]; - - // 2-2. inside of shadowmap (greater) - for (index = min(sourceMax, maxIndex); index > centerIndex; --index) - { - const int2 offset = direction * (index - centerIndex); - result += filterTable[filterOffset + maxIndex - index] * - source[coord + int3(offset, 0)]; - } - - // 3. center - result += filterTable[filterOffset + filterCount - 1] * source[coord]; - - return result; -} diff --git a/Gems/Atom/Feature/Common/Assets/ShaderLib/Atom/Features/PBR/BackLighting.azsli b/Gems/Atom/Feature/Common/Assets/ShaderLib/Atom/Features/PBR/BackLighting.azsli index a4a747d42c..dfd5522f5c 100644 --- a/Gems/Atom/Feature/Common/Assets/ShaderLib/Atom/Features/PBR/BackLighting.azsli +++ b/Gems/Atom/Feature/Common/Assets/ShaderLib/Atom/Features/PBR/BackLighting.azsli @@ -23,6 +23,16 @@ float3 TransmissionKernel(float t, float3 s) return 0.25 * (1.0 / exp(exponent) + 3.0 / exp(exponent / 3.0)); } +float ThinObjectFalloff(const float3 surfaceNormal, const float3 dirToLight) +{ + const float ndl = saturate(dot(-surfaceNormal, dirToLight)); + + // ndl works decently well but it can produce a harsh discontinuity in the area just before + // the shadow starts appearing on objects like cylinder and tubes. + // Smoothing out ndl does a decent enough job of removing this artifact. + return smoothstep(0, 1, ndl * ndl); +} + float3 GetBackLighting(Surface surface, LightingData lightingData, float3 lightIntensity, float3 dirToLight, float shadowRatio) { float3 result = float3(0.0, 0.0, 0.0); @@ -50,8 +60,15 @@ float3 GetBackLighting(Surface surface, LightingData lightingData, float3 lightI // Thin object mode, using thin-film assumption proposed by Jimenez J. et al, 2010, "Real-Time Realistic Skin Translucency" // http://www.iryoku.com/translucency/downloads/Real-Time-Realistic-Skin-Translucency.pdf - result = shadowRatio ? float3(0.0, 0.0, 0.0) : TransmissionKernel(surface.transmission.thickness * transmissionParams.w, rcp(transmissionParams.xyz)) * - saturate(dot(-surface.normal, dirToLight)) * lightIntensity * shadowRatio; + float litRatio = 1.0 - shadowRatio; + if (litRatio) + { + const float thickness = surface.transmission.thickness * transmissionParams.w; + const float3 invScattering = rcp(transmissionParams.xyz); + const float falloff = ThinObjectFalloff(surface.normal, dirToLight); + result = TransmissionKernel(thickness, invScattering) * falloff * lightIntensity * litRatio; + } + break; } diff --git a/Gems/Atom/Feature/Common/Assets/ShaderLib/Atom/Features/PBR/Decals.azsli b/Gems/Atom/Feature/Common/Assets/ShaderLib/Atom/Features/PBR/Decals.azsli index f9ead72ce4..1863c749b0 100644 --- a/Gems/Atom/Feature/Common/Assets/ShaderLib/Atom/Features/PBR/Decals.azsli +++ b/Gems/Atom/Feature/Common/Assets/ShaderLib/Atom/Features/PBR/Decals.azsli @@ -54,6 +54,8 @@ void ApplyDecal(uint currDecalIndex, inout Surface surface) localPos = mul(decalRot, localPos); float3 decalUVW = localPos * rcp(decal.m_halfSize); + + [branch] if(decalUVW.x >= -1.0f && decalUVW.x <= 1.0f && decalUVW.y >= -1.0f && decalUVW.y <= 1.0f && decalUVW.z >= -1.0f && decalUVW.z <= 1.0f) @@ -72,27 +74,28 @@ void ApplyDecal(uint currDecalIndex, inout Surface surface) float2 normalMap = 0; // Each texture array handles a size permutation. // e.g. it could be that tex array 0 handles 256x256 and tex array 1 handles 512x64, etc. + [branch] switch(textureArrayIndex) { case 0: baseMap = ViewSrg::m_decalTextureArrayDiffuse0.Sample(PassSrg::LinearSampler, decalUV); - normalMap = ViewSrg::m_decalTextureArrayNormalMaps0.Sample(PassSrg::LinearSampler, decalUV); + normalMap = ViewSrg::m_decalTextureArrayNormalMaps0.Sample(PassSrg::LinearSampler, decalUV).rg; break; case 1: baseMap = ViewSrg::m_decalTextureArrayDiffuse1.Sample(PassSrg::LinearSampler, decalUV); - normalMap = ViewSrg::m_decalTextureArrayNormalMaps1.Sample(PassSrg::LinearSampler, decalUV); + normalMap = ViewSrg::m_decalTextureArrayNormalMaps1.Sample(PassSrg::LinearSampler, decalUV).rg; break; case 2: baseMap = ViewSrg::m_decalTextureArrayDiffuse2.Sample(PassSrg::LinearSampler, decalUV); - normalMap = ViewSrg::m_decalTextureArrayNormalMaps2.Sample(PassSrg::LinearSampler, decalUV); + normalMap = ViewSrg::m_decalTextureArrayNormalMaps2.Sample(PassSrg::LinearSampler, decalUV).rg; break; case 3: baseMap = ViewSrg::m_decalTextureArrayDiffuse3.Sample(PassSrg::LinearSampler, decalUV); - normalMap = ViewSrg::m_decalTextureArrayNormalMaps3.Sample(PassSrg::LinearSampler, decalUV); + normalMap = ViewSrg::m_decalTextureArrayNormalMaps3.Sample(PassSrg::LinearSampler, decalUV).rg; break; case 4: baseMap = ViewSrg::m_decalTextureArrayDiffuse4.Sample(PassSrg::LinearSampler, decalUV); - normalMap = ViewSrg::m_decalTextureArrayNormalMaps4.Sample(PassSrg::LinearSampler, decalUV); + normalMap = ViewSrg::m_decalTextureArrayNormalMaps4.Sample(PassSrg::LinearSampler, decalUV).rg; break; } diff --git a/Gems/Atom/Feature/Common/Assets/ShaderLib/Atom/Features/PBR/DefaultObjectSrg.azsli b/Gems/Atom/Feature/Common/Assets/ShaderLib/Atom/Features/PBR/DefaultObjectSrg.azsli index 10526597cb..9f40e7ab8f 100644 --- a/Gems/Atom/Feature/Common/Assets/ShaderLib/Atom/Features/PBR/DefaultObjectSrg.azsli +++ b/Gems/Atom/Feature/Common/Assets/ShaderLib/Atom/Features/PBR/DefaultObjectSrg.azsli @@ -37,6 +37,7 @@ ShaderResourceGroup ObjectSrg : SRG_PerObject float m_padding; bool m_useReflectionProbe; bool m_useParallaxCorrection; + float m_exposure; }; ReflectionProbeData m_reflectionProbeData; diff --git a/Gems/Atom/Feature/Common/Assets/ShaderLib/Atom/Features/PBR/Lighting/StandardLighting.azsli b/Gems/Atom/Feature/Common/Assets/ShaderLib/Atom/Features/PBR/Lighting/StandardLighting.azsli index 94d6c199a5..773c86ff0f 100644 --- a/Gems/Atom/Feature/Common/Assets/ShaderLib/Atom/Features/PBR/Lighting/StandardLighting.azsli +++ b/Gems/Atom/Feature/Common/Assets/ShaderLib/Atom/Features/PBR/Lighting/StandardLighting.azsli @@ -48,9 +48,9 @@ float3 GetSpecularLighting(Surface surface, LightingData lightingData, const flo // HdotV = HdotL due to the definition of half vector float3 clearCoatF = FresnelSchlick(HdotL, 0.04) * surface.clearCoat.factor; float clearCoatRoughness = max(surface.clearCoat.roughness * surface.clearCoat.roughness, 0.0005f); - float3 clearCoatSpecular = ClearCoatGGX(NdotH, HdotL, NdotL, surface.clearCoat.normal, clearCoatRoughness, clearCoatF ); + float3 clearCoatSpecular = ClearCoatGGX(NdotH, HdotL, NdotL, surface.clearCoat.normal, clearCoatRoughness, clearCoatF); - specular = specular * (1.0 - clearCoatF) * (1.0 - clearCoatF) + clearCoatSpecular; + specular = specular * (1.0 - clearCoatF) + clearCoatSpecular; } specular *= lightIntensity; @@ -95,7 +95,7 @@ PbrLightingOutput DebugOutput(float3 color) { PbrLightingOutput output = (PbrLightingOutput)0; - float defaultNormal = float3(0.0f, 0.0f, 1.0f); + float3 defaultNormal = float3(0.0f, 0.0f, 1.0f); output.m_diffuseColor = float4(color.rgb, 1.0f); output.m_normal.rgb = EncodeNormalSignedOctahedron(defaultNormal); diff --git a/Gems/Atom/Feature/Common/Assets/ShaderLib/Atom/Features/PBR/LightingUtils.azsli b/Gems/Atom/Feature/Common/Assets/ShaderLib/Atom/Features/PBR/LightingUtils.azsli index 3248fc83eb..b26b81a7c8 100644 --- a/Gems/Atom/Feature/Common/Assets/ShaderLib/Atom/Features/PBR/LightingUtils.azsli +++ b/Gems/Atom/Feature/Common/Assets/ShaderLib/Atom/Features/PBR/LightingUtils.azsli @@ -67,6 +67,6 @@ float3 ApplyParallaxCorrectionAABB(float3 aabbMin, float3 aabbMax, float3 aabbPo // compute parallax corrected reflection vector, OBB version float3 ApplyParallaxCorrectionOBB(float4x4 obbTransformInverse, float3 obbHalfExtents, float3 positionWS, float3 reflectDir) { - float4 p = mul(obbTransformInverse, float4(positionWS, 1.0f)); + float3 p = mul(obbTransformInverse, float4(positionWS, 1.0f)).xyz; return ApplyParallaxCorrectionAABB(-obbHalfExtents, obbHalfExtents, float3(0.0f, 0.0f, 0.0f), p, reflectDir); } diff --git a/Gems/Atom/Feature/Common/Assets/ShaderLib/Atom/Features/PBR/Lights/Ibl.azsli b/Gems/Atom/Feature/Common/Assets/ShaderLib/Atom/Features/PBR/Lights/Ibl.azsli index d33a307dfe..abc2d3d3bd 100644 --- a/Gems/Atom/Feature/Common/Assets/ShaderLib/Atom/Features/PBR/Lights/Ibl.azsli +++ b/Gems/Atom/Feature/Common/Assets/ShaderLib/Atom/Features/PBR/Lights/Ibl.azsli @@ -60,7 +60,7 @@ float3 GetIblSpecular( // compute blend amount based on world position in the reflection probe volume float blendAmount = ComputeLerpBetweenInnerOuterOBBs( - ObjectSrg::GetReflectionProbeWorldMatrixInverse(), + (float3x4)ObjectSrg::GetReflectionProbeWorldMatrixInverse(), ObjectSrg::m_reflectionProbeData.m_innerObbHalfLengths, ObjectSrg::m_reflectionProbeData.m_outerObbHalfLengths, position); @@ -85,12 +85,12 @@ void ApplyIBL(Surface surface, inout LightingData lightingData) if(useIbl) { - float iblExposureFactor = pow(2.0, SceneSrg::m_iblExposure); + float globalIblExposure = pow(2.0, SceneSrg::m_iblExposure); if(useDiffuseIbl) { float3 iblDiffuse = GetIblDiffuse(surface.normal, surface.albedo, lightingData.diffuseResponse); - lightingData.diffuseLighting += (iblDiffuse * iblExposureFactor * lightingData.diffuseAmbientOcclusion); + lightingData.diffuseLighting += (iblDiffuse * globalIblExposure * lightingData.diffuseAmbientOcclusion); } if(useSpecularIbl) @@ -116,8 +116,8 @@ void ApplyIBL(Surface surface, inout LightingData lightingData) iblSpecular = iblSpecular * (1.0 - clearCoatResponse) * (1.0 - clearCoatResponse) + clearCoatIblSpecular; } - lightingData.specularLighting += (iblSpecular * iblExposureFactor); + float exposure = ObjectSrg::m_reflectionProbeData.m_useReflectionProbe ? pow(2.0, ObjectSrg::m_reflectionProbeData.m_exposure) : globalIblExposure; + lightingData.specularLighting += (iblSpecular * exposure); } } } - diff --git a/Gems/Atom/Feature/Common/Assets/ShaderLib/Atom/Features/PBR/Lights/Ltc.azsli b/Gems/Atom/Feature/Common/Assets/ShaderLib/Atom/Features/PBR/Lights/Ltc.azsli index 6e45cf30c8..531eb6e885 100644 --- a/Gems/Atom/Feature/Common/Assets/ShaderLib/Atom/Features/PBR/Lights/Ltc.azsli +++ b/Gems/Atom/Feature/Common/Assets/ShaderLib/Atom/Features/PBR/Lights/Ltc.azsli @@ -76,35 +76,28 @@ float3x3 BuildViewAlignedOrthonormalBasis(in float3 normal, in float3 dirToView) return float3x3(tangent, bitangent, normal); } +// The following two edge integration functions are based on the work from: +// [HILL16] Real-Time Area Lighting: a Journey from Research to Production, SIGGRAPH 2016 +// Ref: https://blog.selfshadow.com/publications/s2016-advances/ + // Cosine integration of edge in a hemisphere. v1 and v2 should be normalized vertices above the // xy plane in positive z space. float IntegrateEdge(float3 v1, float3 v2) { - // This alternate version may work better for platforms where acos() precision is low. - /* - float x = dot(v1, v2); - float y = abs(x); + float cosTheta = dot(v1, v2); + float absCosTheta = abs(cosTheta); - float a = 5.42031 + (3.12829 + 0.0902326 * y) * y; - float b = 3.45068 + (4.18814 + y) * y; + // Cubic rational fitting of x/sin(x) + float a = 5.42031 + (3.12829 + 0.0902326 * absCosTheta) * absCosTheta; + float b = 3.45068 + (4.18814 + absCosTheta) * absCosTheta; float theta_sinTheta = a / b; - if (x < 0.0) + if (cosTheta < 0.0) { - theta_sinTheta = PI * rsqrt(saturate(1.0 - x * x)) - theta_sinTheta; + theta_sinTheta = PI * rsqrt(clamp(1.0 - cosTheta * cosTheta, EPSILON, 1.0)) - theta_sinTheta; } - float3 u = cross(v1, v2); - return theta_sinTheta * u.z; - */ - - float cosTheta = dot(v1, v2); - float theta = acos(cosTheta); - - // calculate 1.0 / sin(theta) - float invSinTheta = rsqrt(saturate(1.0 - cosTheta * cosTheta)); - - return cross(v1, v2).z * ((theta > 0.001) ? theta * invSinTheta : 1.0); + return theta_sinTheta * cross(v1, v2).z; } // Cheaper version of above which is good enough for diffuse @@ -112,11 +105,14 @@ float IntegrateEdgeDiffuse(float3 v1, float3 v2) { float cosTheta = dot(v1, v2); float absCosTheta = abs(cosTheta); + + // Quadratic fitting of x/sin(x) float theta_sinTheta = 1.5708 + (-0.879406 + 0.308609 * absCosTheta) * absCosTheta; if (cosTheta < 0.0) { - theta_sinTheta = PI * rsqrt(1.0 - cosTheta * cosTheta) - theta_sinTheta; + theta_sinTheta = PI * rsqrt(clamp(1.0 - cosTheta * cosTheta, EPSILON, 1.0)) - theta_sinTheta; } + return theta_sinTheta * cross(v1, v2).z; } @@ -256,15 +252,16 @@ void NormalizeQuadPoints(inout float3 p[5], in int vertexCount) } // Transforms the 4 points of a quad into the hemisphere of the normal -void TransformQuadToOrthonormalBasis(in float3 normal, in float3 dirToView, inout float3 p[4]) +void TransformQuadToOrthonormalBasis(in float3 normal, in float3 dirToView, in float3 p[4], out float3 tp[5]) { float3x3 orthoNormalBasis = BuildViewAlignedOrthonormalBasis(normal, dirToView); // Transform points into orthonormal space - p[0] = mul(orthoNormalBasis, p[0]); - p[1] = mul(orthoNormalBasis, p[1]); - p[2] = mul(orthoNormalBasis, p[2]); - p[3] = mul(orthoNormalBasis, p[3]); + tp[0] = mul(orthoNormalBasis, p[0]); + tp[1] = mul(orthoNormalBasis, p[1]); + tp[2] = mul(orthoNormalBasis, p[2]); + tp[3] = mul(orthoNormalBasis, p[3]); + tp[4] = float3(0.0, 0.0, 0.0); // Extra vertex for if quad becomes a pentagon after clipping to hemisphere. } // Integrates the edges of a quad for lambertian diffuse contribution. @@ -325,6 +322,47 @@ float IntegrateQuadSpecular(in float3 v[5], in float vertexCount, in bool double return sum; } +// Transform points p into the normal's hemisphere, then clip them to the hemisphere. Returns total number of points after clipping. +int LtcQuadTransformAndClip( + in float3 normal, + in float3 dirToCamera, + in float3 p[4], + inout float3 polygon[5] + ) +{ + // Transform the points of the light into the space of the normal's hemisphere. + TransformQuadToOrthonormalBasis(normal, dirToCamera, p, polygon); + + // Clip the light polygon to the normal hemisphere. This is done before the LTC matrix is applied to prevent + // parts of the light below the horizon from impacting the surface. The number of points remaining after + // the clip is returned in vertexCount. It's possible for the vertexCount of the resulting clipped quad to be + // 0 - all points clipped (no work to do, so return) + // 3 - 3 points clipped, leaving only a triangular corner of the quad + // 4 - 2 or 0 points clipped, leaving a quad + // 5 - 1 point clipped leaving a pentagon. + int vertexCount = 0; + ClipQuadToHorizon(polygon, vertexCount); + return vertexCount; +} + +// Evaluate the LTC specular reflectance of points in polygon. Does not scale by fresnel. +float LtcEvaluateSpecularUnscaled( + in float2 ltcCoords, + in Texture2D ltcMatrix, + in float3 polygon[5], + in int vertexCount, + in bool doubleSided) +{ + // Look up the values for the LTC matrix based on the roughness and orientation. + float3x3 ltcMat = LtcMatrix(ltcMatrix, ltcCoords); + + // Transform the quad based on the LTC lookup matrix + ApplyLtcMatrixToQuad(ltcMat, polygon, vertexCount); + + // IntegrateQuadSpecular uses more accurate integration than diffuse to handle smooth surfaces correctly. + return IntegrateQuadSpecular(polygon, vertexCount, doubleSided); +} + // Evaluate linear transform cosine lighting for a 4 point quad. // normal - The surface normal // dirToView - Normalized direction from the surface to the view @@ -334,31 +372,21 @@ float IntegrateQuadSpecular(in float3 v[5], in float vertexCount, in bool double // diffuse - The output diffuse response for the quad light // specular - The output specular response for the quad light void LtcQuadEvaluate( - in float3 normal, - in float3 dirToView, - in float3x3 ltcMat, + in Surface surface, + in LightingData lightingData, + in Texture2D ltcMatrix, + in Texture2D ltcAmpMatrix, in float3 p[4], in bool doubleSided, - out float diffuse, - out float specular) + out float diffuseOut, + out float3 specularOut) { - // Transform the points of the light into the space of the normal's hemisphere. - TransformQuadToOrthonormalBasis(normal, dirToView, p); - + // Initialize quad with dummy point at end in case one corner is clipped (resulting in 5 sided polygon) - float3 v[5] = {p[0], p[1], p[2], p[3], float3(0.0, 0.0, 0.0)}; - - // Clip the light polygon to the normal hemisphere. This is done before the LTC matrix is applied to prevent - // parts of the light below the horizon from impacting the surface. The number of points remaining after - // the clip is returned in vertexCount. It's possible for the vertexCount of the resulting clipped quad to be - // 0 - all points clipped (no work to do, so return) - // 3 - 3 points clipped, leaving only a triangular corner of the quad - // 4 - 2 or 0 points clipped, leaving a quad - // 5 - 1 point clipped leaving a pentagon. - - int vertexCount = 0; - ClipQuadToHorizon(v, vertexCount); + float3 polygon[5]; + // Transform the points of the light into the space of the normal's hemisphere and clip to the hemisphere + int vertexCount = LtcQuadTransformAndClip(surface.normal, lightingData.dirToCamera, p, polygon); if (vertexCount == 0) { // Entire light is below the horizon. @@ -366,12 +394,37 @@ void LtcQuadEvaluate( } // IntegrateQuadDiffuse is a cheap approximation compared to specular. - diffuse = IntegrateQuadDiffuse(v, vertexCount, doubleSided); + float diffuse = IntegrateQuadDiffuse(polygon, vertexCount, doubleSided); - ApplyLtcMatrixToQuad(ltcMat, v, vertexCount); + float2 ltcCoords = LtcCoords(dot(surface.normal, lightingData.dirToCamera), surface.roughnessLinear); + float specular = LtcEvaluateSpecularUnscaled(ltcCoords, ltcMatrix, polygon, vertexCount, doubleSided); - // IntegrateQuadSpecular uses more accurate integration to handle smooth surfaces correctly. - specular = IntegrateQuadSpecular(v, vertexCount, doubleSided); + // Apply BRDF scale terms (BRDF magnitude and Schlick Fresnel) + float2 schlick = ltcAmpMatrix.Sample(PassSrg::LinearSampler, ltcCoords).xy; + float3 specularRgb = specular * (schlick.x * surface.specularF0 + (1.0 - surface.specularF0) * schlick.y); + + if(o_clearCoat_feature_enabled) + { + int vertexCountCc = LtcQuadTransformAndClip(surface.clearCoat.normal, lightingData.dirToCamera, p, polygon); + if (vertexCountCc > 0) + { + float2 ltcCoordsCc = LtcCoords(dot(surface.clearCoat.normal, lightingData.dirToCamera), surface.clearCoat.roughness); + float clearCoatSpecular = LtcEvaluateSpecularUnscaled(ltcCoordsCc, ltcMatrix, polygon, vertexCountCc, doubleSided); + + // Apply BRDF scale terms (BRDF magnitude and Schlick Fresnel) + const float clearCoatSpecularF0 = 0.04; + float2 schlickCc = ltcAmpMatrix.Sample(PassSrg::LinearSampler, ltcCoordsCc).xy; + float F = schlickCc.x * clearCoatSpecularF0 + (1.0 - clearCoatSpecularF0) * schlickCc.y; + F *= surface.clearCoat.factor; + + // Attenuate diffuse and specular based on how much light the clearcoat layer reflects + diffuse = diffuse * (1.0 - F); + specularRgb = (specularRgb * (1.0 - F)) + (clearCoatSpecular * F); + } + } + + diffuseOut = diffuse; + specularOut = specularRgb; } // Checks an edge against the horizon and integrates it. @@ -390,14 +443,14 @@ void LtcQuadEvaluate( // - Find the point along the edge that intersects the horizon. // - Integrate from point 1 to the intersection point // - Save the intersection point for later -// 3. The first point is blow the horizon, but the second point is above. +// 3. The first point is below the horizon, but the second point is above. // - Find the point along the edge that intersects the horizon. // - Integate from the previous saved insection (see option 2 above) to this new insection // - Integrate from the new insection to the second point. // 4. Both points are below the horizon // - Do nothing. -void EvaluatePolyEdge(in float3 p0, in float3 p1, inout float3 prevClipPoint, in float3x3 ltcMat, inout float diffuse, inout float specular) +void EvaluatePolyEdge(in float3 p0, in float3 p1, in float3x3 ltcMat, inout float3 prevClipPoint, inout float diffuse, inout float specular) { if (p0.z > 0.0) { @@ -428,6 +481,74 @@ void EvaluatePolyEdge(in float3 p0, in float3 p1, inout float3 prevClipPoint, in } } +// Same as above but only evaluates specular (used for clear coat) +void EvaluatePolyEdgeSpecularOnly(in float3 p0, in float3 p1, in float3x3 ltcMat, inout float3 prevClipPoint, inout float specular) +{ + if (p0.z > 0.0) + { + if (p1.z > 0.0) + { + // Both above horizon + specular += IntegrateEdge(normalize(mul(ltcMat, p0)), normalize(mul(ltcMat, p1))); + } + else + { + // Going from above to below horizon + prevClipPoint = ClipEdge(p0, p1); + specular += IntegrateEdge(normalize(mul(ltcMat, p0)), normalize(mul(ltcMat, prevClipPoint))); + } + } + else if (p1.z > 0.0) + { + // Going from below to above horizon + float3 clipPoint = mul(ltcMat, ClipEdge(p1, p0)); + specular += IntegrateEdge(normalize(mul(ltcMat, prevClipPoint)), normalize(clipPoint)); + specular += IntegrateEdge(normalize(clipPoint), normalize(mul(ltcMat, p1))); + } +} + +// Evaluates the intial points to start looping through a polygon light. The first point in polygon may be below the surface +// so care must be taking to figure out which point to start with and what point to use to close the polygon. +void LtcPolygonEvaluateInitialPoints( + in float3 surfacePosition, + in float3x3 orthonormalMat, + in StructuredBuffer positions, + in uint startIdx, + inout float3 prevClipPoint, + inout float3 closePoint, + inout uint endIdx, + inout float3 p0) +{ + // Prepare initial values + p0 = mul(orthonormalMat, positions[startIdx].xyz - surfacePosition); // First point in polygon + + prevClipPoint = float3(0.0, 0.0, 0.0); // Used to hold previous clip point when polygon dips below horizon. + closePoint = p0; + + // Handle if the first point is below the horizon. + if (p0.z < 0.0) + { + float3 firstPoint = p0; // save the first point so it can be restored later. + + // Find the previous clip point so it can be used when the polygon goes above the horizon by + // searching backwards, updating the endIdx along the way to avoid reprocessing those points later + for ( ; endIdx > startIdx + 1; --endIdx) + { + float3 prevPoint = mul(orthonormalMat, positions[endIdx - 1].xyz - surfacePosition); + if (prevPoint.z > 0.0) + { + prevClipPoint = ClipEdge(prevPoint, p0); + closePoint = prevClipPoint; + break; + } + p0 = prevPoint; + } + + p0 = firstPoint; // Restore the original p0 + } + +} + // Evaluates the LTC result of an arbitrary polygon lighting a surface position. // pos - The surface position // normal - The surface normal @@ -445,72 +566,102 @@ void EvaluatePolyEdge(in float3 p0, in float3 p1, inout float3 prevClipPoint, in // EvaluatePolyEdge() later. During this search it also adjusts the end point index as necessary to avoid processing // those points that are below the horizon. void LtcPolygonEvaluate( - in float3 pos, - in float3 normal, - in float3 dirToView, - in float3x3 ltcMat, + in Surface surface, + in LightingData lightingData, + in Texture2D ltcMatrix, + in Texture2D ltcAmpMatrix, in StructuredBuffer positions, in uint startIdx, in uint endIdx, - out float diffuse, - out float specular + out float diffuseOut, + out float3 specularRgbOut ) { if (endIdx - startIdx < 3) { return; // Must have at least 3 points to form a polygon. } + uint originalEndIdx = endIdx; // Original endIdx may be needed for clearcoat // Rotate ltc matrix - float3x3 orthonormalMat = BuildViewAlignedOrthonormalBasis(normal, dirToView); + float3x3 orthonormalMat = BuildViewAlignedOrthonormalBasis(surface.normal, lightingData.dirToCamera); - // Prepare initial values - float3 p0 = mul(orthonormalMat, positions[startIdx].xyz - pos); // First point in polygon - diffuse = 0.0; - specular = 0.0; - - float3 prevClipPoint = float3(0.0, 0.0, 0.0); // Used to hold previous clip point when polygon dips below horizon. - float3 closePoint = p0; - - // Handle if the first point is below the horizon. - if (p0.z < 0.0) + // Evaluate the starting point (p0), previous point, and point used to close the polygon + float3 p0, prevClipPoint, closePoint; + LtcPolygonEvaluateInitialPoints(surface.position, orthonormalMat, positions, startIdx, prevClipPoint, closePoint, endIdx, p0); + + // Check if all points below horizon + if (endIdx == startIdx + 1) { - float3 firstPoint = p0; // save the first point so it can be restored later. - - // Find the previous clip point so it can be used when the polygon goes above the horizon by - // searching backwards, updating the endIdx along the way to avoid reprocessing those points later - for ( ; endIdx > startIdx + 1; --endIdx) - { - float3 prevPoint = mul(orthonormalMat, positions[endIdx - 1].xyz - pos); - if (prevPoint.z > 0.0) - { - prevClipPoint = ClipEdge(prevPoint, p0); - closePoint = prevClipPoint; - break; - } - p0 = prevPoint; - } - - // Check if all points below horizon - if (endIdx == startIdx + 1) - { - return; - } - - p0 = firstPoint; // Restore the original p0 + return; } + float diffuse = 0.0; + float specular = 0.0; + + float2 ltcCoords = LtcCoords(dot(surface.normal, lightingData.dirToCamera), surface.roughnessLinear); + float3x3 ltcMat = LtcMatrix(ltcMatrix, ltcCoords); + // Evaluate all the points for (uint curIdx = startIdx + 1; curIdx < endIdx; ++curIdx) { - float3 p1 = mul(orthonormalMat, positions[curIdx].xyz - pos); // Current point in polygon - EvaluatePolyEdge(p0, p1, prevClipPoint, ltcMat, diffuse, specular); + float3 p1 = mul(orthonormalMat, positions[curIdx].xyz - surface.position); // Current point in polygon + EvaluatePolyEdge(p0, p1, ltcMat, prevClipPoint, diffuse, specular); p0 = p1; } - EvaluatePolyEdge(p0, closePoint, prevClipPoint, ltcMat, diffuse, specular); + EvaluatePolyEdge(p0, closePoint, ltcMat, prevClipPoint, diffuse, specular); // Note: negated due to winding order diffuse = -diffuse; specular = -specular; + + // Apply BRDF scale terms (BRDF magnitude and Schlick Fresnel) + float2 schlick = ltcAmpMatrix.Sample(PassSrg::LinearSampler, ltcCoords).xy; + float3 specularRgb = specular * ((schlick.x * surface.specularF0) + (1.0 - surface.specularF0) * schlick.y); + + if(o_clearCoat_feature_enabled) + { + // Rotate ltc matrix + float3x3 orthonormalMatCc = BuildViewAlignedOrthonormalBasis(surface.clearCoat.normal, lightingData.dirToCamera); + + // restore original endIdx and re-evaluate initial points with matrix based on the clearcoat normal. + endIdx = originalEndIdx; + LtcPolygonEvaluateInitialPoints(surface.position, orthonormalMatCc, positions, startIdx, prevClipPoint, closePoint, endIdx, p0); + + // Check if all points below horizon + if (endIdx != startIdx + 1) + { + float specularCc = 0.0; + + float2 ltcCoordsCc = LtcCoords(dot(surface.clearCoat.normal, lightingData.dirToCamera), surface.clearCoat.roughness); + float3x3 ltcMatCc = LtcMatrix(ltcMatrix, ltcCoordsCc); + + // Evaluate all the points + for (uint curIdx = startIdx + 1; curIdx < endIdx; ++curIdx) + { + float3 p1 = mul(orthonormalMatCc, positions[curIdx].xyz - surface.position); // Current point in polygon + EvaluatePolyEdgeSpecularOnly(p0, p1, ltcMatCc, prevClipPoint, specularCc); + p0 = p1; + } + + EvaluatePolyEdgeSpecularOnly(p0, closePoint, ltcMatCc, prevClipPoint, specularCc); + + // Note: negated due to winding order + specularCc = -specularCc; + + // Apply BRDF scale terms (BRDF magnitude and Schlick Fresnel) + const float clearCoatSpecularF0 = 0.04; + float2 schlickCc = ltcAmpMatrix.Sample(PassSrg::LinearSampler, ltcCoordsCc).xy; + float F = clearCoatSpecularF0 * schlickCc.x + (1.0 - clearCoatSpecularF0) * schlickCc.y; + F *= surface.clearCoat.factor; + + diffuse = diffuse * (1.0 - F); + specularRgb = (specularRgb * (1.0 - F)) + (specularCc * F); + } + } + + diffuseOut = diffuse; + specularRgbOut = specularRgb; + } diff --git a/Gems/Atom/Feature/Common/Assets/ShaderLib/Atom/Features/PBR/Lights/PointLight.azsli b/Gems/Atom/Feature/Common/Assets/ShaderLib/Atom/Features/PBR/Lights/PointLight.azsli index e6eea9728f..92f4065931 100644 --- a/Gems/Atom/Feature/Common/Assets/ShaderLib/Atom/Features/PBR/Lights/PointLight.azsli +++ b/Gems/Atom/Feature/Common/Assets/ShaderLib/Atom/Features/PBR/Lights/PointLight.azsli @@ -50,6 +50,20 @@ int UnpackPointLightShadowIndex(const ViewSrg::PointLight light, const int face) return (light.m_shadowIndices[index] >> shiftAmount) & 0xFFFF; } +uint ComputeShadowIndex(const ViewSrg::PointLight light, const Surface surface) +{ + // shadow map size and bias are the same across all shadowmaps used by a specific point light, so just grab the first one + const uint lightIndex0 = UnpackPointLightShadowIndex(light, 0); + const float shadowmapSize = ViewSrg::m_projectedFilterParams[lightIndex0].m_shadowmapSize; + + // Note that the normal bias offset could potentially move the shadowed position from one map to another map inside the same point light shadow. + const float normalBias = ViewSrg::m_projectedShadows[lightIndex0].m_normalShadowBias; + const float3 biasedPosition = surface.position + ComputeNormalShadowOffset(normalBias, surface.vertexNormal, shadowmapSize); + + const int shadowCubemapFace = GetPointLightShadowCubemapFace(biasedPosition, light.m_position); + return UnpackPointLightShadowIndex(light, shadowCubemapFace); +} + void ApplyPointLight(ViewSrg::PointLight light, Surface surface, inout LightingData lightingData) { float3 posToLight = light.m_position - surface.position; @@ -74,10 +88,8 @@ void ApplyPointLight(ViewSrg::PointLight light, Surface surface, inout LightingD float backShadowRatio = 0.0; if (o_enableShadows) { - const int shadowCubemapFace = GetPointLightShadowCubemapFace(surface.position, light.m_position); - const int shadowIndex = UnpackPointLightShadowIndex(light, shadowCubemapFace); const float3 lightDir = normalize(light.m_position - surface.position); - + const uint shadowIndex = ComputeShadowIndex(light, surface); litRatio *= ProjectedShadow::GetVisibility( shadowIndex, light.m_position, diff --git a/Gems/Atom/Feature/Common/Assets/ShaderLib/Atom/Features/PBR/Lights/PolygonLight.azsli b/Gems/Atom/Feature/Common/Assets/ShaderLib/Atom/Features/PBR/Lights/PolygonLight.azsli index 66f21ec5d8..07fe6d4f00 100644 --- a/Gems/Atom/Feature/Common/Assets/ShaderLib/Atom/Features/PBR/Lights/PolygonLight.azsli +++ b/Gems/Atom/Feature/Common/Assets/ShaderLib/Atom/Features/PBR/Lights/PolygonLight.azsli @@ -51,25 +51,19 @@ void ApplyPoylgonLight(ViewSrg::PolygonLight light, Surface surface, inout Light float radiusAttenuation = 1.0 - (falloff * falloff); radiusAttenuation = radiusAttenuation * radiusAttenuation; - float2 ltcCoords = LtcCoords(dot(surface.normal, lightingData.dirToCamera), surface.roughnessLinear); - float3x3 ltcMat = LtcMatrix(SceneSrg::m_ltcMatrix, ltcCoords); - float diffuse = 0.0; - float specular = 0.0; + float3 specularRgb = 0.0; + + LtcPolygonEvaluate(surface, lightingData, SceneSrg::m_ltcMatrix, SceneSrg::m_ltcAmplification, ViewSrg::m_polygonLightPoints, startIndex, endIndex, diffuse, specularRgb); - LtcPolygonEvaluate(surface.position, surface.normal, lightingData.dirToCamera, ltcMat, ViewSrg::m_polygonLightPoints, startIndex, endIndex, diffuse, specular); diffuse = doubleSided ? abs(diffuse) : max(0.0, diffuse); - specular = doubleSided ? abs(specular) : max(0.0, specular); - - // Apply BRDF scale terms (BRDF magnitude and Schlick Fresnel) - float2 schlick = SceneSrg::m_ltcAmplification.Sample(PassSrg::LinearSampler, ltcCoords).xy; - float3 specularRGB = specular * (schlick.x + (1.0 - surface.specularF0) * schlick.y); + specularRgb = doubleSided ? abs(specularRgb) : max(0.0, specularRgb); // Scale by inverse surface area of hemisphere (1/2pi), attenuation, and light intensity float3 intensity = 0.5 * INV_PI * radiusAttenuation * abs(light.m_rgbIntensityNits); lightingData.diffuseLighting += surface.albedo * diffuse * intensity; - lightingData.specularLighting += surface.specularF0 * specularRGB * intensity; + lightingData.specularLighting += specularRgb * intensity; } void ApplyPolygonLights(Surface surface, inout LightingData lightingData) diff --git a/Gems/Atom/Feature/Common/Assets/ShaderLib/Atom/Features/PBR/Lights/QuadLight.azsli b/Gems/Atom/Feature/Common/Assets/ShaderLib/Atom/Features/PBR/Lights/QuadLight.azsli index 43f5095f84..63515339d8 100644 --- a/Gems/Atom/Feature/Common/Assets/ShaderLib/Atom/Features/PBR/Lights/QuadLight.azsli +++ b/Gems/Atom/Feature/Common/Assets/ShaderLib/Atom/Features/PBR/Lights/QuadLight.azsli @@ -112,22 +112,15 @@ void ApplyQuadLight(ViewSrg::QuadLight light, Surface surface, inout LightingDat { float3 p[4] = {p0, p1, p2, p3}; - float2 ltcCoords = LtcCoords(dot(surface.normal, lightingData.dirToCamera), surface.roughnessLinear); - float3x3 ltcMat = LtcMatrix(SceneSrg::m_ltcMatrix, ltcCoords); - float diffuse = 0.0; - float specular = 0.0; - LtcQuadEvaluate(surface.normal, lightingData.dirToCamera, ltcMat, p, doubleSided, diffuse, specular); - - // Apply BRDF scale terms (BRDF magnitude and Schlick Fresnel) - float2 schlick = SceneSrg::m_ltcAmplification.Sample(PassSrg::LinearSampler, ltcCoords).xy; - float3 specularRGB = specular * (schlick.x + (1.0 - surface.specularF0) * schlick.y); + float3 specular = float3(0.0, 0.0, 0.0); // specularF0 used in LtcQuadEvaluate which is a float3 + LtcQuadEvaluate(surface, lightingData, SceneSrg::m_ltcMatrix, SceneSrg::m_ltcAmplification, p, doubleSided, diffuse, specular); // Scale by inverse surface area of hemisphere (1/2pi), attenuation, and light intensity float3 intensity = 0.5 * INV_PI * radiusAttenuation * light.m_rgbIntensityNits; lightingData.diffuseLighting += surface.albedo * diffuse * intensity; - lightingData.specularLighting += surface.specularF0 * specularRGB * intensity; + lightingData.specularLighting += specular * intensity; } else { diff --git a/Gems/Atom/Feature/Common/Assets/ShaderLib/Atom/Features/PBR/Microfacet/Brdf.azsli b/Gems/Atom/Feature/Common/Assets/ShaderLib/Atom/Features/PBR/Microfacet/Brdf.azsli index 0f3e3c913d..e7904fefdf 100644 --- a/Gems/Atom/Feature/Common/Assets/ShaderLib/Atom/Features/PBR/Microfacet/Brdf.azsli +++ b/Gems/Atom/Feature/Common/Assets/ShaderLib/Atom/Features/PBR/Microfacet/Brdf.azsli @@ -22,7 +22,7 @@ // ------- Diffuse Lighting ------- //! Simple Lambertian BRDF. -float3 DiffuseLambertian(float3 albedo, float3 normal, float3 dirToLight, float diffuseResponse) +float3 DiffuseLambertian(float3 albedo, float3 normal, float3 dirToLight, float3 diffuseResponse) { float NdotL = saturate(dot(normal, dirToLight)); return albedo * NdotL * INV_PI * diffuseResponse; diff --git a/Gems/Atom/Feature/Common/Assets/ShaderLib/Atom/Features/PBR/Surfaces/BasePbrSurfaceData.azsli b/Gems/Atom/Feature/Common/Assets/ShaderLib/Atom/Features/PBR/Surfaces/BasePbrSurfaceData.azsli index 54bfa31fe8..484958c26c 100644 --- a/Gems/Atom/Feature/Common/Assets/ShaderLib/Atom/Features/PBR/Surfaces/BasePbrSurfaceData.azsli +++ b/Gems/Atom/Feature/Common/Assets/ShaderLib/Atom/Features/PBR/Surfaces/BasePbrSurfaceData.azsli @@ -24,7 +24,7 @@ static const float MinRoughnessA = 0.0005f; class BasePbrSurfaceData { - float3 position; //!< Position in world-space + precise float3 position; //!< Position in world-space float3 normal; //!< Normal in world-space float3 albedo; //!< Albedo color of the non-metallic material, will be multiplied against the diffuse lighting value float3 specularF0; //!< Fresnel f0 spectral value of the surface diff --git a/Gems/Atom/Feature/Common/Assets/ShaderLib/Atom/Features/PBR/Surfaces/StandardSurface.azsli b/Gems/Atom/Feature/Common/Assets/ShaderLib/Atom/Features/PBR/Surfaces/StandardSurface.azsli index 084943bf38..e1b3ff8206 100644 --- a/Gems/Atom/Feature/Common/Assets/ShaderLib/Atom/Features/PBR/Surfaces/StandardSurface.azsli +++ b/Gems/Atom/Feature/Common/Assets/ShaderLib/Atom/Features/PBR/Surfaces/StandardSurface.azsli @@ -20,7 +20,7 @@ class Surface // ------- BasePbrSurfaceData ------- - float3 position; //!< Position in world-space + precise float3 position; //!< Position in world-space float3 normal; //!< Normal in world-space float3 vertexNormal; //!< Vertex normal in world-space float3 albedo; //!< Albedo color of the non-metallic material, will be multiplied against the diffuse lighting value diff --git a/Gems/Atom/Feature/Common/Assets/ShaderLib/Atom/Features/RayTracing/RayTracingSceneSrg.azsli b/Gems/Atom/Feature/Common/Assets/ShaderLib/Atom/Features/RayTracing/RayTracingSceneSrg.azsli index c4141c6eb2..1ef06b3219 100644 --- a/Gems/Atom/Feature/Common/Assets/ShaderLib/Atom/Features/RayTracing/RayTracingSceneSrg.azsli +++ b/Gems/Atom/Feature/Common/Assets/ShaderLib/Atom/Features/RayTracing/RayTracingSceneSrg.azsli @@ -134,15 +134,13 @@ ShaderResourceGroup RayTracingSceneSrg : SRG_RayTracingScene uint m_normalOffset; uint m_tangentOffset; uint m_bitangentOffset; - uint m_uvOffset; - float m_padding0[2]; - - float4 m_irradianceColor; - float3x3 m_worldInvTranspose; - float m_padding1; - + uint m_uvOffset; + uint m_bufferFlags; uint m_bufferStartIndex; + + float4 m_irradianceColor; + float3x4 m_worldInvTranspose; }; // hit shaders can retrieve the MeshInfo for a mesh hit using: RayTracingSceneSrg::m_meshInfo[InstanceIndex()] @@ -163,4 +161,4 @@ ShaderResourceGroup RayTracingSceneSrg : SRG_RayTracingScene // - Optional stream buffers such as Tangent, Bitangent, and UV are indicated in the MeshInfo.m_bufferFlags field // - Buffers for a particular mesh start at MeshInfo.m_bufferStartIndex ByteAddressBuffer m_meshBuffers[]; -} \ No newline at end of file +} diff --git a/Gems/Atom/Feature/Common/Assets/ShaderLib/Atom/Features/RayTracing/RayTracingSceneUtils.azsli b/Gems/Atom/Feature/Common/Assets/ShaderLib/Atom/Features/RayTracing/RayTracingSceneUtils.azsli index 9e34edf048..e203a0d425 100644 --- a/Gems/Atom/Feature/Common/Assets/ShaderLib/Atom/Features/RayTracing/RayTracingSceneUtils.azsli +++ b/Gems/Atom/Feature/Common/Assets/ShaderLib/Atom/Features/RayTracing/RayTracingSceneUtils.azsli @@ -124,4 +124,4 @@ VertexData GetHitInterpolatedVertexData(RayTracingSceneSrg::MeshInfo meshInfo, f vertexData.m_bitangent = normalize(vertexData.m_bitangent); return vertexData; -} \ No newline at end of file +} diff --git a/Gems/Atom/Feature/Common/Assets/ShaderLib/Atom/Features/Shadow/DirectionalLightShadow.azsli b/Gems/Atom/Feature/Common/Assets/ShaderLib/Atom/Features/Shadow/DirectionalLightShadow.azsli index a7122aaf3a..870bebdf4b 100644 --- a/Gems/Atom/Feature/Common/Assets/ShaderLib/Atom/Features/Shadow/DirectionalLightShadow.azsli +++ b/Gems/Atom/Feature/Common/Assets/ShaderLib/Atom/Features/Shadow/DirectionalLightShadow.azsli @@ -10,6 +10,7 @@ #include #include +#include #include "Shadow.azsli" #include "ShadowmapAtlasLib.azsli" #include "BicubicPcfFilters.azsli" @@ -25,6 +26,10 @@ enum class ShadowFilterMethod {None, Pcf, Esm, EsmPcf}; option ShadowFilterMethod o_directional_shadow_filtering_method = ShadowFilterMethod::None; option bool o_directional_shadow_receiver_plane_bias_enable = true; +option bool o_blend_between_cascades_enable = false; + +static const float CascadeBlendArea = 0.015f; // might be worth exposing this as a slider. + // DirectionalLightShadow calculates lit ratio for a directional light. class DirectionalLightShadow @@ -98,6 +103,8 @@ class DirectionalLightShadow float SamplePcfBicubic(float3 shadowCoord, uint indexOfCascade); + float CalculateCascadeBlendAmount(const float3 texCoord); + uint m_lightIndex; float3 m_shadowCoords[ViewSrg::MaxCascadeCount]; float m_slopeBias[ViewSrg::MaxCascadeCount]; @@ -166,7 +173,7 @@ float DirectionalLightShadow::GetThickness(uint lightIndex, float3 shadowCoords[ bool2 DirectionalLightShadow::IsShadowed(float3 shadowCoord, uint indexOfCascade) { static const float PixelMargin = 1.5; // avoiding artifact between cascade levels. - static const float DepthMargin = 0.01; // avoiding artifact when near depth bounds. + static const float DepthMargin = 1e-8; // avoiding artifact when near depth bounds. // size is the shadowap's width and height. const uint size = ViewSrg::m_directionalLightShadows[m_lightIndex].m_shadowmapSize; @@ -174,6 +181,7 @@ bool2 DirectionalLightShadow::IsShadowed(float3 shadowCoord, uint indexOfCascade const uint cascadeCount = ViewSrg::m_directionalLightShadows[m_lightIndex].m_cascadeCount; Texture2DArray shadowmap = PassSrg::m_directionalLightShadowmap; + [branch] if (shadowCoord.x >= 0. && shadowCoord.x * size < size - PixelMargin && shadowCoord.y >= 0. && shadowCoord.y * size < size - PixelMargin) { @@ -210,23 +218,49 @@ float DirectionalLightShadow::GetVisibilityFromLightNoFilter() float DirectionalLightShadow::GetVisibilityFromLightPcf() { - static const float DepthMargin = 0.01; // avoiding artifact when near depth bounds. static const float PixelMargin = 1.5; // avoiding artifact between cascade levels. + static const float DepthMargin = 1e-8; // avoiding artifact when near depth bounds. + + bool cascadeFound = false; + int currentCascadeIndex = 0; const uint size = ViewSrg::m_directionalLightShadows[m_lightIndex].m_shadowmapSize; const uint cascadeCount = ViewSrg::m_directionalLightShadows[m_lightIndex].m_cascadeCount; for (uint indexOfCascade = 0; indexOfCascade < cascadeCount; ++indexOfCascade) { const float3 shadowCoord = m_shadowCoords[indexOfCascade]; - + if (shadowCoord.x >= 0. && shadowCoord.x * size < size - PixelMargin && shadowCoord.y >= 0. && shadowCoord.y * size < size - PixelMargin && shadowCoord.z < 1. - DepthMargin) { - m_debugInfo.m_cascadeIndex = indexOfCascade; - return SamplePcfBicubic(shadowCoord, indexOfCascade); + currentCascadeIndex = m_debugInfo.m_cascadeIndex = indexOfCascade; + cascadeFound = true; + break; } } + + [branch] + if (cascadeFound) + { + float lit = SamplePcfBicubic(m_shadowCoords[currentCascadeIndex], currentCascadeIndex); + + if(o_blend_between_cascades_enable) + { + const float blendBetweenCascadesAmount = CalculateCascadeBlendAmount(m_shadowCoords[currentCascadeIndex].xyz); + + const int nextCascadeIndex = currentCascadeIndex + 1; + [branch] + if (blendBetweenCascadesAmount < 1.0f && nextCascadeIndex < cascadeCount) + { + const float nextLit = SamplePcfBicubic(m_shadowCoords[nextCascadeIndex], nextCascadeIndex); + lit = lerp(nextLit, lit, blendBetweenCascadesAmount); + } + } + + return lit; + } + m_debugInfo.m_cascadeIndex = cascadeCount; return 1.; } @@ -244,6 +278,8 @@ float DirectionalLightShadow::GetVisibilityFromLightEsm() const float distanceMin = ViewSrg::m_esmsDirectional[indexOfCascade].m_lightDistanceOfCameraViewFrustum; bool2 checkedShadowed = IsShadowed(shadowCoord, indexOfCascade); const float depthDiff = shadowCoord.z - distanceMin; + + [branch] if (checkedShadowed.x && depthDiff >= 0) { const float distanceWithinCameraView = depthDiff / (1. - distanceMin); @@ -274,6 +310,8 @@ float DirectionalLightShadow::GetVisibilityFromLightEsmPcf() const float distanceMin = ViewSrg::m_esmsDirectional[indexOfCascade].m_lightDistanceOfCameraViewFrustum; bool2 checkedShadowed = IsShadowed(shadowCoord, indexOfCascade); const float depthDiff = shadowCoord.z - distanceMin; + + [branch] if (checkedShadowed.x && depthDiff >= 0) { const float distanceWithinCameraView = depthDiff / (1. - distanceMin); @@ -319,6 +357,7 @@ float DirectionalLightShadow::SamplePcfBicubic(float3 shadowCoord, uint indexOfC param.samplerState = SceneSrg::m_hwPcfSampler; param.receiverPlaneDepthBias = o_directional_shadow_receiver_plane_bias_enable ? ComputeReceiverPlaneDepthBias(m_shadowPosDX[indexOfCascade], m_shadowPosDY[indexOfCascade]) : 0; + [branch] if (filteringSampleCount <= 4) { return SampleShadowMapBicubic_4Tap(param); @@ -420,3 +459,10 @@ float3 DirectionalLightShadow::AddDebugColoring( } return color; } + +float DirectionalLightShadow::CalculateCascadeBlendAmount(const float3 texCoord) +{ + const float distanceToOneMin = min3(1.0f - texCoord); + const float currentPixelsBlendBandLocation = min(min(texCoord.x, texCoord.y), distanceToOneMin); + return currentPixelsBlendBandLocation / CascadeBlendArea; +} diff --git a/Gems/Atom/Feature/Common/Assets/ShaderLib/Atom/Features/Shadow/ESM.azsli b/Gems/Atom/Feature/Common/Assets/ShaderLib/Atom/Features/Shadow/ESM.azsli new file mode 100644 index 0000000000..3a258c2f47 --- /dev/null +++ b/Gems/Atom/Feature/Common/Assets/ShaderLib/Atom/Features/Shadow/ESM.azsli @@ -0,0 +1,24 @@ +/* + * Copyright (c) Contributors to the Open 3D Engine Project. + * For complete copyright and license terms please see the LICENSE at the root of this distribution. + * + * SPDX-License-Identifier: Apache-2.0 OR MIT + * + */ + +#pragma once + + +float SampleESM(const Texture2DArray shadowMap, const SamplerState samp, const float3 uv, const float zReceiver, const float esmExponent) +{ + const float mipmaplevel = 0; + const float occluder = shadowMap.SampleLevel(samp,uv, mipmaplevel).r; + const float lit = exp((occluder - zReceiver) * esmExponent); + return lit; +} + +float PCFFallbackForESM(const Texture2DArray shadowMap, const float3 uv, const float zReceiver, const float esmExponent) +{ + const float result = SampleESM(shadowMap, PassSrg::LinearSampler, uv, zReceiver, esmExponent); + return saturate(result); +} diff --git a/Gems/Atom/Feature/Common/Assets/ShaderLib/Atom/Features/Shadow/ProjectedShadow.azsli b/Gems/Atom/Feature/Common/Assets/ShaderLib/Atom/Features/Shadow/ProjectedShadow.azsli index daed3a2921..98ec9ea8bc 100644 --- a/Gems/Atom/Feature/Common/Assets/ShaderLib/Atom/Features/Shadow/ProjectedShadow.azsli +++ b/Gems/Atom/Feature/Common/Assets/ShaderLib/Atom/Features/Shadow/ProjectedShadow.azsli @@ -14,6 +14,8 @@ #include #include "BicubicPcfFilters.azsli" #include "Shadow.azsli" +#include "NormalOffsetShadows.azsli" +#include "ESM.azsli" // ProjectedShadow calculates shadowed area projected from a light. class ProjectedShadow @@ -123,6 +125,7 @@ float ProjectedShadow::GetThickness(uint shadowIndex, float3 worldPosition) ProjectedShadow shadow; shadow.m_worldPosition = worldPosition; + shadow.m_normalVector = 0; // The normal vector is used to reduce acne, this is not an issue when using the shadowmap to determine thickness. shadow.m_shadowIndex = shadowIndex; shadow.SetShadowPosition(); return shadow.GetThickness(); @@ -188,13 +191,11 @@ float ProjectedShadow::GetVisibilityEsm() const float depth = PerspectiveDepthToLinear( m_shadowPosition.z - m_bias, coefficients); - const float occluder = shadowmap.SampleLevel( - PassSrg::LinearSampler, - float3(atlasPosition.xy * invAtlasSize, atlasPosition.z), - /*LOD=*/0).r; + + const float3 uv = float3(atlasPosition.xy * invAtlasSize, atlasPosition.z); + const float esmExponent = ViewSrg::m_projectedShadows[m_shadowIndex].m_esmExponent; + const float ratio = SampleESM(shadowmap, PassSrg::LinearSampler, uv, depth, esmExponent); - const float exponent = -ViewSrg::m_projectedShadows[m_shadowIndex].m_esmExponent * (depth - occluder); - const float ratio = exp(exponent); // pow() mitigates light bleeding to shadows from near shadow casters. return saturate( pow(ratio, 8) ); } @@ -227,21 +228,18 @@ float ProjectedShadow::GetVisibilityEsmPcf() return 1.; } const float3 atlasPosition = GetAtlasPosition(m_shadowPosition.xy); + const float3 uv = float3(atlasPosition.xy * invAtlasSize, atlasPosition.z); const float depth = PerspectiveDepthToLinear( m_shadowPosition.z - m_bias, coefficients); - const float occluder = shadowmap.SampleLevel( - PassSrg::LinearSampler, - float3(atlasPosition.xy * invAtlasSize, atlasPosition.z), - /*LOD=*/0).r; - - const float exponent = -ViewSrg::m_projectedShadows[m_shadowIndex].m_esmExponent * (depth - occluder); - float ratio = exp(exponent); + + const float esmExponent = ViewSrg::m_projectedShadows[m_shadowIndex].m_esmExponent; + float ratio = SampleESM(shadowmap, PassSrg::LinearSampler, uv, depth, esmExponent); static const float pcfFallbackThreshold = 1.04; if (ratio > pcfFallbackThreshold) { - ratio = GetVisibilityPcf(); + ratio = PCFFallbackForESM(shadowmap, uv, depth, esmExponent); } else { @@ -317,8 +315,13 @@ bool ProjectedShadow::IsShadowed(float3 shadowPosition) void ProjectedShadow::SetShadowPosition() { + const float normalBias = ViewSrg::m_projectedShadows[m_shadowIndex].m_normalShadowBias; + const float shadowmapSize = ViewSrg::m_projectedFilterParams[m_shadowIndex].m_shadowmapSize; + const float3 shadowOffset = ComputeNormalShadowOffset(normalBias, m_normalVector, shadowmapSize); const float4x4 depthBiasMatrix = ViewSrg::m_projectedShadows[m_shadowIndex].m_depthBiasMatrix; - float4 shadowPositionHomogeneous = mul(depthBiasMatrix, float4(m_worldPosition, 1)); + + float4 shadowPositionHomogeneous = mul(depthBiasMatrix, float4(m_worldPosition + shadowOffset, 1)); + m_shadowPosition = shadowPositionHomogeneous.xyz / shadowPositionHomogeneous.w; m_bias = ViewSrg::m_projectedShadows[m_shadowIndex].m_bias / shadowPositionHomogeneous.w; diff --git a/Gems/Atom/Feature/Common/Assets/ShaderLib/Atom/Features/Skin/SkinObjectSrg.azsli b/Gems/Atom/Feature/Common/Assets/ShaderLib/Atom/Features/Skin/SkinObjectSrg.azsli index d0766c295d..99a32629ef 100644 --- a/Gems/Atom/Feature/Common/Assets/ShaderLib/Atom/Features/Skin/SkinObjectSrg.azsli +++ b/Gems/Atom/Feature/Common/Assets/ShaderLib/Atom/Features/Skin/SkinObjectSrg.azsli @@ -46,6 +46,7 @@ ShaderResourceGroup ObjectSrg : SRG_PerObject float m_padding; bool m_useReflectionProbe; bool m_useParallaxCorrection; + float m_exposure; }; ReflectionProbeData m_reflectionProbeData; diff --git a/Gems/Atom/Feature/Common/Assets/ShaderResourceGroups/PostProcessing/ViewSrg.azsli b/Gems/Atom/Feature/Common/Assets/ShaderResourceGroups/PostProcessing/ViewSrg.azsli index 10906ac09b..3eff3615f0 100644 --- a/Gems/Atom/Feature/Common/Assets/ShaderResourceGroups/PostProcessing/ViewSrg.azsli +++ b/Gems/Atom/Feature/Common/Assets/ShaderResourceGroups/PostProcessing/ViewSrg.azsli @@ -26,8 +26,10 @@ partial ShaderResourceGroup ViewSrg // circle of confusion to screen ratio; float m_cocToScreenRatio; - }; + [[pad_to(16)]] + }; + DepthOfFieldData m_dof; struct ExposureControlParameters diff --git a/Gems/Atom/Feature/Common/Assets/ShaderResourceGroups/SceneSrgAll.azsli b/Gems/Atom/Feature/Common/Assets/ShaderResourceGroups/SceneSrgAll.azsli index 421178bb01..4480524468 100644 --- a/Gems/Atom/Feature/Common/Assets/ShaderResourceGroups/SceneSrgAll.azsli +++ b/Gems/Atom/Feature/Common/Assets/ShaderResourceGroups/SceneSrgAll.azsli @@ -13,4 +13,5 @@ #ifdef AZ_COLLECTING_PARTIAL_SRGS #include #include +#include // Temporary until gem partial view srgs can be included automatically. #endif diff --git a/Gems/Atom/Feature/Common/Assets/Shaders/Depth/DepthPassCommon.azsli b/Gems/Atom/Feature/Common/Assets/Shaders/Depth/DepthPassCommon.azsli index f658dd13da..ba06dada74 100644 --- a/Gems/Atom/Feature/Common/Assets/Shaders/Depth/DepthPassCommon.azsli +++ b/Gems/Atom/Feature/Common/Assets/Shaders/Depth/DepthPassCommon.azsli @@ -17,7 +17,7 @@ struct VSInput struct VSDepthOutput { - float4 m_position : SV_Position; + precise float4 m_position : SV_Position; }; VSDepthOutput DepthPassVS(VSInput IN) diff --git a/Gems/Atom/Feature/Common/Assets/Shaders/DiffuseGlobalIllumination/DiffuseComposite.azsl b/Gems/Atom/Feature/Common/Assets/Shaders/DiffuseGlobalIllumination/DiffuseComposite.azsl index 64ee955a46..e3237e59a2 100644 --- a/Gems/Atom/Feature/Common/Assets/Shaders/DiffuseGlobalIllumination/DiffuseComposite.azsl +++ b/Gems/Atom/Feature/Common/Assets/Shaders/DiffuseGlobalIllumination/DiffuseComposite.azsl @@ -68,9 +68,7 @@ float3 SampleProbeIrradiance(uint sampleIndex, uint2 probeIrradianceCoords, floa if (abs(depth - downsampledDepth) <= DepthTolerance) { // use this irradiance sample - float3 probeIrradiance = PassSrg::m_downsampledProbeIrradiance.Load(probeIrradianceCoords, sampleIndex).rgb; - probeIrradiance = saturate(probeIrradiance); - return probeIrradiance; + return PassSrg::m_downsampledProbeIrradiance.Load(probeIrradianceCoords, sampleIndex).rgb; } } @@ -99,9 +97,7 @@ float3 SampleProbeIrradiance(uint sampleIndex, uint2 probeIrradianceCoords, floa float downsampledDepth = PassSrg::m_downsampledDepth.Load(probeIrradianceCoords + int2(x, y), sampleIndex).r; if (abs(depth - downsampledDepth) <= DepthTolerance) { - float3 probeIrradiance = PassSrg::m_downsampledProbeIrradiance.Load(probeIrradianceCoords + int2(x, y), sampleIndex).rgb; - probeIrradiance = saturate(probeIrradiance); - return probeIrradiance; + return PassSrg::m_downsampledProbeIrradiance.Load(probeIrradianceCoords + int2(x, y), sampleIndex).rgb; } closestDot = normalDot; @@ -111,9 +107,7 @@ float3 SampleProbeIrradiance(uint sampleIndex, uint2 probeIrradianceCoords, floa } } - float3 probeIrradiance = PassSrg::m_downsampledProbeIrradiance.Load(probeIrradianceCoords + closestOffset, sampleIndex).rgb; - probeIrradiance = saturate(probeIrradiance); - return probeIrradiance; + return PassSrg::m_downsampledProbeIrradiance.Load(probeIrradianceCoords + closestOffset, sampleIndex).rgb; } // retrieve irradiance from the global IBL diffuse cubemap @@ -156,22 +150,23 @@ PSOutput MainPS(VSOutput IN, in uint sampleIndex : SV_SampleIndex) float4 encodedNormal = PassSrg::m_normal.Load(screenCoords, sampleIndex); float3 normal = DecodeNormalSignedOctahedron(encodedNormal.rgb); float4 albedo = PassSrg::m_albedo.Load(screenCoords, sampleIndex); - float useProbeIrradiance = PassSrg::m_downsampledProbeIrradiance.Load(probeIrradianceCoords, sampleIndex).a; + float probeIrradianceBlendWeight = saturate(PassSrg::m_downsampledProbeIrradiance.Load(probeIrradianceCoords, sampleIndex).a); float3 diffuse = float3(0.0f, 0.0f, 0.0f); - if (useProbeIrradiance > 0.0f) - { - float3 irradiance = SampleProbeIrradiance(sampleIndex, probeIrradianceCoords, depth, normal, albedo, PassSrg::m_imageScale); - diffuse = (albedo.rgb / PI) * irradiance; - } - else + if (probeIrradianceBlendWeight > 0.0f) { - float3 irradiance = SampleGlobalIBL(sampleIndex, screenCoords, depth, normal); - diffuse = albedo * irradiance; + float3 probeIrradiance = SampleProbeIrradiance(sampleIndex, probeIrradianceCoords, depth, normal, albedo, PassSrg::m_imageScale); + diffuse = (albedo.rgb / PI) * probeIrradiance * probeIrradianceBlendWeight; + } - // adjust IBL lighting by exposure. - float iblExposureFactor = pow(2.0, SceneSrg::m_iblExposure); - diffuse *= iblExposureFactor; + if (probeIrradianceBlendWeight < 1.0f) + { + float3 globalIrradiance = SampleGlobalIBL(sampleIndex, screenCoords, depth, normal); + + // adjust IBL lighting by exposure + float3 globalDiffuse = (albedo * globalIrradiance) * pow(2.0, SceneSrg::m_iblExposure); + + diffuse += globalDiffuse * (1.0f - probeIrradianceBlendWeight); } PSOutput OUT; diff --git a/Gems/Atom/Feature/Common/Assets/Shaders/DiffuseGlobalIllumination/diffuseprobegridblenddistance.azshader b/Gems/Atom/Feature/Common/Assets/Shaders/DiffuseGlobalIllumination/diffuseprobegridblenddistance.azshader index 31fae5d98b..cf40e7fc4c 100644 Binary files a/Gems/Atom/Feature/Common/Assets/Shaders/DiffuseGlobalIllumination/diffuseprobegridblenddistance.azshader and b/Gems/Atom/Feature/Common/Assets/Shaders/DiffuseGlobalIllumination/diffuseprobegridblenddistance.azshader differ diff --git a/Gems/Atom/Feature/Common/Assets/Shaders/DiffuseGlobalIllumination/diffuseprobegridblenddistance_dx12_0.azshadervariant b/Gems/Atom/Feature/Common/Assets/Shaders/DiffuseGlobalIllumination/diffuseprobegridblenddistance_dx12_0.azshadervariant index 19e9fdfc8d..ec72a55711 100644 Binary files a/Gems/Atom/Feature/Common/Assets/Shaders/DiffuseGlobalIllumination/diffuseprobegridblenddistance_dx12_0.azshadervariant and b/Gems/Atom/Feature/Common/Assets/Shaders/DiffuseGlobalIllumination/diffuseprobegridblenddistance_dx12_0.azshadervariant differ diff --git a/Gems/Atom/Feature/Common/Assets/Shaders/DiffuseGlobalIllumination/diffuseprobegridblenddistance_null_0.azshadervariant b/Gems/Atom/Feature/Common/Assets/Shaders/DiffuseGlobalIllumination/diffuseprobegridblenddistance_null_0.azshadervariant index 43c4a615cf..3b4cd78868 100644 Binary files a/Gems/Atom/Feature/Common/Assets/Shaders/DiffuseGlobalIllumination/diffuseprobegridblenddistance_null_0.azshadervariant and b/Gems/Atom/Feature/Common/Assets/Shaders/DiffuseGlobalIllumination/diffuseprobegridblenddistance_null_0.azshadervariant differ diff --git a/Gems/Atom/Feature/Common/Assets/Shaders/DiffuseGlobalIllumination/diffuseprobegridblenddistance_vulkan_0.azshadervariant b/Gems/Atom/Feature/Common/Assets/Shaders/DiffuseGlobalIllumination/diffuseprobegridblenddistance_vulkan_0.azshadervariant index 75f070a03e..95ba557939 100644 Binary files a/Gems/Atom/Feature/Common/Assets/Shaders/DiffuseGlobalIllumination/diffuseprobegridblenddistance_vulkan_0.azshadervariant and b/Gems/Atom/Feature/Common/Assets/Shaders/DiffuseGlobalIllumination/diffuseprobegridblenddistance_vulkan_0.azshadervariant differ diff --git a/Gems/Atom/Feature/Common/Assets/Shaders/DiffuseGlobalIllumination/diffuseprobegridblendirradiance.azshader b/Gems/Atom/Feature/Common/Assets/Shaders/DiffuseGlobalIllumination/diffuseprobegridblendirradiance.azshader index 0025388bc1..f594d121ea 100644 Binary files a/Gems/Atom/Feature/Common/Assets/Shaders/DiffuseGlobalIllumination/diffuseprobegridblendirradiance.azshader and b/Gems/Atom/Feature/Common/Assets/Shaders/DiffuseGlobalIllumination/diffuseprobegridblendirradiance.azshader differ diff --git a/Gems/Atom/Feature/Common/Assets/Shaders/DiffuseGlobalIllumination/diffuseprobegridblendirradiance_dx12_0.azshadervariant b/Gems/Atom/Feature/Common/Assets/Shaders/DiffuseGlobalIllumination/diffuseprobegridblendirradiance_dx12_0.azshadervariant index 34a9b3659f..816469ec2d 100644 Binary files a/Gems/Atom/Feature/Common/Assets/Shaders/DiffuseGlobalIllumination/diffuseprobegridblendirradiance_dx12_0.azshadervariant and b/Gems/Atom/Feature/Common/Assets/Shaders/DiffuseGlobalIllumination/diffuseprobegridblendirradiance_dx12_0.azshadervariant differ diff --git a/Gems/Atom/Feature/Common/Assets/Shaders/DiffuseGlobalIllumination/diffuseprobegridblendirradiance_null_0.azshadervariant b/Gems/Atom/Feature/Common/Assets/Shaders/DiffuseGlobalIllumination/diffuseprobegridblendirradiance_null_0.azshadervariant index 4a2b0e9944..f352a375d0 100644 Binary files a/Gems/Atom/Feature/Common/Assets/Shaders/DiffuseGlobalIllumination/diffuseprobegridblendirradiance_null_0.azshadervariant and b/Gems/Atom/Feature/Common/Assets/Shaders/DiffuseGlobalIllumination/diffuseprobegridblendirradiance_null_0.azshadervariant differ diff --git a/Gems/Atom/Feature/Common/Assets/Shaders/DiffuseGlobalIllumination/diffuseprobegridblendirradiance_vulkan_0.azshadervariant b/Gems/Atom/Feature/Common/Assets/Shaders/DiffuseGlobalIllumination/diffuseprobegridblendirradiance_vulkan_0.azshadervariant index c053a7db19..8e4364d56b 100644 Binary files a/Gems/Atom/Feature/Common/Assets/Shaders/DiffuseGlobalIllumination/diffuseprobegridblendirradiance_vulkan_0.azshadervariant and b/Gems/Atom/Feature/Common/Assets/Shaders/DiffuseGlobalIllumination/diffuseprobegridblendirradiance_vulkan_0.azshadervariant differ diff --git a/Gems/Atom/Feature/Common/Assets/Shaders/DiffuseGlobalIllumination/diffuseprobegridborderupdatecolumn.azshader b/Gems/Atom/Feature/Common/Assets/Shaders/DiffuseGlobalIllumination/diffuseprobegridborderupdatecolumn.azshader index c507b12563..f733a56137 100644 Binary files a/Gems/Atom/Feature/Common/Assets/Shaders/DiffuseGlobalIllumination/diffuseprobegridborderupdatecolumn.azshader and b/Gems/Atom/Feature/Common/Assets/Shaders/DiffuseGlobalIllumination/diffuseprobegridborderupdatecolumn.azshader differ diff --git a/Gems/Atom/Feature/Common/Assets/Shaders/DiffuseGlobalIllumination/diffuseprobegridborderupdatecolumn_dx12_0.azshadervariant b/Gems/Atom/Feature/Common/Assets/Shaders/DiffuseGlobalIllumination/diffuseprobegridborderupdatecolumn_dx12_0.azshadervariant index f60c713597..20aed31a10 100644 Binary files a/Gems/Atom/Feature/Common/Assets/Shaders/DiffuseGlobalIllumination/diffuseprobegridborderupdatecolumn_dx12_0.azshadervariant and b/Gems/Atom/Feature/Common/Assets/Shaders/DiffuseGlobalIllumination/diffuseprobegridborderupdatecolumn_dx12_0.azshadervariant differ diff --git a/Gems/Atom/Feature/Common/Assets/Shaders/DiffuseGlobalIllumination/diffuseprobegridborderupdatecolumn_null_0.azshadervariant b/Gems/Atom/Feature/Common/Assets/Shaders/DiffuseGlobalIllumination/diffuseprobegridborderupdatecolumn_null_0.azshadervariant index 3e810bcfb5..a8cf6ac19e 100644 Binary files a/Gems/Atom/Feature/Common/Assets/Shaders/DiffuseGlobalIllumination/diffuseprobegridborderupdatecolumn_null_0.azshadervariant and b/Gems/Atom/Feature/Common/Assets/Shaders/DiffuseGlobalIllumination/diffuseprobegridborderupdatecolumn_null_0.azshadervariant differ diff --git a/Gems/Atom/Feature/Common/Assets/Shaders/DiffuseGlobalIllumination/diffuseprobegridborderupdatecolumn_vulkan_0.azshadervariant b/Gems/Atom/Feature/Common/Assets/Shaders/DiffuseGlobalIllumination/diffuseprobegridborderupdatecolumn_vulkan_0.azshadervariant index 5918f277b5..6e7324191f 100644 Binary files a/Gems/Atom/Feature/Common/Assets/Shaders/DiffuseGlobalIllumination/diffuseprobegridborderupdatecolumn_vulkan_0.azshadervariant and b/Gems/Atom/Feature/Common/Assets/Shaders/DiffuseGlobalIllumination/diffuseprobegridborderupdatecolumn_vulkan_0.azshadervariant differ diff --git a/Gems/Atom/Feature/Common/Assets/Shaders/DiffuseGlobalIllumination/diffuseprobegridborderupdaterow.azshader b/Gems/Atom/Feature/Common/Assets/Shaders/DiffuseGlobalIllumination/diffuseprobegridborderupdaterow.azshader index 120eb70e54..9e2e426ff4 100644 Binary files a/Gems/Atom/Feature/Common/Assets/Shaders/DiffuseGlobalIllumination/diffuseprobegridborderupdaterow.azshader and b/Gems/Atom/Feature/Common/Assets/Shaders/DiffuseGlobalIllumination/diffuseprobegridborderupdaterow.azshader differ diff --git a/Gems/Atom/Feature/Common/Assets/Shaders/DiffuseGlobalIllumination/diffuseprobegridborderupdaterow_dx12_0.azshadervariant b/Gems/Atom/Feature/Common/Assets/Shaders/DiffuseGlobalIllumination/diffuseprobegridborderupdaterow_dx12_0.azshadervariant index d38d779696..3c65d8d4c9 100644 Binary files a/Gems/Atom/Feature/Common/Assets/Shaders/DiffuseGlobalIllumination/diffuseprobegridborderupdaterow_dx12_0.azshadervariant and b/Gems/Atom/Feature/Common/Assets/Shaders/DiffuseGlobalIllumination/diffuseprobegridborderupdaterow_dx12_0.azshadervariant differ diff --git a/Gems/Atom/Feature/Common/Assets/Shaders/DiffuseGlobalIllumination/diffuseprobegridborderupdaterow_null_0.azshadervariant b/Gems/Atom/Feature/Common/Assets/Shaders/DiffuseGlobalIllumination/diffuseprobegridborderupdaterow_null_0.azshadervariant index 6d7a604701..d8aadf3d84 100644 Binary files a/Gems/Atom/Feature/Common/Assets/Shaders/DiffuseGlobalIllumination/diffuseprobegridborderupdaterow_null_0.azshadervariant and b/Gems/Atom/Feature/Common/Assets/Shaders/DiffuseGlobalIllumination/diffuseprobegridborderupdaterow_null_0.azshadervariant differ diff --git a/Gems/Atom/Feature/Common/Assets/Shaders/DiffuseGlobalIllumination/diffuseprobegridborderupdaterow_vulkan_0.azshadervariant b/Gems/Atom/Feature/Common/Assets/Shaders/DiffuseGlobalIllumination/diffuseprobegridborderupdaterow_vulkan_0.azshadervariant index dee941cfae..3c530ee1d2 100644 Binary files a/Gems/Atom/Feature/Common/Assets/Shaders/DiffuseGlobalIllumination/diffuseprobegridborderupdaterow_vulkan_0.azshadervariant and b/Gems/Atom/Feature/Common/Assets/Shaders/DiffuseGlobalIllumination/diffuseprobegridborderupdaterow_vulkan_0.azshadervariant differ diff --git a/Gems/Atom/Feature/Common/Assets/Shaders/DiffuseGlobalIllumination/diffuseprobegridclassification.azshader b/Gems/Atom/Feature/Common/Assets/Shaders/DiffuseGlobalIllumination/diffuseprobegridclassification.azshader index e2e0fa90f5..cd78a95260 100644 Binary files a/Gems/Atom/Feature/Common/Assets/Shaders/DiffuseGlobalIllumination/diffuseprobegridclassification.azshader and b/Gems/Atom/Feature/Common/Assets/Shaders/DiffuseGlobalIllumination/diffuseprobegridclassification.azshader differ diff --git a/Gems/Atom/Feature/Common/Assets/Shaders/DiffuseGlobalIllumination/diffuseprobegridclassification_dx12_0.azshadervariant b/Gems/Atom/Feature/Common/Assets/Shaders/DiffuseGlobalIllumination/diffuseprobegridclassification_dx12_0.azshadervariant index 7a92fc2de5..7ff0c32b59 100644 Binary files a/Gems/Atom/Feature/Common/Assets/Shaders/DiffuseGlobalIllumination/diffuseprobegridclassification_dx12_0.azshadervariant and b/Gems/Atom/Feature/Common/Assets/Shaders/DiffuseGlobalIllumination/diffuseprobegridclassification_dx12_0.azshadervariant differ diff --git a/Gems/Atom/Feature/Common/Assets/Shaders/DiffuseGlobalIllumination/diffuseprobegridclassification_null_0.azshadervariant b/Gems/Atom/Feature/Common/Assets/Shaders/DiffuseGlobalIllumination/diffuseprobegridclassification_null_0.azshadervariant index 43408b26f3..109a56fce3 100644 Binary files a/Gems/Atom/Feature/Common/Assets/Shaders/DiffuseGlobalIllumination/diffuseprobegridclassification_null_0.azshadervariant and b/Gems/Atom/Feature/Common/Assets/Shaders/DiffuseGlobalIllumination/diffuseprobegridclassification_null_0.azshadervariant differ diff --git a/Gems/Atom/Feature/Common/Assets/Shaders/DiffuseGlobalIllumination/diffuseprobegridclassification_vulkan_0.azshadervariant b/Gems/Atom/Feature/Common/Assets/Shaders/DiffuseGlobalIllumination/diffuseprobegridclassification_vulkan_0.azshadervariant index 877085446d..1d8dc87c9b 100644 Binary files a/Gems/Atom/Feature/Common/Assets/Shaders/DiffuseGlobalIllumination/diffuseprobegridclassification_vulkan_0.azshadervariant and b/Gems/Atom/Feature/Common/Assets/Shaders/DiffuseGlobalIllumination/diffuseprobegridclassification_vulkan_0.azshadervariant differ diff --git a/Gems/Atom/Feature/Common/Assets/Shaders/DiffuseGlobalIllumination/diffuseprobegridraytracing.azshader b/Gems/Atom/Feature/Common/Assets/Shaders/DiffuseGlobalIllumination/diffuseprobegridraytracing.azshader index 2c403c77f8..abe901cb5b 100644 Binary files a/Gems/Atom/Feature/Common/Assets/Shaders/DiffuseGlobalIllumination/diffuseprobegridraytracing.azshader and b/Gems/Atom/Feature/Common/Assets/Shaders/DiffuseGlobalIllumination/diffuseprobegridraytracing.azshader differ diff --git a/Gems/Atom/Feature/Common/Assets/Shaders/DiffuseGlobalIllumination/diffuseprobegridraytracing_dx12_0.azshadervariant b/Gems/Atom/Feature/Common/Assets/Shaders/DiffuseGlobalIllumination/diffuseprobegridraytracing_dx12_0.azshadervariant index 4bcc47ee43..8b926d86c8 100644 Binary files a/Gems/Atom/Feature/Common/Assets/Shaders/DiffuseGlobalIllumination/diffuseprobegridraytracing_dx12_0.azshadervariant and b/Gems/Atom/Feature/Common/Assets/Shaders/DiffuseGlobalIllumination/diffuseprobegridraytracing_dx12_0.azshadervariant differ diff --git a/Gems/Atom/Feature/Common/Assets/Shaders/DiffuseGlobalIllumination/diffuseprobegridraytracing_null_0.azshadervariant b/Gems/Atom/Feature/Common/Assets/Shaders/DiffuseGlobalIllumination/diffuseprobegridraytracing_null_0.azshadervariant index f173416210..f34a8dbad5 100644 Binary files a/Gems/Atom/Feature/Common/Assets/Shaders/DiffuseGlobalIllumination/diffuseprobegridraytracing_null_0.azshadervariant and b/Gems/Atom/Feature/Common/Assets/Shaders/DiffuseGlobalIllumination/diffuseprobegridraytracing_null_0.azshadervariant differ diff --git a/Gems/Atom/Feature/Common/Assets/Shaders/DiffuseGlobalIllumination/diffuseprobegridraytracing_vulkan_0.azshadervariant b/Gems/Atom/Feature/Common/Assets/Shaders/DiffuseGlobalIllumination/diffuseprobegridraytracing_vulkan_0.azshadervariant index 0eb04a25b8..70828c0594 100644 Binary files a/Gems/Atom/Feature/Common/Assets/Shaders/DiffuseGlobalIllumination/diffuseprobegridraytracing_vulkan_0.azshadervariant and b/Gems/Atom/Feature/Common/Assets/Shaders/DiffuseGlobalIllumination/diffuseprobegridraytracing_vulkan_0.azshadervariant differ diff --git a/Gems/Atom/Feature/Common/Assets/Shaders/DiffuseGlobalIllumination/diffuseprobegridraytracingclosesthit.azshader b/Gems/Atom/Feature/Common/Assets/Shaders/DiffuseGlobalIllumination/diffuseprobegridraytracingclosesthit.azshader index 2847d0035a..2a3a1b0b78 100644 Binary files a/Gems/Atom/Feature/Common/Assets/Shaders/DiffuseGlobalIllumination/diffuseprobegridraytracingclosesthit.azshader and b/Gems/Atom/Feature/Common/Assets/Shaders/DiffuseGlobalIllumination/diffuseprobegridraytracingclosesthit.azshader differ diff --git a/Gems/Atom/Feature/Common/Assets/Shaders/DiffuseGlobalIllumination/diffuseprobegridraytracingclosesthit_dx12_0.azshadervariant b/Gems/Atom/Feature/Common/Assets/Shaders/DiffuseGlobalIllumination/diffuseprobegridraytracingclosesthit_dx12_0.azshadervariant index 93cfb47819..5e8c9a32c1 100644 Binary files a/Gems/Atom/Feature/Common/Assets/Shaders/DiffuseGlobalIllumination/diffuseprobegridraytracingclosesthit_dx12_0.azshadervariant and b/Gems/Atom/Feature/Common/Assets/Shaders/DiffuseGlobalIllumination/diffuseprobegridraytracingclosesthit_dx12_0.azshadervariant differ diff --git a/Gems/Atom/Feature/Common/Assets/Shaders/DiffuseGlobalIllumination/diffuseprobegridraytracingclosesthit_null_0.azshadervariant b/Gems/Atom/Feature/Common/Assets/Shaders/DiffuseGlobalIllumination/diffuseprobegridraytracingclosesthit_null_0.azshadervariant index 4a16e24211..32d6580418 100644 Binary files a/Gems/Atom/Feature/Common/Assets/Shaders/DiffuseGlobalIllumination/diffuseprobegridraytracingclosesthit_null_0.azshadervariant and b/Gems/Atom/Feature/Common/Assets/Shaders/DiffuseGlobalIllumination/diffuseprobegridraytracingclosesthit_null_0.azshadervariant differ diff --git a/Gems/Atom/Feature/Common/Assets/Shaders/DiffuseGlobalIllumination/diffuseprobegridraytracingclosesthit_vulkan_0.azshadervariant b/Gems/Atom/Feature/Common/Assets/Shaders/DiffuseGlobalIllumination/diffuseprobegridraytracingclosesthit_vulkan_0.azshadervariant index df52c9c8d2..87de50f620 100644 Binary files a/Gems/Atom/Feature/Common/Assets/Shaders/DiffuseGlobalIllumination/diffuseprobegridraytracingclosesthit_vulkan_0.azshadervariant and b/Gems/Atom/Feature/Common/Assets/Shaders/DiffuseGlobalIllumination/diffuseprobegridraytracingclosesthit_vulkan_0.azshadervariant differ diff --git a/Gems/Atom/Feature/Common/Assets/Shaders/DiffuseGlobalIllumination/diffuseprobegridraytracingmiss.azshader b/Gems/Atom/Feature/Common/Assets/Shaders/DiffuseGlobalIllumination/diffuseprobegridraytracingmiss.azshader index d95fd5b3b2..85c5e34a7d 100644 Binary files a/Gems/Atom/Feature/Common/Assets/Shaders/DiffuseGlobalIllumination/diffuseprobegridraytracingmiss.azshader and b/Gems/Atom/Feature/Common/Assets/Shaders/DiffuseGlobalIllumination/diffuseprobegridraytracingmiss.azshader differ diff --git a/Gems/Atom/Feature/Common/Assets/Shaders/DiffuseGlobalIllumination/diffuseprobegridraytracingmiss_dx12_0.azshadervariant b/Gems/Atom/Feature/Common/Assets/Shaders/DiffuseGlobalIllumination/diffuseprobegridraytracingmiss_dx12_0.azshadervariant index c853de4d14..e22d979b85 100644 Binary files a/Gems/Atom/Feature/Common/Assets/Shaders/DiffuseGlobalIllumination/diffuseprobegridraytracingmiss_dx12_0.azshadervariant and b/Gems/Atom/Feature/Common/Assets/Shaders/DiffuseGlobalIllumination/diffuseprobegridraytracingmiss_dx12_0.azshadervariant differ diff --git a/Gems/Atom/Feature/Common/Assets/Shaders/DiffuseGlobalIllumination/diffuseprobegridraytracingmiss_null_0.azshadervariant b/Gems/Atom/Feature/Common/Assets/Shaders/DiffuseGlobalIllumination/diffuseprobegridraytracingmiss_null_0.azshadervariant index 40e18c215c..7cc7a74789 100644 Binary files a/Gems/Atom/Feature/Common/Assets/Shaders/DiffuseGlobalIllumination/diffuseprobegridraytracingmiss_null_0.azshadervariant and b/Gems/Atom/Feature/Common/Assets/Shaders/DiffuseGlobalIllumination/diffuseprobegridraytracingmiss_null_0.azshadervariant differ diff --git a/Gems/Atom/Feature/Common/Assets/Shaders/DiffuseGlobalIllumination/diffuseprobegridraytracingmiss_vulkan_0.azshadervariant b/Gems/Atom/Feature/Common/Assets/Shaders/DiffuseGlobalIllumination/diffuseprobegridraytracingmiss_vulkan_0.azshadervariant index 34761ccf98..8fcf9fbae0 100644 Binary files a/Gems/Atom/Feature/Common/Assets/Shaders/DiffuseGlobalIllumination/diffuseprobegridraytracingmiss_vulkan_0.azshadervariant and b/Gems/Atom/Feature/Common/Assets/Shaders/DiffuseGlobalIllumination/diffuseprobegridraytracingmiss_vulkan_0.azshadervariant differ diff --git a/Gems/Atom/Feature/Common/Assets/Shaders/DiffuseGlobalIllumination/diffuseprobegridrelocation.azshader b/Gems/Atom/Feature/Common/Assets/Shaders/DiffuseGlobalIllumination/diffuseprobegridrelocation.azshader index c19020dc84..501a64c8d5 100644 Binary files a/Gems/Atom/Feature/Common/Assets/Shaders/DiffuseGlobalIllumination/diffuseprobegridrelocation.azshader and b/Gems/Atom/Feature/Common/Assets/Shaders/DiffuseGlobalIllumination/diffuseprobegridrelocation.azshader differ diff --git a/Gems/Atom/Feature/Common/Assets/Shaders/DiffuseGlobalIllumination/diffuseprobegridrelocation_dx12_0.azshadervariant b/Gems/Atom/Feature/Common/Assets/Shaders/DiffuseGlobalIllumination/diffuseprobegridrelocation_dx12_0.azshadervariant index a7d44b5541..c1f11491d4 100644 Binary files a/Gems/Atom/Feature/Common/Assets/Shaders/DiffuseGlobalIllumination/diffuseprobegridrelocation_dx12_0.azshadervariant and b/Gems/Atom/Feature/Common/Assets/Shaders/DiffuseGlobalIllumination/diffuseprobegridrelocation_dx12_0.azshadervariant differ diff --git a/Gems/Atom/Feature/Common/Assets/Shaders/DiffuseGlobalIllumination/diffuseprobegridrelocation_null_0.azshadervariant b/Gems/Atom/Feature/Common/Assets/Shaders/DiffuseGlobalIllumination/diffuseprobegridrelocation_null_0.azshadervariant index 82e0065216..01a6693151 100644 Binary files a/Gems/Atom/Feature/Common/Assets/Shaders/DiffuseGlobalIllumination/diffuseprobegridrelocation_null_0.azshadervariant and b/Gems/Atom/Feature/Common/Assets/Shaders/DiffuseGlobalIllumination/diffuseprobegridrelocation_null_0.azshadervariant differ diff --git a/Gems/Atom/Feature/Common/Assets/Shaders/DiffuseGlobalIllumination/diffuseprobegridrelocation_vulkan_0.azshadervariant b/Gems/Atom/Feature/Common/Assets/Shaders/DiffuseGlobalIllumination/diffuseprobegridrelocation_vulkan_0.azshadervariant index 20b81aee6c..1e56c4df52 100644 Binary files a/Gems/Atom/Feature/Common/Assets/Shaders/DiffuseGlobalIllumination/diffuseprobegridrelocation_vulkan_0.azshadervariant and b/Gems/Atom/Feature/Common/Assets/Shaders/DiffuseGlobalIllumination/diffuseprobegridrelocation_vulkan_0.azshadervariant differ diff --git a/Gems/Atom/Feature/Common/Assets/Shaders/DiffuseGlobalIllumination/diffuseprobegridrender.azshader b/Gems/Atom/Feature/Common/Assets/Shaders/DiffuseGlobalIllumination/diffuseprobegridrender.azshader index aec2786540..1f04570625 100644 Binary files a/Gems/Atom/Feature/Common/Assets/Shaders/DiffuseGlobalIllumination/diffuseprobegridrender.azshader and b/Gems/Atom/Feature/Common/Assets/Shaders/DiffuseGlobalIllumination/diffuseprobegridrender.azshader differ diff --git a/Gems/Atom/Feature/Common/Assets/Shaders/DiffuseGlobalIllumination/diffuseprobegridrender_dx12_0.azshadervariant b/Gems/Atom/Feature/Common/Assets/Shaders/DiffuseGlobalIllumination/diffuseprobegridrender_dx12_0.azshadervariant index de851f187e..a359556df6 100644 Binary files a/Gems/Atom/Feature/Common/Assets/Shaders/DiffuseGlobalIllumination/diffuseprobegridrender_dx12_0.azshadervariant and b/Gems/Atom/Feature/Common/Assets/Shaders/DiffuseGlobalIllumination/diffuseprobegridrender_dx12_0.azshadervariant differ diff --git a/Gems/Atom/Feature/Common/Assets/Shaders/DiffuseGlobalIllumination/diffuseprobegridrender_null_0.azshadervariant b/Gems/Atom/Feature/Common/Assets/Shaders/DiffuseGlobalIllumination/diffuseprobegridrender_null_0.azshadervariant index 5d8207dfdb..7a90c7f352 100644 Binary files a/Gems/Atom/Feature/Common/Assets/Shaders/DiffuseGlobalIllumination/diffuseprobegridrender_null_0.azshadervariant and b/Gems/Atom/Feature/Common/Assets/Shaders/DiffuseGlobalIllumination/diffuseprobegridrender_null_0.azshadervariant differ diff --git a/Gems/Atom/Feature/Common/Assets/Shaders/DiffuseGlobalIllumination/diffuseprobegridrender_vulkan_0.azshadervariant b/Gems/Atom/Feature/Common/Assets/Shaders/DiffuseGlobalIllumination/diffuseprobegridrender_vulkan_0.azshadervariant index c819e57c4c..4cbb76954d 100644 Binary files a/Gems/Atom/Feature/Common/Assets/Shaders/DiffuseGlobalIllumination/diffuseprobegridrender_vulkan_0.azshadervariant and b/Gems/Atom/Feature/Common/Assets/Shaders/DiffuseGlobalIllumination/diffuseprobegridrender_vulkan_0.azshadervariant differ diff --git a/Gems/Atom/Feature/Common/Assets/Shaders/LightCulling/LightCulling.azsl b/Gems/Atom/Feature/Common/Assets/Shaders/LightCulling/LightCulling.azsl index 707ede9868..e806bc7cb7 100644 --- a/Gems/Atom/Feature/Common/Assets/Shaders/LightCulling/LightCulling.azsl +++ b/Gems/Atom/Feature/Common/Assets/Shaders/LightCulling/LightCulling.azsl @@ -368,16 +368,19 @@ void CullDecals(uint groupIndex, TileLightData tileLightData, float3 aabb_center float3 decalPosition = WorldToView_Point(decal.m_position); // just wrapping a bounding sphere around a cube for now to get a minor perf boost. i.e. the sphere radius is sqrt(x*x + y*y + z*z) - // ATOM-4224 - try AABB-AABB and implement depth binning for the decals - float maxHalfSize = max(max(decal.m_halfSize.x, decal.m_halfSize.y), decal.m_halfSize.z); - float boundingSphereRadiusSqr = maxHalfSize * maxHalfSize * 3; + // ATOM-4224 - try AABB-AABB + float boundingSphereRadiusSqr = dot(decal.m_halfSize, decal.m_halfSize); bool potentiallyIntersects = TestSphereVsAabb(decalPosition, boundingSphereRadiusSqr, aabb_center, aabb_extents); + if (potentiallyIntersects) { - // Implement and profile fine-grained light culling testing - // ATOM-3732 - MarkLightAsVisibleInSharedMemory(decalIndex, 0xFFFF); + uint inside = 0; + float2 minmax = ComputePointLightMinMaxZ(sqrt(boundingSphereRadiusSqr), decalPosition); + if (IsObjectInsideTile(tileLightData, minmax, inside)) + { + MarkLightAsVisibleInSharedMemory(decalIndex, inside); + } } } } diff --git a/Gems/Atom/Feature/Common/Assets/Shaders/LightCulling/LightCullingHeatmap.azsl b/Gems/Atom/Feature/Common/Assets/Shaders/LightCulling/LightCullingHeatmap.azsl index bd51fb96bb..9e30a84330 100644 --- a/Gems/Atom/Feature/Common/Assets/Shaders/LightCulling/LightCullingHeatmap.azsl +++ b/Gems/Atom/Feature/Common/Assets/Shaders/LightCulling/LightCullingHeatmap.azsl @@ -6,16 +6,17 @@ * */ -// The heatmap will change color as the light count increases up to TileCountMax, at which point and beyond it will be white. +// The heatmap will change color as the light count increases up to TileCountMax static const int TileCountMax = 75; +static const int OverflowDisplayNumber = 999; - -static const float3 BARELY_USED_COLOR = float3(0.05, 0.05, 0.20); -static const float3 LIGHTLY_USED_COLOR = float3(0.05, 0.05, 0.60); -static const float3 MODERATELY_USED_COLOR = float3(0.05, 0.60, 0.05); -static const float3 HEAVILY_USED_COLOR = float3(1.00, 1.00, 0.05); -static const float3 OVER_USED_COLOR = float3(1.00, 0.05, 0.05); +static const float3 BarelyUsedColor = float3(0.05, 0.05, 0.20); // Deep dark blue +static const float3 LightlyUsedColor = float3(0.05, 0.05, 0.60); // Deep blue +static const float3 ModeratelyUsedColor = float3(0.05, 0.60, 0.05); // Green +static const float3 HeavilyUsedColor = float3(1.00, 1.00, 0.05); // Yellow +static const float3 OverUsedColor = float3(1.00, 0.05, 0.05); // Red +static const float3 OverflowColor = float3(1.0, 1.0, 1.0); // White #include @@ -174,30 +175,33 @@ uint PrintNumbersInsideTile(uint x, uint2 origin, uint2 uv, uint scale) } -float3 ComputeTileColor(uint2 uv, uint print_me, uint maximum) +float3 ComputeTileColor(const uint2 uv, const uint print_me, const bool overflow) { int2 local_uv = int2( uv % uint2(TILE_DIM_X, TILE_DIM_Y) ); - float x = float(print_me) / float(maximum); + float x = float(print_me) / float(TileCountMax); x = sqrt(x); x = saturate(x); float3 color; - if( x <= 0.0 ) + if (overflow) + { + color = OverflowColor; + } + else if( x <= 0.0 ) { color = float3(0.0, 0.0, 0.0); } else if( x >= 1.0 ) { - color = float3(1.0, 1.0, 1.0); + color = OverUsedColor; } else { - color = lerp(BARELY_USED_COLOR, LIGHTLY_USED_COLOR, saturate((x - 0.00) * 4.0)); - color = lerp(color, MODERATELY_USED_COLOR, saturate((x - 0.25) * 4.0)); - color = lerp(color, HEAVILY_USED_COLOR, saturate((x - 0.50) * 4.0)); - color = lerp(color, OVER_USED_COLOR, saturate((x - 0.75) * 4.0)); + color = lerp(BarelyUsedColor, LightlyUsedColor, saturate((x - 0.00) * 4.0)); + color = lerp(color, ModeratelyUsedColor, saturate((x - 0.33) * 4.0)); + color = lerp(color, HeavilyUsedColor, saturate((x - 0.66) * 4.0)); } float border = (local_uv.x == TILE_DIM_X - 1 || local_uv.y == TILE_DIM_Y - 1) ? 1.0 : 0.0; @@ -226,12 +230,18 @@ ShaderResourceGroup PassSrg : SRG_PerPass PSOutput MainPS(VSOutput IN) { - uint2 tileId = ComputeTileId(IN.m_position.xy); + const uint2 tileId = ComputeTileId(IN.m_position.xy); - // We subtract NUM_LIGHT_TYPES because it includes termination markers - uint lightCount = PassSrg::m_tileLightData[tileId].w - NUM_LIGHT_TYPES; + const uint tileLightDataW = PassSrg::m_tileLightData[tileId].w; - float3 tileColor = ComputeTileColor(IN.m_position.xy, lightCount, TileCountMax); + // check to see if we are overflowing the number of lights per tile + // expect the lighting to flicker if this happens + const bool overflow = (tileLightDataW >> 31); + + // We subtract NUM_LIGHT_TYPES because it includes termination markers + const uint lightCount = overflow ? OverflowDisplayNumber : tileLightDataW - NUM_LIGHT_TYPES; + + const float3 tileColor = ComputeTileColor(IN.m_position.xy, lightCount, overflow); PSOutput OUT; OUT.m_color.rgb = tileColor; diff --git a/Gems/Atom/Feature/Common/Assets/Shaders/LightCulling/LightCullingRemap.azsl b/Gems/Atom/Feature/Common/Assets/Shaders/LightCulling/LightCullingRemap.azsl index a0daa66507..37f22b034c 100644 --- a/Gems/Atom/Feature/Common/Assets/Shaders/LightCulling/LightCullingRemap.azsl +++ b/Gems/Atom/Feature/Common/Assets/Shaders/LightCulling/LightCullingRemap.azsl @@ -138,17 +138,19 @@ uint CalculateNumLightsInWorstBin(uint groupIndex, uint3 groupID, uint baseBin, return lightsInWorstBin; } -void WriteTileLightData(uint groupIndex, uint3 groupID, uint lightsInWorstBin) +void WriteTileLightData(const uint groupIndex, const uint3 groupID, const uint lightsInWorstBin, const bool overflow) { if (groupIndex == 0) { uint4 tileLightData = PassSrg::m_tileLightData[groupID.xy]; - // Used for the heatmap tileLightData.w = lightsInWorstBin; + + // pack a "lights have overflowed bit" into this uint + tileLightData.w |= overflow ? (1 << 31) : 0; PassSrg::m_tileLightData[groupID.xy] = tileLightData; - } + } } void WriteEndOfList(uint groupIndex, uint writeIndices[NVLC_MAX_BINS]) @@ -193,6 +195,9 @@ void MainCS( GroupMemoryBarrierWithGroupSync(); uint totalLights = PassSrg::m_lightCount.Load(uint3(groupID.xy, 0)).x; + + // expect flickering if the max number of lights per tile is exceeded + const bool overflow = totalLights > (NVLC_MAX_POSSIBLE_LIGHTS_PER_BIN - 1); totalLights = min(totalLights, NVLC_MAX_POSSIBLE_LIGHTS_PER_BIN - 1); AssignLightsToSharedMemoryBins(groupIndex, groupID, totalLights); @@ -207,5 +212,5 @@ void MainCS( uint lightsInWorstBin = CalculateNumLightsInWorstBin(groupIndex, groupID, baseBin, writeIndices); WriteEndOfList(groupIndex, writeIndices); - WriteTileLightData(groupIndex, groupID, lightsInWorstBin); + WriteTileLightData(groupIndex, groupID, lightsInWorstBin, overflow); } diff --git a/Gems/Atom/Feature/Common/Assets/Shaders/LuxCore/RenderTexture.azsl b/Gems/Atom/Feature/Common/Assets/Shaders/LuxCore/RenderTexture.azsl deleted file mode 100644 index e31179c733..0000000000 --- a/Gems/Atom/Feature/Common/Assets/Shaders/LuxCore/RenderTexture.azsl +++ /dev/null @@ -1,61 +0,0 @@ -/* - * Copyright (c) Contributors to the Open 3D Engine Project. - * For complete copyright and license terms please see the LICENSE at the root of this distribution. - * - * SPDX-License-Identifier: Apache-2.0 OR MIT - * - */ - -#include -#include -#include - -ShaderResourceGroup PassSrg : SRG_PerPass -{ - Texture2D m_sourceTexture; - - Sampler TextureSampler - { - MinFilter = Point; - MagFilter = Point; - MipFilter = Point; - AddressU = Clamp; - AddressV = Clamp; - AddressW = Clamp; - }; -} - -float4 RestoreNormalMap(float4 normalMapSample) -{ - float4 restoredNormal; - - // [GFX TODO][ATOM-2404] For some reason, the image build pipeline swaps the R and G channels so we swap them back here. - restoredNormal.xy = normalMapSample.yx; - - // The image build pipeline drops the B channel so we have to reconstruct it here. - restoredNormal.z = sqrt(1 - dot(restoredNormal.xy, restoredNormal.xy)); - - restoredNormal.xyz = restoredNormal.xyz * 0.5 + 0.5; - restoredNormal.a = 1; - - return restoredNormal; -} - -option bool o_isNormal; - -PSOutput MainPS(VSOutput IN) -{ - PSOutput OUT; - - if(o_isNormal) - { - float4 sampledValue = PassSrg::m_sourceTexture.SampleLevel(PassSrg::TextureSampler, IN.m_texCoord, 0); - OUT.m_color = RestoreNormalMap(sampledValue); - } - else - { - OUT.m_color = PassSrg::m_sourceTexture.SampleLevel(PassSrg::TextureSampler, IN.m_texCoord, 0); - } - - return OUT; -} diff --git a/Gems/Atom/Feature/Common/Assets/Shaders/LuxCore/RenderTexture.shader b/Gems/Atom/Feature/Common/Assets/Shaders/LuxCore/RenderTexture.shader deleted file mode 100644 index 6035f98f5d..0000000000 --- a/Gems/Atom/Feature/Common/Assets/Shaders/LuxCore/RenderTexture.shader +++ /dev/null @@ -1,22 +0,0 @@ -{ - "Source" : "RenderTexture.azsl", - - "DepthStencilState" : { - "Depth" : { "Enable" : false } - }, - - "ProgramSettings": - { - "EntryPoints": - [ - { - "name": "MainVS", - "type": "Vertex" - }, - { - "name": "MainPS", - "type": "Fragment" - } - ] - } -} diff --git a/Gems/Atom/Feature/Common/Assets/Shaders/LuxCore/RenderTexture.shadervariantlist b/Gems/Atom/Feature/Common/Assets/Shaders/LuxCore/RenderTexture.shadervariantlist deleted file mode 100644 index 97faeac819..0000000000 --- a/Gems/Atom/Feature/Common/Assets/Shaders/LuxCore/RenderTexture.shadervariantlist +++ /dev/null @@ -1,17 +0,0 @@ -{ - "Shader" : "RenderTexture.shader", - "Variants" : [ - { - "StableId": 1, - "Options": { - "o_isNormal": "false" - } - }, - { - "StableId": 2, - "Options": { - "o_isNormal": "true" - } - } - ] -} diff --git a/Gems/Atom/Feature/Common/Assets/Shaders/PostProcessing/DepthOfFieldWriteFocusDepthFromGpu.shader b/Gems/Atom/Feature/Common/Assets/Shaders/PostProcessing/DepthOfFieldWriteFocusDepthFromGpu.shader index 92243acb87..5b927869d9 100644 --- a/Gems/Atom/Feature/Common/Assets/Shaders/PostProcessing/DepthOfFieldWriteFocusDepthFromGpu.shader +++ b/Gems/Atom/Feature/Common/Assets/Shaders/PostProcessing/DepthOfFieldWriteFocusDepthFromGpu.shader @@ -10,6 +10,7 @@ "type" : "Compute" } ] - } + }, + "DisabledRHIBackends": ["metal"] } diff --git a/Gems/Atom/Feature/Common/Assets/Shaders/PostProcessing/NewDepthOfFieldTileReduce.azsl b/Gems/Atom/Feature/Common/Assets/Shaders/PostProcessing/NewDepthOfFieldTileReduce.azsl index 6d55648f22..db91c369ef 100644 --- a/Gems/Atom/Feature/Common/Assets/Shaders/PostProcessing/NewDepthOfFieldTileReduce.azsl +++ b/Gems/Atom/Feature/Common/Assets/Shaders/PostProcessing/NewDepthOfFieldTileReduce.azsl @@ -48,6 +48,9 @@ void MainCS(uint3 group_thread_id : SV_GroupThreadID, uint3 group_id : SV_GroupI LDS_MAX_COC[group_thread_id.x] = 0; } + // Sync LDS + GroupMemoryBarrierWithGroupSync(); + // We use gather to get 2x2 values at once, so thread samples are spaced 2 pixels apart (+1 so the sample position is in between the four pixels) float2 samplePos = float2(dispatch_id.xy) * 2 + float2(1, 1); float2 sampleUV = samplePos * PassSrg::m_inputDimensions.zw; @@ -74,6 +77,9 @@ void MainCS(uint3 group_thread_id : SV_GroupThreadID, uint3 group_id : SV_GroupI InterlockedMin( LDS_MIN_COC[0], LDS_MIN_COC[group_thread_id.x] ); InterlockedMax( LDS_MAX_COC[0], LDS_MAX_COC[group_thread_id.x] ); + // Sync LDS + GroupMemoryBarrierWithGroupSync(); + // Each group write to just one pixel. If we're the last thread in the group, write out if(group_thread_id.x == 0) { diff --git a/Gems/Atom/Feature/Common/Assets/Shaders/Reflections/ReflectionProbeRenderInner.azsl b/Gems/Atom/Feature/Common/Assets/Shaders/Reflections/ReflectionProbeRenderInner.azsl index a0734caf02..e9333a4694 100644 --- a/Gems/Atom/Feature/Common/Assets/Shaders/Reflections/ReflectionProbeRenderInner.azsl +++ b/Gems/Atom/Feature/Common/Assets/Shaders/Reflections/ReflectionProbeRenderInner.azsl @@ -81,7 +81,7 @@ PSOutput MainPS(VSOutput IN, in uint sampleIndex : SV_SampleIndex) } // apply exposure setting - specular *= pow(2.0, SceneSrg::m_iblExposure); + specular *= pow(2.0, ObjectSrg::m_exposure); PSOutput OUT; OUT.m_color = float4(specular, 1.0f); diff --git a/Gems/Atom/Feature/Common/Assets/Shaders/Reflections/ReflectionProbeRenderObjectSrg.azsli b/Gems/Atom/Feature/Common/Assets/Shaders/Reflections/ReflectionProbeRenderObjectSrg.azsli index 8151ed2fd5..366dc691ed 100644 --- a/Gems/Atom/Feature/Common/Assets/Shaders/Reflections/ReflectionProbeRenderObjectSrg.azsli +++ b/Gems/Atom/Feature/Common/Assets/Shaders/Reflections/ReflectionProbeRenderObjectSrg.azsli @@ -17,6 +17,7 @@ ShaderResourceGroup ObjectSrg : SRG_PerObject float3 m_outerObbHalfLengths; float3 m_innerObbHalfLengths; bool m_useParallaxCorrection; + float m_exposure; TextureCube m_reflectionCubeMap; float4x4 GetWorldMatrix() diff --git a/Gems/Atom/Feature/Common/Assets/Shaders/Reflections/ReflectionProbeRenderOuter.azsl b/Gems/Atom/Feature/Common/Assets/Shaders/Reflections/ReflectionProbeRenderOuter.azsl index ac97172f1f..138d29398e 100644 --- a/Gems/Atom/Feature/Common/Assets/Shaders/Reflections/ReflectionProbeRenderOuter.azsl +++ b/Gems/Atom/Feature/Common/Assets/Shaders/Reflections/ReflectionProbeRenderOuter.azsl @@ -104,7 +104,7 @@ PSOutput MainPS(VSOutput IN, in uint sampleIndex : SV_SampleIndex) blendWeight /= max(1.0f, blendWeightAllProbes); // apply exposure setting - specular *= pow(2.0, SceneSrg::m_iblExposure); + specular *= pow(2.0, ObjectSrg::m_exposure); // apply blend weight for additive blending specular *= blendWeight; diff --git a/Gems/Atom/Feature/Common/Assets/Shaders/Reflections/ReflectionScreenSpaceBlurCommon.azsli b/Gems/Atom/Feature/Common/Assets/Shaders/Reflections/ReflectionScreenSpaceBlurCommon.azsli index 1e4d4af8a2..3d38df2816 100644 --- a/Gems/Atom/Feature/Common/Assets/Shaders/Reflections/ReflectionScreenSpaceBlurCommon.azsli +++ b/Gems/Atom/Feature/Common/Assets/Shaders/Reflections/ReflectionScreenSpaceBlurCommon.azsli @@ -6,11 +6,31 @@ * */ -// 7-tap Gaussian Kernel (Sigma 1.1) -static const uint GaussianKernelSize = 7; -static const int2 TexelOffsetsV[GaussianKernelSize] = {{0, -3}, {0, -2}, {0, -1}, {0, 0}, {0, 1}, {0, 2}, {0, 3}}; -static const int2 TexelOffsetsH[GaussianKernelSize] = {{-3, 0}, {-2, 0}, {-1, 0}, {0, 0}, {1, 0}, {2, 0}, {3, 0}}; -static const float TexelWeights[GaussianKernelSize] = {0.010805f, 0.074929f, 0.238727f, 0.351078f, 0.238727f, 0.074929f, 0.010805f}; +// Gaussian Kernel Radius 9, Sigma 1.8 +static const uint GaussianKernelSize = 19; +static const int2 TexelOffsetsV[GaussianKernelSize] = {{0, -9}, {0, -8}, {0, -7}, {0, -6}, {0, -5}, {0, -4}, {0, -3}, {0, -2}, {0, -1}, {0, 0}, {0, 1}, {0, 2}, {0, 3}, {0, 4}, {0, 5}, {0, 6}, {0, 7}, {0, 8}, {0, 9}}; +static const int2 TexelOffsetsH[GaussianKernelSize] = {{-9, 0}, {-8, 0}, {-7, 0}, {-6, 0}, {-5, 0}, {-4, 0}, {-3, 0}, {-2, 0}, {-1, 0}, {0, 0}, {1, 0}, {2, 0}, {3, 0}, {4, 0}, {5, 0}, {6, 0}, {7, 0}, {8, 0}, {9, 0}}; +static const float TexelWeights[GaussianKernelSize] = { + 0.0000011022801820635918f, + 0.000014295732881160677f, + 0.0001370168487067367f, + 0.0009708086495991633f, + 0.005086391900047703f, + 0.019711193240183777f, + 0.056512463228943335f, + 0.11989501853796679f, + 0.18826323520204147f, + 0.21881694875889543f, + 0.18826323520204147f, + 0.11989501853796679f, + 0.056512463228943335f, + 0.019711193240183777f, + 0.005086391900047703f, + 0.0009708086495991633f, + 0.0001370168487067367f, + 0.000014295732881160677f, + 0.0000011022801820635918f +}; float3 GaussianFilter(uint2 screenCoords, int2 texelOffsets[GaussianKernelSize], RWTexture2D inputImage) { diff --git a/Gems/Atom/Feature/Common/Assets/Shaders/Reflections/ReflectionScreenSpaceBlurVertical.azsl b/Gems/Atom/Feature/Common/Assets/Shaders/Reflections/ReflectionScreenSpaceBlurVertical.azsl index cfc35d10e4..bdc787350e 100644 --- a/Gems/Atom/Feature/Common/Assets/Shaders/Reflections/ReflectionScreenSpaceBlurVertical.azsl +++ b/Gems/Atom/Feature/Common/Assets/Shaders/Reflections/ReflectionScreenSpaceBlurVertical.azsl @@ -10,12 +10,13 @@ #include #include -#include #include +#include #include "ReflectionScreenSpaceBlurCommon.azsli" ShaderResourceGroup PassSrg : SRG_PerPass { + Texture2DMS m_depth; RWTexture2D m_input; RWTexture2D m_output; uint m_imageWidth; @@ -26,13 +27,39 @@ ShaderResourceGroup PassSrg : SRG_PerPass #include // Pixel Shader +struct PSOutput +{ + float4 m_color : SV_Target0; + float m_depth : SV_Depth; +}; + PSOutput MainPS(VSOutput IN) { // vertical blur uses coordinates from the mip0 input image - uint2 coords = IN.m_position.xy * PassSrg::m_outputScale; - float3 result = GaussianFilter(coords, TexelOffsetsV, PassSrg::m_input); + uint2 halfResCoords = IN.m_position.xy * PassSrg::m_outputScale; + float3 result = GaussianFilter(halfResCoords, TexelOffsetsV, PassSrg::m_input); + + // downsample depth, using fullscreen image coordinates + float downsampledDepth = 0; + if (PassSrg::m_input[halfResCoords].w > 0.0f) + { + uint2 fullScreenCoords = halfResCoords * 2; + + for (int y = -2; y < 2; ++y) + { + for (int x = -2; x < 2; ++x) + { + float depth = PassSrg::m_depth.Load(fullScreenCoords + int2(x, y), 0).r; + if (depth > downsampledDepth) + { + downsampledDepth = depth; + } + } + } + } PSOutput OUT; OUT.m_color = float4(result, 1.0f); + OUT.m_depth = downsampledDepth; return OUT; } diff --git a/Gems/Atom/Feature/Common/Assets/Shaders/Reflections/ReflectionScreenSpaceBlurVertical.shader b/Gems/Atom/Feature/Common/Assets/Shaders/Reflections/ReflectionScreenSpaceBlurVertical.shader index dcebb4d2ae..92995bd69f 100644 --- a/Gems/Atom/Feature/Common/Assets/Shaders/Reflections/ReflectionScreenSpaceBlurVertical.shader +++ b/Gems/Atom/Feature/Common/Assets/Shaders/Reflections/ReflectionScreenSpaceBlurVertical.shader @@ -10,7 +10,8 @@ { "Depth" : { - "Enable" : false + "Enable" : true, // required to bind the depth buffer SRV + "CompareFunc" : "Always" } }, diff --git a/Gems/Atom/Feature/Common/Assets/Shaders/Reflections/ReflectionScreenSpaceComposite.azsl b/Gems/Atom/Feature/Common/Assets/Shaders/Reflections/ReflectionScreenSpaceComposite.azsl index a0c31442fa..6cd4ce16f5 100644 --- a/Gems/Atom/Feature/Common/Assets/Shaders/Reflections/ReflectionScreenSpaceComposite.azsl +++ b/Gems/Atom/Feature/Common/Assets/Shaders/Reflections/ReflectionScreenSpaceComposite.azsl @@ -12,17 +12,19 @@ #include #include #include +#include #include #include #include ShaderResourceGroup PassSrg : SRG_PerPass { - Texture2DMS m_trace; - Texture2D m_previousFrame; + Texture2D m_reflection; + Texture2D m_downsampledDepth; Texture2DMS m_normal; // RGB10 = Normal (Encoded), A2 = Flags Texture2DMS m_specularF0; // RGB8 = SpecularF0, A8 = Roughness Texture2DMS m_depth; + Texture2D m_previousFrame; Sampler LinearSampler { @@ -40,6 +42,49 @@ ShaderResourceGroup PassSrg : SRG_PerPass #include +float3 SampleReflection(float2 reflectionUV, float mip, float depth, float3 normal, uint2 invDimensions) +{ + const float DepthTolerance = 0.001f; + + // attempt to trivially accept the downsampled reflection texel + float downsampledDepth = PassSrg::m_downsampledDepth.SampleLevel(PassSrg::LinearSampler, reflectionUV, floor(mip)).r; + if (abs(depth - downsampledDepth) <= DepthTolerance) + { + // use this reflection sample + float3 reflection = PassSrg::m_reflection.SampleLevel(PassSrg::LinearSampler, reflectionUV, mip).rgb; + return reflection; + } + + // neighborhood search surrounding the downsampled texel, searching for the closest matching depth + float closestDepthDelta = 1.0f; + int2 closestOffsetUV = float2(0.0f, 0.0f); + for (int y = -4; y <= 4; ++y) + { + for (int x = -4; x <= 4; ++x) + { + float2 offsetUV = float2(x * invDimensions.x, y * invDimensions.y); + float downsampledDepth = PassSrg::m_downsampledDepth.SampleLevel(PassSrg::LinearSampler, reflectionUV + offsetUV, floor(mip)).r; + float depthDelta = abs(depth - downsampledDepth); + + if (depthDelta <= DepthTolerance) + { + // depth is within tolerance, use this texel + float3 reflection = PassSrg::m_reflection.SampleLevel(PassSrg::LinearSampler, reflectionUV + offsetUV, mip).rgb; + return reflection; + } + + if (closestDepthDelta > depthDelta) + { + closestDepthDelta = depthDelta; + closestOffsetUV = offsetUV; + } + } + } + + float3 reflection = PassSrg::m_reflection.SampleLevel(PassSrg::LinearSampler, reflectionUV + closestOffsetUV, mip).rgb; + return reflection; +} + // Pixel Shader PSOutput MainPS(VSOutput IN, in uint sampleIndex : SV_SampleIndex) { @@ -52,11 +97,21 @@ PSOutput MainPS(VSOutput IN, in uint sampleIndex : SV_SampleIndex) // compute trace image coordinates for the half-res image float2 traceCoords = screenCoords * 0.5f; - // load trace data and check w-component to see if there was a hit - float4 traceData = PassSrg::m_trace.Load(traceCoords, sampleIndex); - if (traceData.w <= 0.0f) + // check reflection data mip0 to see if there was a hit + float4 reflectionData = PassSrg::m_reflection.Load(uint3(traceCoords, 0)); + if (reflectionData.w <= 0.0f) { - // no hit, fallback to the cubemap reflections currently in the reflection buffer + // fallback to the cubemap reflections currently in the reflection buffer + discard; + } + + // load specular and roughness + float4 specularF0 = PassSrg::m_specularF0.Load(screenCoords, sampleIndex); + float roughness = specularF0.a; + const float MaxRoughness = 0.5f; + if (roughness > MaxRoughness) + { + // fallback to the cubemap reflections currently in the reflection buffer discard; } @@ -65,8 +120,9 @@ PSOutput MainPS(VSOutput IN, in uint sampleIndex : SV_SampleIndex) float depth = PassSrg::m_depth.Load(screenCoords, sampleIndex).r; float2 ndcPos = float2(UV.x, 1.0f - UV.y) * 2.0f - 1.0f; float4 projectedPos = float4(ndcPos, depth, 1.0f); - float4 positionWS = mul(ViewSrg::m_viewProjectionInverseMatrix, projectedPos); - positionWS /= positionWS.w; + float4 positionVS = mul(ViewSrg::m_projectionMatrixInverse, projectedPos); + positionVS /= positionVS.w; + float3 positionWS = mul(ViewSrg::m_viewMatrixInverse, positionVS).xyz; // compute ray from camera to surface position float3 cameraToPositionWS = normalize(positionWS.xyz - ViewSrg::m_worldPosition); @@ -74,42 +130,16 @@ PSOutput MainPS(VSOutput IN, in uint sampleIndex : SV_SampleIndex) // retrieve surface normal float4 encodedNormal = PassSrg::m_normal.Load(screenCoords, sampleIndex); float3 normalWS = DecodeNormalSignedOctahedron(encodedNormal.rgb); - - // compute surface specular - float4 specularF0 = PassSrg::m_specularF0.Load(screenCoords, sampleIndex); - float roughness = specularF0.a; float NdotV = dot(normalWS, -cameraToPositionWS); - float3 specular = FresnelSchlickWithRoughness(NdotV, specularF0.rgb, roughness); - // reconstruct the world space position of the trace coordinates - float2 traceUV = saturate(traceData.xy / dimensions); - float traceDepth = PassSrg::m_depth.Load(traceData.xy, sampleIndex).r; - float2 traceNDC = float2(traceUV.x, 1.0f - traceUV.y) * 2.0f - 1.0f; - float4 traceProjectedPos = float4(traceNDC, traceDepth, 1.0f); - float4 tracePositionVS = mul(ViewSrg::m_projectionMatrixInverse, traceProjectedPos); - tracePositionVS /= tracePositionVS.w; - float4 tracePositionWS = mul(ViewSrg::m_viewMatrixInverse, tracePositionVS); - - // reproject to the previous frame image coordinates - float4 tracePrevNDC = mul(ViewSrg::m_viewProjectionPrevMatrix, tracePositionWS); - tracePrevNDC /= tracePrevNDC.w; - float2 tracePrevUV = float2(tracePrevNDC.x, -1.0f * tracePrevNDC.y) * 0.5f + 0.5f; - - // compute the roughness mip to use in the previous frame image + // compute the roughness mip to use in the reflection image // remap the roughness mip into a lower range to more closely match the material roughness values - const float MaxRoughness = 0.5f; float mip = saturate(roughness / MaxRoughness) * PassSrg::m_maxMipLevel; - // sample reflection value from the roughness mip - float4 reflectionColor = float4(PassSrg::m_previousFrame.SampleLevel(PassSrg::LinearSampler, tracePrevUV, mip).rgb, 1.0f); - - // fade rays close to screen edge - const float ScreenFadeDistance = 0.95f; - float2 fadeAmount = max(max(0.0f, traceUV - ScreenFadeDistance), max(0.0f, 1.0f - traceUV - ScreenFadeDistance)); - fadeAmount /= (1.0f - ScreenFadeDistance); - float alpha = 1.0f - max(fadeAmount.x, fadeAmount.y); - + // sample reflection color from the mip chain + float3 reflectionColor = SampleReflection(IN.m_texCoord, mip, depth, normalWS, 1.0f / dimensions); + PSOutput OUT; - OUT.m_color = float4(reflectionColor.rgb * specular, alpha); + OUT.m_color = float4(reflectionColor, reflectionData.w); return OUT; } diff --git a/Gems/Atom/Feature/Common/Assets/Shaders/Reflections/ReflectionScreenSpaceTrace.azsl b/Gems/Atom/Feature/Common/Assets/Shaders/Reflections/ReflectionScreenSpaceTrace.azsl index c95befce05..7c18b7f5de 100644 --- a/Gems/Atom/Feature/Common/Assets/Shaders/Reflections/ReflectionScreenSpaceTrace.azsl +++ b/Gems/Atom/Feature/Common/Assets/Shaders/Reflections/ReflectionScreenSpaceTrace.azsl @@ -10,7 +10,7 @@ #include #include -#include +#include #include #include #include @@ -20,6 +20,18 @@ ShaderResourceGroup PassSrg : SRG_PerPass Texture2DMS m_depth; Texture2DMS m_normal; // RGB10 = Normal (Encoded), A2 = Flags Texture2DMS m_specularF0; // RGB8 = SpecularF0, A8 = Roughness + Texture2DMS m_reflection; + Texture2D m_previousFrame; + + Sampler LinearSampler + { + MinFilter = Linear; + MagFilter = Linear; + MipFilter = Linear; + AddressU = Clamp; + AddressV = Clamp; + AddressW = Clamp; + }; } #include @@ -49,6 +61,12 @@ VSOutput MainVS(VSInput input) } // Pixel Shader +struct PSOutput +{ + float4 m_color : SV_Target0; + float m_depth : SV_Depth; +}; + PSOutput MainPS(VSOutput IN) { // compute screen coords based on a half-res render target @@ -83,16 +101,83 @@ PSOutput MainPS(VSOutput IN) // reflect view ray around surface normal float3 reflectDirVS = normalize(reflect(cameraToPositionVS, normalVS)); + // check to see if the reflected direction is approaching the camera + float rdotv = dot(reflectDirVS, -cameraToPositionVS); + bool fallbackEdge = false; + if (rdotv >= -0.05f) + { + if (rdotv >= 0.0f) + { + // ray points back to camera, fallback to cubemaps + discard; + } + + // ray is approaching the camera direction, but not there yet - trace the reflection and set this + // as a non-reflected pixel, which will prevent artifacts at the boundary + fallbackEdge = true; + } + // trace screenspace rays against the depth buffer to find the screenspace intersection coordinates float4 result = float4(0.0f, 0.0f, 0.0f, 0.0f); float2 hitCoords = float2(0.0f, 0.0f); if (TraceRayScreenSpace(positionVS, reflectDirVS, dimensions, hitCoords)) { - float rdotv = dot(reflectDirVS, cameraToPositionVS); - result = float4(hitCoords, 0.0f, rdotv); + // reconstruct the world space position of the trace coordinates + float2 traceUV = saturate(hitCoords / dimensions); + float traceDepth = PassSrg::m_depth.Load(hitCoords, 0).r; + float2 traceNDC = float2(traceUV.x, 1.0f - traceUV.y) * 2.0f - 1.0f; + float4 traceProjectedPos = float4(traceNDC, traceDepth, 1.0f); + float4 tracePositionVS = mul(ViewSrg::m_projectionMatrixInverse, traceProjectedPos); + tracePositionVS /= tracePositionVS.w; + float4 tracePositionWS = mul(ViewSrg::m_viewMatrixInverse, tracePositionVS); + + // reproject to the previous frame image coordinates + float4 tracePrevNDC = mul(ViewSrg::m_viewProjectionPrevMatrix, tracePositionWS); + tracePrevNDC /= tracePrevNDC.w; + float2 tracePrevUV = float2(tracePrevNDC.x, -1.0f * tracePrevNDC.y) * 0.5f + 0.5f; + + // sample the previous frame image + result.rgb = PassSrg::m_previousFrame.SampleLevel(PassSrg::LinearSampler, tracePrevUV, 0).rgb; + + // apply surface specular + float3 specularF0 = PassSrg::m_specularF0.Load(screenCoords, 0).rgb; + result.rgb *= specularF0; + + // fade rays close to screen edge + const float ScreenFadeDistance = 0.95f; + float2 fadeAmount = max(max(0.0f, traceUV - ScreenFadeDistance), max(0.0f, 1.0f - traceUV - ScreenFadeDistance)); + fadeAmount /= (1.0f - ScreenFadeDistance); + result.a = fallbackEdge ? 0.0f : 1.0f - max(fadeAmount.x, fadeAmount.y); + } + else + { + // ray miss, add in the IBL/probe reflections from the specular pass + float4 positionWS = mul(ViewSrg::m_viewMatrixInverse, positionVS); + float3 cameraToPositionWS = normalize(positionWS - ViewSrg::m_worldPosition); + float3 reflectDirWS = normalize(reflect(cameraToPositionWS, normalWS)); + + result.rgb += PassSrg::m_reflection.Load(screenCoords, 0).rgb; + result.a = fallbackEdge ? 0.0f : 1.0f; + } + + // downsample depth + float downsampledDepth = 0.0f; + for (int y = -2; y < 2; ++y) + { + for (int x = -2; x < 2; ++x) + { + float depth = PassSrg::m_depth.Load(screenCoords + int2(x, y), 0).r; + + // take the closest depth sample (larger depth value due to reverse depth) + if (depth > downsampledDepth) + { + downsampledDepth = depth; + } + } } PSOutput OUT; OUT.m_color = result; + OUT.m_depth = downsampledDepth; return OUT; } diff --git a/Gems/Atom/Feature/Common/Assets/Shaders/Reflections/ReflectionScreenSpaceTrace.shader b/Gems/Atom/Feature/Common/Assets/Shaders/Reflections/ReflectionScreenSpaceTrace.shader index 563e0e3276..3ceabd404a 100644 --- a/Gems/Atom/Feature/Common/Assets/Shaders/Reflections/ReflectionScreenSpaceTrace.shader +++ b/Gems/Atom/Feature/Common/Assets/Shaders/Reflections/ReflectionScreenSpaceTrace.shader @@ -10,7 +10,8 @@ { "Depth" : { - "Enable" : false + "Enable" : true, // required to bind the depth buffer SRV + "CompareFunc" : "Always" } }, diff --git a/Gems/Atom/Feature/Common/Assets/atom_feature_common_asset_files.cmake b/Gems/Atom/Feature/Common/Assets/atom_feature_common_asset_files.cmake index 94b711e86c..1844d26e10 100644 --- a/Gems/Atom/Feature/Common/Assets/atom_feature_common_asset_files.cmake +++ b/Gems/Atom/Feature/Common/Assets/atom_feature_common_asset_files.cmake @@ -53,6 +53,7 @@ set(FILES Materials/Types/StandardPBR_LowEndForward.azsl Materials/Types/StandardPBR_LowEndForward.shader Materials/Types/StandardPBR_LowEndForward_EDS.shader + Materials/Types/StandardPBR_Metallic.lua Materials/Types/StandardPBR_ParallaxState.lua Materials/Types/StandardPBR_Roughness.lua Materials/Types/StandardPBR_ShaderEnable.lua @@ -129,6 +130,7 @@ set(FILES Passes/DownsampleMipChain.pass Passes/EnvironmentCubeMapDepthMSAA.pass Passes/EnvironmentCubeMapForwardMSAA.pass + Passes/EnvironmentCubeMapForwardSubsurfaceMSAA.pass Passes/EnvironmentCubeMapPipeline.pass Passes/EnvironmentCubeMapSkyBox.pass Passes/EsmShadowmaps.pass @@ -198,6 +200,7 @@ set(FILES Passes/Skinning.pass Passes/SkyBox.pass Passes/SkyBox_TwoOutputs.pass + Passes/SlowClear.pass Passes/SMAA1xApplyLinearHDRColor.pass Passes/SMAA1xApplyPerceptualColor.pass Passes/SMAABlendingWeightCalculation.pass @@ -205,7 +208,6 @@ set(FILES Passes/SMAAEdgeDetection.pass Passes/SMAANeighborhoodBlending.pass Passes/SsaoCompute.pass - Passes/SsaoHalfRes.pass Passes/SsaoParent.pass Passes/SubsurfaceScattering.pass Passes/Taa.pass @@ -304,6 +306,7 @@ set(FILES ShaderLib/Atom/Features/ScreenSpace/ScreenSpaceUtil.azsli ShaderLib/Atom/Features/Shadow/BicubicPcfFilters.azsli ShaderLib/Atom/Features/Shadow/DirectionalLightShadow.azsli + ShaderLib/Atom/Features/Shadow/ESM.azsli ShaderLib/Atom/Features/Shadow/NormalOffsetShadows.azsli ShaderLib/Atom/Features/Shadow/ProjectedShadow.azsli ShaderLib/Atom/Features/Shadow/ReceiverPlaneDepthBias.azsli @@ -363,8 +366,6 @@ set(FILES Shaders/LightCulling/LightCullingRemap.shader Shaders/LightCulling/LightCullingTilePrepare.azsl Shaders/LightCulling/LightCullingTilePrepare.shader - Shaders/LuxCore/RenderTexture.azsl - Shaders/LuxCore/RenderTexture.shader Shaders/MorphTargets/MorphTargetCS.azsl Shaders/MorphTargets/MorphTargetCS.shader Shaders/MorphTargets/MorphTargetSRG.azsli diff --git a/Gems/Atom/Feature/Common/Assets/seedList.seed b/Gems/Atom/Feature/Common/Assets/seedList.seed new file mode 100644 index 0000000000..9881686940 --- /dev/null +++ b/Gems/Atom/Feature/Common/Assets/seedList.seed @@ -0,0 +1,317 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/Gems/Atom/Feature/Common/Code/CMakeLists.txt b/Gems/Atom/Feature/Common/Code/CMakeLists.txt index b558be3714..db9ac8560f 100644 --- a/Gems/Atom/Feature/Common/Code/CMakeLists.txt +++ b/Gems/Atom/Feature/Common/Code/CMakeLists.txt @@ -40,7 +40,6 @@ ly_add_target( Gem::Atom_Feature_Common.Public Gem::ImGui.imguilib 3rdParty::TIFF - #3rdParty::lux_core # AZ_TRAIT_LUXCORE_SUPPORTED is disabled in every platform, Issue #3915 will remove RUNTIME_DEPENDENCIES Gem::ImGui.imguilib ) @@ -91,11 +90,16 @@ ly_add_target( AZ::AzFramework Gem::Atom_Feature_Common.Static Gem::Atom_Feature_Common.Public - #3rdParty::lux_core # AZ_TRAIT_LUXCORE_SUPPORTED is disabled in every platform, Issue #3915 will remove ) if(PAL_TRAIT_BUILD_HOST_TOOLS) + set(runtime_dependencies_tools ${pal_source_dir}/runtime_dependencies_tools.cmake) + foreach(pal_tools_platform ${LY_PAL_TOOLS_ENABLED}) + ly_get_list_relative_pal_filename(pal_runtime_dependencies_source_dir ${CMAKE_CURRENT_LIST_DIR}/Source/Platform/${pal_tools_platform}) + list(APPEND runtime_dependencies_tools ${pal_runtime_dependencies_source_dir}/runtime_dependencies_tools.cmake) + endforeach() + ly_add_target( NAME Atom_Feature_Common.Editor GEM_MODULE @@ -103,7 +107,7 @@ if(PAL_TRAIT_BUILD_HOST_TOOLS) FILES_CMAKE atom_feature_common_editor_files.cmake PLATFORM_INCLUDE_FILES - ${pal_source_dir}/runtime_dependencies_tools.cmake + ${runtime_dependencies_tools} INCLUDE_DIRECTORIES PRIVATE . @@ -136,7 +140,7 @@ if(PAL_TRAIT_BUILD_HOST_TOOLS) FILES_CMAKE atom_feature_common_builders_files.cmake PLATFORM_INCLUDE_FILES - ${pal_source_dir}/runtime_dependencies_tools.cmake + ${runtime_dependencies_tools} INCLUDE_DIRECTORIES PRIVATE Source/Builders diff --git a/Gems/Atom/Feature/Common/Code/Include/Atom/Feature/CoreLights/DirectionalLightFeatureProcessorInterface.h b/Gems/Atom/Feature/Common/Code/Include/Atom/Feature/CoreLights/DirectionalLightFeatureProcessorInterface.h index fa987a7156..6119585d9d 100644 --- a/Gems/Atom/Feature/Common/Code/Include/Atom/Feature/CoreLights/DirectionalLightFeatureProcessorInterface.h +++ b/Gems/Atom/Feature/Common/Code/Include/Atom/Feature/CoreLights/DirectionalLightFeatureProcessorInterface.h @@ -163,6 +163,9 @@ namespace AZ //! Reduces acne by biasing the shadowmap lookup along the geometric normal. virtual void SetNormalShadowBias(LightHandle handle, float normalShadowBias) = 0; + + //! Sets whether or not blending between shadow map cascades is enabled. + virtual void SetCascadeBlendingEnabled(LightHandle handle, bool enable) = 0; }; } // namespace Render } // namespace AZ diff --git a/Gems/Atom/Feature/Common/Code/Include/Atom/Feature/CoreLights/DiskLightFeatureProcessorInterface.h b/Gems/Atom/Feature/Common/Code/Include/Atom/Feature/CoreLights/DiskLightFeatureProcessorInterface.h index 5aa2dfb800..98220fae15 100644 --- a/Gems/Atom/Feature/Common/Code/Include/Atom/Feature/CoreLights/DiskLightFeatureProcessorInterface.h +++ b/Gems/Atom/Feature/Common/Code/Include/Atom/Feature/CoreLights/DiskLightFeatureProcessorInterface.h @@ -86,6 +86,8 @@ namespace AZ virtual void SetShadowsEnabled(LightHandle handle, bool enabled) = 0; //! Sets the shadow bias virtual void SetShadowBias(LightHandle handle, float bias) = 0; + //! Sets the normal shadow bias + virtual void SetNormalShadowBias(LightHandle handle, float bias) = 0; //! Sets the shadowmap size (width and height) of the light. virtual void SetShadowmapMaxResolution(LightHandle handle, ShadowmapSize shadowmapSize) = 0; //! Specifies filter method of shadows. diff --git a/Gems/Atom/Feature/Common/Code/Include/Atom/Feature/CoreLights/PointLightFeatureProcessorInterface.h b/Gems/Atom/Feature/Common/Code/Include/Atom/Feature/CoreLights/PointLightFeatureProcessorInterface.h index 1a5a776cdf..52b1402b24 100644 --- a/Gems/Atom/Feature/Common/Code/Include/Atom/Feature/CoreLights/PointLightFeatureProcessorInterface.h +++ b/Gems/Atom/Feature/Common/Code/Include/Atom/Feature/CoreLights/PointLightFeatureProcessorInterface.h @@ -74,6 +74,8 @@ namespace AZ virtual void SetFilteringSampleCount(LightHandle handle, uint16_t count) = 0; //! Sets the Esm exponent to use. Higher values produce a steeper falloff in the border areas between light and shadow. virtual void SetEsmExponent(LightHandle handle, float exponent) = 0; + //! Sets the normal shadow bias. Reduces acne by biasing the shadowmap lookup along the geometric normal. + virtual void SetNormalShadowBias(LightHandle handle, float bias) = 0; //! Sets all of the the point data for the provided LightHandle. virtual void SetPointData(LightHandle handle, const PointLightData& data) = 0; }; diff --git a/Gems/Atom/Feature/Common/Code/Include/Atom/Feature/DiffuseGlobalIllumination/DiffuseProbeGridFeatureProcessorInterface.h b/Gems/Atom/Feature/Common/Code/Include/Atom/Feature/DiffuseGlobalIllumination/DiffuseProbeGridFeatureProcessorInterface.h index 50d4479c5a..28ad1f0c86 100644 --- a/Gems/Atom/Feature/Common/Code/Include/Atom/Feature/DiffuseGlobalIllumination/DiffuseProbeGridFeatureProcessorInterface.h +++ b/Gems/Atom/Feature/Common/Code/Include/Atom/Feature/DiffuseGlobalIllumination/DiffuseProbeGridFeatureProcessorInterface.h @@ -43,16 +43,14 @@ namespace AZ RHI::Size m_size; }; - static const char* DiffuseProbeGridIrradianceFileName = "Irradiance_lutrgba16.dds"; + static const char* DiffuseProbeGridIrradianceFileName = "Irradiance_lutrgba16f.dds"; static const char* DiffuseProbeGridDistanceFileName = "Distance_lutrg32f.dds"; - static const char* DiffuseProbeGridRelocationFileName = "Relocation_lutrgba16f.dds"; - static const char* DiffuseProbeGridClassificationFileName = "Classification_lutr32f.dds"; + static const char* DiffuseProbeGridProbeDataFileName = "ProbeData_lutrgba16f.dds"; using DiffuseProbeGridBakeTexturesCallback = AZStd::function; + DiffuseProbeGridTexture probeDataTexture)>; struct DiffuseProbeGridBakedTextures { @@ -63,14 +61,8 @@ namespace AZ Data::Instance m_distanceImage; AZStd::string m_distanceImageRelativePath; - // relocation and classification images need to be recreated as RW textures - RHI::ImageDescriptor m_relocationImageDescriptor; - AZStd::array_view m_relocationImageData; - AZStd::string m_relocationImageRelativePath; - - RHI::ImageDescriptor m_classificationImageDescriptor; - AZStd::array_view m_classificationImageData; - AZStd::string m_classificationImageRelativePath; + Data::Instance m_probeDataImage; + AZStd::string m_probeDataImageRelativePath; }; // DiffuseProbeGridFeatureProcessorInterface provides an interface to the feature processor for code outside of Atom @@ -102,8 +94,7 @@ namespace AZ DiffuseProbeGridBakeTexturesCallback callback, const AZStd::string& irradianceTextureRelativePath, const AZStd::string& distanceTextureRelativePath, - const AZStd::string& relocationTextureRelativePath, - const AZStd::string& classificationTextureRelativePath) = 0; + const AZStd::string& probeDataTextureRelativePath) = 0; // check for and retrieve a new baked texture asset (does not apply to hot-reloaded assets, only initial bakes) virtual bool CheckTextureAssetNotification( @@ -114,8 +105,7 @@ namespace AZ virtual bool AreBakedTexturesReferenced( const AZStd::string& irradianceTextureRelativePath, const AZStd::string& distanceTextureRelativePath, - const AZStd::string& relocationTextureRelativePath, - const AZStd::string& classificationTextureRelativePath) = 0; + const AZStd::string& probeDataTextureRelativePath) = 0; }; } // namespace Render diff --git a/Gems/Atom/Feature/Common/Code/Include/Atom/Feature/LuxCore/LuxCoreBus.h b/Gems/Atom/Feature/Common/Code/Include/Atom/Feature/LuxCore/LuxCoreBus.h deleted file mode 100644 index 1aa7778834..0000000000 --- a/Gems/Atom/Feature/Common/Code/Include/Atom/Feature/LuxCore/LuxCoreBus.h +++ /dev/null @@ -1,63 +0,0 @@ -/* - * Copyright (c) Contributors to the Open 3D Engine Project. - * For complete copyright and license terms please see the LICENSE at the root of this distribution. - * - * SPDX-License-Identifier: Apache-2.0 OR MIT - * - */ -#pragma once - -#include -#include -#include - -namespace AZ -{ - namespace Render - { - enum LuxCoreTextureType - { - Default = 0, - IBL, - Albedo, - Normal - }; - - class LuxCoreRequests - : public EBusTraits - { - - public: - /// Overrides the default AZ::EBusTraits handler policy to allow one listener only. - static const EBusHandlerPolicy HandlerPolicy = EBusHandlerPolicy::Single; - virtual ~LuxCoreRequests() {} - virtual void SetCameraEntityID(AZ::EntityId id) = 0; - virtual void AddMesh(Data::Asset modelAsset) = 0; - virtual void AddMaterial(Data::Instance material) = 0; - virtual void AddTexture(Data::Instance texture, LuxCoreTextureType type) = 0; - virtual void AddObject(Data::Asset modelAsset, Data::InstanceId materialInstanceId) = 0; - virtual bool CheckTextureStatus() = 0; - virtual void RenderInLuxCore() = 0; - virtual void ClearLuxCore() = 0; - virtual void ClearObject() = 0; - }; - - typedef AZ::EBus LuxCoreRequestsBus; - - class LuxCoreNotification - : public EBusTraits - { - public: - static const EBusAddressPolicy AddressPolicy = EBusAddressPolicy::ById; - /** - * Overrides the default AZ::EBusTraits ID type so that AssetId are - * used to access the addresses of the bus. - */ - typedef Data::AssetId BusIdType; - virtual ~LuxCoreNotification() {} - - virtual void OnRenderPrepare() {} - }; - typedef AZ::EBus LuxCoreNotificationBus; - } -} diff --git a/Gems/Atom/Feature/Common/Code/Include/Atom/Feature/LuxCore/LuxCoreTexturePass.h b/Gems/Atom/Feature/Common/Code/Include/Atom/Feature/LuxCore/LuxCoreTexturePass.h deleted file mode 100644 index 63258a6570..0000000000 --- a/Gems/Atom/Feature/Common/Code/Include/Atom/Feature/LuxCore/LuxCoreTexturePass.h +++ /dev/null @@ -1,51 +0,0 @@ -/* - * Copyright (c) Contributors to the Open 3D Engine Project. - * For complete copyright and license terms please see the LICENSE at the root of this distribution. - * - * SPDX-License-Identifier: Apache-2.0 OR MIT - * - */ -#pragma once - -#include - -#include -#include -#include - -#include - -namespace AZ -{ - namespace Render - { - class LuxCoreTexturePass final - : public RPI::ParentPass - { - public: - AZ_RTTI(LuxCoreTexturePass, "{A6CA80C0-63A6-4686-A627-B5D1DA04B627}", ParentPass); - AZ_CLASS_ALLOCATOR(LuxCoreTexturePass, SystemAllocator, 0); - - static RPI::Ptr Create(const RPI::PassDescriptor& descriptor); - - LuxCoreTexturePass(const RPI::PassDescriptor& descriptor); - ~LuxCoreTexturePass(); - - void SetSourceTexture(Data::Instance image, RHI::Format format); - void SetIsNormalTexture(bool isNormal); - void SetReadbackCallback(RPI::AttachmentReadback::CallbackFunction callbackFunciton); - - protected: - // Pass behavior overrides - void CreateChildPassesInternal() final; - void BuildInternal() final; - void FrameBeginInternal(FramePrepareParams params) final; - - private: - - RPI::Ptr m_renderTargetPass = nullptr; - AZStd::shared_ptr m_readback = nullptr; - bool m_attachmentReadbackComplete = false; - }; - } -} diff --git a/Gems/Atom/Feature/Common/Code/Include/Atom/Feature/LuxCore/RenderTexturePass.h b/Gems/Atom/Feature/Common/Code/Include/Atom/Feature/LuxCore/RenderTexturePass.h deleted file mode 100644 index 8389fe33a7..0000000000 --- a/Gems/Atom/Feature/Common/Code/Include/Atom/Feature/LuxCore/RenderTexturePass.h +++ /dev/null @@ -1,55 +0,0 @@ -/* - * Copyright (c) Contributors to the Open 3D Engine Project. - * For complete copyright and license terms please see the LICENSE at the root of this distribution. - * - * SPDX-License-Identifier: Apache-2.0 OR MIT - * - */ -#pragma once - -#include - -namespace AZ -{ - namespace Render - { - /* - * A simple pass to render a texture to an attachment render target - * The attachment size and format will be configure as the same as the input texture - */ - class RenderTexturePass final - : public RPI::FullscreenTrianglePass - { - - AZ_RPI_PASS(RenderTexturePass); - - public: - AZ_RTTI(RenderTexturePass, "{476A4E41-08D7-456C-B324-E0493A321FE7}", FullscreenTrianglePass); - AZ_CLASS_ALLOCATOR(RenderTexturePass, SystemAllocator, 0); - virtual ~RenderTexturePass(); - - static RPI::Ptr Create(const RPI::PassDescriptor& descriptor); - - // Set the source image - void SetPassSrgImage(AZ::Data::Instance image, RHI::Format format); - - RHI::AttachmentId GetRenderTargetId(); - - void InitShaderVariant(bool isNormal); - - protected: - RenderTexturePass(const RPI::PassDescriptor& descriptor); - - private: - - void BuildInternal() override; - void FrameBeginInternal(FramePrepareParams params) override; - - void UpdataAttachment(); - - RHI::ShaderInputImageIndex m_textureIndex; - RHI::Size m_attachmentSize; - RHI::Format m_attachmentFormat; - }; - } -} diff --git a/Gems/Atom/Feature/Common/Code/Include/Atom/Feature/Mesh/MeshFeatureProcessor.h b/Gems/Atom/Feature/Common/Code/Include/Atom/Feature/Mesh/MeshFeatureProcessor.h index 2ac184e2e0..23cd76ca20 100644 --- a/Gems/Atom/Feature/Common/Code/Include/Atom/Feature/Mesh/MeshFeatureProcessor.h +++ b/Gems/Atom/Feature/Common/Code/Include/Atom/Feature/Mesh/MeshFeatureProcessor.h @@ -30,7 +30,7 @@ namespace AZ class TransformServiceFeatureProcessor; class RayTracingFeatureProcessor; - class MeshDataInstance + class ModelDataInstance { friend class MeshFeatureProcessor; friend class MeshLoader; @@ -47,7 +47,7 @@ namespace AZ public: using ModelChangedEvent = MeshFeatureProcessorInterface::ModelChangedEvent; - MeshLoader(const Data::Asset& modelAsset, MeshDataInstance* parent); + MeshLoader(const Data::Asset& modelAsset, ModelDataInstance* parent); ~MeshLoader(); ModelChangedEvent& GetModelChangedEvent(); @@ -68,7 +68,7 @@ namespace AZ } }; MeshFeatureProcessorInterface::ModelChangedEvent m_modelChangedEvent; Data::Asset m_modelAsset; - MeshDataInstance* m_parent = nullptr; + ModelDataInstance* m_parent = nullptr; }; void DeInit(); @@ -99,7 +99,8 @@ namespace AZ //! A reference to the original model asset in case it got cloned before creating the model instance. Data::Asset m_originalModelAsset; - Data::Instance m_shaderResourceGroup; + //! List of object SRGs used by meshes in this model + AZStd::vector> m_objectSrgList; AZStd::unique_ptr m_meshLoader; RPI::Scene* m_scene = nullptr; RHI::DrawItemSortKey m_sortKey; @@ -152,7 +153,7 @@ namespace AZ Data::Instance GetModel(const MeshHandle& meshHandle) const override; Data::Asset GetModelAsset(const MeshHandle& meshHandle) const override; - Data::Instance GetObjectSrg(const MeshHandle& meshHandle) const override; + const AZStd::vector>& GetObjectSrgs(const MeshHandle& meshHandle) const override; void QueueObjectSrgForCompile(const MeshHandle& meshHandle) const override; void SetMaterialAssignmentMap(const MeshHandle& meshHandle, const Data::Instance& material) override; void SetMaterialAssignmentMap(const MeshHandle& meshHandle, const MaterialAssignmentMap& materials) override; @@ -195,7 +196,7 @@ namespace AZ void OnRenderPipelineRemoved(RPI::RenderPipeline* pipeline) override; AZStd::concurrency_checker m_meshDataChecker; - StableDynamicArray m_meshData; + StableDynamicArray m_modelData; TransformServiceFeatureProcessor* m_transformService; RayTracingFeatureProcessor* m_rayTracingFeatureProcessor = nullptr; AZ::RPI::ShaderSystemInterface::GlobalShaderOptionUpdatedEvent::Handler m_handleGlobalShaderOptionUpdate; diff --git a/Gems/Atom/Feature/Common/Code/Include/Atom/Feature/Mesh/MeshFeatureProcessorInterface.h b/Gems/Atom/Feature/Common/Code/Include/Atom/Feature/Mesh/MeshFeatureProcessorInterface.h index cffbe5c3c5..356b1936ca 100644 --- a/Gems/Atom/Feature/Common/Code/Include/Atom/Feature/Mesh/MeshFeatureProcessorInterface.h +++ b/Gems/Atom/Feature/Common/Code/Include/Atom/Feature/Mesh/MeshFeatureProcessorInterface.h @@ -20,7 +20,7 @@ namespace AZ { namespace Render { - class MeshDataInstance; + class ModelDataInstance; //! Settings to apply to a mesh handle when acquiring it for the first time struct MeshHandleDescriptor @@ -40,7 +40,7 @@ namespace AZ public: AZ_RTTI(AZ::Render::MeshFeatureProcessorInterface, "{975D7F0C-2E7E-4819-94D0-D3C4E2024721}", FeatureProcessor); - using MeshHandle = StableDynamicArrayHandle; + using MeshHandle = StableDynamicArrayHandle; using ModelChangedEvent = Event>; //! Acquires a model with an optional collection of material assignments. @@ -61,12 +61,15 @@ namespace AZ virtual Data::Instance GetModel(const MeshHandle& meshHandle) const = 0; //! Gets the underlying RPI::ModelAsset for a meshHandle. virtual Data::Asset GetModelAsset(const MeshHandle& meshHandle) const = 0; - //! Gets the ObjectSrg for a meshHandle. - //! Updating the ObjectSrg should be followed by a call to QueueObjectSrgForCompile, - //! instead of compiling the srg directly. This way, if the srg has already been queued for compile, - //! it will not be queued twice in the same frame. The ObjectSrg should not be updated during + + //! Gets the ObjectSrgs for a meshHandle. + //! Updating the ObjectSrgs should be followed by a call to QueueObjectSrgForCompile, + //! instead of compiling the srgs directly. This way, if the srgs have already been queued for compile, + //! they will not be queued twice in the same frame. The ObjectSrgs should not be updated during //! Simulate, or it will create a race between updating the data and the call to Compile - virtual Data::Instance GetObjectSrg(const MeshHandle& meshHandle) const = 0; + //! Cases where there may be multiple ObjectSrgs: if a model has multiple submeshes and those submeshes use different + //! materials with different object SRGs. + virtual const AZStd::vector>& GetObjectSrgs(const MeshHandle& meshHandle) const = 0; //! Queues the object srg for compile. virtual void QueueObjectSrgForCompile(const MeshHandle& meshHandle) const = 0; //! Sets the MaterialAssignmentMap for a meshHandle, using just a single material for the DefaultMaterialAssignmentId. diff --git a/Gems/Atom/Feature/Common/Code/Include/Atom/Feature/ReflectionProbe/ReflectionProbeFeatureProcessor.h b/Gems/Atom/Feature/Common/Code/Include/Atom/Feature/ReflectionProbe/ReflectionProbeFeatureProcessor.h index 5efd235a67..ded36f5496 100644 --- a/Gems/Atom/Feature/Common/Code/Include/Atom/Feature/ReflectionProbe/ReflectionProbeFeatureProcessor.h +++ b/Gems/Atom/Feature/Common/Code/Include/Atom/Feature/ReflectionProbe/ReflectionProbeFeatureProcessor.h @@ -39,6 +39,8 @@ namespace AZ bool IsCubeMapReferenced(const AZStd::string& relativePath) override; bool IsValidProbeHandle(const ReflectionProbeHandle& probe) const override { return (probe.get() != nullptr); } void ShowProbeVisualization(const ReflectionProbeHandle& probe, bool showVisualization) override; + void SetRenderExposure(const ReflectionProbeHandle& probe, float renderExposure) override; + void SetBakeExposure(const ReflectionProbeHandle& probe, float bakeExposure) override; // FeatureProcessor overrides void Activate() override; diff --git a/Gems/Atom/Feature/Common/Code/Include/Atom/Feature/ReflectionProbe/ReflectionProbeFeatureProcessorInterface.h b/Gems/Atom/Feature/Common/Code/Include/Atom/Feature/ReflectionProbe/ReflectionProbeFeatureProcessorInterface.h index 4eb2130b1b..80c92281ea 100644 --- a/Gems/Atom/Feature/Common/Code/Include/Atom/Feature/ReflectionProbe/ReflectionProbeFeatureProcessorInterface.h +++ b/Gems/Atom/Feature/Common/Code/Include/Atom/Feature/ReflectionProbe/ReflectionProbeFeatureProcessorInterface.h @@ -50,6 +50,8 @@ namespace AZ virtual bool IsCubeMapReferenced(const AZStd::string& relativePath) = 0; virtual bool IsValidProbeHandle(const ReflectionProbeHandle& probe) const = 0; virtual void ShowProbeVisualization(const ReflectionProbeHandle& probe, bool showVisualization) = 0; + virtual void SetRenderExposure(const ReflectionProbeHandle& probe, float renderExposure) = 0; + virtual void SetBakeExposure(const ReflectionProbeHandle& probe, float bakeExposure) = 0; }; } // namespace Render } // namespace AZ diff --git a/Gems/Atom/Feature/Common/Code/Include/Atom/Feature/Utils/IndexedDataVector.h b/Gems/Atom/Feature/Common/Code/Include/Atom/Feature/Utils/IndexedDataVector.h index 82cc1e7d50..b2d483e48c 100644 --- a/Gems/Atom/Feature/Common/Code/Include/Atom/Feature/Utils/IndexedDataVector.h +++ b/Gems/Atom/Feature/Common/Code/Include/Atom/Feature/Utils/IndexedDataVector.h @@ -27,31 +27,50 @@ namespace AZ::Render static constexpr IndexType NoFreeSlot = std::numeric_limits::max(); IndexType m_firstFreeSlot = NoFreeSlot; + //! Clears all data and resets to initial state. void Clear(); + + //! Creates a new entry, default-constructs it, and returns an index that references it. IndexType GetFreeSlotIndex(); + + //! Destroys the data referenced by index and frees that index for future use. void RemoveIndex(IndexType index); + + //! Destroys the data and related index by using a pointer to the data itself. void RemoveData(DataType* data); + //! Returns a reference to the data using the provided index. DataType& GetData(IndexType index); const DataType& GetData(IndexType index) const; + + //! Returns a count of how many items are stored in the IndexedDataVector size_t GetDataCount() const; + //! Returns a reference to the internal data vector. + //! This vector should not be altered by calling code or the IndexedDataVector will be corrupted AZStd::vector& GetDataVector(); const AZStd::vector& GetDataVector() const; + + //! Returns a reference to the internal vector. + const AZStd::vector& GetDataToIndexVector() const; - AZStd::vector& GetIndexVector(); - const AZStd::vector& GetIndexVector() const; - + //! Returns the offset into the internal data vector for a given index. IndexType GetRawIndex(IndexType index) const; + + //! Returns the logical index for data given its pointer, which could passed to + //! GetData() to retrieve the data again. IndexType GetIndexForData(const DataType* data) const; private: constexpr static size_t InitialReservedSize = 128; - // Stores data indices and an embedded free list + // Indices to data and an embedded free list in the unused entries AZStd::vector m_indices; - // Stores the indirection index + + // Map of the physical index in m_data to the logical index for that data in m_indices. AZStd::vector m_dataToIndices; + + // The actual data. AZStd::vector m_data; }; } // namespace AZ::Render diff --git a/Gems/Atom/Feature/Common/Code/Include/Atom/Feature/Utils/IndexedDataVector.inl b/Gems/Atom/Feature/Common/Code/Include/Atom/Feature/Utils/IndexedDataVector.inl index 581186dbcc..03c3564ce9 100644 --- a/Gems/Atom/Feature/Common/Code/Include/Atom/Feature/Utils/IndexedDataVector.inl +++ b/Gems/Atom/Feature/Common/Code/Include/Atom/Feature/Utils/IndexedDataVector.inl @@ -125,13 +125,7 @@ namespace AZ::Render } template - inline AZStd::vector& IndexedDataVector::GetIndexVector() - { - return m_dataToIndices; - } - - template - inline const AZStd::vector& IndexedDataVector::GetIndexVector() const + inline const AZStd::vector& IndexedDataVector::GetDataToIndexVector() const { return m_dataToIndices; } diff --git a/Gems/Atom/Feature/Common/Code/Include/Atom/Feature/Utils/ModelPreset.h b/Gems/Atom/Feature/Common/Code/Include/Atom/Feature/Utils/ModelPreset.h index 8bd494dfde..2dd4bed264 100644 --- a/Gems/Atom/Feature/Common/Code/Include/Atom/Feature/Utils/ModelPreset.h +++ b/Gems/Atom/Feature/Common/Code/Include/Atom/Feature/Utils/ModelPreset.h @@ -30,7 +30,6 @@ namespace AZ AZStd::string m_displayName; AZ::Data::Asset m_modelAsset; - AZ::Data::Asset m_previewImageAsset; }; using ModelPresetPtr = AZStd::shared_ptr; diff --git a/Gems/Atom/Feature/Common/Code/Include/Atom/Feature/Utils/MultiIndexedDataVector.h b/Gems/Atom/Feature/Common/Code/Include/Atom/Feature/Utils/MultiIndexedDataVector.h index a1a6e329b2..c0f11dd159 100644 --- a/Gems/Atom/Feature/Common/Code/Include/Atom/Feature/Utils/MultiIndexedDataVector.h +++ b/Gems/Atom/Feature/Common/Code/Include/Atom/Feature/Utils/MultiIndexedDataVector.h @@ -17,7 +17,7 @@ namespace AZ { //! MultiIndexedDataVector is similar to IndexedDataVector but adds support for multiple different data vectors each containing different types //! i.e. structure of (N) arrays - //! See IndexedDataVectorTests.cpp for examples of use + //! See MultiIndexedDataVectorTests.cpp for examples of use template class MultiIndexedDataVector { @@ -199,6 +199,28 @@ namespace AZ { return m_indices.at(index); } + + template + IndexType GetIndexForData(const DataType* data) const + { + if (data >= &AZStd::get(m_data).front() && data <= &AZStd::get(m_data).back()) + { + return m_dataToIndices.at(data - &AZStd::get(m_data).front()); + } + return NoFreeSlot; + } + + template + void ForEach(LambdaType lambda) const + { + for (auto& item : AZStd::get(m_data)) + { + if (!lambda(item)) + { + break; + } + } + } private: using Fn = void(&)(AZStd::vector& ...); diff --git a/Gems/Atom/Feature/Common/Code/Mocks/MockMeshFeatureProcessor.h b/Gems/Atom/Feature/Common/Code/Mocks/MockMeshFeatureProcessor.h index 35e399997f..2c818d3c9b 100644 --- a/Gems/Atom/Feature/Common/Code/Mocks/MockMeshFeatureProcessor.h +++ b/Gems/Atom/Feature/Common/Code/Mocks/MockMeshFeatureProcessor.h @@ -19,7 +19,7 @@ namespace UnitTest MOCK_METHOD1(CloneMesh, MeshHandle(const MeshHandle&)); MOCK_CONST_METHOD1(GetModel, AZStd::intrusive_ptr(const MeshHandle&)); MOCK_CONST_METHOD1(GetModelAsset, AZ::Data::Asset(const MeshHandle&)); - MOCK_CONST_METHOD1(GetObjectSrg, AZStd::intrusive_ptr(const MeshHandle&)); + MOCK_CONST_METHOD1(GetObjectSrgs, const AZStd::vector>&(const MeshHandle&)); MOCK_CONST_METHOD1(QueueObjectSrgForCompile, void(const MeshHandle&)); MOCK_CONST_METHOD1(GetMaterialAssignmentMap, const AZ::Render::MaterialAssignmentMap&(const MeshHandle&)); MOCK_METHOD2(ConnectModelChangeEventHandler, void(const MeshHandle&, ModelChangedEvent::Handler&)); diff --git a/Gems/Atom/Feature/Common/Code/Source/ACES/AcesDisplayMapperFeatureProcessor.cpp b/Gems/Atom/Feature/Common/Code/Source/ACES/AcesDisplayMapperFeatureProcessor.cpp index c6c41edb31..50fc8cafef 100644 --- a/Gems/Atom/Feature/Common/Code/Source/ACES/AcesDisplayMapperFeatureProcessor.cpp +++ b/Gems/Atom/Feature/Common/Code/Source/ACES/AcesDisplayMapperFeatureProcessor.cpp @@ -16,7 +16,6 @@ #include #include -#include #include namespace @@ -81,7 +80,7 @@ namespace AZ::Render void AcesDisplayMapperFeatureProcessor::Simulate(const FeatureProcessor::SimulatePacket& packet) { - AZ_TRACE_METHOD(); + AZ_PROFILE_FUNCTION(AzRender); AZ_UNUSED(packet); } diff --git a/Gems/Atom/Feature/Common/Code/Source/AuxGeom/AuxGeomBase.h b/Gems/Atom/Feature/Common/Code/Source/AuxGeom/AuxGeomBase.h index fe731f4ad6..b329a35977 100644 --- a/Gems/Atom/Feature/Common/Code/Source/AuxGeom/AuxGeomBase.h +++ b/Gems/Atom/Feature/Common/Code/Source/AuxGeom/AuxGeomBase.h @@ -155,8 +155,10 @@ namespace AZ enum AuxGeomShapeType { ShapeType_Sphere, + ShapeType_Hemisphere, ShapeType_Cone, ShapeType_Cylinder, + ShapeType_CylinderNoEnds, // Cylinder without disks on either end ShapeType_Disk, ShapeType_Quad, diff --git a/Gems/Atom/Feature/Common/Code/Source/AuxGeom/AuxGeomDrawQueue.cpp b/Gems/Atom/Feature/Common/Code/Source/AuxGeom/AuxGeomDrawQueue.cpp index 29db7d6673..fedbf849eb 100644 --- a/Gems/Atom/Feature/Common/Code/Source/AuxGeom/AuxGeomDrawQueue.cpp +++ b/Gems/Atom/Feature/Common/Code/Source/AuxGeom/AuxGeomDrawQueue.cpp @@ -11,7 +11,6 @@ #include -#include #include #include #include @@ -314,15 +313,40 @@ namespace AZ AddShape(style, shape); } - void AuxGeomDrawQueue::DrawSphere( - const AZ::Vector3& center, + Matrix3x3 CreateMatrix3x3FromDirection(const AZ::Vector3& direction) + { + Vector3 unitDirection(direction.GetNormalized()); + Vector3 unitOrthogonal(direction.GetOrthogonalVector().GetNormalized()); + Vector3 unitCross(unitOrthogonal.Cross(unitDirection)); + return Matrix3x3::CreateFromColumns(unitOrthogonal, unitDirection, unitCross); + } + + void AuxGeomDrawQueue::DrawSphere(const AZ::Vector3& center, const AZ::Vector3& direction, float radius, const AZ::Color& color, DrawStyle style, DepthTest depthTest, DepthWrite depthWrite, FaceCullMode faceCull, int32_t viewProjOverrideIndex) + { + DrawSphereCommon(center, direction, radius, color, style, depthTest, depthWrite, faceCull, viewProjOverrideIndex, false); + } + + void AuxGeomDrawQueue::DrawSphere(const AZ::Vector3& center, float radius, const AZ::Color& color, DrawStyle style, DepthTest depthTest, DepthWrite depthWrite, FaceCullMode faceCull, int32_t viewProjOverrideIndex) + { + DrawSphereCommon(center, AZ::Vector3::CreateAxisZ(), radius, color, style, depthTest, depthWrite, faceCull, viewProjOverrideIndex, false); + } + + void AuxGeomDrawQueue::DrawHemisphere(const AZ::Vector3& center, const AZ::Vector3& direction, float radius, const AZ::Color& color, DrawStyle style, DepthTest depthTest, DepthWrite depthWrite, FaceCullMode faceCull, int32_t viewProjOverrideIndex) + { + DrawSphereCommon(center, direction, radius, color, style, depthTest, depthWrite, faceCull, viewProjOverrideIndex, true); + } + + void AuxGeomDrawQueue::DrawSphereCommon( + const AZ::Vector3& center, + const AZ::Vector3& direction, float radius, const AZ::Color& color, DrawStyle style, DepthTest depthTest, DepthWrite depthWrite, FaceCullMode faceCull, - int32_t viewProjOverrideIndex) + int32_t viewProjOverrideIndex, + bool isHemisphere) { if (radius <= 0.0f) { @@ -330,12 +354,12 @@ namespace AZ } ShapeBufferEntry shape; - shape.m_shapeType = ShapeType_Sphere; + shape.m_shapeType = isHemisphere ? ShapeType_Hemisphere : ShapeType_Sphere; shape.m_depthRead = ConvertRPIDepthTestFlag(depthTest); shape.m_depthWrite = ConvertRPIDepthWriteFlag(depthWrite); shape.m_faceCullMode = ConvertRPIFaceCullFlag(faceCull); shape.m_color = color; - shape.m_rotationMatrix = Matrix3x3::CreateIdentity(); + shape.m_rotationMatrix = CreateMatrix3x3FromDirection(direction); shape.m_position = center; shape.m_scale = AZ::Vector3(radius, radius, radius); shape.m_pointSize = m_pointSize; @@ -362,13 +386,9 @@ namespace AZ shape.m_faceCullMode = ConvertRPIFaceCullFlag(faceCull); shape.m_color = color; - Vector3 unitDirection(direction.GetNormalized()); - Vector3 unitOrthogonal(direction.GetOrthogonalVector().GetNormalized()); - Vector3 unitCross(unitOrthogonal.Cross(unitDirection)); - // The disk mesh is created with the top of the disk pointing along the positive Y axis. This creates a // rotation so that the top of the disk will point along the given direction vector. - shape.m_rotationMatrix = Matrix3x3::CreateFromColumns(unitOrthogonal, unitDirection, unitCross); + shape.m_rotationMatrix = CreateMatrix3x3FromDirection(direction); shape.m_position = center; shape.m_scale = AZ::Vector3(radius, 1.0f, radius); shape.m_pointSize = m_pointSize; @@ -401,13 +421,7 @@ namespace AZ shape.m_faceCullMode = ConvertRPIFaceCullFlag(faceCull); shape.m_color = color; - Vector3 unitDirection(direction.GetNormalized()); - Vector3 unitOrthogonal(direction.GetOrthogonalVector().GetNormalized()); - Vector3 unitCross(unitOrthogonal.Cross(unitDirection)); - - // The cone mesh is created with the tip of the cone pointing along the positive Y axis. This creates a - // rotation so that the tip of the cone will point along the given direction vector. - shape.m_rotationMatrix = Matrix3x3::CreateFromColumns(unitOrthogonal, unitDirection, unitCross); + shape.m_rotationMatrix = CreateMatrix3x3FromDirection(direction); shape.m_position = center; shape.m_scale = AZ::Vector3(radius, height, radius); shape.m_pointSize = m_pointSize; @@ -416,17 +430,30 @@ namespace AZ AddShape(style, shape); } - void AuxGeomDrawQueue::DrawCylinder( - const AZ::Vector3& center, - const AZ::Vector3& direction, - float radius, - float height, - const AZ::Color& color, - DrawStyle style, - DepthTest depthTest, - DepthWrite depthWrite, - FaceCullMode faceCull, - int32_t viewProjOverrideIndex) + void AuxGeomDrawQueue::DrawCylinder(const AZ::Vector3& center, const AZ::Vector3& direction, float radius, float height, const AZ::Color& color, + DrawStyle style, DepthTest depthTest, DepthWrite depthWrite, FaceCullMode faceCull, int32_t viewProjOverrideIndex) + { + DrawCylinderCommon(center, direction, radius, height, color, style, depthTest, depthWrite, faceCull, viewProjOverrideIndex, true); + } + + void AuxGeomDrawQueue::DrawCylinderNoEnds(const AZ::Vector3& center, const AZ::Vector3& direction, float radius, float height, const AZ::Color& color, + DrawStyle style, DepthTest depthTest, DepthWrite depthWrite, FaceCullMode faceCull, int32_t viewProjOverrideIndex) + { + DrawCylinderCommon(center, direction, radius, height, color, style, depthTest, depthWrite, faceCull, viewProjOverrideIndex, false); + } + + void AuxGeomDrawQueue::DrawCylinderCommon( + const AZ::Vector3& center, + const AZ::Vector3& direction, + float radius, + float height, + const AZ::Color& color, + DrawStyle style, + DepthTest depthTest, + DepthWrite depthWrite, + FaceCullMode faceCull, + int32_t viewProjOverrideIndex, + bool drawEnds) { if (radius <= 0.0f || height <= 0.0f) { @@ -434,19 +461,15 @@ namespace AZ } ShapeBufferEntry shape; - shape.m_shapeType = ShapeType_Cylinder; - shape.m_depthRead = ConvertRPIDepthTestFlag(depthTest); + shape.m_shapeType = drawEnds ? ShapeType_Cylinder : ShapeType_CylinderNoEnds; + shape.m_depthRead = ConvertRPIDepthTestFlag(depthTest); shape.m_depthWrite = ConvertRPIDepthWriteFlag(depthWrite); shape.m_faceCullMode = ConvertRPIFaceCullFlag(faceCull); shape.m_color = color; - Vector3 unitDirection(direction.GetNormalized()); - Vector3 unitOrthogonal(direction.GetOrthogonalVector().GetNormalized()); - Vector3 unitCross(unitOrthogonal.Cross(unitDirection)); - // The cylinder mesh is created with the top end cap of the cylinder facing along the positive Y axis. This creates a // rotation so that the top face of the cylinder will face along the given direction vector. - shape.m_rotationMatrix = Matrix3x3::CreateFromColumns(unitOrthogonal, unitDirection, unitCross); + shape.m_rotationMatrix = CreateMatrix3x3FromDirection(direction); shape.m_position = center; shape.m_scale = AZ::Vector3(radius, height, radius); shape.m_pointSize = m_pointSize; @@ -647,8 +670,6 @@ namespace AZ AZ::u8 width, int32_t viewProjOverrideIndex) { - AZ_PROFILE_SCOPE(AzRender, "AuxGeomDrawQueue: DrawPrimitiveWithSharedVerticesCommon"); - // grab a mutex lock for the rest of this function so that a commit cannot happen during it and // other threads can't add geometry during it AZStd::lock_guard lock(m_buffersWriteLock); @@ -659,16 +680,17 @@ namespace AZ AuxGeomIndex vertexOffset = aznumeric_cast(primBuffer.m_vertexBuffer.size()); AuxGeomIndex indexOffset = aznumeric_cast(primBuffer.m_indexBuffer.size()); + const size_t vertexCountTotal = aznumeric_cast(vertexOffset) + vertexCount; - if (aznumeric_cast(vertexOffset) + vertexCount > MaxDynamicVertexCount) + if (vertexCountTotal > MaxDynamicVertexCount) { AZ_WarningOnce("AuxGeom", false, "Draw function ignored, would exceed maximum allowed index of %d", MaxDynamicVertexCount); return; } AZ::Vector3 center(0.0f, 0.0f, 0.0f); - primBuffer.m_vertexBuffer.reserve(vertexCount); - primBuffer.m_indexBuffer.reserve(vertexCount); + primBuffer.m_vertexBuffer.reserve(vertexCountTotal); + primBuffer.m_indexBuffer.reserve(vertexCountTotal); for (uint32_t vertexIndex = 0; vertexIndex < vertexCount; ++vertexIndex) { AZ::u32 packedColor = packedColorFunction(vertexIndex); @@ -718,8 +740,6 @@ namespace AZ AZ::u8 width, int32_t viewProjOverrideIndex) { - AZ_PROFILE_SCOPE(AzRender, "AuxGeomDrawQueue: DrawPrimitiveWithSharedVerticesCommon"); - AZ_Assert(indexCount >= verticesPerPrimitiveType && (indexCount % verticesPerPrimitiveType == 0), "Index count must be at least %d and must be a multiple of %d", verticesPerPrimitiveType, verticesPerPrimitiveType); @@ -734,15 +754,16 @@ namespace AZ AuxGeomIndex vertexOffset = aznumeric_cast(primBuffer.m_vertexBuffer.size()); AuxGeomIndex indexOffset = aznumeric_cast(primBuffer.m_indexBuffer.size()); + const size_t vertexCountTotal = aznumeric_cast(vertexOffset) + vertexCount; - if (aznumeric_cast(vertexOffset) + vertexCount > MaxDynamicVertexCount) + if (vertexCountTotal > MaxDynamicVertexCount) { AZ_WarningOnce("AuxGeom", false, "Draw function ignored, would exceed maximum allowed index of %d", MaxDynamicVertexCount); return; } AZ::Vector3 center(0.0f, 0.0f, 0.0f); - primBuffer.m_vertexBuffer.reserve(vertexCount); + primBuffer.m_vertexBuffer.reserve(vertexCountTotal); for (uint32_t vertexIndex = 0; vertexIndex < vertexCount; ++vertexIndex) { AZ::u32 packedColor = packedColorFunction(vertexIndex); @@ -753,7 +774,7 @@ namespace AZ } center /= aznumeric_cast(vertexCount); - primBuffer.m_indexBuffer.reserve(indexCount); + primBuffer.m_indexBuffer.reserve(indexCount + indexOffset); for (uint32_t index = 0; index < indexCount; ++index) { primBuffer.m_indexBuffer.push_back(vertexOffset + indexFunction(index)); diff --git a/Gems/Atom/Feature/Common/Code/Source/AuxGeom/AuxGeomDrawQueue.h b/Gems/Atom/Feature/Common/Code/Source/AuxGeom/AuxGeomDrawQueue.h index 535a992fe0..7fa1bbdca8 100644 --- a/Gems/Atom/Feature/Common/Code/Source/AuxGeom/AuxGeomDrawQueue.h +++ b/Gems/Atom/Feature/Common/Code/Source/AuxGeom/AuxGeomDrawQueue.h @@ -60,9 +60,12 @@ namespace AZ // Fixed shape draws void DrawQuad(float width, float height, const AZ::Matrix3x4& transform, const AZ::Color& color, DrawStyle style, DepthTest depthTest, DepthWrite depthWrite, FaceCullMode faceCull, int32_t viewProjOverrideIndex) override; void DrawSphere(const AZ::Vector3& center, float radius, const AZ::Color& color, DrawStyle style, DepthTest depthTest, DepthWrite depthWrite, FaceCullMode faceCull, int32_t viewProjOverrideIndex) override; + void DrawSphere(const AZ::Vector3& center, const AZ::Vector3& direction, float radius, const AZ::Color& color, DrawStyle style, DepthTest depthTest, DepthWrite depthWrite, FaceCullMode faceCull, int32_t viewProjOverrideIndex) override; + void DrawHemisphere(const AZ::Vector3& center, const AZ::Vector3& direction, float radius, const AZ::Color& color, DrawStyle style, DepthTest depthTest, DepthWrite depthWrite, FaceCullMode faceCull, int32_t viewProjOverrideIndex) override; void DrawDisk(const AZ::Vector3& center, const AZ::Vector3& direction, float radius, const AZ::Color& color, DrawStyle style, DepthTest depthTest, DepthWrite depthWrite, FaceCullMode faceCull, int32_t viewProjOverrideIndex) override; void DrawCone(const AZ::Vector3& center, const AZ::Vector3& direction, float radius, float height, const AZ::Color& color, DrawStyle style, DepthTest depthTest, DepthWrite depthWrite, FaceCullMode faceCull, int32_t viewProjOverrideIndex) override; void DrawCylinder(const AZ::Vector3& center, const AZ::Vector3& direction, float radius, float height, const AZ::Color& color, DrawStyle style, DepthTest depthTest, DepthWrite depthWrite, FaceCullMode faceCull, int32_t viewProjOverrideIndex) override; + void DrawCylinderNoEnds(const AZ::Vector3& center, const AZ::Vector3& direction, float radius, float height, const AZ::Color& color, DrawStyle style, DepthTest depthTest, DepthWrite depthWrite, FaceCullMode faceCull, int32_t viewProjOverrideIndex) override; void DrawAabb(const AZ::Aabb& aabb, const AZ::Color& color, DrawStyle style, DepthTest depthTest, DepthWrite depthWrite, FaceCullMode faceCull, int32_t viewProjOverrideIndex) override; void DrawAabb(const AZ::Aabb& aabb, const AZ::Matrix3x4& transform, const AZ::Color& color, DrawStyle style, DepthTest depthTest, DepthWrite depthWrite, FaceCullMode faceCull, int32_t viewProjOverrideIndex) override; void DrawObb(const AZ::Obb& obb, const AZ::Vector3& position, const AZ::Color& color, DrawStyle style, DepthTest depthTest, DepthWrite depthWrite, FaceCullMode faceCull, int32_t viewProjOverrideIndex) override; @@ -73,6 +76,9 @@ namespace AZ private: // functions + void DrawCylinderCommon(const AZ::Vector3& center, const AZ::Vector3& direction, float radius, float height, const AZ::Color& color, DrawStyle style, DepthTest depthTest, DepthWrite depthWrite, FaceCullMode faceCull, int32_t viewProjOverrideIndex, bool drawEnds); + void DrawSphereCommon(const AZ::Vector3& center, const AZ::Vector3& direction, float radius, const AZ::Color& color, DrawStyle style, DepthTest depthTest, DepthWrite depthWrite, FaceCullMode faceCull, int32_t viewProjOverrideIndex, bool isHemisphere); + //! Clear the current buffers void ClearCurrentBufferData(); diff --git a/Gems/Atom/Feature/Common/Code/Source/AuxGeom/AuxGeomFeatureProcessor.cpp b/Gems/Atom/Feature/Common/Code/Source/AuxGeom/AuxGeomFeatureProcessor.cpp index a4720ad131..8de0fdfea8 100644 --- a/Gems/Atom/Feature/Common/Code/Source/AuxGeom/AuxGeomFeatureProcessor.cpp +++ b/Gems/Atom/Feature/Common/Code/Source/AuxGeom/AuxGeomFeatureProcessor.cpp @@ -16,8 +16,6 @@ #include -#include - namespace AZ { namespace Render diff --git a/Gems/Atom/Feature/Common/Code/Source/AuxGeom/FixedShapeProcessor.cpp b/Gems/Atom/Feature/Common/Code/Source/AuxGeom/FixedShapeProcessor.cpp index c2ee397b4c..076c2044b5 100644 --- a/Gems/Atom/Feature/Common/Code/Source/AuxGeom/FixedShapeProcessor.cpp +++ b/Gems/Atom/Feature/Common/Code/Source/AuxGeom/FixedShapeProcessor.cpp @@ -9,7 +9,7 @@ #include "FixedShapeProcessor.h" #include "AuxGeomDrawProcessorShared.h" -#include +#include #include #include @@ -69,11 +69,13 @@ namespace AZ SetupInputStreamLayout(m_objectStreamLayout[DrawStyle_Solid], RHI::PrimitiveTopology::TriangleList, false); SetupInputStreamLayout(m_objectStreamLayout[DrawStyle_Shaded], RHI::PrimitiveTopology::TriangleList, true); - CreateSphereBuffersAndViews(); + CreateSphereBuffersAndViews(AuxGeomShapeType::ShapeType_Sphere); + CreateSphereBuffersAndViews(AuxGeomShapeType::ShapeType_Hemisphere); CreateQuadBuffersAndViews(); CreateDiskBuffersAndViews(); CreateConeBuffersAndViews(); - CreateCylinderBuffersAndViews(); + CreateCylinderBuffersAndViews(AuxGeomShapeType::ShapeType_Cylinder); + CreateCylinderBuffersAndViews(AuxGeomShapeType::ShapeType_CylinderNoEnds); CreateBoxBuffersAndViews(); // cache scene pointer for RHI::PipelineState creation. @@ -293,8 +295,11 @@ namespace AZ } } - bool FixedShapeProcessor::CreateSphereBuffersAndViews() + bool FixedShapeProcessor::CreateSphereBuffersAndViews(AuxGeomShapeType sphereShapeType) { + AZ_Assert(sphereShapeType == ShapeType_Sphere || sphereShapeType == ShapeType_Hemisphere, + "Trying to create sphere buffers and views with a non-sphere shape type!"); + const uint32_t numSphereLods = 5; struct LodInfo { @@ -311,13 +316,13 @@ namespace AZ { 9, 9, 0.0000f} }}; - auto& m_shape = m_shapes[ShapeType_Sphere]; + auto& m_shape = m_shapes[sphereShapeType]; m_shape.m_numLods = numSphereLods; for (uint32_t lodIndex = 0; lodIndex < numSphereLods; ++lodIndex) { MeshData meshData; - CreateSphereMeshData(meshData, lodInfo[lodIndex].numRings, lodInfo[lodIndex].numSections); + CreateSphereMeshData(meshData, lodInfo[lodIndex].numRings, lodInfo[lodIndex].numSections, sphereShapeType); ObjectBuffers objectBuffers; @@ -334,12 +339,25 @@ namespace AZ return true; } - void FixedShapeProcessor::CreateSphereMeshData(MeshData& meshData, uint32_t numRings, uint32_t numSections) + void FixedShapeProcessor::CreateSphereMeshData(MeshData& meshData, uint32_t numRings, uint32_t numSections, AuxGeomShapeType sphereShapeType) { const float radius = 1.0f; + // calculate "inner" vertices + float sectionAngle(DegToRad(360.0f / static_cast(numSections))); + float ringSlice(DegToRad(180.0f / static_cast(numRings))); + + uint32_t numberOfPoles = 2; + + if (sphereShapeType == ShapeType_Hemisphere) + { + numberOfPoles = 1; + numRings = (numRings + 1) / 2; + ringSlice = DegToRad(90.0f / static_cast(numRings)); + } + // calc required number of vertices/indices/triangles to build a sphere for the given parameters - uint32_t numVertices = (numRings - 1) * numSections + 2; + uint32_t numVertices = (numRings - 1) * numSections + numberOfPoles; // setup buffers auto& positions = meshData.m_positions; @@ -354,30 +372,29 @@ namespace AZ using NormalType = AuxGeomNormal; // 1st pole vertex - positions.push_back(PosType(0.0f, 0.0f, radius)); - normals.push_back(NormalType(0.0f, 0.0f, 1.0f)); + positions.push_back(PosType(0.0f, radius, 0.0f)); + normals.push_back(NormalType(0.0f, 1.0f, 0.0f)); - // calculate "inner" vertices - float sectionAngle(DegToRad(360.0f / static_cast(numSections))); - float ringSlice(DegToRad(180.0f / static_cast(numRings))); - - for (uint32_t ring = 1; ring < numRings; ++ring) + for (uint32_t ring = 1; ring < numRings - numberOfPoles + 2; ++ring) { float w(sinf(ring * ringSlice)); for (uint32_t section = 0; section < numSections; ++section) { float x = radius * cosf(section * sectionAngle) * w; - float y = radius * sinf(section * sectionAngle) * w; - float z = radius * cosf(ring * ringSlice); + float y = radius * cosf(ring * ringSlice); + float z = radius * sinf(section * sectionAngle) * w; Vector3 radialVector(x, y, z); positions.push_back(radialVector); normals.push_back(radialVector.GetNormalized()); } } - // 2nd vertex of pole (for end cap) - positions.push_back(PosType(0.0f, 0.0f, -radius)); - normals.push_back(NormalType(0.0f, 0.0f, -1.0f)); + if (sphereShapeType == ShapeType_Sphere) + { + // 2nd vertex of pole (for end cap) + positions.push_back(PosType(0.0f, -radius, 0.0f)); + normals.push_back(NormalType(0.0f, -1.0f, 0.0f)); + } // point indices { @@ -393,7 +410,8 @@ namespace AZ // line indices { - const uint32_t numEdges = (numRings - 2) * numSections * 2 + 2 * numSections * 2; + // NumEdges = NumRingEdges + NumSectionEdges = (numRings * numSections) + (numRings * numSections) + const uint32_t numEdges = numRings * numSections * 2; const uint32_t numLineIndices = numEdges * 2; // build "inner" faces @@ -401,10 +419,9 @@ namespace AZ indices.clear(); indices.reserve(numLineIndices); - for (uint16_t ring = 0; ring < numRings - 2; ++ring) + for (uint16_t ring = 0; ring < numRings - numberOfPoles + 1; ++ring) { uint16_t firstVertOfThisRing = static_cast(1 + ring * numSections); - uint16_t firstVertOfNextRing = static_cast(1 + (ring + 1) * numSections); for (uint16_t section = 0; section < numSections; ++section) { uint32_t nextSection = (section + 1) % numSections; @@ -414,32 +431,33 @@ namespace AZ indices.push_back(static_cast(firstVertOfThisRing + nextSection)); // line around section - indices.push_back(firstVertOfThisRing + section); - indices.push_back(firstVertOfNextRing + section); + int currentVertexIndex = firstVertOfThisRing + section; + // max 0 will implicitly handle the top pole + int previousVertexIndex = AZStd::max(currentVertexIndex - (int)numSections, 0); + indices.push_back(static_cast(currentVertexIndex)); + indices.push_back(static_cast(previousVertexIndex)); } } - // build faces for end caps (to connect "inner" vertices with poles) - uint16_t firstPoleVert = 0; - uint16_t firstVertOfFirstRing = static_cast(1 + (0) * numSections); - for (uint16_t section = 0; section < numSections; ++section) + if (sphereShapeType == ShapeType_Sphere) { - indices.push_back(firstPoleVert); - indices.push_back(firstVertOfFirstRing + section); - } - - uint16_t lastPoleVert = static_cast((numRings - 1) * numSections + 1); - uint16_t firstVertOfLastRing = static_cast(1 + (numRings - 2) * numSections); - for (uint16_t section = 0; section < numSections; ++section) - { - indices.push_back(firstVertOfLastRing + section); - indices.push_back(lastPoleVert); + // build faces for bottom pole (to connect "inner" vertices with poles) + uint16_t lastPoleVert = static_cast((numRings - 1) * numSections + 1); + uint16_t firstVertOfLastRing = static_cast(1 + (numRings - 2) * numSections); + for (uint16_t section = 0; section < numSections; ++section) + { + indices.push_back(firstVertOfLastRing + section); + indices.push_back(lastPoleVert); + } } } // triangle indices { - const uint32_t numTriangles = (numRings - 2) * numSections * 2 + 2 * numSections; + // NumTriangles = NumTrianglesAtPoles + NumQuads * 2 + // = (numSections * 2) + ((numRings - 2) * numSections * 2) + // = (numSections * 2) * (numRings - 2 + 1) + const uint32_t numTriangles = (numRings - 1) * numSections * 2; const uint32_t numTriangleIndices = numTriangles * 3; // build "inner" faces @@ -447,10 +465,10 @@ namespace AZ indices.clear(); indices.reserve(numTriangleIndices); - for (uint32_t ring = 0; ring < numRings - 2; ++ring) + for (uint32_t ring = 0; ring < numRings - numberOfPoles; ++ring) { uint32_t firstVertOfThisRing = 1 + ring * numSections; - uint32_t firstVertOfNextRing = 1 + (ring + 1) * numSections; + uint32_t firstVertOfNextRing = firstVertOfThisRing + numSections; for (uint32_t section = 0; section < numSections; ++section) { @@ -476,14 +494,17 @@ namespace AZ indices.push_back(static_cast(firstPoleVert)); } - uint32_t lastPoleVert = (numRings - 1) * numSections + 1; - uint32_t firstVertOfLastRing = 1 + (numRings - 2) * numSections; - for (uint32_t section = 0; section < numSections; ++section) + if (sphereShapeType == ShapeType_Sphere) { - uint32_t nextSection = (section + 1) % numSections; - indices.push_back(static_cast(firstVertOfLastRing + nextSection)); - indices.push_back(static_cast(firstVertOfLastRing + section)); - indices.push_back(static_cast(lastPoleVert)); + uint32_t lastPoleVert = (numRings - 1) * numSections + 1; + uint32_t firstVertOfLastRing = 1 + (numRings - 2) * numSections; + for (uint32_t section = 0; section < numSections; ++section) + { + uint32_t nextSection = (section + 1) % numSections; + indices.push_back(static_cast(firstVertOfLastRing + nextSection)); + indices.push_back(static_cast(firstVertOfLastRing + section)); + indices.push_back(static_cast(lastPoleVert)); + } } } } @@ -827,8 +848,11 @@ namespace AZ } } - bool FixedShapeProcessor::CreateCylinderBuffersAndViews() + bool FixedShapeProcessor::CreateCylinderBuffersAndViews(AuxGeomShapeType cylinderShapeType) { + AZ_Assert(cylinderShapeType == ShapeType_Cylinder || cylinderShapeType == ShapeType_CylinderNoEnds, + "Trying to create cylinder buffers and views with a non-cylinder shape type!"); + const uint32_t numCylinderLods = 5; struct LodInfo { @@ -836,21 +860,21 @@ namespace AZ float screenPercentage; }; const AZStd::array lodInfo = - {{ + { { { 38, 0.1000f}, { 22, 0.0100f}, { 14, 0.0010f}, { 10, 0.0001f}, { 8, 0.0000f} - }}; + } }; - auto& m_shape = m_shapes[ShapeType_Cylinder]; + auto& m_shape = m_shapes[cylinderShapeType]; m_shape.m_numLods = numCylinderLods; for (uint32_t lodIndex = 0; lodIndex < numCylinderLods; ++lodIndex) { MeshData meshData; - CreateCylinderMeshData(meshData, lodInfo[lodIndex].numSections); + CreateCylinderMeshData(meshData, lodInfo[lodIndex].numSections, cylinderShapeType); ObjectBuffers objectBuffers; @@ -867,13 +891,25 @@ namespace AZ return true; } - void FixedShapeProcessor::CreateCylinderMeshData(MeshData& meshData, uint32_t numSections) + void FixedShapeProcessor::CreateCylinderMeshData(MeshData& meshData, uint32_t numSections, AuxGeomShapeType cylinderShapeType) { const float radius = 1.0f; const float height = 1.0f; + //uint16_t indexOfBottomCenter = 0; + //uint16_t indexOfBottomStart = 1; + //uint16_t indexOfTopCenter = numSections + 1; + //uint16_t indexOfTopStart = numSections + 2; + uint16_t indexOfSidesStart = static_cast(2 * numSections + 2); + + if (cylinderShapeType == ShapeType_CylinderNoEnds) + { + // We won't draw disks at the ends of the cylinder, so no need to offset side indices + indexOfSidesStart = 0; + } + // calc required number of vertices to build a cylinder for the given parameters - uint32_t numVertices = 4 * numSections + 2; + uint32_t numVertices = indexOfSidesStart + 2 * numSections; // setup buffers auto& positions = meshData.m_positions; @@ -888,8 +924,11 @@ namespace AZ float topHeight = height * 0.5f; // Create caps - CreateDiskMeshData(meshData, numSections, Facing::Down, bottomHeight); - CreateDiskMeshData(meshData, numSections, Facing::Up, topHeight); + if (cylinderShapeType == ShapeType_Cylinder) + { + CreateDiskMeshData(meshData, numSections, Facing::Down, bottomHeight); + CreateDiskMeshData(meshData, numSections, Facing::Up, topHeight); + } // create vertices for side (so normal points out correctly) float sectionAngle(DegToRad(360.0f / (float)numSections)); @@ -906,12 +945,6 @@ namespace AZ normals.push_back(normal); } - //uint16_t indexOfBottomCenter = 0; - //uint16_t indexOfBottomStart = 1; - //uint16_t indexOfTopCenter = numSections + 1; - //uint16_t indexOfTopStart = numSections + 2; - uint16_t indexOfSidesStart = static_cast(2 * numSections + 2); - // build point indices { auto& indices = meshData.m_pointIndices; @@ -930,6 +963,24 @@ namespace AZ indices.push_back(indexOfSidesStart + 2 * section); indices.push_back(indexOfSidesStart + 2 * section + 1); } + + // If we're not drawing the disks at the ends of the cylinder, we still want to + // draw a ring around the end to join the tips of lines we created just above + if (cylinderShapeType == ShapeType_CylinderNoEnds) + { + for (uint16_t section = 0; section < numSections; ++section) + { + uint16_t nextSection = (section + 1) % numSections; + + // line around the bottom cap + indices.push_back(section * 2); + indices.push_back(nextSection * 2); + + // line around the top cap + indices.push_back(section * 2 + 1); + indices.push_back(nextSection * 2 + 1); + } + } } // indices for triangles diff --git a/Gems/Atom/Feature/Common/Code/Source/AuxGeom/FixedShapeProcessor.h b/Gems/Atom/Feature/Common/Code/Source/AuxGeom/FixedShapeProcessor.h index 4007d62f66..958cee3143 100644 --- a/Gems/Atom/Feature/Common/Code/Source/AuxGeom/FixedShapeProcessor.h +++ b/Gems/Atom/Feature/Common/Code/Source/AuxGeom/FixedShapeProcessor.h @@ -138,8 +138,8 @@ namespace AZ Both, }; - bool CreateSphereBuffersAndViews(); - void CreateSphereMeshData(MeshData& meshData, uint32_t numRings, uint32_t numSections); + bool CreateSphereBuffersAndViews(AuxGeomShapeType sphereShapeType); + void CreateSphereMeshData(MeshData& meshData, uint32_t numRings, uint32_t numSections, AuxGeomShapeType sphereShapeType); bool CreateQuadBuffersAndViews(); void CreateQuadMeshDataSide(MeshData& meshData, bool isUp, bool drawLines); @@ -152,8 +152,8 @@ namespace AZ bool CreateConeBuffersAndViews(); void CreateConeMeshData(MeshData& meshData, uint32_t numRings, uint32_t numSections); - bool CreateCylinderBuffersAndViews(); - void CreateCylinderMeshData(MeshData& meshData, uint32_t numSections); + bool CreateCylinderBuffersAndViews(AuxGeomShapeType cylinderShapeType); + void CreateCylinderMeshData(MeshData& meshData, uint32_t numSections, AuxGeomShapeType cylinderShapeType); bool CreateBoxBuffersAndViews(); void CreateBoxMeshData(MeshData& meshData); diff --git a/Gems/Atom/Feature/Common/Code/Source/CommonSystemComponent.cpp b/Gems/Atom/Feature/Common/Code/Source/CommonSystemComponent.cpp index 2e5db39880..a06defff08 100644 --- a/Gems/Atom/Feature/Common/Code/Source/CommonSystemComponent.cpp +++ b/Gems/Atom/Feature/Common/Code/Source/CommonSystemComponent.cpp @@ -74,11 +74,6 @@ #include -#if AZ_TRAIT_LUXCORE_SUPPORTED -#include -#include -#endif - #include #include @@ -97,9 +92,11 @@ #include #include #include +#include #include #include #include +#include #include #include #include @@ -219,11 +216,6 @@ namespace AZ passSystem->AddPassCreator(Name("DisplayMapperFullScreenPass"), &DisplayMapperFullScreenPass::Create); passSystem->AddPassCreator(Name("OutputTransformPass"), &OutputTransformPass::Create); passSystem->AddPassCreator(Name("EyeAdaptationPass"), &EyeAdaptationPass::Create); - // Add RenderTexture and LuxCoreTexture pass -#if AZ_TRAIT_LUXCORE_SUPPORTED - passSystem->AddPassCreator(Name("RenderTexturePass"), &RenderTexturePass::Create); - passSystem->AddPassCreator(Name("LuxCoreTexturePass"), &LuxCoreTexturePass::Create); -#endif passSystem->AddPassCreator(Name("ImGuiPass"), &ImGuiPass::Create); passSystem->AddPassCreator(Name("LightCullingPass"), &LightCullingPass::Create); passSystem->AddPassCreator(Name("LightCullingRemapPass"), &LightCullingRemap::Create); @@ -284,6 +276,7 @@ namespace AZ passSystem->AddPassCreator(Name("DiffuseProbeGridBorderUpdatePass"), &Render::DiffuseProbeGridBorderUpdatePass::Create); passSystem->AddPassCreator(Name("DiffuseProbeGridRelocationPass"), &Render::DiffuseProbeGridRelocationPass::Create); passSystem->AddPassCreator(Name("DiffuseProbeGridClassificationPass"), &Render::DiffuseProbeGridClassificationPass::Create); + passSystem->AddPassCreator(Name("DiffuseProbeGridDownsamplePass"), &Render::DiffuseProbeGridDownsamplePass::Create); passSystem->AddPassCreator(Name("DiffuseProbeGridRenderPass"), &Render::DiffuseProbeGridRenderPass::Create); passSystem->AddPassCreator(Name("LuminanceHistogramGeneratorPass"), &LuminanceHistogramGeneratorPass::Create); @@ -292,6 +285,7 @@ namespace AZ passSystem->AddPassCreator(Name("DeferredFogPass"), &DeferredFogPass::Create); // Add Reflection passes + passSystem->AddPassCreator(Name("ReflectionScreenSpaceTracePass"), &Render::ReflectionScreenSpaceTracePass::Create); passSystem->AddPassCreator(Name("ReflectionScreenSpaceBlurPass"), &Render::ReflectionScreenSpaceBlurPass::Create); passSystem->AddPassCreator(Name("ReflectionScreenSpaceBlurChildPass"), &Render::ReflectionScreenSpaceBlurChildPass::Create); passSystem->AddPassCreator(Name("ReflectionScreenSpaceCompositePass"), &Render::ReflectionScreenSpaceCompositePass::Create); diff --git a/Gems/Atom/Feature/Common/Code/Source/CommonSystemComponent.h b/Gems/Atom/Feature/Common/Code/Source/CommonSystemComponent.h index b12ad3459c..4838cc3d3d 100644 --- a/Gems/Atom/Feature/Common/Code/Source/CommonSystemComponent.h +++ b/Gems/Atom/Feature/Common/Code/Source/CommonSystemComponent.h @@ -12,10 +12,6 @@ #include -#if AZ_TRAIT_LUXCORE_SUPPORTED -#include "LuxCore/LuxCoreRenderer.h" -#endif - namespace AZ { namespace Render @@ -50,11 +46,6 @@ namespace AZ RPI::PassSystemInterface::OnReadyLoadTemplatesEvent::Handler m_loadTemplatesHandler; AZStd::unique_ptr m_modelReloaderSystem; - -#if AZ_TRAIT_LUXCORE_SUPPORTED - // LuxCore - LuxCoreRenderer m_luxCore; -#endif }; } // namespace Render } // namespace AZ diff --git a/Gems/Atom/Feature/Common/Code/Source/CoreLights/CapsuleLightFeatureProcessor.cpp b/Gems/Atom/Feature/Common/Code/Source/CoreLights/CapsuleLightFeatureProcessor.cpp index bbea462ac8..b279d7106f 100644 --- a/Gems/Atom/Feature/Common/Code/Source/CoreLights/CapsuleLightFeatureProcessor.cpp +++ b/Gems/Atom/Feature/Common/Code/Source/CoreLights/CapsuleLightFeatureProcessor.cpp @@ -8,8 +8,6 @@ #include -#include - #include #include diff --git a/Gems/Atom/Feature/Common/Code/Source/CoreLights/DirectionalLightFeatureProcessor.cpp b/Gems/Atom/Feature/Common/Code/Source/CoreLights/DirectionalLightFeatureProcessor.cpp index b6c6910fd3..5cf65adcee 100644 --- a/Gems/Atom/Feature/Common/Code/Source/CoreLights/DirectionalLightFeatureProcessor.cpp +++ b/Gems/Atom/Feature/Common/Code/Source/CoreLights/DirectionalLightFeatureProcessor.cpp @@ -23,7 +23,6 @@ #include #include #include -#include #include namespace AZ @@ -199,13 +198,15 @@ namespace AZ if (m_shadowingLightHandle.IsValid()) { - uint32_t shadowFilterMethod = m_shadowData.at(nullptr).GetData(m_shadowingLightHandle.GetIndex()).m_shadowFilterMethod; + const uint32_t shadowFilterMethod = m_shadowData.at(nullptr).GetData(m_shadowingLightHandle.GetIndex()).m_shadowFilterMethod; RPI::ShaderSystemInterface::Get()->SetGlobalShaderOption(m_directionalShadowFilteringMethodName, AZ::RPI::ShaderOptionValue{shadowFilterMethod}); - RPI::ShaderSystemInterface::Get()->SetGlobalShaderOption(m_directionalShadowReceiverPlaneBiasEnableName, AZ::RPI::ShaderOptionValue{ m_shadowProperties.GetData(m_shadowingLightHandle.GetIndex()).m_isReceiverPlaneBiasEnabled }); + RPI::ShaderSystemInterface::Get()->SetGlobalShaderOption(m_directionalShadowReceiverPlaneBiasEnableName, AZ::RPI::ShaderOptionValue{ m_shadowProperties.GetData(m_shadowingLightHandle.GetIndex()).m_isReceiverPlaneBiasEnabled }); const uint32_t cascadeCount = m_shadowData.at(nullptr).GetData(m_shadowingLightHandle.GetIndex()).m_cascadeCount; - ShadowProperty& property = m_shadowProperties.GetData(m_shadowingLightHandle.GetIndex()); + RPI::ShaderSystemInterface::Get()->SetGlobalShaderOption(m_BlendBetweenCascadesEnableName, AZ::RPI::ShaderOptionValue{cascadeCount > 1 && m_shadowProperties.GetData(m_shadowingLightHandle.GetIndex()).m_blendBetwenCascades }); + + ShadowProperty& property = m_shadowProperties.GetData(m_shadowingLightHandle.GetIndex()); bool segmentsNeedUpdate = property.m_segments.empty(); for (const auto& passIt : m_cascadedShadowmapsPasses) { @@ -343,7 +344,6 @@ namespace AZ m_shadowBufferNeedsUpdate = true; m_shadowProperties.GetData(index).m_cameraConfigurations[nullptr] = {}; - m_shadowProperties.GetData(index).m_cameraTransforms[nullptr] = Transform::CreateIdentity(); const LightHandle handle(index); m_shadowingLightHandle = handle; // only the recent light has shadows. @@ -495,20 +495,10 @@ namespace AZ void DirectionalLightFeatureProcessor::SetCameraTransform( LightHandle handle, - const Transform& cameraTransform, - const RPI::RenderPipelineId& renderPipelineId) + const Transform&, + const RPI::RenderPipelineId&) { ShadowProperty& property = m_shadowProperties.GetData(handle.GetIndex()); - - if (RPI::RenderPipeline* renderPipeline = GetParentScene()->GetRenderPipeline(renderPipelineId).get()) - { - const RPI::View* cameraView = renderPipeline->GetDefaultView().get(); - property.m_cameraTransforms[cameraView] = cameraTransform; - } - else - { - property.m_cameraTransforms[nullptr] = cameraTransform; - } property.m_shadowmapViewNeedsUpdate = true; } @@ -589,6 +579,11 @@ namespace AZ m_shadowProperties.GetData(handle.GetIndex()).m_isReceiverPlaneBiasEnabled = enable; } + void DirectionalLightFeatureProcessor::SetCascadeBlendingEnabled(LightHandle handle, bool enable) + { + m_shadowProperties.GetData(handle.GetIndex()).m_blendBetwenCascades = enable; + } + void DirectionalLightFeatureProcessor::SetShadowBias(LightHandle handle, float bias) { for (auto& it : m_shadowData) @@ -934,17 +929,6 @@ namespace AZ return property.m_cameraConfigurations.at(nullptr); } - const Transform& DirectionalLightFeatureProcessor::GetCameraTransform(LightHandle handle, const RPI::View* cameraView) const - { - const ShadowProperty& property = m_shadowProperties.GetData(handle.GetIndex()); - const auto findIt = property.m_cameraTransforms.find(cameraView); - if (findIt != property.m_cameraTransforms.end()) - { - return findIt->second; - } - return property.m_cameraTransforms.at(nullptr); - } - void DirectionalLightFeatureProcessor::UpdateFrustums( LightHandle handle) { @@ -1056,7 +1040,7 @@ namespace AZ // if the shadow is rendering in an EnvironmentCubeMapPass it also needs to be a ReflectiveCubeMap view, // to filter out shadows from objects that are excluded from the cubemap RPI::PassFilter passFilter = RPI::PassFilter::CreateWithPassClass(); - passFilter.SetOwenrScene(GetParentScene()); // only handles passes for this scene + passFilter.SetOwnerScene(GetParentScene()); // only handles passes for this scene RPI::PassSystemInterface::Get()->ForEachPass(passFilter, [&usageFlags]([[maybe_unused]] RPI::Pass* pass) -> RPI::PassFilterExecutionFlow { usageFlags |= RPI::View::UsageReflectiveCubeMap; @@ -1248,6 +1232,32 @@ namespace AZ property.m_shadowmapViewNeedsUpdate = true; } + float DirectionalLightFeatureProcessor::GetShadowmapSizeFromCameraView(const LightHandle handle, const RPI::View* cameraView) const + { + const DirectionalLightShadowData& shadowData = m_shadowData.at(cameraView).GetData(handle.GetIndex()); + return static_cast(shadowData.m_shadowmapSize); + } + + void DirectionalLightFeatureProcessor::SnapAabbToPixelIncrements(const float invShadowmapSize, Vector3& orthoMin, Vector3& orthoMax) + { + // This function stops the cascaded shadowmap from shimmering as the camera moves. + // See CascadedShadowsManager.cpp in the Microsoft CascadedShadowMaps11 sample for details. + + const Vector3 normalizeByBufferSize = Vector3(invShadowmapSize, invShadowmapSize, invShadowmapSize); + + const Vector3 worldUnitsPerTexel = (orthoMax - orthoMin) * normalizeByBufferSize; + + // We snap the camera to 1 pixel increments so that moving the camera does not cause the shadows to jitter. + // This is a matter of dividing by the world space size of a texel + orthoMin /= worldUnitsPerTexel; + orthoMin = orthoMin.GetFloor(); + orthoMin *= worldUnitsPerTexel; + + orthoMax /= worldUnitsPerTexel; + orthoMax = orthoMax.GetFloor(); + orthoMax *= worldUnitsPerTexel; + } + void DirectionalLightFeatureProcessor::UpdateShadowmapViews(LightHandle handle) { ShadowProperty& property = m_shadowProperties.GetData(handle.GetIndex()); @@ -1259,18 +1269,26 @@ namespace AZ for (auto& segmentIt : property.m_segments) { + const float invShadowmapSize = 1.0f / GetShadowmapSizeFromCameraView(handle, segmentIt.first); + for (uint16_t cascadeIndex = 0; cascadeIndex < segmentIt.second.size(); ++cascadeIndex) { - const Aabb viewAabb = CalculateShadowViewAabb( - handle, segmentIt.first, cascadeIndex, lightTransform); + const Aabb viewAabb = CalculateShadowViewAabb(handle, segmentIt.first, cascadeIndex, lightTransform); if (viewAabb.IsValid() && viewAabb.IsFinite()) { + const float cascadeNear = viewAabb.GetMin().GetY(); + const float cascadeFar = viewAabb.GetMax().GetY(); + + Vector3 snappedAabbMin = viewAabb.GetMin(); + Vector3 snappedAabbMax = viewAabb.GetMax(); + + SnapAabbToPixelIncrements(invShadowmapSize, snappedAabbMin, snappedAabbMax); + Matrix4x4 viewToClipMatrix = Matrix4x4::CreateIdentity(); - MakeOrthographicMatrixRH(viewToClipMatrix, - viewAabb.GetMin().GetElement(0), viewAabb.GetMax().GetElement(0), - viewAabb.GetMin().GetElement(2), viewAabb.GetMax().GetElement(2), - viewAabb.GetMin().GetElement(1), viewAabb.GetMax().GetElement(1)); + MakeOrthographicMatrixRH( + viewToClipMatrix, snappedAabbMin.GetElement(0), snappedAabbMax.GetElement(0), snappedAabbMin.GetElement(2), + snappedAabbMax.GetElement(2), cascadeNear, cascadeFar); CascadeSegment& segment = segmentIt.second[cascadeIndex]; segment.m_aabb = viewAabb; @@ -1331,10 +1349,11 @@ namespace AZ // If we used an AABB whose Y-direction range is from a segment, // the depth value on the shadowmap saturated to 0 or 1, // and we could not draw shadow correctly. + const Transform cameraTransform = cameraView->GetCameraTransform(); const Vector3 entireFrustumCenterLight = - lightTransform.GetInverseFast() * (GetCameraTransform(handle, cameraView).TransformPoint(property.m_entireFrustumCenterLocal)); + lightTransform.GetInverseFast() * (cameraTransform.TransformPoint(property.m_entireFrustumCenterLocal)); const float entireCenterY = entireFrustumCenterLight.GetElement(1); - const Vector3 cameraLocationWorld = GetCameraTransform(handle, cameraView).GetTranslation(); + const Vector3 cameraLocationWorld = cameraTransform.GetTranslation(); const Vector3 cameraLocationLight = lightTransformInverse * cameraLocationWorld; // Extend light view frustum by camera depth far in order to avoid shadow lacking behind camera. const float cameraBehindMinY = cameraLocationLight.GetElement(1) - GetCameraConfiguration(handle, cameraView).GetDepthFar(); @@ -1394,8 +1413,8 @@ namespace AZ GetCameraConfiguration(handle, cameraView).GetDepthCenter(depthNear, depthFar), depthFar); - const Vector3 localCenter{ 0.f, depthCenter, 0.f }; - return GetCameraTransform(handle, cameraView).TransformPoint(localCenter); + const Vector3 localCenter{ 0.f, depthCenter, 0.f }; + return cameraView->GetCameraTransform().TransformPoint(localCenter); } float DirectionalLightFeatureProcessor::GetRadius( @@ -1449,7 +1468,7 @@ namespace AZ const ShadowProperty& property = m_shadowProperties.GetData(handle.GetIndex()); const Vector3& boundaryCenter = GetWorldCenterPosition(handle, cameraView, depthNear, depthFar); const CascadeShadowCameraConfiguration& cameraConfiguration = GetCameraConfiguration(handle, cameraView); - const Transform& cameraTransform = GetCameraTransform(handle, cameraView); + const Transform cameraTransform = cameraView->GetCameraTransform(); const Vector3& cameraFwd = cameraTransform.GetBasis(1); const Vector3& cameraUp = cameraTransform.GetBasis(2); const Vector3 cameraToBoundaryCenter = boundaryCenter - cameraTransform.GetTranslation(); diff --git a/Gems/Atom/Feature/Common/Code/Source/CoreLights/DirectionalLightFeatureProcessor.h b/Gems/Atom/Feature/Common/Code/Source/CoreLights/DirectionalLightFeatureProcessor.h index 8d7a9d76e4..83ab7cb15b 100644 --- a/Gems/Atom/Feature/Common/Code/Source/CoreLights/DirectionalLightFeatureProcessor.h +++ b/Gems/Atom/Feature/Common/Code/Source/CoreLights/DirectionalLightFeatureProcessor.h @@ -134,9 +134,6 @@ namespace AZ // Default far depth of each cascade. AZStd::array m_defaultFarDepths; - // Transforms of camera who offers view frustum for each camera view. - AZStd::unordered_map m_cameraTransforms; - // Configuration offers shape of the camera view frustum for each camera view. AZStd::unordered_map m_cameraConfigurations; @@ -179,6 +176,8 @@ namespace AZ // If true, this will reduce the shadow acne introduced by large pcf kernels by estimating the angle of the triangle being shaded // with the ddx/ddy functions. bool m_isReceiverPlaneBiasEnabled = true; + + bool m_blendBetwenCascades = false; }; static void Reflect(ReflectContext* context); @@ -218,6 +217,7 @@ namespace AZ void SetShadowFilterMethod(LightHandle handle, ShadowFilterMethod method) override; void SetFilteringSampleCount(LightHandle handle, uint16_t count) override; void SetShadowReceiverPlaneBiasEnabled(LightHandle handle, bool enable) override; + void SetCascadeBlendingEnabled(LightHandle handle, bool enable) override; void SetShadowBias(LightHandle handle, float bias) override; void SetNormalShadowBias(LightHandle handle, float normalShadowBias) override; @@ -259,11 +259,6 @@ namespace AZ //! it returns one of the fallback render pipeline ID. const CascadeShadowCameraConfiguration& GetCameraConfiguration(LightHandle handle, const RPI::View* cameraView) const; - //! This returns the camera transform. - //! If it has not been registered for the given camera view. - //! it returns one of the fallback render pipeline ID. - const Transform& GetCameraTransform(LightHandle handle, const RPI::View* cameraView) const; - //! This update view frustum of camera. void UpdateFrustums(LightHandle handle); @@ -341,6 +336,9 @@ namespace AZ //! This draws bounding boxes of cascades. void DrawCascadeBoundingBoxes(LightHandle handle); + float GetShadowmapSizeFromCameraView(const LightHandle handle, const RPI::View* cameraView) const; + void SnapAabbToPixelIncrements(const float invShadowmapSize, Vector3& orthoMin, Vector3& orthoMax); + IndexedDataVector m_shadowProperties; // [GFX TODO][ATOM-2012] shadow for multiple directional lights LightHandle m_shadowingLightHandle; @@ -372,6 +370,7 @@ namespace AZ Name m_lightTypeName = Name("directional"); Name m_directionalShadowFilteringMethodName = Name("o_directional_shadow_filtering_method"); Name m_directionalShadowReceiverPlaneBiasEnableName = Name("o_directional_shadow_receiver_plane_bias_enable"); + Name m_BlendBetweenCascadesEnableName = Name("o_blend_between_cascades_enable"); static constexpr const char* FeatureProcessorName = "DirectionalLightFeatureProcessor"; }; } // namespace Render diff --git a/Gems/Atom/Feature/Common/Code/Source/CoreLights/DiskLightFeatureProcessor.cpp b/Gems/Atom/Feature/Common/Code/Source/CoreLights/DiskLightFeatureProcessor.cpp index acf81ede32..168a7ea00a 100644 --- a/Gems/Atom/Feature/Common/Code/Source/CoreLights/DiskLightFeatureProcessor.cpp +++ b/Gems/Atom/Feature/Common/Code/Source/CoreLights/DiskLightFeatureProcessor.cpp @@ -8,8 +8,6 @@ #include -#include - #include #include #include @@ -313,6 +311,11 @@ namespace AZ SetShadowSetting(handle, &ProjectedShadowFeatureProcessor::SetShadowBias, bias); } + void DiskLightFeatureProcessor::SetNormalShadowBias(LightHandle handle, float bias) + { + SetShadowSetting(handle, &ProjectedShadowFeatureProcessor::SetNormalShadowBias, bias); + } + void DiskLightFeatureProcessor::SetShadowmapMaxResolution(LightHandle handle, ShadowmapSize shadowmapSize) { SetShadowSetting(handle, &ProjectedShadowFeatureProcessor::SetShadowmapMaxResolution, shadowmapSize); diff --git a/Gems/Atom/Feature/Common/Code/Source/CoreLights/DiskLightFeatureProcessor.h b/Gems/Atom/Feature/Common/Code/Source/CoreLights/DiskLightFeatureProcessor.h index 275712f84f..bafddacc65 100644 --- a/Gems/Atom/Feature/Common/Code/Source/CoreLights/DiskLightFeatureProcessor.h +++ b/Gems/Atom/Feature/Common/Code/Source/CoreLights/DiskLightFeatureProcessor.h @@ -51,6 +51,7 @@ namespace AZ void SetConeAngles(LightHandle handle, float innerDegrees, float outerDegrees) override; void SetShadowsEnabled(LightHandle handle, bool enabled) override; void SetShadowBias(LightHandle handle, float bias) override; + void SetNormalShadowBias(LightHandle handle, float bias) override; void SetShadowmapMaxResolution(LightHandle handle, ShadowmapSize shadowmapSize) override; void SetShadowFilterMethod(LightHandle handle, ShadowFilterMethod method) override; void SetFilteringSampleCount(LightHandle handle, uint16_t count) override; diff --git a/Gems/Atom/Feature/Common/Code/Source/CoreLights/EsmShadowmapsPass.cpp b/Gems/Atom/Feature/Common/Code/Source/CoreLights/EsmShadowmapsPass.cpp index b92d538fb5..553133aef7 100644 --- a/Gems/Atom/Feature/Common/Code/Source/CoreLights/EsmShadowmapsPass.cpp +++ b/Gems/Atom/Feature/Common/Code/Source/CoreLights/EsmShadowmapsPass.cpp @@ -101,6 +101,13 @@ namespace AZ void EsmShadowmapsPass::UpdateChildren() { const RPI::PassAttachmentBinding& inputBinding = GetInputBinding(0); + + if (!inputBinding.m_attachment) + { + AZ_Assert(false, "[EsmShadowmapsPass %s] requires an input attachment", GetPathName().GetCStr()); + return; + } + AZ_Assert(inputBinding.m_attachment->m_descriptor.m_type == RHI::AttachmentType::Image, "[EsmShadowmapsPass %s] input attachment requires an image attachment", GetPathName().GetCStr()); m_shadowmapImageSize = inputBinding.m_attachment->m_descriptor.m_image.m_size; m_shadowmapArraySize = inputBinding.m_attachment->m_descriptor.m_image.m_arraySize; diff --git a/Gems/Atom/Feature/Common/Code/Source/CoreLights/PointLightFeatureProcessor.cpp b/Gems/Atom/Feature/Common/Code/Source/CoreLights/PointLightFeatureProcessor.cpp index dcf412c35d..9df176f82d 100644 --- a/Gems/Atom/Feature/Common/Code/Source/CoreLights/PointLightFeatureProcessor.cpp +++ b/Gems/Atom/Feature/Common/Code/Source/CoreLights/PointLightFeatureProcessor.cpp @@ -8,8 +8,6 @@ #include -#include - #include #include @@ -302,5 +300,10 @@ namespace AZ SetShadowSetting(handle, &ProjectedShadowFeatureProcessor::SetEsmExponent, esmExponent); } + void PointLightFeatureProcessor::SetNormalShadowBias(LightHandle handle, float bias) + { + SetShadowSetting(handle, &ProjectedShadowFeatureProcessor::SetNormalShadowBias, bias); + } + } // namespace Render } // namespace AZ diff --git a/Gems/Atom/Feature/Common/Code/Source/CoreLights/PointLightFeatureProcessor.h b/Gems/Atom/Feature/Common/Code/Source/CoreLights/PointLightFeatureProcessor.h index 54cb0303cc..df97fa0a52 100644 --- a/Gems/Atom/Feature/Common/Code/Source/CoreLights/PointLightFeatureProcessor.h +++ b/Gems/Atom/Feature/Common/Code/Source/CoreLights/PointLightFeatureProcessor.h @@ -52,6 +52,7 @@ namespace AZ void SetShadowFilterMethod(LightHandle handle, ShadowFilterMethod method) override; void SetFilteringSampleCount(LightHandle handle, uint16_t count) override; void SetEsmExponent(LightHandle handle, float esmExponent) override; + void SetNormalShadowBias(LightHandle handle, float bias) override; void SetPointData(LightHandle handle, const PointLightData& data) override; const Data::Instance GetLightBuffer() const; diff --git a/Gems/Atom/Feature/Common/Code/Source/CoreLights/PolygonLightFeatureProcessor.cpp b/Gems/Atom/Feature/Common/Code/Source/CoreLights/PolygonLightFeatureProcessor.cpp index f3c05eeeec..1fb22024af 100644 --- a/Gems/Atom/Feature/Common/Code/Source/CoreLights/PolygonLightFeatureProcessor.cpp +++ b/Gems/Atom/Feature/Common/Code/Source/CoreLights/PolygonLightFeatureProcessor.cpp @@ -9,8 +9,6 @@ #include #include -#include - #include #include diff --git a/Gems/Atom/Feature/Common/Code/Source/CoreLights/QuadLightFeatureProcessor.cpp b/Gems/Atom/Feature/Common/Code/Source/CoreLights/QuadLightFeatureProcessor.cpp index 787e150646..66e22c3106 100644 --- a/Gems/Atom/Feature/Common/Code/Source/CoreLights/QuadLightFeatureProcessor.cpp +++ b/Gems/Atom/Feature/Common/Code/Source/CoreLights/QuadLightFeatureProcessor.cpp @@ -9,8 +9,6 @@ #include #include -#include - #include #include diff --git a/Gems/Atom/Feature/Common/Code/Source/CoreLights/SimplePointLightFeatureProcessor.cpp b/Gems/Atom/Feature/Common/Code/Source/CoreLights/SimplePointLightFeatureProcessor.cpp index bc13d3d508..60cf3a0353 100644 --- a/Gems/Atom/Feature/Common/Code/Source/CoreLights/SimplePointLightFeatureProcessor.cpp +++ b/Gems/Atom/Feature/Common/Code/Source/CoreLights/SimplePointLightFeatureProcessor.cpp @@ -8,8 +8,6 @@ #include -#include - #include #include diff --git a/Gems/Atom/Feature/Common/Code/Source/CoreLights/SimpleSpotLightFeatureProcessor.cpp b/Gems/Atom/Feature/Common/Code/Source/CoreLights/SimpleSpotLightFeatureProcessor.cpp index 49b7f7d12c..c9826761d8 100644 --- a/Gems/Atom/Feature/Common/Code/Source/CoreLights/SimpleSpotLightFeatureProcessor.cpp +++ b/Gems/Atom/Feature/Common/Code/Source/CoreLights/SimpleSpotLightFeatureProcessor.cpp @@ -8,8 +8,6 @@ #include -#include - #include #include diff --git a/Gems/Atom/Feature/Common/Code/Source/Decals/DecalFeatureProcessor.cpp b/Gems/Atom/Feature/Common/Code/Source/Decals/DecalFeatureProcessor.cpp index f00c902a73..8e446435fa 100644 --- a/Gems/Atom/Feature/Common/Code/Source/Decals/DecalFeatureProcessor.cpp +++ b/Gems/Atom/Feature/Common/Code/Source/Decals/DecalFeatureProcessor.cpp @@ -8,8 +8,6 @@ #include -#include - #include #include diff --git a/Gems/Atom/Feature/Common/Code/Source/Decals/DecalTextureArray.cpp b/Gems/Atom/Feature/Common/Code/Source/Decals/DecalTextureArray.cpp index 87ac0a9679..36a59bd07f 100644 --- a/Gems/Atom/Feature/Common/Code/Source/Decals/DecalTextureArray.cpp +++ b/Gems/Atom/Feature/Common/Code/Source/Decals/DecalTextureArray.cpp @@ -78,7 +78,7 @@ namespace AZ AZ_Warning("DecalTextureArray", false, "Material property: %s does not have a valid asset Id", propertyName.GetCStr()); return {}; } - return { imageAsset.GetAs< AZ::RPI::StreamingImageAsset>(), AZ::Data::AssetLoadBehavior::PreLoad }; + return Data::static_pointer_cast(imageAsset); } static AZ::Data::Asset GetStreamingImageAsset(const AZ::Data::Asset materialAssetData, const AZ::Name& propertyName) diff --git a/Gems/Atom/Feature/Common/Code/Source/Decals/DecalTextureArrayFeatureProcessor.cpp b/Gems/Atom/Feature/Common/Code/Source/Decals/DecalTextureArrayFeatureProcessor.cpp index e9bc1a1277..393104907a 100644 --- a/Gems/Atom/Feature/Common/Code/Source/Decals/DecalTextureArrayFeatureProcessor.cpp +++ b/Gems/Atom/Feature/Common/Code/Source/Decals/DecalTextureArrayFeatureProcessor.cpp @@ -7,7 +7,6 @@ */ #include -#include #include #include #include diff --git a/Gems/Atom/Feature/Common/Code/Source/DiffuseGlobalIllumination/DiffuseGlobalIlluminationFeatureProcessor.cpp b/Gems/Atom/Feature/Common/Code/Source/DiffuseGlobalIllumination/DiffuseGlobalIlluminationFeatureProcessor.cpp index 453dbbc0ab..768c183f03 100644 --- a/Gems/Atom/Feature/Common/Code/Source/DiffuseGlobalIllumination/DiffuseGlobalIlluminationFeatureProcessor.cpp +++ b/Gems/Atom/Feature/Common/Code/Source/DiffuseGlobalIllumination/DiffuseGlobalIlluminationFeatureProcessor.cpp @@ -9,6 +9,7 @@ #include #include #include +#include #include #include #include @@ -90,10 +91,11 @@ namespace AZ downsamplePassFilter, [sizeMultiplier](RPI::Pass* pass) -> RPI::PassFilterExecutionFlow { - for (uint32_t outputIndex = 0; outputIndex < pass->GetOutputCount(); ++outputIndex) + // update the downsample pass size multipliers + for (uint32_t attachmentIndex = 0; attachmentIndex < pass->GetOutputCount(); ++attachmentIndex) { - RPI::Ptr outputAttachment = pass->GetOutputBinding(outputIndex).m_attachment; - RPI::PassAttachmentSizeMultipliers& sizeMultipliers = outputAttachment->m_sizeMultipliers; + RPI::Ptr attachment = pass->GetOutputBinding(attachmentIndex).m_attachment; + RPI::PassAttachmentSizeMultipliers& sizeMultipliers = attachment->m_sizeMultipliers; sizeMultipliers.m_widthMultiplier = sizeMultiplier; sizeMultipliers.m_heightMultiplier = sizeMultiplier; @@ -105,6 +107,25 @@ namespace AZ downsamplePass->GetShaderResourceGroup()->SetConstant( outputImageScaleShaderInput, aznumeric_cast(1.0f / sizeMultiplier)); + // update the parent pass IrradianceImage size multiplier + RPI::ParentPass* parentPass = pass->GetParent(); + RPI::Ptr irradianceImageAttachment; + for (uint32_t attachmentIndex = 0; attachmentIndex < parentPass->GetInputOutputCount(); ++attachmentIndex) + { + RPI::Ptr attachment = parentPass->GetInputOutputBinding(attachmentIndex).m_attachment; + if (attachment->m_name == Name("IrradianceImage")) + { + irradianceImageAttachment = attachment; + break; + } + } + + AZ_Assert(irradianceImageAttachment != nullptr, "Unable to find IrradianceImage attachment"); + + RPI::PassAttachmentSizeMultipliers& sizeMultipliers = irradianceImageAttachment->m_sizeMultipliers; + sizeMultipliers.m_widthMultiplier = sizeMultiplier; + sizeMultipliers.m_heightMultiplier = sizeMultiplier; + // handle all downsample passes return RPI::PassFilterExecutionFlow::ContinueVisitingPasses; }); diff --git a/Gems/Atom/Feature/Common/Code/Source/DiffuseGlobalIllumination/DiffuseProbeGrid.cpp b/Gems/Atom/Feature/Common/Code/Source/DiffuseGlobalIllumination/DiffuseProbeGrid.cpp index b4f91e58d9..a72d90fc94 100644 --- a/Gems/Atom/Feature/Common/Code/Source/DiffuseGlobalIllumination/DiffuseProbeGrid.cpp +++ b/Gems/Atom/Feature/Common/Code/Source/DiffuseGlobalIllumination/DiffuseProbeGrid.cpp @@ -42,8 +42,7 @@ namespace AZ m_rayTraceImageAttachmentId = AZStd::string::format("ProbeRayTraceImageAttachmentId_%s", uuidString.c_str()); m_irradianceImageAttachmentId = AZStd::string::format("ProbeIrradianceImageAttachmentId_%s", uuidString.c_str()); m_distanceImageAttachmentId = AZStd::string::format("ProbeDistanceImageAttachmentId_%s", uuidString.c_str()); - m_relocationImageAttachmentId = AZStd::string::format("ProbeRelocationImageAttachmentId_%s", uuidString.c_str()); - m_classificationImageAttachmentId = AZStd::string::format("ProbeClassificationImageAttachmentId_%s", uuidString.c_str()); + m_probeDataImageAttachmentId = AZStd::string::format("ProbeDataImageAttachmentId_%s", uuidString.c_str()); // setup culling m_cullable.m_cullData.m_scene = m_scene; @@ -93,7 +92,7 @@ namespace AZ } } - m_probeRayRotationTransform = AZ::Matrix4x4::CreateIdentity(); + m_probeRayRotation = AZ::Quaternion::CreateIdentity(); } bool DiffuseProbeGrid::ValidateProbeSpacing(const AZ::Vector3& newSpacing) @@ -103,8 +102,17 @@ namespace AZ void DiffuseProbeGrid::SetProbeSpacing(const AZ::Vector3& probeSpacing) { + // remove previous spacing from the render extents + m_renderExtents -= m_probeSpacing; + + // update probe spacing m_probeSpacing = probeSpacing; + // expand the extents by one probe spacing unit in order to blend properly around the edges of the volume + m_renderExtents += m_probeSpacing; + + m_obbWs = Obb::CreateFromPositionRotationAndHalfLengths(m_transform.GetTranslation(), m_transform.GetRotation(), m_renderExtents / 2.0f); + // recompute the number of probes since the spacing changed UpdateProbeCount(); @@ -129,7 +137,8 @@ namespace AZ void DiffuseProbeGrid::SetTransform(const AZ::Transform& transform) { m_transform = transform; - m_obbWs = Obb::CreateFromPositionRotationAndHalfLengths(m_transform.GetTranslation(), m_transform.GetRotation(), m_extents / 2.0f); + + m_obbWs = Obb::CreateFromPositionRotationAndHalfLengths(m_transform.GetTranslation(), m_transform.GetRotation(), m_renderExtents / 2.0f); // probes need to be relocated since the grid position changed m_remainingRelocationIterations = DefaultNumRelocationIterations; @@ -145,11 +154,15 @@ namespace AZ void DiffuseProbeGrid::SetExtents(const AZ::Vector3& extents) { m_extents = extents; - m_obbWs = Obb::CreateFromPositionRotationAndHalfLengths(m_transform.GetTranslation(), m_transform.GetRotation(), m_extents / 2.0f); // recompute the number of probes since the extents changed UpdateProbeCount(); + // expand the extents by one probe spacing unit in order to blend properly around the edges of the volume + m_renderExtents = m_extents + m_probeSpacing; + + m_obbWs = Obb::CreateFromPositionRotationAndHalfLengths(m_transform.GetTranslation(), m_transform.GetRotation(), m_renderExtents / 2.0f); + // probes need to be relocated since the grid extents changed m_remainingRelocationIterations = DefaultNumRelocationIterations; @@ -182,58 +195,24 @@ namespace AZ } m_updateTextures = true; + + // probes need to be relocated since the mode has changed + m_remainingRelocationIterations = DefaultNumRelocationIterations; } void DiffuseProbeGrid::SetBakedTextures(const DiffuseProbeGridBakedTextures& bakedTextures) { AZ_Assert(bakedTextures.m_irradianceImage.get(), "Invalid Irradiance image passed to SetBakedTextures"); AZ_Assert(bakedTextures.m_distanceImage.get(), "Invalid Distance image passed to SetBakedTextures"); - AZ_Assert(bakedTextures.m_relocationImageData.size() > 0, "Invalid Relocation image data passed to SetBakedTextures"); - AZ_Assert(bakedTextures.m_classificationImageData.size() > 0, "Invalid Classification image data passed to SetBakedTextures"); + AZ_Assert(bakedTextures.m_probeDataImage.get(), "Invalid ProbeData image passed to SetBakedTextures"); m_bakedIrradianceImage = bakedTextures.m_irradianceImage; m_bakedDistanceImage = bakedTextures.m_distanceImage; + m_bakedProbeDataImage = bakedTextures.m_probeDataImage; m_bakedIrradianceRelativePath = bakedTextures.m_irradianceImageRelativePath; m_bakedDistanceRelativePath = bakedTextures.m_distanceImageRelativePath; - m_bakedRelocationRelativePath = bakedTextures.m_relocationImageRelativePath; - m_bakedClassificationRelativePath = bakedTextures.m_classificationImageRelativePath; - - m_bakedRelocationImageData.resize(bakedTextures.m_relocationImageData.size()); - memcpy(m_bakedRelocationImageData.data(), bakedTextures.m_relocationImageData.data(), bakedTextures.m_relocationImageData.size()); - - m_bakedClassificationImageData.resize(bakedTextures.m_classificationImageData.size()); - memcpy(m_bakedClassificationImageData.data(), bakedTextures.m_classificationImageData.data(), bakedTextures.m_classificationImageData.size()); - - // create the relocation and distance RW textures now, these are needed for shader compatibility - // (image data is copied in UpdateTextures) - { - m_bakedRelocationImage = RHI::Factory::Get().CreateImage(); - RHI::ImageInitRequest initRequest; - initRequest.m_image = m_bakedRelocationImage.get(); - initRequest.m_descriptor = RHI::ImageDescriptor::Create2D( - RHI::ImageBindFlags::ShaderReadWrite | RHI::ImageBindFlags::CopyRead, - bakedTextures.m_relocationImageDescriptor.m_size.m_width, - bakedTextures.m_relocationImageDescriptor.m_size.m_height, - bakedTextures.m_relocationImageDescriptor.m_format); - - [[maybe_unused]] RHI::ResultCode result = m_renderData->m_imagePool->InitImage(initRequest); - AZ_Assert(result == RHI::ResultCode::Success, "Failed to initialize Relocation image"); - } - - { - m_bakedClassificationImage = RHI::Factory::Get().CreateImage(); - RHI::ImageInitRequest initRequest; - initRequest.m_image = m_bakedClassificationImage.get(); - initRequest.m_descriptor = RHI::ImageDescriptor::Create2D( - RHI::ImageBindFlags::ShaderReadWrite | RHI::ImageBindFlags::CopyRead, - bakedTextures.m_classificationImageDescriptor.m_size.m_width, - bakedTextures.m_classificationImageDescriptor.m_size.m_height, - bakedTextures.m_classificationImageDescriptor.m_format); - - [[maybe_unused]] RHI::ResultCode result = m_renderData->m_imagePool->InitImage(initRequest); - AZ_Assert(result == RHI::ResultCode::Success, "Failed to initialize Classification image"); - } + m_bakedProbeDataRelativePath = bakedTextures.m_probeDataImageRelativePath; m_updateTextures = true; } @@ -242,8 +221,7 @@ namespace AZ { return m_bakedIrradianceImage.get() && m_bakedDistanceImage.get() && - m_bakedRelocationImage.get() && - m_bakedClassificationImage.get(); + m_bakedProbeDataImage.get(); } void DiffuseProbeGrid::ResetCullingVisibility() @@ -344,63 +322,18 @@ namespace AZ AZ_Assert(result == RHI::ResultCode::Success, "Failed to initialize m_probeDistanceImage image"); } - // probe relocation + // probe data { uint32_t width = probeCountX; uint32_t height = probeCountY; - m_relocationImage[m_currentImageIndex] = RHI::Factory::Get().CreateImage(); + m_probeDataImage[m_currentImageIndex] = RHI::Factory::Get().CreateImage(); RHI::ImageInitRequest request; - request.m_image = m_relocationImage[m_currentImageIndex].get(); - request.m_descriptor = RHI::ImageDescriptor::Create2D(RHI::ImageBindFlags::ShaderReadWrite | RHI::ImageBindFlags::CopyRead, width, height, DiffuseProbeGridRenderData::RelocationImageFormat); + request.m_image = m_probeDataImage[m_currentImageIndex].get(); + request.m_descriptor = RHI::ImageDescriptor::Create2D(RHI::ImageBindFlags::ShaderReadWrite | RHI::ImageBindFlags::CopyRead, width, height, DiffuseProbeGridRenderData::ProbeDataImageFormat); [[maybe_unused]] RHI::ResultCode result = m_renderData->m_imagePool->InitImage(request); - AZ_Assert(result == RHI::ResultCode::Success, "Failed to initialize m_probeRelocationImage image"); - } - - // probe classification - { - uint32_t width = probeCountX; - uint32_t height = probeCountY; - - m_classificationImage[m_currentImageIndex] = RHI::Factory::Get().CreateImage(); - - RHI::ImageInitRequest request; - request.m_image = m_classificationImage[m_currentImageIndex].get(); - request.m_descriptor = RHI::ImageDescriptor::Create2D(RHI::ImageBindFlags::ShaderReadWrite | RHI::ImageBindFlags::CopyRead, width, height, DiffuseProbeGridRenderData::ClassificationImageFormat); - [[maybe_unused]] RHI::ResultCode result = m_renderData->m_imagePool->InitImage(request); - AZ_Assert(result == RHI::ResultCode::Success, "Failed to initialize m_probeClassificationImage image"); - } - } - else if (m_mode == DiffuseProbeGridMode::Baked && HasValidBakedTextures()) - { - // copy the baked relocation and classification texture data to the RW textures - // (these need to be RW for shader compatibility) - RHI::ImageSubresourceRange range{ 0, 0, 0 ,0 }; - RHI::ImageSubresourceLayoutPlaced layout; - - // relocation - { - m_bakedRelocationImage->GetSubresourceLayouts(range, &layout, nullptr); - - RHI::ImageUpdateRequest updateRequest; - updateRequest.m_image = m_bakedRelocationImage.get(); - updateRequest.m_sourceSubresourceLayout = layout; - updateRequest.m_sourceData = m_bakedRelocationImageData.data(); - updateRequest.m_imageSubresourcePixelOffset = RHI::Origin(0, 0, 0); - m_renderData->m_imagePool->UpdateImageContents(updateRequest); - } - - // classification - { - m_bakedClassificationImage->GetSubresourceLayouts(range, &layout, nullptr); - - RHI::ImageUpdateRequest updateRequest; - updateRequest.m_image = m_bakedClassificationImage.get(); - updateRequest.m_sourceSubresourceLayout = layout; - updateRequest.m_sourceData = m_bakedClassificationImageData.data(); - updateRequest.m_imageSubresourcePixelOffset = RHI::Origin(0, 0, 0); - m_renderData->m_imagePool->UpdateImageContents(updateRequest); + AZ_Assert(result == RHI::ResultCode::Success, "Failed to initialize m_probeDataImage image"); } } @@ -472,39 +405,24 @@ namespace AZ constantIndex = srgLayout->FindShaderInputConstantIndex(AZ::Name("m_probeGrid.rotation")); srg->SetConstant(constantIndex, m_transform.GetRotation()); - constantIndex = srgLayout->FindShaderInputConstantIndex(AZ::Name("m_probeGrid.numRaysPerProbe")); - srg->SetConstant(constantIndex, m_numRaysPerProbe); + constantIndex = srgLayout->FindShaderInputConstantIndex(AZ::Name("m_probeGrid.probeRayRotation")); + srg->SetConstant(constantIndex, m_probeRayRotation); - constantIndex = srgLayout->FindShaderInputConstantIndex(AZ::Name("m_probeGrid.probeGridSpacing")); + constantIndex = srgLayout->FindShaderInputConstantIndex(AZ::Name("m_probeGrid.movementType")); + srg->SetConstant(constantIndex, 0); + + constantIndex = srgLayout->FindShaderInputConstantIndex(AZ::Name("m_probeGrid.probeSpacing")); srg->SetConstant(constantIndex, m_probeSpacing); - constantIndex = srgLayout->FindShaderInputConstantIndex(AZ::Name("m_probeGrid.probeMaxRayDistance")); - srg->SetConstant(constantIndex, m_probeMaxRayDistance); - - constantIndex = srgLayout->FindShaderInputConstantIndex(AZ::Name("m_probeGrid.probeGridCounts")); + constantIndex = srgLayout->FindShaderInputConstantIndex(AZ::Name("m_probeGrid.probeCounts")); uint32_t probeGridCounts[3]; probeGridCounts[0] = m_probeCountX; probeGridCounts[1] = m_probeCountY; probeGridCounts[2] = m_probeCountZ; srg->SetConstantRaw(constantIndex, &probeGridCounts[0], sizeof(probeGridCounts)); - constantIndex = srgLayout->FindShaderInputConstantIndex(AZ::Name("m_probeGrid.probeDistanceExponent")); - srg->SetConstant(constantIndex, m_probeDistanceExponent); - - constantIndex = srgLayout->FindShaderInputConstantIndex(AZ::Name("m_probeGrid.probeHysteresis")); - srg->SetConstant(constantIndex, m_probeHysteresis); - - constantIndex = srgLayout->FindShaderInputConstantIndex(AZ::Name("m_probeGrid.probeChangeThreshold")); - srg->SetConstant(constantIndex, m_probeChangeThreshold); - - constantIndex = srgLayout->FindShaderInputConstantIndex(AZ::Name("m_probeGrid.probeBrightnessThreshold")); - srg->SetConstant(constantIndex, m_probeBrightnessThreshold); - - constantIndex = srgLayout->FindShaderInputConstantIndex(AZ::Name("m_probeGrid.probeIrradianceEncodingGamma")); - srg->SetConstant(constantIndex, m_probeIrradianceEncodingGamma); - - constantIndex = srgLayout->FindShaderInputConstantIndex(AZ::Name("m_probeGrid.probeInverseIrradianceEncodingGamma")); - srg->SetConstant(constantIndex, m_probeInverseIrradianceEncodingGamma); + constantIndex = srgLayout->FindShaderInputConstantIndex(AZ::Name("m_probeGrid.probeNumRays")); + srg->SetConstant(constantIndex, m_numRaysPerProbe); constantIndex = srgLayout->FindShaderInputConstantIndex(AZ::Name("m_probeGrid.probeNumIrradianceTexels")); srg->SetConstant(constantIndex, DefaultNumIrradianceTexels); @@ -512,20 +430,57 @@ namespace AZ constantIndex = srgLayout->FindShaderInputConstantIndex(AZ::Name("m_probeGrid.probeNumDistanceTexels")); srg->SetConstant(constantIndex, DefaultNumDistanceTexels); - constantIndex = srgLayout->FindShaderInputConstantIndex(AZ::Name("m_probeGrid.normalBias")); + constantIndex = srgLayout->FindShaderInputConstantIndex(AZ::Name("m_probeGrid.probeHysteresis")); + srg->SetConstant(constantIndex, m_probeHysteresis); + + constantIndex = srgLayout->FindShaderInputConstantIndex(AZ::Name("m_probeGrid.probeMaxRayDistance")); + srg->SetConstant(constantIndex, m_probeMaxRayDistance); + + constantIndex = srgLayout->FindShaderInputConstantIndex(AZ::Name("m_probeGrid.probeNormalBias")); srg->SetConstant(constantIndex, m_normalBias); - constantIndex = srgLayout->FindShaderInputConstantIndex(AZ::Name("m_probeGrid.viewBias")); + constantIndex = srgLayout->FindShaderInputConstantIndex(AZ::Name("m_probeGrid.probeViewBias")); srg->SetConstant(constantIndex, m_viewBias); - constantIndex = srgLayout->FindShaderInputConstantIndex(AZ::Name("m_probeGrid.probeMinFrontfaceDistance")); - srg->SetConstant(constantIndex, m_probeMinFrontfaceDistance); + constantIndex = srgLayout->FindShaderInputConstantIndex(AZ::Name("m_probeGrid.probeDistanceExponent")); + srg->SetConstant(constantIndex, m_probeDistanceExponent); + + constantIndex = srgLayout->FindShaderInputConstantIndex(AZ::Name("m_probeGrid.probeIrradianceThreshold")); + srg->SetConstant(constantIndex, m_probeIrradianceThreshold); + + constantIndex = srgLayout->FindShaderInputConstantIndex(AZ::Name("m_probeGrid.probeBrightnessThreshold")); + srg->SetConstant(constantIndex, m_probeBrightnessThreshold); + + constantIndex = srgLayout->FindShaderInputConstantIndex(AZ::Name("m_probeGrid.probeIrradianceEncodingGamma")); + srg->SetConstant(constantIndex, m_probeIrradianceEncodingGamma); constantIndex = srgLayout->FindShaderInputConstantIndex(AZ::Name("m_probeGrid.probeBackfaceThreshold")); srg->SetConstant(constantIndex, m_probeBackfaceThreshold); - constantIndex = srgLayout->FindShaderInputConstantIndex(AZ::Name("m_probeGrid.probeRayRotationTransform")); - srg->SetConstant(constantIndex, m_probeRayRotationTransform); + constantIndex = srgLayout->FindShaderInputConstantIndex(AZ::Name("m_probeGrid.probeMinFrontfaceDistance")); + srg->SetConstant(constantIndex, m_probeMinFrontfaceDistance); + + constantIndex = srgLayout->FindShaderInputConstantIndex(AZ::Name("m_probeGrid.probeScrollOffsets")); + srg->SetConstant(constantIndex, Vector3::CreateZero()); + + constantIndex = srgLayout->FindShaderInputConstantIndex(AZ::Name("m_probeGrid.probeRayDataFormat")); + srg->SetConstant(constantIndex, 1); + + constantIndex = srgLayout->FindShaderInputConstantIndex(AZ::Name("m_probeGrid.probeIrradianceFormat")); + srg->SetConstant(constantIndex, 1); + + constantIndex = srgLayout->FindShaderInputConstantIndex(AZ::Name("m_probeGrid.probeRelocationEnabled")); + srg->SetConstant(constantIndex, true); + + constantIndex = srgLayout->FindShaderInputConstantIndex(AZ::Name("m_probeGrid.probeClassificationEnabled")); + srg->SetConstant(constantIndex, true); + + constantIndex = srgLayout->FindShaderInputConstantIndex(AZ::Name("m_probeGrid.probeScrollClear[0]")); + srg->SetConstant(constantIndex, false); + constantIndex = srgLayout->FindShaderInputConstantIndex(AZ::Name("m_probeGrid.probeScrollClear[1]")); + srg->SetConstant(constantIndex, false); + constantIndex = srgLayout->FindShaderInputConstantIndex(AZ::Name("m_probeGrid.probeScrollClear[2]")); + srg->SetConstant(constantIndex, false); } void DiffuseProbeGrid::UpdateRayTraceSrg(const Data::Instance& shader, const RHI::Ptr& layout) @@ -552,13 +507,9 @@ namespace AZ imageIndex = srgLayout->FindShaderInputImageIndex(AZ::Name("m_probeDistance")); m_rayTraceSrg->SetImageView(imageIndex, m_distanceImage[m_currentImageIndex]->GetImageView(m_renderData->m_probeDistanceImageViewDescriptor).get()); - // probe relocation - imageIndex = srgLayout->FindShaderInputImageIndex(AZ::Name("m_probeOffsets")); - m_rayTraceSrg->SetImageView(imageIndex, m_relocationImage[m_currentImageIndex]->GetImageView(m_renderData->m_probeRelocationImageViewDescriptor).get()); - - // probe classification - imageIndex = srgLayout->FindShaderInputImageIndex(AZ::Name("m_probeStates")); - m_rayTraceSrg->SetImageView(imageIndex, m_classificationImage[m_currentImageIndex]->GetImageView(m_renderData->m_probeClassificationImageViewDescriptor).get()); + // probe data + imageIndex = srgLayout->FindShaderInputImageIndex(AZ::Name("m_probeData")); + m_rayTraceSrg->SetImageView(imageIndex, m_probeDataImage[m_currentImageIndex]->GetImageView(m_renderData->m_probeDataImageViewDescriptor).get()); // grid settings constantIndex = srgLayout->FindShaderInputConstantIndex(Name("m_ambientMultiplier")); @@ -590,8 +541,8 @@ namespace AZ imageIndex = srgLayout->FindShaderInputImageIndex(AZ::Name("m_probeIrradiance")); m_blendIrradianceSrg->SetImageView(imageIndex, m_irradianceImage[m_currentImageIndex]->GetImageView(m_renderData->m_probeIrradianceImageViewDescriptor).get()); - imageIndex = srgLayout->FindShaderInputImageIndex(AZ::Name("m_probeStates")); - m_blendIrradianceSrg->SetImageView(imageIndex, m_classificationImage[m_currentImageIndex]->GetImageView(m_renderData->m_probeClassificationImageViewDescriptor).get()); + imageIndex = srgLayout->FindShaderInputImageIndex(AZ::Name("m_probeData")); + m_blendIrradianceSrg->SetImageView(imageIndex, m_probeDataImage[m_currentImageIndex]->GetImageView(m_renderData->m_probeDataImageViewDescriptor).get()); SetGridConstants(m_blendIrradianceSrg); } @@ -613,8 +564,8 @@ namespace AZ imageIndex = srgLayout->FindShaderInputImageIndex(AZ::Name("m_probeDistance")); m_blendDistanceSrg->SetImageView(imageIndex, m_distanceImage[m_currentImageIndex]->GetImageView(m_renderData->m_probeDistanceImageViewDescriptor).get()); - imageIndex = srgLayout->FindShaderInputImageIndex(AZ::Name("m_probeStates")); - m_blendDistanceSrg->SetImageView(imageIndex, m_classificationImage[m_currentImageIndex]->GetImageView(m_renderData->m_probeClassificationImageViewDescriptor).get()); + imageIndex = srgLayout->FindShaderInputImageIndex(AZ::Name("m_probeData")); + m_blendDistanceSrg->SetImageView(imageIndex, m_probeDataImage[m_currentImageIndex]->GetImageView(m_renderData->m_probeDataImageViewDescriptor).get()); SetGridConstants(m_blendDistanceSrg); } @@ -715,8 +666,8 @@ namespace AZ imageIndex = srgLayout->FindShaderInputImageIndex(AZ::Name("m_probeRayTrace")); m_relocationSrg->SetImageView(imageIndex, m_rayTraceImage[m_currentImageIndex]->GetImageView(m_renderData->m_probeRayTraceImageViewDescriptor).get()); - imageIndex = srgLayout->FindShaderInputImageIndex(AZ::Name("m_probeRelocation")); - m_relocationSrg->SetImageView(imageIndex, m_relocationImage[m_currentImageIndex]->GetImageView(m_renderData->m_probeRelocationImageViewDescriptor).get()); + imageIndex = srgLayout->FindShaderInputImageIndex(AZ::Name("m_probeData")); + m_relocationSrg->SetImageView(imageIndex, m_probeDataImage[m_currentImageIndex]->GetImageView(m_renderData->m_probeDataImageViewDescriptor).get()); float probeDistanceScale = (aznumeric_cast(m_remainingRelocationIterations) / DefaultNumRelocationIterations); constantIndex = srgLayout->FindShaderInputConstantIndex(AZ::Name("m_probeDistanceScale")); @@ -739,8 +690,8 @@ namespace AZ imageIndex = srgLayout->FindShaderInputImageIndex(AZ::Name("m_probeRayTrace")); m_classificationSrg->SetImageView(imageIndex, m_rayTraceImage[m_currentImageIndex]->GetImageView(m_renderData->m_probeRayTraceImageViewDescriptor).get()); - imageIndex = srgLayout->FindShaderInputImageIndex(AZ::Name("m_probeStates")); - m_classificationSrg->SetImageView(imageIndex, m_classificationImage[m_currentImageIndex]->GetImageView(m_renderData->m_probeClassificationImageViewDescriptor).get()); + imageIndex = srgLayout->FindShaderInputImageIndex(AZ::Name("m_probeData")); + m_classificationSrg->SetImageView(imageIndex, m_probeDataImage[m_currentImageIndex]->GetImageView(m_renderData->m_probeDataImageViewDescriptor).get()); SetGridConstants(m_classificationSrg); } @@ -763,11 +714,11 @@ namespace AZ RHI::ShaderInputImageIndex imageIndex; constantIndex = srgLayout->FindShaderInputConstantIndex(Name("m_modelToWorld")); - AZ::Matrix3x4 modelToWorld = AZ::Matrix3x4::CreateFromTransform(m_transform) * AZ::Matrix3x4::CreateScale(m_extents); + AZ::Matrix3x4 modelToWorld = AZ::Matrix3x4::CreateFromTransform(m_transform) * AZ::Matrix3x4::CreateScale(m_renderExtents); m_renderObjectSrg->SetConstant(constantIndex, modelToWorld); constantIndex = srgLayout->FindShaderInputConstantIndex(Name("m_modelToWorldInverse")); - AZ::Matrix3x4 modelToWorldInverse = AZ::Matrix3x4::CreateFromTransform(m_transform).GetInverseFull(); + AZ::Matrix3x4 modelToWorldInverse = modelToWorld.GetInverseFull(); m_renderObjectSrg->SetConstant(constantIndex, modelToWorldInverse); constantIndex = srgLayout->FindShaderInputConstantIndex(Name("m_obbHalfLengths")); @@ -785,11 +736,8 @@ namespace AZ imageIndex = srgLayout->FindShaderInputImageIndex(Name("m_probeDistance")); m_renderObjectSrg->SetImageView(imageIndex, GetDistanceImage()->GetImageView(m_renderData->m_probeDistanceImageViewDescriptor).get()); - imageIndex = srgLayout->FindShaderInputImageIndex(Name("m_probeOffsets")); - m_renderObjectSrg->SetImageView(imageIndex, GetRelocationImage()->GetImageView(m_renderData->m_probeRelocationImageViewDescriptor).get()); - - imageIndex = srgLayout->FindShaderInputImageIndex(Name("m_probeStates")); - m_renderObjectSrg->SetImageView(imageIndex, GetClassificationImage()->GetImageView(m_renderData->m_probeClassificationImageViewDescriptor).get()); + imageIndex = srgLayout->FindShaderInputImageIndex(Name("m_probeData")); + m_renderObjectSrg->SetImageView(imageIndex, GetProbeDataImage()->GetImageView(m_renderData->m_probeDataImageViewDescriptor).get()); SetGridConstants(m_renderObjectSrg); diff --git a/Gems/Atom/Feature/Common/Code/Source/DiffuseGlobalIllumination/DiffuseProbeGrid.h b/Gems/Atom/Feature/Common/Code/Source/DiffuseGlobalIllumination/DiffuseProbeGrid.h index 97c336ed41..a828fe4b96 100644 --- a/Gems/Atom/Feature/Common/Code/Source/DiffuseGlobalIllumination/DiffuseProbeGrid.h +++ b/Gems/Atom/Feature/Common/Code/Source/DiffuseGlobalIllumination/DiffuseProbeGrid.h @@ -23,12 +23,10 @@ namespace AZ struct DiffuseProbeGridRenderData { - // [GFX TODO][ATOM-15650] Change DiffuseProbeGrid Classification texture to R8_UINT static const RHI::Format RayTraceImageFormat = RHI::Format::R32G32B32A32_FLOAT; - static const RHI::Format IrradianceImageFormat = RHI::Format::R16G16B16A16_UNORM; + static const RHI::Format IrradianceImageFormat = RHI::Format::R16G16B16A16_FLOAT; static const RHI::Format DistanceImageFormat = RHI::Format::R32G32_FLOAT; - static const RHI::Format RelocationImageFormat = RHI::Format::R16G16B16A16_FLOAT; - static const RHI::Format ClassificationImageFormat = RHI::Format::R32_FLOAT; + static const RHI::Format ProbeDataImageFormat = RHI::Format::R16G16B16A16_FLOAT; // image pool RHI::Ptr m_imagePool; @@ -41,8 +39,7 @@ namespace AZ RHI::ImageViewDescriptor m_probeRayTraceImageViewDescriptor; RHI::ImageViewDescriptor m_probeIrradianceImageViewDescriptor; RHI::ImageViewDescriptor m_probeDistanceImageViewDescriptor; - RHI::ImageViewDescriptor m_probeRelocationImageViewDescriptor; - RHI::ImageViewDescriptor m_probeClassificationImageViewDescriptor; + RHI::ImageViewDescriptor m_probeDataImageViewDescriptor; // render pipeline state RPI::Ptr m_pipelineState; @@ -142,20 +139,17 @@ namespace AZ const RHI::Ptr GetRayTraceImage() { return m_rayTraceImage[m_currentImageIndex]; } const RHI::Ptr GetIrradianceImage() { return m_mode == DiffuseProbeGridMode::RealTime ? m_irradianceImage[m_currentImageIndex] : m_bakedIrradianceImage->GetRHIImage(); } const RHI::Ptr GetDistanceImage() { return m_mode == DiffuseProbeGridMode::RealTime ? m_distanceImage[m_currentImageIndex] : m_bakedDistanceImage->GetRHIImage(); } - const RHI::Ptr GetRelocationImage() { return m_mode == DiffuseProbeGridMode::RealTime ? m_relocationImage[m_currentImageIndex] : m_bakedRelocationImage; } - const RHI::Ptr GetClassificationImage() { return m_mode == DiffuseProbeGridMode::RealTime ? m_classificationImage[m_currentImageIndex] : m_bakedClassificationImage; } + const RHI::Ptr GetProbeDataImage() { return m_mode == DiffuseProbeGridMode::RealTime ? m_probeDataImage[m_currentImageIndex] : m_bakedProbeDataImage->GetRHIImage(); } const AZStd::string& GetBakedIrradianceRelativePath() const { return m_bakedIrradianceRelativePath; } const AZStd::string& GetBakedDistanceRelativePath() const { return m_bakedDistanceRelativePath; } - const AZStd::string& GetBakedRelocationRelativePath() const { return m_bakedRelocationRelativePath; } - const AZStd::string& GetBakedClassificationRelativePath() const { return m_bakedClassificationRelativePath; } + const AZStd::string& GetBakedProbeDataRelativePath() const { return m_bakedProbeDataRelativePath; } // attachment Ids const RHI::AttachmentId GetRayTraceImageAttachmentId() const { return m_rayTraceImageAttachmentId; } const RHI::AttachmentId GetIrradianceImageAttachmentId() const { return m_irradianceImageAttachmentId; } const RHI::AttachmentId GetDistanceImageAttachmentId() const { return m_distanceImageAttachmentId; } - const RHI::AttachmentId GetRelocationImageAttachmentId() const { return m_relocationImageAttachmentId; } - const RHI::AttachmentId GetClassificationImageAttachmentId() const { return m_classificationImageAttachmentId; } + const RHI::AttachmentId GetProbeDataImageAttachmentId() const { return m_probeDataImageAttachmentId; } const DiffuseProbeGridRenderData* GetRenderData() const { return m_renderData; } @@ -189,11 +183,14 @@ namespace AZ // extents of the probe grid AZ::Vector3 m_extents = AZ::Vector3(0.0f, 0.0f, 0.0f); + // expanded extents for rendering the volume + AZ::Vector3 m_renderExtents = AZ::Vector3(0.0f, 0.0f, 0.0f); + // probe grid OBB (world space), built from transform and extents AZ::Obb m_obbWs; // per-axis spacing of probes in the grid - AZ::Vector3 m_probeSpacing; + AZ::Vector3 m_probeSpacing = AZ::Vector3(0.0f, 0.0f, 0.0f); // per-axis number of probes in the grid uint32_t m_probeCountX = 0; @@ -208,10 +205,9 @@ namespace AZ float m_probeMaxRayDistance = 30.0f; float m_probeDistanceExponent = 50.0f; float m_probeHysteresis = 0.95f; - float m_probeChangeThreshold = 0.2f; + float m_probeIrradianceThreshold = 0.2f; float m_probeBrightnessThreshold = 1.0f; float m_probeIrradianceEncodingGamma = 5.0f; - float m_probeInverseIrradianceEncodingGamma = 1.0f / m_probeIrradianceEncodingGamma; float m_probeMinFrontfaceDistance = 1.0f; float m_probeBackfaceThreshold = 0.25f; float m_ambientMultiplier = 1.0f; @@ -219,7 +215,7 @@ namespace AZ bool m_useDiffuseIbl = true; // rotation transform applied to probe rays - AZ::Matrix4x4 m_probeRayRotationTransform; + AZ::Quaternion m_probeRayRotation; AZ::SimpleLcgRandom m_random; // probe relocation settings @@ -247,8 +243,7 @@ namespace AZ RHI::Ptr m_rayTraceImage[ImageFrameCount]; RHI::Ptr m_irradianceImage[ImageFrameCount]; RHI::Ptr m_distanceImage[ImageFrameCount]; - RHI::Ptr m_relocationImage[ImageFrameCount]; - RHI::Ptr m_classificationImage[ImageFrameCount]; + RHI::Ptr m_probeDataImage[ImageFrameCount]; uint32_t m_currentImageIndex = 0; bool m_updateTextures = false; bool m_irradianceClearRequired = true; @@ -256,18 +251,12 @@ namespace AZ // baked textures Data::Instance m_bakedIrradianceImage; Data::Instance m_bakedDistanceImage; - RHI::Ptr m_bakedRelocationImage; - RHI::Ptr m_bakedClassificationImage; + Data::Instance m_bakedProbeDataImage; // baked texture relative paths AZStd::string m_bakedIrradianceRelativePath; AZStd::string m_bakedDistanceRelativePath; - AZStd::string m_bakedRelocationRelativePath; - AZStd::string m_bakedClassificationRelativePath; - - // baked texture data (only needed for the relocation and classification textures) - AZStd::vector m_bakedRelocationImageData; - AZStd::vector m_bakedClassificationImageData; + AZStd::string m_bakedProbeDataRelativePath; // texture readback DiffuseProbeGridTextureReadback m_textureReadback; @@ -289,8 +278,7 @@ namespace AZ RHI::AttachmentId m_rayTraceImageAttachmentId; RHI::AttachmentId m_irradianceImageAttachmentId; RHI::AttachmentId m_distanceImageAttachmentId; - RHI::AttachmentId m_relocationImageAttachmentId; - RHI::AttachmentId m_classificationImageAttachmentId; + RHI::AttachmentId m_probeDataImageAttachmentId; }; } // namespace Render } // namespace AZ diff --git a/Gems/Atom/Feature/Common/Code/Source/DiffuseGlobalIllumination/DiffuseProbeGridBlendDistancePass.cpp b/Gems/Atom/Feature/Common/Code/Source/DiffuseGlobalIllumination/DiffuseProbeGridBlendDistancePass.cpp index cf1897054a..702e784c86 100644 --- a/Gems/Atom/Feature/Common/Code/Source/DiffuseGlobalIllumination/DiffuseProbeGridBlendDistancePass.cpp +++ b/Gems/Atom/Feature/Common/Code/Source/DiffuseGlobalIllumination/DiffuseProbeGridBlendDistancePass.cpp @@ -13,6 +13,7 @@ #include #include #include +#include #include #include #include @@ -30,7 +31,15 @@ namespace AZ DiffuseProbeGridBlendDistancePass::DiffuseProbeGridBlendDistancePass(const RPI::PassDescriptor& descriptor) : RPI::RenderPass(descriptor) { - LoadShader(); + if (!AZ_TRAIT_DIFFUSE_GI_PASSES_SUPPORTED) + { + // GI is not supported on this platform + SetEnabled(false); + } + else + { + LoadShader(); + } } void DiffuseProbeGridBlendDistancePass::LoadShader() @@ -112,11 +121,11 @@ namespace AZ frameGraph.UseShaderAttachment(desc, RHI::ScopeAttachmentAccess::ReadWrite); } - // probe classification image + // probe data image { RHI::ImageScopeAttachmentDescriptor desc; - desc.m_attachmentId = diffuseProbeGrid->GetClassificationImageAttachmentId(); - desc.m_imageViewDescriptor = diffuseProbeGrid->GetRenderData()->m_probeClassificationImageViewDescriptor; + desc.m_attachmentId = diffuseProbeGrid->GetProbeDataImageAttachmentId(); + desc.m_imageViewDescriptor = diffuseProbeGrid->GetRenderData()->m_probeDataImageViewDescriptor; desc.m_loadStoreAction.m_loadAction = AZ::RHI::AttachmentLoadAction::Load; frameGraph.UseShaderAttachment(desc, RHI::ScopeAttachmentAccess::ReadWrite); diff --git a/Gems/Atom/Feature/Common/Code/Source/DiffuseGlobalIllumination/DiffuseProbeGridBlendIrradiancePass.cpp b/Gems/Atom/Feature/Common/Code/Source/DiffuseGlobalIllumination/DiffuseProbeGridBlendIrradiancePass.cpp index f4733c833a..7609e27b66 100644 --- a/Gems/Atom/Feature/Common/Code/Source/DiffuseGlobalIllumination/DiffuseProbeGridBlendIrradiancePass.cpp +++ b/Gems/Atom/Feature/Common/Code/Source/DiffuseGlobalIllumination/DiffuseProbeGridBlendIrradiancePass.cpp @@ -13,6 +13,7 @@ #include #include #include +#include #include #include #include @@ -30,7 +31,15 @@ namespace AZ DiffuseProbeGridBlendIrradiancePass::DiffuseProbeGridBlendIrradiancePass(const RPI::PassDescriptor& descriptor) : RPI::RenderPass(descriptor) { - LoadShader(); + if (!AZ_TRAIT_DIFFUSE_GI_PASSES_SUPPORTED) + { + // GI is not supported on this platform + SetEnabled(false); + } + else + { + LoadShader(); + } } void DiffuseProbeGridBlendIrradiancePass::LoadShader() @@ -102,23 +111,13 @@ namespace AZ frameGraph.UseShaderAttachment(desc, RHI::ScopeAttachmentAccess::ReadWrite); } - // probe irradiance image + // probe data image { RHI::ImageScopeAttachmentDescriptor desc; - desc.m_attachmentId = diffuseProbeGrid->GetIrradianceImageAttachmentId(); - desc.m_imageViewDescriptor = diffuseProbeGrid->GetRenderData()->m_probeIrradianceImageViewDescriptor; + desc.m_attachmentId = diffuseProbeGrid->GetProbeDataImageAttachmentId(); + desc.m_imageViewDescriptor = diffuseProbeGrid->GetRenderData()->m_probeDataImageViewDescriptor; desc.m_loadStoreAction.m_loadAction = AZ::RHI::AttachmentLoadAction::Load; - - frameGraph.UseShaderAttachment(desc, RHI::ScopeAttachmentAccess::ReadWrite); - } - - // probe classification image - { - RHI::ImageScopeAttachmentDescriptor desc; - desc.m_attachmentId = diffuseProbeGrid->GetClassificationImageAttachmentId(); - desc.m_imageViewDescriptor = diffuseProbeGrid->GetRenderData()->m_probeClassificationImageViewDescriptor; - desc.m_loadStoreAction.m_loadAction = AZ::RHI::AttachmentLoadAction::Load; - + frameGraph.UseShaderAttachment(desc, RHI::ScopeAttachmentAccess::ReadWrite); } } diff --git a/Gems/Atom/Feature/Common/Code/Source/DiffuseGlobalIllumination/DiffuseProbeGridBorderUpdatePass.cpp b/Gems/Atom/Feature/Common/Code/Source/DiffuseGlobalIllumination/DiffuseProbeGridBorderUpdatePass.cpp index 6c72f904b9..c4fcb49c17 100644 --- a/Gems/Atom/Feature/Common/Code/Source/DiffuseGlobalIllumination/DiffuseProbeGridBorderUpdatePass.cpp +++ b/Gems/Atom/Feature/Common/Code/Source/DiffuseGlobalIllumination/DiffuseProbeGridBorderUpdatePass.cpp @@ -13,6 +13,7 @@ #include #include #include +#include #include #include #include @@ -30,17 +31,25 @@ namespace AZ DiffuseProbeGridBorderUpdatePass::DiffuseProbeGridBorderUpdatePass(const RPI::PassDescriptor& descriptor) : RPI::RenderPass(descriptor) { - LoadShader("Shaders/DiffuseGlobalIllumination/DiffuseProbeGridBorderUpdateRow.azshader", - m_rowShader, - m_rowPipelineState, - m_rowSrgLayout, - m_rowDispatchArgs); + if (!AZ_TRAIT_DIFFUSE_GI_PASSES_SUPPORTED) + { + // GI is not supported on this platform + SetEnabled(false); + } + else + { + LoadShader("Shaders/DiffuseGlobalIllumination/DiffuseProbeGridBorderUpdateRow.azshader", + m_rowShader, + m_rowPipelineState, + m_rowSrgLayout, + m_rowDispatchArgs); - LoadShader("Shaders/DiffuseGlobalIllumination/DiffuseProbeGridBorderUpdateColumn.azshader", - m_columnShader, - m_columnPipelineState, - m_columnSrgLayout, - m_columnDispatchArgs); + LoadShader("Shaders/DiffuseGlobalIllumination/DiffuseProbeGridBorderUpdateColumn.azshader", + m_columnShader, + m_columnPipelineState, + m_columnSrgLayout, + m_columnDispatchArgs); + } } void DiffuseProbeGridBorderUpdatePass::LoadShader(AZStd::string shaderFilePath, diff --git a/Gems/Atom/Feature/Common/Code/Source/DiffuseGlobalIllumination/DiffuseProbeGridClassificationPass.cpp b/Gems/Atom/Feature/Common/Code/Source/DiffuseGlobalIllumination/DiffuseProbeGridClassificationPass.cpp index 61540c3332..7394b1ccfb 100644 --- a/Gems/Atom/Feature/Common/Code/Source/DiffuseGlobalIllumination/DiffuseProbeGridClassificationPass.cpp +++ b/Gems/Atom/Feature/Common/Code/Source/DiffuseGlobalIllumination/DiffuseProbeGridClassificationPass.cpp @@ -17,6 +17,7 @@ #include #include #include +#include #include #include #include @@ -34,7 +35,15 @@ namespace AZ DiffuseProbeGridClassificationPass::DiffuseProbeGridClassificationPass(const RPI::PassDescriptor& descriptor) : RPI::RenderPass(descriptor) { - LoadShader(); + if (!AZ_TRAIT_DIFFUSE_GI_PASSES_SUPPORTED) + { + // GI is not supported on this platform + SetEnabled(false); + } + else + { + LoadShader(); + } } void DiffuseProbeGridClassificationPass::LoadShader() @@ -106,11 +115,11 @@ namespace AZ frameGraph.UseShaderAttachment(desc, RHI::ScopeAttachmentAccess::ReadWrite); } - // probe classification image + // probe data image { RHI::ImageScopeAttachmentDescriptor desc; - desc.m_attachmentId = diffuseProbeGrid->GetClassificationImageAttachmentId(); - desc.m_imageViewDescriptor = diffuseProbeGrid->GetRenderData()->m_probeClassificationImageViewDescriptor; + desc.m_attachmentId = diffuseProbeGrid->GetProbeDataImageAttachmentId(); + desc.m_imageViewDescriptor = diffuseProbeGrid->GetRenderData()->m_probeDataImageViewDescriptor; desc.m_loadStoreAction.m_loadAction = AZ::RHI::AttachmentLoadAction::Load; frameGraph.UseShaderAttachment(desc, RHI::ScopeAttachmentAccess::ReadWrite); diff --git a/Gems/Atom/Feature/Common/Code/Source/DiffuseGlobalIllumination/DiffuseProbeGridDownsamplePass.cpp b/Gems/Atom/Feature/Common/Code/Source/DiffuseGlobalIllumination/DiffuseProbeGridDownsamplePass.cpp new file mode 100644 index 0000000000..e00213c524 --- /dev/null +++ b/Gems/Atom/Feature/Common/Code/Source/DiffuseGlobalIllumination/DiffuseProbeGridDownsamplePass.cpp @@ -0,0 +1,47 @@ +/* + * Copyright (c) Contributors to the Open 3D Engine Project. + * For complete copyright and license terms please see the LICENSE at the root of this distribution. + * + * SPDX-License-Identifier: Apache-2.0 OR MIT + * + */ + +#include "DiffuseProbeGridDownsamplePass.h" +#include +#include + +namespace AZ +{ + namespace Render + { + RPI::Ptr DiffuseProbeGridDownsamplePass::Create(const RPI::PassDescriptor& descriptor) + { + RPI::Ptr pass = aznew DiffuseProbeGridDownsamplePass(descriptor); + return AZStd::move(pass); + } + + DiffuseProbeGridDownsamplePass::DiffuseProbeGridDownsamplePass(const RPI::PassDescriptor& descriptor) + : RPI::FullscreenTrianglePass(descriptor) + { + } + + bool DiffuseProbeGridDownsamplePass::IsEnabled() const + { + if (!Base::IsEnabled()) + { + return false; + } + + RPI::Scene* scene = m_pipeline->GetScene(); + if (!scene) + { + return false; + } + + // only enabled if there are DiffuseProbeGrids present in the scene + DiffuseProbeGridFeatureProcessor* diffuseProbeGridFeatureProcessor = scene->GetFeatureProcessor(); + return (diffuseProbeGridFeatureProcessor && !diffuseProbeGridFeatureProcessor->GetProbeGrids().empty()); + } + + } // namespace RPI +} // namespace AZ diff --git a/Gems/Atom/Feature/Common/Code/Source/DiffuseGlobalIllumination/DiffuseProbeGridDownsamplePass.h b/Gems/Atom/Feature/Common/Code/Source/DiffuseGlobalIllumination/DiffuseProbeGridDownsamplePass.h new file mode 100644 index 0000000000..de5a981fa1 --- /dev/null +++ b/Gems/Atom/Feature/Common/Code/Source/DiffuseGlobalIllumination/DiffuseProbeGridDownsamplePass.h @@ -0,0 +1,38 @@ +/* + * Copyright (c) Contributors to the Open 3D Engine Project. + * For complete copyright and license terms please see the LICENSE at the root of this distribution. + * + * SPDX-License-Identifier: Apache-2.0 OR MIT + * + */ +#pragma once + +#include +#include + +namespace AZ +{ + namespace Render + { + //! This pass downsamples the scene for use by the DiffuseProbeGridRenderPass. + class DiffuseProbeGridDownsamplePass + : public RPI::FullscreenTrianglePass + { + using Base = RPI::FullscreenTrianglePass; + AZ_RPI_PASS(DiffuseProbeGridDownsamplePass); + + public: + AZ_RTTI(Render::DiffuseProbeGridDownsamplePass, "{B3331B68-F974-44D6-806B-2CFFB4B6B563}", Base); + AZ_CLASS_ALLOCATOR(Render::DiffuseProbeGridDownsamplePass, SystemAllocator, 0); + + //! Creates a new pass without a PassTemplate + static RPI::Ptr Create(const RPI::PassDescriptor& descriptor); + + private: + explicit DiffuseProbeGridDownsamplePass(const RPI::PassDescriptor& descriptor); + + // Pass behavior overrides... + bool IsEnabled() const override; + }; + } // namespace RPI +} // namespace AZ diff --git a/Gems/Atom/Feature/Common/Code/Source/DiffuseGlobalIllumination/DiffuseProbeGridFeatureProcessor.cpp b/Gems/Atom/Feature/Common/Code/Source/DiffuseGlobalIllumination/DiffuseProbeGridFeatureProcessor.cpp index 5ea4748fc9..281255f1b4 100644 --- a/Gems/Atom/Feature/Common/Code/Source/DiffuseGlobalIllumination/DiffuseProbeGridFeatureProcessor.cpp +++ b/Gems/Atom/Feature/Common/Code/Source/DiffuseGlobalIllumination/DiffuseProbeGridFeatureProcessor.cpp @@ -69,8 +69,7 @@ namespace AZ m_probeGridRenderData.m_probeRayTraceImageViewDescriptor = RHI::ImageViewDescriptor::Create(DiffuseProbeGridRenderData::RayTraceImageFormat, 0, 0); m_probeGridRenderData.m_probeIrradianceImageViewDescriptor = RHI::ImageViewDescriptor::Create(DiffuseProbeGridRenderData::IrradianceImageFormat, 0, 0); m_probeGridRenderData.m_probeDistanceImageViewDescriptor = RHI::ImageViewDescriptor::Create(DiffuseProbeGridRenderData::DistanceImageFormat, 0, 0); - m_probeGridRenderData.m_probeRelocationImageViewDescriptor = RHI::ImageViewDescriptor::Create(DiffuseProbeGridRenderData::RelocationImageFormat, 0, 0); - m_probeGridRenderData.m_probeClassificationImageViewDescriptor = RHI::ImageViewDescriptor::Create(DiffuseProbeGridRenderData::ClassificationImageFormat, 0, 0); + m_probeGridRenderData.m_probeDataImageViewDescriptor = RHI::ImageViewDescriptor::Create(DiffuseProbeGridRenderData::ProbeDataImageFormat, 0, 0); // load shader // Note: the shader may not be available on all platforms @@ -325,15 +324,13 @@ namespace AZ DiffuseProbeGridBakeTexturesCallback callback, const AZStd::string& irradianceTextureRelativePath, const AZStd::string& distanceTextureRelativePath, - const AZStd::string& relocationTextureRelativePath, - const AZStd::string& classificationTextureRelativePath) + const AZStd::string& probeDataTextureRelativePath) { AZ_Assert(probeGrid.get(), "BakeTextures called with an invalid handle"); AddNotificationEntry(irradianceTextureRelativePath); AddNotificationEntry(distanceTextureRelativePath); - AddNotificationEntry(relocationTextureRelativePath); - AddNotificationEntry(classificationTextureRelativePath); + AddNotificationEntry(probeDataTextureRelativePath); probeGrid->GetTextureReadback().BeginTextureReadback(callback); } @@ -415,15 +412,13 @@ namespace AZ bool DiffuseProbeGridFeatureProcessor::AreBakedTexturesReferenced( const AZStd::string& irradianceTextureRelativePath, const AZStd::string& distanceTextureRelativePath, - const AZStd::string& relocationTextureRelativePath, - const AZStd::string& classificationTextureRelativePath) + const AZStd::string& probeDataTextureRelativePath) { for (auto& diffuseProbeGrid : m_diffuseProbeGrids) { if ((diffuseProbeGrid->GetBakedIrradianceRelativePath() == irradianceTextureRelativePath) || (diffuseProbeGrid->GetBakedDistanceRelativePath() == distanceTextureRelativePath) || - (diffuseProbeGrid->GetBakedRelocationRelativePath() == relocationTextureRelativePath) || - (diffuseProbeGrid->GetBakedClassificationRelativePath() == classificationTextureRelativePath)) + (diffuseProbeGrid->GetBakedProbeDataRelativePath() == probeDataTextureRelativePath)) { return true; } diff --git a/Gems/Atom/Feature/Common/Code/Source/DiffuseGlobalIllumination/DiffuseProbeGridFeatureProcessor.h b/Gems/Atom/Feature/Common/Code/Source/DiffuseGlobalIllumination/DiffuseProbeGridFeatureProcessor.h index 6275abf008..16dfbd517a 100644 --- a/Gems/Atom/Feature/Common/Code/Source/DiffuseGlobalIllumination/DiffuseProbeGridFeatureProcessor.h +++ b/Gems/Atom/Feature/Common/Code/Source/DiffuseGlobalIllumination/DiffuseProbeGridFeatureProcessor.h @@ -51,8 +51,7 @@ namespace AZ DiffuseProbeGridBakeTexturesCallback callback, const AZStd::string& irradianceTextureRelativePath, const AZStd::string& distanceTextureRelativePath, - const AZStd::string& relocationTextureRelativePath, - const AZStd::string& classificationTextureRelativePath) override; + const AZStd::string& probeDataTextureRelativePath) override; bool CheckTextureAssetNotification( const AZStd::string& relativePath, @@ -62,8 +61,7 @@ namespace AZ bool AreBakedTexturesReferenced( const AZStd::string& irradianceTextureRelativePath, const AZStd::string& distanceTextureRelativePath, - const AZStd::string& relocationTextureRelativePath, - const AZStd::string& classificationTextureRelativePath) override; + const AZStd::string& probeDataTextureRelativePath) override; // FeatureProcessor overrides void Activate() override; diff --git a/Gems/Atom/Feature/Common/Code/Source/DiffuseGlobalIllumination/DiffuseProbeGridRayTracingPass.cpp b/Gems/Atom/Feature/Common/Code/Source/DiffuseGlobalIllumination/DiffuseProbeGridRayTracingPass.cpp index 958823ef91..df551e7f42 100644 --- a/Gems/Atom/Feature/Common/Code/Source/DiffuseGlobalIllumination/DiffuseProbeGridRayTracingPass.cpp +++ b/Gems/Atom/Feature/Common/Code/Source/DiffuseGlobalIllumination/DiffuseProbeGridRayTracingPass.cpp @@ -19,6 +19,7 @@ #include #include #include +#include #include #include #include @@ -38,9 +39,9 @@ namespace AZ : RPI::RenderPass(descriptor) { RHI::Ptr device = RHI::RHISystemInterface::Get()->GetDevice(); - if (device->GetFeatures().m_rayTracing == false) + if (device->GetFeatures().m_rayTracing == false || !AZ_TRAIT_DIFFUSE_GI_PASSES_SUPPORTED) { - // raytracing is not supported on this platform + // raytracing or GI is not supported on this platform SetEnabled(false); } } @@ -216,27 +217,14 @@ namespace AZ frameGraph.UseShaderAttachment(desc, RHI::ScopeAttachmentAccess::ReadWrite); } - // probe relocation + // probe data { - [[maybe_unused]] RHI::ResultCode result = frameGraph.GetAttachmentDatabase().ImportImage(diffuseProbeGrid->GetRelocationImageAttachmentId(), diffuseProbeGrid->GetRelocationImage()); - AZ_Assert(result == RHI::ResultCode::Success, "Failed to import probeRelocationImage"); + [[maybe_unused]] RHI::ResultCode result = frameGraph.GetAttachmentDatabase().ImportImage(diffuseProbeGrid->GetProbeDataImageAttachmentId(), diffuseProbeGrid->GetProbeDataImage()); + AZ_Assert(result == RHI::ResultCode::Success, "Failed to import ProbeDataImage"); RHI::ImageScopeAttachmentDescriptor desc; - desc.m_attachmentId = diffuseProbeGrid->GetRelocationImageAttachmentId(); - desc.m_imageViewDescriptor = diffuseProbeGrid->GetRenderData()->m_probeRelocationImageViewDescriptor; - desc.m_loadStoreAction.m_loadAction = AZ::RHI::AttachmentLoadAction::Load; - - frameGraph.UseShaderAttachment(desc, RHI::ScopeAttachmentAccess::ReadWrite); - } - - // probe classification - { - [[maybe_unused]] RHI::ResultCode result = frameGraph.GetAttachmentDatabase().ImportImage(diffuseProbeGrid->GetClassificationImageAttachmentId(), diffuseProbeGrid->GetClassificationImage()); - AZ_Assert(result == RHI::ResultCode::Success, "Failed to import probeClassificationImage"); - - RHI::ImageScopeAttachmentDescriptor desc; - desc.m_attachmentId = diffuseProbeGrid->GetClassificationImageAttachmentId(); - desc.m_imageViewDescriptor = diffuseProbeGrid->GetRenderData()->m_probeClassificationImageViewDescriptor; + desc.m_attachmentId = diffuseProbeGrid->GetProbeDataImageAttachmentId(); + desc.m_imageViewDescriptor = diffuseProbeGrid->GetRenderData()->m_probeDataImageViewDescriptor; desc.m_loadStoreAction.m_loadAction = AZ::RHI::AttachmentLoadAction::Load; frameGraph.UseShaderAttachment(desc, RHI::ScopeAttachmentAccess::ReadWrite); diff --git a/Gems/Atom/Feature/Common/Code/Source/DiffuseGlobalIllumination/DiffuseProbeGridRelocationPass.cpp b/Gems/Atom/Feature/Common/Code/Source/DiffuseGlobalIllumination/DiffuseProbeGridRelocationPass.cpp index a1b236ed4d..fd23dadf6f 100644 --- a/Gems/Atom/Feature/Common/Code/Source/DiffuseGlobalIllumination/DiffuseProbeGridRelocationPass.cpp +++ b/Gems/Atom/Feature/Common/Code/Source/DiffuseGlobalIllumination/DiffuseProbeGridRelocationPass.cpp @@ -17,6 +17,7 @@ #include #include #include +#include #include #include #include @@ -34,7 +35,15 @@ namespace AZ DiffuseProbeGridRelocationPass::DiffuseProbeGridRelocationPass(const RPI::PassDescriptor& descriptor) : RPI::RenderPass(descriptor) { - LoadShader(); + if (!AZ_TRAIT_DIFFUSE_GI_PASSES_SUPPORTED) + { + // GI is not supported on this platform + SetEnabled(false); + } + else + { + LoadShader(); + } } void DiffuseProbeGridRelocationPass::LoadShader() @@ -130,11 +139,11 @@ namespace AZ frameGraph.UseShaderAttachment(desc, RHI::ScopeAttachmentAccess::ReadWrite); } - // probe relocation image + // probe data image { RHI::ImageScopeAttachmentDescriptor desc; - desc.m_attachmentId = diffuseProbeGrid->GetRelocationImageAttachmentId(); - desc.m_imageViewDescriptor = diffuseProbeGrid->GetRenderData()->m_probeRelocationImageViewDescriptor; + desc.m_attachmentId = diffuseProbeGrid->GetProbeDataImageAttachmentId(); + desc.m_imageViewDescriptor = diffuseProbeGrid->GetRenderData()->m_probeDataImageViewDescriptor; desc.m_loadStoreAction.m_loadAction = AZ::RHI::AttachmentLoadAction::Load; frameGraph.UseShaderAttachment(desc, RHI::ScopeAttachmentAccess::ReadWrite); diff --git a/Gems/Atom/Feature/Common/Code/Source/DiffuseGlobalIllumination/DiffuseProbeGridRenderPass.cpp b/Gems/Atom/Feature/Common/Code/Source/DiffuseGlobalIllumination/DiffuseProbeGridRenderPass.cpp index a4cc101222..f444c0c6ba 100644 --- a/Gems/Atom/Feature/Common/Code/Source/DiffuseGlobalIllumination/DiffuseProbeGridRenderPass.cpp +++ b/Gems/Atom/Feature/Common/Code/Source/DiffuseGlobalIllumination/DiffuseProbeGridRenderPass.cpp @@ -11,6 +11,7 @@ #include #include #include +#include #include #include #include @@ -27,6 +28,13 @@ namespace AZ DiffuseProbeGridRenderPass::DiffuseProbeGridRenderPass(const RPI::PassDescriptor& descriptor) : Base(descriptor) { + if (!AZ_TRAIT_DIFFUSE_GI_PASSES_SUPPORTED) + { + // GI is not supported on this platform + SetEnabled(false); + return; + } + // create the shader resource group // Note: the shader may not be available on all platforms AZStd::string shaderFilePath = "Shaders/DiffuseGlobalIllumination/DiffuseProbeGridRender.azshader"; @@ -125,38 +133,21 @@ namespace AZ frameGraph.UseShaderAttachment(desc, RHI::ScopeAttachmentAccess::Read); } - // probe relocation image + // probe data image { if (diffuseProbeGrid->GetMode() == DiffuseProbeGridMode::Baked) { - // import the relocation image now, since it is baked and therefore was not imported during the raytracing pass - [[maybe_unused]] RHI::ResultCode result = frameGraph.GetAttachmentDatabase().ImportImage(diffuseProbeGrid->GetRelocationImageAttachmentId(), diffuseProbeGrid->GetRelocationImage()); - AZ_Assert(result == RHI::ResultCode::Success, "Failed to import probeRelocationImage"); + // import the probe data image now, since it is baked and therefore was not imported during the raytracing pass + [[maybe_unused]] RHI::ResultCode result = frameGraph.GetAttachmentDatabase().ImportImage(diffuseProbeGrid->GetProbeDataImageAttachmentId(), diffuseProbeGrid->GetProbeDataImage()); + AZ_Assert(result == RHI::ResultCode::Success, "Failed to import ProbeDataImage"); } RHI::ImageScopeAttachmentDescriptor desc; - desc.m_attachmentId = diffuseProbeGrid->GetRelocationImageAttachmentId(); - desc.m_imageViewDescriptor = diffuseProbeGrid->GetRenderData()->m_probeRelocationImageViewDescriptor; + desc.m_attachmentId = diffuseProbeGrid->GetProbeDataImageAttachmentId(); + desc.m_imageViewDescriptor = diffuseProbeGrid->GetRenderData()->m_probeDataImageViewDescriptor; desc.m_loadStoreAction.m_loadAction = AZ::RHI::AttachmentLoadAction::Load; - - frameGraph.UseShaderAttachment(desc, RHI::ScopeAttachmentAccess::ReadWrite); - } - - // probe classification image - { - if (diffuseProbeGrid->GetMode() == DiffuseProbeGridMode::Baked) - { - // import the classification image now, since it is baked and therefore was not imported during the raytracing pass - [[maybe_unused]] RHI::ResultCode result = frameGraph.GetAttachmentDatabase().ImportImage(diffuseProbeGrid->GetClassificationImageAttachmentId(), diffuseProbeGrid->GetClassificationImage()); - AZ_Assert(result == RHI::ResultCode::Success, "Failed to import probeClassificationImage"); - } - - RHI::ImageScopeAttachmentDescriptor desc; - desc.m_attachmentId = diffuseProbeGrid->GetClassificationImageAttachmentId(); - desc.m_imageViewDescriptor = diffuseProbeGrid->GetRenderData()->m_probeClassificationImageViewDescriptor; - desc.m_loadStoreAction.m_loadAction = AZ::RHI::AttachmentLoadAction::Load; - - frameGraph.UseShaderAttachment(desc, RHI::ScopeAttachmentAccess::ReadWrite); + + frameGraph.UseShaderAttachment(desc, RHI::ScopeAttachmentAccess::Read); } diffuseProbeGrid->GetTextureReadback().Update(GetName()); diff --git a/Gems/Atom/Feature/Common/Code/Source/DiffuseGlobalIllumination/DiffuseProbeGridTextureReadback.cpp b/Gems/Atom/Feature/Common/Code/Source/DiffuseGlobalIllumination/DiffuseProbeGridTextureReadback.cpp index 40a85b17ec..1bf02957c5 100644 --- a/Gems/Atom/Feature/Common/Code/Source/DiffuseGlobalIllumination/DiffuseProbeGridTextureReadback.cpp +++ b/Gems/Atom/Feature/Common/Code/Source/DiffuseGlobalIllumination/DiffuseProbeGridTextureReadback.cpp @@ -76,24 +76,15 @@ namespace AZ callbackFunction = [this](const AZ::RPI::AttachmentReadback::ReadbackResult& readbackResult) { m_distanceReadbackResult = readbackResult; - m_readbackState = DiffuseProbeGridReadbackState::Relocation; + m_readbackState = DiffuseProbeGridReadbackState::ProbeData; }; break; - case DiffuseProbeGridReadbackState::Relocation: - descriptor = m_diffuseProbeGrid->GetRelocationImage()->GetDescriptor(); - attachmentId = m_diffuseProbeGrid->GetRelocationImageAttachmentId(); + case DiffuseProbeGridReadbackState::ProbeData: + descriptor = m_diffuseProbeGrid->GetProbeDataImage()->GetDescriptor(); + attachmentId = m_diffuseProbeGrid->GetProbeDataImageAttachmentId(); callbackFunction = [this](const AZ::RPI::AttachmentReadback::ReadbackResult& readbackResult) { - m_relocationReadbackResult = readbackResult; - m_readbackState = DiffuseProbeGridReadbackState::Classification; - }; - break; - case DiffuseProbeGridReadbackState::Classification: - descriptor = m_diffuseProbeGrid->GetClassificationImage()->GetDescriptor(); - attachmentId = m_diffuseProbeGrid->GetClassificationImageAttachmentId(); - callbackFunction = [this](const AZ::RPI::AttachmentReadback::ReadbackResult& readbackResult) - { - m_classificationReadbackResult = readbackResult; + m_probeDataReadbackResult = readbackResult; m_readbackState = DiffuseProbeGridReadbackState::Complete; }; break; @@ -131,8 +122,7 @@ namespace AZ m_callback( { m_irradianceReadbackResult.m_dataBuffer, m_irradianceReadbackResult.m_imageDescriptor.m_format, m_irradianceReadbackResult.m_imageDescriptor.m_size }, { m_distanceReadbackResult.m_dataBuffer, m_distanceReadbackResult.m_imageDescriptor.m_format, m_distanceReadbackResult.m_imageDescriptor.m_size }, - { m_relocationReadbackResult.m_dataBuffer, m_relocationReadbackResult.m_imageDescriptor.m_format, m_relocationReadbackResult.m_imageDescriptor.m_size }, - { m_classificationReadbackResult.m_dataBuffer, m_classificationReadbackResult.m_imageDescriptor.m_format, m_classificationReadbackResult.m_imageDescriptor.m_size }); + { m_probeDataReadbackResult.m_dataBuffer, m_probeDataReadbackResult.m_imageDescriptor.m_format, m_probeDataReadbackResult.m_imageDescriptor.m_size }); m_readbackState = DiffuseProbeGridReadbackState::Idle; m_attachmentReadback.reset(); diff --git a/Gems/Atom/Feature/Common/Code/Source/DiffuseGlobalIllumination/DiffuseProbeGridTextureReadback.h b/Gems/Atom/Feature/Common/Code/Source/DiffuseGlobalIllumination/DiffuseProbeGridTextureReadback.h index 2e13ecd9b0..4576450b3a 100644 --- a/Gems/Atom/Feature/Common/Code/Source/DiffuseGlobalIllumination/DiffuseProbeGridTextureReadback.h +++ b/Gems/Atom/Feature/Common/Code/Source/DiffuseGlobalIllumination/DiffuseProbeGridTextureReadback.h @@ -24,8 +24,7 @@ namespace AZ Initializing, Irradiance, Distance, - Relocation, - Classification, + ProbeData, Complete }; @@ -52,8 +51,7 @@ namespace AZ AZ::RPI::AttachmentReadback::ReadbackResult m_irradianceReadbackResult; AZ::RPI::AttachmentReadback::ReadbackResult m_distanceReadbackResult; - AZ::RPI::AttachmentReadback::ReadbackResult m_relocationReadbackResult; - AZ::RPI::AttachmentReadback::ReadbackResult m_classificationReadbackResult; + AZ::RPI::AttachmentReadback::ReadbackResult m_probeDataReadbackResult; // number of frames to delay before starting the texture readbacks, this allows the textures to settle static constexpr int32_t DefaultNumInitializationFrames = 50; diff --git a/Gems/Atom/Feature/Common/Code/Source/FrameCaptureSystemComponent.cpp b/Gems/Atom/Feature/Common/Code/Source/FrameCaptureSystemComponent.cpp index a9bb7271ab..5fc4fed420 100644 --- a/Gems/Atom/Feature/Common/Code/Source/FrameCaptureSystemComponent.cpp +++ b/Gems/Atom/Feature/Common/Code/Source/FrameCaptureSystemComponent.cpp @@ -29,6 +29,8 @@ #include #include +#include + #include #include @@ -50,6 +52,15 @@ namespace AZ "Sets the compression level for saving png screenshots. Valid values are from 0 to 8" ); + AZ_CVAR(int, + r_pngCompressionNumThreads, + 8, // Number of threads to use for the png r<->b channel data swap + nullptr, + ConsoleFunctorFlags::Null, + "Sets the number of threads for saving png screenshots. Valid values are from 1 to 128, although less than or equal the number of hw threads is recommended" + ); + + FrameCaptureOutputResult PngFrameCaptureOutput( const AZStd::string& outputFilePath, const AZ::RPI::AttachmentReadback::ReadbackResult& readbackResult) { @@ -65,39 +76,78 @@ namespace AZ buffer = AZStd::make_shared>(readbackResult.m_dataBuffer->size()); AZStd::copy(readbackResult.m_dataBuffer->begin(), readbackResult.m_dataBuffer->end(), buffer->begin()); - - AZ::JobCompletion jobCompletion; - const int numThreads = 8; + const int numThreads = r_pngCompressionNumThreads; const int numPixelsPerThread = static_cast(buffer->size() / numChannels / numThreads); - for (int i = 0; i < numThreads; ++i) + + AZ::TaskGraphActiveInterface* taskGraphActiveInterface = AZ::Interface::Get(); + bool taskGraphActive = taskGraphActiveInterface && taskGraphActiveInterface->IsTaskGraphActive(); + + if (taskGraphActive) { - int startPixel = i * numPixelsPerThread; + static const AZ::TaskDescriptor pngTaskDescriptor{"PngWriteOutChannelSwap", "Graphics"}; + AZ::TaskGraph taskGraph; + for (int i = 0; i < numThreads; ++i) + { + int startPixel = i * numPixelsPerThread; - AZ::Job* job = AZ::CreateJobFunction( - [&, startPixel, numPixelsPerThread]() - { - for (int pixelOffset = 0; pixelOffset < numPixelsPerThread; ++pixelOffset) + taskGraph.AddTask( + pngTaskDescriptor, + [&, startPixel]() { - if (startPixel * numChannels + numChannels < buffer->size()) + for (int pixelOffset = 0; pixelOffset < numPixelsPerThread; ++pixelOffset) { - AZStd::swap( - buffer->data()[(startPixel + pixelOffset) * numChannels], - buffer->data()[(startPixel + pixelOffset) * numChannels + 2] - ); + if (startPixel * numChannels + numChannels < buffer->size()) + { + AZStd::swap( + buffer->data()[(startPixel + pixelOffset) * numChannels], + buffer->data()[(startPixel + pixelOffset) * numChannels + 2] + ); + } } - } - }, true, nullptr); - - job->SetDependent(&jobCompletion); - job->Start(); + }); + } + AZ::TaskGraphEvent taskGraphFinishedEvent; + taskGraph.Submit(&taskGraphFinishedEvent); + taskGraphFinishedEvent.Wait(); + } + else + { + AZ::JobCompletion jobCompletion; + for (int i = 0; i < numThreads; ++i) + { + int startPixel = i * numPixelsPerThread; + + AZ::Job* job = AZ::CreateJobFunction( + [&, startPixel]() + { + for (int pixelOffset = 0; pixelOffset < numPixelsPerThread; ++pixelOffset) + { + if (startPixel * numChannels + numChannels < buffer->size()) + { + AZStd::swap( + buffer->data()[(startPixel + pixelOffset) * numChannels], + buffer->data()[(startPixel + pixelOffset) * numChannels + 2] + ); + } + } + }, true, nullptr); + + job->SetDependent(&jobCompletion); + job->Start(); + } + jobCompletion.StartAndWaitForCompletion(); } - jobCompletion.StartAndWaitForCompletion(); } Utils::PngFile image = Utils::PngFile::Create(readbackResult.m_imageDescriptor.m_size, format, *buffer); Utils::PngFile::SaveSettings saveSettings; - saveSettings.m_compressionLevel = r_pngCompressionLevel; + + if (auto console = AZ::Interface::Get(); console != nullptr) + { + console->GetCvarValue("r_pngCompressionLevel", saveSettings.m_compressionLevel); + } + // We should probably strip alpha to save space, especially for automated test screenshots. Alpha is left in to maintain // prior behavior, changing this is out of scope for the current task. Note, it would have bit of a cascade effect where // AtomSampleViewer's ScriptReporter assumes an RGBA image. diff --git a/Gems/Atom/Feature/Common/Code/Source/ImGui/ImGuiPass.cpp b/Gems/Atom/Feature/Common/Code/Source/ImGui/ImGuiPass.cpp index 0ff8d2c165..8ba92a3317 100644 --- a/Gems/Atom/Feature/Common/Code/Source/ImGui/ImGuiPass.cpp +++ b/Gems/Atom/Feature/Common/Code/Source/ImGui/ImGuiPass.cpp @@ -27,10 +27,9 @@ #include #include +#include #include -#include - namespace AZ { namespace Render @@ -68,6 +67,8 @@ namespace AZ : Base(descriptor) , AzFramework::InputChannelEventListener(AzFramework::InputChannelEventListener::GetPriorityDebugUI() - 1) // Give ImGui manager priority over the pass , AzFramework::InputTextEventListener(AzFramework::InputTextEventListener::GetPriorityDebugUI() - 1) // Give ImGui manager priority over the pass + , m_tickHandlerFrameStart(*this) + , m_tickHandlerFrameEnd(*this) { const ImGuiPassData* imguiPassData = RPI::PassUtils::GetPassData(descriptor); @@ -102,7 +103,6 @@ namespace AZ Init(); ImGui::NewFrame(); - TickBus::Handler::BusConnect(); AzFramework::InputChannelEventListener::Connect(); AzFramework::InputTextEventListener::Connect(); } @@ -127,7 +127,6 @@ namespace AZ AzFramework::InputTextEventListener::BusDisconnect(); AzFramework::InputChannelEventListener::BusDisconnect(); - TickBus::Handler::BusDisconnect(); } ImGuiContext* ImGuiPass::GetContext() @@ -140,14 +139,61 @@ namespace AZ m_drawData.push_back(drawData); } - void ImGuiPass::OnTick(float deltaTime, [[maybe_unused]] AZ::ScriptTimePoint timePoint) + ImGuiPass::TickHandlerFrameStart::TickHandlerFrameStart(ImGuiPass& imGuiPass) + : m_imGuiPass(imGuiPass) { - auto imguiContextScope = ImguiContextScope(m_imguiContext); + TickBus::Handler::BusConnect(); + } + + int ImGuiPass::TickHandlerFrameStart::GetTickOrder() + { + return AZ::ComponentTickBus::TICK_PRE_RENDER; + } + + void ImGuiPass::TickHandlerFrameStart::OnTick(float deltaTime, [[maybe_unused]] AZ::ScriptTimePoint timePoint) + { + auto imguiContextScope = ImguiContextScope(m_imGuiPass.m_imguiContext); + ImGui::NewFrame(); auto& io = ImGui::GetIO(); io.DeltaTime = deltaTime; } + ImGuiPass::TickHandlerFrameEnd::TickHandlerFrameEnd(ImGuiPass& imGuiPass) + : m_imGuiPass(imGuiPass) + { + TickBus::Handler::BusConnect(); + } + + int ImGuiPass::TickHandlerFrameEnd::GetTickOrder() + { + // ImGui::NewFrame() must be called (see ImGuiPass::TickHandlerFrameStart::OnTick) after populating + // ImGui::GetIO().NavInputs (see ImGuiPass::OnInputChannelEventFiltered), and paired with a call to + // ImGui::EndFrame() (see ImGuiPass::TickHandlerFrameEnd::OnTick); if this is not called explicitly + // then it will be called from inside ImGui::Render() (see ImGuiPass::SetupFrameGraphDependencies). + // + // ImGui::Render() gets called (indirectly) from OnSystemTick, so we cannot rely on it being paired + // with a matching call to ImGui::NewFrame() that gets called from OnTick, because OnSystemTick and + // OnTick can be called at different frequencies under some circumstances (namely from the editor). + // + // To account for this we must explicitly call ImGui::EndFrame() once a frame from OnTick to ensure + // that every call to ImGui::NewFrame() has been matched with a call to ImGui::EndFrame(), but only + // after ImGui::Render() has had the chance first (if so calling ImGui::EndFrame() again is benign). + // + // Because ImGui::Render() gets called (indirectly) from OnSystemTick, which usually happens at the + // start of every frame, we give TickHandlerFrameEnd::OnTick() the order of TICK_FIRST such that it + // will be called first on the regular tick bus, which is invoked immediately after the system tick. + // + // So while returning TICK_FIRST is incredibly counter-intuitive, hopefully that all explains why. + return AZ::ComponentTickBus::TICK_FIRST; + } + + void ImGuiPass::TickHandlerFrameEnd::OnTick([[maybe_unused]] float deltaTime, [[maybe_unused]] AZ::ScriptTimePoint timePoint) + { + auto imguiContextScope = ImguiContextScope(m_imGuiPass.m_imguiContext); + ImGui::EndFrame(); + } + bool ImGuiPass::OnInputTextEventFiltered(const AZStd::string& textUTF8) { auto imguiContextScope = ImguiContextScope(m_imguiContext); @@ -413,7 +459,11 @@ namespace AZ void ImGuiPass::Init() { + auto imguiContextScope = ImguiContextScope(m_imguiContext); auto& io = ImGui::GetIO(); + #if defined(AZ_TRAIT_IMGUI_INI_FILENAME) + io.IniFilename = AZ_TRAIT_IMGUI_INI_FILENAME; + #endif // ImGui IO Setup { @@ -421,7 +471,6 @@ namespace AZ { io.KeyMap[static_cast(i)] = static_cast(i); } - io.NavActive = true; // Touch input const AzFramework::InputDevice* inputDevice = nullptr; @@ -434,6 +483,17 @@ namespace AZ io.ConfigFlags |= ImGuiConfigFlags_IsTouchScreen; } + // Gamepad input + inputDevice = nullptr; + AzFramework::InputDeviceRequestBus::EventResult(inputDevice, + AzFramework::InputDeviceGamepad::IdForIndex0, + &AzFramework::InputDeviceRequests::GetInputDevice); + if (inputDevice && inputDevice->IsSupported()) + { + io.BackendFlags |= ImGuiBackendFlags_HasGamepad; + io.ConfigFlags |= ImGuiConfigFlags_NavEnableGamepad; + } + // Set initial display size to something reasonable (this will be updated in FramePrepare) io.DisplaySize.x = 1920; io.DisplaySize.y = 1080; @@ -571,7 +631,6 @@ namespace AZ auto imguiContextScope = ImguiContextScope(m_imguiContext); ImGui::GetIO().MouseWheel = m_lastFrameMouseWheel; m_lastFrameMouseWheel = 0.0; - ImGui::NewFrame(); } void ImGuiPass::BuildCommandListInternal(const RHI::FrameGraphExecuteContext& context) diff --git a/Gems/Atom/Feature/Common/Code/Source/ImGui/ImGuiPass.h b/Gems/Atom/Feature/Common/Code/Source/ImGui/ImGuiPass.h index 018d2d46b7..b774144ba3 100644 --- a/Gems/Atom/Feature/Common/Code/Source/ImGui/ImGuiPass.h +++ b/Gems/Atom/Feature/Common/Code/Source/ImGui/ImGuiPass.h @@ -54,7 +54,6 @@ namespace AZ //! This pass owns and manages activation of an Imgui context. class ImGuiPass : public RPI::RenderPass - , private TickBus::Handler , private AzFramework::InputChannelEventListener , private AzFramework::InputTextEventListener { @@ -76,9 +75,6 @@ namespace AZ //! Allows draw data from other imgui contexts to be rendered on this context. void RenderImguiDrawData(const ImDrawData& drawData); - // TickBus::Handler overrides... - void OnTick(float deltaTime, AZ::ScriptTimePoint timePoint) override; - // AzFramework::InputTextEventListener overrides... bool OnInputTextEventFiltered(const AZStd::string& textUTF8) override; @@ -98,6 +94,35 @@ namespace AZ void BuildCommandListInternal(const RHI::FrameGraphExecuteContext& context) override; private: + //! Class which connects to the tick handler using the tick order required at the start of an ImGui frame. + class TickHandlerFrameStart : protected TickBus::Handler + { + public: + TickHandlerFrameStart(ImGuiPass& imGuiPass); + + protected: + // TickBus::Handler overrides... + int GetTickOrder() override; + void OnTick(float deltaTime, AZ::ScriptTimePoint timePoint) override; + + private: + ImGuiPass& m_imGuiPass; + }; + + //! Class which connects to the tick handler using the tick order required at the end of an ImGui frame. + class TickHandlerFrameEnd : protected TickBus::Handler + { + public: + TickHandlerFrameEnd(ImGuiPass& imGuiPass); + + protected: + // TickBus::Handler overrides... + int GetTickOrder() override; + void OnTick(float deltaTime, AZ::ScriptTimePoint timePoint) override; + + private: + ImGuiPass& m_imGuiPass; + }; struct DrawInfo { @@ -111,6 +136,8 @@ namespace AZ void Init(); ImGuiContext* m_imguiContext = nullptr; + TickHandlerFrameStart m_tickHandlerFrameStart; + TickHandlerFrameEnd m_tickHandlerFrameEnd; RHI::Ptr m_pipelineState; Data::Instance m_shader; diff --git a/Gems/Atom/Feature/Common/Code/Source/ImageBasedLights/ImageBasedLightFeatureProcessor.cpp b/Gems/Atom/Feature/Common/Code/Source/ImageBasedLights/ImageBasedLightFeatureProcessor.cpp index 6a2eda8f22..b8d6d323c3 100644 --- a/Gems/Atom/Feature/Common/Code/Source/ImageBasedLights/ImageBasedLightFeatureProcessor.cpp +++ b/Gems/Atom/Feature/Common/Code/Source/ImageBasedLights/ImageBasedLightFeatureProcessor.cpp @@ -11,8 +11,6 @@ #include #include -#include - namespace AZ { namespace Render diff --git a/Gems/Atom/Feature/Common/Code/Source/LuxCore/LuxCoreMaterial.cpp b/Gems/Atom/Feature/Common/Code/Source/LuxCore/LuxCoreMaterial.cpp deleted file mode 100644 index e454a1c7ba..0000000000 --- a/Gems/Atom/Feature/Common/Code/Source/LuxCore/LuxCoreMaterial.cpp +++ /dev/null @@ -1,139 +0,0 @@ -/* - * Copyright (c) Contributors to the Open 3D Engine Project. - * For complete copyright and license terms please see the LICENSE at the root of this distribution. - * - * SPDX-License-Identifier: Apache-2.0 OR MIT - * - */ - - -#include -#if AZ_TRAIT_LUXCORE_SUPPORTED - -#include "LuxCoreMaterial.h" -#include - -#include -#include - -namespace AZ -{ - namespace Render - { - LuxCoreMaterial::LuxCoreMaterial(const AZ::Data::Instance& material) - { - Init(material); - } - - LuxCoreMaterial::LuxCoreMaterial(const LuxCoreMaterial &material) - { - Init(material.m_material); - } - - LuxCoreMaterial::~LuxCoreMaterial() - { - if (m_material) - { - m_material = nullptr; - } - } - - void LuxCoreMaterial::Init(const AZ::Data::Instance& material) - { - m_material = material; - m_luxCoreMaterialName = "scene.materials." + m_material->GetId().ToString(); - m_luxCoreMaterial = m_luxCoreMaterial << luxrays::Property(std::string(m_luxCoreMaterialName.data()) + ".type")("disney"); - - ParseProperty(s_pbrColorGroup, ".basecolor"); - ParseProperty(s_pbrMetallicGroup, ".metallic"); - ParseProperty(s_pbrRoughnessGroup, ".roughness"); - ParseProperty(s_pbrSpecularGroup, ".specular"); - ParseProperty(s_pbrNormalGroup, ".bumptex"); - } - - bool LuxCoreMaterial::ParseTexture(const char* group, AZStd::string propertyName) - { - AZ::RPI::MaterialPropertyIndex propertyIndex; - - propertyIndex = m_material->FindPropertyIndex(MakePbrPropertyName(group, s_pbrUseTextureProperty)); - bool useTexture = m_material->GetPropertyValue(propertyIndex); - - if (useTexture) - { - propertyIndex = m_material->FindPropertyIndex(MakePbrPropertyName(group, s_pbrTextureProperty)); - Data::Instance texture = m_material->GetPropertyValue>(propertyIndex); - - if (texture) - { - if (group == s_pbrNormalGroup) - { - AZ::Render::LuxCoreRequestsBus::Broadcast(&AZ::Render::LuxCoreRequestsBus::Events::AddTexture, texture, LuxCoreTextureType::Normal); - } - else if (group == s_pbrColorGroup) - { - AZ::Render::LuxCoreRequestsBus::Broadcast(&AZ::Render::LuxCoreRequestsBus::Events::AddTexture, texture, LuxCoreTextureType::Albedo); - } - else - { - AZ::Render::LuxCoreRequestsBus::Broadcast(&AZ::Render::LuxCoreRequestsBus::Events::AddTexture, texture, LuxCoreTextureType::Default); - } - - AZStd::string materialProperty = m_luxCoreMaterialName + propertyName; - m_luxCoreMaterial = m_luxCoreMaterial << luxrays::Property(std::string(materialProperty.data()))(std::string(texture->GetAssetId().ToString().data())); - return true; - } - } - - return false; - } - - AZ::Name LuxCoreMaterial::MakePbrPropertyName(const char* groupName, const char* propertyName) const - { - return AZ::Name{AZStd::string::format("%s.%s", groupName, propertyName)}; - } - - void LuxCoreMaterial::ParseProperty(const char* group, AZStd::string propertyName) - { - if (!ParseTexture(group, propertyName)) - { - if (group == s_pbrNormalGroup) - { - // Normal should always be texture - return; - } - else if (group == s_pbrColorGroup) - { - AZ::RPI::MaterialPropertyIndex propertyIndex; - propertyIndex = m_material->FindPropertyIndex(MakePbrPropertyName(s_pbrColorGroup, s_pbrColorProperty)); - Color color = m_material->GetPropertyValue(propertyIndex); - propertyIndex = m_material->FindPropertyIndex(MakePbrPropertyName(s_pbrColorGroup, s_pbrFactorProperty)); - float factor = m_material->GetPropertyValue(propertyIndex); - - AZStd::string materialProperty = m_luxCoreMaterialName + propertyName; - m_luxCoreMaterial = m_luxCoreMaterial << luxrays::Property(std::string(materialProperty.data()))(float(color.GetR())* factor, float(color.GetG())*factor, float(color.GetB())*factor); - } - else - { - AZ::RPI::MaterialPropertyIndex propertyIndex; - propertyIndex = m_material->FindPropertyIndex(MakePbrPropertyName(group, s_pbrFactorProperty)); - float factor = m_material->GetPropertyValue(propertyIndex); - - AZStd::string materialProperty = m_luxCoreMaterialName + propertyName; - m_luxCoreMaterial = m_luxCoreMaterial << luxrays::Property(std::string(materialProperty.data()))(factor); - } - } - } - - luxrays::Properties LuxCoreMaterial::GetLuxCoreMaterialProperties() - { - return m_luxCoreMaterial; - } - - AZ::Data::InstanceId LuxCoreMaterial::GetMaterialId() - { - return m_material->GetId(); - } - } -} - -#endif diff --git a/Gems/Atom/Feature/Common/Code/Source/LuxCore/LuxCoreMaterial.h b/Gems/Atom/Feature/Common/Code/Source/LuxCore/LuxCoreMaterial.h deleted file mode 100644 index 86c095f7fd..0000000000 --- a/Gems/Atom/Feature/Common/Code/Source/LuxCore/LuxCoreMaterial.h +++ /dev/null @@ -1,61 +0,0 @@ -/* - * Copyright (c) Contributors to the Open 3D Engine Project. - * For complete copyright and license terms please see the LICENSE at the root of this distribution. - * - * SPDX-License-Identifier: Apache-2.0 OR MIT - * - */ -#pragma once - - -#include -#if AZ_TRAIT_LUXCORE_SUPPORTED - -#include -#include "LuxCoreTexture.h" - -#include - -namespace AZ -{ - namespace Render - { - // Manage mapping between Atom PBR material and LuxCore Disney material - class LuxCoreMaterial final - { - public: - LuxCoreMaterial() = default; - LuxCoreMaterial(const AZ::Data::Instance& material); - LuxCoreMaterial(const LuxCoreMaterial &material); - ~LuxCoreMaterial(); - - luxrays::Properties GetLuxCoreMaterialProperties(); - AZ::Data::InstanceId GetMaterialId(); - private: - - static constexpr const char* s_pbrColorGroup = "baseColor"; - static constexpr const char* s_pbrMetallicGroup = "metallic"; - static constexpr const char* s_pbrRoughnessGroup = "roughness"; - static constexpr const char* s_pbrSpecularGroup = "specularF0"; - static constexpr const char* s_pbrNormalGroup = "normal"; - static constexpr const char* s_pbrOpacityGroup = "opacity"; - - static constexpr const char* s_pbrColorProperty = "color"; - static constexpr const char* s_pbrFactorProperty = "factor"; - static constexpr const char* s_pbrUseTextureProperty = "useTexture"; - static constexpr const char* s_pbrTextureProperty = "textureMap"; - - void ParseProperty(const char* group, AZStd::string propertyName); - bool ParseTexture(const char* group, AZStd::string propertyName); - AZ::Name MakePbrPropertyName(const char* groupName, const char* propertyName) const; - - void Init(const AZ::Data::Instance& material); - - AZStd::string m_luxCoreMaterialName; - luxrays::Properties m_luxCoreMaterial; - - AZ::Data::Instance m_material = nullptr; - }; - } -} -#endif diff --git a/Gems/Atom/Feature/Common/Code/Source/LuxCore/LuxCoreMesh.cpp b/Gems/Atom/Feature/Common/Code/Source/LuxCore/LuxCoreMesh.cpp deleted file mode 100644 index 34272f8cbf..0000000000 --- a/Gems/Atom/Feature/Common/Code/Source/LuxCore/LuxCoreMesh.cpp +++ /dev/null @@ -1,135 +0,0 @@ -/* - * Copyright (c) Contributors to the Open 3D Engine Project. - * For complete copyright and license terms please see the LICENSE at the root of this distribution. - * - * SPDX-License-Identifier: Apache-2.0 OR MIT - * - */ - - -#include -#if AZ_TRAIT_LUXCORE_SUPPORTED - -#include "LuxCoreMesh.h" -#include - -namespace AZ -{ - namespace Render - { - LuxCoreMesh::LuxCoreMesh(AZ::Data::Asset modelAsset) - { - Init(modelAsset); - } - - LuxCoreMesh::LuxCoreMesh(const LuxCoreMesh &model) - { - Init(model.m_modelAsset); - } - - LuxCoreMesh::~LuxCoreMesh() - { - if (m_position) - { - delete m_position; - m_position = nullptr; - } - - if (m_normal) - { - delete m_normal; - m_normal = nullptr; - } - - if (m_uv) - { - delete m_uv; - m_uv = nullptr; - } - - if (m_index) - { - delete m_index; - m_index = nullptr; - } - - if (m_modelAsset) - { - m_modelAsset.Reset(); - } - } - - void LuxCoreMesh::Init(AZ::Data::Asset modelAsset) - { - m_modelAsset = modelAsset; - // [TODO ATOM-3547] Multiple meshes handling - AZ::RPI::ModelLodAsset::Mesh mesh = m_modelAsset->GetLodAssets()[0]->GetMeshes()[0]; - - // index data - AZStd::array_view indexBuffer = mesh.GetIndexBufferAssetView().GetBufferAsset()->GetBuffer(); - m_index = luxcore::Scene::AllocTrianglesBuffer(mesh.GetIndexCount() / 3); - memcpy(m_index, indexBuffer.data(), indexBuffer.size()); - - // vertices data - for (AZ::RPI::ModelLodAsset::Mesh::StreamBufferInfo streamBufferInfo : mesh.GetStreamBufferInfoList()) - { - AZStd::array_view dataBuffer = streamBufferInfo.m_bufferAssetView.GetBufferAsset()->GetBuffer(); - - if (streamBufferInfo.m_semantic == RHI::ShaderSemantic{ "POSITION" }) - { - m_position = luxcore::Scene::AllocVerticesBuffer(mesh.GetVertexCount()); - memcpy(m_position, dataBuffer.data(), dataBuffer.size()); - } - else if (streamBufferInfo.m_semantic == RHI::ShaderSemantic{ "NORMAL" }) - { - m_normal = new float[mesh.GetVertexCount() * 3]; - memcpy(m_normal, dataBuffer.data(), dataBuffer.size()); - } - else if (streamBufferInfo.m_semantic == RHI::ShaderSemantic{ "UV", 0 }) - { - m_uv = new float[mesh.GetVertexCount() * 2]; - memcpy(m_uv, dataBuffer.data(), dataBuffer.size()); - } - } - } - - - uint32_t LuxCoreMesh::GetVertexCount() - { - // [TODO ATOM-3547] Multiple meshes handling - return m_modelAsset->GetLodAssets()[0]->GetMeshes()[0].GetVertexCount(); - } - - uint32_t LuxCoreMesh::GetTriangleCount() - { - // [TODO ATOM-3547] Multiple meshes handling - return (m_modelAsset->GetLodAssets()[0]->GetMeshes()[0].GetIndexCount() / 3); - } - - AZ::Data::AssetId LuxCoreMesh::GetMeshId() - { - return m_modelAsset->GetId(); - } - - const float* LuxCoreMesh::GetPositionData() - { - return m_position; - } - - const float* LuxCoreMesh::GetNormalData() - { - return m_normal; - } - - const float* LuxCoreMesh::GetUVData() - { - return m_uv; - } - - const unsigned int* LuxCoreMesh::GetIndexData() - { - return m_index; - } - } -} -#endif diff --git a/Gems/Atom/Feature/Common/Code/Source/LuxCore/LuxCoreMesh.h b/Gems/Atom/Feature/Common/Code/Source/LuxCore/LuxCoreMesh.h deleted file mode 100644 index 597049f849..0000000000 --- a/Gems/Atom/Feature/Common/Code/Source/LuxCore/LuxCoreMesh.h +++ /dev/null @@ -1,49 +0,0 @@ -/* - * Copyright (c) Contributors to the Open 3D Engine Project. - * For complete copyright and license terms please see the LICENSE at the root of this distribution. - * - * SPDX-License-Identifier: Apache-2.0 OR MIT - * - */ -#pragma once - - -#include -#if AZ_TRAIT_LUXCORE_SUPPORTED - -#include - -namespace AZ -{ - namespace Render - { - // Extract vertex and index data from source model - class LuxCoreMesh final - { - public: - LuxCoreMesh() = default; - LuxCoreMesh(AZ::Data::Asset modelAsset); - LuxCoreMesh(const LuxCoreMesh &mesh); - ~LuxCoreMesh(); - - AZ::Data::AssetId GetMeshId(); - const float* GetPositionData(); - const float* GetNormalData(); - const float* GetUVData(); - const unsigned int* GetIndexData(); - - uint32_t GetVertexCount(); - uint32_t GetTriangleCount(); - - private: - void Init(AZ::Data::Asset modelAsset); - - float* m_position = nullptr; - float* m_normal = nullptr; - float* m_uv = nullptr; - unsigned int* m_index = nullptr; - AZ::Data::Asset m_modelAsset; - }; - } -} -#endif diff --git a/Gems/Atom/Feature/Common/Code/Source/LuxCore/LuxCoreObject.cpp b/Gems/Atom/Feature/Common/Code/Source/LuxCore/LuxCoreObject.cpp deleted file mode 100644 index ddeb61e394..0000000000 --- a/Gems/Atom/Feature/Common/Code/Source/LuxCore/LuxCoreObject.cpp +++ /dev/null @@ -1,57 +0,0 @@ -/* - * Copyright (c) Contributors to the Open 3D Engine Project. - * For complete copyright and license terms please see the LICENSE at the root of this distribution. - * - * SPDX-License-Identifier: Apache-2.0 OR MIT - * - */ - - -#include -#if AZ_TRAIT_LUXCORE_SUPPORTED - -#include "LuxCoreObject.h" -#include - -namespace AZ -{ - namespace Render - { - LuxCoreObject::LuxCoreObject(AZStd::string modelAssetId, AZStd::string materialInstanceId) - { - Init(modelAssetId, materialInstanceId); - } - - LuxCoreObject::LuxCoreObject(const LuxCoreObject &object) - { - Init(object.m_modelAssetId, object.m_materialInstanceId); - } - - LuxCoreObject::~LuxCoreObject() - { - } - - luxrays::Properties LuxCoreObject::GetLuxCoreObjectProperties() - { - return m_luxCoreObject; - } - - void LuxCoreObject::Init(AZStd::string modelAssetId, AZStd::string materialInstanceId) - { - m_modelAssetId = modelAssetId; - m_materialInstanceId = materialInstanceId; - - static std::atomic_int ObjectId { 0 }; - const int localObjectId = ObjectId++; - - m_luxCoreObjectName = "scene.objects." + AZStd::to_string(localObjectId); - AZStd::string shapePropertyName = m_luxCoreObjectName + ".shape"; - AZStd::string materialPropertyName = m_luxCoreObjectName + ".material"; - - m_luxCoreObject = m_luxCoreObject << luxrays::Property(std::string(shapePropertyName.data()))(std::string(modelAssetId.data())); - m_luxCoreObject = m_luxCoreObject << luxrays::Property(std::string(materialPropertyName.data()))(std::string(materialInstanceId.data())); - } - }; -}; - -#endif diff --git a/Gems/Atom/Feature/Common/Code/Source/LuxCore/LuxCoreObject.h b/Gems/Atom/Feature/Common/Code/Source/LuxCore/LuxCoreObject.h deleted file mode 100644 index 6529b0487b..0000000000 --- a/Gems/Atom/Feature/Common/Code/Source/LuxCore/LuxCoreObject.h +++ /dev/null @@ -1,41 +0,0 @@ -/* - * Copyright (c) Contributors to the Open 3D Engine Project. - * For complete copyright and license terms please see the LICENSE at the root of this distribution. - * - * SPDX-License-Identifier: Apache-2.0 OR MIT - * - */ -#pragma once - -#include -#if AZ_TRAIT_LUXCORE_SUPPORTED - -#include -#include - -namespace AZ -{ - namespace Render - { - // Object holds mesh and material in LuxCore - class LuxCoreObject final - { - public: - LuxCoreObject(AZStd::string modelAssetId, AZStd::string materialInstanceId); - LuxCoreObject(const LuxCoreObject &object); - ~LuxCoreObject(); - - luxrays::Properties GetLuxCoreObjectProperties(); - - private: - - void Init(AZStd::string modelAssetId, AZStd::string materialInstanceId); - AZStd::string m_luxCoreObjectName; - luxrays::Properties m_luxCoreObject; - - AZStd::string m_modelAssetId; - AZStd::string m_materialInstanceId; - }; - }; -}; -#endif diff --git a/Gems/Atom/Feature/Common/Code/Source/LuxCore/LuxCoreRenderer.cpp b/Gems/Atom/Feature/Common/Code/Source/LuxCore/LuxCoreRenderer.cpp deleted file mode 100644 index c753079d5b..0000000000 --- a/Gems/Atom/Feature/Common/Code/Source/LuxCore/LuxCoreRenderer.cpp +++ /dev/null @@ -1,309 +0,0 @@ -/* - * Copyright (c) Contributors to the Open 3D Engine Project. - * For complete copyright and license terms please see the LICENSE at the root of this distribution. - * - * SPDX-License-Identifier: Apache-2.0 OR MIT - * - */ -#include -#if AZ_TRAIT_LUXCORE_SUPPORTED - -#include "LuxCoreRenderer.h" - -#include -#include -#include -#include - -#include - -namespace LuxCoreUI -{ - void LaunchLuxCoreUI(const AZStd::string& luxCoreExeFullPath, const AZStd::string& commandLine); -} - -namespace AZ -{ - namespace Render - { - LuxCoreRenderer::LuxCoreRenderer() - { - LuxCoreRequestsBus::Handler::BusConnect(); - } - - LuxCoreRenderer::~LuxCoreRenderer() - { - LuxCoreRequestsBus::Handler::BusDisconnect(); - ClearLuxCore(); - } - - void LuxCoreRenderer::SetCameraEntityID(AZ::EntityId id) - { - m_cameraEntityId = id; - } - - void LuxCoreRenderer::AddMesh(Data::Asset modelAsset) - { - AZStd::string meshId = modelAsset->GetId().ToString(); - m_meshs.emplace(AZStd::piecewise_construct_t{}, - AZStd::forward_as_tuple(meshId), - AZStd::forward_as_tuple(modelAsset)); - } - - void LuxCoreRenderer::AddMaterial(Data::Instance material) - { - AZStd::string materialId = material->GetId().ToString(); - m_materials.emplace(AZStd::piecewise_construct_t{}, - AZStd::forward_as_tuple(materialId), - AZStd::forward_as_tuple(material)); - } - - void LuxCoreRenderer::AddTexture(Data::Instance image, LuxCoreTextureType type) - { - AZStd::string textureId = image->GetAssetId().ToString(); - m_textures.emplace(AZStd::piecewise_construct_t{}, - AZStd::forward_as_tuple(textureId), - AZStd::forward_as_tuple(image, type)); - } - - void LuxCoreRenderer::AddObject(AZ::Data::Asset modelAsset, AZ::Data::InstanceId materialInstanceId) - { - m_objects.emplace_back(modelAsset->GetId().ToString(), materialInstanceId.ToString()); - } - - bool LuxCoreRenderer::CheckTextureStatus() - { - for (auto it = m_textures.begin(); it != m_textures.end(); ++it) - { - if (!it->second.IsTextureReady()) - { - return false; - } - } - return true; - } - - void LuxCoreRenderer::ClearLuxCore() - { - m_meshs.clear(); - m_materials.clear(); - m_textures.clear(); - m_objects.clear(); - } - - void LuxCoreRenderer::ClearObject() - { - m_objects.clear(); - } - - void LuxCoreRenderer::RenderInLuxCore() - { - luxcore::Init(); - luxcore::Scene *luxCoreScene = luxcore::Scene::Create(); - - const char* folderName = "luxcoredata"; - if (!AZ::IO::FileIOBase::GetInstance()->Exists(folderName)) - { - AZ::IO::FileIOBase::GetInstance()->CreatePath(folderName); - } - - char resolvedPath[1024]; - AZ::IO::FileIOBase::GetInstance()->ResolvePath(folderName, resolvedPath, 1024); - - // Camera transform - if (!m_cameraEntityId.IsValid()) - { - AZ_Assert(false, "Please set camera entity id"); - return; - } - - AZ::Transform cameraTransform = AZ::Transform::CreateIdentity(); - AZ::Vector4 cameraUp, cameraFwd, cameraOrig, cameraTarget; - AZ::TransformBus::EventResult(cameraTransform, m_cameraEntityId, &AZ::TransformBus::Events::GetWorldTM); - - const AZ::Matrix4x4 rotationMatrix = AZ::Matrix4x4::CreateFromTransform(cameraTransform); - - cameraFwd = rotationMatrix.GetColumn(1); - cameraUp = rotationMatrix.GetColumn(2); - cameraOrig = rotationMatrix.GetColumn(3); - cameraTarget = cameraOrig + cameraFwd; - - // Camera parameter - float nearClip, farClip, fieldOfView; - Camera::CameraRequestBus::EventResult(fieldOfView, m_cameraEntityId, &Camera::CameraRequestBus::Events::GetFovDegrees); - Camera::CameraRequestBus::EventResult(nearClip, m_cameraEntityId, &Camera::CameraRequestBus::Events::GetNearClipDistance); - Camera::CameraRequestBus::EventResult(farClip, m_cameraEntityId, &Camera::CameraRequestBus::Events::GetFarClipDistance); - - // Set Camera - luxCoreScene->Parse( - luxrays::Property("scene.camera.lookat.orig")((float)cameraOrig.GetX(), (float)cameraOrig.GetY(), (float)cameraOrig.GetZ()) << - luxrays::Property("scene.camera.lookat.target")((float)cameraTarget.GetX(), (float)cameraTarget.GetY(), (float)cameraTarget.GetZ()) << - luxrays::Property("scene.camera.up")((float)cameraUp.GetX(), (float)cameraUp.GetY(), (float)cameraUp.GetZ()) << - luxrays::Property("scene.camera.fieldofview")(fieldOfView) << - luxrays::Property("scene.camera.cliphither")(nearClip) << - luxrays::Property("scene.camera.clipyon")(farClip) << - luxrays::Property("scene.camera.type")("perspective")); - - // Set Texture - try { - for (auto it = m_textures.begin(); it != m_textures.end(); ++it) - { - if (it->second.GetRawDataPointer() != nullptr) - { - if (it->second.IsIBLTexture()) - { - luxCoreScene->DefineImageMap(std::string(it->first.data()), static_cast(it->second.GetRawDataPointer()), 1.f, it->second.GetTextureChannels(), it->second.GetTextureWidth(), it->second.GetTextureHeight()); - } - else - { - luxCoreScene->DefineImageMap(std::string(it->first.data()), static_cast(it->second.GetRawDataPointer()), 1.f, it->second.GetTextureChannels(), it->second.GetTextureWidth(), it->second.GetTextureHeight()); - } - - luxCoreScene->Parse( - - it->second.GetLuxCoreTextureProperties() - ); - } - else - { - AZ_Assert(false, "texture data is nullptr!!!"); - return; - } - } - } - catch (const std::runtime_error& e) - { - (void)e; - AZ_Assert(false, "%s", e.what()); - return; - } - catch (const std::exception& e) - { - (void)e; - AZ_Assert(false, "%s", e.what()); - return; - } - - - // Set Material - try { - for (auto it = m_materials.begin(); it != m_materials.end(); ++it) - { - luxCoreScene->Parse( - it->second.GetLuxCoreMaterialProperties() - ); - } - } - catch (const std::exception& e) - { - (void)e; - AZ_Assert(false, "%s", e.what()); - return; - } - - // Set Model - try { - for (auto it = m_meshs.begin(); it != m_meshs.end(); ++it) - { - luxCoreScene->DefineMesh(std::string(it->second.GetMeshId().ToString().data()), - it->second.GetVertexCount(), - it->second.GetTriangleCount(), - const_cast(it->second.GetPositionData()), - const_cast(it->second.GetIndexData()), - const_cast(it->second.GetNormalData()), - const_cast(it->second.GetUVData()), - NULL, - NULL); - } - } - catch (const std::exception& e) - { - (void)e; - AZ_Assert(false, "%s", e.what()); - return; - } - - // Objects - try { - for (auto it = m_objects.begin(); it != m_objects.end(); ++it) - { - luxCoreScene->Parse( - it->GetLuxCoreObjectProperties() - ); - } - } - catch (const std::exception& e) - { - (void)e; - AZ_Assert(false, "%s", e.what()); - return; - } - - // RenderConfig - luxcore::RenderConfig *config = luxcore::RenderConfig::Create( - luxrays::Property("path.pathdepth.total")(7) << - luxrays::Property("path.pathdepth.diffuse")(5) << - luxrays::Property("path.pathdepth.glossy")(5) << - luxrays::Property("path.pathdepth.specular")(6) << - luxrays::Property("path.hybridbackforward.enable")(0) << - luxrays::Property("path.hybridbackforward.partition")(0) << - luxrays::Property("path.hybridbackforward.glossinessthreshold ")(0.05) << - luxrays::Property("path.forceblackbackground.enable")(0) << - luxrays::Property("film.noiseestimation.warmup")(8) << - luxrays::Property("film.noiseestimation.step")(32) << - luxrays::Property("film.width")(1920) << - luxrays::Property("film.height")(1080) << - luxrays::Property("film.filter.type")("BLACKMANHARRIS") << - luxrays::Property("film.filter.width")(1.5) << - luxrays::Property("film.imagepipelines.0.0.type")("NOP") << - luxrays::Property("film.imagepipelines.0.1.type")("GAMMA_CORRECTION") << - luxrays::Property("film.imagepipelines.0.1.value")(2.2f) << - luxrays::Property("film.imagepipelines.0.radiancescales.0.enabled")(1) << - luxrays::Property("film.imagepipelines.0.radiancescales.0.globalscale")(1) << - luxrays::Property("film.imagepipelines.0.radiancescales.0.rgbscale")(1, 1, 1) << - luxrays::Property("film.outputs.0.type")("RGB_IMAGEPIPELINE") << - luxrays::Property("film.outputs.0.index")(0) << - luxrays::Property("film.outputs.0.filename")("RGB_IMAGEPIPELINE_0.png") << - luxrays::Property("sampler.type")("SOBOL") << - luxrays::Property("renderengine.type")("PATHCPU") << - luxrays::Property("renderengine.seed")(1) << - luxrays::Property("lightstrategy.type")("LOG_POWER") << - luxrays::Property("scene.epsilon.min")(9.9999997473787516e-06f) << - luxrays::Property("scene.epsilon.max")(0.10000000149011612f) << - luxrays::Property("scene.epsilon.max")(0.10000000149011612f) << - luxrays::Property("batch.haltthreshold")(0.01953125f) << - luxrays::Property("batch.haltthreshold.warmup")(64) << - luxrays::Property("batch.haltthreshold.step")(64) << - luxrays::Property("batch.haltthreshold.filter.enable")(1) << - luxrays::Property("batch.haltthreshold.stoprendering.enable")(1) << - luxrays::Property("batch.haltspp")(0) << - luxrays::Property("batch.halttime")(0) << - luxrays::Property("filesaver.renderengine.type")("PATHCPU") << - luxrays::Property("filesaver.format")("TXT"), - luxCoreScene); - - - // Export - try { - config->Export(resolvedPath); - } - catch (const std::runtime_error& e) - { - (void)e; - AZ_Assert(false, "%s", e.what()); - return; - } - - // Run luxcoreui.exe - AZStd::string luxCoreExeFullPath; - AzFramework::ApplicationRequests::Bus::BroadcastResult(luxCoreExeFullPath, &AzFramework::ApplicationRequests::GetAppRoot); - luxCoreExeFullPath = luxCoreExeFullPath + AZ_TRAIT_LUXCORE_EXEPATH; - AzFramework::StringFunc::Path::Normalize(luxCoreExeFullPath); - - AZStd::string commandLine = "-o " + AZStd::string(resolvedPath) + "/render.cfg"; - - LuxCoreUI::LaunchLuxCoreUI(luxCoreExeFullPath, commandLine); - } - } -} -#endif diff --git a/Gems/Atom/Feature/Common/Code/Source/LuxCore/LuxCoreRenderer.h b/Gems/Atom/Feature/Common/Code/Source/LuxCore/LuxCoreRenderer.h deleted file mode 100644 index 9c9f8039f5..0000000000 --- a/Gems/Atom/Feature/Common/Code/Source/LuxCore/LuxCoreRenderer.h +++ /dev/null @@ -1,56 +0,0 @@ -/* - * Copyright (c) Contributors to the Open 3D Engine Project. - * For complete copyright and license terms please see the LICENSE at the root of this distribution. - * - * SPDX-License-Identifier: Apache-2.0 OR MIT - * - */ -#pragma once - -#include -#if AZ_TRAIT_LUXCORE_SUPPORTED - -#include -#include "LuxCoreMaterial.h" -#include "LuxCoreMesh.h" -#include "LuxCoreObject.h" -#include "LuxCoreTexture.h" - -namespace AZ -{ - namespace Render - { - // Hold all converted data, write scene and render file to disk when command received - // Can be extend to do real-time rendering in the future - class LuxCoreRenderer - : public LuxCoreRequestsBus::Handler - { - public: - LuxCoreRenderer(); - ~LuxCoreRenderer(); - - //////////////////////////////////////////////////////////////////////// - // LuxCoreRequestsBus - void SetCameraEntityID(AZ::EntityId id); - void AddMesh( Data::Asset modelAsset); - void AddMaterial(Data::Instance material); - void AddTexture(Data::Instance image, LuxCoreTextureType type); - void AddObject(AZ::Data::Asset modelAsset, AZ::Data::InstanceId materialInstanceId); - bool CheckTextureStatus(); - void RenderInLuxCore(); - void ClearLuxCore(); - void ClearObject(); - ///////////////////////////////////////////////////////////////////////// - - private: - AZ::EntityId m_cameraEntityId; - AZ::Transform m_cameraTransform; - - AZStd::unordered_map m_meshs; - AZStd::unordered_map m_materials; - AZStd::unordered_map m_textures; - AZStd::vector m_objects; - }; - } -} -#endif diff --git a/Gems/Atom/Feature/Common/Code/Source/LuxCore/LuxCoreTexture.cpp b/Gems/Atom/Feature/Common/Code/Source/LuxCore/LuxCoreTexture.cpp deleted file mode 100644 index 1fd8f0d91c..0000000000 --- a/Gems/Atom/Feature/Common/Code/Source/LuxCore/LuxCoreTexture.cpp +++ /dev/null @@ -1,158 +0,0 @@ -/* - * Copyright (c) Contributors to the Open 3D Engine Project. - * For complete copyright and license terms please see the LICENSE at the root of this distribution. - * - * SPDX-License-Identifier: Apache-2.0 OR MIT - * - */ - - -#include -#if AZ_TRAIT_LUXCORE_SUPPORTED - -#include "LuxCoreTexture.h" -#include -#include - -namespace AZ -{ - namespace Render - { - LuxCoreTexture::LuxCoreTexture(AZ::Data::Instance image, LuxCoreTextureType type) - { - Init(image, type); - } - - LuxCoreTexture::LuxCoreTexture(const LuxCoreTexture &texture) - { - Init(texture.m_texture, texture.m_type); - } - - LuxCoreTexture::~LuxCoreTexture() - { - if (m_rtPipeline) - { - m_rtPipeline->RemoveFromScene(); - m_rtPipeline = nullptr; - } - - if (m_texture) - { - m_texture = nullptr; - } - } - - void LuxCoreTexture::Init(AZ::Data::Instance image, LuxCoreTextureType type) - { - m_textureAssetId = image->GetAssetId(); - m_texture = image; - m_type = type; - - if (m_type == LuxCoreTextureType::IBL) - { - m_luxCoreTextureName = "scene.lights." + m_textureAssetId.ToString(); - m_luxCoreTexture = m_luxCoreTexture << luxrays::Property(std::string(m_luxCoreTextureName.data()) + ".type")("infinite"); - } - else - { - m_luxCoreTextureName = "scene.textures." + m_textureAssetId.ToString(); - m_luxCoreTexture = m_luxCoreTexture << luxrays::Property(std::string(m_luxCoreTextureName.data()) + ".type")("imagemap"); - } - - m_luxCoreTexture = m_luxCoreTexture << luxrays::Property(std::string(m_luxCoreTextureName.data()) + ".file")(std::string(m_textureAssetId.ToString().data())); - m_textureChannels = 4; - - AddRenderTargetPipeline(); - } - - void LuxCoreTexture::AddRenderTargetPipeline() - { - // Render Texture pipeline - AZ::RPI::RenderPipelineDescriptor pipelineDesc; - pipelineDesc.m_name = m_textureAssetId.ToString(); - pipelineDesc.m_rootPassTemplate = "LuxCoreTexturePassTemplate"; - m_rtPipeline = AZ::RPI::RenderPipeline::CreateRenderPipeline(pipelineDesc); - - // Set source texture - AZ::RPI::Pass* rootPass = m_rtPipeline->GetRootPass().get(); - AZ_Assert(rootPass != nullptr, "Failed to get root pass for render target pipeline"); - LuxCoreTexturePass* parentPass = static_cast(rootPass); - - // Setup call back to save read back data to m_textureData - RPI::AttachmentReadback::CallbackFunction callback = - [this](const AZ::RPI::AttachmentReadback::ReadbackResult& readbackResult) - { - RHI::ImageSubresourceLayout imageLayout = RHI::GetImageSubresourceLayout(readbackResult.m_imageDescriptor.m_size, - readbackResult.m_imageDescriptor.m_format); - m_textureData.resize_no_construct(imageLayout.m_bytesPerImage); - memcpy(m_textureData.data(), readbackResult.m_dataBuffer->data(), imageLayout.m_bytesPerImage); - - m_textureReadbackComplete = true; - }; - parentPass->SetReadbackCallback(callback); - - switch (m_type) - { - case LuxCoreTextureType::Default: - // assume a 8 bits linear texture - parentPass->SetSourceTexture(m_texture, RHI::Format::R8G8B8A8_UNORM); - break; - case LuxCoreTextureType::IBL: - // assume its a float image if its an IBL source - parentPass->SetSourceTexture(m_texture, RHI::Format::R32G32B32A32_FLOAT); - break; - case LuxCoreTextureType::Albedo: - // albedo texture is in sRGB space - parentPass->SetSourceTexture(m_texture, RHI::Format::R8G8B8A8_UNORM_SRGB); - break; - case LuxCoreTextureType::Normal: - // Normal texture needs special handling - parentPass->SetIsNormalTexture(true); - parentPass->SetSourceTexture(m_texture, RHI::Format::R8G8B8A8_UNORM); - break; - } - - const auto mainScene = AZ::RPI::RPISystemInterface::Get()->GetSceneByName(AZ::Name("RPI")); - if (mainScene) - { - mainScene->AddRenderPipeline(m_rtPipeline); - } - } - - bool LuxCoreTexture::IsIBLTexture() - { - return m_type == LuxCoreTextureType::IBL; - } - - void* LuxCoreTexture::GetRawDataPointer() - { - return (void*)m_textureData.data(); - } - - unsigned int LuxCoreTexture::GetTextureWidth() - { - return m_texture->GetRHIImage()->GetDescriptor().m_size.m_width; - } - - unsigned int LuxCoreTexture::GetTextureHeight() - { - return m_texture->GetRHIImage()->GetDescriptor().m_size.m_height; - } - - unsigned int LuxCoreTexture::GetTextureChannels() - { - return m_textureChannels; - } - - luxrays::Properties LuxCoreTexture::GetLuxCoreTextureProperties() - { - return m_luxCoreTexture; - } - - bool LuxCoreTexture::IsTextureReady() - { - return m_textureReadbackComplete; - } - } -} -#endif diff --git a/Gems/Atom/Feature/Common/Code/Source/LuxCore/LuxCoreTexture.h b/Gems/Atom/Feature/Common/Code/Source/LuxCore/LuxCoreTexture.h deleted file mode 100644 index abfb7cfe13..0000000000 --- a/Gems/Atom/Feature/Common/Code/Source/LuxCore/LuxCoreTexture.h +++ /dev/null @@ -1,62 +0,0 @@ -/* - * Copyright (c) Contributors to the Open 3D Engine Project. - * For complete copyright and license terms please see the LICENSE at the root of this distribution. - * - * SPDX-License-Identifier: Apache-2.0 OR MIT - * - */ -#pragma once - - -#include -#if AZ_TRAIT_LUXCORE_SUPPORTED - -#include -#include -#include -#include - -namespace AZ -{ - namespace Render - { - // Build a pipeline to get raw data from runtime texture - class LuxCoreTexture final - { - public: - LuxCoreTexture() = default; - LuxCoreTexture( AZ::Data::Instance image, LuxCoreTextureType type); - LuxCoreTexture(const LuxCoreTexture &texture); - ~LuxCoreTexture(); - - void* GetRawDataPointer(); - - unsigned int GetTextureWidth(); - unsigned int GetTextureHeight(); - unsigned int GetTextureChannels(); - - void Init(AZ::Data::Instance image, LuxCoreTextureType type); - - void AddRenderTargetPipeline(); - luxrays::Properties GetLuxCoreTextureProperties(); - bool IsIBLTexture(); - bool IsTextureReady(); - - private: - AZStd::string m_luxCoreTextureName; - luxrays::Properties m_luxCoreTexture; - - AZ::RPI::RenderPipelinePtr m_rtPipeline = nullptr; - - AZStd::vector m_textureData; - AZ::Data::Instance m_texture; - unsigned int m_textureChannels = 4; - - Data::AssetId m_textureAssetId; - LuxCoreTextureType m_type = LuxCoreTextureType::Default; - - bool m_textureReadbackComplete = false; - }; - } -} -#endif diff --git a/Gems/Atom/Feature/Common/Code/Source/LuxCore/LuxCoreTexturePass.cpp b/Gems/Atom/Feature/Common/Code/Source/LuxCore/LuxCoreTexturePass.cpp deleted file mode 100644 index 721e8b0c90..0000000000 --- a/Gems/Atom/Feature/Common/Code/Source/LuxCore/LuxCoreTexturePass.cpp +++ /dev/null @@ -1,90 +0,0 @@ -/* - * Copyright (c) Contributors to the Open 3D Engine Project. - * For complete copyright and license terms please see the LICENSE at the root of this distribution. - * - * SPDX-License-Identifier: Apache-2.0 OR MIT - * - */ - -#include -#include - -#include - -namespace AZ -{ - namespace Render - { - RPI::Ptr LuxCoreTexturePass::Create(const RPI::PassDescriptor& descriptor) - { - RPI::Ptr pass = aznew LuxCoreTexturePass(descriptor); - return pass; - } - - LuxCoreTexturePass::LuxCoreTexturePass(const RPI::PassDescriptor& descriptor) - : ParentPass(descriptor) - { - RPI::PassSystemInterface* passSystem = RPI::PassSystemInterface::Get(); - - // Create render target pass - RPI::PassRequest request; - request.m_templateName = "RenderTextureTemplate"; - request.m_passName = "RenderTarget"; - m_renderTargetPass = passSystem->CreatePassFromRequest(&request); - AZ_Assert(m_renderTargetPass, "render target pass is invalid"); - - // Create readback - m_readback = AZStd::make_shared(AZ::RHI::ScopeId{ Uuid::CreateRandom().ToString() }); - } - - LuxCoreTexturePass::~LuxCoreTexturePass() - { - m_renderTargetPass = nullptr; - m_readback = nullptr; - } - - void LuxCoreTexturePass::SetSourceTexture(AZ::Data::Instance image, RHI::Format format) - { - static_cast(m_renderTargetPass.get())->SetPassSrgImage(image, format); - } - - void LuxCoreTexturePass::CreateChildPassesInternal() - { - AddChild(m_renderTargetPass); - } - - void LuxCoreTexturePass::BuildInternal() - { - ParentPass::BuildInternal(); - } - - void LuxCoreTexturePass::FrameBeginInternal(FramePrepareParams params) - { - if (!m_attachmentReadbackComplete && m_readback != nullptr) - { - // Set up read back attachment before children prepare - if (m_readback->IsReady()) - { - if (m_renderTargetPass) - { - m_attachmentReadbackComplete = m_renderTargetPass->ReadbackAttachment(m_readback, AZ::Name("RenderTargetOutput")); - } - } - } - ParentPass::FrameBeginInternal(params); - } - - void LuxCoreTexturePass::SetIsNormalTexture(bool isNormal) - { - static_cast(m_renderTargetPass.get())->InitShaderVariant(isNormal); - } - - void LuxCoreTexturePass::SetReadbackCallback(RPI::AttachmentReadback::CallbackFunction callbackFunciton) - { - if (m_readback != nullptr) - { - m_readback->SetCallback(callbackFunciton); - } - } - } -} diff --git a/Gems/Atom/Feature/Common/Code/Source/LuxCore/RenderTexturePass.cpp b/Gems/Atom/Feature/Common/Code/Source/LuxCore/RenderTexturePass.cpp deleted file mode 100644 index c890da596b..0000000000 --- a/Gems/Atom/Feature/Common/Code/Source/LuxCore/RenderTexturePass.cpp +++ /dev/null @@ -1,90 +0,0 @@ -/* - * Copyright (c) Contributors to the Open 3D Engine Project. - * For complete copyright and license terms please see the LICENSE at the root of this distribution. - * - * SPDX-License-Identifier: Apache-2.0 OR MIT - * - */ - -#include -#include - -namespace AZ -{ - namespace Render - { - RPI::Ptr RenderTexturePass::Create(const RPI::PassDescriptor& descriptor) - { - RPI::Ptr pass = aznew RenderTexturePass(descriptor); - return pass; - } - - RenderTexturePass::RenderTexturePass(const RPI::PassDescriptor& descriptor) - : FullscreenTrianglePass(descriptor) - { - m_textureIndex = m_shaderResourceGroup->FindShaderInputImageIndex(Name("m_sourceTexture")); - } - - RenderTexturePass::~RenderTexturePass() - { - } - - void RenderTexturePass::SetPassSrgImage(AZ::Data::Instance image, RHI::Format format) - { - m_attachmentSize = image->GetRHIImage()->GetDescriptor().m_size; - m_attachmentFormat = format; - m_shaderResourceGroup->SetImage(m_textureIndex, image); - QueueForBuildAndInitialization(); - } - - void RenderTexturePass::BuildInternal() - { - UpdataAttachment(); - FullscreenTrianglePass::BuildInternal(); - } - - void RenderTexturePass::FrameBeginInternal(FramePrepareParams params) - { - FullscreenTrianglePass::FrameBeginInternal(params); - } - - void RenderTexturePass::UpdataAttachment() - { - // [GFX TODO][ATOM-2470] stop caring about attachment - RPI::Ptr attachment = m_ownedAttachments.front(); - if (!attachment) - { - AZ_Assert(false, "[RenderTexturePass %s] Cannot find any image attachment.", GetPathName().GetCStr()); - return; - } - AZ_Assert(attachment->m_descriptor.m_type == RHI::AttachmentType::Image, "[RenderTexturePass %s] requires an image attachment", GetPathName().GetCStr()); - - RPI::PassAttachmentBinding& binding = GetOutputBinding(0); - binding.m_attachment = attachment; - - RHI::ImageDescriptor& imageDescriptor = attachment->m_descriptor.m_image; - imageDescriptor.m_size = m_attachmentSize; - imageDescriptor.m_format = m_attachmentFormat; - } - - RHI::AttachmentId RenderTexturePass::GetRenderTargetId() - { - return m_ownedAttachments.front()->GetAttachmentId(); - } - - void RenderTexturePass::InitShaderVariant(bool isNormal) - { - auto shaderOption = m_shader->CreateShaderOptionGroup(); - RPI::ShaderOptionValue isNormalOption{ isNormal }; - shaderOption.SetValue(AZ::Name("o_isNormal"), isNormalOption); - - RPI::ShaderVariantSearchResult result = m_shader->FindVariantStableId(shaderOption.GetShaderVariantId()); - m_shaderVariantStableId = result.GetStableId(); - - if (!result.IsFullyBaked() && m_drawShaderResourceGroup->HasShaderVariantKeyFallbackEntry()) - { - m_drawShaderResourceGroup->SetShaderVariantKeyFallbackValue(shaderOption.GetShaderVariantId().m_key); - } - } - } -} diff --git a/Gems/Atom/Feature/Common/Code/Source/Mesh/MeshFeatureProcessor.cpp b/Gems/Atom/Feature/Common/Code/Source/Mesh/MeshFeatureProcessor.cpp index c7fb19bc5d..dfb2b3fe6b 100644 --- a/Gems/Atom/Feature/Common/Code/Source/Mesh/MeshFeatureProcessor.cpp +++ b/Gems/Atom/Feature/Common/Code/Source/Mesh/MeshFeatureProcessor.cpp @@ -24,7 +24,6 @@ #include #include -#include #include #include #include @@ -67,7 +66,7 @@ namespace AZ m_handleGlobalShaderOptionUpdate.Disconnect(); DisableSceneNotification(); - AZ_Warning("MeshFeatureProcessor", m_meshData.size() == 0, + AZ_Warning("MeshFeatureProcessor", m_modelData.size() == 0, "Deactivaing the MeshFeatureProcessor, but there are still outstanding mesh handles.\n" ); m_transformService = nullptr; @@ -77,16 +76,18 @@ namespace AZ void MeshFeatureProcessor::Simulate(const FeatureProcessor::SimulatePacket& packet) { AZ_PROFILE_SCOPE(RPI, "MeshFeatureProcessor: Simulate"); - AZ_UNUSED(packet); + AZ::Job* parentJob = packet.m_parentJob; AZStd::concurrency_check_scope scopeCheck(m_meshDataChecker); - const auto iteratorRanges = m_meshData.GetParallelRanges(); + const auto iteratorRanges = m_modelData.GetParallelRanges(); AZ::JobCompletion jobCompletion; for (const auto& iteratorRange : iteratorRanges) { const auto jobLambda = [&]() -> void { + AZ_PROFILE_SCOPE(AzRender, "MeshFeatureProcessor: Simulate: Job"); + for (auto meshDataIter = iteratorRange.first; meshDataIter != iteratorRange.second; ++meshDataIter) { if (!meshDataIter->m_model) @@ -114,24 +115,37 @@ namespace AZ { meshDataIter->BuildCullable(); } + + if (meshDataIter->m_cullBoundsNeedsUpdate) + { + meshDataIter->UpdateCullBounds(m_transformService); + } } }; Job* executeGroupJob = aznew JobFunction(jobLambda, true, nullptr); // Auto-deletes - executeGroupJob->SetDependent(&jobCompletion); - executeGroupJob->Start(); - } - jobCompletion.StartAndWaitForCompletion(); - - m_forceRebuildDrawPackets = false; - - // CullingSystem::RegisterOrUpdateCullable() is not threadsafe, so need to do those updates in a single thread - for (MeshDataInstance& meshDataInstance : m_meshData) - { - if (meshDataInstance.m_model && meshDataInstance.m_cullBoundsNeedsUpdate) + if (parentJob) { - meshDataInstance.UpdateCullBounds(m_transformService); + parentJob->StartAsChild(executeGroupJob); + } + else + { + executeGroupJob->SetDependent(&jobCompletion); + executeGroupJob->Start(); } } + { + AZ_PROFILE_SCOPE(AzRender, "MeshFeatureProcessor: Simulate: WaitForChildren"); + if (parentJob) + { + parentJob->WaitForChildren(); + } + else + { + jobCompletion.StartAndWaitForCompletion(); + } + } + + m_forceRebuildDrawPackets = false; } void MeshFeatureProcessor::OnBeginPrepareRender() @@ -151,14 +165,14 @@ namespace AZ AZ_PROFILE_SCOPE(AzRender, "MeshFeatureProcessor: AcquireMesh"); // don't need to check the concurrency during emplace() because the StableDynamicArray won't move the other elements during insertion - MeshHandle meshDataHandle = m_meshData.emplace(); + MeshHandle meshDataHandle = m_modelData.emplace(); meshDataHandle->m_descriptor = descriptor; meshDataHandle->m_scene = GetParentScene(); meshDataHandle->m_materialAssignments = materials; meshDataHandle->m_objectId = m_transformService->ReserveObjectId(); meshDataHandle->m_originalModelAsset = descriptor.m_modelAsset; - meshDataHandle->m_meshLoader = AZStd::make_unique(descriptor.m_modelAsset, &*meshDataHandle); + meshDataHandle->m_meshLoader = AZStd::make_unique(descriptor.m_modelAsset, &*meshDataHandle); return meshDataHandle; } @@ -183,7 +197,7 @@ namespace AZ m_transformService->ReleaseObjectId(meshHandle->m_objectId); AZStd::concurrency_check_scope scopeCheck(m_meshDataChecker); - m_meshData.erase(meshHandle); + m_modelData.erase(meshHandle); return true; } @@ -215,9 +229,10 @@ namespace AZ return {}; } - Data::Instance MeshFeatureProcessor::GetObjectSrg(const MeshHandle& meshHandle) const + const AZStd::vector>& MeshFeatureProcessor::GetObjectSrgs(const MeshHandle& meshHandle) const { - return meshHandle.IsValid() ? meshHandle->m_shaderResourceGroup : nullptr; + static AZStd::vector> staticEmptyList; + return meshHandle.IsValid() ? meshHandle->m_objectSrgList : staticEmptyList; } void MeshFeatureProcessor::QueueObjectSrgForCompile(const MeshHandle& meshHandle) const @@ -274,9 +289,9 @@ namespace AZ { if (meshHandle.IsValid()) { - MeshDataInstance& meshData = *meshHandle; - meshData.m_cullBoundsNeedsUpdate = true; - meshData.m_objectSrgNeedsUpdate = true; + ModelDataInstance& modelData = *meshHandle; + modelData.m_cullBoundsNeedsUpdate = true; + modelData.m_objectSrgNeedsUpdate = true; m_transformService->SetTransformForId(meshHandle->m_objectId, transform, nonUniformScale); @@ -292,10 +307,10 @@ namespace AZ { if (meshHandle.IsValid()) { - MeshDataInstance& meshData = *meshHandle; - meshData.m_aabb = localAabb; - meshData.m_cullBoundsNeedsUpdate = true; - meshData.m_objectSrgNeedsUpdate = true; + ModelDataInstance& modelData = *meshHandle; + modelData.m_aabb = localAabb; + modelData.m_cullBoundsNeedsUpdate = true; + modelData.m_objectSrgNeedsUpdate = true; } }; @@ -465,7 +480,7 @@ namespace AZ void MeshFeatureProcessor::UpdateMeshReflectionProbes() { // we need to rebuild the Srg for any meshes that are using the forward pass IBL specular option - for (auto& meshInstance : m_meshData) + for (auto& meshInstance : m_modelData) { if (meshInstance.m_descriptor.m_useForwardPassIblSpecular) { @@ -474,14 +489,14 @@ namespace AZ } } - // MeshDataInstance::MeshLoader... - MeshDataInstance::MeshLoader::MeshLoader(const Data::Asset& modelAsset, MeshDataInstance* parent) + // ModelDataInstance::MeshLoader... + ModelDataInstance::MeshLoader::MeshLoader(const Data::Asset& modelAsset, ModelDataInstance* parent) : m_modelAsset(modelAsset) , m_parent(parent) { if (!m_modelAsset.GetId().IsValid()) { - AZ_Error("MeshDataInstance::MeshLoader", false, "Invalid model asset Id."); + AZ_Error("ModelDataInstance::MeshLoader", false, "Invalid model asset Id."); return; } @@ -494,19 +509,19 @@ namespace AZ AzFramework::AssetCatalogEventBus::Handler::BusConnect(); } - MeshDataInstance::MeshLoader::~MeshLoader() + ModelDataInstance::MeshLoader::~MeshLoader() { AzFramework::AssetCatalogEventBus::Handler::BusDisconnect(); Data::AssetBus::Handler::BusDisconnect(); } - MeshFeatureProcessorInterface::ModelChangedEvent& MeshDataInstance::MeshLoader::GetModelChangedEvent() + MeshFeatureProcessorInterface::ModelChangedEvent& ModelDataInstance::MeshLoader::GetModelChangedEvent() { return m_modelChangedEvent; } //! AssetBus::Handler overrides... - void MeshDataInstance::MeshLoader::OnAssetReady(Data::Asset asset) + void ModelDataInstance::MeshLoader::OnAssetReady(Data::Asset asset) { Data::Asset modelAsset = asset; @@ -527,7 +542,7 @@ namespace AZ } else { - AZ_Error("MeshDataInstance", false, "Cannot clone model for '%s'. Cloth simulation results won't be individual per entity.", modelAsset->GetName().GetCStr()); + AZ_Error("ModelDataInstance", false, "Cannot clone model for '%s'. Cloth simulation results won't be individual per entity.", modelAsset->GetName().GetCStr()); model = RPI::Model::FindOrCreate(modelAsset); } } @@ -547,29 +562,29 @@ namespace AZ { //when running with null renderer, the RPI::Model::FindOrCreate(...) is expected to return nullptr, so suppress this error. AZ_Error( - "MeshDataInstance::OnAssetReady", RHI::IsNullRenderer(), "Failed to create model instance for '%s'", + "ModelDataInstance::OnAssetReady", RHI::IsNullRenderer(), "Failed to create model instance for '%s'", asset.GetHint().c_str()); } } - void MeshDataInstance::MeshLoader::OnModelReloaded(Data::Asset asset) + void ModelDataInstance::MeshLoader::OnModelReloaded(Data::Asset asset) { OnAssetReady(asset); } - void MeshDataInstance::MeshLoader::OnAssetError(Data::Asset asset) + void ModelDataInstance::MeshLoader::OnAssetError(Data::Asset asset) { // Note: m_modelAsset and asset represents same asset, but only m_modelAsset contains the file path in its hint from serialization AZ_Error( - "MeshDataInstance::MeshLoader", false, "Failed to load asset %s. It may be missing, or not be finished processing", + "ModelDataInstance::MeshLoader", false, "Failed to load asset %s. It may be missing, or not be finished processing", m_modelAsset.GetHint().c_str()); AzFramework::AssetSystemRequestBus::Broadcast( &AzFramework::AssetSystem::AssetSystemRequests::EscalateAssetByUuid, m_modelAsset.GetId().m_guid); } - void MeshDataInstance::MeshLoader::OnCatalogAssetChanged(const AZ::Data::AssetId& assetId) + void ModelDataInstance::MeshLoader::OnCatalogAssetChanged(const AZ::Data::AssetId& assetId) { if (assetId == m_modelAsset.GetId()) { @@ -584,7 +599,7 @@ namespace AZ } } - void MeshDataInstance::MeshLoader::OnCatalogAssetAdded(const AZ::Data::AssetId& assetId) + void ModelDataInstance::MeshLoader::OnCatalogAssetAdded(const AZ::Data::AssetId& assetId) { if (assetId == m_modelAsset.GetId()) { @@ -599,9 +614,9 @@ namespace AZ } } - // MeshDataInstance... + // ModelDataInstance... - void MeshDataInstance::DeInit() + void ModelDataInstance::DeInit() { m_scene->GetCullingScene()->UnregisterCullable(m_cullable); @@ -609,11 +624,11 @@ namespace AZ m_drawPacketListsByLod.clear(); m_materialAssignments.clear(); - m_shaderResourceGroup = {}; + m_objectSrgList = {}; m_model = {}; } - void MeshDataInstance::Init(Data::Instance model) + void ModelDataInstance::Init(Data::Instance model) { m_model = model; const size_t modelLodCount = m_model->GetLodCount(); @@ -623,11 +638,11 @@ namespace AZ BuildDrawPacketList(modelLodIndex); } - if (m_shaderResourceGroup) + for(auto& objectSrg : m_objectSrgList) { // Set object Id once since it never changes RHI::ShaderInputNameIndex objectIdIndex = "m_objectId"; - m_shaderResourceGroup->SetConstant(objectIdIndex, m_objectId.GetIndex()); + objectSrg->SetConstant(objectIdIndex, m_objectId.GetIndex()); objectIdIndex.AssertValid(); } @@ -643,12 +658,12 @@ namespace AZ m_objectSrgNeedsUpdate = true; } - void MeshDataInstance::BuildDrawPacketList(size_t modelLodIndex) + void ModelDataInstance::BuildDrawPacketList(size_t modelLodIndex) { RPI::ModelLod& modelLod = *m_model->GetLods()[modelLodIndex]; const size_t meshCount = modelLod.GetMeshes().size(); - MeshDataInstance::DrawPacketList& drawPacketListOut = m_drawPacketListsByLod[modelLodIndex]; + ModelDataInstance::DrawPacketList& drawPacketListOut = m_drawPacketListsByLod[modelLodIndex]; drawPacketListOut.clear(); drawPacketListOut.reserve(meshCount); @@ -682,27 +697,32 @@ namespace AZ continue; } - if (m_shaderResourceGroup && m_shaderResourceGroup->GetLayout()->GetHash() != objectSrgLayout->GetHash()) + Data::Instance meshObjectSrg; + + // See if the object SRG for this mesh is already in our list of object SRGs + for (auto& objectSrgIter : m_objectSrgList) { - AZ_Warning("MeshFeatureProcessor", false, "All materials on a model must use the same per-object ShaderResourceGroup. Skipping."); - continue; + if (objectSrgIter->GetLayout()->GetHash() == objectSrgLayout->GetHash()) + { + meshObjectSrg = objectSrgIter; + } } - // The first time we find the per-surface SRG asset we create an instance and store it - // in shaderResourceGroupInOut. All of the Model's draw packets will use this same instance. - if (!m_shaderResourceGroup) + // If the object SRG for this mesh was not already in the list, create it and add it to the list + if (!meshObjectSrg) { auto& shaderAsset = material->GetAsset()->GetMaterialTypeAsset()->GetShaderAssetForObjectSrg(); - m_shaderResourceGroup = RPI::ShaderResourceGroup::Create(shaderAsset, objectSrgLayout->GetName()); - if (!m_shaderResourceGroup) + meshObjectSrg = RPI::ShaderResourceGroup::Create(shaderAsset, objectSrgLayout->GetName()); + if (!meshObjectSrg) { AZ_Warning("MeshFeatureProcessor", false, "Failed to create a new shader resource group, skipping."); continue; } + m_objectSrgList.push_back(meshObjectSrg); } // setup the mesh draw packet - RPI::MeshDrawPacket drawPacket(modelLod, meshIndex, material, m_shaderResourceGroup, materialAssignment.m_matModUvOverrides); + RPI::MeshDrawPacket drawPacket(modelLod, meshIndex, material, meshObjectSrg, materialAssignment.m_matModUvOverrides); // set the shader option to select forward pass IBL specular if necessary if (!drawPacket.SetShaderOption(AZ::Name("o_meshUseForwardPassIBLSpecular"), AZ::RPI::ShaderOptionValue{ m_descriptor.m_useForwardPassIblSpecular })) @@ -726,7 +746,7 @@ namespace AZ } } - void MeshDataInstance::SetRayTracingData() + void ModelDataInstance::SetRayTracingData() { if (!m_model) { @@ -993,7 +1013,7 @@ namespace AZ rayTracingFeatureProcessor->SetMesh(m_objectId, m_model->GetModelAsset()->GetId(), subMeshes); } - void MeshDataInstance::RemoveRayTracingData() + void ModelDataInstance::RemoveRayTracingData() { // remove from ray tracing RayTracingFeatureProcessor* rayTracingFeatureProcessor = m_scene->GetFeatureProcessor(); @@ -1003,7 +1023,7 @@ namespace AZ } } - void MeshDataInstance::SetSortKey(RHI::DrawItemSortKey sortKey) + void ModelDataInstance::SetSortKey(RHI::DrawItemSortKey sortKey) { m_sortKey = sortKey; for (auto& drawPacketList : m_drawPacketListsByLod) @@ -1015,24 +1035,23 @@ namespace AZ } } - RHI::DrawItemSortKey MeshDataInstance::GetSortKey() const + RHI::DrawItemSortKey ModelDataInstance::GetSortKey() const { return m_sortKey; } - void MeshDataInstance::SetMeshLodConfiguration(RPI::Cullable::LodConfiguration meshLodConfig) + void ModelDataInstance::SetMeshLodConfiguration(RPI::Cullable::LodConfiguration meshLodConfig) { m_cullable.m_lodData.m_lodConfiguration = meshLodConfig; } - RPI::Cullable::LodConfiguration MeshDataInstance::GetMeshLodConfiguration() const + RPI::Cullable::LodConfiguration ModelDataInstance::GetMeshLodConfiguration() const { return m_cullable.m_lodData.m_lodConfiguration; } - void MeshDataInstance::UpdateDrawPackets(bool forceUpdate /*= false*/) + void ModelDataInstance::UpdateDrawPackets(bool forceUpdate /*= false*/) { - AZ_PROFILE_SCOPE(AzRender, "MeshDataInstance:: UpdateDrawPackets"); for (auto& drawPacketList : m_drawPacketListsByLod) { for (auto& drawPacket : drawPacketList) @@ -1045,9 +1064,8 @@ namespace AZ } } - void MeshDataInstance::BuildCullable() + void ModelDataInstance::BuildCullable() { - AZ_PROFILE_SCOPE(AzRender, "MeshDataInstance: BuildCullable"); AZ_Assert(m_cullableNeedsRebuild, "This function only needs to be called if the cullable to be rebuilt"); AZ_Assert(m_model, "The model has not finished loading yet"); @@ -1122,9 +1140,8 @@ namespace AZ m_cullBoundsNeedsUpdate = true; } - void MeshDataInstance::UpdateCullBounds(const TransformServiceFeatureProcessor* transformService) + void ModelDataInstance::UpdateCullBounds(const TransformServiceFeatureProcessor* transformService) { - AZ_PROFILE_SCOPE(AzRender, "MeshDataInstance: UpdateCullBounds"); AZ_Assert(m_cullBoundsNeedsUpdate, "This function only needs to be called if the culling bounds need to be rebuilt"); AZ_Assert(m_model, "The model has not finished loading yet"); @@ -1148,70 +1165,74 @@ namespace AZ m_cullBoundsNeedsUpdate = false; } - void MeshDataInstance::UpdateObjectSrg() + void ModelDataInstance::UpdateObjectSrg() { - if (!m_shaderResourceGroup) + for (auto& objectSrg : m_objectSrgList) { - return; + ReflectionProbeFeatureProcessor* reflectionProbeFeatureProcessor = m_scene->GetFeatureProcessor(); + + if (reflectionProbeFeatureProcessor && (m_descriptor.m_useForwardPassIblSpecular || m_hasForwardPassIblSpecularMaterial)) + { + // retrieve probe constant indices + AZ::RHI::ShaderInputConstantIndex modelToWorldConstantIndex = objectSrg->FindShaderInputConstantIndex(Name("m_reflectionProbeData.m_modelToWorld")); + AZ_Error("ModelDataInstance", modelToWorldConstantIndex.IsValid(), "Failed to find ReflectionProbe constant index"); + + AZ::RHI::ShaderInputConstantIndex modelToWorldInverseConstantIndex = objectSrg->FindShaderInputConstantIndex(Name("m_reflectionProbeData.m_modelToWorldInverse")); + AZ_Error("ModelDataInstance", modelToWorldInverseConstantIndex.IsValid(), "Failed to find ReflectionProbe constant index"); + + AZ::RHI::ShaderInputConstantIndex outerObbHalfLengthsConstantIndex = objectSrg->FindShaderInputConstantIndex(Name("m_reflectionProbeData.m_outerObbHalfLengths")); + AZ_Error("ModelDataInstance", outerObbHalfLengthsConstantIndex.IsValid(), "Failed to find ReflectionProbe constant index"); + + AZ::RHI::ShaderInputConstantIndex innerObbHalfLengthsConstantIndex = objectSrg->FindShaderInputConstantIndex(Name("m_reflectionProbeData.m_innerObbHalfLengths")); + AZ_Error("ModelDataInstance", innerObbHalfLengthsConstantIndex.IsValid(), "Failed to find ReflectionProbe constant index"); + + AZ::RHI::ShaderInputConstantIndex useReflectionProbeConstantIndex = objectSrg->FindShaderInputConstantIndex(Name("m_reflectionProbeData.m_useReflectionProbe")); + AZ_Error("ModelDataInstance", useReflectionProbeConstantIndex.IsValid(), "Failed to find ReflectionProbe constant index"); + + AZ::RHI::ShaderInputConstantIndex useParallaxCorrectionConstantIndex = objectSrg->FindShaderInputConstantIndex(Name("m_reflectionProbeData.m_useParallaxCorrection")); + AZ_Error("ModelDataInstance", useParallaxCorrectionConstantIndex.IsValid(), "Failed to find ReflectionProbe constant index"); + + AZ::RHI::ShaderInputConstantIndex exposureConstantIndex = objectSrg->FindShaderInputConstantIndex(Name("m_reflectionProbeData.m_exposure")); + AZ_Error("ModelDataInstance", exposureConstantIndex.IsValid(), "Failed to find ReflectionProbe constant index"); + + // retrieve probe cubemap index + Name reflectionCubeMapImageName = Name("m_reflectionProbeCubeMap"); + RHI::ShaderInputImageIndex reflectionCubeMapImageIndex = objectSrg->FindShaderInputImageIndex(reflectionCubeMapImageName); + AZ_Error("ModelDataInstance", reflectionCubeMapImageIndex.IsValid(), "Failed to find shader image index [%s]", reflectionCubeMapImageName.GetCStr()); + + // retrieve the list of probes that contain the centerpoint of the mesh + TransformServiceFeatureProcessor* transformServiceFeatureProcessor = m_scene->GetFeatureProcessor(); + Transform transform = transformServiceFeatureProcessor->GetTransformForId(m_objectId); + + ReflectionProbeFeatureProcessor::ReflectionProbeVector reflectionProbes; + reflectionProbeFeatureProcessor->FindReflectionProbes(transform.GetTranslation(), reflectionProbes); + + if (!reflectionProbes.empty() && reflectionProbes[0]) + { + objectSrg->SetConstant(modelToWorldConstantIndex, reflectionProbes[0]->GetTransform()); + objectSrg->SetConstant(modelToWorldInverseConstantIndex, Matrix3x4::CreateFromTransform(reflectionProbes[0]->GetTransform()).GetInverseFull()); + objectSrg->SetConstant(outerObbHalfLengthsConstantIndex, reflectionProbes[0]->GetOuterObbWs().GetHalfLengths()); + objectSrg->SetConstant(innerObbHalfLengthsConstantIndex, reflectionProbes[0]->GetInnerObbWs().GetHalfLengths()); + objectSrg->SetConstant(useReflectionProbeConstantIndex, true); + objectSrg->SetConstant(useParallaxCorrectionConstantIndex, reflectionProbes[0]->GetUseParallaxCorrection()); + objectSrg->SetConstant(exposureConstantIndex, reflectionProbes[0]->GetRenderExposure()); + + objectSrg->SetImage(reflectionCubeMapImageIndex, reflectionProbes[0]->GetCubeMapImage()); + } + else + { + objectSrg->SetConstant(useReflectionProbeConstantIndex, false); + } + } + + objectSrg->Compile(); } - ReflectionProbeFeatureProcessor* reflectionProbeFeatureProcessor = m_scene->GetFeatureProcessor(); - - if (reflectionProbeFeatureProcessor && (m_descriptor.m_useForwardPassIblSpecular || m_hasForwardPassIblSpecularMaterial)) - { - // retrieve probe constant indices - AZ::RHI::ShaderInputConstantIndex modelToWorldConstantIndex = m_shaderResourceGroup->FindShaderInputConstantIndex(Name("m_reflectionProbeData.m_modelToWorld")); - AZ_Error("MeshDataInstance", modelToWorldConstantIndex.IsValid(), "Failed to find ReflectionProbe constant index"); - - AZ::RHI::ShaderInputConstantIndex modelToWorldInverseConstantIndex = m_shaderResourceGroup->FindShaderInputConstantIndex(Name("m_reflectionProbeData.m_modelToWorldInverse")); - AZ_Error("MeshDataInstance", modelToWorldInverseConstantIndex.IsValid(), "Failed to find ReflectionProbe constant index"); - - AZ::RHI::ShaderInputConstantIndex outerObbHalfLengthsConstantIndex = m_shaderResourceGroup->FindShaderInputConstantIndex(Name("m_reflectionProbeData.m_outerObbHalfLengths")); - AZ_Error("MeshDataInstance", outerObbHalfLengthsConstantIndex.IsValid(), "Failed to find ReflectionProbe constant index"); - - AZ::RHI::ShaderInputConstantIndex innerObbHalfLengthsConstantIndex = m_shaderResourceGroup->FindShaderInputConstantIndex(Name("m_reflectionProbeData.m_innerObbHalfLengths")); - AZ_Error("MeshDataInstance", innerObbHalfLengthsConstantIndex.IsValid(), "Failed to find ReflectionProbe constant index"); - - AZ::RHI::ShaderInputConstantIndex useReflectionProbeConstantIndex = m_shaderResourceGroup->FindShaderInputConstantIndex(Name("m_reflectionProbeData.m_useReflectionProbe")); - AZ_Error("MeshDataInstance", useReflectionProbeConstantIndex.IsValid(), "Failed to find ReflectionProbe constant index"); - - AZ::RHI::ShaderInputConstantIndex useParallaxCorrectionConstantIndex = m_shaderResourceGroup->FindShaderInputConstantIndex(Name("m_reflectionProbeData.m_useParallaxCorrection")); - AZ_Error("MeshDataInstance", useParallaxCorrectionConstantIndex.IsValid(), "Failed to find ReflectionProbe constant index"); - - // retrieve probe cubemap index - Name reflectionCubeMapImageName = Name("m_reflectionProbeCubeMap"); - RHI::ShaderInputImageIndex reflectionCubeMapImageIndex = m_shaderResourceGroup->FindShaderInputImageIndex(reflectionCubeMapImageName); - AZ_Error("MeshDataInstance", reflectionCubeMapImageIndex.IsValid(), "Failed to find shader image index [%s]", reflectionCubeMapImageName.GetCStr()); - - // retrieve the list of probes that contain the centerpoint of the mesh - TransformServiceFeatureProcessor* transformServiceFeatureProcessor = m_scene->GetFeatureProcessor(); - Transform transform = transformServiceFeatureProcessor->GetTransformForId(m_objectId); - - ReflectionProbeFeatureProcessor::ReflectionProbeVector reflectionProbes; - reflectionProbeFeatureProcessor->FindReflectionProbes(transform.GetTranslation(), reflectionProbes); - - if (!reflectionProbes.empty() && reflectionProbes[0]) - { - m_shaderResourceGroup->SetConstant(modelToWorldConstantIndex, reflectionProbes[0]->GetTransform()); - m_shaderResourceGroup->SetConstant(modelToWorldInverseConstantIndex, Matrix3x4::CreateFromTransform(reflectionProbes[0]->GetTransform()).GetInverseFull()); - m_shaderResourceGroup->SetConstant(outerObbHalfLengthsConstantIndex, reflectionProbes[0]->GetOuterObbWs().GetHalfLengths()); - m_shaderResourceGroup->SetConstant(innerObbHalfLengthsConstantIndex, reflectionProbes[0]->GetInnerObbWs().GetHalfLengths()); - m_shaderResourceGroup->SetConstant(useReflectionProbeConstantIndex, true); - m_shaderResourceGroup->SetConstant(useParallaxCorrectionConstantIndex, reflectionProbes[0]->GetUseParallaxCorrection()); - - m_shaderResourceGroup->SetImage(reflectionCubeMapImageIndex, reflectionProbes[0]->GetCubeMapImage()); - } - else - { - m_shaderResourceGroup->SetConstant(useReflectionProbeConstantIndex, false); - } - } - - m_shaderResourceGroup->Compile(); - m_objectSrgNeedsUpdate = false; + // Set m_objectSrgNeedsUpdate to false if there are object SRGs in the list + m_objectSrgNeedsUpdate = m_objectSrgNeedsUpdate && (m_objectSrgList.size() == 0); } - bool MeshDataInstance::MaterialRequiresForwardPassIblSpecular(Data::Instance material) const + bool ModelDataInstance::MaterialRequiresForwardPassIblSpecular(Data::Instance material) const { // look for a shader that has the o_materialUseForwardPassIBLSpecular option set // Note: this should be changed to have the material automatically set the forwardPassIBLSpecular @@ -1237,7 +1258,7 @@ namespace AZ return false; } - void MeshDataInstance::SetVisible(bool isVisible) + void ModelDataInstance::SetVisible(bool isVisible) { m_visible = isVisible; m_cullable.m_isHidden = !isVisible; diff --git a/Gems/Atom/Feature/Common/Code/Source/Platform/Android/Atom_Feature_Traits_Android.h b/Gems/Atom/Feature/Common/Code/Source/Platform/Android/Atom_Feature_Traits_Android.h index 81f41bd8c9..40f06f7191 100644 --- a/Gems/Atom/Feature/Common/Code/Source/Platform/Android/Atom_Feature_Traits_Android.h +++ b/Gems/Atom/Feature/Common/Code/Source/Platform/Android/Atom_Feature_Traits_Android.h @@ -7,5 +7,5 @@ */ #pragma once -#define AZ_TRAIT_LUXCORE_SUPPORTED 0 -#define AZ_TRAIT_LUXCORE_EXEPATH UNUSED_TRAIT +#define AZ_TRAIT_DIFFUSE_GI_PASSES_SUPPORTED 1 + diff --git a/Gems/Atom/Feature/Common/Code/Source/Platform/Common/Clang/atom_feature_common_clang.cmake b/Gems/Atom/Feature/Common/Code/Source/Platform/Common/Clang/atom_feature_common_clang.cmake index b3f7867308..7a325ca97e 100644 --- a/Gems/Atom/Feature/Common/Code/Source/Platform/Common/Clang/atom_feature_common_clang.cmake +++ b/Gems/Atom/Feature/Common/Code/Source/Platform/Common/Clang/atom_feature_common_clang.cmake @@ -5,9 +5,3 @@ # SPDX-License-Identifier: Apache-2.0 OR MIT # # - -set_source_files_properties( - Source/LuxCore/LuxCoreRenderer.cpp - PROPERTIES - COMPILE_OPTIONS -fexceptions -) diff --git a/Gems/Atom/Feature/Common/Code/Source/Platform/Common/MSVC/atom_feature_common_msvc.cmake b/Gems/Atom/Feature/Common/Code/Source/Platform/Common/MSVC/atom_feature_common_msvc.cmake index 9b5c59d310..7a325ca97e 100644 --- a/Gems/Atom/Feature/Common/Code/Source/Platform/Common/MSVC/atom_feature_common_msvc.cmake +++ b/Gems/Atom/Feature/Common/Code/Source/Platform/Common/MSVC/atom_feature_common_msvc.cmake @@ -5,9 +5,3 @@ # SPDX-License-Identifier: Apache-2.0 OR MIT # # - -set_source_files_properties( - Source/LuxCore/LuxCoreRenderer.cpp - PROPERTIES - COMPILE_OPTIONS /EHsc -) diff --git a/Gems/Atom/Feature/Common/Code/Source/Platform/Linux/Atom_Feature_Traits_Linux.h b/Gems/Atom/Feature/Common/Code/Source/Platform/Linux/Atom_Feature_Traits_Linux.h index 81f41bd8c9..40f06f7191 100644 --- a/Gems/Atom/Feature/Common/Code/Source/Platform/Linux/Atom_Feature_Traits_Linux.h +++ b/Gems/Atom/Feature/Common/Code/Source/Platform/Linux/Atom_Feature_Traits_Linux.h @@ -7,5 +7,5 @@ */ #pragma once -#define AZ_TRAIT_LUXCORE_SUPPORTED 0 -#define AZ_TRAIT_LUXCORE_EXEPATH UNUSED_TRAIT +#define AZ_TRAIT_DIFFUSE_GI_PASSES_SUPPORTED 1 + diff --git a/Gems/Atom/Feature/Common/Code/Source/Platform/Mac/Atom_Feature_Traits_Mac.h b/Gems/Atom/Feature/Common/Code/Source/Platform/Mac/Atom_Feature_Traits_Mac.h index 81f41bd8c9..40f06f7191 100644 --- a/Gems/Atom/Feature/Common/Code/Source/Platform/Mac/Atom_Feature_Traits_Mac.h +++ b/Gems/Atom/Feature/Common/Code/Source/Platform/Mac/Atom_Feature_Traits_Mac.h @@ -7,5 +7,5 @@ */ #pragma once -#define AZ_TRAIT_LUXCORE_SUPPORTED 0 -#define AZ_TRAIT_LUXCORE_EXEPATH UNUSED_TRAIT +#define AZ_TRAIT_DIFFUSE_GI_PASSES_SUPPORTED 1 + diff --git a/Gems/Atom/Feature/Common/Code/Source/Platform/Windows/Atom_Feature_Traits_Windows.h b/Gems/Atom/Feature/Common/Code/Source/Platform/Windows/Atom_Feature_Traits_Windows.h index c35b6f0960..40f06f7191 100644 --- a/Gems/Atom/Feature/Common/Code/Source/Platform/Windows/Atom_Feature_Traits_Windows.h +++ b/Gems/Atom/Feature/Common/Code/Source/Platform/Windows/Atom_Feature_Traits_Windows.h @@ -7,5 +7,5 @@ */ #pragma once -#define AZ_TRAIT_LUXCORE_SUPPORTED 0 -#define AZ_TRAIT_LUXCORE_EXEPATH "Gems/Atom/Feature/Common/External/LuxCore2.2/win64/dll/luxcoreui.exe" +#define AZ_TRAIT_DIFFUSE_GI_PASSES_SUPPORTED 1 + diff --git a/Gems/Atom/Feature/Common/Code/Source/Platform/Windows/LaunchLuxCoreUI_Windows.cpp b/Gems/Atom/Feature/Common/Code/Source/Platform/Windows/LaunchLuxCoreUI_Windows.cpp deleted file mode 100644 index 7f15949201..0000000000 --- a/Gems/Atom/Feature/Common/Code/Source/Platform/Windows/LaunchLuxCoreUI_Windows.cpp +++ /dev/null @@ -1,45 +0,0 @@ -/* - * Copyright (c) Contributors to the Open 3D Engine Project. - * For complete copyright and license terms please see the LICENSE at the root of this distribution. - * - * SPDX-License-Identifier: Apache-2.0 OR MIT - * - */ - -#include -#include -#include - -namespace LuxCoreUI -{ - void LaunchLuxCoreUI(const AZStd::string& luxCoreExeFullPath, const AZStd::string& commandLine) - { - STARTUPINFO si; - PROCESS_INFORMATION pi; - - ZeroMemory(&si, sizeof(si)); - si.cb = sizeof(si); - ZeroMemory(&pi, sizeof(pi)); - - AZStd::wstring luxCoreExeFullPathW; - AZStd::to_wstring(luxCoreExeFullPathW, luxCoreExeFullPath.c_str()); - AZStd::wstring commandLineW; - AZStd::to_wstring(commandLineW, commandLine.c_str()); - - // start the program up - CreateProcessW(luxCoreExeFullPathW.c_str(), // the path - commandLineW.data(), // Command line - NULL, // Process handle not inheritable - NULL, // Thread handle not inheritable - FALSE, // Set handle inheritance to FALSE - 0, // No creation flags - NULL, // Use parent's environment block - NULL, // Use parent's starting directory - &si, // Pointer to STARTUPINFO structure - &pi // Pointer to PROCESS_INFORMATION structure (removed extra parentheses) - ); - // Close process and thread handles. - CloseHandle(pi.hProcess); - CloseHandle(pi.hThread); - } -} diff --git a/Gems/Atom/Feature/Common/Code/Source/Platform/Windows/platform_windows_files.cmake b/Gems/Atom/Feature/Common/Code/Source/Platform/Windows/platform_windows_files.cmake index 95d27d01ac..4acf1599f5 100644 --- a/Gems/Atom/Feature/Common/Code/Source/Platform/Windows/platform_windows_files.cmake +++ b/Gems/Atom/Feature/Common/Code/Source/Platform/Windows/platform_windows_files.cmake @@ -9,5 +9,4 @@ set(FILES Atom_Feature_Traits_Platform.h Atom_Feature_Traits_Windows.h - LaunchLuxCoreUI_Windows.cpp ) diff --git a/Gems/Atom/Feature/Common/Code/Source/Platform/iOS/Atom_Feature_Traits_iOS.h b/Gems/Atom/Feature/Common/Code/Source/Platform/iOS/Atom_Feature_Traits_iOS.h index 81f41bd8c9..40f06f7191 100644 --- a/Gems/Atom/Feature/Common/Code/Source/Platform/iOS/Atom_Feature_Traits_iOS.h +++ b/Gems/Atom/Feature/Common/Code/Source/Platform/iOS/Atom_Feature_Traits_iOS.h @@ -7,5 +7,5 @@ */ #pragma once -#define AZ_TRAIT_LUXCORE_SUPPORTED 0 -#define AZ_TRAIT_LUXCORE_EXEPATH UNUSED_TRAIT +#define AZ_TRAIT_DIFFUSE_GI_PASSES_SUPPORTED 1 + diff --git a/Gems/Atom/Feature/Common/Code/Source/PostProcess/Bloom/BloomSettings.cpp b/Gems/Atom/Feature/Common/Code/Source/PostProcess/Bloom/BloomSettings.cpp index ecc1683bc4..d7314bc574 100644 --- a/Gems/Atom/Feature/Common/Code/Source/PostProcess/Bloom/BloomSettings.cpp +++ b/Gems/Atom/Feature/Common/Code/Source/PostProcess/Bloom/BloomSettings.cpp @@ -7,7 +7,6 @@ */ -#include #include #include diff --git a/Gems/Atom/Feature/Common/Code/Source/PostProcess/DepthOfField/DepthOfFieldSettings.cpp b/Gems/Atom/Feature/Common/Code/Source/PostProcess/DepthOfField/DepthOfFieldSettings.cpp index 98b527868d..2869408080 100644 --- a/Gems/Atom/Feature/Common/Code/Source/PostProcess/DepthOfField/DepthOfFieldSettings.cpp +++ b/Gems/Atom/Feature/Common/Code/Source/PostProcess/DepthOfField/DepthOfFieldSettings.cpp @@ -7,7 +7,6 @@ */ -#include #include #include diff --git a/Gems/Atom/Feature/Common/Code/Source/PostProcess/ExposureControl/ExposureControlSettings.cpp b/Gems/Atom/Feature/Common/Code/Source/PostProcess/ExposureControl/ExposureControlSettings.cpp index 26c2a61d54..5f52fb02a7 100644 --- a/Gems/Atom/Feature/Common/Code/Source/PostProcess/ExposureControl/ExposureControlSettings.cpp +++ b/Gems/Atom/Feature/Common/Code/Source/PostProcess/ExposureControl/ExposureControlSettings.cpp @@ -6,7 +6,6 @@ * */ -#include #include #include diff --git a/Gems/Atom/Feature/Common/Code/Source/PostProcess/LookModification/LookModificationSettings.cpp b/Gems/Atom/Feature/Common/Code/Source/PostProcess/LookModification/LookModificationSettings.cpp index cbc357db61..fb56ce8c55 100644 --- a/Gems/Atom/Feature/Common/Code/Source/PostProcess/LookModification/LookModificationSettings.cpp +++ b/Gems/Atom/Feature/Common/Code/Source/PostProcess/LookModification/LookModificationSettings.cpp @@ -6,7 +6,6 @@ * */ -#include #include #include diff --git a/Gems/Atom/Feature/Common/Code/Source/PostProcess/PostProcessFeatureProcessor.cpp b/Gems/Atom/Feature/Common/Code/Source/PostProcess/PostProcessFeatureProcessor.cpp index a9d8d5105f..1979e56180 100644 --- a/Gems/Atom/Feature/Common/Code/Source/PostProcess/PostProcessFeatureProcessor.cpp +++ b/Gems/Atom/Feature/Common/Code/Source/PostProcess/PostProcessFeatureProcessor.cpp @@ -15,8 +15,6 @@ // Using ebus as a temporary workaround #include -#include - namespace AZ { namespace Render @@ -37,6 +35,11 @@ namespace AZ m_currentTime = AZStd::chrono::system_clock::now(); } + void PostProcessFeatureProcessor::Deactivate() + { + m_viewAliasMap.clear(); + } + void PostProcessFeatureProcessor::UpdateTime() { AZStd::chrono::system_clock::time_point now = AZStd::chrono::system_clock::now(); @@ -45,6 +48,16 @@ namespace AZ m_deltaTime = deltaTime.count(); } + void PostProcessFeatureProcessor::SetViewAlias(const AZ::RPI::ViewPtr sourceView, const AZ::RPI::ViewPtr targetView) + { + m_viewAliasMap[sourceView.get()] = targetView.get(); + } + + void PostProcessFeatureProcessor::RemoveViewAlias(const AZ::RPI::ViewPtr sourceView) + { + m_viewAliasMap.erase(sourceView.get()); + } + void PostProcessFeatureProcessor::Simulate(const FeatureProcessor::SimulatePacket& packet) { AZ_PROFILE_SCOPE(RPI, "PostProcessFeatureProcessor: Simulate"); @@ -200,8 +213,12 @@ namespace AZ AZ::Render::PostProcessSettings* PostProcessFeatureProcessor::GetLevelSettingsFromView(AZ::RPI::ViewPtr view) { + // check for view aliases first + auto viewAliasiterator = m_viewAliasMap.find(view.get()); + + // Use the view alias if it exists + auto settingsIterator = m_blendedPerViewSettings.find(viewAliasiterator != m_viewAliasMap.end() ? viewAliasiterator->second : view.get()); // If no settings for the view is found, the global settings is returned. - auto settingsIterator = m_blendedPerViewSettings.find(view.get()); return settingsIterator != m_blendedPerViewSettings.end() ? &settingsIterator->second : m_globalAggregateLevelSettings.get(); diff --git a/Gems/Atom/Feature/Common/Code/Source/PostProcess/PostProcessFeatureProcessor.h b/Gems/Atom/Feature/Common/Code/Source/PostProcess/PostProcessFeatureProcessor.h index 2c1cc98449..10af993d9d 100644 --- a/Gems/Atom/Feature/Common/Code/Source/PostProcess/PostProcessFeatureProcessor.h +++ b/Gems/Atom/Feature/Common/Code/Source/PostProcess/PostProcessFeatureProcessor.h @@ -34,6 +34,7 @@ namespace AZ //! FeatureProcessor overrides... void Activate() override; + void Deactivate() override; void Simulate(const FeatureProcessor::SimulatePacket& packet) override; //! PostProcessFeatureProcessorInterface... @@ -43,6 +44,9 @@ namespace AZ void OnPostProcessSettingsChanged() override; PostProcessSettings* GetLevelSettingsFromView(AZ::RPI::ViewPtr view); + void SetViewAlias(const AZ::RPI::ViewPtr sourceView, const AZ::RPI::ViewPtr targetView); + void RemoveViewAlias(const AZ::RPI::ViewPtr sourceView); + private: PostProcessFeatureProcessor(const PostProcessFeatureProcessor&) = delete; @@ -83,6 +87,8 @@ namespace AZ // Each camera/view will have its own PostProcessSettings AZStd::unordered_map m_blendedPerViewSettings; + // This is used for mimicking a postfx setting of a different view + AZStd::unordered_map m_viewAliasMap; }; } // namespace Render } // namespace AZ diff --git a/Gems/Atom/Feature/Common/Code/Source/PostProcess/Ssao/SsaoSettings.cpp b/Gems/Atom/Feature/Common/Code/Source/PostProcess/Ssao/SsaoSettings.cpp index 14b50d7c88..1975b3a73f 100644 --- a/Gems/Atom/Feature/Common/Code/Source/PostProcess/Ssao/SsaoSettings.cpp +++ b/Gems/Atom/Feature/Common/Code/Source/PostProcess/Ssao/SsaoSettings.cpp @@ -7,7 +7,6 @@ */ -#include #include #include diff --git a/Gems/Atom/Feature/Common/Code/Source/PostProcessing/BlendColorGradingLutsPass.cpp b/Gems/Atom/Feature/Common/Code/Source/PostProcessing/BlendColorGradingLutsPass.cpp index f74837bd9a..ca93898d5e 100644 --- a/Gems/Atom/Feature/Common/Code/Source/PostProcessing/BlendColorGradingLutsPass.cpp +++ b/Gems/Atom/Feature/Common/Code/Source/PostProcessing/BlendColorGradingLutsPass.cpp @@ -46,7 +46,11 @@ namespace AZ void BlendColorGradingLutsPass::InitializeShaderVariant() { - AZ_Assert(m_shader != nullptr, "BlendColorGradingLutsPass %s has a null shader when calling InitializeShaderVariant.", GetPathName().GetCStr()); + if (m_shader == nullptr) + { + AZ_Assert(false, "BlendColorGradingLutsPass %s has a null shader when calling InitializeShaderVariant.", GetPathName().GetCStr()); + return; + } // Total variations is MaxBlendLuts plus one for the fallback case that none of the LUTs are found, // and hence zero LUTs are blended resulting in an identity LUT. diff --git a/Gems/Atom/Feature/Common/Code/Source/PostProcessing/ExposureControlRenderProxy.cpp b/Gems/Atom/Feature/Common/Code/Source/PostProcessing/ExposureControlRenderProxy.cpp index 924af4ab98..49e2db810a 100644 --- a/Gems/Atom/Feature/Common/Code/Source/PostProcessing/ExposureControlRenderProxy.cpp +++ b/Gems/Atom/Feature/Common/Code/Source/PostProcessing/ExposureControlRenderProxy.cpp @@ -15,7 +15,6 @@ #include -#include #include #include diff --git a/Gems/Atom/Feature/Common/Code/Source/PostProcessing/EyeAdaptationPass.cpp b/Gems/Atom/Feature/Common/Code/Source/PostProcessing/EyeAdaptationPass.cpp index 862892ad1b..20254690f9 100644 --- a/Gems/Atom/Feature/Common/Code/Source/PostProcessing/EyeAdaptationPass.cpp +++ b/Gems/Atom/Feature/Common/Code/Source/PostProcessing/EyeAdaptationPass.cpp @@ -73,15 +73,13 @@ namespace AZ return false; } - AZ_Assert(m_pipeline->GetScene(), "EyeAdaptationPass's Pipeline does not have a valid scene pointer"); - AZ::RPI::Scene* scene = GetScene(); bool enabled = false; if (scene) { PostProcessFeatureProcessor* fp = scene->GetFeatureProcessor(); - AZ::RPI::ViewPtr view = GetView(); + AZ::RPI::ViewPtr view = GetRenderPipeline()->GetDefaultView(); if (fp) { PostProcessSettings* postProcessSettings = fp->GetLevelSettingsFromView(view); @@ -110,7 +108,7 @@ namespace AZ PostProcessFeatureProcessor* fp = scene->GetFeatureProcessor(); if (fp) { - AZ::RPI::ViewPtr view = GetView(); + AZ::RPI::ViewPtr view = GetRenderPipeline()->GetDefaultView(); PostProcessSettings* postProcessSettings = fp->GetLevelSettingsFromView(view); if (postProcessSettings) { diff --git a/Gems/Atom/Feature/Common/Code/Source/PostProcessing/SMAAFeatureProcessor.cpp b/Gems/Atom/Feature/Common/Code/Source/PostProcessing/SMAAFeatureProcessor.cpp index ad059fbec0..afe8aa0079 100644 --- a/Gems/Atom/Feature/Common/Code/Source/PostProcessing/SMAAFeatureProcessor.cpp +++ b/Gems/Atom/Feature/Common/Code/Source/PostProcessing/SMAAFeatureProcessor.cpp @@ -12,8 +12,6 @@ #include #include -#include - #include #include @@ -66,7 +64,7 @@ namespace AZ void SMAAFeatureProcessor::Simulate(const FeatureProcessor::SimulatePacket& packet) { - AZ_TRACE_METHOD(); + AZ_PROFILE_FUNCTION(AzRender); AZ_UNUSED(packet); } diff --git a/Gems/Atom/Feature/Common/Code/Source/RayTracing/RayTracingAccelerationStructurePass.cpp b/Gems/Atom/Feature/Common/Code/Source/RayTracing/RayTracingAccelerationStructurePass.cpp index abdf59a915..2073c0b8c0 100644 --- a/Gems/Atom/Feature/Common/Code/Source/RayTracing/RayTracingAccelerationStructurePass.cpp +++ b/Gems/Atom/Feature/Common/Code/Source/RayTracing/RayTracingAccelerationStructurePass.cpp @@ -150,18 +150,17 @@ namespace AZ } // build newly added BLAS objects - // [GFX TODO][ATOM-14159] Add changelist for meshes in the RayTracingFeatureProcessor - RayTracingFeatureProcessor::MeshMap& rayTracingMeshes = rayTracingFeatureProcessor->GetMeshes(); - for (auto& rayTracingMesh : rayTracingMeshes) + RayTracingFeatureProcessor::BlasInstanceMap& blasInstances = rayTracingFeatureProcessor->GetBlasInstances(); + for (auto& blasInstance : blasInstances) { - if (rayTracingMesh.second.m_blasBuilt == false) + if (blasInstance.second.m_blasBuilt == false) { - for (auto& rayTracingSubMesh : rayTracingMesh.second.m_subMeshes) + for (auto& blasInstanceSubMesh : blasInstance.second.m_subMeshes) { - context.GetCommandList()->BuildBottomLevelAccelerationStructure(*rayTracingSubMesh.m_blas); + context.GetCommandList()->BuildBottomLevelAccelerationStructure(*blasInstanceSubMesh.m_blas); } - rayTracingMesh.second.m_blasBuilt = true; + blasInstance.second.m_blasBuilt = true; } } diff --git a/Gems/Atom/Feature/Common/Code/Source/RayTracing/RayTracingFeatureProcessor.cpp b/Gems/Atom/Feature/Common/Code/Source/RayTracing/RayTracingFeatureProcessor.cpp index af53fc3ce1..0a9782980f 100644 --- a/Gems/Atom/Feature/Common/Code/Source/RayTracing/RayTracingFeatureProcessor.cpp +++ b/Gems/Atom/Feature/Common/Code/Source/RayTracing/RayTracingFeatureProcessor.cpp @@ -7,7 +7,6 @@ */ #include -#include #include #include #include @@ -150,23 +149,18 @@ namespace AZ { AZ_Assert(blasInstanceFound == false, "Partial set of RayTracingBlas objects found for mesh"); - // create the BLAS object - subMesh.m_blas = AZ::RHI::RayTracingBlas::CreateRHIRayTracingBlas(); + // create the BLAS object and store it in the BLAS list + RHI::Ptr rayTracingBlas = AZ::RHI::RayTracingBlas::CreateRHIRayTracingBlas(); + itMeshBlasInstance->second.m_subMeshes.push_back({ rayTracingBlas }); - // create the buffers from the descriptor - subMesh.m_blas->CreateBuffers(*device, &blasDescriptor, *m_bufferPools); + // create the buffers from the BLAS descriptor + rayTracingBlas->CreateBuffers(*device, &blasDescriptor, *m_bufferPools); - // store the BLAS in the side list - itMeshBlasInstance->second.m_subMeshes.push_back({ subMesh.m_blas }); + // store the BLAS in the mesh + subMesh.m_blas = rayTracingBlas; } } - if (blasInstanceFound) - { - // set the mesh BLAS flag so we don't try to rebuild it in the RayTracingAccelerationStructurePass - mesh.m_blasBuilt = true; - } - // set initial transform mesh.m_transform = m_transformServiceFeatureProcessor->GetTransformForId(objectId); mesh.m_nonUniformScale = m_transformServiceFeatureProcessor->GetNonUniformScaleForId(objectId); @@ -318,7 +312,8 @@ namespace AZ } subMesh.m_irradianceColor.StoreToFloat4(meshInfo.m_irradianceColor.data()); - rotationMatrix.StoreToRowMajorFloat9(meshInfo.m_worldInvTranspose.data()); + Matrix3x4 worldInvTranspose3x4 = Matrix3x4::CreateFromMatrix3x3(rotationMatrix); + worldInvTranspose3x4.StoreToRowMajorFloat12(meshInfo.m_worldInvTranspose.data()); meshInfo.m_bufferFlags = subMesh.m_bufferFlags; meshInfo.m_bufferStartIndex = bufferStartIndex; diff --git a/Gems/Atom/Feature/Common/Code/Source/RayTracing/RayTracingFeatureProcessor.h b/Gems/Atom/Feature/Common/Code/Source/RayTracing/RayTracingFeatureProcessor.h index c0ebd6a4e7..d098fca35a 100644 --- a/Gems/Atom/Feature/Common/Code/Source/RayTracing/RayTracingFeatureProcessor.h +++ b/Gems/Atom/Feature/Common/Code/Source/RayTracing/RayTracingFeatureProcessor.h @@ -127,9 +127,6 @@ namespace AZ // mesh non-uniform scale AZ::Vector3 m_nonUniformScale = AZ::Vector3::CreateOne(); - - // flag indicating if the Blas objects in the sub-meshes are built - bool m_blasBuilt = false; }; using MeshMap = AZStd::map; @@ -184,6 +181,23 @@ namespace AZ //! Updates the RayTracingSceneSrg and RayTracingMaterialSrg, called after the TLAS is allocated in the RayTracingAccelerationStructurePass void UpdateRayTracingSrgs(); + struct SubMeshBlasInstance + { + RHI::Ptr m_blas; + }; + + struct MeshBlasInstance + { + uint32_t m_count = 0; + AZStd::vector m_subMeshes; + + // flag indicating if the Blas objects in the sub-mesh list are built + bool m_blasBuilt = false; + }; + + using BlasInstanceMap = AZStd::unordered_map; + BlasInstanceMap& GetBlasInstances() { return m_blasInstanceMap; } + private: AZ_DISABLE_COPY_MOVE(RayTracingFeatureProcessor); @@ -235,14 +249,12 @@ namespace AZ uint32_t m_tangentOffset; uint32_t m_bitangentOffset; uint32_t m_uvOffset; - float m_padding0[2]; - - AZStd::array m_irradianceColor; // float4 - AZStd::array m_worldInvTranspose; // float3x3 - float m_padding1; RayTracingSubMeshBufferFlags m_bufferFlags = RayTracingSubMeshBufferFlags::None; uint32_t m_bufferStartIndex = 0; + + AZStd::array m_irradianceColor; // float4 + AZStd::array m_worldInvTranspose; // float3x4 }; // buffer containing a MeshInfo for each sub-mesh @@ -268,18 +280,6 @@ namespace AZ bool m_materialInfoBufferNeedsUpdate = false; // side list for looking up existing BLAS objects so they can be re-used when the same mesh is added multiple times - struct SubMeshBlasInstance - { - RHI::Ptr m_blas; - }; - - struct MeshBlasInstance - { - uint32_t m_count = 0; - AZStd::vector m_subMeshes; - }; - - using BlasInstanceMap = AZStd::unordered_map; BlasInstanceMap m_blasInstanceMap; // Cache view pointers so we dont need to update them if none changed from frame to frame. diff --git a/Gems/Atom/Feature/Common/Code/Source/ReflectionProbe/ReflectionProbe.cpp b/Gems/Atom/Feature/Common/Code/Source/ReflectionProbe/ReflectionProbe.cpp index e86d91d387..77031ca3af 100644 --- a/Gems/Atom/Feature/Common/Code/Source/ReflectionProbe/ReflectionProbe.cpp +++ b/Gems/Atom/Feature/Common/Code/Source/ReflectionProbe/ReflectionProbe.cpp @@ -7,7 +7,6 @@ */ #include -#include #include #include #include @@ -120,15 +119,17 @@ namespace AZ m_scene->RemoveRenderPipeline(m_environmentCubeMapPipelineId); m_environmentCubeMapPass = nullptr; - // restore exposure - sceneSrg->SetConstant(m_iblExposureConstantIndex, m_previousExposure); + // restore exposures + sceneSrg->SetConstant(m_globalIblExposureConstantIndex, m_previousGlobalIblExposure); + sceneSrg->SetConstant(m_skyBoxExposureConstantIndex, m_previousSkyBoxExposure); m_buildingCubeMap = false; } else { - // set exposure to 0.0 while baking the cubemap - sceneSrg->SetConstant(m_iblExposureConstantIndex, 0.0f); + // set exposures to the user specified value while baking the cubemap + sceneSrg->SetConstant(m_globalIblExposureConstantIndex, m_bakeExposure); + sceneSrg->SetConstant(m_skyBoxExposureConstantIndex, m_bakeExposure); } } @@ -162,6 +163,7 @@ namespace AZ m_renderOuterSrg->SetConstant(m_reflectionRenderData->m_outerObbHalfLengthsRenderConstantIndex, m_outerObbWs.GetHalfLengths()); m_renderOuterSrg->SetConstant(m_reflectionRenderData->m_innerObbHalfLengthsRenderConstantIndex, m_innerObbWs.GetHalfLengths()); m_renderOuterSrg->SetConstant(m_reflectionRenderData->m_useParallaxCorrectionRenderConstantIndex, m_useParallaxCorrection); + m_renderOuterSrg->SetConstant(m_reflectionRenderData->m_exposureConstantIndex, m_renderExposure); m_renderOuterSrg->SetImage(m_reflectionRenderData->m_reflectionCubeMapRenderImageIndex, m_cubeMapImage); m_renderOuterSrg->Compile(); @@ -172,6 +174,7 @@ namespace AZ m_renderInnerSrg->SetConstant(m_reflectionRenderData->m_outerObbHalfLengthsRenderConstantIndex, m_outerObbWs.GetHalfLengths()); m_renderInnerSrg->SetConstant(m_reflectionRenderData->m_innerObbHalfLengthsRenderConstantIndex, m_innerObbWs.GetHalfLengths()); m_renderInnerSrg->SetConstant(m_reflectionRenderData->m_useParallaxCorrectionRenderConstantIndex, m_useParallaxCorrection); + m_renderInnerSrg->SetConstant(m_reflectionRenderData->m_exposureConstantIndex, m_renderExposure); m_renderInnerSrg->SetImage(m_reflectionRenderData->m_reflectionCubeMapRenderImageIndex, m_cubeMapImage); m_renderInnerSrg->Compile(); @@ -303,9 +306,10 @@ namespace AZ const RPI::Ptr& rootPass = environmentCubeMapPipeline->GetRootPass(); rootPass->AddChild(m_environmentCubeMapPass); - // store the current IBL exposure value + // store the current IBL exposure values Data::Instance sceneSrg = m_scene->GetShaderResourceGroup(); - m_previousExposure = sceneSrg->GetConstant(m_iblExposureConstantIndex); + m_previousGlobalIblExposure = sceneSrg->GetConstant(m_globalIblExposureConstantIndex); + m_previousSkyBoxExposure = sceneSrg->GetConstant(m_skyBoxExposureConstantIndex); m_scene->AddRenderPipeline(environmentCubeMapPipeline); } @@ -326,6 +330,17 @@ namespace AZ m_meshFeatureProcessor->SetVisible(m_visualizationMeshHandle, showVisualization); } + void ReflectionProbe::SetRenderExposure(float renderExposure) + { + m_renderExposure = renderExposure; + m_updateSrg = true; + } + + void ReflectionProbe::SetBakeExposure(float bakeExposure) + { + m_bakeExposure = bakeExposure; + } + const RHI::DrawPacket* ReflectionProbe::BuildDrawPacket( const Data::Instance& srg, const RPI::Ptr& pipelineState, diff --git a/Gems/Atom/Feature/Common/Code/Source/ReflectionProbe/ReflectionProbe.h b/Gems/Atom/Feature/Common/Code/Source/ReflectionProbe/ReflectionProbe.h index bee304c5b9..17ef54367b 100644 --- a/Gems/Atom/Feature/Common/Code/Source/ReflectionProbe/ReflectionProbe.h +++ b/Gems/Atom/Feature/Common/Code/Source/ReflectionProbe/ReflectionProbe.h @@ -61,6 +61,7 @@ namespace AZ RHI::ShaderInputNameIndex m_outerObbHalfLengthsRenderConstantIndex = "m_outerObbHalfLengths"; RHI::ShaderInputNameIndex m_innerObbHalfLengthsRenderConstantIndex = "m_innerObbHalfLengths"; RHI::ShaderInputNameIndex m_useParallaxCorrectionRenderConstantIndex = "m_useParallaxCorrection"; + RHI::ShaderInputNameIndex m_exposureConstantIndex = "m_exposure"; RHI::ShaderInputNameIndex m_reflectionCubeMapRenderImageIndex = "m_reflectionCubeMap"; }; @@ -106,6 +107,14 @@ namespace AZ // enables or disables rendering of the visualization sphere void ShowVisualization(bool showVisualization); + // the exposure to use when rendering meshes with this probe's cubemap + void SetRenderExposure(float renderExposure); + float GetRenderExposure() const { return m_renderExposure; } + + // the exposure to use when baking the probe cubemap + void SetBakeExposure(float bakeExposure); + float GetBakeExposure() const { return m_bakeExposure; } + private: AZ_DISABLE_COPY_MOVE(ReflectionProbe); @@ -157,6 +166,8 @@ namespace AZ RHI::ConstPtr m_blendWeightDrawPacket; RHI::ConstPtr m_renderOuterDrawPacket; RHI::ConstPtr m_renderInnerDrawPacket; + float m_renderExposure = 0.0f; + float m_bakeExposure = 0.0f; bool m_updateSrg = false; const RHI::DrawItemSortKey InvalidSortKey = static_cast(-1); @@ -169,8 +180,10 @@ namespace AZ RPI::Ptr m_environmentCubeMapPass = nullptr; RPI::RenderPipelineId m_environmentCubeMapPipelineId; BuildCubeMapCallback m_callback; - RHI::ShaderInputNameIndex m_iblExposureConstantIndex = "m_iblExposure"; - float m_previousExposure = 0.0f; + RHI::ShaderInputNameIndex m_globalIblExposureConstantIndex = "m_iblExposure"; + RHI::ShaderInputNameIndex m_skyBoxExposureConstantIndex = "m_cubemapExposure"; + float m_previousGlobalIblExposure = 0.0f; + float m_previousSkyBoxExposure = 0.0f; bool m_buildingCubeMap = false; }; diff --git a/Gems/Atom/Feature/Common/Code/Source/ReflectionProbe/ReflectionProbeFeatureProcessor.cpp b/Gems/Atom/Feature/Common/Code/Source/ReflectionProbe/ReflectionProbeFeatureProcessor.cpp index 52d089ae0d..0f9356428a 100644 --- a/Gems/Atom/Feature/Common/Code/Source/ReflectionProbe/ReflectionProbeFeatureProcessor.cpp +++ b/Gems/Atom/Feature/Common/Code/Source/ReflectionProbe/ReflectionProbeFeatureProcessor.cpp @@ -17,8 +17,6 @@ #include #include #include -#include - namespace AZ { namespace Render @@ -283,6 +281,18 @@ namespace AZ probe->ShowVisualization(showVisualization); } + void ReflectionProbeFeatureProcessor::SetRenderExposure(const ReflectionProbeHandle& probe, float renderExposure) + { + AZ_Assert(probe.get(), "SetRenderExposure called with an invalid handle"); + probe->SetRenderExposure(renderExposure); + } + + void ReflectionProbeFeatureProcessor::SetBakeExposure(const ReflectionProbeHandle& probe, float bakeExposure) + { + AZ_Assert(probe.get(), "SetBakeExposure called with an invalid handle"); + probe->SetBakeExposure(bakeExposure); + } + void ReflectionProbeFeatureProcessor::FindReflectionProbes(const Vector3& position, ReflectionProbeVector& reflectionProbes) { reflectionProbes.clear(); @@ -431,7 +441,12 @@ namespace AZ { // load shader shader = RPI::LoadCriticalShader(filePath); - AZ_Error("ReflectionProbeFeatureProcessor", shader, "Failed to find asset for shader [%s]", filePath); + + if (shader == nullptr) + { + AZ_Error("ReflectionProbeFeatureProcessor", false, "Failed to find asset for shader [%s]", filePath); + return; + } // store drawlist tag drawListTag = shader->GetDrawListTag(); diff --git a/Gems/Atom/Feature/Common/Code/Source/ReflectionScreenSpace/ReflectionCopyFrameBufferPass.cpp b/Gems/Atom/Feature/Common/Code/Source/ReflectionScreenSpace/ReflectionCopyFrameBufferPass.cpp index a1858a7e9d..8c5e36e706 100644 --- a/Gems/Atom/Feature/Common/Code/Source/ReflectionScreenSpace/ReflectionCopyFrameBufferPass.cpp +++ b/Gems/Atom/Feature/Common/Code/Source/ReflectionScreenSpace/ReflectionCopyFrameBufferPass.cpp @@ -7,7 +7,7 @@ */ #include "ReflectionCopyFrameBufferPass.h" -#include "ReflectionScreenSpaceBlurPass.h" +#include "ReflectionScreenSpaceTracePass.h" #include #include @@ -28,16 +28,16 @@ namespace AZ void ReflectionCopyFrameBufferPass::BuildInternal() { - RPI::PassFilter passFilter = RPI::PassFilter::CreateWithPassName(AZ::Name("ReflectionScreenSpaceBlurPass"), GetRenderPipeline()); + RPI::PassFilter passFilter = RPI::PassFilter::CreateWithPassName(AZ::Name("ReflectionScreenSpaceTracePass"), GetRenderPipeline()); RPI::PassSystemInterface::Get()->ForEachPass(passFilter, [this](RPI::Pass* pass) -> RPI::PassFilterExecutionFlow { - Render::ReflectionScreenSpaceBlurPass* blurPass = azrtti_cast(pass); - Data::Instance& frameBufferAttachment = blurPass->GetFrameBufferImageAttachment(); + Render::ReflectionScreenSpaceTracePass* tracePass = azrtti_cast(pass); + Data::Instance& frameBufferAttachment = tracePass->GetPreviousFrameImageAttachment(); RPI::PassAttachmentBinding& outputBinding = GetOutputBinding(0); AttachImageToSlot(outputBinding.m_name, frameBufferAttachment); - return RPI::PassFilterExecutionFlow::StopVisitingPasses; + return RPI::PassFilterExecutionFlow::StopVisitingPasses; }); FullscreenTrianglePass::BuildInternal(); diff --git a/Gems/Atom/Feature/Common/Code/Source/ReflectionScreenSpace/ReflectionScreenSpaceBlurPass.cpp b/Gems/Atom/Feature/Common/Code/Source/ReflectionScreenSpace/ReflectionScreenSpaceBlurPass.cpp index edd7ad1013..298aefe8df 100644 --- a/Gems/Atom/Feature/Common/Code/Source/ReflectionScreenSpace/ReflectionScreenSpaceBlurPass.cpp +++ b/Gems/Atom/Feature/Common/Code/Source/ReflectionScreenSpace/ReflectionScreenSpaceBlurPass.cpp @@ -12,6 +12,7 @@ #include #include #include +#include #include #include #include @@ -79,7 +80,7 @@ namespace AZ horizontalBlurChildDesc.m_passTemplate = blurHorizontalPassTemplate; // add child passes to perform the vertical and horizontal Gaussian blur for each roughness mip level - for (uint32_t mip = 0; mip < m_numBlurMips; ++mip) + for (uint32_t mip = 0; mip < NumMipLevels - 1; ++mip) { // create Vertical blur child passes { @@ -114,39 +115,19 @@ namespace AZ RemoveChildren(); m_flags.m_createChildren = true; - Data::Instance pool = RPI::ImageSystemInterface::Get()->GetSystemAttachmentPool(); - - // retrieve the image attachment from the pass - AZ_Assert(m_ownedAttachments.size() == 1, "ReflectionScreenSpaceBlurPass must have exactly one ImageAttachment defined"); - RPI::Ptr reflectionImageAttachment = m_ownedAttachments[0]; - - // update the image attachment descriptor to sync up size and format - reflectionImageAttachment->Update(); - - // change the lifetime since we want it to live between frames - reflectionImageAttachment->m_lifetime = RHI::AttachmentLifetimeType::Imported; - - // set the bind flags - RHI::ImageDescriptor& imageDesc = reflectionImageAttachment->m_descriptor.m_image; - imageDesc.m_bindFlags |= RHI::ImageBindFlags::Color | RHI::ImageBindFlags::ShaderReadWrite; - - // create the image attachment - RHI::ClearValue clearValue = RHI::ClearValue::CreateVector4Float(0, 0, 0, 0); - m_frameBufferImageAttachment = RPI::AttachmentImage::Create(*pool.get(), imageDesc, Name(reflectionImageAttachment->m_path.GetCStr()), &clearValue, nullptr); - - reflectionImageAttachment->m_path = m_frameBufferImageAttachment->GetAttachmentId(); - reflectionImageAttachment->m_importedResource = m_frameBufferImageAttachment; - - uint32_t mipLevels = reflectionImageAttachment->m_descriptor.m_image.m_mipLevels; + // retrieve the reflection, downsampled normal, and downsampled depth attachments + RPI::PassAttachment* reflectionImageAttachment = GetInputOutputBinding(0).m_attachment.get(); RHI::Size imageSize = reflectionImageAttachment->m_descriptor.m_image.m_size; + RPI::PassAttachment* downsampledDepthImageAttachment = GetInputOutputBinding(1).m_attachment.get(); + // create transient attachments, one for each blur mip level AZStd::vector transientPassAttachments; - for (uint32_t mip = 1; mip <= mipLevels - 1; ++mip) + for (uint32_t mip = 1; mip <= NumMipLevels - 1; ++mip) { RHI::Size mipSize = imageSize.GetReducedMip(mip); - RHI::ImageBindFlags imageBindFlags = RHI::ImageBindFlags::Color | RHI::ImageBindFlags::ShaderReadWrite; + RHI::ImageBindFlags imageBindFlags = RHI::ImageBindFlags::Color | RHI::ImageBindFlags::ShaderReadWrite | RHI::ImageBindFlags::CopyRead; auto transientImageDesc = RHI::ImageDescriptor::Create2D(imageBindFlags, mipSize.m_width, mipSize.m_height, RHI::Format::R16G16B16A16_FLOAT); RPI::PassAttachment* transientPassAttachment = aznew RPI::PassAttachment(); @@ -160,8 +141,6 @@ namespace AZ m_ownedAttachments.push_back(transientPassAttachment); } - m_numBlurMips = mipLevels - 1; - // call ParentPass::BuildInternal() first to configure the slots and auto-add the empty bindings, // then we will assign attachments to the bindings ParentPass::BuildInternal(); @@ -170,13 +149,27 @@ namespace AZ uint32_t attachmentIndex = 0; for (auto& verticalBlurChildPass : m_verticalBlurChildPasses) { + // mip0 source input RPI::PassAttachmentBinding& inputAttachmentBinding = verticalBlurChildPass->GetInputOutputBinding(0); inputAttachmentBinding.SetAttachment(reflectionImageAttachment); inputAttachmentBinding.m_connectedBinding = &GetInputOutputBinding(0); + // mipN transient output RPI::PassAttachmentBinding& outputAttachmentBinding = verticalBlurChildPass->GetInputOutputBinding(1); outputAttachmentBinding.SetAttachment(transientPassAttachments[attachmentIndex]); + // setup downsampled depth output + // Note: this is a vertical pass output only, and each vertical child pass writes a specific mip level + uint32_t mipLevel = attachmentIndex + 1; + + // downsampled depth output + RPI::PassAttachmentBinding& downsampledDepthAttachmentBinding = verticalBlurChildPass->GetInputOutputBinding(2); + RHI::ImageViewDescriptor downsampledDepthOutputViewDesc; + downsampledDepthOutputViewDesc.m_mipSliceMin = static_cast(mipLevel); + downsampledDepthOutputViewDesc.m_mipSliceMax = static_cast(mipLevel); + downsampledDepthAttachmentBinding.m_unifiedScopeDesc.SetAsImage(downsampledDepthOutputViewDesc); + downsampledDepthAttachmentBinding.SetAttachment(downsampledDepthImageAttachment); + attachmentIndex++; } diff --git a/Gems/Atom/Feature/Common/Code/Source/ReflectionScreenSpace/ReflectionScreenSpaceBlurPass.h b/Gems/Atom/Feature/Common/Code/Source/ReflectionScreenSpace/ReflectionScreenSpaceBlurPass.h index b7ea98ae25..9548665c8a 100644 --- a/Gems/Atom/Feature/Common/Code/Source/ReflectionScreenSpace/ReflectionScreenSpaceBlurPass.h +++ b/Gems/Atom/Feature/Common/Code/Source/ReflectionScreenSpace/ReflectionScreenSpaceBlurPass.h @@ -29,12 +29,8 @@ namespace AZ //! Creates a new pass without a PassTemplate static RPI::Ptr Create(const RPI::PassDescriptor& descriptor); - //! Returns the frame buffer image attachment used by the ReflectionFrameBufferCopy pass - //! to store the previous frame image - Data::Instance& GetFrameBufferImageAttachment() { return m_frameBufferImageAttachment; } - - //! Returns the number of mip levels in the blur - uint32_t GetNumBlurMips() const { return m_numBlurMips; } + //! The total number of mip levels in the blur (including mip0) + static const uint32_t NumMipLevels = 5; private: explicit ReflectionScreenSpaceBlurPass(const RPI::PassDescriptor& descriptor); @@ -47,9 +43,6 @@ namespace AZ AZStd::vector> m_verticalBlurChildPasses; AZStd::vector> m_horizontalBlurChildPasses; - - Data::Instance m_frameBufferImageAttachment; - uint32_t m_numBlurMips = 0; }; } // namespace RPI } // namespace AZ diff --git a/Gems/Atom/Feature/Common/Code/Source/ReflectionScreenSpace/ReflectionScreenSpaceCompositePass.cpp b/Gems/Atom/Feature/Common/Code/Source/ReflectionScreenSpace/ReflectionScreenSpaceCompositePass.cpp index 1362191691..d27d4d90c9 100644 --- a/Gems/Atom/Feature/Common/Code/Source/ReflectionScreenSpace/ReflectionScreenSpaceCompositePass.cpp +++ b/Gems/Atom/Feature/Common/Code/Source/ReflectionScreenSpace/ReflectionScreenSpaceCompositePass.cpp @@ -26,6 +26,19 @@ namespace AZ { } + bool ReflectionScreenSpaceCompositePass::IsEnabled() const + { + // delay for a few frames to ensure that the previous frame texture is populated + static const uint32_t FrameDelay = 10; + if (m_frameDelayCount < FrameDelay) + { + m_frameDelayCount++; + return false; + } + + return true; + } + void ReflectionScreenSpaceCompositePass::CompileResources([[maybe_unused]] const RHI::FrameGraphCompileContext& context) { if (!m_shaderResourceGroup) @@ -33,22 +46,8 @@ namespace AZ return; } - RPI::PassFilter passFilter = RPI::PassFilter::CreateWithPassName(AZ::Name("ReflectionScreenSpaceBlurPass"), GetRenderPipeline()); - - RPI::PassSystemInterface::Get()->ForEachPass(passFilter, [this](RPI::Pass* pass) -> RPI::PassFilterExecutionFlow - { - Render::ReflectionScreenSpaceBlurPass* blurPass = azrtti_cast(pass); - - // compute the max mip level based on the available mips in the previous frame image, and capping it - // to stay within a range that has reasonable data - const uint32_t MaxNumRoughnessMips = 8; - uint32_t maxMipLevel = AZStd::min(MaxNumRoughnessMips, blurPass->GetNumBlurMips()) - 1; - - auto constantIndex = m_shaderResourceGroup->FindShaderInputConstantIndex(Name("m_maxMipLevel")); - m_shaderResourceGroup->SetConstant(constantIndex, maxMipLevel); - - return RPI::PassFilterExecutionFlow::StopVisitingPasses; - }); + auto constantIndex = m_shaderResourceGroup->FindShaderInputConstantIndex(Name("m_maxMipLevel")); + m_shaderResourceGroup->SetConstant(constantIndex, ReflectionScreenSpaceBlurPass::NumMipLevels - 1); FullscreenTrianglePass::CompileResources(context); } diff --git a/Gems/Atom/Feature/Common/Code/Source/ReflectionScreenSpace/ReflectionScreenSpaceCompositePass.h b/Gems/Atom/Feature/Common/Code/Source/ReflectionScreenSpace/ReflectionScreenSpaceCompositePass.h index c70a21cd1e..03b2834633 100644 --- a/Gems/Atom/Feature/Common/Code/Source/ReflectionScreenSpace/ReflectionScreenSpaceCompositePass.h +++ b/Gems/Atom/Feature/Common/Code/Source/ReflectionScreenSpace/ReflectionScreenSpaceCompositePass.h @@ -34,6 +34,9 @@ namespace AZ // Pass Overrides... void CompileResources(const RHI::FrameGraphCompileContext& context) override; + bool IsEnabled() const override; + + mutable uint32_t m_frameDelayCount = 0; }; } // namespace RPI } // namespace AZ diff --git a/Gems/Atom/Feature/Common/Code/Source/ReflectionScreenSpace/ReflectionScreenSpaceTracePass.cpp b/Gems/Atom/Feature/Common/Code/Source/ReflectionScreenSpace/ReflectionScreenSpaceTracePass.cpp new file mode 100644 index 0000000000..7f6bce8a00 --- /dev/null +++ b/Gems/Atom/Feature/Common/Code/Source/ReflectionScreenSpace/ReflectionScreenSpaceTracePass.cpp @@ -0,0 +1,58 @@ +/* + * Copyright (c) Contributors to the Open 3D Engine Project. + * For complete copyright and license terms please see the LICENSE at the root of this distribution. + * + * SPDX-License-Identifier: Apache-2.0 OR MIT + * + */ + +#include "ReflectionScreenSpaceTracePass.h" +#include +#include +#include +#include +#include + +namespace AZ +{ + namespace Render + { + RPI::Ptr ReflectionScreenSpaceTracePass::Create(const RPI::PassDescriptor& descriptor) + { + RPI::Ptr pass = aznew ReflectionScreenSpaceTracePass(descriptor); + return AZStd::move(pass); + } + + ReflectionScreenSpaceTracePass::ReflectionScreenSpaceTracePass(const RPI::PassDescriptor& descriptor) + : RPI::FullscreenTrianglePass(descriptor) + { + } + + void ReflectionScreenSpaceTracePass::BuildInternal() + { + Data::Instance pool = RPI::ImageSystemInterface::Get()->GetSystemAttachmentPool(); + + // retrieve the previous frame image attachment from the pass + AZ_Assert(m_ownedAttachments.size() == 3, "ReflectionScreenSpaceTracePass must have the following attachment images defined: ReflectionImage, DownSampledDepthImage, and PreviousFrameImage"); + RPI::Ptr previousFrameImageAttachment = m_ownedAttachments[2]; + + // update the image attachment descriptor to sync up size and format + previousFrameImageAttachment->Update(); + + // change the lifetime since we want it to live between frames + previousFrameImageAttachment->m_lifetime = RHI::AttachmentLifetimeType::Imported; + + // set the bind flags + RHI::ImageDescriptor& imageDesc = previousFrameImageAttachment->m_descriptor.m_image; + imageDesc.m_bindFlags |= RHI::ImageBindFlags::Color | RHI::ImageBindFlags::ShaderReadWrite; + + // create the image attachment + RHI::ClearValue clearValue = RHI::ClearValue::CreateVector4Float(0, 0, 0, 0); + m_previousFrameImageAttachment = RPI::AttachmentImage::Create(*pool.get(), imageDesc, Name(previousFrameImageAttachment->m_path.GetCStr()), &clearValue, nullptr); + + previousFrameImageAttachment->m_path = m_previousFrameImageAttachment->GetAttachmentId(); + previousFrameImageAttachment->m_importedResource = m_previousFrameImageAttachment; + } + + } // namespace RPI +} // namespace AZ diff --git a/Gems/Atom/Feature/Common/Code/Source/ReflectionScreenSpace/ReflectionScreenSpaceTracePass.h b/Gems/Atom/Feature/Common/Code/Source/ReflectionScreenSpace/ReflectionScreenSpaceTracePass.h new file mode 100644 index 0000000000..b03418bbac --- /dev/null +++ b/Gems/Atom/Feature/Common/Code/Source/ReflectionScreenSpace/ReflectionScreenSpaceTracePass.h @@ -0,0 +1,43 @@ +/* + * Copyright (c) Contributors to the Open 3D Engine Project. + * For complete copyright and license terms please see the LICENSE at the root of this distribution. + * + * SPDX-License-Identifier: Apache-2.0 OR MIT + * + */ +#pragma once + +#include +#include +#include +#include + +namespace AZ +{ + namespace Render + { + //! This pass traces screenspace reflections from the previous frame image. + class ReflectionScreenSpaceTracePass + : public RPI::FullscreenTrianglePass + { + AZ_RPI_PASS(DiffuseProbeGridDownsamplePass); + + public: + AZ_RTTI(Render::ReflectionScreenSpaceTracePass, "{70FD45E9-8363-4AA1-A514-3C24AC975E53}", FullscreenTrianglePass); + AZ_CLASS_ALLOCATOR(Render::ReflectionScreenSpaceTracePass, SystemAllocator, 0); + + //! Creates a new pass without a PassTemplate + static RPI::Ptr Create(const RPI::PassDescriptor& descriptor); + + Data::Instance& GetPreviousFrameImageAttachment() { return m_previousFrameImageAttachment; } + + private: + explicit ReflectionScreenSpaceTracePass(const RPI::PassDescriptor& descriptor); + + // Pass behavior overrides... + virtual void BuildInternal() override; + + Data::Instance m_previousFrameImageAttachment; + }; + } // namespace RPI +} // namespace AZ diff --git a/Gems/Atom/Feature/Common/Code/Source/ScreenSpace/DeferredFogSettings.cpp b/Gems/Atom/Feature/Common/Code/Source/ScreenSpace/DeferredFogSettings.cpp index 4cde65b9da..fff1c41150 100644 --- a/Gems/Atom/Feature/Common/Code/Source/ScreenSpace/DeferredFogSettings.cpp +++ b/Gems/Atom/Feature/Common/Code/Source/ScreenSpace/DeferredFogSettings.cpp @@ -6,7 +6,6 @@ * */ -#include #include #include diff --git a/Gems/Atom/Feature/Common/Code/Source/Shadows/ProjectedShadowFeatureProcessor.cpp b/Gems/Atom/Feature/Common/Code/Source/Shadows/ProjectedShadowFeatureProcessor.cpp index 70ccaa5702..17866cdd1c 100644 --- a/Gems/Atom/Feature/Common/Code/Source/Shadows/ProjectedShadowFeatureProcessor.cpp +++ b/Gems/Atom/Feature/Common/Code/Source/Shadows/ProjectedShadowFeatureProcessor.cpp @@ -8,7 +8,6 @@ #include -#include #include #include #include @@ -155,8 +154,9 @@ namespace AZ::Render { AZ_Assert(id.IsValid(), "Invalid ShadowId passed to ProjectedShadowFeatureProcessor::SetNormalShadowBias()."); - ShadowProperty& shadowProperty = GetShadowPropertyFromShadowId(id); - shadowProperty.m_normalShadowBias = normalShadowBias; + ShadowData& shadowData = m_shadowData.GetElement(id.GetIndex()); + shadowData.m_normalShadowBias = normalShadowBias; + m_deviceBufferNeedsUpdate = true; } void ProjectedShadowFeatureProcessor::SetShadowmapMaxResolution(ShadowId id, ShadowmapSize size) diff --git a/Gems/Atom/Feature/Common/Code/Source/Shadows/ProjectedShadowFeatureProcessor.h b/Gems/Atom/Feature/Common/Code/Source/Shadows/ProjectedShadowFeatureProcessor.h index 8939f1845d..a892e77b7f 100644 --- a/Gems/Atom/Feature/Common/Code/Source/Shadows/ProjectedShadowFeatureProcessor.h +++ b/Gems/Atom/Feature/Common/Code/Source/Shadows/ProjectedShadowFeatureProcessor.h @@ -68,7 +68,7 @@ namespace AZ::Render uint32_t m_filteringSampleCount = 0; AZStd::array m_unprojectConstants = { {0, 0} }; float m_bias; - float m_normalShadowBias; + float m_normalShadowBias = 0; float m_esmExponent = 87.0f; float m_padding[3]; }; @@ -79,7 +79,6 @@ namespace AZ::Render ProjectedShadowDescriptor m_desc; RPI::ViewPtr m_shadowmapView; float m_bias = 0.1f; - float m_normalShadowBias = 0.0f; ShadowId m_shadowId; }; diff --git a/Gems/Atom/Feature/Common/Code/Source/SkinnedMesh/SkinnedMeshFeatureProcessor.cpp b/Gems/Atom/Feature/Common/Code/Source/SkinnedMesh/SkinnedMeshFeatureProcessor.cpp index 4c379c4239..37b18291dc 100644 --- a/Gems/Atom/Feature/Common/Code/Source/SkinnedMesh/SkinnedMeshFeatureProcessor.cpp +++ b/Gems/Atom/Feature/Common/Code/Source/SkinnedMesh/SkinnedMeshFeatureProcessor.cpp @@ -25,7 +25,6 @@ #include -#include #include #include #include @@ -95,13 +94,13 @@ namespace AZ renderProxy.m_instance->m_model->WaitForUpload(); } - //Note: we are creating pointers to the meshDataInstance cullpacket and lod packet here, + //Note: we are creating pointers to the modelDataInstance cullpacket and lod packet here, //and holding them until the skinnedMeshDispatchItems are dispatched. There is an assumption that the underlying //data will not move during this phase. - MeshDataInstance& meshDataInstance = **renderProxy.m_meshHandle; - m_workgroup.m_cullPackets.push_back(&meshDataInstance.GetCullPacket()); - m_workgroup.m_drawListMask |= meshDataInstance.GetCullPacket().m_drawListMask; - m_lodPackets.push_back(&meshDataInstance.GetLodPacket()); + ModelDataInstance& modelDataInstance = **renderProxy.m_meshHandle; + m_workgroup.m_cullPackets.push_back(&modelDataInstance.GetCullPacket()); + m_workgroup.m_drawListMask |= modelDataInstance.GetCullPacket().m_drawListMask; + m_lodPackets.push_back(&modelDataInstance.GetLodPacket()); m_potentiallyVisibleProxies.push_back(&renderProxy); } } @@ -187,8 +186,8 @@ namespace AZ renderProxy.m_instance->m_model->WaitForUpload(); } - MeshDataInstance& meshDataInstance = **renderProxy.m_meshHandle; - const RPI::Cullable& cullable = meshDataInstance.GetCullable(); + ModelDataInstance& modelDataInstance = **renderProxy.m_meshHandle; + const RPI::Cullable& cullable = modelDataInstance.GetCullable(); for (const RPI::ViewPtr& viewPtr : packet.m_views) { diff --git a/Gems/Atom/Feature/Common/Code/Source/SkinnedMesh/SkinnedMeshOutputStreamManager.cpp b/Gems/Atom/Feature/Common/Code/Source/SkinnedMesh/SkinnedMeshOutputStreamManager.cpp index 8bf518e277..87fb46a7c6 100644 --- a/Gems/Atom/Feature/Common/Code/Source/SkinnedMesh/SkinnedMeshOutputStreamManager.cpp +++ b/Gems/Atom/Feature/Common/Code/Source/SkinnedMesh/SkinnedMeshOutputStreamManager.cpp @@ -98,7 +98,12 @@ namespace AZ } m_needsInit = false; - const AZ::u64 sizeInMb = r_skinnedMeshInstanceMemoryPoolSize; + AZ::u64 sizeInMb{}; + if (auto console = AZ::Interface::Get(); console != nullptr) + { + console->GetCvarValue("r_skinnedMeshInstanceMemoryPoolSize", sizeInMb); + } + m_sizeInBytes = sizeInMb * (1024u * 1024u); CalculateAlignment(); diff --git a/Gems/Atom/Feature/Common/Code/Source/SkinnedMesh/SkinnedMeshRenderProxy.cpp b/Gems/Atom/Feature/Common/Code/Source/SkinnedMesh/SkinnedMeshRenderProxy.cpp index c9bfebe25b..2f8ccc12ed 100644 --- a/Gems/Atom/Feature/Common/Code/Source/SkinnedMesh/SkinnedMeshRenderProxy.cpp +++ b/Gems/Atom/Feature/Common/Code/Source/SkinnedMesh/SkinnedMeshRenderProxy.cpp @@ -18,8 +18,6 @@ #include #include -#include - namespace AZ { namespace Render @@ -35,7 +33,7 @@ namespace AZ bool SkinnedMeshRenderProxy::Init(const RPI::Scene& scene, SkinnedMeshFeatureProcessor* featureProcessor) { - AZ_TRACE_METHOD(); + AZ_PROFILE_FUNCTION(AzRender); if(!m_instance->m_model) { return false; diff --git a/Gems/Atom/Feature/Common/Code/Source/SkyBox/SkyBoxFeatureProcessor.cpp b/Gems/Atom/Feature/Common/Code/Source/SkyBox/SkyBoxFeatureProcessor.cpp index ca8775a073..3c85f16821 100644 --- a/Gems/Atom/Feature/Common/Code/Source/SkyBox/SkyBoxFeatureProcessor.cpp +++ b/Gems/Atom/Feature/Common/Code/Source/SkyBox/SkyBoxFeatureProcessor.cpp @@ -8,8 +8,6 @@ #include -#include - #include #include @@ -190,7 +188,7 @@ namespace AZ void SkyBoxFeatureProcessor::Render(const FeatureProcessor::RenderPacket& packet) { - AZ_TRACE_METHOD(); + AZ_PROFILE_FUNCTION(AzRender); AZ_UNUSED(packet); } diff --git a/Gems/Atom/Feature/Common/Code/Source/TransformService/TransformServiceFeatureProcessor.cpp b/Gems/Atom/Feature/Common/Code/Source/TransformService/TransformServiceFeatureProcessor.cpp index 141acbd744..54ad77d403 100644 --- a/Gems/Atom/Feature/Common/Code/Source/TransformService/TransformServiceFeatureProcessor.cpp +++ b/Gems/Atom/Feature/Common/Code/Source/TransformService/TransformServiceFeatureProcessor.cpp @@ -14,7 +14,6 @@ #include #include -#include #include namespace AZ diff --git a/Gems/Atom/Feature/Common/Code/Source/Utils/EditorLightingPreset.cpp b/Gems/Atom/Feature/Common/Code/Source/Utils/EditorLightingPreset.cpp index 3704c8ec0f..120eaa84dc 100644 --- a/Gems/Atom/Feature/Common/Code/Source/Utils/EditorLightingPreset.cpp +++ b/Gems/Atom/Feature/Common/Code/Source/Utils/EditorLightingPreset.cpp @@ -72,7 +72,7 @@ namespace AZ ->Attribute(AZ::Edit::Attributes::AutoExpand, true) ->DataElement(AZ::Edit::UIHandlers::Default, &LightConfig::m_direction, "Direction", "") ->DataElement(Edit::UIHandlers::Color, &LightConfig::m_color, "Color", "Color of the light") - ->Attribute("ColorEditorConfiguration", AZ::RPI::ColorUtils::GetLinearRgbEditorConfig()) + ->Attribute("ColorEditorConfiguration", AZ::RPI::ColorUtils::GetRgbEditorConfig()) ->DataElement(Edit::UIHandlers::Default, &LightConfig::m_intensity, "Intensity", "Intensity of the light in the set photometric unit.") ->ClassElement(AZ::Edit::ClassElements::Group, "Shadow") @@ -110,6 +110,11 @@ namespace AZ ->DataElement(AZ::Edit::UIHandlers::Default, &LightingPreset::m_displayName, "Display Name", "Identifier used for display and selection") ->DataElement(AZ::Edit::UIHandlers::Default, &LightingPreset::m_iblDiffuseImageAsset, "IBL Diffuse Image Asset", "IBL diffuse image asset reference") ->DataElement(AZ::Edit::UIHandlers::Default, &LightingPreset::m_iblSpecularImageAsset, "IBL Specular Image Asset", "IBL specular image asset reference") + ->DataElement(AZ::Edit::UIHandlers::Slider, &LightingPreset::m_iblExposure, "IBL exposure", "IBL exposure") + ->Attribute(AZ::Edit::Attributes::SoftMin, -5.0f) + ->Attribute(AZ::Edit::Attributes::SoftMax, 5.0f) + ->Attribute(AZ::Edit::Attributes::Min, -20.0f) + ->Attribute(AZ::Edit::Attributes::Max, 20.0f) ->DataElement(AZ::Edit::UIHandlers::Default, &LightingPreset::m_skyboxImageAsset, "Skybox Image Asset", "Skybox image asset reference") ->DataElement(AZ::Edit::UIHandlers::Default, &LightingPreset::m_alternateSkyboxImageAsset, "Skybox Image Asset (Alt)", "Alternate skybox image asset reference") ->DataElement(AZ::Edit::UIHandlers::Slider, &LightingPreset::m_skyboxExposure, "Skybox Exposure", "Skybox exposure") diff --git a/Gems/Atom/Feature/Common/Code/Source/Utils/EditorModelPreset.cpp b/Gems/Atom/Feature/Common/Code/Source/Utils/EditorModelPreset.cpp index 63c2fc7150..d636fde2fe 100644 --- a/Gems/Atom/Feature/Common/Code/Source/Utils/EditorModelPreset.cpp +++ b/Gems/Atom/Feature/Common/Code/Source/Utils/EditorModelPreset.cpp @@ -29,7 +29,6 @@ namespace AZ ->Attribute(AZ::Edit::Attributes::AutoExpand, true) ->DataElement(AZ::Edit::UIHandlers::Default, &ModelPreset::m_displayName, "Display Name", "Identifier used for display and selection") ->DataElement(AZ::Edit::UIHandlers::Default, &ModelPreset::m_modelAsset, "Model Asset", "Model asset reference") - ->DataElement(AZ::Edit::UIHandlers::Default, &ModelPreset::m_previewImageAsset, "Preview Image Asset", "Preview image asset reference") ; } } diff --git a/Gems/Atom/Feature/Common/Code/Source/Utils/GpuBufferHandler.cpp b/Gems/Atom/Feature/Common/Code/Source/Utils/GpuBufferHandler.cpp index 7a2827bebe..65bdf655a7 100644 --- a/Gems/Atom/Feature/Common/Code/Source/Utils/GpuBufferHandler.cpp +++ b/Gems/Atom/Feature/Common/Code/Source/Utils/GpuBufferHandler.cpp @@ -24,14 +24,14 @@ namespace AZ { m_elementSize = descriptor.m_elementSize; m_elementCount = 0; - + m_bufferIndex = descriptor.m_srgLayout->FindShaderInputBufferIndex(Name(descriptor.m_bufferSrgName)); - AZ_Error(ClassName, m_bufferIndex.IsValid(), "Unable to find %s in view shader resource group.", descriptor.m_bufferSrgName.c_str()); + AZ_Error(ClassName, m_bufferIndex.IsValid(), "Unable to find %s in %s shader resource group.", descriptor.m_bufferSrgName.c_str(), descriptor.m_srgLayout->GetName().GetCStr()); if (!descriptor.m_elementCountSrgName.empty()) { m_elementCountIndex = descriptor.m_srgLayout->FindShaderInputConstantIndex(Name(descriptor.m_elementCountSrgName)); - AZ_Error(ClassName, m_elementCountIndex.IsValid(), "Unable to find %s in view shader resource group.", descriptor.m_elementCountSrgName.c_str()); + AZ_Error(ClassName, m_elementCountIndex.IsValid(), "Unable to find %s in %s shader resource group.", descriptor.m_elementCountSrgName.c_str(), descriptor.m_srgLayout->GetName().GetCStr()); } if (m_bufferIndex.IsValid()) diff --git a/Gems/Atom/Feature/Common/Code/Source/Utils/ModelPreset.cpp b/Gems/Atom/Feature/Common/Code/Source/Utils/ModelPreset.cpp index c684b3cc89..ce8a1680a9 100644 --- a/Gems/Atom/Feature/Common/Code/Source/Utils/ModelPreset.cpp +++ b/Gems/Atom/Feature/Common/Code/Source/Utils/ModelPreset.cpp @@ -24,10 +24,9 @@ namespace AZ if (auto serializeContext = azrtti_cast(context)) { serializeContext->Class() - ->Version(3) + ->Version(4) ->Field("displayName", &ModelPreset::m_displayName) ->Field("modelAsset", &ModelPreset::m_modelAsset) - ->Field("previewImageAsset", &ModelPreset::m_previewImageAsset) ; } @@ -41,7 +40,6 @@ namespace AZ ->Constructor() ->Property("displayName", BehaviorValueProperty(&ModelPreset::m_displayName)) ->Property("modelAsset", BehaviorValueProperty(&ModelPreset::m_modelAsset)) - ->Property("previewImageAsset", BehaviorValueProperty(&ModelPreset::m_previewImageAsset)) ; } } diff --git a/Gems/Atom/Feature/Common/Code/Tests/IndexedDataVectorTests.cpp b/Gems/Atom/Feature/Common/Code/Tests/IndexedDataVectorTests.cpp index 6a13b9b774..88e67538c5 100644 --- a/Gems/Atom/Feature/Common/Code/Tests/IndexedDataVectorTests.cpp +++ b/Gems/Atom/Feature/Common/Code/Tests/IndexedDataVectorTests.cpp @@ -8,156 +8,218 @@ #include #include -#include +#include #include #include - namespace UnitTest { using namespace AZ; using namespace AZ::Render; - + class IndexedDataVectorTests - : public ::testing::Test + : public UnitTest::AllocatorsTestFixture { public: void SetUp() override { - CreateAllocator(); + UnitTest::AllocatorsTestFixture::SetUp(); } void TearDown() override { - DestroyAllocator(); + UnitTest::AllocatorsTestFixture::TearDown(); } - private: - - void CreateAllocator() + template + IndexedDataVector SetupIndexedDataVector(size_t size, T initialValue = T(0), T incrementAmount = T(1), AZStd::vector* indices = nullptr) { - static constexpr size_t NumMBToAllocate = 1; - SystemAllocator::Descriptor desc; - desc.m_heap.m_numFixedMemoryBlocks = 1; - desc.m_heap.m_fixedMemoryBlocksByteSize[0] = NumMBToAllocate * 1024 * 1024; - m_memBlock = AZ_OS_MALLOC( - desc.m_heap.m_fixedMemoryBlocksByteSize[0], - desc.m_heap.m_memoryBlockAlignment); - desc.m_heap.m_fixedMemoryBlocks[0] = m_memBlock; - - AllocatorInstance::Create(desc); + IndexedDataVector data; + T value = initialValue; + for (size_t i = 0; i < size; ++i) + { + uint16_t index = data.GetFreeSlotIndex(); + EXPECT_NE(index, IndexedDataVector::NoFreeSlot); + if (indices) + { + indices->push_back(index); + } + if (index != IndexedDataVector::NoFreeSlot) + { + data.GetData(index) = value; + value += incrementAmount; + } + } + return data; } - void DestroyAllocator() + template + void ShuffleIndexedDataVector(IndexedDataVector& dataVector, AZStd::vector& indices) { - AllocatorInstance::Destroy(); - AZ_OS_FREE(m_memBlock); - m_memBlock = nullptr; + AZStd::vector values; + + // remove every other element and store it + for (size_t i = 0; i < indices.size(); ++i) + { + values.push_back(dataVector.GetData(indices.at(i))); + dataVector.RemoveIndex(indices.at(i)); + indices.erase(&indices.at(i)); + } + + for (T value : values) + { + uint16_t index = dataVector.GetFreeSlotIndex(); + indices.push_back(index); + dataVector.GetData(index) = value; + } } - void* m_memBlock = nullptr; }; - - TEST_F(IndexedDataVectorTests, TestInsert) + + TEST_F(IndexedDataVectorTests, Construction) { - MultiIndexedDataVector myVec; - constexpr int NumToInsert = 5; + IndexedDataVector testVector; + uint16_t index = testVector.GetFreeSlotIndex(); + EXPECT_NE(index, IndexedDataVector::NoFreeSlot); + } + + TEST_F(IndexedDataVectorTests, TestInsertGetBasic) + { + constexpr size_t count = 16; + constexpr int initialValue = 0; + constexpr int increment = 1; AZStd::vector indices; - - for (int i = 0; i < NumToInsert; ++i) + IndexedDataVector testVector = SetupIndexedDataVector(count, initialValue, increment, &indices); + + int value = initialValue; + for (size_t i = 0; i < count; ++i) { - auto index = myVec.GetFreeSlotIndex(); - indices.push_back(index); - myVec.GetData<0>(index) = i; - myVec.GetData<1>(index) = (double)i; + EXPECT_EQ(testVector.GetData(indices.at(i)), value); + value += increment; + } + } + + TEST_F(IndexedDataVectorTests, TestInsertGetComplex) + { + constexpr size_t count = 16; + constexpr int initialValue = 0; + constexpr int increment = 1; + + AZStd::vector indices; + IndexedDataVector testVector = SetupIndexedDataVector(count, initialValue, increment, &indices); + + // Create a set of the data that should be in the IndexedDataVector + AZStd::set values; + for (int i = 0; i < count; ++i) + { + values.emplace(initialValue + i * increment); } - for (size_t i = 0; i < NumToInsert; ++i) + // Add and remove items to shuffle the underlying data + ShuffleIndexedDataVector(testVector, indices); + + // Check to make sure all the data is still there + AZStd::vector& underlyingVector = testVector.GetDataVector(); + for (size_t i = 0; i < underlyingVector.size(); ++i) { - auto index = indices[i]; - EXPECT_EQ(i, myVec.GetData<0>(index)); - EXPECT_EQ((double)i, myVec.GetData<1>(index)); + EXPECT_TRUE(values.contains(underlyingVector.at(i))); } } TEST_F(IndexedDataVectorTests, TestSize) { - MultiIndexedDataVector myVec; - constexpr int NumToInsert = 5; - for (int i = 0; i < NumToInsert; ++i) - { - auto index = myVec.GetFreeSlotIndex(); - myVec.GetData<0>(index) = i; - } - EXPECT_EQ(NumToInsert, myVec.GetDataCount()); - EXPECT_EQ(NumToInsert, myVec.GetDataVector<0>().size()); + constexpr size_t count = 32; - myVec.Clear(); - - EXPECT_EQ(0, myVec.GetDataCount()); - EXPECT_EQ(0, myVec.GetDataVector<0>().size()); + IndexedDataVector testVector = SetupIndexedDataVector(count); + EXPECT_EQ(testVector.GetDataCount(), count); } - TEST_F(IndexedDataVectorTests, TestErase) + TEST_F(IndexedDataVectorTests, TestClear) { - MultiIndexedDataVector myVec; - constexpr int NumToInsert = 200; - AZStd::unordered_map valueToIndex; - - for (int i = 0; i < NumToInsert; ++i) - { - auto index = myVec.GetFreeSlotIndex(); - valueToIndex[i] = index; - myVec.GetData<0>(index) = i; - } - - // erase every even number - for (int i = 0; i < NumToInsert; i += 2) - { - uint16_t index = valueToIndex[i]; - auto previousRawIndex = myVec.GetRawIndex(index); - auto movedIndex = myVec.RemoveIndex(index); - if (movedIndex != MultiIndexedDataVector::NoFreeSlot) - { - auto newRawIndex = myVec.GetRawIndex(movedIndex); - - // RemoveIndex() returns the index of the item that moves into its spot if any, so check - // to make sure the Raw index of the old matches the raw index of the new - EXPECT_EQ(previousRawIndex, newRawIndex); - } - valueToIndex.erase(i); - } - - for (const auto& iter : valueToIndex) - { - int val = iter.first; - uint16_t index = iter.second; - EXPECT_EQ(val, myVec.GetData<0>(index)); - } + constexpr size_t count = 32; + IndexedDataVector testVector = SetupIndexedDataVector(count); + testVector.Clear(); + EXPECT_EQ(testVector.GetDataCount(), 0); } - TEST_F(IndexedDataVectorTests, TestManyTypes) + TEST_F(IndexedDataVectorTests, TestRemove) { - MultiIndexedDataVector myVec; - auto index = myVec.GetFreeSlotIndex(); + constexpr size_t count = 8; + constexpr int initialValue = 0; + constexpr int increment = 8; - constexpr int TestIntVal = INT_MIN; - constexpr double TestDoubleVal = -DBL_MIN; - const AZStd::string TestStringVal = "This is an AZStd::string."; - constexpr float TestFloatVal = FLT_MAX; - const char* TestConstPointerVal = "This is a C array."; + AZStd::vector indices; + IndexedDataVector testVector = SetupIndexedDataVector(count, initialValue, increment, &indices); - myVec.GetData<0>(index) = TestIntVal; - myVec.GetData<1>(index) = TestStringVal; - myVec.GetData<2>(index) = TestDoubleVal; - myVec.GetData<3>(index) = TestFloatVal; - myVec.GetData<4>(index) = TestConstPointerVal; + // Remove every other element by index + for (uint16_t i = 0; i < count; i += 2) + { + testVector.RemoveIndex(i); + } + + EXPECT_EQ(testVector.GetDataCount(), count / 2); + + // Make sure the rest of the data is still there + AZStd::vector remainingIndices; + for (size_t i = 1; i < count; i += 2) + { + int value = testVector.GetData(indices.at(i)); + EXPECT_EQ(value, initialValue + increment * i); + remainingIndices.push_back(indices.at(i)); + } + + // remove the rest of the valus by value + for (uint16_t index : remainingIndices) + { + int* valuePtr = &testVector.GetData(index); + testVector.RemoveData(valuePtr); + } + + EXPECT_EQ(testVector.GetDataCount(), 0); + } + + TEST_F(IndexedDataVectorTests, TestIndexForData) + { + constexpr size_t count = 8; + constexpr int initialValue = 0; + constexpr int increment = 8; + + AZStd::vector indices; + IndexedDataVector testVector = SetupIndexedDataVector(count, initialValue, increment, &indices); + + // Add and remove items to shuffle the underlying data + ShuffleIndexedDataVector(testVector, indices); + + AZStd::vector& underlyingVector = testVector.GetDataVector(); + for (size_t i = 0; i < underlyingVector.size(); ++i) + { + int value = underlyingVector.at(i); + uint16_t index = testVector.GetIndexForData(&underlyingVector.at(i)); + + // The data from GetData(index) should match for the index retrieved using GetIndexForData() for the same data. + EXPECT_EQ(testVector.GetData(index), value); + } + } + + TEST_F(IndexedDataVectorTests, TestRawIndex) + { + constexpr size_t count = 8; + constexpr int initialValue = 0; + constexpr int increment = 8; + + AZStd::vector indices; + IndexedDataVector testVector = SetupIndexedDataVector(count, initialValue, increment, &indices); + + // Add and remove items to shuffle the underlying data + ShuffleIndexedDataVector(testVector, indices); + + AZStd::vector& underlyingVector = testVector.GetDataVector(); + for (size_t i = 0; i < indices.size(); ++i) + { + // Check that the data retrieved from GetData for a given index matches the data in the underlying vector for the raw index. + EXPECT_EQ(testVector.GetData(indices.at(i)), underlyingVector.at(testVector.GetRawIndex(indices.at(i)))); + } - EXPECT_EQ(TestIntVal, static_cast(myVec.GetData<0>(index))); - EXPECT_EQ(TestStringVal, static_cast(myVec.GetData<1>(index))); - EXPECT_EQ(TestDoubleVal, static_cast(myVec.GetData<2>(index))); - EXPECT_EQ(TestFloatVal, static_cast(myVec.GetData<3>(index))); - EXPECT_STREQ(TestConstPointerVal, static_cast(myVec.GetData<4>(index))); } } diff --git a/Gems/Atom/Feature/Common/Code/Tests/MultiIndexedDataVectorTests.cpp b/Gems/Atom/Feature/Common/Code/Tests/MultiIndexedDataVectorTests.cpp new file mode 100644 index 0000000000..5a317c41aa --- /dev/null +++ b/Gems/Atom/Feature/Common/Code/Tests/MultiIndexedDataVectorTests.cpp @@ -0,0 +1,320 @@ +/* + * Copyright (c) Contributors to the Open 3D Engine Project. + * For complete copyright and license terms please see the LICENSE at the root of this distribution. + * + * SPDX-License-Identifier: Apache-2.0 OR MIT + * + */ + +#include +#include +#include +#include +#include + + +namespace UnitTest +{ + using namespace AZ; + using namespace AZ::Render; + + class MultiIndexedDataVectorTests + : public UnitTest::AllocatorsTestFixture + { + public: + void SetUp() override + { + UnitTest::AllocatorsTestFixture::SetUp(); + } + + void TearDown() override + { + UnitTest::AllocatorsTestFixture::TearDown(); + } + }; + + TEST_F(MultiIndexedDataVectorTests, TestInsert) + { + enum Types + { + IntType = 0, + DoubleType = 1, + }; + + MultiIndexedDataVector myVec; + constexpr int NumToInsert = 5; + + AZStd::vector indices; + + for (int i = 0; i < NumToInsert; ++i) + { + auto index = myVec.GetFreeSlotIndex(); + indices.push_back(index); + myVec.GetData(index) = i; + myVec.GetData(index) = (double)i; + } + + for (size_t i = 0; i < NumToInsert; ++i) + { + auto index = indices[i]; + EXPECT_EQ(i, myVec.GetData(index)); + EXPECT_EQ((double)i, myVec.GetData(index)); + } + } + + TEST_F(MultiIndexedDataVectorTests, TestSize) + { + enum Types + { + IntType = 0, + }; + + MultiIndexedDataVector myVec; + constexpr int NumToInsert = 5; + for (int i = 0; i < NumToInsert; ++i) + { + auto index = myVec.GetFreeSlotIndex(); + myVec.GetData(index) = i; + } + EXPECT_EQ(NumToInsert, myVec.GetDataCount()); + EXPECT_EQ(NumToInsert, myVec.GetDataVector().size()); + + myVec.Clear(); + + EXPECT_EQ(0, myVec.GetDataCount()); + EXPECT_EQ(0, myVec.GetDataVector().size()); + } + + TEST_F(MultiIndexedDataVectorTests, TestErase) + { + enum Types + { + IntType = 0, + }; + + MultiIndexedDataVector myVec; + constexpr int NumToInsert = 200; + AZStd::unordered_map valueToIndex; + + for (int i = 0; i < NumToInsert; ++i) + { + auto index = myVec.GetFreeSlotIndex(); + valueToIndex[i] = index; + myVec.GetData(index) = i; + } + + // erase every even number + for (int i = 0; i < NumToInsert; i += 2) + { + uint16_t index = valueToIndex[i]; + auto previousRawIndex = myVec.GetRawIndex(index); + auto movedIndex = myVec.RemoveIndex(index); + if (movedIndex != MultiIndexedDataVector::NoFreeSlot) + { + auto newRawIndex = myVec.GetRawIndex(movedIndex); + + // RemoveIndex() returns the index of the item that moves into its spot if any, so check + // to make sure the Raw index of the old matches the raw index of the new + EXPECT_EQ(previousRawIndex, newRawIndex); + } + valueToIndex.erase(i); + } + + for (const auto& iter : valueToIndex) + { + int val = iter.first; + uint16_t index = iter.second; + EXPECT_EQ(val, myVec.GetData(index)); + } + } + + TEST_F(MultiIndexedDataVectorTests, TestManyTypes) + { + enum Types + { + IntType = 0, + StringType = 1, + DoubleType = 2, + FloatType = 3, + CharType = 4, + }; + + MultiIndexedDataVector myVec; + auto index = myVec.GetFreeSlotIndex(); + + constexpr int TestIntVal = INT_MIN; + constexpr double TestDoubleVal = -DBL_MIN; + const AZStd::string TestStringVal = "This is an AZStd::string."; + constexpr float TestFloatVal = FLT_MAX; + const char* TestConstPointerVal = "This is a C array."; + + myVec.GetData(index) = TestIntVal; + myVec.GetData(index) = TestStringVal; + myVec.GetData(index) = TestDoubleVal; + myVec.GetData(index) = TestFloatVal; + myVec.GetData(index) = TestConstPointerVal; + + EXPECT_EQ(TestIntVal, static_cast(myVec.GetData(index))); + EXPECT_EQ(TestStringVal, static_cast(myVec.GetData(index))); + EXPECT_EQ(TestDoubleVal, static_cast(myVec.GetData(index))); + EXPECT_EQ(TestFloatVal, static_cast(myVec.GetData(index))); + EXPECT_STREQ(TestConstPointerVal, static_cast(myVec.GetData(index))); + } + + MultiIndexedDataVector CreateTestVector(AZStd::vector& indices) + { + enum Types + { + IntType = 0, + FloatType = 1, + }; + + MultiIndexedDataVector myVec; + constexpr int32_t Count = 10; + int32_t startInt = 10; + float startFloat = 2.0f; + + // Create some initial values + for (uint32_t i = 0; i < Count; ++i) + { + uint16_t index = myVec.GetFreeSlotIndex(); + indices.push_back(index); + myVec.GetData(index) = startInt; + myVec.GetData(index) = startFloat; + startInt += 1; + startFloat += 1.0f; + } + + return myVec; + } + + void CheckIndexedData(MultiIndexedDataVector& data, AZStd::vector& indices) + { + enum Types + { + IntType = 0, + FloatType = 1, + }; + + // For each index, get its data and make sure GetIndexForData returns the same + // index used to retrieve the data + for (uint32_t i = 0; i < data.GetDataCount(); ++i) + { + int32_t& intData = data.GetData(indices.at(i)); + uint16_t indexForData = data.GetIndexForData(&intData); + EXPECT_EQ(indices.at(i), indexForData); + + float& floatData = data.GetData(indices.at(i)); + indexForData = data.GetIndexForData(&floatData); + EXPECT_EQ(indices.at(i), indexForData); + } + } + + TEST_F(MultiIndexedDataVectorTests, GetIndexForDataSimple) + { + AZStd::vector indices; + MultiIndexedDataVector myVec = CreateTestVector(indices); + CheckIndexedData(myVec, indices); + } + + TEST_F(MultiIndexedDataVectorTests, GetIndexForDataComplex) + { + enum Types + { + IntType = 0, + FloatType = 1, + }; + + AZStd::vector indices; + MultiIndexedDataVector myVec = CreateTestVector(indices); + + // remove every other value to shuffle the data around + for (uint32_t i = 0; i < myVec.GetDataCount(); i += 2) + { + myVec.RemoveIndex(indices.at(i)); + } + + int32_t startInt = 100; + float startFloat = 20.0f; + + // Add some data back in + const size_t count = myVec.GetDataCount(); + for (uint32_t i = 0; i < count; i += 2) + { + uint16_t index = myVec.GetFreeSlotIndex(); + indices.at(i) = index; + myVec.GetData(index) = startInt; + myVec.GetData(index) = startFloat; + startInt += 1; + startFloat += 1.0f; + } + + CheckIndexedData(myVec, indices); + } + + TEST_F(MultiIndexedDataVectorTests, ForEach) + { + enum Types + { + IntType = 0, + FloatType = 1, + }; + + MultiIndexedDataVector myVec; + constexpr int32_t Count = 10; + int32_t startInt = 10; + float startFloat = 2.0f; + + AZStd::vector indices; + AZStd::set intValues; + AZStd::set floatValues; + + // Create some initial values + for (uint32_t i = 0; i < Count; ++i) + { + uint16_t index = myVec.GetFreeSlotIndex(); + indices.push_back(index); + myVec.GetData(index) = startInt; + myVec.GetData(index) = startFloat; + intValues.insert(startInt); + floatValues.insert(startFloat); + startInt += 1; + startFloat += 1.0f; + } + + uint32_t visitCount = 0; + myVec.ForEach([&](int32_t value) -> bool + { + intValues.erase(value); + ++visitCount; + return true; // keep iterating + }); + + // All ints should have been visited and found in the set + EXPECT_EQ(visitCount, Count); + EXPECT_EQ(intValues.size(), 0); + + visitCount = 0; + myVec.ForEach([&](float value) -> bool + { + floatValues.erase(value); + ++visitCount; + return true; // keep iterating + }); + + // All floats should have been visited and found in the set + EXPECT_EQ(visitCount, Count); + EXPECT_EQ(floatValues.size(), 0); + + visitCount = 0; + myVec.ForEach([&]([[maybe_unused]] int32_t value) -> bool + { + ++visitCount; + return false; // stop iterating + }); + + // Since false is immediately returned, only one element should have been visited. + EXPECT_EQ(visitCount, 1); + + } +} diff --git a/Gems/Atom/Feature/Common/Code/atom_feature_common_files.cmake b/Gems/Atom/Feature/Common/Code/atom_feature_common_files.cmake index 184460b210..375dbd9724 100644 --- a/Gems/Atom/Feature/Common/Code/atom_feature_common_files.cmake +++ b/Gems/Atom/Feature/Common/Code/atom_feature_common_files.cmake @@ -46,9 +46,6 @@ set(FILES Include/Atom/Feature/Utils/MultiSparseVector.h Include/Atom/Feature/Utils/ProfilingCaptureBus.h Include/Atom/Feature/Utils/SparseVector.h - Include/Atom/Feature/LuxCore/LuxCoreBus.h - Include/Atom/Feature/LuxCore/LuxCoreTexturePass.h - Include/Atom/Feature/LuxCore/RenderTexturePass.h Source/CommonModule.cpp Source/CommonSystemComponent.cpp Source/FrameCaptureSystemComponent.cpp @@ -133,6 +130,8 @@ set(FILES Source/DiffuseGlobalIllumination/DiffuseProbeGridRelocationPass.h Source/DiffuseGlobalIllumination/DiffuseProbeGridClassificationPass.cpp Source/DiffuseGlobalIllumination/DiffuseProbeGridClassificationPass.h + Source/DiffuseGlobalIllumination/DiffuseProbeGridDownsamplePass.cpp + Source/DiffuseGlobalIllumination/DiffuseProbeGridDownsamplePass.h Source/DiffuseGlobalIllumination/DiffuseProbeGridRenderPass.cpp Source/DiffuseGlobalIllumination/DiffuseProbeGridRenderPass.h Source/DiffuseGlobalIllumination/DiffuseProbeGrid.cpp @@ -275,6 +274,8 @@ set(FILES Source/RayTracing/RayTracingPassData.h Source/ReflectionProbe/ReflectionProbeFeatureProcessor.cpp Source/ReflectionProbe/ReflectionProbe.cpp + Source/ReflectionScreenSpace/ReflectionScreenSpaceTracePass.cpp + Source/ReflectionScreenSpace/ReflectionScreenSpaceTracePass.h Source/ReflectionScreenSpace/ReflectionScreenSpaceBlurPass.cpp Source/ReflectionScreenSpace/ReflectionScreenSpaceBlurPass.h Source/ReflectionScreenSpace/ReflectionScreenSpaceBlurChildPass.cpp @@ -313,18 +314,6 @@ set(FILES Source/SkyBox/SkyBoxFogSettings.cpp Source/TransformService/TransformServiceFeatureProcessor.cpp Source/Utils/GpuBufferHandler.cpp - Source/LuxCore/LuxCoreTexturePass.cpp - Source/LuxCore/RenderTexturePass.cpp - Source/LuxCore/LuxCoreMaterial.cpp - Source/LuxCore/LuxCoreMaterial.h - Source/LuxCore/LuxCoreMesh.cpp - Source/LuxCore/LuxCoreMesh.h - Source/LuxCore/LuxCoreObject.cpp - Source/LuxCore/LuxCoreObject.h - Source/LuxCore/LuxCoreRenderer.cpp - Source/LuxCore/LuxCoreRenderer.h - Source/LuxCore/LuxCoreTexture.cpp - Source/LuxCore/LuxCoreTexture.h ) set(SKIP_UNITY_BUILD_INCLUSION_FILES diff --git a/Gems/Atom/Feature/Common/Code/atom_feature_common_tests_files.cmake b/Gems/Atom/Feature/Common/Code/atom_feature_common_tests_files.cmake index 1d94a2ae9e..99f3cf8e1a 100644 --- a/Gems/Atom/Feature/Common/Code/atom_feature_common_tests_files.cmake +++ b/Gems/Atom/Feature/Common/Code/atom_feature_common_tests_files.cmake @@ -11,6 +11,7 @@ set(FILES Tests/CommonTest.cpp Tests/CoreLights/ShadowmapAtlasTest.cpp Tests/IndexedDataVectorTests.cpp + Tests/MultiIndexedDataVectorTests.cpp Tests/IndexableListTests.cpp Tests/SparseVectorTests.cpp Tests/SkinnedMesh/SkinnedMeshDispatchItemTests.cpp diff --git a/Gems/Atom/Feature/Common/Editor/Scripts/ColorGrading/__init__.py b/Gems/Atom/Feature/Common/Editor/Scripts/ColorGrading/__init__.py index d500d6e09c..7e244dcfb2 100644 --- a/Gems/Atom/Feature/Common/Editor/Scripts/ColorGrading/__init__.py +++ b/Gems/Atom/Feature/Common/Editor/Scripts/ColorGrading/__init__.py @@ -163,6 +163,7 @@ _LOGGER.debug('Invoking __init__.py for {0}.'.format({_PACKAGENAME})) # ------------------------------------------------------------------------- +# ------------------------------------------------------------------------- def get_datadir() -> pathlib.Path: """ persistent application data. diff --git a/Gems/Atom/Feature/Common/Editor/Scripts/ColorGrading/capture_displaymapper.py b/Gems/Atom/Feature/Common/Editor/Scripts/ColorGrading/capture_displaymapper.py new file mode 100644 index 0000000000..bfcdf4c79e --- /dev/null +++ b/Gems/Atom/Feature/Common/Editor/Scripts/ColorGrading/capture_displaymapper.py @@ -0,0 +1,69 @@ +# coding:utf-8 +#!/usr/bin/python +# +# Copyright (c) Contributors to the Open 3D Engine Project. +# For complete copyright and license terms please see the LICENSE at the root of this distribution. +# +# SPDX-License-Identifier: Apache-2.0 OR MIT +# +# +"""Frame capture of the Displaymapper Passthrough (outputs .dds image)""" +# ------------------------------------------------------------------------ +import logging as _logging + +_MODULENAME = 'ColorGrading.capture_displaymapperpassthrough' + +import ColorGrading.initialize +ColorGrading.initialize.start() + +_LOGGER = _logging.getLogger(_MODULENAME) +_LOGGER.debug('Initializing: {0}.'.format({_MODULENAME})) +# ------------------------------------------------------------------------ + + +# ------------------------------------------------------------------------ +import azlmbr.bus +import azlmbr.atom + +# This requires the level to have the DisplayMapper component added +# and configured to 'Passthrough' +# but now we can capture the parent input +# so this is here for reference for how it previously worked +passtree_displaymapperpassthrough = ["Root", + "MainPipeline_0", + "MainPipeline", + "PostProcessPass", + "LightAdaptation", + "DisplayMapperPass", + "DisplayMapperPassthrough"] + +# we can grad the parent pass input to the displaymapper directly +passtree_default = ["Root", + "MainPipeline_0", + "MainPipeline", + "PostProcessPass", + "LightAdaptation", + "DisplayMapperPass"] + +default_path = "FrameCapture\DisplayMappeInput.dds" + +# To Do: we can wrap this, to call from a PySide2 GUI + +def capture(command="CapturePassAttachment", + passtree=passtree_default, + pass_type="Input", + output_path=default_path): + """Writes frame capture into project cache""" + azlmbr.atom.FrameCaptureRequestBus(azlmbr.bus.Broadcast, + command, + passtree, + pass_type, + output_path, 1) +# ------------------------------------------------------------------------ + + +########################################################################### +# Main Code Block, runs this script as main +# ------------------------------------------------------------------------- +if __name__ == '__main__': + capture() diff --git a/Gems/Atom/Feature/Common/Editor/Scripts/ColorGrading/capture_displaymapperpassthrough.py b/Gems/Atom/Feature/Common/Editor/Scripts/ColorGrading/capture_displaymapperpassthrough.py deleted file mode 100644 index 76cdd8450a..0000000000 --- a/Gems/Atom/Feature/Common/Editor/Scripts/ColorGrading/capture_displaymapperpassthrough.py +++ /dev/null @@ -1,61 +0,0 @@ -# coding:utf-8 -#!/usr/bin/python -# -# Copyright (c) Contributors to the Open 3D Engine Project. -# For complete copyright and license terms please see the LICENSE at the root of this distribution. -# -# SPDX-License-Identifier: Apache-2.0 OR MIT -# -# -"""Frame capture of the Displaymapper Passthrough (outputs .dds image)""" -# ------------------------------------------------------------------------ -import logging as _logging -from env_bool import env_bool - -# ------------------------------------------------------------------------ -_MODULENAME = 'ColorGrading.capture_displaymapperpassthrough' - -import ColorGrading.initialize -ColorGrading.initialize.start() - -_LOGGER = _logging.getLogger(_MODULENAME) -_LOGGER.debug('Initializing: {0}.'.format({_MODULENAME})) -# ------------------------------------------------------------------------ - - -# ------------------------------------------------------------------------ -import azlmbr.bus -import azlmbr.atom - -default_passtree = ["Root", - "MainPipeline_0", - "MainPipeline", - "PostProcessPass", - "LightAdaptation", - "DisplayMapperPass", - "DisplayMapperPassthrough"] - -default_path = "FrameCapture\DisplayMapperPassthrough.dds" - -# To Do: we should try to set display mapper to passthrough, -# then back after capture? - -# To Do: we can wrap this, to call from a PySide2 GUI - -def capture(command="CapturePassAttachment", - passtree=default_passtree, - pass_type="Output", - output_path=default_path): - azlmbr.atom.FrameCaptureRequestBus(azlmbr.bus.Broadcast, - command, - passtree, - pass_type, - output_path, 1) -# ------------------------------------------------------------------------ - - -########################################################################### -# Main Code Block, runs this script as main -# ------------------------------------------------------------------------- -if __name__ == '__main__': - capture() diff --git a/Gems/Atom/Feature/Common/Editor/Scripts/ColorGrading/initialize.py b/Gems/Atom/Feature/Common/Editor/Scripts/ColorGrading/initialize.py index ac64ade322..3a6356f4c9 100644 --- a/Gems/Atom/Feature/Common/Editor/Scripts/ColorGrading/initialize.py +++ b/Gems/Atom/Feature/Common/Editor/Scripts/ColorGrading/initialize.py @@ -32,10 +32,7 @@ if DCCSI_GDEBUG: DCCSI_LOGLEVEL = int(10) # set up logger with both console and file _logging -if DCCSI_GDEBUG: - _LOGGER = initialize_logger(_PACKAGENAME, log_to_file=True, default_log_level=DCCSI_LOGLEVEL) -else: - _LOGGER = initialize_logger(_PACKAGENAME, log_to_file=False, default_log_level=DCCSI_LOGLEVEL) +_LOGGER = initialize_logger(_PACKAGENAME, log_to_file=DCCSI_GDEBUG, default_log_level=DCCSI_LOGLEVEL) _LOGGER.debug('Initializing: {0}.'.format({_MODULENAME})) @@ -46,7 +43,7 @@ if DCCSI_DEV_MODE: APPDATA = get_datadir() # os APPDATA APPDATA_WING = Path(APPDATA, f"Wing Pro {DCCSI_WING_VERSION_MAJOR}").resolve() if APPDATA_WING.exists(): - site.addsitedir(pathlib.PureWindowsPath(APPDATA_WING).as_posix()) + site.addsitedir(APPDATA_WING.resolve()) import wingdbstub as debugger try: debugger.Ensure() @@ -75,8 +72,7 @@ def start(): try: _O3DE_DEV = Path(os.getenv('O3DE_DEV')) - _O3DE_DEV = _O3DE_DEV.resolve() - os.environ['O3DE_DEV'] = pathlib.PureWindowsPath(_O3DE_DEV).as_posix() + os.environ['O3DE_DEV'] = _O3DE_DEV.as_posix() _LOGGER.debug(f'O3DE_DEV is: {_O3DE_DEV}') except EnvironmentError as e: _LOGGER.error('O3DE engineroot not set or found') @@ -85,24 +81,23 @@ def start(): try: _TAG_LY_BUILD_PATH = os.getenv('TAG_LY_BUILD_PATH', 'build') _DEFAULT_BIN_PATH = Path(str(_O3DE_DEV), _TAG_LY_BUILD_PATH, 'bin', 'profile') - _O3DE_BIN_PATH = Path(os.getenv('O3DE_BIN_PATH', _DEFAULT_BIN_PATH)) - _O3DE_BIN_PATH = _O3DE_BIN_PATH.resolve() - os.environ['O3DE_BIN_PATH'] = pathlib.PureWindowsPath(_O3DE_BIN_PATH).as_posix() - _LOGGER.debug(f'O3DE_BIN_PATH is: {_O3DE_BIN_PATH}') - site.addsitedir(pathlib.PureWindowsPath(_O3DE_BIN_PATH).as_posix()) + _PATH_O3DE_BIN = Path(os.getenv('PATH_O3DE_BIN', _DEFAULT_BIN_PATH)) + os.environ['PATH_O3DE_BIN'] = _PATH_O3DE_BIN.as_posix() + _LOGGER.debug(f'PATH_O3DE_BIN is: {_PATH_O3DE_BIN}') + site.addsitedir(_PATH_O3DE_BIN.resolve()) except EnvironmentError as e: _LOGGER.error('O3DE bin folder not set or found') raise e if running_editor: _O3DE_DEV = Path(os.getenv('O3DE_DEV', Path(azlmbr.paths.engroot))) - os.environ['O3DE_DEV'] = pathlib.PureWindowsPath(_O3DE_DEV).as_posix() + os.environ['O3DE_DEV'] = _O3DE_DEV.as_posix() _LOGGER.debug(_O3DE_DEV) - _O3DE_BIN_PATH = Path(str(_O3DE_DEV),Path(azlmbr.paths.executableFolder)) + _PATH_O3DE_BIN = Path(str(_O3DE_DEV),Path(azlmbr.paths.executableFolder)) - _O3DE_BIN = Path(os.getenv('O3DE_BIN', _O3DE_BIN_PATH.resolve())) - os.environ['O3DE_BIN'] = pathlib.PureWindowsPath(_O3DE_BIN).as_posix() + _O3DE_BIN = Path(os.getenv('O3DE_BIN', _PATH_O3DE_BIN.resolve())) + os.environ['O3DE_BIN'] = _PATH_O3DE_BIN.as_posix() _LOGGER.debug(_O3DE_BIN) diff --git a/Gems/Atom/Feature/Common/Tools/ColorGrading/cmdline/CMD_ColorGradingTools.bat b/Gems/Atom/Feature/Common/Tools/ColorGrading/cmdline/CMD_ColorGradingTools.bat index 56021c0801..89dd86be80 100644 --- a/Gems/Atom/Feature/Common/Tools/ColorGrading/cmdline/CMD_ColorGradingTools.bat +++ b/Gems/Atom/Feature/Common/Tools/ColorGrading/cmdline/CMD_ColorGradingTools.bat @@ -34,15 +34,15 @@ SETLOCAL ENABLEDELAYEDEXPANSION IF EXIST "%~dp0User_Env.bat" CALL %~dp0User_Env.bat :: Initialize env -echo +echo. echo ... calling Env_Core.bat CALL %~dp0\Env_Core.bat -echo +echo. echo ... calling Env_Python.bat CALL %~dp0\Env_Python.bat -echo +echo. echo ... calling Env_Tools.bat CALL %~dp0\Env_Tools.bat diff --git a/Gems/Atom/Feature/Common/Tools/ColorGrading/cmdline/Env_Python.bat b/Gems/Atom/Feature/Common/Tools/ColorGrading/cmdline/Env_Python.bat index fc4afc964e..ffb34b06e5 100644 --- a/Gems/Atom/Feature/Common/Tools/ColorGrading/cmdline/Env_Python.bat +++ b/Gems/Atom/Feature/Common/Tools/ColorGrading/cmdline/Env_Python.bat @@ -27,37 +27,19 @@ echo ~ O3DE Color Grading Python Env ... echo _____________________________________________________________________ echo. -:: Python Version -:: Ideally these are set to match the O3DE python distribution -:: \python\runtime -IF "%DCCSI_PY_VERSION_MAJOR%"=="" (set DCCSI_PY_VERSION_MAJOR=3) -echo DCCSI_PY_VERSION_MAJOR = %DCCSI_PY_VERSION_MAJOR% - -:: PY version Major -IF "%DCCSI_PY_VERSION_MINOR%"=="" (set DCCSI_PY_VERSION_MINOR=7) -echo DCCSI_PY_VERSION_MINOR = %DCCSI_PY_VERSION_MINOR% - -IF "%DCCSI_PY_VERSION_RELEASE%"=="" (set DCCSI_PY_VERSION_RELEASE=10) -echo DCCSI_PY_VERSION_RELEASE = %DCCSI_PY_VERSION_RELEASE% - -:: shared location for 64bit python 3.7 DEV location -:: this defines a DCCsi sandbox for lib site-packages by version -:: \Gems\AtomLyIntegration\TechnicalArt\DccScriptingInterface\3rdParty\Python\Lib -set DCCSI_PYTHON_PATH=%DCCSIG_PATH%\3rdParty\Python -echo DCCSI_PYTHON_PATH = %DCCSI_PYTHON_PATH% - -:: add access to a Lib location that matches the py version (example: 3.7.x) -:: switch this for other python versions like maya (2.7.x) -IF "%DCCSI_PYTHON_LIB_PATH%"=="" (set DCCSI_PYTHON_LIB_PATH=%DCCSI_PYTHON_PATH%\Lib\%DCCSI_PY_VERSION_MAJOR%.x\%DCCSI_PY_VERSION_MAJOR%.%DCCSI_PY_VERSION_MINOR%.x\site-packages) -echo DCCSI_PYTHON_LIB_PATH = %DCCSI_PYTHON_LIB_PATH% - -:: add to the PATH -SET PATH=%DCCSI_PYTHON_LIB_PATH%;%PATH% - :: shared location for default O3DE python location set DCCSI_PYTHON_INSTALL=%O3DE_DEV%\Python echo DCCSI_PYTHON_INSTALL = %DCCSI_PYTHON_INSTALL% +:: Warning, many DCC tools (like Maya) include thier own versioned python interpretter. +:: Some apps may not operate correctly if PYTHONHOME is set/propogated. +:: This is definitely the case with Maya, doing so causes Maya to not boot. +FOR /F "tokens=* USEBACKQ" %%F IN (`%DCCSI_PYTHON_INSTALL%\python.cmd %DCCSI_PYTHON_INSTALL%\get_python_path.py`) DO (SET PYTHONHOME=%%F) +echo PYTHONHOME - is now the folder containing O3DE python executable +echo PYTHONHOME = %PYTHONHOME% + +SET PYTHON=%PYTHONHOME%\python.exe + :: location for O3DE python 3.7 location set DCCSI_PY_BASE=%DCCSI_PYTHON_INSTALL%\python.cmd echo DCCSI_PY_BASE = %DCCSI_PY_BASE% @@ -65,10 +47,7 @@ echo DCCSI_PY_BASE = %DCCSI_PY_BASE% :: ide and debugger plug set DCCSI_PY_DEFAULT=%DCCSI_PY_BASE% -IF "%DCCSI_PY_REV%"=="" (set DCCSI_PY_REV=rev2) -IF "%DCCSI_PY_PLATFORM%"=="" (set DCCSI_PY_PLATFORM=windows) - -set DCCSI_PY_IDE=%DCCSI_PYTHON_INSTALL%\runtime\python-%DCCSI_PY_VERSION_MAJOR%.%DCCSI_PY_VERSION_MINOR%.%DCCSI_PY_VERSION_RELEASE%-%DCCSI_PY_REV%-%DCCSI_PY_PLATFORM%\python +set DCCSI_PY_IDE=%PYTHONHOME% echo DCCSI_PY_IDE = %DCCSI_PY_IDE% :: Wing and other IDEs probably prefer access directly to the python.exe @@ -91,11 +70,6 @@ SET PATH=%DCCSI_PYTHON_INSTALL%;%DCCSI_PY_IDE%;%DCCSI_PY_IDE_PACKAGES%;%DCCSI_PY set PYTHONPATH=%DCCSIG_PATH%;%DCCSI_PYTHON_LIB_PATH%;%O3DE_BIN_PATH%;%DCCSI_COLORGRADING_SCRIPTS%;%DCCSI_FEATURECOMMON_SCRIPTS%;%PYTHONPATH% echo PYTHONPATH = %PYTHONPATH% -:: used for debugging in WingIDE (but needs to be here) -IF "%TAG_USERNAME%"=="" (set TAG_USERNAME=NOT_SET) -echo TAG_USERNAME = %TAG_USERNAME% -IF "%TAG_USERNAME%"=="NOT_SET" (echo Add TAG_USERNAME to User_Env.bat) - :: Set flag so we don't initialize dccsi environment twice SET O3DE_ENV_PY_INIT=1 GOTO END_OF_FILE diff --git a/Gems/Atom/Feature/Common/Tools/ColorGrading/cmdline/User_Env.bat.template b/Gems/Atom/Feature/Common/Tools/ColorGrading/cmdline/User_Env.bat.template index 973d6d5afd..7ab970c98e 100644 --- a/Gems/Atom/Feature/Common/Tools/ColorGrading/cmdline/User_Env.bat.template +++ b/Gems/Atom/Feature/Common/Tools/ColorGrading/cmdline/User_Env.bat.template @@ -25,11 +25,6 @@ SET TAG_LY_BUILD_PATH=build SET DCCSI_GDEBUG=True SET DCCSI_DEV_MODE=True -:: set the your user name here for windows path -SET TAG_USERNAME=NOT_SET -SET DCCSI_PY_REV=rev1 -SET DCCSI_PY_PLATFORM=windows - :: Set flag so we don't initialize dccsi environment twice SET O3DE_USER_ENV_INIT=1 GOTO END_OF_FILE diff --git a/Gems/Atom/Feature/Common/gem.json b/Gems/Atom/Feature/Common/gem.json index 36a61fbbbb..84ab07a9f9 100644 --- a/Gems/Atom/Feature/Common/gem.json +++ b/Gems/Atom/Feature/Common/gem.json @@ -2,6 +2,7 @@ "gem_name": "Atom_Feature_Common", "display_name": "Atom Feature Common", "license": "Apache-2.0 Or MIT", + "license_url": "https://github.com/o3de/o3de/blob/development/LICENSE.txt", "origin": "Open 3D Engine - o3de.org", "type": "Code", "summary": "", diff --git a/Gems/Atom/RHI/Code/Include/Atom/RHI.Reflect/BufferDescriptor.h b/Gems/Atom/RHI/Code/Include/Atom/RHI.Reflect/BufferDescriptor.h index c271045ed0..1a34cf00cd 100644 --- a/Gems/Atom/RHI/Code/Include/Atom/RHI.Reflect/BufferDescriptor.h +++ b/Gems/Atom/RHI/Code/Include/Atom/RHI.Reflect/BufferDescriptor.h @@ -61,7 +61,11 @@ namespace AZ (RayTracingAccelerationStructure , AZ_BIT(9)), /// Supports ray tracing shader table usage. - (RayTracingShaderTable , AZ_BIT(10))); + (RayTracingShaderTable , AZ_BIT(10)), + + /// Supports ray tracing scratch buffer usage. + (RayTracingScratchBuffer, AZ_BIT(11))); + AZ_DEFINE_ENUM_BITWISE_OPERATORS(AZ::RHI::BufferBindFlags); diff --git a/Gems/Atom/RHI/Code/Include/Atom/RHI.Reflect/ImageSubresource.h b/Gems/Atom/RHI/Code/Include/Atom/RHI.Reflect/ImageSubresource.h index 8343da0999..506fab0583 100644 --- a/Gems/Atom/RHI/Code/Include/Atom/RHI.Reflect/ImageSubresource.h +++ b/Gems/Atom/RHI/Code/Include/Atom/RHI.Reflect/ImageSubresource.h @@ -127,9 +127,9 @@ namespace AZ static void Reflect(AZ::ReflectContext* context); ImageSubresourceLayoutPlaced() = default; - ImageSubresourceLayoutPlaced(const ImageSubresourceLayout& subresourceLayout, size_t offset); + ImageSubresourceLayoutPlaced(const ImageSubresourceLayout& subresourceLayout, uint32_t offset); - size_t m_offset = 0; + uint32_t m_offset = 0; }; /** diff --git a/Gems/Atom/RHI/Code/Include/Atom/RHI/CommandQueue.h b/Gems/Atom/RHI/Code/Include/Atom/RHI/CommandQueue.h index 2985581040..4ae560c816 100644 --- a/Gems/Atom/RHI/Code/Include/Atom/RHI/CommandQueue.h +++ b/Gems/Atom/RHI/Code/Include/Atom/RHI/CommandQueue.h @@ -72,6 +72,8 @@ namespace AZ AZStd::mutex m_workQueueMutex; AZStd::queue m_workQueue; AZStd::condition_variable m_workQueueCondition; + AZStd::mutex m_flushCommandsMutex; + AZStd::condition_variable m_flushCommandsCondition; AZStd::atomic_bool m_isWorkQueueEmpty; AZStd::atomic_bool m_isQuitting; }; diff --git a/Gems/Atom/RHI/Code/Include/Atom/RHI/ConstantsData.h b/Gems/Atom/RHI/Code/Include/Atom/RHI/ConstantsData.h index 82b0b7146b..fd38e4c08d 100644 --- a/Gems/Atom/RHI/Code/Include/Atom/RHI/ConstantsData.h +++ b/Gems/Atom/RHI/Code/Include/Atom/RHI/ConstantsData.h @@ -8,6 +8,7 @@ #pragma once #include +#include #include #include #include @@ -147,6 +148,9 @@ namespace AZ template <> bool ConstantsData::SetConstant(ShaderInputConstantIndex inputIndex, const Vector4& value); + template <> + bool ConstantsData::SetConstant(ShaderInputConstantIndex inputIndex, const Color& value); + template <> bool ConstantsData::SetConstantArray(ShaderInputConstantIndex inputIndex, AZStd::array_view values); @@ -171,6 +175,9 @@ namespace AZ template <> Vector4 ConstantsData::GetConstant(ShaderInputConstantIndex inputIndex) const; + template <> + Color ConstantsData::GetConstant(ShaderInputConstantIndex inputIndex) const; + template bool ConstantsData::SetConstantMatrixRows(ShaderInputConstantIndex inputIndex, const T& value, uint32_t rowCount) { diff --git a/Gems/Atom/RHI/Code/Include/Atom/RHI/Factory.h b/Gems/Atom/RHI/Code/Include/Atom/RHI/Factory.h index 71f9f1605b..1755d45a74 100644 --- a/Gems/Atom/RHI/Code/Include/Atom/RHI/Factory.h +++ b/Gems/Atom/RHI/Code/Include/Atom/RHI/Factory.h @@ -112,6 +112,9 @@ namespace AZ //! Returns true if Pix dll is loaded static bool IsPixModuleLoaded(); + //! Returns true if Pix GPU events should be emitted + static bool PixGpuEventsEnabled(); + //! Returns true if Warp is enabled static bool UsingWarpDevice(); diff --git a/Gems/Atom/RHI/Code/Include/Atom/RHI/FrameGraphAttachmentDatabase.h b/Gems/Atom/RHI/Code/Include/Atom/RHI/FrameGraphAttachmentDatabase.h index 3872f5dc6a..054bc936fa 100644 --- a/Gems/Atom/RHI/Code/Include/Atom/RHI/FrameGraphAttachmentDatabase.h +++ b/Gems/Atom/RHI/Code/Include/Atom/RHI/FrameGraphAttachmentDatabase.h @@ -40,78 +40,94 @@ namespace AZ public: FrameGraphAttachmentDatabase() = default; - /// Clears the database back to an empty state. + //! Clears the database back to an empty state. void Clear(); - /// Imports an image into the database. + //! Imports an image into the database. ResultCode ImportImage(const AttachmentId& attachmentId, Ptr image); - /// Imports a swapchain into the database. + //! Imports a swapchain into the database. ResultCode ImportSwapChain(const AttachmentId& attachmentId, Ptr swapChain); - /// Imports a buffer into the database. + //! Imports a buffer into the database. ResultCode ImportBuffer(const AttachmentId& attachmentId, Ptr buffer); - /// Creates a transient image and inserts it into the database. + //! Creates a transient image and inserts it into the database. ResultCode CreateTransientImage(const TransientImageDescriptor& descriptor); - /// Creates a transient buffer and inserts it into the database. + //! Creates a transient buffer and inserts it into the database. ResultCode CreateTransientBuffer(const TransientBufferDescriptor& descriptor); - /// Finds the attachment associated with \param attachmentId and returns its image descriptor. + //! Finds the attachment associated with \param attachmentId and returns its image descriptor. ImageDescriptor GetImageDescriptor(const AttachmentId& attachmentId) const; - /// Finds the attachment associated with \param attachmentId and returns its buffer descriptor. + //! Finds the attachment associated with \param attachmentId and returns its buffer descriptor. BufferDescriptor GetBufferDescriptor(const AttachmentId& attachmentId) const; - /// Returns whether the attachment exists in the database. + //! Returns whether the attachment exists in the database. bool IsAttachmentValid(const AttachmentId& attachmentId) const; - /// Finds an attachment associated with \param attachmentId. + //! Finds an attachment associated with \param attachmentId. const FrameAttachment* FindAttachment(const AttachmentId& attachmentId) const; FrameAttachment* FindAttachment(const AttachmentId& attachmentId); - /// Finds an attachment associated with \param attachmentId and attempts to cast - /// to the requested type. Will return null if the type is not compatible, or the - /// attachment was not found. + //! Finds an attachment associated with \param attachmentId and attempts to cast + //! to the requested type. Will return null if the type is not compatible, or the + //! attachment was not found. template const AttachmentType* FindAttachment(const AttachmentId& attachmentId) const; template AttachmentType* FindAttachment(const AttachmentId& attachmentId); - /// Returns the full list of attachments. + //! Returns the full list of attachments. const AZStd::vector& GetAttachments() const; - /// Returns the full list of image attachments. + //! Returns the full list of image attachments. const AZStd::vector& GetImageAttachments() const; - /// Returns the full list of buffer attachments. + //! Returns the full list of buffer attachments. const AZStd::vector& GetBufferAttachments() const; - /// Returns the transient swap chain attachments registered in the graph. + //! Returns the transient swap chain attachments registered in the graph. const AZStd::vector& GetSwapChainAttachments() const; - /// Returns the imported image attachments registered in the graph. + //! Returns the imported image attachments registered in the graph. const AZStd::vector& GetImportedImageAttachments() const; - /// Returns the imported buffer attachments registered in the graph. + //! Returns the imported buffer attachments registered in the graph. const AZStd::vector& GetImportedBufferAttachments() const; - /// Returns the transient image attachments registered in the graph. + //! Returns the transient image attachments registered in the graph. const AZStd::vector& GetTransientImageAttachments() const; - /// Returns the transient buffer attachments registered in the graph. + //! Returns the transient buffer attachments registered in the graph. const AZStd::vector& GetTransientBufferAttachments() const; - /// Finds the list of scope attachments used by a scope for the given attachment. + //! Finds the list of scope attachments used by a scope for the given attachment. const ScopeAttachmentPtrList* FindScopeAttachmentList(const ScopeId& scopeId, const AttachmentId& attachmentId) const; - /// Finds the scope attachment used by a scope for the given attachment. If multiple scope attachments are used for the - /// same attachment (like binding multiple mips of a texture), the index parameter will specify which one to select. - const ScopeAttachment* FindScopeAttachment(const ScopeId& scopeId, const AttachmentId& attachmentId, size_t index = 0) const; + //! Finds the scope attachment used by a scope for the given attachment + const ScopeAttachment* FindScopeAttachment(const ScopeId& scopeId, const AttachmentId& attachmentId) const; - /// Returns the full list of scope attachments. + //! Finds the scope attachment used by a scope for the given attachment. If multiple scope image attachments are used for the + //! same attachment, provide ScopeAttachmentUsage (in case attachments are merged) and + //! ImageViewDescriptor (in case the attachments are different based on view, i.e different mips or aspect of a texture) to ensure + //! that the correct scope attachment is returned. + const ScopeAttachment* FindScopeAttachment( + const ScopeId& scopeId, + const AttachmentId& attachmentId, + const ImageViewDescriptor& imageViewDescriptor, + const RHI::ScopeAttachmentUsage attachmentUsage) const; + + //! Finds the scope attachment used by a scope for the given attachment. If multiple scope attachments are used for the same attachment + //! provide attachmentUsage to ensure that the correct scope attachment is returned + const ScopeAttachment* FindScopeAttachment( + const ScopeId& scopeId, + const AttachmentId& attachmentId, + const RHI::ScopeAttachmentUsage attachmentUsage) const; + + //! Returns the full list of scope attachments. const ScopeAttachmentPtrList& GetScopeAttachments() const; template @@ -120,8 +136,8 @@ namespace AZ FrameAttachment& attachment, Args&&... arguments); - /// Emplaces a use of a resource pool by a specific scope. Returns the ScopeId of the most recent use of the pool or en empty - /// ScopeId if this is the first use. + //! Emplaces a use of a resource pool by a specific scope. Returns the ScopeId of the most recent use of the pool or en empty + //! ScopeId if this is the first use. ScopeId EmplaceResourcePoolUse(ResourcePool& pool, ScopeId scopeId); private: diff --git a/Gems/Atom/RHI/Code/Include/Atom/RHI/FrameGraphCompileContext.h b/Gems/Atom/RHI/Code/Include/Atom/RHI/FrameGraphCompileContext.h index ded542ec8c..71c77194ae 100644 --- a/Gems/Atom/RHI/Code/Include/Atom/RHI/FrameGraphCompileContext.h +++ b/Gems/Atom/RHI/Code/Include/Atom/RHI/FrameGraphCompileContext.h @@ -8,6 +8,7 @@ #pragma once #include +#include #include namespace AZ @@ -19,15 +20,15 @@ namespace AZ class BufferView; class Image; class ImageView; + class ScopeAttachment; struct BufferDescriptor; struct ImageDescriptor; + struct ImageViewDescriptor; - /** - * FrameGraphCompileContext provides access to compiled image and buffer views - * associated with the provided scope id, along with other query methods for - * accessing attachment resource data. This information can be used to - * compile ShaderResourceGroups. - */ + //! FrameGraphCompileContext provides access to compiled image and buffer views + //! associated with the provided scope id, along with other query methods for + //! accessing attachment resource data. This information can be used to + //! compile ShaderResourceGroups. class FrameGraphCompileContext { public: @@ -37,31 +38,46 @@ namespace AZ const ScopeId& scopeId, const FrameGraphAttachmentDatabase& attachmentDatabase); - /// Returns the scope id associated with this context. + //! Returns the scope id associated with this context. const ScopeId& GetScopeId() const; - /// Returns whether the given attachment id is valid within the current frame. + //! Returns whether the given attachment id is valid within the current frame. bool IsAttachmentValid(const AttachmentId& attachmentId) const; - /// Returns the number of scope attachments used by the current scope for the given attachment + //! Returns the number of scope attachments used by the current scope for the given attachment const size_t GetScopeAttachmentCount(const AttachmentId& attachmentId) const; - /// Returns the buffer view associated with usage on the current scope. - const BufferView* GetBufferView(const AttachmentId& attachmentId, size_t index = 0) const; + //! Returns the buffer view associated with the scope attachment. + const BufferView* GetBufferView(const ScopeAttachment* scopeAttachment) const; - /// Returns the buffer associated with usage on the current scope. + //! Returns the buffer view associated with the attachmentId. + const BufferView* GetBufferView(const AttachmentId& attachmentId) const; + + //! Returns the buffer view associated with attachmentId and the attachmentUsage on the current scope. + const BufferView* GetBufferView(const AttachmentId& attachmentId, RHI::ScopeAttachmentUsage attachmentUsage) const; + + //! Returns the buffer associated with attachmentId. const Buffer* GetBuffer(const AttachmentId& attachmentId) const; - /// Returns the image view associated with usage on the current scope. - const ImageView* GetImageView(const AttachmentId& attachmentId, size_t index = 0) const; + //! Returns the image view associated with the scope attachment + const ImageView* GetImageView(const ScopeAttachment* scopeAttacment) const; - /// Returns the image associated with usage on the current scope. + //! Returns the image view associated with attachmentId, attachmentUsage and imageViewDescriptor on the current scope. + const ImageView* GetImageView( + const AttachmentId& attachmentId, + const ImageViewDescriptor& imageViewDescriptor, + const RHI::ScopeAttachmentUsage attachmentUsage) const; + + //! Returns the image view associated with the attachmentId. + const ImageView* GetImageView(const AttachmentId& attachmentId) const; + + //! Returns the image associated with the attachmentId. const Image* GetImage(const AttachmentId& attachmentId) const; - /// Returns the buffer descriptor for the given attachment id. + //! Returns the buffer descriptor for the given attachment id. BufferDescriptor GetBufferDescriptor(const AttachmentId& attachmentId) const; - /// Returns the image descriptor for the given attachment id. + //! Returns the image descriptor for the given attachment id. ImageDescriptor GetImageDescriptor(const AttachmentId& attachmentId) const; private: diff --git a/Gems/Atom/RHI/Code/Include/Atom/RHI/MemorySubAllocator.h b/Gems/Atom/RHI/Code/Include/Atom/RHI/MemorySubAllocator.h index 3e464a6974..4a038276d1 100644 --- a/Gems/Atom/RHI/Code/Include/Atom/RHI/MemorySubAllocator.h +++ b/Gems/Atom/RHI/Code/Include/Atom/RHI/MemorySubAllocator.h @@ -7,12 +7,13 @@ */ #pragma once +#include #include #include #include #include -#include +AZ_DECLARE_BUDGET(RHI); namespace AZ { @@ -90,13 +91,15 @@ namespace AZ m_pageAllocator = &pageAllocator; m_descriptor = descriptor; m_descriptor.m_addressBase = 0; - m_descriptor.m_capacityInBytes = m_pageAllocator->GetPageSize(); + if (m_descriptor.m_capacityInBytes == 0) + { + m_descriptor.m_capacityInBytes = m_pageAllocator->GetPageSize(); + } } template typename MemorySubAllocator::memory_allocation MemorySubAllocator::Allocate(size_t sizeInBytes, size_t alignmentInBytes) { - AZ_TRACE_METHOD(); if (RHI::AlignUp(sizeInBytes, alignmentInBytes) > m_descriptor.m_capacityInBytes) { return memory_allocation(); diff --git a/Gems/Atom/RHI/Code/Include/Atom/RHI/RayTracingBufferPools.h b/Gems/Atom/RHI/Code/Include/Atom/RHI/RayTracingBufferPools.h index 6cc0f2d264..288a83b4da 100644 --- a/Gems/Atom/RHI/Code/Include/Atom/RHI/RayTracingBufferPools.h +++ b/Gems/Atom/RHI/Code/Include/Atom/RHI/RayTracingBufferPools.h @@ -44,7 +44,7 @@ namespace AZ RayTracingBufferPools() = default; virtual RHI::BufferBindFlags GetShaderTableBufferBindFlags() const { return RHI::BufferBindFlags::ShaderRead | RHI::BufferBindFlags::CopyRead | RHI::BufferBindFlags::RayTracingShaderTable; } - virtual RHI::BufferBindFlags GetScratchBufferBindFlags() const { return RHI::BufferBindFlags::ShaderReadWrite; } + virtual RHI::BufferBindFlags GetScratchBufferBindFlags() const { return RHI::BufferBindFlags::ShaderReadWrite | RHI::BufferBindFlags::RayTracingScratchBuffer; } virtual RHI::BufferBindFlags GetBlasBufferBindFlags() const { return RHI::BufferBindFlags::ShaderReadWrite | RHI::BufferBindFlags::RayTracingAccelerationStructure; } virtual RHI::BufferBindFlags GetTlasInstancesBufferBindFlags() const { return RHI::BufferBindFlags::ShaderRead; } virtual RHI::BufferBindFlags GetTlasBufferBindFlags() const { return RHI::BufferBindFlags::RayTracingAccelerationStructure; } diff --git a/Gems/Atom/RHI/Code/Include/Atom/RHI/SwapChain.h b/Gems/Atom/RHI/Code/Include/Atom/RHI/SwapChain.h index 97ac3baa90..abad1fb263 100644 --- a/Gems/Atom/RHI/Code/Include/Atom/RHI/SwapChain.h +++ b/Gems/Atom/RHI/Code/Include/Atom/RHI/SwapChain.h @@ -75,6 +75,9 @@ namespace AZ //! Return True if the swap chain prefers exclusive full screen mode and a transition happened, false otherwise. virtual bool SetExclusiveFullScreenState([[maybe_unused]]bool fullScreenState) { return false; } + //! Recreate the swapchain if it becomes invalid during presenting. This should happen at the end of the frame + //! due to images being used as attachments in the frame graph. + virtual void ProcessRecreation() {}; protected: SwapChain(); @@ -98,6 +101,14 @@ namespace AZ ////////////////////////////////////////////////////////////////////////// + //! Shutdown and clear all the images. + void ShutdownImages(); + + //! Initialized all the images. + ResultCode InitImages(); + + //! Flag indicating if swapchain recreation is needed at the end of the frame. + bool m_pendingRecreation = false; private: bool ValidateDescriptor(const SwapChainDescriptor& descriptor) const; diff --git a/Gems/Atom/RHI/Code/Platform/Mac/AtomRHITests_traits_mac.cmake b/Gems/Atom/RHI/Code/Platform/Mac/AtomRHITests_traits_mac.cmake index 419331db3b..4645eb9444 100644 --- a/Gems/Atom/RHI/Code/Platform/Mac/AtomRHITests_traits_mac.cmake +++ b/Gems/Atom/RHI/Code/Platform/Mac/AtomRHITests_traits_mac.cmake @@ -6,6 +6,6 @@ # # -set(ATOM_RHI_TRAIT_BUILD_SUPPORTS_TEST TRUE) +set(ATOM_RHI_TRAIT_BUILD_SUPPORTS_TEST FALSE) set(ATOM_RHI_TRAIT_BUILD_SUPPORTS_EDIT TRUE) set(PAL_TRAIT_BUILD_RENDERDOC_SUPPORTED FALSE) diff --git a/Gems/Atom/RHI/Code/Source/RHI.Edit/Utils.cpp b/Gems/Atom/RHI/Code/Source/RHI.Edit/Utils.cpp index dc203ef731..6b5b9cc3a5 100644 --- a/Gems/Atom/RHI/Code/Source/RHI.Edit/Utils.cpp +++ b/Gems/Atom/RHI/Code/Source/RHI.Edit/Utils.cpp @@ -264,9 +264,9 @@ namespace AZ } { AZStd::string contextKey = toolNameForLog + AZStd::string(" Command Line"); - AZ_TraceContext(contextKey, processLaunchInfo.m_commandlineParameters); + AZ_TraceContext(contextKey, processLaunchInfo.GetCommandLineParametersAsString()); } - AZ_TracePrintf(ShaderPlatformInterfaceName, "Executing '%s' ...", processLaunchInfo.m_commandlineParameters.c_str()); + AZ_TracePrintf(ShaderPlatformInterfaceName, "Executing '%s' ...", processLaunchInfo.GetCommandLineParametersAsString().c_str()); AzFramework::ProcessWatcher* watcher = AzFramework::ProcessWatcher::LaunchProcess(processLaunchInfo, AzFramework::COMMUNICATOR_TYPE_STDINOUT); if (!watcher) diff --git a/Gems/Atom/RHI/Code/Source/RHI.Reflect/ConstantsLayout.cpp b/Gems/Atom/RHI/Code/Source/RHI.Reflect/ConstantsLayout.cpp index 8be053e4ef..8b9d6ae668 100644 --- a/Gems/Atom/RHI/Code/Source/RHI.Reflect/ConstantsLayout.cpp +++ b/Gems/Atom/RHI/Code/Source/RHI.Reflect/ConstantsLayout.cpp @@ -142,9 +142,6 @@ namespace AZ } } - // [GFX TODO][ATOM-1669]: Review if it's needed to validate - // overlapping of ranges. - return true; } diff --git a/Gems/Atom/RHI/Code/Source/RHI.Reflect/ImageSubresource.cpp b/Gems/Atom/RHI/Code/Source/RHI.Reflect/ImageSubresource.cpp index dca6c8bc68..7b66af2640 100644 --- a/Gems/Atom/RHI/Code/Source/RHI.Reflect/ImageSubresource.cpp +++ b/Gems/Atom/RHI/Code/Source/RHI.Reflect/ImageSubresource.cpp @@ -124,7 +124,7 @@ namespace AZ , m_blockElementHeight{blockElementHeight} {} - ImageSubresourceLayoutPlaced::ImageSubresourceLayoutPlaced(const ImageSubresourceLayout& subresourceLayout, size_t offset) + ImageSubresourceLayoutPlaced::ImageSubresourceLayoutPlaced(const ImageSubresourceLayout& subresourceLayout, uint32_t offset) : ImageSubresourceLayout(subresourceLayout) , m_offset{offset} {} diff --git a/Gems/Atom/RHI/Code/Source/RHI/AliasedHeap.cpp b/Gems/Atom/RHI/Code/Source/RHI/AliasedHeap.cpp index 3e1c94b23d..f3afbabbe2 100644 --- a/Gems/Atom/RHI/Code/Source/RHI/AliasedHeap.cpp +++ b/Gems/Atom/RHI/Code/Source/RHI/AliasedHeap.cpp @@ -13,7 +13,6 @@ #include #include #include -#include #include namespace AZ diff --git a/Gems/Atom/RHI/Code/Source/RHI/BufferPool.cpp b/Gems/Atom/RHI/Code/Source/RHI/BufferPool.cpp index 94b0b57c37..e1863ba085 100644 --- a/Gems/Atom/RHI/Code/Source/RHI/BufferPool.cpp +++ b/Gems/Atom/RHI/Code/Source/RHI/BufferPool.cpp @@ -8,8 +8,6 @@ #include #include -#include - namespace AZ { namespace RHI @@ -119,7 +117,7 @@ namespace AZ ResultCode BufferPool::InitBuffer(const BufferInitRequest& initRequest) { - AZ_TRACE_METHOD(); + AZ_PROFILE_FUNCTION(RHI); if (!ValidateInitRequest(initRequest)) { @@ -168,7 +166,7 @@ namespace AZ ResultCode BufferPool::MapBuffer(const BufferMapRequest& request, BufferMapResponse& response) { - AZ_TRACE_METHOD(); + AZ_PROFILE_FUNCTION(RHI); if (!ValidateIsInitialized() || !ValidateNotProcessingFrame()) { diff --git a/Gems/Atom/RHI/Code/Source/RHI/CommandListValidator.cpp b/Gems/Atom/RHI/Code/Source/RHI/CommandListValidator.cpp index f885a86800..ec5220aeeb 100644 --- a/Gems/Atom/RHI/Code/Source/RHI/CommandListValidator.cpp +++ b/Gems/Atom/RHI/Code/Source/RHI/CommandListValidator.cpp @@ -19,8 +19,6 @@ #include #include #include -#include - namespace AZ { namespace RHI @@ -31,7 +29,7 @@ namespace AZ { return; } - AZ_TRACE_METHOD(); + AZ_PROFILE_FUNCTION(RHI); AZ_Assert(m_scope == nullptr, "BeginScope called twice."); m_scope = &scope; @@ -58,7 +56,6 @@ namespace AZ { return true; } - AZ_TRACE_METHOD(); ValidateViewContext context; context.m_scopeName = m_scope->GetId().GetCStr(); context.m_srgName = shaderResourceGroup.GetName().GetCStr(); diff --git a/Gems/Atom/RHI/Code/Source/RHI/CommandQueue.cpp b/Gems/Atom/RHI/Code/Source/RHI/CommandQueue.cpp index a365b23e94..1cee382189 100644 --- a/Gems/Atom/RHI/Code/Source/RHI/CommandQueue.cpp +++ b/Gems/Atom/RHI/Code/Source/RHI/CommandQueue.cpp @@ -71,6 +71,7 @@ namespace AZ { m_isQuitting = true; m_workQueueCondition.notify_all(); + m_flushCommandsCondition.notify_all(); if (m_thread.joinable()) { m_thread.join(); @@ -102,9 +103,10 @@ namespace AZ void CommandQueue::FlushCommands() { AZ_PROFILE_SCOPE(RHI, "CommandQueue: FlushCommands"); - while (!m_isWorkQueueEmpty && !m_isQuitting) + AZStd::unique_lock lock(m_flushCommandsMutex); + if (!m_isWorkQueueEmpty && !m_isQuitting) { - AZStd::this_thread::yield(); + m_flushCommandsCondition.wait(lock, [this]() { return m_isWorkQueueEmpty.load() || m_isQuitting.load(); }); } } @@ -119,7 +121,11 @@ namespace AZ if (m_workQueue.empty()) { - m_isWorkQueueEmpty = true; + { + AZStd::unique_lock flushCommandsLock(m_flushCommandsMutex); + m_isWorkQueueEmpty = true; + m_flushCommandsCondition.notify_all(); + } m_workQueueCondition.wait(lock, [this]() { return !m_workQueue.empty() || m_isQuitting; }); } diff --git a/Gems/Atom/RHI/Code/Source/RHI/ConstantsData.cpp b/Gems/Atom/RHI/Code/Source/RHI/ConstantsData.cpp index 1524883e54..a86f278ee2 100644 --- a/Gems/Atom/RHI/Code/Source/RHI/ConstantsData.cpp +++ b/Gems/Atom/RHI/Code/Source/RHI/ConstantsData.cpp @@ -153,6 +153,7 @@ namespace AZ { bool isValidAll = true; uint32_t offset = 0; + for (size_t i = 0; i < values.size(); i++) { const uint32_t fourByteValue = values[i] ? 1 : 0; @@ -273,6 +274,21 @@ namespace AZ return false; } + template <> + bool ConstantsData::SetConstant(ShaderInputConstantIndex inputIndex, const Color& value) + { + constexpr size_t sizeOfColor = sizeof(Color); + if (ValidateConstantAccess(inputIndex, ValidateConstantAccessExpect::Complete, 0, aznumeric_caster(sizeOfColor))) + { + const Interval interval = GetLayout()->GetInterval(inputIndex); + float* vectorValue = reinterpret_cast(&m_constantData[interval.m_min]); + value.StoreToFloat4(vectorValue); + + return true; + } + return false; + } + bool ConstantsData::SetConstantMatrixRows(ShaderInputConstantIndex inputIndex, const Matrix3x3& value, uint32_t rowCount) { // See the packing comments in ConstantsData::SetConstant for an explanation of why we only use @@ -389,6 +405,18 @@ namespace AZ return Vector4(); } + template <> + Color ConstantsData::GetConstant(ShaderInputConstantIndex inputIndex) const + { + constexpr size_t colorSize = sizeof(Color); + if (ValidateConstantAccess(inputIndex, ValidateConstantAccessExpect::Complete, 0, aznumeric_caster(colorSize))) + { + AZStd::array_view constantBytes = GetConstantRaw(inputIndex); + return Color::CreateFromFloat4(reinterpret_cast(constantBytes.data())); + } + return Color(); + } + AZStd::array_view ConstantsData::GetConstantRaw(ShaderInputConstantIndex inputIndex) const { const Interval interval = GetLayout()->GetInterval(inputIndex); diff --git a/Gems/Atom/RHI/Code/Source/RHI/Device.cpp b/Gems/Atom/RHI/Code/Source/RHI/Device.cpp index c8497cf7b1..38abdd6968 100644 --- a/Gems/Atom/RHI/Code/Source/RHI/Device.cpp +++ b/Gems/Atom/RHI/Code/Source/RHI/Device.cpp @@ -9,7 +9,6 @@ #include #include -#include #include namespace AZ @@ -112,7 +111,7 @@ namespace AZ ResultCode Device::BeginFrame() { - AZ_TRACE_METHOD(); + AZ_PROFILE_FUNCTION(RHI); if (ValidateIsInitialized() && ValidateIsNotInFrame()) { diff --git a/Gems/Atom/RHI/Code/Source/RHI/DrawListContext.cpp b/Gems/Atom/RHI/Code/Source/RHI/DrawListContext.cpp index 5f92d52006..e7254937e4 100644 --- a/Gems/Atom/RHI/Code/Source/RHI/DrawListContext.cpp +++ b/Gems/Atom/RHI/Code/Source/RHI/DrawListContext.cpp @@ -7,6 +7,7 @@ */ #include +#include #include namespace AZ @@ -86,6 +87,7 @@ namespace AZ void DrawListContext::FinalizeLists() { + AZ_PROFILE_SCOPE(RHI, "DrawListContext: FinalizeLists"); for (size_t i = 0; i < m_mergedListsByTag.size(); ++i) { if (m_drawListMask[i]) diff --git a/Gems/Atom/RHI/Code/Source/RHI/Factory.cpp b/Gems/Atom/RHI/Code/Source/RHI/Factory.cpp index 82b0a13c86..e63c8d3bde 100644 --- a/Gems/Atom/RHI/Code/Source/RHI/Factory.cpp +++ b/Gems/Atom/RHI/Code/Source/RHI/Factory.cpp @@ -26,6 +26,7 @@ static bool s_isRenderDocDllLoaded = false; #if defined(USE_PIX) static AZStd::unique_ptr s_pixModule; static bool s_isPixGpuCaptureDllLoaded = false; +static bool s_pixGpuMarkersEnabled = false; #endif static bool s_usingWarpDevice = false; @@ -62,7 +63,9 @@ namespace AZ #if defined(USE_RENDERDOC) // If RenderDoc is requested, we need to load the library as early as possible (before device queries/factories are made) bool enableRenderDoc = RHI::QueryCommandLineOption("enableRenderDoc"); - +#if defined(USE_PIX) + s_pixGpuMarkersEnabled = s_pixGpuMarkersEnabled || enableRenderDoc; +#endif if (enableRenderDoc && AZ_TRAIT_RENDERDOC_MODULE && !s_renderDocModule) { s_renderDocModule = DynamicModuleHandle::Create(AZ_TRAIT_RENDERDOC_MODULE); @@ -119,6 +122,9 @@ namespace AZ //Pix dll can still be injected even if we do not pass in enablePixGPU. This can be done if we launch the app from Pix. s_isPixGpuCaptureDllLoaded = Platform::IsPixDllInjected(AZ_TRAIT_PIX_MODULE); + + s_pixGpuMarkersEnabled = + s_pixGpuMarkersEnabled || RHI::QueryCommandLineOption("enablePixGpuMarkers") || s_isPixGpuCaptureDllLoaded; #endif } @@ -202,6 +208,15 @@ namespace AZ #endif } + bool Factory::PixGpuEventsEnabled() + { +#if defined(USE_PIX) + return s_pixGpuMarkersEnabled; +#else + return false; +#endif + } + bool Factory::UsingWarpDevice() { return s_usingWarpDevice; diff --git a/Gems/Atom/RHI/Code/Source/RHI/FrameGraph.cpp b/Gems/Atom/RHI/Code/Source/RHI/FrameGraph.cpp index e4e1a887b0..25158b1b3d 100644 --- a/Gems/Atom/RHI/Code/Source/RHI/FrameGraph.cpp +++ b/Gems/Atom/RHI/Code/Source/RHI/FrameGraph.cpp @@ -17,8 +17,6 @@ #include #include #include -#include -#include namespace AZ { @@ -61,7 +59,7 @@ namespace AZ void FrameGraph::Begin() { - AZ_TRACE_METHOD(); + AZ_PROFILE_FUNCTION(RHI); AZ_Assert(m_isBuilding == false, "FrameGraph::Begin called, but End was never called on the previous build cycle!"); AZ_Assert(m_isCompiled == false, "FrameGraph::Clear must be called before reuse."); diff --git a/Gems/Atom/RHI/Code/Source/RHI/FrameGraphAttachmentDatabase.cpp b/Gems/Atom/RHI/Code/Source/RHI/FrameGraphAttachmentDatabase.cpp index 6bac2b8c7d..f5b23910cb 100644 --- a/Gems/Atom/RHI/Code/Source/RHI/FrameGraphAttachmentDatabase.cpp +++ b/Gems/Atom/RHI/Code/Source/RHI/FrameGraphAttachmentDatabase.cpp @@ -12,8 +12,6 @@ #include #include #include -#include - namespace AZ { namespace RHI @@ -134,7 +132,6 @@ namespace AZ m_scopeAttachmentLookup.clear(); m_imageAttachments.clear(); m_bufferAttachments.clear(); - m_swapChainAttachments.clear(); m_importedImageAttachments.clear(); m_importedBufferAttachments.clear(); m_transientImageAttachments.clear(); @@ -153,6 +150,13 @@ namespace AZ delete attachment; } m_attachments.clear(); + + for (auto swapchainAttachment : m_swapChainAttachments) + { + swapchainAttachment->GetSwapChain()->ProcessRecreation(); + } + + m_swapChainAttachments.clear(); } ImageDescriptor FrameGraphAttachmentDatabase::GetImageDescriptor(const AttachmentId& attachmentId) const @@ -205,7 +209,11 @@ namespace AZ return nullptr; } - const ScopeAttachment* FrameGraphAttachmentDatabase::FindScopeAttachment(const ScopeId& scopeId, const AttachmentId& attachmentId, size_t index) const + const ScopeAttachment* FrameGraphAttachmentDatabase::FindScopeAttachment( + const ScopeId& scopeId, + const AttachmentId& attachmentId, + const ImageViewDescriptor& imageViewDescriptor, + const RHI::ScopeAttachmentUsage attachmentUsage) const { const ScopeAttachmentPtrList* scopeAttachmentList = FindScopeAttachmentList(scopeId, attachmentId); if (!scopeAttachmentList) @@ -213,21 +221,93 @@ namespace AZ return nullptr; } - if (index >= scopeAttachmentList->size()) + if (scopeAttachmentList->size() > 1) { - AZ_Error("AttachmentDatabase", false, - "Attempting to access scope attachment [%d], but list only has [%d] elements. ScopeId: [%s]. AttachmentId: [%s]", - index, - scopeAttachmentList->size(), - scopeId.GetCStr(), - attachmentId.GetCStr()); + //Find the attachment with the same view and usage + auto findIter = AZStd::find_if(scopeAttachmentList->begin(), scopeAttachmentList->end(), [&](const ScopeAttachment* scopeAttacment) + { + const ImageScopeAttachment* imageAttachment = azrtti_cast(scopeAttacment); + bool isSameView = imageAttachment->GetDescriptor().m_imageViewDescriptor.IsSameSubResource(imageViewDescriptor); + if (isSameView) + { + AZStd::vector usageAndAccessVec = imageAttachment->GetUsageAndAccess(); + auto usageAccessIter = AZStd::find_if(usageAndAccessVec.begin(), usageAndAccessVec.end(), [&](const ScopeAttachmentUsageAndAccess usageAndAccess) + { + return usageAndAccess.m_usage == attachmentUsage; + }); + + return usageAccessIter != usageAndAccessVec.end(); + } + return false; + }); + + if (findIter != scopeAttachmentList->end()) + { + return *findIter; + } + + AZ_Error("AttachmentDatabase", false, "Couldnt find ScopeAttachment %s with the same view and usage for scope %s", attachmentId.GetCStr(), scopeId.GetCStr()); + return nullptr; + } + else + { + return (*scopeAttachmentList)[0]; + } + } + + const ScopeAttachment* FrameGraphAttachmentDatabase::FindScopeAttachment( + const ScopeId& scopeId, + const AttachmentId& attachmentId, + const RHI::ScopeAttachmentUsage attachmentUsage) const + { + const ScopeAttachmentPtrList* scopeAttachmentList = FindScopeAttachmentList(scopeId, attachmentId); + if (!scopeAttachmentList) + { return nullptr; } - return (*scopeAttachmentList)[index]; - } + //More than one entry indicates that the same attachment is used multiple times in a scope. + if (scopeAttachmentList->size() > 1) + { + //Find the attachment with the same usage + auto findIter = AZStd::find_if(scopeAttachmentList->begin(), scopeAttachmentList->end(), [&](const ScopeAttachment* scopeAttacment) + { + AZStd::vector usageAndAccessVec = scopeAttacment->GetUsageAndAccess(); + auto usageAccessIter = AZStd::find_if(usageAndAccessVec.begin(), usageAndAccessVec.end(), [&](const ScopeAttachmentUsageAndAccess usageAndAccess) + { + return usageAndAccess.m_usage == attachmentUsage; + }); + return usageAccessIter != usageAndAccessVec.end(); + }); + + if (findIter != scopeAttachmentList->end()) + { + return *findIter; + } + + AZ_Error("AttachmentDatabase", false, "Couldnt find ScopeAttachment %s with the same view and usage for scope %s", attachmentId.GetCStr(), scopeId.GetCStr()); + return nullptr; + } + else + { + return (*scopeAttachmentList)[0]; + } + } + + const ScopeAttachment* FrameGraphAttachmentDatabase::FindScopeAttachment(const ScopeId& scopeId, const AttachmentId& attachmentId) const + { + const ScopeAttachmentPtrList* scopeAttachmentList = FindScopeAttachmentList(scopeId, attachmentId); + if (!scopeAttachmentList) + { + return nullptr; + } + + AZ_Error( "AttachmentDatabase", scopeAttachmentList->size() > 0, "Couldnt fine Scopeattachment %s for scope %s", attachmentId.GetCStr(), scopeId.GetCStr()); + return (*scopeAttachmentList)[0]; + } + const AZStd::vector& FrameGraphAttachmentDatabase::GetImageAttachments() const { return m_imageAttachments; diff --git a/Gems/Atom/RHI/Code/Source/RHI/FrameGraphCompileContext.cpp b/Gems/Atom/RHI/Code/Source/RHI/FrameGraphCompileContext.cpp index b0e430efaf..8e5333e7b8 100644 --- a/Gems/Atom/RHI/Code/Source/RHI/FrameGraphCompileContext.cpp +++ b/Gems/Atom/RHI/Code/Source/RHI/FrameGraphCompileContext.cpp @@ -40,9 +40,8 @@ namespace AZ return 0; } - const BufferView* FrameGraphCompileContext::GetBufferView(const AttachmentId& attachmentId, size_t index) const + const BufferView* FrameGraphCompileContext::GetBufferView(const ScopeAttachment* scopeAttacment) const { - const ScopeAttachment* scopeAttacment = m_attachmentDatabase->FindScopeAttachment(m_scopeId, attachmentId, index); const BufferScopeAttachment* attachment = azrtti_cast(scopeAttacment); if (!attachment) { @@ -51,6 +50,18 @@ namespace AZ return attachment->GetBufferView(); } + const BufferView* FrameGraphCompileContext::GetBufferView(const AttachmentId& attachmentId) const + { + const ScopeAttachment* scopeAttacment = m_attachmentDatabase->FindScopeAttachment(m_scopeId, attachmentId); + return GetBufferView(scopeAttacment); + } + + const BufferView* FrameGraphCompileContext::GetBufferView(const AttachmentId& attachmentId, const RHI::ScopeAttachmentUsage attachmentUsage) const + { + const ScopeAttachment* scopeAttacment = m_attachmentDatabase->FindScopeAttachment(m_scopeId, attachmentId, attachmentUsage); + return GetBufferView(scopeAttacment); + } + const Buffer* FrameGraphCompileContext::GetBuffer(const AttachmentId& attachmentId) const { const BufferView* bufferView = GetBufferView(attachmentId); @@ -61,9 +72,8 @@ namespace AZ return nullptr; } - const ImageView* FrameGraphCompileContext::GetImageView(const AttachmentId& attachmentId, size_t index) const + const ImageView* FrameGraphCompileContext::GetImageView(const ScopeAttachment* scopeAttacment) const { - const ScopeAttachment* scopeAttacment = m_attachmentDatabase->FindScopeAttachment(m_scopeId, attachmentId, index); const ImageScopeAttachment* attachment = azrtti_cast(scopeAttacment); if (!attachment) { @@ -72,6 +82,18 @@ namespace AZ return attachment->GetImageView(); } + const ImageView* FrameGraphCompileContext::GetImageView(const AttachmentId& attachmentId, const ImageViewDescriptor& imageViewDescriptor, RHI::ScopeAttachmentUsage attachmentUsage) const + { + const ScopeAttachment* scopeAttacment = m_attachmentDatabase->FindScopeAttachment(m_scopeId, attachmentId, imageViewDescriptor, attachmentUsage); + return GetImageView(scopeAttacment); + } + + const ImageView* FrameGraphCompileContext::GetImageView(const AttachmentId& attachmentId) const + { + const ScopeAttachment* scopeAttacment = m_attachmentDatabase->FindScopeAttachment(m_scopeId, attachmentId); + return GetImageView(scopeAttacment); + } + const Image* FrameGraphCompileContext::GetImage(const AttachmentId& attachmentId) const { const ImageView* imageView = GetImageView(attachmentId); diff --git a/Gems/Atom/RHI/Code/Source/RHI/FrameGraphCompiler.cpp b/Gems/Atom/RHI/Code/Source/RHI/FrameGraphCompiler.cpp index d06ec002e4..347d47d19a 100644 --- a/Gems/Atom/RHI/Code/Source/RHI/FrameGraphCompiler.cpp +++ b/Gems/Atom/RHI/Code/Source/RHI/FrameGraphCompiler.cpp @@ -17,7 +17,6 @@ #include #include #include -#include #include #include #include @@ -288,7 +287,7 @@ namespace AZ return; } - AZ_TRACE_METHOD(); + AZ_PROFILE_FUNCTION(RHI); /** * Each attachment declares which queue classes it can be used on. We require that the first scope be on the most diff --git a/Gems/Atom/RHI/Code/Source/RHI/FrameGraphExecuter.cpp b/Gems/Atom/RHI/Code/Source/RHI/FrameGraphExecuter.cpp index 6888531b67..7599e9c8f6 100644 --- a/Gems/Atom/RHI/Code/Source/RHI/FrameGraphExecuter.cpp +++ b/Gems/Atom/RHI/Code/Source/RHI/FrameGraphExecuter.cpp @@ -10,8 +10,6 @@ #include #include #include -#include - namespace AZ { namespace RHI diff --git a/Gems/Atom/RHI/Code/Source/RHI/FrameGraphLogger.cpp b/Gems/Atom/RHI/Code/Source/RHI/FrameGraphLogger.cpp index 7b96352eca..57455e43f4 100644 --- a/Gems/Atom/RHI/Code/Source/RHI/FrameGraphLogger.cpp +++ b/Gems/Atom/RHI/Code/Source/RHI/FrameGraphLogger.cpp @@ -11,7 +11,6 @@ #include #include #include -#include #include namespace AZ diff --git a/Gems/Atom/RHI/Code/Source/RHI/FrameScheduler.cpp b/Gems/Atom/RHI/Code/Source/RHI/FrameScheduler.cpp index 11ae78c69a..716582b3ab 100644 --- a/Gems/Atom/RHI/Code/Source/RHI/FrameScheduler.cpp +++ b/Gems/Atom/RHI/Code/Source/RHI/FrameScheduler.cpp @@ -24,7 +24,6 @@ #include #include -#include #include #include #include @@ -152,8 +151,6 @@ namespace AZ ResultCode FrameScheduler::ImportScopeProducer(ScopeProducer& scopeProducer) { - AZ_PROFILE_SCOPE(RHI, "FrameScheduler: ImportScopeProducer"); - if (!ValidateIsProcessing()) { return RHI::ResultCode::InvalidOperation; @@ -235,9 +232,10 @@ namespace AZ for (ScopeProducer* scopeProducer : m_scopeProducers) { + AZ_PROFILE_SCOPE(RHI, "FrameScheduler: PrepareProducers: Scope %s", scopeProducer->GetScopeId().GetCStr()); m_frameGraph->BeginScope(*scopeProducer->GetScope()); scopeProducer->SetupFrameGraphDependencies(*m_frameGraph); - + // All scopes depend on the root scope. if (scopeProducer->GetScopeId() != m_rootScopeId) { @@ -266,7 +264,6 @@ namespace AZ // Execute all queued resource invalidations, which will mark SRG's for compilation. { - AZ_PROFILE_SCOPE(RHI, "Invalidate Resources"); ResourceInvalidateBus::ExecuteQueuedEvents(); } @@ -530,7 +527,10 @@ namespace AZ parentJob->StartAsChild(AZ::CreateJobFunction(AZStd::move(jobLambda), true, nullptr)); } - parentJob->WaitForChildren(); + { + AZ_PROFILE_SCOPE(RHI, "FrameScheduler: ExecuteGroupInternal: WaitForChildren"); + parentJob->WaitForChildren(); + } } m_frameGraphExecuter->EndGroup(groupIndex); diff --git a/Gems/Atom/RHI/Code/Source/RHI/PipelineStateCache.cpp b/Gems/Atom/RHI/Code/Source/RHI/PipelineStateCache.cpp index 0c06887dd6..79c05c37da 100644 --- a/Gems/Atom/RHI/Code/Source/RHI/PipelineStateCache.cpp +++ b/Gems/Atom/RHI/Code/Source/RHI/PipelineStateCache.cpp @@ -41,9 +41,12 @@ namespace AZ AZ_Assert(readOnlyCache.empty(), "Inactive library has pipeline states in its global entry."); } +#if defined(AZ_DEBUG_BUILD) + // the PipelineStateSet is expensive to duplicate, only do this in debug. PipelineStateSet readOnlyCacheCopy = readOnlyCache; AZ_Assert(AZStd::unique(readOnlyCacheCopy.begin(), readOnlyCacheCopy.end()) == readOnlyCacheCopy.end(), "'%d' Duplicates existed in the read-only cache!", readOnlyCache.size() - readOnlyCacheCopy.size()); +#endif } m_threadLibrarySet.ForEach([this](const ThreadLibrarySet& threadLibrarySet) diff --git a/Gems/Atom/RHI/Code/Source/RHI/ResourceView.cpp b/Gems/Atom/RHI/Code/Source/RHI/ResourceView.cpp index 2b769a7e31..f64a29bb8c 100644 --- a/Gems/Atom/RHI/Code/Source/RHI/ResourceView.cpp +++ b/Gems/Atom/RHI/Code/Source/RHI/ResourceView.cpp @@ -8,8 +8,6 @@ #include #include -#include - namespace AZ { namespace RHI @@ -57,7 +55,7 @@ namespace AZ ResultCode ResourceView::OnResourceInvalidate() { - AZ_TRACE_METHOD(); + AZ_PROFILE_FUNCTION(RHI); ResultCode resultCode = InvalidateInternal(); if (resultCode == ResultCode::Success) { diff --git a/Gems/Atom/RHI/Code/Source/RHI/Scope.cpp b/Gems/Atom/RHI/Code/Source/RHI/Scope.cpp index 63bb44453a..472309929e 100644 --- a/Gems/Atom/RHI/Code/Source/RHI/Scope.cpp +++ b/Gems/Atom/RHI/Code/Source/RHI/Scope.cpp @@ -10,8 +10,6 @@ #include #include -#include - namespace AZ { namespace RHI @@ -90,7 +88,7 @@ namespace AZ void Scope::QueueResourcePoolResolves(ResourcePoolDatabase& resourcePoolDatabase) { - AZ_TRACE_METHOD(); + AZ_PROFILE_FUNCTION(RHI); const auto queuePoolResolverFunction = [this](ResourcePoolResolver* poolResolver) { diff --git a/Gems/Atom/RHI/Code/Source/RHI/ShaderResourceGroupInvalidateRegistry.cpp b/Gems/Atom/RHI/Code/Source/RHI/ShaderResourceGroupInvalidateRegistry.cpp index a35f73df91..0791fdd34e 100644 --- a/Gems/Atom/RHI/Code/Source/RHI/ShaderResourceGroupInvalidateRegistry.cpp +++ b/Gems/Atom/RHI/Code/Source/RHI/ShaderResourceGroupInvalidateRegistry.cpp @@ -7,8 +7,6 @@ */ #include #include -#include - namespace AZ { namespace RHI @@ -60,7 +58,7 @@ namespace AZ ResultCode ShaderResourceGroupInvalidateRegistry::OnResourceInvalidate() { - AZ_TRACE_METHOD(); + AZ_PROFILE_FUNCTION(RHI); AZ_Assert(m_compileGroupFunction, "No compile function set"); const Resource* resource = *ResourceInvalidateBus::GetCurrentBusId(); diff --git a/Gems/Atom/RHI/Code/Source/RHI/ShaderResourceGroupPool.cpp b/Gems/Atom/RHI/Code/Source/RHI/ShaderResourceGroupPool.cpp index eb80b038eb..5d1da487ab 100644 --- a/Gems/Atom/RHI/Code/Source/RHI/ShaderResourceGroupPool.cpp +++ b/Gems/Atom/RHI/Code/Source/RHI/ShaderResourceGroupPool.cpp @@ -8,8 +8,6 @@ #include #include #include -#include - namespace AZ { namespace RHI @@ -250,8 +248,6 @@ namespace AZ void ShaderResourceGroupPool::CompileGroupsForInterval(Interval interval) { - AZ_TRACE_METHOD_NAME("CompileGroupsForInterval"); - AZ_Assert(m_isCompiling, "You must call CompileGroupsBegin() first!"); AZ_Assert( interval.m_max >= interval.m_min && @@ -261,6 +257,8 @@ namespace AZ for (uint32_t i = interval.m_min; i < interval.m_max; ++i) { ShaderResourceGroup* group = m_groupsToCompile[i]; + AZ_PROFILE_SCOPE(RHI, "CompileGroupsForInterval %s", group->GetName().GetCStr()); + CompileGroupInternal(*group, group->GetData()); group->m_isQueuedForCompile = false; } diff --git a/Gems/Atom/RHI/Code/Source/RHI/StreamingImagePool.cpp b/Gems/Atom/RHI/Code/Source/RHI/StreamingImagePool.cpp index 6d67fa7844..6db8da3b55 100644 --- a/Gems/Atom/RHI/Code/Source/RHI/StreamingImagePool.cpp +++ b/Gems/Atom/RHI/Code/Source/RHI/StreamingImagePool.cpp @@ -7,8 +7,6 @@ */ #include -#include - namespace AZ { namespace RHI @@ -74,7 +72,7 @@ namespace AZ ResultCode StreamingImagePool::Init(Device& device, const StreamingImagePoolDescriptor& descriptor) { - AZ_TRACE_METHOD(); + AZ_PROFILE_FUNCTION(RHI); return ResourcePool::Init( device, descriptor, @@ -93,7 +91,7 @@ namespace AZ ResultCode StreamingImagePool::InitImage(const StreamingImageInitRequest& initRequest) { - AZ_TRACE_METHOD(); + AZ_PROFILE_FUNCTION(RHI); if (!ValidateIsInitialized()) { diff --git a/Gems/Atom/RHI/Code/Source/RHI/SwapChain.cpp b/Gems/Atom/RHI/Code/Source/RHI/SwapChain.cpp index ff1f0e69a6..6140bf545d 100644 --- a/Gems/Atom/RHI/Code/Source/RHI/SwapChain.cpp +++ b/Gems/Atom/RHI/Code/Source/RHI/SwapChain.cpp @@ -8,8 +8,6 @@ #include #include #include -#include - namespace AZ { namespace RHI @@ -58,43 +56,68 @@ namespace AZ // Overwrite descriptor dimensions with the native ones (the ones assigned by the platform) returned by InitInternal. m_descriptor.m_dimensions = nativeDimensions; - m_images.reserve(m_descriptor.m_dimensions.m_imageCount); + resultCode = InitImages(); + } - for (uint32_t imageIdx = 0; imageIdx < m_descriptor.m_dimensions.m_imageCount; ++imageIdx) - { - m_images.emplace_back(RHI::Factory::Get().CreateImage()); - } + return resultCode; + } - InitImageRequest request; + void SwapChain::ShutdownImages() + { + // Shutdown existing set of images. + uint32_t imageSize = aznumeric_cast(m_images.size()); + for (uint32_t imageIdx = 0; imageIdx < imageSize; ++imageIdx) + { + m_images[imageIdx]->Shutdown(); + } - RHI::ImageDescriptor& imageDescriptor = request.m_descriptor; - imageDescriptor.m_dimension = RHI::ImageDimension::Image2D; - imageDescriptor.m_bindFlags = RHI::ImageBindFlags::Color; - imageDescriptor.m_size.m_width = m_descriptor.m_dimensions.m_imageWidth; - imageDescriptor.m_size.m_height = m_descriptor.m_dimensions.m_imageHeight; - imageDescriptor.m_format = m_descriptor.m_dimensions.m_imageFormat; + m_images.clear(); + } - for (uint32_t imageIdx = 0; imageIdx < m_descriptor.m_dimensions.m_imageCount; ++imageIdx) - { - request.m_image = m_images[imageIdx].get(); - request.m_imageIndex = imageIdx; + ResultCode SwapChain::InitImages() + { + ResultCode resultCode = ResultCode::Success; - resultCode = ImagePoolBase::InitImage( - request.m_image, - imageDescriptor, - [this, &request]() + m_images.reserve(m_descriptor.m_dimensions.m_imageCount); + + // If the new display mode has more buffers, add them. + for (uint32_t i = 0; i < m_descriptor.m_dimensions.m_imageCount; ++i) + { + m_images.emplace_back(RHI::Factory::Get().CreateImage()); + } + + InitImageRequest request; + + RHI::ImageDescriptor& imageDescriptor = request.m_descriptor; + imageDescriptor.m_dimension = RHI::ImageDimension::Image2D; + imageDescriptor.m_bindFlags = RHI::ImageBindFlags::Color; + imageDescriptor.m_size.m_width = m_descriptor.m_dimensions.m_imageWidth; + imageDescriptor.m_size.m_height = m_descriptor.m_dimensions.m_imageHeight; + imageDescriptor.m_format = m_descriptor.m_dimensions.m_imageFormat; + + for (uint32_t imageIdx = 0; imageIdx < m_descriptor.m_dimensions.m_imageCount; ++imageIdx) + { + request.m_image = m_images[imageIdx].get(); + request.m_imageIndex = imageIdx; + + resultCode = ImagePoolBase::InitImage( + request.m_image, imageDescriptor, + [this, &request]() { return InitImageInternal(request); }); - if (resultCode != ResultCode::Success) - { - Shutdown(); - break; - } + if (resultCode != ResultCode::Success) + { + AZ_Error("Swapchain", false, "Failed to initialize images."); + Shutdown(); + break; } } + // Reset the current index back to 0 so we match the platform swap chain. + m_currentImageIndex = 0; + return resultCode; } @@ -105,63 +128,15 @@ namespace AZ } ResultCode SwapChain::Resize(const RHI::SwapChainDimensions& dimensions) - { - // Shutdown existing set of images. - for (uint32_t imageIdx = 0; imageIdx < GetImageCount(); ++imageIdx) - { - m_images[imageIdx]->Shutdown(); - } + { + ShutdownImages(); SwapChainDimensions nativeDimensions = dimensions; ResultCode resultCode = ResizeInternal(dimensions, &nativeDimensions); if (resultCode == ResultCode::Success) { m_descriptor.m_dimensions = nativeDimensions; - m_images.reserve(m_descriptor.m_dimensions.m_imageCount); - - // If the new display mode has more buffers, add them. - while (m_images.size() < static_cast(m_descriptor.m_dimensions.m_imageCount)) - { - m_images.emplace_back(RHI::Factory::Get().CreateImage()); - } - - // If it has fewer, trim down. - while (m_images.size() > static_cast(m_descriptor.m_dimensions.m_imageCount)) - { - m_images.pop_back(); - } - - InitImageRequest request; - - RHI::ImageDescriptor& imageDescriptor = request.m_descriptor; - imageDescriptor.m_dimension = RHI::ImageDimension::Image2D; - imageDescriptor.m_bindFlags = RHI::ImageBindFlags::Color; - imageDescriptor.m_size.m_width = m_descriptor.m_dimensions.m_imageWidth; - imageDescriptor.m_size.m_height = m_descriptor.m_dimensions.m_imageHeight; - imageDescriptor.m_format = m_descriptor.m_dimensions.m_imageFormat; - - for (uint32_t imageIdx = 0; imageIdx < GetImageCount(); ++imageIdx) - { - request.m_image = m_images[imageIdx].get(); - request.m_imageIndex = imageIdx; - - resultCode = ImagePoolBase::InitImage( - request.m_image, - imageDescriptor, - [this, &request]() - { - return InitImageInternal(request); - }); - - if (resultCode != ResultCode::Success) - { - Shutdown(); - break; - } - } - - // Reset the current index back to 0 so we match the platform swap chain. - m_currentImageIndex = 0; + resultCode = InitImages(); } return resultCode; @@ -188,7 +163,7 @@ namespace AZ uint32_t SwapChain::GetImageCount() const { - return static_cast(m_images.size()); + return aznumeric_cast(m_images.size()); } uint32_t SwapChain::GetCurrentImageIndex() const @@ -208,9 +183,19 @@ namespace AZ void SwapChain::Present() { - AZ_TRACE_METHOD(); - m_currentImageIndex = PresentInternal(); - AZ_Assert(m_currentImageIndex < m_images.size(), "Invalid image index"); + AZ_PROFILE_FUNCTION(RHI); + // Due to swapchain recreation, the images are refreshed. + // There is no need to present swapchain for this frame. + const uint32_t imageCount = aznumeric_cast(m_images.size()); + if (imageCount == 0) + { + return; + } + else + { + m_currentImageIndex = PresentInternal(); + AZ_Assert(m_currentImageIndex < imageCount, "Invalid image index"); + } } } } diff --git a/Gems/Atom/RHI/Code/Tests/RHITestFixture.h b/Gems/Atom/RHI/Code/Tests/RHITestFixture.h index 620fc03c6f..da91c9e5f7 100644 --- a/Gems/Atom/RHI/Code/Tests/RHITestFixture.h +++ b/Gems/Atom/RHI/Code/Tests/RHITestFixture.h @@ -14,8 +14,6 @@ #include #include -#include -#include #include #include #include diff --git a/Gems/Atom/RHI/DX12/Code/Include/Atom/RHI.Reflect/DX12/PlatformLimitsDescriptor.h b/Gems/Atom/RHI/DX12/Code/Include/Atom/RHI.Reflect/DX12/PlatformLimitsDescriptor.h index 63c2d69ea2..1a447693c2 100644 --- a/Gems/Atom/RHI/DX12/Code/Include/Atom/RHI.Reflect/DX12/PlatformLimitsDescriptor.h +++ b/Gems/Atom/RHI/DX12/Code/Include/Atom/RHI.Reflect/DX12/PlatformLimitsDescriptor.h @@ -40,7 +40,7 @@ namespace AZ uint32_t m_swapChainsPerCommandList = 8; // The maximum cost that can be associated with a single command list. - uint32_t m_commandListCostThresholdMin = 1000; + uint32_t m_commandListCostThresholdMin = 250; // The maximum number of command lists per scope. uint32_t m_commandListsPerScopeMax = 16; diff --git a/Gems/Atom/RHI/DX12/Code/Source/Platform/Windows/PAL_windows.cmake b/Gems/Atom/RHI/DX12/Code/Source/Platform/Windows/PAL_windows.cmake index eb733a4d5a..1ee87e3099 100644 --- a/Gems/Atom/RHI/DX12/Code/Source/Platform/Windows/PAL_windows.cmake +++ b/Gems/Atom/RHI/DX12/Code/Source/Platform/Windows/PAL_windows.cmake @@ -33,6 +33,13 @@ if(aftermath_header) set(PAL_TRAIT_AFTERMATH_AVAILABLE TRUE) endif() +ly_add_source_properties( + SOURCES + Source/RHI.Builders/ShaderPlatformInterfaceSystemComponent.cpp + PROPERTY COMPILE_DEFINITIONS + VALUES ${LY_PAL_TOOLS_DEFINES} +) + # Disable windows OS version check until infra can upgrade all our jenkins nodes # if(NOT CMAKE_SYSTEM_VERSION VERSION_GREATER_EQUAL "10.0.17763") # message(FATAL_ERROR "Windows DX12 RHI implementation requires an OS version and SDK matching windows 10 build 1809 or greater") diff --git a/Gems/Atom/RHI/DX12/Code/Source/Platform/Windows/RHI/DX12_Windows.h b/Gems/Atom/RHI/DX12/Code/Source/Platform/Windows/RHI/DX12_Windows.h index 2eef783932..225b039c66 100644 --- a/Gems/Atom/RHI/DX12/Code/Source/Platform/Windows/RHI/DX12_Windows.h +++ b/Gems/Atom/RHI/DX12/Code/Source/Platform/Windows/RHI/DX12_Windows.h @@ -56,6 +56,9 @@ AZ_POP_DISABLE_WARNING // This define controls whether DXR ray tracing support is available on the platform. #define AZ_DX12_DXR_SUPPORT +// This define is used to initialize the D3D12_ROOT_SIGNATURE_DESC::Flags property. +#define AZ_DX12_ROOT_SIGNATURE_FLAGS D3D12_ROOT_SIGNATURE_FLAG_ALLOW_INPUT_ASSEMBLER_INPUT_LAYOUT + using ID3D12CommandAllocatorX = ID3D12CommandAllocator; using ID3D12CommandQueueX = ID3D12CommandQueue; using ID3D12DeviceX = ID3D12Device5; diff --git a/Gems/Atom/RHI/DX12/Code/Source/Platform/Windows/RHI/Device_Windows.cpp b/Gems/Atom/RHI/DX12/Code/Source/Platform/Windows/RHI/Device_Windows.cpp index cb2b8d4ef8..f6ed3be692 100644 --- a/Gems/Atom/RHI/DX12/Code/Source/Platform/Windows/RHI/Device_Windows.cpp +++ b/Gems/Atom/RHI/DX12/Code/Source/Platform/Windows/RHI/Device_Windows.cpp @@ -112,6 +112,8 @@ namespace AZ { infoQueue->SetBreakOnSeverity(D3D12_MESSAGE_SEVERITY_ERROR, TRUE); infoQueue->SetBreakOnSeverity(D3D12_MESSAGE_SEVERITY_CORRUPTION, TRUE); + //Un-comment this if you want to break on warnings too + //infoQueue->SetBreakOnSeverity(D3D12_MESSAGE_SEVERITY_WARNING, TRUE); } } diff --git a/Gems/Atom/RHI/DX12/Code/Source/Platform/Windows/RHI/NsightAftermathGpuCrashTracker_Windows.cpp b/Gems/Atom/RHI/DX12/Code/Source/Platform/Windows/RHI/NsightAftermathGpuCrashTracker_Windows.cpp index 368ad5f4d0..e94ddcd7c7 100644 --- a/Gems/Atom/RHI/DX12/Code/Source/Platform/Windows/RHI/NsightAftermathGpuCrashTracker_Windows.cpp +++ b/Gems/Atom/RHI/DX12/Code/Source/Platform/Windows/RHI/NsightAftermathGpuCrashTracker_Windows.cpp @@ -12,8 +12,6 @@ #include #include #include -#include - #if defined(USE_NSIGHT_AFTERMATH) GpuCrashTracker::~GpuCrashTracker() { diff --git a/Gems/Atom/RHI/DX12/Code/Source/Platform/Windows/RHI/NsightAftermath_Windows.cpp b/Gems/Atom/RHI/DX12/Code/Source/Platform/Windows/RHI/NsightAftermath_Windows.cpp index 199efbb139..429fded6ad 100644 --- a/Gems/Atom/RHI/DX12/Code/Source/Platform/Windows/RHI/NsightAftermath_Windows.cpp +++ b/Gems/Atom/RHI/DX12/Code/Source/Platform/Windows/RHI/NsightAftermath_Windows.cpp @@ -53,14 +53,14 @@ namespace Aftermath #endif } - void SetAftermathEventMarker( [[maybe_unused]] void* cntxHandle, [[maybe_unused]] const AZStd::string& markerData, [[maybe_unused]] bool isAftermathInitialized) + void SetAftermathEventMarker( [[maybe_unused]] void* cntxHandle, [[maybe_unused]] const char* markerData, [[maybe_unused]] bool isAftermathInitialized) { #if defined(USE_NSIGHT_AFTERMATH) if (isAftermathInitialized) { GFSDK_Aftermath_Result result = GFSDK_Aftermath_SetEventMarker( - static_cast(cntxHandle), static_cast(markerData.c_str()), - static_cast(markerData.size()) + 1); + static_cast(cntxHandle), static_cast(markerData), + static_cast(strlen(markerData) + 1); AssertOnError(result); } #endif diff --git a/Gems/Atom/RHI/DX12/Code/Source/Platform/Windows/RHI/SwapChain_Windows.cpp b/Gems/Atom/RHI/DX12/Code/Source/Platform/Windows/RHI/SwapChain_Windows.cpp index ab14f9b5d3..06477135f4 100644 --- a/Gems/Atom/RHI/DX12/Code/Source/Platform/Windows/RHI/SwapChain_Windows.cpp +++ b/Gems/Atom/RHI/DX12/Code/Source/Platform/Windows/RHI/SwapChain_Windows.cpp @@ -82,9 +82,6 @@ namespace AZ // ALT+ENTER fullscreen switching using IDXGIFactory::MakeWindowAssociation (see also implementation of SwapChain::PresentInternal). // You must call the MakeWindowAssociation method after the creation of the swap chain, and on the factory object associated with the // target HWND swap chain, which you can guarantee by calling the IDXGIObject::GetParent method on the swap chain to locate the factory. - // - // ToDo: ATOM-14673 We should handle ALT+ENTER in the windows message loop and call AzFramework::NativeWindow::ToggleFullScreenState in - // response, but that will have to wait until the WndProc function moves out of CrySystem (ideally into AzFramework::ApplicationWindows). IDXGIFactoryX* parentFactory = nullptr; m_swapChain->GetParent(__uuidof(IDXGIFactoryX), (void **)&parentFactory); DX12::AssertSuccess(parentFactory->MakeWindowAssociation(reinterpret_cast(window), DXGI_MWA_NO_ALT_ENTER)); diff --git a/Gems/Atom/RHI/DX12/Code/Source/RHI.Builders/ShaderPlatformInterfaceSystemComponent.cpp b/Gems/Atom/RHI/DX12/Code/Source/RHI.Builders/ShaderPlatformInterfaceSystemComponent.cpp index 18834bdf46..3912fbed80 100644 --- a/Gems/Atom/RHI/DX12/Code/Source/RHI.Builders/ShaderPlatformInterfaceSystemComponent.cpp +++ b/Gems/Atom/RHI/DX12/Code/Source/RHI.Builders/ShaderPlatformInterfaceSystemComponent.cpp @@ -15,15 +15,15 @@ #include #if defined(AZ_TOOLS_EXPAND_FOR_RESTRICTED_PLATFORMS) - #if defined(TOOLS_SUPPORT_JASPER) - #include - #endif - #if defined(TOOLS_SUPPORT_PROVO) - #include - #endif - #if defined(TOOLS_SUPPORT_SALEM) - #include - #endif +# if defined(TOOLS_SUPPORT_JASPER) +# include AZ_RESTRICTED_FILE_EXPLICIT(RHI.Builders/ShaderPlatformInterface, Jasper) +# endif +# if defined(TOOLS_SUPPORT_PROVO) +# include AZ_RESTRICTED_FILE_EXPLICIT(RHI.Builders/ShaderPlatformInterface, Provo) +# endif +# if defined(TOOLS_SUPPORT_SALEM) +# include AZ_RESTRICTED_FILE_EXPLICIT(RHI.Builders/ShaderPlatformInterface, Salem) +# endif #endif #include diff --git a/Gems/Atom/RHI/DX12/Code/Source/RHI/AliasedHeap.cpp b/Gems/Atom/RHI/DX12/Code/Source/RHI/AliasedHeap.cpp index d45c58e24c..c988c4e14e 100644 --- a/Gems/Atom/RHI/DX12/Code/Source/RHI/AliasedHeap.cpp +++ b/Gems/Atom/RHI/DX12/Code/Source/RHI/AliasedHeap.cpp @@ -14,7 +14,6 @@ #include #include #include -#include #include namespace AZ diff --git a/Gems/Atom/RHI/DX12/Code/Source/RHI/AsyncUploadQueue.cpp b/Gems/Atom/RHI/DX12/Code/Source/RHI/AsyncUploadQueue.cpp index 5f85d3ad03..fc80cc50d6 100644 --- a/Gems/Atom/RHI/DX12/Code/Source/RHI/AsyncUploadQueue.cpp +++ b/Gems/Atom/RHI/DX12/Code/Source/RHI/AsyncUploadQueue.cpp @@ -33,12 +33,20 @@ namespace AZ ID3D12DeviceX* dx12Device = device.GetDevice(); m_copyQueue = CommandQueue::Create(); - + + // The async upload queue should always use the primary copy queue, + // but because this change is being made in the stabilization branch + // we will put it behind a define out of an abundance of caution, and + // change it to always do this once the change gets back to development. + #if defined(AZ_DX12_USE_PRIMARY_COPY_QUEUE_FOR_ASYNC_UPLOAD_QUEUE) + m_copyQueue = &device.GetCommandQueueContext().GetCommandQueue(RHI::HardwareQueueClass::Copy); + #else // Make a secondary Copy queue, the primary queue is owned by the CommandQueueContext CommandQueueDescriptor commandQueueDesc; commandQueueDesc.m_hardwareQueueClass = RHI::HardwareQueueClass::Copy; commandQueueDesc.m_hardwareQueueSubclass = HardwareQueueSubclass::Secondary; m_copyQueue->Init(device, commandQueueDesc); + #endif // defined(AZ_DX12_ASYNC_UPLOAD_QUEUE_USE_PRIMARY_COPY_QUEUE) m_uploadFence.Init(dx12Device, RHI::FenceState::Signaled); for (size_t i = 0; i < descriptor.m_frameCount; ++i) diff --git a/Gems/Atom/RHI/DX12/Code/Source/RHI/BufferMemoryAllocator.cpp b/Gems/Atom/RHI/DX12/Code/Source/RHI/BufferMemoryAllocator.cpp index d0e7d5364e..f03c5f32a8 100644 --- a/Gems/Atom/RHI/DX12/Code/Source/RHI/BufferMemoryAllocator.cpp +++ b/Gems/Atom/RHI/DX12/Code/Source/RHI/BufferMemoryAllocator.cpp @@ -10,7 +10,6 @@ #include #include -#include namespace AZ { @@ -82,7 +81,7 @@ namespace AZ BufferMemoryView BufferMemoryAllocator::Allocate(size_t sizeInBytes, size_t overrideSubAllocAlignment) { - AZ_TRACE_METHOD(); + AZ_PROFILE_FUNCTION(RHI); BufferMemoryView bufferMemoryView; @@ -141,7 +140,7 @@ namespace AZ BufferMemoryView BufferMemoryAllocator::AllocateUnique(const RHI::BufferDescriptor& bufferDescriptor) { - AZ_TRACE_METHOD(); + AZ_PROFILE_FUNCTION(RHI); const size_t alignedSize = RHI::AlignUp(bufferDescriptor.m_byteCount, Alignment::CommittedBuffer); diff --git a/Gems/Atom/RHI/DX12/Code/Source/RHI/BufferPool.cpp b/Gems/Atom/RHI/DX12/Code/Source/RHI/BufferPool.cpp index c7b78a3945..ce09556767 100644 --- a/Gems/Atom/RHI/DX12/Code/Source/RHI/BufferPool.cpp +++ b/Gems/Atom/RHI/DX12/Code/Source/RHI/BufferPool.cpp @@ -14,7 +14,6 @@ #include #include #include -#include #include #include @@ -54,7 +53,7 @@ namespace AZ CpuVirtualAddress MapBuffer(const RHI::BufferMapRequest& request) { - AZ_TRACE_METHOD(); + AZ_PROFILE_FUNCTION(RHI); MemoryView stagingMemory = m_device->AcquireStagingMemory(request.m_byteCount, Alignment::Buffer); @@ -247,7 +246,7 @@ namespace AZ RHI::ResultCode BufferPool::InitBufferInternal(RHI::Buffer& bufferBase, const RHI::BufferDescriptor& bufferDescriptor) { - AZ_TRACE_METHOD(); + AZ_PROFILE_FUNCTION(RHI); // We need respect the buffer's alignment if the buffer is used for SRV or UAV bool useBufferAlignment = RHI::CheckBitsAny(bufferDescriptor.m_bindFlags, @@ -307,7 +306,7 @@ namespace AZ RHI::ResultCode BufferPool::MapBufferInternal(const RHI::BufferMapRequest& request, RHI::BufferMapResponse& response) { - AZ_TRACE_METHOD(); + AZ_PROFILE_FUNCTION(RHI); const RHI::BufferPoolDescriptor& poolDescriptor = GetDescriptor(); Buffer& buffer = *static_cast(request.m_buffer); diff --git a/Gems/Atom/RHI/DX12/Code/Source/RHI/CommandList.cpp b/Gems/Atom/RHI/DX12/Code/Source/RHI/CommandList.cpp index 1ee35c513a..25b412fbe1 100644 --- a/Gems/Atom/RHI/DX12/Code/Source/RHI/CommandList.cpp +++ b/Gems/Atom/RHI/DX12/Code/Source/RHI/CommandList.cpp @@ -20,7 +20,6 @@ #include #include #include -#include #include #include #include @@ -97,7 +96,7 @@ namespace AZ SetName(name); PIXBeginEvent(PIX_MARKER_CMDLIST_COL, name.GetCStr()); - if (RHI::Factory::Get().IsPixModuleLoaded() || RHI::Factory::Get().IsRenderDocModuleLoaded()) + if (RHI::Factory::Get().PixGpuEventsEnabled()) { PIXBeginEvent(GetCommandList(), PIX_MARKER_CMDLIST_COL, name.GetCStr()); } @@ -107,7 +106,7 @@ namespace AZ { FlushBarriers(); PIXEndEvent(); - if (RHI::Factory::Get().IsPixModuleLoaded() || RHI::Factory::Get().IsRenderDocModuleLoaded()) + if (RHI::Factory::Get().PixGpuEventsEnabled()) { PIXEndEvent(GetCommandList()); } @@ -563,7 +562,7 @@ namespace AZ return; } - AZ_TRACE_METHOD(); + AZ_PROFILE_FUNCTION(RHI); D3D12_VIEWPORT dx12Viewports[D3D12_VIEWPORT_AND_SCISSORRECT_OBJECT_COUNT_PER_PIPELINE]; const auto& viewports = m_state.m_viewportState.m_states; @@ -588,7 +587,7 @@ namespace AZ return; } - AZ_TRACE_METHOD(); + AZ_PROFILE_FUNCTION(RHI); D3D12_RECT dx12Scissors[D3D12_VIEWPORT_AND_SCISSORRECT_OBJECT_COUNT_PER_PIPELINE]; const auto& scissors = m_state.m_scissorState.m_states; diff --git a/Gems/Atom/RHI/DX12/Code/Source/RHI/CommandList.h b/Gems/Atom/RHI/DX12/Code/Source/RHI/CommandList.h index 1472cdc80e..da71d669b4 100644 --- a/Gems/Atom/RHI/DX12/Code/Source/RHI/CommandList.h +++ b/Gems/Atom/RHI/DX12/Code/Source/RHI/CommandList.h @@ -390,7 +390,6 @@ namespace AZ } const PipelineLayout& pipelineLayout = pipelineState->GetPipelineLayout(); - const RHI::PipelineLayoutDescriptor& pipelineLayoutDescriptor = pipelineLayout.GetPipelineLayoutDescriptor(); // Pull from slot bindings dictated by the pipeline layout. Re-bind anything that has changed // at the flat index level. @@ -499,12 +498,15 @@ namespace AZ } } +#if defined (AZ_RHI_ENABLE_VALIDATION) if (updatePipelineState || updateSRG) { + const RHI::PipelineLayoutDescriptor& pipelineLayoutDescriptor = pipelineLayout.GetPipelineLayoutDescriptor(); m_validator.ValidateShaderResourceGroup( *shaderResourceGroup, pipelineLayoutDescriptor.GetShaderResourceGroupBindingInfo(srgIndex)); } +#endif } return true; } diff --git a/Gems/Atom/RHI/DX12/Code/Source/RHI/CommandListBase.cpp b/Gems/Atom/RHI/DX12/Code/Source/RHI/CommandListBase.cpp index 9733045179..35f52b3930 100644 --- a/Gems/Atom/RHI/DX12/Code/Source/RHI/CommandListBase.cpp +++ b/Gems/Atom/RHI/DX12/Code/Source/RHI/CommandListBase.cpp @@ -85,7 +85,7 @@ namespace AZ return m_hardwareQueueClass; } - void CommandListBase::SetAftermathEventMarker(const AZStd::string& markerData) + void CommandListBase::SetAftermathEventMarker(const char* markerData) { auto& device = static_cast(GetDevice()); Aftermath::SetAftermathEventMarker(m_aftermathCommandListContext, markerData, device.IsAftermathInitialized()); diff --git a/Gems/Atom/RHI/DX12/Code/Source/RHI/CommandListBase.h b/Gems/Atom/RHI/DX12/Code/Source/RHI/CommandListBase.h index 5f3e4dce1e..d2ad804524 100644 --- a/Gems/Atom/RHI/DX12/Code/Source/RHI/CommandListBase.h +++ b/Gems/Atom/RHI/DX12/Code/Source/RHI/CommandListBase.h @@ -52,7 +52,7 @@ namespace AZ RHI::HardwareQueueClass GetHardwareQueueClass() const; - void SetAftermathEventMarker(const AZStd::string& markerData); + void SetAftermathEventMarker(const char* markerData); protected: void Init(Device& device, RHI::HardwareQueueClass hardwareQueueClass, ID3D12CommandAllocator* commandAllocator); diff --git a/Gems/Atom/RHI/DX12/Code/Source/RHI/CommandListPool.cpp b/Gems/Atom/RHI/DX12/Code/Source/RHI/CommandListPool.cpp index 20021e71ba..a84e34a811 100644 --- a/Gems/Atom/RHI/DX12/Code/Source/RHI/CommandListPool.cpp +++ b/Gems/Atom/RHI/DX12/Code/Source/RHI/CommandListPool.cpp @@ -9,8 +9,6 @@ #include #include #include -#include - namespace AZ { namespace DX12 @@ -28,7 +26,7 @@ namespace AZ RHI::Ptr CommandAllocatorFactory::CreateObject() { - AZ_TRACE_METHOD(); + AZ_PROFILE_FUNCTION(RHI); Microsoft::WRL::ComPtr allocator; AssertSuccess(m_descriptor.m_dx12Device->CreateCommandAllocator( ConvertHardwareQueueClass(m_descriptor.m_hardwareQueueClass), @@ -39,7 +37,7 @@ namespace AZ void CommandAllocatorFactory::ResetObject(ID3D12CommandAllocator& allocator) { - AZ_TRACE_METHOD(); + AZ_PROFILE_FUNCTION(RHI); allocator.Reset(); } diff --git a/Gems/Atom/RHI/DX12/Code/Source/RHI/CommandQueueContext.cpp b/Gems/Atom/RHI/DX12/Code/Source/RHI/CommandQueueContext.cpp index 5692809443..d640c2d543 100644 --- a/Gems/Atom/RHI/DX12/Code/Source/RHI/CommandQueueContext.cpp +++ b/Gems/Atom/RHI/DX12/Code/Source/RHI/CommandQueueContext.cpp @@ -7,7 +7,6 @@ */ #include -#include #include #include @@ -57,16 +56,6 @@ namespace AZ m_commandQueues[hardwareQueueIdx]->Init(device, commandQueueDesc); } - Debug::EventTraceDrillerSetupBus::Broadcast( - &Debug::EventTraceDrillerSetupBus::Events::SetThreadName, - EventTrace::GpuQueueIds[static_cast(RHI::HardwareQueueClass::Graphics)], - EventTrace::GpuQueueNames[static_cast(RHI::HardwareQueueClass::Graphics)]); - - Debug::EventTraceDrillerSetupBus::Broadcast( - &Debug::EventTraceDrillerSetupBus::Events::SetThreadName, - EventTrace::GpuQueueIds[static_cast(RHI::HardwareQueueClass::Compute)], - EventTrace::GpuQueueNames[static_cast(RHI::HardwareQueueClass::Compute)]); - CalibrateClocks(); } diff --git a/Gems/Atom/RHI/DX12/Code/Source/RHI/Device.cpp b/Gems/Atom/RHI/DX12/Code/Source/RHI/Device.cpp index 3d44e56953..fc4ac81b41 100644 --- a/Gems/Atom/RHI/DX12/Code/Source/RHI/Device.cpp +++ b/Gems/Atom/RHI/DX12/Code/Source/RHI/Device.cpp @@ -14,7 +14,6 @@ #include #include #include -#include #include #include #include @@ -191,7 +190,7 @@ namespace AZ void Device::EndFrameInternal() { - AZ_TRACE_METHOD(); + AZ_PROFILE_FUNCTION(RHI); m_commandQueueContext.End(); m_commandListAllocator.Collect(); @@ -359,7 +358,7 @@ namespace AZ D3D12_RESOURCE_STATES initialState, D3D12_HEAP_TYPE heapType) { - AZ_TRACE_METHOD(); + AZ_PROFILE_FUNCTION(RHI); D3D12_RESOURCE_DESC resourceDesc; ConvertImageDescriptor(imageDescriptor, resourceDesc); diff --git a/Gems/Atom/RHI/DX12/Code/Source/RHI/FrameGraphCompiler.cpp b/Gems/Atom/RHI/DX12/Code/Source/RHI/FrameGraphCompiler.cpp index 4ff7d581a4..e73978fccc 100644 --- a/Gems/Atom/RHI/DX12/Code/Source/RHI/FrameGraphCompiler.cpp +++ b/Gems/Atom/RHI/DX12/Code/Source/RHI/FrameGraphCompiler.cpp @@ -19,8 +19,6 @@ #include #include #include -#include - // #define AZ_DX12_FRAMESCHEDULER_LOG_TRANSITIONS namespace AZ @@ -479,8 +477,7 @@ namespace AZ return; } - D3D12_RESOURCE_TRANSITION_BARRIER transition; - memset(&transition, 0, sizeof(D3D12_RESOURCE_TRANSITION_BARRIER)); // C4701 potentially unitialized local variable 'transition' used + D3D12_RESOURCE_TRANSITION_BARRIER transition = {0}; transition.pResource = image.GetMemoryView().GetMemory(); Scope& firstScope = static_cast(scopeAttachment->GetScope()); @@ -695,7 +692,7 @@ namespace AZ { Device& device = static_cast(GetDevice()); - AZ_TRACE_METHOD(); + AZ_PROFILE_FUNCTION(RHI); CommandQueueContext& context = device.GetCommandQueueContext(); for (RHI::Scope* scopeBase : frameGraph.GetScopes()) diff --git a/Gems/Atom/RHI/DX12/Code/Source/RHI/FrameGraphExecuter.cpp b/Gems/Atom/RHI/DX12/Code/Source/RHI/FrameGraphExecuter.cpp index 156dd6e38e..2484890fea 100644 --- a/Gems/Atom/RHI/DX12/Code/Source/RHI/FrameGraphExecuter.cpp +++ b/Gems/Atom/RHI/DX12/Code/Source/RHI/FrameGraphExecuter.cpp @@ -12,8 +12,6 @@ #include #include #include -#include - namespace AZ { diff --git a/Gems/Atom/RHI/DX12/Code/Source/RHI/Image.cpp b/Gems/Atom/RHI/DX12/Code/Source/RHI/Image.cpp index c7ac17bfdc..7db12530d0 100644 --- a/Gems/Atom/RHI/DX12/Code/Source/RHI/Image.cpp +++ b/Gems/Atom/RHI/DX12/Code/Source/RHI/Image.cpp @@ -72,7 +72,7 @@ namespace AZ { const RHI::ImageDescriptor& imageDescriptor = GetDescriptor(); - size_t byteOffset = 0; + uint32_t byteOffset = 0; if (subresourceLayouts) { diff --git a/Gems/Atom/RHI/DX12/Code/Source/RHI/ImagePool.cpp b/Gems/Atom/RHI/DX12/Code/Source/RHI/ImagePool.cpp index bbbc1ac943..7947c84736 100644 --- a/Gems/Atom/RHI/DX12/Code/Source/RHI/ImagePool.cpp +++ b/Gems/Atom/RHI/DX12/Code/Source/RHI/ImagePool.cpp @@ -11,8 +11,6 @@ #include #include #include -#include - namespace AZ { namespace DX12 @@ -33,7 +31,7 @@ namespace AZ RHI::ResultCode UpdateImage(const RHI::ImageUpdateRequest& request, size_t& bytesTransferred) { - AZ_TRACE_METHOD(); + AZ_PROFILE_FUNCTION(RHI); AZStd::lock_guard lock(m_imagePacketMutex); diff --git a/Gems/Atom/RHI/DX12/Code/Source/RHI/MemoryPageAllocator.cpp b/Gems/Atom/RHI/DX12/Code/Source/RHI/MemoryPageAllocator.cpp index 2715b7063b..931e3e132f 100644 --- a/Gems/Atom/RHI/DX12/Code/Source/RHI/MemoryPageAllocator.cpp +++ b/Gems/Atom/RHI/DX12/Code/Source/RHI/MemoryPageAllocator.cpp @@ -7,8 +7,6 @@ */ #include #include -#include - namespace AZ { namespace DX12 @@ -35,7 +33,7 @@ namespace AZ return nullptr; } - AZ_TRACE_METHOD_NAME("Create Buffer Page"); + AZ_PROFILE_SCOPE(RHI, "Create Buffer Page"); D3D12_RESOURCE_STATES initialResourceState = ConvertInitialResourceState(m_descriptor.m_heapMemoryLevel, m_descriptor.m_hostMemoryAccess); if (RHI::CheckBitsAny(m_descriptor.m_bindFlags, RHI::BufferBindFlags::RayTracingAccelerationStructure)) diff --git a/Gems/Atom/RHI/DX12/Code/Source/RHI/MemoryView.cpp b/Gems/Atom/RHI/DX12/Code/Source/RHI/MemoryView.cpp index 6389076408..8afebd4ea2 100644 --- a/Gems/Atom/RHI/DX12/Code/Source/RHI/MemoryView.cpp +++ b/Gems/Atom/RHI/DX12/Code/Source/RHI/MemoryView.cpp @@ -7,11 +7,14 @@ */ #include +#include #include -#include +#include #include #include +AZ_DECLARE_BUDGET(RHI); + namespace AZ { namespace DX12 @@ -55,8 +58,6 @@ namespace AZ CpuVirtualAddress MemoryView::Map(RHI::HostMemoryAccess hostAccess) const { - AZ_TRACE_METHOD(); - CpuVirtualAddress cpuAddress = nullptr; D3D12_RANGE readRange = {}; if (hostAccess == RHI::HostMemoryAccess::Read) diff --git a/Gems/Atom/RHI/DX12/Code/Source/RHI/NsightAftermath.h b/Gems/Atom/RHI/DX12/Code/Source/RHI/NsightAftermath.h index a486822309..bce293ad29 100644 --- a/Gems/Atom/RHI/DX12/Code/Source/RHI/NsightAftermath.h +++ b/Gems/Atom/RHI/DX12/Code/Source/RHI/NsightAftermath.h @@ -15,6 +15,7 @@ namespace Aftermath { void SetAftermathEventMarker(void* cntxHandle, const AZStd::string& markerData, bool isAftermathInitialized); + void SetAftermathEventMarker(void* cntxHandle, const char* markerData, bool isAftermathInitialized); bool InitializeAftermath(AZ::RHI::Ptr dx12Device); void* CreateAftermathContextHandle(ID3D12GraphicsCommandList* commandList, void* crashTracker); void OutputLastScopeExecutingOnGPU(void* crashTracker); diff --git a/Gems/Atom/RHI/DX12/Code/Source/RHI/PipelineLayout.cpp b/Gems/Atom/RHI/DX12/Code/Source/RHI/PipelineLayout.cpp index 3fdeec1c51..5a54282e70 100644 --- a/Gems/Atom/RHI/DX12/Code/Source/RHI/PipelineLayout.cpp +++ b/Gems/Atom/RHI/DX12/Code/Source/RHI/PipelineLayout.cpp @@ -417,7 +417,7 @@ namespace AZ } D3D12_ROOT_SIGNATURE_DESC rootSignatureDesc; - rootSignatureDesc.Flags = D3D12_ROOT_SIGNATURE_FLAG_ALLOW_INPUT_ASSEMBLER_INPUT_LAYOUT; + rootSignatureDesc.Flags = AZ_DX12_ROOT_SIGNATURE_FLAGS; rootSignatureDesc.NumParameters = static_cast(parameters.size()); rootSignatureDesc.pParameters = parameters.data(); rootSignatureDesc.NumStaticSamplers = static_cast(staticSamplers.size()); diff --git a/Gems/Atom/RHI/DX12/Code/Source/RHI/PipelineState.cpp b/Gems/Atom/RHI/DX12/Code/Source/RHI/PipelineState.cpp index a2876398eb..85df5dde25 100644 --- a/Gems/Atom/RHI/DX12/Code/Source/RHI/PipelineState.cpp +++ b/Gems/Atom/RHI/DX12/Code/Source/RHI/PipelineState.cpp @@ -10,8 +10,6 @@ #include #include #include -#include - namespace AZ { namespace DX12 diff --git a/Gems/Atom/RHI/DX12/Code/Source/RHI/RayTracingBlas.cpp b/Gems/Atom/RHI/DX12/Code/Source/RHI/RayTracingBlas.cpp index 0f651f9be3..b74ed5f236 100644 --- a/Gems/Atom/RHI/DX12/Code/Source/RHI/RayTracingBlas.cpp +++ b/Gems/Atom/RHI/DX12/Code/Source/RHI/RayTracingBlas.cpp @@ -5,7 +5,6 @@ * SPDX-License-Identifier: Apache-2.0 OR MIT * */ -#include #include #include #include @@ -73,7 +72,7 @@ namespace AZ // create scratch buffer buffers.m_scratchBuffer = RHI::Factory::Get().CreateBuffer(); AZ::RHI::BufferDescriptor scratchBufferDescriptor; - scratchBufferDescriptor.m_bindFlags = RHI::BufferBindFlags::ShaderReadWrite; + scratchBufferDescriptor.m_bindFlags = RHI::BufferBindFlags::ShaderReadWrite | RHI::BufferBindFlags::RayTracingScratchBuffer; scratchBufferDescriptor.m_byteCount = prebuildInfo.ScratchDataSizeInBytes; AZ::RHI::BufferInitRequest scratchBufferRequest; diff --git a/Gems/Atom/RHI/DX12/Code/Source/RHI/RayTracingPipelineState.cpp b/Gems/Atom/RHI/DX12/Code/Source/RHI/RayTracingPipelineState.cpp index 37f4e6b49a..24c3cf3d16 100644 --- a/Gems/Atom/RHI/DX12/Code/Source/RHI/RayTracingPipelineState.cpp +++ b/Gems/Atom/RHI/DX12/Code/Source/RHI/RayTracingPipelineState.cpp @@ -10,8 +10,6 @@ #include #include #include -#include - namespace AZ { namespace DX12 diff --git a/Gems/Atom/RHI/DX12/Code/Source/RHI/RayTracingShaderTable.cpp b/Gems/Atom/RHI/DX12/Code/Source/RHI/RayTracingShaderTable.cpp index 0a9ea63d2f..38f2f1c219 100644 --- a/Gems/Atom/RHI/DX12/Code/Source/RHI/RayTracingShaderTable.cpp +++ b/Gems/Atom/RHI/DX12/Code/Source/RHI/RayTracingShaderTable.cpp @@ -12,7 +12,6 @@ #include #include #include -#include #include #include #include @@ -86,7 +85,7 @@ namespace AZ AZStd::wstring shaderExportNameWstring; AZStd::to_wstring(shaderExportNameWstring, record.m_shaderExportName.GetStringView()); - void* shaderIdentifier = stateObjectProperties->GetShaderIdentifier(shaderExportNameWstring.c_str()); + const void* shaderIdentifier = stateObjectProperties->GetShaderIdentifier(shaderExportNameWstring.c_str()); memcpy(mappedData, shaderIdentifier, D3D12_SHADER_IDENTIFIER_SIZE_IN_BYTES); mappedData += D3D12_SHADER_IDENTIFIER_SIZE_IN_BYTES; diff --git a/Gems/Atom/RHI/DX12/Code/Source/RHI/RayTracingTlas.cpp b/Gems/Atom/RHI/DX12/Code/Source/RHI/RayTracingTlas.cpp index 52e4aa4881..c28c5e4db5 100644 --- a/Gems/Atom/RHI/DX12/Code/Source/RHI/RayTracingTlas.cpp +++ b/Gems/Atom/RHI/DX12/Code/Source/RHI/RayTracingTlas.cpp @@ -5,7 +5,6 @@ * SPDX-License-Identifier: Apache-2.0 OR MIT * */ -#include #include #include #include @@ -120,7 +119,7 @@ namespace AZ // create scratch buffer buffers.m_scratchBuffer = RHI::Factory::Get().CreateBuffer(); AZ::RHI::BufferDescriptor scratchBufferDescriptor; - scratchBufferDescriptor.m_bindFlags = RHI::BufferBindFlags::ShaderReadWrite; + scratchBufferDescriptor.m_bindFlags = RHI::BufferBindFlags::ShaderReadWrite | RHI::BufferBindFlags::RayTracingScratchBuffer; scratchBufferDescriptor.m_byteCount = prebuildInfo.ScratchDataSizeInBytes; AZ::RHI::BufferInitRequest scratchBufferRequest; diff --git a/Gems/Atom/RHI/DX12/Code/Source/RHI/Scope.cpp b/Gems/Atom/RHI/DX12/Code/Source/RHI/Scope.cpp index cea072954a..95e88af77d 100644 --- a/Gems/Atom/RHI/DX12/Code/Source/RHI/Scope.cpp +++ b/Gems/Atom/RHI/DX12/Code/Source/RHI/Scope.cpp @@ -20,8 +20,6 @@ #include #include #include -#include - namespace AZ { namespace DX12 @@ -94,13 +92,13 @@ namespace AZ const bool Scope::IsStateSupportedByQueue(D3D12_RESOURCE_STATES state) const { - const D3D12_RESOURCE_STATES VALID_COMPUTE_QUEUE_RESOURCE_STATES = + constexpr D3D12_RESOURCE_STATES VALID_COMPUTE_QUEUE_RESOURCE_STATES = (D3D12_RESOURCE_STATE_UNORDERED_ACCESS | D3D12_RESOURCE_STATE_NON_PIXEL_SHADER_RESOURCE | D3D12_RESOURCE_STATE_COPY_DEST | D3D12_RESOURCE_STATE_COPY_SOURCE); - const D3D12_RESOURCE_STATES VALID_GRAPHICS_QUEUE_RESOURCE_STATES = + constexpr D3D12_RESOURCE_STATES VALID_GRAPHICS_QUEUE_RESOURCE_STATES = (D3D12_RESOURCE_STATES)DX12_RESOURCE_STATE_VALID_API_MASK; switch (GetHardwareQueueClass()) @@ -305,13 +303,13 @@ namespace AZ uint32_t commandListCount) const { AZ_UNUSED(commandListCount); - AZ_TRACE_METHOD(); + AZ_PROFILE_FUNCTION(RHI); commandList.GetValidator().BeginScope(*this); PIXBeginEvent(0xFFFF00FF, GetId().GetCStr()); - if (RHI::Factory::Get().IsPixModuleLoaded() || RHI::Factory::Get().IsRenderDocModuleLoaded()) + if (RHI::Factory::Get().PixGpuEventsEnabled()) { PIXBeginEvent(commandList.GetCommandList(), 0xFFFF00FF, GetId().GetCStr()); } @@ -387,7 +385,7 @@ namespace AZ uint32_t commandListIndex, uint32_t commandListCount) const { - AZ_TRACE_METHOD(); + AZ_PROFILE_FUNCTION(RHI); const bool isEpilogue = (commandListIndex + 1) == commandListCount; if (isEpilogue) @@ -428,7 +426,7 @@ namespace AZ } } - if (RHI::Factory::Get().IsPixModuleLoaded() || RHI::Factory::Get().IsRenderDocModuleLoaded()) + if (RHI::Factory::Get().PixGpuEventsEnabled()) { PIXEndEvent(commandList.GetCommandList()); } diff --git a/Gems/Atom/RHI/DX12/Code/Source/RHI/ShaderResourceGroupPool.cpp b/Gems/Atom/RHI/DX12/Code/Source/RHI/ShaderResourceGroupPool.cpp index 087a36dc2f..e2573c72d9 100644 --- a/Gems/Atom/RHI/DX12/Code/Source/RHI/ShaderResourceGroupPool.cpp +++ b/Gems/Atom/RHI/DX12/Code/Source/RHI/ShaderResourceGroupPool.cpp @@ -14,8 +14,6 @@ #include #include #include -#include - namespace AZ { @@ -204,23 +202,19 @@ namespace AZ { ShaderResourceGroup& group = static_cast(groupBase); auto& device = static_cast(GetDevice()); - group.m_compiledDataIndex = (group.m_compiledDataIndex + 1) % RHI::Limits::Device::FrameCountMax; if (!groupData.IsAnyResourceTypeUpdated()) { return RHI::ResultCode::Success; } - if (m_constantBufferSize && - groupData.IsResourceTypeEnabledForCompilation(static_cast(RHI::ShaderResourceGroupData::ResourceTypeMask::ConstantDataMask))) + group.m_compiledDataIndex = (group.m_compiledDataIndex + 1) % RHI::Limits::Device::FrameCountMax; + if (m_constantBufferSize) { memcpy(group.GetCompiledData().m_cpuConstantAddress, groupData.GetConstantData().data(), groupData.GetConstantData().size()); } - if (m_viewsDescriptorTableSize && - groupData.IsResourceTypeEnabledForCompilation( - static_cast(RHI::ShaderResourceGroupData::ResourceTypeMask::ImageViewMask) | - static_cast(RHI::ShaderResourceGroupData::ResourceTypeMask::BufferViewMask))) + if (m_viewsDescriptorTableSize) { //Lazy initialization for cbv/srv/uav Descriptor Tables if (!group.m_viewsDescriptorTable.IsValid()) @@ -245,17 +239,12 @@ namespace AZ UpdateViewsDescriptorTable(descriptorTable, groupData); } - if (m_unboundedArrayCount && - groupData.IsResourceTypeEnabledForCompilation( - static_cast(RHI::ShaderResourceGroupData::ResourceTypeMask::ImageViewUnboundedArrayMask) | - static_cast(RHI::ShaderResourceGroupData::ResourceTypeMask::BufferViewUnboundedArrayMask))) + if (m_unboundedArrayCount) { UpdateUnboundedArrayDescriptorTables(group, groupData); } - if (m_samplersDescriptorTableSize && - groupData.IsResourceTypeEnabledForCompilation( - static_cast(RHI::ShaderResourceGroupData::ResourceTypeMask::SamplerMask))) + if (m_samplersDescriptorTableSize) { const DescriptorTable descriptorTable( group.m_samplersDescriptorTable.GetOffset() + group.m_compiledDataIndex * m_samplersDescriptorTableSize, diff --git a/Gems/Atom/RHI/DX12/Code/Source/RHI/StagingMemoryAllocator.cpp b/Gems/Atom/RHI/DX12/Code/Source/RHI/StagingMemoryAllocator.cpp index 337b25a793..a7e48916ad 100644 --- a/Gems/Atom/RHI/DX12/Code/Source/RHI/StagingMemoryAllocator.cpp +++ b/Gems/Atom/RHI/DX12/Code/Source/RHI/StagingMemoryAllocator.cpp @@ -9,8 +9,6 @@ #include #include -#include - namespace AZ { namespace DX12 @@ -124,7 +122,7 @@ namespace AZ MemoryView StagingMemoryAllocator::AllocateUnique(size_t sizeInBytes) { - AZ_TRACE_METHOD(); + AZ_PROFILE_FUNCTION(RHI); RHI::BufferDescriptor descriptor; descriptor.m_byteCount = sizeInBytes; MemoryView memoryView = m_device->CreateBufferCommitted(descriptor, D3D12_RESOURCE_STATE_GENERIC_READ, D3D12_HEAP_TYPE_UPLOAD); diff --git a/Gems/Atom/RHI/DX12/Code/Source/RHI/StreamingImagePool.cpp b/Gems/Atom/RHI/DX12/Code/Source/RHI/StreamingImagePool.cpp index add7364056..6af229cc55 100644 --- a/Gems/Atom/RHI/DX12/Code/Source/RHI/StreamingImagePool.cpp +++ b/Gems/Atom/RHI/DX12/Code/Source/RHI/StreamingImagePool.cpp @@ -12,8 +12,6 @@ #include #include #include -#include - // NOTE: Tiled resources are currently disabled, because RenderDoc does not support them. // #define AZ_RHI_USE_TILED_RESOURCES @@ -121,7 +119,7 @@ namespace AZ D3D12_RESOURCE_ALLOCATION_INFO StreamingImagePool::GetAllocationInfo(const RHI::ImageDescriptor& imageDescriptor, uint32_t residentMipLevel) { - AZ_TRACE_METHOD(); + AZ_PROFILE_FUNCTION(RHI); uint32_t alignment = GetFormatDimensionAlignment(imageDescriptor.m_format); @@ -138,9 +136,7 @@ namespace AZ RHI::ResultCode StreamingImagePool::InitInternal([[maybe_unused]] RHI::Device& deviceBase, [[maybe_unused]] const RHI::StreamingImagePoolDescriptor& descriptor) { - AZ_TRACE_METHOD(); - - + AZ_PROFILE_FUNCTION(RHI); #ifdef AZ_RHI_USE_TILED_RESOURCES { @@ -232,7 +228,7 @@ namespace AZ void StreamingImagePool::AllocatePackedImageTiles(Image& image) { - AZ_TRACE_METHOD(); + AZ_PROFILE_FUNCTION(RHI); AZ_Assert(image.IsTiled(), "This method is only valid for tiled resources."); AZ_Assert(image.GetDescriptor().m_arraySize == 1, "Not implemented for image arrays."); @@ -305,7 +301,7 @@ namespace AZ RHI::ResultCode StreamingImagePool::InitImageInternal(const RHI::StreamingImageInitRequest& request) { - AZ_TRACE_METHOD(); + AZ_PROFILE_FUNCTION(RHI); Image& image = static_cast(*request.m_image); diff --git a/Gems/Atom/RHI/DX12/Code/Source/RHI/SystemComponent.cpp b/Gems/Atom/RHI/DX12/Code/Source/RHI/SystemComponent.cpp index 1f6cea1151..17993d7c1d 100644 --- a/Gems/Atom/RHI/DX12/Code/Source/RHI/SystemComponent.cpp +++ b/Gems/Atom/RHI/DX12/Code/Source/RHI/SystemComponent.cpp @@ -38,7 +38,6 @@ #include #include #include -#include #include namespace AZ diff --git a/Gems/Atom/RHI/DX12/gem.json b/Gems/Atom/RHI/DX12/gem.json index eb876a1b9f..868acd43db 100644 --- a/Gems/Atom/RHI/DX12/gem.json +++ b/Gems/Atom/RHI/DX12/gem.json @@ -2,6 +2,7 @@ "gem_name": "Atom_RHI_DX12", "display_name": "Atom RHI DX12", "license": "Apache-2.0 Or MIT", + "license_url": "https://github.com/o3de/o3de/blob/development/LICENSE.txt", "origin": "Open 3D Engine - o3de.org", "type": "Code", "summary": "", diff --git a/Gems/Atom/RHI/Metal/Code/Include/Atom/RHI.Reflect/Metal/PlatformLimitsDescriptor.h b/Gems/Atom/RHI/Metal/Code/Include/Atom/RHI.Reflect/Metal/PlatformLimitsDescriptor.h index 375b532d39..bd52c37a67 100644 --- a/Gems/Atom/RHI/Metal/Code/Include/Atom/RHI.Reflect/Metal/PlatformLimitsDescriptor.h +++ b/Gems/Atom/RHI/Metal/Code/Include/Atom/RHI.Reflect/Metal/PlatformLimitsDescriptor.h @@ -31,7 +31,7 @@ namespace AZ uint32_t m_swapChainsPerCommandList = 8; // The maximum cost that can be associated with a single command list. - uint32_t m_commandListCostThresholdMin = 1000; + uint32_t m_commandListCostThresholdMin = 250; // The maximum number of command lists per scope. uint32_t m_commandListsPerScopeMax = 16; diff --git a/Gems/Atom/RHI/Metal/Code/Source/RHI.Builders/ShaderPlatformInterface.cpp b/Gems/Atom/RHI/Metal/Code/Source/RHI.Builders/ShaderPlatformInterface.cpp index d43d88a7e1..8c80205c17 100644 --- a/Gems/Atom/RHI/Metal/Code/Source/RHI.Builders/ShaderPlatformInterface.cpp +++ b/Gems/Atom/RHI/Metal/Code/Source/RHI.Builders/ShaderPlatformInterface.cpp @@ -347,7 +347,7 @@ namespace AZ // spirv cross compiler executable static const char* spirvCrossRelativePath = "Builders/SPIRVCross/spirv-cross"; - AZStd::string spirvCrossCommandOptions = AZStd::string::format("--msl --msl-version 20100 --msl-argument-buffers --msl-decoration-binding --msl-texture-buffer-native --output \"%s\" \"%s\"", shaderMSLOutputFile.c_str(), shaderSpirvOutputFile.c_str()); + AZStd::string spirvCrossCommandOptions = AZStd::string::format("--msl --msl-version 20100 --msl-invariant-float-math --msl-argument-buffers --msl-decoration-binding --msl-texture-buffer-native --output \"%s\" \"%s\"", shaderMSLOutputFile.c_str(), shaderSpirvOutputFile.c_str()); // Run spirv cross if (!RHI::ExecuteShaderCompiler(spirvCrossRelativePath, spirvCrossCommandOptions, shaderSpirvOutputFile, "SpirvCross")) @@ -426,6 +426,8 @@ namespace AZ //Debug symbols are always enabled at the moment. Need to turn them off for optimized shader assets. AZStd::string shaderDebugInfo = "-gline-tables-only -MO"; + AZStd::string shaderMslToAirOptions = "-fpreserve-invariance"; + //Apply the correct platform sdk option AZStd::string platformSdk = "macosx"; if (platform.HasTag("mobile")) @@ -434,7 +436,7 @@ namespace AZ } //Convert to air file - AZStd::string mslToAirCommandOptions = AZStd::string::format("-sdk %s metal \"%s\" %s -c -o \"%s\"", platformSdk.c_str(), inputMetalFile.c_str(), shaderDebugInfo.c_str(), outputAirFile.c_str()); + AZStd::string mslToAirCommandOptions = AZStd::string::format("-sdk %s metal \"%s\" %s %s -c -o \"%s\"", platformSdk.c_str(), inputMetalFile.c_str(), shaderDebugInfo.c_str(), shaderMslToAirOptions.c_str(), outputAirFile.c_str()); if (!RHI::ExecuteShaderCompiler("/usr/bin/xcrun", mslToAirCommandOptions, inputMetalFile, "MslToAir")) { diff --git a/Gems/Atom/RHI/Metal/Code/Source/RHI/AliasedHeap.cpp b/Gems/Atom/RHI/Metal/Code/Source/RHI/AliasedHeap.cpp index 440615d77f..011dc7a353 100644 --- a/Gems/Atom/RHI/Metal/Code/Source/RHI/AliasedHeap.cpp +++ b/Gems/Atom/RHI/Metal/Code/Source/RHI/AliasedHeap.cpp @@ -8,7 +8,6 @@ #include #include #include -#include #include #include #include diff --git a/Gems/Atom/RHI/Metal/Code/Source/RHI/AsyncUploadQueue.cpp b/Gems/Atom/RHI/Metal/Code/Source/RHI/AsyncUploadQueue.cpp index eadd571452..f731d9e9d9 100644 --- a/Gems/Atom/RHI/Metal/Code/Source/RHI/AsyncUploadQueue.cpp +++ b/Gems/Atom/RHI/Metal/Code/Source/RHI/AsyncUploadQueue.cpp @@ -11,7 +11,6 @@ #include #include #include -#include #include #include #include @@ -120,21 +119,21 @@ namespace AZ m_copyQueue->QueueCommand([=](void* queue) { - AZ_TRACE_METHOD_NAME("Upload Buffer"); + AZ_PROFILE_SCOPE(RHI, "Upload Buffer"); size_t pendingByteOffset = 0; size_t pendingByteCount = byteCount; CommandQueue* commandQueue = static_cast(queue); while (pendingByteCount > 0) { - AZ_TRACE_METHOD_NAME("Upload Buffer Chunk"); + AZ_PROFILE_SCOPE(RHI, "Upload Buffer Chunk"); FramePacket* framePacket = BeginFramePacket(commandQueue); const size_t bytesToCopy = AZStd::min(pendingByteCount, m_descriptor.m_stagingSizeInBytes); { - AZ_TRACE_METHOD_NAME("Copy CPU buffer"); + AZ_PROFILE_SCOPE(RHI, "Copy CPU buffer"); memcpy(framePacket->m_stagingResourceData, sourceData + pendingByteOffset, bytesToCopy); Platform::SynchronizeBufferOnCPU(framePacket->m_stagingResource, 0, bytesToCopy); } @@ -379,7 +378,7 @@ namespace AZ { AZ_Assert(!m_recordingFrame, "The previous frame packet isn't ended"); - AZ_TRACE_METHOD_NAME("AsyncUploadQueue: Wait copy frame"); + AZ_PROFILE_SCOPE(RHI, "AsyncUploadQueue: Wait copy frame"); FramePacket& framePacket = m_framePackets[m_frameIndex]; framePacket.m_fence.WaitOnCpu(); // ensure any previous uploads using this frame have completed @@ -400,7 +399,7 @@ namespace AZ { AZ_Assert(m_recordingFrame, "The frame packet wasn't started. You need to call StartFramePacket first."); - AZ_TRACE_METHOD_NAME("AsyncUploadQueue: Execute command"); + AZ_PROFILE_SCOPE(RHI, "AsyncUploadQueue: Execute command"); FramePacket& framePacket = m_framePackets[m_frameIndex]; framePacket.m_fence.SignalFromGpu(framePacket.m_mtlCommandBuffer); // signal fence when this upload haas completed diff --git a/Gems/Atom/RHI/Metal/Code/Source/RHI/BufferMemoryAllocator.cpp b/Gems/Atom/RHI/Metal/Code/Source/RHI/BufferMemoryAllocator.cpp index 7676459154..63c6dd68e4 100644 --- a/Gems/Atom/RHI/Metal/Code/Source/RHI/BufferMemoryAllocator.cpp +++ b/Gems/Atom/RHI/Metal/Code/Source/RHI/BufferMemoryAllocator.cpp @@ -116,7 +116,7 @@ namespace AZ BufferMemoryView BufferMemoryAllocator::AllocateUnique(const RHI::BufferDescriptor& bufferDescriptor) { - AZ_TRACE_METHOD(); + AZ_PROFILE_FUNCTION(RHI); const size_t alignedSize = RHI::AlignUp(bufferDescriptor.m_byteCount, Alignment::Buffer); RHI::HeapMemoryUsage& heapMemoryUsage = *m_descriptor.m_getHeapMemoryUsageFunction(); diff --git a/Gems/Atom/RHI/Metal/Code/Source/RHI/CommandList.cpp b/Gems/Atom/RHI/Metal/Code/Source/RHI/CommandList.cpp index 3c45e69d8b..2b8be3d1ab 100644 --- a/Gems/Atom/RHI/Metal/Code/Source/RHI/CommandList.cpp +++ b/Gems/Atom/RHI/Metal/Code/Source/RHI/CommandList.cpp @@ -7,7 +7,6 @@ */ #include -#include #include #include #include @@ -177,7 +176,7 @@ namespace AZ void CommandList::Submit(const RHI::DispatchItem& dispatchItem) { - AZ_TRACE_METHOD(); + AZ_PROFILE_FUNCTION(RHI); CreateEncoder(CommandEncoderType::Compute); bool bindResourceSuccessfull = CommitShaderResources(dispatchItem); @@ -479,7 +478,7 @@ namespace AZ void CommandList::Submit(const RHI::DrawItem& drawItem) { - AZ_TRACE_METHOD(); + AZ_PROFILE_FUNCTION(RHI); CreateEncoder(CommandEncoderType::Render); @@ -582,7 +581,7 @@ namespace AZ { if (m_state.m_pipelineState != pipelineState) { - AZ_TRACE_METHOD(); + AZ_PROFILE_FUNCTION(RHI); m_state.m_pipelineState = pipelineState; switch (pipelineState->GetType()) @@ -732,7 +731,7 @@ namespace AZ return; } - AZ_TRACE_METHOD(); + AZ_PROFILE_FUNCTION(RHI); const auto& viewports = m_state.m_viewportState.m_states; MTLViewport metalViewports[viewports.size()]; diff --git a/Gems/Atom/RHI/Metal/Code/Source/RHI/CommandListBase.cpp b/Gems/Atom/RHI/Metal/Code/Source/RHI/CommandListBase.cpp index e386c25515..063622354b 100644 --- a/Gems/Atom/RHI/Metal/Code/Source/RHI/CommandListBase.cpp +++ b/Gems/Atom/RHI/Metal/Code/Source/RHI/CommandListBase.cpp @@ -7,7 +7,6 @@ */ #include -#include #include #include diff --git a/Gems/Atom/RHI/Metal/Code/Source/RHI/CommandQueueCommandBuffer.cpp b/Gems/Atom/RHI/Metal/Code/Source/RHI/CommandQueueCommandBuffer.cpp index e2a456c81c..0cdccef01e 100644 --- a/Gems/Atom/RHI/Metal/Code/Source/RHI/CommandQueueCommandBuffer.cpp +++ b/Gems/Atom/RHI/Metal/Code/Source/RHI/CommandQueueCommandBuffer.cpp @@ -7,7 +7,6 @@ */ #include -#include #include namespace AZ diff --git a/Gems/Atom/RHI/Metal/Code/Source/RHI/CommandQueueContext.cpp b/Gems/Atom/RHI/Metal/Code/Source/RHI/CommandQueueContext.cpp index 37f8a8bab8..9fa0640f64 100644 --- a/Gems/Atom/RHI/Metal/Code/Source/RHI/CommandQueueContext.cpp +++ b/Gems/Atom/RHI/Metal/Code/Source/RHI/CommandQueueContext.cpp @@ -6,7 +6,6 @@ * */ -#include #include #include #include @@ -60,7 +59,7 @@ namespace AZ void CommandQueueContext::WaitForIdle() { - AZ_TRACE_METHOD(); + AZ_PROFILE_FUNCTION(RHI); for (uint32_t hardwareQueueIdx = 0; hardwareQueueIdx < RHI::HardwareQueueClassCount; ++hardwareQueueIdx) { m_commandQueues[hardwareQueueIdx]->WaitForIdle(); diff --git a/Gems/Atom/RHI/Metal/Code/Source/RHI/Device.cpp b/Gems/Atom/RHI/Metal/Code/Source/RHI/Device.cpp index 76af1ecab1..91d8287e8d 100644 --- a/Gems/Atom/RHI/Metal/Code/Source/RHI/Device.cpp +++ b/Gems/Atom/RHI/Metal/Code/Source/RHI/Device.cpp @@ -8,7 +8,6 @@ #include #include #include -#include #include #include #include diff --git a/Gems/Atom/RHI/Metal/Code/Source/RHI/FrameGraphCompiler.cpp b/Gems/Atom/RHI/Metal/Code/Source/RHI/FrameGraphCompiler.cpp index 9ee000e166..568d990e6f 100644 --- a/Gems/Atom/RHI/Metal/Code/Source/RHI/FrameGraphCompiler.cpp +++ b/Gems/Atom/RHI/Metal/Code/Source/RHI/FrameGraphCompiler.cpp @@ -7,7 +7,6 @@ */ #include -#include #include #include #include @@ -47,7 +46,7 @@ namespace AZ { Device& device = static_cast(GetDevice()); - AZ_TRACE_METHOD(); + AZ_PROFILE_FUNCTION(RHI); CommandQueueContext& context = device.GetCommandQueueContext(); for (RHI::Scope* scopeBase : frameGraph.GetScopes()) diff --git a/Gems/Atom/RHI/Metal/Code/Source/RHI/FrameGraphExecuter.cpp b/Gems/Atom/RHI/Metal/Code/Source/RHI/FrameGraphExecuter.cpp index 73bdcde9a0..41824ced9e 100644 --- a/Gems/Atom/RHI/Metal/Code/Source/RHI/FrameGraphExecuter.cpp +++ b/Gems/Atom/RHI/Metal/Code/Source/RHI/FrameGraphExecuter.cpp @@ -7,7 +7,6 @@ */ #include -#include #include #include #include diff --git a/Gems/Atom/RHI/Metal/Code/Source/RHI/MemoryPageAllocator.cpp b/Gems/Atom/RHI/Metal/Code/Source/RHI/MemoryPageAllocator.cpp index 619a6e5b8a..2787eef9af 100644 --- a/Gems/Atom/RHI/Metal/Code/Source/RHI/MemoryPageAllocator.cpp +++ b/Gems/Atom/RHI/Metal/Code/Source/RHI/MemoryPageAllocator.cpp @@ -9,8 +9,6 @@ #include #include #include -#include - namespace AZ { namespace Metal @@ -29,7 +27,7 @@ namespace AZ return nullptr; } - AZ_TRACE_METHOD_NAME("Create Buffer Page"); + AZ_PROFILE_SCOPE(RHI, "Create Buffer Page"); RHI::BufferDescriptor bufferDescriptor; bufferDescriptor.m_byteCount = m_descriptor.m_pageSizeInBytes; diff --git a/Gems/Atom/RHI/Metal/Code/Source/RHI/PipelineState.cpp b/Gems/Atom/RHI/Metal/Code/Source/RHI/PipelineState.cpp index 8d6ab8fee3..002a8b9bd9 100644 --- a/Gems/Atom/RHI/Metal/Code/Source/RHI/PipelineState.cpp +++ b/Gems/Atom/RHI/Metal/Code/Source/RHI/PipelineState.cpp @@ -10,7 +10,6 @@ #include #include #include -#include #include #include #include @@ -61,10 +60,19 @@ namespace AZ NSError* error = nil; id lib = nil; - + + bool loadFromByteCode = false; + + // MacOS Big Sur (11.16.x) has issue loading some shader's byte code when GPUCapture(Metal) is on. + // Only enable it for Monterey (12.x) + if(@available(iOS 14.0, macOS 12.0, *)) + { + loadFromByteCode = true; + } + const uint8_t* shaderByteCode = reinterpret_cast(shaderFunction->GetByteCode().data()); const int byteCodeLength = shaderFunction->GetByteCode().size(); - if(byteCodeLength > 0 ) + if(byteCodeLength > 0 && loadFromByteCode) { dispatch_data_t dispatchByteCodeData = dispatch_data_create(shaderByteCode, byteCodeLength, NULL, DISPATCH_DATA_DESTRUCTOR_DEFAULT); lib = [mtlDevice newLibraryWithData:dispatchByteCodeData error:&error]; @@ -74,7 +82,7 @@ namespace AZ //In case byte code was not generated try to create the lib with source code MTLCompileOptions* compileOptions = [MTLCompileOptions alloc]; compileOptions.fastMathEnabled = YES; - compileOptions.languageVersion = MTLLanguageVersion2_0; + compileOptions.languageVersion = MTLLanguageVersion2_2; lib = [mtlDevice newLibraryWithSource:source options:compileOptions error:&error]; diff --git a/Gems/Atom/RHI/Metal/Code/Source/RHI/Scope.cpp b/Gems/Atom/RHI/Metal/Code/Source/RHI/Scope.cpp index c680684efd..4a1dc8765d 100644 --- a/Gems/Atom/RHI/Metal/Code/Source/RHI/Scope.cpp +++ b/Gems/Atom/RHI/Metal/Code/Source/RHI/Scope.cpp @@ -8,7 +8,6 @@ #include #include -#include #include #include #include @@ -273,7 +272,7 @@ namespace AZ AZ::u32 commandListIndex, AZ::u32 commandListCount) const { - AZ_TRACE_METHOD(); + AZ_PROFILE_FUNCTION(RHI); if(m_isWritingToSwapChainScope) { @@ -331,7 +330,7 @@ namespace AZ AZ::u32 commandListIndex, AZ::u32 commandListCount) const { - AZ_TRACE_METHOD(); + AZ_PROFILE_FUNCTION(RHI); const bool isEpilogue = (commandListIndex + 1) == commandListCount; commandList.FlushEncoder(); diff --git a/Gems/Atom/RHI/Metal/Code/Source/RHI/ShaderResourceGroupPool.cpp b/Gems/Atom/RHI/Metal/Code/Source/RHI/ShaderResourceGroupPool.cpp index 0a9c001868..fa962697e1 100644 --- a/Gems/Atom/RHI/Metal/Code/Source/RHI/ShaderResourceGroupPool.cpp +++ b/Gems/Atom/RHI/Metal/Code/Source/RHI/ShaderResourceGroupPool.cpp @@ -1,127 +1,117 @@ -/* - * Copyright (c) Contributors to the Open 3D Engine Project. - * For complete copyright and license terms please see the LICENSE at the root of this distribution. - * - * SPDX-License-Identifier: Apache-2.0 OR MIT - * - */ - -#include -#include -#include -#include -#include -#include - -namespace AZ -{ - namespace Metal - { - RHI::Ptr ShaderResourceGroupPool::Create() - { - return aznew ShaderResourceGroupPool(); - } - - RHI::ResultCode ShaderResourceGroupPool::InitInternal(RHI::Device& deviceBase, const RHI::ShaderResourceGroupPoolDescriptor& descriptor) - { - Device& device = static_cast(deviceBase); - m_device = &device; - m_srgLayout = descriptor.m_layout; - return RHI::ResultCode::Success; - } - - void ShaderResourceGroupPool::ShutdownInternal() - { - Base::ShutdownInternal(); - } - - RHI::ResultCode ShaderResourceGroupPool::InitGroupInternal(RHI::ShaderResourceGroup& groupBase) - { - ShaderResourceGroup& group = static_cast(groupBase); - - for (size_t i = 0; i < RHI::Limits::Device::FrameCountMax; ++i) - { - auto argBuffer = ArgumentBuffer::Create(); - argBuffer->Init(m_device, m_srgLayout, group, this); - group.m_compiledArgBuffers[i] = argBuffer; - } - - return RHI::ResultCode::Success; - } - - void ShaderResourceGroupPool::ShutdownResourceInternal(RHI::Resource& resourceBase) - { - ShaderResourceGroup& group = static_cast(resourceBase); - for (size_t i = 0; i < RHI::Limits::Device::FrameCountMax; ++i) - { - group.m_compiledArgBuffers[i] = nullptr; - } - Base::ShutdownResourceInternal(resourceBase); - } - - RHI::ResultCode ShaderResourceGroupPool::CompileGroupInternal(RHI::ShaderResourceGroup& groupBase, const RHI::ShaderResourceGroupData& groupData) - { - ShaderResourceGroup& group = static_cast(groupBase); - group.UpdateCompiledDataIndex(); - - if (!groupData.IsAnyResourceTypeUpdated()) - { - return RHI::ResultCode::Success; - } - - ArgumentBuffer& argBuffer = *group.m_compiledArgBuffers[group.m_compiledDataIndex]; - argBuffer.ClearResourceTracking(); - - auto constantData = groupData.GetConstantData(); - if (!constantData.empty() && groupData.IsResourceTypeEnabledForCompilation(static_cast(RHI::ShaderResourceGroupData::ResourceTypeMask::ConstantDataMask))) - { - argBuffer.UpdateConstantBufferViews(groupData.GetConstantData()); - } - - const RHI::ShaderResourceGroupLayout* layout = groupData.GetLayout(); - uint32_t shaderInputIndex = 0; - if (groupData.IsResourceTypeEnabledForCompilation(static_cast(RHI::ShaderResourceGroupData::ResourceTypeMask::ImageViewMask))) - { - for (const RHI::ShaderInputImageDescriptor& shaderInputImage : layout->GetShaderInputListForImages()) - { - const RHI::ShaderInputImageIndex imageInputIndex(shaderInputIndex); - AZStd::array_view> imageViews = groupData.GetImageViewArray(imageInputIndex); - argBuffer.UpdateImageViews(shaderInputImage, imageInputIndex, imageViews); - ++shaderInputIndex; - } - } - - if (groupData.IsResourceTypeEnabledForCompilation(static_cast(RHI::ShaderResourceGroupData::ResourceTypeMask::SamplerMask))) - { - shaderInputIndex = 0; - for (const RHI::ShaderInputSamplerDescriptor& shaderInputSampler : layout->GetShaderInputListForSamplers()) - { - const RHI::ShaderInputSamplerIndex samplerInputIndex(shaderInputIndex); - AZStd::array_view samplerStates = groupData.GetSamplerArray(samplerInputIndex); - argBuffer.UpdateSamplers(shaderInputSampler, samplerInputIndex, samplerStates); - ++shaderInputIndex; - } - } - - if (groupData.IsResourceTypeEnabledForCompilation(static_cast(RHI::ShaderResourceGroupData::ResourceTypeMask::BufferViewMask))) - { - shaderInputIndex = 0; - for (const RHI::ShaderInputBufferDescriptor& shaderInputBuffer : layout->GetShaderInputListForBuffers()) - { - const RHI::ShaderInputBufferIndex bufferInputIndex(shaderInputIndex); - AZStd::array_view> bufferViews = groupData.GetBufferViewArray(bufferInputIndex); - argBuffer.UpdateBufferViews(shaderInputBuffer, bufferInputIndex, bufferViews); - ++shaderInputIndex; - } - } - - return RHI::ResultCode::Success; - } - - void ShaderResourceGroupPool::OnFrameEnd() - { - Base::OnFrameEnd(); - } - - } -} +/* + * Copyright (c) Contributors to the Open 3D Engine Project. + * For complete copyright and license terms please see the LICENSE at the root of this distribution. + * + * SPDX-License-Identifier: Apache-2.0 OR MIT + * + */ + +#include +#include +#include +#include +#include + +namespace AZ +{ + namespace Metal + { + RHI::Ptr ShaderResourceGroupPool::Create() + { + return aznew ShaderResourceGroupPool(); + } + + RHI::ResultCode ShaderResourceGroupPool::InitInternal(RHI::Device& deviceBase, const RHI::ShaderResourceGroupPoolDescriptor& descriptor) + { + Device& device = static_cast(deviceBase); + m_device = &device; + m_srgLayout = descriptor.m_layout; + return RHI::ResultCode::Success; + } + + void ShaderResourceGroupPool::ShutdownInternal() + { + Base::ShutdownInternal(); + } + + RHI::ResultCode ShaderResourceGroupPool::InitGroupInternal(RHI::ShaderResourceGroup& groupBase) + { + ShaderResourceGroup& group = static_cast(groupBase); + + for (size_t i = 0; i < RHI::Limits::Device::FrameCountMax; ++i) + { + auto argBuffer = ArgumentBuffer::Create(); + argBuffer->Init(m_device, m_srgLayout, group, this); + group.m_compiledArgBuffers[i] = argBuffer; + } + + return RHI::ResultCode::Success; + } + + void ShaderResourceGroupPool::ShutdownResourceInternal(RHI::Resource& resourceBase) + { + ShaderResourceGroup& group = static_cast(resourceBase); + for (size_t i = 0; i < RHI::Limits::Device::FrameCountMax; ++i) + { + group.m_compiledArgBuffers[i] = nullptr; + } + Base::ShutdownResourceInternal(resourceBase); + } + + RHI::ResultCode ShaderResourceGroupPool::CompileGroupInternal(RHI::ShaderResourceGroup& groupBase, const RHI::ShaderResourceGroupData& groupData) + { + ShaderResourceGroup& group = static_cast(groupBase); + + if (!groupData.IsAnyResourceTypeUpdated()) + { + return RHI::ResultCode::Success; + } + + group.UpdateCompiledDataIndex(); + ArgumentBuffer& argBuffer = *group.m_compiledArgBuffers[group.m_compiledDataIndex]; + argBuffer.ClearResourceTracking(); + + auto constantData = groupData.GetConstantData(); + if (!constantData.empty()) + { + argBuffer.UpdateConstantBufferViews(groupData.GetConstantData()); + } + + const RHI::ShaderResourceGroupLayout* layout = groupData.GetLayout(); + uint32_t shaderInputIndex = 0; + for (const RHI::ShaderInputImageDescriptor& shaderInputImage : layout->GetShaderInputListForImages()) + { + const RHI::ShaderInputImageIndex imageInputIndex(shaderInputIndex); + AZStd::array_view> imageViews = groupData.GetImageViewArray(imageInputIndex); + argBuffer.UpdateImageViews(shaderInputImage, imageInputIndex, imageViews); + ++shaderInputIndex; + } + + shaderInputIndex = 0; + for (const RHI::ShaderInputSamplerDescriptor& shaderInputSampler : layout->GetShaderInputListForSamplers()) + { + const RHI::ShaderInputSamplerIndex samplerInputIndex(shaderInputIndex); + AZStd::array_view samplerStates = groupData.GetSamplerArray(samplerInputIndex); + argBuffer.UpdateSamplers(shaderInputSampler, samplerInputIndex, samplerStates); + ++shaderInputIndex; + } + + shaderInputIndex = 0; + for (const RHI::ShaderInputBufferDescriptor& shaderInputBuffer : layout->GetShaderInputListForBuffers()) + { + const RHI::ShaderInputBufferIndex bufferInputIndex(shaderInputIndex); + AZStd::array_view> bufferViews = groupData.GetBufferViewArray(bufferInputIndex); + argBuffer.UpdateBufferViews(shaderInputBuffer, bufferInputIndex, bufferViews); + ++shaderInputIndex; + } + + return RHI::ResultCode::Success; + } + + void ShaderResourceGroupPool::OnFrameEnd() + { + Base::OnFrameEnd(); + } + + } +} diff --git a/Gems/Atom/RHI/Metal/Code/Source/RHI/StreamingImagePool.cpp b/Gems/Atom/RHI/Metal/Code/Source/RHI/StreamingImagePool.cpp index 3d90b595e4..2ae7feddb8 100644 --- a/Gems/Atom/RHI/Metal/Code/Source/RHI/StreamingImagePool.cpp +++ b/Gems/Atom/RHI/Metal/Code/Source/RHI/StreamingImagePool.cpp @@ -8,7 +8,6 @@ #include #include -#include #include #include #include @@ -36,7 +35,7 @@ namespace AZ RHI::ResultCode StreamingImagePool::InitInternal(RHI::Device& deviceBase, const RHI::StreamingImagePoolDescriptor& descriptor) { - AZ_TRACE_METHOD(); + AZ_PROFILE_FUNCTION(RHI); Device& device = static_cast(deviceBase); SetResolver(AZStd::make_unique(device, this)); @@ -89,7 +88,7 @@ namespace AZ RHI::ResultCode StreamingImagePool::ExpandImageInternal(const RHI::StreamingImageExpandRequest& request) { - AZ_TRACE_METHOD(); + AZ_PROFILE_FUNCTION(RHI); auto& image = static_cast(*request.m_image); auto& device = static_cast(GetDevice()); diff --git a/Gems/Atom/RHI/Metal/Code/Source/RHI/StreamingImagePoolResolver.cpp b/Gems/Atom/RHI/Metal/Code/Source/RHI/StreamingImagePoolResolver.cpp index 0a9aaf60d6..3ef2dc915a 100644 --- a/Gems/Atom/RHI/Metal/Code/Source/RHI/StreamingImagePoolResolver.cpp +++ b/Gems/Atom/RHI/Metal/Code/Source/RHI/StreamingImagePoolResolver.cpp @@ -6,7 +6,6 @@ * */ -#include #include #include @@ -16,7 +15,7 @@ namespace AZ { RHI::ResultCode StreamingImagePoolResolver::UpdateImage(const RHI::StreamingImageExpandRequest& request) { - AZ_TRACE_METHOD(); + AZ_PROFILE_FUNCTION(RHI); Image* image = static_cast(request.m_image); const RHI::ImageDescriptor& imageDescriptor = image->GetDescriptor(); diff --git a/Gems/Atom/RHI/Metal/Code/Source/RHI/SystemComponent.cpp b/Gems/Atom/RHI/Metal/Code/Source/RHI/SystemComponent.cpp index 840bef2b1b..3d1583fe1b 100644 --- a/Gems/Atom/RHI/Metal/Code/Source/RHI/SystemComponent.cpp +++ b/Gems/Atom/RHI/Metal/Code/Source/RHI/SystemComponent.cpp @@ -16,7 +16,6 @@ #include #include #include -#include #include #include #include diff --git a/Gems/Atom/RHI/Metal/gem.json b/Gems/Atom/RHI/Metal/gem.json index 8da6bfabec..6e983ba505 100644 --- a/Gems/Atom/RHI/Metal/gem.json +++ b/Gems/Atom/RHI/Metal/gem.json @@ -2,6 +2,7 @@ "gem_name": "Atom_RHI_Metal", "display_name": "Atom RHI Metal", "license": "Apache-2.0 Or MIT", + "license_url": "https://github.com/o3de/o3de/blob/development/LICENSE.txt", "origin": "Open 3D Engine - o3de.org", "type": "Code", "summary": "", diff --git a/Gems/Atom/RHI/Null/Code/Source/RHI/SystemComponent.cpp b/Gems/Atom/RHI/Null/Code/Source/RHI/SystemComponent.cpp index 091084b097..e329d69ddc 100644 --- a/Gems/Atom/RHI/Null/Code/Source/RHI/SystemComponent.cpp +++ b/Gems/Atom/RHI/Null/Code/Source/RHI/SystemComponent.cpp @@ -12,7 +12,6 @@ #include #include #include -#include #include #include #include diff --git a/Gems/Atom/RHI/Null/gem.json b/Gems/Atom/RHI/Null/gem.json index 0870efaae7..e9f22c5fcb 100644 --- a/Gems/Atom/RHI/Null/gem.json +++ b/Gems/Atom/RHI/Null/gem.json @@ -2,6 +2,7 @@ "gem_name": "Atom_RHI_Null", "display_name": "Atom RHI Null", "license": "Apache-2.0 Or MIT", + "license_url": "https://github.com/o3de/o3de/blob/development/LICENSE.txt", "origin": "Open 3D Engine - o3de.org", "type": "Code", "summary": "", diff --git a/Gems/Atom/RHI/Vulkan/Code/Include/Atom/RHI.Reflect/Vulkan/PlatformLimitsDescriptor.h b/Gems/Atom/RHI/Vulkan/Code/Include/Atom/RHI.Reflect/Vulkan/PlatformLimitsDescriptor.h index 5e41da9627..eaa4356796 100644 --- a/Gems/Atom/RHI/Vulkan/Code/Include/Atom/RHI.Reflect/Vulkan/PlatformLimitsDescriptor.h +++ b/Gems/Atom/RHI/Vulkan/Code/Include/Atom/RHI.Reflect/Vulkan/PlatformLimitsDescriptor.h @@ -33,7 +33,7 @@ namespace AZ uint32_t m_swapChainsPerCommandList = 8; // The maximum cost that can be associated with a single command list. - uint32_t m_commandListCostThresholdMin = 1000; + uint32_t m_commandListCostThresholdMin = 250; // The maximum number of command lists per scope. uint32_t m_commandListsPerScopeMax = 16; diff --git a/Gems/Atom/RHI/Vulkan/Code/Source/RHI/AliasedHeap.cpp b/Gems/Atom/RHI/Vulkan/Code/Source/RHI/AliasedHeap.cpp index c0166e95b5..8b4d179574 100644 --- a/Gems/Atom/RHI/Vulkan/Code/Source/RHI/AliasedHeap.cpp +++ b/Gems/Atom/RHI/Vulkan/Code/Source/RHI/AliasedHeap.cpp @@ -16,8 +16,6 @@ #include #include #include -#include - namespace AZ { namespace Vulkan diff --git a/Gems/Atom/RHI/Vulkan/Code/Source/RHI/BufferMemoryPageAllocator.cpp b/Gems/Atom/RHI/Vulkan/Code/Source/RHI/BufferMemoryPageAllocator.cpp index a1025e5501..00b1d4211c 100644 --- a/Gems/Atom/RHI/Vulkan/Code/Source/RHI/BufferMemoryPageAllocator.cpp +++ b/Gems/Atom/RHI/Vulkan/Code/Source/RHI/BufferMemoryPageAllocator.cpp @@ -8,8 +8,6 @@ #include #include #include -#include - namespace AZ { namespace Vulkan @@ -50,7 +48,7 @@ namespace AZ return nullptr; } - AZ_TRACE_METHOD_NAME("Create BufferMemory Page"); + AZ_PROFILE_SCOPE(RHI, "Create BufferMemory Page"); RHI::Ptr bufferMemory; diff --git a/Gems/Atom/RHI/Vulkan/Code/Source/RHI/CommandList.cpp b/Gems/Atom/RHI/Vulkan/Code/Source/RHI/CommandList.cpp index ffa02ac3c4..c74b9d4d13 100644 --- a/Gems/Atom/RHI/Vulkan/Code/Source/RHI/CommandList.cpp +++ b/Gems/Atom/RHI/Vulkan/Code/Source/RHI/CommandList.cpp @@ -6,6 +6,7 @@ * */ #include +#include #include #include #include @@ -688,8 +689,8 @@ namespace AZ if (interval != InvalidInterval) { uint32_t numBuffers = interval.m_max - interval.m_min + 1; - AZStd::vector nativeBuffers(numBuffers, VK_NULL_HANDLE); - AZStd::vector offsets(numBuffers, 0); + AZStd::fixed_vector nativeBuffers(numBuffers, VK_NULL_HANDLE); + AZStd::fixed_vector offsets(numBuffers, 0); for (uint32_t i = 0; i < numBuffers; ++i) { const RHI::StreamBufferView& bufferView = streams[i + interval.m_min]; diff --git a/Gems/Atom/RHI/Vulkan/Code/Source/RHI/CommandQueueContext.cpp b/Gems/Atom/RHI/Vulkan/Code/Source/RHI/CommandQueueContext.cpp index 9cf6dce77b..c556e85979 100644 --- a/Gems/Atom/RHI/Vulkan/Code/Source/RHI/CommandQueueContext.cpp +++ b/Gems/Atom/RHI/Vulkan/Code/Source/RHI/CommandQueueContext.cpp @@ -7,7 +7,6 @@ */ #include #include -#include #include #include #include diff --git a/Gems/Atom/RHI/Vulkan/Code/Source/RHI/Conversion.cpp b/Gems/Atom/RHI/Vulkan/Code/Source/RHI/Conversion.cpp index 3294b77eaa..756ed5f768 100644 --- a/Gems/Atom/RHI/Vulkan/Code/Source/RHI/Conversion.cpp +++ b/Gems/Atom/RHI/Vulkan/Code/Source/RHI/Conversion.cpp @@ -736,7 +736,7 @@ namespace AZ if (RHI::CheckBitsAny(bindFlags, BindFlags::RayTracingAccelerationStructure)) { - usageFlags |= VK_BUFFER_USAGE_ACCELERATION_STRUCTURE_STORAGE_BIT_KHR; + usageFlags |= VK_BUFFER_USAGE_ACCELERATION_STRUCTURE_STORAGE_BIT_KHR | VK_BUFFER_USAGE_ACCELERATION_STRUCTURE_BUILD_INPUT_READ_ONLY_BIT_KHR; } if (RHI::CheckBitsAny(bindFlags, BindFlags::RayTracingShaderTable)) @@ -756,7 +756,7 @@ namespace AZ { return RHI::CheckBitsAny( bindFlags, - RHI::BufferBindFlags::InputAssembly | RHI::BufferBindFlags::DynamicInputAssembly | RHI::BufferBindFlags::RayTracingShaderTable); + RHI::BufferBindFlags::InputAssembly | RHI::BufferBindFlags::DynamicInputAssembly | RHI::BufferBindFlags::RayTracingShaderTable | RHI::BufferBindFlags::RayTracingAccelerationStructure | RHI::BufferBindFlags::RayTracingScratchBuffer); } VkPipelineStageFlags GetSupportedPipelineStages(RHI::PipelineStateType type) @@ -1154,15 +1154,20 @@ namespace AZ return RHI::CheckBitsAny(usagesAndAccesses.front().m_access, RHI::ScopeAttachmentAccess::Write) ? VK_IMAGE_LAYOUT_DEPTH_STENCIL_ATTACHMENT_OPTIMAL : VK_IMAGE_LAYOUT_DEPTH_STENCIL_READ_ONLY_OPTIMAL; case RHI::ScopeAttachmentUsage::Shader: case RHI::ScopeAttachmentUsage::SubpassInput: - // If we are reading from a depth/stencil texture, then we use the depth/stencil read optimal layout instead of the generic shader read one. - if (RHI::CheckBitsAny(imageAspects, RHI::ImageAspectFlags::DepthStencil)) { - return RHI::CheckBitsAny(usagesAndAccesses.front().m_access, RHI::ScopeAttachmentAccess::Write) ? VK_IMAGE_LAYOUT_GENERAL : VK_IMAGE_LAYOUT_DEPTH_STENCIL_READ_ONLY_OPTIMAL; + // always set VK_IMAGE_LAYOUT_GENERAL if the Image is ShaderWrite, even in a read scope + if (RHI::CheckBitsAny(usagesAndAccesses.front().m_access, RHI::ScopeAttachmentAccess::Write) || + RHI::CheckBitsAny(imageView->GetImage().GetDescriptor().m_bindFlags, RHI::ImageBindFlags::ShaderWrite)) + { + return VK_IMAGE_LAYOUT_GENERAL; + } + else + { + // if we are reading from a depth/stencil texture, then we use the depth/stencil read optimal layout instead of the generic shader read one + return RHI::CheckBitsAny(imageAspects, RHI::ImageAspectFlags::DepthStencil) ? + VK_IMAGE_LAYOUT_DEPTH_STENCIL_READ_ONLY_OPTIMAL : VK_IMAGE_LAYOUT_SHADER_READ_ONLY_OPTIMAL; + } } - else - { - return RHI::CheckBitsAny(usagesAndAccesses.front().m_access, RHI::ScopeAttachmentAccess::Write) ? VK_IMAGE_LAYOUT_GENERAL : VK_IMAGE_LAYOUT_SHADER_READ_ONLY_OPTIMAL; - } case RHI::ScopeAttachmentUsage::Copy: return RHI::CheckBitsAny(usagesAndAccesses.front().m_access, RHI::ScopeAttachmentAccess::Write) ? VK_IMAGE_LAYOUT_TRANSFER_DST_OPTIMAL : VK_IMAGE_LAYOUT_TRANSFER_SRC_OPTIMAL; default: diff --git a/Gems/Atom/RHI/Vulkan/Code/Source/RHI/DescriptorSet.cpp b/Gems/Atom/RHI/Vulkan/Code/Source/RHI/DescriptorSet.cpp index d70d4a01b5..815eba086c 100644 --- a/Gems/Atom/RHI/Vulkan/Code/Source/RHI/DescriptorSet.cpp +++ b/Gems/Atom/RHI/Vulkan/Code/Source/RHI/DescriptorSet.cpp @@ -149,16 +149,17 @@ namespace AZ { imageInfo.imageView = imageView->GetNativeImageView(); - // Depending on the access (read or readwrite) and if it's a depth/stencil image, we choose the expected layout. - switch (layout.GetDescriptorType(layoutIndex)) + // always set VK_IMAGE_LAYOUT_GENERAL if the Image is ShaderWrite, even if the descriptor layout wants a read-only input + if (layout.GetDescriptorType(layoutIndex) == VK_DESCRIPTOR_TYPE_STORAGE_IMAGE || + RHI::CheckBitsAny(imageView->GetImage().GetDescriptor().m_bindFlags, RHI::ImageBindFlags::ShaderWrite)) { - case VK_DESCRIPTOR_TYPE_STORAGE_IMAGE: imageInfo.imageLayout = VK_IMAGE_LAYOUT_GENERAL; - break; - default: + } + else + { + // if we are reading from a depth/stencil texture, then we use the depth/stencil read optimal layout instead of the generic shader read one imageInfo.imageLayout = RHI::CheckBitsAny(imageView->GetImage().GetAspectFlags(), RHI::ImageAspectFlags::DepthStencil) ? VK_IMAGE_LAYOUT_DEPTH_STENCIL_READ_ONLY_OPTIMAL : VK_IMAGE_LAYOUT_SHADER_READ_ONLY_OPTIMAL; - break; } } diff --git a/Gems/Atom/RHI/Vulkan/Code/Source/RHI/DescriptorSetLayout.h b/Gems/Atom/RHI/Vulkan/Code/Source/RHI/DescriptorSetLayout.h index 50132d62ec..2d40d21ed5 100644 --- a/Gems/Atom/RHI/Vulkan/Code/Source/RHI/DescriptorSetLayout.h +++ b/Gems/Atom/RHI/Vulkan/Code/Source/RHI/DescriptorSetLayout.h @@ -76,7 +76,7 @@ namespace AZ const AZStd::vector& GetNativeBindingFlags() const; const RHI::ShaderResourceGroupLayout* GetShaderResourceGroupLayout() const; - static const uint32_t MaxUnboundedArrayDescriptors = (1024 * 1024 * 2); // 2M + static const uint32_t MaxUnboundedArrayDescriptors = 900000; //Using this number as it needs to be less than maxDescriptorSetSampledImages limit of 1048576 bool GetHasUnboundedArray() const { return m_hasUnboundedArray; } private: diff --git a/Gems/Atom/RHI/Vulkan/Code/Source/RHI/Device.cpp b/Gems/Atom/RHI/Vulkan/Code/Source/RHI/Device.cpp index 14b6c01498..a20e7d4361 100644 --- a/Gems/Atom/RHI/Vulkan/Code/Source/RHI/Device.cpp +++ b/Gems/Atom/RHI/Vulkan/Code/Source/RHI/Device.cpp @@ -216,11 +216,24 @@ namespace AZ float16Int8.pNext = &separateDepthStencil; robustness2.pNext = &float16Int8; - - deviceInfo.pNext = &descriptorIndexingFeatures; } + // set raytracing features if we are running Vulkan >= 1.2 + VkPhysicalDeviceAccelerationStructureFeaturesKHR accelerationStructureFeatures = {}; + VkPhysicalDeviceRayTracingPipelineFeaturesKHR rayTracingPipelineFeatures = {}; + + if (majorVersion >= 1 && minorVersion >= 2) + { + accelerationStructureFeatures.sType = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_ACCELERATION_STRUCTURE_FEATURES_KHR; + accelerationStructureFeatures.accelerationStructure = physicalDevice.GetPhysicalDeviceAccelerationStructureFeatures().accelerationStructure; + vulkan12Features.pNext = &accelerationStructureFeatures; + + rayTracingPipelineFeatures.sType = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_RAY_TRACING_PIPELINE_FEATURES_KHR; + rayTracingPipelineFeatures.rayTracingPipeline = physicalDevice.GetPhysicalDeviceRayTracingPipelineFeatures().rayTracingPipeline; + accelerationStructureFeatures.pNext = &rayTracingPipelineFeatures; + } + deviceInfo.flags = 0; deviceInfo.queueCreateInfoCount = static_cast(queueCreationInfo.size()); deviceInfo.pQueueCreateInfos = queueCreationInfo.data(); diff --git a/Gems/Atom/RHI/Vulkan/Code/Source/RHI/FrameGraphCompiler.cpp b/Gems/Atom/RHI/Vulkan/Code/Source/RHI/FrameGraphCompiler.cpp index e153ad6645..9a27d2898d 100644 --- a/Gems/Atom/RHI/Vulkan/Code/Source/RHI/FrameGraphCompiler.cpp +++ b/Gems/Atom/RHI/Vulkan/Code/Source/RHI/FrameGraphCompiler.cpp @@ -13,7 +13,6 @@ #include #include #include -#include #include #include #include diff --git a/Gems/Atom/RHI/Vulkan/Code/Source/RHI/Image.cpp b/Gems/Atom/RHI/Vulkan/Code/Source/RHI/Image.cpp index 2cb5a64f93..551390cac4 100644 --- a/Gems/Atom/RHI/Vulkan/Code/Source/RHI/Image.cpp +++ b/Gems/Atom/RHI/Vulkan/Code/Source/RHI/Image.cpp @@ -376,7 +376,7 @@ namespace AZ void Image::GetSubresourceLayoutsInternal(const RHI::ImageSubresourceRange& subresourceRange, RHI::ImageSubresourceLayoutPlaced* subresourceLayouts, size_t* totalSizeInBytes) const { const RHI::ImageDescriptor& imageDescriptor = GetDescriptor(); - size_t byteOffset = 0; + uint32_t byteOffset = 0; const uint32_t offsetAligment = 4; for (uint16_t arraySlice = subresourceRange.m_arraySliceMin; arraySlice <= subresourceRange.m_mipSliceMax; ++arraySlice) { @@ -398,7 +398,7 @@ namespace AZ layout.m_size = subresourceLayout.m_size; } - byteOffset = RHI::AlignUp(byteOffset + static_cast(subresourceLayout.m_bytesPerImage) * subresourceLayout.m_size.m_depth, offsetAligment); + byteOffset = RHI::AlignUp(byteOffset + subresourceLayout.m_bytesPerImage * subresourceLayout.m_size.m_depth, offsetAligment); } } diff --git a/Gems/Atom/RHI/Vulkan/Code/Source/RHI/MemoryPageAllocator.cpp b/Gems/Atom/RHI/Vulkan/Code/Source/RHI/MemoryPageAllocator.cpp index 7535b19106..c7c372ad0a 100644 --- a/Gems/Atom/RHI/Vulkan/Code/Source/RHI/MemoryPageAllocator.cpp +++ b/Gems/Atom/RHI/Vulkan/Code/Source/RHI/MemoryPageAllocator.cpp @@ -8,8 +8,6 @@ #include #include #include -#include - namespace AZ { namespace Vulkan @@ -35,7 +33,7 @@ namespace AZ return nullptr; } - AZ_TRACE_METHOD_NAME("Create Memory Page"); + AZ_PROFILE_SCOPE(RHI, "Create Memory Page"); const VkMemoryPropertyFlags flags = ConvertHeapMemoryLevel(m_descriptor.m_heapMemoryLevel) | m_descriptor.m_additionalMemoryPropertyFlags; RHI::Ptr memory = GetDevice().AllocateMemory(sizeInBytes, m_descriptor.m_memoryTypeBits, flags); diff --git a/Gems/Atom/RHI/Vulkan/Code/Source/RHI/MemoryTypeAllocator.h b/Gems/Atom/RHI/Vulkan/Code/Source/RHI/MemoryTypeAllocator.h index 8fd083d4b9..5504e6e791 100644 --- a/Gems/Atom/RHI/Vulkan/Code/Source/RHI/MemoryTypeAllocator.h +++ b/Gems/Atom/RHI/Vulkan/Code/Source/RHI/MemoryTypeAllocator.h @@ -10,8 +10,6 @@ #include #include #include -#include - namespace AZ { namespace Vulkan @@ -108,8 +106,7 @@ namespace AZ template View MemoryTypeAllocator::Allocate(size_t sizeInBytes, size_t alignmentInBytes, bool forceUnique /*=false*/) { - AZ_TRACE_METHOD(); - + AZ_PROFILE_FUNCTION(RHI); View memoryView; @@ -155,7 +152,7 @@ namespace AZ template View MemoryTypeAllocator::AllocateUnique(const uint64_t sizeInBytes) { - AZ_TRACE_METHOD(); + AZ_PROFILE_FUNCTION(RHI); auto memory = const_cast(m_pageAllocator.GetFactory()).CreateObject(sizeInBytes); if (!memory) { diff --git a/Gems/Atom/RHI/Vulkan/Code/Source/RHI/PhysicalDevice.cpp b/Gems/Atom/RHI/Vulkan/Code/Source/RHI/PhysicalDevice.cpp index cdb9bbc7bd..ee000d8259 100644 --- a/Gems/Atom/RHI/Vulkan/Code/Source/RHI/PhysicalDevice.cpp +++ b/Gems/Atom/RHI/Vulkan/Code/Source/RHI/PhysicalDevice.cpp @@ -111,11 +111,21 @@ namespace AZ return m_accelerationStructureProperties; } + const VkPhysicalDeviceAccelerationStructureFeaturesKHR& PhysicalDevice::GetPhysicalDeviceAccelerationStructureFeatures() const + { + return m_accelerationStructureFeatures; + } + const VkPhysicalDeviceRayTracingPipelinePropertiesKHR& PhysicalDevice::GetPhysicalDeviceRayTracingPipelineProperties() const { return m_rayTracingPipelineProperties; } + const VkPhysicalDeviceRayTracingPipelineFeaturesKHR& PhysicalDevice::GetPhysicalDeviceRayTracingPipelineFeatures() const + { + return m_rayTracingPipelineFeatures; + } + const VkPhysicalDeviceShaderFloat16Int8FeaturesKHR& PhysicalDevice::GetPhysicalDeviceFloat16Int8Features() const { return m_float16Int8Features; @@ -349,6 +359,16 @@ namespace AZ vulkan12Features.sType = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_VULKAN_1_2_FEATURES; separateDepthStencilFeatures.pNext = &vulkan12Features; + VkPhysicalDeviceAccelerationStructureFeaturesKHR& accelerationStructureFeatures = m_accelerationStructureFeatures; + accelerationStructureFeatures = {}; + accelerationStructureFeatures.sType = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_ACCELERATION_STRUCTURE_FEATURES_KHR; + vulkan12Features.pNext = &accelerationStructureFeatures; + + VkPhysicalDeviceRayTracingPipelineFeaturesKHR& rayTracingPipelineFeatures = m_rayTracingPipelineFeatures; + rayTracingPipelineFeatures = {}; + rayTracingPipelineFeatures.sType = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_RAY_TRACING_PIPELINE_FEATURES_KHR; + accelerationStructureFeatures.pNext = &rayTracingPipelineFeatures; + VkPhysicalDeviceFeatures2 deviceFeatures2 = {}; deviceFeatures2.sType = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_FEATURES_2; deviceFeatures2.pNext = &descriptorIndexingFeatures; diff --git a/Gems/Atom/RHI/Vulkan/Code/Source/RHI/PhysicalDevice.h b/Gems/Atom/RHI/Vulkan/Code/Source/RHI/PhysicalDevice.h index 320d32b6e3..8f502f703a 100644 --- a/Gems/Atom/RHI/Vulkan/Code/Source/RHI/PhysicalDevice.h +++ b/Gems/Atom/RHI/Vulkan/Code/Source/RHI/PhysicalDevice.h @@ -82,7 +82,9 @@ namespace AZ const VkPhysicalDeviceVulkan12Features& GetPhysicalDeviceVulkan12Features() const; const VkPhysicalDeviceSeparateDepthStencilLayoutsFeaturesKHR& GetPhysicalDeviceSeparateDepthStencilFeatures() const; const VkPhysicalDeviceAccelerationStructurePropertiesKHR& GetPhysicalDeviceAccelerationStructureProperties() const; + const VkPhysicalDeviceAccelerationStructureFeaturesKHR& GetPhysicalDeviceAccelerationStructureFeatures() const; const VkPhysicalDeviceRayTracingPipelinePropertiesKHR& GetPhysicalDeviceRayTracingPipelineProperties() const; + const VkPhysicalDeviceRayTracingPipelineFeaturesKHR& GetPhysicalDeviceRayTracingPipelineFeatures() const; VkFormatProperties GetFormatProperties(RHI::Format format, bool raiseAsserts = true) const; StringList GetDeviceLayerNames() const; StringList GetDeviceExtensionNames(const char* layerName = nullptr) const; @@ -116,7 +118,9 @@ namespace AZ VkPhysicalDeviceBufferDeviceAddressFeaturesEXT m_bufferDeviceAddressFeatures{}; VkPhysicalDeviceSeparateDepthStencilLayoutsFeaturesKHR m_separateDepthStencilFeatures{}; VkPhysicalDeviceAccelerationStructurePropertiesKHR m_accelerationStructureProperties{}; + VkPhysicalDeviceAccelerationStructureFeaturesKHR m_accelerationStructureFeatures{}; VkPhysicalDeviceRayTracingPipelinePropertiesKHR m_rayTracingPipelineProperties{}; + VkPhysicalDeviceRayTracingPipelineFeaturesKHR m_rayTracingPipelineFeatures{}; VkPhysicalDeviceVulkan12Features m_vulkan12Features{}; }; } diff --git a/Gems/Atom/RHI/Vulkan/Code/Source/RHI/RayTracingBlas.cpp b/Gems/Atom/RHI/Vulkan/Code/Source/RHI/RayTracingBlas.cpp index 55e804aac9..a322380fb1 100644 --- a/Gems/Atom/RHI/Vulkan/Code/Source/RHI/RayTracingBlas.cpp +++ b/Gems/Atom/RHI/Vulkan/Code/Source/RHI/RayTracingBlas.cpp @@ -6,7 +6,6 @@ * */ -#include #include #include #include @@ -115,7 +114,7 @@ namespace AZ // create scratch buffer buffers.m_scratchBuffer = RHI::Factory::Get().CreateBuffer(); AZ::RHI::BufferDescriptor scratchBufferDescriptor; - scratchBufferDescriptor.m_bindFlags = RHI::BufferBindFlags::ShaderReadWrite; + scratchBufferDescriptor.m_bindFlags = RHI::BufferBindFlags::ShaderReadWrite | RHI::BufferBindFlags::RayTracingScratchBuffer; scratchBufferDescriptor.m_byteCount = buildSizesInfo.buildScratchSize; AZ::RHI::BufferInitRequest scratchBufferRequest; diff --git a/Gems/Atom/RHI/Vulkan/Code/Source/RHI/RayTracingPipelineState.cpp b/Gems/Atom/RHI/Vulkan/Code/Source/RHI/RayTracingPipelineState.cpp index 33623f93e4..65281d923f 100644 --- a/Gems/Atom/RHI/Vulkan/Code/Source/RHI/RayTracingPipelineState.cpp +++ b/Gems/Atom/RHI/Vulkan/Code/Source/RHI/RayTracingPipelineState.cpp @@ -10,8 +10,6 @@ #include #include #include -#include - namespace AZ { namespace Vulkan diff --git a/Gems/Atom/RHI/Vulkan/Code/Source/RHI/RayTracingShaderTable.cpp b/Gems/Atom/RHI/Vulkan/Code/Source/RHI/RayTracingShaderTable.cpp index 0c5cda7008..d5ef121875 100644 --- a/Gems/Atom/RHI/Vulkan/Code/Source/RHI/RayTracingShaderTable.cpp +++ b/Gems/Atom/RHI/Vulkan/Code/Source/RHI/RayTracingShaderTable.cpp @@ -12,7 +12,6 @@ #include #include #include -#include #include #include #include diff --git a/Gems/Atom/RHI/Vulkan/Code/Source/RHI/RayTracingTlas.cpp b/Gems/Atom/RHI/Vulkan/Code/Source/RHI/RayTracingTlas.cpp index e36afd0b7a..9ea9ceccce 100644 --- a/Gems/Atom/RHI/Vulkan/Code/Source/RHI/RayTracingTlas.cpp +++ b/Gems/Atom/RHI/Vulkan/Code/Source/RHI/RayTracingTlas.cpp @@ -6,7 +6,6 @@ * */ -#include #include #include #include @@ -155,7 +154,7 @@ namespace AZ // create scratch buffer buffers.m_scratchBuffer = RHI::Factory::Get().CreateBuffer(); AZ::RHI::BufferDescriptor scratchBufferDescriptor; - scratchBufferDescriptor.m_bindFlags = RHI::BufferBindFlags::ShaderReadWrite; + scratchBufferDescriptor.m_bindFlags = RHI::BufferBindFlags::ShaderReadWrite | RHI::BufferBindFlags::RayTracingScratchBuffer; scratchBufferDescriptor.m_byteCount = buildSizesInfo.buildScratchSize; AZ::RHI::BufferInitRequest scratchBufferRequest; diff --git a/Gems/Atom/RHI/Vulkan/Code/Source/RHI/ShaderResourceGroupPool.cpp b/Gems/Atom/RHI/Vulkan/Code/Source/RHI/ShaderResourceGroupPool.cpp index b2772d716e..691aeaef7c 100644 --- a/Gems/Atom/RHI/Vulkan/Code/Source/RHI/ShaderResourceGroupPool.cpp +++ b/Gems/Atom/RHI/Vulkan/Code/Source/RHI/ShaderResourceGroupPool.cpp @@ -54,8 +54,8 @@ namespace AZ } m_descriptorSetAllocator = RHI::Ptr(aznew DescriptorSetAllocator); - // [GFX_TODO] ATOM-679 Set a proper pool size. - const uint32_t descriptorSetsPerPool = 100; + // [GFX_TODO] ATOM-16891 - Refactor Descriptor management system + const uint32_t descriptorSetsPerPool = 20; DescriptorSetAllocator::Descriptor allocatorDescriptor; allocatorDescriptor.m_device = &device; allocatorDescriptor.m_layout = m_descriptorSetLayout.get(); @@ -104,13 +104,13 @@ namespace AZ RHI::ResultCode ShaderResourceGroupPool::CompileGroupInternal(RHI::ShaderResourceGroup& groupBase, const RHI::ShaderResourceGroupData& groupData) { auto& group = static_cast(groupBase); - group.UpdateCompiledDataIndex(m_currentIteration); if (!groupData.IsAnyResourceTypeUpdated()) { return RHI::ResultCode::Success; } + group.UpdateCompiledDataIndex(m_currentIteration); DescriptorSet& descriptorSet = *group.m_compiledData[group.GetCompileDataIndex()]; const RHI::ShaderResourceGroupLayout* layout = groupData.GetLayout(); diff --git a/Gems/Atom/RHI/Vulkan/Code/Source/RHI/SwapChain.cpp b/Gems/Atom/RHI/Vulkan/Code/Source/RHI/SwapChain.cpp index bef2b154e1..67f4834524 100644 --- a/Gems/Atom/RHI/Vulkan/Code/Source/RHI/SwapChain.cpp +++ b/Gems/Atom/RHI/Vulkan/Code/Source/RHI/SwapChain.cpp @@ -59,14 +59,26 @@ namespace AZ m_swapChainBarrier.m_isValid = true; } + void SwapChain::ProcessRecreation() + { + if (m_pendingRecreation) + { + ShutdownImages(); + InvalidateNativeSwapChain(); + CreateSwapchain(); + InitImages(); + + m_pendingRecreation = false; + } + } + void SwapChain::SetVerticalSyncIntervalInternal(uint32_t previousVsyncInterval) { if (GetDescriptor().m_verticalSyncInterval == 0 || previousVsyncInterval == 0) { // The presentation mode may change when transitioning to or from a vsynced presentation mode // In this case, the swapchain must be recreated. - InvalidateNativeSwapChain(); - CreateSwapchain(); + m_pendingRecreation = true; } } @@ -231,8 +243,7 @@ namespace AZ // VK_SUBOPTIMAL_KHR is treated as success, but we better update the surface info as well. if (result == VK_ERROR_OUT_OF_DATE_KHR || result == VK_SUBOPTIMAL_KHR) { - InvalidateNativeSwapChain(); - CreateSwapchain(); + m_pendingRecreation = true; } else { @@ -246,18 +257,16 @@ namespace AZ } }; - m_presentationQueue->QueueCommand(AZStd::move(presentCommand)); - uint32_t acquiredImageIndex = GetCurrentImageIndex(); RHI::ResultCode result = AcquireNewImage(&acquiredImageIndex); if (result == RHI::ResultCode::Fail) { - InvalidateNativeSwapChain(); - CreateSwapchain(); + m_pendingRecreation = true; return 0; } else { + m_presentationQueue->QueueCommand(AZStd::move(presentCommand)); return acquiredImageIndex; } } @@ -474,12 +483,18 @@ namespace AZ void SwapChain::InvalidateNativeSwapChain() { auto& device = static_cast(GetDevice()); - vkDeviceWaitIdle(device.GetNativeDevice()); - if (m_nativeSwapChain != VK_NULL_HANDLE) + auto presentCommand = [this, &device]([[maybe_unused]] void* queue) { - vkDestroySwapchainKHR(device.GetNativeDevice(), m_nativeSwapChain, nullptr); - m_nativeSwapChain = VK_NULL_HANDLE; - } + vkDeviceWaitIdle(device.GetNativeDevice()); + if (m_nativeSwapChain != VK_NULL_HANDLE) + { + vkDestroySwapchainKHR(device.GetNativeDevice(), m_nativeSwapChain, nullptr); + m_nativeSwapChain = VK_NULL_HANDLE; + } + }; + + m_presentationQueue->QueueCommand(AZStd::move(presentCommand)); + m_presentationQueue->FlushCommands(); } RHI::ResultCode SwapChain::CreateSwapchain() @@ -487,7 +502,7 @@ namespace AZ auto& device = static_cast(GetDevice()); m_surfaceCapabilities = GetSurfaceCapabilities(); - m_surfaceFormat = GetSupportedSurfaceFormat(GetDescriptor().m_dimensions.m_imageFormat); + m_surfaceFormat = GetSupportedSurfaceFormat(m_dimensions.m_imageFormat); m_presentMode = GetSupportedPresentMode(GetDescriptor().m_verticalSyncInterval); m_compositeAlphaFlagBits = GetSupportedCompositeAlpha(); diff --git a/Gems/Atom/RHI/Vulkan/Code/Source/RHI/SwapChain.h b/Gems/Atom/RHI/Vulkan/Code/Source/RHI/SwapChain.h index ee2ff3c207..68abc97b2d 100644 --- a/Gems/Atom/RHI/Vulkan/Code/Source/RHI/SwapChain.h +++ b/Gems/Atom/RHI/Vulkan/Code/Source/RHI/SwapChain.h @@ -51,6 +51,7 @@ namespace AZ void QueueBarrier(const VkPipelineStageFlags src, const VkPipelineStageFlags dst, const VkImageMemoryBarrier& imageBarrier); + void ProcessRecreation() override; private: SwapChain() = default; diff --git a/Gems/Atom/RHI/Vulkan/External/glad/2.0.0-beta/include/glad/vulkan.h b/Gems/Atom/RHI/Vulkan/External/glad/2.0.0-beta/include/glad/vulkan.h index 33d4b64082..47c37e1ff7 100644 --- a/Gems/Atom/RHI/Vulkan/External/glad/2.0.0-beta/include/glad/vulkan.h +++ b/Gems/Atom/RHI/Vulkan/External/glad/2.0.0-beta/include/glad/vulkan.h @@ -8028,19 +8028,25 @@ typedef struct VkBindAccelerationStructureMemoryInfoKHR { typedef struct VkBindAccelerationStructureMemoryInfoKHR VkBindAccelerationStructureMemoryInfoNV; -typedef struct VkPhysicalDeviceRayTracingFeaturesKHR { +typedef struct VkPhysicalDeviceRayTracingPipelineFeaturesKHR { VkStructureType sType; - void * pNext; - VkBool32 rayTracing; - VkBool32 rayTracingShaderGroupHandleCaptureReplay; - VkBool32 rayTracingShaderGroupHandleCaptureReplayMixed; - VkBool32 rayTracingAccelerationStructureCaptureReplay; - VkBool32 rayTracingIndirectTraceRays; - VkBool32 rayTracingIndirectAccelerationStructureBuild; - VkBool32 rayTracingHostAccelerationStructureCommands; - VkBool32 rayQuery; - VkBool32 rayTracingPrimitiveCulling; -} VkPhysicalDeviceRayTracingFeaturesKHR; + void* pNext; + VkBool32 rayTracingPipeline; + VkBool32 rayTracingPipelineShaderGroupHandleCaptureReplay; + VkBool32 rayTracingPipelineShaderGroupHandleCaptureReplayMixed; + VkBool32 rayTracingPipelineTraceRaysIndirect; + VkBool32 rayTraversalPrimitiveCulling; +} VkPhysicalDeviceRayTracingPipelineFeaturesKHR; + +typedef struct VkPhysicalDeviceAccelerationStructureFeaturesKHR { + VkStructureType sType; + void* pNext; + VkBool32 accelerationStructure; + VkBool32 accelerationStructureCaptureReplay; + VkBool32 accelerationStructureIndirectBuild; + VkBool32 accelerationStructureHostCommands; + VkBool32 descriptorBindingAccelerationStructureUpdateAfterBind; +} VkPhysicalDeviceAccelerationStructureFeaturesKHR; typedef struct VkStridedBufferRegionKHR { VkBuffer buffer; diff --git a/Gems/Atom/RHI/Vulkan/gem.json b/Gems/Atom/RHI/Vulkan/gem.json index 81e8dd22ea..1dfeb9eafa 100644 --- a/Gems/Atom/RHI/Vulkan/gem.json +++ b/Gems/Atom/RHI/Vulkan/gem.json @@ -2,6 +2,7 @@ "gem_name": "Atom_RHI_Vulkan", "display_name": "Atom RHI Vulkan", "license": "Apache-2.0 Or MIT", + "license_url": "https://github.com/o3de/o3de/blob/development/LICENSE.txt", "origin": "Open 3D Engine - o3de.org", "type": "Code", "summary": "", diff --git a/Gems/Atom/RHI/gem.json b/Gems/Atom/RHI/gem.json index 5f916e5224..de46c312ad 100644 --- a/Gems/Atom/RHI/gem.json +++ b/Gems/Atom/RHI/gem.json @@ -2,6 +2,7 @@ "gem_name": "Atom_RHI", "display_name": "Atom RHI", "license": "Apache-2.0 Or MIT", + "license_url": "https://github.com/o3de/o3de/blob/development/LICENSE.txt", "origin": "Open 3D Engine - o3de.org", "type": "Code", "summary": "", @@ -14,6 +15,7 @@ "Atom_RHI_DX12", "Atom_RHI_Metal", "Atom_RHI_Vulkan", + "Atom_RHI_Salem", "Atom_RHI_Null", "Atom_Feature_Common" ] diff --git a/Gems/Atom/RPI/Assets/ShaderLib/Atom/RPI/Math.azsli b/Gems/Atom/RPI/Assets/ShaderLib/Atom/RPI/Math.azsli index 6ffdb6e815..344ccac1fb 100644 --- a/Gems/Atom/RPI/Assets/ShaderLib/Atom/RPI/Math.azsli +++ b/Gems/Atom/RPI/Assets/ShaderLib/Atom/RPI/Math.azsli @@ -177,7 +177,7 @@ float ComputeLerpBetweenInnerOuterAABBs(float3 innerAabbMin, float3 innerAabbMax bool ObbContainsPoint(float4x4 obbTransformInverse, float3 obbHalfExtents, float3 testPoint) { // get the position in Obb local space, force to positive quadrant with abs() - float4 p = abs(mul(obbTransformInverse, float4(testPoint, 1.0f))); + float3 p = abs(mul(obbTransformInverse, float4(testPoint, 1.0f)).xyz); return AabbContainsPoint(-obbHalfExtents, obbHalfExtents, p); } diff --git a/Gems/Atom/RPI/Assets/Textures/Defaults/DefaultFallback.png b/Gems/Atom/RPI/Assets/Textures/Defaults/DefaultFallback.png new file mode 100644 index 0000000000..1352d14edf --- /dev/null +++ b/Gems/Atom/RPI/Assets/Textures/Defaults/DefaultFallback.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:fb91c050a829ff03b972202cf8c90034e4f252d972332224791d135c07d9d528 +size 796 diff --git a/Gems/Atom/RPI/Assets/Textures/Defaults/Missing.png b/Gems/Atom/RPI/Assets/Textures/Defaults/Missing.png new file mode 100644 index 0000000000..198d034892 --- /dev/null +++ b/Gems/Atom/RPI/Assets/Textures/Defaults/Missing.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:7028c8db4f935f23aa4396668278a67691d92fe345cc9d417a9f47bd9a4af32b +size 8130 diff --git a/Gems/Atom/RPI/Assets/Textures/Defaults/Missing.png.assetinfo b/Gems/Atom/RPI/Assets/Textures/Defaults/Missing.png.assetinfo new file mode 100644 index 0000000000..264a7f2a25 --- /dev/null +++ b/Gems/Atom/RPI/Assets/Textures/Defaults/Missing.png.assetinfo @@ -0,0 +1,91 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/Gems/Atom/RPI/Assets/Textures/Defaults/Processing.png b/Gems/Atom/RPI/Assets/Textures/Defaults/Processing.png new file mode 100644 index 0000000000..14c3ec76b0 --- /dev/null +++ b/Gems/Atom/RPI/Assets/Textures/Defaults/Processing.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:a7d94b9c0a77741736b93d8ed4d2b22bc9ae4cf649f3d8b3f10cbaf595a3ed31 +size 8336 diff --git a/Gems/Atom/RPI/Assets/Textures/Defaults/Processing.png.assetinfo b/Gems/Atom/RPI/Assets/Textures/Defaults/Processing.png.assetinfo new file mode 100644 index 0000000000..4a234ef9f3 --- /dev/null +++ b/Gems/Atom/RPI/Assets/Textures/Defaults/Processing.png.assetinfo @@ -0,0 +1,148 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/Gems/Atom/RPI/Assets/Textures/Defaults/ProcessingFailed.png b/Gems/Atom/RPI/Assets/Textures/Defaults/ProcessingFailed.png new file mode 100644 index 0000000000..aafdcc2681 --- /dev/null +++ b/Gems/Atom/RPI/Assets/Textures/Defaults/ProcessingFailed.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:3bbd45e3ef81850da81d1cc01775930a53c424e64e287b00990af3e7e6a682ba +size 9701 diff --git a/Gems/Atom/RPI/Assets/Textures/Defaults/ProcessingFailed.png.assetinfo b/Gems/Atom/RPI/Assets/Textures/Defaults/ProcessingFailed.png.assetinfo new file mode 100644 index 0000000000..747ce3e0e2 --- /dev/null +++ b/Gems/Atom/RPI/Assets/Textures/Defaults/ProcessingFailed.png.assetinfo @@ -0,0 +1,148 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/Gems/Atom/RPI/Assets/seedList.seed b/Gems/Atom/RPI/Assets/seedList.seed new file mode 100644 index 0000000000..622638d698 --- /dev/null +++ b/Gems/Atom/RPI/Assets/seedList.seed @@ -0,0 +1,45 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/Gems/Atom/RPI/Code/CMakeLists.txt b/Gems/Atom/RPI/Code/CMakeLists.txt index 521178be20..f0459a23c2 100644 --- a/Gems/Atom/RPI/Code/CMakeLists.txt +++ b/Gems/Atom/RPI/Code/CMakeLists.txt @@ -160,6 +160,7 @@ if(PAL_TRAIT_BUILD_TESTS_SUPPORTED AND PAL_TRAIT_BUILD_HOST_TOOLS) Gem::Atom_RPI.Public Gem::Atom_RHI.Public Gem::Atom_RPI.Edit + Gem::Atom_Utils.TestUtils.Static ) ly_add_googletest( NAME Gem::Atom_RPI.Tests diff --git a/Gems/Atom/RPI/Code/Include/Atom/RPI.Edit/Common/AssetUtils.h b/Gems/Atom/RPI/Code/Include/Atom/RPI.Edit/Common/AssetUtils.h index bd11965ffa..f758019cfb 100644 --- a/Gems/Atom/RPI/Code/Include/Atom/RPI.Edit/Common/AssetUtils.h +++ b/Gems/Atom/RPI/Code/Include/Atom/RPI.Edit/Common/AssetUtils.h @@ -12,6 +12,7 @@ #include #include +#include namespace AZ { @@ -21,21 +22,24 @@ namespace AZ { // Declarations... - Outcome MakeAssetId(const AZStd::string& sourcePath, uint32_t productSubId); + // Note that these functions default to TraceLevel::Error to preserve legacy behavior of these APIs. It would be nice to make the default match + // RPI.Reflect/Asset/AssetUtils.h which is TraceLevel::Warning, but we are close to a release so it isn't worth the risk at this time. - Outcome MakeAssetId(const AZStd::string& originatingSourcePath, const AZStd::string& referencedSourceFilePath, uint32_t productSubId); + Outcome MakeAssetId(const AZStd::string& sourcePath, uint32_t productSubId, TraceLevel reporting = TraceLevel::Error); + + Outcome MakeAssetId(const AZStd::string& originatingSourcePath, const AZStd::string& referencedSourceFilePath, uint32_t productSubId, TraceLevel reporting = TraceLevel::Error); template - Outcome> LoadAsset(const AZStd::string& sourcePath, uint32_t productSubId = 0); + Outcome> LoadAsset(const AZStd::string& sourcePath, uint32_t productSubId = 0, TraceLevel reporting = TraceLevel::Error); template - Outcome> LoadAsset(const AZStd::string& originatingSourcePath, const AZStd::string& referencedSourceFilePath, uint32_t productSubId = 0); + Outcome> LoadAsset(const AZStd::string& originatingSourcePath, const AZStd::string& referencedSourceFilePath, uint32_t productSubId = 0, TraceLevel reporting = TraceLevel::Error); template - Outcome> LoadAsset(const AZ::Data::AssetId& assetId, const char* sourcePathForDebug); + Outcome> LoadAsset(const AZ::Data::AssetId& assetId, const char* sourcePathForDebug, TraceLevel reporting = TraceLevel::Error); template - Outcome> LoadAsset(const AZ::Data::AssetId& assetId); + Outcome> LoadAsset(const AZ::Data::AssetId& assetId, TraceLevel reporting = TraceLevel::Error); //! Attempts to resolve the full path to a product asset given its ID AZStd::string GetProductPathByAssetId(const AZ::Data::AssetId& assetId); @@ -65,12 +69,12 @@ namespace AZ // Definitions... template - Outcome> LoadAsset(const AZStd::string& sourcePath, uint32_t productSubId) + Outcome> LoadAsset(const AZStd::string& sourcePath, uint32_t productSubId, TraceLevel reporting) { - auto assetId = MakeAssetId(sourcePath, productSubId); + auto assetId = MakeAssetId(sourcePath, productSubId, reporting); if (assetId.IsSuccess()) { - return LoadAsset(assetId.GetValue(), sourcePath.c_str()); + return LoadAsset(assetId.GetValue(), sourcePath.c_str(), reporting); } else { @@ -79,20 +83,20 @@ namespace AZ } template - Outcome> LoadAsset(const AZStd::string& originatingSourcePath, const AZStd::string& referencedSourceFilePath, uint32_t productSubId) + Outcome> LoadAsset(const AZStd::string& originatingSourcePath, const AZStd::string& referencedSourceFilePath, uint32_t productSubId, TraceLevel reporting) { AZStd::string resolvedPath = ResolvePathReference(originatingSourcePath, referencedSourceFilePath); - return LoadAsset(resolvedPath, productSubId); + return LoadAsset(resolvedPath, productSubId, reporting); } template - Outcome> LoadAsset(const AZ::Data::AssetId& assetId) + Outcome> LoadAsset(const AZ::Data::AssetId& assetId, TraceLevel reporting) { - return LoadAsset(assetId, nullptr); + return LoadAsset(assetId, nullptr, reporting); } template - Outcome> LoadAsset(const AZ::Data::AssetId& assetId, [[maybe_unused]] const char* sourcePathForDebug) + Outcome> LoadAsset(const AZ::Data::AssetId& assetId, [[maybe_unused]] const char* sourcePathForDebug, TraceLevel reporting) { if (nullptr == AZ::IO::FileIOBase::GetInstance()->GetAlias("@products@")) { @@ -111,11 +115,11 @@ namespace AZ } else { - AZ_Error("AssetUtils", false, "Could not load %s [Source='%s' Cache='%s' AssetID=%s] ", + AssetUtilsInternal::ReportIssue(reporting, AZStd::string::format("Could not load %s [Source='%s' Cache='%s' AssetID=%s] ", AzTypeInfo::Name(), sourcePathForDebug ? sourcePathForDebug : "", asset.GetHint().empty() ? "" : asset.GetHint().c_str(), - assetId.ToString().c_str()); + assetId.ToString().c_str()).c_str()); return AZ::Failure(); } diff --git a/Gems/Atom/RPI/Code/Include/Atom/RPI.Edit/Common/ColorUtils.h b/Gems/Atom/RPI/Code/Include/Atom/RPI.Edit/Common/ColorUtils.h index 393cae6ca2..38b6a0bb80 100644 --- a/Gems/Atom/RPI/Code/Include/Atom/RPI.Edit/Common/ColorUtils.h +++ b/Gems/Atom/RPI/Code/Include/Atom/RPI.Edit/Common/ColorUtils.h @@ -19,6 +19,8 @@ namespace AZ //[GFX TODO][ATOM-4462] Replace this to use data driven color management system //! Return a ColorEditorConfiguration for editing a Linear sRGB color in sRGB space. AzToolsFramework::ColorEditorConfiguration GetLinearRgbEditorConfig(); + //! Return a ColorEditorConfiguration for editing a sRGB color in sRGB space. + AzToolsFramework::ColorEditorConfiguration GetRgbEditorConfig(); } // namespace PropertyColorConfigs } // namespace RPI diff --git a/Gems/Atom/RPI/Code/Include/Atom/RPI.Edit/Material/MaterialSourceData.h b/Gems/Atom/RPI/Code/Include/Atom/RPI.Edit/Material/MaterialSourceData.h index a67477f061..53d3072370 100644 --- a/Gems/Atom/RPI/Code/Include/Atom/RPI.Edit/Material/MaterialSourceData.h +++ b/Gems/Atom/RPI/Code/Include/Atom/RPI.Edit/Material/MaterialSourceData.h @@ -31,6 +31,7 @@ namespace AZ static constexpr const char UvGroupName[] = "uvSets"; class MaterialAsset; + class MaterialAssetCreator; //! This is a simple data structure for serializing in/out material source files. class MaterialSourceData final @@ -78,15 +79,33 @@ namespace AZ //! Creates a MaterialAsset from the MaterialSourceData content. //! @param assetId ID for the MaterialAsset - //! @param materialSourceFilePath Indicates the path of the .material file that the MaterialSourceData represents. Used for resolving file-relative paths. + //! @param materialSourceFilePath Indicates the path of the .material file that the MaterialSourceData represents. Used for + //! resolving file-relative paths. //! @param elevateWarnings Indicates whether to treat warnings as errors //! @param includeMaterialPropertyNames Indicates whether to save material property names into the material asset file Outcome> CreateMaterialAsset( Data::AssetId assetId, AZStd::string_view materialSourceFilePath = "", bool elevateWarnings = true, - bool includeMaterialPropertyNames = true - ) const; + bool includeMaterialPropertyNames = true) const; + + //! Creates a MaterialAsset from the MaterialSourceData content. + //! @param assetId ID for the MaterialAsset + //! @param materialSourceFilePath Indicates the path of the .material file that the MaterialSourceData represents. Used for + //! resolving file-relative paths. + //! @param elevateWarnings Indicates whether to treat warnings as errors + //! @param includeMaterialPropertyNames Indicates whether to save material property names into the material asset file + //! @param sourceDependencies if not null, will be populated with a set of all of the loaded material and material type paths + Outcome> CreateMaterialAssetFromSourceData( + Data::AssetId assetId, + AZStd::string_view materialSourceFilePath = "", + bool elevateWarnings = true, + bool includeMaterialPropertyNames = true, + AZStd::unordered_set* sourceDependencies = nullptr) const; + + private: + void ApplyPropertiesToAssetCreator( + AZ::RPI::MaterialAssetCreator& materialAssetCreator, const AZStd::string_view& materialSourceFilePath) const; }; } // namespace RPI } // namespace AZ diff --git a/Gems/Atom/RPI/Code/Include/Atom/RPI.Edit/Material/MaterialTypeSourceData.h b/Gems/Atom/RPI/Code/Include/Atom/RPI.Edit/Material/MaterialTypeSourceData.h index 1234b15f95..f5336807c7 100644 --- a/Gems/Atom/RPI/Code/Include/Atom/RPI.Edit/Material/MaterialTypeSourceData.h +++ b/Gems/Atom/RPI/Code/Include/Atom/RPI.Edit/Material/MaterialTypeSourceData.h @@ -209,10 +209,6 @@ namespace AZ //! Traversal will stop once all properties have been enumerated or the callback function returns false void EnumeratePropertiesInDisplayOrder(const EnumeratePropertiesCallback& callback) const; - //! Convert the property value into the format that will be stored in the source data - //! This is primarily needed to support conversions of special types like enums and images - bool ConvertPropertyValueToSourceDataFormat(const PropertyDefinition& propertyDefinition, MaterialPropertyValue& propertyValue) const; - Outcome> CreateMaterialTypeAsset(Data::AssetId assetId, AZStd::string_view materialTypeSourceFilePath = "", bool elevateWarnings = true) const; //! Possibly renames @propertyId based on the material version update steps. diff --git a/Gems/Atom/RPI/Code/Include/Atom/RPI.Edit/Material/MaterialUtils.h b/Gems/Atom/RPI/Code/Include/Atom/RPI.Edit/Material/MaterialUtils.h index d12e848a02..c1183c7aa1 100644 --- a/Gems/Atom/RPI/Code/Include/Atom/RPI.Edit/Material/MaterialUtils.h +++ b/Gems/Atom/RPI/Code/Include/Atom/RPI.Edit/Material/MaterialUtils.h @@ -28,7 +28,18 @@ namespace AZ namespace MaterialUtils { - Outcome> GetImageAssetReference(AZStd::string_view materialSourceFilePath, const AZStd::string imageFilePath); + enum class GetImageAssetResult + { + Empty, //! No image was actually requested, the path was empty + Found, //! The requested asset was found + Missing //! The requested asset was not found, and a placeholder asset was used instead + }; + + //! Finds an ImageAsset referenced by a material file (or a placeholder) + //! @param imageAsset the resulting ImageAsset + //! @param materialSourceFilePath the full path to a material source file that is referenfing an image file + //! @param imageFilePath the path to an image source file, which could be relative to the asset root or relative to the material file + GetImageAssetResult GetImageAssetReference(Data::Asset& imageAsset, AZStd::string_view materialSourceFilePath, const AZStd::string imageFilePath); //! Resolve an enum to a uint32_t given its name and definition array (in MaterialPropertyDescriptor). //! @param propertyDescriptor it contains the definition of all enum names in an array. diff --git a/Gems/Atom/RPI/Code/Include/Atom/RPI.Edit/ResourcePool/ResourcePoolSourceData.h b/Gems/Atom/RPI/Code/Include/Atom/RPI.Edit/ResourcePool/ResourcePoolSourceData.h index 69bc6af8aa..dd2627e09f 100644 --- a/Gems/Atom/RPI/Code/Include/Atom/RPI.Edit/ResourcePool/ResourcePoolSourceData.h +++ b/Gems/Atom/RPI/Code/Include/Atom/RPI.Edit/ResourcePool/ResourcePoolSourceData.h @@ -37,7 +37,7 @@ namespace AZ ResourcePoolAssetType m_poolType = ResourcePoolAssetType::Unknown; AZStd::string m_poolName = "Unknown"; - size_t m_budgetInBytes = 0; + uint32_t m_budgetInBytes = 0; // Configuration for buffer pool RHI::HeapMemoryLevel m_heapMemoryLevel = RHI::HeapMemoryLevel::Device; diff --git a/Gems/Atom/RPI/Code/Include/Atom/RPI.Edit/Shader/ShaderVariantAssetCreator.h b/Gems/Atom/RPI/Code/Include/Atom/RPI.Edit/Shader/ShaderVariantAssetCreator.h index fd069f21e0..488bfb09f8 100644 --- a/Gems/Atom/RPI/Code/Include/Atom/RPI.Edit/Shader/ShaderVariantAssetCreator.h +++ b/Gems/Atom/RPI/Code/Include/Atom/RPI.Edit/Shader/ShaderVariantAssetCreator.h @@ -40,7 +40,7 @@ namespace AZ //! Set the timestamp value when the ProcessJob() started. //! This is needed to synchronize between the ShaderAsset and ShaderVariantAsset when hot-reloading shaders. //! The idea is that this timestamp must be greater or equal than the ShaderAsset. - void SetBuildTimestamp(AZStd::sys_time_t buildTimestamp); + void SetBuildTimestamp(AZ::u64 buildTimestamp); //! Assigns a shaderStageFunction, which contains the byte code, to the slot dictated by the shader stage. void SetShaderFunction(RHI::ShaderStage shaderStage, RHI::Ptr shaderStageFunction); diff --git a/Gems/Atom/RPI/Code/Include/Atom/RPI.Public/AuxGeom/AuxGeomDraw.h b/Gems/Atom/RPI/Code/Include/Atom/RPI.Public/AuxGeom/AuxGeomDraw.h index 474d0d5b9e..29b127407e 100644 --- a/Gems/Atom/RPI/Code/Include/Atom/RPI.Public/AuxGeom/AuxGeomDraw.h +++ b/Gems/Atom/RPI/Code/Include/Atom/RPI.Public/AuxGeom/AuxGeomDraw.h @@ -147,6 +147,30 @@ namespace AZ //! @param viewProjOverrideIndex Which view projection override entry to use, -1 if unused virtual void DrawSphere( const AZ::Vector3& center, float radius, const AZ::Color& color, DrawStyle style = DrawStyle::Shaded, DepthTest depthTest = DepthTest::On, DepthWrite depthWrite = DepthWrite::On, FaceCullMode faceCull = FaceCullMode::Back, int32_t viewProjOverrideIndex = -1) = 0; + //! Draw a sphere. + //! @param center The center of the sphere. + //! @param direction The direction vector. The Pole of the hemisphere will point along this vector. + //! @param radius The radius. + //! @param color The color to draw the sphere. + //! @param style The draw style (point, wireframe, solid, shaded etc). + //! @param depthTest If depth testing should be enabled + //! @param depthWrite If depth writing should be enabled + //! @param faceCull Which (if any) facing triangles should be culled + //! @param viewProjOverrideIndex Which view projection override entry to use, -1 if unused + virtual void DrawSphere(const AZ::Vector3& center, const AZ::Vector3& direction, float radius, const AZ::Color& color, DrawStyle style = DrawStyle::Shaded, DepthTest depthTest = DepthTest::On, DepthWrite depthWrite = DepthWrite::On, FaceCullMode faceCull = FaceCullMode::Back, int32_t viewProjOverrideIndex = -1) = 0; + + //! Draw a hemisphere. + //! @param center The center of the sphere. + //! @param direction The direction vector. The Pole of the hemisphere will point along this vector. + //! @param radius The radius. + //! @param color The color to draw the sphere. + //! @param style The draw style (point, wireframe, solid, shaded etc). + //! @param depthTest If depth testing should be enabled + //! @param depthWrite If depth writing should be enabled + //! @param faceCull Which (if any) facing triangles should be culled + //! @param viewProjOverrideIndex Which view projection override entry to use, -1 if unused + virtual void DrawHemisphere( const AZ::Vector3& center, const AZ::Vector3& direction, float radius, const AZ::Color& color, DrawStyle style = DrawStyle::Shaded, DepthTest depthTest = DepthTest::On, DepthWrite depthWrite = DepthWrite::On, FaceCullMode faceCull = FaceCullMode::Back, int32_t viewProjOverrideIndex = -1) = 0; + //! Draw a disk. //! @param center The center of the disk. //! @param direction The direction vector. The disk will be orthogonal this vector. @@ -172,7 +196,7 @@ namespace AZ //! @param viewProjOverrideIndex Which view projection override entry to use, -1 if unused virtual void DrawCone(const AZ::Vector3& center, const AZ::Vector3& direction, float radius, float height, const AZ::Color& color, DrawStyle style = DrawStyle::Shaded, DepthTest depthTest = DepthTest::On, DepthWrite depthWrite = DepthWrite::On, FaceCullMode faceCull = FaceCullMode::Back, int32_t viewProjOverrideIndex = -1) = 0; - //! Draw a cylinder. + //! Draw a cylinder (with flat disks on the end). //! @param center The center of the base circle. //! @param direction The direction vector. The top end cap of the cylinder will face along this vector. //! @param radius The radius. @@ -185,6 +209,19 @@ namespace AZ //! @param viewProjOverrideIndex Which view projection override entry to use, -1 if unused virtual void DrawCylinder(const AZ::Vector3& center, const AZ::Vector3& direction, float radius, float height, const AZ::Color& color, DrawStyle style = DrawStyle::Shaded, DepthTest depthTest = DepthTest::On, DepthWrite depthWrite = DepthWrite::On, FaceCullMode faceCull = FaceCullMode::Back, int32_t viewProjOverrideIndex = -1) = 0; + //! Draw a cylinder without flat disk on the end. + //! @param center The center of the base circle. + //! @param direction The direction vector. The top end cap of the cylinder will face along this vector. + //! @param radius The radius. + //! @param height The height of the cylinder. + //! @param color The color to draw the cylinder. + //! @param style The draw style (point, wireframe, solid, shaded etc). + //! @param depthTest If depth testing should be enabled + //! @param depthWrite If depth writing should be enabled + //! @param faceCull Which (if any) facing triangles should be culled + //! @param viewProjOverrideIndex Which view projection override entry to use, -1 if unused + virtual void DrawCylinderNoEnds(const AZ::Vector3& center, const AZ::Vector3& direction, float radius, float height, const AZ::Color& color, DrawStyle style = DrawStyle::Shaded, DepthTest depthTest = DepthTest::On, DepthWrite depthWrite = DepthWrite::On, FaceCullMode faceCull = FaceCullMode::Back, int32_t viewProjOverrideIndex = -1) = 0; + //! Draw an axis-aligned bounding box with no transform. //! @param aabb The AABB (typically the bounding box of a set of world space points). //! @param color The color to draw the box. diff --git a/Gems/Atom/RPI/Code/Include/Atom/RPI.Public/Base.h b/Gems/Atom/RPI/Code/Include/Atom/RPI.Public/Base.h index a88c640c19..6f93b0d247 100644 --- a/Gems/Atom/RPI/Code/Include/Atom/RPI.Public/Base.h +++ b/Gems/Atom/RPI/Code/Include/Atom/RPI.Public/Base.h @@ -15,6 +15,7 @@ #include #include #include +#include #include #include #include @@ -24,6 +25,8 @@ AZ_DECLARE_BUDGET(RPI); namespace AZ { + class Matrix4x4; + namespace RHI { class ShaderResourceGroup; @@ -52,6 +55,8 @@ namespace AZ using ViewportContextPtr = AZStd::shared_ptr; using ConstViewportContextPtr = AZStd::shared_ptr; + using MatrixChangedEvent = Event; + //! The name used to identify a View within in a Scene. //! Note that the same View could have different tags in different RenderPipelines. using PipelineViewTag = AZ::Name; diff --git a/Gems/Atom/RPI/Code/Include/Atom/RPI.Public/Culling.h b/Gems/Atom/RPI/Code/Include/Atom/RPI.Public/Culling.h index 82e9c733c8..44b1425c7a 100644 --- a/Gems/Atom/RPI/Code/Include/Atom/RPI.Public/Culling.h +++ b/Gems/Atom/RPI/Code/Include/Atom/RPI.Public/Culling.h @@ -38,6 +38,8 @@ namespace AZ { class Job; + class TaskGraphActiveInterface; + class TaskGraph; namespace RHI { @@ -256,7 +258,13 @@ namespace AZ //! Must be called between BeginCulling() and EndCulling(), once for each active scene/view pair. //! Will create child jobs under the parentJob to do the processing in parallel. //! Can be called in parallel (i.e. to perform culling on multiple views at the same time). - void ProcessCullables(const Scene& scene, View& view, AZ::Job& parentJob); + void ProcessCullablesJobs(const Scene& scene, View& view, AZ::Job& parentJob); + + //! Performs render culling and lod selection for a View, then adds the visible renderpackets to that View. + //! Must be called between BeginCulling() and EndCulling(), once for each active scene/view pair. + //! Will create child task graphs that signal the TaskGraphEvent to do the processing in parallel. + //! Can be called in parallel (i.e. to perform culling on multiple views at the same time). + void ProcessCullablesTG(const Scene& scene, View& view, AZ::TaskGraph& taskGraph); //! Adds a Cullable to the underlying visibility system(s). //! Must be called at least once on initialization and whenever a Cullable's position or bounds is changed. @@ -276,17 +284,20 @@ namespace AZ return m_debugCtx; } - static const size_t WorkListCapacity = 5; - using WorkListType = AZStd::fixed_vector; - protected: size_t CountObjectsInScene(); + private: + void BeginCullingTaskGraph(const AZStd::vector& views); + void BeginCullingJobs(const AZStd::vector& views); + void ProcessCullablesCommon(const Scene& scene, View& view, AZ::Frustum& frustum, void*& maskedOcclusionCulling); + const Scene* m_parentScene = nullptr; AzFramework::IVisibilityScene* m_visScene = nullptr; CullingDebugContext m_debugCtx; AZStd::concurrency_checker m_cullDataConcurrencyCheck; OcclusionPlaneVector m_occlusionPlanes; + AZ::TaskGraphActiveInterface* m_taskGraphActive = nullptr; }; diff --git a/Gems/Atom/RPI/Code/Include/Atom/RPI.Public/FeatureProcessor.h b/Gems/Atom/RPI/Code/Include/Atom/RPI.Public/FeatureProcessor.h index ca188a6d42..caf3728c89 100644 --- a/Gems/Atom/RPI/Code/Include/Atom/RPI.Public/FeatureProcessor.h +++ b/Gems/Atom/RPI/Code/Include/Atom/RPI.Public/FeatureProcessor.h @@ -22,10 +22,12 @@ #include #include #include -#include namespace AZ { + // forward declares + class Job; + namespace RPI { //! @class FeatureProcessor @@ -51,6 +53,7 @@ namespace AZ struct SimulatePacket { + AZ::Job* m_parentJob = nullptr; }; struct RenderPacket diff --git a/Gems/Atom/RPI/Code/Include/Atom/RPI.Public/Image/ImageSystemInterface.h b/Gems/Atom/RPI/Code/Include/Atom/RPI.Public/Image/ImageSystemInterface.h index f567881c50..920b763bc3 100644 --- a/Gems/Atom/RPI/Code/Include/Atom/RPI.Public/Image/ImageSystemInterface.h +++ b/Gems/Atom/RPI/Code/Include/Atom/RPI.Public/Image/ImageSystemInterface.h @@ -29,6 +29,14 @@ namespace AZ Count }; + namespace DefaultImageAssetPaths + { + static constexpr char DefaultFallback[] = "textures/defaults/defaultfallback.png.streamingimage"; + static constexpr char Processing[] = "textures/defaults/processing.png.streamingimage"; + static constexpr char ProcessingFailed[] = "textures/defaults/processingfailed.png.streamingimage"; + static constexpr char Missing[] = "textures/defaults/missing.png.streamingimage"; + } + class ImageSystemInterface { public: diff --git a/Gems/Atom/RPI/Code/Include/Atom/RPI.Public/Image/StreamingImageContext.h b/Gems/Atom/RPI/Code/Include/Atom/RPI.Public/Image/StreamingImageContext.h index ec12a14ecf..fe65831716 100644 --- a/Gems/Atom/RPI/Code/Include/Atom/RPI.Public/Image/StreamingImageContext.h +++ b/Gems/Atom/RPI/Code/Include/Atom/RPI.Public/Image/StreamingImageContext.h @@ -11,6 +11,7 @@ #include #include #include +#include #include diff --git a/Gems/Atom/RPI/Code/Include/Atom/RPI.Public/Pass/ParentPass.h b/Gems/Atom/RPI/Code/Include/Atom/RPI.Public/Pass/ParentPass.h index 6523f0a6d8..00b7a76f77 100644 --- a/Gems/Atom/RPI/Code/Include/Atom/RPI.Public/Pass/ParentPass.h +++ b/Gems/Atom/RPI/Code/Include/Atom/RPI.Public/Pass/ParentPass.h @@ -131,6 +131,19 @@ namespace AZ // Generates child passes from source PassTemplate void CreatePassesFromTemplate(); + + // Generates child clear passes to clear input and input/output attachments + // TODO: These two functions are a workaround for a complicated edge case: + // Let Parent Pass P1 have two children, C1 and C2. C1 writes to an attachment that C2 reads, + // but C1 can be disabled, in which case we just want C2 to read the cleared texture. + // Because of this, the attachment is owned by the parent pass, that way it is always available for C2 + // to read even when C1 is disabled. However we still want to clear the attachment before C2 reads it. + // We tried overriding the LoadStoreAction to clear on C2's slot when C1 is disabled, but the RHI + // doesn't allow for clears on Input only slots. Changing the slot to InputOutput was in conflict with + // the texture definition in the SRG, and it couldn't be changed to RW because it was an MSAA texture. + // So now we detect clear actions on parent slots and generate a clear pass for them. + void CreateClearPassFromBinding(PassAttachmentBinding& binding, PassRequest& clearRequest); + void CreateClearPassesFromBindings(); }; template diff --git a/Gems/Atom/RPI/Code/Include/Atom/RPI.Public/Pass/PassDefines.h b/Gems/Atom/RPI/Code/Include/Atom/RPI.Public/Pass/PassDefines.h index 9dd1bf6842..89766cccb5 100644 --- a/Gems/Atom/RPI/Code/Include/Atom/RPI.Public/Pass/PassDefines.h +++ b/Gems/Atom/RPI/Code/Include/Atom/RPI.Public/Pass/PassDefines.h @@ -43,6 +43,10 @@ namespace AZ // Rendering -> Idle // -> Queued (Rendering will transition to Queued if a pass was queued with the PassSystem during Rendering) // + // Any State -> Orphaned (transition to Orphaned state can be outside the jurisdiction of the pass and so can happen from any state) + // Orphaned -> Queued (When coming out of Orphaned state, pass will queue itself for build. In practice this + // (almost?) never happens as orphaned passes are re-created in most if not all cases.) + // enum class PassState : u8 { // Default value, you should only ever see this in the Pass constructor @@ -92,7 +96,10 @@ namespace AZ // | // V // Pass is currently rendering. Pass must be in Idle state before entering this state - Rendering + Rendering, + + // Special state: Orphaned State, pass was removed from it's parent and is awaiting deletion + Orphaned }; // This enum keeps track of what actions the pass is queued for with the pass system diff --git a/Gems/Atom/RPI/Code/Include/Atom/RPI.Public/Pass/PassFilter.h b/Gems/Atom/RPI/Code/Include/Atom/RPI.Public/Pass/PassFilter.h index c42991725e..b93458113b 100644 --- a/Gems/Atom/RPI/Code/Include/Atom/RPI.Public/Pass/PassFilter.h +++ b/Gems/Atom/RPI/Code/Include/Atom/RPI.Public/Pass/PassFilter.h @@ -56,8 +56,8 @@ namespace AZ OwnerRenderPipeline = AZ_BIT(5) }; - void SetOwenrScene(const Scene* scene); - void SetOwenrRenderPipeline(const RenderPipeline* renderPipeline); + void SetOwnerScene(const Scene* scene); + void SetOwnerRenderPipeline(const RenderPipeline* renderPipeline); void SetPassName(Name passName); void SetTemplateName(Name passTemplateName); void SetPassClass(TypeId passClassTypeId); diff --git a/Gems/Atom/RPI/Code/Include/Atom/RPI.Public/Pass/RenderPass.h b/Gems/Atom/RPI/Code/Include/Atom/RPI.Public/Pass/RenderPass.h index ec51e34897..bdd305b4eb 100644 --- a/Gems/Atom/RPI/Code/Include/Atom/RPI.Public/Pass/RenderPass.h +++ b/Gems/Atom/RPI/Code/Include/Atom/RPI.Public/Pass/RenderPass.h @@ -62,6 +62,10 @@ namespace AZ //! It may return nullptr if this pass is independent with any views. ViewPtr GetView() const; + // Add a srg to srg list to be bound for this pass + void BindSrg(const RHI::ShaderResourceGroup* srg); + + protected: explicit RenderPass(const PassDescriptor& descriptor); @@ -95,9 +99,6 @@ namespace AZ // Clear the srg list void ResetSrgs(); - // Add a srg to srg list to be bound for this pass - void BindSrg(const RHI::ShaderResourceGroup* srg); - // Set srgs for pass's execution void SetSrgsForDraw(RHI::CommandList* commandList); void SetSrgsForDispatch(RHI::CommandList* commandList); diff --git a/Gems/Atom/RPI/Code/Include/Atom/RPI.Public/Pass/SlowClearPass.h b/Gems/Atom/RPI/Code/Include/Atom/RPI.Public/Pass/SlowClearPass.h new file mode 100644 index 0000000000..6fcb7abd17 --- /dev/null +++ b/Gems/Atom/RPI/Code/Include/Atom/RPI.Public/Pass/SlowClearPass.h @@ -0,0 +1,42 @@ +/* + * Copyright (c) Contributors to the Open 3D Engine Project. + * For complete copyright and license terms please see the LICENSE at the root of this distribution. + * + * SPDX-License-Identifier: Apache-2.0 OR MIT + * + */ +#pragma once + +#include +#include + +namespace AZ +{ + namespace RPI + { + //! Only use this for debug purposes and edge cases + //! The correct and efficient way to clear a pass is through the LoadStoreAction on the pass slot + //! This will clear a given image attachment to the specified clear value. + class SlowClearPass + : public RenderPass + { + AZ_RPI_PASS(SlowClearPass); + + public: + AZ_RTTI(SlowClearPass, "{31CBAD6C-108F-4F3F-B498-ED968DFCFCE2}", RenderPass); + AZ_CLASS_ALLOCATOR(SlowClearPass, SystemAllocator, 0); + virtual ~SlowClearPass() = default; + + //! Creates a SlowClearPass + static Ptr Create(const PassDescriptor& descriptor); + + protected: + SlowClearPass(const PassDescriptor& descriptor); + void InitializeInternal() override; + + private: + RHI::ClearValue m_clearValue; + }; + + } // namespace RPI +} // namespace AZ diff --git a/Gems/Atom/RPI/Code/Include/Atom/RPI.Public/RPISystem.h b/Gems/Atom/RPI/Code/Include/Atom/RPI.Public/RPISystem.h index 92370c5a82..57f595ccba 100644 --- a/Gems/Atom/RPI/Code/Include/Atom/RPI.Public/RPISystem.h +++ b/Gems/Atom/RPI/Code/Include/Atom/RPI.Public/RPISystem.h @@ -97,8 +97,7 @@ namespace AZ // SystemTickBus::OnTick void OnSystemTick() override; - // Fill system time and game time information for simulation or rendering - void FillTickTimeInfo(); + float GetCurrentTime() const; // The set of core asset handlers registered by the system. AZStd::vector> m_assetHandlers; @@ -124,7 +123,7 @@ namespace AZ // The job policy used for feature processor's rendering prepare RHI::JobPolicy m_prepareRenderJobPolicy = RHI::JobPolicy::Parallel; - TickTimeInfo m_tickTime; + float m_currentSimulationTime = 0.0f; RPISystemDescriptor m_descriptor; diff --git a/Gems/Atom/RPI/Code/Include/Atom/RPI.Public/RPISystemInterface.h b/Gems/Atom/RPI/Code/Include/Atom/RPI.Public/RPISystemInterface.h index 3f30d498cf..693185b6d2 100644 --- a/Gems/Atom/RPI/Code/Include/Atom/RPI.Public/RPISystemInterface.h +++ b/Gems/Atom/RPI/Code/Include/Atom/RPI.Public/RPISystemInterface.h @@ -34,8 +34,7 @@ namespace AZ RPISystemInterface() = default; virtual ~RPISystemInterface() = default; - //! Pre-load some system assets. This should be called once the asset catalog is ready and before create any RPI instances. - //! Note: can't rely on the AzFramework::AssetCatalogEventBus's OnCatalogLoaded since the order of calling handlers is undefined. + //! Pre-load some system assets. This should be called once Critical Asset have compiled ready and before create any RPI instances. virtual void InitializeSystemAssets() = 0; //! Was the RPI system initialized properly diff --git a/Gems/Atom/RPI/Code/Include/Atom/RPI.Public/RenderPipeline.h b/Gems/Atom/RPI/Code/Include/Atom/RPI.Public/RenderPipeline.h index fcf812cc38..6cba0c774f 100644 --- a/Gems/Atom/RPI/Code/Include/Atom/RPI.Public/RenderPipeline.h +++ b/Gems/Atom/RPI/Code/Include/Atom/RPI.Public/RenderPipeline.h @@ -32,7 +32,6 @@ namespace AZ namespace RPI { class Scene; - struct TickTimeInfo; class ShaderResourceGroup; class AnyAsset; class WindowContext; @@ -203,7 +202,7 @@ namespace AZ void OnRemovedFromScene(Scene* scene); // Called when this pipeline is about to be rendered - void OnStartFrame(const TickTimeInfo& tick); + void OnStartFrame(float time); // Called when the rendering of current frame is finished. void OnFrameEnd(); diff --git a/Gems/Atom/RPI/Code/Include/Atom/RPI.Public/Scene.h b/Gems/Atom/RPI/Code/Include/Atom/RPI.Public/Scene.h index f86383101a..a87184b4b2 100644 --- a/Gems/Atom/RPI/Code/Include/Atom/RPI.Public/Scene.h +++ b/Gems/Atom/RPI/Code/Include/Atom/RPI.Public/Scene.h @@ -48,14 +48,6 @@ namespace AZ // Callback function to modify values of a ShaderResourceGroup using ShaderResourceGroupCallback = AZStd::function; - //! A structure for ticks which contains system time and game time. - struct TickTimeInfo - { - float m_currentGameTime; - float m_gameDeltaTime = 0; - }; - - class Scene final : public SceneRequestBus::Handler { @@ -179,12 +171,14 @@ namespace AZ // Cpu simulation which runs all active FeatureProcessor Simulate() functions. // @param jobPolicy if it's JobPolicy::Parallel, the function will spawn a job thread for each FeatureProcessor's simulation. - void Simulate(const TickTimeInfo& tickInfo, RHI::JobPolicy jobPolicy); + // @param simulationTime the number of seconds since the application started + void Simulate(RHI::JobPolicy jobPolicy, float simulationTime); // Collect DrawPackets from FeatureProcessors // @param jobPolicy if it's JobPolicy::Parallel, the function will spawn a job thread for each FeatureProcessor's // PrepareRender. - void PrepareRender(const TickTimeInfo& tickInfo, RHI::JobPolicy jobPolicy); + // @param simulationTime the number of seconds since the application started; this is the same time value that was passed to Simulate() + void PrepareRender(RHI::JobPolicy jobPolicy, float simulationTime); // Function called when the current frame is finished rendering. void OnFrameEnd(); @@ -200,8 +194,8 @@ namespace AZ // This function is called every time scene's render pipelines change. void RebuildPipelineStatesLookup(); - // Helper function to wait for end of TaskGraph - void WaitTGEvent(AZ::TaskGraphEvent& completionTGEvent, AZStd::atomic_bool* workToWaitOn = nullptr); + // Helper function to wait for end of TaskGraph and then delete the TaskGraphEvent + void WaitAndCleanTGEvent(AZStd::unique_ptr&& completionTGEvent); // Helper function for wait and clean up a completion job void WaitAndCleanCompletionJob(AZ::JobCompletion*& completionJob); @@ -230,8 +224,7 @@ namespace AZ AZStd::vector m_pipelines; // CPU simulation TaskGraphEvent to wait for completion of all the simulation tasks - AZ::TaskGraphEvent m_simulationFinishedTGEvent; - AZStd::atomic_bool m_simulationFinishedWorkActive = false; + AZStd::unique_ptr m_simulationFinishedTGEvent; // CPU simulation job completion for track all feature processors' simulation jobs AZ::JobCompletion* m_simulationCompletion = nullptr; @@ -267,6 +260,7 @@ namespace AZ // Registry which allocates draw filter tag for RenderPipeline RHI::Ptr m_drawFilterTagRegistry; + RHI::ShaderInputConstantIndex m_timeInputIndex; float m_simulationTime; }; diff --git a/Gems/Atom/RPI/Code/Include/Atom/RPI.Public/Shader/Shader.h b/Gems/Atom/RPI/Code/Include/Atom/RPI.Public/Shader/Shader.h index e2568f3b61..92b67c3a7a 100644 --- a/Gems/Atom/RPI/Code/Include/Atom/RPI.Public/Shader/Shader.h +++ b/Gems/Atom/RPI/Code/Include/Atom/RPI.Public/Shader/Shader.h @@ -52,9 +52,8 @@ namespace AZ */ class Shader final : public Data::InstanceData - , public Data::AssetBus::Handler + , public Data::AssetBus::MultiHandler , public ShaderVariantFinderNotificationBus::Handler - , public ShaderReloadNotificationBus::Handler { friend class ShaderSystem; public: @@ -154,6 +153,8 @@ namespace AZ ConstPtr LoadPipelineLibrary() const; void SavePipelineLibrary() const; + + const ShaderVariant& GetVariantInternal(ShaderVariantStableId shaderVariantStableId); /////////////////////////////////////////////////////////////////// /// AssetBus overrides @@ -165,15 +166,6 @@ namespace AZ void OnShaderVariantTreeAssetReady(Data::Asset /*shaderVariantTreeAsset*/, bool /*isError*/) override {}; void OnShaderVariantAssetReady(Data::Asset shaderVariantAsset, bool IsError) override; /////////////////////////////////////////////////////////////////// - - /////////////////////////////////////////////////////////////////// - // ShaderReloadNotificationBus overrides... - void OnShaderAssetReinitialized(const Data::Asset& shaderAsset) override; - // Note we don't need OnShaderVariantReinitialized because the Shader class doesn't do anything with the data inside - // the ShaderVariant object. The only thing we might want to do is propagate the message upward, but that's unnecessary - // because the ShaderReloadNotificationBus uses the Shader's AssetId as the ID for all messages including those from the variants. - // And of course we don't need to handle OnShaderReinitialized because this *is* this Shader. - /////////////////////////////////////////////////////////////////// //! A strong reference to the shader asset. Data::Asset m_asset; @@ -206,6 +198,12 @@ namespace AZ //! PipelineLibrary file name char m_pipelineLibraryPath[AZ_MAX_PATH_LEN] = { 0 }; + + //! During OnAssetReloaded, the internal references to ShaderVariantAsset inside + //! ShaderAsset are not updated correctly. We store here a reference to the root ShaderVariantAsset + //! when it got reloaded, later when We get OnAssetReloaded for the ShaderAsset We update its internal + //! reference to the root variant asset. + Data::Asset m_reloadedRootShaderVariantAsset; }; } } diff --git a/Gems/Atom/RPI/Code/Include/Atom/RPI.Public/Shader/ShaderReloadDebugTracker.h b/Gems/Atom/RPI/Code/Include/Atom/RPI.Public/Shader/ShaderReloadDebugTracker.h index 27c43afd12..dcbc4a5774 100644 --- a/Gems/Atom/RPI/Code/Include/Atom/RPI.Public/Shader/ShaderReloadDebugTracker.h +++ b/Gems/Atom/RPI/Code/Include/Atom/RPI.Public/Shader/ShaderReloadDebugTracker.h @@ -24,6 +24,9 @@ namespace AZ class ShaderReloadDebugTracker final { public: + static void Init(); + static void Shutdown(); + static bool IsEnabled(); //! Begin a code section. Will print a "[BEGIN] " header, and all subsequent calls will be indented. @@ -34,8 +37,8 @@ namespace AZ if (IsEnabled()) { const AZStd::string sectionName = AZStd::string::format(sectionNameFormat, args...); - AZ_TracePrintf("ShaderReloadDebug", "%*s [BEGIN] %s \n", s_indent, "", sectionName.c_str()); - s_indent += IndentSpaces; + AZ_TracePrintf("ShaderReloadDebug", "%*s [BEGIN] %s \n", GetIndent(), "", sectionName.c_str()); + AddIndent(); } #endif } @@ -48,8 +51,8 @@ namespace AZ if (IsEnabled()) { const AZStd::string sectionName = AZStd::string::format(sectionNameFormat, args...); - s_indent -= IndentSpaces; - AZ_TracePrintf("ShaderReloadDebug", "%*s [_END_] %s \n", s_indent, "", sectionName.c_str()); + RemoveIndent(); + AZ_TracePrintf("ShaderReloadDebug", "%*s [_END_] %s \n", GetIndent(), "", sectionName.c_str()); } #endif } @@ -63,7 +66,7 @@ namespace AZ { const AZStd::string message = AZStd::string::format(format, args...); - AZ_TracePrintf("ShaderReloadDebug", "%*s %s \n", s_indent, "", message.c_str()); + AZ_TracePrintf("ShaderReloadDebug", "%*s %s \n", GetIndent(), "", message.c_str()); } #endif } @@ -86,9 +89,12 @@ namespace AZ }; private: - static bool s_enabled; - static int s_indent; static constexpr int IndentSpaces = 4; + + static void MakeReady(); + static void AddIndent(); + static void RemoveIndent(); + static int GetIndent(); }; } // namespace RPI diff --git a/Gems/Atom/RPI/Code/Include/Atom/RPI.Public/Shader/ShaderVariant.h b/Gems/Atom/RPI/Code/Include/Atom/RPI.Public/Shader/ShaderVariant.h index 7cfa2f91f5..0fb76e45c2 100644 --- a/Gems/Atom/RPI/Code/Include/Atom/RPI.Public/Shader/ShaderVariant.h +++ b/Gems/Atom/RPI/Code/Include/Atom/RPI.Public/Shader/ShaderVariant.h @@ -19,7 +19,6 @@ namespace AZ //! the RHI::PipelineStateType of the parent Shader instance. For shaders on the raster //! pipeline, the RHI::DrawFilterTag is also provided. class ShaderVariant final - : public Data::AssetBus::MultiHandler { friend class Shader; public: @@ -58,9 +57,6 @@ namespace AZ const Data::Asset& shaderVariantAsset, SupervariantIndex supervariantIndex); - // AssetBus overrides... - void OnAssetReloaded(Data::Asset asset) override; - //! A reference to the shader asset that this is a variant of. Data::Asset m_shaderAsset; diff --git a/Gems/Atom/RPI/Code/Include/Atom/RPI.Public/View.h b/Gems/Atom/RPI/Code/Include/Atom/RPI.Public/View.h index cdaf59ff75..ed0124b82b 100644 --- a/Gems/Atom/RPI/Code/Include/Atom/RPI.Public/View.h +++ b/Gems/Atom/RPI/Code/Include/Atom/RPI.Public/View.h @@ -24,6 +24,9 @@ class MaskedOcclusionCulling; namespace AZ { + // forward declares + class Job; + class TaskGraphEvent; namespace RHI { class FrameScheduler; @@ -92,12 +95,18 @@ namespace AZ const AZ::Matrix4x4& GetViewToWorldMatrix() const; const AZ::Matrix4x4& GetViewToClipMatrix() const; const AZ::Matrix4x4& GetWorldToClipMatrix() const; + const AZ::Matrix4x4& GetClipToWorldMatrix() const; + + AZ::Matrix3x4 GetWorldToViewMatrixAsMatrix3x4() const; + AZ::Matrix3x4 GetViewToWorldMatrixAsMatrix3x4() const; + //! Get the camera's world transform, converted from the viewToWorld matrix's native y-up to z-up AZ::Transform GetCameraTransform() const; //! Finalize draw lists in this view. This function should only be called when all //! draw packets for current frame are added. - void FinalizeDrawLists(); + void FinalizeDrawListsJob(AZ::Job* parentJob); + void FinalizeDrawListsTG(AZ::TaskGraphEvent& finalizeDrawListsTGEvent); bool HasDrawListTag(RHI::DrawListTag drawListTag); @@ -118,7 +127,6 @@ namespace AZ //! Update View's SRG values and compile. This should only be called once per frame before execute command lists. void UpdateSrg(); - using MatrixChangedEvent = AZ::Event; //! Notifies consumers when the world to view matrix has changed. void ConnectWorldToViewMatrixChangedHandler(MatrixChangedEvent::Handler& handler); //! Notifies consumers when the world to clip matrix has changed. @@ -130,17 +138,23 @@ namespace AZ //! Returns the masked occlusion culling interface MaskedOcclusionCulling* GetMaskedOcclusionCulling(); + //! This is called by RenderPipeline when this view is added to the pipeline. + void OnAddToRenderPipeline(); + private: View() = delete; View(const AZ::Name& name, UsageFlags usage); - //! Sorts the finalized draw lists in this view - void SortFinalizedDrawLists(); + void SortFinalizedDrawListsJob(AZ::Job* parentJob); + void SortFinalizedDrawListsTG(AZ::TaskGraphEvent& finalizeDrawListsTGEvent); //! Sorts a drawList using the sort function from a pass with the corresponding drawListTag void SortDrawList(RHI::DrawList& drawList, RHI::DrawListTag tag); + //! Attempt to create a shader resource group. + void TryCreateShaderResourceGroup(); + AZ::Name m_name; UsageFlags m_usageFlags; diff --git a/Gems/Atom/RPI/Code/Include/Atom/RPI.Public/ViewportContext.h b/Gems/Atom/RPI/Code/Include/Atom/RPI.Public/ViewportContext.h index 966e6b3016..92cfc720da 100644 --- a/Gems/Atom/RPI/Code/Include/Atom/RPI.Public/ViewportContext.h +++ b/Gems/Atom/RPI/Code/Include/Atom/RPI.Public/ViewportContext.h @@ -13,7 +13,6 @@ #include #include #include -#include namespace AZ { @@ -98,7 +97,6 @@ namespace AZ //! Alternatively, connect to ViewportContextNotificationsBus and listen to ViewportContextNotifications::OnViewportDpiScalingChanged. void ConnectDpiScalingFactorChangedHandler(ScalarChangedEvent::Handler& handler); - using MatrixChangedEvent = AZ::Event; //! Notifies consumers when the view matrix has changed. void ConnectViewMatrixChangedHandler(MatrixChangedEvent::Handler& handler); //! Notifies consumers when the projection matrix has changed. @@ -121,17 +119,12 @@ namespace AZ void ConnectAboutToBeDestroyedHandler(ViewportIdEvent::Handler& handler); // ViewportRequestBus interface overrides... - //! Gets the current camera's view matrix. const AZ::Matrix4x4& GetCameraViewMatrix() const override; - //! Sets the current camera's view matrix. + AZ::Matrix3x4 GetCameraViewMatrixAsMatrix3x4() const override; void SetCameraViewMatrix(const AZ::Matrix4x4& matrix) override; - //! Gets the current camera's projection matrix. const AZ::Matrix4x4& GetCameraProjectionMatrix() const override; - //! Sets the current camera's projection matrix. void SetCameraProjectionMatrix(const AZ::Matrix4x4& matrix) override; - //! Convenience method, gets the AZ::Transform corresponding to this camera's view matrix. AZ::Transform GetCameraTransform() const override; - //! Convenience method, sets the camera's view matrix from this AZ::Transform. void SetCameraTransform(const AZ::Transform& transform) override; private: diff --git a/Gems/Atom/RPI/Code/Include/Atom/RPI.Public/ViewportContextBus.h b/Gems/Atom/RPI/Code/Include/Atom/RPI.Public/ViewportContextBus.h index 0b53172ba2..2b83903dd1 100644 --- a/Gems/Atom/RPI/Code/Include/Atom/RPI.Public/ViewportContextBus.h +++ b/Gems/Atom/RPI/Code/Include/Atom/RPI.Public/ViewportContextBus.h @@ -67,6 +67,9 @@ namespace AZ virtual ViewportContextPtr GetViewportContextByName(const Name& contextName) const = 0; //! Gets the registered ViewportContext with the corresponding ID, if any. virtual ViewportContextPtr GetViewportContextById(AzFramework::ViewportId id) const = 0; + //! Gets the registered ViewportContext with matching RPI::Scene, if any. + //! This function will return the first result. + virtual ViewportContextPtr GetViewportContextByScene(const Scene* scene) const = 0; //! Maps a ViewportContext to a new name, inheriting the View stack (if any) registered to that context name. //! This can be used to switch "default" viewports by registering a viewport with the default ViewportContext name //! but note that only one ViewportContext can be mapped to a context name at a time. diff --git a/Gems/Atom/RPI/Code/Include/Atom/RPI.Public/ViewportContextManager.h b/Gems/Atom/RPI/Code/Include/Atom/RPI.Public/ViewportContextManager.h index 65576f97d3..2672ede9f5 100644 --- a/Gems/Atom/RPI/Code/Include/Atom/RPI.Public/ViewportContextManager.h +++ b/Gems/Atom/RPI/Code/Include/Atom/RPI.Public/ViewportContextManager.h @@ -41,6 +41,7 @@ namespace AZ bool PopView(const Name& contextName, ViewPtr view) override; ViewPtr GetCurrentView(const Name& contextName) const override; ViewportContextPtr GetDefaultViewportContext() const override; + ViewportContextPtr GetViewportContextByScene(const Scene* scene) const override; private: void RegisterViewportContext(const Name& contextName, ViewportContextPtr viewportContext); diff --git a/Gems/Atom/RPI/Code/Include/Atom/RPI.Reflect/AssetCreator.h b/Gems/Atom/RPI/Code/Include/Atom/RPI.Reflect/AssetCreator.h index abdbe9cdce..79d43d0b8d 100644 --- a/Gems/Atom/RPI/Code/Include/Atom/RPI.Reflect/AssetCreator.h +++ b/Gems/Atom/RPI/Code/Include/Atom/RPI.Reflect/AssetCreator.h @@ -118,7 +118,7 @@ namespace AZ ResetIssueCounts(); // Because the asset creator can be used multiple times - m_asset = Data::AssetManager::Instance().CreateAsset(assetId, AZ::Data::AssetLoadBehavior::PreLoad); + m_asset = Data::Asset(assetId, aznew AssetDataT, AZ::Data::AssetLoadBehavior::PreLoad); m_beginCalled = true; if (!m_asset) @@ -138,6 +138,7 @@ namespace AZ } else { + Data::AssetManager::Instance().AssignAssetData(m_asset); result = AZStd::move(m_asset); success = true; } diff --git a/Gems/Atom/RPI/Code/Include/Atom/RPI.Reflect/Image/StreamingImageAssetHandler.h b/Gems/Atom/RPI/Code/Include/Atom/RPI.Reflect/Image/StreamingImageAssetHandler.h index 3f4e15744a..b3b62cbc31 100644 --- a/Gems/Atom/RPI/Code/Include/Atom/RPI.Reflect/Image/StreamingImageAssetHandler.h +++ b/Gems/Atom/RPI/Code/Include/Atom/RPI.Reflect/Image/StreamingImageAssetHandler.h @@ -25,6 +25,9 @@ namespace AZ const Data::Asset& asset, AZStd::shared_ptr stream, const Data::AssetFilterCB& assetLoadFilterCB) override; + + // Return a default fallback image if an asset is missing + Data::AssetId AssetMissingInCatalog(const Data::Asset& /*asset*/) override; }; } } diff --git a/Gems/Atom/RPI/Code/Include/Atom/RPI.Reflect/Pass/SlowClearPassData.h b/Gems/Atom/RPI/Code/Include/Atom/RPI.Reflect/Pass/SlowClearPassData.h new file mode 100644 index 0000000000..7607bca285 --- /dev/null +++ b/Gems/Atom/RPI/Code/Include/Atom/RPI.Reflect/Pass/SlowClearPassData.h @@ -0,0 +1,43 @@ +/* + * Copyright (c) Contributors to the Open 3D Engine Project. + * For complete copyright and license terms please see the LICENSE at the root of this distribution. + * + * SPDX-License-Identifier: Apache-2.0 OR MIT + * + */ +#pragma once + +#include +#include + +namespace AZ +{ + namespace RPI + { + //! Custom data for the SlowClearPass. Should be specified in the PassRequest. + struct SlowClearPassData + : public RenderPassData + { + AZ_RTTI(SlowClearPassData, "{5F2C24A4-62D0-4E60-91EC-C207C10D15C6}", RenderPassData); + AZ_CLASS_ALLOCATOR(SlowClearPassData, SystemAllocator, 0); + + SlowClearPassData() = default; + virtual ~SlowClearPassData() = default; + + static void Reflect(ReflectContext* context) + { + if (auto* serializeContext = azrtti_cast(context)) + { + serializeContext->Class() + ->Version(0) + ->Field("ClearValue", &SlowClearPassData::m_clearValue) + ; + } + } + + RHI::ClearValue m_clearValue; + }; + + } // namespace RPI +} // namespace AZ + diff --git a/Gems/Atom/RPI/Code/Include/Atom/RPI.Reflect/Shader/ShaderAsset.h b/Gems/Atom/RPI/Code/Include/Atom/RPI.Reflect/Shader/ShaderAsset.h index 2c24d6052a..70451bd055 100644 --- a/Gems/Atom/RPI/Code/Include/Atom/RPI.Reflect/Shader/ShaderAsset.h +++ b/Gems/Atom/RPI/Code/Include/Atom/RPI.Reflect/Shader/ShaderAsset.h @@ -53,12 +53,12 @@ namespace AZ class ShaderAsset final : public Data::AssetData , public ShaderVariantFinderNotificationBus::Handler - , public Data::AssetBus::Handler , public AssetInitBus::Handler { friend class ShaderAssetCreator; friend class ShaderAssetHandler; friend class ShaderAssetTester; + friend class Shader; public: AZ_RTTI(ShaderAsset, "{823395A3-D570-49F4-99A9-D820CD1DEF98}", Data::AssetData); static void Reflect(ReflectContext* context); @@ -96,7 +96,7 @@ namespace AZ //! Return the timestamp when the shader asset was built. //! This is used to synchronize versions of the ShaderAsset and ShaderVariantTreeAsset, especially during hot-reload. - AZStd::sys_time_t GetShaderAssetBuildTimestamp() const; + AZStd::sys_time_t GetBuildTimestamp() const; //! Returns the shader option group layout. const ShaderOptionGroupLayout* GetShaderOptionGroupLayout() const; @@ -212,22 +212,19 @@ namespace AZ return GetAttribute(shaderStage, attributeName, DefaultSupervariantIndex); } - private: - /////////////////////////////////////////////////////////////////// - /// AssetBus overrides - void OnAssetReloaded(Data::Asset asset) override; - void OnAssetReady(Data::Asset asset) override; - /////////////////////////////////////////////////////////////////// - - void ReinitializeRootShaderVariant(Data::Asset asset); - /////////////////////////////////////////////////////////////////// /// ShaderVariantFinderNotificationBus overrides void OnShaderVariantTreeAssetReady(Data::Asset shaderVariantTreeAsset, bool isError) override; void OnShaderVariantAssetReady(Data::Asset /*shaderVariantAsset*/, bool /*isError*/) override {}; /////////////////////////////////////////////////////////////////// + // Only Shader::OnAssetReloaded() should call this function, because it is pointless for an Asset to + // to refresh its own "serialized references" to other assets during OnAssetReloaded(). + // The problem is that OnAssetReloaded() doesn't do a good job at updating "serialized references" to other assets, + // So some other class must update the reference and that's why Shader() is the best class to do it. + void UpdateRootShaderVariantAsset(SupervariantIndex SupervariantIndex, Data::Asset newRootVariant); + //! A Supervariant represents a set of static shader compilation parameters. //! Those parameters can be predefined c-preprocessor macros or specific arguments //! for AZSLc. @@ -297,7 +294,7 @@ namespace AZ Name m_drawListName; //! Use to synchronize versions of the ShaderAsset and ShaderVariantTreeAsset, especially during hot-reload. - AZStd::sys_time_t m_shaderAssetBuildTimestamp = 0; + AZ::u64 m_buildTimestamp = 0; /////////////////////////////////////////////////////////////////// diff --git a/Gems/Atom/RPI/Code/Include/Atom/RPI.Reflect/Shader/ShaderVariantAsset.h b/Gems/Atom/RPI/Code/Include/Atom/RPI.Reflect/Shader/ShaderVariantAsset.h index 66bbd7b188..5146ae370a 100644 --- a/Gems/Atom/RPI/Code/Include/Atom/RPI.Reflect/Shader/ShaderVariantAsset.h +++ b/Gems/Atom/RPI/Code/Include/Atom/RPI.Reflect/Shader/ShaderVariantAsset.h @@ -61,7 +61,7 @@ namespace AZ //! Return the timestamp when this asset was built, and it must be >= than the timestamp of the main ShaderAsset. //! This is used to synchronize versions of the ShaderAsset and ShaderVariantAsset, especially during hot-reload. - AZStd::sys_time_t GetBuildTimestamp() const; + AZ::u64 GetBuildTimestamp() const; bool IsRootVariant() const { return m_stableId == RPI::RootShaderVariantStableId; } @@ -80,7 +80,7 @@ namespace AZ AZStd::array, RHI::ShaderStageCount> m_functionsByStage; //! Used to synchronize versions of the ShaderAsset and ShaderVariantAsset, especially during hot-reload. - AZStd::sys_time_t m_buildTimestamp = 0; + AZ::u64 m_buildTimestamp = 0; }; class ShaderVariantAssetHandler final diff --git a/Gems/Atom/RPI/Code/Source/RPI.Builders/Material/MaterialBuilder.cpp b/Gems/Atom/RPI/Code/Source/RPI.Builders/Material/MaterialBuilder.cpp index e9cebf29c7..f11b2f94ac 100644 --- a/Gems/Atom/RPI/Code/Source/RPI.Builders/Material/MaterialBuilder.cpp +++ b/Gems/Atom/RPI/Code/Source/RPI.Builders/Material/MaterialBuilder.cpp @@ -63,11 +63,21 @@ namespace AZ { BusDisconnect(); } + + bool MaterialBuilder::ReportMaterialAssetWarningsAsErrors() const + { + bool warningsAsErrors = false; + if (auto settingsRegistry = AZ::SettingsRegistry::Get(); settingsRegistry != nullptr) + { + settingsRegistry->Get(warningsAsErrors, "/O3DE/Atom/RPI/MaterialBuilder/WarningsAsErrors"); + } + return warningsAsErrors; + } //! Adds all relevant dependencies for a referenced source file, considering that the path might be relative to the original file location or a full asset path. //! This will usually include multiple source dependencies and a single job dependency, but will include only source dependencies if the file is not found. //! Note the AssetBuilderSDK::JobDependency::m_platformIdentifier will not be set by this function. The calling code must set this value before passing back - //! to the AssetBuilderSDK::CreateJobsResponse. If isOrderedOnceForMaterialTypes is true and the dependency is a materialtype file, the job dependency type + //! to the AssetBuilderSDK::CreateJobsResponse. If isOrderedOnceForMaterialTypes is true and the dependency is a .materialtype file, the job dependency type //! will be set to JobDependencyType::OrderOnce. void AddPossibleDependencies(AZStd::string_view currentFilePath, AZStd::string_view referencedParentPath, @@ -277,8 +287,8 @@ namespace AZ return materialTypeAssetOutcome.GetValue(); } - - AZ::Data::Asset CreateMaterialAsset(AZStd::string_view materialSourceFilePath, const rapidjson::Value& json) + + AZ::Data::Asset MaterialBuilder::CreateMaterialAsset(AZStd::string_view materialSourceFilePath, const rapidjson::Value& json) const { auto material = LoadSourceData(json, materialSourceFilePath); @@ -292,7 +302,7 @@ namespace AZ return {}; } - auto materialAssetOutcome = material.GetValue().CreateMaterialAsset(Uuid::CreateRandom(), materialSourceFilePath, true); + auto materialAssetOutcome = material.GetValue().CreateMaterialAsset(Uuid::CreateRandom(), materialSourceFilePath, ReportMaterialAssetWarningsAsErrors()); if (!materialAssetOutcome.IsSuccess()) { return {}; diff --git a/Gems/Atom/RPI/Code/Source/RPI.Builders/Material/MaterialBuilder.h b/Gems/Atom/RPI/Code/Source/RPI.Builders/Material/MaterialBuilder.h index afb0789dcf..4fa5f3cf10 100644 --- a/Gems/Atom/RPI/Code/Source/RPI.Builders/Material/MaterialBuilder.h +++ b/Gems/Atom/RPI/Code/Source/RPI.Builders/Material/MaterialBuilder.h @@ -9,6 +9,8 @@ #pragma once #include +#include +#include namespace AZ { @@ -37,6 +39,9 @@ namespace AZ private: + AZ::Data::Asset CreateMaterialAsset(AZStd::string_view materialSourceFilePath, const rapidjson::Value& json) const; + bool ReportMaterialAssetWarningsAsErrors() const; + bool m_isShuttingDown = false; }; diff --git a/Gems/Atom/RPI/Code/Source/RPI.Builders/Model/ModelAssetBuilderComponent.cpp b/Gems/Atom/RPI/Code/Source/RPI.Builders/Model/ModelAssetBuilderComponent.cpp index 9fc99e3ea4..66d754c1dc 100644 --- a/Gems/Atom/RPI/Code/Source/RPI.Builders/Model/ModelAssetBuilderComponent.cpp +++ b/Gems/Atom/RPI/Code/Source/RPI.Builders/Model/ModelAssetBuilderComponent.cpp @@ -948,19 +948,17 @@ namespace AZ { AZStd::vector& skinJointIndices = productMesh.m_skinJointIndices; AZStd::vector& skinWeights = productMesh.m_skinWeights; - const auto& sourceMeshData = sourceMesh.m_meshData; size_t numInfluencesAdded = 0; for (const auto& skinData : sourceMesh.m_skinData) { - const AZ::u32 controlPointIndex = sourceMeshData->GetControlPointIndex(static_cast(vertexIndex)); - const size_t numSkinInfluences = skinData->GetLinkCount(controlPointIndex); + const size_t numSkinInfluences = skinData->GetLinkCount(vertexIndex); size_t numInfluencesExcess = 0; for (size_t influenceIndex = 0; influenceIndex < numSkinInfluences; ++influenceIndex) { - const AZ::SceneAPI::DataTypes::ISkinWeightData::Link& link = skinData->GetLink(controlPointIndex, influenceIndex); + const AZ::SceneAPI::DataTypes::ISkinWeightData::Link& link = skinData->GetLink(vertexIndex, influenceIndex); const float weight = link.weight; const AZStd::string& boneName = skinData->GetBoneName(link.boneId); @@ -2088,7 +2086,7 @@ namespace AZ AZ::Vector3 vpos; //note: it seems to be fastest to reuse a local Vector3 rather than constructing new ones each loop iteration for (uint32_t i = 0; i < elementCount; ++i) { - vpos.Set(const_cast(reinterpret_cast(&buffer[i]))); + vpos.Set(reinterpret_cast(&buffer[i])); aabb.AddPoint(vpos); } } diff --git a/Gems/Atom/RPI/Code/Source/RPI.Builders/Model/ModelExporterComponent.h b/Gems/Atom/RPI/Code/Source/RPI.Builders/Model/ModelExporterComponent.h index ee4bce634d..de4e1a0fe5 100644 --- a/Gems/Atom/RPI/Code/Source/RPI.Builders/Model/ModelExporterComponent.h +++ b/Gems/Atom/RPI/Code/Source/RPI.Builders/Model/ModelExporterComponent.h @@ -25,7 +25,7 @@ namespace AZ namespace RPI { /** - * This is the central component that drive the process of exporting a scene to Model + * This is the central component that drive the process of exporting a scene to Model * and Material assets. It delegates asset-build duties to other components like * ModelAssetBuilderComponent and MaterialAssetBuilderComponent via export events. */ @@ -55,7 +55,7 @@ namespace AZ AZStd::string_view m_relativeFileName; AZStd::string_view m_extension; - const Uuid m_sourceUuid; + const Uuid m_sourceUuid = Uuid::CreateNull(); const DataStream::StreamType m_dataStreamType = DataStream::ST_BINARY; }; diff --git a/Gems/Atom/RPI/Code/Source/RPI.Edit/Common/AssetUtils.cpp b/Gems/Atom/RPI/Code/Source/RPI.Edit/Common/AssetUtils.cpp index c940ef808b..e2877aa163 100644 --- a/Gems/Atom/RPI/Code/Source/RPI.Edit/Common/AssetUtils.cpp +++ b/Gems/Atom/RPI/Code/Source/RPI.Edit/Common/AssetUtils.cpp @@ -10,6 +10,7 @@ #include #include #include +#include namespace AZ { @@ -46,6 +47,12 @@ namespace AZ AZStd::string ResolvePathReference(const AZStd::string& originatingSourceFilePath, const AZStd::string& referencedSourceFilePath) { + // The IsAbsolute part prevents "second join parameter is an absolute path" warnings in StringFunc::Path::Join below + if (referencedSourceFilePath.empty() || AZ::IO::PathView{referencedSourceFilePath}.IsAbsolute()) + { + return referencedSourceFilePath; + } + AZStd::string normalizedReferencedPath = referencedSourceFilePath; AzFramework::StringFunc::Path::Normalize(normalizedReferencedPath); @@ -113,7 +120,7 @@ namespace AZ return results; } - Outcome MakeAssetId(const AZStd::string& sourcePath, uint32_t productSubId) + Outcome MakeAssetId(const AZStd::string& sourcePath, uint32_t productSubId, TraceLevel reporting) { bool assetFound = false; AZ::Data::AssetInfo sourceInfo; @@ -122,7 +129,7 @@ namespace AZ if (!assetFound) { - AZ_Error("AssetUtils", false, "Could not find asset [%s]", sourcePath.c_str()); + AssetUtilsInternal::ReportIssue(reporting, AZStd::string::format("Could not find asset [%s]", sourcePath.c_str()).c_str()); return AZ::Failure(); } else @@ -131,10 +138,10 @@ namespace AZ } } - Outcome MakeAssetId(const AZStd::string& originatingSourcePath, const AZStd::string& referencedSourceFilePath, uint32_t productSubId) + Outcome MakeAssetId(const AZStd::string& originatingSourcePath, const AZStd::string& referencedSourceFilePath, uint32_t productSubId, TraceLevel reporting) { AZStd::string resolvedPath = ResolvePathReference(originatingSourcePath, referencedSourceFilePath); - return MakeAssetId(resolvedPath, productSubId); + return MakeAssetId(resolvedPath, productSubId, reporting); } } // namespace AssetUtils } // namespace RPI diff --git a/Gems/Atom/RPI/Code/Source/RPI.Edit/Common/ColorUtils.cpp b/Gems/Atom/RPI/Code/Source/RPI.Edit/Common/ColorUtils.cpp index a6baa38a72..df88a530b9 100644 --- a/Gems/Atom/RPI/Code/Source/RPI.Edit/Common/ColorUtils.cpp +++ b/Gems/Atom/RPI/Code/Source/RPI.Edit/Common/ColorUtils.cpp @@ -14,14 +14,14 @@ namespace AZ { namespace ColorUtils { + enum ColorSpace : uint32_t + { + LinearSRGB, + SRGB + }; + AzToolsFramework::ColorEditorConfiguration GetLinearRgbEditorConfig() { - enum ColorSpace : uint32_t - { - LinearSRGB, - SRGB - }; - AzToolsFramework::ColorEditorConfiguration configuration; configuration.m_colorPickerDialogConfiguration = AzQtComponents::ColorPicker::Configuration::RGB; @@ -59,6 +59,15 @@ namespace AZ return configuration; } + AzToolsFramework::ColorEditorConfiguration GetRgbEditorConfig() + { + AzToolsFramework::ColorEditorConfiguration configuration = GetLinearRgbEditorConfig(); + + configuration.m_propertyColorSpaceId = ColorSpace::SRGB; + + return configuration; + } + } // namespace ColorPropertyEditorConfigurations } // namespace RPI } // namespace AZ diff --git a/Gems/Atom/RPI/Code/Source/RPI.Edit/Material/LuaMaterialFunctorSourceData.cpp b/Gems/Atom/RPI/Code/Source/RPI.Edit/Material/LuaMaterialFunctorSourceData.cpp index b230953f8c..14ef3bb17d 100644 --- a/Gems/Atom/RPI/Code/Source/RPI.Edit/Material/LuaMaterialFunctorSourceData.cpp +++ b/Gems/Atom/RPI/Code/Source/RPI.Edit/Material/LuaMaterialFunctorSourceData.cpp @@ -137,7 +137,10 @@ namespace AZ } else if (!m_luaSourceFile.empty()) { - auto loadOutcome = RPI::AssetUtils::LoadAsset(materialTypeSourceFilePath, m_luaSourceFile); + // The sub ID for script assets must be explicit. + // LUA source files output a compiled as well as an uncompiled asset, sub Ids of 1 and 2. + auto loadOutcome = + RPI::AssetUtils::LoadAsset(materialTypeSourceFilePath, m_luaSourceFile, ScriptAsset::CompiledAssetSubId); if (!loadOutcome) { AZ_Error("LuaMaterialFunctorSourceData", false, "Could not load script file '%s'", m_luaSourceFile.c_str()); diff --git a/Gems/Atom/RPI/Code/Source/RPI.Edit/Material/MaterialSourceData.cpp b/Gems/Atom/RPI/Code/Source/RPI.Edit/Material/MaterialSourceData.cpp index 1467b017d5..4351213c22 100644 --- a/Gems/Atom/RPI/Code/Source/RPI.Edit/Material/MaterialSourceData.cpp +++ b/Gems/Atom/RPI/Code/Source/RPI.Edit/Material/MaterialSourceData.cpp @@ -17,6 +17,7 @@ #include #include #include +#include #include #include @@ -115,10 +116,11 @@ namespace AZ { m_properties = AZStd::move(newPropertyGroups); - AZ_Warning("MaterialSourceData", false, + AZ_Warning( + "MaterialSourceData", false, "This material is based on version '%u' of '%s', but the material type is now at version '%u'. " - "Automatic updates are available. Consider updating the .material source file.", - m_materialTypeVersion, m_materialType.c_str(), materialTypeSourceData.m_version); + "Automatic updates are available. Consider updating the .material source file: '%s'.", + m_materialTypeVersion, materialTypeFullPath.c_str(), materialTypeSourceData.m_version, materialSourceFilePath.data()); } m_materialTypeVersion = materialTypeSourceData.m_version; @@ -126,7 +128,8 @@ namespace AZ return changesWereApplied ? ApplyVersionUpdatesResult::UpdatesApplied : ApplyVersionUpdatesResult::NoUpdates; } - Outcome > MaterialSourceData::CreateMaterialAsset(Data::AssetId assetId, AZStd::string_view materialSourceFilePath, bool elevateWarnings, bool includeMaterialPropertyNames) const + Outcome> MaterialSourceData::CreateMaterialAsset( + Data::AssetId assetId, AZStd::string_view materialSourceFilePath, bool elevateWarnings, bool includeMaterialPropertyNames) const { MaterialAssetCreator materialAssetCreator; materialAssetCreator.SetElevateWarnings(elevateWarnings); @@ -172,66 +175,7 @@ namespace AZ materialAssetCreator.Begin(assetId, *parentMaterialAsset.GetValue().Get(), includeMaterialPropertyNames); } - for (auto& group : m_properties) - { - for (auto& property : group.second) - { - MaterialPropertyId propertyId{ group.first, property.first }; - if (!property.second.m_value.IsValid()) - { - AZ_Warning("Material source data", false, "Source data for material property value is invalid."); - } - else - { - MaterialPropertyIndex propertyIndex = materialAssetCreator.m_materialPropertiesLayout->FindPropertyIndex(propertyId.GetFullName()); - if (propertyIndex.IsValid()) - { - const MaterialPropertyDescriptor* propertyDescriptor = materialAssetCreator.m_materialPropertiesLayout->GetPropertyDescriptor(propertyIndex); - switch (propertyDescriptor->GetDataType()) - { - case MaterialPropertyDataType::Image: - { - Outcome> imageAssetResult = MaterialUtils::GetImageAssetReference(materialSourceFilePath, property.second.m_value.GetValue()); - - if (imageAssetResult.IsSuccess()) - { - auto& imageAsset = imageAssetResult.GetValue(); - // Load referenced images when load material - imageAsset.SetAutoLoadBehavior(Data::AssetLoadBehavior::PreLoad); - materialAssetCreator.SetPropertyValue(propertyId.GetFullName(), imageAsset); - } - else - { - materialAssetCreator.ReportError("Material property '%s': Could not find the image '%s'", propertyId.GetFullName().GetCStr(), property.second.m_value.GetValue().data()); - } - } - break; - case MaterialPropertyDataType::Enum: - { - AZ::Name enumName = AZ::Name(property.second.m_value.GetValue()); - uint32_t enumValue = propertyDescriptor->GetEnumValue(enumName); - if (enumValue == MaterialPropertyDescriptor::InvalidEnumValue) - { - materialAssetCreator.ReportError("Enum value '%s' couldn't be found in the 'enumValues' list", enumName.GetCStr()); - } - else - { - materialAssetCreator.SetPropertyValue(propertyId.GetFullName(), enumValue); - } - } - break; - default: - materialAssetCreator.SetPropertyValue(propertyId.GetFullName(), property.second.m_value); - break; - } - } - else - { - materialAssetCreator.ReportWarning("Can not find property id '%s' in MaterialPropertyLayout", propertyId.GetFullName().GetStringView().data()); - } - } - } - } + ApplyPropertiesToAssetCreator(materialAssetCreator, materialSourceFilePath); Data::Asset material; if (materialAssetCreator.End(material)) @@ -244,5 +188,181 @@ namespace AZ } } + Outcome> MaterialSourceData::CreateMaterialAssetFromSourceData( + Data::AssetId assetId, + AZStd::string_view materialSourceFilePath, + bool elevateWarnings, + bool includeMaterialPropertyNames, + AZStd::unordered_set* sourceDependencies) const + { + const auto materialTypeSourcePath = AssetUtils::ResolvePathReference(materialSourceFilePath, m_materialType); + const auto materialTypeAssetId = AssetUtils::MakeAssetId(materialTypeSourcePath, 0); + if (!materialTypeAssetId.IsSuccess()) + { + AZ_Error("MaterialSourceData", false, "Failed to create material type asset ID: '%s'.", materialTypeSourcePath.c_str()); + return Failure(); + } + + MaterialTypeSourceData materialTypeSourceData; + if (!AZ::RPI::JsonUtils::LoadObjectFromFile(materialTypeSourcePath, materialTypeSourceData)) + { + AZ_Error("MaterialSourceData", false, "Failed to load MaterialTypeSourceData: '%s'.", materialTypeSourcePath.c_str()); + return Failure(); + } + + materialTypeSourceData.ResolveUvEnums(); + + const auto materialTypeAsset = + materialTypeSourceData.CreateMaterialTypeAsset(materialTypeAssetId.GetValue(), materialTypeSourcePath, elevateWarnings); + if (!materialTypeAsset.IsSuccess()) + { + AZ_Error("MaterialSourceData", false, "Failed to create material type asset from source data: '%s'.", materialTypeSourcePath.c_str()); + return Failure(); + } + + // Track all of the material and material type assets loaded while trying to create a material asset from source data. This will + // be used for evaluating circular dependencies and returned for external monitoring or other use. + AZStd::unordered_set dependencies; + dependencies.insert(materialSourceFilePath); + dependencies.insert(materialTypeSourcePath); + + // Load and build a stack of MaterialSourceData from all of the parent materials in the hierarchy. Properties from the source + // data will be applied in reverse to the asset creator. + AZStd::vector parentSourceDataStack; + + AZStd::string parentSourceRelPath = m_parentMaterial; + AZStd::string parentSourceAbsPath = AssetUtils::ResolvePathReference(materialSourceFilePath, parentSourceRelPath); + while (!parentSourceRelPath.empty()) + { + if (!dependencies.insert(parentSourceAbsPath).second) + { + AZ_Error("MaterialSourceData", false, "Detected circular dependency between materials: '%s' and '%s'.", materialSourceFilePath.data(), parentSourceAbsPath.c_str()); + return Failure(); + } + + MaterialSourceData parentSourceData; + if (!AZ::RPI::JsonUtils::LoadObjectFromFile(parentSourceAbsPath, parentSourceData)) + { + AZ_Error("MaterialSourceData", false, "Failed to load MaterialSourceData for parent material: '%s'.", parentSourceAbsPath.c_str()); + return Failure(); + } + + // Make sure that all materials in the hierarchy share the same material type + const auto parentTypeAssetId = AssetUtils::MakeAssetId(parentSourceAbsPath, parentSourceData.m_materialType, 0); + if (!parentTypeAssetId) + { + AZ_Error("MaterialSourceData", false, "Parent material asset ID wasn't found: '%s'.", parentSourceAbsPath.c_str()); + return Failure(); + } + + if (parentTypeAssetId.GetValue() != materialTypeAssetId.GetValue()) + { + AZ_Error("MaterialSourceData", false, "This material and its parent material do not share the same material type."); + return Failure(); + } + + // Get the location of the next parent material and push the source data onto the stack + parentSourceRelPath = parentSourceData.m_parentMaterial; + parentSourceAbsPath = AssetUtils::ResolvePathReference(parentSourceAbsPath, parentSourceRelPath); + parentSourceDataStack.emplace_back(AZStd::move(parentSourceData)); + } + + // Create the material asset from all the previously loaded source data + MaterialAssetCreator materialAssetCreator; + materialAssetCreator.SetElevateWarnings(elevateWarnings); + materialAssetCreator.Begin(assetId, *materialTypeAsset.GetValue().Get(), includeMaterialPropertyNames); + + while (!parentSourceDataStack.empty()) + { + parentSourceDataStack.back().ApplyPropertiesToAssetCreator(materialAssetCreator, materialSourceFilePath); + parentSourceDataStack.pop_back(); + } + + ApplyPropertiesToAssetCreator(materialAssetCreator, materialSourceFilePath); + + Data::Asset material; + if (materialAssetCreator.End(material)) + { + if (sourceDependencies) + { + sourceDependencies->insert(dependencies.begin(), dependencies.end()); + } + + return Success(material); + } + + return Failure(); + } + + void MaterialSourceData::ApplyPropertiesToAssetCreator( + AZ::RPI::MaterialAssetCreator& materialAssetCreator, const AZStd::string_view& materialSourceFilePath) const + { + for (auto& group : m_properties) + { + for (auto& property : group.second) + { + MaterialPropertyId propertyId{ group.first, property.first }; + if (!property.second.m_value.IsValid()) + { + materialAssetCreator.ReportWarning("Source data for material property value is invalid."); + } + else + { + MaterialPropertyIndex propertyIndex = + materialAssetCreator.m_materialPropertiesLayout->FindPropertyIndex(propertyId.GetFullName()); + if (propertyIndex.IsValid()) + { + const MaterialPropertyDescriptor* propertyDescriptor = + materialAssetCreator.m_materialPropertiesLayout->GetPropertyDescriptor(propertyIndex); + switch (propertyDescriptor->GetDataType()) + { + case MaterialPropertyDataType::Image: + { + Data::Asset imageAsset; + + MaterialUtils::GetImageAssetResult result = MaterialUtils::GetImageAssetReference( + imageAsset, materialSourceFilePath, property.second.m_value.GetValue()); + + if (result == MaterialUtils::GetImageAssetResult::Missing) + { + materialAssetCreator.ReportWarning( + "Material property '%s': Could not find the image '%s'", propertyId.GetFullName().GetCStr(), + property.second.m_value.GetValue().data()); + } + + imageAsset.SetAutoLoadBehavior(Data::AssetLoadBehavior::PreLoad); + materialAssetCreator.SetPropertyValue(propertyId.GetFullName(), imageAsset); + } + break; + case MaterialPropertyDataType::Enum: + { + AZ::Name enumName = AZ::Name(property.second.m_value.GetValue()); + uint32_t enumValue = propertyDescriptor->GetEnumValue(enumName); + if (enumValue == MaterialPropertyDescriptor::InvalidEnumValue) + { + materialAssetCreator.ReportError( + "Enum value '%s' couldn't be found in the 'enumValues' list", enumName.GetCStr()); + } + else + { + materialAssetCreator.SetPropertyValue(propertyId.GetFullName(), enumValue); + } + } + break; + default: + materialAssetCreator.SetPropertyValue(propertyId.GetFullName(), property.second.m_value); + break; + } + } + else + { + materialAssetCreator.ReportWarning( + "Can not find property id '%s' in MaterialPropertyLayout", propertyId.GetFullName().GetStringView().data()); + } + } + } + } + } + } // namespace RPI } // namespace AZ diff --git a/Gems/Atom/RPI/Code/Source/RPI.Edit/Material/MaterialTypeSourceData.cpp b/Gems/Atom/RPI/Code/Source/RPI.Edit/Material/MaterialTypeSourceData.cpp index 08f57c7cd3..d8e6c156be 100644 --- a/Gems/Atom/RPI/Code/Source/RPI.Edit/Material/MaterialTypeSourceData.cpp +++ b/Gems/Atom/RPI/Code/Source/RPI.Edit/Material/MaterialTypeSourceData.cpp @@ -300,48 +300,6 @@ namespace AZ } } - bool MaterialTypeSourceData::ConvertPropertyValueToSourceDataFormat(const PropertyDefinition& propertyDefinition, MaterialPropertyValue& propertyValue) const - { - if (propertyDefinition.m_dataType == AZ::RPI::MaterialPropertyDataType::Enum && propertyValue.Is()) - { - const uint32_t index = propertyValue.GetValue(); - if (index >= propertyDefinition.m_enumValues.size()) - { - AZ_Error("Material source data", false, "Invalid value for material enum property: '%s'.", propertyDefinition.m_name.c_str()); - return false; - } - - propertyValue = propertyDefinition.m_enumValues[index]; - return true; - } - - // Image asset references must be converted from asset IDs to a relative source file path - if (propertyDefinition.m_dataType == AZ::RPI::MaterialPropertyDataType::Image && propertyValue.Is>()) - { - const Data::Asset& imageAsset = propertyValue.GetValue>(); - - Data::AssetInfo imageAssetInfo; - if (imageAsset.GetId().IsValid()) - { - bool result = false; - AZStd::string rootFilePath; - const AZStd::string platformName = ""; // Empty for default - AzToolsFramework::AssetSystemRequestBus::BroadcastResult(result, &AzToolsFramework::AssetSystem::AssetSystemRequest::GetAssetInfoById, - imageAsset.GetId(), imageAsset.GetType(), platformName, imageAssetInfo, rootFilePath); - if (!result) - { - AZ_Error("Material source data", false, "Image asset could not be found for property: '%s'.", propertyDefinition.m_name.c_str()); - return false; - } - } - - propertyValue = imageAssetInfo.m_relativePath; - return true; - } - - return true; - } - Outcome> MaterialTypeSourceData::CreateMaterialTypeAsset(Data::AssetId assetId, AZStd::string_view materialTypeSourceFilePath, bool elevateWarnings) const { MaterialTypeAssetCreator materialTypeAssetCreator; @@ -393,11 +351,12 @@ namespace AZ for (const ShaderVariantReferenceData& shaderRef : m_shaderCollection) { const auto& shaderFile = shaderRef.m_shaderFilePath; - const auto& shaderAsset = AssetUtils::LoadAsset(materialTypeSourceFilePath, shaderFile, 0); + auto shaderAssetResult = AssetUtils::LoadAsset(materialTypeSourceFilePath, shaderFile, 0); - if (shaderAsset) + if (shaderAssetResult) { - auto optionsLayout = shaderAsset.GetValue()->GetShaderOptionGroupLayout(); + auto shaderAsset = shaderAssetResult.GetValue(); + auto optionsLayout = shaderAsset->GetShaderOptionGroupLayout(); ShaderOptionGroup options{ optionsLayout }; for (auto& iter : shaderRef.m_shaderOptionValues) { @@ -408,12 +367,11 @@ namespace AZ } materialTypeAssetCreator.AddShader( - shaderAsset.GetValue(), options.GetShaderVariantId(), - shaderRef.m_shaderTag.IsEmpty() ? Uuid::CreateRandom().ToString() : shaderRef.m_shaderTag - ); + shaderAsset, options.GetShaderVariantId(), + shaderRef.m_shaderTag.IsEmpty() ? Uuid::CreateRandom().ToString() : shaderRef.m_shaderTag); // Gather UV names - const ShaderInputContract& shaderInputContract = shaderAsset.GetValue()->GetInputContract(); + const ShaderInputContract& shaderInputContract = shaderAsset->GetInputContract(); for (const ShaderInputContract::StreamChannelInfo& channel : shaderInputContract.m_streamChannels) { const RHI::ShaderSemantic& semantic = channel.m_semantic; @@ -493,15 +451,20 @@ namespace AZ { case MaterialPropertyDataType::Image: { - Outcome> imageAssetResult = MaterialUtils::GetImageAssetReference(materialTypeSourceFilePath, property.m_value.GetValue()); + Data::Asset imageAsset; - if (imageAssetResult.IsSuccess()) + MaterialUtils::GetImageAssetResult result = MaterialUtils::GetImageAssetReference( + imageAsset, materialTypeSourceFilePath, property.m_value.GetValue()); + + if (result == MaterialUtils::GetImageAssetResult::Missing) { - materialTypeAssetCreator.SetPropertyValue(propertyId.GetFullName(), imageAssetResult.GetValue()); + materialTypeAssetCreator.ReportError( + "Material property '%s': Could not find the image '%s'", propertyId.GetFullName().GetCStr(), + property.m_value.GetValue().data()); } else { - materialTypeAssetCreator.ReportError("Material property '%s': Could not find the image '%s'", propertyId.GetFullName().GetCStr(), property.m_value.GetValue().data()); + materialTypeAssetCreator.SetPropertyValue(propertyId.GetFullName(), imageAsset); } } break; diff --git a/Gems/Atom/RPI/Code/Source/RPI.Edit/Material/MaterialUtils.cpp b/Gems/Atom/RPI/Code/Source/RPI.Edit/Material/MaterialUtils.cpp index 90ce9e66ce..7fff8d81bc 100644 --- a/Gems/Atom/RPI/Code/Source/RPI.Edit/Material/MaterialUtils.cpp +++ b/Gems/Atom/RPI/Code/Source/RPI.Edit/Material/MaterialUtils.cpp @@ -28,25 +28,36 @@ namespace AZ { namespace MaterialUtils { - Outcome> GetImageAssetReference(AZStd::string_view materialSourceFilePath, const AZStd::string imageFilePath) + GetImageAssetResult GetImageAssetReference(Data::Asset& imageAsset, AZStd::string_view materialSourceFilePath, const AZStd::string imageFilePath) { + imageAsset = {}; + if (imageFilePath.empty()) { // The image value was present but specified an empty string, meaning the texture asset should be explicitly cleared. - return AZ::Success(Data::Asset()); + return GetImageAssetResult::Empty; } else { - Outcome imageAssetId = AssetUtils::MakeAssetId(materialSourceFilePath, imageFilePath, StreamingImageAsset::GetImageAssetSubId()); + // We use TraceLevel::None because fallback textures are available and we'll return GetImageAssetResult::Missing below in that case. + // Callers of GetImageAssetReference will be responsible for logging warnings or errors as needed. + + Outcome imageAssetId = AssetUtils::MakeAssetId(materialSourceFilePath, imageFilePath, StreamingImageAsset::GetImageAssetSubId(), AssetUtils::TraceLevel::None); + if (!imageAssetId.IsSuccess()) { - return AZ::Failure(); - } - else - { - Data::Asset unloadedImageAssetReference(imageAssetId.GetValue(), azrtti_typeid(), imageFilePath); - return AZ::Success(unloadedImageAssetReference); + // When the AssetId cannot be found, we don't want to outright fail, because the runtime has mechanisms for displaying fallback textures which gives the + // user a better recovery workflow. On the other hand we can't just provide an empty/invalid Asset because that would be interpreted as simply + // no value was present and result in using no texture, and this would amount to a silent failure. + // So we use a randomly generated (well except for the "BADA55E7" bit ;) UUID which the runtime and tools will interpret as a missing asset and represent + // it as such. + static const Uuid InvalidAssetPlaceholderId = "{BADA55E7-1A1D-4940-B655-9D08679BD62F}"; + imageAsset = Data::Asset{InvalidAssetPlaceholderId, azrtti_typeid(), imageFilePath}; + return GetImageAssetResult::Missing; } + + imageAsset = Data::Asset{imageAssetId.GetValue(), azrtti_typeid(), imageFilePath}; + return GetImageAssetResult::Found; } } diff --git a/Gems/Atom/RPI/Code/Source/RPI.Edit/Shader/ShaderVariantAssetCreator.cpp b/Gems/Atom/RPI/Code/Source/RPI.Edit/Shader/ShaderVariantAssetCreator.cpp index e0e83cfce2..5b32edc0bf 100644 --- a/Gems/Atom/RPI/Code/Source/RPI.Edit/Shader/ShaderVariantAssetCreator.cpp +++ b/Gems/Atom/RPI/Code/Source/RPI.Edit/Shader/ShaderVariantAssetCreator.cpp @@ -92,7 +92,7 @@ namespace AZ ///////////////////////////////////////////////////////////////////// // Methods for all shader variant types - void ShaderVariantAssetCreator::SetBuildTimestamp(AZStd::sys_time_t buildTimestamp) + void ShaderVariantAssetCreator::SetBuildTimestamp(AZ::u64 buildTimestamp) { if (ValidateIsReady()) { diff --git a/Gems/Atom/RPI/Code/Source/RPI.Public/Buffer/Buffer.cpp b/Gems/Atom/RPI/Code/Source/RPI.Public/Buffer/Buffer.cpp index 2d812c602f..47ad7038f8 100644 --- a/Gems/Atom/RPI/Code/Source/RPI.Public/Buffer/Buffer.cpp +++ b/Gems/Atom/RPI/Code/Source/RPI.Public/Buffer/Buffer.cpp @@ -17,7 +17,8 @@ #include #include #include -#include + +AZ_DECLARE_BUDGET(RPI); namespace AZ { @@ -90,7 +91,7 @@ namespace AZ RHI::ResultCode Buffer::Init(BufferAsset& bufferAsset) { - AZ_TRACE_METHOD(); + AZ_PROFILE_FUNCTION(RPI); RHI::ResultCode resultCode = RHI::ResultCode::Fail; @@ -140,7 +141,7 @@ namespace AZ if (bufferAsset.GetBuffer().size() > 0 && !initWithData) { - AZ_TRACE_METHOD_NAME("Stream Upload"); + AZ_PROFILE_SCOPE(RPI, "Stream Upload"); m_streamFence = RHI::Factory::Get().CreateFence(); if (m_streamFence) { diff --git a/Gems/Atom/RPI/Code/Source/RPI.Public/Buffer/BufferSystem.cpp b/Gems/Atom/RPI/Code/Source/RPI.Public/Buffer/BufferSystem.cpp index 77e32cd040..cff9161c7c 100644 --- a/Gems/Atom/RPI/Code/Source/RPI.Public/Buffer/BufferSystem.cpp +++ b/Gems/Atom/RPI/Code/Source/RPI.Public/Buffer/BufferSystem.cpp @@ -16,7 +16,6 @@ #include #include -#include #include #include diff --git a/Gems/Atom/RPI/Code/Source/RPI.Public/Culling.cpp b/Gems/Atom/RPI/Code/Source/RPI.Public/Culling.cpp index ac6b10694e..bd196a2e2b 100644 --- a/Gems/Atom/RPI/Code/Source/RPI.Public/Culling.cpp +++ b/Gems/Atom/RPI/Code/Source/RPI.Public/Culling.cpp @@ -19,10 +19,10 @@ #include #include #include -#include -#include #include #include +#include +#include #include #if AZ_TRAIT_MASKED_OCCLUSION_CULLING_SUPPORTED @@ -34,7 +34,7 @@ //Enables more detailed profiling descriptions within the culling system, but adds some performance overhead. //Enable this to more easily see which jobs are associated with which view. -//#define AZ_CULL_PROFILE_VERBOSE +//#define AZ_CULL_PROFILE_VERBOSE namespace AZ { @@ -43,6 +43,7 @@ namespace AZ AZ_CVAR(bool, r_CullInParallel, true, nullptr, ConsoleFunctorFlags::Null, ""); AZ_CVAR(uint32_t, r_CullWorkPerBatch, 500, nullptr, ConsoleFunctorFlags::Null, ""); +#ifdef AZ_CULL_DEBUG_ENABLED void DebugDrawWorldCoordinateAxes(AuxGeomDraw* auxGeom) { auxGeom->DrawCylinder(Vector3(.5, .0, .0), Vector3(1, 0, 0), 0.02f, 1.0f, Colors::Red, AuxGeomDraw::DrawStyle::Solid, AuxGeomDraw::DepthTest::Off); @@ -198,6 +199,7 @@ namespace AZ AZ_Assert(false, "invalid frustum, cannot draw"); } } +#endif //AZ_CULL_DEBUG_ENABLED CullingDebugContext::~CullingDebugContext() { @@ -265,89 +267,73 @@ namespace AZ return m_visScene->GetEntryCount(); } - class AddObjectsToViewJob final - : public Job + + struct WorklistData { - public: - AZ_CLASS_ALLOCATOR(AddObjectsToViewJob, ThreadPoolAllocator, 0); - - struct JobData - { - CullingDebugContext* m_debugCtx = nullptr; - const Scene* m_scene = nullptr; - View* m_view = nullptr; - Frustum m_frustum; + CullingDebugContext* m_debugCtx = nullptr; + const Scene* m_scene = nullptr; + View* m_view = nullptr; + Frustum m_frustum; #if AZ_TRAIT_MASKED_OCCLUSION_CULLING_SUPPORTED - MaskedOcclusionCulling* m_maskedOcclusionCulling = nullptr; + MaskedOcclusionCulling* m_maskedOcclusionCulling = nullptr; #endif - }; + }; - private: - const AZStd::shared_ptr m_jobData; - CullingScene::WorkListType m_worklist; + static AZStd::shared_ptr MakeWorklistData( + CullingDebugContext& debugCtx, + const Scene& scene, + View& view, + Frustum& frustum, + [[maybe_unused]] void* maskedOcclusionCulling) + { + AZStd::shared_ptr worklistData = AZStd::make_shared(); + worklistData->m_debugCtx = &debugCtx; + worklistData->m_scene = &scene; + worklistData->m_view = &view; + worklistData->m_frustum = frustum; +#if AZ_TRAIT_MASKED_OCCLUSION_CULLING_SUPPORTED + worklistData->m_maskedOcclusionCulling = static_cast(maskedOcclusionCulling); +#endif + return worklistData; + } + + constexpr size_t WorkListCapacity = 5; + using WorkListType = AZStd::fixed_vector; - public: - AddObjectsToViewJob(const AZStd::shared_ptr& jobData, CullingScene::WorkListType& worklist) - : Job(true, nullptr) //auto-deletes, no JobContext - , m_jobData(jobData) - , m_worklist(worklist) +#if AZ_TRAIT_MASKED_OCCLUSION_CULLING_SUPPORTED + static MaskedOcclusionCulling::CullingResult TestOcclusionCulling( + const AZStd::shared_ptr& worklistData, + AzFramework::VisibilityEntry* visibleEntry); +#endif + + static void ProcessWorklist(const AZStd::shared_ptr& worklistData, const WorkListType& worklist) + { + AZ_PROFILE_SCOPE(RPI, "AddObjectsToViewJob: Process"); + + const View::UsageFlags viewFlags = worklistData->m_view->GetUsageFlags(); + const RHI::DrawListMask drawListMask = worklistData->m_view->GetDrawListMask(); + uint32_t numDrawPackets = 0; + uint32_t numVisibleCullables = 0; + + AZ_Assert(worklist.size() > 0, "Received empty worklist in ProcessWorklist"); + + for (const AzFramework::IVisibilityScene::NodeData& nodeData : worklist) { - } - - //work function - void Process() override - { - AZ_PROFILE_SCOPE(RPI, "AddObjectsToViewJob: Process"); - - const View::UsageFlags viewFlags = m_jobData->m_view->GetUsageFlags(); - const RHI::DrawListMask drawListMask = m_jobData->m_view->GetDrawListMask(); - uint32_t numDrawPackets = 0; - uint32_t numVisibleCullables = 0; - - for (const AzFramework::IVisibilityScene::NodeData& nodeData : m_worklist) - { - //If a node is entirely contained within the frustum, then we can skip the fine grained culling. - bool nodeIsContainedInFrustum = ShapeIntersection::Contains(m_jobData->m_frustum, nodeData.m_bounds); + //If a node is entirely contained within the frustum, then we can skip the fine grained culling. + bool nodeIsContainedInFrustum = + !worklistData->m_debugCtx->m_enableFrustumCulling || + ShapeIntersection::Contains(worklistData->m_frustum, nodeData.m_bounds); #ifdef AZ_CULL_PROFILE_VERBOSE - AZ_PROFILE_SCOPE(RPI, "process node (view: %s, skip fine cull: %d", - m_view->GetName().GetCStr(), nodeIsContainedInFrustum ? 1 : 0); + AZ_PROFILE_SCOPE(RPI, "process node (view: %s, skip fine cull: %ds", + worklistData->m_view->GetName().GetCStr(), nodeIsContainedInFrustum ? "true" : "false"); #endif - if (nodeIsContainedInFrustum || !m_jobData->m_debugCtx->m_enableFrustumCulling) + if (nodeIsContainedInFrustum) + { + //Add all objects within this node to the view, without any extra culling + for (AzFramework::VisibilityEntry* visibleEntry : nodeData.m_entries) { - //Add all objects within this node to the view, without any extra culling - for (AzFramework::VisibilityEntry* visibleEntry : nodeData.m_entries) - { - { - if (visibleEntry->m_typeFlags & AzFramework::VisibilityEntry::TYPE_RPI_Cullable) - { - Cullable* c = static_cast(visibleEntry->m_userData); - - if ((c->m_cullData.m_drawListMask & drawListMask).none() || - c->m_cullData.m_hideFlags & viewFlags || - c->m_cullData.m_scene != m_jobData->m_scene || //[GFX_TODO][ATOM-13796] once the IVisibilitySystem supports multiple octree scenes, remove this - c->m_isHidden) - { - continue; - } - -#if AZ_TRAIT_MASKED_OCCLUSION_CULLING_SUPPORTED - if (TestOcclusionCulling(visibleEntry) == MaskedOcclusionCulling::CullingResult::VISIBLE) -#endif - { - numDrawPackets += AddLodDataToView(c->m_cullData.m_boundingSphere.GetCenter(), c->m_lodData, *m_jobData->m_view); - ++numVisibleCullables; - c->m_isVisible = true; - } - } - } - } - } - else - { - //Do fine-grained culling before adding objects to the view - for (AzFramework::VisibilityEntry* visibleEntry : nodeData.m_entries) { if (visibleEntry->m_typeFlags & AzFramework::VisibilityEntry::TYPE_RPI_Cullable) { @@ -355,160 +341,200 @@ namespace AZ if ((c->m_cullData.m_drawListMask & drawListMask).none() || c->m_cullData.m_hideFlags & viewFlags || - c->m_cullData.m_scene != m_jobData->m_scene || //[GFX_TODO][ATOM-13796] once the IVisibilitySystem supports multiple octree scenes, remove this + c->m_cullData.m_scene != worklistData->m_scene || //[GFX_TODO][ATOM-13796] once the IVisibilitySystem supports multiple octree scenes, remove this c->m_isHidden) { continue; } - IntersectResult res = ShapeIntersection::Classify(m_jobData->m_frustum, c->m_cullData.m_boundingSphere); - if (res == IntersectResult::Exterior) - { - continue; - } - else if (res == IntersectResult::Interior || ShapeIntersection::Overlaps(m_jobData->m_frustum, c->m_cullData.m_boundingObb)) - { #if AZ_TRAIT_MASKED_OCCLUSION_CULLING_SUPPORTED - if (TestOcclusionCulling(visibleEntry) == MaskedOcclusionCulling::CullingResult::VISIBLE) + if (TestOcclusionCulling(worklistData, visibleEntry) == MaskedOcclusionCulling::CullingResult::VISIBLE) #endif - { - numDrawPackets += AddLodDataToView(c->m_cullData.m_boundingSphere.GetCenter(), c->m_lodData, *m_jobData->m_view); - ++numVisibleCullables; - c->m_isVisible = true; - } - } - } - } - } - - if (m_jobData->m_debugCtx->m_debugDraw && (m_jobData->m_view->GetName() == m_jobData->m_debugCtx->m_currentViewSelectionName)) - { - AZ_PROFILE_SCOPE(RPI, "debug draw culling"); - - AuxGeomDrawPtr auxGeomPtr = AuxGeomFeatureProcessorInterface::GetDrawQueueForScene(m_jobData->m_scene); - if (auxGeomPtr) - { - //Draw the node bounds - // "Fully visible" nodes are nodes that are fully inside the frustum. "Partially visible" nodes intersect the edges of the frustum. - // Since the nodes of an octree have lots of overlapping boxes with coplanar edges, it's easier to view these separately, so - // we have a few debug booleans to toggle which ones to draw. - if (nodeIsContainedInFrustum && m_jobData->m_debugCtx->m_drawFullyVisibleNodes) - { - auxGeomPtr->DrawAabb(nodeData.m_bounds, Colors::Lime, RPI::AuxGeomDraw::DrawStyle::Line, RPI::AuxGeomDraw::DepthTest::Off); - } - else if (!nodeIsContainedInFrustum && m_jobData->m_debugCtx->m_drawPartiallyVisibleNodes) - { - auxGeomPtr->DrawAabb(nodeData.m_bounds, Colors::Yellow, RPI::AuxGeomDraw::DrawStyle::Line, RPI::AuxGeomDraw::DepthTest::Off); - } - - //Draw bounds on individual objects - if (m_jobData->m_debugCtx->m_drawBoundingBoxes || m_jobData->m_debugCtx->m_drawBoundingSpheres || m_jobData->m_debugCtx->m_drawLodRadii) - { - for (AzFramework::VisibilityEntry* visibleEntry : nodeData.m_entries) { - if (visibleEntry->m_typeFlags & AzFramework::VisibilityEntry::TYPE_RPI_Cullable) + numDrawPackets += AddLodDataToView(c->m_cullData.m_boundingSphere.GetCenter(), c->m_lodData, *worklistData->m_view); + ++numVisibleCullables; + c->m_isVisible = true; + } + } + } + } + } + else + { + //Do fine-grained culling before adding objects to the view + for (AzFramework::VisibilityEntry* visibleEntry : nodeData.m_entries) + { + if (visibleEntry->m_typeFlags & AzFramework::VisibilityEntry::TYPE_RPI_Cullable) + { + Cullable* c = static_cast(visibleEntry->m_userData); + + if ((c->m_cullData.m_drawListMask & drawListMask).none() || + c->m_cullData.m_hideFlags & viewFlags || + c->m_cullData.m_scene != worklistData->m_scene || //[GFX_TODO][ATOM-13796] once the IVisibilitySystem supports multiple octree scenes, remove this + c->m_isHidden) + { + continue; + } + + IntersectResult res = ShapeIntersection::Classify(worklistData->m_frustum, c->m_cullData.m_boundingSphere); + if (res == IntersectResult::Exterior) + { + continue; + } + else if (res == IntersectResult::Interior || ShapeIntersection::Overlaps(worklistData->m_frustum, c->m_cullData.m_boundingObb)) + { +#if AZ_TRAIT_MASKED_OCCLUSION_CULLING_SUPPORTED + if (TestOcclusionCulling(worklistData, visibleEntry) == MaskedOcclusionCulling::CullingResult::VISIBLE) +#endif + { + numDrawPackets += AddLodDataToView(c->m_cullData.m_boundingSphere.GetCenter(), c->m_lodData, *worklistData->m_view); + ++numVisibleCullables; + c->m_isVisible = true; + } + } + } + } + } +#ifdef AZ_CULL_DEBUG_ENABLED + if (worklistData->m_debugCtx->m_debugDraw && (worklistData->m_view->GetName() == worklistData->m_debugCtx->m_currentViewSelectionName)) + { + AZ_PROFILE_SCOPE(RPI, "debug draw culling"); + + AuxGeomDrawPtr auxGeomPtr = AuxGeomFeatureProcessorInterface::GetDrawQueueForScene(worklistData->m_scene); + if (auxGeomPtr) + { + //Draw the node bounds + // "Fully visible" nodes are nodes that are fully inside the frustum. "Partially visible" nodes intersect the edges of the frustum. + // Since the nodes of an octree have lots of overlapping boxes with coplanar edges, it's easier to view these separately, so + // we have a few debug booleans to toggle which ones to draw. + if (nodeIsContainedInFrustum && worklistData->m_debugCtx->m_drawFullyVisibleNodes) + { + auxGeomPtr->DrawAabb(nodeData.m_bounds, Colors::Lime, RPI::AuxGeomDraw::DrawStyle::Line, RPI::AuxGeomDraw::DepthTest::Off); + } + else if (!nodeIsContainedInFrustum && worklistData->m_debugCtx->m_drawPartiallyVisibleNodes) + { + auxGeomPtr->DrawAabb(nodeData.m_bounds, Colors::Yellow, RPI::AuxGeomDraw::DrawStyle::Line, RPI::AuxGeomDraw::DepthTest::Off); + } + + //Draw bounds on individual objects + if (worklistData->m_debugCtx->m_drawBoundingBoxes || worklistData->m_debugCtx->m_drawBoundingSpheres || worklistData->m_debugCtx->m_drawLodRadii) + { + for (AzFramework::VisibilityEntry* visibleEntry : nodeData.m_entries) + { + if (visibleEntry->m_typeFlags & AzFramework::VisibilityEntry::TYPE_RPI_Cullable) + { + Cullable* c = static_cast(visibleEntry->m_userData); + if (worklistData->m_debugCtx->m_drawBoundingBoxes) { - Cullable* c = static_cast(visibleEntry->m_userData); - if (m_jobData->m_debugCtx->m_drawBoundingBoxes) - { - auxGeomPtr->DrawObb(c->m_cullData.m_boundingObb, Matrix3x4::Identity(), - nodeIsContainedInFrustum ? Colors::Lime : Colors::Yellow, AuxGeomDraw::DrawStyle::Line); - } + auxGeomPtr->DrawObb(c->m_cullData.m_boundingObb, Matrix3x4::Identity(), + nodeIsContainedInFrustum ? Colors::Lime : Colors::Yellow, AuxGeomDraw::DrawStyle::Line); + } - if (m_jobData->m_debugCtx->m_drawBoundingSpheres) - { - auxGeomPtr->DrawSphere(c->m_cullData.m_boundingSphere.GetCenter(), c->m_cullData.m_boundingSphere.GetRadius(), - Color(0.5f, 0.5f, 0.5f, 0.3f), AuxGeomDraw::DrawStyle::Shaded); - } + if (worklistData->m_debugCtx->m_drawBoundingSpheres) + { + auxGeomPtr->DrawSphere(c->m_cullData.m_boundingSphere.GetCenter(), c->m_cullData.m_boundingSphere.GetRadius(), + Color(0.5f, 0.5f, 0.5f, 0.3f), AuxGeomDraw::DrawStyle::Shaded); + } - if (m_jobData->m_debugCtx->m_drawLodRadii) - { - auxGeomPtr->DrawSphere(c->m_cullData.m_boundingSphere.GetCenter(), - c->m_lodData.m_lodSelectionRadius, - Color(1.0f, 0.5f, 0.0f, 0.3f), RPI::AuxGeomDraw::DrawStyle::Shaded); - } + if (worklistData->m_debugCtx->m_drawLodRadii) + { + auxGeomPtr->DrawSphere(c->m_cullData.m_boundingSphere.GetCenter(), + c->m_lodData.m_lodSelectionRadius, + Color(1.0f, 0.5f, 0.0f, 0.3f), RPI::AuxGeomDraw::DrawStyle::Shaded); } } } } } } - - if (m_jobData->m_debugCtx->m_enableStats) - { - CullingDebugContext::CullStats& cullStats = m_jobData->m_debugCtx->GetCullStatsForView(m_jobData->m_view); - - //no need for mutex here since these are all atomics - cullStats.m_numVisibleDrawPackets += numDrawPackets; - cullStats.m_numVisibleCullables += numVisibleCullables; - ++cullStats.m_numJobs; - } +#endif } -#if AZ_TRAIT_MASKED_OCCLUSION_CULLING_SUPPORTED - MaskedOcclusionCulling::CullingResult TestOcclusionCulling(AzFramework::VisibilityEntry* visibleEntry) +#ifdef AZ_CULL_DEBUG_ENABLED + if (worklistData->m_debugCtx->m_enableStats) { - if (!m_jobData->m_maskedOcclusionCulling) - { - return MaskedOcclusionCulling::CullingResult::VISIBLE; - } + CullingDebugContext::CullStats& cullStats = worklistData->m_debugCtx->GetCullStatsForView(worklistData->m_view); - if (visibleEntry->m_boundingVolume.Contains(m_jobData->m_view->GetCameraTransform().GetTranslation())) - { - // camera is inside bounding volume - return MaskedOcclusionCulling::CullingResult::VISIBLE; - } + //no need for mutex here since these are all atomics + cullStats.m_numVisibleDrawPackets += numDrawPackets; + cullStats.m_numVisibleCullables += numVisibleCullables; + ++cullStats.m_numJobs; + } +#endif //AZ_CULL_DEBUG_ENABLED + } - const Vector3& minBound = visibleEntry->m_boundingVolume.GetMin(); - const Vector3& maxBound = visibleEntry->m_boundingVolume.GetMax(); +#if AZ_TRAIT_MASKED_OCCLUSION_CULLING_SUPPORTED + static MaskedOcclusionCulling::CullingResult TestOcclusionCulling( + const AZStd::shared_ptr& worklistData, + AzFramework::VisibilityEntry* visibleEntry) + { + if (!worklistData->m_maskedOcclusionCulling) + { + return MaskedOcclusionCulling::CullingResult::VISIBLE; + } - // compute bounding volume corners - Vector4 corners[8]; - corners[0] = m_jobData->m_view->GetWorldToClipMatrix() * Vector4(minBound.GetX(), minBound.GetY(), minBound.GetZ(), 1.0f); - corners[1] = m_jobData->m_view->GetWorldToClipMatrix() * Vector4(minBound.GetX(), minBound.GetY(), maxBound.GetZ(), 1.0f); - corners[2] = m_jobData->m_view->GetWorldToClipMatrix() * Vector4(maxBound.GetX(), minBound.GetY(), maxBound.GetZ(), 1.0f); - corners[3] = m_jobData->m_view->GetWorldToClipMatrix() * Vector4(maxBound.GetX(), minBound.GetY(), minBound.GetZ(), 1.0f); - corners[4] = m_jobData->m_view->GetWorldToClipMatrix() * Vector4(minBound.GetX(), maxBound.GetY(), minBound.GetZ(), 1.0f); - corners[5] = m_jobData->m_view->GetWorldToClipMatrix() * Vector4(minBound.GetX(), maxBound.GetY(), maxBound.GetZ(), 1.0f); - corners[6] = m_jobData->m_view->GetWorldToClipMatrix() * Vector4(maxBound.GetX(), maxBound.GetY(), maxBound.GetZ(), 1.0f); - corners[7] = m_jobData->m_view->GetWorldToClipMatrix() * Vector4(maxBound.GetX(), maxBound.GetY(), minBound.GetZ(), 1.0f); +#ifdef AZ_CULL_PROFILE_VERBOSE + AZ_PROFILE_SCOPE(RPI, "TestOcclusionCulling"); +#endif - // find min clip-space depth and NDC min/max - float minDepth = FLT_MAX; - float ndcMinX = FLT_MAX; - float ndcMinY = FLT_MAX; - float ndcMaxX = -FLT_MAX; - float ndcMaxY = -FLT_MAX; - for (uint32_t index = 0; index < 8; ++index) - { - minDepth = AZStd::min(minDepth, corners[index].GetW()); + if (visibleEntry->m_boundingVolume.Contains(worklistData->m_view->GetCameraTransform().GetTranslation())) + { + // camera is inside bounding volume + return MaskedOcclusionCulling::CullingResult::VISIBLE; + } - // convert to NDC - corners[index] /= corners[index].GetW(); + const Vector3& minBound = visibleEntry->m_boundingVolume.GetMin(); + const Vector3& maxBound = visibleEntry->m_boundingVolume.GetMax(); - ndcMinX = AZStd::min(ndcMinX, corners[index].GetX()); - ndcMinY = AZStd::min(ndcMinY, corners[index].GetY()); - ndcMaxX = AZStd::max(ndcMaxX, corners[index].GetX()); - ndcMaxY = AZStd::max(ndcMaxY, corners[index].GetY()); - } + // compute bounding volume corners + Vector4 corners[8]; + corners[0] = worklistData->m_view->GetWorldToClipMatrix() * Vector4(minBound.GetX(), minBound.GetY(), minBound.GetZ(), 1.0f); + corners[1] = worklistData->m_view->GetWorldToClipMatrix() * Vector4(minBound.GetX(), minBound.GetY(), maxBound.GetZ(), 1.0f); + corners[2] = worklistData->m_view->GetWorldToClipMatrix() * Vector4(maxBound.GetX(), minBound.GetY(), maxBound.GetZ(), 1.0f); + corners[3] = worklistData->m_view->GetWorldToClipMatrix() * Vector4(maxBound.GetX(), minBound.GetY(), minBound.GetZ(), 1.0f); + corners[4] = worklistData->m_view->GetWorldToClipMatrix() * Vector4(minBound.GetX(), maxBound.GetY(), minBound.GetZ(), 1.0f); + corners[5] = worklistData->m_view->GetWorldToClipMatrix() * Vector4(minBound.GetX(), maxBound.GetY(), maxBound.GetZ(), 1.0f); + corners[6] = worklistData->m_view->GetWorldToClipMatrix() * Vector4(maxBound.GetX(), maxBound.GetY(), maxBound.GetZ(), 1.0f); + corners[7] = worklistData->m_view->GetWorldToClipMatrix() * Vector4(maxBound.GetX(), maxBound.GetY(), minBound.GetZ(), 1.0f); + // find min clip-space depth and NDC min/max + float minDepth = FLT_MAX; + float ndcMinX = FLT_MAX; + float ndcMinY = FLT_MAX; + float ndcMaxX = -FLT_MAX; + float ndcMaxY = -FLT_MAX; + for (uint32_t index = 0; index < 8; ++index) + { + minDepth = AZStd::min(minDepth, corners[index].GetW()); if (minDepth < 0.00000001f) { - return MaskedOcclusionCulling::VISIBLE; + return MaskedOcclusionCulling::CullingResult::VISIBLE; } - // test against the occlusion buffer, which contains only the manually placed occlusion planes - return m_jobData->m_maskedOcclusionCulling->TestRect(ndcMinX, ndcMinY, ndcMaxX, ndcMaxY, minDepth); + + // convert to NDC + corners[index] /= corners[index].GetW(); + + ndcMinX = AZStd::min(ndcMinX, corners[index].GetX()); + ndcMinY = AZStd::min(ndcMinY, corners[index].GetY()); + ndcMaxX = AZStd::max(ndcMaxX, corners[index].GetX()); + ndcMaxY = AZStd::max(ndcMaxY, corners[index].GetY()); } + + // test against the occlusion buffer, which contains only the manually placed occlusion planes + return worklistData->m_maskedOcclusionCulling->TestRect(ndcMinX, ndcMinY, ndcMaxX, ndcMaxY, minDepth); + } #endif - }; - void CullingScene::ProcessCullables(const Scene& scene, View& view, AZ::Job& parentJob) + void CullingScene::ProcessCullablesCommon( + const Scene& scene [[maybe_unused]], + View& view, + AZ::Frustum& frustum [[maybe_unused]], + void*& maskedOcclusionCulling [[maybe_unused]]) { - AZ_PROFILE_SCOPE(RPI, "CullingScene::ProcessCullables() - %s", view.GetName().GetCStr()); + AZ_PROFILE_SCOPE(RPI, "CullingScene::ProcessCullablesCommon() - %s", view.GetName().GetCStr()); - const Matrix4x4& worldToClip = view.GetWorldToClipMatrix(); - Frustum frustum = Frustum::CreateFromMatrixColumnMajor(worldToClip); +#ifdef AZ_CULL_DEBUG_ENABLED if (m_debugCtx.m_freezeFrustums) { AZStd::lock_guard lock(m_debugCtx.m_frozenFrustumsMutex); @@ -533,10 +559,10 @@ namespace AZ CullingDebugContext::CullStats& cullStats = m_debugCtx.GetCullStatsForView(&view); cullStats.m_cameraViewToWorld = view.GetViewToWorldMatrix(); } - +#endif //AZ_CULL_DEBUG_ENABLED #if AZ_TRAIT_MASKED_OCCLUSION_CULLING_SUPPORTED // setup occlusion culling, if necessary - MaskedOcclusionCulling* maskedOcclusionCulling = m_occlusionPlanes.empty() ? nullptr : view.GetMaskedOcclusionCulling(); + maskedOcclusionCulling = m_occlusionPlanes.empty() ? nullptr : view.GetMaskedOcclusionCulling(); if (maskedOcclusionCulling) { // frustum cull occlusion planes @@ -578,23 +604,27 @@ namespace AZ static uint32_t indices[6] = { 0, 1, 2, 2, 3, 0 }; // render into the occlusion buffer, specifying BACKFACE_NONE so it functions as a double-sided occluder - maskedOcclusionCulling->RenderTriangles((float*)verts, indices, 2, nullptr, MaskedOcclusionCulling::BACKFACE_NONE); + static_cast(maskedOcclusionCulling)->RenderTriangles(verts, indices, 2, nullptr, MaskedOcclusionCulling::BACKFACE_NONE); } } #endif + } + + void CullingScene::ProcessCullablesJobs(const Scene& scene, View& view, AZ::Job& parentJob) + { + AZ_PROFILE_SCOPE(RPI, "CullingScene::ProcessCullablesJobs() - %s", view.GetName().GetCStr()); + + const Matrix4x4& worldToClip = view.GetWorldToClipMatrix(); + AZ::Frustum frustum = Frustum::CreateFromMatrixColumnMajor(worldToClip); + + void* maskedOcclusionCulling = nullptr; + ProcessCullablesCommon(scene, view, frustum, maskedOcclusionCulling); WorkListType worklist; - AZStd::shared_ptr jobData = AZStd::make_shared(); - jobData->m_debugCtx = &m_debugCtx; - jobData->m_scene = &scene; - jobData->m_view = &view; - jobData->m_frustum = frustum; -#if AZ_TRAIT_MASKED_OCCLUSION_CULLING_SUPPORTED - jobData->m_maskedOcclusionCulling = maskedOcclusionCulling; -#endif + AZStd::shared_ptr worklistData = MakeWorklistData(m_debugCtx, scene, view, frustum, maskedOcclusionCulling); - auto nodeVisitorLambda = [jobData, &parentJob, &worklist](const AzFramework::IVisibilityScene::NodeData& nodeData) -> void + auto nodeVisitorLambda = [worklistData, &parentJob, &worklist](const AzFramework::IVisibilityScene::NodeData& nodeData) -> void { AZ_PROFILE_SCOPE(RPI, "nodeVisitorLambda()"); AZ_Assert(nodeData.m_entries.size() > 0, "should not get called with 0 entries"); @@ -606,8 +636,13 @@ namespace AZ if (worklist.size() == worklist.capacity()) { + // capture worklistData & worklist by value + auto processWorklist = [worklistData, worklist]() + { + ProcessWorklist(worklistData, worklist); + }; //Kick off a job to process the (full) worklist - AddObjectsToViewJob* job = aznew AddObjectsToViewJob(jobData, worklist); //pool allocated (cheap), auto-deletes when job finishes + AZ::Job* job = AZ::CreateJobFunction(processWorklist, true); worklist.clear(); parentJob.SetContinuation(job); job->Start(); @@ -616,7 +651,7 @@ namespace AZ if (m_debugCtx.m_enableFrustumCulling) { - m_visScene->Enumerate(frustum, nodeVisitorLambda); + m_visScene->Enumerate(frustum, nodeVisitorLambda); } else { @@ -625,21 +660,76 @@ namespace AZ if (worklist.size() > 0) { - AZStd::shared_ptr remainingJobData = AZStd::make_shared(); - remainingJobData->m_debugCtx = &m_debugCtx; - remainingJobData->m_scene = &scene; - remainingJobData->m_view = &view; - remainingJobData->m_frustum = frustum; -#if AZ_TRAIT_MASKED_OCCLUSION_CULLING_SUPPORTED - remainingJobData->m_maskedOcclusionCulling = maskedOcclusionCulling; -#endif - //Kick off a job to process any remaining workitems - AddObjectsToViewJob* job = aznew AddObjectsToViewJob(remainingJobData, worklist); //pool allocated (cheap), auto-deletes when job finishes + // capture worklistData & worklist by value + auto processWorklist = [worklistData, worklist]() + { + ProcessWorklist(worklistData, worklist); + }; + //Kick off a job to process the (full) worklist + AZ::Job* job = AZ::CreateJobFunction(processWorklist, true); parentJob.SetContinuation(job); job->Start(); } } + void CullingScene::ProcessCullablesTG(const Scene& scene, View& view, AZ::TaskGraph& taskGraph) + { + AZ_PROFILE_SCOPE(RPI, "CullingScene::ProcessCullablesTG() - %s", view.GetName().GetCStr()); + + const Matrix4x4& worldToClip = view.GetWorldToClipMatrix(); + AZ::Frustum frustum = Frustum::CreateFromMatrixColumnMajor(worldToClip); + + void* maskedOcclusionCulling = nullptr; + ProcessCullablesCommon(scene, view, frustum, maskedOcclusionCulling); + + AZStd::unique_ptr worklist = AZStd::make_unique(); + + AZStd::shared_ptr worklistData = MakeWorklistData(m_debugCtx, scene, view, frustum, maskedOcclusionCulling); + static const AZ::TaskDescriptor descriptor{ "AZ::RPI::ProcessWorklist", "Graphics" }; + + auto nodeVisitorLambda = [worklistData, &taskGraph, &worklist](const AzFramework::IVisibilityScene::NodeData& nodeData) -> void + { + AZ_PROFILE_SCOPE(RPI, "nodeVisitorLambda()"); + AZ_Assert(nodeData.m_entries.size() > 0, "should not get called with 0 entries"); + AZ_Assert(worklist->size() < worklist->capacity(), "we should always have room to push a node on the queue"); + + //Queue up a small list of work items (NodeData*) which will be pushed to a worker task once the queue is full. + //This reduces the number of tasks in flight, reducing task-system overhead. + worklist->emplace_back(AZStd::move(nodeData)); + + if (worklist->size() == worklist->capacity()) + { + //Task takes ownership of the worklist unique ptr + taskGraph.AddTask( descriptor, [worklistData, worklist = AZStd::move(worklist)]() + { + ProcessWorklist(worklistData, *worklist.get()); + // allow worklist to go out of scope and be deleted + }); + worklist = AZStd::make_unique(); + } + }; + + if (m_debugCtx.m_enableFrustumCulling) + { + m_visScene->Enumerate(frustum, nodeVisitorLambda); + } + else + { + m_visScene->EnumerateNoCull(nodeVisitorLambda); + } + + if (worklist->size() > 0) + { + //Task takes ownership of the worklist unique ptr + taskGraph.AddTask( descriptor, [worklistData, worklist = AZStd::move(worklist)]() + { + ProcessWorklist(worklistData, *worklist.get()); + // allow worklist to go out of scope and be deleted + }); + } + } + + uint32_t AddLodDataToView(const Vector3& pos, const Cullable::LodData& lodData, RPI::View& view) { #ifdef AZ_CULL_PROFILE_DETAILED @@ -702,6 +792,8 @@ namespace AZ AZ::Name visSceneName(AZStd::string::format("RenderCullScene[%s]", m_parentScene->GetName().GetCStr())); m_visScene = AZ::Interface::Get()->CreateVisibilityScene(visSceneName); + m_taskGraphActive = AZ::Interface::Get(); + #ifdef AZ_CULL_DEBUG_ENABLED AZ_Assert(CountObjectsInScene() == 0, "The culling system should start with 0 entries in this scene."); #endif @@ -719,19 +811,35 @@ namespace AZ } } - void CullingScene::BeginCulling(const AZStd::vector& views) + void CullingScene::BeginCullingTaskGraph(const AZStd::vector& views) { - AZ_PROFILE_SCOPE(RPI, "CullingScene: BeginCulling"); - m_cullDataConcurrencyCheck.soft_lock(); + AZ::TaskGraph taskGraph; + AZ::TaskDescriptor beginCullingDescriptor{"RPI_CullingScene_BeginCullingView", "Graphics"}; + for (auto& view : views) + { + taskGraph.AddTask( + beginCullingDescriptor, + [&view]() + { + AZ_PROFILE_SCOPE(RPI, "CullingScene: BeginCullingTaskGraph"); + view->BeginCulling(); + }); + } - m_debugCtx.ResetCullStats(); - m_debugCtx.m_numCullablesInScene = GetNumCullables(); + AZ::TaskGraphEvent waitForCompletion; + taskGraph.Submit(&waitForCompletion); + waitForCompletion.Wait(); + } + + void CullingScene::BeginCullingJobs(const AZStd::vector& views) + { AZ::JobCompletion beginCullingCompletion; for (auto& view : views) { const auto cullingLambda = [&view]() { + AZ_PROFILE_SCOPE(RPI, "CullingScene: BeginCullingJob"); view->BeginCulling(); }; @@ -741,7 +849,32 @@ namespace AZ } beginCullingCompletion.StartAndWaitForCompletion(); + } + void CullingScene::BeginCulling(const AZStd::vector& views) + { + AZ_PROFILE_SCOPE(RPI, "CullingScene: BeginCulling"); + m_cullDataConcurrencyCheck.soft_lock(); + + m_debugCtx.ResetCullStats(); + m_debugCtx.m_numCullablesInScene = GetNumCullables(); + + m_taskGraphActive = AZ::Interface::Get(); + + if(views.size() == 1) // avoid job overhead when only 1 job + { + views[0]->BeginCulling(); + } + else if (m_taskGraphActive && m_taskGraphActive->IsTaskGraphActive()) + { + BeginCullingTaskGraph(views); + } + else + { + BeginCullingJobs(views); + } + +#ifdef AZ_CULL_DEBUG_ENABLED AuxGeomDrawPtr auxGeom; if (m_debugCtx.m_debugDraw) { @@ -774,6 +907,7 @@ namespace AZ m_debugCtx.m_frozenFrustums.clear(); } } +#endif } void CullingScene::EndCulling() diff --git a/Gems/Atom/RPI/Code/Source/RPI.Public/DynamicDraw/DynamicDrawContext.cpp b/Gems/Atom/RPI/Code/Source/RPI.Public/DynamicDraw/DynamicDrawContext.cpp index 3b3473a2da..47791d3002 100644 --- a/Gems/Atom/RPI/Code/Source/RPI.Public/DynamicDraw/DynamicDrawContext.cpp +++ b/Gems/Atom/RPI/Code/Source/RPI.Public/DynamicDraw/DynamicDrawContext.cpp @@ -141,6 +141,7 @@ namespace AZ void DynamicDrawContext::InitVertexFormat(const AZStd::vector& vertexChannels) { AZ_Assert(!m_initialized, "Can't call InitVertexFormat after context was initialized (EndInit was called)"); + AZ_Assert(m_pipelineState, "Can't call InitVertexFormat before InitShader is called with a valid shader"); m_perVertexDataSize = 0; RHI::InputStreamLayoutBuilder layoutBuilder; @@ -150,7 +151,10 @@ namespace AZ bufferBuilder->Channel(channel.m_channel, channel.m_format); m_perVertexDataSize += RHI::GetFormatSize(channel.m_format); } - m_pipelineState->InputStreamLayout() = layoutBuilder.End(); + if (m_pipelineState) + { + m_pipelineState->InputStreamLayout() = layoutBuilder.End(); + } } void DynamicDrawContext::InitDrawListTag(RHI::DrawListTag drawListTag) diff --git a/Gems/Atom/RPI/Code/Source/RPI.Public/Image/ImageSystem.cpp b/Gems/Atom/RPI/Code/Source/RPI.Public/Image/ImageSystem.cpp index f201e8414c..2c85f85424 100644 --- a/Gems/Atom/RPI/Code/Source/RPI.Public/Image/ImageSystem.cpp +++ b/Gems/Atom/RPI/Code/Source/RPI.Public/Image/ImageSystem.cpp @@ -27,7 +27,6 @@ #include -#include #include #include #include diff --git a/Gems/Atom/RPI/Code/Source/RPI.Public/Image/StreamingImage.cpp b/Gems/Atom/RPI/Code/Source/RPI.Public/Image/StreamingImage.cpp index 8629588ea2..fb03d109a2 100644 --- a/Gems/Atom/RPI/Code/Source/RPI.Public/Image/StreamingImage.cpp +++ b/Gems/Atom/RPI/Code/Source/RPI.Public/Image/StreamingImage.cpp @@ -16,12 +16,13 @@ #include -#include #include // Enable this define to debug output streaming image initialization and expanding process. //#define AZ_RPI_STREAMING_IMAGE_DEBUG_LOG +AZ_DECLARE_BUDGET(RPI); + namespace AZ { namespace RPI @@ -111,7 +112,7 @@ namespace AZ RHI::ResultCode StreamingImage::Init(StreamingImageAsset& imageAsset) { - AZ_TRACE_METHOD(); + AZ_PROFILE_FUNCTION(RPI); Data::Instance pool; if (imageAsset.GetPoolAssetId().IsValid()) diff --git a/Gems/Atom/RPI/Code/Source/RPI.Public/Image/StreamingImageController.cpp b/Gems/Atom/RPI/Code/Source/RPI.Public/Image/StreamingImageController.cpp index a84d8ca9b7..bb7fff03cb 100644 --- a/Gems/Atom/RPI/Code/Source/RPI.Public/Image/StreamingImageController.cpp +++ b/Gems/Atom/RPI/Code/Source/RPI.Public/Image/StreamingImageController.cpp @@ -12,9 +12,10 @@ #include -#include #include +AZ_DECLARE_BUDGET(RPI); + namespace AZ { namespace RPI @@ -34,7 +35,7 @@ namespace AZ void StreamingImageController::AttachImage(StreamingImage* image) { - AZ_TRACE_METHOD(); + AZ_PROFILE_FUNCTION(RPI); AZ_Assert(image, "Image must not be null"); @@ -69,7 +70,7 @@ namespace AZ void StreamingImageController::Update() { - AZ_TRACE_METHOD(); + AZ_PROFILE_FUNCTION(RPI); AZStd::lock_guard lock(m_mutex); UpdateInternal(m_timestamp, m_contexts); diff --git a/Gems/Atom/RPI/Code/Source/RPI.Public/Image/StreamingImagePool.cpp b/Gems/Atom/RPI/Code/Source/RPI.Public/Image/StreamingImagePool.cpp index 5c05422dad..23ff1abb42 100644 --- a/Gems/Atom/RPI/Code/Source/RPI.Public/Image/StreamingImagePool.cpp +++ b/Gems/Atom/RPI/Code/Source/RPI.Public/Image/StreamingImagePool.cpp @@ -14,7 +14,6 @@ #include -#include #include namespace AZ @@ -43,7 +42,7 @@ namespace AZ RHI::ResultCode StreamingImagePool::Init(RHI::Device& device, StreamingImagePoolAsset& poolAsset) { - AZ_TRACE_METHOD(); + AZ_PROFILE_FUNCTION(RPI); if (Validation::IsEnabled()) { diff --git a/Gems/Atom/RPI/Code/Source/RPI.Public/Material/Material.cpp b/Gems/Atom/RPI/Code/Source/RPI.Public/Material/Material.cpp index 050ae47749..1f739c24f1 100644 --- a/Gems/Atom/RPI/Code/Source/RPI.Public/Material/Material.cpp +++ b/Gems/Atom/RPI/Code/Source/RPI.Public/Material/Material.cpp @@ -18,7 +18,6 @@ #include #include -#include #include #include @@ -57,7 +56,7 @@ namespace AZ RHI::ResultCode Material::Init(MaterialAsset& materialAsset) { - AZ_TRACE_METHOD(); + AZ_PROFILE_FUNCTION(RPI); ScopedValue isInitializing(&m_isInitializing, true, false); @@ -234,7 +233,7 @@ namespace AZ { ShaderReloadDebugTracker::ScopedSection reloadSection("{%p}->Material::OnAssetReloaded %s", this, asset.GetHint().c_str()); - Data::Asset newMaterialAsset = { asset.GetAs(), AZ::Data::AssetLoadBehavior::PreLoad }; + Data::Asset newMaterialAsset = Data::static_pointer_cast(asset); if (newMaterialAsset) { @@ -320,7 +319,7 @@ namespace AZ bool Material::Compile() { - AZ_TRACE_METHOD(); + AZ_PROFILE_FUNCTION(RPI); if (NeedsCompile() && CanCompile()) { @@ -610,7 +609,7 @@ namespace AZ } } - if (Data::Asset streamingImageAsset = { imageAsset.GetAs(), AZ::Data::AssetLoadBehavior::PreLoad }) + if (Data::Asset streamingImageAsset = Data::static_pointer_cast(imageAsset)) { Data::Instance image = StreamingImage::FindOrCreate(streamingImageAsset); if (!image) diff --git a/Gems/Atom/RPI/Code/Source/RPI.Public/Model/Model.cpp b/Gems/Atom/RPI/Code/Source/RPI.Public/Model/Model.cpp index 6549255d7e..4f3cf52dad 100644 --- a/Gems/Atom/RPI/Code/Source/RPI.Public/Model/Model.cpp +++ b/Gems/Atom/RPI/Code/Source/RPI.Public/Model/Model.cpp @@ -11,7 +11,6 @@ #include -#include #include #include #include diff --git a/Gems/Atom/RPI/Code/Source/RPI.Public/Model/ModelLod.cpp b/Gems/Atom/RPI/Code/Source/RPI.Public/Model/ModelLod.cpp index 7850aa6da2..a928aec12f 100644 --- a/Gems/Atom/RPI/Code/Source/RPI.Public/Model/ModelLod.cpp +++ b/Gems/Atom/RPI/Code/Source/RPI.Public/Model/ModelLod.cpp @@ -12,7 +12,6 @@ #include #include -#include #include namespace AZ @@ -52,7 +51,7 @@ namespace AZ RHI::ResultCode ModelLod::Init(const Data::Asset& lodAsset, const Data::Asset& modelAsset) { - AZ_TRACE_METHOD(); + AZ_PROFILE_FUNCTION(RPI); for (const ModelLodAsset::Mesh& mesh : lodAsset->GetMeshes()) { @@ -389,7 +388,7 @@ namespace AZ const ModelLodAsset::Mesh::StreamBufferInfo& streamBufferInfo, Mesh& meshInstance) { - AZ_TRACE_METHOD(); + AZ_PROFILE_FUNCTION(RPI); const Data::Asset& streamBufferAsset = streamBufferInfo.m_bufferAssetView.GetBufferAsset(); const Data::Instance& streamBuffer = Buffer::FindOrCreate(streamBufferAsset); diff --git a/Gems/Atom/RPI/Code/Source/RPI.Public/Pass/FullscreenTrianglePass.cpp b/Gems/Atom/RPI/Code/Source/RPI.Public/Pass/FullscreenTrianglePass.cpp index 40dce7d138..36d851f8d8 100644 --- a/Gems/Atom/RPI/Code/Source/RPI.Public/Pass/FullscreenTrianglePass.cpp +++ b/Gems/Atom/RPI/Code/Source/RPI.Public/Pass/FullscreenTrianglePass.cpp @@ -9,6 +9,7 @@ #include #include #include +#include #include #include @@ -46,16 +47,19 @@ namespace AZ void FullscreenTrianglePass::OnShaderReinitialized(const Shader&) { + ShaderReloadDebugTracker::ScopedSection reloadSection("{%p}->FullscreenTrianglePass::OnShaderReinitialized", this); LoadShader(); } void FullscreenTrianglePass::OnShaderAssetReinitialized(const Data::Asset&) { + ShaderReloadDebugTracker::ScopedSection reloadSection("{%p}->FullscreenTrianglePass::OnShaderAssetReinitialized", this); LoadShader(); } void FullscreenTrianglePass::OnShaderVariantReinitialized(const ShaderVariant&) { + ShaderReloadDebugTracker::ScopedSection reloadSection("{%p}->FullscreenTrianglePass::OnShaderVariantReinitialized", this); LoadShader(); } @@ -129,6 +133,8 @@ namespace AZ void FullscreenTrianglePass::InitializeInternal() { RenderPass::InitializeInternal(); + + ShaderReloadDebugTracker::ScopedSection reloadSection("{%p}->FullscreenTrianglePass::InitializeInternal", this); // This draw item purposefully does not reference any geometry buffers. // Instead it's expected that the extended class uses a vertex shader @@ -136,6 +142,12 @@ namespace AZ RHI::DrawLinear draw = RHI::DrawLinear(); draw.m_vertexCount = 3; + if (m_shader == nullptr) + { + AZ_Error("PassSystem", false, "[FullscreenTrianglePass]: Shader not loaded!"); + return; + } + RHI::PipelineStateDescriptorForDraw pipelineStateDescriptor; // [GFX TODO][ATOM-872] The pass should be able to drive the shader variant diff --git a/Gems/Atom/RPI/Code/Source/RPI.Public/Pass/ParentPass.cpp b/Gems/Atom/RPI/Code/Source/RPI.Public/Pass/ParentPass.cpp index dccf5dbc2e..55f3e44173 100644 --- a/Gems/Atom/RPI/Code/Source/RPI.Public/Pass/ParentPass.cpp +++ b/Gems/Atom/RPI/Code/Source/RPI.Public/Pass/ParentPass.cpp @@ -9,11 +9,15 @@ #include #include +#include #include +#include #include #include #include +#include +#include #include namespace AZ @@ -196,7 +200,7 @@ namespace AZ } } - // --- PassTemplate related functions --- + // --- Child creation --- void ParentPass::CreatePassesFromTemplate() { @@ -217,6 +221,49 @@ namespace AZ } } + void ParentPass::CreateClearPassFromBinding(PassAttachmentBinding& binding, PassRequest& clearRequest) + { + if (binding.m_unifiedScopeDesc.m_loadStoreAction.m_loadAction == RHI::AttachmentLoadAction::Clear || + binding.m_unifiedScopeDesc.m_loadStoreAction.m_loadActionStencil == RHI::AttachmentLoadAction::Clear) + { + // Set the name of the child clear pass as well as the binding it's connected to + clearRequest.m_passName = ConcatPassName(Name("Clear"), binding.m_name); + clearRequest.m_connections[0].m_attachmentRef.m_attachment = binding.m_name; + + // Set the pass clear value to the clear value of the attachment binding + SlowClearPassData* clearData = static_cast(clearRequest.m_passData.get()); + clearData->m_clearValue = binding.m_unifiedScopeDesc.m_loadStoreAction.m_clearValue; + + // Create and add the pass + Ptr clearPass = PassSystemInterface::Get()->CreatePassFromRequest(&clearRequest); + if (clearPass) + { + AddChild(clearPass); + } + } + + } + + void ParentPass::CreateClearPassesFromBindings() + { + PassRequest clearRequest; + clearRequest.m_templateName = Name("SlowClearPassTemplate"); + clearRequest.m_passData = AZStd::make_shared(); + clearRequest.m_connections.push_back(); + clearRequest.m_connections[0].m_localSlot = Name("ClearInputOutput"); + clearRequest.m_connections[0].m_attachmentRef.m_pass = Name("Parent"); + + for (uint32_t idx = 0; idx < GetInputCount(); ++idx) + { + CreateClearPassFromBinding(GetInputBinding(idx), clearRequest); + } + + for (uint32_t idx = 0; idx < GetInputOutputCount(); ++idx) + { + CreateClearPassFromBinding(GetInputOutputBinding(idx), clearRequest); + } + } + // --- Pass behavior functions --- void ParentPass::CreateChildPasses() @@ -229,6 +276,7 @@ namespace AZ m_flags.m_alreadyCreatedChildren = true; RemoveChildren(); + CreateClearPassesFromBindings(); CreatePassesFromTemplate(); CreateChildPassesInternal(); diff --git a/Gems/Atom/RPI/Code/Source/RPI.Public/Pass/Pass.cpp b/Gems/Atom/RPI/Code/Source/RPI.Public/Pass/Pass.cpp index d04a35a10b..9155c0351a 100644 --- a/Gems/Atom/RPI/Code/Source/RPI.Public/Pass/Pass.cpp +++ b/Gems/Atom/RPI/Code/Source/RPI.Public/Pass/Pass.cpp @@ -147,6 +147,11 @@ namespace AZ m_treeDepth = m_parent->m_treeDepth + 1; m_path = ConcatPassName(m_parent->m_path, m_name); m_flags.m_partOfHierarchy = m_parent->m_flags.m_partOfHierarchy; + + if (m_state == PassState::Orphaned) + { + QueueForBuildAndInitialization(); + } } void Pass::RemoveFromParent() @@ -154,7 +159,7 @@ namespace AZ AZ_RPI_PASS_ASSERT(m_parent != nullptr, "Trying to remove pass from parent but pointer to the parent pass is null."); m_parent->RemoveChild(Ptr(this)); m_queueState = PassQueueState::NoQueue; - m_state = PassState::Idle; + m_state = PassState::Orphaned; } void Pass::OnOrphan() @@ -162,6 +167,8 @@ namespace AZ m_parent = nullptr; m_flags.m_partOfHierarchy = false; m_treeDepth = 0; + m_queueState = PassQueueState::NoQueue; + m_state = PassState::Orphaned; } // --- Getters & Setters --- @@ -1281,6 +1288,7 @@ namespace AZ void Pass::FrameBegin(FramePrepareParams params) { + AZ_PROFILE_SCOPE(RPI, "Pass::FrameBegin() - %s", m_path.GetCStr()); AZ_RPI_BREAK_ON_TARGET_PASS; if (!IsEnabled()) @@ -1303,7 +1311,10 @@ namespace AZ // FrameBeginInternal needs to be the last function be called in FrameBegin because its implementation expects // all the attachments are imported to database (for example, ImageAttachmentPreview) - FrameBeginInternal(params); + { + AZ_PROFILE_SCOPE(RPI, "Pass::FrameBeginInternal()"); + FrameBeginInternal(params); + } // readback attachment with output state UpdateReadbackAttachment(params, false); diff --git a/Gems/Atom/RPI/Code/Source/RPI.Public/Pass/PassFactory.cpp b/Gems/Atom/RPI/Code/Source/RPI.Public/Pass/PassFactory.cpp index ef8d7a3fae..cc79df144d 100644 --- a/Gems/Atom/RPI/Code/Source/RPI.Public/Pass/PassFactory.cpp +++ b/Gems/Atom/RPI/Code/Source/RPI.Public/Pass/PassFactory.cpp @@ -19,6 +19,7 @@ #include #include #include +#include #include #include #include @@ -60,6 +61,7 @@ namespace AZ { AddPassCreator(Name("ParentPass"), &ParentPass::Create); AddPassCreator(Name("RasterPass"), &RasterPass::Create); + AddPassCreator(Name("SlowClearPass"), &SlowClearPass::Create); AddPassCreator(Name("CopyPass"), &CopyPass::Create); AddPassCreator(Name("FullScreenTriangle"), &FullscreenTrianglePass::Create); AddPassCreator(Name("ComputePass"), &ComputePass::Create); diff --git a/Gems/Atom/RPI/Code/Source/RPI.Public/Pass/PassFilter.cpp b/Gems/Atom/RPI/Code/Source/RPI.Public/Pass/PassFilter.cpp index d9e458c615..d172abd81f 100644 --- a/Gems/Atom/RPI/Code/Source/RPI.Public/Pass/PassFilter.cpp +++ b/Gems/Atom/RPI/Code/Source/RPI.Public/Pass/PassFilter.cpp @@ -90,13 +90,13 @@ namespace AZ return filter; } - void PassFilter::SetOwenrScene(const Scene* scene) + void PassFilter::SetOwnerScene(const Scene* scene) { m_ownerScene = scene; UpdateFilterOptions(); } - void PassFilter::SetOwenrRenderPipeline(const RenderPipeline* renderPipeline) + void PassFilter::SetOwnerRenderPipeline(const RenderPipeline* renderPipeline) { m_ownerRenderPipeline = renderPipeline; UpdateFilterOptions(); diff --git a/Gems/Atom/RPI/Code/Source/RPI.Public/Pass/PassLibrary.cpp b/Gems/Atom/RPI/Code/Source/RPI.Public/Pass/PassLibrary.cpp index 13b2fa391f..7ea3706d17 100644 --- a/Gems/Atom/RPI/Code/Source/RPI.Public/Pass/PassLibrary.cpp +++ b/Gems/Atom/RPI/Code/Source/RPI.Public/Pass/PassLibrary.cpp @@ -294,7 +294,7 @@ namespace AZ void PassLibrary::OnAssetReloaded(Data::Asset asset) { // Handle pass asset reload - Data::Asset passAsset = { asset.GetAs(), AZ::Data::AssetLoadBehavior::PreLoad }; + Data::Asset passAsset = Data::static_pointer_cast(asset); if (passAsset && passAsset->GetPassTemplate()) { LoadPassAsset(passAsset->GetPassTemplate()->m_name, passAsset, true); diff --git a/Gems/Atom/RPI/Code/Source/RPI.Public/Pass/PassSystem.cpp b/Gems/Atom/RPI/Code/Source/RPI.Public/Pass/PassSystem.cpp index 39d0e879e1..9e1333b7ab 100644 --- a/Gems/Atom/RPI/Code/Source/RPI.Public/Pass/PassSystem.cpp +++ b/Gems/Atom/RPI/Code/Source/RPI.Public/Pass/PassSystem.cpp @@ -9,7 +9,6 @@ #include #include #include -#include #include #include #include @@ -40,6 +39,7 @@ #include #include #include +#include namespace AZ { @@ -68,6 +68,7 @@ namespace AZ PassSlot::Reflect(context); PassData::Reflect(context); + SlowClearPassData::Reflect(context); CopyPassData::Reflect(context); RenderPassData::Reflect(context); ComputePassData::Reflect(context); @@ -312,7 +313,6 @@ namespace AZ Pass::FramePrepareParams params{ &frameGraphBuilder }; { - AZ_PROFILE_SCOPE(RPI, "Pass: FrameBegin"); m_rootPass->FrameBegin(params); } } diff --git a/Gems/Atom/RPI/Code/Source/RPI.Public/Pass/RasterPass.cpp b/Gems/Atom/RPI/Code/Source/RPI.Public/Pass/RasterPass.cpp index d9f98c11d3..fa2ee4be94 100644 --- a/Gems/Atom/RPI/Code/Source/RPI.Public/Pass/RasterPass.cpp +++ b/Gems/Atom/RPI/Code/Source/RPI.Public/Pass/RasterPass.cpp @@ -146,6 +146,7 @@ namespace AZ void RasterPass::UpdateDrawList() { + AZ_PROFILE_SCOPE(RPI, "RasterPass::UpdateDrawList"); // DrawLists from dynamic draw AZStd::vector drawLists = DynamicDrawInterface::Get()->GetDrawListsForPass(this); @@ -216,8 +217,6 @@ namespace AZ void RasterPass::CompileResources(const RHI::FrameGraphCompileContext& context) { - AZ_PROFILE_SCOPE(RPI, "RasterPass: CompileResources"); - if (m_shaderResourceGroup == nullptr) { return; diff --git a/Gems/Atom/RPI/Code/Source/RPI.Public/Pass/RenderPass.cpp b/Gems/Atom/RPI/Code/Source/RPI.Public/Pass/RenderPass.cpp index 8353762c0f..fa5f41e615 100644 --- a/Gems/Atom/RPI/Code/Source/RPI.Public/Pass/RenderPass.cpp +++ b/Gems/Atom/RPI/Code/Source/RPI.Public/Pass/RenderPass.cpp @@ -276,7 +276,8 @@ namespace AZ { inputIndex = imageIndex; } - const RHI::ImageView* imageView = context.GetImageView(attachment->GetAttachmentId(), binding.m_attachmentUsageIndex); + const RHI::ImageView* imageView = + context.GetImageView(attachment->GetAttachmentId(), binding.m_unifiedScopeDesc.GetImageViewDescriptor(), binding.m_scopeAttachmentUsage); if (binding.m_shaderImageDimensionsNameIndex.HasName()) { @@ -315,7 +316,7 @@ namespace AZ { inputIndex = bufferIndex; } - const RHI::BufferView* bufferView = context.GetBufferView(attachment->GetAttachmentId(), binding.m_attachmentUsageIndex); + const RHI::BufferView* bufferView = context.GetBufferView(attachment->GetAttachmentId(), binding.m_scopeAttachmentUsage); m_shaderResourceGroup->SetBufferView(RHI::ShaderInputBufferIndex(inputIndex), bufferView, arrayIndex); ++bufferIndex; } diff --git a/Gems/Atom/RPI/Code/Source/RPI.Public/Pass/SlowClearPass.cpp b/Gems/Atom/RPI/Code/Source/RPI.Public/Pass/SlowClearPass.cpp new file mode 100644 index 0000000000..62a8241242 --- /dev/null +++ b/Gems/Atom/RPI/Code/Source/RPI.Public/Pass/SlowClearPass.cpp @@ -0,0 +1,45 @@ +/* + * Copyright (c) Contributors to the Open 3D Engine Project. + * For complete copyright and license terms please see the LICENSE at the root of this distribution. + * + * SPDX-License-Identifier: Apache-2.0 OR MIT + * + */ + +#include +#include + +#include + +namespace AZ +{ + namespace RPI + { + Ptr SlowClearPass::Create(const PassDescriptor& descriptor) + { + Ptr pass = aznew SlowClearPass(descriptor); + return pass; + } + + SlowClearPass::SlowClearPass(const PassDescriptor& descriptor) + : RenderPass(descriptor) + { + const SlowClearPassData* passData = PassUtils::GetPassData(descriptor); + if (passData != nullptr) + { + m_clearValue = passData->m_clearValue; + } + } + + void SlowClearPass::InitializeInternal() + { + RenderPass::InitializeInternal(); + + // Set clear value + AZ_Assert(GetInputOutputCount() > 0, "SlowClearPass: Missing InputOutput binding!"); + RPI::PassAttachmentBinding& binding = GetInputOutputBinding(0); + binding.m_unifiedScopeDesc.m_loadStoreAction.m_clearValue = m_clearValue; + } + + } // namespace RPI +} // namespace AZ diff --git a/Gems/Atom/RPI/Code/Source/RPI.Public/Pass/Specific/ImageAttachmentPreviewPass.cpp b/Gems/Atom/RPI/Code/Source/RPI.Public/Pass/Specific/ImageAttachmentPreviewPass.cpp index fc1ea2ce1b..f173b2b544 100644 --- a/Gems/Atom/RPI/Code/Source/RPI.Public/Pass/Specific/ImageAttachmentPreviewPass.cpp +++ b/Gems/Atom/RPI/Code/Source/RPI.Public/Pass/Specific/ImageAttachmentPreviewPass.cpp @@ -231,7 +231,7 @@ namespace AZ void ImageAttachmentPreviewPass::OnAssetReloaded(Data::Asset asset) { - Data::Asset shaderAsset = { asset.GetAs(), AZ::Data::AssetLoadBehavior::PreLoad }; + Data::Asset shaderAsset = Data::static_pointer_cast(asset); if (shaderAsset) { m_needsShaderLoad = true; diff --git a/Gems/Atom/RPI/Code/Source/RPI.Public/RPISystem.cpp b/Gems/Atom/RPI/Code/Source/RPI.Public/RPISystem.cpp index 943966c13b..3416b2895d 100644 --- a/Gems/Atom/RPI/Code/Source/RPI.Public/RPISystem.cpp +++ b/Gems/Atom/RPI/Code/Source/RPI.Public/RPISystem.cpp @@ -31,8 +31,8 @@ #include #include -#include #include +#include #include @@ -268,21 +268,18 @@ namespace AZ AssetInitBus::Broadcast(&AssetInitBus::Events::PostLoadInit); - // Update tick time info - FillTickTimeInfo(); + m_currentSimulationTime = GetCurrentTime(); for (auto& scene : m_scenes) { - scene->Simulate(m_tickTime, m_simulationJobPolicy); + scene->Simulate(m_simulationJobPolicy, m_currentSimulationTime); } } - void RPISystem::FillTickTimeInfo() + float RPISystem::GetCurrentTime() const { - AZ::TickRequestBus::BroadcastResult(m_tickTime.m_gameDeltaTime, &AZ::TickRequestBus::Events::GetTickDeltaTime); - ScriptTimePoint currentTime; - AZ::TickRequestBus::BroadcastResult(currentTime, &AZ::TickRequestBus::Events::GetTimeAtCurrentTick); - m_tickTime.m_currentGameTime = static_cast(currentTime.GetSeconds()); + const AZ::TimeUs currentSimulationTimeUs = AZ::GetRealElapsedTimeUs(); + return AZ::TimeUsToSeconds(currentSimulationTimeUs); } void RPISystem::RenderTick() @@ -301,7 +298,7 @@ namespace AZ // [GFX TODO] We may parallel scenes' prepare render. for (auto& scenePtr : m_scenes) { - scenePtr->PrepareRender(m_tickTime, m_prepareRenderJobPolicy); + scenePtr->PrepareRender(m_prepareRenderJobPolicy, m_currentSimulationTime); } m_rhiSystem.FrameUpdate( diff --git a/Gems/Atom/RPI/Code/Source/RPI.Public/RenderPipeline.cpp b/Gems/Atom/RPI/Code/Source/RPI.Public/RenderPipeline.cpp index 6378a249a4..062eaf02bd 100644 --- a/Gems/Atom/RPI/Code/Source/RPI.Public/RenderPipeline.cpp +++ b/Gems/Atom/RPI/Code/Source/RPI.Public/RenderPipeline.cpp @@ -178,6 +178,10 @@ namespace AZ pipelineViews.m_views.resize(1); } ViewPtr previousView = pipelineViews.m_views[0]; + if (view) + { + view->OnAddToRenderPipeline(); + } pipelineViews.m_views[0] = view; if (previousView) @@ -238,6 +242,7 @@ namespace AZ pipelineViews.m_type = PipelineViewType::Transient; } view->SetPassesByDrawList(&pipelineViews.m_passesByDrawList); + view->OnAddToRenderPipeline(); pipelineViews.m_views.push_back(view); } } @@ -375,7 +380,7 @@ namespace AZ m_scene->RemoveRenderPipeline(m_nameId); } - void RenderPipeline::OnStartFrame([[maybe_unused]] const TickTimeInfo& tick) + void RenderPipeline::OnStartFrame([[maybe_unused]] float time) { AZ_PROFILE_SCOPE(RPI, "RenderPipeline: OnStartFrame"); diff --git a/Gems/Atom/RPI/Code/Source/RPI.Public/Scene.cpp b/Gems/Atom/RPI/Code/Source/RPI.Public/Scene.cpp index 41fefda656..1b5110e327 100644 --- a/Gems/Atom/RPI/Code/Source/RPI.Public/Scene.cpp +++ b/Gems/Atom/RPI/Code/Source/RPI.Public/Scene.cpp @@ -18,7 +18,6 @@ #include #include -#include #include #include #include @@ -44,6 +43,9 @@ namespace AZ { auto shaderAsset = RPISystemInterface::Get()->GetCommonShaderAssetForSrgs(); scene->m_srg = ShaderResourceGroup::Create(shaderAsset, sceneSrgLayout->GetName()); + + // Set value for constants defined in SceneTimeSrg.azsli + scene->m_timeInputIndex = scene->m_srg->FindShaderInputConstantIndex(Name{ "m_time" }); } scene->m_name = sceneDescriptor.m_nameId; @@ -111,7 +113,8 @@ namespace AZ { if (m_taskGraphActive) { - WaitTGEvent(m_simulationFinishedTGEvent, &m_simulationFinishedWorkActive); + WaitAndCleanTGEvent(AZStd::move(m_simulationFinishedTGEvent)); + m_simulationFinishedTGEvent.reset(); } else { @@ -381,12 +384,14 @@ namespace AZ simulationTGDesc, [this, featureProcessor]() { - featureProcessor->Simulate(m_simulatePacket); + FeatureProcessor::SimulatePacket jobPacket = m_simulatePacket; + jobPacket.m_parentJob = nullptr; + featureProcessor->Simulate(jobPacket); }); } simulationTG.Detach(); - m_simulationFinishedWorkActive = true; - simulationTG.Submit(&m_simulationFinishedTGEvent); + m_simulationFinishedTGEvent = AZStd::make_unique(); + simulationTG.Submit(m_simulationFinishedTGEvent.get()); } void Scene::SimulateJobs() @@ -397,10 +402,11 @@ namespace AZ for (FeatureProcessorPtr& fp : m_featureProcessors) { FeatureProcessor* featureProcessor = fp.get(); - const auto jobLambda = [this, featureProcessor]() + const auto jobLambda = [this, featureProcessor](AZ::Job& owner) { - - featureProcessor->Simulate(m_simulatePacket); + FeatureProcessor::SimulatePacket jobPacket = m_simulatePacket; + jobPacket.m_parentJob = &owner; + featureProcessor->Simulate(jobPacket); }; AZ::Job* simulationJob = AZ::CreateJobFunction(AZStd::move(jobLambda), true, nullptr); //auto-deletes @@ -410,16 +416,17 @@ namespace AZ //[GFX TODO]: the completion job should start here } - void Scene::Simulate([[maybe_unused]] const TickTimeInfo& tickInfo, RHI::JobPolicy jobPolicy) + void Scene::Simulate(RHI::JobPolicy jobPolicy, float simulationTime) { AZ_PROFILE_SCOPE(RPI, "Scene: Simulate"); - m_simulationTime = tickInfo.m_currentGameTime; + m_simulationTime = simulationTime; // If previous simulation job wasn't done, wait for it to finish. if (m_taskGraphActive) { - WaitTGEvent(m_simulationFinishedTGEvent, &m_simulationFinishedWorkActive); + WaitAndCleanTGEvent(AZStd::move(m_simulationFinishedTGEvent)); + m_simulationFinishedTGEvent.reset(); } else { @@ -449,17 +456,14 @@ namespace AZ } } - void Scene::WaitTGEvent(AZ::TaskGraphEvent& completionTGEvent, AZStd::atomic_bool* workToWaitOn ) + void Scene::WaitAndCleanTGEvent(AZStd::unique_ptr&& completionTGEvent) { - AZ_PROFILE_SCOPE(RPI, "Scene: WaitAndCleanCompletionJob"); - if (!workToWaitOn || workToWaitOn->load()) + AZ_PROFILE_SCOPE(RPI, "Scene: WaitAndCleanTGEvent"); + if (completionTGEvent) { - completionTGEvent.Wait(); - } - if (workToWaitOn) - { - workToWaitOn->store(false); + completionTGEvent->Wait(); } + // allow completionTGEvent to go out of scope and be deleted } void Scene::WaitAndCleanCompletionJob(AZ::JobCompletion*& completionJob) @@ -483,11 +487,9 @@ namespace AZ { if (m_srg) { - // Set value for constants defined in SceneTimeSrg.azsli - RHI::ShaderInputConstantIndex timeIndex = m_srg->FindShaderInputConstantIndex(Name{ "m_time" }); - if (timeIndex.IsValid()) + if (m_timeInputIndex.IsValid()) { - m_srg->SetConstant(timeIndex, m_simulationTime); + m_srg->SetConstant(m_timeInputIndex, m_simulationTime); } // signal any handlers to update values for their partial scene srg @@ -499,12 +501,12 @@ namespace AZ void Scene::CollectDrawPacketsTaskGraph() { - AZ_PROFILE_SCOPE(RPI, "CollectDrawPackets"); + AZ_PROFILE_SCOPE(RPI, "CollectDrawPacketsTaskGraph"); AZ::TaskGraphEvent collectDrawPacketsTGEvent; static const AZ::TaskDescriptor collectDrawPacketsTGDesc{"RPI_Scene_PrepareRender_CollectDrawPackets", "Graphics"}; - AZ::TaskGraph collectDrawPacketsTG; - // Launch FeatureProcessor::Render() jobs + + // Launch FeatureProcessor::Render() taskgraphs for (auto& fp : m_featureProcessors) { collectDrawPacketsTG.AddTask( @@ -518,34 +520,50 @@ namespace AZ collectDrawPacketsTG.Submit(&collectDrawPacketsTGEvent); // Launch CullingSystem::ProcessCullables() jobs (will run concurrently with FeatureProcessor::Render() jobs if m_parallelOctreeTraversal) - bool parallelOctreeTraversal = m_cullingScene->GetDebugContext().m_parallelOctreeTraversal; + const bool parallelOctreeTraversal = m_cullingScene->GetDebugContext().m_parallelOctreeTraversal; m_cullingScene->BeginCulling(m_renderPacket.m_views); - AZ::JobCompletion processCullablesCompletion; - for (ViewPtr& viewPtr : m_renderPacket.m_views) + static const AZ::TaskDescriptor processCullablesDescriptor{"AZ::RPI::Scene::ProcessCullables", "Graphics"}; + AZ::TaskGraphEvent processCullablesTGEvent; + AZ::TaskGraph processCullablesTG; + if (parallelOctreeTraversal) { - AZ::Job* processCullablesJob = AZ::CreateJobFunction([this, &viewPtr](AZ::Job& thisJob) - { - m_cullingScene->ProcessCullables(*this, *viewPtr, thisJob); // can't call directly because ProcessCullables needs a parent job - }, - true, nullptr); //auto-deletes - if (parallelOctreeTraversal) + for (ViewPtr& viewPtr : m_renderPacket.m_views) { - processCullablesJob->SetDependent(&processCullablesCompletion); - processCullablesJob->Start(); - } - else - { - processCullablesJob->StartAndWaitForCompletion(); + processCullablesTG.AddTask(processCullablesDescriptor, [this, &viewPtr, &processCullablesTGEvent]() + { + AZ::TaskGraph subTaskGraph; + m_cullingScene->ProcessCullablesTG(*this, *viewPtr, subTaskGraph); + if (!subTaskGraph.IsEmpty()) + { + subTaskGraph.Detach(); + subTaskGraph.Submit(&processCullablesTGEvent); + } + }); } } + else + { + for (ViewPtr& viewPtr : m_renderPacket.m_views) + { + m_cullingScene->ProcessCullablesTG(*this, *viewPtr, processCullablesTG); + } + } + bool processCullablesHasWork = !processCullablesTG.IsEmpty(); + if (processCullablesHasWork) + { + processCullablesTG.Submit(&processCullablesTGEvent); + } - WaitTGEvent(collectDrawPacketsTGEvent); - processCullablesCompletion.StartAndWaitForCompletion(); + collectDrawPacketsTGEvent.Wait(); + if (processCullablesHasWork) // skip the wait if there is no work to do + { + processCullablesTGEvent.Wait(); + } } void Scene::CollectDrawPacketsJobs() { - AZ_PROFILE_SCOPE(RPI, "CollectDrawPackets"); + AZ_PROFILE_SCOPE(RPI, "CollectDrawPacketsJobs"); AZ::JobCompletion* collectDrawPacketsCompletion = aznew AZ::JobCompletion(); // Launch FeatureProcessor::Render() jobs @@ -562,15 +580,16 @@ namespace AZ } // Launch CullingSystem::ProcessCullables() jobs (will run concurrently with FeatureProcessor::Render() jobs) + const bool parallelOctreeTraversal = m_cullingScene->GetDebugContext().m_parallelOctreeTraversal; m_cullingScene->BeginCulling(m_renderPacket.m_views); for (ViewPtr& viewPtr : m_renderPacket.m_views) { AZ::Job* processCullablesJob = AZ::CreateJobFunction([this, &viewPtr](AZ::Job& thisJob) { - m_cullingScene->ProcessCullables(*this, *viewPtr, thisJob); // can't call directly because ProcessCullables needs a parent job + m_cullingScene->ProcessCullablesJobs(*this, *viewPtr, thisJob); // can't call directly because ProcessCullables needs a parent job }, true, nullptr); //auto-deletes - if (m_cullingScene->GetDebugContext().m_parallelOctreeTraversal) + if (parallelOctreeTraversal) { processCullablesJob->SetDependent(collectDrawPacketsCompletion); processCullablesJob->Start(); @@ -594,13 +613,13 @@ namespace AZ { finalizeDrawListsTG.AddTask( finalizeDrawListsTGDesc, - [view]() + [view, &finalizeDrawListsTGEvent]() { - view->FinalizeDrawLists(); + view->FinalizeDrawListsTG(finalizeDrawListsTGEvent); }); } finalizeDrawListsTG.Submit(&finalizeDrawListsTGEvent); - WaitTGEvent(finalizeDrawListsTGEvent); + finalizeDrawListsTGEvent.Wait(); } void Scene::FinalizeDrawListsJobs() @@ -608,9 +627,9 @@ namespace AZ AZ::JobCompletion* finalizeDrawListsCompletion = aznew AZ::JobCompletion(); for (auto& view : m_renderPacket.m_views) { - const auto finalizeDrawListsLambda = [view]() + const auto finalizeDrawListsLambda = [view](AZ::Job& job) { - view->FinalizeDrawLists(); + view->FinalizeDrawListsJob(&job); }; AZ::Job* finalizeDrawListsJob = AZ::CreateJobFunction(AZStd::move(finalizeDrawListsLambda), true, nullptr); //auto-deletes @@ -620,13 +639,14 @@ namespace AZ WaitAndCleanCompletionJob(finalizeDrawListsCompletion); } - void Scene::PrepareRender(const TickTimeInfo& tickInfo, RHI::JobPolicy jobPolicy) + void Scene::PrepareRender(RHI::JobPolicy jobPolicy, float simulationTime) { AZ_PROFILE_SCOPE(RPI, "Scene: PrepareRender"); if (m_taskGraphActive) { - WaitTGEvent(m_simulationFinishedTGEvent, &m_simulationFinishedWorkActive); + WaitAndCleanTGEvent(AZStd::move(m_simulationFinishedTGEvent)); + m_simulationFinishedTGEvent.reset(); } else { @@ -644,7 +664,7 @@ namespace AZ if (pipeline->NeedsRender()) { activePipelines.push_back(pipeline); - pipeline->OnStartFrame(tickInfo); + pipeline->OnStartFrame(simulationTime); } } } @@ -717,20 +737,19 @@ namespace AZ // Add dynamic draw data for all the views if (m_dynamicDrawSystem) { - AZ_PROFILE_SCOPE(RPI, "DynamicDraw SubmitDrawData"); m_dynamicDrawSystem->SubmitDrawData(this, m_renderPacket.m_views); } } { - AZ_PROFILE_BEGIN(RPI, "FinalizeDrawLists"); - if (jobPolicy == RHI::JobPolicy::Serial) + AZ_PROFILE_SCOPE(RPI, "FinalizeDrawLists"); + if (jobPolicy == RHI::JobPolicy::Serial || + m_renderPacket.m_views.size() <= 1) // FinalizeDrawListsX both immediately wait for the job to complete, skip job if only 1 job would be generated { for (auto& view : m_renderPacket.m_views) { - view->FinalizeDrawLists(); + view->FinalizeDrawListsJob(nullptr); } - AZ_PROFILE_END(RPI); } else { @@ -742,7 +761,6 @@ namespace AZ { FinalizeDrawListsJobs(); } - AZ_PROFILE_END(RPI); } } diff --git a/Gems/Atom/RPI/Code/Source/RPI.Public/Shader/Shader.cpp b/Gems/Atom/RPI/Code/Source/RPI.Public/Shader/Shader.cpp index 51dd9c36d3..b1ae460af6 100644 --- a/Gems/Atom/RPI/Code/Source/RPI.Public/Shader/Shader.cpp +++ b/Gems/Atom/RPI/Code/Source/RPI.Public/Shader/Shader.cpp @@ -15,6 +15,8 @@ #include #include +#include + namespace AZ { @@ -96,8 +98,7 @@ namespace AZ RHI::ResultCode Shader::Init(ShaderAsset& shaderAsset) { - Data::AssetBus::Handler::BusDisconnect(); - ShaderReloadNotificationBus::Handler::BusDisconnect(); + Data::AssetBus::MultiHandler::BusDisconnect(); ShaderVariantFinderNotificationBus::Handler::BusDisconnect(); RHI::RHISystemInterface* rhiSystem = RHI::RHISystemInterface::Get(); @@ -112,7 +113,8 @@ namespace AZ AZStd::unique_lock lock(m_variantCacheMutex); m_shaderVariants.clear(); } - m_rootVariant.Init(Data::Asset{&shaderAsset, AZ::Data::AssetLoadBehavior::PreLoad}, shaderAsset.GetRootVariant(m_supervariantIndex), m_supervariantIndex); + auto rootShaderVariantAsset = shaderAsset.GetRootVariant(m_supervariantIndex); + m_rootVariant.Init(m_asset, rootShaderVariantAsset, m_supervariantIndex); if (m_pipelineLibraryHandle.IsNull()) { @@ -146,8 +148,8 @@ namespace AZ } ShaderVariantFinderNotificationBus::Handler::BusConnect(m_asset.GetId()); - Data::AssetBus::Handler::BusConnect(m_asset.GetId()); - ShaderReloadNotificationBus::Handler::BusConnect(m_asset.GetId()); + Data::AssetBus::MultiHandler::BusConnect(rootShaderVariantAsset.GetId()); + Data::AssetBus::MultiHandler::BusConnect(m_asset.GetId()); return RHI::ResultCode::Success; } @@ -155,8 +157,7 @@ namespace AZ void Shader::Shutdown() { ShaderVariantFinderNotificationBus::Handler::BusDisconnect(); - Data::AssetBus::Handler::BusDisconnect(); - ShaderReloadNotificationBus::Handler::BusDisconnect(); + Data::AssetBus::MultiHandler::BusDisconnect(); if (m_pipelineLibraryHandle.IsValid()) { @@ -181,14 +182,52 @@ namespace AZ { ShaderReloadDebugTracker::ScopedSection reloadSection("{%p}->Shader::OnAssetReloaded %s", this, asset.GetHint().c_str()); - if (asset->GetId() == m_asset->GetId()) + if (asset.GetAs()) { - Data::Asset newAsset = { asset.GetAs(), AZ::Data::AssetLoadBehavior::PreLoad }; - AZ_Assert(newAsset, "Reloaded ShaderAsset is null"); + m_reloadedRootShaderVariantAsset = Data::static_pointer_cast(asset); + if (m_asset->m_buildTimestamp == m_reloadedRootShaderVariantAsset->GetBuildTimestamp()) + { + Init(*m_asset.Get()); + ShaderReloadNotificationBus::Event(asset.GetId(), &ShaderReloadNotificationBus::Events::OnShaderReinitialized, *this); + } + return; + } - Init(*newAsset.Get()); + if (asset.GetAs()) + { + m_asset = Data::static_pointer_cast(asset); + if (!m_reloadedRootShaderVariantAsset.IsReady()) + { + // Do nothing, as We should not re-initilize until the root shader variant asset has been reloaded. + return; + } + AZ_Assert(m_asset->m_buildTimestamp == m_reloadedRootShaderVariantAsset->GetBuildTimestamp(), + "shaderAsset '%s' timeStamp=%lld, but Root ShaderVariantAsset timeStamp=%lld", m_asset.GetHint().c_str(), + m_asset->m_buildTimestamp, m_reloadedRootShaderVariantAsset->GetBuildTimestamp()); + m_asset->UpdateRootShaderVariantAsset(m_supervariantIndex, m_reloadedRootShaderVariantAsset); + m_reloadedRootShaderVariantAsset = {}; // Clear the temporary reference. + + if (ShaderReloadDebugTracker::IsEnabled()) + { + auto makeTimeString = [](AZ::u64 timestamp, AZ::u64 now) + { + AZ::u64 elapsedMillis = now - timestamp; + double elapsedSeconds = aznumeric_cast(elapsedMillis / 1'000); + AZStd::string timeString = AZStd::string::format("%lld (%f seconds ago)", timestamp, elapsedSeconds); + return timeString; + }; + + AZStd::sys_time_t now = AZStd::GetTimeNowMicroSecond(); + + const auto shaderVariantAsset = m_asset->GetRootVariant(); + ShaderReloadDebugTracker::Printf("{%p}->Shader::OnAssetReloaded for shader '%s' [build time %s] found variant '%s' [build time %s]", this, + m_asset.GetHint().c_str(), makeTimeString(m_asset->m_buildTimestamp, now).c_str(), + shaderVariantAsset.GetHint().c_str(), makeTimeString(shaderVariantAsset->GetBuildTimestamp(), now).c_str()); + } + Init(*m_asset.Get()); ShaderReloadNotificationBus::Event(asset.GetId(), &ShaderReloadNotificationBus::Events::OnShaderReinitialized, *this); } + } /////////////////////////////////////////////////////////////////////// @@ -253,23 +292,6 @@ namespace AZ ShaderReloadNotificationBus::Event(m_asset.GetId(), &ShaderReloadNotificationBus::Events::OnShaderVariantReinitialized, updatedVariant); } /////////////////////////////////////////////////////////////////// - - - /////////////////////////////////////////////////////////////////// - // ShaderReloadNotificationBus overrides... - void Shader::OnShaderAssetReinitialized(const Data::Asset& shaderAsset) - { - // When reloads occur, it's possible for old Asset objects to hang around and report reinitialization, - // so we can reduce unnecessary reinitialization in that case. - if (shaderAsset.Get() == m_asset.Get()) - { - ShaderReloadDebugTracker::ScopedSection reloadSection("{%p}->Shader::OnShaderAssetReinitialized %s", this, shaderAsset.GetHint().c_str()); - - Init(*m_asset.Get()); - ShaderReloadNotificationBus::Event(shaderAsset.GetId(), &ShaderReloadNotificationBus::Events::OnShaderReinitialized, *this); - } - } - /////////////////////////////////////////////////////////////////// ConstPtr Shader::LoadPipelineLibrary() const { @@ -320,6 +342,30 @@ namespace AZ } const ShaderVariant& Shader::GetVariant(ShaderVariantStableId shaderVariantStableId) + { + const ShaderVariant& variant = GetVariantInternal(shaderVariantStableId); + + if (ShaderReloadDebugTracker::IsEnabled()) + { + auto makeTimeString = [](AZStd::sys_time_t timestamp, AZStd::sys_time_t now) + { + AZStd::sys_time_t elapsedMicroseconds = now - timestamp; + double elapsedSeconds = aznumeric_cast(elapsedMicroseconds / 1'000'000); + AZStd::string timeString = AZStd::string::format("%lld (%f seconds ago)", timestamp, elapsedSeconds); + return timeString; + }; + + AZStd::sys_time_t now = AZStd::GetTimeNowMicroSecond(); + + ShaderReloadDebugTracker::Printf("{%p}->Shader::GetVariant for shader '%s' [build time %s] found variant '%s' [build time %s]", this, + m_asset.GetHint().c_str(), makeTimeString(m_asset->GetBuildTimestamp(), now).c_str(), + variant.GetShaderVariantAsset().GetHint().c_str(), makeTimeString(variant.GetShaderVariantAsset()->GetBuildTimestamp(), now).c_str()); + } + + return variant; + } + + const ShaderVariant& Shader::GetVariantInternal(ShaderVariantStableId shaderVariantStableId) { if (!shaderVariantStableId.IsValid() || shaderVariantStableId == ShaderAsset::RootShaderVariantStableId) { @@ -336,7 +382,7 @@ namespace AZ // reloaded, but some (or all) shader variants haven't been built yet. Since we want to use the latest version of the // shader code, ignore the old variants and fall back to the newer root variant instead. There's no need to report a // warning here because m_asset->GetVariant below will report one. - if (findIt->second.GetBuildTimestamp() >= m_asset->GetShaderAssetBuildTimestamp()) + if (findIt->second.GetBuildTimestamp() >= m_asset->GetBuildTimestamp()) { return findIt->second; } @@ -359,7 +405,7 @@ namespace AZ auto findIt = m_shaderVariants.find(shaderVariantStableId); if (findIt != m_shaderVariants.end()) { - if (findIt->second.GetBuildTimestamp() >= m_asset->GetShaderAssetBuildTimestamp()) + if (findIt->second.GetBuildTimestamp() >= m_asset->GetBuildTimestamp()) { return findIt->second; } diff --git a/Gems/Atom/RPI/Code/Source/RPI.Public/Shader/ShaderReloadDebugTracker.cpp b/Gems/Atom/RPI/Code/Source/RPI.Public/Shader/ShaderReloadDebugTracker.cpp index 6b97e43cbd..fd1f9a845f 100644 --- a/Gems/Atom/RPI/Code/Source/RPI.Public/Shader/ShaderReloadDebugTracker.cpp +++ b/Gems/Atom/RPI/Code/Source/RPI.Public/Shader/ShaderReloadDebugTracker.cpp @@ -7,24 +7,71 @@ */ #include +#include namespace AZ { namespace RPI { - bool ShaderReloadDebugTracker::s_enabled = false; - int ShaderReloadDebugTracker::s_indent = 0; + namespace ShaderReloadDebugTrackerInternal + { + static constexpr char EnabledVariableName[] = "ShaderReloadDebugTracker enabled"; + static constexpr char IndentVariableName[] = "ShaderReloadDebugTracker indent"; + + static EnvironmentVariable s_enabled; + static EnvironmentVariable s_indent; + } + + void ShaderReloadDebugTracker::Init() + { + MakeReady(); + } + + void ShaderReloadDebugTracker::Shutdown() + { + ShaderReloadDebugTrackerInternal::s_enabled.Reset(); + ShaderReloadDebugTrackerInternal::s_indent.Reset(); + } + + void ShaderReloadDebugTracker::MakeReady() + { + if (!ShaderReloadDebugTrackerInternal::s_enabled.IsValid()) + { + ShaderReloadDebugTrackerInternal::s_enabled = AZ::Environment::CreateVariable(AZ::Crc32(ShaderReloadDebugTrackerInternal::EnabledVariableName), false); + ShaderReloadDebugTrackerInternal::s_indent = AZ::Environment::CreateVariable(AZ::Crc32(ShaderReloadDebugTrackerInternal::IndentVariableName), 0); + } + } bool ShaderReloadDebugTracker::IsEnabled() { #ifdef AZ_ENABLE_SHADER_RELOAD_DEBUG_TRACKER + MakeReady(); + // Set this to true in the debugger to turn on hot reload tracing. // If needed, we could hook this up to a CVar. - return s_enabled; + return ShaderReloadDebugTrackerInternal::s_enabled.Get(); #else return false; #endif } + + void ShaderReloadDebugTracker::AddIndent() + { + MakeReady(); + ShaderReloadDebugTrackerInternal::s_indent.Get() += IndentSpaces; + } + + void ShaderReloadDebugTracker::RemoveIndent() + { + MakeReady(); + ShaderReloadDebugTrackerInternal::s_indent.Get() -= IndentSpaces; + } + + int ShaderReloadDebugTracker::GetIndent() + { + MakeReady(); + return ShaderReloadDebugTrackerInternal::s_indent.Get(); + } ShaderReloadDebugTracker::ScopedSection::~ScopedSection() { diff --git a/Gems/Atom/RPI/Code/Source/RPI.Public/Shader/ShaderResourceGroup.cpp b/Gems/Atom/RPI/Code/Source/RPI.Public/Shader/ShaderResourceGroup.cpp index df16b5cd08..b927e864fc 100644 --- a/Gems/Atom/RPI/Code/Source/RPI.Public/Shader/ShaderResourceGroup.cpp +++ b/Gems/Atom/RPI/Code/Source/RPI.Public/Shader/ShaderResourceGroup.cpp @@ -10,7 +10,6 @@ #include -#include #include namespace AZ @@ -75,8 +74,6 @@ namespace AZ RHI::ResultCode ShaderResourceGroup::Init(ShaderAsset& shaderAsset, const SupervariantIndex& supervariantIndex, const AZ::Name& srgName) { - AZ_TRACE_METHOD(); - const auto& lay = shaderAsset.FindShaderResourceGroupLayout(srgName, supervariantIndex); m_layout = lay.get(); diff --git a/Gems/Atom/RPI/Code/Source/RPI.Public/Shader/ShaderSystem.cpp b/Gems/Atom/RPI/Code/Source/RPI.Public/Shader/ShaderSystem.cpp index ec6aeb3771..2e66aaca99 100644 --- a/Gems/Atom/RPI/Code/Source/RPI.Public/Shader/ShaderSystem.cpp +++ b/Gems/Atom/RPI/Code/Source/RPI.Public/Shader/ShaderSystem.cpp @@ -10,6 +10,7 @@ #include #include #include +#include #include #include @@ -86,10 +87,13 @@ namespace AZ }; Data::InstanceDatabase::Create(azrtti_typeid(), handler, false); } + + ShaderReloadDebugTracker::Init(); } void ShaderSystem::Shutdown() { + ShaderReloadDebugTracker::Shutdown(); Data::InstanceDatabase::Destroy(); Data::InstanceDatabase::Destroy(); Data::InstanceDatabase::Destroy(); diff --git a/Gems/Atom/RPI/Code/Source/RPI.Public/Shader/ShaderVariant.cpp b/Gems/Atom/RPI/Code/Source/RPI.Public/Shader/ShaderVariant.cpp index 7aa70de6f8..ce33a31fbb 100644 --- a/Gems/Atom/RPI/Code/Source/RPI.Public/Shader/ShaderVariant.cpp +++ b/Gems/Atom/RPI/Code/Source/RPI.Public/Shader/ShaderVariant.cpp @@ -22,24 +22,20 @@ namespace AZ const Data::Asset& shaderAsset, const Data::Asset& shaderVariantAsset, SupervariantIndex supervariantIndex) - { + { + m_shaderAsset = shaderAsset; + m_shaderVariantAsset = shaderVariantAsset; + m_supervariantIndex = supervariantIndex; m_pipelineStateType = shaderAsset->GetPipelineStateType(); m_pipelineLayoutDescriptor = shaderAsset->GetPipelineLayoutDescriptor(supervariantIndex); - m_shaderVariantAsset = shaderVariantAsset; m_renderStates = &shaderAsset->GetRenderStates(supervariantIndex); - m_supervariantIndex = supervariantIndex; - Data::AssetBus::MultiHandler::BusDisconnect(); - Data::AssetBus::MultiHandler::BusConnect(shaderAsset.GetId()); - Data::AssetBus::MultiHandler::BusConnect(shaderVariantAsset.GetId()); - - m_shaderAsset = shaderAsset; return true; } ShaderVariant::~ShaderVariant() { - Data::AssetBus::MultiHandler::BusDisconnect(); + } void ShaderVariant::ConfigurePipelineState(RHI::PipelineStateDescriptor& descriptor) const @@ -82,25 +78,5 @@ namespace AZ } } - - void ShaderVariant::OnAssetReloaded(Data::Asset asset) - { - ShaderReloadDebugTracker::ScopedSection reloadSection("{%p}->ShaderVariant::OnAssetReloaded %s", this, asset.GetHint().c_str()); - - if (asset.GetAs()) - { - Data::Asset shaderVariantAsset = { asset.GetAs(), AZ::Data::AssetLoadBehavior::PreLoad }; - Init(m_shaderAsset, shaderVariantAsset, m_supervariantIndex); - ShaderReloadNotificationBus::Event(m_shaderAsset.GetId(), &ShaderReloadNotificationBus::Events::OnShaderVariantReinitialized, *this); - } - - if (asset.GetAs()) - { - Data::Asset shaderAsset = { asset.GetAs(), AZ::Data::AssetLoadBehavior::PreLoad }; - Init(shaderAsset, m_shaderVariantAsset, m_supervariantIndex); - ShaderReloadNotificationBus::Event(m_shaderAsset.GetId(), &ShaderReloadNotificationBus::Events::OnShaderVariantReinitialized, *this); - } - } - } // namespace RPI } // namespace AZ diff --git a/Gems/Atom/RPI/Code/Source/RPI.Public/View.cpp b/Gems/Atom/RPI/Code/Source/RPI.Public/View.cpp index 8c1e38ba58..091664b9e8 100644 --- a/Gems/Atom/RPI/Code/Source/RPI.Public/View.cpp +++ b/Gems/Atom/RPI/Code/Source/RPI.Public/View.cpp @@ -19,6 +19,9 @@ #include #include #include +#include +#include +#include #include #if AZ_TRAIT_MASKED_OCCLUSION_CULLING_SUPPORTED @@ -47,18 +50,14 @@ namespace AZ { AZ_Assert(!name.IsEmpty(), "invalid name"); - // Set default matrixes. + // Set default matrices SetWorldToViewMatrix(AZ::Matrix4x4::CreateIdentity()); AZ::Matrix4x4 viewToClipMatrix; AZ::MakePerspectiveFovMatrixRH(viewToClipMatrix, AZ::Constants::HalfPi, 1, 0.1f, 1000.f, true); SetViewToClipMatrix(viewToClipMatrix); - Data::Asset viewSrgShaderAsset = RPISystemInterface::Get()->GetCommonShaderAssetForSrgs(); + TryCreateShaderResourceGroup(); - if (viewSrgShaderAsset.IsReady()) - { - m_shaderResourceGroup = ShaderResourceGroup::Create(viewSrgShaderAsset, RPISystemInterface::Get()->GetViewSrgLayout()->GetName()); - } #if AZ_TRAIT_MASKED_OCCLUSION_CULLING_SUPPORTED m_maskedOcclusionCulling = MaskedOcclusionCulling::Create(); m_maskedOcclusionCulling->SetResolution(MaskedSoftwareOcclusionCullingWidth, MaskedSoftwareOcclusionCullingHeight); @@ -125,6 +124,7 @@ namespace AZ m_worldToViewMatrix = worldToView; m_worldToClipMatrix = m_viewToClipMatrix * m_worldToViewMatrix; + m_clipToWorldMatrix = m_worldToClipMatrix.GetInverseFull(); m_onWorldToViewMatrixChange.Signal(m_worldToViewMatrix); m_onWorldToClipMatrixChange.Signal(m_worldToClipMatrix); @@ -162,6 +162,7 @@ namespace AZ m_worldToViewMatrix = m_viewToWorldMatrix.GetInverseFast(); m_worldToClipMatrix = m_viewToClipMatrix * m_worldToViewMatrix; + m_clipToWorldMatrix = m_worldToClipMatrix.GetInverseFull(); // Only signal an update when there is a change, otherwise this might block // user input from changing the value. @@ -177,6 +178,7 @@ namespace AZ m_viewToClipMatrix = viewToClip; m_worldToClipMatrix = m_viewToClipMatrix * m_worldToViewMatrix; + m_clipToWorldMatrix = m_worldToClipMatrix.GetInverseFull(); // Update z depth constant simultaneously // zNear -> n, zFar -> f @@ -217,6 +219,16 @@ namespace AZ return m_viewToWorldMatrix; } + AZ::Matrix3x4 View::GetWorldToViewMatrixAsMatrix3x4() const + { + return AZ::Matrix3x4::UnsafeCreateFromMatrix4x4(m_worldToViewMatrix); + } + + AZ::Matrix3x4 View::GetViewToWorldMatrixAsMatrix3x4() const + { + return AZ::Matrix3x4::UnsafeCreateFromMatrix4x4(m_viewToWorldMatrix); + } + const AZ::Matrix4x4& View::GetViewToClipMatrix() const { return m_viewToClipMatrix; @@ -227,6 +239,11 @@ namespace AZ return m_worldToClipMatrix; } + const AZ::Matrix4x4& View::GetClipToWorldMatrix() const + { + return m_clipToWorldMatrix; + } + bool View::HasDrawListTag(RHI::DrawListTag drawListTag) { return drawListTag.IsValid() && m_drawListMask[drawListTag.GetIndex()]; @@ -237,24 +254,79 @@ namespace AZ return m_drawListContext.GetList(drawListTag); } - void View::FinalizeDrawLists() + void View::FinalizeDrawListsTG(AZ::TaskGraphEvent& finalizeDrawListsTGEvent) { AZ_PROFILE_SCOPE(RPI, "View: FinalizeDrawLists"); m_drawListContext.FinalizeLists(); - SortFinalizedDrawLists(); + SortFinalizedDrawListsTG(finalizeDrawListsTGEvent); + } + void View::FinalizeDrawListsJob(AZ::Job* parentJob) + { + AZ_PROFILE_SCOPE(RPI, "View: FinalizeDrawLists"); + m_drawListContext.FinalizeLists(); + SortFinalizedDrawListsJob(parentJob); } - void View::SortFinalizedDrawLists() + void View::SortFinalizedDrawListsTG(AZ::TaskGraphEvent& finalizeDrawListsTGEvent) { + AZ_PROFILE_SCOPE(RPI, "View: SortFinalizedDrawLists"); RHI::DrawListsByTag& drawListsByTag = m_drawListContext.GetMergedDrawListsByTag(); + AZ::TaskGraph drawListSortTG; + AZ::TaskDescriptor drawListSortTGDescriptor{"RPI_View_SortFinalizedDrawLists", "Graphics"}; for (size_t idx = 0; idx < drawListsByTag.size(); ++idx) { if (drawListsByTag[idx].size() > 1) { - SortDrawList(drawListsByTag[idx], RHI::DrawListTag(idx)); + drawListSortTG.AddTask(drawListSortTGDescriptor, [this, &drawListsByTag, idx]() + { + AZ_PROFILE_SCOPE(RPI, "View: SortDrawList Task"); + SortDrawList(drawListsByTag[idx], RHI::DrawListTag(idx)); + }); } } + if (!drawListSortTG.IsEmpty()) + { + drawListSortTG.Detach(); + drawListSortTG.Submit(&finalizeDrawListsTGEvent); + } + } + + void View::SortFinalizedDrawListsJob(AZ::Job* parentJob) + { + AZ_PROFILE_SCOPE(RPI, "View: SortFinalizedDrawLists"); + RHI::DrawListsByTag& drawListsByTag = m_drawListContext.GetMergedDrawListsByTag(); + + AZ::JobCompletion jobCompletion; + for (size_t idx = 0; idx < drawListsByTag.size(); ++idx) + { + if (drawListsByTag[idx].size() > 1) + { + auto jobLambda = [this, &drawListsByTag, idx]() + { + AZ_PROFILE_SCOPE(RPI, "View: SortDrawList Job"); + SortDrawList(drawListsByTag[idx], RHI::DrawListTag(idx)); + }; + Job* jobSortDrawList = aznew JobFunction(jobLambda, true, nullptr); // Auto-deletes + if (parentJob) + { + parentJob->StartAsChild(jobSortDrawList); + } + else + { + jobSortDrawList->SetDependent(&jobCompletion); + jobSortDrawList->Start(); + } + } + } + if (parentJob) + { + parentJob->WaitForChildren(); + } + else + { + jobCompletion.StartAndWaitForCompletion(); + } } void View::SortDrawList(RHI::DrawList& drawList, RHI::DrawListTag tag) @@ -263,12 +335,12 @@ namespace AZ passWithDrawListTag->SortDrawList(drawList); } - void View::ConnectWorldToViewMatrixChangedHandler(View::MatrixChangedEvent::Handler& handler) + void View::ConnectWorldToViewMatrixChangedHandler(MatrixChangedEvent::Handler& handler) { handler.Connect(m_onWorldToViewMatrixChange); } - void View::ConnectWorldToClipMatrixChangedHandler(View::MatrixChangedEvent::Handler& handler) + void View::ConnectWorldToClipMatrixChangedHandler(MatrixChangedEvent::Handler& handler) { handler.Connect(m_onWorldToClipMatrixChange); } @@ -361,16 +433,19 @@ namespace AZ { if (m_clipSpaceOffset.IsZero()) { - Matrix4x4 worldToClipPrevMatrix = m_viewToClipPrevMatrix * m_worldToViewPrevMatrix; - m_shaderResourceGroup->SetConstant(m_worldToClipPrevMatrixConstantIndex, worldToClipPrevMatrix); - m_shaderResourceGroup->SetConstant(m_viewProjectionMatrixConstantIndex, m_worldToClipMatrix); - m_shaderResourceGroup->SetConstant(m_projectionMatrixConstantIndex, m_viewToClipMatrix); - m_shaderResourceGroup->SetConstant(m_clipToWorldMatrixConstantIndex, m_clipToWorldMatrix); - m_shaderResourceGroup->SetConstant(m_projectionMatrixInverseConstantIndex, m_viewToClipMatrix.GetInverseFull()); + if (m_shaderResourceGroup) + { + Matrix4x4 worldToClipPrevMatrix = m_viewToClipPrevMatrix * m_worldToViewPrevMatrix; + m_shaderResourceGroup->SetConstant(m_worldToClipPrevMatrixConstantIndex, worldToClipPrevMatrix); + m_shaderResourceGroup->SetConstant(m_viewProjectionMatrixConstantIndex, m_worldToClipMatrix); + m_shaderResourceGroup->SetConstant(m_projectionMatrixConstantIndex, m_viewToClipMatrix); + m_shaderResourceGroup->SetConstant(m_clipToWorldMatrixConstantIndex, m_clipToWorldMatrix); + m_shaderResourceGroup->SetConstant(m_projectionMatrixInverseConstantIndex, m_viewToClipMatrix.GetInverseFull()); + } } else { - // Offset the current and previous frame clip matricies + // Offset the current and previous frame clip matrices Matrix4x4 offsetViewToClipMatrix = m_viewToClipMatrix; offsetViewToClipMatrix.SetElement(0, 2, m_clipSpaceOffset.GetX()); offsetViewToClipMatrix.SetElement(1, 2, m_clipSpaceOffset.GetY()); @@ -379,27 +454,33 @@ namespace AZ offsetViewToClipPrevMatrix.SetElement(0, 2, m_clipSpaceOffset.GetX()); offsetViewToClipPrevMatrix.SetElement(1, 2, m_clipSpaceOffset.GetY()); - // Build other matricies dependent on the view to clip matricies + // Build other matrices dependent on the view to clip matrices Matrix4x4 offsetWorldToClipMatrix = offsetViewToClipMatrix * m_worldToViewMatrix; Matrix4x4 offsetWorldToClipPrevMatrix = offsetViewToClipPrevMatrix * m_worldToViewPrevMatrix; Matrix4x4 offsetClipToViewMatrix = offsetViewToClipMatrix.GetInverseFull(); Matrix4x4 offsetClipToWorldMatrix = m_viewToWorldMatrix * offsetClipToViewMatrix; - - m_shaderResourceGroup->SetConstant(m_worldToClipPrevMatrixConstantIndex, offsetWorldToClipPrevMatrix); - m_shaderResourceGroup->SetConstant(m_viewProjectionMatrixConstantIndex, offsetWorldToClipMatrix); - m_shaderResourceGroup->SetConstant(m_projectionMatrixConstantIndex, offsetViewToClipMatrix); - m_shaderResourceGroup->SetConstant(m_clipToWorldMatrixConstantIndex, offsetClipToWorldMatrix); - m_shaderResourceGroup->SetConstant(m_projectionMatrixInverseConstantIndex, offsetViewToClipMatrix.GetInverseFull()); + + if (m_shaderResourceGroup) + { + m_shaderResourceGroup->SetConstant(m_worldToClipPrevMatrixConstantIndex, offsetWorldToClipPrevMatrix); + m_shaderResourceGroup->SetConstant(m_viewProjectionMatrixConstantIndex, offsetWorldToClipMatrix); + m_shaderResourceGroup->SetConstant(m_projectionMatrixConstantIndex, offsetViewToClipMatrix); + m_shaderResourceGroup->SetConstant(m_clipToWorldMatrixConstantIndex, offsetClipToWorldMatrix); + m_shaderResourceGroup->SetConstant(m_projectionMatrixInverseConstantIndex, offsetViewToClipMatrix.GetInverseFull()); + } } - m_shaderResourceGroup->SetConstant(m_worldPositionConstantIndex, m_position); - m_shaderResourceGroup->SetConstant(m_viewMatrixConstantIndex, m_worldToViewMatrix); - m_shaderResourceGroup->SetConstant(m_viewMatrixInverseConstantIndex, m_worldToViewMatrix.GetInverseFull()); - m_shaderResourceGroup->SetConstant(m_zConstantsConstantIndex, m_nearZ_farZ_farZTimesNearZ_farZMinusNearZ); - m_shaderResourceGroup->SetConstant(m_unprojectionConstantsIndex, m_unprojectionConstants); + if (m_shaderResourceGroup) + { + m_shaderResourceGroup->SetConstant(m_worldPositionConstantIndex, m_position); + m_shaderResourceGroup->SetConstant(m_viewMatrixConstantIndex, m_worldToViewMatrix); + m_shaderResourceGroup->SetConstant(m_viewMatrixInverseConstantIndex, m_worldToViewMatrix.GetInverseFull()); + m_shaderResourceGroup->SetConstant(m_zConstantsConstantIndex, m_nearZ_farZ_farZTimesNearZ_farZMinusNearZ); + m_shaderResourceGroup->SetConstant(m_unprojectionConstantsIndex, m_unprojectionConstants); - m_shaderResourceGroup->Compile(); + m_shaderResourceGroup->Compile(); + } m_viewToClipPrevMatrix = m_viewToClipMatrix; m_worldToViewPrevMatrix = m_worldToViewMatrix; @@ -410,6 +491,7 @@ namespace AZ void View::BeginCulling() { #if AZ_TRAIT_MASKED_OCCLUSION_CULLING_SUPPORTED + AZ_PROFILE_SCOPE(RPI, "View: ClearMaskedOcclusionBuffer"); m_maskedOcclusionCulling->ClearBuffer(); #endif } @@ -418,5 +500,30 @@ namespace AZ { return m_maskedOcclusionCulling; } + + void View::TryCreateShaderResourceGroup() + { + if (!m_shaderResourceGroup) + { + if (auto rpiSystemInterface = RPISystemInterface::Get()) + { + if (Data::Asset viewSrgShaderAsset = rpiSystemInterface->GetCommonShaderAssetForSrgs(); + viewSrgShaderAsset.IsReady()) + { + m_shaderResourceGroup = + ShaderResourceGroup::Create(viewSrgShaderAsset, rpiSystemInterface->GetViewSrgLayout()->GetName()); + } + } + } + } + + void View::OnAddToRenderPipeline() + { + TryCreateShaderResourceGroup(); + if (!m_shaderResourceGroup) + { + AZ_Warning("RPI::View", false, "Shader Resource Group failed to initialize"); + } + } } // namespace RPI } // namespace AZ diff --git a/Gems/Atom/RPI/Code/Source/RPI.Public/ViewportContext.cpp b/Gems/Atom/RPI/Code/Source/RPI.Public/ViewportContext.cpp index 77114e5cf5..1013d35285 100644 --- a/Gems/Atom/RPI/Code/Source/RPI.Public/ViewportContext.cpp +++ b/Gems/Atom/RPI/Code/Source/RPI.Public/ViewportContext.cpp @@ -36,12 +36,12 @@ namespace AZ AzFramework::WindowNotificationBus::Handler::BusConnect(nativeWindow); AzFramework::ViewportRequestBus::Handler::BusConnect(id); - m_onProjectionMatrixChangedHandler = ViewportContext::MatrixChangedEvent::Handler([this](const AZ::Matrix4x4& matrix) + m_onProjectionMatrixChangedHandler = MatrixChangedEvent::Handler([this](const AZ::Matrix4x4& matrix) { m_projectionMatrixChangedEvent.Signal(matrix); }); - m_onViewMatrixChangedHandler = ViewportContext::MatrixChangedEvent::Handler([this](const AZ::Matrix4x4& matrix) + m_onViewMatrixChangedHandler = MatrixChangedEvent::Handler([this](const AZ::Matrix4x4& matrix) { m_viewMatrixChangedEvent.Signal(matrix); }); @@ -203,6 +203,11 @@ namespace AZ return GetDefaultView()->GetWorldToViewMatrix(); } + AZ::Matrix3x4 ViewportContext::GetCameraViewMatrixAsMatrix3x4() const + { + return GetDefaultView()->GetWorldToViewMatrixAsMatrix3x4(); + } + void ViewportContext::SetCameraViewMatrix(const AZ::Matrix4x4& matrix) { GetDefaultView()->SetWorldToViewMatrix(matrix); diff --git a/Gems/Atom/RPI/Code/Source/RPI.Public/ViewportContextManager.cpp b/Gems/Atom/RPI/Code/Source/RPI.Public/ViewportContextManager.cpp index 6ea2491a0f..bba9ae7cf6 100644 --- a/Gems/Atom/RPI/Code/Source/RPI.Public/ViewportContextManager.cpp +++ b/Gems/Atom/RPI/Code/Source/RPI.Public/ViewportContextManager.cpp @@ -176,6 +176,20 @@ namespace AZ return {}; } + ViewportContextPtr ViewportContextManager::GetViewportContextByScene(const Scene* scene) const + { + AZStd::lock_guard lock(m_containerMutex); + for (const auto& viewportData : m_viewportContexts) + { + ViewportContextPtr viewportContext = viewportData.second.context.lock(); + if (viewportContext && viewportContext->GetRenderScene().get() == scene) + { + return viewportContext; + } + } + return {}; + } + void ViewportContextManager::RenameViewportContext(ViewportContextPtr viewportContext, const Name& newContextName) { auto currentAssignedViewportContext = GetViewportContextByName(newContextName); diff --git a/Gems/Atom/RPI/Code/Source/RPI.Reflect/Image/StreamingImageAssetHandler.cpp b/Gems/Atom/RPI/Code/Source/RPI.Reflect/Image/StreamingImageAssetHandler.cpp index fa39820329..dd16c565e7 100644 --- a/Gems/Atom/RPI/Code/Source/RPI.Reflect/Image/StreamingImageAssetHandler.cpp +++ b/Gems/Atom/RPI/Code/Source/RPI.Reflect/Image/StreamingImageAssetHandler.cpp @@ -7,6 +7,9 @@ */ #include +#include +#include +#include namespace AZ { @@ -40,5 +43,56 @@ namespace AZ return loadResult; } - } -} + + Data::AssetId StreamingImageAssetHandler::AssetMissingInCatalog(const Data::Asset& asset) + { + // Find out if the asset is missing completely, or just still processing + // and escalate the asset to the top of the list + AzFramework::AssetSystem::AssetStatus missingAssetStatus; + AzFramework::AssetSystemRequestBus::BroadcastResult( + missingAssetStatus, &AzFramework::AssetSystem::AssetSystemRequests::GetAssetStatusById, asset.GetId().m_guid); + + // Determine which fallback image to use + const char* relativePath = DefaultImageAssetPaths::DefaultFallback; + + bool useDebugFallbackImages = true; + if (auto settingsRegistry = AZ::SettingsRegistry::Get(); settingsRegistry != nullptr) + { + settingsRegistry->GetObject(useDebugFallbackImages, "/O3DE/Atom/RPI/UseDebugFallbackImages"); + } + + if (useDebugFallbackImages) + { + switch (missingAssetStatus) + { + case AzFramework::AssetSystem::AssetStatus::AssetStatus_Queued: + case AzFramework::AssetSystem::AssetStatus::AssetStatus_Compiling: + relativePath = DefaultImageAssetPaths::Processing; + break; + case AzFramework::AssetSystem::AssetStatus::AssetStatus_Failed: + relativePath = DefaultImageAssetPaths::ProcessingFailed; + break; + case AzFramework::AssetSystem::AssetStatus::AssetStatus_Missing: + case AzFramework::AssetSystem::AssetStatus::AssetStatus_Unknown: + case AzFramework::AssetSystem::AssetStatus::AssetStatus_Compiled: + relativePath = DefaultImageAssetPaths::Missing; + break; + } + } + + // Make sure the fallback image has been processed + AzFramework::AssetSystem::AssetStatus status = AzFramework::AssetSystem::AssetStatus_Unknown; + AzFramework::AssetSystemRequestBus::BroadcastResult( + status, &AzFramework::AssetSystemRequestBus::Events::CompileAssetSync, relativePath); + + // Return the asset id of the fallback image + Data::AssetId assetId{}; + bool autoRegisterIfNotFound = false; + Data::AssetCatalogRequestBus::BroadcastResult( + assetId, &Data::AssetCatalogRequestBus::Events::GetAssetIdByPath, relativePath, + azrtti_typeid(), autoRegisterIfNotFound); + + return assetId; + } + } // namespace RPI +} // namespace AZ diff --git a/Gems/Atom/RPI/Code/Source/RPI.Reflect/Material/LuaMaterialFunctor.cpp b/Gems/Atom/RPI/Code/Source/RPI.Reflect/Material/LuaMaterialFunctor.cpp index c33409f687..4212583e60 100644 --- a/Gems/Atom/RPI/Code/Source/RPI.Reflect/Material/LuaMaterialFunctor.cpp +++ b/Gems/Atom/RPI/Code/Source/RPI.Reflect/Material/LuaMaterialFunctor.cpp @@ -18,8 +18,6 @@ #include #include #include -#include - namespace AZ { namespace RPI @@ -123,7 +121,7 @@ namespace AZ void LuaMaterialFunctor::Process(RuntimeContext& context) { - AZ_TRACE_METHOD(); + AZ_PROFILE_FUNCTION(RPI); InitScriptContext(); @@ -141,7 +139,7 @@ namespace AZ void LuaMaterialFunctor::Process(EditorContext& context) { - AZ_TRACE_METHOD(); + AZ_PROFILE_FUNCTION(RPI); InitScriptContext(); diff --git a/Gems/Atom/RPI/Code/Source/RPI.Reflect/Material/MaterialAsset.cpp b/Gems/Atom/RPI/Code/Source/RPI.Reflect/Material/MaterialAsset.cpp index 36f4947e3d..3c6947b83d 100644 --- a/Gems/Atom/RPI/Code/Source/RPI.Reflect/Material/MaterialAsset.cpp +++ b/Gems/Atom/RPI/Code/Source/RPI.Reflect/Material/MaterialAsset.cpp @@ -226,10 +226,12 @@ namespace AZ if (changesWereApplied) { - AZ_Warning("MaterialAsset", false, + AZ_Warning( + "MaterialAsset", false, "This material is based on version '%u' of %s, but the material type is now at version '%u'. " - "Automatic updates are available. Consider updating the .material source file.", - originalVersion, m_materialTypeAsset.ToString().c_str(), m_materialTypeAsset->GetVersion()); + "Automatic updates are available. Consider updating the .material source file for '%s'.", + originalVersion, m_materialTypeAsset.ToString().c_str(), m_materialTypeAsset->GetVersion(), + GetId().ToString().c_str()); } m_materialTypeVersion = m_materialTypeAsset->GetVersion(); @@ -237,7 +239,7 @@ namespace AZ void MaterialAsset::ReinitializeMaterialTypeAsset(Data::Asset asset) { - Data::Asset newMaterialTypeAsset = { asset.GetAs(), AZ::Data::AssetLoadBehavior::PreLoad }; + Data::Asset newMaterialTypeAsset = Data::static_pointer_cast(asset); if (newMaterialTypeAsset) { diff --git a/Gems/Atom/RPI/Code/Source/RPI.Reflect/Material/MaterialPropertyValue.cpp b/Gems/Atom/RPI/Code/Source/RPI.Reflect/Material/MaterialPropertyValue.cpp index d1017139fc..b74305613e 100644 --- a/Gems/Atom/RPI/Code/Source/RPI.Reflect/Material/MaterialPropertyValue.cpp +++ b/Gems/Atom/RPI/Code/Source/RPI.Reflect/Material/MaterialPropertyValue.cpp @@ -118,12 +118,16 @@ namespace AZ else if (value.is>()) { result.m_value = Data::Asset( - AZStd::any_cast>(value).GetId(), azrtti_typeid()); + AZStd::any_cast>(value).GetId(), + azrtti_typeid(), + AZStd::any_cast>(value).GetHint()); } else if (value.is>()) { result.m_value = Data::Asset( - AZStd::any_cast>(value).GetId(), azrtti_typeid()); + AZStd::any_cast>(value).GetId(), + azrtti_typeid(), + AZStd::any_cast>(value).GetHint()); } else if (value.is>()) { diff --git a/Gems/Atom/RPI/Code/Source/RPI.Reflect/Material/MaterialTypeAsset.cpp b/Gems/Atom/RPI/Code/Source/RPI.Reflect/Material/MaterialTypeAsset.cpp index 76634201eb..48654d7769 100644 --- a/Gems/Atom/RPI/Code/Source/RPI.Reflect/Material/MaterialTypeAsset.cpp +++ b/Gems/Atom/RPI/Code/Source/RPI.Reflect/Material/MaterialTypeAsset.cpp @@ -188,6 +188,10 @@ namespace AZ void MaterialTypeAsset::SetReady() { m_status = AssetStatus::Ready; + + // If this was created dynamically using MaterialTypeAssetCreator (which is what calls SetReady()), + // we need to connect to the AssetBus for reloads. + PostLoadInit(); } bool MaterialTypeAsset::PostLoadInit() diff --git a/Gems/Atom/RPI/Code/Source/RPI.Reflect/Material/ShaderCollection.cpp b/Gems/Atom/RPI/Code/Source/RPI.Reflect/Material/ShaderCollection.cpp index 87076891dd..16813cb6b7 100644 --- a/Gems/Atom/RPI/Code/Source/RPI.Reflect/Material/ShaderCollection.cpp +++ b/Gems/Atom/RPI/Code/Source/RPI.Reflect/Material/ShaderCollection.cpp @@ -126,8 +126,8 @@ namespace AZ } ShaderCollection::Item::Item() + : m_renderStatesOverlay(RHI::GetInvalidRenderStates()) { - m_renderStatesOverlay = RHI::GetInvalidRenderStates(); } ShaderCollection::Item& ShaderCollection::operator[](size_t i) @@ -156,7 +156,8 @@ namespace AZ } ShaderCollection::Item::Item(const Data::Asset& shaderAsset, const AZ::Name& shaderTag, ShaderVariantId variantId) - : m_shaderAsset(shaderAsset) + : m_renderStatesOverlay(RHI::GetInvalidRenderStates()) + , m_shaderAsset(shaderAsset) , m_shaderVariantId(variantId) , m_shaderTag(shaderTag) , m_shaderOptionGroup(shaderAsset->GetShaderOptionGroupLayout(), variantId) @@ -164,7 +165,8 @@ namespace AZ } ShaderCollection::Item::Item(Data::Asset&& shaderAsset, const AZ::Name& shaderTag, ShaderVariantId variantId) - : m_shaderAsset(AZStd::move(shaderAsset)) + : m_renderStatesOverlay(RHI::GetInvalidRenderStates()) + , m_shaderAsset(AZStd::move(shaderAsset)) , m_shaderVariantId(variantId) , m_shaderTag(shaderTag) , m_shaderOptionGroup(shaderAsset->GetShaderOptionGroupLayout(), variantId) diff --git a/Gems/Atom/RPI/Code/Source/RPI.Reflect/Model/ModelAsset.cpp b/Gems/Atom/RPI/Code/Source/RPI.Reflect/Model/ModelAsset.cpp index 9a432643d7..0574803591 100644 --- a/Gems/Atom/RPI/Code/Source/RPI.Reflect/Model/ModelAsset.cpp +++ b/Gems/Atom/RPI/Code/Source/RPI.Reflect/Model/ModelAsset.cpp @@ -9,7 +9,6 @@ #include #include #include -#include #include #include #include @@ -137,7 +136,7 @@ namespace AZ // For runtime approach is to do this during asset processing and serialized spatial information alongside with mesh model assets const auto jobLambda = [&]() -> void { - AZ_TRACE_METHOD(); + AZ_PROFILE_FUNCTION(RPI); AZStd::unique_ptr tree = AZStd::make_unique(); tree->Build(this); @@ -201,23 +200,11 @@ namespace AZ AZ::Vector3& normal) const { const BufferAssetView& indexBufferView = mesh.GetIndexBufferAssetView(); - const AZStd::array_view& streamBufferList = mesh.GetStreamBufferInfoList(); + const BufferAssetView* positionBufferView = mesh.GetSemanticBufferAssetView(m_positionName); - // find position semantic - const ModelLodAsset::Mesh::StreamBufferInfo* positionBuffer = nullptr; - - for (const ModelLodAsset::Mesh::StreamBufferInfo& bufferInfo : streamBufferList) + if (positionBufferView && positionBufferView->GetBufferAsset().Get()) { - if (bufferInfo.m_semantic.m_name == m_positionName) - { - positionBuffer = &bufferInfo; - break; - } - } - - if (positionBuffer && positionBuffer->m_bufferAssetView.GetBufferAsset().Get()) - { - BufferAsset* bufferAssetViewPtr = positionBuffer->m_bufferAssetView.GetBufferAsset().Get(); + BufferAsset* bufferAssetViewPtr = positionBufferView->GetBufferAsset().Get(); BufferAsset* indexAssetViewPtr = indexBufferView.GetBufferAsset().Get(); if (!bufferAssetViewPtr || !indexAssetViewPtr) @@ -225,7 +212,7 @@ namespace AZ return false; } - RHI::BufferViewDescriptor positionBufferViewDesc = bufferAssetViewPtr->GetBufferViewDescriptor(); + RHI::BufferViewDescriptor positionBufferViewDesc = positionBufferView->GetBufferViewDescriptor(); AZStd::array_view positionRawBuffer = bufferAssetViewPtr->GetBuffer(); const uint32_t positionElementSize = positionBufferViewDesc.m_elementSize; @@ -234,22 +221,28 @@ namespace AZ // Position is 3 floats if (positionElementSize != sizeof(float) * 3) { - AZ_Warning("ModelAsset", false, "unsupported mesh posiiton format, only full 3 floats per vertex are supported at the moment"); + AZ_Warning( + "ModelAsset", false, "unsupported mesh posiiton format, only full 3 floats per vertex are supported at the moment"); return false; } + RHI::BufferViewDescriptor indexBufferViewDesc = indexBufferView.GetBufferViewDescriptor(); AZStd::array_view indexRawBuffer = indexAssetViewPtr->GetBuffer(); - RHI::BufferViewDescriptor indexRawDesc = indexAssetViewPtr->GetBufferViewDescriptor(); - - bool anyHit = false; const AZ::Vector3 rayEnd = rayStart + rayDir; AZ::Vector3 a, b, c; AZ::Vector3 intersectionNormal; + bool anyHit = false; float shortestDistanceNormalized = AZStd::numeric_limits::max(); - const AZ::u32* indexPtr = reinterpret_cast(indexRawBuffer.data()); - for (uint32_t indexIter = 0; indexIter <= indexRawDesc.m_elementCount - 3; indexIter += 3, indexPtr += 3) + + const AZ::u32* indexPtr = reinterpret_cast( + indexRawBuffer.data() + (indexBufferViewDesc.m_elementOffset * indexBufferViewDesc.m_elementSize)); + const float* positionPtr = reinterpret_cast( + positionRawBuffer.data() + (positionBufferViewDesc.m_elementOffset * positionBufferViewDesc.m_elementSize)); + + constexpr int StepSize = 3; // number of values per vertex (x, y, z) + for (uint32_t indexIter = 0; indexIter < indexBufferViewDesc.m_elementCount; indexIter += StepSize, indexPtr += StepSize) { AZ::u32 index0 = indexPtr[0]; AZ::u32 index1 = indexPtr[1]; @@ -261,17 +254,17 @@ namespace AZ return false; } - const float* p = reinterpret_cast(&positionRawBuffer[index0 * positionElementSize]); - a.Set(const_cast(p)); // faster than AZ::Vector3 c-tor - - p = reinterpret_cast(&positionRawBuffer[index1 * positionElementSize]); - b.Set(const_cast(p)); - - p = reinterpret_cast(&positionRawBuffer[index2 * positionElementSize]); - c.Set(const_cast(p)); + // faster than AZ::Vector3 c-tor + const float* aRef = &positionPtr[index0 * StepSize]; + a.Set(aRef); + const float* bRef = &positionPtr[index1 * StepSize]; + b.Set(bRef); + const float* cRef = &positionPtr[index2 * StepSize]; + c.Set(cRef); float currentDistanceNormalized; - if (AZ::Intersect::IntersectSegmentTriangleCCW(rayStart, rayEnd, a, b, c, intersectionNormal, currentDistanceNormalized)) + if (AZ::Intersect::IntersectSegmentTriangleCCW( + rayStart, rayEnd, a, b, c, intersectionNormal, currentDistanceNormalized)) { anyHit = true; diff --git a/Gems/Atom/RPI/Code/Source/RPI.Reflect/Shader/ShaderAsset.cpp b/Gems/Atom/RPI/Code/Source/RPI.Reflect/Shader/ShaderAsset.cpp index 84757d58ab..6daca5553e 100644 --- a/Gems/Atom/RPI/Code/Source/RPI.Reflect/Shader/ShaderAsset.cpp +++ b/Gems/Atom/RPI/Code/Source/RPI.Reflect/Shader/ShaderAsset.cpp @@ -100,7 +100,7 @@ namespace AZ ->Field("pipelineStateType", &ShaderAsset::m_pipelineStateType) ->Field("shaderOptionGroupLayout", &ShaderAsset::m_shaderOptionGroupLayout) ->Field("drawListName", &ShaderAsset::m_drawListName) - ->Field("shaderAssetBuildTimestamp", &ShaderAsset::m_shaderAssetBuildTimestamp) + ->Field("shaderAssetBuildTimestamp", &ShaderAsset::m_buildTimestamp) ->Field("perAPIShaderData", &ShaderAsset::m_perAPIShaderData) ; } @@ -108,7 +108,6 @@ namespace AZ ShaderAsset::~ShaderAsset() { - Data::AssetBus::Handler::BusDisconnect(); ShaderVariantFinderNotificationBus::Handler::BusDisconnect(); AssetInitBus::Handler::BusDisconnect(); } @@ -134,11 +133,11 @@ namespace AZ return m_drawListName; } - AZStd::sys_time_t ShaderAsset::GetShaderAssetBuildTimestamp() const + AZStd::sys_time_t ShaderAsset::GetBuildTimestamp() const { - return m_shaderAssetBuildTimestamp; + return m_buildTimestamp; } - + void ShaderAsset::SetReady() { m_status = AssetStatus::Ready; @@ -256,7 +255,7 @@ namespace AZ } return GetRootVariant(supervariantIndex); } - else if (variant->GetBuildTimestamp() >= m_shaderAssetBuildTimestamp) + else if (variant->GetBuildTimestamp() >= m_buildTimestamp) { return variant; } @@ -570,46 +569,16 @@ namespace AZ bool ShaderAsset::PostLoadInit() { - // Once the ShaderAsset is loaded, it is necessary to listen for changes in the Root Variant Asset. - Data::AssetBus::Handler::BusConnect(GetRootVariant().GetId()); ShaderVariantFinderNotificationBus::Handler::BusConnect(GetId()); - AssetInitBus::Handler::BusDisconnect(); - return true; } - - void ShaderAsset::ReinitializeRootShaderVariant(Data::Asset asset) - { - Data::Asset shaderVariantAsset = { asset.GetAs(), AZ::Data::AssetLoadBehavior::PreLoad }; - AZ_Assert(shaderVariantAsset->GetStableId() == RootShaderVariantStableId, "Was expecting to update the root variant"); - SupervariantIndex supervariantIndex = GetSupervariantIndexFromAssetId(asset.GetId()); - GetCurrentShaderApiData().m_supervariants[supervariantIndex.GetIndex()].m_rootShaderVariantAsset = asset; - ShaderReloadNotificationBus::Event(GetId(), &ShaderReloadNotificationBus::Events::OnShaderAssetReinitialized, Data::Asset{ this, AZ::Data::AssetLoadBehavior::PreLoad } ); - } - /////////////////////////////////////////////////////////////////////// - // AssetBus overrides... - void ShaderAsset::OnAssetReloaded(Data::Asset asset) + + void ShaderAsset::UpdateRootShaderVariantAsset(SupervariantIndex supervariantIndex, Data::Asset newRootVariant) { - ShaderReloadDebugTracker::ScopedSection reloadSection("{%p}->ShaderAsset::OnAssetReloaded %s", this, asset.GetHint().c_str()); - ReinitializeRootShaderVariant(asset); + GetCurrentShaderApiData().m_supervariants[supervariantIndex.GetIndex()].m_rootShaderVariantAsset = newRootVariant; } - void ShaderAsset::OnAssetReady(Data::Asset asset) - { - // We have to listen to OnAssetReady, OnAssetReloaded isn't enough, because of the following scenario: - // The user changes a .shader file, which causes the AP to rebuild the ShaderAsset and root ShaderVariantAsset. - // 1) Thread A creates the new ShaderAsset, loads it, and gets the old ShaderVariantAsset. - // 2) Thread B creates the new ShaderVariantAsset, loads it, and calls OnAssetReloaded. - // 3) Main thread calls ShaderAsset::PostLoadInit which connects to the AssetBus but it's too late to receive OnAssetReloaded, - // so it continues using the old ShaderVariantAsset instead of the new one. - // The OnAssetReady bus function is called automatically whenever a connection to AssetBus is made, so listening to this gives - // us the opportunity to assign the appropriate ShaderVariantAsset. - - ShaderReloadDebugTracker::ScopedSection reloadSection("{%p}->ShaderAsset::OnAssetReady %s", this, asset.GetHint().c_str()); - ReinitializeRootShaderVariant(asset); - } - /////////////////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////////////// /// ShaderVariantFinderNotificationBus overrides @@ -628,7 +597,6 @@ namespace AZ m_shaderVariantTree = shaderVariantTreeAsset; } lock.unlock(); - ShaderReloadNotificationBus::Event(GetId(), &ShaderReloadNotificationBus::Events::OnShaderAssetReinitialized, Data::Asset{ this, AZ::Data::AssetLoadBehavior::PreLoad }); } /////////////////////////////////////////////////////////////////// diff --git a/Gems/Atom/RPI/Code/Source/RPI.Reflect/Shader/ShaderAssetCreator.cpp b/Gems/Atom/RPI/Code/Source/RPI.Reflect/Shader/ShaderAssetCreator.cpp index 87338f2185..5df37aa211 100644 --- a/Gems/Atom/RPI/Code/Source/RPI.Reflect/Shader/ShaderAssetCreator.cpp +++ b/Gems/Atom/RPI/Code/Source/RPI.Reflect/Shader/ShaderAssetCreator.cpp @@ -21,7 +21,7 @@ namespace AZ { if (ValidateIsReady()) { - m_asset->m_shaderAssetBuildTimestamp = shaderAssetBuildTimestamp; + m_asset->m_buildTimestamp = shaderAssetBuildTimestamp; } } @@ -390,7 +390,7 @@ namespace AZ m_asset->m_pipelineStateType = sourceShaderAsset.m_pipelineStateType; m_asset->m_drawListName = sourceShaderAsset.m_drawListName; m_asset->m_shaderOptionGroupLayout = sourceShaderAsset.m_shaderOptionGroupLayout; - m_asset->m_shaderAssetBuildTimestamp = sourceShaderAsset.m_shaderAssetBuildTimestamp; + m_asset->m_buildTimestamp = sourceShaderAsset.m_buildTimestamp; // copy root variant assets for (auto& perAPIShaderData : sourceShaderAsset.m_perAPIShaderData) diff --git a/Gems/Atom/RPI/Code/Source/RPI.Reflect/Shader/ShaderVariantAsset.cpp b/Gems/Atom/RPI/Code/Source/RPI.Reflect/Shader/ShaderVariantAsset.cpp index 442fc6a79f..ec1a65a6d5 100644 --- a/Gems/Atom/RPI/Code/Source/RPI.Reflect/Shader/ShaderVariantAsset.cpp +++ b/Gems/Atom/RPI/Code/Source/RPI.Reflect/Shader/ShaderVariantAsset.cpp @@ -60,7 +60,7 @@ namespace AZ } } - AZStd::sys_time_t ShaderVariantAsset::GetBuildTimestamp() const + AZ::u64 ShaderVariantAsset::GetBuildTimestamp() const { return m_buildTimestamp; } diff --git a/Gems/Atom/RPI/Code/Tests.Builders/BuilderTestFixture.h b/Gems/Atom/RPI/Code/Tests.Builders/BuilderTestFixture.h index 31c1bc6715..4502d33e0b 100644 --- a/Gems/Atom/RPI/Code/Tests.Builders/BuilderTestFixture.h +++ b/Gems/Atom/RPI/Code/Tests.Builders/BuilderTestFixture.h @@ -10,6 +10,7 @@ #include #include +#include #include #include #include @@ -46,7 +47,6 @@ namespace UnitTest bool DeleteEntity(const AZ::EntityId&) override { return false; } AZ::Entity* FindEntity(const AZ::EntityId&) override { return nullptr; } AZ::BehaviorContext* GetBehaviorContext() override { return nullptr; } - const char* GetAppRoot() const override { return nullptr; } const char* GetEngineRoot() const override { return nullptr; } const char* GetExecutableFolder() const override { return nullptr; } void EnumerateEntities(const EntityCallback& /*callback*/) override {} diff --git a/Gems/Atom/RPI/Code/Tests/Common/AssetManagerTestFixture.h b/Gems/Atom/RPI/Code/Tests/Common/AssetManagerTestFixture.h index ee3ad94d4f..fb88e62617 100644 --- a/Gems/Atom/RPI/Code/Tests/Common/AssetManagerTestFixture.h +++ b/Gems/Atom/RPI/Code/Tests/Common/AssetManagerTestFixture.h @@ -44,7 +44,6 @@ namespace UnitTest AZ::Entity* FindEntity(const AZ::EntityId&) override { return nullptr; } AZ::BehaviorContext* GetBehaviorContext() override { return nullptr; } AZ::JsonRegistrationContext* GetJsonRegistrationContext() override { return nullptr; } - const char* GetAppRoot() const override { return nullptr; } const char* GetEngineRoot() const override { return nullptr; } const char* GetExecutableFolder() const override { return nullptr; } void EnumerateEntities(const EntityCallback& /*callback*/) override {} diff --git a/Gems/Atom/RPI/Code/Tests/Common/RPITestFixture.cpp b/Gems/Atom/RPI/Code/Tests/Common/RPITestFixture.cpp index 5343c295d8..8c685656ba 100644 --- a/Gems/Atom/RPI/Code/Tests/Common/RPITestFixture.cpp +++ b/Gems/Atom/RPI/Code/Tests/Common/RPITestFixture.cpp @@ -69,6 +69,19 @@ namespace UnitTest assetPath /= "Cache"; AZ::IO::FileIOBase::GetInstance()->SetAlias("@products@", assetPath.c_str()); + // Remark, AZ::Utils::GetProjectPath() is not used when defining "user" folder, + // instead We use AZ::Test::GetEngineRootPath();. + // Reason: + // When running unit tests, using AZ::Utils::GetProjectPath() will resolve to something like: + // "/data/workspace/o3de/build/linux/External/Atom-9a4d112b/RPI/Code/Cache" + // The ShaderMetricSystem.cpp writes to the @user@ folder and the following runtime error occurs: + // "You may not alter data inside the asset cache. Please check the call stack and consider writing into the source asset folder instead." + // "Attempted write location: /data/workspace/o3de/build/linux/External/Atom-9a4d112b/RPI/Code/Cache/user/shadermetrics.json" + // To avoid the error We use AZ::Test::GetEngineRootPath(); + AZ::IO::Path userPath = AZ::Test::GetEngineRootPath(); + userPath /= "user"; + AZ::IO::FileIOBase::GetInstance()->SetAlias("@user@", userPath.c_str()); + m_jsonRegistrationContext = AZStd::make_unique(); m_jsonSystemComponent = AZStd::make_unique(); m_jsonSystemComponent->Reflect(m_jsonRegistrationContext.get()); diff --git a/Gems/Atom/RPI/Code/Tests/Common/RPITestFixture.h b/Gems/Atom/RPI/Code/Tests/Common/RPITestFixture.h index 48d404d268..0707528d7f 100644 --- a/Gems/Atom/RPI/Code/Tests/Common/RPITestFixture.h +++ b/Gems/Atom/RPI/Code/Tests/Common/RPITestFixture.h @@ -21,7 +21,7 @@ #include #include #include -#include +#include namespace UnitTest { diff --git a/Gems/Atom/RPI/Code/Tests/Material/LuaMaterialFunctorTests.cpp b/Gems/Atom/RPI/Code/Tests/Material/LuaMaterialFunctorTests.cpp index 37d0930d97..2608ac3a9b 100644 --- a/Gems/Atom/RPI/Code/Tests/Material/LuaMaterialFunctorTests.cpp +++ b/Gems/Atom/RPI/Code/Tests/Material/LuaMaterialFunctorTests.cpp @@ -425,11 +425,7 @@ namespace UnitTest EXPECT_EQ(Vector4(1.0f, 2.0f, 3.0f, 4.0f) / 4.0f, testData.GetMaterial()->GetRHIShaderResourceGroup()->GetData().GetConstant(testData.GetSrgConstantIndex())); } -#if AZ_TRAIT_DISABLE_FAILED_ATOM_RPI_TESTS - TEST_F(LuaMaterialFunctorTests, DISABLED_LuaMaterialFunctor_RuntimeContext_GetMaterialProperty_SetShaderConstant_Color) -#else TEST_F(LuaMaterialFunctorTests, LuaMaterialFunctor_RuntimeContext_GetMaterialProperty_SetShaderConstant_Color) -#endif // AZ_TRAIT_DISABLE_FAILED_ATOM_RPI_TESTS { using namespace AZ::RPI; diff --git a/Gems/Atom/RPI/Code/Tests/Material/MaterialSourceDataTests.cpp b/Gems/Atom/RPI/Code/Tests/Material/MaterialSourceDataTests.cpp index fa8eed35de..d4bf3e5eaa 100644 --- a/Gems/Atom/RPI/Code/Tests/Material/MaterialSourceDataTests.cpp +++ b/Gems/Atom/RPI/Code/Tests/Material/MaterialSourceDataTests.cpp @@ -625,23 +625,6 @@ namespace UnitTest // We use local functions to easily start a new MaterialAssetCreator for each test case because // the AssetCreator would just skip subsequent operations after the first failure is detected. - auto expectError = [](AZStd::function setOneBadInput, [[maybe_unused]] uint32_t expectedAsserts = 2) - { - MaterialSourceData sourceData; - - sourceData.m_materialType = "@exefolder@/Temp/test.materialtype"; - - AddPropertyGroup(sourceData, "general"); - - setOneBadInput(sourceData); - - AZ_TEST_START_ASSERTTEST; - auto materialAssetOutcome = sourceData.CreateMaterialAsset(Uuid::CreateRandom(), "", false); - AZ_TEST_STOP_ASSERTTEST(expectedAsserts); // Usually one for the initial error, and one for when End() is called - - EXPECT_FALSE(materialAssetOutcome.IsSuccess()); - }; - auto expectWarning = [](AZStd::function setOneBadInput, [[maybe_unused]] uint32_t expectedAsserts = 1) { MaterialSourceData sourceData; @@ -692,10 +675,10 @@ namespace UnitTest }); // Missing image reference - expectError([](MaterialSourceData& materialSourceData) + expectWarning([](MaterialSourceData& materialSourceData) { AddProperty(materialSourceData, "general", "MyImage", AZStd::string("doesNotExist.streamingimage")); - }, 3); // Expect a 3rd error because AssetUtils reports its own assertion failure + }); } diff --git a/Gems/Atom/RPI/Code/Tests/Material/MaterialTests.cpp b/Gems/Atom/RPI/Code/Tests/Material/MaterialTests.cpp index 9c3e08ee08..477978875b 100644 --- a/Gems/Atom/RPI/Code/Tests/Material/MaterialTests.cpp +++ b/Gems/Atom/RPI/Code/Tests/Material/MaterialTests.cpp @@ -211,21 +211,13 @@ namespace UnitTest EXPECT_NE(materialInstance3, materialInstance4); } -#if AZ_TRAIT_DISABLE_FAILED_ATOM_RPI_TESTS - TEST_F(MaterialTests, DISABLED_TestInitialValuesFromMaterial) -#else TEST_F(MaterialTests, TestInitialValuesFromMaterial) -#endif // AZ_TRAIT_DISABLE_FAILED_ATOM_RPI_TESTS { Data::Instance material = Material::FindOrCreate(m_testMaterialAsset); ValidateInitialValuesFromMaterial(material); } -#if AZ_TRAIT_DISABLE_FAILED_ATOM_RPI_TESTS - TEST_F(MaterialTests, DISABLED_TestSetPropertyValue) -#else TEST_F(MaterialTests, TestSetPropertyValue) -#endif // AZ_TRAIT_DISABLE_FAILED_ATOM_RPI_TESTS { Data::Instance material = Material::FindOrCreate(m_testMaterialAsset); @@ -713,11 +705,7 @@ namespace UnitTest AZ_TEST_STOP_ASSERTTEST(2); } -#if AZ_TRAIT_DISABLE_FAILED_ATOM_RPI_TESTS - TEST_F(MaterialTests, DISABLED_Error_SetPropertyValue_WrongDataType) -#else TEST_F(MaterialTests, Error_SetPropertyValue_WrongDataType) -#endif // AZ_TRAIT_DISABLE_FAILED_ATOM_RPI_TESTS { Data::Instance material = Material::FindOrCreate(m_testMaterialAsset); @@ -888,4 +876,43 @@ namespace UnitTest EXPECT_EQ(indexFromOldName, indexFromNewName); } + template + void CheckPropertyValueRoundTrip(const T& value) + { + AZ::RPI::MaterialPropertyValue materialPropertyValue{value}; + AZStd::any anyValue{value}; + AZ::RPI::MaterialPropertyValue materialPropertyValueFromAny = MaterialPropertyValue::FromAny(anyValue); + AZ::RPI::MaterialPropertyValue materialPropertyValueFromRoundTrip = MaterialPropertyValue::FromAny(MaterialPropertyValue::ToAny(materialPropertyValue)); + + EXPECT_EQ(materialPropertyValue, materialPropertyValueFromAny); + EXPECT_EQ(materialPropertyValue, materialPropertyValueFromRoundTrip); + + if (materialPropertyValue.Is>()) + { + EXPECT_EQ(materialPropertyValue.GetValue>().GetHint(), materialPropertyValueFromAny.GetValue>().GetHint()); + EXPECT_EQ(materialPropertyValue.GetValue>().GetHint(), materialPropertyValueFromRoundTrip.GetValue>().GetHint()); + } + } + + TEST_F(MaterialTests, TestMaterialPropertyValueAsAny) + { + CheckPropertyValueRoundTrip(true); + CheckPropertyValueRoundTrip(false); + CheckPropertyValueRoundTrip(7); + CheckPropertyValueRoundTrip(8u); + CheckPropertyValueRoundTrip(9.0f); + CheckPropertyValueRoundTrip(AZ::Vector2(1.0f, 2.0f)); + CheckPropertyValueRoundTrip(AZ::Vector3(1.0f, 2.0f, 3.0f)); + CheckPropertyValueRoundTrip(AZ::Vector4(1.0f, 2.0f, 3.0f, 4.0f)); + CheckPropertyValueRoundTrip(AZ::Color(1.0f, 2.0f, 3.0f, 4.0f)); + CheckPropertyValueRoundTrip(Data::Asset{}); + CheckPropertyValueRoundTrip(Data::Asset{}); + CheckPropertyValueRoundTrip(Data::Asset{}); + CheckPropertyValueRoundTrip(Data::Asset{Uuid::CreateRandom(), azrtti_typeid(), "TestAssetPath.png"}); + CheckPropertyValueRoundTrip(Data::Asset{Uuid::CreateRandom(), azrtti_typeid(), "TestAssetPath.png"}); + CheckPropertyValueRoundTrip(Data::Asset{Uuid::CreateRandom(), azrtti_typeid(), "TestAssetPath.png"}); + CheckPropertyValueRoundTrip(m_testImageAsset); + CheckPropertyValueRoundTrip(Data::Instance{m_testImage}); + CheckPropertyValueRoundTrip(AZStd::string{"hello"}); + } } diff --git a/Gems/Atom/RPI/Code/Tests/Model/ModelTests.cpp b/Gems/Atom/RPI/Code/Tests/Model/ModelTests.cpp index 7b07e14de0..81d773d8c0 100644 --- a/Gems/Atom/RPI/Code/Tests/Model/ModelTests.cpp +++ b/Gems/Atom/RPI/Code/Tests/Model/ModelTests.cpp @@ -38,7 +38,7 @@ namespace UnitTest bufferData.resize(bufferSize); //The actual data doesn't matter - const uint8_t bufferDataSize = static_cast(bufferData.size()); + const uint8_t bufferDataSize = aznumeric_cast(bufferData.size()); for (uint8_t i = 0; i < bufferDataSize; ++i) { bufferData[i] = i; @@ -248,7 +248,8 @@ namespace UnitTest return asset; } - AZ::Data::Asset BuildTestModel(const uint32_t lodCount, const uint32_t sharedMeshCount, const uint32_t separateMeshCount, ExpectedModel& expectedModel) + AZ::Data::Asset BuildTestModel( + const uint32_t lodCount, const uint32_t sharedMeshCount, const uint32_t separateMeshCount, ExpectedModel& expectedModel) { using namespace AZ; @@ -989,6 +990,9 @@ namespace UnitTest uint32_t{ 0 }, 2, 1, 1, 2, 3, 4, 5, 6, 5, 7, 6, 0, 4, 2, 4, 6, 2, 1, 3, 5, 5, 3, 7, 0, 1, 4, 4, 1, 5, 2, 6, 3, 6, 7, 3, }; + static constexpr AZStd::array QuadPositions = { -1.0f, 1.0f, 0.0f, 1.0f, 1.0f, 0.0f, -1.0f, -1.0f, 0.0f, 1.0f, -1.0f, 0.0f }; + static constexpr AZStd::array QuadIndices = { uint32_t{ 0 }, 2, 1, 1, 2, 3 }; + // This class creates a Model with one LOD, whose mesh contains 2 planes. Plane 1 is in the XY plane at Z=-0.5, and // plane 2 is in the XY plane at Z=0.5. The two planes each have 9 quads which have been triangulated. It only has // a position and index buffer. @@ -1031,42 +1035,80 @@ namespace UnitTest static constexpr inline auto minmaxElement = AZStd::minmax_element(begin(TwoSeparatedPlanesIndices), end(TwoSeparatedPlanesIndices)); static_assert(*minmaxElement.second == (TwoSeparatedPlanesPositions.size() / 3) - 1); - template class TD; class TestMesh { public: + TestMesh() = default; + TestMesh(const float* positions, size_t positionCount, const uint32_t* indices, size_t indicesCount) { AZ::RPI::ModelLodAssetCreator lodCreator; - lodCreator.Begin(AZ::Data::AssetId(AZ::Uuid::CreateRandom())); + Begin(lodCreator); + Add(lodCreator, positions, positionCount, /*positionOffset=*/0, indices, indicesCount, /*indexOffset=*/0); + End(lodCreator); + } + // initiate the asset lod creation process (note: End must be called after meshes have been added). + void Begin(AZ::RPI::ModelLodAssetCreator& lodCreator) + { + lodCreator.Begin(AZ::Data::AssetId(AZ::Uuid::CreateRandom())); + } + + // add a sub mesh and reuse existing position/index buffer (be very careful with the offsets used) + void Add( + AZ::RPI::ModelLodAssetCreator& lodCreator, + const float* positions, + size_t positionCount, + size_t positionOffset, + AZ::Data::Asset positionBuffer, + const uint32_t* indices, + size_t indexCount, + size_t indexOffset, + AZ::Data::Asset indexBuffer) + { lodCreator.BeginMesh(); - lodCreator.SetMeshAabb(AZ::Aabb::CreateFromMinMax({-1.0f, -1.0f, -0.5f}, {1.0f, 1.0f, 0.5f})); + lodCreator.SetMeshAabb(AZ::Aabb::CreateFromMinMax({ -1.0f, -1.0f, -0.5f }, { 1.0f, 1.0f, 0.5f })); lodCreator.SetMeshMaterialSlot(AZ::Sfmt::GetInstance().Rand32()); - { - AZ::Data::Asset indexBuffer = BuildTestBuffer(static_cast(indicesCount), sizeof(uint32_t)); - AZStd::copy(indices, indices + indicesCount, reinterpret_cast(const_cast(indexBuffer->GetBuffer().data()))); - lodCreator.SetMeshIndexBuffer({ - indexBuffer, - AZ::RHI::BufferViewDescriptor::CreateStructured(0, static_cast(indicesCount), sizeof(uint32_t)) - }); - } + AZStd::copy( + indices, indices + indexCount, + reinterpret_cast(const_cast(indexBuffer->GetBuffer().data())) + indexOffset); + lodCreator.SetMeshIndexBuffer( + { indexBuffer, + AZ::RHI::BufferViewDescriptor::CreateStructured( + aznumeric_cast(indexOffset), aznumeric_cast(indexCount), sizeof(uint32_t)) }); + AZStd::copy( + positions, positions + positionCount, + reinterpret_cast(const_cast(positionBuffer->GetBuffer().data())) + positionOffset); + lodCreator.AddMeshStreamBuffer( + AZ::RHI::ShaderSemantic(AZ::Name("POSITION")), AZ::Name(), + { positionBuffer, + AZ::RHI::BufferViewDescriptor::CreateStructured( + aznumeric_cast(positionOffset / 3), aznumeric_cast(positionCount / 3), sizeof(float) * 3) }); - { - AZ::Data::Asset positionBuffer = BuildTestBuffer(static_cast(positionCount / 3), sizeof(float) * 3); - AZStd::copy(positions, positions + positionCount, reinterpret_cast(const_cast(positionBuffer->GetBuffer().data()))); - lodCreator.AddMeshStreamBuffer( - AZ::RHI::ShaderSemantic(AZ::Name("POSITION")), - AZ::Name(), - { - positionBuffer, - AZ::RHI::BufferViewDescriptor::CreateStructured(0, static_cast(positionCount / 3), sizeof(float) * 3) - } - ); - } lodCreator.EndMesh(); + } + // overload of Add - here a new index/position buffer is created for the new data instead of potentially reusing an existing buffer + void Add( + AZ::RPI::ModelLodAssetCreator& lodCreator, + const float* positions, + size_t positionCount, + size_t positionOffset, + const uint32_t* indices, + size_t indexCount, + size_t indexOffset) + { + AZ::Data::Asset indexBuffer = BuildTestBuffer(aznumeric_cast(indexCount), sizeof(uint32_t)); + AZ::Data::Asset positionBuffer = + BuildTestBuffer(aznumeric_cast(positionCount / 3), sizeof(float) * 3); + + Add(lodCreator, positions, positionCount, positionOffset, positionBuffer, indices, indexCount, indexOffset, indexBuffer); + } + + // complete the asset lod creation process + void End(AZ::RPI::ModelLodAssetCreator& lodCreator) + { AZ::Data::Asset lodAsset; lodCreator.End(lodAsset); @@ -1199,7 +1241,7 @@ namespace UnitTest constexpr float rayLength = 100.0f; EXPECT_THAT( m_kdTree->RayIntersection( - AZ::Vector3::CreateZero(), AZ::Vector3::CreateAxisZ(-rayLength), t, normal), testing::Eq(true)); + AZ::Vector3::CreateZero(), AZ::Vector3::CreateAxisZ(-rayLength), t, normal), testing::IsTrue()); EXPECT_THAT(t, testing::FloatEq(0.005f)); } @@ -1210,7 +1252,7 @@ namespace UnitTest constexpr float rayLength = 10.0f; EXPECT_THAT( - m_kdTree->RayIntersection(AZ::Vector3::CreateAxisZ(0.75f), AZ::Vector3::CreateAxisZ(-rayLength), t, normal), testing::Eq(true)); + m_kdTree->RayIntersection(AZ::Vector3::CreateAxisZ(0.75f), AZ::Vector3::CreateAxisZ(-rayLength), t, normal), testing::IsTrue()); EXPECT_THAT(t, testing::FloatEq(0.025f)); } @@ -1288,7 +1330,7 @@ namespace UnitTest EXPECT_THAT( m_mesh->GetModel()->LocalRayIntersectionAgainstModel( AZ::Vector3::CreateAxisZ(5.0f), -AZ::Vector3::CreateAxisZ(10.0f), AllowBruteForce, t, normal), - testing::Eq(true)); + testing::IsTrue()); EXPECT_THAT(t, testing::FloatEq(0.4f)); } @@ -1302,8 +1344,87 @@ namespace UnitTest EXPECT_THAT( m_mesh->GetModel()->LocalRayIntersectionAgainstModel( AZ::Vector3::CreateAxisY(10.0f), -AZ::Vector3::CreateAxisY(9.0f), AllowBruteForce, t, normal), - testing::Eq(true)); + testing::IsTrue()); EXPECT_THAT(t, testing::FloatEq(1.0f)); EXPECT_THAT(normal, IsClose(AZ::Vector3::CreateAxisY())); } + + // test to verify that each secondary sub meshes are still intersected with correctly when using brute-force + // ray intersection + class BruteForceMultiModelIntersectsFixture : public ModelTests + { + public: + inline static const float QuadOffsetX = 15.0f; + + void SetUp() override + { + ModelTests::SetUp(); + m_mesh = AZStd::make_unique(); + + AZ::RPI::ModelLodAssetCreator lodCreator; + m_mesh->Begin(lodCreator); + + // take default quad positions and offset in X by set amount + AZStd::vector offsetQuadPositions; + offsetQuadPositions.resize(QuadPositions.size()); + AZStd::copy(QuadPositions.begin(), QuadPositions.end(), offsetQuadPositions.begin()); + for (size_t xVertIndex = 0; xVertIndex < offsetQuadPositions.size(); xVertIndex += 3) + { + offsetQuadPositions[xVertIndex] += QuadOffsetX; + } + + // create shared buffer to store cube and quad mesh in the same buffer + const size_t indicesCount = QuadIndices.size() + CubeIndices.size(); + const size_t positionCount = QuadPositions.size() + CubePositions.size(); + AZ::Data::Asset indexBuffer = BuildTestBuffer(aznumeric_cast(indicesCount), sizeof(uint32_t)); + AZ::Data::Asset positionBuffer = + BuildTestBuffer(aznumeric_cast(positionCount / 3), sizeof(float) * 3); + + // add the cube mesh + m_mesh->Add( + lodCreator, CubePositions.data(), CubePositions.size(), 0, positionBuffer, CubeIndices.data(), CubeIndices.size(), 0, + indexBuffer); + // add the quad mesh (offset by the cube position and index data into the same buffer) + m_mesh->Add( + lodCreator, offsetQuadPositions.data(), offsetQuadPositions.size(), /*offset=*/CubePositions.size(), positionBuffer, + QuadIndices.data(), QuadIndices.size(), /*offset=*/CubeIndices.size(), indexBuffer); + + m_mesh->End(lodCreator); + } + + void TearDown() override + { + m_mesh.reset(); + ModelTests::TearDown(); + } + + AZStd::unique_ptr m_mesh; + inline static constexpr bool AllowBruteForce = false; + }; + + TEST_F(BruteForceMultiModelIntersectsFixture, RayIntersectsWithFirstSubMesh) + { + float t = 0.0f; + AZ::Vector3 normal = AZ::Vector3::CreateOne(); // invalid starting normal + // fire a ray at the first sub mesh and ensure a successful hit is returned + EXPECT_THAT( + m_mesh->GetModel()->LocalRayIntersectionAgainstModel( + AZ::Vector3(0.0f, 0.0f, 5.0f), -AZ::Vector3::CreateAxisZ(10.0f), AllowBruteForce, t, normal), + testing::IsTrue()); + EXPECT_THAT(t, testing::FloatEq(0.4f)); + EXPECT_THAT(normal, IsClose(AZ::Vector3::CreateAxisZ())); + } + + TEST_F(BruteForceMultiModelIntersectsFixture, RayIntersectsWithSecondSubMesh) + { + float t = 0.0f; + AZ::Vector3 normal = AZ::Vector3::CreateOne(); // invalid starting normal + // fire a ray at the second sub mesh and ensure a successful hit is returned + EXPECT_THAT( + m_mesh->GetModel()->LocalRayIntersectionAgainstModel( + AZ::Vector3(QuadOffsetX, 0.0f, 5.0f), -AZ::Vector3::CreateAxisZ(10.0f), AllowBruteForce, t, normal), + testing::IsTrue()); + EXPECT_THAT(t, testing::FloatEq(0.5f)); + EXPECT_THAT(normal, IsClose(AZ::Vector3::CreateAxisZ())); + } } // namespace UnitTest diff --git a/Gems/Atom/RPI/Code/Tests/Shader/ShaderTests.cpp b/Gems/Atom/RPI/Code/Tests/Shader/ShaderTests.cpp index 0483eff003..38b3fa9eb2 100644 --- a/Gems/Atom/RPI/Code/Tests/Shader/ShaderTests.cpp +++ b/Gems/Atom/RPI/Code/Tests/Shader/ShaderTests.cpp @@ -112,12 +112,12 @@ namespace UnitTest : AZ::RHI::ShaderStageFunction(shaderStage) {} - void SetIndex(size_t index) + void SetIndex(uint32_t index) { m_index = index; } - size_t m_index; + int32_t m_index; ShaderByteCode m_byteCode; diff --git a/Gems/Atom/RPI/Code/Tests/ShaderResourceGroup/ShaderResourceGroupConstantBufferTests.cpp b/Gems/Atom/RPI/Code/Tests/ShaderResourceGroup/ShaderResourceGroupConstantBufferTests.cpp index f8b0d34a35..0c3c82933b 100644 --- a/Gems/Atom/RPI/Code/Tests/ShaderResourceGroup/ShaderResourceGroupConstantBufferTests.cpp +++ b/Gems/Atom/RPI/Code/Tests/ShaderResourceGroup/ShaderResourceGroupConstantBufferTests.cpp @@ -242,11 +242,7 @@ namespace UnitTest ExpectEqual({ 0 /*false*/, 1 /*true*/ }, resultInUint); } } -#if AZ_TRAIT_DISABLE_FAILED_ATOM_RPI_TESTS - TEST_F(ShaderResourceGroupConstantBufferTests, DISABLED_SetConstant_GetConstant_FalsePackedInGarbage_Bool) -#else TEST_F(ShaderResourceGroupConstantBufferTests, SetConstant_GetConstant_FalsePackedInGarbage_Bool) -#endif // AZ_TRAIT_DISABLE_FAILED_ATOM_RPI_TESTS { using namespace AZ; @@ -269,7 +265,7 @@ namespace UnitTest EXPECT_TRUE(m_srg->SetConstantArray(inputIndex, AZStd::array({ asBools[1], asBools[2] }))); AZStd::array_view result = m_srg->GetConstantRaw(inputIndex); AZStd::array_view resultInUint = AZStd::array_view(reinterpret_cast(result.data()), 2); - ExpectEqual({ 1 /*true*/, 0 /*false*/ }, resultInUint); + EXPECT_THAT(resultInUint, testing::ElementsAre(testing::IsTrue(), testing::IsFalse())); } } diff --git a/Gems/Atom/RPI/Code/atom_rpi_public_files.cmake b/Gems/Atom/RPI/Code/atom_rpi_public_files.cmake index 93b85375f0..36df56cdab 100644 --- a/Gems/Atom/RPI/Code/atom_rpi_public_files.cmake +++ b/Gems/Atom/RPI/Code/atom_rpi_public_files.cmake @@ -73,6 +73,7 @@ set(FILES Include/Atom/RPI.Public/Pass/RasterPass.h Include/Atom/RPI.Public/Pass/RenderPass.h Include/Atom/RPI.Public/Pass/MSAAResolvePass.h + Include/Atom/RPI.Public/Pass/SlowClearPass.h Include/Atom/RPI.Public/Pass/Specific/DownsampleMipChainPass.h Include/Atom/RPI.Public/Pass/Specific/ImageAttachmentPreviewPass.h Include/Atom/RPI.Public/Pass/Specific/EnvironmentCubeMapPass.h @@ -149,6 +150,7 @@ set(FILES Source/RPI.Public/Pass/RasterPass.cpp Source/RPI.Public/Pass/RenderPass.cpp Source/RPI.Public/Pass/MSAAResolvePass.cpp + Source/RPI.Public/Pass/SlowClearPass.cpp Source/RPI.Public/Pass/Specific/DownsampleMipChainPass.cpp Source/RPI.Public/Pass/Specific/ImageAttachmentPreviewPass.cpp Source/RPI.Public/Pass/Specific/EnvironmentCubeMapPass.cpp diff --git a/Gems/Atom/RPI/Code/atom_rpi_reflect_files.cmake b/Gems/Atom/RPI/Code/atom_rpi_reflect_files.cmake index 4f0e432511..df8f389c37 100644 --- a/Gems/Atom/RPI/Code/atom_rpi_reflect_files.cmake +++ b/Gems/Atom/RPI/Code/atom_rpi_reflect_files.cmake @@ -75,6 +75,7 @@ set(FILES Include/Atom/RPI.Reflect/Pass/PassTemplate.h Include/Atom/RPI.Reflect/Pass/RasterPassData.h Include/Atom/RPI.Reflect/Pass/RenderPassData.h + Include/Atom/RPI.Reflect/Pass/SlowClearPassData.h Include/Atom/RPI.Reflect/Shader/ShaderCommonTypes.h Include/Atom/RPI.Reflect/Shader/ShaderAsset.h Include/Atom/RPI.Reflect/Shader/ShaderAssetCreator.h diff --git a/Gems/Atom/RPI/Code/atom_rpi_tests_files.cmake b/Gems/Atom/RPI/Code/atom_rpi_tests_files.cmake index e99e4e456b..5d67948ac8 100644 --- a/Gems/Atom/RPI/Code/atom_rpi_tests_files.cmake +++ b/Gems/Atom/RPI/Code/atom_rpi_tests_files.cmake @@ -10,8 +10,6 @@ set(FILES Tests/Buffer/BufferTests.cpp Tests/Common/AssetManagerTestFixture.cpp Tests/Common/AssetManagerTestFixture.h - Tests/Common/AssetSystemStub.cpp - Tests/Common/AssetSystemStub.h Tests/Common/ErrorMessageFinder.cpp Tests/Common/ErrorMessageFinder.h Tests/Common/ErrorMessageFinderTests.cpp diff --git a/Gems/Atom/RPI/Registry/atom_rpi.release.setreg b/Gems/Atom/RPI/Registry/atom_rpi.release.setreg new file mode 100644 index 0000000000..72fb4f01e8 --- /dev/null +++ b/Gems/Atom/RPI/Registry/atom_rpi.release.setreg @@ -0,0 +1,9 @@ +{ + "O3DE": { + "Atom": { + "RPI": { + "UseDebugFallbackImages": false + } + } + } +} diff --git a/Gems/Atom/RPI/Registry/atom_rpi.setreg b/Gems/Atom/RPI/Registry/atom_rpi.setreg index 16ce8b3bd7..fa3c13a81e 100644 --- a/Gems/Atom/RPI/Registry/atom_rpi.setreg +++ b/Gems/Atom/RPI/Registry/atom_rpi.setreg @@ -17,7 +17,8 @@ "DynamicDrawSystemDescriptor": { "DynamicBufferPoolSize": 50331648 // 3 * 16 * 1024 * 1024 (for 3 frames) } - } + }, + "UseDebugFallbackImages": true } } } diff --git a/Gems/Atom/RPI/gem.json b/Gems/Atom/RPI/gem.json index b5a6fd5a1a..885f150508 100644 --- a/Gems/Atom/RPI/gem.json +++ b/Gems/Atom/RPI/gem.json @@ -3,6 +3,7 @@ "display_name": "Atom API", "summary": "", "license": "Apache-2.0 Or MIT", + "license_url": "https://github.com/o3de/o3de/blob/development/LICENSE.txt", "origin": "Open 3D Engine - o3de.org", "type": "Code", "canonical_tags": [ diff --git a/Gems/Atom/TestData/TestData/Materials/SkinTestCases/001_hermanubis_regression_test.material b/Gems/Atom/TestData/TestData/Materials/SkinTestCases/001_hermanubis_regression_test.material new file mode 100644 index 0000000000..e6c032b0f9 --- /dev/null +++ b/Gems/Atom/TestData/TestData/Materials/SkinTestCases/001_hermanubis_regression_test.material @@ -0,0 +1,55 @@ +{ + "description": "", + "materialType": "Materials/Types/Skin.materialtype", + "parentMaterial": "", + "propertyLayoutVersion": 3, + "properties": { + "baseColor": { + "color": [ + 0.1277027577161789, + 0.174273282289505, + 0.29372090101242068, + 1.0 + ], + "textureMap": "Objects/Hermanubis/Hermanubis_bronze_BaseColor.png", + "useTexture": false + }, + "detailLayerGroup": { + "baseColorDetailBlend": 0.4300000071525574, + "baseColorDetailMap": "TestData/Textures/cc0/Concrete019_1K_Color.jpg", + "enableBaseColor": true, + "enableDetailLayer": true, + "enableNormals": true, + "normalDetailFlipY": true, + "normalDetailMap": "TestData/Textures/cc0/Concrete019_1K_Normal.jpg", + "normalDetailStrength": 0.25999999046325686, + "textureMapUv": "Tiled" + }, + "detailUV": { + "scale": 5.0 + }, + "normal": { + "flipY": true, + "textureMap": "Objects/Hermanubis/Hermanubis_Normal.png" + }, + "subsurfaceScattering": { + "enableSubsurfaceScattering": true, + "influenceMap": "Objects/Hermanubis/Hermanubis_thickness.tif", + "scatterDistance": 15.0, + "subsurfaceScatterFactor": 0.4300000071525574, + "thicknessMap": "Objects/Hermanubis/Hermanubis_thickness.tif", + "transmissionAttenuation": 15.0, + "transmissionDistortion": 0.3499999940395355, + "transmissionMode": "ThickObject", + "transmissionPower": 16.399999618530275, + "transmissionScale": 0.10000000149011612, + "transmissionTint": [ + 1.0, + 0.3182879388332367, + 0.16388189792633058, + 1.0 + ], + "useInfluenceMap": false + } + } +} diff --git a/Gems/Atom/TestData/TestData/Materials/SkinTestCases/001_lucy_regression_test.material b/Gems/Atom/TestData/TestData/Materials/SkinTestCases/001_lucy_regression_test.material deleted file mode 100644 index bafb047be9..0000000000 --- a/Gems/Atom/TestData/TestData/Materials/SkinTestCases/001_lucy_regression_test.material +++ /dev/null @@ -1,55 +0,0 @@ -{ - "description": "", - "materialType": "Materials/Types/Skin.materialtype", - "parentMaterial": "", - "propertyLayoutVersion": 3, - "properties": { - "baseColor": { - "color": [ - 0.1277027577161789, - 0.174273282289505, - 0.29372090101242068, - 1.0 - ], - "textureMap": "Objects/Lucy/Lucy_bronze_BaseColor.png", - "useTexture": false - }, - "detailLayerGroup": { - "baseColorDetailBlend": 0.4300000071525574, - "baseColorDetailMap": "TestData/Textures/cc0/Concrete019_1K_Color.jpg", - "enableBaseColor": true, - "enableDetailLayer": true, - "enableNormals": true, - "normalDetailFlipY": true, - "normalDetailMap": "TestData/Textures/cc0/Concrete019_1K_Normal.jpg", - "normalDetailStrength": 0.25999999046325686, - "textureMapUv": "Tiled" - }, - "detailUV": { - "scale": 5.0 - }, - "normal": { - "flipY": true, - "textureMap": "Objects/Lucy/Lucy_Normal.png" - }, - "subsurfaceScattering": { - "enableSubsurfaceScattering": true, - "influenceMap": "Objects/Lucy/Lucy_thickness.tif", - "scatterDistance": 15.0, - "subsurfaceScatterFactor": 0.4300000071525574, - "thicknessMap": "Objects/Lucy/Lucy_thickness.tif", - "transmissionAttenuation": 15.0, - "transmissionDistortion": 0.3499999940395355, - "transmissionMode": "ThickObject", - "transmissionPower": 16.399999618530275, - "transmissionScale": 0.10000000149011612, - "transmissionTint": [ - 1.0, - 0.3182879388332367, - 0.16388189792633058, - 1.0 - ], - "useInfluenceMap": false - } - } -} diff --git a/Gems/Atom/TestData/TestData/Materials/SkinTestCases/002_wrinkle_regression_test.material b/Gems/Atom/TestData/TestData/Materials/SkinTestCases/002_wrinkle_regression_test.material index 400044d29f..9b955ddb1d 100644 --- a/Gems/Atom/TestData/TestData/Materials/SkinTestCases/002_wrinkle_regression_test.material +++ b/Gems/Atom/TestData/TestData/Materials/SkinTestCases/002_wrinkle_regression_test.material @@ -29,14 +29,14 @@ }, "normal": { "flipY": true, - "textureMap": "Objects/Lucy/Lucy_Normal.png" + "textureMap": "Objects/Hermanubis/Hermanubis_Normal.png" }, "subsurfaceScattering": { "enableSubsurfaceScattering": true, - "influenceMap": "Objects/Lucy/Lucy_thickness.tif", + "influenceMap": "TestData/Textures/checker8x8_gray_512.png", "scatterDistance": 15.0, "subsurfaceScatterFactor": 0.4300000071525574, - "thicknessMap": "Objects/Lucy/Lucy_thickness.tif", + "thicknessMap": "Objects/Hermanubis/Hermanubis_thickness.tif", "transmissionAttenuation": 15.0, "transmissionDistortion": 0.3499999940395355, "transmissionMode": "ThickObject", @@ -47,8 +47,7 @@ 0.3182879388332367, 0.16388189792633058, 1.0 - ], - "useInfluenceMap": false + ] }, "wrinkleLayers": { "baseColorMap1": "TestData/Textures/cc0/Lava004_1K_Color.jpg", @@ -61,4 +60,4 @@ "normalMap2": "TestData/Textures/TextureHaven/4k_castle_brick_02_red/4k_castle_brick_02_red_normal.png" } } -} +} \ No newline at end of file diff --git a/Gems/Atom/TestData/TestData/Materials/StandardPbrTestCases/015_SubsurfaceScattering_Transmission_Thin.material b/Gems/Atom/TestData/TestData/Materials/StandardPbrTestCases/015_SubsurfaceScattering_Transmission_Thin.material new file mode 100644 index 0000000000..ee9bb1f4a5 --- /dev/null +++ b/Gems/Atom/TestData/TestData/Materials/StandardPbrTestCases/015_SubsurfaceScattering_Transmission_Thin.material @@ -0,0 +1,29 @@ +{ + "description": "", + "parentMaterial": "", + "materialType": "Materials/Types/EnhancedPBR.materialtype", + "materialTypeVersion": 4, + "properties": { + "baseColor": { + "color": [ + 0.027664607390761375, + 0.1926604062318802, + 0.013916227966547012, + 1.0 + ] + }, + "general": { + "doubleSided": true + }, + "subsurfaceScattering": { + "thickness": 0.20000000298023224, + "transmissionMode": "ThinObject", + "transmissionTint": [ + 0.009140154346823692, + 0.19806210696697235, + 0.01095597818493843, + 1.0 + ] + } + } +} \ No newline at end of file diff --git a/Gems/Atom/TestData/TestData/Materials/StandardPbrTestCases/101_DetailMaps_BaseNoDetailMaps.material b/Gems/Atom/TestData/TestData/Materials/StandardPbrTestCases/101_DetailMaps_BaseNoDetailMaps.material new file mode 100644 index 0000000000..82192bac41 --- /dev/null +++ b/Gems/Atom/TestData/TestData/Materials/StandardPbrTestCases/101_DetailMaps_BaseNoDetailMaps.material @@ -0,0 +1,31 @@ +{ + "description": "", + "materialType": "Materials/Types/EnhancedPBR.materialtype", + "parentMaterial": "", + "propertyLayoutVersion": 3, + "properties": { + "baseColor": { + "textureMap": "Objects/Hermanubis/Hermanubis_bronze_BaseColor.png", + "textureMapUv": "Unwrapped" + }, + "detailUV": { + "center": [ + 0.0, + 0.0 + ] + }, + "metallic": { + "textureMap": "Objects/Hermanubis/Hermanubis_bronze_Metallic.png", + "textureMapUv": "Unwrapped" + }, + "normal": { + "flipY": true, + "textureMap": "Objects/Hermanubis/Hermanubis_Normal.png", + "textureMapUv": "Unwrapped" + }, + "roughness": { + "textureMap": "Objects/Hermanubis/Hermanubis_bronze_Roughness.png", + "textureMapUv": "Unwrapped" + } + } +} \ No newline at end of file diff --git a/Gems/Atom/TestData/TestData/Materials/StandardPbrTestCases/101_DetailMaps_LucyBaseNoDetailMaps.material b/Gems/Atom/TestData/TestData/Materials/StandardPbrTestCases/101_DetailMaps_LucyBaseNoDetailMaps.material deleted file mode 100644 index 6d77be5a49..0000000000 --- a/Gems/Atom/TestData/TestData/Materials/StandardPbrTestCases/101_DetailMaps_LucyBaseNoDetailMaps.material +++ /dev/null @@ -1,31 +0,0 @@ -{ - "description": "", - "materialType": "Materials/Types/EnhancedPBR.materialtype", - "parentMaterial": "", - "propertyLayoutVersion": 3, - "properties": { - "baseColor": { - "textureMap": "Objects/Lucy/Lucy_bronze_BaseColor.png", - "textureMapUv": "Unwrapped" - }, - "detailUV": { - "center": [ - 0.0, - 0.0 - ] - }, - "metallic": { - "textureMap": "Objects/Lucy/Lucy_bronze_Metallic.png", - "textureMapUv": "Unwrapped" - }, - "normal": { - "flipY": true, - "textureMap": "Objects/Lucy/Lucy_Normal.png", - "textureMapUv": "Unwrapped" - }, - "roughness": { - "textureMap": "Objects/Lucy/Lucy_bronze_Roughness.png", - "textureMapUv": "Unwrapped" - } - } -} \ No newline at end of file diff --git a/Gems/Atom/TestData/TestData/Materials/StandardPbrTestCases/102_DetailMaps_All.material b/Gems/Atom/TestData/TestData/Materials/StandardPbrTestCases/102_DetailMaps_All.material index 1a29f392c8..dd31d00db0 100644 --- a/Gems/Atom/TestData/TestData/Materials/StandardPbrTestCases/102_DetailMaps_All.material +++ b/Gems/Atom/TestData/TestData/Materials/StandardPbrTestCases/102_DetailMaps_All.material @@ -5,12 +5,12 @@ "propertyLayoutVersion": 3, "properties": { "baseColor": { - "textureMap": "Objects/Lucy/Lucy_bronze_BaseColor.png", + "textureMap": "Objects/Hermanubis/Hermanubis_bronze_BaseColor.png", "textureMapUv": "Unwrapped" }, "detailLayerGroup": { "baseColorDetailMap": "TestData/Textures/cc0/Concrete019_1K_Color.jpg", - "blendDetailMask": "Objects/Lucy/Lucy_ao.tif", + "blendDetailMask": "Objects/Hermanubis/Hermanubis_ao.tif", "blendDetailMaskUv": "Unwrapped", "enableBaseColor": true, "enableDetailLayer": true, @@ -26,16 +26,16 @@ "scale": 10.0 }, "metallic": { - "textureMap": "Objects/Lucy/Lucy_bronze_Metallic.png", + "textureMap": "Objects/Hermanubis/Hermanubis_bronze_Metallic.png", "textureMapUv": "Unwrapped" }, "normal": { "flipY": true, - "textureMap": "Objects/Lucy/Lucy_Normal.png", + "textureMap": "Objects/Hermanubis/Hermanubis_Normal.png", "textureMapUv": "Unwrapped" }, "roughness": { - "textureMap": "Objects/Lucy/Lucy_bronze_Roughness.png", + "textureMap": "Objects/Hermanubis/Hermanubis_bronze_Roughness.png", "textureMapUv": "Unwrapped" } } diff --git a/Gems/Atom/TestData/TestData/Materials/StandardPbrTestCases/103_DetailMaps_BaseColor.material b/Gems/Atom/TestData/TestData/Materials/StandardPbrTestCases/103_DetailMaps_BaseColor.material index 5bddeaa7e5..eda8ef12de 100644 --- a/Gems/Atom/TestData/TestData/Materials/StandardPbrTestCases/103_DetailMaps_BaseColor.material +++ b/Gems/Atom/TestData/TestData/Materials/StandardPbrTestCases/103_DetailMaps_BaseColor.material @@ -1,7 +1,7 @@ { "description": "", "materialType": "Materials/Types/EnhancedPBR.materialtype", - "parentMaterial": "TestData/Materials/StandardPbrTestCases/101_DetailMaps_LucyBaseNoDetailMaps.material", + "parentMaterial": "TestData/Materials/StandardPbrTestCases/101_DetailMaps_BaseNoDetailMaps.material", "propertyLayoutVersion": 3, "properties": { "detailLayerGroup": { diff --git a/Gems/Atom/TestData/TestData/Materials/StandardPbrTestCases/104_DetailMaps_Normal.material b/Gems/Atom/TestData/TestData/Materials/StandardPbrTestCases/104_DetailMaps_Normal.material index 4c64a696d2..291f0fc828 100644 --- a/Gems/Atom/TestData/TestData/Materials/StandardPbrTestCases/104_DetailMaps_Normal.material +++ b/Gems/Atom/TestData/TestData/Materials/StandardPbrTestCases/104_DetailMaps_Normal.material @@ -1,7 +1,7 @@ { "description": "", "materialType": "Materials/Types/EnhancedPBR.materialtype", - "parentMaterial": "TestData/Materials/StandardPbrTestCases/101_DetailMaps_LucyBaseNoDetailMaps.material", + "parentMaterial": "TestData/Materials/StandardPbrTestCases/101_DetailMaps_BaseNoDetailMaps.material", "propertyLayoutVersion": 3, "properties": { "detailLayerGroup": { diff --git a/Gems/Atom/TestData/TestData/Materials/StandardPbrTestCases/105_DetailMaps_BlendMaskUsingDetailUVs.material b/Gems/Atom/TestData/TestData/Materials/StandardPbrTestCases/105_DetailMaps_BlendMaskUsingDetailUVs.material index a69b72b623..6964342447 100644 --- a/Gems/Atom/TestData/TestData/Materials/StandardPbrTestCases/105_DetailMaps_BlendMaskUsingDetailUVs.material +++ b/Gems/Atom/TestData/TestData/Materials/StandardPbrTestCases/105_DetailMaps_BlendMaskUsingDetailUVs.material @@ -5,7 +5,7 @@ "propertyLayoutVersion": 3, "properties": { "baseColor": { - "textureMap": "Objects/Lucy/Lucy_bronze_BaseColor.png", + "textureMap": "Objects/Hermanubis/Hermanubis_bronze_BaseColor.png", "textureMapUv": "Unwrapped" }, "detailLayerGroup": { @@ -25,16 +25,16 @@ "scale": 10.0 }, "metallic": { - "textureMap": "Objects/Lucy/Lucy_bronze_Metallic.png", + "textureMap": "Objects/Hermanubis/Hermanubis_bronze_Metallic.png", "textureMapUv": "Unwrapped" }, "normal": { "flipY": true, - "textureMap": "Objects/Lucy/Lucy_Normal.png", + "textureMap": "Objects/Hermanubis/Hermanubis_Normal.png", "textureMapUv": "Unwrapped" }, "roughness": { - "textureMap": "Objects/Lucy/Lucy_bronze_Roughness.png", + "textureMap": "Objects/Hermanubis/Hermanubis_bronze_Roughness.png", "textureMapUv": "Unwrapped" } } diff --git a/Gems/Atom/TestData/TestData/Objects/plane.fbx b/Gems/Atom/TestData/TestData/Objects/plane.fbx new file mode 100644 index 0000000000..b274bfa282 --- /dev/null +++ b/Gems/Atom/TestData/TestData/Objects/plane.fbx @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:0a1f8d75dcd85e8b4aa57f6c0c81af0300ff96915ba3c2b591095c215d5e1d8c +size 12072 diff --git a/Gems/Atom/Tools/AtomToolsFramework/Code/CMakeLists.txt b/Gems/Atom/Tools/AtomToolsFramework/Code/CMakeLists.txt index e64c9b80e7..e7e8208722 100644 --- a/Gems/Atom/Tools/AtomToolsFramework/Code/CMakeLists.txt +++ b/Gems/Atom/Tools/AtomToolsFramework/Code/CMakeLists.txt @@ -42,6 +42,7 @@ ly_add_target( Gem::Atom_RHI.Reflect Gem::Atom_Feature_Common.Static Gem::Atom_Bootstrap.Headers + Gem::ImageProcessingAtom.Headers ) ly_add_target( @@ -60,4 +61,35 @@ ly_add_target( BUILD_DEPENDENCIES PRIVATE Gem::AtomToolsFramework.Static + RUNTIME_DEPENDENCIES + Gem::ImageProcessingAtom.Editor ) + +################################################################################ +# Tests +################################################################################ +if(PAL_TRAIT_BUILD_TESTS_SUPPORTED) + + ly_add_target( + NAME AtomToolsFramework.Tests ${PAL_TRAIT_TEST_TARGET_TYPE} + NAMESPACE Gem + FILES_CMAKE + atomtoolsframework_tests_files.cmake + INCLUDE_DIRECTORIES + PRIVATE + . + Tests + BUILD_DEPENDENCIES + PRIVATE + AZ::AzTest + AZ::AzTestShared + AZ::AzFrameworkTestShared + Gem::AtomToolsFramework.Static + Gem::Atom_Utils.TestUtils.Static + ) + + ly_add_googletest( + NAME Gem::AtomToolsFramework.Tests + ) + +endif() \ No newline at end of file diff --git a/Gems/Atom/Tools/AtomToolsFramework/Code/Include/AtomToolsFramework/Application/AtomToolsApplication.h b/Gems/Atom/Tools/AtomToolsFramework/Code/Include/AtomToolsFramework/Application/AtomToolsApplication.h index d55755a242..9eaacbfa4f 100644 --- a/Gems/Atom/Tools/AtomToolsFramework/Code/Include/AtomToolsFramework/Application/AtomToolsApplication.h +++ b/Gems/Atom/Tools/AtomToolsFramework/Code/Include/AtomToolsFramework/Application/AtomToolsApplication.h @@ -58,7 +58,7 @@ namespace AtomToolsFramework void CreateStaticModules(AZStd::vector& outModules) override; const char* GetCurrentConfigurationName() const override; void StartCommon(AZ::Entity* systemEntity) override; - void Tick(float deltaOverride = -1.f) override; + void Tick() override; void Stop() override; protected: diff --git a/Gems/Atom/Tools/AtomToolsFramework/Code/Include/AtomToolsFramework/Debug/TraceRecorder.h b/Gems/Atom/Tools/AtomToolsFramework/Code/Include/AtomToolsFramework/Debug/TraceRecorder.h index 96a8728a43..fc19aea2d3 100644 --- a/Gems/Atom/Tools/AtomToolsFramework/Code/Include/AtomToolsFramework/Debug/TraceRecorder.h +++ b/Gems/Atom/Tools/AtomToolsFramework/Code/Include/AtomToolsFramework/Debug/TraceRecorder.h @@ -26,6 +26,21 @@ namespace AtomToolsFramework //! Get the combined output of all messages AZStd::string GetDump() const; + //! Return the number of OnAssert calls + size_t GetAssertCount() const; + + //! Return the number of OnException calls + size_t GetExceptionCount() const; + + //! Return the number of OnError calls, and includes OnAssert and OnException if @includeHigher is true + size_t GetErrorCount(bool includeHigher = false) const; + + //! Return the number of OnWarning calls, and includes higher categories if @includeHigher is true + size_t GetWarningCount(bool includeHigher = false) const; + + //! Return the number of OnPrintf calls, and includes higher categories if @includeHigher is true + size_t GetPrintfCount(bool includeHigher = false) const; + private: ////////////////////////////////////////////////////////////////////////// // AZ::Debug::TraceMessageBus::Handler overrides... @@ -38,5 +53,11 @@ namespace AtomToolsFramework size_t m_maxMessageCount = std::numeric_limits::max(); AZStd::list m_messages; + + size_t m_assertCount = 0; + size_t m_exceptionCount = 0; + size_t m_errorCount = 0; + size_t m_warningCount = 0; + size_t m_printfCount = 0; }; } // namespace AtomToolsFramework diff --git a/Gems/Atom/Tools/AtomToolsFramework/Code/Include/AtomToolsFramework/Util/MaterialPropertyUtil.h b/Gems/Atom/Tools/AtomToolsFramework/Code/Include/AtomToolsFramework/Util/MaterialPropertyUtil.h index 333796493d..961febf0f4 100644 --- a/Gems/Atom/Tools/AtomToolsFramework/Code/Include/AtomToolsFramework/Util/MaterialPropertyUtil.h +++ b/Gems/Atom/Tools/AtomToolsFramework/Code/Include/AtomToolsFramework/Util/MaterialPropertyUtil.h @@ -7,11 +7,12 @@ */ #pragma once -#include -#include #include #include #include +#include +#include +#include namespace AzToolsFramework { @@ -35,12 +36,30 @@ namespace AtomToolsFramework //! Convert and assign material property meta data fields to editor dynamic property configuration void ConvertToPropertyConfig(AtomToolsFramework::DynamicPropertyConfig& propertyConfig, const AZ::RPI::MaterialPropertyDynamicMetadata& propertyMetaData); - //! Convert and assign editor dynamic property configuration fields to material property meta data + //! Convert and assign editor dynamic property configuration fields to material property meta data void ConvertToPropertyMetaData(AZ::RPI::MaterialPropertyDynamicMetadata& propertyMetaData, const AtomToolsFramework::DynamicPropertyConfig& propertyConfig); //! Compare equality of data types and values of editor property stored in AZStd::any bool ArePropertyValuesEqual(const AZStd::any& valueA, const AZStd::any& valueB); + //! Convert the property value into the format that will be stored in the source data + //! This is primarily needed to support conversions of special types like enums and images + //! @param exportPath absolute path of the file being saved + //! @param propertyDefinition describes type information and other details about propertyValue + //! @param propertyValue the value being converted before saving + bool ConvertToExportFormat( + const AZStd::string& exportPath, + [[maybe_unused]] const AZ::Name& propertyId, + const AZ::RPI::MaterialTypeSourceData::PropertyDefinition& propertyDefinition, + AZ::RPI::MaterialPropertyValue& propertyValue); + + //! Generate a file path that is relative to either the source asset root or the export path + //! @param exportPath absolute path of the file being saved + //! @param referencePath absolute path of a file that will be treated as an external reference + //! @param relativeToExportPath specifies if the path is relative to the source asset root or the export path + AZStd::string GetExteralReferencePath( + const AZStd::string& exportPath, const AZStd::string& referencePath, const bool relativeToExportPath = false); + //! Traverse up the instance data node hierarchy to find the containing dynamic property object const AtomToolsFramework::DynamicProperty* FindDynamicPropertyForInstanceDataNode(const AzToolsFramework::InstanceDataNode* pNode); } // namespace AtomToolsFramework diff --git a/Gems/Atom/Tools/AtomToolsFramework/Code/Include/AtomToolsFramework/Util/Util.h b/Gems/Atom/Tools/AtomToolsFramework/Code/Include/AtomToolsFramework/Util/Util.h index 1ad6f69961..ab2b8b46c0 100644 --- a/Gems/Atom/Tools/AtomToolsFramework/Code/Include/AtomToolsFramework/Util/Util.h +++ b/Gems/Atom/Tools/AtomToolsFramework/Code/Include/AtomToolsFramework/Util/Util.h @@ -8,8 +8,9 @@ #pragma once -#include #include +#include +#include #include AZ_PUSH_DISABLE_WARNING(4251 4800, "-Wunknown-warning-option") // disable warnings spawned by QT @@ -18,11 +19,24 @@ AZ_PUSH_DISABLE_WARNING(4251 4800, "-Wunknown-warning-option") // disable warnin #include AZ_POP_DISABLE_WARNING +class QImage; + namespace AtomToolsFramework { + template + T GetSettingOrDefault(AZStd::string_view path, const T& defaultValue) + { + T result; + auto settingsRegistry = AZ::SettingsRegistry::Get(); + return (settingsRegistry && settingsRegistry->Get(result, path)) ? result : defaultValue; + } + + using LoadImageAsyncCallback = AZStd::function; + void LoadImageAsync(const AZStd::string& path, LoadImageAsyncCallback callback); + QFileInfo GetSaveFileInfo(const QString& initialPath); QFileInfo GetOpenFileInfo(const AZStd::vector& assetTypes); QFileInfo GetUniqueFileInfo(const QString& initialPath); QFileInfo GetDuplicationFileInfo(const QString& initialPath); bool LaunchTool(const QString& baseName, const QString& extension, const QStringList& arguments); -} +} // namespace AtomToolsFramework diff --git a/Gems/Atom/Tools/AtomToolsFramework/Code/Include/AtomToolsFramework/Viewport/ModularViewportCameraController.h b/Gems/Atom/Tools/AtomToolsFramework/Code/Include/AtomToolsFramework/Viewport/ModularViewportCameraController.h index 1200cb3d79..9f7463e4e5 100644 --- a/Gems/Atom/Tools/AtomToolsFramework/Code/Include/AtomToolsFramework/Viewport/ModularViewportCameraController.h +++ b/Gems/Atom/Tools/AtomToolsFramework/Code/Include/AtomToolsFramework/Viewport/ModularViewportCameraController.h @@ -26,7 +26,7 @@ namespace AtomToolsFramework virtual AZ::Transform GetCameraTransform() const = 0; virtual void SetCameraTransform(const AZ::Transform& transform) = 0; - virtual void ConnectViewMatrixChangedHandler(AZ::RPI::ViewportContext::MatrixChangedEvent::Handler& handler) = 0; + virtual void ConnectViewMatrixChangedHandler(AZ::RPI::MatrixChangedEvent::Handler& handler) = 0; }; //! A function object to represent returning a camera controller priority. @@ -91,7 +91,7 @@ namespace AtomToolsFramework // ModularCameraViewportContext overrides ... AZ::Transform GetCameraTransform() const override; void SetCameraTransform(const AZ::Transform& transform) override; - void ConnectViewMatrixChangedHandler(AZ::RPI::ViewportContext::MatrixChangedEvent::Handler& handler) override; + void ConnectViewMatrixChangedHandler(AZ::RPI::MatrixChangedEvent::Handler& handler) override; private: AzFramework::ViewportId m_viewportId; @@ -112,15 +112,19 @@ namespace AtomToolsFramework void UpdateViewport(const AzFramework::ViewportControllerUpdateEvent& event) override; // ModularViewportCameraControllerRequestBus overrides ... - void InterpolateToTransform(const AZ::Transform& worldFromLocal) override; - AZ::Transform GetReferenceFrame() const override; - void SetReferenceFrame(const AZ::Transform& worldFromLocal) override; - void ClearReferenceFrame() override; + bool InterpolateToTransform(const AZ::Transform& worldFromLocal) override; + bool IsInterpolating() const override; + void StartTrackingTransform(const AZ::Transform& worldFromLocal) override; + void StopTrackingTransform() override; + bool IsTrackingTransform() const override; + void SetCameraPivotAttached(const AZ::Vector3& pivot) override; + void SetCameraPivotDetached(const AZ::Vector3& pivot) override; + void SetCameraOffset(const AZ::Vector3& offset) override; private: - //! Update the reference frame after a change has been made to the camera - //! view without updating the internal camera via user input. - void RefreshReferenceFrame(); + //! Combine the current camera transform with any potential roll from the tracked + //! transform (this is usually zero). + AZ::Transform CombinedCameraTransform() const; //! The current mode the camera controller is in. enum class CameraMode @@ -141,21 +145,21 @@ namespace AtomToolsFramework AzFramework::Camera m_camera; //!< The current camera state (pitch/yaw/position/look-distance). AzFramework::Camera m_targetCamera; //!< The target (next) camera state that m_camera is catching up to. AzFramework::Camera m_previousCamera; //!< The state of the camera from the previous frame. - AZStd::optional m_storedCamera; //!< A potentially stored camera for when a custom reference frame is set. + AZStd::optional m_storedCamera; //!< A potentially stored camera for when a transform is being tracked. AzFramework::CameraSystem m_cameraSystem; //!< The camera system responsible for managing all CameraInputs. AzFramework::CameraProps m_cameraProps; //!< Camera properties to control rotate and translate smoothness. CameraControllerPriorityFn m_priorityFn; //!< Controls at what priority the camera controller should respond to events. CameraAnimation m_cameraAnimation; //!< Camera animation state (used during CameraMode::Animation). CameraMode m_cameraMode = CameraMode::Control; //!< The current mode the camera is operating in. - //! An additional reference frame the camera can operate in (identity has no effect). - AZ::Transform m_referenceFrameOverride = AZ::Transform::CreateIdentity(); - //! Flag to prevent circular updates of the camera transform (while the viewport transform is being updated internally). - bool m_updatingTransformInternally = false; + float m_roll = 0.0f; //!< The current amount of roll to be applied to the camera. + float m_targetRoll = 0.0f; //!< The target amount of roll to be applied to the camera (current will move towards this). //! Listen for camera view changes outside of the camera controller. - AZ::RPI::ViewportContext::MatrixChangedEvent::Handler m_cameraViewMatrixChangeHandler; + AZ::RPI::MatrixChangedEvent::Handler m_cameraViewMatrixChangeHandler; //! The current instance of the modular camera viewport context. AZStd::unique_ptr m_modularCameraViewportContext; + //! Flag to prevent circular updates of the camera transform (while the viewport transform is being updated internally). + bool m_updatingTransformInternally = false; }; //! Placeholder implementation for ModularCameraViewportContext (useful for verifying the interface). @@ -164,10 +168,10 @@ namespace AtomToolsFramework public: AZ::Transform GetCameraTransform() const override; void SetCameraTransform(const AZ::Transform& transform) override; - void ConnectViewMatrixChangedHandler(AZ::RPI::ViewportContext::MatrixChangedEvent::Handler& handler) override; + void ConnectViewMatrixChangedHandler(AZ::RPI::MatrixChangedEvent::Handler& handler) override; private: AZ::Transform m_cameraTransform = AZ::Transform::CreateIdentity(); - AZ::RPI::ViewportContext::MatrixChangedEvent m_viewMatrixChangedEvent; + AZ::RPI::MatrixChangedEvent m_viewMatrixChangedEvent; }; } // namespace AtomToolsFramework diff --git a/Gems/Atom/Tools/AtomToolsFramework/Code/Include/AtomToolsFramework/Viewport/ModularViewportCameraControllerRequestBus.h b/Gems/Atom/Tools/AtomToolsFramework/Code/Include/AtomToolsFramework/Viewport/ModularViewportCameraControllerRequestBus.h index ab397692e4..7dc5d0e3c9 100644 --- a/Gems/Atom/Tools/AtomToolsFramework/Code/Include/AtomToolsFramework/Viewport/ModularViewportCameraControllerRequestBus.h +++ b/Gems/Atom/Tools/AtomToolsFramework/Code/Include/AtomToolsFramework/Viewport/ModularViewportCameraControllerRequestBus.h @@ -23,23 +23,37 @@ namespace AtomToolsFramework class ModularViewportCameraControllerRequests : public AZ::EBusTraits { public: + static inline constexpr float InterpolateToTransformDuration = 1.0f; + using BusIdType = AzFramework::ViewportId; static const AZ::EBusAddressPolicy AddressPolicy = AZ::EBusAddressPolicy::ById; static const AZ::EBusHandlerPolicy HandlerPolicy = AZ::EBusHandlerPolicy::Single; - //! Begin a smooth transition of the camera to the requested transform. + //! Begins a smooth transition of the camera to the requested transform. //! @param worldFromLocal The transform of where the camera should end up. - virtual void InterpolateToTransform(const AZ::Transform& worldFromLocal) = 0; - - //! Return the current reference frame. - //! @note If a reference frame has not been set or a frame has been cleared, this is just the identity. - virtual AZ::Transform GetReferenceFrame() const = 0; - - //! Set a new reference frame other than the identity for the camera controller. - virtual void SetReferenceFrame(const AZ::Transform& worldFromLocal) = 0; - - //! Clear the current reference frame to restore the identity. - virtual void ClearReferenceFrame() = 0; + //! @return Returns true if the call began an interpolation and false otherwise. Calls to InterpolateToTransform + //! will have no effect if an interpolation is currently in progress. + virtual bool InterpolateToTransform(const AZ::Transform& worldFromLocal) = 0; + //! Returns if the camera is currently interpolating to a new transform. + virtual bool IsInterpolating() const = 0; + //! Starts tracking a transform. + //! Store the current camera transform and move to the next camera transform. + virtual void StartTrackingTransform(const AZ::Transform& worldFromLocal) = 0; + //! Stops tracking the set transform. + //! The previously stored camera transform is restored. + virtual void StopTrackingTransform() = 0; + //! Returns if the tracking transform is set. + virtual bool IsTrackingTransform() const = 0; + //! Sets the current camera pivot, moving the camera offset with it (the camera appears + //! to follow the pivot, staying the same distance away from it). + virtual void SetCameraPivotAttached(const AZ::Vector3& pivot) = 0; + //! Sets the current camera pivot, leaving the camera offset in-place (the camera will + //! stay fixed and the pivot will appear to move around on its own). + virtual void SetCameraPivotDetached(const AZ::Vector3& pivot) = 0; + //! Sets the current camera offset from the pivot. + //! @note The offset value is in the current space of the camera, not world space. Setting + //! a negative Z value will move the camera backwards from the pivot. + virtual void SetCameraOffset(const AZ::Vector3& offset) = 0; protected: ~ModularViewportCameraControllerRequests() = default; diff --git a/Gems/Atom/Tools/AtomToolsFramework/Code/Include/AtomToolsFramework/Viewport/RenderViewportWidget.h b/Gems/Atom/Tools/AtomToolsFramework/Code/Include/AtomToolsFramework/Viewport/RenderViewportWidget.h index 8233658ded..3393897936 100644 --- a/Gems/Atom/Tools/AtomToolsFramework/Code/Include/AtomToolsFramework/Viewport/RenderViewportWidget.h +++ b/Gems/Atom/Tools/AtomToolsFramework/Code/Include/AtomToolsFramework/Viewport/RenderViewportWidget.h @@ -12,7 +12,7 @@ #include #include #include -#include +#include #include #include #include @@ -21,6 +21,7 @@ #include #include #include +#include namespace AtomToolsFramework { @@ -30,8 +31,8 @@ namespace AtomToolsFramework //! @see AZ::RPI::ViewportContext for Atom's API for setting up class RenderViewportWidget : public QWidget - , public AzToolsFramework::ViewportInteraction::ViewportInteractionRequestBus::Handler , public AzToolsFramework::ViewportInteraction::ViewportMouseCursorRequestBus::Handler + , public AzToolsFramework::ViewportInteraction::ViewportInteractionRequests , public AzFramework::WindowRequestBus::Handler , protected AzFramework::InputChannelEventListener , protected AZ::TickBus::Handler @@ -90,11 +91,11 @@ namespace AtomToolsFramework //! Input processing is enabled by default. void SetInputProcessingEnabled(bool enabled); - // AzToolsFramework::ViewportInteraction::ViewportInteractionRequestBus::Handler overrides ... + // ViewportInteractionRequests overrides ... AzFramework::CameraState GetCameraState() override; AzFramework::ScreenPoint ViewportWorldToScreen(const AZ::Vector3& worldPosition) override; - AZStd::optional ViewportScreenToWorld(const AzFramework::ScreenPoint& screenPosition, float depth) override; - AZStd::optional ViewportScreenToWorldRay( + AZ::Vector3 ViewportScreenToWorld(const AzFramework::ScreenPoint& screenPosition) override; + AzToolsFramework::ViewportInteraction::ProjectedViewportRay ViewportScreenToWorldRay( const AzFramework::ScreenPoint& screenPosition) override; float DeviceScalingFactor() override; @@ -115,6 +116,7 @@ namespace AtomToolsFramework void ToggleFullScreenState() override; float GetDpiScaleFactor() const override; uint32_t GetSyncInterval() const override; + bool SetSyncInterval(uint32_t newSyncInterval) override; uint32_t GetDisplayRefreshRate() const override; protected: @@ -149,5 +151,7 @@ namespace AtomToolsFramework AZ::ScriptTimePoint m_time; // Maps our internal Qt events into AzFramework InputChannels for our ViewportControllerList. AzToolsFramework::QtEventToAzInputMapper* m_inputChannelMapper = nullptr; + // Implementation of ViewportInteractionRequests (handles viewport picking operations). + AZStd::unique_ptr m_viewportInteractionImpl; }; } //namespace AtomToolsFramework diff --git a/Gems/Atom/Tools/AtomToolsFramework/Code/Include/AtomToolsFramework/Viewport/ViewportInteractionImpl.h b/Gems/Atom/Tools/AtomToolsFramework/Code/Include/AtomToolsFramework/Viewport/ViewportInteractionImpl.h new file mode 100644 index 0000000000..b6ad6e17d1 --- /dev/null +++ b/Gems/Atom/Tools/AtomToolsFramework/Code/Include/AtomToolsFramework/Viewport/ViewportInteractionImpl.h @@ -0,0 +1,48 @@ +/* + * Copyright (c) Contributors to the Open 3D Engine Project. + * For complete copyright and license terms please see the LICENSE at the root of this distribution. + * + * SPDX-License-Identifier: Apache-2.0 OR MIT + * + */ + +#pragma once + +#include +#include +#include +#include +#include + +namespace AtomToolsFramework +{ + //! A concrete implementation of the ViewportInteractionRequestBus. + //! Primarily concerned with picking (screen to world and world to screen transformations). + class ViewportInteractionImpl + : public AzToolsFramework::ViewportInteraction::ViewportInteractionRequestBus::Handler + , private AZ::RPI::ViewportContextIdNotificationBus::Handler + { + public: + explicit ViewportInteractionImpl(AZ::RPI::ViewPtr viewPtr); + + void Connect(AzFramework::ViewportId viewportId); + void Disconnect(); + + // ViewportInteractionRequestBus overrides ... + AzFramework::CameraState GetCameraState() override; + AzFramework::ScreenPoint ViewportWorldToScreen(const AZ::Vector3& worldPosition) override; + AZ::Vector3 ViewportScreenToWorld(const AzFramework::ScreenPoint& screenPosition) override; + AzToolsFramework::ViewportInteraction::ProjectedViewportRay ViewportScreenToWorldRay( + const AzFramework::ScreenPoint& screenPosition) override; + float DeviceScalingFactor() override; + + AZStd::function m_screenSizeFn; //! Callback to determine the screen size. + AZStd::function m_deviceScalingFactorFn; //! Callback to determine the device scaling factor. + + private: + // ViewportContextIdNotificationBus overrides ... + void OnViewportDefaultViewChanged(AZ::RPI::ViewPtr view) override; + + AZ::RPI::ViewPtr m_viewPtr; + }; +} // namespace AtomToolsFramework diff --git a/Gems/Atom/Tools/AtomToolsFramework/Code/Source/Application/AtomToolsApplication.cpp b/Gems/Atom/Tools/AtomToolsFramework/Code/Source/Application/AtomToolsApplication.cpp index ba3bfe4718..02248fffd4 100644 --- a/Gems/Atom/Tools/AtomToolsFramework/Code/Source/Application/AtomToolsApplication.cpp +++ b/Gems/Atom/Tools/AtomToolsFramework/Code/Source/Application/AtomToolsApplication.cpp @@ -12,6 +12,7 @@ #include #include +#include #include #include #include @@ -79,12 +80,18 @@ namespace AtomToolsFramework m_styleManager.reset(new AzQtComponents::StyleManager(this)); m_styleManager->initialize(this, engineRootPath); - connect(&m_timer, &QTimer::timeout, this, [&]() + m_timer.setInterval(1); + connect(&m_timer, &QTimer::timeout, this, [this]() { this->PumpSystemEventLoopUntilEmpty(); this->Tick(); }); + connect(this, &QGuiApplication::applicationStateChanged, this, [this]() + { + // Limit the update interval when not in focus to reduce power consumption and interference with other applications + this->m_timer.setInterval((applicationState() & Qt::ApplicationActive) ? 1 : 32); + }); } AtomToolsApplication ::~AtomToolsApplication() @@ -169,7 +176,8 @@ namespace AtomToolsFramework Base::StartCommon(systemEntity); - m_traceLogger.PrepareLogFile(GetBuildTargetName() + ".log"); + const bool clearLogFile = GetSettingOrDefault("/O3DE/AtomToolsFramework/Application/ClearLogOnStart", false); + m_traceLogger.OpenLogFile(GetBuildTargetName() + ".log", clearLogFile); AzToolsFramework::AssetDatabase::AssetDatabaseRequestsBus::Handler::BusConnect(); AzToolsFramework::AssetBrowser::AssetDatabaseLocationNotificationBus::Broadcast( @@ -288,10 +296,24 @@ namespace AtomToolsFramework QMessageBox::critical( activeWindow(), QString("Failed to compile critical assets"), QString("Failed to compile the following critical assets:\n%1\n%2") - .arg(failedAssets.join(",\n")) - .arg("Make sure this is an Atom project.")); + .arg(failedAssets.join(",\n")) + .arg("Make sure this is an Atom project.")); ExitMainLoop(); } + + AZ::ComponentApplicationLifecycle::SignalEvent(*m_settingsRegistry, "CriticalAssetsCompiled", R"({})"); + // Reload the assetcatalog.xml at this point again + // Start Monitoring Asset changes over the network and load the AssetCatalog + auto LoadCatalog = [settingsRegistry = m_settingsRegistry.get()](AZ::Data::AssetCatalogRequests* assetCatalogRequests) + { + if (AZ::IO::FixedMaxPath assetCatalogPath; + settingsRegistry->Get(assetCatalogPath.Native(), AZ::SettingsRegistryMergeUtils::FilePathKey_CacheRootFolder)) + { + assetCatalogPath /= "assetcatalog.xml"; + assetCatalogRequests->LoadCatalog(assetCatalogPath.c_str()); + } + }; + AZ::Data::AssetCatalogRequestBus::Broadcast(AZStd::move(LoadCatalog)); } void AtomToolsApplication::SaveSettings() @@ -454,10 +476,10 @@ namespace AtomToolsFramework return false; } - void AtomToolsApplication::Tick(float deltaOverride) + void AtomToolsApplication::Tick() { TickSystem(); - Base::Tick(deltaOverride); + Base::Tick(); if (WasExitMainLoopRequested()) { diff --git a/Gems/Atom/Tools/AtomToolsFramework/Code/Source/AtomToolsFrameworkModule.h b/Gems/Atom/Tools/AtomToolsFramework/Code/Source/AtomToolsFrameworkModule.h index 759b2558bf..ae60220314 100644 --- a/Gems/Atom/Tools/AtomToolsFramework/Code/Source/AtomToolsFrameworkModule.h +++ b/Gems/Atom/Tools/AtomToolsFramework/Code/Source/AtomToolsFrameworkModule.h @@ -9,11 +9,13 @@ #pragma once #include +#include namespace AtomToolsFramework { class AtomToolsFrameworkModule : public AZ::Module + , public AzToolsFramework::EmbeddedPython::PythonLoader { public: AZ_RTTI(AtomToolsFrameworkModule, "{B58B7CA8-98C9-4DC8-8607-E094989BBBE2}", AZ::Module); diff --git a/Gems/Atom/Tools/AtomToolsFramework/Code/Source/Debug/TraceRecorder.cpp b/Gems/Atom/Tools/AtomToolsFramework/Code/Source/Debug/TraceRecorder.cpp index 3fd069ff0b..5f8c8b9004 100644 --- a/Gems/Atom/Tools/AtomToolsFramework/Code/Source/Debug/TraceRecorder.cpp +++ b/Gems/Atom/Tools/AtomToolsFramework/Code/Source/Debug/TraceRecorder.cpp @@ -31,6 +31,7 @@ namespace AtomToolsFramework bool TraceRecorder::OnAssert(const char* message) { + ++m_assertCount; if (m_messages.size() < m_maxMessageCount) { m_messages.push_back(AZStd::string::format("Assert: %s", message)); @@ -40,6 +41,7 @@ namespace AtomToolsFramework bool TraceRecorder::OnException(const char* message) { + ++m_exceptionCount; if (m_messages.size() < m_maxMessageCount) { m_messages.push_back(AZStd::string::format("Exception: %s", message)); @@ -49,6 +51,7 @@ namespace AtomToolsFramework bool TraceRecorder::OnError(const char* /*window*/, const char* message) { + ++m_errorCount; if (m_messages.size() < m_maxMessageCount) { m_messages.push_back(AZStd::string::format("Error: %s", message)); @@ -58,6 +61,7 @@ namespace AtomToolsFramework bool TraceRecorder::OnWarning(const char* /*window*/, const char* message) { + ++m_warningCount; if (m_messages.size() < m_maxMessageCount) { m_messages.push_back(AZStd::string::format("Warning: %s", message)); @@ -67,11 +71,58 @@ namespace AtomToolsFramework bool TraceRecorder::OnPrintf(const char* /*window*/, const char* message) { + ++m_printfCount; if (m_messages.size() < m_maxMessageCount) { m_messages.push_back(AZStd::string::format("%s", message)); } return false; +} + + size_t TraceRecorder::GetAssertCount() const + { + return m_assertCount; + } + + size_t TraceRecorder::GetExceptionCount() const + { + return m_exceptionCount; + } + + size_t TraceRecorder::GetErrorCount(bool includeHigher) const + { + if (includeHigher) + { + return m_errorCount + GetAssertCount() + GetExceptionCount(); + } + else + { + return m_errorCount; + } + } + + size_t TraceRecorder::GetWarningCount(bool includeHigher) const + { + if (includeHigher) + { + return m_warningCount + GetErrorCount(true); + } + else + { + return m_warningCount; + } + } + + size_t TraceRecorder::GetPrintfCount(bool includeHigher) const + { + if (includeHigher) + { + return m_printfCount + GetWarningCount(true); + } + else + { + return m_printfCount; + } } } // namespace AtomToolsFramework diff --git a/Gems/Atom/Tools/AtomToolsFramework/Code/Source/Document/AtomToolsDocumentSystemComponent.cpp b/Gems/Atom/Tools/AtomToolsFramework/Code/Source/Document/AtomToolsDocumentSystemComponent.cpp index 5652e9fe23..3b27c9cd0f 100644 --- a/Gems/Atom/Tools/AtomToolsFramework/Code/Source/Document/AtomToolsDocumentSystemComponent.cpp +++ b/Gems/Atom/Tools/AtomToolsFramework/Code/Source/Document/AtomToolsDocumentSystemComponent.cpp @@ -24,6 +24,7 @@ AZ_PUSH_DISABLE_WARNING(4251 4800, "-Wunknown-warning-option") // disable warnin #include #include #include +#include AZ_POP_DISABLE_WARNING namespace AtomToolsFramework @@ -121,7 +122,6 @@ namespace AtomToolsFramework void AtomToolsDocumentSystemComponent::Deactivate() { - AZ::TickBus::Handler::BusDisconnect(); AtomToolsDocumentNotificationBus::Handler::BusDisconnect(); AtomToolsDocumentSystemRequestBus::Handler::BusDisconnect(); m_documentMap.clear(); @@ -159,26 +159,31 @@ namespace AtomToolsFramework void AtomToolsDocumentSystemComponent::OnDocumentExternallyModified(const AZ::Uuid& documentId) { - m_documentIdsToReopen.insert(documentId); - if (!AZ::TickBus::Handler::BusIsConnected()) - { - AZ::TickBus::Handler::BusConnect(); - } + m_documentIdsWithExternalChanges.insert(documentId); + QueueReopenDocuments(); } void AtomToolsDocumentSystemComponent::OnDocumentDependencyModified(const AZ::Uuid& documentId) { - m_documentIdsToReopen.insert(documentId); - if (!AZ::TickBus::Handler::BusIsConnected()) + m_documentIdsWithDependencyChanges.insert(documentId); + QueueReopenDocuments(); + } + + void AtomToolsDocumentSystemComponent::QueueReopenDocuments() + { + if (!m_queueReopenDocuments) { - AZ::TickBus::Handler::BusConnect(); + m_queueReopenDocuments = true; + QTimer::singleShot(0, [this] { ReopenDocuments(); }); } } - void AtomToolsDocumentSystemComponent::OnTick([[maybe_unused]] float deltaTime, [[maybe_unused]] AZ::ScriptTimePoint time) + void AtomToolsDocumentSystemComponent::ReopenDocuments() { - for (const AZ::Uuid& documentId : m_documentIdsToReopen) + for (const AZ::Uuid& documentId : m_documentIdsWithExternalChanges) { + m_documentIdsWithDependencyChanges.erase(documentId); + AZStd::string documentPath; AtomToolsDocumentRequestBus::EventResult(documentPath, documentId, &AtomToolsDocumentRequestBus::Events::GetAbsolutePath); @@ -204,7 +209,7 @@ namespace AtomToolsFramework } } - for (const AZ::Uuid& documentId : m_documentIdsToReopen) + for (const AZ::Uuid& documentId : m_documentIdsWithDependencyChanges) { AZStd::string documentPath; AtomToolsDocumentRequestBus::EventResult(documentPath, documentId, &AtomToolsDocumentRequestBus::Events::GetAbsolutePath); @@ -231,9 +236,9 @@ namespace AtomToolsFramework } } - m_documentIdsToReopen.clear(); - m_documentIdsToReopen.clear(); - AZ::TickBus::Handler::BusDisconnect(); + m_documentIdsWithDependencyChanges.clear(); + m_documentIdsWithExternalChanges.clear(); + m_queueReopenDocuments = false; } AZ::Uuid AtomToolsDocumentSystemComponent::OpenDocument(AZStd::string_view sourcePath) @@ -493,8 +498,6 @@ namespace AtomToolsFramework return AZ::Uuid::CreateNull(); } - traceRecorder.GetDump().clear(); - bool openResult = false; AtomToolsDocumentRequestBus::EventResult(openResult, documentId, &AtomToolsDocumentRequestBus::Events::Open, requestedPath); if (!openResult) @@ -505,6 +508,12 @@ namespace AtomToolsFramework AtomToolsDocumentSystemRequestBus::Broadcast(&AtomToolsDocumentSystemRequestBus::Events::DestroyDocument, documentId); return AZ::Uuid::CreateNull(); } + else if (traceRecorder.GetWarningCount(true) > 0) + { + QMessageBox::warning( + QApplication::activeWindow(), QString("Document opened with warnings"), + QString("Warnings encountered: \n%1\n\n%2").arg(requestedPath.c_str()).arg(traceRecorder.GetDump().c_str())); + } return documentId; } diff --git a/Gems/Atom/Tools/AtomToolsFramework/Code/Source/Document/AtomToolsDocumentSystemComponent.h b/Gems/Atom/Tools/AtomToolsFramework/Code/Source/Document/AtomToolsDocumentSystemComponent.h index 9c556a07e7..532271974c 100644 --- a/Gems/Atom/Tools/AtomToolsFramework/Code/Source/Document/AtomToolsDocumentSystemComponent.h +++ b/Gems/Atom/Tools/AtomToolsFramework/Code/Source/Document/AtomToolsDocumentSystemComponent.h @@ -9,7 +9,6 @@ #pragma once #include -#include #include #include @@ -28,7 +27,6 @@ namespace AtomToolsFramework //! AtomToolsDocumentSystemComponent is the central component of the Material Editor Core gem class AtomToolsDocumentSystemComponent : public AZ::Component - , private AZ::TickBus::Handler , private AtomToolsDocumentNotificationBus::Handler , private AtomToolsDocumentSystemRequestBus::Handler { @@ -59,10 +57,8 @@ namespace AtomToolsFramework void OnDocumentExternallyModified(const AZ::Uuid& documentId) override; ////////////////////////////////////////////////////////////////////////// - //////////////////////////////////////////////////////////////////////// - // AZ::TickBus::Handler overrides... - void OnTick(float deltaTime, AZ::ScriptTimePoint time) override; - //////////////////////////////////////////////////////////////////////// + void QueueReopenDocuments(); + void ReopenDocuments(); //////////////////////////////////////////////////////////////////////// // AtomToolsDocumentSystemRequestBus::Handler overrides... @@ -85,8 +81,9 @@ namespace AtomToolsFramework AZStd::intrusive_ptr m_settings; AZStd::function m_documentCreator; AZStd::unordered_map> m_documentMap; - AZStd::unordered_set m_documentIdsToRebuild; - AZStd::unordered_set m_documentIdsToReopen; + AZStd::unordered_set m_documentIdsWithExternalChanges; + AZStd::unordered_set m_documentIdsWithDependencyChanges; + bool m_queueReopenDocuments = false; const size_t m_maxMessageBoxLineCount = 15; }; } // namespace AtomToolsFramework diff --git a/Gems/Atom/Tools/AtomToolsFramework/Code/Source/DynamicProperty/DynamicProperty.cpp b/Gems/Atom/Tools/AtomToolsFramework/Code/Source/DynamicProperty/DynamicProperty.cpp index 2054858726..d4599b68b7 100644 --- a/Gems/Atom/Tools/AtomToolsFramework/Code/Source/DynamicProperty/DynamicProperty.cpp +++ b/Gems/Atom/Tools/AtomToolsFramework/Code/Source/DynamicProperty/DynamicProperty.cpp @@ -160,7 +160,7 @@ namespace AtomToolsFramework ApplyRangeEditDataAttributes(); break; case DynamicPropertyType::Color: - AddEditDataAttribute(AZ_CRC("ColorEditorConfiguration", 0xc8b9510e), AZ::RPI::ColorUtils::GetLinearRgbEditorConfig()); + AddEditDataAttribute(AZ_CRC("ColorEditorConfiguration", 0xc8b9510e), AZ::RPI::ColorUtils::GetRgbEditorConfig()); break; case DynamicPropertyType::Enum: m_editData.m_elementId = AZ::Edit::UIHandlers::ComboBox; diff --git a/Gems/Atom/Tools/AtomToolsFramework/Code/Source/Inspector/InspectorPropertyGroupWidget.cpp b/Gems/Atom/Tools/AtomToolsFramework/Code/Source/Inspector/InspectorPropertyGroupWidget.cpp index 6b9aee17f7..af71954737 100644 --- a/Gems/Atom/Tools/AtomToolsFramework/Code/Source/Inspector/InspectorPropertyGroupWidget.cpp +++ b/Gems/Atom/Tools/AtomToolsFramework/Code/Source/Inspector/InspectorPropertyGroupWidget.cpp @@ -43,7 +43,7 @@ namespace AtomToolsFramework m_propertyEditor->Setup(context, instanceNotificationHandler, false); m_propertyEditor->AddInstance(instance, instanceClassId, nullptr, instanceToCompare); m_propertyEditor->setSizePolicy(QSizePolicy::Preferred, QSizePolicy::Preferred); - m_propertyEditor->InvalidateAll(); + m_propertyEditor->QueueInvalidation(AzToolsFramework::PropertyModificationRefreshLevel::Refresh_EntireTree); m_layout->addWidget(m_propertyEditor); setLayout(m_layout); diff --git a/Gems/Atom/Tools/AtomToolsFramework/Code/Source/PreviewRenderer/PreviewRendererSystemComponent.cpp b/Gems/Atom/Tools/AtomToolsFramework/Code/Source/PreviewRenderer/PreviewRendererSystemComponent.cpp index d46e7b27be..28bd196a1d 100644 --- a/Gems/Atom/Tools/AtomToolsFramework/Code/Source/PreviewRenderer/PreviewRendererSystemComponent.cpp +++ b/Gems/Atom/Tools/AtomToolsFramework/Code/Source/PreviewRenderer/PreviewRendererSystemComponent.cpp @@ -10,6 +10,7 @@ #include #include #include +#include namespace AtomToolsFramework { @@ -53,10 +54,15 @@ namespace AtomToolsFramework AZ::TickBus::QueueFunction( [this]() { - if (!m_previewRenderer) + // Only create a preview renderer if the RPI interface is fully initialized. Otherwise the constructor will leave things + // in a bad state that can lead to crashing. + if (AZ::RPI::RPISystemInterface::Get()->IsInitialized()) { - m_previewRenderer.reset(aznew AtomToolsFramework::PreviewRenderer( - "PreviewRendererSystemComponent Preview Scene", "PreviewRendererSystemComponent Preview Pipeline")); + if (!m_previewRenderer) + { + m_previewRenderer.reset(aznew AtomToolsFramework::PreviewRenderer( + "PreviewRendererSystemComponent Preview Scene", "PreviewRendererSystemComponent Preview Pipeline")); + } } }); } diff --git a/Gems/Atom/Tools/AtomToolsFramework/Code/Source/Util/MaterialPropertyUtil.cpp b/Gems/Atom/Tools/AtomToolsFramework/Code/Source/Util/MaterialPropertyUtil.cpp index 3f8a173918..ab72214881 100644 --- a/Gems/Atom/Tools/AtomToolsFramework/Code/Source/Util/MaterialPropertyUtil.cpp +++ b/Gems/Atom/Tools/AtomToolsFramework/Code/Source/Util/MaterialPropertyUtil.cpp @@ -6,9 +6,10 @@ * */ -#include #include +#include +#include #include #include #include @@ -18,6 +19,7 @@ #include #include #include +#include #include namespace AtomToolsFramework @@ -163,6 +165,90 @@ namespace AtomToolsFramework return false; } + bool ConvertToExportFormat( + const AZStd::string& exportPath, + [[maybe_unused]] const AZ::Name& propertyId, + const AZ::RPI::MaterialTypeSourceData::PropertyDefinition& propertyDefinition, + AZ::RPI::MaterialPropertyValue& propertyValue) + { + if (propertyDefinition.m_dataType == AZ::RPI::MaterialPropertyDataType::Enum && propertyValue.Is()) + { + const uint32_t index = propertyValue.GetValue(); + if (index >= propertyDefinition.m_enumValues.size()) + { + AZ_Error("AtomToolsFramework", false, "Invalid value for material enum property: '%s'.", propertyId.GetCStr()); + return false; + } + + propertyValue = propertyDefinition.m_enumValues[index]; + return true; + } + + // Image asset references must be converted from asset IDs to a relative source file path + if (propertyDefinition.m_dataType == AZ::RPI::MaterialPropertyDataType::Image) + { + AZStd::string imagePath; + AZ::Data::AssetId imageAssetId; + + if (propertyValue.Is>()) + { + const auto& imageAsset = propertyValue.GetValue>(); + imageAssetId = imageAsset.GetId(); + } + + if (propertyValue.Is>()) + { + const auto& image = propertyValue.GetValue>(); + if (image) + { + imageAssetId = image->GetAssetId(); + } + } + + imagePath = AZ::RPI::AssetUtils::GetSourcePathByAssetId(imageAssetId); + + if (imageAssetId.IsValid() && imagePath.empty()) + { + AZ_Error("AtomToolsFramework", false, "Image asset could not be found for property: '%s'.", propertyId.GetCStr()); + return false; + } + else + { + propertyValue = GetExteralReferencePath(exportPath, imagePath); + return true; + } + } + + return true; + } + + AZStd::string GetExteralReferencePath( + const AZStd::string& exportPath, const AZStd::string& referencePath, const bool relativeToExportPath) + { + if (referencePath.empty()) + { + return {}; + } + + if (!relativeToExportPath) + { + AZStd::string watchFolder; + AZ::Data::AssetInfo assetInfo; + bool sourceInfoFound = false; + AzToolsFramework::AssetSystemRequestBus::BroadcastResult( + sourceInfoFound, &AzToolsFramework::AssetSystemRequestBus::Events::GetSourceInfoBySourcePath, referencePath.c_str(), + assetInfo, watchFolder); + if (sourceInfoFound) + { + return assetInfo.m_relativePath; + } + } + + AZ::IO::BasicPath exportFolder(exportPath); + exportFolder.RemoveFilename(); + return AZ::IO::PathView(referencePath).LexicallyRelative(exportFolder).StringAsPosix(); + } + const AtomToolsFramework::DynamicProperty* FindDynamicPropertyForInstanceDataNode(const AzToolsFramework::InstanceDataNode* pNode) { // Traverse up the hierarchy from the input node to search for an instance corresponding to material inspector property @@ -172,7 +258,8 @@ namespace AtomToolsFramework const AZ::SerializeContext::ClassData* classData = currentNode->GetClassMetadata(); if (context && classData) { - if (context->CanDowncast(classData->m_typeId, azrtti_typeid(), classData->m_azRtti, nullptr)) + if (context->CanDowncast( + classData->m_typeId, azrtti_typeid(), classData->m_azRtti, nullptr)) { return static_cast(currentNode->FirstInstance()); } diff --git a/Gems/Atom/Tools/AtomToolsFramework/Code/Source/Util/Util.cpp b/Gems/Atom/Tools/AtomToolsFramework/Code/Source/Util/Util.cpp index be112345a9..b45ff3c12f 100644 --- a/Gems/Atom/Tools/AtomToolsFramework/Code/Source/Util/Util.cpp +++ b/Gems/Atom/Tools/AtomToolsFramework/Code/Source/Util/Util.cpp @@ -6,15 +6,18 @@ * */ +#include +#include #include #include +#include #include #include #include #include +#include #include #include -#include AZ_PUSH_DISABLE_WARNING(4251 4800, "-Wunknown-warning-option") // disable warnings spawned by QT #include @@ -24,11 +27,43 @@ AZ_POP_DISABLE_WARNING namespace AtomToolsFramework { + void LoadImageAsync(const AZStd::string& path, LoadImageAsyncCallback callback) + { + AZ::Job* job = AZ::CreateJobFunction( + [path, callback]() + { + ImageProcessingAtom::IImageObjectPtr imageObject; + ImageProcessingAtom::ImageProcessingRequestBus::BroadcastResult( + imageObject, &ImageProcessingAtom::ImageProcessingRequests::LoadImagePreview, path); + + if (imageObject) + { + AZ::u8* imageBuf = nullptr; + AZ::u32 pitch = 0; + AZ::u32 mip = 0; + imageObject->GetImagePointer(mip, imageBuf, pitch); + const AZ::u32 width = imageObject->GetWidth(mip); + const AZ::u32 height = imageObject->GetHeight(mip); + + QImage image(imageBuf, width, height, pitch, QImage::Format_RGBA8888); + + if (callback) + { + callback(image); + } + } + }, + true); + job->Start(); + } + QFileInfo GetSaveFileInfo(const QString& initialPath) { const QFileInfo initialFileInfo(initialPath); const QString initialExt(initialFileInfo.completeSuffix()); + // Instead of just passing in the absolute file path, we pass in the absolute folder path and the base name to prevent the file + // dialog from displaying multiple extensions when the extension contains a "." const QFileInfo selectedFileInfo(AzQtComponents::FileDialog::GetSaveFileName( QApplication::activeWindow(), "Save File", @@ -49,7 +84,9 @@ namespace AtomToolsFramework return QFileInfo(); } - return selectedFileInfo; + // Reconstructing the file info from the absolute path and expected extension to compensate for an issue with the save file + // dialog adding the extension multiple times if it contains "." like *.lightingpreset.azasset + return QFileInfo(selectedFileInfo.absolutePath() + AZ_CORRECT_FILESYSTEM_SEPARATOR_STRING + selectedFileInfo.baseName() + "." + initialExt); } QFileInfo GetOpenFileInfo(const AZStd::vector& assetTypes) @@ -133,29 +170,12 @@ namespace AtomToolsFramework bool LaunchTool(const QString& baseName, const QString& extension, const QStringList& arguments) { - const char* engineRoot = nullptr; - AzFramework::ApplicationRequests::Bus::BroadcastResult(engineRoot, &AzFramework::ApplicationRequests::GetEngineRoot); - AZ_Assert(engineRoot != nullptr, "AzFramework::ApplicationRequests::GetEngineRoot failed"); + AZ::IO::FixedMaxPath engineRoot = AZ::Utils::GetEnginePath(); + AZ_Assert(!engineRoot.empty(), "Cannot query Engine Path"); - char binFolderName[AZ_MAX_PATH_LEN] = {}; - AZ::Utils::GetExecutablePathReturnType ret = AZ::Utils::GetExecutablePath(binFolderName, AZ_MAX_PATH_LEN); + AZ::IO::FixedMaxPath launchPath = AZ::IO::FixedMaxPath(AZ::Utils::GetExecutableDirectory()) + / (baseName + extension).toUtf8().constData(); - // If it contains the filename, zero out the last path separator character... - if (ret.m_pathIncludesFilename) - { - char* lastSlash = strrchr(binFolderName, AZ_CORRECT_FILESYSTEM_SEPARATOR); - if (lastSlash) - { - *lastSlash = '\0'; - } - } - - const QString path = QString("%1%2%3%4") - .arg(binFolderName) - .arg(AZ_CORRECT_FILESYSTEM_SEPARATOR_STRING) - .arg(baseName) - .arg(extension); - - return QProcess::startDetached(path, arguments, engineRoot); + return QProcess::startDetached(launchPath.c_str(), arguments, engineRoot.c_str()); } } diff --git a/Gems/Atom/Tools/AtomToolsFramework/Code/Source/Viewport/ModularViewportCameraController.cpp b/Gems/Atom/Tools/AtomToolsFramework/Code/Source/Viewport/ModularViewportCameraController.cpp index a92bfdbcdb..2e84cde0e1 100644 --- a/Gems/Atom/Tools/AtomToolsFramework/Code/Source/Viewport/ModularViewportCameraController.cpp +++ b/Gems/Atom/Tools/AtomToolsFramework/Code/Source/Viewport/ModularViewportCameraController.cpp @@ -12,6 +12,7 @@ #include #include #include +#include #include #include #include @@ -85,7 +86,7 @@ namespace AtomToolsFramework } } - void ModularCameraViewportContextImpl::ConnectViewMatrixChangedHandler(AZ::RPI::ViewportContext::MatrixChangedEvent::Handler& handler) + void ModularCameraViewportContextImpl::ConnectViewMatrixChangedHandler(AZ::RPI::MatrixChangedEvent::Handler& handler) { if (auto viewportContext = RetrieveViewportContext(m_viewportId)) { @@ -175,20 +176,16 @@ namespace AtomToolsFramework // ignore these updates if the camera is being updated internally if (!m_updatingTransformInternally) { - if (m_storedCamera.has_value()) - { - // if an external change occurs ensure we update the stored reference frame if one is set - RefreshReferenceFrame(); - return; - } - m_previousCamera = m_targetCamera; - UpdateCameraFromTransform(m_targetCamera, m_modularCameraViewportContext->GetCameraTransform()); - m_camera = m_targetCamera; + + const AZ::Transform transform = m_modularCameraViewportContext->GetCameraTransform(); + const AZ::Vector3 eulerAngles = AzFramework::EulerAngles(AZ::Matrix3x3::CreateFromTransform(transform)); + UpdateCameraFromTranslationAndRotation(m_targetCamera, transform.GetTranslation(), eulerAngles); + m_targetRoll = eulerAngles.GetY(); } }; - m_cameraViewMatrixChangeHandler = AZ::RPI::ViewportContext::MatrixChangedEvent::Handler(handleCameraChange); + m_cameraViewMatrixChangeHandler = AZ::RPI::MatrixChangedEvent::Handler(handleCameraChange); m_modularCameraViewportContext->ConnectViewMatrixChangedHandler(m_cameraViewMatrixChangeHandler); ModularViewportCameraControllerRequestBus::Handler::BusConnect(viewportId); @@ -227,7 +224,9 @@ namespace AtomToolsFramework { m_targetCamera = m_cameraSystem.StepCamera(m_targetCamera, event.m_deltaTime.count()); m_camera = AzFramework::SmoothCamera(m_camera, m_targetCamera, m_cameraProps, event.m_deltaTime.count()); - m_modularCameraViewportContext->SetCameraTransform(m_referenceFrameOverride * m_camera.Transform()); + m_roll = AzFramework::SmoothValue(m_targetRoll, m_roll, m_cameraProps.m_rotateSmoothnessFn(), event.m_deltaTime.count()); + + m_modularCameraViewportContext->SetCameraTransform(CombinedCameraTransform()); } else if (m_cameraMode == CameraMode::Animation) { @@ -236,7 +235,10 @@ namespace AtomToolsFramework return t * t * t * (t * (t * 6.0f - 15.0f) + 10.0f); }; - m_cameraAnimation.m_time = AZ::GetClamp(m_cameraAnimation.m_time + event.m_deltaTime.count(), 0.0f, 1.0f); + m_cameraAnimation.m_time = AZ::GetClamp( + m_cameraAnimation.m_time + + (event.m_deltaTime.count() / ModularViewportCameraControllerRequests::InterpolateToTransformDuration), + 0.0f, 1.0f); const auto& [transformStart, transformEnd, animationTime] = m_cameraAnimation; @@ -250,6 +252,7 @@ namespace AtomToolsFramework m_camera.m_yaw = eulerAngles.GetZ(); m_camera.m_pivot = current.GetTranslation(); m_camera.m_offset = AZ::Vector3::CreateZero(); + m_targetRoll = eulerAngles.GetY(); m_targetCamera = m_camera; m_modularCameraViewportContext->SetCameraTransform(current); @@ -257,55 +260,74 @@ namespace AtomToolsFramework if (animationTime >= 1.0f) { m_cameraMode = CameraMode::Control; - RefreshReferenceFrame(); } } m_updatingTransformInternally = false; } - void ModularViewportCameraControllerInstance::InterpolateToTransform(const AZ::Transform& worldFromLocal) + bool ModularViewportCameraControllerInstance::InterpolateToTransform(const AZ::Transform& worldFromLocal) { - m_cameraMode = CameraMode::Animation; - m_cameraAnimation = CameraAnimation{ m_referenceFrameOverride * m_camera.Transform(), worldFromLocal, 0.0f }; + if (!IsInterpolating()) + { + m_cameraMode = CameraMode::Animation; + m_cameraAnimation = CameraAnimation{ CombinedCameraTransform(), worldFromLocal, 0.0f }; + + return true; + } + + return false; } - AZ::Transform ModularViewportCameraControllerInstance::GetReferenceFrame() const + void ModularViewportCameraControllerInstance::SetCameraPivotAttached(const AZ::Vector3& pivot) { - return m_referenceFrameOverride; + m_targetCamera.m_pivot = pivot; } - void ModularViewportCameraControllerInstance::SetReferenceFrame(const AZ::Transform& worldFromLocal) + void ModularViewportCameraControllerInstance::SetCameraPivotDetached(const AZ::Vector3& pivot) + { + AzFramework::MovePivotDetached(m_targetCamera, pivot); + } + + void ModularViewportCameraControllerInstance::SetCameraOffset(const AZ::Vector3& offset) + { + m_targetCamera.m_offset = offset; + } + + bool ModularViewportCameraControllerInstance::IsInterpolating() const + { + return m_cameraMode == CameraMode::Animation; + } + + void ModularViewportCameraControllerInstance::StartTrackingTransform(const AZ::Transform& worldFromLocal) { if (!m_storedCamera.has_value()) { m_storedCamera = m_previousCamera; } - m_referenceFrameOverride = worldFromLocal; - m_targetCamera.m_pitch = 0.0f; - m_targetCamera.m_yaw = 0.0f; + const auto angles = AzFramework::EulerAngles(AZ::Matrix3x3::CreateFromQuaternion(worldFromLocal.GetRotation())); + m_targetCamera.m_pitch = angles.GetX(); + m_targetCamera.m_yaw = angles.GetZ(); m_targetCamera.m_offset = AZ::Vector3::CreateZero(); - m_targetCamera.m_pivot = AZ::Vector3::CreateZero(); - m_camera = m_targetCamera; + m_targetCamera.m_pivot = worldFromLocal.GetTranslation(); + m_targetRoll = angles.GetY(); } - void ModularViewportCameraControllerInstance::ClearReferenceFrame() + void ModularViewportCameraControllerInstance::StopTrackingTransform() { - m_referenceFrameOverride = AZ::Transform::CreateIdentity(); - if (m_storedCamera.has_value()) { m_targetCamera = m_storedCamera.value(); - m_camera = m_targetCamera; + m_targetRoll = 0.0f; } m_storedCamera.reset(); } - void ModularViewportCameraControllerInstance::RefreshReferenceFrame() + bool ModularViewportCameraControllerInstance::IsTrackingTransform() const { - m_referenceFrameOverride = m_modularCameraViewportContext->GetCameraTransform() * m_camera.Transform().GetInverse(); + return m_storedCamera.has_value(); } AZ::Transform PlaceholderModularCameraViewportContextImpl::GetCameraTransform() const @@ -316,12 +338,17 @@ namespace AtomToolsFramework void PlaceholderModularCameraViewportContextImpl::SetCameraTransform(const AZ::Transform& transform) { m_cameraTransform = transform; - m_viewMatrixChangedEvent.Signal(AzFramework::CameraViewFromCameraTransform(Matrix4x4FromTransform(transform))); + m_viewMatrixChangedEvent.Signal( + AZ::Matrix4x4::CreateFromMatrix3x4(AzFramework::CameraViewFromCameraTransform(AZ::Matrix3x4::CreateFromTransform(transform)))); } - void PlaceholderModularCameraViewportContextImpl::ConnectViewMatrixChangedHandler( - AZ::RPI::ViewportContext::MatrixChangedEvent::Handler& handler) + void PlaceholderModularCameraViewportContextImpl::ConnectViewMatrixChangedHandler(AZ::RPI::MatrixChangedEvent::Handler& handler) { handler.Connect(m_viewMatrixChangedEvent); } + + AZ::Transform ModularViewportCameraControllerInstance::CombinedCameraTransform() const + { + return m_camera.Transform() * AZ::Transform::CreateFromMatrix3x3(AZ::Matrix3x3::CreateRotationY(m_targetRoll)); + } } // namespace AtomToolsFramework diff --git a/Gems/Atom/Tools/AtomToolsFramework/Code/Source/Viewport/RenderViewportWidget.cpp b/Gems/Atom/Tools/AtomToolsFramework/Code/Source/Viewport/RenderViewportWidget.cpp index 9672abfd99..505ff70122 100644 --- a/Gems/Atom/Tools/AtomToolsFramework/Code/Source/Viewport/RenderViewportWidget.cpp +++ b/Gems/Atom/Tools/AtomToolsFramework/Code/Source/Viewport/RenderViewportWidget.cpp @@ -75,7 +75,11 @@ namespace AtomToolsFramework m_defaultCamera = AZ::RPI::View::CreateView(cameraName, AZ::RPI::View::UsageFlags::UsageCamera); AZ::Interface::Get()->PushView(m_viewportContext->GetName(), m_defaultCamera); - AzToolsFramework::ViewportInteraction::ViewportInteractionRequestBus::Handler::BusConnect(GetId()); + m_viewportInteractionImpl = AZStd::make_unique(m_defaultCamera); + m_viewportInteractionImpl->m_deviceScalingFactorFn = [this] { return aznumeric_cast(devicePixelRatioF()); }; + m_viewportInteractionImpl->m_screenSizeFn = [this] { return AzFramework::ScreenSize(width(), height()); }; + m_viewportInteractionImpl->Connect(id); + AzToolsFramework::ViewportInteraction::ViewportMouseCursorRequestBus::Handler::BusConnect(GetId()); AzFramework::InputChannelEventListener::Connect(); AZ::TickBus::Handler::BusConnect(); @@ -107,7 +111,7 @@ namespace AtomToolsFramework AZ::TickBus::Handler::BusDisconnect(); AzFramework::InputChannelEventListener::Disconnect(); AzToolsFramework::ViewportInteraction::ViewportMouseCursorRequestBus::Handler::BusDisconnect(); - AzToolsFramework::ViewportInteraction::ViewportInteractionRequestBus::Handler::BusDisconnect(); + m_viewportInteractionImpl->Disconnect(); } void RenderViewportWidget::LockRenderTargetSize(uint32_t width, uint32_t height) @@ -137,6 +141,24 @@ namespace AtomToolsFramework m_viewportContext->SetRenderScene(nullptr); return; } + + // Check if the scene already has an atom scene attached. In this case we don't need to create a new atom scene. + if (auto existingScene = scene->FindSubsystem()) + { + m_viewportContext->SetRenderScene(*existingScene); + + // If we have a render pipeline, use it and ensure an AuxGeom feature processor is installed. + // Otherwise, fall through and ensure a render pipeline is installed for this scene. + if (m_viewportContext->GetCurrentPipeline()) + { + if (auto auxGeomFP = existingScene->get()->GetFeatureProcessor()) + { + m_auxGeom = auxGeomFP->GetOrCreateDrawQueueForView(m_defaultCamera.get()); + } + return; + } + } + AZ::RPI::ScenePtr atomScene; auto initializeScene = [&](AZ::Render::Bootstrap::Request* bootstrapRequests) { @@ -278,77 +300,23 @@ namespace AtomToolsFramework AzFramework::CameraState RenderViewportWidget::GetCameraState() { - AZ::RPI::ViewPtr currentView = m_viewportContext->GetDefaultView(); - if (currentView == nullptr) - { - return {}; - } - - // Build camera state from Atom camera transforms - AzFramework::CameraState cameraState = AzFramework::CreateCameraFromWorldFromViewMatrix( - currentView->GetViewToWorldMatrix(), - AZ::Vector2{aznumeric_cast(width()), aznumeric_cast(height())} - ); - AzFramework::SetCameraClippingVolumeFromPerspectiveFovMatrixRH(cameraState, currentView->GetViewToClipMatrix()); - - // Convert from Z-up - AZStd::swap(cameraState.m_forward, cameraState.m_up); - cameraState.m_forward = -cameraState.m_forward; - - return cameraState; + return m_viewportInteractionImpl->GetCameraState(); } AzFramework::ScreenPoint RenderViewportWidget::ViewportWorldToScreen(const AZ::Vector3& worldPosition) { - if (AZ::RPI::ViewPtr currentView = m_viewportContext->GetDefaultView(); - currentView == nullptr) - { - return AzFramework::ScreenPoint(0, 0); - } - - return AzFramework::WorldToScreen(worldPosition, GetCameraState()); + return m_viewportInteractionImpl->ViewportWorldToScreen(worldPosition); } - AZStd::optional RenderViewportWidget::ViewportScreenToWorld(const AzFramework::ScreenPoint& screenPosition, float depth) + AZ::Vector3 RenderViewportWidget::ViewportScreenToWorld(const AzFramework::ScreenPoint& screenPosition) { - const auto& cameraProjection = m_viewportContext->GetCameraProjectionMatrix(); - const auto& cameraView = m_viewportContext->GetCameraViewMatrix(); - - const AZ::Vector4 normalizedScreenPosition { - screenPosition.m_x * 2.f / width() - 1.0f, - (height() - screenPosition.m_y) * 2.f / height() - 1.0f, - 1.f - depth, // [GFX TODO] [ATOM-1501] Currently we always assume reverse depth - 1.f - }; - - AZ::Matrix4x4 worldFromScreen = cameraProjection * cameraView; - worldFromScreen.InvertFull(); - - const AZ::Vector4 projectedPosition = worldFromScreen * normalizedScreenPosition; - if (projectedPosition.GetW() == 0.0f) - { - return {}; - } - - return projectedPosition.GetAsVector3() / projectedPosition.GetW(); + return m_viewportInteractionImpl->ViewportScreenToWorld(screenPosition); } - AZStd::optional RenderViewportWidget::ViewportScreenToWorldRay( + AzToolsFramework::ViewportInteraction::ProjectedViewportRay RenderViewportWidget::ViewportScreenToWorldRay( const AzFramework::ScreenPoint& screenPosition) { - auto pos0 = ViewportScreenToWorld(screenPosition, 0.f); - auto pos1 = ViewportScreenToWorld(screenPosition, 1.f); - if (!pos0.has_value() || !pos1.has_value()) - { - return {}; - } - - pos0 = m_viewportContext->GetDefaultView()->GetViewToWorldMatrix().GetTranslation(); - AZ::Vector3 rayOrigin = pos0.value(); - AZ::Vector3 rayDirection = pos1.value() - pos0.value(); - rayDirection.Normalize(); - - return AzToolsFramework::ViewportInteraction::ProjectedViewportRay{rayOrigin, rayDirection}; + return m_viewportInteractionImpl->ViewportScreenToWorldRay(screenPosition); } float RenderViewportWidget::DeviceScalingFactor() @@ -433,4 +401,11 @@ namespace AtomToolsFramework { return 1; } + + // Editor ignores requests to change the sync interval + bool RenderViewportWidget::SetSyncInterval(uint32_t /*ignored*/) + { + return false; + } + } //namespace AtomToolsFramework diff --git a/Gems/Atom/Tools/AtomToolsFramework/Code/Source/Viewport/ViewportInteractionImpl.cpp b/Gems/Atom/Tools/AtomToolsFramework/Code/Source/Viewport/ViewportInteractionImpl.cpp new file mode 100644 index 0000000000..7ae3175e03 --- /dev/null +++ b/Gems/Atom/Tools/AtomToolsFramework/Code/Source/Viewport/ViewportInteractionImpl.cpp @@ -0,0 +1,65 @@ +/* + * Copyright (c) Contributors to the Open 3D Engine Project. + * For complete copyright and license terms please see the LICENSE at the root of this distribution. + * + * SPDX-License-Identifier: Apache-2.0 OR MIT + * + */ + +#include +#include + +namespace AtomToolsFramework +{ + ViewportInteractionImpl::ViewportInteractionImpl(AZ::RPI::ViewPtr viewPtr) + : m_viewPtr(AZStd::move(viewPtr)) + { + } + + void ViewportInteractionImpl::Connect(const AzFramework::ViewportId viewportId) + { + AzToolsFramework::ViewportInteraction::ViewportInteractionRequestBus::Handler::BusConnect(viewportId); + AZ::RPI::ViewportContextIdNotificationBus::Handler::BusConnect(viewportId); + } + + void ViewportInteractionImpl::Disconnect() + { + AZ::RPI::ViewportContextIdNotificationBus::Handler::BusDisconnect(); + AzToolsFramework::ViewportInteraction::ViewportInteractionRequestBus::Handler::BusDisconnect(); + } + + AzFramework::CameraState ViewportInteractionImpl::GetCameraState() + { + // build camera state from atom camera transforms + AzFramework::CameraState cameraState = + AzFramework::CreateDefaultCamera(m_viewPtr->GetCameraTransform(), AzFramework::Vector2FromScreenSize(m_screenSizeFn())); + AzFramework::SetCameraClippingVolumeFromPerspectiveFovMatrixRH(cameraState, m_viewPtr->GetViewToClipMatrix()); + return cameraState; + } + + AzFramework::ScreenPoint ViewportInteractionImpl::ViewportWorldToScreen(const AZ::Vector3& worldPosition) + { + return AzFramework::WorldToScreen(worldPosition, GetCameraState()); + } + + AZ::Vector3 ViewportInteractionImpl::ViewportScreenToWorld(const AzFramework::ScreenPoint& screenPosition) + { + return AzFramework::ScreenToWorld(screenPosition, GetCameraState()); + } + + AzToolsFramework::ViewportInteraction::ProjectedViewportRay ViewportInteractionImpl::ViewportScreenToWorldRay( + const AzFramework::ScreenPoint& screenPosition) + { + return AzToolsFramework::ViewportInteraction::ViewportScreenToWorldRay(GetCameraState(), screenPosition); + } + + float ViewportInteractionImpl::DeviceScalingFactor() + { + return m_deviceScalingFactorFn(); + } + + void ViewportInteractionImpl::OnViewportDefaultViewChanged(AZ::RPI::ViewPtr view) + { + m_viewPtr = AZStd::move(view); + } +} // namespace AtomToolsFramework diff --git a/Gems/Atom/Tools/AtomToolsFramework/Code/Source/Window/AtomToolsMainWindow.cpp b/Gems/Atom/Tools/AtomToolsFramework/Code/Source/Window/AtomToolsMainWindow.cpp index aeca51230a..f07fd9c536 100644 --- a/Gems/Atom/Tools/AtomToolsFramework/Code/Source/Window/AtomToolsMainWindow.cpp +++ b/Gems/Atom/Tools/AtomToolsFramework/Code/Source/Window/AtomToolsMainWindow.cpp @@ -50,8 +50,9 @@ namespace AtomToolsFramework void AtomToolsMainWindow::ActivateWindow() { - activateWindow(); + show(); raise(); + activateWindow(); } bool AtomToolsMainWindow::AddDockWidget(const AZStd::string& name, QWidget* widget, uint32_t area, uint32_t orientation) diff --git a/Gems/Atom/Tools/AtomToolsFramework/Code/Tests/AtomToolsFrameworkTest.cpp b/Gems/Atom/Tools/AtomToolsFramework/Code/Tests/AtomToolsFrameworkTest.cpp index aee8e2a775..bdd166192f 100644 --- a/Gems/Atom/Tools/AtomToolsFramework/Code/Tests/AtomToolsFrameworkTest.cpp +++ b/Gems/Atom/Tools/AtomToolsFramework/Code/Tests/AtomToolsFrameworkTest.cpp @@ -7,25 +7,75 @@ */ #include +#include +#include -class AtomToolsFrameworkTest - : public ::testing::Test +namespace UnitTest { -protected: - void SetUp() override + class AtomToolsFrameworkTestEnvironment : public AZ::Test::ITestEnvironment { + protected: + void SetupEnvironment() override + { + AZ::AllocatorInstance::Create(); + } + void TeardownEnvironment() override + { + AZ::AllocatorInstance::Destroy(); + } + }; + + class AtomToolsFrameworkTest : public ::testing::Test + { + protected: + void SetUp() override + { + m_assetSystemStub.Activate(); + + RegisterSourceAsset("objects/upgrades/materials/supercondor.material"); + RegisterSourceAsset("materials/condor.material"); + RegisterSourceAsset("materials/talisman.material"); + RegisterSourceAsset("materials/city.material"); + RegisterSourceAsset("materials/totem.material"); + RegisterSourceAsset("textures/orange.png"); + RegisterSourceAsset("textures/red.png"); + RegisterSourceAsset("textures/gold.png"); + RegisterSourceAsset("textures/fuzz.png"); + } + + void TearDown() override + { + m_assetSystemStub.Deactivate(); + } + + void RegisterSourceAsset(const AZStd::string& path) + { + const AZ::IO::BasicPath assetRootPath = AZ::IO::PathView(m_assetRoot).LexicallyNormal(); + const AZ::IO::BasicPath normalizedPath = AZ::IO::BasicPath(assetRootPath).Append(path).LexicallyNormal(); + + AZ::Data::AssetInfo assetInfo = {}; + assetInfo.m_assetId = AZ::Uuid::CreateRandom(); + assetInfo.m_relativePath = normalizedPath.LexicallyRelative(assetRootPath).StringAsPosix(); + m_assetSystemStub.RegisterSourceInfo(normalizedPath.StringAsPosix().c_str(), assetInfo, assetRootPath.StringAsPosix().c_str()); + } + + static constexpr const char* m_assetRoot = "d:/project/assets/"; + AssetSystemStub m_assetSystemStub; + }; + + TEST_F(AtomToolsFrameworkTest, GetExteralReferencePath_Succeeds) + { + ASSERT_EQ(AtomToolsFramework::GetExteralReferencePath("", "", true), ""); + ASSERT_EQ(AtomToolsFramework::GetExteralReferencePath("d:/project/assets/materials/condor.material", "", true), ""); + ASSERT_EQ(AtomToolsFramework::GetExteralReferencePath("d:/project/assets/materials/talisman.material", "", false), ""); + ASSERT_EQ(AtomToolsFramework::GetExteralReferencePath("d:/project/assets/materials/talisman.material", "d:/project/assets/textures/gold.png", true), "../textures/gold.png"); + ASSERT_EQ(AtomToolsFramework::GetExteralReferencePath("d:/project/assets/materials/talisman.material", "d:/project/assets/textures/gold.png", false), "textures/gold.png"); + ASSERT_EQ(AtomToolsFramework::GetExteralReferencePath("d:/project/assets/objects/upgrades/materials/supercondor.material", "d:/project/assets/materials/condor.material", true), "../../../materials/condor.material"); + ASSERT_EQ(AtomToolsFramework::GetExteralReferencePath("d:/project/assets/objects/upgrades/materials/supercondor.material", "d:/project/assets/materials/condor.material", false), "materials/condor.material"); + ASSERT_EQ(AtomToolsFramework::GetExteralReferencePath("d:/project/assets/objects/upgrades/materials/supercondor.material", "d:/project/assets/materials/condor.material", false), "materials/condor.material"); + ASSERT_EQ(AtomToolsFramework::GetExteralReferencePath("d:/project/assets/objects/upgrades/materials/supercondor.material", "d:/project/assets/materials/condor.material", false), "materials/condor.material"); } - void TearDown() override - { - - } -}; - -TEST_F(AtomToolsFrameworkTest, SanityTest) -{ - ASSERT_TRUE(true); -} - -AZ_UNIT_TEST_HOOK(DEFAULT_UNIT_TEST_ENV); + AZ_UNIT_TEST_HOOK(new AtomToolsFrameworkTestEnvironment); +} // namespace UnitTest diff --git a/Gems/Atom/Tools/AtomToolsFramework/Code/Tests/ViewportInteractionImplTests.cpp b/Gems/Atom/Tools/AtomToolsFramework/Code/Tests/ViewportInteractionImplTests.cpp new file mode 100644 index 0000000000..3a96d3c07b --- /dev/null +++ b/Gems/Atom/Tools/AtomToolsFramework/Code/Tests/ViewportInteractionImplTests.cpp @@ -0,0 +1,208 @@ +/* + * Copyright (c) Contributors to the Open 3D Engine Project. + * For complete copyright and license terms please see the LICENSE at the root of this distribution. + * + * SPDX-License-Identifier: Apache-2.0 OR MIT + * + */ + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +namespace UnitTest +{ + class ViewportInteractionImplFixture : public ::testing::Test + { + public: + static inline constexpr AzFramework::ViewportId TestViewportId = 1234; + static inline constexpr AzFramework::ScreenSize ScreenDimensions = AzFramework::ScreenSize(1280, 720); + + static AzFramework::ScreenPoint ScreenCenter() + { + const auto halfScreenDimensions = ScreenDimensions * 0.5f; + return AzFramework::ScreenPoint(halfScreenDimensions.m_width, halfScreenDimensions.m_height); + } + + void SetUp() override + { + AZ::NameDictionary::Create(); + + m_view = AZ::RPI::View::CreateView(AZ::Name("TestView"), AZ::RPI::View::UsageCamera); + + const auto aspectRatio = aznumeric_cast(ScreenDimensions.m_width) / aznumeric_cast(ScreenDimensions.m_height); + + AZ::Matrix4x4 viewToClipMatrix; + AZ::MakePerspectiveFovMatrixRH(viewToClipMatrix, AZ::DegToRad(60.0f), aspectRatio, 0.1f, 1000.f, true); + m_view->SetViewToClipMatrix(viewToClipMatrix); + + m_viewportInteractionImpl = AZStd::make_unique(m_view); + + m_viewportInteractionImpl->m_deviceScalingFactorFn = [] + { + return 1.0f; + }; + m_viewportInteractionImpl->m_screenSizeFn = [] + { + return ScreenDimensions; + }; + + m_viewportInteractionImpl->Connect(TestViewportId); + } + + void TearDown() override + { + m_viewportInteractionImpl->Disconnect(); + m_viewportInteractionImpl.reset(); + + m_view.reset(); + + AZ::NameDictionary::Destroy(); + } + + AZ::RPI::ViewPtr m_view; + AZStd::unique_ptr m_viewportInteractionImpl; + }; + + // transform a point from screen space to world space, and then from world space back to screen space + AzFramework::ScreenPoint ScreenToWorldToScreen( + const AzFramework::ScreenPoint& screenPoint, + AzToolsFramework::ViewportInteraction::ViewportInteractionRequests& viewportInteractionRequests) + { + const auto worldResult = viewportInteractionRequests.ViewportScreenToWorld(screenPoint); + return viewportInteractionRequests.ViewportWorldToScreen(worldResult); + } + + TEST_F(ViewportInteractionImplFixture, ViewportInteractionRequestsMapsFromScreenToWorldAndBack) + { + using AzFramework::ScreenPoint; + + m_view->SetCameraTransform(AZ::Matrix3x4::CreateFromMatrix3x3AndTranslation( + AZ::Matrix3x3::CreateRotationZ(AZ::DegToRad(90.0f)), AZ::Vector3(10.0f, 0.0f, 5.0f))); + + { + const auto expectedScreenPoint = ScreenPoint{ 600, 450 }; + const auto resultScreenPoint = ScreenToWorldToScreen(expectedScreenPoint, *m_viewportInteractionImpl); + EXPECT_EQ(resultScreenPoint, expectedScreenPoint); + } + + { + auto expectedScreenPoint = ScreenCenter(); + const auto resultScreenPoint = ScreenToWorldToScreen(expectedScreenPoint, *m_viewportInteractionImpl); + EXPECT_EQ(resultScreenPoint, expectedScreenPoint); + } + + { + const auto expectedScreenPoint = ScreenPoint{ 0, 0 }; + const auto resultScreenPoint = ScreenToWorldToScreen(expectedScreenPoint, *m_viewportInteractionImpl); + EXPECT_EQ(resultScreenPoint, expectedScreenPoint); + } + + { + const auto expectedScreenPoint = ScreenPoint{ ScreenDimensions.m_width, ScreenDimensions.m_height }; + const auto resultScreenPoint = ScreenToWorldToScreen(expectedScreenPoint, *m_viewportInteractionImpl); + EXPECT_EQ(resultScreenPoint, expectedScreenPoint); + } + } + + TEST_F(ViewportInteractionImplFixture, ScreenToWorldReturnsPositionOnNearClipPlaneInWorldSpace) + { + m_view->SetCameraTransform(AZ::Matrix3x4::CreateFromMatrix3x3AndTranslation( + AZ::Matrix3x3::CreateRotationZ(AZ::DegToRad(-90.0f)), AZ::Vector3(20.0f, 0.0f, 0.0f))); + + const auto worldResult = m_viewportInteractionImpl->ViewportScreenToWorld(ScreenCenter()); + EXPECT_THAT(worldResult, IsClose(AZ::Vector3(20.1f, 0.0f, 0.0f))); + } + + // note: values produced by reproducing in the editor viewport + TEST_F(ViewportInteractionImplFixture, WorldToScreenGivesExpectedScreenCoordinates) + { + using AzFramework::ScreenPoint; + + { + m_view->SetCameraTransform(AZ::Matrix3x4::CreateFromMatrix3x3AndTranslation( + AZ::Matrix3x3::CreateRotationZ(AZ::DegToRad(160.0f)) * AZ::Matrix3x3::CreateRotationX(AZ::DegToRad(-18.0f)), + AZ::Vector3(-21.0f, 2.5f, 6.0f))); + + const auto screenResult = m_viewportInteractionImpl->ViewportWorldToScreen(AZ::Vector3(-21.0f, -1.5f, 5.0f)); + EXPECT_EQ(screenResult, ScreenPoint(420, 326)); + } + + { + m_view->SetCameraTransform(AZ::Matrix3x4::CreateFromMatrix3x3AndTranslation( + AZ::Matrix3x3::CreateRotationZ(AZ::DegToRad(175.0f)) * AZ::Matrix3x3::CreateRotationX(AZ::DegToRad(-90.0f)), + AZ::Vector3(-10.0f, -11.0f, 2.5f))); + + const auto screenResult = m_viewportInteractionImpl->ViewportWorldToScreen(AZ::Vector3(-10.0f, -10.5f, 0.5f)); + EXPECT_EQ(screenResult, ScreenPoint(654, 515)); + } + + { + m_view->SetCameraTransform(AZ::Matrix3x4::CreateFromMatrix3x3AndTranslation( + AZ::Matrix3x3::CreateRotationZ(AZ::DegToRad(70.0f)) * AZ::Matrix3x3::CreateRotationX(AZ::DegToRad(65.0f)), + AZ::Vector3(-22.5f, -10.0f, 1.5f))); + + const auto screenResult = m_viewportInteractionImpl->ViewportWorldToScreen(AZ::Vector3(-23.0f, -9.5f, 3.0f)); + EXPECT_EQ(screenResult, ScreenPoint(754, 340)); + } + } + + TEST_F(ViewportInteractionImplFixture, ScreenToWorldRayGivesGivesExpectedOriginAndDirection) + { + using AzFramework::ScreenPoint; + + m_view->SetCameraTransform(AZ::Matrix3x4::CreateFromMatrix3x3AndTranslation( + AZ::Matrix3x3::CreateRotationZ(AZ::DegToRad(34.0f)) * AZ::Matrix3x3::CreateRotationX(AZ::DegToRad(-24.0f)), + AZ::Vector3(-9.3f, -9.8f, 4.0f))); + + const auto ray = m_viewportInteractionImpl->ViewportScreenToWorldRay(ScreenPoint(832, 226)); + + float unused; + auto intersection = + AZ::Intersect::IntersectRaySphere(ray.m_origin, ray.m_direction, AZ::Vector3(-14.0f, 5.7f, 0.75f), 0.5f, unused); + + EXPECT_EQ(intersection, AZ::Intersect::SphereIsectTypes::ISECT_RAY_SPHERE_ISECT); + } + + TEST_F(ViewportInteractionImplFixture, ViewportInteractionRequestsReturnsNewViewWhenItIsChanged) + { + // Given + const auto primaryViewTransform = AZ::Matrix3x4::CreateFromMatrix3x3AndTranslation( + AZ::Matrix3x3::CreateRotationZ(AZ::DegToRad(90.0f)) * AZ::Matrix3x3::CreateRotationX(AZ::DegToRad(-45.0f)), + AZ::Vector3(-10.0f, -15.0f, 20.0f)); + + m_view->SetCameraTransform(primaryViewTransform); + + AZ::RPI::ViewPtr secondaryView = AZ::RPI::View::CreateView(AZ::Name("SecondaryView"), AZ::RPI::View::UsageCamera); + + const auto secondaryViewTransform = AZ::Matrix3x4::CreateFromMatrix3x3AndTranslation( + AZ::Matrix3x3::CreateRotationZ(AZ::DegToRad(-90.0f)) * AZ::Matrix3x3::CreateRotationX(AZ::DegToRad(30.0f)), + AZ::Vector3(-50.0f, -25.0f, 10.0f)); + + secondaryView->SetCameraTransform(secondaryViewTransform); + + // When + AZ::RPI::ViewportContextIdNotificationBus::Event( + TestViewportId, &AZ::RPI::ViewportContextIdNotificationBus::Events::OnViewportDefaultViewChanged, secondaryView); + + // retrieve updated camera transform + AzFramework::CameraState cameraState; + AzToolsFramework::ViewportInteraction::ViewportInteractionRequestBus::EventResult( + cameraState, TestViewportId, &AzToolsFramework::ViewportInteraction::ViewportInteractionRequestBus::Events::GetCameraState); + + const auto cameraTransform = AzFramework::CameraTransform(cameraState); + + // Then + // camera transform matches that of the secondary view + EXPECT_THAT(cameraTransform, IsClose(secondaryViewTransform)); + } +} // namespace UnitTest diff --git a/Gems/Atom/Tools/AtomToolsFramework/Code/atomtoolsframework_files.cmake b/Gems/Atom/Tools/AtomToolsFramework/Code/atomtoolsframework_files.cmake index a2446cebcc..3ddcc05245 100644 --- a/Gems/Atom/Tools/AtomToolsFramework/Code/atomtoolsframework_files.cmake +++ b/Gems/Atom/Tools/AtomToolsFramework/Code/atomtoolsframework_files.cmake @@ -28,6 +28,7 @@ set(FILES Include/AtomToolsFramework/Util/MaterialPropertyUtil.h Include/AtomToolsFramework/Util/Util.h Include/AtomToolsFramework/Viewport/RenderViewportWidget.h + Include/AtomToolsFramework/Viewport/ViewportInteractionImpl.h Include/AtomToolsFramework/Viewport/ModularViewportCameraController.h Include/AtomToolsFramework/Viewport/ModularViewportCameraControllerRequestBus.h Include/AtomToolsFramework/Window/AtomToolsMainWindow.h @@ -55,6 +56,7 @@ set(FILES Source/Util/Util.cpp Source/Viewport/RenderViewportWidget.cpp Source/Viewport/ModularViewportCameraController.cpp + Source/Viewport/ViewportInteractionImpl.cpp Source/Window/AtomToolsMainWindow.cpp Source/Window/AtomToolsMainWindowSystemComponent.cpp Source/Window/AtomToolsMainWindowSystemComponent.h diff --git a/Gems/Atom/Tools/AtomToolsFramework/Code/atomtoolsframework_tests_files.cmake b/Gems/Atom/Tools/AtomToolsFramework/Code/atomtoolsframework_tests_files.cmake new file mode 100644 index 0000000000..a071d29f47 --- /dev/null +++ b/Gems/Atom/Tools/AtomToolsFramework/Code/atomtoolsframework_tests_files.cmake @@ -0,0 +1,12 @@ +# +# Copyright (c) Contributors to the Open 3D Engine Project. +# For complete copyright and license terms please see the LICENSE at the root of this distribution. +# +# SPDX-License-Identifier: Apache-2.0 OR MIT +# +# + +set(FILES + Tests/AtomToolsFrameworkTest.cpp + Tests/ViewportInteractionImplTests.cpp +) \ No newline at end of file diff --git a/Gems/Atom/Tools/AtomToolsFramework/gem.json b/Gems/Atom/Tools/AtomToolsFramework/gem.json index 2b0380bdae..de2a9e06f2 100644 --- a/Gems/Atom/Tools/AtomToolsFramework/gem.json +++ b/Gems/Atom/Tools/AtomToolsFramework/gem.json @@ -2,6 +2,7 @@ "gem_name": "AtomToolsFramework", "display_name": "Atom Tools Framework", "license": "Apache-2.0 Or MIT", + "license_url": "https://github.com/o3de/o3de/blob/development/LICENSE.txt", "origin": "Open 3D Engine - o3de.org", "type": "Code", "summary": "", diff --git a/Gems/Atom/Tools/MaterialEditor/Code/CMakeLists.txt b/Gems/Atom/Tools/MaterialEditor/Code/CMakeLists.txt index d585e81162..99beb721d6 100644 --- a/Gems/Atom/Tools/MaterialEditor/Code/CMakeLists.txt +++ b/Gems/Atom/Tools/MaterialEditor/Code/CMakeLists.txt @@ -60,7 +60,6 @@ ly_add_target( Gem::AtomToolsFramework.Editor Gem::Atom_RPI.Public Gem::Atom_Feature_Common.Public - Gem::ImageProcessingAtom.Headers ) ly_add_target( @@ -113,7 +112,6 @@ ly_add_target( RUNTIME_DEPENDENCIES Gem::AtomToolsFramework.Editor Gem::EditorPythonBindings.Editor - Gem::ImageProcessingAtom.Editor ) ly_set_gem_variant_to_load(TARGETS MaterialEditor VARIANTS Tools) diff --git a/Gems/Atom/Tools/MaterialEditor/Code/Include/Atom/Viewport/MaterialViewportRequestBus.h b/Gems/Atom/Tools/MaterialEditor/Code/Include/Atom/Viewport/MaterialViewportRequestBus.h index e859d6a433..e37512127c 100644 --- a/Gems/Atom/Tools/MaterialEditor/Code/Include/Atom/Viewport/MaterialViewportRequestBus.h +++ b/Gems/Atom/Tools/MaterialEditor/Code/Include/Atom/Viewport/MaterialViewportRequestBus.h @@ -62,15 +62,6 @@ namespace MaterialEditor //! Get set of lighting preset names virtual MaterialViewportPresetNameSet GetLightingPresetNames() const = 0; - //! Set lighting preset preview image - //! @param preset used to set preview image - //! @param preview image - virtual void SetLightingPresetPreview(AZ::Render::LightingPresetPtr preset, const QImage& image) = 0; - - //! Get lighting preset preview image - //! @param preset used to find preview image - virtual QImage GetLightingPresetPreview(AZ::Render::LightingPresetPtr preset) const = 0; - //! Get model preset last save path //! @param preset to lookup last save path virtual AZStd::string GetLightingPresetLastSavePath(AZ::Render::LightingPresetPtr preset) const = 0; @@ -108,15 +99,6 @@ namespace MaterialEditor //! Get set of model preset names virtual MaterialViewportPresetNameSet GetModelPresetNames() const = 0; - //! Set model preset preview image - //! @param preset used to set preview image - //! @param preview image - virtual void SetModelPresetPreview(AZ::Render::ModelPresetPtr preset, const QImage& image) = 0; - - //! Get model preset preview image - //! @param preset used to find preview image - virtual QImage GetModelPresetPreview(AZ::Render::ModelPresetPtr preset) const = 0; - //! Get model preset last save path //! @param preset to lookup last save path virtual AZStd::string GetModelPresetLastSavePath(AZ::Render::ModelPresetPtr preset) const = 0; diff --git a/Gems/Atom/Tools/MaterialEditor/Code/Source/Document/MaterialDocument.cpp b/Gems/Atom/Tools/MaterialEditor/Code/Source/Document/MaterialDocument.cpp index 98af749261..97d8d5e354 100644 --- a/Gems/Atom/Tools/MaterialEditor/Code/Source/Document/MaterialDocument.cpp +++ b/Gems/Atom/Tools/MaterialEditor/Code/Source/Document/MaterialDocument.cpp @@ -12,6 +12,7 @@ #include #include #include +#include #include #include #include @@ -230,18 +231,13 @@ namespace MaterialEditor // create source data from properties MaterialSourceData sourceData; - sourceData.m_materialType = m_materialSourceData.m_materialType; - sourceData.m_parentMaterial = m_materialSourceData.m_parentMaterial; - - AZ_Assert(m_materialAsset && m_materialAsset->GetMaterialTypeAsset(), "When IsOpen() is true, these assets should not be null."); sourceData.m_materialTypeVersion = m_materialAsset->GetMaterialTypeAsset()->GetVersion(); - - // Force save data to store forward slashes - AzFramework::StringFunc::Replace(sourceData.m_materialType, "\\", "/"); - AzFramework::StringFunc::Replace(sourceData.m_parentMaterial, "\\", "/"); + sourceData.m_materialType = AtomToolsFramework::GetExteralReferencePath(m_absolutePath, m_materialSourceData.m_materialType); + sourceData.m_parentMaterial = AtomToolsFramework::GetExteralReferencePath(m_absolutePath, m_materialSourceData.m_parentMaterial); // populate sourceData with modified or overwritten properties - const bool savedProperties = SavePropertiesToSourceData(sourceData, [](const AtomToolsFramework::DynamicProperty& property) { + const bool savedProperties = SavePropertiesToSourceData(m_absolutePath, sourceData, [](const AtomToolsFramework::DynamicProperty& property) + { return !AtomToolsFramework::ArePropertyValuesEqual(property.GetValue(), property.GetConfig().m_parentValue); }); @@ -304,18 +300,13 @@ namespace MaterialEditor // create source data from properties MaterialSourceData sourceData; - sourceData.m_materialType = m_materialSourceData.m_materialType; - sourceData.m_parentMaterial = m_materialSourceData.m_parentMaterial; - - AZ_Assert(m_materialAsset && m_materialAsset->GetMaterialTypeAsset(), "When IsOpen() is true, these assets should not be null."); sourceData.m_materialTypeVersion = m_materialAsset->GetMaterialTypeAsset()->GetVersion(); - - // Force save data to store forward slashes - AzFramework::StringFunc::Replace(sourceData.m_materialType, "\\", "/"); - AzFramework::StringFunc::Replace(sourceData.m_parentMaterial, "\\", "/"); + sourceData.m_materialType = AtomToolsFramework::GetExteralReferencePath(normalizedSavePath, m_materialSourceData.m_materialType); + sourceData.m_parentMaterial = AtomToolsFramework::GetExteralReferencePath(normalizedSavePath, m_materialSourceData.m_parentMaterial); // populate sourceData with modified or overwritten properties - const bool savedProperties = SavePropertiesToSourceData(sourceData, [](const AtomToolsFramework::DynamicProperty& property) { + const bool savedProperties = SavePropertiesToSourceData(normalizedSavePath, sourceData, [](const AtomToolsFramework::DynamicProperty& property) + { return !AtomToolsFramework::ArePropertyValuesEqual(property.GetValue(), property.GetConfig().m_parentValue); }); @@ -377,23 +368,18 @@ namespace MaterialEditor // create source data from properties MaterialSourceData sourceData; - sourceData.m_materialType = m_materialSourceData.m_materialType; - - AZ_Assert(m_materialAsset && m_materialAsset->GetMaterialTypeAsset(), "When IsOpen() is true, these assets should not be null."); sourceData.m_materialTypeVersion = m_materialAsset->GetMaterialTypeAsset()->GetVersion(); + sourceData.m_materialType = AtomToolsFramework::GetExteralReferencePath(normalizedSavePath, m_materialSourceData.m_materialType); // Only assign a parent path if the source was a .material if (AzFramework::StringFunc::Path::IsExtension(m_relativePath.c_str(), MaterialSourceData::Extension)) { - sourceData.m_parentMaterial = m_relativePath; + sourceData.m_parentMaterial = AtomToolsFramework::GetExteralReferencePath(normalizedSavePath, m_absolutePath); } - // Force save data to store forward slashes - AzFramework::StringFunc::Replace(sourceData.m_materialType, "\\", "/"); - AzFramework::StringFunc::Replace(sourceData.m_parentMaterial, "\\", "/"); - // populate sourceData with modified properties - const bool savedProperties = SavePropertiesToSourceData(sourceData, [](const AtomToolsFramework::DynamicProperty& property) { + const bool savedProperties = SavePropertiesToSourceData(normalizedSavePath, sourceData, [](const AtomToolsFramework::DynamicProperty& property) + { return !AtomToolsFramework::ArePropertyValuesEqual(property.GetValue(), property.GetConfig().m_originalValue); }); @@ -567,30 +553,31 @@ namespace MaterialEditor } } - void MaterialDocument::SourceFileChanged(AZStd::string relativePath, AZStd::string scanFolder, AZ::Uuid sourceUUID) + void MaterialDocument::SourceFileChanged(AZStd::string relativePath, AZStd::string scanFolder, [[maybe_unused]] AZ::Uuid sourceUUID) { - if (m_sourceAssetId.m_guid == sourceUUID) + const auto sourcePath = AZ::RPI::AssetUtils::ResolvePathReference(scanFolder, relativePath); + + if (m_absolutePath == sourcePath) { // ignore notifications caused by saving the open document if (!m_saveTriggeredInternally) { AZ_TracePrintf("MaterialDocument", "Material document changed externally: '%s'.\n", m_absolutePath.c_str()); - AtomToolsFramework::AtomToolsDocumentNotificationBus::Broadcast(&AtomToolsFramework::AtomToolsDocumentNotificationBus::Events::OnDocumentExternallyModified, m_id); + AtomToolsFramework::AtomToolsDocumentNotificationBus::Broadcast( + &AtomToolsFramework::AtomToolsDocumentNotificationBus::Events::OnDocumentExternallyModified, m_id); } m_saveTriggeredInternally = false; } - } - - void MaterialDocument::OnAssetReloaded(AZ::Data::Asset asset) - { - if (m_dependentAssetIds.find(asset->GetId()) != m_dependentAssetIds.end()) + else if (m_sourceDependencies.find(sourcePath) != m_sourceDependencies.end()) { AZ_TracePrintf("MaterialDocument", "Material document dependency changed: '%s'.\n", m_absolutePath.c_str()); - AtomToolsFramework::AtomToolsDocumentNotificationBus::Broadcast(&AtomToolsFramework::AtomToolsDocumentNotificationBus::Events::OnDocumentDependencyModified, m_id); + AtomToolsFramework::AtomToolsDocumentNotificationBus::Broadcast( + &AtomToolsFramework::AtomToolsDocumentNotificationBus::Events::OnDocumentDependencyModified, m_id); } } - bool MaterialDocument::SavePropertiesToSourceData(AZ::RPI::MaterialSourceData& sourceData, PropertyFilterFunction propertyFilter) const + bool MaterialDocument::SavePropertiesToSourceData( + const AZStd::string& exportPath, AZ::RPI::MaterialSourceData& sourceData, PropertyFilterFunction propertyFilter) const { using namespace AZ; using namespace RPI; @@ -598,7 +585,7 @@ namespace MaterialEditor bool result = true; // populate sourceData with properties that meet the filter - m_materialTypeSourceData.EnumerateProperties([this, &sourceData, &propertyFilter, &result](const AZStd::string& groupName, const AZStd::string& propertyName, const auto& propertyDefinition) { + m_materialTypeSourceData.EnumerateProperties([&](const AZStd::string& groupName, const AZStd::string& propertyName, const auto& propertyDefinition) { const MaterialPropertyId propertyId(groupName, propertyName); @@ -608,7 +595,7 @@ namespace MaterialEditor MaterialPropertyValue propertyValue = AtomToolsFramework::ConvertToRuntimeType(it->second.GetValue()); if (propertyValue.IsValid()) { - if (!m_materialTypeSourceData.ConvertPropertyValueToSourceDataFormat(propertyDefinition, propertyValue)) + if (!AtomToolsFramework::ConvertToExportFormat(exportPath, propertyId.GetFullName(), propertyDefinition, propertyValue)) { AZ_Error("MaterialDocument", false, "Material document property could not be converted: '%s' in '%s'.", propertyId.GetFullName().GetCStr(), m_absolutePath.c_str()); result = false; @@ -655,7 +642,6 @@ namespace MaterialEditor return false; } - m_sourceAssetId = sourceAssetInfo.m_assetId; m_relativePath = sourceAssetInfo.m_relativePath; if (!AzFramework::StringFunc::Path::Normalize(m_relativePath)) { @@ -663,8 +649,6 @@ namespace MaterialEditor return false; } - AZStd::string materialTypeSourceFilePath; - // The material document and inspector are constructed from source data if (AzFramework::StringFunc::Path::IsExtension(m_absolutePath.c_str(), MaterialSourceData::Extension)) { @@ -675,13 +659,24 @@ namespace MaterialEditor return false; } - // We must also always load the material type data for a complete, ordered set of the - // groups and properties that will be needed for comparison and building the inspector - materialTypeSourceFilePath = AssetUtils::ResolvePathReference(m_absolutePath, m_materialSourceData.m_materialType); - auto materialTypeOutcome = MaterialUtils::LoadMaterialTypeSourceData(materialTypeSourceFilePath); + // We always need the absolute path for the material type and parent material to load source data and resolving + // relative paths when saving. This will convert and store them as absolute paths for use within the document. + if (!m_materialSourceData.m_parentMaterial.empty()) + { + m_materialSourceData.m_parentMaterial = + AssetUtils::ResolvePathReference(m_absolutePath, m_materialSourceData.m_parentMaterial); + } + + if (!m_materialSourceData.m_materialType.empty()) + { + m_materialSourceData.m_materialType = AssetUtils::ResolvePathReference(m_absolutePath, m_materialSourceData.m_materialType); + } + + // Load the material type source data which provides the layout and default values of all of the properties + auto materialTypeOutcome = MaterialUtils::LoadMaterialTypeSourceData(m_materialSourceData.m_materialType); if (!materialTypeOutcome.IsSuccess()) { - AZ_Error("MaterialDocument", false, "Material type source data could not be loaded: '%s'.", materialTypeSourceFilePath.c_str()); + AZ_Error("MaterialDocument", false, "Material type source data could not be loaded: '%s'.", m_materialSourceData.m_materialType.c_str()); return false; } m_materialTypeSourceData = materialTypeOutcome.GetValue(); @@ -694,10 +689,10 @@ namespace MaterialEditor } else if (AzFramework::StringFunc::Path::IsExtension(m_absolutePath.c_str(), MaterialTypeSourceData::Extension)) { - materialTypeSourceFilePath = m_absolutePath; - - // Load the material type source data, which will be used for enumerating properties and building material source data - auto materialTypeOutcome = MaterialUtils::LoadMaterialTypeSourceData(materialTypeSourceFilePath); + // A material document can be created or loaded from material or material type source data. If we are attempting to load + // material type source data then the material source data object can be created just by referencing the document path as the + // material type path. + auto materialTypeOutcome = MaterialUtils::LoadMaterialTypeSourceData(m_absolutePath); if (!materialTypeOutcome.IsSuccess()) { AZ_Error("MaterialDocument", false, "Material type source data could not be loaded: '%s'.", m_absolutePath.c_str()); @@ -705,9 +700,8 @@ namespace MaterialEditor } m_materialTypeSourceData = materialTypeOutcome.GetValue(); - // The document represents a material, not a material type. - // If the input data is a material type file we have to generate the material source data by referencing it. - m_materialSourceData.m_materialType = m_relativePath; + // We are storing absolute paths in the loaded version of the source data so that the files can be resolved at all times. + m_materialSourceData.m_materialType = m_absolutePath; m_materialSourceData.m_parentMaterial.clear(); } else @@ -715,6 +709,8 @@ namespace MaterialEditor AZ_Error("MaterialDocument", false, "Material document extension not supported: '%s'.", m_absolutePath.c_str()); return false; } + + const bool elevateWarnings = false; // In order to support automation, general usability, and 'save as' functionality, the user must not have to wait // for their JSON file to be cooked by the asset processor before opening or editing it. @@ -722,14 +718,15 @@ namespace MaterialEditor // we can create the asset dynamically from the source data. // Long term, the material document should not be concerned with assets at all. The viewport window should be the // only thing concerned with assets or instances. - auto createResult = m_materialSourceData.CreateMaterialAsset(Uuid::CreateRandom(), m_absolutePath, true); - if (!createResult) + auto materialAssetResult = + m_materialSourceData.CreateMaterialAssetFromSourceData(Uuid::CreateRandom(), m_absolutePath, elevateWarnings, true, &m_sourceDependencies); + if (!materialAssetResult) { AZ_Error("MaterialDocument", false, "Material asset could not be created from source data: '%s'.", m_absolutePath.c_str()); return false; } - m_materialAsset = createResult.GetValue(); + m_materialAsset = materialAssetResult.GetValue(); if (!m_materialAsset.IsReady()) { AZ_Error("MaterialDocument", false, "Material asset is not ready: '%s'.", m_absolutePath.c_str()); @@ -743,28 +740,34 @@ namespace MaterialEditor return false; } - // track material type asset to notify when dependencies change - m_dependentAssetIds.insert(materialTypeAsset->GetId()); - AZ::Data::AssetBus::MultiHandler::BusConnect(materialTypeAsset->GetId()); - AZStd::array_view parentPropertyValues = materialTypeAsset->GetDefaultPropertyValues(); AZ::Data::Asset parentMaterialAsset; if (!m_materialSourceData.m_parentMaterial.empty()) { - // There is a parent for this material - auto parentMaterialResult = AssetUtils::LoadAsset(m_absolutePath, m_materialSourceData.m_parentMaterial); - if (!parentMaterialResult) + AZ::RPI::MaterialSourceData parentMaterialSourceData; + if (!AZ::RPI::JsonUtils::LoadObjectFromFile(m_materialSourceData.m_parentMaterial, parentMaterialSourceData)) { - AZ_Error("MaterialDocument", false, "Parent material asset could not be loaded: '%s'.", m_materialSourceData.m_parentMaterial.c_str()); + AZ_Error("MaterialDocument", false, "Material parent source data could not be loaded for: '%s'.", m_materialSourceData.m_parentMaterial.c_str()); return false; } - parentMaterialAsset = parentMaterialResult.GetValue(); - parentPropertyValues = parentMaterialAsset->GetPropertyValues(); + const auto parentMaterialAssetIdResult = AssetUtils::MakeAssetId(m_materialSourceData.m_parentMaterial, 0); + if (!parentMaterialAssetIdResult) + { + AZ_Error("MaterialDocument", false, "Material parent asset ID could not be created: '%s'.", m_materialSourceData.m_parentMaterial.c_str()); + return false; + } + + auto parentMaterialAssetResult = parentMaterialSourceData.CreateMaterialAssetFromSourceData( + parentMaterialAssetIdResult.GetValue(), m_materialSourceData.m_parentMaterial, true, true); + if (!parentMaterialAssetResult) + { + AZ_Error("MaterialDocument", false, "Material parent asset could not be created from source data: '%s'.", m_materialSourceData.m_parentMaterial.c_str()); + return false; + } - // track parent material asset to notify when dependencies change - m_dependentAssetIds.insert(parentMaterialAsset->GetId()); - AZ::Data::AssetBus::MultiHandler::BusConnect(parentMaterialAsset->GetId()); + parentMaterialAsset = parentMaterialAssetResult.GetValue(); + parentPropertyValues = parentMaterialAsset->GetPropertyValues(); } // Creating a material from a material asset will fail if a texture is referenced but not loaded @@ -870,7 +873,8 @@ namespace MaterialEditor m_properties[propertyConfig.m_id] = AtomToolsFramework::DynamicProperty(propertyConfig); } - const MaterialFunctorSourceData::EditorContext editorContext = MaterialFunctorSourceData::EditorContext(materialTypeSourceFilePath, m_materialAsset->GetMaterialPropertiesLayout()); + const MaterialFunctorSourceData::EditorContext editorContext = + MaterialFunctorSourceData::EditorContext(m_materialSourceData.m_materialType, m_materialAsset->GetMaterialPropertiesLayout()); for (Ptr functorData : m_materialTypeSourceData.m_materialFunctorSourceData) { MaterialFunctorSourceData::FunctorResult result2 = functorData->CreateFunctor(editorContext); @@ -913,15 +917,13 @@ namespace MaterialEditor void MaterialDocument::Clear() { AZ::TickBus::Handler::BusDisconnect(); - AZ::Data::AssetBus::MultiHandler::BusDisconnect(); AzToolsFramework::AssetSystemBus::Handler::BusDisconnect(); m_materialAsset = {}; m_materialInstance = {}; m_absolutePath.clear(); m_relativePath.clear(); - m_sourceAssetId = {}; - m_dependentAssetIds.clear(); + m_sourceDependencies.clear(); m_saveTriggeredInternally = {}; m_compilePending = {}; m_properties.clear(); diff --git a/Gems/Atom/Tools/MaterialEditor/Code/Source/Document/MaterialDocument.h b/Gems/Atom/Tools/MaterialEditor/Code/Source/Document/MaterialDocument.h index 03997a2a91..ceb3190f26 100644 --- a/Gems/Atom/Tools/MaterialEditor/Code/Source/Document/MaterialDocument.h +++ b/Gems/Atom/Tools/MaterialEditor/Code/Source/Document/MaterialDocument.h @@ -29,7 +29,6 @@ namespace MaterialEditor : public AtomToolsFramework::AtomToolsDocument , public MaterialDocumentRequestBus::Handler , private AZ::TickBus::Handler - , private AZ::Data::AssetBus::MultiHandler , private AzToolsFramework::AssetSystemBus::Handler { public: @@ -105,12 +104,8 @@ namespace MaterialEditor void SourceFileChanged(AZStd::string relativePath, AZStd::string scanFolder, AZ::Uuid sourceUUID) override; ////////////////////////////////////////////////////////////////////////// - ////////////////////////////////////////////////////////////////////////// - // AZ::Data::AssetBus::Router overrides... - void OnAssetReloaded(AZ::Data::Asset asset) override; - ////////////////////////////////////////////////////////////////////////// - - bool SavePropertiesToSourceData(AZ::RPI::MaterialSourceData& sourceData, PropertyFilterFunction propertyFilter) const; + bool SavePropertiesToSourceData( + const AZStd::string& exportPath, AZ::RPI::MaterialSourceData& sourceData, PropertyFilterFunction propertyFilter) const; bool OpenInternal(AZStd::string_view loadPath); @@ -137,11 +132,8 @@ namespace MaterialEditor // Material instance being edited AZ::Data::Instance m_materialInstance; - // Asset used to open document - AZ::Data::AssetId m_sourceAssetId; - // Set of assets that can trigger a document reload - AZStd::unordered_set m_dependentAssetIds; + AZStd::unordered_set m_sourceDependencies; // Track if document saved itself last to skip external modification notification bool m_saveTriggeredInternally = false; diff --git a/Gems/Atom/Tools/MaterialEditor/Code/Source/Viewport/MaterialViewportComponent.cpp b/Gems/Atom/Tools/MaterialEditor/Code/Source/Viewport/MaterialViewportComponent.cpp index a8f41917f9..9cf714b40e 100644 --- a/Gems/Atom/Tools/MaterialEditor/Code/Source/Viewport/MaterialViewportComponent.cpp +++ b/Gems/Atom/Tools/MaterialEditor/Code/Source/Viewport/MaterialViewportComponent.cpp @@ -6,61 +6,25 @@ * */ -#include -#include -#include -#include -#include - -#include -#include -#include -#include -#include - -#include -#include -#include - -#include -#include - -#include - -#include -#include #include #include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include namespace MaterialEditor { - using LoadImageAsyncCallback = AZStd::function; - void LoadImageAsync(const AZStd::string& path, LoadImageAsyncCallback callback) - { - AZ::Job* job = AZ::CreateJobFunction([path, callback]() { - ImageProcessingAtom::IImageObjectPtr imageObject; - ImageProcessingAtom::ImageProcessingRequestBus::BroadcastResult(imageObject, &ImageProcessingAtom::ImageProcessingRequests::LoadImagePreview, path); - - if (imageObject) - { - AZ::u8* imageBuf = nullptr; - AZ::u32 pitch = 0; - AZ::u32 mip = 0; - imageObject->GetImagePointer(mip, imageBuf, pitch); - const AZ::u32 width = imageObject->GetWidth(mip); - const AZ::u32 height = imageObject->GetHeight(mip); - - QImage image(imageBuf, width, height, pitch, QImage::Format_RGBA8888); - - if (callback) - { - callback(image); - } - } - }, true); - job->Start(); - } - MaterialViewportComponent::MaterialViewportComponent() { } @@ -162,12 +126,6 @@ namespace MaterialEditor m_viewportSettings = AZ::UserSettings::CreateFind(AZ::Crc32("MaterialViewportSettings"), AZ::UserSettings::CT_GLOBAL); - m_lightingPresetPreviewImageDefault = QImage(180, 90, QImage::Format::Format_RGBA8888); - m_lightingPresetPreviewImageDefault.fill(Qt::GlobalColor::black); - - m_modelPresetPreviewImageDefault = QImage(90, 90, QImage::Format::Format_RGBA8888); - m_modelPresetPreviewImageDefault.fill(Qt::GlobalColor::black); - MaterialViewportRequestBus::Handler::BusConnect(); AzFramework::AssetCatalogEventBus::Handler::BusConnect(); } @@ -176,13 +134,19 @@ namespace MaterialEditor { AzFramework::AssetCatalogEventBus::Handler::BusDisconnect(); MaterialViewportRequestBus::Handler::BusDisconnect(); + ClearContent(); + } - m_lightingPresetPreviewImages.clear(); + void MaterialViewportComponent::ClearContent() + { + AZ::Data::AssetBus::MultiHandler::BusDisconnect(); + + m_lightingPresetAssets.clear(); m_lightingPresetVector.clear(); m_lightingPresetLastSavePathMap.clear(); m_lightingPresetSelection.reset(); - m_modelPresetPreviewImages.clear(); + m_modelPresetAssets.clear(); m_modelPresetVector.clear(); m_modelPresetLastSavePathMap.clear(); m_modelPresetSelection.reset(); @@ -194,84 +158,36 @@ namespace MaterialEditor MaterialViewportNotificationBus::Broadcast(&MaterialViewportNotificationBus::Events::OnBeginReloadContent); - const AZStd::string selectedLightingPresetNameOld = m_viewportSettings->m_selectedLightingPresetName; - - m_lightingPresetVector.clear(); - m_lightingPresetLastSavePathMap.clear(); - m_lightingPresetSelection.reset(); - - const AZStd::string selectedModelPresetNameOld = m_viewportSettings->m_selectedModelPresetName; - - m_modelPresetVector.clear(); - m_modelPresetLastSavePathMap.clear(); - m_modelPresetSelection.reset(); - - AZStd::vector lightingAssetInfoVector; - AZStd::vector modelAssetInfoVector; + ClearContent(); // Enumerate and load all the relevant preset files in the project. // (The files are stored in a temporary list instead of processed in the callback because deep operations inside // AssetCatalogRequestBus::EnumerateAssets can lead to deadlocked) - AZ::Data::AssetCatalogRequests::AssetEnumerationCB enumerateCB = [&lightingAssetInfoVector, &modelAssetInfoVector]([[maybe_unused]] const AZ::Data::AssetId id, const AZ::Data::AssetInfo& info) + AZ::Data::AssetCatalogRequests::AssetEnumerationCB enumerateCB = [this]([[maybe_unused]] const AZ::Data::AssetId id, const AZ::Data::AssetInfo& info) { - if (AzFramework::StringFunc::EndsWith(info.m_relativePath.c_str(), ".lightingpreset.azasset")) + if (AZ::StringFunc::EndsWith(info.m_relativePath.c_str(), ".lightingpreset.azasset")) { - lightingAssetInfoVector.push_back(info); + m_lightingPresetAssets[info.m_assetId] = { info.m_assetId, info.m_assetType }; + AZ::Data::AssetBus::MultiHandler::BusConnect(info.m_assetId); } - else if (AzFramework::StringFunc::EndsWith(info.m_relativePath.c_str(), ".modelpreset.azasset")) + else if (AZ::StringFunc::EndsWith(info.m_relativePath.c_str(), ".modelpreset.azasset")) { - modelAssetInfoVector.push_back(info); + m_modelPresetAssets[info.m_assetId] = { info.m_assetId, info.m_assetType }; + AZ::Data::AssetBus::MultiHandler::BusConnect(info.m_assetId); } }; AZ::Data::AssetCatalogRequestBus::Broadcast(&AZ::Data::AssetCatalogRequestBus::Events::EnumerateAssets, nullptr, enumerateCB, nullptr); - for (const auto& info : lightingAssetInfoVector) + for (auto& assetPair : m_lightingPresetAssets) { - if (info.m_assetId.IsValid()) - { - AZ::Data::Asset asset = AZ::RPI::AssetUtils::LoadAssetById( - info.m_assetId, AZ::RPI::AssetUtils::TraceLevel::Warning); - if (asset) - { - const AZ::Render::LightingPreset* preset = asset->GetDataAs(); - if (preset) - { - auto presetPtr = AddLightingPreset(*preset); - m_lightingPresetLastSavePathMap[presetPtr] = AZ::RPI::AssetUtils::GetSourcePathByAssetId(info.m_assetId); - AZ_TracePrintf("Material Editor", "Loaded viewport configuration: %s.\n", info.m_relativePath.c_str()); - } - } - } + assetPair.second.QueueLoad(); } - for (const auto& info : modelAssetInfoVector) + for (auto& assetPair : m_modelPresetAssets) { - if (info.m_assetId.IsValid()) - { - AZ::Data::Asset asset = - AZ::RPI::AssetUtils::LoadAssetById(info.m_assetId, AZ::RPI::AssetUtils::TraceLevel::Warning); - if (asset) - { - const AZ::Render::ModelPreset* preset = asset->GetDataAs(); - if (preset) - { - auto presetPtr = AddModelPreset(*preset); - m_modelPresetLastSavePathMap[presetPtr] = AZ::RPI::AssetUtils::GetSourcePathByAssetId(info.m_assetId); - AZ_TracePrintf("Material Editor", "Loaded viewport configuration: %s.\n", info.m_relativePath.c_str()); - } - } - } + assetPair.second.QueueLoad(); } - - // If there was a prior selection, this will keep the same configuration selected. - // Otherwise, these strings are empty and the operation will be ignored. - SelectLightingPresetByName(selectedLightingPresetNameOld); - SelectModelPresetByName(selectedModelPresetNameOld); - - MaterialViewportNotificationBus::Broadcast(&MaterialViewportNotificationBus::Events::OnEndReloadContent); - - AZ_TracePrintf("Material Editor", "Finished loading viewport configurations.\n"); } AZ::Render::LightingPresetPtr MaterialViewportComponent::AddLightingPreset(const AZ::Render::LightingPreset& preset) @@ -280,20 +196,6 @@ namespace MaterialEditor auto presetPtr = m_lightingPresetVector.back(); MaterialViewportNotificationBus::Broadcast(&MaterialViewportNotificationBus::Events::OnLightingPresetAdded, presetPtr); - - if (m_lightingPresetVector.size() == 1) - { - SelectLightingPreset(presetPtr); - } - - const auto& imagePath = AZ::RPI::AssetUtils::GetSourcePathByAssetId(presetPtr->m_skyboxImageAsset.GetId()); - LoadImageAsync(imagePath, [presetPtr](const QImage& image) { - QImage imageScaled = image.scaled(180, 90, Qt::AspectRatioMode::KeepAspectRatio); - AZ::TickBus::QueueFunction([presetPtr, imageScaled]() { - MaterialViewportRequestBus::Broadcast(&MaterialViewportRequestBus::Events::SetLightingPresetPreview, presetPtr, imageScaled); - }); - }); - return presetPtr; } @@ -353,17 +255,6 @@ namespace MaterialEditor return names; } - void MaterialViewportComponent::SetLightingPresetPreview(AZ::Render::LightingPresetPtr preset, const QImage& image) - { - m_lightingPresetPreviewImages[preset] = image; - } - - QImage MaterialViewportComponent::GetLightingPresetPreview(AZ::Render::LightingPresetPtr preset) const - { - auto imageItr = m_lightingPresetPreviewImages.find(preset); - return imageItr != m_lightingPresetPreviewImages.end() ? imageItr->second : m_lightingPresetPreviewImageDefault; - } - AZStd::string MaterialViewportComponent::GetLightingPresetLastSavePath(AZ::Render::LightingPresetPtr preset) const { auto pathItr = m_lightingPresetLastSavePathMap.find(preset); @@ -376,20 +267,6 @@ namespace MaterialEditor auto presetPtr = m_modelPresetVector.back(); MaterialViewportNotificationBus::Broadcast(&MaterialViewportNotificationBus::Events::OnModelPresetAdded, presetPtr); - - if (m_modelPresetVector.size() == 1) - { - SelectModelPreset(presetPtr); - } - - const auto& imagePath = AZ::RPI::AssetUtils::GetSourcePathByAssetId(presetPtr->m_previewImageAsset.GetId()); - LoadImageAsync(imagePath, [presetPtr](const QImage& image) { - QImage imageScaled = image.scaled(90, 90, Qt::AspectRatioMode::KeepAspectRatio); - AZ::TickBus::QueueFunction([presetPtr, imageScaled]() { - MaterialViewportRequestBus::Broadcast(&MaterialViewportRequestBus::Events::SetModelPresetPreview, presetPtr, imageScaled); - }); - }); - return presetPtr; } @@ -449,17 +326,6 @@ namespace MaterialEditor return names; } - void MaterialViewportComponent::SetModelPresetPreview(AZ::Render::ModelPresetPtr preset, const QImage& image) - { - m_modelPresetPreviewImages[preset] = image; - } - - QImage MaterialViewportComponent::GetModelPresetPreview(AZ::Render::ModelPresetPtr preset) const - { - auto imageItr = m_modelPresetPreviewImages.find(preset); - return imageItr != m_modelPresetPreviewImages.end() ? imageItr->second : m_modelPresetPreviewImageDefault; - } - AZStd::string MaterialViewportComponent::GetModelPresetLastSavePath(AZ::Render::ModelPresetPtr preset) const { auto pathItr = m_modelPresetLastSavePathMap.find(preset); @@ -524,10 +390,90 @@ namespace MaterialEditor return m_viewportSettings->m_displayMapperOperationType; } + inline void MaterialViewportComponent::OnAssetReady(AZ::Data::Asset asset) + { + if (AZ::Data::Asset anyAsset = asset) + { + if (const auto lightingPreset = anyAsset->GetDataAs()) + { + auto presetPtr = AddLightingPreset(*lightingPreset); + const auto& presetPath = AZ::RPI::AssetUtils::GetSourcePathByAssetId(anyAsset.GetId()); + m_lightingPresetAssets[anyAsset.GetId()] = anyAsset; + m_lightingPresetLastSavePathMap[presetPtr] = presetPath; + AZ_TracePrintf("Material Editor", "Loaded Preset: %s\n", presetPath.c_str()); + } + + if (const auto modelPreset = anyAsset->GetDataAs()) + { + auto presetPtr = AddModelPreset(*modelPreset); + const auto& presetPath = AZ::RPI::AssetUtils::GetSourcePathByAssetId(anyAsset.GetId()); + m_modelPresetAssets[anyAsset.GetId()] = anyAsset; + m_modelPresetLastSavePathMap[presetPtr] = presetPath; + AZ_TracePrintf("Material Editor", "Loaded Preset: %s\n", presetPath.c_str()); + } + } + + AZ::Data::AssetBus::MultiHandler::BusDisconnect(asset.GetId()); + if (!AZ::Data::AssetBus::MultiHandler::BusIsConnected()) + { + SelectLightingPresetByName(m_viewportSettings->m_selectedLightingPresetName); + SelectModelPresetByName(m_viewportSettings->m_selectedModelPresetName); + MaterialViewportNotificationBus::Broadcast(&MaterialViewportNotificationBus::Events::OnEndReloadContent); + AZ_TracePrintf("Material Editor", "Finished loading viewport configurations.\n"); + } + } + void MaterialViewportComponent::OnCatalogLoaded([[maybe_unused]] const char* catalogFile) { AZ::TickBus::QueueFunction([this]() { ReloadContent(); }); } + + void MaterialViewportComponent::OnCatalogAssetChanged(const AZ::Data::AssetId& assetId) + { + auto ReloadLightingAndModelPresets = [this, &assetId](AZ::Data::AssetCatalogRequests* assetCatalogRequests) + { + AZ::Data::AssetInfo assetInfo = assetCatalogRequests->GetAssetInfoById(assetId); + AZ::Data::Asset* modifiedPresetAsset{}; + if (AZ::StringFunc::EndsWith(assetInfo.m_relativePath.c_str(), ".lightingpreset.azasset")) + { + m_lightingPresetAssets[assetInfo.m_assetId] = { assetInfo.m_assetId, assetInfo.m_assetType }; + AZ::Data::AssetBus::MultiHandler::BusConnect(assetInfo.m_assetId); + modifiedPresetAsset = &m_lightingPresetAssets[assetInfo.m_assetId]; + } + else if (AzFramework::StringFunc::EndsWith(assetInfo.m_relativePath.c_str(), ".modelpreset.azasset")) + { + m_modelPresetAssets[assetInfo.m_assetId] = { assetInfo.m_assetId, assetInfo.m_assetType }; + AZ::Data::AssetBus::MultiHandler::BusConnect(assetInfo.m_assetId); + modifiedPresetAsset = &m_modelPresetAssets[assetInfo.m_assetId]; + } + + // Queue a load on the changed asset + if (modifiedPresetAsset != nullptr) + { + modifiedPresetAsset->QueueLoad(); + } + }; + AZ::Data::AssetCatalogRequestBus::Broadcast(AZStd::move(ReloadLightingAndModelPresets)); + } + + void MaterialViewportComponent::OnCatalogAssetAdded(const AZ::Data::AssetId& assetId) + { + OnCatalogAssetChanged(assetId); + } + + void MaterialViewportComponent::OnCatalogAssetRemoved(const AZ::Data::AssetId& assetId, const AZ::Data::AssetInfo& assetInfo) + { + if (AZ::StringFunc::EndsWith(assetInfo.m_relativePath.c_str(), ".lightingpreset.azasset")) + { + AZ::Data::AssetBus::MultiHandler::BusDisconnect(assetInfo.m_assetId); + m_lightingPresetAssets.erase(assetId); + } + if (AZ::StringFunc::EndsWith(assetInfo.m_relativePath.c_str(), ".modelpreset.azasset")) + { + AZ::Data::AssetBus::MultiHandler::BusDisconnect(assetInfo.m_assetId); + m_modelPresetAssets.erase(assetId); + } + } } diff --git a/Gems/Atom/Tools/MaterialEditor/Code/Source/Viewport/MaterialViewportComponent.h b/Gems/Atom/Tools/MaterialEditor/Code/Source/Viewport/MaterialViewportComponent.h index 12475bb113..68668bd804 100644 --- a/Gems/Atom/Tools/MaterialEditor/Code/Source/Viewport/MaterialViewportComponent.h +++ b/Gems/Atom/Tools/MaterialEditor/Code/Source/Viewport/MaterialViewportComponent.h @@ -11,8 +11,10 @@ #include #include #include +#include #include #include +#include #include #include @@ -22,6 +24,7 @@ namespace MaterialEditor class MaterialViewportComponent : public AZ::Component , private MaterialViewportRequestBus::Handler + , private AZ::Data::AssetBus::MultiHandler , private AzFramework::AssetCatalogEventBus::Handler { public: @@ -46,6 +49,8 @@ namespace MaterialEditor void Deactivate() override; //////////////////////////////////////////////////////////////////////// + void ClearContent(); + //////////////////////////////////////////////////////////////////////// // MaterialViewportRequestBus::Handler overrides ... void ReloadContent() override; @@ -58,8 +63,6 @@ namespace MaterialEditor void SelectLightingPreset(AZ::Render::LightingPresetPtr preset) override; void SelectLightingPresetByName(const AZStd::string& name) override; MaterialViewportPresetNameSet GetLightingPresetNames() const override; - void SetLightingPresetPreview(AZ::Render::LightingPresetPtr preset, const QImage& image) override; - QImage GetLightingPresetPreview(AZ::Render::LightingPresetPtr preset) const override; AZStd::string GetLightingPresetLastSavePath(AZ::Render::LightingPresetPtr preset) const override; AZ::Render::ModelPresetPtr AddModelPreset(const AZ::Render::ModelPreset& preset) override; @@ -70,8 +73,6 @@ namespace MaterialEditor void SelectModelPreset(AZ::Render::ModelPresetPtr preset) override; void SelectModelPresetByName(const AZStd::string& name) override; MaterialViewportPresetNameSet GetModelPresetNames() const override; - void SetModelPresetPreview(AZ::Render::ModelPresetPtr preset, const QImage& image) override; - QImage GetModelPresetPreview(AZ::Render::ModelPresetPtr preset) const override; AZStd::string GetModelPresetLastSavePath(AZ::Render::ModelPresetPtr preset) const override; void SetShadowCatcherEnabled(bool enable) override; @@ -87,22 +88,26 @@ namespace MaterialEditor //////////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////////// - // AzFramework::AssetCatalogEventBus::Handler overrides ... - void OnCatalogLoaded(const char* catalogFile) override; + // AZ::Data::AssetBus::MultiHandler overrides ... + void OnAssetReady(AZ::Data::Asset asset) override; //////////////////////////////////////////////////////////////////////// + //////////////////////////////////////////////////////////////////////// + // AzFramework::AssetCatalogEventBus::Handler overrides ... + void OnCatalogLoaded(const char* catalogFile) override; + void OnCatalogAssetChanged(const AZ::Data::AssetId& assetId) override; + void OnCatalogAssetAdded(const AZ::Data::AssetId& assetId) override; + void OnCatalogAssetRemoved(const AZ::Data::AssetId& assetId, const AZ::Data::AssetInfo& assetInfo) override; + //////////////////////////////////////////////////////////////////////// + + AZStd::unordered_map> m_lightingPresetAssets; AZ::Render::LightingPresetPtrVector m_lightingPresetVector; AZ::Render::LightingPresetPtr m_lightingPresetSelection; + AZStd::unordered_map> m_modelPresetAssets; AZ::Render::ModelPresetPtrVector m_modelPresetVector; AZ::Render::ModelPresetPtr m_modelPresetSelection; - AZStd::map m_lightingPresetPreviewImages; - AZStd::map m_modelPresetPreviewImages; - - QImage m_lightingPresetPreviewImageDefault; - QImage m_modelPresetPreviewImageDefault; - mutable AZStd::map m_lightingPresetLastSavePathMap; mutable AZStd::map m_modelPresetLastSavePathMap; diff --git a/Gems/Atom/Tools/MaterialEditor/Code/Source/Viewport/MaterialViewportRenderer.cpp b/Gems/Atom/Tools/MaterialEditor/Code/Source/Viewport/MaterialViewportRenderer.cpp index 4ad87492e3..409674f0bc 100644 --- a/Gems/Atom/Tools/MaterialEditor/Code/Source/Viewport/MaterialViewportRenderer.cpp +++ b/Gems/Atom/Tools/MaterialEditor/Code/Source/Viewport/MaterialViewportRenderer.cpp @@ -306,7 +306,6 @@ namespace MaterialEditor { if (!preset) { - AZ_Warning("MaterialViewportRenderer", false, "Attempting to set invalid lighting preset."); return; } @@ -347,7 +346,6 @@ namespace MaterialEditor { if (!preset) { - AZ_Warning("MaterialViewportRenderer", false, "Attempting to set invalid model preset."); return; } diff --git a/Gems/Atom/Tools/MaterialEditor/Code/Source/Window/CreateMaterialDialog/CreateMaterialDialog.cpp b/Gems/Atom/Tools/MaterialEditor/Code/Source/Window/CreateMaterialDialog/CreateMaterialDialog.cpp index fd20716570..31ca873c48 100644 --- a/Gems/Atom/Tools/MaterialEditor/Code/Source/Window/CreateMaterialDialog/CreateMaterialDialog.cpp +++ b/Gems/Atom/Tools/MaterialEditor/Code/Source/Window/CreateMaterialDialog/CreateMaterialDialog.cpp @@ -6,25 +6,21 @@ * */ -#include - -#include -#include - -#include - -#include - +#include #include #include #include - -#include +#include +#include +#include +#include +#include +#include namespace MaterialEditor { CreateMaterialDialog::CreateMaterialDialog(QWidget* parent) - : CreateMaterialDialog(QString(AZ::IO::FileIOBase::GetInstance()->GetAlias("@projectroot@")) + AZ_CORRECT_FILESYSTEM_SEPARATOR + "Materials", parent) + : CreateMaterialDialog(QString(AZ::Utils::GetProjectPath().c_str()) + AZ_CORRECT_FILESYSTEM_SEPARATOR + "Assets", parent) { } diff --git a/Gems/Atom/Tools/MaterialEditor/Code/Source/Window/MaterialEditorBrowserInteractions.cpp b/Gems/Atom/Tools/MaterialEditor/Code/Source/Window/MaterialEditorBrowserInteractions.cpp index d73737a2dc..435d1f6f12 100644 --- a/Gems/Atom/Tools/MaterialEditor/Code/Source/Window/MaterialEditorBrowserInteractions.cpp +++ b/Gems/Atom/Tools/MaterialEditor/Code/Source/Window/MaterialEditorBrowserInteractions.cpp @@ -12,6 +12,7 @@ #include #include #include +#include #include #include #include @@ -106,8 +107,8 @@ namespace MaterialEditor menu->addAction("Create Material...", [entry]() { const QString defaultPath = AtomToolsFramework::GetUniqueFileInfo( - QString(AZ::IO::FileIOBase::GetInstance()->GetAlias("@projectroot@")) + - AZ_CORRECT_FILESYSTEM_SEPARATOR + "Materials" + + QString(AZ::Utils::GetProjectPath().c_str()) + + AZ_CORRECT_FILESYSTEM_SEPARATOR + "Assets" + AZ_CORRECT_FILESYSTEM_SEPARATOR + "untitled." + AZ::RPI::MaterialSourceData::Extension).absoluteFilePath(); @@ -182,8 +183,8 @@ namespace MaterialEditor menu->addAction("Create Child Material...", [entry]() { const QString defaultPath = AtomToolsFramework::GetUniqueFileInfo( - QString(AZ::IO::FileIOBase::GetInstance()->GetAlias("@projectroot@")) + - AZ_CORRECT_FILESYSTEM_SEPARATOR + "Materials" + + QString(AZ::Utils::GetProjectPath().c_str()) + + AZ_CORRECT_FILESYSTEM_SEPARATOR + "Assets" + AZ_CORRECT_FILESYSTEM_SEPARATOR + "untitled." + AZ::RPI::MaterialSourceData::Extension).absoluteFilePath(); diff --git a/Gems/Atom/Tools/MaterialEditor/Code/Source/Window/PresetBrowserDialogs/LightingPresetBrowserDialog.cpp b/Gems/Atom/Tools/MaterialEditor/Code/Source/Window/PresetBrowserDialogs/LightingPresetBrowserDialog.cpp index 72bf7fe003..f8ad038a85 100644 --- a/Gems/Atom/Tools/MaterialEditor/Code/Source/Window/PresetBrowserDialogs/LightingPresetBrowserDialog.cpp +++ b/Gems/Atom/Tools/MaterialEditor/Code/Source/Window/PresetBrowserDialogs/LightingPresetBrowserDialog.cpp @@ -7,6 +7,7 @@ */ #include +#include #include #include #include @@ -27,13 +28,16 @@ namespace MaterialEditor MaterialViewportRequestBus::BroadcastResult(presets, &MaterialViewportRequestBus::Events::GetLightingPresets); AZStd::sort(presets.begin(), presets.end(), [](const auto& a, const auto& b) { return a->m_displayName < b->m_displayName; }); + const int itemSize = aznumeric_cast( + AtomToolsFramework::GetSettingOrDefault("/O3DE/Atom/MaterialEditor/PresetBrowserDialog/LightingItemSize", 180)); + QListWidgetItem* selectedItem = nullptr; for (const auto& preset : presets) { - QImage image; - MaterialViewportRequestBus::BroadcastResult(image, &MaterialViewportRequestBus::Events::GetLightingPresetPreview, preset); - - QListWidgetItem* item = CreateListItem(preset->m_displayName.c_str(), image); + AZStd::string path; + MaterialViewportRequestBus::BroadcastResult(path, &MaterialViewportRequestBus::Events::GetLightingPresetLastSavePath, preset); + QListWidgetItem* item = CreateListItem( + preset->m_displayName.c_str(), AZ::RPI::AssetUtils::MakeAssetId(path, 0).GetValue(), QSize(itemSize, itemSize)); m_listItemToPresetMap[item] = preset; diff --git a/Gems/Atom/Tools/MaterialEditor/Code/Source/Window/PresetBrowserDialogs/ModelPresetBrowserDialog.cpp b/Gems/Atom/Tools/MaterialEditor/Code/Source/Window/PresetBrowserDialogs/ModelPresetBrowserDialog.cpp index c1936cde35..f5a1677462 100644 --- a/Gems/Atom/Tools/MaterialEditor/Code/Source/Window/PresetBrowserDialogs/ModelPresetBrowserDialog.cpp +++ b/Gems/Atom/Tools/MaterialEditor/Code/Source/Window/PresetBrowserDialogs/ModelPresetBrowserDialog.cpp @@ -27,13 +27,13 @@ namespace MaterialEditor MaterialViewportRequestBus::BroadcastResult(presets, &MaterialViewportRequestBus::Events::GetModelPresets); AZStd::sort(presets.begin(), presets.end(), [](const auto& a, const auto& b) { return a->m_displayName < b->m_displayName; }); + const int itemSize = aznumeric_cast( + AtomToolsFramework::GetSettingOrDefault("/O3DE/Atom/MaterialEditor/PresetBrowserDialog/ModelItemSize", 90)); + QListWidgetItem* selectedItem = nullptr; for (const auto& preset : presets) { - QImage image; - MaterialViewportRequestBus::BroadcastResult(image, &MaterialViewportRequestBus::Events::GetModelPresetPreview, preset); - - QListWidgetItem* item = CreateListItem(preset->m_displayName.c_str(), image); + QListWidgetItem* item = CreateListItem(preset->m_displayName.c_str(), preset->m_modelAsset.GetId(), QSize(itemSize, itemSize)); m_listItemToPresetMap[item] = preset; diff --git a/Gems/Atom/Tools/MaterialEditor/Code/Source/Window/PresetBrowserDialogs/PresetBrowserDialog.cpp b/Gems/Atom/Tools/MaterialEditor/Code/Source/Window/PresetBrowserDialogs/PresetBrowserDialog.cpp index d3aa6350f0..f2bb84dff6 100644 --- a/Gems/Atom/Tools/MaterialEditor/Code/Source/Window/PresetBrowserDialogs/PresetBrowserDialog.cpp +++ b/Gems/Atom/Tools/MaterialEditor/Code/Source/Window/PresetBrowserDialogs/PresetBrowserDialog.cpp @@ -12,11 +12,16 @@ #include #include #include +#include +#include +#include +#include #include #include #include #include +#include namespace MaterialEditor { @@ -41,35 +46,51 @@ namespace MaterialEditor m_ui->m_presetList->setGridSize(QSize(0, 0)); m_ui->m_presetList->setWrapping(true); - QObject::connect(m_ui->m_presetList, &QListWidget::currentItemChanged, [this]() { SelectCurrentPreset(); }); + QObject::connect(m_ui->m_presetList, &QListWidget::currentItemChanged, [this](){ SelectCurrentPreset(); }); } - QListWidgetItem* PresetBrowserDialog::CreateListItem(const QString& title, const QImage& image) + QListWidgetItem* PresetBrowserDialog::CreateListItem(const QString& title, const AZ::Data::AssetId& assetId, const QSize& size) { + const int itemBorder = aznumeric_cast( + AtomToolsFramework::GetSettingOrDefault("/O3DE/Atom/MaterialEditor/PresetBrowserDialog/ItemBorder", 4)); + const int itemSpacing = aznumeric_cast( + AtomToolsFramework::GetSettingOrDefault("/O3DE/Atom/MaterialEditor/PresetBrowserDialog/ItemSpacing", 10)); + const int headerHeight = aznumeric_cast( + AtomToolsFramework::GetSettingOrDefault("/O3DE/Atom/MaterialEditor/PresetBrowserDialog/HeaderHeight", 15)); + const QSize gridSize = m_ui->m_presetList->gridSize(); - m_ui->m_presetList->setGridSize( - QSize(AZStd::max(gridSize.width(), image.width() + 10), AZStd::max(gridSize.height(), image.height() + 10))); + m_ui->m_presetList->setGridSize(QSize( + AZStd::max(gridSize.width(), size.width() + itemSpacing), + AZStd::max(gridSize.height(), size.height() + itemSpacing + headerHeight))); QListWidgetItem* item = new QListWidgetItem(m_ui->m_presetList); item->setData(Qt::UserRole, title); - item->setSizeHint(image.size() + QSize(4, 4)); + item->setSizeHint(size + QSize(itemBorder, itemBorder + headerHeight)); m_ui->m_presetList->addItem(item); - QLabel* previewImage = new QLabel(m_ui->m_presetList); - previewImage->setFixedSize(image.size()); - previewImage->setMargin(0); - previewImage->setPixmap(QPixmap::fromImage(image)); - previewImage->updateGeometry(); + QWidget* itemWidget = new QWidget(m_ui->m_presetList); + itemWidget->setLayout(new QVBoxLayout(itemWidget)); + itemWidget->layout()->setSpacing(0); + itemWidget->layout()->setMargin(0); - AzQtComponents::ElidingLabel* previewLabel = new AzQtComponents::ElidingLabel(previewImage); - previewLabel->setText(title); - previewLabel->setFixedSize(QSize(image.width(), 15)); - previewLabel->setMargin(0); - previewLabel->setStyleSheet("background-color: rgb(35, 35, 35)"); - AzQtComponents::Text::addPrimaryStyle(previewLabel); - AzQtComponents::Text::addLabelStyle(previewLabel); + AzQtComponents::ElidingLabel* header = new AzQtComponents::ElidingLabel(itemWidget); + header->setText(title); + header->setFixedSize(QSize(size.width(), headerHeight)); + header->setMargin(0); + header->setStyleSheet("background-color: rgb(35, 35, 35)"); + AzQtComponents::Text::addPrimaryStyle(header); + AzQtComponents::Text::addLabelStyle(header); + itemWidget->layout()->addWidget(header); - m_ui->m_presetList->setItemWidget(item, previewImage); + AzToolsFramework::Thumbnailer::ThumbnailWidget* thumbnail = new AzToolsFramework::Thumbnailer::ThumbnailWidget(itemWidget); + thumbnail->setFixedSize(size); + thumbnail->SetThumbnailKey( + MAKE_TKEY(AzToolsFramework::AssetBrowser::ProductThumbnailKey, assetId), + AzToolsFramework::Thumbnailer::ThumbnailContext::DefaultContext); + thumbnail->updateGeometry(); + itemWidget->layout()->addWidget(thumbnail); + + m_ui->m_presetList->setItemWidget(item, itemWidget); return item; } @@ -79,15 +100,15 @@ namespace MaterialEditor m_ui->m_searchWidget->setReadOnly(false); m_ui->m_searchWidget->setContextMenuPolicy(Qt::CustomContextMenu); AzQtComponents::LineEdit::applySearchStyle(m_ui->m_searchWidget); - connect(m_ui->m_searchWidget, &QLineEdit::textChanged, this, [this]() { ApplySearchFilter(); }); - connect(m_ui->m_searchWidget, &QWidget::customContextMenuRequested, this, [this](const QPoint& pos) { ShowSearchMenu(pos); }); + connect(m_ui->m_searchWidget, &QLineEdit::textChanged, this, [this](){ ApplySearchFilter(); }); + connect(m_ui->m_searchWidget, &QWidget::customContextMenuRequested, this, [this](const QPoint& pos){ ShowSearchMenu(pos); }); } void PresetBrowserDialog::SetupDialogButtons() { connect(m_ui->m_buttonBox, &QDialogButtonBox::accepted, this, &QDialog::accept); connect(m_ui->m_buttonBox, &QDialogButtonBox::rejected, this, &QDialog::reject); - connect(this, &QDialog::rejected, this, [this]() { SelectInitialPreset(); }); + connect(this, &QDialog::rejected, this, [this](){ SelectInitialPreset(); }); } void PresetBrowserDialog::ApplySearchFilter() diff --git a/Gems/Atom/Tools/MaterialEditor/Code/Source/Window/PresetBrowserDialogs/PresetBrowserDialog.h b/Gems/Atom/Tools/MaterialEditor/Code/Source/Window/PresetBrowserDialogs/PresetBrowserDialog.h index ee01737352..20e049f6f8 100644 --- a/Gems/Atom/Tools/MaterialEditor/Code/Source/Window/PresetBrowserDialogs/PresetBrowserDialog.h +++ b/Gems/Atom/Tools/MaterialEditor/Code/Source/Window/PresetBrowserDialogs/PresetBrowserDialog.h @@ -9,12 +9,12 @@ #pragma once #if !defined(Q_MOC_RUN) +#include #include - #include #endif -#include +#include class QImage; class QListWidgetItem; @@ -32,7 +32,7 @@ namespace MaterialEditor protected: void SetupPresetList(); - QListWidgetItem* CreateListItem(const QString& title, const QImage& image); + QListWidgetItem* CreateListItem(const QString& title, const AZ::Data::AssetId& assetId, const QSize& size); void SetupSearchWidget(); void SetupDialogButtons(); diff --git a/Gems/Atom/Tools/MaterialEditor/Code/Source/Window/ViewportSettingsInspector/ViewportSettingsInspector.cpp b/Gems/Atom/Tools/MaterialEditor/Code/Source/Window/ViewportSettingsInspector/ViewportSettingsInspector.cpp index 5721dfcc72..613762c10a 100644 --- a/Gems/Atom/Tools/MaterialEditor/Code/Source/Window/ViewportSettingsInspector/ViewportSettingsInspector.cpp +++ b/Gems/Atom/Tools/MaterialEditor/Code/Source/Window/ViewportSettingsInspector/ViewportSettingsInspector.cpp @@ -6,10 +6,11 @@ * */ +#include #include #include #include -#include +#include #include #include #include @@ -346,13 +347,10 @@ namespace MaterialEditor AZStd::string ViewportSettingsInspector::GetDefaultUniqueSaveFilePath(const AZStd::string& baseName) const { - AZStd::string savePath = AZ::IO::FileIOBase::GetInstance()->GetAlias("@projectroot@"); - savePath += AZ_CORRECT_FILESYSTEM_SEPARATOR; - savePath += "Materials"; - savePath += AZ_CORRECT_FILESYSTEM_SEPARATOR; - savePath += baseName; - savePath = AtomToolsFramework::GetUniqueFileInfo(savePath.c_str()).absoluteFilePath().toUtf8().constData(); - return savePath; + return AtomToolsFramework::GetUniqueFileInfo( + QString(AZ::Utils::GetProjectPath().c_str()) + + AZ_CORRECT_FILESYSTEM_SEPARATOR + "Assets" + + AZ_CORRECT_FILESYSTEM_SEPARATOR + baseName.c_str()).absoluteFilePath().toUtf8().constData(); } AZ::Crc32 ViewportSettingsInspector::GetGroupSaveStateKey(const AZStd::string& groupName) const diff --git a/Gems/Atom/Tools/MaterialEditor/gem.json b/Gems/Atom/Tools/MaterialEditor/gem.json index 85ff434eab..807e3fa65f 100644 --- a/Gems/Atom/Tools/MaterialEditor/gem.json +++ b/Gems/Atom/Tools/MaterialEditor/gem.json @@ -2,6 +2,7 @@ "gem_name": "MaterialEditor", "display_name": "Atom Material Editor", "license": "Apache-2.0 Or MIT", + "license_url": "https://github.com/o3de/o3de/blob/development/LICENSE.txt", "origin": "Open 3D Engine - o3de.org", "type": "Tool", "summary": "Editor for creating, modifying, and previewing materials", diff --git a/Gems/Atom/Utils/Code/CMakeLists.txt b/Gems/Atom/Utils/Code/CMakeLists.txt index 89bc8dd0a5..90d7ce501b 100644 --- a/Gems/Atom/Utils/Code/CMakeLists.txt +++ b/Gems/Atom/Utils/Code/CMakeLists.txt @@ -27,6 +27,27 @@ ly_add_target( 3rdParty::libpng ) +if(PAL_TRAIT_BUILD_HOST_TOOLS) + + ly_add_target( + NAME Atom_Utils.TestUtils.Static STATIC + NAMESPACE Gem + FILES_CMAKE + atom_utils_editor_files.cmake + INCLUDE_DIRECTORIES + PRIVATE + Source + PUBLIC + Include + BUILD_DEPENDENCIES + PRIVATE + AZ::AtomCore + AZ::AzCore + AZ::AzFramework + AZ::AzToolsFramework + ) +endif() + ################################################################################ # Tests ################################################################################ diff --git a/Gems/Atom/Utils/Code/Include/Atom/Utils/ImGuiPassTree.inl b/Gems/Atom/Utils/Code/Include/Atom/Utils/ImGuiPassTree.inl index 55e457926a..5a8aaf7ded 100644 --- a/Gems/Atom/Utils/Code/Include/Atom/Utils/ImGuiPassTree.inl +++ b/Gems/Atom/Utils/Code/Include/Atom/Utils/ImGuiPassTree.inl @@ -19,11 +19,11 @@ #include -#include #include #include #include +#include #ifndef SCRIPTABLE_IMGUI #define Scriptable_ImGui ImGui @@ -334,11 +334,10 @@ namespace AZ::Render if (m_engineRoot.empty()) { - const char* engineRoot = nullptr; - AzFramework::ApplicationRequests::Bus::BroadcastResult(engineRoot, &AzFramework::ApplicationRequests::GetEngineRoot); - if (engineRoot) + AZ::IO::FixedMaxPathString engineRoot = AZ::Utils::GetEnginePath(); + if (!engineRoot.empty()) { - m_engineRoot = AZStd::string(engineRoot); + m_engineRoot = AZStd::string_view(engineRoot); } } diff --git a/Gems/Atom/Utils/Code/Include/Atom/Utils/PngFile.h b/Gems/Atom/Utils/Code/Include/Atom/Utils/PngFile.h index 1de27e9b96..b862786c2f 100644 --- a/Gems/Atom/Utils/Code/Include/Atom/Utils/PngFile.h +++ b/Gems/Atom/Utils/Code/Include/Atom/Utils/PngFile.h @@ -7,6 +7,7 @@ */ #pragma once +#include #include #include #include @@ -53,6 +54,9 @@ namespace AZ //! @return the loaded PngFile or an invalid PngFile if there was an error. static PngFile Load(const char* path, LoadSettings loadSettings = {}); + //! @return the loaded PngFile or an invalid PngFile if there was an error. + static PngFile LoadFromBuffer(AZStd::array_view data, LoadSettings loadSettings = {}); + //! Create a PngFile from an RHI data buffer. //! @param size the dimensions of the image (m_depth is not used, assumed to be 1) //! @param format indicates the pixel format represented by @data. Only a limited set of formats are supported, see implementation. @@ -83,10 +87,12 @@ namespace AZ private: AZ_DEFAULT_COPY(PngFile) - static const int HeaderSize = 8; + static const int HeaderSize = 8; static void DefaultErrorHandler(const char* message); + static PngFile LoadInternal(AZ::IO::GenericStream& dataStream, LoadSettings loadSettings); + uint32_t m_width = 0; uint32_t m_height = 0; int32_t m_bitDepth = 0; diff --git a/Gems/Atom/RPI/Code/Tests/Common/AssetSystemStub.h b/Gems/Atom/Utils/Code/Include/Atom/Utils/TestUtils/AssetSystemStub.h similarity index 100% rename from Gems/Atom/RPI/Code/Tests/Common/AssetSystemStub.h rename to Gems/Atom/Utils/Code/Include/Atom/Utils/TestUtils/AssetSystemStub.h diff --git a/Gems/Atom/Utils/Code/Source/AssetCollectionAsyncLoader.cpp b/Gems/Atom/Utils/Code/Source/AssetCollectionAsyncLoader.cpp index 859b4b4dd3..7a25dfb9ff 100644 --- a/Gems/Atom/Utils/Code/Source/AssetCollectionAsyncLoader.cpp +++ b/Gems/Atom/Utils/Code/Source/AssetCollectionAsyncLoader.cpp @@ -123,6 +123,8 @@ namespace AZ // Prepare to create a cancellable job. AZ::JobManagerDesc desc; + desc.m_jobManagerName = "AssetCollectionAsyncLoader"; + AZ::JobManagerThreadDesc threadDesc; desc.m_workerThreads.push_back(threadDesc); m_jobManager = AZStd::make_unique(desc); diff --git a/Gems/Atom/Utils/Code/Source/PngFile.cpp b/Gems/Atom/Utils/Code/Source/PngFile.cpp index 28f5374d88..1454dc68c9 100644 --- a/Gems/Atom/Utils/Code/Source/PngFile.cpp +++ b/Gems/Atom/Utils/Code/Source/PngFile.cpp @@ -8,6 +8,7 @@ #include #include +#include namespace AZ { @@ -68,24 +69,66 @@ namespace AZ { if (!loadSettings.m_errorHandler) { - loadSettings.m_errorHandler = [path](const char* message) { DefaultErrorHandler(AZStd::string::format("Could not load file '%s'. %s", path, message).c_str()); }; + loadSettings.m_errorHandler = [path](const char* message) + { + DefaultErrorHandler(AZStd::string::format("Could not load file '%s'. %s", path, message).c_str()); + }; } - // For documentation of this code, see http://www.libpng.org/pub/png/libpng-1.4.0-manual.pdf chapter 3 - - FILE* fp = NULL; - azfopen(&fp, path, "rb"); // return type differs across platforms so can't do inside if - if (!fp) + AZ::IO::SystemFile file; + file.Open(path, AZ::IO::SystemFile::SF_OPEN_READ_ONLY); + if (!file.IsOpen()) { loadSettings.m_errorHandler("Cannot open file."); return {}; } + constexpr bool StreamOwnsFilePointer = true; + AZ::IO::SystemFileStream fileLoadStream(&file, StreamOwnsFilePointer); + + auto pngFile = LoadInternal(fileLoadStream, loadSettings); + return pngFile; + } + + PngFile PngFile::LoadFromBuffer(AZStd::array_view data, LoadSettings loadSettings) + { + if (!loadSettings.m_errorHandler) + { + loadSettings.m_errorHandler = [](const char* message) + { + DefaultErrorHandler(AZStd::string::format("Could not load Png from buffer. %s", message).c_str()); + }; + } + + if (data.empty()) + { + loadSettings.m_errorHandler("Buffer is empty."); + return {}; + } + + AZ::IO::MemoryStream memStream(data.data(), data.size()); + + return LoadInternal(memStream, loadSettings); + } + + PngFile PngFile::LoadInternal(AZ::IO::GenericStream& dataStream, LoadSettings loadSettings) + { + // For documentation of this code, see http://www.libpng.org/pub/png/libpng-1.4.0-manual.pdf chapter 3 + + // Verify that we've passed in a valid data stream. + if (!dataStream.IsOpen() || !dataStream.CanRead()) + { + loadSettings.m_errorHandler("Data stream isn't valid."); + return {}; + } png_byte header[HeaderSize] = {}; + size_t headerBytesRead = 0; - if (fread(header, 1, HeaderSize, fp) != HeaderSize) + // This is the one I/O read that occurs outside of the png library, so either read from the file or the buffer and + // verify the results. + headerBytesRead = dataStream.Read(HeaderSize, header); + if (headerBytesRead != HeaderSize) { - fclose(fp); loadSettings.m_errorHandler("Invalid png header."); return {}; } @@ -93,7 +136,6 @@ namespace AZ bool isPng = !png_sig_cmp(header, 0, HeaderSize); if (!isPng) { - fclose(fp); loadSettings.m_errorHandler("Invalid png header."); return {}; } @@ -105,7 +147,6 @@ namespace AZ png_structp png_ptr = png_create_read_struct(PNG_LIBPNG_VER_STRING, user_error_ptr, user_error_fn, user_warning_fn); if (!png_ptr) { - fclose(fp); loadSettings.m_errorHandler("png_create_read_struct failed."); return {}; } @@ -114,7 +155,6 @@ namespace AZ if (!info_ptr) { png_destroy_read_struct(&png_ptr, (png_infopp)NULL, (png_infopp)NULL); - fclose(fp); loadSettings.m_errorHandler("png_create_info_struct failed."); return {}; } @@ -123,22 +163,35 @@ namespace AZ if (!end_info) { png_destroy_read_struct(&png_ptr, &info_ptr, (png_infopp)NULL); - fclose(fp); loadSettings.m_errorHandler("png_create_info_struct failed."); return {}; } -AZ_PUSH_DISABLE_WARNING(4611, "-Wunknown-warning-option") // Disables "interaction between '_setjmp' and C++ object destruction is non-portable". See https://docs.microsoft.com/en-us/cpp/preprocessor/warning?view=msvc-160 +// Disables "interaction between '_setjmp' and C++ object destruction is non-portable". +// See https://docs.microsoft.com/en-us/cpp/preprocessor/warning?view=msvc-160 +AZ_PUSH_DISABLE_WARNING(4611, "-Wunknown-warning-option") if (setjmp(png_jmpbuf(png_ptr))) { png_destroy_read_struct(&png_ptr, &info_ptr, &end_info); - fclose(fp); // We don't report an error message here because the user_error_fn should have done that already. return {}; } AZ_POP_DISABLE_WARNING - png_init_io(png_ptr, fp); + auto genericStreamReader = [](png_structp pngPtr, png_bytep data, png_size_t length) + { + // Here we get our IO pointer back from the read struct. + // This should be the GenericStream pointer we passed to the png_set_read_fn() function. + png_voidp ioPtr = png_get_io_ptr(pngPtr); + + if (ioPtr != nullptr) + { + AZ::IO::GenericStream* genericStream = static_cast(ioPtr); + genericStream->Read(length, data); + } + }; + + png_set_read_fn(png_ptr, &dataStream, genericStreamReader); png_set_sig_bytes(png_ptr, HeaderSize); @@ -187,7 +240,6 @@ AZ_POP_DISABLE_WARNING default: AZ_Assert(false, "The png transforms should have ensured a pixel format of RGB or RGBA, 8 bits per channel"); png_destroy_read_struct(&png_ptr, &info_ptr, (png_infopp)NULL); - fclose(fp); loadSettings.m_errorHandler("Unsupported pixel format."); return {}; } @@ -201,7 +253,6 @@ AZ_POP_DISABLE_WARNING } png_destroy_read_struct(&png_ptr, &info_ptr, &end_info); - fclose(fp); return pngFile; } @@ -322,3 +373,4 @@ AZ_POP_DISABLE_WARNING } // namespace Utils }// namespace AZ + diff --git a/Gems/Atom/RPI/Code/Tests/Common/AssetSystemStub.cpp b/Gems/Atom/Utils/Code/Source/TestUtils/AssetSystemStub.cpp similarity index 98% rename from Gems/Atom/RPI/Code/Tests/Common/AssetSystemStub.cpp rename to Gems/Atom/Utils/Code/Source/TestUtils/AssetSystemStub.cpp index 31a46e9a6f..d57969ea9c 100644 --- a/Gems/Atom/RPI/Code/Tests/Common/AssetSystemStub.cpp +++ b/Gems/Atom/Utils/Code/Source/TestUtils/AssetSystemStub.cpp @@ -6,7 +6,7 @@ * */ -#include +#include #include namespace UnitTest diff --git a/Gems/Atom/Utils/Code/Tests/PngFileTests.cpp b/Gems/Atom/Utils/Code/Tests/PngFileTests.cpp index 1c5b844204..436b9ae752 100644 --- a/Gems/Atom/Utils/Code/Tests/PngFileTests.cpp +++ b/Gems/Atom/Utils/Code/Tests/PngFileTests.cpp @@ -31,7 +31,8 @@ namespace UnitTest { AllocatorsFixture::SetUp(); - m_testImageFolder = AZ::IO::Path(AZ::Test::GetEngineRootPath()) / AZ::IO::Path("Gems/Atom/Utils/Code/Tests/PngTestImages", '/'); + m_testImageFolder = + AZ::IO::Path(AZ::Test::GetEngineRootPath(), '/') / AZ::IO::Path("Gems/Atom/Utils/Code/Tests/PngTestImages"); m_tempPngFilePath = m_testImageFolder / "temp.png"; @@ -310,4 +311,66 @@ namespace UnitTest EXPECT_TRUE(gotErrorMessage.find("PngFile is invalid") != AZStd::string::npos); EXPECT_FALSE(AZ::IO::FileIOBase::GetInstance()->Exists(m_tempPngFilePath.c_str())); } -} + + TEST_F(PngFileTests, LoadRgbFromMemoryBuffer) + { + // This is an in-memory copy of the ColorChart_rgb.png test file. + AZStd::fixed_vector pngBuffer = + { + 0x89, 0x50, 0x4e, 0x47, 0x0d, 0x0a, 0x1a, 0x0a, + 0x00, 0x00, 0x00, 0x0d, 0x49, 0x48, 0x44, 0x52, + + 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x02, + 0x08, 0x02, 0x00, 0x00, 0x00, 0x12, 0x16, 0xf1, + + 0x4d, 0x00, 0x00, 0x00, 0x01, 0x73, 0x52, 0x47, + 0x42, 0x00, 0xae, 0xce, 0x1c, 0xe9, 0x00, 0x00, + + 0x00, 0x04, 0x67, 0x41, 0x4d, 0x41, 0x00, 0x00, + 0xb1, 0x8f, 0x0b, 0xfc, 0x61, 0x05, 0x00, 0x00, + + 0x00, 0x09, 0x70, 0x48, 0x59, 0x73, 0x00, 0x00, + 0x0e, 0xc3, 0x00, 0x00, 0x0e, 0xc3, 0x01, 0xc7, + + 0x6f, 0xa8, 0x64, 0x00, 0x00, 0x00, 0x13, 0x49, + 0x44, 0x41, 0x54, 0x18, 0x57, 0x63, 0xf8, 0xcf, + + 0xc0, 0x00, 0xc1, 0x4c, 0x10, 0xea, 0x3f, 0x03, + 0x03, 0x00, 0x3b, 0xec, 0x05, 0xfd, 0x6a, 0x50, + + 0x07, 0x1f, 0x00, 0x00, 0x00, 0x00, 0x49, 0x45, + 0x4e, 0x44, 0xae, 0x42, 0x60, 0x82 + }; + + PngFile image = PngFile::LoadFromBuffer(pngBuffer); + EXPECT_TRUE(image.IsValid()); + EXPECT_EQ(image.GetBufferFormat(), PngFile::Format::RGB); + EXPECT_EQ(image.GetWidth(), 3); + EXPECT_EQ(image.GetHeight(), 2); + EXPECT_EQ(image.GetBuffer().size(), 18); + EXPECT_EQ(Color3(image.GetBuffer().begin() + 0), Color3(255u, 0u, 0u)); + EXPECT_EQ(Color3(image.GetBuffer().begin() + 3), Color3(0u, 255u, 0u)); + EXPECT_EQ(Color3(image.GetBuffer().begin() + 6), Color3(0u, 0u, 255u)); + EXPECT_EQ(Color3(image.GetBuffer().begin() + 9), Color3(255u, 255u, 0u)); + EXPECT_EQ(Color3(image.GetBuffer().begin() + 12), Color3(0u, 255u, 255u)); + EXPECT_EQ(Color3(image.GetBuffer().begin() + 15), Color3(255u, 0u, 255u)); + } + + TEST_F(PngFileTests, ErrorCannotLoadEmptyMemoryBuffer) + { + AZStd::vector pngBuffer; + + AZStd::string gotErrorMessage; + + PngFile::LoadSettings loadSettings; + loadSettings.m_errorHandler = [&gotErrorMessage](const char* errorMessage) + { + gotErrorMessage = errorMessage; + }; + + PngFile image = PngFile::LoadFromBuffer(pngBuffer, loadSettings); + EXPECT_FALSE(image.IsValid()); + EXPECT_TRUE(gotErrorMessage.find("Buffer is empty") != AZStd::string::npos); + } + +} // namespace UnitTest diff --git a/Gems/Atom/Utils/Code/atom_utils_editor_files.cmake b/Gems/Atom/Utils/Code/atom_utils_editor_files.cmake new file mode 100644 index 0000000000..6c4202fe09 --- /dev/null +++ b/Gems/Atom/Utils/Code/atom_utils_editor_files.cmake @@ -0,0 +1,12 @@ +# +# Copyright (c) Contributors to the Open 3D Engine Project. +# For complete copyright and license terms please see the LICENSE at the root of this distribution. +# +# SPDX-License-Identifier: Apache-2.0 OR MIT +# +# + +set(FILES + Include/Atom/Utils/TestUtils/AssetSystemStub.h + Source/TestUtils/AssetSystemStub.cpp +) diff --git a/Gems/Atom/gem.json b/Gems/Atom/gem.json index 1f5e4a37f3..0f409ad993 100644 --- a/Gems/Atom/gem.json +++ b/Gems/Atom/gem.json @@ -2,6 +2,7 @@ "gem_name": "Atom", "display_name": "Atom Renderer", "license": "Apache-2.0 Or MIT", + "license_url": "https://github.com/o3de/o3de/blob/development/LICENSE.txt", "origin": "Open 3D Engine - o3de.org", "type": "Code", "summary": "The Atom Renderer Gem provides Atom Renderer and its associated tools (such as Material Editor), utilites, libraries, and interfaces.", diff --git a/Gems/AtomContent/ReferenceMaterials/Tools/Launch_Cmd.bat b/Gems/AtomContent/ReferenceMaterials/Tools/Launch_Cmd.bat index d100c9ddc7..0b94be5bea 100644 --- a/Gems/AtomContent/ReferenceMaterials/Tools/Launch_Cmd.bat +++ b/Gems/AtomContent/ReferenceMaterials/Tools/Launch_Cmd.bat @@ -1,4 +1,6 @@ @echo off +:: Keep changes local +SETLOCAL enableDelayedExpansion REM REM Copyright (c) Contributors to the Open 3D Engine Project @@ -13,7 +15,7 @@ REM :: Puts you in the CMD within the dev environment :: Set up window -TITLE O3DE Asset Gem Cmd +TITLE O3DE DCC Scripting Interface Cmd :: Use obvious color to prevent confusion (Grey with Yellow Text) COLOR 8E @@ -21,15 +23,12 @@ COLOR 8E cd %~dp0 PUSHD %~dp0 -:: Keep changes local -SETLOCAL enableDelayedExpansion - CALL %~dp0\Project_Env.bat echo. echo _____________________________________________________________________ echo. -echo ~ O3DE Asset Gem CMD ... +echo ~ O3DE %O3DE_PROJECT% Asset Gem CMD ... echo _____________________________________________________________________ echo. diff --git a/Gems/AtomContent/ReferenceMaterials/Tools/Launch_Maya.bat b/Gems/AtomContent/ReferenceMaterials/Tools/Launch_Maya.bat index b9a6b399f3..0af25905a0 100644 --- a/Gems/AtomContent/ReferenceMaterials/Tools/Launch_Maya.bat +++ b/Gems/AtomContent/ReferenceMaterials/Tools/Launch_Maya.bat @@ -1,6 +1,3 @@ -:: Launches maya wityh a bunch of local hooks for Lumberyard -:: ToDo: move all of this to a .json data driven boostrapping system - @echo off REM @@ -37,7 +34,7 @@ echo DCCSI_MAYA_VERSION = %DCCSI_MAYA_VERSION% IF EXIST "%~dp0Project_Env.bat" CALL %~dp0Project_Env.bat echo ________________________________ -echo Launching Maya %DCCSI_MAYA_VERSION% for Lumberyard... +echo Launching Maya %DCCSI_MAYA_VERSION% for O3DE: %O3DE_PROJECT%... :::: Set Maya native project acess to this project ::set MAYA_PROJECT=%LY_PROJECT% @@ -47,8 +44,10 @@ echo Launching Maya %DCCSI_MAYA_VERSION% for Lumberyard... Set MAYA_VP2_DEVICE_OVERRIDE = VirtualDeviceDx11 :: Default to the right version of Maya if we can detect it... and launch -IF EXIST "%MAYA_LOCATION%\bin\Maya.exe" ( - start "" "%MAYA_LOCATION%\bin\Maya.exe" %* +echo MAYA_BIN_PATH = %MAYA_BIN_PATH% + +IF EXIST "%MAYA_BIN_PATH%\Maya.exe" ( + start "" "%MAYA_BIN_PATH%\Maya.exe" %* ) ELSE ( Where maya.exe 2> NUL IF ERRORLEVEL 1 ( diff --git a/Gems/AtomContent/ReferenceMaterials/Tools/Project_Env.bat b/Gems/AtomContent/ReferenceMaterials/Tools/Project_Env.bat index 6e2c8b5914..ddf934d206 100644 --- a/Gems/AtomContent/ReferenceMaterials/Tools/Project_Env.bat +++ b/Gems/AtomContent/ReferenceMaterials/Tools/Project_Env.bat @@ -29,23 +29,23 @@ PUSHD %~dp0 set ABS_PATH=%~dp0 :: project name as a str tag -IF "%LY_PROJECT_NAME%"=="" ( - for %%I in ("%~dp0.") do for %%J in ("%%~dpI.") do set LY_PROJECT_NAME=%%~nxJ +IF "%O3DE_PROJECT%"=="" ( + for %%I in ("%~dp0.") do for %%J in ("%%~dpI.") do set O3DE_PROJECT=%%~nxJ ) echo. echo _____________________________________________________________________ echo. -echo ~ Setting up O3DE %LY_PROJECT_NAME% Environment ... +echo ~ Setting up O3DE %O3DE_PROJECT% Environment ... echo _____________________________________________________________________ echo. -echo LY_PROJECT_NAME = %LY_PROJECT_NAME% +echo O3DE_PROJECT = %O3DE_PROJECT% :: if the user has set up a custom env call it :: this should allow the user to locally -:: set env hooks like LY_DEV or LY_PROJECT +:: set env hooks like O3DE_DEV or O3DE_PROJECT_PATH IF EXIST "%~dp0User_Env.bat" CALL %~dp0User_Env.bat -echo LY_DEV = %LY_DEV% +echo O3DE_DEV = %O3DE_DEV% :: Constant Vars (Global) :: global debug flag (propogates) @@ -74,23 +74,20 @@ echo DCCSI_LOGLEVEL = %DCCSI_LOGLEVEL% IF "%DCCSI_MAYA_VERSION%"=="" (set DCCSI_MAYA_VERSION=2020) echo DCCSI_MAYA_VERSION = %DCCSI_MAYA_VERSION% -:: LY_PROJECT is ideally treated as a full path in the env launchers +:: O3DE_PROJECT_PATH is ideally treated as a full path in the env launchers :: do to changes in o3de, external engine/project/gem folder structures, etc. -IF "%LY_PROJECT%"=="" ( - for %%i in ("%~dp0..") do set "LY_PROJECT=%%~fi" +IF "%O3DE_PROJECT_PATH%"=="" ( + for %%i in ("%~dp0..") do set "O3DE_PROJECT_PATH=%%~fi" ) -echo LY_PROJECT = %LY_PROJECT% +echo O3DE_PROJECT_PATH = %O3DE_PROJECT_PATH% -:: this is here for archaic reasons, WILL DEPRECATE -IF "%LY_PROJECT_PATH%"=="" (set LY_PROJECT_PATH=%LY_PROJECT%) -echo LY_PROJECT_PATH = %LY_PROJECT_PATH% +:: Change to root O3DE dev dir +IF "%O3DE_DEV%"=="" echo ~ You must set O3DE_DEV in a User_Env.bat to match your local engine repo! +IF "%O3DE_DEV%"=="" echo ~ Using default O3DE_DEV=C:\Depot\o3de-engine +IF "%O3DE_DEV%"=="" (set O3DE_DEV=C:\Depot\o3de-engine) +echo O3DE_DEV = %O3DE_DEV% -:: Change to root Lumberyard dev dir -:: You must set this in a User_Env.bat to match youe engine repo location! -IF "%LY_DEV%"=="" (set LY_DEV=C:\Depot\o3de-engine) -echo LY_DEV = %LY_DEV% - -CALL %LY_DEV%\Gems\AtomLyIntegration\TechnicalArt\DccScriptingInterface\Launchers\Windows\Env_Maya.bat +CALL %O3DE_DEV%\Gems\AtomLyIntegration\TechnicalArt\DccScriptingInterface\Tools\Dev\Windows\Env_Maya.bat :: Restore original directory popd diff --git a/Gems/AtomContent/ReferenceMaterials/gem.json b/Gems/AtomContent/ReferenceMaterials/gem.json index f697d50bc4..b75b01e1ae 100644 --- a/Gems/AtomContent/ReferenceMaterials/gem.json +++ b/Gems/AtomContent/ReferenceMaterials/gem.json @@ -5,8 +5,15 @@ "origin": "https://github.com/aws-lumberyard-dev/o3de.git", "type": "Asset", "summary": "Atom Asset Gem with a library of reference materials for StandardPBR (and others in the future)", - "canonical_tags": ["Gem"], - "user_tags": ["Assets", "PBR", "Materials"], + "canonical_tags": [ + "Gem" + ], + "user_tags": [ + "Assets", + "PBR", + "Materials" + ], "icon_path": "preview.png", - "dependencies": [] + "dependencies": [], + "license_url": "https://github.com/o3de/o3de/blob/development/LICENSE.txt" } diff --git a/Gems/AtomContent/Sponza/.src/objects/sponza.ma b/Gems/AtomContent/Sponza/.src/objects/sponza.ma index fabe9dd9ee..1c137a50b7 100644 --- a/Gems/AtomContent/Sponza/.src/objects/sponza.ma +++ b/Gems/AtomContent/Sponza/.src/objects/sponza.ma @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:c95e08274ea0051ee35f415918eaf1530f05475d6265f2ad7ec7c1ff79d29f2b -size 40549297 +oid sha256:57848334af0220b7348a8f2583080acf1d9c139a78c9fb1a93a7d2bce61f3c40 +size 41335413 diff --git a/Gems/AtomContent/Sponza/Assets/Textures/arch_1k_metallic.png b/Gems/AtomContent/Sponza/Assets/Textures/arch_1k_metallic.png deleted file mode 100644 index 43da38b482..0000000000 --- a/Gems/AtomContent/Sponza/Assets/Textures/arch_1k_metallic.png +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:eafc59ca29ddd7d6a83c8532113c3a616242c06d764ab0e3c42f93f5203e0f79 -size 559423 diff --git a/Gems/AtomContent/Sponza/Assets/Textures/bricks_1k_metallic.png b/Gems/AtomContent/Sponza/Assets/Textures/bricks_1k_metallic.png deleted file mode 100644 index fe97275473..0000000000 --- a/Gems/AtomContent/Sponza/Assets/Textures/bricks_1k_metallic.png +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:c47aaa62c959ef8369cb00a5e869485ba8dc5f3f52d5d8c2ecdb77a9c333d8f7 -size 621552 diff --git a/Gems/AtomContent/Sponza/Assets/Textures/ceiling_1k_metallic.png b/Gems/AtomContent/Sponza/Assets/Textures/ceiling_1k_metallic.png deleted file mode 100644 index 9f053564a7..0000000000 --- a/Gems/AtomContent/Sponza/Assets/Textures/ceiling_1k_metallic.png +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:2bafc71e9b7c6836ed31695221d53a092a44f8e5d332d84c3a60010a047b4f89 -size 550767 diff --git a/Gems/AtomContent/Sponza/Assets/Textures/columnA_1k_metallic.png b/Gems/AtomContent/Sponza/Assets/Textures/columnA_1k_metallic.png deleted file mode 100644 index efbf4943c5..0000000000 --- a/Gems/AtomContent/Sponza/Assets/Textures/columnA_1k_metallic.png +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:c56a010a5d6ed2dab7fa1949d8f1eb5b4ac9a1fccafc71767e159bf0bc9d9ee5 -size 613793 diff --git a/Gems/AtomContent/Sponza/Assets/Textures/columnB_1k_metallic.png b/Gems/AtomContent/Sponza/Assets/Textures/columnB_1k_metallic.png deleted file mode 100644 index c7c0f1b666..0000000000 --- a/Gems/AtomContent/Sponza/Assets/Textures/columnB_1k_metallic.png +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:f45ed223121492a590549a91a5673279cbc5c03fcca2101a4bc96961f732fd81 -size 720418 diff --git a/Gems/AtomContent/Sponza/Assets/Textures/columnC_1k_metallic.png b/Gems/AtomContent/Sponza/Assets/Textures/columnC_1k_metallic.png deleted file mode 100644 index 907f2a79db..0000000000 --- a/Gems/AtomContent/Sponza/Assets/Textures/columnC_1k_metallic.png +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:ed35a4a0f95f56612f44318aeb96e55a2f1a666f3ec2b321af4922b28e735314 -size 684898 diff --git a/Gems/AtomContent/Sponza/Assets/Textures/vasePlant_1k_alpha.png b/Gems/AtomContent/Sponza/Assets/Textures/vasePlant_1k_alpha.png index da57383cc7..8556f67471 100644 --- a/Gems/AtomContent/Sponza/Assets/Textures/vasePlant_1k_alpha.png +++ b/Gems/AtomContent/Sponza/Assets/Textures/vasePlant_1k_alpha.png @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:d9783a56bda8b5ff2f38b30e6206343fc14af3782ac5cbac38ecb8c97db2a468 -size 105226 +oid sha256:85ee26dcfdf8cb3ddcd378e92fd52e313ee23a58f7cc5a37556d96556986ba0b +size 62658 diff --git a/Gems/AtomContent/Sponza/Assets/Textures/vasePlant_1k_basecolor.png b/Gems/AtomContent/Sponza/Assets/Textures/vasePlant_1k_basecolor.png index 88015ead07..5f6cd0377f 100644 --- a/Gems/AtomContent/Sponza/Assets/Textures/vasePlant_1k_basecolor.png +++ b/Gems/AtomContent/Sponza/Assets/Textures/vasePlant_1k_basecolor.png @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:99cd7e1af2b371bb42e97192c199a59686aff0c9e8c1e5617f8866071cf0360a +oid sha256:05d7a544ccf6b04dcfb37411927a79e8f4b2e6224b09651f92885604d825dc9c size 860074 diff --git a/Gems/AtomContent/Sponza/Assets/objects/sponza.fbx b/Gems/AtomContent/Sponza/Assets/objects/sponza.fbx index 38752bf32a..a38f51750a 100644 --- a/Gems/AtomContent/Sponza/Assets/objects/sponza.fbx +++ b/Gems/AtomContent/Sponza/Assets/objects/sponza.fbx @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:e24948f9f477a3a167e50a80b04148d0a598d8c40bed86d51870daa8842ce5dd -size 9175808 +oid sha256:6a8e686bd64cda37e8b27adcb691a846e62bcea6491547d53334ef4ed5424493 +size 21247456 diff --git a/Gems/AtomContent/Sponza/Assets/objects/sponza_mat_arch.material b/Gems/AtomContent/Sponza/Assets/objects/sponza_mat_arch.material index d95e84121c..6518091265 100644 --- a/Gems/AtomContent/Sponza/Assets/objects/sponza_mat_arch.material +++ b/Gems/AtomContent/Sponza/Assets/objects/sponza_mat_arch.material @@ -1,51 +1,40 @@ { "description": "", - "materialType": "Materials/Types/StandardPBR.materialtype", "parentMaterial": "", - "propertyLayoutVersion": 3, + "materialType": "Materials/Types/StandardPBR.materialtype", + "materialTypeVersion": 4, "properties": { - "occlusion": { - "diffuseTextureMap": "Textures/arch_1k_ao.png" - }, "baseColor": { - "color": [ - 0.800000011920929, - 0.800000011920929, - 0.800000011920929, - 1.0 - ], - "textureMap": "Textures/arch_1k_basecolor.png" + "textureMap": "../Textures/arch_1k_basecolor.png" }, "general": { "applySpecularAA": true }, "irradiance": { "color": [ - 1.0, - 0.885053813457489, - 0.801281750202179, + 0.2663614749908447, + 0.2383916974067688, + 0.18117037415504456, 1.0 ] }, - "metallic": { - "textureMap": "Textures/arch_1k_metallic.png" - }, "normal": { - "textureMap": "Textures/arch_1k_normal.jpg" + "textureMap": "../Textures/arch_1k_normal.jpg" + }, + "occlusion": { + "diffuseTextureMap": "../Textures/arch_1k_ao.png" }, "opacity": { "factor": 1.0 }, "parallax": { - "algorithm": "POM", - "factor": 0.050999999046325687, + "factor": 0.050999999046325684, "pdo": true, "quality": "High", - "textureMap": "Textures/arch_1k_height.png", "useTexture": false }, "roughness": { - "textureMap": "Textures/arch_1k_roughness.png" + "textureMap": "../Textures/arch_1k_roughness.png" } } -} +} \ No newline at end of file diff --git a/Gems/AtomContent/Sponza/Assets/objects/sponza_mat_background.material b/Gems/AtomContent/Sponza/Assets/objects/sponza_mat_background.material index 710f790419..d944638e50 100644 --- a/Gems/AtomContent/Sponza/Assets/objects/sponza_mat_background.material +++ b/Gems/AtomContent/Sponza/Assets/objects/sponza_mat_background.material @@ -1,25 +1,16 @@ { "description": "", - "materialType": "Materials/Types/StandardPBR.materialtype", "parentMaterial": "", - "propertyLayoutVersion": 3, + "materialType": "Materials/Types/StandardPBR.materialtype", + "materialTypeVersion": 4, "properties": { - "occlusion": { - "diffuseTextureMap": "Textures/background_1k_ao.png" - }, "baseColor": { - "color": [ - 0.800000011920929, - 0.800000011920929, - 0.800000011920929, - 1.0 - ], - "textureMap": "Textures/background_1k_basecolor.png" + "textureMap": "../Textures/background_1k_basecolor.png" }, "clearCoat": { "enable": true, "factor": 0.5, - "normalMap": "Textures/background_1k_normal.jpg", + "normalMap": "../Textures/background_1k_normal.jpg", "roughness": 0.4000000059604645 }, "general": { @@ -27,31 +18,32 @@ }, "irradiance": { "color": [ - 1.0, - 0.8911573886871338, - 0.7894102334976196, + 0.19806210696697235, + 0.1746547669172287, + 0.16513313353061676, 1.0 ] }, "metallic": { - "textureMap": "Textures/background_1k_metallic.png" + "textureMap": "../Textures/background_1k_metallic.png" }, "normal": { - "textureMap": "Textures/background_1k_normal.jpg" + "textureMap": "../Textures/background_1k_normal.jpg" + }, + "occlusion": { + "diffuseTextureMap": "../Textures/background_1k_ao.png" }, "opacity": { "factor": 1.0 }, "parallax": { - "algorithm": "POM", "factor": 0.03099999949336052, "pdo": true, "quality": "High", - "textureMap": "Textures/background_1k_height.png", "useTexture": false }, "roughness": { - "textureMap": "Textures/background_1k_roughness.png" + "textureMap": "../Textures/background_1k_roughness.png" } } -} +} \ No newline at end of file diff --git a/Gems/AtomContent/Sponza/Assets/objects/sponza_mat_bricks.material b/Gems/AtomContent/Sponza/Assets/objects/sponza_mat_bricks.material index 26d64c7db9..52fdf9e3a2 100644 --- a/Gems/AtomContent/Sponza/Assets/objects/sponza_mat_bricks.material +++ b/Gems/AtomContent/Sponza/Assets/objects/sponza_mat_bricks.material @@ -1,25 +1,15 @@ { "description": "", - "materialType": "Materials/Types/StandardPBR.materialtype", "parentMaterial": "", - "propertyLayoutVersion": 3, + "materialType": "Materials/Types/StandardPBR.materialtype", + "materialTypeVersion": 4, "properties": { - "occlusion": { - "diffuseTextureMap": "Textures/bricks_1k_ao.png" - }, "baseColor": { - "color": [ - 0.800000011920929, - 0.800000011920929, - 0.800000011920929, - 1.0 - ], - "textureMap": "Textures/bricks_1k_basecolor.png" + "textureMap": "../Textures/bricks_1k_basecolor.png" }, "clearCoat": { - "enable": true, "factor": 0.5, - "normalMap": "Textures/bricks_1k_normal.jpg", + "normalMap": "../Textures/bricks_1k_normal.jpg", "roughness": 0.5 }, "general": { @@ -27,17 +17,17 @@ }, "irradiance": { "color": [ - 1.0, - 0.9703211784362793, - 0.9703211784362793, + 0.27467766404151917, + 0.27467766404151917, + 0.270496666431427, 1.0 ] }, - "metallic": { - "textureMap": "Textures/bricks_1k_metallic.png" - }, "normal": { - "textureMap": "Textures/bricks_1k_normal.jpg" + "textureMap": "../Textures/bricks_1k_normal.jpg" + }, + "occlusion": { + "diffuseTextureMap": "../Textures/bricks_1k_ao.png" }, "opacity": { "factor": 1.0 @@ -46,11 +36,10 @@ "algorithm": "ContactRefinement", "factor": 0.03500000014901161, "quality": "Medium", - "textureMap": "Textures/bricks_1k_height.png", "useTexture": false }, "roughness": { - "textureMap": "Textures/bricks_1k_roughness.png" + "textureMap": "../Textures/bricks_1k_roughness.png" } } -} +} \ No newline at end of file diff --git a/Gems/AtomContent/Sponza/Assets/objects/sponza_mat_ceiling.material b/Gems/AtomContent/Sponza/Assets/objects/sponza_mat_ceiling.material index 88730c9556..10f5a01a8e 100644 --- a/Gems/AtomContent/Sponza/Assets/objects/sponza_mat_ceiling.material +++ b/Gems/AtomContent/Sponza/Assets/objects/sponza_mat_ceiling.material @@ -1,17 +1,11 @@ { "description": "", - "materialType": "Materials/Types/StandardPBR.materialtype", "parentMaterial": "", - "propertyLayoutVersion": 3, + "materialType": "Materials/Types/StandardPBR.materialtype", + "materialTypeVersion": 4, "properties": { "baseColor": { - "color": [ - 0.800000011920929, - 0.800000011920929, - 0.800000011920929, - 1.0 - ], - "textureMap": "Textures/ceiling_1k_basecolor.png" + "textureMap": "../Textures/ceiling_1k_basecolor.png" }, "emissive": { "color": [ @@ -21,8 +15,22 @@ 1.0 ] }, + "irradiance": { + "color": [ + 0.29176774621009827, + 0.27888914942741394, + 0.2501564025878906, + 1.0 + ] + }, + "normal": { + "textureMap": "../Textures/ceiling_1k_normal.png" + }, "opacity": { "factor": 1.0 + }, + "roughness": { + "textureMap": "../Textures/ceiling_1k_roughness.png" } } } \ No newline at end of file diff --git a/Gems/AtomContent/Sponza/Assets/objects/sponza_mat_chain.material b/Gems/AtomContent/Sponza/Assets/objects/sponza_mat_chain.material index 1ed442a9e0..caf03bd3ce 100644 --- a/Gems/AtomContent/Sponza/Assets/objects/sponza_mat_chain.material +++ b/Gems/AtomContent/Sponza/Assets/objects/sponza_mat_chain.material @@ -1,17 +1,12 @@ { "description": "", - "materialType": "Materials/Types/StandardPBR.materialtype", "parentMaterial": "", - "propertyLayoutVersion": 3, + "materialType": "Materials/Types/StandardPBR.materialtype", + "materialTypeVersion": 4, "properties": { "baseColor": { - "color": [ - 0.800000011920929, - 0.800000011920929, - 0.800000011920929, - 1.0 - ], - "textureMap": "Textures/chain_basecolor.png" + "textureBlendMode": "Lerp", + "textureMap": "../Textures/chain_basecolor.png" }, "emissive": { "color": [ @@ -21,8 +16,20 @@ 1.0 ] }, + "general": { + "doubleSided": true + }, + "metallic": { + "factor": 0.8899999856948853 + }, + "normal": { + "textureMap": "../Textures/chain_normal.jpg" + }, "opacity": { - "factor": 1.0 + "alphaSource": "Split", + "factor": 1.0, + "mode": "Cutout", + "textureMap": "../Textures/chain_alpha.png" } } } \ No newline at end of file diff --git a/Gems/AtomContent/Sponza/Assets/objects/sponza_mat_columna.material b/Gems/AtomContent/Sponza/Assets/objects/sponza_mat_columna.material index cc1f685c7c..15c3fec349 100644 --- a/Gems/AtomContent/Sponza/Assets/objects/sponza_mat_columna.material +++ b/Gems/AtomContent/Sponza/Assets/objects/sponza_mat_columna.material @@ -1,26 +1,16 @@ { "description": "", - "materialType": "Materials/Types/StandardPBR.materialtype", "parentMaterial": "", - "propertyLayoutVersion": 3, + "materialType": "Materials/Types/StandardPBR.materialtype", + "materialTypeVersion": 4, "properties": { - "occlusion": { - "diffuseTextureMap": "Textures/columnA_1k_ao.png" - }, "baseColor": { - "color": [ - 0.800000011920929, - 0.800000011920929, - 0.800000011920929, - 1.0 - ], - "textureMap": "Textures/columnA_1k_basecolor.png" + "textureMap": "../Textures/columnA_1k_basecolor.png" }, "clearCoat": { - "enable": true, "factor": 0.5, - "normalMap": "Textures/columnA_1k_normal.jpg", - "roughness": 0.30000001192092898 + "normalMap": "../Textures/columnA_1k_normal.jpg", + "roughness": 0.30000001192092896 }, "general": { "applySpecularAA": true @@ -33,25 +23,23 @@ 1.0 ] }, - "metallic": { - "textureMap": "Textures/columnA_1k_metallic.png" - }, "normal": { - "textureMap": "Textures/columnA_1k_normal.jpg" + "textureMap": "../Textures/columnA_1k_normal.jpg" + }, + "occlusion": { + "diffuseTextureMap": "../Textures/columnA_1k_ao.png" }, "opacity": { "factor": 1.0 }, "parallax": { - "algorithm": "POM", - "factor": 0.017000000923871995, + "factor": 0.017000000923871994, "pdo": true, "quality": "High", - "textureMap": "Textures/columnA_1k_height.png", "useTexture": false }, "roughness": { - "textureMap": "Textures/columnA_1k_roughness.png" + "textureMap": "../Textures/columnA_1k_roughness.png" } } -} +} \ No newline at end of file diff --git a/Gems/AtomContent/Sponza/Assets/objects/sponza_mat_columnb.material b/Gems/AtomContent/Sponza/Assets/objects/sponza_mat_columnb.material index a1e8747f65..e13f96b2bb 100644 --- a/Gems/AtomContent/Sponza/Assets/objects/sponza_mat_columnb.material +++ b/Gems/AtomContent/Sponza/Assets/objects/sponza_mat_columnb.material @@ -1,56 +1,45 @@ { "description": "", - "materialType": "Materials/Types/StandardPBR.materialtype", "parentMaterial": "", - "propertyLayoutVersion": 3, + "materialType": "Materials/Types/StandardPBR.materialtype", + "materialTypeVersion": 4, "properties": { - "occlusion": { - "diffuseTextureMap": "Textures/columnB_1k_ao.png" - }, "baseColor": { - "color": [ - 0.800000011920929, - 0.800000011920929, - 0.800000011920929, - 1.0 - ], - "textureMap": "Textures/columnB_1k_basecolor.png" + "textureMap": "../Textures/columnB_1k_basecolor.png" }, "clearCoat": { - "enable": true, "factor": 0.5, - "normalMap": "Textures/columnB_1k_normal.jpg", - "roughness": 0.30000001192092898 + "normalMap": "../Textures/columnB_1k_normal.jpg", + "roughness": 0.30000001192092896 }, "general": { "applySpecularAA": true }, "irradiance": { "color": [ - 1.0, - 0.9015335440635681, - 0.8348516225814819, + 0.41788357496261597, + 0.40723279118537903, + 0.4286869466304779, 1.0 ] }, - "metallic": { - "textureMap": "Textures/columnB_1k_metallic.png" - }, "normal": { - "textureMap": "Textures/columnB_1k_normal.jpg" + "textureMap": "../Textures/columnB_1k_normal.jpg" + }, + "occlusion": { + "diffuseTextureMap": "../Textures/columnB_1k_ao.png" }, "opacity": { "factor": 1.0 }, "parallax": { - "factor": 0.020999999716877939, + "factor": 0.020999999716877937, "pdo": true, "quality": "High", - "textureMap": "Textures/columnB_1k_height.png", "useTexture": false }, "roughness": { - "textureMap": "Textures/columnB_1k_roughness.png" + "textureMap": "../Textures/columnB_1k_roughness.png" } } -} +} \ No newline at end of file diff --git a/Gems/AtomContent/Sponza/Assets/objects/sponza_mat_columnc.material b/Gems/AtomContent/Sponza/Assets/objects/sponza_mat_columnc.material index 6edbfde47c..479692848a 100644 --- a/Gems/AtomContent/Sponza/Assets/objects/sponza_mat_columnc.material +++ b/Gems/AtomContent/Sponza/Assets/objects/sponza_mat_columnc.material @@ -1,57 +1,45 @@ { "description": "", - "materialType": "Materials/Types/StandardPBR.materialtype", "parentMaterial": "", - "propertyLayoutVersion": 3, + "materialType": "Materials/Types/StandardPBR.materialtype", + "materialTypeVersion": 4, "properties": { - "occlusion": { - "diffuseTextureMap": "Textures/columnC_1k_ao.png" - }, "baseColor": { - "color": [ - 0.800000011920929, - 0.800000011920929, - 0.800000011920929, - 1.0 - ], - "textureMap": "Textures/columnC_1k_basecolor.png" + "textureMap": "../Textures/columnC_1k_basecolor.png" }, "clearCoat": { - "enable": true, "factor": 0.5, - "normalMap": "Textures/columnC_1k_normal.jpg", - "roughness": 0.30000001192092898 + "normalMap": "../Textures/columnC_1k_normal.jpg", + "roughness": 0.30000001192092896 }, "general": { "applySpecularAA": true }, "irradiance": { "color": [ - 0.9050736427307129, - 0.9050736427307129, - 1.0, + 0.32314029335975647, + 0.29176774621009827, + 0.24228274822235107, 1.0 ] }, - "metallic": { - "textureMap": "Textures/columnC_1k_metallic.png" - }, "normal": { - "textureMap": "Textures/columnC_1k_normal.jpg" + "textureMap": "../Textures/columnC_1k_normal.jpg" + }, + "occlusion": { + "diffuseTextureMap": "../Textures/columnC_1k_ao.png" }, "opacity": { "factor": 1.0 }, "parallax": { - "algorithm": "POM", "factor": 0.014000000432133675, "pdo": true, "quality": "High", - "textureMap": "Textures/columnC_1k_height.png", "useTexture": false }, "roughness": { - "textureMap": "Textures/columnC_1k_roughness.png" + "textureMap": "../Textures/columnC_1k_roughness.png" } } -} +} \ No newline at end of file diff --git a/Gems/AtomContent/Sponza/Assets/objects/sponza_mat_curtainblue.material b/Gems/AtomContent/Sponza/Assets/objects/sponza_mat_curtainblue.material index 351091e48a..50fd968956 100644 --- a/Gems/AtomContent/Sponza/Assets/objects/sponza_mat_curtainblue.material +++ b/Gems/AtomContent/Sponza/Assets/objects/sponza_mat_curtainblue.material @@ -1,47 +1,52 @@ { "description": "", - "materialType": "Materials/Types/StandardPBR.materialtype", "parentMaterial": "", - "propertyLayoutVersion": 3, + "materialType": "Materials/Types/StandardPBR.materialtype", + "materialTypeVersion": 4, "properties": { - "occlusion": { - "diffuseTextureMap": "Textures/curtain_ao.png" - }, "baseColor": { "color": [ - 0.800000011920929, - 0.800000011920929, - 0.800000011920929, + 1.0, + 1.0, + 1.0, 1.0 ], - "textureMap": "Textures/curtainBlue_1k_basecolor.png" + "textureMap": "../Textures/curtainBlue_1k_basecolor.png" + }, + "emissive": { + "color": [ + 1.0, + 1.0, + 1.0, + 1.0 + ] }, "general": { "applySpecularAA": true }, "irradiance": { "color": [ - 0.06195162981748581, - 0.2056153267621994, + 0.0, + 0.14901961386203766, 1.0, 1.0 ] }, "metallic": { - "textureMap": "Textures/curtain_metallic.png" + "textureMap": "../Textures/curtain_metallic.png" }, "normal": { "factor": 0.5, - "textureMap": "Textures/curtain_normal.jpg" + "textureMap": "../Textures/curtain_normal.jpg" }, - "opacity": { - "factor": 1.0 + "occlusion": { + "diffuseTextureMap": "../Textures/curtain_ao.png" }, "roughness": { - "textureMap": "Textures/curtain_roughness.png" + "textureMap": "../Textures/curtain_roughness.png" }, "specularF0": { "enableMultiScatterCompensation": true } } -} +} \ No newline at end of file diff --git a/Gems/AtomContent/Sponza/Assets/objects/sponza_mat_curtaingreen.material b/Gems/AtomContent/Sponza/Assets/objects/sponza_mat_curtaingreen.material index ab656cf3dc..6e70a42d24 100644 --- a/Gems/AtomContent/Sponza/Assets/objects/sponza_mat_curtaingreen.material +++ b/Gems/AtomContent/Sponza/Assets/objects/sponza_mat_curtaingreen.material @@ -1,20 +1,11 @@ { "description": "", - "materialType": "Materials/Types/StandardPBR.materialtype", "parentMaterial": "", - "propertyLayoutVersion": 3, + "materialType": "Materials/Types/StandardPBR.materialtype", + "materialTypeVersion": 4, "properties": { - "occlusion": { - "diffuseTextureMap": "Textures/curtain_ao.png" - }, "baseColor": { - "color": [ - 0.800000011920929, - 0.800000011920929, - 0.800000011920929, - 1.0 - ], - "textureMap": "Textures/curtainGreen_1k_basecolor.png" + "textureMap": "../Textures/curtainGreen_1k_basecolor.png" }, "general": { "applySpecularAA": true @@ -22,23 +13,26 @@ "irradiance": { "color": [ 0.0, - 1.0, - 0.029526207596063615, + 0.15294118225574493, + 0.0, 1.0 ] }, "metallic": { - "textureMap": "Textures/curtain_metallic.png" + "textureMap": "../Textures/curtain_metallic.png" }, "normal": { "factor": 0.5, - "textureMap": "Textures/curtain_normal.jpg" + "textureMap": "../Textures/curtain_normal.jpg" + }, + "occlusion": { + "diffuseTextureMap": "../Textures/curtain_ao.png" }, "opacity": { "factor": 1.0 }, "roughness": { - "textureMap": "Textures/curtain_roughness.png" + "textureMap": "../Textures/curtain_roughness.png" } } -} +} \ No newline at end of file diff --git a/Gems/AtomContent/Sponza/Assets/objects/sponza_mat_curtainred.material b/Gems/AtomContent/Sponza/Assets/objects/sponza_mat_curtainred.material index e9d00dbac0..8233633310 100644 --- a/Gems/AtomContent/Sponza/Assets/objects/sponza_mat_curtainred.material +++ b/Gems/AtomContent/Sponza/Assets/objects/sponza_mat_curtainred.material @@ -1,43 +1,37 @@ { "description": "", - "materialType": "Materials/Types/StandardPBR.materialtype", "parentMaterial": "", - "propertyLayoutVersion": 3, + "materialType": "Materials/Types/StandardPBR.materialtype", + "materialTypeVersion": 4, "properties": { - "occlusion": { - "diffuseTextureMap": "Textures/curtain_ao.png" - }, "baseColor": { - "color": [ - 0.800000011920929, - 0.800000011920929, - 0.800000011920929, - 1.0 - ], - "textureMap": "Textures/curtainRed_1k_basecolor.png" + "textureMap": "../Textures/curtainRed_1k_basecolor.png" }, "general": { "applySpecularAA": true }, "irradiance": { "color": [ - 1.0, - 0.023315785452723504, - 0.048538949340581897, + 0.41960784792900085, + 0.003921568859368563, + 0.003921568859368563, 1.0 ] }, "metallic": { - "textureMap": "Textures/curtain_metallic.png" + "textureMap": "../Textures/curtain_metallic.png" }, "normal": { - "textureMap": "Textures/curtain_normal.jpg" + "textureMap": "../Textures/curtain_normal.jpg" + }, + "occlusion": { + "diffuseTextureMap": "../Textures/curtain_ao.png" }, "opacity": { "factor": 1.0 }, "roughness": { - "textureMap": "Textures/curtain_roughness.png" + "textureMap": "../Textures/curtain_roughness.png" }, "uv": { "center": [ @@ -46,4 +40,4 @@ ] } } -} +} \ No newline at end of file diff --git a/Gems/AtomContent/Sponza/Assets/objects/sponza_mat_details.material b/Gems/AtomContent/Sponza/Assets/objects/sponza_mat_details.material index 1b66a51ec0..b66d8fa679 100644 --- a/Gems/AtomContent/Sponza/Assets/objects/sponza_mat_details.material +++ b/Gems/AtomContent/Sponza/Assets/objects/sponza_mat_details.material @@ -1,48 +1,39 @@ { "description": "", - "materialType": "Materials/Types/StandardPBR.materialtype", "parentMaterial": "", - "propertyLayoutVersion": 3, + "materialType": "Materials/Types/StandardPBR.materialtype", + "materialTypeVersion": 4, "properties": { - "occlusion": { - "diffuseTextureMap": "Textures/details_1k_ao.png" - }, "baseColor": { - "color": [ - 0.800000011920929, - 0.800000011920929, - 0.800000011920929, - 1.0 - ], - "textureMap": "Textures/details_1k_basecolor.png" + "textureMap": "../Textures/details_1k_basecolor.png" }, "clearCoat": { - "enable": true, "factor": 0.5, - "normalMap": "Textures/details_1k_normal.png", + "normalMap": "../Textures/details_1k_normal.png", "roughness": 0.25 }, "general": { "applySpecularAA": true }, "metallic": { - "textureMap": "Textures/details_1k_metallic.png" + "textureMap": "../Textures/details_1k_metallic.png" }, "normal": { - "textureMap": "Textures/details_1k_normal.png" + "textureMap": "../Textures/details_1k_normal.png" + }, + "occlusion": { + "diffuseTextureMap": "../Textures/details_1k_ao.png" }, "opacity": { "factor": 1.0 }, "parallax": { - "algorithm": "POM", "factor": 0.02500000037252903, "pdo": true, - "textureMap": "Textures/details_1k_height.png", "useTexture": false }, "roughness": { - "textureMap": "Textures/details_1k_roughness.png" + "textureMap": "../Textures/details_1k_roughness.png" } } -} +} \ No newline at end of file diff --git a/Gems/AtomContent/Sponza/Assets/objects/sponza_mat_fabricblue.material b/Gems/AtomContent/Sponza/Assets/objects/sponza_mat_fabricblue.material index 0f7331c344..19ce3a6839 100644 --- a/Gems/AtomContent/Sponza/Assets/objects/sponza_mat_fabricblue.material +++ b/Gems/AtomContent/Sponza/Assets/objects/sponza_mat_fabricblue.material @@ -1,20 +1,11 @@ { "description": "", - "materialType": "Materials/Types/StandardPBR.materialtype", "parentMaterial": "", - "propertyLayoutVersion": 3, + "materialType": "Materials/Types/StandardPBR.materialtype", + "materialTypeVersion": 4, "properties": { - "occlusion": { - "diffuseTextureMap": "Textures/fabric_ao.png" - }, "baseColor": { - "color": [ - 0.800000011920929, - 0.800000011920929, - 0.800000011920929, - 1.0 - ], - "textureMap": "Textures/fabricBlue_1k_basecolor.png" + "textureMap": "../Textures/fabricBlue_1k_basecolor.png" }, "general": { "applySpecularAA": true @@ -22,23 +13,27 @@ "irradiance": { "color": [ 0.0, - 0.15049973130226136, + 0.15049973130226135, 1.0, 1.0 - ] + ], + "factor": 0.30000001192092896 }, "metallic": { - "textureMap": "Textures/fabric_metallic.png" + "textureMap": "../Textures/fabric_metallic.png" }, "normal": { "factor": 0.5, - "textureMap": "Textures/fabric_normal.jpg" + "textureMap": "../Textures/fabric_normal.jpg" + }, + "occlusion": { + "diffuseTextureMap": "../Textures/fabric_ao.png" }, "opacity": { "factor": 1.0 }, "roughness": { - "textureMap": "Textures/fabric_roughness.png" + "textureMap": "../Textures/fabric_roughness.png" } } -} +} \ No newline at end of file diff --git a/Gems/AtomContent/Sponza/Assets/objects/sponza_mat_fabricgreen.material b/Gems/AtomContent/Sponza/Assets/objects/sponza_mat_fabricgreen.material index 9150a3caa5..94b8270fef 100644 --- a/Gems/AtomContent/Sponza/Assets/objects/sponza_mat_fabricgreen.material +++ b/Gems/AtomContent/Sponza/Assets/objects/sponza_mat_fabricgreen.material @@ -1,20 +1,11 @@ { "description": "", - "materialType": "Materials/Types/StandardPBR.materialtype", "parentMaterial": "", - "propertyLayoutVersion": 3, + "materialType": "Materials/Types/StandardPBR.materialtype", + "materialTypeVersion": 4, "properties": { - "occlusion": { - "diffuseTextureMap": "Textures/fabric_ao.png" - }, "baseColor": { - "color": [ - 0.800000011920929, - 0.800000011920929, - 0.800000011920929, - 1.0 - ], - "textureMap": "Textures/fabricGreen_1k_basecolor.png" + "textureMap": "../Textures/fabricGreen_1k_basecolor.png" }, "general": { "applySpecularAA": true @@ -22,23 +13,27 @@ "irradiance": { "color": [ 0.0, - 1.0, - 0.15378041565418244, + 0.15292592346668243, + 0.0012207217514514923, 1.0 - ] + ], + "factor": 0.30000001192092896 }, "metallic": { - "textureMap": "Textures/fabric_metallic.png" + "textureMap": "../Textures/fabric_metallic.png" }, "normal": { "factor": 0.5, - "textureMap": "Textures/fabric_normal.jpg" + "textureMap": "../Textures/fabric_normal.jpg" + }, + "occlusion": { + "diffuseTextureMap": "../Textures/fabric_ao.png" }, "opacity": { "factor": 1.0 }, "roughness": { - "textureMap": "Textures/fabric_roughness.png" + "textureMap": "../Textures/fabric_roughness.png" } } -} +} \ No newline at end of file diff --git a/Gems/AtomContent/Sponza/Assets/objects/sponza_mat_fabricred.material b/Gems/AtomContent/Sponza/Assets/objects/sponza_mat_fabricred.material index b697e91b28..7bd2ecddd0 100644 --- a/Gems/AtomContent/Sponza/Assets/objects/sponza_mat_fabricred.material +++ b/Gems/AtomContent/Sponza/Assets/objects/sponza_mat_fabricred.material @@ -1,44 +1,39 @@ { "description": "", - "materialType": "Materials/Types/StandardPBR.materialtype", "parentMaterial": "", - "propertyLayoutVersion": 3, + "materialType": "Materials/Types/StandardPBR.materialtype", + "materialTypeVersion": 4, "properties": { - "occlusion": { - "diffuseTextureMap": "Textures/fabric_ao.png" - }, "baseColor": { - "color": [ - 0.800000011920929, - 0.800000011920929, - 0.800000011920929, - 1.0 - ], - "textureMap": "Textures/fabricRed_1k_basecolor.png" + "textureMap": "../Textures/fabricRed_1k_basecolor.png" }, "general": { "applySpecularAA": true }, "irradiance": { "color": [ - 1.0, - 0.08197146654129029, - 0.10267795622348786, + 0.42040130496025085, + 0.004654001910239458, + 0.0037232013419270515, 1.0 - ] + ], + "factor": 0.30000001192092896 }, "metallic": { - "textureMap": "Textures/fabric_metallic.png" + "textureMap": "../Textures/fabric_metallic.png" }, "normal": { "factor": 0.5, - "textureMap": "Textures/fabric_normal.jpg" + "textureMap": "../Textures/fabric_normal.jpg" + }, + "occlusion": { + "diffuseTextureMap": "../Textures/fabric_ao.png" }, "opacity": { "factor": 1.0 }, "roughness": { - "textureMap": "Textures/fabric_roughness.png" + "textureMap": "../Textures/fabric_roughness.png" } } -} +} \ No newline at end of file diff --git a/Gems/AtomContent/Sponza/Assets/objects/sponza_mat_flagpole.material b/Gems/AtomContent/Sponza/Assets/objects/sponza_mat_flagpole.material index 19010d66e5..aca6c05d29 100644 --- a/Gems/AtomContent/Sponza/Assets/objects/sponza_mat_flagpole.material +++ b/Gems/AtomContent/Sponza/Assets/objects/sponza_mat_flagpole.material @@ -1,20 +1,11 @@ { "description": "", - "materialType": "Materials/Types/StandardPBR.materialtype", "parentMaterial": "", - "propertyLayoutVersion": 3, + "materialType": "Materials/Types/StandardPBR.materialtype", + "materialTypeVersion": 4, "properties": { - "occlusion": { - "diffuseTextureMap": "Textures/flagpole_1k_ao.png" - }, "baseColor": { - "color": [ - 0.800000011920929, - 0.800000011920929, - 0.800000011920929, - 1.0 - ], - "textureMap": "Textures/flagpole_1k_basecolor.png" + "textureMap": "../Textures/flagpole_1k_basecolor.png" }, "general": { "applySpecularAA": true @@ -28,27 +19,28 @@ ] }, "metallic": { - "textureMap": "Textures/flagpole_1k_metallic.png" + "textureMap": "../Textures/flagpole_1k_metallic.png" }, "normal": { - "textureMap": "Textures/flagpole_1k_normal.png" + "textureMap": "../Textures/flagpole_1k_normal.png" + }, + "occlusion": { + "diffuseTextureMap": "../Textures/flagpole_1k_ao.png" }, "opacity": { "factor": 1.0 }, "parallax": { - "algorithm": "POM", "factor": 0.014000000432133675, "pdo": true, "quality": "High", - "textureMap": "Textures/flagpole_1k_height.png", "useTexture": false }, "roughness": { - "textureMap": "Textures/flagpole_1k_roughness.png" + "textureMap": "../Textures/flagpole_1k_roughness.png" }, "specularF0": { "enableMultiScatterCompensation": true } } -} +} \ No newline at end of file diff --git a/Gems/AtomContent/Sponza/Assets/objects/sponza_mat_floor.material b/Gems/AtomContent/Sponza/Assets/objects/sponza_mat_floor.material index bee92e0edb..b75143326d 100644 --- a/Gems/AtomContent/Sponza/Assets/objects/sponza_mat_floor.material +++ b/Gems/AtomContent/Sponza/Assets/objects/sponza_mat_floor.material @@ -1,25 +1,15 @@ { "description": "", - "materialType": "Materials/Types/StandardPBR.materialtype", "parentMaterial": "", - "propertyLayoutVersion": 3, + "materialType": "Materials/Types/StandardPBR.materialtype", + "materialTypeVersion": 4, "properties": { - "occlusion": { - "diffuseTextureMap": "Textures/floor_1k_ao.png" - }, "baseColor": { - "color": [ - 0.800000011920929, - 0.800000011920929, - 0.800000011920929, - 1.0 - ], - "textureMap": "Textures/floor_1k_basecolor.png" + "textureMap": "../Textures/floor_1k_basecolor.png" }, "clearCoat": { - "enable": true, - "influenceMap": "Textures/floor_1k_ao.png", - "normalMap": "Textures/floor_1k_normal.png", + "influenceMap": "../Textures/floor_1k_ao.png", + "normalMap": "../Textures/floor_1k_normal.png", "roughness": 0.25 }, "general": { @@ -34,20 +24,21 @@ ] }, "normal": { - "textureMap": "Textures/floor_1k_normal.png" + "textureMap": "../Textures/floor_1k_normal.png" + }, + "occlusion": { + "diffuseTextureMap": "../Textures/floor_1k_ao.png" }, "opacity": { "factor": 1.0 }, "parallax": { - "algorithm": "POM", - "factor": 0.012000000104308129, + "factor": 0.012000000104308128, "pdo": true, - "textureMap": "Textures/floor_1k_height.png", "useTexture": false }, "roughness": { - "textureMap": "Textures/floor_1k_roughness.png" + "textureMap": "../Textures/floor_1k_roughness.png" } } -} +} \ No newline at end of file diff --git a/Gems/AtomContent/Sponza/Assets/objects/sponza_mat_leaf.material b/Gems/AtomContent/Sponza/Assets/objects/sponza_mat_leaf.material index c95d0a662b..51638d6d94 100644 --- a/Gems/AtomContent/Sponza/Assets/objects/sponza_mat_leaf.material +++ b/Gems/AtomContent/Sponza/Assets/objects/sponza_mat_leaf.material @@ -1,52 +1,43 @@ { "description": "", - "materialType": "Materials/Types/StandardPBR.materialtype", "parentMaterial": "", - "propertyLayoutVersion": 3, + "materialType": "Materials/Types/StandardPBR.materialtype", + "materialTypeVersion": 4, "properties": { "baseColor": { - "color": [ - 0.800000011920929, - 0.800000011920929, - 0.800000011920929, - 1.0 - ], - "textureMap": "Textures/thorn_basecolor.png" + "textureMap": "../Textures/thorn_basecolor.png" }, "clearCoat": { - "enable": true, "factor": 0.05000000074505806, - "normalMap": "Textures/thorn_normal.jpg", + "normalMap": "../Textures/thorn_normal.jpg", "roughness": 0.10000000149011612 }, "general": { - "applySpecularAA": true + "applySpecularAA": true, + "doubleSided": true }, "irradiance": { "color": [ - 0.46506446599960329, + 0.46506446599960327, 1.0, 0.3944609761238098, 1.0 ] }, - "metallic": { - "textureMap": "Textures/thorn_metallic.png" - }, "normal": { - "textureMap": "Textures/thorn_normal.jpg" + "textureMap": "../Textures/thorn_normal.jpg" }, "opacity": { - "doubleSided": true, - "factor": 0.20000000298023225, - "mode": "Cutout" + "alphaSource": "Split", + "factor": 0.20000000298023224, + "mode": "Cutout", + "textureMap": "../Textures/thorn_alpha.png" }, "parallax": { - "textureMap": "Textures/thorn_height.png", "useTexture": false }, "roughness": { - "textureMap": "Textures/thorn_roughness.png" + "textureMap": "../Textures/thorn_roughness.png" } } -} +} \ No newline at end of file diff --git a/Gems/AtomContent/Sponza/Assets/objects/sponza_mat_lion.material b/Gems/AtomContent/Sponza/Assets/objects/sponza_mat_lion.material index 08eb920607..eee41e9c13 100644 --- a/Gems/AtomContent/Sponza/Assets/objects/sponza_mat_lion.material +++ b/Gems/AtomContent/Sponza/Assets/objects/sponza_mat_lion.material @@ -1,17 +1,11 @@ { "description": "", - "materialType": "Materials/Types/StandardPBR.materialtype", "parentMaterial": "", - "propertyLayoutVersion": 3, + "materialType": "Materials/Types/StandardPBR.materialtype", + "materialTypeVersion": 4, "properties": { "baseColor": { - "color": [ - 0.800000011920929, - 0.800000011920929, - 0.800000011920929, - 1.0 - ], - "textureMap": "Textures/lion_1k_basecolor.png" + "textureMap": "../Textures/lion_1k_basecolor.png" }, "emissive": { "color": [ @@ -21,8 +15,22 @@ 1.0 ] }, + "irradiance": { + "color": [ + 0.5583428740501404, + 0.496940553188324, + 0.4125429093837738, + 1.0 + ] + }, + "normal": { + "textureMap": "../Textures/lion_1k_normal.jpg" + }, "opacity": { "factor": 1.0 + }, + "roughness": { + "textureMap": "../Textures/lion_1k_roughness.png" } } } \ No newline at end of file diff --git a/Gems/AtomContent/Sponza/Assets/objects/sponza_mat_roof.material b/Gems/AtomContent/Sponza/Assets/objects/sponza_mat_roof.material index a3e066a438..fec7bb1e34 100644 --- a/Gems/AtomContent/Sponza/Assets/objects/sponza_mat_roof.material +++ b/Gems/AtomContent/Sponza/Assets/objects/sponza_mat_roof.material @@ -1,45 +1,47 @@ { "description": "", - "materialType": "Materials/Types/StandardPBR.materialtype", "parentMaterial": "", - "propertyLayoutVersion": 3, + "materialType": "Materials/Types/StandardPBR.materialtype", + "materialTypeVersion": 4, "properties": { - "occlusion": { - "diffuseTextureMap": "Textures/roof_1k_ao.png" - }, "baseColor": { - "color": [ - 0.800000011920929, - 0.800000011920929, - 0.800000011920929, - 1.0 - ], "textureBlendMode": "Lerp", - "textureMap": "Textures/roof_1k_basecolor.png" + "textureMap": "../Textures/roof_1k_basecolor.png" }, "general": { "applySpecularAA": true }, + "irradiance": { + "color": [ + 0.29613184928894043, + 0.3324483036994934, + 0.45078203082084656, + 1.0 + ] + }, "metallic": { + "textureMap": "../Textures/roof_1k_metallic.png", "useTexture": false }, "normal": { "factor": 0.5, "flipY": true, - "textureMap": "Textures/roof_1k_normal.jpg" + "textureMap": "../Textures/roof_1k_normal.jpg" + }, + "occlusion": { + "diffuseTextureMap": "../Textures/roof_1k_ao.png" }, "opacity": { "factor": 1.0 }, "parallax": { "algorithm": "ContactRefinement", - "factor": 0.019999999552965165, + "factor": 0.019999999552965164, "quality": "Medium", - "textureMap": "Textures/roof_1k_height.png", "useTexture": false }, "roughness": { - "textureMap": "Textures/roof_1k_roughness.png" + "textureMap": "../Textures/roof_1k_roughness.png" } } -} +} \ No newline at end of file diff --git a/Gems/AtomContent/Sponza/Assets/objects/sponza_mat_vase.material b/Gems/AtomContent/Sponza/Assets/objects/sponza_mat_vase.material index dea9aa2a8a..da7a9de3a8 100644 --- a/Gems/AtomContent/Sponza/Assets/objects/sponza_mat_vase.material +++ b/Gems/AtomContent/Sponza/Assets/objects/sponza_mat_vase.material @@ -1,20 +1,11 @@ { "description": "", - "materialType": "Materials/Types/StandardPBR.materialtype", "parentMaterial": "", - "propertyLayoutVersion": 3, + "materialType": "Materials/Types/StandardPBR.materialtype", + "materialTypeVersion": 4, "properties": { - "occlusion": { - "diffuseTextureMap": "Textures/vase_1k_ao.png" - }, "baseColor": { - "color": [ - 0.800000011920929, - 0.800000011920929, - 0.800000011920929, - 1.0 - ], - "textureMap": "Textures/vase_1k_basecolor.png" + "textureMap": "../Textures/vase_1k_basecolor.png" }, "general": { "applySpecularAA": true @@ -28,27 +19,28 @@ ] }, "metallic": { - "textureMap": "Textures/vase_1k_metallic.png" + "textureMap": "../Textures/vase_1k_metallic.png" }, "normal": { - "textureMap": "Textures/vase_1k_normal.jpg" + "textureMap": "../Textures/vase_1k_normal.jpg" + }, + "occlusion": { + "diffuseTextureMap": "../Textures/vase_1k_ao.png" }, "opacity": { "factor": 1.0 }, "parallax": { - "algorithm": "POM", - "factor": 0.027000000700354577, + "factor": 0.027000000700354576, "pdo": true, "quality": "High", - "textureMap": "Textures/vase_1k_height.png", "useTexture": false }, "roughness": { - "textureMap": "Textures/vase_1k_roughness.png" + "textureMap": "../Textures/vase_1k_roughness.png" }, "specularF0": { "enableMultiScatterCompensation": true } } -} +} \ No newline at end of file diff --git a/Gems/AtomContent/Sponza/Assets/objects/sponza_mat_vasehanging.material b/Gems/AtomContent/Sponza/Assets/objects/sponza_mat_vasehanging.material index b2a342dd76..bda7aad38c 100644 --- a/Gems/AtomContent/Sponza/Assets/objects/sponza_mat_vasehanging.material +++ b/Gems/AtomContent/Sponza/Assets/objects/sponza_mat_vasehanging.material @@ -1,20 +1,11 @@ { "description": "", - "materialType": "Materials/Types/StandardPBR.materialtype", "parentMaterial": "", - "propertyLayoutVersion": 3, + "materialType": "Materials/Types/StandardPBR.materialtype", + "materialTypeVersion": 4, "properties": { - "occlusion": { - "diffuseTextureMap": "Textures/vaseHanging_1k_ao.png" - }, "baseColor": { - "color": [ - 0.800000011920929, - 0.800000011920929, - 0.800000011920929, - 1.0 - ], - "textureMap": "Textures/vaseHanging_1k_basecolor.png" + "textureMap": "../Textures/vaseHanging_1k_basecolor.png" }, "general": { "applySpecularAA": true @@ -23,29 +14,30 @@ "color": [ 0.765606164932251, 1.0, - 0.7052567601203919, + 0.7052567601203918, 1.0 ] }, "metallic": { - "textureMap": "Textures/vaseHanging_1k_metallic.png" + "textureMap": "../Textures/vaseHanging_1k_metallic.png" }, "normal": { - "textureMap": "Textures/vaseHanging_1k_normal.png" + "textureMap": "../Textures/vaseHanging_1k_normal.png" + }, + "occlusion": { + "diffuseTextureMap": "../Textures/vaseHanging_1k_ao.png" }, "opacity": { "factor": 1.0 }, "parallax": { - "algorithm": "POM", "factor": 0.04600000008940697, "pdo": true, "quality": "High", - "textureMap": "Textures/vaseHanging_1k_height.png", "useTexture": false }, "roughness": { - "textureMap": "Textures/vaseHanging_1k_roughness.png" + "textureMap": "../Textures/vaseHanging_1k_roughness.png" } } -} +} \ No newline at end of file diff --git a/Gems/AtomContent/Sponza/Assets/objects/sponza_mat_vaseplant.material b/Gems/AtomContent/Sponza/Assets/objects/sponza_mat_vaseplant.material index 290ddc81a6..5546daa0e0 100644 --- a/Gems/AtomContent/Sponza/Assets/objects/sponza_mat_vaseplant.material +++ b/Gems/AtomContent/Sponza/Assets/objects/sponza_mat_vaseplant.material @@ -1,8 +1,8 @@ { "description": "", - "materialType": "Materials/Types/StandardPBR.materialtype", "parentMaterial": "", - "propertyLayoutVersion": 3, + "materialType": "Materials/Types/StandardPBR.materialtype", + "materialTypeVersion": 4, "properties": { "baseColor": { "color": [ @@ -11,23 +11,26 @@ 0.800000011920929, 1.0 ], - "textureMap": "Textures/vasePlant_1k_basecolor.png" + "textureBlendMode": "Lerp", + "textureMap": "../Textures/vasePlant_1k_basecolor.png" }, "general": { - "applySpecularAA": true + "applySpecularAA": true, + "doubleSided": true }, "irradiance": { "color": [ - 0.6788738965988159, - 1.0, - 0.026138704270124437, + 0.09086747467517853, + 0.4111391007900238, + 0.0474097803235054, 1.0 ] }, "opacity": { - "doubleSided": true, - "factor": 0.28999999165534975, - "mode": "Cutout" + "alphaSource": "Split", + "factor": 0.23999999463558197, + "mode": "Cutout", + "textureMap": "../Textures/vasePlant_1k_alpha.png" } } -} +} \ No newline at end of file diff --git a/Gems/AtomContent/Sponza/Assets/objects/sponza_mat_vaseround.material b/Gems/AtomContent/Sponza/Assets/objects/sponza_mat_vaseround.material index fba07379c0..268e3ab613 100644 --- a/Gems/AtomContent/Sponza/Assets/objects/sponza_mat_vaseround.material +++ b/Gems/AtomContent/Sponza/Assets/objects/sponza_mat_vaseround.material @@ -1,26 +1,16 @@ { "description": "", - "materialType": "Materials/Types/StandardPBR.materialtype", "parentMaterial": "", - "propertyLayoutVersion": 3, + "materialType": "Materials/Types/StandardPBR.materialtype", + "materialTypeVersion": 4, "properties": { - "occlusion": { - "diffuseTextureMap": "Textures/vaseRound_1k_ao.png" - }, "baseColor": { - "color": [ - 0.800000011920929, - 0.800000011920929, - 0.800000011920929, - 1.0 - ], - "textureMap": "Textures/vaseRound_1k_basecolor.png" + "textureMap": "../Textures/vaseRound_1k_basecolor.png" }, "clearCoat": { - "enable": true, "factor": 0.5, - "influenceMap": "Textures/vaseRound_1k_ao.png", - "normalMap": "Textures/vaseRound_1k_normal.jpg", + "influenceMap": "../Textures/vaseRound_1k_ao.png", + "normalMap": "../Textures/vaseRound_1k_normal.jpg", "roughness": 0.25 }, "general": { @@ -28,31 +18,32 @@ }, "irradiance": { "color": [ - 1.0, - 0.5939116477966309, - 0.29176774621009829, + 0.46933698654174805, + 0.3824063539505005, + 0.47861447930336, 1.0 ] }, "normal": { - "textureMap": "Textures/vaseRound_1k_normal.jpg" + "textureMap": "../Textures/vaseRound_1k_normal.jpg" + }, + "occlusion": { + "diffuseTextureMap": "../Textures/vaseRound_1k_ao.png" }, "opacity": { "factor": 1.0 }, "parallax": { - "algorithm": "POM", - "factor": 0.019999999552965165, + "factor": 0.019999999552965164, "pdo": true, "quality": "High", - "textureMap": "Textures/vaseRound_1k_height.png", "useTexture": false }, "roughness": { - "textureMap": "Textures/vaseRound_1k_roughness.png" + "textureMap": "../Textures/vaseRound_1k_roughness.png" }, "specularF0": { "enableMultiScatterCompensation": true } } -} +} \ No newline at end of file diff --git a/Gems/AtomContent/Sponza/Tools/Launch_Cmd.bat b/Gems/AtomContent/Sponza/Tools/Launch_Cmd.bat index 99c2c12c51..0b94be5bea 100644 --- a/Gems/AtomContent/Sponza/Tools/Launch_Cmd.bat +++ b/Gems/AtomContent/Sponza/Tools/Launch_Cmd.bat @@ -1,4 +1,6 @@ @echo off +:: Keep changes local +SETLOCAL enableDelayedExpansion REM REM Copyright (c) Contributors to the Open 3D Engine Project @@ -21,15 +23,12 @@ COLOR 8E cd %~dp0 PUSHD %~dp0 -:: Keep changes local -SETLOCAL enableDelayedExpansion - CALL %~dp0\Project_Env.bat echo. echo _____________________________________________________________________ echo. -echo ~ LY DCC Scripting Interface CMD ... +echo ~ O3DE %O3DE_PROJECT% Asset Gem CMD ... echo _____________________________________________________________________ echo. diff --git a/Gems/AtomContent/Sponza/Tools/Launch_Maya.bat b/Gems/AtomContent/Sponza/Tools/Launch_Maya.bat index d774adf79b..0af25905a0 100644 --- a/Gems/AtomContent/Sponza/Tools/Launch_Maya.bat +++ b/Gems/AtomContent/Sponza/Tools/Launch_Maya.bat @@ -34,7 +34,7 @@ echo DCCSI_MAYA_VERSION = %DCCSI_MAYA_VERSION% IF EXIST "%~dp0Project_Env.bat" CALL %~dp0Project_Env.bat echo ________________________________ -echo Launching Maya %DCCSI_MAYA_VERSION% for Lumberyard... +echo Launching Maya %DCCSI_MAYA_VERSION% for O3DE: %O3DE_PROJECT%... :::: Set Maya native project acess to this project ::set MAYA_PROJECT=%LY_PROJECT% @@ -44,8 +44,10 @@ echo Launching Maya %DCCSI_MAYA_VERSION% for Lumberyard... Set MAYA_VP2_DEVICE_OVERRIDE = VirtualDeviceDx11 :: Default to the right version of Maya if we can detect it... and launch -IF EXIST "%MAYA_LOCATION%\bin\Maya.exe" ( - start "" "%MAYA_LOCATION%\bin\Maya.exe" %* +echo MAYA_BIN_PATH = %MAYA_BIN_PATH% + +IF EXIST "%MAYA_BIN_PATH%\Maya.exe" ( + start "" "%MAYA_BIN_PATH%\Maya.exe" %* ) ELSE ( Where maya.exe 2> NUL IF ERRORLEVEL 1 ( diff --git a/Gems/AtomContent/Sponza/Tools/Project_Env.bat b/Gems/AtomContent/Sponza/Tools/Project_Env.bat index 6e2c8b5914..ddf934d206 100644 --- a/Gems/AtomContent/Sponza/Tools/Project_Env.bat +++ b/Gems/AtomContent/Sponza/Tools/Project_Env.bat @@ -29,23 +29,23 @@ PUSHD %~dp0 set ABS_PATH=%~dp0 :: project name as a str tag -IF "%LY_PROJECT_NAME%"=="" ( - for %%I in ("%~dp0.") do for %%J in ("%%~dpI.") do set LY_PROJECT_NAME=%%~nxJ +IF "%O3DE_PROJECT%"=="" ( + for %%I in ("%~dp0.") do for %%J in ("%%~dpI.") do set O3DE_PROJECT=%%~nxJ ) echo. echo _____________________________________________________________________ echo. -echo ~ Setting up O3DE %LY_PROJECT_NAME% Environment ... +echo ~ Setting up O3DE %O3DE_PROJECT% Environment ... echo _____________________________________________________________________ echo. -echo LY_PROJECT_NAME = %LY_PROJECT_NAME% +echo O3DE_PROJECT = %O3DE_PROJECT% :: if the user has set up a custom env call it :: this should allow the user to locally -:: set env hooks like LY_DEV or LY_PROJECT +:: set env hooks like O3DE_DEV or O3DE_PROJECT_PATH IF EXIST "%~dp0User_Env.bat" CALL %~dp0User_Env.bat -echo LY_DEV = %LY_DEV% +echo O3DE_DEV = %O3DE_DEV% :: Constant Vars (Global) :: global debug flag (propogates) @@ -74,23 +74,20 @@ echo DCCSI_LOGLEVEL = %DCCSI_LOGLEVEL% IF "%DCCSI_MAYA_VERSION%"=="" (set DCCSI_MAYA_VERSION=2020) echo DCCSI_MAYA_VERSION = %DCCSI_MAYA_VERSION% -:: LY_PROJECT is ideally treated as a full path in the env launchers +:: O3DE_PROJECT_PATH is ideally treated as a full path in the env launchers :: do to changes in o3de, external engine/project/gem folder structures, etc. -IF "%LY_PROJECT%"=="" ( - for %%i in ("%~dp0..") do set "LY_PROJECT=%%~fi" +IF "%O3DE_PROJECT_PATH%"=="" ( + for %%i in ("%~dp0..") do set "O3DE_PROJECT_PATH=%%~fi" ) -echo LY_PROJECT = %LY_PROJECT% +echo O3DE_PROJECT_PATH = %O3DE_PROJECT_PATH% -:: this is here for archaic reasons, WILL DEPRECATE -IF "%LY_PROJECT_PATH%"=="" (set LY_PROJECT_PATH=%LY_PROJECT%) -echo LY_PROJECT_PATH = %LY_PROJECT_PATH% +:: Change to root O3DE dev dir +IF "%O3DE_DEV%"=="" echo ~ You must set O3DE_DEV in a User_Env.bat to match your local engine repo! +IF "%O3DE_DEV%"=="" echo ~ Using default O3DE_DEV=C:\Depot\o3de-engine +IF "%O3DE_DEV%"=="" (set O3DE_DEV=C:\Depot\o3de-engine) +echo O3DE_DEV = %O3DE_DEV% -:: Change to root Lumberyard dev dir -:: You must set this in a User_Env.bat to match youe engine repo location! -IF "%LY_DEV%"=="" (set LY_DEV=C:\Depot\o3de-engine) -echo LY_DEV = %LY_DEV% - -CALL %LY_DEV%\Gems\AtomLyIntegration\TechnicalArt\DccScriptingInterface\Launchers\Windows\Env_Maya.bat +CALL %O3DE_DEV%\Gems\AtomLyIntegration\TechnicalArt\DccScriptingInterface\Tools\Dev\Windows\Env_Maya.bat :: Restore original directory popd diff --git a/Gems/AtomContent/Sponza/gem.json b/Gems/AtomContent/Sponza/gem.json index 64de0e5da0..68749cd5f4 100644 --- a/Gems/AtomContent/Sponza/gem.json +++ b/Gems/AtomContent/Sponza/gem.json @@ -2,6 +2,7 @@ "gem_name": "Sponza", "display_name": "Sponza", "license": "Apache-2.0 Or MIT", + "license_url": "https://github.com/o3de/o3de/blob/development/LICENSE.txt", "origin": "Open 3D Engine - o3de.org", "type": "Asset", "summary": "A standard test scene for Global Illumination (forked from crytek sponza scene)", diff --git a/Gems/AtomContent/gem.json b/Gems/AtomContent/gem.json index 1bffe7d989..400e897a3b 100644 --- a/Gems/AtomContent/gem.json +++ b/Gems/AtomContent/gem.json @@ -2,6 +2,7 @@ "gem_name": "AtomContent", "display_name": "Atom Content", "license": "Apache-2.0 Or MIT", + "license_url": "https://github.com/o3de/o3de/blob/development/LICENSE.txt", "origin": "Open 3D Engine - o3de.org", "type": "Asset", "summary": "The Atom Content Gem provides assets for Atom Renderer and a modified version of the Pixar Look Development Studio.", diff --git a/Gems/AtomLyIntegration/AtomBridge/Code/CMakeLists.txt b/Gems/AtomLyIntegration/AtomBridge/Code/CMakeLists.txt index e53a0c6281..67f28767e0 100644 --- a/Gems/AtomLyIntegration/AtomBridge/Code/CMakeLists.txt +++ b/Gems/AtomLyIntegration/AtomBridge/Code/CMakeLists.txt @@ -68,6 +68,14 @@ ly_create_alias(NAME Atom_AtomBridge.Clients NAMESPACE Gem TARGETS Gem::Atom_Ato ly_create_alias(NAME Atom_AtomBridge.Servers NAMESPACE Gem TARGETS Gem::Atom_AtomBridge) if(PAL_TRAIT_BUILD_HOST_TOOLS) + + set(additional_tool_deps ${pal_dir}/additional_${PAL_PLATFORM_NAME_LOWERCASE}_tool_deps.cmake) + foreach(pal_tools_platform ${LY_PAL_TOOLS_ENABLED}) + string(TOLOWER ${pal_tools_platform} pal_tools_platform_lowercase) + ly_get_list_relative_pal_filename(pal_runtime_dependencies_source_dir ${CMAKE_CURRENT_LIST_DIR}/Source/Platform/${pal_tools_platform}) + list(APPEND additional_tool_deps ${pal_runtime_dependencies_source_dir}/additional_${pal_tools_platform_lowercase}_tool_deps.cmake) + endforeach() + ly_add_target( NAME Atom_AtomBridge.Editor ${PAL_TRAIT_MONOLITHIC_DRIVEN_MODULE_TYPE} NAMESPACE Gem @@ -79,7 +87,7 @@ if(PAL_TRAIT_BUILD_HOST_TOOLS) PUBLIC Include PLATFORM_INCLUDE_FILES - ${pal_dir}/additional_${PAL_PLATFORM_NAME_LOWERCASE}_tool_deps.cmake + ${additional_tool_deps} COMPILE_DEFINITIONS PRIVATE EDITOR diff --git a/Gems/AtomLyIntegration/AtomBridge/Code/Source/AtomBridgeSystemComponent.cpp b/Gems/AtomLyIntegration/AtomBridge/Code/Source/AtomBridgeSystemComponent.cpp index d822b16486..7a980f9824 100644 --- a/Gems/AtomLyIntegration/AtomBridge/Code/Source/AtomBridgeSystemComponent.cpp +++ b/Gems/AtomLyIntegration/AtomBridge/Code/Source/AtomBridgeSystemComponent.cpp @@ -67,12 +67,12 @@ namespace AZ void AtomBridgeSystemComponent::GetProvidedServices(ComponentDescriptor::DependencyArrayType& provided) { - provided.push_back(AZ_CRC("AtomBridgeService", 0xdb816a99)); + provided.push_back(AZ_CRC("AtomBridgeService", 0x92d990b5)); } void AtomBridgeSystemComponent::GetIncompatibleServices(ComponentDescriptor::DependencyArrayType& incompatible) { - incompatible.push_back(AZ_CRC("AtomBridgeService", 0xdb816a99)); + incompatible.push_back(AZ_CRC("AtomBridgeService", 0x92d990b5)); } void AtomBridgeSystemComponent::GetRequiredServices(ComponentDescriptor::DependencyArrayType& required) diff --git a/Gems/AtomLyIntegration/AtomBridge/Code/Source/AtomDebugDisplayViewportInterface.cpp b/Gems/AtomLyIntegration/AtomBridge/Code/Source/AtomDebugDisplayViewportInterface.cpp index 14f1c5aa0d..352ffb6486 100644 --- a/Gems/AtomLyIntegration/AtomBridge/Code/Source/AtomDebugDisplayViewportInterface.cpp +++ b/Gems/AtomLyIntegration/AtomBridge/Code/Source/AtomDebugDisplayViewportInterface.cpp @@ -348,14 +348,7 @@ namespace AZ::AtomBridge void AtomDebugDisplayViewportInterface::SetAlpha(float a) { m_rendState.m_color.SetA(a); - if (a < 1.0f) - { - m_rendState.m_opacityType = AZ::RPI::AuxGeomDraw::OpacityType::Opaque; - } - else - { - m_rendState.m_opacityType = AZ::RPI::AuxGeomDraw::OpacityType::Translucent; - } + m_rendState.m_opacityType = a < 1.0f ? AZ::RPI::AuxGeomDraw::OpacityType::Translucent : AZ::RPI::AuxGeomDraw::OpacityType::Opaque; } void AtomDebugDisplayViewportInterface::DrawQuad( @@ -799,7 +792,8 @@ namespace AZ::AtomBridge const float startAngle = DegToRad(startAngleDegrees); const float stopAngle = DegToRad(sweepAngleDegrees) + startAngle; SingleColorDynamicSizeLineHelper lines(1+static_cast(sweepAngleDegrees/angularStepDegrees)); - AZ::Vector3 radiusV3 = AZ::Vector3(radius); + float aspectRadius = radius / GetAspectRatio(); + AZ::Vector3 radiusV3 = AZ::Vector3(aspectRadius, radius, radius); AZ::Vector3 pos = AZ::Vector3(center.GetX(), center.GetY(), z); CreateAxisAlignedArc( lines, @@ -1015,6 +1009,55 @@ namespace AZ::AtomBridge } } + void AtomDebugDisplayViewportInterface::DrawWireCylinderNoEnds(const AZ::Vector3& center, const AZ::Vector3& axis, float radius, float height) + { + if (m_auxGeomPtr) + { + const float scale = GetCurrentTransform().RetrieveScale().GetMaxElement(); + const AZ::Vector3 worldCenter = ToWorldSpacePosition(center); + const AZ::Vector3 worldAxis = ToWorldSpaceVector(axis); + m_auxGeomPtr->DrawCylinderNoEnds( + worldCenter, + worldAxis, + scale * radius, + scale * height, + m_rendState.m_color, + AZ::RPI::AuxGeomDraw::DrawStyle::Line, + m_rendState.m_depthTest, + m_rendState.m_depthWrite, + m_rendState.m_faceCullMode, + m_rendState.m_viewProjOverrideIndex + ); + } + } + + void AtomDebugDisplayViewportInterface::DrawSolidCylinderNoEnds( + const AZ::Vector3& center, + const AZ::Vector3& axis, + float radius, + float height, + bool drawShaded) + { + if (m_auxGeomPtr) + { + const float scale = GetCurrentTransform().RetrieveScale().GetMaxElement(); + const AZ::Vector3 worldCenter = ToWorldSpacePosition(center); + const AZ::Vector3 worldAxis = ToWorldSpaceVector(axis); + m_auxGeomPtr->DrawCylinderNoEnds( + worldCenter, + worldAxis, + scale * radius, + scale * height, + m_rendState.m_color, + drawShaded ? AZ::RPI::AuxGeomDraw::DrawStyle::Shaded : AZ::RPI::AuxGeomDraw::DrawStyle::Solid, + m_rendState.m_depthTest, + m_rendState.m_depthWrite, + m_rendState.m_faceCullMode, + m_rendState.m_viewProjOverrideIndex + ); + } + } + void AtomDebugDisplayViewportInterface::DrawWireCapsule( const AZ::Vector3& center, const AZ::Vector3& axis, @@ -1024,83 +1067,24 @@ namespace AZ::AtomBridge if (m_auxGeomPtr && radius > FLT_EPSILON && axis.GetLengthSq() > FLT_EPSILON) { AZ::Vector3 axisNormalized = axis.GetNormalizedEstimate(); - SingleColorStaticSizeLineHelper<(16+1) * 5> lines; // 360/22.5 = 16, 5 possible calls to CreateArbitraryAxisArc - AZ::Vector3 radiusV3 = AZ::Vector3(radius); - float stepAngle = DegToRad(22.5f); - float Deg0 = DegToRad(0.0f); + const float scale = GetCurrentTransform().RetrieveScale().GetMaxElement(); + const AZ::Vector3 worldCenter = ToWorldSpacePosition(center); + const AZ::Vector3 worldAxis = ToWorldSpaceVector(axis); - // Draw cylinder part (or just a circle around the middle) + // Draw cylinder part (if cylinder height is too small, ignore cylinder and just draw both hemispheres) if (heightStraightSection > FLT_EPSILON) { - DrawWireCylinder(center, axis, radius, heightStraightSection); - } - else - { - float Deg360 = DegToRad(360.0f); - CreateArbitraryAxisArc( - lines, - stepAngle, - Deg0, - Deg360, - center, - radiusV3, - axisNormalized - ); + DrawWireCylinderNoEnds(worldCenter, worldAxis, scale * radius, scale * heightStraightSection); } - float Deg90 = DegToRad(90.0f); - float Deg180 = DegToRad(180.0f); - - AZ::Vector3 ortho1Normalized, ortho2Normalized; - CalcBasisVectors(axisNormalized, ortho1Normalized, ortho2Normalized); AZ::Vector3 centerToTopCircleCenter = axisNormalized * heightStraightSection * 0.5f; - AZ::Vector3 topCenter = center + centerToTopCircleCenter; - AZ::Vector3 bottomCenter = center - centerToTopCircleCenter; - // Draw top cap as two criss-crossing 180deg arcs - CreateArbitraryAxisArc( - lines, - stepAngle, - Deg90, - Deg90 + Deg180, - topCenter, - radiusV3, - ortho1Normalized - ); + // Top hemisphere + DrawWireHemisphere(center + centerToTopCircleCenter, worldAxis, scale * radius); - CreateArbitraryAxisArc( - lines, - stepAngle, - Deg180, - Deg180 + Deg180, - topCenter, - radiusV3, - ortho2Normalized - ); - - // Draw bottom cap - CreateArbitraryAxisArc( - lines, - stepAngle, - -Deg90, - -Deg90 + Deg180, - bottomCenter, - radiusV3, - ortho1Normalized - ); - - CreateArbitraryAxisArc( - lines, - stepAngle, - Deg0, - Deg0 + Deg180, - bottomCenter, - radiusV3, - ortho2Normalized - ); - - lines.Draw(m_auxGeomPtr, m_rendState); + // Bottom hemisphere + DrawWireHemisphere(center - centerToTopCircleCenter, -worldAxis, scale * radius); } } @@ -1147,6 +1131,25 @@ namespace AZ::AtomBridge } } + void AtomDebugDisplayViewportInterface::DrawWireHemisphere(const AZ::Vector3& pos, const AZ::Vector3& axis, float radius) + { + if (m_auxGeomPtr) + { + const float scale = GetCurrentTransform().RetrieveScale().GetMaxElement(); + m_auxGeomPtr->DrawHemisphere( + ToWorldSpacePosition(pos), + axis, + scale * radius, + m_rendState.m_color, + AZ::RPI::AuxGeomDraw::DrawStyle::Line, + m_rendState.m_depthTest, + m_rendState.m_depthWrite, + m_rendState.m_faceCullMode, + m_rendState.m_viewProjOverrideIndex + ); + } + } + void AtomDebugDisplayViewportInterface::DrawWireDisk(const AZ::Vector3& pos, const AZ::Vector3& dir, float radius) { if (m_auxGeomPtr) diff --git a/Gems/AtomLyIntegration/AtomBridge/Code/Source/AtomDebugDisplayViewportInterface.h b/Gems/AtomLyIntegration/AtomBridge/Code/Source/AtomDebugDisplayViewportInterface.h index 5f902c5884..7f7af9bbcb 100644 --- a/Gems/AtomLyIntegration/AtomBridge/Code/Source/AtomDebugDisplayViewportInterface.h +++ b/Gems/AtomLyIntegration/AtomBridge/Code/Source/AtomDebugDisplayViewportInterface.h @@ -168,9 +168,12 @@ namespace AZ::AtomBridge void DrawSolidCone(const AZ::Vector3& pos, const AZ::Vector3& dir, float radius, float height, bool drawShaded) override; void DrawWireCylinder(const AZ::Vector3& center, const AZ::Vector3& axis, float radius, float height) override; void DrawSolidCylinder(const AZ::Vector3& center, const AZ::Vector3& axis, float radius, float height, bool drawShaded) override; + void DrawWireCylinderNoEnds(const AZ::Vector3& center, const AZ::Vector3& axis, float radius, float height) override; + void DrawSolidCylinderNoEnds(const AZ::Vector3& center, const AZ::Vector3& axis, float radius, float height, bool drawShaded) override; void DrawWireCapsule(const AZ::Vector3& center, const AZ::Vector3& axis, float radius, float heightStraightSection) override; void DrawWireSphere(const AZ::Vector3& pos, float radius) override; void DrawWireSphere(const AZ::Vector3& pos, const AZ::Vector3 radius) override; + void DrawWireHemisphere(const AZ::Vector3& pos, const AZ::Vector3& axis, float radius) override; void DrawWireDisk(const AZ::Vector3& pos, const AZ::Vector3& dir, float radius) override; void DrawBall(const AZ::Vector3& pos, float radius, bool drawShaded) override; void DrawDisk(const AZ::Vector3& pos, const AZ::Vector3& dir, float radius) override; diff --git a/Gems/AtomLyIntegration/AtomBridge/Code/Source/Editor/AssetCollectionAsyncLoaderTestComponent.h b/Gems/AtomLyIntegration/AtomBridge/Code/Source/Editor/AssetCollectionAsyncLoaderTestComponent.h index 9ab25741af..3af1ad8907 100644 --- a/Gems/AtomLyIntegration/AtomBridge/Code/Source/Editor/AssetCollectionAsyncLoaderTestComponent.h +++ b/Gems/AtomLyIntegration/AtomBridge/Code/Source/Editor/AssetCollectionAsyncLoaderTestComponent.h @@ -109,12 +109,12 @@ namespace AZ static void GetProvidedServices(AZ::ComponentDescriptor::DependencyArrayType& services) { - services.push_back(AZ_CRC("AssetCollectionAsyncLoaderTest", 0xdd5ab934)); + services.push_back(AZ_CRC("AssetCollectionAsyncLoaderTest", 0x66d04369)); } static void GetIncompatibleServices(AZ::ComponentDescriptor::DependencyArrayType& services) { - services.push_back(AZ_CRC("AssetCollectionAsyncLoaderTest", 0xdd5ab934)); + services.push_back(AZ_CRC("AssetCollectionAsyncLoaderTest", 0x66d04369)); } static void Reflect(AZ::ReflectContext* context); diff --git a/Gems/AtomLyIntegration/AtomBridge/Code/Source/FlyCameraInputComponent.cpp b/Gems/AtomLyIntegration/AtomBridge/Code/Source/FlyCameraInputComponent.cpp index e6439592b3..79f8d4708a 100644 --- a/Gems/AtomLyIntegration/AtomBridge/Code/Source/FlyCameraInputComponent.cpp +++ b/Gems/AtomLyIntegration/AtomBridge/Code/Source/FlyCameraInputComponent.cpp @@ -8,7 +8,6 @@ #include "FlyCameraInputComponent.h" #include -#include #include #include diff --git a/Gems/AtomLyIntegration/AtomBridge/gem.json b/Gems/AtomLyIntegration/AtomBridge/gem.json index 1d48d8be61..e8ca413023 100644 --- a/Gems/AtomLyIntegration/AtomBridge/gem.json +++ b/Gems/AtomLyIntegration/AtomBridge/gem.json @@ -2,6 +2,7 @@ "gem_name": "Atom_AtomBridge", "display_name": "Atom Bridge", "license": "Apache-2.0 Or MIT", + "license_url": "https://github.com/o3de/o3de/blob/development/LICENSE.txt", "origin": "Open 3D Engine - o3de.org", "type": "Code", "summary": "", diff --git a/Gems/AtomLyIntegration/AtomFont/Assets/seedList.seed b/Gems/AtomLyIntegration/AtomFont/Assets/seedList.seed new file mode 100644 index 0000000000..f879f523d0 --- /dev/null +++ b/Gems/AtomLyIntegration/AtomFont/Assets/seedList.seed @@ -0,0 +1,13 @@ + + + + + + + + + + + + + diff --git a/Gems/AtomLyIntegration/AtomFont/Code/Source/FFont.cpp b/Gems/AtomLyIntegration/AtomFont/Code/Source/FFont.cpp index 86b3011836..83453f4ff1 100644 --- a/Gems/AtomLyIntegration/AtomFont/Code/Source/FFont.cpp +++ b/Gems/AtomLyIntegration/AtomFont/Code/Source/FFont.cpp @@ -561,12 +561,10 @@ uint32_t AZ::FFont::GetNumQuadsForText(const char* str, const bool asciiMultiLin ++numQuads; } - uint32_t nextCh = 0; const wchar_t* pChar = strW.c_str(); while (uint32_t ch = *pChar) { ++pChar; - nextCh = *pChar; switch (ch) { @@ -1726,15 +1724,13 @@ void AZ::FFont::DrawScreenAlignedText3d( { return; } - AZ::Vector3 positionNDC = AzFramework::WorldToScreenNdc( - params.m_position, - currentView->GetWorldToViewMatrix(), - currentView->GetViewToClipMatrix() - ); - // Text behind the camera shouldn't get rendered. WorldToScreenNDC returns values in the range 0 - 1, so Z < 0.5 is behind the screen + const AZ::Vector3 positionNdc = AzFramework::WorldToScreenNdc( + params.m_position, currentView->GetWorldToViewMatrixAsMatrix3x4(), currentView->GetViewToClipMatrix()); + + // Text behind the camera shouldn't get rendered. WorldToScreenNdc returns values in the range 0 - 1, so Z < 0.5 is behind the screen // and >= 0.5 is in front of the screen. - if (positionNDC.GetZ() < 0.5f) + if (positionNdc.GetZ() < 0.5f) { return; } @@ -1744,9 +1740,9 @@ void AZ::FFont::DrawScreenAlignedText3d( DrawStringUInternal( *internalParams.m_viewport, internalParams.m_viewportContext, - positionNDC.GetX() * internalParams.m_viewport->GetWidth(), - (1.0f - positionNDC.GetY()) * internalParams.m_viewport->GetHeight(), - positionNDC.GetZ(), // Z + positionNdc.GetX() * internalParams.m_viewport->GetWidth(), + (1.0f - positionNdc.GetY()) * internalParams.m_viewport->GetHeight(), + positionNdc.GetZ(), // Z text.data(), params.m_multiline, internalParams.m_ctx diff --git a/Gems/AtomLyIntegration/AtomFont/gem.json b/Gems/AtomLyIntegration/AtomFont/gem.json index ed5b488de7..8907ec0979 100644 --- a/Gems/AtomLyIntegration/AtomFont/gem.json +++ b/Gems/AtomLyIntegration/AtomFont/gem.json @@ -2,6 +2,7 @@ "gem_name": "AtomFont", "display_name": "Atom Font", "license": "Apache-2.0 Or MIT", + "license_url": "https://github.com/o3de/o3de/blob/development/LICENSE.txt", "origin": "Open 3D Engine - o3de.org", "type": "Code", "summary": "", diff --git a/Gems/AtomLyIntegration/AtomImGuiTools/gem.json b/Gems/AtomLyIntegration/AtomImGuiTools/gem.json index 564eeedee2..e188ba0cb8 100644 --- a/Gems/AtomLyIntegration/AtomImGuiTools/gem.json +++ b/Gems/AtomLyIntegration/AtomImGuiTools/gem.json @@ -2,6 +2,7 @@ "gem_name": "AtomImGuiTools", "display_name": "Atom ImGui", "license": "Apache-2.0 Or MIT", + "license_url": "https://github.com/o3de/o3de/blob/development/LICENSE.txt", "origin": "Open 3D Engine - o3de.org", "type": "Tool", "summary": "", diff --git a/Gems/AtomLyIntegration/AtomViewportDisplayIcons/Assets/seedList.seed b/Gems/AtomLyIntegration/AtomViewportDisplayIcons/Assets/seedList.seed new file mode 100644 index 0000000000..2e22bca486 --- /dev/null +++ b/Gems/AtomLyIntegration/AtomViewportDisplayIcons/Assets/seedList.seed @@ -0,0 +1,13 @@ + + + + + + + + + + + + + diff --git a/Gems/AtomLyIntegration/AtomViewportDisplayIcons/Code/Source/AtomViewportDisplayIconsSystemComponent.cpp b/Gems/AtomLyIntegration/AtomViewportDisplayIcons/Code/Source/AtomViewportDisplayIconsSystemComponent.cpp index c0ca2fe993..b96fdc9f1d 100644 --- a/Gems/AtomLyIntegration/AtomViewportDisplayIcons/Code/Source/AtomViewportDisplayIconsSystemComponent.cpp +++ b/Gems/AtomLyIntegration/AtomViewportDisplayIcons/Code/Source/AtomViewportDisplayIconsSystemComponent.cpp @@ -8,6 +8,7 @@ #include "AtomViewportDisplayIconsSystemComponent.h" +#include #include #include #include @@ -73,7 +74,7 @@ namespace AZ::Render void AtomViewportDisplayIconsSystemComponent::GetRequiredServices(AZ::ComponentDescriptor::DependencyArrayType& required) { required.push_back(AZ_CRC("RPISystem", 0xf2add773)); - required.push_back(AZ_CRC("AtomBridgeService", 0xdb816a99)); + required.push_back(AZ_CRC("AtomBridgeService", 0x92d990b5)); } void AtomViewportDisplayIconsSystemComponent::GetDependentServices([[maybe_unused]] AZ::ComponentDescriptor::DependencyArrayType& dependent) @@ -117,8 +118,7 @@ namespace AZ::Render return; } - auto perViewportDynamicDrawInterface = - AtomBridge::PerViewportDynamicDraw::Get(); + auto perViewportDynamicDrawInterface = AtomBridge::PerViewportDynamicDraw::Get(); if (!perViewportDynamicDrawInterface) { return; @@ -131,7 +131,7 @@ namespace AZ::Render return; } - // Find our icon, falling back on a grey placeholder if its image is unavailable + // Find our icon, falling back on a gray placeholder if its image is unavailable AZ::Data::Instance image = AZ::RPI::ImageSystemInterface::Get()->GetSystemImage(AZ::RPI::SystemImage::Grey); if (auto iconIt = m_iconData.find(drawParameters.m_icon); iconIt != m_iconData.end()) { @@ -172,13 +172,16 @@ namespace AZ::Render } else if (drawParameters.m_positionSpace == CoordinateSpace::WorldSpace) { + // Calculate the ndc point (0.0-1.0 range) including depth + const AZ::Vector3 ndcPoint = AzFramework::WorldToScreenNdc( + drawParameters.m_position, viewportContext->GetCameraViewMatrixAsMatrix3x4(), + viewportContext->GetCameraProjectionMatrix()); + // Calculate our screen space position using the viewport size // We want this instead of RenderViewportWidget::WorldToScreen which works in QWidget virtual coordinate space - AzFramework::ScreenPoint position = AzFramework::WorldToScreen( - drawParameters.m_position, viewportContext->GetCameraViewMatrix(), viewportContext->GetCameraProjectionMatrix(), - viewportSize); - screenPosition.SetX(aznumeric_cast(position.m_x)); - screenPosition.SetY(aznumeric_cast(position.m_y)); + const AzFramework::ScreenPoint screenPoint = AzFramework::ScreenPointFromNdc(AZ::Vector3ToVector2(ndcPoint), viewportSize); + + screenPosition = AzFramework::Vector3FromScreenPoint(screenPoint, ndcPoint.GetZ()); } struct Vertex @@ -210,7 +213,12 @@ namespace AZ::Render createVertex(-0.5f, 0.5f, 0.f, 1.f) }; AZStd::array indices = {0, 1, 2, 0, 2, 3}; - dynamicDraw->DrawIndexed(&vertices, static_cast(vertices.size()), &indices, static_cast(indices.size()), RHI::IndexFormat::Uint16, drawSrg); + + dynamicDraw->SetSortKey( + aznumeric_cast(screenPosition.GetZ() * aznumeric_cast(AZStd::numeric_limits::max()))); + dynamicDraw->DrawIndexed( + &vertices, static_cast(vertices.size()), &indices, static_cast(indices.size()), RHI::IndexFormat::Uint16, + drawSrg); } QString AtomViewportDisplayIconsSystemComponent::FindAssetPath(const QString& path) const @@ -354,7 +362,7 @@ namespace AZ::Render { // Once the shader is loaded, register it with the dynamic draw context Data::Asset shaderAsset = asset; - AtomBridge::PerViewportDynamicDraw::Get()->RegisterDynamicDrawContext(m_drawContextName, [shaderAsset](RPI::Ptr drawContext) + AtomBridge::PerViewportDynamicDraw::Get()->RegisterDynamicDrawContext(m_drawContextName, [shaderAsset](RPI::Ptr dynamicDraw) { AZ_Assert(shaderAsset->IsReady(), "Attempting to register the AtomViewportDisplayIconsSystemComponent" " dynamic draw context before the shader asset is loaded. The shader should be loaded first" @@ -362,12 +370,11 @@ namespace AZ::Render " will be executed during scene processing and there may be multiple scenes executing in parallel."); Data::Instance shader = RPI::Shader::FindOrCreate(shaderAsset); - drawContext->InitShader(shader); - drawContext->InitVertexFormat( - { {"POSITION", RHI::Format::R32G32B32_FLOAT}, - {"COLOR", RHI::Format::R8G8B8A8_UNORM}, - {"TEXCOORD", RHI::Format::R32G32_FLOAT} }); - drawContext->EndInit(); + dynamicDraw->InitShader(shader); + dynamicDraw->InitVertexFormat({ { "POSITION", RHI::Format::R32G32B32_FLOAT }, + { "COLOR", RHI::Format::R8G8B8A8_UNORM }, + { "TEXCOORD", RHI::Format::R32G32_FLOAT } }); + dynamicDraw->EndInit(); }); m_drawContextRegistered = true; diff --git a/Gems/AtomLyIntegration/AtomViewportDisplayIcons/gem.json b/Gems/AtomLyIntegration/AtomViewportDisplayIcons/gem.json index a2a7ba4b77..5a0763e0da 100644 --- a/Gems/AtomLyIntegration/AtomViewportDisplayIcons/gem.json +++ b/Gems/AtomLyIntegration/AtomViewportDisplayIcons/gem.json @@ -2,6 +2,7 @@ "gem_name": "AtomViewportDisplayIcons", "display_name": "Atom Viewport Display Icons", "license": "Apache-2.0 Or MIT", + "license_url": "https://github.com/o3de/o3de/blob/development/LICENSE.txt", "origin": "Open 3D Engine - o3de.org", "type": "Code", "summary": "", diff --git a/Gems/AtomLyIntegration/AtomViewportDisplayInfo/Code/Source/AtomViewportDisplayInfoSystemComponent.cpp b/Gems/AtomLyIntegration/AtomViewportDisplayInfo/Code/Source/AtomViewportDisplayInfoSystemComponent.cpp index 91844c9b2f..0b11437620 100644 --- a/Gems/AtomLyIntegration/AtomViewportDisplayInfo/Code/Source/AtomViewportDisplayInfoSystemComponent.cpp +++ b/Gems/AtomLyIntegration/AtomViewportDisplayInfo/Code/Source/AtomViewportDisplayInfoSystemComponent.cpp @@ -285,13 +285,19 @@ namespace AZ::Render const double frameIntervalSeconds = m_fpsInterval.count(); + auto ClampedFloatDisplay = [](double value, const char* format) -> AZStd::string + { + constexpr float upperLimit = 10000.0f; + return value > upperLimit ? "inf" : AZStd::string::format(format, value); + }; + DrawLine( AZStd::string::format( - "FPS %.1f [%.0f..%.0f], %.1fms/frame, avg over %.1fs", - averageFPS, - minFPS, - maxFPS, - averageFrameMs, + "FPS %s [%s..%s], %sms/frame, avg over %.1fs", + ClampedFloatDisplay(averageFPS, "%.1f").c_str(), + ClampedFloatDisplay(minFPS, "%.0f").c_str(), + ClampedFloatDisplay(maxFPS, "%.0f").c_str(), + ClampedFloatDisplay(averageFrameMs, "%.1f").c_str(), frameIntervalSeconds), AZ::Colors::Yellow); } diff --git a/Gems/AtomLyIntegration/AtomViewportDisplayInfo/gem.json b/Gems/AtomLyIntegration/AtomViewportDisplayInfo/gem.json index be5cc96f95..639d93d301 100644 --- a/Gems/AtomLyIntegration/AtomViewportDisplayInfo/gem.json +++ b/Gems/AtomLyIntegration/AtomViewportDisplayInfo/gem.json @@ -2,6 +2,7 @@ "gem_name": "AtomViewportDisplayInfo", "display_name": "Atom Viewport Display Info", "license": "Apache-2.0 Or MIT", + "license_url": "https://github.com/o3de/o3de/blob/development/LICENSE.txt", "origin": "Open 3D Engine - o3de.org", "type": "Code", "summary": "", diff --git a/Gems/AtomLyIntegration/CommonFeatures/Assets/Objects/Lucy/Lucy_Curvature.tif b/Gems/AtomLyIntegration/CommonFeatures/Assets/Objects/Hermanubis/Hermanubis_Curvature.tif similarity index 100% rename from Gems/AtomLyIntegration/CommonFeatures/Assets/Objects/Lucy/Lucy_Curvature.tif rename to Gems/AtomLyIntegration/CommonFeatures/Assets/Objects/Hermanubis/Hermanubis_Curvature.tif diff --git a/Gems/AtomLyIntegration/CommonFeatures/Assets/Objects/Hermanubis/Hermanubis_High.fbx b/Gems/AtomLyIntegration/CommonFeatures/Assets/Objects/Hermanubis/Hermanubis_High.fbx new file mode 100644 index 0000000000..0625c89874 --- /dev/null +++ b/Gems/AtomLyIntegration/CommonFeatures/Assets/Objects/Hermanubis/Hermanubis_High.fbx @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:d72cec207a7677ba027eac72f41285907237e04a45ebacf64341de86fc6f022d +size 159115308 diff --git a/Gems/AtomLyIntegration/CommonFeatures/Assets/Objects/Lucy/Lucy_Normal.png b/Gems/AtomLyIntegration/CommonFeatures/Assets/Objects/Hermanubis/Hermanubis_Normal.png similarity index 100% rename from Gems/AtomLyIntegration/CommonFeatures/Assets/Objects/Lucy/Lucy_Normal.png rename to Gems/AtomLyIntegration/CommonFeatures/Assets/Objects/Hermanubis/Hermanubis_Normal.png diff --git a/Gems/AtomLyIntegration/CommonFeatures/Assets/Objects/Lucy/Lucy_Stone_BaseColor.png b/Gems/AtomLyIntegration/CommonFeatures/Assets/Objects/Hermanubis/Hermanubis_Stone_BaseColor.png similarity index 100% rename from Gems/AtomLyIntegration/CommonFeatures/Assets/Objects/Lucy/Lucy_Stone_BaseColor.png rename to Gems/AtomLyIntegration/CommonFeatures/Assets/Objects/Hermanubis/Hermanubis_Stone_BaseColor.png diff --git a/Gems/AtomLyIntegration/CommonFeatures/Assets/Objects/Lucy/Lucy_ao.tif b/Gems/AtomLyIntegration/CommonFeatures/Assets/Objects/Hermanubis/Hermanubis_ao.tif similarity index 100% rename from Gems/AtomLyIntegration/CommonFeatures/Assets/Objects/Lucy/Lucy_ao.tif rename to Gems/AtomLyIntegration/CommonFeatures/Assets/Objects/Hermanubis/Hermanubis_ao.tif diff --git a/Gems/AtomLyIntegration/CommonFeatures/Assets/Objects/Hermanubis/Hermanubis_brass.material b/Gems/AtomLyIntegration/CommonFeatures/Assets/Objects/Hermanubis/Hermanubis_brass.material new file mode 100644 index 0000000000..4ad325b086 --- /dev/null +++ b/Gems/AtomLyIntegration/CommonFeatures/Assets/Objects/Hermanubis/Hermanubis_brass.material @@ -0,0 +1,35 @@ +{ + "description": "", + "parentMaterial": "Materials/Presets/PBR/metal_brass.material", + "materialType": "Materials/Types/StandardPBR.materialtype", + "materialTypeVersion": 4, + "properties": { + "baseColor": { + "factor": 1.0, + "textureBlendMode": "Lerp", + "textureMap": "Hermanubis_bronze_BaseColor.png", + "textureMapUv": "Unwrapped" + }, + "general": { + "applySpecularAA": true + }, + "metallic": { + "textureMap": "Hermanubis_bronze_Metallic.png", + "textureMapUv": "Unwrapped" + }, + "normal": { + "flipY": true, + "textureMap": "Hermanubis_Normal.png", + "textureMapUv": "Unwrapped" + }, + "occlusion": { + "diffuseTextureMap": "Hermanubis_ao.tif", + "diffuseTextureMapUv": "Unwrapped" + }, + "roughness": { + "textureMap": "Hermanubis_bronze_Roughness.png", + "textureMapUv": "Unwrapped", + "upperBound": 0.6767677068710327 + } + } +} \ No newline at end of file diff --git a/Gems/AtomLyIntegration/CommonFeatures/Assets/Objects/Lucy/Lucy_brass_cavity.tif b/Gems/AtomLyIntegration/CommonFeatures/Assets/Objects/Hermanubis/Hermanubis_brass_cavity.tif similarity index 100% rename from Gems/AtomLyIntegration/CommonFeatures/Assets/Objects/Lucy/Lucy_brass_cavity.tif rename to Gems/AtomLyIntegration/CommonFeatures/Assets/Objects/Hermanubis/Hermanubis_brass_cavity.tif diff --git a/Gems/AtomLyIntegration/CommonFeatures/Assets/Objects/Lucy/Lucy_bronze_BaseColor.png b/Gems/AtomLyIntegration/CommonFeatures/Assets/Objects/Hermanubis/Hermanubis_bronze_BaseColor.png similarity index 100% rename from Gems/AtomLyIntegration/CommonFeatures/Assets/Objects/Lucy/Lucy_bronze_BaseColor.png rename to Gems/AtomLyIntegration/CommonFeatures/Assets/Objects/Hermanubis/Hermanubis_bronze_BaseColor.png diff --git a/Gems/AtomLyIntegration/CommonFeatures/Assets/Objects/Lucy/Lucy_bronze_Metallic.png b/Gems/AtomLyIntegration/CommonFeatures/Assets/Objects/Hermanubis/Hermanubis_bronze_Metallic.png similarity index 100% rename from Gems/AtomLyIntegration/CommonFeatures/Assets/Objects/Lucy/Lucy_bronze_Metallic.png rename to Gems/AtomLyIntegration/CommonFeatures/Assets/Objects/Hermanubis/Hermanubis_bronze_Metallic.png diff --git a/Gems/AtomLyIntegration/CommonFeatures/Assets/Objects/Lucy/Lucy_bronze_Roughness.png b/Gems/AtomLyIntegration/CommonFeatures/Assets/Objects/Hermanubis/Hermanubis_bronze_Roughness.png similarity index 100% rename from Gems/AtomLyIntegration/CommonFeatures/Assets/Objects/Lucy/Lucy_bronze_Roughness.png rename to Gems/AtomLyIntegration/CommonFeatures/Assets/Objects/Hermanubis/Hermanubis_bronze_Roughness.png diff --git a/Gems/AtomLyIntegration/CommonFeatures/Assets/Objects/Lucy/Lucy_convexity.tif b/Gems/AtomLyIntegration/CommonFeatures/Assets/Objects/Hermanubis/Hermanubis_convexity.tif similarity index 100% rename from Gems/AtomLyIntegration/CommonFeatures/Assets/Objects/Lucy/Lucy_convexity.tif rename to Gems/AtomLyIntegration/CommonFeatures/Assets/Objects/Hermanubis/Hermanubis_convexity.tif diff --git a/Gems/AtomLyIntegration/CommonFeatures/Assets/Objects/Hermanubis/Hermanubis_low.fbx b/Gems/AtomLyIntegration/CommonFeatures/Assets/Objects/Hermanubis/Hermanubis_low.fbx new file mode 100644 index 0000000000..79960433dd --- /dev/null +++ b/Gems/AtomLyIntegration/CommonFeatures/Assets/Objects/Hermanubis/Hermanubis_low.fbx @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:4c9d1030b9467b58d640fbedf1bc58ab9a5f7d68811b2452dd8d60114287b731 +size 12410812 diff --git a/Gems/AtomLyIntegration/CommonFeatures/Assets/Objects/Hermanubis/Hermanubis_stone.material b/Gems/AtomLyIntegration/CommonFeatures/Assets/Objects/Hermanubis/Hermanubis_stone.material new file mode 100644 index 0000000000..1ba59a50c5 --- /dev/null +++ b/Gems/AtomLyIntegration/CommonFeatures/Assets/Objects/Hermanubis/Hermanubis_stone.material @@ -0,0 +1,53 @@ +{ + "description": "", + "parentMaterial": "Materials/Presets/PBR/metal_brass.material", + "materialType": "Materials/Types/StandardPBR.materialtype", + "materialTypeVersion": 4, + "properties": { + "baseColor": { + "color": [ + 1.0, + 1.0, + 1.0, + 1.0 + ], + "factor": 1.0, + "textureBlendMode": "Lerp", + "textureMap": "Hermanubis_Stone_BaseColor.png", + "textureMapUv": "Unwrapped" + }, + "clearCoat": { + "roughness": 0.10000000149011612 + }, + "general": { + "applySpecularAA": true + }, + "irradiance": { + "color": [ + 0.7304646372795105, + 0.6938735246658325, + 0.6866865158081055, + 1.0 + ] + }, + "metallic": { + "factor": 0.0 + }, + "normal": { + "flipY": true, + "textureMap": "Hermanubis_Normal.png", + "textureMapUv": "Unwrapped" + }, + "occlusion": { + "diffuseTextureMap": "Hermanubis_ao.tif", + "diffuseTextureMapUv": "Unwrapped" + }, + "roughness": { + "factor": 1.0, + "lowerBound": 0.15000000596046448, + "textureMap": "Hermanubis_bronze_Roughness.png", + "textureMapUv": "Unwrapped", + "upperBound": 0.7300000190734863 + } + } +} \ No newline at end of file diff --git a/Gems/AtomLyIntegration/CommonFeatures/Assets/Objects/Lucy/Lucy_thickness.tif b/Gems/AtomLyIntegration/CommonFeatures/Assets/Objects/Hermanubis/Hermanubis_thickness.tif similarity index 100% rename from Gems/AtomLyIntegration/CommonFeatures/Assets/Objects/Lucy/Lucy_thickness.tif rename to Gems/AtomLyIntegration/CommonFeatures/Assets/Objects/Hermanubis/Hermanubis_thickness.tif diff --git a/Gems/AtomLyIntegration/CommonFeatures/Assets/Objects/Lucy/Lucy_High.fbx b/Gems/AtomLyIntegration/CommonFeatures/Assets/Objects/Lucy/Lucy_High.fbx deleted file mode 100644 index b87971bf6d..0000000000 --- a/Gems/AtomLyIntegration/CommonFeatures/Assets/Objects/Lucy/Lucy_High.fbx +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:00e19e317613be5420fd78bac1159e66d1c4deeb1f32cd4fc8c20b1ea3a5ead1 -size 153114272 diff --git a/Gems/AtomLyIntegration/CommonFeatures/Assets/Objects/Lucy/Lucy_low.fbx b/Gems/AtomLyIntegration/CommonFeatures/Assets/Objects/Lucy/Lucy_low.fbx deleted file mode 100644 index 46f5d1cfbd..0000000000 --- a/Gems/AtomLyIntegration/CommonFeatures/Assets/Objects/Lucy/Lucy_low.fbx +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:6a4a65d139a6088dd4ac34f3ba3f6a7a98b8fe9545150ee7d9879fbc2a55d8d4 -size 9022128 diff --git a/Gems/AtomLyIntegration/CommonFeatures/Assets/Objects/Lucy/lucy_brass.material b/Gems/AtomLyIntegration/CommonFeatures/Assets/Objects/Lucy/lucy_brass.material deleted file mode 100644 index 6e490cb0b1..0000000000 --- a/Gems/AtomLyIntegration/CommonFeatures/Assets/Objects/Lucy/lucy_brass.material +++ /dev/null @@ -1,41 +0,0 @@ -{ - "description": "", - "materialType": "Materials/Types/StandardPBR.materialtype", - "parentMaterial": "Materials/Presets/PBR/metal_brass.material", - "propertyLayoutVersion": 3, - "properties": { - "occlusion": { - "diffuseTextureMap": "Objects/Lucy/Lucy_ao.tif", - "diffuseTextureMapUv": "Unwrapped" - }, - "baseColor": { - "color": [ - 0.6745098233222961, - 0.48627451062202456, - 0.19607843458652497, - 1.0 - ], - "factor": 1.0, - "textureBlendMode": "Lerp", - "textureMap": "Objects/Lucy/Lucy_bronze_BaseColor.png", - "textureMapUv": "Unwrapped" - }, - "general": { - "applySpecularAA": true - }, - "metallic": { - "textureMap": "Objects/Lucy/Lucy_bronze_Metallic.png", - "textureMapUv": "Unwrapped" - }, - "normal": { - "flipY": true, - "textureMap": "Objects/Lucy/Lucy_Normal.png", - "textureMapUv": "Unwrapped" - }, - "roughness": { - "textureMap": "Objects/Lucy/Lucy_bronze_Roughness.png", - "textureMapUv": "Unwrapped", - "upperBound": 0.6767677068710327 - } - } -} \ No newline at end of file diff --git a/Gems/AtomLyIntegration/CommonFeatures/Assets/Objects/Lucy/lucy_stone.material b/Gems/AtomLyIntegration/CommonFeatures/Assets/Objects/Lucy/lucy_stone.material deleted file mode 100644 index a0e54d9d0e..0000000000 --- a/Gems/AtomLyIntegration/CommonFeatures/Assets/Objects/Lucy/lucy_stone.material +++ /dev/null @@ -1,53 +0,0 @@ -{ - "description": "", - "materialType": "Materials/Types/StandardPBR.materialtype", - "parentMaterial": "Materials/Presets/PBR/metal_brass.material", - "propertyLayoutVersion": 3, - "properties": { - "occlusion": { - "diffuseTextureMap": "Objects/Lucy/Lucy_ao.tif", - "diffuseTextureMapUv": "Unwrapped" - }, - "baseColor": { - "color": [ - 1.0, - 1.0, - 1.0, - 1.0 - ], - "factor": 1.0, - "textureBlendMode": "Lerp", - "textureMap": "Objects/Lucy/Lucy_Stone_BaseColor.png", - "textureMapUv": "Unwrapped" - }, - "clearCoat": { - "roughness": 0.10000000149011612 - }, - "general": { - "applySpecularAA": true - }, - "irradiance": { - "color": [ - 0.7304646372795105, - 0.6938735246658325, - 0.6866865158081055, - 1.0 - ] - }, - "metallic": { - "factor": 0.0 - }, - "normal": { - "flipY": true, - "textureMap": "Objects/Lucy/Lucy_Normal.png", - "textureMapUv": "Unwrapped" - }, - "roughness": { - "factor": 1.0, - "lowerBound": 0.15000000596046449, - "textureMap": "Objects/Lucy/Lucy_bronze_Roughness.png", - "textureMapUv": "Unwrapped", - "upperBound": 0.7300000190734863 - } - } -} \ No newline at end of file diff --git a/Gems/AtomLyIntegration/CommonFeatures/Assets/seedList.seed b/Gems/AtomLyIntegration/CommonFeatures/Assets/seedList.seed new file mode 100644 index 0000000000..157172ad34 --- /dev/null +++ b/Gems/AtomLyIntegration/CommonFeatures/Assets/seedList.seed @@ -0,0 +1,45 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/Gems/AtomLyIntegration/CommonFeatures/Code/CMakeLists.txt b/Gems/AtomLyIntegration/CommonFeatures/Code/CMakeLists.txt index 95331a2f3f..7b685ece13 100644 --- a/Gems/AtomLyIntegration/CommonFeatures/Code/CMakeLists.txt +++ b/Gems/AtomLyIntegration/CommonFeatures/Code/CMakeLists.txt @@ -111,6 +111,7 @@ if(PAL_TRAIT_BUILD_HOST_TOOLS) RUNTIME_DEPENDENCIES Gem::Atom_RPI.Editor Gem::Atom_Feature_Common.Editor + Gem::AtomToolsFramework.Editor Legacy::EditorCommon ) diff --git a/Gems/AtomLyIntegration/CommonFeatures/Code/Include/AtomLyIntegration/CommonFeatures/CoreLights/AreaLightBus.h b/Gems/AtomLyIntegration/CommonFeatures/Code/Include/AtomLyIntegration/CommonFeatures/CoreLights/AreaLightBus.h index 72c4ef97a8..b9c62e6fe2 100644 --- a/Gems/AtomLyIntegration/CommonFeatures/Code/Include/AtomLyIntegration/CommonFeatures/CoreLights/AreaLightBus.h +++ b/Gems/AtomLyIntegration/CommonFeatures/Code/Include/AtomLyIntegration/CommonFeatures/CoreLights/AreaLightBus.h @@ -132,6 +132,13 @@ namespace AZ //! Sets the Esm exponent. Higher values produce a steeper falloff between light and shadow. virtual void SetEsmExponent(float exponent) = 0; + //! Reduces acne by biasing the shadowmap lookup along the geometric normal. + //! @return Returns the amount of bias to apply. + virtual float GetNormalShadowBias() const = 0; + + //! Reduces acne by biasing the shadowmap lookup along the geometric normal. + //! @param normalShadowBias Sets the amount of normal shadow bias to apply. + virtual void SetNormalShadowBias(float normalShadowBias) = 0; }; //! The EBus for requests to for setting and getting light component properties. diff --git a/Gems/AtomLyIntegration/CommonFeatures/Code/Include/AtomLyIntegration/CommonFeatures/CoreLights/AreaLightComponentConfig.h b/Gems/AtomLyIntegration/CommonFeatures/Code/Include/AtomLyIntegration/CommonFeatures/CoreLights/AreaLightComponentConfig.h index c76c922385..130e066e1a 100644 --- a/Gems/AtomLyIntegration/CommonFeatures/Code/Include/AtomLyIntegration/CommonFeatures/CoreLights/AreaLightComponentConfig.h +++ b/Gems/AtomLyIntegration/CommonFeatures/Code/Include/AtomLyIntegration/CommonFeatures/CoreLights/AreaLightComponentConfig.h @@ -57,6 +57,7 @@ namespace AZ // Shadows (only used for supported shapes) bool m_enableShadow = false; float m_bias = 0.1f; + float m_normalShadowBias = 0.0f; ShadowmapSize m_shadowmapMaxSize = ShadowmapSize::Size256; ShadowFilterMethod m_shadowFilterMethod = ShadowFilterMethod::None; uint16_t m_filteringSampleCount = 12; diff --git a/Gems/AtomLyIntegration/CommonFeatures/Code/Include/AtomLyIntegration/CommonFeatures/CoreLights/DirectionalLightBus.h b/Gems/AtomLyIntegration/CommonFeatures/Code/Include/AtomLyIntegration/CommonFeatures/CoreLights/DirectionalLightBus.h index 3cafc183a5..ebccccadcd 100644 --- a/Gems/AtomLyIntegration/CommonFeatures/Code/Include/AtomLyIntegration/CommonFeatures/CoreLights/DirectionalLightBus.h +++ b/Gems/AtomLyIntegration/CommonFeatures/Code/Include/AtomLyIntegration/CommonFeatures/CoreLights/DirectionalLightBus.h @@ -184,6 +184,14 @@ namespace AZ //! Reduces acne by biasing the shadowmap lookup along the geometric normal. //! @param normalShadowBias Sets the amount of normal shadow bias to apply. virtual void SetNormalShadowBias(float normalShadowBias) = 0; + + //! Gets whether the directional shadow map has cascade blending enabled. + //! This smooths out the border between cascades at the cost of some performance in the blend area. + virtual bool GetCascadeBlendingEnabled() const = 0; + + //! Sets whether the directional shadow map has cascade blending enabled. + //! @param enable flag specifying whether to enable cascade blending. + virtual void SetCascadeBlendingEnabled(bool enable) = 0; }; using DirectionalLightRequestBus = EBus; diff --git a/Gems/AtomLyIntegration/CommonFeatures/Code/Include/AtomLyIntegration/CommonFeatures/CoreLights/DirectionalLightComponentConfig.h b/Gems/AtomLyIntegration/CommonFeatures/Code/Include/AtomLyIntegration/CommonFeatures/CoreLights/DirectionalLightComponentConfig.h index 92d5cc9ac0..ca872d78d6 100644 --- a/Gems/AtomLyIntegration/CommonFeatures/Code/Include/AtomLyIntegration/CommonFeatures/CoreLights/DirectionalLightComponentConfig.h +++ b/Gems/AtomLyIntegration/CommonFeatures/Code/Include/AtomLyIntegration/CommonFeatures/CoreLights/DirectionalLightComponentConfig.h @@ -115,6 +115,9 @@ namespace AZ //! Reduces shadow acne by applying a small amount of offset along shadow-space z. float m_shadowBias = 0.0f; + // If true, sample between two adjacent shadow map cascades in a small boundary area to smooth out the transition. + bool m_cascadeBlendingEnabled = false; + bool IsSplitManual() const; bool IsSplitAutomatic() const; bool IsCascadeCorrectionDisabled() const; diff --git a/Gems/AtomLyIntegration/CommonFeatures/Code/Source/Animation/AttachmentComponent.cpp b/Gems/AtomLyIntegration/CommonFeatures/Code/Source/Animation/AttachmentComponent.cpp index ee66518779..e8cf03d26e 100644 --- a/Gems/AtomLyIntegration/CommonFeatures/Code/Source/Animation/AttachmentComponent.cpp +++ b/Gems/AtomLyIntegration/CommonFeatures/Code/Source/Animation/AttachmentComponent.cpp @@ -10,7 +10,6 @@ #include #include #include -#include #include #include #include @@ -58,13 +57,17 @@ namespace AZ behaviorContext->EBus("AttachmentComponentRequestBus") ->Event("Attach", &LmbrCentral::AttachmentComponentRequestBus::Events::Attach) ->Event("Detach", &LmbrCentral::AttachmentComponentRequestBus::Events::Detach) - ->Event("SetAttachmentOffset", &LmbrCentral::AttachmentComponentRequestBus::Events::SetAttachmentOffset); + ->Event("SetAttachmentOffset", &LmbrCentral::AttachmentComponentRequestBus::Events::SetAttachmentOffset) + ->Event("GetJointName", &LmbrCentral::AttachmentComponentRequestBus::Events::GetJointName) + ->Event("GetTargetEntityId", &LmbrCentral::AttachmentComponentRequestBus::Events::GetTargetEntityId) + ->Event("GetOffset", &LmbrCentral::AttachmentComponentRequestBus::Events::GetOffset); behaviorContext->EBus("AttachmentComponentNotificationBus") ->Handler(); } } + void AttachmentComponent::Reflect(AZ::ReflectContext* context) { AttachmentConfiguration::Reflect(context); diff --git a/Gems/AtomLyIntegration/CommonFeatures/Code/Source/CoreLights/AreaLightComponentConfig.cpp b/Gems/AtomLyIntegration/CommonFeatures/Code/Source/CoreLights/AreaLightComponentConfig.cpp index f0418a5024..91f8f1aa36 100644 --- a/Gems/AtomLyIntegration/CommonFeatures/Code/Source/CoreLights/AreaLightComponentConfig.cpp +++ b/Gems/AtomLyIntegration/CommonFeatures/Code/Source/CoreLights/AreaLightComponentConfig.cpp @@ -34,6 +34,7 @@ namespace AZ // Shadows ->Field("Enable Shadow", &AreaLightComponentConfig::m_enableShadow) ->Field("Shadow Bias", &AreaLightComponentConfig::m_bias) + ->Field("Normal Shadow Bias", &AreaLightComponentConfig::m_normalShadowBias) ->Field("Shadowmap Max Size", &AreaLightComponentConfig::m_shadowmapMaxSize) ->Field("Shadow Filter Method", &AreaLightComponentConfig::m_shadowFilterMethod) ->Field("Filtering Sample Count", &AreaLightComponentConfig::m_filteringSampleCount) diff --git a/Gems/AtomLyIntegration/CommonFeatures/Code/Source/CoreLights/AreaLightComponentController.cpp b/Gems/AtomLyIntegration/CommonFeatures/Code/Source/CoreLights/AreaLightComponentController.cpp index 36cb2a7f5a..d67548c3e9 100644 --- a/Gems/AtomLyIntegration/CommonFeatures/Code/Source/CoreLights/AreaLightComponentController.cpp +++ b/Gems/AtomLyIntegration/CommonFeatures/Code/Source/CoreLights/AreaLightComponentController.cpp @@ -70,6 +70,8 @@ namespace AZ::Render ->Event("SetEnableShadow", &AreaLightRequestBus::Events::SetEnableShadow) ->Event("GetShadowBias", &AreaLightRequestBus::Events::GetShadowBias) ->Event("SetShadowBias", &AreaLightRequestBus::Events::SetShadowBias) + ->Event("GetNormalShadowBias", &AreaLightRequestBus::Events::GetNormalShadowBias) + ->Event("SetNormalShadowBias", &AreaLightRequestBus::Events::SetNormalShadowBias) ->Event("GetShadowmapMaxSize", &AreaLightRequestBus::Events::GetShadowmapMaxSize) ->Event("SetShadowmapMaxSize", &AreaLightRequestBus::Events::SetShadowmapMaxSize) ->Event("GetShadowFilterMethod", &AreaLightRequestBus::Events::GetShadowFilterMethod) @@ -91,6 +93,7 @@ namespace AZ::Render ->VirtualProperty("ShadowsEnabled", "GetEnableShadow", "SetEnableShadow") ->VirtualProperty("ShadowBias", "GetShadowBias", "SetShadowBias") + ->VirtualProperty("NormalShadowBias", "GetNormalShadowBias", "SetNormalShadowBias") ->VirtualProperty("ShadowmapMaxSize", "GetShadowmapMaxSize", "SetShadowmapMaxSize") ->VirtualProperty("ShadowFilterMethod", "GetShadowFilterMethod", "SetShadowFilterMethod") ->VirtualProperty("FilteringSampleCount", "GetFilteringSampleCount", "SetFilteringSampleCount") @@ -258,6 +261,11 @@ namespace AZ::Render m_lightShapeDelegate->SetPhotometricUnit(m_configuration.m_intensityMode); m_lightShapeDelegate->SetIntensity(m_configuration.m_intensity); } + + if (m_configuration.m_attenuationRadiusMode == LightAttenuationRadiusMode::Automatic) + { + AttenuationRadiusChanged(); + } } void AreaLightComponentController::ChromaChanged() @@ -302,6 +310,7 @@ namespace AZ::Render if (m_configuration.m_enableShadow) { m_lightShapeDelegate->SetShadowBias(m_configuration.m_bias); + m_lightShapeDelegate->SetNormalShadowBias(m_configuration.m_normalShadowBias); m_lightShapeDelegate->SetShadowmapMaxSize(m_configuration.m_shadowmapMaxSize); m_lightShapeDelegate->SetShadowFilterMethod(m_configuration.m_shadowFilterMethod); m_lightShapeDelegate->SetFilteringSampleCount(m_configuration.m_filteringSampleCount); @@ -474,6 +483,20 @@ namespace AZ::Render } } + void AreaLightComponentController::SetNormalShadowBias(float bias) + { + m_configuration.m_normalShadowBias = bias; + if (m_lightShapeDelegate) + { + m_lightShapeDelegate->SetNormalShadowBias(bias); + } + } + + float AreaLightComponentController::GetNormalShadowBias() const + { + return m_configuration.m_normalShadowBias; + } + ShadowmapSize AreaLightComponentController::GetShadowmapMaxSize() const { return m_configuration.m_shadowmapMaxSize; diff --git a/Gems/AtomLyIntegration/CommonFeatures/Code/Source/CoreLights/AreaLightComponentController.h b/Gems/AtomLyIntegration/CommonFeatures/Code/Source/CoreLights/AreaLightComponentController.h index cc6223e7e5..81299a0372 100644 --- a/Gems/AtomLyIntegration/CommonFeatures/Code/Source/CoreLights/AreaLightComponentController.h +++ b/Gems/AtomLyIntegration/CommonFeatures/Code/Source/CoreLights/AreaLightComponentController.h @@ -86,6 +86,8 @@ namespace AZ void SetFilteringSampleCount(uint32_t count) override; float GetEsmExponent() const override; void SetEsmExponent(float exponent) override; + float GetNormalShadowBias() const override; + void SetNormalShadowBias(float bias) override; void HandleDisplayEntityViewport( const AzFramework::ViewportInfo& viewportInfo, diff --git a/Gems/AtomLyIntegration/CommonFeatures/Code/Source/CoreLights/DirectionalLightComponentConfig.cpp b/Gems/AtomLyIntegration/CommonFeatures/Code/Source/CoreLights/DirectionalLightComponentConfig.cpp index 78a9cc21d1..d9f93cc825 100644 --- a/Gems/AtomLyIntegration/CommonFeatures/Code/Source/CoreLights/DirectionalLightComponentConfig.cpp +++ b/Gems/AtomLyIntegration/CommonFeatures/Code/Source/CoreLights/DirectionalLightComponentConfig.cpp @@ -40,7 +40,8 @@ namespace AZ ->Field("PcfFilteringSampleCount", &DirectionalLightComponentConfig::m_filteringSampleCount) ->Field("ShadowReceiverPlaneBiasEnabled", &DirectionalLightComponentConfig::m_receiverPlaneBiasEnabled) ->Field("Shadow Bias", &DirectionalLightComponentConfig::m_shadowBias) - ->Field("Normal Shadow Bias", &DirectionalLightComponentConfig::m_normalShadowBias); + ->Field("Normal Shadow Bias", &DirectionalLightComponentConfig::m_normalShadowBias) + ->Field("CascadeBlendingEnabled", &DirectionalLightComponentConfig::m_cascadeBlendingEnabled); } } @@ -113,8 +114,7 @@ namespace AZ bool DirectionalLightComponentConfig::IsShadowPcfDisabled() const { - return !(m_shadowFilterMethod == ShadowFilterMethod::Pcf || - m_shadowFilterMethod == ShadowFilterMethod::EsmPcf); + return !(m_shadowFilterMethod == ShadowFilterMethod::Pcf); } bool DirectionalLightComponentConfig::IsEsmDisabled() const diff --git a/Gems/AtomLyIntegration/CommonFeatures/Code/Source/CoreLights/DirectionalLightComponentController.cpp b/Gems/AtomLyIntegration/CommonFeatures/Code/Source/CoreLights/DirectionalLightComponentController.cpp index e36868c4bb..ce39a32b19 100644 --- a/Gems/AtomLyIntegration/CommonFeatures/Code/Source/CoreLights/DirectionalLightComponentController.cpp +++ b/Gems/AtomLyIntegration/CommonFeatures/Code/Source/CoreLights/DirectionalLightComponentController.cpp @@ -88,6 +88,8 @@ namespace AZ ->Event("SetShadowBias", &DirectionalLightRequestBus::Events::SetShadowBias) ->Event("GetNormalShadowBias", &DirectionalLightRequestBus::Events::GetNormalShadowBias) ->Event("SetNormalShadowBias", &DirectionalLightRequestBus::Events::SetNormalShadowBias) + ->Event("GetCascadeBlendingEnabled", &DirectionalLightRequestBus::Events::GetCascadeBlendingEnabled) + ->Event("SetCascadeBlendingEnabled", &DirectionalLightRequestBus::Events::SetCascadeBlendingEnabled) ->VirtualProperty("Color", "GetColor", "SetColor") ->VirtualProperty("Intensity", "GetIntensity", "SetIntensity") ->VirtualProperty("AngularDiameter", "GetAngularDiameter", "SetAngularDiameter") @@ -104,7 +106,8 @@ namespace AZ ->VirtualProperty("FilteringSampleCount", "GetFilteringSampleCount", "SetFilteringSampleCount") ->VirtualProperty("ShadowReceiverPlaneBiasEnabled", "GetShadowReceiverPlaneBiasEnabled", "SetShadowReceiverPlaneBiasEnabled") ->VirtualProperty("ShadowBias", "GetShadowBias", "SetShadowBias") - ->VirtualProperty("NormalShadowBias", "GetNormalShadowBias", "SetNormalShadowBias"); + ->VirtualProperty("NormalShadowBias", "GetNormalShadowBias", "SetNormalShadowBias") + ->VirtualProperty("BlendBetweenCascadesEnabled", "GetCascadeBlendingEnabled", "SetCascadeBlendingEnabled"); ; } } @@ -537,6 +540,7 @@ namespace AZ SetNormalShadowBias(m_configuration.m_normalShadowBias); SetFilteringSampleCount(m_configuration.m_filteringSampleCount); SetShadowReceiverPlaneBiasEnabled(m_configuration.m_receiverPlaneBiasEnabled); + SetCascadeBlendingEnabled(m_configuration.m_cascadeBlendingEnabled); // [GFX TODO][ATOM-1726] share config for multiple light (e.g., light ID). // [GFX TODO][ATOM-2416] adapt to multiple viewports. @@ -636,5 +640,16 @@ namespace AZ m_featureProcessor->SetShadowReceiverPlaneBiasEnabled(m_lightHandle, enable); } + bool DirectionalLightComponentController::GetCascadeBlendingEnabled() const + { + return m_configuration.m_cascadeBlendingEnabled; + } + + void DirectionalLightComponentController::SetCascadeBlendingEnabled(bool enable) + { + m_configuration.m_cascadeBlendingEnabled = enable; + m_featureProcessor->SetCascadeBlendingEnabled(m_lightHandle, enable); + } + } // namespace Render } // namespace AZ diff --git a/Gems/AtomLyIntegration/CommonFeatures/Code/Source/CoreLights/DirectionalLightComponentController.h b/Gems/AtomLyIntegration/CommonFeatures/Code/Source/CoreLights/DirectionalLightComponentController.h index 9a6edda666..4aa8aed2fd 100644 --- a/Gems/AtomLyIntegration/CommonFeatures/Code/Source/CoreLights/DirectionalLightComponentController.h +++ b/Gems/AtomLyIntegration/CommonFeatures/Code/Source/CoreLights/DirectionalLightComponentController.h @@ -83,7 +83,9 @@ namespace AZ float GetShadowBias() const override; void SetShadowBias(float bias) override; float GetNormalShadowBias() const override; - void SetNormalShadowBias(float bias) override; + void SetNormalShadowBias(float bias) override; + bool GetCascadeBlendingEnabled() const override; + void SetCascadeBlendingEnabled(bool enable) override; private: friend class EditorDirectionalLightComponent; diff --git a/Gems/AtomLyIntegration/CommonFeatures/Code/Source/CoreLights/DiskLightDelegate.cpp b/Gems/AtomLyIntegration/CommonFeatures/Code/Source/CoreLights/DiskLightDelegate.cpp index ebc79abca5..f060018099 100644 --- a/Gems/AtomLyIntegration/CommonFeatures/Code/Source/CoreLights/DiskLightDelegate.cpp +++ b/Gems/AtomLyIntegration/CommonFeatures/Code/Source/CoreLights/DiskLightDelegate.cpp @@ -47,53 +47,60 @@ namespace AZ::Render return m_shapeBus->GetRadius() * GetTransform().GetUniformScale(); } - void DiskLightDelegate::DrawDebugDisplay(const Transform& transform, const Color& /*color*/, AzFramework::DebugDisplayRequests& debugDisplay, bool isSelected) const + void DiskLightDelegate::DrawDebugDisplay(const Transform& transform, [[maybe_unused]]const Color&, AzFramework::DebugDisplayRequests& debugDisplay, bool isSelected) const { - if (isSelected) + debugDisplay.PushMatrix(transform); + const float radius = GetConfig()->m_attenuationRadius; + const float shapeRadius = m_shapeBus->GetRadius(); + + auto DrawConicalFrustum = [&debugDisplay](uint32_t numRadiusLines, const Color& color, float brightness, float topRadius, float bottomRadius, float height) { - debugDisplay.PushMatrix(transform); - float radius = GetConfig()->m_attenuationRadius; + const Color displayColor = Color(color.GetAsVector3() * brightness); + debugDisplay.SetColor(displayColor); + debugDisplay.DrawWireDisk(Vector3(0.0, 0.0, height), Vector3::CreateAxisZ(), bottomRadius); - if (GetConfig()->m_enableShutters) + for (uint32_t i = 0; i < numRadiusLines; ++i) { - - float innerRadians = DegToRad(GetConfig()->m_innerShutterAngleDegrees); - float outerRadians = DegToRad(GetConfig()->m_outerShutterAngleDegrees); - - // Draw a cone using the cone angle and attenuation radius - innerRadians = GetMin(innerRadians, outerRadians); - float coneRadiusInner = sin(innerRadians) * radius; - float coneHeightInner = cos(innerRadians) * radius; - float coneRadiusOuter = sin(outerRadians) * radius; - float coneHeightOuter = cos(outerRadians) * radius; - - auto DrawConicalFrustum = [&debugDisplay](uint32_t numRadiusLines, float topRadius, float bottomRadius, float height, float brightness) - { - debugDisplay.SetColor(Color(brightness, brightness, brightness, 1.0f)); - debugDisplay.DrawWireDisk(Vector3(0.0, 0.0, height), Vector3::CreateAxisZ(), bottomRadius); - - for (uint32_t i = 0; i < numRadiusLines; ++i) - { - float radiusLineAngle = float(i) / numRadiusLines * Constants::TwoPi; - debugDisplay.DrawLine( - Vector3(cos(radiusLineAngle) * topRadius, sin(radiusLineAngle) * topRadius, 0), - Vector3(cos(radiusLineAngle) * bottomRadius, sin(radiusLineAngle) * bottomRadius, height) - ); - } - }; - - DrawConicalFrustum(16, m_shapeBus->GetRadius(), m_shapeBus->GetRadius() + coneRadiusInner, coneHeightInner, 1.0f); - DrawConicalFrustum(16, m_shapeBus->GetRadius(), m_shapeBus->GetRadius() + coneRadiusOuter, coneHeightOuter, 0.65f); - + float radiusLineAngle = float(i) / numRadiusLines * Constants::TwoPi; + float cosAngle = cos(radiusLineAngle); + float sinAngle = sin(radiusLineAngle); + debugDisplay.DrawLine( + Vector3(cosAngle * topRadius, sinAngle * topRadius, 0), + Vector3(cosAngle * bottomRadius,sinAngle * bottomRadius, height) + ); } - else - { - debugDisplay.DrawWireDisk(Vector3::CreateZero(), Vector3::CreateAxisZ(), radius); - debugDisplay.DrawArc(Vector3::CreateZero(), radius, 270.0f, 180.0f, 3.0f, 0); - debugDisplay.DrawArc(Vector3::CreateZero(), radius, 0.0f, 180.0f, 3.0f, 1); - } - debugDisplay.PopMatrix(); + }; + + const Color coneColor = isSelected ? Color::CreateOne() : Color(0.0f, 0.75f, 0.75f, 1.0); + const uint32_t innerConeLines = 8; + float innerRadians, outerRadians; + if (GetConfig()->m_enableShutters) + { // With shutters enabled, draw inner and outer debug display frustums + innerRadians = DegToRad(GetConfig()->m_innerShutterAngleDegrees); + outerRadians = DegToRad(GetConfig()->m_outerShutterAngleDegrees); + + // Draw a cone using the cone angle and attenuation radius + innerRadians = GetMin(innerRadians, outerRadians); + + float coneRadiusOuter = sin(outerRadians) * radius; + float coneHeightOuter = cos(outerRadians) * radius; + + // Outer cone frustum 'faded' debug cone + const uint32_t outerConeLines = 9; + DrawConicalFrustum(outerConeLines, coneColor, 0.75f, shapeRadius, shapeRadius + coneRadiusOuter, coneHeightOuter); } + else + { // Generic debug display frustum + const float coneAngle = 25.0f; + innerRadians = DegToRad(coneAngle); // 25 degrees debug display + } + + // Inner cone frustum + float coneRadiusInner = sin(innerRadians) * radius; + float coneHeightInner = cos(innerRadians) * radius; + DrawConicalFrustum(innerConeLines, coneColor, 1.0f, shapeRadius, shapeRadius + coneRadiusInner, coneHeightInner); + + debugDisplay.PopMatrix(); } void DiskLightDelegate::SetEnableShutters(bool enabled) @@ -131,6 +138,14 @@ namespace AZ::Render } } + void DiskLightDelegate::SetNormalShadowBias(float bias) + { + if (GetShadowsEnabled() && GetLightHandle().IsValid()) + { + GetFeatureProcessor()->SetNormalShadowBias(GetLightHandle(), bias); + } + } + void DiskLightDelegate::SetShadowmapMaxSize(ShadowmapSize size) { if (GetShadowsEnabled() && GetLightHandle().IsValid()) diff --git a/Gems/AtomLyIntegration/CommonFeatures/Code/Source/CoreLights/DiskLightDelegate.h b/Gems/AtomLyIntegration/CommonFeatures/Code/Source/CoreLights/DiskLightDelegate.h index 2be782c69c..c19a8d37ae 100644 --- a/Gems/AtomLyIntegration/CommonFeatures/Code/Source/CoreLights/DiskLightDelegate.h +++ b/Gems/AtomLyIntegration/CommonFeatures/Code/Source/CoreLights/DiskLightDelegate.h @@ -46,6 +46,7 @@ namespace AZ void SetShadowFilterMethod(ShadowFilterMethod method) override; void SetFilteringSampleCount(uint32_t count) override; void SetEsmExponent(float exponent) override; + void SetNormalShadowBias(float bias) override; private: diff --git a/Gems/AtomLyIntegration/CommonFeatures/Code/Source/CoreLights/EditorAreaLightComponent.cpp b/Gems/AtomLyIntegration/CommonFeatures/Code/Source/CoreLights/EditorAreaLightComponent.cpp index db46434d9a..d15862451a 100644 --- a/Gems/AtomLyIntegration/CommonFeatures/Code/Source/CoreLights/EditorAreaLightComponent.cpp +++ b/Gems/AtomLyIntegration/CommonFeatures/Code/Source/CoreLights/EditorAreaLightComponent.cpp @@ -75,7 +75,7 @@ namespace AZ ->DataElement(Edit::UIHandlers::Color, &AreaLightComponentConfig::m_color, "Color", "Color of the light") ->Attribute(Edit::Attributes::ChangeNotify, Edit::PropertyRefreshLevels::ValuesOnly) ->Attribute(Edit::Attributes::Visibility, &AreaLightComponentConfig::LightTypeIsSelected) - ->Attribute("ColorEditorConfiguration", RPI::ColorUtils::GetLinearRgbEditorConfig()) + ->Attribute("ColorEditorConfiguration", RPI::ColorUtils::GetRgbEditorConfig()) ->DataElement(Edit::UIHandlers::ComboBox, &AreaLightComponentConfig::m_intensityMode, "Intensity mode", "Allows specifying which photometric unit to work in.") ->Attribute(AZ::Edit::Attributes::EnumValues, &AreaLightComponentConfig::GetValidPhotometricUnits) ->Attribute(Edit::Attributes::Visibility, &AreaLightComponentConfig::LightTypeIsSelected) @@ -136,7 +136,7 @@ namespace AZ ->Attribute(Edit::Attributes::Min, 0.0f) ->Attribute(Edit::Attributes::Max, 100.0f) ->Attribute(Edit::Attributes::SoftMin, 0.0f) - ->Attribute(Edit::Attributes::SoftMax, 2.0f) + ->Attribute(Edit::Attributes::SoftMax, 10.0f) ->Attribute(Edit::Attributes::ChangeNotify, Edit::PropertyRefreshLevels::ValuesOnly) ->Attribute(Edit::Attributes::Visibility, &AreaLightComponentConfig::SupportsShadows) ->Attribute(Edit::Attributes::ReadOnly, &AreaLightComponentConfig::ShadowsDisabled) @@ -171,7 +171,16 @@ namespace AZ ->Attribute(Edit::Attributes::ChangeNotify, Edit::PropertyRefreshLevels::ValuesOnly) ->Attribute(Edit::Attributes::Visibility, &AreaLightComponentConfig::SupportsShadows) ->Attribute(Edit::Attributes::ReadOnly, &AreaLightComponentConfig::IsEsmDisabled) - ; + ->DataElement( + Edit::UIHandlers::Slider, &AreaLightComponentConfig::m_normalShadowBias, "Normal Shadow Bias\n", + "Reduces acne by biasing the shadowmap lookup along the geometric normal.\n" + "If this is 0, no biasing is applied.") + ->Attribute(Edit::Attributes::Min, 0.f) + ->Attribute(Edit::Attributes::Max, 10.0f) + ->Attribute(Edit::Attributes::ChangeNotify, Edit::PropertyRefreshLevels::ValuesOnly) + ->Attribute(Edit::Attributes::Visibility, &AreaLightComponentConfig::SupportsShadows) + ->Attribute(Edit::Attributes::ReadOnly, &AreaLightComponentConfig::ShadowsDisabled) + ; } } diff --git a/Gems/AtomLyIntegration/CommonFeatures/Code/Source/CoreLights/EditorDirectionalLightComponent.cpp b/Gems/AtomLyIntegration/CommonFeatures/Code/Source/CoreLights/EditorDirectionalLightComponent.cpp index 545064b86f..1759b830d2 100644 --- a/Gems/AtomLyIntegration/CommonFeatures/Code/Source/CoreLights/EditorDirectionalLightComponent.cpp +++ b/Gems/AtomLyIntegration/CommonFeatures/Code/Source/CoreLights/EditorDirectionalLightComponent.cpp @@ -59,7 +59,7 @@ namespace AZ ->ClassElement(Edit::ClassElements::EditorData, "") ->DataElement(Edit::UIHandlers::Color, &DirectionalLightComponentConfig::m_color, "Color", "Color of the light") ->Attribute(Edit::Attributes::ChangeNotify, Edit::PropertyRefreshLevels::ValuesOnly) - ->Attribute("ColorEditorConfiguration", AZ::RPI::ColorUtils::GetLinearRgbEditorConfig()) + ->Attribute("ColorEditorConfiguration", AZ::RPI::ColorUtils::GetRgbEditorConfig()) ->DataElement(Edit::UIHandlers::ComboBox, &DirectionalLightComponentConfig::m_intensityMode, "Intensity mode", "Allows specifying light values in lux or Ev100") ->EnumAttribute(PhotometricUnit::Lux, "Lux") ->EnumAttribute(PhotometricUnit::Ev100Illuminance, "Ev100") @@ -161,7 +161,11 @@ namespace AZ ->Attribute(Edit::Attributes::Min, 0.f) ->Attribute(Edit::Attributes::Max, 10.0f) ->Attribute(Edit::Attributes::ChangeNotify, Edit::PropertyRefreshLevels::ValuesOnly) - ; + ->DataElement( + Edit::UIHandlers::CheckBox, &DirectionalLightComponentConfig::m_cascadeBlendingEnabled, + "Blend between cascades\n", "Enables smooth blending between shadow map cascades.") + ->Attribute(Edit::Attributes::ReadOnly, &DirectionalLightComponentConfig::IsShadowPcfDisabled) + ; } } diff --git a/Gems/AtomLyIntegration/CommonFeatures/Code/Source/CoreLights/LightDelegateBase.h b/Gems/AtomLyIntegration/CommonFeatures/Code/Source/CoreLights/LightDelegateBase.h index 336c67f55d..8b096b0367 100644 --- a/Gems/AtomLyIntegration/CommonFeatures/Code/Source/CoreLights/LightDelegateBase.h +++ b/Gems/AtomLyIntegration/CommonFeatures/Code/Source/CoreLights/LightDelegateBase.h @@ -58,7 +58,8 @@ namespace AZ void SetShadowFilterMethod([[maybe_unused]] ShadowFilterMethod method) override {}; void SetFilteringSampleCount([[maybe_unused]] uint32_t count) override {}; void SetEsmExponent([[maybe_unused]] float esmExponent) override{}; - + void SetNormalShadowBias([[maybe_unused]] float bias) override{}; + protected: void InitBase(EntityId entityId); diff --git a/Gems/AtomLyIntegration/CommonFeatures/Code/Source/CoreLights/LightDelegateInterface.h b/Gems/AtomLyIntegration/CommonFeatures/Code/Source/CoreLights/LightDelegateInterface.h index 9bb8188898..40ffaf392d 100644 --- a/Gems/AtomLyIntegration/CommonFeatures/Code/Source/CoreLights/LightDelegateInterface.h +++ b/Gems/AtomLyIntegration/CommonFeatures/Code/Source/CoreLights/LightDelegateInterface.h @@ -79,6 +79,8 @@ namespace AZ virtual void SetFilteringSampleCount(uint32_t count) = 0; //! Sets the Esm exponent to use. Higher values produce a steeper falloff between light and shadow. virtual void SetEsmExponent(float exponent) = 0; + //! Sets the normal bias. Reduces acne by biasing the shadowmap lookup along the geometric normal. + virtual void SetNormalShadowBias(float bias) = 0; }; } // namespace Render } // namespace AZ diff --git a/Gems/AtomLyIntegration/CommonFeatures/Code/Source/CoreLights/SphereLightDelegate.cpp b/Gems/AtomLyIntegration/CommonFeatures/Code/Source/CoreLights/SphereLightDelegate.cpp index 661b0c6b25..f2e1f41008 100644 --- a/Gems/AtomLyIntegration/CommonFeatures/Code/Source/CoreLights/SphereLightDelegate.cpp +++ b/Gems/AtomLyIntegration/CommonFeatures/Code/Source/CoreLights/SphereLightDelegate.cpp @@ -107,4 +107,13 @@ namespace AZ::Render GetFeatureProcessor()->SetEsmExponent(GetLightHandle(), esmExponent); } } + + void SphereLightDelegate::SetNormalShadowBias(float bias) + { + if (GetShadowsEnabled() && GetLightHandle().IsValid()) + { + GetFeatureProcessor()->SetNormalShadowBias(GetLightHandle(), bias); + } + } + } // namespace AZ::Render diff --git a/Gems/AtomLyIntegration/CommonFeatures/Code/Source/CoreLights/SphereLightDelegate.h b/Gems/AtomLyIntegration/CommonFeatures/Code/Source/CoreLights/SphereLightDelegate.h index 8bdee2442a..bad00e597c 100644 --- a/Gems/AtomLyIntegration/CommonFeatures/Code/Source/CoreLights/SphereLightDelegate.h +++ b/Gems/AtomLyIntegration/CommonFeatures/Code/Source/CoreLights/SphereLightDelegate.h @@ -36,6 +36,7 @@ namespace AZ void SetShadowFilterMethod(ShadowFilterMethod method) override; void SetFilteringSampleCount(uint32_t count) override; void SetEsmExponent(float esmExponent) override; + void SetNormalShadowBias(float bias) override; private: diff --git a/Gems/AtomLyIntegration/CommonFeatures/Code/Source/DiffuseGlobalIllumination/DiffuseProbeGridComponentController.cpp b/Gems/AtomLyIntegration/CommonFeatures/Code/Source/DiffuseGlobalIllumination/DiffuseProbeGridComponentController.cpp index 8b864613c4..397f22c4ff 100644 --- a/Gems/AtomLyIntegration/CommonFeatures/Code/Source/DiffuseGlobalIllumination/DiffuseProbeGridComponentController.cpp +++ b/Gems/AtomLyIntegration/CommonFeatures/Code/Source/DiffuseGlobalIllumination/DiffuseProbeGridComponentController.cpp @@ -16,7 +16,6 @@ #include #include #include -#include #include #include @@ -35,7 +34,7 @@ namespace AZ if (auto* serializeContext = azrtti_cast(context)) { serializeContext->Class() - ->Version(0) + ->Version(1) ->Field("ProbeSpacing", &DiffuseProbeGridComponentConfig::m_probeSpacing) ->Field("Extents", &DiffuseProbeGridComponentConfig::m_extents) ->Field("AmbientMultiplier", &DiffuseProbeGridComponentConfig::m_ambientMultiplier) @@ -45,12 +44,10 @@ namespace AZ ->Field("RuntimeMode", &DiffuseProbeGridComponentConfig::m_runtimeMode) ->Field("BakedIrradianceTextureRelativePath", &DiffuseProbeGridComponentConfig::m_bakedIrradianceTextureRelativePath) ->Field("BakedDistanceTextureRelativePath", &DiffuseProbeGridComponentConfig::m_bakedDistanceTextureRelativePath) - ->Field("BakedRelocationTextureRelativePath", &DiffuseProbeGridComponentConfig::m_bakedRelocationTextureRelativePath) - ->Field("BakedClassificationTextureRelativePath", &DiffuseProbeGridComponentConfig::m_bakedClassificationTextureRelativePath) + ->Field("BakedProbeDataTextureRelativePath", &DiffuseProbeGridComponentConfig::m_bakedProbeDataTextureRelativePath) ->Field("BakedIrradianceTextureAsset", &DiffuseProbeGridComponentConfig::m_bakedIrradianceTextureAsset) ->Field("BakedDistanceTextureAsset", &DiffuseProbeGridComponentConfig::m_bakedDistanceTextureAsset) - ->Field("BakedRelocationTextureAsset", &DiffuseProbeGridComponentConfig::m_bakedRelocationTextureAsset) - ->Field("BakedClassificationTextureAsset", &DiffuseProbeGridComponentConfig::m_bakedClassificationTextureAsset) + ->Field("BakedProbeDataTextureAsset", &DiffuseProbeGridComponentConfig::m_bakedProbeDataTextureAsset) ; } } @@ -122,19 +119,16 @@ namespace AZ if (m_featureProcessor->AreBakedTexturesReferenced( m_configuration.m_bakedIrradianceTextureRelativePath, m_configuration.m_bakedDistanceTextureRelativePath, - m_configuration.m_bakedRelocationTextureRelativePath, - m_configuration.m_bakedClassificationTextureRelativePath)) + m_configuration.m_bakedProbeDataTextureRelativePath)) { // clear the baked texture paths and assets, since they belong to the original entity (not the clone) m_configuration.m_bakedIrradianceTextureRelativePath.clear(); m_configuration.m_bakedDistanceTextureRelativePath.clear(); - m_configuration.m_bakedRelocationTextureRelativePath.clear(); - m_configuration.m_bakedClassificationTextureRelativePath.clear(); + m_configuration.m_bakedProbeDataTextureRelativePath.clear(); m_configuration.m_bakedIrradianceTextureAsset.Reset(); m_configuration.m_bakedDistanceTextureAsset.Reset(); - m_configuration.m_bakedRelocationTextureAsset.Reset(); - m_configuration.m_bakedClassificationTextureAsset.Reset(); + m_configuration.m_bakedProbeDataTextureAsset.Reset(); } // add this diffuse probe grid to the feature processor @@ -148,25 +142,22 @@ namespace AZ // load the baked texture assets, but only if they are all valid if (m_configuration.m_bakedIrradianceTextureAsset.GetId().IsValid() && m_configuration.m_bakedDistanceTextureAsset.GetId().IsValid() && - m_configuration.m_bakedRelocationTextureAsset.GetId().IsValid() && - m_configuration.m_bakedClassificationTextureAsset.GetId().IsValid()) + m_configuration.m_bakedProbeDataTextureAsset.GetId().IsValid()) { Data::AssetBus::MultiHandler::BusConnect(m_configuration.m_bakedIrradianceTextureAsset.GetId()); Data::AssetBus::MultiHandler::BusConnect(m_configuration.m_bakedDistanceTextureAsset.GetId()); - Data::AssetBus::MultiHandler::BusConnect(m_configuration.m_bakedRelocationTextureAsset.GetId()); - Data::AssetBus::MultiHandler::BusConnect(m_configuration.m_bakedClassificationTextureAsset.GetId()); + Data::AssetBus::MultiHandler::BusConnect(m_configuration.m_bakedProbeDataTextureAsset.GetId()); m_configuration.m_bakedIrradianceTextureAsset.QueueLoad(); m_configuration.m_bakedDistanceTextureAsset.QueueLoad(); - m_configuration.m_bakedRelocationTextureAsset.QueueLoad(); - m_configuration.m_bakedClassificationTextureAsset.QueueLoad(); + m_configuration.m_bakedProbeDataTextureAsset.QueueLoad(); } else if (m_configuration.m_runtimeMode == DiffuseProbeGridMode::Baked || m_configuration.m_runtimeMode == DiffuseProbeGridMode::AutoSelect || m_configuration.m_editorMode == DiffuseProbeGridMode::Baked || m_configuration.m_editorMode == DiffuseProbeGridMode::AutoSelect) { - AZ_Error("DiffuseProbeGrid", false, "DiffuseProbeGrid mdoe is set to Baked or Auto-Select, but it does not have baked texture assets. Please re-bake this DiffuseProbeGrid."); + AZ_Error("DiffuseProbeGrid", false, "DiffuseProbeGrid mode is set to Baked or Auto-Select, but it does not have baked texture assets. Please re-bake this DiffuseProbeGrid."); } m_featureProcessor->SetMode(m_handle, m_configuration.m_runtimeMode); @@ -192,13 +183,11 @@ namespace AZ // if all assets are ready we can set the baked texture images if (m_configuration.m_bakedIrradianceTextureAsset.IsReady() && m_configuration.m_bakedDistanceTextureAsset.IsReady() && - m_configuration.m_bakedRelocationTextureAsset.IsReady() && - m_configuration.m_bakedClassificationTextureAsset.IsReady()) + m_configuration.m_bakedProbeDataTextureAsset.IsReady()) { Data::AssetBus::MultiHandler::BusDisconnect(m_configuration.m_bakedIrradianceTextureAsset.GetId()); Data::AssetBus::MultiHandler::BusDisconnect(m_configuration.m_bakedDistanceTextureAsset.GetId()); - Data::AssetBus::MultiHandler::BusDisconnect(m_configuration.m_bakedRelocationTextureAsset.GetId()); - Data::AssetBus::MultiHandler::BusDisconnect(m_configuration.m_bakedClassificationTextureAsset.GetId()); + Data::AssetBus::MultiHandler::BusDisconnect(m_configuration.m_bakedProbeDataTextureAsset.GetId()); UpdateBakedTextures(); } @@ -366,8 +355,7 @@ namespace AZ callback, m_configuration.m_bakedIrradianceTextureRelativePath, m_configuration.m_bakedDistanceTextureRelativePath, - m_configuration.m_bakedRelocationTextureRelativePath, - m_configuration.m_bakedClassificationTextureRelativePath); + m_configuration.m_bakedProbeDataTextureRelativePath); } void DiffuseProbeGridComponentController::UpdateBakedTextures() @@ -382,12 +370,8 @@ namespace AZ bakedTextures.m_irradianceImageRelativePath = m_configuration.m_bakedIrradianceTextureRelativePath; bakedTextures.m_distanceImage = RPI::StreamingImage::FindOrCreate(m_configuration.m_bakedDistanceTextureAsset); bakedTextures.m_distanceImageRelativePath = m_configuration.m_bakedDistanceTextureRelativePath; - bakedTextures.m_relocationImageDescriptor = m_configuration.m_bakedRelocationTextureAsset->GetImageDescriptor(); - bakedTextures.m_relocationImageData = m_configuration.m_bakedRelocationTextureAsset->GetSubImageData(0, 0); - bakedTextures.m_relocationImageRelativePath = m_configuration.m_bakedRelocationTextureRelativePath; - bakedTextures.m_classificationImageDescriptor = m_configuration.m_bakedClassificationTextureAsset->GetImageDescriptor(); - bakedTextures.m_classificationImageData = m_configuration.m_bakedClassificationTextureAsset->GetSubImageData(0, 0); - bakedTextures.m_classificationImageRelativePath = m_configuration.m_bakedClassificationTextureRelativePath; + bakedTextures.m_probeDataImage = RPI::StreamingImage::FindOrCreate(m_configuration.m_bakedProbeDataTextureAsset); + bakedTextures.m_probeDataImageRelativePath = m_configuration.m_bakedProbeDataTextureRelativePath; m_featureProcessor->SetBakedTextures(m_handle, bakedTextures); } diff --git a/Gems/AtomLyIntegration/CommonFeatures/Code/Source/DiffuseGlobalIllumination/DiffuseProbeGridComponentController.h b/Gems/AtomLyIntegration/CommonFeatures/Code/Source/DiffuseGlobalIllumination/DiffuseProbeGridComponentController.h index 471ed3aec6..d3dd0efc0c 100644 --- a/Gems/AtomLyIntegration/CommonFeatures/Code/Source/DiffuseGlobalIllumination/DiffuseProbeGridComponentController.h +++ b/Gems/AtomLyIntegration/CommonFeatures/Code/Source/DiffuseGlobalIllumination/DiffuseProbeGridComponentController.h @@ -41,13 +41,11 @@ namespace AZ AZStd::string m_bakedIrradianceTextureRelativePath; AZStd::string m_bakedDistanceTextureRelativePath; - AZStd::string m_bakedRelocationTextureRelativePath; - AZStd::string m_bakedClassificationTextureRelativePath; + AZStd::string m_bakedProbeDataTextureRelativePath; Data::Asset m_bakedIrradianceTextureAsset; Data::Asset m_bakedDistanceTextureAsset; - Data::Asset m_bakedRelocationTextureAsset; - Data::Asset m_bakedClassificationTextureAsset; + Data::Asset m_bakedProbeDataTextureAsset; AZ::u64 m_entityId{ EntityId::InvalidEntityId }; }; diff --git a/Gems/AtomLyIntegration/CommonFeatures/Code/Source/DiffuseGlobalIllumination/EditorDiffuseProbeGridComponent.cpp b/Gems/AtomLyIntegration/CommonFeatures/Code/Source/DiffuseGlobalIllumination/EditorDiffuseProbeGridComponent.cpp index c14510f195..19b3f4459c 100644 --- a/Gems/AtomLyIntegration/CommonFeatures/Code/Source/DiffuseGlobalIllumination/EditorDiffuseProbeGridComponent.cpp +++ b/Gems/AtomLyIntegration/CommonFeatures/Code/Source/DiffuseGlobalIllumination/EditorDiffuseProbeGridComponent.cpp @@ -182,8 +182,7 @@ namespace AZ CheckTextureAssetNotification(configuration.m_bakedIrradianceTextureRelativePath, configuration.m_bakedIrradianceTextureAsset); CheckTextureAssetNotification(configuration.m_bakedDistanceTextureRelativePath, configuration.m_bakedDistanceTextureAsset); - CheckTextureAssetNotification(configuration.m_bakedRelocationTextureRelativePath, configuration.m_bakedRelocationTextureAsset); - CheckTextureAssetNotification(configuration.m_bakedClassificationTextureRelativePath, configuration.m_bakedClassificationTextureAsset); + CheckTextureAssetNotification(configuration.m_bakedProbeDataTextureRelativePath, configuration.m_bakedProbeDataTextureAsset); } void EditorDiffuseProbeGridComponent::CheckTextureAssetNotification(const AZStd::string& relativePath, Data::Asset& configurationAsset) @@ -196,13 +195,12 @@ namespace AZ { // bake is complete, update configuration with the new baked texture asset AzToolsFramework::ScopedUndoBatch undoBatch("DiffuseProbeGrid Texture Bake"); - configurationAsset = { textureAsset.GetAs(), AZ::Data::AssetLoadBehavior::PreLoad }; + configurationAsset = textureAsset; SetDirty(); if (m_controller.m_configuration.m_bakedIrradianceTextureAsset.IsReady() && m_controller.m_configuration.m_bakedDistanceTextureAsset.IsReady() && - m_controller.m_configuration.m_bakedClassificationTextureAsset.IsReady() && - m_controller.m_configuration.m_bakedRelocationTextureAsset.IsReady()) + m_controller.m_configuration.m_bakedProbeDataTextureAsset.IsReady()) { m_controller.UpdateBakedTextures(); } @@ -337,8 +335,7 @@ namespace AZ { if (!m_controller.m_configuration.m_bakedIrradianceTextureAsset.GetId().IsValid() || !m_controller.m_configuration.m_bakedDistanceTextureAsset.GetId().IsValid() || - !m_controller.m_configuration.m_bakedRelocationTextureAsset.GetId().IsValid() || - !m_controller.m_configuration.m_bakedClassificationTextureAsset.GetId().IsValid()) + !m_controller.m_configuration.m_bakedProbeDataTextureAsset.GetId().IsValid()) { return AZ::Failure(AZStd::string("Please bake textures before changing the Diffuse Probe Grid to Baked or Auto-Select mode.")); } @@ -385,8 +382,7 @@ namespace AZ // Note: we need to make sure to use the same source image for each bake AZStd::string irradianceTextureRelativePath = ValidateOrCreateNewTexturePath(configuration.m_bakedIrradianceTextureRelativePath, DiffuseProbeGridIrradianceFileName); AZStd::string distanceTextureRelativePath = ValidateOrCreateNewTexturePath(configuration.m_bakedDistanceTextureRelativePath, DiffuseProbeGridDistanceFileName); - AZStd::string relocationTextureRelativePath = ValidateOrCreateNewTexturePath(configuration.m_bakedRelocationTextureRelativePath, DiffuseProbeGridRelocationFileName); - AZStd::string classificationTextureRelativePath = ValidateOrCreateNewTexturePath(configuration.m_bakedClassificationTextureRelativePath, DiffuseProbeGridClassificationFileName); + AZStd::string probeDataTextureRelativePath = ValidateOrCreateNewTexturePath(configuration.m_bakedProbeDataTextureRelativePath, DiffuseProbeGridProbeDataFileName); // create the full paths char projectPath[AZ_MAX_PATH_LEN]; @@ -396,10 +392,8 @@ namespace AZ AzFramework::StringFunc::Path::Join(projectPath, irradianceTextureRelativePath.c_str(), irradianceTextureFullPath, true, true); AZStd::string distanceTextureFullPath; AzFramework::StringFunc::Path::Join(projectPath, distanceTextureRelativePath.c_str(), distanceTextureFullPath, true, true); - AZStd::string relocationTextureFullPath; - AzFramework::StringFunc::Path::Join(projectPath, relocationTextureRelativePath.c_str(), relocationTextureFullPath, true, true); - AZStd::string classificationTextureFullPath; - AzFramework::StringFunc::Path::Join(projectPath, classificationTextureRelativePath.c_str(), classificationTextureFullPath, true, true); + AZStd::string probeDataTextureFullPath; + AzFramework::StringFunc::Path::Join(projectPath, probeDataTextureRelativePath.c_str(), probeDataTextureFullPath, true, true); // make sure the folder is created AZStd::string diffuseProbeGridFolder; @@ -409,23 +403,20 @@ namespace AZ // check out the files in source control CheckoutSourceTextureFile(irradianceTextureFullPath); CheckoutSourceTextureFile(distanceTextureFullPath); - CheckoutSourceTextureFile(relocationTextureFullPath); - CheckoutSourceTextureFile(classificationTextureFullPath); + CheckoutSourceTextureFile(probeDataTextureFullPath); // update the configuration AzToolsFramework::ScopedUndoBatch undoBatch("DiffuseProbeGrid bake"); configuration.m_bakedIrradianceTextureRelativePath = irradianceTextureRelativePath; configuration.m_bakedDistanceTextureRelativePath = distanceTextureRelativePath; - configuration.m_bakedRelocationTextureRelativePath = relocationTextureRelativePath; - configuration.m_bakedClassificationTextureRelativePath = classificationTextureRelativePath; + configuration.m_bakedProbeDataTextureRelativePath = probeDataTextureRelativePath; SetDirty(); // callback for the texture readback DiffuseProbeGridBakeTexturesCallback bakeTexturesCallback = [=]( DiffuseProbeGridTexture irradianceTexture, DiffuseProbeGridTexture distanceTexture, - DiffuseProbeGridTexture relocationTexture, - DiffuseProbeGridTexture classificationTexture) + DiffuseProbeGridTexture probeDataTexture) { // irradiance { @@ -441,18 +432,11 @@ namespace AZ AZ_Assert(outcome.IsSuccess(), "Failed to write Distance texture .dds file [%s]", distanceTextureFullPath.c_str()); } - // relocation + // probe data { - AZ::DdsFile::DdsFileData fileData = { relocationTexture.m_size, relocationTexture.m_format, relocationTexture.m_data.get() }; - [[maybe_unused]] const auto outcome = AZ::DdsFile::WriteFile(relocationTextureFullPath, fileData); - AZ_Assert(outcome.IsSuccess(), "Failed to write Relocation texture .dds file [%s]", relocationTextureFullPath.c_str()); - } - - // classification - { - AZ::DdsFile::DdsFileData fileData = { classificationTexture.m_size, classificationTexture.m_format, classificationTexture.m_data.get() }; - [[maybe_unused]] const auto outcome = AZ::DdsFile::WriteFile(classificationTextureFullPath, fileData); - AZ_Assert(outcome.IsSuccess(), "Failed to write Classification texture .dds file [%s]", classificationTextureFullPath.c_str()); + AZ::DdsFile::DdsFileData fileData = { probeDataTexture.m_size, probeDataTexture.m_format, probeDataTexture.m_data.get() }; + [[maybe_unused]] const auto outcome = AZ::DdsFile::WriteFile(probeDataTextureFullPath, fileData); + AZ_Assert(outcome.IsSuccess(), "Failed to write ProbeData texture .dds file [%s]", probeDataTextureFullPath.c_str()); } m_bakeInProgress = false; diff --git a/Gems/AtomLyIntegration/CommonFeatures/Code/Source/EditorCommonFeaturesSystemComponent.cpp b/Gems/AtomLyIntegration/CommonFeatures/Code/Source/EditorCommonFeaturesSystemComponent.cpp index 2bf428bd2d..0250640d65 100644 --- a/Gems/AtomLyIntegration/CommonFeatures/Code/Source/EditorCommonFeaturesSystemComponent.cpp +++ b/Gems/AtomLyIntegration/CommonFeatures/Code/Source/EditorCommonFeaturesSystemComponent.cpp @@ -6,6 +6,7 @@ * */ +#include #include #include #include @@ -88,14 +89,22 @@ namespace AZ AzToolsFramework::EditorLevelNotificationBus::Handler::BusConnect(); AzToolsFramework::AssetBrowser::PreviewerRequestBus::Handler::BusConnect(); - AzFramework::AssetCatalogEventBus::Handler::BusConnect(); + if (auto settingsRegistry{ AZ::SettingsRegistry::Get() }; settingsRegistry != nullptr) + { + auto LifecycleCallback = [this](AZStd::string_view, AZ::SettingsRegistryInterface::Type) + { + SetupThumbnails(); + }; + AZ::ComponentApplicationLifecycle::RegisterHandler(*settingsRegistry, m_criticalAssetsHandler, + AZStd::move(LifecycleCallback), "CriticalAssetsCompiled"); + } AzFramework::ApplicationLifecycleEvents::Bus::Handler::BusConnect(); } void EditorCommonFeaturesSystemComponent::Deactivate() { AzFramework::ApplicationLifecycleEvents::Bus::Handler::BusDisconnect(); - AzFramework::AssetCatalogEventBus::Handler::BusDisconnect(); + m_criticalAssetsHandler = {}; AzToolsFramework::EditorLevelNotificationBus::Handler::BusDisconnect(); AzToolsFramework::AssetBrowser::PreviewerRequestBus::Handler::BusDisconnect(); @@ -192,13 +201,6 @@ namespace AZ } } - void EditorCommonFeaturesSystemComponent::OnCatalogLoaded([[maybe_unused]] const char* catalogFile) - { - AZ::TickBus::QueueFunction([this](){ - SetupThumbnails(); - }); - } - const AzToolsFramework::AssetBrowser::PreviewerFactory* EditorCommonFeaturesSystemComponent::GetPreviewerFactory( const AzToolsFramework::AssetBrowser::AssetBrowserEntry* entry) const { diff --git a/Gems/AtomLyIntegration/CommonFeatures/Code/Source/EditorCommonFeaturesSystemComponent.h b/Gems/AtomLyIntegration/CommonFeatures/Code/Source/EditorCommonFeaturesSystemComponent.h index 82bb93a808..dff9e68814 100644 --- a/Gems/AtomLyIntegration/CommonFeatures/Code/Source/EditorCommonFeaturesSystemComponent.h +++ b/Gems/AtomLyIntegration/CommonFeatures/Code/Source/EditorCommonFeaturesSystemComponent.h @@ -28,7 +28,6 @@ namespace AZ , public AzToolsFramework::EditorLevelNotificationBus::Handler , public AzToolsFramework::SliceEditorEntityOwnershipServiceNotificationBus::Handler , public AzToolsFramework::AssetBrowser::PreviewerRequestBus::Handler - , public AzFramework::AssetCatalogEventBus::Handler , public AzFramework::ApplicationLifecycleEvents::Bus::Handler { public: @@ -58,9 +57,6 @@ namespace AZ const AZ::Data::AssetId&, AZ::SliceComponent::SliceInstanceAddress&, const AzFramework::SliceInstantiationTicket&) override; void OnSliceInstantiationFailed(const AZ::Data::AssetId&, const AzFramework::SliceInstantiationTicket&) override; - // AzFramework::AssetCatalogEventBus::Handler overrides ... - void OnCatalogLoaded(const char* catalogFile) override; - // AzToolsFramework::AssetBrowser::PreviewerRequestBus::Handler overrides... const AzToolsFramework::AssetBrowser::PreviewerFactory* GetPreviewerFactory( const AzToolsFramework::AssetBrowser::AssetBrowserEntry* entry) const override; @@ -80,6 +76,7 @@ namespace AZ AZStd::unique_ptr m_thumbnailRenderer; AZStd::unique_ptr m_previewerFactory; + AZ::SettingsRegistryInterface::NotifyEventHandler m_criticalAssetsHandler; }; } // namespace Render } // namespace AZ diff --git a/Gems/AtomLyIntegration/CommonFeatures/Code/Source/ImageBasedLights/ImageBasedLightComponentController.cpp b/Gems/AtomLyIntegration/CommonFeatures/Code/Source/ImageBasedLights/ImageBasedLightComponentController.cpp index 6ea7580fc6..73cfd53c21 100644 --- a/Gems/AtomLyIntegration/CommonFeatures/Code/Source/ImageBasedLights/ImageBasedLightComponentController.cpp +++ b/Gems/AtomLyIntegration/CommonFeatures/Code/Source/ImageBasedLights/ImageBasedLightComponentController.cpp @@ -163,8 +163,6 @@ namespace AZ return true; } } - // If this asset didn't load or isn't a cubemap, release it. - configAsset.Release(); return false; } diff --git a/Gems/AtomLyIntegration/CommonFeatures/Code/Source/Material/EditorMaterialComponentUtil.cpp b/Gems/AtomLyIntegration/CommonFeatures/Code/Source/Material/EditorMaterialComponentUtil.cpp index d15db886d6..d3e125426c 100644 --- a/Gems/AtomLyIntegration/CommonFeatures/Code/Source/Material/EditorMaterialComponentUtil.cpp +++ b/Gems/AtomLyIntegration/CommonFeatures/Code/Source/Material/EditorMaterialComponentUtil.cpp @@ -17,6 +17,7 @@ #include #include #include +#include #include #include #include @@ -97,51 +98,28 @@ namespace AZ bool SaveSourceMaterialFromEditData(const AZStd::string& path, const MaterialEditData& editData) { - // Construct the material source data object that will be exported - AZ::RPI::MaterialSourceData exportData; - - // Converting absolute material paths to relative paths - bool result = false; - AZ::Data::AssetInfo info; - AZStd::string watchFolder; - AzToolsFramework::AssetSystemRequestBus::BroadcastResult( - result, &AzToolsFramework::AssetSystemRequestBus::Events::GetSourceInfoBySourcePath, - editData.m_materialTypeSourcePath.c_str(), info, watchFolder); - if (!result) + if (path.empty() || !editData.m_materialAsset.IsReady() || !editData.m_materialTypeAsset.IsReady() || + editData.m_materialTypeSourcePath.empty()) { - AZ_Error( - "AZ::Render::EditorMaterialComponentUtil", false, - "Failed to get material type source file info while attempting to export: %s", path.c_str()); + AZ_Error("AZ::Render::EditorMaterialComponentUtil", false, "Can not export: %s", path.c_str()); return false; } - exportData.m_materialType = info.m_relativePath; - - if (!editData.m_materialParentSourcePath.empty()) - { - result = false; - AzToolsFramework::AssetSystemRequestBus::BroadcastResult( - result, &AzToolsFramework::AssetSystemRequestBus::Events::GetSourceInfoBySourcePath, - editData.m_materialParentSourcePath.c_str(), info, watchFolder); - if (!result) - { - AZ_Error( - "AZ::Render::EditorMaterialComponentUtil", false, - "Failed to get parent material source file info while attempting to export: %s", path.c_str()); - return false; - } - - exportData.m_parentMaterial = info.m_relativePath; - } + // Construct the material source data object that will be exported + AZ::RPI::MaterialSourceData exportData; + exportData.m_materialTypeVersion = editData.m_materialTypeAsset->GetVersion(); + exportData.m_materialType = AtomToolsFramework::GetExteralReferencePath(path, editData.m_materialTypeSourcePath); + exportData.m_parentMaterial = AtomToolsFramework::GetExteralReferencePath(path, editData.m_materialParentSourcePath); // Copy all of the properties from the material asset to the source data that will be exported - result = true; - editData.m_materialTypeSourceData.EnumerateProperties([&](const AZStd::string& groupName, const AZStd::string& propertyName, const auto& propertyDefinition) { + bool result = true; + editData.m_materialTypeSourceData.EnumerateProperties([&](const AZStd::string& groupName, const AZStd::string& propertyName, const auto& propertyDefinition){ const AZ::RPI::MaterialPropertyId propertyId(groupName, propertyName); const AZ::RPI::MaterialPropertyIndex propertyIndex = editData.m_materialAsset->GetMaterialPropertiesLayout()->FindPropertyIndex(propertyId.GetFullName()); - AZ::RPI::MaterialPropertyValue propertyValue = editData.m_materialAsset->GetPropertyValues()[propertyIndex.GetIndex()]; + AZ::RPI::MaterialPropertyValue propertyValue = + editData.m_materialAsset->GetPropertyValues()[propertyIndex.GetIndex()]; AZ::RPI::MaterialPropertyValue propertyValueDefault = propertyDefinition.m_value; if (editData.m_materialParentAsset.IsReady()) @@ -151,12 +129,12 @@ namespace AZ // Check for and apply any property overrides before saving property values auto propertyOverrideItr = editData.m_materialPropertyOverrideMap.find(propertyId.GetFullName()); - if(propertyOverrideItr != editData.m_materialPropertyOverrideMap.end()) + if (propertyOverrideItr != editData.m_materialPropertyOverrideMap.end()) { propertyValue = AZ::RPI::MaterialPropertyValue::FromAny(propertyOverrideItr->second); } - if (!editData.m_materialTypeSourceData.ConvertPropertyValueToSourceDataFormat(propertyDefinition, propertyValue)) + if (!AtomToolsFramework::ConvertToExportFormat(path, propertyId.GetFullName(), propertyDefinition, propertyValue)) { AZ_Error("AZ::Render::EditorMaterialComponentUtil", false, "Failed to export: %s", path.c_str()); result = false; diff --git a/Gems/AtomLyIntegration/CommonFeatures/Code/Source/Material/EditorMaterialModelUvNameMapInspector.cpp b/Gems/AtomLyIntegration/CommonFeatures/Code/Source/Material/EditorMaterialModelUvNameMapInspector.cpp index 64bc54bae8..0cf6410fc5 100644 --- a/Gems/AtomLyIntegration/CommonFeatures/Code/Source/Material/EditorMaterialModelUvNameMapInspector.cpp +++ b/Gems/AtomLyIntegration/CommonFeatures/Code/Source/Material/EditorMaterialModelUvNameMapInspector.cpp @@ -290,14 +290,22 @@ namespace AZ menuButton->setAutoRaise(true); menuButton->setIcon(QIcon(":/Cards/img/UI20/Cards/menu_ico.svg")); menuButton->setVisible(true); - QObject::connect(menuButton, &QToolButton::clicked, &dialog, [&]() { - QAction* action = nullptr; - - QMenu menu(&dialog); - action = menu.addAction("Clear", [&] { inspector->SetUvNameMap(RPI::MaterialModelUvOverrideMap()); }); - action = menu.addAction("Revert", [&] { inspector->SetUvNameMap(matModUvOverrides);; }); - menu.exec(QCursor::pos()); - }); + QObject::connect( + menuButton, &QToolButton::clicked, &dialog, [&]() + { + QMenu menu(&dialog); + menu.addAction( + "Clear", [&] + { + inspector->SetUvNameMap(RPI::MaterialModelUvOverrideMap()); + }); + menu.addAction( + "Revert", [&] + { + inspector->SetUvNameMap(matModUvOverrides); + }); + menu.exec(QCursor::pos()); + }); QDialogButtonBox* buttonBox = new QDialogButtonBox(&dialog); buttonBox->setStandardButtons(QDialogButtonBox::Cancel | QDialogButtonBox::Ok); diff --git a/Gems/AtomLyIntegration/CommonFeatures/Code/Source/Mesh/MeshComponentController.cpp b/Gems/AtomLyIntegration/CommonFeatures/Code/Source/Mesh/MeshComponentController.cpp index 12b14d8162..517ba90f89 100644 --- a/Gems/AtomLyIntegration/CommonFeatures/Code/Source/Mesh/MeshComponentController.cpp +++ b/Gems/AtomLyIntegration/CommonFeatures/Code/Source/Mesh/MeshComponentController.cpp @@ -18,7 +18,6 @@ #include #include #include -#include #include #include diff --git a/Gems/AtomLyIntegration/CommonFeatures/Code/Source/OcclusionCullingPlane/OcclusionCullingPlaneComponentController.cpp b/Gems/AtomLyIntegration/CommonFeatures/Code/Source/OcclusionCullingPlane/OcclusionCullingPlaneComponentController.cpp index 4c78a0afd7..a5cf1c0180 100644 --- a/Gems/AtomLyIntegration/CommonFeatures/Code/Source/OcclusionCullingPlane/OcclusionCullingPlaneComponentController.cpp +++ b/Gems/AtomLyIntegration/CommonFeatures/Code/Source/OcclusionCullingPlane/OcclusionCullingPlaneComponentController.cpp @@ -15,7 +15,6 @@ #include #include -#include #include #include @@ -59,12 +58,12 @@ namespace AZ void OcclusionCullingPlaneComponentController::GetProvidedServices(AZ::ComponentDescriptor::DependencyArrayType& provided) { - provided.push_back(AZ_CRC("OcclusionCullingPlaneService", 0x9123f33d)); + provided.push_back(AZ_CRC("OcclusionCullingPlaneService", 0x7d036c2e)); } void OcclusionCullingPlaneComponentController::GetIncompatibleServices(AZ::ComponentDescriptor::DependencyArrayType& incompatible) { - incompatible.push_back(AZ_CRC("OcclusionCullingPlaneService", 0x9123f33d)); + incompatible.push_back(AZ_CRC("OcclusionCullingPlaneService", 0x7d036c2e)); } void OcclusionCullingPlaneComponentController::GetRequiredServices(AZ::ComponentDescriptor::DependencyArrayType& required) diff --git a/Gems/AtomLyIntegration/CommonFeatures/Code/Source/PostProcess/ColorGrading/EditorHDRColorGradingComponent.cpp b/Gems/AtomLyIntegration/CommonFeatures/Code/Source/PostProcess/ColorGrading/EditorHDRColorGradingComponent.cpp index 3cc9535d7a..67db519669 100644 --- a/Gems/AtomLyIntegration/CommonFeatures/Code/Source/PostProcess/ColorGrading/EditorHDRColorGradingComponent.cpp +++ b/Gems/AtomLyIntegration/CommonFeatures/Code/Source/PostProcess/ColorGrading/EditorHDRColorGradingComponent.cpp @@ -11,6 +11,9 @@ #include #include #include +#include +#include +#include namespace AZ { @@ -199,7 +202,14 @@ namespace AZ } const char* LutAttachment = "LutOutput"; - const AZStd::vector LutGenerationPassHierarchy{ "LutGenerationPass" }; + auto renderPipelineName = AZ::Interface::Get() + ->GetDefaultViewportContext() + ->GetCurrentPipeline() + ->GetId(); + const AZStd::vector LutGenerationPassHierarchy{ + renderPipelineName.GetCStr(), + "LutGenerationPass" + }; char resolvedOutputFilePath[AZ_MAX_PATH_LEN] = { 0 }; AZ::IO::FileIOBase::GetDirectInstance()->ResolvePath(m_currentTiffFilePath.c_str(), resolvedOutputFilePath, AZ_MAX_PATH_LEN); diff --git a/Gems/AtomLyIntegration/CommonFeatures/Code/Source/ReflectionProbe/EditorReflectionProbeComponent.cpp b/Gems/AtomLyIntegration/CommonFeatures/Code/Source/ReflectionProbe/EditorReflectionProbeComponent.cpp index 99e99abf4a..578c6e9300 100644 --- a/Gems/AtomLyIntegration/CommonFeatures/Code/Source/ReflectionProbe/EditorReflectionProbeComponent.cpp +++ b/Gems/AtomLyIntegration/CommonFeatures/Code/Source/ReflectionProbe/EditorReflectionProbeComponent.cpp @@ -40,6 +40,7 @@ namespace AZ ->Field("bakedCubeMapQualityLevel", &EditorReflectionProbeComponent::m_bakedCubeMapQualityLevel) ->Field("bakedCubeMapRelativePath", &EditorReflectionProbeComponent::m_bakedCubeMapRelativePath) ->Field("authoredCubeMapAsset", &EditorReflectionProbeComponent::m_authoredCubeMapAsset) + ->Field("bakeExposure", &EditorReflectionProbeComponent::m_bakeExposure) ; if (AZ::EditContext* editContext = serializeContext->GetEditContext()) @@ -62,6 +63,13 @@ namespace AZ ->Attribute(AZ::Edit::Attributes::ButtonText, "Bake Reflection Probe") ->Attribute(AZ::Edit::Attributes::ChangeNotify, &EditorReflectionProbeComponent::BakeReflectionProbe) ->Attribute(AZ::Edit::Attributes::Visibility, &EditorReflectionProbeComponent::GetBakedCubemapVisibilitySetting) + ->DataElement(AZ::Edit::UIHandlers::Slider, &EditorReflectionProbeComponent::m_bakeExposure, "Bake Exposure", "Exposure to use when baking the cubemap") + ->Attribute(AZ::Edit::Attributes::SoftMin, -16.0f) + ->Attribute(AZ::Edit::Attributes::SoftMax, 16.0f) + ->Attribute(AZ::Edit::Attributes::Min, -20.0f) + ->Attribute(AZ::Edit::Attributes::Max, 20.0f) + ->Attribute(AZ::Edit::Attributes::ChangeNotify, &EditorReflectionProbeComponent::OnBakeExposureChanged) + ->Attribute(AZ::Edit::Attributes::Visibility, &EditorReflectionProbeComponent::GetBakedCubemapVisibilitySetting) ->ClassElement(AZ::Edit::ClassElements::Group, "Cubemap") ->Attribute(AZ::Edit::Attributes::AutoExpand, true) ->DataElement(AZ::Edit::UIHandlers::Default, &EditorReflectionProbeComponent::m_useBakedCubemap, "Use Baked Cubemap", "Selects between a cubemap that captures the environment at location in the scene or a preauthored cubemap") @@ -111,6 +119,11 @@ namespace AZ ->Attribute(AZ::Edit::Attributes::ChangeNotify, Edit::PropertyRefreshLevels::ValuesOnly) ->DataElement(AZ::Edit::UIHandlers::CheckBox, &ReflectionProbeComponentConfig::m_showVisualization, "Show Visualization", "Show the reflection probe visualization sphere") ->Attribute(AZ::Edit::Attributes::ChangeNotify, Edit::PropertyRefreshLevels::ValuesOnly) + ->DataElement(AZ::Edit::UIHandlers::Slider, &ReflectionProbeComponentConfig::m_renderExposure, "Exposure", "Exposure to use when rendering meshes with the cubemap") + ->Attribute(AZ::Edit::Attributes::SoftMin, -5.0f) + ->Attribute(AZ::Edit::Attributes::SoftMax, 5.0f) + ->Attribute(AZ::Edit::Attributes::Min, -20.0f) + ->Attribute(AZ::Edit::Attributes::Max, 20.0f) ; } } @@ -178,7 +191,7 @@ namespace AZ if (notificationType == CubeMapAssetNotificationType::Ready) { // bake is complete, update configuration with the new baked cubemap asset - m_controller.m_configuration.m_bakedCubeMapAsset = { cubeMapAsset.GetAs(), AZ::Data::AssetLoadBehavior::PreLoad }; + m_controller.m_configuration.m_bakedCubeMapAsset = cubeMapAsset; // refresh the currently rendered cubemap m_controller.UpdateCubeMap(); @@ -275,6 +288,13 @@ namespace AZ return AZ::Edit::PropertyRefreshLevels::None; } + AZ::u32 EditorReflectionProbeComponent::OnBakeExposureChanged() + { + m_controller.SetBakeExposure(m_bakeExposure); + + return AZ::Edit::PropertyRefreshLevels::None; + } + AZ::u32 EditorReflectionProbeComponent::GetBakedCubemapVisibilitySetting() { // controls specific to baked cubemaps call this to determine their visibility diff --git a/Gems/AtomLyIntegration/CommonFeatures/Code/Source/ReflectionProbe/EditorReflectionProbeComponent.h b/Gems/AtomLyIntegration/CommonFeatures/Code/Source/ReflectionProbe/EditorReflectionProbeComponent.h index 441da19e78..3cd017fd18 100644 --- a/Gems/AtomLyIntegration/CommonFeatures/Code/Source/ReflectionProbe/EditorReflectionProbeComponent.h +++ b/Gems/AtomLyIntegration/CommonFeatures/Code/Source/ReflectionProbe/EditorReflectionProbeComponent.h @@ -55,6 +55,7 @@ namespace AZ // change notifications AZ::u32 OnUseBakedCubemapChanged(); AZ::u32 OnAuthoredCubemapChanged(); + AZ::u32 OnBakeExposureChanged(); // retrieves visibility for baked or authored cubemap controls AZ::u32 GetBakedCubemapVisibilitySetting(); @@ -77,6 +78,7 @@ namespace AZ AZStd::string m_bakedCubeMapRelativePath; Data::Asset m_bakedCubeMapAsset; Data::Asset m_authoredCubeMapAsset; + float m_bakeExposure = 0.0f; // flag indicating if a cubemap bake is currently in progress AZStd::atomic_bool m_bakeInProgress = false; diff --git a/Gems/AtomLyIntegration/CommonFeatures/Code/Source/ReflectionProbe/ReflectionProbeComponentController.cpp b/Gems/AtomLyIntegration/CommonFeatures/Code/Source/ReflectionProbe/ReflectionProbeComponentController.cpp index 4022dfda9b..5d33561d8a 100644 --- a/Gems/AtomLyIntegration/CommonFeatures/Code/Source/ReflectionProbe/ReflectionProbeComponentController.cpp +++ b/Gems/AtomLyIntegration/CommonFeatures/Code/Source/ReflectionProbe/ReflectionProbeComponentController.cpp @@ -16,7 +16,6 @@ #include #include #include -#include #include #include @@ -35,7 +34,7 @@ namespace AZ if (auto* serializeContext = azrtti_cast(context)) { serializeContext->Class() - ->Version(0) + ->Version(1) ->Field("OuterHeight", &ReflectionProbeComponentConfig::m_outerHeight) ->Field("OuterLength", &ReflectionProbeComponentConfig::m_outerLength) ->Field("OuterWidth", &ReflectionProbeComponentConfig::m_outerWidth) @@ -49,7 +48,9 @@ namespace AZ ->Field("AuthoredCubeMapAsset", &ReflectionProbeComponentConfig::m_authoredCubeMapAsset) ->Field("EntityId", &ReflectionProbeComponentConfig::m_entityId) ->Field("UseParallaxCorrection", &ReflectionProbeComponentConfig::m_useParallaxCorrection) - ->Field("ShowVisualization", &ReflectionProbeComponentConfig::m_showVisualization); + ->Field("ShowVisualization", &ReflectionProbeComponentConfig::m_showVisualization) + ->Field("RenderExposure", &ReflectionProbeComponentConfig::m_renderExposure) + ->Field("BakeExposure", &ReflectionProbeComponentConfig::m_bakeExposure); } } @@ -157,6 +158,9 @@ namespace AZ cubeMapAsset.QueueLoad(); Data::AssetBus::MultiHandler::BusConnect(cubeMapAsset.GetId()); } + + // set cubemap render exposure + m_featureProcessor->SetRenderExposure(m_handle, m_configuration.m_renderExposure); } void ReflectionProbeComponentController::Deactivate() @@ -284,6 +288,16 @@ namespace AZ m_configuration.m_innerHeight = AZStd::min(m_configuration.m_innerHeight, m_configuration.m_outerHeight); } + void ReflectionProbeComponentController::SetBakeExposure(float bakeExposure) + { + if (!m_featureProcessor) + { + return; + } + + m_featureProcessor->SetBakeExposure(m_handle, bakeExposure); + } + void ReflectionProbeComponentController::BakeReflectionProbe(BuildCubeMapCallback callback, const AZStd::string& relativePath) { if (!m_featureProcessor) diff --git a/Gems/AtomLyIntegration/CommonFeatures/Code/Source/ReflectionProbe/ReflectionProbeComponentController.h b/Gems/AtomLyIntegration/CommonFeatures/Code/Source/ReflectionProbe/ReflectionProbeComponentController.h index 18e13f023b..ad7d9f7f53 100644 --- a/Gems/AtomLyIntegration/CommonFeatures/Code/Source/ReflectionProbe/ReflectionProbeComponentController.h +++ b/Gems/AtomLyIntegration/CommonFeatures/Code/Source/ReflectionProbe/ReflectionProbeComponentController.h @@ -68,6 +68,9 @@ namespace AZ Data::Asset m_bakedCubeMapAsset; Data::Asset m_authoredCubeMapAsset; AZ::u64 m_entityId{ EntityId::InvalidEntityId }; + + float m_renderExposure = 0.0f; + float m_bakeExposure = 0.0f; }; class ReflectionProbeComponentController final @@ -99,6 +102,9 @@ namespace AZ // returns the outer extent Aabb for this reflection AZ::Aabb GetAabb() const; + // set the exposure to use when baking the cubemap + void SetBakeExposure(float bakeExposure); + // initiate the reflection probe bake, invokes callback when complete void BakeReflectionProbe(BuildCubeMapCallback callback, const AZStd::string& relativePath); diff --git a/Gems/AtomLyIntegration/CommonFeatures/Code/Source/SharedPreview/SharedPreviewContent.cpp b/Gems/AtomLyIntegration/CommonFeatures/Code/Source/SharedPreview/SharedPreviewContent.cpp index 91b6d2b02a..8bc9c5ac7d 100644 --- a/Gems/AtomLyIntegration/CommonFeatures/Code/Source/SharedPreview/SharedPreviewContent.cpp +++ b/Gems/AtomLyIntegration/CommonFeatures/Code/Source/SharedPreview/SharedPreviewContent.cpp @@ -163,9 +163,9 @@ namespace AZ m_modelAsset->GetAabb().GetAsSphere(center, radius); } - const auto distance = radius + NearDist; - const auto cameraRotation = Quaternion::CreateFromAxisAngle(Vector3::CreateAxisZ(), CameraRotationAngle); - const auto cameraPosition = center + cameraRotation.TransformVector(Vector3(0.0f, distance, 0.0f)); + const auto distance = fabsf(radius / sinf(FieldOfView)) + NearDist; + const auto cameraRotation = Quaternion::CreateFromAxisAngle(Vector3::CreateAxisX(), -CameraRotationAngle); + const auto cameraPosition = center + cameraRotation.TransformVector(-Vector3::CreateAxisY() * distance); const auto cameraTransform = Transform::CreateLookAt(cameraPosition, center); m_view->SetCameraTransform(Matrix3x4::CreateFromTransform(cameraTransform)); } diff --git a/Gems/AtomLyIntegration/CommonFeatures/Code/Source/SharedPreview/SharedPreviewContent.h b/Gems/AtomLyIntegration/CommonFeatures/Code/Source/SharedPreview/SharedPreviewContent.h index 7308aa19bc..dfab7a8630 100644 --- a/Gems/AtomLyIntegration/CommonFeatures/Code/Source/SharedPreview/SharedPreviewContent.h +++ b/Gems/AtomLyIntegration/CommonFeatures/Code/Source/SharedPreview/SharedPreviewContent.h @@ -51,7 +51,7 @@ namespace AZ static constexpr float NearDist = 0.001f; static constexpr float FarDist = 100.0f; static constexpr float FieldOfView = Constants::HalfPi; - static constexpr float CameraRotationAngle = Constants::QuarterPi / 2.0f; + static constexpr float CameraRotationAngle = Constants::QuarterPi / 3.0f; RPI::ScenePtr m_scene; RPI::ViewPtr m_view; diff --git a/Gems/AtomLyIntegration/CommonFeatures/Code/Source/SharedPreview/SharedPreviewUtils.cpp b/Gems/AtomLyIntegration/CommonFeatures/Code/Source/SharedPreview/SharedPreviewUtils.cpp index c2988cf53d..7fbe374286 100644 --- a/Gems/AtomLyIntegration/CommonFeatures/Code/Source/SharedPreview/SharedPreviewUtils.cpp +++ b/Gems/AtomLyIntegration/CommonFeatures/Code/Source/SharedPreview/SharedPreviewUtils.cpp @@ -9,9 +9,11 @@ #include #include #include +#include #include #include #include +#include #include namespace AZ @@ -20,45 +22,69 @@ namespace AZ { namespace SharedPreviewUtils { - Data::AssetId GetAssetId( - AzToolsFramework::Thumbnailer::SharedThumbnailKey key, - const Data::AssetType& assetType, - const Data::AssetId& defaultAssetId) + AZStd::vector GetSupportedAssetTypes() { + return { RPI::ModelAsset::RTTI_Type(), RPI::MaterialAsset::RTTI_Type(), RPI::AnyAsset::RTTI_Type() }; + } + + bool IsSupportedAssetType(AzToolsFramework::Thumbnailer::SharedThumbnailKey key) + { + return GetSupportedAssetInfo(key).m_assetId.IsValid(); + } + + AZ::Data::AssetInfo GetSupportedAssetInfo(AzToolsFramework::Thumbnailer::SharedThumbnailKey key) + { + const auto& supportedTypeIds = GetSupportedAssetTypes(); + // if it's a source thumbnail key, find first product with a matching asset type auto sourceKey = azrtti_cast(key.data()); if (sourceKey) { bool foundIt = false; - AZStd::vector productsAssetInfo; + AZStd::vector productsAssetInfo; AzToolsFramework::AssetSystemRequestBus::BroadcastResult( foundIt, &AzToolsFramework::AssetSystemRequestBus::Events::GetAssetsProducedBySourceUUID, sourceKey->GetSourceUuid(), productsAssetInfo); - if (!foundIt) - { - return defaultAssetId; - } - auto assetInfoIt = AZStd::find_if( - productsAssetInfo.begin(), productsAssetInfo.end(), - [&assetType](const Data::AssetInfo& assetInfo) - { - return assetInfo.m_assetType == assetType; - }); - if (assetInfoIt == productsAssetInfo.end()) - { - return defaultAssetId; - } - return assetInfoIt->m_assetId; + // Search the product assets for a matching asset type ID in the order of the supported type IDs, which are organized by priority + for (const auto& typeId : supportedTypeIds) + { + for (const auto& assetInfo : productsAssetInfo) + { + if (assetInfo.m_assetType == typeId) + { + return assetInfo; + } + } + } + return AZ::Data::AssetInfo(); } // if it's a product thumbnail key just return its assetId + AZ::Data::AssetInfo assetInfo; auto productKey = azrtti_cast(key.data()); - if (productKey && productKey->GetAssetType() == assetType) + if (productKey && + AZStd::find(supportedTypeIds.begin(), supportedTypeIds.end(), productKey->GetAssetType()) != supportedTypeIds.end()) { - return productKey->GetAssetId(); + AZ::Data::AssetCatalogRequestBus::BroadcastResult( + assetInfo, &AZ::Data::AssetCatalogRequestBus::Events::GetAssetInfoById, productKey->GetAssetId()); } - return defaultAssetId; + return assetInfo; + } + + AZ::Data::AssetId GetSupportedAssetId(AzToolsFramework::Thumbnailer::SharedThumbnailKey key, const AZ::Data::AssetId& defaultAssetId) + { + const AZ::Data::AssetInfo assetInfo = GetSupportedAssetInfo(key); + return assetInfo.m_assetId.IsValid() ? assetInfo.m_assetId : defaultAssetId; + } + + AZ::Data::AssetId GetAssetIdForProductPath(const AZStd::string_view productPath) + { + if (!productPath.empty()) + { + return AZ::RPI::AssetUtils::GetAssetIdForProductPath(productPath.data()); + } + return AZ::Data::AssetId(); } QString WordWrap(const QString& string, int maxLength) @@ -85,32 +111,6 @@ namespace AZ } return result; } - - AZStd::unordered_set GetSupportedAssetTypes() - { - return { RPI::AnyAsset::RTTI_Type(), RPI::MaterialAsset::RTTI_Type(), RPI::ModelAsset::RTTI_Type() }; - } - - bool IsSupportedAssetType(AzToolsFramework::Thumbnailer::SharedThumbnailKey key) - { - for (const AZ::Uuid& typeId : SharedPreviewUtils::GetSupportedAssetTypes()) - { - const AZ::Data::AssetId& assetId = SharedPreviewUtils::GetAssetId(key, typeId); - if (assetId.IsValid()) - { - if (typeId == RPI::AnyAsset::RTTI_Type()) - { - AZ::Data::AssetInfo assetInfo; - AZ::Data::AssetCatalogRequestBus::BroadcastResult( - assetInfo, &AZ::Data::AssetCatalogRequestBus::Events::GetAssetInfoById, assetId); - return AzFramework::StringFunc::EndsWith(assetInfo.m_relativePath.c_str(), "lightingpreset.azasset"); - } - return true; - } - } - - return false; - } } // namespace SharedPreviewUtils } // namespace LyIntegration } // namespace AZ diff --git a/Gems/AtomLyIntegration/CommonFeatures/Code/Source/SharedPreview/SharedPreviewUtils.h b/Gems/AtomLyIntegration/CommonFeatures/Code/Source/SharedPreview/SharedPreviewUtils.h index 6c5d83d22a..d215271936 100644 --- a/Gems/AtomLyIntegration/CommonFeatures/Code/Source/SharedPreview/SharedPreviewUtils.h +++ b/Gems/AtomLyIntegration/CommonFeatures/Code/Source/SharedPreview/SharedPreviewUtils.h @@ -8,9 +8,9 @@ #pragma once -#include - #if !defined(Q_MOC_RUN) +#include +#include #include #endif @@ -20,21 +20,25 @@ namespace AZ { namespace SharedPreviewUtils { - //! Get assetId by assetType that belongs to either source or product thumbnail key - Data::AssetId GetAssetId( - AzToolsFramework::Thumbnailer::SharedThumbnailKey key, - const Data::AssetType& assetType, - const Data::AssetId& defaultAssetId = {}); - - //! Word wrap function for previewer QLabel, since by default it does not break long words such as filenames, so manual word - //! wrap needed - QString WordWrap(const QString& string, int maxLength); - //! Get the set of all asset types supported by the shared preview - AZStd::unordered_set GetSupportedAssetTypes(); + AZStd::vector GetSupportedAssetTypes(); //! Determine if a thumbnail key has an asset supported by the shared preview bool IsSupportedAssetType(AzToolsFramework::Thumbnailer::SharedThumbnailKey key); + + //! Get assetInfo of source or product thumbnail key if asset type is supported by the shared preview + AZ::Data::AssetInfo GetSupportedAssetInfo(AzToolsFramework::Thumbnailer::SharedThumbnailKey key); + + //! Get assetId of source or product thumbnail key if asset type is supported by the shared preview + AZ::Data::AssetId GetSupportedAssetId( + AzToolsFramework::Thumbnailer::SharedThumbnailKey key, const AZ::Data::AssetId& defaultAssetId = {}); + + //! Wraps AZ::RPI::AssetUtils::GetAssetIdForProductPath to handle empty productPath + AZ::Data::AssetId GetAssetIdForProductPath(const AZStd::string_view productPath); + + //! Inserts new line characters into a string whenever the maximum number of characters per line is exceeded + QString WordWrap(const QString& string, int maxLength); + } // namespace SharedPreviewUtils } // namespace LyIntegration } // namespace AZ diff --git a/Gems/AtomLyIntegration/CommonFeatures/Code/Source/SharedPreview/SharedThumbnail.cpp b/Gems/AtomLyIntegration/CommonFeatures/Code/Source/SharedPreview/SharedThumbnail.cpp index 5d82bac139..d07c4577e8 100644 --- a/Gems/AtomLyIntegration/CommonFeatures/Code/Source/SharedPreview/SharedThumbnail.cpp +++ b/Gems/AtomLyIntegration/CommonFeatures/Code/Source/SharedPreview/SharedThumbnail.cpp @@ -22,18 +22,13 @@ namespace AZ ////////////////////////////////////////////////////////////////////////// SharedThumbnail::SharedThumbnail(AzToolsFramework::Thumbnailer::SharedThumbnailKey key) : Thumbnail(key) + , m_assetInfo(SharedPreviewUtils::GetSupportedAssetInfo(key)) { - for (const AZ::Uuid& typeId : SharedPreviewUtils::GetSupportedAssetTypes()) + if (m_assetInfo.m_assetId.IsValid()) { - const AZ::Data::AssetId& assetId = SharedPreviewUtils::GetAssetId(key, typeId); - if (assetId.IsValid()) - { - m_assetId = assetId; - m_typeId = typeId; - AzToolsFramework::Thumbnailer::ThumbnailerRendererNotificationBus::Handler::BusConnect(key); - AzFramework::AssetCatalogEventBus::Handler::BusConnect(); - return; - } + AzToolsFramework::Thumbnailer::ThumbnailerRendererNotificationBus::Handler::BusConnect(key); + AzFramework::AssetCatalogEventBus::Handler::BusConnect(); + return; } AZ_Error("SharedThumbnail", false, "Failed to find matching assetId for the thumbnailKey."); @@ -43,7 +38,9 @@ namespace AZ void SharedThumbnail::LoadThread() { AzToolsFramework::Thumbnailer::ThumbnailerRendererRequestBus::QueueEvent( - m_typeId, &AzToolsFramework::Thumbnailer::ThumbnailerRendererRequests::RenderThumbnail, m_key, SharedThumbnailSize); + m_assetInfo.m_assetType, &AzToolsFramework::Thumbnailer::ThumbnailerRendererRequests::RenderThumbnail, m_key, + SharedThumbnailSize); + // wait for response from thumbnail renderer m_renderWait.acquire(); } @@ -68,7 +65,7 @@ namespace AZ void SharedThumbnail::OnCatalogAssetChanged([[maybe_unused]] const AZ::Data::AssetId& assetId) { - if (m_assetId == assetId && m_state == State::Ready) + if (m_assetInfo.m_assetId == assetId && m_state == State::Ready) { m_state = State::Unloaded; Load(); diff --git a/Gems/AtomLyIntegration/CommonFeatures/Code/Source/SharedPreview/SharedThumbnail.h b/Gems/AtomLyIntegration/CommonFeatures/Code/Source/SharedPreview/SharedThumbnail.h index dee433e0bb..2d4b17a09e 100644 --- a/Gems/AtomLyIntegration/CommonFeatures/Code/Source/SharedPreview/SharedThumbnail.h +++ b/Gems/AtomLyIntegration/CommonFeatures/Code/Source/SharedPreview/SharedThumbnail.h @@ -43,8 +43,7 @@ namespace AZ void OnCatalogAssetChanged(const AZ::Data::AssetId& assetId) override; AZStd::binary_semaphore m_renderWait; - Data::AssetId m_assetId; - AZ::Uuid m_typeId; + Data::AssetInfo m_assetInfo; }; //! Cache configuration for shared thumbnails diff --git a/Gems/AtomLyIntegration/CommonFeatures/Code/Source/SharedPreview/SharedThumbnailRenderer.cpp b/Gems/AtomLyIntegration/CommonFeatures/Code/Source/SharedPreview/SharedThumbnailRenderer.cpp index c43ba5f1cf..4ee75e3436 100644 --- a/Gems/AtomLyIntegration/CommonFeatures/Code/Source/SharedPreview/SharedThumbnailRenderer.cpp +++ b/Gems/AtomLyIntegration/CommonFeatures/Code/Source/SharedPreview/SharedThumbnailRenderer.cpp @@ -8,6 +8,7 @@ #include #include +#include #include #include #include @@ -20,9 +21,9 @@ namespace AZ { SharedThumbnailRenderer::SharedThumbnailRenderer() { - m_defaultModelAsset.Create(DefaultModelAssetId, true); - m_defaultMaterialAsset.Create(DefaultMaterialAssetId, true); - m_defaultLightingPresetAsset.Create(DefaultLightingPresetAssetId, true); + m_defaultModelAsset.Create(SharedPreviewUtils::GetAssetIdForProductPath(DefaultModelPath), true); + m_defaultMaterialAsset.Create(SharedPreviewUtils::GetAssetIdForProductPath(DefaultMaterialPath), true); + m_defaultLightingPresetAsset.Create(SharedPreviewUtils::GetAssetIdForProductPath(DefaultLightingPresetPath), true); for (const AZ::Uuid& typeId : SharedPreviewUtils::GetSupportedAssetTypes()) { @@ -37,17 +38,66 @@ namespace AZ SystemTickBus::Handler::BusDisconnect(); } + SharedThumbnailRenderer::ThumbnailConfig SharedThumbnailRenderer::GetThumbnailConfig( + AzToolsFramework::Thumbnailer::SharedThumbnailKey thumbnailKey) + { + ThumbnailConfig thumbnailConfig; + + const auto assetInfo = SharedPreviewUtils::GetSupportedAssetInfo(thumbnailKey); + if (assetInfo.m_assetType == RPI::ModelAsset::RTTI_Type()) + { + static constexpr const char* MaterialAssetPathSetting = + "/O3DE/Atom/CommonFeature/SharedPreview/ModelAssetType/MaterialAssetPath"; + static constexpr const char* LightingAssetPathSetting = + "/O3DE/Atom/CommonFeature/SharedPreview/ModelAssetType/LightingAssetPath"; + + thumbnailConfig.m_modelId = assetInfo.m_assetId; + thumbnailConfig.m_materialId = SharedPreviewUtils::GetAssetIdForProductPath( + AtomToolsFramework::GetSettingOrDefault(MaterialAssetPathSetting, DefaultMaterialPath)); + thumbnailConfig.m_lightingId = SharedPreviewUtils::GetAssetIdForProductPath( + AtomToolsFramework::GetSettingOrDefault(LightingAssetPathSetting, DefaultLightingPresetPath)); + } + else if (assetInfo.m_assetType == RPI::MaterialAsset::RTTI_Type()) + { + static constexpr const char* ModelAssetPathSetting = + "/O3DE/Atom/CommonFeature/SharedPreview/MaterialAssetType/ModelAssetPath"; + static constexpr const char* LightingAssetPathSetting = + "/O3DE/Atom/CommonFeature/SharedPreview/MaterialAssetType/LightingAssetPath"; + + thumbnailConfig.m_modelId = SharedPreviewUtils::GetAssetIdForProductPath( + AtomToolsFramework::GetSettingOrDefault(ModelAssetPathSetting, DefaultModelPath)); + thumbnailConfig.m_materialId = assetInfo.m_assetId; + thumbnailConfig.m_lightingId = SharedPreviewUtils::GetAssetIdForProductPath( + AtomToolsFramework::GetSettingOrDefault(LightingAssetPathSetting, DefaultLightingPresetPath)); + } + else if (assetInfo.m_assetType == RPI::AnyAsset::RTTI_Type()) + { + static constexpr const char* ModelAssetPathSetting = + "/O3DE/Atom/CommonFeature/SharedPreview/LightingAssetType/ModelAssetPath"; + static constexpr const char* MaterialAssetPathSetting = + "/O3DE/Atom/CommonFeature/SharedPreview/LightingAssetType/MaterialAssetPath"; + + thumbnailConfig.m_modelId = SharedPreviewUtils::GetAssetIdForProductPath( + AtomToolsFramework::GetSettingOrDefault(ModelAssetPathSetting, DefaultModelPath)); + thumbnailConfig.m_materialId = SharedPreviewUtils::GetAssetIdForProductPath( + AtomToolsFramework::GetSettingOrDefault(MaterialAssetPathSetting, "materials/reflectionprobe/reflectionprobevisualization.azmaterial")); + thumbnailConfig.m_lightingId = assetInfo.m_assetId; + } + + return thumbnailConfig; + } + void SharedThumbnailRenderer::RenderThumbnail(AzToolsFramework::Thumbnailer::SharedThumbnailKey thumbnailKey, int thumbnailSize) { if (auto previewRenderer = AZ::Interface::Get()) { + const auto& thumbnailConfig = GetThumbnailConfig(thumbnailKey); + previewRenderer->AddCaptureRequest( { thumbnailSize, AZStd::make_shared( previewRenderer->GetScene(), previewRenderer->GetView(), previewRenderer->GetEntityContextId(), - SharedPreviewUtils::GetAssetId(thumbnailKey, RPI::ModelAsset::RTTI_Type(), DefaultModelAssetId), - SharedPreviewUtils::GetAssetId(thumbnailKey, RPI::MaterialAsset::RTTI_Type(), DefaultMaterialAssetId), - SharedPreviewUtils::GetAssetId(thumbnailKey, RPI::AnyAsset::RTTI_Type(), DefaultLightingPresetAssetId), + thumbnailConfig.m_modelId, thumbnailConfig.m_materialId, thumbnailConfig.m_lightingId, Render::MaterialPropertyOverrideMap()), [thumbnailKey]() { diff --git a/Gems/AtomLyIntegration/CommonFeatures/Code/Source/SharedPreview/SharedThumbnailRenderer.h b/Gems/AtomLyIntegration/CommonFeatures/Code/Source/SharedPreview/SharedThumbnailRenderer.h index 4db7728109..2166ac49e7 100644 --- a/Gems/AtomLyIntegration/CommonFeatures/Code/Source/SharedPreview/SharedThumbnailRenderer.h +++ b/Gems/AtomLyIntegration/CommonFeatures/Code/Source/SharedPreview/SharedThumbnailRenderer.h @@ -33,6 +33,15 @@ namespace AZ ~SharedThumbnailRenderer(); private: + struct ThumbnailConfig + { + Data::AssetId m_modelId; + Data::AssetId m_materialId; + Data::AssetId m_lightingId; + }; + + ThumbnailConfig GetThumbnailConfig(AzToolsFramework::Thumbnailer::SharedThumbnailKey thumbnailKey); + //! ThumbnailerRendererRequestsBus::Handler interface overrides... void RenderThumbnail(AzToolsFramework::Thumbnailer::SharedThumbnailKey thumbnailKey, int thumbnailSize) override; bool Installed() const override; @@ -42,15 +51,12 @@ namespace AZ // Default assets to be kept loaded and used for rendering if not overridden static constexpr const char* DefaultLightingPresetPath = "lightingpresets/thumbnail.lightingpreset.azasset"; - const Data::AssetId DefaultLightingPresetAssetId = AZ::RPI::AssetUtils::GetAssetIdForProductPath(DefaultLightingPresetPath); Data::Asset m_defaultLightingPresetAsset; static constexpr const char* DefaultModelPath = "models/sphere.azmodel"; - const Data::AssetId DefaultModelAssetId = AZ::RPI::AssetUtils::GetAssetIdForProductPath(DefaultModelPath); Data::Asset m_defaultModelAsset; static constexpr const char* DefaultMaterialPath = ""; - const Data::AssetId DefaultMaterialAssetId; Data::Asset m_defaultMaterialAsset; }; } // namespace LyIntegration diff --git a/Gems/AtomLyIntegration/CommonFeatures/Code/Source/SkyBox/HDRiSkyboxComponentController.cpp b/Gems/AtomLyIntegration/CommonFeatures/Code/Source/SkyBox/HDRiSkyboxComponentController.cpp index 171c5e417f..7bf6237c1a 100644 --- a/Gems/AtomLyIntegration/CommonFeatures/Code/Source/SkyBox/HDRiSkyboxComponentController.cpp +++ b/Gems/AtomLyIntegration/CommonFeatures/Code/Source/SkyBox/HDRiSkyboxComponentController.cpp @@ -196,8 +196,6 @@ namespace AZ } else { - // If this asset didn't load or isn't a cubemap, release it. - m_configuration.m_cubemapAsset.Release(); m_featureProcessorInterface->SetCubemap(nullptr); } } diff --git a/Gems/AtomLyIntegration/CommonFeatures/Code/Source/SurfaceData/SurfaceDataMeshComponent.cpp b/Gems/AtomLyIntegration/CommonFeatures/Code/Source/SurfaceData/SurfaceDataMeshComponent.cpp index d8cae4564d..862e3599a3 100644 --- a/Gems/AtomLyIntegration/CommonFeatures/Code/Source/SurfaceData/SurfaceDataMeshComponent.cpp +++ b/Gems/AtomLyIntegration/CommonFeatures/Code/Source/SurfaceData/SurfaceDataMeshComponent.cpp @@ -17,8 +17,6 @@ #include #include -#include - namespace SurfaceData { void SurfaceDataMeshConfig::Reflect(AZ::ReflectContext* context) diff --git a/Gems/AtomLyIntegration/CommonFeatures/gem.json b/Gems/AtomLyIntegration/CommonFeatures/gem.json index 30738ad14c..6fa8938332 100644 --- a/Gems/AtomLyIntegration/CommonFeatures/gem.json +++ b/Gems/AtomLyIntegration/CommonFeatures/gem.json @@ -2,6 +2,7 @@ "gem_name": "CommonFeaturesAtom", "display_name": "Common Features Atom", "license": "Apache-2.0 Or MIT", + "license_url": "https://github.com/o3de/o3de/blob/development/LICENSE.txt", "origin": "Open 3D Engine - o3de.org", "type": "Code", "summary": "", diff --git a/Gems/AtomLyIntegration/EMotionFXAtom/Code/Source/ActorAsset.cpp b/Gems/AtomLyIntegration/EMotionFXAtom/Code/Source/ActorAsset.cpp index 284e1ed35d..b1c5cf299b 100644 --- a/Gems/AtomLyIntegration/EMotionFXAtom/Code/Source/ActorAsset.cpp +++ b/Gems/AtomLyIntegration/EMotionFXAtom/Code/Source/ActorAsset.cpp @@ -194,7 +194,6 @@ namespace AZ const uint32_t originalVertex = sourceOriginalVertex[vertexIndex + vertexStart]; const uint32_t influenceCount = AZStd::GetMin(MaxSupportedSkinInfluences, static_cast(sourceSkinningInfo->GetNumInfluences(originalVertex))); uint32_t influenceIndex = 0; - float weightError = 1.0f; AZStd::vector localIndices; for (; influenceIndex < influenceCount; ++influenceIndex) @@ -202,7 +201,6 @@ namespace AZ EMotionFX::SkinInfluence* influence = sourceSkinningInfo->GetInfluence(originalVertex, influenceIndex); localIndices.push_back(static_cast(influence->GetNodeNr())); blendWeightBufferData[atomVertexBufferOffset + vertexIndex][influenceIndex] = influence->GetWeight(); - weightError -= blendWeightBufferData[atomVertexBufferOffset + vertexIndex][influenceIndex]; } // Zero out any unused ids/weights diff --git a/Gems/AtomLyIntegration/EMotionFXAtom/Code/Source/AtomActorDebugDraw.cpp b/Gems/AtomLyIntegration/EMotionFXAtom/Code/Source/AtomActorDebugDraw.cpp index 1325455cd9..21f9f69f7c 100644 --- a/Gems/AtomLyIntegration/EMotionFXAtom/Code/Source/AtomActorDebugDraw.cpp +++ b/Gems/AtomLyIntegration/EMotionFXAtom/Code/Source/AtomActorDebugDraw.cpp @@ -6,11 +6,15 @@ * */ +#include + #include #include #include #include +#include #include +#include #include #include @@ -19,10 +23,12 @@ #include #include #include +#include namespace AZ::Render { AtomActorDebugDraw::AtomActorDebugDraw(AZ::EntityId entityId) + : m_entityId(entityId) { m_auxGeomFeatureProcessor = RPI::Scene::GetFeatureProcessorForEntity(entityId); } @@ -40,16 +46,44 @@ namespace AZ::Render return; } + // Update the mesh deformers (perform cpu skinning and morphing) when needed. + if (renderFlags[EMotionFX::ActorRenderFlag::RENDER_AABB] || renderFlags[EMotionFX::ActorRenderFlag::RENDER_FACENORMALS] || + renderFlags[EMotionFX::ActorRenderFlag::RENDER_TANGENTS] || renderFlags[EMotionFX::ActorRenderFlag::RENDER_VERTEXNORMALS] || + renderFlags[EMotionFX::ActorRenderFlag::RENDER_WIREFRAME]) + { + instance->UpdateMeshDeformers(0.0f, true); + } + + const RPI::Scene* scene = RPI::Scene::GetSceneForEntityId(m_entityId); + const RPI::ViewportContextPtr viewport = AZ::Interface::Get()->GetViewportContextByScene(scene); + AzFramework::DebugDisplayRequests* debugDisplay = GetDebugDisplay(viewport->GetId()); + const AZ::Render::RenderActorSettings& renderActorSettings = EMotionFX::GetRenderActorSettings(); + const float scaleMultiplier = CalculateScaleMultiplier(instance); + // Render aabb if (renderFlags[EMotionFX::ActorRenderFlag::RENDER_AABB]) { - RenderAABB(instance); + RenderAABB(instance, + renderActorSettings.m_enabledNodeBasedAabb, renderActorSettings.m_nodeAABBColor, + renderActorSettings.m_enabledMeshBasedAabb, renderActorSettings.m_meshAABBColor, + renderActorSettings.m_enabledStaticBasedAabb, renderActorSettings.m_staticAABBColor); } - // Render skeleton + // Render simple line skeleton if (renderFlags[EMotionFX::ActorRenderFlag::RENDER_LINESKELETON]) { - RenderSkeleton(instance); + RenderLineSkeleton(instance, renderActorSettings.m_lineSkeletonColor); + } + + // Render advanced skeleton + if (renderFlags[EMotionFX::ActorRenderFlag::RENDER_SKELETON]) + { + RenderSkeleton(instance, renderActorSettings.m_skeletonColor); + } + + if (renderFlags[EMotionFX::ActorRenderFlag::RENDER_NODENAMES]) + { + RenderJointNames(instance, viewport, renderActorSettings.m_jointNameColor); } // Render internal EMFX debug lines. @@ -58,6 +92,12 @@ namespace AZ::Render RenderEMFXDebugDraw(instance); } + // Render + if (renderFlags[EMotionFX::ActorRenderFlag::RENDER_NODEORIENTATION]) + { + RenderNodeOrientations(instance, debugDisplay, renderActorSettings.m_nodeOrientationScale * scaleMultiplier); + } + // Render vertex normal, face normal, tagent and wireframe. const bool renderVertexNormals = renderFlags[EMotionFX::ActorRenderFlag::RENDER_VERTEXNORMALS]; const bool renderFaceNormals = renderFlags[EMotionFX::ActorRenderFlag::RENDER_FACENORMALS]; @@ -83,19 +123,52 @@ namespace AZ::Render continue; } - RenderNormals(mesh, globalTM, renderVertexNormals, renderFaceNormals); + RenderNormals(mesh, globalTM, renderVertexNormals, renderFaceNormals, renderActorSettings.m_vertexNormalsScale, + renderActorSettings.m_faceNormalsScale, scaleMultiplier, renderActorSettings.m_vertexNormalsColor, renderActorSettings.m_faceNormalsColor); if (renderTangents) { - RenderTangents(mesh, globalTM); + RenderTangents(mesh, globalTM, renderActorSettings.m_tangentsScale, scaleMultiplier, + renderActorSettings.m_tangentsColor, renderActorSettings.m_mirroredBitangentsColor, renderActorSettings.m_bitangentsColor); } if (renderWireframe) { - RenderWireframe(mesh, globalTM); + RenderWireframe(mesh, globalTM, renderActorSettings.m_wireframeScale, scaleMultiplier, renderActorSettings.m_wireframeColor); } } } } + float AtomActorDebugDraw::CalculateScaleMultiplier(EMotionFX::ActorInstance* instance) const + { + const AZ::Aabb aabb = instance->GetAabb(); + const float aabbRadius = aabb.GetExtents().GetLength() * 0.5f; + // Scale the multiplier down to 1% of the character size, that looks pretty nice on most of the models. + return aabbRadius * 0.01f; + } + + float AtomActorDebugDraw::CalculateBoneScale(EMotionFX::ActorInstance* actorInstance, EMotionFX::Node* node) + { + // Get the transform data + EMotionFX::TransformData* transformData = actorInstance->GetTransformData(); + const EMotionFX::Pose* pose = transformData->GetCurrentPose(); + + const size_t nodeIndex = node->GetNodeIndex(); + const size_t parentIndex = node->GetParentIndex(); + const AZ::Vector3 nodeWorldPos = pose->GetWorldSpaceTransform(nodeIndex).m_position; + + if (parentIndex != InvalidIndex) + { + const AZ::Vector3 parentWorldPos = pose->GetWorldSpaceTransform(parentIndex).m_position; + const AZ::Vector3 bone = parentWorldPos - nodeWorldPos; + const float boneLength = bone.GetLengthEstimate(); + + // 10% of the bone length is the sphere size + return boneLength * 0.1f; + } + + return 0.0f; + } + void AtomActorDebugDraw::PrepareForMesh(EMotionFX::Mesh* mesh, const AZ::Transform& worldTM) { // Check if we have already prepared for the given mesh @@ -124,14 +197,56 @@ namespace AZ::Render } } - void AtomActorDebugDraw::RenderAABB(EMotionFX::ActorInstance* instance) + AzFramework::DebugDisplayRequests* AtomActorDebugDraw::GetDebugDisplay(AzFramework::ViewportId viewportId) { - RPI::AuxGeomDrawPtr auxGeom = m_auxGeomFeatureProcessor->GetDrawQueue(); - const AZ::Aabb& aabb = instance->GetAabb(); - auxGeom->DrawAabb(aabb, AZ::Color(0.0f, 1.0f, 1.0f, 1.0f), RPI::AuxGeomDraw::DrawStyle::Line); + AzFramework::DebugDisplayRequestBus::BusPtr debugDisplayBus; + AzFramework::DebugDisplayRequestBus::Bind(debugDisplayBus, viewportId); + return AzFramework::DebugDisplayRequestBus::FindFirstHandler(debugDisplayBus); } - void AtomActorDebugDraw::RenderSkeleton(EMotionFX::ActorInstance* instance) + void AtomActorDebugDraw::RenderAABB(EMotionFX::ActorInstance* instance, + bool enableNodeAabb, + const AZ::Color& nodeAabbColor, + bool enableMeshAabb, + const AZ::Color& meshAabbColor, + bool enableStaticAabb, + const AZ::Color& staticAabbColor) + { + RPI::AuxGeomDrawPtr auxGeom = m_auxGeomFeatureProcessor->GetDrawQueue(); + + if (enableNodeAabb) + { + AZ::Aabb aabb; + instance->CalcNodeBasedAabb(&aabb); + if (aabb.IsValid()) + { + auxGeom->DrawAabb(aabb, nodeAabbColor, RPI::AuxGeomDraw::DrawStyle::Line); + } + } + + if (enableMeshAabb) + { + AZ::Aabb aabb; + const size_t lodLevel = instance->GetLODLevel(); + instance->CalcMeshBasedAabb(lodLevel, &aabb); + if (aabb.IsValid()) + { + auxGeom->DrawAabb(aabb, meshAabbColor, RPI::AuxGeomDraw::DrawStyle::Line); + } + } + + if (enableStaticAabb) + { + AZ::Aabb aabb; + instance->CalcStaticBasedAabb(&aabb); + if (aabb.IsValid()) + { + auxGeom->DrawAabb(aabb, staticAabbColor, RPI::AuxGeomDraw::DrawStyle::Line); + } + } + } + + void AtomActorDebugDraw::RenderLineSkeleton(EMotionFX::ActorInstance* instance, const AZ::Color& skeletonColor) { RPI::AuxGeomDrawPtr auxGeom = m_auxGeomFeatureProcessor->GetDrawQueue(); @@ -144,6 +259,13 @@ namespace AZ::Render m_auxVertices.clear(); m_auxVertices.reserve(numJoints * 2); + m_auxColors.clear(); + m_auxColors.reserve(numJoints * 2); + AZ::Color renderColor; + + const AZStd::unordered_set* cachedSelectedJointIndices; + EMotionFX::JointSelectionRequestBus::BroadcastResult( + cachedSelectedJointIndices, &EMotionFX::JointSelectionRequests::FindSelectedJointIndices, instance); for (size_t jointIndex = 0; jointIndex < numJoints; ++jointIndex) { @@ -159,23 +281,83 @@ namespace AZ::Render continue; } + if (cachedSelectedJointIndices && cachedSelectedJointIndices->find(jointIndex) != cachedSelectedJointIndices->end()) + { + renderColor = SelectedColor; + } + else + { + renderColor = skeletonColor; + } + const AZ::Vector3 parentPos = pose->GetWorldSpaceTransform(parentIndex).m_position; m_auxVertices.emplace_back(parentPos); + m_auxColors.emplace_back(renderColor); const AZ::Vector3 bonePos = pose->GetWorldSpaceTransform(jointIndex).m_position; m_auxVertices.emplace_back(bonePos); + m_auxColors.emplace_back(renderColor); } - const AZ::Color skeletonColor(0.604f, 0.804f, 0.196f, 1.0f); RPI::AuxGeomDraw::AuxGeomDynamicDrawArguments lineArgs; lineArgs.m_verts = m_auxVertices.data(); lineArgs.m_vertCount = static_cast(m_auxVertices.size()); - lineArgs.m_colors = &skeletonColor; - lineArgs.m_colorCount = 1; + lineArgs.m_colors = m_auxColors.data(); + lineArgs.m_colorCount = lineArgs.m_vertCount; lineArgs.m_depthTest = RPI::AuxGeomDraw::DepthTest::Off; auxGeom->DrawLines(lineArgs); } + void AtomActorDebugDraw::RenderSkeleton(EMotionFX::ActorInstance* instance, const AZ::Color& skeletonColor) + { + RPI::AuxGeomDrawPtr auxGeom = m_auxGeomFeatureProcessor->GetDrawQueue(); + + const EMotionFX::TransformData* transformData = instance->GetTransformData(); + const EMotionFX::Skeleton* skeleton = instance->GetActor()->GetSkeleton(); + const EMotionFX::Pose* pose = transformData->GetCurrentPose(); + const size_t numEnabled = instance->GetNumEnabledNodes(); + + AZ::Color renderColor = skeletonColor; + const AZStd::unordered_set* cachedSelectedJointIndices; + EMotionFX::JointSelectionRequestBus::BroadcastResult( + cachedSelectedJointIndices, &EMotionFX::JointSelectionRequests::FindSelectedJointIndices, instance); + + for (size_t i = 0; i < numEnabled; ++i) + { + EMotionFX::Node* joint = skeleton->GetNode(instance->GetEnabledNode(i)); + const size_t jointIndex = joint->GetNodeIndex(); + const size_t parentIndex = joint->GetParentIndex(); + + // check if this node has a parent and is a bone, if not skip it + if (parentIndex == InvalidIndex) + { + continue; + } + + const AZ::Vector3 nodeWorldPos = pose->GetWorldSpaceTransform(jointIndex).m_position; + const AZ::Vector3 parentWorldPos = pose->GetWorldSpaceTransform(parentIndex).m_position; + const AZ::Vector3 bone = parentWorldPos - nodeWorldPos; + const AZ::Vector3 boneDirection = bone.GetNormalizedEstimate(); + const AZ::Vector3 centerWorldPos = bone / 2 + nodeWorldPos; + const float boneLength = bone.GetLengthEstimate(); + const float boneScale = CalculateBoneScale(instance, joint); + const float parentBoneScale = CalculateBoneScale(instance, skeleton->GetNode(parentIndex)); + const float cylinderSize = boneLength - boneScale - parentBoneScale; + + if (cachedSelectedJointIndices && cachedSelectedJointIndices->find(jointIndex) != cachedSelectedJointIndices->end()) + { + renderColor = SelectedColor; + } + else + { + renderColor = skeletonColor; + } + // Render the bone cylinder, the cylinder will be directed towards the node's parent and must fit between the spheres + auxGeom->DrawCylinder(centerWorldPos, boneDirection, boneScale, cylinderSize, renderColor); + auxGeom->DrawSphere(nodeWorldPos, boneScale, renderColor); + } + } + void AtomActorDebugDraw::RenderEMFXDebugDraw(EMotionFX::ActorInstance* instance) { RPI::AuxGeomDrawPtr auxGeom = m_auxGeomFeatureProcessor->GetDrawQueue(); @@ -218,7 +400,16 @@ namespace AZ::Render auxGeom->DrawLines(lineArgs); } - void AtomActorDebugDraw::RenderNormals(EMotionFX::Mesh* mesh, const AZ::Transform& worldTM, bool vertexNormals, bool faceNormals) + void AtomActorDebugDraw::RenderNormals( + EMotionFX::Mesh* mesh, + const AZ::Transform& worldTM, + bool vertexNormals, + bool faceNormals, + float vertexNormalsScale, + float faceNormalsScale, + float scaleMultiplier, + const AZ::Color& vertexNormalsColor, + const AZ::Color& faceNormalsColor) { if (!mesh) { @@ -236,12 +427,6 @@ namespace AZ::Render return; } - // TODO: Move line color to a render setting. - const float faceNormalsScale = 0.01f; - const AZ::Color colorFaceNormals = AZ::Colors::Lime; - const float vertexNormalsScale = 0.01f; - const AZ::Color colorVertexNormals = AZ::Colors::Orange; - PrepareForMesh(mesh, worldTM); AZ::Vector3* normals = (AZ::Vector3*)mesh->FindVertexData(EMotionFX::Mesh::ATTRIB_NORMALS); @@ -277,14 +462,14 @@ namespace AZ::Render const AZ::Vector3 normalPos = (posA + posB + posC) * (1.0f / 3.0f); m_auxVertices.emplace_back(normalPos); - m_auxVertices.emplace_back(normalPos + (normalDir * faceNormalsScale)); + m_auxVertices.emplace_back(normalPos + (normalDir * faceNormalsScale * scaleMultiplier)); } } RPI::AuxGeomDraw::AuxGeomDynamicDrawArguments lineArgs; lineArgs.m_verts = m_auxVertices.data(); lineArgs.m_vertCount = static_cast(m_auxVertices.size()); - lineArgs.m_colors = &colorFaceNormals; + lineArgs.m_colors = &faceNormalsColor; lineArgs.m_colorCount = 1; lineArgs.m_depthTest = RPI::AuxGeomDraw::DepthTest::Off; auxGeom->DrawLines(lineArgs); @@ -307,24 +492,32 @@ namespace AZ::Render { const uint32 vertexIndex = j + startVertex; const AZ::Vector3& position = m_worldSpacePositions[vertexIndex]; - const AZ::Vector3 normal = worldTM.TransformVector(normals[vertexIndex]).GetNormalizedSafe() * vertexNormalsScale; + const AZ::Vector3 normal = worldTM.TransformVector(normals[vertexIndex]).GetNormalizedSafe() * + vertexNormalsScale * scaleMultiplier; m_auxVertices.emplace_back(position); m_auxVertices.emplace_back(position + normal); } - } - RPI::AuxGeomDraw::AuxGeomDynamicDrawArguments lineArgs; - lineArgs.m_verts = m_auxVertices.data(); - lineArgs.m_vertCount = static_cast(m_auxVertices.size()); - lineArgs.m_colors = &colorVertexNormals; - lineArgs.m_colorCount = 1; - lineArgs.m_depthTest = RPI::AuxGeomDraw::DepthTest::Off; - auxGeom->DrawLines(lineArgs); + RPI::AuxGeomDraw::AuxGeomDynamicDrawArguments lineArgs; + lineArgs.m_verts = m_auxVertices.data(); + lineArgs.m_vertCount = static_cast(m_auxVertices.size()); + lineArgs.m_colors = &vertexNormalsColor; + lineArgs.m_colorCount = 1; + lineArgs.m_depthTest = RPI::AuxGeomDraw::DepthTest::Off; + auxGeom->DrawLines(lineArgs); + } } } - void AtomActorDebugDraw::RenderTangents(EMotionFX::Mesh* mesh, const AZ::Transform& worldTM) + void AtomActorDebugDraw::RenderTangents( + EMotionFX::Mesh* mesh, + const AZ::Transform& worldTM, + float tangentsScale, + float scaleMultiplier, + const AZ::Color& tangentsColor, + const AZ::Color& mirroredBitangentsColor, + const AZ::Color& bitangentsColor) { if (!mesh) { @@ -337,12 +530,6 @@ namespace AZ::Render return; } - // TODO: Move line color to a render setting. - const AZ::Color colorTangents = AZ::Colors::Red; - const AZ::Color mirroredBitangentColor = AZ::Colors::Yellow; - const AZ::Color colorBitangents = AZ::Colors::White; - const float scale = 0.01f; - // Get the tangents and check if this mesh actually has tangents AZ::Vector4* tangents = static_cast(mesh->FindVertexData(EMotionFX::Mesh::ATTRIB_TANGENTS)); if (!tangents) @@ -380,23 +567,23 @@ namespace AZ::Render bitangent = (worldTM.TransformVector(bitangent)).GetNormalizedSafe(); m_auxVertices.emplace_back(m_worldSpacePositions[i]); - m_auxColors.emplace_back(colorTangents); - m_auxVertices.emplace_back(m_worldSpacePositions[i] + (tangent * scale)); - m_auxColors.emplace_back(colorTangents); + m_auxColors.emplace_back(tangentsColor); + m_auxVertices.emplace_back(m_worldSpacePositions[i] + (tangent * tangentsScale * scaleMultiplier)); + m_auxColors.emplace_back(tangentsColor); if (tangents[i].GetW() < 0.0f) { m_auxVertices.emplace_back(m_worldSpacePositions[i]); - m_auxColors.emplace_back(mirroredBitangentColor); - m_auxVertices.emplace_back(m_worldSpacePositions[i] + (bitangent * scale)); - m_auxColors.emplace_back(mirroredBitangentColor); + m_auxColors.emplace_back(mirroredBitangentsColor); + m_auxVertices.emplace_back(m_worldSpacePositions[i] + (bitangent * tangentsScale * scaleMultiplier)); + m_auxColors.emplace_back(mirroredBitangentsColor); } else { m_auxVertices.emplace_back(m_worldSpacePositions[i]); - m_auxColors.emplace_back(colorBitangents); - m_auxVertices.emplace_back(m_worldSpacePositions[i] + (bitangent * scale)); - m_auxColors.emplace_back(colorBitangents); + m_auxColors.emplace_back(bitangentsColor); + m_auxVertices.emplace_back(m_worldSpacePositions[i] + (bitangent * tangentsScale * scaleMultiplier)); + m_auxColors.emplace_back(bitangentsColor); } } @@ -409,7 +596,8 @@ namespace AZ::Render auxGeom->DrawLines(lineArgs); } - void AtomActorDebugDraw::RenderWireframe(EMotionFX::Mesh* mesh, const AZ::Transform& worldTM) + void AtomActorDebugDraw::RenderWireframe( + EMotionFX::Mesh* mesh, const AZ::Transform& worldTM, float wireframeScale, float scaleMultiplier, const AZ::Color& wireframeColor) { // Check if the mesh is valid and skip the node in case it's not if (!mesh) @@ -425,10 +613,7 @@ namespace AZ::Render PrepareForMesh(mesh, worldTM); - const float scale = 0.01f; - const AZ::Vector3* normals = (AZ::Vector3*)mesh->FindVertexData(EMotionFX::Mesh::ATTRIB_NORMALS); - const AZ::Color vertexColor = AZ::Color(0.8f, 0.24f, 0.88f, 1.0f); const size_t numSubMeshes = mesh->GetNumSubMeshes(); for (uint32 subMeshIndex = 0; subMeshIndex < numSubMeshes; ++subMeshIndex) @@ -448,9 +633,9 @@ namespace AZ::Render const uint32 indexB = indices[triangleStartIndex + 1] + startVertex; const uint32 indexC = indices[triangleStartIndex + 2] + startVertex; - const AZ::Vector3 posA = m_worldSpacePositions[indexA] + normals[indexA] * scale; - const AZ::Vector3 posB = m_worldSpacePositions[indexB] + normals[indexB] * scale; - const AZ::Vector3 posC = m_worldSpacePositions[indexC] + normals[indexC] * scale; + const AZ::Vector3 posA = m_worldSpacePositions[indexA] + normals[indexA] * wireframeScale * scaleMultiplier; + const AZ::Vector3 posB = m_worldSpacePositions[indexB] + normals[indexB] * wireframeScale * scaleMultiplier; + const AZ::Vector3 posC = m_worldSpacePositions[indexC] + normals[indexC] * wireframeScale * scaleMultiplier; m_auxVertices.emplace_back(posA); m_auxVertices.emplace_back(posB); @@ -465,10 +650,165 @@ namespace AZ::Render RPI::AuxGeomDraw::AuxGeomDynamicDrawArguments lineArgs; lineArgs.m_verts = m_auxVertices.data(); lineArgs.m_vertCount = static_cast(m_auxVertices.size()); - lineArgs.m_colors = &vertexColor; + lineArgs.m_colors = &wireframeColor; lineArgs.m_colorCount = 1; lineArgs.m_depthTest = RPI::AuxGeomDraw::DepthTest::Off; auxGeom->DrawLines(lineArgs); } } + + void AtomActorDebugDraw::RenderJointNames(EMotionFX::ActorInstance* actorInstance, + RPI::ViewportContextPtr viewportContext, const AZ::Color& jointNameColor) + { + if (!m_fontDrawInterface) + { + auto fontQueryInterface = AZ::Interface::Get(); + if (!fontQueryInterface) + { + return; + } + m_fontDrawInterface = fontQueryInterface->GetDefaultFontDrawInterface(); + } + + if (!m_fontDrawInterface || !viewportContext || !viewportContext->GetRenderScene() || + !AZ::Interface::Get()) + { + return; + } + + const AZStd::unordered_set* cachedSelectedJointIndices; + EMotionFX::JointSelectionRequestBus::BroadcastResult( + cachedSelectedJointIndices, &EMotionFX::JointSelectionRequests::FindSelectedJointIndices, actorInstance); + + const EMotionFX::Actor* actor = actorInstance->GetActor(); + const EMotionFX::Skeleton* skeleton = actor->GetSkeleton(); + const EMotionFX::TransformData* transformData = actorInstance->GetTransformData(); + const EMotionFX::Pose* pose = transformData->GetCurrentPose(); + const size_t numEnabledNodes = actorInstance->GetNumEnabledNodes(); + + m_drawParams.m_drawViewportId = viewportContext->GetId(); + AzFramework::WindowSize viewportSize = viewportContext->GetViewportSize(); + m_drawParams.m_position = AZ::Vector3(static_cast(viewportSize.m_width), 0.0f, 1.0f) + + TopRightBorderPadding * viewportContext->GetDpiScalingFactor(); + m_drawParams.m_scale = AZ::Vector2(BaseFontSize); + m_drawParams.m_hAlign = AzFramework::TextHorizontalAlignment::Right; + m_drawParams.m_monospace = false; + m_drawParams.m_depthTest = false; + m_drawParams.m_virtual800x600ScreenSize = false; + m_drawParams.m_scaleWithWindow = false; + m_drawParams.m_multiline = true; + m_drawParams.m_lineSpacing = 0.5f; + + for (size_t i = 0; i < numEnabledNodes; ++i) + { + const EMotionFX::Node* joint = skeleton->GetNode(actorInstance->GetEnabledNode(i)); + const size_t jointIndex = joint->GetNodeIndex(); + const AZ::Vector3 worldPos = pose->GetWorldSpaceTransform(jointIndex).m_position; + + m_drawParams.m_position = worldPos; + if (cachedSelectedJointIndices && cachedSelectedJointIndices->find(jointIndex) != cachedSelectedJointIndices->end()) + { + m_drawParams.m_color = SelectedColor; + } + else + { + m_drawParams.m_color = jointNameColor; + } + m_fontDrawInterface->DrawScreenAlignedText3d(m_drawParams, joint->GetName()); + } + } + + void AtomActorDebugDraw::RenderNodeOrientations(EMotionFX::ActorInstance* actorInstance, + AzFramework::DebugDisplayRequests* debugDisplay, float scale) + { + // Get the actor and the transform data + const float unitScale = + 1.0f / (float)MCore::Distance::ConvertValue(1.0f, MCore::Distance::UNITTYPE_METERS, EMotionFX::GetEMotionFX().GetUnitType()); + const EMotionFX::Actor* actor = actorInstance->GetActor(); + const EMotionFX::Skeleton* skeleton = actor->GetSkeleton(); + const EMotionFX::TransformData* transformData = actorInstance->GetTransformData(); + const EMotionFX::Pose* pose = transformData->GetCurrentPose(); + const float constPreScale = scale * unitScale * 3.0f; + + const AZStd::unordered_set* cachedSelectedJointIndices; + EMotionFX::JointSelectionRequestBus::BroadcastResult( + cachedSelectedJointIndices, &EMotionFX::JointSelectionRequests::FindSelectedJointIndices, actorInstance); + + const size_t numEnabled = actorInstance->GetNumEnabledNodes(); + for (size_t i = 0; i < numEnabled; ++i) + { + EMotionFX::Node* joint = skeleton->GetNode(actorInstance->GetEnabledNode(i)); + const size_t jointIndex = joint->GetNodeIndex(); + + static const float axisBoneScale = 50.0f; + const float size = CalculateBoneScale(actorInstance, joint) * constPreScale * axisBoneScale; + AZ::Transform worldTM = pose->GetWorldSpaceTransform(jointIndex).ToAZTransform(); + bool selected = false; + if (cachedSelectedJointIndices && cachedSelectedJointIndices->find(jointIndex) != cachedSelectedJointIndices->end()) + { + selected = true; + } + RenderLineAxis(debugDisplay, worldTM, size, selected); + } + } + + void AtomActorDebugDraw::RenderLineAxis( + AzFramework::DebugDisplayRequests* debugDisplay, + AZ::Transform worldTM, + float size, + bool selected, + bool renderAxisName) + { + const float axisHeight = size * 0.7f; + const float frontSize = size * 5.0f + 0.2f; + const AZ::Vector3 position = worldTM.GetTranslation(); + + // Render x axis + { + AZ::Color xSelectedColor = selected ? AZ::Colors::Orange : AZ::Colors::Red; + + const AZ::Vector3 xAxisDir = (worldTM.TransformPoint(AZ::Vector3(size, 0.0f, 0.0f)) - position).GetNormalized(); + const AZ::Vector3 xAxisArrowStart = position + xAxisDir * axisHeight; + debugDisplay->SetColor(xSelectedColor); + debugDisplay->DrawArrow(position, xAxisArrowStart, size); + + if (renderAxisName) + { + const AZ::Vector3 xNamePos = position + xAxisDir * (size * 1.15f); + debugDisplay->DrawTextLabel(xNamePos, frontSize, "X"); + } + } + + // Render y axis + { + AZ::Color ySelectedColor = selected ? AZ::Colors::Orange : AZ::Colors::Blue; + + const AZ::Vector3 yAxisDir = (worldTM.TransformPoint(AZ::Vector3(0.0f, size, 0.0f)) - position).GetNormalized(); + const AZ::Vector3 yAxisArrowStart = position + yAxisDir * axisHeight; + debugDisplay->SetColor(ySelectedColor); + debugDisplay->DrawArrow(position, yAxisArrowStart, size); + + if (renderAxisName) + { + const AZ::Vector3 yNamePos = position + yAxisDir * (size * 1.15f); + debugDisplay->DrawTextLabel(yNamePos, frontSize, "Y"); + } + } + + // Render z axis + { + AZ::Color zSelectedColor = selected ? AZ::Colors::Orange : AZ::Colors::Green; + + const AZ::Vector3 zAxisDir = (worldTM.TransformPoint(AZ::Vector3(0.0f, 0.0f, size)) - position).GetNormalized(); + const AZ::Vector3 zAxisArrowStart = position + zAxisDir * axisHeight; + debugDisplay->SetColor(zSelectedColor); + debugDisplay->DrawArrow(position, zAxisArrowStart, size); + + if (renderAxisName) + { + const AZ::Vector3 zNamePos = position + zAxisDir * (size * 1.15f); + debugDisplay->DrawTextLabel(zNamePos, frontSize, "Z"); + } + } + } } // namespace AZ::Render diff --git a/Gems/AtomLyIntegration/EMotionFXAtom/Code/Source/AtomActorDebugDraw.h b/Gems/AtomLyIntegration/EMotionFXAtom/Code/Source/AtomActorDebugDraw.h index 797de16351..8e985fdbc6 100644 --- a/Gems/AtomLyIntegration/EMotionFXAtom/Code/Source/AtomActorDebugDraw.h +++ b/Gems/AtomLyIntegration/EMotionFXAtom/Code/Source/AtomActorDebugDraw.h @@ -10,8 +10,15 @@ #include #include +#include #include #include +#include + +namespace AzFramework +{ + class DebugDisplayRequests; +} namespace EMotionFX { @@ -37,21 +44,60 @@ namespace AZ::Render private: + float CalculateBoneScale(EMotionFX::ActorInstance* actorInstance, EMotionFX::Node* node); + float CalculateScaleMultiplier(EMotionFX::ActorInstance* instance) const; void PrepareForMesh(EMotionFX::Mesh* mesh, const AZ::Transform& worldTM); - void RenderAABB(EMotionFX::ActorInstance* instance); - void RenderSkeleton(EMotionFX::ActorInstance* instance); - void RenderEMFXDebugDraw(EMotionFX::ActorInstance* instance); - void RenderNormals(EMotionFX::Mesh* mesh, const AZ::Transform& worldTM, bool vertexNormals, bool faceNormals); - void RenderTangents(EMotionFX::Mesh* mesh, const AZ::Transform& worldTM); - void RenderWireframe(EMotionFX::Mesh* mesh, const AZ::Transform& worldTM); + AzFramework::DebugDisplayRequests* GetDebugDisplay(AzFramework::ViewportId viewportId); - EMotionFX::Mesh* m_currentMesh = nullptr; /**< A pointer to the mesh whose world space positions are in the pre-calculated positions buffer. - NULL in case we haven't pre-calculated any positions yet. */ - AZStd::vector m_worldSpacePositions; /**< The buffer used to store world space positions for rendering normals - tangents and the wireframe. */ + void RenderAABB(EMotionFX::ActorInstance* instance, + bool enableNodeAabb, + const AZ::Color& nodeAabbColor, + bool enableMeshAabb, + const AZ::Color& meshAabbColor, + bool enableStaticAabb, + const AZ::Color& staticAabbColor); + void RenderLineSkeleton(EMotionFX::ActorInstance* instance, const AZ::Color& skeletonColor); + void RenderSkeleton(EMotionFX::ActorInstance* instance, const AZ::Color& skeletonColor); + void RenderEMFXDebugDraw(EMotionFX::ActorInstance* instance); + void RenderNormals( + EMotionFX::Mesh* mesh, + const AZ::Transform& worldTM, + bool vertexNormals, + bool faceNormals, + float vertexNormalsScale, + float faceNormalsScale, + float scaleMultiplier, + const AZ::Color& vertexNormalsColor, + const AZ::Color& faceNormalsColor); + void RenderTangents( + EMotionFX::Mesh* mesh, const AZ::Transform& worldTM, float tangentsScale, float scaleMultiplier, + const AZ::Color& tangentsColor, const AZ::Color& mirroredBitangentsColor, const AZ::Color& bitangentsColor); + void RenderWireframe(EMotionFX::Mesh* mesh, const AZ::Transform& worldTM, float wireframeScale, float scaleMultiplier, + const AZ::Color& wireframeColor); + void RenderJointNames(EMotionFX::ActorInstance* actorInstance, RPI::ViewportContextPtr viewportContext, const AZ::Color& jointNameColor); + void RenderNodeOrientations(EMotionFX::ActorInstance* actorInstance, AzFramework::DebugDisplayRequests* debugDisplay, float scale = 1.0f); + void RenderLineAxis( + AzFramework::DebugDisplayRequests* debugDisplay, + AZ::Transform worldTM, //!< The world space transformation matrix to visualize. */ + float size, //!< The size value in units is used to control the scaling of the axis. */ + bool selected, //!< Set to true if you want to render the axis using the selection color. */ + bool renderAxisName = false); + + EMotionFX::Mesh* m_currentMesh = nullptr; //!< A pointer to the mesh whose world space positions are in the pre-calculated positions buffer. + //!< NULL in case we haven't pre-calculated any positions yet. + AZStd::vector m_worldSpacePositions; //!< The buffer used to store world space positions for rendering normals + //!< tangents and the wireframe. + + static constexpr float BaseFontSize = 0.7f; + const Vector3 TopRightBorderPadding = AZ::Vector3(-40.0f, 22.0f, 0.0f); + const AZ::Color SelectedColor = AZ::Color{ 1.0f, 0.67f, 0.0f, 1.0f }; RPI::AuxGeomFeatureProcessorInterface* m_auxGeomFeatureProcessor = nullptr; AZStd::vector m_auxVertices; AZStd::vector m_auxColors; + EntityId m_entityId; + + AzFramework::TextDrawParameters m_drawParams; + AzFramework::FontDrawInterface* m_fontDrawInterface = nullptr; }; } diff --git a/Gems/AtomLyIntegration/EMotionFXAtom/Code/Source/AtomActorInstance.cpp b/Gems/AtomLyIntegration/EMotionFXAtom/Code/Source/AtomActorInstance.cpp index 4d1b42a0eb..58b3d8b56e 100644 --- a/Gems/AtomLyIntegration/EMotionFXAtom/Code/Source/AtomActorInstance.cpp +++ b/Gems/AtomLyIntegration/EMotionFXAtom/Code/Source/AtomActorInstance.cpp @@ -38,774 +38,773 @@ #include #include -namespace AZ +namespace AZ::Render { - namespace Render + static constexpr uint32_t s_maxActiveWrinkleMasks = 16; + + AZ_CLASS_ALLOCATOR_IMPL(AtomActorInstance, EMotionFX::Integration::EMotionFXAllocator, 0) + + AtomActorInstance::AtomActorInstance(AZ::EntityId entityId, + const EMotionFX::Integration::EMotionFXPtr& actorInstance, + const AZ::Data::Asset& asset, + [[maybe_unused]] const AZ::Transform& worldTransform, + EMotionFX::Integration::SkinningMethod skinningMethod) + : RenderActorInstance(asset, actorInstance.get(), entityId) { - static constexpr uint32_t s_maxActiveWrinkleMasks = 16; - - AZ_CLASS_ALLOCATOR_IMPL(AtomActorInstance, EMotionFX::Integration::EMotionFXAllocator, 0) - - AtomActorInstance::AtomActorInstance(AZ::EntityId entityId, - const EMotionFX::Integration::EMotionFXPtr& actorInstance, - const AZ::Data::Asset& asset, - [[maybe_unused]] const AZ::Transform& worldTransform, - EMotionFX::Integration::SkinningMethod skinningMethod) - : RenderActorInstance(asset, actorInstance.get(), entityId) + RenderActorInstance::SetSkinningMethod(skinningMethod); + if (m_entityId.IsValid()) { - RenderActorInstance::SetSkinningMethod(skinningMethod); - if (m_entityId.IsValid()) - { - Activate(); - AzFramework::BoundsRequestBus::Handler::BusConnect(m_entityId); - } - - m_atomActorDebugDraw = AZStd::make_unique(entityId); + Activate(); + AzFramework::BoundsRequestBus::Handler::BusConnect(m_entityId); } - AtomActorInstance::~AtomActorInstance() - { - if (m_entityId.IsValid()) - { - AzFramework::BoundsRequestBus::Handler::BusDisconnect(); - Deactivate(); - } + m_atomActorDebugDraw = AZStd::make_unique(entityId); + } - Data::AssetBus::MultiHandler::BusDisconnect(); + AtomActorInstance::~AtomActorInstance() + { + if (m_entityId.IsValid()) + { + AzFramework::BoundsRequestBus::Handler::BusDisconnect(); + Deactivate(); } - void AtomActorInstance::OnTick([[maybe_unused]] float timeDelta) + Data::AssetBus::MultiHandler::BusDisconnect(); + } + + void AtomActorInstance::OnTick([[maybe_unused]] float timeDelta) + { + UpdateBounds(); + } + + void AtomActorInstance::DebugDraw(const EMotionFX::ActorRenderFlagBitset& renderFlags) + { + m_atomActorDebugDraw->DebugDraw(renderFlags, m_actorInstance); + } + + void AtomActorInstance::UpdateBounds() + { + // Update RenderActorInstance world bounding box + // The bounding box is moving with the actor instance. + // The entity and actor transforms are kept in sync already. + m_worldAABB = m_actorInstance->GetAabb(); + + // Update RenderActorInstance local bounding box + // NB: computing the local bbox from the world bbox makes the local bbox artificially larger than it should be + // instead EMFX should support getting the local bbox from the actor instance directly + m_localAABB = m_worldAABB.GetTransformedAabb(m_transformInterface->GetWorldTM().GetInverse()); + + // Update bbox on mesh instance if it exists + if (m_meshFeatureProcessor && m_meshHandle && m_meshHandle->IsValid() && m_skinnedMeshInstance) { - UpdateBounds(); + m_meshFeatureProcessor->SetLocalAabb(*m_meshHandle, m_localAABB); } - void AtomActorInstance::DebugDraw(const EMotionFX::ActorRenderFlagBitset& renderFlags) + AZ::Interface::Get()->RefreshEntityLocalBoundsUnion(m_entityId); + } + + AZ::Aabb AtomActorInstance::GetWorldBounds() + { + return m_worldAABB; + } + + AZ::Aabb AtomActorInstance::GetLocalBounds() + { + return m_localAABB; + } + + void AtomActorInstance::SetSkinningMethod(EMotionFX::Integration::SkinningMethod emfxSkinningMethod) + { + RenderActorInstance::SetSkinningMethod(emfxSkinningMethod); + + m_boneTransforms = CreateBoneTransformBufferFromActorInstance(m_actorInstance, emfxSkinningMethod); + // Release the Atom skinned mesh and acquire a new one to apply the new skinning method + UnregisterActor(); + RegisterActor(); + } + + SkinningMethod AtomActorInstance::GetAtomSkinningMethod() const + { + switch (GetSkinningMethod()) { - m_atomActorDebugDraw->DebugDraw(renderFlags, m_actorInstance); - } - - void AtomActorInstance::UpdateBounds() - { - // Update RenderActorInstance world bounding box - // The bounding box is moving with the actor instance. - // The entity and actor transforms are kept in sync already. - m_worldAABB = m_actorInstance->GetAabb(); - - // Update RenderActorInstance local bounding box - // NB: computing the local bbox from the world bbox makes the local bbox artificially larger than it should be - // instead EMFX should support getting the local bbox from the actor instance directly - m_localAABB = m_worldAABB.GetTransformedAabb(m_transformInterface->GetWorldTM().GetInverse()); - - // Update bbox on mesh instance if it exists - if (m_meshFeatureProcessor && m_meshHandle && m_meshHandle->IsValid() && m_skinnedMeshInstance) - { - m_meshFeatureProcessor->SetLocalAabb(*m_meshHandle, m_localAABB); - } - - AZ::Interface::Get()->RefreshEntityLocalBoundsUnion(m_entityId); - } - - AZ::Aabb AtomActorInstance::GetWorldBounds() - { - return m_worldAABB; - } - - AZ::Aabb AtomActorInstance::GetLocalBounds() - { - return m_localAABB; - } - - void AtomActorInstance::SetSkinningMethod(EMotionFX::Integration::SkinningMethod emfxSkinningMethod) - { - RenderActorInstance::SetSkinningMethod(emfxSkinningMethod); - - m_boneTransforms = CreateBoneTransformBufferFromActorInstance(m_actorInstance, emfxSkinningMethod); - // Release the Atom skinned mesh and acquire a new one to apply the new skinning method - UnregisterActor(); - RegisterActor(); - } - - SkinningMethod AtomActorInstance::GetAtomSkinningMethod() const - { - switch (GetSkinningMethod()) - { - case EMotionFX::Integration::SkinningMethod::DualQuat: - return SkinningMethod::DualQuaternion; - case EMotionFX::Integration::SkinningMethod::Linear: - return SkinningMethod::LinearSkinning; - default: - AZ_Error("AtomActorInstance", false, "Unsupported skinning method. Defaulting to linear"); - } - + case EMotionFX::Integration::SkinningMethod::DualQuat: + return SkinningMethod::DualQuaternion; + case EMotionFX::Integration::SkinningMethod::Linear: return SkinningMethod::LinearSkinning; + default: + AZ_Error("AtomActorInstance", false, "Unsupported skinning method. Defaulting to linear"); } - void AtomActorInstance::SetIsVisible(bool isVisible) + return SkinningMethod::LinearSkinning; + } + + void AtomActorInstance::SetIsVisible(bool isVisible) + { + if (IsVisible() != isVisible) { - if (IsVisible() != isVisible) + RenderActorInstance::SetIsVisible(isVisible); + if (m_meshFeatureProcessor && m_meshHandle) { - RenderActorInstance::SetIsVisible(isVisible); - if (m_meshFeatureProcessor && m_meshHandle) - { - m_meshFeatureProcessor->SetVisible(*m_meshHandle, isVisible); - } + m_meshFeatureProcessor->SetVisible(*m_meshHandle, isVisible); } } + } - AtomActor* AtomActorInstance::GetRenderActor() const + AtomActor* AtomActorInstance::GetRenderActor() const + { + EMotionFX::Integration::ActorAsset* actorAsset = m_actorAsset.Get(); + if (!actorAsset) { - EMotionFX::Integration::ActorAsset* actorAsset = m_actorAsset.Get(); - if (!actorAsset) - { - AZ_Assert(false, "Actor asset is not loaded."); - return nullptr; - } - - AtomActor* renderActor = azdynamic_cast(actorAsset->GetRenderActor()); - if (!renderActor) - { - AZ_Assert(false, "Expecting a Atom render backend actor."); - return nullptr; - } - - return renderActor; - } - - void AtomActorInstance::Activate() - { - m_skinnedMeshFeatureProcessor = RPI::Scene::GetFeatureProcessorForEntity(m_entityId); - AZ_Assert(m_skinnedMeshFeatureProcessor, "AtomActorInstance was unable to find a SkinnedMeshFeatureProcessor on the EntityContext provided."); - - m_meshFeatureProcessor = RPI::Scene::GetFeatureProcessorForEntity(m_entityId); - AZ_Assert(m_meshFeatureProcessor, "AtomActorInstance was unable to find a MeshFeatureProcessor on the EntityContext provided."); - - m_transformInterface = TransformBus::FindFirstHandler(m_entityId); - AZ_Warning("AtomActorInstance", m_transformInterface, "Unable to attach to a TransformBus handler. This skinned mesh will always be rendered at the origin."); - - SkinnedMeshFeatureProcessorNotificationBus::Handler::BusConnect(); - MaterialReceiverRequestBus::Handler::BusConnect(m_entityId); - LmbrCentral::SkeletalHierarchyRequestBus::Handler::BusConnect(m_entityId); - - Create(); - } - - void AtomActorInstance::Deactivate() - { - SkinnedMeshOutputStreamNotificationBus::Handler::BusDisconnect(); - LmbrCentral::SkeletalHierarchyRequestBus::Handler::BusDisconnect(); - MaterialReceiverRequestBus::Handler::BusDisconnect(); - SkinnedMeshFeatureProcessorNotificationBus::Handler::BusDisconnect(); - - Destroy(); - - m_meshFeatureProcessor = nullptr; - m_skinnedMeshFeatureProcessor = nullptr; - } - - RPI::ModelMaterialSlotMap AtomActorInstance::GetModelMaterialSlots() const - { - Data::Asset modelAsset = GetModelAsset(); - if (modelAsset.IsReady()) - { - return modelAsset->GetMaterialSlots(); - } - else - { - return {}; - } - } - - MaterialAssignmentId AtomActorInstance::FindMaterialAssignmentId( - const MaterialAssignmentLodIndex lod, const AZStd::string& label) const - { - if (m_skinnedMeshInstance && m_skinnedMeshInstance->m_model) - { - return FindMaterialAssignmentIdInModel(m_skinnedMeshInstance->m_model, lod, label); - } - - return MaterialAssignmentId(); - } - - MaterialAssignmentMap AtomActorInstance::GetMaterialAssignments() const - { - if (m_skinnedMeshInstance && m_skinnedMeshInstance->m_model) - { - return GetMaterialAssignmentsFromModel(m_skinnedMeshInstance->m_model); - } - - return MaterialAssignmentMap{}; - } - - AZStd::unordered_set AtomActorInstance::GetModelUvNames() const - { - if (m_skinnedMeshInstance && m_skinnedMeshInstance->m_model) - { - return m_skinnedMeshInstance->m_model->GetUvNames(); - } - return AZStd::unordered_set(); - } - - void AtomActorInstance::OnTransformChanged(const AZ::Transform& /*local*/, const AZ::Transform& world) - { - // The mesh transform is used to determine where the actor instance is actually rendered - m_meshFeatureProcessor->SetTransform(*m_meshHandle, world); // handle validity is checked internally. - - if (m_skinnedMeshRenderProxy.IsValid()) - { - // The skinned mesh transform is used to determine which Lod needs to be skinned - m_skinnedMeshRenderProxy->SetTransform(world); - } - } - - void AtomActorInstance::OnMaterialsUpdated(const MaterialAssignmentMap& materials) - { - if (m_meshFeatureProcessor) - { - m_meshFeatureProcessor->SetMaterialAssignmentMap(*m_meshHandle, materials); - } - } - - void AtomActorInstance::SetModelAsset([[maybe_unused]] Data::Asset modelAsset) - { - // Changing model asset is not supported by Atom Actor Instance. - // The model asset is obtained from the Actor inside the ActorAsset, - // which is passed to the constructor. To set a different model asset - // this instance should use a different Actor. - AZ_Assert(false, "AtomActorInstance::SetModelAsset not supported"); - } - - Data::Asset AtomActorInstance::GetModelAsset() const - { - AZ_Assert(GetActor(), "Expecting a Atom Actor Instance having a valid Actor."); - return GetActor()->GetMeshAsset(); - } - - void AtomActorInstance::SetModelAssetId([[maybe_unused]] Data::AssetId modelAssetId) - { - // Changing model asset is not supported by Atom Actor Instance. - // The model asset is obtained from the Actor inside the ActorAsset, - // which is passed to the constructor. To set a different model asset - // this instance should use a different Actor. - AZ_Assert(false, "AtomActorInstance::SetModelAssetId not supported"); - } - - Data::AssetId AtomActorInstance::GetModelAssetId() const - { - return GetModelAsset().GetId(); - } - - void AtomActorInstance::SetModelAssetPath([[maybe_unused]] const AZStd::string& modelAssetPath) - { - // Changing model asset is not supported by Atom Actor Instance. - // The model asset is obtained from the Actor inside the ActorAsset, - // which is passed to the constructor. To set a different model asset - // this instance should use a different Actor. - AZ_Assert(false, "AtomActorInstance::SetModelAssetPath not supported"); - } - - AZStd::string AtomActorInstance::GetModelAssetPath() const - { - return GetModelAsset().GetHint(); - } - - AZ::Data::Instance AtomActorInstance::GetModel() const - { - return m_skinnedMeshInstance->m_model; - } - - void AtomActorInstance::SetSortKey(RHI::DrawItemSortKey sortKey) - { - m_meshFeatureProcessor->SetSortKey(*m_meshHandle, sortKey); - } - - RHI::DrawItemSortKey AtomActorInstance::GetSortKey() const - { - return m_meshFeatureProcessor->GetSortKey(*m_meshHandle); - } - - void AtomActorInstance::SetLodType(RPI::Cullable::LodType lodType) - { - RPI::Cullable::LodConfiguration config = m_meshFeatureProcessor->GetMeshLodConfiguration(*m_meshHandle); - config.m_lodType = lodType; - m_meshFeatureProcessor->SetMeshLodConfiguration(*m_meshHandle, config); - } - - RPI::Cullable::LodType AtomActorInstance::GetLodType() const - { - return m_meshFeatureProcessor->GetMeshLodConfiguration(*m_meshHandle).m_lodType; - } - - void AtomActorInstance::SetLodOverride(RPI::Cullable::LodOverride lodOverride) - { - RPI::Cullable::LodConfiguration config = m_meshFeatureProcessor->GetMeshLodConfiguration(*m_meshHandle); - config.m_lodOverride = lodOverride; - m_meshFeatureProcessor->SetMeshLodConfiguration(*m_meshHandle, config); - } - - RPI::Cullable::LodOverride AtomActorInstance::GetLodOverride() const - { - return m_meshFeatureProcessor->GetMeshLodConfiguration(*m_meshHandle).m_lodOverride; - } - - void AtomActorInstance::SetMinimumScreenCoverage(float minimumScreenCoverage) - { - RPI::Cullable::LodConfiguration config = m_meshFeatureProcessor->GetMeshLodConfiguration(*m_meshHandle); - config.m_minimumScreenCoverage = minimumScreenCoverage; - m_meshFeatureProcessor->SetMeshLodConfiguration(*m_meshHandle, config); - } - - float AtomActorInstance::GetMinimumScreenCoverage() const - { - return m_meshFeatureProcessor->GetMeshLodConfiguration(*m_meshHandle).m_minimumScreenCoverage; - } - - void AtomActorInstance::SetQualityDecayRate(float qualityDecayRate) - { - RPI::Cullable::LodConfiguration config = m_meshFeatureProcessor->GetMeshLodConfiguration(*m_meshHandle); - config.m_qualityDecayRate = qualityDecayRate; - m_meshFeatureProcessor->SetMeshLodConfiguration(*m_meshHandle, config); - } - - float AtomActorInstance::GetQualityDecayRate() const - { - return m_meshFeatureProcessor->GetMeshLodConfiguration(*m_meshHandle).m_qualityDecayRate; - } - - void AtomActorInstance::SetVisibility(bool visible) - { - SetIsVisible(visible); - } - - bool AtomActorInstance::GetVisibility() const - { - return IsVisible(); - } - - AZ::u32 AtomActorInstance::GetJointCount() - { - return aznumeric_caster(m_actorInstance->GetActor()->GetSkeleton()->GetNumNodes()); - } - - const char* AtomActorInstance::GetJointNameByIndex(AZ::u32 jointIndex) - { - EMotionFX::Skeleton* skeleton = m_actorInstance->GetActor()->GetSkeleton(); - const size_t numNodes = skeleton->GetNumNodes(); - if (jointIndex < numNodes) - { - return skeleton->GetNode(jointIndex)->GetName(); - } - + AZ_Assert(false, "Actor asset is not loaded."); return nullptr; } - AZ::s32 AtomActorInstance::GetJointIndexByName(const char* jointName) + AtomActor* renderActor = azdynamic_cast(actorAsset->GetRenderActor()); + if (!renderActor) { - if (jointName) + AZ_Assert(false, "Expecting a Atom render backend actor."); + return nullptr; + } + + return renderActor; + } + + void AtomActorInstance::Activate() + { + m_skinnedMeshFeatureProcessor = RPI::Scene::GetFeatureProcessorForEntity(m_entityId); + AZ_Assert(m_skinnedMeshFeatureProcessor, "AtomActorInstance was unable to find a SkinnedMeshFeatureProcessor on the EntityContext provided."); + + m_meshFeatureProcessor = RPI::Scene::GetFeatureProcessorForEntity(m_entityId); + AZ_Assert(m_meshFeatureProcessor, "AtomActorInstance was unable to find a MeshFeatureProcessor on the EntityContext provided."); + + m_transformInterface = TransformBus::FindFirstHandler(m_entityId); + AZ_Warning("AtomActorInstance", m_transformInterface, "Unable to attach to a TransformBus handler. This skinned mesh will always be rendered at the origin."); + + SkinnedMeshFeatureProcessorNotificationBus::Handler::BusConnect(); + MaterialReceiverRequestBus::Handler::BusConnect(m_entityId); + LmbrCentral::SkeletalHierarchyRequestBus::Handler::BusConnect(m_entityId); + + Create(); + } + + void AtomActorInstance::Deactivate() + { + SkinnedMeshOutputStreamNotificationBus::Handler::BusDisconnect(); + LmbrCentral::SkeletalHierarchyRequestBus::Handler::BusDisconnect(); + MaterialReceiverRequestBus::Handler::BusDisconnect(); + SkinnedMeshFeatureProcessorNotificationBus::Handler::BusDisconnect(); + + Destroy(); + + m_meshFeatureProcessor = nullptr; + m_skinnedMeshFeatureProcessor = nullptr; + } + + RPI::ModelMaterialSlotMap AtomActorInstance::GetModelMaterialSlots() const + { + Data::Asset modelAsset = GetModelAsset(); + if (modelAsset.IsReady()) + { + return modelAsset->GetMaterialSlots(); + } + else + { + return {}; + } + } + + MaterialAssignmentId AtomActorInstance::FindMaterialAssignmentId( + const MaterialAssignmentLodIndex lod, const AZStd::string& label) const + { + if (m_skinnedMeshInstance && m_skinnedMeshInstance->m_model) + { + return FindMaterialAssignmentIdInModel(m_skinnedMeshInstance->m_model, lod, label); + } + + return MaterialAssignmentId(); + } + + MaterialAssignmentMap AtomActorInstance::GetMaterialAssignments() const + { + if (m_skinnedMeshInstance && m_skinnedMeshInstance->m_model) + { + return GetMaterialAssignmentsFromModel(m_skinnedMeshInstance->m_model); + } + + return MaterialAssignmentMap{}; + } + + AZStd::unordered_set AtomActorInstance::GetModelUvNames() const + { + if (m_skinnedMeshInstance && m_skinnedMeshInstance->m_model) + { + return m_skinnedMeshInstance->m_model->GetUvNames(); + } + return AZStd::unordered_set(); + } + + void AtomActorInstance::OnTransformChanged(const AZ::Transform& /*local*/, const AZ::Transform& world) + { + // The mesh transform is used to determine where the actor instance is actually rendered + m_meshFeatureProcessor->SetTransform(*m_meshHandle, world); // handle validity is checked internally. + + if (m_skinnedMeshRenderProxy.IsValid()) + { + // The skinned mesh transform is used to determine which Lod needs to be skinned + m_skinnedMeshRenderProxy->SetTransform(world); + } + } + + void AtomActorInstance::OnMaterialsUpdated(const MaterialAssignmentMap& materials) + { + if (m_meshFeatureProcessor) + { + m_meshFeatureProcessor->SetMaterialAssignmentMap(*m_meshHandle, materials); + } + } + + void AtomActorInstance::SetModelAsset([[maybe_unused]] Data::Asset modelAsset) + { + // Changing model asset is not supported by Atom Actor Instance. + // The model asset is obtained from the Actor inside the ActorAsset, + // which is passed to the constructor. To set a different model asset + // this instance should use a different Actor. + AZ_Assert(false, "AtomActorInstance::SetModelAsset not supported"); + } + + Data::Asset AtomActorInstance::GetModelAsset() const + { + AZ_Assert(GetActor(), "Expecting a Atom Actor Instance having a valid Actor."); + return GetActor()->GetMeshAsset(); + } + + void AtomActorInstance::SetModelAssetId([[maybe_unused]] Data::AssetId modelAssetId) + { + // Changing model asset is not supported by Atom Actor Instance. + // The model asset is obtained from the Actor inside the ActorAsset, + // which is passed to the constructor. To set a different model asset + // this instance should use a different Actor. + AZ_Assert(false, "AtomActorInstance::SetModelAssetId not supported"); + } + + Data::AssetId AtomActorInstance::GetModelAssetId() const + { + return GetModelAsset().GetId(); + } + + void AtomActorInstance::SetModelAssetPath([[maybe_unused]] const AZStd::string& modelAssetPath) + { + // Changing model asset is not supported by Atom Actor Instance. + // The model asset is obtained from the Actor inside the ActorAsset, + // which is passed to the constructor. To set a different model asset + // this instance should use a different Actor. + AZ_Assert(false, "AtomActorInstance::SetModelAssetPath not supported"); + } + + AZStd::string AtomActorInstance::GetModelAssetPath() const + { + return GetModelAsset().GetHint(); + } + + AZ::Data::Instance AtomActorInstance::GetModel() const + { + return m_skinnedMeshInstance->m_model; + } + + void AtomActorInstance::SetSortKey(RHI::DrawItemSortKey sortKey) + { + m_meshFeatureProcessor->SetSortKey(*m_meshHandle, sortKey); + } + + RHI::DrawItemSortKey AtomActorInstance::GetSortKey() const + { + return m_meshFeatureProcessor->GetSortKey(*m_meshHandle); + } + + void AtomActorInstance::SetLodType(RPI::Cullable::LodType lodType) + { + RPI::Cullable::LodConfiguration config = m_meshFeatureProcessor->GetMeshLodConfiguration(*m_meshHandle); + config.m_lodType = lodType; + m_meshFeatureProcessor->SetMeshLodConfiguration(*m_meshHandle, config); + } + + RPI::Cullable::LodType AtomActorInstance::GetLodType() const + { + return m_meshFeatureProcessor->GetMeshLodConfiguration(*m_meshHandle).m_lodType; + } + + void AtomActorInstance::SetLodOverride(RPI::Cullable::LodOverride lodOverride) + { + RPI::Cullable::LodConfiguration config = m_meshFeatureProcessor->GetMeshLodConfiguration(*m_meshHandle); + config.m_lodOverride = lodOverride; + m_meshFeatureProcessor->SetMeshLodConfiguration(*m_meshHandle, config); + } + + RPI::Cullable::LodOverride AtomActorInstance::GetLodOverride() const + { + return m_meshFeatureProcessor->GetMeshLodConfiguration(*m_meshHandle).m_lodOverride; + } + + void AtomActorInstance::SetMinimumScreenCoverage(float minimumScreenCoverage) + { + RPI::Cullable::LodConfiguration config = m_meshFeatureProcessor->GetMeshLodConfiguration(*m_meshHandle); + config.m_minimumScreenCoverage = minimumScreenCoverage; + m_meshFeatureProcessor->SetMeshLodConfiguration(*m_meshHandle, config); + } + + float AtomActorInstance::GetMinimumScreenCoverage() const + { + return m_meshFeatureProcessor->GetMeshLodConfiguration(*m_meshHandle).m_minimumScreenCoverage; + } + + void AtomActorInstance::SetQualityDecayRate(float qualityDecayRate) + { + RPI::Cullable::LodConfiguration config = m_meshFeatureProcessor->GetMeshLodConfiguration(*m_meshHandle); + config.m_qualityDecayRate = qualityDecayRate; + m_meshFeatureProcessor->SetMeshLodConfiguration(*m_meshHandle, config); + } + + float AtomActorInstance::GetQualityDecayRate() const + { + return m_meshFeatureProcessor->GetMeshLodConfiguration(*m_meshHandle).m_qualityDecayRate; + } + + void AtomActorInstance::SetVisibility(bool visible) + { + SetIsVisible(visible); + } + + bool AtomActorInstance::GetVisibility() const + { + return IsVisible(); + } + + AZ::u32 AtomActorInstance::GetJointCount() + { + return aznumeric_caster(m_actorInstance->GetActor()->GetSkeleton()->GetNumNodes()); + } + + const char* AtomActorInstance::GetJointNameByIndex(AZ::u32 jointIndex) + { + EMotionFX::Skeleton* skeleton = m_actorInstance->GetActor()->GetSkeleton(); + const size_t numNodes = skeleton->GetNumNodes(); + if (jointIndex < numNodes) + { + return skeleton->GetNode(jointIndex)->GetName(); + } + + return nullptr; + } + + AZ::s32 AtomActorInstance::GetJointIndexByName(const char* jointName) + { + if (jointName) + { + EMotionFX::Skeleton* skeleton = m_actorInstance->GetActor()->GetSkeleton(); + const size_t numNodes = skeleton->GetNumNodes(); + for (size_t nodeIndex = 0; nodeIndex < numNodes; ++nodeIndex) { - EMotionFX::Skeleton* skeleton = m_actorInstance->GetActor()->GetSkeleton(); - const size_t numNodes = skeleton->GetNumNodes(); - for (size_t nodeIndex = 0; nodeIndex < numNodes; ++nodeIndex) + if (0 == azstricmp(jointName, skeleton->GetNode(nodeIndex)->GetName())) { - if (0 == azstricmp(jointName, skeleton->GetNode(nodeIndex)->GetName())) - { - return aznumeric_caster(nodeIndex); - } + return aznumeric_caster(nodeIndex); } } - - return -1; } - AZ::Transform AtomActorInstance::GetJointTransformCharacterRelative(AZ::u32 jointIndex) - { - const EMotionFX::TransformData* transforms = m_actorInstance->GetTransformData(); - if (transforms && jointIndex < transforms->GetNumTransforms()) - { - return MCore::EmfxTransformToAzTransform(transforms->GetCurrentPose()->GetModelSpaceTransform(jointIndex)); - } + return -1; + } - return AZ::Transform::CreateIdentity(); + AZ::Transform AtomActorInstance::GetJointTransformCharacterRelative(AZ::u32 jointIndex) + { + const EMotionFX::TransformData* transforms = m_actorInstance->GetTransformData(); + if (transforms && jointIndex < transforms->GetNumTransforms()) + { + return MCore::EmfxTransformToAzTransform(transforms->GetCurrentPose()->GetModelSpaceTransform(jointIndex)); } - void AtomActorInstance::Create() - { - Destroy(); - m_skinnedMeshInputBuffers = GetRenderActor()->FindOrCreateSkinnedMeshInputBuffers(); - AZ_Warning("AtomActorInstance", m_skinnedMeshInputBuffers, "Failed to create SkinnedMeshInputBuffers from Actor. It is likely that this actor doesn't have any meshes"); - if (m_skinnedMeshInputBuffers) - { - m_boneTransforms = CreateBoneTransformBufferFromActorInstance(m_actorInstance, GetSkinningMethod()); - AZ_Error("AtomActorInstance", m_boneTransforms || AZ::RHI::IsNullRenderer(), "Failed to create bone transform buffer."); + return AZ::Transform::CreateIdentity(); + } - // If the instance is created before the default materials on the model have finished loading, the mesh feature processor will ignore it. - // Wait for them all to be ready before creating the instance - size_t lodCount = m_skinnedMeshInputBuffers->GetLodCount(); - for (size_t lodIndex = 0; lodIndex < lodCount; ++lodIndex) + void AtomActorInstance::Create() + { + Destroy(); + m_skinnedMeshInputBuffers = GetRenderActor()->FindOrCreateSkinnedMeshInputBuffers(); + AZ_Warning("AtomActorInstance", m_skinnedMeshInputBuffers, "Failed to create SkinnedMeshInputBuffers from Actor. It is likely that this actor doesn't have any meshes"); + if (m_skinnedMeshInputBuffers) + { + m_boneTransforms = CreateBoneTransformBufferFromActorInstance(m_actorInstance, GetSkinningMethod()); + AZ_Error("AtomActorInstance", m_boneTransforms || AZ::RHI::IsNullRenderer(), "Failed to create bone transform buffer."); + + // If the instance is created before the default materials on the model have finished loading, the mesh feature processor will ignore it. + // Wait for them all to be ready before creating the instance + size_t lodCount = m_skinnedMeshInputBuffers->GetLodCount(); + for (size_t lodIndex = 0; lodIndex < lodCount; ++lodIndex) + { + const SkinnedMeshInputLod& inputLod = m_skinnedMeshInputBuffers->GetLod(lodIndex); + const AZStd::vector< SkinnedSubMeshProperties>& subMeshProperties = inputLod.GetSubMeshProperties(); + for (const SkinnedSubMeshProperties& submesh : subMeshProperties) { - const SkinnedMeshInputLod& inputLod = m_skinnedMeshInputBuffers->GetLod(lodIndex); - const AZStd::vector< SkinnedSubMeshProperties>& subMeshProperties = inputLod.GetSubMeshProperties(); - for (const SkinnedSubMeshProperties& submesh : subMeshProperties) - { - Data::Asset materialAsset = submesh.m_materialSlot.m_defaultMaterialAsset; - AZ_Error("AtomActorInstance", materialAsset, "Actor does not have a valid default material in lod %d", lodIndex); + Data::Asset materialAsset = submesh.m_materialSlot.m_defaultMaterialAsset; + AZ_Error("AtomActorInstance", materialAsset, "Actor does not have a valid default material in lod %d", lodIndex); - if (materialAsset) + if (materialAsset) + { + if (!materialAsset->IsReady()) { - if (!materialAsset->IsReady()) - { - // Start listening for the material's OnAssetReady event. - // AtomActorInstance::Create is called on the main thread, so there should be no need to synchronize with the OnAssetReady event handler - // since those events will also come from the main thread - m_waitForMaterialLoadIds.insert(materialAsset->GetId()); - Data::AssetBus::MultiHandler::BusConnect(materialAsset->GetId()); - } + // Start listening for the material's OnAssetReady event. + // AtomActorInstance::Create is called on the main thread, so there should be no need to synchronize with the OnAssetReady event handler + // since those events will also come from the main thread + m_waitForMaterialLoadIds.insert(materialAsset->GetId()); + Data::AssetBus::MultiHandler::BusConnect(materialAsset->GetId()); } } } - // If all the default materials are ready, create the skinned mesh instance - if (m_waitForMaterialLoadIds.empty()) - { - CreateSkinnedMeshInstance(); - } } - } - - void AtomActorInstance::OnAssetReady(AZ::Data::Asset asset) - { - Data::AssetBus::MultiHandler::BusDisconnect(asset->GetId()); - m_waitForMaterialLoadIds.erase(asset->GetId()); // If all the default materials are ready, create the skinned mesh instance if (m_waitForMaterialLoadIds.empty()) { CreateSkinnedMeshInstance(); } } + } - void AtomActorInstance::Destroy() - { - if (m_skinnedMeshInstance) - { - UnregisterActor(); - m_skinnedMeshInputBuffers.reset(); - m_skinnedMeshInstance.reset(); - m_boneTransforms.reset(); - } - } - - template - void swizzle_unique(AZStd::vector& values, const AZStd::vector& indices) - { - AZStd::vector out; - out.reserve(indices.size()); - - for (size_t i : indices) - { - out.push_back(AZStd::move(values[i])); - } - - values = AZStd::move(out); - } - - void AtomActorInstance::OnUpdateSkinningMatrices() - { - if (m_skinnedMeshRenderProxy.IsValid()) - { - AZStd::vector boneTransforms; - GetBoneTransformsFromActorInstance(m_actorInstance, boneTransforms, GetSkinningMethod()); - - m_skinnedMeshRenderProxy->SetSkinningMatrices(boneTransforms); - - // Update the morph weights for every lod. This does not mean they will all be dispatched, but they will all have up to date weights - // TODO: once culling is hooked up such that EMotionFX and Atom are always in sync about which lod to update, only update the currently visible lods [ATOM-13564] - const auto lodCount = aznumeric_cast(m_actorInstance->GetActor()->GetNumLODLevels()); - for (uint32_t lodIndex = 0; lodIndex < lodCount; ++lodIndex) - { - EMotionFX::MorphSetup* morphSetup = m_actorInstance->GetActor()->GetMorphSetup(lodIndex); - if (morphSetup) - { - // Track all the masks/weights that are currently active - m_wrinkleMasks.clear(); - m_wrinkleMaskWeights.clear(); - - size_t morphTargetCount = morphSetup->GetNumMorphTargets(); - m_morphTargetWeights.clear(); - for (size_t morphTargetIndex = 0; morphTargetIndex < morphTargetCount; ++morphTargetIndex) - { - EMotionFX::MorphTarget* morphTarget = morphSetup->GetMorphTarget(morphTargetIndex); - // check if we are dealing with a standard morph target - if (morphTarget->GetType() != EMotionFX::MorphTargetStandard::TYPE_ID) - { - continue; - } - - // down cast the morph target - EMotionFX::MorphTargetStandard* morphTargetStandard = static_cast(morphTarget); - - EMotionFX::MorphSetupInstance::MorphTarget* morphTargetSetupInstance = m_actorInstance->GetMorphSetupInstance()->FindMorphTargetByID(morphTargetStandard->GetID()); - - // Each morph target is split into several deform datas, all of which share the same weight but have unique min/max delta values - // and thus correspond with unique dispatches in the morph target pass - for (size_t deformDataIndex = 0; deformDataIndex < morphTargetStandard->GetNumDeformDatas(); ++deformDataIndex) - { - // Morph targets that don't deform any vertices (e.g. joint-based morph targets) are not registered in the render proxy. Skip adding their weights. - const EMotionFX::MorphTargetStandard::DeformData* deformData = morphTargetStandard->GetDeformData(deformDataIndex); - if (deformData->m_numVerts > 0) - { - float weight = morphTargetSetupInstance->GetWeight(); - m_morphTargetWeights.push_back(weight); - - // If the morph target is active and it has a wrinkle mask - auto wrinkleMaskIter = m_morphTargetWrinkleMaskMapsByLod[lodIndex].find(morphTargetStandard); - if (weight > 0 && wrinkleMaskIter != m_morphTargetWrinkleMaskMapsByLod[lodIndex].end()) - { - // Add the wrinkle mask and weight, to be set on the material - m_wrinkleMasks.push_back(wrinkleMaskIter->second); - m_wrinkleMaskWeights.push_back(weight); - } - } - } - } - - AZ_Assert(m_wrinkleMasks.size() == m_wrinkleMaskWeights.size(), "Must have equal # of masks and weights"); - - // If there's too many masks, truncate - if (m_wrinkleMasks.size() > s_maxActiveWrinkleMasks) - { - // Build a remapping of indices (because we want to sort two vectors) - AZStd::vector remapped; - remapped.resize_no_construct(m_wrinkleMasks.size()); - std::iota(remapped.begin(), remapped.end(), 0); - - // Sort index remapping by weight (highest first) - std::sort(remapped.begin(), remapped.end(), [&](size_t ia, size_t ib) { - return m_wrinkleMaskWeights[ia] > m_wrinkleMaskWeights[ib]; - }); - - // Truncate indices list - remapped.resize(s_maxActiveWrinkleMasks); - - // Remap wrinkle masks list and weights list - swizzle_unique(m_wrinkleMasks, remapped); - swizzle_unique(m_wrinkleMaskWeights, remapped); - } - - m_skinnedMeshRenderProxy->SetMorphTargetWeights(lodIndex, m_morphTargetWeights); - - // Until EMotionFX and Atom lods are synchronized [ATOM-13564] we don't know which EMotionFX lod to pull the weights from - // Until that is fixed, just use lod 0 [ATOM-15251] - if (lodIndex == 0) - { - UpdateWrinkleMasks(); - } - } - } - } - } - - void AtomActorInstance::RegisterActor() - { - MaterialAssignmentMap materials; - MaterialComponentRequestBus::EventResult(materials, m_entityId, &MaterialComponentRequests::GetMaterialOverrides); - CreateRenderProxy(materials); - - InitWrinkleMasks(); - - TransformNotificationBus::Handler::BusConnect(m_entityId); - MaterialComponentNotificationBus::Handler::BusConnect(m_entityId); - MeshComponentRequestBus::Handler::BusConnect(m_entityId); - - const Data::Instance model = m_meshFeatureProcessor->GetModel(*m_meshHandle); - MeshComponentNotificationBus::Event(m_entityId, &MeshComponentNotificationBus::Events::OnModelReady, GetModelAsset(), model); - } - - void AtomActorInstance::UnregisterActor() - { - MeshComponentNotificationBus::Event(m_entityId, &MeshComponentNotificationBus::Events::OnModelPreDestroy); - - MeshComponentRequestBus::Handler::BusDisconnect(); - MaterialComponentNotificationBus::Handler::BusDisconnect(); - TransformNotificationBus::Handler::BusDisconnect(); - m_skinnedMeshFeatureProcessor->ReleaseRenderProxyInterface(m_skinnedMeshRenderProxy); - if (m_meshHandle) - { - m_meshFeatureProcessor->ReleaseMesh(*m_meshHandle); - m_meshHandle = nullptr; - } - } - - void AtomActorInstance::CreateRenderProxy(const MaterialAssignmentMap& materials) - { - auto meshFeatureProcessor = RPI::Scene::GetFeatureProcessorForEntity(m_entityId); - AZ_Error("ActorComponentController", meshFeatureProcessor, "Unable to find a MeshFeatureProcessorInterface on the entityId."); - if (meshFeatureProcessor) - { - MeshHandleDescriptor meshDescriptor; - meshDescriptor.m_modelAsset = m_skinnedMeshInstance->m_model->GetModelAsset(); - - // [GFX TODO][ATOM-13067] Enable raytracing on skinned meshes - meshDescriptor.m_isRayTracingEnabled = false; - - m_meshHandle = AZStd::make_shared( - m_meshFeatureProcessor->AcquireMesh(meshDescriptor, materials)); - } - - // If render proxies already exist, they will be auto-freed - SkinnedMeshFeatureProcessorInterface::SkinnedMeshRenderProxyDesc desc{ m_skinnedMeshInputBuffers, m_skinnedMeshInstance, m_meshHandle, m_boneTransforms, {GetAtomSkinningMethod()} }; - m_skinnedMeshRenderProxy = m_skinnedMeshFeatureProcessor->AcquireRenderProxyInterface(desc); - - if (m_transformInterface) - { - OnTransformChanged(Transform::Identity(), m_transformInterface->GetWorldTM()); - } - else - { - OnTransformChanged(Transform::Identity(), Transform::Identity()); - } - } - - - void AtomActorInstance::CreateSkinnedMeshInstance() - { - SkinnedMeshOutputStreamNotificationBus::Handler::BusDisconnect(); - m_skinnedMeshInstance = m_skinnedMeshInputBuffers->CreateSkinnedMeshInstance(); - if (m_skinnedMeshInstance && m_skinnedMeshInstance->m_model) - { - MaterialReceiverNotificationBus::Event(m_entityId, &MaterialReceiverNotificationBus::Events::OnMaterialAssignmentsChanged); - RegisterActor(); - - // [TODO ATOM-15288] - // Temporary workaround for cloth to make sure the output skinned buffers are filled at least once. - // When meshes with cloth data are not dispatched for skinning FillSkinnedMeshInstanceBuffers can be removed. - FillSkinnedMeshInstanceBuffers(); - } - else - { - AZ_Warning("AtomActorInstance", m_skinnedMeshInstance, "Failed to create target skinned model. Will automatically attempt to re-create when skinned mesh memory is freed up."); - SkinnedMeshOutputStreamNotificationBus::Handler::BusConnect(); - } - } - - void AtomActorInstance::FillSkinnedMeshInstanceBuffers() - { - AZ_Assert( m_skinnedMeshInputBuffers->GetLodCount() == m_skinnedMeshInstance->m_outputStreamOffsetsInBytes.size(), - "Number of lods in Skinned Mesh Input Buffers (%d) does not match with Skinned Mesh Instance (%d)", - m_skinnedMeshInputBuffers->GetLodCount(), m_skinnedMeshInstance->m_outputStreamOffsetsInBytes.size()); - - for (size_t lodIndex = 0; lodIndex < m_skinnedMeshInputBuffers->GetLodCount(); ++lodIndex) - { - const SkinnedMeshInputLod& inputSkinnedMeshLod = m_skinnedMeshInputBuffers->GetLod(lodIndex); - const AZStd::vector& outputBufferOffsetsInBytes = m_skinnedMeshInstance->m_outputStreamOffsetsInBytes[lodIndex]; - uint32_t lodVertexCount = inputSkinnedMeshLod.GetVertexCount(); - - auto updateSkinnedMeshInstance = - [&inputSkinnedMeshLod, &outputBufferOffsetsInBytes, &lodVertexCount](SkinnedMeshInputVertexStreams inputStream, SkinnedMeshOutputVertexStreams outputStream) - { - const Data::Asset& inputBufferAsset = inputSkinnedMeshLod.GetSkinningInputBufferAsset(inputStream); - const RHI::BufferViewDescriptor& inputBufferViewDescriptor = inputBufferAsset->GetBufferViewDescriptor(); - - const uint64_t inputByteCount = aznumeric_cast(inputBufferViewDescriptor.m_elementCount) * aznumeric_cast(inputBufferViewDescriptor.m_elementSize); - const uint64_t inputByteOffset = aznumeric_cast(inputBufferViewDescriptor.m_elementOffset) * aznumeric_cast(inputBufferViewDescriptor.m_elementSize); - - const uint32_t outputElementSize = SkinnedMeshVertexStreamPropertyInterface::Get()->GetOutputStreamInfo(outputStream).m_elementSize; - [[maybe_unused]] const uint64_t outputByteCount = aznumeric_cast(lodVertexCount) * aznumeric_cast(outputElementSize); - const uint64_t outputByteOffset = aznumeric_cast(outputBufferOffsetsInBytes[static_cast(outputStream)]); - - // The byte count from input and output buffers doesn't have to match necessarily. - // For example the output positions buffer has double the amount of elements because it has - // another set of positions from the previous frame. - AZ_Assert(inputByteCount <= outputByteCount, "Trying to write too many bytes to output buffer."); - - // The shared buffer that all skinning output lives in - AZ::Data::Instance rpiBuffer = SkinnedMeshOutputStreamManagerInterface::Get()->GetBuffer(); - - rpiBuffer->UpdateData( - inputBufferAsset->GetBuffer().data() + inputByteOffset, - inputByteCount, - outputByteOffset); - }; - - updateSkinnedMeshInstance(SkinnedMeshInputVertexStreams::Position, SkinnedMeshOutputVertexStreams::Position); - updateSkinnedMeshInstance(SkinnedMeshInputVertexStreams::Normal, SkinnedMeshOutputVertexStreams::Normal); - updateSkinnedMeshInstance(SkinnedMeshInputVertexStreams::Tangent, SkinnedMeshOutputVertexStreams::Tangent); - updateSkinnedMeshInstance(SkinnedMeshInputVertexStreams::BiTangent, SkinnedMeshOutputVertexStreams::BiTangent); - } - } - - void AtomActorInstance::OnSkinnedMeshOutputStreamMemoryAvailable() + void AtomActorInstance::OnAssetReady(AZ::Data::Asset asset) + { + Data::AssetBus::MultiHandler::BusDisconnect(asset->GetId()); + m_waitForMaterialLoadIds.erase(asset->GetId()); + // If all the default materials are ready, create the skinned mesh instance + if (m_waitForMaterialLoadIds.empty()) { CreateSkinnedMeshInstance(); } + } - void AtomActorInstance::InitWrinkleMasks() + void AtomActorInstance::Destroy() + { + if (m_skinnedMeshInstance) { - EMotionFX::Actor* actor = m_actorAsset->GetActor(); - m_morphTargetWrinkleMaskMapsByLod.resize(m_skinnedMeshInputBuffers->GetLodCount()); - m_wrinkleMasks.reserve(s_maxActiveWrinkleMasks); - m_wrinkleMaskWeights.reserve(s_maxActiveWrinkleMasks); + UnregisterActor(); + m_skinnedMeshInputBuffers.reset(); + m_skinnedMeshInstance.reset(); + m_boneTransforms.reset(); + } + } - for (size_t lodIndex = 0; lodIndex < m_skinnedMeshInputBuffers->GetLodCount(); ++lodIndex) + template + void swizzle_unique(AZStd::vector& values, const AZStd::vector& indices) + { + AZStd::vector out; + out.reserve(indices.size()); + + for (size_t i : indices) + { + out.push_back(AZStd::move(values[i])); + } + + values = AZStd::move(out); + } + + void AtomActorInstance::OnUpdateSkinningMatrices() + { + if (m_skinnedMeshRenderProxy.IsValid()) + { + AZStd::vector boneTransforms; + GetBoneTransformsFromActorInstance(m_actorInstance, boneTransforms, GetSkinningMethod()); + + m_skinnedMeshRenderProxy->SetSkinningMatrices(boneTransforms); + + // Update the morph weights for every lod. This does not mean they will all be dispatched, but they will all have up to date weights + // TODO: once culling is hooked up such that EMotionFX and Atom are always in sync about which lod to update, only update the currently visible lods [ATOM-13564] + const auto lodCount = aznumeric_cast(m_actorInstance->GetActor()->GetNumLODLevels()); + for (uint32_t lodIndex = 0; lodIndex < lodCount; ++lodIndex) { - EMotionFX::MorphSetup* morphSetup = actor->GetMorphSetup(static_cast(lodIndex)); + EMotionFX::MorphSetup* morphSetup = m_actorInstance->GetActor()->GetMorphSetup(lodIndex); if (morphSetup) { - const AZStd::vector& metaDatas = actor->GetMorphTargetMetaAsset()->GetMorphTargets(); - // Loop over all the EMotionFX morph targets - size_t numMorphTargets = morphSetup->GetNumMorphTargets(); - for (size_t morphTargetIndex = 0; morphTargetIndex < numMorphTargets; ++morphTargetIndex) + // Track all the masks/weights that are currently active + m_wrinkleMasks.clear(); + m_wrinkleMaskWeights.clear(); + + size_t morphTargetCount = morphSetup->GetNumMorphTargets(); + m_morphTargetWeights.clear(); + for (size_t morphTargetIndex = 0; morphTargetIndex < morphTargetCount; ++morphTargetIndex) { - EMotionFX::MorphTargetStandard* morphTarget = static_cast(morphSetup->GetMorphTarget(morphTargetIndex)); - for (const RPI::MorphTargetMetaAsset::MorphTarget& metaData : metaDatas) + EMotionFX::MorphTarget* morphTarget = morphSetup->GetMorphTarget(morphTargetIndex); + // check if we are dealing with a standard morph target + if (morphTarget->GetType() != EMotionFX::MorphTargetStandard::TYPE_ID) { - // Find the metaData associated with this morph target - if (metaData.m_morphTargetName == morphTarget->GetNameString() && metaData.m_wrinkleMask && metaData.m_numVertices > 0) + continue; + } + + // down cast the morph target + EMotionFX::MorphTargetStandard* morphTargetStandard = static_cast(morphTarget); + + EMotionFX::MorphSetupInstance::MorphTarget* morphTargetSetupInstance = m_actorInstance->GetMorphSetupInstance()->FindMorphTargetByID(morphTargetStandard->GetID()); + + // Each morph target is split into several deform datas, all of which share the same weight but have unique min/max delta values + // and thus correspond with unique dispatches in the morph target pass + for (size_t deformDataIndex = 0; deformDataIndex < morphTargetStandard->GetNumDeformDatas(); ++deformDataIndex) + { + // Morph targets that don't deform any vertices (e.g. joint-based morph targets) are not registered in the render proxy. Skip adding their weights. + const EMotionFX::MorphTargetStandard::DeformData* deformData = morphTargetStandard->GetDeformData(deformDataIndex); + if (deformData->m_numVerts > 0) { - // If the metaData has a wrinkle mask, add it to the map - Data::Instance streamingImage = RPI::StreamingImage::FindOrCreate(metaData.m_wrinkleMask); - if (streamingImage) + float weight = morphTargetSetupInstance->GetWeight(); + m_morphTargetWeights.push_back(weight); + + // If the morph target is active and it has a wrinkle mask + auto wrinkleMaskIter = m_morphTargetWrinkleMaskMapsByLod[lodIndex].find(morphTargetStandard); + if (weight > 0 && wrinkleMaskIter != m_morphTargetWrinkleMaskMapsByLod[lodIndex].end()) { - m_morphTargetWrinkleMaskMapsByLod[lodIndex][morphTarget] = streamingImage; + // Add the wrinkle mask and weight, to be set on the material + m_wrinkleMasks.push_back(wrinkleMaskIter->second); + m_wrinkleMaskWeights.push_back(weight); } } } } - } - } - } - void AtomActorInstance::UpdateWrinkleMasks() - { - if (m_meshHandle) - { - Data::Instance wrinkleMaskObjectSrg = m_meshFeatureProcessor->GetObjectSrg(*m_meshHandle); - if (wrinkleMaskObjectSrg) - { - RHI::ShaderInputImageIndex wrinkleMasksIndex = wrinkleMaskObjectSrg->FindShaderInputImageIndex(Name{ "m_wrinkle_masks" }); - RHI::ShaderInputConstantIndex wrinkleMaskWeightsIndex = wrinkleMaskObjectSrg->FindShaderInputConstantIndex(Name{ "m_wrinkle_mask_weights" }); - RHI::ShaderInputConstantIndex wrinkleMaskCountIndex = wrinkleMaskObjectSrg->FindShaderInputConstantIndex(Name{ "m_wrinkle_mask_count" }); - if (wrinkleMasksIndex.IsValid() || wrinkleMaskWeightsIndex.IsValid() || wrinkleMaskCountIndex.IsValid()) + AZ_Assert(m_wrinkleMasks.size() == m_wrinkleMaskWeights.size(), "Must have equal # of masks and weights"); + + // If there's too many masks, truncate + if (m_wrinkleMasks.size() > s_maxActiveWrinkleMasks) { - AZ_Error("AtomActorInstance", wrinkleMasksIndex.IsValid(), "m_wrinkle_masks not found on the ObjectSrg, but m_wrinkle_mask_weights and/or m_wrinkle_mask_count are being used."); - AZ_Error("AtomActorInstance", wrinkleMaskWeightsIndex.IsValid(), "m_wrinkle_mask_weights not found on the ObjectSrg, but m_wrinkle_masks and/or m_wrinkle_mask_count are being used."); - AZ_Error("AtomActorInstance", wrinkleMaskCountIndex.IsValid(), "m_wrinkle_mask_count not found on the ObjectSrg, but m_wrinkle_mask_weights and/or m_wrinkle_masks are being used."); + // Build a remapping of indices (because we want to sort two vectors) + AZStd::vector remapped; + remapped.resize_no_construct(m_wrinkleMasks.size()); + std::iota(remapped.begin(), remapped.end(), 0); - if (m_wrinkleMasks.size()) - { - wrinkleMaskObjectSrg->SetImageArray(wrinkleMasksIndex, AZStd::array_view>(m_wrinkleMasks.data(), m_wrinkleMasks.size())); + // Sort index remapping by weight (highest first) + std::sort(remapped.begin(), remapped.end(), [&](size_t ia, size_t ib) { + return m_wrinkleMaskWeights[ia] > m_wrinkleMaskWeights[ib]; + }); - // Set the weights for any active masks - for (size_t i = 0; i < m_wrinkleMaskWeights.size(); ++i) - { - wrinkleMaskObjectSrg->SetConstant(wrinkleMaskWeightsIndex, m_wrinkleMaskWeights[i], static_cast(i)); - } - AZ_Error("AtomActorInstance", m_wrinkleMaskWeights.size() <= s_maxActiveWrinkleMasks, "The skinning shader supports no more than %d active morph targets with wrinkle masks.", s_maxActiveWrinkleMasks); - } + // Truncate indices list + remapped.resize(s_maxActiveWrinkleMasks); - wrinkleMaskObjectSrg->SetConstant(wrinkleMaskCountIndex, aznumeric_cast(m_wrinkleMasks.size())); - m_meshFeatureProcessor->QueueObjectSrgForCompile(*m_meshHandle); + // Remap wrinkle masks list and weights list + swizzle_unique(m_wrinkleMasks, remapped); + swizzle_unique(m_wrinkleMaskWeights, remapped); + } + + m_skinnedMeshRenderProxy->SetMorphTargetWeights(lodIndex, m_morphTargetWeights); + + // Until EMotionFX and Atom lods are synchronized [ATOM-13564] we don't know which EMotionFX lod to pull the weights from + // Until that is fixed, just use lod 0 [ATOM-15251] + if (lodIndex == 0) + { + UpdateWrinkleMasks(); } } } } + } - } //namespace Render -} // namespace AZ + void AtomActorInstance::RegisterActor() + { + MaterialAssignmentMap materials; + MaterialComponentRequestBus::EventResult(materials, m_entityId, &MaterialComponentRequests::GetMaterialOverrides); + CreateRenderProxy(materials); + + InitWrinkleMasks(); + + TransformNotificationBus::Handler::BusConnect(m_entityId); + MaterialComponentNotificationBus::Handler::BusConnect(m_entityId); + MeshComponentRequestBus::Handler::BusConnect(m_entityId); + + const Data::Instance model = m_meshFeatureProcessor->GetModel(*m_meshHandle); + MeshComponentNotificationBus::Event(m_entityId, &MeshComponentNotificationBus::Events::OnModelReady, GetModelAsset(), model); + } + + void AtomActorInstance::UnregisterActor() + { + MeshComponentNotificationBus::Event(m_entityId, &MeshComponentNotificationBus::Events::OnModelPreDestroy); + + MeshComponentRequestBus::Handler::BusDisconnect(); + MaterialComponentNotificationBus::Handler::BusDisconnect(); + TransformNotificationBus::Handler::BusDisconnect(); + m_skinnedMeshFeatureProcessor->ReleaseRenderProxyInterface(m_skinnedMeshRenderProxy); + if (m_meshHandle) + { + m_meshFeatureProcessor->ReleaseMesh(*m_meshHandle); + m_meshHandle = nullptr; + } + } + + void AtomActorInstance::CreateRenderProxy(const MaterialAssignmentMap& materials) + { + auto meshFeatureProcessor = RPI::Scene::GetFeatureProcessorForEntity(m_entityId); + AZ_Error("ActorComponentController", meshFeatureProcessor, "Unable to find a MeshFeatureProcessorInterface on the entityId."); + if (meshFeatureProcessor) + { + MeshHandleDescriptor meshDescriptor; + meshDescriptor.m_modelAsset = m_skinnedMeshInstance->m_model->GetModelAsset(); + + // [GFX TODO][ATOM-13067] Enable raytracing on skinned meshes + meshDescriptor.m_isRayTracingEnabled = false; + + m_meshHandle = AZStd::make_shared( + m_meshFeatureProcessor->AcquireMesh(meshDescriptor, materials)); + } + + // If render proxies already exist, they will be auto-freed + SkinnedMeshFeatureProcessorInterface::SkinnedMeshRenderProxyDesc desc{ m_skinnedMeshInputBuffers, m_skinnedMeshInstance, m_meshHandle, m_boneTransforms, {GetAtomSkinningMethod()} }; + m_skinnedMeshRenderProxy = m_skinnedMeshFeatureProcessor->AcquireRenderProxyInterface(desc); + + if (m_transformInterface) + { + OnTransformChanged(Transform::Identity(), m_transformInterface->GetWorldTM()); + } + else + { + OnTransformChanged(Transform::Identity(), Transform::Identity()); + } + } + + + void AtomActorInstance::CreateSkinnedMeshInstance() + { + SkinnedMeshOutputStreamNotificationBus::Handler::BusDisconnect(); + m_skinnedMeshInstance = m_skinnedMeshInputBuffers->CreateSkinnedMeshInstance(); + if (m_skinnedMeshInstance && m_skinnedMeshInstance->m_model) + { + MaterialReceiverNotificationBus::Event(m_entityId, &MaterialReceiverNotificationBus::Events::OnMaterialAssignmentsChanged); + RegisterActor(); + + // [TODO ATOM-15288] + // Temporary workaround for cloth to make sure the output skinned buffers are filled at least once. + // When meshes with cloth data are not dispatched for skinning FillSkinnedMeshInstanceBuffers can be removed. + FillSkinnedMeshInstanceBuffers(); + } + else + { + AZ_Warning("AtomActorInstance", m_skinnedMeshInstance, "Failed to create target skinned model. Will automatically attempt to re-create when skinned mesh memory is freed up."); + SkinnedMeshOutputStreamNotificationBus::Handler::BusConnect(); + } + } + + void AtomActorInstance::FillSkinnedMeshInstanceBuffers() + { + AZ_Assert( m_skinnedMeshInputBuffers->GetLodCount() == m_skinnedMeshInstance->m_outputStreamOffsetsInBytes.size(), + "Number of lods in Skinned Mesh Input Buffers (%d) does not match with Skinned Mesh Instance (%d)", + m_skinnedMeshInputBuffers->GetLodCount(), m_skinnedMeshInstance->m_outputStreamOffsetsInBytes.size()); + + for (size_t lodIndex = 0; lodIndex < m_skinnedMeshInputBuffers->GetLodCount(); ++lodIndex) + { + const SkinnedMeshInputLod& inputSkinnedMeshLod = m_skinnedMeshInputBuffers->GetLod(lodIndex); + const AZStd::vector& outputBufferOffsetsInBytes = m_skinnedMeshInstance->m_outputStreamOffsetsInBytes[lodIndex]; + uint32_t lodVertexCount = inputSkinnedMeshLod.GetVertexCount(); + + auto updateSkinnedMeshInstance = + [&inputSkinnedMeshLod, &outputBufferOffsetsInBytes, &lodVertexCount](SkinnedMeshInputVertexStreams inputStream, SkinnedMeshOutputVertexStreams outputStream) + { + const Data::Asset& inputBufferAsset = inputSkinnedMeshLod.GetSkinningInputBufferAsset(inputStream); + const RHI::BufferViewDescriptor& inputBufferViewDescriptor = inputBufferAsset->GetBufferViewDescriptor(); + + const uint64_t inputByteCount = aznumeric_cast(inputBufferViewDescriptor.m_elementCount) * aznumeric_cast(inputBufferViewDescriptor.m_elementSize); + const uint64_t inputByteOffset = aznumeric_cast(inputBufferViewDescriptor.m_elementOffset) * aznumeric_cast(inputBufferViewDescriptor.m_elementSize); + + const uint32_t outputElementSize = SkinnedMeshVertexStreamPropertyInterface::Get()->GetOutputStreamInfo(outputStream).m_elementSize; + [[maybe_unused]] const uint64_t outputByteCount = aznumeric_cast(lodVertexCount) * aznumeric_cast(outputElementSize); + const uint64_t outputByteOffset = aznumeric_cast(outputBufferOffsetsInBytes[static_cast(outputStream)]); + + // The byte count from input and output buffers doesn't have to match necessarily. + // For example the output positions buffer has double the amount of elements because it has + // another set of positions from the previous frame. + AZ_Assert(inputByteCount <= outputByteCount, "Trying to write too many bytes to output buffer."); + + // The shared buffer that all skinning output lives in + AZ::Data::Instance rpiBuffer = SkinnedMeshOutputStreamManagerInterface::Get()->GetBuffer(); + + rpiBuffer->UpdateData( + inputBufferAsset->GetBuffer().data() + inputByteOffset, + inputByteCount, + outputByteOffset); + }; + + updateSkinnedMeshInstance(SkinnedMeshInputVertexStreams::Position, SkinnedMeshOutputVertexStreams::Position); + updateSkinnedMeshInstance(SkinnedMeshInputVertexStreams::Normal, SkinnedMeshOutputVertexStreams::Normal); + updateSkinnedMeshInstance(SkinnedMeshInputVertexStreams::Tangent, SkinnedMeshOutputVertexStreams::Tangent); + updateSkinnedMeshInstance(SkinnedMeshInputVertexStreams::BiTangent, SkinnedMeshOutputVertexStreams::BiTangent); + } + } + + void AtomActorInstance::OnSkinnedMeshOutputStreamMemoryAvailable() + { + CreateSkinnedMeshInstance(); + } + + void AtomActorInstance::InitWrinkleMasks() + { + EMotionFX::Actor* actor = m_actorAsset->GetActor(); + m_morphTargetWrinkleMaskMapsByLod.resize(m_skinnedMeshInputBuffers->GetLodCount()); + m_wrinkleMasks.reserve(s_maxActiveWrinkleMasks); + m_wrinkleMaskWeights.reserve(s_maxActiveWrinkleMasks); + + for (size_t lodIndex = 0; lodIndex < m_skinnedMeshInputBuffers->GetLodCount(); ++lodIndex) + { + EMotionFX::MorphSetup* morphSetup = actor->GetMorphSetup(static_cast(lodIndex)); + if (morphSetup) + { + const AZStd::vector& metaDatas = actor->GetMorphTargetMetaAsset()->GetMorphTargets(); + // Loop over all the EMotionFX morph targets + size_t numMorphTargets = morphSetup->GetNumMorphTargets(); + for (size_t morphTargetIndex = 0; morphTargetIndex < numMorphTargets; ++morphTargetIndex) + { + EMotionFX::MorphTargetStandard* morphTarget = static_cast(morphSetup->GetMorphTarget(morphTargetIndex)); + for (const RPI::MorphTargetMetaAsset::MorphTarget& metaData : metaDatas) + { + // Find the metaData associated with this morph target + if (metaData.m_morphTargetName == morphTarget->GetNameString() && metaData.m_wrinkleMask && metaData.m_numVertices > 0) + { + // If the metaData has a wrinkle mask, add it to the map + Data::Instance streamingImage = RPI::StreamingImage::FindOrCreate(metaData.m_wrinkleMask); + if (streamingImage) + { + m_morphTargetWrinkleMaskMapsByLod[lodIndex][morphTarget] = streamingImage; + } + } + } + } + } + } + } + + void AtomActorInstance::UpdateWrinkleMasks() + { + if (m_meshHandle) + { + const AZStd::vector>& wrinkleMaskObjectSrgs = m_meshFeatureProcessor->GetObjectSrgs(*m_meshHandle); + + for (auto& wrinkleMaskObjectSrg : wrinkleMaskObjectSrgs) + { + RHI::ShaderInputImageIndex wrinkleMasksIndex = wrinkleMaskObjectSrg->FindShaderInputImageIndex(Name{ "m_wrinkle_masks" }); + RHI::ShaderInputConstantIndex wrinkleMaskWeightsIndex = wrinkleMaskObjectSrg->FindShaderInputConstantIndex(Name{ "m_wrinkle_mask_weights" }); + RHI::ShaderInputConstantIndex wrinkleMaskCountIndex = wrinkleMaskObjectSrg->FindShaderInputConstantIndex(Name{ "m_wrinkle_mask_count" }); + + if (wrinkleMasksIndex.IsValid() || wrinkleMaskWeightsIndex.IsValid() || wrinkleMaskCountIndex.IsValid()) + { + AZ_Error("AtomActorInstance", wrinkleMasksIndex.IsValid(), "m_wrinkle_masks not found on the ObjectSrg, but m_wrinkle_mask_weights and/or m_wrinkle_mask_count are being used."); + AZ_Error("AtomActorInstance", wrinkleMaskWeightsIndex.IsValid(), "m_wrinkle_mask_weights not found on the ObjectSrg, but m_wrinkle_masks and/or m_wrinkle_mask_count are being used."); + AZ_Error("AtomActorInstance", wrinkleMaskCountIndex.IsValid(), "m_wrinkle_mask_count not found on the ObjectSrg, but m_wrinkle_mask_weights and/or m_wrinkle_masks are being used."); + + if (m_wrinkleMasks.size()) + { + wrinkleMaskObjectSrg->SetImageArray(wrinkleMasksIndex, AZStd::array_view>(m_wrinkleMasks.data(), m_wrinkleMasks.size())); + + // Set the weights for any active masks + for (size_t i = 0; i < m_wrinkleMaskWeights.size(); ++i) + { + wrinkleMaskObjectSrg->SetConstant(wrinkleMaskWeightsIndex, m_wrinkleMaskWeights[i], static_cast(i)); + } + AZ_Error("AtomActorInstance", m_wrinkleMaskWeights.size() <= s_maxActiveWrinkleMasks, "The skinning shader supports no more than %d active morph targets with wrinkle masks.", s_maxActiveWrinkleMasks); + } + + wrinkleMaskObjectSrg->SetConstant(wrinkleMaskCountIndex, aznumeric_cast(m_wrinkleMasks.size())); + m_meshFeatureProcessor->QueueObjectSrgForCompile(*m_meshHandle); + } + } + } + } + +} // namespace AZ::Render diff --git a/Gems/AtomLyIntegration/EMotionFXAtom/Code/Tools/EMStudio/AnimViewportRenderer.cpp b/Gems/AtomLyIntegration/EMotionFXAtom/Code/Tools/EMStudio/AnimViewportRenderer.cpp index 1d62e61b0a..5e4afb68c7 100644 --- a/Gems/AtomLyIntegration/EMotionFXAtom/Code/Tools/EMStudio/AnimViewportRenderer.cpp +++ b/Gems/AtomLyIntegration/EMotionFXAtom/Code/Tools/EMStudio/AnimViewportRenderer.cpp @@ -24,8 +24,6 @@ #include #include -#include -#include #include #include #include @@ -37,14 +35,13 @@ #include #include #include - +#include namespace EMStudio { - static constexpr float DepthNear = 0.01f; - - AnimViewportRenderer::AnimViewportRenderer(AZ::RPI::ViewportContextPtr viewportContext) + AnimViewportRenderer::AnimViewportRenderer(AZ::RPI::ViewportContextPtr viewportContext, const RenderOptions* renderOptions) : m_windowContext(viewportContext->GetWindowContext()) + , m_renderOptions(renderOptions) { // Create a new entity context m_entityContext = AZStd::make_unique(); @@ -123,22 +120,16 @@ namespace EMStudio const AZ::Render::LightingPreset* preset = lightingPresetAsset->GetDataAs(); SetLightingPreset(preset); - // Create grid + // Create the ground plane AzFramework::EntityContextRequestBus::EventResult( - m_gridEntity, entityContextId, &AzFramework::EntityContextRequestBus::Events::CreateEntity, "ViewportGrid"); - AZ_Assert(m_gridEntity != nullptr, "Failed to create grid entity."); + m_groundEntity, entityContextId, &AzFramework::EntityContextRequestBus::Events::CreateEntity, "ViewportModel"); + AZ_Assert(m_groundEntity != nullptr, "Failed to create model entity."); - AZ::Render::GridComponentConfig gridConfig; - gridConfig.m_gridSize = 20.0f; - gridConfig.m_axisColor = AZ::Color(0.5f, 0.5f, 0.5f, 1.0f); - gridConfig.m_primaryColor = AZ::Color(0.3f, 0.3f, 0.3f, 1.0f); - gridConfig.m_secondaryColor = AZ::Color(0.5f, 0.5f, 0.5f, 1.0f); - auto gridComponent = m_gridEntity->CreateComponent(AZ::Render::GridComponentTypeId); - gridComponent->SetConfiguration(gridConfig); - - m_gridEntity->CreateComponent(azrtti_typeid()); - m_gridEntity->Init(); - m_gridEntity->Activate(); + m_groundEntity->CreateComponent(AZ::Render::MeshComponentTypeId); + m_groundEntity->CreateComponent(AZ::Render::MaterialComponentTypeId); + m_groundEntity->CreateComponent(azrtti_typeid()); + m_groundEntity->Init(); + m_groundEntity->Activate(); Reinit(); } @@ -148,7 +139,7 @@ namespace EMStudio // Destroy all the entity we created. m_entityContext->DestroyEntity(m_iblEntity); m_entityContext->DestroyEntity(m_postProcessEntity); - m_entityContext->DestroyEntity(m_gridEntity); + m_entityContext->DestroyEntity(m_groundEntity); for (AZ::Entity* entity : m_actorEntities) { m_entityContext->DestroyEntity(entity); @@ -188,20 +179,13 @@ namespace EMStudio if (!m_actorEntities.empty()) { // Find the actor instance and calculate the center from aabb. - AZ::Vector3 actorCenter = AZ::Vector3::CreateZero(); EMotionFX::Integration::ActorComponent* actorComponent = m_actorEntities[0]->FindComponent(); EMotionFX::ActorInstance* actorInstance = actorComponent->GetActorInstance(); if (actorInstance) { - actorCenter += actorInstance->GetAabb().GetCenter(); + result = actorInstance->GetAabb().GetCenter(); } - - // Just return the position of the first entity. - AZ::Transform worldTransform; - AZ::TransformBus::EventResult(worldTransform, m_actorEntities[0]->GetId(), &AZ::TransformBus::Events::GetWorldTM); - result = worldTransform.GetTranslation(); - result += actorCenter; } return result; @@ -221,6 +205,11 @@ namespace EMStudio } } + AZStd::shared_ptr AnimViewportRenderer::GetFrameworkScene() const + { + return m_frameworkScene; + } + void AnimViewportRenderer::ResetEnvironment() { // Reset environment @@ -230,6 +219,15 @@ namespace EMStudio const AZ::Matrix4x4 rotationMatrix = AZ::Matrix4x4::CreateIdentity(); auto skyBoxFeatureProcessorInterface = m_scene->GetFeatureProcessor(); skyBoxFeatureProcessorInterface->SetCubemapRotationMatrix(rotationMatrix); + + // Reset ground entity + AZ::Transform groundTransform = AZ::Transform::CreateIdentity(); + AZ::TransformBus::Event(m_groundEntity->GetId(), &AZ::TransformBus::Events::SetLocalTM, groundTransform); + + auto modelAsset = AZ::RPI::AssetUtils::GetAssetByProductPath( + "objects/groudplane/groundplane_512x512m.azmodel", AZ::RPI::AssetUtils::TraceLevel::Assert); + AZ::Render::MeshComponentRequestBus::Event( + m_groundEntity->GetId(), &AZ::Render::MeshComponentRequestBus::Events::SetModelAsset, modelAsset); } void AnimViewportRenderer::ReinitActorEntities() @@ -326,8 +324,11 @@ namespace EMStudio ->GetOrCreateExposureControlSettingsInterface(); Camera::Configuration cameraConfig; - cameraConfig.m_fovRadians = AZ::Constants::HalfPi; - cameraConfig.m_nearClipDistance = DepthNear; + cameraConfig.m_fovRadians = AZ::DegToRad(m_renderOptions->GetFOV()); + cameraConfig.m_nearClipDistance = m_renderOptions->GetNearClipPlaneDistance(); + cameraConfig.m_farClipDistance = m_renderOptions->GetFarClipPlaneDistance(); + cameraConfig.m_frustumWidth = DefaultFrustumDimension; + cameraConfig.m_frustumHeight = DefaultFrustumDimension; preset->ApplyLightingPreset( iblFeatureProcessor, m_skyboxFeatureProcessor, exposureControlSettingInterface, m_directionalLightFeatureProcessor, diff --git a/Gems/AtomLyIntegration/EMotionFXAtom/Code/Tools/EMStudio/AnimViewportRenderer.h b/Gems/AtomLyIntegration/EMotionFXAtom/Code/Tools/EMStudio/AnimViewportRenderer.h index a4f67ddfd1..10745c6c26 100644 --- a/Gems/AtomLyIntegration/EMotionFXAtom/Code/Tools/EMStudio/AnimViewportRenderer.h +++ b/Gems/AtomLyIntegration/EMotionFXAtom/Code/Tools/EMStudio/AnimViewportRenderer.h @@ -39,12 +39,14 @@ namespace AZ namespace EMStudio { + class RenderOptions; + class AnimViewportRenderer { public: AZ_CLASS_ALLOCATOR(AnimViewportRenderer, AZ::SystemAllocator, 0); - AnimViewportRenderer(AZ::RPI::ViewportContextPtr viewportContext); + AnimViewportRenderer(AZ::RPI::ViewportContextPtr viewportContext, const RenderOptions* renderOptions); ~AnimViewportRenderer(); void Reinit(); @@ -54,6 +56,8 @@ namespace EMStudio void UpdateActorRenderFlag(EMotionFX::ActorRenderFlagBitset renderFlags); + AZStd::shared_ptr GetFrameworkScene() const; + private: // This function resets the light, camera and other environment settings. @@ -81,9 +85,11 @@ namespace EMStudio AZ::Entity* m_postProcessEntity = nullptr; AZ::Entity* m_iblEntity = nullptr; - AZ::Entity* m_gridEntity = nullptr; + AZ::Entity* m_groundEntity = nullptr; AZStd::vector m_actorEntities; + const RenderOptions* m_renderOptions; + const float DefaultFrustumDimension = 128.0f; AZStd::vector m_lightHandles; }; } diff --git a/Gems/AtomLyIntegration/EMotionFXAtom/Code/Tools/EMStudio/AnimViewportRequestBus.h b/Gems/AtomLyIntegration/EMotionFXAtom/Code/Tools/EMStudio/AnimViewportRequestBus.h index da4a054c53..9a0bee1fec 100644 --- a/Gems/AtomLyIntegration/EMotionFXAtom/Code/Tools/EMStudio/AnimViewportRequestBus.h +++ b/Gems/AtomLyIntegration/EMotionFXAtom/Code/Tools/EMStudio/AnimViewportRequestBus.h @@ -36,6 +36,9 @@ namespace EMStudio //! Set the camera view mode. virtual void SetCameraViewMode(CameraViewMode mode) = 0; + //! Set the camera follow up + virtual void SetFollowCharacter(bool follow) = 0; + //! Toggle render option flag virtual void ToggleRenderFlag(EMotionFX::ActorRenderFlag flag) = 0; }; diff --git a/Gems/AtomLyIntegration/EMotionFXAtom/Code/Tools/EMStudio/AnimViewportToolBar.cpp b/Gems/AtomLyIntegration/EMotionFXAtom/Code/Tools/EMStudio/AnimViewportToolBar.cpp index 50cd088f5d..962c9417b7 100644 --- a/Gems/AtomLyIntegration/EMotionFXAtom/Code/Tools/EMStudio/AnimViewportToolBar.cpp +++ b/Gems/AtomLyIntegration/EMotionFXAtom/Code/Tools/EMStudio/AnimViewportToolBar.cpp @@ -8,8 +8,10 @@ #include #include +#include #include #include +#include #include #include @@ -34,8 +36,9 @@ namespace EMStudio CreateViewOptionEntry(contextMenu, "Solid", EMotionFX::ActorRenderFlag::RENDER_SOLID); CreateViewOptionEntry(contextMenu, "Wireframe", EMotionFX::ActorRenderFlag::RENDER_WIREFRAME); - CreateViewOptionEntry(contextMenu, "Lighting", EMotionFX::ActorRenderFlag::RENDER_LIGHTING); - CreateViewOptionEntry(contextMenu, "Backface Culling", EMotionFX::ActorRenderFlag::RENDER_BACKFACECULLING); + // [EMFX-TODO] Add those option once implemented. + // CreateViewOptionEntry(contextMenu, "Lighting", EMotionFX::ActorRenderFlag::RENDER_LIGHTING); + // CreateViewOptionEntry(contextMenu, "Backface Culling", EMotionFX::ActorRenderFlag::RENDER_BACKFACECULLING); contextMenu->addSeparator(); CreateViewOptionEntry(contextMenu, "Vertex Normals", EMotionFX::ActorRenderFlag::RENDER_VERTEXNORMALS); CreateViewOptionEntry(contextMenu, "Face Normals", EMotionFX::ActorRenderFlag::RENDER_FACENORMALS); @@ -46,8 +49,15 @@ namespace EMStudio CreateViewOptionEntry(contextMenu, "Solid Skeleton", EMotionFX::ActorRenderFlag::RENDER_SKELETON); CreateViewOptionEntry(contextMenu, "Joint Names", EMotionFX::ActorRenderFlag::RENDER_NODENAMES); CreateViewOptionEntry(contextMenu, "Joint Orientations", EMotionFX::ActorRenderFlag::RENDER_NODEORIENTATION); - CreateViewOptionEntry(contextMenu, "Actor Bind Pose", EMotionFX::ActorRenderFlag::RENDER_ACTORBINDPOSE); + // [EMFX-TODO] Add those option once implemented. + // CreateViewOptionEntry(contextMenu, "Actor Bind Pose", EMotionFX::ActorRenderFlag::RENDER_ACTORBINDPOSE); contextMenu->addSeparator(); + CreateViewOptionEntry(contextMenu, "Hit Detection Colliders", EMotionFX::ActorRenderFlag::RENDER_HITDETECTION_COLLIDERS); + CreateViewOptionEntry(contextMenu, "Ragdoll Colliders", EMotionFX::ActorRenderFlag::RENDER_RAGDOLL_COLLIDERS); + CreateViewOptionEntry(contextMenu, "Ragdoll Joint Limits", EMotionFX::ActorRenderFlag::RENDER_RAGDOLL_JOINTLIMITS); + CreateViewOptionEntry(contextMenu, "Cloth Colliders", EMotionFX::ActorRenderFlag::RENDER_CLOTH_COLLIDERS); + CreateViewOptionEntry(contextMenu, "Simulated Object Colliders", EMotionFX::ActorRenderFlag::RENDER_SIMULATEDOBJECT_COLLIDERS); + CreateViewOptionEntry(contextMenu, "Simulated Joints", EMotionFX::ActorRenderFlag::RENDER_SIMULATEJOINTS); } // Add the camera button @@ -81,6 +91,19 @@ namespace EMStudio // Send the reset camera event. AnimViewportRequestBus::Broadcast(&AnimViewportRequestBus::Events::ResetCamera); }); + + cameraMenu->addSeparator(); + m_followCharacterAction = cameraMenu->addAction("Follow Character"); + m_followCharacterAction->setCheckable(true); + m_followCharacterAction->setChecked(false); + connect(m_followCharacterAction, &QAction::triggered, this, + [this]() + { + AnimViewportRequestBus::Broadcast( + &AnimViewportRequestBus::Events::SetFollowCharacter, m_followCharacterAction->isChecked()); + ; + }); + cameraButton->setMenu(cameraMenu); cameraButton->setText("Camera Option"); cameraButton->setPopupMode(QToolButton::InstantPopup); @@ -88,6 +111,13 @@ namespace EMStudio cameraButton->setIcon(QIcon(":/EMotionFXAtom/Camera_category.svg")); addWidget(cameraButton); } + + LoadSettings(); + } + + AnimViewportToolBar::~AnimViewportToolBar() + { + SaveSettings(); } void AnimViewportToolBar::CreateViewOptionEntry( @@ -123,4 +153,24 @@ namespace EMStudio } } } + + void AnimViewportToolBar::LoadSettings() + { + AZStd::string renderFlagsFilename(EMStudioManager::GetInstance()->GetAppDataFolder()); + renderFlagsFilename += "AnimViewportRenderFlags.cfg"; + QSettings settings(renderFlagsFilename.c_str(), QSettings::IniFormat, this); + + const bool isChecked = settings.value("CameraFollowUp", false).toBool(); + m_followCharacterAction->setChecked(isChecked); + AnimViewportRequestBus::Broadcast(&AnimViewportRequestBus::Events::SetFollowCharacter, isChecked); + } + + void AnimViewportToolBar::SaveSettings() + { + AZStd::string renderFlagsFilename(EMStudioManager::GetInstance()->GetAppDataFolder()); + renderFlagsFilename += "AnimViewportRenderFlags.cfg"; + QSettings settings(renderFlagsFilename.c_str(), QSettings::IniFormat, this); + + settings.setValue("CameraFollowUp", m_followCharacterAction->isChecked()); + } } // namespace EMStudio diff --git a/Gems/AtomLyIntegration/EMotionFXAtom/Code/Tools/EMStudio/AnimViewportToolBar.h b/Gems/AtomLyIntegration/EMotionFXAtom/Code/Tools/EMStudio/AnimViewportToolBar.h index 57633e5284..98b07f07dd 100644 --- a/Gems/AtomLyIntegration/EMotionFXAtom/Code/Tools/EMStudio/AnimViewportToolBar.h +++ b/Gems/AtomLyIntegration/EMotionFXAtom/Code/Tools/EMStudio/AnimViewportToolBar.h @@ -22,14 +22,17 @@ namespace EMStudio { public: AnimViewportToolBar(QWidget* parent = nullptr); - ~AnimViewportToolBar() = default; + ~AnimViewportToolBar(); void SetRenderFlags(EMotionFX::ActorRenderFlagBitset renderFlags); + void LoadSettings(); + void SaveSettings(); private: void CreateViewOptionEntry( QMenu* menu, const char* menuEntryName, uint32_t actionIndex, bool visible = true, char* iconFileName = nullptr); QAction* m_actions[EMotionFX::ActorRenderFlag::NUM_RENDERFLAGS] = { nullptr }; + QAction* m_followCharacterAction = nullptr; }; } diff --git a/Gems/AtomLyIntegration/EMotionFXAtom/Code/Tools/EMStudio/AnimViewportWidget.cpp b/Gems/AtomLyIntegration/EMotionFXAtom/Code/Tools/EMStudio/AnimViewportWidget.cpp index c6e349236f..ae70b5bd43 100644 --- a/Gems/AtomLyIntegration/EMotionFXAtom/Code/Tools/EMStudio/AnimViewportWidget.cpp +++ b/Gems/AtomLyIntegration/EMotionFXAtom/Code/Tools/EMStudio/AnimViewportWidget.cpp @@ -17,11 +17,13 @@ #include #include #include +#include namespace EMStudio { - AnimViewportWidget::AnimViewportWidget(QWidget* parent) - : AtomToolsFramework::RenderViewportWidget(parent) + AnimViewportWidget::AnimViewportWidget(AtomRenderPlugin* parentPlugin) + : AtomToolsFramework::RenderViewportWidget(parentPlugin->GetInnerWidget()) + , m_plugin(parentPlugin) { setObjectName(QString::fromUtf8("AtomViewportWidget")); QSizePolicy qSize(QSizePolicy::Preferred, QSizePolicy::Preferred); @@ -32,7 +34,8 @@ namespace EMStudio setAutoFillBackground(false); setStyleSheet(QString::fromUtf8("")); - m_renderer = AZStd::make_unique(GetViewportContext()); + m_renderer = AZStd::make_unique(GetViewportContext(), m_plugin->GetRenderOptions()); + SetScene(m_renderer->GetFrameworkScene(), false); LoadRenderFlags(); SetupCameras(); @@ -40,23 +43,25 @@ namespace EMStudio Reinit(); AnimViewportRequestBus::Handler::BusConnect(); + ViewportPluginRequestBus::Handler::BusConnect(); } AnimViewportWidget::~AnimViewportWidget() { SaveRenderFlags(); + ViewportPluginRequestBus::Handler::BusDisconnect(); AnimViewportRequestBus::Handler::BusDisconnect(); } void AnimViewportWidget::Reinit(bool resetCamera) { + m_renderer->Reinit(); + m_renderer->UpdateActorRenderFlag(m_renderFlags); + if (resetCamera) { ResetCamera(); } - - m_renderer->Reinit(); - m_renderer->UpdateActorRenderFlag(m_renderFlags); } EMotionFX::ActorRenderFlagBitset AnimViewportWidget::GetRenderFlags() const @@ -142,51 +147,102 @@ namespace EMStudio switch (mode) { case CameraViewMode::FRONT: - cameraPosition.Set(0.0f, CameraDistance, targetPosition.GetZ()); + cameraPosition.Set(targetPosition.GetX(), targetPosition.GetY() + CameraDistance, targetPosition.GetZ()); break; case CameraViewMode::BACK: - cameraPosition.Set(0.0f, -CameraDistance, targetPosition.GetZ()); + cameraPosition.Set(targetPosition.GetX(), targetPosition.GetY() - CameraDistance, targetPosition.GetZ()); break; case CameraViewMode::TOP: - cameraPosition.Set(0.0f, 0.0f, CameraDistance + targetPosition.GetZ()); + cameraPosition.Set(targetPosition.GetX(), targetPosition.GetY(), CameraDistance + targetPosition.GetZ()); break; case CameraViewMode::BOTTOM: - cameraPosition.Set(0.0f, 0.0f, -CameraDistance + targetPosition.GetZ()); + cameraPosition.Set(targetPosition.GetX(), targetPosition.GetY(), -CameraDistance + targetPosition.GetZ()); break; case CameraViewMode::LEFT: - cameraPosition.Set(-CameraDistance, 0.0f, targetPosition.GetZ()); + cameraPosition.Set(targetPosition.GetX() - CameraDistance, targetPosition.GetY(), targetPosition.GetZ()); break; case CameraViewMode::RIGHT: - cameraPosition.Set(CameraDistance, 0.0f, targetPosition.GetZ()); + cameraPosition.Set(targetPosition.GetX() + CameraDistance, targetPosition.GetY(), targetPosition.GetZ()); break; case CameraViewMode::DEFAULT: // The default view mode is looking from the top left of the character. - cameraPosition.Set(-CameraDistance, CameraDistance, CameraDistance + targetPosition.GetZ()); + cameraPosition.Set( + targetPosition.GetX() - CameraDistance, targetPosition.GetY() + CameraDistance, targetPosition.GetZ() + CameraDistance); break; } + GetViewportContext()->SetCameraTransform(AZ::Transform::CreateLookAt(cameraPosition, targetPosition)); + + AtomToolsFramework::ModularViewportCameraControllerRequestBus::Event( + GetViewportId(), &AtomToolsFramework::ModularViewportCameraControllerRequestBus::Events::SetCameraOffset, + AZ::Vector3::CreateAxisY(-CameraDistance)); + } + + void AnimViewportWidget::SetFollowCharacter(bool follow) + { + if (follow) + { + AtomToolsFramework::ModularViewportCameraControllerRequestBus::Event( + GetViewportId(), &AtomToolsFramework::ModularViewportCameraControllerRequestBus::Events::SetCameraOffset, + AZ::Vector3::CreateAxisY(-CameraDistance)); + } + else + { + AtomToolsFramework::ModularViewportCameraControllerRequestBus::Event( + GetViewportId(), &AtomToolsFramework::ModularViewportCameraControllerRequestBus::Events::SetCameraOffset, + AZ::Vector3::CreateZero()); + AtomToolsFramework::ModularViewportCameraControllerRequestBus::Event( + GetViewportId(), &AtomToolsFramework::ModularViewportCameraControllerRequestBus::Events::SetCameraPivotAttached, + GetViewportContext()->GetCameraTransform().GetTranslation()); + } + + m_followCharacter = follow; } void AnimViewportWidget::OnTick(float deltaTime, AZ::ScriptTimePoint time) { RenderViewportWidget::OnTick(deltaTime, time); CalculateCameraProjection(); + RenderCustomPluginData(); + FollowCharacter(); } void AnimViewportWidget::CalculateCameraProjection() { auto viewportContext = GetViewportContext(); auto windowSize = viewportContext->GetViewportSize(); - // Prevent devided by zero + // Prevent division by zero const float height = AZStd::max(aznumeric_cast(windowSize.m_height), 1.0f); const float aspectRatio = aznumeric_cast(windowSize.m_width) / height; + const RenderOptions* renderOptions = m_plugin->GetRenderOptions(); AZ::Matrix4x4 viewToClipMatrix; - AZ::MakePerspectiveFovMatrixRH(viewToClipMatrix, AZ::Constants::HalfPi, aspectRatio, DepthNear, DepthFar, true); + AZ::MakePerspectiveFovMatrixRH(viewToClipMatrix, AZ::DegToRad(renderOptions->GetFOV()), aspectRatio, + renderOptions->GetNearClipPlaneDistance(), renderOptions->GetFarClipPlaneDistance(), true); viewportContext->GetDefaultView()->SetViewToClipMatrix(viewToClipMatrix); } + void AnimViewportWidget::RenderCustomPluginData() + { + const size_t numPlugins = GetPluginManager()->GetNumActivePlugins(); + for (size_t i = 0; i < numPlugins; ++i) + { + EMStudioPlugin* plugin = GetPluginManager()->GetActivePlugin(i); + plugin->Render(m_renderFlags); + } + } + + void AnimViewportWidget::FollowCharacter() + { + if (m_followCharacter) + { + AtomToolsFramework::ModularViewportCameraControllerRequestBus::Event( + GetViewportId(), &AtomToolsFramework::ModularViewportCameraControllerRequestBus::Events::SetCameraPivotAttached, + m_renderer->GetCharacterCenter()); + } + } + void AnimViewportWidget::ToggleRenderFlag(EMotionFX::ActorRenderFlag flag) { m_renderFlags[flag] = !m_renderFlags[flag]; @@ -220,4 +276,9 @@ namespace EMStudio settings.setValue(name, (bool)m_renderFlags[i]); } } + + AZ::s32 AnimViewportWidget::GetViewportId() const + { + return GetViewportContext()->GetId(); + } } // namespace EMStudio diff --git a/Gems/AtomLyIntegration/EMotionFXAtom/Code/Tools/EMStudio/AnimViewportWidget.h b/Gems/AtomLyIntegration/EMotionFXAtom/Code/Tools/EMStudio/AnimViewportWidget.h index e2099ea2ab..528cf61d09 100644 --- a/Gems/AtomLyIntegration/EMotionFXAtom/Code/Tools/EMStudio/AnimViewportWidget.h +++ b/Gems/AtomLyIntegration/EMotionFXAtom/Code/Tools/EMStudio/AnimViewportWidget.h @@ -10,19 +10,23 @@ #include #include #include + +#include #include #include namespace EMStudio { + class AtomRenderPlugin; class AnimViewportRenderer; class AnimViewportWidget : public AtomToolsFramework::RenderViewportWidget , private AnimViewportRequestBus::Handler + , private ViewportPluginRequestBus::Handler { public: - AnimViewportWidget(QWidget* parent = nullptr); + AnimViewportWidget(AtomRenderPlugin* parentPlugin); ~AnimViewportWidget() override; AnimViewportRenderer* GetAnimViewportRenderer() { return m_renderer.get(); } @@ -33,6 +37,9 @@ namespace EMStudio void OnTick(float deltaTime, AZ::ScriptTimePoint time) override; void CalculateCameraProjection(); + void RenderCustomPluginData(); + void FollowCharacter(); + void SetupCameras(); void SetupCameraController(); @@ -42,16 +49,20 @@ namespace EMStudio // AnimViewportRequestBus::Handler overrides void ResetCamera(); void SetCameraViewMode(CameraViewMode mode); + void SetFollowCharacter(bool follow); void ToggleRenderFlag(EMotionFX::ActorRenderFlag flag); - static constexpr float CameraDistance = 2.0f; - static constexpr float DepthNear = 0.01f; - static constexpr float DepthFar = 100.0f; + // ViewportPluginRequestBus::Handler overrides + AZ::s32 GetViewportId() const; + static constexpr float CameraDistance = 2.0f; + + AtomRenderPlugin* m_plugin; AZStd::unique_ptr m_renderer; AZStd::shared_ptr m_rotateCamera; AZStd::shared_ptr m_translateCamera; AZStd::shared_ptr m_orbitDollyScrollCamera; EMotionFX::ActorRenderFlagBitset m_renderFlags; + bool m_followCharacter = false; }; } diff --git a/Gems/AtomLyIntegration/EMotionFXAtom/Code/Tools/EMStudio/AtomRenderPlugin.cpp b/Gems/AtomLyIntegration/EMotionFXAtom/Code/Tools/EMStudio/AtomRenderPlugin.cpp index ce2e76a6c7..297bfea760 100644 --- a/Gems/AtomLyIntegration/EMotionFXAtom/Code/Tools/EMStudio/AtomRenderPlugin.cpp +++ b/Gems/AtomLyIntegration/EMotionFXAtom/Code/Tools/EMStudio/AtomRenderPlugin.cpp @@ -27,7 +27,10 @@ namespace EMStudio AtomRenderPlugin::~AtomRenderPlugin() { - + GetCommandManager()->RemoveCommandCallback(m_importActorCallback, false); + GetCommandManager()->RemoveCommandCallback(m_removeActorCallback, false); + delete m_importActorCallback; + delete m_removeActorCallback; } const char* AtomRenderPlugin::GetName() const @@ -75,6 +78,11 @@ namespace EMStudio return EMStudioPlugin::PLUGINTYPE_RENDERING; } + QWidget* AtomRenderPlugin::GetInnerWidget() + { + return m_innerWidget; + } + void AtomRenderPlugin::ReinitRenderer() { m_animViewportWidget->Reinit(); @@ -82,6 +90,8 @@ namespace EMStudio bool AtomRenderPlugin::Init() { + LoadRenderOptions(); + m_innerWidget = new QWidget(); m_dock->setWidget(m_innerWidget); @@ -91,7 +101,7 @@ namespace EMStudio verticalLayout->setMargin(0); // Add the viewport widget - m_animViewportWidget = new AnimViewportWidget(m_innerWidget); + m_animViewportWidget = new AnimViewportWidget(this); // Add the tool bar AnimViewportToolBar* toolBar = new AnimViewportToolBar(m_innerWidget); @@ -109,6 +119,19 @@ namespace EMStudio return true; } + void AtomRenderPlugin::LoadRenderOptions() + { + AZStd::string renderOptionsFilename(GetManager()->GetAppDataFolder()); + renderOptionsFilename += "EMStudioRenderOptions.cfg"; + QSettings settings(renderOptionsFilename.c_str(), QSettings::IniFormat, this); + m_renderOptions = RenderOptions::Load(&settings); + } + + const RenderOptions* AtomRenderPlugin::GetRenderOptions() const + { + return &m_renderOptions; + } + // Command callbacks bool ReinitAtomRenderPlugin() { diff --git a/Gems/AtomLyIntegration/EMotionFXAtom/Code/Tools/EMStudio/AtomRenderPlugin.h b/Gems/AtomLyIntegration/EMotionFXAtom/Code/Tools/EMStudio/AtomRenderPlugin.h index 1516b45e77..d87e039487 100644 --- a/Gems/AtomLyIntegration/EMotionFXAtom/Code/Tools/EMStudio/AtomRenderPlugin.h +++ b/Gems/AtomLyIntegration/EMotionFXAtom/Code/Tools/EMStudio/AtomRenderPlugin.h @@ -11,6 +11,7 @@ #if !defined(Q_MOC_RUN) #include #include +#include #include #include @@ -47,15 +48,22 @@ namespace EMStudio bool Init() override; EMStudioPlugin* Clone(); EMStudioPlugin::EPluginType GetPluginType() const override; + QWidget* GetInnerWidget(); void ReinitRenderer(); + void LoadRenderOptions(); + const RenderOptions* GetRenderOptions() const; + private: + + QWidget* m_innerWidget = nullptr; + AnimViewportWidget* m_animViewportWidget = nullptr; + RenderOptions m_renderOptions; + MCORE_DEFINECOMMANDCALLBACK(ImportActorCallback); MCORE_DEFINECOMMANDCALLBACK(RemoveActorCallback); ImportActorCallback* m_importActorCallback = nullptr; RemoveActorCallback* m_removeActorCallback = nullptr; - QWidget* m_innerWidget = nullptr; - AnimViewportWidget* m_animViewportWidget = nullptr; }; }// namespace EMStudio diff --git a/Gems/AtomLyIntegration/EMotionFXAtom/gem.json b/Gems/AtomLyIntegration/EMotionFXAtom/gem.json index f921990360..3514d4c1b9 100644 --- a/Gems/AtomLyIntegration/EMotionFXAtom/gem.json +++ b/Gems/AtomLyIntegration/EMotionFXAtom/gem.json @@ -2,6 +2,7 @@ "gem_name": "EMotionFX_Atom", "display_name": "EMotionFX Atom", "license": "Apache-2.0 Or MIT", + "license_url": "https://github.com/o3de/o3de/blob/development/LICENSE.txt", "origin": "Open 3D Engine - o3de.org", "type": "Code", "summary": "", diff --git a/Gems/AtomLyIntegration/ImguiAtom/gem.json b/Gems/AtomLyIntegration/ImguiAtom/gem.json index 6b032275b9..fa611d8224 100644 --- a/Gems/AtomLyIntegration/ImguiAtom/gem.json +++ b/Gems/AtomLyIntegration/ImguiAtom/gem.json @@ -2,6 +2,7 @@ "gem_name": "ImguiAtom", "display_name": "Imgui Atom", "license": "Apache-2.0 Or MIT", + "license_url": "https://github.com/o3de/o3de/blob/development/LICENSE.txt", "origin": "Open 3D Engine - o3de.org", "type": "Code", "summary": "", diff --git a/Gems/AtomLyIntegration/TechnicalArt/DccScriptingInterface/.env.example b/Gems/AtomLyIntegration/TechnicalArt/DccScriptingInterface/.env.example index 29c1739992..9f881ac3d3 100644 --- a/Gems/AtomLyIntegration/TechnicalArt/DccScriptingInterface/.env.example +++ b/Gems/AtomLyIntegration/TechnicalArt/DccScriptingInterface/.env.example @@ -10,12 +10,12 @@ export DYNACONF_COMPANY=Amazon # if a O3DE project isn't set use this gem export DYNACONF_O3DE_PROJECT=DccScriptingInterface -export DYNACONF_O3DE_PROJECT_PATH=`pwd` -export DYNACONF_O3DE_DEV=${O3DE_PROJECT_PATH}\..\..\..\.. +export DYNACONF_PATH_O3DE_PROJECT=`pwd` +export DYNACONF_O3DE_DEV=${PATH_O3DE_PROJECT}\..\..\..\.. # LY build folder -export DYNACONF_O3DE_BUILD_PATH=${O3DE_DEV}\build -export DYNACONF_O3DE_BIN_PATH=${O3DE_BUILD_PATH}\bin\profile +export DYNACONF_PATH_O3DE_BUILD=${O3DE_DEV}\build +export DYNACONF_PATH_O3DE_BIN=${PATH_O3DE_BUILD}\bin\profile # default IDE and debug settings #export DYNACONF_DCCSI_GDEBUG=false @@ -24,7 +24,7 @@ export DYNACONF_DCCSI_GDEBUGGER=WING export DYNACONF_DCCSI_LOGLEVEL=20 # defaults for DccScriptingInterface (DCCsi) -export DYNACONF_DCCSIG_PATH=${O3DE_DEV}\Gems\AtomLyIntegration\TechnicalArt\DccScriptingInterface +export DYNACONF_PATH_DCCSIG=${O3DE_DEV}\Gems\AtomLyIntegration\TechnicalArt\DccScriptingInterface # set up default python interpreter (O3DE) # we may want to entirely remove these and rely on config.py to dynamically set up @@ -33,20 +33,20 @@ export DYNACONF_DCCSI_PY_VERSION_MAJOR=3 export DYNACONF_DCCSI_PY_VERSION_MINOR=7 export DYNACONF_DCCSI_PY_VERSION_RELEASE=11 # To Do: probably move the folder below into the /SDK folder? -export DYNACONF_DCCSI_PYTHON_PATH=${DCCSIG_PATH}\3rdParty\Python +export DYNACONF_PATH_DCCSI_PYTHON=${PATH_DCCSIG}\3rdParty\Python # add access to a Lib location that matches the py version (3.7.x) # switch this for other python version like (2.7.x) for Maya -export DYNACONF_DCCSI_PYTHON_LIB_PATH=${DCCSI_PYTHON_PATH}\Lib\${DCCSI_PY_VERSION_MAJOR}.x\${DCCSI_PY_VERSION_MAJOR}.${DCCSI_PY_VERSION_MINOR}.x\site-packages +export DYNACONF_PATH_DCCSI_PYTHON_LIB=${PATH_DCCSI_PYTHON}\Lib\${DCCSI_PY_VERSION_MAJOR}.x\${DCCSI_PY_VERSION_MAJOR}.${DCCSI_PY_VERSION_MINOR}.x\site-packages # TO DO: figure out how to best deal with OS folder (i.e. 'windows') -export DYNACONF_O3DE_PYTHON_INSTALL=${O3DE_DEV}\python -export DYNACONF_DCCSI_PY_BASE=${O3DE_PYTHON_INSTALL}\python.cmd +export DYNACONF_PATH_O3DE_PYTHON_INSTALL=${O3DE_DEV}\python +export DYNACONF_DCCSI_PY_BASE=${PATH_O3DE_PYTHON_INSTALL}\python.cmd # set up Qt / PySide2 # TO DO: These should NOT be set in the global env as they will cause conflicts # with other Qt apps (like DCC tools), only set in local.env, or modify config.py # for utils/tools/apps that need them ( see config.init_ly_pyside() ) #export DYNACONF_QTFORPYTHON_PATH=${O3DE_DEV}\Gems\QtForPython\3rdParty\pyside2\windows\release -#export DYNACONF_QT_PLUGIN_PATH=${O3DE_BUILD_PATH}\bin\profile\EditorPlugins -#export DYNACONF_QT_QPA_PLATFORM_PLUGIN_PATH=${O3DE_BUILD_PATH}\bin\profile\EditorPlugins\platforms +#export DYNACONF_QT_PLUGIN_PATH=${PATH_O3DE_BUILD}\bin\profile\EditorPlugins +#export DYNACONF_QT_QPA_PLATFORM_PLUGIN_PATH=${PATH_O3DE_BUILD}\bin\profile\EditorPlugins\platforms diff --git a/Gems/AtomLyIntegration/TechnicalArt/DccScriptingInterface/3rdParty/Python/README.txt b/Gems/AtomLyIntegration/TechnicalArt/DccScriptingInterface/3rdParty/Python/README.txt index 7f5a72fb1c..8146fc0020 100644 --- a/Gems/AtomLyIntegration/TechnicalArt/DccScriptingInterface/3rdParty/Python/README.txt +++ b/Gems/AtomLyIntegration/TechnicalArt/DccScriptingInterface/3rdParty/Python/README.txt @@ -33,4 +33,11 @@ pyside2-tools instructions: 3. add to PYTHONPATH: < local DCCsi >\3rdParty\Python in .py something like: site.addsitedir(DCCSI_PYSIDE2_TOOLS) -See: "< local DCCsi >\config.py" \ No newline at end of file +See: "< local DCCsi >\config.py" + +Substance Automation Toolkit (SAT) Instructions: +Substance has a licensed python API for automating material data workflows. By default, their instructions cover installing it to a python 'system interpreter', however if we want to install it for use within the DCCsi (for custom tools) or even potentially to build inter-op and integrations with O3DE editors, we want to install it in a way that is accessible. + +Install Substance Automation Toolkit 3rd party library to DCCsi 3rdParty sandbox: + +> C:\Depot\o3de\python> pip install "c:\< path to >\SubstanceAutomationToolkit\Python API\Pysbs-2021.2.2-py2.py3-none-win_amd64.whl" --target="C:\Depot\o3de\Gems\AtomLyIntegration\TechnicalArt\DccScriptingInterface\3rdParty\Python\Lib\3.x\3.7.x\site-packages" \ No newline at end of file diff --git a/Gems/AtomLyIntegration/TechnicalArt/DccScriptingInterface/Editor/Scripts/bootstrap.py b/Gems/AtomLyIntegration/TechnicalArt/DccScriptingInterface/Editor/Scripts/bootstrap.py index 406e2b04ff..6a4dbb2906 100755 --- a/Gems/AtomLyIntegration/TechnicalArt/DccScriptingInterface/Editor/Scripts/bootstrap.py +++ b/Gems/AtomLyIntegration/TechnicalArt/DccScriptingInterface/Editor/Scripts/bootstrap.py @@ -14,74 +14,88 @@ If you need DCCsi access in py27 (Autodesk Maya for instance) you may need to implement your own boostrapper module. Currently this is boostrapped from add_dccsi.py, as a temporty measure related to this Jira: SPEC-2581""" + +# test bootstrap execution time +import time +_START = time.process_time() # start tracking + # standard imports import sys import os import site -import importlib.util from pathlib import Path import logging as _logging # ------------------------------------------------------------------------- # ------------------------------------------------------------------------- -_O3DE_RUNNING=None -try: - import azlmbr - _O3DE_RUNNING=True -except: - _O3DE_RUNNING=False -# ------------------------------------------------------------------------- +_MODULENAME = 'O3DE.DCCsi.bootstrap' + +# we don't use dynaconf setting here as we might not yet have access +# we need to set up basic access to the DCCsi +_MODULE_PATH = os.path.realpath(__file__) # To Do: what if frozen? +_PATH_DCCSIG = Path(os.path.join(_MODULE_PATH, '../../..')) +site.addsitedir(_PATH_DCCSIG) + +# set envar so DCCsi synthetic env bootstraps with it (config.py) +from azpy.constants import ENVAR_PATH_DCCSIG +os.environ[ENVAR_PATH_DCCSIG] = str(_PATH_DCCSIG.resolve()) +# ------------------------------------------------------------------------- # ------------------------------------------------------------------------- -# we don't use dynaconf setting here as we might not yet have access -# to that site-dir. - -_MODULENAME = __name__ -if _MODULENAME is '__main__': - _MODULENAME = 'O3DE.DCCsi.bootstrap' - -# set up module logging -for handler in _logging.root.handlers[:]: - _logging.root.removeHandler(handler) -_LOGGER = _logging.getLogger(_MODULENAME) - -# we need to set up basic access to the DCCsi -_MODULE_PATH = os.path.realpath(__file__) # To Do: what if frozen? -_DCCSI_PATH = os.path.normpath(os.path.join(_MODULE_PATH, '../../..')) -_DCCSI_PATH = os.getenv('DCCSI_PATH', _DCCSI_PATH) -site.addsitedir(_DCCSI_PATH) - # now we have azpy api access from azpy.env_bool import env_bool from azpy.constants import ENVAR_DCCSI_GDEBUG from azpy.constants import ENVAR_DCCSI_DEV_MODE from azpy.constants import ENVAR_DCCSI_LOGLEVEL +from azpy.constants import ENVAR_DCCSI_GDEBUGGER from azpy.constants import FRMT_LOG_LONG -# set up global space, logging etc. -# set these true if you want them set globally for debugging +from azpy.env_bool import env_bool _DCCSI_GDEBUG = env_bool(ENVAR_DCCSI_GDEBUG, False) _DCCSI_DEV_MODE = env_bool(ENVAR_DCCSI_DEV_MODE, False) -_DCCSI_LOGLEVEL = int(env_bool(ENVAR_DCCSI_LOGLEVEL, int(20))) -if _DCCSI_GDEBUG: - _DCCSI_LOGLEVEL = int(10) +_DCCSI_GDEBUGGER = env_bool(ENVAR_DCCSI_GDEBUGGER, 'WING') -_logging.basicConfig(format=FRMT_LOG_LONG, level=_DCCSI_LOGLEVEL) +# default loglevel to info unless set +_DCCSI_LOGLEVEL = int(env_bool(ENVAR_DCCSI_LOGLEVEL, _logging.INFO)) +if _DCCSI_GDEBUG: + # override loglevel if runnign debug + _DCCSI_LOGLEVEL = _logging.DEBUG + +# set up module logging +#for handler in _logging.root.handlers[:]: + #_logging.root.removeHandler(handler) + +# configure basic logger +# note: not using a common logger to reduce cyclical imports +_logging.basicConfig(level=_DCCSI_LOGLEVEL, + format=FRMT_LOG_LONG, + datefmt='%m-%d %H:%M') + +_LOGGER = _logging.getLogger(_MODULENAME) _LOGGER.debug('Initializing: {0}.'.format({_MODULENAME})) # ------------------------------------------------------------------------- +# ------------------------------------------------------------------------- +def attach_debugger(): + from azpy.test.entry_test import connect_wing + _debugger = connect_wing() + return _debugger +# ------------------------------------------------------------------------- + + # ------------------------------------------------------------------------- # _settings.setenv() # doing this will add the additional DYNACONF_ envars -def get_dccsi_config(DCCSI_PATH=_DCCSI_PATH): +import importlib.util +def get_dccsi_config(PATH_DCCSIG=_PATH_DCCSIG): """Convenience method to set and retreive settings directly from module.""" # we can go ahead and just make sure the the DCCsi env is set # _config is SO generic this ensures we are importing a specific one _spec_dccsi_config = importlib.util.spec_from_file_location("dccsi._config", - Path(DCCSI_PATH, + Path(PATH_DCCSIG, "config.py")) _dccsi_config = importlib.util.module_from_spec(_spec_dccsi_config) _spec_dccsi_config.loader.exec_module(_dccsi_config) @@ -89,114 +103,205 @@ def get_dccsi_config(DCCSI_PATH=_DCCSI_PATH): return _dccsi_config # ------------------------------------------------------------------------- -# set and retreive the base env context/_settings on import -_config = get_dccsi_config() -_settings = _config.get_config_settings() +# ------------------------------------------------------------------------- +# bootstrap in AssetProcessor +def bootstrap_Editor(test_config=_DCCSI_GDEBUG, + test_pyside2=_DCCSI_GDEBUG): + '''Put boostrapping code here to execute in O3DE Editor.exe''' + + _settings = None + + if test_config: + # set and retreive the base env context/_settings on import + _config = get_dccsi_config() + _settings = _config.get_config_settings(enable_o3de_python=True, + enable_o3de_pyside2=True) + # note: this can impact start up times so currently we are only + # running it to test. + # To Do: slim down start up times so we can init _settings + + if test_pyside2: + _config.test_pyside2() + + return _settings +# ------------------------------------------------------------------------- + + +# ------------------------------------------------------------------------- +# bootstrap in AssetProcessor +def bootstrap_MaterialEditor(): + '''Put boostrapping code here to execute in O3DE MaterialEdito.exe''' + pass + return None +# ------------------------------------------------------------------------- + + +# ------------------------------------------------------------------------- +# bootstrap in AssetProcessor +def bootstrap_AssetProcessor(): + '''Put boostrapping code here to execute in O3DE AssetProcessor.exe''' + pass + return None +# ------------------------------------------------------------------------- + + +# ------------------------------------------------------------------------- +# bootstrap in AssetProcessor +def bootstrap_AssetBuilder(): + '''Put boostrapping code here to execute in O3DE AssetBuilder.exe''' + pass + return None +# ------------------------------------------------------------------------- + + +# ------------------------------------------------------------------------- if _DCCSI_DEV_MODE: - _config.attach_debugger() # attempts to start debugger -# done with basic setup -# --- END ----------------------------------------------------------------- + foo = attach_debugger() # attempts to start debugger + +# set and retreive the *basic* env context/_settings on import +# What application is executing the bootstrap? +# Python is being run from: +# editor.exe +# materialeditor.exe +# assetprocessor.exe +# assetbuilder.exe, or the Python executable. +# Exclude the .exe so it works on other platforms + +_O3DE_Editor = Path(sys.executable) +_LOGGER.debug(f'The sys.executable is: {_O3DE_Editor}') + +if _O3DE_Editor.stem.lower() == "editor": + # if _DCCSI_GDEBUG then run the pyside2 test + _settings = bootstrap_Editor(_DCCSI_GDEBUG) + +elif _O3DE_Editor.stem.lower() == "materialeditor": + _settings = bootstrap_MaterialEditor() + +elif _O3DE_Editor.stem.lower() == "assetprocessor": + _settings = bootstrap_AssetProcessor() + +elif _O3DE_Editor.stem.lower() == "assetbuilder": + _settings= bootstrap_AssetBuilder() + +elif _O3DE_Editor.stem.lower() == "python": + # in this case, we can re-use the editor settings + # which will init python and pyside2 access externally + _settings= bootstrap_Editor(_DCCSI_GDEBUG) + +else: + _LOGGER.warning('No bootstrapping code for: {_O3DE_Editor}') +# ------------------------------------------------------------------------- ########################################################################### # Main Code Block, runs this script as main (testing) # ------------------------------------------------------------------------- if __name__ == '__main__': - """Run this file as main""" + """Run this file as main (external commandline for testing)""" + # --------------------------------------------------------------------- + # force enable debug settings manually + _DCCSI_GDEBUG = False # enable here to force temporarily + _DCCSI_DEV_MODE = False + if _DCCSI_GDEBUG: + # override loglevel if runnign debug + _DCCSI_LOGLEVEL = _logging.DEBUG + # --------------------------------------------------------------------- - # ------------------------------------------------------------------------- + + # --------------------------------------------------------------------- _O3DE_RUNNING=None try: import azlmbr _O3DE_RUNNING=True except: _O3DE_RUNNING=False - # ------------------------------------------------------------------------- + # --------------------------------------------------------------------- - _MODULENAME = __name__ - if _MODULENAME is '__main__': - _MODULENAME = 'O3DE.DCCsi.bootstrap' - - from azpy.constants import STR_CROSSBAR - # module internal debugging flags - while 0: # temp internal debug flag - _DCCSI_GDEBUG = True - break - - # overide logger for standalone to be more verbose and log to file - import azpy - _LOGGER = azpy.initialize_logger(_MODULENAME, - log_to_file=_DCCSI_GDEBUG, - default_log_level=_DCCSI_LOGLEVEL) - # happy print - _LOGGER.info(STR_CROSSBAR) - _LOGGER.info('~ constants.py ... Running script as __main__') - _LOGGER.info(STR_CROSSBAR) - - # parse the command line args - import argparse - parser = argparse.ArgumentParser( - description='O3DE DCCsi Boostrap (Test)', - epilog="Will externally test the DCCsi boostrap") - - _config = get_dccsi_config() - _settings = _config.get_config_settings(enable_o3de_python=True, - enable_o3de_pyside2=True) - parser.add_argument('-gd', '--global-debug', - type=bool, - required=False, - help='Enables global debug flag.') - parser.add_argument('-dm', '--developer-mode', - type=bool, - required=False, - help='Enables dev mode for early auto attaching debugger.') - parser.add_argument('-tp', '--test-pyside2', - type=bool, - required=False, - help='Runs Qt/PySide2 tests and reports.') - args = parser.parse_args() - - # easy overrides - if args.global_debug: - _DCCSI_GDEBUG = True - if args.developer_mode: - _DCCSI_DEV_MODE = True - _config.attach_debugger() # attempts to start debugger - - if _DCCSI_GDEBUG: - _LOGGER.info(f'DCCSI_PATH: {_settings.DCCSI_PATH}') - _LOGGER.info(f'DCCSI_G_DEBUG: {_settings.DCCSI_GDEBUG}') - _LOGGER.info(f'DCCSI_DEV_MODE: {_settings.DCCSI_DEV_MODE}') - - _LOGGER.info(f'DCCSI_OS_FOLDER: {_settings.DCCSI_OS_FOLDER}') - _LOGGER.info(f'O3DE_PROJECT: {_settings.O3DE_PROJECT}') - _LOGGER.info(f'O3DE_PROJECT_PATH: {_settings.O3DE_PROJECT_PATH}') - _LOGGER.info(f'O3DE_DEV: {_settings.O3DE_DEV}') - _LOGGER.info(f'O3DE_BUILD_PATH: {_settings.O3DE_BUILD_PATH}') - _LOGGER.info(f'O3DE_BIN_PATH: {_settings.O3DE_BIN_PATH}') + # --------------------------------------------------------------------- + # this is a simple commandline interface for running and testing externally + if not _O3DE_RUNNING: # external tool or commandline - _LOGGER.info(f'DCCSI_PATH: {_settings.DCCSI_PATH}') - _LOGGER.info(f'DCCSI_PYTHON_LIB_PATH: {_settings.DCCSI_PYTHON_LIB_PATH}') - _LOGGER.info(f'DCCSI_PY_BASE: {_settings.DCCSI_PY_BASE}') + # parse the command line args + import argparse + parser = argparse.ArgumentParser( + description='O3DE DCCsi Boostrap (Test)', + epilog="Will externally test the DCCsi boostrap") - if _DCCSI_GDEBUG or args.test_pyside2: - try: - import PySide2 - except: - # set up Qt/PySide2 access and test - _settings = _config.get_config_settings(enable_o3de_pyside2=True) - import PySide2 - - _LOGGER.info(f'PySide2: {PySide2}') - _LOGGER.info(f'O3DE_BIN_PATH: {_settings.O3DE_BIN_PATH}') - _LOGGER.info(f'QT_PLUGIN_PATH: {_settings.QT_PLUGIN_PATH}') - _LOGGER.info(f'QT_QPA_PLATFORM_PLUGIN_PATH: {_settings.QT_QPA_PLATFORM_PLUGIN_PATH}') + parser.add_argument('-gd', '--global-debug', + type=bool, + required=False, + help='Enables global debug flag.') + + parser.add_argument('-sd', '--set-debugger', + type=str, + required=False, + help='Default debugger: WING, others: PYCHARM, VSCODE (not yet implemented).') - _config.test_pyside2() - - if not _O3DE_RUNNING: - # return - sys.exit() + parser.add_argument('-dm', '--developer-mode', + type=bool, + required=False, + help='Enables dev mode for early auto attaching debugger.') + + parser.add_argument('-tp', '--test-pyside2', + type=bool, + required=False, + help='Runs Qt/PySide2 tests and reports.') + + args = parser.parse_args() + + # easy overrides + if args.global_debug: + _DCCSI_GDEBUG = True + _DCCSI_LOGLEVEL = _logging.DEBUG + _LOGGER.setLevel(_DCCSI_LOGLEVEL) + + if args.set_debugger: + _LOGGER.info('Setting and switching debugger type not implemented (default=WING)') + # To Do: implement debugger plugin pattern + + if args.developer_mode or _DCCSI_DEV_MODE: + _DCCSI_DEV_MODE = True + foo = attach_debugger() # attempts to start debugger + + # happy print + from azpy.constants import STR_CROSSBAR + _LOGGER.info(STR_CROSSBAR) + _LOGGER.info('~ DCCsi: bootstrap.py ... Running script as __main__') + _LOGGER.info(STR_CROSSBAR) + + _TEST_PYSIDE2 = False + if args.test_pyside2: + _TEST_PYSIDE2 = True + + _settings= bootstrap_Editor(_DCCSI_GDEBUG, _TEST_PYSIDE2) + + if _DCCSI_GDEBUG: + _LOGGER.info(f'PATH_DCCSIG: {_settings.PATH_DCCSIG}') + _LOGGER.info(f'DCCSI_G_DEBUG: {_settings.DCCSI_GDEBUG}') + _LOGGER.info(f'DCCSI_DEV_MODE: {_settings.DCCSI_DEV_MODE}') + + _LOGGER.info(f'DCCSI_OS_FOLDER: {_settings.DCCSI_OS_FOLDER}') + _LOGGER.info(f'O3DE_PROJECT: {_settings.O3DE_PROJECT}') + _LOGGER.info(f'PATH_O3DE_PROJECT: {_settings.PATH_O3DE_PROJECT}') + _LOGGER.info(f'O3DE_DEV: {_settings.O3DE_DEV}') + _LOGGER.info(f'PATH_O3DE_BUILD: {_settings.PATH_O3DE_BUILD}') + _LOGGER.info(f'PATH_O3DE_BIN: {_settings.PATH_O3DE_BIN}') + + _LOGGER.info(f'PATH_DCCSIG: {_settings.PATH_DCCSIG}') + _LOGGER.info(f'PATH_DCCSI_PYTHON_LIB: {_settings.PATH_DCCSI_PYTHON_LIB}') + _LOGGER.info(f'DCCSI_PY_BASE: {_settings.DCCSI_PY_BASE}') + + if args.test_pyside2: + _LOGGER.info(f'PySide2: {PySide2}') + _LOGGER.info(f'PATH_O3DE_BIN: {_settings.PATH_O3DE_BIN}') + _LOGGER.info(f'QT_PLUGIN_PATH: {_settings.QT_PLUGIN_PATH}') + _LOGGER.info(f'QT_QPA_PLATFORM_PLUGIN_PATH: {_settings.QT_QPA_PLATFORM_PLUGIN_PATH}') + # --------------------------------------------------------------------- + + # custom prompt + sys.ps1 = "[azpy]>>" + +_LOGGER.debug('~ DCCsi: bootstrap.py took: {} sec'.format(time.process_time() - _START)) # --- END ----------------------------------------------------------------- diff --git a/Gems/AtomLyIntegration/TechnicalArt/DccScriptingInterface/SDK/Lumberyard/Scripts/set_menu.py b/Gems/AtomLyIntegration/TechnicalArt/DccScriptingInterface/SDK/Lumberyard/Scripts/set_menu.py index 3ed4040550..cff4ba0b33 100644 --- a/Gems/AtomLyIntegration/TechnicalArt/DccScriptingInterface/SDK/Lumberyard/Scripts/set_menu.py +++ b/Gems/AtomLyIntegration/TechnicalArt/DccScriptingInterface/SDK/Lumberyard/Scripts/set_menu.py @@ -118,7 +118,7 @@ def clicked_launch_sub_builder(): print(debug_msg) _LOGGER.debug(debug_msg) - _SUB_BUILDER_PATH = Path(settings.DCCSIG_PATH, + _SUB_BUILDER_PATH = Path(settings.PATH_DCCSIG, 'SDK', 'Substance', 'builder') diff --git a/Gems/AtomLyIntegration/TechnicalArt/DccScriptingInterface/SDK/Maya/Scripts/Python/kitbash_converter/main.py b/Gems/AtomLyIntegration/TechnicalArt/DccScriptingInterface/SDK/Maya/Scripts/Python/kitbash_converter/main.py index d0e9759208..198dcdb5af 100644 --- a/Gems/AtomLyIntegration/TechnicalArt/DccScriptingInterface/SDK/Maya/Scripts/Python/kitbash_converter/main.py +++ b/Gems/AtomLyIntegration/TechnicalArt/DccScriptingInterface/SDK/Maya/Scripts/Python/kitbash_converter/main.py @@ -34,7 +34,7 @@ print(_config) # this is an alternative to "from dynaconf import settings" with Qt settings = _config.get_config_settings(setup_ly_pyside=True) -# app_path = Path.joinpath(settings.DCCSIG_PATH, < relative path to current script dir >).resolve() +# app_path = Path.joinpath(settings.PATH_DCCSIG, < relative path to current script dir >).resolve() # 3rd Party (we may or do provide) from box import Box @@ -507,7 +507,7 @@ class FBXConverter(QtWidgets.QDialog): _LOGGER.debug('get_material_definition, os.getcwd() is: {}'.format(os.getcwd())) # build a resolved absolute path because cwd may be unknown and change running externally - material_file = Path(settings.DCCSIG_PATH, + material_file = Path(settings.PATH_DCCSIG, 'SDK', 'Maya', 'Scripts', 'Python', 'kitbash_converter', material_file).resolve() diff --git a/Gems/AtomLyIntegration/TechnicalArt/DccScriptingInterface/SDK/Maya/Scripts/Python/kitbash_converter/standalone.py b/Gems/AtomLyIntegration/TechnicalArt/DccScriptingInterface/SDK/Maya/Scripts/Python/kitbash_converter/standalone.py index b940a0eac8..5db297755a 100644 --- a/Gems/AtomLyIntegration/TechnicalArt/DccScriptingInterface/SDK/Maya/Scripts/Python/kitbash_converter/standalone.py +++ b/Gems/AtomLyIntegration/TechnicalArt/DccScriptingInterface/SDK/Maya/Scripts/Python/kitbash_converter/standalone.py @@ -18,14 +18,14 @@ import site _MODULE_PATH = os.path.abspath(__file__) _DCCSIG_REL_PATH = "../../../.." -_DCCSIG_PATH = os.path.join(_MODULE_PATH, _DCCSIG_REL_PATH) -_DCCSIG_PATH = os.path.normpath(_DCCSIG_PATH) +_PATH_DCCSIG = os.path.join(_MODULE_PATH, _DCCSIG_REL_PATH) +_PATH_DCCSIG = os.path.normpath(_PATH_DCCSIG) -_DCCSIG_PATH = os.getenv('DCCSIG_PATH', - os.path.abspath(_DCCSIG_PATH)) +_PATH_DCCSIG = os.getenv('PATH_DCCSIG', + os.path.abspath(_PATH_DCCSIG)) # we don't have access yet to the DCCsi Lib\site-packages -site.addsitedir(_DCCSIG_PATH) # PYTHONPATH +site.addsitedir(_PATH_DCCSIG) # PYTHONPATH # azpy bootstrapping and extensions import azpy.config_utils diff --git a/Gems/AtomLyIntegration/TechnicalArt/DccScriptingInterface/SDK/Maya/Scripts/userSetup.py b/Gems/AtomLyIntegration/TechnicalArt/DccScriptingInterface/SDK/Maya/Scripts/userSetup.py index 04eb027142..ad8bc9f1a6 100755 --- a/Gems/AtomLyIntegration/TechnicalArt/DccScriptingInterface/SDK/Maya/Scripts/userSetup.py +++ b/Gems/AtomLyIntegration/TechnicalArt/DccScriptingInterface/SDK/Maya/Scripts/userSetup.py @@ -135,14 +135,14 @@ if _DCCSI_DEV_MODE: # ------------------------------------------------------------------------- # validate access to the DCCsi and it's Lib site-packages # bootstrap site-packages by version -from azpy.constants import PATH_DCCSI_PYTHON_LIB_PATH +from azpy.constants import PATH_DCCSI_PYTHON_LIB try: - os.path.exists(PATH_DCCSI_PYTHON_LIB_PATH) - site.addsitedir(PATH_DCCSI_PYTHON_LIB_PATH) - _LOGGER.info('azpy 3rdPary site-packages: is: {0}'.format(PATH_DCCSI_PYTHON_LIB_PATH)) + os.path.exists(PATH_DCCSI_PYTHON_LIB) + site.addsitedir(PATH_DCCSI_PYTHON_LIB) + _LOGGER.info('azpy 3rdPary site-packages: is: {0}'.format(PATH_DCCSI_PYTHON_LIB)) except Exception as e: - _LOGGER.error('ERROR: {0}, {1}'.format(e, PATH_DCCSI_PYTHON_LIB_PATH)) + _LOGGER.error('ERROR: {0}, {1}'.format(e, PATH_DCCSI_PYTHON_LIB)) raise e # 3rdparty @@ -175,15 +175,15 @@ try: except Exception as e: _LOGGER.critical(_STR_ERROR_ENVAR.format(_BASE_ENVVAR_DICT[ENVAR_DCCSI_SDK_PATH])) -_O3DE_PROJECT_PATH = None +_PATH_O3DE_PROJECT = None try: - _O3DE_PROJECT_PATH = _BASE_ENVVAR_DICT[ENVAR_O3DE_PROJECT_PATH] + _PATH_O3DE_PROJECT = _BASE_ENVVAR_DICT[ENVAR_PATH_O3DE_PROJECT] except Exception as e: - _LOGGER.critical(_STR_ERROR_ENVAR.format(_BASE_ENVVAR_DICT[ENVAR_O3DE_PROJECT_PATH])) + _LOGGER.critical(_STR_ERROR_ENVAR.format(_BASE_ENVVAR_DICT[ENVAR_PATH_O3DE_PROJECT])) # check some env var tags (fail if no, likely means no proper code access) _O3DE_DEV = _BASE_ENVVAR_DICT[ENVAR_O3DE_DEV] -_O3DE_DCCSIG_PATH = _BASE_ENVVAR_DICT[ENVAR_DCCSIG_PATH] +_O3DE_PATH_DCCSIG = _BASE_ENVVAR_DICT[ENVAR_PATH_DCCSIG] _O3DE_DCCSI_LOG_PATH = _BASE_ENVVAR_DICT[ENVAR_DCCSI_LOG_PATH] _O3DE_AZPY_PATH = _BASE_ENVVAR_DICT[ENVAR_DCCSI_AZPY_PATH] # ------------------------------------------------------------------------- @@ -270,18 +270,18 @@ def post_startup(): install_fix_paths() # set the project workspace - #_O3DE_PROJECT_PATH = _BASE_ENVVAR_DICT[ENVAR_O3DE_PROJECT_PATH] - _project_workspace = os.path.join(_O3DE_PROJECT_PATH, TAG_MAYA_WORKSPACE) + #_PATH_O3DE_PROJECT = _BASE_ENVVAR_DICT[ENVAR_PATH_O3DE_PROJECT] + _project_workspace = os.path.join(_PATH_O3DE_PROJECT, TAG_MAYA_WORKSPACE) if os.path.isfile(_project_workspace): try: # load workspace - maya.cmds.workspace(_O3DE_PROJECT_PATH, openWorkspace=True) + maya.cmds.workspace(_PATH_O3DE_PROJECT, openWorkspace=True) _LOGGER.info('Loaded workspace file: {0}'.format(_project_workspace)) - maya.cmds.workspace(_O3DE_PROJECT_PATH, update=True) + maya.cmds.workspace(_PATH_O3DE_PROJECT, update=True) except Exception as e: _LOGGER.error(e) else: - _LOGGER.warning('Workspace file not found: {1}'.format(_O3DE_PROJECT_PATH)) + _LOGGER.warning('Workspace file not found: {1}'.format(_PATH_O3DE_PROJECT)) # Set up Lumberyard, maya default setting from set_defaults import set_defaults diff --git a/Gems/AtomLyIntegration/TechnicalArt/DccScriptingInterface/SDK/Substance/builder/bootstrap.py b/Gems/AtomLyIntegration/TechnicalArt/DccScriptingInterface/SDK/Substance/builder/bootstrap.py index f3e91b59ce..2b735c3630 100755 --- a/Gems/AtomLyIntegration/TechnicalArt/DccScriptingInterface/SDK/Substance/builder/bootstrap.py +++ b/Gems/AtomLyIntegration/TechnicalArt/DccScriptingInterface/SDK/Substance/builder/bootstrap.py @@ -19,10 +19,10 @@ import importlib.util # if running in py2.7 we won't have access to pathlib yet until we boostrap # the DCCsi _MODULE_PATH = os.path.realpath(__file__) # To Do: what if frozen? -_DCCSIG_PATH = os.path.normpath(os.path.join(_MODULE_PATH, '../../../..')) -_DCCSIG_PATH = os.getenv('DCCSIG_PATH', _DCCSIG_PATH) -site.addsitedir(_DCCSIG_PATH) -# print(_DCCSIG_PATH) +_PATH_DCCSIG = os.path.normpath(os.path.join(_MODULE_PATH, '../../../..')) +_PATH_DCCSIG = os.getenv('PATH_DCCSIG', _PATH_DCCSIG) +site.addsitedir(_PATH_DCCSIG) +# print(_PATH_DCCSIG) # Lumberyard DCCsi site extensions from pathlib import Path @@ -46,7 +46,7 @@ _LOGGER = azpy.initialize_logger(_PACKAGENAME, log_to_file=True, default_log_level=_log_level) _LOGGER.debug('Starting up: {0}.'.format({_PACKAGENAME})) -_LOGGER.debug('_DCCSIG_PATH: {}'.format(_DCCSIG_PATH)) +_LOGGER.debug('_PATH_DCCSIG: {}'.format(_PATH_DCCSIG)) _LOGGER.debug('_G_DEBUG: {}'.format(_DCCSI_GDEBUG)) _LOGGER.debug('_DCCSI_DEV_MODE: {}'.format(_DCCSI_DEV_MODE)) @@ -59,7 +59,7 @@ if _DCCSI_DEV_MODE: # we can go ahead and just make sure the the DCCsi env is set # config is SO generic this ensures we are importing a specific one _spec_dccsi_config = importlib.util.spec_from_file_location("dccsi.config", - Path(_DCCSIG_PATH, + Path(_PATH_DCCSIG, "config.py")) _dccsi_config = importlib.util.module_from_spec(_spec_dccsi_config) _spec_dccsi_config.loader.exec_module(_dccsi_config) @@ -96,16 +96,16 @@ from azpy.constants import ENVAR_O3DE_DEV _O3DE_DEV = Path(os.getenv(ENVAR_O3DE_DEV, settings.O3DE_DEV)).resolve() -from azpy.constants import ENVAR_O3DE_PROJECT_PATH -_O3DE_PROJECT_PATH = Path(os.getenv(ENVAR_O3DE_PROJECT_PATH, - settings.O3DE_PROJECT_PATH)).resolve() +from azpy.constants import ENVAR_PATH_O3DE_PROJECT +_PATH_O3DE_PROJECT = Path(os.getenv(ENVAR_PATH_O3DE_PROJECT, + settings.PATH_O3DE_PROJECT)).resolve() from azpy.constants import ENVAR_DCCSI_SDK_PATH _DCCSI_SDK_PATH = Path(os.getenv(ENVAR_DCCSI_SDK_PATH, settings.DCCSIG_SDK_PATH)).resolve() # build some reuseable path parts for the substance builder -_PROJECT_ASSETS_PATH = Path(_O3DE_PROJECT_PATH, 'Assets').resolve() +_PROJECT_ASSETS_PATH = Path(_PATH_O3DE_PROJECT, 'Assets').resolve() _PROJECT_MATERIALS_PATH = Path(_PROJECT_ASSETS_PATH, 'Materials').resolve() # ------------------------------------------------------------------------- @@ -117,7 +117,7 @@ if __name__ == "__main__": """Run this file as main""" _LOGGER.info('_O3DE_DEV: {}'.format(_O3DE_DEV)) - _LOGGER.info('_O3DE_PROJECT_PATH: {}'.format(_O3DE_PROJECT_PATH)) + _LOGGER.info('_PATH_O3DE_PROJECT: {}'.format(_PATH_O3DE_PROJECT)) _LOGGER.info('_DCCSI_SDK_PATH: {}'.format(_DCCSI_SDK_PATH)) _LOGGER.info('_PYSBS_DIR_PATH: {}'.format(_PYSBS_DIR_PATH)) diff --git a/Gems/AtomLyIntegration/TechnicalArt/DccScriptingInterface/SDK/Substance/builder/sb_gui_main.py b/Gems/AtomLyIntegration/TechnicalArt/DccScriptingInterface/SDK/Substance/builder/sb_gui_main.py index 9408b94919..688fd65e9e 100644 --- a/Gems/AtomLyIntegration/TechnicalArt/DccScriptingInterface/SDK/Substance/builder/sb_gui_main.py +++ b/Gems/AtomLyIntegration/TechnicalArt/DccScriptingInterface/SDK/Substance/builder/sb_gui_main.py @@ -76,7 +76,7 @@ settings.setenv() # for standalone # log debug info about Qt/PySide2 _LOGGER.debug('QTFORPYTHON_PATH: {}'.format(settings.QTFORPYTHON_PATH)) -_LOGGER.debug('O3DE_BIN_PATH: {}'.format(settings.O3DE_BIN_PATH)) +_LOGGER.debug('PATH_O3DE_BIN: {}'.format(settings.PATH_O3DE_BIN)) _LOGGER.debug('QT_PLUGIN_PATH: {}'.format(settings.QT_PLUGIN_PATH)) _LOGGER.debug('QT_QPA_PLATFORM_PLUGIN_PATH: {}'.format(settings.QT_QPA_PLATFORM_PLUGIN_PATH)) # ------------------------------------------------------------------------- @@ -129,15 +129,15 @@ _O3DE_DEV = Path(os.getenv(ENVAR_O3DE_DEV, None)).resolve() from azpy.constants import ENVAR_O3DE_PROJECT _O3DE_PROJECT = os.getenv(ENVAR_O3DE_PROJECT, None) -from azpy.constants import ENVAR_O3DE_PROJECT_PATH -_O3DE_PROJECT_PATH = Path(os.getenv(ENVAR_O3DE_PROJECT_PATH, None)).resolve() +from azpy.constants import ENVAR_PATH_O3DE_PROJECT +_PATH_O3DE_PROJECT = Path(os.getenv(ENVAR_PATH_O3DE_PROJECT, None)).resolve() from azpy.constants import ENVAR_DCCSI_SDK_PATH _DCCSI_SDK_PATH = Path(os.getenv(ENVAR_DCCSI_SDK_PATH, None)).resolve() # build some reuseable path parts -_PROJECT_ASSET_PATH = Path(_O3DE_PROJECT_PATH).resolve() -_PROJECT_ASSETS_PATH = Path(_O3DE_PROJECT_PATH, 'Materials').resolve() +_PROJECT_ASSET_PATH = Path(_PATH_O3DE_PROJECT).resolve() +_PROJECT_ASSETS_PATH = Path(_PATH_O3DE_PROJECT, 'Materials').resolve() # To Do: figure out a proper way to deal with Lumberyard game projects _GEM_MATPLAY_PATH = Path(_O3DE_DEV, 'Gems', 'AtomContent', 'AtomMaterialPlayground').resolve() @@ -150,9 +150,9 @@ _SUB_LIBRARY_PATH = Path(_GEM_SUBSOURCELIBRARY, 'Assets', 'SubstanceSource', 'Li # path to watcher script _WATCHER_SCRIPT_PATH = Path(_DCCSI_SDK_PATH, 'substance', 'builder', 'watchdog', '__init__.py').resolve() -_TEX_RNDR_PATH = Path(_O3DE_PROJECT_PATH, 'Materials', 'Substance').resolve() -_MAT_OUTPUT_PATH = Path(_O3DE_PROJECT_PATH, 'Materials', 'Substance').resolve() -_SBSAR_COOK_PATH = Path(_O3DE_PROJECT_PATH, 'Materials', 'Substance').resolve() +_TEX_RNDR_PATH = Path(_PATH_O3DE_PROJECT, 'Materials', 'Substance').resolve() +_MAT_OUTPUT_PATH = Path(_PATH_O3DE_PROJECT, 'Materials', 'Substance').resolve() +_SBSAR_COOK_PATH = Path(_PATH_O3DE_PROJECT, 'Materials', 'Substance').resolve() # ------------------------------------------------------------------------- @@ -171,12 +171,12 @@ class Window(QtWidgets.QDialog): # we should really init non-Qt stuff and set things up as properties if project_path is None: - self.project_path = str(_O3DE_PROJECT_PATH) + self.project_path = str(_PATH_O3DE_PROJECT) else: self.project_path = Path(project_path) if default_material_path is None: - self._default_material_path = Path(_DCCSIG_PATH, + self._default_material_path = Path(_PATH_DCCSIG, 'sdk', 'substance', 'resources', @@ -672,7 +672,7 @@ class Window(QtWidgets.QDialog): # if you want relative paths here is a better way # first of all, assume we know the project we are in - #_O3DE_PROJECT_PATH + #_PATH_O3DE_PROJECT texture_output_path = Path(self.texRenderPathComboBox.currentText()).resolve() rel_tex_path = None @@ -928,7 +928,7 @@ def substance_builder_launcher(): _LOGGER.info('file: {}'.format(__file__)) # *might* come back relative # we should ensure we know the abs path - qss_filepath = Path(_DCCSIG_PATH).resolve().absolute() + qss_filepath = Path(_PATH_DCCSIG).resolve().absolute() qss_filepath = Path(qss_filepath, 'SDK', 'substance', 'builder', 'ui', 'stylesheets', 'LYstyle.qss').resolve().absolute() window.setStyleSheet(qss_filepath.read_text()) diff --git a/Gems/AtomLyIntegration/TechnicalArt/DccScriptingInterface/SDK/Substance/builder/sbs_to_sbsar.py b/Gems/AtomLyIntegration/TechnicalArt/DccScriptingInterface/SDK/Substance/builder/sbs_to_sbsar.py index 441110b8d4..e091849d23 100644 --- a/Gems/AtomLyIntegration/TechnicalArt/DccScriptingInterface/SDK/Substance/builder/sbs_to_sbsar.py +++ b/Gems/AtomLyIntegration/TechnicalArt/DccScriptingInterface/SDK/Substance/builder/sbs_to_sbsar.py @@ -67,11 +67,11 @@ from collections import OrderedDict _SYNTH_ENV_DICT = OrderedDict() _SYNTH_ENV_DICT = azpy.synthetic_env.stash_env(_SYNTH_ENV_DICT) # grab a specific path from the base_env -_PATH_DCCSI = _SYNTH_ENV_DICT[ENVAR_DCCSIG_PATH] -_O3DE_PROJECT_PATH = _SYNTH_ENV_DICT[ENVAR_O3DE_PROJECT_PATH] +_PATH_DCCSI = _SYNTH_ENV_DICT[ENVAR_PATH_DCCSIG] +_PATH_O3DE_PROJECT = _SYNTH_ENV_DICT[ENVAR_PATH_O3DE_PROJECT] # build some reuseable path parts -_PATH_MOCK_ASSETS = Path(_O3DE_PROJECT_PATH, 'Assets').norm() +_PATH_MOCK_ASSETS = Path(_PATH_O3DE_PROJECT, 'Assets').norm() _PATH_MOCK_SUBLIB = Path(_PATH_MOCK_ASSETS, 'SubstanceSource').norm() _PATH_MOCK_SBS = Path(_PATH_MOCK_SUBLIB, 'sbs').norm() diff --git a/Gems/AtomLyIntegration/TechnicalArt/DccScriptingInterface/SDK/Substance/builder/sbsar_info.py b/Gems/AtomLyIntegration/TechnicalArt/DccScriptingInterface/SDK/Substance/builder/sbsar_info.py index 9652b8990a..be1dbbe165 100644 --- a/Gems/AtomLyIntegration/TechnicalArt/DccScriptingInterface/SDK/Substance/builder/sbsar_info.py +++ b/Gems/AtomLyIntegration/TechnicalArt/DccScriptingInterface/SDK/Substance/builder/sbsar_info.py @@ -87,11 +87,11 @@ from collections import OrderedDict _SYNTH_ENV_DICT = OrderedDict() _SYNTH_ENV_DICT = azpy.synthetic_env.stash_env(_SYNTH_ENV_DICT) # grab a specific path from the base_env -_PATH_DCCSI = _SYNTH_ENV_DICT[ENVAR_DCCSIG_PATH] -_O3DE_PROJECT_PATH = _SYNTH_ENV_DICT[ENVAR_O3DE_PROJECT_PATH] +_PATH_DCCSI = _SYNTH_ENV_DICT[ENVAR_PATH_DCCSIG] +_PATH_O3DE_PROJECT = _SYNTH_ENV_DICT[ENVAR_PATH_O3DE_PROJECT] # build some reuseable path parts -_PATH_MOCK_ASSETS = Path(_O3DE_PROJECT_PATH, 'Assets').norm() +_PATH_MOCK_ASSETS = Path(_PATH_O3DE_PROJECT, 'Assets').norm() _PATH_MOCK_SUBLIB = Path(_PATH_MOCK_ASSETS, 'SubstanceSource').norm() _PATH_MOCK_SBS = Path(_PATH_MOCK_SUBLIB, 'sbs').norm() diff --git a/Gems/AtomLyIntegration/TechnicalArt/DccScriptingInterface/SDK/Substance/builder/sbsar_render.py b/Gems/AtomLyIntegration/TechnicalArt/DccScriptingInterface/SDK/Substance/builder/sbsar_render.py index 6285ea0335..a19343dc99 100644 --- a/Gems/AtomLyIntegration/TechnicalArt/DccScriptingInterface/SDK/Substance/builder/sbsar_render.py +++ b/Gems/AtomLyIntegration/TechnicalArt/DccScriptingInterface/SDK/Substance/builder/sbsar_render.py @@ -65,11 +65,11 @@ from collections import OrderedDict _SYNTH_ENV_DICT = OrderedDict() _SYNTH_ENV_DICT = azpy.synthetic_env.stash_env(_SYNTH_ENV_DICT) # grab a specific path from the base_env -_PATH_DCCSI = _SYNTH_ENV_DICT[ENVAR_DCCSIG_PATH] -_O3DE_PROJECT_PATH = _SYNTH_ENV_DICT[ENVAR_O3DE_PROJECT_PATH] +_PATH_DCCSI = _SYNTH_ENV_DICT[ENVAR_PATH_DCCSIG] +_PATH_O3DE_PROJECT = _SYNTH_ENV_DICT[ENVAR_PATH_O3DE_PROJECT] # build some reuseable path parts -_PATH_MOCK_ASSETS = Path(_O3DE_PROJECT_PATH, 'Assets').norm() +_PATH_MOCK_ASSETS = Path(_PATH_O3DE_PROJECT, 'Assets').norm() _PATH_MOCK_SUBLIB = Path(_PATH_MOCK_ASSETS, 'SubstanceSource').norm() _PATH_MOCK_SBS = Path(_PATH_MOCK_SUBLIB, 'sbs').norm() diff --git a/Gems/AtomLyIntegration/TechnicalArt/DccScriptingInterface/SDK/Substance/builder/sbsar_utils.py b/Gems/AtomLyIntegration/TechnicalArt/DccScriptingInterface/SDK/Substance/builder/sbsar_utils.py index 8ffdf30e35..bfcc65b676 100644 --- a/Gems/AtomLyIntegration/TechnicalArt/DccScriptingInterface/SDK/Substance/builder/sbsar_utils.py +++ b/Gems/AtomLyIntegration/TechnicalArt/DccScriptingInterface/SDK/Substance/builder/sbsar_utils.py @@ -189,16 +189,16 @@ if __name__ == "__main__": from azpy import synthetic_env _SYNTH_ENV_DICT = synthetic_env.stash_env() - from azpy.constants import ENVAR_DCCSIG_PATH - from azpy.constants import ENVAR_O3DE_PROJECT_PATH + from azpy.constants import ENVAR_PATH_DCCSIG + from azpy.constants import ENVAR_PATH_O3DE_PROJECT # grab a specific path from the base_env - _PATH_DCCSI = _SYNTH_ENV_DICT[ENVAR_DCCSIG_PATH] + _PATH_DCCSI = _SYNTH_ENV_DICT[ENVAR_PATH_DCCSIG] # use DCCsi as the project path for this test - _O3DE_PROJECT_PATH = _PATH_DCCSI + _PATH_O3DE_PROJECT = _PATH_DCCSI - _PROJECT_ASSETS_PATH = Path(_O3DE_PROJECT_PATH, 'Assets').resolve() + _PROJECT_ASSETS_PATH = Path(_PATH_O3DE_PROJECT, 'Assets').resolve() _PROJECT_MATERIALS_PATH = Path(_PROJECT_ASSETS_PATH, 'Materials').resolve() # this will combine two parts into a single path (object) diff --git a/Gems/AtomLyIntegration/TechnicalArt/DccScriptingInterface/SDK/Substance/builder/substance_tools.py b/Gems/AtomLyIntegration/TechnicalArt/DccScriptingInterface/SDK/Substance/builder/substance_tools.py index 0407a1db08..cea6522e83 100644 --- a/Gems/AtomLyIntegration/TechnicalArt/DccScriptingInterface/SDK/Substance/builder/substance_tools.py +++ b/Gems/AtomLyIntegration/TechnicalArt/DccScriptingInterface/SDK/Substance/builder/substance_tools.py @@ -66,11 +66,11 @@ from collections import OrderedDict _SYNTH_ENV_DICT = OrderedDict() _SYNTH_ENV_DICT = azpy.synthetic_env.stash_env(_SYNTH_ENV_DICT) # grab a specific path from the base_env -_PATH_DCCSI = _SYNTH_ENV_DICT[ENVAR_DCCSIG_PATH] -_O3DE_PROJECT_PATH = _SYNTH_ENV_DICT[ENVAR_O3DE_PROJECT_PATH] +_PATH_DCCSI = _SYNTH_ENV_DICT[ENVAR_PATH_DCCSIG] +_PATH_O3DE_PROJECT = _SYNTH_ENV_DICT[ENVAR_PATH_O3DE_PROJECT] # build some reuseable path parts -_PATH_MOCK_ASSETS = Path(_O3DE_PROJECT_PATH, 'Assets').norm() +_PATH_MOCK_ASSETS = Path(_PATH_O3DE_PROJECT, 'Assets').norm() _PATH_MOCK_SUBLIB = Path(_PATH_MOCK_ASSETS, 'SubstanceSource').norm() _PATH_MOCK_SBS = Path(_PATH_MOCK_SUBLIB, 'sbs').norm() diff --git a/Gems/AtomLyIntegration/TechnicalArt/DccScriptingInterface/SDK/Substance/builder/ui/stylesheets/style_dark.qss b/Gems/AtomLyIntegration/TechnicalArt/DccScriptingInterface/SDK/Substance/builder/ui/stylesheets/style_dark.qss index 193034b781..e308875793 100644 --- a/Gems/AtomLyIntegration/TechnicalArt/DccScriptingInterface/SDK/Substance/builder/ui/stylesheets/style_dark.qss +++ b/Gems/AtomLyIntegration/TechnicalArt/DccScriptingInterface/SDK/Substance/builder/ui/stylesheets/style_dark.qss @@ -1116,91 +1116,6 @@ QPushButton#captureButton:disabled { /*----------------------------------------------------------------------------*/ /*----------------------------------------------------------------------------*/ -Driller--DrillerCaptureWindow > #centralwidget > #playButton { - color: white; -} - - -Driller--DrillerCaptureWindow > #centralwidget > AzToolsFramework--AZAutoSizingScrollArea#scrollArea { - background-color: rgb(100,100,100); - border: 1px solid rgb(100,100,100); -} - -/*----------------------------------------------------------------------------*/ -/*----------------------------------------------------------------------------*/ - -Driller--DrillerMainWindow QDockWidget -{ - background: rgb(56, 58, 59); -} - -Driller--DrillerMainWindow QDockWidget::title -{ - background: rgb(56, 58, 59); -} - -Driller--DrillerMainWindow QDockWidget .QWidget -{ - background: rgb(56, 58, 59); - border: 0px solid red; -} - -/*----------------------------------------------------------------------------*/ -/*----------------------------------------------------------------------------*/ - -Driller--ChannelControl > QFrame { - background-color: rgb(100, 100, 100); -} - -Driller--ChannelControl > #infoArea > QLabel { - color: #999999; - font-size: 12px; - font-family: "open sans"; - font-weight:600; -} - -/*----------------------------------------------------------------------------*/ -/*----------------------------------------------------------------------------*/ - -Driller--ChannelProfilerWidget #profilerName { - color: #cccccc; - font-size: 13px; - font-family: "open sans"; -} - -/*----------------------------------------------------------------------------*/ -/*----------------------------------------------------------------------------*/ - -Driller--AnnotationHeaderView { - background-color: rgb(80,80,80); -} - -Driller--AnnotationHeaderView > #frame { - background-color: rgb(80,80,80); -} - -Driller--AnnotationHeaderView > #frame > #annotationBackground { - background-color: rgb(80,80,80); -} - -Driller--AnnotationHeaderView > #frame > #annotationBackground > #configureAnnotations { - color: white; -} - -/*----------------------------------------------------------------------------*/ -/*----------------------------------------------------------------------------*/ - -/*----------------------------------------------------------------------------*/ -/*----------------------------------------------------------------------------*/ - -Driller--CollapsiblePanel > QGroupBox { - background-color: rgb(56, 58, 59); - margin-top: 0px; -} - -/*----------------------------------------------------------------------------*/ -/*----------------------------------------------------------------------------*/ - AzToolsFramework--TargetSelectorButton#targetButton { color: white; } diff --git a/Gems/AtomLyIntegration/TechnicalArt/DccScriptingInterface/SDK/Substance/builder/watchdog/__init__.py b/Gems/AtomLyIntegration/TechnicalArt/DccScriptingInterface/SDK/Substance/builder/watchdog/__init__.py index 35c970e711..51beb48f3b 100644 --- a/Gems/AtomLyIntegration/TechnicalArt/DccScriptingInterface/SDK/Substance/builder/watchdog/__init__.py +++ b/Gems/AtomLyIntegration/TechnicalArt/DccScriptingInterface/SDK/Substance/builder/watchdog/__init__.py @@ -17,9 +17,9 @@ import time # ------------------------------------------------------------------------- # we don't have access yet to the DCCsi Lib\site-packages # (1) this will give us import access to dccsi and azpy import -_DCCSIG_PATH = os.getenv('DCCSIG_PATH', os.getcwd()) # always?, doubtful +_PATH_DCCSIG = os.getenv('PATH_DCCSIG', os.getcwd()) # always?, doubtful # ^^ this assume that the \DccScriptingInterface is the cwd!!! (launch there) -site.addsitedir(_DCCSIG_PATH) +site.addsitedir(_PATH_DCCSIG) # Lumberyard extensions from azpy.env_bool import env_bool @@ -72,7 +72,7 @@ from collections import OrderedDict _SYNTH_ENV_DICT = OrderedDict() _SYNTH_ENV_DICT = azpy.synthetic_env.stash_env(_SYNTH_ENV_DICT) _O3DE_DEV = _SYNTH_ENV_DICT[ENVAR_O3DE_DEV] -_O3DE_PROJECT_PATH = _SYNTH_ENV_DICT[ENVAR_O3DE_PROJECT_PATH] +_PATH_O3DE_PROJECT = _SYNTH_ENV_DICT[ENVAR_PATH_O3DE_PROJECT] # ------------------------------------------------------------------------- @@ -90,7 +90,7 @@ class MyHandler(PatternMatchingEventHandler): """ self.outputName = event.src_path.split(".sbsar")[0].split("/")[-1] self.outputCookPath = event.src_path.split(self.outputName) - self.outputRenderPath = Path(_O3DE_PROJECT_PATH, 'Assets', 'Textures', 'Substance').norm() + self.outputRenderPath = Path(_PATH_O3DE_PROJECT, 'Assets', 'Textures', 'Substance').norm() _LOGGER.debug(self.outputCookPath, self.outputName, self.outputRenderPath) pysbs_batch.sbsrender_info(input=event.src_path) diff --git a/Gems/AtomLyIntegration/TechnicalArt/DccScriptingInterface/Tools/DCC/Maya/Scripts/userSetup.py b/Gems/AtomLyIntegration/TechnicalArt/DccScriptingInterface/Tools/DCC/Maya/Scripts/userSetup.py index c68eb8d256..b08e79df2e 100644 --- a/Gems/AtomLyIntegration/TechnicalArt/DccScriptingInterface/Tools/DCC/Maya/Scripts/userSetup.py +++ b/Gems/AtomLyIntegration/TechnicalArt/DccScriptingInterface/Tools/DCC/Maya/Scripts/userSetup.py @@ -137,14 +137,14 @@ if _DCCSI_DEV_MODE: # ------------------------------------------------------------------------- # validate access to the DCCsi and it's Lib site-packages # bootstrap site-packages by version -from azpy.constants import PATH_DCCSI_PYTHON_LIB_PATH +from azpy.constants import PATH_DCCSI_PYTHON_LIB try: - os.path.exists(PATH_DCCSI_PYTHON_LIB_PATH) - site.addsitedir(PATH_DCCSI_PYTHON_LIB_PATH) - _LOGGER.info('azpy 3rdPary site-packages: is: {0}'.format(PATH_DCCSI_PYTHON_LIB_PATH)) + os.path.exists(PATH_DCCSI_PYTHON_LIB) + site.addsitedir(PATH_DCCSI_PYTHON_LIB) + _LOGGER.info('azpy 3rdPary site-packages: is: {0}'.format(PATH_DCCSI_PYTHON_LIB)) except Exception as e: - _LOGGER.error('ERROR: {0}, {1}'.format(e, PATH_DCCSI_PYTHON_LIB_PATH)) + _LOGGER.error('ERROR: {0}, {1}'.format(e, PATH_DCCSI_PYTHON_LIB)) raise e # 3rdparty @@ -171,22 +171,22 @@ _LOGGER.info('_MODULENAME: {}'.format(_MODULENAME)) # ------------------------------------------------------------------------- # check some env var tags (fail if no, likely means no proper code access) _STR_ERROR_ENVAR = "Envar 'key' does not exist in base_env: {0}" -_DCCSI_TOOLS_PATH = None +_PATH_DCCSI_TOOLS = None # To Do: needs to be updated to use dynaconf and config.py try: - _DCCSI_TOOLS_PATH = _BASE_ENVVAR_DICT[ENVAR_DCCSI_TOOLS_PATH] + _PATH_DCCSI_TOOLS = _BASE_ENVVAR_DICT[ENVAR_PATH_DCCSI_TOOLS] except Exception as e: - _LOGGER.critical(_STR_ERROR_ENVAR.format(_BASE_ENVVAR_DICT[ENVAR_DCCSI_TOOLS_PATH])) + _LOGGER.critical(_STR_ERROR_ENVAR.format(_BASE_ENVVAR_DICT[ENVAR_PATH_DCCSI_TOOLS])) -_O3DE_PROJECT_PATH = None +_PATH_O3DE_PROJECT = None try: - _O3DE_PROJECT_PATH = _BASE_ENVVAR_DICT[ENVAR_O3DE_PROJECT_PATH] + _PATH_O3DE_PROJECT = _BASE_ENVVAR_DICT[ENVAR_PATH_O3DE_PROJECT] except Exception as e: - _LOGGER.critical(_STR_ERROR_ENVAR.format(_BASE_ENVVAR_DICT[ENVAR_O3DE_PROJECT_PATH])) + _LOGGER.critical(_STR_ERROR_ENVAR.format(_BASE_ENVVAR_DICT[ENVAR_PATH_O3DE_PROJECT])) # check some env var tags (fail if no, likely means no proper code access) _O3DE_DEV = _BASE_ENVVAR_DICT[ENVAR_O3DE_DEV] -_O3DE_DCCSIG_PATH = _BASE_ENVVAR_DICT[ENVAR_DCCSIG_PATH] +_O3DE_PATH_DCCSIG = _BASE_ENVVAR_DICT[ENVAR_PATH_DCCSIG] _O3DE_DCCSI_LOG_PATH = _BASE_ENVVAR_DICT[ENVAR_DCCSI_LOG_PATH] _O3DE_AZPY_PATH = _BASE_ENVVAR_DICT[ENVAR_DCCSI_AZPY_PATH] # ------------------------------------------------------------------------- @@ -216,8 +216,8 @@ def startup(): # get known paths _KNOWN_PATHS = site._init_pathinfo() - if os.path.isdir(_DCCSI_TOOLS_PATH): - site.addsitedir(_DCCSI_TOOLS_PATH, _KNOWN_PATHS) + if os.path.isdir(_PATH_DCCSI_TOOLS): + site.addsitedir(_PATH_DCCSI_TOOLS, _KNOWN_PATHS) try: import azpy.test _LOGGER.info('SUCCESS, import azpy.test') @@ -273,18 +273,18 @@ def post_startup(): install_fix_paths() # set the project workspace - #_O3DE_PROJECT_PATH = _BASE_ENVVAR_DICT[ENVAR_O3DE_PROJECT_PATH] - _project_workspace = os.path.join(_O3DE_PROJECT_PATH, TAG_MAYA_WORKSPACE) + #_PATH_O3DE_PROJECT = _BASE_ENVVAR_DICT[ENVAR_PATH_O3DE_PROJECT] + _project_workspace = os.path.join(_PATH_O3DE_PROJECT, TAG_MAYA_WORKSPACE) if os.path.isfile(_project_workspace): try: # load workspace - maya.cmds.workspace(_O3DE_PROJECT_PATH, openWorkspace=True) + maya.cmds.workspace(_PATH_O3DE_PROJECT, openWorkspace=True) _LOGGER.info('Loaded workspace file: {0}'.format(_project_workspace)) - maya.cmds.workspace(_O3DE_PROJECT_PATH, update=True) + maya.cmds.workspace(_PATH_O3DE_PROJECT, update=True) except Exception as e: _LOGGER.error(e) else: - _LOGGER.warning('Workspace file not found: {1}'.format(_O3DE_PROJECT_PATH)) + _LOGGER.warning('Workspace file not found: {1}'.format(_PATH_O3DE_PROJECT)) # Set up Lumberyard, maya default setting from set_defaults import set_defaults diff --git a/Gems/AtomLyIntegration/TechnicalArt/DccScriptingInterface/Tools/Dev/Windows/Launch_Maya_2020.bat b/Gems/AtomLyIntegration/TechnicalArt/DccScriptingInterface/Tools/Dev/Windows/DCC/Launch_Maya_2020.bat similarity index 91% rename from Gems/AtomLyIntegration/TechnicalArt/DccScriptingInterface/Tools/Dev/Windows/Launch_Maya_2020.bat rename to Gems/AtomLyIntegration/TechnicalArt/DccScriptingInterface/Tools/Dev/Windows/DCC/Launch_Maya_2020.bat index ee2ea5bf1f..230962a4e4 100644 --- a/Gems/AtomLyIntegration/TechnicalArt/DccScriptingInterface/Tools/Dev/Windows/Launch_Maya_2020.bat +++ b/Gems/AtomLyIntegration/TechnicalArt/DccScriptingInterface/Tools/Dev/Windows/DCC/Launch_Maya_2020.bat @@ -14,15 +14,18 @@ PUSHD %~dp0 SETLOCAL ENABLEDELAYEDEXPANSION +:: if the user has set up a custom env call it +IF EXIST "%~dp0..\Env_Dev.bat" CALL %~dp0..\Env_Dev.bat + :: Default Maya and Python version set MAYA_VERSION=2020 set DCCSI_PY_VERSION_MAJOR=2 set DCCSI_PY_VERSION_MINOR=7 set DCCSI_PY_VERSION_RELEASE=11 -CALL %~dp0\Env_Core.bat -CALL %~dp0\Env_Python.bat -CALL %~dp0\Env_Maya.bat +CALL %~dp0\..\Env_Core.bat +CALL %~dp0\..\Env_Python.bat +CALL %~dp0\..\Env_Maya.bat :: ide and debugger plug set DCCSI_PY_DEFAULT=%DCCSI_PY_MAYA% @@ -32,9 +35,6 @@ set DCCSI_PY_DEFAULT=%DCCSI_PY_MAYA% set DCCSI_PY_DCCSI=%DCCSI_LAUNCHERS_PATH%Launch_mayaPy_2020.bat echo DCCSI_PY_DCCSI = %DCCSI_PY_DCCSI% -:: if the user has set up a custom env call it -IF EXIST "%~dp0Env_Dev.bat" CALL %~dp0Env_Dev.bat - echo. echo _____________________________________________________________________ echo. @@ -50,7 +50,7 @@ echo MAYA_LOCATION = %MAYA_LOCATION% echo MAYA_BIN_PATH = %MAYA_BIN_PATH% :: Change to root dir -CD /D %O3DE_PROJECT_PATH% +CD /D %PATH_O3DE_PROJECT% :: Default to the right version of Maya if we can detect it... and launch IF EXIST "%MAYA_BIN_PATH%\maya.exe" ( diff --git a/Gems/AtomLyIntegration/TechnicalArt/DccScriptingInterface/Tools/Dev/Windows/DCC/Launch_Maya_2022.bat b/Gems/AtomLyIntegration/TechnicalArt/DccScriptingInterface/Tools/Dev/Windows/DCC/Launch_Maya_2022.bat new file mode 100644 index 0000000000..2ab189fb87 --- /dev/null +++ b/Gems/AtomLyIntegration/TechnicalArt/DccScriptingInterface/Tools/Dev/Windows/DCC/Launch_Maya_2022.bat @@ -0,0 +1,73 @@ +@echo off +REM +REM Copyright (c) Contributors to the Open 3D Engine Project. +REM For complete copyright and license terms please see the LICENSE at the root of this distribution. +REM +REM SPDX-License-Identifier: Apache-2.0 OR MIT +REM +REM + +:: Store current dir +%~d0 +cd %~dp0 +PUSHD %~dp0 + +SETLOCAL ENABLEDELAYEDEXPANSION + +:: if the user has set up a custom env call it +IF EXIST "%~dp0..\Env_Dev.bat" CALL %~dp0..\Env_Dev.bat + +:: Default Maya and Python version +set MAYA_VERSION=2022 +set DCCSI_PY_VERSION_MAJOR=3 +set DCCSI_PY_VERSION_MINOR=7 +set DCCSI_PY_VERSION_RELEASE=7 + +CALL %~dp0\..\Env_Core.bat +CALL %~dp0\..\Env_Python.bat +CALL %~dp0\..\Env_Maya.bat + +:: ide and debugger plug +set DCCSI_PY_DEFAULT=%DCCSI_PY_MAYA% + +:: Default BASE DCCsi python 3.7 location +:: Can be overridden (example, Launch_mayaPy_%MAYA_VERSION%.bat :: MayaPy.exe) +set DCCSI_PY_DCCSI=%DCCSI_LAUNCHERS_PATH%Launch_mayaPy_%MAYA_VERSION%.bat +echo DCCSI_PY_DCCSI = %DCCSI_PY_DCCSI% + +echo. +echo _____________________________________________________________________ +echo. +echo Launching Maya %MAYA_VERSION% for O3DE DCCsi... +echo _____________________________________________________________________ +echo. + +echo MAYA_VERSION = %MAYA_VERSION% +echo DCCSI_PY_VERSION_MAJOR = %DCCSI_PY_VERSION_MAJOR% +echo DCCSI_PY_VERSION_MINOR = %DCCSI_PY_VERSION_MINOR% +echo DCCSI_PY_VERSION_RELEASE = %DCCSI_PY_VERSION_RELEASE% +echo MAYA_LOCATION = %MAYA_LOCATION% +echo MAYA_BIN_PATH = %MAYA_BIN_PATH% + +:: Change to root dir +CD /D %PATH_O3DE_PROJECT% + +:: Default to the right version of Maya if we can detect it... and launch +IF EXIST "%MAYA_BIN_PATH%\maya.exe" ( + start "" "%MAYA_BIN_PATH%\maya.exe" %* +) ELSE ( + Where maya.exe 2> NUL + IF ERRORLEVEL 1 ( + echo Maya.exe could not be found + pause + ) ELSE ( + start "" Maya.exe %* + ) +) + +::ENDLOCAL + +:: Restore previous directory +POPD + +:END_OF_FILE diff --git a/Gems/AtomLyIntegration/TechnicalArt/DccScriptingInterface/Tools/Dev/Windows/Launch_mayaPy_2020.bat b/Gems/AtomLyIntegration/TechnicalArt/DccScriptingInterface/Tools/Dev/Windows/DCC/Launch_mayaPy_2020.bat similarity index 87% rename from Gems/AtomLyIntegration/TechnicalArt/DccScriptingInterface/Tools/Dev/Windows/Launch_mayaPy_2020.bat rename to Gems/AtomLyIntegration/TechnicalArt/DccScriptingInterface/Tools/Dev/Windows/DCC/Launch_mayaPy_2020.bat index 33b8bc6392..cb947a9b6c 100644 --- a/Gems/AtomLyIntegration/TechnicalArt/DccScriptingInterface/Tools/Dev/Windows/Launch_mayaPy_2020.bat +++ b/Gems/AtomLyIntegration/TechnicalArt/DccScriptingInterface/Tools/Dev/Windows/DCC/Launch_mayaPy_2020.bat @@ -17,18 +17,18 @@ COLOR 8E cd %~dp0 PUSHD %~dp0 +:: if the user has set up a custom env call it +IF EXIST "%~dp0..\Env_Dev.bat" CALL %~dp0..\Env_Dev.bat + :: Default Maya and Python version set MAYA_VERSION=2020 set DCCSI_PY_VERSION_MAJOR=2 set DCCSI_PY_VERSION_MINOR=7 set DCCSI_PY_VERSION_RELEASE=11 -CALL %~dp0\Env_Core.bat -CALL %~dp0\Env_Python.bat -CALL %~dp0\Env_Maya.bat - -:: if the user has set up a custom env call it -IF EXIST "%~dp0Env_Dev.bat" CALL %~dp0Env_Dev.bat +CALL %~dp0\..\Env_Core.bat +CALL %~dp0\..\Env_Python.bat +CALL %~dp0\..\Env_Maya.bat :: ide and debugger plug set DCCSI_PY_DEFAULT=%DCCSI_PY_MAYA% @@ -48,7 +48,7 @@ echo MAYA_LOCATION = %MAYA_LOCATION% echo MAYA_BIN_PATH = %MAYA_BIN_PATH% :: Change to root dir -CD /D %O3DE_PROJECT_PATH% +CD /D %PATH_O3DE_PROJECT% SETLOCAL ENABLEDELAYEDEXPANSION @@ -58,10 +58,10 @@ IF EXIST "%DCCSI_PY_MAYA%" ( ) ELSE ( Where maya.exe 2> NUL IF ERRORLEVEL 1 ( - echo Maya.exe could not be found + echo MayaPy.exe could not be found pause ) ELSE ( - start "" Maya.exe %* + start "" MayaPy.exe %* ) ) diff --git a/Gems/AtomLyIntegration/TechnicalArt/DccScriptingInterface/Tools/Dev/Windows/DCC/Launch_mayaPy_2022.bat b/Gems/AtomLyIntegration/TechnicalArt/DccScriptingInterface/Tools/Dev/Windows/DCC/Launch_mayaPy_2022.bat new file mode 100644 index 0000000000..91b1750a3c --- /dev/null +++ b/Gems/AtomLyIntegration/TechnicalArt/DccScriptingInterface/Tools/Dev/Windows/DCC/Launch_mayaPy_2022.bat @@ -0,0 +1,73 @@ +@echo off +REM +REM Copyright (c) Contributors to the Open 3D Engine Project. +REM For complete copyright and license terms please see the LICENSE at the root of this distribution. +REM +REM SPDX-License-Identifier: Apache-2.0 OR MIT +REM +REM + +:: Set up window +TITLE O3DE DCCsi Launch MayaPy +:: Use obvious color to prevent confusion (Grey with Yellow Text) +COLOR 8E + +:: Store current directory and change to environment directory so script works in any path. +%~d0 +cd %~dp0 +PUSHD %~dp0 + +:: if the user has set up a custom env call it +IF EXIST "%~dp0..\Env_Dev.bat" CALL %~dp0..\Env_Dev.bat + +:: Default Maya and Python version +set MAYA_VERSION=2022 +set DCCSI_PY_VERSION_MAJOR=3 +set DCCSI_PY_VERSION_MINOR=7 +set DCCSI_PY_VERSION_RELEASE=7 + +CALL %~dp0\..\Env_Core.bat +CALL %~dp0\..\Env_Python.bat +CALL %~dp0\..\Env_Maya.bat + +:: ide and debugger plug +set DCCSI_PY_DEFAULT=%DCCSI_PY_MAYA% + +echo. +echo _____________________________________________________________________ +echo. +echo ~ Launching O3DE DCCsi MayaPy (%MAYA_VERSION%) ... +echo ________________________________________________________________ +echo. + +echo MAYA_VERSION = %MAYA_VERSION% +echo DCCSI_PY_VERSION_MAJOR = %DCCSI_PY_VERSION_MAJOR% +echo DCCSI_PY_VERSION_MINOR = %DCCSI_PY_VERSION_MINOR% +echo DCCSI_PY_VERSION_RELEASE = %DCCSI_PY_VERSION_RELEASE% +echo MAYA_LOCATION = %MAYA_LOCATION% +echo MAYA_BIN_PATH = %MAYA_BIN_PATH% + +:: Change to root dir +CD /D %PATH_O3DE_PROJECT% + +SETLOCAL ENABLEDELAYEDEXPANSION + +:: Default to the right version of Maya if we can detect it... and launch +IF EXIST "%DCCSI_PY_MAYA%" ( + start "" "%DCCSI_PY_MAYA%" %* +) ELSE ( + Where maya.exe 2> NUL + IF ERRORLEVEL 1 ( + echo MayaPy.exe could not be found + pause + ) ELSE ( + start "" MayaPy.exe %* + ) +) + +ENDLOCAL + +:: Return to starting directory +POPD + +:END_OF_FILE diff --git a/Gems/AtomLyIntegration/TechnicalArt/DccScriptingInterface/Tools/Dev/Windows/Env_Core.bat b/Gems/AtomLyIntegration/TechnicalArt/DccScriptingInterface/Tools/Dev/Windows/Env_Core.bat index b37170d605..a124c100b0 100644 --- a/Gems/AtomLyIntegration/TechnicalArt/DccScriptingInterface/Tools/Dev/Windows/Env_Core.bat +++ b/Gems/AtomLyIntegration/TechnicalArt/DccScriptingInterface/Tools/Dev/Windows/Env_Core.bat @@ -74,8 +74,8 @@ echo O3DE_PROJECT = %O3DE_PROJECT% :: if not set we also use the DCCsi path as stand-in CD /D ..\..\..\ :: To Do: remove one of these -IF "%O3DE_PROJECT_PATH%"=="" (set O3DE_PROJECT_PATH=%CD%) -echo O3DE_PROJECT_PATH = %O3DE_PROJECT_PATH% +IF "%PATH_O3DE_PROJECT%"=="" (set PATH_O3DE_PROJECT=%CD%) +echo PATH_O3DE_PROJECT = %PATH_O3DE_PROJECT% IF "%ABS_PATH%"=="" (set ABS_PATH=%CD%) echo ABS_PATH = %ABS_PATH% @@ -84,7 +84,7 @@ echo ABS_PATH = %ABS_PATH% pushd %ABS_PATH% :: Change to root Lumberyard dev dir -CD /d %O3DE_PROJECT_PATH%\%O3DE_REL_PATH% +CD /d %PATH_O3DE_PROJECT%\%O3DE_REL_PATH% IF "%O3DE_DEV%"=="" (set O3DE_DEV=%CD%) echo O3DE_DEV = %O3DE_DEV% :: Restore original directory @@ -92,32 +92,32 @@ popd :: dcc scripting interface gem path :: currently know relative path to this gem -set DCCSIG_PATH=%O3DE_DEV%\Gems\AtomLyIntegration\TechnicalArt\DccScriptingInterface -echo DCCSIG_PATH = %DCCSIG_PATH% +set PATH_DCCSIG=%O3DE_DEV%\Gems\AtomLyIntegration\TechnicalArt\DccScriptingInterface +echo PATH_DCCSIG = %PATH_DCCSIG% :: Change to DCCsi root dir -CD /D %DCCSIG_PATH% +CD /D %PATH_DCCSIG% :: per-dcc sdk path -set DCCSI_TOOLS_PATH=%DCCSIG_PATH%\Tools -echo DCCSI_TOOLS_PATH = %DCCSI_TOOLS_PATH% +set PATH_DCCSI_TOOLS=%PATH_DCCSIG%\Tools +echo PATH_DCCSI_TOOLS = %PATH_DCCSI_TOOLS% :: temp log location specific to this gem -set DCCSI_LOG_PATH=%O3DE_PROJECT_PATH%\.temp\logs +set DCCSI_LOG_PATH=%PATH_O3DE_PROJECT%\.temp\logs echo DCCSI_LOG_PATH = %DCCSI_LOG_PATH% :: O3DE build path IF "%O3DE_BUILD_FOLDER%"=="" (set O3DE_BUILD_FOLDER=build) echo O3DE_BUILD_FOLDER = %O3DE_BUILD_FOLDER% -IF "%O3DE_BUILD_PATH%"=="" (set O3DE_BUILD_PATH=%O3DE_DEV%\%O3DE_BUILD_FOLDER%) -echo O3DE_BUILD_PATH = %O3DE_BUILD_PATH% +IF "%PATH_O3DE_BUILD%"=="" (set PATH_O3DE_BUILD=%O3DE_DEV%\%O3DE_BUILD_FOLDER%) +echo PATH_O3DE_BUILD = %PATH_O3DE_BUILD% -IF "%O3DE_BIN_PATH%"=="" (set O3DE_BIN_PATH=%O3DE_BUILD_PATH%\bin\profile) -echo O3DE_BIN_PATH = %O3DE_BIN_PATH% +IF "%PATH_O3DE_BIN%"=="" (set PATH_O3DE_BIN=%PATH_O3DE_BUILD%\bin\profile) +echo PATH_O3DE_BIN = %PATH_O3DE_BIN% :: add to the PATH -SET PATH=%O3DE_BIN_PATH%;%DCCSIG_PATH%;%PATH% +SET PATH=%PATH_O3DE_BIN%;%PATH_DCCSIG%;%PATH% ::ENDLOCAL diff --git a/Gems/AtomLyIntegration/TechnicalArt/DccScriptingInterface/Tools/Dev/Windows/Env_Dev.bat.example b/Gems/AtomLyIntegration/TechnicalArt/DccScriptingInterface/Tools/Dev/Windows/Env_Dev.bat.example new file mode 100644 index 0000000000..ad1e429967 --- /dev/null +++ b/Gems/AtomLyIntegration/TechnicalArt/DccScriptingInterface/Tools/Dev/Windows/Env_Dev.bat.example @@ -0,0 +1,20 @@ +@echo off + +REM +REM Copyright (c) Contributors to the Open 3D Engine Project. +REM For complete copyright and license terms please see the LICENSE at the root of this distribution. +REM +REM SPDX-License-Identifier: Apache-2.0 OR MIT +REM +REM + +set DCCSI_CUSTOM=Foo +echo DCCSI_CUSTOM = %DCCSI_CUSTOM% + +set O3DE_BUILD_FOLDER=custom_build +echo O3DE_BUILD_FOLDER = %O3DE_BUILD_FOLDER% + +set DCCSI_GDEBUG=True +set DCCSI_DEV_MODE=True +set DCCSI_GDEBUGGER=WING +set DCCSI_LOGLEVEL=10 \ No newline at end of file diff --git a/Gems/AtomLyIntegration/TechnicalArt/DccScriptingInterface/Tools/Dev/Windows/Env_Maya.bat b/Gems/AtomLyIntegration/TechnicalArt/DccScriptingInterface/Tools/Dev/Windows/Env_Maya.bat index 5e3c600124..9bed3b301b 100644 --- a/Gems/AtomLyIntegration/TechnicalArt/DccScriptingInterface/Tools/Dev/Windows/Env_Maya.bat +++ b/Gems/AtomLyIntegration/TechnicalArt/DccScriptingInterface/Tools/Dev/Windows/Env_Maya.bat @@ -22,12 +22,13 @@ IF "%DCCSI_ENV_MAYA_INIT%"=="1" GOTO :END_OF_FILE cd %~dp0 PUSHD %~dp0 -IF "%DCCSI_PY_VERSION_MAJOR%"=="" (set DCCSI_PY_VERSION_MAJOR=2) +:: Maya 2022: 3.7.7 (tags/v3.7.7:d7c567b08f, Mar 10 2020, 10:41:24) [MSC v.1900 64 bit (AMD64)] +IF "%DCCSI_PY_VERSION_MAJOR%"=="" (set DCCSI_PY_VERSION_MAJOR=3) IF "%DCCSI_PY_VERSION_MINOR%"=="" (set DCCSI_PY_VERSION_MINOR=7) -IF "%DCCSI_PY_VERSION_RELEASE%"=="" (set DCCSI_PY_VERSION_RELEASE=11) +IF "%DCCSI_PY_VERSION_RELEASE%"=="" (set DCCSI_PY_VERSION_RELEASE=7) :: Default Maya Version -IF "%DCCSI_MAYA_VERSION%"=="" (set DCCSI_MAYA_VERSION=2020) +IF "%MAYA_VERSION%"=="" (set MAYA_VERSION=2022) :: Initialize env CALL %~dp0\Env_Core.bat @@ -43,14 +44,14 @@ echo. echo DCCSI_PY_VERSION_MAJOR = %DCCSI_PY_VERSION_MAJOR% echo DCCSI_PY_VERSION_MINOR = %DCCSI_PY_VERSION_MINOR% echo DCCSI_PY_VERSION_RELEASE = %DCCSI_PY_VERSION_RELEASE% -echo DCCSI_MAYA_VERSION = %DCCSI_MAYA_VERSION% +echo MAYA_VERSION = %MAYA_VERSION% :::: Set Maya native project acess to this project -IF "%MAYA_PROJECT%"=="" (set MAYA_PROJECT=%O3DE_PROJECT%) +IF "%MAYA_PROJECT%"=="" (set MAYA_PROJECT=%PATH_O3DE_PROJECT%) echo MAYA_PROJECT = %MAYA_PROJECT% :: maya sdk path -set DCCSI_TOOLS_MAYA_PATH=%DCCSI_TOOLS_PATH%\DCC\Maya +set DCCSI_TOOLS_MAYA_PATH=%PATH_DCCSI_TOOLS%\DCC\Maya echo DCCSI_TOOLS_MAYA_PATH = %DCCSI_TOOLS_MAYA_PATH% set MAYA_MODULE_PATH=%DCCSI_TOOLS_MAYA_PATH%;%MAYA_MODULE_PATH% @@ -59,7 +60,7 @@ echo MAYA_MODULE_PATH = %MAYA_MODULE_PATH% :: Maya File Paths, etc :: https://knowledge.autodesk.com/support/maya/learn-explore/caas/CloudHelp/cloudhelp/2015/ENU/Maya/files/Environment-Variables-File-path-variables-htm.html :::: Set Maya native project acess to this project -IF "%MAYA_LOCATION%"=="" (set MAYA_LOCATION=%ProgramFiles%\Autodesk\Maya%DCCSI_MAYA_VERSION%) +IF "%MAYA_LOCATION%"=="" (set MAYA_LOCATION=%ProgramFiles%\Autodesk\Maya%MAYA_VERSION%) echo MAYA_LOCATION = %MAYA_LOCATION% IF "%MAYA_BIN_PATH%"=="" (set MAYA_BIN_PATH=%MAYA_LOCATION%\bin) diff --git a/Gems/AtomLyIntegration/TechnicalArt/DccScriptingInterface/Tools/Dev/Windows/Env_PyCharm.bat b/Gems/AtomLyIntegration/TechnicalArt/DccScriptingInterface/Tools/Dev/Windows/Env_PyCharm.bat index 7be9154e6d..fbcc59d5d0 100644 --- a/Gems/AtomLyIntegration/TechnicalArt/DccScriptingInterface/Tools/Dev/Windows/Env_PyCharm.bat +++ b/Gems/AtomLyIntegration/TechnicalArt/DccScriptingInterface/Tools/Dev/Windows/Env_PyCharm.bat @@ -17,30 +17,32 @@ IF "%DCCSI_ENV_PYCHARM_INIT%"=="1" GOTO :END_OF_FILE cd %~dp0 PUSHD %~dp0 +:: version Year +IF "%PYCHARM_VERSION_YEAR%"=="" (set PYCHARM_VERSION_YEAR=2020) :: version Major -SET PYCHARM_VERSION_YEAR=2020 -:: version Major -SET PYCHARM_VERSION_MAJOR=2 +IF "%PYCHARM_VERSION_MAJOR%"=="" (set PYCHARM_VERSION_MAJOR=3) +:: version Minor +IF "%PYCHARM_VERSION_MINOR%"=="" (set PYCHARM_VERSION_MINOR=2) + +:: PyCharm install paths look something like the following and has changed from release to release ::"C:\Program Files\JetBrains\PyCharm 2019.1.3\bin" +::"C:\Program Files\JetBrains\PyCharm 2020.3.2\bin" <-- this is mine @HogJonnyAMZN ::"C:\Program Files\JetBrains\PyCharm Community Edition 2018.3.5\bin\pycharm64.exe" +:: The version of PyCharm can be updated without altering the install path +:: You can set the envar to your local install path in the Env_Dev.bat file to override +:: C:< o3de install location >\Gems\AtomLyIntegration\TechnicalArt\DccScriptingInterface\Tools\Dev\Windows\Env_Dev.bat" + :: put project env variables/paths here -set PYCHARM_HOME=%PROGRAMFILES%\JetBrains\PyCharm %PYCHARM_VERSION_YEAR%.%PYCHARM_VERSION_MAJOR% +IF "%PYCHARM_HOME%"=="" (set PYCHARM_HOME=%PROGRAMFILES%\JetBrains\PyCharm %PYCHARM_VERSION_YEAR%.%PYCHARM_VERSION_MAJOR%.%PYCHARM_VERSION_MINOR%) :: Initialize env CALL %~dp0\Env_Core.bat CALL %~dp0\Env_Python.bat CALL %~dp0\Env_Qt.bat -:: Wing and other IDEs probably prefer access directly to the python.exe -set DCCSI_PY_IDE = %O3DE_PYTHON_INSTALL%\runtime\python-3.7.10-rev2-windows\python -echo DCCSI_PY_IDE = %DCCSI_PY_IDE% - -:: ide and debugger plug -set DCCSI_PY_DEFAULT=%DCCSI_PY_IDE%\python.exe - -SET PYCHARM_PROJ=%DCCSIG_PATH%\Solutions +IF "%PYCHARM_PROJ%"=="" (SET PYCHARM_PROJ=%PATH_DCCSIG%\Tools\Dev\Windows\Solutions) echo. echo _____________________________________________________________________ diff --git a/Gems/AtomLyIntegration/TechnicalArt/DccScriptingInterface/Tools/Dev/Windows/Env_Python.bat b/Gems/AtomLyIntegration/TechnicalArt/DccScriptingInterface/Tools/Dev/Windows/Env_Python.bat index 388ab531df..92030f9d61 100644 --- a/Gems/AtomLyIntegration/TechnicalArt/DccScriptingInterface/Tools/Dev/Windows/Env_Python.bat +++ b/Gems/AtomLyIntegration/TechnicalArt/DccScriptingInterface/Tools/Dev/Windows/Env_Python.bat @@ -42,39 +42,39 @@ echo DCCSI_PY_VERSION_RELEASE = %DCCSI_PY_VERSION_RELEASE% :: shared location for 64bit python 3.7 DEV location :: this defines a DCCsi sandbox for lib site-packages by version :: \Gems\AtomLyIntegration\TechnicalArt\DccScriptingInterface\3rdParty\Python\Lib -set DCCSI_PYTHON_PATH=%DCCSIG_PATH%\3rdParty\Python -echo DCCSI_PYTHON_PATH = %DCCSI_PYTHON_PATH% +set PATH_DCCSI_PYTHON=%PATH_DCCSIG%\3rdParty\Python +echo PATH_DCCSI_PYTHON = %PATH_DCCSI_PYTHON% :: add access to a Lib location that matches the py version (example: 3.7.x) :: switch this for other python versions like maya (2.7.x) -IF "%DCCSI_PYTHON_LIB_PATH%"=="" (set DCCSI_PYTHON_LIB_PATH=%DCCSI_PYTHON_PATH%\Lib\%DCCSI_PY_VERSION_MAJOR%.x\%DCCSI_PY_VERSION_MAJOR%.%DCCSI_PY_VERSION_MINOR%.x\site-packages) -echo DCCSI_PYTHON_LIB_PATH = %DCCSI_PYTHON_LIB_PATH% +IF "%PATH_DCCSI_PYTHON_LIB%"=="" (set PATH_DCCSI_PYTHON_LIB=%PATH_DCCSI_PYTHON%\Lib\%DCCSI_PY_VERSION_MAJOR%.x\%DCCSI_PY_VERSION_MAJOR%.%DCCSI_PY_VERSION_MINOR%.x\site-packages) +echo PATH_DCCSI_PYTHON_LIB = %PATH_DCCSI_PYTHON_LIB% :: add to the PATH -SET PATH=%DCCSI_PYTHON_LIB_PATH%;%PATH% +SET PATH=%PATH_DCCSI_PYTHON_LIB%;%PATH% :: shared location for default O3DE python location -set O3DE_PYTHON_INSTALL=%O3DE_DEV%\python -echo O3DE_PYTHON_INSTALL = %O3DE_PYTHON_INSTALL% +set PATH_O3DE_PYTHON_INSTALL=%O3DE_DEV%\python +echo PATH_O3DE_PYTHON_INSTALL = %PATH_O3DE_PYTHON_INSTALL% :: location for O3DE python 3.7 location :: Note, many DCC tools (like Maya) include thier own python interpretter :: Some DCC apps may not operate correctly if PYTHONHOME is set (this is definitely the case with Maya) :: Be aware the python.cmd below does set PYTHONHOME -set DCCSI_PY_BASE=%O3DE_PYTHON_INSTALL%\python.cmd +set DCCSI_PY_BASE=%PATH_O3DE_PYTHON_INSTALL%\python.cmd echo DCCSI_PY_BASE = %DCCSI_PY_BASE% -CALL %O3DE_PYTHON_INSTALL%\get_python_path.bat +CALL %PATH_O3DE_PYTHON_INSTALL%\get_python_path.bat :: Some IDEs like Wing, may in some cases need acess directly to the exe to operate correctly IF "%DCCSI_PY_IDE%"=="" (set DCCSI_PY_IDE=%O3DE_PYTHONHOME%\python.exe) echo DCCSI_PY_IDE = %DCCSI_PY_IDE% :: add to the PATH -SET PATH=%O3DE_PYTHON_INSTALL%;%O3DE_PYTHONHOME%;%DCCSI_PY_IDE%;%PATH% +SET PATH=%PATH_O3DE_PYTHON_INSTALL%;%O3DE_PYTHONHOME%;%DCCSI_PY_IDE%;%PATH% :: add all python related paths to PYTHONPATH for package imports -set PYTHONPATH=%DCCSIG_PATH%;%DCCSI_PYTHON_LIB_PATH%;%O3DE_BUILD_PATH%;%PYTHONPATH% +set PYTHONPATH=%PATH_DCCSIG%;%PATH_DCCSI_PYTHON_LIB%;%PATH_O3DE_BUILD%;%PYTHONPATH% echo PYTHONPATH = %PYTHONPATH% :: Set flag so we don't initialize dccsi environment twice diff --git a/Gems/AtomLyIntegration/TechnicalArt/DccScriptingInterface/Tools/Dev/Windows/Env_Qt.bat b/Gems/AtomLyIntegration/TechnicalArt/DccScriptingInterface/Tools/Dev/Windows/Env_Qt.bat index 6202ead2f2..dff775efda 100644 --- a/Gems/AtomLyIntegration/TechnicalArt/DccScriptingInterface/Tools/Dev/Windows/Env_Qt.bat +++ b/Gems/AtomLyIntegration/TechnicalArt/DccScriptingInterface/Tools/Dev/Windows/Env_Qt.bat @@ -41,16 +41,16 @@ echo QTFORPYTHON_PATH = %QTFORPYTHON_PATH% SET PATH=%QTFORPYTHON_PATH%;%PATH% SET PYTHONPATH=%QTFORPYTHON_PATH%;%PYTHONPATH% -set QT_PLUGIN_PATH=%O3DE_BUILD_PATH%\bin\profile\EditorPlugins +set QT_PLUGIN_PATH=%PATH_O3DE_BUILD%\bin\profile\EditorPlugins echo QT_PLUGIN_PATH = %QT_PLUGIN_PATH% :: add to the PATH SET PATH=%QT_PLUGIN_PATH%;%PATH% SET PYTHONPATH=%QT_PLUGIN_PATH%;%PYTHONPATH% -set O3DE_BIN_PATH=%O3DE_BUILD_PATH%\bin\profile -echo O3DE_BIN_PATH = %O3DE_BIN_PATH% -SET PATH=%O3DE_BIN_PATH%;%PATH% +set PATH_O3DE_BIN=%PATH_O3DE_BUILD%\bin\profile +echo PATH_O3DE_BIN = %PATH_O3DE_BIN% +SET PATH=%PATH_O3DE_BIN%;%PATH% ::ENDLOCAL diff --git a/Gems/AtomLyIntegration/TechnicalArt/DccScriptingInterface/Tools/Dev/Windows/Env_Substance.bat b/Gems/AtomLyIntegration/TechnicalArt/DccScriptingInterface/Tools/Dev/Windows/Env_Substance.bat index d44ed985da..200c8c6435 100644 --- a/Gems/AtomLyIntegration/TechnicalArt/DccScriptingInterface/Tools/Dev/Windows/Env_Substance.bat +++ b/Gems/AtomLyIntegration/TechnicalArt/DccScriptingInterface/Tools/Dev/Windows/Env_Substance.bat @@ -31,16 +31,16 @@ echo. : Substance Designer :: maya sdk path -set DCCSI_SUBSTANCE_PATH=%DCCSI_TOOLS_PATH%\Substance -echo DCCSI_SUBSTANCE_PATH = %DCCSI_SUBSTANCE_PATH% +set PATH_DCCSI_SUBSTANCE=%PATH_DCCSI_TOOLS%\Substance +echo PATH_DCCSI_SUBSTANCE = %PATH_DCCSI_SUBSTANCE% :: https://docs.substance3d.com/sddoc/project-preferences-107118596.html#ProjectPreferences-ConfigurationFile :: Path to .exe, "C:\Program Files\Allegorithmic\Substance Designer\Substance Designer.exe" -set SUBSTANCE_PATH="%ProgramFiles%\Allegorithmic\Substance Designer" -echo SUBSTANCE_PATH = %SUBSTANCE_PATH% +set PATH_SUBSTANCE_DESIGNER="%ProgramFiles%\Allegorithmic\Substance Designer" +echo PATH_SUBSTANCE_DESIGNER = %PATH_SUBSTANCE_DESIGNER% :: default config -set SUBSTANCE_CFG_PATH=%O3DE_PROJECT_PATH%\DCCsi_default.sbscfg -echo SUBSTANCE_CFG_PATH = %SUBSTANCE_CFG_PATH% +IF "%PATH_SUBSTANCE_DESIGNER_CFG%"=="" (set PATH_SUBSTANCE_DESIGNER_CFG=%PATH_O3DE_PROJECT%\DCCsi_default.sbscfg) +echo PATH_SUBSTANCE_DESIGNER_CFG = %PATH_SUBSTANCE_DESIGNER_CFG% ::ENDLOCAL diff --git a/Gems/AtomLyIntegration/TechnicalArt/DccScriptingInterface/Tools/Dev/Windows/Env_VScode.bat b/Gems/AtomLyIntegration/TechnicalArt/DccScriptingInterface/Tools/Dev/Windows/Env_VScode.bat index 960d910a54..dc4beedf7f 100644 --- a/Gems/AtomLyIntegration/TechnicalArt/DccScriptingInterface/Tools/Dev/Windows/Env_VScode.bat +++ b/Gems/AtomLyIntegration/TechnicalArt/DccScriptingInterface/Tools/Dev/Windows/Env_VScode.bat @@ -29,7 +29,7 @@ CALL %~dp0\Env_Qt.bat :: that will change the paths assumed in this launcher (assume system install) :: vscode envars: https://code.visualstudio.com/docs/editor/variables-reference -SET VSCODE_WRKSPC=%DCCSIG_PATH%\Solutions\.vscode\dccsi.code-workspace +IF "%VSCODE_WRKSPC%"=="" (SET VSCODE_WRKSPC=%PATH_DCCSIG%\Solutions\.vscode\dccsi.code-workspace) echo. echo _____________________________________________________________________ diff --git a/Gems/AtomLyIntegration/TechnicalArt/DccScriptingInterface/Tools/Dev/Windows/Env_WingIDE.bat b/Gems/AtomLyIntegration/TechnicalArt/DccScriptingInterface/Tools/Dev/Windows/Env_WingIDE.bat index a8c3b3d073..d8ff58b575 100644 --- a/Gems/AtomLyIntegration/TechnicalArt/DccScriptingInterface/Tools/Dev/Windows/Env_WingIDE.bat +++ b/Gems/AtomLyIntegration/TechnicalArt/DccScriptingInterface/Tools/Dev/Windows/Env_WingIDE.bat @@ -28,8 +28,8 @@ CALL %~dp0\Env_Python.bat CALL %~dp0\Env_Qt.bat :: put project env variables/paths here -set WINGHOME=%PROGRAMFILES(X86)%\Wing Pro %DCCSI_WING_VERSION_MAJOR%.%DCCSI_WING_VERSION_MINOR% -SET WING_PROJ=%DCCSIG_PATH%\Tools\Dev\Windows\Solutions\.wing\DCCsi_%DCCSI_WING_VERSION_MAJOR%x.wpr +IF "%WINGHOME%"=="" (set WINGHOME=%PROGRAMFILES(X86)%\Wing Pro %DCCSI_WING_VERSION_MAJOR%.%DCCSI_WING_VERSION_MINOR%) +IF "%WING_PROJ%"=="" (set WING_PROJ=%PATH_DCCSIG%\Tools\Dev\Windows\Solutions\.wing\DCCsi_%DCCSI_WING_VERSION_MAJOR%x.wpr) echo. echo _____________________________________________________________________ diff --git a/Gems/AtomLyIntegration/TechnicalArt/DccScriptingInterface/Tools/Dev/Windows/IDE/Launch_MayaPy_PyCharmPro.bat b/Gems/AtomLyIntegration/TechnicalArt/DccScriptingInterface/Tools/Dev/Windows/IDE/Launch_MayaPy_PyCharmPro.bat new file mode 100644 index 0000000000..8802b8dd54 --- /dev/null +++ b/Gems/AtomLyIntegration/TechnicalArt/DccScriptingInterface/Tools/Dev/Windows/IDE/Launch_MayaPy_PyCharmPro.bat @@ -0,0 +1,88 @@ +@echo off +REM +REM Copyright (c) Contributors to the Open 3D Engine Project. +REM For complete copyright and license terms please see the LICENSE at the root of this distribution. +REM +REM SPDX-License-Identifier: Apache-2.0 OR MIT +REM +REM + +:: Set up window +TITLE O3DE DCCsi GEM PyCharm +:: Use obvious color to prevent confusion (Grey with Yellow Text) +COLOR 8E + +:: Store current dir +%~d0 +cd %~dp0 +PUSHD %~dp0 + +:: Constant Vars (Global) +:: global debug (propogates) +IF "%DCCSI_GDEBUG%"=="" (set DCCSI_GDEBUG=False) +echo DCCSI_GDEBUG = %DCCSI_GDEBUG% +:: initiates debugger connection +IF "%DCCSI_DEV_MODE%"=="" (set DCCSI_DEV_MODE=False) +echo DCCSI_DEV_MODE = %DCCSI_DEV_MODE% +:: sets debugger, options: WING, PYCHARM +IF "%DCCSI_GDEBUGGER%"=="" (set DCCSI_GDEBUGGER=WING) +echo DCCSI_GDEBUGGER = %DCCSI_GDEBUGGER% +:: Default level logger will handle +:: CRITICAL:50 +:: ERROR:40 +:: WARNING:30 +:: INFO:20 +:: DEBUG:10 +:: NOTSET:0 +IF "%DCCSI_LOGLEVEL%"=="" (set DCCSI_LOGLEVEL=20) +echo DCCSI_LOGLEVEL = %DCCSI_LOGLEVEL% + +:: if the user has set up a custom env call it +IF EXIST "%~dp0..\Env_Dev.bat" CALL %~dp0..\Env_Dev.bat + +:: Initialize env +CALL %~dp0..\Env_Core.bat +CALL %~dp0..\Env_Python.bat +CALL %~dp0..\Env_PyCharm.bat +CALL %~dp0..\Env_Maya.bat + +set DCCSI_PY_DEFAULT=%DCCSI_PY_MAYA% + +:: add prefered python to the PATH +set PATH=%DCCSI_PY_DEFAULT%;%PATH% + +echo. +echo _____________________________________________________________________ +echo. +echo ~ Launching DCCsi Project in PyCharm %PYCHARM_VER_YEAR%.%PYCHARM_VER_MAJOR%.%PYCHARM_VER_MINOR% ... +echo ~ MayaPy.exe (default python interpreter) +echo _____________________________________________________________________ +echo. + +echo O3DE_DEV = %O3DE_DEV% + +:: ide and debugger plug +set DCCSI_PY_DEFAULT=%DCCSI_PY_MAYA% +echo DCCSI_PY_DEFAULT = %DCCSI_PY_DEFAULT% + +echo. + +:: Change to root dir +CD /D %PATH_O3DE_PROJECT% + +IF EXIST "%PYCHARM_HOME%\bin\pycharm64.exe" ( + start "" "%PYCHARM_HOME%\bin\pycharm64.exe" "%PYCHARM_PROJ%" +) ELSE ( + Where pycharm64.exe 2> NUL + IF ERRORLEVEL 1 ( + echo pycharm64.exe could not be found + pause + ) ELSE ( + start "" pycharm64.exe "%PYCHARM_PROJ%" + ) +) + +:: Return to starting directory +POPD + +:END_OF_FILE diff --git a/Gems/AtomLyIntegration/TechnicalArt/DccScriptingInterface/Tools/Dev/Windows/Launch_PyCharmPro.bat b/Gems/AtomLyIntegration/TechnicalArt/DccScriptingInterface/Tools/Dev/Windows/IDE/Launch_PyCharmPro.bat similarity index 83% rename from Gems/AtomLyIntegration/TechnicalArt/DccScriptingInterface/Tools/Dev/Windows/Launch_PyCharmPro.bat rename to Gems/AtomLyIntegration/TechnicalArt/DccScriptingInterface/Tools/Dev/Windows/IDE/Launch_PyCharmPro.bat index 4b9edb9e50..849cda7a19 100644 --- a/Gems/AtomLyIntegration/TechnicalArt/DccScriptingInterface/Tools/Dev/Windows/Launch_PyCharmPro.bat +++ b/Gems/AtomLyIntegration/TechnicalArt/DccScriptingInterface/Tools/Dev/Windows/IDE/Launch_PyCharmPro.bat @@ -19,13 +19,13 @@ PUSHD %~dp0 :: Constant Vars (Global) :: global debug (propogates) -IF "%DCCSI_GDEBUG%"=="" (set DCCSI_GDEBUG=True) +IF "%DCCSI_GDEBUG%"=="" (set DCCSI_GDEBUG=False) echo DCCSI_GDEBUG = %DCCSI_GDEBUG% :: initiates debugger connection -IF "%DCCSI_DEV_MODE%"=="" (set DCCSI_DEV_MODE=True) +IF "%DCCSI_DEV_MODE%"=="" (set DCCSI_DEV_MODE=False) echo DCCSI_DEV_MODE = %DCCSI_DEV_MODE% :: sets debugger, options: WING, PYCHARM -IF "%DCCSI_GDEBUGGER%"=="" (set DCCSI_GDEBUGGER=WING) +IF "%DCCSI_GDEBUGGER%"=="" (set DCCSI_GDEBUGGER=PYCHARM) echo DCCSI_GDEBUGGER = %DCCSI_GDEBUGGER% :: Default level logger will handle :: CRITICAL:50 @@ -34,14 +34,14 @@ echo DCCSI_GDEBUGGER = %DCCSI_GDEBUGGER% :: INFO:20 :: DEBUG:10 :: NOTSET:0 -IF "%DCCSI_LOGLEVEL%"=="" (set DCCSI_LOGLEVEL=10) +IF "%DCCSI_LOGLEVEL%"=="" (set DCCSI_LOGLEVEL=20) echo DCCSI_LOGLEVEL = %DCCSI_LOGLEVEL% -:: Initialize env -CALL %~dp0\Env_PyCharm.bat - :: if the user has set up a custom env call it -IF EXIST "%~dp0Env_Dev.bat" CALL %~dp0Env_Dev.bat +IF EXIST "%~dp0..\Env_Dev.bat" CALL %~dp0..\Env_Dev.bat + +:: Initialize env +CALL %~dp0\..\Env_PyCharm.bat echo. echo _____________________________________________________________________ diff --git a/Gems/AtomLyIntegration/TechnicalArt/DccScriptingInterface/Tools/Dev/Windows/Launch_VScode.bat b/Gems/AtomLyIntegration/TechnicalArt/DccScriptingInterface/Tools/Dev/Windows/IDE/Launch_VScode.bat similarity index 79% rename from Gems/AtomLyIntegration/TechnicalArt/DccScriptingInterface/Tools/Dev/Windows/Launch_VScode.bat rename to Gems/AtomLyIntegration/TechnicalArt/DccScriptingInterface/Tools/Dev/Windows/IDE/Launch_VScode.bat index 2dc5b06032..8f978e0830 100644 --- a/Gems/AtomLyIntegration/TechnicalArt/DccScriptingInterface/Tools/Dev/Windows/Launch_VScode.bat +++ b/Gems/AtomLyIntegration/TechnicalArt/DccScriptingInterface/Tools/Dev/Windows/IDE/Launch_VScode.bat @@ -29,10 +29,10 @@ PUSHD %~dp0 :: Constant Vars (Global) :: global debug (propogates) -IF "%DCCSI_GDEBUG%"=="" (set DCCSI_GDEBUG=True) +IF "%DCCSI_GDEBUG%"=="" (set DCCSI_GDEBUG=False) echo DCCSI_GDEBUG = %DCCSI_GDEBUG% :: initiates debugger connection -IF "%DCCSI_DEV_MODE%"=="" (set DCCSI_DEV_MODE=True) +IF "%DCCSI_DEV_MODE%"=="" (set DCCSI_DEV_MODE=False) echo DCCSI_DEV_MODE = %DCCSI_DEV_MODE% :: sets debugger, options: WING, PYCHARM IF "%DCCSI_GDEBUGGER%"=="" (set DCCSI_GDEBUGGER=WING) @@ -44,15 +44,19 @@ echo DCCSI_GDEBUGGER = %DCCSI_GDEBUGGER% :: INFO:20 :: DEBUG:10 :: NOTSET:0 -IF "%DCCSI_LOGLEVEL%"=="" (set DCCSI_LOGLEVEL=10) +IF "%DCCSI_LOGLEVEL%"=="" (set DCCSI_LOGLEVEL=20) echo DCCSI_LOGLEVEL = %DCCSI_LOGLEVEL% -:: Initialize envCALL %~dp0\Env_Core.bat -CALL %~dp0\Env_Python.bat -CALL %~dp0\Env_Qt.bat -CALL %~dp0\Env_Maya.bat -CALL %~dp0\Env_Substance.bat -CALL %~dp0\Env_VScode.bat +:: if the user has set up a custom env call it +IF EXIST "%~dp0..\Env_Dev.bat" CALL %~dp0..\Env_Dev.bat + +:: Initialize env +CALL %~dp0\..\Env_Core.bat +CALL %~dp0\..\Env_Python.bat +CALL %~dp0\..\Env_Qt.bat +CALL %~dp0\..\Env_Maya.bat +CALL %~dp0\..\Env_Substance.bat +CALL %~dp0\..\Env_VScode.bat echo. echo _____________________________________________________________________ @@ -64,11 +68,11 @@ echo. echo O3DE_DEV = %O3DE_DEV% :: shared location for default O3DE python location -set O3DE_PYTHON_INSTALL=%O3DE_DEV%\Python -echo O3DE_PYTHON_INSTALL = %O3DE_PYTHON_INSTALL% +set PATH_O3DE_PYTHON_INSTALL=%O3DE_DEV%\Python +echo PATH_O3DE_PYTHON_INSTALL = %PATH_O3DE_PYTHON_INSTALL% :: Wing and other IDEs probably prefer access directly to the python.exe -set DCCSI_PY_IDE = %O3DE_PYTHON_INSTALL%\runtime\python-3.7.10-rev2-windows\python +set DCCSI_PY_IDE = %PATH_O3DE_PYTHON_INSTALL%\runtime\python-3.7.10-rev2-windows\python echo DCCSI_PY_IDE = %DCCSI_PY_IDE% :: ide and debugger plug @@ -79,9 +83,6 @@ echo DCCSI_PY_BASE = %DCCSI_PY_BASE% set DCCSI_PY_DEFAULT=%DCCSI_PY_BASE% echo DCCSI_PY_DEFAULT = %DCCSI_PY_DEFAULT% -:: if the user has set up a custom env call it -IF EXIST "%~dp0Env_Dev.bat" CALL %~dp0Env_Dev.bat - echo. REM "C:\Program Files\Microsoft VS Code\Code.exe" diff --git a/Gems/AtomLyIntegration/TechnicalArt/DccScriptingInterface/Tools/Dev/Windows/Launch_WingIDE-7-1.bat b/Gems/AtomLyIntegration/TechnicalArt/DccScriptingInterface/Tools/Dev/Windows/IDE/Launch_WingIDE-7-1.bat similarity index 77% rename from Gems/AtomLyIntegration/TechnicalArt/DccScriptingInterface/Tools/Dev/Windows/Launch_WingIDE-7-1.bat rename to Gems/AtomLyIntegration/TechnicalArt/DccScriptingInterface/Tools/Dev/Windows/IDE/Launch_WingIDE-7-1.bat index 56e278da08..5330dcd941 100644 --- a/Gems/AtomLyIntegration/TechnicalArt/DccScriptingInterface/Tools/Dev/Windows/Launch_WingIDE-7-1.bat +++ b/Gems/AtomLyIntegration/TechnicalArt/DccScriptingInterface/Tools/Dev/Windows/IDE/Launch_WingIDE-7-1.bat @@ -21,14 +21,14 @@ cd %~dp0 PUSHD %~dp0 :: if the user has set up a custom env call it -IF EXIST "%~dp0Env_Dev.bat" CALL %~dp0Env_Dev.bat +IF EXIST "%~dp0..\Env_Dev.bat" CALL %~dp0..\Env_Dev.bat :: Constant Vars (Global) :: global debug (propogates) -IF "%DCCSI_GDEBUG%"=="" (set DCCSI_GDEBUG=True) +IF "%DCCSI_GDEBUG%"=="" (set DCCSI_GDEBUG=False) echo DCCSI_GDEBUG = %DCCSI_GDEBUG% :: initiates debugger connection -IF "%DCCSI_DEV_MODE%"=="" (set DCCSI_DEV_MODE=True) +IF "%DCCSI_DEV_MODE%"=="" (set DCCSI_DEV_MODE=False) echo DCCSI_DEV_MODE = %DCCSI_DEV_MODE% :: sets debugger, options: WING, PYCHARM IF "%DCCSI_GDEBUGGER%"=="" (set DCCSI_GDEBUGGER=WING) @@ -40,16 +40,16 @@ echo DCCSI_GDEBUGGER = %DCCSI_GDEBUGGER% :: INFO:20 :: DEBUG:10 :: NOTSET:0 -IF "%DCCSI_LOGLEVEL%"=="" (set DCCSI_LOGLEVEL=10) +IF "%DCCSI_LOGLEVEL%"=="" (set DCCSI_LOGLEVEL=20) echo DCCSI_LOGLEVEL = %DCCSI_LOGLEVEL% :: Initialize env -CALL %~dp0\Env_Core.bat -CALL %~dp0\Env_Python.bat -CALL %~dp0\Env_Qt.bat -CALL %~dp0\Env_Maya.bat -CALL %~dp0\Env_Substance.bat -CALL %~dp0\Env_WingIDE.bat +CALL %~dp0\..\Env_Core.bat +CALL %~dp0\..\Env_Python.bat +CALL %~dp0\..\Env_Qt.bat +CALL %~dp0\..\Env_Maya.bat +CALL %~dp0\..\Env_Substance.bat +CALL %~dp0\..\Env_WingIDE.bat echo. echo _____________________________________________________________________ echo. @@ -61,13 +61,13 @@ echo. echo O3DE_DEV = %O3DE_DEV% :: shared location for default O3DE python location -set O3DE_PYTHON_INSTALL=%O3DE_DEV%\Python -echo O3DE_PYTHON_INSTALL = %O3DE_PYTHON_INSTALL% +set PATH_O3DE_PYTHON_INSTALL=%O3DE_DEV%\Python +echo PATH_O3DE_PYTHON_INSTALL = %PATH_O3DE_PYTHON_INSTALL% echo. :: Change to root dir -CD /D %O3DE_PROJECT_PATH% +CD /D %PATH_O3DE_PROJECT% IF EXIST "%WINGHOME%\bin\wing.exe" ( start "" "%WINGHOME%\bin\wing.exe" "%WING_PROJ%" diff --git a/Gems/AtomLyIntegration/TechnicalArt/DccScriptingInterface/Tools/Dev/Windows/IDE/Launch_mayapy_WingIDE-7-1.bat b/Gems/AtomLyIntegration/TechnicalArt/DccScriptingInterface/Tools/Dev/Windows/IDE/Launch_mayapy_WingIDE-7-1.bat new file mode 100644 index 0000000000..92201ef048 --- /dev/null +++ b/Gems/AtomLyIntegration/TechnicalArt/DccScriptingInterface/Tools/Dev/Windows/IDE/Launch_mayapy_WingIDE-7-1.bat @@ -0,0 +1,87 @@ +@echo off + +REM +REM Copyright (c) Contributors to the Open 3D Engine Project. +REM For complete copyright and license terms please see the LICENSE at the root of this distribution. +REM +REM SPDX-License-Identifier: Apache-2.0 OR MIT +REM +REM + +:: Launches Wing IDE and the DccScriptingInterface Project Files + +:: Set up window +TITLE O3DE DCCsi Launch WingIDE 7x +:: Use obvious color to prevent confusion (Grey with Yellow Text) +COLOR 8E + +:: Store current dir +%~d0 +cd %~dp0 +PUSHD %~dp0 + +:: Constant Vars (Global) +:: global debug (propogates) +IF "%DCCSI_GDEBUG%"=="" (set DCCSI_GDEBUG=False) +echo DCCSI_GDEBUG = %DCCSI_GDEBUG% +:: initiates debugger connection +IF "%DCCSI_DEV_MODE%"=="" (set DCCSI_DEV_MODE=False) +echo DCCSI_DEV_MODE = %DCCSI_DEV_MODE% +:: sets debugger, options: WING, PYCHARM +IF "%DCCSI_GDEBUGGER%"=="" (set DCCSI_GDEBUGGER=WING) +echo DCCSI_GDEBUGGER = %DCCSI_GDEBUGGER% +:: Default level logger will handle +:: CRITICAL:50 +:: ERROR:40 +:: WARNING:30 +:: INFO:20 +:: DEBUG:10 +:: NOTSET:0 +IF "%DCCSI_LOGLEVEL%"=="" (set DCCSI_LOGLEVEL=20) +echo DCCSI_LOGLEVEL = %DCCSI_LOGLEVEL% + +:: if the user has set up a custom env call it +IF EXIST "%~dp0..\Env_Dev.bat" CALL %~dp0..\Env_Dev.bat + +:: Initialize env +CALL %~dp0\..\Env_Core.bat +CALL %~dp0\..\Env_Python.bat +CALL %~dp0\..\Env_WingIDE.bat +CALL %~dp0\..\Env_Maya.bat + +echo. +echo _____________________________________________________________________ +echo. +echo ~ WingIDE Version %DCCSI_WING_VERSION_MAJOR%.%DCCSI_WING_VERSION_MINOR% +echo ~ Launching O3DE %O3DE_PROJECT% project in WingIDE %DCCSI_WING_VERSION_MAJOR%.%DCCSI_WING_VERSION_MINOR% ... +echo ~ MayaPy.exe (default python interpreter) +echo _____________________________________________________________________ +echo. + +echo O3DE_DEV = %O3DE_DEV% + +:: ide and debugger plug +set DCCSI_PY_DEFAULT=%DCCSI_PY_MAYA% +echo DCCSI_PY_DEFAULT = %DCCSI_PY_DEFAULT% + +echo. + +:: Change to root dir +CD /D %PATH_O3DE_PROJECT% + +IF EXIST "%WINGHOME%\bin\wing.exe" ( + start "" "%WINGHOME%\bin\wing.exe" "%WING_PROJ%" +) ELSE ( + Where wing.exe 2> NUL + IF ERRORLEVEL 1 ( + echo wing.exe could not be found + pause + ) ELSE ( + start "" wing.exe "%WING_PROJ%" + ) +) + +:: Return to starting directory +POPD + +:END_OF_FILE diff --git a/Gems/AtomLyIntegration/TechnicalArt/DccScriptingInterface/Tools/Dev/Windows/Launch_Env_Cmd.bat b/Gems/AtomLyIntegration/TechnicalArt/DccScriptingInterface/Tools/Dev/Windows/Launch_Env_Cmd.bat index 5b76de1401..3387633838 100644 --- a/Gems/AtomLyIntegration/TechnicalArt/DccScriptingInterface/Tools/Dev/Windows/Launch_Env_Cmd.bat +++ b/Gems/AtomLyIntegration/TechnicalArt/DccScriptingInterface/Tools/Dev/Windows/Launch_Env_Cmd.bat @@ -29,6 +29,9 @@ PUSHD %~dp0 SETLOCAL ENABLEDELAYEDEXPANSION +:: if the user has set up a custom env call it +IF EXIST "%~dp0Env_Dev.bat" CALL %~dp0Env_Dev.bat + CALL %~dp0\Env_Core.bat CALL %~dp0\Env_Python.bat CALL %~dp0\Env_Qt.bat @@ -36,11 +39,8 @@ CALL %~dp0\Env_Maya.bat CALL %~dp0\Env_Substance.bat CALL %~dp0\Env_WingIDE.bat -:: if the user has set up a custom env call it -IF EXIST "%~dp0Env_Dev.bat" CALL %~dp0Env_Dev.bat - :: Change to root dir -CD /D %O3DE_PROJECT_PATH% +CD /D %PATH_O3DE_PROJECT% :: Create command prompt with environment CALL %windir%\system32\cmd.exe diff --git a/Gems/AtomLyIntegration/TechnicalArt/DccScriptingInterface/Tools/Dev/Windows/Launch_MayaPy_PyCharmPro.bat b/Gems/AtomLyIntegration/TechnicalArt/DccScriptingInterface/Tools/Dev/Windows/Launch_MayaPy_PyCharmPro.bat deleted file mode 100644 index e451050ab8..0000000000 --- a/Gems/AtomLyIntegration/TechnicalArt/DccScriptingInterface/Tools/Dev/Windows/Launch_MayaPy_PyCharmPro.bat +++ /dev/null @@ -1,100 +0,0 @@ -@echo off -REM -REM Copyright (c) Contributors to the Open 3D Engine Project. -REM For complete copyright and license terms please see the LICENSE at the root of this distribution. -REM -REM SPDX-License-Identifier: Apache-2.0 OR MIT -REM -REM - -:: Set up window -TITLE O3DE DCCsi GEM PyCharm -:: Use obvious color to prevent confusion (Grey with Yellow Text) -COLOR 8E - -:: Store current dir -%~d0 -cd %~dp0 -PUSHD %~dp0 - -:: Constant Vars (Global) -:: global debug (propogates) -IF "%DCCSI_GDEBUG%"=="" (set DCCSI_GDEBUG=True) -echo DCCSI_GDEBUG = %DCCSI_GDEBUG% -:: initiates debugger connection -IF "%DCCSI_DEV_MODE%"=="" (set DCCSI_DEV_MODE=True) -echo DCCSI_DEV_MODE = %DCCSI_DEV_MODE% -:: sets debugger, options: WING, PYCHARM -IF "%DCCSI_GDEBUGGER%"=="" (set DCCSI_GDEBUGGER=WING) -echo DCCSI_GDEBUGGER = %DCCSI_GDEBUGGER% -:: Default level logger will handle -:: CRITICAL:50 -:: ERROR:40 -:: WARNING:30 -:: INFO:20 -:: DEBUG:10 -:: NOTSET:0 -IF "%DCCSI_LOGLEVEL%"=="" (set DCCSI_LOGLEVEL=10) -echo DCCSI_LOGLEVEL = %DCCSI_LOGLEVEL% - -:: Initialize env -CALL %~dp0\Env_Core.bat -CALL %~dp0\Env_Python.bat -CALL %~dp0\Env_PyCharm.bat -CALL %~dp0\Env_Maya.bat - -set DCCSI_PY_DEFAULT=%DCCSI_PY_MAYA% - -:: add prefered python to the PATH -set PATH=%DCCSI_PY_DEFAULT%;%PATH% - -echo. -echo _____________________________________________________________________ -echo. -echo ~ Launching DCCsi Project in PyCharm %PYCHARM_VER_YEAR%.%PYCHARM_VER_MAJOR%.%PYCHARM_VER_MINOR% ... -echo ~ MayaPy.exe (default python interpreter) -echo _____________________________________________________________________ -echo. - -echo O3DE_DEV = %O3DE_DEV% - -:: shared location for default O3DE python location -set O3DE_PYTHON_INSTALL=%O3DE_DEV%\Python -echo O3DE_PYTHON_INSTALL = %O3DE_PYTHON_INSTALL% - -:: Wing and other IDEs probably prefer access directly to the python.exe -set DCCSI_PY_IDE = %O3DE_PYTHON_INSTALL%\runtime\python-3.7.10-rev2-windows\python -echo DCCSI_PY_IDE = %DCCSI_PY_IDE% - -:: ide and debugger plug -set DCCSI_PY_BASE=%DCCSI_PY_IDE%\python.exe -echo DCCSI_PY_BASE = %DCCSI_PY_BASE% - -:: ide and debugger plug -set DCCSI_PY_DEFAULT=%DCCSI_PY_MAYA% -echo DCCSI_PY_DEFAULT = %DCCSI_PY_DEFAULT% - -:: if the user has set up a custom env call it -IF EXIST "%~dp0Env_Dev.bat" CALL %~dp0Env_Dev.bat - -echo. - -:: Change to root dir -CD /D %O3DE_PROJECT_PATH% - -IF EXIST "%PYCHARM_HOME%\bin\pycharm64.exe" ( - start "" "%PYCHARM_HOME%\bin\pycharm64.exe" "%PYCHARM_PROJ%" -) ELSE ( - Where pycharm64.exe 2> NUL - IF ERRORLEVEL 1 ( - echo pycharm64.exe could not be found - pause - ) ELSE ( - start "" pycharm64.exe "%PYCHARM_PROJ%" - ) -) - -:: Return to starting directory -POPD - -:END_OF_FILE diff --git a/Gems/AtomLyIntegration/TechnicalArt/DccScriptingInterface/Tools/Dev/Windows/Launch_PyMin_Cmd.bat b/Gems/AtomLyIntegration/TechnicalArt/DccScriptingInterface/Tools/Dev/Windows/Launch_PyMin_Cmd.bat index 193cb40de8..d4d5d08c19 100644 --- a/Gems/AtomLyIntegration/TechnicalArt/DccScriptingInterface/Tools/Dev/Windows/Launch_PyMin_Cmd.bat +++ b/Gems/AtomLyIntegration/TechnicalArt/DccScriptingInterface/Tools/Dev/Windows/Launch_PyMin_Cmd.bat @@ -38,7 +38,7 @@ echo _____________________________________________________________________ echo. :: Change to root dir -CD /D %O3DE_PROJECT_PATH% +CD /D %PATH_O3DE_PROJECT% :: Create command prompt with environment CALL %windir%\system32\cmd.exe diff --git a/Gems/AtomLyIntegration/TechnicalArt/DccScriptingInterface/Tools/Dev/Windows/Launch_Qt_PyMin_Cmd.bat b/Gems/AtomLyIntegration/TechnicalArt/DccScriptingInterface/Tools/Dev/Windows/Launch_Qt_PyMin_Cmd.bat index 75d1ff8cc4..f3e815ed8c 100644 --- a/Gems/AtomLyIntegration/TechnicalArt/DccScriptingInterface/Tools/Dev/Windows/Launch_Qt_PyMin_Cmd.bat +++ b/Gems/AtomLyIntegration/TechnicalArt/DccScriptingInterface/Tools/Dev/Windows/Launch_Qt_PyMin_Cmd.bat @@ -39,7 +39,7 @@ echo _____________________________________________________________________ echo. :: Change to root dir -CD /D %O3DE_PROJECT_PATH% +CD /D %PATH_O3DE_PROJECT% :: Create command prompt with environment CALL %windir%\system32\cmd.exe diff --git a/Gems/AtomLyIntegration/TechnicalArt/DccScriptingInterface/Tools/Dev/Windows/Launch_mayapy_WingIDE-7-1.bat b/Gems/AtomLyIntegration/TechnicalArt/DccScriptingInterface/Tools/Dev/Windows/Launch_mayapy_WingIDE-7-1.bat deleted file mode 100644 index ca5b175c39..0000000000 --- a/Gems/AtomLyIntegration/TechnicalArt/DccScriptingInterface/Tools/Dev/Windows/Launch_mayapy_WingIDE-7-1.bat +++ /dev/null @@ -1,99 +0,0 @@ -@echo off - -REM -REM Copyright (c) Contributors to the Open 3D Engine Project. -REM For complete copyright and license terms please see the LICENSE at the root of this distribution. -REM -REM SPDX-License-Identifier: Apache-2.0 OR MIT -REM -REM - -:: Launches Wing IDE and the DccScriptingInterface Project Files - -:: Set up window -TITLE O3DE DCCsi Launch WingIDE 7x -:: Use obvious color to prevent confusion (Grey with Yellow Text) -COLOR 8E - -:: Store current dir -%~d0 -cd %~dp0 -PUSHD %~dp0 - -:: Constant Vars (Global) -:: global debug (propogates) -IF "%DCCSI_GDEBUG%"=="" (set DCCSI_GDEBUG=True) -echo DCCSI_GDEBUG = %DCCSI_GDEBUG% -:: initiates debugger connection -IF "%DCCSI_DEV_MODE%"=="" (set DCCSI_DEV_MODE=True) -echo DCCSI_DEV_MODE = %DCCSI_DEV_MODE% -:: sets debugger, options: WING, PYCHARM -IF "%DCCSI_GDEBUGGER%"=="" (set DCCSI_GDEBUGGER=WING) -echo DCCSI_GDEBUGGER = %DCCSI_GDEBUGGER% -:: Default level logger will handle -:: CRITICAL:50 -:: ERROR:40 -:: WARNING:30 -:: INFO:20 -:: DEBUG:10 -:: NOTSET:0 -IF "%DCCSI_LOGLEVEL%"=="" (set DCCSI_LOGLEVEL=10) -echo DCCSI_LOGLEVEL = %DCCSI_LOGLEVEL% - -:: Initialize env -CALL %~dp0\Env_Core.bat -CALL %~dp0\Env_Python.bat -CALL %~dp0\Env_WingIDE.bat -CALL %~dp0\Env_Maya.bat - -echo. -echo _____________________________________________________________________ -echo. -echo ~ WingIDE Version %DCCSI_WING_VERSION_MAJOR%.%DCCSI_WING_VERSION_MINOR% -echo ~ Launching O3DE %O3DE_PROJECT% project in WingIDE %DCCSI_WING_VERSION_MAJOR%.%DCCSI_WING_VERSION_MINOR% ... -echo ~ MayaPy.exe (default python interpreter) -echo _____________________________________________________________________ -echo. - -echo O3DE_DEV = %O3DE_DEV% - -:: shared location for default O3DE python location -set O3DE_PYTHON_INSTALL=%O3DE_DEV%\Python -echo O3DE_PYTHON_INSTALL = %O3DE_PYTHON_INSTALL% - -:: Wing and other IDEs probably prefer access directly to the python.exe -set DCCSI_PY_IDE = %O3DE_PYTHON_INSTALL%\runtime\python-3.7.10-rev2-windows\python -echo DCCSI_PY_IDE = %DCCSI_PY_IDE% - -:: ide and debugger plug -set DCCSI_PY_BASE=%DCCSI_PY_IDE%\python.exe -echo DCCSI_PY_BASE = %DCCSI_PY_BASE% - -:: ide and debugger plug -set DCCSI_PY_DEFAULT=%DCCSI_PY_MAYA% -echo DCCSI_PY_DEFAULT = %DCCSI_PY_DEFAULT% - -:: if the user has set up a custom env call it -IF EXIST "%~dp0Env_Dev.bat" CALL %~dp0Env_Dev.bat - -echo. - -:: Change to root dir -CD /D %O3DE_PROJECT_PATH% - -IF EXIST "%WINGHOME%\bin\wing.exe" ( - start "" "%WINGHOME%\bin\wing.exe" "%WING_PROJ%" -) ELSE ( - Where wing.exe 2> NUL - IF ERRORLEVEL 1 ( - echo wing.exe could not be found - pause - ) ELSE ( - start "" wing.exe "%WING_PROJ%" - ) -) - -:: Return to starting directory -POPD - -:END_OF_FILE diff --git a/Gems/AtomLyIntegration/TechnicalArt/DccScriptingInterface/Tools/Dev/Windows/Launch_pyBASE_Cmd.bat b/Gems/AtomLyIntegration/TechnicalArt/DccScriptingInterface/Tools/Dev/Windows/Launch_pyBASE_Cmd.bat index e1b075e065..133fa3906d 100644 --- a/Gems/AtomLyIntegration/TechnicalArt/DccScriptingInterface/Tools/Dev/Windows/Launch_pyBASE_Cmd.bat +++ b/Gems/AtomLyIntegration/TechnicalArt/DccScriptingInterface/Tools/Dev/Windows/Launch_pyBASE_Cmd.bat @@ -33,7 +33,7 @@ CALL %~dp0\Env_Maya.bat IF EXIST "%~dp0Env_Dev.bat" CALL %~dp0Env_Dev.bat :: Change to root dir -CD /D %O3DE_PROJECT_PATH% +CD /D %PATH_O3DE_PROJECT% :: Create command prompt with environment CALL %windir%\system32\cmd.exe diff --git a/Gems/AtomLyIntegration/TechnicalArt/DccScriptingInterface/Tools/Dev/Windows/Setuo_copy_oiio.bat b/Gems/AtomLyIntegration/TechnicalArt/DccScriptingInterface/Tools/Dev/Windows/Setuo_copy_oiio.bat index 18a58e1371..51233b256d 100644 --- a/Gems/AtomLyIntegration/TechnicalArt/DccScriptingInterface/Tools/Dev/Windows/Setuo_copy_oiio.bat +++ b/Gems/AtomLyIntegration/TechnicalArt/DccScriptingInterface/Tools/Dev/Windows/Setuo_copy_oiio.bat @@ -16,9 +16,9 @@ PUSHD %~dp0 set O3DE_DEV=..\..\..\..\..\.. :: shared location for default O3DE python location -set O3DE_PYTHON_INSTALL=%O3DE_DEV%\Python +set PATH_O3DE_PYTHON_INSTALL=%O3DE_DEV%\Python -set PY_SITE=%O3DE_PYTHON_INSTALL%\runtime\python-3.7.10-rev2-windows\python\Lib\site-packages +set PY_SITE=%PATH_O3DE_PYTHON_INSTALL%\runtime\python-3.7.10-rev2-windows\python\Lib\site-packages set PACKAGE_LOC=C:\Depot\3rdParty\packages\openimageio-2.1.16.0-rev1-windows\OpenImageIO\2.1.16.0\win_x64\bin diff --git a/Gems/AtomLyIntegration/TechnicalArt/DccScriptingInterface/Tools/Dev/Windows/Solutions/.idea/.gitignore b/Gems/AtomLyIntegration/TechnicalArt/DccScriptingInterface/Tools/Dev/Windows/Solutions/.idea/.gitignore index 265145e9c1..cc9ae87641 100644 --- a/Gems/AtomLyIntegration/TechnicalArt/DccScriptingInterface/Tools/Dev/Windows/Solutions/.idea/.gitignore +++ b/Gems/AtomLyIntegration/TechnicalArt/DccScriptingInterface/Tools/Dev/Windows/Solutions/.idea/.gitignore @@ -1,2 +1,3 @@ # Default ignored files -./workspace.xml \ No newline at end of file +./workspace.xml +venv \ No newline at end of file diff --git a/Gems/AtomLyIntegration/TechnicalArt/DccScriptingInterface/Tools/Dev/Windows/Solutions/.idea/DccScriptingInterface.iml b/Gems/AtomLyIntegration/TechnicalArt/DccScriptingInterface/Tools/Dev/Windows/Solutions/.idea/DccScriptingInterface.iml index 764d6090c1..1d9156afc8 100644 --- a/Gems/AtomLyIntegration/TechnicalArt/DccScriptingInterface/Tools/Dev/Windows/Solutions/.idea/DccScriptingInterface.iml +++ b/Gems/AtomLyIntegration/TechnicalArt/DccScriptingInterface/Tools/Dev/Windows/Solutions/.idea/DccScriptingInterface.iml @@ -12,15 +12,9 @@ + - + - - - - + \ No newline at end of file diff --git a/Gems/AtomLyIntegration/TechnicalArt/DccScriptingInterface/Tools/Dev/Windows/Solutions/.idea/misc.xml b/Gems/AtomLyIntegration/TechnicalArt/DccScriptingInterface/Tools/Dev/Windows/Solutions/.idea/misc.xml index 1069eb4889..49bab22105 100644 --- a/Gems/AtomLyIntegration/TechnicalArt/DccScriptingInterface/Tools/Dev/Windows/Solutions/.idea/misc.xml +++ b/Gems/AtomLyIntegration/TechnicalArt/DccScriptingInterface/Tools/Dev/Windows/Solutions/.idea/misc.xml @@ -3,8 +3,8 @@ - + - + \ No newline at end of file diff --git a/Gems/AtomLyIntegration/TechnicalArt/DccScriptingInterface/Tools/Dev/Windows/Solutions/.idea/vcs.xml b/Gems/AtomLyIntegration/TechnicalArt/DccScriptingInterface/Tools/Dev/Windows/Solutions/.idea/vcs.xml index ed52866afa..07117e447d 100644 --- a/Gems/AtomLyIntegration/TechnicalArt/DccScriptingInterface/Tools/Dev/Windows/Solutions/.idea/vcs.xml +++ b/Gems/AtomLyIntegration/TechnicalArt/DccScriptingInterface/Tools/Dev/Windows/Solutions/.idea/vcs.xml @@ -1,6 +1,6 @@ - + - + \ No newline at end of file diff --git a/Gems/AtomLyIntegration/TechnicalArt/DccScriptingInterface/azpy/__init__.py b/Gems/AtomLyIntegration/TechnicalArt/DccScriptingInterface/azpy/__init__.py index 958508c227..f23fa1e9a5 100755 --- a/Gems/AtomLyIntegration/TechnicalArt/DccScriptingInterface/azpy/__init__.py +++ b/Gems/AtomLyIntegration/TechnicalArt/DccScriptingInterface/azpy/__init__.py @@ -40,9 +40,9 @@ __all__ = ['config_utils', # we need to set up basic access to the DCCsi _MODULE_PATH = os.path.realpath(__file__) # To Do: what if frozen? -_DCCSIG_PATH = os.path.normpath(os.path.join(_MODULE_PATH, '../..')) -_DCCSIG_PATH = os.getenv('DCCSIG_PATH', _DCCSIG_PATH) -site.addsitedir(_DCCSIG_PATH) +_PATH_DCCSIG = os.path.normpath(os.path.join(_MODULE_PATH, '../..')) +_PATH_DCCSIG = os.getenv('PATH_DCCSIG', _PATH_DCCSIG) +site.addsitedir(_PATH_DCCSIG) # azpy import azpy.return_stub as return_stub @@ -52,12 +52,31 @@ import azpy.config_utils as config_utils _DCCSI_GDEBUG = env_bool.env_bool(constants.ENVAR_DCCSI_GDEBUG, False) _DCCSI_DEV_MODE = env_bool.env_bool(constants.ENVAR_DCCSI_DEV_MODE, False) -_DCCSI_LOGLEVEL = int(env_bool.env_bool(constants.ENVAR_DCCSI_LOGLEVEL, int(20))) -if _DCCSI_GDEBUG: - _DCCSI_LOGLEVEL = int(10) +_DCCSI_GDEBUGGER = env_bool.env_bool(constants.ENVAR_DCCSI_GDEBUGGER, 'WING') +# default loglevel to info unless set +_DCCSI_LOGLEVEL = int(env_bool.env_bool(constants.ENVAR_DCCSI_LOGLEVEL, + _logging.INFO)) +if _DCCSI_GDEBUG: + # override loglevel if runnign debug + _DCCSI_LOGLEVEL = _logging.DEBUG + +# set up module logging +for handler in _logging.root.handlers[:]: + _logging.root.removeHandler(handler) + +_logging.basicConfig(level=_DCCSI_LOGLEVEL, + format=constants.FRMT_LOG_LONG, + datefmt='%m-%d %H:%M') + +_LOGGER = _logging.getLogger(_PACKAGENAME) +_LOGGER.debug('Initializing: {0}.'.format({_PACKAGENAME})) +# ------------------------------------------------------------------------- + + +# ------------------------------------------------------------------------- # for py2.7 (Maya) we provide this, so we must assume some bootstrapping -# has occured, see DccScriptingInterface\\config.py (_DCCSI_PYTHON_LIB_PATH) +# has occured, see DccScriptingInterface\\config.py (_PATH_DCCSI_PYTHON_LIB) try: import pathlib @@ -69,16 +88,6 @@ if _DCCSI_GDEBUG: # ------------------------------------------------------------------------- -# ------------------------------------------------------------------------- -# set up module logging -#for handler in _logging.root.handlers[:]: - #_logging.root.removeHandler(handler) -_logging.basicConfig(format=constants.FRMT_LOG_LONG, level=_DCCSI_LOGLEVEL) -_LOGGER = _logging.getLogger(_PACKAGENAME) -_LOGGER.debug('Initializing: {0}.'.format({_PACKAGENAME})) -# ------------------------------------------------------------------------- - - # ------------------------------------------------------------------------- # get/set the project name _O3DE_DEV = Path(os.getenv(constants.ENVAR_O3DE_DEV, @@ -86,21 +95,21 @@ _O3DE_DEV = Path(os.getenv(constants.ENVAR_O3DE_DEV, check_stub='engine.json'))) _LOGGER.debug('_O3DE_DEV" {}'.format(_O3DE_DEV.resolve())) -_O3DE_PROJECT_PATH = Path(os.getenv(constants.ENVAR_O3DE_PROJECT_PATH, +_PATH_O3DE_PROJECT = Path(os.getenv(constants.ENVAR_PATH_O3DE_PROJECT, config_utils.get_o3de_project_path())) -_LOGGER.debug('_O3DE_PROJECT_PATH" {}'.format(_O3DE_PROJECT_PATH.resolve())) +_LOGGER.debug('_PATH_O3DE_PROJECT" {}'.format(_PATH_O3DE_PROJECT.resolve())) # get/set the project name -if _O3DE_PROJECT_PATH: +if _PATH_O3DE_PROJECT: _O3DE_PROJECT = str(os.getenv(constants.ENVAR_O3DE_PROJECT, - _O3DE_PROJECT_PATH.name)) + _PATH_O3DE_PROJECT.name)) else: _O3DE_PROJECT='o3de' # project cache log dir path from azpy.constants import TAG_DCCSI_NICKNAME from azpy.constants import PATH_DCCSI_LOG_PATH -_DCCSI_LOG_PATH = Path(PATH_DCCSI_LOG_PATH.format(O3DE_PROJECT_PATH=_O3DE_PROJECT_PATH.resolve(), +_DCCSI_LOG_PATH = Path(PATH_DCCSI_LOG_PATH.format(PATH_O3DE_PROJECT=_PATH_O3DE_PROJECT.resolve(), TAG_DCCSI_NICKNAME=TAG_DCCSI_NICKNAME)) # ------------------------------------------------------------------------- @@ -214,7 +223,7 @@ if _DCCSI_GDEBUG: # debug breadcrumbs to check this module and used paths _LOGGER.debug('MODULE_PATH: {}'.format(_MODULE_PATH)) _LOGGER.debug('O3DE_DEV_PATH: {}'.format(_O3DE_DEV)) -_LOGGER.debug('DCCSI_PATH: {}'.format(_DCCSIG_PATH)) +_LOGGER.debug('PATH_DCCSIG: {}'.format(_PATH_DCCSIG)) _LOGGER.debug('O3DE_PROJECT_TAG: {}'.format(_O3DE_PROJECT)) _LOGGER.debug('DCCSI_LOG_PATH: {}'.format(_DCCSI_LOG_PATH)) # ------------------------------------------------------------------------- @@ -258,5 +267,5 @@ if __name__ == '__main__': _DCCSI_DEV_MODE = True if _DCCSI_GDEBUG: - print(_DCCSIG_PATH) + print(_PATH_DCCSIG) test_imports() diff --git a/Gems/AtomLyIntegration/TechnicalArt/DccScriptingInterface/azpy/config_utils.py b/Gems/AtomLyIntegration/TechnicalArt/DccScriptingInterface/azpy/config_utils.py index f6b71a7d97..a1baabcfb0 100755 --- a/Gems/AtomLyIntegration/TechnicalArt/DccScriptingInterface/azpy/config_utils.py +++ b/Gems/AtomLyIntegration/TechnicalArt/DccScriptingInterface/azpy/config_utils.py @@ -8,7 +8,29 @@ # # # note: this module should reamin py2.7 compatible (Maya) so no f'strings -# -------------------------------------------------------------------------- +# ------------------------------------------------------------------------- +"""@module docstring +This module is part of the O3DE DccScriptingInterface Gem +This module is a set of utils related to config.py, it hase several methods +that can fullfil discovery of paths for use in standing up a synthetic env. +This is particularly useful when the config is used outside of O3DE, +in an external standalone tool with PySide2(Qt). Foe example, these paths +are discoverable so that we can synthetically derive code access to various +aspects of O3DE outside of the executables. + +return_stub_dir() :discover path by walking from module to file stub +get_stub_check_path() :discover by walking from known path to file stub +get_o3de_engine_root() :combines multiple methods to discover engine root +get_o3de_build_path() :searches for the build path using file stub +get_dccsi_config() :convenience method to get the dccsi config +get_current_project_cfg() :will be depricated (don't use) +get_check_global_project() :get global project path from user .o3de data +get_o3de_project_path() :get the project path while within editor +bootstrap_dccsi_py_libs() :extends code access (mainly used in Maya py27) +""" +import time +start = time.process_time() # start tracking + import sys import os import re @@ -18,34 +40,60 @@ import logging as _logging # -------------------------------------------------------------------------- -# note: this module is called in other root modules -# must avoid cyclical imports - # global scope -# normally would pull the constant envar string -# but avoiding cyclical imports here -FRMT_LOG_LONG = "[%(name)s][%(levelname)s] >> %(message)s (%(asctime)s; %(filename)s:%(lineno)d)" -from azpy.env_bool import env_bool -_DCCSI_GDEBUG = env_bool('DCCSI_GDEBUG', False) -_DCCSI_LOGLEVEL = env_bool('DCCSI_LOGLEVEL', False) -_DCCSI_LOGLEVEL = int(env_bool('DCCSI_LOGLEVEL', int(20))) -if _DCCSI_GDEBUG: - _DCCSI_LOGLEVEL = int(10) +_MODULENAME = 'azpy.config_utils' + +__all__ = ['get_os', + 'return_stub', + 'get_stub_check_path', + 'get_dccsi_config', + 'get_current_project'] -_MODULENAME = __name__ -if _MODULENAME is '__main__': - _MODULENAME = 'azpy.config_utils' +# dccsi site/code access +#os.environ['PYTHONINSPECT'] = 'True' +_MODULE_PATH = os.path.abspath(__file__) + +# we don't have access yet to the DCCsi Lib\site-packages +# (1) this will give us import access to azpy (always?) +# we know where the dccsi root should be from here +_PATH_DCCSIG = os.path.abspath(os.path.dirname(os.path.dirname(_MODULE_PATH))) +# it can be set or overrriden by dev with envar +_PATH_DCCSIG = os.getenv('PATH_DCCSIG', _PATH_DCCSIG) +# ^ we assume this config is in the root of the DCCsi +# if it's not, be sure to set envar 'PATH_DCCSIG' to ensure it +site.addsitedir(_PATH_DCCSIG) # must be done for azpy + +# note: this module is called in other root modules +# must avoid cyclical imports, no imports from azpy.constants +ENVAR_DCCSI_GDEBUG = 'DCCSI_GDEBUG' +ENVAR_DCCSI_DEV_MODE = 'DCCSI_DEV_MODE' +ENVAR_DCCSI_GDEBUGGER = 'DCCSI_GDEBUGGER' +ENVAR_DCCSI_LOGLEVEL = 'DCCSI_LOGLEVEL' +FRMT_LOG_LONG = "[%(name)s][%(levelname)s] >> %(message)s (%(asctime)s; %(filename)s:%(lineno)d)" + +from azpy.env_bool import env_bool +_DCCSI_GDEBUG = env_bool(ENVAR_DCCSI_GDEBUG, False) +_DCCSI_DEV_MODE = env_bool(ENVAR_DCCSI_DEV_MODE, False) +_DCCSI_GDEBUGGER = env_bool(ENVAR_DCCSI_GDEBUGGER, 'WING') + +# default loglevel to info unless set +_DCCSI_LOGLEVEL = int(env_bool(ENVAR_DCCSI_LOGLEVEL, _logging.INFO)) +if _DCCSI_GDEBUG: + # override loglevel if runnign debug + _DCCSI_LOGLEVEL = _logging.DEBUG # set up module logging #for handler in _logging.root.handlers[:]: #_logging.root.removeHandler(handler) -_LOGGER = _logging.getLogger(_MODULENAME) -#_logging.basicConfig(format=FRMT_LOG_LONG, level=_DCCSI_LOGLEVEL) -_LOGGER.propagate = False -_LOGGER.debug('Initializing: {0}.'.format({_MODULENAME})) + +# configure basic logger +# note: not using a common logger to reduce cyclical imports +_logging.basicConfig(level=_DCCSI_LOGLEVEL, + format=FRMT_LOG_LONG, + datefmt='%m-%d %H:%M') -__all__ = ['get_os', 'return_stub', 'get_stub_check_path', - 'get_dccsi_config', 'get_current_project'] +_LOGGER = _logging.getLogger(_MODULENAME) +_LOGGER.debug('Initializing: {0}.'.format({_MODULENAME})) # ------------------------------------------------------------------------- @@ -77,6 +125,56 @@ except Exception as e: # ------------------------------------------------------------------------- +def attach_debugger(): + _DCCSI_GDEBUG = True + os.environ["DYNACONF_DCCSI_GDEBUG"] = str(_DCCSI_GDEBUG) + + _DCCSI_DEV_MODE = True + os.environ["DYNACONF_DCCSI_DEV_MODE"] = str(_DCCSI_DEV_MODE) + + from azpy.test.entry_test import connect_wing + _debugger = connect_wing() + + return _debugger +# ------------------------------------------------------------------------- + + +# ------------------------------------------------------------------------- +# exapnd the global scope and module CONST + +# this is the DCCsi envar used for discovering the engine path (if set) +ENVAR_O3DE_DEV = 'O3DE_DEV' +STUB_O3DE_DEV = 'engine.json' + +# this block is related to .o3de data +# os.path.expanduser("~") returns different values in py2.7 vs 3 +# Note: py27 support will be deprecated in the future +from os.path import expanduser +PATH_USER_HOME = expanduser("~") +_LOGGER.debug('user home: {}'.format(PATH_USER_HOME)) + +# special case, make sure didn't return \documents +user_home_parts = os.path.split(PATH_USER_HOME) + +if str(user_home_parts[1].lower()) == 'documents': + PATH_USER_HOME = user_home_parts[0] + _LOGGER.debug('user home CORRECTED: {}'.format(PATH_USER_HOME)) + +# the global project may be defined in the registry +PATH_USER_O3DE = Path(PATH_USER_HOME, '.o3de') +PATH_USER_O3DE_REGISTRY = Path(PATH_USER_O3DE, 'Registry') +PATH_USER_O3DE_BOOTSTRAP = Path(PATH_USER_O3DE_REGISTRY, 'bootstrap.setreg') + +# this is the DCCsi envar used for discovering the project path (if set) +ENVAR_PATH_O3DE_PROJECT = 'PATH_O3DE_PROJECT' + +# python related envars and paths +STR_PATH_DCCSI_PYTHON_LIB = '{0}\\3rdParty\\Python\\Lib\\{1}.x\\{1}.{2}.x\\site-packages' +# ------------------------------------------------------------------------- + + +# ------------------------------------------------------------------------- +# first define all the methods for the module def get_os(): """returns lumberyard dir names used in python path""" if sys.platform.startswith('win'): @@ -96,7 +194,7 @@ def get_os(): # ------------------------------------------------------------------------- -from azpy.core import get_datadir +# from azpy.core import get_datadir # there was a method here refactored out to add py2.7 support for Maya 2020 #"DccScriptingInterface\azpy\core\py2\utils.py get_datadir()" #"DccScriptingInterface\azpy\core\py3\utils.py get_datadir()" @@ -106,8 +204,10 @@ from azpy.core import get_datadir # ------------------------------------------------------------------------- def return_stub_dir(stub_file='dccsi_stub'): + '''discover and return path by walking from module to file stub + Input: a file name (stub_file) + Output: returns the directory of the file (stub_file)''' _dir_to_last_file = None - '''Take a file name (stub_file) and returns the directory of the file (stub_file)''' # To Do: refactor to use pathlib object oriented Path if _dir_to_last_file is None: path = os.path.abspath(__file__) @@ -129,12 +229,15 @@ def return_stub_dir(stub_file='dccsi_stub'): # ------------------------------------------------------------------------- -def get_stub_check_path(in_path=os.getcwd(), check_stub='engine.json'): +def get_stub_check_path(in_path=os.getcwd(), check_stub=STUB_O3DE_DEV): ''' Returns the branch root directory of the dev\\'engine.json' - (... or you can pass it another known stub) - - so we can safely build relative filepaths within that branch. + (... or you can pass it another known stub) so we can safely build + relative filepaths within that branch. + + Input: a starting directory, default is os.getcwd() + Input: a file name stub (to search for) + Output: a path (the stubs parent directory) If the stub is not found, it returns None ''' @@ -155,7 +258,11 @@ def get_stub_check_path(in_path=os.getcwd(), check_stub='engine.json'): # ------------------------------------------------------------------------- -def get_o3de_engine_root(check_stub='engine.json'): +def get_o3de_engine_root(check_stub=STUB_O3DE_DEV): + '''Discovers the engine root + Input: a file name stub, default engine.json + Output: engine root path (if found) + ''' # get the O3DE engine root folder # if we are running within O3DE we can ensure which engine is running _O3DE_DEV = None @@ -164,20 +271,61 @@ def get_o3de_engine_root(check_stub='engine.json'): except ImportError as e: # if that fails, we can search up # search up to get \dev - _O3DE_DEV = get_stub_check_path(check_stub='engine.json') + _O3DE_DEV = get_stub_check_path(check_stub=STUB_O3DE_DEV) # To Do: What if engine.json doesn't exist? else: - # execute if no exception - # allow for external ENVAR override - from azpy.constants import ENVAR_O3DE_DEV + # execute if no exception, allow for external ENVAR override _O3DE_DEV = Path(os.getenv(ENVAR_O3DE_DEV, azlmbr.paths.engroot)) finally: - # note: can't use fstrings as this module gets called with py2.7 in maya - _LOGGER.info('O3DE engine root: {}'.format(_O3DE_DEV.resolve())) + if _DCCSI_GDEBUG: # to verbose, used often + # note: can't use fstrings as this module gets called with py2.7 in maya + _LOGGER.info('O3DE engine root: {}'.format(_O3DE_DEV.resolve())) return _O3DE_DEV # ------------------------------------------------------------------------- +# ------------------------------------------------------------------------- +def get_o3de_build_path(root_directory=get_o3de_engine_root(), + marker='CMakeCache.txt'): + """Returns a path for the O3DE\build root if found. Searchs down from a + known engine root path. + Input: a root directory, default is to discover the engine root + Output: the path of the build folder (if found) + """ + + if _DCCSI_GDEBUG: + import time + start = time.process_time() + + for root, dirs, files in os.walk(root_directory): + if marker in files: + if _DCCSI_GDEBUG: + _LOGGER.debug('Find PATH_O3DE_BUILD took: {} sec' + ''.format(time.process_time() - start)) + return Path(root) + else: + if _DCCSI_GDEBUG: + _LOGGER.debug('Not fidning PATH_O3DE_BUILD took: {} sec' + ''.format(time.process_time() - start)) + return None + +# note: if we use this method to find PATH_O3DE_BUILD +# by searching for the 'CMakeCache.txt' it can take 1 or more seconds +# this will slow down boot times! +# +# this works fine for a engine dev, but is not really suitable for end users +# it assumes that the engine is being built and 'CMakeCache.txt' exists +# but the engine could be pre-built or packaged somehow +# +# other ways to deal with it: +# 1 - Use the running application .exe to discover the build path? +# 2 - Set PATH_O3DE_BUILD envar in +# "C:\Depot\o3de\Gems\AtomLyIntegration\TechnicalArt\DccScriptingInterface\.env" +# 3 - Set in commandline (or from .bat file) +# 4 - To Do (maybe): Set in a dccsi_configuration.setreg? +# ------------------------------------------------------------------------- + + # ------------------------------------------------------------------------- # settings.setenv() # doing this will add the additional DYNACONF_ envars def get_dccsi_config(dccsi_dirpath=return_stub_dir()): @@ -231,10 +379,8 @@ def get_current_project_cfg(dev_folder=get_stub_check_path()): def get_check_global_project(): """Gets o3de project via .o3de data in user directory""" - from azpy.constants import PATH_USER_O3DE_BOOTSTRAP from collections import OrderedDict from box import Box - from azpy.core import get_datadir bootstrap_box = None json_file_path = Path(PATH_USER_O3DE_BOOTSTRAP) @@ -260,46 +406,44 @@ def get_check_global_project(): # ------------------------------------------------------------------------- def get_o3de_project_path(): - """figures out the o3de project path - if not found defaults to the engine folder""" - _O3DE_PROJECT_PATH = None + """figures out the o3de project path if not found defaults to the engine folder""" + _PATH_O3DE_PROJECT = None try: import azlmbr # this file will fail outside of O3DE except ImportError as e: # (fallback 1) this checks if a global project is set # This check user home for .o3de data - _O3DE_PROJECT_PATH = get_check_global_project() + _PATH_O3DE_PROJECT = get_check_global_project() else: # execute if no exception, this would indicate we are in O3DE land # allow for external ENVAR override - from azpy.constants import ENVAR_O3DE_PROJECT_PATH - _O3DE_PROJECT_PATH = Path(os.getenv(ENVAR_O3DE_PROJECT_PATH, azlmbr.paths.projectroot)) + _PATH_O3DE_PROJECT = Path(os.getenv(ENVAR_PATH_O3DE_PROJECT, azlmbr.paths.projectroot)) finally: # (fallback 2) if None, fallback to engine folder - if not _O3DE_PROJECT_PATH: - _O3DE_PROJECT_PATH = get_o3de_engine_root() - # note: can't use fstrings as this module gets called with py2.7 in maya - _LOGGER.info('O3DE project root: {}'.format(_O3DE_PROJECT_PATH.resolve())) - return _O3DE_PROJECT_PATH + if not _PATH_O3DE_PROJECT: + _PATH_O3DE_PROJECT = get_o3de_engine_root() + + if _DCCSI_GDEBUG: # to verbose, used often + # note: can't use fstrings as this module gets called with py2.7 in maya + _LOGGER.debug('O3DE project root: {}'.format(_PATH_O3DE_PROJECT.resolve())) + return _PATH_O3DE_PROJECT # ------------------------------------------------------------------------- # ------------------------------------------------------------------------- def bootstrap_dccsi_py_libs(dccsi_dirpath=return_stub_dir()): """Builds and adds local site dir libs based on py version""" - - from azpy.constants import STR_DCCSI_PYTHON_LIB_PATH # a path string constructor - _DCCSI_PYTHON_LIB_PATH = Path(STR_DCCSI_PYTHON_LIB_PATH.format(dccsi_dirpath, + _PATH_DCCSI_PYTHON_LIB = Path(STR_PATH_DCCSI_PYTHON_LIB.format(dccsi_dirpath, sys.version_info[0], sys.version_info[1])) - if _DCCSI_PYTHON_LIB_PATH.exists(): - site.addsitedir(_DCCSI_PYTHON_LIB_PATH.resolve()) # PYTHONPATH + if _PATH_DCCSI_PYTHON_LIB.exists(): + site.addsitedir(_PATH_DCCSI_PYTHON_LIB.resolve()) # PYTHONPATH _LOGGER.debug('Performed site.addsitedir({})' - ''.format(_DCCSI_PYTHON_LIB_PATH.resolve())) - return _DCCSI_PYTHON_LIB_PATH + ''.format(_PATH_DCCSI_PYTHON_LIB.resolve())) + return _PATH_DCCSI_PYTHON_LIB else: - message = "Doesn't exist: {}".format(_DCCSI_PYTHON_LIB_PATH) + message = "Doesn't exist: {}".format(_PATH_DCCSI_PYTHON_LIB) _LOGGER.error(message) raise NotADirectoryError(message) # ------------------------------------------------------------------------- @@ -309,27 +453,87 @@ def bootstrap_dccsi_py_libs(dccsi_dirpath=return_stub_dir()): # Main Code Block, runs this script as main (testing) # ------------------------------------------------------------------------- if __name__ == '__main__': + """Run this file as a standalone cli script for testing/debugging""" + + # global scope + _MODULENAME = 'azpy.config_utils' + + # enable debug + _DCCSI_GDEBUG = False # enable here to force temporarily + _DCCSI_DEV_MODE = False + _DCCSI_LOGLEVEL = _logging.INFO + + # parse the command line args + import argparse + parser = argparse.ArgumentParser( + description='O3DE DCCsi: {}'.format(_MODULENAME), + epilog="Coomandline args enable deeper testing and info from commandline") + + parser.add_argument('-gd', '--global-debug', + type=bool, + required=False, + help='Enables global debug flag.') + + parser.add_argument('-sd', '--set-debugger', + type=str, + required=False, + help='Default debugger: WING, others: PYCHARM, VSCODE (not yet implemented).') + + parser.add_argument('-dm', '--developer-mode', + type=bool, + required=False, + help='Enables dev mode for early auto attaching debugger.') + + args = parser.parse_args() + + # easy overrides + if args.global_debug: + _DCCSI_GDEBUG = True + _DCCSI_LOGLEVEL = _logging.DEBUG + _LOGGER.setLevel(_DCCSI_LOGLEVEL) + + if args.set_debugger: + _LOGGER.info('Setting and switching debugger type not implemented (default=WING)') + # To Do: implement debugger plugin pattern + + if args.developer_mode or _DCCSI_DEV_MODE: + _DCCSI_DEV_MODE = True + attach_debugger() # attempts to start debugger # happy print _LOGGER.info("# {0} #".format('-' * 72)) _LOGGER.info('~ config_utils.py ... Running script as __main__') _LOGGER.info("# {0} #".format('-' * 72)) + + from pathlib import Path + # built in simple tests and info from commandline _LOGGER.info('Current Work dir: {0}'.format(os.getcwd())) _LOGGER.info('OS: {}'.format(get_os())) + + _PATH_DCCSIG = Path(return_stub_dir('dccsi_stub')) + _LOGGER.info('PATH_DCCSIG: {}'.format(_PATH_DCCSIG.resolve())) - _LOGGER.info('DCCSIG_PATH: {}'.format(return_stub_dir('dccsi_stub'))) - - _config = get_dccsi_config() - _LOGGER.info('DCCSI_CONFIG_PATH: {}'.format(_config)) - - _LOGGER.info('O3DE_DEV: {}'.format(get_o3de_engine_root(check_stub='engine.json'))) + _O3DE_DEV = get_o3de_engine_root(check_stub='engine.json') + _LOGGER.info('O3DE_DEV: {}'.format(_O3DE_DEV.resolve())) + + _PATH_O3DE_BUILD = get_o3de_build_path(_O3DE_DEV, 'CMakeCache.txt') + _LOGGER.info('PATH_O3DE_BUILD: {}'.format(_PATH_O3DE_BUILD.resolve())) # new o3de version - _LOGGER.info('O3DE_PROJECT: {}'.format(get_check_global_project())) + _PATH_O3DE_PROJECT = get_check_global_project() + _LOGGER.info('PATH_O3DE_PROJECT: {}'.format(_PATH_O3DE_PROJECT.resolve())) - _LOGGER.info('DCCSI_PYTHON_LIB_PATH: {}'.format(bootstrap_dccsi_py_libs(return_stub_dir('dccsi_stub')))) + _PATH_DCCSI_PYTHON_LIB = bootstrap_dccsi_py_libs(_PATH_DCCSIG) + _LOGGER.info('PATH_DCCSI_PYTHON_LIB: {}'.format(_PATH_DCCSI_PYTHON_LIB.resolve())) + _DCCSI_CONFIG = get_dccsi_config(_PATH_DCCSIG) + _LOGGER.info('PATH_DCCSI_CONFIG: {}'.format(_DCCSI_CONFIG)) + # --------------------------------------------------------------------- + # custom prompt sys.ps1 = "[azpy]>>" + +_LOGGER.debug('DCCsi: config_utils.py took: {} sec'.format(time.process_time() - start)) +# --- END ----------------------------------------------------------------- \ No newline at end of file diff --git a/Gems/AtomLyIntegration/TechnicalArt/DccScriptingInterface/azpy/constants.py b/Gems/AtomLyIntegration/TechnicalArt/DccScriptingInterface/azpy/constants.py index d23601a33d..43efaa1201 100755 --- a/Gems/AtomLyIntegration/TechnicalArt/DccScriptingInterface/azpy/constants.py +++ b/Gems/AtomLyIntegration/TechnicalArt/DccScriptingInterface/azpy/constants.py @@ -23,6 +23,7 @@ So we can make an update here once that is used elsewhere. import os import sys import site +import time from os.path import expanduser import logging as _logging # ------------------------------------------------------------------------- @@ -30,22 +31,23 @@ import logging as _logging # ------------------------------------------------------------------------- # global scope -_MODULENAME = __name__ -if _MODULENAME is '__main__': - _MODULENAME = 'azpy.constants' +_MODULENAME = 'azpy.constants' + +start = time.process_time() # start tracking os.environ['PYTHONINSPECT'] = 'True' # for this module to perform standalone # we need to set up basic access to the DCCsi _MODULE_PATH = os.path.realpath(__file__) # To Do: what if frozen? -_DCCSIG_PATH = os.path.normpath(os.path.join(_MODULE_PATH, '../..')) -_DCCSIG_PATH = os.getenv('DCCSIG_PATH', _DCCSIG_PATH) -site.addsitedir(_DCCSIG_PATH) +_PATH_DCCSIG = os.path.normpath(os.path.join(_MODULE_PATH, '../..')) +_PATH_DCCSIG = os.getenv('PATH_DCCSIG', _PATH_DCCSIG) +site.addsitedir(_PATH_DCCSIG) # now we have azpy api access import azpy from azpy.env_bool import env_bool from azpy.config_utils import return_stub_dir +from azpy.config_utils import get_stub_check_path # ------------------------------------------------------------------------- @@ -65,18 +67,23 @@ FRMT_LOG_SHRT = "[%(asctime)s][%(name)s][%(levelname)s] >> %(message)s" # global debug stuff _DCCSI_GDEBUG = env_bool(ENVAR_DCCSI_GDEBUG, False) _DCCSI_DEV_MODE = env_bool(ENVAR_DCCSI_DEV_MODE, False) -_DCCSI_LOGLEVEL = int(env_bool(ENVAR_DCCSI_LOGLEVEL, int(20))) +# default loglevel to info unless set +_DCCSI_LOGLEVEL = int(env_bool(ENVAR_DCCSI_LOGLEVEL, _logging.INFO)) if _DCCSI_GDEBUG: - _DCCSI_LOGLEVEL = int(10) -# ------------------------------------------------------------------------- + # override loglevel if runnign debug + _DCCSI_LOGLEVEL = _logging.DEBUG - -# ------------------------------------------------------------------------- # set up module logging -for handler in _logging.root.handlers[:]: - _logging.root.removeHandler(handler) +#for handler in _logging.root.handlers[:]: + #_logging.root.removeHandler(handler) + +# configure basic logger +# note: not using a common logger to reduce cyclical imports +_logging.basicConfig(level=_DCCSI_LOGLEVEL, + format=FRMT_LOG_LONG, + datefmt='%m-%d %H:%M') + _LOGGER = _logging.getLogger(_MODULENAME) -_logging.basicConfig(format=FRMT_LOG_LONG, level=_DCCSI_LOGLEVEL) _LOGGER.debug('Initializing: {0}.'.format({_MODULENAME})) # ------------------------------------------------------------------------- @@ -107,6 +114,7 @@ TAG_DCCSI_CONFIG = str('dccsiconfiguration.setreg') # filesystem markers, stub file names. STUB_O3DE_DEV = str('engine.json') +STUB_O3DE_BUILD = str('CMakeCache.txt') STUB_O3DE_ROOT_DCCSI = str('dccsi_stub') STUB_O3DE_DCCSI_AZPY = str('dccsi_azpy_stub') STUB_O3DE_DCCSI_TOOLS = str('dccsi_tools_stub') @@ -147,27 +155,27 @@ PATH_PROGRAMFILES_X64 = str(os.environ['PROGRAMFILES']) # base env var key as str ENVAR_COMPANY = str('COMPANY') -ENVAR_O3DE_PROJECT = str('O3DE_PROJECT') -ENVAR_O3DE_PROJECT_PATH = str('O3DE_PROJECT_PATH') +ENVAR_O3DE_PROJECT = str('O3DE_PROJECT') # project name +ENVAR_PATH_O3DE_PROJECT = str('PATH_O3DE_PROJECT') # path to project ENVAR_O3DE_DEV = str('O3DE_DEV') -ENVAR_DCCSIG_PATH = str('DCCSIG_PATH') +ENVAR_PATH_DCCSIG = str('PATH_DCCSIG') ENVAR_DCCSI_AZPY_PATH = str('DCCSI_AZPY_PATH') -ENVAR_DCCSI_TOOLS_PATH = str('DCCSI_TOOLS_PATH') +ENVAR_PATH_DCCSI_TOOLS = str('PATH_DCCSI_TOOLS') ENVAR_O3DE_BUILD_DIR_NAME = str('O3DE_BUILD_DIR_NAME') -ENVAR_O3DE_BUILD_PATH = str('O3DE_BUILD_PATH') +ENVAR_PATH_O3DE_BUILD = str('PATH_O3DE_BUILD') ENVAR_QT_PLUGIN_PATH = TAG_QT_PLUGIN_PATH ENVAR_QTFORPYTHON_PATH = str('QTFORPYTHON_PATH') -ENVAR_O3DE_BIN_PATH = str('O3DE_BIN_PATH') +ENVAR_PATH_O3DE_BIN = str('PATH_O3DE_BIN') ENVAR_DCCSI_LOG_PATH = str('DCCSI_LOG_PATH') ENVAR_DCCSI_LAUNCHERS_PATH = str('DCCSI_LAUNCHERS_PATH') ENVAR_DCCSI_PY_VERSION_MAJOR = str('DCCSI_PY_VERSION_MAJOR') ENVAR_DCCSI_PY_VERSION_MINOR = str('DCCSI_PY_VERSION_MINOR') -ENVAR_DCCSI_PYTHON_PATH = str('DCCSI_PYTHON_PATH') -ENVAR_DCCSI_PYTHON_LIB_PATH = str('DCCSI_PYTHON_LIB_PATH') -ENVAR_O3DE_PYTHON_INSTALL = str('O3DE_PYTHON_INSTALL') +ENVAR_PATH_DCCSI_PYTHON = str('PATH_DCCSI_PYTHON') +ENVAR_PATH_DCCSI_PYTHON_LIB = str('PATH_DCCSI_PYTHON_LIB') +ENVAR_PATH_O3DE_PYTHON_INSTALL = str('PATH_O3DE_PYTHON_INSTALL') ENVAR_WINGHOME = str('WINGHOME') ENVAR_DCCSI_WING_VERSION_MAJOR = str('DCCSI_WING_VERSION_MAJOR') @@ -178,7 +186,7 @@ ENVAR_DCCSI_PY_DCCSI = str('DCCSI_PY_DCCSI') ENVAR_DCCSI_PY_MAYA = str('DCCSI_PY_MAYA') ENVAR_DCCSI_PY_DEFAULT = str('DCCSI_PY_DEFAULT') -ENVAR_DCCSI_MAYA_VERSION = str('DCCSI_MAYA_VERSION') +ENVAR_MAYA_VERSION = str('MAYA_VERSION') ENVAR_MAYA_LOCATION = str('MAYA_LOCATION') ENVAR_DCCSI_TOOLS_MAYA_PATH = str('DCCSI_TOOLS_MAYA_PATH') @@ -206,27 +214,29 @@ TAG_MAYA_WORKSPACE = 'workspace.mel' # dcc scripting interface common and default paths PATH_O3DE_DEV = str(return_stub_dir(STUB_O3DE_DEV)) -PATH_DCCSIG_PATH = str(return_stub_dir(STUB_O3DE_ROOT_DCCSI)) +PATH_DCCSIG = str(return_stub_dir(STUB_O3DE_ROOT_DCCSI)) PATH_DCCSI_AZPY_PATH = str(return_stub_dir(STUB_O3DE_DCCSI_AZPY)) -PATH_DCCSI_TOOLS_PATH = str('{0}\\{1}'.format(PATH_DCCSIG_PATH, TAG_DIR_DCCSI_TOOLS)) +PATH_DCCSI_TOOLS = str('{0}\\{1}'.format(PATH_DCCSIG, TAG_DIR_DCCSI_TOOLS)) # logging into the cache -PATH_DCCSI_LOG_PATH = str('{O3DE_PROJECT_PATH}\\user\\log\{TAG_DCCSI_NICKNAME}') +PATH_DCCSI_LOG_PATH = str('{PATH_O3DE_PROJECT}\\user\\log\{TAG_DCCSI_NICKNAME}') # dev \ \ -STR_CONSTRUCT_O3DE_BUILD_PATH = str('{0}\\{1}') -PATH_O3DE_BUILD_PATH = str(STR_CONSTRUCT_O3DE_BUILD_PATH.format(PATH_O3DE_DEV, +STR_CONSTRUCT_PATH_O3DE_BUILD = str('{0}\\{1}') +PATH_O3DE_BUILD = str(STR_CONSTRUCT_PATH_O3DE_BUILD.format(PATH_O3DE_DEV, TAG_DIR_O3DE_BUILD_FOLDER)) # ENVAR_QT_PLUGIN_PATH = TAG_QT_PLUGIN_PATH STR_QTPLUGIN_DIR = str('{0}\\bin\\profile\\EditorPlugins') STR_QTFORPYTHON_PATH = str('{0}\\Gems\\QtForPython\\3rdParty\\pyside2\\windows\\release') -STR_O3DE_BIN_PATH = str('{0}\\bin\\profile') +STR_PATH_O3DE_BIN = str('{0}\\bin\\profile') + +STR_PATH_O3DE_BUILD = str('{0}\\{1}') +PATH_O3DE_BUILD = STR_PATH_O3DE_BUILD.format(PATH_O3DE_DEV, TAG_DIR_O3DE_BUILD_FOLDER) -PATH_O3DE_BUILD_PATH = str('{0}\\{1}'.format(PATH_O3DE_DEV, TAG_DIR_O3DE_BUILD_FOLDER)) PATH_QTFORPYTHON_PATH = str(STR_QTFORPYTHON_PATH.format(PATH_O3DE_DEV)) -PATH_QT_PLUGIN_PATH = str(STR_QTPLUGIN_DIR).format(PATH_O3DE_BUILD_PATH) -PATH_O3DE_BIN_PATH = str(STR_O3DE_BIN_PATH).format(PATH_O3DE_BUILD_PATH) +PATH_QT_PLUGIN_PATH = str(STR_QTPLUGIN_DIR).format(PATH_O3DE_BUILD) +PATH_O3DE_BIN = str(STR_PATH_O3DE_BIN).format(PATH_O3DE_BUILD) # py path string, parts, etc. TAG_DEFAULT_PY = str('Launch_pyBASE.bat') @@ -266,21 +276,21 @@ TAG_DCCSI_PY_VERSION_RELEASE = str(10) TAG_PYTHON_EXE = str('python.exe') TAG_TOOLS_DIR = str('Tools\\Python') TAG_PLATFORM = str('windows') -STR_CONSTRUCT_O3DE_PYTHON_INSTALL = str('{0}\\{1}\\{2}.{3}.{4}\\{5}') -PATH_DCCSI_PYTHON_PATH = str(STR_CONSTRUCT_O3DE_PYTHON_INSTALL.format(PATH_O3DE_DEV, +STR_CONSTRUCT_PATH_O3DE_PYTHON_INSTALL = str('{0}\\{1}\\{2}.{3}.{4}\\{5}') +PATH_DCCSI_PYTHON = str(STR_CONSTRUCT_PATH_O3DE_PYTHON_INSTALL.format(PATH_O3DE_DEV, TAG_TOOLS_DIR, TAG_DCCSI_PY_VERSION_MAJOR, TAG_DCCSI_PY_VERSION_MINOR, TAG_DCCSI_PY_VERSION_RELEASE, TAG_PLATFORM)) -PATH_DCCSI_PY_BASE = str('{0}\\{1}').format(PATH_DCCSI_PYTHON_PATH, TAG_PYTHON_EXE) +PATH_DCCSI_PY_BASE = str('{0}\\{1}').format(PATH_DCCSI_PYTHON, TAG_PYTHON_EXE) PATH_DCCSI_PY_DEFAULT = PATH_DCCSI_PY_BASE # bootstrap site-packages by version TAG_PY_MAJOR = str(sys.version_info.major) # future proof TAG_PY_MINOR = str(sys.version_info.minor) -STR_DCCSI_PYTHON_LIB_PATH = str('{0}\\3rdParty\\Python\\Lib\\{1}.x\\{1}.{2}.x\\site-packages') -PATH_DCCSI_PYTHON_LIB_PATH = STR_DCCSI_PYTHON_LIB_PATH.format(PATH_DCCSIG_PATH, +STR_PATH_DCCSI_PYTHON_LIB = str('{0}\\3rdParty\\Python\\Lib\\{1}.x\\{1}.{2}.x\\site-packages') +PATH_DCCSI_PYTHON_LIB = STR_PATH_DCCSI_PYTHON_LIB.format(PATH_DCCSIG, TAG_PY_MAJOR, TAG_PY_MINOR) # default path strings (and afe associated attributes) @@ -334,14 +344,14 @@ if __name__ == '__main__': _stash_dict = {} _stash_dict['O3DE_DEV'] = Path(PATH_O3DE_DEV) - _stash_dict['DCCSIG_PATH'] = Path(PATH_DCCSIG_PATH) + _stash_dict['PATH_DCCSIG'] = Path(PATH_DCCSIG) _stash_dict['DCCSI_AZPY_PATH'] = Path(PATH_DCCSI_AZPY_PATH) - _stash_dict['DCCSI_TOOLS_PATH'] = Path(PATH_DCCSI_TOOLS_PATH) - _stash_dict['DCCSI_PYTHON_PATH'] = Path(PATH_DCCSI_PYTHON_PATH) + _stash_dict['PATH_DCCSI_TOOLS'] = Path(PATH_DCCSI_TOOLS) + _stash_dict['PATH_DCCSI_PYTHON'] = Path(PATH_DCCSI_PYTHON) _stash_dict['DCCSI_PY_BASE'] = Path(PATH_DCCSI_PY_BASE) - _stash_dict['DCCSI_PYTHON_LIB_PATH'] = Path(PATH_DCCSI_PYTHON_LIB_PATH) - _stash_dict['O3DE_BUILD_PATH'] = Path(PATH_O3DE_BUILD_PATH) - _stash_dict['O3DE_BIN_PATH'] = Path(PATH_O3DE_BIN_PATH) + _stash_dict['PATH_DCCSI_PYTHON_LIB'] = Path(PATH_DCCSI_PYTHON_LIB) + _stash_dict['PATH_O3DE_BUILD'] = Path(PATH_O3DE_BUILD) + _stash_dict['PATH_O3DE_BIN'] = Path(PATH_O3DE_BIN) _stash_dict['QTFORPYTHON_PATH'] = Path(PATH_QTFORPYTHON_PATH) _stash_dict['QT_PLUGIN_PATH'] = Path(PATH_QT_PLUGIN_PATH) _stash_dict['SAT_INSTALL_PATH'] = Path(PATH_SAT_INSTALL_PATH) @@ -363,3 +373,6 @@ if __name__ == '__main__': # custom prompt sys.ps1 = "[azpy]>>" + +_LOGGER.debug('{0} took: {1} sec'.format(_MODULENAME, time.process_time() - start)) +# --- END ----------------------------------------------------------------- \ No newline at end of file diff --git a/Gems/AtomLyIntegration/TechnicalArt/DccScriptingInterface/azpy/env_base.py b/Gems/AtomLyIntegration/TechnicalArt/DccScriptingInterface/azpy/env_base.py index cdcf99d762..ec90a17ffd 100755 --- a/Gems/AtomLyIntegration/TechnicalArt/DccScriptingInterface/azpy/env_base.py +++ b/Gems/AtomLyIntegration/TechnicalArt/DccScriptingInterface/azpy/env_base.py @@ -69,11 +69,11 @@ _BASE_ENVVAR_DICT[ENVAR_O3DE_PROJECT] = '${0}'.format(ENVAR_O3DE_PROJECT) # paths _BASE_ENVVAR_DICT[ENVAR_O3DE_DEV] = Path('${0}'.format(ENVAR_O3DE_DEV)) -_BASE_ENVVAR_DICT[ENVAR_O3DE_PROJECT_PATH] = Path('${0}'.format(ENVAR_O3DE_PROJECT_PATH)) -_BASE_ENVVAR_DICT[ENVAR_DCCSIG_PATH] = Path('${0}'.format(ENVAR_DCCSIG_PATH)) +_BASE_ENVVAR_DICT[ENVAR_PATH_O3DE_PROJECT] = Path('${0}'.format(ENVAR_PATH_O3DE_PROJECT)) +_BASE_ENVVAR_DICT[ENVAR_PATH_DCCSIG] = Path('${0}'.format(ENVAR_PATH_DCCSIG)) _BASE_ENVVAR_DICT[ENVAR_DCCSI_LOG_PATH] = Path('${0}'.format(ENVAR_DCCSI_LOG_PATH)) _BASE_ENVVAR_DICT[ENVAR_DCCSI_AZPY_PATH] = Path('${0}'.format(ENVAR_DCCSI_AZPY_PATH)) -_BASE_ENVVAR_DICT[ENVAR_DCCSI_TOOLS_PATH] = Path('${0}'.format(ENVAR_DCCSI_TOOLS_PATH)) +_BASE_ENVVAR_DICT[ENVAR_PATH_DCCSI_TOOLS] = Path('${0}'.format(ENVAR_PATH_DCCSI_TOOLS)) # dev env flags _BASE_ENVVAR_DICT[ENVAR_DCCSI_GDEBUG] = '${0}'.format(ENVAR_DCCSI_GDEBUG) @@ -83,8 +83,8 @@ _BASE_ENVVAR_DICT[ENVAR_DCCSI_GDEBUGGER] = '${0}'.format(ENVAR_DCCSI_GDEBUGGER) # default python dist _BASE_ENVVAR_DICT[ENVAR_DCCSI_PY_VERSION_MAJOR] = '${0}'.format(ENVAR_DCCSI_PY_VERSION_MAJOR) _BASE_ENVVAR_DICT[ENVAR_DCCSI_PY_VERSION_MINOR] = '${0}'.format(ENVAR_DCCSI_PY_VERSION_MINOR) -_BASE_ENVVAR_DICT[ENVAR_DCCSI_PYTHON_PATH] = '${0}'.format(ENVAR_DCCSI_PYTHON_PATH) -_BASE_ENVVAR_DICT[ENVAR_DCCSI_PYTHON_LIB_PATH] = '${0}'.format(ENVAR_DCCSI_PYTHON_LIB_PATH) +_BASE_ENVVAR_DICT[ENVAR_PATH_DCCSI_PYTHON] = '${0}'.format(ENVAR_PATH_DCCSI_PYTHON) +_BASE_ENVVAR_DICT[ENVAR_PATH_DCCSI_PYTHON_LIB] = '${0}'.format(ENVAR_PATH_DCCSI_PYTHON_LIB) # try to fetch and set the base values from the environment # this makes sure all envars set, are resolved on import diff --git a/Gems/AtomLyIntegration/TechnicalArt/DccScriptingInterface/azpy/shared/ui/resources/stylesheets/style_dark.qss b/Gems/AtomLyIntegration/TechnicalArt/DccScriptingInterface/azpy/shared/ui/resources/stylesheets/style_dark.qss index 193034b781..e308875793 100644 --- a/Gems/AtomLyIntegration/TechnicalArt/DccScriptingInterface/azpy/shared/ui/resources/stylesheets/style_dark.qss +++ b/Gems/AtomLyIntegration/TechnicalArt/DccScriptingInterface/azpy/shared/ui/resources/stylesheets/style_dark.qss @@ -1116,91 +1116,6 @@ QPushButton#captureButton:disabled { /*----------------------------------------------------------------------------*/ /*----------------------------------------------------------------------------*/ -Driller--DrillerCaptureWindow > #centralwidget > #playButton { - color: white; -} - - -Driller--DrillerCaptureWindow > #centralwidget > AzToolsFramework--AZAutoSizingScrollArea#scrollArea { - background-color: rgb(100,100,100); - border: 1px solid rgb(100,100,100); -} - -/*----------------------------------------------------------------------------*/ -/*----------------------------------------------------------------------------*/ - -Driller--DrillerMainWindow QDockWidget -{ - background: rgb(56, 58, 59); -} - -Driller--DrillerMainWindow QDockWidget::title -{ - background: rgb(56, 58, 59); -} - -Driller--DrillerMainWindow QDockWidget .QWidget -{ - background: rgb(56, 58, 59); - border: 0px solid red; -} - -/*----------------------------------------------------------------------------*/ -/*----------------------------------------------------------------------------*/ - -Driller--ChannelControl > QFrame { - background-color: rgb(100, 100, 100); -} - -Driller--ChannelControl > #infoArea > QLabel { - color: #999999; - font-size: 12px; - font-family: "open sans"; - font-weight:600; -} - -/*----------------------------------------------------------------------------*/ -/*----------------------------------------------------------------------------*/ - -Driller--ChannelProfilerWidget #profilerName { - color: #cccccc; - font-size: 13px; - font-family: "open sans"; -} - -/*----------------------------------------------------------------------------*/ -/*----------------------------------------------------------------------------*/ - -Driller--AnnotationHeaderView { - background-color: rgb(80,80,80); -} - -Driller--AnnotationHeaderView > #frame { - background-color: rgb(80,80,80); -} - -Driller--AnnotationHeaderView > #frame > #annotationBackground { - background-color: rgb(80,80,80); -} - -Driller--AnnotationHeaderView > #frame > #annotationBackground > #configureAnnotations { - color: white; -} - -/*----------------------------------------------------------------------------*/ -/*----------------------------------------------------------------------------*/ - -/*----------------------------------------------------------------------------*/ -/*----------------------------------------------------------------------------*/ - -Driller--CollapsiblePanel > QGroupBox { - background-color: rgb(56, 58, 59); - margin-top: 0px; -} - -/*----------------------------------------------------------------------------*/ -/*----------------------------------------------------------------------------*/ - AzToolsFramework--TargetSelectorButton#targetButton { color: white; } diff --git a/Gems/AtomLyIntegration/TechnicalArt/DccScriptingInterface/azpy/synthetic_env.py b/Gems/AtomLyIntegration/TechnicalArt/DccScriptingInterface/azpy/synthetic_env.py index 33ac6c6814..21f9692dc5 100644 --- a/Gems/AtomLyIntegration/TechnicalArt/DccScriptingInterface/azpy/synthetic_env.py +++ b/Gems/AtomLyIntegration/TechnicalArt/DccScriptingInterface/azpy/synthetic_env.py @@ -42,9 +42,9 @@ Configures several useful environment config settings and paths, # this is the required base environment O3DE_PROJECT : name of project (project directory) O3DE_DEV : path to Lumberyard \dev root - O3DE_PROJECT_PATH : path to project dir - DCCSIG_PATH : path to the DCCsi Gem root - DCCSI_TOOLS_PATH : path to associated (non-api code) DCC SDK + PATH_O3DE_PROJECT : path to project dir + PATH_DCCSIG : path to the DCCsi Gem root + PATH_DCCSI_TOOLS : path to associated (non-api code) DCC SDK # nice to haves in base env to define core support DCCSI_GDEBUG : sets global debug prints @@ -58,7 +58,7 @@ Configures several useful environment config settings and paths, :: Default version py37 has a launcher (activates the env, starts py interpreter) - set DCCSI_PY_BASE=%O3DE_PYTHON_INSTALL%\python.exe + set DCCSI_PY_BASE=%PATH_O3DE_PYTHON_INSTALL%\python.exe :: shared location for 64bit python 3.7 BASE location set DCCSI_PY_DCCSI=%DCCSI_LAUNCHERS_PATH%\Launch_pyBASE.bat @@ -107,9 +107,9 @@ from collections import OrderedDict os.environ['PYTHONINSPECT'] = 'True' _MODULE_PATH = os.path.realpath(__file__) # To Do: what if frozen? -_DCCSIG_PATH = os.path.normpath(os.path.join(_MODULE_PATH, '../..')) -_DCCSIG_PATH = os.getenv('DCCSIG_PATH', _DCCSIG_PATH) -site.addsitedir(_DCCSIG_PATH) +_PATH_DCCSIG = os.path.normpath(os.path.join(_MODULE_PATH, '../..')) +_PATH_DCCSIG = os.getenv('PATH_DCCSIG', _PATH_DCCSIG) +site.addsitedir(_PATH_DCCSIG) # ------------------------------------------------------------------------- @@ -135,7 +135,7 @@ _LOGGER = _logging.getLogger(_PACKAGENAME) _logging.basicConfig(format=FRMT_LOG_LONG) _LOGGER.debug('Initializing: {0}.'.format({_PACKAGENAME})) -_LOGGER.debug('_DCCSIG_PATH: {}'.format(_DCCSIG_PATH)) +_LOGGER.debug('_PATH_DCCSIG: {}'.format(_PATH_DCCSIG)) _LOGGER.debug('_DCCSI_GDEBUG: {}'.format(_DCCSI_GDEBUG)) _LOGGER.debug('_DCCSI_DEV_MODE: {}'.format(_DCCSI_DEV_MODE)) @@ -146,7 +146,7 @@ if _DCCSI_DEV_MODE: # we can go ahead and just make sure the the DCCsi env is set # config is SO generic this ensures we are importing a specific one _spec_dccsi_config = importlib.util.spec_from_file_location("dccsi.config", - Path(_DCCSIG_PATH, + Path(_PATH_DCCSIG, "config.py")) _dccsi_config = importlib.util.module_from_spec(_spec_dccsi_config) _spec_dccsi_config.loader.exec_module(_dccsi_config) @@ -159,12 +159,12 @@ from azpy.constants import * from azpy.shared.common.core_utils import walk_up_dir from azpy.shared.common.core_utils import get_stub_check_path -_DCCSI_PYTHON_LIB_PATH = os.getenv(ENVAR_DCCSI_PYTHON_LIB_PATH, - PATH_DCCSI_PYTHON_LIB_PATH) -_LOGGER.debug('Dccsi Lib Path: {0}'.format(_DCCSI_PYTHON_LIB_PATH)) +_PATH_DCCSI_PYTHON_LIB = os.getenv(ENVAR_PATH_DCCSI_PYTHON_LIB, + PATH_DCCSI_PYTHON_LIB) +_LOGGER.debug('Dccsi Lib Path: {0}'.format(_PATH_DCCSI_PYTHON_LIB)) -if os.path.exists(_DCCSI_PYTHON_LIB_PATH): - site.addsitedir(_DCCSI_PYTHON_LIB_PATH) # add access +if os.path.exists(_PATH_DCCSI_PYTHON_LIB): + site.addsitedir(_PATH_DCCSI_PYTHON_LIB) # add access # ------------------------------------------------------------------------- # post-bootstrap global space @@ -404,53 +404,53 @@ def stash_env(_SYNTH_ENV_DICT = OrderedDict()): # so we guess based on how I set up the original dev environment # -- envar -- - _O3DE_BUILD_PATH = Path(os.getenv(ENVAR_O3DE_BUILD_PATH, - PATH_O3DE_BUILD_PATH)) - _SYNTH_ENV_DICT[ENVAR_O3DE_BUILD_PATH] = _O3DE_BUILD_PATH.as_posix() + _PATH_O3DE_BUILD = Path(os.getenv(ENVAR_PATH_O3DE_BUILD, + PATH_O3DE_BUILD)) + _SYNTH_ENV_DICT[ENVAR_PATH_O3DE_BUILD] = _PATH_O3DE_BUILD.as_posix() # -- envar -- - _O3DE_BIN_PATH = Path(os.getenv(ENVAR_O3DE_BIN_PATH, - PATH_O3DE_BIN_PATH)) + _PATH_O3DE_BIN = Path(os.getenv(ENVAR_PATH_O3DE_BIN, + PATH_O3DE_BIN)) # some of these need hard checks - if not _O3DE_BIN_PATH.exists(): - raise Exception('O3DE_BIN_PATH does NOT exist: {0}'.format(_O3DE_BIN_PATH)) + if not _PATH_O3DE_BIN.exists(): + raise Exception('PATH_O3DE_BIN does NOT exist: {0}'.format(_PATH_O3DE_BIN)) else: - _SYNTH_ENV_DICT[ENVAR_O3DE_BIN_PATH] = _O3DE_BIN_PATH.as_posix() + _SYNTH_ENV_DICT[ENVAR_PATH_O3DE_BIN] = _PATH_O3DE_BIN.as_posix() # adding to sys.path apparently doesn't work for .dll locations like Qt - os.environ['PATH'] = _O3DE_BIN_PATH.as_posix() + os.pathsep + os.environ['PATH'] + os.environ['PATH'] = _PATH_O3DE_BIN.as_posix() + os.pathsep + os.environ['PATH'] # -- envar -- # if that stub marker doesn't exist assume DCCsi path (fallback 1) - _O3DE_PROJECT_PATH = Path(os.getenv(ENVAR_O3DE_PROJECT_PATH, + _PATH_O3DE_PROJECT = Path(os.getenv(ENVAR_PATH_O3DE_PROJECT, Path(_O3DE_DEV, _O3DE_PROJECT))) - _SYNTH_ENV_DICT[ENVAR_O3DE_PROJECT_PATH] = _O3DE_PROJECT_PATH.as_posix() + _SYNTH_ENV_DICT[ENVAR_PATH_O3DE_PROJECT] = _PATH_O3DE_PROJECT.as_posix() # -- envar -- - _DCCSIG_PATH = resolve_envar_path(ENVAR_DCCSIG_PATH, # envar + _PATH_DCCSIG = resolve_envar_path(ENVAR_PATH_DCCSIG, # envar _THIS_MODULE_PATH, # search path STUB_O3DE_ROOT_DCCSI, # stub name TAG_DEFAULT_PROJECT) # dir - _SYNTH_ENV_DICT[ENVAR_DCCSIG_PATH] = _DCCSIG_PATH.as_posix() + _SYNTH_ENV_DICT[ENVAR_PATH_DCCSIG] = _PATH_DCCSIG.as_posix() # -- envar -- _AZPY_PATH = Path(os.getenv(ENVAR_DCCSI_AZPY_PATH, - Path(_DCCSIG_PATH, TAG_DIR_DCCSI_AZPY))) + Path(_PATH_DCCSIG, TAG_DIR_DCCSI_AZPY))) _SYNTH_ENV_DICT[ENVAR_DCCSI_AZPY_PATH] = _AZPY_PATH.as_posix() # -- envar -- - _DCCSI_TOOLS_PATH = Path(os.getenv(ENVAR_DCCSI_TOOLS_PATH, - Path(_DCCSIG_PATH, TAG_DIR_DCCSI_TOOLS))) - _SYNTH_ENV_DICT[ENVAR_DCCSI_TOOLS_PATH] = _DCCSI_TOOLS_PATH.as_posix() + _PATH_DCCSI_TOOLS = Path(os.getenv(ENVAR_PATH_DCCSI_TOOLS, + Path(_PATH_DCCSIG, TAG_DIR_DCCSI_TOOLS))) + _SYNTH_ENV_DICT[ENVAR_PATH_DCCSI_TOOLS] = _PATH_DCCSI_TOOLS.as_posix() # -- envar -- # external dccsi site-packages - _DCCSI_PYTHON_LIB_PATH = Path(os.getenv(ENVAR_DCCSI_PYTHON_LIB_PATH, - PATH_DCCSI_PYTHON_LIB_PATH)) - _SYNTH_ENV_DICT[ENVAR_DCCSI_PYTHON_LIB_PATH] = _DCCSI_PYTHON_LIB_PATH.as_posix() + _PATH_DCCSI_PYTHON_LIB = Path(os.getenv(ENVAR_PATH_DCCSI_PYTHON_LIB, + PATH_DCCSI_PYTHON_LIB)) + _SYNTH_ENV_DICT[ENVAR_PATH_DCCSI_PYTHON_LIB] = _PATH_DCCSI_PYTHON_LIB.as_posix() # -- envar -- # extend to py36 (conda env) and interpreter (wrapped as a .bat file) - _DEFAULT_PY_PATH = Path(_DCCSIG_PATH, TAG_DEFAULT_PY) + _DEFAULT_PY_PATH = Path(_PATH_DCCSIG, TAG_DEFAULT_PY) _DEFAULT_PY_PATH = Path(os.getenv(ENVAR_DCCSI_PY_DEFAULT, _DEFAULT_PY_PATH)) _SYNTH_ENV_DICT[ENVAR_DCCSI_PY_DEFAULT] = _DEFAULT_PY_PATH.as_posix() @@ -507,16 +507,16 @@ def init_ly_pyside(env_dict=_SYNTH_ENV_DICT): sys.path.insert(1, str(QTFORPYTHON_PATH)) site.addsitedir(str(QTFORPYTHON_PATH)) - O3DE_BIN_PATH = Path.joinpath(O3DE_DEV, - 'windows_vs2019', + PATH_O3DE_BIN = Path.joinpath(O3DE_DEV, + 'windows', 'bin', 'profile').resolve() - os.environ["DYNACONF_O3DE_BIN_PATH"] = str(O3DE_BIN_PATH) - os.environ["O3DE_BIN_PATH"] = str(O3DE_BIN_PATH) - site.addsitedir(str(O3DE_BIN_PATH)) - sys.path.insert(1, str(O3DE_BIN_PATH)) + os.environ["DYNACONF_PATH_O3DE_BIN"] = str(PATH_O3DE_BIN) + os.environ["PATH_O3DE_BIN"] = str(PATH_O3DE_BIN) + site.addsitedir(str(PATH_O3DE_BIN)) + sys.path.insert(1, str(PATH_O3DE_BIN)) - QT_PLUGIN_PATH = Path.joinpath(O3DE_BIN_PATH, + QT_PLUGIN_PATH = Path.joinpath(PATH_O3DE_BIN, 'EditorPlugins').resolve() os.environ["DYNACONF_QT_PLUGIN_PATH"] = str(QT_PLUGIN_PATH) os.environ["QT_PLUGIN_PATH"] = str(QT_PLUGIN_PATH) @@ -534,7 +534,7 @@ def init_ly_pyside(env_dict=_SYNTH_ENV_DICT): if sys.platform.startswith('win'): path = os.environ['PATH'] newPath = '' - newPath += str(O3DE_BIN_PATH) + os.pathsep + newPath += str(PATH_O3DE_BIN) + os.pathsep newPath += str(Path.joinpath(QTFORPYTHON_PATH, 'shiboken2').resolve()) + os.pathsep newPath += str(Path.joinpath(QTFORPYTHON_PATH, @@ -675,7 +675,7 @@ if __name__ == '__main__': if _DCCSI_GDEBUG: - tempBoxJsonFilePath = Path(_SYNTH_ENV_DICT['DCCSIG_PATH'], '.temp') + tempBoxJsonFilePath = Path(_SYNTH_ENV_DICT['PATH_DCCSIG'], '.temp') tempBoxJsonFilePath = Path(tempBoxJsonFilePath, 'boxDumpTest.json') _LOGGER.info(f'tempBoxJsonFilePath: {tempBoxJsonFilePath}') diff --git a/Gems/AtomLyIntegration/TechnicalArt/DccScriptingInterface/azpy/test/entry_test.py b/Gems/AtomLyIntegration/TechnicalArt/DccScriptingInterface/azpy/test/entry_test.py index aad440d11f..d1ba5fbd10 100755 --- a/Gems/AtomLyIntegration/TechnicalArt/DccScriptingInterface/azpy/test/entry_test.py +++ b/Gems/AtomLyIntegration/TechnicalArt/DccScriptingInterface/azpy/test/entry_test.py @@ -7,10 +7,8 @@ # SPDX-License-Identifier: Apache-2.0 OR MIT # # -# -- This line is 75 characters ------------------------------------------- -from __future__ import unicode_literals - # ------------------------------------------------------------------------- +from __future__ import unicode_literals import os import site import logging as _logging @@ -19,27 +17,42 @@ import logging as _logging # See example: #"dev\Gems\AtomLyIntegration\TechnicalArt\DccScriptingInterface\SDK\Lumberyard\Scripts\set_menu.py" from pathlib import Path +# ------------------------------------------------------------------------- + # ------------------------------------------------------------------------- +# global scope +_MODULENAME = 'azpy.test.entry_test' _BOOT_CHECK = False # set true to test breakpoint in this module directly -import azpy.env_bool as env_bool +from azpy.env_bool import env_bool from azpy.constants import ENVAR_DCCSI_GDEBUG from azpy.constants import ENVAR_DCCSI_DEV_MODE +from azpy.constants import ENVAR_DCCSI_LOGLEVEL +from azpy.constants import ENVAR_DCCSI_GDEBUGGER from azpy.constants import FRMT_LOG_LONG -_DCCSI_GDEBUG = env_bool.env_bool(ENVAR_DCCSI_GDEBUG, False) -_DCCSI_DEV_MODE = env_bool.env_bool(ENVAR_DCCSI_DEV_MODE, False) - -_MODULENAME = __name__ -if _MODULENAME is '__main__': - _MODULENAME = 'azpy.test.entry_test' +_DCCSI_GDEBUG = env_bool(ENVAR_DCCSI_GDEBUG, False) +_DCCSI_DEV_MODE = env_bool(ENVAR_DCCSI_DEV_MODE, False) +_DCCSI_GDEBUGGER = env_bool(ENVAR_DCCSI_GDEBUGGER, 'WING') +# default loglevel to info unless set +_DCCSI_LOGLEVEL = int(env_bool(ENVAR_DCCSI_LOGLEVEL, _logging.INFO)) +if _DCCSI_GDEBUG: + # override loglevel if runnign debug + _DCCSI_LOGLEVEL = _logging.DEBUG + # set up module logging -for handler in _logging.root.handlers[:]: - _logging.root.removeHandler(handler) +#for handler in _logging.root.handlers[:]: + #_logging.root.removeHandler(handler) + +# configure basic logger +# note: not using a common logger to reduce cyclical imports +_logging.basicConfig(level=_DCCSI_LOGLEVEL, + format=FRMT_LOG_LONG, + datefmt='%m-%d %H:%M') + _LOGGER = _logging.getLogger(_MODULENAME) -_logging.basicConfig(format=FRMT_LOG_LONG) _LOGGER.debug('Initializing: {0}.'.format({_MODULENAME})) # ------------------------------------------------------------------------- diff --git a/Gems/AtomLyIntegration/TechnicalArt/DccScriptingInterface/config.py b/Gems/AtomLyIntegration/TechnicalArt/DccScriptingInterface/config.py index 5578bcd577..33dd3f7810 100755 --- a/Gems/AtomLyIntegration/TechnicalArt/DccScriptingInterface/config.py +++ b/Gems/AtomLyIntegration/TechnicalArt/DccScriptingInterface/config.py @@ -38,6 +38,63 @@ except: # ------------------------------------------------------------------------- +# ------------------------------------------------------------------------- +# global scope +_MODULENAME = 'DCCsi.config' + +#os.environ['PYTHONINSPECT'] = 'True' +_MODULE_PATH = os.path.abspath(__file__) + +# we don't have access yet to the DCCsi Lib\site-packages +# (1) this will give us import access to azpy (always?) +_PATH_DCCSIG = os.getenv('PATH_DCCSIG', + os.path.abspath(os.path.dirname(_MODULE_PATH))) +os. environ['PATH_DCCSIG'] = _PATH_DCCSIG +# ^ we assume this config is in the root of the DCCsi +# if it's not, be sure to set envar 'PATH_DCCSIG' to ensure it +site.addsitedir(_PATH_DCCSIG) # must be done for azpy +# ------------------------------------------------------------------------- + + +# ------------------------------------------------------------------------- +# now we have azpy api access +import azpy +from azpy.env_bool import env_bool +from azpy.constants import ENVAR_DCCSI_GDEBUG +from azpy.constants import ENVAR_DCCSI_DEV_MODE +from azpy.constants import ENVAR_DCCSI_LOGLEVEL +from azpy.constants import ENVAR_DCCSI_GDEBUGGER +from azpy.constants import FRMT_LOG_LONG + +_DCCSI_GDEBUG = env_bool(ENVAR_DCCSI_GDEBUG, False) +_DCCSI_DEV_MODE = env_bool(ENVAR_DCCSI_DEV_MODE, False) +_DCCSI_GDEBUGGER = env_bool(ENVAR_DCCSI_GDEBUGGER, 'WING') + +# default loglevel to info unless set +_DCCSI_LOGLEVEL = int(env_bool(ENVAR_DCCSI_LOGLEVEL, _logging.INFO)) +if _DCCSI_GDEBUG: + # override loglevel if runnign debug + _DCCSI_LOGLEVEL = _logging.DEBUG + +# set up module logging +#for handler in _logging.root.handlers[:]: + #_logging.root.removeHandler(handler) + +# configure basic logger +# note: not using a common logger to reduce cyclical imports +_logging.basicConfig(level=_DCCSI_LOGLEVEL, + format=FRMT_LOG_LONG, + datefmt='%m-%d %H:%M') + +_LOGGER = _logging.getLogger(_MODULENAME) +_LOGGER.debug('Initializing: {}.'.format({_MODULENAME})) +_LOGGER.debug('site.addsitedir({})'.format(_PATH_DCCSIG)) +_LOGGER.debug('_DCCSI_GDEBUG: {}'.format(_DCCSI_GDEBUG)) +_LOGGER.debug('_DCCSI_DEV_MODE: {}'.format(_DCCSI_DEV_MODE)) +_LOGGER.debug('_DCCSI_LOGLEVEL: {}'.format(_DCCSI_LOGLEVEL)) +# ------------------------------------------------------------------------- + + # ------------------------------------------------------------------------- def attach_debugger(): _DCCSI_GDEBUG = True @@ -53,63 +110,9 @@ def attach_debugger(): # ------------------------------------------------------------------------- -# ------------------------------------------------------------------------- -# global scope -_MODULENAME = __name__ -if _MODULENAME is '__main__': - _MODULENAME = 'DCCsi.config' - -#os.environ['PYTHONINSPECT'] = 'True' -_MODULE_PATH = os.path.abspath(__file__) - -# we don't have access yet to the DCCsi Lib\site-packages -# (1) this will give us import access to azpy (always?) -_DCCSI_PATH = os.getenv('DCCSI_PATH', - os.path.abspath(os.path.dirname(_MODULE_PATH))) -# ^ we assume this config is in the root of the DCCsi -# if it's not, be sure to set envar 'DCCSI_PATH' to ensure it -site.addsitedir(_DCCSI_PATH) # must be done for azpy - -# now we have azpy api access -import azpy -from azpy.env_bool import env_bool -from azpy.constants import ENVAR_DCCSI_GDEBUG -from azpy.constants import ENVAR_DCCSI_DEV_MODE -from azpy.constants import ENVAR_DCCSI_LOGLEVEL - -# set up global space, logging etc. -# set these true if you want them set globally for debugging -_DCCSI_GDEBUG = env_bool(ENVAR_DCCSI_GDEBUG, False) -_DCCSI_DEV_MODE = env_bool(ENVAR_DCCSI_DEV_MODE, False) -_DCCSI_LOGLEVEL = int(env_bool(ENVAR_DCCSI_LOGLEVEL, int(20))) -if _DCCSI_GDEBUG: - _DCCSI_LOGLEVEL = int(10) - -# early attach WingIDE debugger (can refactor to include other IDEs later) -# requires externally enabling via ENVAR -if _DCCSI_DEV_MODE: - _debugger = attach_debugger() -# to do: ^ this should be replaced with full featured azpy.dev.util -# that supports additional debuggers (pycharm, vscode, etc.) - -# set up module logging -for handler in _logging.root.handlers[:]: - _logging.root.removeHandler(handler) - -_LOGGER = azpy.initialize_logger(_MODULENAME, - log_to_file=_DCCSI_GDEBUG, - default_log_level=_DCCSI_LOGLEVEL) -_LOGGER.debug('Initializing: {0}.'.format({_MODULENAME})) -_LOGGER.info('site.addsitedir({})'.format(_DCCSI_PATH)) -_LOGGER.debug('_DCCSI_GDEBUG: {}'.format(_DCCSI_GDEBUG)) -_LOGGER.debug('_DCCSI_DEV_MODE: {}'.format(_DCCSI_DEV_MODE)) -_LOGGER.debug('_DCCSI_LOGLEVEL: {}'.format(_DCCSI_LOGLEVEL)) -# ------------------------------------------------------------------------- - - # ------------------------------------------------------------------------- # this will give us import access to additional modules we provide with DCCsi -_DCCSI_PYTHON_LIB_PATH = azpy.config_utils.bootstrap_dccsi_py_libs(_DCCSI_PATH) +_PATH_DCCSI_PYTHON_LIB = azpy.config_utils.bootstrap_dccsi_py_libs(_PATH_DCCSIG) # Now we should be able to just carry on with pth lib and dynaconf from dynaconf import Dynaconf @@ -119,60 +122,56 @@ except: import pathlib2 as pathlib from pathlib import Path -_DCCSI_PATH = Path(_DCCSI_PATH) # pathify -_DCCSI_PYTHON_PATH = Path(_DCCSI_PATH,'3rdParty','Python') -_DCCSI_PYTHON_LIB_PATH = Path(_DCCSI_PYTHON_LIB_PATH) +_PATH_DCCSIG = Path(_PATH_DCCSIG) # pathify +_PATH_DCCSI_PYTHON = Path(_PATH_DCCSIG,'3rdParty','Python') +_PATH_DCCSI_PYTHON_LIB = Path(_PATH_DCCSI_PYTHON_LIB) # ------------------------------------------------------------------------- # ------------------------------------------------------------------------- # start locally prepping known default values for dyanmic environment settings -_O3DE_DCCSI_PATH = os.environ['PATH'] -os.environ["DYNACONF_PATH"] = _O3DE_DCCSI_PATH +_O3DE_PATH_DCCSIG = os.environ['PATH'] +os.environ["DYNACONF_PATH"] = _O3DE_PATH_DCCSIG # this will retreive the O3DE engine root _O3DE_DEV = azpy.config_utils.get_o3de_engine_root() # set up dynamic config envars os.environ["DYNACONF_O3DE_DEV"] = str(_O3DE_DEV.resolve()) -from azpy.constants import TAG_DIR_O3DE_BUILD_FOLDER -_O3DE_BUILD_FOLDER = TAG_DIR_O3DE_BUILD_FOLDER -os.environ["DYNACONF_O3DE_BUILD_FOLDER"] = str(_O3DE_BUILD_FOLDER) -_O3DE_BUILD_PATH = Path(_O3DE_DEV, TAG_DIR_O3DE_BUILD_FOLDER) -os.environ["DYNACONF_O3DE_BUILD_PATH"] = str(_O3DE_BUILD_PATH.resolve()) +_PATH_O3DE_BUILD = azpy.config_utils.get_o3de_build_path(_O3DE_DEV,'CMakeCache.txt') -from azpy.constants import STR_O3DE_BIN_PATH -_O3DE_BIN_PATH = Path(STR_O3DE_BIN_PATH.format(_O3DE_BUILD_PATH)) -os.environ["DYNACONF_O3DE_BIN_PATH"] = str(_O3DE_BIN_PATH.resolve()) +from azpy.constants import STR_PATH_O3DE_BIN +_PATH_O3DE_BIN = Path(STR_PATH_O3DE_BIN.format(_PATH_O3DE_BUILD)) +os.environ["DYNACONF_PATH_O3DE_BIN"] = str(_PATH_O3DE_BIN.resolve()) # this in most cases will return the project folder # if it returns a matching engine folder then we don't know the project folder -_O3DE_PROJECT_PATH = azpy.config_utils.get_o3de_project_path() -os.environ["DYNACONF_O3DE_PROJECT_PATH"] = str(_O3DE_PROJECT_PATH.resolve()) +_PATH_O3DE_PROJECT = azpy.config_utils.get_o3de_project_path() +os.environ["DYNACONF_PATH_O3DE_PROJECT"] = str(_PATH_O3DE_PROJECT.resolve()) # special, a home for stashing PYTHONPATHs into managed settings _O3DE_PYTHONPATH = list() -_O3DE_PYTHONPATH.append(_DCCSI_PATH) +_O3DE_PYTHONPATH.append(_PATH_DCCSIG) # ------------------------------------------------------------------------- # ------------------------------------------------------------------------- -def init_o3de_pyside2(dccsi_path=_DCCSI_PATH, - engine_bin=_O3DE_BIN_PATH): +def init_o3de_pyside2(dccsi_path=_PATH_DCCSIG, + engine_bin=_PATH_O3DE_BIN): """Initialize the DCCsi Qt/PySide dynamic env and settings sets access to lumberyards Qt dlls and PySide""" - _DCCSI_PATH = Path(dccsi_path) - _O3DE_BIN_PATH = Path(engine_bin) + _PATH_DCCSIG = Path(dccsi_path) + _PATH_O3DE_BIN = Path(engine_bin) - if not _O3DE_BIN_PATH.exists(): - raise Exception('_O3DE_BIN_PATH does NOT exist: {0}'.format(_O3DE_BIN_PATH)) + if not _PATH_O3DE_BIN.exists(): + raise Exception('_PATH_O3DE_BIN does NOT exist: {0}'.format(_PATH_O3DE_BIN)) else: pass # python config - _DCCSI_PYTHON_PATH = Path(_DCCSI_PATH,'3rdParty','Python') - os.environ["DYNACONF_DCCSI_PYTHON_PATH"] = str(_DCCSI_PYTHON_PATH.resolve()) + _PATH_DCCSI_PYTHON = Path(_PATH_DCCSIG,'3rdParty','Python') + os.environ["DYNACONF_PATH_DCCSI_PYTHON"] = str(_PATH_DCCSI_PYTHON.resolve()) # # allows to retreive from settings.QTFORPYTHON_PATH # from azpy.constants import STR_QTFORPYTHON_PATH # a path string constructor @@ -180,7 +179,7 @@ def init_o3de_pyside2(dccsi_path=_DCCSI_PATH, # os.environ["DYNACONF_QTFORPYTHON_PATH"] = str(QTFORPYTHON_PATH) # site.addsitedir(str(QTFORPYTHON_PATH)) # PYTHONPATH - QT_PLUGIN_PATH = Path.joinpath(_O3DE_BIN_PATH,'EditorPlugins') + QT_PLUGIN_PATH = Path.joinpath(_PATH_O3DE_BIN,'EditorPlugins') os.environ["DYNACONF_QT_PLUGIN_PATH"] = str(QT_PLUGIN_PATH.resolve()) os.environ['PATH'] = QT_PLUGIN_PATH.as_posix() + os.pathsep + os.environ['PATH'] @@ -224,7 +223,7 @@ def init_o3de_pyside2(dccsi_path=_DCCSI_PATH, # have not done that yet as I really want to get legal approval and # add this to the QtForPython Gem # please pass this in current code reviews - _DCCSI_PYSIDE2_TOOLS = Path(_DCCSI_PYTHON_PATH,'pyside2-tools') + _DCCSI_PYSIDE2_TOOLS = Path(_PATH_DCCSI_PYTHON,'pyside2-tools') if _DCCSI_PYSIDE2_TOOLS.exists(): os.environ["DYNACONF_DCCSI_PYSIDE2_TOOLS"] = str(_DCCSI_PYSIDE2_TOOLS.resolve()) os.environ['PATH'] = _DCCSI_PYSIDE2_TOOLS.as_posix() + os.pathsep + os.environ['PATH'] @@ -242,10 +241,10 @@ def init_o3de_pyside2(dccsi_path=_DCCSI_PATH, status = False raise(e) else: - _LOGGER.warning('~ No PySide2 Tools: {}'.format(_DCCSI_PYSIDE2_TOOLS.resolve)) + _LOGGER.warning('~ No PySide2 Tools: {}'.format(_DCCSI_PYSIDE2_TOOLS.resolve())) - _O3DE_DCCSI_PATH = os.environ['PATH'] - os.environ["DYNACONF_PATH"] = _O3DE_DCCSI_PATH + _O3DE_PATH_DCCSIG = os.environ['PATH'] + os.environ["DYNACONF_PATH"] = _O3DE_PATH_DCCSIG try: _DCCSI_PYTHONPATH = os.environ['PYTHONPATH'] @@ -287,9 +286,8 @@ def test_pyside2(): # ------------------------------------------------------------------------- def init_o3de_core(engine_path=_O3DE_DEV, - build_folder=_O3DE_BUILD_FOLDER, project_name=None, - project_path=_O3DE_PROJECT_PATH): + project_path=_PATH_O3DE_PROJECT): """Initialize the DCCsi Core dynamic env and settings""" # `envvar_prefix` = export envvars with `export DYNACONF_FOO=bar`. # `settings_files` = Load this files in the order. @@ -306,70 +304,69 @@ def init_o3de_core(engine_path=_O3DE_DEV, os.environ["DYNACONF_DCCSI_DEV_MODE"] = str(_DCCSI_DEV_MODE) os.environ['DYNACONF_DCCSI_LOGLEVEL'] = str(_DCCSI_LOGLEVEL) - os.environ["DYNACONF_DCCSI_PATH"] = str(_DCCSI_PATH.resolve()) - os.environ['PATH'] = _DCCSI_PATH.as_posix() + os.pathsep + os.environ['PATH'] + os.environ["DYNACONF_PATH_DCCSIG"] = str(_PATH_DCCSIG.resolve()) + os.environ['PATH'] = _PATH_DCCSIG.as_posix() + os.pathsep + os.environ['PATH'] # we already defaulted to discovering these two early because of importance #os.environ["DYNACONF_O3DE_DEV"] = str(_O3DE_DEV.resolve()) - #os.environ["DYNACONF_O3DE_PROJECT_PATH"] = str(_O3DE_PROJECT_PATH) + #os.environ["DYNACONF_PATH_O3DE_PROJECT"] = str(_PATH_O3DE_PROJECT) # we also already added them to DYNACONF_ # this in an explicit pass in if project_path: _project_path = Path(project_path) try: _project_path.exists() - _O3DE_PROJECT_PATH = _project_path - os.environ["DYNACONF_O3DE_PROJECT_PATH"] = str(_O3DE_PROJECT_PATH.resolve()) + _PATH_O3DE_PROJECT = _project_path + os.environ["DYNACONF_PATH_O3DE_PROJECT"] = str(_PATH_O3DE_PROJECT.resolve()) except FileExistsError as e: _LOGGER.error('~ The project path specified does not appear to exist!') _LOGGER.warning('~ project_path: {}'.format(project_path)) _LOGGER.warning('~ fallback to engine root: {}'.format()) project_path = _O3DE_DEV - os.environ["DYNACONF_O3DE_PROJECT_PATH"] = str(_O3DE_DEV.resolve()) + os.environ["DYNACONF_PATH_O3DE_PROJECT"] = str(_O3DE_DEV.resolve()) # we can pull the O3DE_PROJECT (name) from the project path if not project_name: - project_name = Path(_O3DE_PROJECT_PATH).name + project_name = Path(_PATH_O3DE_PROJECT).name os.environ["DYNACONF_O3DE_PROJECT"] = str(project_name) # To Do: there might be a project namespace in the project.json? # -- O3DE build -- set up \bin\path (for Qt dll access) - os.environ["DYNACONF_O3DE_BUILD_FOLDER"] = str(build_folder) - _O3DE_BUILD_PATH = Path(_O3DE_DEV, build_folder) + _PATH_O3DE_BUILD = Path(azpy.config_utils.get_o3de_build_path(_O3DE_DEV, + 'CMakeCache.txt')) + os.environ["DYNACONF_PATH_O3DE_BUILD"] = str(_PATH_O3DE_BUILD.resolve()) - os.environ["DYNACONF_O3DE_BUILD_PATH"] = str(_O3DE_BUILD_PATH.resolve()) - - _O3DE_BIN_PATH = Path(STR_O3DE_BIN_PATH.format(_O3DE_BUILD_PATH)) - os.environ["DYNACONF_O3DE_BIN_PATH"] = str(_O3DE_BIN_PATH.resolve()) + _PATH_O3DE_BIN = Path(STR_PATH_O3DE_BIN.format(_PATH_O3DE_BUILD)) + os.environ["DYNACONF_PATH_O3DE_BIN"] = str(_PATH_O3DE_BIN.resolve()) # hard check - if not _O3DE_BIN_PATH.exists(): - raise Exception('O3DE_BIN_PATH does NOT exist: {0}'.format(_O3DE_BIN_PATH)) + if not _PATH_O3DE_BIN.exists(): + raise Exception('PATH_O3DE_BIN does NOT exist: {0}'.format(_PATH_O3DE_BIN)) else: # adding to sys.path apparently doesn't work for .dll locations like Qt - os.environ['PATH'] = _O3DE_BIN_PATH.as_posix() + os.pathsep + os.environ['PATH'] + os.environ['PATH'] = _PATH_O3DE_BIN.as_posix() + os.pathsep + os.environ['PATH'] # -- from azpy.constants import TAG_DIR_DCCSI_TOOLS - _DCCSI_TOOLS_PATH = Path(_DCCSI_PATH, TAG_DIR_DCCSI_TOOLS) - os.environ["DYNACONF_DCCSI_TOOLS_PATH"] = str(_DCCSI_TOOLS_PATH.resolve()) + _PATH_DCCSI_TOOLS = Path(_PATH_DCCSIG, TAG_DIR_DCCSI_TOOLS) + os.environ["DYNACONF_PATH_DCCSI_TOOLS"] = str(_PATH_DCCSI_TOOLS.resolve()) from azpy.constants import TAG_DCCSI_NICKNAME from azpy.constants import PATH_DCCSI_LOG_PATH - _DCCSI_LOG_PATH = Path(PATH_DCCSI_LOG_PATH.format(O3DE_PROJECT_PATH=project_path, + _DCCSI_LOG_PATH = Path(PATH_DCCSI_LOG_PATH.format(PATH_O3DE_PROJECT=project_path, TAG_DCCSI_NICKNAME=TAG_DCCSI_NICKNAME)) os.environ["DYNACONF_DCCSI_LOG_PATH"] = str(_DCCSI_LOG_PATH) from azpy.constants import TAG_DIR_REGISTRY, TAG_DCCSI_CONFIG - _DCCSI_CONFIG_PATH = Path(project_path, TAG_DIR_REGISTRY, TAG_DCCSI_CONFIG) - os.environ["DYNACONF_DCCSI_CONFIG_PATH"] = str(_DCCSI_CONFIG_PATH.resolve()) + _PATH_DCCSI_CONFIG = Path(project_path, TAG_DIR_REGISTRY, TAG_DCCSI_CONFIG) + os.environ["DYNACONF_PATH_DCCSI_CONFIG"] = str(_PATH_DCCSI_CONFIG.resolve()) from azpy.constants import TAG_DIR_DCCSI_TOOLS - _DCCSIG_TOOLS_PATH = Path.joinpath(_DCCSI_PATH, TAG_DIR_DCCSI_TOOLS) + _DCCSIG_TOOLS_PATH = Path.joinpath(_PATH_DCCSIG, TAG_DIR_DCCSI_TOOLS) os.environ["DYNACONF_DCCSIG_TOOLS_PATH"] = str(_DCCSIG_TOOLS_PATH.resolve()) - _O3DE_DCCSI_PATH = os.environ['PATH'] - os.environ["DYNACONF_PATH"] = _O3DE_DCCSI_PATH + _O3DE_PATH_DCCSIG = os.environ['PATH'] + os.environ["DYNACONF_PATH"] = _O3DE_PATH_DCCSIG from dynaconf import settings @@ -381,26 +378,26 @@ def init_o3de_core(engine_path=_O3DE_DEV, # ------------------------------------------------------------------------- def init_o3de_python(engine_path=_O3DE_DEV, - engine_bin=_O3DE_BIN_PATH, - dccsi_path=_DCCSI_PATH): + engine_bin=_PATH_O3DE_BIN, + dccsi_path=_PATH_DCCSIG): # pathify _O3DE_DEV = Path(engine_path) - _O3DE_BIN_PATH = Path(engine_bin) - _DCCSI_PATH = Path(dccsi_path) + _PATH_O3DE_BIN = Path(engine_bin) + _PATH_DCCSIG = Path(dccsi_path) # python config - _DCCSI_PYTHON_PATH = Path(_DCCSI_PATH,'3rdParty','Python') - os.environ["DYNACONF_DCCSI_PYTHON_PATH"] = str(_DCCSI_PYTHON_PATH.resolve()) + _PATH_DCCSI_PYTHON = Path(_PATH_DCCSIG,'3rdParty','Python') + os.environ["DYNACONF_PATH_DCCSI_PYTHON"] = str(_PATH_DCCSI_PYTHON.resolve()) - _DCCSI_PYTHON_LIB_PATH = azpy.config_utils.bootstrap_dccsi_py_libs(_DCCSI_PATH) - os.environ["DYNACONF_DCCSI_PYTHON_LIB_PATH"] = str(_DCCSI_PYTHON_LIB_PATH.resolve()) - os.environ['PATH'] = _DCCSI_PYTHON_LIB_PATH.as_posix() + os.pathsep + os.environ['PATH'] - site.addsitedir(_DCCSI_PYTHON_LIB_PATH) - _O3DE_PYTHONPATH.append(_DCCSI_PYTHON_LIB_PATH.resolve()) + _PATH_DCCSI_PYTHON_LIB = azpy.config_utils.bootstrap_dccsi_py_libs(_PATH_DCCSIG) + os.environ["DYNACONF_PATH_DCCSI_PYTHON_LIB"] = str(_PATH_DCCSI_PYTHON_LIB.resolve()) + os.environ['PATH'] = _PATH_DCCSI_PYTHON_LIB.as_posix() + os.pathsep + os.environ['PATH'] + site.addsitedir(_PATH_DCCSI_PYTHON_LIB) + _O3DE_PYTHONPATH.append(_PATH_DCCSI_PYTHON_LIB.resolve()) - site.addsitedir(_O3DE_BIN_PATH) - _O3DE_PYTHONPATH.append(_O3DE_BIN_PATH.resolve()) + site.addsitedir(_PATH_O3DE_BIN) + _O3DE_PYTHONPATH.append(_PATH_O3DE_BIN.resolve()) _O3DE_PY_EXE = Path(sys.executable) _DCCSI_PY_IDE = Path(_O3DE_PY_EXE) @@ -411,24 +408,24 @@ def init_o3de_python(engine_path=_O3DE_DEV, os.environ['PATH'] = _O3DE_PYTHONHOME.as_posix() + os.pathsep + os.environ['PATH'] _LOGGER.info('~ O3DE_PYTHONHOME - is now the folder containing O3DE python executable') - _O3DE_PYTHON_INSTALL = Path(_O3DE_DEV, 'python') - os.environ["DYNACONF_O3DE_PYTHON_INSTALL"] = str(_O3DE_PYTHON_INSTALL.resolve()) - os.environ['PATH'] = _O3DE_PYTHON_INSTALL.as_posix() + os.pathsep + os.environ['PATH'] + _PATH_O3DE_PYTHON_INSTALL = Path(_O3DE_DEV, 'python') + os.environ["DYNACONF_PATH_O3DE_PYTHON_INSTALL"] = str(_PATH_O3DE_PYTHON_INSTALL.resolve()) + os.environ['PATH'] = _PATH_O3DE_PYTHON_INSTALL.as_posix() + os.pathsep + os.environ['PATH'] if sys.platform.startswith('win'): - _DCCSI_PY_BASE = Path(_O3DE_PYTHON_INSTALL, 'python.cmd') + _DCCSI_PY_BASE = Path(_PATH_O3DE_PYTHON_INSTALL, 'python.cmd') elif sys.platform == "linux": - _DCCSI_PY_BASE = Path(_O3DE_PYTHON_INSTALL, 'python.sh') + _DCCSI_PY_BASE = Path(_PATH_O3DE_PYTHON_INSTALL, 'python.sh') elif sys.platform == "darwin": - _DCCSI_PY_BASE = Path(_O3DE_PYTHON_INSTALL, 'python.sh') + _DCCSI_PY_BASE = Path(_PATH_O3DE_PYTHON_INSTALL, 'python.sh') else: _DCCSI_PY_BASE = None if _DCCSI_PY_BASE: os.environ["DYNACONF_DCCSI_PY_BASE"] = str(_DCCSI_PY_BASE.resolve()) - _O3DE_DCCSI_PATH = os.environ['PATH'] - os.environ["DYNACONF_PATH"] = _O3DE_DCCSI_PATH + _O3DE_PATH_DCCSIG = os.environ['PATH'] + os.environ["DYNACONF_PATH"] = _O3DE_PATH_DCCSIG try: _DCCSI_PYTHONPATH = os.environ['PYTHONPATH'] @@ -447,23 +444,21 @@ def init_o3de_python(engine_path=_O3DE_DEV, # ------------------------------------------------------------------------- # settings.setenv() # doing this will add the additional DYNACONF_ envars def get_config_settings(engine_path=_O3DE_DEV, - build_folder=_O3DE_BUILD_FOLDER, project_name=None, - project_path=_O3DE_PROJECT_PATH, + project_path=_PATH_O3DE_PROJECT, enable_o3de_python=None, enable_o3de_pyside2=None, set_env=True): """Convenience method to initialize and retreive settings directly from module.""" settings = init_o3de_core(engine_path, - build_folder, project_name, project_path) if enable_o3de_python: settings = init_o3de_python(settings.O3DE_DEV, - settings.O3DE_BIN_PATH, - settings.DCCSI_PATH) + settings.PATH_O3DE_BIN, + settings.PATH_DCCSIG) # These should ONLY be set for O3DE and non-DCC environments # They will most likely cause other Qt/PySide DCC apps to fail @@ -474,8 +469,8 @@ def get_config_settings(engine_path=_O3DE_DEV, # assume our standalone python tools wants this access? # it's safe to do this for dev and from ide if enable_o3de_pyside2: - settings = init_o3de_pyside2(settings.DCCSI_PATH, - settings.O3DE_BIN_PATH) + settings = init_o3de_pyside2(settings.PATH_DCCSIG, + settings.PATH_O3DE_BIN) # now standalone we can validate the config. env, settings. from dynaconf import settings @@ -489,11 +484,11 @@ def get_config_settings(engine_path=_O3DE_DEV, # Main Code Block, runs this script as main (testing) # ------------------------------------------------------------------------- if __name__ == '__main__': - """Run this file as a standalone cli script""" + """Run this file as a standalone cli script for testing/debugging""" + import time + start = time.process_time() # start tracking - _MODULENAME = __name__ - if _MODULENAME is '__main__': - _MODULENAME = 'DCCsi.config' + _MODULENAME = 'DCCsi.config' from azpy.constants import STR_CROSSBAR @@ -508,7 +503,7 @@ if __name__ == '__main__': # happy print _LOGGER.info(STR_CROSSBAR) - _LOGGER.info('~ constants.py ... Running script as __main__') + _LOGGER.info('~ {}.py ... Running script as __main__'.format(_MODULENAME)) _LOGGER.info(STR_CROSSBAR) # go ahead and run the rest of the configuration @@ -521,6 +516,10 @@ if __name__ == '__main__': type=bool, required=False, help='Enables global debug flag.') + parser.add_argument('-sd', '--set-debugger', + type=str, + required=False, + help='Default debugger: WING, others: PYCHARM, VSCODE (not yet implemented).') parser.add_argument('-dm', '--developer-mode', type=bool, required=False, @@ -532,7 +531,7 @@ if __name__ == '__main__': parser.add_argument('-bf', '--build-folder', type=str, required=False, - help='The name (tag) of the o3de build folder, example build or windows_vs2019.') + help='The name (tag) of the o3de build folder, example build or windows.') parser.add_argument('-pp', '--project-path', type=pathlib.Path, required=False, @@ -549,10 +548,6 @@ if __name__ == '__main__': type=bool, required=False, help='Enables O3DE Qt\PySide2 access.') - parser.add_argument('-sd', '--set-debugger', - type=str, - required=False, - help='Default debugger: WING, others: PYCHARM, VSCODE (not yet implemented).') parser.add_argument('-pc', '--project-config', type=bool, required=False, @@ -575,13 +570,15 @@ if __name__ == '__main__': if args.global_debug: _DCCSI_GDEBUG = True os.environ["DYNACONF_DCCSI_GDEBUG"] = str(_DCCSI_GDEBUG) - if args.developer_mode: - attach_debugger() # attempts to start debugger if args.set_debugger: - _LOGGER.info('Setting and switching debugger type from WingIDE not implemented.') + _LOGGER.info('Setting and switching debugger type not implemented (default=WING)') # To Do: implement debugger plugin pattern + if args.developer_mode: + _DCCSI_DEV_MODE = True + attach_debugger() # attempts to start debugger + # need to do a little plumbing if not args.engine_path: args.engine_path=_O3DE_DEV @@ -589,7 +586,7 @@ if __name__ == '__main__': from azpy.constants import TAG_DIR_O3DE_BUILD_FOLDER args.build_folder = TAG_DIR_O3DE_BUILD_FOLDER if not args.project_path: - args.project_path=_O3DE_PROJECT_PATH + args.project_path=_PATH_O3DE_PROJECT if _DCCSI_GDEBUG: args.enable_python = True @@ -597,7 +594,6 @@ if __name__ == '__main__': # now standalone we can validate the config. env, settings. settings = get_config_settings(engine_path=args.engine_path, - build_folder=args.build_folder, project_name=args.project_name, project_path=args.project_path, enable_o3de_python=args.enable_python, @@ -612,47 +608,54 @@ if __name__ == '__main__': _LOGGER.info('DCCSI_OS_FOLDER: {}'.format(settings.DCCSI_OS_FOLDER)) _LOGGER.info('O3DE_DEV: {}'.format(settings.O3DE_DEV)) - _LOGGER.info('O3DE_O3DE_BUILD_FOLDER: {}'.format(settings.O3DE_BUILD_PATH)) - _LOGGER.info('O3DE_BUILD_PATH: {}'.format(settings.O3DE_BUILD_PATH)) - _LOGGER.info('O3DE_BIN_PATH: {}'.format(settings.O3DE_BIN_PATH)) + _LOGGER.info('O3DE_O3DE_BUILD_FOLDER: {}'.format(settings.PATH_O3DE_BUILD)) + _LOGGER.info('PATH_O3DE_BUILD: {}'.format(settings.PATH_O3DE_BUILD)) + _LOGGER.info('PATH_O3DE_BIN: {}'.format(settings.PATH_O3DE_BIN)) _LOGGER.info('O3DE_PROJECT: {}'.format(settings.O3DE_PROJECT)) - _LOGGER.info('O3DE_PROJECT_PATH: {}'.format(settings.O3DE_PROJECT_PATH)) + _LOGGER.info('PATH_O3DE_PROJECT: {}'.format(settings.PATH_O3DE_PROJECT)) - _LOGGER.info('DCCSI_PATH: {}'.format(settings.DCCSI_PATH)) + _LOGGER.info('PATH_DCCSIG: {}'.format(settings.PATH_DCCSIG)) _LOGGER.info('DCCSI_LOG_PATH: {}'.format(settings.DCCSI_LOG_PATH)) - _LOGGER.info('DCCSI_CONFIG_PATH: {}'.format(settings.DCCSI_CONFIG_PATH)) + _LOGGER.info('PATH_DCCSI_CONFIG: {}'.format(settings.PATH_DCCSI_CONFIG)) - if settings.O3DE_DCCSI_ENV_TEST: + try: + settings.O3DE_DCCSI_ENV_TEST _LOGGER.info('O3DE_DCCSI_ENV_TEST: {}'.format(settings.O3DE_DCCSI_ENV_TEST)) + except: + pass # don't exist _LOGGER.info(STR_CROSSBAR) _LOGGER.info('') if args.enable_python: _LOGGER.info(STR_CROSSBAR) - _LOGGER.info('DCCSI_PYTHON_PATH'.format(settings.DCCSI_PYTHON_PATH)) - _LOGGER.info('DCCSI_PYTHON_LIB_PATH: {}'.format(settings.DCCSI_PYTHON_LIB_PATH)) + _LOGGER.info('PATH_DCCSI_PYTHON'.format(settings.PATH_DCCSI_PYTHON)) + _LOGGER.info('PATH_DCCSI_PYTHON_LIB: {}'.format(settings.PATH_DCCSI_PYTHON_LIB)) _LOGGER.info('DCCSI_PY_IDE'.format(settings.DCCSI_PY_IDE)) _LOGGER.info('O3DE_PYTHONHOME'.format(settings.O3DE_PYTHONHOME)) - _LOGGER.info('O3DE_PYTHON_INSTALL'.format(settings.O3DE_PYTHON_INSTALL)) + _LOGGER.info('PATH_O3DE_PYTHON_INSTALL'.format(settings.PATH_O3DE_PYTHON_INSTALL)) _LOGGER.info('DCCSI_PY_BASE: {}'.format(settings.DCCSI_PY_BASE)) _LOGGER.info(STR_CROSSBAR) _LOGGER.info('') else: - _LOGGER.info('Tip: add arg --enable-python to extend the environment with O3DE python access') + _LOGGER.info('Tip: add arg --enable-python (-py) to extend the environment with O3DE python access') if args.enable_qt: _LOGGER.info(STR_CROSSBAR) # _LOGGER.info('QTFORPYTHON_PATH: {}'.format(settings.QTFORPYTHON_PATH)) _LOGGER.info('QT_PLUGIN_PATH: {}'.format(settings.QT_PLUGIN_PATH)) _LOGGER.info('QT_QPA_PLATFORM_PLUGIN_PATH: {}'.format(settings.QT_QPA_PLATFORM_PLUGIN_PATH)) - _LOGGER.info('DCCSI_PYSIDE2_TOOLS: {}'.format(settings.DCCSI_PYSIDE2_TOOLS)) + try: + settings.DCCSI_PYSIDE2_TOOLS + _LOGGER.info('DCCSI_PYSIDE2_TOOLS: {}'.format(settings.DCCSI_PYSIDE2_TOOLS)) + except: + pass # don't exist _LOGGER.info(STR_CROSSBAR) _LOGGER.info('') else: - - _LOGGER.info('Tip: add arg --enable-qt to extend the environment with O3DE Qt/PySide2 support') + _LOGGER.info('Tip: add arg --enable-qt (-qt) to extend the environment with O3DE Qt/PySide2 support') + _LOGGER.info('Tip: add arg --test-pyside2 (-tp) to test the O3DE Qt/PySide2 support') settings.setenv() # doing this will add/set the additional DYNACONF_ envars @@ -695,14 +698,9 @@ if __name__ == '__main__': _LOGGER.warning("Could not import 'pyside2uic'") _LOGGER.warning("Refer to: '< local DCCsi >\3rdParty\Python\README.txt'") _LOGGER.error(e) + + _LOGGER.info('DCCsi: config.py took: {} sec'.format(time.process_time() - start)) # return sys.exit() -# --- END ----------------------------------------------------------------- - - - - - - - +# --- END ----------------------------------------------------------------- \ No newline at end of file diff --git a/Gems/AtomLyIntegration/TechnicalArt/DccScriptingInterface/gem.json b/Gems/AtomLyIntegration/TechnicalArt/DccScriptingInterface/gem.json index 1cee5c8298..4cc6fff169 100644 --- a/Gems/AtomLyIntegration/TechnicalArt/DccScriptingInterface/gem.json +++ b/Gems/AtomLyIntegration/TechnicalArt/DccScriptingInterface/gem.json @@ -3,6 +3,7 @@ "display_name": "Atom DccScriptingInterface (DCCsi)", "summary": "A python framework for working with various DCC tools and workflows.", "license": "Apache-2.0 Or MIT", + "license_url": "https://github.com/o3de/o3de/blob/development/LICENSE.txt", "origin": "Open 3D Engine - o3de.org", "type": "Code", "canonical_tags": [ diff --git a/Gems/AtomLyIntegration/gem.json b/Gems/AtomLyIntegration/gem.json index 00b3a25f74..d9e526aee0 100644 --- a/Gems/AtomLyIntegration/gem.json +++ b/Gems/AtomLyIntegration/gem.json @@ -2,6 +2,7 @@ "gem_name": "AtomLyIntegration", "display_name": "Atom O3DE Integration", "license": "Apache-2.0 Or MIT", + "license_url": "https://github.com/o3de/o3de/blob/development/LICENSE.txt", "origin": "Open 3D Engine - o3de.org", "type": "Code", "summary": "The Atom O3DE Integration Gem provides components, libraries, and functionality to support and integrate Atom Renderer in Open 3D Engine.", diff --git a/Gems/AtomTressFX/Assets/Passes/HairParentShortCutPass.pass b/Gems/AtomTressFX/Assets/Passes/HairParentShortCutPass.pass index 83f9f0d432..d8389a3da8 100644 --- a/Gems/AtomTressFX/Assets/Passes/HairParentShortCutPass.pass +++ b/Gems/AtomTressFX/Assets/Passes/HairParentShortCutPass.pass @@ -264,7 +264,7 @@ "Attachment": "HairColorRenderTarget" } }, - { + { // The final render target - this is MSAA mode RT - would it be cheaper to // use non-MSAA and then copy? "LocalSlot": "RenderTargetInputOutput", @@ -280,6 +280,13 @@ "Attachment": "DepthLinearInput" } }, + { + "LocalSlot": "AccumulatedInverseAlpha", + "AttachmentRef": { + "Pass": "HairShortCutGeometryDepthAlphaPass", + "Attachment": "InverseAlphaRTOutput" + } + }, { "LocalSlot": "Depth", "AttachmentRef": { diff --git a/Gems/AtomTressFX/Assets/Passes/HairShortCutGeometryShading.pass b/Gems/AtomTressFX/Assets/Passes/HairShortCutGeometryShading.pass index 5940f8c549..53fa2b358b 100644 --- a/Gems/AtomTressFX/Assets/Passes/HairShortCutGeometryShading.pass +++ b/Gems/AtomTressFX/Assets/Passes/HairShortCutGeometryShading.pass @@ -32,6 +32,12 @@ "SlotType": "Input", "ScopeAttachmentUsage": "Shader" }, + { // Used as the thickness accumulation to block TT (back) lobe lighting + "Name": "AccumulatedInverseAlpha", + "SlotType": "Input", + "ScopeAttachmentUsage": "Shader", + "ShaderInputName": "m_accumInvAlpha" + }, { // For comparing the depth to early disqualify but not to write "Name": "Depth", "SlotType": "Input", diff --git a/Gems/AtomTressFX/Assets/Shaders/HairRenderingFillPPLL.azsl b/Gems/AtomTressFX/Assets/Shaders/HairRenderingFillPPLL.azsl index 02777435f5..8dcd1ed372 100644 --- a/Gems/AtomTressFX/Assets/Shaders/HairRenderingFillPPLL.azsl +++ b/Gems/AtomTressFX/Assets/Shaders/HairRenderingFillPPLL.azsl @@ -51,9 +51,6 @@ ShaderResourceGroup PassSrg : SRG_PerPass_WithFallback RWTexture2D m_fragmentListHead; RWStructuredBuffer m_linkedListNodes; RWBuffer m_linkedListCounter; - - // Linear depth is used for getting the screen to world transform - Texture2D m_linearDepth; } //------------------------------------------------------------------------------ diff --git a/Gems/AtomTressFX/Assets/Shaders/HairRenderingFillPPLL.shader b/Gems/AtomTressFX/Assets/Shaders/HairRenderingFillPPLL.shader index e4859eca9b..fc4974fae2 100644 --- a/Gems/AtomTressFX/Assets/Shaders/HairRenderingFillPPLL.shader +++ b/Gems/AtomTressFX/Assets/Shaders/HairRenderingFillPPLL.shader @@ -39,5 +39,6 @@ "type": "Fragment" } ] - } + }, + "DisabledRHIBackends": ["metal"] } diff --git a/Gems/AtomTressFX/Assets/Shaders/HairShortCutGeometryDepthAlpha.shader b/Gems/AtomTressFX/Assets/Shaders/HairShortCutGeometryDepthAlpha.shader index 7cd1f44510..d2d34fb1cd 100644 --- a/Gems/AtomTressFX/Assets/Shaders/HairShortCutGeometryDepthAlpha.shader +++ b/Gems/AtomTressFX/Assets/Shaders/HairShortCutGeometryDepthAlpha.shader @@ -41,5 +41,6 @@ "type": "Fragment" } ] - } + }, + "DisabledRHIBackends": ["metal"] } diff --git a/Gems/AtomTressFX/Assets/Shaders/HairShortCutGeometryShading.azsl b/Gems/AtomTressFX/Assets/Shaders/HairShortCutGeometryShading.azsl index c2a2958dfe..2a3e00b1e7 100644 --- a/Gems/AtomTressFX/Assets/Shaders/HairShortCutGeometryShading.azsl +++ b/Gems/AtomTressFX/Assets/Shaders/HairShortCutGeometryShading.azsl @@ -52,6 +52,9 @@ ShaderResourceGroup PassSrg : SRG_PerPass_WithFallback //! Originally in TressFXRendering.hlsl this is space 0 HairObjectShadeParams m_hairParams[AMD_TRESSFX_MAX_HAIR_GROUP_RENDER]; + // Will be used as thickness indication to block TT (back) lobe + Texture2D m_accumInvAlpha; + // Linear depth is used for getting the screen to world transform Texture2D m_linearDepth; @@ -164,9 +167,11 @@ float4 HairShortCutGeometryColorPS(PS_INPUT_HAIR input) : SV_Target float2 pixelCoord = input.Position.xy; float depth = input.Position.z; - // [To Do] - the thickness will need to be corrected somehow since this technique doesn't - // keeps track of the accumulated alpha / thickness - float thickness = alpha; + + // The following is a quick correction to remove the TT lobe (back lobe) contribution in case + // the hair is thick. We do that by accumulating alpha from the hair for the blend operation + // and this can be used here as an indication of thickness. + float thickness = saturate(1.0 - PassSrg::m_accumInvAlpha[int2(pixelCoord)]); float3 shadedFragment = TressFXShading(pixelCoord, depth, input.Tangent.xyz, strandColor.rgb, thickness, RenderParamsIndex); // Color channel: Pre-multiply with alpha to create non-normalized weighted sum. diff --git a/Gems/AtomTressFX/Assets/seedList.seed b/Gems/AtomTressFX/Assets/seedList.seed new file mode 100644 index 0000000000..95389a753a --- /dev/null +++ b/Gems/AtomTressFX/Assets/seedList.seed @@ -0,0 +1,101 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/Gems/AtomTressFX/Code/Builders/HairBuilderComponent.cpp b/Gems/AtomTressFX/Code/Builders/HairBuilderComponent.cpp index f80261f4b5..7f99e4c55f 100644 --- a/Gems/AtomTressFX/Code/Builders/HairBuilderComponent.cpp +++ b/Gems/AtomTressFX/Code/Builders/HairBuilderComponent.cpp @@ -46,14 +46,6 @@ namespace AZ { m_hairAssetBuilder.RegisterBuilder(); m_hairAssetHandler.Register(); - - // Add asset types and extensions to AssetCatalog. - auto assetCatalog = AZ::Data::AssetCatalogRequestBus::FindFirstHandler(); - if (assetCatalog) - { - assetCatalog->EnableCatalogForAsset(azrtti_typeid()); - assetCatalog->AddExtension(AMD::TFXCombinedFileExtension); - } } void HairBuilderComponent::Deactivate() diff --git a/Gems/AtomTressFX/Code/Rendering/HairFeatureProcessor.cpp b/Gems/AtomTressFX/Code/Rendering/HairFeatureProcessor.cpp index 74ba99c26c..f35bce391e 100644 --- a/Gems/AtomTressFX/Code/Rendering/HairFeatureProcessor.cpp +++ b/Gems/AtomTressFX/Code/Rendering/HairFeatureProcessor.cpp @@ -9,8 +9,6 @@ #include #include #include -#include - #include #include #include diff --git a/Gems/AtomTressFX/Code/Rendering/HairFeatureProcessor.h b/Gems/AtomTressFX/Code/Rendering/HairFeatureProcessor.h index 70e37a7863..8c19b706a9 100644 --- a/Gems/AtomTressFX/Code/Rendering/HairFeatureProcessor.h +++ b/Gems/AtomTressFX/Code/Rendering/HairFeatureProcessor.h @@ -217,7 +217,7 @@ namespace AZ bool m_forceClearRenderData = false; bool m_initialized = false; bool m_isEnabled = true; - bool m_usePPLLRenderTechnique = true; + bool m_usePPLLRenderTechnique = false; static uint32_t s_instanceCount; HairGlobalSettings m_hairGlobalSettings; diff --git a/Gems/AtomTressFX/Code/Rendering/HairRenderObject.cpp b/Gems/AtomTressFX/Code/Rendering/HairRenderObject.cpp index 4d615e31ae..fe167cae8b 100644 --- a/Gems/AtomTressFX/Code/Rendering/HairRenderObject.cpp +++ b/Gems/AtomTressFX/Code/Rendering/HairRenderObject.cpp @@ -5,8 +5,6 @@ * SPDX-License-Identifier: Apache-2.0 OR MIT * */ -#include - #include #include @@ -958,7 +956,7 @@ namespace AZ const char* assetName, AMD::TressFXAsset* asset, AMD::TressFXSimulationSettings* simSettings, AMD::TressFXRenderingSettings* renderSettings) { - AZ_TRACE_METHOD(); + AZ_PROFILE_FUNCTION(AzRender); ++s_objectCounter; diff --git a/Gems/AtomTressFX/Code/Rendering/SharedBuffer.cpp b/Gems/AtomTressFX/Code/Rendering/SharedBuffer.cpp index dd5b23907e..b31d9f8ae0 100644 --- a/Gems/AtomTressFX/Code/Rendering/SharedBuffer.cpp +++ b/Gems/AtomTressFX/Code/Rendering/SharedBuffer.cpp @@ -16,243 +16,239 @@ #include #include -namespace AZ +namespace AZ::Render { - namespace Render + //! Setting the constructor as private will create compile error to remind the developer to set + //! the buffer Init in the FeatureProcessor and initialize properly + + SharedBuffer::SharedBuffer() { - //! Setting the constructor as private will create compile error to remind the developer to set - //! the buffer Init in the FeatureProcessor and initialize properly + AZ_Warning("SharedBuffer", false, "Missing information to properly create SharedBuffer. Init is required"); + } - SharedBuffer::SharedBuffer() + SharedBuffer::SharedBuffer(AZStd::string bufferName, AZStd::vector& buffersDescriptors) + { + m_bufferName = bufferName; + Init(bufferName, buffersDescriptors); + } + + SharedBuffer::~SharedBuffer() + { + m_bufferAsset = {}; + } + + //! Crucial method that will ensure that the alignment for the BufferViews is always kept. + //! This is important when requesting a BufferView as the offset needs to be aligned according + //! to the element type of the buffer. + void SharedBuffer::CalculateAlignment(AZStd::vector& buffersDescriptors) + { + m_alignment = 1; + for (uint8_t bufferIndex = 0; bufferIndex < buffersDescriptors.size() ; ++bufferIndex) { - AZ_Warning("SharedBuffer", false, "Missing information to properly create SharedBuffer. Init is required"); + // Using the least common multiple enables resource views to be typed and ensures they can get + // an offset in bytes that is a multiple of an element count + m_alignment = std::lcm(m_alignment, buffersDescriptors[bufferIndex].m_elementSize); + } + } + + void SharedBuffer::InitAllocator() + { + RHI::FreeListAllocator::Descriptor allocatorDescriptor; + allocatorDescriptor.m_alignmentInBytes = m_alignment; + allocatorDescriptor.m_capacityInBytes = m_sizeInBytes; + allocatorDescriptor.m_policy = RHI::FreeListAllocatorPolicy::BestFit; + allocatorDescriptor.m_garbageCollectLatency = 0; + m_freeListAllocator.Init(allocatorDescriptor); + } + + void SharedBuffer::CreateBuffer() + { + SrgBufferDescriptor descriptor = SrgBufferDescriptor( + RPI::CommonBufferPoolType::ReadWrite, RHI::Format::Unknown, + sizeof(float), uint32_t(m_sizeInBytes / sizeof(float)), + Name{ "HairSharedDynamicBuffer" }, Name{ "m_skinnedHairSharedBuffer" }, 0, 0 + ); + m_buffer = Hair::UtilityClass::CreateBuffer("Hair Gem", descriptor, nullptr); + } + + void SharedBuffer::CreateBufferAsset() + { + // Create the shared buffer pool + { + auto bufferPoolDesc = AZStd::make_unique(); + // Output buffers are both written to during skinning and used as input assembly buffers + bufferPoolDesc->m_bindFlags = RHI::BufferBindFlags::ShaderReadWrite | RHI::BufferBindFlags::Indirect; + bufferPoolDesc->m_heapMemoryLevel = RHI::HeapMemoryLevel::Device; + bufferPoolDesc->m_hostMemoryAccess = RHI::HostMemoryAccess::Write; + + RPI::ResourcePoolAssetCreator creator; + creator.Begin(Uuid::CreateRandom()); + creator.SetPoolDescriptor(AZStd::move(bufferPoolDesc)); + creator.SetPoolName("SharedBufferPool"); + creator.End(m_bufferPoolAsset); } - SharedBuffer::SharedBuffer(AZStd::string bufferName, AZStd::vector& buffersDescriptors) + // Create the shared buffer { - m_bufferName = bufferName; - Init(bufferName, buffersDescriptors); + RPI::BufferAssetCreator creator; + Uuid uuid = Uuid::CreateRandom(); + creator.Begin(uuid); + creator.SetBufferName(m_bufferName); + creator.SetPoolAsset(m_bufferPoolAsset); + + RHI::BufferDescriptor bufferDescriptor; + bufferDescriptor.m_bindFlags = RHI::BufferBindFlags::ShaderReadWrite | RHI::BufferBindFlags::Indirect; + bufferDescriptor.m_byteCount = m_sizeInBytes; + bufferDescriptor.m_alignment = m_alignment; + creator.SetBuffer(nullptr, 0, bufferDescriptor); + + RHI::BufferViewDescriptor viewDescriptor; + viewDescriptor.m_elementFormat = RHI::Format::Unknown; + + // [To Do] - set this as AZ::Vector4 for offset approach shader code optimization + viewDescriptor.m_elementSize = sizeof(float); + viewDescriptor.m_elementCount = aznumeric_cast(m_sizeInBytes) / sizeof(float); + viewDescriptor.m_elementOffset = 0; + creator.SetBufferViewDescriptor(viewDescriptor); + + creator.End(m_bufferAsset); } + } - SharedBuffer::~SharedBuffer() - { - m_bufferAsset = {}; - } + void SharedBuffer::Init(AZStd::string bufferName, AZStd::vector& buffersDescriptors) + { + m_bufferName = bufferName; + // m_sizeInBytes = 256u * (1024u * 1024u); + // + // [To Do] replace this with max size request for allocation that can be given by the calling function + // This has the following problems: + // 1. The need to have this aggregated size in advance + // 2. The size might grow dynamically between frames + // 3. Due to having several stream buffers (position, tangent, structured), alignment padding + // size calculation must be added. + // Requirement: the buffer already has an assert on allocation beyond the memory. In the future it should + // support greedy memory allocation when memory has reached its end. This must not invalidate the buffer during + // the current frame, hence allocation of second buffer, fence and a copy must take place. - //! Crucial method that will ensure that the alignment for the BufferViews is always kept. - //! This is important when requesting a BufferView as the offset needs to be aligned according - //! to the element type of the buffer. - void SharedBuffer::CalculateAlignment(AZStd::vector& buffersDescriptors) - { - m_alignment = 1; - for (uint8_t bufferIndex = 0; bufferIndex < buffersDescriptors.size() ; ++bufferIndex) - { - // Using the least common multiple enables resource views to be typed and ensures they can get - // an offset in bytes that is a multiple of an element count - m_alignment = std::lcm(m_alignment, buffersDescriptors[bufferIndex].m_elementSize); - } - } + CalculateAlignment(buffersDescriptors); - void SharedBuffer::InitAllocator() - { - RHI::FreeListAllocator::Descriptor allocatorDescriptor; - allocatorDescriptor.m_alignmentInBytes = m_alignment; - allocatorDescriptor.m_capacityInBytes = m_sizeInBytes; - allocatorDescriptor.m_policy = RHI::FreeListAllocatorPolicy::BestFit; - allocatorDescriptor.m_garbageCollectLatency = 0; - m_freeListAllocator.Init(allocatorDescriptor); - } + InitAllocator(); - void SharedBuffer::CreateBuffer() - { - SrgBufferDescriptor descriptor = SrgBufferDescriptor( - RPI::CommonBufferPoolType::ReadWrite, RHI::Format::Unknown, - sizeof(float), uint32_t(m_sizeInBytes / sizeof(float)), - Name{ "HairSharedDynamicBuffer" }, Name{ "m_skinnedHairSharedBuffer" }, 0, 0 - ); - m_buffer = Hair::UtilityClass::CreateBuffer("Hair Gem", descriptor, nullptr); - } - - void SharedBuffer::CreateBufferAsset() - { - // Create the shared buffer pool - { - auto bufferPoolDesc = AZStd::make_unique(); - // Output buffers are both written to during skinning and used as input assembly buffers - bufferPoolDesc->m_bindFlags = RHI::BufferBindFlags::ShaderReadWrite | RHI::BufferBindFlags::Indirect; - bufferPoolDesc->m_heapMemoryLevel = RHI::HeapMemoryLevel::Device; - bufferPoolDesc->m_hostMemoryAccess = RHI::HostMemoryAccess::Write; + CreateBuffer(); - RPI::ResourcePoolAssetCreator creator; - creator.Begin(Uuid::CreateRandom()); - creator.SetPoolDescriptor(AZStd::move(bufferPoolDesc)); - creator.SetPoolName("SharedBufferPool"); - creator.End(m_bufferPoolAsset); - } + SystemTickBus::Handler::BusConnect(); + } - // Create the shared buffer - { - RPI::BufferAssetCreator creator; - Uuid uuid = Uuid::CreateRandom(); - creator.Begin(uuid); - creator.SetBufferName(m_bufferName); - creator.SetPoolAsset(m_bufferPoolAsset); - - RHI::BufferDescriptor bufferDescriptor; - bufferDescriptor.m_bindFlags = RHI::BufferBindFlags::ShaderReadWrite | RHI::BufferBindFlags::Indirect; - bufferDescriptor.m_byteCount = m_sizeInBytes; - bufferDescriptor.m_alignment = m_alignment; - creator.SetBuffer(nullptr, 0, bufferDescriptor); - - RHI::BufferViewDescriptor viewDescriptor; - viewDescriptor.m_elementFormat = RHI::Format::Unknown; - - // [To Do] - set this as AZ::Vector4 for offset approach shader code optimization - viewDescriptor.m_elementSize = sizeof(float); - viewDescriptor.m_elementCount = aznumeric_cast(m_sizeInBytes) / sizeof(float); - viewDescriptor.m_elementOffset = 0; - creator.SetBufferViewDescriptor(viewDescriptor); - - creator.End(m_bufferAsset); - } - } - - void SharedBuffer::Init(AZStd::string bufferName, AZStd::vector& buffersDescriptors) - { - m_bufferName = bufferName; - // m_sizeInBytes = 256u * (1024u * 1024u); - // - // [To Do] replace this with max size request for allocation that can be given by the calling function - // This has the following problems: - // 1. The need to have this aggregated size in advance - // 2. The size might grow dynamically between frames - // 3. Due to having several stream buffers (position, tangent, structured), alignment padding - // size calculation must be added. - // Requirement: the buffer already has an assert on allocation beyond the memory. In the future it should - // support greedy memory allocation when memory has reached its end. This must not invalidate the buffer during - // the current frame, hence allocation of second buffer, fence and a copy must take place. - - CalculateAlignment(buffersDescriptors); - - InitAllocator(); - - CreateBuffer(); - - SystemTickBus::Handler::BusConnect(); - } - - AZStd::intrusive_ptr SharedBuffer::Allocate(size_t byteCount) - { - RHI::VirtualAddress result; - { - AZStd::lock_guard lock(m_allocatorMutex); - result = m_freeListAllocator.Allocate(byteCount, m_alignment); - } - - if (result.IsValid()) - { - return aznew HairSharedBufferAllocation(result); - } - - return nullptr; - } - - void SharedBuffer::DeAllocate(RHI::VirtualAddress allocation) - { - if (allocation.IsValid()) - { - { - AZStd::lock_guard lock(m_allocatorMutex); - m_freeListAllocator.DeAllocate(allocation); - } - - m_memoryWasFreed = true; - m_broadcastMemoryAvailableEvent = true; - } - } - - void SharedBuffer::DeAllocateNoSignal(RHI::VirtualAddress allocation) - { - if (allocation.IsValid()) - { - { - AZStd::lock_guard lock(m_allocatorMutex); - m_freeListAllocator.DeAllocate(allocation); - } - m_memoryWasFreed = true; - } - } - - Data::Asset SharedBuffer::GetBufferAsset() const - { - return m_bufferAsset; - } - - Data::Instance SharedBuffer::GetBuffer() - { - if (!m_buffer) - { - m_buffer = RPI::Buffer::FindOrCreate(m_bufferAsset); - } - return m_buffer; - } - - //! Update buffer's content with sourceData at an offset of bufferByteOffset - bool SharedBuffer::UpdateData(const void* sourceData, uint64_t sourceDataSizeInBytes, uint64_t bufferByteOffset) + AZStd::intrusive_ptr SharedBuffer::Allocate(size_t byteCount) + { + RHI::VirtualAddress result; { AZStd::lock_guard lock(m_allocatorMutex); - if (m_buffer.get()) + result = m_freeListAllocator.Allocate(byteCount, m_alignment); + } + + if (result.IsValid()) + { + return aznew HairSharedBufferAllocation(result); + } + + return nullptr; + } + + void SharedBuffer::DeAllocate(RHI::VirtualAddress allocation) + { + if (allocation.IsValid()) + { { - return m_buffer->UpdateData(sourceData, sourceDataSizeInBytes, bufferByteOffset); + AZStd::lock_guard lock(m_allocatorMutex); + m_freeListAllocator.DeAllocate(allocation); } - AZ_Assert(false, "SharedBuffer error in data allocation - the buffer doesn't exist yet"); - return false; - } - void SharedBuffer::OnSystemTick() - { - GarbageCollect(); + m_memoryWasFreed = true; + m_broadcastMemoryAvailableEvent = true; } + } - void SharedBuffer::GarbageCollect() + void SharedBuffer::DeAllocateNoSignal(RHI::VirtualAddress allocation) + { + if (allocation.IsValid()) { - if (m_memoryWasFreed) { - m_memoryWasFreed = false; - { - AZStd::lock_guard lock(m_allocatorMutex); - m_freeListAllocator.GarbageCollect(); - } - if (m_broadcastMemoryAvailableEvent) - { - SharedBufferNotificationBus::Broadcast(&SharedBufferNotificationBus::Events::OnSharedBufferMemoryAvailable); - m_broadcastMemoryAvailableEvent = false; - } + AZStd::lock_guard lock(m_allocatorMutex); + m_freeListAllocator.DeAllocate(allocation); + } + m_memoryWasFreed = true; + } + } + + Data::Asset SharedBuffer::GetBufferAsset() const + { + return m_bufferAsset; + } + + Data::Instance SharedBuffer::GetBuffer() + { + if (!m_buffer) + { + m_buffer = RPI::Buffer::FindOrCreate(m_bufferAsset); + } + return m_buffer; + } + + //! Update buffer's content with sourceData at an offset of bufferByteOffset + bool SharedBuffer::UpdateData(const void* sourceData, uint64_t sourceDataSizeInBytes, uint64_t bufferByteOffset) + { + AZStd::lock_guard lock(m_allocatorMutex); + if (m_buffer.get()) + { + return m_buffer->UpdateData(sourceData, sourceDataSizeInBytes, bufferByteOffset); + } + AZ_Assert(false, "SharedBuffer error in data allocation - the buffer doesn't exist yet"); + return false; + } + + void SharedBuffer::OnSystemTick() + { + GarbageCollect(); + } + + void SharedBuffer::GarbageCollect() + { + if (m_memoryWasFreed) + { + m_memoryWasFreed = false; + { + AZStd::lock_guard lock(m_allocatorMutex); + m_freeListAllocator.GarbageCollect(); + } + if (m_broadcastMemoryAvailableEvent) + { + SharedBufferNotificationBus::Broadcast(&SharedBufferNotificationBus::Events::OnSharedBufferMemoryAvailable); + m_broadcastMemoryAvailableEvent = false; } } + } - //! Utility function to create a resource view of different type than the shared buffer data. - //! Since this class is sub-buffer container, this method should be used after creating - //! a new allocation to be used as a sub-buffer. - //! Notice the alignment required according to the element size - this might need - RHI::BufferViewDescriptor SharedBuffer::CreateResourceViewWithDifferentFormat( - uint32_t offsetInBytes, uint32_t elementCount, uint32_t elementSize, - RHI::Format format, RHI::BufferBindFlags overrideBindFlags) - { - RHI::BufferViewDescriptor viewDescriptor; + //! Utility function to create a resource view of different type than the shared buffer data. + //! Since this class is sub-buffer container, this method should be used after creating + //! a new allocation to be used as a sub-buffer. + //! Notice the alignment required according to the element size - this might need + RHI::BufferViewDescriptor SharedBuffer::CreateResourceViewWithDifferentFormat( + uint32_t offsetInBytes, uint32_t elementCount, uint32_t elementSize, + RHI::Format format, RHI::BufferBindFlags overrideBindFlags) + { + RHI::BufferViewDescriptor viewDescriptor; - // In the following line I use the element size and not the size based of the - // element format since in the more interesting case of structured buffer, the - // size will result in an error. - uint32_t elementOffset = offsetInBytes / elementSize; - viewDescriptor.m_elementOffset = elementOffset; - viewDescriptor.m_elementCount = elementCount; - viewDescriptor.m_elementFormat = format; - viewDescriptor.m_elementSize = elementSize; - viewDescriptor.m_overrideBindFlags = overrideBindFlags; - return viewDescriptor; - } - - }// namespace Render -}// namespace AZ + // In the following line I use the element size and not the size based of the + // element format since in the more interesting case of structured buffer, the + // size will result in an error. + uint32_t elementOffset = offsetInBytes / elementSize; + viewDescriptor.m_elementOffset = elementOffset; + viewDescriptor.m_elementCount = elementCount; + viewDescriptor.m_elementFormat = format; + viewDescriptor.m_elementSize = elementSize; + viewDescriptor.m_overrideBindFlags = overrideBindFlags; + return viewDescriptor; + } +} // namespace AZ::Render diff --git a/Gems/AtomTressFX/gem.json b/Gems/AtomTressFX/gem.json index d3e1294568..b7588ea374 100644 --- a/Gems/AtomTressFX/gem.json +++ b/Gems/AtomTressFX/gem.json @@ -2,11 +2,18 @@ "gem_name": "AtomTressFX", "display_name": "Atom TressFX", "license": "Apache-2.0 Or MIT", + "license_url": "https://github.com/o3de/o3de/blob/development/LICENSE.txt", "origin": "Open 3D Engine - o3de.org", "type": "Code", "summary": "Atom TressFX Gem provides a cutting edge hair and fur simulation and rendering in Atom enhancing the AMD TressFX 4.1. The open source TressFX can be found here: https://github.com/GPUOpen-Effects/TressFX", - "canonical_tags": ["Gem"], - "user_tags": ["Rendering", "Physics", "Animation"], + "canonical_tags": [ + "Gem" + ], + "user_tags": [ + "Rendering", + "Physics", + "Animation" + ], "requirements": "", "documentation_url": "https://o3de.org/docs/user-guide/gems/reference/rendering/amd/atom-tressfx/" } diff --git a/Gems/AudioEngineWwise/Code/Source/Builder/WwiseBuilderWorker.cpp b/Gems/AudioEngineWwise/Code/Source/Builder/WwiseBuilderWorker.cpp index 22fa4cab7d..2a1d1cbb2e 100644 --- a/Gems/AudioEngineWwise/Code/Source/Builder/WwiseBuilderWorker.cpp +++ b/Gems/AudioEngineWwise/Code/Source/Builder/WwiseBuilderWorker.cpp @@ -29,23 +29,25 @@ namespace WwiseBuilder { if (!rootObject.IsObject()) { - return AZ::Failure(AZStd::string("The root of the metadata file is not an object. Please regenerate the metadata for this soundbank.")); + return AZ::Failure(AZStd::string("The root of the metadata file is not an object. " + "Please regenerate the dependencies metadata for this soundbank.")); } // If the file doesn't define a dependency field, then there are no dependencies. if (!rootObject.HasMember(JsonDependencyKey)) { AZStd::string addingDefaultDependencyWarning = AZStd::string::format( - "Dependencies array does not exist. The file was likely manually edited. Registering a default " - "dependency on %s. Please regenerate the metadata for this bank.", + "Dependencies array does not exist - the .bankdeps file may have been manually edited. " + "Registering a default dependency on %s. Dependencies may need to be regenerated via the authoring tool scripts.", Audio::Wwise::InitBank); + fileNames.push_back(Audio::Wwise::InitBank); return AZ::Success(addingDefaultDependencyWarning); } const rapidjson::Value& dependenciesArray = rootObject[JsonDependencyKey]; if (!dependenciesArray.IsArray()) { - return AZ::Failure(AZStd::string("Dependency field is not an array. Please regenerate the metadata for this soundbank.")); + return AZ::Failure(AZStd::string("Dependency field is not an array. Please regenerate the dependencies metadata for this soundbank.")); } for (rapidjson::SizeType dependencyIndex = 0; dependencyIndex < dependenciesArray.Size(); ++dependencyIndex) @@ -53,26 +55,38 @@ namespace WwiseBuilder fileNames.push_back(dependenciesArray[dependencyIndex].GetString()); } - // The dependency array is empty, which likely means it was modified by hand. However, every bank is dependent - // on init.bnk (other than itself), so just force add it as a dependency here. and emit a warning. - if (fileNames.size() == 0) + // Make sure init.bnk is a dependency. Force-add it if it's not. + // Look for init.bnk in the dependencies file list... + auto iter = AZStd::find_if( + fileNames.begin(), fileNames.end(), + [](AZStd::string fileName) -> bool + { + // use a string copy argument in order to to_lower it... + AZStd::to_lower(fileName.begin(), fileName.end()); + return fileName == Audio::Wwise::InitBank; + }); + if (iter == fileNames.end()) { - AZStd::string addingDefaultDependencyWarning = AZStd::string::format( - "Dependencies array is empty. The file was likely manually edited. Registering a default " - "dependency on %s. Please regenerate the metadata for this bank.", - Audio::Wwise::InitBank); - return AZ::Success(addingDefaultDependencyWarning); - } - // Make sure init.bnk is in the dependency list. Force add it if it's not - else if (AZStd::find(fileNames.begin(), fileNames.end(), Audio::Wwise::InitBank) == fileNames.end()) - { - AZStd::string addingDefaultDependencyWarning = AZStd::string::format( - "Dependencies does not contain the initialization bank. The file was likely manually edited to remove " - "it, however it is necessary for all banks to have the initialization bank loaded. Registering a " - "default dependency on %s. Please regenerate the metadata for this bank.", - Audio::Wwise::InitBank); + // Init bank wasn't found, which likely means it was modified by hand. However, every bank is dependent + // on init.bnk (other than itself), so force-add it as a dependency here and return a warning message. + AZStd::string dependencyWarning; + if (fileNames.empty()) + { + dependencyWarning = AZStd::string::format( + "Dependencies array is empty - the .bankdeps file may have been manually edited. " + "Registering a default dependency on %s. Dependencies may need to be regenerated via the authoring tool scripts.", + Audio::Wwise::InitBank); + } + else + { + dependencyWarning = AZStd::string::format( + "Dependencies did not contain the initialization bank - it may have been manually removed from the .bankdeps file. " + "It is necessary for all banks to declare %s as a dependency, so it has been automatically added. " + "Dependencies may need to be regenerated via the authoring tool scripts.", + Audio::Wwise::InitBank); + } fileNames.push_back(Audio::Wwise::InitBank); - return AZ::Success(addingDefaultDependencyWarning); + return AZ::Success(dependencyWarning); } return AZ::Success(AZStd::string()); @@ -209,9 +223,9 @@ namespace WwiseBuilder } else { - if (gatherProductDependenciesResponse.GetValue().empty()) + if (!gatherProductDependenciesResponse.GetValue().empty()) { - AZ_Warning(WwiseBuilderWindowName, false, gatherProductDependenciesResponse.GetValue().c_str()); + AZ_Warning(WwiseBuilderWindowName, false, "%s", gatherProductDependenciesResponse.GetValue().c_str()); } jobProduct.m_pathDependencies = AZStd::move(dependencyPaths); } @@ -237,7 +251,10 @@ namespace WwiseBuilder AZ::IO::PathView requestFileName = AZ::IO::PathView(fullPath).Filename(); if (requestFileName != Audio::Wwise::InitBank) { - success_message = AZStd::string::format("Failed to find the metadata file %s for soundbank %s. Full dependency information cannot be determined without the metadata file. Please regenerate the metadata for this soundbank.", bankMetadataPath.c_str(), fullPath.c_str()); + success_message = AZStd::string::format( + "Failed to find the metadata file %s for soundbank %s. Full dependency information cannot be determined without the " + "metadata file. Please regenerate the metadata for this soundbank.", + bankMetadataPath.c_str(), fullPath.c_str()); } return AZ::Success(success_message); } @@ -245,14 +262,19 @@ namespace WwiseBuilder AZ::u64 fileSize = AZ::IO::SystemFile::Length(bankMetadataPath.c_str()); if (fileSize == 0) { - return AZ::Failure(AZStd::string::format("Soundbank metadata file at path %s is an empty file. Please regenerate the metadata for this soundbank.", bankMetadataPath.c_str())); + return AZ::Failure(AZStd::string::format( + "Soundbank metadata file at path %s is an empty file. Please regenerate the metadata for this soundbank.", + bankMetadataPath.c_str())); } AZStd::vector buffer(fileSize + 1); buffer[fileSize] = 0; if (!AZ::IO::SystemFile::Read(bankMetadataPath.c_str(), buffer.data())) { - return AZ::Failure(AZStd::string::format("Failed to read the soundbank metadata file at path %s. Please make sure the file is not open or being edited by another program.", bankMetadataPath.c_str())); + return AZ::Failure(AZStd::string::format( + "Failed to read the soundbank metadata file at path %s. Please make sure the file is not open or being edited by another " + "program.", + bankMetadataPath.c_str())); } // load the file @@ -260,18 +282,24 @@ namespace WwiseBuilder bankMetadataDoc.Parse(buffer.data()); if (bankMetadataDoc.GetParseError() != rapidjson::ParseErrorCode::kParseErrorNone) { - return AZ::Failure(AZStd::string::format("Failed to parse soundbank metadata at path %s into JSON. Please regenerate the metadata for this soundbank.", bankMetadataPath.c_str())); + return AZ::Failure(AZStd::string::format( + "Failed to parse soundbank metadata at path %s into JSON. Please regenerate the metadata for this soundbank.", + bankMetadataPath.c_str())); } AZStd::vector wwiseFiles; AZ::Outcome gatherDependenciesResult = Internal::GetDependenciesFromMetadata(bankMetadataDoc, wwiseFiles); if (!gatherDependenciesResult.IsSuccess()) { - return AZ::Failure(AZStd::string::format("Failed to gather dependencies for %s from metadata file %s. %s", fullPath.c_str(), bankMetadataPath.c_str(), gatherDependenciesResult.GetError().c_str())); + return AZ::Failure(AZStd::string::format( + "Dependency metadata file %s was processed, with errors:\n%s", bankMetadataPath.c_str(), + gatherDependenciesResult.GetError().c_str())); } else if (!gatherDependenciesResult.GetValue().empty()) { - success_message = AZStd::string::format("Dependency information for %s was unavailable in the metadata file %s. %s", fullPath.c_str(), bankMetadataPath.c_str(), gatherDependenciesResult.GetValue().c_str()); + success_message = AZStd::string::format( + "Dependency metadata file %s was processed, with warnings:\n%s", bankMetadataPath.c_str(), + gatherDependenciesResult.GetValue().c_str()); } // Register dependencies stored in the file to the job response. (they'll be relative to the bank itself.) diff --git a/Gems/AudioEngineWwise/Code/Source/Editor/AudioSystemEditor_wwise.cpp b/Gems/AudioEngineWwise/Code/Source/Editor/AudioSystemEditor_wwise.cpp index 5bad3ecf1c..d29bec190e 100644 --- a/Gems/AudioEngineWwise/Code/Source/Editor/AudioSystemEditor_wwise.cpp +++ b/Gems/AudioEngineWwise/Code/Source/Editor/AudioSystemEditor_wwise.cpp @@ -322,6 +322,10 @@ namespace AudioControls connection->m_value = value; return connection; } + case EACEControlType::eACET_ENVIRONMENT: + { + return AZStd::make_shared(control->GetId()); + } } } else @@ -571,11 +575,11 @@ namespace AudioControls case eACET_RTPC: return eWCT_WWISE_RTPC; case eACET_SWITCH: - return AUDIO_IMPL_INVALID_TYPE; + return (eWCT_WWISE_SWITCH | eWCT_WWISE_GAME_STATE); case eACET_SWITCH_STATE: return (eWCT_WWISE_SWITCH | eWCT_WWISE_GAME_STATE | eWCT_WWISE_RTPC); case eACET_ENVIRONMENT: - return (eWCT_WWISE_AUX_BUS | eWCT_WWISE_SWITCH | eWCT_WWISE_GAME_STATE | eWCT_WWISE_RTPC); + return (eWCT_WWISE_AUX_BUS | eWCT_WWISE_RTPC); case eACET_PRELOAD: return eWCT_WWISE_SOUND_BANK; } diff --git a/Gems/AudioEngineWwise/gem.json b/Gems/AudioEngineWwise/gem.json index 0588af1908..2b0af30d40 100644 --- a/Gems/AudioEngineWwise/gem.json +++ b/Gems/AudioEngineWwise/gem.json @@ -2,6 +2,7 @@ "gem_name": "AudioEngineWwise", "display_name": "Wwise Audio Engine", "license": "Apache-2.0 Or MIT", + "license_url": "https://github.com/o3de/o3de/blob/development/LICENSE.txt", "origin": "Open 3D Engine - o3de.org", "type": "Code", "summary": "The Wwise Audio Engine Gem provides support for Audiokinetic Wave Works Interactive Sound Engine (Wwise).", diff --git a/Gems/AudioSystem/Code/Include/Editor/IAudioSystemEditor.h b/Gems/AudioSystem/Code/Include/Editor/IAudioSystemEditor.h index 5a9c773a32..b4dcf1df12 100644 --- a/Gems/AudioSystem/Code/Include/Editor/IAudioSystemEditor.h +++ b/Gems/AudioSystem/Code/Include/Editor/IAudioSystemEditor.h @@ -16,6 +16,8 @@ #include +class QWidget; + namespace AudioControls { class IAudioSystemEditor; @@ -150,6 +152,12 @@ namespace AudioControls //! Informs the plugin that the ACE has saved the data in case it needs to do any clean up. virtual void DataSaved() = 0; + + //! Creates a widget for modifying connection properties. + //! The widget must have a "PropertiesChanged()" signal. + //! The widget ownership transferred to the caller. + virtual QWidget* CreateConnectionPropertiesWidget([[maybe_unused]] const TConnectionPtr connection, + [[maybe_unused]] EACEControlType atlControlType) { return nullptr; } }; } // namespace AudioControls diff --git a/Gems/AudioSystem/Code/Source/Editor/ATLControlsPanel.cpp b/Gems/AudioSystem/Code/Source/Editor/ATLControlsPanel.cpp index 48a16e54e6..0f22616536 100644 --- a/Gems/AudioSystem/Code/Source/Editor/ATLControlsPanel.cpp +++ b/Gems/AudioSystem/Code/Source/Editor/ATLControlsPanel.cpp @@ -168,6 +168,12 @@ namespace AudioControls m_pATLControlsTree->setModel(pProxyModel); m_pProxyModel = pProxyModel; + QAction* pAction = new QAction(tr("Delete"), this); + pAction->setShortcutContext(Qt::WidgetWithChildrenShortcut); + pAction->setShortcut(QKeySequence::Delete); + connect(pAction, SIGNAL(triggered()), this, SLOT(DeleteSelectedControl())); + m_pATLControlsTree->addAction(pAction); + connect(m_pATLControlsTree->selectionModel(), SIGNAL(selectionChanged(const QItemSelection&, const QItemSelection&)), this, SIGNAL(SelectedControlChanged())); connect(m_pATLControlsTree->selectionModel(), SIGNAL(currentChanged(const QModelIndex&, const QModelIndex&)), this, SLOT(StopControlExecution())); connect(m_pTreeModel, SIGNAL(itemChanged(QStandardItem*)), this, SLOT(ItemModified(QStandardItem*))); @@ -802,6 +808,21 @@ namespace AudioControls { AZ::StringFunc::Path::StripExtension(sControlName); } + else if (eControlType == eACET_SWITCH_STATE) + { + if (!pATLParent->SwitchStateConnectionCheck(pAudioSystemControl)) + { + QMessageBox messageBox(this); + messageBox.setStandardButtons(QMessageBox::Ok); + messageBox.setDefaultButton(QMessageBox::Ok); + messageBox.setWindowTitle("Audio Controls Editor"); + messageBox.setText("Not in the same switch group, connection failed."); + if (messageBox.exec() == QMessageBox::Ok) + { + return; + } + } + } CATLControl* pTargetControl2 = m_pTreeModel->CreateControl(eControlType, sControlName, pATLParent); if (pTargetControl2) { diff --git a/Gems/AudioSystem/Code/Source/Editor/ATLControlsResourceDialog.cpp b/Gems/AudioSystem/Code/Source/Editor/ATLControlsResourceDialog.cpp index d3121f6245..e58db78538 100644 --- a/Gems/AudioSystem/Code/Source/Editor/ATLControlsResourceDialog.cpp +++ b/Gems/AudioSystem/Code/Source/Editor/ATLControlsResourceDialog.cpp @@ -169,11 +169,9 @@ namespace AudioControls if (parent.isValid()) { bool bChildValid = false; - bool bHasChildren = false; QModelIndex child = parent.model()->index(0, 0, parent); for (int i = 1; child.isValid(); ++i) { - bHasChildren = true; if (ApplyFilter(child)) { bChildValid = true; diff --git a/Gems/AudioSystem/Code/Source/Editor/AudioControl.cpp b/Gems/AudioSystem/Code/Source/Editor/AudioControl.cpp index c0a8fb8dde..251cc808f9 100644 --- a/Gems/AudioSystem/Code/Source/Editor/AudioControl.cpp +++ b/Gems/AudioSystem/Code/Source/Editor/AudioControl.cpp @@ -368,4 +368,36 @@ namespace AudioControls } } + bool CATLControl::SwitchStateConnectionCheck(IAudioSystemControl* middlewareControl) + { + if (IAudioSystemEditor* audioSystemImpl = CAudioControlsEditorPlugin::GetImplementationManager()->GetImplementation()) + { + CID parentID = middlewareControl->GetParent()->GetId(); + EACEControlType compatibleType = audioSystemImpl->ImplTypeToATLType(middlewareControl->GetType()); + if (compatibleType == EACEControlType::eACET_SWITCH_STATE && m_type == EACEControlType::eACET_SWITCH) + { + for (auto& child : m_children) + { + for (int j = 0; child && j < child->ConnectionCount(); ++j) + { + TConnectionPtr tmpConnection = child->GetConnectionAt(j); + if (tmpConnection) + { + IAudioSystemControl* tmpMiddlewareControl = audioSystemImpl->GetControl(tmpConnection->GetID()); + EACEControlType controlType = audioSystemImpl->ImplTypeToATLType(tmpMiddlewareControl->GetType()); + if (tmpMiddlewareControl && controlType == EACEControlType::eACET_SWITCH_STATE) + { + if (parentID != ACE_INVALID_CID && tmpMiddlewareControl->GetParent()->GetId() != parentID) + { + return false; + } + } + } + } + } + } + } + return true; + } + } // namespace AudioControls diff --git a/Gems/AudioSystem/Code/Source/Editor/AudioControl.h b/Gems/AudioSystem/Code/Source/Editor/AudioControl.h index 024e8eb6df..187ab757af 100644 --- a/Gems/AudioSystem/Code/Source/Editor/AudioControl.h +++ b/Gems/AudioSystem/Code/Source/Editor/AudioControl.h @@ -144,6 +144,8 @@ namespace AudioControls void SignalConnectionAdded(IAudioSystemControl* middlewareControl); void SignalConnectionRemoved(IAudioSystemControl* middlewareControl); + bool SwitchStateConnectionCheck(IAudioSystemControl* middlewareControl); + private: void SetId(CID id); void SetType(EACEControlType type); diff --git a/Gems/AudioSystem/Code/Source/Editor/AudioControlsEditorMainWindow.ui b/Gems/AudioSystem/Code/Source/Editor/AudioControlsEditorMainWindow.ui index 8954bbc812..b375f5e174 100644 --- a/Gems/AudioSystem/Code/Source/Editor/AudioControlsEditorMainWindow.ui +++ b/Gems/AudioSystem/Code/Source/Editor/AudioControlsEditorMainWindow.ui @@ -28,101 +28,105 @@ - - - - 1 - 0 - + + + Qt::Horizontal - - QDockWidget::NoDockWidgetFeatures - - - ATL Controls - - - - - 4 - - - 9 - - - 4 - - - 9 - - - - - - - - - - 2 - 1 - - - - QDockWidget::NoDockWidgetFeatures - - - Inspector - - - - - 4 - - - 9 - - - 4 - - - 9 - - - - - - - - - - 1 - 0 - - - + false - - QDockWidget::NoDockWidgetFeatures - - - Audio Middleware Controls - - - - - 4 - - - 9 - - - 4 - - - 9 - - + + + + 1 + 0 + + + + QDockWidget::NoDockWidgetFeatures + + + ATL Controls + + + + + 4 + + + 9 + + + 4 + + + 9 + + + + + + + + 2 + 1 + + + + QDockWidget::NoDockWidgetFeatures + + + Inspector + + + + + 4 + + + 9 + + + 4 + + + 9 + + + + + + + + 1 + 0 + + + + false + + + QDockWidget::NoDockWidgetFeatures + + + Audio Middleware Controls + + + + + 4 + + + 9 + + + 4 + + + 9 + + + @@ -134,7 +138,7 @@ 0 0 972 - 21 + 26 @@ -143,6 +147,7 @@ + @@ -154,6 +159,9 @@ Save All + + Ctrl+S + @@ -163,6 +171,17 @@ Reload + + Ctrl+R + + + + + Refresh Audio System + + + Ctrl+Shift+R + @@ -201,6 +220,22 @@ + + actionRefreshAudioSystem + triggered() + MainWindow + RefreshAudioSystem() + + + -1 + -1 + + + 485 + 336 + + + CurrentControlNameChanged(QString) diff --git a/Gems/AudioSystem/Code/Source/Editor/AudioControlsEditorUndo.cpp b/Gems/AudioSystem/Code/Source/Editor/AudioControlsEditorUndo.cpp index 062d14addf..311f8a98a0 100644 --- a/Gems/AudioSystem/Code/Source/Editor/AudioControlsEditorUndo.cpp +++ b/Gems/AudioSystem/Code/Source/Editor/AudioControlsEditorUndo.cpp @@ -11,7 +11,7 @@ #include #include - +#include #include #include @@ -273,6 +273,51 @@ namespace AudioControls pControl->m_connectedControls = m_connectedControls; pModel->OnControlModified(pControl); + auto& tmpConnectedControls1 = + connectedControls.size() > m_connectedControls.size() ? connectedControls : m_connectedControls; + auto& tmpConnectedControls2 = + connectedControls.size() > m_connectedControls.size() ? m_connectedControls : connectedControls; + for (auto& connection1 : tmpConnectedControls1) + { + bool bCheck = true; + for (auto& connection2 : tmpConnectedControls2) + { + if (connection1 == connection2) + { + bCheck = false; + break; + } + } + + if (!bCheck) + { + continue; + } + + if (IAudioSystemEditor* audioSystemImpl = CAudioControlsEditorPlugin::GetImplementationManager()->GetImplementation()) + { + if (IAudioSystemControl* middlewareControl = audioSystemImpl->GetControl(connection1->GetID())) + { + if (connectedControls.size() > m_connectedControls.size()) + { + audioSystemImpl->ConnectionRemoved(middlewareControl); + pControl->SignalConnectionRemoved(middlewareControl); + } + else + { + TConnectionPtr connection = + audioSystemImpl->CreateConnectionToControl(pControl->GetType(), middlewareControl); + if (connection) + { + pControl->SignalConnectionAdded(middlewareControl); + } + } + + pControl->SignalControlModified(); + } + } + } + m_name = name; m_scope = scope; m_isAutoLoad = isAutoLoad; diff --git a/Gems/AudioSystem/Code/Source/Editor/AudioControlsEditorUndo.h b/Gems/AudioSystem/Code/Source/Editor/AudioControlsEditorUndo.h index 86ea2f1807..dc64a392a5 100644 --- a/Gems/AudioSystem/Code/Source/Editor/AudioControlsEditorUndo.h +++ b/Gems/AudioSystem/Code/Source/Editor/AudioControlsEditorUndo.h @@ -49,7 +49,6 @@ namespace AudioControls explicit CUndoControlAdd(CID id); protected: int GetSize() override { return sizeof(*this); } - QString GetDescription() override { return "Undo ATL Control Add"; } void Undo(bool bUndo) override; void Redo() override; @@ -63,7 +62,6 @@ namespace AudioControls explicit CUndoControlRemove(AZStd::shared_ptr& pControl); protected: int GetSize() override { return sizeof(*this); } - QString GetDescription() override { return "Undo ATL Control Remove"; } void Undo(bool bUndo) override; void Redo() override; @@ -90,7 +88,6 @@ namespace AudioControls explicit CUndoFolderRemove(QStandardItem* pItem); protected: int GetSize() override { return sizeof(*this); } - QString GetDescription() override { return "Undo ATL Folder Remove"; } void Undo(bool bUndo) override; void Redo() override; @@ -104,7 +101,6 @@ namespace AudioControls explicit CUndoFolderAdd(QStandardItem* pItem); protected: int GetSize() override { return sizeof(*this); } - QString GetDescription() override { return "Undo ATL Folder Add"; } void Undo(bool bUndo) override; void Redo() override; @@ -118,7 +114,6 @@ namespace AudioControls explicit CUndoControlModified(CID id); protected: int GetSize() override { return sizeof(*this); } - QString GetDescription() override { return "Undo ATL Control Modify"; } void SwapData(); void Undo(bool bUndo) override; @@ -140,7 +135,6 @@ namespace AudioControls protected: int GetSize() override { return sizeof(*this); } - QString GetDescription() override { return "Undo ATL Control Move"; } void Undo(bool bUndo) override; void Redo() override; diff --git a/Gems/AudioSystem/Code/Source/Editor/AudioControlsEditorWindow.cpp b/Gems/AudioSystem/Code/Source/Editor/AudioControlsEditorWindow.cpp index 54a8ce616d..35b1f3f2c8 100644 --- a/Gems/AudioSystem/Code/Source/Editor/AudioControlsEditorWindow.cpp +++ b/Gems/AudioSystem/Code/Source/Editor/AudioControlsEditorWindow.cpp @@ -121,27 +121,6 @@ namespace AudioControls } } - //-------------------------------------------------------------------------------------------// - void CAudioControlsEditorWindow::keyPressEvent(QKeyEvent* pEvent) - { - if (pEvent->key() == Qt::Key_S && pEvent->modifiers() == Qt::ControlModifier) - { - Save(); - } - else if (pEvent->key() == Qt::Key_Z && (pEvent->modifiers() & Qt::ControlModifier)) - { - if (pEvent->modifiers() & Qt::ShiftModifier) - { - GetIEditor()->Redo(); - } - else - { - GetIEditor()->Undo(); - } - } - QMainWindow::keyPressEvent(pEvent); - } - //-------------------------------------------------------------------------------------------// void CAudioControlsEditorWindow::closeEvent(QCloseEvent* pEvent) { @@ -219,6 +198,20 @@ namespace AudioControls } } + //-------------------------------------------------------------------------------------------// + void CAudioControlsEditorWindow::RefreshAudioSystem() + { + QString sLevelName = GetIEditor()->GetLevelName(); + + if (QString::compare(sLevelName, "Untitled", Qt::CaseInsensitive) == 0) + { + // Rather pass empty QString to indicate that no level is loaded! + sLevelName = QString(); + } + + Audio::AudioSystemRequestBus::Broadcast(&Audio::AudioSystemRequestBus::Events::RefreshAudioSystem, sLevelName.toUtf8().data()); + } + //-------------------------------------------------------------------------------------------// void CAudioControlsEditorWindow::Save() { @@ -236,15 +229,7 @@ namespace AudioControls messageBox.setWindowTitle("Audio Controls Editor"); if (messageBox.exec() == QMessageBox::Yes) { - QString sLevelName = GetIEditor()->GetLevelName(); - - if (QString::compare(sLevelName, "Untitled", Qt::CaseInsensitive) == 0) - { - // Rather pass empty QString to indicate that no level is loaded! - sLevelName = QString(); - } - - Audio::AudioSystemRequestBus::Broadcast(&Audio::AudioSystemRequestBus::Events::RefreshAudioSystem, sLevelName.toUtf8().data()); + RefreshAudioSystem(); } } m_pATLModel->ClearDirtyFlags(); diff --git a/Gems/AudioSystem/Code/Source/Editor/AudioControlsEditorWindow.h b/Gems/AudioSystem/Code/Source/Editor/AudioControlsEditorWindow.h index abe5fd4511..43d0ed8c8e 100644 --- a/Gems/AudioSystem/Code/Source/Editor/AudioControlsEditorWindow.h +++ b/Gems/AudioSystem/Code/Source/Editor/AudioControlsEditorWindow.h @@ -61,9 +61,9 @@ namespace AudioControls void UpdateInspector(); void FilterControlType(EACEControlType type, bool bShow); void Update(); + void RefreshAudioSystem(); protected: - void keyPressEvent(QKeyEvent* pEvent) override; void closeEvent(QCloseEvent* pEvent) override; private: diff --git a/Gems/AudioSystem/Code/Source/Editor/AudioControlsWriter.cpp b/Gems/AudioSystem/Code/Source/Editor/AudioControlsWriter.cpp index eb022b706f..86f778bf03 100644 --- a/Gems/AudioSystem/Code/Source/Editor/AudioControlsWriter.cpp +++ b/Gems/AudioSystem/Code/Source/Editor/AudioControlsWriter.cpp @@ -102,7 +102,8 @@ namespace AudioControls for (auto it = librariesToDelete.begin(); it != librariesToDelete.end(); ++it) { - DeleteLibraryFile((*it).c_str()); + auto newPathOpt = fileIO->ResolvePath(AZ::IO::PathView{ *it }); + DeleteLibraryFile(newPathOpt.value().Native()); } previousLibraryPaths = m_foundLibraryPaths; diff --git a/Gems/AudioSystem/Code/Source/Editor/ConnectionsWidget.ui b/Gems/AudioSystem/Code/Source/Editor/ConnectionsWidget.ui index 120df694bc..b536ea541a 100644 --- a/Gems/AudioSystem/Code/Source/Editor/ConnectionsWidget.ui +++ b/Gems/AudioSystem/Code/Source/Editor/ConnectionsWidget.ui @@ -16,18 +16,6 @@ 0 - - - 0 - 450 - - - - - 16777215 - 450 - - Inspector Panel @@ -104,7 +92,7 @@ QFrame::Plain - + 0 diff --git a/Gems/AudioSystem/Code/Source/Editor/ImplementationManager.cpp b/Gems/AudioSystem/Code/Source/Editor/ImplementationManager.cpp index bee5c1dd51..f339ff8bb3 100644 --- a/Gems/AudioSystem/Code/Source/Editor/ImplementationManager.cpp +++ b/Gems/AudioSystem/Code/Source/Editor/ImplementationManager.cpp @@ -9,8 +9,6 @@ #include -#include - #include #include #include @@ -32,10 +30,6 @@ bool CImplementationManager::LoadImplementation() // release the loaded implementation (if any) Release(); - const char* engineRoot = nullptr; - AzFramework::ApplicationRequests::Bus::BroadcastResult(engineRoot, &AzFramework::ApplicationRequests::GetEngineRoot); - AZ_Assert(engineRoot != nullptr, "Unable to communicate with AzFramework::ApplicationRequests::Bus"); - AudioControlsEditor::EditorImplPluginEventBus::Broadcast(&AudioControlsEditor::EditorImplPluginEventBus::Events::InitializeEditorImplPlugin); } else diff --git a/Gems/AudioSystem/Code/Source/Editor/QConnectionsWidget.cpp b/Gems/AudioSystem/Code/Source/Editor/QConnectionsWidget.cpp index cdd7d937e3..d827f657b8 100644 --- a/Gems/AudioSystem/Code/Source/Editor/QConnectionsWidget.cpp +++ b/Gems/AudioSystem/Code/Source/Editor/QConnectionsWidget.cpp @@ -27,9 +27,9 @@ namespace AudioControls //-------------------------------------------------------------------------------------------// QConnectionsWidget::QConnectionsWidget(QWidget* parent) : QWidget(parent) + , m_control(nullptr) , m_notFoundColor(QColor(0xf3, 0x81, 0x1d)) , m_localizedColor(QColor(0x42, 0x85, 0xf4)) - , m_control(nullptr) { setupUi(this); @@ -101,7 +101,7 @@ namespace AudioControls contextMenu.exec(m_connectionList->mapToGlobal(pos)); } - //-------------------------------------------------------------------------------------------// + //-------------------------------------------------------------------------------------------// void QConnectionsWidget::SelectedConnectionChanged() { TConnectionPtr connection; @@ -120,6 +120,36 @@ namespace AudioControls } } } + + if (m_connectionPropertiesWidget) + { + delete m_connectionPropertiesWidget; + m_connectionPropertiesWidget = nullptr; + } + + if (connection && connection->HasProperties()) + { + if (IAudioSystemEditor* audioSystemImpl = CAudioControlsEditorPlugin::GetAudioSystemEditorImpl()) + { + m_connectionPropertiesWidget = audioSystemImpl->CreateConnectionPropertiesWidget(connection, controlType); + if (m_connectionPropertiesWidget) + { + m_connectionPropertiesWidget->setParent(m_connectionPropertiesFrame); + m_connectionPropertiesLayout->addWidget(m_connectionPropertiesWidget); + + bool widgetHasChangedSignal = m_connectionPropertiesWidget->metaObject()->indexOfSignal("PropertiesChanged()") != -1; + AZ_Error( + "Audio", widgetHasChangedSignal, + "The widget created by IAudioSystemEditor::CreateConnectionPropertiesWidget() must have a \"PropertiesChanged()\" " + "signal."); + + if (widgetHasChangedSignal) + { + connect(m_connectionPropertiesWidget, SIGNAL(PropertiesChanged()), this, SLOT(CurrentConnectionModified())); + } + } + } + } } //-------------------------------------------------------------------------------------------// @@ -150,6 +180,22 @@ namespace AudioControls } else { + if (m_control->GetType() == EACEControlType::eACET_SWITCH_STATE) + { + if (!m_control->GetParent()->SwitchStateConnectionCheck(middlewareControl)) + { + QMessageBox messageBox(this); + messageBox.setStandardButtons(QMessageBox::Ok); + messageBox.setDefaultButton(QMessageBox::Ok); + messageBox.setWindowTitle("Audio Controls Editor"); + messageBox.setText("Not in the same switch group, connection failed."); + if (messageBox.exec() == QMessageBox::Ok) + { + return; + } + } + } + connection = audioSystemImpl->CreateConnectionToControl(m_control->GetType(), middlewareControl); if (connection) { diff --git a/Gems/AudioSystem/Code/Source/Editor/QConnectionsWidget.h b/Gems/AudioSystem/Code/Source/Editor/QConnectionsWidget.h index 8107a37432..d1181d74c2 100644 --- a/Gems/AudioSystem/Code/Source/Editor/QConnectionsWidget.h +++ b/Gems/AudioSystem/Code/Source/Editor/QConnectionsWidget.h @@ -38,9 +38,9 @@ namespace AudioControls private slots: void ShowConnectionContextMenu(const QPoint& pos); - void SelectedConnectionChanged(); void CurrentConnectionModified(); void RemoveSelectedConnection(); + void SelectedConnectionChanged(); private: bool eventFilter(QObject* object, QEvent* event) override; @@ -51,6 +51,8 @@ namespace AudioControls CATLControl* m_control; QColor m_notFoundColor; QColor m_localizedColor; + + QWidget* m_connectionPropertiesWidget = nullptr; }; } // namespace AudioControls diff --git a/Gems/AudioSystem/Code/Source/Editor/QSimpleAudioControlListWidget.cpp b/Gems/AudioSystem/Code/Source/Editor/QSimpleAudioControlListWidget.cpp index de86efb6a7..6dc54ac642 100644 --- a/Gems/AudioSystem/Code/Source/Editor/QSimpleAudioControlListWidget.cpp +++ b/Gems/AudioSystem/Code/Source/Editor/QSimpleAudioControlListWidget.cpp @@ -225,6 +225,36 @@ namespace AudioControls { pItem->setFlags(pItem->flags() & ~Qt::ItemIsDragEnabled); } + + if (compatibleType == EACEControlType::eACET_SWITCH_STATE) + { + IAudioSystemControl* pControl = pAudioSystemEditorImpl->GetControl(GetItemId(pItem)); + if (pControl && !pControl->IsLocalized()) + { + size_t nConnect = 0; + for (int i = 0; i < pControl->GetParent()->ChildCount(); ++i) + { + IAudioSystemControl* child = pControl->GetParent()->GetChildAt(i); + if (child && child->IsConnected()) + { + ++nConnect; + } + } + + QTreeWidgetItem* pParentItem = GetItem(pControl->GetParent()->GetId(), pControl->GetParent()->IsLocalized()); + if (pParentItem) + { + if (nConnect > 0 && nConnect == pControl->GetParent()->ChildCount()) + { + pParentItem->setForeground(0, m_connectedColor); + } + else + { + pParentItem->setForeground(0, m_disconnectedColor); + } + } + } + } } } diff --git a/Gems/AudioSystem/Code/Source/Engine/FileCacheManager.cpp b/Gems/AudioSystem/Code/Source/Engine/FileCacheManager.cpp index b7ed9229d8..ffa94ad956 100644 --- a/Gems/AudioSystem/Code/Source/Engine/FileCacheManager.cpp +++ b/Gems/AudioSystem/Code/Source/Engine/FileCacheManager.cpp @@ -343,17 +343,6 @@ namespace Audio { if (CVars::s_debugDrawOptions.AreAllFlagsActive(DebugDraw::Options::FileCacheInfo)) { - EATLDataScope dataScope = eADS_ALL; - - if (CVars::s_fcmDrawOptions.AreAllFlagsActive(FileCacheManagerDebugDraw::Options::Global)) - { - dataScope = eADS_GLOBAL; - } - else if (CVars::s_fcmDrawOptions.AreAllFlagsActive(FileCacheManagerDebugDraw::Options::LevelSpecific)) - { - dataScope = eADS_LEVEL_SPECIFIC; - } - const auto frameTime = AZStd::chrono::system_clock::now(); const float entryDrawSize = 1.5f; @@ -446,7 +435,7 @@ namespace Audio } // Format: "relative/path/filename.ext (230 KiB) [2]" - auxGeom.Draw2dLabel(positionX, positionY, entryDrawSize, color, false, + auxGeom.Draw2dLabel(positionX, positionY, entryDrawSize, color, false, "%s (%zu %s) [%zu]", audioFileEntry->m_filePath.c_str(), fileSize, @@ -637,7 +626,7 @@ namespace Audio } } } - + /////////////////////////////////////////////////////////////////////////////////////////////// bool CFileCacheManager::AllocateMemoryBlockInternal(CATLAudioFileEntry* const audioFileEntry) { @@ -830,6 +819,11 @@ namespace Audio } else { + if (!audioFileEntry->m_asyncStreamRequest) + { + audioFileEntry->m_asyncStreamRequest = streamer->CreateRequest(); + } + streamer->Read( audioFileEntry->m_asyncStreamRequest, audioFileEntry->m_filePath.c_str(), diff --git a/Gems/AudioSystem/Code/Tests/AudioSystemTest.cpp b/Gems/AudioSystem/Code/Tests/AudioSystemTest.cpp index ba1603d2e2..14e9f74fd2 100644 --- a/Gems/AudioSystem/Code/Tests/AudioSystemTest.cpp +++ b/Gems/AudioSystem/Code/Tests/AudioSystemTest.cpp @@ -1051,7 +1051,7 @@ public: // Replace with a new LocalFileIO... m_fileIO = AZStd::make_unique(); AZ::IO::FileIOBase::SetInstance(m_fileIO.get()); - + AZStd::string rootFolder(AZ::Test::GetCurrentExecutablePath()); AZ::StringFunc::Path::Join(rootFolder.c_str(), "Test.Assets/Gems/AudioSystem/ATLData", rootFolder); diff --git a/Gems/AudioSystem/Code/Tests/Mocks/FileCacheManagerMock.h b/Gems/AudioSystem/Code/Tests/Mocks/FileCacheManagerMock.h index ee6cb6155d..06646216ae 100644 --- a/Gems/AudioSystem/Code/Tests/Mocks/FileCacheManagerMock.h +++ b/Gems/AudioSystem/Code/Tests/Mocks/FileCacheManagerMock.h @@ -47,7 +47,7 @@ namespace Audio MOCK_METHOD3(FinishCachingFileInternal, bool(CATLAudioFileEntry* const, AZ::IO::SizeType, AZ::IO::IStreamerTypes::RequestStatus)); MOCK_METHOD1(FinishAsyncStreamRequest, void(AZ::IO::FileRequestHandle)); - + MOCK_METHOD1(AllocateMemoryBlockInternal, bool(CATLAudioFileEntry* const)); MOCK_METHOD1(UncacheFile, void(CATLAudioFileEntry* const)); MOCK_METHOD0(TryToUncacheFiles, void()); diff --git a/Gems/AudioSystem/gem.json b/Gems/AudioSystem/gem.json index 64d4d9af5a..ed028068a1 100644 --- a/Gems/AudioSystem/gem.json +++ b/Gems/AudioSystem/gem.json @@ -2,6 +2,7 @@ "gem_name": "AudioSystem", "display_name": "Audio System", "license": "Apache-2.0 Or MIT", + "license_url": "https://github.com/o3de/o3de/blob/development/LICENSE.txt", "origin": "Open 3D Engine - o3de.org", "type": "Code", "summary": "The Audio System Gem provides the Audio Translation Layer (ATL) and Audio Controls Editor, which add support for audio in Open 3D Engine.", diff --git a/Gems/BarrierInput/Code/Source/BarrierInputClient.cpp b/Gems/BarrierInput/Code/Source/BarrierInputClient.cpp index ec4cbcfbd1..f564a0c1bc 100644 --- a/Gems/BarrierInput/Code/Source/BarrierInputClient.cpp +++ b/Gems/BarrierInput/Code/Source/BarrierInputClient.cpp @@ -254,7 +254,7 @@ namespace BarrierInput static bool barrierBye([[maybe_unused]]BarrierClient* pContext, [[maybe_unused]]int* pArgs, [[maybe_unused]]Stream* pStream, [[maybe_unused]]int streamLeft) { - AZLOG_INFO("BarrierClient: Server said bye. Disconnecting\n"); + AZLOG_INFO("BarrierClient: Server said bye. Disconnecting"); return false; } @@ -284,7 +284,7 @@ namespace BarrierInput const char* packetStart = stream.GetData(); if (packetLength > streamLength) { - AZLOG_INFO("BarrierClient: Packet overruns buffer (Packet Length: %d Buffer Length: %d), probably lots of data on clipboard?\n", packetLength, streamLength); + AZLOG_INFO("BarrierClient: Packet overruns buffer (Packet Length: %d Buffer Length: %d), probably lots of data on clipboard?", packetLength, streamLength); return false; } @@ -377,7 +377,7 @@ namespace BarrierInput const int lengthReceived = AZ::AzSock::Recv(m_socket, stream.GetBuffer(), stream.GetBufferSize(), 0); if (lengthReceived <= 0) { - AZLOG_INFO("BarrierClient: Receive failed, reconnecting.\n"); + AZLOG_INFO("BarrierClient: Receive failed, reconnecting."); connected = false; continue; } @@ -386,7 +386,7 @@ namespace BarrierInput stream.SetLength(lengthReceived); if (!ProcessPackets(this, stream)) { - AZLOG_INFO("BarrierClient: Packet processing failed, reconnecting.\n"); + AZLOG_INFO("BarrierClient: Packet processing failed, reconnecting."); connected = false; continue; } diff --git a/Gems/BarrierInput/gem.json b/Gems/BarrierInput/gem.json index 7fdc58e8b3..72d6398550 100644 --- a/Gems/BarrierInput/gem.json +++ b/Gems/BarrierInput/gem.json @@ -2,6 +2,7 @@ "gem_name": "BarrierInput", "display_name": "Barrier Input", "license": "Apache-2.0 Or MIT", + "license_url": "https://github.com/o3de/o3de/blob/development/LICENSE.txt", "origin": "Open 3D Engine - o3de.org", "type": "Code", "summary": "The Barrier Input Gem allows the Open 3D Engine to function as a Barrier client so that it can receive input from a remote Barrier server.", diff --git a/Gems/Blast/AssetProcessorGemConfig.setreg b/Gems/Blast/AssetProcessorGemConfig.setreg index 49d85f1a90..e820d41104 100644 --- a/Gems/Blast/AssetProcessorGemConfig.setreg +++ b/Gems/Blast/AssetProcessorGemConfig.setreg @@ -10,6 +10,7 @@ "RC blastmaterial": { "glob": "*.blastmaterial", "params": "copy", + "critical": true, "productAssetType": "{55F38C86-0767-4E7F-830A-A4BF624BE4DA}" }, "RC blastconfiguration": { diff --git a/Gems/Blast/Code/Source/Components/BlastSystemComponent.cpp b/Gems/Blast/Code/Source/Components/BlastSystemComponent.cpp index 4c0f15463a..945d4eafb0 100644 --- a/Gems/Blast/Code/Source/Components/BlastSystemComponent.cpp +++ b/Gems/Blast/Code/Source/Components/BlastSystemComponent.cpp @@ -151,6 +151,8 @@ namespace Blast SaveConfiguration(); DeactivatePhysics(); + m_configuration.m_materialLibrary.Release(); + m_assetHandlers.clear(); }; diff --git a/Gems/Blast/Code/Source/Editor/EditorSystemComponent.h b/Gems/Blast/Code/Source/Editor/EditorSystemComponent.h index 31daae1a18..fe17bfaac0 100644 --- a/Gems/Blast/Code/Source/Editor/EditorSystemComponent.h +++ b/Gems/Blast/Code/Source/Editor/EditorSystemComponent.h @@ -31,12 +31,12 @@ namespace Blast private: static void GetProvidedServices(AZ::ComponentDescriptor::DependencyArrayType& provided) { - provided.push_back(AZ_CRC("BlastEditorService", 0x0a61cda5)); + provided.push_back(AZ_CRC("BlastEditorService", 0xeddfed0d)); } static void GetRequiredServices(AZ::ComponentDescriptor::DependencyArrayType& required) { - required.push_back(AZ_CRC("BlastService", 0x75beae2d)); + required.push_back(AZ_CRC("BlastService", 0x46927a9f)); } AZStd::unique_ptr m_editorBlastChunksAssetHandler; diff --git a/Gems/Blast/gem.json b/Gems/Blast/gem.json index d6af47f482..761eb04761 100644 --- a/Gems/Blast/gem.json +++ b/Gems/Blast/gem.json @@ -2,6 +2,7 @@ "gem_name": "Blast", "display_name": "NVIDIA Blast", "license": "Apache-2.0 Or MIT", + "license_url": "https://github.com/o3de/o3de/blob/development/LICENSE.txt", "origin": "Open 3D Engine - o3de.org", "type": "Code", "summary": "The NVIDIA Blast Gem provides tools to author fractured mesh assets in Houdini, and functionality to create realistic destruction simulations in Open 3D Engine.", diff --git a/Gems/Camera/Code/Source/CameraComponentController.cpp b/Gems/Camera/Code/Source/CameraComponentController.cpp index b8e5738145..5b2e26b897 100644 --- a/Gems/Camera/Code/Source/CameraComponentController.cpp +++ b/Gems/Camera/Code/Source/CameraComponentController.cpp @@ -151,7 +151,12 @@ namespace Camera void CameraComponentController::SetShouldActivateFunction(AZStd::function shouldActivateFunction) { - m_shouldActivateFn = shouldActivateFunction; + m_shouldActivateFn = AZStd::move(shouldActivateFunction); + } + + void CameraComponentController::SetIsLockedFunction(AZStd::function isLockedFunction) + { + m_isLockedFn = AZStd::move(isLockedFunction); } void CameraComponentController::Reflect(AZ::ReflectContext* context) @@ -195,10 +200,11 @@ namespace Camera { m_onViewMatrixChanged = AZ::Event::Handler([this](const AZ::Matrix4x4&) { - if (!m_updatingTransformFromEntity) + if (!m_updatingTransformFromEntity && !m_isLockedFn()) { AZ::TransformBus::Event(m_entityId, &AZ::TransformInterface::SetWorldTM, m_atomCamera->GetCameraTransform()); } + }); } diff --git a/Gems/Camera/Code/Source/CameraComponentController.h b/Gems/Camera/Code/Source/CameraComponentController.h index 5eca6b1711..09af7529dc 100644 --- a/Gems/Camera/Code/Source/CameraComponentController.h +++ b/Gems/Camera/Code/Source/CameraComponentController.h @@ -70,6 +70,9 @@ namespace Camera //! Used by the Editor to disable undesirable camera changes in edit mode. void SetShouldActivateFunction(AZStd::function shouldActivateFunction); + //! Defines a callback for determining whether this camera is currently locked by its transform. + void SetIsLockedFunction(AZStd::function isLockedFunction); + // Controller interface static void Reflect(AZ::ReflectContext* context); static void GetRequiredServices(AZ::ComponentDescriptor::DependencyArrayType& required); @@ -136,5 +139,6 @@ namespace Camera bool m_isActiveView = false; AZStd::function m_shouldActivateFn; + AZStd::function m_isLockedFn = []{ return false; }; }; } // namespace Camera diff --git a/Gems/Camera/Code/Source/CameraEditorSystemComponent.cpp b/Gems/Camera/Code/Source/CameraEditorSystemComponent.cpp index 00a147c17a..d2f7469c58 100644 --- a/Gems/Camera/Code/Source/CameraEditorSystemComponent.cpp +++ b/Gems/Camera/Code/Source/CameraEditorSystemComponent.cpp @@ -20,6 +20,7 @@ #include #include #include +#include #include #include "ViewportCameraSelectorWindow.h" @@ -70,7 +71,20 @@ namespace Camera if (!(flags & AzToolsFramework::EditorEvents::eECMF_HIDE_ENTITY_CREATION)) { QAction* action = menu->addAction(QObject::tr("Create camera entity from view")); - QObject::connect(action, &QAction::triggered, [this]() { CreateCameraEntityFromViewport(); }); + const auto prefabEditorEntityOwnershipInterface = AZ::Interface::Get(); + if (prefabEditorEntityOwnershipInterface && !prefabEditorEntityOwnershipInterface->IsRootPrefabAssigned()) + { + action->setEnabled(false); + } + else + { + QObject::connect( + action, &QAction::triggered, + [this]() + { + CreateCameraEntityFromViewport(); + }); + } } } @@ -99,7 +113,7 @@ namespace Camera // Set transform to that of the viewport, otherwise default to Identity matrix and 60 degree FOV const auto worldFromView = AzFramework::CameraTransform(cameraState); const auto cameraTransform = AZ::Transform::CreateFromMatrix3x3AndTranslation( - AZ::Matrix3x3::CreateFromMatrix4x4(worldFromView), worldFromView.GetTranslation()); + AZ::Matrix3x3::CreateFromMatrix3x4(worldFromView), worldFromView.GetTranslation()); AZ::TransformBus::Event(newEntityId, &AZ::TransformInterface::SetWorldTM, cameraTransform); CameraRequestBus::Event(newEntityId, &CameraComponentRequests::SetFov, AZ::RadToDeg(cameraState.m_fovOrZoom)); undoBatch.MarkEntityDirty(newEntityId); diff --git a/Gems/Camera/Code/Source/EditorCameraComponent.cpp b/Gems/Camera/Code/Source/EditorCameraComponent.cpp index cf32fdedff..4f97f27eba 100644 --- a/Gems/Camera/Code/Source/EditorCameraComponent.cpp +++ b/Gems/Camera/Code/Source/EditorCameraComponent.cpp @@ -18,6 +18,7 @@ #include #include +#include namespace Camera { @@ -41,6 +42,16 @@ namespace Camera return isInGameMode; }); + // Only allow our camera to move when the transform is not locked. + m_controller.SetIsLockedFunction([this]() + { + bool locked = false; + AzToolsFramework::Components::TransformComponentMessages::Bus::EventResult( + locked, GetEntityId(), &AzToolsFramework::Components::TransformComponentMessages::IsTransformLocked); + + return locked; + }); + // Call base class activate, which in turn calls Activate on our controller. EditorCameraComponentBase::Activate(); diff --git a/Gems/Camera/Code/Source/ViewportCameraSelectorWindow.cpp b/Gems/Camera/Code/Source/ViewportCameraSelectorWindow.cpp index dc091db9e5..eb1fd9890c 100644 --- a/Gems/Camera/Code/Source/ViewportCameraSelectorWindow.cpp +++ b/Gems/Camera/Code/Source/ViewportCameraSelectorWindow.cpp @@ -7,14 +7,14 @@ */ #include "ViewportCameraSelectorWindow.h" #include "ViewportCameraSelectorWindow_Internals.h" -#include -#include -#include -#include -#include -#include #include #include +#include +#include +#include +#include +#include +#include namespace Qt { @@ -64,12 +64,14 @@ namespace Camera CameraListModel::CameraListModel(QWidget* myParent) : QAbstractListModel(myParent) { + m_lastActiveCamera = AZ::EntityId(); m_cameraItems.push_back(AZ::EntityId()); CameraNotificationBus::Handler::BusConnect(); } CameraListModel::~CameraListModel() { + m_firstEntry = true; // set the view entity id back to Invalid, thus enabling the editor camera EditorCameraRequests::Bus::Broadcast(&EditorCameraRequests::SetViewFromEntityPerspective, AZ::EntityId()); @@ -98,11 +100,13 @@ namespace Camera { // If the camera entity is not an editor camera entity, don't add it to the list. // This occurs when we're in simulation mode. + + //We reset the m_firstEntry value so we can update m_lastActiveCamera when we remove from the cameras list + m_firstEntry = true; + bool isEditorEntity = false; AzToolsFramework::EditorEntityContextRequestBus::BroadcastResult( - isEditorEntity, - &AzToolsFramework::EditorEntityContextRequests::IsEditorEntity, - cameraId); + isEditorEntity, &AzToolsFramework::EditorEntityContextRequests::IsEditorEntity, cameraId); if (!isEditorEntity) { return; @@ -111,11 +115,25 @@ namespace Camera beginInsertRows(QModelIndex(), rowCount(), rowCount()); m_cameraItems.push_back(cameraId); endInsertRows(); + + if (m_lastActiveCamera.IsValid() && m_lastActiveCamera == cameraId) + { + Camera::CameraRequestBus::Event(cameraId, &Camera::CameraRequestBus::Events::MakeActiveView); + } } void CameraListModel::OnCameraRemoved(const AZ::EntityId& cameraId) { - auto cameraIt = AZStd::find_if(m_cameraItems.begin(), m_cameraItems.end(), + //Check it is the first time we remove a camera from the list before any other addition + //So we don't end up with the wrong camera ID. + if (m_firstEntry) + { + CameraSystemRequestBus::BroadcastResult(m_lastActiveCamera, &CameraSystemRequestBus::Events::GetActiveCamera); + m_firstEntry = false; + } + + auto cameraIt = AZStd::find_if( + m_cameraItems.begin(), m_cameraItems.end(), [&cameraId](const CameraListItem& entry) { return entry.m_cameraId == cameraId; @@ -162,7 +180,12 @@ namespace Camera // use the stylesheet for elements in a set where one item must be selected at all times setProperty("class", "SingleRequiredSelection"); - connect(m_cameraList, &CameraListModel::rowsInserted, this, [sortedProxyModel](const QModelIndex&, int, int) { sortedProxyModel->sortColumn(); }); + connect( + m_cameraList, &CameraListModel::rowsInserted, this, + [sortedProxyModel](const QModelIndex&, int, int) + { + sortedProxyModel->sortColumn(); + }); // highlight the current selected camera entity AZ::EntityId currentSelection; @@ -188,7 +211,8 @@ namespace Camera QScopedValueRollback rb(m_ignoreViewportViewEntityChanged, true); AZ::EntityId entityId = selectionModel()->currentIndex().data(Qt::CameraIdRole).value(); - EditorCameraRequests::Bus::Broadcast(&EditorCameraRequests::SetViewAndMovementLockFromEntityPerspective, entityId, lockCameraMovement); + EditorCameraRequests::Bus::Broadcast( + &EditorCameraRequests::SetViewAndMovementLockFromEntityPerspective, entityId, lockCameraMovement); } } @@ -220,7 +244,9 @@ namespace Camera } // swallow mouse move events so we can disable sloppy selection - void ViewportCameraSelectorWindow::mouseMoveEvent(QMouseEvent*) {} + void ViewportCameraSelectorWindow::mouseMoveEvent(QMouseEvent*) + { + } // double click selects the entity void ViewportCameraSelectorWindow::mouseDoubleClickEvent([[maybe_unused]] QMouseEvent* event) @@ -228,11 +254,13 @@ namespace Camera AZ::EntityId entityId = selectionModel()->currentIndex().data(Qt::CameraIdRole).value(); if (entityId.IsValid()) { - AzToolsFramework::ToolsApplicationRequestBus::Broadcast(&AzToolsFramework::ToolsApplicationRequestBus::Events::SetSelectedEntities, AzToolsFramework::EntityIdList { entityId }); + AzToolsFramework::ToolsApplicationRequestBus::Broadcast( + &AzToolsFramework::ToolsApplicationRequestBus::Events::SetSelectedEntities, AzToolsFramework::EntityIdList{ entityId }); } else { - AzToolsFramework::ToolsApplicationRequestBus::Broadcast(&AzToolsFramework::ToolsApplicationRequestBus::Events::SetSelectedEntities, AzToolsFramework::EntityIdList {}); + AzToolsFramework::ToolsApplicationRequestBus::Broadcast( + &AzToolsFramework::ToolsApplicationRequestBus::Events::SetSelectedEntities, AzToolsFramework::EntityIdList{}); } } @@ -290,7 +318,10 @@ namespace Camera : QWidget(parent) { setLayout(new QVBoxLayout(this)); - auto label = new QLabel("Select the camera you wish to view and navigate through. Closing this window will return you to the default editor camera.", this); + auto label = new QLabel( + "Select the camera you wish to view and navigate through. Closing this window will return you to the default editor " + "camera.", + this); label->setWordWrap(true); layout()->addWidget(label); layout()->addWidget(new ViewportCameraSelectorWindow(this)); @@ -309,6 +340,8 @@ namespace Camera viewOptions.isPreview = true; viewOptions.showInMenu = true; viewOptions.preferedDockingArea = Qt::DockWidgetArea::LeftDockWidgetArea; - AzToolsFramework::EditorRequestBus::Broadcast(&AzToolsFramework::EditorRequestBus::Events::RegisterViewPane, s_viewportCameraSelectorName, "Viewport", viewOptions, &Internal::CreateNewSelectionWindow); + AzToolsFramework::EditorRequestBus::Broadcast( + &AzToolsFramework::EditorRequestBus::Events::RegisterViewPane, s_viewportCameraSelectorName, "Viewport", viewOptions, + &Internal::CreateNewSelectionWindow); } } // namespace Camera diff --git a/Gems/Camera/Code/Source/ViewportCameraSelectorWindow_Internals.h b/Gems/Camera/Code/Source/ViewportCameraSelectorWindow_Internals.h index b07ae7789f..21f316b83d 100644 --- a/Gems/Camera/Code/Source/ViewportCameraSelectorWindow_Internals.h +++ b/Gems/Camera/Code/Source/ViewportCameraSelectorWindow_Internals.h @@ -58,6 +58,11 @@ namespace Camera private: AZStd::vector m_cameraItems; AZ::EntityId m_sequenceCameraEntityId; + AZ::EntityId m_lastActiveCamera; + + //Value to check that is the first time that we remove a camera before adding a new one. + //So we can update m_lastActiveCamera properly + bool m_firstEntry = true; }; struct ViewportCameraSelectorWindow diff --git a/Gems/Camera/gem.json b/Gems/Camera/gem.json index 9f8ea22412..4cf0747c7b 100644 --- a/Gems/Camera/gem.json +++ b/Gems/Camera/gem.json @@ -2,6 +2,7 @@ "gem_name": "Camera", "display_name": "Camera", "license": "Apache-2.0 Or MIT", + "license_url": "https://github.com/o3de/o3de/blob/development/LICENSE.txt", "origin": "Open 3D Engine - o3de.org", "type": "Code", "summary": "The Camera Gem provides a basic camera component that defines a frustum for runtime rendering.", diff --git a/Gems/CameraFramework/gem.json b/Gems/CameraFramework/gem.json index c5520fd5b4..d24014be61 100644 --- a/Gems/CameraFramework/gem.json +++ b/Gems/CameraFramework/gem.json @@ -2,6 +2,7 @@ "gem_name": "CameraFramework", "display_name": "Camera Framework", "license": "Apache-2.0 Or MIT", + "license_url": "https://github.com/o3de/o3de/blob/development/LICENSE.txt", "origin": "Open 3D Engine - o3de.org", "type": "Code", "summary": "The Camera Framework Gem provides a base for implementing more complex camera systems.", diff --git a/Gems/CertificateManager/gem.json b/Gems/CertificateManager/gem.json index 968da2788a..11ea14ea5e 100644 --- a/Gems/CertificateManager/gem.json +++ b/Gems/CertificateManager/gem.json @@ -2,6 +2,7 @@ "gem_name": "CertificateManager", "display_name": "Certificate Manager", "license": "Apache-2.0 Or MIT", + "license_url": "https://github.com/o3de/o3de/blob/development/LICENSE.txt", "origin": "Open 3D Engine - o3de.org", "type": "Code", "summary": "The Certificate Manager Gem provides access to authentication files for secure game connections from Amazon S3, files on disk, and other 3rd party sources.", diff --git a/Gems/CrashReporting/gem.json b/Gems/CrashReporting/gem.json index 9b8d3a9e0a..b8c75548a4 100644 --- a/Gems/CrashReporting/gem.json +++ b/Gems/CrashReporting/gem.json @@ -2,6 +2,7 @@ "gem_name": "CrashReporting", "display_name": "Crash Reporting", "license": "Apache-2.0 Or MIT", + "license_url": "https://github.com/o3de/o3de/blob/development/LICENSE.txt", "origin": "Open 3D Engine - o3de.org", "type": "Code", "summary": "The Crash Reporting Gem provides support for external crash reporting for Open 3D Engine projects.", diff --git a/Gems/CustomAssetExample/gem.json b/Gems/CustomAssetExample/gem.json index ab5ed7002d..89492ee6ea 100644 --- a/Gems/CustomAssetExample/gem.json +++ b/Gems/CustomAssetExample/gem.json @@ -2,6 +2,7 @@ "gem_name": "CustomAssetExample", "display_name": "Custom Asset Example", "license": "Apache-2.0 Or MIT", + "license_url": "https://github.com/o3de/o3de/blob/development/LICENSE.txt", "origin": "Open 3D Engine - o3de.org", "type": "Code", "summary": "The Custom Asset Example Gem provides example code for creating a custom asset for Open 3D Engine's asset pipeline.", diff --git a/Gems/DebugDraw/gem.json b/Gems/DebugDraw/gem.json index 7e0da07103..58eff5f87a 100644 --- a/Gems/DebugDraw/gem.json +++ b/Gems/DebugDraw/gem.json @@ -2,6 +2,7 @@ "gem_name": "DebugDraw", "display_name": "Debug Draw", "license": "Apache-2.0 Or MIT", + "license_url": "https://github.com/o3de/o3de/blob/development/LICENSE.txt", "origin": "Open 3D Engine - o3de.org", "type": "Code", "summary": "The Debug Draw Gem provides Editor and runtime debug visualization features for Open 3D Engine.", diff --git a/Gems/DevTextures/gem.json b/Gems/DevTextures/gem.json index 8b40badbf1..00cafbd6fb 100644 --- a/Gems/DevTextures/gem.json +++ b/Gems/DevTextures/gem.json @@ -2,6 +2,7 @@ "gem_name": "DevTextures", "display_name": "Dev Textures", "license": "Apache-2.0 Or MIT", + "license_url": "https://github.com/o3de/o3de/blob/development/LICENSE.txt", "origin": "Open 3D Engine - o3de.org", "type": "Asset", "summary": "The Dev Textures Gem provides a collection of general purpose texture assets useful for prototypes and preproduction.", diff --git a/Gems/EMotionFX/Code/EMotionFX/CommandSystem/Source/ActorInstanceCommands.cpp b/Gems/EMotionFX/Code/EMotionFX/CommandSystem/Source/ActorInstanceCommands.cpp index ba25318944..328c905ded 100644 --- a/Gems/EMotionFX/Code/EMotionFX/CommandSystem/Source/ActorInstanceCommands.cpp +++ b/Gems/EMotionFX/Code/EMotionFX/CommandSystem/Source/ActorInstanceCommands.cpp @@ -439,6 +439,12 @@ namespace CommandSystem return false; } + if (actorInstance->GetEntity()) + { + outResult = AZStd::string::format("Cannot remove actor instance. Actor instance %i belongs to an entity.", actorInstanceID); + return false; + } + // store the old values before removing the instance m_oldPosition = actorInstance->GetLocalSpaceTransform().m_position; m_oldRotation = actorInstance->GetLocalSpaceTransform().m_rotation; @@ -618,7 +624,7 @@ namespace CommandSystem MCore::CommandGroup commandGroup("Remove actor instances", numActorInstances); AZStd::string tempString; - // iterate over the selected instances and clone them + // iterate over the selected instances and remove them for (size_t i = 0; i < numActorInstances; ++i) { // get the current actor instance @@ -628,6 +634,18 @@ namespace CommandSystem continue; } + // Do not remove any runtime instance from the manager using the commands. + if (actorInstance->GetIsOwnedByRuntime()) + { + continue; + } + + // Do not remove the any instances owned by an entity from the manager using the commands. + if (actorInstance->GetEntity()) + { + continue; + } + tempString = AZStd::string::format("RemoveActorInstance -actorInstanceID %i", actorInstance->GetID()); commandGroup.AddCommandString(tempString.c_str()); } diff --git a/Gems/EMotionFX/Code/EMotionFX/CommandSystem/Source/ActorInstanceCommands.h b/Gems/EMotionFX/Code/EMotionFX/CommandSystem/Source/ActorInstanceCommands.h index 604d88d037..4681b19bf2 100644 --- a/Gems/EMotionFX/Code/EMotionFX/CommandSystem/Source/ActorInstanceCommands.h +++ b/Gems/EMotionFX/Code/EMotionFX/CommandSystem/Source/ActorInstanceCommands.h @@ -6,8 +6,7 @@ * */ -#ifndef __EMFX_ACTORINSTANCECOMMANDS_H -#define __EMFX_ACTORINSTANCECOMMANDS_H +#pragma once // include the required headers #include "CommandSystemConfig.h" @@ -61,6 +60,3 @@ public: void COMMANDSYSTEM_API MakeSelectedActorInstancesVisible(); void COMMANDSYSTEM_API UnselectSelectedActorInstances(); } // namespace CommandSystem - - -#endif diff --git a/Gems/EMotionFX/Code/EMotionFX/CommandSystem/Source/AnimGraphCommands.cpp b/Gems/EMotionFX/Code/EMotionFX/CommandSystem/Source/AnimGraphCommands.cpp index bd5a14f772..b1a830c838 100644 --- a/Gems/EMotionFX/Code/EMotionFX/CommandSystem/Source/AnimGraphCommands.cpp +++ b/Gems/EMotionFX/Code/EMotionFX/CommandSystem/Source/AnimGraphCommands.cpp @@ -455,8 +455,17 @@ namespace CommandSystem EMotionFX::ActorInstance* actorInstance = nullptr; if (parameters.CheckIfHasParameter("actorInstanceID")) { - const uint32 actorInstanceID = parameters.GetValueAsInt("actorInstanceID", this); - actorInstance = EMotionFX::GetActorManager().FindActorInstanceByID(actorInstanceID); + const int actorInstanceID = parameters.GetValueAsInt("actorInstanceID", this); + if (actorInstanceID == -1) + { + // If there isn't an actorInstanceId, grab the first actor instance. + actorInstance = EMotionFX::GetActorManager().GetFirstEditorActorInstance(); + } + else + { + actorInstance = EMotionFX::GetActorManager().FindActorInstanceByID(actorInstanceID); + } + if (!actorInstance) { outResult = AZStd::string::format("Cannot activate anim graph. Actor instance id '%i' is not valid.", actorInstanceID); diff --git a/Gems/EMotionFX/Code/EMotionFX/CommandSystem/Source/AttachmentCommands.h b/Gems/EMotionFX/Code/EMotionFX/CommandSystem/Source/AttachmentCommands.h index db4f4b9e04..8ea098021f 100644 --- a/Gems/EMotionFX/Code/EMotionFX/CommandSystem/Source/AttachmentCommands.h +++ b/Gems/EMotionFX/Code/EMotionFX/CommandSystem/Source/AttachmentCommands.h @@ -6,8 +6,7 @@ * */ -#ifndef __EMFX_ATTACHMENTCOMMANDS_H -#define __EMFX_ATTACHMENTCOMMANDS_H +#pragma once // include the required headers #include "CommandSystemConfig.h" @@ -35,6 +34,3 @@ public: static bool AddAttachment(MCore::Command* command, const MCore::CommandLine& parameters, AZStd::string& outResult, bool remove); MCORE_DEFINECOMMAND_END } // namespace CommandSystem - - -#endif diff --git a/Gems/EMotionFX/Code/EMotionFX/CommandSystem/Source/CommandSystemConfig.h b/Gems/EMotionFX/Code/EMotionFX/CommandSystem/Source/CommandSystemConfig.h index 48d2d01644..328785453c 100644 --- a/Gems/EMotionFX/Code/EMotionFX/CommandSystem/Source/CommandSystemConfig.h +++ b/Gems/EMotionFX/Code/EMotionFX/CommandSystem/Source/CommandSystemConfig.h @@ -6,8 +6,7 @@ * */ -#ifndef __COMMANDSYSTEM_CONFIG_H -#define __COMMANDSYSTEM_CONFIG_H +#pragma once #include @@ -35,5 +34,3 @@ enum { MEMCATEGORY_COMMANDSYSTEM = 990 }; - -#endif diff --git a/Gems/EMotionFX/Code/EMotionFX/CommandSystem/Source/ImporterCommands.h b/Gems/EMotionFX/Code/EMotionFX/CommandSystem/Source/ImporterCommands.h index 6e8f4728c7..b3906dbfe0 100644 --- a/Gems/EMotionFX/Code/EMotionFX/CommandSystem/Source/ImporterCommands.h +++ b/Gems/EMotionFX/Code/EMotionFX/CommandSystem/Source/ImporterCommands.h @@ -6,8 +6,7 @@ * */ -#ifndef __EMFX_IMPORTERCOMMANDS_H -#define __EMFX_IMPORTERCOMMANDS_H +#pragma once // include the required headers #include "CommandSystemConfig.h" @@ -35,6 +34,3 @@ public: MCORE_DEFINECOMMAND_END } // namespace CommandSystem - - -#endif diff --git a/Gems/EMotionFX/Code/EMotionFX/CommandSystem/Source/MorphTargetCommands.h b/Gems/EMotionFX/Code/EMotionFX/CommandSystem/Source/MorphTargetCommands.h index 2ae284e907..7bfb0084aa 100644 --- a/Gems/EMotionFX/Code/EMotionFX/CommandSystem/Source/MorphTargetCommands.h +++ b/Gems/EMotionFX/Code/EMotionFX/CommandSystem/Source/MorphTargetCommands.h @@ -6,8 +6,7 @@ * */ -#ifndef __EMFX_MORPHTARGETCOMMANDS_H -#define __EMFX_MORPHTARGETCOMMANDS_H +#pragma once // include the required headers #include "CommandSystemConfig.h" @@ -30,6 +29,3 @@ namespace CommandSystem bool GetMorphTarget(EMotionFX::Actor* actor, EMotionFX::ActorInstance* actorInstance, uint32 lodLevel, const char* morphTargetName, EMotionFX::MorphTarget** outMorphTarget, EMotionFX::MorphSetupInstance::MorphTarget** outMorphTargetInstance, AZStd::string& outResult); MCORE_DEFINECOMMAND_END } // namespace CommandSystem - - -#endif diff --git a/Gems/EMotionFX/Code/EMotionFX/CommandSystem/Source/SelectionCommands.h b/Gems/EMotionFX/Code/EMotionFX/CommandSystem/Source/SelectionCommands.h index 13a39e5e8a..04af437935 100644 --- a/Gems/EMotionFX/Code/EMotionFX/CommandSystem/Source/SelectionCommands.h +++ b/Gems/EMotionFX/Code/EMotionFX/CommandSystem/Source/SelectionCommands.h @@ -6,8 +6,7 @@ * */ -#ifndef __EMFX_SELECTIONCOMMANDS_H -#define __EMFX_SELECTIONCOMMANDS_H +#pragma once // include the required headers #include "CommandSystemConfig.h" @@ -49,6 +48,3 @@ public: bool COMMANDSYSTEM_API CheckIfHasAnimGraphSelectionParameter(const MCore::CommandLine& parameters); bool COMMANDSYSTEM_API CheckIfHasActorSelectionParameter(const MCore::CommandLine& parameters, bool ignoreInstanceParameters = false); } // namespace CommandSystem - - -#endif diff --git a/Gems/EMotionFX/Code/EMotionFX/Rendering/Common/Camera.h b/Gems/EMotionFX/Code/EMotionFX/Rendering/Common/Camera.h index 46b81a9d25..2c685ce77f 100644 --- a/Gems/EMotionFX/Code/EMotionFX/Rendering/Common/Camera.h +++ b/Gems/EMotionFX/Code/EMotionFX/Rendering/Common/Camera.h @@ -6,8 +6,7 @@ * */ -#ifndef __MCOMMON_CAMERA_H -#define __MCOMMON_CAMERA_H +#pragma once #include #include @@ -280,6 +279,3 @@ namespace MCommon // include inline code #include "Camera.inl" } // namespace MCommon - - -#endif diff --git a/Gems/EMotionFX/Code/EMotionFX/Rendering/Common/FirstPersonCamera.h b/Gems/EMotionFX/Code/EMotionFX/Rendering/Common/FirstPersonCamera.h index e0abe7922c..fa3631713c 100644 --- a/Gems/EMotionFX/Code/EMotionFX/Rendering/Common/FirstPersonCamera.h +++ b/Gems/EMotionFX/Code/EMotionFX/Rendering/Common/FirstPersonCamera.h @@ -6,8 +6,7 @@ * */ -#ifndef __MCOMMON_FIRSTPERSONCAMERA_H -#define __MCOMMON_FIRSTPERSONCAMERA_H +#pragma once // include required headers #include "Camera.h" @@ -124,6 +123,3 @@ namespace MCommon float m_roll; /**< Rotation around axis of screen. (0=straight, +clockwise, -CCW) */ }; } // namespace MCommon - - -#endif diff --git a/Gems/EMotionFX/Code/EMotionFX/Rendering/Common/LookAtCamera.h b/Gems/EMotionFX/Code/EMotionFX/Rendering/Common/LookAtCamera.h index e17fe65985..a2fd21a9b9 100644 --- a/Gems/EMotionFX/Code/EMotionFX/Rendering/Common/LookAtCamera.h +++ b/Gems/EMotionFX/Code/EMotionFX/Rendering/Common/LookAtCamera.h @@ -6,8 +6,7 @@ * */ -#ifndef __MCOMMON_LOOKATCAMERA_H -#define __MCOMMON_LOOKATCAMERA_H +#pragma once // include required headers #include "Camera.h" @@ -91,6 +90,3 @@ namespace MCommon AZ::Vector3 m_up; /**< The up vector of the camera. */ }; } // namespace MCommon - - -#endif diff --git a/Gems/EMotionFX/Code/EMotionFX/Rendering/Common/MCommonConfig.h b/Gems/EMotionFX/Code/EMotionFX/Rendering/Common/MCommonConfig.h index 634c01951e..94860cdc1c 100644 --- a/Gems/EMotionFX/Code/EMotionFX/Rendering/Common/MCommonConfig.h +++ b/Gems/EMotionFX/Code/EMotionFX/Rendering/Common/MCommonConfig.h @@ -6,8 +6,7 @@ * */ -#ifndef __MCOMMON_CONFIG_H -#define __MCOMMON_CONFIG_H +#pragma once #include @@ -27,5 +26,3 @@ enum { MEMCATEGORY_MCOMMON = 992, }; - -#endif diff --git a/Gems/EMotionFX/Code/EMotionFX/Rendering/Common/OrbitCamera.h b/Gems/EMotionFX/Code/EMotionFX/Rendering/Common/OrbitCamera.h index 8aaa465da9..ae6383d6a8 100644 --- a/Gems/EMotionFX/Code/EMotionFX/Rendering/Common/OrbitCamera.h +++ b/Gems/EMotionFX/Code/EMotionFX/Rendering/Common/OrbitCamera.h @@ -6,8 +6,7 @@ * */ -#ifndef __MCOMMON_ORBITCAMERA_H -#define __MCOMMON_ORBITCAMERA_H +#pragma once // include required headers #include "LookAtCamera.h" @@ -125,6 +124,3 @@ namespace MCommon float m_flightTargetBeta; }; } // namespace MCommon - - -#endif diff --git a/Gems/EMotionFX/Code/EMotionFX/Rendering/Common/RenderUtil.cpp b/Gems/EMotionFX/Code/EMotionFX/Rendering/Common/RenderUtil.cpp index 6fd28ee72f..0ebaf8bfee 100644 --- a/Gems/EMotionFX/Code/EMotionFX/Rendering/Common/RenderUtil.cpp +++ b/Gems/EMotionFX/Code/EMotionFX/Rendering/Common/RenderUtil.cpp @@ -688,7 +688,7 @@ namespace MCommon const AZ::Vector3 nodeWorldPos = pose->GetWorldSpaceTransform(jointIndex).m_position; const AZ::Vector3 parentWorldPos = pose->GetWorldSpaceTransform(parentIndex).m_position; const AZ::Vector3 bone = parentWorldPos - nodeWorldPos; - const AZ::Vector3 boneDirection = MCore::SafeNormalize(bone); + const AZ::Vector3 boneDirection = bone.GetNormalizedSafe(); const float boneLength = MCore::SafeLength(bone); const float boneScale = GetBoneScale(actorInstance, joint); const float parentBoneScale = GetBoneScale(actorInstance, skeleton->GetNode(parentIndex)); diff --git a/Gems/EMotionFX/Code/EMotionFX/Rendering/Common/TranslateManipulator.h b/Gems/EMotionFX/Code/EMotionFX/Rendering/Common/TranslateManipulator.h index 4b916f43b7..a8946dfff0 100644 --- a/Gems/EMotionFX/Code/EMotionFX/Rendering/Common/TranslateManipulator.h +++ b/Gems/EMotionFX/Code/EMotionFX/Rendering/Common/TranslateManipulator.h @@ -6,8 +6,7 @@ * */ -#ifndef __MCOMMON_TRANSLATEMANIPULATOR_H -#define __MCOMMON_TRANSLATEMANIPULATOR_H +#pragma once #include #include @@ -111,6 +110,3 @@ namespace MCommon bool m_zAxisVisible; }; } // namespace MCommon - - -#endif diff --git a/Gems/EMotionFX/Code/EMotionFX/Rendering/OpenGL2/Source/GBuffer.h b/Gems/EMotionFX/Code/EMotionFX/Rendering/OpenGL2/Source/GBuffer.h index cce01485e0..7995d4df2a 100644 --- a/Gems/EMotionFX/Code/EMotionFX/Rendering/OpenGL2/Source/GBuffer.h +++ b/Gems/EMotionFX/Code/EMotionFX/Rendering/OpenGL2/Source/GBuffer.h @@ -6,8 +6,7 @@ * */ -#ifndef __RENDERGL_GBUFFER_H -#define __RENDERGL_GBUFFER_H +#pragma once // include required headers #include @@ -76,6 +75,3 @@ namespace RenderGL RenderTexture* m_renderTargetE; /**< Render target with width and height divided by four. */ }; } // namespace RenderGL - - -#endif diff --git a/Gems/EMotionFX/Code/EMotionFX/Rendering/OpenGL2/Source/GLRenderUtil.h b/Gems/EMotionFX/Code/EMotionFX/Rendering/OpenGL2/Source/GLRenderUtil.h index aa64581449..84e6e1a6b2 100644 --- a/Gems/EMotionFX/Code/EMotionFX/Rendering/OpenGL2/Source/GLRenderUtil.h +++ b/Gems/EMotionFX/Code/EMotionFX/Rendering/OpenGL2/Source/GLRenderUtil.h @@ -6,8 +6,7 @@ * */ -#ifndef __OPENGLRENDERUTIL_H -#define __OPENGLRENDERUTIL_H +#pragma once #include "RenderGLConfig.h" #include "../../Common/RenderUtil.h" @@ -114,6 +113,3 @@ namespace RenderGL uint32 m_maxNumTextures; }; } // namespace RenderGL - - -#endif diff --git a/Gems/EMotionFX/Code/EMotionFX/Rendering/OpenGL2/Source/GLSLShader.h b/Gems/EMotionFX/Code/EMotionFX/Rendering/OpenGL2/Source/GLSLShader.h index 5975470f86..b8e34d90ba 100644 --- a/Gems/EMotionFX/Code/EMotionFX/Rendering/OpenGL2/Source/GLSLShader.h +++ b/Gems/EMotionFX/Code/EMotionFX/Rendering/OpenGL2/Source/GLSLShader.h @@ -6,8 +6,7 @@ * */ -#ifndef __RENDERGL_GLSLSHADER_H -#define __RENDERGL_GLSLSHADER_H +#pragma once #include #include @@ -96,7 +95,4 @@ namespace RenderGL uint32 m_textureUnit; }; -} - - -#endif +} // namespace RenderGL diff --git a/Gems/EMotionFX/Code/EMotionFX/Rendering/OpenGL2/Source/GraphicsManager.h b/Gems/EMotionFX/Code/EMotionFX/Rendering/OpenGL2/Source/GraphicsManager.h index 67ebbd9441..0b22df1656 100644 --- a/Gems/EMotionFX/Code/EMotionFX/Rendering/OpenGL2/Source/GraphicsManager.h +++ b/Gems/EMotionFX/Code/EMotionFX/Rendering/OpenGL2/Source/GraphicsManager.h @@ -6,8 +6,7 @@ * */ -#ifndef __RENDERGL_GRAPHICSMANAGER__H -#define __RENDERGL_GRAPHICSMANAGER__H +#pragma once #include #include @@ -198,6 +197,4 @@ namespace RenderGL }; GraphicsManager* GetGraphicsManager(); -} - -#endif +} // namespace RenderGL diff --git a/Gems/EMotionFX/Code/EMotionFX/Rendering/OpenGL2/Source/IndexBuffer.h b/Gems/EMotionFX/Code/EMotionFX/Rendering/OpenGL2/Source/IndexBuffer.h index b09e5f394d..09e49d4c5f 100644 --- a/Gems/EMotionFX/Code/EMotionFX/Rendering/OpenGL2/Source/IndexBuffer.h +++ b/Gems/EMotionFX/Code/EMotionFX/Rendering/OpenGL2/Source/IndexBuffer.h @@ -6,8 +6,7 @@ * */ -#ifndef __RENDERGL_INDEXBUFFER_H -#define __RENDERGL_INDEXBUFFER_H +#pragma once #include "VertexBuffer.h" @@ -51,6 +50,4 @@ namespace RenderGL bool GetIsSuccess(); bool GetHasError(); }; -} - -#endif +} // namespace RenderGL diff --git a/Gems/EMotionFX/Code/EMotionFX/Rendering/OpenGL2/Source/Material.h b/Gems/EMotionFX/Code/EMotionFX/Rendering/OpenGL2/Source/Material.h index 825fa4c7b0..69b22184c8 100644 --- a/Gems/EMotionFX/Code/EMotionFX/Rendering/OpenGL2/Source/Material.h +++ b/Gems/EMotionFX/Code/EMotionFX/Rendering/OpenGL2/Source/Material.h @@ -6,8 +6,7 @@ * */ -#ifndef __RENDERGL_MATERIAL_H -#define __RENDERGL_MATERIAL_H +#pragma once #include #include @@ -105,6 +104,4 @@ namespace RenderGL GLActor* m_actor; }; -} - -#endif +} // namespace RenderGL diff --git a/Gems/EMotionFX/Code/EMotionFX/Rendering/OpenGL2/Source/PostProcessShader.h b/Gems/EMotionFX/Code/EMotionFX/Rendering/OpenGL2/Source/PostProcessShader.h index 644e47b9b9..3c38626672 100644 --- a/Gems/EMotionFX/Code/EMotionFX/Rendering/OpenGL2/Source/PostProcessShader.h +++ b/Gems/EMotionFX/Code/EMotionFX/Rendering/OpenGL2/Source/PostProcessShader.h @@ -6,8 +6,7 @@ * */ -#ifndef __RENDERGL_POSTPROCESS_SHADER_H -#define __RENDERGL_POSTPROCESS_SHADER_H +#pragma once #include #include "GLSLShader.h" @@ -38,6 +37,4 @@ namespace RenderGL RenderTexture* m_rt; }; -} - -#endif +} // namespace RenderGL diff --git a/Gems/EMotionFX/Code/EMotionFX/Rendering/OpenGL2/Source/RenderGLConfig.h b/Gems/EMotionFX/Code/EMotionFX/Rendering/OpenGL2/Source/RenderGLConfig.h index 066b6e681d..4cdf646a34 100644 --- a/Gems/EMotionFX/Code/EMotionFX/Rendering/OpenGL2/Source/RenderGLConfig.h +++ b/Gems/EMotionFX/Code/EMotionFX/Rendering/OpenGL2/Source/RenderGLConfig.h @@ -6,8 +6,7 @@ * */ -#ifndef __RENDERGL_CONFIG_H -#define __RENDERGL_CONFIG_H +#pragma once #include @@ -28,6 +27,3 @@ enum { MEMCATEGORY_RENDERING = 997 }; - - -#endif diff --git a/Gems/EMotionFX/Code/EMotionFX/Rendering/OpenGL2/Source/RenderTexture.h b/Gems/EMotionFX/Code/EMotionFX/Rendering/OpenGL2/Source/RenderTexture.h index 9839ca0a5f..7ff3c08f33 100644 --- a/Gems/EMotionFX/Code/EMotionFX/Rendering/OpenGL2/Source/RenderTexture.h +++ b/Gems/EMotionFX/Code/EMotionFX/Rendering/OpenGL2/Source/RenderTexture.h @@ -6,8 +6,7 @@ * */ -#ifndef __RENDERGL_RENDERTEXTURE_H -#define __RENDERGL_RENDERTEXTURE_H +#pragma once #include "TextureCache.h" #include @@ -66,6 +65,4 @@ namespace RenderGL AZ::u32 m_frameBuffer; AZ::u32 m_depthBuffer; }; -} - -#endif +} // namespace RenderGL diff --git a/Gems/EMotionFX/Code/EMotionFX/Rendering/OpenGL2/Source/Shader.h b/Gems/EMotionFX/Code/EMotionFX/Rendering/OpenGL2/Source/Shader.h index ebb2e7e0a4..cd57446468 100644 --- a/Gems/EMotionFX/Code/EMotionFX/Rendering/OpenGL2/Source/Shader.h +++ b/Gems/EMotionFX/Code/EMotionFX/Rendering/OpenGL2/Source/Shader.h @@ -6,8 +6,7 @@ * */ -#ifndef __RENDERGL_SHADER__H -#define __RENDERGL_SHADER__H +#pragma once #include #include "RenderGLConfig.h" @@ -51,6 +50,4 @@ namespace RenderGL virtual void SetUniform(const char* name, Texture* texture) = 0; virtual void SetUniform(const char* name, const float* values, uint32 numFloats) = 0; }; -} - -#endif +} // namespace RenderGL diff --git a/Gems/EMotionFX/Code/EMotionFX/Rendering/OpenGL2/Source/StandardMaterial.h b/Gems/EMotionFX/Code/EMotionFX/Rendering/OpenGL2/Source/StandardMaterial.h index 528269765c..2e240042db 100644 --- a/Gems/EMotionFX/Code/EMotionFX/Rendering/OpenGL2/Source/StandardMaterial.h +++ b/Gems/EMotionFX/Code/EMotionFX/Rendering/OpenGL2/Source/StandardMaterial.h @@ -6,8 +6,7 @@ * */ -#ifndef __RENDERGL_STANDARD_MATERIAL_H -#define __RENDERGL_STANDARD_MATERIAL_H +#pragma once #include #include @@ -54,6 +53,3 @@ namespace RenderGL Texture* m_normalMap; }; } // namespace RenderGL - - -#endif diff --git a/Gems/EMotionFX/Code/EMotionFX/Rendering/OpenGL2/Source/TextureCache.h b/Gems/EMotionFX/Code/EMotionFX/Rendering/OpenGL2/Source/TextureCache.h index 4350cd67c7..57510133af 100644 --- a/Gems/EMotionFX/Code/EMotionFX/Rendering/OpenGL2/Source/TextureCache.h +++ b/Gems/EMotionFX/Code/EMotionFX/Rendering/OpenGL2/Source/TextureCache.h @@ -6,8 +6,7 @@ * */ -#ifndef __RENDERGL_TEXTURECACHE_H -#define __RENDERGL_TEXTURECACHE_H +#pragma once #include #include @@ -76,7 +75,4 @@ namespace RenderGL Texture* m_whiteTexture; Texture* m_defaultNormalTexture; }; -} - - -#endif +} // namespace RenderGL diff --git a/Gems/EMotionFX/Code/EMotionFX/Rendering/OpenGL2/Source/VertexBuffer.h b/Gems/EMotionFX/Code/EMotionFX/Rendering/OpenGL2/Source/VertexBuffer.h index c76cf5137a..71c04e6c93 100644 --- a/Gems/EMotionFX/Code/EMotionFX/Rendering/OpenGL2/Source/VertexBuffer.h +++ b/Gems/EMotionFX/Code/EMotionFX/Rendering/OpenGL2/Source/VertexBuffer.h @@ -6,8 +6,7 @@ * */ -#ifndef __RENDERGL_VERTEXBUFFER_H -#define __RENDERGL_VERTEXBUFFER_H +#pragma once #include "RenderGLConfig.h" #include @@ -66,5 +65,3 @@ namespace RenderGL bool GetHasError(); }; } // namespace RenderGL - -#endif diff --git a/Gems/EMotionFX/Code/EMotionFX/Rendering/OpenGL2/Source/glactor.h b/Gems/EMotionFX/Code/EMotionFX/Rendering/OpenGL2/Source/glactor.h index 36158306a1..ab2ef8686b 100644 --- a/Gems/EMotionFX/Code/EMotionFX/Rendering/OpenGL2/Source/glactor.h +++ b/Gems/EMotionFX/Code/EMotionFX/Rendering/OpenGL2/Source/glactor.h @@ -6,8 +6,7 @@ * */ -#ifndef __RENDERGL_GLACTOR_H -#define __RENDERGL_GLACTOR_H +#pragma once #include "RenderGLConfig.h" #include "VertexBuffer.h" @@ -99,6 +98,4 @@ namespace RenderGL void Delete() override; }; -} - -#endif +} // namespace RenderGL diff --git a/Gems/EMotionFX/Code/EMotionFX/Rendering/OpenGL2/Source/shadercache.h b/Gems/EMotionFX/Code/EMotionFX/Rendering/OpenGL2/Source/shadercache.h index d33cfcfd7d..7006e62dde 100644 --- a/Gems/EMotionFX/Code/EMotionFX/Rendering/OpenGL2/Source/shadercache.h +++ b/Gems/EMotionFX/Code/EMotionFX/Rendering/OpenGL2/Source/shadercache.h @@ -6,8 +6,7 @@ * */ -#ifndef __RENDERGL_SHADERCACHE__H -#define __RENDERGL_SHADERCACHE__H +#pragma once #include "Shader.h" #include @@ -45,5 +44,3 @@ namespace RenderGL AZStd::vector m_entries; // the shader cache entries }; } // namespace RenderGL - -#endif diff --git a/Gems/EMotionFX/Code/EMotionFX/Source/ActorInstance.cpp b/Gems/EMotionFX/Code/EMotionFX/Source/ActorInstance.cpp index b547b92306..c196f34716 100644 --- a/Gems/EMotionFX/Code/EMotionFX/Source/ActorInstance.cpp +++ b/Gems/EMotionFX/Code/EMotionFX/Source/ActorInstance.cpp @@ -1032,7 +1032,7 @@ namespace EMotionFX AZ::Vector3* normals = (AZ::Vector3*)mesh->FindVertexData(Mesh::ATTRIB_NORMALS); AZ::Vector3 norm = MCore::BarycentricInterpolate( closestBaryU, closestBaryV, - normals[closestIndices[0]], normals[closestIndices[1]], normals[closestIndices[2]]); + normals[closestIndices[0]], normals[closestIndices[1]], normals[closestIndices[2]]); norm = closestTransform.TransformVector(norm); norm.Normalize(); *outNormal = norm; diff --git a/Gems/EMotionFX/Code/EMotionFX/Source/ActorManager.cpp b/Gems/EMotionFX/Code/EMotionFX/Source/ActorManager.cpp index 184aac6e2c..252fccdb94 100644 --- a/Gems/EMotionFX/Code/EMotionFX/Source/ActorManager.cpp +++ b/Gems/EMotionFX/Code/EMotionFX/Source/ActorManager.cpp @@ -434,6 +434,20 @@ namespace EMotionFX } + ActorInstance* ActorManager::GetFirstEditorActorInstance() const + { + const size_t numActorInstances = m_actorInstances.size(); + for (size_t i = 0; i < numActorInstances; ++i) + { + if (!m_actorInstances[i]->GetIsOwnedByRuntime()) + { + return m_actorInstances[i]; + } + } + return nullptr; + } + + const AZStd::vector& ActorManager::GetActorInstanceArray() const { return m_actorInstances; diff --git a/Gems/EMotionFX/Code/EMotionFX/Source/ActorManager.h b/Gems/EMotionFX/Code/EMotionFX/Source/ActorManager.h index 003153b36c..016edb302e 100644 --- a/Gems/EMotionFX/Code/EMotionFX/Source/ActorManager.h +++ b/Gems/EMotionFX/Code/EMotionFX/Source/ActorManager.h @@ -136,6 +136,12 @@ namespace EMotionFX */ MCORE_INLINE ActorInstance* GetActorInstance(size_t nr) const { return m_actorInstances[nr]; } + /** + * Get a given registered actor instance owned by editor (not owned by runtime). + * @result A pointer to the actor instance. + */ + ActorInstance* GetFirstEditorActorInstance() const; + /** * Get the array of actor instances. * @result The const reference to the actor instance array. diff --git a/Gems/EMotionFX/Code/EMotionFX/Source/AnimGraphMotionNode.cpp b/Gems/EMotionFX/Code/EMotionFX/Source/AnimGraphMotionNode.cpp index a0a811eff0..ad2b75cca1 100644 --- a/Gems/EMotionFX/Code/EMotionFX/Source/AnimGraphMotionNode.cpp +++ b/Gems/EMotionFX/Code/EMotionFX/Source/AnimGraphMotionNode.cpp @@ -552,14 +552,6 @@ namespace EMotionFX motionNode->CreateMotionInstance(animGraphInstance->GetActorInstance(), this); } - // get the id of the currently used the motion set - MotionSet* motionSet = animGraphInstance->GetMotionSet(); - uint32 motionSetID = MCORE_INVALIDINDEX32; - if (motionSet) - { - motionSetID = motionSet->GetID(); - } - // update the internally stored playback info motionNode->UpdatePlayBackInfo(animGraphInstance); diff --git a/Gems/EMotionFX/Code/EMotionFX/Source/AnimGraphReferenceNode.cpp b/Gems/EMotionFX/Code/EMotionFX/Source/AnimGraphReferenceNode.cpp index 16f192615d..00ff273187 100644 --- a/Gems/EMotionFX/Code/EMotionFX/Source/AnimGraphReferenceNode.cpp +++ b/Gems/EMotionFX/Code/EMotionFX/Source/AnimGraphReferenceNode.cpp @@ -642,6 +642,8 @@ namespace EMotionFX void AnimGraphReferenceNode::OnAnimGraphAssetChanged() { + AnimGraphNotificationBus::Broadcast(&AnimGraphNotificationBus::Events::OnReferenceAnimGraphAboutToBeChanged, this); + ReleaseAnimGraphInstances(); AnimGraphNotificationBus::Broadcast(&AnimGraphNotificationBus::Events::OnReferenceAnimGraphChanged, this); diff --git a/Gems/EMotionFX/Code/EMotionFX/Source/BlendTreeBlendNNode.cpp b/Gems/EMotionFX/Code/EMotionFX/Source/BlendTreeBlendNNode.cpp index 7720822655..f4f96e6b93 100644 --- a/Gems/EMotionFX/Code/EMotionFX/Source/BlendTreeBlendNNode.cpp +++ b/Gems/EMotionFX/Code/EMotionFX/Source/BlendTreeBlendNNode.cpp @@ -224,6 +224,11 @@ namespace EMotionFX poseIndexB = poseIndexA; *outWeight = 0.0f; } + else if ((*outWeight > 1.0f - MCore::Math::epsilon)) + { + poseIndexA = poseIndexB; + *outWeight = 0.0f; + } // Search complete: the input weight is between m_paramWeights[i] and m_paramWeights[i - 1] // Calculate the blend weight and get the nodes and then return diff --git a/Gems/EMotionFX/Code/EMotionFX/Source/BlendTreeFootIKNode.cpp b/Gems/EMotionFX/Code/EMotionFX/Source/BlendTreeFootIKNode.cpp index d81b090300..25fcfa7193 100644 --- a/Gems/EMotionFX/Code/EMotionFX/Source/BlendTreeFootIKNode.cpp +++ b/Gems/EMotionFX/Code/EMotionFX/Source/BlendTreeFootIKNode.cpp @@ -258,9 +258,9 @@ namespace EMotionFX // Calculate the matrix to rotate the solve plane. void BlendTreeFootIKNode::CalculateMatrix(const AZ::Vector3& goal, const AZ::Vector3& bendDir, AZ::Matrix3x3* outForward) { - const AZ::Vector3 x = MCore::SafeNormalize(goal); + const AZ::Vector3 x = goal.GetNormalizedSafe(); const float dot = bendDir.Dot(x); - const AZ::Vector3 y = MCore::SafeNormalize(bendDir - (dot * x)); + const AZ::Vector3 y = (bendDir - (dot * x)).GetNormalizedSafe(); const AZ::Vector3 z = x.Cross(y); outForward->SetRow(0, x); outForward->SetRow(1, y); diff --git a/Gems/EMotionFX/Code/EMotionFX/Source/BlendTreeTwoLinkIKNode.cpp b/Gems/EMotionFX/Code/EMotionFX/Source/BlendTreeTwoLinkIKNode.cpp index 9a91a59390..ec9d69c68a 100644 --- a/Gems/EMotionFX/Code/EMotionFX/Source/BlendTreeTwoLinkIKNode.cpp +++ b/Gems/EMotionFX/Code/EMotionFX/Source/BlendTreeTwoLinkIKNode.cpp @@ -189,11 +189,11 @@ namespace EMotionFX void BlendTreeTwoLinkIKNode::CalculateMatrix(const AZ::Vector3& goal, const AZ::Vector3& bendDir, AZ::Matrix3x3* outForward) { // the inverse matrix defines a coordinate system whose x axis contains P, so X = unit(P). - const AZ::Vector3 x = MCore::SafeNormalize(goal); + const AZ::Vector3 x = goal.GetNormalizedSafe(); // the y axis of the inverse is perpendicular to P, so Y = unit( D - X(D . X) ). const float dot = bendDir.Dot(x); - const AZ::Vector3 y = MCore::SafeNormalize(bendDir - (dot * x)); + const AZ::Vector3 y = (bendDir - (dot * x)).GetNormalizedSafe(); // the z axis of the inverse is perpendicular to both X and Y, so Z = X x Y. const AZ::Vector3 z = x.Cross(y); @@ -372,11 +372,11 @@ namespace EMotionFX if (m_relativeBendDir && !m_extractBendDir) { bendDir = actorInstance->GetWorldSpaceTransform().m_rotation.TransformVector(bendDir); - bendDir = MCore::SafeNormalize(bendDir); + bendDir.NormalizeSafe(); } else { - bendDir = MCore::SafeNormalize(bendDir); + bendDir.NormalizeSafe(); } // if end node rotation is enabled @@ -470,8 +470,8 @@ namespace EMotionFX // calculate the differences between the current forward vector and the new one after IK AZ::Vector3 oldForward = globalTransformB.m_position - globalTransformA.m_position; AZ::Vector3 newForward = midPos - globalTransformA.m_position; - oldForward = MCore::SafeNormalize(oldForward); - newForward = MCore::SafeNormalize(newForward); + oldForward.NormalizeSafe(); + newForward.NormalizeSafe(); // perform a delta rotation to rotate into the new direction after IK float dotProduct = oldForward.Dot(newForward); @@ -499,9 +499,8 @@ namespace EMotionFX oldForward = endEffectorNodePos - globalTransformB.m_position; } - oldForward = MCore::SafeNormalize(oldForward); - newForward = goal - globalTransformB.m_position; - newForward = MCore::SafeNormalize(newForward); + oldForward.NormalizeSafe(); + newForward = (goal - globalTransformB.m_position).GetNormalizedSafe(); // calculate the delta rotation dotProduct = oldForward.Dot(newForward); diff --git a/Gems/EMotionFX/Code/EMotionFX/Source/DualQuatSkinDeformer.cpp b/Gems/EMotionFX/Code/EMotionFX/Source/DualQuatSkinDeformer.cpp index 2d5d8e2a46..afd570c102 100644 --- a/Gems/EMotionFX/Code/EMotionFX/Source/DualQuatSkinDeformer.cpp +++ b/Gems/EMotionFX/Code/EMotionFX/Source/DualQuatSkinDeformer.cpp @@ -27,6 +27,8 @@ namespace EMotionFX DualQuatSkinDeformer::DualQuatSkinDeformer(Mesh* mesh) : MeshDeformer(mesh) { + AZ::TaskGraphActiveInterface* taskGraphActiveInterface = AZ::Interface::Get(); + m_useTaskGraph = taskGraphActiveInterface && taskGraphActiveInterface->IsTaskGraphActive(); } DualQuatSkinDeformer::~DualQuatSkinDeformer() @@ -79,9 +81,8 @@ namespace EMotionFX { const Actor* actor = actorInstance->GetActor(); const Pose* pose = actorInstance->GetTransformData()->GetCurrentPose(); - const uint32 numVertices = m_mesh->GetNumVertices(); - // pre-calculate the skinning matrices + // Calculate the skinning matrices based on the current pose. for (BoneInfo& boneInfo : m_bones) { const size_t nodeIndex = boneInfo.m_nodeNr; @@ -89,27 +90,38 @@ namespace EMotionFX boneInfo.m_dualQuat.FromRotationTranslation(skinTransform.m_rotation, skinTransform.m_position); } - AZ::JobCompletion jobCompletion; - - // Split up the skinned vertices into batches. - const AZ::u32 numBatches = aznumeric_caster(ceilf(aznumeric_cast(numVertices) / aznumeric_cast(s_numVerticesPerBatch))); - for (AZ::u32 batchIndex = 0; batchIndex < numBatches; ++batchIndex) + if (m_useTaskGraph) { - const AZ::u32 startVertex = batchIndex * s_numVerticesPerBatch; - const AZ::u32 endVertex = AZStd::min(startVertex + s_numVerticesPerBatch, numVertices); - - // Create a job for every batch and skin them simultaneously. - AZ::JobContext* jobContext = nullptr; - AZ::Job* job = AZ::CreateJobFunction([this, startVertex, endVertex]() - { - SkinRange(m_mesh, startVertex, endVertex, m_bones); - }, /*isAutoDelete=*/true, jobContext); - - job->SetDependent(&jobCompletion); - job->Start(); + // Skin the vertices by executing the task graph. + AZ::TaskGraphEvent finishedEvent; + m_taskGraph.Submit(&finishedEvent); + finishedEvent.Wait(); } + else + { + AZ::JobCompletion jobCompletion; - jobCompletion.StartAndWaitForCompletion(); + // Split up the skinned vertices into batches. + const uint32 numVertices = m_mesh->GetNumVertices(); + const AZ::u32 numBatches = aznumeric_caster(ceilf(aznumeric_cast(numVertices) / aznumeric_cast(s_numVerticesPerBatch))); + for (AZ::u32 batchIndex = 0; batchIndex < numBatches; ++batchIndex) + { + const AZ::u32 startVertex = batchIndex * s_numVerticesPerBatch; + const AZ::u32 endVertex = AZStd::min(startVertex + s_numVerticesPerBatch, numVertices); + + // Create a job for every batch and skin them simultaneously. + AZ::JobContext* jobContext = nullptr; + AZ::Job* job = AZ::CreateJobFunction([this, startVertex, endVertex]() + { + SkinRange(m_mesh, startVertex, endVertex, m_bones); + }, /*isAutoDelete=*/true, jobContext); + + job->SetDependent(&jobCompletion); + job->Start(); + } + + jobCompletion.StartAndWaitForCompletion(); + } } void DualQuatSkinDeformer::SkinRange(Mesh* mesh, AZ::u32 startVertex, AZ::u32 endVertex, const AZStd::vector& boneInfos) @@ -340,5 +352,28 @@ namespace EMotionFX } } } + + if (m_useTaskGraph) + { + // Prepare the task graph + // Split up the to be skinned vertices into batches. As the mesh does not change at runtime, the task graph can + // be prepared at init time and be reused at runtime. + const uint32 numVertices = m_mesh->GetNumVertices(); + const AZ::u32 numBatches = aznumeric_caster(ceilf(aznumeric_cast(numVertices) / aznumeric_cast(s_numVerticesPerBatch))); + for (AZ::u32 batchIndex = 0; batchIndex < numBatches; ++batchIndex) + { + const AZ::u32 startVertex = batchIndex * s_numVerticesPerBatch; + const AZ::u32 endVertex = AZStd::min(startVertex + s_numVerticesPerBatch, numVertices); + + // Create a task for every batch and skin them simultaneously. + AZ::TaskDescriptor taskDescriptor{"DualQuatSkinRange", "Animation"}; + m_taskGraph.AddTask( + taskDescriptor, + [this, startVertex, endVertex]() + { + SkinRange(m_mesh, startVertex, endVertex, m_bones); + }); + } + } } } // namespace EMotionFX diff --git a/Gems/EMotionFX/Code/EMotionFX/Source/DualQuatSkinDeformer.h b/Gems/EMotionFX/Code/EMotionFX/Source/DualQuatSkinDeformer.h index 434f2920ee..95312c5b83 100644 --- a/Gems/EMotionFX/Code/EMotionFX/Source/DualQuatSkinDeformer.h +++ b/Gems/EMotionFX/Code/EMotionFX/Source/DualQuatSkinDeformer.h @@ -9,6 +9,7 @@ #pragma once #include +#include #include #include "EMotionFXConfig.h" #include @@ -138,6 +139,8 @@ namespace EMotionFX //! Number of vertices per batch/job used for multi-threaded software skinning. static constexpr AZ::u32 s_numVerticesPerBatch = 10000; + AZ::TaskGraph m_taskGraph; + bool m_useTaskGraph = true; /** * Default constructor. diff --git a/Gems/EMotionFX/Code/EMotionFX/Source/EMotionFXManager.cpp b/Gems/EMotionFX/Code/EMotionFX/Source/EMotionFXManager.cpp index d5fa3867e0..864c193a9a 100644 --- a/Gems/EMotionFX/Code/EMotionFX/Source/EMotionFXManager.cpp +++ b/Gems/EMotionFX/Code/EMotionFX/Source/EMotionFXManager.cpp @@ -6,7 +6,6 @@ * */ -// include the required headers #include "EMotionFXConfig.h" #include "EMotionFXManager.h" #include "Importer/Importer.h" @@ -29,6 +28,8 @@ #include #include #include +#include +#include namespace EMotionFX { @@ -75,6 +76,7 @@ namespace EMotionFX gEMFX.Get()->SetRecorder (Recorder::Create()); gEMFX.Get()->SetMotionInstancePool (MotionInstancePool::Create()); gEMFX.Get()->SetDebugDraw (aznew DebugDraw()); + gEMFX.Get()->SetPoseDataFactory (aznew PoseDataFactory()); gEMFX.Get()->SetGlobalSimulationSpeed (1.0f); // set the number of threads @@ -123,6 +125,7 @@ namespace EMotionFX m_recorder = nullptr; m_motionInstancePool = nullptr; m_debugDraw = nullptr; + m_poseDataFactory = nullptr; m_unitType = MCore::Distance::UNITTYPE_METERS; m_globalSimulationSpeed = 1.0f; m_isInEditorMode = false; @@ -135,6 +138,8 @@ namespace EMotionFX { RegisterMemoryCategories(MCore::GetMemoryTracker()); } + + m_renderActorSettings = AZStd::make_unique(); } @@ -167,6 +172,10 @@ namespace EMotionFX delete m_debugDraw; m_debugDraw = nullptr; + delete m_poseDataFactory; + m_poseDataFactory = nullptr; + + m_renderActorSettings.reset(); m_eventManager->Destroy(); m_eventManager = nullptr; diff --git a/Gems/EMotionFX/Code/EMotionFX/Source/EMotionFXManager.h b/Gems/EMotionFX/Code/EMotionFX/Source/EMotionFXManager.h index d5c5247de6..7276516739 100644 --- a/Gems/EMotionFX/Code/EMotionFX/Source/EMotionFXManager.h +++ b/Gems/EMotionFX/Code/EMotionFX/Source/EMotionFXManager.h @@ -19,6 +19,10 @@ MCORE_FORWARD_DECLARE(MemoryTracker); +namespace AZ::Render +{ + class RenderActorSettings; +} namespace EMotionFX { @@ -33,6 +37,7 @@ namespace EMotionFX class MotionInstancePool; class EventDataFactory; class DebugDraw; + class PoseDataFactory; // versions #define EMFX_HIGHVERSION 4 @@ -184,6 +189,17 @@ namespace EMotionFX */ MCORE_INLINE DebugDraw* GetDebugDraw() const { return m_debugDraw; } + MCORE_INLINE PoseDataFactory* GetPoseDataFactory() const { return m_poseDataFactory; } + + /** + * Get the render actor settings + * @result A pointer to global render actor settings. + */ + AZ::Render::RenderActorSettings* GetRenderActorSettings() const + { + return m_renderActorSettings.get(); + } + /** * Set the path of the media root directory. * @param path The path of the media root folder. @@ -344,9 +360,12 @@ namespace EMotionFX EventManager* m_eventManager; /**< The motion event manager. */ SoftSkinManager* m_softSkinManager; /**< The softskin manager. */ AnimGraphManager* m_animGraphManager; /**< The animgraph manager. */ + PoseDataFactory* m_poseDataFactory; Recorder* m_recorder; /**< The recorder. */ MotionInstancePool* m_motionInstancePool; /**< The motion instance pool. */ DebugDraw* m_debugDraw; /**< The debug drawing system. */ + AZStd::unique_ptr m_renderActorSettings; /**< The global render actor settings. */ + AZStd::vector m_threadDatas; /**< The per thread data. */ MCore::Distance::EUnitType m_unitType; /**< The unit type, on default it is MCore::Distance::UNITTYPE_METERS. */ float m_globalSimulationSpeed; /**< The global simulation speed, default is 1.0. */ @@ -418,6 +437,8 @@ namespace EMotionFX */ void SetMotionInstancePool(MotionInstancePool* pool); + void SetPoseDataFactory(PoseDataFactory* poseDataFactory) { m_poseDataFactory = poseDataFactory; } + /** * Set the number of threads to use. * @param numThreads The number of threads to use internally. This must be a value of 1 or above. @@ -505,4 +526,6 @@ namespace EMotionFX MCORE_INLINE Recorder& GetRecorder() { return *GetEMotionFX().GetRecorder(); } /**< Get the recorder. */ MCORE_INLINE MotionInstancePool& GetMotionInstancePool() { return *GetEMotionFX().GetMotionInstancePool(); } /**< Get the motion instance pool. */ MCORE_INLINE DebugDraw& GetDebugDraw() { return *GetEMotionFX().GetDebugDraw(); } /**< Get the debug drawing. */ + MCORE_INLINE PoseDataFactory& GetPoseDataFactory() { return *GetEMotionFX().GetPoseDataFactory(); } + MCORE_INLINE AZ::Render::RenderActorSettings& GetRenderActorSettings() { return *GetEMotionFX().GetRenderActorSettings(); }/**< Get the render actor settings. */ } // namespace EMotionFX diff --git a/Gems/EMotionFX/Code/EMotionFX/Source/JointSelectionBus.h b/Gems/EMotionFX/Code/EMotionFX/Source/JointSelectionBus.h new file mode 100644 index 0000000000..634456c82f --- /dev/null +++ b/Gems/EMotionFX/Code/EMotionFX/Source/JointSelectionBus.h @@ -0,0 +1,23 @@ +/* + * Copyright (c) Contributors to the Open 3D Engine Project. + * For complete copyright and license terms please see the LICENSE at the root of this distribution. + * + * SPDX-License-Identifier: Apache-2.0 OR MIT + * + */ + +#pragma once + +#include +#include + +namespace EMotionFX +{ + class JointSelectionRequests + : public AZ::EBusTraits + { + public: + virtual const AZStd::unordered_set* FindSelectedJointIndices(EMotionFX::ActorInstance* instance) const = 0; + }; + using JointSelectionRequestBus = AZ::EBus; +} diff --git a/Gems/EMotionFX/Code/EMotionFX/Source/Mesh.cpp b/Gems/EMotionFX/Code/EMotionFX/Source/Mesh.cpp index 9845ec1939..9130636e2a 100644 --- a/Gems/EMotionFX/Code/EMotionFX/Source/Mesh.cpp +++ b/Gems/EMotionFX/Code/EMotionFX/Source/Mesh.cpp @@ -581,8 +581,8 @@ namespace EMotionFX &curTangent, &curBitangent); // normalize the vectors - curTangent = MCore::SafeNormalize(curTangent); - curBitangent = MCore::SafeNormalize(curBitangent); + curTangent.NormalizeSafe(); + curBitangent.NormalizeSafe(); // store the tangents in the orgTangents array const AZ::Vector4 vec4Tangent(curTangent.GetX(), curTangent.GetY(), curTangent.GetZ(), 1.0f); @@ -605,7 +605,7 @@ namespace EMotionFX { // get the normal AZ::Vector3 normal(normals[i]); - normal = MCore::SafeNormalize(normal); + normal.NormalizeSafe(); // get the tangent AZ::Vector3 tangent = AZ::Vector3(orgTangents[i].GetX(), orgTangents[i].GetY(), orgTangents[i].GetZ()); @@ -631,7 +631,7 @@ namespace EMotionFX // Gram-Schmidt orthogonalize AZ::Vector3 fixedTangent = tangent - (normal * normal.Dot(tangent)); - fixedTangent = MCore::SafeNormalize(fixedTangent); + fixedTangent.NormalizeSafe(); // calculate handedness const AZ::Vector3 crossResult = normal.Cross(tangent); @@ -1671,7 +1671,7 @@ namespace EMotionFX const AZ::Vector3& posA = positions[ indexA ]; const AZ::Vector3& posB = positions[ indexB ]; const AZ::Vector3& posC = positions[ indexC ]; - AZ::Vector3 faceNormal = MCore::SafeNormalize((posB - posA).Cross(posC - posB)); + AZ::Vector3 faceNormal = (posB - posA).Cross(posC - posB).GetNormalizedSafe(); // store the tangents in the orgTangents array smoothNormals[ orgVerts[indexA] ] += faceNormal; @@ -1684,7 +1684,7 @@ namespace EMotionFX // normalize for (uint32 i = 0; i < m_numOrgVerts; ++i) { - smoothNormals[i] = MCore::SafeNormalize(smoothNormals[i]); + smoothNormals[i].NormalizeSafe(); } for (uint32 i = 0; i < m_numVertices; ++i) @@ -1721,7 +1721,7 @@ namespace EMotionFX const AZ::Vector3& posA = positions[ indexA ]; const AZ::Vector3& posB = positions[ indexB ]; const AZ::Vector3& posC = positions[ indexC ]; - AZ::Vector3 faceNormal = MCore::SafeNormalize((posB - posA).Cross(posC - posB)); + AZ::Vector3 faceNormal = (posB - posA).Cross(posC - posB).GetNormalizedSafe(); // store the tangents in the orgTangents array normals[indexA] = normals[indexA] + faceNormal; @@ -1734,7 +1734,7 @@ namespace EMotionFX // normalize the normals for (uint32 i = 0; i < m_numVertices; ++i) { - normals[i] = MCore::SafeNormalize(normals[i]); + normals[i].NormalizeSafe(); } } } diff --git a/Gems/EMotionFX/Code/EMotionFX/Source/Motion.cpp b/Gems/EMotionFX/Code/EMotionFX/Source/Motion.cpp index 9ad55b1c40..caf2acbaa2 100644 --- a/Gems/EMotionFX/Code/EMotionFX/Source/Motion.cpp +++ b/Gems/EMotionFX/Code/EMotionFX/Source/Motion.cpp @@ -6,7 +6,6 @@ * */ -// include the required headers #include "EMotionFXConfig.h" #include "Motion.h" #include @@ -19,9 +18,9 @@ #include "EventHandler.h" #include "MotionEventTable.h" #include -#include #include #include +#include namespace EMotionFX { @@ -286,7 +285,7 @@ namespace EMotionFX { AZ_Assert(m_motionData, "Expecting motion data"); - MotionData::SampleSettings sampleSettings; + MotionDataSampleSettings sampleSettings; sampleSettings.m_actorInstance = instance->GetActorInstance(); sampleSettings.m_inPlace = instance->GetIsInPlace(); sampleSettings.m_mirror = instance->GetMirrorMotion(); @@ -301,7 +300,7 @@ namespace EMotionFX { AZ_Assert(m_motionData, "Expecting motion data"); - MotionData::SampleSettings sampleSettings; + MotionDataSampleSettings sampleSettings; sampleSettings.m_actorInstance = instance->GetActorInstance(); sampleSettings.m_inPlace = instance->GetIsInPlace(); sampleSettings.m_mirror = instance->GetMirrorMotion(); @@ -312,6 +311,12 @@ namespace EMotionFX m_motionData->SamplePose(sampleSettings, outputPose); } + void Motion::SamplePose(Pose* outputPose, const MotionDataSampleSettings& sampleSettings) + { + AZ_Assert(m_motionData, "Expecting motion data"); + m_motionData->SamplePose(sampleSettings, outputPose); + } + const MotionData* Motion::GetMotionData() const { return m_motionData; diff --git a/Gems/EMotionFX/Code/EMotionFX/Source/Motion.h b/Gems/EMotionFX/Code/EMotionFX/Source/Motion.h index e6ec99835b..3873924b7c 100644 --- a/Gems/EMotionFX/Code/EMotionFX/Source/Motion.h +++ b/Gems/EMotionFX/Code/EMotionFX/Source/Motion.h @@ -9,14 +9,13 @@ #pragma once #include +#include +#include #include "EMotionFXConfig.h" #include "EMotionFXManager.h" #include "PlayBackInfo.h" #include "BaseObject.h" - -#include -#include - +#include namespace EMotionFX { @@ -138,6 +137,8 @@ namespace EMotionFX */ void Update(const Pose* inputPose, Pose* outputPose, MotionInstance* instance); + void SamplePose(Pose* outputPose, const MotionDataSampleSettings& sampleSettings); + /** * Specify the actor to use as retargeting source. * This would be the actor from which the motion was originally exported. diff --git a/Gems/EMotionFX/Code/EMotionFX/Source/MotionData/MotionData.h b/Gems/EMotionFX/Code/EMotionFX/Source/MotionData/MotionData.h index fe831f1df0..3950d99de0 100644 --- a/Gems/EMotionFX/Code/EMotionFX/Source/MotionData/MotionData.h +++ b/Gems/EMotionFX/Code/EMotionFX/Source/MotionData/MotionData.h @@ -9,18 +9,17 @@ #pragma once #include -#include -#include -#include -#include - #include #include #include #include #include - #include +#include +#include +#include +#include +#include namespace MCore { @@ -109,16 +108,6 @@ namespace EMotionFX using QuaternionKey = Key; using FloatKey = Key; - struct EMFX_API SampleSettings - { - const ActorInstance* m_actorInstance = nullptr; - const Pose* m_inputPose = nullptr; - float m_sampleTime = 0.0f; - bool m_mirror = false; - bool m_retarget = false; - bool m_inPlace = false; - }; - struct EMFX_API OptimizeSettings { AZStd::vector m_jointIgnoreList; // The joint data indices to skip optimization for. @@ -162,8 +151,8 @@ namespace EMotionFX virtual const char* GetSceneSettingsName() const = 0; // Sampling - virtual Transform SampleJointTransform(const SampleSettings& settings, size_t jointSkeletonIndex) const = 0; - virtual void SamplePose(const SampleSettings& settings, Pose* outputPose) const = 0; + virtual Transform SampleJointTransform(const MotionDataSampleSettings& settings, size_t jointSkeletonIndex) const = 0; + virtual void SamplePose(const MotionDataSampleSettings& settings, Pose* outputPose) const = 0; virtual float SampleMorph(float sampleTime, size_t morphDataIndex) const = 0; virtual float SampleFloat(float sampleTime, size_t morphDataIndex) const = 0; diff --git a/Gems/EMotionFX/Code/EMotionFX/Source/MotionData/MotionDataSampleSettings.h b/Gems/EMotionFX/Code/EMotionFX/Source/MotionData/MotionDataSampleSettings.h new file mode 100644 index 0000000000..ea3f766c56 --- /dev/null +++ b/Gems/EMotionFX/Code/EMotionFX/Source/MotionData/MotionDataSampleSettings.h @@ -0,0 +1,27 @@ +/* + * Copyright (c) Contributors to the Open 3D Engine Project. + * For complete copyright and license terms please see the LICENSE at the root of this distribution. + * + * SPDX-License-Identifier: Apache-2.0 OR MIT + * + */ + +#pragma once + +#include + +namespace EMotionFX +{ + class ActorInstance; + class Pose; + + struct EMFX_API MotionDataSampleSettings + { + const ActorInstance* m_actorInstance = nullptr; + const Pose* m_inputPose = nullptr; + float m_sampleTime = 0.0f; + bool m_mirror = false; + bool m_retarget = false; + bool m_inPlace = false; + }; +} // namespace EMotionFX diff --git a/Gems/EMotionFX/Code/EMotionFX/Source/MotionData/NonUniformMotionData.cpp b/Gems/EMotionFX/Code/EMotionFX/Source/MotionData/NonUniformMotionData.cpp index 6ced6152e1..3078978d2c 100644 --- a/Gems/EMotionFX/Code/EMotionFX/Source/MotionData/NonUniformMotionData.cpp +++ b/Gems/EMotionFX/Code/EMotionFX/Source/MotionData/NonUniformMotionData.cpp @@ -74,11 +74,10 @@ namespace EMotionFX return values[indexA].ToQuaternion().NLerp(values[indexB].ToQuaternion(), t); } - Transform NonUniformMotionData::SampleJointTransform(const SampleSettings& settings, size_t jointSkeletonIndex) const + Transform NonUniformMotionData::SampleJointTransform(const MotionDataSampleSettings& settings, size_t jointSkeletonIndex) const { const Actor* actor = settings.m_actorInstance->GetActor(); const MotionLinkData* motionLinkData = FindMotionLinkData(actor); - const Skeleton* skeleton = actor->GetSkeleton(); const size_t jointDataIndex = motionLinkData->GetJointDataLinks()[jointSkeletonIndex]; if (m_additive && jointDataIndex == InvalidIndex) @@ -88,7 +87,7 @@ namespace EMotionFX // Sample the interpolated data. Transform result; - const bool inPlace = (settings.m_inPlace && skeleton->GetNode(jointSkeletonIndex)->GetIsRootNode()); + const bool inPlace = (settings.m_inPlace && jointSkeletonIndex == actor->GetMotionExtractionNodeIndex()); if (jointDataIndex != InvalidIndex && !inPlace) { const JointData& jointData = m_jointData[jointDataIndex]; @@ -132,21 +131,20 @@ namespace EMotionFX return result; } - void NonUniformMotionData::SamplePose(const SampleSettings& settings, Pose* outputPose) const + void NonUniformMotionData::SamplePose(const MotionDataSampleSettings& settings, Pose* outputPose) const { AZ_Assert(settings.m_actorInstance, "Expecting a valid actor instance."); const Actor* actor = settings.m_actorInstance->GetActor(); const MotionLinkData* motionLinkData = FindMotionLinkData(actor); const ActorInstance* actorInstance = settings.m_actorInstance; - const Skeleton* skeleton = actor->GetSkeleton(); const Pose* bindPose = actorInstance->GetTransformData()->GetBindPose(); const size_t numNodes = actorInstance->GetNumEnabledNodes(); for (size_t i = 0; i < numNodes; ++i) { const uint16 jointIndex = actorInstance->GetEnabledNode(i); const size_t jointDataIndex = motionLinkData->GetJointDataLinks()[jointIndex]; - const bool inPlace = (settings.m_inPlace && skeleton->GetNode(jointIndex)->GetIsRootNode()); + const bool inPlace = (settings.m_inPlace && jointIndex == actor->GetMotionExtractionNodeIndex()); // Sample the interpolated data. Transform result; diff --git a/Gems/EMotionFX/Code/EMotionFX/Source/MotionData/NonUniformMotionData.h b/Gems/EMotionFX/Code/EMotionFX/Source/MotionData/NonUniformMotionData.h index b5d8a05c44..16b9842479 100644 --- a/Gems/EMotionFX/Code/EMotionFX/Source/MotionData/NonUniformMotionData.h +++ b/Gems/EMotionFX/Code/EMotionFX/Source/MotionData/NonUniformMotionData.h @@ -55,8 +55,8 @@ namespace EMotionFX AZ::u32 GetStreamSaveVersion() const override; const char* GetSceneSettingsName() const override; - Transform SampleJointTransform(const SampleSettings& settings, size_t jointSkeletonIndex) const override; - void SamplePose(const SampleSettings& settings, Pose* outputPose) const override; + Transform SampleJointTransform(const MotionDataSampleSettings& settings, size_t jointSkeletonIndex) const override; + void SamplePose(const MotionDataSampleSettings& settings, Pose* outputPose) const override; Transform SampleJointTransform(float sampleTime, size_t jointDataIndex) const override; AZ::Vector3 SampleJointPosition(float sampleTime, size_t jointDataIndex) const override; diff --git a/Gems/EMotionFX/Code/EMotionFX/Source/MotionData/UniformMotionData.cpp b/Gems/EMotionFX/Code/EMotionFX/Source/MotionData/UniformMotionData.cpp index c4451ff902..0f096e7a8b 100644 --- a/Gems/EMotionFX/Code/EMotionFX/Source/MotionData/UniformMotionData.cpp +++ b/Gems/EMotionFX/Code/EMotionFX/Source/MotionData/UniformMotionData.cpp @@ -130,7 +130,7 @@ namespace EMotionFX } } - Transform UniformMotionData::SampleJointTransform(const SampleSettings& settings, size_t jointSkeletonIndex) const + Transform UniformMotionData::SampleJointTransform(const MotionDataSampleSettings& settings, size_t jointSkeletonIndex) const { const Actor* actor = settings.m_actorInstance->GetActor(); const MotionLinkData* motionLinkData = FindMotionLinkData(actor); @@ -147,8 +147,7 @@ namespace EMotionFX size_t indexB; CalculateInterpolationIndicesUniform(settings.m_sampleTime, m_sampleSpacing, m_duration, m_numSamples, indexA, indexB, t); - const Skeleton* skeleton = actor->GetSkeleton(); - const bool inPlace = (settings.m_inPlace && skeleton->GetNode(jointSkeletonIndex)->GetIsRootNode()); + const bool inPlace = (settings.m_inPlace && jointSkeletonIndex == actor->GetMotionExtractionNodeIndex()); // Sample the interpolated data. Transform result; @@ -196,7 +195,7 @@ namespace EMotionFX return result; } - void UniformMotionData::SamplePose(const SampleSettings& settings, Pose* outputPose) const + void UniformMotionData::SamplePose(const MotionDataSampleSettings& settings, Pose* outputPose) const { AZ_Assert(settings.m_actorInstance, "Expecting a valid actor instance."); const Actor* actor = settings.m_actorInstance->GetActor(); @@ -210,13 +209,12 @@ namespace EMotionFX const AZStd::vector& jointLinks = motionLinkData->GetJointDataLinks(); const ActorInstance* actorInstance = settings.m_actorInstance; - const Skeleton* skeleton = actor->GetSkeleton(); const Pose* bindPose = actorInstance->GetTransformData()->GetBindPose(); const size_t numNodes = actorInstance->GetNumEnabledNodes(); for (size_t i = 0; i < numNodes; ++i) { const size_t skeletonJointIndex = actorInstance->GetEnabledNode(i); - const bool inPlace = (settings.m_inPlace && skeleton->GetNode(skeletonJointIndex)->GetIsRootNode()); + const bool inPlace = (settings.m_inPlace && skeletonJointIndex == actor->GetMotionExtractionNodeIndex()); // Sample the interpolated data. Transform result; diff --git a/Gems/EMotionFX/Code/EMotionFX/Source/MotionData/UniformMotionData.h b/Gems/EMotionFX/Code/EMotionFX/Source/MotionData/UniformMotionData.h index 40674cf2d1..d51f51ffd9 100644 --- a/Gems/EMotionFX/Code/EMotionFX/Source/MotionData/UniformMotionData.h +++ b/Gems/EMotionFX/Code/EMotionFX/Source/MotionData/UniformMotionData.h @@ -53,8 +53,8 @@ namespace EMotionFX const char* GetSceneSettingsName() const override; // Overloaded. - Transform SampleJointTransform(const SampleSettings& settings, size_t jointSkeletonIndex) const override; - void SamplePose(const SampleSettings& settings, Pose* outputPose) const override; + Transform SampleJointTransform(const MotionDataSampleSettings& settings, size_t jointSkeletonIndex) const override; + void SamplePose(const MotionDataSampleSettings& settings, Pose* outputPose) const override; float SampleMorph(float sampleTime, size_t morphDataIndex) const override; float SampleFloat(float sampleTime, size_t floatDataIndex) const override; Transform SampleJointTransform(float sampleTime, size_t jointDataIndex) const override; diff --git a/Gems/EMotionFX/Code/EMotionFX/Source/PhysicsSetup.cpp b/Gems/EMotionFX/Code/EMotionFX/Source/PhysicsSetup.cpp index 02b3fd7649..d691f4b202 100644 --- a/Gems/EMotionFX/Code/EMotionFX/Source/PhysicsSetup.cpp +++ b/Gems/EMotionFX/Code/EMotionFX/Source/PhysicsSetup.cpp @@ -273,7 +273,7 @@ namespace EMotionFX { AZ::Vector3 boneCenter = nodeTransform.GetTranslation() + 0.5f * boneDirection; float sumDistanceFromAxisSq = 0.0f; - float boneLengthSqReciprocal = 1.0f / boneDirection.GetLengthSq(); + float boneLengthSqReciprocal = 1.0f / (boneLength * boneLength); for (int i = 0; i < numMeshPoints; i++) { meshPoints[i] -= boneCenter; @@ -299,7 +299,7 @@ namespace EMotionFX { Physics::CapsuleShapeConfiguration* capsule = static_cast(collider.second.get()); capsule->m_height = boneDirection.GetLength(); - if (AZ::IsClose(localBoneDirection.GetLength(), 1.0f)) + if (!localBoneDirection.IsZero()) { collider.first->m_rotation = AZ::Quaternion::CreateShortestArc(AZ::Vector3::CreateAxisZ(), localBoneDirection.GetNormalized()); } @@ -309,7 +309,7 @@ namespace EMotionFX } else if (colliderType == azrtti_typeid()) { - if (AZ::IsClose(localBoneDirection.GetLength(), 1.0f)) + if (!localBoneDirection.IsZero()) { collider.first->m_rotation = AZ::Quaternion::CreateShortestArc(AZ::Vector3::CreateAxisZ(), localBoneDirection.GetNormalized()); } diff --git a/Gems/EMotionFX/Code/EMotionFX/Source/Pose.cpp b/Gems/EMotionFX/Code/EMotionFX/Source/Pose.cpp index e2bff677ad..232bdacfd1 100644 --- a/Gems/EMotionFX/Code/EMotionFX/Source/Pose.cpp +++ b/Gems/EMotionFX/Code/EMotionFX/Source/Pose.cpp @@ -1428,4 +1428,38 @@ namespace EMotionFX GetEMotionFX().GetThreadData(m_actorInstance->GetThreadIndex())->GetPosePool().FreePose(tempPose); } -} // namespace EMotionFX + + void Pose::DebugDraw(AzFramework::DebugDisplayRequests& debugDisplay, const AZ::Color& color, bool drawPoseDatas) const + { + debugDisplay.SetColor(color); + debugDisplay.DepthTestOff(); + + const Skeleton* skeleton = m_actorInstance->GetActor()->GetSkeleton(); + const size_t numEnabledJoints = m_actorInstance->GetNumEnabledNodes(); + for (size_t i = 0; i < numEnabledJoints; ++i) + { + const size_t jointIndex = m_actorInstance->GetEnabledNode(i); + const size_t parentIndex = skeleton->GetNode(jointIndex)->GetParentIndex(); + if (parentIndex != InvalidIndex) + { + const AZ::Vector3 startPos = GetWorldSpaceTransform(jointIndex).m_position; + const AZ::Vector3 endPos = GetWorldSpaceTransform(parentIndex).m_position; + + debugDisplay.DrawSolidCylinder(/*center=*/(startPos + endPos) * 0.5f, + /*direction=*/(endPos - startPos).GetNormalizedSafe(), + /*radius=*/0.005f, + /*height=*/(endPos - startPos).GetLength(), + /*drawShaded=*/false); + } + } + + if (drawPoseDatas) + { + for (const auto& poseDataItem : m_poseDatas) + { + PoseData* poseData = poseDataItem.second.get(); + poseData->DebugDraw(debugDisplay, color); + } + } + } +} // namespace EMotionFX diff --git a/Gems/EMotionFX/Code/EMotionFX/Source/Pose.h b/Gems/EMotionFX/Code/EMotionFX/Source/Pose.h index b7844276be..451e855150 100644 --- a/Gems/EMotionFX/Code/EMotionFX/Source/Pose.h +++ b/Gems/EMotionFX/Code/EMotionFX/Source/Pose.h @@ -10,10 +10,10 @@ #include #include +#include #include #include - namespace EMotionFX { // forward declarations @@ -25,10 +25,6 @@ namespace EMotionFX class Skeleton; class MotionLinkData; - /** - * - * - */ class EMFX_API Pose { MCORE_MEMORYOBJECTCATEGORY(Pose, EMFX_DEFAULT_ALIGNMENT, EMFX_MEMCATEGORY_POSE); @@ -192,6 +188,14 @@ namespace EMotionFX template T* GetAndPreparePoseData(ActorInstance* linkToActorInstance) { return azdynamic_cast(GetAndPreparePoseData(azrtti_typeid(), linkToActorInstance)); } + /** + * Draw debug visualization for the given pose. + * @param[in] debugDisplay Debug display request bus to spawn the render commands. + * @param[in] color The color the skeletal pose should be in. + * @param[in] drawPoseDatas Draw the pose data debug visualizations (e.g. joint velocities) along with the actual skeletal pose. [Default = false] + */ + void DebugDraw(AzFramework::DebugDisplayRequests& debugDisplay, const AZ::Color& color, bool drawPoseDatas = false) const; + private: mutable AZStd::vector m_localSpaceTransforms; mutable AZStd::vector m_modelSpaceTransforms; diff --git a/Gems/EMotionFX/Code/EMotionFX/Source/PoseData.h b/Gems/EMotionFX/Code/EMotionFX/Source/PoseData.h index 31c22a3839..69e8800c0a 100644 --- a/Gems/EMotionFX/Code/EMotionFX/Source/PoseData.h +++ b/Gems/EMotionFX/Code/EMotionFX/Source/PoseData.h @@ -12,9 +12,9 @@ #include #include #include +#include #include - namespace EMotionFX { class Actor; @@ -40,6 +40,8 @@ namespace EMotionFX virtual void Blend(const Pose* destPose, float weight) = 0; + virtual void DebugDraw([[maybe_unused]] AzFramework::DebugDisplayRequests& debugDisplay, [[maybe_unused]] const AZ::Color& color) const {} + bool IsUsed() const { return m_isUsed; } void SetIsUsed(bool isUsed) { m_isUsed = isUsed; } diff --git a/Gems/EMotionFX/Code/EMotionFX/Source/PoseDataFactory.cpp b/Gems/EMotionFX/Code/EMotionFX/Source/PoseDataFactory.cpp index c1c2627c8d..857cc7da7e 100644 --- a/Gems/EMotionFX/Code/EMotionFX/Source/PoseDataFactory.cpp +++ b/Gems/EMotionFX/Code/EMotionFX/Source/PoseDataFactory.cpp @@ -8,13 +8,20 @@ #include #include +#include #include #include #include - namespace EMotionFX { + AZ_CLASS_ALLOCATOR_IMPL(PoseDataFactory, PoseAllocator, 0) + + PoseDataFactory::PoseDataFactory() + { + AddPoseDataType(azrtti_typeid()); + } + PoseData* PoseDataFactory::Create(Pose* pose, const AZ::TypeId& type) { AZ::SerializeContext* context = nullptr; @@ -34,13 +41,13 @@ namespace EMotionFX return result; } - const AZStd::unordered_set& PoseDataFactory::GetTypeIds() + void PoseDataFactory::AddPoseDataType(const AZ::TypeId& poseDataType) { - static AZStd::unordered_set typeIds = - { - azrtti_typeid() - }; + m_poseDataTypeIds.emplace(poseDataType); + } - return typeIds; + const AZStd::unordered_set& PoseDataFactory::GetTypeIds() const + { + return m_poseDataTypeIds; } } // namespace EMotionFX diff --git a/Gems/EMotionFX/Code/EMotionFX/Source/PoseDataFactory.h b/Gems/EMotionFX/Code/EMotionFX/Source/PoseDataFactory.h index 31bc3e0d3f..624f0aeebf 100644 --- a/Gems/EMotionFX/Code/EMotionFX/Source/PoseDataFactory.h +++ b/Gems/EMotionFX/Code/EMotionFX/Source/PoseDataFactory.h @@ -25,7 +25,18 @@ namespace EMotionFX class EMFX_API PoseDataFactory { public: + AZ_RTTI(PoseDataFactory, "{F10014A0-2B6A-44E5-BA53-0E11ED566701}") + AZ_CLASS_ALLOCATOR_DECL + + PoseDataFactory(); + virtual ~PoseDataFactory() = default; + static PoseData* Create(Pose* pose, const AZ::TypeId& type); - static const AZStd::unordered_set& GetTypeIds(); + + void AddPoseDataType(const AZ::TypeId& poseDataType); + const AZStd::unordered_set& GetTypeIds() const; + + private: + AZStd::unordered_set m_poseDataTypeIds; }; } // namespace EMotionFX diff --git a/Gems/EMotionFX/Code/EMotionFX/Source/Velocity.cpp b/Gems/EMotionFX/Code/EMotionFX/Source/Velocity.cpp new file mode 100644 index 0000000000..e02262fa8e --- /dev/null +++ b/Gems/EMotionFX/Code/EMotionFX/Source/Velocity.cpp @@ -0,0 +1,83 @@ +/* + * Copyright (c) Contributors to the Open 3D Engine Project. + * For complete copyright and license terms please see the LICENSE at the root of this distribution. + * + * SPDX-License-Identifier: Apache-2.0 OR MIT + * + */ + +#include +#include + +namespace EMotionFX +{ + AZ::Vector3 CalculateLinearVelocity(const AZ::Vector3& lastPosition, + const AZ::Vector3& currentPosition, + float timeDelta) + { + if (timeDelta <= AZ::Constants::FloatEpsilon) + { + return AZ::Vector3::CreateZero(); + } + + const AZ::Vector3 deltaPosition = currentPosition - lastPosition; + const AZ::Vector3 velocity = deltaPosition / timeDelta; + + if (velocity.GetLength() > AZ::Constants::FloatEpsilon) + { + return velocity; + } + + return AZ::Vector3::CreateZero(); + } + + AZ::Vector3 CalculateAngularVelocity(const AZ::Quaternion& lastRotation, + const AZ::Quaternion& currentRotation, + float timeDelta) + { + if (timeDelta <= AZ::Constants::FloatEpsilon) + { + return AZ::Vector3::CreateZero(); + } + + const AZ::Quaternion deltaRotation = currentRotation * lastRotation.GetInverseFull(); + const AZ::Quaternion shortestEquivalent = deltaRotation.GetShortestEquivalent().GetNormalized(); + const AZ::Vector3 scaledAxisAngle = shortestEquivalent.ConvertToScaledAxisAngle(); + const AZ::Vector3 angularVelocity = scaledAxisAngle / timeDelta; + + if (angularVelocity.GetLength() > AZ::Constants::FloatEpsilon) + { + return angularVelocity; + } + + return AZ::Vector3::CreateZero(); + } + + void DebugDrawVelocity(AzFramework::DebugDisplayRequests& debugDisplay, + const AZ::Vector3& position, const AZ::Vector3& velocity, const AZ::Color& color) + { + // Don't visualize joints that remain motionless (zero velocity). + if (velocity.GetLength() < AZ::Constants::FloatEpsilon) + { + return; + } + + const float scale = 0.15f; + const AZ::Vector3 arrowPosition = position + velocity; + + debugDisplay.DepthTestOff(); + debugDisplay.SetColor(color); + + debugDisplay.DrawSolidCylinder(/*center=*/(arrowPosition + position) * 0.5f, + /*direction=*/(arrowPosition - position).GetNormalizedSafe(), + /*radius=*/0.003f, + /*height=*/(arrowPosition - position).GetLength(), + /*drawShaded=*/false); + + debugDisplay.DrawSolidCone(position + velocity, + velocity, + 0.1f * scale, + scale * 0.5f, + /*drawShaded=*/false); + } +} // namespace EMotionFX diff --git a/Gems/EMotionFX/Code/EMotionFX/Source/Velocity.h b/Gems/EMotionFX/Code/EMotionFX/Source/Velocity.h new file mode 100644 index 0000000000..a37a888024 --- /dev/null +++ b/Gems/EMotionFX/Code/EMotionFX/Source/Velocity.h @@ -0,0 +1,23 @@ +/* + * Copyright (c) Contributors to the Open 3D Engine Project. + * For complete copyright and license terms please see the LICENSE at the root of this distribution. + * + * SPDX-License-Identifier: Apache-2.0 OR MIT + * + */ + +#pragma once + +#include +#include +#include +#include + +namespace EMotionFX +{ + AZ::Vector3 EMFX_API CalculateLinearVelocity(const AZ::Vector3& lastPosition, const AZ::Vector3& currentPosition, float timeDelta); + AZ::Vector3 EMFX_API CalculateAngularVelocity(const AZ::Quaternion& lastRotation, const AZ::Quaternion& currentRotation, float timeDelta); + + void EMFX_API DebugDrawVelocity(AzFramework::DebugDisplayRequests& debugDisplay, + const AZ::Vector3& position, const AZ::Vector3& velocity, const AZ::Color& color); +} // namespace EMotionFX diff --git a/Gems/EMotionFX/Code/EMotionFX/Tools/EMotionStudio/EMStudioSDK/Source/Commands.cpp b/Gems/EMotionFX/Code/EMotionFX/Tools/EMotionStudio/EMStudioSDK/Source/Commands.cpp index b46fa645d1..e2e2224c67 100644 --- a/Gems/EMotionFX/Code/EMotionFX/Tools/EMotionStudio/EMStudioSDK/Source/Commands.cpp +++ b/Gems/EMotionFX/Code/EMotionFX/Tools/EMotionStudio/EMStudioSDK/Source/Commands.cpp @@ -581,6 +581,11 @@ namespace EMStudio animGraph->SetFileName(filename.c_str()); } + if (parameters.GetValueAsBool("updateDirtyFlag", this)) + { + animGraph->SetDirtyFlag(false); + } + GetMainWindow()->GetFileManager()->SourceAssetChanged(filename); // Add file in case it did not exist before (when saving it the first time). diff --git a/Gems/EMotionFX/Code/EMotionFX/Tools/EMotionStudio/EMStudioSDK/Source/EMStudioConfig.h b/Gems/EMotionFX/Code/EMotionFX/Tools/EMotionStudio/EMStudioSDK/Source/EMStudioConfig.h index 7fc4b1224c..6d339148f3 100644 --- a/Gems/EMotionFX/Code/EMotionFX/Tools/EMotionStudio/EMStudioSDK/Source/EMStudioConfig.h +++ b/Gems/EMotionFX/Code/EMotionFX/Tools/EMotionStudio/EMStudioSDK/Source/EMStudioConfig.h @@ -6,8 +6,7 @@ * */ -#ifndef __EMSTUDIO_EMSTUDIOCONFIG_H -#define __EMSTUDIO_EMSTUDIOCONFIG_H +#pragma once #include @@ -31,5 +30,3 @@ enum }; #define SHOW_REALTIMEINTERFACE_PERFORMANCEINFO - -#endif diff --git a/Gems/EMotionFX/Code/EMotionFX/Tools/EMotionStudio/EMStudioSDK/Source/EMStudioCore.h b/Gems/EMotionFX/Code/EMotionFX/Tools/EMotionStudio/EMStudioSDK/Source/EMStudioCore.h index 9d510c0769..2899ebc33a 100644 --- a/Gems/EMotionFX/Code/EMotionFX/Tools/EMotionStudio/EMStudioSDK/Source/EMStudioCore.h +++ b/Gems/EMotionFX/Code/EMotionFX/Tools/EMotionStudio/EMStudioSDK/Source/EMStudioCore.h @@ -6,8 +6,7 @@ * */ -#ifndef __EMSTUDIO_EMSTUDIOCORE_H -#define __EMSTUDIO_EMSTUDIOCORE_H +#pragma once // include all headers #include "EMStudioConfig.h" @@ -16,5 +15,3 @@ #include "PluginManager.h" #include "EMStudioPlugin.h" #include "LayoutManager.h" - -#endif diff --git a/Gems/EMotionFX/Code/EMotionFX/Tools/EMotionStudio/EMStudioSDK/Source/EMStudioManager.cpp b/Gems/EMotionFX/Code/EMotionFX/Tools/EMotionStudio/EMStudioSDK/Source/EMStudioManager.cpp index b385de62be..6881e49429 100644 --- a/Gems/EMotionFX/Code/EMotionFX/Tools/EMotionStudio/EMStudioSDK/Source/EMStudioManager.cpp +++ b/Gems/EMotionFX/Code/EMotionFX/Tools/EMotionStudio/EMStudioSDK/Source/EMStudioManager.cpp @@ -97,6 +97,7 @@ namespace EMStudio m_compileDate = AZStd::string::format("%s", MCORE_DATE); EMotionFX::SkeletonOutlinerNotificationBus::Handler::BusConnect(); + EMotionFX::JointSelectionRequestBus::Handler::BusConnect(); // log some information LogInfo(); @@ -107,6 +108,7 @@ namespace EMStudio // destructor EMStudioManager::~EMStudioManager() { + EMotionFX::JointSelectionRequestBus::Handler::BusDisconnect(); EMotionFX::SkeletonOutlinerNotificationBus::Handler::BusDisconnect(); if (m_eventProcessingCallback) diff --git a/Gems/EMotionFX/Code/EMotionFX/Tools/EMotionStudio/EMStudioSDK/Source/EMStudioManager.h b/Gems/EMotionFX/Code/EMotionFX/Tools/EMotionStudio/EMStudioSDK/Source/EMStudioManager.h index 4c3139b77a..1d60773e1f 100644 --- a/Gems/EMotionFX/Code/EMotionFX/Tools/EMotionStudio/EMStudioSDK/Source/EMStudioManager.h +++ b/Gems/EMotionFX/Code/EMotionFX/Tools/EMotionStudio/EMStudioSDK/Source/EMStudioManager.h @@ -19,6 +19,8 @@ // include the gizmos #include +#include + // include the EMStudio Config #include "EMStudioConfig.h" #include @@ -52,6 +54,7 @@ namespace EMStudio */ class EMSTUDIO_API EMStudioManager : private EMotionFX::SkeletonOutlinerNotificationBus::Handler + , private EMotionFX::JointSelectionRequestBus::Handler { public: AZ_RTTI(EMStudio::EMStudioManager, "{D45E95CF-0C7B-44F1-A9D4-99A1E12A5AB5}") @@ -103,6 +106,15 @@ namespace EMStudio void SetSelectedJointIndices(const AZStd::unordered_set& selectedJointIndices); const AZStd::unordered_set& GetSelectedJointIndices() const { return m_selectedJointIndices; } + const AZStd::unordered_set* FindSelectedJointIndices(EMotionFX::ActorInstance* instance) const + { + if (instance == m_commandManager->GetCurrentSelection().GetSingleActorInstance()) + { + return &m_selectedJointIndices; + } + return nullptr; + } + Workspace* GetWorkspace() { return &m_workspace; } // functions for adding/removing gizmos diff --git a/Gems/EMotionFX/Code/EMotionFX/Tools/EMotionStudio/EMStudioSDK/Source/EMStudioPlugin.h b/Gems/EMotionFX/Code/EMotionFX/Tools/EMotionStudio/EMStudioSDK/Source/EMStudioPlugin.h index 0de4ab946c..f1cabccc31 100644 --- a/Gems/EMotionFX/Code/EMotionFX/Tools/EMotionStudio/EMStudioSDK/Source/EMStudioPlugin.h +++ b/Gems/EMotionFX/Code/EMotionFX/Tools/EMotionStudio/EMStudioSDK/Source/EMStudioPlugin.h @@ -6,8 +6,7 @@ * */ -#ifndef __EMSTUDIO_EMSTUDIOPLUGIN_H -#define __EMSTUDIO_EMSTUDIOPLUGIN_H +#pragma once // include MCore #if !defined(Q_MOC_RUN) @@ -15,6 +14,7 @@ #include #include #include +#include #include "EMStudioConfig.h" #include #include @@ -92,7 +92,15 @@ namespace EMStudio uint32 m_screenHeight; }; - virtual void Render(RenderPlugin* renderPlugin, RenderInfo* renderInfo) { MCORE_UNUSED(renderPlugin); MCORE_UNUSED(renderInfo); } + //! Deprecated: LegacyRender will call EMotionFX::DebugDraw that tied to OpenGL render. + //! It will be removed after OpenGLPlugin and GLWidget is gone. + virtual void LegacyRender(RenderPlugin* renderPlugin, RenderInfo* renderInfo) { MCORE_UNUSED(renderPlugin); MCORE_UNUSED(renderInfo); } + + //! Render function will call atom auxGeom internally to render. This is the replacement for LegacyRender function. + virtual void Render(EMotionFX::ActorRenderFlagBitset renderFlags) + { + AZ_UNUSED(renderFlags); + }; virtual PluginOptions* GetOptions() { return nullptr; } @@ -118,5 +126,3 @@ namespace EMStudio virtual void AddWindowMenuEntries([[maybe_unused]] QMenu* parent) { } }; } // namespace EMStudio - -#endif diff --git a/Gems/EMotionFX/Code/EMotionFX/Tools/EMotionStudio/EMStudioSDK/Source/InvisiblePlugin.h b/Gems/EMotionFX/Code/EMotionFX/Tools/EMotionStudio/EMStudioSDK/Source/InvisiblePlugin.h index 6021f52217..127705867a 100644 --- a/Gems/EMotionFX/Code/EMotionFX/Tools/EMotionStudio/EMStudioSDK/Source/InvisiblePlugin.h +++ b/Gems/EMotionFX/Code/EMotionFX/Tools/EMotionStudio/EMStudioSDK/Source/InvisiblePlugin.h @@ -6,8 +6,7 @@ * */ -#ifndef __EMSTUDIO_INVISIBLEPLUGIN_H -#define __EMSTUDIO_INVISIBLEPLUGIN_H +#pragma once // include MCore #if !defined(Q_MOC_RUN) @@ -41,5 +40,3 @@ namespace EMStudio void CreateBaseInterface(const char* objectName) override { MCORE_UNUSED(objectName); } }; } // namespace EMStudio - -#endif diff --git a/Gems/EMotionFX/Code/EMotionFX/Tools/EMotionStudio/EMStudioSDK/Source/MainWindow.cpp b/Gems/EMotionFX/Code/EMotionFX/Tools/EMotionStudio/EMStudioSDK/Source/MainWindow.cpp index b75fb71060..083d6a9be1 100644 --- a/Gems/EMotionFX/Code/EMotionFX/Tools/EMotionStudio/EMStudioSDK/Source/MainWindow.cpp +++ b/Gems/EMotionFX/Code/EMotionFX/Tools/EMotionStudio/EMStudioSDK/Source/MainWindow.cpp @@ -26,6 +26,7 @@ #include #include #include +#include #include #include @@ -1340,8 +1341,15 @@ namespace EMStudio // add the load and the create instance commands commandGroup.AddCommandString(loadActorCommand.c_str()); - commandGroup.AddCommandString("CreateActorInstance -actorID %LASTRESULT%"); + // Temp solution after we refactor / remove the actor manager. + // We only need to create the actor instance by ourselves when openGLRenderPlugin is present. + // Atom render viewport will create actor instance along with the actor component. + PluginManager* pluginManager = GetPluginManager(); + if (pluginManager->FindActivePlugin(static_cast(OpenGLRenderPlugin::CLASS_ID))) + { + commandGroup.AddCommandString("CreateActorInstance -actorID %LASTRESULT%"); + } // execute the group command if (GetCommandManager()->ExecuteCommandGroup(commandGroup, outResult) == false) diff --git a/Gems/EMotionFX/Code/EMotionFX/Tools/EMotionStudio/EMStudioSDK/Source/NodeSelectionWindow.h b/Gems/EMotionFX/Code/EMotionFX/Tools/EMotionStudio/EMStudioSDK/Source/NodeSelectionWindow.h index df6f0195bc..97ca74284a 100644 --- a/Gems/EMotionFX/Code/EMotionFX/Tools/EMotionStudio/EMStudioSDK/Source/NodeSelectionWindow.h +++ b/Gems/EMotionFX/Code/EMotionFX/Tools/EMotionStudio/EMStudioSDK/Source/NodeSelectionWindow.h @@ -6,8 +6,7 @@ * */ -#ifndef __EMSTUDIO_NODESELECTIONWINDOW_H -#define __EMSTUDIO_NODESELECTIONWINDOW_H +#pragma once // include MCore #if !defined(Q_MOC_RUN) @@ -57,5 +56,3 @@ namespace EMStudio bool m_accepted; }; } // namespace EMStudio - -#endif diff --git a/Gems/EMotionFX/Code/EMotionFX/Tools/EMotionStudio/EMStudioSDK/Source/PluginManager.h b/Gems/EMotionFX/Code/EMotionFX/Tools/EMotionStudio/EMStudioSDK/Source/PluginManager.h index e3a5f9627a..b295f786a0 100644 --- a/Gems/EMotionFX/Code/EMotionFX/Tools/EMotionStudio/EMStudioSDK/Source/PluginManager.h +++ b/Gems/EMotionFX/Code/EMotionFX/Tools/EMotionStudio/EMStudioSDK/Source/PluginManager.h @@ -6,8 +6,7 @@ * */ -#ifndef __EMSTUDIO_PLUGINMANAGER_H -#define __EMSTUDIO_PLUGINMANAGER_H +#pragma once #include #include @@ -68,5 +67,3 @@ namespace EMStudio void UnloadPlugins(); }; } // namespace EMStudio - -#endif diff --git a/Gems/EMotionFX/Code/EMotionFX/Tools/EMotionStudio/EMStudioSDK/Source/RenderPlugin/ManipulatorCallbacks.h b/Gems/EMotionFX/Code/EMotionFX/Tools/EMotionStudio/EMStudioSDK/Source/RenderPlugin/ManipulatorCallbacks.h index 2f9201ffa9..16cf8f8f31 100644 --- a/Gems/EMotionFX/Code/EMotionFX/Tools/EMotionStudio/EMStudioSDK/Source/RenderPlugin/ManipulatorCallbacks.h +++ b/Gems/EMotionFX/Code/EMotionFX/Tools/EMotionStudio/EMStudioSDK/Source/RenderPlugin/ManipulatorCallbacks.h @@ -6,8 +6,7 @@ * */ -#ifndef __MCOMMON_MANIPULATORCALLBACKS_H -#define __MCOMMON_MANIPULATORCALLBACKS_H +#pragma once // include the Core system #include "../EMStudioConfig.h" @@ -142,7 +141,4 @@ namespace EMStudio bool GetResetFollowMode() const override { return true; } }; -} // namespace MCommon - - -#endif +} // namespace EMStudio diff --git a/Gems/EMotionFX/Code/EMotionFX/Tools/EMotionStudio/EMStudioSDK/Source/RenderPlugin/RenderLayouts.h b/Gems/EMotionFX/Code/EMotionFX/Tools/EMotionStudio/EMStudioSDK/Source/RenderPlugin/RenderLayouts.h index fbc4178009..c792efddda 100644 --- a/Gems/EMotionFX/Code/EMotionFX/Tools/EMotionStudio/EMStudioSDK/Source/RenderPlugin/RenderLayouts.h +++ b/Gems/EMotionFX/Code/EMotionFX/Tools/EMotionStudio/EMStudioSDK/Source/RenderPlugin/RenderLayouts.h @@ -6,8 +6,7 @@ * */ -#ifndef __EMSTUDIO_RENDERPLUGINLAYOUTS_H -#define __EMSTUDIO_RENDERPLUGINLAYOUTS_H +#pragma once // include the required headers #include "RenderPlugin.h" @@ -176,6 +175,3 @@ namespace EMStudio // register all available layouts (this will be automatically called inside the RenderPlugin's constructor) void EMSTUDIO_API RegisterRenderPluginLayouts(RenderPlugin* renderPlugin); } // namespace EMStudio - - -#endif diff --git a/Gems/EMotionFX/Code/EMotionFX/Tools/EMotionStudio/EMStudioSDK/Source/RenderPlugin/RenderOptions.cpp b/Gems/EMotionFX/Code/EMotionFX/Tools/EMotionStudio/EMStudioSDK/Source/RenderPlugin/RenderOptions.cpp index af2cb2c8e8..cc344db488 100644 --- a/Gems/EMotionFX/Code/EMotionFX/Tools/EMotionStudio/EMStudioSDK/Source/RenderPlugin/RenderOptions.cpp +++ b/Gems/EMotionFX/Code/EMotionFX/Tools/EMotionStudio/EMStudioSDK/Source/RenderPlugin/RenderOptions.cpp @@ -12,9 +12,7 @@ #include #include #include -#include -#include -#include +#include #include #include @@ -318,6 +316,8 @@ namespace EMStudio options.m_manipulatorMode = static_cast(settings->value("manipulatorMode", options.m_manipulatorMode).toInt()); + options.CopyToRenderActorSettings(EMotionFX::GetRenderActorSettings()); + return options; } @@ -545,6 +545,7 @@ namespace EMStudio ->Attribute(AZ::Edit::Attributes::ChangeNotify, &RenderOptions::OnLineSkeletonColorChangedCallback) ->DataElement(AZ::Edit::UIHandlers::Default, &RenderOptions::m_skeletonColor, "Solid skeleton color", "Solid skeleton color.") + ->Attribute(AZ_CRC("AlphaChannel", 0xa0cab5cf), true) ->Attribute(AZ::Edit::Attributes::ChangeNotify, &RenderOptions::OnSkeletonColorChangedCallback) ->DataElement(AZ::Edit::UIHandlers::Default, &RenderOptions::m_selectionColor, "Selection gizmo color", "Selection gizmo color") @@ -1057,6 +1058,37 @@ namespace EMStudio return m_manipulatorMode; } + void RenderOptions::CopyToRenderActorSettings(AZ::Render::RenderActorSettings& settings) const + { + settings.m_vertexNormalsScale = m_vertexNormalsScale; + settings.m_faceNormalsScale = m_faceNormalsScale; + settings.m_tangentsScale = m_tangentsScale; + settings.m_nodeOrientationScale = m_nodeOrientationScale; + + settings.m_vertexNormalsColor = m_vertexNormalsColor; + settings.m_faceNormalsColor = m_faceNormalsColor; + settings.m_tangentsColor = m_tangentsColor; + settings.m_mirroredBitangentsColor = m_mirroredBitangentsColor; + settings.m_bitangentsColor = m_bitangentsColor; + settings.m_wireframeColor = m_wireframeColor; + settings.m_nodeAABBColor = m_nodeAABBColor; + settings.m_meshAABBColor = m_meshAABBColor; + settings.m_staticAABBColor = m_staticAABBColor; + settings.m_skeletonColor = m_skeletonColor; + settings.m_lineSkeletonColor = m_lineSkeletonColor; + + settings.m_hitDetectionColliderColor = m_hitDetectionColliderColor; + settings.m_selectedHitDetectionColliderColor = m_selectedHitDetectionColliderColor; + settings.m_ragdollColliderColor = m_ragdollColliderColor; + settings.m_selectedRagdollColliderColor = m_selectedRagdollColliderColor; + settings.m_violatedJointLimitColor = m_violatedJointLimitColor; + settings.m_clothColliderColor = m_clothColliderColor; + settings.m_selectedClothColliderColor = m_selectedClothColliderColor; + settings.m_simulatedObjectColliderColor = m_simulatedObjectColliderColor; + settings.m_selectedSimulatedObjectColliderColor = m_selectedSimulatedObjectColliderColor; + settings.m_jointNameColor = m_nodeNameColor; + } + void RenderOptions::OnGridUnitSizeChangedCallback() const { PluginOptionsNotificationsBus::Event(s_gridUnitSizeOptionName, &PluginOptionsNotificationsBus::Events::OnOptionChanged, s_gridUnitSizeOptionName); @@ -1065,21 +1097,25 @@ namespace EMStudio void RenderOptions::OnVertexNormalsScaleChangedCallback() const { PluginOptionsNotificationsBus::Event(s_vertexNormalsScaleOptionName, &PluginOptionsNotificationsBus::Events::OnOptionChanged, s_vertexNormalsScaleOptionName); + CopyToRenderActorSettings(EMotionFX::GetRenderActorSettings()); } void RenderOptions::OnFaceNormalsScaleChangedCallback() const { PluginOptionsNotificationsBus::Event(s_faceNormalsScaleOptionName, &PluginOptionsNotificationsBus::Events::OnOptionChanged, s_faceNormalsScaleOptionName); + CopyToRenderActorSettings(EMotionFX::GetRenderActorSettings()); } void RenderOptions::OnTangentsScaleChangedCallback() const { PluginOptionsNotificationsBus::Event(s_tangentsScaleOptionName, &PluginOptionsNotificationsBus::Events::OnOptionChanged, s_tangentsScaleOptionName); + CopyToRenderActorSettings(EMotionFX::GetRenderActorSettings()); } void RenderOptions::OnNodeOrientationScaleChangedCallback() const { PluginOptionsNotificationsBus::Event(s_nodeOrientationScaleOptionName, &PluginOptionsNotificationsBus::Events::OnOptionChanged, s_nodeOrientationScaleOptionName); + CopyToRenderActorSettings(EMotionFX::GetRenderActorSettings()); } void RenderOptions::OnScaleBonesOnLengthChangedCallback() const @@ -1175,6 +1211,7 @@ namespace EMStudio void RenderOptions::OnWireframeColorChangedCallback() const { PluginOptionsNotificationsBus::Event(s_wireframeColorOptionName, &PluginOptionsNotificationsBus::Events::OnOptionChanged, s_wireframeColorOptionName); + CopyToRenderActorSettings(EMotionFX::GetRenderActorSettings()); } void RenderOptions::OnCollisionMeshColorChangedCallback() const @@ -1185,26 +1222,31 @@ namespace EMStudio void RenderOptions::OnVertexNormalsColorChangedCallback() const { PluginOptionsNotificationsBus::Event(s_vertexNormalsColorOptionName, &PluginOptionsNotificationsBus::Events::OnOptionChanged, s_vertexNormalsColorOptionName); + CopyToRenderActorSettings(EMotionFX::GetRenderActorSettings()); } void RenderOptions::OnFaceNormalsColorChangedCallback() const { PluginOptionsNotificationsBus::Event(s_faceNormalsColorOptionName, &PluginOptionsNotificationsBus::Events::OnOptionChanged, s_faceNormalsColorOptionName); + CopyToRenderActorSettings(EMotionFX::GetRenderActorSettings()); } void RenderOptions::OnTangentsColorChangedCallback() const { PluginOptionsNotificationsBus::Event(s_tangentsColorOptionName, &PluginOptionsNotificationsBus::Events::OnOptionChanged, s_tangentsColorOptionName); + CopyToRenderActorSettings(EMotionFX::GetRenderActorSettings()); } void RenderOptions::OnMirroredBitangentsColorChangedCallback() const { PluginOptionsNotificationsBus::Event(s_mirroredBitangentsColorOptionName, &PluginOptionsNotificationsBus::Events::OnOptionChanged, s_mirroredBitangentsColorOptionName); + CopyToRenderActorSettings(EMotionFX::GetRenderActorSettings()); } void RenderOptions::OnBitangentsColorChangedCallback() const { PluginOptionsNotificationsBus::Event(s_bitangentsColorOptionName, &PluginOptionsNotificationsBus::Events::OnOptionChanged, s_bitangentsColorOptionName); + CopyToRenderActorSettings(EMotionFX::GetRenderActorSettings()); } void RenderOptions::OnNodeAABBColorChangedCallback() const @@ -1215,6 +1257,7 @@ namespace EMStudio void RenderOptions::OnStaticAABBColorChangedCallback() const { PluginOptionsNotificationsBus::Event(s_staticAABBColorOptionName, &PluginOptionsNotificationsBus::Events::OnOptionChanged, s_staticAABBColorOptionName); + CopyToRenderActorSettings(EMotionFX::GetRenderActorSettings()); } void RenderOptions::OnMeshAABBColorChangedCallback() const @@ -1225,11 +1268,13 @@ namespace EMStudio void RenderOptions::OnLineSkeletonColorChangedCallback() const { PluginOptionsNotificationsBus::Event(s_lineSkeletonColorOptionName, &PluginOptionsNotificationsBus::Events::OnOptionChanged, s_lineSkeletonColorOptionName); + CopyToRenderActorSettings(EMotionFX::GetRenderActorSettings()); } void RenderOptions::OnSkeletonColorChangedCallback() const { PluginOptionsNotificationsBus::Event(s_skeletonColorOptionName, &PluginOptionsNotificationsBus::Events::OnOptionChanged, s_skeletonColorOptionName); + CopyToRenderActorSettings(EMotionFX::GetRenderActorSettings()); } void RenderOptions::OnSelectionColorChangedCallback() const @@ -1245,6 +1290,7 @@ namespace EMStudio void RenderOptions::OnNodeNameColorChangedCallback() const { PluginOptionsNotificationsBus::Event(s_nodeNameColorOptionName, &PluginOptionsNotificationsBus::Events::OnOptionChanged, s_nodeNameColorOptionName); + CopyToRenderActorSettings(EMotionFX::GetRenderActorSettings()); } void RenderOptions::OnGridColorChangedCallback() const diff --git a/Gems/EMotionFX/Code/EMotionFX/Tools/EMotionStudio/EMStudioSDK/Source/RenderPlugin/RenderOptions.h b/Gems/EMotionFX/Code/EMotionFX/Tools/EMotionStudio/EMStudioSDK/Source/RenderPlugin/RenderOptions.h index f146f62215..20d521813d 100644 --- a/Gems/EMotionFX/Code/EMotionFX/Tools/EMotionStudio/EMStudioSDK/Source/RenderPlugin/RenderOptions.h +++ b/Gems/EMotionFX/Code/EMotionFX/Tools/EMotionStudio/EMStudioSDK/Source/RenderPlugin/RenderOptions.h @@ -18,6 +18,11 @@ QT_FORWARD_DECLARE_CLASS(QSettings); +namespace AZ::Render +{ + class RenderActorSettings; +} + namespace EMStudio { class EMSTUDIO_API RenderOptions @@ -314,6 +319,9 @@ namespace EMStudio void OnLastUsedLayoutChangedCallback() const; void OnRenderSelectionBoxChangedCallback() const; + // Copy render actor related settings to the global settings in emfx. + void CopyToRenderActorSettings(AZ::Render::RenderActorSettings& settings) const; + // Maintain the order between here and the reflect method. // The order in the SerializeContext defines the order it is shown in the UI float m_gridUnitSize; diff --git a/Gems/EMotionFX/Code/EMotionFX/Tools/EMotionStudio/EMStudioSDK/Source/RenderPlugin/RenderPlugin.cpp b/Gems/EMotionFX/Code/EMotionFX/Tools/EMotionStudio/EMStudioSDK/Source/RenderPlugin/RenderPlugin.cpp index c74cb3cb0f..3451855c86 100644 --- a/Gems/EMotionFX/Code/EMotionFX/Tools/EMotionStudio/EMStudioSDK/Source/RenderPlugin/RenderPlugin.cpp +++ b/Gems/EMotionFX/Code/EMotionFX/Tools/EMotionStudio/EMStudioSDK/Source/RenderPlugin/RenderPlugin.cpp @@ -429,6 +429,7 @@ namespace EMStudio // 3. Relink the actor instances with the emstudio actors const size_t numActorInstances = EMotionFX::GetActorManager().GetNumActorInstances(); + size_t numActorInstancesInRenderPlugin = 0; for (size_t i = 0; i < numActorInstances; ++i) { EMotionFX::ActorInstance* actorInstance = EMotionFX::GetActorManager().GetActorInstance(i); @@ -440,6 +441,12 @@ namespace EMStudio continue; } + if (actorInstance->GetEntity()) + { + continue; + } + + numActorInstancesInRenderPlugin++; if (!emstudioActor) { for (EMStudioRenderActor* currentEMStudioActor : m_actors) @@ -485,6 +492,7 @@ namespace EMStudio if (found == false) { emstudioActor->m_actorInstances.erase(AZStd::next(begin(emstudioActor->m_actorInstances), j)); + numActorInstancesInRenderPlugin--; } else { @@ -497,7 +505,7 @@ namespace EMStudio m_reinitRequested = false; // zoom the camera to the available character only in case we're dealing with a single instance - if (resetViewCloseup && numActorInstances == 1) + if (resetViewCloseup && numActorInstancesInRenderPlugin == 1) { ViewCloseup(false); } @@ -933,6 +941,7 @@ namespace EMStudio // save the current settings and disable rendering m_renderOptions.SetLastUsedLayout(layout->GetName()); + SaveRenderOptions(); ClearViewWidgets(); VisibilityChanged(false); diff --git a/Gems/EMotionFX/Code/EMotionFX/Tools/EMotionStudio/EMStudioSDK/Source/RenderPlugin/RenderUpdateCallback.h b/Gems/EMotionFX/Code/EMotionFX/Tools/EMotionStudio/EMStudioSDK/Source/RenderPlugin/RenderUpdateCallback.h index a9bc26ae22..af5c1c367a 100644 --- a/Gems/EMotionFX/Code/EMotionFX/Tools/EMotionStudio/EMStudioSDK/Source/RenderPlugin/RenderUpdateCallback.h +++ b/Gems/EMotionFX/Code/EMotionFX/Tools/EMotionStudio/EMStudioSDK/Source/RenderPlugin/RenderUpdateCallback.h @@ -6,8 +6,7 @@ * */ -#ifndef __EMSTUDIO_RENDERUPDATECALLBACK_H -#define __EMSTUDIO_RENDERUPDATECALLBACK_H +#pragma once #include "../EMStudioConfig.h" #include @@ -38,6 +37,3 @@ namespace EMStudio RenderPlugin* m_plugin; }; } // namespace EMStudio - - -#endif diff --git a/Gems/EMotionFX/Code/EMotionFX/Tools/EMotionStudio/EMStudioSDK/Source/RenderPlugin/RenderWidget.cpp b/Gems/EMotionFX/Code/EMotionFX/Tools/EMotionStudio/EMStudioSDK/Source/RenderPlugin/RenderWidget.cpp index 429a0bffae..4a02e75fbd 100644 --- a/Gems/EMotionFX/Code/EMotionFX/Tools/EMotionStudio/EMStudioSDK/Source/RenderPlugin/RenderWidget.cpp +++ b/Gems/EMotionFX/Code/EMotionFX/Tools/EMotionStudio/EMStudioSDK/Source/RenderPlugin/RenderWidget.cpp @@ -1054,7 +1054,7 @@ namespace EMStudio EMStudioPlugin* plugin = GetPluginManager()->GetActivePlugin(i); EMStudioPlugin::RenderInfo renderInfo(renderUtil, m_camera, m_width, m_height); - plugin->Render(m_plugin, &renderInfo); + plugin->LegacyRender(m_plugin, &renderInfo); } RenderDebugDraw(); diff --git a/Gems/EMotionFX/Code/EMotionFX/Tools/EMotionStudio/EMStudioSDK/Source/RenderPlugin/ViewportPluginBus.h b/Gems/EMotionFX/Code/EMotionFX/Tools/EMotionStudio/EMStudioSDK/Source/RenderPlugin/ViewportPluginBus.h new file mode 100644 index 0000000000..27953fac4b --- /dev/null +++ b/Gems/EMotionFX/Code/EMotionFX/Tools/EMotionStudio/EMStudioSDK/Source/RenderPlugin/ViewportPluginBus.h @@ -0,0 +1,23 @@ +/* + * Copyright (c) Contributors to the Open 3D Engine Project. + * For complete copyright and license terms please see the LICENSE at the root of this distribution. + * + * SPDX-License-Identifier: Apache-2.0 OR MIT + * + */ + +#pragma once + +#include + +namespace EMStudio +{ + class ViewportPluginRequests + : public AZ::EBusTraits + { + public: + virtual AZ::s32 GetViewportId() const = 0; + }; + + using ViewportPluginRequestBus = AZ::EBus; +} diff --git a/Gems/EMotionFX/Code/EMotionFX/Tools/EMotionStudio/EMStudioSDK/Source/ToolBarPlugin.h b/Gems/EMotionFX/Code/EMotionFX/Tools/EMotionStudio/EMStudioSDK/Source/ToolBarPlugin.h index dcda6d2c1f..6c329a1320 100644 --- a/Gems/EMotionFX/Code/EMotionFX/Tools/EMotionStudio/EMStudioSDK/Source/ToolBarPlugin.h +++ b/Gems/EMotionFX/Code/EMotionFX/Tools/EMotionStudio/EMStudioSDK/Source/ToolBarPlugin.h @@ -6,8 +6,7 @@ * */ -#ifndef __EMSTUDIO_TOOLBARPLUGIN_H -#define __EMSTUDIO_TOOLBARPLUGIN_H +#pragma once // include MCore #if !defined(Q_MOC_RUN) @@ -59,5 +58,3 @@ namespace EMStudio QPointer m_bar; }; } // namespace EMStudio - -#endif diff --git a/Gems/EMotionFX/Code/EMotionFX/Tools/EMotionStudio/EMStudioSDK/Source/Workspace.cpp b/Gems/EMotionFX/Code/EMotionFX/Tools/EMotionStudio/EMStudioSDK/Source/Workspace.cpp index cada8c7f59..c8ee9be995 100644 --- a/Gems/EMotionFX/Code/EMotionFX/Tools/EMotionStudio/EMStudioSDK/Source/Workspace.cpp +++ b/Gems/EMotionFX/Code/EMotionFX/Tools/EMotionStudio/EMStudioSDK/Source/Workspace.cpp @@ -23,6 +23,7 @@ #include #include #include +#include #include #include @@ -430,6 +431,18 @@ namespace EMStudio continue; } + // Temp solution after we refactor / remove the actor manager. + // We only need to create the actor instance by ourselves when openGLRenderPlugin is present. + // Atom render viewport will create actor instance along with the actor component. + PluginManager* pluginManager = GetPluginManager(); + if (!pluginManager->FindActivePlugin(static_cast(OpenGLRenderPlugin::CLASS_ID))) + { + if (commands[i].find("CreateActorInstance") == 0) + { + continue; + } + } + AzFramework::StringFunc::Replace(commands[i], "@products@", assetCacheFolder.c_str()); AzFramework::StringFunc::Replace(commands[i], "@assets@", assetCacheFolder.c_str()); AzFramework::StringFunc::Replace(commands[i], "@root@", assetCacheFolder.c_str()); diff --git a/Gems/EMotionFX/Code/EMotionFX/Tools/EMotionStudio/Plugins/RenderPlugins/Source/OpenGLRender/GLWidget.h b/Gems/EMotionFX/Code/EMotionFX/Tools/EMotionStudio/Plugins/RenderPlugins/Source/OpenGLRender/GLWidget.h index f821a7710e..e94fc0a060 100644 --- a/Gems/EMotionFX/Code/EMotionFX/Tools/EMotionStudio/Plugins/RenderPlugins/Source/OpenGLRender/GLWidget.h +++ b/Gems/EMotionFX/Code/EMotionFX/Tools/EMotionStudio/Plugins/RenderPlugins/Source/OpenGLRender/GLWidget.h @@ -6,8 +6,7 @@ * */ -#ifndef __EMSTUDIO_GLWIDGET_H -#define __EMSTUDIO_GLWIDGET_H +#pragma once #if !defined(Q_MOC_RUN) #include "../RenderPluginsConfig.h" @@ -84,6 +83,3 @@ namespace EMStudio AZ::Debug::Timer m_perfTimer; }; } // namespace EMStudio - - -#endif diff --git a/Gems/EMotionFX/Code/EMotionFX/Tools/EMotionStudio/Plugins/RenderPlugins/Source/RenderPluginsConfig.h b/Gems/EMotionFX/Code/EMotionFX/Tools/EMotionStudio/Plugins/RenderPlugins/Source/RenderPluginsConfig.h index 2bb4301781..b4b0299c7e 100644 --- a/Gems/EMotionFX/Code/EMotionFX/Tools/EMotionStudio/Plugins/RenderPlugins/Source/RenderPluginsConfig.h +++ b/Gems/EMotionFX/Code/EMotionFX/Tools/EMotionStudio/Plugins/RenderPlugins/Source/RenderPluginsConfig.h @@ -6,8 +6,7 @@ * */ -#ifndef __EMSTUDIO_RENDERPLUGINSCONFIG_H -#define __EMSTUDIO_RENDERPLUGINSCONFIG_H +#pragma once #include @@ -27,5 +26,3 @@ enum { MEMCATEGORY_RENDERPLUGIN = 993 }; - -#endif diff --git a/Gems/EMotionFX/Code/EMotionFX/Tools/EMotionStudio/Plugins/StandardPlugins/Source/AnimGraph/AnimGraphActionManager.cpp b/Gems/EMotionFX/Code/EMotionFX/Tools/EMotionStudio/Plugins/StandardPlugins/Source/AnimGraph/AnimGraphActionManager.cpp index 5e33659056..2c7532005e 100644 --- a/Gems/EMotionFX/Code/EMotionFX/Tools/EMotionStudio/Plugins/StandardPlugins/Source/AnimGraph/AnimGraphActionManager.cpp +++ b/Gems/EMotionFX/Code/EMotionFX/Tools/EMotionStudio/Plugins/StandardPlugins/Source/AnimGraph/AnimGraphActionManager.cpp @@ -412,11 +412,9 @@ namespace EMStudio if (!nodesByAnimGraph.empty()) { MCore::CommandGroup commandGroup("Delete anim graph nodes"); - AZ::u32 numNodes = 0; for (const AZStd::pair>& animGraphAndNodes : nodesByAnimGraph) { - numNodes += static_cast(animGraphAndNodes.second.size()); CommandSystem::DeleteNodes(&commandGroup, animGraphAndNodes.first, animGraphAndNodes.second, true); } diff --git a/Gems/EMotionFX/Code/EMotionFX/Tools/EMotionStudio/Plugins/StandardPlugins/Source/AnimGraph/AnimGraphPlugin.h b/Gems/EMotionFX/Code/EMotionFX/Tools/EMotionStudio/Plugins/StandardPlugins/Source/AnimGraph/AnimGraphPlugin.h index 3510920d2c..14ecf6db34 100644 --- a/Gems/EMotionFX/Code/EMotionFX/Tools/EMotionStudio/Plugins/StandardPlugins/Source/AnimGraph/AnimGraphPlugin.h +++ b/Gems/EMotionFX/Code/EMotionFX/Tools/EMotionStudio/Plugins/StandardPlugins/Source/AnimGraph/AnimGraphPlugin.h @@ -6,8 +6,7 @@ * */ -#ifndef __EMSTUDIO_ANIMGRAPHPLUGIN_H -#define __EMSTUDIO_ANIMGRAPHPLUGIN_H +#pragma once // include MCore #if !defined(Q_MOC_RUN) @@ -320,6 +319,3 @@ namespace EMStudio void UpdateWindowActionsCheckState(); }; } // namespace EMStudio - - -#endif diff --git a/Gems/EMotionFX/Code/EMotionFX/Tools/EMotionStudio/Plugins/StandardPlugins/Source/AnimGraph/DebugEventHandler.h b/Gems/EMotionFX/Code/EMotionFX/Tools/EMotionStudio/Plugins/StandardPlugins/Source/AnimGraph/DebugEventHandler.h index 5e8e76b7ef..4786527f62 100644 --- a/Gems/EMotionFX/Code/EMotionFX/Tools/EMotionStudio/Plugins/StandardPlugins/Source/AnimGraph/DebugEventHandler.h +++ b/Gems/EMotionFX/Code/EMotionFX/Tools/EMotionStudio/Plugins/StandardPlugins/Source/AnimGraph/DebugEventHandler.h @@ -6,8 +6,7 @@ * */ -#ifndef __EMSTUDIO_BENDSETUPINSTANCEDEBUGEVENTHANDLER_H -#define __EMSTUDIO_BENDSETUPINSTANCEDEBUGEVENTHANDLER_H +#pragma once // include MCore #if !defined(Q_MOC_RUN) @@ -45,5 +44,3 @@ namespace EMStudio private: }; } // namespace EMStudio - -#endif diff --git a/Gems/EMotionFX/Code/EMotionFX/Tools/EMotionStudio/Plugins/StandardPlugins/Source/AnimGraph/GameController.h b/Gems/EMotionFX/Code/EMotionFX/Tools/EMotionStudio/Plugins/StandardPlugins/Source/AnimGraph/GameController.h index 47cfb9ddfc..b1925add10 100644 --- a/Gems/EMotionFX/Code/EMotionFX/Tools/EMotionStudio/Plugins/StandardPlugins/Source/AnimGraph/GameController.h +++ b/Gems/EMotionFX/Code/EMotionFX/Tools/EMotionStudio/Plugins/StandardPlugins/Source/AnimGraph/GameController.h @@ -6,8 +6,7 @@ * */ -#ifndef __GAMECONTROLLER_H -#define __GAMECONTROLLER_H +#pragma once // include the required headers @@ -157,5 +156,3 @@ private: }; #endif - -#endif diff --git a/Gems/EMotionFX/Code/EMotionFX/Tools/EMotionStudio/Plugins/StandardPlugins/Source/AnimGraph/GameControllerWindow.h b/Gems/EMotionFX/Code/EMotionFX/Tools/EMotionStudio/Plugins/StandardPlugins/Source/AnimGraph/GameControllerWindow.h index 059108625a..d3dda7196f 100644 --- a/Gems/EMotionFX/Code/EMotionFX/Tools/EMotionStudio/Plugins/StandardPlugins/Source/AnimGraph/GameControllerWindow.h +++ b/Gems/EMotionFX/Code/EMotionFX/Tools/EMotionStudio/Plugins/StandardPlugins/Source/AnimGraph/GameControllerWindow.h @@ -6,8 +6,7 @@ * */ -#ifndef __EMSTUDIO_GAMECONTROLLERWINDOW_H -#define __EMSTUDIO_GAMECONTROLLERWINDOW_H +#pragma once #if !defined(Q_MOC_RUN) #include "../StandardPluginsConfig.h" @@ -190,5 +189,3 @@ namespace EMStudio void AutoSelectGameController(); }; } // namespace EMStudio - -#endif diff --git a/Gems/EMotionFX/Code/EMotionFX/Tools/EMotionStudio/Plugins/StandardPlugins/Source/AnimGraph/GraphWidgetCallback.h b/Gems/EMotionFX/Code/EMotionFX/Tools/EMotionStudio/Plugins/StandardPlugins/Source/AnimGraph/GraphWidgetCallback.h index ff14484dc5..2ce33f9011 100644 --- a/Gems/EMotionFX/Code/EMotionFX/Tools/EMotionStudio/Plugins/StandardPlugins/Source/AnimGraph/GraphWidgetCallback.h +++ b/Gems/EMotionFX/Code/EMotionFX/Tools/EMotionStudio/Plugins/StandardPlugins/Source/AnimGraph/GraphWidgetCallback.h @@ -6,8 +6,7 @@ * */ -#ifndef __EMSTUDIO_GRAPHWIDGETCALLBACK_H -#define __EMSTUDIO_GRAPHWIDGETCALLBACK_H +#pragma once // include required headers #include @@ -36,5 +35,3 @@ namespace EMStudio NodeGraphWidget* m_graphWidget; }; } // namespace EMStudio - -#endif diff --git a/Gems/EMotionFX/Code/EMotionFX/Tools/EMotionStudio/Plugins/StandardPlugins/Source/AnimGraph/NodeGraph.cpp b/Gems/EMotionFX/Code/EMotionFX/Tools/EMotionStudio/Plugins/StandardPlugins/Source/AnimGraph/NodeGraph.cpp index 49b986887c..e97ff19113 100644 --- a/Gems/EMotionFX/Code/EMotionFX/Tools/EMotionStudio/Plugins/StandardPlugins/Source/AnimGraph/NodeGraph.cpp +++ b/Gems/EMotionFX/Code/EMotionFX/Tools/EMotionStudio/Plugins/StandardPlugins/Source/AnimGraph/NodeGraph.cpp @@ -6,7 +6,8 @@ * */ -#include "AzCore/std/numeric.h" +#include +#include #include #include #include @@ -231,7 +232,7 @@ namespace EMStudio // add the playspeed if (plugin->GetIsDisplayFlagEnabled(AnimGraphPlugin::DISPLAYFLAG_PLAYSPEED)) { - m_qtTempString.asprintf("Play Speed = %.2f", emfxNode->GetPlaySpeed(animGraphInstance)); + m_qtTempString = AZStd::fixed_string<24>::format("Play Speed = %.2f", emfxNode->GetPlaySpeed(animGraphInstance)).c_str(); painter.drawText(textPosition, m_qtTempString); textPosition.setY(textPosition.y() + heightSpacing); } @@ -239,7 +240,7 @@ namespace EMStudio // add the global weight if (plugin->GetIsDisplayFlagEnabled(AnimGraphPlugin::DISPLAYFLAG_GLOBALWEIGHT)) { - m_qtTempString.asprintf("Global Weight = %.2f", uniqueData->GetGlobalWeight()); + m_qtTempString = AZStd::fixed_string<24>::format("Global Weight = %.2f", uniqueData->GetGlobalWeight()).c_str(); painter.drawText(textPosition, m_qtTempString); textPosition.setY(textPosition.y() + heightSpacing); } @@ -247,7 +248,7 @@ namespace EMStudio // add the sync if (plugin->GetIsDisplayFlagEnabled(AnimGraphPlugin::DISPLAYFLAG_SYNCSTATUS)) { - m_qtTempString.asprintf("Synced = %s", animGraphInstance->GetIsSynced(emfxNode->GetObjectIndex()) ? "Yes" : "No"); + m_qtTempString = AZStd::fixed_string<24>::format("Synced = %s", animGraphInstance->GetIsSynced(emfxNode->GetObjectIndex()) ? "Yes" : "No").c_str(); painter.drawText(textPosition, m_qtTempString); textPosition.setY(textPosition.y() + heightSpacing); } @@ -255,7 +256,7 @@ namespace EMStudio // add the play position if (plugin->GetIsDisplayFlagEnabled(AnimGraphPlugin::DISPLAYFLAG_PLAYPOSITION)) { - m_qtTempString.asprintf("Play Time = %.3f / %.3f", uniqueData->GetCurrentPlayTime(), uniqueData->GetDuration()); + m_qtTempString = AZStd::fixed_string<32>::format("Play Time = %.3f / %.3f", uniqueData->GetCurrentPlayTime(), uniqueData->GetDuration()).c_str(); painter.drawText(textPosition, m_qtTempString); textPosition.setY(textPosition.y() + heightSpacing); } diff --git a/Gems/EMotionFX/Code/EMotionFX/Tools/EMotionStudio/Plugins/StandardPlugins/Source/Attachments/AttachmentNodesWindow.h b/Gems/EMotionFX/Code/EMotionFX/Tools/EMotionStudio/Plugins/StandardPlugins/Source/Attachments/AttachmentNodesWindow.h index 1743db3ab9..94cfaf275b 100644 --- a/Gems/EMotionFX/Code/EMotionFX/Tools/EMotionStudio/Plugins/StandardPlugins/Source/Attachments/AttachmentNodesWindow.h +++ b/Gems/EMotionFX/Code/EMotionFX/Tools/EMotionStudio/Plugins/StandardPlugins/Source/Attachments/AttachmentNodesWindow.h @@ -6,8 +6,7 @@ * */ -#ifndef __EMSTUDIO_ATTACHMENTNODESWINDOW_H -#define __EMSTUDIO_ATTACHMENTNODESWINDOW_H +#pragma once // include MCore #if !defined(Q_MOC_RUN) @@ -80,6 +79,3 @@ namespace EMStudio QToolButton* m_removeNodesButton; }; } // namespace EMStudio - - -#endif diff --git a/Gems/EMotionFX/Code/EMotionFX/Tools/EMotionStudio/Plugins/StandardPlugins/Source/Attachments/AttachmentsHierarchyWindow.h b/Gems/EMotionFX/Code/EMotionFX/Tools/EMotionStudio/Plugins/StandardPlugins/Source/Attachments/AttachmentsHierarchyWindow.h index 92a55668e8..e5ecbedc19 100644 --- a/Gems/EMotionFX/Code/EMotionFX/Tools/EMotionStudio/Plugins/StandardPlugins/Source/Attachments/AttachmentsHierarchyWindow.h +++ b/Gems/EMotionFX/Code/EMotionFX/Tools/EMotionStudio/Plugins/StandardPlugins/Source/Attachments/AttachmentsHierarchyWindow.h @@ -6,8 +6,7 @@ * */ -#ifndef __EMSTUDIO_ATTACHMENTSHIERARCHYWINDOW_H -#define __EMSTUDIO_ATTACHMENTSHIERARCHYWINDOW_H +#pragma once // include MCore #if !defined(Q_MOC_RUN) @@ -42,6 +41,3 @@ namespace EMStudio QTreeWidget* m_hierarchy; }; } // namespace EMStudio - - -#endif diff --git a/Gems/EMotionFX/Code/EMotionFX/Tools/EMotionStudio/Plugins/StandardPlugins/Source/Attachments/AttachmentsPlugin.h b/Gems/EMotionFX/Code/EMotionFX/Tools/EMotionStudio/Plugins/StandardPlugins/Source/Attachments/AttachmentsPlugin.h index edab3a9580..2d8d9632ba 100644 --- a/Gems/EMotionFX/Code/EMotionFX/Tools/EMotionStudio/Plugins/StandardPlugins/Source/Attachments/AttachmentsPlugin.h +++ b/Gems/EMotionFX/Code/EMotionFX/Tools/EMotionStudio/Plugins/StandardPlugins/Source/Attachments/AttachmentsPlugin.h @@ -6,8 +6,7 @@ * */ -#ifndef __EMSTUDIO_ATTACHMENTSPLUGIN_H -#define __EMSTUDIO_ATTACHMENTSPLUGIN_H +#pragma once // include MCore #if !defined(Q_MOC_RUN) @@ -91,6 +90,3 @@ namespace EMStudio AttachmentNodesWindow* m_attachmentNodesWindow; }; } // namespace EMStudio - - -#endif diff --git a/Gems/EMotionFX/Code/EMotionFX/Tools/EMotionStudio/Plugins/StandardPlugins/Source/LogWindow/LogWindowCallback.h b/Gems/EMotionFX/Code/EMotionFX/Tools/EMotionStudio/Plugins/StandardPlugins/Source/LogWindow/LogWindowCallback.h index 2e319e1dfa..586dfb8f44 100644 --- a/Gems/EMotionFX/Code/EMotionFX/Tools/EMotionStudio/Plugins/StandardPlugins/Source/LogWindow/LogWindowCallback.h +++ b/Gems/EMotionFX/Code/EMotionFX/Tools/EMotionStudio/Plugins/StandardPlugins/Source/LogWindow/LogWindowCallback.h @@ -6,8 +6,7 @@ * */ -#ifndef __EMSTUDIO_LOGWINDOWCALLBACK_H -#define __EMSTUDIO_LOGWINDOWCALLBACK_H +#pragma once #if !defined(Q_MOC_RUN) #include "../StandardPluginsConfig.h" @@ -78,5 +77,3 @@ namespace EMStudio } // namespace EMStudio Q_DECLARE_METATYPE(MCore::LogCallback::ELogLevel) - -#endif diff --git a/Gems/EMotionFX/Code/EMotionFX/Tools/EMotionStudio/Plugins/StandardPlugins/Source/LogWindow/LogWindowPlugin.h b/Gems/EMotionFX/Code/EMotionFX/Tools/EMotionStudio/Plugins/StandardPlugins/Source/LogWindow/LogWindowPlugin.h index 61b6ab4b8c..db8aa0ab24 100644 --- a/Gems/EMotionFX/Code/EMotionFX/Tools/EMotionStudio/Plugins/StandardPlugins/Source/LogWindow/LogWindowPlugin.h +++ b/Gems/EMotionFX/Code/EMotionFX/Tools/EMotionStudio/Plugins/StandardPlugins/Source/LogWindow/LogWindowPlugin.h @@ -6,8 +6,7 @@ * */ -#ifndef __EMSTUDIO_LOGWINDOWPLUGIN_H -#define __EMSTUDIO_LOGWINDOWPLUGIN_H +#pragma once #if !defined(Q_MOC_RUN) #include @@ -65,5 +64,3 @@ namespace EMStudio AzQtComponents::FilteredSearchWidget* m_searchWidget; }; } // namespace EMStudio - -#endif diff --git a/Gems/EMotionFX/Code/EMotionFX/Tools/EMotionStudio/Plugins/StandardPlugins/Source/MorphTargetsWindow/MorphTargetGroupWidget.cpp b/Gems/EMotionFX/Code/EMotionFX/Tools/EMotionStudio/Plugins/StandardPlugins/Source/MorphTargetsWindow/MorphTargetGroupWidget.cpp index 2fec1f424f..59434da666 100644 --- a/Gems/EMotionFX/Code/EMotionFX/Tools/EMotionStudio/Plugins/StandardPlugins/Source/MorphTargetsWindow/MorphTargetGroupWidget.cpp +++ b/Gems/EMotionFX/Code/EMotionFX/Tools/EMotionStudio/Plugins/StandardPlugins/Source/MorphTargetsWindow/MorphTargetGroupWidget.cpp @@ -15,7 +15,6 @@ #include #include - namespace EMStudio { diff --git a/Gems/EMotionFX/Code/EMotionFX/Tools/EMotionStudio/Plugins/StandardPlugins/Source/MotionSetsWindow/MotionSetWindow.cpp b/Gems/EMotionFX/Code/EMotionFX/Tools/EMotionStudio/Plugins/StandardPlugins/Source/MotionSetsWindow/MotionSetWindow.cpp index 393e26790b..3a4c2628b3 100644 --- a/Gems/EMotionFX/Code/EMotionFX/Tools/EMotionStudio/Plugins/StandardPlugins/Source/MotionSetsWindow/MotionSetWindow.cpp +++ b/Gems/EMotionFX/Code/EMotionFX/Tools/EMotionStudio/Plugins/StandardPlugins/Source/MotionSetsWindow/MotionSetWindow.cpp @@ -1138,6 +1138,12 @@ namespace EMStudio for (size_t motionSetId = 0; motionSetId < numMotionSets; motionSetId++) { EMotionFX::MotionSet* motionSet2 = EMotionFX::GetMotionManager().GetMotionSet(motionSetId); + + if (motionSet2->GetIsOwnedByRuntime()) + { + continue; + } + if (motionSet2->FindMotionEntryById(motionEntry->GetId())) { numMotionSetContainsMotion++; @@ -1148,12 +1154,6 @@ namespace EMStudio } } - // If motion exists in multiple motion sets, then it should not be removed from motions window. - if (removeMotion && numMotionSetContainsMotion > 1) - { - continue; - } - // check the reference counter if only one reference registered // two is needed because the remove motion command has to be called to have the undo/redo possible // without it the motion list is also not updated because the remove motion callback is not called @@ -1170,6 +1170,12 @@ namespace EMStudio } motionIdsToRemoveString += motionEntry->GetId(); + // If motion exists in multiple motion sets, then it should not be removed from motions window. + if (removeMotion && numMotionSetContainsMotion > 1) + { + continue; + } + // Check if the motion is not valid, that means the motion is not loaded. if (removeMotion && motionEntry->GetMotion()) { diff --git a/Gems/EMotionFX/Code/EMotionFX/Tools/EMotionStudio/Plugins/StandardPlugins/Source/MotionWindow/MotionExtractionWindow.h b/Gems/EMotionFX/Code/EMotionFX/Tools/EMotionStudio/Plugins/StandardPlugins/Source/MotionWindow/MotionExtractionWindow.h index 2f0bf63685..e4004a62aa 100644 --- a/Gems/EMotionFX/Code/EMotionFX/Tools/EMotionStudio/Plugins/StandardPlugins/Source/MotionWindow/MotionExtractionWindow.h +++ b/Gems/EMotionFX/Code/EMotionFX/Tools/EMotionStudio/Plugins/StandardPlugins/Source/MotionWindow/MotionExtractionWindow.h @@ -6,8 +6,7 @@ * */ -#ifndef __EMSTUDIO_MOTIONEXTRACTIONWINDOW_H -#define __EMSTUDIO_MOTIONEXTRACTIONWINDOW_H +#pragma once // include MCore #if !defined(Q_MOC_RUN) @@ -88,6 +87,3 @@ namespace EMStudio void CreateWarningWidget(); }; } // namespace EMStudio - - -#endif diff --git a/Gems/EMotionFX/Code/EMotionFX/Tools/EMotionStudio/Plugins/StandardPlugins/Source/MotionWindow/MotionPropertiesWindow.h b/Gems/EMotionFX/Code/EMotionFX/Tools/EMotionStudio/Plugins/StandardPlugins/Source/MotionWindow/MotionPropertiesWindow.h index eb1bcad3a3..3aa9133bb4 100644 --- a/Gems/EMotionFX/Code/EMotionFX/Tools/EMotionStudio/Plugins/StandardPlugins/Source/MotionWindow/MotionPropertiesWindow.h +++ b/Gems/EMotionFX/Code/EMotionFX/Tools/EMotionStudio/Plugins/StandardPlugins/Source/MotionWindow/MotionPropertiesWindow.h @@ -6,8 +6,7 @@ * */ -#ifndef __EMSTUDIO_MOTIONPROPERTIESWINDOW_H -#define __EMSTUDIO_MOTIONPROPERTIESWINDOW_H +#pragma once // include MCore #if !defined(Q_MOC_RUN) @@ -48,6 +47,3 @@ namespace EMStudio void FinalizeSubProperties(); }; } // namespace EMStudio - - -#endif diff --git a/Gems/EMotionFX/Code/EMotionFX/Tools/EMotionStudio/Plugins/StandardPlugins/Source/MotionWindow/MotionRetargetingWindow.h b/Gems/EMotionFX/Code/EMotionFX/Tools/EMotionStudio/Plugins/StandardPlugins/Source/MotionWindow/MotionRetargetingWindow.h index 3090a1f8bd..dbf39ccd84 100644 --- a/Gems/EMotionFX/Code/EMotionFX/Tools/EMotionStudio/Plugins/StandardPlugins/Source/MotionWindow/MotionRetargetingWindow.h +++ b/Gems/EMotionFX/Code/EMotionFX/Tools/EMotionStudio/Plugins/StandardPlugins/Source/MotionWindow/MotionRetargetingWindow.h @@ -6,8 +6,7 @@ * */ -#ifndef __EMSTUDIO_MOTIONRETARGETINGWINDOW_H -#define __EMSTUDIO_MOTIONRETARGETINGWINDOW_H +#pragma once // include MCore #if !defined(Q_MOC_RUN) @@ -52,6 +51,3 @@ namespace EMStudio CommandSystem::SelectionList m_selectionList; }; } // namespace EMStudio - - -#endif diff --git a/Gems/EMotionFX/Code/EMotionFX/Tools/EMotionStudio/Plugins/StandardPlugins/Source/MotionWindow/MotionWindowPlugin.cpp b/Gems/EMotionFX/Code/EMotionFX/Tools/EMotionStudio/Plugins/StandardPlugins/Source/MotionWindow/MotionWindowPlugin.cpp index 87c6a601aa..912947e302 100644 --- a/Gems/EMotionFX/Code/EMotionFX/Tools/EMotionStudio/Plugins/StandardPlugins/Source/MotionWindow/MotionWindowPlugin.cpp +++ b/Gems/EMotionFX/Code/EMotionFX/Tools/EMotionStudio/Plugins/StandardPlugins/Source/MotionWindow/MotionWindowPlugin.cpp @@ -667,7 +667,7 @@ namespace EMStudio } - void MotionWindowPlugin::Render(RenderPlugin* renderPlugin, EMStudioPlugin::RenderInfo* renderInfo) + void MotionWindowPlugin::LegacyRender(RenderPlugin* renderPlugin, EMStudioPlugin::RenderInfo* renderInfo) { MCommon::RenderUtil* renderUtil = renderInfo->m_renderUtil; diff --git a/Gems/EMotionFX/Code/EMotionFX/Tools/EMotionStudio/Plugins/StandardPlugins/Source/MotionWindow/MotionWindowPlugin.h b/Gems/EMotionFX/Code/EMotionFX/Tools/EMotionStudio/Plugins/StandardPlugins/Source/MotionWindow/MotionWindowPlugin.h index 7f4ebc3e78..84c2ccee9b 100644 --- a/Gems/EMotionFX/Code/EMotionFX/Tools/EMotionStudio/Plugins/StandardPlugins/Source/MotionWindow/MotionWindowPlugin.h +++ b/Gems/EMotionFX/Code/EMotionFX/Tools/EMotionStudio/Plugins/StandardPlugins/Source/MotionWindow/MotionWindowPlugin.h @@ -61,7 +61,7 @@ namespace EMStudio bool Init() override; EMStudioPlugin* Clone() override; - void Render(RenderPlugin* renderPlugin, EMStudioPlugin::RenderInfo* renderInfo) override; + void LegacyRender(RenderPlugin* renderPlugin, EMStudioPlugin::RenderInfo* renderInfo) override; void ReInit(); diff --git a/Gems/EMotionFX/Code/EMotionFX/Tools/EMotionStudio/Plugins/StandardPlugins/Source/SceneManager/ActorsWindow.cpp b/Gems/EMotionFX/Code/EMotionFX/Tools/EMotionStudio/Plugins/StandardPlugins/Source/SceneManager/ActorsWindow.cpp index c1e35967ec..1fd72067f0 100644 --- a/Gems/EMotionFX/Code/EMotionFX/Tools/EMotionStudio/Plugins/StandardPlugins/Source/SceneManager/ActorsWindow.cpp +++ b/Gems/EMotionFX/Code/EMotionFX/Tools/EMotionStudio/Plugins/StandardPlugins/Source/SceneManager/ActorsWindow.cpp @@ -482,16 +482,6 @@ namespace EMStudio QMenu menu(this); menu.setToolTipsVisible(true); - bool actorSelected = false; - for (const QTreeWidgetItem* item : items) - { - if (item->parent() == nullptr) - { - actorSelected = true; - break; - } - } - bool instanceSelected = false; const int selectedItemCount = items.count(); for (int i = 0; i < selectedItemCount; ++i) diff --git a/Gems/EMotionFX/Code/EMotionFX/Tools/EMotionStudio/Plugins/StandardPlugins/Source/StandardPluginsConfig.h b/Gems/EMotionFX/Code/EMotionFX/Tools/EMotionStudio/Plugins/StandardPlugins/Source/StandardPluginsConfig.h index 80c51cc36f..8937c4efaf 100644 --- a/Gems/EMotionFX/Code/EMotionFX/Tools/EMotionStudio/Plugins/StandardPlugins/Source/StandardPluginsConfig.h +++ b/Gems/EMotionFX/Code/EMotionFX/Tools/EMotionStudio/Plugins/StandardPlugins/Source/StandardPluginsConfig.h @@ -6,8 +6,7 @@ * */ -#ifndef __EMSTUDIO_STANDARDPLUGINSCONFIG_H -#define __EMSTUDIO_STANDARDPLUGINSCONFIG_H +#pragma once // include the EMotion FX config and mem categories on default #include @@ -32,5 +31,3 @@ enum MEMCATEGORY_STANDARDPLUGINS_ANIMGRAPH = 1001, MEMCATEGORY_STANDARDPLUGINS_RESEARCH = 1002 }; - -#endif diff --git a/Gems/EMotionFX/Code/EMotionFX/Tools/EMotionStudio/Plugins/StandardPlugins/Source/TimeView/TrackDataWidget.cpp b/Gems/EMotionFX/Code/EMotionFX/Tools/EMotionStudio/Plugins/StandardPlugins/Source/TimeView/TrackDataWidget.cpp index 6c2ab60010..02dbb297b3 100644 --- a/Gems/EMotionFX/Code/EMotionFX/Tools/EMotionStudio/Plugins/StandardPlugins/Source/TimeView/TrackDataWidget.cpp +++ b/Gems/EMotionFX/Code/EMotionFX/Tools/EMotionStudio/Plugins/StandardPlugins/Source/TimeView/TrackDataWidget.cpp @@ -2152,13 +2152,6 @@ namespace EMStudio float startTime = copyElement.m_startTime + offset; float endTime = copyElement.m_endTime + offset; - // calculate the duration of the motion event - float duration = 0.0f; - if (MCore::Compare::CheckIfIsClose(startTime, endTime, MCore::Math::epsilon) == false) - { - duration = endTime - startTime; - } - CommandSystem::CommandHelperAddMotionEvent(trackName.c_str(), startTime, endTime, copyElement.m_eventDatas, &commandGroup); } diff --git a/Gems/EMotionFX/Code/EMotionFX/emotionfx_files.cmake b/Gems/EMotionFX/Code/EMotionFX/emotionfx_files.cmake index 9947850471..52c9d6aa15 100644 --- a/Gems/EMotionFX/Code/EMotionFX/emotionfx_files.cmake +++ b/Gems/EMotionFX/Code/EMotionFX/emotionfx_files.cmake @@ -42,6 +42,7 @@ set(FILES Source/EMotionFXManager.h Source/EMotionFXAllocatorInitializer.cpp Source/EMotionFXAllocatorInitializer.h + Source/JointSelectionBus.h Source/KeyFrame.h Source/KeyFrame.inl Source/KeyFrameFinder.h @@ -143,6 +144,8 @@ set(FILES Source/TransformData.h Source/TriggerActionSetup.cpp Source/TriggerActionSetup.h + Source/Velocity.cpp + Source/Velocity.h Source/VertexAttributeLayer.cpp Source/VertexAttributeLayer.h Source/VertexAttributeLayerAbstractData.cpp @@ -349,6 +352,7 @@ set(FILES Source/MotionData/MotionData.h Source/MotionData/MotionDataFactory.cpp Source/MotionData/MotionDataFactory.h + Source/MotionData/MotionDataSampleSettings.h Source/MotionData/NonUniformMotionData.cpp Source/MotionData/NonUniformMotionData.h Source/MotionData/UniformMotionData.cpp diff --git a/Gems/EMotionFX/Code/MCore/Source/Algorithms.cpp b/Gems/EMotionFX/Code/MCore/Source/Algorithms.cpp index dd82385092..527407aaa8 100644 --- a/Gems/EMotionFX/Code/MCore/Source/Algorithms.cpp +++ b/Gems/EMotionFX/Code/MCore/Source/Algorithms.cpp @@ -293,7 +293,7 @@ namespace MCore // check if the test point is inside the polygon AZ::Vector2 ClosestPointToPoly(const AZ::Vector2* polyPoints, size_t numPoints, const AZ::Vector2& testPoint) { - AZ::Vector2 result; + AZ::Vector2 result = AZ::Vector2::CreateZero(); float closestDist = FLT_MAX; for (size_t i = 0; i < numPoints; ++i) { diff --git a/Gems/EMotionFX/Code/MCore/Source/MCoreCommandManager.cpp b/Gems/EMotionFX/Code/MCore/Source/MCoreCommandManager.cpp index b59f2b69a0..4b21cde9f6 100644 --- a/Gems/EMotionFX/Code/MCore/Source/MCoreCommandManager.cpp +++ b/Gems/EMotionFX/Code/MCore/Source/MCoreCommandManager.cpp @@ -547,7 +547,12 @@ namespace MCore } tmpStr = commandString.substr(lastResultIndex, rightPercentagePos - lastResultIndex + 1); - AzFramework::StringFunc::Replace(commandString, tmpStr.c_str(), intermediateCommandResults[i - relativeIndex].c_str()); + AZStd::string replaceStr = intermediateCommandResults[i - relativeIndex]; + if (replaceStr.empty()) + { + replaceStr = "-1"; + } + AzFramework::StringFunc::Replace(commandString, tmpStr.c_str(), replaceStr.c_str()); replaceHappen = true; // Search again in case the command group is referring to other results diff --git a/Gems/EMotionFX/Code/MCore/Source/Vector.h b/Gems/EMotionFX/Code/MCore/Source/Vector.h index 3f5765762c..d904efcaaa 100644 --- a/Gems/EMotionFX/Code/MCore/Source/Vector.h +++ b/Gems/EMotionFX/Code/MCore/Source/Vector.h @@ -17,12 +17,14 @@ namespace MCore { + //! @deprecated Use AZ::Vector3::NormalizeSafeWithLength() inline float SafeLength(const AZ::Vector3& rhs) { const float lenSq = rhs.Dot(rhs); return (lenSq > FLT_EPSILON) ? sqrtf(lenSq) : 0.0f; } + //! @deprecated Use AZ::Vector3::GetNormalizedSafe() inline AZ::Vector3 SafeNormalize(const AZ::Vector3& rhs) { AZ::Vector3 result(0.0f); @@ -43,6 +45,7 @@ namespace MCore return AZ::Vector3(vec.GetX() - fac * n.GetX(), vec.GetY() - fac * n.GetY(), vec.GetZ() - fac * n.GetZ()); } + //! @deprecated Use AZ::Vector3::Project() MCORE_INLINE AZ::Vector3 Projected(const AZ::Vector3& vec, const AZ::Vector3& projectOnto) { AZ::Vector3 result = projectOnto; @@ -60,6 +63,7 @@ namespace MCore (MCore::Math::Abs(val.GetX() - val.GetZ()) < MCore::Math::epsilon)); } + //! @deprecated Use AZ::Vector3::Lerp() template <> MCORE_INLINE AZ::Vector3 LinearInterpolate(const AZ::Vector3& source, const AZ::Vector3& target, float timeValue) { diff --git a/Gems/EMotionFX/Code/MysticQt/Source/DialogStack.cpp b/Gems/EMotionFX/Code/MysticQt/Source/DialogStack.cpp index 5e9cf66fa7..30d54c6b7b 100644 --- a/Gems/EMotionFX/Code/MysticQt/Source/DialogStack.cpp +++ b/Gems/EMotionFX/Code/MysticQt/Source/DialogStack.cpp @@ -71,8 +71,6 @@ namespace MysticQt setWidget(m_rootSplitter); } - - // destructor DialogStack::~DialogStack() { } @@ -81,6 +79,14 @@ namespace MysticQt // get rid of all dialogs and their allocated memory void DialogStack::Clear() { + for (Dialog& dialog : m_dialogs) + { + if (dialog.m_dialogWidget) + { + dialog.m_dialogWidget->deleteLater(); + } + } + // destroy the dialogs m_dialogs.clear(); @@ -679,6 +685,4 @@ namespace MysticQt return; } } -} // namespace MysticQt - -#include +} // namespace MysticQt diff --git a/Gems/EMotionFX/Code/MysticQt/Source/DialogStack.h b/Gems/EMotionFX/Code/MysticQt/Source/DialogStack.h index bf93b5d23f..64a48fb392 100644 --- a/Gems/EMotionFX/Code/MysticQt/Source/DialogStack.h +++ b/Gems/EMotionFX/Code/MysticQt/Source/DialogStack.h @@ -6,10 +6,8 @@ * */ -#ifndef __MYSTICQT_DIALOGSTACK_H -#define __MYSTICQT_DIALOGSTACK_H +#pragma once -// #if !defined(Q_MOC_RUN) #include "MysticQtConfig.h" #include @@ -30,14 +28,10 @@ namespace MysticQt { class DialogStackSplitter; - /** - * - * - */ class MYSTICQT_API DialogStack : public QScrollArea { - Q_OBJECT + Q_OBJECT // AUTOMOC public: DialogStack(QWidget* parent = nullptr); @@ -89,5 +83,3 @@ namespace MysticQt int32 m_prevMouseY; }; } // namespace MysticQt - -#endif diff --git a/Gems/EMotionFX/Code/MysticQt/Source/MysticQtConfig.h b/Gems/EMotionFX/Code/MysticQt/Source/MysticQtConfig.h index 9f3f2351cd..9b756b1db2 100644 --- a/Gems/EMotionFX/Code/MysticQt/Source/MysticQtConfig.h +++ b/Gems/EMotionFX/Code/MysticQt/Source/MysticQtConfig.h @@ -35,14 +35,14 @@ enum // convert from a QString into an AZStd::string MCORE_INLINE AZStd::string FromQtString(const QString& s) { - return {s.toUtf8().data(), static_cast(s.size())}; + return { s.toUtf8().data(), static_cast(s.toUtf8().length()) }; } // convert from a QString into an AZStd::string MCORE_INLINE void FromQtString(const QString& s, AZStd::string* result) { - *result = AZStd::string{s.toUtf8().data(), static_cast(s.size())}; + *result = AZStd::string{ s.toUtf8().data(), static_cast(s.toUtf8().length()) }; } inline QString FromStdString(AZStd::string_view s) diff --git a/Gems/EMotionFX/Code/MysticQt/Source/MysticQtManager.h b/Gems/EMotionFX/Code/MysticQt/Source/MysticQtManager.h index 9c8a73b92f..c313cd5489 100644 --- a/Gems/EMotionFX/Code/MysticQt/Source/MysticQtManager.h +++ b/Gems/EMotionFX/Code/MysticQt/Source/MysticQtManager.h @@ -6,8 +6,7 @@ * */ -#ifndef __MYSTICQT_MANAGER_H -#define __MYSTICQT_MANAGER_H +#pragma once // include required files #if !defined(Q_MOC_RUN) @@ -91,5 +90,3 @@ namespace MysticQt MCORE_INLINE const AZStd::string& GetAppDir() { return gMysticQtManager->GetAppDir(); } MCORE_INLINE const AZStd::string& GetDataDir() { return gMysticQtManager->GetDataDir(); } } // namespace MysticQt - -#endif diff --git a/Gems/EMotionFX/Code/Source/Editor/ColliderContainerWidget.cpp b/Gems/EMotionFX/Code/Source/Editor/ColliderContainerWidget.cpp index fea4f23c6a..13696298dc 100644 --- a/Gems/EMotionFX/Code/Source/Editor/ColliderContainerWidget.cpp +++ b/Gems/EMotionFX/Code/Source/Editor/ColliderContainerWidget.cpp @@ -10,6 +10,7 @@ #include #include #include +#include #include #include #include @@ -19,6 +20,7 @@ #include #include #include +#include #include #include #include @@ -610,7 +612,7 @@ namespace EMotionFX return QWidget::sizeHint() + QSize(0, s_layoutSpacing); } - void ColliderContainerWidget::RenderColliders(const AzPhysics::ShapeColliderPairList& colliders, + void ColliderContainerWidget::LegacyRenderColliders(const AzPhysics::ShapeColliderPairList& colliders, const ActorInstance* actorInstance, const Node* node, EMStudio::EMStudioPlugin::RenderInfo* renderInfo, @@ -630,7 +632,6 @@ namespace EMotionFX const Transform colliderOffsetTransform(collider.first->m_position, collider.first->m_rotation); const Transform& actorInstanceGlobalTransform = actorInstance->GetWorldSpaceTransform(); const Transform& emfxNodeGlobalTransform = actorInstance->GetTransformData()->GetCurrentPose()->GetModelSpaceTransform(nodeIndex); - const Transform emfxColliderGlobalTransformNoScale = colliderOffsetTransform * emfxNodeGlobalTransform * actorInstanceGlobalTransform; const AZ::TypeId colliderType = collider.second->RTTI_GetType(); @@ -638,7 +639,7 @@ namespace EMotionFX { Physics::SphereShapeConfiguration* sphere = static_cast(collider.second.get()); - // LY Physics scaling rules: The maximum component from the node scale will be multiplied by the radius of the sphere. + // O3DE Physics scaling rules: The maximum component from the node scale will be multiplied by the radius of the sphere. const float radius = sphere->m_radius * MCore::Max3(static_cast(worldScale.GetX()), static_cast(worldScale.GetY()), static_cast(worldScale.GetZ())); renderUtil->RenderWireframeSphere(radius, emfxColliderGlobalTransformNoScale.ToAZTransform(), colliderColor); @@ -647,7 +648,7 @@ namespace EMotionFX { Physics::CapsuleShapeConfiguration* capsule = static_cast(collider.second.get()); - // LY Physics scaling rules: The maximum of the X/Y scale components of the node scale will be multiplied by the radius of the capsule. The Z component of the entity scale will be multiplied by the height of the capsule. + // O3DE Physics scaling rules: The maximum of the X/Y scale components of the node scale will be multiplied by the radius of the capsule. The Z component of the entity scale will be multiplied by the height of the capsule. const float radius = capsule->m_radius * MCore::Max(static_cast(worldScale.GetX()), static_cast(worldScale.GetY())); const float height = capsule->m_height * static_cast(worldScale.GetZ()); @@ -657,7 +658,7 @@ namespace EMotionFX { Physics::BoxShapeConfiguration* box = static_cast(collider.second.get()); - // LY Physics scaling rules: Each component of the box dimensions will be scaled by the node's world scale. + // O3DE Physics scaling rules: Each component of the box dimensions will be scaled by the node's world scale. AZ::Vector3 dimensions = box->m_dimensions; dimensions *= worldScale; @@ -666,7 +667,8 @@ namespace EMotionFX } } - void ColliderContainerWidget::RenderColliders(PhysicsSetup::ColliderConfigType colliderConfigType, + void ColliderContainerWidget::LegacyRenderColliders( + PhysicsSetup::ColliderConfigType colliderConfigType, const MCore::RGBAColor& defaultColor, const MCore::RGBAColor& selectedColor, EMStudio::RenderPlugin* renderPlugin, @@ -701,7 +703,7 @@ namespace EMotionFX { const bool jointSelected = selectedJointIndices.empty() || selectedJointIndices.find(joint->GetNodeIndex()) != selectedJointIndices.end(); const AzPhysics::ShapeColliderPairList& colliders = nodeConfig.m_shapes; - RenderColliders(colliders, actorInstance, joint, renderInfo, jointSelected ? selectedColor : defaultColor); + LegacyRenderColliders(colliders, actorInstance, joint, renderInfo, jointSelected ? selectedColor : defaultColor); } } } @@ -711,6 +713,121 @@ namespace EMotionFX renderUtil->EnableLighting(oldLightingEnabled); } + void ColliderContainerWidget::RenderColliders( + const AzPhysics::ShapeColliderPairList& colliders, + const ActorInstance* actorInstance, + const Node* node, + const AZ::Color& colliderColor) + { + const size_t nodeIndex = node->GetNodeIndex(); + + for (const auto& collider : colliders) + { +#ifndef EMFX_SCALE_DISABLED + const AZ::Vector3& worldScale = actorInstance->GetTransformData()->GetCurrentPose()->GetModelSpaceTransform(nodeIndex).m_scale; +#else + const AZ::Vector3 worldScale = AZ::Vector3::CreateOne(); +#endif + + const Transform colliderOffsetTransform(collider.first->m_position, collider.first->m_rotation); + const Transform& actorInstanceGlobalTransform = actorInstance->GetWorldSpaceTransform(); + const Transform& emfxNodeGlobalTransform = + actorInstance->GetTransformData()->GetCurrentPose()->GetModelSpaceTransform(nodeIndex); + const Transform emfxColliderGlobalTransformNoScale = + colliderOffsetTransform * emfxNodeGlobalTransform * actorInstanceGlobalTransform; + + AZ::s32 viewportId = -1; + EMStudio::ViewportPluginRequestBus::BroadcastResult(viewportId, &EMStudio::ViewportPluginRequestBus::Events::GetViewportId); + AzFramework::DebugDisplayRequestBus::BusPtr debugDisplayBus; + AzFramework::DebugDisplayRequestBus::Bind(debugDisplayBus, viewportId); + AzFramework::DebugDisplayRequests* debugDisplay = nullptr; + debugDisplay = AzFramework::DebugDisplayRequestBus::FindFirstHandler(debugDisplayBus); + if (!debugDisplay) + { + return; + } + + const AZ::TypeId colliderType = collider.second->RTTI_GetType(); + if (colliderType == azrtti_typeid()) + { + Physics::SphereShapeConfiguration* sphere = static_cast(collider.second.get()); + + // O3DE Physics scaling rules: The maximum component from the node scale will be multiplied by the radius of the sphere. + const float radius = sphere->m_radius * + MCore::Max3(static_cast(worldScale.GetX()), static_cast(worldScale.GetY()), + static_cast(worldScale.GetZ())); + + debugDisplay->DepthTestOff(); + debugDisplay->SetColor(colliderColor); + debugDisplay->DrawWireSphere(emfxColliderGlobalTransformNoScale.m_position, radius); + } + else if (colliderType == azrtti_typeid()) + { + Physics::CapsuleShapeConfiguration* capsule = static_cast(collider.second.get()); + + // O3DE Physics scaling rules: The maximum of the X/Y scale components of the node scale will be multiplied by the radius of + // the capsule. The Z component of the entity scale will be multiplied by the height of the capsule. + const float radius = + capsule->m_radius * MCore::Max(static_cast(worldScale.GetX()), static_cast(worldScale.GetY())); + const float height = capsule->m_height * static_cast(worldScale.GetZ()); + + debugDisplay->DepthTestOff(); + debugDisplay->SetColor(colliderColor); + debugDisplay->DrawWireCapsule( + emfxColliderGlobalTransformNoScale.m_position, emfxColliderGlobalTransformNoScale.ToAZTransform().GetBasisZ(), radius, height); + } + else if (colliderType == azrtti_typeid()) + { + Physics::BoxShapeConfiguration* box = static_cast(collider.second.get()); + + // O3DE Physics scaling rules: Each component of the box dimensions will be scaled by the node's world scale. + AZ::Vector3 dimensions = box->m_dimensions; + dimensions *= worldScale; + + debugDisplay->DepthTestOff(); + debugDisplay->SetColor(colliderColor); + debugDisplay->DrawWireBox( + emfxColliderGlobalTransformNoScale.m_position, emfxColliderGlobalTransformNoScale.m_position + dimensions); + } + } + } + + void ColliderContainerWidget::RenderColliders(PhysicsSetup::ColliderConfigType colliderConfigType, + const AZ::Color& defaultColor, const AZ::Color& selectedColor) + { + if (colliderConfigType == PhysicsSetup::Unknown) + { + return; + } + + const AZStd::unordered_set& selectedJointIndices = EMStudio::GetManager()->GetSelectedJointIndices(); + + const ActorManager* actorManager = GetEMotionFX().GetActorManager(); + const size_t actorInstanceCount = actorManager->GetNumActorInstances(); + for (size_t i = 0; i < actorInstanceCount; ++i) + { + const ActorInstance* actorInstance = actorManager->GetActorInstance(i); + const Actor* actor = actorInstance->GetActor(); + const AZStd::shared_ptr& physicsSetup = actor->GetPhysicsSetup(); + const Physics::CharacterColliderConfiguration* colliderConfig = physicsSetup->GetColliderConfigByType(colliderConfigType); + + if (colliderConfig) + { + for (const Physics::CharacterColliderNodeConfiguration& nodeConfig : colliderConfig->m_nodes) + { + const Node* joint = actor->GetSkeleton()->FindNodeByName(nodeConfig.m_name.c_str()); + if (joint) + { + const bool jointSelected = + selectedJointIndices.empty() || selectedJointIndices.find(joint->GetNodeIndex()) != selectedJointIndices.end(); + const AzPhysics::ShapeColliderPairList& colliders = nodeConfig.m_shapes; + RenderColliders(colliders, actorInstance, joint, jointSelected ? selectedColor : defaultColor); + } + } + } + } + } + /////////////////////////////////////////////////////////////////////////// ColliderContainerWidget::ColliderEditedCallback::ColliderEditedCallback(ColliderContainerWidget* parent, bool executePreUndo, bool executePreCommand) diff --git a/Gems/EMotionFX/Code/Source/Editor/ColliderContainerWidget.h b/Gems/EMotionFX/Code/Source/Editor/ColliderContainerWidget.h index f4641e4ad6..82e6d151d5 100644 --- a/Gems/EMotionFX/Code/Source/Editor/ColliderContainerWidget.h +++ b/Gems/EMotionFX/Code/Source/Editor/ColliderContainerWidget.h @@ -152,18 +152,32 @@ namespace EMotionFX * @param[in] renderInfo Needed to access the render util. * @param[in] colliderColor The collider color. */ - static void RenderColliders(const AzPhysics::ShapeColliderPairList& colliders, + //! Deprecated: remove after openglrenderwidget is gone. + static void LegacyRenderColliders(const AzPhysics::ShapeColliderPairList& colliders, const ActorInstance* actorInstance, const Node* node, EMStudio::EMStudioPlugin::RenderInfo* renderInfo, const MCore::RGBAColor& colliderColor); - static void RenderColliders(PhysicsSetup::ColliderConfigType colliderConfigType, + //! Deprecated: remove after openglrenderwidget is gone. + static void LegacyRenderColliders( + PhysicsSetup::ColliderConfigType colliderConfigType, const MCore::RGBAColor& defaultColor, const MCore::RGBAColor& selectedColor, EMStudio::RenderPlugin* renderPlugin, EMStudio::EMStudioPlugin::RenderInfo* renderInfo); + static void RenderColliders( + const AzPhysics::ShapeColliderPairList& colliders, + const ActorInstance* actorInstance, + const Node* node, + const AZ::Color& colliderColor); + + static void RenderColliders( + PhysicsSetup::ColliderConfigType colliderConfigType, + const AZ::Color& defaultColor, + const AZ::Color& selectedColor); + static int s_layoutSpacing; signals: diff --git a/Gems/EMotionFX/Code/Source/Editor/Plugins/Cloth/ClothJointInspectorPlugin.cpp b/Gems/EMotionFX/Code/Source/Editor/Plugins/Cloth/ClothJointInspectorPlugin.cpp index e1a58f1f44..161cc2ac95 100644 --- a/Gems/EMotionFX/Code/Source/Editor/Plugins/Cloth/ClothJointInspectorPlugin.cpp +++ b/Gems/EMotionFX/Code/Source/Editor/Plugins/Cloth/ClothJointInspectorPlugin.cpp @@ -18,6 +18,7 @@ #include #include #include +#include #include @@ -172,7 +173,7 @@ namespace EMotionFX ColliderHelpers::ClearColliders(selectedRowIndices, PhysicsSetup::Cloth); } - void ClothJointInspectorPlugin::Render(EMStudio::RenderPlugin* renderPlugin, RenderInfo* renderInfo) + void ClothJointInspectorPlugin::LegacyRender(EMStudio::RenderPlugin* renderPlugin, RenderInfo* renderInfo) { EMStudio::RenderViewWidget* activeViewWidget = renderPlugin->GetActiveViewWidget(); if (!activeViewWidget) @@ -188,10 +189,22 @@ namespace EMotionFX const EMStudio::RenderOptions* renderOptions = renderPlugin->GetRenderOptions(); - ColliderContainerWidget::RenderColliders(PhysicsSetup::Cloth, + ColliderContainerWidget::LegacyRenderColliders(PhysicsSetup::Cloth, renderOptions->GetClothColliderColor(), renderOptions->GetSelectedClothColliderColor(), renderPlugin, renderInfo); } + + void ClothJointInspectorPlugin::Render(EMotionFX::ActorRenderFlagBitset renderFlags) + { + const bool renderColliders = renderFlags[RENDER_CLOTH_COLLIDERS]; + if (!renderColliders) + { + return; + } + + const AZ::Render::RenderActorSettings& settings = EMotionFX::GetRenderActorSettings(); + ColliderContainerWidget::RenderColliders(PhysicsSetup::Cloth, settings.m_clothColliderColor, settings.m_selectedClothColliderColor); + } } // namespace EMotionFX diff --git a/Gems/EMotionFX/Code/Source/Editor/Plugins/Cloth/ClothJointInspectorPlugin.h b/Gems/EMotionFX/Code/Source/Editor/Plugins/Cloth/ClothJointInspectorPlugin.h index 6a920fa10d..c1b3e9ad13 100644 --- a/Gems/EMotionFX/Code/Source/Editor/Plugins/Cloth/ClothJointInspectorPlugin.h +++ b/Gems/EMotionFX/Code/Source/Editor/Plugins/Cloth/ClothJointInspectorPlugin.h @@ -47,7 +47,8 @@ namespace EMotionFX // SkeletonOutlinerNotificationBus overrides void OnContextMenu(QMenu* menu, const QModelIndexList& selectedRowIndices) override; - void Render(EMStudio::RenderPlugin* renderPlugin, RenderInfo* renderInfo) override; + void LegacyRender(EMStudio::RenderPlugin* renderPlugin, RenderInfo* renderInfo) override; + void Render(EMotionFX::ActorRenderFlagBitset renderFlags) override; static bool IsJointInCloth(const QModelIndex& index); public slots: diff --git a/Gems/EMotionFX/Code/Source/Editor/Plugins/HitDetection/HitDetectionJointInspectorPlugin.cpp b/Gems/EMotionFX/Code/Source/Editor/Plugins/HitDetection/HitDetectionJointInspectorPlugin.cpp index b7cf3ea13d..0f0eb89bfc 100644 --- a/Gems/EMotionFX/Code/Source/Editor/Plugins/HitDetection/HitDetectionJointInspectorPlugin.cpp +++ b/Gems/EMotionFX/Code/Source/Editor/Plugins/HitDetection/HitDetectionJointInspectorPlugin.cpp @@ -15,6 +15,7 @@ #include #include #include +#include #include #include @@ -157,7 +158,7 @@ namespace EMotionFX ColliderHelpers::ClearColliders(selectedRowIndices, PhysicsSetup::HitDetection); } - void HitDetectionJointInspectorPlugin::Render(EMStudio::RenderPlugin* renderPlugin, RenderInfo* renderInfo) + void HitDetectionJointInspectorPlugin::LegacyRender(EMStudio::RenderPlugin* renderPlugin, RenderInfo* renderInfo) { EMStudio::RenderViewWidget* activeViewWidget = renderPlugin->GetActiveViewWidget(); if (!activeViewWidget) @@ -173,10 +174,25 @@ namespace EMotionFX const EMStudio::RenderOptions* renderOptions = renderPlugin->GetRenderOptions(); - ColliderContainerWidget::RenderColliders(PhysicsSetup::HitDetection, + ColliderContainerWidget::LegacyRenderColliders(PhysicsSetup::HitDetection, renderOptions->GetHitDetectionColliderColor(), renderOptions->GetSelectedHitDetectionColliderColor(), renderPlugin, renderInfo); } + + void HitDetectionJointInspectorPlugin::Render(EMotionFX::ActorRenderFlagBitset renderFlags) + { + const bool renderColliders = renderFlags[EMotionFX::ActorRenderFlag::RENDER_HITDETECTION_COLLIDERS]; + if (!renderColliders) + { + return; + } + + const AZ::Render::RenderActorSettings& settings = EMotionFX::GetRenderActorSettings(); + + ColliderContainerWidget::RenderColliders( + PhysicsSetup::HitDetection, settings.m_hitDetectionColliderColor, + settings.m_selectedHitDetectionColliderColor); + } } // namespace EMotionFX diff --git a/Gems/EMotionFX/Code/Source/Editor/Plugins/HitDetection/HitDetectionJointInspectorPlugin.h b/Gems/EMotionFX/Code/Source/Editor/Plugins/HitDetection/HitDetectionJointInspectorPlugin.h index 5454fc56f9..4dc61f9b9e 100644 --- a/Gems/EMotionFX/Code/Source/Editor/Plugins/HitDetection/HitDetectionJointInspectorPlugin.h +++ b/Gems/EMotionFX/Code/Source/Editor/Plugins/HitDetection/HitDetectionJointInspectorPlugin.h @@ -43,7 +43,8 @@ namespace EMotionFX // SkeletonOutlinerNotificationBus overrides void OnContextMenu(QMenu* menu, const QModelIndexList& selectedRowIndices) override; - void Render(EMStudio::RenderPlugin* renderPlugin, RenderInfo* renderInfo) override; + void LegacyRender(EMStudio::RenderPlugin* renderPlugin, RenderInfo* renderInfo) override; + void Render(EMotionFX::ActorRenderFlagBitset renderFlags) override; public slots: void OnAddCollider(); diff --git a/Gems/EMotionFX/Code/Source/Editor/Plugins/Ragdoll/RagdollNodeInspectorPlugin.cpp b/Gems/EMotionFX/Code/Source/Editor/Plugins/Ragdoll/RagdollNodeInspectorPlugin.cpp index cb5c525cec..e76cf42c44 100644 --- a/Gems/EMotionFX/Code/Source/Editor/Plugins/Ragdoll/RagdollNodeInspectorPlugin.cpp +++ b/Gems/EMotionFX/Code/Source/Editor/Plugins/Ragdoll/RagdollNodeInspectorPlugin.cpp @@ -7,6 +7,7 @@ */ #include +#include #include #include #include @@ -17,12 +18,14 @@ #include #include #include +#include #include #include #include #include #include #include +#include #include #include @@ -412,7 +415,7 @@ namespace EMotionFX } } - void RagdollNodeInspectorPlugin::Render(EMStudio::RenderPlugin* renderPlugin, RenderInfo* renderInfo) + void RagdollNodeInspectorPlugin::LegacyRender(EMStudio::RenderPlugin* renderPlugin, RenderInfo* renderInfo) { EMStudio::RenderViewWidget* activeViewWidget = renderPlugin->GetActiveViewWidget(); if (!activeViewWidget) @@ -435,14 +438,19 @@ namespace EMotionFX for (size_t i = 0; i < actorInstanceCount; ++i) { ActorInstance* actorInstance = GetActorManager().GetActorInstance(i); - RenderRagdoll(actorInstance, renderColliders, renderJointLimits, renderPlugin, renderInfo); + LegacyRenderRagdoll(actorInstance, renderColliders, renderJointLimits, renderPlugin, renderInfo); } renderUtil->RenderLines(); renderUtil->EnableLighting(oldLightingEnabled); } - void RagdollNodeInspectorPlugin::RenderRagdoll(ActorInstance* actorInstance, bool renderColliders, bool renderJointLimits, EMStudio::RenderPlugin* renderPlugin, RenderInfo* renderInfo) + void RagdollNodeInspectorPlugin::LegacyRenderRagdoll( + ActorInstance* actorInstance, + bool renderColliders, + bool renderJointLimits, + EMStudio::RenderPlugin* renderPlugin, + RenderInfo* renderInfo) { const Actor* actor = actorInstance->GetActor(); const Skeleton* skeleton = actor->GetSkeleton(); @@ -495,11 +503,12 @@ namespace EMotionFX if (renderColliders) { - const Physics::CharacterColliderNodeConfiguration* colliderNodeConfig = colliderConfig.FindNodeConfigByName(joint->GetNameString()); + const Physics::CharacterColliderNodeConfiguration* colliderNodeConfig = + colliderConfig.FindNodeConfigByName(joint->GetNameString()); if (colliderNodeConfig) { const AzPhysics::ShapeColliderPairList& colliders = colliderNodeConfig->m_shapes; - ColliderContainerWidget::RenderColliders(colliders, actorInstance, joint, renderInfo, finalColor); + ColliderContainerWidget::LegacyRenderColliders(colliders, actorInstance, joint, renderInfo, finalColor); } } @@ -511,15 +520,15 @@ namespace EMotionFX const Node* ragdollParentNode = physicsSetup->FindRagdollParentNode(joint); if (ragdollParentNode) { - RenderJointLimit(*jointLimitConfig, actorInstance, joint, ragdollParentNode, renderPlugin, renderInfo, finalColor); - RenderJointFrame(*jointLimitConfig, actorInstance, joint, ragdollParentNode, renderInfo, finalColor); + LegacyRenderJointLimit(*jointLimitConfig, actorInstance, joint, ragdollParentNode, renderPlugin, renderInfo, finalColor); + LegacyRenderJointFrame(*jointLimitConfig, actorInstance, joint, ragdollParentNode, renderInfo, finalColor); } } } } } - void RagdollNodeInspectorPlugin::RenderJointLimit( + void RagdollNodeInspectorPlugin::LegacyRenderJointLimit( const AzPhysics::JointConfiguration& configuration, const ActorInstance* actorInstance, const Node* node, @@ -567,7 +576,7 @@ namespace EMotionFX } } - void RagdollNodeInspectorPlugin::RenderJointFrame( + void RagdollNodeInspectorPlugin::LegacyRenderJointFrame( const AzPhysics::JointConfiguration& configuration, const ActorInstance* actorInstance, const Node* node, @@ -585,4 +594,192 @@ namespace EMotionFX renderInfo->m_renderUtil->RenderArrow(0.1f, jointChildWorldSpaceTransformNoScale.m_position, MCore::GetRight(jointChildWorldSpaceTransformNoScale.ToAZTransform()), color); } + + void RagdollNodeInspectorPlugin::Render(EMotionFX::ActorRenderFlagBitset renderFlags) + { + const bool renderColliders = renderFlags[RENDER_RAGDOLL_COLLIDERS]; + const bool renderJointLimits = renderFlags[RENDER_RAGDOLL_JOINTLIMITS]; + if (!renderColliders && !renderJointLimits) + { + return; + } + + const size_t actorInstanceCount = GetActorManager().GetNumActorInstances(); + for (size_t i = 0; i < actorInstanceCount; ++i) + { + ActorInstance* actorInstance = GetActorManager().GetActorInstance(i); + RenderRagdoll(actorInstance, renderColliders, renderJointLimits); + } + } + + void RagdollNodeInspectorPlugin::RenderRagdoll( + ActorInstance* actorInstance, + bool renderColliders, + bool renderJointLimits) + { + const Actor* actor = actorInstance->GetActor(); + const Skeleton* skeleton = actor->GetSkeleton(); + const size_t numNodes = skeleton->GetNumNodes(); + const AZStd::shared_ptr& physicsSetup = actor->GetPhysicsSetup(); + const Physics::RagdollConfiguration& ragdollConfig = physicsSetup->GetRagdollConfig(); + const AZStd::vector& ragdollNodes = ragdollConfig.m_nodes; + const Physics::CharacterColliderConfiguration& colliderConfig = ragdollConfig.m_colliders; + const RagdollInstance* ragdollInstance = actorInstance->GetRagdollInstance(); + + const AZ::Render::RenderActorSettings& settings = EMotionFX::GetRenderActorSettings(); + const AZ::Color& violatedColor = settings.m_violatedJointLimitColor; + const AZ::Color& defaultColor = settings.m_ragdollColliderColor; + const AZ::Color& selectedColor = settings.m_selectedRagdollColliderColor; + + const AZStd::unordered_set& selectedJointIndices = EMStudio::GetManager()->GetSelectedJointIndices(); + + for (size_t nodeIndex = 0; nodeIndex < numNodes; ++nodeIndex) + { + const Node* joint = skeleton->GetNode(nodeIndex); + const size_t jointIndex = joint->GetNodeIndex(); + + AZ::Outcome ragdollNodeIndex = AZ::Failure(); + if (ragdollInstance) + { + ragdollNodeIndex = ragdollInstance->GetRagdollNodeIndex(jointIndex); + } + else + { + ragdollNodeIndex = ragdollConfig.FindNodeConfigIndexByName(joint->GetNameString()); + } + + if (!ragdollNodeIndex.IsSuccess()) + { + continue; + } + + const bool jointSelected = selectedJointIndices.empty() || selectedJointIndices.find(jointIndex) != selectedJointIndices.end(); + + AZ::Color finalColor; + if (jointSelected) + { + finalColor = selectedColor; + } + else + { + finalColor = defaultColor; + } + + const Physics::RagdollNodeConfiguration& ragdollNode = ragdollNodes[ragdollNodeIndex.GetValue()]; + + if (renderColliders) + { + const Physics::CharacterColliderNodeConfiguration* colliderNodeConfig = + colliderConfig.FindNodeConfigByName(joint->GetNameString()); + if (colliderNodeConfig) + { + const AzPhysics::ShapeColliderPairList& colliders = colliderNodeConfig->m_shapes; + ColliderContainerWidget::RenderColliders(colliders, actorInstance, joint, finalColor); + } + } + + if (renderJointLimits && jointSelected) + { + const AZStd::shared_ptr& jointLimitConfig = ragdollNode.m_jointConfig; + if (jointLimitConfig) + { + const Node* ragdollParentNode = physicsSetup->FindRagdollParentNode(joint); + if (ragdollParentNode) + { + RenderJointLimit(*jointLimitConfig, actorInstance, joint, ragdollParentNode, finalColor, violatedColor); + RenderJointFrame(*jointLimitConfig, actorInstance, joint, ragdollParentNode, finalColor); + } + } + } + } + } + + void RagdollNodeInspectorPlugin::RenderJointLimit( + const AzPhysics::JointConfiguration& configuration, + const ActorInstance* actorInstance, + const Node* node, + const Node* parentNode, + const AZ::Color& regularColor, + const AZ::Color& violatedColor) + { + const size_t nodeIndex = node->GetNodeIndex(); + const size_t parentNodeIndex = parentNode->GetNodeIndex(); + const Transform& actorInstanceWorldTransform = actorInstance->GetWorldSpaceTransform(); + const Pose* currentPose = actorInstance->GetTransformData()->GetCurrentPose(); + const AZ::Quaternion& parentOrientation = currentPose->GetModelSpaceTransform(parentNodeIndex).m_rotation; + const AZ::Quaternion& childOrientation = currentPose->GetModelSpaceTransform(nodeIndex).m_rotation; + + m_vertexBuffer.clear(); + m_indexBuffer.clear(); + m_lineBuffer.clear(); + m_lineValidityBuffer.clear(); + if (auto* jointHelpers = AZ::Interface::Get()) + { + jointHelpers->GenerateJointLimitVisualizationData( + configuration, parentOrientation, childOrientation, s_scale, s_angularSubdivisions, s_radialSubdivisions, m_vertexBuffer, + m_indexBuffer, m_lineBuffer, m_lineValidityBuffer); + } + + Transform jointModelSpaceTransform = currentPose->GetModelSpaceTransform(parentNodeIndex); + jointModelSpaceTransform.m_position = currentPose->GetModelSpaceTransform(nodeIndex).m_position; + const Transform jointGlobalTransformNoScale = jointModelSpaceTransform * actorInstanceWorldTransform; + + const size_t numLineBufferEntries = m_lineBuffer.size(); + if (m_lineValidityBuffer.size() * 2 != numLineBufferEntries) + { + AZ_ErrorOnce("EMotionFX", false, "Unexpected buffer size in joint limit visualization for node %s", node->GetName()); + return; + } + + AZ::s32 viewportId = -1; + EMStudio::ViewportPluginRequestBus::BroadcastResult(viewportId, &EMStudio::ViewportPluginRequestBus::Events::GetViewportId); + AzFramework::DebugDisplayRequestBus::BusPtr debugDisplayBus; + AzFramework::DebugDisplayRequestBus::Bind(debugDisplayBus, viewportId); + AzFramework::DebugDisplayRequests* debugDisplay = nullptr; + debugDisplay = AzFramework::DebugDisplayRequestBus::FindFirstHandler(debugDisplayBus); + if (!debugDisplay) + { + return; + } + + for (size_t i = 0; i < numLineBufferEntries; i += 2) + { + const AZ::Color& lineColor = m_lineValidityBuffer[i / 2] ? regularColor : violatedColor; + debugDisplay->DrawLine( + jointGlobalTransformNoScale.TransformPoint(m_lineBuffer[i]), + jointGlobalTransformNoScale.TransformPoint(m_lineBuffer[i + 1]), lineColor.GetAsVector4(), lineColor.GetAsVector4() + ); + } + } + + void RagdollNodeInspectorPlugin::RenderJointFrame( + const AzPhysics::JointConfiguration& configuration, + const ActorInstance* actorInstance, + const Node* node, + const Node* parentNode, + const AZ::Color& color) + { + AZ_UNUSED(parentNode); + + const Transform& actorInstanceWorldSpaceTransform = actorInstance->GetWorldSpaceTransform(); + const Pose* currentPose = actorInstance->GetTransformData()->GetCurrentPose(); + const Transform childJointLocalSpaceTransform(AZ::Vector3::CreateZero(), configuration.m_childLocalRotation); + const Transform childModelSpaceTransform = + childJointLocalSpaceTransform * currentPose->GetModelSpaceTransform(node->GetNodeIndex()); + const Transform jointChildWorldSpaceTransformNoScale = (childModelSpaceTransform * actorInstanceWorldSpaceTransform); + AZ::Vector3 dir = jointChildWorldSpaceTransformNoScale.ToAZTransform().GetBasisX(); + + AZ::s32 viewportId = -1; + EMStudio::ViewportPluginRequestBus::BroadcastResult(viewportId, &EMStudio::ViewportPluginRequestBus::Events::GetViewportId); + AzFramework::DebugDisplayRequestBus::BusPtr debugDisplayBus; + AzFramework::DebugDisplayRequestBus::Bind(debugDisplayBus, viewportId); + AzFramework::DebugDisplayRequests* debugDisplay = nullptr; + debugDisplay = AzFramework::DebugDisplayRequestBus::FindFirstHandler(debugDisplayBus); + if (!debugDisplay) + { + return; + } + debugDisplay->SetColor(color); + debugDisplay->DrawArrow(jointChildWorldSpaceTransformNoScale.m_position, jointChildWorldSpaceTransformNoScale.m_position + dir, 0.1f); + } } // namespace EMotionFX diff --git a/Gems/EMotionFX/Code/Source/Editor/Plugins/Ragdoll/RagdollNodeInspectorPlugin.h b/Gems/EMotionFX/Code/Source/Editor/Plugins/Ragdoll/RagdollNodeInspectorPlugin.h index 36a33c1cd3..d3b27da5ce 100644 --- a/Gems/EMotionFX/Code/Source/Editor/Plugins/Ragdoll/RagdollNodeInspectorPlugin.h +++ b/Gems/EMotionFX/Code/Source/Editor/Plugins/Ragdoll/RagdollNodeInspectorPlugin.h @@ -54,9 +54,10 @@ namespace EMotionFX static void AddCollider(const QModelIndexList& modelIndices, const AZ::TypeId& colliderType); static void CopyColliders(const QModelIndexList& modelIndices, PhysicsSetup::ColliderConfigType copyFrom); - void Render(EMStudio::RenderPlugin* renderPlugin, RenderInfo* renderInfo) override; - void RenderRagdoll(ActorInstance* actorInstance, bool renderColliders, bool renderJointLimits, EMStudio::RenderPlugin* renderPlugin, RenderInfo* renderInfo); - void RenderJointLimit( + //! Deprecated: All legacy render function is tied to openGL. Will be removed after openGLPlugin is completely removed. + void LegacyRender(EMStudio::RenderPlugin* renderPlugin, RenderInfo* renderInfo) override; + void LegacyRenderRagdoll(ActorInstance* actorInstance, bool renderColliders, bool renderJointLimits, EMStudio::RenderPlugin* renderPlugin, RenderInfo* renderInfo); + void LegacyRenderJointLimit( const AzPhysics::JointConfiguration& jointConfiguration, const ActorInstance* actorInstance, const Node* node, @@ -64,7 +65,7 @@ namespace EMotionFX EMStudio::RenderPlugin* renderPlugin, EMStudio::EMStudioPlugin::RenderInfo* renderInfo, const MCore::RGBAColor& color); - void RenderJointFrame( + void LegacyRenderJointFrame( const AzPhysics::JointConfiguration& jointConfiguration, const ActorInstance* actorInstance, const Node* node, @@ -72,6 +73,26 @@ namespace EMotionFX EMStudio::EMStudioPlugin::RenderInfo* renderInfo, const MCore::RGBAColor& color); + //! Those function replaces legacyRender function and calls atom auxGeom render internally. + void Render(EMotionFX::ActorRenderFlagBitset renderFlags) override; + void RenderRagdoll( + ActorInstance* actorInstance, + bool renderColliders, + bool renderJointLimits); + void RenderJointLimit( + const AzPhysics::JointConfiguration& jointConfiguration, + const ActorInstance* actorInstance, + const Node* node, + const Node* parentNode, + const AZ::Color& regularColor, + const AZ::Color& violatedColor); + void RenderJointFrame( + const AzPhysics::JointConfiguration& jointConfiguration, + const ActorInstance* actorInstance, + const Node* node, + const Node* parentNode, + const AZ::Color& color); + public slots: void OnAddToRagdoll(); void OnAddCollider(); diff --git a/Gems/EMotionFX/Code/Source/Editor/Plugins/SimulatedObject/SimulatedObjectWidget.cpp b/Gems/EMotionFX/Code/Source/Editor/Plugins/SimulatedObject/SimulatedObjectWidget.cpp index 48104707de..695603cecb 100644 --- a/Gems/EMotionFX/Code/Source/Editor/Plugins/SimulatedObject/SimulatedObjectWidget.cpp +++ b/Gems/EMotionFX/Code/Source/Editor/Plugins/SimulatedObject/SimulatedObjectWidget.cpp @@ -8,6 +8,7 @@ #include #include +#include #include #include #include @@ -18,6 +19,7 @@ #include #include #include +#include #include #include #include @@ -25,6 +27,7 @@ #include #include #include +#include #include #include #include @@ -330,6 +333,11 @@ namespace EMotionFX const Actor* actor = selectedRowIndices[0].data(SkeletonModel::ROLE_ACTOR_POINTER).value(); const SimulatedObjectSetup* simulatedObjectSetup = actor->GetSimulatedObjectSetup().get(); + if (!simulatedObjectSetup) + { + AZ_Assert(false, "Expected a simulated object setup on the actor."); + return; + } AZStd::unordered_set addToCandidates; for (const QModelIndex& index : selectedRowIndices) @@ -477,7 +485,7 @@ namespace EMotionFX // -------------------------------------------------- Rendering ------------------------------------------------------------- - void SimulatedObjectWidget::Render(EMStudio::RenderPlugin* renderPlugin, RenderInfo* renderInfo) + void SimulatedObjectWidget::LegacyRender(EMStudio::RenderPlugin* renderPlugin, RenderInfo* renderInfo) { if (!m_actor || !m_actorInstance) { @@ -501,7 +509,92 @@ namespace EMotionFX ActorInstance* actorInstance = GetActorManager().GetActorInstance(actorInstanceIndex); const Actor* actor = actorInstance->GetActor(); const SimulatedObjectSetup* setup = actor->GetSimulatedObjectSetup().get(); - AZ_Assert(setup, "Expected a simulated object setup on the actor instance."); + if (!setup) + { + AZ_Assert(false, "Expected a simulated object setup on the actor instance."); + return; + } + + const size_t objectCount = setup->GetNumSimulatedObjects(); + for (size_t objectIndex = 0; objectIndex < objectCount; ++objectIndex) + { + const SimulatedObject* object = setup->GetSimulatedObject(objectIndex); + const size_t simulatedJointCount = object->GetNumSimulatedJoints(); + for (size_t simulatedJointIndex = 0; simulatedJointIndex < simulatedJointCount; ++simulatedJointIndex) + { + const SimulatedJoint* simulatedJoint = object->GetSimulatedJoint(simulatedJointIndex); + const size_t skeletonJointIndex = simulatedJoint->GetSkeletonJointIndex(); + if (selectedJointIndices.find(skeletonJointIndex) != selectedJointIndices.end()) + { + LegacyRenderJointRadius(simulatedJoint, actorInstance, AZ::Color(1.0f, 0.0f, 1.0f, 1.0f)); + } + } + } + } + } + + const bool renderColliders = activeViewWidget->GetRenderFlag(EMStudio::RenderViewWidget::RENDER_SIMULATEDOBJECT_COLLIDERS); + if (renderColliders) + { + const EMStudio::RenderOptions* renderOptions = renderPlugin->GetRenderOptions(); + ColliderContainerWidget::LegacyRenderColliders(PhysicsSetup::SimulatedObjectCollider, + renderOptions->GetSimulatedObjectColliderColor(), + renderOptions->GetSelectedSimulatedObjectColliderColor(), + renderPlugin, + renderInfo); + } + } + + void SimulatedObjectWidget::LegacyRenderJointRadius(const SimulatedJoint* joint, ActorInstance* actorInstance, const AZ::Color& color) + { +#ifndef EMFX_SCALE_DISABLED + const float scale = actorInstance->GetWorldSpaceTransform().m_scale.GetX(); +#else + const float scale = 1.0f; +#endif + + const float radius = joint->GetCollisionRadius() * scale; + if (radius <= AZ::Constants::FloatEpsilon) + { + return; + } + + AZ_Assert(joint->GetSkeletonJointIndex() != InvalidIndex, "Expected skeletal joint index to be valid."); + const EMotionFX::Transform jointTransform = + actorInstance->GetTransformData()->GetCurrentPose()->GetWorldSpaceTransform(joint->GetSkeletonJointIndex()); + + DebugDraw& debugDraw = GetDebugDraw(); + DebugDraw::ActorInstanceData* drawData = debugDraw.GetActorInstanceData(actorInstance); + drawData->Lock(); + drawData->DrawWireframeSphere(jointTransform.m_position, radius, color, jointTransform.m_rotation, 12, 12); + drawData->Unlock(); + } + + void SimulatedObjectWidget::Render(EMotionFX::ActorRenderFlagBitset renderFlags) + { + if (!m_actor || !m_actorInstance) + { + return; + } + + const AZ::Render::RenderActorSettings& settings = EMotionFX::GetRenderActorSettings(); + const bool renderSimulatedJoints = renderFlags[RENDER_SIMULATEJOINTS]; + const AZStd::unordered_set& selectedJointIndices = EMStudio::GetManager()->GetSelectedJointIndices(); + if (renderSimulatedJoints && !selectedJointIndices.empty()) + { + // Render the joint radius. + const size_t actorInstanceCount = GetActorManager().GetNumActorInstances(); + for (size_t actorInstanceIndex = 0; actorInstanceIndex < actorInstanceCount; ++actorInstanceIndex) + { + ActorInstance* actorInstance = GetActorManager().GetActorInstance(actorInstanceIndex); + const Actor* actor = actorInstance->GetActor(); + const SimulatedObjectSetup* setup = actor->GetSimulatedObjectSetup().get(); + if (!setup) + { + AZ_Assert(false, "Expected a simulated object setup on the actor instance."); + return; + } + const size_t objectCount = setup->GetNumSimulatedObjects(); for (size_t objectIndex = 0; objectIndex < objectCount; ++objectIndex) { @@ -520,25 +613,21 @@ namespace EMotionFX } } - const bool renderColliders = activeViewWidget->GetRenderFlag(EMStudio::RenderViewWidget::RENDER_SIMULATEDOBJECT_COLLIDERS); + const bool renderColliders = renderFlags[RENDER_SIMULATEDOBJECT_COLLIDERS]; if (renderColliders) { - const EMStudio::RenderOptions* renderOptions = renderPlugin->GetRenderOptions(); ColliderContainerWidget::RenderColliders(PhysicsSetup::SimulatedObjectCollider, - renderOptions->GetSimulatedObjectColliderColor(), - renderOptions->GetSelectedSimulatedObjectColliderColor(), - renderPlugin, - renderInfo); + settings.m_simulatedObjectColliderColor, settings.m_selectedSimulatedObjectColliderColor); } } - void SimulatedObjectWidget::RenderJointRadius(const SimulatedJoint* joint, ActorInstance* actorInstance, const AZ::Color& color) + void SimulatedObjectWidget::RenderJointRadius(const SimulatedJoint* joint, ActorInstance* actorInstance, const AZ::Color& color) { - #ifndef EMFX_SCALE_DISABLED - const float scale = actorInstance->GetWorldSpaceTransform().m_scale.GetX(); - #else - const float scale = 1.0f; - #endif +#ifndef EMFX_SCALE_DISABLED + const float scale = actorInstance->GetWorldSpaceTransform().m_scale.GetX(); +#else + const float scale = 1.0f; +#endif const float radius = joint->GetCollisionRadius() * scale; if (radius <= AZ::Constants::FloatEpsilon) @@ -547,12 +636,21 @@ namespace EMotionFX } AZ_Assert(joint->GetSkeletonJointIndex() != InvalidIndex, "Expected skeletal joint index to be valid."); - const EMotionFX::Transform jointTransform = actorInstance->GetTransformData()->GetCurrentPose()->GetWorldSpaceTransform(joint->GetSkeletonJointIndex()); + const EMotionFX::Transform jointTransform = + actorInstance->GetTransformData()->GetCurrentPose()->GetWorldSpaceTransform(joint->GetSkeletonJointIndex()); - DebugDraw& debugDraw = GetDebugDraw(); - DebugDraw::ActorInstanceData* drawData = debugDraw.GetActorInstanceData(actorInstance); - drawData->Lock(); - drawData->DrawWireframeSphere(jointTransform.m_position, radius, color, jointTransform.m_rotation, 12, 12); - drawData->Unlock(); + AZ::s32 viewportId = -1; + EMStudio::ViewportPluginRequestBus::BroadcastResult(viewportId, &EMStudio::ViewportPluginRequestBus::Events::GetViewportId); + AzFramework::DebugDisplayRequestBus::BusPtr debugDisplayBus; + AzFramework::DebugDisplayRequestBus::Bind(debugDisplayBus, viewportId); + AzFramework::DebugDisplayRequests* debugDisplay = nullptr; + debugDisplay = AzFramework::DebugDisplayRequestBus::FindFirstHandler(debugDisplayBus); + if (!debugDisplay) + { + return; + } + + debugDisplay->SetColor(color); + debugDisplay->DrawWireSphere(jointTransform.m_position, radius); } } // namespace EMotionFX diff --git a/Gems/EMotionFX/Code/Source/Editor/Plugins/SimulatedObject/SimulatedObjectWidget.h b/Gems/EMotionFX/Code/Source/Editor/Plugins/SimulatedObject/SimulatedObjectWidget.h index 955c97ce13..9662fbc150 100644 --- a/Gems/EMotionFX/Code/Source/Editor/Plugins/SimulatedObject/SimulatedObjectWidget.h +++ b/Gems/EMotionFX/Code/Source/Editor/Plugins/SimulatedObject/SimulatedObjectWidget.h @@ -59,8 +59,9 @@ namespace EMotionFX bool Init() override; void Reinit(); - // Render - void Render(EMStudio::RenderPlugin* renderPlugin, RenderInfo* renderInfo) override; + void LegacyRender(EMStudio::RenderPlugin* renderPlugin, RenderInfo* renderInfo) override; + void LegacyRenderJointRadius(const SimulatedJoint* joint, ActorInstance* actorInstance, const AZ::Color& color); + void Render(EMotionFX::ActorRenderFlagBitset renderFlags) override; void RenderJointRadius(const SimulatedJoint* joint, ActorInstance* actorInstance, const AZ::Color& color); SimulatedObjectModel* GetSimulatedObjectModel() const; diff --git a/Gems/EMotionFX/Code/Source/Editor/PropertyWidgets/AnimGraphNodeNameHandler.cpp b/Gems/EMotionFX/Code/Source/Editor/PropertyWidgets/AnimGraphNodeNameHandler.cpp index 754acdaf1c..854825b45c 100644 --- a/Gems/EMotionFX/Code/Source/Editor/PropertyWidgets/AnimGraphNodeNameHandler.cpp +++ b/Gems/EMotionFX/Code/Source/Editor/PropertyWidgets/AnimGraphNodeNameHandler.cpp @@ -38,6 +38,12 @@ namespace EMotionFX m_node = node; } + void AnimGraphNodeNameLineEdit::focusInEvent([[maybe_unused]] QFocusEvent* event) + { + selectAll(); + QLineEdit::focusInEvent(event); + } + //--------------------------------------------------------------------------------------------------------------------------------------------------------- AnimGraphNodeNameHandler::AnimGraphNodeNameHandler() diff --git a/Gems/EMotionFX/Code/Source/Editor/PropertyWidgets/AnimGraphNodeNameHandler.h b/Gems/EMotionFX/Code/Source/Editor/PropertyWidgets/AnimGraphNodeNameHandler.h index ad6f0116ca..8da69f7437 100644 --- a/Gems/EMotionFX/Code/Source/Editor/PropertyWidgets/AnimGraphNodeNameHandler.h +++ b/Gems/EMotionFX/Code/Source/Editor/PropertyWidgets/AnimGraphNodeNameHandler.h @@ -29,7 +29,8 @@ namespace EMotionFX ~AnimGraphNodeNameLineEdit() = default; void SetNode(AnimGraphNode* node); - + private: + void focusInEvent(QFocusEvent* event) override; private: AnimGraphNode* m_node; }; diff --git a/Gems/EMotionFX/Code/Source/Editor/PropertyWidgets/BlendSpaceMotionContainerHandler.cpp b/Gems/EMotionFX/Code/Source/Editor/PropertyWidgets/BlendSpaceMotionContainerHandler.cpp index 8cee46133e..f0a6e80bf7 100644 --- a/Gems/EMotionFX/Code/Source/Editor/PropertyWidgets/BlendSpaceMotionContainerHandler.cpp +++ b/Gems/EMotionFX/Code/Source/Editor/PropertyWidgets/BlendSpaceMotionContainerHandler.cpp @@ -41,47 +41,36 @@ namespace EMotionFX layout->addWidget(m_labelMotion, row, column); column++; - // Motion position x - QHBoxLayout* layoutX = new QHBoxLayout(); - layoutX->setAlignment(Qt::AlignRight); + const auto makeSpinbox = [row, &column, layout, motionId = motionId.c_str()](const QString& text, const QString& color) + { + auto* axisLayout = new QHBoxLayout(); + axisLayout->setAlignment(Qt::AlignRight); - QLabel* labelX = new QLabel("X"); - labelX->setSizePolicy(QSizePolicy::Fixed, QSizePolicy::Fixed); - labelX->setStyleSheet("QLabel { font-weight: bold; color : red; }"); - layoutX->addWidget(labelX); + auto* axisLabel = new QLabel(text); + axisLabel->setSizePolicy(QSizePolicy::Fixed, QSizePolicy::Fixed); + axisLabel->setStyleSheet(QString("QLabel { font-weight: bold; color : %1; }").arg(color)); + axisLayout->addWidget(axisLabel); - m_spinboxX = new AzQtComponents::DoubleSpinBox(); - m_spinboxX->setSingleStep(0.1); - m_spinboxX->setDecimals(4); - m_spinboxX->setRange(-FLT_MAX, FLT_MAX); - m_spinboxX->setProperty("motionId", motionId.c_str()); - m_spinboxX->setKeyboardTracking(false); - layoutX->addWidget(m_spinboxX); + auto* spinbox = new AzQtComponents::DoubleSpinBox(); + spinbox->setSingleStep(0.1); + spinbox->setDecimals(4); + spinbox->setRange(-FLT_MAX, FLT_MAX); + spinbox->setProperty("motionId", motionId); + spinbox->setKeyboardTracking(false); + axisLayout->addWidget(spinbox); - layout->addLayout(layoutX, row, column); - column++; + layout->addLayout(axisLayout, row, column); + column++; + + return spinbox; + }; + + // Motion coordinate spinboxes. + m_spinboxX = makeSpinbox("X", "red"); - // Motion position y if (showYFields) { - QHBoxLayout* layoutY = new QHBoxLayout(); - layoutY->setAlignment(Qt::AlignRight); - - QLabel* labelY = new QLabel("Y"); - labelY->setSizePolicy(QSizePolicy::Fixed, QSizePolicy::Fixed); - labelY->setStyleSheet("QLabel { font-weight: bold; color : green; }"); - layoutY->addWidget(labelY); - - m_spinboxY = new AzQtComponents::DoubleSpinBox(); - m_spinboxY->setSingleStep(0.1); - m_spinboxY->setDecimals(4); - m_spinboxY->setRange(-FLT_MAX, FLT_MAX); - m_spinboxY->setProperty("motionId", motionId.c_str()); - m_spinboxX->setKeyboardTracking(false); - layoutY->addWidget(m_spinboxY); - - layout->addLayout(layoutY, row, column); - column++; + m_spinboxY = makeSpinbox("Y", "green"); } else { diff --git a/Gems/EMotionFX/Code/Source/Integration/Components/AnimAudioComponent.cpp b/Gems/EMotionFX/Code/Source/Integration/Components/AnimAudioComponent.cpp index eac3705300..7cfea90ae2 100644 --- a/Gems/EMotionFX/Code/Source/Integration/Components/AnimAudioComponent.cpp +++ b/Gems/EMotionFX/Code/Source/Integration/Components/AnimAudioComponent.cpp @@ -405,6 +405,7 @@ namespace EMotionFX ActorNotificationBus::Handler::BusConnect(GetEntityId()); AnimAudioComponentNotificationBus::Handler::BusConnect(GetEntityId()); + AnimAudioComponentRequestBus::Handler::BusConnect(GetEntityId()); } void AnimAudioComponent::Deactivate() @@ -421,6 +422,7 @@ namespace EMotionFX ActorNotificationBus::Handler::BusDisconnect(GetEntityId()); AnimAudioComponentNotificationBus::Handler::BusDisconnect(GetEntityId()); + AnimAudioComponentRequestBus::Handler::BusDisconnect(GetEntityId()); } void AnimAudioComponent::OnTick(float deltaTime, AZ::ScriptTimePoint time) diff --git a/Gems/EMotionFX/Code/Source/Integration/Components/SimpleLODComponent.cpp b/Gems/EMotionFX/Code/Source/Integration/Components/SimpleLODComponent.cpp index aa17058adf..c12a7ee6bc 100644 --- a/Gems/EMotionFX/Code/Source/Integration/Components/SimpleLODComponent.cpp +++ b/Gems/EMotionFX/Code/Source/Integration/Components/SimpleLODComponent.cpp @@ -53,6 +53,7 @@ namespace EMotionFX ->Attribute(AZ::Edit::Attributes::AutoExpand, true) ->ElementAttribute(AZ::Edit::Attributes::Step, 0.01f) ->ElementAttribute(AZ::Edit::Attributes::Suffix, " m") + ->ElementAttribute(AZ::Edit::Attributes::Min, 0.00f) ->DataElement(0, &SimpleLODComponent::Configuration::m_enableLodSampling, "Enable LOD anim graph sampling", "AnimGraph sample rate will adjust based on LOD level.") ->Attribute(AZ::Edit::Attributes::ChangeNotify, AZ::Edit::PropertyRefreshLevels::EntireTree) @@ -61,7 +62,8 @@ namespace EMotionFX ->Attribute(AZ::Edit::Attributes::Visibility, &SimpleLODComponent::Configuration::GetEnableLodSampling) ->Attribute(AZ::Edit::Attributes::ContainerCanBeModified, false) ->Attribute(AZ::Edit::Attributes::AutoExpand, true) - ->ElementAttribute(AZ::Edit::Attributes::Step, 1.0f); + ->ElementAttribute(AZ::Edit::Attributes::Step, 1.0f) + ->ElementAttribute(AZ::Edit::Attributes::Min, 0.0f); } } } @@ -85,10 +87,13 @@ namespace EMotionFX if (numLODs != m_lodSampleRates.size()) { - // Generate the default LOD Sample Rate to 140, 60, 45, 25, 15, 10 + // Generate the default LOD Sample Rate to 140, 60, 45, 25, 15, 10, 10, 10, ... constexpr AZStd::array defaultSampleRate {140.0f, 60.0f, 45.0f, 25.0f, 15.0f, 10.0f}; - m_lodSampleRates.resize(numLODs); - AZStd::copy(begin(defaultSampleRate), end(defaultSampleRate), begin(m_lodSampleRates)); + m_lodSampleRates.resize(numLODs, 10.0f); + + // Do not copy more than what fits in defaultSampleRates or numLODs. + size_t copyCount = std::min(defaultSampleRate.size(), numLODs); + AZStd::copy(begin(defaultSampleRate), begin(defaultSampleRate) + copyCount, begin(m_lodSampleRates)); } } @@ -229,6 +234,10 @@ namespace EMotionFX const float updateRateInSeconds = animGraphSampleRate > 0.0f ? 1.0f / animGraphSampleRate : 0.0f; actorInstance->SetMotionSamplingRate(updateRateInSeconds); } + else if (actorInstance->GetMotionSamplingRate() != 0) + { + actorInstance->SetMotionSamplingRate(0); + } // Disable the automatic mesh LOD level adjustment based on screen space in case a simple LOD component is present. // The simple LOD component overrides the mesh LOD level and syncs the skeleton with the mesh LOD level. diff --git a/Gems/EMotionFX/Code/Source/Integration/Editor/Components/EditorActorComponent.cpp b/Gems/EMotionFX/Code/Source/Integration/Editor/Components/EditorActorComponent.cpp index 78470a1fa5..4292f04a08 100644 --- a/Gems/EMotionFX/Code/Source/Integration/Editor/Components/EditorActorComponent.cpp +++ b/Gems/EMotionFX/Code/Source/Integration/Editor/Components/EditorActorComponent.cpp @@ -196,6 +196,8 @@ namespace EMotionFX ////////////////////////////////////////////////////////////////////////// void EditorActorComponent::Activate() { + AzToolsFramework::Components::EditorComponentBase::Activate(); + LoadActorAsset(); const AZ::EntityId entityId = GetEntityId(); @@ -226,6 +228,8 @@ namespace EMotionFX DestroyActorInstance(); m_actorAsset.Release(); + + AzToolsFramework::Components::EditorComponentBase::Deactivate(); } ////////////////////////////////////////////////////////////////////////// @@ -588,7 +592,15 @@ namespace EMotionFX if (asset) { m_actorAsset = asset; - OnAssetSelected(); + + // SetPrimaryAsset function can be called while this component is not activated + // due to incompatible services. For example by dragging and dropping a FBX to an + // entity that already has an actor or mesh component in it. Only proceed to load actor + // asset if the component is activated (by checking if it's connected to EditorActorComponentRequestBus). + if (EditorActorComponentRequestBus::Handler::BusIsConnected()) + { + OnAssetSelected(); + } } } diff --git a/Gems/EMotionFX/Code/Source/Integration/Rendering/RenderActorSettings.h b/Gems/EMotionFX/Code/Source/Integration/Rendering/RenderActorSettings.h new file mode 100644 index 0000000000..8663b768c8 --- /dev/null +++ b/Gems/EMotionFX/Code/Source/Integration/Rendering/RenderActorSettings.h @@ -0,0 +1,59 @@ +/* + * Copyright (c) Contributors to the Open 3D Engine Project. + * For complete copyright and license terms please see the LICENSE at the root of this distribution. + * + * SPDX-License-Identifier: Apache-2.0 OR MIT + * + */ +#pragma once + +#include +#include + +namespace AZ::Render +{ + // RenderActorSettings is a subset of RenderOptions. The goal is eventually move those actor render related settings out of render options since + // it will be shared between main editor and animation editor. + class RenderActorSettings + { + public: + AZ_RTTI(RenderActorSettings, "{240BDFE2-D7F5-4927-A8CA-D2945E41AFFD}"); + AZ_CLASS_ALLOCATOR(RenderActorSettings, AZ::SystemAllocator, 0) + + virtual ~RenderActorSettings() = default; + + float m_vertexNormalsScale = 1.0f; + float m_faceNormalsScale = 1.0f; + float m_tangentsScale = 1.0f; + float m_wireframeScale = 1.0f; + float m_nodeOrientationScale = 1.0f; + + bool m_enabledNodeBasedAabb = true; + bool m_enabledMeshBasedAabb = true; + bool m_enabledStaticBasedAabb = true; + + AZ::Color m_hitDetectionColliderColor{0.44f, 0.44f, 0.44f, 1.0f}; + AZ::Color m_selectedHitDetectionColliderColor{ 0.3f, 0.56f, 0.88f, 1.0f }; + AZ::Color m_ragdollColliderColor{ 0.44f, 0.44f, 0.44f, 1.0f }; + AZ::Color m_selectedRagdollColliderColor{ 0.96f, 0.65f, 0.14f, 1.0f }; + AZ::Color m_violatedJointLimitColor{ 1.0f, 0.0f, 0.0f, 1.0f }; + AZ::Color m_clothColliderColor{ 0.44f, 0.44f, 0.44f, 1.0f }; + AZ::Color m_selectedClothColliderColor{ 0.6f, 0.46f, 1.0f, 1.0f }; + AZ::Color m_simulatedObjectColliderColor{ 0.44f, 0.44f, 0.44f, 1.0f }; + AZ::Color m_selectedSimulatedObjectColliderColor{ 1.0, 0.34f, 0.87f, 1.0f }; + + AZ::Color m_vertexNormalsColor{ 0.0f, 1.0f, 0.0f, 1.0f }; + AZ::Color m_faceNormalsColor{ 0.5f, 0.5f, 1.0f, 1.0f }; + AZ::Color m_tangentsColor{ 1.0f, 0.0f, 0.0f, 1.0f }; + AZ::Color m_mirroredBitangentsColor{ 1.0f, 1.0f, 0.0f, 1.0f }; + AZ::Color m_bitangentsColor{ 1.0f, 1.0f, 1.0f, 1.0f }; + AZ::Color m_wireframeColor{ 0.0f, 0.0f, 0.0f, 1.0f }; + AZ::Color m_lineSkeletonColor{ 0.33333f, 1.0f, 0.0f, 1.0f }; + AZ::Color m_skeletonColor{ 0.19f, 0.58f, 0.19f, 1.0f }; + AZ::Color m_jointNameColor{ 1.0f, 1.0f, 1.0f, 1.0f }; + + AZ::Color m_nodeAABBColor{ 1.0f, 0.0f, 0.0f, 1.0f }; + AZ::Color m_meshAABBColor{ 0.0f, 0.0f, 0.7f, 1.0f }; + AZ::Color m_staticAABBColor{ 0.0f, 0.7f, 0.7f, 1.0f }; + }; +} // namespace AZ::Render diff --git a/Gems/EMotionFX/Code/Source/Integration/System/SystemComponent.cpp b/Gems/EMotionFX/Code/Source/Integration/System/SystemComponent.cpp index 38af4232ba..15037793f1 100644 --- a/Gems/EMotionFX/Code/Source/Integration/System/SystemComponent.cpp +++ b/Gems/EMotionFX/Code/Source/Integration/System/SystemComponent.cpp @@ -65,36 +65,38 @@ #if defined(EMOTIONFXANIMATION_EDITOR) // EMFX tools / editor includes // Qt -# include +#include // EMStudio tools and main window registration -# include -# include -# include -# include -# include -# include +#include +#include +#include +#include +#include +#include // EMStudio plugins -# include -# include -# include -# include -# include -# include -# include -# include -# include -# include -# include -# include -# include -# include -# include -# include -# include -# include -# include -# include -# include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#include #endif // EMOTIONFXANIMATION_EDITOR #include @@ -512,7 +514,6 @@ namespace EMotionFX AzToolsFramework::EditorEvents::Bus::Handler::BusConnect(); AzToolsFramework::EditorAnimationSystemRequestsBus::Handler::BusConnect(); AzToolsFramework::AssetBrowser::AssetBrowserInteractionNotificationBus::Handler::BusConnect(); - m_updateTimer.Stamp(); // Register custom property handlers for the reflected property editor. m_propertyHandlers = RegisterPropertyTypes(); @@ -589,14 +590,12 @@ namespace EMotionFX #endif REGISTER_CVAR2("emfx_updateEnabled", &CVars::emfx_updateEnabled, 1, VF_DEV_ONLY, "Enable main EMFX update"); - REGISTER_CVAR2("emfx_actorRenderEnabled", &CVars::emfx_actorRenderEnabled, 1, VF_DEV_ONLY, "Enable ActorRenderNode rendering"); } ////////////////////////////////////////////////////////////////////////// void SystemComponent::OnCrySystemShutdown(ISystem&) { gEnv->pConsole->UnregisterVariable("emfx_updateEnabled"); - gEnv->pConsole->UnregisterVariable("emfx_actorRenderEnabled"); #if !defined(AZ_MONOLITHIC_BUILD) gEnv = nullptr; @@ -604,15 +603,8 @@ namespace EMotionFX } ////////////////////////////////////////////////////////////////////////// - void SystemComponent::OnTick(float delta, AZ::ScriptTimePoint timePoint) + void SystemComponent::OnTick(float delta, [[maybe_unused]]AZ::ScriptTimePoint timePoint) { - AZ_UNUSED(timePoint); - -#if defined (EMOTIONFXANIMATION_EDITOR) - AZ_UNUSED(delta); - delta = m_updateTimer.StampAndGetDeltaTimeInSeconds(); -#endif - // Flush events prior to updating EMotion FX. ActorNotificationBus::ExecuteQueuedEvents(); @@ -620,75 +612,102 @@ namespace EMotionFX { // Main EMotionFX runtime update. GetEMotionFX().Update(delta); - } - const ActorManager* actorManager = GetEMotionFX().GetActorManager(); - const size_t numActorInstances = actorManager->GetNumActorInstances(); - for (size_t i = 0; i < numActorInstances; ++i) - { - const ActorInstance* actorInstance = actorManager->GetActorInstance(i); + bool inGameMode = true; +#if defined (EMOTIONFXANIMATION_EDITOR) + // Check if we are in game mode. + IEditor* editor = nullptr; + AzToolsFramework::EditorRequestBus::BroadcastResult(editor, &AzToolsFramework::EditorRequests::GetEditor); + inGameMode = !editor || editor->IsInGameMode(); +#endif - if (actorInstance && actorInstance->GetIsEnabled() && actorInstance->GetIsOwnedByRuntime()) + // Apply the motion extraction deltas to the character controller / entity transform for all entities. + const ActorManager* actorManager = GetEMotionFX().GetActorManager(); + const size_t numActorInstances = actorManager->GetNumActorInstances(); + for (size_t i = 0; i < numActorInstances; ++i) { - AZ::Entity* entity = actorInstance->GetEntity(); - const Actor* actor = actorInstance->GetActor(); + ActorInstance* actorInstance = actorManager->GetActorInstance(i); - if (entity && actor && actor->GetMotionExtractionNode()) + // Apply motion extraction only in game mode or in case the actor instance belongs to the Animation Editor. + const bool applyMotionExtraction = inGameMode || !actorInstance->GetIsOwnedByRuntime(); + if (applyMotionExtraction) { - const AZ::EntityId entityId = entity->GetId(); - - // Check if we have any physics character controllers. - bool hasCustomMotionExtractionController = false; - bool hasPhysicsController = false; - - Physics::CharacterRequestBus::EventResult(hasPhysicsController, entityId, &Physics::CharacterRequests::IsPresent); - if (!hasPhysicsController) - { - hasCustomMotionExtractionController = MotionExtractionRequestBus::FindFirstHandler(entityId) != nullptr; - } - - // If we have a physics controller. - if (hasCustomMotionExtractionController || hasPhysicsController) - { - const float deltaTimeInv = (delta > 0.0f) ? (1.0f / delta) : 0.0f; - - AZ::Transform currentTransform = AZ::Transform::CreateIdentity(); - AZ::TransformBus::EventResult(currentTransform, entityId, &AZ::TransformBus::Events::GetWorldTM); - - const AZ::Vector3 actorInstancePosition = actorInstance->GetWorldSpaceTransform().m_position; - const AZ::Vector3 positionDelta = actorInstancePosition - currentTransform.GetTranslation(); - - if (hasPhysicsController) - { - Physics::CharacterRequestBus::Event( - entityId, &Physics::CharacterRequests::AddVelocity, positionDelta * deltaTimeInv); - } - else if (hasCustomMotionExtractionController) - { - MotionExtractionRequestBus::Event(entityId, &MotionExtractionRequestBus::Events::ExtractMotion, positionDelta, delta); - AZ::TransformBus::EventResult(currentTransform, entityId, &AZ::TransformBus::Events::GetWorldTM); - } - - // Update the entity rotation. - const AZ::Quaternion actorInstanceRotation = actorInstance->GetWorldSpaceTransform().m_rotation; - const AZ::Quaternion currentRotation = currentTransform.GetRotation(); - if (!currentRotation.IsClose(actorInstanceRotation, AZ::Constants::FloatEpsilon)) - { - AZ::Transform newTransform = currentTransform; - newTransform.SetRotation(actorInstanceRotation); - AZ::TransformBus::Event(entityId, &AZ::TransformBus::Events::SetWorldTM, newTransform); - } - } - else // There is no physics controller, just use EMotion FX's actor instance transform directly. - { - const AZ::Transform newTransform = actorInstance->GetWorldSpaceTransform().ToAZTransform(); - AZ::TransformBus::Event(entityId, &AZ::TransformBus::Events::SetWorldTM, newTransform); - } + actorInstance->SetMotionExtractionEnabled(true); + ApplyMotionExtraction(actorInstance, delta); + } + else + { + actorInstance->SetMotionExtractionEnabled(false); } } } } + void SystemComponent::ApplyMotionExtraction(const ActorInstance* actorInstance, float timeDelta) + { + AZ_Assert(actorInstance, "Cannot apply motion extraction. Actor instance is not valid."); + AZ_Assert(actorInstance->GetActor(), "Cannot apply motion extraction. Actor instance is not linked to a valid actor."); + + AZ::Entity* entity = actorInstance->GetEntity(); + const Actor* actor = actorInstance->GetActor(); + if (!actorInstance->GetIsEnabled() || + !entity || + !actor->GetMotionExtractionNode()) + { + return; + } + + const AZ::EntityId entityId = entity->GetId(); + + // Check if we have any physics character controllers. + bool hasCustomMotionExtractionController = false; + bool hasPhysicsController = false; + + Physics::CharacterRequestBus::EventResult(hasPhysicsController, entityId, &Physics::CharacterRequests::IsPresent); + if (!hasPhysicsController) + { + hasCustomMotionExtractionController = MotionExtractionRequestBus::FindFirstHandler(entityId) != nullptr; + } + + // If we have a physics controller. + if (hasCustomMotionExtractionController || hasPhysicsController) + { + const float deltaTimeInv = (timeDelta > 0.0f) ? (1.0f / timeDelta) : 0.0f; + + AZ::Transform currentTransform = AZ::Transform::CreateIdentity(); + AZ::TransformBus::EventResult(currentTransform, entityId, &AZ::TransformBus::Events::GetWorldTM); + + const AZ::Vector3 actorInstancePosition = actorInstance->GetWorldSpaceTransform().m_position; + const AZ::Vector3 positionDelta = actorInstancePosition - currentTransform.GetTranslation(); + + if (hasPhysicsController) + { + Physics::CharacterRequestBus::Event( + entityId, &Physics::CharacterRequests::AddVelocity, positionDelta * deltaTimeInv); + } + else if (hasCustomMotionExtractionController) + { + MotionExtractionRequestBus::Event(entityId, &MotionExtractionRequestBus::Events::ExtractMotion, positionDelta, timeDelta); + AZ::TransformBus::EventResult(currentTransform, entityId, &AZ::TransformBus::Events::GetWorldTM); + } + + // Update the entity rotation. + const AZ::Quaternion actorInstanceRotation = actorInstance->GetWorldSpaceTransform().m_rotation; + const AZ::Quaternion currentRotation = currentTransform.GetRotation(); + if (!currentRotation.IsClose(actorInstanceRotation, AZ::Constants::FloatEpsilon)) + { + AZ::Transform newTransform = currentTransform; + newTransform.SetRotation(actorInstanceRotation); + AZ::TransformBus::Event(entityId, &AZ::TransformBus::Events::SetWorldTM, newTransform); + } + } + else // There is no physics controller, just use EMotion FX's actor instance transform directly. + { + const AZ::Transform newTransform = actorInstance->GetWorldSpaceTransform().ToAZTransform(); + AZ::TransformBus::Event(entityId, &AZ::TransformBus::Events::SetWorldTM, newTransform); + } + } + int SystemComponent::GetTickOrder() { return AZ::TICK_ANIMATION; diff --git a/Gems/EMotionFX/Code/Source/Integration/System/SystemComponent.h b/Gems/EMotionFX/Code/Source/Integration/System/SystemComponent.h index 3ef626c947..b5b990957c 100644 --- a/Gems/EMotionFX/Code/Source/Integration/System/SystemComponent.h +++ b/Gems/EMotionFX/Code/Source/Integration/System/SystemComponent.h @@ -20,7 +20,6 @@ #include #if defined (EMOTIONFXANIMATION_EDITOR) -# include # include # include # include @@ -117,13 +116,19 @@ namespace EMotionFX AzToolsFramework::AssetBrowser::SourceFileDetails GetSourceFileDetails(const char* fullSourceFileName) override; ////////////////////////////////////////////////////////////////////////////////////// - AZ::Debug::Timer m_updateTimer; AZStd::vector m_propertyHandlers; #endif // EMOTIONFXANIMATION_EDITOR AZ::u32 m_numThreads; private: + //! Synchronize the actor instance location with the entity or character controller. + //! In case no character controller component is available, the entity will be moved + //! to the actor instance position. The spatial difference between the entity and the + //! actor instance will be calculated in case a character controller is present, and the + //! velocity will be applied to it to move it towards the actor instance. + void ApplyMotionExtraction(const ActorInstance* actorInstance, float timeDelta); + AZStd::vector > m_assetHandlers; AZStd::unique_ptr m_eventHandler; AZStd::unique_ptr m_renderBackendManager; diff --git a/Gems/EMotionFX/Code/Tests/AnimGraphEventTests.cpp b/Gems/EMotionFX/Code/Tests/AnimGraphEventTests.cpp index bd3fa10b24..11865674c8 100644 --- a/Gems/EMotionFX/Code/Tests/AnimGraphEventTests.cpp +++ b/Gems/EMotionFX/Code/Tests/AnimGraphEventTests.cpp @@ -49,7 +49,7 @@ namespace EMotionFX for (int i = 0; i < params.m_numStates; ++i) { AnimGraphNode* state = aznew AnimGraphMotionNode(); - state->SetName(AZStd::string(1, startChar + i).c_str()); + state->SetName(AZStd::string(1, static_cast(startChar + i)).c_str()); m_rootStateMachine->AddChildNode(state); AddTransitionWithTimeCondition(prevState, state, /*blendTime*/params.m_transitionBlendTime, /*countDownTime*/params.m_conditionCountDownTime); prevState = state; diff --git a/Gems/EMotionFX/Code/Tests/AnimGraphMotionNodeTests.cpp b/Gems/EMotionFX/Code/Tests/AnimGraphMotionNodeTests.cpp index a377495d6c..efff992564 100644 --- a/Gems/EMotionFX/Code/Tests/AnimGraphMotionNodeTests.cpp +++ b/Gems/EMotionFX/Code/Tests/AnimGraphMotionNodeTests.cpp @@ -161,6 +161,8 @@ namespace EMotionFX // Make sure all nodes exist. ASSERT_TRUE(rootNode && pelvisNode && lHandNode && lLoArmNode && lLoLegNode && lAnkleNode && rHandNode && rLoArmNode && rLoLegNode && rAnkleNode) << "All nodes used should exist."; + + m_actor->SetMotionExtractionNodeIndex(m_jackRootIndex); } void SetupMirrorNodes() diff --git a/Gems/EMotionFX/Code/Tests/AnimGraphRefCountTests.cpp b/Gems/EMotionFX/Code/Tests/AnimGraphRefCountTests.cpp index 54f945d95f..c4e6462fff 100644 --- a/Gems/EMotionFX/Code/Tests/AnimGraphRefCountTests.cpp +++ b/Gems/EMotionFX/Code/Tests/AnimGraphRefCountTests.cpp @@ -90,7 +90,7 @@ namespace EMotionFX for (int i = 0; i < param.m_numStates; ++i) { AnimGraphBindPoseNode* state = aznew AnimGraphBindPoseNode(); - state->SetName(AZStd::string(1, startChar + i).c_str()); + state->SetName(AZStd::string(1, static_cast(startChar + i)).c_str()); m_rootStateMachine->AddChildNode(state); AddTransitionWithTimeCondition(prevState, state, /*blendTime*/param.m_blendTime, /*countDownTime*/param.m_countDownTime); prevState = state; diff --git a/Gems/EMotionFX/Code/Tests/SystemComponentFixture.h b/Gems/EMotionFX/Code/Tests/SystemComponentFixture.h index 034fd2045b..62ebffa7e9 100644 --- a/Gems/EMotionFX/Code/Tests/SystemComponentFixture.h +++ b/Gems/EMotionFX/Code/Tests/SystemComponentFixture.h @@ -61,7 +61,9 @@ namespace EMotionFX constexpr auto projectPathKey = FixedValueString(AZ::SettingsRegistryMergeUtils::BootstrapSettingsRootKey) + "/project_path"; if(auto settingsRegistry = AZ::SettingsRegistry::Get(); settingsRegistry != nullptr) { - settingsRegistry->Set(projectPathKey, "AutomatedTesting"); + AZ::IO::FixedMaxPath enginePath; + settingsRegistry->Get(enginePath.Native(), AZ::SettingsRegistryMergeUtils::FilePathKey_EngineRootFolder); + settingsRegistry->Set(projectPathKey, (enginePath / "AutomatedTesting").Native()); AZ::SettingsRegistryMergeUtils::MergeSettingsToRegistry_AddRuntimeFilePaths(*settingsRegistry); } } diff --git a/Gems/EMotionFX/Code/Tests/UI/CanUseFileMenu.cpp b/Gems/EMotionFX/Code/Tests/UI/CanUseFileMenu.cpp index 2af3329203..f61c4992a6 100644 --- a/Gems/EMotionFX/Code/Tests/UI/CanUseFileMenu.cpp +++ b/Gems/EMotionFX/Code/Tests/UI/CanUseFileMenu.cpp @@ -330,6 +330,10 @@ namespace EMotionFX const QString animGraphFilename = GenerateTempAnimGraphFilename(); SaveCurrentAnimGraph(animGraphFilename); + // Pretend editing the anim graph + EMotionFX::AnimGraph* animGraph = m_animGraphPlugin->GetActiveAnimGraph(); + animGraph->SetDirtyFlag(true); + // Prepare a watcher to press the ok button when the SaveDirtySettingsWindow appears. ModalPopupHandler saveDirtyPopupHandler; diff --git a/Gems/EMotionFX/Code/Tests/run_EMotionFX_tests.py b/Gems/EMotionFX/Code/Tests/run_EMotionFX_tests.py deleted file mode 100755 index e3b930e43b..0000000000 --- a/Gems/EMotionFX/Code/Tests/run_EMotionFX_tests.py +++ /dev/null @@ -1,94 +0,0 @@ -""" -Copyright (c) Contributors to the Open 3D Engine Project. -For complete copyright and license terms please see the LICENSE at the root of this distribution. - -SPDX-License-Identifier: Apache-2.0 OR MIT - -python run_EMotionFX_tests.py --config --vsVersion - -Example: -python run_EMotionFX_tests.py --config profile --vsVersion vs2017 -python run_EMotionFX_tests.py --config debug --vsVersion vs2019 - - -Requirements: - -- Provide a single script that executes all your team's automated BAT/Regression tests - -- The script should run the tests successfully if killed in the middle and restarted - -- Provide any documentation needed along with the script so that other feature teams wanting to execute your tests can execute them locally - -- The documentation should also cover where the test results are reported and how to find failing tests and their logs - - -""" - -import argparse -import os -import subprocess - - -#Setup Parser -def parser_setup(): - parser = argparse.ArgumentParser(description='Sets up for and runs the specified EMotionFX tests') - - # Configuration - parser.add_argument('--config', choices=['profile','debug'] , help='The Conrfiguration you have pre-build and want to run the tests on. Options[profile,debug]') - - #Visual Studio Version - parser.add_argument('--vsVersion', choices=['vs2017','vs2019'], help='The version of Visual Studio you used to build your branch. Options[vs2017, vs2019]') - - - - return parser - - - -#Main Program -def main(): - # Set up CLI arguments for CLI argument parser - parser = parser_setup() - - # Capture arguments and their values - args = parser.parse_args() - - - # Change directory to branch root - dev_path = os.path.join(os.path.dirname(__file__), '..', '..','..','..') - os.chdir(dev_path) - dirpath = os.getcwd() - - - vsVersion = args.vsVersion - config = args.config - - if vsVersion == 'vs2017': - if config == 'profile': - #lmbr_test.cmd scan --dir Bin64vc141.Test --only Gem\.EMotionFX\..*\.dll - subprocess.run('lmbr_test.cmd scan --dir Bin64vc141.Test --only Gem\.EMotionFX\..*\.dll', check=True) - - elif config == 'debug': - #lmbr_test.cmd scan --dir Bin64vc141.Debug.Test --only Gem\.EMotionFX\..*\.dll - subprocess.run('lmbr_test.cmd scan --dir Bin64vc141.Debug.Test --only Gem\.EMotionFX\..*\.dll', check=True) - - else: - print('INVALID ARGUMENT(s)... Ending') - elif vsVersion == 'vs2019': - if config == 'profile': - #lmbr_test.cmd scan --dir Bin64vc142.Test --only Gem\.EMotionFX\..*\.dll - subprocess.run('lmbr_test.cmd scan --dir Bin64vc142.Test --only Gem\.EMotionFX\..*\.dll', check=True) - - elif config == 'debug': - #lmbr_test.cmd scan --dir Bin64vc142.Debug.Test --only Gem\.EMotionFX\..*\.dll - subprocess.run('lmbr_test.cmd scan --dir Bin64vc141.Debug.Test --only Gem\.EMotionFX\..*\.dll', check=True) - - else: - print('INVALID ARGUMENT(s)... Ending') - else: - print('INVALID ARGUMENT(s)... Ending') - - - -if __name__ == '__main__': - main() diff --git a/Gems/EMotionFX/Code/emotionfx_shared_files.cmake b/Gems/EMotionFX/Code/emotionfx_shared_files.cmake index b45f15a5be..26b51f280b 100644 --- a/Gems/EMotionFX/Code/emotionfx_shared_files.cmake +++ b/Gems/EMotionFX/Code/emotionfx_shared_files.cmake @@ -42,4 +42,5 @@ set(FILES Source/Integration/Rendering/RenderActorInstance.cpp Source/Integration/Rendering/RenderBackendManager.h Source/Integration/Rendering/RenderBackendManager.cpp + Source/Integration/Rendering/RenderActorSettings.h ) diff --git a/Gems/EMotionFX/gem.json b/Gems/EMotionFX/gem.json index f1734d854d..ed80517af1 100644 --- a/Gems/EMotionFX/gem.json +++ b/Gems/EMotionFX/gem.json @@ -2,6 +2,7 @@ "gem_name": "EMotionFX", "display_name": "EMotion FX Animation", "license": "Apache-2.0 Or MIT", + "license_url": "https://github.com/o3de/o3de/blob/development/LICENSE.txt", "origin": "Open 3D Engine - o3de.org", "type": "Code", "summary": "The EMotion FX Animation Gem provides Open 3D Engine's animation system for rigged actors and includes Animation Editor, a tool for creating animated behaviors, simulated objects, and colliders for rigged actors.", diff --git a/Gems/EditorPythonBindings/Code/Source/EditorPythonBindingsModule.cpp b/Gems/EditorPythonBindings/Code/Source/EditorPythonBindingsModule.cpp index cef8931722..f168cc5ab2 100644 --- a/Gems/EditorPythonBindings/Code/Source/EditorPythonBindingsModule.cpp +++ b/Gems/EditorPythonBindings/Code/Source/EditorPythonBindingsModule.cpp @@ -9,6 +9,8 @@ #include #include +#include + #include #include #include @@ -18,6 +20,7 @@ namespace EditorPythonBindings { class EditorPythonBindingsModule : public AZ::Module + , public AzToolsFramework::EmbeddedPython::PythonLoader { public: AZ_RTTI(EditorPythonBindingsModule, "{851B9E35-4FD5-49B1-8207-E40D4BBA36CC}", AZ::Module); diff --git a/Gems/EditorPythonBindings/Code/Source/PythonLogSymbolsComponent.cpp b/Gems/EditorPythonBindings/Code/Source/PythonLogSymbolsComponent.cpp index d39ca83000..0be51909f4 100644 --- a/Gems/EditorPythonBindings/Code/Source/PythonLogSymbolsComponent.cpp +++ b/Gems/EditorPythonBindings/Code/Source/PythonLogSymbolsComponent.cpp @@ -739,6 +739,11 @@ namespace EditorPythonBindings moduleParts.pop_back(); AzFramework::StringFunc::Append(targetModule, ".pyi"); + // create an __init__.py file as the base module path + AZStd::string initModule; + AzFramework::StringFunc::Join(initModule, moduleParts.begin(), moduleParts.end(), '.'); + OpenInitFileAt(initModule); + AZStd::string modulePath; AzFramework::StringFunc::Append(modulePath, m_basePath.c_str()); AzFramework::StringFunc::Append(modulePath, AZ_CORRECT_FILESYSTEM_SEPARATOR_STRING); diff --git a/Gems/EditorPythonBindings/Code/Source/PythonProxyObject.cpp b/Gems/EditorPythonBindings/Code/Source/PythonProxyObject.cpp index df246d230d..120e0de220 100644 --- a/Gems/EditorPythonBindings/Code/Source/PythonProxyObject.cpp +++ b/Gems/EditorPythonBindings/Code/Source/PythonProxyObject.cpp @@ -846,7 +846,7 @@ namespace EditorPythonBindings { return ConstructPythonProxyObjectByTypename(behaviorClassName, pythonArgs); }); - PythonSymbolEventBus::QueueBroadcast(&PythonSymbolEventBus::Events::LogClassWithName, subModuleName, behaviorClass, properSyntax); + PythonSymbolEventBus::QueueBroadcast(&PythonSymbolEventBus::Events::LogClassWithName, subModuleName, behaviorClass, syntaxName.value()); } else { diff --git a/Gems/EditorPythonBindings/Code/Source/PythonSystemComponent.cpp b/Gems/EditorPythonBindings/Code/Source/PythonSystemComponent.cpp index 876ef19803..fe9156013f 100644 --- a/Gems/EditorPythonBindings/Code/Source/PythonSystemComponent.cpp +++ b/Gems/EditorPythonBindings/Code/Source/PythonSystemComponent.cpp @@ -597,11 +597,10 @@ namespace EditorPythonBindings { AZStd::unordered_set pyPackageSites(pythonPathStack.begin(), pythonPathStack.end()); - const char* engineRoot = nullptr; - AzFramework::ApplicationRequests::Bus::BroadcastResult(engineRoot, &AzFramework::ApplicationRequests::GetEngineRoot); + AZ::IO::FixedMaxPath engineRoot = AZ::Utils::GetEnginePath(); // set PYTHON_HOME - AZStd::string pyBasePath = Platform::GetPythonHomePath(PY_PACKAGE, engineRoot); + AZStd::string pyBasePath = Platform::GetPythonHomePath(PY_PACKAGE, engineRoot.c_str()); if (!AZ::IO::SystemFile::Exists(pyBasePath.c_str())) { AZ_Warning("python", false, "Python home path must exist! path:%s", pyBasePath.c_str()); diff --git a/Gems/EditorPythonBindings/Code/Tests/EditorPythonBindingsTest.cpp b/Gems/EditorPythonBindings/Code/Tests/EditorPythonBindingsTest.cpp index d630605cbc..9dbbb34e6c 100644 --- a/Gems/EditorPythonBindings/Code/Tests/EditorPythonBindingsTest.cpp +++ b/Gems/EditorPythonBindings/Code/Tests/EditorPythonBindingsTest.cpp @@ -323,7 +323,9 @@ sys.version auto registry = AZ::SettingsRegistry::Get(); auto projectPathKey = AZ::SettingsRegistryInterface::FixedValueString(AZ::SettingsRegistryMergeUtils::BootstrapSettingsRootKey) + "/project_path"; - registry->Set(projectPathKey, "AutomatedTesting"); + AZ::IO::FixedMaxPath enginePath; + registry->Get(enginePath.Native(), AZ::SettingsRegistryMergeUtils::FilePathKey_EngineRootFolder); + registry->Set(projectPathKey, (enginePath / "AutomatedTesting").Native()); AZ::SettingsRegistryMergeUtils::MergeSettingsToRegistry_AddRuntimeFilePaths(*registry); m_app.RegisterComponentDescriptor(EditorPythonBindings::PythonSystemComponent::CreateDescriptor()); diff --git a/Gems/EditorPythonBindings/Code/Tests/PythonTestingUtility.h b/Gems/EditorPythonBindings/Code/Tests/PythonTestingUtility.h index 143863b4c8..3ec1050b0b 100644 --- a/Gems/EditorPythonBindings/Code/Tests/PythonTestingUtility.h +++ b/Gems/EditorPythonBindings/Code/Tests/PythonTestingUtility.h @@ -84,7 +84,6 @@ namespace UnitTest m_fileIOHelper->m_fileIO.SetAlias("@engroot@", m_engineRoot.c_str()); AzFramework::Application::Descriptor appDesc; - appDesc.m_enableDrilling = false; m_app.Create(appDesc); AzFramework::ApplicationRequests::Bus::Handler::BusConnect(); @@ -135,10 +134,6 @@ namespace UnitTest void NormalizePath(AZStd::string& ) override {} void NormalizePathKeepCase(AZStd::string& ) override {} void CalculateBranchTokenForEngineRoot(AZStd::string& ) const override {} - // Gets the engine root path for testing - const char* GetEngineRoot() const override { return m_engineRoot.c_str(); } - // Retrieves the app root path for testing - const char* GetAppRoot() const override { return m_engineRoot.c_str(); } AZ::ComponentApplication m_app; AZStd::unique_ptr m_fileIOHelper; diff --git a/Gems/EditorPythonBindings/Code/Tests/PythonTraceMessageSink.h b/Gems/EditorPythonBindings/Code/Tests/PythonTraceMessageSink.h index 28971aec9e..63616ce8ea 100644 --- a/Gems/EditorPythonBindings/Code/Tests/PythonTraceMessageSink.h +++ b/Gems/EditorPythonBindings/Code/Tests/PythonTraceMessageSink.h @@ -7,7 +7,7 @@ */ #pragma once -#include +#include #include namespace UnitTest @@ -15,18 +15,18 @@ namespace UnitTest /** Trace message handler to track messages during tests */ struct PythonTraceMessageSink final - : public AZ::Debug::TraceMessageDrillerBus::Handler + : public AZ::Debug::TraceMessageBus::Handler , public AzToolsFramework::EditorPythonConsoleNotificationBus::Handler { PythonTraceMessageSink() { - AZ::Debug::TraceMessageDrillerBus::Handler::BusConnect(); + AZ::Debug::TraceMessageBus::Handler::BusConnect(); AzToolsFramework::EditorPythonConsoleNotificationBus::Handler::BusConnect(); } ~PythonTraceMessageSink() { - AZ::Debug::TraceMessageDrillerBus::Handler::BusDisconnect(); + AZ::Debug::TraceMessageBus::Handler::BusDisconnect(); AzToolsFramework::EditorPythonConsoleNotificationBus::Handler::BusDisconnect(); } @@ -47,13 +47,13 @@ namespace UnitTest } ////////////////////////////////////////////////////////////////////////// - // TraceMessageDrillerBus - void OnPrintf(const char* window, const char* message) override + // TraceMessageBus + bool OnPrintf(const char* window, const char* message) override { - OnOutput(window, message); + return OnOutput(window, message); } - void OnOutput(const char* window, const char* message) override + bool OnOutput(const char* window, const char* message) override { AZStd::lock_guard lock(m_lock); @@ -73,6 +73,7 @@ namespace UnitTest } } } + return false; } ////////////////////////////////////////////////////////////////////////// diff --git a/Gems/EditorPythonBindings/gem.json b/Gems/EditorPythonBindings/gem.json index 13c5800dd7..475483f13b 100644 --- a/Gems/EditorPythonBindings/gem.json +++ b/Gems/EditorPythonBindings/gem.json @@ -2,6 +2,7 @@ "gem_name": "EditorPythonBindings", "display_name": "Editor Python Bindings", "license": "Apache-2.0 Or MIT", + "license_url": "https://github.com/o3de/o3de/blob/development/LICENSE.txt", "origin": "Open 3D Engine - o3de.org", "type": "Tool", "summary": "The Editor Python Bindings Gem provides Python commands for Open 3D Engine Editor functions.", diff --git a/Gems/ExpressionEvaluation/gem.json b/Gems/ExpressionEvaluation/gem.json index 6bcc666a4d..cd712f4da9 100644 --- a/Gems/ExpressionEvaluation/gem.json +++ b/Gems/ExpressionEvaluation/gem.json @@ -2,6 +2,7 @@ "gem_name": "ExpressionEvaluation", "display_name": "Expression Evaluation", "license": "Apache-2.0 Or MIT", + "license_url": "https://github.com/o3de/o3de/blob/development/LICENSE.txt", "origin": "Open 3D Engine - o3de.org", "type": "Code", "summary": "The Expression Evaluation Gem provides a method for parsing and executing string expressions in Open 3D Engine.", diff --git a/Gems/FastNoise/Code/CMakeLists.txt b/Gems/FastNoise/Code/CMakeLists.txt index 76b2cb4bd1..819592e018 100644 --- a/Gems/FastNoise/Code/CMakeLists.txt +++ b/Gems/FastNoise/Code/CMakeLists.txt @@ -18,9 +18,11 @@ ly_add_target( Include BUILD_DEPENDENCIES PUBLIC - Legacy::CryCommon Gem::GradientSignal + PUBLIC + AZ::AzCore PRIVATE + AZ::AzFramework Gem::LmbrCentral ) diff --git a/Gems/FastNoise/Code/Source/FastNoiseGradientComponent.cpp b/Gems/FastNoise/Code/Source/FastNoiseGradientComponent.cpp index 0f8ce4c5da..4cea2efcc8 100644 --- a/Gems/FastNoise/Code/Source/FastNoiseGradientComponent.cpp +++ b/Gems/FastNoise/Code/Source/FastNoiseGradientComponent.cpp @@ -249,6 +249,9 @@ namespace FastNoiseGem void FastNoiseGradientComponent::Activate() { + // This will immediately call OnGradientTransformChanged and initialize m_gradientTransform. + GradientSignal::GradientTransformNotificationBus::Handler::BusConnect(GetEntityId()); + // Some platforms require random seeds to be > 0. Clamp to a positive range to ensure we're always safe. m_generator.SetSeed(AZ::GetMax(m_configuration.m_seed, 1)); m_generator.SetFrequency(m_configuration.m_frequency); @@ -272,6 +275,7 @@ namespace FastNoiseGem { GradientSignal::GradientRequestBus::Handler::BusDisconnect(); FastNoiseGradientRequestBus::Handler::BusDisconnect(); + GradientSignal::GradientTransformNotificationBus::Handler::BusDisconnect(); } bool FastNoiseGradientComponent::ReadInConfig(const AZ::ComponentConfig* baseConfig) @@ -294,14 +298,21 @@ namespace FastNoiseGem return false; } + void FastNoiseGradientComponent::OnGradientTransformChanged(const GradientSignal::GradientTransform& newTransform) + { + AZStd::unique_lock lock(m_transformMutex); + m_gradientTransform = newTransform; + } + float FastNoiseGradientComponent::GetValue(const GradientSignal::GradientSampleParams& sampleParams) const { AZ::Vector3 uvw = sampleParams.m_position; - bool wasPointRejected = false; - const bool shouldNormalizeOutput = false; - GradientSignal::GradientTransformRequestBus::Event( - GetEntityId(), &GradientSignal::GradientTransformRequestBus::Events::TransformPositionToUVW, sampleParams.m_position, uvw, shouldNormalizeOutput, wasPointRejected); + + { + AZStd::shared_lock lock(m_transformMutex); + m_gradientTransform.TransformPositionToUVW(sampleParams.m_position, uvw, wasPointRejected); + } if (!wasPointRejected) { diff --git a/Gems/FastNoise/Code/Source/FastNoiseGradientComponent.h b/Gems/FastNoise/Code/Source/FastNoiseGradientComponent.h index da972743ec..dd19049ee6 100644 --- a/Gems/FastNoise/Code/Source/FastNoiseGradientComponent.h +++ b/Gems/FastNoise/Code/Source/FastNoiseGradientComponent.h @@ -12,6 +12,7 @@ #include #include #include +#include #include #include @@ -67,6 +68,7 @@ namespace FastNoiseGem : public AZ::Component , private GradientSignal::GradientRequestBus::Handler , private FastNoiseGradientRequestBus::Handler + , private GradientSignal::GradientTransformNotificationBus::Handler { public: friend class EditorFastNoiseGradientComponent; @@ -80,23 +82,25 @@ namespace FastNoiseGem FastNoiseGradientComponent(const FastNoiseGradientConfig& configuration); FastNoiseGradientComponent() = default; - ////////////////////////////////////////////////////////////////////////// - // AZ::Component interface implementation + // AZ::Component overrides... void Activate() override; void Deactivate() override; bool ReadInConfig(const AZ::ComponentConfig* baseConfig) override; bool WriteOutConfig(AZ::ComponentConfig* outBaseConfig) const override; - ////////////////////////////////////////////////////////////////////////// - // GradientRequestBus + // GradientRequestBus overrides... float GetValue(const GradientSignal::GradientSampleParams& sampleParams) const override; protected: FastNoiseGradientConfig m_configuration; FastNoise m_generator; + GradientSignal::GradientTransform m_gradientTransform; + mutable AZStd::shared_mutex m_transformMutex; - ///////////////////////////////////////////////////////////////////////// - // FastNoiseGradientRequest overrides + // GradientTransformNotificationBus overrides... + void OnGradientTransformChanged(const GradientSignal::GradientTransform& newTransform) override; + + // FastNoiseGradientRequest overrides... int GetRandomSeed() const override; void SetRandomSeed(int seed) override; diff --git a/Gems/FastNoise/Code/Tests/FastNoiseTest.cpp b/Gems/FastNoise/Code/Tests/FastNoiseTest.cpp index 4e06b832e1..f0d5a9d1bd 100644 --- a/Gems/FastNoise/Code/Tests/FastNoiseTest.cpp +++ b/Gems/FastNoise/Code/Tests/FastNoiseTest.cpp @@ -7,10 +7,6 @@ */ #include -#include -#include -#include -#include #include #include @@ -50,9 +46,10 @@ public: //////////////////////////////////////////////////////////////////////////// //// GradientTransformRequestBus - void TransformPositionToUVW([[maybe_unused]] const AZ::Vector3& inPosition, [[maybe_unused]] AZ::Vector3& outUVW, [[maybe_unused]] const bool shouldNormalizeOutput, [[maybe_unused]] bool& wasPointRejected) const override {} - void GetGradientLocalBounds([[maybe_unused]] AZ::Aabb& bounds) const override {} - void GetGradientEncompassingBounds([[maybe_unused]] AZ::Aabb& bounds) const override {} + const GradientSignal::GradientTransform& GetGradientTransform() const override + { + return m_gradientTransform; + } ////////////////////////////////////////////////////////////////////////// // GradientTransformModifierRequestBus @@ -100,30 +97,8 @@ public: bool GetAdvancedMode() const override { return false; } void SetAdvancedMode([[maybe_unused]] bool value) override {} -}; -struct MockGlobalEnvironment -{ - MockGlobalEnvironment() - { - m_stubEnv.pTimer = &m_stubTimer; - m_stubEnv.pCryPak = &m_stubPak; - m_stubEnv.pConsole = &m_stubConsole; - m_stubEnv.pSystem = &m_stubSystem; - gEnv = &m_stubEnv; - } - - ~MockGlobalEnvironment() - { - gEnv = nullptr; - } - -private: - SSystemGlobalEnvironment m_stubEnv; - testing::NiceMock m_stubTimer; - testing::NiceMock m_stubPak; - testing::NiceMock m_stubConsole; - testing::NiceMock m_stubSystem; + GradientSignal::GradientTransform m_gradientTransform; }; TEST(FastNoiseTest, ComponentsWithComponentApplication) @@ -133,8 +108,6 @@ TEST(FastNoiseTest, ComponentsWithComponentApplication) appDesc.m_recordingMode = AZ::Debug::AllocationRecords::RECORD_FULL; appDesc.m_stackRecordLevels = 20; - MockGlobalEnvironment mocks; - AZ::ComponentApplication app; AZ::Entity* systemEntity = app.Create(appDesc); ASSERT_TRUE(systemEntity != nullptr); @@ -189,7 +162,6 @@ public: AZ::ComponentApplication m_application; AZ::Entity* m_systemEntity; - MockGlobalEnvironment m_mocks; }; ////////////////////////////////////////////////////////////////////////// diff --git a/Gems/FastNoise/gem.json b/Gems/FastNoise/gem.json index ac59fe804e..d8dfb878b4 100644 --- a/Gems/FastNoise/gem.json +++ b/Gems/FastNoise/gem.json @@ -2,6 +2,7 @@ "gem_name": "FastNoise", "display_name": "Fast Noise", "license": "Apache-2.0 Or MIT", + "license_url": "https://github.com/o3de/o3de/blob/development/LICENSE.txt", "origin": "Open 3D Engine - o3de.org", "type": "Code", "summary": "The FastNoise Gradient Gem uses the third-party, open source FastNoise library to provide a variety of high-performance noise generation algorithms.", diff --git a/Gems/GameState/gem.json b/Gems/GameState/gem.json index 7bb3cf4214..fe3a338997 100644 --- a/Gems/GameState/gem.json +++ b/Gems/GameState/gem.json @@ -2,6 +2,7 @@ "gem_name": "GameState", "display_name": "Game State", "license": "Apache-2.0 Or MIT", + "license_url": "https://github.com/o3de/o3de/blob/development/LICENSE.txt", "origin": "Open 3D Engine - o3de.org", "type": "Code", "summary": "The Game State Gem provides a generic framework to determine and manage game states and game state transitions in Open 3D Engine.", diff --git a/Gems/GameStateSamples/Assets/UI/Canvases/DefaultMainMenuScreen.uicanvas b/Gems/GameStateSamples/Assets/UI/Canvases/DefaultMainMenuScreen.uicanvas index 2a0d6d476a..d87baa8aa2 100644 --- a/Gems/GameStateSamples/Assets/UI/Canvases/DefaultMainMenuScreen.uicanvas +++ b/Gems/GameStateSamples/Assets/UI/Canvases/DefaultMainMenuScreen.uicanvas @@ -753,7 +753,7 @@ - + @@ -983,7 +983,7 @@ - + diff --git a/Gems/GameStateSamples/gem.json b/Gems/GameStateSamples/gem.json index be982b9c5b..80018ff1a8 100644 --- a/Gems/GameStateSamples/gem.json +++ b/Gems/GameStateSamples/gem.json @@ -2,6 +2,7 @@ "gem_name": "GameStateSamples", "display_name": "Game State Samples", "license": "Apache-2.0 Or MIT", + "license_url": "https://github.com/o3de/o3de/blob/development/LICENSE.txt", "origin": "Open 3D Engine - o3de.org", "type": "Code", "summary": "The Game State Samples Gem provides a set of sample game states (built on top of the Game State Gem), including primary user selection, main menu, level loading, level running, and level paused.", diff --git a/Gems/Gestures/Code/Include/Gestures/GestureRecognizerClickOrTap.h b/Gems/Gestures/Code/Include/Gestures/GestureRecognizerClickOrTap.h index 65f4298c38..920bac6516 100644 --- a/Gems/Gestures/Code/Include/Gestures/GestureRecognizerClickOrTap.h +++ b/Gems/Gestures/Code/Include/Gestures/GestureRecognizerClickOrTap.h @@ -10,6 +10,7 @@ #include "IGestureRecognizer.h" #include +#include //////////////////////////////////////////////////////////////////////////////////////////////////// namespace Gestures @@ -83,7 +84,7 @@ namespace Gestures Config m_config; - int64 m_timeOfLastEvent; + AZ::TimeMs m_timeOfLastEvent; ScreenPosition m_positionOfFirstEvent; ScreenPosition m_positionOfLastEvent; diff --git a/Gems/Gestures/Code/Include/Gestures/GestureRecognizerClickOrTap.inl b/Gems/Gestures/Code/Include/Gestures/GestureRecognizerClickOrTap.inl index b14ef18994..8a079d7953 100644 --- a/Gems/Gestures/Code/Include/Gestures/GestureRecognizerClickOrTap.inl +++ b/Gems/Gestures/Code/Include/Gestures/GestureRecognizerClickOrTap.inl @@ -8,9 +8,8 @@ #include #include +#include #include -#include -#include //////////////////////////////////////////////////////////////////////////////////////////////////// inline void Gestures::RecognizerClickOrTap::Config::Reflect(AZ::ReflectContext* context) @@ -57,7 +56,7 @@ inline void Gestures::RecognizerClickOrTap::Config::Reflect(AZ::ReflectContext* //////////////////////////////////////////////////////////////////////////////////////////////////// inline Gestures::RecognizerClickOrTap::RecognizerClickOrTap(const Config& config) : m_config(config) - , m_timeOfLastEvent(0) + , m_timeOfLastEvent(AZ::Time::ZeroTimeMs) , m_positionOfFirstEvent() , m_positionOfLastEvent() , m_currentCount(0) @@ -77,13 +76,12 @@ inline bool Gestures::RecognizerClickOrTap::OnPressedEvent(const AZ::Vector2& sc { return false; } - - const CTimeValue currentTime = (gEnv && gEnv->pTimer) ? gEnv->pTimer->GetFrameStartTime() : CTimeValue(); + const AZ::TimeMs currentTime = AZ::GetRealElapsedTimeMs(); switch (m_currentState) { case State::Idle: { - m_timeOfLastEvent = currentTime.GetValue(); + m_timeOfLastEvent = currentTime; m_positionOfFirstEvent = screenPosition; m_positionOfLastEvent = screenPosition; m_currentCount = 0; @@ -92,7 +90,7 @@ inline bool Gestures::RecognizerClickOrTap::OnPressedEvent(const AZ::Vector2& sc break; case State::Released: { - if ((currentTime.GetDifferenceInSeconds(m_timeOfLastEvent) > m_config.maxSecondsBetweenClicksOrTaps) || + if ((AZ::TimeMsToSeconds(currentTime - m_timeOfLastEvent) > m_config.maxSecondsBetweenClicksOrTaps) || (screenPosition.GetDistance(m_positionOfFirstEvent) > m_config.maxPixelsBetweenClicksOrTaps)) { // Treat this as the start of a new tap sequence. @@ -100,7 +98,7 @@ inline bool Gestures::RecognizerClickOrTap::OnPressedEvent(const AZ::Vector2& sc m_positionOfFirstEvent = screenPosition; } - m_timeOfLastEvent = currentTime.GetValue(); + m_timeOfLastEvent = currentTime; m_positionOfLastEvent = screenPosition; m_currentState = State::Pressed; } @@ -129,8 +127,8 @@ inline bool Gestures::RecognizerClickOrTap::OnDownEvent(const AZ::Vector2& scree { case State::Pressed: { - const CTimeValue currentTime = (gEnv && gEnv->pTimer) ? gEnv->pTimer->GetFrameStartTime() : CTimeValue(); - if ((currentTime.GetDifferenceInSeconds(m_timeOfLastEvent) > m_config.maxSecondsHeld) || + const AZ::TimeMs currentTime = AZ::GetRealElapsedTimeMs(); + if ((AZ::TimeMsToSeconds(currentTime - m_timeOfLastEvent) > m_config.maxSecondsHeld) || (screenPosition.GetDistance(m_positionOfLastEvent) > m_config.maxPixelsMoved)) { // Tap recognition failed. @@ -168,8 +166,8 @@ inline bool Gestures::RecognizerClickOrTap::OnReleasedEvent(const AZ::Vector2& s { case State::Pressed: { - const CTimeValue currentTime = (gEnv && gEnv->pTimer) ? gEnv->pTimer->GetFrameStartTime() : CTimeValue(); - if ((currentTime.GetDifferenceInSeconds(m_timeOfLastEvent) > m_config.maxSecondsHeld) || + const AZ::TimeMs currentTime = AZ::GetRealElapsedTimeMs(); + if ((AZ::TimeMsToSeconds(currentTime - m_timeOfLastEvent) > m_config.maxSecondsHeld) || (screenPosition.GetDistance(m_positionOfLastEvent) > m_config.maxPixelsMoved)) { // Tap recognition failed. @@ -179,7 +177,7 @@ inline bool Gestures::RecognizerClickOrTap::OnReleasedEvent(const AZ::Vector2& s else if (++m_currentCount >= m_config.minClicksOrTaps) { // Tap recognition succeeded. - m_timeOfLastEvent = currentTime.GetValue(); + m_timeOfLastEvent = currentTime; m_positionOfLastEvent = screenPosition; OnDiscreteGestureRecognized(); @@ -190,7 +188,7 @@ inline bool Gestures::RecognizerClickOrTap::OnReleasedEvent(const AZ::Vector2& s else { // More taps are needed. - m_timeOfLastEvent = currentTime.GetValue(); + m_timeOfLastEvent = currentTime; m_positionOfLastEvent = screenPosition; m_currentState = State::Released; } diff --git a/Gems/Gestures/Code/Include/Gestures/GestureRecognizerDrag.h b/Gems/Gestures/Code/Include/Gestures/GestureRecognizerDrag.h index 97d76b1ceb..91c045b37f 100644 --- a/Gems/Gestures/Code/Include/Gestures/GestureRecognizerDrag.h +++ b/Gems/Gestures/Code/Include/Gestures/GestureRecognizerDrag.h @@ -10,6 +10,7 @@ #include "IGestureRecognizer.h" #include +#include //////////////////////////////////////////////////////////////////////////////////////////////////// namespace Gestures @@ -75,7 +76,7 @@ namespace Gestures Config m_config; - int64 m_startTime; + AZ::TimeMs m_startTime; ScreenPosition m_startPosition; ScreenPosition m_currentPosition; diff --git a/Gems/Gestures/Code/Include/Gestures/GestureRecognizerDrag.inl b/Gems/Gestures/Code/Include/Gestures/GestureRecognizerDrag.inl index 0c83893c9d..a0d0afe6f4 100644 --- a/Gems/Gestures/Code/Include/Gestures/GestureRecognizerDrag.inl +++ b/Gems/Gestures/Code/Include/Gestures/GestureRecognizerDrag.inl @@ -8,7 +8,6 @@ #include #include -#include #include //////////////////////////////////////////////////////////////////////////////////////////////////// @@ -44,7 +43,7 @@ inline void Gestures::RecognizerDrag::Config::Reflect(AZ::ReflectContext* contex //////////////////////////////////////////////////////////////////////////////////////////////////// inline Gestures::RecognizerDrag::RecognizerDrag(const Config& config) : m_config(config) - , m_startTime(0) + , m_startTime(AZ::Time::ZeroTimeMs) , m_startPosition() , m_currentPosition() , m_currentState(State::Idle) @@ -68,7 +67,7 @@ inline bool Gestures::RecognizerDrag::OnPressedEvent(const AZ::Vector2& screenPo { case State::Idle: { - m_startTime = (gEnv && gEnv->pTimer) ? gEnv->pTimer->GetFrameStartTime().GetValue() : 0; + m_startTime = AZ::GetRealElapsedTimeMs(); m_startPosition = screenPosition; m_currentPosition = screenPosition; m_currentState = State::Pressed; @@ -101,11 +100,11 @@ inline bool Gestures::RecognizerDrag::OnDownEvent(const AZ::Vector2& screenPosit { case State::Pressed: { - const CTimeValue currentTime = (gEnv && gEnv->pTimer) ? gEnv->pTimer->GetFrameStartTime() : CTimeValue(); - if ((currentTime.GetDifferenceInSeconds(m_startTime) >= m_config.minSecondsHeld) && + const AZ::TimeMs currentTime = AZ::GetRealElapsedTimeMs(); + if ((AZ::TimeMsToSeconds(currentTime - m_startTime) >= m_config.minSecondsHeld) && (GetDistance() >= m_config.minPixelsMoved)) { - m_startTime = currentTime.GetValue(); + m_startTime = currentTime; m_startPosition = m_currentPosition; OnContinuousGestureInitiated(); m_currentState = State::Dragging; diff --git a/Gems/Gestures/Code/Include/Gestures/GestureRecognizerHold.h b/Gems/Gestures/Code/Include/Gestures/GestureRecognizerHold.h index 11bd56ff4d..a2c4a55166 100644 --- a/Gems/Gestures/Code/Include/Gestures/GestureRecognizerHold.h +++ b/Gems/Gestures/Code/Include/Gestures/GestureRecognizerHold.h @@ -10,8 +10,8 @@ #include "IGestureRecognizer.h" #include -#include #include +#include //////////////////////////////////////////////////////////////////////////////////////////////////// namespace Gestures @@ -64,7 +64,7 @@ namespace Gestures AZ::Vector2 GetStartPosition() const { return m_startPosition; } AZ::Vector2 GetCurrentPosition() const { return m_currentPosition; } - float GetDuration() const { return (gEnv && gEnv->pTimer) ? gEnv->pTimer->GetFrameStartTime().GetDifferenceInSeconds(m_startTime) : 0.0f; } + float GetDuration() const { return AZ::TimeUsToSeconds(AZ::GetLastSimulationTickTime() - m_startTime); } private: enum class State @@ -76,7 +76,7 @@ namespace Gestures Config m_config; - int64 m_startTime; + AZ::TimeUs m_startTime; ScreenPosition m_startPosition; ScreenPosition m_currentPosition; diff --git a/Gems/Gestures/Code/Include/Gestures/GestureRecognizerHold.inl b/Gems/Gestures/Code/Include/Gestures/GestureRecognizerHold.inl index 6af8a10890..75578edca1 100644 --- a/Gems/Gestures/Code/Include/Gestures/GestureRecognizerHold.inl +++ b/Gems/Gestures/Code/Include/Gestures/GestureRecognizerHold.inl @@ -8,7 +8,6 @@ #include #include -#include #include //////////////////////////////////////////////////////////////////////////////////////////////////// @@ -44,7 +43,7 @@ inline void Gestures::RecognizerHold::Config::Reflect(AZ::ReflectContext* contex //////////////////////////////////////////////////////////////////////////////////////////////////// inline Gestures::RecognizerHold::RecognizerHold(const Config& config) : m_config(config) - , m_startTime(0) + , m_startTime(AZ::Time::ZeroTimeUs) , m_startPosition() , m_currentPosition() , m_currentState(State::Idle) @@ -68,7 +67,7 @@ inline bool Gestures::RecognizerHold::OnPressedEvent(const AZ::Vector2& screenPo { case State::Idle: { - m_startTime = (gEnv && gEnv->pTimer) ? gEnv->pTimer->GetFrameStartTime().GetValue() : 0; + m_startTime = AZ::GetLastSimulationTickTime(); m_startPosition = screenPosition; m_currentPosition = screenPosition; m_currentState = State::Pressed; @@ -101,13 +100,13 @@ inline bool Gestures::RecognizerHold::OnDownEvent(const AZ::Vector2& screenPosit { case State::Pressed: { - const CTimeValue currentTime = (gEnv && gEnv->pTimer) ? gEnv->pTimer->GetFrameStartTime() : CTimeValue(); if (screenPosition.GetDistance(m_startPosition) > m_config.maxPixelsMoved) { // Hold recognition failed. m_currentState = State::Idle; } - else if (currentTime.GetDifferenceInSeconds(m_startTime) >= m_config.minSecondsHeld) + else if (const AZ::TimeUs currentTime = AZ::GetLastSimulationTickTime(); + AZ::TimeUsToSeconds(currentTime - m_startTime) >= m_config.minSecondsHeld) { // Hold recognition succeeded. OnContinuousGestureInitiated(); diff --git a/Gems/Gestures/Code/Include/Gestures/GestureRecognizerPinch.h b/Gems/Gestures/Code/Include/Gestures/GestureRecognizerPinch.h index c5fa773339..8d5cd76e7d 100644 --- a/Gems/Gestures/Code/Include/Gestures/GestureRecognizerPinch.h +++ b/Gems/Gestures/Code/Include/Gestures/GestureRecognizerPinch.h @@ -10,6 +10,7 @@ #include "IGestureRecognizer.h" #include +#include //////////////////////////////////////////////////////////////////////////////////////////////////// namespace Gestures @@ -90,7 +91,7 @@ namespace Gestures ScreenPosition m_startPositions[2]; ScreenPosition m_currentPositions[2]; - int64_t m_lastUpdateTimes[2]; + AZ::TimeMs m_lastUpdateTimes[2]; State m_currentState; }; diff --git a/Gems/Gestures/Code/Include/Gestures/GestureRecognizerPinch.inl b/Gems/Gestures/Code/Include/Gestures/GestureRecognizerPinch.inl index 642d781c35..70231becb1 100644 --- a/Gems/Gestures/Code/Include/Gestures/GestureRecognizerPinch.inl +++ b/Gems/Gestures/Code/Include/Gestures/GestureRecognizerPinch.inl @@ -8,7 +8,6 @@ #include #include -#include #include //////////////////////////////////////////////////////////////////////////////////////////////////// @@ -42,8 +41,8 @@ inline Gestures::RecognizerPinch::RecognizerPinch(const Config& config) : m_config(config) , m_currentState(State::Idle) { - m_lastUpdateTimes[0] = 0; - m_lastUpdateTimes[1] = 0; + m_lastUpdateTimes[0] = AZ::Time::ZeroTimeMs; + m_lastUpdateTimes[1] = AZ::Time::ZeroTimeMs; } //////////////////////////////////////////////////////////////////////////////////////////////////// @@ -112,7 +111,7 @@ inline bool Gestures::RecognizerPinch::OnDownEvent(const AZ::Vector2& screenPosi } m_currentPositions[pointerIndex] = screenPosition; - m_lastUpdateTimes[pointerIndex] = (gEnv && gEnv->pTimer) ? gEnv->pTimer->GetFrameStartTime().GetValue() : 0; + m_lastUpdateTimes[pointerIndex] = AZ::GetRealElapsedTimeMs(); if (m_lastUpdateTimes[0] != m_lastUpdateTimes[1]) { // We need to wait until both touches have been updated this frame. diff --git a/Gems/Gestures/Code/Include/Gestures/GestureRecognizerRotate.h b/Gems/Gestures/Code/Include/Gestures/GestureRecognizerRotate.h index b2d31e3d4f..a07aad7d6a 100644 --- a/Gems/Gestures/Code/Include/Gestures/GestureRecognizerRotate.h +++ b/Gems/Gestures/Code/Include/Gestures/GestureRecognizerRotate.h @@ -10,6 +10,7 @@ #include "IGestureRecognizer.h" #include +#include //////////////////////////////////////////////////////////////////////////////////////////////////// namespace Gestures @@ -86,7 +87,7 @@ namespace Gestures ScreenPosition m_startPositions[2]; ScreenPosition m_currentPositions[2]; - int64_t m_lastUpdateTimes[2]; + AZ::TimeMs m_lastUpdateTimes[2]; State m_currentState; }; diff --git a/Gems/Gestures/Code/Include/Gestures/GestureRecognizerRotate.inl b/Gems/Gestures/Code/Include/Gestures/GestureRecognizerRotate.inl index 2ae504e309..894a2dd2e8 100644 --- a/Gems/Gestures/Code/Include/Gestures/GestureRecognizerRotate.inl +++ b/Gems/Gestures/Code/Include/Gestures/GestureRecognizerRotate.inl @@ -9,7 +9,6 @@ #include #include #include -#include //////////////////////////////////////////////////////////////////////////////////////////////////// inline void Gestures::RecognizerRotate::Config::Reflect(AZ::ReflectContext* context) @@ -42,8 +41,8 @@ inline Gestures::RecognizerRotate::RecognizerRotate(const Config& config) : m_config(config) , m_currentState(State::Idle) { - m_lastUpdateTimes[0] = 0; - m_lastUpdateTimes[1] = 0; + m_lastUpdateTimes[0] = AZ::Time::ZeroTimeMs; + m_lastUpdateTimes[1] = AZ::Time::ZeroTimeMs; } //////////////////////////////////////////////////////////////////////////////////////////////////// @@ -101,7 +100,7 @@ inline bool Gestures::RecognizerRotate::OnDownEvent(const AZ::Vector2& screenPos } m_currentPositions[pointerIndex] = screenPosition; - m_lastUpdateTimes[pointerIndex] = (gEnv && gEnv->pTimer) ? gEnv->pTimer->GetFrameStartTime().GetValue() : 0; + m_lastUpdateTimes[pointerIndex] = AZ::GetRealElapsedTimeMs(); if (m_lastUpdateTimes[0] != m_lastUpdateTimes[1]) { // We need to wait until both touches have been updated this frame. diff --git a/Gems/Gestures/Code/Include/Gestures/GestureRecognizerSwipe.h b/Gems/Gestures/Code/Include/Gestures/GestureRecognizerSwipe.h index bf0181e2b9..ed63991b3a 100644 --- a/Gems/Gestures/Code/Include/Gestures/GestureRecognizerSwipe.h +++ b/Gems/Gestures/Code/Include/Gestures/GestureRecognizerSwipe.h @@ -8,8 +8,8 @@ #pragma once #include "IGestureRecognizer.h" -#include #include +#include //////////////////////////////////////////////////////////////////////////////////////////////////// namespace Gestures @@ -66,7 +66,7 @@ namespace Gestures AZ::Vector2 GetDirection() const { return GetDelta().GetNormalized(); } float GetDistance() const { return GetEndPosition().GetDistance(GetStartPosition()); } - float GetDuration() const { return CTimeValue(m_endTime).GetDifferenceInSeconds(m_startTime); } + float GetDuration() const { return AZ::TimeMsToSeconds(m_endTime - m_startTime); } float GetVelocity() const { return GetDistance() / GetDuration(); } private: @@ -81,8 +81,8 @@ namespace Gestures ScreenPosition m_startPosition; ScreenPosition m_endPosition; - int64 m_startTime; - int64 m_endTime; + AZ::TimeMs m_startTime; + AZ::TimeMs m_endTime; State m_currentState; }; diff --git a/Gems/Gestures/Code/Include/Gestures/GestureRecognizerSwipe.inl b/Gems/Gestures/Code/Include/Gestures/GestureRecognizerSwipe.inl index 5f879ce423..072cebcbb5 100644 --- a/Gems/Gestures/Code/Include/Gestures/GestureRecognizerSwipe.inl +++ b/Gems/Gestures/Code/Include/Gestures/GestureRecognizerSwipe.inl @@ -45,8 +45,8 @@ inline Gestures::RecognizerSwipe::RecognizerSwipe(const Config& config) : m_config(config) , m_startPosition() , m_endPosition() - , m_startTime(0) - , m_endTime(0) + , m_startTime(AZ::Time::ZeroTimeMs) + , m_endTime(AZ::Time::ZeroTimeMs) , m_currentState(State::Idle) { } @@ -68,7 +68,7 @@ inline bool Gestures::RecognizerSwipe::OnPressedEvent(const AZ::Vector2& screenP { case State::Idle: { - m_startTime = (gEnv && gEnv->pTimer) ? gEnv->pTimer->GetFrameStartTime().GetValue() : 0; + m_startTime = AZ::GetRealElapsedTimeMs(); m_startPosition = screenPosition; m_endPosition = screenPosition; m_currentState = State::Pressed; @@ -98,8 +98,8 @@ inline bool Gestures::RecognizerSwipe::OnDownEvent([[maybe_unused]] const AZ::Ve { case State::Pressed: { - const CTimeValue currentTime = (gEnv && gEnv->pTimer) ? gEnv->pTimer->GetFrameStartTime() : CTimeValue(); - if (currentTime.GetDifferenceInSeconds(m_startTime) > m_config.maxSecondsHeld) + const AZ::TimeMs currentTime = AZ::GetRealElapsedTimeMs(); + if (AZ::TimeMsToSeconds(currentTime - m_startTime) > m_config.maxSecondsHeld) { // Swipe recognition failed because we took too long. m_currentState = State::Idle; @@ -134,12 +134,12 @@ inline bool Gestures::RecognizerSwipe::OnReleasedEvent(const AZ::Vector2& screen { case State::Pressed: { - const CTimeValue currentTime = (gEnv && gEnv->pTimer) ? gEnv->pTimer->GetFrameStartTime() : CTimeValue(); - if ((currentTime.GetDifferenceInSeconds(m_startTime) <= m_config.maxSecondsHeld) && + const AZ::TimeMs currentTime = AZ::GetRealElapsedTimeMs(); + if ((AZ::TimeMsToSeconds(currentTime - m_startTime) <= m_config.maxSecondsHeld) && (screenPosition.GetDistance(m_startPosition) >= m_config.minPixelsMoved)) { // Swipe recognition succeeded. - m_endTime = currentTime.GetValue(); + m_endTime = currentTime; m_endPosition = screenPosition; OnDiscreteGestureRecognized(); m_currentState = State::Idle; diff --git a/Gems/Gestures/Code/Tests/BaseGestureTest.h b/Gems/Gestures/Code/Tests/BaseGestureTest.h index b0897e258a..56cc4b6777 100644 --- a/Gems/Gestures/Code/Tests/BaseGestureTest.h +++ b/Gems/Gestures/Code/Tests/BaseGestureTest.h @@ -6,13 +6,25 @@ * */ #pragma once -#include -#include -#include #include +#include +#include +#include -class BaseGestureTest - : public ::testing::Test +namespace GesturesTests +{ + struct StubTimer : public AZ::StubTimeSystem + { + AZ::TimeMs GetRealElapsedTimeMs() const override + { + return m_realElapsedTime; + } + + AZ::TimeMs m_realElapsedTime = AZ::Time::ZeroTimeMs; + }; +} // namespace GesturesTests + +class BaseGestureTest : public ::testing::Test { public: BaseGestureTest() @@ -24,39 +36,30 @@ public: { // global environment stubs m_env = new(AZ_OS_MALLOC(sizeof(SSystemGlobalEnvironment), alignof(SSystemGlobalEnvironment))) SSystemGlobalEnvironment(); - m_stubTimer = new StubTimer(1.0f / 30.0f); gEnv = m_env; - gEnv->pTimer = m_stubTimer; - + m_stubTimer = new GesturesTests::StubTimer(); // simulated position m_pos = AZ::Vector2(0.0f, 0.0f); } void TearDown() override { - gEnv->pTimer = nullptr; gEnv = nullptr; - if (m_stubTimer) - { - delete m_stubTimer; - m_stubTimer = nullptr; - } if (m_env) { m_env->~SSystemGlobalEnvironment(); AZ_OS_FREE(m_env); m_env = nullptr; } + delete m_stubTimer; } - protected: - // time manipulation void SetTime(float sec) { - m_stubTimer->SetTime(sec); + m_stubTimer->m_realElapsedTime = AZ::SecondsToTimeMs(sec); } // simple position caching interface @@ -97,9 +100,7 @@ protected: } private: - SSystemGlobalEnvironment* m_env; - StubTimer* m_stubTimer; + SSystemGlobalEnvironment* m_env = nullptr; + GesturesTests::StubTimer* m_stubTimer = nullptr; AZ::Vector2 m_pos; }; - - diff --git a/Gems/Gestures/Code/Tests/GestureRecognizerClickOrTapTests.cpp b/Gems/Gestures/Code/Tests/GestureRecognizerClickOrTapTests.cpp index 72fca0498d..9337ae87ed 100644 --- a/Gems/Gestures/Code/Tests/GestureRecognizerClickOrTapTests.cpp +++ b/Gems/Gestures/Code/Tests/GestureRecognizerClickOrTapTests.cpp @@ -7,7 +7,6 @@ */ #include -#include #include #include "BaseGestureTest.h" diff --git a/Gems/Gestures/Code/Tests/GestureRecognizerPinchTests.cpp b/Gems/Gestures/Code/Tests/GestureRecognizerPinchTests.cpp index bb7ac4a75a..3d39a888b5 100644 --- a/Gems/Gestures/Code/Tests/GestureRecognizerPinchTests.cpp +++ b/Gems/Gestures/Code/Tests/GestureRecognizerPinchTests.cpp @@ -7,7 +7,6 @@ */ #include -#include #include #include "BaseGestureTest.h" diff --git a/Gems/Gestures/gem.json b/Gems/Gestures/gem.json index fcc56b4704..8efd389d53 100644 --- a/Gems/Gestures/gem.json +++ b/Gems/Gestures/gem.json @@ -2,6 +2,7 @@ "gem_name": "Gestures", "display_name": "Gestures", "license": "Apache-2.0 Or MIT", + "license_url": "https://github.com/o3de/o3de/blob/development/LICENSE.txt", "origin": "Open 3D Engine - o3de.org", "type": "Code", "summary": "The Gestures Gem provides detection for common gesture-based input actions on iOS and Android devices.", diff --git a/Gems/GradientSignal/Code/CMakeLists.txt b/Gems/GradientSignal/Code/CMakeLists.txt index 5b88044116..d4cf666630 100644 --- a/Gems/GradientSignal/Code/CMakeLists.txt +++ b/Gems/GradientSignal/Code/CMakeLists.txt @@ -18,10 +18,11 @@ ly_add_target( Include BUILD_DEPENDENCIES PUBLIC - Legacy::CryCommon + AZ::AzCore + AZ::AtomCore + AZ::AzFramework Gem::SurfaceData Gem::ImageProcessingAtom.Headers - PRIVATE Gem::LmbrCentral ) @@ -37,9 +38,11 @@ ly_add_target( Include BUILD_DEPENDENCIES PRIVATE - Gem::GradientSignal.Static Gem::LmbrCentral PUBLIC + AZ::AzCore + AZ::AtomCore + Gem::GradientSignal.Static Gem::ImageProcessingAtom.Headers # Atom/ImageProcessing/PixelFormats.h is part of a header in Includes RUNTIME_DEPENDENCIES Gem::LmbrCentral @@ -69,7 +72,9 @@ if(PAL_TRAIT_BUILD_HOST_TOOLS) Gem::LmbrCentral.Editor PUBLIC 3rdParty::Qt::Widgets - Legacy::CryCommon + AZ::AzCore + AZ::AtomCore + AZ::AzFramework AZ::AzToolsFramework AZ::AssetBuilderSDK Gem::GradientSignal.Static @@ -92,6 +97,8 @@ if(PAL_TRAIT_BUILD_HOST_TOOLS) PRIVATE Gem::GradientSignal.Editor.Static Gem::LmbrCentral.Editor + PUBLIC + AZ::AtomCore RUNTIME_DEPENDENCIES Gem::LmbrCentral.Editor ) @@ -117,6 +124,27 @@ if(PAL_TRAIT_BUILD_TESTS_SUPPORTED) Mocks ) + ly_add_target( + NAME GradientSignal.Tests.Static STATIC + NAMESPACE Gem + FILES_CMAKE + gradientsignal_shared_tests_files.cmake + INCLUDE_DIRECTORIES + PUBLIC + Tests + PRIVATE + . + Source + BUILD_DEPENDENCIES + PRIVATE + AZ::AzTest + AZ::AzTestShared + Gem::GradientSignal.Static + Gem::LmbrCentral + Gem::LmbrCentral.Mocks + Gem::GradientSignal.Mocks + ) + ly_add_target( NAME GradientSignal.Tests ${PAL_TRAIT_TEST_TARGET_TYPE} NAMESPACE Gem @@ -129,14 +157,23 @@ if(PAL_TRAIT_BUILD_TESTS_SUPPORTED) BUILD_DEPENDENCIES PRIVATE AZ::AzTest + AZ::AzTestShared + Gem::GradientSignal.Tests.Static Gem::GradientSignal.Static Gem::LmbrCentral + Gem::LmbrCentral.Mocks Gem::GradientSignal.Mocks ) ly_add_googletest( NAME Gem::GradientSignal.Tests ) + ly_add_googlebenchmark( + NAME Gem::GradientSignal.Benchmarks + TARGET Gem::GradientSignal.Tests + ) + + if(PAL_TRAIT_BUILD_HOST_TOOLS) ly_add_target( NAME GradientSignal.Editor.Tests ${PAL_TRAIT_TEST_TARGET_TYPE} @@ -150,9 +187,12 @@ if(PAL_TRAIT_BUILD_TESTS_SUPPORTED) BUILD_DEPENDENCIES PRIVATE AZ::AzTest + AZ::AzTestShared + Gem::GradientSignal.Tests.Static Gem::GradientSignal.Static Gem::GradientSignal.Editor.Static Gem::LmbrCentral.Editor + Gem::LmbrCentral.Mocks ) ly_add_googletest( NAME Gem::GradientSignal.Editor.Tests diff --git a/Gems/GradientSignal/Code/Source/Components/ConstantGradientComponent.h b/Gems/GradientSignal/Code/Include/GradientSignal/Components/ConstantGradientComponent.h similarity index 100% rename from Gems/GradientSignal/Code/Source/Components/ConstantGradientComponent.h rename to Gems/GradientSignal/Code/Include/GradientSignal/Components/ConstantGradientComponent.h diff --git a/Gems/GradientSignal/Code/Source/Components/DitherGradientComponent.h b/Gems/GradientSignal/Code/Include/GradientSignal/Components/DitherGradientComponent.h similarity index 100% rename from Gems/GradientSignal/Code/Source/Components/DitherGradientComponent.h rename to Gems/GradientSignal/Code/Include/GradientSignal/Components/DitherGradientComponent.h diff --git a/Gems/GradientSignal/Code/Source/Components/GradientSurfaceDataComponent.h b/Gems/GradientSignal/Code/Include/GradientSignal/Components/GradientSurfaceDataComponent.h similarity index 100% rename from Gems/GradientSignal/Code/Source/Components/GradientSurfaceDataComponent.h rename to Gems/GradientSignal/Code/Include/GradientSignal/Components/GradientSurfaceDataComponent.h diff --git a/Gems/GradientSignal/Code/Source/Components/GradientTransformComponent.h b/Gems/GradientSignal/Code/Include/GradientSignal/Components/GradientTransformComponent.h similarity index 92% rename from Gems/GradientSignal/Code/Source/Components/GradientTransformComponent.h rename to Gems/GradientSignal/Code/Include/GradientSignal/Components/GradientTransformComponent.h index abaa245f15..805fba9e74 100644 --- a/Gems/GradientSignal/Code/Source/Components/GradientTransformComponent.h +++ b/Gems/GradientSignal/Code/Include/GradientSignal/Components/GradientTransformComponent.h @@ -101,9 +101,7 @@ namespace GradientSignal ////////////////////////////////////////////////////////////////////////// // GradientTransformRequestBus - void TransformPositionToUVW(const AZ::Vector3& inPosition, AZ::Vector3& outUVW, const bool shouldNormalizeOutput, bool& wasPointRejected) const override; - void GetGradientLocalBounds(AZ::Aabb& bounds) const override; - void GetGradientEncompassingBounds(AZ::Aabb& bounds) const override; + const GradientTransform& GetGradientTransform() const override; ////////////////////////////////////////////////////////////////////////// // DependencyNotificationBus @@ -113,7 +111,7 @@ namespace GradientSignal // AZ::TickBus::Handler void OnTick(float deltaTime, AZ::ScriptTimePoint time) override; - void UpdateFromShape(); + void UpdateFromShape(bool notifyDependentsOfChange); AZ::EntityId GetShapeEntityId() const; @@ -168,9 +166,8 @@ namespace GradientSignal private: mutable AZStd::recursive_mutex m_cacheMutex; GradientTransformConfig m_configuration; - AZ::Aabb m_shapeBounds = AZ::Aabb::CreateNull(); - AZ::Matrix3x4 m_shapeTransformInverse = AZ::Matrix3x4::CreateIdentity(); LmbrCentral::DependencyMonitor m_dependencyMonitor; AZStd::atomic_bool m_dirty{ false }; + GradientTransform m_gradientTransform; }; } //namespace GradientSignal diff --git a/Gems/GradientSignal/Code/Source/Components/ImageGradientComponent.h b/Gems/GradientSignal/Code/Include/GradientSignal/Components/ImageGradientComponent.h similarity index 86% rename from Gems/GradientSignal/Code/Source/Components/ImageGradientComponent.h rename to Gems/GradientSignal/Code/Include/GradientSignal/Components/ImageGradientComponent.h index 5033c44735..8214436f83 100644 --- a/Gems/GradientSignal/Code/Source/Components/ImageGradientComponent.h +++ b/Gems/GradientSignal/Code/Include/GradientSignal/Components/ImageGradientComponent.h @@ -11,6 +11,7 @@ #include #include #include +#include #include #include #include @@ -46,6 +47,7 @@ namespace GradientSignal , private AZ::Data::AssetBus::Handler , private GradientRequestBus::Handler , private ImageGradientRequestBus::Handler + , private GradientTransformNotificationBus::Handler { public: template friend class LmbrCentral::EditorWrappedComponentBase; @@ -59,29 +61,27 @@ namespace GradientSignal ImageGradientComponent() = default; ~ImageGradientComponent() = default; - ////////////////////////////////////////////////////////////////////////// - // AZ::Component interface implementation + // AZ::Component overrides... void Activate() override; void Deactivate() override; bool ReadInConfig(const AZ::ComponentConfig* baseConfig) override; bool WriteOutConfig(AZ::ComponentConfig* outBaseConfig) const override; - ////////////////////////////////////////////////////////////////////////// - // GradientRequestBus + // GradientRequestBus overrides... float GetValue(const GradientSampleParams& sampleParams) const override; - ////////////////////////////////////////////////////////////////////////// - // AZ::Data::AssetBus::Handler + // AZ::Data::AssetBus overrides... void OnAssetReady(AZ::Data::Asset asset) override; void OnAssetMoved(AZ::Data::Asset asset, void* oldDataPointer) override; void OnAssetReloaded(AZ::Data::Asset asset) override; protected: + // GradientTransformNotificationBus overrides... + void OnGradientTransformChanged(const GradientTransform& newTransform) override; void SetupDependencies(); - ////////////////////////////////////////////////////////////////////////// - // ImageGradientRequestBus + // ImageGradientRequestBus overrides... AZStd::string GetImageAssetPath() const override; void SetImageAssetPath(const AZStd::string& assetPath) override; @@ -94,6 +94,7 @@ namespace GradientSignal private: ImageGradientConfig m_configuration; LmbrCentral::DependencyMonitor m_dependencyMonitor; - mutable AZStd::recursive_mutex m_imageMutex; + mutable AZStd::shared_mutex m_imageMutex; + GradientTransform m_gradientTransform; }; } diff --git a/Gems/GradientSignal/Code/Source/Components/InvertGradientComponent.h b/Gems/GradientSignal/Code/Include/GradientSignal/Components/InvertGradientComponent.h similarity index 100% rename from Gems/GradientSignal/Code/Source/Components/InvertGradientComponent.h rename to Gems/GradientSignal/Code/Include/GradientSignal/Components/InvertGradientComponent.h diff --git a/Gems/GradientSignal/Code/Source/Components/LevelsGradientComponent.h b/Gems/GradientSignal/Code/Include/GradientSignal/Components/LevelsGradientComponent.h similarity index 100% rename from Gems/GradientSignal/Code/Source/Components/LevelsGradientComponent.h rename to Gems/GradientSignal/Code/Include/GradientSignal/Components/LevelsGradientComponent.h diff --git a/Gems/GradientSignal/Code/Source/Components/MixedGradientComponent.h b/Gems/GradientSignal/Code/Include/GradientSignal/Components/MixedGradientComponent.h similarity index 100% rename from Gems/GradientSignal/Code/Source/Components/MixedGradientComponent.h rename to Gems/GradientSignal/Code/Include/GradientSignal/Components/MixedGradientComponent.h diff --git a/Gems/GradientSignal/Code/Source/Components/PerlinGradientComponent.h b/Gems/GradientSignal/Code/Include/GradientSignal/Components/PerlinGradientComponent.h similarity index 85% rename from Gems/GradientSignal/Code/Source/Components/PerlinGradientComponent.h rename to Gems/GradientSignal/Code/Include/GradientSignal/Components/PerlinGradientComponent.h index 9fda45c716..ef171f5319 100644 --- a/Gems/GradientSignal/Code/Source/Components/PerlinGradientComponent.h +++ b/Gems/GradientSignal/Code/Include/GradientSignal/Components/PerlinGradientComponent.h @@ -12,6 +12,7 @@ #include #include #include +#include #include #include @@ -47,6 +48,7 @@ namespace GradientSignal : public AZ::Component , private GradientRequestBus::Handler , private PerlinGradientRequestBus::Handler + , private GradientTransformNotificationBus::Handler { public: template friend class LmbrCentral::EditorWrappedComponentBase; @@ -60,23 +62,25 @@ namespace GradientSignal PerlinGradientComponent() = default; ~PerlinGradientComponent() = default; - ////////////////////////////////////////////////////////////////////////// - // AZ::Component interface implementation + // AZ::Component overrides... void Activate() override; void Deactivate() override; bool ReadInConfig(const AZ::ComponentConfig* baseConfig) override; bool WriteOutConfig(AZ::ComponentConfig* outBaseConfig) const override; - ////////////////////////////////////////////////////////////////////////// - // GradientRequestBus + // GradientRequestBus overrides... float GetValue(const GradientSampleParams& sampleParams) const override; private: PerlinGradientConfig m_configuration; AZStd::unique_ptr m_perlinImprovedNoise; + GradientTransform m_gradientTransform; + mutable AZStd::shared_mutex m_transformMutex; - ///////////////////////////////////////////////////////////////////////// - //PerlinGradientRequest overrides + // GradientTransformNotificationBus overrides... + void OnGradientTransformChanged(const GradientTransform& newTransform) override; + + // PerlinGradientRequestBus overrides... int GetRandomSeed() const override; void SetRandomSeed(int seed) override; diff --git a/Gems/GradientSignal/Code/Source/Components/PosterizeGradientComponent.h b/Gems/GradientSignal/Code/Include/GradientSignal/Components/PosterizeGradientComponent.h similarity index 100% rename from Gems/GradientSignal/Code/Source/Components/PosterizeGradientComponent.h rename to Gems/GradientSignal/Code/Include/GradientSignal/Components/PosterizeGradientComponent.h diff --git a/Gems/GradientSignal/Code/Source/Components/RandomGradientComponent.h b/Gems/GradientSignal/Code/Include/GradientSignal/Components/RandomGradientComponent.h similarity index 82% rename from Gems/GradientSignal/Code/Source/Components/RandomGradientComponent.h rename to Gems/GradientSignal/Code/Include/GradientSignal/Components/RandomGradientComponent.h index 299b9dadfe..b0dbd964a0 100644 --- a/Gems/GradientSignal/Code/Source/Components/RandomGradientComponent.h +++ b/Gems/GradientSignal/Code/Include/GradientSignal/Components/RandomGradientComponent.h @@ -10,6 +10,7 @@ #include #include +#include #include namespace LmbrCentral @@ -38,6 +39,7 @@ namespace GradientSignal : public AZ::Component , private GradientRequestBus::Handler , private RandomGradientRequestBus::Handler + , private GradientTransformNotificationBus::Handler { public: template friend class LmbrCentral::EditorWrappedComponentBase; @@ -51,22 +53,24 @@ namespace GradientSignal RandomGradientComponent() = default; ~RandomGradientComponent() = default; - ////////////////////////////////////////////////////////////////////////// - // AZ::Component interface implementation + // AZ::Component overrides... void Activate() override; void Deactivate() override; bool ReadInConfig(const AZ::ComponentConfig* baseConfig) override; bool WriteOutConfig(AZ::ComponentConfig* outBaseConfig) const override; - ////////////////////////////////////////////////////////////////////////// - // GradientRequestBus + // GradientRequestBus overrides... float GetValue(const GradientSampleParams& sampleParams) const override; private: RandomGradientConfig m_configuration; + GradientTransform m_gradientTransform; + mutable AZStd::shared_mutex m_transformMutex; - ///////////////////////////////////////////////////////////////////////// - // RandomGradientRequest overrides + // GradientTransformNotificationBus overrides... + void OnGradientTransformChanged(const GradientTransform& newTransform) override; + + // RandomGradientRequestBus overrides... int GetRandomSeed() const override; void SetRandomSeed(int seed) override; }; diff --git a/Gems/GradientSignal/Code/Source/Components/ReferenceGradientComponent.h b/Gems/GradientSignal/Code/Include/GradientSignal/Components/ReferenceGradientComponent.h similarity index 100% rename from Gems/GradientSignal/Code/Source/Components/ReferenceGradientComponent.h rename to Gems/GradientSignal/Code/Include/GradientSignal/Components/ReferenceGradientComponent.h diff --git a/Gems/GradientSignal/Code/Source/Components/ShapeAreaFalloffGradientComponent.h b/Gems/GradientSignal/Code/Include/GradientSignal/Components/ShapeAreaFalloffGradientComponent.h similarity index 100% rename from Gems/GradientSignal/Code/Source/Components/ShapeAreaFalloffGradientComponent.h rename to Gems/GradientSignal/Code/Include/GradientSignal/Components/ShapeAreaFalloffGradientComponent.h diff --git a/Gems/GradientSignal/Code/Source/Components/SmoothStepGradientComponent.h b/Gems/GradientSignal/Code/Include/GradientSignal/Components/SmoothStepGradientComponent.h similarity index 100% rename from Gems/GradientSignal/Code/Source/Components/SmoothStepGradientComponent.h rename to Gems/GradientSignal/Code/Include/GradientSignal/Components/SmoothStepGradientComponent.h diff --git a/Gems/GradientSignal/Code/Source/Components/SurfaceAltitudeGradientComponent.h b/Gems/GradientSignal/Code/Include/GradientSignal/Components/SurfaceAltitudeGradientComponent.h similarity index 100% rename from Gems/GradientSignal/Code/Source/Components/SurfaceAltitudeGradientComponent.h rename to Gems/GradientSignal/Code/Include/GradientSignal/Components/SurfaceAltitudeGradientComponent.h diff --git a/Gems/GradientSignal/Code/Source/Components/SurfaceMaskGradientComponent.h b/Gems/GradientSignal/Code/Include/GradientSignal/Components/SurfaceMaskGradientComponent.h similarity index 100% rename from Gems/GradientSignal/Code/Source/Components/SurfaceMaskGradientComponent.h rename to Gems/GradientSignal/Code/Include/GradientSignal/Components/SurfaceMaskGradientComponent.h diff --git a/Gems/GradientSignal/Code/Source/Components/SurfaceSlopeGradientComponent.h b/Gems/GradientSignal/Code/Include/GradientSignal/Components/SurfaceSlopeGradientComponent.h similarity index 100% rename from Gems/GradientSignal/Code/Source/Components/SurfaceSlopeGradientComponent.h rename to Gems/GradientSignal/Code/Include/GradientSignal/Components/SurfaceSlopeGradientComponent.h diff --git a/Gems/GradientSignal/Code/Source/Components/ThresholdGradientComponent.h b/Gems/GradientSignal/Code/Include/GradientSignal/Components/ThresholdGradientComponent.h similarity index 100% rename from Gems/GradientSignal/Code/Source/Components/ThresholdGradientComponent.h rename to Gems/GradientSignal/Code/Include/GradientSignal/Components/ThresholdGradientComponent.h diff --git a/Gems/GradientSignal/Code/Include/GradientSignal/Ebuses/GradientRequestBus.h b/Gems/GradientSignal/Code/Include/GradientSignal/Ebuses/GradientRequestBus.h index 1782972acf..3a215c5b5d 100644 --- a/Gems/GradientSignal/Code/Include/GradientSignal/Ebuses/GradientRequestBus.h +++ b/Gems/GradientSignal/Code/Include/GradientSignal/Ebuses/GradientRequestBus.h @@ -11,6 +11,8 @@ #include #include +#include + namespace GradientSignal { struct GradientSampleParams final @@ -49,6 +51,35 @@ namespace GradientSignal */ virtual float GetValue(const GradientSampleParams& sampleParams) const = 0; + /** + * Given a list of positions, generate values. Implementations of this need to be thread-safe without using locks, + * as it can get called from multiple threads simultaneously and has the potential to cause lock inversion deadlocks. + * \param positions The input list of positions to query. + * \param outValues The output list of values. This list is expected to be the same size as the positions list. + */ + virtual void GetValues(AZStd::array_view positions, AZStd::array_view outValues) const + { + // Reference implementation of GetValues for any gradients that don't have their own optimized implementations. + // This is 10%-60% faster than calling GetValue via EBus many times due to the per-call EBus overhead. + + if (positions.size() != outValues.size()) + { + AZ_Assert(false, "input and output lists are different sizes (%zu vs %zu).", positions.size(), outValues.size()); + return; + } + + GradientSampleParams sampleParams; + for (size_t index = 0; index < positions.size(); index++) + { + sampleParams.m_position = positions[index]; + + // The const_cast is necessary for now since array_view currently only supports const entries. + // If/when array_view is fixed to support non-const, or AZStd::span gets created, the const_cast can get removed. + auto& outValue = const_cast(outValues[index]); + outValue = GetValue(sampleParams); + } + } + /** * Call to check the hierarchy to see if a given entityId exists in the gradient signal chain */ diff --git a/Gems/GradientSignal/Code/Include/GradientSignal/Ebuses/GradientTransformModifierRequestBus.h b/Gems/GradientSignal/Code/Include/GradientSignal/Ebuses/GradientTransformModifierRequestBus.h index 34cc8ef685..eba6aad12c 100644 --- a/Gems/GradientSignal/Code/Include/GradientSignal/Ebuses/GradientTransformModifierRequestBus.h +++ b/Gems/GradientSignal/Code/Include/GradientSignal/Ebuses/GradientTransformModifierRequestBus.h @@ -13,14 +13,30 @@ namespace GradientSignal { + //! TransformType describes where the gradient's origin is mapped to. + enum class TransformType : AZ::u8 + { + //! The gradient's origin is the world position of this entity. + World_ThisEntity = 0, + //! The gradient's origin is the local position of this entity, but in world space. + //! i.e. If the parent is at (2, 2), and the gradient is at (3,3) in local space, the gradient entity itself will be at (5,5) in + //! world space but its origin will frozen at (3,3) in world space, no matter how much the parent moves around. + Local_ThisEntity, + //! The gradient's origin is the world position of the reference entity. + World_ReferenceEntity, + //! The gradient's origin is the local position of the reference entity, but in world space. + Local_ReferenceEntity, + //! The gradient's origin is at (0,0,0) in world space. + World_Origin, + //! The gradient's origin is in translated world space relative to the reference entity. + Relative, + }; + class GradientTransformModifierRequests : public AZ::ComponentBus { public: - /** - * Overrides the default AZ::EBusTraits handler policy to allow one - * listener only. - */ + //! Overrides the default AZ::EBusTraits handler policy to allow only one listener. static const AZ::EBusHandlerPolicy HandlerPolicy = AZ::EBusHandlerPolicy::Single; virtual bool GetAllowReference() const = 0; diff --git a/Gems/GradientSignal/Code/Include/GradientSignal/Ebuses/GradientTransformRequestBus.h b/Gems/GradientSignal/Code/Include/GradientSignal/Ebuses/GradientTransformRequestBus.h index 426255efe7..3b674d0bd5 100644 --- a/Gems/GradientSignal/Code/Include/GradientSignal/Ebuses/GradientTransformRequestBus.h +++ b/Gems/GradientSignal/Code/Include/GradientSignal/Ebuses/GradientTransformRequestBus.h @@ -11,6 +11,7 @@ #include #include #include +#include namespace GradientSignal { @@ -22,15 +23,56 @@ namespace GradientSignal static const AZ::EBusAddressPolicy AddressPolicy = AZ::EBusAddressPolicy::ById; using BusIdType = AZ::EntityId; - //! allows multiple threads to call shape requests + //! allows multiple threads to call gradient transform requests using MutexType = AZStd::recursive_mutex; virtual ~GradientTransformRequests() = default; - virtual void TransformPositionToUVW(const AZ::Vector3& inPosition, AZ::Vector3& outUVW, const bool shouldNormalizeOutput, bool& wasPointRejected) const = 0; - virtual void GetGradientLocalBounds(AZ::Aabb& bounds) const = 0; - virtual void GetGradientEncompassingBounds(AZ::Aabb& bounds) const = 0; + //! Get the GradientTransform that's been configured by the bus listener. + //! \return the GradientTransform instance that can be used to transform world points into gradient lookup space. + virtual const GradientTransform& GetGradientTransform() const = 0; }; using GradientTransformRequestBus = AZ::EBus; + + /** + * Notifies about changes to the GradientTransform configuration + */ + class GradientTransformNotifications + : public AZ::EBusTraits + { + public: + //////////////////////////////////////////////////////////////////////// + // EBusTraits + static const AZ::EBusAddressPolicy AddressPolicy = AZ::EBusAddressPolicy::ById; + using BusIdType = AZ::EntityId; + using MutexType = AZStd::recursive_mutex; + //////////////////////////////////////////////////////////////////////// + + //! Notify listeners that the GradientTransform configuration has changed. + //! \return the GradientTransform instance that can be used to transform world points into gradient lookup space. + virtual void OnGradientTransformChanged(const GradientTransform& newTransform) = 0; + + //! Connection policy that auto-calls OnGradientTransformChanged on connection with the current GradientTransform data. + template + struct ConnectionPolicy : public AZ::EBusConnectionPolicy + { + static void Connect( + typename Bus::BusPtr& busPtr, + typename Bus::Context& context, + typename Bus::HandlerNode& handler, + typename Bus::Context::ConnectLockGuard& connectLock, + const typename Bus::BusIdType& id = 0) + { + AZ::EBusConnectionPolicy::Connect(busPtr, context, handler, connectLock, id); + + GradientTransform transform; + GradientTransformRequestBus::EventResult(transform, id, &GradientTransformRequests::GetGradientTransform); + handler->OnGradientTransformChanged(transform); + } + }; + }; + + using GradientTransformNotificationBus = AZ::EBus; + } //namespace GradientSignal diff --git a/Gems/GradientSignal/Code/Include/GradientSignal/GradientSampler.h b/Gems/GradientSignal/Code/Include/GradientSignal/GradientSampler.h index c06265fb24..a2e1849590 100644 --- a/Gems/GradientSignal/Code/Include/GradientSignal/GradientSampler.h +++ b/Gems/GradientSignal/Code/Include/GradientSignal/GradientSampler.h @@ -33,6 +33,7 @@ namespace GradientSignal static void Reflect(AZ::ReflectContext* context); inline float GetValue(const GradientSampleParams& sampleParams) const; + inline void GetValues(AZStd::array_view positions, AZStd::array_view outValues) const; bool IsEntityInHierarchy(const AZ::EntityId& entityId) const; @@ -88,8 +89,6 @@ namespace GradientSignal inline float GradientSampler::GetValue(const GradientSampleParams& sampleParams) const { - AZ_PROFILE_FUNCTION(Entity); - if (m_opacity <= 0.0f || !m_gradientId.IsValid()) { return 0.0f; @@ -121,7 +120,7 @@ namespace GradientSignal if (m_isRequestInProgress) { - AZ_ErrorOnce("GradientSignal", !m_isRequestInProgress, "Detected cyclic dependences with gradient entity references"); + AZ_ErrorOnce("GradientSignal", !m_isRequestInProgress, "Detected cyclic dependencies with gradient entity references"); } else { @@ -147,4 +146,93 @@ namespace GradientSignal return output * m_opacity; } + + inline void GradientSampler::GetValues(AZStd::array_view positions, AZStd::array_view outValues) const + { + auto ClearOutputValues = [](AZStd::array_view outValues) + { + // If we don't have a valid gradient (or it is fully transparent), clear out all the output values. + for (size_t index = 0; index < outValues.size(); index++) + { + // The const_cast is necessary for now since array_view currently only supports const entries. + // If/when array_view is fixed to support non-const, or AZStd::span gets created, the const_cast can get removed. + auto& outValue = const_cast(outValues[index]); + outValue = 0.0f; + } + }; + + if (m_opacity <= 0.0f || !m_gradientId.IsValid()) + { + ClearOutputValues(outValues); + return; + } + + AZStd::vector transformedPositions; + bool useTransformedPositions = false; + + // apply transform if set + if (m_enableTransform && GradientSamplerUtil::AreTransformParamsSet(*this)) + { + AZ::Matrix3x4 matrix3x4; + matrix3x4.SetFromEulerDegrees(m_rotate); + matrix3x4.MultiplyByScale(m_scale); + matrix3x4.SetTranslation(m_translate); + + useTransformedPositions = true; + transformedPositions.resize(positions.size()); + for (size_t index = 0; index < positions.size(); index++) + { + transformedPositions[index] = matrix3x4 * positions[index]; + } + } + + { + // Block other threads from accessing the surface data bus while we are in GetValue (which may call into the SurfaceData bus). + // We lock our surface data mutex *before* checking / setting "isRequestInProgress" so that we prevent race conditions + // that create false detection of cyclic dependencies when multiple requests occur on different threads simultaneously. + // (One case where this was previously able to occur was in rapid updating of the Preview widget on the + // GradientSurfaceDataComponent in the Editor when moving the threshold sliders back and forth rapidly) + auto& surfaceDataContext = SurfaceData::SurfaceDataSystemRequestBus::GetOrCreateContext(false); + typename SurfaceData::SurfaceDataSystemRequestBus::Context::DispatchLockGuard scopeLock(surfaceDataContext.m_contextMutex); + + if (m_isRequestInProgress) + { + AZ_ErrorOnce("GradientSignal", !m_isRequestInProgress, "Detected cyclic dependencies with gradient entity references"); + ClearOutputValues(outValues); + return; + } + else + { + m_isRequestInProgress = true; + + GradientRequestBus::Event( + m_gradientId, &GradientRequestBus::Events::GetValues, useTransformedPositions ? transformedPositions : positions, + outValues); + + m_isRequestInProgress = false; + } + } + + // Perform any post-fetch transformations on the gradient values (invert, levels, opacity). + for (size_t index = 0; index < outValues.size(); index++) + { + // The const_cast is necessary for now since array_view currently only supports const entries. + // If/when array_view is fixed to support non-const, or AZStd::span gets created, the const_cast can get removed. + auto& outValue = const_cast(outValues[index]); + + if (m_invertInput) + { + outValue = 1.0f - outValue; + } + + // apply levels if set + if (m_enableLevels && GradientSamplerUtil::AreLevelParamsSet(*this)) + { + outValue = GetLevels(outValue, m_inputMid, m_inputMin, m_inputMax, m_outputMin, m_outputMax); + } + + outValue = outValue * m_opacity; + } + } + } diff --git a/Gems/GradientSignal/Code/Include/GradientSignal/GradientTransform.h b/Gems/GradientSignal/Code/Include/GradientSignal/GradientTransform.h new file mode 100644 index 0000000000..b191ea245a --- /dev/null +++ b/Gems/GradientSignal/Code/Include/GradientSignal/GradientTransform.h @@ -0,0 +1,155 @@ +/* + * Copyright (c) Contributors to the Open 3D Engine Project. + * For complete copyright and license terms please see the LICENSE at the root of this distribution. + * + * SPDX-License-Identifier: Apache-2.0 OR MIT + * + */ +#pragma once + +#include +#include +#include +#include +#include + +namespace GradientSignal +{ + //! Controls how the gradient repeats itself when queried outside the bounds of the shape. + enum class WrappingType : AZ::u8 + { + None = 0, //! Unbounded - the gradient ignores the shape bounds. + ClampToEdge, //! The values on the edge of the shape will be extended outward in each direction. + Mirror, //! The gradient signal will be repeated but mirrored on every repeat. + Repeat, //! The gradient signal will be repeated in every direction. + ClampToZero, //! The value will always be 0 outside of the shape. + }; + + class GradientTransform + { + public: + GradientTransform() = default; + + /** + * Create a GradientTransform with the given parameters. + * GradientTransform is a utility class that converts world space positions to gradient space UVW values which can be used + * to look up deterministic gradient values for the input spatial locations. + * \param shapeBounds The bounds of the shape associated with the gradient, in local space. + * \param transform The transform to use to convert from world space to gradient space. + * \param use3d True for 3D gradient lookup outputs, false for 2D gradient lookup outputs. (i.e. output W will be nonzero or zero) + * \param frequencyZoom Amount to scale the UVW results after wrapping is applied. + * \param wrappingType The way in which the gradient repeats itself outside the shape bounds. + */ + GradientTransform( + const AZ::Aabb& shapeBounds, + const AZ::Matrix3x4& transform, + bool use3d, + float frequencyZoom, + GradientSignal::WrappingType wrappingType); + + /** + * Checks to see if two GradientTransform instances are equivalent. + * Useful for being able to send out notifications when a GradientTransform has changed. + * \param rhs The second GradientTranform to compare against. + * \return True if they're equal, False if they aren't. + */ + bool operator==(const GradientTransform& rhs) const + { + return ( + (m_shapeBounds == rhs.m_shapeBounds) && + (m_inverseTransform == rhs.m_inverseTransform) && + (m_alwaysAcceptPoint == rhs.m_alwaysAcceptPoint) && + (m_frequencyZoom == rhs.m_frequencyZoom) && + (m_wrappingType == rhs.m_wrappingType) && + (m_normalizeExtentsReciprocal == rhs.m_normalizeExtentsReciprocal)); + } + + /** + * Checks to see if two GradientTransform instances aren't equivalent. + * Useful for being able to send out notifications when a GradientTransform has changed. + * \param rhs The second GradientTranform to compare against. + * \return True if they're not equal, False if they are. + */ + bool operator!=(const GradientTransform& rhs) const + { + return !(*this == rhs); + } + + + /** + * Transform the given world space position to a gradient space UVW lookup value. + * \param inPosition The input world space position to transform. + * \param outUVW [out] The UVW value that can be used to look up a deterministic gradient value. + * \param wasPointRejected [out] True if the input position doesn't have a gradient value, false if it does. + * Most gradients have values mapped to infinite world space, so wasPointRejected will almost always be false. + * It will only be true when using ClampToZero and the world space position falls outside the shape bounds. + */ + void TransformPositionToUVW(const AZ::Vector3& inPosition, AZ::Vector3& outUVW, bool& wasPointRejected) const; + + /** + * Transform the given world space position to a gradient space UVW lookup value and normalize to the shape bounds. + * "Normalizing" in this context means that regardless of the world space coordinates, (0,0,0) represents the minimum + * shape bounds corner, and (1,1,1) represents the maximum shape bounds corner. Depending on the wrapping type, it's possible + * (and even likely) to get values outside the 0-1 range. + * \param inPosition The input world space position to transform. + * \param outUVW [out] The UVW value that can be used to look up a deterministic gradient value. + * \param wasPointRejected [out] True if the input position doesn't have a gradient value, false if it does. + * Most gradients have values mapped to infinite world space, so wasPointRejected will almost always be false. + * It will only be true when using ClampToZero and the world space position falls outside the shape bounds. + */ + void TransformPositionToUVWNormalized(const AZ::Vector3& inPosition, AZ::Vector3& outUVW, bool& wasPointRejected) const; + + /** + * Epsilon value to allow our UVW range to go to [min, max) by using the range [min, max - epsilon]. + * To keep things behaving consistently between clamped and unbounded uv ranges, we want our clamped uvs to use a + * range of [min, max), so we'll actually clamp to [min, max - epsilon]. Since our floating-point numbers are likely in the + * -16384 to 16384 range, an epsilon of 0.001 will work without rounding to 0. + * (This constant is public so that it can be used from unit tests for validating transformation results) + */ + static constexpr float UvEpsilon = 0.001f; + + private: + + //! These are the various transformations that will be performed, based on wrapping type. + static AZ::Vector3 NoTransform(const AZ::Vector3& point, const AZ::Aabb& bounds); + static AZ::Vector3 GetUnboundedPointInAabb(const AZ::Vector3& point, const AZ::Aabb& bounds); + static AZ::Vector3 GetClampedPointInAabb(const AZ::Vector3& point, const AZ::Aabb& bounds); + static AZ::Vector3 GetMirroredPointInAabb(const AZ::Vector3& point, const AZ::Aabb& bounds); + static AZ::Vector3 GetRelativePointInAabb(const AZ::Vector3& point, const AZ::Aabb& bounds); + static AZ::Vector3 GetWrappedPointInAabb(const AZ::Vector3& point, const AZ::Aabb& bounds); + + //! The shape bounds are used for determining the wrapping bounds, and to normalize the UVW results into if requested. + AZ::Aabb m_shapeBounds = AZ::Aabb::CreateNull(); + + /** + * The relative transform to use for converting from world space to gradient space, stored as an inverse transform. + * We only ever need to use the inverse transform, so we compute it once and store it instead of keeping the original + * transform around. Note that the GradientTransformComponent has many options for choosing which relative space to use + * for the transform, so the transform passed in to this class might already have many modifications applied to it. + * The inverse transform will also get its 3rd row cleared out if "use3d" is false and we're only performing 2D gradient + * transformations, so that the W component of the UVW output will always be 0. + */ + AZ::Matrix3x4 m_inverseTransform = AZ::Matrix3x4::CreateIdentity(); + + /** + * Whether or not to always accept the input point as a valid output point. + * Most of the time, the gradient exists everywhere in world space, so we always accept the input point. + * The one exception is ClampToZero, which will return that the point is rejected if it falls outside the shape bounds. + */ + bool m_alwaysAcceptPoint = true; + + //! Apply a scale to the point *after* the wrapping is applied. + float m_frequencyZoom = 1.0f; + + //! How the gradient should repeat itself outside of the shape bounds. + WrappingType m_wrappingType = WrappingType::None; + + /** + * Cached reciprocal for performing an inverse lerp back to shape bounds. + * When normalizing the output UVW back into the shape bounds, we perform an inverse lerp. The inverse lerp + * equation is (point - min) * (1 / (max-min)), so we save off the (1 / (max-min)) term to avoid recalculating it on every point. + */ + AZ::Vector3 m_normalizeExtentsReciprocal = AZ::Vector3(1.0f); + }; + +} // namespace GradientSignal diff --git a/Gems/GradientSignal/Code/Include/GradientSignal/ImageAsset.h b/Gems/GradientSignal/Code/Include/GradientSignal/ImageAsset.h index f65702c36c..4ffab0b4b4 100644 --- a/Gems/GradientSignal/Code/Include/GradientSignal/ImageAsset.h +++ b/Gems/GradientSignal/Code/Include/GradientSignal/ImageAsset.h @@ -35,6 +35,13 @@ namespace GradientSignal static bool VersionConverter(AZ::SerializeContext& context, AZ::SerializeContext::DataElementNode& classElement); + ImageAsset() = default; + + ImageAsset(const AZ::Data::AssetId& assetId, AZ::Data::AssetData::AssetStatus status) + : AssetData(assetId, status) + { + } + AZ::u32 m_imageWidth = 0; AZ::u32 m_imageHeight = 0; AZ::u8 m_bytesPerPixel = 0; diff --git a/Gems/GradientSignal/Code/Include/GradientSignal/Util.h b/Gems/GradientSignal/Code/Include/GradientSignal/Util.h index 1e0ae79e08..fa1791c053 100644 --- a/Gems/GradientSignal/Code/Include/GradientSignal/Util.h +++ b/Gems/GradientSignal/Code/Include/GradientSignal/Util.h @@ -13,54 +13,10 @@ #include #include #include - -namespace LmbrCentral -{ - class MeshAsset; -} +#include namespace GradientSignal { - enum class WrappingType : AZ::u8 - { - None = 0, - ClampToEdge, - Mirror, - Repeat, - ClampToZero, - }; - - enum class TransformType : AZ::u8 - { - World_ThisEntity = 0, - Local_ThisEntity, - World_ReferenceEntity, - Local_ReferenceEntity, - World_Origin, - Relative, - }; - - AZ::Vector3 GetUnboundedPointInAabb(const AZ::Vector3& point, const AZ::Aabb& bounds); - AZ::Vector3 GetClampedPointInAabb(const AZ::Vector3& point, const AZ::Aabb& bounds); - AZ::Vector3 GetMirroredPointInAabb(const AZ::Vector3& point, const AZ::Aabb& bounds); - AZ::Vector3 GetRelativePointInAabb(const AZ::Vector3& point, const AZ::Aabb& bounds); - - inline AZ::Vector3 GetWrappedPointInAabb(const AZ::Vector3& point, const AZ::Aabb& bounds) - { - return AZ::Vector3( - AZ::Wrap(point.GetX(), bounds.GetMin().GetX(), bounds.GetMax().GetX()), - AZ::Wrap(point.GetY(), bounds.GetMin().GetY(), bounds.GetMax().GetY()), - AZ::Wrap(point.GetZ(), bounds.GetMin().GetZ(), bounds.GetMax().GetZ())); - } - - inline AZ::Vector3 GetNormalizedPointInAabb(const AZ::Vector3& point, const AZ::Aabb& bounds) - { - return AZ::Vector3( - AZ::LerpInverse(bounds.GetMin().GetX(), bounds.GetMax().GetX(), point.GetX()), - AZ::LerpInverse(bounds.GetMin().GetY(), bounds.GetMax().GetY(), point.GetY()), - AZ::LerpInverse(bounds.GetMin().GetZ(), bounds.GetMax().GetZ(), point.GetZ())); - } - inline void GetObbParamsFromShape(const AZ::EntityId& entity, AZ::Aabb& bounds, AZ::Matrix3x4& worldToBoundsTransform) { //get bound and transform data for associated shape @@ -120,4 +76,5 @@ namespace GradientSignal return AZ::Lerp(outputMin, outputMax, inputCorrected); } + } // namespace GradientSignal diff --git a/Gems/GradientSignal/Code/Source/Components/ConstantGradientComponent.cpp b/Gems/GradientSignal/Code/Source/Components/ConstantGradientComponent.cpp index 3bb27b00f3..86e8a5abc6 100644 --- a/Gems/GradientSignal/Code/Source/Components/ConstantGradientComponent.cpp +++ b/Gems/GradientSignal/Code/Source/Components/ConstantGradientComponent.cpp @@ -6,7 +6,7 @@ * */ -#include "ConstantGradientComponent.h" +#include #include #include #include diff --git a/Gems/GradientSignal/Code/Source/Components/DitherGradientComponent.cpp b/Gems/GradientSignal/Code/Source/Components/DitherGradientComponent.cpp index dbc2cd2827..c7845a41a6 100644 --- a/Gems/GradientSignal/Code/Source/Components/DitherGradientComponent.cpp +++ b/Gems/GradientSignal/Code/Source/Components/DitherGradientComponent.cpp @@ -6,7 +6,7 @@ * */ -#include "DitherGradientComponent.h" +#include #include #include #include diff --git a/Gems/GradientSignal/Code/Source/Components/GradientSurfaceDataComponent.cpp b/Gems/GradientSignal/Code/Source/Components/GradientSurfaceDataComponent.cpp index bdda0e48d2..5a0555fe33 100644 --- a/Gems/GradientSignal/Code/Source/Components/GradientSurfaceDataComponent.cpp +++ b/Gems/GradientSignal/Code/Source/Components/GradientSurfaceDataComponent.cpp @@ -6,7 +6,7 @@ * */ -#include "GradientSurfaceDataComponent.h" +#include #include #include #include diff --git a/Gems/GradientSignal/Code/Source/Components/GradientTransformComponent.cpp b/Gems/GradientSignal/Code/Source/Components/GradientTransformComponent.cpp index 38936dc302..67f073a178 100644 --- a/Gems/GradientSignal/Code/Source/Components/GradientTransformComponent.cpp +++ b/Gems/GradientSignal/Code/Source/Components/GradientTransformComponent.cpp @@ -6,7 +6,7 @@ * */ -#include "GradientTransformComponent.h" +#include #include #include #include @@ -276,24 +276,29 @@ namespace GradientSignal void GradientTransformComponent::Activate() { + m_dirty = false; + m_gradientTransform = GradientTransform(); + + // Update our GradientTransform to be configured correctly. We don't need to notify dependents of the change though. + // If anyone is listening, they're already getting notified below. + const bool notifyDependentsOfChange = false; + UpdateFromShape(notifyDependentsOfChange); + GradientTransformRequestBus::Handler::BusConnect(GetEntityId()); LmbrCentral::DependencyNotificationBus::Handler::BusConnect(GetEntityId()); AZ::TickBus::Handler::BusConnect(); GradientTransformModifierRequestBus::Handler::BusConnect(GetEntityId()); - m_dirty = false; - m_dependencyMonitor.Reset(); m_dependencyMonitor.ConnectOwner(GetEntityId()); m_dependencyMonitor.ConnectDependency(GetEntityId()); m_dependencyMonitor.ConnectDependency(GetShapeEntityId()); - - UpdateFromShape(); } void GradientTransformComponent::Deactivate() { m_dirty = false; + m_gradientTransform = GradientTransform(); m_dependencyMonitor.Reset(); GradientTransformRequestBus::Handler::BusDisconnect(); @@ -322,68 +327,10 @@ namespace GradientSignal return false; } - void GradientTransformComponent::TransformPositionToUVW(const AZ::Vector3& inPosition, AZ::Vector3& outUVW, const bool shouldNormalizeOutput, bool& wasPointRejected) const + const GradientTransform& GradientTransformComponent::GetGradientTransform() const { - AZ_PROFILE_FUNCTION(Entity); - AZStd::lock_guard lock(m_cacheMutex); - - //transforming coordinate into "local" relative space of shape bounds - outUVW = m_shapeTransformInverse * inPosition; - - if (!m_configuration.m_advancedMode || !m_configuration.m_is3d) - { - outUVW.SetZ(0.0f); - } - - wasPointRejected = false; - if (m_shapeBounds.IsValid()) - { - //all wrap types and transformations are applied after the coordinate is transformed into shape relative space - //this allows all calculations to be simplified and done using the shapes untransformed aabb - //outputting a value that can be used to sample a gradient in its local space - switch (m_configuration.m_wrappingType) - { - default: - case WrappingType::None: - outUVW = GetUnboundedPointInAabb(outUVW, m_shapeBounds); - break; - case WrappingType::ClampToEdge: - outUVW = GetClampedPointInAabb(outUVW, m_shapeBounds); - break; - case WrappingType::ClampToZero: - // We don't want to use m_shapeBounds.Contains() here because Contains() is inclusive on all edges. - // For uv consistency between clamped and unclamped states, we only want to accept uv ranges of [min, max), - // so we specifically need to exclude the max edges here. - wasPointRejected = !(outUVW.IsGreaterEqualThan(m_shapeBounds.GetMin()) && outUVW.IsLessThan(m_shapeBounds.GetMax())); - outUVW = GetClampedPointInAabb(outUVW, m_shapeBounds); - break; - case WrappingType::Mirror: - outUVW = GetMirroredPointInAabb(outUVW, m_shapeBounds); - break; - case WrappingType::Repeat: - outUVW = GetWrappedPointInAabb(outUVW, m_shapeBounds); - break; - } - } - - outUVW *= m_configuration.m_frequencyZoom; - - if (shouldNormalizeOutput) - { - outUVW = GetNormalizedPointInAabb(outUVW, m_shapeBounds); - } - } - - void GradientTransformComponent::GetGradientLocalBounds(AZ::Aabb& bounds) const - { - bounds = m_shapeBounds; - } - - void GradientTransformComponent::GetGradientEncompassingBounds(AZ::Aabb& bounds) const - { - bounds = m_shapeBounds; - bounds.ApplyMatrix3x4(m_shapeTransformInverse.GetInverseFull()); + return m_gradientTransform; } void GradientTransformComponent::OnCompositionChanged() @@ -395,25 +342,16 @@ namespace GradientSignal { if (m_dirty) { - const auto configurationOld = m_configuration; - const auto shapeBoundsOld = m_shapeBounds; - const auto shapeTransformInverseOld = m_shapeTransformInverse; + // Updating on tick to query transform bus on main thread. + // Also, if the GradientTransform configuration changes, notify listeners so they can refresh themselves. + const bool notifyDependentsOfChange = true; + UpdateFromShape(notifyDependentsOfChange); - //updating on tick to query transform bus on main thread - UpdateFromShape(); - - //notify observers if content has changed - if (configurationOld != m_configuration || - shapeBoundsOld != m_shapeBounds || - shapeTransformInverseOld != m_shapeTransformInverse) - { - LmbrCentral::DependencyNotificationBus::Event(GetEntityId(), &LmbrCentral::DependencyNotificationBus::Events::OnCompositionChanged); - } m_dirty = false; } } - void GradientTransformComponent::UpdateFromShape() + void GradientTransformComponent::UpdateFromShape(bool notifyDependentsOfChange) { AZ_PROFILE_FUNCTION(Entity); @@ -425,6 +363,10 @@ namespace GradientSignal return; } + const GradientTransform oldGradientTransform = m_gradientTransform; + AZ::Aabb shapeBounds = AZ::Aabb::CreateNull(); + AZ::Matrix3x4 shapeTransformInverse = AZ::Matrix3x4::CreateIdentity(); + AZ::Transform shapeTransform = AZ::Transform::CreateIdentity(); switch (m_configuration.m_transformType) { @@ -468,10 +410,10 @@ namespace GradientSignal if (!m_configuration.m_advancedMode || !m_configuration.m_overrideBounds) { // If we have a shape reference, grab its local space bounds and (inverse) transform into that local space - GetObbParamsFromShape(shapeReference, m_shapeBounds, m_shapeTransformInverse); - if (m_shapeBounds.IsValid()) + GetObbParamsFromShape(shapeReference, shapeBounds, shapeTransformInverse); + if (shapeBounds.IsValid()) { - m_configuration.m_bounds = m_shapeBounds.GetExtents(); + m_configuration.m_bounds = shapeBounds.GetExtents(); } } @@ -493,14 +435,34 @@ namespace GradientSignal //rebuild bounds from parameters m_configuration.m_bounds = m_configuration.m_bounds.GetAbs(); - m_shapeBounds = AZ::Aabb::CreateFromMinMax(-m_configuration.m_bounds * 0.5f, m_configuration.m_bounds * 0.5f); + shapeBounds = AZ::Aabb::CreateFromMinMax(-m_configuration.m_bounds * 0.5f, m_configuration.m_bounds * 0.5f); //rebuild transform from parameters AZ::Matrix3x4 shapeTransformFinal; shapeTransformFinal.SetFromEulerDegrees(m_configuration.m_rotate); shapeTransformFinal.SetTranslation(m_configuration.m_translate); shapeTransformFinal.MultiplyByScale(m_configuration.m_scale); - m_shapeTransformInverse = shapeTransformFinal.GetInverseFull(); + shapeTransformInverse = shapeTransformFinal.GetInverseFull(); + + // Set everything up on the Gradient Transform + const bool use3dGradients = m_configuration.m_advancedMode && m_configuration.m_is3d; + m_gradientTransform = GradientTransform( + shapeBounds, shapeTransformFinal, use3dGradients, m_configuration.m_frequencyZoom, m_configuration.m_wrappingType); + + // If the transform has changed, send out notifications. + if (oldGradientTransform != m_gradientTransform) + { + // Always notify on the GradientTransformNotificationBus. + GradientTransformNotificationBus::Event( + GetEntityId(), &GradientTransformNotificationBus::Events::OnGradientTransformChanged, m_gradientTransform); + + // Only notify the DependencyNotificationBus when requested by the caller. + if (notifyDependentsOfChange) + { + LmbrCentral::DependencyNotificationBus::Event( + GetEntityId(), &LmbrCentral::DependencyNotificationBus::Events::OnCompositionChanged); + } + } } AZ::EntityId GradientTransformComponent::GetShapeEntityId() const diff --git a/Gems/GradientSignal/Code/Source/Components/ImageGradientComponent.cpp b/Gems/GradientSignal/Code/Source/Components/ImageGradientComponent.cpp index 6fe8d32484..269bfbc2df 100644 --- a/Gems/GradientSignal/Code/Source/Components/ImageGradientComponent.cpp +++ b/Gems/GradientSignal/Code/Source/Components/ImageGradientComponent.cpp @@ -6,7 +6,7 @@ * */ -#include "ImageGradientComponent.h" +#include #include #include #include @@ -129,13 +129,16 @@ namespace GradientSignal void ImageGradientComponent::Activate() { + // This will immediately call OnGradientTransformChanged and initialize m_gradientTransform. + GradientTransformNotificationBus::Handler::BusConnect(GetEntityId()); + SetupDependencies(); ImageGradientRequestBus::Handler::BusConnect(GetEntityId()); GradientRequestBus::Handler::BusConnect(GetEntityId()); AZ::Data::AssetBus::Handler::BusConnect(m_configuration.m_imageAsset.GetId()); - AZStd::lock_guard imageLock(m_imageMutex); + AZStd::unique_lock imageLock(m_imageMutex); m_configuration.m_imageAsset.QueueLoad(); } @@ -144,10 +147,11 @@ namespace GradientSignal AZ::Data::AssetBus::Handler::BusDisconnect(); GradientRequestBus::Handler::BusDisconnect(); ImageGradientRequestBus::Handler::BusDisconnect(); + GradientTransformNotificationBus::Handler::BusDisconnect(); m_dependencyMonitor.Reset(); - AZStd::lock_guard imageLock(m_imageMutex); + AZStd::unique_lock imageLock(m_imageMutex); m_configuration.m_imageAsset.Release(); } @@ -173,37 +177,43 @@ namespace GradientSignal void ImageGradientComponent::OnAssetReady(AZ::Data::Asset asset) { - AZStd::lock_guard imageLock(m_imageMutex); + AZStd::unique_lock imageLock(m_imageMutex); m_configuration.m_imageAsset = asset; } void ImageGradientComponent::OnAssetMoved(AZ::Data::Asset asset, [[maybe_unused]] void* oldDataPointer) { - AZStd::lock_guard imageLock(m_imageMutex); + AZStd::unique_lock imageLock(m_imageMutex); m_configuration.m_imageAsset = asset; } void ImageGradientComponent::OnAssetReloaded(AZ::Data::Asset asset) { - AZStd::lock_guard imageLock(m_imageMutex); + AZStd::unique_lock imageLock(m_imageMutex); m_configuration.m_imageAsset = asset; } + void ImageGradientComponent::OnGradientTransformChanged(const GradientTransform& newTransform) + { + AZStd::unique_lock lock(m_imageMutex); + m_gradientTransform = newTransform; + } + float ImageGradientComponent::GetValue(const GradientSampleParams& sampleParams) const { - AZ_PROFILE_FUNCTION(Entity); - AZ::Vector3 uvw = sampleParams.m_position; - bool wasPointRejected = false; - const bool shouldNormalizeOutput = true; - GradientTransformRequestBus::Event( - GetEntityId(), &GradientTransformRequestBus::Events::TransformPositionToUVW, sampleParams.m_position, uvw, shouldNormalizeOutput, wasPointRejected); - if (!wasPointRejected) { - AZStd::lock_guard imageLock(m_imageMutex); - return GetValueFromImageAsset(m_configuration.m_imageAsset, uvw, m_configuration.m_tilingX, m_configuration.m_tilingY, 0.0f); + AZStd::shared_lock imageLock(m_imageMutex); + + m_gradientTransform.TransformPositionToUVWNormalized(sampleParams.m_position, uvw, wasPointRejected); + + if (!wasPointRejected) + { + return GetValueFromImageAsset( + m_configuration.m_imageAsset, uvw, m_configuration.m_tilingX, m_configuration.m_tilingY, 0.0f); + } } return 0.0f; @@ -225,7 +235,7 @@ namespace GradientSignal AZ::Data::AssetBus::Handler::BusDisconnect(m_configuration.m_imageAsset.GetId()); { - AZStd::lock_guard imageLock(m_imageMutex); + AZStd::unique_lock imageLock(m_imageMutex); m_configuration.m_imageAsset = AZ::Data::AssetManager::Instance().FindOrCreateAsset(assetId, azrtti_typeid(), m_configuration.m_imageAsset.GetAutoLoadBehavior()); } diff --git a/Gems/GradientSignal/Code/Source/Components/InvertGradientComponent.cpp b/Gems/GradientSignal/Code/Source/Components/InvertGradientComponent.cpp index 11ae5a67da..678f3b363c 100644 --- a/Gems/GradientSignal/Code/Source/Components/InvertGradientComponent.cpp +++ b/Gems/GradientSignal/Code/Source/Components/InvertGradientComponent.cpp @@ -6,7 +6,7 @@ * */ -#include "InvertGradientComponent.h" +#include #include #include #include diff --git a/Gems/GradientSignal/Code/Source/Components/LevelsGradientComponent.cpp b/Gems/GradientSignal/Code/Source/Components/LevelsGradientComponent.cpp index af26ba494d..b2958c590c 100644 --- a/Gems/GradientSignal/Code/Source/Components/LevelsGradientComponent.cpp +++ b/Gems/GradientSignal/Code/Source/Components/LevelsGradientComponent.cpp @@ -6,7 +6,7 @@ * */ -#include "LevelsGradientComponent.h" +#include #include #include #include diff --git a/Gems/GradientSignal/Code/Source/Components/MixedGradientComponent.cpp b/Gems/GradientSignal/Code/Source/Components/MixedGradientComponent.cpp index 5f6a18c7fb..e042188f8a 100644 --- a/Gems/GradientSignal/Code/Source/Components/MixedGradientComponent.cpp +++ b/Gems/GradientSignal/Code/Source/Components/MixedGradientComponent.cpp @@ -6,7 +6,7 @@ * */ -#include "MixedGradientComponent.h" +#include #include #include #include diff --git a/Gems/GradientSignal/Code/Source/Components/PerlinGradientComponent.cpp b/Gems/GradientSignal/Code/Source/Components/PerlinGradientComponent.cpp index e150ff4305..3096afa3dc 100644 --- a/Gems/GradientSignal/Code/Source/Components/PerlinGradientComponent.cpp +++ b/Gems/GradientSignal/Code/Source/Components/PerlinGradientComponent.cpp @@ -6,7 +6,7 @@ * */ -#include "PerlinGradientComponent.h" +#include #include #include #include @@ -138,6 +138,9 @@ namespace GradientSignal void PerlinGradientComponent::Activate() { + // This will immediately call OnGradientTransformChanged and initialize m_gradientTransform. + GradientTransformNotificationBus::Handler::BusConnect(GetEntityId()); + m_perlinImprovedNoise.reset(aznew PerlinImprovedNoise(AZ::GetMax(m_configuration.m_randomSeed, 1))); GradientRequestBus::Handler::BusConnect(GetEntityId()); PerlinGradientRequestBus::Handler::BusConnect(GetEntityId()); @@ -148,6 +151,7 @@ namespace GradientSignal m_perlinImprovedNoise.reset(); GradientRequestBus::Handler::BusDisconnect(); PerlinGradientRequestBus::Handler::BusDisconnect(); + GradientTransformNotificationBus::Handler::BusDisconnect(); } bool PerlinGradientComponent::ReadInConfig(const AZ::ComponentConfig* baseConfig) @@ -170,22 +174,29 @@ namespace GradientSignal return false; } + void PerlinGradientComponent::OnGradientTransformChanged(const GradientTransform& newTransform) + { + AZStd::unique_lock lock(m_transformMutex); + m_gradientTransform = newTransform; + } + float PerlinGradientComponent::GetValue(const GradientSampleParams& sampleParams) const { - AZ_PROFILE_FUNCTION(Entity); - if (m_perlinImprovedNoise) { AZ::Vector3 uvw = sampleParams.m_position; - bool wasPointRejected = false; - const bool shouldNormalizeOutput = false; - GradientTransformRequestBus::Event( - GetEntityId(), &GradientTransformRequestBus::Events::TransformPositionToUVW, sampleParams.m_position, uvw, shouldNormalizeOutput, wasPointRejected); + + { + AZStd::shared_lock lock(m_transformMutex); + m_gradientTransform.TransformPositionToUVW(sampleParams.m_position, uvw, wasPointRejected); + } if (!wasPointRejected) { - return m_perlinImprovedNoise->GenerateOctaveNoise(uvw.GetX(), uvw.GetY(), uvw.GetZ(), m_configuration.m_octave, m_configuration.m_amplitude, m_configuration.m_frequency); + return m_perlinImprovedNoise->GenerateOctaveNoise( + uvw.GetX(), uvw.GetY(), uvw.GetZ(), m_configuration.m_octave, m_configuration.m_amplitude, + m_configuration.m_frequency); } } diff --git a/Gems/GradientSignal/Code/Source/Components/PosterizeGradientComponent.cpp b/Gems/GradientSignal/Code/Source/Components/PosterizeGradientComponent.cpp index 89beb15f32..21d321df13 100644 --- a/Gems/GradientSignal/Code/Source/Components/PosterizeGradientComponent.cpp +++ b/Gems/GradientSignal/Code/Source/Components/PosterizeGradientComponent.cpp @@ -6,7 +6,7 @@ * */ -#include "PosterizeGradientComponent.h" +#include #include #include #include diff --git a/Gems/GradientSignal/Code/Source/Components/RandomGradientComponent.cpp b/Gems/GradientSignal/Code/Source/Components/RandomGradientComponent.cpp index d28fe13aff..1b6753560c 100644 --- a/Gems/GradientSignal/Code/Source/Components/RandomGradientComponent.cpp +++ b/Gems/GradientSignal/Code/Source/Components/RandomGradientComponent.cpp @@ -6,7 +6,7 @@ * */ -#include "RandomGradientComponent.h" +#include #include #include #include @@ -105,6 +105,9 @@ namespace GradientSignal void RandomGradientComponent::Activate() { + // This will immediately call OnGradientTransformChanged and initialize m_gradientTransform. + GradientTransformNotificationBus::Handler::BusConnect(GetEntityId()); + GradientRequestBus::Handler::BusConnect(GetEntityId()); RandomGradientRequestBus::Handler::BusConnect(GetEntityId()); } @@ -113,6 +116,7 @@ namespace GradientSignal { GradientRequestBus::Handler::BusDisconnect(); RandomGradientRequestBus::Handler::BusDisconnect(); + GradientTransformNotificationBus::Handler::BusDisconnect(); } bool RandomGradientComponent::ReadInConfig(const AZ::ComponentConfig* baseConfig) @@ -135,16 +139,22 @@ namespace GradientSignal return false; } + void RandomGradientComponent::OnGradientTransformChanged(const GradientTransform& newTransform) + { + AZStd::unique_lock lock(m_transformMutex); + m_gradientTransform = newTransform; + } + float RandomGradientComponent::GetValue(const GradientSampleParams& sampleParams) const { - AZ_PROFILE_FUNCTION(Entity); AZ::Vector3 uvw = sampleParams.m_position; - bool wasPointRejected = false; - const bool shouldNormalizeOutput = false; - GradientTransformRequestBus::Event( - GetEntityId(), &GradientTransformRequestBus::Events::TransformPositionToUVW, sampleParams.m_position, uvw, shouldNormalizeOutput, wasPointRejected); + + { + AZStd::shared_lock lock(m_transformMutex); + m_gradientTransform.TransformPositionToUVW(sampleParams.m_position, uvw, wasPointRejected); + } if (!wasPointRejected) { diff --git a/Gems/GradientSignal/Code/Source/Components/ReferenceGradientComponent.cpp b/Gems/GradientSignal/Code/Source/Components/ReferenceGradientComponent.cpp index 28ffaad7d3..ea304a7eed 100644 --- a/Gems/GradientSignal/Code/Source/Components/ReferenceGradientComponent.cpp +++ b/Gems/GradientSignal/Code/Source/Components/ReferenceGradientComponent.cpp @@ -6,7 +6,7 @@ * */ -#include "ReferenceGradientComponent.h" +#include #include #include #include diff --git a/Gems/GradientSignal/Code/Source/Components/ShapeAreaFalloffGradientComponent.cpp b/Gems/GradientSignal/Code/Source/Components/ShapeAreaFalloffGradientComponent.cpp index cdf542bf51..9e1a250900 100644 --- a/Gems/GradientSignal/Code/Source/Components/ShapeAreaFalloffGradientComponent.cpp +++ b/Gems/GradientSignal/Code/Source/Components/ShapeAreaFalloffGradientComponent.cpp @@ -6,7 +6,7 @@ * */ -#include "ShapeAreaFalloffGradientComponent.h" +#include #include #include #include diff --git a/Gems/GradientSignal/Code/Source/Components/SmoothStepGradientComponent.cpp b/Gems/GradientSignal/Code/Source/Components/SmoothStepGradientComponent.cpp index 13b641426b..510ed41510 100644 --- a/Gems/GradientSignal/Code/Source/Components/SmoothStepGradientComponent.cpp +++ b/Gems/GradientSignal/Code/Source/Components/SmoothStepGradientComponent.cpp @@ -6,7 +6,7 @@ * */ -#include "SmoothStepGradientComponent.h" +#include #include #include #include diff --git a/Gems/GradientSignal/Code/Source/Components/SurfaceAltitudeGradientComponent.cpp b/Gems/GradientSignal/Code/Source/Components/SurfaceAltitudeGradientComponent.cpp index 476e0971f4..8b36182750 100644 --- a/Gems/GradientSignal/Code/Source/Components/SurfaceAltitudeGradientComponent.cpp +++ b/Gems/GradientSignal/Code/Source/Components/SurfaceAltitudeGradientComponent.cpp @@ -6,7 +6,7 @@ * */ -#include "SurfaceAltitudeGradientComponent.h" +#include #include #include #include diff --git a/Gems/GradientSignal/Code/Source/Components/SurfaceMaskGradientComponent.cpp b/Gems/GradientSignal/Code/Source/Components/SurfaceMaskGradientComponent.cpp index 7f46ad6e98..df7a3f5787 100644 --- a/Gems/GradientSignal/Code/Source/Components/SurfaceMaskGradientComponent.cpp +++ b/Gems/GradientSignal/Code/Source/Components/SurfaceMaskGradientComponent.cpp @@ -6,7 +6,7 @@ * */ -#include "SurfaceMaskGradientComponent.h" +#include #include #include #include diff --git a/Gems/GradientSignal/Code/Source/Components/SurfaceSlopeGradientComponent.cpp b/Gems/GradientSignal/Code/Source/Components/SurfaceSlopeGradientComponent.cpp index 15b462f292..84e0b61a62 100644 --- a/Gems/GradientSignal/Code/Source/Components/SurfaceSlopeGradientComponent.cpp +++ b/Gems/GradientSignal/Code/Source/Components/SurfaceSlopeGradientComponent.cpp @@ -6,7 +6,7 @@ * */ -#include "SurfaceSlopeGradientComponent.h" +#include #include #include #include diff --git a/Gems/GradientSignal/Code/Source/Components/ThresholdGradientComponent.cpp b/Gems/GradientSignal/Code/Source/Components/ThresholdGradientComponent.cpp index 97acbb4441..a47ebdebe6 100644 --- a/Gems/GradientSignal/Code/Source/Components/ThresholdGradientComponent.cpp +++ b/Gems/GradientSignal/Code/Source/Components/ThresholdGradientComponent.cpp @@ -6,7 +6,7 @@ * */ -#include "ThresholdGradientComponent.h" +#include #include #include #include diff --git a/Gems/GradientSignal/Code/Source/Editor/EditorConstantGradientComponent.h b/Gems/GradientSignal/Code/Source/Editor/EditorConstantGradientComponent.h index 02a5d8ec33..87228671b3 100644 --- a/Gems/GradientSignal/Code/Source/Editor/EditorConstantGradientComponent.h +++ b/Gems/GradientSignal/Code/Source/Editor/EditorConstantGradientComponent.h @@ -9,7 +9,7 @@ #pragma once #include -#include +#include namespace GradientSignal { diff --git a/Gems/GradientSignal/Code/Source/Editor/EditorDitherGradientComponent.h b/Gems/GradientSignal/Code/Source/Editor/EditorDitherGradientComponent.h index 39ce4973c5..b01968eed6 100644 --- a/Gems/GradientSignal/Code/Source/Editor/EditorDitherGradientComponent.h +++ b/Gems/GradientSignal/Code/Source/Editor/EditorDitherGradientComponent.h @@ -9,7 +9,7 @@ #pragma once #include -#include +#include namespace GradientSignal { diff --git a/Gems/GradientSignal/Code/Source/Editor/EditorGradientSurfaceDataComponent.h b/Gems/GradientSignal/Code/Source/Editor/EditorGradientSurfaceDataComponent.h index 4c31283768..e79571e662 100644 --- a/Gems/GradientSignal/Code/Source/Editor/EditorGradientSurfaceDataComponent.h +++ b/Gems/GradientSignal/Code/Source/Editor/EditorGradientSurfaceDataComponent.h @@ -8,7 +8,7 @@ #pragma once -#include +#include #include #include diff --git a/Gems/GradientSignal/Code/Source/Editor/EditorGradientTransformComponent.cpp b/Gems/GradientSignal/Code/Source/Editor/EditorGradientTransformComponent.cpp index 4517c30711..850faf19df 100644 --- a/Gems/GradientSignal/Code/Source/Editor/EditorGradientTransformComponent.cpp +++ b/Gems/GradientSignal/Code/Source/Editor/EditorGradientTransformComponent.cpp @@ -55,9 +55,13 @@ namespace GradientSignal void EditorGradientTransformComponent::UpdateFromShape() { - // Update config from shape on game component, copy that back to our config - m_component.UpdateFromShape(); - m_component.WriteOutConfig(&m_configuration); - SetDirty(); + if (m_runtimeComponentActive) + { + // Update config from shape on game component, copy that back to our config. + bool notifyDependentsOfChange = true; + m_component.UpdateFromShape(notifyDependentsOfChange); + m_component.WriteOutConfig(&m_configuration); + SetDirty(); + } } } //namespace GradientSignal diff --git a/Gems/GradientSignal/Code/Source/Editor/EditorGradientTransformComponent.h b/Gems/GradientSignal/Code/Source/Editor/EditorGradientTransformComponent.h index 8478d3e434..d2e2dc38eb 100644 --- a/Gems/GradientSignal/Code/Source/Editor/EditorGradientTransformComponent.h +++ b/Gems/GradientSignal/Code/Source/Editor/EditorGradientTransformComponent.h @@ -8,7 +8,7 @@ #pragma once -#include +#include #include namespace GradientSignal diff --git a/Gems/GradientSignal/Code/Source/Editor/EditorImageGradientComponent.h b/Gems/GradientSignal/Code/Source/Editor/EditorImageGradientComponent.h index d1682be46f..f84766e73b 100644 --- a/Gems/GradientSignal/Code/Source/Editor/EditorImageGradientComponent.h +++ b/Gems/GradientSignal/Code/Source/Editor/EditorImageGradientComponent.h @@ -9,7 +9,7 @@ #pragma once #include -#include +#include namespace GradientSignal { diff --git a/Gems/GradientSignal/Code/Source/Editor/EditorInvertGradientComponent.h b/Gems/GradientSignal/Code/Source/Editor/EditorInvertGradientComponent.h index ab9c13679c..652ddc3279 100644 --- a/Gems/GradientSignal/Code/Source/Editor/EditorInvertGradientComponent.h +++ b/Gems/GradientSignal/Code/Source/Editor/EditorInvertGradientComponent.h @@ -9,7 +9,7 @@ #pragma once #include -#include +#include namespace GradientSignal { diff --git a/Gems/GradientSignal/Code/Source/Editor/EditorLevelsGradientComponent.h b/Gems/GradientSignal/Code/Source/Editor/EditorLevelsGradientComponent.h index a2626d9a0a..b43f9bbb73 100644 --- a/Gems/GradientSignal/Code/Source/Editor/EditorLevelsGradientComponent.h +++ b/Gems/GradientSignal/Code/Source/Editor/EditorLevelsGradientComponent.h @@ -9,7 +9,7 @@ #pragma once #include -#include +#include namespace GradientSignal { diff --git a/Gems/GradientSignal/Code/Source/Editor/EditorMixedGradientComponent.h b/Gems/GradientSignal/Code/Source/Editor/EditorMixedGradientComponent.h index 837c64e6d8..c2ca707014 100644 --- a/Gems/GradientSignal/Code/Source/Editor/EditorMixedGradientComponent.h +++ b/Gems/GradientSignal/Code/Source/Editor/EditorMixedGradientComponent.h @@ -9,7 +9,7 @@ #pragma once #include -#include +#include namespace GradientSignal { diff --git a/Gems/GradientSignal/Code/Source/Editor/EditorPerlinGradientComponent.h b/Gems/GradientSignal/Code/Source/Editor/EditorPerlinGradientComponent.h index 4ef09ee3e4..1c39cf8faa 100644 --- a/Gems/GradientSignal/Code/Source/Editor/EditorPerlinGradientComponent.h +++ b/Gems/GradientSignal/Code/Source/Editor/EditorPerlinGradientComponent.h @@ -10,7 +10,7 @@ #include #include -#include +#include namespace GradientSignal { diff --git a/Gems/GradientSignal/Code/Source/Editor/EditorPosterizeGradientComponent.h b/Gems/GradientSignal/Code/Source/Editor/EditorPosterizeGradientComponent.h index af85429b32..0078e2865f 100644 --- a/Gems/GradientSignal/Code/Source/Editor/EditorPosterizeGradientComponent.h +++ b/Gems/GradientSignal/Code/Source/Editor/EditorPosterizeGradientComponent.h @@ -9,7 +9,7 @@ #pragma once #include -#include +#include namespace GradientSignal { diff --git a/Gems/GradientSignal/Code/Source/Editor/EditorRandomGradientComponent.h b/Gems/GradientSignal/Code/Source/Editor/EditorRandomGradientComponent.h index 750e5bae4f..f5f9daee0a 100644 --- a/Gems/GradientSignal/Code/Source/Editor/EditorRandomGradientComponent.h +++ b/Gems/GradientSignal/Code/Source/Editor/EditorRandomGradientComponent.h @@ -12,7 +12,7 @@ #include #include #include -#include +#include namespace GradientSignal { diff --git a/Gems/GradientSignal/Code/Source/Editor/EditorReferenceGradientComponent.h b/Gems/GradientSignal/Code/Source/Editor/EditorReferenceGradientComponent.h index 41eccf27e4..bf29b270bd 100644 --- a/Gems/GradientSignal/Code/Source/Editor/EditorReferenceGradientComponent.h +++ b/Gems/GradientSignal/Code/Source/Editor/EditorReferenceGradientComponent.h @@ -9,7 +9,7 @@ #pragma once #include -#include +#include namespace GradientSignal { diff --git a/Gems/GradientSignal/Code/Source/Editor/EditorShapeAreaFalloffGradientComponent.h b/Gems/GradientSignal/Code/Source/Editor/EditorShapeAreaFalloffGradientComponent.h index d8d7c052ce..7772dfe7c5 100644 --- a/Gems/GradientSignal/Code/Source/Editor/EditorShapeAreaFalloffGradientComponent.h +++ b/Gems/GradientSignal/Code/Source/Editor/EditorShapeAreaFalloffGradientComponent.h @@ -9,7 +9,7 @@ #pragma once #include -#include +#include namespace GradientSignal { diff --git a/Gems/GradientSignal/Code/Source/Editor/EditorSmoothStepGradientComponent.h b/Gems/GradientSignal/Code/Source/Editor/EditorSmoothStepGradientComponent.h index 864a419985..4a43920a6c 100644 --- a/Gems/GradientSignal/Code/Source/Editor/EditorSmoothStepGradientComponent.h +++ b/Gems/GradientSignal/Code/Source/Editor/EditorSmoothStepGradientComponent.h @@ -9,7 +9,7 @@ #pragma once #include -#include +#include namespace GradientSignal { diff --git a/Gems/GradientSignal/Code/Source/Editor/EditorSurfaceAltitudeGradientComponent.h b/Gems/GradientSignal/Code/Source/Editor/EditorSurfaceAltitudeGradientComponent.h index b334bb149d..f40176a9f5 100644 --- a/Gems/GradientSignal/Code/Source/Editor/EditorSurfaceAltitudeGradientComponent.h +++ b/Gems/GradientSignal/Code/Source/Editor/EditorSurfaceAltitudeGradientComponent.h @@ -9,7 +9,7 @@ #pragma once #include -#include +#include namespace GradientSignal { diff --git a/Gems/GradientSignal/Code/Source/Editor/EditorSurfaceMaskGradientComponent.h b/Gems/GradientSignal/Code/Source/Editor/EditorSurfaceMaskGradientComponent.h index 5df17a2699..9e71526541 100644 --- a/Gems/GradientSignal/Code/Source/Editor/EditorSurfaceMaskGradientComponent.h +++ b/Gems/GradientSignal/Code/Source/Editor/EditorSurfaceMaskGradientComponent.h @@ -9,7 +9,7 @@ #pragma once #include -#include +#include namespace GradientSignal { diff --git a/Gems/GradientSignal/Code/Source/Editor/EditorSurfaceSlopeGradientComponent.h b/Gems/GradientSignal/Code/Source/Editor/EditorSurfaceSlopeGradientComponent.h index ad1adb98f9..20daa662a9 100644 --- a/Gems/GradientSignal/Code/Source/Editor/EditorSurfaceSlopeGradientComponent.h +++ b/Gems/GradientSignal/Code/Source/Editor/EditorSurfaceSlopeGradientComponent.h @@ -9,7 +9,7 @@ #pragma once #include -#include +#include namespace GradientSignal { diff --git a/Gems/GradientSignal/Code/Source/Editor/EditorThresholdGradientComponent.h b/Gems/GradientSignal/Code/Source/Editor/EditorThresholdGradientComponent.h index 0291e65fd8..cbeb626c5e 100644 --- a/Gems/GradientSignal/Code/Source/Editor/EditorThresholdGradientComponent.h +++ b/Gems/GradientSignal/Code/Source/Editor/EditorThresholdGradientComponent.h @@ -9,7 +9,7 @@ #pragma once #include -#include +#include namespace GradientSignal { diff --git a/Gems/GradientSignal/Code/Source/GradientSignalModule.cpp b/Gems/GradientSignal/Code/Source/GradientSignalModule.cpp index 9986e62b34..eeaeae00dd 100644 --- a/Gems/GradientSignal/Code/Source/GradientSignalModule.cpp +++ b/Gems/GradientSignal/Code/Source/GradientSignalModule.cpp @@ -9,24 +9,24 @@ #include #include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include namespace GradientSignal { diff --git a/Gems/GradientSignal/Code/Source/GradientTransform.cpp b/Gems/GradientSignal/Code/Source/GradientTransform.cpp new file mode 100644 index 0000000000..ffaa8f7e6a --- /dev/null +++ b/Gems/GradientSignal/Code/Source/GradientTransform.cpp @@ -0,0 +1,167 @@ +/* + * Copyright (c) Contributors to the Open 3D Engine Project. + * For complete copyright and license terms please see the LICENSE at the root of this distribution. + * + * SPDX-License-Identifier: Apache-2.0 OR MIT + * + */ + + +#include +#include + + +namespace GradientSignal +{ + GradientTransform::GradientTransform( + const AZ::Aabb& shapeBounds, const AZ::Matrix3x4& transform, bool use3d, + float frequencyZoom, GradientSignal::WrappingType wrappingType) + : m_shapeBounds(shapeBounds) + , m_inverseTransform(transform.GetInverseFull()) + , m_frequencyZoom(frequencyZoom) + , m_wrappingType(wrappingType) + , m_alwaysAcceptPoint(true) + { + // If we want this to be a 2D gradient lookup, we always want to set the W result in the output to 0. + // The easiest / cheapest way to make this happen is just to clear out the third row in the inverseTransform. + if (!use3d) + { + m_inverseTransform.SetRow(2, AZ::Vector4::CreateZero()); + } + + // If we have invalid shape bounds, reset the wrapping type back to None. Wrapping won't work without valid bounds. + if (!m_shapeBounds.IsValid()) + { + m_wrappingType = WrappingType::None; + } + + // ClampToZero is the only wrapping type that allows us to return a "pointIsRejected" result for points that fall + // outside the shape bounds. + if (m_wrappingType == WrappingType::ClampToZero) + { + m_alwaysAcceptPoint = false; + } + + m_normalizeExtentsReciprocal = AZ::Vector3( + AZ::IsClose(0.0f, m_shapeBounds.GetXExtent()) ? 0.0f : (1.0f / m_shapeBounds.GetXExtent()), + AZ::IsClose(0.0f, m_shapeBounds.GetYExtent()) ? 0.0f : (1.0f / m_shapeBounds.GetYExtent()), + AZ::IsClose(0.0f, m_shapeBounds.GetZExtent()) ? 0.0f : (1.0f / m_shapeBounds.GetZExtent())); + } + + void GradientTransform::TransformPositionToUVW(const AZ::Vector3& inPosition, AZ::Vector3& outUVW, bool& wasPointRejected) const + { + // Transform coordinate into "local" relative space of shape bounds, and set W to 0 if this is a 2D gradient. + outUVW = m_inverseTransform * inPosition; + + // For most wrapping types, we always accept the point, but for ClampToZero we only accept it if it's within + // the shape bounds. We don't use m_shapeBounds.Contains() here because Contains() is inclusive on all edges. + // For uv consistency between clamped and unclamped states, we only want to accept uv ranges of [min, max), + // so we specifically need to exclude the max edges here. + bool wasPointAccepted = m_alwaysAcceptPoint || + (outUVW.IsGreaterEqualThan(m_shapeBounds.GetMin()) && outUVW.IsLessThan(m_shapeBounds.GetMax())); + wasPointRejected = !wasPointAccepted; + + switch (m_wrappingType) + { + default: + case WrappingType::None: + outUVW = GetUnboundedPointInAabb(outUVW, m_shapeBounds); + break; + case WrappingType::ClampToEdge: + outUVW = GetClampedPointInAabb(outUVW, m_shapeBounds); + break; + case WrappingType::ClampToZero: + outUVW = GetClampedPointInAabb(outUVW, m_shapeBounds); + break; + case WrappingType::Mirror: + outUVW = GetMirroredPointInAabb(outUVW, m_shapeBounds); + break; + case WrappingType::Repeat: + outUVW = GetWrappedPointInAabb(outUVW, m_shapeBounds); + break; + } + + outUVW *= m_frequencyZoom; + } + + void GradientTransform::TransformPositionToUVWNormalized(const AZ::Vector3& inPosition, AZ::Vector3& outUVW, bool& wasPointRejected) const + { + TransformPositionToUVW(inPosition, outUVW, wasPointRejected); + + // This effectively does AZ::LerpInverse(bounds.GetMin(), bounds.GetMax(), point) if shouldNormalize is true, + // and just returns outUVW if shouldNormalize is false. + outUVW = m_normalizeExtentsReciprocal * (outUVW - m_shapeBounds.GetMin()); + } + + AZ::Vector3 GradientTransform::NoTransform(const AZ::Vector3& point, const AZ::Aabb& /*bounds*/) + { + return point; + } + + AZ::Vector3 GradientTransform::GetUnboundedPointInAabb(const AZ::Vector3& point, const AZ::Aabb& /*bounds*/) + { + return point; + } + + AZ::Vector3 GradientTransform::GetClampedPointInAabb(const AZ::Vector3& point, const AZ::Aabb& bounds) + { + // We want the clamped sampling states to clamp uvs to the [min, max) range. + return point.GetClamp(bounds.GetMin(), bounds.GetMax() - AZ::Vector3(UvEpsilon)); + } + + AZ::Vector3 GradientTransform::GetWrappedPointInAabb(const AZ::Vector3& point, const AZ::Aabb& bounds) + { + return AZ::Vector3( + AZ::Wrap(point.GetX(), bounds.GetMin().GetX(), bounds.GetMax().GetX()), + AZ::Wrap(point.GetY(), bounds.GetMin().GetY(), bounds.GetMax().GetY()), + AZ::Wrap(point.GetZ(), bounds.GetMin().GetZ(), bounds.GetMax().GetZ())); + } + + AZ::Vector3 GradientTransform::GetMirroredPointInAabb(const AZ::Vector3& point, const AZ::Aabb& bounds) + { + /* For mirroring, we want to produce the following pattern: + * [min, max) : value + * [max, min) : max - value - epsilon + * [min, max) : value + * [max, min) : max - value - epsilon + * ... + * The epsilon is because we always want to keep our output values in the [min, max) range. We apply the epsilon to all + * the mirrored values so that we get consistent spacing between the values. + */ + + auto GetMirror = [](float value, float min, float max) -> float + { + // To calculate the mirror value, we move our value into relative space of [0, rangeX2), then use + // the first half of the range for our "[min, max)" range, and the second half for our "[max, min)" mirrored range. + + float relativeValue = value - min; + float range = max - min; + float rangeX2 = range * 2.0f; + + // A positive relativeValue will produce a value of [0, rangeX2) from a single mod, but a negative relativeValue + // will produce a value of (-rangeX2, 0]. Adding rangeX2 to the result and taking the mod again puts us back in + // the range of [0, rangeX2) for both negative and positive values. This keeps our mirroring pattern consistent and + // unbroken across both negative and positive coordinate space. + relativeValue = AZ::Mod(AZ::Mod(relativeValue, rangeX2) + rangeX2, rangeX2); + + // [range, rangeX2) is our mirrored range, so flip the value when we're in this range and apply the epsilon so that + // we never return the max value, and so that our mirrored values have consistent spacing in the results. + if (relativeValue >= range) + { + relativeValue = rangeX2 - (relativeValue + UvEpsilon); + } + + return relativeValue + min; + }; + + return AZ::Vector3( + GetMirror(point.GetX(), bounds.GetMin().GetX(), bounds.GetMax().GetX()), + GetMirror(point.GetY(), bounds.GetMin().GetY(), bounds.GetMax().GetY()), + GetMirror(point.GetZ(), bounds.GetMin().GetZ(), bounds.GetMax().GetZ())); + } + + AZ::Vector3 GradientTransform::GetRelativePointInAabb(const AZ::Vector3& point, const AZ::Aabb& bounds) + { + return point - bounds.GetMin(); + } +} diff --git a/Gems/GradientSignal/Code/Source/ImageAsset.cpp b/Gems/GradientSignal/Code/Source/ImageAsset.cpp index c67f86c6b8..7e73dc32d6 100644 --- a/Gems/GradientSignal/Code/Source/ImageAsset.cpp +++ b/Gems/GradientSignal/Code/Source/ImageAsset.cpp @@ -153,8 +153,6 @@ namespace GradientSignal float GetValueFromImageAsset(const AZ::Data::Asset& imageAsset, const AZ::Vector3& uvw, float tilingX, float tilingY, float defaultValue) { - AZ_PROFILE_FUNCTION(Entity); - if (imageAsset.IsReady()) { const auto& image = imageAsset.Get(); diff --git a/Gems/GradientSignal/Code/Source/Util.cpp b/Gems/GradientSignal/Code/Source/Util.cpp deleted file mode 100644 index d9ebf36aec..0000000000 --- a/Gems/GradientSignal/Code/Source/Util.cpp +++ /dev/null @@ -1,77 +0,0 @@ -/* - * Copyright (c) Contributors to the Open 3D Engine Project. - * For complete copyright and license terms please see the LICENSE at the root of this distribution. - * - * SPDX-License-Identifier: Apache-2.0 OR MIT - * - */ - - -#include -#include -#include -#include -#include - - -namespace GradientSignal -{ - // To keep things behaving consistently between clamped and unbounded uv ranges, we - // we want our clamped uvs to use a range of [min, max), so we'll actually clamp to - // [min, max - epsilon]. Since our floating-point numbers are likely in the - // -16384 to 16384 range, an epsilon of 0.001 will work without rounding to 0. - static const float uvEpsilon = 0.001f; - - AZ::Vector3 GetUnboundedPointInAabb(const AZ::Vector3& point, const AZ::Aabb& /*bounds*/) - { - return point; - } - - AZ::Vector3 GetClampedPointInAabb(const AZ::Vector3& point, const AZ::Aabb& bounds) - { - // We want the clamped sampling states to clamp uvs to the [min, max) range. - return AZ::Vector3( - AZ::GetClamp(point.GetX(), bounds.GetMin().GetX(), bounds.GetMax().GetX() - uvEpsilon), - AZ::GetClamp(point.GetY(), bounds.GetMin().GetY(), bounds.GetMax().GetY() - uvEpsilon), - AZ::GetClamp(point.GetZ(), bounds.GetMin().GetZ(), bounds.GetMax().GetZ() - uvEpsilon)); - } - - float GetMirror(float value, float min, float max) - { - float relativeValue = value - min; - float range = max - min; - float rangeX2 = range * 2.0f; - if (relativeValue < 0.0) - { - relativeValue = rangeX2 - fmod(-relativeValue, rangeX2); - } - else - { - relativeValue = fmod(relativeValue, rangeX2); - } - if (relativeValue >= range) - { - // Since we want our uv range to stay in the [min, max) range, - // it means that for mirroring, we want both the "forward" values - // and the "mirrored" values to be in [0, range). We don't want - // relativeValue == range, so we shift relativeValue by a small epsilon - // in the mirrored case. - relativeValue = rangeX2 - (relativeValue + uvEpsilon); - } - - return relativeValue + min; - } - - AZ::Vector3 GetMirroredPointInAabb(const AZ::Vector3& point, const AZ::Aabb& bounds) - { - return AZ::Vector3( - GetMirror(point.GetX(), bounds.GetMin().GetX(), bounds.GetMax().GetX()), - GetMirror(point.GetY(), bounds.GetMin().GetY(), bounds.GetMax().GetY()), - GetMirror(point.GetZ(), bounds.GetMin().GetZ(), bounds.GetMax().GetZ())); - } - - AZ::Vector3 GetRelativePointInAabb(const AZ::Vector3& point, const AZ::Aabb& bounds) - { - return point - bounds.GetMin(); - } -} diff --git a/Gems/GradientSignal/Code/Tests/EditorGradientSignalPreviewTests.cpp b/Gems/GradientSignal/Code/Tests/EditorGradientSignalPreviewTests.cpp index 7e98aa1361..e8bd9f2dff 100644 --- a/Gems/GradientSignal/Code/Tests/EditorGradientSignalPreviewTests.cpp +++ b/Gems/GradientSignal/Code/Tests/EditorGradientSignalPreviewTests.cpp @@ -6,7 +6,7 @@ * */ -#include "Tests/GradientSignalTestMocks.h" +#include #include #include @@ -28,7 +28,6 @@ namespace UnitTest void SetUp() override { GradientSignalTest::SetUp(); - AZ::AllocatorInstance::Create(); // Set up job manager with two threads so that we can run and test the preview job logic. AZ::JobManagerDesc desc; @@ -46,7 +45,6 @@ namespace UnitTest delete m_jobContext; delete m_jobManager; - AZ::AllocatorInstance::Destroy(); GradientSignalTest::TearDown(); } diff --git a/Gems/GradientSignal/Code/Tests/GradientSignalBenchmarks.cpp b/Gems/GradientSignal/Code/Tests/GradientSignalBenchmarks.cpp new file mode 100644 index 0000000000..bd4ccf5205 --- /dev/null +++ b/Gems/GradientSignal/Code/Tests/GradientSignalBenchmarks.cpp @@ -0,0 +1,352 @@ +/* + * Copyright (c) Contributors to the Open 3D Engine Project. + * For complete copyright and license terms please see the LICENSE at the root of this distribution. + * + * SPDX-License-Identifier: Apache-2.0 OR MIT + * + */ + +#ifdef HAVE_BENCHMARK + +#include + +#include +#include +#include +#include +#include + +namespace UnitTest +{ + class GradientGetValues : public GradientSignalBenchmarkFixture + { + public: + // We use an enum to list out the different types of GetValue() benchmarks to run so that way we can condense our test cases + // to just take the value in as a benchmark argument and switch on it. Otherwise, we would need to write a different benchmark + // function for each test case for each gradient. + enum GetValuePermutation : int64_t + { + EBUS_GET_VALUE, + EBUS_GET_VALUES, + SAMPLER_GET_VALUE, + SAMPLER_GET_VALUES, + }; + + // Create an arbitrary size shape for creating our gradients for benchmark runs. + const float TestShapeHalfBounds = 128.0f; + + void FillQueryPositions(AZStd::vector& positions, float height, float width) + { + size_t index = 0; + for (float y = 0.0f; y < height; y += 1.0f) + { + for (float x = 0.0f; x < width; x += 1.0f) + { + positions[index++] = AZ::Vector3(x, y, 0.0f); + } + } + } + + void RunEBusGetValueBenchmark(benchmark::State& state, const AZ::EntityId& gradientId, int64_t queryRange) + { + AZ_PROFILE_FUNCTION(Entity); + + GradientSignal::GradientSampleParams params; + + // Get the height and width ranges for querying from our benchmark parameters + const float height = aznumeric_cast(queryRange); + const float width = aznumeric_cast(queryRange); + + // Call GetValue() on the EBus for every height and width in our ranges. + for (auto _ : state) + { + for (float y = 0.0f; y < height; y += 1.0f) + { + for (float x = 0.0f; x < width; x += 1.0f) + { + float value = 0.0f; + params.m_position = AZ::Vector3(x, y, 0.0f); + GradientSignal::GradientRequestBus::EventResult( + value, gradientId, &GradientSignal::GradientRequestBus::Events::GetValue, params); + benchmark::DoNotOptimize(value); + } + } + } + } + + void RunEBusGetValuesBenchmark(benchmark::State& state, const AZ::EntityId& gradientId, int64_t queryRange) + { + AZ_PROFILE_FUNCTION(Entity); + + // Get the height and width ranges for querying from our benchmark parameters + float height = aznumeric_cast(queryRange); + float width = aznumeric_cast(queryRange); + int64_t totalQueryPoints = queryRange * queryRange; + + // Call GetValues() for every height and width in our ranges. + for (auto _ : state) + { + // Set up our vector of query positions. This is done inside the benchmark timing since we're counting the work to create + // each query position in the single GetValue() call benchmarks, and will make the timing more directly comparable. + AZStd::vector positions(totalQueryPoints); + FillQueryPositions(positions, height, width); + + // Query and get the results. + AZStd::vector results(totalQueryPoints); + GradientSignal::GradientRequestBus::Event( + gradientId, &GradientSignal::GradientRequestBus::Events::GetValues, positions, results); + } + } + + void RunSamplerGetValueBenchmark(benchmark::State& state, const AZ::EntityId& gradientId, int64_t queryRange) + { + AZ_PROFILE_FUNCTION(Entity); + + // Create a gradient sampler to use for querying our gradient. + GradientSignal::GradientSampler gradientSampler; + gradientSampler.m_gradientId = gradientId; + + // Get the height and width ranges for querying from our benchmark parameters + const float height = aznumeric_cast(queryRange); + const float width = aznumeric_cast(queryRange); + + // Call GetValue() through the GradientSampler for every height and width in our ranges. + for (auto _ : state) + { + for (float y = 0.0f; y < height; y += 1.0f) + { + for (float x = 0.0f; x < width; x += 1.0f) + { + GradientSignal::GradientSampleParams params; + params.m_position = AZ::Vector3(x, y, 0.0f); + float value = gradientSampler.GetValue(params); + benchmark::DoNotOptimize(value); + } + } + } + } + + void RunSamplerGetValuesBenchmark(benchmark::State& state, const AZ::EntityId& gradientId, int64_t queryRange) + { + AZ_PROFILE_FUNCTION(Entity); + + // Create a gradient sampler to use for querying our gradient. + GradientSignal::GradientSampler gradientSampler; + gradientSampler.m_gradientId = gradientId; + + // Get the height and width ranges for querying from our benchmark parameters + const float height = aznumeric_cast(queryRange); + const float width = aznumeric_cast(queryRange); + const int64_t totalQueryPoints = queryRange * queryRange; + + // Call GetValues() through the GradientSampler for every height and width in our ranges. + for (auto _ : state) + { + // Set up our vector of query positions. This is done inside the benchmark timing since we're counting the work to create + // each query position in the single GetValue() call benchmarks, and will make the timing more directly comparable. + AZStd::vector positions(totalQueryPoints); + FillQueryPositions(positions, height, width); + + // Query and get the results. + AZStd::vector results(totalQueryPoints); + gradientSampler.GetValues(positions, results); + } + } + + void RunGetValueOrGetValuesBenchmark(benchmark::State& state, const AZ::EntityId& gradientId) + { + switch (state.range(0)) + { + case GetValuePermutation::EBUS_GET_VALUE: + RunEBusGetValueBenchmark(state, gradientId, state.range(1)); + break; + case GetValuePermutation::EBUS_GET_VALUES: + RunEBusGetValuesBenchmark(state, gradientId, state.range(1)); + break; + case GetValuePermutation::SAMPLER_GET_VALUE: + RunSamplerGetValueBenchmark(state, gradientId, state.range(1)); + break; + case GetValuePermutation::SAMPLER_GET_VALUES: + RunSamplerGetValuesBenchmark(state, gradientId, state.range(1)); + break; + default: + AZ_Assert(false, "Benchmark permutation type not supported."); + } + } + }; + +// Because there's no good way to label different enums in the output results (they just appear as integer values), we work around it by +// registering one set of benchmark runs for each enum value and use ArgNames() to give it a friendly name in the results. +#define GRADIENT_SIGNAL_GET_VALUES_BENCHMARK_REGISTER_F(Fixture, Func) \ + BENCHMARK_REGISTER_F(Fixture, Func) \ + ->Args({ GradientGetValues::GetValuePermutation::EBUS_GET_VALUE, 1024 }) \ + ->Args({ GradientGetValues::GetValuePermutation::EBUS_GET_VALUE, 2048 }) \ + ->Args({ GradientGetValues::GetValuePermutation::EBUS_GET_VALUE, 4096 }) \ + ->ArgNames({ "EbusGetValue", "size" }) \ + ->Unit(::benchmark::kMillisecond); \ + BENCHMARK_REGISTER_F(Fixture, Func) \ + ->Args({ GradientGetValues::GetValuePermutation::EBUS_GET_VALUES, 1024 }) \ + ->Args({ GradientGetValues::GetValuePermutation::EBUS_GET_VALUES, 2048 }) \ + ->Args({ GradientGetValues::GetValuePermutation::EBUS_GET_VALUES, 4096 }) \ + ->ArgNames({ "EbusGetValues", "size" }) \ + ->Unit(::benchmark::kMillisecond); \ + BENCHMARK_REGISTER_F(Fixture, Func) \ + ->Args({ GradientGetValues::GetValuePermutation::SAMPLER_GET_VALUE, 1024 }) \ + ->Args({ GradientGetValues::GetValuePermutation::SAMPLER_GET_VALUE, 2048 }) \ + ->Args({ GradientGetValues::GetValuePermutation::SAMPLER_GET_VALUE, 4096 }) \ + ->ArgNames({ "SamplerGetValue", "size" }) \ + ->Unit(::benchmark::kMillisecond); \ + BENCHMARK_REGISTER_F(Fixture, Func) \ + ->Args({ GradientGetValues::GetValuePermutation::SAMPLER_GET_VALUES, 1024 }) \ + ->Args({ GradientGetValues::GetValuePermutation::SAMPLER_GET_VALUES, 2048 }) \ + ->Args({ GradientGetValues::GetValuePermutation::SAMPLER_GET_VALUES, 4096 }) \ + ->ArgNames({ "SamplerGetValues", "size" }) \ + ->Unit(::benchmark::kMillisecond); + + // -------------------------------------------------------------------------------------- + // Base Gradients + + BENCHMARK_DEFINE_F(GradientGetValues, BM_ConstantGradient)(benchmark::State& state) + { + auto entity = BuildTestConstantGradient(TestShapeHalfBounds); + RunGetValueOrGetValuesBenchmark(state, entity->GetId()); + } + + BENCHMARK_DEFINE_F(GradientGetValues, BM_ImageGradient)(benchmark::State& state) + { + auto entity = BuildTestImageGradient(TestShapeHalfBounds); + RunGetValueOrGetValuesBenchmark(state, entity->GetId()); + } + + + BENCHMARK_DEFINE_F(GradientGetValues, BM_PerlinGradient)(benchmark::State& state) + { + auto entity = BuildTestPerlinGradient(TestShapeHalfBounds); + RunGetValueOrGetValuesBenchmark(state, entity->GetId()); + } + + BENCHMARK_DEFINE_F(GradientGetValues, BM_RandomGradient)(benchmark::State& state) + { + auto entity = BuildTestRandomGradient(TestShapeHalfBounds); + RunGetValueOrGetValuesBenchmark(state, entity->GetId()); + } + + BENCHMARK_DEFINE_F(GradientGetValues, BM_ShapeAreaFalloffGradient)(benchmark::State& state) + { + auto entity = BuildTestShapeAreaFalloffGradient(TestShapeHalfBounds); + RunGetValueOrGetValuesBenchmark(state, entity->GetId()); + } + + GRADIENT_SIGNAL_GET_VALUES_BENCHMARK_REGISTER_F(GradientGetValues, BM_ConstantGradient); + GRADIENT_SIGNAL_GET_VALUES_BENCHMARK_REGISTER_F(GradientGetValues, BM_ImageGradient); + GRADIENT_SIGNAL_GET_VALUES_BENCHMARK_REGISTER_F(GradientGetValues, BM_PerlinGradient); + GRADIENT_SIGNAL_GET_VALUES_BENCHMARK_REGISTER_F(GradientGetValues, BM_RandomGradient); + GRADIENT_SIGNAL_GET_VALUES_BENCHMARK_REGISTER_F(GradientGetValues, BM_ShapeAreaFalloffGradient); + + // -------------------------------------------------------------------------------------- + // Gradient Modifiers + + BENCHMARK_DEFINE_F(GradientGetValues, BM_DitherGradient)(benchmark::State& state) + { + auto baseEntity = BuildTestRandomGradient(TestShapeHalfBounds); + auto entity = BuildTestDitherGradient(TestShapeHalfBounds, baseEntity->GetId()); + RunGetValueOrGetValuesBenchmark(state, entity->GetId()); + } + + BENCHMARK_DEFINE_F(GradientGetValues, BM_InvertGradient)(benchmark::State& state) + { + auto baseEntity = BuildTestRandomGradient(TestShapeHalfBounds); + auto entity = BuildTestDitherGradient(TestShapeHalfBounds, baseEntity->GetId()); + RunGetValueOrGetValuesBenchmark(state, entity->GetId()); + } + + BENCHMARK_DEFINE_F(GradientGetValues, BM_LevelsGradient)(benchmark::State& state) + { + auto baseEntity = BuildTestRandomGradient(TestShapeHalfBounds); + auto entity = BuildTestLevelsGradient(TestShapeHalfBounds, baseEntity->GetId()); + RunGetValueOrGetValuesBenchmark(state, entity->GetId()); + } + + BENCHMARK_DEFINE_F(GradientGetValues, BM_MixedGradient)(benchmark::State& state) + { + auto baseEntity = BuildTestRandomGradient(TestShapeHalfBounds); + auto mixedEntity = BuildTestConstantGradient(TestShapeHalfBounds); + auto entity = BuildTestMixedGradient(TestShapeHalfBounds, baseEntity->GetId(), mixedEntity->GetId()); + RunGetValueOrGetValuesBenchmark(state, entity->GetId()); + } + + BENCHMARK_DEFINE_F(GradientGetValues, BM_PosterizeGradient)(benchmark::State& state) + { + auto baseEntity = BuildTestRandomGradient(TestShapeHalfBounds); + auto entity = BuildTestPosterizeGradient(TestShapeHalfBounds, baseEntity->GetId()); + RunGetValueOrGetValuesBenchmark(state, entity->GetId()); + } + + BENCHMARK_DEFINE_F(GradientGetValues, BM_ReferenceGradient)(benchmark::State& state) + { + auto baseEntity = BuildTestRandomGradient(TestShapeHalfBounds); + auto entity = BuildTestReferenceGradient(TestShapeHalfBounds, baseEntity->GetId()); + RunGetValueOrGetValuesBenchmark(state, entity->GetId()); + } + + BENCHMARK_DEFINE_F(GradientGetValues, BM_SmoothStepGradient)(benchmark::State& state) + { + auto baseEntity = BuildTestRandomGradient(TestShapeHalfBounds); + auto entity = BuildTestSmoothStepGradient(TestShapeHalfBounds, baseEntity->GetId()); + RunGetValueOrGetValuesBenchmark(state, entity->GetId()); + } + + BENCHMARK_DEFINE_F(GradientGetValues, BM_ThresholdGradient)(benchmark::State& state) + { + auto baseEntity = BuildTestRandomGradient(TestShapeHalfBounds); + auto entity = BuildTestThresholdGradient(TestShapeHalfBounds, baseEntity->GetId()); + RunGetValueOrGetValuesBenchmark(state, entity->GetId()); + } + + GRADIENT_SIGNAL_GET_VALUES_BENCHMARK_REGISTER_F(GradientGetValues, BM_DitherGradient); + GRADIENT_SIGNAL_GET_VALUES_BENCHMARK_REGISTER_F(GradientGetValues, BM_InvertGradient); + GRADIENT_SIGNAL_GET_VALUES_BENCHMARK_REGISTER_F(GradientGetValues, BM_LevelsGradient); + GRADIENT_SIGNAL_GET_VALUES_BENCHMARK_REGISTER_F(GradientGetValues, BM_MixedGradient); + GRADIENT_SIGNAL_GET_VALUES_BENCHMARK_REGISTER_F(GradientGetValues, BM_PosterizeGradient); + GRADIENT_SIGNAL_GET_VALUES_BENCHMARK_REGISTER_F(GradientGetValues, BM_ReferenceGradient); + GRADIENT_SIGNAL_GET_VALUES_BENCHMARK_REGISTER_F(GradientGetValues, BM_SmoothStepGradient); + GRADIENT_SIGNAL_GET_VALUES_BENCHMARK_REGISTER_F(GradientGetValues, BM_ThresholdGradient); + + // -------------------------------------------------------------------------------------- + // Surface Gradients + + BENCHMARK_DEFINE_F(GradientGetValues, BM_SurfaceAltitudeGradient)(benchmark::State& state) + { + auto mockSurfaceDataSystem = + CreateMockSurfaceDataSystem(AZ::Aabb::CreateFromMinMax(AZ::Vector3(-TestShapeHalfBounds), AZ::Vector3(TestShapeHalfBounds))); + + auto entity = BuildTestSurfaceAltitudeGradient(TestShapeHalfBounds); + RunGetValueOrGetValuesBenchmark(state, entity->GetId()); + } + + BENCHMARK_DEFINE_F(GradientGetValues, BM_SurfaceMaskGradient)(benchmark::State& state) + { + auto mockSurfaceDataSystem = + CreateMockSurfaceDataSystem(AZ::Aabb::CreateFromMinMax(AZ::Vector3(-TestShapeHalfBounds), AZ::Vector3(TestShapeHalfBounds))); + + auto entity = BuildTestSurfaceMaskGradient(TestShapeHalfBounds); + RunGetValueOrGetValuesBenchmark(state, entity->GetId()); + } + + BENCHMARK_DEFINE_F(GradientGetValues, BM_SurfaceSlopeGradient)(benchmark::State& state) + { + auto mockSurfaceDataSystem = + CreateMockSurfaceDataSystem(AZ::Aabb::CreateFromMinMax(AZ::Vector3(-TestShapeHalfBounds), AZ::Vector3(TestShapeHalfBounds))); + + auto entity = BuildTestSurfaceSlopeGradient(TestShapeHalfBounds); + RunGetValueOrGetValuesBenchmark(state, entity->GetId()); + } + + GRADIENT_SIGNAL_GET_VALUES_BENCHMARK_REGISTER_F(GradientGetValues, BM_SurfaceAltitudeGradient); + GRADIENT_SIGNAL_GET_VALUES_BENCHMARK_REGISTER_F(GradientGetValues, BM_SurfaceMaskGradient); + GRADIENT_SIGNAL_GET_VALUES_BENCHMARK_REGISTER_F(GradientGetValues, BM_SurfaceSlopeGradient); + +#endif +} + + diff --git a/Gems/GradientSignal/Code/Tests/GradientSignalGetValuesTests.cpp b/Gems/GradientSignal/Code/Tests/GradientSignalGetValuesTests.cpp new file mode 100644 index 0000000000..5504fa5b45 --- /dev/null +++ b/Gems/GradientSignal/Code/Tests/GradientSignalGetValuesTests.cpp @@ -0,0 +1,182 @@ +/* + * Copyright (c) Contributors to the Open 3D Engine Project. + * For complete copyright and license terms please see the LICENSE at the root of this distribution. + * + * SPDX-License-Identifier: Apache-2.0 OR MIT + * + */ + + +#include +#include + +namespace UnitTest +{ + struct GradientSignalGetValuesTestsFixture + : public GradientSignalTest + { + // Create an arbitrary size shape for comparing values within. It should be large enough that we detect any value anomalies + // but small enough that the tests run quickly. + const float TestShapeHalfBounds = 128.0f; + + void CompareGetValueAndGetValues(AZ::EntityId gradientEntityId) + { + // Create a gradient sampler and run through a series of points to see if they match expectations. + + const AZ::Aabb queryRegion = AZ::Aabb::CreateFromMinMax(AZ::Vector3(-TestShapeHalfBounds), AZ::Vector3(TestShapeHalfBounds)); + const AZ::Vector2 stepSize(1.0f, 1.0f); + + GradientSignal::GradientSampler gradientSampler; + gradientSampler.m_gradientId = gradientEntityId; + + const size_t numSamplesX = aznumeric_cast(ceil(queryRegion.GetExtents().GetX() / stepSize.GetX())); + const size_t numSamplesY = aznumeric_cast(ceil(queryRegion.GetExtents().GetY() / stepSize.GetY())); + + // Build up the list of positions to query. + AZStd::vector positions(numSamplesX * numSamplesY); + size_t index = 0; + for (size_t yIndex = 0; yIndex < numSamplesY; yIndex++) + { + float y = queryRegion.GetMin().GetY() + (stepSize.GetY() * yIndex); + for (size_t xIndex = 0; xIndex < numSamplesX; xIndex++) + { + float x = queryRegion.GetMin().GetX() + (stepSize.GetX() * xIndex); + positions[index++] = AZ::Vector3(x, y, 0.0f); + } + } + + // Get the results from GetValues + AZStd::vector results(numSamplesX * numSamplesY); + gradientSampler.GetValues(positions, results); + + // For each position, call GetValue and verify that the values match. + for (size_t positionIndex = 0; positionIndex < positions.size(); positionIndex++) + { + GradientSignal::GradientSampleParams params; + params.m_position = positions[positionIndex]; + float value = gradientSampler.GetValue(params); + + // We use ASSERT_EQ instead of EXPECT_EQ because if one value doesn't match, they probably all won't, so there's no reason + // to keep running and printing failures for every value. + ASSERT_EQ(value, results[positionIndex]); + } + } + }; + + TEST_F(GradientSignalGetValuesTestsFixture, ImageGradientComponent_VerifyGetValueAndGetValuesMatch) + { + auto entity = BuildTestImageGradient(TestShapeHalfBounds); + CompareGetValueAndGetValues(entity->GetId()); + } + + TEST_F(GradientSignalGetValuesTestsFixture, PerlinGradientComponent_VerifyGetValueAndGetValuesMatch) + { + auto entity = BuildTestPerlinGradient(TestShapeHalfBounds); + CompareGetValueAndGetValues(entity->GetId()); + } + + TEST_F(GradientSignalGetValuesTestsFixture, RandomGradientComponent_VerifyGetValueAndGetValuesMatch) + { + auto entity = BuildTestRandomGradient(TestShapeHalfBounds); + CompareGetValueAndGetValues(entity->GetId()); + } + + TEST_F(GradientSignalGetValuesTestsFixture, ConstantGradientComponent_VerifyGetValueAndGetValuesMatch) + { + auto entity = BuildTestConstantGradient(TestShapeHalfBounds); + CompareGetValueAndGetValues(entity->GetId()); + } + + TEST_F(GradientSignalGetValuesTestsFixture, ShapeAreaFalloffGradientComponent_VerifyGetValueAndGetValuesMatch) + { + auto entity = BuildTestShapeAreaFalloffGradient(TestShapeHalfBounds); + CompareGetValueAndGetValues(entity->GetId()); + } + + TEST_F(GradientSignalGetValuesTestsFixture, DitherGradientComponent_VerifyGetValueAndGetValuesMatch) + { + auto baseEntity = BuildTestRandomGradient(TestShapeHalfBounds); + + auto entity = BuildTestDitherGradient(TestShapeHalfBounds, baseEntity->GetId()); + CompareGetValueAndGetValues(entity->GetId()); + } + + TEST_F(GradientSignalGetValuesTestsFixture, InvertGradientComponent_VerifyGetValueAndGetValuesMatch) + { + auto baseEntity = BuildTestRandomGradient(TestShapeHalfBounds); + auto entity = BuildTestInvertGradient(TestShapeHalfBounds, baseEntity->GetId()); + CompareGetValueAndGetValues(entity->GetId()); + } + + TEST_F(GradientSignalGetValuesTestsFixture, LevelsGradientComponent_VerifyGetValueAndGetValuesMatch) + { + auto baseEntity = BuildTestRandomGradient(TestShapeHalfBounds); + auto entity = BuildTestLevelsGradient(TestShapeHalfBounds, baseEntity->GetId()); + CompareGetValueAndGetValues(entity->GetId()); + } + + TEST_F(GradientSignalGetValuesTestsFixture, MixedGradientComponent_VerifyGetValueAndGetValuesMatch) + { + auto baseEntity = BuildTestRandomGradient(TestShapeHalfBounds); + auto mixedEntity = BuildTestConstantGradient(TestShapeHalfBounds); + auto entity = BuildTestMixedGradient(TestShapeHalfBounds, baseEntity->GetId(), mixedEntity->GetId()); + CompareGetValueAndGetValues(entity->GetId()); + } + + TEST_F(GradientSignalGetValuesTestsFixture, PosterizeGradientComponent_VerifyGetValueAndGetValuesMatch) + { + auto baseEntity = BuildTestRandomGradient(TestShapeHalfBounds); + auto entity = BuildTestPosterizeGradient(TestShapeHalfBounds, baseEntity->GetId()); + CompareGetValueAndGetValues(entity->GetId()); + } + + TEST_F(GradientSignalGetValuesTestsFixture, ReferenceGradientComponent_VerifyGetValueAndGetValuesMatch) + { + auto baseEntity = BuildTestRandomGradient(TestShapeHalfBounds); + auto entity = BuildTestReferenceGradient(TestShapeHalfBounds, baseEntity->GetId()); + CompareGetValueAndGetValues(entity->GetId()); + } + + TEST_F(GradientSignalGetValuesTestsFixture, SmoothStepGradientComponent_VerifyGetValueAndGetValuesMatch) + { + auto baseEntity = BuildTestRandomGradient(TestShapeHalfBounds); + auto entity = BuildTestSmoothStepGradient(TestShapeHalfBounds, baseEntity->GetId()); + CompareGetValueAndGetValues(entity->GetId()); + } + + TEST_F(GradientSignalGetValuesTestsFixture, ThresholdGradientComponent_VerifyGetValueAndGetValuesMatch) + { + auto baseEntity = BuildTestRandomGradient(TestShapeHalfBounds); + auto entity = BuildTestThresholdGradient(TestShapeHalfBounds, baseEntity->GetId()); + CompareGetValueAndGetValues(entity->GetId()); + } + + TEST_F(GradientSignalGetValuesTestsFixture, SurfaceAltitudeGradientComponent_VerifyGetValueAndGetValuesMatch) + { + auto mockSurfaceDataSystem = + CreateMockSurfaceDataSystem(AZ::Aabb::CreateFromMinMax(AZ::Vector3(-TestShapeHalfBounds), AZ::Vector3(TestShapeHalfBounds))); + + auto entity = BuildTestSurfaceAltitudeGradient(TestShapeHalfBounds); + CompareGetValueAndGetValues(entity->GetId()); + } + + TEST_F(GradientSignalGetValuesTestsFixture, SurfaceMaskGradientComponent_VerifyGetValueAndGetValuesMatch) + { + auto mockSurfaceDataSystem = + CreateMockSurfaceDataSystem(AZ::Aabb::CreateFromMinMax(AZ::Vector3(-TestShapeHalfBounds), AZ::Vector3(TestShapeHalfBounds))); + + auto entity = BuildTestSurfaceMaskGradient(TestShapeHalfBounds); + CompareGetValueAndGetValues(entity->GetId()); + } + + TEST_F(GradientSignalGetValuesTestsFixture, SurfaceSlopeGradientComponent_VerifyGetValueAndGetValuesMatch) + { + auto mockSurfaceDataSystem = + CreateMockSurfaceDataSystem(AZ::Aabb::CreateFromMinMax(AZ::Vector3(-TestShapeHalfBounds), AZ::Vector3(TestShapeHalfBounds))); + + auto entity = BuildTestSurfaceSlopeGradient(TestShapeHalfBounds); + CompareGetValueAndGetValues(entity->GetId()); + } +} + + diff --git a/Gems/GradientSignal/Code/Tests/GradientSignalImageTests.cpp b/Gems/GradientSignal/Code/Tests/GradientSignalImageTests.cpp index 4c22afac76..5cd3c7edf6 100644 --- a/Gems/GradientSignal/Code/Tests/GradientSignalImageTests.cpp +++ b/Gems/GradientSignal/Code/Tests/GradientSignalImageTests.cpp @@ -7,7 +7,7 @@ */ -#include "Tests/GradientSignalTestMocks.h" +#include #include #include @@ -15,77 +15,14 @@ #include #include -#include -#include +#include +#include namespace UnitTest { struct GradientSignalImageTestsFixture : public GradientSignalTest { - struct MockAssetHandler - : public AZ::Data::AssetHandler - { - AZ::Data::AssetPtr CreateAsset([[maybe_unused]] const AZ::Data::AssetId& id, [[maybe_unused]] const AZ::Data::AssetType& type) override - { - return AZ::Data::AssetPtr(); - } - - void DestroyAsset(AZ::Data::AssetPtr ptr) override - { - if (ptr) - { - delete ptr; - } - } - - void GetHandledAssetTypes([[maybe_unused]] AZStd::vector& assetTypes) override - { - } - - AZ::Data::AssetHandler::LoadResult LoadAssetData( - [[maybe_unused]] const AZ::Data::Asset& asset, - [[maybe_unused]] AZStd::shared_ptr stream, - [[maybe_unused]] const AZ::Data::AssetFilterCB& assetLoadFilterCB) override - { - return AZ::Data::AssetHandler::LoadResult::LoadComplete; - } - - }; - - MockAssetHandler* m_mockHandler = nullptr; - GradientSignal::ImageAsset* m_imageData = nullptr; - - void SetUp() override - { - GradientSignalTest::SetUp(); - AZ::AllocatorInstance::Create(); - AZ::Data::AssetManager::Descriptor desc; - AZ::Data::AssetManager::Create(desc); - m_mockHandler = new MockAssetHandler(); - AZ::Data::AssetManager::Instance().RegisterHandler(m_mockHandler, azrtti_typeid()); - } - - void TearDown() override - { - AZ::Data::AssetManager::Instance().UnregisterHandler(m_mockHandler); - delete m_mockHandler; // delete after removing from the asset manager - AzFramework::LegacyAssetEventBus::ClearQueuedEvents(); - AZ::Data::AssetManager::Destroy(); - AZ::AllocatorInstance::Destroy(); - GradientSignalTest::TearDown(); - } - - struct AssignIdToAsset - : public AZ::Data::AssetData - { - void MakeReady() - { - m_assetId = AZ::Data::AssetId(AZ::Uuid::CreateRandom()); - m_status.store(AZ::Data::AssetData::AssetStatus::Ready); - } - }; - struct PixelTestSetup { // How to create the source image @@ -105,61 +42,6 @@ namespace UnitTest static const AZ::Vector2 EndOfList; }; - AZ::Data::Asset CreateImageAsset(AZ::u32 width, AZ::u32 height, AZ::s32 seed) - { - m_imageData = aznew GradientSignal::ImageAsset(); - m_imageData->m_imageWidth = width; - m_imageData->m_imageHeight = height; - m_imageData->m_bytesPerPixel = 1; - m_imageData->m_imageFormat = ImageProcessingAtom::EPixelFormat::ePixelFormat_R8; - - size_t value = 0; - AZStd::hash_combine(value, seed); - - for (AZ::u32 x = 0; x < width; ++x) - { - for (AZ::u32 y = 0; y < height; ++y) - { - AZStd::hash_combine(value, x); - AZStd::hash_combine(value, y); - m_imageData->m_imageData.push_back(static_cast(value)); - } - } - - reinterpret_cast(m_imageData)->MakeReady(); - return AZ::Data::Asset(m_imageData, AZ::Data::AssetLoadBehavior::Default); - } - - AZ::Data::Asset CreateSpecificPixelImageAsset(AZ::u32 width, AZ::u32 height, AZ::u32 pixelX, AZ::u32 pixelY) - { - m_imageData = aznew GradientSignal::ImageAsset(); - m_imageData->m_imageWidth = width; - m_imageData->m_imageHeight = height; - m_imageData->m_bytesPerPixel = 1; - m_imageData->m_imageFormat = ImageProcessingAtom::EPixelFormat::ePixelFormat_R8; - - const AZ::u8 pixelValue = 255; - - // Image data should be stored inverted on the y axis relative to our engine, so loop backwards through y. - for (int y = static_cast(height) - 1; y >= 0; --y) - { - for (AZ::u32 x = 0; x < width; ++x) - { - if ((x == static_cast(pixelX)) && (y == static_cast(pixelY))) - { - m_imageData->m_imageData.push_back(pixelValue); - } - else - { - m_imageData->m_imageData.push_back(0); - } - } - } - - reinterpret_cast(m_imageData)->MakeReady(); - return AZ::Data::Asset(m_imageData, AZ::Data::AssetLoadBehavior::Default); - } - void TestPixels(GradientSignal::GradientSampler& sampler, AZ::u32 width, AZ::u32 height, float stepSize, const AZStd::vector& expectedPoints) { AZStd::vector foundPoints; @@ -203,7 +85,8 @@ namespace UnitTest // Create the Image Gradient Component. GradientSignal::ImageGradientConfig config; - config.m_imageAsset = CreateSpecificPixelImageAsset(test.m_imageSize, test.m_imageSize, static_cast(test.m_pixel.GetX()), static_cast(test.m_pixel.GetY())); + config.m_imageAsset = ImageAssetMockAssetHandler::CreateSpecificPixelImageAsset( + test.m_imageSize, test.m_imageSize, static_cast(test.m_pixel.GetX()), static_cast(test.m_pixel.GetY())); config.m_tilingX = test.m_tiling; config.m_tilingY = test.m_tiling; CreateComponent(entity.get(), config); @@ -495,7 +378,7 @@ namespace UnitTest // Create an ImageGradient with a 3x3 asset with the center pixel set. GradientSignal::ImageGradientConfig gradientConfig; - gradientConfig.m_imageAsset = CreateSpecificPixelImageAsset(3, 3, 1, 1); + gradientConfig.m_imageAsset = ImageAssetMockAssetHandler::CreateSpecificPixelImageAsset(3, 3, 1, 1); CreateComponent(entity.get(), gradientConfig); // Create the test GradientTransform @@ -534,7 +417,6 @@ namespace UnitTest TestFixedDataSampler(expectedOutput, dataSize, entity->GetId()); } } - } diff --git a/Gems/GradientSignal/Code/Tests/GradientSignalReferencesTests.cpp b/Gems/GradientSignal/Code/Tests/GradientSignalReferencesTests.cpp index 25a1aa28bb..cc91c58fce 100644 --- a/Gems/GradientSignal/Code/Tests/GradientSignalReferencesTests.cpp +++ b/Gems/GradientSignal/Code/Tests/GradientSignalReferencesTests.cpp @@ -10,18 +10,18 @@ #include #include #include -#include "Tests/GradientSignalTestMocks.h" +#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include namespace UnitTest { @@ -371,12 +371,9 @@ namespace UnitTest const AZ::EntityId id = mockReference->GetId(); MockGradientArrayRequestsBus mockGradientRequestsBus(id, inputData, dataSize); - GradientSignal::ReferenceGradientConfig config; - config.m_gradientSampler.m_gradientId = mockReference->GetId(); - - auto entity = CreateEntity(); - CreateComponent(entity.get(), config); - ActivateEntity(entity.get()); + // Create a reference gradient with an arbitrary box shape on it. + const float HalfBounds = 64.0f; + auto entity = BuildTestReferenceGradient(HalfBounds, mockReference->GetId()); TestFixedDataSampler(expectedOutput, dataSize, entity->GetId()); } @@ -385,10 +382,9 @@ namespace UnitTest { // Verify that gradient references can validate and disconnect cyclic connections - auto constantGradientEntity = CreateEntity(); - GradientSignal::ConstantGradientConfig constantGradientConfig; - CreateComponent(constantGradientEntity.get(), constantGradientConfig); - ActivateEntity(constantGradientEntity.get()); + // Create a constant gradient with an arbitrary box shape on it. + const float HalfBounds = 64.0f; + auto constantGradientEntity = BuildTestConstantGradient(HalfBounds); // Verify cyclic reference test passes when pointing to gradient generator entity auto referenceGradientEntity1 = CreateEntity(); diff --git a/Gems/GradientSignal/Code/Tests/GradientSignalServicesTests.cpp b/Gems/GradientSignal/Code/Tests/GradientSignalServicesTests.cpp index b8c0f85cf3..ec770f038d 100644 --- a/Gems/GradientSignal/Code/Tests/GradientSignalServicesTests.cpp +++ b/Gems/GradientSignal/Code/Tests/GradientSignalServicesTests.cpp @@ -6,13 +6,13 @@ * */ -#include "Tests/GradientSignalTestMocks.h" +#include #include -#include -#include -#include +#include +#include +#include namespace UnitTest { @@ -212,12 +212,9 @@ namespace UnitTest const AZ::EntityId id = entityMock->GetId(); UnitTest::MockGradientArrayRequestsBus mockGradientRequestsBus(id, inputData, dataSize); - GradientSignal::InvertGradientConfig config; - config.m_gradientSampler.m_gradientId = entityMock->GetId(); - - auto entity = CreateEntity(); - CreateComponent(entity.get(), config); - ActivateEntity(entity.get()); + // Create the entity with an arbitrarily-sized box. + const float HalfBounds = 64.0f; + auto entity = BuildTestInvertGradient(HalfBounds, entityMock->GetId()); TestFixedDataSampler(expectedOutput, dataSize, entity->GetId()); } diff --git a/Gems/GradientSignal/Code/Tests/GradientSignalSurfaceTests.cpp b/Gems/GradientSignal/Code/Tests/GradientSignalSurfaceTests.cpp index 809bbf2fe6..702965c0de 100644 --- a/Gems/GradientSignal/Code/Tests/GradientSignalSurfaceTests.cpp +++ b/Gems/GradientSignal/Code/Tests/GradientSignalSurfaceTests.cpp @@ -9,10 +9,10 @@ #include #include #include -#include "Tests/GradientSignalTestMocks.h" +#include -#include -#include +#include +#include namespace UnitTest { diff --git a/Gems/GradientSignal/Code/Tests/GradientSignalTest.cpp b/Gems/GradientSignal/Code/Tests/GradientSignalTest.cpp index 11407d6be5..adc35e6738 100644 --- a/Gems/GradientSignal/Code/Tests/GradientSignalTest.cpp +++ b/Gems/GradientSignal/Code/Tests/GradientSignalTest.cpp @@ -7,17 +7,17 @@ */ -#include "Tests/GradientSignalTestMocks.h" +#include #include #include -#include -#include -#include -#include -#include -#include -#include +#include +#include +#include +#include +#include +#include +#include namespace UnitTest { @@ -157,13 +157,6 @@ namespace UnitTest // matches a previously-calculated "golden" set of values. constexpr int dataSize = 4; - AZStd::vector expectedOutput = - { - 0.5000f, 0.5456f, 0.5138f, 0.4801f, - 0.4174f, 0.4942f, 0.5493f, 0.5431f, - 0.4984f, 0.5204f, 0.5526f, 0.5840f, - 0.5251f, 0.5029f, 0.6153f, 0.5802f, - }; GradientSignal::PerlinGradientConfig config; config.m_randomSeed = 7878; @@ -171,6 +164,8 @@ namespace UnitTest config.m_amplitude = 3.0f; config.m_frequency = 1.13f; + AZStd::vector expectedOutput = { AZ_TRAIT_UNIT_TEST_PERLINE_GRADIANT_GOLDEN_VALUES_7878 }; + auto entity = CreateEntity(); CreateComponent(entity.get(), config); diff --git a/Gems/GradientSignal/Code/Tests/GradientSignalTestFixtures.cpp b/Gems/GradientSignal/Code/Tests/GradientSignalTestFixtures.cpp new file mode 100644 index 0000000000..154e9032b2 --- /dev/null +++ b/Gems/GradientSignal/Code/Tests/GradientSignalTestFixtures.cpp @@ -0,0 +1,429 @@ +/* + * Copyright (c) Contributors to the Open 3D Engine Project. + * For complete copyright and license terms please see the LICENSE at the root of this distribution. + * + * SPDX-License-Identifier: Apache-2.0 OR MIT + * + */ + + +#include + +#include +#include + +// Base gradient components +#include +#include +#include +#include +#include + +// Gradient modifier components +#include +#include +#include +#include +#include +#include +#include +#include + +// Gradient surface data components +#include +#include +#include + +namespace UnitTest +{ + void GradientSignalBaseFixture::SetupCoreSystems() + { + m_app = AZStd::make_unique(); + ASSERT_TRUE(m_app != nullptr); + + AZ::ComponentApplication::Descriptor componentAppDesc; + + m_systemEntity = m_app->Create(componentAppDesc); + ASSERT_TRUE(m_systemEntity != nullptr); + m_app->AddEntity(m_systemEntity); + + AZ::AllocatorInstance::Create(); + AZ::Data::AssetManager::Descriptor desc; + AZ::Data::AssetManager::Create(desc); + m_mockHandler = new ImageAssetMockAssetHandler(); + AZ::Data::AssetManager::Instance().RegisterHandler(m_mockHandler, azrtti_typeid()); + + m_mockShapeHandlers = new AZStd::vector>>(); + } + + void GradientSignalBaseFixture::TearDownCoreSystems() + { + // Clear any mock shape handlers that we've created for our test entities. + delete m_mockShapeHandlers; + + AZ::Data::AssetManager::Instance().UnregisterHandler(m_mockHandler); + delete m_mockHandler; // delete after removing from the asset manager + + AzFramework::LegacyAssetEventBus::ClearQueuedEvents(); + AZ::Data::AssetManager::Destroy(); + AZ::AllocatorInstance::Destroy(); + + m_app->Destroy(); + m_app.reset(); + m_systemEntity = nullptr; + } + + AZStd::unique_ptr> GradientSignalBaseFixture::CreateMockShape( + const AZ::Aabb& spawnerBox, const AZ::EntityId& shapeEntityId) + { + AZStd::unique_ptr> mockShape = + AZStd::make_unique>(shapeEntityId); + + ON_CALL(*mockShape, GetEncompassingAabb).WillByDefault(testing::Return(spawnerBox)); + ON_CALL(*mockShape, GetTransformAndLocalBounds) + .WillByDefault( + [spawnerBox](AZ::Transform& transform, AZ::Aabb& bounds) + { + transform = AZ::Transform::CreateTranslation(spawnerBox.GetCenter()); + bounds = spawnerBox.GetTranslated(-spawnerBox.GetCenter()); + }); + ON_CALL(*mockShape, IsPointInside) + .WillByDefault( + [spawnerBox](const AZ::Vector3& point) -> bool + { + return spawnerBox.Contains(point); + }); + + return mockShape; + } + + AZStd::unique_ptr GradientSignalBaseFixture::CreateMockSurfaceDataSystem(const AZ::Aabb& spawnerBox) + { + SurfaceData::SurfacePoint point; + AZStd::unique_ptr mockSurfaceDataSystem = AZStd::make_unique(); + + // Give the mock surface data a bunch of fake point values to return. + for (float y = spawnerBox.GetMin().GetY(); y < spawnerBox.GetMax().GetY(); y+= 1.0f) + { + for (float x = spawnerBox.GetMin().GetX(); x < spawnerBox.GetMax().GetX(); x += 1.0f) + { + // Use our x distance into the spawnerBox as an arbitrary percentage value that we'll use to calculate + // our other arbitrary values below. + float arbitraryPercentage = AZStd::abs(x / spawnerBox.GetExtents().GetX()); + + // Create a position that's between min and max Z of the box. + point.m_position = AZ::Vector3(x, y, AZ::Lerp(spawnerBox.GetMin().GetZ(), spawnerBox.GetMax().GetZ(), arbitraryPercentage)); + // Create an arbitrary normal value. + point.m_normal = point.m_position.GetNormalized(); + // Create an arbitrary surface value. + point.m_masks[AZ_CRC_CE("test_mask")] = arbitraryPercentage; + + mockSurfaceDataSystem->m_GetSurfacePoints[AZStd::make_pair(x, y)] = { { point } }; + } + } + + return mockSurfaceDataSystem; + } + + AZStd::unique_ptr GradientSignalBaseFixture::CreateTestEntity(float shapeHalfBounds) + { + // Create the base entity + AZStd::unique_ptr testEntity = CreateEntity(); + + // Create a mock Shape component that describes the bounds that we're using to map our gradient into world space. + CreateComponent(testEntity.get()); + + // Create and keep a reference to a mock shape handler that will respond to shape requests for the mock shape. + auto mockShapeHandler = + CreateMockShape(AZ::Aabb::CreateCenterRadius(AZ::Vector3(shapeHalfBounds), shapeHalfBounds), testEntity->GetId()); + m_mockShapeHandlers->push_back(AZStd::move(mockShapeHandler)); + + // Create a transform that locates our gradient in the center of our desired mock Shape. + auto transform = CreateComponent(testEntity.get()); + transform->SetLocalTM(AZ::Transform::CreateTranslation(AZ::Vector3(shapeHalfBounds))); + transform->SetWorldTM(AZ::Transform::CreateTranslation(AZ::Vector3(shapeHalfBounds))); + + return testEntity; + } + + AZStd::unique_ptr GradientSignalBaseFixture::BuildTestConstantGradient(float shapeHalfBounds) + { + // Create a Constant Gradient Component with arbitrary parameters. + auto entity = CreateTestEntity(shapeHalfBounds); + GradientSignal::ConstantGradientConfig config; + config.m_value = 0.75f; + CreateComponent(entity.get(), config); + + ActivateEntity(entity.get()); + return entity; + } + + AZStd::unique_ptr GradientSignalBaseFixture::BuildTestImageGradient(float shapeHalfBounds) + { + // Create an Image Gradient Component with arbitrary sizes and parameters. + auto entity = CreateTestEntity(shapeHalfBounds); + GradientSignal::ImageGradientConfig config; + const uint32_t imageSize = 4096; + const int32_t imageSeed = 12345; + config.m_imageAsset = ImageAssetMockAssetHandler::CreateImageAsset(imageSize, imageSize, imageSeed); + config.m_tilingX = 1.0f; + config.m_tilingY = 1.0f; + CreateComponent(entity.get(), config); + + // Create a Gradient Transform Component with arbitrary parameters. + GradientSignal::GradientTransformConfig gradientTransformConfig; + gradientTransformConfig.m_wrappingType = GradientSignal::WrappingType::None; + CreateComponent(entity.get(), gradientTransformConfig); + + ActivateEntity(entity.get()); + return entity; + } + + AZStd::unique_ptr GradientSignalBaseFixture::BuildTestPerlinGradient(float shapeHalfBounds) + { + // Create a Perlin Gradient Component with arbitrary parameters. + auto entity = CreateTestEntity(shapeHalfBounds); + GradientSignal::PerlinGradientConfig config; + config.m_amplitude = 1.0f; + config.m_frequency = 1.1f; + config.m_octave = 4; + config.m_randomSeed = 12345; + CreateComponent(entity.get(), config); + + // Create a Gradient Transform Component with arbitrary parameters. + GradientSignal::GradientTransformConfig gradientTransformConfig; + gradientTransformConfig.m_wrappingType = GradientSignal::WrappingType::None; + CreateComponent(entity.get(), gradientTransformConfig); + + ActivateEntity(entity.get()); + return entity; + } + + AZStd::unique_ptr GradientSignalBaseFixture::BuildTestRandomGradient(float shapeHalfBounds) + { + // Create a Random Gradient Component with arbitrary parameters. + auto entity = CreateTestEntity(shapeHalfBounds); + GradientSignal::RandomGradientConfig config; + config.m_randomSeed = 12345; + CreateComponent(entity.get(), config); + + // Create a Gradient Transform Component with arbitrary parameters. + GradientSignal::GradientTransformConfig gradientTransformConfig; + gradientTransformConfig.m_wrappingType = GradientSignal::WrappingType::None; + CreateComponent(entity.get(), gradientTransformConfig); + + ActivateEntity(entity.get()); + return entity; + } + + AZStd::unique_ptr GradientSignalBaseFixture::BuildTestShapeAreaFalloffGradient(float shapeHalfBounds) + { + // Create a Shape Area Falloff Gradient Component with arbitrary parameters. + auto entity = CreateTestEntity(shapeHalfBounds); + GradientSignal::ShapeAreaFalloffGradientConfig config; + config.m_shapeEntityId = entity->GetId(); + config.m_falloffWidth = 16.0f; + config.m_falloffType = GradientSignal::FalloffType::InnerOuter; + CreateComponent(entity.get(), config); + + ActivateEntity(entity.get()); + return entity; + } + + AZStd::unique_ptr GradientSignalBaseFixture::BuildTestDitherGradient( + float shapeHalfBounds, const AZ::EntityId& inputGradientId) + { + // Create a Dither Gradient Component with arbitrary parameters. + auto entity = CreateTestEntity(shapeHalfBounds); + GradientSignal::DitherGradientConfig config; + config.m_gradientSampler.m_gradientId = inputGradientId; + config.m_useSystemPointsPerUnit = false; + config.m_pointsPerUnit = 1.0f; + config.m_patternOffset = AZ::Vector3::CreateZero(); + config.m_patternType = GradientSignal::DitherGradientConfig::BayerPatternType::PATTERN_SIZE_4x4; + CreateComponent(entity.get(), config); + + ActivateEntity(entity.get()); + return entity; + } + + AZStd::unique_ptr GradientSignalBaseFixture::BuildTestInvertGradient( + float shapeHalfBounds, const AZ::EntityId& inputGradientId) + { + // Create an Invert Gradient Component. + auto entity = CreateTestEntity(shapeHalfBounds); + GradientSignal::InvertGradientConfig config; + config.m_gradientSampler.m_gradientId = inputGradientId; + CreateComponent(entity.get(), config); + + ActivateEntity(entity.get()); + return entity; + } + + AZStd::unique_ptr GradientSignalBaseFixture::BuildTestLevelsGradient( + float shapeHalfBounds, const AZ::EntityId& inputGradientId) + { + // Create a Levels Gradient Component with arbitrary parameters. + auto entity = CreateTestEntity(shapeHalfBounds); + GradientSignal::LevelsGradientConfig config; + config.m_gradientSampler.m_gradientId = inputGradientId; + config.m_inputMin = 0.1f; + config.m_inputMid = 0.3f; + config.m_inputMax = 0.9f; + config.m_outputMin = 0.0f; + config.m_outputMax = 1.0f; + CreateComponent(entity.get(), config); + + ActivateEntity(entity.get()); + return entity; + } + + AZStd::unique_ptr GradientSignalBaseFixture::BuildTestMixedGradient( + float shapeHalfBounds, const AZ::EntityId& baseGradientId, const AZ::EntityId& mixedGradientId) + { + // Create a Mixed Gradient Component that mixes two input gradients together in arbitrary ways. + auto entity = CreateTestEntity(shapeHalfBounds); + GradientSignal::MixedGradientConfig config; + + GradientSignal::MixedGradientLayer layer; + layer.m_enabled = true; + + layer.m_operation = GradientSignal::MixedGradientLayer::MixingOperation::Initialize; + layer.m_gradientSampler.m_gradientId = baseGradientId; + layer.m_gradientSampler.m_opacity = 1.0f; + config.m_layers.push_back(layer); + + layer.m_operation = GradientSignal::MixedGradientLayer::MixingOperation::Overlay; + layer.m_gradientSampler.m_gradientId = mixedGradientId; + layer.m_gradientSampler.m_opacity = 0.75f; + config.m_layers.push_back(layer); + + CreateComponent(entity.get(), config); + + ActivateEntity(entity.get()); + return entity; + } + + AZStd::unique_ptr GradientSignalBaseFixture::BuildTestPosterizeGradient( + float shapeHalfBounds, const AZ::EntityId& inputGradientId) + { + // Create a Posterize Gradient Component with arbitrary parameters. + auto entity = CreateTestEntity(shapeHalfBounds); + GradientSignal::PosterizeGradientConfig config; + config.m_gradientSampler.m_gradientId = inputGradientId; + config.m_mode = GradientSignal::PosterizeGradientConfig::ModeType::Ps; + config.m_bands = 5; + CreateComponent(entity.get(), config); + + ActivateEntity(entity.get()); + return entity; + } + + AZStd::unique_ptr GradientSignalBaseFixture::BuildTestReferenceGradient( + float shapeHalfBounds, const AZ::EntityId& inputGradientId) + { + // Create a Reference Gradient Component. + auto entity = CreateTestEntity(shapeHalfBounds); + GradientSignal::ReferenceGradientConfig config; + config.m_gradientSampler.m_gradientId = inputGradientId; + config.m_gradientSampler.m_ownerEntityId = entity->GetId(); + CreateComponent(entity.get(), config); + + ActivateEntity(entity.get()); + return entity; + } + + AZStd::unique_ptr GradientSignalBaseFixture::BuildTestSmoothStepGradient( + float shapeHalfBounds, const AZ::EntityId& inputGradientId) + { + // Create a Smooth Step Gradient Component with arbitrary parameters. + auto entity = CreateTestEntity(shapeHalfBounds); + GradientSignal::SmoothStepGradientConfig config; + config.m_gradientSampler.m_gradientId = inputGradientId; + config.m_smoothStep.m_falloffMidpoint = 0.75f; + config.m_smoothStep.m_falloffRange = 0.125f; + config.m_smoothStep.m_falloffStrength = 0.25f; + CreateComponent(entity.get(), config); + + ActivateEntity(entity.get()); + return entity; + } + + AZStd::unique_ptr GradientSignalBaseFixture::BuildTestThresholdGradient( + float shapeHalfBounds, const AZ::EntityId& inputGradientId) + { + // Create a Threshold Gradient Component with arbitrary parameters. + auto entity = CreateTestEntity(shapeHalfBounds); + GradientSignal::ThresholdGradientConfig config; + config.m_gradientSampler.m_gradientId = inputGradientId; + config.m_threshold = 0.75f; + CreateComponent(entity.get(), config); + + ActivateEntity(entity.get()); + return entity; + } + + AZStd::unique_ptr GradientSignalBaseFixture::BuildTestSurfaceAltitudeGradient(float shapeHalfBounds) + { + // Create a Surface Altitude Gradient Component with arbitrary parameters. + auto entity = CreateTestEntity(shapeHalfBounds); + GradientSignal::SurfaceAltitudeGradientConfig config; + config.m_altitudeMin = -5.0f; + config.m_altitudeMax = 15.0f; + CreateComponent(entity.get(), config); + + ActivateEntity(entity.get()); + return entity; + } + + AZStd::unique_ptr GradientSignalBaseFixture::BuildTestSurfaceMaskGradient(float shapeHalfBounds) + { + // Create a Surface Mask Gradient Component with arbitrary parameters. + auto entity = CreateTestEntity(shapeHalfBounds); + GradientSignal::SurfaceMaskGradientConfig config; + config.m_surfaceTagList.push_back(AZ_CRC_CE("test_mask")); + CreateComponent(entity.get(), config); + + ActivateEntity(entity.get()); + return entity; + } + + AZStd::unique_ptr GradientSignalBaseFixture::BuildTestSurfaceSlopeGradient(float shapeHalfBounds) + { + // Create a Surface Slope Gradient Component with arbitrary parameters. + auto entity = CreateTestEntity(shapeHalfBounds); + GradientSignal::SurfaceSlopeGradientConfig config; + config.m_slopeMin = 5.0f; + config.m_slopeMax = 50.0f; + config.m_rampType = GradientSignal::SurfaceSlopeGradientConfig::RampType::SMOOTH_STEP; + config.m_smoothStep.m_falloffMidpoint = 0.75f; + config.m_smoothStep.m_falloffRange = 0.125f; + config.m_smoothStep.m_falloffStrength = 0.25f; + CreateComponent(entity.get(), config); + + ActivateEntity(entity.get()); + return entity; + } + + void GradientSignalTest::TestFixedDataSampler(const AZStd::vector& expectedOutput, int size, AZ::EntityId gradientEntityId) + { + GradientSignal::GradientSampler gradientSampler; + gradientSampler.m_gradientId = gradientEntityId; + + for (int y = 0; y < size; ++y) + { + for (int x = 0; x < size; ++x) + { + GradientSignal::GradientSampleParams params; + params.m_position = AZ::Vector3(static_cast(x), static_cast(y), 0.0f); + + const int index = y * size + x; + float actualValue = gradientSampler.GetValue(params); + float expectedValue = expectedOutput[index]; + + EXPECT_NEAR(actualValue, expectedValue, 0.01f); + } + } + } +} + diff --git a/Gems/GradientSignal/Code/Tests/GradientSignalTestFixtures.h b/Gems/GradientSignal/Code/Tests/GradientSignalTestFixtures.h new file mode 100644 index 0000000000..478f1c1d92 --- /dev/null +++ b/Gems/GradientSignal/Code/Tests/GradientSignalTestFixtures.h @@ -0,0 +1,147 @@ +/* + * Copyright (c) Contributors to the Open 3D Engine Project. + * For complete copyright and license terms please see the LICENSE at the root of this distribution. + * + * SPDX-License-Identifier: Apache-2.0 OR MIT + * + */ +#pragma once + +#include +#include + +namespace UnitTest +{ + // Base test fixture used for GradientSignal unit tests and benchmark tests + class GradientSignalBaseFixture + { + public: + void SetupCoreSystems(); + void TearDownCoreSystems(); + + AZStd::unique_ptr CreateEntity() + { + return AZStd::make_unique(); + } + + void ActivateEntity(AZ::Entity* entity) + { + entity->Init(); + entity->Activate(); + } + + template + Component* CreateComponent(AZ::Entity* entity, const Configuration& config) + { + m_app->RegisterComponentDescriptor(Component::CreateDescriptor()); + return entity->CreateComponent(config); + } + + template + Component* CreateComponent(AZ::Entity* entity) + { + m_app->RegisterComponentDescriptor(Component::CreateDescriptor()); + return entity->CreateComponent(); + } + + // Create a mock shape that will respond to the shape bus with proper responses for the given input box. + AZStd::unique_ptr> CreateMockShape( + const AZ::Aabb& spawnerBox, const AZ::EntityId& shapeEntityId); + + // Create a mock SurfaceDataSystem that will respond to requests for surface points with mock responses for points inside + // the given input box. + AZStd::unique_ptr CreateMockSurfaceDataSystem(const AZ::Aabb& spawnerBox); + + // Create an entity with a mock shape and a transform. It won't be activated yet though, because we expect a gradient component + // to also get added to it first before activation. + AZStd::unique_ptr CreateTestEntity(float shapeHalfBounds); + + // Create and activate an entity with a gradient component of the requested type, initialized with test data. + AZStd::unique_ptr BuildTestConstantGradient(float shapeHalfBounds); + AZStd::unique_ptr BuildTestImageGradient(float shapeHalfBounds); + AZStd::unique_ptr BuildTestPerlinGradient(float shapeHalfBounds); + AZStd::unique_ptr BuildTestRandomGradient(float shapeHalfBounds); + AZStd::unique_ptr BuildTestShapeAreaFalloffGradient(float shapeHalfBounds); + + AZStd::unique_ptr BuildTestDitherGradient(float shapeHalfBounds, const AZ::EntityId& inputGradientId); + AZStd::unique_ptr BuildTestInvertGradient(float shapeHalfBounds, const AZ::EntityId& inputGradientId); + AZStd::unique_ptr BuildTestLevelsGradient(float shapeHalfBounds, const AZ::EntityId& inputGradientId); + AZStd::unique_ptr BuildTestMixedGradient( + float shapeHalfBounds, const AZ::EntityId& baseGradientId, const AZ::EntityId& mixedGradientId); + AZStd::unique_ptr BuildTestPosterizeGradient(float shapeHalfBounds, const AZ::EntityId& inputGradientId); + AZStd::unique_ptr BuildTestReferenceGradient(float shapeHalfBounds, const AZ::EntityId& inputGradientId); + AZStd::unique_ptr BuildTestSmoothStepGradient(float shapeHalfBounds, const AZ::EntityId& inputGradientId); + AZStd::unique_ptr BuildTestThresholdGradient(float shapeHalfBounds, const AZ::EntityId& inputGradientId); + + AZStd::unique_ptr BuildTestSurfaceAltitudeGradient(float shapeHalfBounds); + AZStd::unique_ptr BuildTestSurfaceMaskGradient(float shapeHalfBounds); + AZStd::unique_ptr BuildTestSurfaceSlopeGradient(float shapeHalfBounds); + + AZStd::unique_ptr m_app; + AZ::Entity* m_systemEntity = nullptr; + ImageAssetMockAssetHandler* m_mockHandler = nullptr; + AZStd::vector>>* m_mockShapeHandlers = nullptr; + }; + + struct GradientSignalTest + : public GradientSignalBaseFixture + , public UnitTest::AllocatorsTestFixture + { + protected: + void SetUp() override + { + UnitTest::AllocatorsTestFixture::SetUp(); + SetupCoreSystems(); + } + + void TearDown() override + { + TearDownCoreSystems(); + UnitTest::AllocatorsTestFixture::TearDown(); + } + + void TestFixedDataSampler(const AZStd::vector& expectedOutput, int size, AZ::EntityId gradientEntityId); + }; + +#ifdef HAVE_BENCHMARK + class GradientSignalBenchmarkFixture + : public GradientSignalBaseFixture + , public UnitTest::AllocatorsBenchmarkFixture + , public UnitTest::TraceBusRedirector + { + public: + void internalSetUp(const benchmark::State& state) + { + AZ::Debug::TraceMessageBus::Handler::BusConnect(); + UnitTest::AllocatorsBenchmarkFixture::SetUp(state); + SetupCoreSystems(); + } + + void internalTearDown(const benchmark::State& state) + { + TearDownCoreSystems(); + UnitTest::AllocatorsBenchmarkFixture::TearDown(state); + AZ::Debug::TraceMessageBus::Handler::BusDisconnect(); + } + + protected: + void SetUp(const benchmark::State& state) override + { + internalSetUp(state); + } + void SetUp(benchmark::State& state) override + { + internalSetUp(state); + } + + void TearDown(const benchmark::State& state) override + { + internalTearDown(state); + } + void TearDown(benchmark::State& state) override + { + internalTearDown(state); + } + }; +#endif +} diff --git a/Gems/GradientSignal/Code/Tests/GradientSignalTestMocks.cpp b/Gems/GradientSignal/Code/Tests/GradientSignalTestMocks.cpp new file mode 100644 index 0000000000..7ac6ef1ecc --- /dev/null +++ b/Gems/GradientSignal/Code/Tests/GradientSignalTestMocks.cpp @@ -0,0 +1,74 @@ +/* + * Copyright (c) Contributors to the Open 3D Engine Project. + * For complete copyright and license terms please see the LICENSE at the root of this distribution. + * + * SPDX-License-Identifier: Apache-2.0 OR MIT + * + */ + + +#include + +namespace UnitTest +{ + AZ::Data::Asset ImageAssetMockAssetHandler::CreateImageAsset(AZ::u32 width, AZ::u32 height, AZ::s32 seed) + { + auto imageAsset = AZ::Data::AssetManager::Instance().CreateAsset( + AZ::Data::AssetId(AZ::Uuid::CreateRandom()), AZ::Data::AssetLoadBehavior::Default); + + imageAsset->m_imageWidth = width; + imageAsset->m_imageHeight = height; + imageAsset->m_bytesPerPixel = 1; + imageAsset->m_imageFormat = ImageProcessingAtom::EPixelFormat::ePixelFormat_R8; + imageAsset->m_imageData.reserve(width * height); + + size_t value = 0; + AZStd::hash_combine(value, seed); + + for (AZ::u32 x = 0; x < width; ++x) + { + for (AZ::u32 y = 0; y < height; ++y) + { + AZStd::hash_combine(value, x); + AZStd::hash_combine(value, y); + imageAsset->m_imageData.push_back(static_cast(value)); + } + } + + return imageAsset; + } + + AZ::Data::Asset ImageAssetMockAssetHandler::CreateSpecificPixelImageAsset( + AZ::u32 width, AZ::u32 height, AZ::u32 pixelX, AZ::u32 pixelY) + { + auto imageAsset = AZ::Data::AssetManager::Instance().CreateAsset( + AZ::Data::AssetId(AZ::Uuid::CreateRandom()), AZ::Data::AssetLoadBehavior::Default); + + imageAsset->m_imageWidth = width; + imageAsset->m_imageHeight = height; + imageAsset->m_bytesPerPixel = 1; + imageAsset->m_imageFormat = ImageProcessingAtom::EPixelFormat::ePixelFormat_R8; + imageAsset->m_imageData.reserve(width * height); + + const AZ::u8 pixelValue = 255; + + // Image data should be stored inverted on the y axis relative to our engine, so loop backwards through y. + for (int y = static_cast(height) - 1; y >= 0; --y) + { + for (AZ::u32 x = 0; x < width; ++x) + { + if ((x == static_cast(pixelX)) && (y == static_cast(pixelY))) + { + imageAsset->m_imageData.push_back(pixelValue); + } + else + { + imageAsset->m_imageData.push_back(0); + } + } + } + + return imageAsset; + } +} + diff --git a/Gems/GradientSignal/Code/Tests/GradientSignalTestMocks.h b/Gems/GradientSignal/Code/Tests/GradientSignalTestMocks.h index 9c0d8be588..30f262d9b4 100644 --- a/Gems/GradientSignal/Code/Tests/GradientSignalTestMocks.h +++ b/Gems/GradientSignal/Code/Tests/GradientSignalTestMocks.h @@ -8,90 +8,69 @@ #pragma once #include -#include +#include +#include #include #include #include +#include +#include +#include #include #include #include +#include #include #include -#include - #include namespace UnitTest { - struct GradientSignalTest - : public ::testing::Test + // Mock asset handler for GradientSignal::ImageAsset that we can use in unit tests to pretend to load an image asset with. + // Also includes utility functions for creating image assets with specific testable patterns. + struct ImageAssetMockAssetHandler : public AZ::Data::AssetHandler { - protected: - AZ::ComponentApplication m_app; - AZ::Entity* m_systemEntity = nullptr; + //! Creates a deterministically random set of pixel data as an ImageAsset. + //! \param width The width of the ImageAsset + //! \param height The height of the ImageAsset + //! \param seed The random seed to use for generating the random data + //! \return The ImageAsset in a loaded ready state + static AZ::Data::Asset CreateImageAsset(AZ::u32 width, AZ::u32 height, AZ::s32 seed); - void SetUp() override + //! Creates an ImageAsset where all the pixels are 0 except for the one pixel at the given coordinates, which is set to 1. + //! \param width The width of the ImageAsset + //! \param height The height of the ImageAsset + //! \param pixelX The X coordinate of the pixel to set to 1 + //! \param pixelY The Y coordinate of the pixel to set to 1 + //! \return The ImageAsset in a loaded ready state + static AZ::Data::Asset CreateSpecificPixelImageAsset( + AZ::u32 width, AZ::u32 height, AZ::u32 pixelX, AZ::u32 pixelY); + + AZ::Data::AssetPtr CreateAsset(const AZ::Data::AssetId& id, [[maybe_unused]] const AZ::Data::AssetType& type) override { - AZ::ComponentApplication::Descriptor appDesc; - appDesc.m_memoryBlocksByteSize = 128 * 1024 * 1024; - m_systemEntity = m_app.Create(appDesc); - m_app.AddEntity(m_systemEntity); + // For our mock handler, always mark our assets as immediately ready. + return aznew GradientSignal::ImageAsset(id, AZ::Data::AssetData::AssetStatus::Ready); } - void TearDown() override + void DestroyAsset(AZ::Data::AssetPtr ptr) override { - m_app.Destroy(); - m_systemEntity = nullptr; - } - - void TestFixedDataSampler(const AZStd::vector& expectedOutput, int size, AZ::EntityId gradientEntityId) - { - GradientSignal::GradientSampler gradientSampler; - gradientSampler.m_gradientId = gradientEntityId; - - for(int y = 0; y < size; ++y) + if (ptr) { - for (int x = 0; x < size; ++x) - { - GradientSignal::GradientSampleParams params; - params.m_position = AZ::Vector3(static_cast(x), static_cast(y), 0.0f); - - const int index = y * size + x; - float actualValue = gradientSampler.GetValue(params); - float expectedValue = expectedOutput[index]; - - EXPECT_NEAR(actualValue, expectedValue, 0.01f); - } + delete ptr; } } - AZStd::unique_ptr CreateEntity() + void GetHandledAssetTypes([[maybe_unused]] AZStd::vector& assetTypes) override { - return AZStd::make_unique(); } - void ActivateEntity(AZ::Entity* entity) + AZ::Data::AssetHandler::LoadResult LoadAssetData( + [[maybe_unused]] const AZ::Data::Asset& asset, + [[maybe_unused]] AZStd::shared_ptr stream, + [[maybe_unused]] const AZ::Data::AssetFilterCB& assetLoadFilterCB) override { - entity->Init(); - EXPECT_EQ(AZ::Entity::State::Init, entity->GetState()); - - entity->Activate(); - EXPECT_EQ(AZ::Entity::State::Active, entity->GetState()); - } - - template - AZ::Component* CreateComponent(AZ::Entity* entity, const Configuration& config) - { - m_app.RegisterComponentDescriptor(Component::CreateDescriptor()); - return entity->CreateComponent(config); - } - - template - AZ::Component* CreateComponent(AZ::Entity* entity) - { - m_app.RegisterComponentDescriptor(Component::CreateDescriptor()); - return entity->CreateComponent(); + return AZ::Data::AssetHandler::LoadResult::LoadComplete; } }; diff --git a/Gems/GradientSignal/Code/Tests/GradientSignalTransformTests.cpp b/Gems/GradientSignal/Code/Tests/GradientSignalTransformTests.cpp new file mode 100644 index 0000000000..04e4611e71 --- /dev/null +++ b/Gems/GradientSignal/Code/Tests/GradientSignalTransformTests.cpp @@ -0,0 +1,284 @@ +/* + * Copyright (c) Contributors to the Open 3D Engine Project. + * For complete copyright and license terms please see the LICENSE at the root of this distribution. + * + * SPDX-License-Identifier: Apache-2.0 OR MIT + * + */ + + +#include + +#include +#include +#include +#include +#include + +#include + +namespace UnitTest +{ + struct GradientSignalTransformTestsFixture : public GradientSignalTest + { + // By default, we'll use a shape half extents of (5, 10, 20) for every test, and a world translation of (100, 200, 300). + struct GradientTransformSetupData + { + GradientSignal::WrappingType m_wrappingType{ GradientSignal::WrappingType::None }; + AZ::Vector3 m_shapeHalfExtents{ 5.0f, 10.0f, 20.0f }; + AZ::Vector3 m_worldTranslation{ 100.0f, 200.0f, 300.0f }; + float m_frequencyZoom{ 1.0f }; + }; + + struct GradientTransformTestData + { + AZ::Vector3 m_positionToTest; + AZ::Vector3 m_expectedOutputUVW; + bool m_expectedOutputRejectionResult; + }; + + static constexpr float UvEpsilon = GradientSignal::GradientTransform::UvEpsilon; + + void TestGradientTransform(const GradientTransformSetupData& setup, const GradientTransformTestData& test) + { + AZ::Aabb shapeBounds = AZ::Aabb::CreateCenterHalfExtents(AZ::Vector3::CreateZero(), setup.m_shapeHalfExtents); + AZ::Matrix3x4 transform = AZ::Matrix3x4::CreateTranslation(setup.m_worldTranslation); + float frequencyZoom = setup.m_frequencyZoom; + GradientSignal::WrappingType wrappingType = setup.m_wrappingType; + + AZ::Vector3 outUVW; + bool wasPointRejected; + + // Perform the query with a 3D gradient and verify that the results match expectations. + GradientSignal::GradientTransform gradientTransform3d(shapeBounds, transform, true, frequencyZoom, wrappingType); + gradientTransform3d.TransformPositionToUVW(test.m_positionToTest, outUVW, wasPointRejected); + EXPECT_THAT(outUVW, IsClose(test.m_expectedOutputUVW)); + EXPECT_EQ(wasPointRejected, test.m_expectedOutputRejectionResult); + + // Perform the query with a 2D gradient and verify that the results match, but always returns a W value of 0. + GradientSignal::GradientTransform gradientTransform2d(shapeBounds, transform, false, frequencyZoom, wrappingType); + gradientTransform2d.TransformPositionToUVW(test.m_positionToTest, outUVW, wasPointRejected); + EXPECT_THAT(outUVW, IsClose(AZ::Vector3(test.m_expectedOutputUVW.GetX(), test.m_expectedOutputUVW.GetY(), 0.0f))); + EXPECT_EQ(wasPointRejected, test.m_expectedOutputRejectionResult); + } + }; + + TEST_F(GradientSignalTransformTestsFixture, UnboundedWrappingReturnsTranslatedInput) + { + GradientTransformSetupData setup = { GradientSignal::WrappingType::None }; + GradientTransformTestData test = { + // Input position to query + { 0.0f, 0.0f, 0.0f }, + + // Output: For no wrapping, the output is just the input position offset by the world translation. + { -100.0f, -200.0f, -300.0f }, false + }; + + TestGradientTransform(setup, test); + } + + TEST_F(GradientSignalTransformTestsFixture, ClampToEdgeReturnsValuesClampedToShapeBounds) + { + GradientTransformSetupData setup = { GradientSignal::WrappingType::ClampToEdge }; + GradientTransformTestData tests[] = { + // Test: Input point far below minimum shape bounds + // Our input point is below the minimum of shape bounds, so the result should be the minimum corner of the shape. + { { 0.0f, 0.0f, 0.0f }, { -5.0f, -10.0f, -20.0f }, false }, + + // Test: Input point directly on minimum shape bounds + // Our input point is directly on the minimum of shape bounds, so the result should be the minimum corner of the shape. + { { 95.0f, 190.0f, 280.0f }, { -5.0f, -10.0f, -20.0f }, false }, + + // Test: Input point inside shape bounds + // Our input point is inside the shape bounds, so the result is just input - translation. + { { 101.0f, 202.0f, 303.0f }, { 1.0f, 2.0f, 3.0f }, false }, + + // Test: Input point directly on maximum shape bounds + // On the maximum side, GradientTransform clamps to "max - epsilon" for consistency with other wrapping types, so our + // expected results are the max shape corner - epsilon. + { { 105.0f, 210.0f, 320.0f }, { 5.0f - UvEpsilon, 10.0f - UvEpsilon, 20.0f - UvEpsilon }, false }, + + // Test: Input point far above maximum shape bounds + // On the maximum side, GradientTransform clamps to "max - epsilon" for consistency with other wrapping types, so our + // expected results are the max shape corner - epsilon. + { { 1000.0f, 1000.0f, 1000.0f }, { 5.0f - UvEpsilon, 10.0f - UvEpsilon, 20.0f - UvEpsilon }, false }, + }; + + for (auto& test : tests) + { + TestGradientTransform(setup, test); + } + } + + TEST_F(GradientSignalTransformTestsFixture, MirrorReturnsValuesMirroredBasedOnShapeBounds) + { + /* Here's how the results are expected to work for various inputs when using Mirror wrapping. + * This assumes shape half extents of (5, 10, 20), and a center translation of (100, 200, 300): + * Inputs: Outputs: + * ... ... + * (75, 150, 200) - (85, 170, 240) (-5, -10, -20) to (5, 10, 20) // forward mirror + * (85, 170, 240) - (95, 190, 280) (5, 10, 20) to (-5, -10, -20) // back mirror + * (95, 190, 280) - (105, 210, 320) (-5, -10, -20) to (5, 10, 20) // starting point + * (105, 210, 320) - (115, 230, 360) (5, 10, 20) to (-5, -10, -20) // back mirror + * (115, 230, 360) - (125, 250, 400) (-5, -10, -20) to (5, 10, 20) // forward mirror + * ... ... + * When below the starting point, both forward and back mirrors will be adjusted by UvEpsilon except for points that fall on the + * shape minimums. + * When above the starting point, only back mirrors will be adjusted by UvEpsilon. + */ + + GradientTransformSetupData setup = { GradientSignal::WrappingType::Mirror }; + GradientTransformTestData tests[] = { + // Test: Input exactly 2x below minimum bounds + // When landing exactly on the 2x boundary, we return the minumum shape bounds. There is no adjustment by epsilon + // on the minimum side of the bounds, even when we're in a mirror below the shape bounds. + { { 75.0f, 150.0f, 200.0f }, { -5.0f, -10.0f, -20.0f }, false }, + + // Test: Input within 2nd mirror repeat below minimum bounds + // The second mirror repeat should go forward in values, but will be adjusted by UvEpsilon since we're below the + // minimum bounds. + { { 84.0f, 168.0f, 237.0f }, { 4.0f - UvEpsilon, 8.0f - UvEpsilon, 17.0f - UvEpsilon }, false }, + + // Test: Input exactly 1x below minimum bounds. + // When landing exactly on the 1x boundary, we return the maximum shape bounds minus epsilon. + { { 85.0f, 170.0f, 240.0f }, { 5.0f - UvEpsilon, 10.0f - UvEpsilon, 20.0f - UvEpsilon }, false }, + + // Test: Input within 1st mirror repeat below minimum bounds + // The first mirror repeat should go backwards in values, but will be adjusted by UvEpsilon since we're below the + // minimum bounds. + { { 94.0f, 188.0f, 277.0f }, { -4.0f - UvEpsilon, -8.0f - UvEpsilon, -17.0f - UvEpsilon }, false }, + + // Test: Input inside shape bounds + // The translated input position is (1, 2, 3) is inside the shape bounds, so we should just get the translated + // position back as output. + { { 101.0f, 202.0f, 303.0f }, { 1.0f, 2.0f, 3.0f }, false }, + + // Test: Input within 1st mirror repeat above maximum bounds + // The first mirror repeat should go backwards in values. We're above the maximum bounds, so the expected result + // is (4, 8, 17) minus an epsilon. + { { 106.0f, 212.0f, 323.0f }, { 4.0f - UvEpsilon, 8.0f - UvEpsilon, 17.0f - UvEpsilon }, false }, + + // Test: Input exactly 2x above minimum bounds. + // When landing exactly on the 2x boundary, we return the exact minimum value again. + { { 115.0f, 230.0f, 360.0f }, { -5.0f, -10.0f, -20.0f }, false }, + + // Test: Input within 2nd mirror repeat above maximum bounds + // The second mirror repeat should go forwards in values. We're above the maximum bounds, so the expected result + // is (-4, -8, -17) with no epsilon. + { { 116.0f, 232.0f, 363.0f }, { -4.0f, -8.0f, -17.0f }, false }, + + // Test: Input exactly 2x above maximum bounds + // When landing exactly on the 2x boundary, we return the maximum adjusted by the epsilon again. + { { 125.0f, 250.0f, 400.0f }, { 5.0f - UvEpsilon, 10.0f - UvEpsilon, 20.0f - UvEpsilon }, false } + }; + + for (auto& test : tests) + { + TestGradientTransform(setup, test); + } + } + + TEST_F(GradientSignalTransformTestsFixture, RepeatReturnsRepeatingValuesBasedOnShapeBounds) + { + /* Here's how the results are expected to work for various inputs when using Repeat wrapping. + * This assumes shape half extents of (5, 10, 20), and a center translation of (100, 200, 300): + * Inputs: Outputs: + * ... ... + * (75, 150, 200) - (85, 170, 240) (-5, -10, -20) to (5, 10, 20) + * (85, 170, 240) - (95, 190, 280) (-5, -10, -20) to (5, 10, 20) + * (95, 190, 280) - (105, 210, 320) (-5, -10, -20) to (5, 10, 20) // starting point + * (105, 210, 320) - (115, 230, 360) (-5, -10, -20) to (5, 10, 20) + * (115, 230, 360) - (125, 250, 400) (-5, -10, -20) to (5, 10, 20) + * ... ... + * Every shape min/max boundary point below the starting point will have the max shape value. + * Every shape min/max boundary point above the starting point with have the min shape value. + */ + + + GradientTransformSetupData setup = { GradientSignal::WrappingType::Repeat }; + GradientTransformTestData tests[] = { + // Test: 2x below minimum shape bounds + // We're on a shape boundary below the minimum bounds, so it should return the maximum. + { { 75.0f, 150.0f, 200.0f }, { 5.0f, 10.0f, 20.0f }, false }, + + // Test: Input within 2nd repeat below minimum shape bounds + // Every repeat should go forwards in values. + { { 76.0f, 152.0f, 203.0f }, { -4.0f, -8.0f, -17.0f }, false }, + + // Test: 1x below minimum shape bounds + // We're on a shape boundary below the minimum bounds, so it should return the maximum. + { { 85.0f, 170.0f, 240.0f }, { 5.0f, 10.0f, 20.0f }, false }, + + // Test: Input within 1st repeat below minimum shape bounds + // Every repeat should go forwards in values. + { { 86.0f, 172.0f, 243.0f }, { -4.0f, -8.0f, -17.0f }, false }, + + // Test: Input exactly on minimum shape bounds + // This should return the actual minimum bounds. + { { 95.0f, 190.0f, 280.0f }, { -5.0f, -10.0f, -20.0f }, false }, + + // Test: Input inside shape bounds + // This should return the mapped value. + { { 101.0f, 202.0f, 303.0f }, { 1.0f, 2.0f, 3.0f }, false }, + + // Test: Input exactly on maximum shape bounds + // We're on a shape boundary above the minimum bounds, so it should return the minimum. + { { 105.0f, 210.0f, 320.0f }, { -5.0f, -10.0f, -20.0f }, false }, + + // Test: Input within 1st repeat above maximum shape bounds + // Every repeat should go forwards in values. + { { 106.0f, 212.0f, 323.0f }, { -4.0f, -8.0f, -17.0f }, false }, + + // Test: 1x above maximum shape bounds + // We're on a shape boundary above the minimum bounds, so it should return the minimum. + { { 105.0f, 210.0f, 320.0f }, { -5.0f, -10.0f, -20.0f }, false }, + + // Test: Input within 2nd repeat above maximum shape bounds + // Every repeat should go forwards in values. + { { 106.0f, 212.0f, 323.0f }, { -4.0f, -8.0f, -17.0f }, false }, + }; + + for (auto& test : tests) + { + TestGradientTransform(setup, test); + } + } + + TEST_F(GradientSignalTransformTestsFixture, ClampToZeroReturnsClampedValuesBasedOnShapeBounds) + { + GradientTransformSetupData setup = { GradientSignal::WrappingType::ClampToZero }; + GradientTransformTestData tests[] = { + // Test: Input point far below minimum shape bounds + // Our input point is below the minimum of shape bounds, so the result should be the minimum corner of the shape. + // Points outside the shape bounds should return "true" for rejected. + { { 0.0f, 0.0f, 0.0f }, { -5.0f, -10.0f, -20.0f }, true }, + + // Test: Input point directly on minimum shape bounds + // Our input point is directly on the minimum of shape bounds, so the result should be the minimum corner of the shape. + { { 95.0f, 190.0f, 280.0f }, { -5.0f, -10.0f, -20.0f }, false }, + + // Test: Input point inside shape bounds + // Our input point is inside the shape bounds, so the result is just input - translation. + { { 101.0f, 202.0f, 303.0f }, { 1.0f, 2.0f, 3.0f }, false }, + + // Test: Input point directly on maximum shape bounds + // On the maximum side, GradientTransform clamps to "max - epsilon" for consistency with other wrapping types, so our + // expected results are the max shape corner - epsilon. + // Points outside the shape bounds (which includes the maximum edge of the shape bounds) should return "true" for rejected. + { { 105.0f, 210.0f, 320.0f }, { 5.0f - UvEpsilon, 10.0f - UvEpsilon, 20.0f - UvEpsilon }, true }, + + // Test: Input point far above maximum shape bounds + // On the maximum side, GradientTransform clamps to "max - epsilon" for consistency with other wrapping types, so our + // expected results are the max shape corner - epsilon. + // Points outside the shape bounds should return "true" for rejected. + { { 1000.0f, 1000.0f, 1000.0f }, { 5.0f - UvEpsilon, 10.0f - UvEpsilon, 20.0f - UvEpsilon }, true }, + }; + + for (auto& test : tests) + { + TestGradientTransform(setup, test); + } + } +} + + diff --git a/Gems/GradientSignal/Code/Tests/ImageAssetTests.cpp b/Gems/GradientSignal/Code/Tests/ImageAssetTests.cpp index c5b003bf3c..0111f10c3a 100644 --- a/Gems/GradientSignal/Code/Tests/ImageAssetTests.cpp +++ b/Gems/GradientSignal/Code/Tests/ImageAssetTests.cpp @@ -111,7 +111,10 @@ namespace constexpr auto numChannels = 1; constexpr auto bytesPerPixel = numChannels * sizeof(AZ::u8); constexpr auto outputSize = imageDimensions * imageDimensions; - constexpr auto scaling = 25; + // Adjust the test scale so that none of the input data overflows the cast to AZ::u8. + // The overflow behavior when casting from float to uint8 is undefined so we want to + // avoid that consistently across all platforms + constexpr auto scaling = 255.0f / aznumeric_cast(imageDimensions * imageDimensions); auto inputData = Detail::GenerateInput(scaling); diff --git a/Gems/GradientSignal/Code/gradientsignal_files.cmake b/Gems/GradientSignal/Code/gradientsignal_files.cmake index 5b28150eb4..8555c2c0b4 100644 --- a/Gems/GradientSignal/Code/gradientsignal_files.cmake +++ b/Gems/GradientSignal/Code/gradientsignal_files.cmake @@ -8,12 +8,31 @@ set(FILES Include/GradientSignal/GradientSampler.h + Include/GradientSignal/GradientTransform.h Include/GradientSignal/SmoothStep.h Include/GradientSignal/ImageAsset.h Include/GradientSignal/ImageSettings.h Include/GradientSignal/PerlinImprovedNoise.h Include/GradientSignal/Util.h Include/GradientSignal/GradientImageConversion.h + Include/GradientSignal/Components/ConstantGradientComponent.h + Include/GradientSignal/Components/DitherGradientComponent.h + Include/GradientSignal/Components/GradientSurfaceDataComponent.h + Include/GradientSignal/Components/GradientTransformComponent.h + Include/GradientSignal/Components/ImageGradientComponent.h + Include/GradientSignal/Components/InvertGradientComponent.h + Include/GradientSignal/Components/LevelsGradientComponent.h + Include/GradientSignal/Components/MixedGradientComponent.h + Include/GradientSignal/Components/PerlinGradientComponent.h + Include/GradientSignal/Components/PosterizeGradientComponent.h + Include/GradientSignal/Components/RandomGradientComponent.h + Include/GradientSignal/Components/ReferenceGradientComponent.h + Include/GradientSignal/Components/ShapeAreaFalloffGradientComponent.h + Include/GradientSignal/Components/SmoothStepGradientComponent.h + Include/GradientSignal/Components/SurfaceAltitudeGradientComponent.h + Include/GradientSignal/Components/SurfaceMaskGradientComponent.h + Include/GradientSignal/Components/SurfaceSlopeGradientComponent.h + Include/GradientSignal/Components/ThresholdGradientComponent.h Include/GradientSignal/Ebuses/GradientTransformRequestBus.h Include/GradientSignal/Ebuses/GradientRequestBus.h Include/GradientSignal/Ebuses/GradientPreviewRequestBus.h @@ -39,48 +58,30 @@ set(FILES Include/GradientSignal/Ebuses/GradientSurfaceDataRequestBus.h Include/GradientSignal/Ebuses/SmoothStepRequestBus.h Source/Components/ConstantGradientComponent.cpp - Source/Components/ConstantGradientComponent.h Source/Components/DitherGradientComponent.cpp - Source/Components/DitherGradientComponent.h Source/Components/GradientSurfaceDataComponent.cpp - Source/Components/GradientSurfaceDataComponent.h Source/Components/GradientTransformComponent.cpp - Source/Components/GradientTransformComponent.h Source/Components/ImageGradientComponent.cpp - Source/Components/ImageGradientComponent.h Source/Components/InvertGradientComponent.cpp - Source/Components/InvertGradientComponent.h Source/Components/LevelsGradientComponent.cpp - Source/Components/LevelsGradientComponent.h Source/Components/MixedGradientComponent.cpp - Source/Components/MixedGradientComponent.h Source/Components/PerlinGradientComponent.cpp - Source/Components/PerlinGradientComponent.h Source/Components/PosterizeGradientComponent.cpp - Source/Components/PosterizeGradientComponent.h Source/Components/RandomGradientComponent.cpp - Source/Components/RandomGradientComponent.h Source/Components/ReferenceGradientComponent.cpp - Source/Components/ReferenceGradientComponent.h Source/Components/ShapeAreaFalloffGradientComponent.cpp - Source/Components/ShapeAreaFalloffGradientComponent.h Source/Components/SmoothStepGradientComponent.cpp - Source/Components/SmoothStepGradientComponent.h Source/Components/SurfaceAltitudeGradientComponent.cpp - Source/Components/SurfaceAltitudeGradientComponent.h Source/Components/SurfaceMaskGradientComponent.cpp - Source/Components/SurfaceMaskGradientComponent.h Source/Components/SurfaceSlopeGradientComponent.cpp - Source/Components/SurfaceSlopeGradientComponent.h Source/Components/ThresholdGradientComponent.cpp - Source/Components/ThresholdGradientComponent.h Source/GradientSampler.cpp Source/GradientSignalSystemComponent.cpp Source/GradientSignalSystemComponent.h + Source/GradientTransform.cpp Source/SmoothStep.cpp Source/ImageAsset.cpp Source/ImageSettings.cpp Source/PerlinImprovedNoise.cpp - Source/Util.cpp Source/GradientImageConversion.cpp ) diff --git a/Gems/GradientSignal/Code/gradientsignal_shared_tests_files.cmake b/Gems/GradientSignal/Code/gradientsignal_shared_tests_files.cmake new file mode 100644 index 0000000000..7d867b0a33 --- /dev/null +++ b/Gems/GradientSignal/Code/gradientsignal_shared_tests_files.cmake @@ -0,0 +1,14 @@ +# +# Copyright (c) Contributors to the Open 3D Engine Project. +# For complete copyright and license terms please see the LICENSE at the root of this distribution. +# +# SPDX-License-Identifier: Apache-2.0 OR MIT +# +# + +set(FILES + Tests/GradientSignalTestFixtures.cpp + Tests/GradientSignalTestFixtures.h + Tests/GradientSignalTestMocks.cpp + Tests/GradientSignalTestMocks.h +) diff --git a/Gems/GradientSignal/Code/gradientsignal_tests_files.cmake b/Gems/GradientSignal/Code/gradientsignal_tests_files.cmake index 8c8a4c25e1..814347c395 100644 --- a/Gems/GradientSignal/Code/gradientsignal_tests_files.cmake +++ b/Gems/GradientSignal/Code/gradientsignal_tests_files.cmake @@ -7,11 +7,13 @@ # set(FILES + Tests/GradientSignalBenchmarks.cpp + Tests/GradientSignalGetValuesTests.cpp Tests/GradientSignalImageTests.cpp Tests/GradientSignalReferencesTests.cpp Tests/GradientSignalServicesTests.cpp Tests/GradientSignalSurfaceTests.cpp - Tests/GradientSignalTestMocks.h + Tests/GradientSignalTransformTests.cpp Tests/GradientSignalTest.cpp Tests/ImageAssetTests.cpp ) diff --git a/Gems/GradientSignal/gem.json b/Gems/GradientSignal/gem.json index e87ccfe13a..aac4c652c5 100644 --- a/Gems/GradientSignal/gem.json +++ b/Gems/GradientSignal/gem.json @@ -2,6 +2,7 @@ "gem_name": "GradientSignal", "display_name": "Gradient Signal", "license": "Apache-2.0 Or MIT", + "license_url": "https://github.com/o3de/o3de/blob/development/LICENSE.txt", "origin": "Open 3D Engine - o3de.org", "type": "Code", "summary": "The Gradient Signal Gem provides a number of components for generating, modifying, and mixing gradient signals.", diff --git a/Gems/GraphCanvas/Code/Source/Components/Nodes/General/GeneralNodeTitleComponent.cpp b/Gems/GraphCanvas/Code/Source/Components/Nodes/General/GeneralNodeTitleComponent.cpp index 3ee00ddff9..1e0fab857f 100644 --- a/Gems/GraphCanvas/Code/Source/Components/Nodes/General/GeneralNodeTitleComponent.cpp +++ b/Gems/GraphCanvas/Code/Source/Components/Nodes/General/GeneralNodeTitleComponent.cpp @@ -91,17 +91,19 @@ namespace GraphCanvas } - void GeneralNodeTitleComponent::SetTitle(const AZStd::string& title) + void GeneralNodeTitleComponent::SetDetails(const AZStd::string& title, const AZStd::string& subtitle) { - m_title.SetFallback(title); + m_title = title; + m_subTitle = subtitle; if (m_generalNodeTitleWidget) { - m_generalNodeTitleWidget->SetTitle(title); + m_generalNodeTitleWidget->SetDetails(title, subtitle); } + } - void GeneralNodeTitleComponent::SetTranslationKeyedTitle(const TranslationKeyedString& title) + void GeneralNodeTitleComponent::SetTitle(const AZStd::string& title) { m_title = title; @@ -113,20 +115,10 @@ namespace GraphCanvas AZStd::string GeneralNodeTitleComponent::GetTitle() const { - return m_title.GetDisplayString(); + return m_title; } void GeneralNodeTitleComponent::SetSubTitle(const AZStd::string& subtitle) - { - m_subTitle.SetFallback(subtitle); - - if (m_generalNodeTitleWidget) - { - m_generalNodeTitleWidget->SetSubTitle(subtitle); - } - } - - void GeneralNodeTitleComponent::SetTranslationKeyedSubTitle(const TranslationKeyedString& subtitle) { m_subTitle = subtitle; @@ -138,7 +130,7 @@ namespace GraphCanvas AZStd::string GeneralNodeTitleComponent::GetSubTitle() const { - return m_subTitle.GetDisplayString(); + return m_subTitle; } QGraphicsWidget* GeneralNodeTitleComponent::GetGraphicsWidget() @@ -270,7 +262,28 @@ namespace GraphCanvas SceneNotificationBus::Handler::BusDisconnect(); } - void GeneralNodeTitleGraphicsWidget::SetTitle(const TranslationKeyedString& title) + void GeneralNodeTitleGraphicsWidget::SetDetails(const AZStd::string& title, const AZStd::string& subtitle) + { + bool updateLayout = false; + if (m_titleWidget) + { + m_titleWidget->SetLabel(title); + updateLayout = true; + } + + if (m_subTitleWidget) + { + m_subTitleWidget->SetLabel(subtitle); + updateLayout = true; + } + + if (updateLayout) + { + UpdateLayout(); + } + } + + void GeneralNodeTitleGraphicsWidget::SetTitle(const AZStd::string& title) { if (m_titleWidget) { @@ -279,7 +292,7 @@ namespace GraphCanvas } } - void GeneralNodeTitleGraphicsWidget::SetSubTitle(const TranslationKeyedString& subtitle) + void GeneralNodeTitleGraphicsWidget::SetSubTitle(const AZStd::string& subtitle) { if (m_subTitleWidget) { @@ -455,13 +468,6 @@ namespace GraphCanvas { GRAPH_CANVAS_DETAILED_PROFILE_FUNCTION(); - Styling::PaletteStyle style = m_styleHelper.GetAttribute(Styling::Attribute::PaletteStyle, Styling::PaletteStyle::Solid); - - if (m_paletteOverride) - { - style = m_paletteOverride->GetAttribute(Styling::Attribute::PaletteStyle, Styling::PaletteStyle::Solid); - } - // Background QRectF bounds = boundingRect(); diff --git a/Gems/GraphCanvas/Code/Source/Components/Nodes/General/GeneralNodeTitleComponent.h b/Gems/GraphCanvas/Code/Source/Components/Nodes/General/GeneralNodeTitleComponent.h index 8fbcbc8930..ce8ea4c8a9 100644 --- a/Gems/GraphCanvas/Code/Source/Components/Nodes/General/GeneralNodeTitleComponent.h +++ b/Gems/GraphCanvas/Code/Source/Components/Nodes/General/GeneralNodeTitleComponent.h @@ -19,7 +19,6 @@ #include #include #include -#include #include namespace GraphCanvas @@ -68,12 +67,11 @@ namespace GraphCanvas //// // NodeTitleRequestBus + void SetDetails(const AZStd::string& title, const AZStd::string& subtitle) override; void SetTitle(const AZStd::string& title) override; - void SetTranslationKeyedTitle(const TranslationKeyedString& title) override; AZStd::string GetTitle() const override; void SetSubTitle(const AZStd::string& subtitle) override; - void SetTranslationKeyedSubTitle(const TranslationKeyedString& subtitle) override; AZStd::string GetSubTitle() const override; QGraphicsWidget* GetGraphicsWidget() override; @@ -96,8 +94,8 @@ namespace GraphCanvas private: GeneralNodeTitleComponent(const GeneralNodeTitleComponent&) = delete; - TranslationKeyedString m_title; - TranslationKeyedString m_subTitle; + AZStd::string m_title; + AZStd::string m_subTitle; AZStd::string m_basePalette; @@ -123,9 +121,10 @@ namespace GraphCanvas void Activate(); void Deactivate(); - - void SetTitle(const TranslationKeyedString& title); - void SetSubTitle(const TranslationKeyedString& subtitle); + + void SetDetails(const AZStd::string& title, const AZStd::string& subtitle); + void SetTitle(const AZStd::string& title); + void SetSubTitle(const AZStd::string& subtitle); void SetPaletteOverride(AZStd::string_view paletteOverride); void SetPaletteOverride(const AZ::Uuid& uuid); diff --git a/Gems/GraphCanvas/Code/Source/Components/Nodes/General/GeneralSlotLayoutComponent.cpp b/Gems/GraphCanvas/Code/Source/Components/Nodes/General/GeneralSlotLayoutComponent.cpp index ddb5f11714..9c3fc16c50 100644 --- a/Gems/GraphCanvas/Code/Source/Components/Nodes/General/GeneralSlotLayoutComponent.cpp +++ b/Gems/GraphCanvas/Code/Source/Components/Nodes/General/GeneralSlotLayoutComponent.cpp @@ -188,9 +188,7 @@ namespace GraphCanvas void GeneralSlotLayoutGraphicsWidget::LinearSlotGroupWidget::DisplaySlot(const AZ::EntityId& slotId) { ConnectionType connectionType = ConnectionType::CT_Invalid; - SlotRequestBus::EventResult(connectionType, slotId, &SlotRequests::GetConnectionType); - - int layoutOrder = 0; + SlotRequestBus::EventResult(connectionType, slotId, &SlotRequests::GetConnectionType); SlotLayoutInfo slotInfo(slotId); @@ -199,14 +197,14 @@ namespace GraphCanvas SlotUINotificationBus::MultiHandler::BusConnect(slotId); m_inputSlotSet.insert(slotId); - layoutOrder = LayoutSlot(m_inputs, m_inputSlots, slotInfo); + LayoutSlot(m_inputs, m_inputSlots, slotInfo); } else if (connectionType == CT_Output) { SlotUINotificationBus::MultiHandler::BusConnect(slotId); m_outputSlotSet.insert(slotId); - LayoutSlot(m_outputs, m_outputSlots, slotInfo); + LayoutSlot(m_outputs, m_outputSlots, slotInfo); } else { diff --git a/Gems/GraphCanvas/Code/Source/Components/Nodes/Group/CollapsedNodeGroupComponent.cpp b/Gems/GraphCanvas/Code/Source/Components/Nodes/Group/CollapsedNodeGroupComponent.cpp index 5b0169cb05..7c58377a38 100644 --- a/Gems/GraphCanvas/Code/Source/Components/Nodes/Group/CollapsedNodeGroupComponent.cpp +++ b/Gems/GraphCanvas/Code/Source/Components/Nodes/Group/CollapsedNodeGroupComponent.cpp @@ -1007,20 +1007,16 @@ namespace GraphCanvas { if (!configuration.m_name.empty()) { - cloneConfiguration->m_name.Clear(); - cloneConfiguration->m_name.SetFallback(configuration.m_name); + cloneConfiguration->m_name = configuration.m_name; } else { AZStd::string nodeTitle; NodeTitleRequestBus::EventResult(nodeTitle, configuration.m_targetEndpoint.GetNodeId(), &NodeTitleRequests::GetTitle); - AZStd::string displayName = AZStd::string::format("%s:%s", nodeTitle.c_str(), cloneConfiguration->m_name.GetDisplayString().c_str()); + AZStd::string displayName = AZStd::string::format("%s:%s", nodeTitle.c_str(), cloneConfiguration->m_name.c_str()); - // Gain some context. Lost the ability to refresh the strings. - // Should be fixable once we get an actual use case for this setup. - cloneConfiguration->m_name.Clear(); - cloneConfiguration->m_name.SetFallback(displayName); + cloneConfiguration->m_name = displayName; } AZ::Entity* slotEntity = nullptr; diff --git a/Gems/GraphCanvas/Code/Source/Components/Nodes/NodeComponent.cpp b/Gems/GraphCanvas/Code/Source/Components/Nodes/NodeComponent.cpp index f7e743c886..6d9cd8b9e8 100644 --- a/Gems/GraphCanvas/Code/Source/Components/Nodes/NodeComponent.cpp +++ b/Gems/GraphCanvas/Code/Source/Components/Nodes/NodeComponent.cpp @@ -315,12 +315,6 @@ namespace GraphCanvas NodeNotificationBus::Event(GetEntityId(), &NodeNotifications::OnTooltipChanged, m_configuration.GetTooltip()); } - void NodeComponent::SetTranslationKeyedTooltip(const TranslationKeyedString& tooltip) - { - m_configuration.SetTooltip(tooltip.GetDisplayString()); - NodeNotificationBus::Event(GetEntityId(), &NodeNotifications::OnTooltipChanged, m_configuration.GetTooltip()); - } - void NodeComponent::AddSlot(const AZ::EntityId& slotId) { AZ_Assert(slotId.IsValid(), "Slot entity (ID: %s) is not valid!", slotId.ToString().data()); diff --git a/Gems/GraphCanvas/Code/Source/Components/Nodes/NodeComponent.h b/Gems/GraphCanvas/Code/Source/Components/Nodes/NodeComponent.h index 4e2052555f..bfec0f63b9 100644 --- a/Gems/GraphCanvas/Code/Source/Components/Nodes/NodeComponent.h +++ b/Gems/GraphCanvas/Code/Source/Components/Nodes/NodeComponent.h @@ -106,7 +106,6 @@ namespace GraphCanvas // NodeRequestBus void SetTooltip(const AZStd::string& tooltip) override; - void SetTranslationKeyedTooltip(const TranslationKeyedString& tooltip) override; const AZStd::string GetTooltip() const override { return m_configuration.GetTooltip(); } void SetShowInOutliner(bool showInOutliner) override { m_configuration.SetShowInOutliner(showInOutliner); } diff --git a/Gems/GraphCanvas/Code/Source/Components/SceneComponent.cpp b/Gems/GraphCanvas/Code/Source/Components/SceneComponent.cpp index 52e7892364..e821ea9be2 100644 --- a/Gems/GraphCanvas/Code/Source/Components/SceneComponent.cpp +++ b/Gems/GraphCanvas/Code/Source/Components/SceneComponent.cpp @@ -669,6 +669,7 @@ namespace GraphCanvas { GeometryNotificationBus::Handler::BusDisconnect(); SceneNotificationBus::Handler::BusDisconnect(); + AZ::SystemTickBus::Handler::BusDisconnect(); } void GestureSceneHelper::TrackElement(const AZ::EntityId& elementId) diff --git a/Gems/GraphCanvas/Code/Source/Components/Slots/Data/DataSlotLayoutComponent.cpp b/Gems/GraphCanvas/Code/Source/Components/Slots/Data/DataSlotLayoutComponent.cpp index 78a94296ff..e199562257 100644 --- a/Gems/GraphCanvas/Code/Source/Components/Slots/Data/DataSlotLayoutComponent.cpp +++ b/Gems/GraphCanvas/Code/Source/Components/Slots/Data/DataSlotLayoutComponent.cpp @@ -337,12 +337,9 @@ namespace GraphCanvas { m_connectionType = slotRequests->GetConnectionType(); - TranslationKeyedString slotName = slotRequests->GetTranslationKeyedName(); + m_slotText->SetLabel(slotRequests->GetName()); - m_slotText->SetLabel(slotName); - - TranslationKeyedString toolTip = slotRequests->GetTranslationKeyedTooltip(); - OnTooltipChanged(toolTip); + OnTooltipChanged(slotRequests->GetTooltip()); const SlotConfiguration& configuration = slotRequests->GetSlotConfiguration(); @@ -393,12 +390,12 @@ namespace GraphCanvas AZ::SystemTickBus::Handler::BusConnect(); } - void DataSlotLayout::OnNameChanged(const TranslationKeyedString& name) + void DataSlotLayout::OnNameChanged(const AZStd::string& name) { m_slotText->SetLabel(name); } - void DataSlotLayout::OnTooltipChanged(const TranslationKeyedString& tooltip) + void DataSlotLayout::OnTooltipChanged(const AZStd::string& tooltip) { AZ::Uuid dataType; DataSlotRequestBus::EventResult(dataType, m_owner.GetEntityId(), &DataSlotRequests::GetDataTypeId); @@ -406,7 +403,7 @@ namespace GraphCanvas AZStd::string typeString; GraphModelRequestBus::EventResult(typeString, GetSceneId(), &GraphModelRequests::GetDataTypeString, dataType); - AZStd::string displayText = tooltip.GetDisplayString(); + AZStd::string displayText = tooltip; if (!typeString.empty()) { @@ -486,7 +483,7 @@ namespace GraphCanvas if (!iconPath.empty()) { m_textDecoration = new GraphCanvasLabel(); - m_textDecoration->SetLabel(iconPath, "", ""); + m_textDecoration->SetLabel(iconPath); m_textDecoration->setToolTip(toolTip.c_str()); ApplyTextStyle(m_textDecoration); diff --git a/Gems/GraphCanvas/Code/Source/Components/Slots/Data/DataSlotLayoutComponent.h b/Gems/GraphCanvas/Code/Source/Components/Slots/Data/DataSlotLayoutComponent.h index 61fd6f31db..4099fb1156 100644 --- a/Gems/GraphCanvas/Code/Source/Components/Slots/Data/DataSlotLayoutComponent.h +++ b/Gems/GraphCanvas/Code/Source/Components/Slots/Data/DataSlotLayoutComponent.h @@ -120,8 +120,8 @@ namespace GraphCanvas // SlotNotificationBus void OnRegisteredToNode(const AZ::EntityId& nodeId) override; - void OnNameChanged(const TranslationKeyedString&) override; - void OnTooltipChanged(const TranslationKeyedString&) override; + void OnNameChanged(const AZStd::string&) override; + void OnTooltipChanged(const AZStd::string&) override; //// // StyleNotificationBus diff --git a/Gems/GraphCanvas/Code/Source/Components/Slots/Execution/ExecutionSlotLayoutComponent.cpp b/Gems/GraphCanvas/Code/Source/Components/Slots/Execution/ExecutionSlotLayoutComponent.cpp index 099e99cbe6..ed48c1714f 100644 --- a/Gems/GraphCanvas/Code/Source/Components/Slots/Execution/ExecutionSlotLayoutComponent.cpp +++ b/Gems/GraphCanvas/Code/Source/Components/Slots/Execution/ExecutionSlotLayoutComponent.cpp @@ -58,13 +58,8 @@ namespace GraphCanvas { m_connectionType = slotRequests->GetConnectionType(); - TranslationKeyedString slotName = slotRequests->GetTranslationKeyedName(); - - m_slotText->SetLabel(slotName); - - TranslationKeyedString toolTip = slotRequests->GetTranslationKeyedTooltip(); - - OnTooltipChanged(toolTip); + m_slotText->SetLabel(slotRequests->GetName()); + OnTooltipChanged(slotRequests->GetTooltip()); const SlotConfiguration& configuration = slotRequests->GetSlotConfiguration(); @@ -88,17 +83,15 @@ namespace GraphCanvas OnStyleChanged(); } - void ExecutionSlotLayout::OnNameChanged(const TranslationKeyedString& name) + void ExecutionSlotLayout::OnNameChanged(const AZStd::string& name) { m_slotText->SetLabel(name); } - void ExecutionSlotLayout::OnTooltipChanged(const TranslationKeyedString& tooltip) + void ExecutionSlotLayout::OnTooltipChanged(const AZStd::string& tooltip) { - AZStd::string displayText = tooltip.GetDisplayString(); - - m_slotConnectionPin->setToolTip(displayText.c_str()); - m_slotText->setToolTip(displayText.c_str()); + m_slotConnectionPin->setToolTip(tooltip.c_str()); + m_slotText->setToolTip(tooltip.c_str()); } void ExecutionSlotLayout::OnStyleChanged() @@ -132,7 +125,7 @@ namespace GraphCanvas if (!textDecoration.empty()) { m_textDecoration = new GraphCanvasLabel(); - m_textDecoration->SetLabel(textDecoration, "", ""); + m_textDecoration->SetLabel(textDecoration); m_textDecoration->setToolTip(toolTip.c_str()); ApplyTextStyle(m_textDecoration); diff --git a/Gems/GraphCanvas/Code/Source/Components/Slots/Execution/ExecutionSlotLayoutComponent.h b/Gems/GraphCanvas/Code/Source/Components/Slots/Execution/ExecutionSlotLayoutComponent.h index 5df2b9f68c..f155aa33ee 100644 --- a/Gems/GraphCanvas/Code/Source/Components/Slots/Execution/ExecutionSlotLayoutComponent.h +++ b/Gems/GraphCanvas/Code/Source/Components/Slots/Execution/ExecutionSlotLayoutComponent.h @@ -46,8 +46,8 @@ namespace GraphCanvas // SlotNotificationBus void OnRegisteredToNode(const AZ::EntityId& nodeId) override; - void OnNameChanged(const TranslationKeyedString& name) override; - void OnTooltipChanged(const TranslationKeyedString& tooltip) override; + void OnNameChanged(const AZStd::string& name) override; + void OnTooltipChanged(const AZStd::string& tooltip) override; //// // StyleNotificationBus diff --git a/Gems/GraphCanvas/Code/Source/Components/Slots/Extender/ExtenderSlotLayoutComponent.cpp b/Gems/GraphCanvas/Code/Source/Components/Slots/Extender/ExtenderSlotLayoutComponent.cpp index 54a592bbce..bdaee6772a 100644 --- a/Gems/GraphCanvas/Code/Source/Components/Slots/Extender/ExtenderSlotLayoutComponent.cpp +++ b/Gems/GraphCanvas/Code/Source/Components/Slots/Extender/ExtenderSlotLayoutComponent.cpp @@ -119,13 +119,13 @@ namespace GraphCanvas { SlotRequestBus::EventResult(m_connectionType, m_owner.GetEntityId(), &SlotRequests::GetConnectionType); - TranslationKeyedString slotName; - SlotRequestBus::EventResult(slotName, m_owner.GetEntityId(), &SlotRequests::GetTranslationKeyedName); + AZStd::string slotName; + SlotRequestBus::EventResult(slotName, m_owner.GetEntityId(), &SlotRequests::GetName); m_slotText->SetLabel(slotName); - TranslationKeyedString toolTip; - SlotRequestBus::EventResult(toolTip, m_owner.GetEntityId(), &SlotRequests::GetTranslationKeyedTooltip); + AZStd::string toolTip; + SlotRequestBus::EventResult(toolTip, m_owner.GetEntityId(), &SlotRequests::GetTooltip); OnTooltipChanged(toolTip); @@ -151,17 +151,15 @@ namespace GraphCanvas OnStyleChanged(); } - void ExtenderSlotLayout::OnNameChanged(const TranslationKeyedString& name) + void ExtenderSlotLayout::OnNameChanged(const AZStd::string& name) { m_slotText->SetLabel(name); } - void ExtenderSlotLayout::OnTooltipChanged(const TranslationKeyedString& tooltip) + void ExtenderSlotLayout::OnTooltipChanged(const AZStd::string& tooltip) { - AZStd::string displayText = tooltip.GetDisplayString(); - - m_slotConnectionPin->setToolTip(displayText.c_str()); - m_slotText->setToolTip(displayText.c_str()); + m_slotConnectionPin->setToolTip(tooltip.c_str()); + m_slotText->setToolTip(tooltip.c_str()); } void ExtenderSlotLayout::OnStyleChanged() diff --git a/Gems/GraphCanvas/Code/Source/Components/Slots/Extender/ExtenderSlotLayoutComponent.h b/Gems/GraphCanvas/Code/Source/Components/Slots/Extender/ExtenderSlotLayoutComponent.h index ed477d40cf..e0e54b33ba 100644 --- a/Gems/GraphCanvas/Code/Source/Components/Slots/Extender/ExtenderSlotLayoutComponent.h +++ b/Gems/GraphCanvas/Code/Source/Components/Slots/Extender/ExtenderSlotLayoutComponent.h @@ -48,8 +48,8 @@ namespace GraphCanvas // SlotNotificationBus void OnRegisteredToNode(const AZ::EntityId& nodeId) override; - void OnNameChanged(const TranslationKeyedString& name) override; - void OnTooltipChanged(const TranslationKeyedString& tooltip) override; + void OnNameChanged(const AZStd::string& name) override; + void OnTooltipChanged(const AZStd::string& tooltip) override; //// // StyleNotificationBus diff --git a/Gems/GraphCanvas/Code/Source/Components/Slots/Property/PropertySlotLayoutComponent.cpp b/Gems/GraphCanvas/Code/Source/Components/Slots/Property/PropertySlotLayoutComponent.cpp index 342c1e4dd6..3020464b54 100644 --- a/Gems/GraphCanvas/Code/Source/Components/Slots/Property/PropertySlotLayoutComponent.cpp +++ b/Gems/GraphCanvas/Code/Source/Components/Slots/Property/PropertySlotLayoutComponent.cpp @@ -90,10 +90,10 @@ namespace GraphCanvas TryAndSetupSlot(); } - void PropertySlotLayout::OnTooltipChanged(const TranslationKeyedString& tooltip) + void PropertySlotLayout::OnTooltipChanged(const AZStd::string& tooltip) { - m_slotText->setToolTip(Tools::qStringFromUtf8(tooltip.GetDisplayString())); - m_nodePropertyDisplay->setToolTip(Tools::qStringFromUtf8(tooltip.GetDisplayString())); + m_slotText->setToolTip(Tools::qStringFromUtf8(tooltip)); + m_nodePropertyDisplay->setToolTip(Tools::qStringFromUtf8(tooltip)); } void PropertySlotLayout::OnStyleChanged() diff --git a/Gems/GraphCanvas/Code/Source/Components/Slots/Property/PropertySlotLayoutComponent.h b/Gems/GraphCanvas/Code/Source/Components/Slots/Property/PropertySlotLayoutComponent.h index 0891f51f06..e6439d74c4 100644 --- a/Gems/GraphCanvas/Code/Source/Components/Slots/Property/PropertySlotLayoutComponent.h +++ b/Gems/GraphCanvas/Code/Source/Components/Slots/Property/PropertySlotLayoutComponent.h @@ -49,7 +49,7 @@ namespace GraphCanvas // SlotNotificationBus void OnRegisteredToNode(const AZ::EntityId& nodeId) override; - void OnTooltipChanged(const TranslationKeyedString& tooltip) override; + void OnTooltipChanged(const AZStd::string& tooltip) override; //// // StyleNotificationBus diff --git a/Gems/GraphCanvas/Code/Source/Components/Slots/SlotComponent.cpp b/Gems/GraphCanvas/Code/Source/Components/Slots/SlotComponent.cpp index c4246ac44c..6ee4df0f20 100644 --- a/Gems/GraphCanvas/Code/Source/Components/Slots/SlotComponent.cpp +++ b/Gems/GraphCanvas/Code/Source/Components/Slots/SlotComponent.cpp @@ -91,14 +91,6 @@ namespace GraphCanvas void SlotComponent::Activate() { - SetTranslationKeyedName(m_slotConfiguration.m_name); - - // Default tooltip. - if (m_slotConfiguration.m_tooltip.empty()) - { - SetTranslationKeyedTooltip(m_slotConfiguration.m_name); - } - SlotRequestBus::Handler::BusConnect(GetEntityId()); SceneMemberRequestBus::Handler::BusConnect(GetEntityId()); } @@ -171,24 +163,6 @@ namespace GraphCanvas } void SlotComponent::SetName(const AZStd::string& name) - { - if (name == m_slotConfiguration.m_name.GetDisplayString()) - { - return; - } - - m_slotConfiguration.m_name.SetFallback(name); - - // Default tooltip. - if (m_slotConfiguration.m_tooltip.empty()) - { - m_slotConfiguration.m_tooltip = m_slotConfiguration.m_name; - } - - SlotNotificationBus::Event(GetEntityId(), &SlotNotifications::OnNameChanged, m_slotConfiguration.m_name); - } - - void SlotComponent::SetTranslationKeyedName(const TranslationKeyedString& name) { if (name == m_slotConfiguration.m_name) { @@ -206,25 +180,22 @@ namespace GraphCanvas SlotNotificationBus::Event(GetEntityId(), &SlotNotifications::OnNameChanged, m_slotConfiguration.m_name); } - void SlotComponent::SetTooltip(const AZStd::string& tooltip) + void SlotComponent::SetDetails(const AZStd::string& name, const AZStd::string& tooltip) { - if (tooltip == m_slotConfiguration.m_tooltip.GetDisplayString()) + if (name != m_slotConfiguration.m_name) { - return; + m_slotConfiguration.m_name = name; + SlotNotificationBus::Event(GetEntityId(), &SlotNotifications::OnNameChanged, m_slotConfiguration.m_name); } - m_slotConfiguration.m_tooltip.SetFallback(tooltip); - - // Default tooltip. - if (m_slotConfiguration.m_tooltip.empty()) + if (tooltip != m_slotConfiguration.m_tooltip) { - m_slotConfiguration.m_tooltip = m_slotConfiguration.m_name; + m_slotConfiguration.m_tooltip = tooltip; + SlotNotificationBus::Event(GetEntityId(), &SlotNotifications::OnTooltipChanged, m_slotConfiguration.m_tooltip); } - - SlotNotificationBus::Event(GetEntityId(), &SlotNotifications::OnTooltipChanged, m_slotConfiguration.m_tooltip); } - void SlotComponent::SetTranslationKeyedTooltip(const TranslationKeyedString& tooltip) + void SlotComponent::SetTooltip(const AZStd::string& tooltip) { if (tooltip == m_slotConfiguration.m_tooltip) { @@ -521,8 +492,8 @@ namespace GraphCanvas { slotConfiguration.m_connectionType = GetConnectionType(); - slotConfiguration.m_name = GetTranslationKeyedName(); - slotConfiguration.m_tooltip = GetTranslationKeyedTooltip(); + slotConfiguration.m_name = m_slotConfiguration.m_name; + slotConfiguration.m_tooltip = m_slotConfiguration.m_tooltip; slotConfiguration.m_slotGroup = GetSlotGroup(); } diff --git a/Gems/GraphCanvas/Code/Source/Components/Slots/SlotComponent.h b/Gems/GraphCanvas/Code/Source/Components/Slots/SlotComponent.h index 5afa3fbc14..99442cd51a 100644 --- a/Gems/GraphCanvas/Code/Source/Components/Slots/SlotComponent.h +++ b/Gems/GraphCanvas/Code/Source/Components/Slots/SlotComponent.h @@ -74,18 +74,14 @@ namespace GraphCanvas Endpoint GetEndpoint() const override; - const AZStd::string GetName() const override { return m_slotConfiguration.m_name.GetDisplayString(); } + const AZStd::string GetName() const override { return m_slotConfiguration.m_name; } void SetName(const AZStd::string& name) override; - TranslationKeyedString GetTranslationKeyedName() const override { return m_slotConfiguration.m_name; } - void SetTranslationKeyedName(const TranslationKeyedString&) override; + void SetDetails(const AZStd::string& name, const AZStd::string& tooltip) override; - const AZStd::string GetTooltip() const override { return m_slotConfiguration.m_tooltip.GetDisplayString(); } + const AZStd::string GetTooltip() const override { return m_slotConfiguration.m_tooltip; } void SetTooltip(const AZStd::string& tooltip) override; - TranslationKeyedString GetTranslationKeyedTooltip() const override { return m_slotConfiguration.m_tooltip; } - void SetTranslationKeyedTooltip(const TranslationKeyedString&) override; - void DisplayProposedConnection(const AZ::EntityId& connectionId, const Endpoint& endpoint) override; void RemoveProposedConnection(const AZ::EntityId& connectionId, const Endpoint& endpoint) override; diff --git a/Gems/GraphCanvas/Code/Source/GraphCanvas.cpp b/Gems/GraphCanvas/Code/Source/GraphCanvas.cpp index c5333152a0..de7966e53c 100644 --- a/Gems/GraphCanvas/Code/Source/GraphCanvas.cpp +++ b/Gems/GraphCanvas/Code/Source/GraphCanvas.cpp @@ -58,7 +58,6 @@ #include #include -#include #include #include @@ -140,7 +139,6 @@ namespace GraphCanvas Styling::DefaultSelector::Reflect(serializeContext); Styling::CompoundSelector::Reflect(serializeContext); Styling::NestedSelector::Reflect(serializeContext); - TranslationKeyedString::Reflect(serializeContext); Styling::Style::Reflect(serializeContext); AssetEditorUserSettings::Reflect(serializeContext); } @@ -218,6 +216,9 @@ namespace GraphCanvas AzToolsFramework::ToolsAssetSystemBus::Broadcast(&AzToolsFramework::ToolsAssetSystemRequests::RegisterSourceAssetType, azrtti_typeid(), TranslationAsset::GetFileFilter()); m_translationAssetWorker.Activate(); + + m_assetHandler = AZStd::make_unique(); + m_assetHandler->Register(); } } @@ -226,7 +227,6 @@ namespace GraphCanvas AzFramework::AssetCatalogEventBus::Handler::BusDisconnect(); Styling::PseudoElementFactoryRequestBus::Handler::BusDisconnect(); GraphCanvasRequestBus::Handler::BusDisconnect(); - AZ::Data::AssetBus::MultiHandler::BusDisconnect(); m_translationAssetWorker.Deactivate(); UnregisterAssetHandler(); @@ -368,21 +368,35 @@ namespace GraphCanvas void GraphCanvasSystemComponent::OnCatalogLoaded(const char* /*catalogFile*/) { - auto postEnumerateCb = [this]() - { - PopulateTranslationDatabase(); - }; + GraphCanvas::TranslationRequestBus::Broadcast(&GraphCanvas::TranslationRequests::Restore); + } - // Find any TranslationAsset files that may have translation database key/values - AZ::Data::AssetCatalogRequests::AssetEnumerationCB collectAssetsCb = [this](const AZ::Data::AssetId assetId, const AZ::Data::AssetInfo& assetInfo) + void GraphCanvasSystemComponent::OnCatalogAssetRemoved(const AZ::Data::AssetId& /*assetId*/, const AZ::Data::AssetInfo& assetInfo) + { + if (assetInfo.m_assetType == azrtti_typeid()) { - const auto assetType = azrtti_typeid(); - if (assetInfo.m_assetType == assetType) - { - m_translationAssets.push_back(assetId); - } - }; - AZ::Data::AssetCatalogRequestBus::Broadcast(&AZ::Data::AssetCatalogRequestBus::Events::EnumerateAssets, nullptr, collectAssetsCb, postEnumerateCb); + GraphCanvas::TranslationRequestBus::Broadcast(&GraphCanvas::TranslationRequests::Restore); + } + } + + void GraphCanvasSystemComponent::OnCatalogAssetAdded(const AZ::Data::AssetId& assetId) + { + ReloadDatabase(assetId); + } + + void GraphCanvasSystemComponent::OnCatalogAssetChanged(const AZ::Data::AssetId& assetId) + { + ReloadDatabase(assetId); + } + + void GraphCanvasSystemComponent::ReloadDatabase(const AZ::Data::AssetId& assetId) + { + AZ::Data::AssetInfo assetInfo; + AZ::Data::AssetCatalogRequestBus::BroadcastResult(assetInfo, &AZ::Data::AssetCatalogRequestBus::Events::GetAssetInfoById, assetId); + if (assetInfo.m_assetType == azrtti_typeid()) + { + GraphCanvas::TranslationRequestBus::Broadcast(&GraphCanvas::TranslationRequests::Restore); + } } void GraphCanvasSystemComponent::UnregisterAssetHandler() @@ -392,20 +406,5 @@ namespace GraphCanvas AZ::Data::AssetManager::Instance().UnregisterHandler(m_assetHandler.get()); m_assetHandler.reset(); } - - for (const AZ::Data::AssetId& assetId : m_translationAssets) - { - AZ::Data::AssetBus::MultiHandler::BusDisconnect(assetId); - } - m_translationAssets.clear(); - } - - void GraphCanvasSystemComponent::PopulateTranslationDatabase() - { - for (const AZ::Data::AssetId& assetId : m_translationAssets) - { - AZ::Data::AssetBus::MultiHandler::BusConnect(assetId); - AZ::Data::AssetManager::Instance().GetAsset(assetId, AZ::Data::AssetLoadBehavior::Default); - } } } diff --git a/Gems/GraphCanvas/Code/Source/GraphCanvas.h b/Gems/GraphCanvas/Code/Source/GraphCanvas.h index 7a4d9677ab..37bf064203 100644 --- a/Gems/GraphCanvas/Code/Source/GraphCanvas.h +++ b/Gems/GraphCanvas/Code/Source/GraphCanvas.h @@ -25,7 +25,6 @@ namespace GraphCanvas , private GraphCanvasRequestBus::Handler , protected Styling::PseudoElementFactoryRequestBus::Handler , protected AzFramework::AssetCatalogEventBus::Handler - , protected AZ::Data::AssetBus::MultiHandler { public: @@ -77,15 +76,20 @@ namespace GraphCanvas AZ::EntityId CreateVirtualChild(const AZ::EntityId& real, const AZStd::string& virtualChildElement) const override; //// + // AzFramework::AssetCatalogEventBus::Handler void OnCatalogLoaded(const char* /*catalogFile*/) override; + void OnCatalogAssetChanged(const AZ::Data::AssetId&) override; + void OnCatalogAssetAdded(const AZ::Data::AssetId&) override; + void OnCatalogAssetRemoved(const AZ::Data::AssetId& /*assetId*/, const AZ::Data::AssetInfo& /*assetInfo*/) override; + //// + + void ReloadDatabase(const AZ::Data::AssetId&); AZStd::unique_ptr m_assetHandler; void RegisterTranslationBuilder(); void UnregisterAssetHandler(); TranslationAssetWorker m_translationAssetWorker; - AZStd::vector m_translationAssets; - void PopulateTranslationDatabase(); TranslationDatabase m_translationDatabase; }; diff --git a/Gems/GraphCanvas/Code/Source/Translation/TranslationAsset.cpp b/Gems/GraphCanvas/Code/Source/Translation/TranslationAsset.cpp index a461866c46..3b026b4579 100644 --- a/Gems/GraphCanvas/Code/Source/Translation/TranslationAsset.cpp +++ b/Gems/GraphCanvas/Code/Source/Translation/TranslationAsset.cpp @@ -195,7 +195,7 @@ namespace GraphCanvas } else { - AZ_Error("TranslationAsset", false, "Serialization of the TranslationFormat failed for: %s", asset.GetHint().c_str()); + AZ_Warning("TranslationAsset", false, "Serialization of the TranslationFormat failed for: %s", asset.GetHint().c_str()); } } } diff --git a/Gems/GraphCanvas/Code/Source/Translation/TranslationAsset.h b/Gems/GraphCanvas/Code/Source/Translation/TranslationAsset.h index 653aac3afc..b31bf25851 100644 --- a/Gems/GraphCanvas/Code/Source/Translation/TranslationAsset.h +++ b/Gems/GraphCanvas/Code/Source/Translation/TranslationAsset.h @@ -59,14 +59,14 @@ namespace GraphCanvas //! //! Requirements: //! - Must have a top level array called "entries" - //! - Must provide a "key" element for any entry added + //! - Must provide a "base" element for any entry added //! //! Example: //! //! { //! "entries": [ //! { - //! "key": "Globals", + //! "base": "Globals", //! "details": { //! "name": "My Name", //! "tooltip": "My Tooltip" @@ -90,21 +90,21 @@ namespace GraphCanvas //! Globals.details.somearray.0.name //! Globals.details.somearray.1.name //! - //! There is one important aspect however, if an element in an array has a "key" value, the value of this key + //! There is one important aspect however, if an element in an array has a "base" value, the value of this key //! will replace the index. This is useful when the index and/or ordering of an entry is not relevant or may //! change. //! //! "somearray": [ { //! "name": "First one" - //! "key": "a_key" + //! "base": "a_key" //! }, { //! "name": "Second one", - //! "key": "b_key" + //! "base": "b_key" //! } ] //! - //! Globals.details.somearray.0.key == "a_key" + //! Globals.details.somearray.0.base == "a_key" //! Globals.details.somearray.0.name == "First one" - //! Globals.details.somearray.1.key == "b_key" + //! Globals.details.somearray.1.base == "b_key" //! Globals.details.somearray.1.name == "Second one" //! class TranslationAssetHandler diff --git a/Gems/GraphCanvas/Code/Source/Translation/TranslationBuilder.cpp b/Gems/GraphCanvas/Code/Source/Translation/TranslationBuilder.cpp index bac58c3ba1..01a661684a 100644 --- a/Gems/GraphCanvas/Code/Source/Translation/TranslationBuilder.cpp +++ b/Gems/GraphCanvas/Code/Source/Translation/TranslationBuilder.cpp @@ -30,20 +30,15 @@ namespace GraphCanvas void TranslationAssetWorker::Activate() { // Use AssetCatalog service to register ScriptCanvas asset type and extension - AZ::Data::AssetType assetType(azrtti_typeid()); - AZ::Data::AssetCatalogRequestBus::Broadcast(&AZ::Data::AssetCatalogRequests::AddAssetType, assetType); - AZ::Data::AssetCatalogRequestBus::Broadcast(&AZ::Data::AssetCatalogRequests::EnableCatalogForAsset, assetType); - AZ::Data::AssetCatalogRequestBus::Broadcast(&AZ::Data::AssetCatalogRequests::AddExtension, TranslationAsset::GetFileFilter()); - m_assetHandler = AZStd::make_unique(); - if (!AZ::Data::AssetManager::Instance().GetHandler(assetType)) - { - AZ::Data::AssetManager::Instance().RegisterHandler(m_assetHandler.get(), assetType); - } + + AssetBuilderSDK::AssetBuilderCommandBus::Handler::BusConnect(GetUUID()); } void TranslationAssetWorker::Deactivate() { + AssetBuilderSDK::AssetBuilderCommandBus::Handler::BusDisconnect(); + if (AZ::Data::AssetManager::Instance().GetHandler(AZ::Data::AssetType{ azrtti_typeid() })) { AZ::Data::AssetManager::Instance().UnregisterHandler(m_assetHandler.get()); diff --git a/Gems/GraphCanvas/Code/Source/Translation/TranslationBus.h b/Gems/GraphCanvas/Code/Source/Translation/TranslationBus.h index c135ce1515..95c37b4daa 100644 --- a/Gems/GraphCanvas/Code/Source/Translation/TranslationBus.h +++ b/Gems/GraphCanvas/Code/Source/Translation/TranslationBus.h @@ -10,8 +10,10 @@ #include "TranslationAsset.h" +#include #include + namespace GraphCanvas { namespace Translation @@ -88,10 +90,16 @@ namespace GraphCanvas static AZStd::string Sanitize(const AZStd::string& text) { AZStd::string result = text; + AZ::StringFunc::Replace(result, "*", "x"); + AZ::StringFunc::Replace(result, "(", "_"); + AZ::StringFunc::Replace(result, ")", "_"); + AZ::StringFunc::Replace(result, "{", "_"); + AZ::StringFunc::Replace(result, "}", "_"); AZ::StringFunc::Replace(result, ":", "_"); AZ::StringFunc::Replace(result, "<", "_"); AZ::StringFunc::Replace(result, ",", "_"); AZ::StringFunc::Replace(result, ">", " "); + AZ::StringFunc::Replace(result, "/", ""); AZ::StringFunc::Strip(result, " "); AZ::StringFunc::Path::Normalize(result); return result; @@ -117,32 +125,32 @@ namespace GraphCanvas virtual bool HasKey(const AZStd::string& /*key*/) { return false; } //! Returns the text value for a given key - virtual const char* Get(const AZStd::string& /*key*/) { return nullptr; } + virtual bool Get(const AZStd::string& /*key*/, AZStd::string& /*value*/) { return false; } struct Details { - AZStd::string Name; - AZStd::string Tooltip; - AZStd::string Category; - AZStd::string Subtitle; + AZStd::string m_name; + AZStd::string m_tooltip; + AZStd::string m_category; + AZStd::string m_subtitle; - bool Valid = false; + bool m_valid = false; Details() = default; Details(const Details& rhs) { - Name = rhs.Name; - Tooltip = rhs.Tooltip; - Subtitle = rhs.Subtitle; - Category = rhs.Category; - Valid = rhs.Valid; + m_name = rhs.m_name; + m_tooltip = rhs.m_tooltip; + m_category = rhs.m_category; + m_subtitle = rhs.m_subtitle; + m_valid = rhs.m_valid; } Details(const char* name, const char* tooltip, const char* subtitle, const char* category) - : Name(name), Tooltip(tooltip), Subtitle(subtitle), Category(category) + : m_name(name), m_tooltip(tooltip), m_subtitle(subtitle), m_category(category) { - Valid = !Name.empty(); + m_valid = !m_name.empty(); } }; @@ -150,7 +158,7 @@ namespace GraphCanvas virtual bool Add(const TranslationFormat& /*translationFormat*/) { return false; } //! Get the details associated with a given key (assumes they are within a "details" object) - virtual Details GetDetails(const AZStd::string& /*key*/) { return Details(); } + virtual Details GetDetails(const AZStd::string& /*key*/, const Details& /*fallbackDetails*/) { return Details(); } //! Generates the source JSON assets for all reflected elements virtual void GenerateSourceAssets() {} diff --git a/Gems/GraphCanvas/Code/Source/Translation/TranslationDatabase.cpp b/Gems/GraphCanvas/Code/Source/Translation/TranslationDatabase.cpp index 17c59d17bc..448f69adfa 100644 --- a/Gems/GraphCanvas/Code/Source/Translation/TranslationDatabase.cpp +++ b/Gems/GraphCanvas/Code/Source/Translation/TranslationDatabase.cpp @@ -104,35 +104,49 @@ namespace GraphCanvas return m_database.find(key) != m_database.end(); } - GraphCanvas::TranslationRequests::Details TranslationDatabase::GetDetails(const AZStd::string& key) + GraphCanvas::TranslationRequests::Details TranslationDatabase::GetDetails(const AZStd::string& key, const Details& fallbackDetails) { - const char* name = Get(key + ".name"); - const char* tooltip = Get(key + ".tooltip"); - const char* subtitle = Get(key + ".subtitle"); - const char* category = Get(key + ".category"); - - static bool s_traceMissingItems = true; - if (s_traceMissingItems) + Details details; + if (!Get(key + ".name", details.m_name)) { - AZ_TracePrintf("GraphCanvas", AZStd::string::format("Value (name) not found for key: %s", key.c_str()).c_str()); - AZ_TracePrintf("GraphCanvas", AZStd::string::format("Value (tooltip) not found for key: %s", key.c_str()).c_str()); - AZ_TracePrintf("GraphCanvas", AZStd::string::format("Value (subtitle) not found for key: %s", key.c_str()).c_str()); - AZ_TracePrintf("GraphCanvas", AZStd::string::format("Value (category) not found for key: %s", key.c_str()).c_str()); + details.m_name = fallbackDetails.m_name; } - return Details(name ? name : "", tooltip ? tooltip : "", subtitle ? subtitle : "", category ? category : ""); + if (!Get(key + ".tooltip", details.m_tooltip)) + { + details.m_tooltip = fallbackDetails.m_tooltip; + } + + if (!Get(key + ".subtitle", details.m_subtitle)) + { + details.m_subtitle = fallbackDetails.m_subtitle; + } + + if (!Get(key + ".category", details.m_category)) + { + details.m_category = fallbackDetails.m_category; + } + + return details; } - const char* TranslationDatabase::Get(const AZStd::string& key) + bool TranslationDatabase::Get(const AZStd::string& key, AZStd::string& value) { AZStd::lock_guard lock(m_mutex); if (m_database.find(key) != m_database.end()) { - return m_database[key].c_str(); + value = m_database[key]; + return true; } - return ""; + static bool s_traceMissingItems = false; + if (s_traceMissingItems) + { + AZ_TracePrintf("GraphCanvas", AZStd::string::format("Value not found for key: %s", key.c_str()).c_str()); + } + + return false; } bool TranslationDatabase::Add(const TranslationFormat& format) @@ -149,9 +163,11 @@ namespace GraphCanvas } else { - AZStd::string warning = AZStd::string::format("Unable to store key: %s with value: %s because that key already exists with value: %s", entry.first.c_str(), entry.second.c_str(), m_database[entry.first].c_str()); - AZ_Warning("TranslationSerializer", false, warning.c_str()); - warnings = true; + const bool valueMatches = entry.second == m_database[entry.first]; + AZ_Warning("TranslationDatabase", valueMatches, + R"(Unable to store key: "%s" with value: "%s" because that key already exists with value: "%s")", + entry.first.c_str(), entry.second.c_str(), m_database[entry.first].c_str()); + warnings = !valueMatches; } } diff --git a/Gems/GraphCanvas/Code/Source/Translation/TranslationDatabase.h b/Gems/GraphCanvas/Code/Source/Translation/TranslationDatabase.h index f1d20d523f..b70adfa4a5 100644 --- a/Gems/GraphCanvas/Code/Source/Translation/TranslationDatabase.h +++ b/Gems/GraphCanvas/Code/Source/Translation/TranslationDatabase.h @@ -43,9 +43,9 @@ namespace GraphCanvas bool HasKey(const AZStd::string& key) override; - TranslationRequests::Details GetDetails(const AZStd::string& key) override; + TranslationRequests::Details GetDetails(const AZStd::string& key, const Details& value) override; - const char* Get(const AZStd::string& key) override; + bool Get(const AZStd::string& key, AZStd::string& value) override; bool Add(const TranslationFormat& format) override; diff --git a/Gems/GraphCanvas/Code/Source/Translation/TranslationSerializer.cpp b/Gems/GraphCanvas/Code/Source/Translation/TranslationSerializer.cpp index 3875f76d92..035954555c 100644 --- a/Gems/GraphCanvas/Code/Source/Translation/TranslationSerializer.cpp +++ b/Gems/GraphCanvas/Code/Source/Translation/TranslationSerializer.cpp @@ -11,52 +11,44 @@ namespace GraphCanvas { - namespace Schema - { - namespace Field - { - static constexpr char key[] = "key"; - static constexpr char context[] = "context"; - static constexpr char variant[] = "variant"; - static constexpr char entries[] = "entries"; - } - } - AZ_CLASS_ALLOCATOR_IMPL(TranslationFormatSerializer, AZ::SystemAllocator, 0); void AddEntryToDatabase(const AZStd::string& baseKey, const AZStd::string& name, const rapidjson::Value& it, TranslationFormat* translationFormat) { - AZStd::string finalKey = baseKey; if (it.IsString()) { - if (translationFormat->m_database.find(finalKey) == translationFormat->m_database.end()) + auto translationDbItr = translationFormat->m_database.find(baseKey); + if (translationDbItr == translationFormat->m_database.end()) { - translationFormat->m_database[finalKey] = it.GetString(); + translationFormat->m_database[baseKey] = it.GetString(); } else { + [[maybe_unused]] const AZStd::string& existingValue = translationDbItr->second; + // There is a name collision - AZStd::string error = AZStd::string::format("Unable to store key: %s with value: %s because that key already exists", finalKey.c_str(), it.GetString()); - AZ_Error("TranslationSerializer", false, error.c_str()); + AZ_Error("TranslationSerializer", existingValue == it.GetString(), + R"(Unable to store key: "%s" with value: "%s" because that key already exists with value: "%s" (proposed: "%s"))", + baseKey.c_str(), it.GetString(), existingValue.c_str(), it.GetString()); } } else if (it.IsObject()) { + AZStd::string finalKey = baseKey; if (!name.empty()) { finalKey.append("."); finalKey.append(name); } - AZStd::string itemKey = finalKey; + AZStd::string itemKey; for (auto objIt = it.MemberBegin(); objIt != it.MemberEnd(); ++objIt) { + itemKey = finalKey; itemKey.append("."); itemKey.append(objIt->name.GetString()); AddEntryToDatabase(itemKey, name, objIt->value, translationFormat); - - itemKey = finalKey; } } @@ -69,19 +61,21 @@ namespace GraphCanvas key.append(name); } - AZStd::string itemKey = key; + AZStd::string itemKey; const rapidjson::Value& array = it; for (rapidjson::SizeType i = 0; i < array.Size(); ++i) { - // so, here, I need to go in and if there is a "key" member within the object, then I need to use that, - // if there isn't, I can use the %d - if (array[i].IsObject()) + itemKey = key; + + // if there is a "base" member within the object, then use it, otherwise use the index + const auto& element = array[i]; + if (element.IsObject()) { - if (array[i].HasMember(Schema::Field::key)) + rapidjson::Value::ConstMemberIterator innerKeyItr = element.FindMember(Schema::Field::key); + if (innerKeyItr != element.MemberEnd()) { - AZStd::string innerKey = array[i].FindMember(Schema::Field::key)->value.GetString(); - itemKey.append(AZStd::string::format(".%s", innerKey.c_str())); + itemKey.append(AZStd::string::format(".%s", innerKeyItr->value.GetString())); } else { @@ -89,9 +83,7 @@ namespace GraphCanvas } } - AddEntryToDatabase(itemKey, "", array[i], translationFormat); - - itemKey = key; + AddEntryToDatabase(itemKey, "", element, translationFormat); } } } @@ -124,42 +116,32 @@ namespace GraphCanvas { const rapidjson::Value::ConstMemberIterator entries = inputValue.FindMember(Schema::Field::entries); + AZStd::string keyStr; + AZStd::string contextStr; + AZStd::string variantStr; + AZStd::string baseKey; + rapidjson::SizeType entryCount = entries->value.Size(); for (rapidjson::SizeType i = 0; i < entryCount; ++i) { const rapidjson::Value& entry = entries->value[i]; - AZStd::string keyStr; - rapidjson::Value::ConstMemberIterator keyValue; - if (entry.HasMember(Schema::Field::key)) - { - keyValue = entry.FindMember(Schema::Field::key); - keyStr = keyValue->value.GetString(); - } + rapidjson::Value::ConstMemberIterator keyItr = entry.FindMember(Schema::Field::key); + keyStr = keyItr != entry.MemberEnd() ? keyItr->value.GetString() : ""; - AZStd::string contextStr; - rapidjson::Value::ConstMemberIterator contextValue; - if (entry.HasMember(Schema::Field::context)) - { - contextValue = entry.FindMember(Schema::Field::context); - contextStr = contextValue->value.GetString(); - } + rapidjson::Value::ConstMemberIterator contextItr = entry.FindMember(Schema::Field::context); + contextStr = contextItr != entry.MemberEnd() ? contextItr->value.GetString() : ""; - AZStd::string variantStr; - rapidjson::Value::ConstMemberIterator variantValue; - if (entry.HasMember(Schema::Field::variant)) - { - variantValue = entry.FindMember(Schema::Field::variant); - variantStr = variantValue->value.GetString(); - } + rapidjson::Value::ConstMemberIterator variantItr = entry.FindMember(Schema::Field::variant); + variantStr = variantItr != entry.MemberEnd() ? variantItr->value.GetString() : ""; - AZStd::string baseKey = contextStr; if (keyStr.empty()) { - AZ_Error("TranslationDatabase", false, "Every entry in the Translation data must have a key: %s", baseKey.c_str()); + AZ_Warning("TranslationDatabase", false, "Every entry in the Translation data must have a key: %s", baseKey.c_str()); return context.Report(JSR::Tasks::ReadField, JSR::Outcomes::Unsupported, "Every entry in the Translation data must have a key"); } + baseKey = contextStr; if (!baseKey.empty()) { baseKey.append("."); @@ -177,7 +159,7 @@ namespace GraphCanvas for (auto it = entry.MemberBegin(); it != entry.MemberEnd(); ++it) { // Skip the fixed elements - if (it == keyValue || it == contextValue || it == variantValue) + if (it == keyItr || it == contextItr || it == variantItr) { continue; } diff --git a/Gems/GraphCanvas/Code/Source/Translation/TranslationSerializer.h b/Gems/GraphCanvas/Code/Source/Translation/TranslationSerializer.h index fa7e6e64e1..edf3b9013b 100644 --- a/Gems/GraphCanvas/Code/Source/Translation/TranslationSerializer.h +++ b/Gems/GraphCanvas/Code/Source/Translation/TranslationSerializer.h @@ -23,4 +23,15 @@ namespace GraphCanvas AZ::JsonSerializationResult::Result Store(rapidjson::Value& outputValue, const void* inputValue, const void* defaultValue, const AZ::Uuid& valueTypeId, AZ::JsonSerializerContext& context) override; }; + + namespace Schema + { + namespace Field + { + inline constexpr char key[] = "base"; + inline constexpr char context[] = "context"; + inline constexpr char variant[] = "variant"; + inline constexpr char entries[] = "entries"; + } + } } diff --git a/Gems/GraphCanvas/Code/Source/Widgets/GraphCanvasLabel.cpp b/Gems/GraphCanvas/Code/Source/Widgets/GraphCanvasLabel.cpp index e76487a4e8..1ff2146717 100644 --- a/Gems/GraphCanvas/Code/Source/Widgets/GraphCanvasLabel.cpp +++ b/Gems/GraphCanvas/Code/Source/Widgets/GraphCanvasLabel.cpp @@ -20,6 +20,7 @@ #include #include #include +#include namespace GraphCanvas { @@ -76,19 +77,11 @@ namespace GraphCanvas m_hasBorderOverride = false; } - void GraphCanvasLabel::SetLabel(const AZStd::string& label, const AZStd::string& translationContext, const AZStd::string& translationKey) + void GraphCanvasLabel::SetLabel(const AZStd::string& value) { - TranslationKeyedString keyedString(label, translationContext, translationKey); - SetLabel(keyedString); - } - - void GraphCanvasLabel::SetLabel(const TranslationKeyedString& value) - { - AZStd::string displayString = value.GetDisplayString(); - - if (m_labelText.compare(QString(displayString.c_str()))) + if (m_labelText.compare(QString(value.c_str()))) { - m_labelText = Tools::qStringFromUtf8(displayString); + m_labelText = Tools::qStringFromUtf8(value); UpdateDisplayText(); RefreshDisplay(); diff --git a/Gems/GraphCanvas/Code/Source/Widgets/GraphCanvasLabel.h b/Gems/GraphCanvas/Code/Source/Widgets/GraphCanvasLabel.h index 0c60857ca4..3fbd934909 100644 --- a/Gems/GraphCanvas/Code/Source/Widgets/GraphCanvasLabel.h +++ b/Gems/GraphCanvas/Code/Source/Widgets/GraphCanvasLabel.h @@ -16,7 +16,6 @@ AZ_PUSH_DISABLE_WARNING(4251 4800, "-Wunknown-warning-option") AZ_POP_DISABLE_WARNING #include -#include namespace GraphCanvas { @@ -51,9 +50,8 @@ namespace GraphCanvas const QBrush& GetBorderColorOverride() const; void ClearBorderColorOverride(); - void SetLabel(const AZStd::string& label, const AZStd::string& translationContext = AZStd::string(), const AZStd::string& translationKey = AZStd::string()); - void SetLabel(const TranslationKeyedString& value); - AZStd::string GetLabel() const { return AZStd::string(m_labelText.toStdString().c_str()); } + void SetLabel(const AZStd::string& value); + AZStd::string GetLabel() const { return AZStd::string(m_labelText.toUtf8().data()); } void SetSceneStyle(const AZ::EntityId& sceneId, const char* style); void SetStyle(const AZ::EntityId& entityId, const char* styleElement); diff --git a/Gems/GraphCanvas/Code/StaticLib/GraphCanvas/Components/Nodes/NodeBus.h b/Gems/GraphCanvas/Code/StaticLib/GraphCanvas/Components/Nodes/NodeBus.h index 46f34ea9f8..d5b8a7ff57 100644 --- a/Gems/GraphCanvas/Code/StaticLib/GraphCanvas/Components/Nodes/NodeBus.h +++ b/Gems/GraphCanvas/Code/StaticLib/GraphCanvas/Components/Nodes/NodeBus.h @@ -15,7 +15,6 @@ #include #include #include -#include #include @@ -40,9 +39,6 @@ namespace GraphCanvas //! Set the tooltip for the node, which will display when the mouse is over the node but not a child item. virtual void SetTooltip(const AZStd::string&) = 0; - //! Set the translation keyed tooltip for the node, which will display when the mouse is over the node but not a child item. - virtual void SetTranslationKeyedTooltip(const TranslationKeyedString&) = 0; - //! Get the tooltip that is currently set for the node. virtual const AZStd::string GetTooltip() const = 0; diff --git a/Gems/GraphCanvas/Code/StaticLib/GraphCanvas/Components/Nodes/NodeTitleBus.h b/Gems/GraphCanvas/Code/StaticLib/GraphCanvas/Components/Nodes/NodeTitleBus.h index 8d298c56d6..6470ebfbd1 100644 --- a/Gems/GraphCanvas/Code/StaticLib/GraphCanvas/Components/Nodes/NodeTitleBus.h +++ b/Gems/GraphCanvas/Code/StaticLib/GraphCanvas/Components/Nodes/NodeTitleBus.h @@ -11,7 +11,6 @@ #include #include -#include #include #include @@ -38,19 +37,18 @@ namespace GraphCanvas virtual QGraphicsWidget* GetGraphicsWidget() = 0; + //! Set the node's details, title, subtitle, tooltip + virtual void SetDetails(const AZStd::string& title, const AZStd::string& subtitle) = 0; + //! Set the Node's title. virtual void SetTitle(const AZStd::string& value) = 0; - virtual void SetTranslationKeyedTitle(const TranslationKeyedString& value) = 0; - //! Get the Node's title. virtual AZStd::string GetTitle() const = 0; //! Set the Node's sub-title. virtual void SetSubTitle(const AZStd::string& value) = 0; - virtual void SetTranslationKeyedSubTitle(const TranslationKeyedString& value) = 0; - //! Get the Node's sub-title. virtual AZStd::string GetSubTitle() const = 0; diff --git a/Gems/GraphCanvas/Code/StaticLib/GraphCanvas/Components/Slots/SlotBus.h b/Gems/GraphCanvas/Code/StaticLib/GraphCanvas/Components/Slots/SlotBus.h index e67df2d2b6..8df36232fe 100644 --- a/Gems/GraphCanvas/Code/StaticLib/GraphCanvas/Components/Slots/SlotBus.h +++ b/Gems/GraphCanvas/Code/StaticLib/GraphCanvas/Components/Slots/SlotBus.h @@ -16,7 +16,6 @@ #include #include -#include class QGraphicsLayoutItem; @@ -89,8 +88,9 @@ namespace GraphCanvas ConnectionType m_connectionType = ConnectionType::CT_Invalid; - TranslationKeyedString m_tooltip = TranslationKeyedString(); - TranslationKeyedString m_name = TranslationKeyedString(); + AZStd::string m_tooltip; + AZStd::string m_name; + SlotGroup m_slotGroup = SlotGroups::Invalid; AZStd::string m_textDecoration; @@ -209,22 +209,19 @@ namespace GraphCanvas //! Get the name, or label, of the slot. //! These generally appear as a label against \ref Input or \ref Output slots. virtual const AZStd::string GetName() const = 0; + //! Set the slot's name. virtual void SetName(const AZStd::string&) = 0; - //! Get and set the keys used for slot name translation. - virtual TranslationKeyedString GetTranslationKeyedName() const = 0; - virtual void SetTranslationKeyedName(const TranslationKeyedString&) = 0; + //! Set the slot's name & tooltip. + virtual void SetDetails(const AZStd::string& name, const AZStd::string& tooltip) = 0; //! Get the tooltip for the slot. virtual const AZStd::string GetTooltip() const = 0; + //! Set the tooltip this slot should display. virtual void SetTooltip(const AZStd::string&) = 0; - //! Get and set the keys used for slot tooltip translation. - virtual TranslationKeyedString GetTranslationKeyedTooltip() const = 0; - virtual void SetTranslationKeyedTooltip(const TranslationKeyedString&) = 0; - //! Get the group of the slot virtual SlotGroup GetSlotGroup() const = 0; @@ -370,9 +367,10 @@ namespace GraphCanvas using BusIdType = SlotId; //! When the name of the slot changes, the new name is signaled. - virtual void OnNameChanged(const TranslationKeyedString&) {} + virtual void OnNameChanged(const AZStd::string&) {} + //! When the tooltip of the slot changes, the new tooltip value is emitted. - virtual void OnTooltipChanged(const TranslationKeyedString&) {} + virtual void OnTooltipChanged(const AZStd::string&) {} virtual void OnRegisteredToNode(const AZ::EntityId&) {} diff --git a/Gems/GraphCanvas/Code/StaticLib/GraphCanvas/Editor/GraphCanvasProfiler.h b/Gems/GraphCanvas/Code/StaticLib/GraphCanvas/Editor/GraphCanvasProfiler.h index ae55baa681..ab54a125fd 100644 --- a/Gems/GraphCanvas/Code/StaticLib/GraphCanvas/Editor/GraphCanvasProfiler.h +++ b/Gems/GraphCanvas/Code/StaticLib/GraphCanvas/Editor/GraphCanvasProfiler.h @@ -10,7 +10,7 @@ #include #define GRAPH_CANVAS_PROFILE_FUNCTION() AZ_PROFILE_FUNCTION(AzToolsFramework); -#define GRAPH_CANVAS_PROFILE_SCOPE(message) AZ_PROFILE_SCOPE(AzToolsFramework, message); +#define GRAPH_CANVAS_PROFILE_SCOPE(budget, message) AZ_PROFILE_SCOPE(budget, message); #if GRAPH_CANVAS_ENABLE_DETAILED_PROFILING #define GRAPH_CANVAS_DETAILED_PROFILE_FUNCTION() AZ_PROFILE_FUNCTION(AzToolsFramework); diff --git a/Gems/GraphCanvas/Code/StaticLib/GraphCanvas/Styling/StyleManager.cpp b/Gems/GraphCanvas/Code/StaticLib/GraphCanvas/Styling/StyleManager.cpp index 0b4691ecf5..a2f5206012 100644 --- a/Gems/GraphCanvas/Code/StaticLib/GraphCanvas/Styling/StyleManager.cpp +++ b/Gems/GraphCanvas/Code/StaticLib/GraphCanvas/Styling/StyleManager.cpp @@ -6,6 +6,7 @@ * */ #include +#include AZ_PUSH_DISABLE_WARNING(4251 4800 4244, "-Wunknown-warning-option") #include @@ -141,6 +142,8 @@ namespace namespace GraphCanvas { + AZ_DEFINE_BUDGET(StyleManager); + //////////////////////// // StyleSheetComponent //////////////////////// @@ -271,6 +274,8 @@ namespace GraphCanvas : m_editorId(editorId) , m_assetPath(assetPath) { + GRAPH_CANVAS_PROFILE_SCOPE(StyleManager, "StyleManager::StyleManager"); + StyleManagerRequestBus::Handler::BusConnect(m_editorId); AZ::Data::AssetInfo assetInfo; @@ -315,8 +320,11 @@ namespace GraphCanvas } } + void StyleManager::LoadStyleSheet() { + GRAPH_CANVAS_PROFILE_SCOPE(StyleManager, "LoadStyleSheet"); + AZStd::string file = AZStd::string::format("@products@/%s", m_assetPath.c_str()); AZ::IO::FileIOBase* fileBase = AZ::IO::FileIOBase::GetInstance(); @@ -393,7 +401,7 @@ namespace GraphCanvas AZ::EntityId StyleManager::ResolveStyles(const AZ::EntityId& object) const { - GRAPH_CANVAS_DETAILED_PROFILE_FUNCTION(); + GRAPH_CANVAS_PROFILE_SCOPE(StyleManager, "ResolveStyles"); Styling::SelectorVector selectors; StyledEntityRequestBus::EventResult(selectors, object, &StyledEntityRequests::GetStyleSelectors); @@ -401,7 +409,7 @@ namespace GraphCanvas QVector matches; for (const auto& style : m_styles) { - GRAPH_CANVAS_DETAILED_PROFILE_SCOPE("StyleManager::ResolveStyles::StyleMatching"); + GRAPH_CANVAS_PROFILE_SCOPE(StyleManager, "StyleManager::ResolveStyles::StyleMatching"); int complexity = style->Matches(object); if (complexity != 0) { @@ -410,7 +418,7 @@ namespace GraphCanvas } { - GRAPH_CANVAS_DETAILED_PROFILE_SCOPE("StyleManager::ResolveStyles::Sorting"); + GRAPH_CANVAS_PROFILE_SCOPE(StyleManager, "StyleManager::ResolveStyles::Sorting"); std::stable_sort(matches.begin(), matches.end()); } Styling::StyleVector result; @@ -418,7 +426,7 @@ namespace GraphCanvas const auto& constMatches = matches; for (auto& match : constMatches) { - GRAPH_CANVAS_DETAILED_PROFILE_SCOPE("StyleManager::ResolveStyles::ResultConstruction"); + GRAPH_CANVAS_PROFILE_SCOPE(StyleManager, "StyleManager::ResolveStyles::ResultConstruction"); result.push_back(match.style); } diff --git a/Gems/GraphCanvas/Code/StaticLib/GraphCanvas/Types/TranslationTypes.h b/Gems/GraphCanvas/Code/StaticLib/GraphCanvas/Types/TranslationTypes.h deleted file mode 100644 index 7205be7c00..0000000000 --- a/Gems/GraphCanvas/Code/StaticLib/GraphCanvas/Types/TranslationTypes.h +++ /dev/null @@ -1,116 +0,0 @@ -/* - * Copyright (c) Contributors to the Open 3D Engine Project. - * For complete copyright and license terms please see the LICENSE at the root of this distribution. - * - * SPDX-License-Identifier: Apache-2.0 OR MIT - * - */ - -#pragma once - -#include - -#include - -namespace GraphCanvas -{ - struct TranslationKeyedString - { - public: - AZ_TYPE_INFO(TranslationKeyedString, "{B796685C-0335-4E74-9EF8-A1933E8B2142}"); - AZ_CLASS_ALLOCATOR(TranslationKeyedString, AZ::SystemAllocator, 0); - - static void Reflect(AZ::ReflectContext* context) - { - AZ::SerializeContext* serializeContext = azrtti_cast(context); - if (!serializeContext) - { - return; - } - - serializeContext->Class() - ->Version(1) - ->Field("Fallback", &TranslationKeyedString::m_fallback) - ->Field("Context", &TranslationKeyedString::m_context) - ->Field("Key", &TranslationKeyedString::m_key) - ; - } - - TranslationKeyedString() - : m_dirtyText(true) - { - } - - ~TranslationKeyedString() = default; - - TranslationKeyedString(const AZStd::string& fallback, const AZStd::string& context = AZStd::string(), const AZStd::string& key = AZStd::string()) - : m_fallback(fallback) - , m_context(context) - , m_key(key) - , m_dirtyText(true) - { - } - - const AZStd::string GetDisplayString() const - { - if (m_dirtyText) - { - const_cast(this)->TranslateString(); - } - - return m_display; - } - - void TranslateString() - { - m_display = m_fallback; - - if (!m_context.empty() && !m_key.empty()) - { - AZStd::string translatedText = QCoreApplication::translate(m_context.c_str(), m_key.c_str()).toUtf8().data(); - - if (translatedText != m_key) - { - m_display = translatedText; - } - } - - m_dirtyText = false; - } - - bool empty() const - { - return m_fallback.empty() && (m_context.empty() || m_key.empty()); - } - - bool operator==(const TranslationKeyedString& other) const - { - return m_fallback == other.m_fallback - && m_context == other.m_context - && m_key == other.m_key - ; - } - - void Clear() - { - m_key.clear(); - m_context.clear(); - m_fallback.clear(); - } - - void SetFallback(const AZStd::string& fallback) - { - m_fallback = fallback; - m_dirtyText = true; - } - - AZStd::string m_context; - AZStd::string m_key; - AZStd::string m_display; - - private: - AZStd::string m_fallback; - - bool m_dirtyText; - }; -} diff --git a/Gems/GraphCanvas/Code/StaticLib/GraphCanvas/Widgets/AssetEditorToolbar/AssetEditorToolbar.ui b/Gems/GraphCanvas/Code/StaticLib/GraphCanvas/Widgets/AssetEditorToolbar/AssetEditorToolbar.ui index 688b3724e4..cf7a8e31d1 100644 --- a/Gems/GraphCanvas/Code/StaticLib/GraphCanvas/Widgets/AssetEditorToolbar/AssetEditorToolbar.ui +++ b/Gems/GraphCanvas/Code/StaticLib/GraphCanvas/Widgets/AssetEditorToolbar/AssetEditorToolbar.ui @@ -56,7 +56,7 @@ - Groups the current selection in the active graph [Ctrl+Shift+G] + Groups the current selection in the active graph [Ctrl+Alt+O] ... @@ -66,14 +66,14 @@ :/GraphCanvasEditorResources/group.svg:/GraphCanvasEditorResources/group.svg - Ctrl+Shift+G + Ctrl+Alt+O - <html><head/><body><p>Ungroups the selected element in the active graph [Ctrl+Shift+H]</p></body></html> + Ungroups the selected element in the active graph [Ctrl+Alt+P] ... @@ -83,7 +83,7 @@ :/GraphCanvasEditorResources/ungroup.svg:/GraphCanvasEditorResources/ungroup.svg - Ctrl+Shift+H + Ctrl+Alt+P diff --git a/Gems/GraphCanvas/Code/StaticLib/GraphCanvas/Widgets/EditorContextMenu/EditorContextMenu.cpp b/Gems/GraphCanvas/Code/StaticLib/GraphCanvas/Widgets/EditorContextMenu/EditorContextMenu.cpp index a1e921684f..854918ac19 100644 --- a/Gems/GraphCanvas/Code/StaticLib/GraphCanvas/Widgets/EditorContextMenu/EditorContextMenu.cpp +++ b/Gems/GraphCanvas/Code/StaticLib/GraphCanvas/Widgets/EditorContextMenu/EditorContextMenu.cpp @@ -119,6 +119,11 @@ namespace GraphCanvas m_nodePalette->setProperty("HasNoWindowDecorations", true); m_nodePalette->SetupNodePalette(config); + if (m_userNodePaletteWidth > 0) + { + m_nodePalette->setFixedWidth(m_userNodePaletteWidth); + } + QWidgetAction* actionWidget = new QWidgetAction(this); actionWidget->setDefaultWidget(m_nodePalette); diff --git a/Gems/GraphCanvas/Code/StaticLib/GraphCanvas/Widgets/EditorContextMenu/EditorContextMenu.h b/Gems/GraphCanvas/Code/StaticLib/GraphCanvas/Widgets/EditorContextMenu/EditorContextMenu.h index a942858f56..08ee8cecbf 100644 --- a/Gems/GraphCanvas/Code/StaticLib/GraphCanvas/Widgets/EditorContextMenu/EditorContextMenu.h +++ b/Gems/GraphCanvas/Code/StaticLib/GraphCanvas/Widgets/EditorContextMenu/EditorContextMenu.h @@ -63,34 +63,34 @@ namespace GraphCanvas void ResetSourceSlotFilter(); void FilterForSourceSlot(const GraphId& graphId, const AZ::EntityId& sourceSlotId); - protected slots: + protected Q_SLOTS: virtual void SetupDisplay(); virtual void HandleContextMenuSelection(); protected: + virtual void OnRefreshActions(const GraphId& graphId, const AZ::EntityId& targetMemberId); void keyPressEvent(QKeyEvent* keyEvent) override; - NodePaletteWidget* m_nodePalette = nullptr; - - private: - void ConstructMenu(); void AddUnprocessedActions(AZStd::vector& actions); - bool m_finalized; - bool m_isToolBarMenu; + NodePaletteWidget* m_nodePalette = nullptr; + + bool m_finalized; + bool m_isToolBarMenu; + AZ::u32 m_userNodePaletteWidth = 300; EditorId m_editorId; - AZStd::vector< ActionGroupId > m_actionGroupOrdering; - AZStd::unordered_set< ActionGroupId > m_actionGroups; + AZStd::vector m_actionGroupOrdering; + AZStd::unordered_set m_actionGroups; AZStd::vector m_unprocessedFrontActions; AZStd::vector m_unprocessedActions; AZStd::vector m_unprocessedBackActions; - AZStd::unordered_map< AZStd::string, QMenu* > m_subMenuMap; + AZStd::unordered_map m_subMenuMap; }; } diff --git a/Gems/GraphCanvas/Code/StaticLib/GraphCanvas/Widgets/GraphCanvasEditor/GraphCanvasAssetEditorMainWindow.h b/Gems/GraphCanvas/Code/StaticLib/GraphCanvas/Widgets/GraphCanvasEditor/GraphCanvasAssetEditorMainWindow.h index 139c540767..1c83fb7717 100644 --- a/Gems/GraphCanvas/Code/StaticLib/GraphCanvas/Widgets/GraphCanvasEditor/GraphCanvasAssetEditorMainWindow.h +++ b/Gems/GraphCanvas/Code/StaticLib/GraphCanvas/Widgets/GraphCanvasEditor/GraphCanvasAssetEditorMainWindow.h @@ -89,7 +89,7 @@ namespace GraphCanvas explicit AssetEditorMainWindow(AssetEditorWindowConfig* config, QWidget* parent = nullptr); virtual ~AssetEditorMainWindow(); - virtual void SetupUI(); + void SetupUI(); void SetDropAreaText(AZStd::string_view text); const EditorId& GetEditorId() const; diff --git a/Gems/GraphCanvas/Code/StaticLib/GraphCanvas/Widgets/NodePalette/NodePaletteWidget.cpp b/Gems/GraphCanvas/Code/StaticLib/GraphCanvas/Widgets/NodePalette/NodePaletteWidget.cpp index 5a1aaedeb9..f6cec6de6b 100644 --- a/Gems/GraphCanvas/Code/StaticLib/GraphCanvas/Widgets/NodePalette/NodePaletteWidget.cpp +++ b/Gems/GraphCanvas/Code/StaticLib/GraphCanvas/Widgets/NodePalette/NodePaletteWidget.cpp @@ -85,7 +85,7 @@ namespace GraphCanvas if (leftSpot < textRect.right()) { int visibleLength = AZStd::GetMin(selectedTextLength, textRect.right() - leftSpot); - QRect highlightRect(textRect.left() + preSelectedTextLength, textRect.top(), visibleLength, textRect.height()); + QRect highlightRect(textRect.left() + preSelectedTextLength + 4, textRect.top(), visibleLength, textRect.height()); // paint the highlight rect painter->fillRect(highlightRect, options.palette.highlight()); diff --git a/Gems/GraphCanvas/Code/StaticLib/GraphCanvas/Widgets/NodePalette/TreeItems/NodePaletteTreeItem.cpp b/Gems/GraphCanvas/Code/StaticLib/GraphCanvas/Widgets/NodePalette/TreeItems/NodePaletteTreeItem.cpp index cbdfbfcf0c..bce17c6348 100644 --- a/Gems/GraphCanvas/Code/StaticLib/GraphCanvas/Widgets/NodePalette/TreeItems/NodePaletteTreeItem.cpp +++ b/Gems/GraphCanvas/Code/StaticLib/GraphCanvas/Widgets/NodePalette/TreeItems/NodePaletteTreeItem.cpp @@ -9,6 +9,10 @@ #include +AZ_PUSH_DISABLE_WARNING(4244 4251 4800, "-Wunknown-warning-option") +#include +AZ_POP_DISABLE_WARNING + namespace GraphCanvas { //////////////////////// @@ -19,7 +23,6 @@ namespace GraphCanvas NodePaletteTreeItem::NodePaletteTreeItem(AZStd::string_view name, EditorId editorId) : GraphCanvas::GraphCanvasTreeItem() - , m_errorIcon(":/GraphCanvasEditorResources/toast_error_icon.png") , m_editorId(editorId) , m_name(QString::fromUtf8(name.data(), static_cast(name.size()))) , m_selected(false) @@ -88,7 +91,7 @@ namespace GraphCanvas case Qt::DecorationRole: if (HasError()) { - return m_errorIcon; + return QIcon(":/GraphCanvasEditorResources/toast_error_icon.png"); } break; default: diff --git a/Gems/GraphCanvas/Code/StaticLib/GraphCanvas/Widgets/NodePalette/TreeItems/NodePaletteTreeItem.h b/Gems/GraphCanvas/Code/StaticLib/GraphCanvas/Widgets/NodePalette/TreeItems/NodePaletteTreeItem.h index fcb4d79077..4259caf69b 100644 --- a/Gems/GraphCanvas/Code/StaticLib/GraphCanvas/Widgets/NodePalette/TreeItems/NodePaletteTreeItem.h +++ b/Gems/GraphCanvas/Code/StaticLib/GraphCanvas/Widgets/NodePalette/TreeItems/NodePaletteTreeItem.h @@ -9,16 +9,13 @@ #include -AZ_PUSH_DISABLE_WARNING(4244 4251 4800, "-Wunknown-warning-option") -#include -AZ_POP_DISABLE_WARNING - #include #include #include #include #include +#include namespace GraphCanvas { @@ -86,6 +83,9 @@ namespace GraphCanvas void SetError(const AZStd::string& errorString); + virtual AZ::IO::Path GetTranslationDataPath() const { return AZ::IO::Path(); } + virtual void GenerateTranslationData() {} + protected: void PreOnChildAdded(GraphCanvasTreeItem* item) override; @@ -113,7 +113,6 @@ namespace GraphCanvas private: // Error Display - QIcon m_errorIcon; QString m_errorString; AZStd::string m_styleOverride; diff --git a/Gems/GraphCanvas/Code/graphcanvas_staticlib_files.cmake b/Gems/GraphCanvas/Code/graphcanvas_staticlib_files.cmake index b62ff303a6..455b5673d3 100644 --- a/Gems/GraphCanvas/Code/graphcanvas_staticlib_files.cmake +++ b/Gems/GraphCanvas/Code/graphcanvas_staticlib_files.cmake @@ -102,8 +102,7 @@ set(FILES StaticLib/GraphCanvas/Types/GraphCanvasGraphData.h StaticLib/GraphCanvas/Types/GraphCanvasGraphSerialization.cpp StaticLib/GraphCanvas/Types/GraphCanvasGraphSerialization.h - StaticLib/GraphCanvas/Types/SceneMemberComponentSaveData.h - StaticLib/GraphCanvas/Types/TranslationTypes.h + StaticLib/GraphCanvas/Types/SceneMemberComponentSaveData.h StaticLib/GraphCanvas/Types/Types.h StaticLib/GraphCanvas/Types/QtMetaTypes.h StaticLib/GraphCanvas/Widgets/Resources/default_style.json diff --git a/Gems/GraphCanvas/gem.json b/Gems/GraphCanvas/gem.json index 760bd157df..4762cfef35 100644 --- a/Gems/GraphCanvas/gem.json +++ b/Gems/GraphCanvas/gem.json @@ -2,6 +2,7 @@ "gem_name": "GraphCanvas", "display_name": "Graph Canvas", "license": "Apache-2.0 Or MIT", + "license_url": "https://github.com/o3de/o3de/blob/development/LICENSE.txt", "origin": "Open 3D Engine - o3de.org", "type": "Tool", "summary": "The Graph Canvas Gem provides a C++ framework for creating custom graphical node based editors for Open 3D Engine.", diff --git a/Gems/GraphModel/Code/Include/GraphModel/Integration/NodePalette/InputOutputNodePaletteItem.h b/Gems/GraphModel/Code/Include/GraphModel/Integration/NodePalette/InputOutputNodePaletteItem.h index 15f308c4d2..99a32d965b 100644 --- a/Gems/GraphModel/Code/Include/GraphModel/Integration/NodePalette/InputOutputNodePaletteItem.h +++ b/Gems/GraphModel/Code/Include/GraphModel/Integration/NodePalette/InputOutputNodePaletteItem.h @@ -33,7 +33,7 @@ namespace GraphModelIntegration //! Constructor //! \param nodeName Name of the node that will show up in the Palette - //! \param editorId Unique name of the client system editor (ex: AZ_CRC("ShaderCanvas", 0xa6d1a85a)) + //! \param editorId Unique name of the client system editor (ex: AZ_CRC("ShaderCanvas", 0x0a1dff96)) //! \param dataType The type of data that the InputGraphNode or OutputGraphNode will represent InputOutputNodePaletteItem(AZStd::string_view nodeName, GraphCanvas::EditorId editorId, GraphModel::DataTypePtr dataType) : DraggableNodePaletteTreeItem(nodeName, editorId) diff --git a/Gems/GraphModel/Code/Include/GraphModel/Integration/NodePalette/ModuleNodePaletteItem.h b/Gems/GraphModel/Code/Include/GraphModel/Integration/NodePalette/ModuleNodePaletteItem.h index a0121ac035..51e1fca55b 100644 --- a/Gems/GraphModel/Code/Include/GraphModel/Integration/NodePalette/ModuleNodePaletteItem.h +++ b/Gems/GraphModel/Code/Include/GraphModel/Integration/NodePalette/ModuleNodePaletteItem.h @@ -95,7 +95,7 @@ namespace GraphModelIntegration AZ_CLASS_ALLOCATOR(ModuleNodePaletteItem, AZ::SystemAllocator, 0); //! Constructor - //! \param editorId Unique name of the client system editor (ex: AZ_CRC("ShaderCanvas", 0xa6d1a85a)) + //! \param editorId Unique name of the client system editor (ex: AZ_CRC("ShaderCanvas", 0x0a1dff96)) //! \param sourceFileId The unique id for the module node graph source file. //! \param sourceFilePath The path to the module node graph source file. This will be used for node naming and debug output. ModuleNodePaletteItem(GraphCanvas::EditorId editorId, AZ::Uuid sourceFileId, AZStd::string_view sourceFilePath) diff --git a/Gems/GraphModel/Code/Include/GraphModel/Integration/NodePalette/StandardNodePaletteItem.h b/Gems/GraphModel/Code/Include/GraphModel/Integration/NodePalette/StandardNodePaletteItem.h index 5d2914d7ad..e38e3b7478 100644 --- a/Gems/GraphModel/Code/Include/GraphModel/Integration/NodePalette/StandardNodePaletteItem.h +++ b/Gems/GraphModel/Code/Include/GraphModel/Integration/NodePalette/StandardNodePaletteItem.h @@ -34,7 +34,7 @@ namespace GraphModelIntegration //! Constructor //! \param nodeName Name of the node that will show up in the Palette - //! \param editorId Unique name of the client system editor (ex: AZ_CRC("ShaderCanvas", 0xa6d1a85a)) + //! \param editorId Unique name of the client system editor (ex: AZ_CRC("ShaderCanvas", 0x0a1dff96)) StandardNodePaletteItem(AZStd::string_view nodeName, GraphCanvas::EditorId editorId) : DraggableNodePaletteTreeItem(nodeName, editorId) { diff --git a/Gems/GraphModel/Code/Source/Integration/GraphController.cpp b/Gems/GraphModel/Code/Source/Integration/GraphController.cpp index 86cfb42990..c20d093e4b 100644 --- a/Gems/GraphModel/Code/Source/Integration/GraphController.cpp +++ b/Gems/GraphModel/Code/Source/Integration/GraphController.cpp @@ -698,7 +698,10 @@ namespace GraphModelIntegration GraphModel::NodePtrList nodeList; for (auto nodeId : nodeIds) { - nodeList.push_back(m_elementMap.Find(nodeId)); + if (GraphModel::NodePtr nodePtr = m_elementMap.Find(nodeId)) + { + nodeList.push_back(nodePtr); + } } return nodeList; diff --git a/Gems/GraphModel/Code/Tests/GraphModelIntegrationTest.cpp b/Gems/GraphModel/Code/Tests/GraphModelIntegrationTest.cpp index 683442a34e..cf110c05cb 100644 --- a/Gems/GraphModel/Code/Tests/GraphModelIntegrationTest.cpp +++ b/Gems/GraphModel/Code/Tests/GraphModelIntegrationTest.cpp @@ -173,16 +173,11 @@ namespace GraphModelIntegrationTest }; GraphModel::NodePtrList retrievedNodes; GraphModelIntegration::GraphControllerRequestBus::EventResult(retrievedNodes, m_sceneId, &GraphModelIntegration::GraphControllerRequests::GetNodesFromGraphNodeIds, nodeIds); - EXPECT_EQ(nodeIds.size(), retrievedNodes.size()); + // Test that only one node was found. + EXPECT_EQ(retrievedNodes.size(), 1); // Test the first node in the list should be our valid test node EXPECT_EQ(retrievedNodes[0], testNode); - - // Test the second node should be a nullptr since it was an invalid NodeId - EXPECT_EQ(retrievedNodes[1], nullptr); - - // Test the third node should also be a nullptr since it was a valid NodeId but one that doesn't exist in the scene - EXPECT_EQ(retrievedNodes[2], nullptr); } TEST_F(GraphModelIntegrationTests, ExtendableSlotsWithDifferentMinimumValues) diff --git a/Gems/GraphModel/Code/Tests/MockGraphCanvas.cpp b/Gems/GraphModel/Code/Tests/MockGraphCanvas.cpp index 6e5a32e8e6..91a25d6a30 100644 --- a/Gems/GraphModel/Code/Tests/MockGraphCanvas.cpp +++ b/Gems/GraphModel/Code/Tests/MockGraphCanvas.cpp @@ -309,11 +309,6 @@ namespace MockGraphCanvasServices m_configuration.SetTooltip(tooltip); } - void MockNodeComponent::SetTranslationKeyedTooltip(const GraphCanvas::TranslationKeyedString& tooltip) - { - m_configuration.SetTooltip(tooltip.GetDisplayString()); - } - const AZStd::string MockNodeComponent::GetTooltip() const { return m_configuration.GetTooltip(); diff --git a/Gems/GraphModel/Code/Tests/MockGraphCanvas.h b/Gems/GraphModel/Code/Tests/MockGraphCanvas.h index 774e6aab9f..c7865e769e 100644 --- a/Gems/GraphModel/Code/Tests/MockGraphCanvas.h +++ b/Gems/GraphModel/Code/Tests/MockGraphCanvas.h @@ -175,7 +175,6 @@ namespace MockGraphCanvasServices // GraphCanvas::NodeRequestBus overrides ... void SetTooltip(const AZStd::string& tooltip) override; - void SetTranslationKeyedTooltip(const GraphCanvas::TranslationKeyedString& tooltip) override; const AZStd::string GetTooltip() const override; void SetShowInOutliner(bool showInOutliner) override; bool ShowInOutliner() const override; diff --git a/Gems/GraphModel/gem.json b/Gems/GraphModel/gem.json index 256de75f6c..ad6b592430 100644 --- a/Gems/GraphModel/gem.json +++ b/Gems/GraphModel/gem.json @@ -2,6 +2,7 @@ "gem_name": "GraphModel", "display_name": "Graph Model", "license": "Apache-2.0 Or MIT", + "license_url": "https://github.com/o3de/o3de/blob/development/LICENSE.txt", "origin": "Open 3D Engine - o3de.org", "type": "Code", "summary": "The Graph Model Gem provides a generic node graph data model framework for Open 3D Engine.", diff --git a/Gems/HttpRequestor/Code/Include/HttpRequestor/HttpRequestParameters.h b/Gems/HttpRequestor/Code/Include/HttpRequestor/HttpRequestParameters.h index b4428ef559..1b8c47b0ff 100644 --- a/Gems/HttpRequestor/Code/Include/HttpRequestor/HttpRequestParameters.h +++ b/Gems/HttpRequestor/Code/Include/HttpRequestor/HttpRequestParameters.h @@ -12,21 +12,35 @@ namespace HttpRequestor { - /* - ** - ** The Parameters needed to make a HTTP call and then receive the - ** returned JSON in a meaningful place. Examples of use are in the - ** HttpRequestCaller class. - ** - */ - + //! Models the parameters needed to make a HTTP call and then receive the + //! returned JSON in a meaningful place. Examples of use are in the HttpRequestCaller class. class Parameters { public: - // Initializing ctor + // Ctors + + //! @param URI A universal resource indicator representing an endpoint. + //! @param method The HTTP method to use, for example HTTP_GET. + //! @param callback The callback method to receive a HTTP call's response. Parameters(const AZStd::string& URI, Aws::Http::HttpMethod method, const Callback& callback); + + //! @param URI A universal resource indicator representing an endpoint. + //! @param method The HTTP method to use, for example HTTP_GET. + //! @param headers A map of header names and values to use. + //! @param callback The callback method to receive a HTTP call's response. Parameters(const AZStd::string& URI, Aws::Http::HttpMethod method, const Headers& headers, const Callback& callback); - Parameters(const AZStd::string& URI, Aws::Http::HttpMethod method, const Headers& headers, const AZStd::string& body, const Callback& callback); + + //! @param URI A universal resource indicator representing an endpoint. + //! @param method The HTTP method to use, for example HTTP_POST. + //! @param headers A map of header names and values to use. + //! @param body An data to associate with an HTTP call. + //! @param callback The callback method to receive a HTTP call's response. + Parameters( + const AZStd::string& URI, + Aws::Http::HttpMethod method, + const Headers& headers, + const AZStd::string& body, + const Callback& callback); // Defaults virtual ~Parameters() = default; @@ -36,30 +50,49 @@ namespace HttpRequestor Parameters(Parameters&&) = default; Parameters& operator=(Parameters&&) = default; - //returns the URI in string form as an recipient of the HTTP connection - const Aws::String& GetURI() const { return m_URI; } + //! Get the URI in string form as an recipient of the HTTP connection. + const Aws::String& GetURI() const + { + return m_URI; + } - //returns the method of which the HTTP request will take. GET, POST, DELETE, PUT, or HEAD - Aws::Http::HttpMethod GetMethod() const { return m_method; } + //! Get the HTTP method configured to use for a request. + Aws::Http::HttpMethod GetMethod() const + { + return m_method; + } - //returns the list of extra headers to include in the request - const Headers & GetHeaders() const { return m_headers; } + //! Get the list of extra headers to send as part of a request. + //! @return A map of header-value pairs. + const Headers& GetHeaders() const + { + return m_headers; + } - //returns the stream for the body of the request - const std::shared_ptr & GetBodyStream() const { return m_bodyStream; } + //! Get an input stream that can be used to send the body of a request. + //! @return A string stream representing a request body. + const std::shared_ptr& GetBodyStream() const + { + return m_bodyStream; + } - //returns the function of which to feed back the JSON that the HTTP call resulted in. The function also requires the HTTPResponseCode indicating if the call was successful or failed - const Callback & GetCallback() const { return m_callback; } + //! Get the callback function for processing JSON returned in an HTTP response. + //! Callback functions are responsible for correctly interpreting the HTTP response code, and should communicate any + //! failures. + //! @return The callback function to process endpoint responses with. + const Callback& GetCallback() const + { + return m_callback; + } private: - Aws::String m_URI; - Aws::Http::HttpMethod m_method; - Headers m_headers; - std::shared_ptr m_bodyStream; // required by Aws::Http::HttpRequest - Callback m_callback; + Aws::String m_URI; + Aws::Http::HttpMethod m_method; + Headers m_headers; + std::shared_ptr m_bodyStream; // required by Aws::Http::HttpRequest + Callback m_callback; }; - inline Parameters::Parameters(const AZStd::string& URI, Aws::Http::HttpMethod method, const Callback& callback) : m_URI(URI.c_str()) , m_method(method) @@ -75,7 +108,8 @@ namespace HttpRequestor { } - inline Parameters::Parameters(const AZStd::string& URI, Aws::Http::HttpMethod method, const Headers& headers, const AZStd::string& body, const Callback& callback) + inline Parameters::Parameters( + const AZStd::string& URI, Aws::Http::HttpMethod method, const Headers& headers, const AZStd::string& body, const Callback& callback) : m_URI(URI.c_str()) , m_method(method) , m_headers(headers) @@ -83,6 +117,5 @@ namespace HttpRequestor , m_callback(callback) { } - } diff --git a/Gems/HttpRequestor/Code/Include/HttpRequestor/HttpRequestorBus.h b/Gems/HttpRequestor/Code/Include/HttpRequestor/HttpRequestorBus.h index 5ede4109bb..39cad2c720 100644 --- a/Gems/HttpRequestor/Code/Include/HttpRequestor/HttpRequestorBus.h +++ b/Gems/HttpRequestor/Code/Include/HttpRequestor/HttpRequestorBus.h @@ -5,7 +5,6 @@ * SPDX-License-Identifier: Apache-2.0 OR MIT * */ - #pragma once #include @@ -13,24 +12,70 @@ namespace HttpRequestor { - class HttpRequestorRequests - : public AZ::EBusTraits + //! Defines request APIs for Gem. Supports making HTTP requests. + //! See [HTTP RFC](https://www.w3.org/Protocols/rfc2616/rfc2616-sec4.html) for expectations around methods, headers, and body. + class HttpRequestorRequests : public AZ::EBusTraits { - public: static const AZ::EBusHandlerPolicy HandlerPolicy = AZ::EBusHandlerPolicy::Single; static const AZ::EBusAddressPolicy AddressPolicy = AZ::EBusAddressPolicy::Single; - // Public functions + //! Make a RESTful call to a HTTP(s) endpoint. Receive the response, via the supplied callback as JSON. + //! @param URI The universal resource indicator representing the endpoint to make the request to. + //! @param method The HTTP method to use, for example HTTP_GET. + //! @param callback The callback method to receive the JSON response object. virtual void AddRequest(const AZStd::string& URI, Aws::Http::HttpMethod method, const Callback& callback) = 0; - virtual void AddRequestWithHeaders(const AZStd::string& URI, Aws::Http::HttpMethod method, const Headers & headers, const Callback& callback) = 0; - virtual void AddRequestWithHeadersAndBody(const AZStd::string& URI, Aws::Http::HttpMethod method, const Headers & headers, const AZStd::string& body, const Callback& callback) = 0; - + + //! Make a RESTful call to a HTTP(s) endpoint with customized headers. Receive the response, via the supplied callback as JSON. + //! @param URI The universal resource indicator representing the endpoint to make the request to. + //! @param method The HTTP method to use, for example HTTP_GET. + //! @param headers A map of header names and values to set on the request. + //! @param callback The callback method to receive the JSON response object. + virtual void AddRequestWithHeaders( + const AZStd::string& URI, Aws::Http::HttpMethod method, const Headers& headers, const Callback& callback) = 0; + + //! Make a RESTful call to a HTTP(s) endpoint with customized headers and a body. Receive the response, via the supplied callback as JSON. + //! @param URI The universal resource indicator representing the endpoint to make the request to. + //! @param method The HTTP method to use, for example HTTP_POST. + //! @param headers A map of header names and values to set on the request. + //! @param body Any HTTP request data to include in the request. Use Content-Type and Content-Length headers to specify the nature + //! of the body payload. + //! @param callback The callback method to receive the JSON response object. + virtual void AddRequestWithHeadersAndBody( + const AZStd::string& URI, + Aws::Http::HttpMethod method, + const Headers& headers, + const AZStd::string& body, + const Callback& callback) = 0; + + //! Make a RESTful call to a HTTP(s) endpoint. Receive the response, via the supplied callback as text. + //! @param URI The universal resource indicator representing the endpoint to make the request to. + //! @param method The http method to use, for example HTTP_GET. + //! @param callback The callback method to receive the JSON response object. virtual void AddTextRequest(const AZStd::string& URI, Aws::Http::HttpMethod method, const TextCallback& callback) = 0; - virtual void AddTextRequestWithHeaders(const AZStd::string& URI, Aws::Http::HttpMethod method, const Headers & headers, const TextCallback& callback) = 0; - virtual void AddTextRequestWithHeadersAndBody(const AZStd::string& URI, Aws::Http::HttpMethod method, const Headers & headers, const AZStd::string& body, const TextCallback& callback) = 0; + + //! Make a RESTful call to a HTTP(s) endpoint with customized headers. Receive the response, via the supplied callback as text. + //! @param URI The universal resource indicator representing the endpoint to make the request to. + //! @param method The HTTP method to use, for example HTTP_GET. + //! @param headers A map of header names and values to set on the request. + //! @param callback The callback method to receive the JSON response object. + virtual void AddTextRequestWithHeaders( + const AZStd::string& URI, Aws::Http::HttpMethod method, const Headers& headers, const TextCallback& callback) = 0; + + //! Make a RESTful call to a HTTP(s) endpoint with customized headers and a body. Receive the response, via the supplied callback as text. + //! @param URI The universal resource indicator representing the endpoint to make the request to. + //! @param method The HTTP method to use, for example HTTP_POST. + //! @param headers A map of header names and values to set on the request. + //! @param body Any HTTP request data to include in the request. Use Content-Type and Content-Length headers to specify the nature of the body payload. + //! @param callback The callback method to receive the JSON response object. + virtual void AddTextRequestWithHeadersAndBody( + const AZStd::string& URI, + Aws::Http::HttpMethod method, + const Headers& headers, + const AZStd::string& body, + const TextCallback& callback) = 0; }; using HttpRequestorRequestBus = AZ::EBus; -} // namespace HttpRequestor +} // namespace HttpRequestor diff --git a/Gems/HttpRequestor/Code/Include/HttpRequestor/HttpTextRequestParameters.h b/Gems/HttpRequestor/Code/Include/HttpRequestor/HttpTextRequestParameters.h index 97c9150f42..0eafdad866 100644 --- a/Gems/HttpRequestor/Code/Include/HttpRequestor/HttpTextRequestParameters.h +++ b/Gems/HttpRequestor/Code/Include/HttpRequestor/HttpTextRequestParameters.h @@ -11,20 +11,35 @@ namespace HttpRequestor { - /* - ** - ** The Parameters needed to make a HTTP call and then receive the - ** returned TEXT from the web request without parsing it. - ** - */ - + //! Models the parameters needed to make a HTTP call and then receive the + //! returned TEXT from the web request without parsing it. class TextParameters { public: // Initializing ctor + + //! @param URI A universal resource indicator representing an endpoint. + //! @param method The HTTP method to configure. + //! @param callback The callback method to receive a HTTP call's response. TextParameters(const AZStd::string& URI, Aws::Http::HttpMethod method, const TextCallback& callback); + + //! @param URI A universal resource indicator representing an endpoint. + //! @param method The HTTP method to configure. + //! @param headers A map of header names and values to use. + //! @param callback The callback method to receive a HTTP call's response. TextParameters(const AZStd::string& URI, Aws::Http::HttpMethod method, const Headers& headers, const TextCallback& callback); - TextParameters(const AZStd::string& URI, Aws::Http::HttpMethod method, const Headers& headers, const AZStd::string& body, const TextCallback& callback); + + //! @param URI A universal resource indicator representing an endpoint. + //! @param method The HTTP method to configure. + //! @param headers A map of header names and values to use. + //! @param body An data to associate with an HTTP call. + //! @param callback The callback method to receive a HTTP call's response. + TextParameters( + const AZStd::string& URI, + Aws::Http::HttpMethod method, + const Headers& headers, + const AZStd::string& body, + const TextCallback& callback); // Defaults ~TextParameters() = default; @@ -34,29 +49,49 @@ namespace HttpRequestor TextParameters(TextParameters&&) = default; TextParameters& operator=(TextParameters&&) = default; - //returns the URI in string form as an recipient of the HTTP connection - const Aws::String& GetURI() const { return m_URI; } + //! Get the URI in string form as an recipient of the HTTP connection. + const Aws::String& GetURI() const + { + return m_URI; + } - //returns the method of which the HTTP request will take. GET, POST, DELETE, PUT, or HEAD - Aws::Http::HttpMethod GetMethod() const { return m_method; } + //! Get the HTTP method configured to use for a request. + Aws::Http::HttpMethod GetMethod() const + { + return m_method; + } - //returns the list of extra headers to include in the request - const Headers & GetHeaders() const { return m_headers; } + //! Get the list of extra headers to send as part of a request. + //! @return A map of header-value pairs. + const Headers& GetHeaders() const + { + return m_headers; + } - //returns the stream for the body of the request - const std::shared_ptr & GetBodyStream() const { return m_bodyStream; } + //! Get an input stream that can be used to send the body of a request. + //! @return A string stream representing a request body. + const std::shared_ptr& GetBodyStream() const + { + return m_bodyStream; + } - //returns the function of which to feed back the TEXT that the HTTP call resulted in. The function also requires the HTTPResponseCode indicating if the call was successful or failed - const TextCallback & GetCallback() const { return m_callback; } + //! Get the callback function for processing text returned in an HTTP response. + //! Callback functions are responsible for correctly interpreting the HTTP response code, and should communicate any + //! failures. + //! @return The callback function to process endpoint responses with. + const TextCallback& GetCallback() const + { + return m_callback; + } private: - Aws::String m_URI; - Aws::Http::HttpMethod m_method; - Headers m_headers; - std::shared_ptr m_bodyStream; - TextCallback m_callback; + Aws::String m_URI; + Aws::Http::HttpMethod m_method; + Headers m_headers; + std::shared_ptr m_bodyStream; + TextCallback m_callback; }; - + inline TextParameters::TextParameters(const AZStd::string& URI, Aws::Http::HttpMethod method, const TextCallback& callback) : m_URI(URI.c_str()) , m_method(method) @@ -64,7 +99,8 @@ namespace HttpRequestor { } - inline TextParameters::TextParameters(const AZStd::string& URI, Aws::Http::HttpMethod method, const Headers& headers, const TextCallback& callback) + inline TextParameters::TextParameters( + const AZStd::string& URI, Aws::Http::HttpMethod method, const Headers& headers, const TextCallback& callback) : m_URI(URI.c_str()) , m_method(method) , m_headers(headers) @@ -72,12 +108,17 @@ namespace HttpRequestor { } - inline TextParameters::TextParameters(const AZStd::string& URI, Aws::Http::HttpMethod method, const Headers& headers, const AZStd::string& body, const TextCallback& callback) + inline TextParameters::TextParameters( + const AZStd::string& URI, + Aws::Http::HttpMethod method, + const Headers& headers, + const AZStd::string& body, + const TextCallback& callback) : m_URI(URI.c_str()) , m_method(method) , m_headers(headers) - , m_bodyStream( std::make_shared(body.c_str()) ) + , m_bodyStream(std::make_shared(body.c_str())) , m_callback(callback) { } -} +} // namespace HttpRequestor diff --git a/Gems/HttpRequestor/Code/Include/HttpRequestor/HttpTypes.h b/Gems/HttpRequestor/Code/Include/HttpRequestor/HttpTypes.h index a13f2f5645..42efa169dd 100644 --- a/Gems/HttpRequestor/Code/Include/HttpRequestor/HttpTypes.h +++ b/Gems/HttpRequestor/Code/Include/HttpRequestor/HttpTypes.h @@ -23,20 +23,16 @@ AZ_POP_DISABLE_WARNING namespace HttpRequestor { - // - // the call back function for http requests. - // + // A callback function for processing JSON return values from an HTTP request. This callback is responsible for correctly interpreting + // the HTTP response code and setting any internal information from the returned JSON object. using Callback = AZStd::function; - - // - // the call back function for any http text requests. - // + // A callback function for processing HTTP response as raw text. This callback is responsible for correctly interpreting the HTTP + // response code and setting any internal information from the returned data. If the data includes a JSON fragment, the callback is + // responsible for parsing it. using TextCallback = AZStd::function; - - // - // a map of REST headers. - // + // A map of REST headers. using Headers = AZStd::map; -} + +} // namespace HttpRequestor diff --git a/Gems/HttpRequestor/gem.json b/Gems/HttpRequestor/gem.json index eb1a112b0e..582bfa0071 100644 --- a/Gems/HttpRequestor/gem.json +++ b/Gems/HttpRequestor/gem.json @@ -2,6 +2,7 @@ "gem_name": "HttpRequestor", "display_name": "HTTP Requestor", "license": "Apache-2.0 Or MIT", + "license_url": "https://github.com/o3de/o3de/blob/development/LICENSE.txt", "origin": "Open 3D Engine - o3de.org", "type": "Code", "summary": "The HTTP Requestor Gem provides functionality to make asynchronous HTTP/HTTPS requests and return data through a user-provided call back function.", diff --git a/Gems/ImGui/Code/Source/ImGuiManager.cpp b/Gems/ImGui/Code/Source/ImGuiManager.cpp index d631e2f83e..4b841a7b1e 100644 --- a/Gems/ImGui/Code/Source/ImGuiManager.cpp +++ b/Gems/ImGui/Code/Source/ImGuiManager.cpp @@ -16,6 +16,7 @@ #include #include #include +#include #include #include #include @@ -23,7 +24,6 @@ #include #include #include -#include #include #include #include @@ -115,7 +115,9 @@ void ImGuiManager::Initialize() // Set config file ImGuiIO& io = ImGui::GetIO(); - io.IniFilename = "imgui.ini"; +#if defined(IMGUI_DISABLE_AUTOMATIC_INI_SAVING_LOADING) + io.IniFilename = nullptr; +#endif // Enable Nav Keyboard by default and allow io.ConfigFlags |= ImGuiConfigFlags_NavEnableKeyboard; @@ -172,7 +174,6 @@ void ImGuiManager::Initialize() // Broadcast ImGui Ready to Listeners ImGuiUpdateListenerBus::Broadcast(&IImGuiUpdateListener::OnImGuiInitialize); - m_currentControllerIndex = -1; m_button1Pressed = m_button2Pressed = false; m_menuBarStatusChanged = false; @@ -227,6 +228,7 @@ void ImGui::ImGuiManager::RestoreRenderWindowSizeToDefault() void ImGui::ImGuiManager::SetDpiScalingFactor(float dpiScalingFactor) { + ImGui::ImGuiContextScope contextScope(m_imguiContext); ImGuiIO& io = ImGui::GetIO(); // Set the global font scale to size our UI to the scaling factor // Note: Currently we use the default, 13px fixed-size IMGUI font, so this can get somewhat blurry @@ -235,6 +237,7 @@ void ImGui::ImGuiManager::SetDpiScalingFactor(float dpiScalingFactor) float ImGui::ImGuiManager::GetDpiScalingFactor() const { + ImGui::ImGuiContextScope contextScope(m_imguiContext); ImGuiIO& io = ImGui::GetIO(); return io.FontGlobalScale; } @@ -333,7 +336,8 @@ void ImGuiManager::Render() } // Advance ImGui by Elapsed Frame Time - io.DeltaTime = gEnv->pTimer->GetFrameTime(); + const AZ::TimeUs gameTickTimeUs = AZ::GetSimulationTickDeltaTimeUs(); + io.DeltaTime = AZ::TimeUsToSeconds(gameTickTimeUs); //// END FROM PREUPDATE AZ::u32 backBufferWidth = m_windowSize.m_width; @@ -399,34 +403,37 @@ bool ImGuiManager::OnInputChannelEventFiltered(const InputChannel& inputChannel) const InputChannelId& inputChannelId = inputChannel.GetInputChannelId(); const InputDeviceId& inputDeviceId = inputChannel.GetInputDevice().GetInputDeviceId(); - // Handle Keyboard Hotkeys - if (InputDeviceKeyboard::IsKeyboardDevice(inputDeviceId) && inputChannel.IsStateBegan()) - { - // Cycle through ImGui Menu Bar States on Home button press - if (inputChannelId == InputDeviceKeyboard::Key::NavigationHome) - { - ToggleThroughImGuiVisibleState(-1); - } + bool consumeEvent = false; - // Cycle through Standalone Editor Window States - if (inputChannel.GetInputChannelId() == InputDeviceKeyboard::Key::NavigationEnd) - { - if (gEnv->IsEditor() && m_editorWindowState == DisplayState::Hidden) - { - ImGuiUpdateListenerBus::Broadcast(&IImGuiUpdateListener::OnOpenEditorWindow); - } - else - { - m_editorWindowState = m_editorWindowState == DisplayState::Visible - ? DisplayState::VisibleNoMouse - : DisplayState::Visible; - } - } - } - - // Handle Keyboard Modifier Keys + // Handle Keyboard Inputs if (InputDeviceKeyboard::IsKeyboardDevice(inputDeviceId)) { + // Handle Keyboard Hotkeys + if (inputChannel.IsStateBegan()) + { + // Cycle through ImGui Menu Bar States on Home button press + if (inputChannelId == InputDeviceKeyboard::Key::NavigationHome) + { + ToggleThroughImGuiVisibleState(); + } + + // Cycle through Standalone Editor Window States + if (inputChannel.GetInputChannelId() == InputDeviceKeyboard::Key::NavigationEnd) + { + if (gEnv->IsEditor() && m_editorWindowState == DisplayState::Hidden) + { + ImGuiUpdateListenerBus::Broadcast(&IImGuiUpdateListener::OnOpenEditorWindow); + } + else + { + m_editorWindowState = m_editorWindowState == DisplayState::Visible + ? DisplayState::VisibleNoMouse + : DisplayState::Visible; + } + } + } + + // Handle Keyboard Modifier Keys if (inputChannelId == InputDeviceKeyboard::Key::ModifierShiftL || inputChannelId == InputDeviceKeyboard::Key::ModifierShiftR) { @@ -452,19 +459,10 @@ bool ImGuiManager::OnInputChannelEventFiltered(const InputChannel& inputChannel) } // Handle Controller Inputs - int inputControllerIndex = -1; - bool controllerInput = false; - if (InputDeviceGamepad::IsGamepadDevice(inputDeviceId)) + else if (InputDeviceGamepad::IsGamepadDevice(inputDeviceId)) { - inputControllerIndex = inputDeviceId.GetIndex(); - controllerInput = true; - } - - - if (controllerInput) - { - // Only pipe in Controller Nav Inputs if we are the current Controller Index and at least 1 of the two controller modes are enabled. - if (m_currentControllerIndex == inputControllerIndex && m_controllerModeFlags) + // Only pipe in Controller Nav Inputs when at least 1 of the two controller modes are enabled. + if (m_controllerModeFlags) { const auto lyButtonToImGuiNav = s_lyInputToImGuiNavIndexMap.find(inputChannelId); if (lyButtonToImGuiNav != s_lyInputToImGuiNavIndexMap.end()) @@ -475,7 +473,7 @@ bool ImGuiManager::OnInputChannelEventFiltered(const InputChannel& inputChannel) } //Switch menu bar display only if two buttons are pressed at the same time - if (inputChannelId == InputDeviceGamepad::Button::L3) + if (inputChannelId == InputDeviceGamepad::Button::L1) { if (inputChannel.IsStateBegan()) { @@ -487,7 +485,7 @@ bool ImGuiManager::OnInputChannelEventFiltered(const InputChannel& inputChannel) m_menuBarStatusChanged = false; } } - if (inputChannelId == InputDeviceGamepad::Button::R3) + if (inputChannelId == InputDeviceGamepad::Button::R1) { if (inputChannel.IsStateBegan()) { @@ -501,34 +499,32 @@ bool ImGuiManager::OnInputChannelEventFiltered(const InputChannel& inputChannel) } if (!m_menuBarStatusChanged && m_button1Pressed && m_button2Pressed) { - ToggleThroughImGuiVisibleState(inputControllerIndex); + ToggleThroughImGuiVisibleState(); } - - // If we have the Discrete Input Mode Enabled.. and we are in the Visible State, then consume input here - if (m_enableDiscreteInputMode && m_clientMenuBarState == DisplayState::Visible) - { - return true; - } - - return false; } // Handle Mouse Inputs - if (InputDeviceMouse::IsMouseDevice(inputDeviceId)) + else if (InputDeviceMouse::IsMouseDevice(inputDeviceId)) { const int mouseButtonIndex = GetAzMouseButtonIndex(inputChannelId); if (0 <= mouseButtonIndex && mouseButtonIndex < AZ_ARRAY_SIZE(io.MouseDown)) { io.MouseDown[mouseButtonIndex] = inputChannel.IsActive(); + + // only consume the event during edit mode in the editor so the viewport doesn't also respond to it + consumeEvent = gEnv->IsEditing() && io.WantCaptureMouse; } else if (inputChannelId == InputDeviceMouse::Movement::Z) { io.MouseWheel = inputChannel.GetValue() / static_cast(IMGUI_WHEEL_DELTA); + + // only consume the event during edit mode in the editor so the viewport doesn't also respond to it + consumeEvent = gEnv->IsEditing() && io.WantCaptureMouse; } } // Handle Touch Inputs - if (InputDeviceTouch::IsTouchDevice(inputDeviceId)) + else if (InputDeviceTouch::IsTouchDevice(inputDeviceId)) { const int touchIndex = GetAzTouchIndex(inputChannelId); if (0 <= touchIndex && touchIndex < AZ_ARRAY_SIZE(io.MouseDown)) @@ -549,7 +545,7 @@ bool ImGuiManager::OnInputChannelEventFiltered(const InputChannel& inputChannel) } // Handle Virtual Keyboard Inputs - if (InputDeviceVirtualKeyboard::IsVirtualKeyboardDevice(inputDeviceId)) + else if (InputDeviceVirtualKeyboard::IsVirtualKeyboardDevice(inputDeviceId)) { if (inputChannelId == AzFramework::InputDeviceVirtualKeyboard::Command::EditEnter) { @@ -561,13 +557,16 @@ bool ImGuiManager::OnInputChannelEventFiltered(const InputChannel& inputChannel) if (m_clientMenuBarState == DisplayState::Visible || m_editorWindowState == DisplayState::Visible) { - // If we have the Discrete Input Mode Enabled.. then consume the input here. + // If we have the Discrete Input Mode Enabled.. then consume the input here. if (m_enableDiscreteInputMode) { return true; } + + return consumeEvent; } + // don't allow event capturing when ImGui isn't active return false; } @@ -626,14 +625,13 @@ bool ImGuiManager::OnInputTextEventFiltered(const AZStd::string& textUTF8) return io.WantTextInput && m_clientMenuBarState == DisplayState::Visible;; } -void ImGuiManager::ToggleThroughImGuiVisibleState(int controllerIndex) +void ImGuiManager::ToggleThroughImGuiVisibleState() { ImGui::ImGuiContextScope contextScope(m_imguiContext); switch (m_clientMenuBarState) { case DisplayState::Hidden: - m_currentControllerIndex = controllerIndex; m_clientMenuBarState = DisplayState::Visible; // Draw the ImGui Mouse cursor if either the hardware mouse is connected, or the controller mouse is enabled. @@ -668,7 +666,6 @@ void ImGuiManager::ToggleThroughImGuiVisibleState(int controllerIndex) default: m_clientMenuBarState = DisplayState::Hidden; - m_currentControllerIndex = -1; // Enable system cursor if it's in editor and it's not editor game mode if (gEnv->IsEditor() && !gEnv->IsEditorGameMode()) @@ -685,12 +682,6 @@ void ImGuiManager::ToggleThroughImGuiVisibleState(int controllerIndex) m_setEnabledEvent.Signal(m_clientMenuBarState == DisplayState::Hidden); } -void ImGuiManager::ToggleThroughImGuiVisibleState() -{ - ToggleThroughImGuiVisibleState(-1); -} - - void ImGuiManager::RenderImGuiBuffers(const ImVec2& scaleRects) { ImGui::ImGuiContextScope contextScope(m_imguiContext); diff --git a/Gems/ImGui/Code/Source/ImGuiManager.h b/Gems/ImGui/Code/Source/ImGuiManager.h index c4fa5169f7..c0071c94c5 100644 --- a/Gems/ImGui/Code/Source/ImGuiManager.h +++ b/Gems/ImGui/Code/Source/ImGuiManager.h @@ -76,9 +76,6 @@ namespace ImGui // Sets up initial window size and listens for changes void InitWindowSize(); - // A function to toggle through the available ImGui Visibility States - void ToggleThroughImGuiVisibleState(int controllerIndex); - private: ImGuiContext* m_imguiContext = nullptr; DisplayState m_clientMenuBarState = DisplayState::Hidden; @@ -96,8 +93,6 @@ namespace ImGui std::vector m_idxBuffer; //Controller navigation - static const int MaxControllerNumber = 4; - int m_currentControllerIndex; bool m_button1Pressed, m_button2Pressed, m_menuBarStatusChanged; bool m_hardwardeMouseConnected = false; diff --git a/Gems/ImGui/Code/Source/LYCommonMenu/ImGuiLYAssetExplorer.cpp b/Gems/ImGui/Code/Source/LYCommonMenu/ImGuiLYAssetExplorer.cpp index 055537a8bb..0d8a3e0edd 100644 --- a/Gems/ImGui/Code/Source/LYCommonMenu/ImGuiLYAssetExplorer.cpp +++ b/Gems/ImGui/Code/Source/LYCommonMenu/ImGuiLYAssetExplorer.cpp @@ -15,9 +15,7 @@ #include #include #include -#include #include -#include #include #include "ImGuiColorDefines.h" @@ -138,7 +136,7 @@ namespace ImGui void ImGuiLYAssetExplorer::MeshInstanceList_CheckEntityFilter() { - // Iterate through All Meshes.. + // Iterate through All Meshes.. for (MeshInstanceDisplayList& meshInstanceList : m_meshInstanceDisplayList) { // .. reset this flag to see if any child instances pass the name filter @@ -160,7 +158,7 @@ namespace ImGui // Primary on / off Switch ImGui::Checkbox("Mesh Debug Enabled", &m_meshDebugEnabled); ImGui::SameLine(); - + // Lod Debug Switch, check for changes so we can do things once at change time bool lodDebug = m_lodDebugEnabled; ImGui::Checkbox("LOD Debug", &lodDebug); @@ -177,12 +175,12 @@ namespace ImGui } } - // If the Lod Debug is Enabled. Draw a small legend that + // If the Lod Debug is Enabled. Draw a small legend that if (m_lodDebugEnabled) { ImGui::BeginChild("lodDebugLegend", ImVec2(0.0f, 57.0f), true); - // Text for legend. + // Text for legend. ImGui::TextColored(ImGui::Colors::s_NiceLabelColor, "Lod Color Legend:"); ImGui::SameLine(); ImGui::TextColored(s_lodColor_0, "0 "); @@ -196,7 +194,7 @@ namespace ImGui ImGui::TextColored(s_lodColor_4, "4 "); ImGui::SameLine(); ImGui::TextColored(s_lodColor_5, "5 "); - + // Small boxes of each color to help with the legend static float s_boxSize = 21.0f; ImVec2 graphUpLeft(ImGui::GetWindowPos().x + 127.5f, ImGui::GetWindowPos().y + 26.0f); @@ -229,7 +227,7 @@ namespace ImGui ImVec2(graphUpLeft.x + (5 * s_boxSize), graphUpLeft.y), ImVec2(graphUpLeft.x + (6 * s_boxSize), graphUpLeft.y + s_boxSize), ImGui::ColorConvertFloat4ToU32(s_lodColor_5), 2.0f); - + ImGui::EndChild(); } @@ -382,7 +380,7 @@ namespace ImGui ImGui::TextColored(ImGui::Colors::s_NiceLabelColor, " * Mesh Selection overrides Entity Selection."); ImGui::EndTooltip(); } - + ImGui::TextColored(ImGui::IsWindowHovered() ? ImGui::Colors::s_NiceLabelColor : ImGui::Colors::s_PlainLabelColor, "Mouse Over For Legend and Tips"); ImGui::EndChild(); // MouseHover Child ImGui::NextColumn(); @@ -405,7 +403,7 @@ namespace ImGui // Before we draw all these meshes, lets mark this frame as no Mouse Over being drawn.. if any are drawn, they will set this flag m_anyMousedOverForDraw = false; - + if (m_selectionFilter) { ImGui::Columns(2); @@ -444,8 +442,8 @@ namespace ImGui // Keep Count of our Mesh instances and loop through them drawing them! int instanceCount = 0; for (auto& meshInstance : meshInstanceList.m_instanceOptionMap) - { - // See if we should + { + // See if we should bool displayEntity = true; if (m_entityNameFilter) { @@ -472,11 +470,11 @@ namespace ImGui ImGui::SameLine(); ImGui::TextColored(ImGui::Colors::s_PlainLabelColor, "(% .02f, % .02f, % .02f)", (float)worldPos.GetX(), (float)worldPos.GetY(), (float)worldPos.GetZ()); ImGui::EndGroup(); - + // Check for and Draw Entity Instance Mouse Over meshInstance.second.m_mousedOverForDraw = false; ImGuiUpdate_DrawEntityInstanceMouseOver(meshInstanceList, meshInstance.first, entityName, meshInstance.second); - + if (m_selectionFilter) { @@ -490,7 +488,7 @@ namespace ImGui ImGui::TreePop(); // End Mesh Tree } - else + else { ImGuiUpdate_DrawMeshMouseOver(meshInstanceList); @@ -559,7 +557,7 @@ namespace ImGui ImGui::TextColored(ImGui::Colors::s_NiceLabelColor, "Entity: "); ImGui::SameLine(); ImGui::TextColored(ImGui::Colors::s_PlainLabelColor, "%s %s", entityInstance.ToString().c_str(), entityName.c_str()); - + ImGui::TextColored(ImGui::Colors::s_NiceLabelColor, "Mesh: "); ImGui::SameLine(); ImGui::TextColored(ImGui::Colors::s_PlainLabelColor, "%s", meshDisplayList.m_meshPath.c_str()); @@ -590,7 +588,7 @@ namespace ImGui } } - // Not found, so create a new entry.. + // Not found, so create a new entry.. MeshInstanceDisplayList meshList; meshList.m_meshPath = meshName; meshList.m_passesFilter = true; diff --git a/Gems/ImGui/Code/Source/LYCommonMenu/ImGuiLYCommonMenu.cpp b/Gems/ImGui/Code/Source/LYCommonMenu/ImGuiLYCommonMenu.cpp index 81ec4b17c8..ecc97682de 100644 --- a/Gems/ImGui/Code/Source/LYCommonMenu/ImGuiLYCommonMenu.cpp +++ b/Gems/ImGui/Code/Source/LYCommonMenu/ImGuiLYCommonMenu.cpp @@ -13,6 +13,7 @@ #include #include #include +#include #include #include "ImGuiColorDefines.h" #include "LYImGuiUtils/ImGuiDrawHelpers.h" @@ -43,11 +44,15 @@ namespace ImGui m_assetExplorer.Initialize(); m_cameraMonitor.Initialize(); m_entityOutliner.Initialize(); + + m_deltaTimeHistogram.Init("onTick Delta Time (Milliseconds)", 250, LYImGuiUtils::HistogramContainer::ViewType::Histogram, true, 0.0f, 60.0f); + AZ::TickBus::Handler::BusConnect(); } void ImGuiLYCommonMenu::Shutdown() { // Disconnect EBusses + AZ::TickBus::Handler::BusDisconnect(); ImGuiUpdateListenerBus::Handler::BusDisconnect(); // shutdown sub menu objects @@ -92,8 +97,36 @@ namespace ImGui void ImGuiLYCommonMenu::OnImGuiUpdate() { + float dpiScalingFactor = 1.0f; + ImGuiManagerBus::BroadcastResult(dpiScalingFactor, &ImGuiManagerBus::Events::GetDpiScalingFactor); + + // Utility function to calculate the size in device pixels based on the current DPI + const auto dpiAwareSizeFn = [dpiScalingFactor](float size) + { + return dpiScalingFactor * size; + }; + + AZStd::optional viewportBorderPaddingOpt; + AzFramework::ViewportBorderRequestBus::BroadcastResult( + viewportBorderPaddingOpt, &AzFramework::ViewportBorderRequestBus::Events::GetViewportBorderPadding); + + AzFramework::ViewportBorderPadding viewportBorderPadding = viewportBorderPaddingOpt.value_or(AzFramework::ViewportBorderPadding{}); + // Utility function to return the current offset (scaled by DPI) if a viewport border + // is active (otherwise 0.0) + auto dpiAwareBorderOffsetFn = [&viewportBorderPaddingOpt, &dpiAwareSizeFn](float size) + { + return viewportBorderPaddingOpt.has_value() ? dpiAwareSizeFn(size) : 0.0f; + }; + + // Shift the menu down if a viewport border is active + ImVec2 cachedSafeArea = ImGui::GetStyle().DisplaySafeAreaPadding; + ImGui::GetStyle().DisplaySafeAreaPadding = ImVec2(cachedSafeArea.x, cachedSafeArea.y + dpiAwareSizeFn(viewportBorderPadding.m_top)); + if (ImGui::BeginMainMenuBar()) { + // Constant to shift right aligned menu items by (distance to the left) when a viewport border is active + const float rightAlignedBorderOffset = dpiAwareBorderOffsetFn(36.0f); + // Get Discrete Input state now, we will use it both inside the ImGui SubMenu, and along the main task bar ( when it is on ) bool discreteInputEnabled = false; ImGuiManagerBus::BroadcastResult(discreteInputEnabled, &IImGuiManager::GetEnableDiscreteInputMode); @@ -101,7 +134,8 @@ namespace ImGui // Input Mode Display { const float prevCursorPos = ImGui::GetCursorPosX(); - ImGui::SetCursorPosX(ImGui::GetWindowWidth() - 300.0f); + ImGui::SetCursorPosX( + ImGui::GetWindowWidth() - dpiAwareSizeFn(300.0f + viewportBorderPadding.m_right) - rightAlignedBorderOffset); AZStd::string inputTitle = "Input: "; if (!discreteInputEnabled) @@ -152,11 +186,15 @@ namespace ImGui } // Add some space before the first menu so it won't overlap with view control buttons - ImGui::SetCursorPosX(40.f); + ImGui::SetCursorPosX(dpiAwareSizeFn(40.0f + viewportBorderPadding.m_left)); // Main Open 3D Engine menu if (ImGui::BeginMenu("O3DE")) { + if (ImGui::MenuItem("Delta Time Graph")) + { + m_showDeltaTimeGraphs = !m_showDeltaTimeGraphs; + } // Asset Explorer if (ImGui::MenuItem("Asset Explorer")) { @@ -557,11 +595,12 @@ namespace ImGui // End LY Common Tools menu ImGui::EndMenu(); } - const int labelSize{ 100 }; - const int buttonSize{ 40 }; + + const float labelSize = dpiAwareSizeFn(100.0f + viewportBorderPadding.m_right) + rightAlignedBorderOffset; + const float buttonSize = dpiAwareSizeFn(40.0f + viewportBorderPadding.m_right) + rightAlignedBorderOffset; ImGuiUpdateListenerBus::Broadcast(&IImGuiUpdateListener::OnImGuiMainMenuUpdate); ImGui::SameLine(ImGui::GetWindowContentRegionMax().x - labelSize); - float backgroundHeight = ImGui::GetTextLineHeight() + 3; + float backgroundHeight = ImGui::GetTextLineHeight() + dpiAwareSizeFn(3.0f); ImVec2 cursorPos = ImGui::GetCursorScreenPos(); ImGui::GetWindowDrawList()->AddRectFilled( cursorPos, ImVec2(cursorPos.x + labelSize, cursorPos.y + backgroundHeight), IM_COL32(0, 115, 187, 255)); @@ -580,6 +619,9 @@ namespace ImGui ImGui::EndMainMenuBar(); } + // Restore original safe area. + ImGui::GetStyle().DisplaySafeAreaPadding = cachedSafeArea; + // Update Contextual Controller Window if (m_controllerLegendWindowVisible) { @@ -594,6 +636,17 @@ namespace ImGui m_assetExplorer.ImGuiUpdate(); m_cameraMonitor.ImGuiUpdate(); m_entityOutliner.ImGuiUpdate(); + if (m_showDeltaTimeGraphs) + { + ImGui::SetNextWindowSize({ 500, 200 }, ImGuiCond_Once); + if (ImGui::Begin( + "Delta Time Graphs", &m_showDeltaTimeGraphs, + ImGuiWindowFlags_MenuBar | ImGuiWindowFlags_HorizontalScrollbar | ImGuiWindowFlags_NoSavedSettings)) + { + m_deltaTimeHistogram.Draw(ImGui::GetColumnWidth(), 100.0f); + } + ImGui::End(); + } } void ImGuiLYCommonMenu::OnImGuiUpdate_DrawControllerLegend() @@ -720,7 +773,6 @@ namespace ImGui // Set the timer and connect to tick bus to count down. m_telemetryCaptureTimeRemaining = m_telemetryCaptureTime; - AZ::TickBus::Handler::BusConnect(); // Get the current ImGui Display state to restore it later. ImGuiManagerBus::BroadcastResult(m_telemetryCapturePreCaptureState, &IImGuiManager::GetClientMenuBarState); @@ -740,16 +792,20 @@ namespace ImGui // Reset timer and disconnect tick bus m_telemetryCaptureTimeRemaining = 0.0f; - AZ::TickBus::Handler::BusDisconnect(); } // OnTick just used for telemetry captures. void ImGuiLYCommonMenu::OnTick(float deltaTime, [[maybe_unused]] AZ::ScriptTimePoint time) { - m_telemetryCaptureTimeRemaining -= deltaTime; - if (m_telemetryCaptureTimeRemaining <= 0.0f) + m_deltaTimeHistogram.PushValue(deltaTime*1000.0f); // convert to milliseconds + + if (m_telemetryCaptureTimeRemaining > 0.0f) { - StopTelemetryCapture(); + m_telemetryCaptureTimeRemaining -= deltaTime; + if (m_telemetryCaptureTimeRemaining <= 0.0f) + { + StopTelemetryCapture(); + } } } } // namespace ImGui diff --git a/Gems/ImGui/Code/Source/LYCommonMenu/ImGuiLYCommonMenu.h b/Gems/ImGui/Code/Source/LYCommonMenu/ImGuiLYCommonMenu.h index fae892b4a2..a63d2fd844 100644 --- a/Gems/ImGui/Code/Source/LYCommonMenu/ImGuiLYCommonMenu.h +++ b/Gems/ImGui/Code/Source/LYCommonMenu/ImGuiLYCommonMenu.h @@ -50,6 +50,8 @@ namespace ImGui ImGuiLYAssetExplorer m_assetExplorer; ImGuiLYCameraMonitor m_cameraMonitor; ImGuiLYEntityOutliner m_entityOutliner; + bool m_showDeltaTimeGraphs = false; + ImGui::LYImGuiUtils::HistogramContainer m_deltaTimeHistogram; }; } diff --git a/Gems/ImGui/Code/Source/Platform/Windows/imgui_windows.cmake b/Gems/ImGui/Code/Source/Platform/Windows/imgui_windows.cmake index 419c652a38..bea2cfc38b 100644 --- a/Gems/ImGui/Code/Source/Platform/Windows/imgui_windows.cmake +++ b/Gems/ImGui/Code/Source/Platform/Windows/imgui_windows.cmake @@ -8,6 +8,5 @@ set(LY_COMPILE_DEFINITIONS PRIVATE - IMGUI_DISABLE_WIN32_DEFAULT_CLIPBOARD_FUNCTIONS IMGUI_DISABLE_WIN32_DEFAULT_IME_FUNCTIONS ) diff --git a/Gems/ImGui/gem.json b/Gems/ImGui/gem.json index c1d89d1728..dfc12f64b4 100644 --- a/Gems/ImGui/gem.json +++ b/Gems/ImGui/gem.json @@ -2,6 +2,7 @@ "gem_name": "ImGui", "display_name": "Immediate Mode GUI (IMGUI)", "license": "Apache-2.0 Or MIT", + "license_url": "https://github.com/o3de/o3de/blob/development/LICENSE.txt", "origin": "Open 3D Engine - o3de.org", "type": "Tool", "summary": "The Immediate Mode GUI Gem provides the 3rdParty library IMGUI which can be used to create run time immediate mode overlays for debugging and profiling information in Open 3D Engine.", diff --git a/Gems/InAppPurchases/gem.json b/Gems/InAppPurchases/gem.json index 1f1debd5fb..21febbfeca 100644 --- a/Gems/InAppPurchases/gem.json +++ b/Gems/InAppPurchases/gem.json @@ -2,6 +2,7 @@ "gem_name": "InAppPurchases", "display_name": "In-App Purchases", "license": "Apache-2.0 Or MIT", + "license_url": "https://github.com/o3de/o3de/blob/development/LICENSE.txt", "origin": "Open 3D Engine - o3de.org", "type": "Code", "summary": "The In-App Purchases Gem provides functionality for in app purchases for iOS and Android.", diff --git a/Gems/LandscapeCanvas/Code/Source/Editor/MainWindow.cpp b/Gems/LandscapeCanvas/Code/Source/Editor/MainWindow.cpp index 4574b938f6..e58ea77373 100644 --- a/Gems/LandscapeCanvas/Code/Source/Editor/MainWindow.cpp +++ b/Gems/LandscapeCanvas/Code/Source/Editor/MainWindow.cpp @@ -21,6 +21,7 @@ #include #include #include +#include #include #include #include @@ -103,6 +104,8 @@ #include #include +#include + namespace LandscapeCanvasEditor { static const int NODE_OFFSET_X_PIXELS = 350; @@ -200,15 +203,34 @@ namespace LandscapeCanvasEditor { using namespace AzToolsFramework; - static const QStringList preferredCategories = { - "Vegetation", - "Atom" - }; + // A map of category names with preferred component names. + // There may be multiple component names for a category, as long as they provide different services. + const AZStd::map> preferredComponentsByCategory = { { "Shape", { "Shape Reference" } } }; + + // Scan through the preferred categories to see whether any exist in the componentDataTable. + for (const auto& preferredComponentPair : preferredComponentsByCategory) + { + auto candidateDataTablePair = componentDataTable.find(preferredComponentPair.first); + if (candidateDataTablePair != componentDataTable.end()) + { + // Now check all the preferred components for that category, and return the first one that exists in the candidate componentDataTable. + for (const auto& preferredComponentName : preferredComponentPair.second) + { + const auto& candidateComponent = candidateDataTablePair->second.find(preferredComponentName); + if (candidateComponent != candidateDataTablePair->second.end()) + { + return candidateComponent->second->m_typeId; + } + } + } + } // There are a couple of cases where we prefer certain categories of Components - // to be added over others (e.g. a Vegetation Shape Reference instead of actual LmbrCentral shapes), + // to be added over others, // so if those there are components in those categories, then choose them first. // Otherwise, just pick the first one in the list. + static const QStringList preferredCategories = { "Vegetation", "Atom" }; + ComponentPaletteUtil::ComponentDataTable::const_iterator categoryIt; for (const auto& categoryName : preferredCategories) { @@ -448,6 +470,9 @@ namespace LandscapeCanvasEditor AZ::ComponentApplicationBus::BroadcastResult(m_serializeContext, &AZ::ComponentApplicationRequests::GetSerializeContext); AZ_Assert(m_serializeContext, "Failed to acquire application serialize context."); + m_prefabFocusPublicInterface = AZ::Interface::Get(); + AZ_Assert(m_prefabFocusPublicInterface, "LandscapeCanvas - could not get PrefabFocusPublicInterface on construction."); + const GraphCanvas::EditorId& editorId = GetEditorId(); // Register unique color palettes for our connections (data types) @@ -459,6 +484,7 @@ namespace LandscapeCanvasEditor AzToolsFramework::EditorPickModeNotificationBus::Handler::BusConnect(AzToolsFramework::GetEntityContextId()); AzToolsFramework::EntityCompositionNotificationBus::Handler::BusConnect(); AzToolsFramework::ToolsApplicationNotificationBus::Handler::BusConnect(); + AzToolsFramework::Prefab::PrefabFocusNotificationBus::Handler::BusConnect(AzToolsFramework::GetEntityContextId()); AzToolsFramework::Prefab::PrefabPublicNotificationBus::Handler::BusConnect(); CrySystemEventBus::Handler::BusConnect(); AZ::EntitySystemBus::Handler::BusConnect(); @@ -484,6 +510,7 @@ namespace LandscapeCanvasEditor AZ::EntitySystemBus::Handler::BusDisconnect(); CrySystemEventBus::Handler::BusDisconnect(); AzToolsFramework::Prefab::PrefabPublicNotificationBus::Handler::BusDisconnect(); + AzToolsFramework::Prefab::PrefabFocusNotificationBus::Handler::BusDisconnect(); AzToolsFramework::ToolsApplicationNotificationBus::Handler::BusDisconnect(); AzToolsFramework::EditorPickModeNotificationBus::Handler::BusDisconnect(); AzToolsFramework::EditorEntityContextNotificationBus::Handler::BusDisconnect(); @@ -1297,7 +1324,7 @@ namespace LandscapeCanvasEditor } // Special case for the Vegetation Area Placement Bounds, the slot actually represents a separate - // Vegetation Reference Shape or actual Shape component on the same Entity + // Reference Shape or actual Shape component on the same Entity AZ::Component* component = nullptr; auto targetBaseNode = static_cast(targetNode.get()); if (targetBaseNode->GetBaseNodeType() == LandscapeCanvas::BaseNode::BaseNodeType::VegetationArea && targetSlot->GetName() == LandscapeCanvas::PLACEMENT_BOUNDS_SLOT_ID) @@ -1373,7 +1400,7 @@ namespace LandscapeCanvasEditor AzToolsFramework::EditorDisabledCompositionRequestBus::Event(targetEntityId, &AzToolsFramework::EditorDisabledCompositionRequests::GetDisabledComponents, disabledComponents); for (auto disabledComponent : disabledComponents) { - if (disabledComponent->RTTI_GetType() == Vegetation::EditorReferenceShapeComponentTypeId) + if (disabledComponent->RTTI_GetType() == LmbrCentral::EditorReferenceShapeComponentTypeId) { component = disabledComponent; @@ -1395,7 +1422,7 @@ namespace LandscapeCanvasEditor // If 'component' is still null then that means there is no Reference Shape component on our Entity, so we need to add one if (!component) { - AZ::ComponentId componentId = AddComponentTypeIdToEntity(targetEntityId, Vegetation::EditorReferenceShapeComponentTypeId); + AZ::ComponentId componentId = AddComponentTypeIdToEntity(targetEntityId, LmbrCentral::EditorReferenceShapeComponentTypeId); component = targetEntity->FindComponent(componentId); } @@ -2500,6 +2527,24 @@ namespace LandscapeCanvasEditor } } + void MainWindow::OnPrefabFocusChanged() + { + // Make sure to close any open graphs that aren't currently in prefab focus + // to prevent the user from making modifications outside of the allowed focus scope + AZStd::vector dockWidgetsToClose; + for (auto [entityId, dockWidgetId] : m_dockWidgetsByEntity) + { + if (!m_prefabFocusPublicInterface->IsOwningPrefabBeingFocused(entityId)) + { + dockWidgetsToClose.push_back(dockWidgetId); + } + } + for (auto dockWidgetId : dockWidgetsToClose) + { + CloseEditor(dockWidgetId); + } + } + void MainWindow::OnPrefabInstancePropagationBegin() { // Ignore graph updates during prefab propagation because the entities will be diff --git a/Gems/LandscapeCanvas/Code/Source/Editor/MainWindow.h b/Gems/LandscapeCanvas/Code/Source/Editor/MainWindow.h index e0fb2d8e10..de6b10529d 100644 --- a/Gems/LandscapeCanvas/Code/Source/Editor/MainWindow.h +++ b/Gems/LandscapeCanvas/Code/Source/Editor/MainWindow.h @@ -20,6 +20,7 @@ #include #include #include +#include #include #include #include @@ -31,6 +32,14 @@ #include #endif +namespace AzToolsFramework +{ + namespace Prefab + { + class PrefabFocusPublicInterface; + } +} + namespace LandscapeCanvasEditor { //////////////////////////////////////////////////////////////////////// @@ -81,6 +90,7 @@ namespace LandscapeCanvasEditor , private AzToolsFramework::EntityCompositionNotificationBus::Handler , private AzToolsFramework::PropertyEditorEntityChangeNotificationBus::MultiHandler , private AzToolsFramework::ToolsApplicationNotificationBus::Handler + , private AzToolsFramework::Prefab::PrefabFocusNotificationBus::Handler , private AzToolsFramework::Prefab::PrefabPublicNotificationBus::Handler , private CrySystemEventBus::Handler { @@ -181,6 +191,9 @@ namespace LandscapeCanvasEditor void EntityParentChanged(AZ::EntityId entityId, AZ::EntityId newParentId, AZ::EntityId oldParentId) override; //////////////////////////////////////////////////////////////////////// + //! PrefabFocusNotificationBus overrides + void OnPrefabFocusChanged() override; + //! PrefabPublicNotificationBus overrides void OnPrefabInstancePropagationBegin() override; void OnPrefabInstancePropagationEnd() override; @@ -248,6 +261,8 @@ namespace LandscapeCanvasEditor AZ::SerializeContext* m_serializeContext = nullptr; + AzToolsFramework::Prefab::PrefabFocusPublicInterface* m_prefabFocusPublicInterface = nullptr; + bool m_ignoreGraphUpdates = false; bool m_prefabPropagationInProgress = false; bool m_inObjectPickMode = false; diff --git a/Gems/LandscapeCanvas/Code/Source/Editor/Nodes/Areas/BaseAreaNode.cpp b/Gems/LandscapeCanvas/Code/Source/Editor/Nodes/Areas/BaseAreaNode.cpp index 312dd0873e..b24b681dde 100644 --- a/Gems/LandscapeCanvas/Code/Source/Editor/Nodes/Areas/BaseAreaNode.cpp +++ b/Gems/LandscapeCanvas/Code/Source/Editor/Nodes/Areas/BaseAreaNode.cpp @@ -26,6 +26,8 @@ #include "BaseAreaNode.h" #include +#include + namespace LandscapeCanvas { void BaseAreaNode::Reflect(AZ::ReflectContext* context) @@ -61,7 +63,7 @@ namespace LandscapeCanvas return nullptr; } - AZ::Component* component = entity->FindComponent(Vegetation::EditorReferenceShapeComponentTypeId); + AZ::Component* component = entity->FindComponent(LmbrCentral::EditorReferenceShapeComponentTypeId); if (component) { return component; diff --git a/Gems/LandscapeCanvas/gem.json b/Gems/LandscapeCanvas/gem.json index ce0c64b75d..8653da40e1 100644 --- a/Gems/LandscapeCanvas/gem.json +++ b/Gems/LandscapeCanvas/gem.json @@ -2,6 +2,7 @@ "gem_name": "LandscapeCanvas", "display_name": "Landscape Canvas", "license": "Apache-2.0 Or MIT", + "license_url": "https://github.com/o3de/o3de/blob/development/LICENSE.txt", "origin": "Open 3D Engine - o3de.org", "type": "Tool", "summary": "The Landscape Canvas Gem provides the Landscape Canvas editor, a node-based graph tool for authoring workflows to populate landscape with dynamic vegetation.", diff --git a/Gems/LmbrCentral/Assets/Editor/Icons/Components/AxisAlignedBoxShape.svg b/Gems/LmbrCentral/Assets/Editor/Icons/Components/AxisAlignedBoxShape.svg new file mode 100644 index 0000000000..0f3982d713 --- /dev/null +++ b/Gems/LmbrCentral/Assets/Editor/Icons/Components/AxisAlignedBoxShape.svg @@ -0,0 +1,3 @@ + + + diff --git a/Gems/LmbrCentral/Assets/Editor/Icons/Components/ShapeReference.svg b/Gems/LmbrCentral/Assets/Editor/Icons/Components/ShapeReference.svg new file mode 100644 index 0000000000..a304220c48 --- /dev/null +++ b/Gems/LmbrCentral/Assets/Editor/Icons/Components/ShapeReference.svg @@ -0,0 +1,3 @@ + + + diff --git a/Gems/LmbrCentral/Assets/Editor/Icons/Components/Viewport/AxisAlignedBoxShape.svg b/Gems/LmbrCentral/Assets/Editor/Icons/Components/Viewport/AxisAlignedBoxShape.svg new file mode 100644 index 0000000000..51f0be0572 --- /dev/null +++ b/Gems/LmbrCentral/Assets/Editor/Icons/Components/Viewport/AxisAlignedBoxShape.svg @@ -0,0 +1,16 @@ + + + + + + + + + + + + + + + + diff --git a/Gems/LmbrCentral/Assets/Editor/Icons/Components/Viewport/ShapeReference.svg b/Gems/LmbrCentral/Assets/Editor/Icons/Components/Viewport/ShapeReference.svg new file mode 100644 index 0000000000..fe6abb9fe4 --- /dev/null +++ b/Gems/LmbrCentral/Assets/Editor/Icons/Components/Viewport/ShapeReference.svg @@ -0,0 +1,16 @@ + + + + + + + + + + + + + + + + diff --git a/Gems/LmbrCentral/Assets/seedList.seed b/Gems/LmbrCentral/Assets/seedList.seed deleted file mode 100644 index 54c12c9faa..0000000000 --- a/Gems/LmbrCentral/Assets/seedList.seed +++ /dev/null @@ -1,37 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/Gems/LmbrCentral/Code/CMakeLists.txt b/Gems/LmbrCentral/Code/CMakeLists.txt index b047a9f65e..4401d3b752 100644 --- a/Gems/LmbrCentral/Code/CMakeLists.txt +++ b/Gems/LmbrCentral/Code/CMakeLists.txt @@ -13,6 +13,7 @@ ly_add_target( NAME LmbrCentral.Static STATIC NAMESPACE Gem FILES_CMAKE + lmbrcentral_headers_files.cmake lmbrcentral_files.cmake ${pal_dir}/platform_${PAL_PLATFORM_NAME_LOWERCASE}_files.cmake INCLUDE_DIRECTORIES @@ -27,6 +28,16 @@ ly_add_target( AZ::AzFramework ) +ly_add_target( + NAME LmbrCentral.API HEADERONLY + NAMESPACE Gem + FILES_CMAKE + lmbrcentral_headers_files.cmake + INCLUDE_DIRECTORIES + INTERFACE + include +) + ly_add_target( NAME LmbrCentral ${PAL_TRAIT_MONOLITHIC_DRIVEN_MODULE_TYPE} NAMESPACE Gem @@ -110,75 +121,4 @@ if (PAL_TRAIT_BUILD_HOST_TOOLS) endif() -################################################################################ -# Tests -################################################################################ -if(PAL_TRAIT_BUILD_TESTS_SUPPORTED) - ly_add_target( - NAME LmbrCentral.Mocks HEADERONLY - NAMESPACE Gem - FILES_CMAKE - lmbrcentral_mocks_files.cmake - INCLUDE_DIRECTORIES - INTERFACE - Mocks - ) - - ly_add_target( - NAME LmbrCentral.Tests ${PAL_TRAIT_TEST_TARGET_TYPE} - NAMESPACE Gem - FILES_CMAKE - lmbrcentral_tests_files.cmake - lmbrcentral_shared_files.cmake - INCLUDE_DIRECTORIES - PRIVATE - Source - Tests - BUILD_DEPENDENCIES - PRIVATE - AZ::AzTest - AZ::AzTestShared - Legacy::CryCommon - AZ::AzFramework - Gem::LmbrCentral.Static - Gem::LmbrCentral.Mocks - ) - ly_add_googletest( - NAME Gem::LmbrCentral.Tests - ) - - if (PAL_TRAIT_BUILD_HOST_TOOLS) - ly_add_target( - NAME LmbrCentral.Editor.Tests ${PAL_TRAIT_TEST_TARGET_TYPE} - NAMESPACE Gem - FILES_CMAKE - lmbrcentral_editor_tests_files.cmake - INCLUDE_DIRECTORIES - PRIVATE - . - Source - Tests - COMPILE_DEFINITIONS - PRIVATE - LMBR_CENTRAL_EDITOR - BUILD_DEPENDENCIES - PRIVATE - 3rdParty::Qt::Gui - 3rdParty::Qt::Widgets - Legacy::CryCommon - Legacy::Editor.Headers - AZ::AzTest - AZ::AzCore - AZ::AzTestShared - AZ::AzToolsFramework - AZ::AzToolsFrameworkTestCommon - AZ::AssetBuilderSDK - AZ::AzManipulatorTestFramework.Static - Gem::LmbrCentral.Static - Gem::LmbrCentral.Editor.Static - ) - ly_add_googletest( - NAME Gem::LmbrCentral.Editor.Tests - ) - endif() -endif() +add_subdirectory(Tests) diff --git a/Gems/LmbrCentral/Code/Mocks/LmbrCentral/Shape/MockShapes.h b/Gems/LmbrCentral/Code/Mocks/LmbrCentral/Shape/MockShapes.h index 20be74dd90..b0118a914a 100644 --- a/Gems/LmbrCentral/Code/Mocks/LmbrCentral/Shape/MockShapes.h +++ b/Gems/LmbrCentral/Code/Mocks/LmbrCentral/Shape/MockShapes.h @@ -56,5 +56,73 @@ namespace UnitTest MOCK_METHOD1(GenerateRandomPointInside, AZ::Vector3(AZ::RandomDistributionType randomDistribution)); MOCK_METHOD3(IntersectRay, bool(const AZ::Vector3& src, const AZ::Vector3& dir, float& distance)); }; + + class MockShape : public LmbrCentral::ShapeComponentRequestsBus::Handler + { + public: + AZ::Entity m_entity; + int m_count = 0; + + MockShape() + { + LmbrCentral::ShapeComponentRequestsBus::Handler::BusConnect(m_entity.GetId()); + } + + ~MockShape() + { + LmbrCentral::ShapeComponentRequestsBus::Handler::BusDisconnect(); + } + + AZ::Crc32 GetShapeType() override + { + ++m_count; + return AZ_CRC("TestShape", 0x856ca50c); + } + + AZ::Aabb m_aabb = AZ::Aabb::CreateNull(); + AZ::Aabb GetEncompassingAabb() override + { + ++m_count; + return m_aabb; + } + + AZ::Transform m_localTransform = AZ::Transform::CreateIdentity(); + AZ::Aabb m_localBounds = AZ::Aabb::CreateNull(); + void GetTransformAndLocalBounds(AZ::Transform& transform, AZ::Aabb& bounds) override + { + ++m_count; + transform = m_localTransform; + bounds = m_localBounds; + } + + bool m_pointInside = true; + bool IsPointInside([[maybe_unused]] const AZ::Vector3& point) override + { + ++m_count; + return m_pointInside; + } + + float m_distanceSquaredFromPoint = 0.0f; + float DistanceSquaredFromPoint([[maybe_unused]] const AZ::Vector3& point) override + { + ++m_count; + return m_distanceSquaredFromPoint; + } + + AZ::Vector3 m_randomPointInside = AZ::Vector3::CreateZero(); + AZ::Vector3 GenerateRandomPointInside([[maybe_unused]] AZ::RandomDistributionType randomDistribution) override + { + ++m_count; + return m_randomPointInside; + } + + bool m_intersectRay = false; + bool IntersectRay( + [[maybe_unused]] const AZ::Vector3& src, [[maybe_unused]] const AZ::Vector3& dir, [[maybe_unused]] float& distance) override + { + ++m_count; + return m_intersectRay; + } + }; } diff --git a/Gems/LmbrCentral/Code/Source/Ai/EditorNavigationAreaComponent.cpp b/Gems/LmbrCentral/Code/Source/Ai/EditorNavigationAreaComponent.cpp index f723918cf3..ed707ee9b3 100644 --- a/Gems/LmbrCentral/Code/Source/Ai/EditorNavigationAreaComponent.cpp +++ b/Gems/LmbrCentral/Code/Source/Ai/EditorNavigationAreaComponent.cpp @@ -47,6 +47,7 @@ namespace LmbrCentral { editContext->Class("Navigation Area", "Navigation Area configuration") ->ClassElement(AZ::Edit::ClassElements::EditorData, "") + ->Attribute(AZ::Edit::Attributes::AddableByUser, false) ->Attribute(AZ::Edit::Attributes::Category, "AI") ->Attribute(AZ::Edit::Attributes::Icon, "Icons/Components/NavigationArea.svg") ->Attribute(AZ::Edit::Attributes::ViewportIcon, "Icons/Components/Viewport/NavigationArea.svg") diff --git a/Gems/LmbrCentral/Code/Source/Ai/EditorNavigationSeedComponent.cpp b/Gems/LmbrCentral/Code/Source/Ai/EditorNavigationSeedComponent.cpp index 47999dbd4b..8d8727e314 100644 --- a/Gems/LmbrCentral/Code/Source/Ai/EditorNavigationSeedComponent.cpp +++ b/Gems/LmbrCentral/Code/Source/Ai/EditorNavigationSeedComponent.cpp @@ -32,6 +32,7 @@ namespace LmbrCentral editContext->Class("Navigation Seed", "Determines reachable navigation nodes") ->ClassElement(AZ::Edit::ClassElements::EditorData, "") ->Attribute(AZ::Edit::Attributes::AppearsInAddComponentMenu, AZ_CRC("Game", 0x232b318c)) + ->Attribute(AZ::Edit::Attributes::AddableByUser, false) ->Attribute(AZ::Edit::Attributes::Category, "AI") ->Attribute(AZ::Edit::Attributes::Icon, "Icons/Components/NavigationSeed.svg") ->Attribute(AZ::Edit::Attributes::ViewportIcon, "Icons/Components/Viewport/NavigationSeed.svg") diff --git a/Gems/LmbrCentral/Code/Source/Ai/NavigationComponent.cpp b/Gems/LmbrCentral/Code/Source/Ai/NavigationComponent.cpp index 500d5c17da..9798307d51 100644 --- a/Gems/LmbrCentral/Code/Source/Ai/NavigationComponent.cpp +++ b/Gems/LmbrCentral/Code/Source/Ai/NavigationComponent.cpp @@ -120,6 +120,7 @@ namespace LmbrCentral editContext->Class( "Navigation", "The Navigation component provides basic pathfinding and pathfollowing services to an entity") ->ClassElement(AZ::Edit::ClassElements::EditorData, "") + ->Attribute(AZ::Edit::Attributes::AddableByUser, false) ->Attribute(AZ::Edit::Attributes::Category, "AI") ->Attribute(AZ::Edit::Attributes::Icon, "Icons/Components/Navigation.svg") ->Attribute(AZ::Edit::Attributes::ViewportIcon, "Icons/Components/Viewport/Navigation.svg") diff --git a/Gems/LmbrCentral/Code/Source/Asset/AssetSystemDebugComponent.cpp b/Gems/LmbrCentral/Code/Source/Asset/AssetSystemDebugComponent.cpp index 1f95f2a55d..acd1bc8dae 100644 --- a/Gems/LmbrCentral/Code/Source/Asset/AssetSystemDebugComponent.cpp +++ b/Gems/LmbrCentral/Code/Source/Asset/AssetSystemDebugComponent.cpp @@ -200,7 +200,7 @@ namespace LmbrCentral } } break; - + } } diff --git a/Gems/LmbrCentral/Code/Source/Audio/AudioListenerComponent.cpp b/Gems/LmbrCentral/Code/Source/Audio/AudioListenerComponent.cpp index 05d8061856..7062f685c2 100644 --- a/Gems/LmbrCentral/Code/Source/Audio/AudioListenerComponent.cpp +++ b/Gems/LmbrCentral/Code/Source/Audio/AudioListenerComponent.cpp @@ -96,7 +96,7 @@ namespace LmbrCentral } else { - m_positionEntity = entityId; + m_currentPositionEntity = entityId; } } @@ -221,26 +221,26 @@ namespace LmbrCentral if (rotationEntityId.IsValid()) { - AZ::EntityBus::MultiHandler::BusConnect(rotationEntityId); m_currentRotationEntity = rotationEntityId; + AZ::EntityBus::MultiHandler::BusConnect(rotationEntityId); } else { - AZ::TransformNotificationBus::MultiHandler::BusConnect(GetEntityId()); m_currentRotationEntity = GetEntityId(); + AZ::TransformNotificationBus::MultiHandler::BusConnect(GetEntityId()); } // Lastly, connect to the Entity used for Position if (positionEntityId.IsValid()) { - AZ::EntityBus::MultiHandler::BusConnect(positionEntityId); m_currentPositionEntity = positionEntityId; + AZ::EntityBus::MultiHandler::BusConnect(positionEntityId); } else { - AZ::TransformNotificationBus::MultiHandler::BusConnect(GetEntityId()); m_currentPositionEntity = GetEntityId(); + AZ::TransformNotificationBus::MultiHandler::BusConnect(GetEntityId()); } // Do a fetch of the transforms to sync upon connecting. diff --git a/Gems/LmbrCentral/Code/Source/Builders/MaterialBuilder/MaterialBuilderComponent.cpp b/Gems/LmbrCentral/Code/Source/Builders/MaterialBuilder/MaterialBuilderComponent.cpp deleted file mode 100644 index 48973b2779..0000000000 --- a/Gems/LmbrCentral/Code/Source/Builders/MaterialBuilder/MaterialBuilderComponent.cpp +++ /dev/null @@ -1,612 +0,0 @@ -/* - * Copyright (c) Contributors to the Open 3D Engine Project. - * For complete copyright and license terms please see the LICENSE at the root of this distribution. - * - * SPDX-License-Identifier: Apache-2.0 OR MIT - * - */ - -#include "MaterialBuilderComponent.h" -#include -#include -#include -#include -#include -#include -#include -#include -#include - -namespace MaterialBuilder -{ - [[maybe_unused]] const char s_materialBuilder[] = "MaterialBuilder"; - - namespace Internal - { - const char g_nodeNameMaterial[] = "Material"; - const char g_nodeNameSubmaterial[] = "SubMaterials"; - const char g_nodeNameTexture[] = "Texture"; - const char g_nodeNameTextures[] = "Textures"; - const char g_attributeFileName[] = "File"; - - const int g_numSourceImageFormats = 9; - const char* g_sourceImageFormats[g_numSourceImageFormats] = { ".tif", ".tiff", ".bmp", ".gif", ".jpg", ".jpeg", ".tga", ".png", ".dds" }; - bool IsSupportedImageExtension(const AZStd::string& extension) - { - for (const char* format : g_sourceImageFormats) - { - if (extension == format) - { - return true; - } - } - return false; - } - - // Cleans up legacy pathing from older materials - const char* CleanLegacyPathingFromTexturePath(const char* texturePath) - { - // Copied from MaterialHelpers::SetTexturesFromXml, line 459 - // legacy. Some textures used to be referenced using "engine\\" or "engine/" - this is no longer valid - if ( - (strlen(texturePath) > 7) && - (azstrnicmp(texturePath, "engine", 6) == 0) && - ((texturePath[6] == '\\') || (texturePath[6] == '/')) - ) - { - texturePath = texturePath + 7; - } - - // legacy: Files were saved into a mtl with many leading forward or back slashes, we eat them all here. We want it to start with a relative path. - const char* actualFileName = texturePath; - while ((actualFileName[0]) && ((actualFileName[0] == '\\') || (actualFileName[0] == '/'))) - { - ++actualFileName; - } - return actualFileName; - } - - // Parses the material XML for all texture paths - AZ::Outcome GetTexturePathsFromMaterial(AZ::rapidxml::xml_node* materialNode, AZStd::vector& paths) - { - AZ::Outcome resultOutcome = AZ::Failure(AZStd::string("")); - AZStd::string success_with_warning_message; - - // check if this material has a set of textures defined, and if so, grab all the paths from the textures - AZ::rapidxml::xml_node* texturesNode = materialNode->first_node(g_nodeNameTextures); - if (texturesNode) - { - AZ::rapidxml::xml_node* textureNode = texturesNode->first_node(g_nodeNameTexture); - // it is possible for an empty node to exist for things like collision materials, so check - // to make sure that there is at least one child node before starting to iterate. - if (textureNode) - { - do - { - AZ::rapidxml::xml_attribute* fileAttribute = textureNode->first_attribute(g_attributeFileName); - if (!fileAttribute) - { - success_with_warning_message = "Texture node exists but does not have a file attribute defined"; - } - else - { - const char* rawTexturePath = fileAttribute->value(); - // do an initial clean-up of the path taken from the file, similar to MaterialHelpers::SetTexturesFromXml - AZStd::string texturePath = CleanLegacyPathingFromTexturePath(rawTexturePath); - paths.emplace_back(AZStd::move(texturePath)); - } - - textureNode = textureNode->next_sibling(g_nodeNameTexture); - } while (textureNode); - } - } - - // check to see if this material has sub materials defined. If so, recurse into this function for each sub material - AZ::rapidxml::xml_node* subMaterialsNode = materialNode->first_node(g_nodeNameSubmaterial); - if (subMaterialsNode) - { - AZ::rapidxml::xml_node* subMaterialNode = subMaterialsNode->first_node(g_nodeNameMaterial); - if (subMaterialNode == nullptr) - { - // this is a malformed material as there is no material node child in the SubMaterials node, so error out - return AZ::Failure(AZStd::string("SubMaterials node exists but does not have any child Material nodes.")); - } - - do - { - // grab the texture paths from the submaterial, or error out if necessary - AZ::Outcome subMaterialTexturePathsResult = GetTexturePathsFromMaterial(subMaterialNode, paths); - if (!subMaterialTexturePathsResult.IsSuccess()) - { - return subMaterialTexturePathsResult; - } - else if (!subMaterialTexturePathsResult.GetValue().empty()) - { - success_with_warning_message = subMaterialTexturePathsResult.GetValue(); - } - - subMaterialNode = subMaterialNode->next_sibling(g_nodeNameMaterial); - } while (subMaterialNode); - } - - if (texturesNode == nullptr && subMaterialsNode == nullptr) - { - return AZ::Failure(AZStd::string("Failed to find a Textures node or SubMaterials node in this material. At least one of these must exist to be able to gather texture dependencies.")); - } - - if (!success_with_warning_message.empty()) - { - return AZ::Success(success_with_warning_message); - } - return AZ::Success(AZStd::string()); - } - - // find a sequence of digits with a string starting from lastDigitIndex, and try to parse that sequence to and int - // and store it in outAnimIndex. - bool ParseFilePathForCompleteNumber(const AZStd::string& filePath, int& lastDigitIndex, int& outAnimIndex) - { - int firstAnimIndexDigit = lastDigitIndex; - while (isdigit(static_cast(filePath[lastDigitIndex]))) - { - ++lastDigitIndex; - } - if (!AzFramework::StringFunc::LooksLikeInt(filePath.substr(firstAnimIndexDigit, lastDigitIndex - firstAnimIndexDigit).c_str(), &outAnimIndex)) - { - return false; - } - return true; - } - - // Parse the texture path for a texture animation to determine the actual names of the textures to resolve that - // make up the entire sequence. - AZ::Outcome GetAllTexturesInTextureSequence(const AZStd::string& path, AZStd::vector& texturesInSequence) - { - // Taken from CShaderMan::mfReadTexSequence - // All comments next to variable declarations in this function are the original variable names in - // CShaderMan::mfReadTexSequence, to help keep track of how these variables relate to the original function - AZStd::string prefix; - AZStd::string postfix; - - AZStd::string filePath = path; // name - AZStd::string extension; // ext - AzFramework::StringFunc::Path::GetExtension(filePath.c_str(), extension); - AzFramework::StringFunc::Path::StripExtension(filePath); - - // unsure if it is actually possible to enter here or the original version with '$' as the indicator - // for texture sequences, but they check for both just in case, so this will match the behavior. - char separator = '#'; // chSep - int firstSeparatorIndex = static_cast(filePath.find(separator)); - if (firstSeparatorIndex == AZStd::string::npos) - { - firstSeparatorIndex = static_cast(filePath.find('$')); - if (firstSeparatorIndex == AZStd::string::npos) - { - return AZ::Failure(AZStd::string("Failed to find separator '#' or '$' in texture path.")); - } - separator = '$'; - } - - // we don't actually care about getting the speed of the animation, so just remove everything from the - // end of the string starting with the last open parenthesis - size_t speedStartIndex = filePath.find_last_of('('); - if (speedStartIndex != AZStd::string::npos) - { - AzFramework::StringFunc::LKeep(filePath, speedStartIndex); - AzFramework::StringFunc::Append(filePath, '\0'); - } - - // try to find where the digits start after the separator (there can be any number of separators - // between the texture name prefix and where the digit range starts) - int firstAnimIndexDigit = -1; // m - int numSeparators = 0; // j - for (int stringIndex = firstSeparatorIndex; stringIndex < filePath.length(); ++stringIndex) - { - if (filePath[stringIndex] == separator) - { - ++numSeparators; - if (firstSeparatorIndex == -1) - { - firstSeparatorIndex = stringIndex; - } - } - else if (firstSeparatorIndex > 0 && firstAnimIndexDigit < 0) - { - firstAnimIndexDigit = stringIndex; - break; - } - } - if (numSeparators == 0) - { - return AZ::Failure(AZStd::string("Failed to find separator '#' or '$' in texture path.")); - } - - // store off everything before the separator - prefix = AZStd::move(filePath.substr(0, firstSeparatorIndex)); - - int startAnimIndex = 0; // startn - int endAnimIndex = 0; // endn - // we only found the separator, but no indexes, so just assume its 0 - 999 - if (firstAnimIndexDigit < 0) - { - startAnimIndex = 0; - endAnimIndex = 999; - } - else - { - // find the length of the first index, then parse that to an int - int lastDigitIndex = firstAnimIndexDigit; - if (!ParseFilePathForCompleteNumber(filePath, lastDigitIndex, startAnimIndex)) - { - return AZ::Failure(AZStd::string("Failed to determine first index of the sequence after the separators in texture path.")); - } - - // reset to the start of the next index - ++lastDigitIndex; - - // find the length of the end index, then parse that to an int - if (!ParseFilePathForCompleteNumber(filePath, lastDigitIndex, endAnimIndex)) - { - return AZ::Failure(AZStd::string("Failed to determine last index of the sequence after the first index of the sequence in texture path.")); - } - - // save off the rest of the string - postfix = AZStd::move(filePath.substr(lastDigitIndex)); - } - - int numTextures = endAnimIndex - startAnimIndex + 1; - const char* textureNameFormat = "%s%.*d%s%s"; // prefix, num separators (number of digits), sequence index, postfix, extension) - for (int sequenceIndex = 0; sequenceIndex < numTextures; ++sequenceIndex) - { - texturesInSequence.emplace_back(AZStd::move(AZStd::string::format(textureNameFormat, prefix.c_str(), numSeparators, startAnimIndex + sequenceIndex, postfix.c_str(), extension.c_str()))); - } - - return AZ::Success(); - } - - // Determine which product path to use based on the path stored in the texture, and make it relative to - // the cache. - bool ResolveMaterialTexturePath(const AZStd::string& path, AZStd::string& outPath) - { - AZStd::string aliasedPath = path; - - //if its a source image format try to load the dds - AZStd::string extension; - bool hasExtension = AzFramework::StringFunc::Path::GetExtension(path.c_str(), extension); - - // Replace all supported extensions with DDS if it has an extension. If the extension exists but is not supported, fail out. - if (hasExtension && IsSupportedImageExtension(extension)) - { - AzFramework::StringFunc::Path::ReplaceExtension(aliasedPath, ".dds"); - } - else if (hasExtension) - { - AZ_Warning(s_materialBuilder, false, "Failed to resolve texture path %s as the path is not to a supported texture format. Please make sure that textures in materials are formats supported by Open 3D Engine.", aliasedPath.c_str()); - return false; - } - - AZStd::to_lower(aliasedPath.begin(), aliasedPath.end()); - AzFramework::StringFunc::Path::Normalize(aliasedPath); - - AZStd::string currentFolderSpecifier = AZStd::string::format(".%c", AZ_CORRECT_FILESYSTEM_SEPARATOR); - if (AzFramework::StringFunc::StartsWith(aliasedPath, currentFolderSpecifier)) - { - AzFramework::StringFunc::Strip(aliasedPath, currentFolderSpecifier.c_str(), false, true); - } - - AZStd::string resolvedPath; - char fullPathBuffer[AZ_MAX_PATH_LEN] = {}; - // if there is an alias already at the front of the path, resolve it, and try to make it relative to the - // cache (@products@). If it can't, then error out. - // This case handles the possibility of aliases existing in texture paths in materials that is still supported - // by the legacy loading code, however it is not currently used, so the else path is always taken. - if (aliasedPath[0] == '@') - { - if (!AZ::IO::FileIOBase::GetDirectInstance()->ResolvePath(aliasedPath.c_str(), fullPathBuffer, AZ_MAX_PATH_LEN)) - { - AZ_Warning(s_materialBuilder, false, "Failed to resolve the alias in texture path %s. Please make sure all aliases are registered with the engine.", aliasedPath.c_str()); - return false; - } - resolvedPath = fullPathBuffer; - AzFramework::StringFunc::Path::Normalize(resolvedPath); - if (!AzFramework::StringFunc::Replace(resolvedPath, AZ::IO::FileIOBase::GetDirectInstance()->GetAlias("@products@"), "")) - { - AZ_Warning(s_materialBuilder, false, "Failed to resolve aliased texture path %s to be relative to the asset cache. Please make sure this alias resolves to a path within the asset cache.", aliasedPath.c_str()); - return false; - } - } - else - { - resolvedPath = AZStd::move(aliasedPath); - } - - // AP deferred path resolution requires UNIX separators and no leading separators, so clean up and convert here - if (AzFramework::StringFunc::StartsWith(resolvedPath, AZ_CORRECT_FILESYSTEM_SEPARATOR_STRING)) - { - AzFramework::StringFunc::Strip(resolvedPath, AZ_CORRECT_FILESYSTEM_SEPARATOR, false, true); - } - AzFramework::StringFunc::Replace(resolvedPath, AZ_CORRECT_FILESYSTEM_SEPARATOR_STRING, "/"); - - outPath = AZStd::move(resolvedPath); - return true; - } - - } - - BuilderPluginComponent::BuilderPluginComponent() - { - } - - BuilderPluginComponent::~BuilderPluginComponent() - { - } - - void BuilderPluginComponent::Init() - { - } - - void BuilderPluginComponent::Activate() - { - // Register material builder - AssetBuilderSDK::AssetBuilderDesc builderDescriptor; - builderDescriptor.m_name = "MaterialBuilderWorker"; - builderDescriptor.m_patterns.push_back(AssetBuilderSDK::AssetBuilderPattern("*.mtl", AssetBuilderSDK::AssetBuilderPattern::PatternType::Wildcard)); - builderDescriptor.m_busId = MaterialBuilderWorker::GetUUID(); - builderDescriptor.m_version = 5; - builderDescriptor.m_createJobFunction = AZStd::bind(&MaterialBuilderWorker::CreateJobs, &m_materialBuilder, AZStd::placeholders::_1, AZStd::placeholders::_2); - builderDescriptor.m_processJobFunction = AZStd::bind(&MaterialBuilderWorker::ProcessJob, &m_materialBuilder, AZStd::placeholders::_1, AZStd::placeholders::_2); - - // (optimization) this builder does not emit source dependencies: - builderDescriptor.m_flags |= AssetBuilderSDK::AssetBuilderDesc::BF_EmitsNoDependencies; - - m_materialBuilder.BusConnect(builderDescriptor.m_busId); - - EBUS_EVENT(AssetBuilderSDK::AssetBuilderBus, RegisterBuilderInformation, builderDescriptor); - } - - void BuilderPluginComponent::Deactivate() - { - m_materialBuilder.BusDisconnect(); - } - - void BuilderPluginComponent::Reflect([[maybe_unused]] AZ::ReflectContext* context) - { - if (AZ::SerializeContext* serializeContext = azrtti_cast(context)) - { - serializeContext->Class() - ->Version(1) - ->Attribute(AZ::Edit::Attributes::SystemComponentTags, AZStd::vector({ AssetBuilderSDK::ComponentTags::AssetBuilder })); - } - } - - MaterialBuilderWorker::MaterialBuilderWorker() - { - } - MaterialBuilderWorker::~MaterialBuilderWorker() - { - } - - void MaterialBuilderWorker::ShutDown() - { - // This will be called on a different thread than the process job thread - m_isShuttingDown = true; - } - - // This happens early on in the file scanning pass. - // This function should always create the same jobs and not do any checking whether the job is up to date. - void MaterialBuilderWorker::CreateJobs(const AssetBuilderSDK::CreateJobsRequest& request, AssetBuilderSDK::CreateJobsResponse& response) - { - if (m_isShuttingDown) - { - response.m_result = AssetBuilderSDK::CreateJobsResultCode::ShuttingDown; - return; - } - - for (const AssetBuilderSDK::PlatformInfo& info : request.m_enabledPlatforms) - { - AssetBuilderSDK::JobDescriptor descriptor; - descriptor.m_jobKey = "Material Builder Job"; - descriptor.SetPlatformIdentifier(info.m_identifier.c_str()); - descriptor.m_priority = 8; // meshes are more important (at 10) but mats are still pretty important. - response.m_createJobOutputs.push_back(descriptor); - } - - response.m_result = AssetBuilderSDK::CreateJobsResultCode::Success; - } - - // The request will contain the CreateJobResponse you constructed earlier, including any keys and - // values you placed into the hash table - void MaterialBuilderWorker::ProcessJob(const AssetBuilderSDK::ProcessJobRequest& request, AssetBuilderSDK::ProcessJobResponse& response) - { - AZ_TracePrintf(AssetBuilderSDK::InfoWindow, "Starting Job.\n"); - AZStd::string fileName; - AzFramework::StringFunc::Path::GetFullFileName(request.m_fullPath.c_str(), fileName); - AZStd::string destPath; - - // Do all work inside the tempDirPath. - AzFramework::StringFunc::Path::ConstructFull(request.m_tempDirPath.c_str(), fileName.c_str(), destPath, true); - - AZ::IO::LocalFileIO fileIO; - if (!m_isShuttingDown && fileIO.Copy(request.m_fullPath.c_str(), destPath.c_str()) == AZ::IO::ResultCode::Success) - { - // Push assets back into the response's product list - // Assets you created in your temp path can be specified using paths relative to the temp path - // since that is assumed where you're writing stuff. - AZStd::string relPath = destPath; - AssetBuilderSDK::ProductPathDependencySet dependencyPaths; - response.m_resultCode = AssetBuilderSDK::ProcessJobResult_Success; - AssetBuilderSDK::JobProduct jobProduct(fileName); - - bool dependencyResult = GatherProductDependencies(request.m_fullPath, dependencyPaths); - if (dependencyResult) - { - jobProduct.m_pathDependencies = AZStd::move(dependencyPaths); - jobProduct.m_dependenciesHandled = true; // We've output the dependencies immediately above so it's OK to tell the AP we've handled dependencies - } - else - { - AZ_Error(s_materialBuilder, false, "Dependency gathering for %s failed.", request.m_fullPath.c_str()); - } - response.m_outputProducts.push_back(jobProduct); - } - else - { - if (m_isShuttingDown) - { - AZ_TracePrintf(AssetBuilderSDK::ErrorWindow, "Cancelled job %s because shutdown was requested.\n", request.m_fullPath.c_str()); - response.m_resultCode = AssetBuilderSDK::ProcessJobResult_Cancelled; - } - else - { - AZ_TracePrintf(AssetBuilderSDK::ErrorWindow, "Error during processing job %s.\n", request.m_fullPath.c_str()); - response.m_resultCode = AssetBuilderSDK::ProcessJobResult_Failed; - } - } - } - - bool MaterialBuilderWorker::GetResolvedTexturePathsFromMaterial(const AZStd::string& path, AZStd::vector& resolvedPaths) - { - if (!AZ::IO::SystemFile::Exists(path.c_str())) - { - AZ_Error(s_materialBuilder, false, "Failed to find material at path %s. Please make sure this material exists on disk.", path.c_str()); - return false; - } - - uint64_t fileSize = AZ::IO::SystemFile::Length(path.c_str()); - if (fileSize == 0) - { - AZ_Error(s_materialBuilder, false, "Material at path %s is an empty file. Please make sure this material was properly saved to disk.", path.c_str()); - return false; - } - - AZStd::vector buffer(fileSize + 1); - buffer[fileSize] = 0; - if (!AZ::IO::SystemFile::Read(path.c_str(), buffer.data())) - { - AZ_Error(s_materialBuilder, false, "Failed to read material at path %s. Please make sure the file is not open or being edited by another program.", path.c_str()); - return false; - } - - AZ::rapidxml::xml_document* xmlDoc = azcreate(AZ::rapidxml::xml_document, (), AZ::SystemAllocator, "Mtl builder temp XML Reader"); - if (!xmlDoc->parse(buffer.data())) - { - azdestroy(xmlDoc, AZ::SystemAllocator, AZ::rapidxml::xml_document); - AZ_Error(s_materialBuilder, false, "Failed to parse material at path %s into XML. Please make sure that the material was properly saved to disk.", path.c_str()); - return false; - } - - // if the first node in this file isn't a material, this must not actually be a material so it can't have deps - AZ::rapidxml::xml_node* rootNode = xmlDoc->first_node(Internal::g_nodeNameMaterial); - if (!rootNode) - { - azdestroy(xmlDoc, AZ::SystemAllocator, AZ::rapidxml::xml_document); - AZ_Error(s_materialBuilder, false, "Failed to find root material node for material at path %s. Please make sure that the material was properly saved to disk.", path.c_str()); - return false; - } - - AZStd::vector texturePaths; - // gather all textures in the material file - AZ::Outcome texturePathsResult = Internal::GetTexturePathsFromMaterial(rootNode, texturePaths); - if (!texturePathsResult.IsSuccess()) - { - azdestroy(xmlDoc, AZ::SystemAllocator, AZ::rapidxml::xml_document); - AZ_Error(s_materialBuilder, false, "Failed to gather dependencies for %s as the material file is malformed. %s", path.c_str(), texturePathsResult.GetError().c_str()); - return false; - } - else if (!texturePathsResult.GetValue().empty()) - { - AZ_Warning(s_materialBuilder, false, "Some nodes in material %s could not be read as the material is malformed. %s. Some dependencies might not be reported correctly. Please make sure that the material was properly saved to disk.", path.c_str(), texturePathsResult.GetValue().c_str()); - } - azdestroy(xmlDoc, AZ::SystemAllocator, AZ::rapidxml::xml_document); - - // fail this if there are absolute paths. - for (const AZStd::string& texPath : texturePaths) - { - if (AZ::IO::PathView(texPath).IsAbsolute()) - { - AZ_Warning(s_materialBuilder, false, "Skipping resolving of texture path %s in material %s as the texture path is an absolute path. Please update the texture path to be relative to the asset cache.", texPath.c_str(), path.c_str()); - texturePaths.erase(AZStd::find(texturePaths.begin(), texturePaths.end(), texPath)); - } - } - - // for each path in the array, split any texture animation entry up into the individual files and add each to the list. - for (const AZStd::string& texPath : texturePaths) - { - if (texPath.find('#') != AZStd::string::npos) - { - AZStd::vector actualTexturePaths; - AZ::Outcome parseTextureSequenceResult = Internal::GetAllTexturesInTextureSequence(texPath, actualTexturePaths); - if (parseTextureSequenceResult.IsSuccess()) - { - texturePaths.erase(AZStd::find(texturePaths.begin(), texturePaths.end(), texPath)); - texturePaths.insert(texturePaths.end(), actualTexturePaths.begin(), actualTexturePaths.end()); - } - else - { - texturePaths.erase(AZStd::find(texturePaths.begin(), texturePaths.end(), texPath)); - AZ_Warning(s_materialBuilder, false, "Failed to parse texture sequence %s when trying to gather dependencies for %s. %s Please make sure the texture sequence path is formatted correctly. Registering dependencies for the texture sequence will be skipped.", texPath.c_str(), path.c_str(), parseTextureSequenceResult.GetError().c_str()); - } - } - } - - // for each texture in the file - for (const AZStd::string& texPath : texturePaths) - { - // if the texture path starts with a '$' then it is a special runtime defined texture, so it it doesn't have - // an actual asset on disk to depend on. If the texture path doesn't have an extension, then it is a texture - // that is determined at runtime (such as 'nearest_cubemap'), so also ignore those, as other things pull in - // those dependencies. - if (AzFramework::StringFunc::StartsWith(texPath, "$") || !AzFramework::StringFunc::Path::HasExtension(texPath.c_str())) - { - continue; - } - - // resolve the path in the file. - AZStd::string resolvedPath; - if (!Internal::ResolveMaterialTexturePath(texPath, resolvedPath)) - { - AZ_Warning(s_materialBuilder, false, "Failed to resolve texture path %s to a product path when gathering dependencies for %s. Registering dependencies on this texture path will be skipped.", texPath.c_str(), path.c_str()); - continue; - } - - resolvedPaths.emplace_back(AZStd::move(resolvedPath)); - } - - return true; - } - - bool MaterialBuilderWorker::PopulateProductDependencyList(AZStd::vector& resolvedPaths, AssetBuilderSDK::ProductPathDependencySet& dependencies) - { - for (const AZStd::string& texturePath : resolvedPaths) - { - if (texturePath.empty()) - { - AZ_Warning(s_materialBuilder, false, "Resolved path is empty.\n"); - return false; - } - - dependencies.emplace(texturePath, AssetBuilderSDK::ProductPathDependencyType::ProductFile); - } - return true; - } - - bool MaterialBuilderWorker::GatherProductDependencies(const AZStd::string& path, AssetBuilderSDK::ProductPathDependencySet& dependencies) - { - AZStd::vector resolvedTexturePaths; - if (!GetResolvedTexturePathsFromMaterial(path, resolvedTexturePaths)) - { - return false; - } - - if (!PopulateProductDependencyList(resolvedTexturePaths, dependencies)) - { - AZ_Warning(s_materialBuilder, false, "Failed to populate dependency list for material %s with possible variants for textures.", path.c_str()); - } - - return true; - } - - AZ::Uuid MaterialBuilderWorker::GetUUID() - { - return AZ::Uuid::CreateString("{258D34AC-12F8-4196-B535-3206D8E7287B}"); - } -} diff --git a/Gems/LmbrCentral/Code/Source/Builders/MaterialBuilder/MaterialBuilderComponent.h b/Gems/LmbrCentral/Code/Source/Builders/MaterialBuilder/MaterialBuilderComponent.h deleted file mode 100644 index a7813cf0bd..0000000000 --- a/Gems/LmbrCentral/Code/Source/Builders/MaterialBuilder/MaterialBuilderComponent.h +++ /dev/null @@ -1,65 +0,0 @@ -/* - * Copyright (c) Contributors to the Open 3D Engine Project. - * For complete copyright and license terms please see the LICENSE at the root of this distribution. - * - * SPDX-License-Identifier: Apache-2.0 OR MIT - * - */ - -#pragma once - -#include -#include -#include - -namespace MaterialBuilder -{ - //! Material builder is responsible for building material files - class MaterialBuilderWorker - : public AssetBuilderSDK::AssetBuilderCommandBus::Handler - { - public: - MaterialBuilderWorker(); - ~MaterialBuilderWorker(); - - //! Asset Builder Callback Functions - void CreateJobs(const AssetBuilderSDK::CreateJobsRequest& request, AssetBuilderSDK::CreateJobsResponse& response); - void ProcessJob(const AssetBuilderSDK::ProcessJobRequest& request, AssetBuilderSDK::ProcessJobResponse& response); - - //!AssetBuilderSDK::AssetBuilderCommandBus interface - void ShutDown() override; - - //! Returns the UUID for this builder - static AZ::Uuid GetUUID(); - - bool GetResolvedTexturePathsFromMaterial(const AZStd::string& path, AZStd::vector& resolvedPaths); - bool PopulateProductDependencyList(AZStd::vector& resolvedPaths, AssetBuilderSDK::ProductPathDependencySet& dependencies); - - private: - bool GatherProductDependencies(const AZStd::string& path, AssetBuilderSDK::ProductPathDependencySet& dependencies); - - bool m_isShuttingDown = false; - }; - - class BuilderPluginComponent - : public AZ::Component - { - public: - AZ_COMPONENT(BuilderPluginComponent, "{4D1A4B0C-54CE-4397-B8AE-ADD08898C2CD}") - static void Reflect(AZ::ReflectContext* context); - - BuilderPluginComponent(); - - ////////////////////////////////////////////////////////////////////////// - // AZ::Component - virtual void Init(); // create objects, allocate memory and initialize yourself without reaching out to the outside world - virtual void Activate(); // reach out to the outside world and connect up to what you need to, register things, etc. - virtual void Deactivate(); // unregister things, disconnect from the outside world - ////////////////////////////////////////////////////////////////////////// - - virtual ~BuilderPluginComponent(); // free memory an uninitialize yourself. - - private: - MaterialBuilderWorker m_materialBuilder; - }; -} diff --git a/Gems/LmbrCentral/Code/Source/LmbrCentral.cpp b/Gems/LmbrCentral/Code/Source/LmbrCentral.cpp index 027d19fdef..84ef11b35d 100644 --- a/Gems/LmbrCentral/Code/Source/LmbrCentral.cpp +++ b/Gems/LmbrCentral/Code/Source/LmbrCentral.cpp @@ -38,9 +38,6 @@ #include "Geometry/GeometrySystemComponent.h" #include -// Unhandled asset types -// Material -#include "Unhandled/Material/MaterialAssetTypeInfo.h" // Other #include "Unhandled/Other/AudioAssetTypeInfo.h" #include "Unhandled/Other/CharacterPhysicsAssetTypeInfo.h" @@ -80,6 +77,7 @@ #include "Shape/CompoundShapeComponent.h" #include "Shape/SplineComponent.h" #include "Shape/PolygonPrismShapeComponent.h" +#include "Shape/ReferenceShapeComponent.h" namespace LmbrCentral { @@ -206,6 +204,7 @@ namespace LmbrCentral CapsuleShapeComponent::CreateDescriptor(), TubeShapeComponent::CreateDescriptor(), CompoundShapeComponent::CreateDescriptor(), + ReferenceShapeComponent::CreateDescriptor(), SplineComponent::CreateDescriptor(), PolygonPrismShapeComponent::CreateDescriptor(), NavigationSystemComponent::CreateDescriptor(), @@ -353,8 +352,6 @@ namespace LmbrCentral // Add asset types and extensions to AssetCatalog. Uses "AssetCatalogService". if (auto assetCatalog = AZ::Data::AssetCatalogRequestBus::FindFirstHandler(); assetCatalog) { - assetCatalog->EnableCatalogForAsset(AZ::AzTypeInfo::Uuid()); - assetCatalog->EnableCatalogForAsset(AZ::AzTypeInfo::Uuid()); assetCatalog->EnableCatalogForAsset(AZ::AzTypeInfo::Uuid()); assetCatalog->EnableCatalogForAsset(AZ::AzTypeInfo::Uuid()); @@ -364,24 +361,12 @@ namespace LmbrCentral assetCatalog->AddExtension("dds"); assetCatalog->AddExtension("caf"); assetCatalog->AddExtension("xml"); - assetCatalog->AddExtension("mtl"); - assetCatalog->AddExtension("dccmtl"); assetCatalog->AddExtension("sprite"); assetCatalog->AddExtension("cax"); } AZ::Data::AssetManagerNotificationBus::Handler::BusConnect(); - - // Register unhandled asset type info - // Material - auto materialAssetTypeInfo = aznew MaterialAssetTypeInfo(); - materialAssetTypeInfo->Register(); - m_unhandledAssetInfo.emplace_back(materialAssetTypeInfo); - // DCC Material - auto dccMaterialAssetTypeInfo = aznew DccMaterialAssetTypeInfo(); - dccMaterialAssetTypeInfo->Register(); - m_unhandledAssetInfo.emplace_back(dccMaterialAssetTypeInfo); // Other auto audioAssetTypeInfo = aznew AudioAssetTypeInfo(); audioAssetTypeInfo->Register(); diff --git a/Gems/LmbrCentral/Code/Source/LmbrCentralEditor.cpp b/Gems/LmbrCentral/Code/Source/LmbrCentralEditor.cpp index 511bf98582..69e7f57de8 100644 --- a/Gems/LmbrCentral/Code/Source/LmbrCentralEditor.cpp +++ b/Gems/LmbrCentral/Code/Source/LmbrCentralEditor.cpp @@ -34,6 +34,7 @@ #include "Shape/EditorSplineComponent.h" #include "Shape/EditorTubeShapeComponent.h" #include "Shape/EditorPolygonPrismShapeComponent.h" +#include "Shape/EditorReferenceShapeComponent.h" #include "Editor/EditorCommentComponent.h" #include "Shape/EditorCompoundShapeComponent.h" @@ -43,7 +44,6 @@ #include #include #include -#include #include #include #include "Builders/CopyDependencyBuilder/CopyDependencyBuilderComponent.h" @@ -74,6 +74,7 @@ namespace LmbrCentral EditorCylinderShapeComponent::CreateDescriptor(), EditorCapsuleShapeComponent::CreateDescriptor(), EditorCompoundShapeComponent::CreateDescriptor(), + EditorReferenceShapeComponent::CreateDescriptor(), EditorSplineComponent::CreateDescriptor(), EditorPolygonPrismShapeComponent::CreateDescriptor(), EditorCommentComponent::CreateDescriptor(), @@ -84,7 +85,6 @@ namespace LmbrCentral CopyDependencyBuilder::CopyDependencyBuilderComponent::CreateDescriptor(), DependencyBuilder::DependencyBuilderComponent::CreateDescriptor(), LevelBuilder::LevelBuilderComponent::CreateDescriptor(), - MaterialBuilder::BuilderPluginComponent::CreateDescriptor(), SliceBuilder::BuilderPluginComponent::CreateDescriptor(), TranslationBuilder::BuilderPluginComponent::CreateDescriptor(), LuaBuilder::BuilderPluginComponent::CreateDescriptor(), diff --git a/Gems/LmbrCentral/Code/Source/Scripting/RandomTimedSpawnerComponent.cpp b/Gems/LmbrCentral/Code/Source/Scripting/RandomTimedSpawnerComponent.cpp index 275a50c13b..f426bc6075 100644 --- a/Gems/LmbrCentral/Code/Source/Scripting/RandomTimedSpawnerComponent.cpp +++ b/Gems/LmbrCentral/Code/Source/Scripting/RandomTimedSpawnerComponent.cpp @@ -13,6 +13,7 @@ #include #include +#include namespace LmbrCentral { @@ -88,8 +89,8 @@ namespace LmbrCentral void RandomTimedSpawnerComponent::Activate() { - AZStd::chrono::system_clock::time_point now = AZStd::chrono::system_clock::now(); - m_currentTime = AZ::ScriptTimePoint(now).GetSeconds(); + const AZ::TimeUs elapsedTimeUs = AZ::GetElapsedTimeUs(); + m_currentTime = AZ::TimeUsToSecondsDouble(elapsedTimeUs); RandomTimedSpawnerComponentRequestBus::Handler::BusConnect(GetEntityId()); CalculateNextSpawnTime(); diff --git a/Gems/LmbrCentral/Code/Source/Scripting/TagComponent.cpp b/Gems/LmbrCentral/Code/Source/Scripting/TagComponent.cpp index f2701473f3..7eb3c62b5d 100644 --- a/Gems/LmbrCentral/Code/Source/Scripting/TagComponent.cpp +++ b/Gems/LmbrCentral/Code/Source/Scripting/TagComponent.cpp @@ -92,7 +92,7 @@ namespace LmbrCentral ; behaviorContext->EBus("TagGlobalRequestBus") - ->Event("RequestTaggedEntities", &TagGlobalRequestBus::Events::RequestTaggedEntities) + ->Event("Get Entity By Tag", &TagGlobalRequestBus::Events::RequestTaggedEntities, "RequestTaggedEntities") ; behaviorContext->EBus("TagComponentNotificationsBus") diff --git a/Gems/LmbrCentral/Code/Source/Shape/EditorAxisAlignedBoxShapeComponent.cpp b/Gems/LmbrCentral/Code/Source/Shape/EditorAxisAlignedBoxShapeComponent.cpp index c833677b1d..f78f2f048d 100644 --- a/Gems/LmbrCentral/Code/Source/Shape/EditorAxisAlignedBoxShapeComponent.cpp +++ b/Gems/LmbrCentral/Code/Source/Shape/EditorAxisAlignedBoxShapeComponent.cpp @@ -36,8 +36,8 @@ namespace LmbrCentral "Axis Aligned Box Shape", "The Axis Aligned Box Shape component creates a box around the associated entity") ->ClassElement(AZ::Edit::ClassElements::EditorData, "") ->Attribute(AZ::Edit::Attributes::Category, "Shape") - ->Attribute(AZ::Edit::Attributes::Icon, "Icons/Components/Box_Shape.svg") - ->Attribute(AZ::Edit::Attributes::ViewportIcon, "Icons/Components/Viewport/Box_Shape.svg") + ->Attribute(AZ::Edit::Attributes::Icon, "Editor/Icons/Components/AxisAlignedBoxShape.svg") + ->Attribute(AZ::Edit::Attributes::ViewportIcon, "Editor/Icons/Components/Viewport/AxisAlignedBoxShape.svg") ->Attribute(AZ::Edit::Attributes::AppearsInAddComponentMenu, AZ_CRC_CE("Game")) ->Attribute(AZ::Edit::Attributes::AutoExpand, true) ->Attribute(AZ::Edit::Attributes::HelpPageURL, "https://o3de.org/docs/user-guide/components/reference/shape/axis-aligned-box-shape/") diff --git a/Gems/LmbrCentral/Code/Source/Shape/EditorReferenceShapeComponent.cpp b/Gems/LmbrCentral/Code/Source/Shape/EditorReferenceShapeComponent.cpp new file mode 100644 index 0000000000..aca4fbc3b0 --- /dev/null +++ b/Gems/LmbrCentral/Code/Source/Shape/EditorReferenceShapeComponent.cpp @@ -0,0 +1,21 @@ +/* + * Copyright (c) Contributors to the Open 3D Engine Project. + * For complete copyright and license terms please see the LICENSE at the root of this distribution. + * + * SPDX-License-Identifier: Apache-2.0 OR MIT + * + */ + +#include "EditorReferenceShapeComponent.h" +#include +#include +#include +#include + +namespace LmbrCentral +{ + void EditorReferenceShapeComponent::Reflect(AZ::ReflectContext* context) + { + ReflectSubClass(context, 1, &EditorWrappedComponentBaseVersionConverter); + } +} diff --git a/Gems/LmbrCentral/Code/Source/Shape/EditorReferenceShapeComponent.h b/Gems/LmbrCentral/Code/Source/Shape/EditorReferenceShapeComponent.h new file mode 100644 index 0000000000..fd98809bcc --- /dev/null +++ b/Gems/LmbrCentral/Code/Source/Shape/EditorReferenceShapeComponent.h @@ -0,0 +1,31 @@ +/* + * Copyright (c) Contributors to the Open 3D Engine Project. + * For complete copyright and license terms please see the LICENSE at the root of this distribution. + * + * SPDX-License-Identifier: Apache-2.0 OR MIT + * + */ + +#pragma once + +#include +#include + +namespace LmbrCentral +{ + class EditorReferenceShapeComponent + : public EditorWrappedComponentBase + { + public: + using BaseClassType = EditorWrappedComponentBase; + AZ_EDITOR_COMPONENT(EditorReferenceShapeComponent, EditorReferenceShapeComponentTypeId, BaseClassType); + static void Reflect(AZ::ReflectContext* context); + + static constexpr const char* const s_categoryName = "Shape"; + static constexpr const char* const s_componentName = "Shape Reference"; + static constexpr const char* const s_componentDescription = "Enables the entity to reference and reuse shape entities"; + static constexpr const char* const s_icon = "Editor/Icons/Components/ShapeReference.svg"; + static constexpr const char* const s_viewportIcon = "Editor/Icons/Components/Viewport/ShapeReference.svg"; + static constexpr const char* const s_helpUrl = "https://o3de.org/docs/user-guide/components/reference/"; + }; +} diff --git a/Gems/LmbrCentral/Code/Source/Shape/EditorTubeShapeComponentMode.cpp b/Gems/LmbrCentral/Code/Source/Shape/EditorTubeShapeComponentMode.cpp index 340752251d..fd91c84c12 100644 --- a/Gems/LmbrCentral/Code/Source/Shape/EditorTubeShapeComponentMode.cpp +++ b/Gems/LmbrCentral/Code/Source/Shape/EditorTubeShapeComponentMode.cpp @@ -22,7 +22,7 @@ namespace LmbrCentral { AZ_CLASS_ALLOCATOR_IMPL(EditorTubeShapeComponentMode, AZ::SystemAllocator, 0) - static const AZ::Crc32 s_resetVariableRadii = AZ_CRC("com.o3de.action.tubeshape.reset_radii", 0x0f2ef8e2); + static const AZ::Crc32 s_resetVariableRadii = AZ_CRC("com.o3de.action.tubeshape.reset_radii", 0xa987659c); static const char* const s_resetRadiiTitle = "Reset Radii"; static const char* const s_resetRadiiDesc = "Reset all variable radius values to the default"; diff --git a/Gems/Vegetation/Code/Source/Components/ReferenceShapeComponent.cpp b/Gems/LmbrCentral/Code/Source/Shape/ReferenceShapeComponent.cpp similarity index 91% rename from Gems/Vegetation/Code/Source/Components/ReferenceShapeComponent.cpp rename to Gems/LmbrCentral/Code/Source/Shape/ReferenceShapeComponent.cpp index 620e43457d..1fc4bb5107 100644 --- a/Gems/Vegetation/Code/Source/Components/ReferenceShapeComponent.cpp +++ b/Gems/LmbrCentral/Code/Source/Shape/ReferenceShapeComponent.cpp @@ -11,7 +11,7 @@ #include #include -namespace Vegetation +namespace LmbrCentral { void ReferenceShapeConfig::Reflect(AZ::ReflectContext* context) { @@ -27,7 +27,7 @@ namespace Vegetation if (edit) { edit->Class( - "Vegetation Reference Shape", "") + "Shape Reference", "") ->ClassElement(AZ::Edit::ClassElements::EditorData, "") ->Attribute(AZ::Edit::Attributes::Visibility, AZ::Edit::PropertyVisibility::ShowChildrenOnly) ->Attribute(AZ::Edit::Attributes::AutoExpand, true) @@ -190,7 +190,7 @@ namespace Vegetation { AZ::Crc32 result = {}; - AZ_WarningOnce("Vegetation", !m_isRequestInProgress, "Detected cyclic dependences with vegetation entity references"); + AZ_WarningOnce("Shape", !m_isRequestInProgress, "Detected cyclic dependencies with shape entity references"); if (AllowRequest()) { m_isRequestInProgress = true; @@ -205,7 +205,7 @@ namespace Vegetation { AZ::Aabb result = AZ::Aabb::CreateNull(); - AZ_WarningOnce("Vegetation", !m_isRequestInProgress, "Detected cyclic dependences with vegetation entity references"); + AZ_WarningOnce("Shape", !m_isRequestInProgress, "Detected cyclic dependencies with shape entity references"); if (AllowRequest()) { m_isRequestInProgress = true; @@ -221,7 +221,7 @@ namespace Vegetation transform = AZ::Transform::CreateIdentity(); bounds = AZ::Aabb::CreateNull(); - AZ_WarningOnce("Vegetation", !m_isRequestInProgress, "Detected cyclic dependences with vegetation entity references"); + AZ_WarningOnce("Shape", !m_isRequestInProgress, "Detected cyclic dependencies with shape entity references"); if (AllowRequest()) { m_isRequestInProgress = true; @@ -234,7 +234,7 @@ namespace Vegetation { bool result = false; - AZ_WarningOnce("Vegetation", !m_isRequestInProgress, "Detected cyclic dependences with vegetation entity references"); + AZ_WarningOnce("Shape", !m_isRequestInProgress, "Detected cyclic dependencies with shape entity references"); if (AllowRequest()) { m_isRequestInProgress = true; @@ -249,7 +249,7 @@ namespace Vegetation { float result = FLT_MAX; - AZ_WarningOnce("Vegetation", !m_isRequestInProgress, "Detected cyclic dependences with vegetation entity references"); + AZ_WarningOnce("Shape", !m_isRequestInProgress, "Detected cyclic dependencies with shape entity references"); if (AllowRequest()) { m_isRequestInProgress = true; @@ -264,7 +264,7 @@ namespace Vegetation { float result = FLT_MAX; - AZ_WarningOnce("Vegetation", !m_isRequestInProgress, "Detected cyclic dependences with vegetation entity references"); + AZ_WarningOnce("Shape", !m_isRequestInProgress, "Detected cyclic dependencies with shape entity references"); if (AllowRequest()) { m_isRequestInProgress = true; @@ -279,7 +279,7 @@ namespace Vegetation { AZ::Vector3 result = AZ::Vector3::CreateZero(); - AZ_WarningOnce("Vegetation", !m_isRequestInProgress, "Detected cyclic dependences with vegetation entity references"); + AZ_WarningOnce("Shape", !m_isRequestInProgress, "Detected cyclic dependencies with shape entity references"); if (AllowRequest()) { m_isRequestInProgress = true; @@ -294,7 +294,7 @@ namespace Vegetation { bool result = false; - AZ_WarningOnce("Vegetation", !m_isRequestInProgress, "Detected cyclic dependences with vegetation entity references"); + AZ_WarningOnce("Shape", !m_isRequestInProgress, "Detected cyclic dependencies with shape entity references"); if (AllowRequest()) { m_isRequestInProgress = true; diff --git a/Gems/Vegetation/Code/Source/Components/ReferenceShapeComponent.h b/Gems/LmbrCentral/Code/Source/Shape/ReferenceShapeComponent.h similarity index 98% rename from Gems/Vegetation/Code/Source/Components/ReferenceShapeComponent.h rename to Gems/LmbrCentral/Code/Source/Shape/ReferenceShapeComponent.h index dc61768bee..b4e11b13cb 100644 --- a/Gems/Vegetation/Code/Source/Components/ReferenceShapeComponent.h +++ b/Gems/LmbrCentral/Code/Source/Shape/ReferenceShapeComponent.h @@ -12,16 +12,13 @@ #include #include #include -#include +#include namespace LmbrCentral { template class EditorWrappedComponentBase; -} -namespace Vegetation -{ class ReferenceShapeConfig : public AZ::ComponentConfig { diff --git a/Gems/LmbrCentral/Code/Source/Unhandled/Material/MaterialAssetTypeInfo.cpp b/Gems/LmbrCentral/Code/Source/Unhandled/Material/MaterialAssetTypeInfo.cpp deleted file mode 100644 index 24bc43740d..0000000000 --- a/Gems/LmbrCentral/Code/Source/Unhandled/Material/MaterialAssetTypeInfo.cpp +++ /dev/null @@ -1,88 +0,0 @@ -/* - * Copyright (c) Contributors to the Open 3D Engine Project. - * For complete copyright and license terms please see the LICENSE at the root of this distribution. - * - * SPDX-License-Identifier: Apache-2.0 OR MIT - * - */ - -#include "MaterialAssetTypeInfo.h" - -#include - -namespace LmbrCentral -{ - // MaterialAssetTypeInfo - - MaterialAssetTypeInfo::~MaterialAssetTypeInfo() - { - Unregister(); - } - - void MaterialAssetTypeInfo::Register() - { - AZ::AssetTypeInfoBus::Handler::BusConnect(AZ::AzTypeInfo::Uuid()); - } - - void MaterialAssetTypeInfo::Unregister() - { - AZ::AssetTypeInfoBus::Handler::BusDisconnect(AZ::AzTypeInfo::Uuid()); - } - - AZ::Data::AssetType MaterialAssetTypeInfo::GetAssetType() const - { - return AZ::AzTypeInfo::Uuid(); - } - - const char* MaterialAssetTypeInfo::GetAssetTypeDisplayName() const - { - return "Material"; - } - - const char* MaterialAssetTypeInfo::GetGroup() const - { - return "Material"; - } - - const char* MaterialAssetTypeInfo::GetBrowserIcon() const - { - return "Icons/Components/Decal.svg"; - } - - // DccMaterialAssetTypeInfo - - DccMaterialAssetTypeInfo::~DccMaterialAssetTypeInfo() - { - Unregister(); - } - - void DccMaterialAssetTypeInfo::Register() - { - AZ::AssetTypeInfoBus::Handler::BusConnect(AZ::AzTypeInfo::Uuid()); - } - - void DccMaterialAssetTypeInfo::Unregister() - { - AZ::AssetTypeInfoBus::Handler::BusDisconnect(AZ::AzTypeInfo::Uuid()); - } - - AZ::Data::AssetType DccMaterialAssetTypeInfo::GetAssetType() const - { - return AZ::AzTypeInfo::Uuid(); - } - - const char* DccMaterialAssetTypeInfo::GetAssetTypeDisplayName() const - { - return "DccMaterial"; - } - - const char* DccMaterialAssetTypeInfo::GetGroup() const - { - return "DccMaterial"; - } - - const char* DccMaterialAssetTypeInfo::GetBrowserIcon() const - { - return "Icons/Components/Decal.svg"; - } -} // namespace LmbrCentral diff --git a/Gems/LmbrCentral/Code/Source/Unhandled/Material/MaterialAssetTypeInfo.h b/Gems/LmbrCentral/Code/Source/Unhandled/Material/MaterialAssetTypeInfo.h deleted file mode 100644 index 2eafa31b41..0000000000 --- a/Gems/LmbrCentral/Code/Source/Unhandled/Material/MaterialAssetTypeInfo.h +++ /dev/null @@ -1,55 +0,0 @@ -/* - * Copyright (c) Contributors to the Open 3D Engine Project. - * For complete copyright and license terms please see the LICENSE at the root of this distribution. - * - * SPDX-License-Identifier: Apache-2.0 OR MIT - * - */ -#pragma once - -#include - -namespace LmbrCentral -{ - class MaterialAssetTypeInfo - : public AZ::AssetTypeInfoBus::Handler - { - public: - - AZ_CLASS_ALLOCATOR(MaterialAssetTypeInfo, AZ::SystemAllocator, 0); - - ~MaterialAssetTypeInfo() override; - - ////////////////////////////////////////////////////////////////////////////////////////////// - // AZ::AssetTypeInfoBus::Handler - AZ::Data::AssetType GetAssetType() const override; - const char* GetAssetTypeDisplayName() const override; - const char* GetGroup() const override; - const char* GetBrowserIcon() const override; - ////////////////////////////////////////////////////////////////////////////////////////////// - - void Register(); - void Unregister(); - }; - - class DccMaterialAssetTypeInfo - : public AZ::AssetTypeInfoBus::Handler - { - public: - - AZ_CLASS_ALLOCATOR(DccMaterialAssetTypeInfo, AZ::SystemAllocator, 0); - - ~DccMaterialAssetTypeInfo() override; - - ////////////////////////////////////////////////////////////////////////////////////////////// - // AZ::AssetTypeInfoBus::Handler - AZ::Data::AssetType GetAssetType() const override; - const char* GetAssetTypeDisplayName() const override; - const char* GetGroup() const override; - const char* GetBrowserIcon() const override; - ////////////////////////////////////////////////////////////////////////////////////////////// - - void Register(); - void Unregister(); - }; -} // namespace LmbrCentral diff --git a/Gems/LmbrCentral/Code/Tests/Builders/LevelBuilderTest.cpp b/Gems/LmbrCentral/Code/Tests/Builders/LevelBuilderTest.cpp index e50fbbe56c..697c5c3b06 100644 --- a/Gems/LmbrCentral/Code/Tests/Builders/LevelBuilderTest.cpp +++ b/Gems/LmbrCentral/Code/Tests/Builders/LevelBuilderTest.cpp @@ -99,7 +99,9 @@ namespace UnitTest AZ::SettingsRegistryInterface* registry = AZ::SettingsRegistry::Get(); auto projectPathKey = AZ::SettingsRegistryInterface::FixedValueString(AZ::SettingsRegistryMergeUtils::BootstrapSettingsRootKey) + "/project_path"; - registry->Set(projectPathKey, "AutomatedTesting"); + AZ::IO::FixedMaxPath enginePath; + registry->Get(enginePath.Native(), AZ::SettingsRegistryMergeUtils::FilePathKey_EngineRootFolder); + registry->Set(projectPathKey, (enginePath / "AutomatedTesting").Native()); AZ::SettingsRegistryMergeUtils::MergeSettingsToRegistry_AddRuntimeFilePaths(*registry); m_app.Start(m_descriptor); diff --git a/Gems/LmbrCentral/Code/Tests/Builders/LuaBuilderTests.cpp b/Gems/LmbrCentral/Code/Tests/Builders/LuaBuilderTests.cpp index a9b36d4624..c62ed92c83 100644 --- a/Gems/LmbrCentral/Code/Tests/Builders/LuaBuilderTests.cpp +++ b/Gems/LmbrCentral/Code/Tests/Builders/LuaBuilderTests.cpp @@ -31,7 +31,9 @@ namespace UnitTest AZ::SettingsRegistryInterface* registry = AZ::SettingsRegistry::Get(); auto projectPathKey = AZ::SettingsRegistryInterface::FixedValueString(AZ::SettingsRegistryMergeUtils::BootstrapSettingsRootKey) + "/project_path"; - registry->Set(projectPathKey, "AutomatedTesting"); + AZ::IO::FixedMaxPath enginePath; + registry->Get(enginePath.Native(), AZ::SettingsRegistryMergeUtils::FilePathKey_EngineRootFolder); + registry->Set(projectPathKey, (enginePath / "AutomatedTesting").Native()); AZ::SettingsRegistryMergeUtils::MergeSettingsToRegistry_AddRuntimeFilePaths(*registry); m_app.Start(m_descriptor); diff --git a/Gems/LmbrCentral/Code/Tests/Builders/MaterialBuilderTests.cpp b/Gems/LmbrCentral/Code/Tests/Builders/MaterialBuilderTests.cpp deleted file mode 100644 index 3786ef7565..0000000000 --- a/Gems/LmbrCentral/Code/Tests/Builders/MaterialBuilderTests.cpp +++ /dev/null @@ -1,261 +0,0 @@ -/* - * Copyright (c) Contributors to the Open 3D Engine Project. - * For complete copyright and license terms please see the LICENSE at the root of this distribution. - * - * SPDX-License-Identifier: Apache-2.0 OR MIT - * - */ - -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - -namespace UnitTest -{ - using namespace MaterialBuilder; - using namespace AZ; - - class MaterialBuilderTests - : public UnitTest::AllocatorsTestFixture - , public UnitTest::TraceBusRedirector - { - protected: - void SetUp() override - { - UnitTest::AllocatorsTestFixture::SetUp(); - - m_app.reset(aznew AzToolsFramework::ToolsApplication); - m_app->Start(AZ::ComponentApplication::Descriptor()); - // Without this, the user settings component would attempt to save on finalize/shutdown. Since the file is - // shared across the whole engine, if multiple tests are run in parallel, the saving could cause a crash - // in the unit tests. - AZ::UserSettingsComponentRequestBus::Broadcast(&AZ::UserSettingsComponentRequests::DisableSaveOnFinalize); - AZ::Debug::TraceMessageBus::Handler::BusConnect(); - - const AZStd::string engineRoot = AZ::Test::GetEngineRootPath(); - AZ::IO::FileIOBase::GetInstance()->SetAlias("@engroot@", engineRoot.c_str()); - - AZ::IO::Path assetRoot(AZ::Utils::GetProjectPath()); - assetRoot /= "Cache"; - AZ::IO::FileIOBase::GetInstance()->SetAlias("@products@", assetRoot.c_str()); - } - - void TearDown() override - { - AZ::Debug::TraceMessageBus::Handler::BusDisconnect(); - m_app->Stop(); - m_app.reset(); - - UnitTest::AllocatorsTestFixture::TearDown(); - } - - AZStd::string GetTestFileAliasedPath(AZStd::string_view fileName) - { - constexpr char testFileFolder[] = "@engroot@/Gems/LmbrCentral/Code/Tests/Materials/"; - return AZStd::string::format("%s%.*s", testFileFolder, aznumeric_cast(fileName.size()), fileName.data()); - } - - AZStd::string GetTestFileFullPath(AZStd::string_view fileName) - { - AZStd::string aliasedPath = GetTestFileAliasedPath(fileName); - char resolvedPath[AZ_MAX_PATH_LEN]; - AZ::IO::FileIOBase::GetInstance()->ResolvePath(aliasedPath.c_str(), resolvedPath, AZ_MAX_PATH_LEN); - return AZStd::string(resolvedPath); - } - - void TestFailureCase(AZStd::string_view fileName, [[maybe_unused]] int expectedErrorCount) - { - MaterialBuilderWorker worker; - AZStd::vector resolvedPaths; - - AZStd::string absoluteMatPath = GetTestFileFullPath(fileName); - - AZ_TEST_START_ASSERTTEST; - ASSERT_FALSE(worker.GetResolvedTexturePathsFromMaterial(absoluteMatPath, resolvedPaths)); - AZ_TEST_STOP_ASSERTTEST(expectedErrorCount * 2); // The assert tests double count AZ errors, so just multiply expected count by 2 - ASSERT_EQ(resolvedPaths.size(), 0); - } - - void TestSuccessCase(AZStd::string_view fileName, AZStd::vector& expectedTextures) - { - MaterialBuilderWorker worker; - AZStd::vector resolvedPaths; - size_t texturesInMaterialFile = expectedTextures.size(); - - AZStd::string absoluteMatPath = GetTestFileFullPath(fileName); - ASSERT_TRUE(worker.GetResolvedTexturePathsFromMaterial(absoluteMatPath, resolvedPaths)); - ASSERT_EQ(resolvedPaths.size(), texturesInMaterialFile); - if (texturesInMaterialFile > 0) - { - ASSERT_THAT(resolvedPaths, testing::ElementsAreArray(expectedTextures)); - - AssetBuilderSDK::ProductPathDependencySet dependencies; - ASSERT_TRUE(worker.PopulateProductDependencyList(resolvedPaths, dependencies)); - ASSERT_EQ(dependencies.size(), texturesInMaterialFile); - } - } - - void TestSuccessCase(AZStd::string_view fileName, const char* expectedTexture) - { - AZStd::vector expectedTextures; - expectedTextures.push_back(expectedTexture); - TestSuccessCase(fileName, expectedTextures); - } - - void TestSuccessCaseNoDependencies(AZStd::string_view fileName) - { - AZStd::vector expectedTextures; - TestSuccessCase(fileName, expectedTextures); - } - - AZStd::unique_ptr m_app; - }; - - TEST_F(MaterialBuilderTests, MaterialBuilder_EmptyFile_ExpectFailure) - { - // Should fail in MaterialBuilderWorker::GetResolvedTexturePathsFromMaterial, when checking for the size of the file. - TestFailureCase("test_mat1.mtl", 1); - } - - TEST_F(MaterialBuilderTests, MaterialBuilder_MalformedMaterial_NoChildren_ExpectFailure) - { - // Should fail in MaterialBuilderWorker::GetResolvedTexturePathsFromMaterial after calling - // Internal::GetTexturePathsFromMaterial, which should return an AZ::Failure when both a Textures node and a - // SubMaterials node are not found. No other AZ_Errors should be generated. - TestFailureCase("test_mat2.mtl", 1); - } - - TEST_F(MaterialBuilderTests, MaterialBuilder_MalformedMaterial_EmptyTexturesNode_NoDependencies) - { - TestSuccessCaseNoDependencies("test_mat3.mtl"); - } - - TEST_F(MaterialBuilderTests, MaterialBuilder_MalformedMaterial_EmptySubMaterialNode_ExpectFailure) - { - // Should fail in MaterialBuilderWorker::GetResolvedTexturePathsFromMaterial after calling - // Internal::GetTexturePathsFromMaterial, which should return an AZ::Failure when a SubMaterials node is present, - // but has no children Material node. No other AZ_Errors should be generated. - TestFailureCase("test_mat4.mtl", 1); - } - - TEST_F(MaterialBuilderTests, MaterialBuilder_MalformedMaterial_EmptyTextureNode_NoDependencies) - { - TestSuccessCaseNoDependencies("test_mat5.mtl"); - } - - TEST_F(MaterialBuilderTests, MaterialBuilder_MalformedMaterial_EmptyMaterialInSubMaterial_ExpectFailure) - { - // Should fail in MaterialBuilderWorker::GetResolvedTexturePathsFromMaterial after calling - // Internal::GetTexturePathsFromMaterial, which should return an AZ::Failure when a SubMaterials node is present, - // but a child Material node has no child Textures node and no child SubMaterials node. No other AZ_Errors should - // be generated. - TestFailureCase("test_mat6.mtl", 1); - } - - TEST_F(MaterialBuilderTests, MaterialBuilder_MalformedMaterial_EmptyTextureNodeInSubMaterial_NoDependencies) - { - TestSuccessCaseNoDependencies("test_mat7.mtl"); - } - -#if AZ_TRAIT_OS_USE_WINDOWS_FILE_PATHS // The following test file 'test_mat8.mtl' has a windows-specific absolute path, so this test is only valid on windows - TEST_F(MaterialBuilderTests, MaterialBuilder_TextureAbsolutePath_NoDependencies) - { - TestSuccessCaseNoDependencies("test_mat8.mtl"); - } -#endif - - TEST_F(MaterialBuilderTests, MaterialBuilder_TextureRuntimeAlias_NoDependencies) - { - TestSuccessCaseNoDependencies("test_mat9.mtl"); - } - - TEST_F(MaterialBuilderTests, MaterialBuilder_TextureRuntimeTexture_NoDependencies) - { - TestSuccessCaseNoDependencies("test_mat10.mtl"); - } - - TEST_F(MaterialBuilderTests, MaterialBuilder_SingleMaterialSingleTexture_ValidSourceFormat) - { - // texture referenced is textures/natural/terrain/am_floor_tile_ddn.png - const char* expectedPath = "textures/natural/terrain/am_floor_tile_ddn.dds"; - TestSuccessCase("test_mat11.mtl", expectedPath); - } - - TEST_F(MaterialBuilderTests, MaterialBuilder_SingleMaterialSingleTexture_ValidProductFormat) - { - // texture referenced is textures/natural/terrain/am_floor_tile_ddn.dds - const char* expectedPath = "textures/natural/terrain/am_floor_tile_ddn.dds"; - TestSuccessCase("test_mat12.mtl", expectedPath); - } - - TEST_F(MaterialBuilderTests, MaterialBuilder_SingleMaterialSingleTexture_InvalidSourceFormat_NoDependenices) - { - // texture referenced is textures/natural/terrain/am_floor_tile_ddn.txt - TestSuccessCaseNoDependencies("test_mat13.mtl"); - } - - TEST_F(MaterialBuilderTests, MaterialBuilder_TextureAnimSequence) - { - AZStd::vector expectedPaths = { - "path/to/my/textures/test_anim_sequence_01_texture000.dds", - "path/to/my/textures/test_anim_sequence_01_texture001.dds", - "path/to/my/textures/test_anim_sequence_01_texture002.dds", - "path/to/my/textures/test_anim_sequence_01_texture003.dds", - "path/to/my/textures/test_anim_sequence_01_texture004.dds", - "path/to/my/textures/test_anim_sequence_01_texture005.dds" - }; - TestSuccessCase("test_mat14.mtl", expectedPaths); - } - - TEST_F(MaterialBuilderTests, MaterialBuilder_SingleMaterialMultipleTexture) - { - AZStd::vector expectedPaths = { - "engineassets/textures/hex.dds", - "engineassets/textures/hex_ddn.dds" - }; - TestSuccessCase("test_mat15.mtl", expectedPaths); - } - - TEST_F(MaterialBuilderTests, MaterialBuilder_MalformedMaterial_MultipleTextures_OneEmptyTexture) - { - TestSuccessCase("test_mat16.mtl", "engineassets/textures/hex_ddn.dds"); - } - - TEST_F(MaterialBuilderTests, MaterialBuilder_SingleMaterialMultipleTexture_ResolveLeadingSeparatorsAndAliases) - { - AZStd::vector expectedPaths = { - "engineassets/textures/hex.dds", // resolved from "/engineassets/textures/hex.dds" - "engineassets/textures/hex_ddn.dds", // resolved from "./engineassets/textures/hex_ddn.dds" - "engineassets/textures/hex_spec.dds" // resolved from "@products@/engineassets/textures/hex_spec.dds" - }; - TestSuccessCase("test_mat17.mtl", expectedPaths); - } - - TEST_F(MaterialBuilderTests, MaterialBuilder_SubMaterialSingleTexture) - { - AZStd::vector expectedPaths = { - "engineassets/textures/scratch.dds", - "engineassets/textures/perlinnoise2d.dds" - }; - TestSuccessCase("test_mat18.mtl", expectedPaths); - } - - TEST_F(MaterialBuilderTests, MaterialBuilder_SubMaterialMultipleTexture) - { - AZStd::vector expectedPaths = { - "engineassets/textures/scratch.dds", - "engineassets/textures/scratch_ddn.dds", - "engineassets/textures/perlinnoise2d.dds", - "engineassets/textures/perlinnoisenormal_ddn.dds" - }; - TestSuccessCase("test_mat19.mtl", expectedPaths); - } -} diff --git a/Gems/LmbrCentral/Code/Tests/Builders/SeedBuilderTests.cpp b/Gems/LmbrCentral/Code/Tests/Builders/SeedBuilderTests.cpp index f679a3502d..574fd4edfb 100644 --- a/Gems/LmbrCentral/Code/Tests/Builders/SeedBuilderTests.cpp +++ b/Gems/LmbrCentral/Code/Tests/Builders/SeedBuilderTests.cpp @@ -22,7 +22,9 @@ class SeedBuilderTests AZ::SettingsRegistryInterface* registry = AZ::SettingsRegistry::Get(); auto projectPathKey = AZ::SettingsRegistryInterface::FixedValueString(AZ::SettingsRegistryMergeUtils::BootstrapSettingsRootKey) + "/project_path"; - registry->Set(projectPathKey, "AutomatedTesting"); + AZ::IO::FixedMaxPath enginePath; + registry->Get(enginePath.Native(), AZ::SettingsRegistryMergeUtils::FilePathKey_EngineRootFolder); + registry->Set(projectPathKey, (enginePath / "AutomatedTesting").Native()); AZ::SettingsRegistryMergeUtils::MergeSettingsToRegistry_AddRuntimeFilePaths(*registry); m_app.Start(AZ::ComponentApplication::Descriptor()); diff --git a/Gems/LmbrCentral/Code/Tests/Builders/SliceBuilderTests.cpp b/Gems/LmbrCentral/Code/Tests/Builders/SliceBuilderTests.cpp index 73ef7143c8..0965991dfa 100644 --- a/Gems/LmbrCentral/Code/Tests/Builders/SliceBuilderTests.cpp +++ b/Gems/LmbrCentral/Code/Tests/Builders/SliceBuilderTests.cpp @@ -311,7 +311,6 @@ namespace UnitTest SerializeContext* GetSerializeContext() override { return m_serializeContext; } BehaviorContext* GetBehaviorContext() override { return nullptr; } JsonRegistrationContext* GetJsonRegistrationContext() override { return nullptr; } - const char* GetAppRoot() const override { return nullptr; } const char* GetEngineRoot() const override { return nullptr; } const char* GetExecutableFolder() const override { return nullptr; } void EnumerateEntities(const EntityCallback& /*callback*/) override {} diff --git a/Gems/LmbrCentral/Code/Tests/CMakeLists.txt b/Gems/LmbrCentral/Code/Tests/CMakeLists.txt new file mode 100644 index 0000000000..52928cc5db --- /dev/null +++ b/Gems/LmbrCentral/Code/Tests/CMakeLists.txt @@ -0,0 +1,79 @@ +# +# Copyright (c) Contributors to the Open 3D Engine Project. +# For complete copyright and license terms please see the LICENSE at the root of this distribution. +# +# SPDX-License-Identifier: Apache-2.0 OR MIT +# +# + +if(NOT PAL_TRAIT_BUILD_TESTS_SUPPORTED) + return() +endif() + +ly_add_target( + NAME LmbrCentral.Mocks HEADERONLY + NAMESPACE Gem + FILES_CMAKE + lmbrcentral_mocks_files.cmake + INCLUDE_DIRECTORIES + INTERFACE + ../Mocks +) + +ly_add_target( + NAME LmbrCentral.Tests ${PAL_TRAIT_TEST_TARGET_TYPE} + NAMESPACE Gem + FILES_CMAKE + lmbrcentral_tests_files.cmake + INCLUDE_DIRECTORIES + PRIVATE + ../Source + . + BUILD_DEPENDENCIES + PRIVATE + AZ::AzTest + AZ::AzTestShared + Legacy::CryCommon + AZ::AzFramework + Gem::LmbrCentral.Static + Gem::LmbrCentral.Mocks +) +ly_add_googletest( + NAME Gem::LmbrCentral.Tests +) + +if (PAL_TRAIT_BUILD_HOST_TOOLS) + ly_add_target( + NAME LmbrCentral.Editor.Tests ${PAL_TRAIT_TEST_TARGET_TYPE} + NAMESPACE Gem + FILES_CMAKE + lmbrcentral_editor_tests_files.cmake + INCLUDE_DIRECTORIES + PRIVATE + .. + ../Source + . + COMPILE_DEFINITIONS + PRIVATE + LMBR_CENTRAL_EDITOR + BUILD_DEPENDENCIES + PRIVATE + 3rdParty::Qt::Gui + 3rdParty::Qt::Widgets + Legacy::CryCommon + Legacy::Editor.Headers + AZ::AzTest + AZ::AzCore + AZ::AzTestShared + AZ::AzToolsFramework + AZ::AzToolsFrameworkTestCommon + AZ::AssetBuilderSDK + AZ::AzManipulatorTestFramework.Static + Gem::LmbrCentral.Static + Gem::LmbrCentral.Editor.Static + ) + ly_add_googletest( + NAME Gem::LmbrCentral.Editor.Tests + ) +endif() + diff --git a/Gems/LmbrCentral/Code/Tests/EditorPolygonPrismShapeComponentTests.cpp b/Gems/LmbrCentral/Code/Tests/EditorPolygonPrismShapeComponentTests.cpp index a5802ce8d5..41fc6c5624 100644 --- a/Gems/LmbrCentral/Code/Tests/EditorPolygonPrismShapeComponentTests.cpp +++ b/Gems/LmbrCentral/Code/Tests/EditorPolygonPrismShapeComponentTests.cpp @@ -143,7 +143,7 @@ namespace LmbrCentral using EditorPolygonPrismShapeComponentManipulatorFixture = UnitTest::IndirectCallManipulatorViewportInteractionFixtureMixin; - TEST_F(EditorPolygonPrismShapeComponentManipulatorFixture, PolygonPrismNonUniformScale_ManipulatorsScaleCorrectly) + TEST_F(EditorPolygonPrismShapeComponentManipulatorFixture, PolygonPrismNonUniformScaleManipulatorsScaleCorrectly) { // set the non-uniform scale and enter the polygon prism shape component's component mode const AZ::Vector3 nonUniformScale(2.0f, 3.0f, 4.0f); @@ -171,8 +171,8 @@ namespace LmbrCentral const auto screenStart = AzFramework::WorldToScreen(worldStart, m_cameraState); const auto screenEnd = AzFramework::WorldToScreen(worldEnd, m_cameraState); - // small diagonal offset to ensure we interact with the planar manipulator and not one of the linear manipulators - const AzFramework::ScreenVector offset(5, -5); + // diagonal offset to ensure we interact with the planar manipulator and not one of the linear manipulators + const AzFramework::ScreenVector offset(50, -50); m_actionDispatcher ->CameraState(m_cameraState) diff --git a/Gems/LmbrCentral/Code/Tests/ReferenceShapeTests.cpp b/Gems/LmbrCentral/Code/Tests/ReferenceShapeTests.cpp new file mode 100644 index 0000000000..040badf7e1 --- /dev/null +++ b/Gems/LmbrCentral/Code/Tests/ReferenceShapeTests.cpp @@ -0,0 +1,205 @@ +/* + * Copyright (c) Contributors to the Open 3D Engine Project. + * For complete copyright and license terms please see the LICENSE at the root of this distribution. + * + * SPDX-License-Identifier: Apache-2.0 OR MIT + * + */ + +#include +#include +#include +#include +#include + +#include +#include + +namespace UnitTest +{ + class ReferenceComponentTests + : public AllocatorsFixture + { + protected: + AZ::ComponentApplication m_app; + + void SetUp() override + { + AZ::ComponentApplication::Descriptor appDesc; + appDesc.m_memoryBlocksByteSize = 20 * 1024 * 1024; + appDesc.m_recordingMode = AZ::Debug::AllocationRecords::RECORD_NO_RECORDS; + appDesc.m_stackRecordLevels = 20; + + m_app.Create(appDesc); + } + + void TearDown() override + { + m_app.Destroy(); + } + + template + AZStd::unique_ptr CreateEntity(const Configuration& config, Component** ppComponent) + { + m_app.RegisterComponentDescriptor(Component::CreateDescriptor()); + + auto entity = AZStd::make_unique(); + + if (ppComponent) + { + *ppComponent = entity->CreateComponent(config); + } + else + { + entity->CreateComponent(config); + } + + entity->Init(); + EXPECT_EQ(AZ::Entity::State::Init, entity->GetState()); + + entity->Activate(); + EXPECT_EQ(AZ::Entity::State::Active, entity->GetState()); + + return entity; + } + + template + bool IsComponentCompatible() + { + AZ::ComponentDescriptor::DependencyArrayType providedServicesA; + ComponentA::GetProvidedServices(providedServicesA); + + AZ::ComponentDescriptor::DependencyArrayType incompatibleServicesB; + ComponentB::GetIncompatibleServices(incompatibleServicesB); + + for (auto providedServiceA : providedServicesA) + { + for (auto incompatibleServiceB : incompatibleServicesB) + { + if (providedServiceA == incompatibleServiceB) + { + return false; + } + } + } + return true; + } + + template + bool AreComponentsCompatible() + { + return IsComponentCompatible() && IsComponentCompatible(); + } + }; + + TEST_F(ReferenceComponentTests, VerifyCompatibility) + { + EXPECT_FALSE((AreComponentsCompatible())); + } + + TEST_F(ReferenceComponentTests, ReferenceShapeComponent_WithValidReference) + { + UnitTest::MockShape testShape; + + LmbrCentral::ReferenceShapeConfig config; + config.m_shapeEntityId = testShape.m_entity.GetId(); + + LmbrCentral::ReferenceShapeComponent* component; + auto entity = CreateEntity(config, &component); + + AZ::RandomDistributionType randomDistribution = AZ::RandomDistributionType::Normal; + AZ::Vector3 randPos = AZ::Vector3::CreateOne(); + LmbrCentral::ShapeComponentRequestsBus::EventResult( + randPos, entity->GetId(), &LmbrCentral::ShapeComponentRequestsBus::Events::GenerateRandomPointInside, randomDistribution); + EXPECT_EQ(AZ::Vector3::CreateZero(), randPos); + + testShape.m_aabb = AZ::Aabb::CreateFromPoint(AZ::Vector3(1.0f, 21.0f, 31.0f)); + AZ::Aabb resultAABB; + LmbrCentral::ShapeComponentRequestsBus::EventResult( + resultAABB, entity->GetId(), &LmbrCentral::ShapeComponentRequestsBus::Events::GetEncompassingAabb); + EXPECT_EQ(testShape.m_aabb, resultAABB); + + AZ::Crc32 resultCRC = {}; + LmbrCentral::ShapeComponentRequestsBus::EventResult( + resultCRC, entity->GetId(), &LmbrCentral::ShapeComponentRequestsBus::Events::GetShapeType); + EXPECT_EQ(AZ_CRC("TestShape", 0x856ca50c), resultCRC); + + testShape.m_localBounds = AZ::Aabb::CreateFromPoint(AZ::Vector3(1.0f, 21.0f, 31.0f)); + testShape.m_localTransform = AZ::Transform::CreateTranslation(testShape.m_localBounds.GetCenter()); + AZ::Transform resultTransform = AZ::Transform::CreateIdentity(); + AZ::Aabb resultBounds = AZ::Aabb::CreateNull(); + LmbrCentral::ShapeComponentRequestsBus::Event( + entity->GetId(), &LmbrCentral::ShapeComponentRequestsBus::Events::GetTransformAndLocalBounds, resultTransform, resultBounds); + EXPECT_EQ(testShape.m_localTransform, resultTransform); + EXPECT_EQ(testShape.m_localBounds, resultBounds); + + testShape.m_pointInside = true; + bool resultPointInside = false; + LmbrCentral::ShapeComponentRequestsBus::EventResult( + resultPointInside, entity->GetId(), &LmbrCentral::ShapeComponentRequestsBus::Events::IsPointInside, AZ::Vector3::CreateZero()); + EXPECT_EQ(testShape.m_pointInside, resultPointInside); + + testShape.m_distanceSquaredFromPoint = 456.0f; + float resultdistanceSquaredFromPoint = 0; + LmbrCentral::ShapeComponentRequestsBus::EventResult( + resultdistanceSquaredFromPoint, entity->GetId(), &LmbrCentral::ShapeComponentRequestsBus::Events::DistanceSquaredFromPoint, + AZ::Vector3::CreateZero()); + EXPECT_EQ(testShape.m_distanceSquaredFromPoint, resultdistanceSquaredFromPoint); + + testShape.m_intersectRay = false; + bool resultIntersectRay = false; + LmbrCentral::ShapeComponentRequestsBus::EventResult( + resultIntersectRay, entity->GetId(), &LmbrCentral::ShapeComponentRequestsBus::Events::IntersectRay, AZ::Vector3::CreateZero(), + AZ::Vector3::CreateZero(), 0.0f); + EXPECT_TRUE(testShape.m_intersectRay == resultIntersectRay); + } + + TEST_F(ReferenceComponentTests, ReferenceShapeComponent_WithInvalidReference) + { + LmbrCentral::ReferenceShapeConfig config; + config.m_shapeEntityId = AZ::EntityId(); + + LmbrCentral::ReferenceShapeComponent* component; + auto entity = CreateEntity(config, &component); + + AZ::RandomDistributionType randomDistribution = AZ::RandomDistributionType::Normal; + AZ::Vector3 randPos = AZ::Vector3::CreateOne(); + LmbrCentral::ShapeComponentRequestsBus::EventResult( + randPos, entity->GetId(), &LmbrCentral::ShapeComponentRequestsBus::Events::GenerateRandomPointInside, randomDistribution); + EXPECT_EQ(randPos, AZ::Vector3::CreateZero()); + + AZ::Aabb resultAABB; + LmbrCentral::ShapeComponentRequestsBus::EventResult( + resultAABB, entity->GetId(), &LmbrCentral::ShapeComponentRequestsBus::Events::GetEncompassingAabb); + EXPECT_EQ(resultAABB, AZ::Aabb::CreateNull()); + + AZ::Crc32 resultCRC; + LmbrCentral::ShapeComponentRequestsBus::EventResult( + resultCRC, entity->GetId(), &LmbrCentral::ShapeComponentRequestsBus::Events::GetShapeType); + EXPECT_EQ(resultCRC, AZ::Crc32(AZ::u32(0))); + + AZ::Transform resultTransform; + AZ::Aabb resultBounds; + LmbrCentral::ShapeComponentRequestsBus::Event( + entity->GetId(), &LmbrCentral::ShapeComponentRequestsBus::Events::GetTransformAndLocalBounds, resultTransform, resultBounds); + EXPECT_EQ(resultTransform, AZ::Transform::CreateIdentity()); + EXPECT_EQ(resultBounds, AZ::Aabb::CreateNull()); + + bool resultPointInside = true; + LmbrCentral::ShapeComponentRequestsBus::EventResult( + resultPointInside, entity->GetId(), &LmbrCentral::ShapeComponentRequestsBus::Events::IsPointInside, AZ::Vector3::CreateZero()); + EXPECT_EQ(resultPointInside, false); + + float resultdistanceSquaredFromPoint = 0; + LmbrCentral::ShapeComponentRequestsBus::EventResult( + resultdistanceSquaredFromPoint, entity->GetId(), &LmbrCentral::ShapeComponentRequestsBus::Events::DistanceSquaredFromPoint, + AZ::Vector3::CreateZero()); + EXPECT_EQ(resultdistanceSquaredFromPoint, FLT_MAX); + + bool resultIntersectRay = true; + LmbrCentral::ShapeComponentRequestsBus::EventResult( + resultIntersectRay, entity->GetId(), &LmbrCentral::ShapeComponentRequestsBus::Events::IntersectRay, AZ::Vector3::CreateZero(), + AZ::Vector3::CreateZero(), 0.0f); + EXPECT_EQ(resultIntersectRay, false); + } +} // namespace UnitTest diff --git a/Gems/LmbrCentral/Code/Tests/lmbrcentral_editor_tests_files.cmake b/Gems/LmbrCentral/Code/Tests/lmbrcentral_editor_tests_files.cmake new file mode 100644 index 0000000000..72a26c2884 --- /dev/null +++ b/Gems/LmbrCentral/Code/Tests/lmbrcentral_editor_tests_files.cmake @@ -0,0 +1,28 @@ +# +# Copyright (c) Contributors to the Open 3D Engine Project. +# For complete copyright and license terms please see the LICENSE at the root of this distribution. +# +# SPDX-License-Identifier: Apache-2.0 OR MIT +# +# + +set(FILES + LmbrCentralEditorTest.cpp + LmbrCentralReflectionTest.h + LmbrCentralReflectionTest.cpp + EditorBoxShapeComponentTests.cpp + EditorSphereShapeComponentTests.cpp + EditorCapsuleShapeComponentTests.cpp + EditorCompoundShapeComponentTests.cpp + EditorCylinderShapeComponentTests.cpp + EditorPolygonPrismShapeComponentTests.cpp + EditorTubeShapeComponentTests.cpp + SpawnerComponentTest.cpp + Builders/CopyDependencyBuilderTest.cpp + Builders/SliceBuilderTests.cpp + Builders/LevelBuilderTest.cpp + Builders/LuaBuilderTests.cpp + Builders/SeedBuilderTests.cpp + ../Source/LmbrCentral.cpp + ../Source/LmbrCentralEditor.cpp +) diff --git a/Gems/LmbrCentral/Code/lmbrcentral_mocks_files.cmake b/Gems/LmbrCentral/Code/Tests/lmbrcentral_mocks_files.cmake similarity index 83% rename from Gems/LmbrCentral/Code/lmbrcentral_mocks_files.cmake rename to Gems/LmbrCentral/Code/Tests/lmbrcentral_mocks_files.cmake index c3a5cca3f8..1e510747f2 100644 --- a/Gems/LmbrCentral/Code/lmbrcentral_mocks_files.cmake +++ b/Gems/LmbrCentral/Code/Tests/lmbrcentral_mocks_files.cmake @@ -7,5 +7,5 @@ # set(FILES - Mocks/LmbrCentral/Shape/MockShapes.h + ../Mocks/LmbrCentral/Shape/MockShapes.h ) diff --git a/Gems/LmbrCentral/Code/Tests/lmbrcentral_tests_files.cmake b/Gems/LmbrCentral/Code/Tests/lmbrcentral_tests_files.cmake new file mode 100644 index 0000000000..1555ff53d8 --- /dev/null +++ b/Gems/LmbrCentral/Code/Tests/lmbrcentral_tests_files.cmake @@ -0,0 +1,32 @@ +# +# Copyright (c) Contributors to the Open 3D Engine Project. +# For complete copyright and license terms please see the LICENSE at the root of this distribution. +# +# SPDX-License-Identifier: Apache-2.0 OR MIT +# +# + +set(FILES + AudioComponentTests.cpp + AxisAlignedBoxShapeTest.cpp + BoxShapeTest.cpp + BundlingSystemComponentTests.cpp + SphereShapeTest.cpp + CylinderShapeTest.cpp + CapsuleShapeTest.cpp + PolygonPrismShapeTest.cpp + QuadShapeTest.cpp + TubeShapeTest.cpp + LmbrCentralReflectionTest.h + LmbrCentralReflectionTest.cpp + LmbrCentralTest.cpp + ShapeGeometryUtilTest.cpp + SpawnerComponentTest.cpp + SplineComponentTests.cpp + DiskShapeTest.cpp + ReferenceShapeTests.cpp + ../Source/LmbrCentral.cpp + ../Source/Ai/NavigationComponent.cpp + ../Source/Scripting/SpawnerComponent.cpp + ../Source/Shape/TubeShape.cpp +) diff --git a/Gems/LmbrCentral/Code/include/LmbrCentral/Component/EditorWrappedComponentBase.h b/Gems/LmbrCentral/Code/include/LmbrCentral/Component/EditorWrappedComponentBase.h index 29169ec9d7..af7509e3a6 100644 --- a/Gems/LmbrCentral/Code/include/LmbrCentral/Component/EditorWrappedComponentBase.h +++ b/Gems/LmbrCentral/Code/include/LmbrCentral/Component/EditorWrappedComponentBase.h @@ -56,6 +56,7 @@ namespace LmbrCentral TComponent m_component; TConfiguration m_configuration; bool m_visible = true; + bool m_runtimeComponentActive = false; }; } // namespace LmbrCentral diff --git a/Gems/LmbrCentral/Code/include/LmbrCentral/Component/EditorWrappedComponentBase.inl b/Gems/LmbrCentral/Code/include/LmbrCentral/Component/EditorWrappedComponentBase.inl index 6a9fceabbf..ee5dbe867e 100644 --- a/Gems/LmbrCentral/Code/include/LmbrCentral/Component/EditorWrappedComponentBase.inl +++ b/Gems/LmbrCentral/Code/include/LmbrCentral/Component/EditorWrappedComponentBase.inl @@ -177,6 +177,7 @@ namespace LmbrCentral void EditorWrappedComponentBase::Init() { AzToolsFramework::Components::EditorComponentBase::Init(); + m_runtimeComponentActive = false; m_component.ReadInConfig(&m_configuration); m_component.Init(); } @@ -196,6 +197,7 @@ namespace LmbrCentral if (m_visible) { m_component.Activate(); + m_runtimeComponentActive = true; } } @@ -205,8 +207,10 @@ namespace LmbrCentral AzToolsFramework::EditorVisibilityNotificationBus::Handler::BusDisconnect(); AzToolsFramework::Components::EditorComponentBase::Deactivate(); + m_runtimeComponentActive = false; m_component.Deactivate(); - m_component.SetEntity(nullptr); // remove the entity association, in case the parent component is being removed, otherwise the component will be reactivated + // remove the entity association, in case the parent component is being removed, otherwise the component will be reactivated + m_component.SetEntity(nullptr); } template @@ -222,12 +226,18 @@ namespace LmbrCentral template AZ::u32 EditorWrappedComponentBase::ConfigurationChanged() { - m_component.Deactivate(); + if (m_runtimeComponentActive) + { + m_runtimeComponentActive = false; + m_component.Deactivate(); + } + m_component.ReadInConfig(&m_configuration); - if (m_visible && m_component.GetEntity()) + if (m_visible && !m_runtimeComponentActive) { m_component.Activate(); + m_runtimeComponentActive = true; } return AZ::Edit::PropertyRefreshLevels::None; diff --git a/Gems/LmbrCentral/Code/include/LmbrCentral/Rendering/MeshAsset.h b/Gems/LmbrCentral/Code/include/LmbrCentral/Rendering/MeshAsset.h index 66e992890e..329687ab82 100644 --- a/Gems/LmbrCentral/Code/include/LmbrCentral/Rendering/MeshAsset.h +++ b/Gems/LmbrCentral/Code/include/LmbrCentral/Rendering/MeshAsset.h @@ -9,22 +9,14 @@ #include -#include -#include - namespace LmbrCentral { class MeshAsset : public AZ::Data::AssetData { public: - using MeshPtr = IStatObj*; - AZ_RTTI(MeshAsset, "{C2869E3B-DDA0-4E01-8FE3-6770D788866B}", AZ::Data::AssetData); AZ_CLASS_ALLOCATOR(MeshAsset, AZ::SystemAllocator, 0); - - /// The assigned static mesh instance. - MeshPtr m_statObj = nullptr; }; // for "character definition files" diff --git a/Gems/LmbrCentral/Code/include/LmbrCentral/Rendering/RenderNodeBus.h b/Gems/LmbrCentral/Code/include/LmbrCentral/Rendering/RenderNodeBus.h deleted file mode 100644 index 0b8ec56a0f..0000000000 --- a/Gems/LmbrCentral/Code/include/LmbrCentral/Rendering/RenderNodeBus.h +++ /dev/null @@ -1,45 +0,0 @@ -/* - * Copyright (c) Contributors to the Open 3D Engine Project. - * For complete copyright and license terms please see the LICENSE at the root of this distribution. - * - * SPDX-License-Identifier: Apache-2.0 OR MIT - * - */ -#pragma once - -#include -#include - -struct IRenderNode; - -namespace LmbrCentral -{ - /*! - * Messages services by anything that adds an IRenderNode to an Entity. - */ - class RenderNodeRequests - : public AZ::EBusTraits - { - public: - ////////////////////////////////////////////////////////////////////////// - // EBusTraits overrides - // Any number of handlers per EntityId, called in order. - using BusIdType = AZ::EntityId; - static const AZ::EBusAddressPolicy AddressPolicy = AZ::EBusAddressPolicy::ById; - static const AZ::EBusHandlerPolicy HandlerPolicy = AZ::EBusHandlerPolicy::MultipleAndOrdered; - bool Compare(const RenderNodeRequests* rhs) const - { - return GetRenderNodeRequestBusOrder() < rhs->GetRenderNodeRequestBusOrder(); - } - ////////////////////////////////////////////////////////////////////////// - - virtual IRenderNode* GetRenderNode() = 0; - - //! Order in which each bus handler is invoked, lower numbers are first. - //! In situations where only one render node is expected, - //! the first bus handler is used. - virtual float GetRenderNodeRequestBusOrder() const = 0; - }; - - using RenderNodeRequestBus = AZ::EBus; -} // namespace LmbrCentral diff --git a/Gems/LmbrCentral/Code/include/LmbrCentral/Shape/ReferenceShapeComponentBus.h b/Gems/LmbrCentral/Code/include/LmbrCentral/Shape/ReferenceShapeComponentBus.h new file mode 100644 index 0000000000..2aec1a7614 --- /dev/null +++ b/Gems/LmbrCentral/Code/include/LmbrCentral/Shape/ReferenceShapeComponentBus.h @@ -0,0 +1,34 @@ +/* + * Copyright (c) Contributors to the Open 3D Engine Project. + * For complete copyright and license terms please see the LICENSE at the root of this distribution. + * + * SPDX-License-Identifier: Apache-2.0 OR MIT + * + */ + +#pragma once + +#include +#include + +namespace LmbrCentral +{ + // Type ID for Reference EditorReferenceShapeComponent + static const char* EditorReferenceShapeComponentTypeId = "{21BC79CA-C2F4-428F-AF2E-B76E233D4254}"; + + class ReferenceShapeRequests + : public AZ::ComponentBus + { + public: + /** + * Overrides the default AZ::EBusTraits handler policy to allow one + * listener only. + */ + static const AZ::EBusHandlerPolicy HandlerPolicy = AZ::EBusHandlerPolicy::Single; + + virtual AZ::EntityId GetShapeEntityId() const = 0; + virtual void SetShapeEntityId(AZ::EntityId entityId) = 0; + }; + + using ReferenceShapeRequestBus = AZ::EBus; +} diff --git a/Gems/LmbrCentral/Code/lmbrcentral_editor_files.cmake b/Gems/LmbrCentral/Code/lmbrcentral_editor_files.cmake index 5c77888922..24f9ff6dcd 100644 --- a/Gems/LmbrCentral/Code/lmbrcentral_editor_files.cmake +++ b/Gems/LmbrCentral/Code/lmbrcentral_editor_files.cmake @@ -60,6 +60,8 @@ set(FILES Source/Shape/EditorCompoundShapeComponent.cpp Source/Shape/EditorQuadShapeComponent.h Source/Shape/EditorQuadShapeComponent.cpp + Source/Shape/EditorReferenceShapeComponent.h + Source/Shape/EditorReferenceShapeComponent.cpp Source/Shape/EditorSplineComponent.h Source/Shape/EditorSplineComponent.cpp Source/Shape/EditorSplineComponentMode.h @@ -116,8 +118,6 @@ set(FILES Source/Builders/LevelBuilder/LevelBuilderComponent.h Source/Builders/LevelBuilder/LevelBuilderWorker.cpp Source/Builders/LevelBuilder/LevelBuilderWorker.h - Source/Builders/MaterialBuilder/MaterialBuilderComponent.cpp - Source/Builders/MaterialBuilder/MaterialBuilderComponent.h Source/Builders/SliceBuilder/SliceBuilderComponent.cpp Source/Builders/SliceBuilder/SliceBuilderComponent.h Source/Builders/SliceBuilder/SliceBuilderWorker.cpp diff --git a/Gems/LmbrCentral/Code/lmbrcentral_editor_tests_files.cmake b/Gems/LmbrCentral/Code/lmbrcentral_editor_tests_files.cmake deleted file mode 100644 index 0f0cf484d1..0000000000 --- a/Gems/LmbrCentral/Code/lmbrcentral_editor_tests_files.cmake +++ /dev/null @@ -1,29 +0,0 @@ -# -# Copyright (c) Contributors to the Open 3D Engine Project. -# For complete copyright and license terms please see the LICENSE at the root of this distribution. -# -# SPDX-License-Identifier: Apache-2.0 OR MIT -# -# - -set(FILES - Tests/LmbrCentralEditorTest.cpp - Tests/LmbrCentralReflectionTest.h - Tests/LmbrCentralReflectionTest.cpp - Tests/EditorBoxShapeComponentTests.cpp - Tests/EditorSphereShapeComponentTests.cpp - Tests/EditorCapsuleShapeComponentTests.cpp - Tests/EditorCompoundShapeComponentTests.cpp - Tests/EditorCylinderShapeComponentTests.cpp - Tests/EditorPolygonPrismShapeComponentTests.cpp - Tests/EditorTubeShapeComponentTests.cpp - Tests/SpawnerComponentTest.cpp - Tests/Builders/CopyDependencyBuilderTest.cpp - Tests/Builders/SliceBuilderTests.cpp - Tests/Builders/LevelBuilderTest.cpp - Tests/Builders/MaterialBuilderTests.cpp - Tests/Builders/LuaBuilderTests.cpp - Tests/Builders/SeedBuilderTests.cpp - Source/LmbrCentral.cpp - Source/LmbrCentralEditor.cpp -) diff --git a/Gems/LmbrCentral/Code/lmbrcentral_files.cmake b/Gems/LmbrCentral/Code/lmbrcentral_files.cmake index 18412e2a38..6d224250fc 100644 --- a/Gems/LmbrCentral/Code/lmbrcentral_files.cmake +++ b/Gems/LmbrCentral/Code/lmbrcentral_files.cmake @@ -7,59 +7,6 @@ # set(FILES - include/LmbrCentral/Ai/NavigationComponentBus.h - include/LmbrCentral/Ai/NavigationAreaBus.h - include/LmbrCentral/Ai/NavigationSystemBus.h - include/LmbrCentral/Ai/NavigationSeedBus.h - include/LmbrCentral/Animation/AttachmentComponentBus.h - include/LmbrCentral/Animation/SkeletalHierarchyRequestBus.h - include/LmbrCentral/Audio/AudioEnvironmentComponentBus.h - include/LmbrCentral/Audio/AudioListenerComponentBus.h - include/LmbrCentral/Audio/AudioMultiPositionComponentBus.h - include/LmbrCentral/Audio/AudioPreloadComponentBus.h - include/LmbrCentral/Audio/AudioProxyComponentBus.h - include/LmbrCentral/Audio/AudioRtpcComponentBus.h - include/LmbrCentral/Audio/AudioSwitchComponentBus.h - include/LmbrCentral/Audio/AudioSystemComponentBus.h - include/LmbrCentral/Audio/AudioTriggerComponentBus.h - include/LmbrCentral/Bundling/BundlingSystemComponentBus.h - include/LmbrCentral/Geometry/GeometrySystemComponentBus.h - include/LmbrCentral/Dependency/DependencyMonitor.h - include/LmbrCentral/Dependency/DependencyMonitor.inl - include/LmbrCentral/Dependency/DependencyNotificationBus.h - include/LmbrCentral/Physics/WindVolumeRequestBus.h - include/LmbrCentral/Physics/ForceVolumeRequestBus.h - include/LmbrCentral/Physics/WaterNotificationBus.h - include/LmbrCentral/Rendering/DecalComponentBus.h - include/LmbrCentral/Rendering/LightComponentBus.h - include/LmbrCentral/Rendering/MaterialAsset.h - include/LmbrCentral/Rendering/MaterialHandle.h - include/LmbrCentral/Rendering/MeshAsset.h - include/LmbrCentral/Rendering/MeshModificationBus.h - include/LmbrCentral/Rendering/RenderNodeBus.h - include/LmbrCentral/Rendering/GiRegistrationBus.h - include/LmbrCentral/Rendering/RenderBoundsBus.h - include/LmbrCentral/Scripting/EditorTagComponentBus.h - include/LmbrCentral/Scripting/GameplayNotificationBus.h - include/LmbrCentral/Scripting/SimpleStateComponentBus.h - include/LmbrCentral/Scripting/SpawnerComponentBus.h - include/LmbrCentral/Scripting/RandomTimedSpawnerComponentBus.h - include/LmbrCentral/Scripting/TagComponentBus.h - include/LmbrCentral/Shape/EditorShapeComponentBus.h - include/LmbrCentral/Shape/ShapeComponentBus.h - include/LmbrCentral/Shape/SphereShapeComponentBus.h - include/LmbrCentral/Shape/BoxShapeComponentBus.h - include/LmbrCentral/Shape/CylinderShapeComponentBus.h - include/LmbrCentral/Shape/CapsuleShapeComponentBus.h - include/LmbrCentral/Shape/DiskShapeComponentBus.h - include/LmbrCentral/Shape/CompoundShapeComponentBus.h - include/LmbrCentral/Shape/QuadShapeComponentBus.h - include/LmbrCentral/Shape/SplineComponentBus.h - include/LmbrCentral/Shape/PolygonPrismShapeComponentBus.h - include/LmbrCentral/Shape/TubeShapeComponentBus.h - include/LmbrCentral/Shape/SplineAttribute.h - include/LmbrCentral/Shape/SplineAttribute.inl - include/LmbrCentral/Terrain/TerrainSystemRequestBus.h Source/Ai/NavigationSystemComponent.h Source/Ai/NavigationSystemComponent.cpp Source/Audio/AudioAreaEnvironmentComponent.h @@ -140,13 +87,13 @@ set(FILES Source/Shape/PolygonPrismShapeComponent.cpp Source/Shape/TubeShapeComponent.h Source/Shape/TubeShapeComponent.cpp + Source/Shape/ReferenceShapeComponent.h + Source/Shape/ReferenceShapeComponent.cpp Source/Shape/ShapeComponentConverters.h Source/Shape/ShapeComponentConverters.cpp Source/Shape/ShapeComponentConverters.inl Source/Shape/ShapeGeometryUtil.h Source/Shape/ShapeGeometryUtil.cpp - Source/Unhandled/Material/MaterialAssetTypeInfo.cpp - Source/Unhandled/Material/MaterialAssetTypeInfo.h Source/Unhandled/Other/AudioAssetTypeInfo.cpp Source/Unhandled/Other/AudioAssetTypeInfo.h Source/Unhandled/Other/CharacterPhysicsAssetTypeInfo.cpp diff --git a/Gems/LmbrCentral/Code/lmbrcentral_headers_files.cmake b/Gems/LmbrCentral/Code/lmbrcentral_headers_files.cmake new file mode 100644 index 0000000000..270a46cf32 --- /dev/null +++ b/Gems/LmbrCentral/Code/lmbrcentral_headers_files.cmake @@ -0,0 +1,63 @@ +# +# Copyright (c) Contributors to the Open 3D Engine Project. +# For complete copyright and license terms please see the LICENSE at the root of this distribution. +# +# SPDX-License-Identifier: Apache-2.0 OR MIT +# +# + +set(FILES + include/LmbrCentral/Ai/NavigationComponentBus.h + include/LmbrCentral/Ai/NavigationAreaBus.h + include/LmbrCentral/Ai/NavigationSystemBus.h + include/LmbrCentral/Ai/NavigationSeedBus.h + include/LmbrCentral/Animation/AttachmentComponentBus.h + include/LmbrCentral/Animation/SkeletalHierarchyRequestBus.h + include/LmbrCentral/Audio/AudioEnvironmentComponentBus.h + include/LmbrCentral/Audio/AudioListenerComponentBus.h + include/LmbrCentral/Audio/AudioMultiPositionComponentBus.h + include/LmbrCentral/Audio/AudioPreloadComponentBus.h + include/LmbrCentral/Audio/AudioProxyComponentBus.h + include/LmbrCentral/Audio/AudioRtpcComponentBus.h + include/LmbrCentral/Audio/AudioSwitchComponentBus.h + include/LmbrCentral/Audio/AudioSystemComponentBus.h + include/LmbrCentral/Audio/AudioTriggerComponentBus.h + include/LmbrCentral/Bundling/BundlingSystemComponentBus.h + include/LmbrCentral/Geometry/GeometrySystemComponentBus.h + include/LmbrCentral/Dependency/DependencyMonitor.h + include/LmbrCentral/Dependency/DependencyMonitor.inl + include/LmbrCentral/Dependency/DependencyNotificationBus.h + include/LmbrCentral/Physics/WindVolumeRequestBus.h + include/LmbrCentral/Physics/ForceVolumeRequestBus.h + include/LmbrCentral/Physics/WaterNotificationBus.h + include/LmbrCentral/Rendering/DecalComponentBus.h + include/LmbrCentral/Rendering/LightComponentBus.h + include/LmbrCentral/Rendering/MaterialAsset.h + include/LmbrCentral/Rendering/MaterialHandle.h + include/LmbrCentral/Rendering/MeshAsset.h + include/LmbrCentral/Rendering/MeshModificationBus.h + include/LmbrCentral/Rendering/GiRegistrationBus.h + include/LmbrCentral/Rendering/RenderBoundsBus.h + include/LmbrCentral/Scripting/EditorTagComponentBus.h + include/LmbrCentral/Scripting/GameplayNotificationBus.h + include/LmbrCentral/Scripting/SimpleStateComponentBus.h + include/LmbrCentral/Scripting/SpawnerComponentBus.h + include/LmbrCentral/Scripting/RandomTimedSpawnerComponentBus.h + include/LmbrCentral/Scripting/TagComponentBus.h + include/LmbrCentral/Shape/EditorShapeComponentBus.h + include/LmbrCentral/Shape/ShapeComponentBus.h + include/LmbrCentral/Shape/SphereShapeComponentBus.h + include/LmbrCentral/Shape/BoxShapeComponentBus.h + include/LmbrCentral/Shape/CylinderShapeComponentBus.h + include/LmbrCentral/Shape/CapsuleShapeComponentBus.h + include/LmbrCentral/Shape/DiskShapeComponentBus.h + include/LmbrCentral/Shape/CompoundShapeComponentBus.h + include/LmbrCentral/Shape/QuadShapeComponentBus.h + include/LmbrCentral/Shape/SplineComponentBus.h + include/LmbrCentral/Shape/PolygonPrismShapeComponentBus.h + include/LmbrCentral/Shape/TubeShapeComponentBus.h + include/LmbrCentral/Shape/ReferenceShapeComponentBus.h + include/LmbrCentral/Shape/SplineAttribute.h + include/LmbrCentral/Shape/SplineAttribute.inl + include/LmbrCentral/Terrain/TerrainSystemRequestBus.h +) diff --git a/Gems/LmbrCentral/Code/lmbrcentral_tests_files.cmake b/Gems/LmbrCentral/Code/lmbrcentral_tests_files.cmake deleted file mode 100644 index c0f1ffd9ec..0000000000 --- a/Gems/LmbrCentral/Code/lmbrcentral_tests_files.cmake +++ /dev/null @@ -1,28 +0,0 @@ -# -# Copyright (c) Contributors to the Open 3D Engine Project. -# For complete copyright and license terms please see the LICENSE at the root of this distribution. -# -# SPDX-License-Identifier: Apache-2.0 OR MIT -# -# - -set(FILES - Tests/AudioComponentTests.cpp - Tests/AxisAlignedBoxShapeTest.cpp - Tests/BoxShapeTest.cpp - Tests/BundlingSystemComponentTests.cpp - Tests/SphereShapeTest.cpp - Tests/CylinderShapeTest.cpp - Tests/CapsuleShapeTest.cpp - Tests/PolygonPrismShapeTest.cpp - Tests/QuadShapeTest.cpp - Tests/TubeShapeTest.cpp - Tests/LmbrCentralReflectionTest.h - Tests/LmbrCentralReflectionTest.cpp - Tests/LmbrCentralTest.cpp - Tests/ShapeGeometryUtilTest.cpp - Tests/SpawnerComponentTest.cpp - Tests/SplineComponentTests.cpp - Tests/DiskShapeTest.cpp - Source/LmbrCentral.cpp -) diff --git a/Gems/LmbrCentral/gem.json b/Gems/LmbrCentral/gem.json index 9fca421538..a0a6ea813f 100644 --- a/Gems/LmbrCentral/gem.json +++ b/Gems/LmbrCentral/gem.json @@ -2,6 +2,7 @@ "gem_name": "LmbrCentral", "display_name": "O3DE Core (LmbrCentral)", "license": "Apache-2.0 Or MIT", + "license_url": "https://github.com/o3de/o3de/blob/development/LICENSE.txt", "origin": "Open 3D Engine - o3de.org", "type": "Code", "summary": "The O3DE Core (LmbrCentral) Gem provides required code and assets for running Open 3D Engine Editor.", diff --git a/Gems/LocalUser/gem.json b/Gems/LocalUser/gem.json index f86e6e1bf6..5199b4f777 100644 --- a/Gems/LocalUser/gem.json +++ b/Gems/LocalUser/gem.json @@ -2,6 +2,7 @@ "gem_name": "LocalUser", "display_name": "Local User", "license": "Apache-2.0 Or MIT", + "license_url": "https://github.com/o3de/o3de/blob/development/LICENSE.txt", "origin": "Open 3D Engine - o3de.org", "type": "Code", "summary": "The Local User Gem provides functionality for mapping local user ids to local player slots and managing local user profiles.", diff --git a/Gems/AtomLyIntegration/AtomBridge/Assets/Shaders/LyShineUI.azsl b/Gems/LyShine/Assets/LyShine/Shaders/LyShineUI.azsl similarity index 100% rename from Gems/AtomLyIntegration/AtomBridge/Assets/Shaders/LyShineUI.azsl rename to Gems/LyShine/Assets/LyShine/Shaders/LyShineUI.azsl diff --git a/Gems/AtomLyIntegration/AtomBridge/Assets/Shaders/LyShineUI.shader b/Gems/LyShine/Assets/LyShine/Shaders/LyShineUI.shader similarity index 100% rename from Gems/AtomLyIntegration/AtomBridge/Assets/Shaders/LyShineUI.shader rename to Gems/LyShine/Assets/LyShine/Shaders/LyShineUI.shader diff --git a/Gems/AtomLyIntegration/AtomBridge/Assets/Shaders/LyShineUI.shadervariantlist b/Gems/LyShine/Assets/LyShine/Shaders/LyShineUI.shadervariantlist similarity index 100% rename from Gems/AtomLyIntegration/AtomBridge/Assets/Shaders/LyShineUI.shadervariantlist rename to Gems/LyShine/Assets/LyShine/Shaders/LyShineUI.shadervariantlist diff --git a/Gems/LyShine/Assets/seedList.seed b/Gems/LyShine/Assets/seedList.seed index 499469bd63..6b53200c4a 100644 --- a/Gems/LyShine/Assets/seedList.seed +++ b/Gems/LyShine/Assets/seedList.seed @@ -2,8 +2,8 @@ - - + + @@ -16,6 +16,30 @@ + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/Gems/LyShine/Code/CMakeLists.txt b/Gems/LyShine/Code/CMakeLists.txt index 77aaa681e0..4f2c4e90a7 100644 --- a/Gems/LyShine/Code/CMakeLists.txt +++ b/Gems/LyShine/Code/CMakeLists.txt @@ -47,6 +47,9 @@ ly_add_target( Gem::LyShine.Static Legacy::CryCommon Gem::LmbrCentral + PUBLIC + Gem::Atom_RHI.Reflect + Gem::Atom_RPI.Public RUNTIME_DEPENDENCIES Gem::LmbrCentral Gem::TextureAtlas diff --git a/Gems/LyShine/Code/Editor/AnchorPresetsWidget.cpp b/Gems/LyShine/Code/Editor/AnchorPresetsWidget.cpp index ca3701743e..84ff2e19a7 100644 --- a/Gems/LyShine/Code/Editor/AnchorPresetsWidget.cpp +++ b/Gems/LyShine/Code/Editor/AnchorPresetsWidget.cpp @@ -27,8 +27,6 @@ AnchorPresetsWidget::AnchorPresetsWidget(int defaultPresetIndex, , m_presetIndex(defaultPresetIndex) , m_buttons(AnchorPresets::PresetIndexCount, nullptr) { - setFixedSize(UICANVASEDITOR_ANCHOR_WIDGET_FIXED_SIZE, UICANVASEDITOR_ANCHOR_WIDGET_FIXED_SIZE); - // The layout. QGridLayout* grid = new QGridLayout(this); grid->setContentsMargins(0, 0, 0, 0); @@ -38,6 +36,7 @@ AnchorPresetsWidget::AnchorPresetsWidget(int defaultPresetIndex, { for (int presetIndex = 0; presetIndex < AnchorPresets::PresetIndexCount; ++presetIndex) { + QLayout* boxLayout = new QVBoxLayout(); PresetButton* button = new PresetButton(UICANVASEDITOR_ANCHOR_ICON_PATH_DEFAULT(presetIndex), UICANVASEDITOR_ANCHOR_ICON_PATH_HOVER(presetIndex), UICANVASEDITOR_ANCHOR_ICON_PATH_SELECTED(presetIndex), @@ -50,8 +49,9 @@ AnchorPresetsWidget::AnchorPresetsWidget(int defaultPresetIndex, presetChanger(presetIndex); }, this); - - grid->addWidget(button, (presetIndex / 4), (presetIndex % 4)); + boxLayout->addWidget(button); + boxLayout->setContentsMargins(2, 2, 2, 2); + grid->addItem(boxLayout, (presetIndex / 4), (presetIndex % 4)); m_buttons[ presetIndex ] = button; } diff --git a/Gems/LyShine/Code/Editor/Animation/AnimationContext.cpp b/Gems/LyShine/Code/Editor/Animation/AnimationContext.cpp index 8f8864106b..1e81f2e179 100644 --- a/Gems/LyShine/Code/Editor/Animation/AnimationContext.cpp +++ b/Gems/LyShine/Code/Editor/Animation/AnimationContext.cpp @@ -13,7 +13,6 @@ #include "AnimationContext.h" #include -#include "ITimer.h" #include "GameEngine.h" #include "Objects/SelectionGroup.h" @@ -29,6 +28,27 @@ #include "IPostRenderer.h" #include "UiEditorAnimationBus.h" +#include + +namespace Internal +{ + float GetFrameDeltaTime() + { + const AZ::TimeUs frameDeltaTimeMs = AZ::GetSimulationTickDeltaTimeUs(); + return AZ::TimeUsToSeconds(frameDeltaTimeMs); + } + + float GetFrameRate() + { + const float deltaTime = GetFrameDeltaTime(); + if (AZ::IsClose(deltaTime, 0.0f)) + { + return 0.0f; + } + return 1.0f / deltaTime; + } +} + ////////////////////////////////////////////////////////////////////////// // Animation Callback. ////////////////////////////////////////////////////////////////////////// @@ -380,17 +400,15 @@ void CUiAnimationContext::Update() return; } - ITimer* pTimer = GetIEditor()->GetSystem()->GetITimer(); - AnimateActiveSequence(); - float dt = pTimer->GetFrameTime(); - m_currTime += dt * m_fTimeScale; + const float frameDeltaTime = Internal::GetFrameDeltaTime(); + m_currTime += frameDeltaTime * m_fTimeScale; if (!m_recording) { - GetUiAnimationSystem()->PreUpdate(dt); - GetUiAnimationSystem()->PostUpdate(dt); + GetUiAnimationSystem()->PreUpdate(frameDeltaTime); + GetUiAnimationSystem()->PostUpdate(frameDeltaTime); } if (m_currTime > m_timeMarker.end) @@ -444,7 +462,7 @@ void CUiAnimationContext::OnPostRender() { SUiAnimContext ac; ac.dt = 0; - ac.fps = GetIEditor()->GetSystem()->GetITimer()->GetFrameRate(); + ac.fps = Internal::GetFrameRate(); ac.time = m_currTime; ac.bSingleFrame = true; ac.bForcePlay = true; @@ -586,7 +604,7 @@ void CUiAnimationContext::AnimateActiveSequence() SUiAnimContext ac; ac.dt = 0; - ac.fps = GetIEditor()->GetSystem()->GetITimer()->GetFrameRate(); + ac.fps = Internal::GetFrameRate(); ac.time = m_currTime; ac.bSingleFrame = true; ac.bForcePlay = true; diff --git a/Gems/LyShine/Code/Editor/Animation/Controls/UiSplineCtrlEx.cpp b/Gems/LyShine/Code/Editor/Animation/Controls/UiSplineCtrlEx.cpp index 60109fc49c..9dc44d3046 100644 --- a/Gems/LyShine/Code/Editor/Animation/Controls/UiSplineCtrlEx.cpp +++ b/Gems/LyShine/Code/Editor/Animation/Controls/UiSplineCtrlEx.cpp @@ -2182,18 +2182,6 @@ void AbstractSplineWidget::MoveSelectedKeys(Vec2 offset, bool copyKeys) } } - int rangeMin = aznumeric_cast(TimeToXOfs(affectedRangeMin)); - int rangeMax = aznumeric_cast(TimeToXOfs(affectedRangeMax)); - - if (m_timeRange.start == affectedRangeMin) - { - rangeMin = m_rcSpline.left(); - } - if (m_timeRange.end == affectedRangeMax) - { - rangeMax = m_rcSpline.right(); - } - if (m_pTimelineCtrl) { m_pTimelineCtrl->update(); diff --git a/Gems/LyShine/Code/Editor/Animation/UiAnimViewAnimNode.cpp b/Gems/LyShine/Code/Editor/Animation/UiAnimViewAnimNode.cpp index 5d62f88310..9aee4b10cd 100644 --- a/Gems/LyShine/Code/Editor/Animation/UiAnimViewAnimNode.cpp +++ b/Gems/LyShine/Code/Editor/Animation/UiAnimViewAnimNode.cpp @@ -8,7 +8,7 @@ #include "UiEditorAnimationBus.h" -#include "UiEditorDLLBus.h" +#include #include "UiAnimViewAnimNode.h" #include "UiAnimViewTrack.h" #include "UiAnimViewSequence.h" diff --git a/Gems/LyShine/Code/Editor/Animation/UiAnimViewDialog.cpp b/Gems/LyShine/Code/Editor/Animation/UiAnimViewDialog.cpp index e6c2dda74c..9ad9a50aa5 100644 --- a/Gems/LyShine/Code/Editor/Animation/UiAnimViewDialog.cpp +++ b/Gems/LyShine/Code/Editor/Animation/UiAnimViewDialog.cpp @@ -257,6 +257,7 @@ BOOL CUiAnimViewDialog::OnInitDialog() m_wndSplitter->addWidget(m_wndDopeSheet); m_wndSplitter->setStretchFactor(0, 1); m_wndSplitter->setStretchFactor(1, 10); + m_wndSplitter->setChildrenCollapsible(false); l->addWidget(m_wndSplitter); w->setLayout(l); setCentralWidget(w); @@ -283,6 +284,11 @@ BOOL CUiAnimViewDialog::OnInitDialog() m_wndCurveEditorDock->setVisible(false); m_wndCurveEditorDock->setEnabled(false); + // In order to prevent the track editor view from collapsing and becoming invisible, we use the + // minimum size of the curve editor for the track editor as well. Since both editors use the same + // view widget in the UI animation editor when not in 'Both' mode, the sizes can be identical. + m_wndDopeSheet->setMinimumSize(m_wndCurveEditor->minimumSizeHint()); + InitSequences(); m_lazyInitDone = false; diff --git a/Gems/LyShine/Code/Editor/Animation/UiAnimViewDopeSheetBase.cpp b/Gems/LyShine/Code/Editor/Animation/UiAnimViewDopeSheetBase.cpp index 9f67503b73..33df1b9624 100644 --- a/Gems/LyShine/Code/Editor/Animation/UiAnimViewDopeSheetBase.cpp +++ b/Gems/LyShine/Code/Editor/Animation/UiAnimViewDopeSheetBase.cpp @@ -1866,24 +1866,22 @@ void CUiAnimViewDopeSheetBase::AddKeys(const QPoint& point, const bool bTryAddKe if (pTrack && inRange) { - bool keyCreated = false; - if (bTryAddKeysInGroup && pNode->GetParentNode()) // Add keys in group + if (bTryAddKeysInGroup && pNode->GetParentNode()) // Add keys in group { CUiAnimViewTrackBundle tracksInGroup = pNode->GetTracksByParam(pTrack->GetParameterType()); for (int i = 0; i < (int)tracksInGroup.GetCount(); ++i) { CUiAnimViewTrack* pCurrTrack = tracksInGroup.GetTrack(i); - if (pCurrTrack->GetChildCount() == 0) // A simple track + if (pCurrTrack->GetChildCount() == 0) // A simple track { if (IsOkToAddKeyHere(pCurrTrack, keyTime)) { RecordTrackUndo(pCurrTrack); pCurrTrack->CreateKey(keyTime); - keyCreated = true; } } - else // A compound track + else // A compound track { for (unsigned int k = 0; k < pCurrTrack->GetChildCount(); ++k) { @@ -1892,26 +1890,24 @@ void CUiAnimViewDopeSheetBase::AddKeys(const QPoint& point, const bool bTryAddKe { RecordTrackUndo(pSubTrack); pSubTrack->CreateKey(keyTime); - keyCreated = true; } } } } } - else if (pTrack->GetChildCount() == 0) // A simple track + else if (pTrack->GetChildCount() == 0) // A simple track { if (IsOkToAddKeyHere(pTrack, keyTime)) { RecordTrackUndo(pTrack); pTrack->CreateKey(keyTime); - keyCreated = true; } } - else // A compound track + else // A compound track { if (pTrack->GetValueType() == eUiAnimValue_RGB) { - keyCreated = CreateColorKey(pTrack, keyTime); + CreateColorKey(pTrack, keyTime); } else { @@ -1922,7 +1918,6 @@ void CUiAnimViewDopeSheetBase::AddKeys(const QPoint& point, const bool bTryAddKe if (IsOkToAddKeyHere(pSubTrack, keyTime)) { pSubTrack->CreateKey(keyTime); - keyCreated = true; } } } @@ -2236,7 +2231,6 @@ void CUiAnimViewDopeSheetBase::DrawSelectTrack(const Range& timeRange, QPainter* void CUiAnimViewDopeSheetBase::DrawBoolTrack(const Range& timeRange, QPainter* painter, CUiAnimViewTrack* pTrack, const QRect& rc) { int x0 = TimeToClient(timeRange.start); - float t0 = timeRange.start; const QBrush prevBrush = painter->brush(); painter->setBrush(m_visibilityBrush); @@ -2267,7 +2261,6 @@ void CUiAnimViewDopeSheetBase::DrawBoolTrack(const Range& timeRange, QPainter* p painter->fillRect(QRect(QPoint(x0, rc.top() + 4), QPoint(x, rc.bottom() - 4)), gradient); } - t0 = time; x0 = x; } int x = TimeToClient(timeRange.end); diff --git a/Gems/LyShine/Code/Editor/Animation/UiAnimViewSequenceManager.cpp b/Gems/LyShine/Code/Editor/Animation/UiAnimViewSequenceManager.cpp index 4cfeeaff6a..2a6c607b24 100644 --- a/Gems/LyShine/Code/Editor/Animation/UiAnimViewSequenceManager.cpp +++ b/Gems/LyShine/Code/Editor/Animation/UiAnimViewSequenceManager.cpp @@ -8,7 +8,7 @@ #include "UiEditorAnimationBus.h" -#include "UiEditorDLLBus.h" +#include #include "UiAnimViewSequenceManager.h" #include "UiAnimViewUndo.h" #include "AnimationContext.h" diff --git a/Gems/LyShine/Code/Editor/EditorWindow.cpp b/Gems/LyShine/Code/Editor/EditorWindow.cpp index a4ad4d7043..7b60474ed5 100644 --- a/Gems/LyShine/Code/Editor/EditorWindow.cpp +++ b/Gems/LyShine/Code/Editor/EditorWindow.cpp @@ -8,6 +8,7 @@ #include "EditorCommon.h" #include "CanvasHelpers.h" #include "AssetDropHelpers.h" +#include #include #include #include @@ -697,15 +698,36 @@ bool EditorWindow::SaveCanvasToXml(UiCanvasMetadata& canvasMetadata, bool forceA else if (recentFiles.size() > 0) { dir = Path::GetPath(recentFiles.front()); - dir.append(canvasMetadata.m_canvasDisplayName.c_str()); } // Else go to the default canvas directory else { dir = FileHelpers::GetAbsoluteDir(UICANVASEDITOR_CANVAS_DIRECTORY); - dir.append(canvasMetadata.m_canvasDisplayName.c_str()); } + // Make sure the directory exists. If not, walk up the directory path until we find one that does + // so that we will have a consistent 'starting folder' in the 'AzQtComponents::FileDialog::GetSaveFileName' call + // across different platforms. + AZ::IO::FixedMaxPath dirPath(dir.toUtf8().constData()); + + while (!AZ::IO::SystemFile::IsDirectory(dirPath.c_str())) + { + AZ::IO::PathView parentPath = dirPath.ParentPath(); + if (parentPath == dirPath) + { + // We've reach the root path, need to break out whether or not + // the root path exists + break; + } + else + { + dirPath = parentPath; + } + } + // Append the default filename + dirPath /= canvasMetadata.m_canvasDisplayName; + dir = QString::fromUtf8(dirPath.c_str(), static_cast(dirPath.Native().size())); + QString filename = AzQtComponents::FileDialog::GetSaveFileName(nullptr, QString(), dir, diff --git a/Gems/LyShine/Code/Editor/EditorWindow.h b/Gems/LyShine/Code/Editor/EditorWindow.h index d9b3e60c32..538e565b7a 100644 --- a/Gems/LyShine/Code/Editor/EditorWindow.h +++ b/Gems/LyShine/Code/Editor/EditorWindow.h @@ -11,7 +11,7 @@ #include "EditorCommon.h" #include "Animation/UiEditorAnimationBus.h" -#include "UiEditorDLLBus.h" +#include #include "UiEditorInternalBus.h" #include "UiEditorEntityContext.h" #include "UiSliceManager.h" diff --git a/Gems/LyShine/Code/Editor/LyShineEditorSystemComponent.cpp b/Gems/LyShine/Code/Editor/LyShineEditorSystemComponent.cpp index f32ba1dbd5..229101d4c0 100644 --- a/Gems/LyShine/Code/Editor/LyShineEditorSystemComponent.cpp +++ b/Gems/LyShine/Code/Editor/LyShineEditorSystemComponent.cpp @@ -103,6 +103,7 @@ namespace LyShineEditor void LyShineEditorSystemComponent::Activate() { AzToolsFramework::EditorEventsBus::Handler::BusConnect(); + AzToolsFramework::EditorEntityContextNotificationBus::Handler::BusConnect(); LyShine::LyShineRequestBus::Handler::BusConnect(); } @@ -118,6 +119,7 @@ namespace LyShineEditor } LyShine::LyShineRequestBus::Handler::BusDisconnect(); AzToolsFramework::EditorEventsBus::Handler::BusDisconnect(); + AzToolsFramework::EditorEntityContextNotificationBus::Handler::BusDisconnect(); } //////////////////////////////////////////////////////////////////////////////////////////////////// @@ -204,4 +206,14 @@ namespace LyShineEditor UiEditorDLLBus::Broadcast(&UiEditorDLLInterface::OpenSourceCanvasFile, absoluteName); } } + + //////////////////////////////////////////////////////////////////////////////////////////////// + void LyShineEditorSystemComponent::OnStopPlayInEditor() + { + // reset UI system + if (gEnv->pLyShine) + { + gEnv->pLyShine->Reset(); + } + } } diff --git a/Gems/LyShine/Code/Editor/LyShineEditorSystemComponent.h b/Gems/LyShine/Code/Editor/LyShineEditorSystemComponent.h index 340c40cc5e..f355f18c3d 100644 --- a/Gems/LyShine/Code/Editor/LyShineEditorSystemComponent.h +++ b/Gems/LyShine/Code/Editor/LyShineEditorSystemComponent.h @@ -11,6 +11,7 @@ #include #include #include +#include #include namespace LyShineEditor @@ -18,6 +19,7 @@ namespace LyShineEditor class LyShineEditorSystemComponent : public AZ::Component , protected AzToolsFramework::EditorEvents::Bus::Handler + , protected AzToolsFramework::EditorEntityContextNotificationBus::Handler , protected AzToolsFramework::AssetBrowser::AssetBrowserInteractionNotificationBus::Handler , protected LyShine::LyShineRequestBus::Handler { @@ -58,5 +60,10 @@ namespace LyShineEditor // LyShineRequestBus interface implementation void EditUICanvas(const AZStd::string_view& canvasPath) override; //////////////////////////////////////////////////////////////////////// + + //////////////////////////////////////////////////////////////////////// + // EditorEntityContextNotificationBus + void OnStopPlayInEditor() override; + //////////////////////////////////////////////////////////////////////// }; } diff --git a/Gems/LyShine/Code/Editor/PropertiesWidget.cpp b/Gems/LyShine/Code/Editor/PropertiesWidget.cpp index c128fe15b9..e350a367c6 100644 --- a/Gems/LyShine/Code/Editor/PropertiesWidget.cpp +++ b/Gems/LyShine/Code/Editor/PropertiesWidget.cpp @@ -49,7 +49,7 @@ PropertiesWidget::PropertiesWidget(EditorWindow* editorWindow, m_refreshTimer.setSingleShot(true); } - setMinimumWidth(250); + setMinimumWidth(330); ToolsApplicationEvents::Bus::Handler::BusConnect(); } diff --git a/Gems/LyShine/Code/Editor/PropertyHandlerUiParticleColorKeyframe.h b/Gems/LyShine/Code/Editor/PropertyHandlerUiParticleColorKeyframe.h index 9fdc8e61c4..639d042b34 100644 --- a/Gems/LyShine/Code/Editor/PropertyHandlerUiParticleColorKeyframe.h +++ b/Gems/LyShine/Code/Editor/PropertyHandlerUiParticleColorKeyframe.h @@ -50,7 +50,7 @@ class PropertyHandlerUiParticleColorKeyframe public: AZ_CLASS_ALLOCATOR(PropertyHandlerUiParticleColorKeyframe, AZ::SystemAllocator, 0); - AZ::u32 GetHandlerName(void) const override { return AZ_CRC("UiParticleColorKeyframeCtrl", 0x8cb3a9f1); } + AZ::u32 GetHandlerName(void) const override { return AZ_CRC("UiParticleColorKeyframeCtrl", 0xe3ef28b6); } bool IsDefaultHandler() const override { return true; } QWidget* CreateGUI(QWidget* pParent) override; void ConsumeAttribute(PropertyUiParticleColorKeyframeCtrl* GUI, AZ::u32 attrib, AzToolsFramework::PropertyAttributeReader* attrValue, const char* debugName) override; diff --git a/Gems/LyShine/Code/Editor/PropertyHandlerUiParticleFloatKeyframe.h b/Gems/LyShine/Code/Editor/PropertyHandlerUiParticleFloatKeyframe.h index 39e5dd27c2..df3983dc3e 100644 --- a/Gems/LyShine/Code/Editor/PropertyHandlerUiParticleFloatKeyframe.h +++ b/Gems/LyShine/Code/Editor/PropertyHandlerUiParticleFloatKeyframe.h @@ -50,7 +50,7 @@ class PropertyHandlerUiParticleFloatKeyframe public: AZ_CLASS_ALLOCATOR(PropertyHandlerUiParticleFloatKeyframe, AZ::SystemAllocator, 0); - AZ::u32 GetHandlerName(void) const override { return AZ_CRC("UiParticleFloatKeyframeCtrl", 0xba9359a2); } + AZ::u32 GetHandlerName(void) const override { return AZ_CRC("UiParticleFloatKeyframeCtrl", 0x448a90ec); } bool IsDefaultHandler() const override { return true; } QWidget* CreateGUI(QWidget* pParent) override; void ConsumeAttribute(PropertyUiParticleFloatKeyframeCtrl* GUI, AZ::u32 attrib, AzToolsFramework::PropertyAttributeReader* attrValue, const char* debugName) override; diff --git a/Gems/LyShine/Code/Editor/SpriteBorderEditorCommon.h b/Gems/LyShine/Code/Editor/SpriteBorderEditorCommon.h index 3f4d6b25b9..95e3256160 100644 --- a/Gems/LyShine/Code/Editor/SpriteBorderEditorCommon.h +++ b/Gems/LyShine/Code/Editor/SpriteBorderEditorCommon.h @@ -10,7 +10,6 @@ #include // required to be included before platform.h #include #include -#include #include #include diff --git a/Gems/LyShine/Code/Editor/ViewportWidget.cpp b/Gems/LyShine/Code/Editor/ViewportWidget.cpp index bf7447585c..993f57aeeb 100644 --- a/Gems/LyShine/Code/Editor/ViewportWidget.cpp +++ b/Gems/LyShine/Code/Editor/ViewportWidget.cpp @@ -341,11 +341,6 @@ void ViewportWidget::ClearUntilSafeToRedraw() // set flag so that Update will just clear the screen rather than rendering canvas m_canvasRenderIsEnabled = false; -#ifdef LYSHINE_ATOM_TODO // check if still needed - // Force an update - Update(); -#endif - // Schedule a timer to set the m_canvasRenderIsEnabled flag // using a time of zero just waits until there is nothing on the event queue QTimer::singleShot(0, this, SLOT(EnableCanvasRender())); @@ -454,29 +449,6 @@ void ViewportWidget::contextMenuEvent(QContextMenuEvent* e) RenderViewportWidget::contextMenuEvent(e); } -#ifdef LYSHINE_ATOM_TODO // check if still needed -void ViewportWidget::HandleSignalRender([[maybe_unused]] const SRenderContext& context) -{ - // Called from QViewport when redrawing the viewport. - // Triggered from a QViewport resize event or from our call to QViewport::Update - if (m_canvasRenderIsEnabled) - { - gEnv->pRenderer->SetSrgbWrite(true); - - UiEditorMode editorMode = m_editorWindow->GetEditorMode(); - - if (editorMode == UiEditorMode::Edit) - { - RenderEditMode(); - } - else // if (editorMode == UiEditorMode::Preview) - { - RenderPreviewMode(); - } - } -} -#endif - void ViewportWidget::UserSelectionChanged(HierarchyItemRawPtrList* items) { Refresh(); @@ -999,13 +971,6 @@ void ViewportWidget::RenderEditMode() m_viewportInteraction->GetCanvasToViewportScale(), m_viewportInteraction->GetCanvasToViewportTranslation()); -#ifdef LYSHINE_ATOM_TODO - // clear the stencil buffer before rendering each canvas - required for masking - // NOTE: the FRT_CLEAR_IMMEDIATE is required since we will not be setting the render target - ColorF viewportBackgroundColor(0, 0, 0, 0); // if clearing color we want to set alpha to zero also - gEnv->pRenderer->ClearTargetsImmediately(FRT_CLEAR_STENCIL, viewportBackgroundColor); -#endif - // Set the target size of the canvas EBUS_EVENT_ID(canvasEntityId, UiCanvasBus, SetTargetCanvasSize, false, canvasSize); diff --git a/Code/Legacy/CryCommon/LyShine/Animation/IUiAnimation.h b/Gems/LyShine/Code/Include/LyShine/Animation/IUiAnimation.h similarity index 99% rename from Code/Legacy/CryCommon/LyShine/Animation/IUiAnimation.h rename to Gems/LyShine/Code/Include/LyShine/Animation/IUiAnimation.h index be449bb6ad..a678e238e2 100644 --- a/Code/Legacy/CryCommon/LyShine/Animation/IUiAnimation.h +++ b/Gems/LyShine/Code/Include/LyShine/Animation/IUiAnimation.h @@ -9,7 +9,6 @@ #include #include -#include #include #include #include diff --git a/Code/Legacy/CryCommon/LyShine/Bus/Sprite/UiSpriteBus.h b/Gems/LyShine/Code/Include/LyShine/Bus/Sprite/UiSpriteBus.h similarity index 100% rename from Code/Legacy/CryCommon/LyShine/Bus/Sprite/UiSpriteBus.h rename to Gems/LyShine/Code/Include/LyShine/Bus/Sprite/UiSpriteBus.h diff --git a/Code/Legacy/CryCommon/LyShine/Bus/Tools/UiSystemToolsBus.h b/Gems/LyShine/Code/Include/LyShine/Bus/Tools/UiSystemToolsBus.h similarity index 100% rename from Code/Legacy/CryCommon/LyShine/Bus/Tools/UiSystemToolsBus.h rename to Gems/LyShine/Code/Include/LyShine/Bus/Tools/UiSystemToolsBus.h diff --git a/Code/Legacy/CryCommon/LyShine/Bus/UiAnimateEntityBus.h b/Gems/LyShine/Code/Include/LyShine/Bus/UiAnimateEntityBus.h similarity index 100% rename from Code/Legacy/CryCommon/LyShine/Bus/UiAnimateEntityBus.h rename to Gems/LyShine/Code/Include/LyShine/Bus/UiAnimateEntityBus.h diff --git a/Code/Legacy/CryCommon/LyShine/Bus/UiAnimationBus.h b/Gems/LyShine/Code/Include/LyShine/Bus/UiAnimationBus.h similarity index 100% rename from Code/Legacy/CryCommon/LyShine/Bus/UiAnimationBus.h rename to Gems/LyShine/Code/Include/LyShine/Bus/UiAnimationBus.h diff --git a/Code/Legacy/CryCommon/LyShine/Bus/UiButtonBus.h b/Gems/LyShine/Code/Include/LyShine/Bus/UiButtonBus.h similarity index 100% rename from Code/Legacy/CryCommon/LyShine/Bus/UiButtonBus.h rename to Gems/LyShine/Code/Include/LyShine/Bus/UiButtonBus.h diff --git a/Code/Legacy/CryCommon/LyShine/Bus/UiCanvasBus.h b/Gems/LyShine/Code/Include/LyShine/Bus/UiCanvasBus.h similarity index 100% rename from Code/Legacy/CryCommon/LyShine/Bus/UiCanvasBus.h rename to Gems/LyShine/Code/Include/LyShine/Bus/UiCanvasBus.h diff --git a/Code/Legacy/CryCommon/LyShine/Bus/UiCanvasManagerBus.h b/Gems/LyShine/Code/Include/LyShine/Bus/UiCanvasManagerBus.h similarity index 100% rename from Code/Legacy/CryCommon/LyShine/Bus/UiCanvasManagerBus.h rename to Gems/LyShine/Code/Include/LyShine/Bus/UiCanvasManagerBus.h diff --git a/Code/Legacy/CryCommon/LyShine/Bus/UiCanvasUpdateNotificationBus.h b/Gems/LyShine/Code/Include/LyShine/Bus/UiCanvasUpdateNotificationBus.h similarity index 100% rename from Code/Legacy/CryCommon/LyShine/Bus/UiCanvasUpdateNotificationBus.h rename to Gems/LyShine/Code/Include/LyShine/Bus/UiCanvasUpdateNotificationBus.h diff --git a/Code/Legacy/CryCommon/LyShine/Bus/UiCheckboxBus.h b/Gems/LyShine/Code/Include/LyShine/Bus/UiCheckboxBus.h similarity index 100% rename from Code/Legacy/CryCommon/LyShine/Bus/UiCheckboxBus.h rename to Gems/LyShine/Code/Include/LyShine/Bus/UiCheckboxBus.h diff --git a/Code/Legacy/CryCommon/LyShine/Bus/UiDraggableBus.h b/Gems/LyShine/Code/Include/LyShine/Bus/UiDraggableBus.h similarity index 100% rename from Code/Legacy/CryCommon/LyShine/Bus/UiDraggableBus.h rename to Gems/LyShine/Code/Include/LyShine/Bus/UiDraggableBus.h diff --git a/Code/Legacy/CryCommon/LyShine/Bus/UiDropTargetBus.h b/Gems/LyShine/Code/Include/LyShine/Bus/UiDropTargetBus.h similarity index 100% rename from Code/Legacy/CryCommon/LyShine/Bus/UiDropTargetBus.h rename to Gems/LyShine/Code/Include/LyShine/Bus/UiDropTargetBus.h diff --git a/Code/Legacy/CryCommon/LyShine/Bus/UiDropdownBus.h b/Gems/LyShine/Code/Include/LyShine/Bus/UiDropdownBus.h similarity index 100% rename from Code/Legacy/CryCommon/LyShine/Bus/UiDropdownBus.h rename to Gems/LyShine/Code/Include/LyShine/Bus/UiDropdownBus.h diff --git a/Code/Legacy/CryCommon/LyShine/Bus/UiDropdownOptionBus.h b/Gems/LyShine/Code/Include/LyShine/Bus/UiDropdownOptionBus.h similarity index 100% rename from Code/Legacy/CryCommon/LyShine/Bus/UiDropdownOptionBus.h rename to Gems/LyShine/Code/Include/LyShine/Bus/UiDropdownOptionBus.h diff --git a/Code/Legacy/CryCommon/LyShine/Bus/UiDynamicLayoutBus.h b/Gems/LyShine/Code/Include/LyShine/Bus/UiDynamicLayoutBus.h similarity index 100% rename from Code/Legacy/CryCommon/LyShine/Bus/UiDynamicLayoutBus.h rename to Gems/LyShine/Code/Include/LyShine/Bus/UiDynamicLayoutBus.h diff --git a/Code/Legacy/CryCommon/LyShine/Bus/UiDynamicScrollBoxBus.h b/Gems/LyShine/Code/Include/LyShine/Bus/UiDynamicScrollBoxBus.h similarity index 100% rename from Code/Legacy/CryCommon/LyShine/Bus/UiDynamicScrollBoxBus.h rename to Gems/LyShine/Code/Include/LyShine/Bus/UiDynamicScrollBoxBus.h diff --git a/Code/Legacy/CryCommon/LyShine/Bus/UiEditorBus.h b/Gems/LyShine/Code/Include/LyShine/Bus/UiEditorBus.h similarity index 100% rename from Code/Legacy/CryCommon/LyShine/Bus/UiEditorBus.h rename to Gems/LyShine/Code/Include/LyShine/Bus/UiEditorBus.h diff --git a/Code/Legacy/CryCommon/LyShine/Bus/UiEditorCanvasBus.h b/Gems/LyShine/Code/Include/LyShine/Bus/UiEditorCanvasBus.h similarity index 100% rename from Code/Legacy/CryCommon/LyShine/Bus/UiEditorCanvasBus.h rename to Gems/LyShine/Code/Include/LyShine/Bus/UiEditorCanvasBus.h diff --git a/Code/Legacy/CryCommon/LyShine/Bus/UiEditorChangeNotificationBus.h b/Gems/LyShine/Code/Include/LyShine/Bus/UiEditorChangeNotificationBus.h similarity index 100% rename from Code/Legacy/CryCommon/LyShine/Bus/UiEditorChangeNotificationBus.h rename to Gems/LyShine/Code/Include/LyShine/Bus/UiEditorChangeNotificationBus.h diff --git a/Code/Legacy/CryCommon/LyShine/Bus/UiElementBus.h b/Gems/LyShine/Code/Include/LyShine/Bus/UiElementBus.h similarity index 100% rename from Code/Legacy/CryCommon/LyShine/Bus/UiElementBus.h rename to Gems/LyShine/Code/Include/LyShine/Bus/UiElementBus.h diff --git a/Code/Legacy/CryCommon/LyShine/Bus/UiEntityContextBus.h b/Gems/LyShine/Code/Include/LyShine/Bus/UiEntityContextBus.h similarity index 100% rename from Code/Legacy/CryCommon/LyShine/Bus/UiEntityContextBus.h rename to Gems/LyShine/Code/Include/LyShine/Bus/UiEntityContextBus.h diff --git a/Code/Legacy/CryCommon/LyShine/Bus/UiFaderBus.h b/Gems/LyShine/Code/Include/LyShine/Bus/UiFaderBus.h similarity index 100% rename from Code/Legacy/CryCommon/LyShine/Bus/UiFaderBus.h rename to Gems/LyShine/Code/Include/LyShine/Bus/UiFaderBus.h diff --git a/Code/Legacy/CryCommon/LyShine/Bus/UiFlipbookAnimationBus.h b/Gems/LyShine/Code/Include/LyShine/Bus/UiFlipbookAnimationBus.h similarity index 100% rename from Code/Legacy/CryCommon/LyShine/Bus/UiFlipbookAnimationBus.h rename to Gems/LyShine/Code/Include/LyShine/Bus/UiFlipbookAnimationBus.h diff --git a/Code/Legacy/CryCommon/LyShine/Bus/UiGameEntityContextBus.h b/Gems/LyShine/Code/Include/LyShine/Bus/UiGameEntityContextBus.h similarity index 100% rename from Code/Legacy/CryCommon/LyShine/Bus/UiGameEntityContextBus.h rename to Gems/LyShine/Code/Include/LyShine/Bus/UiGameEntityContextBus.h diff --git a/Code/Legacy/CryCommon/LyShine/Bus/UiImageBus.h b/Gems/LyShine/Code/Include/LyShine/Bus/UiImageBus.h similarity index 100% rename from Code/Legacy/CryCommon/LyShine/Bus/UiImageBus.h rename to Gems/LyShine/Code/Include/LyShine/Bus/UiImageBus.h diff --git a/Code/Legacy/CryCommon/LyShine/Bus/UiImageSequenceBus.h b/Gems/LyShine/Code/Include/LyShine/Bus/UiImageSequenceBus.h similarity index 100% rename from Code/Legacy/CryCommon/LyShine/Bus/UiImageSequenceBus.h rename to Gems/LyShine/Code/Include/LyShine/Bus/UiImageSequenceBus.h diff --git a/Code/Legacy/CryCommon/LyShine/Bus/UiIndexableImageBus.h b/Gems/LyShine/Code/Include/LyShine/Bus/UiIndexableImageBus.h similarity index 100% rename from Code/Legacy/CryCommon/LyShine/Bus/UiIndexableImageBus.h rename to Gems/LyShine/Code/Include/LyShine/Bus/UiIndexableImageBus.h diff --git a/Code/Legacy/CryCommon/LyShine/Bus/UiInitializationBus.h b/Gems/LyShine/Code/Include/LyShine/Bus/UiInitializationBus.h similarity index 100% rename from Code/Legacy/CryCommon/LyShine/Bus/UiInitializationBus.h rename to Gems/LyShine/Code/Include/LyShine/Bus/UiInitializationBus.h diff --git a/Code/Legacy/CryCommon/LyShine/Bus/UiInteractableActionsBus.h b/Gems/LyShine/Code/Include/LyShine/Bus/UiInteractableActionsBus.h similarity index 100% rename from Code/Legacy/CryCommon/LyShine/Bus/UiInteractableActionsBus.h rename to Gems/LyShine/Code/Include/LyShine/Bus/UiInteractableActionsBus.h diff --git a/Code/Legacy/CryCommon/LyShine/Bus/UiInteractableBus.h b/Gems/LyShine/Code/Include/LyShine/Bus/UiInteractableBus.h similarity index 100% rename from Code/Legacy/CryCommon/LyShine/Bus/UiInteractableBus.h rename to Gems/LyShine/Code/Include/LyShine/Bus/UiInteractableBus.h diff --git a/Code/Legacy/CryCommon/LyShine/Bus/UiInteractableStatesBus.h b/Gems/LyShine/Code/Include/LyShine/Bus/UiInteractableStatesBus.h similarity index 100% rename from Code/Legacy/CryCommon/LyShine/Bus/UiInteractableStatesBus.h rename to Gems/LyShine/Code/Include/LyShine/Bus/UiInteractableStatesBus.h diff --git a/Code/Legacy/CryCommon/LyShine/Bus/UiInteractionMaskBus.h b/Gems/LyShine/Code/Include/LyShine/Bus/UiInteractionMaskBus.h similarity index 100% rename from Code/Legacy/CryCommon/LyShine/Bus/UiInteractionMaskBus.h rename to Gems/LyShine/Code/Include/LyShine/Bus/UiInteractionMaskBus.h diff --git a/Code/Legacy/CryCommon/LyShine/Bus/UiLayoutBus.h b/Gems/LyShine/Code/Include/LyShine/Bus/UiLayoutBus.h similarity index 100% rename from Code/Legacy/CryCommon/LyShine/Bus/UiLayoutBus.h rename to Gems/LyShine/Code/Include/LyShine/Bus/UiLayoutBus.h diff --git a/Code/Legacy/CryCommon/LyShine/Bus/UiLayoutCellBus.h b/Gems/LyShine/Code/Include/LyShine/Bus/UiLayoutCellBus.h similarity index 100% rename from Code/Legacy/CryCommon/LyShine/Bus/UiLayoutCellBus.h rename to Gems/LyShine/Code/Include/LyShine/Bus/UiLayoutCellBus.h diff --git a/Code/Legacy/CryCommon/LyShine/Bus/UiLayoutCellDefaultBus.h b/Gems/LyShine/Code/Include/LyShine/Bus/UiLayoutCellDefaultBus.h similarity index 100% rename from Code/Legacy/CryCommon/LyShine/Bus/UiLayoutCellDefaultBus.h rename to Gems/LyShine/Code/Include/LyShine/Bus/UiLayoutCellDefaultBus.h diff --git a/Code/Legacy/CryCommon/LyShine/Bus/UiLayoutColumnBus.h b/Gems/LyShine/Code/Include/LyShine/Bus/UiLayoutColumnBus.h similarity index 100% rename from Code/Legacy/CryCommon/LyShine/Bus/UiLayoutColumnBus.h rename to Gems/LyShine/Code/Include/LyShine/Bus/UiLayoutColumnBus.h diff --git a/Code/Legacy/CryCommon/LyShine/Bus/UiLayoutControllerBus.h b/Gems/LyShine/Code/Include/LyShine/Bus/UiLayoutControllerBus.h similarity index 100% rename from Code/Legacy/CryCommon/LyShine/Bus/UiLayoutControllerBus.h rename to Gems/LyShine/Code/Include/LyShine/Bus/UiLayoutControllerBus.h diff --git a/Code/Legacy/CryCommon/LyShine/Bus/UiLayoutFitterBus.h b/Gems/LyShine/Code/Include/LyShine/Bus/UiLayoutFitterBus.h similarity index 100% rename from Code/Legacy/CryCommon/LyShine/Bus/UiLayoutFitterBus.h rename to Gems/LyShine/Code/Include/LyShine/Bus/UiLayoutFitterBus.h diff --git a/Code/Legacy/CryCommon/LyShine/Bus/UiLayoutGridBus.h b/Gems/LyShine/Code/Include/LyShine/Bus/UiLayoutGridBus.h similarity index 100% rename from Code/Legacy/CryCommon/LyShine/Bus/UiLayoutGridBus.h rename to Gems/LyShine/Code/Include/LyShine/Bus/UiLayoutGridBus.h diff --git a/Code/Legacy/CryCommon/LyShine/Bus/UiLayoutManagerBus.h b/Gems/LyShine/Code/Include/LyShine/Bus/UiLayoutManagerBus.h similarity index 100% rename from Code/Legacy/CryCommon/LyShine/Bus/UiLayoutManagerBus.h rename to Gems/LyShine/Code/Include/LyShine/Bus/UiLayoutManagerBus.h diff --git a/Code/Legacy/CryCommon/LyShine/Bus/UiLayoutRowBus.h b/Gems/LyShine/Code/Include/LyShine/Bus/UiLayoutRowBus.h similarity index 100% rename from Code/Legacy/CryCommon/LyShine/Bus/UiLayoutRowBus.h rename to Gems/LyShine/Code/Include/LyShine/Bus/UiLayoutRowBus.h diff --git a/Code/Legacy/CryCommon/LyShine/Bus/UiMarkupButtonBus.h b/Gems/LyShine/Code/Include/LyShine/Bus/UiMarkupButtonBus.h similarity index 100% rename from Code/Legacy/CryCommon/LyShine/Bus/UiMarkupButtonBus.h rename to Gems/LyShine/Code/Include/LyShine/Bus/UiMarkupButtonBus.h diff --git a/Code/Legacy/CryCommon/LyShine/Bus/UiMaskBus.h b/Gems/LyShine/Code/Include/LyShine/Bus/UiMaskBus.h similarity index 100% rename from Code/Legacy/CryCommon/LyShine/Bus/UiMaskBus.h rename to Gems/LyShine/Code/Include/LyShine/Bus/UiMaskBus.h diff --git a/Code/Legacy/CryCommon/LyShine/Bus/UiNavigationBus.h b/Gems/LyShine/Code/Include/LyShine/Bus/UiNavigationBus.h similarity index 100% rename from Code/Legacy/CryCommon/LyShine/Bus/UiNavigationBus.h rename to Gems/LyShine/Code/Include/LyShine/Bus/UiNavigationBus.h diff --git a/Code/Legacy/CryCommon/LyShine/Bus/UiParticleEmitterBus.h b/Gems/LyShine/Code/Include/LyShine/Bus/UiParticleEmitterBus.h similarity index 100% rename from Code/Legacy/CryCommon/LyShine/Bus/UiParticleEmitterBus.h rename to Gems/LyShine/Code/Include/LyShine/Bus/UiParticleEmitterBus.h diff --git a/Code/Legacy/CryCommon/LyShine/Bus/UiRadioButtonBus.h b/Gems/LyShine/Code/Include/LyShine/Bus/UiRadioButtonBus.h similarity index 100% rename from Code/Legacy/CryCommon/LyShine/Bus/UiRadioButtonBus.h rename to Gems/LyShine/Code/Include/LyShine/Bus/UiRadioButtonBus.h diff --git a/Code/Legacy/CryCommon/LyShine/Bus/UiRadioButtonCommunicationBus.h b/Gems/LyShine/Code/Include/LyShine/Bus/UiRadioButtonCommunicationBus.h similarity index 100% rename from Code/Legacy/CryCommon/LyShine/Bus/UiRadioButtonCommunicationBus.h rename to Gems/LyShine/Code/Include/LyShine/Bus/UiRadioButtonCommunicationBus.h diff --git a/Code/Legacy/CryCommon/LyShine/Bus/UiRadioButtonGroupBus.h b/Gems/LyShine/Code/Include/LyShine/Bus/UiRadioButtonGroupBus.h similarity index 100% rename from Code/Legacy/CryCommon/LyShine/Bus/UiRadioButtonGroupBus.h rename to Gems/LyShine/Code/Include/LyShine/Bus/UiRadioButtonGroupBus.h diff --git a/Code/Legacy/CryCommon/LyShine/Bus/UiRadioButtonGroupCommunicationBus.h b/Gems/LyShine/Code/Include/LyShine/Bus/UiRadioButtonGroupCommunicationBus.h similarity index 100% rename from Code/Legacy/CryCommon/LyShine/Bus/UiRadioButtonGroupCommunicationBus.h rename to Gems/LyShine/Code/Include/LyShine/Bus/UiRadioButtonGroupCommunicationBus.h diff --git a/Code/Legacy/CryCommon/LyShine/Bus/UiRenderBus.h b/Gems/LyShine/Code/Include/LyShine/Bus/UiRenderBus.h similarity index 100% rename from Code/Legacy/CryCommon/LyShine/Bus/UiRenderBus.h rename to Gems/LyShine/Code/Include/LyShine/Bus/UiRenderBus.h diff --git a/Code/Legacy/CryCommon/LyShine/Bus/UiRenderControlBus.h b/Gems/LyShine/Code/Include/LyShine/Bus/UiRenderControlBus.h similarity index 100% rename from Code/Legacy/CryCommon/LyShine/Bus/UiRenderControlBus.h rename to Gems/LyShine/Code/Include/LyShine/Bus/UiRenderControlBus.h diff --git a/Code/Legacy/CryCommon/LyShine/Bus/UiScrollBarBus.h b/Gems/LyShine/Code/Include/LyShine/Bus/UiScrollBarBus.h similarity index 100% rename from Code/Legacy/CryCommon/LyShine/Bus/UiScrollBarBus.h rename to Gems/LyShine/Code/Include/LyShine/Bus/UiScrollBarBus.h diff --git a/Code/Legacy/CryCommon/LyShine/Bus/UiScrollBoxBus.h b/Gems/LyShine/Code/Include/LyShine/Bus/UiScrollBoxBus.h similarity index 100% rename from Code/Legacy/CryCommon/LyShine/Bus/UiScrollBoxBus.h rename to Gems/LyShine/Code/Include/LyShine/Bus/UiScrollBoxBus.h diff --git a/Code/Legacy/CryCommon/LyShine/Bus/UiScrollableBus.h b/Gems/LyShine/Code/Include/LyShine/Bus/UiScrollableBus.h similarity index 100% rename from Code/Legacy/CryCommon/LyShine/Bus/UiScrollableBus.h rename to Gems/LyShine/Code/Include/LyShine/Bus/UiScrollableBus.h diff --git a/Code/Legacy/CryCommon/LyShine/Bus/UiScrollerBus.h b/Gems/LyShine/Code/Include/LyShine/Bus/UiScrollerBus.h similarity index 100% rename from Code/Legacy/CryCommon/LyShine/Bus/UiScrollerBus.h rename to Gems/LyShine/Code/Include/LyShine/Bus/UiScrollerBus.h diff --git a/Code/Legacy/CryCommon/LyShine/Bus/UiSliderBus.h b/Gems/LyShine/Code/Include/LyShine/Bus/UiSliderBus.h similarity index 100% rename from Code/Legacy/CryCommon/LyShine/Bus/UiSliderBus.h rename to Gems/LyShine/Code/Include/LyShine/Bus/UiSliderBus.h diff --git a/Code/Legacy/CryCommon/LyShine/Bus/UiSpawnerBus.h b/Gems/LyShine/Code/Include/LyShine/Bus/UiSpawnerBus.h similarity index 100% rename from Code/Legacy/CryCommon/LyShine/Bus/UiSpawnerBus.h rename to Gems/LyShine/Code/Include/LyShine/Bus/UiSpawnerBus.h diff --git a/Code/Legacy/CryCommon/LyShine/Bus/UiSystemBus.h b/Gems/LyShine/Code/Include/LyShine/Bus/UiSystemBus.h similarity index 100% rename from Code/Legacy/CryCommon/LyShine/Bus/UiSystemBus.h rename to Gems/LyShine/Code/Include/LyShine/Bus/UiSystemBus.h diff --git a/Code/Legacy/CryCommon/LyShine/Bus/UiTextBus.h b/Gems/LyShine/Code/Include/LyShine/Bus/UiTextBus.h similarity index 100% rename from Code/Legacy/CryCommon/LyShine/Bus/UiTextBus.h rename to Gems/LyShine/Code/Include/LyShine/Bus/UiTextBus.h diff --git a/Code/Legacy/CryCommon/LyShine/Bus/UiTextInputBus.h b/Gems/LyShine/Code/Include/LyShine/Bus/UiTextInputBus.h similarity index 100% rename from Code/Legacy/CryCommon/LyShine/Bus/UiTextInputBus.h rename to Gems/LyShine/Code/Include/LyShine/Bus/UiTextInputBus.h diff --git a/Code/Legacy/CryCommon/LyShine/Bus/UiTooltipBus.h b/Gems/LyShine/Code/Include/LyShine/Bus/UiTooltipBus.h similarity index 100% rename from Code/Legacy/CryCommon/LyShine/Bus/UiTooltipBus.h rename to Gems/LyShine/Code/Include/LyShine/Bus/UiTooltipBus.h diff --git a/Code/Legacy/CryCommon/LyShine/Bus/UiTooltipDataPopulatorBus.h b/Gems/LyShine/Code/Include/LyShine/Bus/UiTooltipDataPopulatorBus.h similarity index 100% rename from Code/Legacy/CryCommon/LyShine/Bus/UiTooltipDataPopulatorBus.h rename to Gems/LyShine/Code/Include/LyShine/Bus/UiTooltipDataPopulatorBus.h diff --git a/Code/Legacy/CryCommon/LyShine/Bus/UiTooltipDisplayBus.h b/Gems/LyShine/Code/Include/LyShine/Bus/UiTooltipDisplayBus.h similarity index 100% rename from Code/Legacy/CryCommon/LyShine/Bus/UiTooltipDisplayBus.h rename to Gems/LyShine/Code/Include/LyShine/Bus/UiTooltipDisplayBus.h diff --git a/Code/Legacy/CryCommon/LyShine/Bus/UiTransform2dBus.h b/Gems/LyShine/Code/Include/LyShine/Bus/UiTransform2dBus.h similarity index 100% rename from Code/Legacy/CryCommon/LyShine/Bus/UiTransform2dBus.h rename to Gems/LyShine/Code/Include/LyShine/Bus/UiTransform2dBus.h diff --git a/Code/Legacy/CryCommon/LyShine/Bus/UiTransformBus.h b/Gems/LyShine/Code/Include/LyShine/Bus/UiTransformBus.h similarity index 100% rename from Code/Legacy/CryCommon/LyShine/Bus/UiTransformBus.h rename to Gems/LyShine/Code/Include/LyShine/Bus/UiTransformBus.h diff --git a/Code/Legacy/CryCommon/LyShine/Bus/UiVisualBus.h b/Gems/LyShine/Code/Include/LyShine/Bus/UiVisualBus.h similarity index 100% rename from Code/Legacy/CryCommon/LyShine/Bus/UiVisualBus.h rename to Gems/LyShine/Code/Include/LyShine/Bus/UiVisualBus.h diff --git a/Code/Legacy/CryCommon/LyShine/Bus/World/UiCanvasOnMeshBus.h b/Gems/LyShine/Code/Include/LyShine/Bus/World/UiCanvasOnMeshBus.h similarity index 100% rename from Code/Legacy/CryCommon/LyShine/Bus/World/UiCanvasOnMeshBus.h rename to Gems/LyShine/Code/Include/LyShine/Bus/World/UiCanvasOnMeshBus.h diff --git a/Code/Legacy/CryCommon/LyShine/Bus/World/UiCanvasRefBus.h b/Gems/LyShine/Code/Include/LyShine/Bus/World/UiCanvasRefBus.h similarity index 100% rename from Code/Legacy/CryCommon/LyShine/Bus/World/UiCanvasRefBus.h rename to Gems/LyShine/Code/Include/LyShine/Bus/World/UiCanvasRefBus.h diff --git a/Gems/LyShine/Code/Include/LyShine/Draw2d.h b/Gems/LyShine/Code/Include/LyShine/Draw2d.h index 6c848a7f96..d138f41b03 100644 --- a/Gems/LyShine/Code/Include/LyShine/Draw2d.h +++ b/Gems/LyShine/Code/Include/LyShine/Draw2d.h @@ -8,13 +8,10 @@ #pragma once #include -#include -#include #include #include #include -#include #include //////////////////////////////////////////////////////////////////////////////////////////////////// @@ -23,68 +20,11 @@ //! The CDraw2d class implements the IDraw2d interface for drawing 2D images, shapes and text. //! Positions and sizes are specified in pixels in the associated 2D viewport. class CDraw2d - : public IDraw2d // LYSHINE_ATOM_TODO - keep around until gEnv->pLyShine is replaced by bus interface + : public IDraw2d , public AZ::Render::Bootstrap::NotificationBus::Handler { public: // types - struct RenderState - { - RenderState() - { - m_blendState.m_enable = true; - m_blendState.m_blendSource = AZ::RHI::BlendFactor::AlphaSource; - m_blendState.m_blendDest = AZ::RHI::BlendFactor::AlphaSourceInverse; - - m_depthState.m_enable = false; - } - - AZ::RHI::TargetBlendState m_blendState; - AZ::RHI::DepthState m_depthState; - }; - - //! Struct used to pass additional image options. - // - //! If this is not passed then the defaults are used - struct ImageOptions - { - AZ::Vector3 color = AZ::Vector3(1.0f, 1.0f, 1.0f); - Rounding pixelRounding = Rounding::Nearest; - RenderState m_renderState; - }; - - //! Struct used to pass additional text options - mostly ones that do not change from call to call. - // - //! If this is not passed then the defaults below are used - struct TextOptions - { - 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 - VAlign verticalAlignment; //!< default is VAlign::Top - AZ::Vector2 dropShadowOffset; //!< default is (0,0), zero offset means no drop shadow is drawn - AZ::Color dropShadowColor; //!< default is (0,0,0,0), zero alpha means no drop shadow is drawn - float rotation; //!< default is 0 - bool depthTestEnabled; //!< default is false - }; - - //! Used to pass in arrays of vertices (e.g. to DrawQuad) - struct VertexPosColUV - { - VertexPosColUV() {} - VertexPosColUV(const AZ::Vector2& inPos, const AZ::Color& inColor, const AZ::Vector2& inUV) - { - position = inPos; - color = inColor; - uv = inUV; - } - - AZ::Vector2 position; //!< 2D position of vertex - AZ::Color color; //!< Float color - AZ::Vector2 uv; //!< Texture coordinate - }; - public: // member functions //! Constructor, constructed by the LyShine class @@ -115,7 +55,7 @@ public: // member functions //! \param imageOptions Optional struct specifying options that tend to be the same from call to call void DrawImage(AZ::Data::Instance image, AZ::Vector2 position, AZ::Vector2 size, float opacity = 1.0f, float rotation = 0.0f, const AZ::Vector2* pivotPoint = nullptr, const AZ::Vector2* minMaxTexCoords = nullptr, - ImageOptions* imageOptions = nullptr); + ImageOptions* imageOptions = nullptr) override; //! Draw a textured quad where the position specifies the point specified by the alignment. // @@ -134,7 +74,7 @@ public: // member functions void DrawImageAligned(AZ::Data::Instance image, AZ::Vector2 position, AZ::Vector2 size, HAlign horizontalAlignment, VAlign verticalAlignment, float opacity = 1.0f, float rotation = 0.0f, const AZ::Vector2* minMaxTexCoords = nullptr, - ImageOptions* imageOptions = nullptr); + ImageOptions* imageOptions = nullptr) override; //! Draw a textured quad where the position, color and uv of each point is specified explicitly // @@ -142,10 +82,11 @@ public: // member functions //! \param verts An array of 4 vertices, in clockwise order (e.g. top left, top right, bottom right, bottom left) //! \param pixelRounding Whether and how to round pixel coordinates //! \param renderState Blend mode and depth state - virtual void DrawQuad(AZ::Data::Instance image, + void DrawQuad(AZ::Data::Instance image, VertexPosColUV* verts, Rounding pixelRounding = Rounding::Nearest, - const RenderState& renderState = RenderState{}); + bool clamp = false, + const RenderState& renderState = RenderState{}) override; //! Draw a line // @@ -154,9 +95,9 @@ public: // member functions //! \param color The color of the line //! \param pixelRounding Whether and how to round pixel coordinates //! \param renderState Blend mode and depth state - virtual void DrawLine(AZ::Vector2 start, AZ::Vector2 end, AZ::Color color, + void DrawLine(AZ::Vector2 start, AZ::Vector2 end, AZ::Color color, IDraw2d::Rounding pixelRounding = IDraw2d::Rounding::Nearest, - const RenderState& renderState = RenderState{}); + const RenderState& renderState = RenderState{}) override; //! Draw a line with a texture so it can be dotted or dashed // @@ -164,10 +105,10 @@ public: // member functions //! \param verts An array of 2 vertices for the start and end points of the line //! \param pixelRounding Whether and how to round pixel coordinates //! \param renderState Blend mode and depth state - virtual void DrawLineTextured(AZ::Data::Instance image, + void DrawLineTextured(AZ::Data::Instance image, VertexPosColUV* verts, IDraw2d::Rounding pixelRounding = IDraw2d::Rounding::Nearest, - const RenderState& renderState = RenderState{}); + const RenderState& renderState = RenderState{}) override; //! Draw a text string. Only supports ASCII text. // //! The font and effect used to render the text are specified in the textOptions structure @@ -177,7 +118,7 @@ public: // member functions //! \param opacity The opacity (alpha value) to use to draw the text //! \param textOptions Pointer to an options struct. If null the default options are used void DrawText(const char* textString, AZ::Vector2 position, float pointSize, - float opacity = 1.0f, TextOptions* textOptions = nullptr); + float opacity = 1.0f, TextOptions* textOptions = nullptr) override; //! Draw a rectangular outline with a texture // @@ -192,40 +133,43 @@ public: // member functions AZ::Vector2 rightVec, AZ::Vector2 downVec, AZ::Color color, - uint32_t lineThickness = 0); + uint32_t lineThickness = 0) override; //! Get the width and height (in pixels) that would be used to draw the given text string. // //! Pass the same parameter values that would be used to draw the string - AZ::Vector2 GetTextSize(const char* textString, float pointSize, TextOptions* textOptions = nullptr); + AZ::Vector2 GetTextSize(const char* textString, float pointSize, TextOptions* textOptions = nullptr) override; //! Get the width of the rendering viewport (in pixels). - float GetViewportWidth() const; + float GetViewportWidth() const override; //! Get the height of the rendering viewport (in pixels). - float GetViewportHeight() const; + float GetViewportHeight() const override; + + //! Get dpi scale factor + float GetViewportDpiScalingFactor() const override; //! Get the default values that would be used if no image options were passed in // //! This is a convenient way to initialize the imageOptions struct - virtual const ImageOptions& GetDefaultImageOptions() const; + const ImageOptions& GetDefaultImageOptions() const override; //! Get the default values that would be used if no text options were passed in // //! This is a convenient way to initialize the textOptions struct - virtual const TextOptions& GetDefaultTextOptions() const; + const TextOptions& GetDefaultTextOptions() const override; //! Render the primitives that have been deferred - void RenderDeferredPrimitives(); + void RenderDeferredPrimitives() override; //! Specify whether to defer future primitives or render them right away - void SetDeferPrimitives(bool deferPrimitives); + void SetDeferPrimitives(bool deferPrimitives) override; //! Return whether future primitives will be deferred or rendered right away - bool GetDeferPrimitives(); + bool GetDeferPrimitives() override; //! Set sort key offset for following draws. - void SetSortKey(int64_t key); + void SetSortKey(int64_t key) override; private: @@ -254,6 +198,8 @@ protected: // types and constants { AZ::RHI::ShaderInputImageIndex m_imageInputIndex; AZ::RHI::ShaderInputConstantIndex m_viewProjInputIndex; + AZ::RPI::ShaderVariantId m_shaderOptionsClamp; + AZ::RPI::ShaderVariantId m_shaderOptionsWrap; }; class DeferredPrimitive @@ -278,6 +224,7 @@ protected: // types and constants AZ::Vector2 m_texCoords[4]; uint32 m_packedColors[4]; AZ::Data::Instance m_image; + bool m_clamp; RenderState m_renderState; }; @@ -370,259 +317,3 @@ protected: // attributes AZ::RHI::Ptr m_dynamicDraw; Draw2dShaderData m_shaderData; }; - -//////////////////////////////////////////////////////////////////////////////////////////////////// -//! Helper class for using the IDraw2d interface -//! -//! The Draw2dHelper class is an inline wrapper that provides the convenience feature of -//! automatically setting member options structures to their defaults and providing set functions. -class Draw2dHelper -{ -public: // member functions - - //! Start a section of 2D drawing function calls that will render to the default viewport - Draw2dHelper(bool deferCalls = false) - { - InitCommon(nullptr, deferCalls); - } - - //! Start a section of 2D drawing function calls that will render to the viewport - //! associated with the specified Draw2d object - Draw2dHelper(CDraw2d* draw2d, bool deferCalls = false) - { - InitCommon(draw2d, deferCalls); - } - - void InitCommon(CDraw2d* draw2d, bool deferCalls) - { - m_draw2d = draw2d; - - if (!m_draw2d) - { - // Set to default which is the game's draw 2d object - m_draw2d = GetDefaultDraw2d(); - } - - if (m_draw2d) - { - m_previousDeferCalls = m_draw2d->GetDeferPrimitives(); - m_draw2d->SetDeferPrimitives(deferCalls); - m_imageOptions = m_draw2d->GetDefaultImageOptions(); - m_textOptions = m_draw2d->GetDefaultTextOptions(); - } - } - - //! End a section of 2D drawing function calls. - ~Draw2dHelper() - { - if (m_draw2d) - { - m_draw2d->SetDeferPrimitives(m_previousDeferCalls); - } - } - - //! Draw a textured quad, optional rotation is counter-clockwise in degrees. - // - //! See IDraw2d:DrawImage for parameter descriptions - void DrawImage(AZ::Data::Instance image, AZ::Vector2 position, AZ::Vector2 size, float opacity = 1.0f, - float rotation = 0.0f, const AZ::Vector2* pivotPoint = nullptr, const AZ::Vector2* minMaxTexCoords = nullptr) - { - if (m_draw2d) - { - m_draw2d->DrawImage(image, position, size, opacity, rotation, pivotPoint, minMaxTexCoords, &m_imageOptions); - } - } - - //! Draw a textured quad where the position specifies the point specified by the alignment. - // - //! See IDraw2d:DrawImageAligned for parameter descriptions - void DrawImageAligned(AZ::Data::Instance image, AZ::Vector2 position, AZ::Vector2 size, - IDraw2d::HAlign horizontalAlignment, IDraw2d::VAlign verticalAlignment, - float opacity = 1.0f, float rotation = 0.0f, const AZ::Vector2* minMaxTexCoords = nullptr) - { - if (m_draw2d) - { - m_draw2d->DrawImageAligned(image, position, size, horizontalAlignment, verticalAlignment, - opacity, rotation, minMaxTexCoords, &m_imageOptions); - } - } - - //! Draw a textured quad where the position, color and uv of each point is specified explicitly - // - //! See IDraw2d:DrawQuad for parameter descriptions - void DrawQuad(AZ::Data::Instance image, CDraw2d::VertexPosColUV* verts, - IDraw2d::Rounding pixelRounding = IDraw2d::Rounding::Nearest, - const CDraw2d::RenderState& renderState = CDraw2d::RenderState{}) - { - if (m_draw2d) - { - m_draw2d->DrawQuad(image, verts, pixelRounding, renderState); - } - } - - //! Draw a line - // - //! See IDraw2d:DrawLine for parameter descriptions - void DrawLine(AZ::Vector2 start, AZ::Vector2 end, AZ::Color color, - IDraw2d::Rounding pixelRounding = IDraw2d::Rounding::Nearest, - const CDraw2d::RenderState& renderState = CDraw2d::RenderState{}) - { - if (m_draw2d) - { - m_draw2d->DrawLine(start, end, color, pixelRounding, renderState); - } - } - - //! Draw a line with a texture so it can be dotted or dashed - // - //! See IDraw2d:DrawLineTextured for parameter descriptions - void DrawLineTextured(AZ::Data::Instance image, CDraw2d::VertexPosColUV* verts, - IDraw2d::Rounding pixelRounding = IDraw2d::Rounding::Nearest, - const CDraw2d::RenderState& renderState = CDraw2d::RenderState{}) - { - if (m_draw2d) - { - m_draw2d->DrawLineTextured(image, verts, pixelRounding, renderState); - } - } - - //! Draw a rect outline with a texture - // - //! See IDraw2d:DrawRectOutlineTextured for parameter descriptions - void DrawRectOutlineTextured(AZ::Data::Instance image, - UiTransformInterface::RectPoints points, - AZ::Vector2 rightVec, - AZ::Vector2 downVec, - AZ::Color color, - uint32_t lineThickness = 0) - { - if (m_draw2d) - { - m_draw2d->DrawRectOutlineTextured(image, points, rightVec, downVec, color, lineThickness); - } - } - - //! Draw a text string. Only supports ASCII text. - // - //! See IDraw2d:DrawText for parameter descriptions - void DrawText(const char* textString, AZ::Vector2 position, float pointSize, float opacity = 1.0f) - { - if (m_draw2d) - { - m_draw2d->DrawText(textString, position, pointSize, opacity, &m_textOptions); - } - } - - //! Get the width and height (in pixels) that would be used to draw the given text string. - // - //! See IDraw2d:GetTextSize for parameter descriptions - AZ::Vector2 GetTextSize(const char* textString, float pointSize) - { - if (m_draw2d) - { - return m_draw2d->GetTextSize(textString, pointSize, &m_textOptions); - } - else - { - return AZ::Vector2(0, 0); - } - } - - // State management - - //! Set the blend mode used for images, default is GS_BLSRC_SRCALPHA|GS_BLDST_ONEMINUSSRCALPHA. - void SetImageBlendMode(const AZ::RHI::TargetBlendState& blendState) { m_imageOptions.m_renderState.m_blendState = blendState; } - - //! Set the color used for DrawImage and other image drawing. - void SetImageColor(AZ::Vector3 color) { m_imageOptions.color = color; } - - //! Set whether images are rounded to have the points on exact pixel boundaries. - void SetImagePixelRounding(IDraw2d::Rounding round) { m_imageOptions.pixelRounding = round; } - - //! Set the base state (that blend mode etc is combined with) used for images, default is GS_NODEPTHTEST. - void SetImageDepthState(const AZ::RHI::DepthState& depthState) { m_imageOptions.m_renderState.m_depthState = depthState; } - - //! Set the text font. - void SetTextFont(AZStd::string_view fontName) { m_textOptions.fontName = fontName; } - - //! Set the text font effect index. - void SetTextEffectIndex(unsigned int effectIndex) { m_textOptions.effectIndex = effectIndex; } - - //! Set the text color. - void SetTextColor(AZ::Vector3 color) { m_textOptions.color = color; } - - //! Set the text alignment. - void SetTextAlignment(IDraw2d::HAlign horizontalAlignment, IDraw2d::VAlign verticalAlignment) - { - m_textOptions.horizontalAlignment = horizontalAlignment; - m_textOptions.verticalAlignment = verticalAlignment; - } - - //! Set a drop shadow for text drawing. An alpha of zero disables drop shadow. - void SetTextDropShadow(AZ::Vector2 offset, AZ::Color color) - { - m_textOptions.dropShadowOffset = offset; - m_textOptions.dropShadowColor = color; - } - - //! Set a rotation for the text. The text rotates around its position (taking into account alignment). - void SetTextRotation(float rotation) - { - m_textOptions.rotation = rotation; - } - - //! Set wheter to enable depth test for the text - void SetTextDepthTestEnabled(bool enabled) - { - m_textOptions.depthTestEnabled = enabled; - } - -public: // static member functions - - //! Helper to get the default IDraw2d interface - static CDraw2d* GetDefaultDraw2d() - { - if (gEnv && gEnv->pLyShine) // LYSHINE_ATOM_TODO - remove pLyShine and use bus interface - { - IDraw2d* draw2d = gEnv->pLyShine->GetDraw2d(); - return reinterpret_cast(draw2d); - } - - return nullptr; - } - - //! Round the X and Y coordinates of a point using the given rounding policy - template - static T RoundXY(T value, IDraw2d::Rounding roundingType) - { - T result = value; - - switch (roundingType) - { - case IDraw2d::Rounding::None: - // nothing to do - break; - case IDraw2d::Rounding::Nearest: - result.SetX(floor(value.GetX() + 0.5f)); - result.SetY(floor(value.GetY() + 0.5f)); - break; - case IDraw2d::Rounding::Down: - result.SetX(floor(value.GetX())); - result.SetY(floor(value.GetY())); - break; - case IDraw2d::Rounding::Up: - result.SetX(ceil(value.GetX())); - result.SetY(ceil(value.GetY())); - break; - } - - return result; - } - -protected: // attributes - - CDraw2d::ImageOptions m_imageOptions; //!< image options are stored locally and updated by member functions - CDraw2d::TextOptions m_textOptions; //!< text options are stored locally and updated by member functions - CDraw2d* m_draw2d; - bool m_previousDeferCalls; -}; diff --git a/Gems/LyShine/Code/Include/LyShine/IDraw2d.h b/Gems/LyShine/Code/Include/LyShine/IDraw2d.h new file mode 100644 index 0000000000..620b8c23c9 --- /dev/null +++ b/Gems/LyShine/Code/Include/LyShine/IDraw2d.h @@ -0,0 +1,519 @@ +/* + * Copyright (c) Contributors to the Open 3D Engine Project. + * For complete copyright and license terms please see the LICENSE at the root of this distribution. + * + * SPDX-License-Identifier: Apache-2.0 OR MIT + * + */ +#pragma once + +#include +#include +#include +#include +#include +#include +#include +#include + +//////////////////////////////////////////////////////////////////////////////////////////////////// +//! Class for 2D drawing in screen space +// +//! The IDraw2d interface allows drawing images and text in 2D. +//! Positions and sizes are specified in pixels in the current 2D viewport. +//! The BeginDraw2d method should be called before calling the Draw methods to enter 2D mode +//! and the EndDraw2d method should be called after calling the Draw methods to exit 2D mode. +//! There is a helper class Draw2dHelper that encapsulates this in its constructor and destructor. +class IDraw2d +{ +public: // types + + //! Horizontal alignment can be used for both text and image drawing + enum class HAlign + { + Left, + Center, + Right, + }; + + //! Vertical alignment can be used for both text and image drawing + enum class VAlign + { + Top, + Center, + Bottom, + }; + + //! Used for specifying how to round positions to an exact pixel position for pixel-perfect rendering + enum class Rounding + { + None, + Nearest, + Down, + Up + }; + + enum + { + //! Limit imposed by FFont. This is the max number of characters including the null terminator. + MAX_TEXT_STRING_LENGTH = 1024, + }; + + struct RenderState + { + RenderState() + { + m_blendState.m_enable = true; + m_blendState.m_blendSource = AZ::RHI::BlendFactor::AlphaSource; + m_blendState.m_blendDest = AZ::RHI::BlendFactor::AlphaSourceInverse; + + m_depthState.m_enable = false; + } + + AZ::RHI::TargetBlendState m_blendState; + AZ::RHI::DepthState m_depthState; + }; + + //! Struct used to pass additional image options. + // + //! If this is not passed then the defaults are used + struct ImageOptions + { + AZ::Vector3 color = AZ::Vector3(1.0f, 1.0f, 1.0f); + Rounding pixelRounding = Rounding::Nearest; + bool m_clamp = false; + RenderState m_renderState; + }; + + //! Struct used to pass additional text options - mostly ones that do not change from call to call. + // + //! If this is not passed then the defaults below are used + struct TextOptions + { + 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 + VAlign verticalAlignment; //!< default is VAlign::Top + AZ::Vector2 dropShadowOffset; //!< default is (0,0), zero offset means no drop shadow is drawn + AZ::Color dropShadowColor; //!< default is (0,0,0,0), zero alpha means no drop shadow is drawn + float rotation; //!< default is 0 + bool depthTestEnabled; //!< default is false + }; + + //! Used to pass in arrays of vertices (e.g. to DrawQuad) + struct VertexPosColUV + { + VertexPosColUV() {} + VertexPosColUV(const AZ::Vector2& inPos, const AZ::Color& inColor, const AZ::Vector2& inUV) + { + position = inPos; + color = inColor; + uv = inUV; + } + + AZ::Vector2 position; //!< 2D position of vertex + AZ::Color color; //!< Float color + AZ::Vector2 uv; //!< Texture coordinate + }; + +public: // member functions + + //! Implement virtual destructor just for safety. + virtual ~IDraw2d() {} + + //! Draw a textured quad with the top left corner at the given position. + // + //! The image is drawn with the color specified by SetShapeColor and the opacity + //! passed as an argument. + //! If rotation is non-zero then the quad is rotated. If the pivot point is + //! provided then the points of the quad are rotated about that point, otherwise + //! they are rotated about the top left corner of the quad. + //! \param texId The texture ID returned by ITexture::GetTextureID() + //! \param position Position of the top left corner of the quad (before rotation) in pixels + //! \param size The width and height of the quad. Use texture width and height to avoid minification, + //! magnification or stretching (assuming the minMaxTexCoords are left to the default) + //! \param opacity The alpha value used when blending + //! \param rotation Angle of rotation in degrees counter-clockwise + //! \param pivotPoint The point about which the quad is rotated + //! \param minMaxTexCoords An optional two component array. The first component is the UV coord for the top left + //! point of the quad and the second is the UV coord of the bottom right point of the quad + //! \param imageOptions Optional struct specifying options that tend to be the same from call to call + virtual void DrawImage(AZ::Data::Instance image, AZ::Vector2 position, AZ::Vector2 size, float opacity = 1.0f, + float rotation = 0.0f, const AZ::Vector2* pivotPoint = nullptr, const AZ::Vector2* minMaxTexCoords = nullptr, + ImageOptions* imageOptions = nullptr) = 0; + + //! Draw a textured quad where the position specifies the point specified by the alignment. + // + //! Rotation is always around the position. + //! \param texId The texture ID returned by ITexture::GetTextureID() + //! \param position Position align point of the quad (before rotation) in pixels + //! \param size The width and height of the quad. Use texture width and height to avoid minification, + //! magnification or stretching (assuming the minMaxTexCoords are left to the default) + //! \param horizontalAlignment Specifies how the quad is horizontally aligned to the given position + //! \param verticalAlignment Specifies how the quad is vertically aligned to the given position + //! \param opacity The alpha value used when blending + //! \param rotation Angle of rotation in degrees counter-clockwise + //! \param minMaxTexCoords An optional two component array. The first component is the UV coord for the top left + //! point of the quad and the second is the UV coord of the bottom right point of the quad + //! \param imageOptions Optional struct specifying options that tend to be the same from call to call + virtual void DrawImageAligned(AZ::Data::Instance image, AZ::Vector2 position, AZ::Vector2 size, + HAlign horizontalAlignment, VAlign verticalAlignment, + float opacity = 1.0f, float rotation = 0.0f, const AZ::Vector2* minMaxTexCoords = nullptr, + ImageOptions* imageOptions = nullptr) = 0; + + //! Draw a textured quad where the position, color and uv of each point is specified explicitly + // + //! \param texId The texture ID returned by ITexture::GetTextureID() + //! \param verts An array of 4 vertices, in clockwise order (e.g. top left, top right, bottom right, bottom left) + //! \param pixelRounding Whether and how to round pixel coordinates + //! \param renderState Blend mode and depth state + virtual void DrawQuad(AZ::Data::Instance image, + VertexPosColUV* verts, + Rounding pixelRounding = Rounding::Nearest, + bool clamp = false, + const RenderState& renderState = RenderState{}) = 0; + + //! Draw a line + // + //! \param start The start position + //! \param end The end position + //! \param color The color of the line + //! \param pixelRounding Whether and how to round pixel coordinates + //! \param renderState Blend mode and depth state + virtual void DrawLine(AZ::Vector2 start, AZ::Vector2 end, AZ::Color color, + IDraw2d::Rounding pixelRounding = IDraw2d::Rounding::Nearest, + const RenderState& renderState = RenderState{}) = 0; + + //! Draw a line with a texture so it can be dotted or dashed + // + //! \param texId The texture ID returned by ITexture::GetTextureID() + //! \param verts An array of 2 vertices for the start and end points of the line + //! \param pixelRounding Whether and how to round pixel coordinates + //! \param renderState Blend mode and depth state + virtual void DrawLineTextured(AZ::Data::Instance image, + VertexPosColUV* verts, + IDraw2d::Rounding pixelRounding = IDraw2d::Rounding::Nearest, + const RenderState& renderState = RenderState{}) = 0; + //! Draw a text string. Only supports ASCII text. + // + //! The font and effect used to render the text are specified in the textOptions structure + //! \param textString A null terminated ASCII text string. May contain \n characters + //! \param position Position of the text in pixels. Alignment values in textOptions affect actual position + //! \param pointSize The size of the font to use + //! \param opacity The opacity (alpha value) to use to draw the text + //! \param textOptions Pointer to an options struct. If null the default options are used + virtual void DrawText(const char* textString, AZ::Vector2 position, float pointSize, + float opacity = 1.0f, TextOptions* textOptions = nullptr) = 0; + + //! Draw a rectangular outline with a texture + // + //! \param image The texture to be used for drawing the outline + //! \param points The rect's vertices (top left, top right, bottom right, bottom left) + //! \param rightVec Right vector. Specified because the rect's width/height could be 0 + //! \param downVec Down vector. Specified because the rect's width/height could be 0 + //! \param color The color of the outline + //! \param lineThickness The thickness in pixels of the outline. If 0, it will be based on image height + virtual void DrawRectOutlineTextured(AZ::Data::Instance image, + UiTransformInterface::RectPoints points, + AZ::Vector2 rightVec, + AZ::Vector2 downVec, + AZ::Color color, + uint32_t lineThickness = 0) = 0; + + //! Get the width and height (in pixels) that would be used to draw the given text string. + // + //! Pass the same parameter values that would be used to draw the string + virtual AZ::Vector2 GetTextSize(const char* textString, float pointSize, TextOptions* textOptions = nullptr) = 0; + + //! Get the width of the rendering viewport (in pixels). + virtual float GetViewportWidth() const = 0; + + //! Get the height of the rendering viewport (in pixels). + virtual float GetViewportHeight() const = 0; + + //! Get dpi scale factor + virtual float GetViewportDpiScalingFactor() const = 0; + + //! Get the default values that would be used if no image options were passed in + // + //! This is a convenient way to initialize the imageOptions struct + virtual const ImageOptions& GetDefaultImageOptions() const = 0; + + //! Get the default values that would be used if no text options were passed in + // + //! This is a convenient way to initialize the textOptions struct + virtual const TextOptions& GetDefaultTextOptions() const = 0; + + //! Render the primitives that have been deferred + virtual void RenderDeferredPrimitives() = 0; + + //! Specify whether to defer future primitives or render them right away + virtual void SetDeferPrimitives(bool deferPrimitives) = 0; + + //! Return whether future primitives will be deferred or rendered right away + virtual bool GetDeferPrimitives() = 0; + + //! Set sort key offset for following draws. + virtual void SetSortKey(int64_t key) = 0; +}; + +//////////////////////////////////////////////////////////////////////////////////////////////////// +//! Helper class for using the IDraw2d interface +//! +//! The Draw2dHelper class is an inline wrapper that provides the convenience feature of +//! automatically setting member options structures to their defaults and providing set functions. +class Draw2dHelper +{ +public: // member functions + + //! Start a section of 2D drawing function calls that will render to the default viewport + Draw2dHelper(bool deferCalls = false) + { + InitCommon(nullptr, deferCalls); + } + + //! Start a section of 2D drawing function calls that will render to the viewport + //! associated with the specified Draw2d object + Draw2dHelper(IDraw2d* draw2d, bool deferCalls = false) + { + InitCommon(draw2d, deferCalls); + } + + void InitCommon(IDraw2d* draw2d, bool deferCalls) + { + m_draw2d = draw2d; + + if (!m_draw2d) + { + // Set to default which is the game's draw 2d object + m_draw2d = GetDefaultDraw2d(); + } + + if (m_draw2d) + { + m_previousDeferCalls = m_draw2d->GetDeferPrimitives(); + m_draw2d->SetDeferPrimitives(deferCalls); + m_imageOptions = m_draw2d->GetDefaultImageOptions(); + m_textOptions = m_draw2d->GetDefaultTextOptions(); + } + } + + //! End a section of 2D drawing function calls. + ~Draw2dHelper() + { + if (m_draw2d) + { + m_draw2d->SetDeferPrimitives(m_previousDeferCalls); + } + } + + //! Draw a textured quad, optional rotation is counter-clockwise in degrees. + // + //! See IDraw2d:DrawImage for parameter descriptions + void DrawImage(AZ::Data::Instance image, AZ::Vector2 position, AZ::Vector2 size, float opacity = 1.0f, + float rotation = 0.0f, const AZ::Vector2* pivotPoint = nullptr, const AZ::Vector2* minMaxTexCoords = nullptr) + { + if (m_draw2d) + { + m_draw2d->DrawImage(image, position, size, opacity, rotation, pivotPoint, minMaxTexCoords, &m_imageOptions); + } + } + + //! Draw a textured quad where the position specifies the point specified by the alignment. + // + //! See IDraw2d:DrawImageAligned for parameter descriptions + void DrawImageAligned(AZ::Data::Instance image, AZ::Vector2 position, AZ::Vector2 size, + IDraw2d::HAlign horizontalAlignment, IDraw2d::VAlign verticalAlignment, + float opacity = 1.0f, float rotation = 0.0f, const AZ::Vector2* minMaxTexCoords = nullptr) + { + if (m_draw2d) + { + m_draw2d->DrawImageAligned(image, position, size, horizontalAlignment, verticalAlignment, + opacity, rotation, minMaxTexCoords, &m_imageOptions); + } + } + + //! Draw a textured quad where the position, color and uv of each point is specified explicitly + // + //! See IDraw2d:DrawQuad for parameter descriptions + void DrawQuad(AZ::Data::Instance image, IDraw2d::VertexPosColUV* verts, + IDraw2d::Rounding pixelRounding = IDraw2d::Rounding::Nearest, + bool clamp = false, + const IDraw2d::RenderState& renderState = IDraw2d::RenderState{}) + { + if (m_draw2d) + { + m_draw2d->DrawQuad(image, verts, pixelRounding, clamp, renderState); + } + } + + //! Draw a line + // + //! See IDraw2d:DrawLine for parameter descriptions + void DrawLine(AZ::Vector2 start, AZ::Vector2 end, AZ::Color color, + IDraw2d::Rounding pixelRounding = IDraw2d::Rounding::Nearest, + const IDraw2d::RenderState& renderState = IDraw2d::RenderState{}) + { + if (m_draw2d) + { + m_draw2d->DrawLine(start, end, color, pixelRounding, renderState); + } + } + + //! Draw a line with a texture so it can be dotted or dashed + // + //! See IDraw2d:DrawLineTextured for parameter descriptions + void DrawLineTextured(AZ::Data::Instance image, IDraw2d::VertexPosColUV* verts, + IDraw2d::Rounding pixelRounding = IDraw2d::Rounding::Nearest, + const IDraw2d::RenderState& renderState = IDraw2d::RenderState{}) + { + if (m_draw2d) + { + m_draw2d->DrawLineTextured(image, verts, pixelRounding, renderState); + } + } + + //! Draw a rect outline with a texture + // + //! See IDraw2d:DrawRectOutlineTextured for parameter descriptions + void DrawRectOutlineTextured(AZ::Data::Instance image, + UiTransformInterface::RectPoints points, + AZ::Vector2 rightVec, + AZ::Vector2 downVec, + AZ::Color color, + uint32_t lineThickness = 0) + { + if (m_draw2d) + { + m_draw2d->DrawRectOutlineTextured(image, points, rightVec, downVec, color, lineThickness); + } + } + + //! Draw a text string. Only supports ASCII text. + // + //! See IDraw2d:DrawText for parameter descriptions + void DrawText(const char* textString, AZ::Vector2 position, float pointSize, float opacity = 1.0f) + { + if (m_draw2d) + { + m_draw2d->DrawText(textString, position, pointSize, opacity, &m_textOptions); + } + } + + //! Get the width and height (in pixels) that would be used to draw the given text string. + // + //! See IDraw2d:GetTextSize for parameter descriptions + AZ::Vector2 GetTextSize(const char* textString, float pointSize) + { + if (m_draw2d) + { + return m_draw2d->GetTextSize(textString, pointSize, &m_textOptions); + } + else + { + return AZ::Vector2(0, 0); + } + } + + // State management + + //! Set the blend mode used for images, default is GS_BLSRC_SRCALPHA|GS_BLDST_ONEMINUSSRCALPHA. + void SetImageBlendMode(const AZ::RHI::TargetBlendState& blendState) { m_imageOptions.m_renderState.m_blendState = blendState; } + + //! Set the color used for DrawImage and other image drawing. + void SetImageColor(AZ::Vector3 color) { m_imageOptions.color = color; } + + //! Set whether images are rounded to have the points on exact pixel boundaries. + void SetImagePixelRounding(IDraw2d::Rounding round) { m_imageOptions.pixelRounding = round; } + + //! Set the base state (that blend mode etc is combined with) used for images, default is GS_NODEPTHTEST. + void SetImageDepthState(const AZ::RHI::DepthState& depthState) { m_imageOptions.m_renderState.m_depthState = depthState; } + + //! Set image clamp mode + void SetImageClamp(bool clamp) { m_imageOptions.m_clamp = clamp; } + + //! Set the text font. + void SetTextFont(AZStd::string_view fontName) { m_textOptions.fontName = fontName; } + + //! Set the text font effect index. + void SetTextEffectIndex(unsigned int effectIndex) { m_textOptions.effectIndex = effectIndex; } + + //! Set the text color. + void SetTextColor(AZ::Vector3 color) { m_textOptions.color = color; } + + //! Set the text alignment. + void SetTextAlignment(IDraw2d::HAlign horizontalAlignment, IDraw2d::VAlign verticalAlignment) + { + m_textOptions.horizontalAlignment = horizontalAlignment; + m_textOptions.verticalAlignment = verticalAlignment; + } + + //! Set a drop shadow for text drawing. An alpha of zero disables drop shadow. + void SetTextDropShadow(AZ::Vector2 offset, AZ::Color color) + { + m_textOptions.dropShadowOffset = offset; + m_textOptions.dropShadowColor = color; + } + + //! Set a rotation for the text. The text rotates around its position (taking into account alignment). + void SetTextRotation(float rotation) + { + m_textOptions.rotation = rotation; + } + + //! Set wheter to enable depth test for the text + void SetTextDepthTestEnabled(bool enabled) + { + m_textOptions.depthTestEnabled = enabled; + } + +public: // static member functions + + //! Helper to get the default IDraw2d interface + static IDraw2d* GetDefaultDraw2d() + { + if (gEnv && gEnv->pLyShine) // [LYSHINE_ATOM_TODO][GHI #3569] Remove LyShine global interface pointer from legacy global environment + { + IDraw2d* draw2d = gEnv->pLyShine->GetDraw2d(); + return reinterpret_cast(draw2d); + } + + return nullptr; + } + + //! Round the X and Y coordinates of a point using the given rounding policy + template + static T RoundXY(T value, IDraw2d::Rounding roundingType) + { + T result = value; + + switch (roundingType) + { + case IDraw2d::Rounding::None: + // nothing to do + break; + case IDraw2d::Rounding::Nearest: + result.SetX(floor(value.GetX() + 0.5f)); + result.SetY(floor(value.GetY() + 0.5f)); + break; + case IDraw2d::Rounding::Down: + result.SetX(floor(value.GetX())); + result.SetY(floor(value.GetY())); + break; + case IDraw2d::Rounding::Up: + result.SetX(ceil(value.GetX())); + result.SetY(ceil(value.GetY())); + break; + } + + return result; + } + +protected: // attributes + + IDraw2d::ImageOptions m_imageOptions; //!< image options are stored locally and updated by member functions + IDraw2d::TextOptions m_textOptions; //!< text options are stored locally and updated by member functions + IDraw2d* m_draw2d; + bool m_previousDeferCalls; +}; diff --git a/Code/Legacy/CryCommon/LyShine/ILyShine.h b/Gems/LyShine/Code/Include/LyShine/ILyShine.h similarity index 100% rename from Code/Legacy/CryCommon/LyShine/ILyShine.h rename to Gems/LyShine/Code/Include/LyShine/ILyShine.h diff --git a/Gems/LyShine/Code/Include/LyShine/IRenderGraph.h b/Gems/LyShine/Code/Include/LyShine/IRenderGraph.h new file mode 100644 index 0000000000..e67e234457 --- /dev/null +++ b/Gems/LyShine/Code/Include/LyShine/IRenderGraph.h @@ -0,0 +1,96 @@ +/* + * Copyright (c) Contributors to the Open 3D Engine Project. + * For complete copyright and license terms please see the LICENSE at the root of this distribution. + * + * SPDX-License-Identifier: Apache-2.0 OR MIT + * + */ +#pragma once + +#include +#include + +#include + +namespace AZ +{ + class Color; + class Vector2; +} + +namespace LyShine +{ + //////////////////////////////////////////////////////////////////////////////////////////////////// + // UI visual components use this interface to add primitives to the render graph, which is how the + // UI gets rendered. + // There is one render graph per UI canvas. The render graph (like a display list) is rebuilt when + // any visual change occurs on the canvas. + class IRenderGraph + { + public: + + //! Virtual destructor + virtual ~IRenderGraph() {} + + //---- Functions for creating and adding primitives to the render graph ---- + + //! Begin the setup of a mask render node, primitives added between this call and StartChildrenForMask define the mask + virtual void BeginMask(bool isMaskingEnabled, bool useAlphaTest, bool drawBehind, bool drawInFront) = 0; + + //! Start defining the children (masked primitives) of a mask + virtual void StartChildrenForMask() = 0; + + //! End the setup of a mask render node, this marks the end of adding child primitives + virtual void EndMask() = 0; + + //! Begin rendering to a texture + virtual void BeginRenderToTexture(AZ::Data::Instance attachmentImage, + const AZ::Vector2& viewportTopLeft, + const AZ::Vector2& viewportSize, + const AZ::Color& clearColor) = 0; + + //! End rendering to a texture + virtual void EndRenderToTexture() = 0; + + //! Add an indexed triangle list primitive to the render graph with given render state + virtual void AddPrimitive(LyShine::UiPrimitive* primitive, const AZ::Data::Instance& texture, + bool isClampTextureMode, bool isTextureSRGB, bool isTexturePremultipliedAlpha, BlendMode blendMode) = 0; + + //! Add an indexed triangle list primitive to the render graph which will use maskTexture as an alpha (gradient) mask + virtual void AddAlphaMaskPrimitive(LyShine::UiPrimitive* primitive, + AZ::Data::Instance contentAttachmentImage, + AZ::Data::Instance maskAttachmentImage, + bool isClampTextureMode, + bool isTextureSRGB, + bool isTexturePremultipliedAlpha, + BlendMode blendMode) = 0; + + //! Get a dynamic quad primitive that can be added as an image primitive to the render graph + //! The graph handles the allocation of this DynUiPrimitive and deletes it when the graph is reset + //! This can be used if the UI component doesn't want to own the storage of the primitive. Used infrequently, + //! e.g. for the selection rect on a text component. + virtual LyShine::UiPrimitive* GetDynamicQuadPrimitive(const AZ::Vector2* positions, uint32 packedColor) = 0; + + //---- Functions for supporting masking (used during creation of the graph, not rendering ) ---- + + //! Get flag that indicates we are rendering into a mask. Used to avoid masks on child mask elements. + virtual bool IsRenderingToMask() const = 0; + + //! Set flag that we are rendering into a mask. Used to avoid masks on child mask elements. + virtual void SetIsRenderingToMask(bool isRenderingToMask) = 0; + + //---- Functions for supporting fading (used during creation of the graph, not rendering ) ---- + + //! Push an alpha fade, this is multiplied with any existing alpha fade from parents + virtual void PushAlphaFade(float alphaFadeValue) = 0; + + //! Push a new alpha fade value, this replaces any existing alpha fade + virtual void PushOverrideAlphaFade(float alphaFadeValue) = 0; + + //! Pop an alpha fade off the stack + virtual void PopAlphaFade() = 0; + + //! Get the current alpha fade value + virtual float GetAlphaFade() const = 0; + }; +} diff --git a/Code/Legacy/CryCommon/LyShine/ISprite.h b/Gems/LyShine/Code/Include/LyShine/ISprite.h similarity index 96% rename from Code/Legacy/CryCommon/LyShine/ISprite.h rename to Gems/LyShine/Code/Include/LyShine/ISprite.h index 373024d2db..fdb4b88f22 100644 --- a/Code/Legacy/CryCommon/LyShine/ISprite.h +++ b/Gems/LyShine/Code/Include/LyShine/ISprite.h @@ -11,6 +11,15 @@ #include #include #include +#include + +namespace AZ +{ + namespace RPI + { + class Image; + } +} //////////////////////////////////////////////////////////////////////////////////////////////////// //! A sprite is a texture with extra information about how it behaves for 2D drawing @@ -135,4 +144,6 @@ public: // member functions //! Returns true if this sprite is configured as a sprite-sheet, false otherwise virtual bool IsSpriteSheet() const = 0; + + virtual AZ::Data::Instance GetImage() = 0; }; diff --git a/Code/Legacy/CryCommon/LyShine/UiBase.h b/Gems/LyShine/Code/Include/LyShine/UiBase.h similarity index 100% rename from Code/Legacy/CryCommon/LyShine/UiBase.h rename to Gems/LyShine/Code/Include/LyShine/UiBase.h diff --git a/Code/Legacy/CryCommon/LyShine/UiComponentTypes.h b/Gems/LyShine/Code/Include/LyShine/UiComponentTypes.h similarity index 100% rename from Code/Legacy/CryCommon/LyShine/UiComponentTypes.h rename to Gems/LyShine/Code/Include/LyShine/UiComponentTypes.h diff --git a/Code/Editor/Plugins/EditorCommon/UiEditorDLLBus.h b/Gems/LyShine/Code/Include/LyShine/UiEditorDLLBus.h similarity index 100% rename from Code/Editor/Plugins/EditorCommon/UiEditorDLLBus.h rename to Gems/LyShine/Code/Include/LyShine/UiEditorDLLBus.h diff --git a/Code/Legacy/CryCommon/LyShine/UiEntityContext.h b/Gems/LyShine/Code/Include/LyShine/UiEntityContext.h similarity index 100% rename from Code/Legacy/CryCommon/LyShine/UiEntityContext.h rename to Gems/LyShine/Code/Include/LyShine/UiEntityContext.h diff --git a/Code/Legacy/CryCommon/LyShine/UiLayoutCellBase.h b/Gems/LyShine/Code/Include/LyShine/UiLayoutCellBase.h similarity index 100% rename from Code/Legacy/CryCommon/LyShine/UiLayoutCellBase.h rename to Gems/LyShine/Code/Include/LyShine/UiLayoutCellBase.h diff --git a/Gems/LyShine/Code/Include/LyShine/UiRenderFormats.h b/Gems/LyShine/Code/Include/LyShine/UiRenderFormats.h new file mode 100644 index 0000000000..632642856e --- /dev/null +++ b/Gems/LyShine/Code/Include/LyShine/UiRenderFormats.h @@ -0,0 +1,53 @@ +/* + * Copyright (c) Contributors to the Open 3D Engine Project. + * For complete copyright and license terms please see the LICENSE at the root of this distribution. + * + * SPDX-License-Identifier: Apache-2.0 OR MIT + * + */ +#pragma once + +#include + +namespace LyShine +{ + struct UCol + { + union + { + uint32 dcolor; + uint8 bcolor[4]; + + struct + { + uint8 b, g, r, a; + }; + struct + { + uint8 z, y, x, w; + }; + }; + }; + + struct UiPrimitiveVertex + { + Vec2 xy; + UCol color; + Vec2 st; + uint8 texIndex; + uint8 texHasColorChannel; + uint8 texIndex2; + uint8 pad; + }; + + using UiIndice = AZ::u16; + + struct UiPrimitive : public AZStd::intrusive_slist_node + { + UiPrimitiveVertex* m_vertices = nullptr; + uint16* m_indices = nullptr; + int m_numVertices = 0; + int m_numIndices = 0; + }; + using UiPrimitiveList = AZStd::intrusive_slist>; +}; diff --git a/Code/Legacy/CryCommon/LyShine/UiSerializeHelpers.h b/Gems/LyShine/Code/Include/LyShine/UiSerializeHelpers.h similarity index 100% rename from Code/Legacy/CryCommon/LyShine/UiSerializeHelpers.h rename to Gems/LyShine/Code/Include/LyShine/UiSerializeHelpers.h diff --git a/Gems/LyShine/Code/Source/Animation/AzEntityNode.cpp b/Gems/LyShine/Code/Source/Animation/AzEntityNode.cpp index 2b31726d3e..48035af9cc 100644 --- a/Gems/LyShine/Code/Source/Animation/AzEntityNode.cpp +++ b/Gems/LyShine/Code/Source/Animation/AzEntityNode.cpp @@ -16,8 +16,6 @@ #include "PNoise3.h" #include "AnimSequence.h" -#include - #include #include #include diff --git a/Gems/LyShine/Code/Source/Animation/UiAnimationSystem.cpp b/Gems/LyShine/Code/Source/Animation/UiAnimationSystem.cpp index ab45042b4c..c8818836d6 100644 --- a/Gems/LyShine/Code/Source/Animation/UiAnimationSystem.cpp +++ b/Gems/LyShine/Code/Source/Animation/UiAnimationSystem.cpp @@ -22,9 +22,6 @@ #include #include #include -#include -#include -#include ////////////////////////////////////////////////////////////////////////// namespace @@ -98,7 +95,7 @@ UiAnimationSystem::UiAnimationSystem() m_pCallback = NULL; m_bPaused = false; m_sequenceStopBehavior = eSSB_GotoEndTime; - m_lastUpdateTime.SetValue(0); + m_lastUpdateTime = AZ::Time::ZeroTimeUs; m_nextSequenceId = 1; } @@ -615,20 +612,6 @@ bool UiAnimationSystem::InternalStopSequence(IUiAnimSequence* pSequence, bool bA ////////////////////////////////////////////////////////////////////////// bool UiAnimationSystem::AbortSequence(IUiAnimSequence* pSequence, bool bLeaveTime) { - assert(pSequence); - - // to avoid any camera blending after aborting a cut scene - IViewSystem* pViewSystem = gEnv->pSystem->GetIViewSystem(); - if (pViewSystem) - { - pViewSystem->SetBlendParams(0, 0, 0); - IView* pView = pViewSystem->GetActiveView(); - if (pView) - { - pView->ResetBlending(); - } - } - return InternalStopSequence(pSequence, true, !bLeaveTime); } @@ -742,24 +725,27 @@ void UiAnimationSystem::StillUpdate() ////////////////////////////////////////////////////////////////////////// void UiAnimationSystem::ShowPlayedSequencesDebug() { - //f32 green[4] = {0, 1, 0, 1}; - //f32 purple[4] = {1, 0, 1, 1}; - //f32 white[4] = {1, 1, 1, 1}; + constexpr f32 green[4] = {0, 1, 0, 1}; + constexpr f32 purple[4] = {1, 0, 1, 1}; + constexpr f32 white[4] = {1, 1, 1, 1}; float y = 10.0f; AZStd::vector names; + //TODO: needs an implementation + auto Draw2dLabel = [](float /*x*/,float /*y*/,float /*depth*/,const f32* /*color*/,bool /*center*/, const char* /*fmt*/, ...) {}; + for (PlayingSequences::iterator it = m_playingSequences.begin(); it != m_playingSequences.end(); ++it) { PlayingUIAnimSequence& playingSequence = *it; - if (playingSequence.sequence == NULL) + if (playingSequence.sequence == nullptr) { continue; } AZ_Assert(false,"gEnv->pRenderer is always null so it can't be used here"); - //const char* fullname = playingSequence.sequence->GetName(); - //gEnv->pRenderer->Draw2dLabel(1.0f, y, 1.3f, green, false, "Sequence %s : %f (x %f)", fullname, playingSequence.currentTime, playingSequence.currentSpeed); +const char* fullname = playingSequence.sequence->GetName(); +Draw2dLabel(1.0f, y, 1.3f, green, false, "Sequence %s : %f (x %f)", fullname, playingSequence.currentTime, playingSequence.currentSpeed); y += 16.0f; @@ -778,7 +764,7 @@ void UiAnimationSystem::ShowPlayedSequencesDebug() names.push_back(name); } - //gEnv->pRenderer->Draw2dLabel((21.0f + 100.0f * i), ((i % 2) ? (y + 8.0f) : y), 1.0f, alreadyThere ? white : purple, false, "%s", name.c_str()); +Draw2dLabel((21.0f + 100.0f * i), ((i % 2) ? (y + 8.0f) : y), 1.0f, alreadyThere ? white : purple, false, "%s", name.c_str()); } y += 32.0f; @@ -808,7 +794,7 @@ void UiAnimationSystem::UpdateInternal(const float deltaTime, const bool bPreUpd } // don't update more than once if dt==0.0 - CTimeValue curTime = gEnv->pTimer->GetFrameStartTime(); + const AZ::TimeUs curTime = AZ::GetElapsedTimeUs(); if (deltaTime == 0.0f && curTime == m_lastUpdateTime && !gEnv->IsEditor()) { return; diff --git a/Gems/LyShine/Code/Source/Animation/UiAnimationSystem.h b/Gems/LyShine/Code/Source/Animation/UiAnimationSystem.h index c270d9ca60..cd51cd51d0 100644 --- a/Gems/LyShine/Code/Source/Animation/UiAnimationSystem.h +++ b/Gems/LyShine/Code/Source/Animation/UiAnimationSystem.h @@ -12,6 +12,7 @@ #include #include #include +#include struct PlayingUIAnimSequence { @@ -164,7 +165,7 @@ private: IUiAnimationCallback* m_pCallback; - CTimeValue m_lastUpdateTime; + AZ::TimeUs m_lastUpdateTime; using Sequences = AZStd::vector >; Sequences m_sequences; diff --git a/Gems/LyShine/Code/Source/Draw2d.cpp b/Gems/LyShine/Code/Source/Draw2d.cpp index 3476c530b2..2838ed4877 100644 --- a/Gems/LyShine/Code/Source/Draw2d.cpp +++ b/Gems/LyShine/Code/Source/Draw2d.cpp @@ -5,9 +5,9 @@ * SPDX-License-Identifier: Apache-2.0 OR MIT * */ -#include // for SVF_P3F_C4B_T2F which will be removed in a coming PR #include +#include #include "LyShinePassDataBus.h" #include @@ -22,15 +22,23 @@ #include #include -//////////////////////////////////////////////////////////////////////////////////////////////////// -// LOCAL STATIC FUNCTIONS -//////////////////////////////////////////////////////////////////////////////////////////////////// - -//////////////////////////////////////////////////////////////////////////////////////////////////// -// Color to u32 => 0xAARRGGBB -static AZ::u32 PackARGB8888(const AZ::Color& color) +namespace { - return (color.GetA8() << 24) | (color.GetR8() << 16) | (color.GetG8() << 8) | color.GetB8(); + //////////////////////////////////////////////////////////////////////////////////////////////////// + // Color to u32 => 0xAARRGGBB + AZ::u32 PackARGB8888(const AZ::Color& color) + { + return (color.GetA8() << 24) | (color.GetR8() << 16) | (color.GetG8() << 8) | color.GetB8(); + } + + //////////////////////////////////////////////////////////////////////////////////////////////////// + // Vertex format for Dynamic Draw Context + struct Draw2dVertex + { + Vec3 xyz; + LyShine::UCol color; + Vec2 st; + }; } //////////////////////////////////////////////////////////////////////////////////////////////////// @@ -95,10 +103,7 @@ void CDraw2d::OnBootstrapSceneReady(AZ::RPI::Scene* bootstrapScene) LyShinePassRequestBus::EventResult(uiCanvasPass, sceneId, &LyShinePassRequestBus::Events::GetUiCanvasPass); m_dynamicDraw = AZ::RPI::DynamicDrawInterface::Get()->CreateDynamicDrawContext(); - AZ::RPI::ShaderOptionList shaderOptions; - shaderOptions.push_back(AZ::RPI::ShaderOption(AZ::Name("o_useColorChannels"), AZ::Name("true"))); - shaderOptions.push_back(AZ::RPI::ShaderOption(AZ::Name("o_clamp"), AZ::Name("false"))); - m_dynamicDraw->InitShaderWithVariant(shader, &shaderOptions); + m_dynamicDraw->InitShader(shader); m_dynamicDraw->InitVertexFormat( { {"POSITION", AZ::RHI::Format::R32G32B32_FLOAT}, {"COLOR", AZ::RHI::Format::B8G8R8A8_UNORM}, @@ -117,17 +122,34 @@ void CDraw2d::OnBootstrapSceneReady(AZ::RPI::Scene* bootstrapScene) } m_dynamicDraw->EndInit(); - // Cache draw srg input indices for later use - static const char textureIndexName[] = "m_texture"; - static const char worldToProjIndexName[] = "m_worldToProj"; - AZ::Data::Instance drawSrg = m_dynamicDraw->NewDrawSrg(); - const AZ::RHI::ShaderResourceGroupLayout* layout = drawSrg->GetLayout(); - m_shaderData.m_imageInputIndex = layout->FindShaderInputImageIndex(AZ::Name(textureIndexName)); - AZ_Error("Draw2d", m_shaderData.m_imageInputIndex.IsValid(), "Failed to find shader input constant %s.", - textureIndexName); - m_shaderData.m_viewProjInputIndex = layout->FindShaderInputConstantIndex(AZ::Name(worldToProjIndexName)); - AZ_Error("Draw2d", m_shaderData.m_viewProjInputIndex.IsValid(), "Failed to find shader input constant %s.", - worldToProjIndexName); + // Check that the dynamic draw context has been initialized appropriately + if (m_dynamicDraw->IsReady()) + { + // Cache draw srg input indices for later use + static const char textureIndexName[] = "m_texture"; + static const char worldToProjIndexName[] = "m_worldToProj"; + AZ::Data::Instance drawSrg = m_dynamicDraw->NewDrawSrg(); + if (drawSrg) + { + const AZ::RHI::ShaderResourceGroupLayout* layout = drawSrg->GetLayout(); + m_shaderData.m_imageInputIndex = layout->FindShaderInputImageIndex(AZ::Name(textureIndexName)); + AZ_Error("Draw2d", m_shaderData.m_imageInputIndex.IsValid(), "Failed to find shader input constant %s.", + textureIndexName); + m_shaderData.m_viewProjInputIndex = layout->FindShaderInputConstantIndex(AZ::Name(worldToProjIndexName)); + AZ_Error("Draw2d", m_shaderData.m_viewProjInputIndex.IsValid(), "Failed to find shader input constant %s.", + worldToProjIndexName); + } + + // Cache shader variants that will be used + AZ::RPI::ShaderOptionList shaderOptionsClamp; + shaderOptionsClamp.push_back(AZ::RPI::ShaderOption(AZ::Name("o_clamp"), AZ::Name("true"))); + shaderOptionsClamp.push_back(AZ::RPI::ShaderOption(AZ::Name("o_useColorChannels"), AZ::Name("true"))); + m_shaderData.m_shaderOptionsClamp = m_dynamicDraw->UseShaderVariant(shaderOptionsClamp); + AZ::RPI::ShaderOptionList shaderOptionsWrap; + shaderOptionsWrap.push_back(AZ::RPI::ShaderOption(AZ::Name("o_clamp"), AZ::Name("false"))); + shaderOptionsWrap.push_back(AZ::RPI::ShaderOption(AZ::Name("o_useColorChannels"), AZ::Name("true"))); + m_shaderData.m_shaderOptionsWrap = m_dynamicDraw->UseShaderVariant(shaderOptionsWrap); + } } //////////////////////////////////////////////////////////////////////////////////////////////////// @@ -173,6 +195,8 @@ void CDraw2d::DrawImage(AZ::Data::Instance image, AZ::Vector2 po quad.m_image = image; + quad.m_clamp = actualImageOptions->m_clamp; + // add the blendMode flags to the base state quad.m_renderState = actualImageOptions->m_renderState; @@ -198,7 +222,7 @@ void CDraw2d::DrawImageAligned(AZ::Data::Instance image, AZ::Vec //////////////////////////////////////////////////////////////////////////////////////////////////// void CDraw2d::DrawQuad(AZ::Data::Instance image, VertexPosColUV* verts, Rounding pixelRounding, - const CDraw2d::RenderState& renderState) + bool clamp, const CDraw2d::RenderState& renderState) { // define quad DeferredQuad quad; @@ -209,6 +233,7 @@ void CDraw2d::DrawQuad(AZ::Data::Instance image, VertexPosColUV* quad.m_packedColors[i] = PackARGB8888(verts[i].color); } quad.m_image = image; + quad.m_clamp = clamp; // add the blendMode flags to the base state quad.m_renderState = renderState; @@ -444,6 +469,12 @@ float CDraw2d::GetViewportHeight() const return viewHeight; } +//////////////////////////////////////////////////////////////////////////////////////////////////// +float CDraw2d::GetViewportDpiScalingFactor() const +{ + return GetViewportContext()->GetDpiScalingFactor(); +} + //////////////////////////////////////////////////////////////////////////////////////////////////// const CDraw2d::ImageOptions& CDraw2d::GetDefaultImageOptions() const { @@ -497,7 +528,7 @@ void CDraw2d::SetSortKey(int64_t key) AZ::Vector2 CDraw2d::Align(AZ::Vector2 position, AZ::Vector2 size, HAlign horizontalAlignment, VAlign verticalAlignment) { - AZ::Vector2 result; + AZ::Vector2 result = AZ::Vector2::CreateZero(); switch (horizontalAlignment) { case HAlign::Left: @@ -739,7 +770,7 @@ void CDraw2d::DeferredQuad::Draw(AZ::RHI::Ptr dynam const float z = 1.0f; // depth test disabled, if writing Z this will write at far plane - SVF_P3F_C4B_T2F vertices[NUM_VERTS]; + Draw2dVertex vertices[NUM_VERTS]; const int vertIndex[NUM_VERTS] = { 0, 1, 3, 3, 1, 2 }; @@ -752,6 +783,8 @@ void CDraw2d::DeferredQuad::Draw(AZ::RHI::Ptr dynam vertices[i].st = Vec2(m_texCoords[j].GetX(), m_texCoords[j].GetY()); } + dynamicDraw->SetShaderVariant(m_clamp ? shaderData.m_shaderOptionsClamp : shaderData.m_shaderOptionsWrap); + // Set up per draw SRG AZ::Data::Instance drawSrg = dynamicDraw->NewDrawSrg(); @@ -804,7 +837,7 @@ void CDraw2d::DeferredLine::Draw(AZ::RHI::Ptr dynam const int32 NUM_VERTS = 2; - SVF_P3F_C4B_T2F vertices[NUM_VERTS]; + Draw2dVertex vertices[NUM_VERTS]; for (int i = 0; i < NUM_VERTS; ++i) { @@ -857,9 +890,9 @@ void CDraw2d::DeferredRectOutline::Draw(AZ::RHI::PtrSetPrimitiveType(AZ::RHI::PrimitiveTopology::TriangleList); dynamicDraw->DrawIndexed(vertices, NUM_VERTS, indices, NUM_INDICES, AZ::RHI::IndexFormat::Uint16, drawSrg); - } //////////////////////////////////////////////////////////////////////////////////////////////////// diff --git a/Gems/LyShine/Code/Source/LyShine.cpp b/Gems/LyShine/Code/Source/LyShine.cpp index 19c6e4281e..683d72f4ab 100644 --- a/Gems/LyShine/Code/Source/LyShine.cpp +++ b/Gems/LyShine/Code/Source/LyShine.cpp @@ -520,12 +520,6 @@ void CLyShine::OnLoadScreenUnloaded() m_uiCanvasManager->OnLoadScreenUnloaded(); } -//////////////////////////////////////////////////////////////////////////////////////////////////// -void CLyShine::OnDebugDraw() -{ - LyShineDebug::RenderDebug(); -} - //////////////////////////////////////////////////////////////////////////////////////////////////// void CLyShine::IncrementVisibleCounter() { @@ -674,7 +668,7 @@ void CLyShine::LoadUiCursor() { if (!m_cursorImagePathToLoad.empty()) { - m_uiCursorTexture = CDraw2d::LoadTexture(m_cursorImagePathToLoad); // LYSHINE_ATOM_TODO - add clamp option to draw2d and set cursor to clamp + m_uiCursorTexture = CDraw2d::LoadTexture(m_cursorImagePathToLoad); m_cursorImagePathToLoad.clear(); } } @@ -697,7 +691,13 @@ void CLyShine::RenderUiCursor() AZ::RHI::Size cursorSize = m_uiCursorTexture->GetDescriptor().m_size; const AZ::Vector2 dimensions(aznumeric_cast(cursorSize.m_width), aznumeric_cast(cursorSize.m_height)); - m_draw2d->DrawImage(m_uiCursorTexture, position, dimensions); + CDraw2d::ImageOptions imageOptions; + imageOptions.m_clamp = true; + const float opacity = 1.0f; + const float rotation = 0.0f; + const AZ::Vector2* pivotPoint = nullptr; + const AZ::Vector2* minMaxTexCoords = nullptr; + m_draw2d->DrawImage(m_uiCursorTexture, position, dimensions, opacity, rotation, pivotPoint, minMaxTexCoords, &imageOptions); } #ifndef _RELEASE diff --git a/Gems/LyShine/Code/Source/LyShine.h b/Gems/LyShine/Code/Source/LyShine.h index 065ad59f80..82f902a9f8 100644 --- a/Gems/LyShine/Code/Source/LyShine.h +++ b/Gems/LyShine/Code/Source/LyShine.h @@ -7,7 +7,6 @@ */ #pragma once -#include #include #include #include @@ -38,7 +37,6 @@ struct IConsoleCmdArgs; //! CLyShine is the full implementation of the ILyShine interface class CLyShine : public ILyShine - , public IRenderDebugListener , public UiCursorBus::Handler , public AzFramework::InputChannelEventListener , public AzFramework::InputTextEventListener @@ -88,13 +86,6 @@ public: // ~ILyShine - // IRenderDebugListener - - //! Renders any debug displays currently enabled for the UI system - void OnDebugDraw() override; - - // ~IRenderDebugListener - // UiCursorInterface void IncrementVisibleCounter() override; void DecrementVisibleCounter() override; diff --git a/Gems/LyShine/Code/Source/LyShineDebug.cpp b/Gems/LyShine/Code/Source/LyShineDebug.cpp index 15894fe4aa..bb57e70857 100644 --- a/Gems/LyShine/Code/Source/LyShineDebug.cpp +++ b/Gems/LyShine/Code/Source/LyShineDebug.cpp @@ -101,7 +101,7 @@ static const int g_numDstBlendModes = 10; //////////////////////////////////////////////////////////////////////////////////////////////////// #if !defined(_RELEASE) -#ifdef LYSHINE_ATOM_TODO +#ifdef LYSHINE_ATOM_TODO // [GHI #6270] Support RTT using Atom static int Create2DTexture(int width, int height, byte* data, ETEX_Format format) { IRenderer* renderer = gEnv->pRenderer; @@ -120,7 +120,7 @@ static AZ::Vector2 GetTextureSize(AZ::Data::Instance image) //////////////////////////////////////////////////////////////////////////////////////////////////// #if !defined(_RELEASE) -#ifdef LYSHINE_ATOM_TODO +#ifdef LYSHINE_ATOM_TODO // [GHI #6270] Support RTT using Atom static void FillTextureRectWithCheckerboard(uint32* data, int textureWidth, int textureHeight, int minX, int minY, [[maybe_unused]] int rectWidth, int rectHeight, int tileWidth, int tileHeight, uint32* colors, bool varyAlpha) @@ -152,7 +152,7 @@ static void FillTextureRectWithCheckerboard(uint32* data, int textureWidth, int #if !defined(_RELEASE) static AZ::Data::Instance CreateMonoTestTexture() { -#ifdef LYSHINE_ATOM_TODO +#ifdef LYSHINE_ATOM_TODO // [GHI #6270] Support RTT using Atom const int width = 32; const int height = 32; uint32 data[width * height]; @@ -192,7 +192,7 @@ static AZ::Data::Instance CreateMonoTestTexture() #if !defined(_RELEASE) static AZ::Data::Instance CreateColorTestTexture() { -#ifdef LYSHINE_ATOM_TODO +#ifdef LYSHINE_ATOM_TODO // [GHI #6270] Support RTT using Atom const int width = 32; const int height = 32; uint32 data[width * height]; @@ -232,7 +232,7 @@ static AZ::Data::Instance CreateColorTestTexture() #if !defined(_RELEASE) static AZ::Data::Instance CreateMonoAlphaTestTexture() { -#ifdef LYSHINE_ATOM_TODO +#ifdef LYSHINE_ATOM_TODO // [GHI #6270] Support RTT using Atom const int width = 32; const int height = 32; uint32 data[width * height]; @@ -272,7 +272,7 @@ static AZ::Data::Instance CreateMonoAlphaTestTexture() #if !defined(_RELEASE) static AZ::Data::Instance CreateColorAlphaTestTexture() { -#ifdef LYSHINE_ATOM_TODO +#ifdef LYSHINE_ATOM_TODO // [GHI #6270] Support RTT using Atom const int width = 32; const int height = 32; uint32 data[width * height]; @@ -375,7 +375,7 @@ static void DebugDrawColoredBox(AZ::Vector2 pos, AZ::Vector2 size, AZ::Color col IDraw2d::HAlign horizontalAlignment = IDraw2d::HAlign::Left, IDraw2d::VAlign verticalAlignment = IDraw2d::VAlign::Top) { - CDraw2d* draw2d = Draw2dHelper::GetDefaultDraw2d(); + IDraw2d* draw2d = Draw2dHelper::GetDefaultDraw2d(); CDraw2d::ImageOptions imageOptions = draw2d->GetDefaultImageOptions(); imageOptions.color = color.GetAsVector3(); @@ -390,7 +390,7 @@ static void DebugDrawColoredBox(AZ::Vector2 pos, AZ::Vector2 size, AZ::Color col static void DebugDrawStringWithSizeBox(AZStd::string_view font, unsigned int effectIndex, const char* sizeString, const char* testString, AZ::Vector2 pos, float spacing, float size) { - CDraw2d* draw2d = Draw2dHelper::GetDefaultDraw2d(); + IDraw2d* draw2d = Draw2dHelper::GetDefaultDraw2d(); CDraw2d::TextOptions textOptions = draw2d->GetDefaultTextOptions(); if (!font.empty()) @@ -424,7 +424,7 @@ static void DebugDrawStringWithSizeBox(AZStd::string_view font, unsigned int eff #if !defined(_RELEASE) static void DebugDraw2dFontSizes(AZStd::string_view font, unsigned int effectIndex) { - CDraw2d* draw2d = Draw2dHelper::GetDefaultDraw2d(); + IDraw2d* draw2d = Draw2dHelper::GetDefaultDraw2d(); float xOffset = 20.0f; float yOffset = 20.0f; @@ -546,7 +546,7 @@ static void DebugDrawAlignedTextWithOriginBox(AZ::Vector2 pos, #if !defined(_RELEASE) static void DebugDraw2dFontAlignment() { - CDraw2d* draw2d = Draw2dHelper::GetDefaultDraw2d(); + IDraw2d* draw2d = Draw2dHelper::GetDefaultDraw2d(); float w = draw2d->GetViewportWidth(); float yPos = 20; @@ -613,7 +613,7 @@ static void DebugDraw2dFontAlignment() #if !defined(_RELEASE) static AZ::Vector2 DebugDrawFontColorTestBox(AZ::Vector2 pos, const char* string, AZ::Vector3 color, float opacity) { - CDraw2d* draw2d = Draw2dHelper::GetDefaultDraw2d(); + IDraw2d* draw2d = Draw2dHelper::GetDefaultDraw2d(); float pointSize = 32.0f; const float spacing = 6.0f; @@ -648,7 +648,7 @@ static AZ::Vector2 DebugDrawFontColorTestBox(AZ::Vector2 pos, const char* string #if !defined(_RELEASE) static void DebugDraw2dFontColorAndOpacity() { - CDraw2d* draw2d = Draw2dHelper::GetDefaultDraw2d(); + IDraw2d* draw2d = Draw2dHelper::GetDefaultDraw2d(); AZ::Vector2 size; AZ::Vector2 pos(20.0f, 20.0f); @@ -686,7 +686,7 @@ static void DebugDraw2dFontColorAndOpacity() #if !defined(_RELEASE) static void DebugDraw2dImageRotations() { - CDraw2d* draw2d = Draw2dHelper::GetDefaultDraw2d(); + IDraw2d* draw2d = Draw2dHelper::GetDefaultDraw2d(); AZ::Data::Instance texture = GetMonoTestTexture(); @@ -738,7 +738,7 @@ static void DebugDraw2dImageRotations() #if !defined(_RELEASE) static void DebugDraw2dImageColor() { - CDraw2d* draw2d = Draw2dHelper::GetDefaultDraw2d(); + IDraw2d* draw2d = Draw2dHelper::GetDefaultDraw2d(); AZ::Data::Instance texture = GetMonoAlphaTestTexture(); @@ -774,7 +774,7 @@ static void DebugDraw2dImageColor() #if !defined(_RELEASE) static void DebugDraw2dImageBlendMode() { - CDraw2d* draw2d = Draw2dHelper::GetDefaultDraw2d(); + IDraw2d* draw2d = Draw2dHelper::GetDefaultDraw2d(); auto whiteTexture = AZ::RPI::ImageSystemInterface::Get()->GetSystemImage(AZ::RPI::SystemImage::White); @@ -841,7 +841,7 @@ static void DebugDraw2dImageBlendMode() #if !defined(_RELEASE) static void DebugDraw2dImageUVs() { - CDraw2d* draw2d = Draw2dHelper::GetDefaultDraw2d(); + IDraw2d* draw2d = Draw2dHelper::GetDefaultDraw2d(); AZ::Data::Instance texture = GetColorTestTexture(); @@ -890,7 +890,7 @@ static void DebugDraw2dImageUVs() #if !defined(_RELEASE) static void DebugDraw2dImagePixelRounding() { - CDraw2d* draw2d = Draw2dHelper::GetDefaultDraw2d(); + IDraw2d* draw2d = Draw2dHelper::GetDefaultDraw2d(); AZ::Data::Instance texture = GetColorTestTexture(); @@ -931,7 +931,7 @@ static void DebugDraw2dImagePixelRounding() #if !defined(_RELEASE) static void DebugDraw2dLineBasic() { - CDraw2d* draw2d = Draw2dHelper::GetDefaultDraw2d(); + IDraw2d* draw2d = Draw2dHelper::GetDefaultDraw2d(); CDraw2d::ImageOptions imageOptions = draw2d->GetDefaultImageOptions(); @@ -1422,7 +1422,7 @@ void LyShineDebug::RenderDebug() #if !defined(_RELEASE) #ifndef EXCLUDE_DOCUMENTATION_PURPOSE - CDraw2d* draw2d = Draw2dHelper::GetDefaultDraw2d(); + IDraw2d* draw2d = Draw2dHelper::GetDefaultDraw2d(); if (!draw2d) { return; diff --git a/Gems/LyShine/Code/Source/LyShineLoadScreen.cpp b/Gems/LyShine/Code/Source/LyShineLoadScreen.cpp index 279c0527bd..c59cb5cb34 100644 --- a/Gems/LyShine/Code/Source/LyShineLoadScreen.cpp +++ b/Gems/LyShine/Code/Source/LyShineLoadScreen.cpp @@ -10,8 +10,6 @@ #if AZ_LOADSCREENCOMPONENT_ENABLED -#include - #include #include #include @@ -31,12 +29,12 @@ namespace LyShine void LyShineLoadScreenComponent::GetProvidedServices(AZ::ComponentDescriptor::DependencyArrayType& provided) { - provided.emplace_back(AZ_CRC("LyShineLoadScreenService", 0xBB5EAB17)); + provided.emplace_back(AZ_CRC("LyShineLoadScreenService", 0xbb5eab17)); } void LyShineLoadScreenComponent::GetIncompatibleServices(AZ::ComponentDescriptor::DependencyArrayType& incompatible) { - incompatible.emplace_back(AZ_CRC("LyShineLoadScreenService", 0xBB5EAB17)); + incompatible.emplace_back(AZ_CRC("LyShineLoadScreenService", 0xbb5eab17)); } void LyShineLoadScreenComponent::Init() diff --git a/Gems/LyShine/Code/Source/LyShineSystemComponent.cpp b/Gems/LyShine/Code/Source/LyShineSystemComponent.cpp index f815e2ddbd..787797e462 100644 --- a/Gems/LyShine/Code/Source/LyShineSystemComponent.cpp +++ b/Gems/LyShine/Code/Source/LyShineSystemComponent.cpp @@ -377,7 +377,7 @@ namespace LyShine } /////////////////////////////////////////////////////////////////////////////////////////////// - void LyShineSystemComponent::OnCrySystemInitialized([[maybe_unused]] ISystem& system, [[maybe_unused]] const SSystemInitParams& startupParams) + void LyShineSystemComponent::OnCrySystemInitialized(ISystem& system, [[maybe_unused]] const SSystemInitParams& startupParams) { #if !defined(AZ_MONOLITHIC_BUILD) // When module is linked dynamically, we must set our gEnv pointer. @@ -387,16 +387,36 @@ namespace LyShine m_pLyShine = new CLyShine(gEnv->pSystem); gEnv->pLyShine = m_pLyShine; + system.GetILevelSystem()->AddListener(this); + BroadcastCursorImagePathname(); + + if (gEnv->pLyShine) + { + gEnv->pLyShine->PostInit(); + } } - void LyShineSystemComponent::OnCrySystemShutdown([[maybe_unused]] ISystem& system) + /////////////////////////////////////////////////////////////////////////////////////////////// + void LyShineSystemComponent::OnCrySystemShutdown(ISystem& system) { + system.GetILevelSystem()->RemoveListener(this); + gEnv->pLyShine = nullptr; delete m_pLyShine; m_pLyShine = nullptr; } + //////////////////////////////////////////////////////////////////////// + void LyShineSystemComponent::OnUnloadComplete([[maybe_unused]] const char* levelName) + { + // Perform level unload procedures for the LyShine UI system + if (gEnv && gEnv->pLyShine) + { + gEnv->pLyShine->OnLevelUnload(); + } + } + //////////////////////////////////////////////////////////////////////////////////////////////////// void LyShineSystemComponent::BroadcastCursorImagePathname() { diff --git a/Gems/LyShine/Code/Source/LyShineSystemComponent.h b/Gems/LyShine/Code/Source/LyShineSystemComponent.h index 5b4086007b..d2cdcf6761 100644 --- a/Gems/LyShine/Code/Source/LyShineSystemComponent.h +++ b/Gems/LyShine/Code/Source/LyShineSystemComponent.h @@ -13,6 +13,7 @@ #include #include +#include #include #include @@ -37,6 +38,7 @@ namespace LyShine , protected LyShineAllocatorScope , protected UiFrameworkBus::Handler , protected CrySystemEventBus::Handler + , public ILevelSystemListener { public: AZ_COMPONENT(LyShineSystemComponent, lyShineSystemComponentUuid); @@ -92,6 +94,10 @@ namespace LyShine void OnCrySystemShutdown(ISystem&) override; //////////////////////////////////////////////////////////////////////////// + //////////////////////////////////////////////////////////////////////// + // ILevelSystemListener interface implementation + void OnUnloadComplete(const char* levelName) override; + void BroadcastCursorImagePathname(); #if !defined(LYSHINE_BUILDER) && !defined(LYSHINE_TESTS) diff --git a/Gems/LyShine/Code/Source/Particle/UiParticle.cpp b/Gems/LyShine/Code/Source/Particle/UiParticle.cpp index 077e83a696..5354e52724 100644 --- a/Gems/LyShine/Code/Source/Particle/UiParticle.cpp +++ b/Gems/LyShine/Code/Source/Particle/UiParticle.cpp @@ -10,7 +10,6 @@ #include "UiParticleEmitterComponent.h" #include -#include //////////////////////////////////////////////////////////////////////////////////////////////////// void UiParticle::Init(UiParticle::UiParticleInitialParameters* initialParams) @@ -99,7 +98,7 @@ void UiParticle::Update(float deltaTime, const UiParticleUpdateParameters& updat } //////////////////////////////////////////////////////////////////////////////////////////////////// -bool UiParticle::FillVertices(SVF_P2F_C4B_T2F_F4B* outputVertices, const UiParticleRenderParameters& renderParameters, const AZ::Matrix4x4& transform) +bool UiParticle::FillVertices(LyShine::UiPrimitiveVertex* outputVertices, const UiParticleRenderParameters& renderParameters, const AZ::Matrix4x4& transform) { float particleLifetimePercentage = (renderParameters.isParticleInfinite ? 0.0f : m_particleAge / m_particleLifetime); float alphaStrength = 1.0f; diff --git a/Gems/LyShine/Code/Source/Particle/UiParticle.h b/Gems/LyShine/Code/Source/Particle/UiParticle.h index 24509634e1..2b8f83c63b 100644 --- a/Gems/LyShine/Code/Source/Particle/UiParticle.h +++ b/Gems/LyShine/Code/Source/Particle/UiParticle.h @@ -16,7 +16,7 @@ #include #include -#include +#include class UiParticle { @@ -81,7 +81,7 @@ public: //! Fill out the four vertices for the particle. //! Returns false if the vertex was not added because it was fully transparent. - bool FillVertices(SVF_P2F_C4B_T2F_F4B* outputVertices, const UiParticleRenderParameters& renderParameters, const AZ::Matrix4x4& transform); + bool FillVertices(LyShine::UiPrimitiveVertex* outputVertices, const UiParticleRenderParameters& renderParameters, const AZ::Matrix4x4& transform); bool IsActive(bool infiniteLifetime) const; diff --git a/Gems/LyShine/Code/Source/RenderGraph.cpp b/Gems/LyShine/Code/Source/RenderGraph.cpp index 567c29eecd..c05e87bc64 100644 --- a/Gems/LyShine/Code/Source/RenderGraph.cpp +++ b/Gems/LyShine/Code/Source/RenderGraph.cpp @@ -122,14 +122,10 @@ namespace LyShine uint32_t isClampTextureMode = 0; for (int i = 0; i < m_numTextures; ++i) { - const AZ::RHI::ImageView* imageView = m_textures[i].m_texture ? m_textures[i].m_texture->GetImageView() : nullptr; - - if (!imageView) - { - // Default to white texture - auto image = AZ::RPI::ImageSystemInterface::Get()->GetSystemImage(AZ::RPI::SystemImage::White); - imageView = image->GetImageView(); - } + // Default to white texture + const AZ::Data::Instance& image = m_textures[i].m_texture ? m_textures[i].m_texture + : AZ::RPI::ImageSystemInterface::Get()->GetSystemImage(AZ::RPI::SystemImage::White); + const AZ::RHI::ImageView* imageView = image->GetImageView(); if (imageView) { @@ -138,6 +134,9 @@ namespace LyShine { isClampTextureMode |= (1 << i); } +#ifndef _RELEASE + uiRenderer->DebugUseTexture(image); +#endif } } @@ -151,10 +150,10 @@ namespace LyShine // Add the indexed primitives to the dynamic draw context for drawing // - // [LYSHINE_ATOM_TODO][ATOM-15073] - need to combine into a single DrawIndexed call to take advantage of the draw call + // [LYSHINE_ATOM_TODO][ATOM-15073] Combine into a single DrawIndexed call to take advantage of the draw call // optimization done by this RenderGraph. This option will be added to DynamicDrawContext. For // now we could combine the vertices ourselves - for (const DynUiPrimitive& primitive : m_primitives) + for (const LyShine::UiPrimitive& primitive : m_primitives) { dynamicDraw->DrawIndexed(primitive.m_vertices, primitive.m_numVertices, primitive.m_indices, primitive.m_numIndices, AZ::RHI::IndexFormat::Uint16, drawSrg); } @@ -163,7 +162,7 @@ namespace LyShine } //////////////////////////////////////////////////////////////////////////////////////////////////// - void PrimitiveListRenderNode::AddPrimitive(DynUiPrimitive* primitive) + void PrimitiveListRenderNode::AddPrimitive(LyShine::UiPrimitive* primitive) { // always clear the next pointer before adding to list primitive->m_next = nullptr; @@ -174,9 +173,9 @@ namespace LyShine } //////////////////////////////////////////////////////////////////////////////////////////////////// - DynUiPrimitiveList& PrimitiveListRenderNode::GetPrimitives() const + LyShine::UiPrimitiveList& PrimitiveListRenderNode::GetPrimitives() const { - return const_cast(m_primitives); + return const_cast(m_primitives); } //////////////////////////////////////////////////////////////////////////////////////////////////// @@ -198,7 +197,7 @@ namespace LyShine } //////////////////////////////////////////////////////////////////////////////////////////////////// - bool PrimitiveListRenderNode::HasSpaceToAddPrimitive(DynUiPrimitive* primitive) const + bool PrimitiveListRenderNode::HasSpaceToAddPrimitive(LyShine::UiPrimitive* primitive) const { return primitive->m_numVertices + m_totalNumVertices < std::numeric_limits::max(); } @@ -222,9 +221,9 @@ namespace LyShine { size_t numPrims = m_primitives.size(); size_t primCount = 0; - const DynUiPrimitive* lastPrim = nullptr; + const LyShine::UiPrimitive* lastPrim = nullptr; int highestTexUnit = 0; - for (const DynUiPrimitive& primitive : m_primitives) + for (const LyShine::UiPrimitive& primitive : m_primitives) { if (primCount > numPrims) { @@ -665,13 +664,6 @@ namespace LyShine } } - //////////////////////////////////////////////////////////////////////////////////////////////////// - void RenderGraph::BeginRenderToTexture([[maybe_unused]] int renderTargetHandle, [[maybe_unused]] SDepthTexture* renderTargetDepthSurface, - [[maybe_unused]] const AZ::Vector2& viewportTopLeft, [[maybe_unused]] const AZ::Vector2& viewportSize, [[maybe_unused]] const AZ::Color& clearColor) - { - // LYSHINE_ATOM_TODO - this function will be removed when all IRenderer references are gone from UI components - } - //////////////////////////////////////////////////////////////////////////////////////////////////// void RenderGraph::BeginRenderToTexture(AZ::Data::Instance attachmentImage, const AZ::Vector2& viewportTopLeft, const AZ::Vector2& viewportSize, const AZ::Color& clearColor) @@ -705,7 +697,7 @@ namespace LyShine } //////////////////////////////////////////////////////////////////////////////////////////////////// - void RenderGraph::AddPrimitiveAtom(DynUiPrimitive* primitive, const AZ::Data::Instance& texture, + void RenderGraph::AddPrimitive(LyShine::UiPrimitive* primitive, const AZ::Data::Instance& texture, bool isClampTextureMode, bool isTextureSRGB, bool isTexturePremultipliedAlpha, BlendMode blendMode) { AZStd::vector* renderNodeList = m_renderNodeListStack.top(); @@ -778,7 +770,7 @@ namespace LyShine } //////////////////////////////////////////////////////////////////////////////////////////////////// - void RenderGraph::AddAlphaMaskPrimitiveAtom(DynUiPrimitive* primitive, + void RenderGraph::AddAlphaMaskPrimitive(LyShine::UiPrimitive* primitive, AZ::Data::Instance contentAttachmentImage, AZ::Data::Instance maskAttachmentImage, bool isClampTextureMode, @@ -862,7 +854,7 @@ namespace LyShine } //////////////////////////////////////////////////////////////////////////////////////////////////// - DynUiPrimitive* RenderGraph::GetDynamicQuadPrimitive(const AZ::Vector2* positions, uint32 packedColor) + LyShine::UiPrimitive* RenderGraph::GetDynamicQuadPrimitive(const AZ::Vector2* positions, uint32 packedColor) { const int numVertsInQuad = 4; const int numIndicesInQuad = 6; @@ -1154,10 +1146,10 @@ namespace LyShine const PrimitiveListRenderNode* primListRenderNode = static_cast(renderNode); - DynUiPrimitiveList& primitives = primListRenderNode->GetPrimitives(); + LyShine::UiPrimitiveList& primitives = primListRenderNode->GetPrimitives(); info.m_numPrimitives += static_cast(primitives.size()); { - for (const DynUiPrimitive& primitive : primitives) + for (const LyShine::UiPrimitive& primitive : primitives) { info.m_numTriangles += primitive.m_numIndices / 3; } @@ -1338,10 +1330,10 @@ namespace LyShine previousNodeAlreadyCounted = false; } - DynUiPrimitiveList& primitives = primListRenderNode->GetPrimitives(); + LyShine::UiPrimitiveList& primitives = primListRenderNode->GetPrimitives(); int numPrimitives = static_cast(primitives.size()); int numTriangles = 0; - for (const DynUiPrimitive& primitive : primitives) + for (const LyShine::UiPrimitive& primitive : primitives) { numTriangles += primitive.m_numIndices / 3; } diff --git a/Gems/LyShine/Code/Source/RenderGraph.h b/Gems/LyShine/Code/Source/RenderGraph.h index 9edc1f50e8..1ec1842da3 100644 --- a/Gems/LyShine/Code/Source/RenderGraph.h +++ b/Gems/LyShine/Code/Source/RenderGraph.h @@ -8,8 +8,8 @@ #pragma once -#include #include +#include #include #include #include @@ -79,8 +79,8 @@ namespace LyShine , const AZ::Matrix4x4& modelViewProjMat , AZ::RHI::Ptr dynamicDraw) override; - void AddPrimitive(DynUiPrimitive* primitive); - DynUiPrimitiveList& GetPrimitives() const; + void AddPrimitive(LyShine::UiPrimitive* primitive); + LyShine::UiPrimitiveList& GetPrimitives() const; int GetOrAddTexture(const AZ::Data::Instance& texture, bool isClampTextureMode); int GetNumTextures() const { return m_numTextures; } @@ -92,7 +92,7 @@ namespace LyShine bool GetIsPremultiplyAlpha() const { return m_preMultiplyAlpha; } AlphaMaskType GetAlphaMaskType() const { return m_alphaMaskType; } - bool HasSpaceToAddPrimitive(DynUiPrimitive* primitive) const; + bool HasSpaceToAddPrimitive(LyShine::UiPrimitive* primitive) const; // Search to see if this texture is already used by this texture unit, returns -1 if not used int FindTexture(const AZ::Data::Instance& texture, bool isClampTextureMode) const; @@ -122,7 +122,7 @@ namespace LyShine int m_totalNumVertices; int m_totalNumIndices; - DynUiPrimitiveList m_primitives; + LyShine::UiPrimitiveList m_primitives; }; // A mask render node handles using one set of render nodes to mask another set of render nodes @@ -262,13 +262,13 @@ namespace LyShine void StartChildrenForMask() override; void EndMask() override; - //! Begin rendering to a texture - void BeginRenderToTexture(int renderTargetHandle, SDepthTexture* renderTargetDepthSurface, - const AZ::Vector2& viewportTopLeft, const AZ::Vector2& viewportSize, const AZ::Color& clearColor) override; - + void BeginRenderToTexture(AZ::Data::Instance attachmentImage, + const AZ::Vector2& viewportTopLeft, + const AZ::Vector2& viewportSize, + const AZ::Color& clearColor) override; void EndRenderToTexture() override; - DynUiPrimitive* GetDynamicQuadPrimitive(const AZ::Vector2* positions, uint32 packedColor) override; + LyShine::UiPrimitive* GetDynamicQuadPrimitive(const AZ::Vector2* positions, uint32 packedColor) override; bool IsRenderingToMask() const override; void SetIsRenderingToMask(bool isRenderingToMask) override; @@ -277,25 +277,19 @@ namespace LyShine void PushOverrideAlphaFade(float alphaFadeValue) override; void PopAlphaFade() override; float GetAlphaFade() const override; + + void AddPrimitive(LyShine::UiPrimitive* primitive, const AZ::Data::Instance& texture, + bool isClampTextureMode, bool isTextureSRGB, bool isTexturePremultipliedAlpha, BlendMode blendMode) override; // ~IRenderGraph - // LYSHINE_ATOM_TODO - this can be renamed back to AddPrimitive after removal of IRenderer from all UI components - void AddPrimitiveAtom(DynUiPrimitive* primitive, const AZ::Data::Instance& texture, - bool isClampTextureMode, bool isTextureSRGB, bool isTexturePremultipliedAlpha, BlendMode blendMode); - //! Add an indexed triangle list primitive to the render graph which will use maskTexture as an alpha (gradient) mask - void AddAlphaMaskPrimitiveAtom(DynUiPrimitive* primitive, + void AddAlphaMaskPrimitive(LyShine::UiPrimitive* primitive, AZ::Data::Instance contentAttachmentImage, AZ::Data::Instance maskAttachmentImage, bool isClampTextureMode, bool isTextureSRGB, bool isTexturePremultipliedAlpha, - BlendMode blendMode); - - void BeginRenderToTexture(AZ::Data::Instance attachmentImage, - const AZ::Vector2& viewportTopLeft, - const AZ::Vector2& viewportSize, - const AZ::Color& clearColor); + BlendMode blendMode) override; //! Render the display graph void Render(UiRenderer* uiRenderer, const AZ::Vector2& viewportSize); @@ -333,8 +327,8 @@ namespace LyShine struct DynamicQuad { - SVF_P2F_C4B_T2F_F4B m_quadVerts[4]; - DynUiPrimitive m_primitive; + LyShine::UiPrimitiveVertex m_quadVerts[4]; + LyShine::UiPrimitive m_primitive; }; protected: // member functions diff --git a/Gems/LyShine/Code/Source/Sprite.cpp b/Gems/LyShine/Code/Source/Sprite.cpp index 5c7adae481..f8982f4fc2 100644 --- a/Gems/LyShine/Code/Source/Sprite.cpp +++ b/Gems/LyShine/Code/Source/Sprite.cpp @@ -7,7 +7,6 @@ */ #include "Sprite.h" #include -#include #include #include #include @@ -244,12 +243,10 @@ void CSprite::SetCellBorders(int cellIndex, Borders borders) AZ::Data::Instance CSprite::GetImage() { // Prioritize usage of an atlas -#ifdef LYSHINE_ATOM_TODO // texture atlas conversion to use Atom if (m_atlas) { return m_atlas->GetTexture(); } -#endif return m_image; } @@ -702,7 +699,7 @@ CSprite* CSprite::CreateSprite(const AZStd::string& renderTargetName) // create Sprite object CSprite* sprite = new CSprite; -#ifdef LYSHINE_ATOM_TODO // render target converstion to use ATom +#ifdef LYSHINE_ATOM_TODO // [GHI #6270] Support RTT using Atom // the render target texture may not exist yet in which case we will need to load it later sprite->m_texture = gEnv->pRenderer->EF_GetTextureByName(renderTargetName.c_str()); if (sprite->m_texture) @@ -855,7 +852,8 @@ bool CSprite::LoadImage(const AZStd::string& nameTex, AZ::Data::Instance().c_str()); return false; } diff --git a/Gems/LyShine/Code/Source/Sprite.h b/Gems/LyShine/Code/Source/Sprite.h index 0b2c790cf6..71c3bbcca2 100644 --- a/Gems/LyShine/Code/Source/Sprite.h +++ b/Gems/LyShine/Code/Source/Sprite.h @@ -56,7 +56,7 @@ public: // member functions void SetCellAlias(int cellIndex, const AZStd::string& cellAlias) override; int GetCellIndexFromAlias(const AZStd::string& cellAlias) const override; bool IsSpriteSheet() const override; - + AZ::Data::Instance GetImage() override; // ~ISprite // TextureAtlasNotifications @@ -66,8 +66,6 @@ public: // member functions // ~TextureAtlasNotifications - AZ::Data::Instance GetImage(); - public: // static member functions static void Initialize(); diff --git a/Gems/LyShine/Code/Source/Tests/internal/test_UiTextComponent.cpp b/Gems/LyShine/Code/Source/Tests/internal/test_UiTextComponent.cpp index 33c2738e54..5447d4ea97 100644 --- a/Gems/LyShine/Code/Source/Tests/internal/test_UiTextComponent.cpp +++ b/Gems/LyShine/Code/Source/Tests/internal/test_UiTextComponent.cpp @@ -3510,17 +3510,9 @@ void UiTextComponent::UnitTestLocalization(CLyShine* lyshine, IConsoleCmdArgs* / AZStd::string localizationXml("libs/localization/localization.xml"); - bool initLocSuccess = false; - - if (pLocMan) + if (!pLocMan || !pLocMan->InitLocalizationData(localizationXml.c_str()) || !pLocMan->LoadLocalizationDataByTag("init")) { - if (pLocMan->InitLocalizationData(localizationXml.c_str())) - { - if (pLocMan->LoadLocalizationDataByTag("init")) - { - initLocSuccess = true; - } - } + AZ_Assert(false, "Failed to load localization"); } ComponentGetSetTextTestsLoc(lyshine); diff --git a/Gems/LyShine/Code/Source/UiButtonComponent.cpp b/Gems/LyShine/Code/Source/UiButtonComponent.cpp index 11bb088400..06444cebe4 100644 --- a/Gems/LyShine/Code/Source/UiButtonComponent.cpp +++ b/Gems/LyShine/Code/Source/UiButtonComponent.cpp @@ -13,7 +13,6 @@ #include #include -#include #include #include #include diff --git a/Gems/LyShine/Code/Source/UiCanvasComponent.cpp b/Gems/LyShine/Code/Source/UiCanvasComponent.cpp index d967b88610..0a21f92119 100644 --- a/Gems/LyShine/Code/Source/UiCanvasComponent.cpp +++ b/Gems/LyShine/Code/Source/UiCanvasComponent.cpp @@ -16,7 +16,6 @@ #include "UiRenderer.h" #include "LyShine.h" -#include #include #include #include @@ -2123,13 +2122,13 @@ void UiCanvasComponent::DebugReportDrawCalls(AZ::IO::HandleType fileHandle, LySh } //////////////////////////////////////////////////////////////////////////////////////////////////// -void UiCanvasComponent::DebugDisplayElemBounds(CDraw2d* draw2d) const +void UiCanvasComponent::DebugDisplayElemBounds(IDraw2d* draw2d) const { DebugDisplayChildElemBounds(draw2d, m_rootElement); } //////////////////////////////////////////////////////////////////////////////////////////////////// -void UiCanvasComponent::DebugDisplayChildElemBounds(CDraw2d* draw2d, const AZ::EntityId entity) const +void UiCanvasComponent::DebugDisplayChildElemBounds(IDraw2d* draw2d, const AZ::EntityId entity) const { AZ::u64 time = AZStd::GetTimeUTCMilliSecond(); uint32 fractionsOfOneSecond = time % 1000; @@ -3606,7 +3605,7 @@ void UiCanvasComponent::CreateRenderTarget() return; } -#ifdef LYSHINE_ATOM_TODO // [LYN-3359] Support RTT using Atom +#ifdef LYSHINE_ATOM_TODO // [GHI #6269] Support RTT using Atom // Create a render target that this canvas will be rendered to. // The render target size is the canvas size. m_renderTargetHandle = gEnv->pRenderer->CreateRenderTarget(m_renderTargetName.c_str(), @@ -3637,11 +3636,11 @@ void UiCanvasComponent::DestroyRenderTarget() if (m_renderTargetHandle > 0) { ISystem::CrySystemNotificationBus::Handler::BusDisconnect(); -#ifdef LYSHINE_ATOM_TODO // [LYN-3359] Support RTT using Atom +#ifdef LYSHINE_ATOM_TODO // [GHI #6269] Support RTT using Atom gEnv->pRenderer->DestroyDepthSurface(m_renderTargetDepthSurface); #endif m_renderTargetDepthSurface = nullptr; -#ifdef LYSHINE_ATOM_TODO // [LYN-3359] Support RTT using Atom +#ifdef LYSHINE_ATOM_TODO // [GHI #6269] Support RTT using Atom gEnv->pRenderer->DestroyRenderTarget(m_renderTargetHandle); #endif m_renderTargetHandle = -1; @@ -3651,7 +3650,7 @@ void UiCanvasComponent::DestroyRenderTarget() //////////////////////////////////////////////////////////////////////////////////////////////////// void UiCanvasComponent::RenderCanvasToTexture() { -#ifdef LYSHINE_ATOM_TODO // [LYN-3359] Support RTT using Atom +#ifdef LYSHINE_ATOM_TODO // [GHI #6269] Support RTT using Atom if (m_renderTargetHandle <= 0) { return; diff --git a/Gems/LyShine/Code/Source/UiCanvasComponent.h b/Gems/LyShine/Code/Source/UiCanvasComponent.h index 79cb044af0..050773131f 100644 --- a/Gems/LyShine/Code/Source/UiCanvasComponent.h +++ b/Gems/LyShine/Code/Source/UiCanvasComponent.h @@ -292,8 +292,8 @@ public: // member functions void DebugReportDrawCalls(AZ::IO::HandleType fileHandle, LyShineDebug::DebugInfoDrawCallReport& reportInfo, void* context) const; - void DebugDisplayElemBounds(CDraw2d* draw2d) const; - void DebugDisplayChildElemBounds(CDraw2d* draw2d, const AZ::EntityId entity) const; + void DebugDisplayElemBounds(IDraw2d* draw2d) const; + void DebugDisplayChildElemBounds(IDraw2d* draw2d, const AZ::EntityId entity) const; #endif public: // static member functions diff --git a/Gems/LyShine/Code/Source/UiCanvasFileObject.cpp b/Gems/LyShine/Code/Source/UiCanvasFileObject.cpp index 2edaf26909..700de3e8a1 100644 --- a/Gems/LyShine/Code/Source/UiCanvasFileObject.cpp +++ b/Gems/LyShine/Code/Source/UiCanvasFileObject.cpp @@ -206,19 +206,16 @@ UiCanvasFileObject* UiCanvasFileObject::LoadCanvasEntitiesFromOldFormatFile(cons // Do a sanity check that the buffer does start with the prefix that we will remove // Also, determine how newlines are represented in the file. - bool useCarriageReturnNewline = false; const char* suffixToRemove = nullptr; size_t prefixToRemoveLen = 0; if (strncmp(buffer, prefixToRemove1, strlen(prefixToRemove1)) == 0) { - useCarriageReturnNewline = false; prefixToRemoveLen = strlen(prefixToRemove1); suffixToRemove = suffixToRemove1; } else if (strncmp(buffer, prefixToRemove2, strlen(prefixToRemove2)) == 0) { - useCarriageReturnNewline = true; prefixToRemoveLen = strlen(prefixToRemove2); suffixToRemove = suffixToRemove2; } @@ -257,7 +254,6 @@ UiCanvasFileObject* UiCanvasFileObject::LoadCanvasEntitiesFromOldFormatFile(cons { ++p; suffixToRemove = suffixToRemove2; - useCarriageReturnNewline = true; } if (*p == '\n') { diff --git a/Gems/LyShine/Code/Source/UiCanvasManager.cpp b/Gems/LyShine/Code/Source/UiCanvasManager.cpp index f2397248b6..70646246f0 100644 --- a/Gems/LyShine/Code/Source/UiCanvasManager.cpp +++ b/Gems/LyShine/Code/Source/UiCanvasManager.cpp @@ -12,11 +12,9 @@ #include "UiCanvasComponent.h" #include "UiGameEntityContext.h" -#include #include #include -#include #include #include #include @@ -180,8 +178,6 @@ AZ::EntityId UiCanvasManager::LoadCanvas(const AZStd::string& assetIdPathname) return AZ::EntityId(); } - AZ_ASSET_NAMED_SCOPE(assetIdPathname.c_str()); - UiGameEntityContext* entityContext = new UiGameEntityContext(); AZ::EntityId canvasEntityId = LoadCanvasInternal(assetIdPathname, false, "", entityContext); @@ -633,23 +629,23 @@ void UiCanvasManager::RenderLoadedCanvases() //////////////////////////////////////////////////////////////////////////////////////////////////// void UiCanvasManager::DestroyLoadedCanvases(bool keepCrossLevelCanvases) { - // Delete all the canvases loaded in game (but not loaded in editor) - for (auto iter = m_loadedCanvases.begin(); iter != m_loadedCanvases.end(); ++iter) + // Find all the canvases loaded in game (but not loaded in editor) that need destroying + AZStd::vector canvasesToUnload; + canvasesToUnload.reserve(m_loadedCanvases.size()); + for (auto canvas : m_loadedCanvases) { - auto canvas = *iter; - if (!(keepCrossLevelCanvases && canvas->GetKeepLoadedOnLevelUnload())) { - // no longer used by game so delete the canvas - delete canvas->GetEntity(); - *iter = nullptr; // mark for removal from container + canvasesToUnload.push_back(canvas->GetEntityId()); } } - // now remove the nullptr entries - m_loadedCanvases.erase( - std::remove(m_loadedCanvases.begin(), m_loadedCanvases.end(), nullptr), - m_loadedCanvases.end()); + // Unload the canvases. This will also send the OnCanvasUnloaded notification which + // ensures that components such as UiCanvasAsserRefComponent can clean up properly + for (auto canvasEntityId : canvasesToUnload) + { + UnloadCanvas(canvasEntityId); + } } //////////////////////////////////////////////////////////////////////////////////////////////////// @@ -916,60 +912,56 @@ AZ::EntityId UiCanvasManager::LoadCanvasInternal(const AZStd::string& assetIdPat // editor version so that the user can test their canvas without saving it UiCanvasComponent* canvasComponent = FindEditorCanvasComponentByPathname(assetIdPath); - // This scope opened here intentionally to control the lifetime of the AZ_ASSET_NAMED_SCOPE + if (canvasComponent) { - AZ_ASSET_NAMED_SCOPE(pathToOpen.c_str()); - if (canvasComponent) + // this canvas is already loaded in the editor + if (forEditor) { - // this canvas is already loaded in the editor - if (forEditor) - { - // should never load a canvas in Editor if it is already loaded. The Editor should avoid loading the - // same canvas twice in Editor. If the game is running it is not possible to load a canvas - // from the editor. - gEnv->pSystem->Warning(VALIDATOR_MODULE_SHINE, VALIDATOR_WARNING, VALIDATOR_FLAG_FILE, - pathToOpen.c_str(), - "UI canvas file: %s is already loaded", - pathToOpen.c_str()); - return AZ::EntityId(); - } - else - { - // we are loading from the game, the canvas is already open in the editor, so - // we clone the canvas that is open in the editor. - canvasComponent = canvasComponent->CloneAndInitializeCanvas(entityContext, assetIdPath); - } + // should never load a canvas in Editor if it is already loaded. The Editor should avoid loading the + // same canvas twice in Editor. If the game is running it is not possible to load a canvas + // from the editor. + gEnv->pSystem->Warning(VALIDATOR_MODULE_SHINE, VALIDATOR_WARNING, VALIDATOR_FLAG_FILE, + pathToOpen.c_str(), + "UI canvas file: %s is already loaded", + pathToOpen.c_str()); + return AZ::EntityId(); } else { - // not already loaded in editor, attempt to load... - canvasComponent = UiCanvasComponent::LoadCanvasInternal(pathToOpen.c_str(), forEditor, assetIdPath.c_str(), entityContext, previousRemapTable, previousCanvasId); + // we are loading from the game, the canvas is already open in the editor, so + // we clone the canvas that is open in the editor. + canvasComponent = canvasComponent->CloneAndInitializeCanvas(entityContext, assetIdPath); } + } + else + { + // not already loaded in editor, attempt to load... + canvasComponent = UiCanvasComponent::LoadCanvasInternal(pathToOpen.c_str(), forEditor, assetIdPath.c_str(), entityContext, previousRemapTable, previousCanvasId); + } - if (canvasComponent) + if (canvasComponent) + { + // canvas loaded OK (or cloned from Editor canvas OK) + + // add to the list of loaded canvases + if (forEditor) { - // canvas loaded OK (or cloned from Editor canvas OK) - - // add to the list of loaded canvases - if (forEditor) - { - m_loadedCanvasesInEditor.push_back(canvasComponent); - } - else - { - if (canvasComponent->GetEnabled() && canvasComponent->GetIsConsumingAllInputEvents()) - { - AzFramework::InputChannelRequestBus::Broadcast(&AzFramework::InputChannelRequests::ResetState); - EBUS_EVENT(UiCanvasBus, ClearAllInteractables); - } - m_loadedCanvases.push_back(canvasComponent); - SortCanvasesByDrawOrder(); - - // Update hover state for loaded canvases - m_generateMousePositionInputEvent = true; - } - canvasComponent->SetLocalUserIdInputFilter(m_localUserIdInputFilter); + m_loadedCanvasesInEditor.push_back(canvasComponent); } + else + { + if (canvasComponent->GetEnabled() && canvasComponent->GetIsConsumingAllInputEvents()) + { + AzFramework::InputChannelRequestBus::Broadcast(&AzFramework::InputChannelRequests::ResetState); + EBUS_EVENT(UiCanvasBus, ClearAllInteractables); + } + m_loadedCanvases.push_back(canvasComponent); + SortCanvasesByDrawOrder(); + + // Update hover state for loaded canvases + m_generateMousePositionInputEvent = true; + } + canvasComponent->SetLocalUserIdInputFilter(m_localUserIdInputFilter); } return (canvasComponent) ? canvasComponent->GetEntityId() : AZ::EntityId(); @@ -1005,28 +997,25 @@ void UiCanvasManager::DebugDisplayCanvasData(int setting) const { bool onlyShowEnabledCanvases = (setting == 2) ? true : false; - CDraw2d* draw2d = Draw2dHelper::GetDefaultDraw2d(); + IDraw2d* draw2d = Draw2dHelper::GetDefaultDraw2d(); - float xOffset = 20.0f; - float yOffset = 20.0f; + float dpiScale = draw2d->GetViewportDpiScalingFactor(); + float xOffset = 20.0f * dpiScale; + float yOffset = 20.0f * dpiScale; const int elementNameFieldLength = 20; auto blackTexture = AZ::RPI::ImageSystemInterface::Get()->GetSystemImage(AZ::RPI::SystemImage::Black); - float textOpacity = 1.0f; - float backgroundRectOpacity = 0.75f; + float backgroundRectOpacity = 0.0f; // 0.75f; // [GHI #6515] Reenable background rect const AZ::Vector3 white(1.0f, 1.0f, 1.0f); const AZ::Vector3 grey(0.5f, 0.5f, 0.5f); const AZ::Vector3 red(1.0f, 0.3f, 0.3f); const AZ::Vector3 blue(0.3f, 0.3f, 1.0f); - // If the viewport is narrow then a font size of 16 might be too large, so we use a size between 12 and 16 depending - // on the viewport width. - float fontSize(draw2d->GetViewportWidth() / 75.f); - fontSize = AZ::GetClamp(fontSize, 12.f, 16.f); - const float lineSpacing = fontSize; + const float fontSize = 8.0f; + const float lineSpacing = 20.0f * dpiScale; // local function to write a line of text (with a background rect) and increment Y offset AZStd::function WriteLine = [&](const char* buffer, const AZ::Vector3& color) @@ -1163,15 +1152,15 @@ void UiCanvasManager::DebugDisplayCanvasData(int setting) const //////////////////////////////////////////////////////////////////////////////////////////////////// void UiCanvasManager::DebugDisplayDrawCallData() const { - CDraw2d* draw2d = Draw2dHelper::GetDefaultDraw2d(); + IDraw2d* draw2d = Draw2dHelper::GetDefaultDraw2d(); - float xOffset = 20.0f; - float yOffset = 20.0f; + float dpiScale = draw2d->GetViewportDpiScalingFactor(); + float xOffset = 20.0f * dpiScale; + float yOffset = 20.0f * dpiScale; auto blackTexture = AZ::RPI::ImageSystemInterface::Get()->GetSystemImage(AZ::RPI::SystemImage::Black); float textOpacity = 1.0f; - float backgroundRectOpacity = 0.75f; - const float lineSpacing = 20.0f; + float backgroundRectOpacity = 0.0f; // 0.75f; // [GHI #6515] Reenable background rect const AZ::Vector3 white(1,1,1); const AZ::Vector3 red(1,0.3f,0.3f); @@ -1179,16 +1168,19 @@ void UiCanvasManager::DebugDisplayDrawCallData() const const AZ::Vector3 green(0.3f,1,0.3f); const AZ::Vector3 yellow(0.7f,0.7f,0.2f); + const float fontSize = 8.0f; + const float lineSpacing = 20.0f * dpiScale; + // local function to write a line of text (with a background rect) and increment Y offset AZStd::function WriteLine = [&](const char* buffer, const AZ::Vector3& color) { CDraw2d::TextOptions textOptions = draw2d->GetDefaultTextOptions(); textOptions.color = color; - AZ::Vector2 textSize = draw2d->GetTextSize(buffer, 16, &textOptions); + AZ::Vector2 textSize = draw2d->GetTextSize(buffer, fontSize, &textOptions); AZ::Vector2 rectTopLeft = AZ::Vector2(xOffset - 2, yOffset); AZ::Vector2 rectSize = AZ::Vector2(textSize.GetX() + 4, lineSpacing); draw2d->DrawImage(blackTexture, rectTopLeft, rectSize, backgroundRectOpacity); - draw2d->DrawText(buffer, AZ::Vector2(xOffset, yOffset), 16, textOpacity, &textOptions); + draw2d->DrawText(buffer, AZ::Vector2(xOffset, yOffset), fontSize, textOpacity, &textOptions); yOffset += lineSpacing; }; @@ -1494,7 +1486,7 @@ void UiCanvasManager::DebugReportDrawCalls(const AZStd::string& name) const //////////////////////////////////////////////////////////////////////////////////////////////////// void UiCanvasManager::DebugDisplayElemBounds(int canvasIndexFilter) const { - CDraw2d* draw2d = Draw2dHelper::GetDefaultDraw2d(); + IDraw2d* draw2d = Draw2dHelper::GetDefaultDraw2d(); int canvasIndex = 0; for (auto canvas : m_loadedCanvases) diff --git a/Gems/LyShine/Code/Source/UiFaderComponent.cpp b/Gems/LyShine/Code/Source/UiFaderComponent.cpp index d9309a7505..e1f5153e99 100644 --- a/Gems/LyShine/Code/Source/UiFaderComponent.cpp +++ b/Gems/LyShine/Code/Source/UiFaderComponent.cpp @@ -23,8 +23,6 @@ #include #include -#include - #include "UiSerialize.h" #include "RenderToTextureBus.h" @@ -457,7 +455,7 @@ void UiFaderComponent::CreateOrResizeRenderTarget(const AZ::Vector2& pixelAligne m_viewportTopLeft = pixelAlignedTopLeft; m_viewportSize = renderTargetSize; - // LYSHINE_ATOM_TODO: optimize by reusing/resizing targets + // [LYSHINE_ATOM_TODO][GHI #6271] Optimize by reusing existing render targets DestroyRenderTarget(); // Create a render target that this element and its children will be rendered to @@ -505,7 +503,7 @@ void UiFaderComponent::UpdateCachedPrimitive(const AZ::Vector2& pixelAlignedTopL { // verts not yet allocated, allocate them now const int numIndices = 6; - m_cachedPrimitive.m_vertices = new SVF_P2F_C4B_T2F_F4B[numVertices]; + m_cachedPrimitive.m_vertices = new LyShine::UiPrimitiveVertex[numVertices]; m_cachedPrimitive.m_numVertices = numVertices; static uint16 indices[numIndices] = { 0, 1, 2, 2, 3, 0 }; @@ -575,8 +573,7 @@ void UiFaderComponent::RenderRttFader(LyShine::IRenderGraph* renderGraph, UiElem AZ::Color clearColor(0.0f, 0.0f, 0.0f, 0.0f); // Start building the render to texture node in the render graph - LyShine::RenderGraph* lyRenderGraph = static_cast(renderGraph); // LYSHINE_ATOM_TODO - find a different solution from downcasting - GHI #3570 - lyRenderGraph->BeginRenderToTexture(attachmentImage, m_viewportTopLeft, m_viewportSize, clearColor); + renderGraph->BeginRenderToTexture(attachmentImage, m_viewportTopLeft, m_viewportSize, clearColor); // We don't want this fader or parent faders to affect what is rendered to the render target since we will // apply those fades when we render from the render target. @@ -604,7 +601,7 @@ void UiFaderComponent::RenderRttFader(LyShine::IRenderGraph* renderGraph, UiElem if (m_cachedPrimitive.m_vertices[0].color.a != desiredPackedAlpha) { // go through all the cached vertices and update the alpha values - UCol desiredPackedColor = m_cachedPrimitive.m_vertices[0].color; + LyShine::UCol desiredPackedColor = m_cachedPrimitive.m_vertices[0].color; desiredPackedColor.a = desiredPackedAlpha; for (int i = 0; i < m_cachedPrimitive.m_numVertices; ++i) { @@ -615,17 +612,13 @@ void UiFaderComponent::RenderRttFader(LyShine::IRenderGraph* renderGraph, UiElem // Add a primitive to render a quad using the render target we have created { - LyShine::RenderGraph* lyRenderGraph = static_cast(renderGraph); // LYSHINE_ATOM_TODO - find a different solution from downcasting - GHI #3570 - if (lyRenderGraph) - { - // Set the texture and other render state required - AZ::Data::Instance image = attachmentImage; - bool isClampTextureMode = true; - bool isTextureSRGB = true; - bool isTexturePremultipliedAlpha = true; - LyShine::BlendMode blendMode = LyShine::BlendMode::Normal; - lyRenderGraph->AddPrimitiveAtom(&m_cachedPrimitive, image, isClampTextureMode, isTextureSRGB, isTexturePremultipliedAlpha, blendMode); - } + // Set the texture and other render state required + AZ::Data::Instance image = attachmentImage; + bool isClampTextureMode = true; + bool isTextureSRGB = true; + bool isTexturePremultipliedAlpha = true; + LyShine::BlendMode blendMode = LyShine::BlendMode::Normal; + renderGraph->AddPrimitive(&m_cachedPrimitive, image, isClampTextureMode, isTextureSRGB, isTexturePremultipliedAlpha, blendMode); } } } diff --git a/Gems/LyShine/Code/Source/UiFaderComponent.h b/Gems/LyShine/Code/Source/UiFaderComponent.h index 218eab3794..3de1514023 100644 --- a/Gems/LyShine/Code/Source/UiFaderComponent.h +++ b/Gems/LyShine/Code/Source/UiFaderComponent.h @@ -169,5 +169,5 @@ private: // data int m_renderTargetHeight = 0; //! cached rendering data for performance optimization of rendering the render target to screen - DynUiPrimitive m_cachedPrimitive; + LyShine::UiPrimitive m_cachedPrimitive; }; diff --git a/Gems/LyShine/Code/Source/UiFlipbookAnimationComponent.cpp b/Gems/LyShine/Code/Source/UiFlipbookAnimationComponent.cpp index 9b09630957..b68f92c0fc 100644 --- a/Gems/LyShine/Code/Source/UiFlipbookAnimationComponent.cpp +++ b/Gems/LyShine/Code/Source/UiFlipbookAnimationComponent.cpp @@ -19,7 +19,6 @@ #include #include #include -#include namespace { diff --git a/Gems/LyShine/Code/Source/UiImageComponent.cpp b/Gems/LyShine/Code/Source/UiImageComponent.cpp index fac8a83c71..baf210a629 100644 --- a/Gems/LyShine/Code/Source/UiImageComponent.cpp +++ b/Gems/LyShine/Code/Source/UiImageComponent.cpp @@ -13,8 +13,6 @@ #include #include -#include - #include #include #include @@ -188,7 +186,7 @@ namespace //! Set the values for an image vertex //! This helper function is used so that we only have to initialize textIndex and texHasColorChannel in one place - void SetVertex(SVF_P2F_C4B_T2F_F4B& vert, const Vec2& pos, uint32 color, const Vec2& uv) + void SetVertex(LyShine::UiPrimitiveVertex& vert, const Vec2& pos, uint32 color, const Vec2& uv) { vert.xy = pos; vert.color.dcolor = color; @@ -201,7 +199,7 @@ namespace //! Set the values for an image vertex //! This version of the helper function takes AZ vectors - void SetVertex(SVF_P2F_C4B_T2F_F4B& vert, const AZ::Vector2& pos, uint32 color, const AZ::Vector2& uv) + void SetVertex(LyShine::UiPrimitiveVertex& vert, const AZ::Vector2& pos, uint32 color, const AZ::Vector2& uv) { SetVertex(vert, Vec2(pos.GetX(), pos.GetY()), color, Vec2(uv.GetX(), uv.GetY())); } @@ -215,7 +213,7 @@ namespace //! \param packedColor The color value to be put in every vertex //! \param transform The transform to be applied to the points //! \param xValues The x-values for the edges and borders - void FillVerts(SVF_P2F_C4B_T2F_F4B* verts, [[maybe_unused]] uint32 numVerts, uint32 numX, uint32 numY, uint32 packedColor, const AZ::Matrix4x4& transform, + void FillVerts(LyShine::UiPrimitiveVertex* verts, [[maybe_unused]] uint32 numVerts, uint32 numX, uint32 numY, uint32 packedColor, const AZ::Matrix4x4& transform, float* xValues, float* yValues, float* sValues, float* tValues, bool isPixelAligned) { @@ -280,11 +278,7 @@ namespace AZ::Data::Instance image; if (sprite) { - CSprite* cSprite = static_cast(sprite); // LYSHINE_ATOM_TODO - find a different solution from downcasting - GHI #3570 - if (cSprite) - { - image = cSprite->GetImage(); - } + image = sprite->GetImage(); } return image; @@ -359,7 +353,6 @@ void UiImageComponent::SetOverrideSprite(ISprite* sprite, AZ::u32 cellIndex) //////////////////////////////////////////////////////////////////////////////////////////////////// void UiImageComponent::Render(LyShine::IRenderGraph* renderGraph) { - // get fade value (tracked by UiRenderer) and compute the desired alpha for the image float fade = renderGraph->GetAlphaFade(); float desiredAlpha = m_overrideAlpha * fade; @@ -382,9 +375,8 @@ void UiImageComponent::Render(LyShine::IRenderGraph* renderGraph) ImageType imageType = m_imageType; -#ifdef LYSHINE_ATOM_TODO // support default white texture // if there is no texture we will just use a white texture and want to stretch it - const bool spriteOrTextureIsNull = sprite == nullptr || sprite->GetTexture() == nullptr; + const bool spriteOrTextureIsNull = sprite == nullptr || sprite->GetImage() == nullptr; // Zero texture size may occur even if the UiImageComponent has a valid non-zero-sized texture, // because a canvas can be requested to Render() before the texture asset is done loading. @@ -405,12 +397,6 @@ void UiImageComponent::Render(LyShine::IRenderGraph* renderGraph) { imageType = ImageType::Stretched; } -#else - if (sprite == nullptr) - { - imageType = ImageType::Stretched; - } -#endif switch (imageType) { @@ -463,7 +449,7 @@ void UiImageComponent::Render(LyShine::IRenderGraph* renderGraph) if (m_cachedPrimitive.m_vertices[0].color.a != desiredPackedAlpha) { // go through all the cached vertices and update the alpha values - UCol desiredPackedColor = m_cachedPrimitive.m_vertices[0].color; + LyShine::UCol desiredPackedColor = m_cachedPrimitive.m_vertices[0].color; desiredPackedColor.a = desiredPackedAlpha; for (int i = 0; i < m_cachedPrimitive.m_numVertices; ++i) { @@ -471,7 +457,7 @@ void UiImageComponent::Render(LyShine::IRenderGraph* renderGraph) } } -#ifdef LYSHINE_ATOM_TODO // keeping this code for future phase (masks and render targets) +#ifdef LYSHINE_ATOM_TODO // [GHI #6270] Support RTT using Atom ITexture* texture = (sprite) ? sprite->GetTexture() : nullptr; bool isClampTextureMode = m_imageType == ImageType::Tiled ? false : true; bool isTextureSRGB = IsSpriteTypeRenderTarget() && m_isRenderTargetSRGB; @@ -484,11 +470,7 @@ void UiImageComponent::Render(LyShine::IRenderGraph* renderGraph) bool isTextureSRGB = IsSpriteTypeRenderTarget() && m_isRenderTargetSRGB; bool isTexturePremultipliedAlpha = false; // we are not rendering from a render target with alpha in it - LyShine::RenderGraph* lyRenderGraph = static_cast(renderGraph); // LYSHINE_ATOM_TODO - find a different solution from downcasting - GHI #3570 - if (lyRenderGraph) - { - lyRenderGraph->AddPrimitiveAtom(&m_cachedPrimitive, image, isClampTextureMode, isTextureSRGB, isTexturePremultipliedAlpha, m_blendMode); - } + renderGraph->AddPrimitive(&m_cachedPrimitive, image, isClampTextureMode, isTextureSRGB, isTexturePremultipliedAlpha, m_blendMode); #endif } } @@ -1535,7 +1517,7 @@ void UiImageComponent::RenderSingleQuad(const AZ::Vector2* positions, const AZ:: // points are a clockwise quad IDraw2d::Rounding pixelRounding = IsPixelAligned() ? IDraw2d::Rounding::Nearest : IDraw2d::Rounding::None; const uint32 numVertices = 4; - SVF_P2F_C4B_T2F_F4B vertices[numVertices]; + LyShine::UiPrimitiveVertex vertices[numVertices]; for (int i = 0; i < numVertices; ++i) { AZ::Vector2 roundedPoint = Draw2dHelper::RoundXY(positions[i], pixelRounding); @@ -1594,7 +1576,7 @@ void UiImageComponent::RenderLinearFilledQuad(const AZ::Vector2* positions, cons // points are a clockwise quad IDraw2d::Rounding pixelRounding = IsPixelAligned() ? IDraw2d::Rounding::Nearest : IDraw2d::Rounding::None; const uint32 numVertices = 4; - SVF_P2F_C4B_T2F_F4B vertices[numVertices]; + LyShine::UiPrimitiveVertex vertices[numVertices]; for (int i = 0; i < numVertices; ++i) { @@ -1653,7 +1635,7 @@ void UiImageComponent::RenderRadialFilledQuad(const AZ::Vector2* positions, cons // Fill vertices (rotated based on startingEdge). const int numVertices = 7; // The maximum amount of vertices that can be used - SVF_P2F_C4B_T2F_F4B verts[numVertices]; + LyShine::UiPrimitiveVertex verts[numVertices]; for (int i = 1; i < 5; ++i) { int srcIndex = (4 + i + startingEdge) % 4; @@ -1701,7 +1683,7 @@ void UiImageComponent::RenderRadialCornerFilledQuad(const AZ::Vector2* positions { // This fills the vertices (rotating them based on the origin edge) similar to RenderSingleQuad, then edits a vertex based on m_fillAmount. const uint32 numVerts = 4; - SVF_P2F_C4B_T2F_F4B verts[numVerts]; + LyShine::UiPrimitiveVertex verts[numVerts]; int vertexOffset = 0; if (m_fillCornerOrigin == FillCornerOrigin::TopLeft) { @@ -1754,7 +1736,7 @@ void UiImageComponent::RenderRadialEdgeFilledQuad(const AZ::Vector2* positions, { // This fills the vertices (rotating them based on the origin edge) similar to RenderSingleQuad, then edits a vertex based on m_fillAmount. const uint32 numVertices = 5; // Need an extra vertex for the origin. - SVF_P2F_C4B_T2F_F4B verts[numVertices]; + LyShine::UiPrimitiveVertex verts[numVertices]; int vertexOffset = 0; if (m_fillEdgeOrigin == FillEdgeOrigin::Left) { @@ -1916,7 +1898,7 @@ template void UiImageComponent::RenderSlicedFillModeNoneSprite { // fill out the verts const uint32 numVertices = numValues * numValues; - SVF_P2F_C4B_T2F_F4B vertices[numVertices]; + LyShine::UiPrimitiveVertex vertices[numVertices]; FillVerts(vertices, numVertices, numValues, numValues, packedColor, transform, xValues, yValues, sValues, tValues, IsPixelAligned()); int totalIndices = m_fillCenter ? numIndicesIn9Slice : numIndicesIn9SliceExcludingCenter; @@ -1932,7 +1914,7 @@ template void UiImageComponent::RenderSlicedLinearFilledSprite // 2. Fill vertices in the same way as a standard sliced sprite const uint32 numVertices = numValues * numValues; - SVF_P2F_C4B_T2F_F4B vertices[numVertices]; + LyShine::UiPrimitiveVertex vertices[numVertices]; ClipValuesForSlicedLinearFill(numValues, xValues, yValues, sValues, tValues); @@ -1950,7 +1932,7 @@ template void UiImageComponent::RenderSlicedRadialFilledSprite { // build the verts on the stack const uint32 numVertices = numValues * numValues; - SVF_P2F_C4B_T2F_F4B verts[numVertices]; + LyShine::UiPrimitiveVertex verts[numVertices]; // Fill the vertices with the generated xy and st values. FillVerts(verts, numVertices, numValues, numValues, packedColor, transform, xValues, yValues, sValues, tValues, IsPixelAligned()); @@ -1968,7 +1950,7 @@ template void UiImageComponent::RenderSlicedRadialCornerOrEdge { // build the verts on the stack const uint32 numVertices = numValues * numValues; - SVF_P2F_C4B_T2F_F4B verts[numVertices]; + LyShine::UiPrimitiveVertex verts[numVertices]; // Fill the vertices with the generated xy and st values. FillVerts(verts, numVertices, numValues, numValues, packedColor, transform, xValues, yValues, sValues, tValues, IsPixelAligned()); @@ -2053,12 +2035,12 @@ void UiImageComponent::ClipValuesForSlicedLinearFill(uint32 numValues, float* xV } //////////////////////////////////////////////////////////////////////////////////////////////////// -void UiImageComponent::ClipAndRenderForSlicedRadialFill(uint32 numVertsPerSide, uint32 numVerts, const SVF_P2F_C4B_T2F_F4B* verts, uint32 totalIndices, const uint16* indices) +void UiImageComponent::ClipAndRenderForSlicedRadialFill(uint32 numVertsPerSide, uint32 numVerts, const LyShine::UiPrimitiveVertex* verts, uint32 totalIndices, const uint16* indices) { // 1. Calculate two points of lines from the center to a point based on m_fillAmount and m_fillOrigin. // 2. Clip the triangles of the sprite against those lines based on the fill amount. - SVF_P2F_C4B_T2F_F4B renderVerts[numIndicesIn9Slice * 4]; // ClipToLine doesn't check for duplicate vertices for speed, so this is the maximum we'll need. + LyShine::UiPrimitiveVertex renderVerts[numIndicesIn9Slice * 4]; // ClipToLine doesn't check for duplicate vertices for speed, so this is the maximum we'll need. uint16 renderIndices[numIndicesIn9Slice * 4] = { 0 }; float fillOffset = AZ::DegToRad(m_fillStartAngle); @@ -2102,7 +2084,7 @@ void UiImageComponent::ClipAndRenderForSlicedRadialFill(uint32 numVertsPerSide, // Clips against first half line and then rotating line and adds results to render list. for (uint32 currentIndex = 0; currentIndex < totalIndices; currentIndex += 3) { - SVF_P2F_C4B_T2F_F4B intermediateVerts[maxTemporaryVerts]; + LyShine::UiPrimitiveVertex intermediateVerts[maxTemporaryVerts]; uint16 intermediateIndices[maxTemporaryIndices]; int intermedateVertexOffset = 0; int intermediateIndicesUsed = ClipToLine(verts, &indices[currentIndex], intermediateVerts, intermediateIndices, intermedateVertexOffset, 0, lineOrigin, firstHalfFixedLineEnd); @@ -2118,7 +2100,7 @@ void UiImageComponent::ClipAndRenderForSlicedRadialFill(uint32 numVertsPerSide, // Clips against first half line and adds results to render list then clips against the second half line and rotating line and also adds those results to render list. for (uint32 currentIndex = 0; currentIndex < totalIndices; currentIndex += 3) { - SVF_P2F_C4B_T2F_F4B intermediateVerts[maxTemporaryVerts]; + LyShine::UiPrimitiveVertex intermediateVerts[maxTemporaryVerts]; uint16 intermediateIndices[maxTemporaryIndices]; indicesUsed = ClipToLine(verts, &indices[currentIndex], renderVerts, renderIndices, vertexOffset, numIndicesToRender, lineOrigin, firstHalfFixedLineEnd); numIndicesToRender += indicesUsed; @@ -2137,12 +2119,12 @@ void UiImageComponent::ClipAndRenderForSlicedRadialFill(uint32 numVertsPerSide, } //////////////////////////////////////////////////////////////////////////////////////////////////// -void UiImageComponent::ClipAndRenderForSlicedRadialCornerOrEdgeFill(uint32 numVertsPerSide, uint32 numVerts, const SVF_P2F_C4B_T2F_F4B* verts, uint32 totalIndices, const uint16* indices) +void UiImageComponent::ClipAndRenderForSlicedRadialCornerOrEdgeFill(uint32 numVertsPerSide, uint32 numVerts, const LyShine::UiPrimitiveVertex* verts, uint32 totalIndices, const uint16* indices) { // 1. Calculate two points of a line from either the corner or center of an edge to a point based on m_fillAmount. // 2. Clip the triangles of the sprite against that line. - SVF_P2F_C4B_T2F_F4B renderVerts[numIndicesIn9Slice * 2]; // ClipToLine doesn't check for duplicate vertices for speed, so this is the maximum we'll need. + LyShine::UiPrimitiveVertex renderVerts[numIndicesIn9Slice * 2]; // ClipToLine doesn't check for duplicate vertices for speed, so this is the maximum we'll need. uint16 renderIndices[numIndicesIn9Slice * 2] = { 0 }; // Generate the start and direction of the line to clip against based on the fill origin and fill amount. @@ -2209,11 +2191,11 @@ void UiImageComponent::ClipAndRenderForSlicedRadialCornerOrEdgeFill(uint32 numVe } //////////////////////////////////////////////////////////////////////////////////////////////////// -int UiImageComponent::ClipToLine(const SVF_P2F_C4B_T2F_F4B* vertices, const uint16* indices, SVF_P2F_C4B_T2F_F4B* renderVertices, uint16* renderIndices, int& vertexOffset, int renderIndexOffset, const Vec2& lineOrigin, const Vec2& lineEnd) +int UiImageComponent::ClipToLine(const LyShine::UiPrimitiveVertex* vertices, const uint16* indices, LyShine::UiPrimitiveVertex* renderVertices, uint16* renderIndices, int& vertexOffset, int renderIndexOffset, const Vec2& lineOrigin, const Vec2& lineEnd) { Vec2 lineVector = lineEnd - lineOrigin; - SVF_P2F_C4B_T2F_F4B lastVertex = vertices[indices[2]]; - SVF_P2F_C4B_T2F_F4B currentVertex; + LyShine::UiPrimitiveVertex lastVertex = vertices[indices[2]]; + LyShine::UiPrimitiveVertex currentVertex; int verticesAdded = 0; for (int i = 0; i < 3; ++i) @@ -2235,7 +2217,7 @@ int UiImageComponent::ClipToLine(const SVF_P2F_C4B_T2F_F4B* vertices, const uint { //add calculated intersection float intersectionDistance = (vertexToLine.x * perpendicularLineVector.x + vertexToLine.y * perpendicularLineVector.y) / (triangleEdgeDirection.x * perpendicularLineVector.x + triangleEdgeDirection.y * perpendicularLineVector.y); - SVF_P2F_C4B_T2F_F4B intersectPoint; + LyShine::UiPrimitiveVertex intersectPoint; SetVertex(intersectPoint, lastVertex.xy + triangleEdgeDirection * intersectionDistance, lastVertex.color.dcolor, lastVertex.st + (currentVertex.st - lastVertex.st) * intersectionDistance); @@ -2252,7 +2234,7 @@ int UiImageComponent::ClipToLine(const SVF_P2F_C4B_T2F_F4B* vertices, const uint { //add calculated intersection float intersectionDistance = (vertexToLine.x * perpendicularLineVector.x + vertexToLine.y * perpendicularLineVector.y) / (triangleEdgeDirection.x * perpendicularLineVector.x + triangleEdgeDirection.y * perpendicularLineVector.y); - SVF_P2F_C4B_T2F_F4B intersectPoint; + LyShine::UiPrimitiveVertex intersectPoint; SetVertex(intersectPoint, lastVertex.xy + triangleEdgeDirection * intersectionDistance, lastVertex.color.dcolor, lastVertex.st + (currentVertex.st - lastVertex.st) * intersectionDistance); @@ -2288,12 +2270,12 @@ int UiImageComponent::ClipToLine(const SVF_P2F_C4B_T2F_F4B* vertices, const uint } //////////////////////////////////////////////////////////////////////////////////////////////////// -void UiImageComponent::RenderTriangleList(const SVF_P2F_C4B_T2F_F4B* vertices, const uint16* indices, int numVertices, int numIndices) +void UiImageComponent::RenderTriangleList(const LyShine::UiPrimitiveVertex* vertices, const uint16* indices, int numVertices, int numIndices) { if (numVertices != m_cachedPrimitive.m_numVertices) { ClearCachedVertices(); - m_cachedPrimitive.m_vertices = new SVF_P2F_C4B_T2F_F4B[numVertices]; + m_cachedPrimitive.m_vertices = new LyShine::UiPrimitiveVertex[numVertices]; m_cachedPrimitive.m_numVertices = numVertices; } @@ -2304,7 +2286,7 @@ void UiImageComponent::RenderTriangleList(const SVF_P2F_C4B_T2F_F4B* vertices, c m_cachedPrimitive.m_numIndices = numIndices; } - memcpy(m_cachedPrimitive.m_vertices, vertices, sizeof(SVF_P2F_C4B_T2F_F4B) * numVertices); + memcpy(m_cachedPrimitive.m_vertices, vertices, sizeof(LyShine::UiPrimitiveVertex) * numVertices); memcpy(m_cachedPrimitive.m_indices, indices, sizeof(uint16) * numIndices); m_isRenderCacheDirty = false; diff --git a/Gems/LyShine/Code/Source/UiImageComponent.h b/Gems/LyShine/Code/Source/UiImageComponent.h index 0b93d5f8e5..bac8d8e455 100644 --- a/Gems/LyShine/Code/Source/UiImageComponent.h +++ b/Gems/LyShine/Code/Source/UiImageComponent.h @@ -19,6 +19,7 @@ #include #include #include +#include #include #include @@ -26,8 +27,6 @@ #include -#include - class ITexture; class ISprite; @@ -200,12 +199,12 @@ private: // member functions template void RenderSlicedRadialCornerOrEdgeFilledSprite(uint32 packedColor, const AZ::Matrix4x4& transform, float* xValues, float* yValues, float* sValues, float* tValues); void ClipValuesForSlicedLinearFill(uint32 numValues, float* xValues, float* yValues, float* sValues, float* tValues); - void ClipAndRenderForSlicedRadialFill(uint32 numVertsPerside, uint32 numVerts, const SVF_P2F_C4B_T2F_F4B* verts, uint32 totalIndices, const uint16* indices); - void ClipAndRenderForSlicedRadialCornerOrEdgeFill(uint32 numVertsPerside, uint32 numVerts, const SVF_P2F_C4B_T2F_F4B* verts, uint32 totalIndices, const uint16* indices); + void ClipAndRenderForSlicedRadialFill(uint32 numVertsPerside, uint32 numVerts, const LyShine::UiPrimitiveVertex* verts, uint32 totalIndices, const uint16* indices); + void ClipAndRenderForSlicedRadialCornerOrEdgeFill(uint32 numVertsPerside, uint32 numVerts, const LyShine::UiPrimitiveVertex* verts, uint32 totalIndices, const uint16* indices); - int ClipToLine(const SVF_P2F_C4B_T2F_F4B* vertices, const uint16* indices, SVF_P2F_C4B_T2F_F4B* newVertex, uint16* renderIndices, int& vertexOffset, int idxOffset, const Vec2& lineOrigin, const Vec2& lineEnd); + int ClipToLine(const LyShine::UiPrimitiveVertex* vertices, const uint16* indices, LyShine::UiPrimitiveVertex* newVertex, uint16* renderIndices, int& vertexOffset, int idxOffset, const Vec2& lineOrigin, const Vec2& lineEnd); - void RenderTriangleList(const SVF_P2F_C4B_T2F_F4B* vertices, const uint16* indices, int numVertices, int numIndices); + void RenderTriangleList(const LyShine::UiPrimitiveVertex* vertices, const uint16* indices, int numVertices, int numIndices); void ClearCachedVertices(); void ClearCachedIndices(); void MarkRenderCacheDirty(); @@ -294,6 +293,6 @@ private: // data bool m_isAlphaOverridden; // cached rendering data for performance optimization - DynUiPrimitive m_cachedPrimitive; + LyShine::UiPrimitive m_cachedPrimitive; bool m_isRenderCacheDirty = true; }; diff --git a/Gems/LyShine/Code/Source/UiImageSequenceComponent.cpp b/Gems/LyShine/Code/Source/UiImageSequenceComponent.cpp index d954cf2747..4e7d22d96a 100644 --- a/Gems/LyShine/Code/Source/UiImageSequenceComponent.cpp +++ b/Gems/LyShine/Code/Source/UiImageSequenceComponent.cpp @@ -26,7 +26,7 @@ namespace { //! Set the values for an image vertex //! This helper function is used so that we only have to initialize textIndex and texHasColorChannel in one place - void SetVertex(SVF_P2F_C4B_T2F_F4B& vert, const Vec2& pos, uint32 color, const Vec2& uv) + void SetVertex(LyShine::UiPrimitiveVertex& vert, const Vec2& pos, uint32 color, const Vec2& uv) { vert.xy = pos; vert.color.dcolor = color; @@ -39,7 +39,7 @@ namespace //! Set the values for an image vertex //! This version of the helper function takes AZ vectors - void SetVertex(SVF_P2F_C4B_T2F_F4B& vert, const AZ::Vector2& pos, uint32 color, const AZ::Vector2& uv) + void SetVertex(LyShine::UiPrimitiveVertex& vert, const AZ::Vector2& pos, uint32 color, const AZ::Vector2& uv) { SetVertex(vert, Vec2(pos.GetX(), pos.GetY()), color, Vec2(uv.GetX(), uv.GetY())); } @@ -97,7 +97,7 @@ void UiImageSequenceComponent::Render(LyShine::IRenderGraph* renderGraph) return; } - CSprite* sprite = static_cast(m_spriteList[m_sequenceIndex]); // LYSHINE_ATOM_TODO - find a different solution from downcasting - GHI #3570 + ISprite* sprite = m_spriteList[m_sequenceIndex]; // get fade value (tracked by UiRenderer) and compute the desired alpha for the image float fade = renderGraph->GetAlphaFade(); @@ -146,7 +146,7 @@ void UiImageSequenceComponent::Render(LyShine::IRenderGraph* renderGraph) if (m_cachedPrimitive.m_vertices[0].color.a != desiredPackedAlpha) { // go through all the cached vertices and update the alpha values - UCol desiredPackedColor = m_cachedPrimitive.m_vertices[0].color; + LyShine::UCol desiredPackedColor = m_cachedPrimitive.m_vertices[0].color; desiredPackedColor.a = desiredPackedAlpha; for (int i = 0; i < m_cachedPrimitive.m_numVertices; ++i) { @@ -165,12 +165,8 @@ void UiImageSequenceComponent::Render(LyShine::IRenderGraph* renderGraph) LyShine::BlendMode blendMode = LyShine::BlendMode::Normal; // Add the quad to the render graph - LyShine::RenderGraph* lyRenderGraph = static_cast(renderGraph); // LYSHINE_ATOM_TODO - find a different solution from downcasting - GHI #3570 - if (lyRenderGraph) - { - lyRenderGraph->AddPrimitiveAtom(&m_cachedPrimitive, image, - isClampTextureMode, isTextureSRGB, isTexturePremultipliedAlpha, blendMode); - } + renderGraph->AddPrimitive(&m_cachedPrimitive, image, + isClampTextureMode, isTextureSRGB, isTexturePremultipliedAlpha, blendMode); } } @@ -540,7 +536,7 @@ void UiImageSequenceComponent::RenderSingleQuad(const AZ::Vector2* positions, co // points are a clockwise quad IDraw2d::Rounding pixelRounding = IsPixelAligned() ? IDraw2d::Rounding::Nearest : IDraw2d::Rounding::None; const uint32 numVertices = 4; - SVF_P2F_C4B_T2F_F4B vertices[numVertices]; + LyShine::UiPrimitiveVertex vertices[numVertices]; for (int i = 0; i < numVertices; ++i) { AZ::Vector2 roundedPoint = Draw2dHelper::RoundXY(positions[i], pixelRounding); @@ -554,12 +550,12 @@ void UiImageSequenceComponent::RenderSingleQuad(const AZ::Vector2* positions, co } //////////////////////////////////////////////////////////////////////////////////////////////////// -void UiImageSequenceComponent::RenderTriangleList(const SVF_P2F_C4B_T2F_F4B* vertices, const uint16* indices, int numVertices, int numIndices) +void UiImageSequenceComponent::RenderTriangleList(const LyShine::UiPrimitiveVertex* vertices, const uint16* indices, int numVertices, int numIndices) { if (numVertices != m_cachedPrimitive.m_numVertices) { ClearCachedVertices(); - m_cachedPrimitive.m_vertices = new SVF_P2F_C4B_T2F_F4B[numVertices]; + m_cachedPrimitive.m_vertices = new LyShine::UiPrimitiveVertex[numVertices]; m_cachedPrimitive.m_numVertices = numVertices; } @@ -570,7 +566,7 @@ void UiImageSequenceComponent::RenderTriangleList(const SVF_P2F_C4B_T2F_F4B* ver m_cachedPrimitive.m_numIndices = numIndices; } - memcpy(m_cachedPrimitive.m_vertices, vertices, sizeof(SVF_P2F_C4B_T2F_F4B) * numVertices); + memcpy(m_cachedPrimitive.m_vertices, vertices, sizeof(LyShine::UiPrimitiveVertex) * numVertices); memcpy(m_cachedPrimitive.m_indices, indices, sizeof(uint16) * numIndices); m_isRenderCacheDirty = false; diff --git a/Gems/LyShine/Code/Source/UiImageSequenceComponent.h b/Gems/LyShine/Code/Source/UiImageSequenceComponent.h index 84be0021f4..063bd836ff 100644 --- a/Gems/LyShine/Code/Source/UiImageSequenceComponent.h +++ b/Gems/LyShine/Code/Source/UiImageSequenceComponent.h @@ -17,12 +17,12 @@ #include #include #include +#include #include #include #include -#include //! \brief Image component capable of indexing and displaying from multiple image files in a directory. //! @@ -137,7 +137,7 @@ private: // member functions void RenderStretchedToFitOrFillSprite(ISprite* sprite, int cellIndex, uint32 packedColor, bool toFit); void RenderSingleQuad(const AZ::Vector2* positions, const AZ::Vector2* uvs, uint32 packedColor); bool IsPixelAligned(); - void RenderTriangleList(const SVF_P2F_C4B_T2F_F4B* vertices, const uint16* indices, int numVertices, int numIndices); + void RenderTriangleList(const LyShine::UiPrimitiveVertex* vertices, const uint16* indices, int numVertices, int numIndices); void ClearCachedVertices(); void ClearCachedIndices(); void MarkRenderCacheDirty(); @@ -157,6 +157,6 @@ private: // data ImageType m_imageType = ImageType::Fixed; //!< Affects how the texture/sprite is mapped to the image rectangle // cached rendering data for performance optimization - DynUiPrimitive m_cachedPrimitive; + LyShine::UiPrimitive m_cachedPrimitive; bool m_isRenderCacheDirty = true; }; diff --git a/Gems/LyShine/Code/Source/UiInteractableState.cpp b/Gems/LyShine/Code/Source/UiInteractableState.cpp index 6027ecf3d7..d2c09201c6 100644 --- a/Gems/LyShine/Code/Source/UiInteractableState.cpp +++ b/Gems/LyShine/Code/Source/UiInteractableState.cpp @@ -21,9 +21,8 @@ #include #include #include -#include +#include -#include #include "EditorPropertyTypes.h" #include "Sprite.h" diff --git a/Gems/LyShine/Code/Source/UiMaskComponent.cpp b/Gems/LyShine/Code/Source/UiMaskComponent.cpp index b6ffc2ae89..09975d1351 100644 --- a/Gems/LyShine/Code/Source/UiMaskComponent.cpp +++ b/Gems/LyShine/Code/Source/UiMaskComponent.cpp @@ -13,7 +13,6 @@ #include #include -#include "IRenderer.h" #include "RenderToTextureBus.h" #include "RenderGraph.h" #include @@ -558,7 +557,7 @@ void UiMaskComponent::CreateOrResizeRenderTarget(const AZ::Vector2& pixelAligned m_viewportTopLeft = pixelAlignedTopLeft; m_viewportSize = renderTargetSize; - // LYSHINE_ATOM_TODO: optimize by reusing/resizing targets + // [LYSHINE_ATOM_TODO][GHI #6271] Optimize by reusing existing render targets DestroyRenderTarget(); // Create a render target that this element and its children will be rendered to @@ -624,7 +623,7 @@ void UiMaskComponent::UpdateCachedPrimitive(const AZ::Vector2& pixelAlignedTopLe { // verts not yet allocated, allocate them now const int numIndices = 6; - m_cachedPrimitive.m_vertices = new SVF_P2F_C4B_T2F_F4B[numVertices]; + m_cachedPrimitive.m_vertices = new LyShine::UiPrimitiveVertex[numVertices]; m_cachedPrimitive.m_numVertices = numVertices; static uint16 indices[numIndices] = { 0, 1, 2, 2, 3, 0 }; @@ -722,8 +721,7 @@ void UiMaskComponent::RenderUsingGradientMask(LyShine::IRenderGraph* renderGraph // mask render target { // Start building the render to texture node in the render graph - LyShine::RenderGraph* lyRenderGraph = static_cast(renderGraph); // LYSHINE_ATOM_TODO - find a different solution from downcasting - GHI #3570 - lyRenderGraph->BeginRenderToTexture(maskAttachmentImage, m_viewportTopLeft, m_viewportSize, clearColor); + renderGraph->BeginRenderToTexture(maskAttachmentImage, m_viewportTopLeft, m_viewportSize, clearColor); // Render the visual component for this element (if there is one) plus the child mask element (if there is one) RenderMaskPrimitives(renderGraph, renderInterface, childMaskElementInterface, isInGame); @@ -735,8 +733,7 @@ void UiMaskComponent::RenderUsingGradientMask(LyShine::IRenderGraph* renderGraph // content render target { // Start building the render to texture node for the content render target in the render graph - LyShine::RenderGraph* lyRenderGraph = static_cast(renderGraph); // LYSHINE_ATOM_TODO - find a different solution from downcasting - GHI #3570 - lyRenderGraph->BeginRenderToTexture(contentAttachmentImage, m_viewportTopLeft, m_viewportSize, clearColor); + renderGraph->BeginRenderToTexture(contentAttachmentImage, m_viewportTopLeft, m_viewportSize, clearColor); // Render the "content" - the child elements excluding the child mask element (if any) RenderContentPrimitives(renderGraph, elementInterface, childMaskElementInterface, numChildren, isInGame); @@ -761,7 +758,7 @@ void UiMaskComponent::RenderUsingGradientMask(LyShine::IRenderGraph* renderGraph if (m_cachedPrimitive.m_vertices[0].color.a != desiredPackedAlpha) { // go through all the cached vertices and update the alpha values - UCol desiredPackedColor = m_cachedPrimitive.m_vertices[0].color; + LyShine::UCol desiredPackedColor = m_cachedPrimitive.m_vertices[0].color; desiredPackedColor.a = static_cast(desiredPackedAlpha); for (int i = 0; i < m_cachedPrimitive.m_numVertices; ++i) { @@ -772,26 +769,22 @@ void UiMaskComponent::RenderUsingGradientMask(LyShine::IRenderGraph* renderGraph // Add a primitive to do the alpha mask { - LyShine::RenderGraph* lyRenderGraph = static_cast(renderGraph); // LYSHINE_ATOM_TODO - find a different solution from downcasting - GHI #3570 - if (lyRenderGraph) - { - // Set the texture and other render state required - AZ::Data::Instance contentImage = contentAttachmentImage; - AZ::Data::Instance maskImage = maskAttachmentImage; - bool isClampTextureMode = true; - bool isTextureSRGB = true; - bool isTexturePremultipliedAlpha = false; - LyShine::BlendMode blendMode = LyShine::BlendMode::Normal; + // Set the texture and other render state required + AZ::Data::Instance contentImage = contentAttachmentImage; + AZ::Data::Instance maskImage = maskAttachmentImage; + bool isClampTextureMode = true; + bool isTextureSRGB = true; + bool isTexturePremultipliedAlpha = false; + LyShine::BlendMode blendMode = LyShine::BlendMode::Normal; - // add a render node to render using the two render targets, one as an alpha mask of the other - lyRenderGraph->AddAlphaMaskPrimitiveAtom(&m_cachedPrimitive, - contentAttachmentImage, - maskAttachmentImage, - isClampTextureMode, - isTextureSRGB, - isTexturePremultipliedAlpha, - blendMode); - } + // add a render node to render using the two render targets, one as an alpha mask of the other + renderGraph->AddAlphaMaskPrimitive(&m_cachedPrimitive, + contentAttachmentImage, + maskAttachmentImage, + isClampTextureMode, + isTextureSRGB, + isTexturePremultipliedAlpha, + blendMode); } } } diff --git a/Gems/LyShine/Code/Source/UiMaskComponent.h b/Gems/LyShine/Code/Source/UiMaskComponent.h index 8e04fa0b4f..33f7f93124 100644 --- a/Gems/LyShine/Code/Source/UiMaskComponent.h +++ b/Gems/LyShine/Code/Source/UiMaskComponent.h @@ -13,6 +13,7 @@ #include #include #include +#include #include #include @@ -187,10 +188,6 @@ private: // data //! When rendering to a texture this is the attachment image for the render target AZ::RHI::AttachmentId m_contentAttachmentImageId; - - //! When rendering to a texture this is our depth surface, we use the same one for rendering the mask elements - //! and the content elements - it is cleared in between. - SDepthTexture* m_renderTargetDepthSurface = nullptr; //! When rendering to a texture this is the texture ID of the render target //! When rendering to a texture this is the attachment image for the render target @@ -205,7 +202,7 @@ private: // data int m_renderTargetHeight = 0; //! cached rendering data for performance optimization of rendering the render target to screen - DynUiPrimitive m_cachedPrimitive; + LyShine::UiPrimitive m_cachedPrimitive; #ifndef _RELEASE //! This variable is only used to prevent spamming a warning message each frame (for nested stencil masks) diff --git a/Gems/LyShine/Code/Source/UiNavigationHelpers.h b/Gems/LyShine/Code/Source/UiNavigationHelpers.h index 5b655b531f..98191b3da4 100644 --- a/Gems/LyShine/Code/Source/UiNavigationHelpers.h +++ b/Gems/LyShine/Code/Source/UiNavigationHelpers.h @@ -9,7 +9,7 @@ #include #include -#include +#include namespace AzFramework { diff --git a/Gems/LyShine/Code/Source/UiNavigationSettings.h b/Gems/LyShine/Code/Source/UiNavigationSettings.h index 829ff8d817..09a327f9c2 100644 --- a/Gems/LyShine/Code/Source/UiNavigationSettings.h +++ b/Gems/LyShine/Code/Source/UiNavigationSettings.h @@ -8,7 +8,7 @@ #pragma once #include -#include +#include /////////////////////////////////////////////////////////////////////////////////////////////////// class UiNavigationSettings diff --git a/Gems/LyShine/Code/Source/UiParticleEmitterComponent.cpp b/Gems/LyShine/Code/Source/UiParticleEmitterComponent.cpp index c6fd144d3a..b999480940 100644 --- a/Gems/LyShine/Code/Source/UiParticleEmitterComponent.cpp +++ b/Gems/LyShine/Code/Source/UiParticleEmitterComponent.cpp @@ -15,6 +15,7 @@ #include #include #include +#include #include @@ -73,7 +74,7 @@ void UiParticleEmitterComponent::SetIsEmitting(bool emitParticles) { m_nextEmitTime = (m_isHitParticleCountOnActivate ? -m_particleLifetime : 0.0f); m_emitterAge = 0.0f; - m_random.SetSeed(m_isRandomSeedFixed ? m_randomSeed : gEnv->pTimer->GetAsyncTime().GetMilliSecondsAsInt64()); + m_random.SetSeed(m_isRandomSeedFixed ? m_randomSeed : aznumeric_cast(AZ::GetElapsedTimeMs())); } m_isEmitting = emitParticles; } @@ -785,11 +786,7 @@ void UiParticleEmitterComponent::Render(LyShine::IRenderGraph* renderGraph) AZ::Data::Instance image; if (m_sprite) { - CSprite* sprite = static_cast(m_sprite); // LYSHINE_ATOM_TODO - find a different solution from downcasting - GHI #3570 - if (sprite) - { - image = sprite->GetImage(); - } + image = m_sprite->GetImage(); } bool isClampTextureMode = true; @@ -832,7 +829,7 @@ void UiParticleEmitterComponent::Render(LyShine::IRenderGraph* renderGraph) // particlesToRender is the max particles we will render, we could render less if some have zero alpha for (AZ::u32 i = 0; i < particlesToRender; ++i) { - SVF_P2F_C4B_T2F_F4B* firstVertexOfParticle = &m_cachedPrimitive.m_vertices[totalVerticesInserted]; + LyShine::UiPrimitiveVertex* firstVertexOfParticle = &m_cachedPrimitive.m_vertices[totalVerticesInserted]; if (m_particleContainer[i].FillVertices(firstVertexOfParticle, renderParameters, transform)) { @@ -843,11 +840,7 @@ void UiParticleEmitterComponent::Render(LyShine::IRenderGraph* renderGraph) m_cachedPrimitive.m_numVertices = totalVerticesInserted; m_cachedPrimitive.m_numIndices = totalParticlesInserted * indicesPerParticle; - LyShine::RenderGraph* lyRenderGraph = static_cast(renderGraph); // LYSHINE_ATOM_TODO - find a different solution from downcasting - GHI #3570 - if (lyRenderGraph) - { - lyRenderGraph->AddPrimitiveAtom(&m_cachedPrimitive, image, isClampTextureMode, isTextureSRGB, isTexturePremultipliedAlpha, m_blendMode); - } + renderGraph->AddPrimitive(&m_cachedPrimitive, image, isClampTextureMode, isTextureSRGB, isTexturePremultipliedAlpha, m_blendMode); } //////////////////////////////////////////////////////////////////////////////////////////////////// @@ -1844,7 +1837,7 @@ void UiParticleEmitterComponent::ResetParticleBuffers() { delete [] m_cachedPrimitive.m_vertices; } - m_cachedPrimitive.m_vertices = new SVF_P2F_C4B_T2F_F4B[numVertices]; + m_cachedPrimitive.m_vertices = new LyShine::UiPrimitiveVertex[numVertices]; m_particleContainer.clear(); m_particleContainer.reserve(m_particleBufferSize); diff --git a/Gems/LyShine/Code/Source/UiParticleEmitterComponent.h b/Gems/LyShine/Code/Source/UiParticleEmitterComponent.h index 452e0ad01a..51db5cebef 100644 --- a/Gems/LyShine/Code/Source/UiParticleEmitterComponent.h +++ b/Gems/LyShine/Code/Source/UiParticleEmitterComponent.h @@ -25,8 +25,6 @@ #include -#include - //////////////////////////////////////////////////////////////////////////////////////////////////// class UiParticleEmitterComponent : public AZ::Component @@ -349,5 +347,5 @@ protected: // data AZStd::vector m_particleContainer; AZ::u32 m_particleBufferSize = 0; - DynUiPrimitive m_cachedPrimitive; + LyShine::UiPrimitive m_cachedPrimitive; }; diff --git a/Gems/LyShine/Code/Source/UiRenderer.cpp b/Gems/LyShine/Code/Source/UiRenderer.cpp index 98b376ec8b..3b835dec92 100644 --- a/Gems/LyShine/Code/Source/UiRenderer.cpp +++ b/Gems/LyShine/Code/Source/UiRenderer.cpp @@ -57,7 +57,7 @@ void UiRenderer::OnBootstrapSceneReady(AZ::RPI::Scene* bootstrapScene) // At this point the RPI is ready for use // Load the UI shader - const char* uiShaderFilepath = "Shaders/LyShineUI.azshader"; + const char* uiShaderFilepath = "LyShine/Shaders/LyShineUI.azshader"; AZ::Data::Instance uiShader = AZ::RPI::LoadCriticalShader(uiShaderFilepath); // Create scene to be used by the dynamic draw context @@ -76,7 +76,7 @@ void UiRenderer::OnBootstrapSceneReady(AZ::RPI::Scene* bootstrapScene) // Create a dynamic draw context for UI Canvas drawing for the scene m_dynamicDraw = CreateDynamicDrawContext(uiShader); - if (m_dynamicDraw) + if (m_dynamicDraw && m_dynamicDraw->IsReady()) { // Cache shader data such as input indices for later use CacheShaderData(m_dynamicDraw); @@ -85,7 +85,7 @@ void UiRenderer::OnBootstrapSceneReady(AZ::RPI::Scene* bootstrapScene) } else { - AZ_Error(LogName, false, "Failed to create a dynamic draw context for LyShine. \ + AZ_Error(LogName, false, "Failed to create or initialize a dynamic draw context for LyShine. \ This can happen if the LyShine pass hasn't been added to the main render pipeline."); } } @@ -96,13 +96,13 @@ AZ::RPI::ScenePtr UiRenderer::CreateScene(AZStd::shared_ptrEnableAllFeatureProcessors(); // LYSHINE_ATOM_TODO - have a UI pipeline and enable only needed fps + atomScene->EnableAllFeatureProcessors(); // [LYSHINE_ATOM_TODO][GHI #6272] Enable minimal feature processors // Assign the new scene to the specified viewport context viewportContext->SetRenderScene(atomScene); // Create a render pipeline and add it to the scene - AZStd::string pipelineAssetPath = "passes/MainRenderPipeline.azasset"; // LYSHINE_ATOM_TODO - make and use a UI pipeline + AZStd::string pipelineAssetPath = "passes/MainRenderPipeline.azasset"; // [LYSHINE_ATOM_TODO][GHI #6272] Use a custom UI pipeline AZ::Data::Asset pipelineAsset = AZ::RPI::AssetUtils::LoadAssetByProductPath(pipelineAssetPath.c_str(), AZ::RPI::AssetUtils::TraceLevel::Error); AZStd::shared_ptr windowContext = viewportContext->GetWindowContext(); auto renderPipeline = AZ::RPI::RenderPipeline::CreateRenderPipelineForWindow(pipelineAsset, *windowContext.get()); @@ -216,17 +216,11 @@ void UiRenderer::BeginUiFrameRender() m_texturesUsedInFrame.clear(); } #endif - - // Various platform drivers expect all texture slots used in the shader to be bound - BindNullTexture(); } //////////////////////////////////////////////////////////////////////////////////////////////////// void UiRenderer::EndUiFrameRender() { - // We never want to leave a texture bound that could get unloaded before the next render - // So bind the global white texture for all the texture units we use. - BindNullTexture(); } //////////////////////////////////////////////////////////////////////////////////////////////////// @@ -384,45 +378,6 @@ void UiRenderer::DecrementStencilRef() --m_stencilRef; } -#ifdef LYSHINE_ATOM_TODO -//////////////////////////////////////////////////////////////////////////////////////////////////// -void UiRenderer::SetTexture(ITexture* texture, int texUnit, bool clamp) -{ - if (!texture) - { - texture = m_renderer->GetWhiteTexture(); - } - else - { - texture->SetClamp(clamp); - } - - m_renderer->SetTexture(texture->GetTextureID(), texUnit); - -#ifndef _RELEASE - if (m_debugTextureDataRecordLevel > 0) - { - m_texturesUsedInFrame.insert(texture); - } -#endif -} -#endif - - -//////////////////////////////////////////////////////////////////////////////////////////////////// -void UiRenderer::BindNullTexture() -{ -#ifdef LYSHINE_ATOM_TODO - // Bind the global white texture for all the texture units we use - const int MaxTextures = 16; - int whiteTexId = m_renderer->GetWhiteTextureId(); - for (int texUnit = 0; texUnit < MaxTextures; ++texUnit) - { - m_renderer->SetTexture(whiteTexId, texUnit); - } -#endif -} - #ifndef _RELEASE //////////////////////////////////////////////////////////////////////////////////////////////////// @@ -436,38 +391,42 @@ void UiRenderer::DebugDisplayTextureData(int recordingOption) { if (recordingOption > 0) { -#ifdef LYSHINE_ATOM_TODO // Convert debug to use Atom images // compute the total area of all the textures, also create a vector that we can sort by area - AZStd::vector textures; + AZStd::vector, uint32_t>> textures; int totalArea = 0; int totalDataSize = 0; - for (ITexture* texture : m_texturesUsedInFrame) + for (AZ::Data::Instance image : m_texturesUsedInFrame) { - int area = texture->GetWidth() * texture->GetHeight(); - int dataSize = texture->GetDataSize(); + const AZ::RHI::ImageDescriptor& imageDescriptor = image->GetRHIImage()->GetDescriptor(); + AZ::RHI::Size size = imageDescriptor.m_size; + int area = size.m_width * size.m_height; + uint32_t dataSize = AZ::RHI::GetFormatSize(imageDescriptor.m_format) * area; + totalArea += area; totalDataSize += dataSize; - textures.push_back(texture); + textures.push_back(AZStd::pair, uint32_t>(image, dataSize)); } // sort the vector by data size - std::sort( textures.begin( ), textures.end( ), [ ]( const ITexture* lhs, const ITexture* rhs ) + std::sort( textures.begin( ), textures.end( ), [ ]( const AZStd::pair, uint32_t> lhs, const AZStd::pair, uint32_t> rhs ) { - return lhs->GetDataSize() > rhs->GetDataSize(); + return lhs.second > rhs.second; }); - CDraw2d* draw2d = Draw2dHelper::GetDefaultDraw2d(); + IDraw2d* draw2d = Draw2dHelper::GetDefaultDraw2d(); // setup to render lines of text for the debug display - float xOffset = 20.0f; - float yOffset = 20.0f; + float dpiScale = GetViewportContext()->GetDpiScalingFactor(); + float xOffset = 20.0f * dpiScale; + float yOffset = 20.0f * dpiScale; auto blackTexture = AZ::RPI::ImageSystemInterface::Get()->GetSystemImage(AZ::RPI::SystemImage::Black); float textOpacity = 1.0f; - float backgroundRectOpacity = 0.75f; - const float lineSpacing = 20.0f; + float backgroundRectOpacity = 0.0f; // 0.75f; // [GHI #6515] Reenable background rect + const float fontSize = 8.0f; + const float lineSpacing = 20.0f * dpiScale; const AZ::Vector3 white(1,1,1); const AZ::Vector3 red(1,0.3f,0.3f); @@ -492,29 +451,61 @@ void UiRenderer::DebugDisplayTextureData(int recordingOption) { CDraw2d::TextOptions textOptions = draw2d->GetDefaultTextOptions(); textOptions.color = color; - AZ::Vector2 textSize = draw2d->GetTextSize(buffer, 16, &textOptions); + AZ::Vector2 textSize = draw2d->GetTextSize(buffer, fontSize, &textOptions); AZ::Vector2 rectTopLeft = AZ::Vector2(xOffset - 2, yOffset); AZ::Vector2 rectSize = AZ::Vector2(textSize.GetX() + 4, lineSpacing); draw2d->DrawImage(blackTexture, rectTopLeft, rectSize, backgroundRectOpacity); - draw2d->DrawText(buffer, AZ::Vector2(xOffset, yOffset), 16, textOpacity, &textOptions); + draw2d->DrawText(buffer, AZ::Vector2(xOffset, yOffset), fontSize, textOpacity, &textOptions); yOffset += lineSpacing; }; - int numTexturesUsedInFrame = m_texturesUsedInFrame.size(); + size_t numTexturesUsedInFrame = m_texturesUsedInFrame.size(); char buffer[200]; - sprintf_s(buffer, "There are %d unique UI textures rendered in this frame, the total texture area is %d (%d x %d), total data size is %d (%.2f MB)", + sprintf_s(buffer, "There are %zu unique UI textures rendered in this frame, the total texture area is %d (%d x %d), total data size is %d (%.2f MB)", numTexturesUsedInFrame, totalArea, xDim, yDim, totalDataSize, totalDataSizeMB); WriteLine(buffer, white); - sprintf_s(buffer, "Dimensions Data Size Format Texture name"); + sprintf_s(buffer, "Dimensions Data Size Format Texture name"); WriteLine(buffer, blue); - for (ITexture* texture : textures) + for (auto texture : textures) { - sprintf_s(buffer, "%4d x %4d, %9d %8s %s", - texture->GetWidth(), texture->GetHeight(), texture->GetDataSize(), texture->GetFormatName(), texture->GetName()); + AZ::Data::Instance image = texture.first; + const AZ::RHI::ImageDescriptor& imageDescriptor = image->GetRHIImage()->GetDescriptor(); + uint32_t width = imageDescriptor.m_size.m_width; + uint32_t height = imageDescriptor.m_size.m_height; + uint32_t dataSize = texture.second; + + const char* displayName = "Unnamed Texture"; + AZStd::string imagePath; + // Check if the image has been assigned a name (ex. if it's an attachment image or a cpu generated image) + const AZ::Name& imageName = image->GetRHIImage()->GetName(); + if (!imageName.IsEmpty()) + { + displayName = imageName.GetCStr(); + } + else + { + // Use the image's asset path as the display name + AZ::Data::AssetCatalogRequestBus::BroadcastResult(imagePath, + &AZ::Data::AssetCatalogRequests::GetAssetPathById, image->GetAssetId()); + if (!imagePath.empty()) + { + displayName = imagePath.c_str(); + } + } + + sprintf_s(buffer, "%4u x %4u, %9u %19s %s", + width, height, dataSize, AZ::RHI::ToString(imageDescriptor.m_format), displayName); WriteLine(buffer, white); } -#endif + } +} + +void UiRenderer::DebugUseTexture(AZ::Data::Instance image) +{ + if (m_debugTextureDataRecordLevel > 0) + { + m_texturesUsedInFrame.insert(image); } } diff --git a/Gems/LyShine/Code/Source/UiRenderer.h b/Gems/LyShine/Code/Source/UiRenderer.h index 0e15d41907..35705441f5 100644 --- a/Gems/LyShine/Code/Source/UiRenderer.h +++ b/Gems/LyShine/Code/Source/UiRenderer.h @@ -19,8 +19,6 @@ #include #endif -class ITexture; - //////////////////////////////////////////////////////////////////////////////////////////////////// //! UI render interface // @@ -137,6 +135,9 @@ public: // member functions //! Display debug texture data after rendering void DebugDisplayTextureData(int recordingOption); + + //! Track textures being used in the current frame + void DebugUseTexture(AZ::Data::Instance image); #endif private: // member functions @@ -179,6 +180,6 @@ protected: // attributes #ifndef _RELEASE int m_debugTextureDataRecordLevel = 0; - AZStd::unordered_set m_texturesUsedInFrame; // LYSHINE_ATOM_TODO - convert to RPI::Image + AZStd::unordered_set> m_texturesUsedInFrame; #endif }; diff --git a/Gems/LyShine/Code/Source/UiScrollBarComponent.cpp b/Gems/LyShine/Code/Source/UiScrollBarComponent.cpp index f4ea3f5e2c..b1a3530bd8 100644 --- a/Gems/LyShine/Code/Source/UiScrollBarComponent.cpp +++ b/Gems/LyShine/Code/Source/UiScrollBarComponent.cpp @@ -18,7 +18,7 @@ #include #include -#include +#include //////////////////////////////////////////////////////////////////////////////////////////////////// //! UiScrollerNotificationBus Behavior context handler class @@ -436,7 +436,8 @@ bool UiScrollBarComponent::HandlePressed(AZ::Vector2 point, bool& shouldStayActi else { // Move handle - m_lastMoveTime = gEnv->pTimer->GetCurrTime(ITimer::ETIMER_UI); + const AZ::TimeMs realTimeMs = AZ::GetRealElapsedTimeMs(); + m_lastMoveTime = AZ::TimeMsToSeconds(realTimeMs); m_moveDelayTime = 0.45f; MoveHandle(pointLoc); @@ -617,7 +618,8 @@ void UiScrollBarComponent::InputPositionUpdate(AZ::Vector2 point) LocRelativeToHandle pointLoc = GetLocationRelativeToHandle(point); if (pointLoc != LocRelativeToHandle::OnHandle) { - const float currentTime = gEnv->pTimer->GetCurrTime(ITimer::ETIMER_UI); + const AZ::TimeMs realTimeMs = AZ::GetRealElapsedTimeMs(); + const float currentTime = AZ::TimeMsToSeconds(realTimeMs); if (currentTime - m_lastMoveTime > m_moveDelayTime) { m_lastMoveTime = currentTime; diff --git a/Gems/LyShine/Code/Source/UiTextComponent.cpp b/Gems/LyShine/Code/Source/UiTextComponent.cpp index e18a9cefe2..01cfd49e99 100644 --- a/Gems/LyShine/Code/Source/UiTextComponent.cpp +++ b/Gems/LyShine/Code/Source/UiTextComponent.cpp @@ -598,7 +598,6 @@ namespace int curChar = 0; float curLineWidth = 0.0f; float biggestLineWidth = 0.0f; - float widthSum = 0.0f; // When iterating over batches, we need to know the previous // character, which we can only obtain if we keep track of the last @@ -690,7 +689,6 @@ namespace { // Reset the current line width to account for newline curLineWidth = curCharWidth; - widthSum += curLineWidth; } else if ((lastSpace > 0) && ((curChar - lastSpace) < 16) && (curChar - lastSpace >= 0)) // 16 is the default threshold { @@ -703,7 +701,6 @@ namespace } curLineWidth = curLineWidth - lastSpaceWidth + curCharWidth; - widthSum += curLineWidth; } else { @@ -723,7 +720,6 @@ namespace biggestLineWidth = curLineWidth; } - widthSum += curLineWidth; curLineWidth = curCharWidth; } @@ -1057,6 +1053,23 @@ namespace return maxLinesElementCanHold; } + //! Converts the vertex format used by FFont to the format being used by the dynamic draw context in LyShine. + //! + //! Note that the formats are currently identical, but this may change with the removal of more legacy code + void FontVertexToUiVertex(const SVF_P2F_C4B_T2F_F4B* fontVertices, LyShine::UiPrimitiveVertex* uiVertices, int numVertices) + { + for (int i = 0; i < numVertices; ++i) + { + uiVertices[i].xy = fontVertices[i].xy; + uiVertices[i].color.dcolor = fontVertices[i].color.dcolor; + uiVertices[i].st = fontVertices[i].st; + uiVertices[i].texIndex = fontVertices[i].texIndex; + uiVertices[i].texHasColorChannel = fontVertices[i].texHasColorChannel; + uiVertices[i].texIndex2 = fontVertices[i].texIndex2; + uiVertices[i].pad = fontVertices[i].pad; + } + } + } // anonymous namespace //////////////////////////////////////////////////////////////////////////////////////////////////// @@ -1827,14 +1840,10 @@ void UiTextComponent::Render(LyShine::IRenderGraph* renderGraph) for (UiTransformInterface::RectPoints& rect : rectPoints) { - DynUiPrimitive* primitive = renderGraph->GetDynamicQuadPrimitive(rect.pt, packedColor); + LyShine::UiPrimitive* primitive = renderGraph->GetDynamicQuadPrimitive(rect.pt, packedColor); primitive->m_next = nullptr; - LyShine::RenderGraph* lyRenderGraph = static_cast(renderGraph); // LYSHINE_ATOM_TODO - find a different solution from downcasting - GHI #3570 - if (lyRenderGraph) - { - lyRenderGraph->AddPrimitiveAtom(primitive, systemImage, isClampTextureMode, isTextureSRGB, isTexturePremultipliedAlpha, blendMode); - } + renderGraph->AddPrimitive(primitive, systemImage, isClampTextureMode, isTextureSRGB, isTexturePremultipliedAlpha, blendMode); } } @@ -1856,12 +1865,8 @@ void UiTextComponent::Render(LyShine::IRenderGraph* renderGraph) } bool isClampTextureMode = true; - LyShine::RenderGraph* lyRenderGraph = static_cast(renderGraph); // LYSHINE_ATOM_TODO - find a different solution from downcasting - GHI #3570 - if (lyRenderGraph) - { - lyRenderGraph->AddPrimitiveAtom(&batch->m_cachedPrimitive, texture, - isClampTextureMode, isTextureSRGB, isTexturePremultipliedAlpha, blendMode); - } + renderGraph->AddPrimitive(&batch->m_cachedPrimitive, texture, + isClampTextureMode, isTextureSRGB, isTexturePremultipliedAlpha, blendMode); } } @@ -1871,7 +1876,7 @@ void UiTextComponent::Render(LyShine::IRenderGraph* renderGraph) for (RenderCacheBatch* batch : m_renderCache.m_batches) { - AZ::FFont* font = static_cast(batch->m_font); // LYSHINE_ATOM_TODO - find a different solution from downcasting - GHI #3570 + AZ::FFont* font = static_cast(batch->m_font); // LYSHINE_ATOM_TODO - move IFont.h out of CryCommon/engine code AZ::Data::Instance fontImage = font->GetFontImage(); if (fontImage) { @@ -1894,12 +1899,8 @@ void UiTextComponent::Render(LyShine::IRenderGraph* renderGraph) // because there is no padding on the left of the glyphs. bool isClampTextureMode = false; - LyShine::RenderGraph* lyRenderGraph = static_cast(renderGraph); // LYSHINE_ATOM_TODO - find a different solution from downcasting - GHI #3570 - if (lyRenderGraph) - { - lyRenderGraph->AddPrimitiveAtom(&batch->m_cachedPrimitive, fontImage, - isClampTextureMode, isTextureSRGB, isTexturePremultipliedAlpha, blendMode); - } + renderGraph->AddPrimitive(&batch->m_cachedPrimitive, fontImage, + isClampTextureMode, isTextureSRGB, isTexturePremultipliedAlpha, blendMode); } } } @@ -4082,16 +4083,19 @@ void UiTextComponent::RenderDrawBatchLines( cacheBatch->m_font = drawBatch.font; cacheBatch->m_color = batchColor; - cacheBatch->m_cachedPrimitive.m_vertices = new SVF_P2F_C4B_T2F_F4B[numQuads * 4]; + cacheBatch->m_cachedPrimitive.m_vertices = new LyShine::UiPrimitiveVertex[numQuads * 4]; cacheBatch->m_cachedPrimitive.m_indices = new uint16[numQuads * 6]; + AZStd::vector vertices(numQuads * 4); uint32 numQuadsWritten = cacheBatch->m_font->WriteTextQuadsToBuffers( - cacheBatch->m_cachedPrimitive.m_vertices, cacheBatch->m_cachedPrimitive.m_indices, numQuads, + vertices.data(), cacheBatch->m_cachedPrimitive.m_indices, numQuads, cacheBatch->m_position.GetX(), cacheBatch->m_position.GetY(), 1.0f, cacheBatch->m_text.c_str(), true, fontContext); AZ_Assert(numQuadsWritten <= numQuads, "value returned from WriteTextQuadsToBuffers is larger than size allocated"); - cacheBatch->m_cachedPrimitive.m_numVertices = numQuadsWritten * 4; + int numVertices = numQuadsWritten * 4; + FontVertexToUiVertex(vertices.data(), cacheBatch->m_cachedPrimitive.m_vertices, numVertices); + cacheBatch->m_cachedPrimitive.m_numVertices = numVertices; cacheBatch->m_cachedPrimitive.m_numIndices = numQuadsWritten * 6; cacheBatch->m_fontTextureVersion = drawBatch.font->GetFontTextureVersion(); @@ -4152,7 +4156,7 @@ void UiTextComponent::RenderDrawBatchLines( cacheImageBatch->m_texture = drawBatch.image->m_texture; - cacheImageBatch->m_cachedPrimitive.m_vertices = new SVF_P2F_C4B_T2F_F4B[4]; + cacheImageBatch->m_cachedPrimitive.m_vertices = new LyShine::UiPrimitiveVertex[4]; for (int i = 0; i < 4; ++i) { cacheImageBatch->m_cachedPrimitive.m_vertices[i].xy = Vec2(imageQuad[i].GetX(), imageQuad[i].GetY()); @@ -4201,15 +4205,19 @@ void UiTextComponent::UpdateTextRenderBatchesForFontTextureChange() delete [] cacheBatch->m_cachedPrimitive.m_vertices; delete [] cacheBatch->m_cachedPrimitive.m_indices; - cacheBatch->m_cachedPrimitive.m_vertices = new SVF_P2F_C4B_T2F_F4B[numQuads * 4]; + cacheBatch->m_cachedPrimitive.m_vertices = new LyShine::UiPrimitiveVertex[numQuads * 4]; cacheBatch->m_cachedPrimitive.m_indices = new uint16[numQuads * 6]; } + AZStd::vector vertices(numQuads * 4); uint32 numQuadsWritten = cacheBatch->m_font->WriteTextQuadsToBuffers( - cacheBatch->m_cachedPrimitive.m_vertices, cacheBatch->m_cachedPrimitive.m_indices, numQuads, + vertices.data(), cacheBatch->m_cachedPrimitive.m_indices, numQuads, cacheBatch->m_position.GetX(), cacheBatch->m_position.GetY(), 1.0f, cacheBatch->m_text.c_str(), true, fontContext); - cacheBatch->m_cachedPrimitive.m_numVertices = numQuadsWritten * 4; + int numVertices = numQuadsWritten * 4; + FontVertexToUiVertex(vertices.data(), cacheBatch->m_cachedPrimitive.m_vertices, numVertices); + + cacheBatch->m_cachedPrimitive.m_numVertices = numVertices; cacheBatch->m_cachedPrimitive.m_numIndices = numQuadsWritten * 6; cacheBatch->m_fontTextureVersion = cacheBatch->m_font->GetFontTextureVersion(); @@ -4936,7 +4944,7 @@ AZStd::string UiTextComponent::GetLocalizedText([[maybe_unused]] const AZStd::st //////////////////////////////////////////////////////////////////////////////////////////////////// AZ::Vector2 UiTextComponent::CalculateAlignedPositionWithYOffset(const UiTransformInterface::RectPoints& points) { - AZ::Vector2 pos; + AZ::Vector2 pos = AZ::Vector2::CreateZero(); const DrawBatchLines& drawBatchLines = GetDrawBatchLines(); size_t numLinesOfText = drawBatchLines.batchLines.size(); diff --git a/Gems/LyShine/Code/Source/UiTextComponent.h b/Gems/LyShine/Code/Source/UiTextComponent.h index cc1f9bf393..6c75c13941 100644 --- a/Gems/LyShine/Code/Source/UiTextComponent.h +++ b/Gems/LyShine/Code/Source/UiTextComponent.h @@ -19,6 +19,7 @@ #include #include #include +#include #include #include @@ -31,7 +32,6 @@ #include #include -#include #include #include #include @@ -608,13 +608,13 @@ private: // types ColorB m_color; IFFont* m_font; uint32 m_fontTextureVersion; - DynUiPrimitive m_cachedPrimitive; + LyShine::UiPrimitive m_cachedPrimitive; }; struct RenderCacheImageBatch { AZ::Data::Instance m_texture; - DynUiPrimitive m_cachedPrimitive; + LyShine::UiPrimitive m_cachedPrimitive; }; struct RenderCacheData diff --git a/Gems/LyShine/Code/Source/UiTextInputComponent.cpp b/Gems/LyShine/Code/Source/UiTextInputComponent.cpp index e789301572..0e65256b92 100644 --- a/Gems/LyShine/Code/Source/UiTextInputComponent.cpp +++ b/Gems/LyShine/Code/Source/UiTextInputComponent.cpp @@ -13,11 +13,10 @@ #include #include #include +#include #include -#include -#include #include #include #include @@ -745,19 +744,17 @@ void UiTextInputComponent::Update(float deltaTime) // update cursor blinking, only if: this component is active, and blink interval set, and there is no text selection if (m_isEditing && m_cursorBlinkInterval > 0.0f && m_textSelectionStartPos == m_textCursorPos) { + const AZ::TimeMs realTimeMs = AZ::GetRealElapsedTimeMs(); + const float currentTime = AZ::TimeMsToSeconds(realTimeMs); if (m_cursorBlinkStartTime == 0.0f) { - m_cursorBlinkStartTime = gEnv->pTimer->GetCurrTime(ITimer::ETIMER_UI); + m_cursorBlinkStartTime = currentTime; } - else + else if (currentTime - m_cursorBlinkStartTime > m_cursorBlinkInterval * 0.5f) { - const float currentTime = gEnv->pTimer->GetCurrTime(ITimer::ETIMER_UI); - if (currentTime - m_cursorBlinkStartTime > m_cursorBlinkInterval * 0.5f) - { - m_textCursorColor.SetA(m_textCursorColor.GetA() ? 0.0f : 1.0f); - m_cursorBlinkStartTime = currentTime; - EBUS_EVENT_ID(m_textEntity, UiTextBus, SetSelectionRange, m_textSelectionStartPos, m_textCursorPos, m_textCursorColor); - } + m_textCursorColor.SetA(m_textCursorColor.GetA() ? 0.0f : 1.0f); + m_cursorBlinkStartTime = currentTime; + EBUS_EVENT_ID(m_textEntity, UiTextBus, SetSelectionRange, m_textSelectionStartPos, m_textCursorPos, m_textCursorColor); } } } diff --git a/Gems/LyShine/Code/Source/UiTooltipDisplayComponent.cpp b/Gems/LyShine/Code/Source/UiTooltipDisplayComponent.cpp index b1adfb6157..cad2dc2b5f 100644 --- a/Gems/LyShine/Code/Source/UiTooltipDisplayComponent.cpp +++ b/Gems/LyShine/Code/Source/UiTooltipDisplayComponent.cpp @@ -11,6 +11,7 @@ #include #include #include +#include #include #include @@ -19,8 +20,6 @@ #include #include -#include - //////////////////////////////////////////////////////////////////////////////////////////////////// // PUBLIC MEMBER FUNCTIONS //////////////////////////////////////////////////////////////////////////////////////////////////// @@ -173,8 +172,8 @@ void UiTooltipDisplayComponent::Hide() { // Since sequences can't have keys that represent current values, // only play the hide animation if the show animation has completed. - - m_timeSinceLastShown = gEnv->pTimer->GetCurrTime(ITimer::ETIMER_UI); + const AZ::TimeMs realTimeMs = AZ::GetRealElapsedTimeMs(); + m_timeSinceLastShown = AZ::TimeMsToSeconds(realTimeMs); EndTransitionState(); @@ -184,7 +183,8 @@ void UiTooltipDisplayComponent::Hide() case State::Shown: { - m_timeSinceLastShown = gEnv->pTimer->GetCurrTime(ITimer::ETIMER_UI); + const AZ::TimeMs realTimeMs = AZ::GetRealElapsedTimeMs(); + m_timeSinceLastShown = AZ::TimeMsToSeconds(realTimeMs); // Check if there is a hide animation to play IUiAnimationSystem* animSystem = nullptr; @@ -220,7 +220,9 @@ void UiTooltipDisplayComponent::Update() if (m_state == State::DelayBeforeShow) { // Check if it's time to show the tooltip - if ((gEnv->pTimer->GetCurrTime(ITimer::ETIMER_UI) - m_stateStartTime) >= m_curDelayTime) + const AZ::TimeMs realTimeMs = AZ::GetRealElapsedTimeMs(); + const float currentTime = AZ::TimeMsToSeconds(realTimeMs); + if ((currentTime - m_stateStartTime) >= m_curDelayTime) { // Make sure nothing has changed with the hover interactable if (m_tooltipElement.IsValid() && UiTooltipDataPopulatorBus::FindFirstHandler(m_tooltipElement)) @@ -238,7 +240,9 @@ void UiTooltipDisplayComponent::Update() // Check if it's time to hide the tooltip if (m_displayTime >= 0.0f) { - if ((gEnv->pTimer->GetCurrTime(ITimer::ETIMER_UI) - m_stateStartTime) >= m_displayTime) + const AZ::TimeMs realTimeMs = AZ::GetRealElapsedTimeMs(); + const float currentTime = AZ::TimeMsToSeconds(realTimeMs); + if ((currentTime - m_stateStartTime) >= m_displayTime) { // Hide tooltip Hide(); @@ -425,7 +429,8 @@ void UiTooltipDisplayComponent::Deactivate() void UiTooltipDisplayComponent::SetState(State state) { m_state = state; - m_stateStartTime = gEnv->pTimer->GetCurrTime(ITimer::ETIMER_UI); + const AZ::TimeMs realTimeMs = AZ::GetRealElapsedTimeMs(); + m_stateStartTime = AZ::TimeMsToSeconds(realTimeMs); switch (m_state) { diff --git a/Gems/LyShine/Code/Source/UiTransform2dComponent.cpp b/Gems/LyShine/Code/Source/UiTransform2dComponent.cpp index 40839fac66..d169e4ee68 100644 --- a/Gems/LyShine/Code/Source/UiTransform2dComponent.cpp +++ b/Gems/LyShine/Code/Source/UiTransform2dComponent.cpp @@ -12,8 +12,6 @@ #include #include -#include - #include #include #include diff --git a/Gems/LyShine/Code/Source/World/UiCanvasAssetRefComponent.cpp b/Gems/LyShine/Code/Source/World/UiCanvasAssetRefComponent.cpp index 59d764f297..933cca424a 100644 --- a/Gems/LyShine/Code/Source/World/UiCanvasAssetRefComponent.cpp +++ b/Gems/LyShine/Code/Source/World/UiCanvasAssetRefComponent.cpp @@ -11,7 +11,7 @@ #include #include #include -#include +#include //////////////////////////////////////////////////////////////////////////////////////////////////// //! UiCanvasAssetRefNotificationBus Behavior context handler class diff --git a/Gems/LyShine/Code/Source/World/UiCanvasOnMeshComponent.cpp b/Gems/LyShine/Code/Source/World/UiCanvasOnMeshComponent.cpp index 395e0dfc32..bde9a9ec8c 100644 --- a/Gems/LyShine/Code/Source/World/UiCanvasOnMeshComponent.cpp +++ b/Gems/LyShine/Code/Source/World/UiCanvasOnMeshComponent.cpp @@ -9,14 +9,11 @@ #include #include #include -#include #include #include #include #include -#include -#include #if !defined(_RELEASE) #include diff --git a/Gems/LyShine/Code/Tests/AnimationTest.cpp b/Gems/LyShine/Code/Tests/AnimationTest.cpp index 1fc662413f..92762d02ed 100644 --- a/Gems/LyShine/Code/Tests/AnimationTest.cpp +++ b/Gems/LyShine/Code/Tests/AnimationTest.cpp @@ -8,7 +8,8 @@ #include "LyShineTest.h" #include -#include +#include +#include #include #include @@ -17,21 +18,26 @@ namespace UnitTest { - class FrameTimerMock - : public TimerMock + struct AnimationTestStubTimer : public AZ::StubTimeSystem { - public: - const CTimeValue& GetFrameStartTime([[maybe_unused]] ITimer::ETimer which = ITimer::ETIMER_GAME) const override + AZ_RTTI(UnitTest::AnimationTestStubTimer, "{541EBC6C-E793-4433-9402-4CAD2F6770E3}", AZ::StubTimeSystem); + + AZ::TimeMs GetElapsedTimeMs() const override { - return m_frameStartTime; - } - void AddFrameStartTime(float seconds) - { - m_frameStartTime += CTimeValue(seconds); + return AZ::TimeUsToMs(m_timeUs); } - private: - CTimeValue m_frameStartTime = CTimeValue(); + AZ::TimeUs GetElapsedTimeUs() const override + { + return m_timeUs; + } + + void AddFrameTime(float sec) + { + m_timeUs += AZ::SecondsToTimeUs(sec); + } + + AZ::TimeUs m_timeUs = AZ::Time::ZeroTimeUs; }; class TrackEventHandler @@ -65,6 +71,22 @@ namespace UnitTest AZStd::vector m_recievedEvents; }; + class LyShineAnimationTestApplication : public AzFramework::Application + { + public: + LyShineAnimationTestApplication() + : AzFramework::Application() + { + m_timeSystem.reset(); + m_timeSystem = AZStd::make_unique(); + } + + UnitTest::AnimationTestStubTimer* GetTimer() + { + return azdynamic_cast(m_timeSystem.get()); + } + }; + class LyShineAnimationTest : public LyShineTest { @@ -74,31 +96,38 @@ namespace UnitTest { } + void SetupApplication() override + { + AZ::ComponentApplication::Descriptor appDesc; + appDesc.m_memoryBlocksByteSize = 10 * 1024 * 1024; + appDesc.m_recordingMode = AZ::Debug::AllocationRecords::RECORD_FULL; + appDesc.m_stackRecordLevels = 20; + + m_application = aznew LyShineAnimationTestApplication(); + m_systemEntity = m_application->Create(appDesc); + m_systemEntity->Init(); + m_systemEntity->Activate(); + } + void SetupEnvironment() override { LyShineTest::SetupEnvironment(); - m_data = AZStd::make_unique(); - m_env->m_stubEnv.pTimer = &m_data->m_timer; - m_canvasComponent = aznew UiCanvasComponent; } void TearDown() override { delete m_canvasComponent; - m_data.reset(); UiAnimationNotificationBus::ClearQueuedEvents(); LyShineTest::TearDown(); } - struct Data + UnitTest::AnimationTestStubTimer* GetTimer() { - testing::NiceMock m_timer; - }; - - AZStd::unique_ptr m_data; + return static_cast(m_application)->GetTimer(); + } UiCanvasComponent* m_canvasComponent; }; @@ -126,13 +155,14 @@ namespace UnitTest eventHandler.Connect(m_canvasComponent->GetEntityId()); animSys->PlaySequence(sequence, nullptr, true, true); + UnitTest::AnimationTestStubTimer* timer = GetTimer(); for (int frame = 0; frame < 2; ++frame) { static float deltaTime = 1.0f / 60.0f; animSys->PreUpdate(deltaTime); animSys->PostUpdate(deltaTime); - m_data->m_timer.AddFrameStartTime(deltaTime); + timer->AddFrameTime(deltaTime); } UiAnimationNotificationBus::ExecuteQueuedEvents(); diff --git a/Gems/LyShine/Code/Tests/LyShineEditorTest.cpp b/Gems/LyShine/Code/Tests/LyShineEditorTest.cpp index 60074ac0a0..59be8a85e1 100644 --- a/Gems/LyShine/Code/Tests/LyShineEditorTest.cpp +++ b/Gems/LyShine/Code/Tests/LyShineEditorTest.cpp @@ -85,7 +85,9 @@ protected: AZ::SettingsRegistryInterface* registry = AZ::SettingsRegistry::Get(); auto projectPathKey = AZ::SettingsRegistryInterface::FixedValueString(AZ::SettingsRegistryMergeUtils::BootstrapSettingsRootKey) + "/project_path"; - registry->Set(projectPathKey, "AutomatedTesting"); + AZ::IO::FixedMaxPath enginePath; + registry->Get(enginePath.Native(), AZ::SettingsRegistryMergeUtils::FilePathKey_EngineRootFolder); + registry->Set(projectPathKey, (enginePath / "AutomatedTesting").Native()); AZ::SettingsRegistryMergeUtils::MergeSettingsToRegistry_AddRuntimeFilePaths(*registry); m_app.Start(m_descriptor); diff --git a/Gems/LyShine/Code/Tests/LyShineTest.h b/Gems/LyShine/Code/Tests/LyShineTest.h index 250b53ee40..a2383f87cc 100644 --- a/Gems/LyShine/Code/Tests/LyShineTest.h +++ b/Gems/LyShine/Code/Tests/LyShineTest.h @@ -37,7 +37,7 @@ namespace UnitTest appDesc.m_recordingMode = AZ::Debug::AllocationRecords::RECORD_FULL; appDesc.m_stackRecordLevels = 20; - m_systemEntity = m_application.Create(appDesc); + m_systemEntity = m_application->Create(appDesc); m_systemEntity->Init(); m_systemEntity->Activate(); } @@ -54,7 +54,9 @@ namespace UnitTest { m_env.reset(); gEnv = m_priorEnv; - m_application.Destroy(); + m_application->Destroy(); + delete m_application; + m_application = nullptr; } struct StubEnv @@ -62,8 +64,8 @@ namespace UnitTest SSystemGlobalEnvironment m_stubEnv; }; - AZ::ComponentApplication m_application; - AZ::Entity* m_systemEntity; + AZ::ComponentApplication* m_application = nullptr; + AZ::Entity* m_systemEntity = nullptr; AZStd::unique_ptr m_env; SSystemGlobalEnvironment* m_priorEnv = nullptr; diff --git a/Gems/LyShine/Code/Tests/SerializationTest.cpp b/Gems/LyShine/Code/Tests/SerializationTest.cpp index 70ae590358..61d39294f8 100644 --- a/Gems/LyShine/Code/Tests/SerializationTest.cpp +++ b/Gems/LyShine/Code/Tests/SerializationTest.cpp @@ -30,7 +30,8 @@ namespace UnitTest modules.emplace_back(new LyShine::LyShineModule); }; - m_systemEntity = m_application.Create(appDesc, appStartup); + m_application = aznew AZ::ComponentApplication(); + m_systemEntity = m_application->Create(appDesc, appStartup); m_systemEntity->Init(); m_systemEntity->Activate(); } diff --git a/Gems/LyShine/Code/Tests/SpriteTest.cpp b/Gems/LyShine/Code/Tests/SpriteTest.cpp index ff9095a7d9..53fe27dcdc 100644 --- a/Gems/LyShine/Code/Tests/SpriteTest.cpp +++ b/Gems/LyShine/Code/Tests/SpriteTest.cpp @@ -8,7 +8,6 @@ #include "LyShineTest.h" #include -#include #include namespace UnitTest @@ -32,7 +31,8 @@ namespace UnitTest modules.emplace_back(new LyShine::LyShineModule); }; - m_systemEntity = m_application.Create(appDesc, appStartup); + m_application = aznew AZ::ComponentApplication(); + m_systemEntity = m_application->Create(appDesc, appStartup); m_systemEntity->Init(); m_systemEntity->Activate(); } @@ -50,7 +50,7 @@ namespace UnitTest }; -#ifdef LYSHINE_ATOM_TODO // [LYN-3359] - render target support using Atom +#ifdef LYSHINE_ATOM_TODO // [GHI #6270] Support RTT using Atom TEST_F(LyShineSpriteTest, Sprite_CanAcquireRenderTarget) { // initialize to create the static sprite cache diff --git a/Gems/LyShine/Code/Tests/UiTooltipComponentTest.cpp b/Gems/LyShine/Code/Tests/UiTooltipComponentTest.cpp index 65ca1ec280..8a3d9f2af6 100644 --- a/Gems/LyShine/Code/Tests/UiTooltipComponentTest.cpp +++ b/Gems/LyShine/Code/Tests/UiTooltipComponentTest.cpp @@ -24,54 +24,38 @@ #include #include #include +#include namespace UnitTest { - class MockTimer : public ITimer + struct UiTooltipTestStubTimer : public AZ::StubTimeSystem { - public: - mutable float m_timer_count = 1.0f; - MOCK_METHOD0(ResetTimer, void()); - MOCK_METHOD0(UpdateOnFrameStart, void()); - float GetCurrTime([[maybe_unused]] ETimer which) const - { - m_timer_count += 1.0f; - return m_timer_count; - } - MOCK_CONST_METHOD1(GetFrameStartTime, CTimeValue&(ETimer)); - MOCK_CONST_METHOD0(GetAsyncTime, CTimeValue()); - MOCK_METHOD0(GetAsyncCurTime, float()); - MOCK_CONST_METHOD1(GetFrameTime, float(ETimer)); - MOCK_CONST_METHOD0(GetRealFrameTime, float()); - MOCK_CONST_METHOD0(GetTimeScale, float()); - MOCK_CONST_METHOD1(GetTimeScale, float(uint32)); - MOCK_METHOD0(ClearTimeScales, void()); - MOCK_METHOD2(SetTimeScale, void(float, uint32)); - MOCK_METHOD1(EnableTimer, void(bool)); - MOCK_CONST_METHOD0(IsTimerEnabled, bool()); - MOCK_METHOD0(GetFrameRate, float()); - MOCK_METHOD2(GetProfileFrameBlending, float(float*, int*)); - MOCK_METHOD1(Serialize, void(TSerialize)); - MOCK_METHOD2(PauseTimer, bool(ETimer, bool)); - MOCK_METHOD1(IsTimerPaused, bool(ETimer)); - MOCK_METHOD2(SetTimer, bool(ETimer, float)); - MOCK_METHOD2(SecondsToDateUTC, void(time_t, struct tm&)); - MOCK_METHOD1(DateToSecondsUTC, time_t(struct tm&)); - MOCK_METHOD1(TicksToSeconds, float(int64)); - MOCK_METHOD0(GetTicksPerSecond, int64()); - MOCK_METHOD0(CreateNewTimer, ITimer*()); - MOCK_METHOD2(EnableFixedTimeMode, void(bool, float)); + AZ::TimeMs GetRealElapsedTimeMs() const override + { + m_time += AZ::TimeMs{ 1000 }; + return m_time; + } + mutable AZ::TimeMs m_time = AZ::Time::ZeroTimeMs; }; class UiTooltipTestApplication : public AzFramework::Application { + public: + UiTooltipTestApplication() + : AzFramework::Application() + { + m_timeSystem.reset(); + m_timeSystem = AZStd::make_unique(); + } + void Reflect(AZ::ReflectContext* context) override { AzFramework::Application::Reflect(context); UiSerialize::ReflectUiTypes(context); //< needed to serialize ui Anchor and Offset } + private: // override and only include system components required for tests. AZ::ComponentTypeList GetRequiredSystemComponents() const override { @@ -153,16 +137,13 @@ namespace UnitTest return AZStd::make_tuple(uiCanvasComponent, uiTooltipDisplayComponent, uiTooltipComponent); } - }; TEST_F(UiTooltipComponentTest, UiTooltipComponent_WillAppearOnHover) { - MockTimer m_timer = MockTimer(); SSystemGlobalEnvironment env; SSystemGlobalEnvironment* prevEnv = gEnv; gEnv = &env; - gEnv->pTimer = &m_timer; gEnv->pLyShine = nullptr; auto [uiCanvasComponent, uiTooltipDisplayComponent, uiTooltipComponent] = CreateUiCanvasWithTooltip(); @@ -186,11 +167,9 @@ namespace UnitTest TEST_F(UiTooltipComponentTest, UiTooltipComponent_HoverTooltipDisappearsOnPress) { - MockTimer m_timer = MockTimer(); SSystemGlobalEnvironment env; SSystemGlobalEnvironment* prevEnv = gEnv; gEnv = &env; - gEnv->pTimer = &m_timer; gEnv->pLyShine = nullptr; auto [uiCanvasComponent, uiTooltipDisplayComponent, uiTooltipComponent] = CreateUiCanvasWithTooltip(); @@ -212,11 +191,9 @@ namespace UnitTest TEST_F(UiTooltipComponentTest, UiTooltipComponent_TooltipAppearsOnPress) { - MockTimer m_timer = MockTimer(); SSystemGlobalEnvironment env; SSystemGlobalEnvironment* prevEnv = gEnv; gEnv = &env; - gEnv->pTimer = &m_timer; gEnv->pLyShine = nullptr; auto [uiCanvasComponent, uiTooltipDisplayComponent, uiTooltipComponent] = CreateUiCanvasWithTooltip(); @@ -238,11 +215,9 @@ namespace UnitTest TEST_F(UiTooltipComponentTest, UiTooltipComponent_TooltipDisappearsOnCanvasPrimaryRelease) { - MockTimer m_timer = MockTimer(); SSystemGlobalEnvironment env; SSystemGlobalEnvironment* prevEnv = gEnv; gEnv = &env; - gEnv->pTimer = &m_timer; gEnv->pLyShine = nullptr; auto [uiCanvasComponent, uiTooltipDisplayComponent, uiTooltipComponent] = CreateUiCanvasWithTooltip(); @@ -264,11 +239,9 @@ namespace UnitTest TEST_F(UiTooltipComponentTest, UiTooltipComponent_TooltipAppearsOnClick) { - MockTimer m_timer = MockTimer(); SSystemGlobalEnvironment env; SSystemGlobalEnvironment* prevEnv = gEnv; gEnv = &env; - gEnv->pTimer = &m_timer; gEnv->pLyShine = nullptr; auto [uiCanvasComponent, uiTooltipDisplayComponent, uiTooltipComponent] = CreateUiCanvasWithTooltip(); diff --git a/Gems/LyShine/Code/lyshine_static_files.cmake b/Gems/LyShine/Code/lyshine_static_files.cmake index 0c934eb057..1adbe1b796 100644 --- a/Gems/LyShine/Code/lyshine_static_files.cmake +++ b/Gems/LyShine/Code/lyshine_static_files.cmake @@ -9,6 +9,85 @@ set(FILES Source/Draw2d.cpp Include/LyShine/Draw2d.h + Include/LyShine/IDraw2d.h + Include/LyShine/IRenderGraph.h + Include/LyShine/ISprite.h + Include/LyShine/ILyShine.h + Include/LyShine/UiBase.h + Include/LyShine/UiLayoutCellBase.h + Include/LyShine/UiSerializeHelpers.h + Include/LyShine/UiComponentTypes.h + Include/LyShine/UiEntityContext.h + Include/LyShine/UiEditorDLLBus.h + Include/LyShine/UiRenderFormats.h + Include/LyShine/Animation/IUiAnimation.h + Include/LyShine/Bus/UiAnimationBus.h + Include/LyShine/Bus/UiAnimateEntityBus.h + Include/LyShine/Bus/UiButtonBus.h + Include/LyShine/Bus/UiCanvasBus.h + Include/LyShine/Bus/UiCanvasManagerBus.h + Include/LyShine/Bus/UiCanvasUpdateNotificationBus.h + Include/LyShine/Bus/UiCheckboxBus.h + Include/LyShine/Bus/UiDraggableBus.h + Include/LyShine/Bus/UiDropdownBus.h + Include/LyShine/Bus/UiDropdownOptionBus.h + Include/LyShine/Bus/UiDropTargetBus.h + Include/LyShine/Bus/UiDynamicLayoutBus.h + Include/LyShine/Bus/UiDynamicScrollBoxBus.h + Include/LyShine/Bus/UiEditorBus.h + Include/LyShine/Bus/UiEditorCanvasBus.h + Include/LyShine/Bus/UiEditorChangeNotificationBus.h + Include/LyShine/Bus/UiElementBus.h + Include/LyShine/Bus/UiEntityContextBus.h + Include/LyShine/Bus/UiFaderBus.h + Include/LyShine/Bus/UiFlipbookAnimationBus.h + Include/LyShine/Bus/UiGameEntityContextBus.h + Include/LyShine/Bus/UiImageBus.h + Include/LyShine/Bus/UiImageSequenceBus.h + Include/LyShine/Bus/UiIndexableImageBus.h + Include/LyShine/Bus/UiInitializationBus.h + Include/LyShine/Bus/UiInteractableActionsBus.h + Include/LyShine/Bus/UiInteractableBus.h + Include/LyShine/Bus/UiInteractableStatesBus.h + Include/LyShine/Bus/UiInteractionMaskBus.h + Include/LyShine/Bus/UiLayoutBus.h + Include/LyShine/Bus/UiLayoutCellBus.h + Include/LyShine/Bus/UiLayoutCellDefaultBus.h + Include/LyShine/Bus/UiLayoutColumnBus.h + Include/LyShine/Bus/UiLayoutControllerBus.h + Include/LyShine/Bus/UiLayoutFitterBus.h + Include/LyShine/Bus/UiLayoutGridBus.h + Include/LyShine/Bus/UiLayoutManagerBus.h + Include/LyShine/Bus/UiLayoutRowBus.h + Include/LyShine/Bus/UiMarkupButtonBus.h + Include/LyShine/Bus/UiMaskBus.h + Include/LyShine/Bus/UiNavigationBus.h + Include/LyShine/Bus/UiParticleEmitterBus.h + Include/LyShine/Bus/UiRadioButtonBus.h + Include/LyShine/Bus/UiRadioButtonCommunicationBus.h + Include/LyShine/Bus/UiRadioButtonGroupBus.h + Include/LyShine/Bus/UiRadioButtonGroupCommunicationBus.h + Include/LyShine/Bus/UiRenderBus.h + Include/LyShine/Bus/UiRenderControlBus.h + Include/LyShine/Bus/UiScrollableBus.h + Include/LyShine/Bus/UiScrollBarBus.h + Include/LyShine/Bus/UiScrollBoxBus.h + Include/LyShine/Bus/UiScrollerBus.h + Include/LyShine/Bus/UiSliderBus.h + Include/LyShine/Bus/UiSpawnerBus.h + Include/LyShine/Bus/UiSystemBus.h + Include/LyShine/Bus/UiTextBus.h + Include/LyShine/Bus/UiTextInputBus.h + Include/LyShine/Bus/UiTooltipBus.h + Include/LyShine/Bus/UiTooltipDataPopulatorBus.h + Include/LyShine/Bus/UiTooltipDisplayBus.h + Include/LyShine/Bus/UiTransform2dBus.h + Include/LyShine/Bus/UiTransformBus.h + Include/LyShine/Bus/UiVisualBus.h + Include/LyShine/Bus/Sprite/UiSpriteBus.h + Include/LyShine/Bus/World/UiCanvasOnMeshBus.h + Include/LyShine/Bus/World/UiCanvasRefBus.h + Include/LyShine/Bus/Tools/UiSystemToolsBus.h Source/LyShine.cpp Source/LyShine.h Source/LyShinePassDataBus.h diff --git a/Gems/LyShine/gem.json b/Gems/LyShine/gem.json index e2da8afa4d..f3c3fc2c67 100644 --- a/Gems/LyShine/gem.json +++ b/Gems/LyShine/gem.json @@ -2,6 +2,7 @@ "gem_name": "LyShine", "display_name": "LyShine", "license": "Apache-2.0 Or MIT", + "license_url": "https://github.com/o3de/o3de/blob/development/LICENSE.txt", "origin": "Open 3D Engine - o3de.org", "type": "Code", "summary": "The LyShine Gem provides the runtime UI system and creation tools for Open 3D Engine projects.", diff --git a/Gems/LyShineExamples/Assets/UI/Canvases/LyShineExamples/Comp/Button/Styles.uicanvas b/Gems/LyShineExamples/Assets/UI/Canvases/LyShineExamples/Comp/Button/Styles.uicanvas index 386df81e5c..6a41034bd2 100644 --- a/Gems/LyShineExamples/Assets/UI/Canvases/LyShineExamples/Comp/Button/Styles.uicanvas +++ b/Gems/LyShineExamples/Assets/UI/Canvases/LyShineExamples/Comp/Button/Styles.uicanvas @@ -569,7 +569,7 @@ - + @@ -591,7 +591,7 @@ - + @@ -626,7 +626,7 @@ - + @@ -650,7 +650,7 @@ - + @@ -1161,7 +1161,7 @@ - + @@ -1209,7 +1209,7 @@ - + @@ -1227,7 +1227,7 @@ - + @@ -1368,7 +1368,7 @@ - + @@ -1438,7 +1438,7 @@ - + @@ -1498,7 +1498,7 @@ - + @@ -1516,7 +1516,7 @@ - + @@ -1657,7 +1657,7 @@ - + @@ -1714,7 +1714,7 @@ - + @@ -1771,7 +1771,7 @@ - + diff --git a/Gems/LyShineExamples/Assets/UI/Canvases/LyShineExamples/Comp/Image/ImageTypes.uicanvas b/Gems/LyShineExamples/Assets/UI/Canvases/LyShineExamples/Comp/Image/ImageTypes.uicanvas index a0fbcbc0ce..0fb5e390d3 100644 --- a/Gems/LyShineExamples/Assets/UI/Canvases/LyShineExamples/Comp/Image/ImageTypes.uicanvas +++ b/Gems/LyShineExamples/Assets/UI/Canvases/LyShineExamples/Comp/Image/ImageTypes.uicanvas @@ -370,7 +370,7 @@ - + @@ -475,7 +475,7 @@ - + @@ -616,7 +616,7 @@ - + @@ -757,7 +757,7 @@ - + @@ -898,7 +898,7 @@ - + @@ -1118,7 +1118,7 @@ - + diff --git a/Gems/LyShineExamples/Assets/UI/Canvases/LyShineExamples/Comp/Mask/MaskingInteractables.uicanvas b/Gems/LyShineExamples/Assets/UI/Canvases/LyShineExamples/Comp/Mask/MaskingInteractables.uicanvas index a99a40c6be..e627fafd54 100644 --- a/Gems/LyShineExamples/Assets/UI/Canvases/LyShineExamples/Comp/Mask/MaskingInteractables.uicanvas +++ b/Gems/LyShineExamples/Assets/UI/Canvases/LyShineExamples/Comp/Mask/MaskingInteractables.uicanvas @@ -215,7 +215,7 @@ - + @@ -240,7 +240,7 @@ - + @@ -265,7 +265,7 @@ - + @@ -301,7 +301,7 @@ - + @@ -378,7 +378,7 @@ - + @@ -455,7 +455,7 @@ - + @@ -645,7 +645,7 @@ - + @@ -716,7 +716,7 @@ - + @@ -975,7 +975,7 @@ - + @@ -1000,7 +1000,7 @@ - + @@ -1052,7 +1052,7 @@ - + @@ -1129,7 +1129,7 @@ - + @@ -1206,7 +1206,7 @@ - + @@ -1296,7 +1296,7 @@ - + @@ -1399,7 +1399,7 @@ - + @@ -1425,7 +1425,7 @@ - + @@ -1475,7 +1475,7 @@ - + @@ -1658,7 +1658,7 @@ - + diff --git a/Gems/LyShineExamples/Assets/UI/Canvases/LyShineExamples/Comp/Text/ImageMarkup.uicanvas b/Gems/LyShineExamples/Assets/UI/Canvases/LyShineExamples/Comp/Text/ImageMarkup.uicanvas index 3bcd4f3db3..efa2e79b50 100644 --- a/Gems/LyShineExamples/Assets/UI/Canvases/LyShineExamples/Comp/Text/ImageMarkup.uicanvas +++ b/Gems/LyShineExamples/Assets/UI/Canvases/LyShineExamples/Comp/Text/ImageMarkup.uicanvas @@ -475,7 +475,7 @@ - + @@ -854,7 +854,7 @@ - + diff --git a/Gems/LyShineExamples/Assets/UI/Canvases/LyShineExamples/Performance/DrawCallsControl.uicanvas b/Gems/LyShineExamples/Assets/UI/Canvases/LyShineExamples/Performance/DrawCallsControl.uicanvas index 9b89289dd4..4d3f08a1cd 100644 --- a/Gems/LyShineExamples/Assets/UI/Canvases/LyShineExamples/Performance/DrawCallsControl.uicanvas +++ b/Gems/LyShineExamples/Assets/UI/Canvases/LyShineExamples/Performance/DrawCallsControl.uicanvas @@ -1910,7 +1910,7 @@ - + diff --git a/Gems/LyShineExamples/Assets/UI/Slices/LyShineExamples/DragAndDrop/ChildDropTargets/ChildDropTargets_Draggable.slice b/Gems/LyShineExamples/Assets/UI/Slices/LyShineExamples/DragAndDrop/ChildDropTargets/ChildDropTargets_Draggable.slice index 4c857ecb60..9e5c72b9ee 100644 --- a/Gems/LyShineExamples/Assets/UI/Slices/LyShineExamples/DragAndDrop/ChildDropTargets/ChildDropTargets_Draggable.slice +++ b/Gems/LyShineExamples/Assets/UI/Slices/LyShineExamples/DragAndDrop/ChildDropTargets/ChildDropTargets_Draggable.slice @@ -64,7 +64,7 @@ - + @@ -102,7 +102,7 @@ - + @@ -422,7 +422,7 @@ - + diff --git a/Gems/LyShineExamples/Assets/UI/Slices/LyShineExamples/DragAndDrop/ChildDropTargets/ChildDropTargets_EndDropTarget.slice b/Gems/LyShineExamples/Assets/UI/Slices/LyShineExamples/DragAndDrop/ChildDropTargets/ChildDropTargets_EndDropTarget.slice index cb6f6749d4..6f00a98399 100644 --- a/Gems/LyShineExamples/Assets/UI/Slices/LyShineExamples/DragAndDrop/ChildDropTargets/ChildDropTargets_EndDropTarget.slice +++ b/Gems/LyShineExamples/Assets/UI/Slices/LyShineExamples/DragAndDrop/ChildDropTargets/ChildDropTargets_EndDropTarget.slice @@ -174,7 +174,7 @@ - + diff --git a/Gems/LyShineExamples/Assets/UI/Slices/LyShineExamples/DragAndDrop/DraggableElement.slice b/Gems/LyShineExamples/Assets/UI/Slices/LyShineExamples/DragAndDrop/DraggableElement.slice index 8781688a94..3249e61b53 100644 --- a/Gems/LyShineExamples/Assets/UI/Slices/LyShineExamples/DragAndDrop/DraggableElement.slice +++ b/Gems/LyShineExamples/Assets/UI/Slices/LyShineExamples/DragAndDrop/DraggableElement.slice @@ -61,7 +61,7 @@ - + @@ -99,7 +99,7 @@ - + diff --git a/Gems/LyShineExamples/Assets/UI/Slices/LyShineExamples/NextButton.slice b/Gems/LyShineExamples/Assets/UI/Slices/LyShineExamples/NextButton.slice index 85046d4d1b..661fa6ccf3 100644 --- a/Gems/LyShineExamples/Assets/UI/Slices/LyShineExamples/NextButton.slice +++ b/Gems/LyShineExamples/Assets/UI/Slices/LyShineExamples/NextButton.slice @@ -63,7 +63,7 @@ - + @@ -118,7 +118,7 @@ - + diff --git a/Gems/LyShineExamples/Assets/seedList.seed b/Gems/LyShineExamples/Assets/seedList.seed index 777269ee7a..d730765515 100644 --- a/Gems/LyShineExamples/Assets/seedList.seed +++ b/Gems/LyShineExamples/Assets/seedList.seed @@ -11,10 +11,10 @@ - + - + @@ -27,10 +27,10 @@ - + - + @@ -43,10 +43,10 @@ - + - + @@ -59,10 +59,10 @@ - + - + @@ -75,10 +75,10 @@ - + - + @@ -91,26 +91,26 @@ - + - + - + - + - + - + diff --git a/Gems/LyShineExamples/Code/CMakeLists.txt b/Gems/LyShineExamples/Code/CMakeLists.txt index 5cd023db02..6e8f53d5cd 100644 --- a/Gems/LyShineExamples/Code/CMakeLists.txt +++ b/Gems/LyShineExamples/Code/CMakeLists.txt @@ -37,7 +37,7 @@ ly_add_target( BUILD_DEPENDENCIES PRIVATE Gem::LyShineExamples.Static - Gem::LmbrCentral + Gem::LmbrCentral.API ) # if enabled, LyShineExamples is used by all kinds of applications, however, the dependency to LmbrCentral is different diff --git a/Gems/LyShineExamples/Code/Source/UiCustomImageComponent.cpp b/Gems/LyShineExamples/Code/Source/UiCustomImageComponent.cpp index d5320d182e..542e18b98c 100644 --- a/Gems/LyShineExamples/Code/Source/UiCustomImageComponent.cpp +++ b/Gems/LyShineExamples/Code/Source/UiCustomImageComponent.cpp @@ -14,8 +14,6 @@ #include #include -#include - #include #include #include @@ -74,36 +72,25 @@ namespace LyShineExamples } //////////////////////////////////////////////////////////////////////////////////////////////////// - void UiCustomImageComponent::Render([[maybe_unused]] LyShine::IRenderGraph* renderGraph) + void UiCustomImageComponent::Render(LyShine::IRenderGraph* renderGraph) { -#ifdef LYSHINE_ATOM_TODO // [LYN-3635] convert to use Atom // get fade value (tracked by UiRenderer) and compute the desired alpha for the image float fade = renderGraph->GetAlphaFade(); float desiredAlpha = m_overrideAlpha * fade; uint8 desiredPackedAlpha = static_cast(desiredAlpha * 255.0f); - // if desired alpha is zero then no need to do any more - if (desiredPackedAlpha == 0) - { - return; - } - - ISprite* sprite = (m_overrideSprite) ? m_overrideSprite : m_sprite; - ITexture* texture = (sprite) ? sprite->GetTexture() : nullptr; - - if (!texture) - { - // if there is no texture we will just use a white texture - // TODO: Get a default atom texture here when possible - //texture = ???->EF_GetTextureByID(???->GetWhiteTextureId()); - } - if (m_isRenderCacheDirty) { RenderToCache(renderGraph); m_isRenderCacheDirty = false; } + // if desired alpha is zero then no need to do any more + if (desiredPackedAlpha == 0) + { + return; + } + // Render cache is now valid - render using the cache // If the fade value has changed we need to update the alpha values in the vertex colors but we do @@ -111,7 +98,7 @@ namespace LyShineExamples if (m_cachedPrimitive.m_vertices[0].color.a != desiredPackedAlpha) { // go through all the cached vertices and update the alpha values - UCol desiredPackedColor = m_cachedPrimitive.m_vertices[0].color; + LyShine::UCol desiredPackedColor = m_cachedPrimitive.m_vertices[0].color; desiredPackedColor.a = desiredPackedAlpha; for (int i = 0; i < m_cachedPrimitive.m_numVertices; ++i) { @@ -119,11 +106,12 @@ namespace LyShineExamples } } + ISprite* sprite = (m_overrideSprite) ? m_overrideSprite : m_sprite; + AZ::Data::Instance image = sprite->GetImage(); bool isTextureSRGB = false; bool isTexturePremultipliedAlpha = false; // we are not rendering from a render target with alpha in it LyShine::BlendMode blendMode = LyShine::BlendMode::Normal; - renderGraph->AddPrimitive(&m_cachedPrimitive, texture, m_clamp, isTextureSRGB, isTexturePremultipliedAlpha, blendMode); -#endif + renderGraph->AddPrimitive(&m_cachedPrimitive, image, m_clamp, isTextureSRGB, isTexturePremultipliedAlpha, blendMode); } //////////////////////////////////////////////////////////////////////////////////////////////////// @@ -371,7 +359,7 @@ namespace LyShineExamples delete [] m_cachedPrimitive.m_vertices; } - m_cachedPrimitive.m_vertices = new SVF_P2F_C4B_T2F_F4B[numVertices]; + m_cachedPrimitive.m_vertices = new LyShine::UiPrimitiveVertex[numVertices]; m_cachedPrimitive.m_numVertices = numVertices; } diff --git a/Gems/LyShineExamples/Code/Source/UiCustomImageComponent.h b/Gems/LyShineExamples/Code/Source/UiCustomImageComponent.h index f696228f5a..774cdd1809 100644 --- a/Gems/LyShineExamples/Code/Source/UiCustomImageComponent.h +++ b/Gems/LyShineExamples/Code/Source/UiCustomImageComponent.h @@ -11,6 +11,7 @@ #include #include #include +#include #include #include @@ -136,7 +137,7 @@ namespace LyShineExamples float m_overrideAlpha; // cached rendering data for performance optimization - DynUiPrimitive m_cachedPrimitive; + LyShine::UiPrimitive m_cachedPrimitive; bool m_isRenderCacheDirty = true; }; } diff --git a/Gems/LyShineExamples/gem.json b/Gems/LyShineExamples/gem.json index 122273f6d9..74d2b6fe51 100644 --- a/Gems/LyShineExamples/gem.json +++ b/Gems/LyShineExamples/gem.json @@ -2,6 +2,7 @@ "gem_name": "LyShineExamples", "display_name": "LyShine Examples", "license": "Apache-2.0 Or MIT", + "license_url": "https://github.com/o3de/o3de/blob/development/LICENSE.txt", "origin": "Open 3D Engine - o3de.org", "type": "Asset", "summary": "The LyShine Examples Gem provides example code and assets for LyShine, the runtime UI system and editor for Open 3D Engine projects.", diff --git a/Gems/Maestro/Code/Source/Cinematics/AnimSequence.cpp b/Gems/Maestro/Code/Source/Cinematics/AnimSequence.cpp index 6caa918227..49c319e780 100644 --- a/Gems/Maestro/Code/Source/Cinematics/AnimSequence.cpp +++ b/Gems/Maestro/Code/Source/Cinematics/AnimSequence.cpp @@ -40,12 +40,12 @@ CAnimSequence::CAnimSequence(IMovieSystem* pMovieSystem, uint32 id, SequenceType m_nextGenId = 1; m_pMovieSystem = pMovieSystem; m_flags = 0; - m_pParentSequence = NULL; + m_pParentSequence = nullptr; m_timeRange.Set(0, 10); m_bPaused = false; m_bActive = false; m_legacySequenceObject = nullptr; - m_activeDirector = NULL; + m_activeDirector = nullptr; m_activeDirectorNodeId = -1; m_precached = false; m_bResetting = false; @@ -271,7 +271,7 @@ IAnimNode* CAnimSequence::CreateNodeInternal(AnimNodeType nodeType, uint32 nNode return nullptr; // should never happen, null pointer guard } - CAnimNode* animNode = NULL; + CAnimNode* animNode = nullptr; if (nNodeId == -1) { @@ -331,7 +331,7 @@ IAnimNode* CAnimSequence::CreateNodeInternal(AnimNodeType nodeType, uint32 nNode if (AddNode(animNode)) { // If there isn't an active director, set it now. - if (m_activeDirector == NULL && animNode->GetType() == AnimNodeType::Director) + if (m_activeDirector == nullptr && animNode->GetType() == AnimNodeType::Director) { SetActiveDirector(animNode); } @@ -352,7 +352,7 @@ IAnimNode* CAnimSequence::CreateNode(XmlNodeRef node) { if (!GetMovieSystem()) { - return 0; // should never happen, null pointer guard + return nullptr; // should never happen, null pointer guard } AnimNodeType type; @@ -361,13 +361,13 @@ IAnimNode* CAnimSequence::CreateNode(XmlNodeRef node) XmlString name; if (!node->getAttr("Name", name)) { - return 0; + return nullptr; } IAnimNode* pNewNode = CreateNode(type); if (!pNewNode) { - return 0; + return nullptr; } pNewNode->SetName(name); @@ -377,7 +377,7 @@ IAnimNode* CAnimSequence::CreateNode(XmlNodeRef node) // Make sure de-serializing this node didn't just create an id conflict. This can happen sometimes // when copy/pasting nodes from a different sequence to this one. - for (auto curNode : m_nodes) + for (const auto& curNode : m_nodes) { CAnimNode* animNode = static_cast(curNode.get()); if (animNode->GetId() == newAnimNode->GetId() && animNode != newAnimNode) @@ -413,7 +413,7 @@ void CAnimSequence::RemoveNode(IAnimNode* node, bool removeChildRelationships) } if (removeChildRelationships && m_nodes[i]->GetParent() == node) { - m_nodes[i]->SetParent(0); + m_nodes[i]->SetParent(nullptr); } i++; @@ -423,7 +423,7 @@ void CAnimSequence::RemoveNode(IAnimNode* node, bool removeChildRelationships) if (m_activeDirector == node) { // Clear the active one. - m_activeDirector = NULL; + m_activeDirector = nullptr; m_activeDirectorNodeId = -1; // If there is another director node, set it as active. @@ -445,7 +445,7 @@ void CAnimSequence::RemoveAll() stl::free_container(m_nodes); stl::free_container(m_events); stl::free_container(m_nodesNeedToRender); - m_activeDirector = NULL; + m_activeDirector = nullptr; m_activeDirectorNodeId = -1; } @@ -462,9 +462,9 @@ void CAnimSequence::Reset(bool bSeekToStart) if (!bSeekToStart) { - for (AnimNodes::iterator it = m_nodes.begin(); it != m_nodes.end(); ++it) + for (const auto& it :m_nodes) { - IAnimNode* animNode = it->get(); + IAnimNode* animNode = it.get(); static_cast(animNode)->OnReset(); } m_bResetting = false; @@ -1091,7 +1091,7 @@ int CAnimSequence::GetTrackEventsCount() const ////////////////////////////////////////////////////////////////////////// char const* CAnimSequence::GetTrackEvent(int iIndex) const { - char const* szResult = NULL; + char const* szResult = nullptr; const bool bValid = (iIndex >= 0 && iIndex < GetTrackEventsCount()); CRY_ASSERT(bValid); @@ -1153,7 +1153,7 @@ IAnimNode* CAnimSequence::FindNodeById(int nNodeId) return animNode; } } - return 0; + return nullptr; } ////////////////////////////////////////////////////////////////////////// @@ -1172,7 +1172,7 @@ IAnimNode* CAnimSequence::FindNodeByName(const char* sNodeName, const IAnimNode* } } } - return 0; + return nullptr; } ////////////////////////////////////////////////////////////////////////// @@ -1352,9 +1352,9 @@ bool CAnimSequence::IsAncestorOf(const IAnimSequence* sequence) const return false; // should never happen, null pointer guard } - for (AnimNodes::const_iterator it = m_nodes.begin(); it != m_nodes.end(); ++it) + for (const auto& it :m_nodes) { - IAnimNode* pNode = it->get(); + IAnimNode* pNode = it.get(); if (pNode->GetType() == AnimNodeType::Director) { IAnimTrack* pSequenceTrack = pNode->GetTrackForParameter(AnimParamType::Sequence); diff --git a/Gems/Maestro/Code/Source/Cinematics/LayerNode.cpp b/Gems/Maestro/Code/Source/Cinematics/LayerNode.cpp index e2a9e816c6..546ec9bbe0 100644 --- a/Gems/Maestro/Code/Source/Cinematics/LayerNode.cpp +++ b/Gems/Maestro/Code/Source/Cinematics/LayerNode.cpp @@ -57,8 +57,6 @@ void CLayerNode::Initialize() //----------------------------------------------------------------------------- void CLayerNode::Animate(SAnimContext& ec) { - bool bVisibilityModified = false; - int trackCount = NumTracks(); for (int paramIndex = 0; paramIndex < trackCount; paramIndex++) { @@ -93,14 +91,12 @@ void CLayerNode::Animate(SAnimContext& ec) if (visible != m_bPreVisibility) { m_bPreVisibility = visible; - bVisibilityModified = true; } } else { m_bInit = true; m_bPreVisibility = visible; - bVisibilityModified = true; } } break; diff --git a/Gems/Maestro/Code/Source/Cinematics/Movie.cpp b/Gems/Maestro/Code/Source/Cinematics/Movie.cpp index 2a9a231177..dc0782f982 100644 --- a/Gems/Maestro/Code/Source/Cinematics/Movie.cpp +++ b/Gems/Maestro/Code/Source/Cinematics/Movie.cpp @@ -6,11 +6,11 @@ * */ - #include #include #include #include +#include #include #include #include "Movie.h" @@ -35,9 +35,7 @@ #include #include #include -#include #include -#include #include #include #include @@ -208,6 +206,22 @@ namespace } } +namespace Internal +{ + float ApplyDeltaTimeOverrideIfEnabled(float deltaTime) + { + if (auto* timeSystem = AZ::Interface::Get()) + { + const AZ::TimeMs deltatimeOverride = timeSystem->GetSimulationTickDeltaOverride(); + if (deltatimeOverride != AZ::Time::ZeroTimeMs) + { + deltaTime = AZ::TimeMsToSeconds(deltatimeOverride); + } + } + return deltaTime; + } +} // namespace Internal + ////////////////////////////////////////////////////////////////////////// CMovieSystem::CMovieSystem(ISystem* pSystem) { @@ -219,18 +233,13 @@ CMovieSystem::CMovieSystem(ISystem* pSystem) m_bEnableCameraShake = true; m_bCutscenesPausedInEditor = true; m_sequenceStopBehavior = eSSB_GotoEndTime; - m_lastUpdateTime.SetValue(0); + m_lastUpdateTime = AZ::Time::ZeroTimeUs; m_bStartCapture = false; m_captureFrame = -1; m_bEndCapture = false; - m_fixedTimeStepBackUp = 0; - m_maxStepBackUp = 0; - m_smoothingBackUp = 0; + m_fixedTimeStepBackUp = AZ::Time::ZeroTimeMs; m_cvar_capture_frame_once = nullptr; m_cvar_capture_folder = nullptr; - m_cvar_t_FixedStep = nullptr; - m_cvar_t_MaxStep = nullptr; - m_cvar_t_Smoothing = nullptr; m_cvar_sys_maxTimeStepForMovieSystem = nullptr; m_cvar_capture_frames = nullptr; m_cvar_capture_file_prefix = nullptr; @@ -776,79 +785,65 @@ bool CMovieSystem::InternalStopSequence(IAnimSequence* sequence, bool bAbort, bo { assert(sequence != 0); - bool bRet = false; PlayingSequences::iterator it; - if (FindSequence(sequence, it)) + if (!FindSequence(sequence, it)) { - if (bAnimate && sequence->IsActivated()) - { - if (m_sequenceStopBehavior == eSSB_GotoEndTime) - { - SAnimContext ac; - ac.singleFrame = true; - ac.time = sequence->GetTimeRange().end; - sequence->Animate(ac); - } - else if (m_sequenceStopBehavior == eSSB_GotoStartTime) - { - SAnimContext ac; - ac.singleFrame = true; - ac.time = sequence->GetTimeRange().start; - sequence->Animate(ac); - } - - sequence->Deactivate(); - } - - // If this sequence is cut scene end it. - if (sequence->GetFlags() & IAnimSequence::eSeqFlags_CutScene) - { - if (!gEnv->IsEditing() || !m_bCutscenesPausedInEditor) - { - if (m_pUser) - { - m_pUser->EndCutScene(sequence, sequence->GetCutSceneFlags(true)); - } - } - - sequence->SetParentSequence(NULL); - } - - // tell all interested listeners - NotifyListeners(sequence, bAbort ? IMovieListener::eMovieEvent_Aborted : IMovieListener::eMovieEvent_Stopped); - - // erase the sequence after notifying listeners so if they choose to they can get the ending time of this sequence - if (FindSequence(sequence, it)) - { - m_playingSequences.erase(it); - } - - sequence->Resume(); - static_cast(sequence)->OnStop(); - bRet = true; + return false; } - return bRet; + if (bAnimate && sequence->IsActivated()) + { + if (m_sequenceStopBehavior == eSSB_GotoEndTime) + { + SAnimContext ac; + ac.singleFrame = true; + ac.time = sequence->GetTimeRange().end; + sequence->Animate(ac); + } + else if (m_sequenceStopBehavior == eSSB_GotoStartTime) + { + SAnimContext ac; + ac.singleFrame = true; + ac.time = sequence->GetTimeRange().start; + sequence->Animate(ac); + } + + sequence->Deactivate(); + } + + // If this sequence is cut scene end it. + if (sequence->GetFlags() & IAnimSequence::eSeqFlags_CutScene) + { + if (!gEnv->IsEditing() || !m_bCutscenesPausedInEditor) + { + if (m_pUser) + { + m_pUser->EndCutScene(sequence, sequence->GetCutSceneFlags(true)); + } + } + + sequence->SetParentSequence(NULL); + } + + // tell all interested listeners + NotifyListeners(sequence, bAbort ? IMovieListener::eMovieEvent_Aborted : IMovieListener::eMovieEvent_Stopped); + + // erase the sequence after notifying listeners so if they choose to they can get the ending time of this sequence + if (FindSequence(sequence, it)) + { + m_playingSequences.erase(it); + } + + sequence->Resume(); + static_cast(sequence)->OnStop(); + + return true; } ////////////////////////////////////////////////////////////////////////// bool CMovieSystem::AbortSequence(IAnimSequence* sequence, bool bLeaveTime) { - assert(sequence); - - // to avoid any camera blending after aborting a cut scene - IViewSystem* pViewSystem = gEnv->pSystem->GetIViewSystem(); - if (pViewSystem) - { - pViewSystem->SetBlendParams(0, 0, 0); - IView* pView = pViewSystem->GetActiveView(); - if (pView) - { - pView->ResetBlending(); - } - } - return InternalStopSequence(sequence, true, !bLeaveTime); } @@ -911,7 +906,7 @@ void CMovieSystem::Reset(bool bPlayOnReset, bool bSeekToStart) InternalStopAllSequences(true, false); // Reset all sequences. - for (Sequences::iterator iter = m_sequences.begin(); iter != m_sequences.end(); ++iter) + for (Sequences::const_iterator iter = m_sequences.cbegin(); iter != m_sequences.cend(); ++iter) { IAnimSequence* pCurrentSequence = iter->get(); NotifyListeners(pCurrentSequence, IMovieListener::eMovieEvent_Started); @@ -945,7 +940,7 @@ void CMovieSystem::Reset(bool bPlayOnReset, bool bSeekToStart) ////////////////////////////////////////////////////////////////////////// void CMovieSystem::PlayOnLoadSequences() { - for (Sequences::iterator sit = m_sequences.begin(); sit != m_sequences.end(); ++sit) + for (Sequences::const_iterator sit = m_sequences.cbegin(); sit != m_sequences.cend(); ++sit) { IAnimSequence* sequence = sit->get(); if (sequence->GetFlags() & IAnimSequence::eSeqFlags_PlayOnReset) @@ -989,16 +984,27 @@ void CMovieSystem::ShowPlayedSequencesDebug() { float y = 10.0f; std::vector names; + std::vector rows; + constexpr f32 green[4] = {0, 1, 0, 1}; + constexpr f32 purple[4] = {1, 0, 1, 1}; + constexpr f32 white[4] = {1, 1, 1, 1}; + + //TODO: needs an implementation + auto Draw2dLabel = [](float /*x*/,float /*y*/,float /*depth*/,const f32* /*color*/,bool /*center*/, const char* /*fmt*/, ...) {}; for (PlayingSequences::iterator it = m_playingSequences.begin(); it != m_playingSequences.end(); ++it) { PlayingSequence& playingSequence = *it; - if (playingSequence.sequence == NULL) + if (playingSequence.sequence == nullptr) { continue; } + const char* fullname = playingSequence.sequence->GetName(); + + Draw2dLabel(1.0f, y, 1.3f, green, false, "Sequence %s : %f (x %f)", fullname, playingSequence.currentTime, playingSequence.currentSpeed); + y += 16.0f; for (int i = 0; i < playingSequence.sequence->GetNodeCount(); ++i) @@ -1019,9 +1025,10 @@ void CMovieSystem::ShowPlayedSequencesDebug() if (alreadyThere == false) { names.push_back(name); - } - } + } + Draw2dLabel((21.0f + 100.0f * i), ((i % 2) ? (y + 8.0f) : y), 1.0f, alreadyThere ? white : purple, false, "%s", name); + } y += 32.0f; } } @@ -1041,13 +1048,13 @@ void CMovieSystem::PreUpdate(float deltaTime) } m_newlyActivatedSequences.clear(); - UpdateInternal(m_cvar_t_FixedStep ? m_cvar_t_FixedStep->GetFVal() : deltaTime, true); + UpdateInternal(Internal::ApplyDeltaTimeOverrideIfEnabled(deltaTime), true); } ////////////////////////////////////////////////////////////////////////// void CMovieSystem::PostUpdate(float deltaTime) { - UpdateInternal(m_cvar_t_FixedStep ? m_cvar_t_FixedStep->GetFVal() : deltaTime, false); + UpdateInternal(Internal::ApplyDeltaTimeOverrideIfEnabled(deltaTime), false); } ////////////////////////////////////////////////////////////////////////// @@ -1061,7 +1068,7 @@ void CMovieSystem::UpdateInternal(const float deltaTime, const bool bPreUpdate) } // don't update more than once if dt==0.0 - CTimeValue curTime = gEnv->pTimer->GetFrameStartTime(); + const AZ::TimeUs curTime = AZ::GetLastSimulationTickTime(); if (deltaTime == 0.0f && curTime == m_lastUpdateTime && !gEnv->IsEditor()) { return; @@ -1093,7 +1100,8 @@ void CMovieSystem::UpdateInternal(const float deltaTime, const bool bPreUpdate) // Skip sequence if current update does not apply const bool bSequenceEarlyUpdate = (playingSequence.sequence->GetFlags() & IAnimSequence::eSeqFlags_EarlyMovieUpdate) != 0; - if (bPreUpdate && !bSequenceEarlyUpdate || !bPreUpdate && bSequenceEarlyUpdate) + if ((bPreUpdate && !bSequenceEarlyUpdate ) || (!bPreUpdate && bSequenceEarlyUpdate) +) { continue; } @@ -1268,7 +1276,7 @@ void CMovieSystem::PauseCutScenes() { m_bCutscenesPausedInEditor = true; - if (m_pUser != NULL) + if (m_pUser != nullptr) { for (PlayingSequences::iterator it = m_playingSequences.begin(); it != m_playingSequences.end(); ++it) { @@ -1290,7 +1298,7 @@ void CMovieSystem::ResumeCutScenes() m_bCutscenesPausedInEditor = false; - if (m_pUser != NULL) + if (m_pUser != nullptr) { for (PlayingSequences::iterator it = m_playingSequences.begin(); it != m_playingSequences.end(); ++it) { @@ -1480,7 +1488,7 @@ void CMovieSystem::ListSequencesCmd([[maybe_unused]] IConsoleCmdArgs* pArgs) void CMovieSystem::PlaySequencesCmd(IConsoleCmdArgs* pArgs) { const char* sequenceName = pArgs->GetArg(1); - gEnv->pMovieSystem->PlaySequence(sequenceName, NULL, false, false); + gEnv->pMovieSystem->PlaySequence(sequenceName, nullptr, false, false); } #endif //#if !defined(_RELEASE) @@ -1513,35 +1521,12 @@ void CMovieSystem::GoToFrame(const char* seqName, float targetFrame) void CMovieSystem::EnableFixedStepForCapture(float step) { - if (nullptr == m_cvar_t_FixedStep) + if (auto* timeSystem = AZ::Interface::Get()) { - m_cvar_t_FixedStep = gEnv->pConsole->GetCVar("t_FixedStep"); + m_fixedTimeStepBackUp = timeSystem->GetSimulationTickDeltaOverride(); + timeSystem->SetSimulationTickDeltaOverride(AZ::SecondsToTimeMs(step)); } - m_fixedTimeStepBackUp = m_cvar_t_FixedStep->GetFVal(); - m_cvar_t_FixedStep->Set(step); - - if (nullptr == m_cvar_t_MaxStep) - { - m_cvar_t_MaxStep = gEnv->pConsole->GetCVar("t_MaxStep"); - } - - // Make sure to make the max step large enough - m_maxStepBackUp = m_cvar_t_MaxStep->GetFVal(); - if (step > m_maxStepBackUp) - { - m_cvar_t_MaxStep->Set(step); - } - - if (nullptr == m_cvar_t_Smoothing) - { - m_cvar_t_Smoothing = gEnv->pConsole->GetCVar("t_Smoothing"); - } - - // Turn off framerate smoothing - m_smoothingBackUp = m_cvar_t_Smoothing->GetFVal(); - m_cvar_t_Smoothing->Set(0); - if (nullptr == m_cvar_sys_maxTimeStepForMovieSystem) { m_cvar_sys_maxTimeStepForMovieSystem = gEnv->pConsole->GetCVar("sys_maxTimeStepForMovieSystem"); @@ -1557,9 +1542,10 @@ void CMovieSystem::EnableFixedStepForCapture(float step) void CMovieSystem::DisableFixedStepForCapture() { - m_cvar_t_FixedStep->Set(m_fixedTimeStepBackUp); - m_cvar_t_MaxStep->Set(m_maxStepBackUp); - m_cvar_t_Smoothing->Set(m_smoothingBackUp); + if (auto* timeSystem = AZ::Interface::Get()) + { + timeSystem->SetSimulationTickDeltaOverride(m_fixedTimeStepBackUp); + } m_cvar_sys_maxTimeStepForMovieSystem->Set(m_maxTimeStepForMovieSystemBackUp); } diff --git a/Gems/Maestro/Code/Source/Cinematics/Movie.h b/Gems/Maestro/Code/Source/Cinematics/Movie.h index 15295da353..ab2c2e649b 100644 --- a/Gems/Maestro/Code/Source/Cinematics/Movie.h +++ b/Gems/Maestro/Code/Source/Cinematics/Movie.h @@ -14,6 +14,7 @@ #pragma once #include +#include #include #include @@ -235,7 +236,7 @@ private: IMovieUser* m_pUser; IMovieCallback* m_pCallback; - CTimeValue m_lastUpdateTime; + AZ::TimeUs m_lastUpdateTime; typedef AZStd::vector > Sequences; Sequences m_sequences; @@ -268,15 +269,10 @@ private: int m_captureFrame; bool m_bEndCapture; ICaptureKey m_captureKey; - float m_fixedTimeStepBackUp; - float m_maxStepBackUp; - float m_smoothingBackUp; + AZ::TimeMs m_fixedTimeStepBackUp; float m_maxTimeStepForMovieSystemBackUp; ICVar* m_cvar_capture_frame_once; ICVar* m_cvar_capture_folder; - ICVar* m_cvar_t_FixedStep; - ICVar* m_cvar_t_MaxStep; - ICVar* m_cvar_t_Smoothing; ICVar* m_cvar_sys_maxTimeStepForMovieSystem; ICVar* m_cvar_capture_frames; ICVar* m_cvar_capture_file_prefix; diff --git a/Gems/Maestro/Code/Source/Cinematics/SceneNode.cpp b/Gems/Maestro/Code/Source/Cinematics/SceneNode.cpp index b93215d397..8e6ebb9fe9 100644 --- a/Gems/Maestro/Code/Source/Cinematics/SceneNode.cpp +++ b/Gems/Maestro/Code/Source/Cinematics/SceneNode.cpp @@ -6,12 +6,12 @@ * */ - #include #include #include #include #include +#include #include #include "MathConversion.h" @@ -24,7 +24,6 @@ #include "GotoTrack.h" #include "CaptureTrack.h" #include "ISystem.h" -#include "ITimer.h" #include "AnimAZEntityNode.h" #include "AnimComponentNode.h" #include "Movie.h" @@ -36,7 +35,6 @@ #include #include -#include #define s_nodeParamsInitialized s_nodeParamsInitializedScene #define s_nodeParams s_nodeParamsSene @@ -199,9 +197,8 @@ CAnimSceneNode::CAnimSceneNode(const int id) m_lastCaptureKey = -1; m_bLastCapturingEnded = true; m_captureFrameCount = 0; - m_cvar_t_FixedStep = NULL; - m_pCamNodeOnHoldForInterp = 0; - m_CurrentSelectTrack = 0; + m_pCamNodeOnHoldForInterp = nullptr; + m_CurrentSelectTrack = nullptr; m_CurrentSelectTrackKeyNumber = 0; m_lastPrecachePoint = -1.f; SetName("Scene"); @@ -304,7 +301,6 @@ void CAnimSceneNode::Activate(bool bActivate) pSequenceTrack->GetKey(currKey, &key); IAnimSequence* pSequence = GetSequenceFromSequenceKey(key); - if (pSequence) { if (bActivate) @@ -329,11 +325,6 @@ void CAnimSceneNode::Activate(bool bActivate) } } } - - if (m_cvar_t_FixedStep == NULL) - { - m_cvar_t_FixedStep = gEnv->pConsole->GetCVar("t_FixedStep"); - } } ////////////////////////////////////////////////////////////////////////// @@ -344,12 +335,12 @@ void CAnimSceneNode::Animate(SAnimContext& ec) return; } - CSelectTrack* cameraTrack = NULL; - CEventTrack* pEventTrack = NULL; - CSequenceTrack* pSequenceTrack = NULL; - CConsoleTrack* pConsoleTrack = NULL; - CGotoTrack* pGotoTrack = NULL; - CCaptureTrack* pCaptureTrack = NULL; + CSelectTrack* cameraTrack = nullptr; + CEventTrack* pEventTrack = nullptr; + CSequenceTrack* pSequenceTrack = nullptr; + CConsoleTrack* pConsoleTrack = nullptr; + CGotoTrack* pGotoTrack = nullptr; + CCaptureTrack* pCaptureTrack = nullptr; /* bool bTimeJump = false; if (ec.time < m_time) @@ -422,14 +413,15 @@ void CAnimSceneNode::Animate(SAnimContext& ec) timeScale = .0f; } - // if set, disable fixed time step cvar so timewarping will have an affect. We never set it back though - that is - // likely a bug! - if (m_cvar_t_FixedStep && m_cvar_t_FixedStep->GetFVal() != .0f) + if (auto* timeSystem = AZ::Interface::Get()) { - m_cvar_t_FixedStep->Set(.0f); + m_simulationTickOverrideBackup = timeSystem->GetSimulationTickDeltaOverride(); + // if set, disable fixed time step cvar so timewarping will have an affect. + timeSystem->SetSimulationTickDeltaOverride(AZ::Time::ZeroTimeMs); + + m_timeScaleBackup = timeSystem->GetSimulationTickScale(); + timeSystem->SetSimulationTickScale(timeScale); } - gEnv->pTimer->SetTimeScale(timeScale, ITimer::eTSC_Trackview); - } break; case AnimParamType::FixedTimeStep: @@ -440,9 +432,12 @@ void CAnimSceneNode::Animate(SAnimContext& ec) { timeStep = 0; } - if (m_cvar_t_FixedStep) + + if (auto* timeSystem = AZ::Interface::Get()) { - m_cvar_t_FixedStep->Set(timeStep); + m_simulationTickOverrideBackup = timeSystem->GetSimulationTickDeltaOverride(); + // if set, disable fixed time step cvar so timewarping will have an affect. + timeSystem->SetSimulationTickDeltaOverride(AZ::SecondsToTimeMs(timeStep)); } } break; @@ -454,7 +449,7 @@ void CAnimSceneNode::Animate(SAnimContext& ec) // Check if a camera override is set by CVar const char* overrideCamName = gEnv->pMovieSystem->GetOverrideCamName(); AZ::EntityId overrideCamId; - if (overrideCamName != 0 && strlen(overrideCamName) > 0) + if (overrideCamName != nullptr && strlen(overrideCamName) > 0) { // overriding with a Camera Component entity is done by entityId (as names are not unique among AZ::Entities) - try to convert string to u64 to see if it's an id AZ::u64 u64Id = strtoull(overrideCamName, nullptr, /*base (radix)*/ 10); @@ -622,17 +617,18 @@ void CAnimSceneNode::OnReset() m_bLastCapturingEnded = true; m_captureFrameCount = 0; - if (GetTrackForParameter(AnimParamType::TimeWarp)) + if (auto* timeSystem = AZ::Interface::Get()) { - gEnv->pTimer->SetTimeScale(1.0f, ITimer::eTSC_Trackview); - if (m_cvar_t_FixedStep) + if (GetTrackForParameter(AnimParamType::TimeWarp)) { - m_cvar_t_FixedStep->Set(0); + timeSystem->SetSimulationTickScale(m_timeScaleBackup); + timeSystem->SetSimulationTickDeltaOverride(m_simulationTickOverrideBackup); + } + + if (GetTrackForParameter(AnimParamType::FixedTimeStep)) + { + timeSystem->SetSimulationTickDeltaOverride(m_simulationTickOverrideBackup); } - } - if (GetTrackForParameter(AnimParamType::FixedTimeStep) && m_cvar_t_FixedStep) - { - m_cvar_t_FixedStep->Set(0); } } @@ -788,7 +784,7 @@ void CAnimSceneNode::ApplyCameraKey(ISelectKey& key, SAnimContext& ec) if (!bInterpolateCamera && m_pCamNodeOnHoldForInterp) { m_pCamNodeOnHoldForInterp->SetSkipInterpolatedCameraNode(false); - m_pCamNodeOnHoldForInterp = 0; + m_pCamNodeOnHoldForInterp = nullptr; } SCameraParams cameraParams; @@ -796,22 +792,9 @@ void CAnimSceneNode::ApplyCameraKey(ISelectKey& key, SAnimContext& ec) cameraParams.fov = 0; cameraParams.justActivated = true; - // Init the defaults with the current view settings. // With component entities, the fov and near plane may be animated on an // entity with a Camera component. Don't stomp the values if this update happens // after those properties are animated. - AZ_Assert(gEnv && gEnv->pSystem, "Expected valid gEnv->pSystem"); - IViewSystem* viewSystem = gEnv->pSystem->GetIViewSystem(); - if (viewSystem) - { - IView* view = viewSystem->GetActiveView(); - if (view) - { - SViewParams params = *view->GetCurrentParams(); - cameraParams.fov = params.fov; - cameraParams.nearZ = params.nearplane; - } - } /////////////////////////////////////////////////////////////////// // find the Scene Camera (Camera Component Camera) @@ -878,9 +861,9 @@ void CAnimSceneNode::ApplyCameraKey(ISelectKey& key, SAnimContext& ec) } IAnimNode* prevCameraAnimNode = m_pSequence->FindNodeByName(prevKey.szSelection.c_str(), this); - if (prevCameraAnimNode == NULL) + if (prevCameraAnimNode == nullptr) { - prevCameraAnimNode = m_pSequence->FindNodeByName(prevKey.szSelection.c_str(), NULL); + prevCameraAnimNode = m_pSequence->FindNodeByName(prevKey.szSelection.c_str(), nullptr); } if (prevCameraAnimNode && prevCameraAnimNode->GetType() == AnimNodeType::Camera && prevCameraAnimNode->GetTrackForParameter(AnimParamType::FOV)) @@ -947,35 +930,33 @@ void CAnimSceneNode::ApplyAudioKey(char const* const sTriggerName, bool const bP ////////////////////////////////////////////////////////////////////////// void CAnimSceneNode::ApplySequenceKey(IAnimTrack* pTrack, [[maybe_unused]] int nPrevKey, int nCurrKey, ISequenceKey& key, SAnimContext& ec) { - if (nCurrKey >= 0) + if (nCurrKey < 0) { - IAnimSequence* pSequence = GetSequenceFromSequenceKey(key); - if (pSequence) - { - float startTime = -FLT_MAX; - float endTime = -FLT_MAX; + return; + } + IAnimSequence* pSequence = GetSequenceFromSequenceKey(key); + if (!pSequence) + { + return; + } - if (key.bOverrideTimes) - { - key.fDuration = (key.fEndTime - key.fStartTime) > 0.0f ? (key.fEndTime - key.fStartTime) : 0.0f; - startTime = key.fStartTime; - endTime = key.fEndTime; - } - else - { - key.fDuration = pSequence->GetTimeRange().Length(); - } + if (key.bOverrideTimes) + { + key.fDuration = (key.fEndTime - key.fStartTime) > 0.0f ? (key.fEndTime - key.fStartTime) : 0.0f; + } + else + { + key.fDuration = pSequence->GetTimeRange().Length(); + } - pTrack->SetKey(nCurrKey, &key); + pTrack->SetKey(nCurrKey, &key); - SAnimContext newAnimContext = ec; - newAnimContext.time = std::min(ec.time - key.time + key.fStartTime, key.fDuration + key.fStartTime); + SAnimContext newAnimContext = ec; + newAnimContext.time = std::min(ec.time - key.time + key.fStartTime, key.fDuration + key.fStartTime); - if (static_cast(pSequence)->GetTime() != newAnimContext.time) - { - pSequence->Animate(newAnimContext); - } - } + if (static_cast(pSequence)->GetTime() != newAnimContext.time) + { + pSequence->Animate(newAnimContext); } } diff --git a/Gems/Maestro/Code/Source/Cinematics/SceneNode.h b/Gems/Maestro/Code/Source/Cinematics/SceneNode.h index c577839fce..6435b48953 100644 --- a/Gems/Maestro/Code/Source/Cinematics/SceneNode.h +++ b/Gems/Maestro/Code/Source/Cinematics/SceneNode.h @@ -13,6 +13,7 @@ #pragma once #include +#include #include "AnimNode.h" #include "SoundTrack.h" @@ -149,7 +150,8 @@ private: std::vector m_SoundInfo; - ICVar* m_cvar_t_FixedStep; + AZ::TimeMs m_simulationTickOverrideBackup = AZ::Time::ZeroTimeMs; + float m_timeScaleBackup = 1.0f; }; #endif // CRYINCLUDE_CRYMOVIE_SCENENODE_H diff --git a/Gems/Maestro/Code/Tests/MaestroTest.cpp b/Gems/Maestro/Code/Tests/MaestroTest.cpp index 1607d35296..1724e090aa 100644 --- a/Gems/Maestro/Code/Tests/MaestroTest.cpp +++ b/Gems/Maestro/Code/Tests/MaestroTest.cpp @@ -8,7 +8,6 @@ #include #include -#include #include #include #include @@ -33,7 +32,6 @@ protected: { AZ_TEST_CLASS_ALLOCATOR(MockHolder); - NiceMock timer; NiceMock pak; NiceMock console; }; @@ -51,7 +49,6 @@ protected: // manage their lifetime, so this solution manages the lifetime // and ordering via the heap. m_mocks = new MockHolder(); - m_stubEnv.pTimer = &m_mocks->timer; m_stubEnv.pCryPak = &m_mocks->pak; m_stubEnv.pConsole = &m_mocks->console; gEnv = &m_stubEnv; diff --git a/Gems/Maestro/gem.json b/Gems/Maestro/gem.json index 5149df7c14..d8f884e271 100644 --- a/Gems/Maestro/gem.json +++ b/Gems/Maestro/gem.json @@ -2,6 +2,7 @@ "gem_name": "Maestro", "display_name": "Maestro Cinematics", "license": "Apache-2.0 Or MIT", + "license_url": "https://github.com/o3de/o3de/blob/development/LICENSE.txt", "origin": "Open 3D Engine - o3de.org", "type": "Code", "summary": "The Maestro Cinematics Gem provides Track View, Open 3D Engine's animated sequence and cinematics editor.", diff --git a/Gems/MessagePopup/Code/CMakeLists.txt b/Gems/MessagePopup/Code/CMakeLists.txt index 73cd7ce8d6..51ec1a3bd1 100644 --- a/Gems/MessagePopup/Code/CMakeLists.txt +++ b/Gems/MessagePopup/Code/CMakeLists.txt @@ -19,6 +19,7 @@ ly_add_target( BUILD_DEPENDENCIES PUBLIC Legacy::CryCommon + Gem::LyShine ) ly_add_target( diff --git a/Gems/MessagePopup/gem.json b/Gems/MessagePopup/gem.json index 05d36bc2df..fb44dd93a5 100644 --- a/Gems/MessagePopup/gem.json +++ b/Gems/MessagePopup/gem.json @@ -2,6 +2,7 @@ "gem_name": "MessagePopup", "display_name": "Message Popup", "license": "Apache-2.0 Or MIT", + "license_url": "https://github.com/o3de/o3de/blob/development/LICENSE.txt", "origin": "Open 3D Engine - o3de.org", "type": "Code", "summary": "The Message Popup Gem provides an example implementation of popup messages using LyShine in Open 3D Engine.", diff --git a/Gems/Metastream/gem.json b/Gems/Metastream/gem.json index 862b17dd1d..309f16b221 100644 --- a/Gems/Metastream/gem.json +++ b/Gems/Metastream/gem.json @@ -2,6 +2,7 @@ "gem_name": "Metastream", "display_name": "Metastream", "license": "Apache-2.0 Or MIT", + "license_url": "https://github.com/o3de/o3de/blob/development/LICENSE.txt", "origin": "Open 3D Engine - o3de.org", "type": "Code", "summary": "The Metastream Gem provides functionality for an HTTP server that allows broadcasters to customize game streams with overlays of statistics and event data from a game session.", diff --git a/Gems/Microphone/gem.json b/Gems/Microphone/gem.json index 68492ea786..6e57bec854 100644 --- a/Gems/Microphone/gem.json +++ b/Gems/Microphone/gem.json @@ -2,6 +2,7 @@ "gem_name": "Microphone", "display_name": "Microphone", "license": "Apache-2.0 Or MIT", + "license_url": "https://github.com/o3de/o3de/blob/development/LICENSE.txt", "origin": "Open 3D Engine - o3de.org", "type": "Code", "summary": "The Microphone Gem provides support for audio input through microphones.", diff --git a/Gems/Multiplayer/Code/CMakeLists.txt b/Gems/Multiplayer/Code/CMakeLists.txt index 559fa23553..afe40408ab 100644 --- a/Gems/Multiplayer/Code/CMakeLists.txt +++ b/Gems/Multiplayer/Code/CMakeLists.txt @@ -86,44 +86,24 @@ ly_create_alias(NAME Multiplayer.Servers NAMESPACE Gem TARGETS Gem::Multiplayer if (PAL_TRAIT_BUILD_HOST_TOOLS) ly_add_target( - NAME Multiplayer.Builders.Static STATIC + NAME Multiplayer.Tools.Static STATIC NAMESPACE Gem FILES_CMAKE multiplayer_tools_files.cmake - COMPILE_DEFINITIONS - PUBLIC - MULTIPLAYER_TOOLS INCLUDE_DIRECTORIES PRIVATE - . - Source ${pal_source_dir} - PUBLIC - Include - BUILD_DEPENDENCIES - PUBLIC - AZ::AzToolsFramework - Gem::Multiplayer.Static - ) - - # by naming this target Multiplayer.Builders it ensures that it is loaded - # in any pipeline tools (Like Asset Processor, AssetBuilder, etc) - ly_add_target( - NAME Multiplayer.Builders GEM_MODULE - NAMESPACE Gem - FILES_CMAKE - multiplayer_tools_files.cmake - INCLUDE_DIRECTORIES - PRIVATE + AZ::AzNetworking Source . PUBLIC Include BUILD_DEPENDENCIES - PRIVATE - Gem::Multiplayer.Builders.Static - RUNTIME_DEPENDENCIES - Gem::Multiplayer.Editor + PUBLIC + AZ::AzCore + AZ::AzFramework + AZ::AzNetworking + AZ::AzToolsFramework ) ly_add_target( @@ -152,11 +132,12 @@ if (PAL_TRAIT_BUILD_HOST_TOOLS) Gem::Atom_RPI.Public Gem::Atom_RHI.Reflect Gem::Multiplayer.Static - Gem::Multiplayer.Builders + Gem::Multiplayer.Tools.Static ) - + + ly_create_alias(NAME Multiplayer.Builders NAMESPACE Gem TARGETS Gem::Multiplayer.Editor) # use the Multiplayer.Editor module in tools like the Editor: Such tools also get the visual debug view: - ly_create_alias(NAME Multiplayer.Tools NAMESPACE Gem TARGETS Gem::Multiplayer.Editor Gem::Multiplayer.Debug Gem::Multiplayer.Builders) + ly_create_alias(NAME Multiplayer.Tools NAMESPACE Gem TARGETS Gem::Multiplayer.Debug Gem::Multiplayer.Builders) endif() if (PAL_TRAIT_BUILD_TESTS_SUPPORTED) @@ -207,7 +188,8 @@ if (PAL_TRAIT_BUILD_TESTS_SUPPORTED) AZ::AzTest AZ::AzTestShared AZ::AzToolsFrameworkTestCommon - Gem::Multiplayer.Builders.Static + Gem::Multiplayer.Static + Gem::Multiplayer.Tools.Static ) ly_add_googletest( NAME Gem::Multiplayer.Builders.Tests diff --git a/Gems/Multiplayer/Code/Include/Multiplayer/AutoGen/AutoComponent_Header.jinja b/Gems/Multiplayer/Code/Include/Multiplayer/AutoGen/AutoComponent_Header.jinja index 5cfeb250fa..58a47b336f 100644 --- a/Gems/Multiplayer/Code/Include/Multiplayer/AutoGen/AutoComponent_Header.jinja +++ b/Gems/Multiplayer/Code/Include/Multiplayer/AutoGen/AutoComponent_Header.jinja @@ -443,35 +443,31 @@ namespace {{ Component.attrib['Namespace'] }} {{ DeclareNetworkPropertyAccessors(Component, 'Autonomous', 'Authority', false)|indent(8) -}} {{ DeclareNetworkPropertyAccessors(Component, 'Autonomous', 'Authority', true)|indent(8) -}} {{ DeclareArchetypePropertyGetters(Component)|indent(8) -}} - {{ DeclareRpcInvocations(Component, 'Client', 'Authority', false)|indent(8) -}} - {{ DeclareRpcInvocations(Component, 'Client', 'Authority', true)|indent(8) -}} {{ DeclareRpcInvocations(Component, 'Autonomous', 'Authority', false)|indent(8) -}} {{ DeclareRpcInvocations(Component, 'Autonomous', 'Authority', true)|indent(8) -}} {{ DeclareRpcInvocations(Component, 'Authority', 'Autonomous', false)|indent(8) -}} {{ DeclareRpcInvocations(Component, 'Authority', 'Autonomous', true)|indent(8) -}} {{ DeclareRpcInvocations(Component, 'Authority', 'Client', false)|indent(8) -}} {{ DeclareRpcInvocations(Component, 'Authority', 'Client', true)|indent(8) -}} + + //! RPC Handlers: Override handlers in order to implement what happens after receiving an RPC {{ AutoComponentMacros.DeclareRpcHandlers(Component, 'Server', 'Authority', false)|indent(8) -}} - {{ AutoComponentMacros.DeclareRpcHandlers(Component, 'Client', 'Authority', false)|indent(8) -}} {{ AutoComponentMacros.DeclareRpcHandlers(Component, 'Autonomous', 'Authority', false)|indent(8) -}} {{ AutoComponentMacros.DeclareRpcHandlers(Component, 'Authority', 'Autonomous', false)|indent(8) -}} - {{ AutoComponentMacros.DeclareRpcSignals(Component, 'Server', 'Authority')|indent(8) -}} - {{ AutoComponentMacros.DeclareRpcSignals(Component, 'Client', 'Authority')|indent(8) -}} - {{ AutoComponentMacros.DeclareRpcSignals(Component, 'Autonomous', 'Authority')|indent(8) -}} - {{ AutoComponentMacros.DeclareRpcSignals(Component, 'Authority', 'Autonomous')|indent(8) -}} + + //! RPC Event Getters: Subscribe to these events and get notified when an RPC is received {{ AutoComponentMacros.DeclareRpcEventGetters(Component, 'Server', 'Authority')|indent(8) -}} - {{ AutoComponentMacros.DeclareRpcEventGetters(Component, 'Client', 'Authority')|indent(8) -}} {{ AutoComponentMacros.DeclareRpcEventGetters(Component, 'Autonomous', 'Authority')|indent(8) -}} - {{ AutoComponentMacros.DeclareRpcEventGetters(Component, 'Authority', 'Autonomous')|indent(8) }} + {{ AutoComponentMacros.DeclareRpcEventGetters(Component, 'Authority', 'Autonomous')|indent(8) -}} + {% for Service in Component.iter('ComponentRelation') %} {% if (Service.attrib['HasController']|booleanTrue) and (Service.attrib['Constraint'] != 'Incompatible') %} {{ Service.attrib['Namespace'] }}::{{ Service.attrib['Name'] }}Controller* Get{{ Service.attrib['Name'] }}Controller(); {% endif %} {% endfor %} - + protected: {{ AutoComponentMacros.DeclareRpcEvents(Component, 'Server', 'Authority')|indent(8) -}} - {{ AutoComponentMacros.DeclareRpcEvents(Component, 'Client', 'Authority')|indent(8) -}} {{ AutoComponentMacros.DeclareRpcEvents(Component, 'Autonomous', 'Authority')|indent(8) -}} {{ AutoComponentMacros.DeclareRpcEvents(Component, 'Authority', 'Autonomous')|indent(8) }} }; @@ -517,6 +513,8 @@ namespace {{ Component.attrib['Namespace'] }} {{ DeclareNetworkPropertyGetters(Component, 'Autonomous', 'Authority', false)|indent(8) -}} {{ DeclareArchetypePropertyGetters(Component)|indent(8) -}} {{ DeclareRpcInvocations(Component, 'Server', 'Authority', false)|indent(8) -}} + + //! RPC Event Getters: Subscribe to these events and get notified when this component receives an RPC {{ AutoComponentMacros.DeclareRpcEventGetters(Component, 'Authority', 'Client')|indent(8) -}} //! MultiplayerComponent interface @@ -541,9 +539,13 @@ namespace {{ Component.attrib['Namespace'] }} {{ DeclareNetworkPropertyGetters(Component, 'Authority', 'Client', true)|indent(8) -}} {{ DeclareNetworkPropertyGetters(Component, 'Autonomous', 'Authority', true)|indent(8) -}} {{ DeclareRpcInvocations(Component, 'Server', 'Authority', true)|indent(8) -}} + + //! RPC Handlers: Override handlers in order to implement what happens after receiving an RPC {{ AutoComponentMacros.DeclareRpcHandlers(Component, 'Authority', 'Client', false)|indent(8) -}} - {{ AutoComponentMacros.DeclareRpcSignals(Component, 'Authority', 'Client')|indent(8) -}} - {{ AutoComponentMacros.DeclareRpcEvents(Component, 'Authority', 'Client')|indent(8) }} + + //! RPC Events: Subscribe to these events and get notified when an RPC is received + {{ AutoComponentMacros.DeclareRpcEvents(Component, 'Authority', 'Client')|indent(8) -}} + {% for Service in Component.iter('ComponentRelation') %} {% if Service.attrib['Constraint'] != 'Incompatible' %} const {{ Service.attrib['Namespace'] }}::{{ Service.attrib['Name'] }}* Get{{ Service.attrib['Name'] }}() const; diff --git a/Gems/Multiplayer/Code/Include/Multiplayer/AutoGen/AutoComponent_Source.jinja b/Gems/Multiplayer/Code/Include/Multiplayer/AutoGen/AutoComponent_Source.jinja index cf62f6f901..01bed7d52d 100644 --- a/Gems/Multiplayer/Code/Include/Multiplayer/AutoGen/AutoComponent_Source.jinja +++ b/Gems/Multiplayer/Code/Include/Multiplayer/AutoGen/AutoComponent_Source.jinja @@ -308,13 +308,21 @@ void {{ ClassName }}::Set{{ UpperFirst(Property.attrib['Name']) }}(const {{ Prop {% endmacro %} {# +#} +{% macro PrintRpcParameters(printPrefix, paramDefines) -%} +{% if paramDefines|count > 0 -%} +{{ printPrefix }}{{ ', '.join(paramDefines) }} +{%- endif %} +{%- endmacro -%} +{# + #} {% macro DefineRpcInvocation(Component, ClassName, Property, InvokeFrom, HandleOn) %} {% set paramNames = [] %} {% set paramTypes = [] %} {% set paramDefines = [] %} {{ AutoComponentMacros.ParseRpcParams(Property, paramNames, paramTypes, paramDefines) }} -void {{ ClassName }}::{{ UpperFirst(Property.attrib['Name']) }}({{ ', '.join(paramDefines) }}) +void {{ ClassName }}::{{ UpperFirst(Property.attrib['Name']) }}({{ PrintRpcParameters('', paramDefines) }}) { constexpr Multiplayer::RpcIndex rpcId = static_cast({{ UpperFirst(Component.attrib['Name']) }}Internal::RemoteProcedure::{{ UpperFirst(Property.attrib['Name']) }}); {% if Property.attrib['IsReliable']|booleanTrue %} @@ -340,27 +348,11 @@ void {{ ClassName }}::{{ UpperFirst(Property.attrib['Name']) }}({{ ', '.join(par {% endmacro %} {# -#} -{% macro DefineRpcSignal(Component, ClassName, Property, InvokeFrom) %} -{% set paramNames = [] %} -{% set paramTypes = [] %} -{% set paramDefines = [] %} -{{ AutoComponentMacros.ParseRpcParams(Property, paramNames, paramTypes, paramDefines) }} -void {{ ClassName }}::Signal{{ UpperFirst(Property.attrib['Name']) }}({{ ', '.join(paramDefines) }}) -{ - m_{{ UpperFirst(Property.attrib['Name']) }}Event.Signal({{ ', '.join(paramNames) }}); -} -{% endmacro %} -{# - #} {% macro DefineRpcInvocations(Component, ClassName, InvokeFrom, HandleOn, IsProtected) %} {% call(Property) AutoComponentMacros.ParseRemoteProcedures(Component, InvokeFrom, HandleOn) %} {% if Property.attrib['IsPublic']|booleanTrue != IsProtected %} {{ DefineRpcInvocation(Component, ClassName, Property, InvokeFrom, HandleOn) -}} -{% if Property.attrib['GenerateEventBindings']|booleanTrue == true %} -{{ DefineRpcSignal(Component, ClassName, Property, InvokeFrom) -}} -{% endif %} {% endif %} {% endcall %} {% endmacro %} @@ -374,34 +366,45 @@ void {{ ClassName }}::Signal{{ UpperFirst(Property.attrib['Name']) }}({{ ', '.jo {% set paramTypes = [] %} {% set paramDefines = [] %} {{ AutoComponentMacros.ParseRpcParams(Property, paramNames, paramTypes, paramDefines) }} - ->Method("{{ UpperFirst(Property.attrib['Name']) }}", [](const {{ ClassName }}* self, {{ ', '.join(paramDefines) }}) { - self->m_controller->{{ UpperFirst(Property.attrib['Name']) }}({{ ', '.join(paramNames) }}); - }) - ->Method("{{ UpperFirst(Property.attrib['Name']) }}ByEntityId", [](AZ::EntityId id, {{ ', '.join(paramDefines) }}) { - - AZ::Entity* entity = AZ::Interface::Get()->FindEntity(id); - if (!entity) - { - AZ_Warning("Network Property", false, "{{ ClassName }} {{ UpperFirst(Property.attrib['Name']) }}ByEntityId failed. The entity with id %s doesn't exist, please provide a valid entity id.", id.ToString().c_str()) - return; - } - - {{ ClassName }}* networkComponent = entity->FindComponent<{{ ClassName }}>(); - if (!networkComponent) - { - AZ_Warning("Network Property", false, "{{ ClassName }} {{ UpperFirst(Property.attrib['Name']) }}ByEntityId failed. Entity '%s' (id: %s) is missing {{ ClassName }}, be sure to add {{ ClassName }} to this entity.", entity->GetName().c_str(), id.ToString().c_str()) - return; - } - - {{ ClassName }}Controller* controller = static_cast<{{ ClassName }}Controller*>(networkComponent->GetController()); - if (!controller) - { - AZ_Warning("Network Property", false, "{{ ClassName }} {{ UpperFirst(Property.attrib['Name']) }}ByEntityId method failed. Entity '%s' (id: %s) {{ ClassName }} is missing the network controller. This RemoteProcedure can only be invoked from {{InvokeFrom}} network entities, because this entity doesn't have a controller, it must not be a {{InvokeFrom}} entity. Please check your network context before attempting to call {{ UpperFirst(Property.attrib['Name']) }}.", entity->GetName().c_str(), id.ToString().c_str()) - return; - } - - controller->{{ UpperFirst(Property.attrib['Name']) }}({{ ', '.join(paramNames) }}); - }, { { { "Source", "The Source containing the {{ ClassName }}Controller" }{% for paramName in paramNames %}, {"{{ paramName }}"}{% endfor %}}}) + ->Method("{{ UpperFirst(Property.attrib['Name']) }}", []({{ ClassName }}* self{{ PrintRpcParameters(', ', paramDefines) }}){ +{% if (InvokeFrom == 'Server') %} + self->{{ UpperFirst(Property.attrib['Name']) }}({{ ', '.join(paramNames) }}); +{% elif (InvokeFrom == 'Authority') or (InvokeFrom == 'Autonomous') %} + if (self->m_controller) + { + self->m_controller->{{ UpperFirst(Property.attrib['Name']) }}({{ ', '.join(paramNames) }}); + } + else + { + AZ_Warning("Network RPC", false, "{{ ClassName }} {{ UpperFirst(Property.attrib['Name']) }} method failed. Entity '%s' (id: %s) {{ ClassName }} is missing the network controller. This remote-procedure can only be invoked from {{InvokeFrom}} network entities, because this entity doesn't have a controller, it must not be a {{InvokeFrom}} entity. Please check your network context before attempting to call {{ UpperFirst(Property.attrib['Name']) }}.", self->GetEntity()->GetName().c_str(), self->GetEntityId().ToString().c_str()) + } +{% endif %} + }) + ->Method("{{ UpperFirst(Property.attrib['Name']) }}ByEntityId", [](AZ::EntityId id{{ PrintRpcParameters(', ', paramDefines) }}) { + AZ::Entity* entity = AZ::Interface::Get()->FindEntity(id); + if (!entity) + { + AZ_Warning("Network RPC", false, "{{ ClassName }} {{ UpperFirst(Property.attrib['Name']) }}ByEntityId failed. The entity with id %s doesn't exist, please provide a valid entity id.", id.ToString().c_str()) + return; + } + {{ ClassName }}* networkComponent = entity->FindComponent<{{ ClassName }}>(); + if (!networkComponent) + { + AZ_Warning("Network RPC", false, "{{ ClassName }} {{ UpperFirst(Property.attrib['Name']) }}ByEntityId failed. Entity '%s' (id: %s) is missing {{ ClassName }}, be sure to add {{ ClassName }} to this entity.", entity->GetName().c_str(), id.ToString().c_str()) + return; + } +{% if (InvokeFrom == 'Server') %} + networkComponent->{{ UpperFirst(Property.attrib['Name']) }}({{ ', '.join(paramNames) }}); +{% elif (InvokeFrom == 'Authority') or (InvokeFrom == 'Autonomous') %} + {{ ClassName }}Controller* controller = static_cast<{{ ClassName }}Controller*>(networkComponent->GetController()); + if (!controller) + { + AZ_Warning("Network RPC", false, "{{ ClassName }} {{ UpperFirst(Property.attrib['Name']) }}ByEntityId method failed. Entity '%s' (id: %s) {{ ClassName }} is missing the network controller. This RemoteProcedure can only be invoked from {{InvokeFrom}} network entities, because this entity doesn't have a controller, it must not be a {{InvokeFrom}} entity. Please check your network context before attempting to call {{ UpperFirst(Property.attrib['Name']) }}.", entity->GetName().c_str(), id.ToString().c_str()) + return; + } + controller->{{ UpperFirst(Property.attrib['Name']) }}({{ ', '.join(paramNames) }}); +{% endif %} + }, { { { "Source", "The Source containing the {{ ClassName }}Controller" }{% for paramName in paramNames %}, {"{{ paramName }}"}{% endfor %}}}) ->Attribute(AZ::Script::Attributes::ToolTip, "{{Property.attrib['Description']}}") {% endif %} {% endcall %} @@ -436,9 +439,13 @@ void {{ ClassName }}::Signal{{ UpperFirst(Property.attrib['Name']) }}({{ ', '.jo {% set paramTypes = [] %} {% set paramDefines = [] %} {{ AutoComponentMacros.ParseRpcParams(Property, paramNames, paramTypes, paramDefines) }} - ->Method("Get{{ UpperFirst(Property.attrib['Name']) }}Event", [](const {{ ClassName }}* self) -> AZ::Event<{{ ', '.join(paramTypes) }}>& + ->Method("Get{{ UpperFirst(Property.attrib['Name']) }}Event", []({{ ClassName }}* self) -> AZ::Event<{{ ', '.join(paramTypes) }}>& { +{% if HandleOn == 'Client' %} + return self->Get{{ UpperFirst(Property.attrib['Name']) }}Event(); +{% elif (HandleOn == 'Authority') or (HandleOn == 'Autonomous') %} return self->m_controller->Get{{ UpperFirst(Property.attrib['Name']) }}Event(); +{% endif %} }) ->Attribute(AZ::Script::Attributes::AzEventDescription, {{ LowerFirst(Property.attrib['Name']) }}EventDesc) ->Method("Get{{ UpperFirst(Property.attrib['Name']) }}EventByEntityId", [](AZ::EntityId id) -> AZ::Event<{{ ', '.join(paramTypes) }}>* @@ -456,7 +463,9 @@ void {{ ClassName }}::Signal{{ UpperFirst(Property.attrib['Name']) }}({{ ', '.jo AZ_Warning("Network Property", false, "{{ ClassName }} Get{{ UpperFirst(Property.attrib['Name']) }}EventByEntityId failed. Entity '%s' (id: %s) is missing {{ ClassName }}, be sure to add {{ ClassName }} to this entity.", entity->GetName().c_str(), id.ToString().c_str()) return nullptr; } - +{% if HandleOn == 'Client' %} + return &networkComponent->Get{{ UpperFirst(Property.attrib['Name']) }}Event(); +{% elif (HandleOn == 'Authority') or (HandleOn == 'Autonomous') %} {{ ClassName }}Controller* controller = static_cast<{{ ClassName }}Controller*>(networkComponent->GetController()); if (!controller) { @@ -465,6 +474,7 @@ void {{ ClassName }}::Signal{{ UpperFirst(Property.attrib['Name']) }}({{ ', '.jo } return &controller->Get{{ UpperFirst(Property.attrib['Name']) }}Event(); +{% endif %} }) ->Attribute(AZ::Script::Attributes::AzEventDescription, AZStd::move({{ LowerFirst(Property.attrib['Name']) }}EventDesc)) {% endif %} @@ -493,30 +503,32 @@ case {{ UpperFirst(Component.attrib['Name']) }}Internal::RemoteProcedure::{{ Upp if (m_controller) { AZ_Assert(GetNetBindComponent()->GetNetEntityRole() == Multiplayer::NetEntityRole::Authority, "Entity proxy does not have authority"); - m_controller->Handle{{ UpperFirst(Property.attrib['Name']) }}(invokingConnection, {{ ', '.join(rpcParamList) }}); -{% if Property.attrib['GenerateEventBindings']|booleanTrue == true %} - m_controller->Signal{{ UpperFirst(Property.attrib['Name']) }}({{ ', '.join(rpcParamList) }}); -{% endif %} + m_controller->Handle{{ UpperFirst(Property.attrib['Name']) }}(invokingConnection{{ PrintRpcParameters(', ', rpcParamList) }}); +{% if (Property.attrib['GenerateEventBindings']|booleanTrue == true) %} + m_controller->Get{{ UpperFirst(Property.attrib['Name']) }}Event().Signal({{ PrintRpcParameters('', rpcParamList) }}); +{% endif %} } -{% if Property.attrib['IsReliable']|booleanTrue %} -{# if the rpc is not reliable we can simply drop it, also note message reliability type is default reliable in EntityRpcMessage #} else // Note that this rpc is marked reliable, trigger the appropriate rpc event so it can be forwarded { +{% if Property.attrib['IsReliable']|booleanTrue %} +{# if the rpc is not reliable we can simply drop it, also note message reliability type is default reliable in EntityRpcMessage #} m_netBindComponent->{{ "GetSend" + InvokeFrom + "To" + HandleOn + "RpcEvent" }}().Signal(message); +{% endif %} } - -{% endif %} {% elif HandleOn == 'Autonomous' %} if (m_controller) { AZ_Assert(GetNetBindComponent()->GetNetEntityRole() == Multiplayer::NetEntityRole::Autonomous, "Entity proxy does not have autonomy"); - m_controller->Handle{{ UpperFirst(Property.attrib['Name']) }}(invokingConnection, {{ ', '.join(rpcParamList) }}); -{% if Property.attrib['GenerateEventBindings']|booleanTrue == true %} - m_controller->Signal{{ UpperFirst(Property.attrib['Name']) }}({{ ', '.join(rpcParamList) }}); -{% endif %} + m_controller->Handle{{ UpperFirst(Property.attrib['Name']) }}(invokingConnection{{ PrintRpcParameters(', ', rpcParamList) }}); +{% if Property.attrib['GenerateEventBindings']|booleanTrue == true %} + m_controller->Get{{ UpperFirst(Property.attrib['Name']) }}Event().Signal({{ PrintRpcParameters('', rpcParamList) }}); +{% endif %} } -{% else %} - Handle{{ UpperFirst(Property.attrib['Name']) }}(invokingConnection, {{ ', '.join(rpcParamList) }}); +{% elif HandleOn == 'Client' %} + Handle{{ UpperFirst(Property.attrib['Name']) }}(invokingConnection{{ PrintRpcParameters(', ', rpcParamList) }}); +{% if Property.attrib['GenerateEventBindings']|booleanTrue == true %} + m_{{ UpperFirst(Property.attrib['Name']) }}Event.Signal({{ PrintRpcParameters('', rpcParamList) }}); +{% endif %} {% endif %} } else if (paramsSerialized) diff --git a/Gems/Multiplayer/Code/Include/Multiplayer/Components/LocalPredictionPlayerInputComponent.h b/Gems/Multiplayer/Code/Include/Multiplayer/Components/LocalPredictionPlayerInputComponent.h index 678ec2d6fd..08ba541a1b 100644 --- a/Gems/Multiplayer/Code/Include/Multiplayer/Components/LocalPredictionPlayerInputComponent.h +++ b/Gems/Multiplayer/Code/Include/Multiplayer/Components/LocalPredictionPlayerInputComponent.h @@ -99,8 +99,8 @@ namespace Multiplayer double m_moveAccumulator = 0.0; double m_clientBankedTime = 0.0; - AZ::TimeMs m_lastInputReceivedTimeMs = AZ::TimeMs{ 0 }; - AZ::TimeMs m_lastCorrectionSentTimeMs = AZ::TimeMs{ 0 }; + AZ::TimeMs m_lastInputReceivedTimeMs = AZ::Time::ZeroTimeMs; + AZ::TimeMs m_lastCorrectionSentTimeMs = AZ::Time::ZeroTimeMs; ClientInputId m_clientInputId = ClientInputId{ 0 }; // Clients incrementing inputId ClientInputId m_lastClientInputId = ClientInputId{ 0 }; // Last inputId processed by the server diff --git a/Gems/Multiplayer/Code/Include/Multiplayer/EntityDomains/IEntityDomain.h b/Gems/Multiplayer/Code/Include/Multiplayer/EntityDomains/IEntityDomain.h index fc41a9b4d0..b650f9e1d9 100644 --- a/Gems/Multiplayer/Code/Include/Multiplayer/EntityDomains/IEntityDomain.h +++ b/Gems/Multiplayer/Code/Include/Multiplayer/EntityDomains/IEntityDomain.h @@ -17,8 +17,6 @@ namespace Multiplayer class IEntityDomain { public: - using EntitiesNotInDomain = AZStd::unordered_set; - virtual ~IEntityDomain() = default; //! For domains that operate on a region of space, this sets the area the domain is responsible for. @@ -34,12 +32,10 @@ namespace Multiplayer //! @return false if this entity should not belong to the entity manger, true if it could be owned by the entity manager virtual bool IsInDomain(const ConstNetworkEntityHandle& entityHandle) const = 0; - //! Enable Entity Domain Exit Tracking for entities on the host. - //! @param ownedEntitySet the set of entities to activate tracking for - virtual void ActivateTracking(const INetworkEntityManager::OwnedEntitySet& ownedEntitySet) = 0; - - //! Return the set of netbound entities not included in this domain. - virtual const EntitiesNotInDomain& RetrieveEntitiesNotInDomain() const = 0; + //! This method will be invoked whenever we unexpectedly lose the authoritative entity replicator for an entity. + //! This gives our entity domain a chance to determine whether or not it should assume authority in this instance. + //! @param entityHandle the network entity handle of the entity that has lost its authoritative replicator + virtual void HandleLossOfAuthoritativeReplicator(const ConstNetworkEntityHandle& entityHandle) = 0; //! Debug draw to visualize host entity domains. virtual void DebugDraw() const = 0; diff --git a/Gems/Multiplayer/Code/Include/Multiplayer/IMultiplayer.h b/Gems/Multiplayer/Code/Include/Multiplayer/IMultiplayer.h index 7245dbde9b..3c1dd370cd 100644 --- a/Gems/Multiplayer/Code/Include/Multiplayer/IMultiplayer.h +++ b/Gems/Multiplayer/Code/Include/Multiplayer/IMultiplayer.h @@ -265,7 +265,7 @@ namespace Multiplayer } private: HostFrameId m_previousHostFrameId = InvalidHostFrameId; - AZ::TimeMs m_previousHostTimeMs = AZ::TimeMs{ 0 }; + AZ::TimeMs m_previousHostTimeMs = AZ::Time::ZeroTimeMs; AzNetworking::ConnectionId m_previousRewindConnectionId = AzNetworking::InvalidConnectionId; float m_previousBlendFactor = DefaultBlendFactor; }; diff --git a/Gems/Multiplayer/Code/Include/Multiplayer/MultiplayerStats.h b/Gems/Multiplayer/Code/Include/Multiplayer/MultiplayerStats.h index 98a7b165f8..7bd0e9f527 100644 --- a/Gems/Multiplayer/Code/Include/Multiplayer/MultiplayerStats.h +++ b/Gems/Multiplayer/Code/Include/Multiplayer/MultiplayerStats.h @@ -27,7 +27,7 @@ namespace Multiplayer uint64_t m_serverConnectionCount = 0; uint64_t m_recordMetricIndex = 0; - AZ::TimeMs m_totalHistoryTimeMs = AZ::TimeMs{ 0 }; + AZ::TimeMs m_totalHistoryTimeMs = AZ::Time::ZeroTimeMs; static const uint32_t RingbufferSamples = 32; using MetricRingbuffer = AZStd::array; diff --git a/Gems/Multiplayer/Code/Include/Multiplayer/NetworkEntity/EntityReplication/EntityReplicationManager.h b/Gems/Multiplayer/Code/Include/Multiplayer/NetworkEntity/EntityReplication/EntityReplicationManager.h index 10346ad777..6bd22b39a1 100644 --- a/Gems/Multiplayer/Code/Include/Multiplayer/NetworkEntity/EntityReplication/EntityReplicationManager.h +++ b/Gems/Multiplayer/Code/Include/Multiplayer/NetworkEntity/EntityReplication/EntityReplicationManager.h @@ -150,7 +150,6 @@ namespace Multiplayer void ClearRemovedReplicators(); class OrphanedEntityRpcs - : public AzNetworking::ITimeoutHandler { public: OrphanedEntityRpcs(EntityReplicationManager& replicationManager); @@ -159,7 +158,6 @@ namespace Multiplayer void AddOrphanedRpc(NetEntityId entityId, NetworkEntityRpcMessage& entityRpcMessage); AZStd::size_t Size() const { return m_entityRpcMap.size(); } private: - AzNetworking::TimeoutResult HandleTimeout(AzNetworking::TimeoutQueue::TimeoutItem& item) override; struct OrphanedRpcs { OrphanedRpcs() = default; @@ -203,9 +201,9 @@ namespace Multiplayer AZStd::unique_ptr m_replicationWindow; AZStd::unique_ptr m_remoteEntityDomain; - AZ::TimeMs m_entityActivationTimeSliceMs = AZ::TimeMs{ 0 }; - AZ::TimeMs m_entityPendingRemovalMs = AZ::TimeMs{ 0 }; - AZ::TimeMs m_frameTimeMs = AZ::TimeMs{ 0 }; + AZ::TimeMs m_entityActivationTimeSliceMs = AZ::Time::ZeroTimeMs; + AZ::TimeMs m_entityPendingRemovalMs = AZ::Time::ZeroTimeMs; + AZ::TimeMs m_frameTimeMs = AZ::Time::ZeroTimeMs; HostId m_remoteHostId = InvalidHostId; uint32_t m_maxRemoteEntitiesPendingCreationCount = AZStd::numeric_limits::max(); uint32_t m_maxPayloadSize = 0; diff --git a/Gems/Multiplayer/Code/Include/Multiplayer/NetworkEntity/INetworkEntityManager.h b/Gems/Multiplayer/Code/Include/Multiplayer/NetworkEntity/INetworkEntityManager.h index 43915127ed..8c16176736 100644 --- a/Gems/Multiplayer/Code/Include/Multiplayer/NetworkEntity/INetworkEntityManager.h +++ b/Gems/Multiplayer/Code/Include/Multiplayer/NetworkEntity/INetworkEntityManager.h @@ -26,6 +26,7 @@ namespace Multiplayer using EntityExitDomainEvent = AZ::Event; using ControllersActivatedEvent = AZ::Event; using ControllersDeactivatedEvent = AZ::Event; + using NetEntityIdSet = AZStd::unordered_set; //! @class INetworkEntityManager //! @brief The interface for managing all networked entities. @@ -34,18 +35,17 @@ namespace Multiplayer public: AZ_RTTI(INetworkEntityManager, "{109759DE-9492-439C-A0B1-AE46E6FD029C}"); - using OwnedEntitySet = AZStd::unordered_set; using EntityList = AZStd::vector; virtual ~INetworkEntityManager() = default; - //! Configures the NetworkEntityManager to operate as an authoritative host. - //! @param hostId the hostId of this NetworkEntityManager + //! Configures the NetworkEntityManager. + //! @param hostId the hostId of this NetworkEntityManager (invalid for clients) //! @param entityDomain the entity domain used to determine which entities this manager has authority over virtual void Initialize(const HostId& hostId, AZStd::unique_ptr entityDomain) = 0; - //! Returns whether or not the network entity manager has been initialized to host. - //! @return boolean true if this network entity manager has been intialized to host + //! Returns whether or not the network entity manager has been initialized. + //! @return boolean true if this network entity manager has been intialized virtual bool IsInitialized() const = 0; //! Returns the entity domain associated with this network entity manager, this will be nullptr on clients. @@ -181,6 +181,19 @@ namespace Multiplayer //! @param entityRpcMessage the local rpc message to handle virtual void HandleLocalRpcMessage(NetworkEntityRpcMessage& message) = 0; + //! Handles a set of entities transitioning between entity domains. + //! @param entitiesNotInDomain the set of entities that are no longer contained within our entity domain + virtual void HandleEntitiesExitDomain(const NetEntityIdSet& entitiesNotInDomain) = 0; + + //! Forcibly assumes authoritative control over the given entity. + //! This should only be used in the event of the unexpected loss of the previous authority, any other usage could corrupt the simulation. + //! @param entityHandle the entity to forcibly assume authoritative control over + virtual void ForceAssumeAuthority(const ConstNetworkEntityHandle& entityHandle) = 0; + + //! Overrides the default timeout time used during entity migrations. + //! @param timeoutTimeMs the timeout time to use in milliseconds + virtual void SetMigrateTimeoutTimeMs(AZ::TimeMs timeoutTimeMs) = 0; + //! Visualization of network entity manager state. virtual void DebugDraw() const = 0; }; diff --git a/Gems/Multiplayer/Code/Include/Multiplayer/NetworkInput/NetworkInput.h b/Gems/Multiplayer/Code/Include/Multiplayer/NetworkInput/NetworkInput.h index 1e02d6bf56..8e2e809e72 100644 --- a/Gems/Multiplayer/Code/Include/Multiplayer/NetworkInput/NetworkInput.h +++ b/Gems/Multiplayer/Code/Include/Multiplayer/NetworkInput/NetworkInput.h @@ -75,7 +75,7 @@ namespace Multiplayer MultiplayerComponentInputVector m_componentInputs; ClientInputId m_inputId = ClientInputId{ 0 }; HostFrameId m_hostFrameId = InvalidHostFrameId; - AZ::TimeMs m_hostTimeMs = AZ::TimeMs{ 0 }; + AZ::TimeMs m_hostTimeMs = AZ::Time::ZeroTimeMs; float m_hostBlendFactor = 0.f; ConstNetworkEntityHandle m_owner; bool m_wasAttached = false; diff --git a/Gems/Multiplayer/Code/Source/Components/LocalPredictionPlayerInputComponent.cpp b/Gems/Multiplayer/Code/Source/Components/LocalPredictionPlayerInputComponent.cpp index 96d6a5e31e..262f9d524f 100644 --- a/Gems/Multiplayer/Code/Source/Components/LocalPredictionPlayerInputComponent.cpp +++ b/Gems/Multiplayer/Code/Source/Components/LocalPredictionPlayerInputComponent.cpp @@ -66,11 +66,6 @@ namespace Multiplayer } } - inline double ConvertTimeMsToSeconds(AZ::TimeMs value) - { - return static_cast(static_cast(value)) / 1000.0; - } - void LocalPredictionPlayerInputComponent::LocalPredictionPlayerInputComponent::Reflect(AZ::ReflectContext* context) { AZ::SerializeContext* serializeContext = azrtti_cast(context); @@ -162,7 +157,7 @@ namespace Multiplayer } const AZ::TimeMs currentTimeMs = AZ::GetElapsedTimeMs(); - const double clientInputRateSec = ConvertTimeMsToSeconds(cl_InputRateMs); + const double clientInputRateSec = AZ::TimeMsToSecondsDouble(cl_InputRateMs); m_lastInputReceivedTimeMs = currentTimeMs; // Keep track of last inputs received, also allows us to update frame ids @@ -267,7 +262,7 @@ namespace Multiplayer return; } - const double clientInputRateSec = ConvertTimeMsToSeconds(cl_InputRateMs); + const double clientInputRateSec = AZ::TimeMsToSecondsDouble(cl_InputRateMs); // Copy array so we can modify input ids NetworkInputMigrationVector inputArrayCopy = inputArray; @@ -342,7 +337,7 @@ namespace Multiplayer // If this correction is for a move outside our input history window, just start replaying from the oldest move we have available const uint32_t startReplayIndex = (inputHistorySize > historicalDelta) ? (inputHistorySize - historicalDelta) : 0; - const double clientInputRateSec = ConvertTimeMsToSeconds(cl_InputRateMs); + const double clientInputRateSec = AZ::TimeMsToSecondsDouble(cl_InputRateMs); for (uint32_t replayIndex = startReplayIndex; replayIndex < inputHistorySize; ++replayIndex) { // Reprocess the input for this frame @@ -423,9 +418,9 @@ namespace Multiplayer void LocalPredictionPlayerInputComponentController::UpdateAutonomous(AZ::TimeMs deltaTimeMs) { - const double deltaTime = ConvertTimeMsToSeconds(deltaTimeMs); - const double clientInputRateSec = ConvertTimeMsToSeconds(cl_InputRateMs); - const double maxRewindHistory = ConvertTimeMsToSeconds(cl_MaxRewindHistoryMs); + const double deltaTime = AZ::TimeMsToSecondsDouble(deltaTimeMs); + const double clientInputRateSec = AZ::TimeMsToSecondsDouble(cl_InputRateMs); + const double maxRewindHistory = AZ::TimeMsToSecondsDouble(cl_MaxRewindHistoryMs); #ifndef AZ_RELEASE_BUILD m_moveAccumulator += deltaTime * cl_DebugHackTimeMultiplier; diff --git a/Gems/Multiplayer/Code/Source/Components/NetBindComponent.cpp b/Gems/Multiplayer/Code/Source/Components/NetBindComponent.cpp index cc71000d33..beb17ed9f6 100644 --- a/Gems/Multiplayer/Code/Source/Components/NetBindComponent.cpp +++ b/Gems/Multiplayer/Code/Source/Components/NetBindComponent.cpp @@ -39,8 +39,8 @@ namespace Multiplayer "Network Binding", "The Network Binding component marks an entity as able to be replicated across the network") ->ClassElement(AZ::Edit::ClassElements::EditorData, "") ->Attribute(AZ::Edit::Attributes::Category, "Multiplayer") - ->Attribute(AZ::Edit::Attributes::Icon, "Icons/Components/NetBind.png") - ->Attribute(AZ::Edit::Attributes::ViewportIcon, "Icons/Components/Viewport/NetBind.png") + ->Attribute(AZ::Edit::Attributes::Icon, "Icons/Components/NetBinding.svg") + ->Attribute(AZ::Edit::Attributes::ViewportIcon, "Icons/Components/Viewport/NetBinding.svg") ->Attribute(AZ::Edit::Attributes::AppearsInAddComponentMenu, AZ_CRC_CE("Game")); } } @@ -167,7 +167,10 @@ namespace Multiplayer void NetBindComponent::Deactivate() { - AZ_Assert(m_needsToBeStopped == false, "Entity appears to have been improperly deleted. Use MarkForRemoval to correctly clean up a networked entity."); + AZ_Assert( + m_needsToBeStopped == false, + "Entity (%s) appears to have been improperly deleted. Use MarkForRemoval to correctly clean up a networked entity.", + GetEntity() ? GetEntity()->GetName().c_str() : "null"); m_handleLocalServerRpcMessageEventHandle.Disconnect(); if (NetworkRoleHasController(m_netEntityRole)) { @@ -317,7 +320,7 @@ namespace Multiplayer return false; } - bool NetBindComponent::HandlePropertyChangeMessage([[maybe_unused]] AzNetworking::ISerializer& serializer, [[maybe_unused]] bool notifyChanges) + bool NetBindComponent::HandlePropertyChangeMessage(AzNetworking::ISerializer& serializer, bool notifyChanges) { const NetEntityRole netEntityRole = m_netEntityRole; ReplicationRecord replicationRecord(netEntityRole); @@ -492,7 +495,7 @@ namespace Multiplayer void NetBindComponent::FillTotalReplicationRecord(ReplicationRecord& replicationRecord) const { replicationRecord.Append(m_totalRecord); - // if we have any outstanding changes yet to be logged, grab those as well + // If we have any outstanding changes yet to be logged, grab those as well if (m_currentRecord.HasChanges()) { replicationRecord.Append(m_currentRecord); diff --git a/Gems/Multiplayer/Code/Source/Components/NetworkTransformComponent.cpp b/Gems/Multiplayer/Code/Source/Components/NetworkTransformComponent.cpp index bd1e1bf0d9..a6e670a835 100644 --- a/Gems/Multiplayer/Code/Source/Components/NetworkTransformComponent.cpp +++ b/Gems/Multiplayer/Code/Source/Components/NetworkTransformComponent.cpp @@ -44,7 +44,7 @@ namespace Multiplayer GetNetBindComponent()->AddEntityCorrectionEventHandler(m_entityCorrectionEventHandler); ParentEntityIdAddEvent(m_parentChangedEventHandler); - if (!HasController()) + if (!GetNetBindComponent()->IsNetEntityRoleAuthority()) { OnParentChanged(GetParentEntityId()); } diff --git a/Gems/Multiplayer/Code/Source/ConnectionData/ClientToServerConnectionData.cpp b/Gems/Multiplayer/Code/Source/ConnectionData/ClientToServerConnectionData.cpp index 392b020748..2989b7629e 100644 --- a/Gems/Multiplayer/Code/Source/ConnectionData/ClientToServerConnectionData.cpp +++ b/Gems/Multiplayer/Code/Source/ConnectionData/ClientToServerConnectionData.cpp @@ -13,7 +13,7 @@ namespace Multiplayer // This can be used to help mitigate client side performance when large numbers of entities are created off the network AZ_CVAR(uint32_t, cl_ClientMaxRemoteEntitiesPendingCreationCount, AZStd::numeric_limits::max(), nullptr, AZ::ConsoleFunctorFlags::DontReplicate, "Maximum number of entities that we have sent to the client, but have not had a confirmation back from the client"); AZ_CVAR(AZ::TimeMs, cl_ClientEntityReplicatorPendingRemovalTimeMs, AZ::TimeMs{ 10000 }, nullptr, AZ::ConsoleFunctorFlags::DontReplicate, "How long should wait prior to removing an entity for the client through a change in the replication window, entity deletes are still immediate"); - AZ_CVAR(AZ::TimeMs, cl_DefaultNetworkEntityActivationTimeSliceMs, AZ::TimeMs{ 0 }, nullptr, AZ::ConsoleFunctorFlags::DontReplicate, "Max Ms to use to activate entities coming from the network, 0 means instantiate everything"); + AZ_CVAR(AZ::TimeMs, cl_DefaultNetworkEntityActivationTimeSliceMs, AZ::Time::ZeroTimeMs, nullptr, AZ::ConsoleFunctorFlags::DontReplicate, "Max Ms to use to activate entities coming from the network, 0 means instantiate everything"); ClientToServerConnectionData::ClientToServerConnectionData ( diff --git a/Gems/Multiplayer/Code/Source/Debug/MultiplayerDebugHierarchyReporter.cpp b/Gems/Multiplayer/Code/Source/Debug/MultiplayerDebugHierarchyReporter.cpp index ad28307204..78963439ed 100644 --- a/Gems/Multiplayer/Code/Source/Debug/MultiplayerDebugHierarchyReporter.cpp +++ b/Gems/Multiplayer/Code/Source/Debug/MultiplayerDebugHierarchyReporter.cpp @@ -27,7 +27,7 @@ namespace Multiplayer CollectHierarchyRoots(); AZ::EntitySystemBus::Handler::BusConnect(); - m_updateDebugOverlay.Enqueue(AZ::TimeMs{ 0 }, true); + m_updateDebugOverlay.Enqueue(AZ::Time::ZeroTimeMs, true); } MultiplayerDebugHierarchyReporter::~MultiplayerDebugHierarchyReporter() diff --git a/Gems/Multiplayer/Code/Source/Debug/MultiplayerDebugPerEntityReporter.cpp b/Gems/Multiplayer/Code/Source/Debug/MultiplayerDebugPerEntityReporter.cpp index adfef397b6..a53420da84 100644 --- a/Gems/Multiplayer/Code/Source/Debug/MultiplayerDebugPerEntityReporter.cpp +++ b/Gems/Multiplayer/Code/Source/Debug/MultiplayerDebugPerEntityReporter.cpp @@ -127,7 +127,7 @@ namespace Multiplayer MultiplayerDebugPerEntityReporter::MultiplayerDebugPerEntityReporter() : m_updateDebugOverlay([this]() { UpdateDebugOverlay(); }, AZ::Name("UpdateDebugPerEntityOverlay")) { - m_updateDebugOverlay.Enqueue(AZ::TimeMs{ 0 }, true); + m_updateDebugOverlay.Enqueue(AZ::Time::ZeroTimeMs, true); m_eventHandlers.m_entitySerializeStart = decltype(m_eventHandlers.m_entitySerializeStart)([this](AzNetworking::SerializerMode mode, AZ::EntityId entityId, const char* entityName) { diff --git a/Gems/Multiplayer/Code/Source/Editor/MultiplayerEditorConnection.cpp b/Gems/Multiplayer/Code/Source/Editor/MultiplayerEditorConnection.cpp index 3c3c4f0664..c8c1ed15bd 100644 --- a/Gems/Multiplayer/Code/Source/Editor/MultiplayerEditorConnection.cpp +++ b/Gems/Multiplayer/Code/Source/Editor/MultiplayerEditorConnection.cpp @@ -20,6 +20,8 @@ #include #include #include +#include +#include namespace Multiplayer { @@ -33,10 +35,34 @@ namespace Multiplayer { m_networkEditorInterface = AZ::Interface::Get()->CreateNetworkInterface( AZ::Name(MpEditorInterfaceName), ProtocolType::Tcp, TrustZone::ExternalClientToServer, *this); - m_networkEditorInterface->SetTimeoutMs(AZ::TimeMs{ 0 }); // Disable timeouts on this network interface - ActivateDedicatedEditorServer(); - } + m_networkEditorInterface->SetTimeoutMs(AZ::Time::ZeroTimeMs); // Disable timeouts on this network interface + // Wait to activate the editor-server until LegacySystemInterfaceCreated so that the logging system is ready + // Automated testing listens for these logs + if (editorsv_isDedicated) + { + // Server logs will be piped to the editor so turn off buffering, + // otherwise it'll take a lot of logs to fill up the buffer before stdout is finally flushed. + // This isn't optimal, but will only affect editor-servers (used when testing multiplayer levels in Editor gameplay mode) and not production servers. + // Note: _IOLBF (flush on newlines) won't work for Automated Testing which uses a headless server app and will fall back to _IOFBF (full buffering) + setvbuf(stdout, NULL, _IONBF, 0); + + // If the settings registry is not available at this point, + // then something catastrophic has happened in the application startup. + // That should have been caught and messaged out earlier in startup. + if (auto settingsRegistry = AZ::SettingsRegistry::Get(); settingsRegistry != nullptr) + { + AZ::ComponentApplicationLifecycle::RegisterHandler( + *settingsRegistry, m_componentApplicationLifecycleHandler, + [this](AZStd::string_view /*path*/, AZ::SettingsRegistryInterface::Type /*type*/) + { + ActivateDedicatedEditorServer(); + }, + "CriticalAssetsCompiled"); + } + } + } + void MultiplayerEditorConnection::ActivateDedicatedEditorServer() const { if (m_isActivated || !editorsv_isDedicated) @@ -61,7 +87,7 @@ namespace Multiplayer else { m_networkEditorInterface->SendReliablePacket(editorServerToEditorConnectionId, MultiplayerEditorPackets::EditorServerReadyForLevelData()); - AZ_Printf("MultiplayerEditorConnection", "Editor-server activation has found and connected to the editor.") + AZ_Printf("MultiplayerEditorConnection", "Editor-server activation has found and connected to the editor.\n") } } @@ -215,5 +241,4 @@ namespace Multiplayer { return MultiplayerEditorPackets::DispatchPacket(connection, packetHeader, serializer, *this); } - } diff --git a/Gems/Multiplayer/Code/Source/Editor/MultiplayerEditorConnection.h b/Gems/Multiplayer/Code/Source/Editor/MultiplayerEditorConnection.h index f6510896fe..721c7e0a0f 100644 --- a/Gems/Multiplayer/Code/Source/Editor/MultiplayerEditorConnection.h +++ b/Gems/Multiplayer/Code/Source/Editor/MultiplayerEditorConnection.h @@ -9,12 +9,10 @@ #pragma once #include - -#include -#include #include -#include #include +#include +#include namespace AzNetworking { @@ -51,5 +49,6 @@ namespace Multiplayer AZStd::vector m_buffer; AZ::IO::ByteContainerStream> m_byteStream; mutable bool m_isActivated = false; + AZ::SettingsRegistryInterface::NotifyEventHandler m_componentApplicationLifecycleHandler; }; } diff --git a/Gems/Multiplayer/Code/Source/Editor/MultiplayerEditorSystemComponent.cpp b/Gems/Multiplayer/Code/Source/Editor/MultiplayerEditorSystemComponent.cpp index 11aca101b3..06a3d4a57a 100644 --- a/Gems/Multiplayer/Code/Source/Editor/MultiplayerEditorSystemComponent.cpp +++ b/Gems/Multiplayer/Code/Source/Editor/MultiplayerEditorSystemComponent.cpp @@ -14,11 +14,8 @@ #include #include #include -#include -#include #include -#include #include #include #include @@ -63,6 +60,12 @@ namespace Multiplayer void PythonEditorFuncs::Reflect(AZ::ReflectContext* context) { + if (AZ::SerializeContext* serialize = azrtti_cast(context)) + { + serialize->Class() + ->Version(0); + } + if (AZ::BehaviorContext* behaviorContext = azrtti_cast(context)) { // This will create static python methods in the 'azlmbr.multiplayer' module @@ -133,6 +136,7 @@ namespace Multiplayer AzToolsFramework::EditorEvents::Bus::Handler::BusDisconnect(); AzFramework::GameEntityContextEventBus::Handler::BusDisconnect(); MultiplayerEditorServerRequestBus::Handler::BusDisconnect(); + AZ::TickBus::Handler::BusDisconnect(); } void MultiplayerEditorSystemComponent::NotifyRegisterViews() @@ -157,12 +161,20 @@ namespace Multiplayer [[fallthrough]]; case eNotify_OnEndGameMode: // Kill the configured server if it's active - if (m_serverProcess) + AZ::TickBus::Handler::BusDisconnect(); + if (m_serverProcessWatcher) { - m_serverProcess->TerminateProcess(0); - m_serverProcess = nullptr; + m_serverProcessWatcher->TerminateProcess(0); + if (m_serverProcessTracePrinter) + { + m_serverProcessTracePrinter->Pump(); + m_serverProcessTracePrinter->WriteCurrentString(true); + m_serverProcessTracePrinter->WriteCurrentString(false); + } + m_serverProcessWatcher = nullptr; + m_serverProcessTracePrinter = nullptr; } - + if (INetworkInterface* editorNetworkInterface = AZ::Interface::Get()->RetrieveNetworkInterface(AZ::Name(MpEditorInterfaceName))) { editorNetworkInterface->Disconnect(m_editorConnId, AzNetworking::DisconnectReason::TerminatedByClient); @@ -181,7 +193,7 @@ namespace Multiplayer } } - AzFramework::ProcessWatcher* LaunchEditorServer() + void MultiplayerEditorSystemComponent::LaunchEditorServer() { // Assemble the server's path AZ::CVarFixedString serverProcess = editorsv_process; @@ -207,12 +219,22 @@ namespace Multiplayer { server_rhi = static_cast(editorsv_rhi_override); } + + const auto console = AZ::Interface::Get(); + AZ::CVarFixedString sv_defaultPlayerSpawnAsset; + + if (console->GetCvarValue("sv_defaultPlayerSpawnAsset", sv_defaultPlayerSpawnAsset) != AZ::GetValueResult::Success) + { + AZ_Assert( false, + "MultiplayerEditorSystemComponent::LaunchEditorServer failed! Could not find the sv_defaultPlayerSpawnAsset cvar; the editor-server " + "will fall back to using some other default player! Please update this code to use a valid cvar!") + } processLaunchInfo.m_commandlineParameters = AZStd::string::format( R"("%s" --project-path "%s" --editorsv_isDedicated true --sv_defaultPlayerSpawnAsset "%s" --rhi "%s")", serverPath.c_str(), AZ::Utils::GetProjectPath().c_str(), - static_cast(sv_defaultPlayerSpawnAsset).c_str(), + sv_defaultPlayerSpawnAsset.c_str(), server_rhi.GetCStr() ); processLaunchInfo.m_showWindow = true; @@ -220,34 +242,50 @@ namespace Multiplayer // Launch the Server AzFramework::ProcessWatcher* outProcess = AzFramework::ProcessWatcher::LaunchProcess( - processLaunchInfo, AzFramework::ProcessCommunicationType::COMMUNICATOR_TYPE_NONE); + processLaunchInfo, AzFramework::ProcessCommunicationType::COMMUNICATOR_TYPE_STDINOUT); AZ_Error( "MultiplayerEditor", processLaunchInfo.m_launchResult != AzFramework::ProcessLauncher::ProcessLaunchResult::PLR_MissingFile, "LaunchEditorServer failed! The ServerLauncher binary is missing! (%s) Please build server launcher.", serverPath.c_str()) - return outProcess; + // Stop the previous server if one exists + if (m_serverProcessWatcher) + { + AZ::TickBus::Handler::BusDisconnect(); + m_serverProcessWatcher->TerminateProcess(0); + } + m_serverProcessWatcher.reset(outProcess); + m_serverProcessTracePrinter = AZStd::make_unique(m_serverProcessWatcher->GetCommunicator(), "EditorServer"); + AZ::TickBus::Handler::BusConnect(); } void MultiplayerEditorSystemComponent::OnGameEntitiesStarted() { + IMultiplayerTools* mpTools = AZ::Interface::Get(); + if (!editorsv_enabled || !mpTools) + { + // Early out if Editor server is not enabled. + // This allows to avoid printing an error about missing PrefabEditorEntityOwnershipInterface for non-prefab levels. + return; + } + auto prefabEditorEntityOwnershipInterface = AZ::Interface::Get(); if (!prefabEditorEntityOwnershipInterface) { AZ_Error("MultiplayerEditor", prefabEditorEntityOwnershipInterface != nullptr, "PrefabEditorEntityOwnershipInterface unavailable"); + return; } // BeginGameMode and Prefab Processing have completed at this point - IMultiplayerTools* mpTools = AZ::Interface::Get(); - if (editorsv_enabled && mpTools != nullptr) - { - const AZStd::vector>& assetData = prefabEditorEntityOwnershipInterface->GetPlayInEditorAssetData(); + const auto& allAssetData = prefabEditorEntityOwnershipInterface->GetPlayInEditorAssetData(); - AZStd::vector buffer; - AZ::IO::ByteContainerStream byteStream(&buffer); + AZStd::vector buffer; + AZ::IO::ByteContainerStream byteStream(&buffer); - // Serialize Asset information and AssetData into a potentially large buffer - for (const auto& asset : assetData) + // Serialize Asset information and AssetData into a potentially large buffer + for (auto& [spawnableName, spawnableAssetData] : allAssetData) + { + for (auto& asset : spawnableAssetData.m_assets) { AZ::Data::AssetId assetId = asset.GetId(); AZStd::string assetHint = asset.GetHint(); @@ -258,52 +296,51 @@ namespace Multiplayer byteStream.Write(assetHint.size(), assetHint.data()); AZ::Utils::SaveObjectToStream(byteStream, AZ::DataStream::ST_BINARY, asset.GetData(), asset.GetData()->GetType()); } + } - const AZ::CVarFixedString remoteAddress = editorsv_serveraddr; - if (editorsv_launch) + const AZ::CVarFixedString remoteAddress = editorsv_serveraddr; + if (editorsv_launch) + { + if (LocalHost != remoteAddress) { - if (LocalHost != remoteAddress) - { - AZ_Warning( - "MultiplayerEditor", false, - "Launching EditorServer skipped because incompatible cvars. editorsv_launch=true, meaning you want to launch an editor-server on this machine, but the editorsv_serveraddr is %s instead of the local address (127.0.0.1). " - "Please either set editorsv_launch=false and keep the remote editor-server, or set editorsv_launch=true and editorsv_serveraddr=127.0.0.1.", - remoteAddress.c_str()) - return; - } - - // Begin listening for MPEditor packets before we launch the editor-server. - // The editor-server will send us (the editor) an "EditorServerReadyForLevelData" packet to let us know it's ready to receive data. - INetworkInterface* editorNetworkInterface = - AZ::Interface::Get()->RetrieveNetworkInterface(AZ::Name(MpEditorInterfaceName)); - AZ_Assert(editorNetworkInterface, "MP Editor Network Interface was unregistered before Editor could connect."); - editorNetworkInterface->Listen(editorsv_port); - - // Launch the editor-server - m_serverProcess = LaunchEditorServer(); + AZ_Warning( + "MultiplayerEditor", false, + "Launching editor server skipped because of incompatible settings. " + "When using editorsv_launch=true editorsv_serveraddr must be set to local address (127.0.0.1) instead %s", + remoteAddress.c_str()) + return; } - else + + // Begin listening for MPEditor packets before we launch the editor-server. + // The editor-server will send us (the editor) an "EditorServerReadyForLevelData" packet to let us know it's ready to receive data. + INetworkInterface* editorNetworkInterface = + AZ::Interface::Get()->RetrieveNetworkInterface(AZ::Name(MpEditorInterfaceName)); + AZ_Assert(editorNetworkInterface, "MP Editor Network Interface was unregistered before Editor could connect."); + editorNetworkInterface->Listen(editorsv_port); + + // Launch the editor-server + LaunchEditorServer(); + } + else + { + // Editorsv_launch=false, so we're expecting an editor-server already exists. + // Connect to the editor-server and then send the EditorServerLevelData packet. + INetworkInterface* editorNetworkInterface = AZ::Interface::Get()->RetrieveNetworkInterface(AZ::Name(MpEditorInterfaceName)); + AZ_Assert(editorNetworkInterface, "MP Editor Network Interface was unregistered before Editor could connect.") + + m_editorConnId = editorNetworkInterface->Connect(AzNetworking::IpAddress(remoteAddress.c_str(), editorsv_port, AzNetworking::ProtocolType::Tcp)); + + if (m_editorConnId == AzNetworking::InvalidConnectionId) { - // Editorsv_launch=false, so we're expecting an editor-server already exists. - // Connect to the editor-server and then send the EditorServerLevelData packet. - INetworkInterface* editorNetworkInterface = AZ::Interface::Get()->RetrieveNetworkInterface(AZ::Name(MpEditorInterfaceName)); - AZ_Assert(editorNetworkInterface, "MP Editor Network Interface was unregistered before Editor could connect.") - - m_editorConnId = editorNetworkInterface->Connect(AzNetworking::IpAddress(remoteAddress.c_str(), editorsv_port, AzNetworking::ProtocolType::Tcp)); - - if (m_editorConnId == AzNetworking::InvalidConnectionId) - { - AZ_Warning( - "MultiplayerEditor", false, - "Editor multiplayer game-mode failed! Could not connect to an editor-server. editorsv_launch is false so we're assuming you're running your own editor-server at editorsv_serveraddr(%s) on editorsv_port(%i). " - "Either set editorsv_launch=true so the editor launches an editor-server for you, or launch your own editor-server by hand before entering game-mode. Remember editor-servers must use editorsv_isDedicated=true.", - remoteAddress.c_str(), - static_cast(editorsv_port)) - return; - } - - SendEditorServerLevelDataPacket(editorNetworkInterface->GetConnectionSet().GetConnection(m_editorConnId)); + AZ_Warning( + "MultiplayerEditor", false, + "Could not connect to a server at editorsv_serveraddr(%s) on editorsv_port(%i). Check server is active or use editorsv_launch to auto-launch a server.", + remoteAddress.c_str(), + static_cast(editorsv_port)) + return; } + + SendEditorServerLevelDataPacket(editorNetworkInterface->GetConnectionSet().GetConnection(m_editorConnId)); } } @@ -330,24 +367,27 @@ namespace Multiplayer AZ_Printf("MultiplayerEditor", "Editor is sending the editor-server the level data packet.") - const AZStd::vector>& assetData = prefabEditorEntityOwnershipInterface->GetPlayInEditorAssetData(); + const auto& allAssetData = prefabEditorEntityOwnershipInterface->GetPlayInEditorAssetData(); AZStd::vector buffer; AZ::IO::ByteContainerStream byteStream(&buffer); // Serialize Asset information and AssetData into a potentially large buffer - for (const auto& asset : assetData) + for (auto& [spawnableName, spawnableAssetData] : allAssetData) { - AZ::Data::AssetId assetId = asset.GetId(); - AZStd::string assetHint = asset.GetHint(); - auto hintSize = aznumeric_cast(assetHint.size()); + for (auto& asset : spawnableAssetData.m_assets) + { + AZ::Data::AssetId assetId = asset.GetId(); + AZStd::string assetHint = asset.GetHint(); + auto hintSize = aznumeric_cast(assetHint.size()); - byteStream.Write(sizeof(AZ::Data::AssetId), reinterpret_cast(&assetId)); - byteStream.Write(sizeof(uint32_t), reinterpret_cast(&hintSize)); - byteStream.Write(assetHint.size(), assetHint.data()); - AZ::Utils::SaveObjectToStream(byteStream, AZ::DataStream::ST_BINARY, asset.GetData(), asset.GetData()->GetType()); + byteStream.Write(sizeof(AZ::Data::AssetId), reinterpret_cast(&assetId)); + byteStream.Write(sizeof(uint32_t), reinterpret_cast(&hintSize)); + byteStream.Write(assetHint.size(), assetHint.data()); + AZ::Utils::SaveObjectToStream(byteStream, AZ::DataStream::ST_BINARY, asset.GetData(), asset.GetData()->GetType()); + } } - + // Spawnable library needs to be rebuilt since now we have newly registered in-memory spawnable assets AZ::Interface::Get()->BuildSpawnablesList(); @@ -389,4 +429,20 @@ namespace Multiplayer { return PyIsInGameMode(); } + + void MultiplayerEditorSystemComponent::OnTick(float, AZ::ScriptTimePoint) + { + if (m_serverProcessTracePrinter) + { + m_serverProcessTracePrinter->Pump(); + } + else + { + AZ::TickBus::Handler::BusDisconnect(); + AZ_Warning( + "MultiplayerEditorSystemComponent", false, + "The server process trace printer is NULL so we won't be able to pipe server logs to the editor. Please update the code to call AZ::TickBus::Handler::BusDisconnect whenever the editor-server is terminated.") + } + } + } diff --git a/Gems/Multiplayer/Code/Source/Editor/MultiplayerEditorSystemComponent.h b/Gems/Multiplayer/Code/Source/Editor/MultiplayerEditorSystemComponent.h index 77b41a5dc4..5e49f8f08d 100644 --- a/Gems/Multiplayer/Code/Source/Editor/MultiplayerEditorSystemComponent.h +++ b/Gems/Multiplayer/Code/Source/Editor/MultiplayerEditorSystemComponent.h @@ -13,14 +13,12 @@ #include #include -#include - #include #include #include -#include #include #include +#include #include namespace AzNetworking @@ -52,6 +50,7 @@ namespace Multiplayer , private AzToolsFramework::EditorEvents::Bus::Handler , private IEditorNotifyListener , private MultiplayerEditorServerRequestBus::Handler + , private AZ::TickBus::Handler { public: AZ_COMPONENT(MultiplayerEditorSystemComponent, "{9F335CC0-5574-4AD3-A2D8-2FAEF356946C}"); @@ -84,7 +83,9 @@ namespace Multiplayer bool IsInGameMode() override; //! @} - private: + private: + void LaunchEditorServer(); + //! EditorEvents::Handler overrides //! @{ void OnEditorNotifyEvent(EEditorNotifyEvent event) override; @@ -101,8 +102,14 @@ namespace Multiplayer void SendEditorServerLevelDataPacket(AzNetworking::IConnection* connection) override; //! @} + //! AZ::TickBus::Handler + //! @{ + void OnTick(float, AZ::ScriptTimePoint) override; + //! @} + IEditor* m_editor = nullptr; - AzFramework::ProcessWatcher* m_serverProcess = nullptr; + AZStd::unique_ptr m_serverProcessWatcher = nullptr; + AZStd::unique_ptr m_serverProcessTracePrinter = nullptr; AzNetworking::ConnectionId m_editorConnId; ServerAcceptanceReceivedEvent::Handler m_serverAcceptanceReceivedHandler; diff --git a/Gems/Multiplayer/Code/Source/EntityDomains/FullOwnershipEntityDomain.cpp b/Gems/Multiplayer/Code/Source/EntityDomains/FullOwnershipEntityDomain.cpp index 9d53990fb4..59e2afc638 100644 --- a/Gems/Multiplayer/Code/Source/EntityDomains/FullOwnershipEntityDomain.cpp +++ b/Gems/Multiplayer/Code/Source/EntityDomains/FullOwnershipEntityDomain.cpp @@ -26,14 +26,9 @@ namespace Multiplayer return true; } - void FullOwnershipEntityDomain::ActivateTracking([[maybe_unused]] const INetworkEntityManager::OwnedEntitySet& ownedEntitySet) + void FullOwnershipEntityDomain::HandleLossOfAuthoritativeReplicator([[maybe_unused]] const ConstNetworkEntityHandle& entityHandle) { - ; - } - - const IEntityDomain::EntitiesNotInDomain& FullOwnershipEntityDomain::RetrieveEntitiesNotInDomain() const - { - return m_entitiesNotInDomain; + AZ_Assert(false, "FullOwnershipEntityDomain has authoritative control over all entities, something unexpected has happened"); } void FullOwnershipEntityDomain::DebugDraw() const diff --git a/Gems/Multiplayer/Code/Source/EntityDomains/FullOwnershipEntityDomain.h b/Gems/Multiplayer/Code/Source/EntityDomains/FullOwnershipEntityDomain.h index ae80c16ab8..203d9579ea 100644 --- a/Gems/Multiplayer/Code/Source/EntityDomains/FullOwnershipEntityDomain.h +++ b/Gems/Multiplayer/Code/Source/EntityDomains/FullOwnershipEntityDomain.h @@ -24,12 +24,8 @@ namespace Multiplayer void SetAabb(const AZ::Aabb& aabb) override; const AZ::Aabb& GetAabb() const override; bool IsInDomain(const ConstNetworkEntityHandle& entityHandle) const override; - void ActivateTracking(const INetworkEntityManager::OwnedEntitySet& ownedEntitySet) override; - const EntitiesNotInDomain& RetrieveEntitiesNotInDomain() const override; + void HandleLossOfAuthoritativeReplicator(const ConstNetworkEntityHandle& entityHandle) override; void DebugDraw() const override; //! @} - - private: - EntitiesNotInDomain m_entitiesNotInDomain; }; } diff --git a/Gems/Multiplayer/Code/Source/EntityDomains/NullEntityDomain.cpp b/Gems/Multiplayer/Code/Source/EntityDomains/NullEntityDomain.cpp new file mode 100644 index 0000000000..21d6abcb5a --- /dev/null +++ b/Gems/Multiplayer/Code/Source/EntityDomains/NullEntityDomain.cpp @@ -0,0 +1,41 @@ +/* + * Copyright (c) Contributors to the Open 3D Engine Project. + * For complete copyright and license terms please see the LICENSE at the root of this distribution. + * + * SPDX-License-Identifier: Apache-2.0 OR MIT + * + */ + +#include +#include +#include + +namespace Multiplayer +{ + void NullEntityDomain::SetAabb([[maybe_unused]] const AZ::Aabb& aabb) + { + ; // Do nothing, by definition we own everything + } + + const AZ::Aabb& NullEntityDomain::GetAabb() const + { + static AZ::Aabb nullAabb = AZ::Aabb::CreateNull(); + return nullAabb; + } + + bool NullEntityDomain::IsInDomain([[maybe_unused]] const ConstNetworkEntityHandle& entityHandle) const + { + return false; + } + + void NullEntityDomain::HandleLossOfAuthoritativeReplicator([[maybe_unused]] const ConstNetworkEntityHandle& entityHandle) + { + AZLOG_ERROR("Timed out entity id %llu during migration, marking for removal", aznumeric_cast(entityHandle.GetNetEntityId())); + GetNetworkEntityManager()->MarkForRemoval(entityHandle); + } + + void NullEntityDomain::DebugDraw() const + { + ; + } +} diff --git a/Gems/Multiplayer/Code/Source/EntityDomains/NullEntityDomain.h b/Gems/Multiplayer/Code/Source/EntityDomains/NullEntityDomain.h new file mode 100644 index 0000000000..247d82b366 --- /dev/null +++ b/Gems/Multiplayer/Code/Source/EntityDomains/NullEntityDomain.h @@ -0,0 +1,31 @@ +/* + * Copyright (c) Contributors to the Open 3D Engine Project. + * For complete copyright and license terms please see the LICENSE at the root of this distribution. + * + * SPDX-License-Identifier: Apache-2.0 OR MIT + * + */ + +#pragma once + +#include + +namespace Multiplayer +{ + class NullEntityDomain + : public IEntityDomain + { + public: + NullEntityDomain() = default; + NullEntityDomain(const NullEntityDomain& rhs) = default; + + //! IEntityDomain overrides. + //! @{ + void SetAabb(const AZ::Aabb& aabb) override; + const AZ::Aabb& GetAabb() const override; + bool IsInDomain(const ConstNetworkEntityHandle& entityHandle) const override; + void HandleLossOfAuthoritativeReplicator(const ConstNetworkEntityHandle& entityHandle) override; + void DebugDraw() const override; + //! @} + }; +} diff --git a/Gems/Multiplayer/Code/Source/MultiplayerGem.cpp b/Gems/Multiplayer/Code/Source/MultiplayerGem.cpp index 030964d81c..830f0e2ef4 100644 --- a/Gems/Multiplayer/Code/Source/MultiplayerGem.cpp +++ b/Gems/Multiplayer/Code/Source/MultiplayerGem.cpp @@ -6,10 +6,9 @@ * */ +#include #include #include -#include -#include #include #include #include @@ -20,25 +19,32 @@ namespace Multiplayer MultiplayerModule::MultiplayerModule() : AZ::Module() { - m_descriptors.insert(m_descriptors.end(), { - AzNetworking::NetworkingSystemComponent::CreateDescriptor(), - MultiplayerSystemComponent::CreateDescriptor(), - NetBindComponent::CreateDescriptor(), - NetworkSpawnableHolderComponent::CreateDescriptor(), - }); + m_descriptors.insert( + m_descriptors.end(), + { + AzNetworking::NetworkingSystemComponent::CreateDescriptor(), + MultiplayerSystemComponent::CreateDescriptor(), + NetBindComponent::CreateDescriptor(), + NetworkSpawnableHolderComponent::CreateDescriptor(), +#ifdef MULTIPLAYER_EDITOR + MultiplayerToolsSystemComponent::CreateDescriptor(), +#endif + }); CreateComponentDescriptors(m_descriptors); } AZ::ComponentTypeList MultiplayerModule::GetRequiredSystemComponents() const { - return AZ::ComponentTypeList - { + return AZ::ComponentTypeList{ azrtti_typeid(), azrtti_typeid(), +#ifdef MULTIPLAYER_EDITOR + azrtti_typeid(), +#endif }; } -} +} // namespace Multiplayer #if !defined(MULTIPLAYER_EDITOR) AZ_DECLARE_MODULE_CLASS(Gem_Multiplayer, Multiplayer::MultiplayerModule); diff --git a/Gems/Multiplayer/Code/Source/MultiplayerSystemComponent.cpp b/Gems/Multiplayer/Code/Source/MultiplayerSystemComponent.cpp index 6df5e4611f..dcad230f71 100644 --- a/Gems/Multiplayer/Code/Source/MultiplayerSystemComponent.cpp +++ b/Gems/Multiplayer/Code/Source/MultiplayerSystemComponent.cpp @@ -13,6 +13,7 @@ #include #include #include +#include #include #include #include @@ -831,18 +832,21 @@ namespace Multiplayer if (multiplayerType == MultiplayerAgentType::ClientServer || multiplayerType == MultiplayerAgentType::DedicatedServer) { m_spawnNetboundEntities = true; - m_initEvent.Signal(m_networkInterface); - + m_initEvent.Signal(m_networkInterface); //< Note! This might initialize our network entity manager for us if (!m_networkEntityManager.IsInitialized()) { - // Set up a full ownership domain if we didn't construct a domain during the initialize event const AZ::CVarFixedString serverAddr = cl_serveraddr; const uint16_t serverPort = cl_serverport; const AzNetworking::ProtocolType serverProtocol = sv_protocol; const AzNetworking::IpAddress hostId = AzNetworking::IpAddress(serverAddr.c_str(), serverPort, serverProtocol); + // Set up a full ownership domain if we didn't construct a domain during the initialize event m_networkEntityManager.Initialize(hostId, AZStd::make_unique()); } } + else if (multiplayerType == MultiplayerAgentType::Client) + { + m_networkEntityManager.Initialize(AzNetworking::IpAddress(), AZStd::make_unique()); + } } m_agentType = multiplayerType; @@ -1106,7 +1110,6 @@ namespace Multiplayer void MultiplayerSystemComponent::OnAutonomousEntityReplicatorCreated() { m_autonomousEntityReplicatorCreatedHandler.Disconnect(); - //m_networkEntityManager.GetNetworkEntityAuthorityTracker()->ResetTimeoutTime(AZ::TimeMs{ 2000 }); m_clientMigrationEndEvent.Signal(); } @@ -1132,9 +1135,15 @@ namespace Multiplayer // make sure the player prefab path is lowercase (how it's stored in the cache folder) auto sv_defaultPlayerSpawnAssetLowerCase = static_cast(sv_defaultPlayerSpawnAsset); AZStd::to_lower(sv_defaultPlayerSpawnAssetLowerCase.begin(), sv_defaultPlayerSpawnAssetLowerCase.end()); - PrefabEntityId playerPrefabEntityId(AZ::Name(static_cast(sv_defaultPlayerSpawnAssetLowerCase).c_str())); + PrefabEntityId playerPrefabEntityId(AZ::Name(sv_defaultPlayerSpawnAssetLowerCase.c_str())); + INetworkEntityManager::EntityList entityList = m_networkEntityManager.CreateEntitiesImmediate(playerPrefabEntityId, NetEntityRole::Authority, AZ::Transform::CreateIdentity(), Multiplayer::AutoActivate::DoNotActivate); + AZ_Warning( + "MultiplayerSystemComponent", !entityList.empty(), + "SpawnDefaultPlayerPrefab failed. Missing sv_defaultPlayerSpawnAsset at path '%s'.\n", + sv_defaultPlayerSpawnAssetLowerCase.c_str()) + for (NetworkEntityHandle subEntity : entityList) { subEntity.Activate(); diff --git a/Gems/Multiplayer/Code/Source/MultiplayerSystemComponent.h b/Gems/Multiplayer/Code/Source/MultiplayerSystemComponent.h index 87d084d5bc..dd2e7956ca 100644 --- a/Gems/Multiplayer/Code/Source/MultiplayerSystemComponent.h +++ b/Gems/Multiplayer/Code/Source/MultiplayerSystemComponent.h @@ -37,8 +37,6 @@ namespace AzNetworking namespace Multiplayer { - AZ_CVAR_EXTERNED(AZ::CVarFixedString, sv_defaultPlayerSpawnAsset); - //! Multiplayer system component wraps the bridging logic between the game and transport layer. class MultiplayerSystemComponent final : public AZ::Component @@ -155,7 +153,6 @@ namespace Multiplayer AZ_CONSOLEFUNC(MultiplayerSystemComponent, DumpStats, AZ::ConsoleFunctorFlags::Null, "Dumps stats for the current multiplayer session"); AzNetworking::INetworkInterface* m_networkInterface = nullptr; - AzNetworking::INetworkInterface* m_networkEditorInterface = nullptr; AZ::ConsoleCommandInvokedEvent::Handler m_consoleCommandHandler; AZ::ThreadSafeDeque m_cvarCommands; @@ -179,7 +176,7 @@ namespace Multiplayer AZStd::queue m_pendingConnectionTickets; AZStd::unordered_map m_playerRejoinData; - AZ::TimeMs m_lastReplicatedHostTimeMs = AZ::TimeMs{ 0 }; + AZ::TimeMs m_lastReplicatedHostTimeMs = AZ::Time::ZeroTimeMs; HostFrameId m_lastReplicatedHostFrameId = HostFrameId(0); uint64_t m_temporaryUserIdentifier = 0; // Used in the event of a migration or rejoin diff --git a/Gems/Multiplayer/Code/Source/MultiplayerToolsModule.cpp b/Gems/Multiplayer/Code/Source/MultiplayerToolsModule.cpp deleted file mode 100644 index ecda82a31b..0000000000 --- a/Gems/Multiplayer/Code/Source/MultiplayerToolsModule.cpp +++ /dev/null @@ -1,60 +0,0 @@ -/* - * Copyright (c) Contributors to the Open 3D Engine Project. - * For complete copyright and license terms please see the LICENSE at the root of this distribution. - * - * SPDX-License-Identifier: Apache-2.0 OR MIT - * - */ - -#include -#include - -#include -#include - -namespace Multiplayer -{ - - void MultiplayerToolsSystemComponent::Reflect(AZ::ReflectContext* context) - { - NetworkPrefabProcessor::Reflect(context); - } - - void MultiplayerToolsSystemComponent::Activate() - { - AZ::Interface::Register(this); - } - - void MultiplayerToolsSystemComponent::Deactivate() - { - AZ::Interface::Unregister(this); - } - - bool MultiplayerToolsSystemComponent::DidProcessNetworkPrefabs() - { - return m_didProcessNetPrefabs; - } - - void MultiplayerToolsSystemComponent::SetDidProcessNetworkPrefabs(bool didProcessNetPrefabs) - { - m_didProcessNetPrefabs = didProcessNetPrefabs; - } - - MultiplayerToolsModule::MultiplayerToolsModule() - : AZ::Module() - { - m_descriptors.insert(m_descriptors.end(), { - MultiplayerToolsSystemComponent::CreateDescriptor(), - }); - } - - AZ::ComponentTypeList MultiplayerToolsModule::GetRequiredSystemComponents() const - { - return AZ::ComponentTypeList - { - azrtti_typeid(), - }; - } -} // namespace Multiplayer - -AZ_DECLARE_MODULE_CLASS(Gem_Multiplayer_Tools, Multiplayer::MultiplayerToolsModule); diff --git a/Gems/Multiplayer/Code/Source/MultiplayerToolsModule.h b/Gems/Multiplayer/Code/Source/MultiplayerToolsModule.h deleted file mode 100644 index d0a6a81afb..0000000000 --- a/Gems/Multiplayer/Code/Source/MultiplayerToolsModule.h +++ /dev/null @@ -1,55 +0,0 @@ -/* - * Copyright (c) Contributors to the Open 3D Engine Project. - * For complete copyright and license terms please see the LICENSE at the root of this distribution. - * - * SPDX-License-Identifier: Apache-2.0 OR MIT - * - */ - -#pragma once - -#include -#include -#include - -namespace Multiplayer -{ - class MultiplayerToolsSystemComponent final - : public AZ::Component - , public IMultiplayerTools - { - public: - AZ_COMPONENT(MultiplayerToolsSystemComponent, "{65AF5342-0ECE-423B-B646-AF55A122F72B}"); - - static void Reflect(AZ::ReflectContext* context); - - MultiplayerToolsSystemComponent() = default; - ~MultiplayerToolsSystemComponent() override = default; - - /// AZ::Component overrides. - void Activate() override; - void Deactivate() override; - - bool DidProcessNetworkPrefabs() override; - - private: - void SetDidProcessNetworkPrefabs(bool didProcessNetPrefabs) override; - - bool m_didProcessNetPrefabs = false; - }; - - class MultiplayerToolsModule - : public AZ::Module - { - public: - - AZ_RTTI(MultiplayerToolsModule, "{3F726172-21FC-48FA-8CFA-7D87EBA07E55}", AZ::Module); - AZ_CLASS_ALLOCATOR(MultiplayerToolsModule, AZ::SystemAllocator, 0); - - MultiplayerToolsModule(); - ~MultiplayerToolsModule() override = default; - - AZ::ComponentTypeList GetRequiredSystemComponents() const override; - }; -} // namespace Multiplayer - diff --git a/Gems/Multiplayer/Code/Source/MultiplayerToolsSystemComponent.cpp b/Gems/Multiplayer/Code/Source/MultiplayerToolsSystemComponent.cpp new file mode 100644 index 0000000000..c1e4d22b50 --- /dev/null +++ b/Gems/Multiplayer/Code/Source/MultiplayerToolsSystemComponent.cpp @@ -0,0 +1,48 @@ +/* + * Copyright (c) Contributors to the Open 3D Engine Project. + * For complete copyright and license terms please see the LICENSE at the root of this distribution. + * + * SPDX-License-Identifier: Apache-2.0 OR MIT + * + */ + +#include +#include + +#include +#include + +namespace Multiplayer +{ + + void MultiplayerToolsSystemComponent::Reflect(AZ::ReflectContext* context) + { + if (AZ::SerializeContext* serialize = azrtti_cast(context)) + { + serialize->Class() + ->Version(0); + } + + NetworkPrefabProcessor::Reflect(context); + } + + void MultiplayerToolsSystemComponent::Activate() + { + AZ::Interface::Register(this); + } + + void MultiplayerToolsSystemComponent::Deactivate() + { + AZ::Interface::Unregister(this); + } + + bool MultiplayerToolsSystemComponent::DidProcessNetworkPrefabs() + { + return m_didProcessNetPrefabs; + } + + void MultiplayerToolsSystemComponent::SetDidProcessNetworkPrefabs(bool didProcessNetPrefabs) + { + m_didProcessNetPrefabs = didProcessNetPrefabs; + } +} // namespace Multiplayer diff --git a/Gems/Multiplayer/Code/Source/MultiplayerToolsSystemComponent.h b/Gems/Multiplayer/Code/Source/MultiplayerToolsSystemComponent.h new file mode 100644 index 0000000000..3c4f8ea7a3 --- /dev/null +++ b/Gems/Multiplayer/Code/Source/MultiplayerToolsSystemComponent.h @@ -0,0 +1,41 @@ +/* + * Copyright (c) Contributors to the Open 3D Engine Project. + * For complete copyright and license terms please see the LICENSE at the root of this distribution. + * + * SPDX-License-Identifier: Apache-2.0 OR MIT + * + */ + +#pragma once + +#include +#include +#include + +namespace Multiplayer +{ + class MultiplayerToolsSystemComponent final + : public AZ::Component + , public IMultiplayerTools + { + public: + AZ_COMPONENT(MultiplayerToolsSystemComponent, "{65AF5342-0ECE-423B-B646-AF55A122F72B}"); + + static void Reflect(AZ::ReflectContext* context); + + MultiplayerToolsSystemComponent() = default; + ~MultiplayerToolsSystemComponent() override = default; + + /// AZ::Component overrides. + void Activate() override; + void Deactivate() override; + + bool DidProcessNetworkPrefabs() override; + + private: + void SetDidProcessNetworkPrefabs(bool didProcessNetPrefabs) override; + + bool m_didProcessNetPrefabs = false; + }; +} // namespace Multiplayer + diff --git a/Gems/Multiplayer/Code/Source/NetworkEntity/EntityReplication/EntityReplicationManager.cpp b/Gems/Multiplayer/Code/Source/NetworkEntity/EntityReplication/EntityReplicationManager.cpp index fa099842c5..e095af4ae7 100644 --- a/Gems/Multiplayer/Code/Source/NetworkEntity/EntityReplication/EntityReplicationManager.cpp +++ b/Gems/Multiplayer/Code/Source/NetworkEntity/EntityReplication/EntityReplicationManager.cpp @@ -54,10 +54,10 @@ namespace Multiplayer m_maxPayloadSize = connection.GetConnectionMtu() - UdpPacketHeaderSerializeSize - ReplicationManagerPacketOverhead; // Schedule ClearRemovedReplicators() - m_clearRemovedReplicators.Enqueue(AZ::TimeMs{ 0 }, true); + m_clearRemovedReplicators.Enqueue(AZ::Time::ZeroTimeMs, true); // Start window update events - m_updateWindow.Enqueue(AZ::TimeMs{ 0 }, true); + m_updateWindow.Enqueue(AZ::Time::ZeroTimeMs, true); INetworkEntityManager* networkEntityManager = GetNetworkEntityManager(); if (networkEntityManager != nullptr) @@ -97,7 +97,7 @@ namespace Multiplayer notReadyEntities.push_back(entityId); } } - if (m_entityActivationTimeSliceMs > AZ::TimeMs{ 0 } && AZ::GetElapsedTimeMs() > endTimeMs) + if (m_entityActivationTimeSliceMs > AZ::Time::ZeroTimeMs && AZ::GetElapsedTimeMs() > endTimeMs) { // If we go over our timeslice, break out the loop break; @@ -912,24 +912,22 @@ namespace Multiplayer ; } - AzNetworking::TimeoutResult EntityReplicationManager::OrphanedEntityRpcs::HandleTimeout(AzNetworking::TimeoutQueue::TimeoutItem& item) - { - NetEntityId timedOutEntityId = aznumeric_cast(item.m_userData); - auto entityRpcsIter = m_entityRpcMap.find(timedOutEntityId); - if (entityRpcsIter != m_entityRpcMap.end()) - { - for (NetworkEntityRpcMessage& rpcMessage : entityRpcsIter->second.m_rpcMessages) - { - m_replicationManager.DispatchOrphanedRpc(rpcMessage, nullptr); - } - m_entityRpcMap.erase(entityRpcsIter); - } - return AzNetworking::TimeoutResult::Delete; - } - void EntityReplicationManager::OrphanedEntityRpcs::Update() { - m_timeoutQueue.UpdateTimeouts(*this); + m_timeoutQueue.UpdateTimeouts([this](AzNetworking::TimeoutQueue::TimeoutItem& item) + { + NetEntityId timedOutEntityId = aznumeric_cast(item.m_userData); + auto entityRpcsIter = m_entityRpcMap.find(timedOutEntityId); + if (entityRpcsIter != m_entityRpcMap.end()) + { + for (NetworkEntityRpcMessage& rpcMessage : entityRpcsIter->second.m_rpcMessages) + { + m_replicationManager.DispatchOrphanedRpc(rpcMessage, nullptr); + } + m_entityRpcMap.erase(entityRpcsIter); + } + return AzNetworking::TimeoutResult::Delete; + }); } bool EntityReplicationManager::OrphanedEntityRpcs::DispatchOrphanedRpcs(EntityReplicator& entityReplicator) diff --git a/Gems/Multiplayer/Code/Source/NetworkEntity/EntityReplication/EntityReplicator.cpp b/Gems/Multiplayer/Code/Source/NetworkEntity/EntityReplication/EntityReplicator.cpp index 67527bf962..935850a795 100644 --- a/Gems/Multiplayer/Code/Source/NetworkEntity/EntityReplication/EntityReplicator.cpp +++ b/Gems/Multiplayer/Code/Source/NetworkEntity/EntityReplication/EntityReplicator.cpp @@ -344,7 +344,7 @@ namespace Multiplayer void EntityReplicator::SetPendingRemoval(AZ::TimeMs pendingRemovalTimeMs) { AZ_Assert(m_propertyPublisher, "Only valid if we are publishing updates"); - if (pendingRemovalTimeMs > AZ::TimeMs{ 0 }) + if (pendingRemovalTimeMs > AZ::Time::ZeroTimeMs) { if (!IsPendingRemoval()) { diff --git a/Gems/Multiplayer/Code/Source/NetworkEntity/EntityReplication/PropertySubscriber.cpp b/Gems/Multiplayer/Code/Source/NetworkEntity/EntityReplication/PropertySubscriber.cpp index c0e5c09c7b..8cbe542568 100644 --- a/Gems/Multiplayer/Code/Source/NetworkEntity/EntityReplication/PropertySubscriber.cpp +++ b/Gems/Multiplayer/Code/Source/NetworkEntity/EntityReplication/PropertySubscriber.cpp @@ -26,7 +26,7 @@ namespace Multiplayer bool PropertySubscriber::IsDeleting() const { - return m_markForRemovalTimeMs > AZ::TimeMs{ 0 }; + return m_markForRemovalTimeMs > AZ::Time::ZeroTimeMs; } bool PropertySubscriber::IsDeleted() const diff --git a/Gems/Multiplayer/Code/Source/NetworkEntity/EntityReplication/PropertySubscriber.h b/Gems/Multiplayer/Code/Source/NetworkEntity/EntityReplication/PropertySubscriber.h index 286509b798..7f1a43a743 100644 --- a/Gems/Multiplayer/Code/Source/NetworkEntity/EntityReplication/PropertySubscriber.h +++ b/Gems/Multiplayer/Code/Source/NetworkEntity/EntityReplication/PropertySubscriber.h @@ -40,6 +40,6 @@ namespace Multiplayer // The last packet to have been received about this entity AzNetworking::PacketId m_lastReceivedPacketId = AzNetworking::InvalidPacketId; - AZ::TimeMs m_markForRemovalTimeMs = AZ::TimeMs{ 0 }; + AZ::TimeMs m_markForRemovalTimeMs = AZ::Time::ZeroTimeMs; }; } diff --git a/Gems/Multiplayer/Code/Source/NetworkEntity/NetworkEntityAuthorityTracker.cpp b/Gems/Multiplayer/Code/Source/NetworkEntity/NetworkEntityAuthorityTracker.cpp index b3f87ea9ab..b401b85a27 100644 --- a/Gems/Multiplayer/Code/Source/NetworkEntity/NetworkEntityAuthorityTracker.cpp +++ b/Gems/Multiplayer/Code/Source/NetworkEntity/NetworkEntityAuthorityTracker.cpp @@ -9,61 +9,53 @@ #include #include #include +#include #include #include +#include #include #include namespace Multiplayer { - AZ_CVAR(AZ::TimeMs, net_EntityMigrationTimeoutMs, AZ::TimeMs{ 1000 }, nullptr, AZ::ConsoleFunctorFlags::Null, "Time to wait for a new authority to attach to an entity before we delete the entity"); + AZ_CVAR(AZ::TimeMs, net_DefaultEntityMigrationTimeoutMs, AZ::TimeMs{ 1000 }, nullptr, AZ::ConsoleFunctorFlags::Null, "Time to wait for a new authority to attach to an entity before we delete the entity"); NetworkEntityAuthorityTracker::NetworkEntityAuthorityTracker(INetworkEntityManager& networkEntityManager) : m_networkEntityManager(networkEntityManager) + , m_timeoutTimeMs(net_DefaultEntityMigrationTimeoutMs) { ; } + void NetworkEntityAuthorityTracker::SetTimeoutTimeMs(AZ::TimeMs timeoutTimeMs) + { + m_timeoutTimeMs = timeoutTimeMs; + } + bool NetworkEntityAuthorityTracker::AddEntityAuthorityManager(ConstNetworkEntityHandle entityHandle, const HostId& newOwner) { bool ret = false; - auto timeoutData = m_timeoutDataMap.find(entityHandle.GetNetEntityId()); - if (timeoutData != m_timeoutDataMap.end()) + auto timeoutData = m_timedOutNetEntityIds.find(entityHandle.GetNetEntityId()); + if (timeoutData != m_timedOutNetEntityIds.end()) { AZLOG ( NET_AuthTracker, - "AuthTracker: Removing timeout for networkEntityId %llu from %s, new owner is %s", + "AuthTracker: Removing timeout for networkEntityId %llu, new owner is %s", aznumeric_cast(entityHandle.GetNetEntityId()), - timeoutData->second.m_previousOwner.GetString().c_str(), newOwner.GetString().c_str() ); - m_timeoutDataMap.erase(timeoutData); + m_timedOutNetEntityIds.erase(timeoutData); ret = true; } - auto iter = m_entityAuthorityMap.find(entityHandle.GetNetEntityId()); - if (iter != m_entityAuthorityMap.end()) - { - AZLOG - ( - NET_AuthTracker, - "AuthTracker: Assigning networkEntityId %llu from %s to %s", - aznumeric_cast(entityHandle.GetNetEntityId()), - iter->second.back().GetString().c_str(), - newOwner.GetString().c_str() - ); - } - else - { - AZLOG - ( - NET_AuthTracker, - "AuthTracker: Assigning networkEntityId %llu to %s", - aznumeric_cast(entityHandle.GetNetEntityId()), - newOwner.GetString().c_str() - ); - } + AZLOG + ( + NET_AuthTracker, + "AuthTracker: Assigning networkEntityId %llu to %s", + aznumeric_cast(entityHandle.GetNetEntityId()), + newOwner.GetString().c_str() + ); m_entityAuthorityMap[entityHandle.GetNetEntityId()].push_back(newOwner); return ret; @@ -103,14 +95,35 @@ namespace Multiplayer { AZ_Assert ( - (m_timeoutDataMap.find(entityHandle.GetNetEntityId()) == m_timeoutDataMap.end()) || - (m_timeoutDataMap[entityHandle.GetNetEntityId()].m_previousOwner == previousOwner), + m_timedOutNetEntityIds.find(entityHandle.GetNetEntityId()) == m_timedOutNetEntityIds.end(), "Trying to add something twice to the timeout map, this is unexpected" ); - m_timeoutQueue.RegisterItem(aznumeric_cast(entityHandle.GetNetEntityId()), net_EntityMigrationTimeoutMs); - TimeoutData& timeoutData = m_timeoutDataMap[entityHandle.GetNetEntityId()]; - timeoutData.m_entityHandle = entityHandle; - timeoutData.m_previousOwner = previousOwner; + m_timedOutNetEntityIds.insert(entityHandle.GetNetEntityId()); + AZ::Interface::Get()->AddCallback([this, netEntityId = entityHandle.GetNetEntityId()] + { + auto timeoutData = m_timedOutNetEntityIds.find(netEntityId); + if (timeoutData != m_timedOutNetEntityIds.end()) + { + m_timedOutNetEntityIds.erase(timeoutData); + ConstNetworkEntityHandle entityHandle = m_networkEntityManager.GetEntity(netEntityId); + if (auto entity = entityHandle.GetEntity()) + { + NetEntityRole networkRole = NetEntityRole::InvalidRole; + NetBindComponent* netBindComponent = entityHandle.GetNetBindComponent(); + if (netBindComponent != nullptr) + { + networkRole = netBindComponent->GetNetEntityRole(); + } + if (networkRole != NetEntityRole::Authority) + { + m_networkEntityManager.GetEntityDomain()->HandleLossOfAuthoritativeReplicator(entityHandle); + } + } + } + }, + AZ::Name("Entity authority removal functor"), + m_timeoutTimeMs + ); } else { @@ -127,18 +140,6 @@ namespace Multiplayer } HostId NetworkEntityAuthorityTracker::GetEntityAuthorityManager(ConstNetworkEntityHandle entityHandle) const - { - HostId hostId = GetEntityAuthorityManagerInternal(entityHandle); - AZ_Assert(hostId != InvalidHostId, "Unable to determine manager for entity"); - return hostId; - } - - bool NetworkEntityAuthorityTracker::DoesEntityHaveOwner(ConstNetworkEntityHandle entityHandle) const - { - return InvalidHostId != GetEntityAuthorityManagerInternal(entityHandle); - } - - HostId NetworkEntityAuthorityTracker::GetEntityAuthorityManagerInternal(ConstNetworkEntityHandle entityHandle) const { if (auto localEnt = entityHandle.GetEntity()) { @@ -167,52 +168,8 @@ namespace Multiplayer return InvalidHostId; } - NetworkEntityAuthorityTracker::TimeoutData::TimeoutData(ConstNetworkEntityHandle entityHandle, const HostId& previousOwner) - : m_entityHandle(entityHandle) - , m_previousOwner(previousOwner) + bool NetworkEntityAuthorityTracker::DoesEntityHaveOwner(ConstNetworkEntityHandle entityHandle) const { - ; - } - - NetworkEntityAuthorityTracker::NetworkEntityTimeoutFunctor::NetworkEntityTimeoutFunctor - ( - NetworkEntityAuthorityTracker& networkEntityAuthorityTracker, - INetworkEntityManager& networkEntityManager - ) - : m_networkEntityAuthorityTracker(networkEntityAuthorityTracker) - , m_networkEntityManager(networkEntityManager) - { - ; - } - - AzNetworking::TimeoutResult NetworkEntityAuthorityTracker::NetworkEntityTimeoutFunctor::HandleTimeout(AzNetworking::TimeoutQueue::TimeoutItem& item) - { - const NetEntityId netEntityId = aznumeric_cast(item.m_userData); - auto timeoutData = m_networkEntityAuthorityTracker.m_timeoutDataMap.find(netEntityId); - if (timeoutData != m_networkEntityAuthorityTracker.m_timeoutDataMap.end()) - { - m_networkEntityAuthorityTracker.m_timeoutDataMap.erase(timeoutData); - ConstNetworkEntityHandle entityHandle = m_networkEntityManager.GetEntity(netEntityId); - if (auto entity = entityHandle.GetEntity()) - { - NetEntityRole networkRole = NetEntityRole::InvalidRole; - NetBindComponent* netBindComponent = entityHandle.GetNetBindComponent(); - if (netBindComponent != nullptr) - { - networkRole = netBindComponent->GetNetEntityRole(); - } - if (networkRole != NetEntityRole::Authority) - { - AZLOG_ERROR - ( - "Timed out entity id %llu during migration previous owner %s, removing it", - aznumeric_cast(entityHandle.GetNetEntityId()), - timeoutData->second.m_previousOwner.GetString().c_str() - ); - m_networkEntityManager.MarkForRemoval(entityHandle); - } - } - } - return AzNetworking::TimeoutResult::Delete; + return InvalidHostId != GetEntityAuthorityManager(entityHandle); } } diff --git a/Gems/Multiplayer/Code/Source/NetworkEntity/NetworkEntityAuthorityTracker.h b/Gems/Multiplayer/Code/Source/NetworkEntity/NetworkEntityAuthorityTracker.h index 0f4ff5665a..ae9aac04ea 100644 --- a/Gems/Multiplayer/Code/Source/NetworkEntity/NetworkEntityAuthorityTracker.h +++ b/Gems/Multiplayer/Code/Source/NetworkEntity/NetworkEntityAuthorityTracker.h @@ -13,6 +13,7 @@ #include #include #include +#include namespace Multiplayer { @@ -23,43 +24,21 @@ namespace Multiplayer public: NetworkEntityAuthorityTracker(INetworkEntityManager& networkEntityManager); + void SetTimeoutTimeMs(AZ::TimeMs timeoutTimeMs); bool DoesEntityHaveOwner(ConstNetworkEntityHandle entityHandle) const; bool AddEntityAuthorityManager(ConstNetworkEntityHandle entityHandle, const HostId& newOwner); void RemoveEntityAuthorityManager(ConstNetworkEntityHandle entityHandle, const HostId& previousOwner); HostId GetEntityAuthorityManager(ConstNetworkEntityHandle entityHandle) const; private: - - HostId GetEntityAuthorityManagerInternal(ConstNetworkEntityHandle entityHandle) const; - NetworkEntityAuthorityTracker& operator= (const NetworkEntityAuthorityTracker&) = delete; - struct TimeoutData final - { - TimeoutData() = default; - TimeoutData(ConstNetworkEntityHandle entityHandle, const HostId& previousOwner); - ConstNetworkEntityHandle m_entityHandle; - HostId m_previousOwner = InvalidHostId; - }; - - struct NetworkEntityTimeoutFunctor final - : public AzNetworking::ITimeoutHandler - { - NetworkEntityTimeoutFunctor(NetworkEntityAuthorityTracker& networkEntityAuthorityTracker, INetworkEntityManager& m_networkEntityManager); - AzNetworking::TimeoutResult HandleTimeout(AzNetworking::TimeoutQueue::TimeoutItem& item) override; - private: - AZ_DISABLE_COPY_MOVE(NetworkEntityTimeoutFunctor); - NetworkEntityAuthorityTracker& m_networkEntityAuthorityTracker; - INetworkEntityManager& m_networkEntityManager; - }; - - using TimeoutDataMap = AZStd::unordered_map; using EntityAuthorityMap = AZStd::unordered_map>; - TimeoutDataMap m_timeoutDataMap; + NetEntityIdSet m_timedOutNetEntityIds; EntityAuthorityMap m_entityAuthorityMap; INetworkEntityManager& m_networkEntityManager; - AzNetworking::TimeoutQueue m_timeoutQueue; + + AZ::TimeMs m_timeoutTimeMs = AZ::TimeMs{ 0 }; }; } - diff --git a/Gems/Multiplayer/Code/Source/NetworkEntity/NetworkEntityManager.cpp b/Gems/Multiplayer/Code/Source/NetworkEntity/NetworkEntityManager.cpp index c7582af83f..fa524d464a 100644 --- a/Gems/Multiplayer/Code/Source/NetworkEntity/NetworkEntityManager.cpp +++ b/Gems/Multiplayer/Code/Source/NetworkEntity/NetworkEntityManager.cpp @@ -28,12 +28,10 @@ namespace Multiplayer { AZ_CVAR(bool, net_DebugCheckNetworkEntityManager, false, nullptr, AZ::ConsoleFunctorFlags::Null, "Enables extra debug checks inside the NetworkEntityManager"); - AZ_CVAR(AZ::TimeMs, net_EntityDomainUpdateMs, AZ::TimeMs{ 500 }, nullptr, AZ::ConsoleFunctorFlags::Null, "Frequency for updating the entity domain in ms"); NetworkEntityManager::NetworkEntityManager() : m_networkEntityAuthorityTracker(*this) , m_removeEntitiesEvent([this] { RemoveEntities(); }, AZ::Name("NetworkEntityManager remove entities event")) - , m_updateEntityDomainEvent([this] { UpdateEntityDomain(); }, AZ::Name("NetworkEntityManager update entity domain event")) { AZ::Interface::Register(this); AzFramework::RootSpawnableNotificationBus::Handler::BusConnect(); @@ -63,8 +61,6 @@ namespace Multiplayer } m_entityDomain = AZStd::move(entityDomain); - m_updateEntityDomainEvent.Enqueue(net_EntityDomainUpdateMs, true); - m_entityDomain->ActivateTracking(m_ownedEntities); } bool NetworkEntityManager::IsInitialized() const @@ -127,7 +123,7 @@ namespace Multiplayer AZ_Assert(entityHandle.GetNetBindComponent(), "No NetBindComponent found on networked entity"); } m_removeList.push_back(entityHandle.GetNetEntityId()); - m_removeEntitiesEvent.Enqueue(AZ::TimeMs{ 0 }); + m_removeEntitiesEvent.Enqueue(AZ::Time::ZeroTimeMs); } } @@ -231,6 +227,48 @@ namespace Multiplayer m_localDeferredRpcMessages.emplace_back(AZStd::move(message)); } + void NetworkEntityManager::HandleEntitiesExitDomain(const NetEntityIdSet& entitiesNotInDomain) + { + for (NetEntityId exitingId : entitiesNotInDomain) + { + NetworkEntityHandle entityHandle = m_networkEntityTracker.Get(exitingId); + + bool safeToExit = IsHierarchySafeToExit(entityHandle, entitiesNotInDomain);; + + // Validate that we aren't already planning to remove this entity + if (safeToExit) + { + for (auto remoteEntityId : m_removeList) + { + if (remoteEntityId == remoteEntityId) + { + safeToExit = false; + } + } + } + + if (safeToExit) + { + // Tell all the attached replicators for this entity that it's exited the domain + m_entityExitDomainEvent.Signal(entityHandle); + } + } + } + + void NetworkEntityManager::ForceAssumeAuthority(const ConstNetworkEntityHandle& entityHandle) + { + NetBindComponent* netBindComponent = entityHandle.GetNetBindComponent(); + if (netBindComponent != nullptr) + { + netBindComponent->ConstructControllers(); + } + } + + void NetworkEntityManager::SetMigrateTimeoutTimeMs(AZ::TimeMs timeoutTimeMs) + { + m_networkEntityAuthorityTracker.SetTimeoutTimeMs(timeoutTimeMs); + } + void NetworkEntityManager::DebugDraw() const { AzFramework::DebugDisplayRequestBus::BusPtr debugDisplayBus; @@ -241,9 +279,15 @@ namespace Multiplayer { AZ::Entity* entity = it->second; NetBindComponent* netBindComponent = m_networkEntityTracker.GetNetBindComponent(entity); + AZ::Aabb entityBounds = AZ::Interface::Get()->GetEntityWorldBoundsUnion(entity->GetId()); + if (!entityBounds.IsValid()) + { + continue; + } + entityBounds.Expand(AZ::Vector3(0.01f)); - if (netBindComponent->GetNetEntityRole() == NetEntityRole::Authority) + if ((netBindComponent != nullptr) && netBindComponent->GetNetEntityRole() == NetEntityRole::Authority) { debugDisplay->SetColor(AZ::Colors::Black); debugDisplay->SetAlpha(0.5f); @@ -277,77 +321,11 @@ namespace Multiplayer m_localDeferredRpcMessages.clear(); } - void NetworkEntityManager::UpdateEntityDomain() - { - if (m_entityDomain == nullptr) - { - return; - } - - const IEntityDomain::EntitiesNotInDomain& entitiesNotInDomain = m_entityDomain->RetrieveEntitiesNotInDomain(); - for (NetEntityId exitingId : entitiesNotInDomain) - { - OnEntityExitDomain(exitingId); - } - } - - void NetworkEntityManager::OnEntityExitDomain(NetEntityId entityId) - { - bool safeToExit = true; - NetworkEntityHandle entityHandle = m_networkEntityTracker.Get(entityId); - - // We also need special handling for the NetworkHierarchy as well, since related entities need to be migrated together - NetworkHierarchyRootComponentController* hierarchyRootController = entityHandle.FindController(); - NetworkHierarchyChildComponentController* hierarchyChildController = entityHandle.FindController(); - - // Find the root entity - AZ::Entity* hierarchyRootEntity = nullptr; - if (hierarchyRootController) - { - hierarchyRootEntity = hierarchyRootController->GetParent().GetHierarchicalRoot(); - } - else if (hierarchyChildController) - { - hierarchyRootEntity = hierarchyChildController->GetParent().GetHierarchicalRoot(); - } - - if (hierarchyRootEntity) - { - NetEntityId rootNetId = GetNetEntityIdById(hierarchyRootEntity->GetId()); - ConstNetworkEntityHandle rootEntityHandle = GetEntity(rootNetId); - - // Check if the root entity is still tracked by this authority - if (rootEntityHandle.Exists() && rootEntityHandle.GetNetBindComponent()->HasController()) - { - safeToExit = false; - } - } - - // Validate that we aren't already planning to remove this entity - if (safeToExit) - { - for (auto remoteEntityId : m_removeList) - { - if (remoteEntityId == remoteEntityId) - { - safeToExit = false; - } - } - } - - if (safeToExit) - { - m_entityExitDomainEvent.Signal(entityHandle); - } - } - void NetworkEntityManager::Reset() { m_multiplayerComponentRegistry.Reset(); m_removeList.clear(); m_entityDomain = nullptr; - m_updateEntityDomainEvent.RemoveFromQueue(); - m_ownedEntities.clear(); m_entityExitDomainEvent.DisconnectAllHandlers(); m_onEntityMarkedDirty.DisconnectAllHandlers(); m_onEntityNotifyChanges.DisconnectAllHandlers(); @@ -632,4 +610,40 @@ namespace Multiplayer netEntity->GetName().c_str()); } } + + bool NetworkEntityManager::IsHierarchySafeToExit(NetworkEntityHandle& entityHandle, const NetEntityIdSet& entitiesNotInDomain) + { + bool safeToExit = true; + + // We also need special handling for the NetworkHierarchy as well, since related entities need to be migrated together + NetworkHierarchyRootComponentController* hierarchyRootController = entityHandle.FindController(); + NetworkHierarchyChildComponentController* hierarchyChildController = entityHandle.FindController(); + + AZStd::vector hierarchicalEntities; + + // Get the entities in this hierarchy + if (hierarchyRootController) + { + hierarchicalEntities = hierarchyRootController->GetParent().GetHierarchicalEntities(); + } + else if (hierarchyChildController) + { + hierarchicalEntities = hierarchyChildController->GetParent().GetHierarchicalEntities(); + } + + // Check if *all* entities in the hierarchy are ready to migrate. + // If any are still "in domain", keep the whole hierarchy within the current authority for now + for (AZ::Entity* entity : hierarchicalEntities) + { + NetEntityId netEntityId = GetNetEntityIdById(entity->GetId()); + if (netEntityId != InvalidNetEntityId && !entitiesNotInDomain.contains(netEntityId)) + { + safeToExit = false; + break; + } + } + + return safeToExit; + } + } diff --git a/Gems/Multiplayer/Code/Source/NetworkEntity/NetworkEntityManager.h b/Gems/Multiplayer/Code/Source/NetworkEntity/NetworkEntityManager.h index 133c35dce0..8327d95a39 100644 --- a/Gems/Multiplayer/Code/Source/NetworkEntity/NetworkEntityManager.h +++ b/Gems/Multiplayer/Code/Source/NetworkEntity/NetworkEntityManager.h @@ -79,12 +79,13 @@ namespace Multiplayer void NotifyControllersActivated(const ConstNetworkEntityHandle& entityHandle, EntityIsMigrating entityIsMigrating) override; void NotifyControllersDeactivated(const ConstNetworkEntityHandle& entityHandle, EntityIsMigrating entityIsMigrating) override; void HandleLocalRpcMessage(NetworkEntityRpcMessage& message) override; + void HandleEntitiesExitDomain(const NetEntityIdSet& entitiesNotInDomain) override; + void ForceAssumeAuthority(const ConstNetworkEntityHandle& entityHandle) override; + void SetMigrateTimeoutTimeMs(AZ::TimeMs timeoutTimeMs) override; void DebugDraw() const override; //! @} void DispatchLocalDeferredRpcMessages(); - void UpdateEntityDomain(); - void OnEntityExitDomain(NetEntityId entityId); //! RootSpawnableNotificationBus //! @{ @@ -98,6 +99,7 @@ namespace Multiplayer private: void RemoveEntities(); NetEntityId NextId(); + bool IsHierarchySafeToExit(NetworkEntityHandle& entityHandle, const NetEntityIdSet& entitiesNotInDomain); NetworkEntityTracker m_networkEntityTracker; NetworkEntityAuthorityTracker m_networkEntityAuthorityTracker; @@ -106,9 +108,6 @@ namespace Multiplayer AZ::ScheduledEvent m_removeEntitiesEvent; AZStd::vector m_removeList; AZStd::unique_ptr m_entityDomain; - AZ::ScheduledEvent m_updateEntityDomainEvent; - - OwnedEntitySet m_ownedEntities; EntityExitDomainEvent m_entityExitDomainEvent; AZ::Event<> m_onEntityMarkedDirty; diff --git a/Gems/Multiplayer/Code/Source/NetworkEntity/NetworkSpawnableLibrary.cpp b/Gems/Multiplayer/Code/Source/NetworkEntity/NetworkSpawnableLibrary.cpp index ba8836b6e6..f60778dbb4 100644 --- a/Gems/Multiplayer/Code/Source/NetworkEntity/NetworkSpawnableLibrary.cpp +++ b/Gems/Multiplayer/Code/Source/NetworkEntity/NetworkSpawnableLibrary.cpp @@ -8,6 +8,7 @@ #include #include +#include #include #include #include @@ -17,12 +18,20 @@ namespace Multiplayer NetworkSpawnableLibrary::NetworkSpawnableLibrary() { AZ::Interface::Register(this); - AzFramework::AssetCatalogEventBus::Handler::BusConnect(); + if (auto settingsRegistry{ AZ::SettingsRegistry::Get() }; settingsRegistry != nullptr) + { + auto LifecycleCallback = [this](AZStd::string_view, AZ::SettingsRegistryInterface::Type) + { + BuildSpawnablesList(); + }; + AZ::ComponentApplicationLifecycle::RegisterHandler(*settingsRegistry, m_criticalAssetsHandler, + AZStd::move(LifecycleCallback), "CriticalAssetsCompiled"); + } } NetworkSpawnableLibrary::~NetworkSpawnableLibrary() { - AzFramework::AssetCatalogEventBus::Handler::BusDisconnect(); + m_criticalAssetsHandler = {}; AZ::Interface::Unregister(this); } @@ -50,11 +59,6 @@ namespace Multiplayer m_spawnablesReverseLookup[id] = name; } - void NetworkSpawnableLibrary::OnCatalogLoaded([[maybe_unused]] const char* catalogFile) - { - BuildSpawnablesList(); - } - AZ::Name NetworkSpawnableLibrary::GetSpawnableNameFromAssetId(AZ::Data::AssetId assetId) { if (assetId.IsValid()) diff --git a/Gems/Multiplayer/Code/Source/NetworkEntity/NetworkSpawnableLibrary.h b/Gems/Multiplayer/Code/Source/NetworkEntity/NetworkSpawnableLibrary.h index 1cec63f81d..0fc3ae07cc 100644 --- a/Gems/Multiplayer/Code/Source/NetworkEntity/NetworkSpawnableLibrary.h +++ b/Gems/Multiplayer/Code/Source/NetworkEntity/NetworkSpawnableLibrary.h @@ -9,14 +9,13 @@ #pragma once #include -#include +#include namespace Multiplayer { /// Implementation of the network prefab library interface. class NetworkSpawnableLibrary final : public INetworkSpawnableLibrary - , private AzFramework::AssetCatalogEventBus::Handler { public: AZ_RTTI(NetworkSpawnableLibrary, "{65E15F33-E893-49C2-A8E2-B6A8A6EF31E0}", INetworkSpawnableLibrary); @@ -30,11 +29,10 @@ namespace Multiplayer AZ::Name GetSpawnableNameFromAssetId(AZ::Data::AssetId assetId) override; AZ::Data::AssetId GetAssetIdByName(AZ::Name name) override; - /// AssetCatalogEventBus overrides. - void OnCatalogLoaded(const char* catalogFile) override; private: AZStd::unordered_map m_spawnables; AZStd::unordered_map m_spawnablesReverseLookup; + AZ::SettingsRegistryInterface::NotifyEventHandler m_criticalAssetsHandler; }; } diff --git a/Gems/Multiplayer/Code/Source/NetworkTime/NetworkTime.h b/Gems/Multiplayer/Code/Source/NetworkTime/NetworkTime.h index 2bcf019623..5e865d801c 100644 --- a/Gems/Multiplayer/Code/Source/NetworkTime/NetworkTime.h +++ b/Gems/Multiplayer/Code/Source/NetworkTime/NetworkTime.h @@ -44,7 +44,7 @@ namespace Multiplayer HostFrameId m_hostFrameId = HostFrameId{ 0 }; HostFrameId m_unalteredFrameId = HostFrameId{ 0 }; - AZ::TimeMs m_hostTimeMs = AZ::TimeMs{ 0 }; + AZ::TimeMs m_hostTimeMs = AZ::Time::ZeroTimeMs; float m_hostBlendFactor = DefaultBlendFactor; AzNetworking::ConnectionId m_rewindingConnectionId = AzNetworking::InvalidConnectionId; }; diff --git a/Gems/Multiplayer/Code/Source/Pipeline/NetworkPrefabProcessor.cpp b/Gems/Multiplayer/Code/Source/Pipeline/NetworkPrefabProcessor.cpp index 27e59c0bf4..a797523bc0 100644 --- a/Gems/Multiplayer/Code/Source/Pipeline/NetworkPrefabProcessor.cpp +++ b/Gems/Multiplayer/Code/Source/Pipeline/NetworkPrefabProcessor.cpp @@ -20,22 +20,29 @@ namespace Multiplayer { - using AzToolsFramework::Prefab::PrefabConversionUtils::PrefabProcessor; - using AzToolsFramework::Prefab::PrefabConversionUtils::ProcessedObjectStore; - - void NetworkPrefabProcessor::Process(PrefabProcessorContext& context) + void NetworkPrefabProcessor::Process(AzToolsFramework::Prefab::PrefabConversionUtils::PrefabProcessorContext& context) { + using AzToolsFramework::Prefab::PrefabConversionUtils::PrefabDocument; + IMultiplayerTools* mpTools = AZ::Interface::Get(); if (mpTools) { mpTools->SetDidProcessNetworkPrefabs(false); } - context.ListPrefabs([&context](AZStd::string_view prefabName, PrefabDom& prefab) { - ProcessPrefab(context, prefabName, prefab); - }); + AZ::DataStream::StreamType serializationFormat = GetAzSerializationFormat(); - if (mpTools && !context.GetProcessedObjects().empty()) + bool networkPrefabsAdded = false; + context.ListPrefabs( + [&networkPrefabsAdded, &context, serializationFormat](PrefabDocument& prefab) + { + if (ProcessPrefab(context, prefab, serializationFormat)) + { + networkPrefabsAdded = true; + } + }); + + if (mpTools && networkPrefabsAdded) { mpTools->SetDidProcessNetworkPrefabs(true); } @@ -45,32 +52,18 @@ namespace Multiplayer { if (auto* serializeContext = azrtti_cast(context); serializeContext != nullptr) { - serializeContext->Class()->Version(2); + serializeContext->Enum() + ->Value("Binary", SerializationFormats::Binary) + ->Value("Text", SerializationFormats::Text) + ; + + serializeContext->Class() + ->Version(4) + ->Field("SerializationFormat", &NetworkPrefabProcessor::m_serializationFormat) + ; } } - static AZStd::unique_ptr LoadInstanceFromPrefab(const PrefabDom& prefab) - { - using namespace AzToolsFramework::Prefab; - - // convert Prefab DOM into Prefab Instance. - AZStd::unique_ptr sourceInstance(aznew Instance()); - if (!PrefabDomUtils::LoadInstanceFromPrefabDom(*sourceInstance, prefab, PrefabDomUtils::LoadFlags::AssignRandomEntityId)) - { - PrefabDomValueConstReference sourceReference = PrefabDomUtils::FindPrefabDomValue(prefab, PrefabDomUtils::SourceName); - - AZStd::string errorMessage("NetworkPrefabProcessor: Failed to Load Prefab Instance from given Prefab Dom."); - if (sourceReference.has_value() && sourceReference->get().IsString() && sourceReference->get().GetStringLength() != 0) - { - AZStd::string_view source(sourceReference->get().GetString(), sourceReference->get().GetStringLength()); - errorMessage += AZStd::string::format("Prefab Source: %.*s", AZ_STRING_ARG(source)); - } - AZ_Error("NetworkPrefabProcessor", false, errorMessage.c_str()); - return nullptr; - } - return sourceInstance; - } - static void GatherNetEntities( AzToolsFramework::Prefab::Instance* instance, AZStd::unordered_map& entityToInstanceMap, @@ -93,39 +86,37 @@ namespace Multiplayer }); } - void NetworkPrefabProcessor::ProcessPrefab(PrefabProcessorContext& context, AZStd::string_view prefabName, PrefabDom& prefab) + bool NetworkPrefabProcessor::ProcessPrefab( + AzToolsFramework::Prefab::PrefabConversionUtils::PrefabProcessorContext& context, + AzToolsFramework::Prefab::PrefabConversionUtils::PrefabDocument& prefab, + AZ::DataStream::StreamType serializationFormat) { + using AzToolsFramework::Prefab::PrefabConversionUtils::ProcessedObjectStore; using namespace AzToolsFramework::Prefab; - // convert Prefab DOM into Prefab Instance. - AZStd::unique_ptr sourceInstance = LoadInstanceFromPrefab(prefab); - if (!sourceInstance) - { - return; - } - - AZStd::string uniqueName = prefabName; + AZStd::string uniqueName = prefab.GetName(); uniqueName += ".network.spawnable"; - auto serializer = [](AZStd::vector& output, const ProcessedObjectStore& object) -> bool { + auto serializer = [serializationFormat](AZStd::vector& output, const ProcessedObjectStore& object) -> bool { AZ::IO::ByteContainerStream stream(&output); auto& asset = object.GetAsset(); - return AZ::Utils::SaveObjectToStream(stream, AZ::DataStream::ST_BINARY, &asset, asset.GetType()); + return AZ::Utils::SaveObjectToStream(stream, serializationFormat, &asset, asset.GetType()); }; auto&& [object, networkSpawnable] = ProcessedObjectStore::Create(uniqueName, context.GetSourceUuid(), AZStd::move(serializer)); auto& netSpawnableEntities = networkSpawnable->GetEntities(); + Instance& sourceInstance = prefab.GetInstance(); // Grab all net entities with their corresponding Instances to handle nested prefabs correctly AZStd::unordered_map netEntityToInstanceMap; AZStd::vector prefabNetEntities; - GatherNetEntities(sourceInstance.get(), netEntityToInstanceMap, prefabNetEntities); + GatherNetEntities(&sourceInstance, netEntityToInstanceMap, prefabNetEntities); if (prefabNetEntities.empty()) { // No networked entities in the prefab, no need to do anything in this processor. - return; + return false; } // Sort the entities prior to processing. The entities will end up in the net spawnable in this order. @@ -136,6 +127,8 @@ namespace Multiplayer networkSpawnableAsset.Create(networkSpawnable->GetId()); networkSpawnableAsset.SetAutoLoadBehavior(AZ::Data::AssetLoadBehavior::PreLoad); + AZStd::unordered_set prefabNetEntityIds; + for (auto* prefabEntity : prefabNetEntities) { Instance* instance = netEntityToInstanceMap[prefabEntity]; @@ -148,13 +141,29 @@ namespace Multiplayer netEntity->InvalidateDependencies(); netEntity->EvaluateDependencies(); + auto* transformComponent = netEntity->FindComponent(); + if (transformComponent) + { + AZ::EntityId parentId = transformComponent->GetParentId(); + if (parentId.IsValid() && !prefabNetEntityIds.contains(parentId)) + { + // Clear parent ID for net entities parented to a non-net entity. + // To be addressed by the spawnable aliases system where non-net entities + // will be spawned together with the networked ones in which case we'll keep + // the cross-spawnable references. + transformComponent->SetParent(AZ::EntityId()); + } + } + + prefabNetEntityIds.insert(netEntity->GetId()); + // Insert the entity into the target net spawnable netSpawnableEntities.emplace_back(netEntity); } // Add net spawnable asset holder to the prefab root { - EntityOptionalReference containerEntityRef = sourceInstance->GetContainerEntity(); + EntityOptionalReference containerEntityRef = sourceInstance.GetContainerEntity(); if (containerEntityRef.has_value()) { auto* networkSpawnableHolderComponent = containerEntityRef.value().get().CreateComponent(); @@ -165,17 +174,21 @@ namespace Multiplayer AZ::Entity* networkSpawnableHolderEntity = aznew AZ::Entity(uniqueName); auto* networkSpawnableHolderComponent = networkSpawnableHolderEntity->CreateComponent(); networkSpawnableHolderComponent->SetNetworkSpawnableAsset(networkSpawnableAsset); - sourceInstance->AddEntity(*networkSpawnableHolderEntity); + sourceInstance.AddEntity(*networkSpawnableHolderEntity); } } - // save the final result in the target Prefab DOM. - if (!PrefabDomUtils::StoreInstanceInPrefabDom(*sourceInstance, prefab)) + context.GetProcessedObjects().push_back(AZStd::move(object)); + return true; + } + + AZ::DataStream::StreamType NetworkPrefabProcessor::GetAzSerializationFormat() const + { + if (m_serializationFormat == SerializationFormats::Text) { - AZ_Error("NetworkPrefabProcessor", false, "Saving exported Prefab Instance within a Prefab Dom failed."); - return; + return AZ::DataStream::StreamType::ST_JSON; } - context.GetProcessedObjects().push_back(AZStd::move(object)); + return AZ::DataStream::StreamType::ST_BINARY; } } diff --git a/Gems/Multiplayer/Code/Source/Pipeline/NetworkPrefabProcessor.h b/Gems/Multiplayer/Code/Source/Pipeline/NetworkPrefabProcessor.h index 6eb0c2b4de..ef8912467d 100644 --- a/Gems/Multiplayer/Code/Source/Pipeline/NetworkPrefabProcessor.h +++ b/Gems/Multiplayer/Code/Source/Pipeline/NetworkPrefabProcessor.h @@ -9,31 +9,51 @@ #pragma once #include +#include namespace AzToolsFramework::Prefab::PrefabConversionUtils { class PrefabProcessorContext; + class PrefabDocument; } namespace Multiplayer { - using AzToolsFramework::Prefab::PrefabConversionUtils::PrefabProcessor; - using AzToolsFramework::Prefab::PrefabConversionUtils::PrefabProcessorContext; - using AzToolsFramework::Prefab::PrefabDom; - - class NetworkPrefabProcessor : public PrefabProcessor + class NetworkPrefabProcessor : public AzToolsFramework::Prefab::PrefabConversionUtils::PrefabProcessor { public: AZ_CLASS_ALLOCATOR(NetworkPrefabProcessor, AZ::SystemAllocator, 0); - AZ_RTTI(Multiplayer::NetworkPrefabProcessor, "{AF6C36DA-CBB9-4DF4-AE2D-7BC6CCE65176}", PrefabProcessor); + AZ_RTTI( + Multiplayer::NetworkPrefabProcessor, + "{AF6C36DA-CBB9-4DF4-AE2D-7BC6CCE65176}", + AzToolsFramework::Prefab::PrefabConversionUtils::PrefabProcessor); ~NetworkPrefabProcessor() override = default; - void Process(PrefabProcessorContext& context) override; + void Process(AzToolsFramework::Prefab::PrefabConversionUtils::PrefabProcessorContext& context) override; static void Reflect(AZ::ReflectContext* context); + //! The format the network spawnables are going to be stored in. + enum class SerializationFormats + { + Binary, //!< Binary is generally preferable for performance. + Text //!< Store in text format which is usually slower but helps with debugging. + }; + + AZ::DataStream::StreamType GetAzSerializationFormat() const; + protected: - static void ProcessPrefab(PrefabProcessorContext& context, AZStd::string_view prefabName, PrefabDom& prefab); + static bool ProcessPrefab( + AzToolsFramework::Prefab::PrefabConversionUtils::PrefabProcessorContext& context, + AzToolsFramework::Prefab::PrefabConversionUtils::PrefabDocument& prefab, + AZ::DataStream::StreamType serializationFormat); + + SerializationFormats m_serializationFormat = SerializationFormats::Binary; }; } + +namespace AZ +{ + AZ_TYPE_INFO_SPECIALIZE(Multiplayer::NetworkPrefabProcessor::SerializationFormats, "{F69B49EB-9D67-4D9C-99E7-DFA35D4ACCD2}"); +} diff --git a/Gems/Multiplayer/Code/Tests/CommonBenchmarkSetup.h b/Gems/Multiplayer/Code/Tests/CommonBenchmarkSetup.h index 3c3d77e011..380a344f6d 100644 --- a/Gems/Multiplayer/Code/Tests/CommonBenchmarkSetup.h +++ b/Gems/Multiplayer/Code/Tests/CommonBenchmarkSetup.h @@ -14,6 +14,7 @@ #include #include #include +#include #include #include #include @@ -41,7 +42,6 @@ namespace Multiplayer AZ::SerializeContext* GetSerializeContext() override { return {}; } AZ::BehaviorContext* GetBehaviorContext() override { return {}; } AZ::JsonRegistrationContext* GetJsonRegistrationContext() override { return {}; } - const char* GetAppRoot() const override { return {}; } const char* GetEngineRoot() const override { return {}; } const char* GetExecutableFolder() const override { return {}; } void QueryApplicationType([[maybe_unused]] AZ::ApplicationTypeQuery& appType) const override {} @@ -93,20 +93,6 @@ namespace Multiplayer } }; - class BenchmarkTime : public AZ::ITime - { - public: - AZ::TimeMs GetElapsedTimeMs() const override - { - return {}; - } - - AZ::TimeUs GetElapsedTimeUs() const override - { - return {}; - } - }; - class BenchmarkNetworkTime : public Multiplayer::INetworkTime { public: @@ -221,55 +207,6 @@ namespace Multiplayer NetworkEntityAuthorityTracker* GetNetworkEntityAuthorityTracker() override { return &m_authorityTracker; } MultiplayerComponentRegistry* GetMultiplayerComponentRegistry() override { return &m_multiplayerComponentRegistry; } const HostId& GetHostId() const override { return m_hostId; } - EntityList CreateEntitiesImmediate( - [[maybe_unused]] const PrefabEntityId& prefabEntryId, - [[maybe_unused]] NetEntityRole netEntityRole, - [[maybe_unused]] const AZ::Transform& transform, - [[maybe_unused]] AutoActivate autoActivate) override { - return {}; - } - EntityList CreateEntitiesImmediate( - [[maybe_unused]] const PrefabEntityId& prefabEntryId, - [[maybe_unused]] NetEntityId netEntityId, - [[maybe_unused]] NetEntityRole netEntityRole, - [[maybe_unused]] AutoActivate autoActivate, - [[maybe_unused]] const AZ::Transform& transform) override { - return {}; - } - void SetupNetEntity( - [[maybe_unused]] AZ::Entity* netEntity, - [[maybe_unused]] PrefabEntityId prefabEntityId, - [[maybe_unused]] NetEntityRole netEntityRole) override {} - uint32_t GetEntityCount() const override { return {}; } - void MarkForRemoval( - [[maybe_unused]] const ConstNetworkEntityHandle& entityHandle) override {} - bool IsMarkedForRemoval( - [[maybe_unused]] const ConstNetworkEntityHandle& entityHandle) const override { - return {}; - } - void ClearEntityFromRemovalList( - [[maybe_unused]] const ConstNetworkEntityHandle& entityHandle) override {} - void ClearAllEntities() override {} - void AddEntityMarkedDirtyHandler( - [[maybe_unused]] AZ::Event<>::Handler& entityMarkedDirtyHandle) override {} - void AddEntityNotifyChangesHandler( - [[maybe_unused]] AZ::Event<>::Handler& entityNotifyChangesHandle) override {} - void AddEntityExitDomainHandler( - [[maybe_unused]] EntityExitDomainEvent::Handler& entityExitDomainHandler) override {} - void AddControllersActivatedHandler( - [[maybe_unused]] ControllersActivatedEvent::Handler& controllersActivatedHandler) override {} - void AddControllersDeactivatedHandler( - [[maybe_unused]] ControllersDeactivatedEvent::Handler& controllersDeactivatedHandler) override {} - void NotifyEntitiesDirtied() override {} - void NotifyEntitiesChanged() override {} - void NotifyControllersActivated( - [[maybe_unused]] const ConstNetworkEntityHandle& entityHandle, - [[maybe_unused]] EntityIsMigrating entityIsMigrating) override {} - void NotifyControllersDeactivated( - [[maybe_unused]] const ConstNetworkEntityHandle& entityHandle, - [[maybe_unused]] EntityIsMigrating entityIsMigrating) override {} - void HandleLocalRpcMessage( - [[maybe_unused]] NetworkEntityRpcMessage& message) override {} mutable AZStd::map m_networkEntityMap; @@ -298,16 +235,52 @@ namespace Multiplayer return InvalidNetEntityId; } - [[nodiscard]] AZStd::unique_ptr RequestNetSpawnableInstantiation( - [[maybe_unused]] const AZ::Data::Asset& netSpawnable, - [[maybe_unused]] const AZ::Transform& transform) override - { + void Initialize([[maybe_unused]] const HostId& hostId, [[maybe_unused]] AZStd::unique_ptr entityDomain) override {} + bool IsInitialized() const override { return false; } + IEntityDomain* GetEntityDomain() const override { return nullptr; } + EntityList CreateEntitiesImmediate( + [[maybe_unused]] const PrefabEntityId& prefabEntryId, + [[maybe_unused]] NetEntityRole netEntityRole, + [[maybe_unused]] const AZ::Transform& transform, + [[maybe_unused]] AutoActivate autoActivate) override { return {}; } - - void Initialize([[maybe_unused]] const HostId& hostId, [[maybe_unused]] AZStd::unique_ptr entityDomain) override {} - bool IsInitialized() const override { return true; } - IEntityDomain* GetEntityDomain() const override { return nullptr; } + EntityList CreateEntitiesImmediate( + [[maybe_unused]] const PrefabEntityId& prefabEntryId, + [[maybe_unused]] NetEntityId netEntityId, + [[maybe_unused]] NetEntityRole netEntityRole, + [[maybe_unused]] AutoActivate autoActivate, + [[maybe_unused]] const AZ::Transform& transform) override { + return {}; + } + [[nodiscard]] AZStd::unique_ptr RequestNetSpawnableInstantiation( + [[maybe_unused]] const AZ::Data::Asset& netSpawnable, + [[maybe_unused]] const AZ::Transform& transform) override { + return {}; + } + void SetupNetEntity([[maybe_unused]] AZ::Entity* netEntity, [[maybe_unused]] PrefabEntityId prefabEntityId, [[maybe_unused]] NetEntityRole netEntityRole) override {} + uint32_t GetEntityCount() const override { + return 0; + } + void MarkForRemoval([[maybe_unused]] const ConstNetworkEntityHandle& entityHandle) override {} + bool IsMarkedForRemoval([[maybe_unused]] const ConstNetworkEntityHandle& entityHandle) const override { + return false; + } + void ClearEntityFromRemovalList([[maybe_unused]] const ConstNetworkEntityHandle& entityHandle) override {} + void ClearAllEntities() override {} + void AddEntityMarkedDirtyHandler([[maybe_unused]] AZ::Event<>::Handler& entityMarkedDirtyHandle) override {} + void AddEntityNotifyChangesHandler([[maybe_unused]] AZ::Event<>::Handler& entityNotifyChangesHandle) override {} + void AddEntityExitDomainHandler([[maybe_unused]] EntityExitDomainEvent::Handler& entityExitDomainHandler) override {} + void AddControllersActivatedHandler([[maybe_unused]] ControllersActivatedEvent::Handler& controllersActivatedHandler) override {} + void AddControllersDeactivatedHandler([[maybe_unused]] ControllersDeactivatedEvent::Handler& controllersDeactivatedHandler) override {} + void NotifyEntitiesDirtied() override {} + void NotifyEntitiesChanged() override {} + void NotifyControllersActivated([[maybe_unused]] const ConstNetworkEntityHandle& entityHandle, [[maybe_unused]] EntityIsMigrating entityIsMigrating) override {} + void NotifyControllersDeactivated([[maybe_unused]] const ConstNetworkEntityHandle& entityHandle, [[maybe_unused]] EntityIsMigrating entityIsMigrating) override {} + void HandleLocalRpcMessage([[maybe_unused]] NetworkEntityRpcMessage& message) override {} + void HandleEntitiesExitDomain([[maybe_unused]] const NetEntityIdSet& entitiesNotInDomain) override {} + void ForceAssumeAuthority([[maybe_unused]] const ConstNetworkEntityHandle& entityHandle) override {} + void SetMigrateTimeoutTimeMs([[maybe_unused]] AZ::TimeMs timeoutTimeMs) override {} void DebugDraw() const override {} NetworkEntityTracker m_tracker; @@ -411,8 +384,7 @@ namespace Multiplayer // Without Multiplayer::RegisterMultiplayerComponents() the stats go to invalid id, which is fine for unit tests GetMultiplayer()->GetStats().ReserveComponentStats(Multiplayer::InvalidNetComponentId, 50, 0); - m_Time = AZStd::make_unique(); - AZ::Interface::Register(m_Time.get()); + m_Time = AZStd::make_unique(); m_NetworkTime = AZStd::make_unique(); AZ::Interface::Register(m_NetworkTime.get()); @@ -443,7 +415,6 @@ namespace Multiplayer m_ConnectionListener.reset(); AZ::Interface::Unregister(m_NetworkTime.get()); - AZ::Interface::Unregister(m_Time.get()); AZ::Interface::Unregister(m_Multiplayer.get()); AZ::Interface::Unregister(m_ComponentApplicationRequests.get()); @@ -476,7 +447,7 @@ namespace Multiplayer AZStd::unique_ptr m_Multiplayer; AZStd::unique_ptr m_NetworkEntityManager; - AZStd::unique_ptr m_Time; + AZStd::unique_ptr m_Time; AZStd::unique_ptr m_NetworkTime; AZStd::unique_ptr m_Connection; diff --git a/Gems/Multiplayer/Code/Tests/CommonHierarchySetup.h b/Gems/Multiplayer/Code/Tests/CommonHierarchySetup.h index 249837b484..cdc4724c70 100644 --- a/Gems/Multiplayer/Code/Tests/CommonHierarchySetup.h +++ b/Gems/Multiplayer/Code/Tests/CommonHierarchySetup.h @@ -10,6 +10,7 @@ #include #include #include +#include #include #include #include @@ -17,6 +18,7 @@ #include #include #include +#include #include #include #include @@ -116,8 +118,9 @@ namespace Multiplayer ON_CALL(*m_mockNetworkEntityManager, GetEntity(_)).WillByDefault(Invoke(this, &HierarchyTests::GetEntity)); ON_CALL(*m_mockNetworkEntityManager, GetNetEntityIdById(_)).WillByDefault(Invoke(this, &HierarchyTests::GetNetEntityIdById)); - m_mockTime = AZStd::make_unique>(); - AZ::Interface::Register(m_mockTime.get()); + m_mockTime = AZStd::make_unique(); + + m_eventScheduler = AZStd::make_unique(); m_mockNetworkTime = AZStd::make_unique>(); AZ::Interface::Register(m_mockNetworkTime.get()); @@ -165,11 +168,11 @@ namespace Multiplayer m_networkEntityAuthorityTracker.reset(); AZ::Interface::Unregister(m_mockNetworkTime.get()); - AZ::Interface::Unregister(m_mockTime.get()); AZ::Interface::Unregister(m_mockNetworkEntityManager.get()); AZ::Interface::Unregister(m_mockMultiplayer.get()); AZ::Interface::Unregister(m_mockComponentApplicationRequests.get()); + m_eventScheduler.reset(); m_mockTime.reset(); m_mockNetworkEntityManager.reset(); @@ -203,7 +206,8 @@ namespace Multiplayer AZStd::unique_ptr> m_mockMultiplayer; AZStd::unique_ptr m_mockNetworkEntityManager; - AZStd::unique_ptr> m_mockTime; + AZStd::unique_ptr m_eventScheduler; + AZStd::unique_ptr m_mockTime; AZStd::unique_ptr> m_mockNetworkTime; AZStd::unique_ptr> m_mockConnection; diff --git a/Gems/Multiplayer/Code/Tests/MockInterfaces.h b/Gems/Multiplayer/Code/Tests/MockInterfaces.h index 8cebf280b9..b9d8edbea5 100644 --- a/Gems/Multiplayer/Code/Tests/MockInterfaces.h +++ b/Gems/Multiplayer/Code/Tests/MockInterfaces.h @@ -87,6 +87,9 @@ namespace UnitTest MOCK_METHOD2(NotifyControllersActivated, void(const Multiplayer::ConstNetworkEntityHandle&, Multiplayer::EntityIsMigrating)); MOCK_METHOD2(NotifyControllersDeactivated, void(const Multiplayer::ConstNetworkEntityHandle&, Multiplayer::EntityIsMigrating)); MOCK_METHOD1(HandleLocalRpcMessage, void(Multiplayer::NetworkEntityRpcMessage&)); + MOCK_METHOD1(HandleEntitiesExitDomain, void(const Multiplayer::NetEntityIdSet&)); + MOCK_METHOD1(ForceAssumeAuthority, void(const Multiplayer::ConstNetworkEntityHandle&)); + MOCK_METHOD1(SetMigrateTimeoutTimeMs, void(AZ::TimeMs)); MOCK_CONST_METHOD0(DebugDraw, void()); }; @@ -100,13 +103,6 @@ namespace UnitTest MOCK_METHOD3(OnDisconnect, void(IConnection*, DisconnectReason, TerminationEndpoint)); }; - class MockTime : public AZ::ITime - { - public: - MOCK_CONST_METHOD0(GetElapsedTimeUs, AZ::TimeUs()); - MOCK_CONST_METHOD0(GetElapsedTimeMs, AZ::TimeMs()); - }; - class MockNetworkTime : public Multiplayer::INetworkTime { public: @@ -146,10 +142,8 @@ namespace UnitTest MOCK_METHOD0(GetSerializeContext, AZ::SerializeContext* ()); MOCK_METHOD0(GetBehaviorContext, AZ::BehaviorContext* ()); MOCK_METHOD0(GetJsonRegistrationContext, AZ::JsonRegistrationContext* ()); - MOCK_CONST_METHOD0(GetAppRoot, const char* ()); MOCK_CONST_METHOD0(GetEngineRoot, const char* ()); MOCK_CONST_METHOD0(GetExecutableFolder, const char* ()); - MOCK_METHOD0(GetDrillerManager, AZ::Debug::DrillerManager* ()); MOCK_METHOD1(ResolveModulePath, void(AZ::OSString&)); MOCK_METHOD0(GetAzCommandLine, AZ::CommandLine* ()); MOCK_CONST_METHOD1(QueryApplicationType, void(AZ::ApplicationTypeQuery&)); diff --git a/Gems/Multiplayer/Code/Tests/PrefabProcessingTests.cpp b/Gems/Multiplayer/Code/Tests/PrefabProcessingTests.cpp index 42a817987e..aef13fbfe2 100644 --- a/Gems/Multiplayer/Code/Tests/PrefabProcessingTests.cpp +++ b/Gems/Multiplayer/Code/Tests/PrefabProcessingTests.cpp @@ -57,6 +57,7 @@ namespace UnitTest TEST_F(PrefabProcessingTestFixture, NetworkPrefabProcessor_ProcessPrefabTwoEntities_NetEntityGoesToNetSpawnable) { using AzToolsFramework::Prefab::PrefabConversionUtils::PrefabProcessorContext; + using AzToolsFramework::Prefab::PrefabConversionUtils::PrefabDocument; AZStd::vector entities; @@ -74,7 +75,9 @@ namespace UnitTest // Add the prefab into the Prefab Processor Context const AZStd::string prefabName = "testPrefab"; PrefabProcessorContext prefabProcessorContext{AZ::Uuid::CreateRandom()}; - prefabProcessorContext.AddPrefab(prefabName, AZStd::move(prefabDom)); + PrefabDocument document(prefabName); + ASSERT_TRUE(document.SetPrefabDom(AZStd::move(prefabDom))); + prefabProcessorContext.AddPrefab(AZStd::move(document)); // Request NetworkPrefabProcessor to process the prefab Multiplayer::NetworkPrefabProcessor processor; diff --git a/Gems/Multiplayer/Code/Tests/RewindableContainerTests.cpp b/Gems/Multiplayer/Code/Tests/RewindableContainerTests.cpp index f6e5d82703..ec6b30ca15 100644 --- a/Gems/Multiplayer/Code/Tests/RewindableContainerTests.cpp +++ b/Gems/Multiplayer/Code/Tests/RewindableContainerTests.cpp @@ -12,7 +12,7 @@ #include #include #include -#include +#include #include namespace UnitTest @@ -23,7 +23,7 @@ namespace UnitTest public: Multiplayer::NetworkTime m_networkTime; AZ::LoggerSystemComponent m_loggerComponent; - AZ::TimeSystemComponent m_timeComponent; + AZ::TimeSystem m_timeSystem; }; static constexpr uint32_t RewindableContainerSize = 7; @@ -43,7 +43,7 @@ namespace UnitTest // Test rewind for all pushed values and overall size for (uint32_t idx = 0; idx < RewindableContainerSize; ++idx) { - Multiplayer::ScopedAlterTime time(static_cast(idx), AZ::TimeMs{ 0 }, 1.f, AzNetworking::InvalidConnectionId); + Multiplayer::ScopedAlterTime time(static_cast(idx), AZ::Time::ZeroTimeMs, 1.f, AzNetworking::InvalidConnectionId); EXPECT_EQ(idx + 1, test.size()); EXPECT_EQ(idx, test.back()); } @@ -70,9 +70,9 @@ namespace UnitTest EXPECT_TRUE(test.empty()); // Test rewind for pop_back and clear - Multiplayer::ScopedAlterTime pop_time(static_cast(RewindableContainerSize), AZ::TimeMs{ 0 }, 1.f, AzNetworking::InvalidConnectionId); + Multiplayer::ScopedAlterTime pop_time(static_cast(RewindableContainerSize), AZ::Time::ZeroTimeMs, 1.f, AzNetworking::InvalidConnectionId); EXPECT_EQ(RewindableContainerSize - 1, test.size()); - Multiplayer::ScopedAlterTime clear_time(static_cast(RewindableContainerSize + 1), AZ::TimeMs{ 0 }, 1.f, AzNetworking::InvalidConnectionId); + Multiplayer::ScopedAlterTime clear_time(static_cast(RewindableContainerSize + 1), AZ::Time::ZeroTimeMs, 1.f, AzNetworking::InvalidConnectionId); EXPECT_EQ(0, test.size()); // Test copy_values and resize_no_construct @@ -100,7 +100,7 @@ namespace UnitTest // Test rewind for all values and overall size for (uint32_t idx = 1; idx <= RewindableContainerSize; ++idx) { - Multiplayer::ScopedAlterTime time(static_cast(idx), AZ::TimeMs{ 0 }, 1.f, AzNetworking::InvalidConnectionId); + Multiplayer::ScopedAlterTime time(static_cast(idx), AZ::Time::ZeroTimeMs, 1.f, AzNetworking::InvalidConnectionId); for (uint32_t testIdx = 0; testIdx < RewindableContainerSize; ++testIdx) { if (testIdx < idx) diff --git a/Gems/Multiplayer/Code/Tests/RewindableObjectTests.cpp b/Gems/Multiplayer/Code/Tests/RewindableObjectTests.cpp index 04de971f0d..0ff2c977d0 100644 --- a/Gems/Multiplayer/Code/Tests/RewindableObjectTests.cpp +++ b/Gems/Multiplayer/Code/Tests/RewindableObjectTests.cpp @@ -10,7 +10,7 @@ #include #include #include -#include +#include #include namespace UnitTest @@ -21,7 +21,7 @@ namespace UnitTest public: Multiplayer::NetworkTime m_networkTime; AZ::LoggerSystemComponent m_loggerComponent; - AZ::TimeSystemComponent m_timeComponent; + AZ::TimeSystem m_timeSystem; }; static constexpr uint32_t RewindableBufferFrames = 32; @@ -39,7 +39,7 @@ namespace UnitTest for (uint32_t i = 0; i < 16; ++i) { - Multiplayer::ScopedAlterTime time(static_cast(i), AZ::TimeMs{ 0 }, 1.f, AzNetworking::InvalidConnectionId); + Multiplayer::ScopedAlterTime time(static_cast(i), AZ::Time::ZeroTimeMs, 1.f, AzNetworking::InvalidConnectionId); EXPECT_EQ(i, test); } @@ -52,7 +52,7 @@ namespace UnitTest for (uint32_t i = 16; i < 48; ++i) { - Multiplayer::ScopedAlterTime time(static_cast(i), AZ::TimeMs{ 0 }, 1.f, AzNetworking::InvalidConnectionId); + Multiplayer::ScopedAlterTime time(static_cast(i), AZ::Time::ZeroTimeMs, 1.f, AzNetworking::InvalidConnectionId); EXPECT_EQ(i, test); } } @@ -70,15 +70,15 @@ namespace UnitTest { // Test that Get/GetPrevious return different value when not on the owning connection - Multiplayer::ScopedAlterTime time(static_cast(RewindableBufferFrames - 1), AZ::TimeMs{ 0 }, 1.f, AzNetworking::InvalidConnectionId); + Multiplayer::ScopedAlterTime time(static_cast(RewindableBufferFrames - 1), AZ::Time::ZeroTimeMs, 1.f, AzNetworking::InvalidConnectionId); EXPECT_EQ(RewindableBufferFrames - 1, test.Get()); EXPECT_EQ(RewindableBufferFrames - 2, test.GetPrevious()); } // Test that Get/GetPrevious return the unaltered frame on the owning conection - Multiplayer::GetNetworkTime()->AlterTime(static_cast(RewindableBufferFrames - 1), AZ::TimeMs{ 0 }, 1.f, AzNetworking::ConnectionId(0)); + Multiplayer::GetNetworkTime()->AlterTime(static_cast(RewindableBufferFrames - 1), AZ::Time::ZeroTimeMs, 1.f, AzNetworking::ConnectionId(0)); { - Multiplayer::ScopedAlterTime time(static_cast(RewindableBufferFrames - 1), AZ::TimeMs{ 0 }, 1.f, AzNetworking::ConnectionId(0)); + Multiplayer::ScopedAlterTime time(static_cast(RewindableBufferFrames - 1), AZ::Time::ZeroTimeMs, 1.f, AzNetworking::ConnectionId(0)); test.SetOwningConnectionId(AzNetworking::ConnectionId(0)); EXPECT_EQ(RewindableBufferFrames - 1, test.Get()); EXPECT_EQ(RewindableBufferFrames - 1, test.GetPrevious()); @@ -99,7 +99,7 @@ namespace UnitTest { // Note that we didn't actually set any value for time rewindableBufferFrames, so we're testing fetching a value past the last time set - Multiplayer::ScopedAlterTime time(static_cast(RewindableBufferFrames), AZ::TimeMs{ 0 }, 1.f, AzNetworking::InvalidConnectionId); + Multiplayer::ScopedAlterTime time(static_cast(RewindableBufferFrames), AZ::Time::ZeroTimeMs, 1.f, AzNetworking::InvalidConnectionId); EXPECT_EQ(RewindableBufferFrames - 1, test); } } @@ -122,7 +122,7 @@ namespace UnitTest for (uint32_t i = 0; i < RewindableBufferFrames; ++i) { - Multiplayer::ScopedAlterTime time(static_cast(i), AZ::TimeMs{ 0 }, 1.f, AzNetworking::InvalidConnectionId); + Multiplayer::ScopedAlterTime time(static_cast(i), AZ::Time::ZeroTimeMs, 1.f, AzNetworking::InvalidConnectionId); const Object& value = test; EXPECT_EQ(value.value, i); } @@ -131,19 +131,19 @@ namespace UnitTest TEST_F(RewindableObjectTests, TestBackfillOnLargeTimestep) { Multiplayer::RewindableObject test(0); - Multiplayer::ScopedAlterTime time1(static_cast(0), AZ::TimeMs{ 0 }, 1.f, AzNetworking::InvalidConnectionId); + Multiplayer::ScopedAlterTime time1(static_cast(0), AZ::Time::ZeroTimeMs, 1.f, AzNetworking::InvalidConnectionId); test = 1; - Multiplayer::ScopedAlterTime time2(static_cast(31), AZ::TimeMs{ 0 }, 1.f, AzNetworking::InvalidConnectionId); + Multiplayer::ScopedAlterTime time2(static_cast(31), AZ::Time::ZeroTimeMs, 1.f, AzNetworking::InvalidConnectionId); test = 2; for (uint32_t i = 0; i < 31; ++i) { - Multiplayer::ScopedAlterTime time(static_cast(i), AZ::TimeMs{ 0 }, 1.f, AzNetworking::InvalidConnectionId); + Multiplayer::ScopedAlterTime time(static_cast(i), AZ::Time::ZeroTimeMs, 1.f, AzNetworking::InvalidConnectionId); EXPECT_EQ(1, test); } - Multiplayer::ScopedAlterTime time3(static_cast(31), AZ::TimeMs{ 0 }, 1.f, AzNetworking::InvalidConnectionId); + Multiplayer::ScopedAlterTime time3(static_cast(31), AZ::Time::ZeroTimeMs, 1.f, AzNetworking::InvalidConnectionId); EXPECT_EQ(2, test); } @@ -159,7 +159,7 @@ namespace UnitTest for (uint32_t i = 0; i < 1000; ++i) { - Multiplayer::ScopedAlterTime time(static_cast(1000 - i), AZ::TimeMs{ 0 }, 1.f, AzNetworking::InvalidConnectionId); + Multiplayer::ScopedAlterTime time(static_cast(1000 - i), AZ::Time::ZeroTimeMs, 1.f, AzNetworking::InvalidConnectionId); EXPECT_EQ(1000, test); } } diff --git a/Gems/Multiplayer/Code/multiplayer_files.cmake b/Gems/Multiplayer/Code/multiplayer_files.cmake index 1376083443..7c5f3a946b 100644 --- a/Gems/Multiplayer/Code/multiplayer_files.cmake +++ b/Gems/Multiplayer/Code/multiplayer_files.cmake @@ -95,6 +95,8 @@ set(FILES Source/Editor/MultiplayerEditorConnection.h Source/EntityDomains/FullOwnershipEntityDomain.cpp Source/EntityDomains/FullOwnershipEntityDomain.h + Source/EntityDomains/NullEntityDomain.cpp + Source/EntityDomains/NullEntityDomain.h Source/MultiplayerStats.cpp Source/MultiplayerSystemComponent.cpp Source/MultiplayerSystemComponent.h diff --git a/Gems/Multiplayer/Code/multiplayer_tools_files.cmake b/Gems/Multiplayer/Code/multiplayer_tools_files.cmake index aa948f4e75..b180e239a2 100644 --- a/Gems/Multiplayer/Code/multiplayer_tools_files.cmake +++ b/Gems/Multiplayer/Code/multiplayer_tools_files.cmake @@ -10,6 +10,6 @@ set(FILES Include/Multiplayer/IMultiplayerTools.h Source/Pipeline/NetworkPrefabProcessor.cpp Source/Pipeline/NetworkPrefabProcessor.h - Source/MultiplayerToolsModule.h - Source/MultiplayerToolsModule.cpp + Source/MultiplayerToolsSystemComponent.cpp + Source/MultiplayerToolsSystemComponent.h ) diff --git a/Gems/Multiplayer/Registry/prefab.tools.setreg b/Gems/Multiplayer/Registry/prefab.tools.setreg index 7f25cf9a43..256f2d189a 100644 --- a/Gems/Multiplayer/Registry/prefab.tools.setreg +++ b/Gems/Multiplayer/Registry/prefab.tools.setreg @@ -18,8 +18,14 @@ "GameObjectCreation": [ { "$type": "AzToolsFramework::Prefab::PrefabConversionUtils::EditorInfoRemover" }, - { "$type": "Multiplayer::NetworkPrefabProcessor" }, - { "$type": "AzToolsFramework::Prefab::PrefabConversionUtils::PrefabCatchmentProcessor" } + { + "$type": "Multiplayer::NetworkPrefabProcessor", + "SerializationFormat": "Binary" // Options are "Binary" (default) or "Text". Prefer "Binary" for performance. + }, + { + "$type": "AzToolsFramework::Prefab::PrefabConversionUtils::PrefabCatchmentProcessor", + "SerializationFormat": "Binary" // Options are "Binary" (default) or "Text". Prefer "Binary" for performance. + } ] } } diff --git a/Gems/Multiplayer/gem.json b/Gems/Multiplayer/gem.json index 47dbddfcbd..f895c78c5d 100644 --- a/Gems/Multiplayer/gem.json +++ b/Gems/Multiplayer/gem.json @@ -2,6 +2,7 @@ "gem_name": "Multiplayer", "display_name": "Multiplayer", "license": "Apache-2.0 Or MIT", + "license_url": "https://github.com/o3de/o3de/blob/development/LICENSE.txt", "origin": "Open 3D Engine - o3de.org", "type": "Code", "summary": "The Multiplayer Gem provides a public API for multiplayer functionality such as connecting and hosting.", diff --git a/Gems/MultiplayerCompression/gem.json b/Gems/MultiplayerCompression/gem.json index 7dd31476e3..98156cc404 100644 --- a/Gems/MultiplayerCompression/gem.json +++ b/Gems/MultiplayerCompression/gem.json @@ -2,6 +2,7 @@ "gem_name": "MultiplayerCompression", "display_name": "Multiplayer Compression", "license": "Apache-2.0 Or MIT", + "license_url": "https://github.com/o3de/o3de/blob/development/LICENSE.txt", "origin": "Open 3D Engine - o3de.org", "type": "Code", "summary": "The Multiplayer Compression Gem provides an open source Compressor for use with AzNetworking's transport layer.", diff --git a/Gems/NvCloth/Assets/Objects/cloth/Chicken/Actor/chicken_mohawkmat.material b/Gems/NvCloth/Assets/Objects/cloth/Chicken/Actor/chicken_mohawkmat.material index 7e12d7fdee..22c673469c 100644 --- a/Gems/NvCloth/Assets/Objects/cloth/Chicken/Actor/chicken_mohawkmat.material +++ b/Gems/NvCloth/Assets/Objects/cloth/Chicken/Actor/chicken_mohawkmat.material @@ -1,8 +1,8 @@ { "description": "", - "materialType": "Materials/Types/StandardPBR.materialtype", "parentMaterial": "", - "propertyLayoutVersion": 3, + "materialType": "Materials/Types/StandardPBR.materialtype", + "materialTypeVersion": 4, "properties": { "baseColor": { "color": [ @@ -22,11 +22,8 @@ "intensity": 6.742737293243408, "textureMap": "Objects/cloth/Chicken/Actor/chicken_diff.png" }, - "opacity": { - "alphaSource": "None", - "doubleSided": true, - "factor": 1.0, - "mode": "Blended" + "general": { + "doubleSided": true } } -} +} \ No newline at end of file diff --git a/Gems/NvCloth/Assets/Objects/cloth/Environment/cloth_blinds.fbx.assetinfo b/Gems/NvCloth/Assets/Objects/cloth/Environment/Cloth_Blinds.fbx.assetinfo similarity index 100% rename from Gems/NvCloth/Assets/Objects/cloth/Environment/cloth_blinds.fbx.assetinfo rename to Gems/NvCloth/Assets/Objects/cloth/Environment/Cloth_Blinds.fbx.assetinfo diff --git a/Gems/NvCloth/Assets/Objects/cloth/Environment/cloth_blinds_broken.fbx.assetinfo b/Gems/NvCloth/Assets/Objects/cloth/Environment/Cloth_Blinds_Broken.fbx.assetinfo similarity index 100% rename from Gems/NvCloth/Assets/Objects/cloth/Environment/cloth_blinds_broken.fbx.assetinfo rename to Gems/NvCloth/Assets/Objects/cloth/Environment/Cloth_Blinds_Broken.fbx.assetinfo diff --git a/Gems/NvCloth/Assets/Objects/cloth/Environment/cloth_locked_corners_four.fbx.assetinfo b/Gems/NvCloth/Assets/Objects/cloth/Environment/Cloth_Locked_Corners_Four.fbx.assetinfo similarity index 100% rename from Gems/NvCloth/Assets/Objects/cloth/Environment/cloth_locked_corners_four.fbx.assetinfo rename to Gems/NvCloth/Assets/Objects/cloth/Environment/Cloth_Locked_Corners_Four.fbx.assetinfo diff --git a/Gems/NvCloth/Assets/Objects/cloth/Environment/cloth_locked_corners_two.fbx.assetinfo b/Gems/NvCloth/Assets/Objects/cloth/Environment/Cloth_Locked_Corners_Two.fbx.assetinfo similarity index 100% rename from Gems/NvCloth/Assets/Objects/cloth/Environment/cloth_locked_corners_two.fbx.assetinfo rename to Gems/NvCloth/Assets/Objects/cloth/Environment/Cloth_Locked_Corners_Two.fbx.assetinfo diff --git a/Gems/NvCloth/Assets/Objects/cloth/Environment/cloth_locked_edge.fbx.assetinfo b/Gems/NvCloth/Assets/Objects/cloth/Environment/Cloth_Locked_Edge.fbx.assetinfo similarity index 100% rename from Gems/NvCloth/Assets/Objects/cloth/Environment/cloth_locked_edge.fbx.assetinfo rename to Gems/NvCloth/Assets/Objects/cloth/Environment/Cloth_Locked_Edge.fbx.assetinfo diff --git a/Gems/NvCloth/Assets/slices/Cloth/Chicken_Actor.slice b/Gems/NvCloth/Assets/slices/Cloth/Chicken_Actor.slice deleted file mode 100644 index c2c97dec7a..0000000000 --- a/Gems/NvCloth/Assets/slices/Cloth/Chicken_Actor.slice +++ /dev/null @@ -1,532 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/Gems/NvCloth/Assets/slices/Cloth/cloth_blinds.slice b/Gems/NvCloth/Assets/slices/Cloth/cloth_blinds.slice deleted file mode 100644 index 40fb2894d3..0000000000 --- a/Gems/NvCloth/Assets/slices/Cloth/cloth_blinds.slice +++ /dev/null @@ -1,329 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/Gems/NvCloth/Assets/slices/Cloth/cloth_blinds_broken.slice b/Gems/NvCloth/Assets/slices/Cloth/cloth_blinds_broken.slice deleted file mode 100644 index 909b3e582c..0000000000 --- a/Gems/NvCloth/Assets/slices/Cloth/cloth_blinds_broken.slice +++ /dev/null @@ -1,329 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/Gems/NvCloth/Assets/slices/Cloth/cloth_locked_corners_four.slice b/Gems/NvCloth/Assets/slices/Cloth/cloth_locked_corners_four.slice deleted file mode 100644 index 25e742550c..0000000000 --- a/Gems/NvCloth/Assets/slices/Cloth/cloth_locked_corners_four.slice +++ /dev/null @@ -1,329 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/Gems/NvCloth/Assets/slices/Cloth/cloth_locked_corners_two.slice b/Gems/NvCloth/Assets/slices/Cloth/cloth_locked_corners_two.slice deleted file mode 100644 index 26c6290859..0000000000 --- a/Gems/NvCloth/Assets/slices/Cloth/cloth_locked_corners_two.slice +++ /dev/null @@ -1,329 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/Gems/NvCloth/Assets/slices/Cloth/cloth_locked_edge.slice b/Gems/NvCloth/Assets/slices/Cloth/cloth_locked_edge.slice deleted file mode 100644 index cee4fabe49..0000000000 --- a/Gems/NvCloth/Assets/slices/Cloth/cloth_locked_edge.slice +++ /dev/null @@ -1,329 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/Gems/NvCloth/Code/Tests/NvClothTest.cpp b/Gems/NvCloth/Code/Tests/NvClothTest.cpp index e5b0b8fee8..bc1868a5b1 100644 --- a/Gems/NvCloth/Code/Tests/NvClothTest.cpp +++ b/Gems/NvCloth/Code/Tests/NvClothTest.cpp @@ -144,10 +144,7 @@ namespace UnitTest { m_cloth->GetClothConfigurator()->SetTransform(m_clothTransform); - static float time = 0.0f; - static float velocity = 1.0f; - - time += deltaTime; + constexpr float velocity = 1.0f; for (auto& sphere : m_sphereColliders) { diff --git a/Gems/NvCloth/gem.json b/Gems/NvCloth/gem.json index 019ce23742..86a70b9373 100644 --- a/Gems/NvCloth/gem.json +++ b/Gems/NvCloth/gem.json @@ -3,6 +3,7 @@ "display_name": "NVIDIA Cloth (NvCloth)", "license": "Apache-2.0 Or MIT", "origin": "Open 3D Engine - o3de.org", + "license_url": "https://github.com/o3de/o3de/blob/development/LICENSE.txt", "type": "Code", "summary": "The NVIDIA Cloth Gem provides functionality to create fast, realistic cloth simulation with the NVIDIA Cloth library.", "canonical_tags": [ diff --git a/Gems/PhysX/Assets/Editor/Icons/Components/PhysXHeightfieldCollider.svg b/Gems/PhysX/Assets/Editor/Icons/Components/PhysXHeightfieldCollider.svg new file mode 100644 index 0000000000..f616a26381 --- /dev/null +++ b/Gems/PhysX/Assets/Editor/Icons/Components/PhysXHeightfieldCollider.svg @@ -0,0 +1,3 @@ + + + diff --git a/Gems/PhysX/Assets/Editor/Icons/Components/Viewport/PhysXHeightfieldCollider.svg b/Gems/PhysX/Assets/Editor/Icons/Components/Viewport/PhysXHeightfieldCollider.svg new file mode 100644 index 0000000000..fbfed18e46 --- /dev/null +++ b/Gems/PhysX/Assets/Editor/Icons/Components/Viewport/PhysXHeightfieldCollider.svg @@ -0,0 +1,16 @@ + + + + + + + + + + + + + + + + diff --git a/Gems/PhysX/Code/CMakeLists.txt b/Gems/PhysX/Code/CMakeLists.txt index bb3d7c08a2..f045d6b00d 100644 --- a/Gems/PhysX/Code/CMakeLists.txt +++ b/Gems/PhysX/Code/CMakeLists.txt @@ -182,14 +182,6 @@ if(PAL_TRAIT_BUILD_TESTS_SUPPORTED) Gem::LmbrCentral ) - if(PAL_TRAIT_JOINTS_TYPED_TEST_CASE) - ly_add_source_properties( - SOURCES Tests/PhysXJointsTest.cpp - PROPERTY COMPILE_DEFINITIONS - VALUES ENABLE_JOINTS_TYPED_TEST_CASE - ) - endif() - ly_add_googletest( NAME Gem::PhysX.Tests ) @@ -224,6 +216,7 @@ if(PAL_TRAIT_BUILD_TESTS_SUPPORTED) AZ::AzTestShared AZ::AzTest AZ::AzToolsFrameworkTestCommon + AZ::AzManipulatorTestFramework.Static Gem::PhysX.Static Gem::PhysX.Mocks Gem::PhysX.Editor.Static diff --git a/Gems/PhysX/Code/Editor/ColliderAssetScaleMode.cpp b/Gems/PhysX/Code/Editor/ColliderAssetScaleMode.cpp index ea08bb8160..67917bc49a 100644 --- a/Gems/PhysX/Code/Editor/ColliderAssetScaleMode.cpp +++ b/Gems/PhysX/Code/Editor/ColliderAssetScaleMode.cpp @@ -59,7 +59,7 @@ namespace PhysX m_dimensionsManipulators.InstallAxisMouseMoveCallback( [this, idPair] (const AzToolsFramework::LinearManipulator::Action& action) { - OnManipulatorMoved(action.LocalScaleOffset() + m_initialScale, idPair); + OnManipulatorMoved(action.m_start.m_sign * action.LocalScaleOffset() + m_initialScale, idPair); }); m_dimensionsManipulators.InstallUniformLeftMouseDownCallback( diff --git a/Gems/PhysX/Code/Editor/ColliderComponentMode.cpp b/Gems/PhysX/Code/Editor/ColliderComponentMode.cpp index 5de625f679..b91b3e5bb9 100644 --- a/Gems/PhysX/Code/Editor/ColliderComponentMode.cpp +++ b/Gems/PhysX/Code/Editor/ColliderComponentMode.cpp @@ -7,31 +7,31 @@ */ #include "ColliderComponentMode.h" +#include "ColliderAssetScaleMode.h" +#include "ColliderBoxMode.h" +#include "ColliderCapsuleMode.h" #include "ColliderOffsetMode.h" #include "ColliderRotationMode.h" -#include "ColliderBoxMode.h" #include "ColliderSphereMode.h" -#include "ColliderCapsuleMode.h" -#include "ColliderAssetScaleMode.h" #include #include #include +#include #include #include -#include namespace PhysX { namespace { //! Uri's for shortcut actions. - const AZ::Crc32 SetDimensionsSubModeActionUri = AZ_CRC("com.o3de.action.physx.setdimensionssubmode", 0x77b70dd6); - const AZ::Crc32 SetOffsetSubModeActionUri = AZ_CRC("com.o3de.action.physx.setoffsetsubmode", 0xc06132e5); - const AZ::Crc32 SetRotationSubModeActionUri = AZ_CRC("com.o3de.action.physx.setrotationsubmode", 0xc4225918); - const AZ::Crc32 ResetSubModeActionUri = AZ_CRC("com.o3de.action.physx.resetsubmode", 0xb70b120e); - } + const AZ::Crc32 SetDimensionsSubModeActionUri = AZ_CRC("com.o3de.action.physx.setdimensionssubmode", 0x508b1781); + const AZ::Crc32 SetOffsetSubModeActionUri = AZ_CRC("com.o3de.action.physx.setoffsetsubmode", 0x777ac743); + const AZ::Crc32 SetRotationSubModeActionUri = AZ_CRC("com.o3de.action.physx.setrotationsubmode", 0xf1a8f3ff); + const AZ::Crc32 ResetSubModeActionUri = AZ_CRC("com.o3de.action.physx.resetsubmode", 0x599d1594); + } // namespace AZ_CLASS_ALLOCATOR_IMPL(ColliderComponentMode, AZ::SystemAllocator, 0); @@ -39,19 +39,17 @@ namespace PhysX : AzToolsFramework::ComponentModeFramework::EditorBaseComponentMode(entityComponentIdPair, componentType) { CreateSubModes(); + CreateSubModeSelectionCluster(); ColliderComponentModeRequestBus::Handler::BusConnect(entityComponentIdPair); ColliderComponentModeUiRequestBus::Handler::BusConnect(entityComponentIdPair); - - CreateSubModeSelectionCluster(); } ColliderComponentMode::~ColliderComponentMode() { - RemoveSubModeSelectionCluster(); - ColliderComponentModeUiRequestBus::Handler::BusDisconnect(); ColliderComponentModeRequestBus::Handler::BusDisconnect(); + RemoveSubModeSelectionCluster(); m_subModes[m_subMode]->Teardown(GetEntityComponentIdPair()); } @@ -62,39 +60,41 @@ namespace PhysX AZStd::vector ColliderComponentMode::PopulateActionsImpl() { - - AzToolsFramework::ActionOverride setDimensionsModeAction; - setDimensionsModeAction.SetUri(SetDimensionsSubModeActionUri); - setDimensionsModeAction.SetKeySequence(QKeySequence(Qt::Key_1)); - setDimensionsModeAction.SetTitle("Set Resize Mode"); - setDimensionsModeAction.SetTip("Set resize mode"); - setDimensionsModeAction.SetEntityComponentIdPair(GetEntityComponentIdPair()); - setDimensionsModeAction.SetCallback([this]() - { - SetCurrentMode(SubMode::Dimensions); - }); - AzToolsFramework::ActionOverride setOffsetModeAction; setOffsetModeAction.SetUri(SetOffsetSubModeActionUri); - setOffsetModeAction.SetKeySequence(QKeySequence(Qt::Key_2)); + setOffsetModeAction.SetKeySequence(QKeySequence(Qt::Key_1)); setOffsetModeAction.SetTitle("Set Offset Mode"); setOffsetModeAction.SetTip("Set offset mode"); setOffsetModeAction.SetEntityComponentIdPair(GetEntityComponentIdPair()); - setOffsetModeAction.SetCallback([this]() - { - SetCurrentMode(SubMode::Offset); - }); + setOffsetModeAction.SetCallback( + [this]() + { + SetCurrentMode(SubMode::Offset); + }); AzToolsFramework::ActionOverride setRotationModeAction; setRotationModeAction.SetUri(SetRotationSubModeActionUri); - setRotationModeAction.SetKeySequence(QKeySequence(Qt::Key_3)); + setRotationModeAction.SetKeySequence(QKeySequence(Qt::Key_2)); setRotationModeAction.SetTitle("Set Rotation Mode"); setRotationModeAction.SetTip("Set rotation mode"); setRotationModeAction.SetEntityComponentIdPair(GetEntityComponentIdPair()); - setRotationModeAction.SetCallback([this]() - { - SetCurrentMode(SubMode::Rotation); - }); + setRotationModeAction.SetCallback( + [this]() + { + SetCurrentMode(SubMode::Rotation); + }); + + AzToolsFramework::ActionOverride setDimensionsModeAction; + setDimensionsModeAction.SetUri(SetDimensionsSubModeActionUri); + setDimensionsModeAction.SetKeySequence(QKeySequence(Qt::Key_3)); + setDimensionsModeAction.SetTitle("Set Resize Mode"); + setDimensionsModeAction.SetTip("Set resize mode"); + setDimensionsModeAction.SetEntityComponentIdPair(GetEntityComponentIdPair()); + setDimensionsModeAction.SetCallback( + [this]() + { + SetCurrentMode(SubMode::Dimensions); + }); AzToolsFramework::ActionOverride resetModeAction; resetModeAction.SetUri(ResetSubModeActionUri); @@ -102,12 +102,13 @@ namespace PhysX resetModeAction.SetTitle("Reset Current Mode"); resetModeAction.SetTip("Reset current mode"); resetModeAction.SetEntityComponentIdPair(GetEntityComponentIdPair()); - resetModeAction.SetCallback([this]() - { - ResetCurrentMode(); - }); + resetModeAction.SetCallback( + [this]() + { + ResetCurrentMode(); + }); - return {setDimensionsModeAction, setOffsetModeAction, setRotationModeAction, resetModeAction }; + return { setDimensionsModeAction, setOffsetModeAction, setRotationModeAction, resetModeAction }; } void ColliderComponentMode::CreateSubModes() @@ -141,7 +142,7 @@ namespace PhysX if (mouseInteraction.m_mouseEvent == AzToolsFramework::ViewportInteraction::MouseEvent::Wheel && mouseInteraction.m_mouseInteraction.m_keyboardModifiers.Ctrl()) { - int direction = MouseWheelDelta(mouseInteraction) > 0.0f ? 1 : -1; + const int direction = MouseWheelDelta(mouseInteraction) > 0.0f ? -1 : 1; AZ::u32 currentModeIndex = static_cast(m_subMode); AZ::u32 numSubModes = static_cast(SubMode::NumModes); AZ::u32 nextModeIndex = (currentModeIndex + numSubModes + direction) % m_subModes.size(); @@ -159,10 +160,17 @@ namespace PhysX void ColliderComponentMode::SetCurrentMode(SubMode newMode) { - AZ_Assert(m_subModes.count(newMode) > 0, "Submode not found:%d", newMode); + AZ_Assert(m_subModes.find(newMode) != m_subModes.end(), "Submode not found:%d", newMode); m_subModes[m_subMode]->Teardown(GetEntityComponentIdPair()); m_subMode = newMode; m_subModes[m_subMode]->Setup(GetEntityComponentIdPair()); + + const auto modeIndex = static_cast(newMode); + AZ_Assert(modeIndex < m_buttonIds.size(), "Invalid mode index %i.", modeIndex); + AzToolsFramework::ViewportUi::ViewportUiRequestBus::Event( + AzToolsFramework::ViewportUi::DefaultViewportId, + &AzToolsFramework::ViewportUi::ViewportUiRequestBus::Events::SetClusterActiveButton, m_modeSelectionClusterId, + m_buttonIds[modeIndex]); } AzToolsFramework::ViewportUi::ClusterId ColliderComponentMode::GetClusterId() const @@ -172,36 +180,40 @@ namespace PhysX AzToolsFramework::ViewportUi::ButtonId ColliderComponentMode::GetOffsetButtonId() const { - return m_offsetModeButtonId; + return m_buttonIds[static_cast(SubMode::Offset)]; } AzToolsFramework::ViewportUi::ButtonId ColliderComponentMode::GetRotationButtonId() const { - return m_rotationModeButtonId; + return m_buttonIds[static_cast(SubMode::Rotation)]; } AzToolsFramework::ViewportUi::ButtonId ColliderComponentMode::GetDimensionsButtonId() const { - return m_dimensionsModeButtonId; + return m_buttonIds[static_cast(SubMode::Dimensions)]; + } + + AZStd::string ColliderComponentMode::GetComponentModeName() const + { + return "Collider Edit Mode"; } void RefreshUI() { /// The reason this is in a free function is because ColliderComponentMode /// privately inherits from ToolsApplicationNotificationBus. Trying to invoke - /// the bus inside the class scope causes the compiler to complain it's not accessible - /// to due private inheritence. - /// Using the global namespace operator :: should have fixed that, except there + /// the bus inside the class scope causes the compiler to complain it's not accessible + /// to due private inheritence. + /// Using the global namespace operator :: should have fixed that, except there /// is a bug in the microsoft compiler meaning it doesn't work. So this is a work around. AzToolsFramework::ToolsApplicationNotificationBus::Broadcast( - &AzToolsFramework::ToolsApplicationNotificationBus::Events::InvalidatePropertyDisplay, - AzToolsFramework::Refresh_Values); + &AzToolsFramework::ToolsApplicationNotificationBus::Events::InvalidatePropertyDisplay, AzToolsFramework::Refresh_Values); } void ColliderComponentMode::ResetCurrentMode() { m_subModes[m_subMode]->ResetValues(GetEntityComponentIdPair()); - m_subModes[m_subMode]->Refresh(GetEntityComponentIdPair()); + m_subModes[m_subMode]->Refresh(GetEntityComponentIdPair()); RefreshUI(); } @@ -225,8 +237,8 @@ namespace PhysX void ColliderComponentMode::RemoveSubModeSelectionCluster() { AzToolsFramework::ViewportUi::ViewportUiRequestBus::Event( - AzToolsFramework::ViewportUi::DefaultViewportId, - &AzToolsFramework::ViewportUi::ViewportUiRequestBus::Events::RemoveCluster, m_modeSelectionClusterId); + AzToolsFramework::ViewportUi::DefaultViewportId, &AzToolsFramework::ViewportUi::ViewportUiRequestBus::Events::RemoveCluster, + m_modeSelectionClusterId); } void ColliderComponentMode::CreateSubModeSelectionCluster() @@ -237,29 +249,37 @@ namespace PhysX &AzToolsFramework::ViewportUi::ViewportUiRequestBus::Events::CreateCluster, AzToolsFramework::ViewportUi::Alignment::TopLeft); // create and register the buttons - m_dimensionsModeButtonId = RegisterClusterButton(m_modeSelectionClusterId, "Scale"); - m_offsetModeButtonId = RegisterClusterButton(m_modeSelectionClusterId, "Move"); - m_rotationModeButtonId = RegisterClusterButton(m_modeSelectionClusterId, "Rotate"); + m_buttonIds.resize(static_cast(SubMode::NumModes)); + m_buttonIds[static_cast(SubMode::Offset)] = RegisterClusterButton(m_modeSelectionClusterId, "Move"); + m_buttonIds[static_cast(SubMode::Rotation)] = RegisterClusterButton(m_modeSelectionClusterId, "Rotate"); + m_buttonIds[static_cast(SubMode::Dimensions)] = RegisterClusterButton(m_modeSelectionClusterId, "Scale"); - const auto onButtonClicked = [this](AzToolsFramework::ViewportUi::ButtonId buttonId) { - if (buttonId == m_dimensionsModeButtonId) - { - SetCurrentMode(SubMode::Dimensions); - } - else if (buttonId == m_offsetModeButtonId) + SetCurrentMode(SubMode::Offset); + + const auto onButtonClicked = [this](AzToolsFramework::ViewportUi::ButtonId buttonId) + { + if (buttonId == m_buttonIds[static_cast(SubMode::Offset)]) { SetCurrentMode(SubMode::Offset); } - else if (buttonId == m_rotationModeButtonId) + else if (buttonId == m_buttonIds[static_cast(SubMode::Rotation)]) { SetCurrentMode(SubMode::Rotation); } + else if (buttonId == m_buttonIds[static_cast(SubMode::Dimensions)]) + { + SetCurrentMode(SubMode::Dimensions); + } + else + { + AZ_Error("PhysX Collider Component Mode", false, "Unrecognized button ID."); + } }; - + m_modeSelectionHandler = AZ::Event::Handler(onButtonClicked); AzToolsFramework::ViewportUi::ViewportUiRequestBus::Event( AzToolsFramework::ViewportUi::DefaultViewportId, - &AzToolsFramework::ViewportUi::ViewportUiRequestBus::Events::RegisterClusterEventHandler, - m_modeSelectionClusterId, m_modeSelectionHandler); + &AzToolsFramework::ViewportUi::ViewportUiRequestBus::Events::RegisterClusterEventHandler, m_modeSelectionClusterId, + m_modeSelectionHandler); } -} +} // namespace PhysX diff --git a/Gems/PhysX/Code/Editor/ColliderComponentMode.h b/Gems/PhysX/Code/Editor/ColliderComponentMode.h index b4ca060065..a756075513 100644 --- a/Gems/PhysX/Code/Editor/ColliderComponentMode.h +++ b/Gems/PhysX/Code/Editor/ColliderComponentMode.h @@ -31,21 +31,23 @@ namespace PhysX ColliderComponentMode(const AZ::EntityComponentIdPair& entityComponentIdPair, AZ::Uuid componentType); ~ColliderComponentMode(); - // EditorBaseComponentMode ... + // EditorBaseComponentMode overrides ... void Refresh() override; AZStd::vector PopulateActionsImpl() override; AZStd::vector PopulateViewportUiImpl() override; - // ColliderComponentModeBus ... + // ColliderComponentModeBus overrides ... SubMode GetCurrentMode() override; void SetCurrentMode(SubMode index) override; - // ColliderComponentModeUiBus ... + // ColliderComponentModeUiBus overrides ... AzToolsFramework::ViewportUi::ButtonId GetOffsetButtonId() const override; AzToolsFramework::ViewportUi::ButtonId GetRotationButtonId() const override; AzToolsFramework::ViewportUi::ClusterId GetClusterId() const override; AzToolsFramework::ViewportUi::ButtonId GetDimensionsButtonId() const override; + // ComponentMode overrides ... + AZStd::string GetComponentModeName() const override; private: // AzToolsFramework::ViewportInteraction::ViewportSelectionRequests ... @@ -63,12 +65,9 @@ namespace PhysX AzToolsFramework::ViewportUi::ClusterId m_modeSelectionClusterId; //!< Viewport UI cluster for changing sub mode. - AzToolsFramework::ViewportUi::ButtonId - m_dimensionsModeButtonId; //!< Id of the Viewport UI button for resize/dimensions mode. - AzToolsFramework::ViewportUi::ButtonId - m_offsetModeButtonId; //!< Id of the Viewport UI button for offset mode. - AzToolsFramework::ViewportUi::ButtonId - m_rotationModeButtonId; //!< Id of the Viewport UI button for rotation mode. + + AZStd::vector m_buttonIds; //!< Ids for the Viewport UI buttons for each mode. + AZ::Event::Handler m_modeSelectionHandler; //!< Event handler for sub mode changes. }; diff --git a/Gems/PhysX/Code/Editor/ColliderComponentModeBus.h b/Gems/PhysX/Code/Editor/ColliderComponentModeBus.h index 289215067a..05072f699a 100644 --- a/Gems/PhysX/Code/Editor/ColliderComponentModeBus.h +++ b/Gems/PhysX/Code/Editor/ColliderComponentModeBus.h @@ -19,9 +19,9 @@ namespace PhysX public: enum class SubMode : AZ::u32 { - Dimensions, Offset, Rotation, + Dimensions, NumModes }; diff --git a/Gems/PhysX/Code/Editor/DebugDraw.cpp b/Gems/PhysX/Code/Editor/DebugDraw.cpp index 90a1eb6004..0af5822edf 100644 --- a/Gems/PhysX/Code/Editor/DebugDraw.cpp +++ b/Gems/PhysX/Code/Editor/DebugDraw.cpp @@ -56,9 +56,9 @@ namespace PhysX bool IsDrawColliderReadOnly() { bool helpersVisible = false; - AzToolsFramework::EditorRequestBus::BroadcastResult(helpersVisible, - &AzToolsFramework::EditorRequests::DisplayHelpersVisible); - // if helpers are visible, draw colliders is NOT read only and can be changed. + AzToolsFramework::ViewportInteraction::ViewportSettingsRequestBus::BroadcastResult( + helpersVisible, &AzToolsFramework::ViewportInteraction::ViewportSettingsRequestBus::Events::HelpersVisible); + // if helpers are visible, draw colliders is not read only and can be changed return !helpersVisible; } @@ -687,6 +687,53 @@ namespace PhysX [[maybe_unused]] const AZ::Vector3& colliderScale, [[maybe_unused]] const bool forceUniformScaling) const { + const int numColumns = heightfieldShapeConfig.GetNumColumns(); + const int numRows = heightfieldShapeConfig.GetNumRows(); + + const float minXBounds = -(numColumns * heightfieldShapeConfig.GetGridResolution().GetX()) / 2.0f; + const float minYBounds = -(numRows * heightfieldShapeConfig.GetGridResolution().GetY()) / 2.0f; + + auto heights = heightfieldShapeConfig.GetSamples(); + + for (int xIndex = 0; xIndex < numColumns - 1; xIndex++) + { + for (int yIndex = 0; yIndex < numRows - 1; yIndex++) + { + const int index0 = yIndex * numColumns + xIndex; + const int index1 = yIndex * numColumns + xIndex + 1; + const int index2 = (yIndex + 1) * numColumns + xIndex; + const int index3 = (yIndex + 1) * numColumns + xIndex + 1; + + const float x0 = minXBounds + heightfieldShapeConfig.GetGridResolution().GetX() * xIndex; + const float x1 = minXBounds + heightfieldShapeConfig.GetGridResolution().GetX() * (xIndex + 1); + const float y0 = minYBounds + heightfieldShapeConfig.GetGridResolution().GetY() * yIndex; + const float y1 = minYBounds + heightfieldShapeConfig.GetGridResolution().GetY() * (yIndex + 1); + + // Always draw top and left line of quad + debugDisplay.DrawLine( + AZ::Vector3(x0, y0, heights[index0].m_height), + AZ::Vector3(x1, y0, heights[index1].m_height)); + debugDisplay.DrawLine( + AZ::Vector3(x0, y0, heights[index0].m_height), + AZ::Vector3(x0, y1, heights[index2].m_height)); + + // Draw bottom line in last row + if (yIndex == numRows - 2) + { + debugDisplay.DrawLine( + AZ::Vector3(x1, y1, heights[index3].m_height), + AZ::Vector3(x0, y1, heights[index2].m_height)); + } + + // Draw right line in last column + if (xIndex == numColumns - 2) + { + debugDisplay.DrawLine( + AZ::Vector3(x1, y0, heights[index1].m_height), + AZ::Vector3(x1, y1, heights[index3].m_height)); + } + } + } } AZ::Transform Collider::GetColliderLocalTransform( diff --git a/Gems/PhysX/Code/Editor/EditorJointConfiguration.cpp b/Gems/PhysX/Code/Editor/EditorJointConfiguration.cpp index 02e684de63..166c44de22 100644 --- a/Gems/PhysX/Code/Editor/EditorJointConfiguration.cpp +++ b/Gems/PhysX/Code/Editor/EditorJointConfiguration.cpp @@ -11,6 +11,7 @@ #include #include #include +#include namespace { @@ -213,7 +214,7 @@ namespace PhysX if (auto* serializeContext = azrtti_cast(context)) { serializeContext->Class() - ->Version(4, &EditorJointConfig::VersionConverter) + ->Version(5, &EditorJointConfig::VersionConverter) ->Field("Local Position", &EditorJointConfig::m_localPosition) ->Field("Local Rotation", &EditorJointConfig::m_localRotation) ->Field("Parent Entity", &EditorJointConfig::m_leadEntity) @@ -228,6 +229,12 @@ namespace PhysX if (auto* editContext = serializeContext->GetEditContext()) { + editContext->Enum("Joint Display Setup State", "Options for displaying joint setup.") + ->Value("Never", EditorJointConfig::DisplaySetupState::Never) + ->Value("Selected", EditorJointConfig::DisplaySetupState::Selected) + ->Value("Always", EditorJointConfig::DisplaySetupState::Always) + ; + editContext->Class( "PhysX Joint Configuration", "") ->ClassElement(AZ::Edit::ClassElements::EditorData, "") @@ -244,8 +251,11 @@ namespace PhysX ->Attribute(AZ::Edit::Attributes::ChangeNotify, &EditorJointConfig::ValidateLeadEntityId) ->DataElement(0, &PhysX::EditorJointConfig::m_selfCollide, "Lead-Follower Collide" , "When active, the lead and follower pair will collide with each other.") - ->DataElement(0, &PhysX::EditorJointConfig::m_displayJointSetup, "Display Setup in Viewport" - , "Display joint setup in the viewport.") + ->DataElement( + AZ::Edit::UIHandlers::ComboBox, &PhysX::EditorJointConfig::m_displayJointSetup, "Display Setup in Viewport" + , "Never = Not shown." + "Select = Show setup display when entity is selected." + "Always = Always show setup display.") ->Attribute(AZ::Edit::Attributes::ReadOnly, &EditorJointConfig::IsInComponentMode) ->DataElement(0, &PhysX::EditorJointConfig::m_selectLeadOnSnap, "Select Lead on Snap" , "Select lead entity on snap to position in component mode.") @@ -306,6 +316,23 @@ namespace PhysX m_followerEntity); } + bool EditorJointConfig::ShowSetupDisplay() const + { + switch(m_displayJointSetup) + { + case DisplaySetupState::Always: + return true; + case DisplaySetupState::Selected: + { + bool showSetup = false; + AzToolsFramework::EditorEntityInfoRequestBus::EventResult( + showSetup, m_followerEntity, &AzToolsFramework::EditorEntityInfoRequests::IsSelected); + return showSetup; + } + } + return false; + } + bool EditorJointConfig::IsInComponentMode() const { return m_inComponentMode; @@ -343,6 +370,31 @@ namespace PhysX } } + // convert m_displayJointSetup from a bool to the enum with the option Never,Selected,Always show joint setup helpers. + if (classElement.GetVersion() <= 4) + { + // get the current bool setting and remove it. + bool oldSetting = false; + const int displayJointSetupIndex = classElement.FindElement(AZ_CRC_CE("Display Debug")); + if (displayJointSetupIndex >= 0) + { + AZ::SerializeContext::DataElementNode& elementNode = classElement.GetSubElement(displayJointSetupIndex); + elementNode.GetData(oldSetting); + classElement.RemoveElement(displayJointSetupIndex); + } + + //if the old setting was on set it to 'Selected'. otherwise 'Never' + if (oldSetting) + { + classElement.AddElementWithData(context, "Display Debug", EditorJointConfig::DisplaySetupState::Selected); + } + else + { + classElement.AddElementWithData(context, "Display Debug", EditorJointConfig::DisplaySetupState::Never); + } + } + + return result; } diff --git a/Gems/PhysX/Code/Editor/EditorJointConfiguration.h b/Gems/PhysX/Code/Editor/EditorJointConfiguration.h index 89ab31e4a7..f3dcd4afed 100644 --- a/Gems/PhysX/Code/Editor/EditorJointConfiguration.h +++ b/Gems/PhysX/Code/Editor/EditorJointConfiguration.h @@ -100,12 +100,21 @@ namespace PhysX AZ_TYPE_INFO(EditorJointConfig, "{8A966D65-CA97-4786-A13C-ACAA519D97EA}"); static void Reflect(AZ::ReflectContext* context); + enum class DisplaySetupState : AZ::u8 + { + Never = 0, + Selected, + Always + }; + void SetLeadEntityId(AZ::EntityId leadEntityId); JointGenericProperties ToGenericProperties() const; JointComponentConfiguration ToGameTimeConfig() const; + bool ShowSetupDisplay() const; + bool m_breakable = false; - bool m_displayJointSetup = false; + DisplaySetupState m_displayJointSetup = DisplaySetupState::Selected; bool m_inComponentMode = false; bool m_selectLeadOnSnap = true; bool m_selfCollide = false; @@ -129,3 +138,8 @@ namespace PhysX }; } // namespace PhysX + +namespace AZ +{ + AZ_TYPE_INFO_SPECIALIZE(PhysX::EditorJointConfig::DisplaySetupState, "{17EBE6BD-289A-4326-8A24-DCE3B7FEC51E}"); +} // namespace AZ diff --git a/Gems/PhysX/Code/Editor/Source/ComponentModes/Joints/JointsComponentMode.cpp b/Gems/PhysX/Code/Editor/Source/ComponentModes/Joints/JointsComponentMode.cpp index ce95e27db3..08e31a89f0 100644 --- a/Gems/PhysX/Code/Editor/Source/ComponentModes/Joints/JointsComponentMode.cpp +++ b/Gems/PhysX/Code/Editor/Source/ComponentModes/Joints/JointsComponentMode.cpp @@ -307,7 +307,16 @@ namespace PhysX AZStd::vector JointsComponentMode::PopulateViewportUiImpl() { - return AZStd::vector(m_modeSelectionClusterIds.begin(), m_modeSelectionClusterIds.end()); + AZStd::vector ids; + ids.reserve(m_modeSelectionClusterIds.size()); + for (auto clusterid : m_modeSelectionClusterIds) + { + if (clusterid != AzToolsFramework::ViewportUi::InvalidClusterId) + { + ids.emplace_back(clusterid); + } + } + return ids; } void JointsComponentMode::SetCurrentMode(JointsComponentModeCommon::SubComponentModes::ModeType newMode, ButtonData& buttonData) @@ -353,31 +362,64 @@ namespace PhysX void JointsComponentMode::SetupSubModes(const AZ::EntityComponentIdPair& entityComponentIdPair) { - //create the 3 cluster groups - for (auto& clusterId : m_modeSelectionClusterIds) - { - AzToolsFramework::ViewportUi::ViewportUiRequestBus::EventResult( - clusterId, AzToolsFramework::ViewportUi::DefaultViewportId, - &AzToolsFramework::ViewportUi::ViewportUiRequestBus::Events::CreateCluster, - AzToolsFramework::ViewportUi::Alignment::TopLeft); - } - //retrieve the enabled sub components from the entity AZStd::vector subModesState; EditorJointRequestBus::EventResult(subModesState, entityComponentIdPair, &EditorJointRequests::GetSubComponentModesState); + //group 1 is always available so create it + AzToolsFramework::ViewportUi::ViewportUiRequestBus::EventResult( + m_modeSelectionClusterIds[static_cast(ClusterGroups::Group1)], AzToolsFramework::ViewportUi::DefaultViewportId, + &AzToolsFramework::ViewportUi::ViewportUiRequestBus::Events::CreateCluster, AzToolsFramework::ViewportUi::Alignment::TopLeft); + + //check if groups 2 and/or 3 need to be created + for (auto [modeType, _] : subModesState) + { + const AzToolsFramework::ViewportUi::ClusterId group2Id = GetClusterId(ClusterGroups::Group2); + const AzToolsFramework::ViewportUi::ClusterId group3Id = GetClusterId(ClusterGroups::Group3); + switch (modeType) + { + case JointsComponentModeCommon::SubComponentModes::ModeType::Damping: + case JointsComponentModeCommon::SubComponentModes::ModeType::Stiffness: + case JointsComponentModeCommon::SubComponentModes::ModeType::TwistLimits: + case JointsComponentModeCommon::SubComponentModes::ModeType::SwingLimits: + { + if (group2Id == AzToolsFramework::ViewportUi::InvalidClusterId) + { + AzToolsFramework::ViewportUi::ViewportUiRequestBus::EventResult( + m_modeSelectionClusterIds[static_cast(ClusterGroups::Group2)], + AzToolsFramework::ViewportUi::DefaultViewportId, + &AzToolsFramework::ViewportUi::ViewportUiRequestBus::Events::CreateCluster, + AzToolsFramework::ViewportUi::Alignment::TopLeft); + } + } + break; + case JointsComponentModeCommon::SubComponentModes::ModeType::MaxForce: + case JointsComponentModeCommon::SubComponentModes::ModeType::MaxTorque: + { + if (group3Id == AzToolsFramework::ViewportUi::InvalidClusterId) + { + AzToolsFramework::ViewportUi::ViewportUiRequestBus::EventResult( + m_modeSelectionClusterIds[static_cast(ClusterGroups::Group3)], + AzToolsFramework::ViewportUi::DefaultViewportId, + &AzToolsFramework::ViewportUi::ViewportUiRequestBus::Events::CreateCluster, + AzToolsFramework::ViewportUi::Alignment::TopLeft); + } + } + break; + default: + AZ_Error("Joints", false, "Joints component mode cluster UI setup found unknown sub mode."); + break; + } + //if both are created - break; + if (group2Id != AzToolsFramework::ViewportUi::InvalidClusterId && group3Id != AzToolsFramework::ViewportUi::InvalidClusterId) + { + break; + } + } + const AzToolsFramework::ViewportUi::ClusterId group1ClusterId = GetClusterId(ClusterGroups::Group1); const AzToolsFramework::ViewportUi::ClusterId group2ClusterId = GetClusterId(ClusterGroups::Group2); - //hide cluster 2, if something is added to it. it will make is visible - AzToolsFramework::ViewportUi::ViewportUiRequestBus::Event( - AzToolsFramework::ViewportUi::DefaultViewportId, &AzToolsFramework::ViewportUi::ViewportUiRequestBus::Events::SetClusterVisible, - group2ClusterId, false); - const AzToolsFramework::ViewportUi::ClusterId group3ClusterId = GetClusterId(ClusterGroups::Group3); - // hide cluster 3, if something is added to it. it will make is visible - AzToolsFramework::ViewportUi::ViewportUiRequestBus::Event( - AzToolsFramework::ViewportUi::DefaultViewportId, &AzToolsFramework::ViewportUi::ViewportUiRequestBus::Events::SetClusterVisible, - group3ClusterId, false); //translation and rotation are enabled for all joints in group 1 m_subModes[JointsComponentModeCommon::SubComponentModes::ModeType::Translation] = @@ -408,10 +450,6 @@ namespace PhysX Internal::RegisterClusterButton(group3ClusterId, "joints/MaxForce", SubModeData::MaxForceToolTip); m_buttonData[JointsComponentModeCommon::SubComponentModes::ModeType::MaxForce] = ButtonData{ group3ClusterId, buttonId }; - - AzToolsFramework::ViewportUi::ViewportUiRequestBus::Event( - AzToolsFramework::ViewportUi::DefaultViewportId, - &AzToolsFramework::ViewportUi::ViewportUiRequestBus::Events::SetClusterVisible, group3ClusterId, true); } break; case JointsComponentModeCommon::SubComponentModes::ModeType::MaxTorque: @@ -424,10 +462,6 @@ namespace PhysX Internal::RegisterClusterButton(group3ClusterId, "joints/MaxTorque", SubModeData::MaxTorqueToolTip); m_buttonData[JointsComponentModeCommon::SubComponentModes::ModeType::MaxTorque] = ButtonData{ group3ClusterId, buttonId }; - - AzToolsFramework::ViewportUi::ViewportUiRequestBus::Event( - AzToolsFramework::ViewportUi::DefaultViewportId, - &AzToolsFramework::ViewportUi::ViewportUiRequestBus::Events::SetClusterVisible, group3ClusterId, true); } break; case JointsComponentModeCommon::SubComponentModes::ModeType::Damping: @@ -439,10 +473,6 @@ namespace PhysX const AzToolsFramework::ViewportUi::ButtonId buttonId = Internal::RegisterClusterButton(group2ClusterId, "joints/Damping", SubModeData::DampingToolTip); m_buttonData[JointsComponentModeCommon::SubComponentModes::ModeType::Damping] = ButtonData{ group2ClusterId, buttonId }; - - AzToolsFramework::ViewportUi::ViewportUiRequestBus::Event( - AzToolsFramework::ViewportUi::DefaultViewportId, - &AzToolsFramework::ViewportUi::ViewportUiRequestBus::Events::SetClusterVisible, group2ClusterId, true); } break; case JointsComponentModeCommon::SubComponentModes::ModeType::Stiffness: @@ -455,10 +485,6 @@ namespace PhysX Internal::RegisterClusterButton(group2ClusterId, "joints/Stiffness", SubModeData::StiffnessToolTip); m_buttonData[JointsComponentModeCommon::SubComponentModes::ModeType::Stiffness] = ButtonData{ group2ClusterId, buttonId }; - - AzToolsFramework::ViewportUi::ViewportUiRequestBus::Event( - AzToolsFramework::ViewportUi::DefaultViewportId, - &AzToolsFramework::ViewportUi::ViewportUiRequestBus::Events::SetClusterVisible, group2ClusterId, true); } break; case JointsComponentModeCommon::SubComponentModes::ModeType::TwistLimits: @@ -473,10 +499,6 @@ namespace PhysX Internal::RegisterClusterButton(group2ClusterId, "joints/TwistLimits", SubModeData::TwistLimitsToolTip); m_buttonData[JointsComponentModeCommon::SubComponentModes::ModeType::TwistLimits] = ButtonData{ group2ClusterId, buttonId }; - - AzToolsFramework::ViewportUi::ViewportUiRequestBus::Event( - AzToolsFramework::ViewportUi::DefaultViewportId, - &AzToolsFramework::ViewportUi::ViewportUiRequestBus::Events::SetClusterVisible, group2ClusterId, true); } break; case JointsComponentModeCommon::SubComponentModes::ModeType::SwingLimits: @@ -489,10 +511,6 @@ namespace PhysX Internal::RegisterClusterButton(group2ClusterId, "joints/SwingLimits", SubModeData::SwingLimitsToolTip); m_buttonData[JointsComponentModeCommon::SubComponentModes::ModeType::SwingLimits] = ButtonData{ group2ClusterId, buttonId }; - - AzToolsFramework::ViewportUi::ViewportUiRequestBus::Event( - AzToolsFramework::ViewportUi::DefaultViewportId, - &AzToolsFramework::ViewportUi::ViewportUiRequestBus::Events::SetClusterVisible, group2ClusterId, true); } break; case JointsComponentModeCommon::SubComponentModes::ModeType::SnapPosition: @@ -517,6 +535,9 @@ namespace PhysX ButtonData{ group1ClusterId, buttonId }; } break; + default: + AZ_Error("Joints", false, "Joints component mode cluster button setup found unknown sub mode."); + break; } } @@ -560,10 +581,13 @@ namespace PhysX for (int i = 0; i < static_cast(ClusterGroups::GroupCount); i++) { - AzToolsFramework::ViewportUi::ViewportUiRequestBus::Event( - AzToolsFramework::ViewportUi::DefaultViewportId, - &AzToolsFramework::ViewportUi::ViewportUiRequestBus::Events::RegisterClusterEventHandler, m_modeSelectionClusterIds[i], - m_modeSelectionHandlers[i]); + if (m_modeSelectionClusterIds[i] != AzToolsFramework::ViewportUi::InvalidClusterId) + { + AzToolsFramework::ViewportUi::ViewportUiRequestBus::Event( + AzToolsFramework::ViewportUi::DefaultViewportId, + &AzToolsFramework::ViewportUi::ViewportUiRequestBus::Events::RegisterClusterEventHandler, + m_modeSelectionClusterIds[i], m_modeSelectionHandlers[i]); + } } // set the translate as enabled by default. @@ -588,10 +612,14 @@ namespace PhysX { for (auto clusterid : m_modeSelectionClusterIds) { - AzToolsFramework::ViewportUi::ViewportUiRequestBus::Event( - AzToolsFramework::ViewportUi::DefaultViewportId, &AzToolsFramework::ViewportUi::ViewportUiRequestBus::Events::RemoveCluster, - clusterid); + if (clusterid != AzToolsFramework::ViewportUi::InvalidClusterId) + { + AzToolsFramework::ViewportUi::ViewportUiRequestBus::Event( + AzToolsFramework::ViewportUi::DefaultViewportId, + &AzToolsFramework::ViewportUi::ViewportUiRequestBus::Events::RemoveCluster, clusterid); + } } + m_modeSelectionClusterIds.assign(static_cast(ClusterGroups::GroupCount), AzToolsFramework::ViewportUi::InvalidClusterId); } AzToolsFramework::ViewportUi::ClusterId JointsComponentMode::GetClusterId(ClusterGroups group) diff --git a/Gems/PhysX/Code/Editor/Source/ComponentModes/Joints/JointsSubComponentModeAngleCone.cpp b/Gems/PhysX/Code/Editor/Source/ComponentModes/Joints/JointsSubComponentModeAngleCone.cpp index 11abe0fa2a..b229c9d020 100644 --- a/Gems/PhysX/Code/Editor/Source/ComponentModes/Joints/JointsSubComponentModeAngleCone.cpp +++ b/Gems/PhysX/Code/Editor/Source/ComponentModes/Joints/JointsSubComponentModeAngleCone.cpp @@ -17,6 +17,7 @@ #include #include #include +#include #include #include @@ -34,22 +35,22 @@ namespace PhysX const float XRotationManipulatorWidth = 0.05f; } // namespace Internal - JointsSubComponentModeAngleCone::JointsSubComponentModeAngleCone( - const AZStd::string& propertyName, float max, float min) + JointsSubComponentModeAngleCone::JointsSubComponentModeAngleCone(const AZStd::string& propertyName, float max, float min) : m_propertyName(propertyName) , m_max(max) , m_min(min) { - } void JointsSubComponentModeAngleCone::Setup(const AZ::EntityComponentIdPair& idPair) { m_entityComponentIdPair = idPair; EditorJointRequestBus::EventResult( - m_resetPostion, m_entityComponentIdPair, &PhysX::EditorJointRequests::GetVector3Value, JointsComponentModeCommon::ParamaterNames::Position); + m_resetPostion, m_entityComponentIdPair, &PhysX::EditorJointRequests::GetVector3Value, + JointsComponentModeCommon::ParamaterNames::Position); EditorJointRequestBus::EventResult( - m_resetRotation, m_entityComponentIdPair, &PhysX::EditorJointRequests::GetVector3Value, JointsComponentModeCommon::ParamaterNames::Rotation); + m_resetRotation, m_entityComponentIdPair, &PhysX::EditorJointRequests::GetVector3Value, + JointsComponentModeCommon::ParamaterNames::Rotation); EditorJointRequestBus::EventResult( m_resetLimits, m_entityComponentIdPair, &EditorJointRequests::GetLinearValuePair, m_propertyName); @@ -57,7 +58,8 @@ namespace PhysX AZ::Transform localTransform = AZ::Transform::CreateIdentity(); EditorJointRequestBus::EventResult( - localTransform, m_entityComponentIdPair, &EditorJointRequests::GetTransformValue, JointsComponentModeCommon::ParamaterNames::Transform); + localTransform, m_entityComponentIdPair, &EditorJointRequests::GetTransformValue, + JointsComponentModeCommon::ParamaterNames::Transform); const AZ::Quaternion localRotation = localTransform.GetRotation(); // Initialize manipulators used to resize the base of the cone. @@ -105,10 +107,10 @@ namespace PhysX { AngleLimitsFloatPair m_startValues; }; - auto sharedState = AZStd::make_shared(); + auto sharedState = AZStd::make_shared(); m_yLinearManipulator->InstallLeftMouseDownCallback( - [this, sharedState](const AzToolsFramework::LinearManipulator::Action& /*action*/) mutable + [this, sharedState](const AzToolsFramework::LinearManipulator::Action& /*action*/) { AngleLimitsFloatPair currentValue; EditorJointRequestBus::EventResult( @@ -137,7 +139,7 @@ namespace PhysX }); m_zLinearManipulator->InstallLeftMouseDownCallback( - [this, sharedState](const AzToolsFramework::LinearManipulator::Action& /*action*/) mutable + [this, sharedState](const AzToolsFramework::LinearManipulator::Action& /*action*/) { AngleLimitsFloatPair currentValue; EditorJointRequestBus::EventResult( @@ -166,7 +168,7 @@ namespace PhysX }); m_yzPlanarManipulator->InstallLeftMouseDownCallback( - [this, sharedState]([[maybe_unused]]const AzToolsFramework::PlanarManipulator::Action& action) mutable + [this, sharedState]([[maybe_unused]] const AzToolsFramework::PlanarManipulator::Action& action) { AngleLimitsFloatPair currentValue; EditorJointRequestBus::EventResult( @@ -207,9 +209,8 @@ namespace PhysX { AZ::Transform m_startTM; }; - auto sharedStateXRotate = AZStd::make_shared(); - auto mouseDownCallback = [this, sharedRotationState](const AzToolsFramework::AngularManipulator::Action& action) mutable -> void + auto mouseDownCallback = [this, sharedRotationState](const AzToolsFramework::AngularManipulator::Action& action) { AZ::Quaternion normalizedStart = action.m_start.m_rotation.GetNormalized(); sharedRotationState->m_axis = AZ::Vector3(normalizedStart.GetX(), normalizedStart.GetY(), normalizedStart.GetZ()); @@ -222,8 +223,9 @@ namespace PhysX sharedRotationState->m_valuePair = currentValue; }; + auto sharedStateXRotate = AZStd::make_shared(); auto mouseDownRotateXCallback = - [this, sharedStateXRotate]([[maybe_unused]] const AzToolsFramework::AngularManipulator::Action& action) mutable -> void + [this, sharedStateXRotate]([[maybe_unused]] const AzToolsFramework::AngularManipulator::Action& action) { PhysX::EditorJointRequestBus::EventResult( sharedStateXRotate->m_startTM, m_entityComponentIdPair, &PhysX::EditorJointRequests::GetTransformValue, @@ -233,7 +235,7 @@ namespace PhysX m_xRotationManipulator->InstallLeftMouseDownCallback(mouseDownRotateXCallback); m_xRotationManipulator->InstallMouseMoveCallback( - [this, sharedStateXRotate](const AzToolsFramework::AngularManipulator::Action& action) mutable -> void + [this, sharedStateXRotate](const AzToolsFramework::AngularManipulator::Action& action) { const AZ::Quaternion manipulatorOrientation = action.m_start.m_rotation * action.m_current.m_delta; @@ -241,11 +243,11 @@ namespace PhysX newTransform = sharedStateXRotate->m_startTM * AZ::Transform::CreateFromQuaternion(action.m_current.m_delta); PhysX::EditorJointRequestBus::Event( - m_entityComponentIdPair, &PhysX::EditorJointRequests::SetVector3Value, JointsComponentModeCommon::ParamaterNames::Position, - newTransform.GetTranslation()); + m_entityComponentIdPair, &PhysX::EditorJointRequests::SetVector3Value, + JointsComponentModeCommon::ParamaterNames::Position, newTransform.GetTranslation()); PhysX::EditorJointRequestBus::Event( - m_entityComponentIdPair, &PhysX::EditorJointRequests::SetVector3Value, JointsComponentModeCommon::ParamaterNames::Rotation, - newTransform.GetRotation().GetEulerDegrees()); + m_entityComponentIdPair, &PhysX::EditorJointRequests::SetVector3Value, + JointsComponentModeCommon::ParamaterNames::Rotation, newTransform.GetRotation().GetEulerDegrees()); m_yLinearManipulator->SetLocalOrientation(manipulatorOrientation); m_zLinearManipulator->SetLocalOrientation(manipulatorOrientation); @@ -332,8 +334,7 @@ namespace PhysX { AzToolsFramework::ManipulatorViews views; views.emplace_back(CreateManipulatorViewLine( - *linearManipulator, color, axisLength, - AzToolsFramework::ManipulatorLineBoundWidth(AzFramework::InvalidViewportId))); + *linearManipulator, color, axisLength, AzToolsFramework::ManipulatorLineBoundWidth(AzFramework::InvalidViewportId))); views.emplace_back(CreateManipulatorViewCone( *linearManipulator, color, linearManipulator->GetAxis() * (axisLength - coneLength), coneLength, coneRadius)); linearManipulator->SetViews(AZStd::move(views)); @@ -345,9 +346,10 @@ namespace PhysX void JointsSubComponentModeAngleCone::ConfigurePlanarView(const AZ::Color& planeColor, const AZ::Color& plane2Color) { - const float planeSize = 0.6f; AzToolsFramework::ManipulatorViews views; - views.emplace_back(CreateManipulatorViewQuad(*m_yzPlanarManipulator, planeColor, plane2Color, planeSize)); + views.emplace_back(AzToolsFramework::CreateManipulatorViewQuad( + m_yzPlanarManipulator->GetAxis1(), m_yzPlanarManipulator->GetAxis2(), planeColor, plane2Color, AZ::Vector3::CreateZero(), + AzToolsFramework::PlanarManipulatorAxisLength())); m_yzPlanarManipulator->SetViews(AZStd::move(views)); } diff --git a/Gems/PhysX/Code/Mocks/PhysX/MockPhysXHeightfieldProviderComponent.h b/Gems/PhysX/Code/Mocks/PhysX/MockPhysXHeightfieldProviderComponent.h index 7e500881c0..d462c30158 100644 --- a/Gems/PhysX/Code/Mocks/PhysX/MockPhysXHeightfieldProviderComponent.h +++ b/Gems/PhysX/Code/Mocks/PhysX/MockPhysXHeightfieldProviderComponent.h @@ -69,6 +69,10 @@ namespace UnitTest MOCK_CONST_METHOD1(UpdateHeights, AZStd::vector(const AZ::Aabb& dirtyRegion)); MOCK_CONST_METHOD1(UpdateHeightsAndMaterials, AZStd::vector(const AZ::Aabb& dirtyRegion)); MOCK_CONST_METHOD0(GetHeightfieldAabb, AZ::Aabb()); + MOCK_CONST_METHOD0(GetHeightfieldMinHeight, float()); + MOCK_CONST_METHOD0(GetHeightfieldMaxHeight, float()); + MOCK_CONST_METHOD0(GetHeightfieldGridColumns, int32_t()); + MOCK_CONST_METHOD0(GetHeightfieldGridRows, int32_t()); }; } // namespace UnitTest diff --git a/Gems/PhysX/Code/Source/Debug/PhysXDebug.cpp b/Gems/PhysX/Code/Source/Debug/PhysXDebug.cpp index bc9265a92a..fb8e61289d 100644 --- a/Gems/PhysX/Code/Source/Debug/PhysXDebug.cpp +++ b/Gems/PhysX/Code/Source/Debug/PhysXDebug.cpp @@ -13,7 +13,7 @@ #include #include #include -#include +#include namespace PhysX { @@ -108,8 +108,7 @@ namespace PhysX AzFramework::StringFunc::Append(filename, m_config.m_pvdConfigurationData.m_fileName.c_str()); AzFramework::StringFunc::Append(filename, ".pxd2"); - AZStd::string rootDirectory; - AZ::ComponentApplicationBus::BroadcastResult(rootDirectory, &AZ::ComponentApplicationRequests::GetAppRoot); + AZStd::string rootDirectory{ AZStd::string_view(AZ::Utils::GetEnginePath()) }; // Create the full filepath. AZStd::string safeFilePath; diff --git a/Gems/PhysX/Code/Source/EditorBallJointComponent.cpp b/Gems/PhysX/Code/Source/EditorBallJointComponent.cpp index fa71fa0061..d7065a869d 100644 --- a/Gems/PhysX/Code/Source/EditorBallJointComponent.cpp +++ b/Gems/PhysX/Code/Source/EditorBallJointComponent.cpp @@ -215,7 +215,7 @@ namespace PhysX { EditorJointComponent::DisplayEntityViewport(viewportInfo, debugDisplay); - if (!m_config.m_displayJointSetup && + if (!m_config.ShowSetupDisplay() && !m_config.m_inComponentMode) { return; diff --git a/Gems/PhysX/Code/Source/EditorColliderComponent.cpp b/Gems/PhysX/Code/Source/EditorColliderComponent.cpp index 262e40cb99..7e1d1c341f 100644 --- a/Gems/PhysX/Code/Source/EditorColliderComponent.cpp +++ b/Gems/PhysX/Code/Source/EditorColliderComponent.cpp @@ -760,7 +760,7 @@ namespace PhysX if (asset == m_shapeConfiguration.m_physicsAsset.m_pxAsset) { m_shapeConfiguration.m_physicsAsset.m_pxAsset = asset; - m_shapeConfiguration.m_physicsAsset.m_configuration.m_asset = m_shapeConfiguration.m_physicsAsset.m_pxAsset; + m_shapeConfiguration.m_physicsAsset.m_configuration.m_asset = asset; UpdateMaterialSlotsFromMeshAsset(); CreateStaticEditorCollider(); @@ -785,7 +785,9 @@ namespace PhysX { const PhysX::EditorRigidBodyComponent* entityRigidbody = m_entity->FindComponent(); - if (m_shapeConfiguration.m_physicsAsset.m_pxAsset && (m_shapeConfiguration.m_shapeType == Physics::ShapeType::PhysicsAsset) && entityRigidbody) + if (entityRigidbody && + m_shapeConfiguration.m_shapeType == Physics::ShapeType::PhysicsAsset && + m_shapeConfiguration.m_physicsAsset.m_pxAsset.IsReady()) { AZStd::vector> shapes; Utils::GetShapesFromAsset(m_shapeConfiguration.m_physicsAsset.m_configuration, m_configuration, m_hasNonUniformScale, diff --git a/Gems/PhysX/Code/Source/EditorHeightfieldColliderComponent.cpp b/Gems/PhysX/Code/Source/EditorHeightfieldColliderComponent.cpp index 0f09258524..fb0a38fa18 100644 --- a/Gems/PhysX/Code/Source/EditorHeightfieldColliderComponent.cpp +++ b/Gems/PhysX/Code/Source/EditorHeightfieldColliderComponent.cpp @@ -34,8 +34,8 @@ namespace PhysX "PhysX Heightfield Collider", "Creates geometry in the PhysX simulation based on an attached heightfield component") ->ClassElement(AZ::Edit::ClassElements::EditorData, "") ->Attribute(AZ::Edit::Attributes::Category, "PhysX") - ->Attribute(AZ::Edit::Attributes::Icon, "Icons/Components/PhysXCollider.svg") - ->Attribute(AZ::Edit::Attributes::ViewportIcon, "Icons/Components/Viewport/PhysXCollider.svg") + ->Attribute(AZ::Edit::Attributes::Icon, "Editor/Icons/Components/PhysXHeightfieldCollider.svg") + ->Attribute(AZ::Edit::Attributes::ViewportIcon, "Editor/Icons/Components/Viewport/PhysXHeightfieldCollider.svg") ->Attribute(AZ::Edit::Attributes::AppearsInAddComponentMenu, AZ_CRC_CE("Game")) ->Attribute( AZ::Edit::Attributes::HelpPageURL, "https://o3de.org/docs/user-guide/components/reference/physx/heightfield-collider/") diff --git a/Gems/PhysX/Code/Source/EditorHingeJointComponent.cpp b/Gems/PhysX/Code/Source/EditorHingeJointComponent.cpp index 1b575074e2..f009c990b4 100644 --- a/Gems/PhysX/Code/Source/EditorHingeJointComponent.cpp +++ b/Gems/PhysX/Code/Source/EditorHingeJointComponent.cpp @@ -211,7 +211,7 @@ namespace PhysX { EditorJointComponent::DisplayEntityViewport(viewportInfo, debugDisplay); - if (!m_config.m_displayJointSetup && + if (!m_config.ShowSetupDisplay() && !m_config.m_inComponentMode) { return; diff --git a/Gems/PhysX/Code/Source/Joint/PhysXJointUtils.cpp b/Gems/PhysX/Code/Source/Joint/PhysXJointUtils.cpp index 3558c9fb56..975fec2181 100644 --- a/Gems/PhysX/Code/Source/Joint/PhysXJointUtils.cpp +++ b/Gems/PhysX/Code/Source/Joint/PhysXJointUtils.cpp @@ -18,454 +18,466 @@ #include #include -namespace PhysX { - namespace Utils +namespace PhysX::Utils +{ + struct PxJointActorData { - struct PxJointActorData + static PxJointActorData InvalidPxJointActorData; + + physx::PxRigidActor* parentActor = nullptr; + physx::PxRigidActor* childActor = nullptr; + }; + PxJointActorData PxJointActorData::InvalidPxJointActorData; + + PxJointActorData GetJointPxActors( + AzPhysics::SceneHandle sceneHandle, + AzPhysics::SimulatedBodyHandle parentBodyHandle, + AzPhysics::SimulatedBodyHandle childBodyHandle) + { + auto* parentBody = GetSimulatedBodyFromHandle(sceneHandle, parentBodyHandle); + auto* childBody = GetSimulatedBodyFromHandle(sceneHandle, childBodyHandle); + + if (!IsAtLeastOneDynamic(parentBody, childBody)) { - static PxJointActorData InvalidPxJointActorData; + AZ_Warning("PhysX Joint", false, "CreateJoint failed - at least one body must be dynamic."); + return PxJointActorData::InvalidPxJointActorData; + } - physx::PxRigidActor* parentActor = nullptr; - physx::PxRigidActor* childActor = nullptr; + physx::PxRigidActor* parentActor = GetPxRigidActor(sceneHandle, parentBodyHandle); + physx::PxRigidActor* childActor = GetPxRigidActor(sceneHandle, childBodyHandle); + + if (!parentActor && !childActor) + { + AZ_Warning("PhysX Joint", false, "CreateJoint failed - at least one body must be a PxRigidActor."); + return PxJointActorData::InvalidPxJointActorData; + } + + return PxJointActorData{ + parentActor, + childActor }; - PxJointActorData PxJointActorData::InvalidPxJointActorData; + } - PxJointActorData GetJointPxActors( + bool IsAtLeastOneDynamic(AzPhysics::SimulatedBody* body0, + AzPhysics::SimulatedBody* body1) + { + for (const AzPhysics::SimulatedBody* body : { body0, body1 }) + { + if (body) + { + if (body->GetNativeType() == NativeTypeIdentifiers::RigidBody || + body->GetNativeType() == NativeTypeIdentifiers::ArticulationLink) + { + return true; + } + } + } + return false; + } + + physx::PxRigidActor* GetPxRigidActor(AzPhysics::SceneHandle sceneHandle, AzPhysics::SimulatedBodyHandle worldBodyHandle) + { + auto* worldBody = GetSimulatedBodyFromHandle(sceneHandle, worldBodyHandle); + if (worldBody != nullptr + && static_cast(worldBody->GetNativePointer())->is()) + { + return static_cast(worldBody->GetNativePointer()); + } + + return nullptr; + } + + void ReleasePxJoint(physx::PxJoint* joint) + { + PHYSX_SCENE_WRITE_LOCK(joint->getScene()); + joint->userData = nullptr; + joint->release(); + } + + AzPhysics::SimulatedBody* GetSimulatedBodyFromHandle(AzPhysics::SceneHandle sceneHandle, + AzPhysics::SimulatedBodyHandle bodyHandle) + { + if (auto* sceneInterface = AZ::Interface::Get()) + { + return sceneInterface->GetSimulatedBodyFromHandle(sceneHandle, bodyHandle); + } + return nullptr; + } + + void InitializeGenericProperties(const JointGenericProperties& properties, physx::PxJoint* nativeJoint) + { + if (!nativeJoint) + { + return; + } + PHYSX_SCENE_WRITE_LOCK(nativeJoint->getScene()); + nativeJoint->setConstraintFlag( + physx::PxConstraintFlag::eCOLLISION_ENABLED, + properties.IsFlagSet(JointGenericProperties::GenericJointFlag::SelfCollide)); + + if (properties.IsFlagSet(JointGenericProperties::GenericJointFlag::Breakable)) + { + nativeJoint->setBreakForce(properties.m_forceMax, properties.m_torqueMax); + } + } + + void InitializeSphericalLimitProperties(const JointLimitProperties& properties, physx::PxSphericalJoint* nativeJoint) + { + if (!nativeJoint) + { + return; + } + + if (!properties.m_isLimited) + { + nativeJoint->setSphericalJointFlag(physx::PxSphericalJointFlag::eLIMIT_ENABLED, false); + return; + } + + // Hard limit uses a tolerance value (distance to limit at which limit becomes active). + // Soft limit allows angle to exceed limit but springs back with configurable spring stiffness and damping. + physx::PxJointLimitCone swingLimit( + AZ::DegToRad(properties.m_limitFirst), + AZ::DegToRad(properties.m_limitSecond), + properties.m_tolerance); + + if (properties.m_isSoftLimit) + { + swingLimit.stiffness = properties.m_stiffness; + swingLimit.damping = properties.m_damping; + } + + nativeJoint->setLimitCone(swingLimit); + nativeJoint->setSphericalJointFlag(physx::PxSphericalJointFlag::eLIMIT_ENABLED, true); + } + + void InitializeRevoluteLimitProperties(const JointLimitProperties& properties, physx::PxRevoluteJoint* nativeJoint) + { + if (!nativeJoint) + { + return; + } + + if (!properties.m_isLimited) + { + nativeJoint->setRevoluteJointFlag(physx::PxRevoluteJointFlag::eLIMIT_ENABLED, false); + return; + } + + physx::PxJointAngularLimitPair limitPair( + AZ::DegToRad(properties.m_limitSecond), + AZ::DegToRad(properties.m_limitFirst), + properties.m_tolerance); + + if (properties.m_isSoftLimit) + { + limitPair.stiffness = properties.m_stiffness; + limitPair.damping = properties.m_damping; + } + + nativeJoint->setLimit(limitPair); + nativeJoint->setRevoluteJointFlag(physx::PxRevoluteJointFlag::eLIMIT_ENABLED, true); + } + + namespace PxJointFactories + { + PxJointUniquePtr CreatePxD6Joint( + const PhysX::D6JointLimitConfiguration& configuration, AzPhysics::SceneHandle sceneHandle, AzPhysics::SimulatedBodyHandle parentBodyHandle, AzPhysics::SimulatedBodyHandle childBodyHandle) { - auto* parentBody = GetSimulatedBodyFromHandle(sceneHandle, parentBodyHandle); - auto* childBody = GetSimulatedBodyFromHandle(sceneHandle, childBodyHandle); + PxJointActorData actorData = GetJointPxActors(sceneHandle, parentBodyHandle, childBodyHandle); - if (!IsAtLeastOneDynamic(parentBody, childBody)) - { - AZ_Warning("PhysX Joint", false, "CreateJoint failed - at least one body must be dynamic."); - return PxJointActorData::InvalidPxJointActorData; - } - - physx::PxRigidActor* parentActor = GetPxRigidActor(sceneHandle, parentBodyHandle); - physx::PxRigidActor* childActor = GetPxRigidActor(sceneHandle, childBodyHandle); - - if (!parentActor && !childActor) + if (actorData.parentActor == nullptr && actorData.childActor == nullptr) { AZ_Warning("PhysX Joint", false, "CreateJoint failed - at least one body must be a PxRigidActor."); - return PxJointActorData::InvalidPxJointActorData; + return nullptr; } - return PxJointActorData{ - parentActor, - childActor - }; + const physx::PxTransform parentWorldTransform = + actorData.parentActor ? actorData.parentActor->getGlobalPose() : physx::PxTransform(physx::PxIdentity); + const physx::PxTransform childWorldTransform = + actorData.childActor ? actorData.childActor->getGlobalPose() : physx::PxTransform(physx::PxIdentity); + const physx::PxVec3 childOffset = childWorldTransform.p - parentWorldTransform.p; + physx::PxTransform parentLocalTransform(PxMathConvert(configuration.m_parentLocalRotation).getNormalized()); + const physx::PxTransform childLocalTransform(PxMathConvert(configuration.m_childLocalRotation).getNormalized()); + parentLocalTransform.p = parentWorldTransform.q.rotateInv(childOffset); + + physx::PxD6Joint* joint = PxD6JointCreate(PxGetPhysics(), + actorData.parentActor, parentLocalTransform, actorData.childActor, childLocalTransform); + + joint->setMotion(physx::PxD6Axis::eTWIST, physx::PxD6Motion::eLIMITED); + joint->setMotion(physx::PxD6Axis::eSWING1, physx::PxD6Motion::eLIMITED); + joint->setMotion(physx::PxD6Axis::eSWING2, physx::PxD6Motion::eLIMITED); + + AZ_Warning("PhysX Joint", + configuration.m_swingLimitY >= JointConstants::MinSwingLimitDegrees && configuration.m_swingLimitZ >= JointConstants::MinSwingLimitDegrees, + "Very small swing limit requested for joint between \"%s\" and \"%s\", increasing to %f degrees to improve stability", + actorData.parentActor ? actorData.parentActor->getName() : "world", + actorData.childActor ? actorData.childActor->getName() : "world", + JointConstants::MinSwingLimitDegrees); + + const float swingLimitY = AZ::DegToRad(AZ::GetMax(JointConstants::MinSwingLimitDegrees, configuration.m_swingLimitY)); + const float swingLimitZ = AZ::DegToRad(AZ::GetMax(JointConstants::MinSwingLimitDegrees, configuration.m_swingLimitZ)); + physx::PxJointLimitCone limitCone(swingLimitY, swingLimitZ); + joint->setSwingLimit(limitCone); + + float twistLower = AZ::DegToRad(AZStd::GetMin(configuration.m_twistLimitLower, configuration.m_twistLimitUpper)); + float twistUpper = AZ::DegToRad(AZStd::GetMax(configuration.m_twistLimitLower, configuration.m_twistLimitUpper)); + // make sure there is at least a small difference between the lower and upper limits to avoid problems in PhysX + const float minTwistLimitRangeRadians = AZ::DegToRad(JointConstants::MinTwistLimitRangeDegrees); + if (const float twistLimitRange = twistUpper - twistLower; + twistLimitRange < minTwistLimitRangeRadians) + { + if (twistUpper > 0.0f) + { + twistLower -= (minTwistLimitRangeRadians - twistLimitRange); + } + else + { + twistUpper += (minTwistLimitRangeRadians - twistLimitRange); + } + } + physx::PxJointAngularLimitPair twistLimitPair(twistLower, twistUpper); + joint->setTwistLimit(twistLimitPair); + + return Utils::PxJointUniquePtr(joint, ReleasePxJoint); } - bool IsAtLeastOneDynamic(AzPhysics::SimulatedBody* body0, - AzPhysics::SimulatedBody* body1) + PxJointUniquePtr CreatePxFixedJoint( + const PhysX::FixedJointConfiguration& configuration, + AzPhysics::SceneHandle sceneHandle, + AzPhysics::SimulatedBodyHandle parentBodyHandle, + AzPhysics::SimulatedBodyHandle childBodyHandle) { - for (const AzPhysics::SimulatedBody* body : { body0, body1 }) + PxJointActorData actorData = GetJointPxActors(sceneHandle, parentBodyHandle, childBodyHandle); + + //only check the child actor, as a null parent actor means this joint is a global constraint. + if (!actorData.childActor) { - if (body) + return nullptr; + } + + physx::PxFixedJoint* joint; + const AZ::Transform parentLocalTM = AZ::Transform::CreateFromQuaternionAndTranslation( + configuration.m_parentLocalRotation, configuration.m_parentLocalPosition); + const AZ::Transform childLocalTM = AZ::Transform::CreateFromQuaternionAndTranslation( + configuration.m_childLocalRotation, configuration.m_childLocalPosition); + + { + PHYSX_SCENE_READ_LOCK(actorData.childActor->getScene()); + joint = physx::PxFixedJointCreate( + PxGetPhysics(), + actorData.parentActor, PxMathConvert(parentLocalTM), + actorData.childActor, PxMathConvert(childLocalTM)); + } + + InitializeGenericProperties( + configuration.m_genericProperties, + static_cast(joint)); + + return Utils::PxJointUniquePtr(joint, ReleasePxJoint); + } + + PxJointUniquePtr CreatePxBallJoint( + const PhysX::BallJointConfiguration& configuration, + AzPhysics::SceneHandle sceneHandle, + AzPhysics::SimulatedBodyHandle parentBodyHandle, + AzPhysics::SimulatedBodyHandle childBodyHandle) + { + PxJointActorData actorData = GetJointPxActors(sceneHandle, parentBodyHandle, childBodyHandle); + + // only check the child actor, as a null parent actor means this joint is a global constraint. + if (!actorData.childActor) + { + return nullptr; + } + + physx::PxSphericalJoint* joint; + const AZ::Transform parentLocalTM = AZ::Transform::CreateFromQuaternionAndTranslation( + configuration.m_parentLocalRotation, configuration.m_parentLocalPosition); + const AZ::Transform childLocalTM = AZ::Transform::CreateFromQuaternionAndTranslation( + configuration.m_childLocalRotation, configuration.m_childLocalPosition); + + { + PHYSX_SCENE_READ_LOCK(actorData.childActor->getScene()); + joint = physx::PxSphericalJointCreate(PxGetPhysics(), + actorData.parentActor, PxMathConvert(parentLocalTM), + actorData.childActor, PxMathConvert(childLocalTM)); + } + + InitializeSphericalLimitProperties(configuration.m_limitProperties, joint); + InitializeGenericProperties( + configuration.m_genericProperties, + static_cast(joint)); + + return Utils::PxJointUniquePtr(joint, ReleasePxJoint); + } + + PxJointUniquePtr CreatePxHingeJoint( + const PhysX::HingeJointConfiguration& configuration, + AzPhysics::SceneHandle sceneHandle, + AzPhysics::SimulatedBodyHandle parentBodyHandle, + AzPhysics::SimulatedBodyHandle childBodyHandle) + { + PxJointActorData actorData = GetJointPxActors(sceneHandle, parentBodyHandle, childBodyHandle); + + // only check the child actor, as a null parent actor means this joint is a global constraint. + if (!actorData.childActor) + { + return nullptr; + } + + physx::PxRevoluteJoint* joint; + const AZ::Transform parentLocalTM = AZ::Transform::CreateFromQuaternionAndTranslation( + configuration.m_parentLocalRotation, configuration.m_parentLocalPosition); + const AZ::Transform childLocalTM = AZ::Transform::CreateFromQuaternionAndTranslation( + configuration.m_childLocalRotation, configuration.m_childLocalPosition); + + { + PHYSX_SCENE_READ_LOCK(actorData.childActor->getScene()); + joint = physx::PxRevoluteJointCreate(PxGetPhysics(), + actorData.parentActor, PxMathConvert(parentLocalTM), + actorData.childActor, PxMathConvert(childLocalTM)); + } + + InitializeRevoluteLimitProperties(configuration.m_limitProperties, joint); + InitializeGenericProperties( + configuration.m_genericProperties, + static_cast(joint)); + + return Utils::PxJointUniquePtr(joint, ReleasePxJoint); + } + } // namespace PxJointFactories + + namespace Joints + { + bool IsD6SwingValid(float swingAngleY, float swingAngleZ, float swingLimitY, float swingLimitZ) + { + const float epsilon = AZ::Constants::FloatEpsilon; + const float yFactor = AZStd::tan(0.25f * swingAngleY) / AZStd::GetMax(epsilon, AZStd::tan(0.25f * swingLimitY)); + const float zFactor = AZStd::tan(0.25f * swingAngleZ) / AZStd::GetMax(epsilon, AZStd::tan(0.25f * swingLimitZ)); + + return (yFactor * yFactor + zFactor * zFactor <= 1.0f + epsilon); + } + + void AppendD6SwingConeToLineBuffer( + const AZ::Quaternion& parentLocalRotation, + float swingAngleY, + float swingAngleZ, + float swingLimitY, + float swingLimitZ, + float scale, + AZ::u32 angularSubdivisions, + AZ::u32 radialSubdivisions, + AZStd::vector& lineBufferOut, + AZStd::vector& lineValidityBufferOut) + { + const AZ::u32 numLinesSwingCone = angularSubdivisions * (1u + radialSubdivisions); + lineBufferOut.reserve(lineBufferOut.size() + 2u * numLinesSwingCone); + lineValidityBufferOut.reserve(lineValidityBufferOut.size() + numLinesSwingCone); + + // the orientation quat for a radial line in the cone can be represented in terms of sin and cos half angles + // these expressions can be efficiently calculated using tan quarter angles as follows: + // writing t = tan(x / 4) + // sin(x / 2) = 2 * t / (1 + t * t) + // cos(x / 2) = (1 - t * t) / (1 + t * t) + const float tanQuarterSwingZ = AZStd::tan(0.25f * swingLimitZ); + const float tanQuarterSwingY = AZStd::tan(0.25f * swingLimitY); + + AZ::Vector3 previousRadialVector = AZ::Vector3::CreateZero(); + for (AZ::u32 angularIndex = 0; angularIndex <= angularSubdivisions; angularIndex++) + { + const float angle = AZ::Constants::TwoPi / angularSubdivisions * angularIndex; + // the axis about which to rotate the x-axis to get the radial vector for this segment of the cone + const AZ::Vector3 rotationAxis(0, -tanQuarterSwingY * sinf(angle), tanQuarterSwingZ * cosf(angle)); + const float normalizationFactor = rotationAxis.GetLengthSq(); + const AZ::Quaternion radialVectorRotation = 1.0f / (1.0f + normalizationFactor) * + AZ::Quaternion::CreateFromVector3AndValue(2.0f * rotationAxis, 1.0f - normalizationFactor); + const AZ::Vector3 radialVector = + (parentLocalRotation * radialVectorRotation).TransformVector(AZ::Vector3::CreateAxisX(scale)); + + if (angularIndex > 0) { - if (body->GetNativeType() == NativeTypeIdentifiers::RigidBody || - body->GetNativeType() == NativeTypeIdentifiers::ArticulationLink) + for (AZ::u32 radialIndex = 1; radialIndex <= radialSubdivisions; radialIndex++) { - return true; + float radiusFraction = 1.0f / radialSubdivisions * radialIndex; + lineBufferOut.push_back(radiusFraction * radialVector); + lineBufferOut.push_back(radiusFraction * previousRadialVector); } } - } - return false; - } - - physx::PxRigidActor* GetPxRigidActor(AzPhysics::SceneHandle sceneHandle, AzPhysics::SimulatedBodyHandle worldBodyHandle) - { - auto* worldBody = GetSimulatedBodyFromHandle(sceneHandle, worldBodyHandle); - if (worldBody != nullptr - && static_cast(worldBody->GetNativePointer())->is()) - { - return static_cast(worldBody->GetNativePointer()); - } - return nullptr; - } - - void ReleasePxJoint(physx::PxJoint* joint) - { - PHYSX_SCENE_WRITE_LOCK(joint->getScene()); - joint->userData = nullptr; - joint->release(); - } - - AzPhysics::SimulatedBody* GetSimulatedBodyFromHandle(AzPhysics::SceneHandle sceneHandle, - AzPhysics::SimulatedBodyHandle bodyHandle) - { - if (auto* sceneInterface = AZ::Interface::Get()) - { - return sceneInterface->GetSimulatedBodyFromHandle(sceneHandle, bodyHandle); - } - return nullptr; - } - - void InitializeGenericProperties(const JointGenericProperties& properties, physx::PxJoint* nativeJoint) - { - if (!nativeJoint) - { - return; - } - PHYSX_SCENE_WRITE_LOCK(nativeJoint->getScene()); - nativeJoint->setConstraintFlag( - physx::PxConstraintFlag::eCOLLISION_ENABLED, - properties.IsFlagSet(JointGenericProperties::GenericJointFlag::SelfCollide)); - - if (properties.IsFlagSet(JointGenericProperties::GenericJointFlag::Breakable)) - { - nativeJoint->setBreakForce(properties.m_forceMax, properties.m_torqueMax); - } - } - - void InitializeSphericalLimitProperties(const JointLimitProperties& properties, physx::PxSphericalJoint* nativeJoint) - { - if (!nativeJoint) - { - return; - } - - if (!properties.m_isLimited) - { - nativeJoint->setSphericalJointFlag(physx::PxSphericalJointFlag::eLIMIT_ENABLED, false); - return; - } - - // Hard limit uses a tolerance value (distance to limit at which limit becomes active). - // Soft limit allows angle to exceed limit but springs back with configurable spring stiffness and damping. - physx::PxJointLimitCone swingLimit( - AZ::DegToRad(properties.m_limitFirst), - AZ::DegToRad(properties.m_limitSecond), - properties.m_tolerance); - - if (properties.m_isSoftLimit) - { - swingLimit.stiffness = properties.m_stiffness; - swingLimit.damping = properties.m_damping; - } - - nativeJoint->setLimitCone(swingLimit); - nativeJoint->setSphericalJointFlag(physx::PxSphericalJointFlag::eLIMIT_ENABLED, true); - } - - void InitializeRevoluteLimitProperties(const JointLimitProperties& properties, physx::PxRevoluteJoint* nativeJoint) - { - if (!nativeJoint) - { - return; - } - - if (!properties.m_isLimited) - { - nativeJoint->setRevoluteJointFlag(physx::PxRevoluteJointFlag::eLIMIT_ENABLED, false); - return; - } - - physx::PxJointAngularLimitPair limitPair( - AZ::DegToRad(properties.m_limitSecond), - AZ::DegToRad(properties.m_limitFirst), - properties.m_tolerance); - - if (properties.m_isSoftLimit) - { - limitPair.stiffness = properties.m_stiffness; - limitPair.damping = properties.m_damping; - } - - nativeJoint->setLimit(limitPair); - nativeJoint->setRevoluteJointFlag(physx::PxRevoluteJointFlag::eLIMIT_ENABLED, true); - } - - namespace PxJointFactories - { - PxJointUniquePtr CreatePxD6Joint( - const PhysX::D6JointLimitConfiguration& configuration, - AzPhysics::SceneHandle sceneHandle, - AzPhysics::SimulatedBodyHandle parentBodyHandle, - AzPhysics::SimulatedBodyHandle childBodyHandle) - { - PxJointActorData actorData = GetJointPxActors(sceneHandle, parentBodyHandle, childBodyHandle); - - if (actorData.parentActor == nullptr && actorData.childActor == nullptr) + if (angularIndex < angularSubdivisions) { - AZ_Warning("PhysX Joint", false, "CreateJoint failed - at least one body must be a PxRigidActor."); - return nullptr; - } - - const physx::PxTransform parentWorldTransform = - actorData.parentActor ? actorData.parentActor->getGlobalPose() : physx::PxTransform(physx::PxIdentity); - const physx::PxTransform childWorldTransform = - actorData.childActor ? actorData.childActor->getGlobalPose() : physx::PxTransform(physx::PxIdentity); - const physx::PxVec3 childOffset = childWorldTransform.p - parentWorldTransform.p; - physx::PxTransform parentLocalTransform(PxMathConvert(configuration.m_parentLocalRotation).getNormalized()); - const physx::PxTransform childLocalTransform(PxMathConvert(configuration.m_childLocalRotation).getNormalized()); - parentLocalTransform.p = parentWorldTransform.q.rotateInv(childOffset); - - physx::PxD6Joint* joint = PxD6JointCreate(PxGetPhysics(), - actorData.parentActor, parentLocalTransform, actorData.childActor, childLocalTransform); - - joint->setMotion(physx::PxD6Axis::eTWIST, physx::PxD6Motion::eLIMITED); - joint->setMotion(physx::PxD6Axis::eSWING1, physx::PxD6Motion::eLIMITED); - joint->setMotion(physx::PxD6Axis::eSWING2, physx::PxD6Motion::eLIMITED); - - AZ_Warning("PhysX Joint", - configuration.m_swingLimitY >= JointConstants::MinSwingLimitDegrees && configuration.m_swingLimitZ >= JointConstants::MinSwingLimitDegrees, - "Very small swing limit requested for joint between \"%s\" and \"%s\", increasing to %f degrees to improve stability", - actorData.parentActor ? actorData.parentActor->getName() : "world", - actorData.childActor ? actorData.childActor->getName() : "world", - JointConstants::MinSwingLimitDegrees); - - const float swingLimitY = AZ::DegToRad(AZ::GetMax(JointConstants::MinSwingLimitDegrees, configuration.m_swingLimitY)); - const float swingLimitZ = AZ::DegToRad(AZ::GetMax(JointConstants::MinSwingLimitDegrees, configuration.m_swingLimitZ)); - physx::PxJointLimitCone limitCone(swingLimitY, swingLimitZ); - joint->setSwingLimit(limitCone); - - const float twistLower = AZ::DegToRad(AZStd::GetMin(configuration.m_twistLimitLower, configuration.m_twistLimitUpper)); - const float twistUpper = AZ::DegToRad(AZStd::GetMax(configuration.m_twistLimitLower, configuration.m_twistLimitUpper)); - physx::PxJointAngularLimitPair twistLimitPair(twistLower, twistUpper); - joint->setTwistLimit(twistLimitPair); - - return Utils::PxJointUniquePtr(joint, ReleasePxJoint); - } - - PxJointUniquePtr CreatePxFixedJoint( - const PhysX::FixedJointConfiguration& configuration, - AzPhysics::SceneHandle sceneHandle, - AzPhysics::SimulatedBodyHandle parentBodyHandle, - AzPhysics::SimulatedBodyHandle childBodyHandle) - { - PxJointActorData actorData = GetJointPxActors(sceneHandle, parentBodyHandle, childBodyHandle); - - //only check the child actor, as a null parent actor means this joint is a global constraint. - if (!actorData.childActor) - { - return nullptr; - } - - physx::PxFixedJoint* joint; - const AZ::Transform parentLocalTM = AZ::Transform::CreateFromQuaternionAndTranslation( - configuration.m_parentLocalRotation, configuration.m_parentLocalPosition); - const AZ::Transform childLocalTM = AZ::Transform::CreateFromQuaternionAndTranslation( - configuration.m_childLocalRotation, configuration.m_childLocalPosition); - - { - PHYSX_SCENE_READ_LOCK(actorData.childActor->getScene()); - joint = physx::PxFixedJointCreate( - PxGetPhysics(), - actorData.parentActor, PxMathConvert(parentLocalTM), - actorData.childActor, PxMathConvert(childLocalTM)); - } - - InitializeGenericProperties( - configuration.m_genericProperties, - static_cast(joint)); - - return Utils::PxJointUniquePtr(joint, ReleasePxJoint); - } - - PxJointUniquePtr CreatePxBallJoint( - const PhysX::BallJointConfiguration& configuration, - AzPhysics::SceneHandle sceneHandle, - AzPhysics::SimulatedBodyHandle parentBodyHandle, - AzPhysics::SimulatedBodyHandle childBodyHandle) - { - PxJointActorData actorData = GetJointPxActors(sceneHandle, parentBodyHandle, childBodyHandle); - - // only check the child actor, as a null parent actor means this joint is a global constraint. - if (!actorData.childActor) - { - return nullptr; - } - - physx::PxSphericalJoint* joint; - const AZ::Transform parentLocalTM = AZ::Transform::CreateFromQuaternionAndTranslation( - configuration.m_parentLocalRotation, configuration.m_parentLocalPosition); - const AZ::Transform childLocalTM = AZ::Transform::CreateFromQuaternionAndTranslation( - configuration.m_childLocalRotation, configuration.m_childLocalPosition); - - { - PHYSX_SCENE_READ_LOCK(actorData.childActor->getScene()); - joint = physx::PxSphericalJointCreate(PxGetPhysics(), - actorData.parentActor, PxMathConvert(parentLocalTM), - actorData.childActor, PxMathConvert(childLocalTM)); - } - - InitializeSphericalLimitProperties(configuration.m_limitProperties, joint); - InitializeGenericProperties( - configuration.m_genericProperties, - static_cast(joint)); - - return Utils::PxJointUniquePtr(joint, ReleasePxJoint); - } - - PxJointUniquePtr CreatePxHingeJoint( - const PhysX::HingeJointConfiguration& configuration, - AzPhysics::SceneHandle sceneHandle, - AzPhysics::SimulatedBodyHandle parentBodyHandle, - AzPhysics::SimulatedBodyHandle childBodyHandle) - { - PxJointActorData actorData = GetJointPxActors(sceneHandle, parentBodyHandle, childBodyHandle); - - // only check the child actor, as a null parent actor means this joint is a global constraint. - if (!actorData.childActor) - { - return nullptr; - } - - physx::PxRevoluteJoint* joint; - const AZ::Transform parentLocalTM = AZ::Transform::CreateFromQuaternionAndTranslation( - configuration.m_parentLocalRotation, configuration.m_parentLocalPosition); - const AZ::Transform childLocalTM = AZ::Transform::CreateFromQuaternionAndTranslation( - configuration.m_childLocalRotation, configuration.m_childLocalPosition); - - { - PHYSX_SCENE_READ_LOCK(actorData.childActor->getScene()); - joint = physx::PxRevoluteJointCreate(PxGetPhysics(), - actorData.parentActor, PxMathConvert(parentLocalTM), - actorData.childActor, PxMathConvert(childLocalTM)); - } - - InitializeRevoluteLimitProperties(configuration.m_limitProperties, joint); - InitializeGenericProperties( - configuration.m_genericProperties, - static_cast(joint)); - - return Utils::PxJointUniquePtr(joint, ReleasePxJoint); - } - } // namespace PxJointFactories - - namespace Joints - { - bool IsD6SwingValid(float swingAngleY, float swingAngleZ, float swingLimitY, float swingLimitZ) - { - const float epsilon = AZ::Constants::FloatEpsilon; - const float yFactor = AZStd::tan(0.25f * swingAngleY) / AZStd::GetMax(epsilon, AZStd::tan(0.25f * swingLimitY)); - const float zFactor = AZStd::tan(0.25f * swingAngleZ) / AZStd::GetMax(epsilon, AZStd::tan(0.25f * swingLimitZ)); - - return (yFactor * yFactor + zFactor * zFactor <= 1.0f + epsilon); - } - - void AppendD6SwingConeToLineBuffer( - const AZ::Quaternion& parentLocalRotation, - float swingAngleY, - float swingAngleZ, - float swingLimitY, - float swingLimitZ, - float scale, - AZ::u32 angularSubdivisions, - AZ::u32 radialSubdivisions, - AZStd::vector& lineBufferOut, - AZStd::vector& lineValidityBufferOut) - { - const AZ::u32 numLinesSwingCone = angularSubdivisions * (1u + radialSubdivisions); - lineBufferOut.reserve(lineBufferOut.size() + 2u * numLinesSwingCone); - lineValidityBufferOut.reserve(lineValidityBufferOut.size() + numLinesSwingCone); - - // the orientation quat for a radial line in the cone can be represented in terms of sin and cos half angles - // these expressions can be efficiently calculated using tan quarter angles as follows: - // writing t = tan(x / 4) - // sin(x / 2) = 2 * t / (1 + t * t) - // cos(x / 2) = (1 - t * t) / (1 + t * t) - const float tanQuarterSwingZ = AZStd::tan(0.25f * swingLimitZ); - const float tanQuarterSwingY = AZStd::tan(0.25f * swingLimitY); - - AZ::Vector3 previousRadialVector = AZ::Vector3::CreateZero(); - for (AZ::u32 angularIndex = 0; angularIndex <= angularSubdivisions; angularIndex++) - { - const float angle = AZ::Constants::TwoPi / angularSubdivisions * angularIndex; - // the axis about which to rotate the x-axis to get the radial vector for this segment of the cone - const AZ::Vector3 rotationAxis(0, -tanQuarterSwingY * sinf(angle), tanQuarterSwingZ * cosf(angle)); - const float normalizationFactor = rotationAxis.GetLengthSq(); - const AZ::Quaternion radialVectorRotation = 1.0f / (1.0f + normalizationFactor) * - AZ::Quaternion::CreateFromVector3AndValue(2.0f * rotationAxis, 1.0f - normalizationFactor); - const AZ::Vector3 radialVector = - (parentLocalRotation * radialVectorRotation).TransformVector(AZ::Vector3::CreateAxisX(scale)); - - if (angularIndex > 0) - { - for (AZ::u32 radialIndex = 1; radialIndex <= radialSubdivisions; radialIndex++) - { - float radiusFraction = 1.0f / radialSubdivisions * radialIndex; - lineBufferOut.push_back(radiusFraction * radialVector); - lineBufferOut.push_back(radiusFraction * previousRadialVector); - } - } - - if (angularIndex < angularSubdivisions) - { - lineBufferOut.push_back(AZ::Vector3::CreateZero()); - lineBufferOut.push_back(radialVector); - } - - previousRadialVector = radialVector; - } - - const bool swingValid = IsD6SwingValid(swingAngleY, swingAngleZ, swingLimitY, swingLimitZ); - lineValidityBufferOut.insert(lineValidityBufferOut.end(), numLinesSwingCone, swingValid); - } - - void AppendD6TwistArcToLineBuffer( - const AZ::Quaternion& parentLocalRotation, - float twistAngle, - float twistLimitLower, - float twistLimitUpper, - float scale, - AZ::u32 angularSubdivisions, - AZ::u32 radialSubdivisions, - AZStd::vector& lineBufferOut, - AZStd::vector& lineValidityBufferOut) - { - const AZ::u32 numLinesTwistArc = angularSubdivisions * (1u + radialSubdivisions) + 1u; - lineBufferOut.reserve(lineBufferOut.size() + 2u * numLinesTwistArc); - - AZ::Vector3 previousRadialVector = AZ::Vector3::CreateZero(); - const float twistRange = twistLimitUpper - twistLimitLower; - - for (AZ::u32 angularIndex = 0; angularIndex <= angularSubdivisions; angularIndex++) - { - const float angle = twistLimitLower + twistRange / angularSubdivisions * angularIndex; - const AZ::Vector3 radialVector = - parentLocalRotation.TransformVector(scale * AZ::Vector3(0.0f, cosf(angle), sinf(angle))); - - if (angularIndex > 0) - { - for (AZ::u32 radialIndex = 1; radialIndex <= radialSubdivisions; radialIndex++) - { - const float radiusFraction = 1.0f / radialSubdivisions * radialIndex; - lineBufferOut.push_back(radiusFraction * radialVector); - lineBufferOut.push_back(radiusFraction * previousRadialVector); - } - } - lineBufferOut.push_back(AZ::Vector3::CreateZero()); lineBufferOut.push_back(radialVector); - - previousRadialVector = radialVector; } - const bool twistValid = (twistAngle >= twistLimitLower && twistAngle <= twistLimitUpper); - lineValidityBufferOut.insert(lineValidityBufferOut.end(), numLinesTwistArc, twistValid); + previousRadialVector = radialVector; } - void AppendD6CurrentTwistToLineBuffer( - const AZ::Quaternion& parentLocalRotation, - float twistAngle, - [[maybe_unused]] float twistLimitLower, - [[maybe_unused]] float twistLimitUpper, - float scale, - AZStd::vector& lineBufferOut, - AZStd::vector& lineValidityBufferOut) + const bool swingValid = IsD6SwingValid(swingAngleY, swingAngleZ, swingLimitY, swingLimitZ); + lineValidityBufferOut.insert(lineValidityBufferOut.end(), numLinesSwingCone, swingValid); + } + + void AppendD6TwistArcToLineBuffer( + const AZ::Quaternion& parentLocalRotation, + float twistAngle, + float twistLimitLower, + float twistLimitUpper, + float scale, + AZ::u32 angularSubdivisions, + AZ::u32 radialSubdivisions, + AZStd::vector& lineBufferOut, + AZStd::vector& lineValidityBufferOut) + { + const AZ::u32 numLinesTwistArc = angularSubdivisions * (1u + radialSubdivisions) + 1u; + lineBufferOut.reserve(lineBufferOut.size() + 2u * numLinesTwistArc); + + AZ::Vector3 previousRadialVector = AZ::Vector3::CreateZero(); + const float twistRange = twistLimitUpper - twistLimitLower; + + for (AZ::u32 angularIndex = 0; angularIndex <= angularSubdivisions; angularIndex++) { - const AZ::Vector3 twistVector = - parentLocalRotation.TransformVector(1.25f * scale * AZ::Vector3(0.0f, cosf(twistAngle), sinf(twistAngle))); + const float angle = twistLimitLower + twistRange / angularSubdivisions * angularIndex; + const AZ::Vector3 radialVector = + parentLocalRotation.TransformVector(scale * AZ::Vector3(0.0f, cosf(angle), sinf(angle))); + + if (angularIndex > 0) + { + for (AZ::u32 radialIndex = 1; radialIndex <= radialSubdivisions; radialIndex++) + { + const float radiusFraction = 1.0f / radialSubdivisions * radialIndex; + lineBufferOut.push_back(radiusFraction * radialVector); + lineBufferOut.push_back(radiusFraction * previousRadialVector); + } + } + lineBufferOut.push_back(AZ::Vector3::CreateZero()); - lineBufferOut.push_back(twistVector); - lineValidityBufferOut.push_back(true); + lineBufferOut.push_back(radialVector); + + previousRadialVector = radialVector; } - } // namespace Joints - } // namespace Utils -} // namespace PhysX + + const bool twistValid = (twistAngle >= twistLimitLower && twistAngle <= twistLimitUpper); + lineValidityBufferOut.insert(lineValidityBufferOut.end(), numLinesTwistArc, twistValid); + } + + void AppendD6CurrentTwistToLineBuffer( + const AZ::Quaternion& parentLocalRotation, + float twistAngle, + [[maybe_unused]] float twistLimitLower, + [[maybe_unused]] float twistLimitUpper, + float scale, + AZStd::vector& lineBufferOut, + AZStd::vector& lineValidityBufferOut) + { + const AZ::Vector3 twistVector = + parentLocalRotation.TransformVector(1.25f * scale * AZ::Vector3(0.0f, cosf(twistAngle), sinf(twistAngle))); + lineBufferOut.push_back(AZ::Vector3::CreateZero()); + lineBufferOut.push_back(twistVector); + lineValidityBufferOut.push_back(true); + } + } // namespace Joints +} // namespace PhysX::Utils diff --git a/Gems/PhysX/Code/Source/Joint/PhysXJointUtils.h b/Gems/PhysX/Code/Source/Joint/PhysXJointUtils.h index 7a30473dac..da7b3dc4e2 100644 --- a/Gems/PhysX/Code/Source/Joint/PhysXJointUtils.h +++ b/Gems/PhysX/Code/Source/Joint/PhysXJointUtils.h @@ -18,9 +18,11 @@ namespace PhysX { namespace JointConstants { - // Setting swing limits to very small values can cause extreme stability problems, so clamp above a small + // Setting joint limits to very small values can cause extreme stability problems, so clamp above a small // threshold. static const float MinSwingLimitDegrees = 1.0f; + // Minimum range between lower and upper twist limits. + static const float MinTwistLimitRangeDegrees = 1.0f; } // namespace JointConstants namespace Utils @@ -49,7 +51,7 @@ namespace PhysX AzPhysics::SceneHandle sceneHandle, AzPhysics::SimulatedBodyHandle parentBodyHandle, AzPhysics::SimulatedBodyHandle childBodyHandle); - + PxJointUniquePtr CreatePxHingeJoint(const PhysX::HingeJointConfiguration& configuration, AzPhysics::SceneHandle sceneHandle, AzPhysics::SimulatedBodyHandle parentBodyHandle, diff --git a/Gems/PhysX/Code/Source/JointComponent.cpp b/Gems/PhysX/Code/Source/JointComponent.cpp index 6e89bd8a86..d5c04598a5 100644 --- a/Gems/PhysX/Code/Source/JointComponent.cpp +++ b/Gems/PhysX/Code/Source/JointComponent.cpp @@ -58,7 +58,7 @@ namespace PhysX } JointComponent::JointComponent( - const JointComponentConfiguration& configuration, + const JointComponentConfiguration& configuration, const JointGenericProperties& genericProperties) : m_configuration(configuration) , m_genericProperties(genericProperties) @@ -66,7 +66,7 @@ namespace PhysX } JointComponent::JointComponent( - const JointComponentConfiguration& configuration, + const JointComponentConfiguration& configuration, const JointGenericProperties& genericProperties, const JointLimitProperties& limitProperties) : m_configuration(configuration) @@ -81,8 +81,8 @@ namespace PhysX { if (m_configuration.m_followerEntity == m_configuration.m_leadEntity) { - AZ_Error("JointComponent::Activate()", - false, + AZ_Error("JointComponent::Activate()", + false, "Joint's lead entity cannot be the same as the entity in which the joint resides. Joint failed to initialize."); return; } diff --git a/Gems/PhysX/Code/Source/JointComponent.h b/Gems/PhysX/Code/Source/JointComponent.h index d3eabd0548..56077726f4 100644 --- a/Gems/PhysX/Code/Source/JointComponent.h +++ b/Gems/PhysX/Code/Source/JointComponent.h @@ -52,10 +52,10 @@ namespace PhysX JointComponent() = default; JointComponent( - const JointComponentConfiguration& configuration, + const JointComponentConfiguration& configuration, const JointGenericProperties& genericProperties); JointComponent( - const JointComponentConfiguration& configuration, + const JointComponentConfiguration& configuration, const JointGenericProperties& genericProperties, const JointLimitProperties& limitProperties); diff --git a/Gems/PhysX/Code/Source/Material.cpp b/Gems/PhysX/Code/Source/Material.cpp index 813f86de0b..be79728cc5 100644 --- a/Gems/PhysX/Code/Source/Material.cpp +++ b/Gems/PhysX/Code/Source/Material.cpp @@ -14,7 +14,7 @@ namespace PhysX { - Material::Material(Material&& material) + Material::Material(Material&& material) : m_pxMaterial(AZStd::move(material.m_pxMaterial)) , m_surfaceType(material.m_surfaceType) , m_surfaceString(AZStd::move(material.m_surfaceString)) @@ -103,7 +103,7 @@ namespace PhysX SetDebugColor(materialConfiguration.m_debugColor); Physics::LegacySurfaceTypeRequestsBus::BroadcastResult( - m_cryEngineSurfaceId, + m_cryEngineSurfaceId, &Physics::LegacySurfaceTypeRequestsBus::Events::GetLegacySurfaceTypeFronName, m_surfaceString); } @@ -159,7 +159,7 @@ namespace PhysX void Material::SetDynamicFriction(float dynamicFriction) { - AZ_Warning("PhysX Material", dynamicFriction >= 0.0f, + AZ_Warning("PhysX Material", dynamicFriction >= 0.0f, "SetDynamicFriction: Dynamic friction %f for material %s is out of range [0, PX_MAX_F32)", dynamicFriction, m_surfaceString.c_str()); @@ -176,10 +176,10 @@ namespace PhysX void Material::SetStaticFriction(float staticFriction) { - AZ_Warning("PhysX Material", staticFriction >= 0.0f, + AZ_Warning("PhysX Material", staticFriction >= 0.0f, "SetStaticFriction: Static friction %f for material %s is out of range [0, PX_MAX_F32)", staticFriction, m_surfaceString.c_str()); - + if (m_pxMaterial) { m_pxMaterial->setStaticFriction(AZ::GetMax(0.0f, staticFriction)); @@ -193,7 +193,7 @@ namespace PhysX void Material::SetRestitution(float restitution) { - AZ_Warning("PhysX Material", restitution >= 0 && restitution <= 1.0f, + AZ_Warning("PhysX Material", restitution >= 0 && restitution <= 1.0f, "SetRestitution: Restitution %f for material %s is out of range [0, 1]", restitution, m_surfaceString.c_str()); @@ -316,8 +316,8 @@ namespace PhysX } // It is important to return exactly the amount of materials specified in materialSelection - // If a number of materials different to what was cooked is assigned on a physx mesh it will lead to undefined - // behavior and subtle bugs. Unfortunately, there's no warning or assertion on physx side at the shape creation time, + // If a number of materials different to what was cooked is assigned on a physx mesh it will lead to undefined + // behavior and subtle bugs. Unfortunately, there's no warning or assertion on physx side at the shape creation time, // nor mention of this in the documentation outMaterials.resize(materialIdsAssignedToSlots.size(), GetDefaultMaterial()); @@ -390,7 +390,7 @@ namespace PhysX if (!assetConfiguration.m_asset.IsReady()) { - // The asset is valid but is still loading, + // The asset is valid but is still loading, // Do not set the empty slots in this case to avoid the entity being in invalid state return; } diff --git a/Gems/PhysX/Code/Source/PhysXCharacters/API/CharacterUtils.cpp b/Gems/PhysX/Code/Source/PhysXCharacters/API/CharacterUtils.cpp index 4ed2825cc2..1151c0ffff 100644 --- a/Gems/PhysX/Code/Source/PhysXCharacters/API/CharacterUtils.cpp +++ b/Gems/PhysX/Code/Source/PhysXCharacters/API/CharacterUtils.cpp @@ -20,330 +20,374 @@ #include #include -namespace PhysX +namespace PhysX::Utils::Characters { - namespace Utils + AZ::Outcome GetNodeIndex(const Physics::RagdollConfiguration& configuration, const AZStd::string& nodeName) { - namespace Characters + const size_t numNodes = configuration.m_nodes.size(); + for (size_t nodeIndex = 0; nodeIndex < numNodes; nodeIndex++) { - AZ::Outcome GetNodeIndex(const Physics::RagdollConfiguration& configuration, const AZStd::string& nodeName) + if (configuration.m_nodes[nodeIndex].m_debugName == nodeName) { - const size_t numNodes = configuration.m_nodes.size(); - for (size_t nodeIndex = 0; nodeIndex < numNodes; nodeIndex++) + return AZ::Success(nodeIndex); + } + } + + return AZ::Failure(); + } + + /// Adds the properties that exist in both the PhysX capsule and box controllers to the controller description. + /// @param[in,out] controllerDesc The controller description to which the shape independent properties should be added. + /// @param characterConfig Information about the character required for initialization. + static void AppendShapeIndependentProperties(physx::PxControllerDesc& controllerDesc, + const Physics::CharacterConfiguration& characterConfig, CharacterControllerCallbackManager* callbackManager) + { + AZStd::vector> materials; + + if (characterConfig.m_materialSelection.GetMaterialIdsAssignedToSlots().empty()) + { + // If material selection has no slots, falling back to default material. + AZStd::shared_ptr defaultMaterial; + Physics::PhysicsMaterialRequestBus::BroadcastResult(defaultMaterial, + &Physics::PhysicsMaterialRequestBus::Events::GetGenericDefaultMaterial); + if (!defaultMaterial) + { + AZ_Error("PhysX Character Controller", false, "Invalid default material."); + return; + } + materials.push_back(AZStd::move(defaultMaterial)); + } + else + { + Physics::PhysicsMaterialRequestBus::Broadcast( + &Physics::PhysicsMaterialRequestBus::Events::GetMaterials, + characterConfig.m_materialSelection, + materials); + if (materials.empty()) + { + AZ_Error("PhysX Character Controller", false, "Could not create character controller, material list was empty."); + return; + } + } + + physx::PxMaterial* pxMaterial = static_cast(materials.front()->GetNativePointer()); + + controllerDesc.material = pxMaterial; + controllerDesc.position = PxMathConvertExtended(characterConfig.m_position); + controllerDesc.slopeLimit = cosf(AZ::DegToRad(characterConfig.m_maximumSlopeAngle)); + controllerDesc.stepOffset = characterConfig.m_stepHeight; + controllerDesc.upDirection = characterConfig.m_upDirection.IsZero() + ? physx::PxVec3(0.0f, 0.0f, 1.0f) + : PxMathConvert(characterConfig.m_upDirection).getNormalized(); + controllerDesc.userData = nullptr; + controllerDesc.behaviorCallback = callbackManager; + controllerDesc.reportCallback = callbackManager; + } + + /// Adds the properties which are PhysX specific and not included in the base generic character configuration. + /// @param[in,out] controllerDesc The controller description to which the PhysX specific properties should be added. + /// @param characterConfig Information about the character required for initialization. + void AppendPhysXSpecificProperties(physx::PxControllerDesc& controllerDesc, + const Physics::CharacterConfiguration& characterConfig) + { + if (characterConfig.RTTI_GetType() == CharacterControllerConfiguration::RTTI_Type()) + { + const auto& extendedConfig = static_cast(characterConfig); + + controllerDesc.scaleCoeff = extendedConfig.m_scaleCoefficient; + controllerDesc.contactOffset = extendedConfig.m_contactOffset; + controllerDesc.nonWalkableMode = extendedConfig.m_slopeBehaviour == SlopeBehaviour::PreventClimbing + ? physx::PxControllerNonWalkableMode::ePREVENT_CLIMBING + : physx::PxControllerNonWalkableMode::ePREVENT_CLIMBING_AND_FORCE_SLIDING; + } + } + + CharacterController* CreateCharacterController(PhysXScene* scene, + const Physics::CharacterConfiguration& characterConfig) + { + if (scene == nullptr) + { + AZ_Error("PhysX Character Controller", false, "Failed to create character controller as the scene is null"); + return nullptr; + } + + physx::PxControllerManager* manager = scene->GetOrCreateControllerManager(); + if (manager == nullptr) + { + AZ_Error("PhysX Character Controller", false, "Could not retrieve character controller manager."); + return nullptr; + } + + auto callbackManager = AZStd::make_unique(); + + physx::PxController* pxController = nullptr; + auto* pxScene = static_cast(scene->GetNativePointer()); + + switch (characterConfig.m_shapeConfig->GetShapeType()) + { + case Physics::ShapeType::Capsule: + { + physx::PxCapsuleControllerDesc capsuleDesc; + + const Physics::CapsuleShapeConfiguration& capsuleConfig = static_cast(*characterConfig.m_shapeConfig); + // LY height means total height, PhysX means height of straight section + capsuleDesc.height = AZ::GetMax(epsilon, capsuleConfig.m_height - 2.0f * capsuleConfig.m_radius); + capsuleDesc.radius = capsuleConfig.m_radius; + capsuleDesc.climbingMode = physx::PxCapsuleClimbingMode::eCONSTRAINED; + + AppendShapeIndependentProperties(capsuleDesc, characterConfig, callbackManager.get()); + AppendPhysXSpecificProperties(capsuleDesc, characterConfig); + PHYSX_SCENE_WRITE_LOCK(pxScene); + pxController = manager->createController(capsuleDesc); // This internally adds the controller's actor to the scene + } + break; + case Physics::ShapeType::Box: + { + physx::PxBoxControllerDesc boxDesc; + + const Physics::BoxShapeConfiguration& boxConfig = static_cast(*characterConfig.m_shapeConfig); + boxDesc.halfHeight = 0.5f * boxConfig.m_dimensions.GetZ(); + boxDesc.halfSideExtent = 0.5f * boxConfig.m_dimensions.GetY(); + boxDesc.halfForwardExtent = 0.5f * boxConfig.m_dimensions.GetX(); + + AppendShapeIndependentProperties(boxDesc, characterConfig, callbackManager.get()); + AppendPhysXSpecificProperties(boxDesc, characterConfig); + PHYSX_SCENE_WRITE_LOCK(pxScene); + pxController = manager->createController(boxDesc); // This internally adds the controller's actor to the scene + } + break; + default: + { + AZ_Error("PhysX Character Controller", false, "PhysX only supports box and capsule shapes for character controllers."); + return nullptr; + } + break; + } + + if (!pxController) + { + AZ_Error("PhysX Character Controller", false, "Failed to create character controller."); + return nullptr; + } + + return aznew CharacterController(pxController, AZStd::move(callbackManager), scene->GetSceneHandle()); + } + + Ragdoll* CreateRagdoll(Physics::RagdollConfiguration& configuration, AzPhysics::SceneHandle sceneHandle) + { + const size_t numNodes = configuration.m_nodes.size(); + if (numNodes != configuration.m_initialState.size()) + { + AZ_Error("PhysX Ragdoll", false, "Mismatch between number of nodes in ragdoll configuration (%i) " + "and number of nodes in the initial ragdoll state (%i)", numNodes, configuration.m_initialState.size()); + return nullptr; + } + + AZStd::unique_ptr ragdoll = AZStd::make_unique(sceneHandle); + ragdoll->SetParentIndices(configuration.m_parentIndices); + + auto* sceneInterface = AZ::Interface::Get(); + if (sceneInterface == nullptr) + { + AZ_Error("PhysX Ragdoll", false, "Unable to Create Ragdoll, Physics Scene Interface is missing."); + return nullptr; + } + + // Set up rigid bodies + for (size_t nodeIndex = 0; nodeIndex < numNodes; nodeIndex++) + { + Physics::RagdollNodeConfiguration& nodeConfig = configuration.m_nodes[nodeIndex]; + const Physics::RagdollNodeState& nodeState = configuration.m_initialState[nodeIndex]; + + Physics::CharacterColliderNodeConfiguration* colliderNodeConfig = configuration.m_colliders.FindNodeConfigByName(nodeConfig.m_debugName); + if (colliderNodeConfig) + { + AZStd::vector> shapes; + for (const auto& [colliderConfig, shapeConfig] : colliderNodeConfig->m_shapes) { - if (configuration.m_nodes[nodeIndex].m_debugName == nodeName) + if (colliderConfig == nullptr || shapeConfig == nullptr) { - return AZ::Success(nodeIndex); + AZ_Error("PhysX Ragdoll", false, "Failed to create collider shape for ragdoll node %s", nodeConfig.m_debugName.c_str()); + return nullptr; + } + + if (auto shape = AZStd::make_shared(*colliderConfig, *shapeConfig)) + { + shapes.emplace_back(shape); + } + else + { + AZ_Error("PhysX Ragdoll", false, "Failed to create collider shape for ragdoll node %s", nodeConfig.m_debugName.c_str()); + return nullptr; } } - - return AZ::Failure(); + nodeConfig.m_colliderAndShapeData = shapes; } + nodeConfig.m_startSimulationEnabled = false; + nodeConfig.m_position = nodeState.m_position; + nodeConfig.m_orientation = nodeState.m_orientation; - /// Adds the properties that exist in both the PhysX capsule and box controllers to the controller description. - /// @param[in,out] controllerDesc The controller description to which the shape independent properties should be added. - /// @param characterConfig Information about the character required for initialization. - static void AppendShapeIndependentProperties(physx::PxControllerDesc& controllerDesc, - const Physics::CharacterConfiguration& characterConfig, CharacterControllerCallbackManager* callbackManager) + AZStd::unique_ptr node = AZStd::make_unique(sceneHandle, nodeConfig); + if (node->GetRigidBodyHandle() != AzPhysics::InvalidSimulatedBodyHandle) { - AZStd::vector> materials; + ragdoll->AddNode(AZStd::move(node)); + } + else + { + AZ_Error("PhysX Ragdoll", false, "Failed to create rigid body for ragdoll node %s", nodeConfig.m_debugName.c_str()); + node.reset(); + } + } - if (characterConfig.m_materialSelection.GetMaterialIdsAssignedToSlots().empty()) + // Set up joints. Needs a second pass because child nodes in the ragdoll config aren't guaranteed to have + // larger indices than their parents. + size_t rootIndex = SIZE_MAX; + for (size_t nodeIndex = 0; nodeIndex < numNodes; nodeIndex++) + { + size_t parentIndex = configuration.m_parentIndices[nodeIndex]; + if (parentIndex < numNodes) + { + physx::PxRigidDynamic* parentActor = ragdoll->GetPxRigidDynamic(parentIndex); + physx::PxRigidDynamic* childActor = ragdoll->GetPxRigidDynamic(nodeIndex); + if (parentActor && childActor) { - // If material selection has no slots, falling back to default material. - AZStd::shared_ptr defaultMaterial; - Physics::PhysicsMaterialRequestBus::BroadcastResult(defaultMaterial, - &Physics::PhysicsMaterialRequestBus::Events::GetGenericDefaultMaterial); - if (!defaultMaterial) + physx::PxVec3 parentOffset = parentActor->getGlobalPose().q.rotateInv( + childActor->getGlobalPose().p - parentActor->getGlobalPose().p); + physx::PxTransform parentTM(parentOffset); + physx::PxTransform childTM(physx::PxIdentity); + + AZStd::shared_ptr jointConfig = configuration.m_nodes[nodeIndex].m_jointConfig; + if (!jointConfig) { - AZ_Error("PhysX Character Controller", false, "Invalid default material."); - return; + jointConfig = AZStd::make_shared(); } - materials.push_back(AZStd::move(defaultMaterial)); + + AzPhysics::JointHandle jointHandle = sceneInterface->AddJoint( + sceneHandle, jointConfig.get(), + ragdoll->GetNode(parentIndex)->GetRigidBody().m_bodyHandle, + ragdoll->GetNode(nodeIndex)->GetRigidBody().m_bodyHandle); + + AzPhysics::Joint* joint = sceneInterface->GetJointFromHandle(sceneHandle, jointHandle); + + if (!joint) + { + AZ_Error("PhysX Ragdoll", false, "Failed to create joint for node index %i.", nodeIndex); + return nullptr; + } + + // Moving from PhysX 3.4 to 4.1, the allowed range of the twist angle was expanded from -pi..pi + // to -2*pi..2*pi. + // In 3.4, twist angles which were outside the range were wrapped into it, which means that it + // would be possible for a joint to have been authored under 3.4 which would be inside its twist + // limit in 3.4 but violating the limit by up to 2*pi in 4.1. + // If this case is detected, flipping the sign of one of the joint local pose quaternions will + // ensure that the twist angle will have a value which would not lead to wrapping. + auto* jointNativePointer = static_cast(joint->GetNativePointer()); + if (jointNativePointer && jointNativePointer->getConcreteType() == physx::PxJointConcreteType::eD6) + { + auto* d6Joint = static_cast(jointNativePointer); + const float twist = d6Joint->getTwistAngle(); + const physx::PxJointAngularLimitPair twistLimit = d6Joint->getTwistLimit(); + if (twist < twistLimit.lower || twist > twistLimit.upper) + { + physx::PxTransform childLocalTransform = d6Joint->getLocalPose(physx::PxJointActorIndex::eACTOR1); + childLocalTransform.q = -childLocalTransform.q; + d6Joint->setLocalPose(physx::PxJointActorIndex::eACTOR1, childLocalTransform); + } + } + + Physics::RagdollNode* childNode = ragdoll->GetNode(nodeIndex); + static_cast(childNode)->SetJoint(joint); } else { - Physics::PhysicsMaterialRequestBus::Broadcast( - &Physics::PhysicsMaterialRequestBus::Events::GetMaterials, - characterConfig.m_materialSelection, - materials); - if (materials.empty()) - { - AZ_Error("PhysX Character Controller", false, "Could not create character controller, material list was empty."); - return; - } + AZ_Error("PhysX Ragdoll", false, "Failed to create joint for node index %i.", nodeIndex); + return nullptr; } - - physx::PxMaterial* pxMaterial = static_cast(materials.front()->GetNativePointer()); - - controllerDesc.material = pxMaterial; - controllerDesc.slopeLimit = cosf(AZ::DegToRad(characterConfig.m_maximumSlopeAngle)); - controllerDesc.stepOffset = characterConfig.m_stepHeight; - controllerDesc.upDirection = characterConfig.m_upDirection.IsZero() - ? physx::PxVec3(0.0f, 0.0f, 1.0f) - : PxMathConvert(characterConfig.m_upDirection).getNormalized(); - controllerDesc.userData = nullptr; - controllerDesc.behaviorCallback = callbackManager; - controllerDesc.reportCallback = callbackManager; } - - /// Adds the properties which are PhysX specific and not included in the base generic character configuration. - /// @param[in,out] controllerDesc The controller description to which the PhysX specific properties should be added. - /// @param characterConfig Information about the character required for initialization. - void AppendPhysXSpecificProperties(physx::PxControllerDesc& controllerDesc, - const Physics::CharacterConfiguration& characterConfig) + else { - if (characterConfig.RTTI_GetType() == CharacterControllerConfiguration::RTTI_Type()) - { - const auto& extendedConfig = static_cast(characterConfig); - - controllerDesc.scaleCoeff = extendedConfig.m_scaleCoefficient; - controllerDesc.contactOffset = extendedConfig.m_contactOffset; - controllerDesc.nonWalkableMode = extendedConfig.m_slopeBehaviour == SlopeBehaviour::PreventClimbing - ? physx::PxControllerNonWalkableMode::ePREVENT_CLIMBING - : physx::PxControllerNonWalkableMode::ePREVENT_CLIMBING_AND_FORCE_SLIDING; - } + // If the configuration only has one root and is valid, the node without a parent must be the root. + rootIndex = nodeIndex; } + } - CharacterController* CreateCharacterController(PhysXScene* scene, - const Physics::CharacterConfiguration& characterConfig) + ragdoll->SetRootIndex(rootIndex); + + return ragdoll.release(); + } + + physx::PxD6JointDrive CreateD6JointDrive(float stiffness, float dampingRatio, float forceLimit) + { + if (!(std::isfinite)(stiffness) || stiffness < 0.0f) + { + AZ_Warning("PhysX Character Utils", false, "Invalid joint stiffness, using 0.0f instead."); + stiffness = 0.0f; + } + + if (!(std::isfinite)(dampingRatio) || dampingRatio < 0.0f) + { + AZ_Warning("PhysX Character Utils", false, "Invalid joint damping ratio, using 1.0f instead."); + dampingRatio = 1.0f; + } + + if (!(std::isfinite)(forceLimit)) + { + AZ_Warning("PhysX Character Utils", false, "Invalid joint force limit, ignoring."); + forceLimit = std::numeric_limits::max(); + } + + float damping = dampingRatio * 2.0f * sqrtf(stiffness); + bool isAcceleration = true; + return physx::PxD6JointDrive(stiffness, damping, forceLimit, isAcceleration); + } + + AZStd::vector ComputeHierarchyDepths(const AZStd::vector& parentIndices) + { + const size_t numNodes = parentIndices.size(); + AZStd::vector nodeDepths(numNodes); + for (size_t nodeIndex = 0; nodeIndex < numNodes; nodeIndex++) + { + nodeDepths[nodeIndex] = { -1, nodeIndex }; + } + + for (size_t nodeIndex = 0; nodeIndex < numNodes; nodeIndex++) + { + if (nodeDepths[nodeIndex].m_depth != -1) { - if (scene == nullptr) - { - AZ_Error("PhysX Character Controller", false, "Failed to create character controller as the scene is null"); - return nullptr; - } - - physx::PxControllerManager* manager = scene->GetOrCreateControllerManager(); - if (manager == nullptr) - { - AZ_Error("PhysX Character Controller", false, "Could not retrieve character controller manager."); - return nullptr; - } - - auto callbackManager = AZStd::make_unique(); - - physx::PxController* pxController = nullptr; - auto* pxScene = static_cast(scene->GetNativePointer()); - - switch (characterConfig.m_shapeConfig->GetShapeType()) - { - case Physics::ShapeType::Capsule: - { - physx::PxCapsuleControllerDesc capsuleDesc; - - const Physics::CapsuleShapeConfiguration& capsuleConfig = static_cast(*characterConfig.m_shapeConfig); - // LY height means total height, PhysX means height of straight section - capsuleDesc.height = AZ::GetMax(epsilon, capsuleConfig.m_height - 2.0f * capsuleConfig.m_radius); - capsuleDesc.radius = capsuleConfig.m_radius; - capsuleDesc.climbingMode = physx::PxCapsuleClimbingMode::eCONSTRAINED; - - AppendShapeIndependentProperties(capsuleDesc, characterConfig, callbackManager.get()); - AppendPhysXSpecificProperties(capsuleDesc, characterConfig); - PHYSX_SCENE_WRITE_LOCK(pxScene); - pxController = manager->createController(capsuleDesc); // This internally adds the controller's actor to the scene - } - break; - case Physics::ShapeType::Box: - { - physx::PxBoxControllerDesc boxDesc; - - const Physics::BoxShapeConfiguration& boxConfig = static_cast(*characterConfig.m_shapeConfig); - boxDesc.halfHeight = 0.5f * boxConfig.m_dimensions.GetZ(); - boxDesc.halfSideExtent = 0.5f * boxConfig.m_dimensions.GetY(); - boxDesc.halfForwardExtent = 0.5f * boxConfig.m_dimensions.GetX(); - - AppendShapeIndependentProperties(boxDesc, characterConfig, callbackManager.get()); - AppendPhysXSpecificProperties(boxDesc, characterConfig); - PHYSX_SCENE_WRITE_LOCK(pxScene); - pxController = manager->createController(boxDesc); // This internally adds the controller's actor to the scene - } - break; - default: - { - AZ_Error("PhysX Character Controller", false, "PhysX only supports box and capsule shapes for character controllers."); - return nullptr; - } - break; - } - - if (!pxController) - { - AZ_Error("PhysX Character Controller", false, "Failed to create character controller."); - return nullptr; - } - - return aznew CharacterController(pxController, AZStd::move(callbackManager), scene->GetSceneHandle()); + continue; } - - Ragdoll* CreateRagdoll(Physics::RagdollConfiguration& configuration, AzPhysics::SceneHandle sceneHandle) + int depth = -1; // initial depth value for this node + int ancestorDepth = 0; // the depth of the first ancestor we find when iteratively visiting parents + bool ancestorFound = false; // whether we have found either an ancestor which already has a depth value, or the root + size_t currentIndex = nodeIndex; + while (!ancestorFound) { - const size_t numNodes = configuration.m_nodes.size(); - if (numNodes != configuration.m_initialState.size()) + depth++; + if (depth > numNodes) { - AZ_Error("PhysX Ragdoll", false, "Mismatch between number of nodes in ragdoll configuration (%i) " - "and number of nodes in the initial ragdoll state (%i)", numNodes, configuration.m_initialState.size()); - return nullptr; + AZ_Error("PhysX Ragdoll", false, "Loop detected in hierarchy depth computation."); + return nodeDepths; + } + const size_t parentIndex = parentIndices[currentIndex]; + + if (parentIndex >= numNodes || nodeDepths[currentIndex].m_depth != -1) + { + ancestorFound = true; + ancestorDepth = (nodeDepths[currentIndex].m_depth != -1) ? nodeDepths[currentIndex].m_depth : 0; } - AZStd::unique_ptr ragdoll = AZStd::make_unique(sceneHandle); - ragdoll->SetParentIndices(configuration.m_parentIndices); - - auto* sceneInterface = AZ::Interface::Get(); - if (sceneInterface == nullptr) - { - AZ_Error("PhysX Ragdoll", false, "Unable to Create Ragdoll, Physics Scene Interface is missing."); - return nullptr; - } - - // Set up rigid bodies - for (size_t nodeIndex = 0; nodeIndex < numNodes; nodeIndex++) - { - Physics::RagdollNodeConfiguration& nodeConfig = configuration.m_nodes[nodeIndex]; - const Physics::RagdollNodeState& nodeState = configuration.m_initialState[nodeIndex]; - - Physics::CharacterColliderNodeConfiguration* colliderNodeConfig = configuration.m_colliders.FindNodeConfigByName(nodeConfig.m_debugName); - if (colliderNodeConfig) - { - AZStd::vector> shapes; - for (const auto& [colliderConfig, shapeConfig] : colliderNodeConfig->m_shapes) - { - if (colliderConfig == nullptr || shapeConfig == nullptr) - { - AZ_Error("PhysX Ragdoll", false, "Failed to create collider shape for ragdoll node %s", nodeConfig.m_debugName.c_str()); - return nullptr; - } - - if (auto shape = AZStd::make_shared(*colliderConfig, *shapeConfig)) - { - shapes.emplace_back(shape); - } - else - { - AZ_Error("PhysX Ragdoll", false, "Failed to create collider shape for ragdoll node %s", nodeConfig.m_debugName.c_str()); - return nullptr; - } - } - nodeConfig.m_colliderAndShapeData = shapes; - } - nodeConfig.m_startSimulationEnabled = false; - nodeConfig.m_position = nodeState.m_position; - nodeConfig.m_orientation = nodeState.m_orientation; - - AZStd::unique_ptr node = AZStd::make_unique(sceneHandle, nodeConfig); - if (node->GetRigidBodyHandle() != AzPhysics::InvalidSimulatedBodyHandle) - { - ragdoll->AddNode(AZStd::move(node)); - } - else - { - AZ_Error("PhysX Ragdoll", false, "Failed to create rigid body for ragdoll node %s", nodeConfig.m_debugName.c_str()); - node.reset(); - } - } - - // Set up joints. Needs a second pass because child nodes in the ragdoll config aren't guaranteed to have - // larger indices than their parents. - size_t rootIndex = SIZE_MAX; - for (size_t nodeIndex = 0; nodeIndex < numNodes; nodeIndex++) - { - size_t parentIndex = configuration.m_parentIndices[nodeIndex]; - if (parentIndex < numNodes) - { - physx::PxRigidDynamic* parentActor = ragdoll->GetPxRigidDynamic(parentIndex); - physx::PxRigidDynamic* childActor = ragdoll->GetPxRigidDynamic(nodeIndex); - if (parentActor && childActor) - { - physx::PxVec3 parentOffset = parentActor->getGlobalPose().q.rotateInv( - childActor->getGlobalPose().p - parentActor->getGlobalPose().p); - physx::PxTransform parentTM(parentOffset); - physx::PxTransform childTM(physx::PxIdentity); - - AZStd::shared_ptr jointConfig = configuration.m_nodes[nodeIndex].m_jointConfig; - if (!jointConfig) - { - jointConfig = AZStd::make_shared(); - } - - AzPhysics::JointHandle jointHandle = sceneInterface->AddJoint( - sceneHandle, jointConfig.get(), - ragdoll->GetNode(parentIndex)->GetRigidBody().m_bodyHandle, - ragdoll->GetNode(nodeIndex)->GetRigidBody().m_bodyHandle); - - AzPhysics::Joint* joint = sceneInterface->GetJointFromHandle(sceneHandle, jointHandle); - - if (!joint) - { - AZ_Error("PhysX Ragdoll", false, "Failed to create joint for node index %i.", nodeIndex); - return nullptr; - } - - // Moving from PhysX 3.4 to 4.1, the allowed range of the twist angle was expanded from -pi..pi - // to -2*pi..2*pi. - // In 3.4, twist angles which were outside the range were wrapped into it, which means that it - // would be possible for a joint to have been authored under 3.4 which would be inside its twist - // limit in 3.4 but violating the limit by up to 2*pi in 4.1. - // If this case is detected, flipping the sign of one of the joint local pose quaternions will - // ensure that the twist angle will have a value which would not lead to wrapping. - auto* jointNativePointer = static_cast(joint->GetNativePointer()); - if (jointNativePointer && jointNativePointer->getConcreteType() == physx::PxJointConcreteType::eD6) - { - auto* d6Joint = static_cast(jointNativePointer); - const float twist = d6Joint->getTwistAngle(); - const physx::PxJointAngularLimitPair twistLimit = d6Joint->getTwistLimit(); - if (twist < twistLimit.lower || twist > twistLimit.upper) - { - physx::PxTransform childLocalTransform = d6Joint->getLocalPose(physx::PxJointActorIndex::eACTOR1); - childLocalTransform.q = -childLocalTransform.q; - d6Joint->setLocalPose(physx::PxJointActorIndex::eACTOR1, childLocalTransform); - } - } - - Physics::RagdollNode* childNode = ragdoll->GetNode(nodeIndex); - static_cast(childNode)->SetJoint(joint); - } - else - { - AZ_Error("PhysX Ragdoll", false, "Failed to create joint for node index %i.", nodeIndex); - return nullptr; - } - } - else - { - // If the configuration only has one root and is valid, the node without a parent must be the root. - rootIndex = nodeIndex; - } - } - - ragdoll->SetRootIndex(rootIndex); - - return ragdoll.release(); + currentIndex = parentIndex; } - physx::PxD6JointDrive CreateD6JointDrive(float stiffness, float dampingRatio, float forceLimit) + currentIndex = nodeIndex; + for (int i = depth; i >= 0; i--) { - if (!(std::isfinite)(stiffness) || stiffness < 0.0f) - { - AZ_Warning("PhysX Character Utils", false, "Invalid joint stiffness, using 0.0f instead."); - stiffness = 0.0f; - } - - if (!(std::isfinite)(dampingRatio) || dampingRatio < 0.0f) - { - AZ_Warning("PhysX Character Utils", false, "Invalid joint damping ratio, using 1.0f instead."); - dampingRatio = 1.0f; - } - - if (!(std::isfinite)(forceLimit)) - { - AZ_Warning("PhysX Character Utils", false, "Invalid joint force limit, ignoring."); - forceLimit = std::numeric_limits::max(); - } - - float damping = dampingRatio * 2.0f * sqrtf(stiffness); - bool isAcceleration = true; - return physx::PxD6JointDrive(stiffness, damping, forceLimit, isAcceleration); + nodeDepths[currentIndex] = { ancestorDepth + i, currentIndex }; + currentIndex = parentIndices[currentIndex]; } - } // namespace Characters - } // namespace Utils -} // namespace PhysX + } + + return nodeDepths; + } +} // namespace PhysX::Utils::Characters diff --git a/Gems/PhysX/Code/Source/PhysXCharacters/API/CharacterUtils.h b/Gems/PhysX/Code/Source/PhysXCharacters/API/CharacterUtils.h index 0f51a5d9b9..245dc01abd 100644 --- a/Gems/PhysX/Code/Source/PhysXCharacters/API/CharacterUtils.h +++ b/Gems/PhysX/Code/Source/PhysXCharacters/API/CharacterUtils.h @@ -49,6 +49,18 @@ namespace PhysX //! @param forceLimit The upper limit on the force the joint can apply to reach its target. //! @return The created joint drive. physx::PxD6JointDrive CreateD6JointDrive(float strength, float dampingRatio, float forceLimit); + + //! Contains information about a node in a hierarchy and how deep it is in the hierarchy relative to the root. + struct DepthData + { + int m_depth = -1; //!< Depth of the joint in the hierarchy. The root has depth 0, its children depth 1, and so on. + size_t m_index = 0; // ComputeHierarchyDepths(const AZStd::vector& parentIndices); } // namespace Characters } // namespace Utils } // namespace PhysX diff --git a/Gems/PhysX/Code/Source/PhysXCharacters/API/RagdollNode.cpp b/Gems/PhysX/Code/Source/PhysXCharacters/API/RagdollNode.cpp index 4593969db4..34fe3d0295 100644 --- a/Gems/PhysX/Code/Source/PhysXCharacters/API/RagdollNode.cpp +++ b/Gems/PhysX/Code/Source/PhysXCharacters/API/RagdollNode.cpp @@ -47,7 +47,7 @@ namespace PhysX { return; } - + m_joint = joint; } diff --git a/Gems/PhysX/Code/Source/PhysXCharacters/Components/RagdollComponent.cpp b/Gems/PhysX/Code/Source/PhysXCharacters/Components/RagdollComponent.cpp index 57972fea3e..7615a175d1 100644 --- a/Gems/PhysX/Code/Source/PhysXCharacters/Components/RagdollComponent.cpp +++ b/Gems/PhysX/Code/Source/PhysXCharacters/Components/RagdollComponent.cpp @@ -7,20 +7,20 @@ */ #include -#include #include -#include #include +#include +#include #include +#include #include #include -#include +#include #include namespace PhysX { - bool RagdollComponent::VersionConverter(AZ::SerializeContext& context, - AZ::SerializeContext::DataElementNode& classElement) + bool RagdollComponent::VersionConverter(AZ::SerializeContext& context, AZ::SerializeContext::DataElementNode& classElement) { // The element "PhysXRagdoll" was changed from a shared pointer to a unique pointer, but a version converter was // not added at the time. This means there may be serialized data with either the shared or unique pointer, but @@ -76,13 +76,13 @@ namespace PhysX ->Field("EnableJointProjection", &RagdollComponent::m_enableJointProjection) ->Field("ProjectionLinearTol", &RagdollComponent::m_jointProjectionLinearTolerance) ->Field("ProjectionAngularTol", &RagdollComponent::m_jointProjectionAngularToleranceDegrees) - ; + ->Field("EnableMassRatioClamping", &RagdollComponent::m_enableMassRatioClamping) + ->Field("MaxMassRatio", &RagdollComponent::m_maxMassRatio); AZ::EditContext* editContext = serializeContext->GetEditContext(); if (editContext) { - editContext->Class( - "PhysX Ragdoll", "Creates a PhysX ragdoll simulation for an animation actor.") + editContext->Class("PhysX Ragdoll", "Creates a PhysX ragdoll simulation for an animation actor.") ->ClassElement(AZ::Edit::ClassElements::EditorData, "") ->Attribute(AZ::Edit::Attributes::Category, "PhysX") ->Attribute(AZ::Edit::Attributes::Icon, "Icons/Components/PhysXRagdoll.svg") @@ -90,34 +90,49 @@ namespace PhysX ->Attribute(AZ::Edit::Attributes::AppearsInAddComponentMenu, AZ_CRC("Game", 0x232b318c)) ->Attribute(AZ::Edit::Attributes::HelpPageURL, "https://o3de.org/docs/user-guide/components/reference/physx/ragdoll/") ->Attribute(AZ::Edit::Attributes::AutoExpand, true) - ->DataElement(AZ::Edit::UIHandlers::Default, &RagdollComponent::m_positionIterations, "Position Iteration Count", + ->DataElement( + AZ::Edit::UIHandlers::Default, &RagdollComponent::m_positionIterations, "Position Iteration Count", "The frequency at which ragdoll collider positions are resolved. Higher values can increase fidelity but decrease " "performance. Very high values might introduce instability.") ->Attribute(AZ::Edit::Attributes::Min, 1) ->Attribute(AZ::Edit::Attributes::Max, 255) - ->DataElement(AZ::Edit::UIHandlers::Default, &RagdollComponent::m_velocityIterations, "Velocity Iteration Count", + ->DataElement( + AZ::Edit::UIHandlers::Default, &RagdollComponent::m_velocityIterations, "Velocity Iteration Count", "The frequency at which ragdoll collider velocities are resolved. Higher values can increase fidelity but decrease " "performance. Very high values might introduce instability.") ->Attribute(AZ::Edit::Attributes::Min, 1) ->Attribute(AZ::Edit::Attributes::Max, 255) - ->DataElement(AZ::Edit::UIHandlers::Default, &RagdollComponent::m_enableJointProjection, - "Enable Joint Projection", "When active, preserves joint constraints in volatile simulations. " + ->DataElement( + AZ::Edit::UIHandlers::Default, &RagdollComponent::m_enableJointProjection, "Enable Joint Projection", + "When active, preserves joint constraints in volatile simulations. " "Might not be physically correct in all simulations.") ->Attribute(AZ::Edit::Attributes::ChangeNotify, AZ::Edit::PropertyRefreshLevels::EntireTree) - ->DataElement(AZ::Edit::UIHandlers::Default, &RagdollComponent::m_jointProjectionLinearTolerance, + ->DataElement( + AZ::Edit::UIHandlers::Default, &RagdollComponent::m_jointProjectionLinearTolerance, "Joint Projection Linear Tolerance", "Maximum linear joint error. Projection is applied to linear joint errors above this value.") ->Attribute(AZ::Edit::Attributes::Min, 0.0f) ->Attribute(AZ::Edit::Attributes::Step, 1e-3f) ->Attribute(AZ::Edit::Attributes::Visibility, &RagdollComponent::IsJointProjectionVisible) - ->DataElement(AZ::Edit::UIHandlers::Default, &RagdollComponent::m_jointProjectionAngularToleranceDegrees, + ->DataElement( + AZ::Edit::UIHandlers::Default, &RagdollComponent::m_jointProjectionAngularToleranceDegrees, "Joint Projection Angular Tolerance", "Maximum angular joint error. Projection is applied to angular joint errors above this value.") ->Attribute(AZ::Edit::Attributes::Min, 0.0f) ->Attribute(AZ::Edit::Attributes::Step, 0.1f) ->Attribute(AZ::Edit::Attributes::Suffix, " degrees") ->Attribute(AZ::Edit::Attributes::Visibility, &RagdollComponent::IsJointProjectionVisible) - ; + ->DataElement( + AZ::Edit::UIHandlers::Default, &RagdollComponent::m_enableMassRatioClamping, "Enable Mass Ratio Clamping", + "When active, ragdoll node mass values may be overridden to avoid unstable mass ratios.") + ->Attribute(AZ::Edit::Attributes::ChangeNotify, AZ::Edit::PropertyRefreshLevels::EntireTree) + ->DataElement( + AZ::Edit::UIHandlers::Default, &RagdollComponent::m_maxMassRatio, "Maximum Mass Ratio", + "The mass of the child body of a joint may be clamped to avoid its ratio with the parent " + "body mass exceeding this threshold.") + ->Attribute(AZ::Edit::Attributes::Min, 1.0f) + ->Attribute(AZ::Edit::Attributes::Step, 0.1f) + ->Attribute(AZ::Edit::Attributes::Visibility, &RagdollComponent::IsMaxMassRatioVisible); } } @@ -126,11 +141,16 @@ namespace PhysX } } - bool RagdollComponent::IsJointProjectionVisible() + bool RagdollComponent::IsJointProjectionVisible() const { return m_enableJointProjection; } + bool RagdollComponent::IsMaxMassRatioVisible() const + { + return m_enableMassRatioClamping; + } + // AZ::Component void RagdollComponent::Init() { @@ -272,7 +292,6 @@ namespace PhysX return ragdoll->IsSimulated(); } return false; - } AZ::Aabb RagdollComponent::GetAabb() const @@ -318,20 +337,19 @@ namespace PhysX if (numNodes == 0) { - AZ_Error("PhysX Ragdoll Component", false, - "Ragdoll configuration has 0 nodes, ragdoll will not be created for entity \"%s\".", + AZ_Error( + "PhysX Ragdoll Component", false, "Ragdoll configuration has 0 nodes, ragdoll will not be created for entity \"%s\".", GetEntity()->GetName().c_str()); return; } - ragdollConfiguration.m_parentIndices.resize(numNodes); for (size_t nodeIndex = 0; nodeIndex < numNodes; nodeIndex++) { AZStd::string parentName; AZStd::string nodeName = ragdollConfiguration.m_nodes[nodeIndex].m_debugName; - AzFramework::CharacterPhysicsDataRequestBus::EventResult(parentName, GetEntityId(), - &AzFramework::CharacterPhysicsDataRequests::GetParentNodeName, nodeName); + AzFramework::CharacterPhysicsDataRequestBus::EventResult( + parentName, GetEntityId(), &AzFramework::CharacterPhysicsDataRequests::GetParentNodeName, nodeName); AZ::Outcome parentIndex = Utils::Characters::GetNodeIndex(ragdollConfiguration, parentName); ragdollConfiguration.m_parentIndices[nodeIndex] = parentIndex ? parentIndex.GetValue() : SIZE_MAX; @@ -339,8 +357,8 @@ namespace PhysX } Physics::RagdollState bindPose; - AzFramework::CharacterPhysicsDataRequestBus::EventResult(bindPose, GetEntityId(), - &AzFramework::CharacterPhysicsDataRequests::GetBindPose, ragdollConfiguration); + AzFramework::CharacterPhysicsDataRequestBus::EventResult( + bindPose, GetEntityId(), &AzFramework::CharacterPhysicsDataRequests::GetBindPose, ragdollConfiguration); AZ::Transform entityTransform = AZ::Transform::CreateIdentity(); AZ::TransformBus::EventResult(entityTransform, GetEntityId(), &AZ::TransformBus::Events::GetWorldTM); @@ -354,13 +372,12 @@ namespace PhysX m_ragdollHandle = sceneInterface->AddSimulatedBody(m_attachedSceneHandle, &ragdollConfiguration); } auto* ragdoll = GetPhysXRagdoll(); - if (ragdoll == nullptr || - m_ragdollHandle == AzPhysics::InvalidSimulatedBodyHandle) + if (ragdoll == nullptr || m_ragdollHandle == AzPhysics::InvalidSimulatedBodyHandle) { AZ_Error("PhysX Ragdoll Component", false, "Failed to create ragdoll."); return; } - + for (size_t nodeIndex = 0; nodeIndex < numNodes; nodeIndex++) { if (physx::PxRigidDynamic* pxRigidBody = ragdoll->GetPxRigidDynamic(nodeIndex)) @@ -389,17 +406,63 @@ namespace PhysX } } + // If mass ratio clamping is enabled, iterate out from the root and clamp mass values + if (m_enableMassRatioClamping) + { + const float maxMassRatio = AZStd::GetMax(1.0f + AZ::Constants::FloatEpsilon, m_maxMassRatio); + + // figure out the depth of each node in the tree, so that nodes can be visited from the root outwards + AZStd::vector nodeDepths = + Utils::Characters::ComputeHierarchyDepths(ragdollConfiguration.m_parentIndices); + + AZStd::sort( + nodeDepths.begin(), nodeDepths.end(), + [](const Utils::Characters::DepthData& d1, const Utils::Characters::DepthData& d2) + { + return d1.m_depth < d2.m_depth; + }); + + bool massesClamped = false; + for (const auto& nodeDepth : nodeDepths) + { + const size_t nodeIndex = nodeDepth.m_index; + const size_t parentIndex = ragdollConfiguration.m_parentIndices[nodeIndex]; + if (parentIndex < numNodes) + { + AzPhysics::RigidBody& nodeRigidBody = ragdoll->GetNode(nodeIndex)->GetRigidBody(); + const float originalMass = nodeRigidBody.GetMass(); + const float parentMass = ragdoll->GetNode(parentIndex)->GetRigidBody().GetMass(); + const float minMass = parentMass / maxMassRatio; + const float maxMass = parentMass; + if (originalMass < minMass || originalMass > maxMass) + { + const float clampedMass = AZStd::clamp(originalMass, minMass, maxMass); + nodeRigidBody.SetMass(clampedMass); + massesClamped = true; + if (!AZ::IsClose(originalMass, 0.0f)) + { + // scale the inertia proportionally to how the mass was modified + auto pxRigidBody = static_cast(nodeRigidBody.GetNativePointer()); + pxRigidBody->setMassSpaceInertiaTensor(clampedMass / originalMass * pxRigidBody->getMassSpaceInertiaTensor()); + } + } + } + } + + AZ_WarningOnce("PhysX Ragdoll", !massesClamped, + "Mass values for ragdoll on entity \"%s\" were modified based on max mass ratio setting to avoid instability.", + GetEntity()->GetName().c_str()); + } + AzFramework::RagdollPhysicsRequestBus::Handler::BusConnect(GetEntityId()); AzPhysics::SimulatedBodyComponentRequestsBus::Handler::BusConnect(GetEntityId()); - AzFramework::RagdollPhysicsNotificationBus::Event(GetEntityId(), - &AzFramework::RagdollPhysicsNotifications::OnRagdollActivated); + AzFramework::RagdollPhysicsNotificationBus::Event(GetEntityId(), &AzFramework::RagdollPhysicsNotifications::OnRagdollActivated); } void RagdollComponent::DestroyRagdoll() { - if (m_ragdollHandle != AzPhysics::InvalidSimulatedBodyHandle && - m_attachedSceneHandle != AzPhysics::InvalidSceneHandle) + if (m_ragdollHandle != AzPhysics::InvalidSimulatedBodyHandle && m_attachedSceneHandle != AzPhysics::InvalidSceneHandle) { AzFramework::RagdollPhysicsRequestBus::Handler::BusDisconnect(); AzFramework::RagdollPhysicsNotificationBus::Event( @@ -421,8 +484,7 @@ namespace PhysX const Ragdoll* RagdollComponent::GetPhysXRagdollConst() const { - if (m_ragdollHandle == AzPhysics::InvalidSimulatedBodyHandle || - m_attachedSceneHandle == AzPhysics::InvalidSceneHandle) + if (m_ragdollHandle == AzPhysics::InvalidSimulatedBodyHandle || m_attachedSceneHandle == AzPhysics::InvalidSceneHandle) { return nullptr; } diff --git a/Gems/PhysX/Code/Source/PhysXCharacters/Components/RagdollComponent.h b/Gems/PhysX/Code/Source/PhysXCharacters/Components/RagdollComponent.h index 63dd1354dd..3ef59bf623 100644 --- a/Gems/PhysX/Code/Source/PhysXCharacters/Components/RagdollComponent.h +++ b/Gems/PhysX/Code/Source/PhysXCharacters/Components/RagdollComponent.h @@ -103,7 +103,8 @@ namespace PhysX Ragdoll* GetPhysXRagdoll(); const Ragdoll* GetPhysXRagdollConst() const; - bool IsJointProjectionVisible(); + bool IsJointProjectionVisible() const; + bool IsMaxMassRatioVisible() const; AzPhysics::SimulatedBodyHandle m_ragdollHandle = AzPhysics::InvalidSimulatedBodyHandle; AzPhysics::SceneHandle m_attachedSceneHandle = AzPhysics::InvalidSceneHandle; @@ -119,5 +120,9 @@ namespace PhysX float m_jointProjectionLinearTolerance = 1e-3f; /// Angular joint error (in degrees) above which projection will be applied. float m_jointProjectionAngularToleranceDegrees = 1.0f; + /// Allows ragdoll node mass values to be overridden to avoid unstable mass ratios. + bool m_enableMassRatioClamping = false; + /// If mass ratio clamping is enabled, masses will be clamped to within this ratio. + float m_maxMassRatio = 2.0f; }; } // namespace PhysX diff --git a/Gems/PhysX/Code/Source/Pipeline/HeightFieldAssetHandler.cpp b/Gems/PhysX/Code/Source/Pipeline/HeightFieldAssetHandler.cpp index e4d64d4139..2d05612d74 100644 --- a/Gems/PhysX/Code/Source/Pipeline/HeightFieldAssetHandler.cpp +++ b/Gems/PhysX/Code/Source/Pipeline/HeightFieldAssetHandler.cpp @@ -20,216 +20,213 @@ #include #include -namespace PhysX +namespace PhysX::Pipeline { - namespace Pipeline + const char* HeightFieldAssetHandler::s_assetFileExtension = "pxheightfield"; + + HeightFieldAssetHandler::HeightFieldAssetHandler() { - const char* HeightFieldAssetHandler::s_assetFileExtension = "pxheightfield"; + Register(); + } - HeightFieldAssetHandler::HeightFieldAssetHandler() + HeightFieldAssetHandler::~HeightFieldAssetHandler() + { + Unregister(); + } + + void HeightFieldAssetHandler::Register() + { + bool assetManagerReady = AZ::Data::AssetManager::IsReady(); + AZ_Error("PhysX HeightField Asset", assetManagerReady, "Asset manager isn't ready."); + if (assetManagerReady) { - Register(); + AZ::Data::AssetManager::Instance().RegisterHandler(this, AZ::AzTypeInfo::Uuid()); } - HeightFieldAssetHandler::~HeightFieldAssetHandler() + AZ::AssetTypeInfoBus::Handler::BusConnect(AZ::AzTypeInfo::Uuid()); + } + + void HeightFieldAssetHandler::Unregister() + { + AZ::AssetTypeInfoBus::Handler::BusDisconnect(); + + if (AZ::Data::AssetManager::IsReady()) { - Unregister(); + AZ::Data::AssetManager::Instance().UnregisterHandler(this); + } + } + + // AZ::AssetTypeInfoBus + AZ::Data::AssetType HeightFieldAssetHandler::GetAssetType() const + { + return AZ::AzTypeInfo::Uuid(); + } + + void HeightFieldAssetHandler::GetAssetTypeExtensions(AZStd::vector& extensions) + { + extensions.push_back(HeightFieldAssetHandler::s_assetFileExtension); + } + + const char* HeightFieldAssetHandler::GetAssetTypeDisplayName() const + { + return "PhysX HeightField Mesh"; + } + + const char* HeightFieldAssetHandler::GetBrowserIcon() const + { + return "Icons/Components/ColliderMesh.svg"; + } + + const char* HeightFieldAssetHandler::GetGroup() const + { + return "Physics"; + } + + AZ::Uuid HeightFieldAssetHandler::GetComponentTypeId() const + { + return PhysX::EditorTerrainComponentTypeId; + } + + // AZ::Data::AssetHandler + AZ::Data::AssetPtr HeightFieldAssetHandler::CreateAsset([[maybe_unused]] const AZ::Data::AssetId& id, const AZ::Data::AssetType& type) + { + if (type == AZ::AzTypeInfo::Uuid()) + { + return aznew HeightFieldAsset(); } - void HeightFieldAssetHandler::Register() + AZ_Error("PhysX HeightField Asset", false, "This handler deals only with PhysXHeightFieldAsset type."); + return nullptr; + } + + AZ::Data::AssetHandler::LoadResult HeightFieldAssetHandler::LoadAssetData( + const AZ::Data::Asset& asset, + AZStd::shared_ptr stream, + [[maybe_unused]] const AZ::Data::AssetFilterCB& assetLoadFilterCB) + { + AZ_PROFILE_FUNCTION(Physics); + + HeightFieldAsset* physXHeightFieldAsset = asset.GetAs(); + if (!physXHeightFieldAsset) { - bool assetManagerReady = AZ::Data::AssetManager::IsReady(); - AZ_Error("PhysX HeightField Asset", assetManagerReady, "Asset manager isn't ready."); - if (assetManagerReady) - { - AZ::Data::AssetManager::Instance().RegisterHandler(this, AZ::AzTypeInfo::Uuid()); - } - - AZ::AssetTypeInfoBus::Handler::BusConnect(AZ::AzTypeInfo::Uuid()); - } - - void HeightFieldAssetHandler::Unregister() - { - AZ::AssetTypeInfoBus::Handler::BusDisconnect(); - - if (AZ::Data::AssetManager::IsReady()) - { - AZ::Data::AssetManager::Instance().UnregisterHandler(this); - } - } - - // AZ::AssetTypeInfoBus - AZ::Data::AssetType HeightFieldAssetHandler::GetAssetType() const - { - return AZ::AzTypeInfo::Uuid(); - } - - void HeightFieldAssetHandler::GetAssetTypeExtensions(AZStd::vector& extensions) - { - extensions.push_back(HeightFieldAssetHandler::s_assetFileExtension); - } - - const char* HeightFieldAssetHandler::GetAssetTypeDisplayName() const - { - return "PhysX HeightField Mesh"; - } - - const char* HeightFieldAssetHandler::GetBrowserIcon() const - { - return "Icons/Components/ColliderMesh.svg"; - } - - const char* HeightFieldAssetHandler::GetGroup() const - { - return "Physics"; - } - - AZ::Uuid HeightFieldAssetHandler::GetComponentTypeId() const - { - return PhysX::EditorTerrainComponentTypeId; - } - - // AZ::Data::AssetHandler - AZ::Data::AssetPtr HeightFieldAssetHandler::CreateAsset([[maybe_unused]] const AZ::Data::AssetId& id, const AZ::Data::AssetType& type) - { - if (type == AZ::AzTypeInfo::Uuid()) - { - return aznew HeightFieldAsset(); - } - - AZ_Error("PhysX HeightField Asset", false, "This handler deals only with PhysXHeightFieldAsset type."); - return nullptr; - } - - AZ::Data::AssetHandler::LoadResult HeightFieldAssetHandler::LoadAssetData( - const AZ::Data::Asset& asset, - AZStd::shared_ptr stream, - [[maybe_unused]] const AZ::Data::AssetFilterCB& assetLoadFilterCB) - { - AZ_PROFILE_FUNCTION(Physics); - - HeightFieldAsset* physXHeightFieldAsset = asset.GetAs(); - if (!physXHeightFieldAsset) - { - AZ_Error("PhysX HeightField Asset", false, "This should be a PhysX HeightField Asset, as this is the only type we process."); - return AZ::Data::AssetHandler::LoadResult::Error; - } - - // Wrap az stream behind physx interface - PhysX::AssetDataStreamWrapper readerStream(stream); - - // Read the file header - HeightFieldAssetHeader header; - readerStream.read(&header, sizeof(header)); - - // Parse the asset versions - if (header.m_assetVersion >= 1) - { - if (header.m_assetDataSize > 0) - { - // Version 1 doesn't have min/max heights, so only read this data for versions 2+. - if (header.m_assetVersion >= 2) - { - readerStream.read(&physXHeightFieldAsset->m_minHeight, sizeof(float)); - readerStream.read(&physXHeightFieldAsset->m_maxHeight, sizeof(float)); - } - else - { - // In versions 0 & 1, the data is cooked assuming the data starts at origin (min height = 0) - // and has a max height of 1024.0f. - const float v1HardCodedMaxHeight = 1024.0f; - physXHeightFieldAsset->m_minHeight = 0.0f; - physXHeightFieldAsset->m_maxHeight = v1HardCodedMaxHeight; - } - - // Create heightfield from cooked file - physx::PxPhysics& physx = PxGetPhysics(); - physXHeightFieldAsset->SetHeightField(physx.createHeightField(readerStream)); - - AZ_Error("PhysX HeightField Asset", physXHeightFieldAsset->m_heightField != nullptr, "Failed to construct PhysX mesh from the cooked data. Possible data corruption."); - return (physXHeightFieldAsset->m_heightField != nullptr) ? - AZ::Data::AssetHandler::LoadResult::LoadComplete : - AZ::Data::AssetHandler::LoadResult::Error; - } - else - { - AZ_Warning("HeightFieldAssetHandler", false, "Empty heightfield file. Try resaving your level"); - } - } - else - { - AZ_Warning("HeightFieldAssetHandler", false, "Unsupported asset version"); - } - + AZ_Error("PhysX HeightField Asset", false, "This should be a PhysX HeightField Asset, as this is the only type we process."); return AZ::Data::AssetHandler::LoadResult::Error; } - bool HeightFieldAssetHandler::SaveAssetData(const AZ::Data::Asset& asset, AZ::IO::GenericStream* stream) + // Wrap az stream behind physx interface + PhysX::AssetDataStreamWrapper readerStream(stream); + + // Read the file header + HeightFieldAssetHeader header; + readerStream.read(&header, sizeof(header)); + + // Parse the asset versions + if (header.m_assetVersion >= 1) { - AZ_PROFILE_FUNCTION(Physics); - - HeightFieldAsset* physXHeightFieldAsset = asset.GetAs(); - if (!physXHeightFieldAsset) + if (header.m_assetDataSize > 0) { - AZ_Error("PhysX HeightField Asset", false, "This should be a PhysX HeightField Asset. HeightFieldAssetHandler doesn't handle any other asset type."); - return false; - } + // Version 1 doesn't have min/max heights, so only read this data for versions 2+. + if (header.m_assetVersion >= 2) + { + readerStream.read(&physXHeightFieldAsset->m_minHeight, sizeof(float)); + readerStream.read(&physXHeightFieldAsset->m_maxHeight, sizeof(float)); + } + else + { + // In versions 0 & 1, the data is cooked assuming the data starts at origin (min height = 0) + // and has a max height of 1024.0f. + const float v1HardCodedMaxHeight = 1024.0f; + physXHeightFieldAsset->m_minHeight = 0.0f; + physXHeightFieldAsset->m_maxHeight = v1HardCodedMaxHeight; + } - physx::PxHeightField* heightField = physXHeightFieldAsset->GetHeightField(); - if (!heightField) - { - AZ_Warning("PhysX HeightField Asset", false, "There is no heightfield to save."); - return false; - } + // Create heightfield from cooked file + physx::PxPhysics& physx = PxGetPhysics(); + physXHeightFieldAsset->SetHeightField(physx.createHeightField(readerStream)); - HeightFieldAssetHeader header; - if (header.m_assetVersion == 2) - { - physx::PxCooking* cooking = nullptr; - SystemRequestsBus::BroadcastResult(cooking, &SystemRequests::GetCooking); - - // Read samples from heightfield - AZStd::vector samples; - samples.resize(heightField->getNbColumns() * heightField->getNbRows()); - heightField->saveCells(samples.data(), (physx::PxU32)samples.size() * heightField->getSampleStride()); - - // Read description from heightfield - physx::PxHeightFieldDesc heightFieldDesc; - heightFieldDesc.format = heightField->getFormat(); - heightFieldDesc.nbColumns = heightField->getNbColumns(); - heightFieldDesc.nbRows = heightField->getNbRows(); - heightFieldDesc.samples.data = samples.data(); - heightFieldDesc.samples.stride = heightField->getSampleStride(); - - // Cook description to file - physx::PxDefaultMemoryOutputStream writer; - bool success = cooking->cookHeightField(heightFieldDesc, writer); - header.m_assetDataSize = writer.getSize() + 2 * sizeof(float); - - PhysX::StreamWrapper writerStream(stream); - writerStream.write(&header, sizeof(header)); - writerStream.write(&physXHeightFieldAsset->m_minHeight, sizeof(physXHeightFieldAsset->m_minHeight)); - writerStream.write(&physXHeightFieldAsset->m_maxHeight, sizeof(physXHeightFieldAsset->m_maxHeight)); - writerStream.write(writer.getData(), writer.getSize()); - - return success; + AZ_Error("PhysX HeightField Asset", physXHeightFieldAsset->m_heightField != nullptr, "Failed to construct PhysX mesh from the cooked data. Possible data corruption."); + return (physXHeightFieldAsset->m_heightField != nullptr) ? + AZ::Data::AssetHandler::LoadResult::LoadComplete : + AZ::Data::AssetHandler::LoadResult::Error; } else { - AZ_Warning("HeightFieldAssetHandler", false, "Unsupported asset version"); + AZ_Warning("HeightFieldAssetHandler", false, "Empty heightfield file. Try resaving your level"); } + } + else + { + AZ_Warning("HeightFieldAssetHandler", false, "Unsupported asset version"); + } + return AZ::Data::AssetHandler::LoadResult::Error; + } + + bool HeightFieldAssetHandler::SaveAssetData(const AZ::Data::Asset& asset, AZ::IO::GenericStream* stream) + { + AZ_PROFILE_FUNCTION(Physics); + + HeightFieldAsset* physXHeightFieldAsset = asset.GetAs(); + if (!physXHeightFieldAsset) + { + AZ_Error("PhysX HeightField Asset", false, "This should be a PhysX HeightField Asset. HeightFieldAssetHandler doesn't handle any other asset type."); return false; } - void HeightFieldAssetHandler::DestroyAsset(AZ::Data::AssetPtr ptr) + physx::PxHeightField* heightField = physXHeightFieldAsset->GetHeightField(); + if (!heightField) { - delete ptr; + AZ_Warning("PhysX HeightField Asset", false, "There is no heightfield to save."); + return false; } - void HeightFieldAssetHandler::GetHandledAssetTypes(AZStd::vector& assetTypes) + HeightFieldAssetHeader header; + if (header.m_assetVersion == 2) { - assetTypes.push_back(AZ::AzTypeInfo::Uuid()); + physx::PxCooking* cooking = nullptr; + SystemRequestsBus::BroadcastResult(cooking, &SystemRequests::GetCooking); + + // Read samples from heightfield + AZStd::vector samples; + samples.resize(heightField->getNbColumns() * heightField->getNbRows()); + heightField->saveCells(samples.data(), (physx::PxU32)samples.size() * heightField->getSampleStride()); + + // Read description from heightfield + physx::PxHeightFieldDesc heightFieldDesc; + heightFieldDesc.format = heightField->getFormat(); + heightFieldDesc.nbColumns = heightField->getNbColumns(); + heightFieldDesc.nbRows = heightField->getNbRows(); + heightFieldDesc.samples.data = samples.data(); + heightFieldDesc.samples.stride = heightField->getSampleStride(); + + // Cook description to file + physx::PxDefaultMemoryOutputStream writer; + bool success = cooking->cookHeightField(heightFieldDesc, writer); + header.m_assetDataSize = writer.getSize() + 2 * sizeof(float); + + PhysX::StreamWrapper writerStream(stream); + writerStream.write(&header, sizeof(header)); + writerStream.write(&physXHeightFieldAsset->m_minHeight, sizeof(physXHeightFieldAsset->m_minHeight)); + writerStream.write(&physXHeightFieldAsset->m_maxHeight, sizeof(physXHeightFieldAsset->m_maxHeight)); + writerStream.write(writer.getData(), writer.getSize()); + + return success; } - } //namespace Pipeline -} // namespace PhysX + else + { + AZ_Warning("HeightFieldAssetHandler", false, "Unsupported asset version"); + } + + return false; + } + + void HeightFieldAssetHandler::DestroyAsset(AZ::Data::AssetPtr ptr) + { + delete ptr; + } + + void HeightFieldAssetHandler::GetHandledAssetTypes(AZStd::vector& assetTypes) + { + assetTypes.push_back(AZ::AzTypeInfo::Uuid()); + } +} // namespace PhysX::Pipeline diff --git a/Gems/PhysX/Code/Source/Pipeline/MeshGroup.cpp b/Gems/PhysX/Code/Source/Pipeline/MeshGroup.cpp index d0ff4008b2..24bfeef1be 100644 --- a/Gems/PhysX/Code/Source/Pipeline/MeshGroup.cpp +++ b/Gems/PhysX/Code/Source/Pipeline/MeshGroup.cpp @@ -864,7 +864,8 @@ namespace PhysX { if (auto* physicsSystem = AZ::Interface::Get()) { - if (const auto* physicsConfiguration = physicsSystem->GetConfiguration()) + if (const auto* physicsConfiguration = physicsSystem->GetConfiguration(); + physicsConfiguration && physicsConfiguration->m_materialLibraryAsset) { const auto& materials = physicsConfiguration->m_materialLibraryAsset->GetMaterialsData(); diff --git a/Gems/PhysX/Code/Source/Pipeline/StreamWrapper.h b/Gems/PhysX/Code/Source/Pipeline/StreamWrapper.h index f576c06452..15f9bfb36e 100644 --- a/Gems/PhysX/Code/Source/Pipeline/StreamWrapper.h +++ b/Gems/PhysX/Code/Source/Pipeline/StreamWrapper.h @@ -17,7 +17,7 @@ namespace PhysX /// Wraps an AZ stream by provided the physx interface. /// This is used to prevent copying of data when going from /// physx streams to az streams. - class StreamWrapper + class StreamWrapper : public physx::PxInputStream , public physx::PxOutputStream diff --git a/Gems/PhysX/Code/Source/Platform/Android/PAL_android.cmake b/Gems/PhysX/Code/Source/Platform/Android/PAL_android.cmake index e6a2b35d36..1d078bb505 100644 --- a/Gems/PhysX/Code/Source/Platform/Android/PAL_android.cmake +++ b/Gems/PhysX/Code/Source/Platform/Android/PAL_android.cmake @@ -7,5 +7,3 @@ # set(PAL_TRAIT_PHYSX_SUPPORTED TRUE) -set(PAL_TRAIT_JOINTS_TYPED_TEST_CASE FALSE) - diff --git a/Gems/PhysX/Code/Source/Platform/Linux/PAL_linux.cmake b/Gems/PhysX/Code/Source/Platform/Linux/PAL_linux.cmake index 0d9c4f1e3a..43c92ab916 100644 --- a/Gems/PhysX/Code/Source/Platform/Linux/PAL_linux.cmake +++ b/Gems/PhysX/Code/Source/Platform/Linux/PAL_linux.cmake @@ -7,7 +7,6 @@ # set(PAL_TRAIT_PHYSX_SUPPORTED TRUE) -set(PAL_TRAIT_JOINTS_TYPED_TEST_CASE FALSE) if(PAL_TRAIT_BUILD_HOST_TOOLS) ly_associate_package(PACKAGE_NAME poly2tri-7f0487a-rev1-linux TARGETS poly2tri PACKAGE_HASH b16eef8f0bc469de0e3056d28d7484cf42659667e39b68b239f0d3a4cbb533d0) diff --git a/Gems/PhysX/Code/Source/Platform/Mac/PAL_mac.cmake b/Gems/PhysX/Code/Source/Platform/Mac/PAL_mac.cmake index 141a80ae59..992280bceb 100644 --- a/Gems/PhysX/Code/Source/Platform/Mac/PAL_mac.cmake +++ b/Gems/PhysX/Code/Source/Platform/Mac/PAL_mac.cmake @@ -7,7 +7,6 @@ # set(PAL_TRAIT_PHYSX_SUPPORTED TRUE) -set(PAL_TRAIT_JOINTS_TYPED_TEST_CASE FALSE) if(PAL_TRAIT_BUILD_HOST_TOOLS) ly_associate_package(PACKAGE_NAME poly2tri-7f0487a-rev1-mac TARGETS poly2tri PACKAGE_HASH 23e49e6b06d79327985d17b40bff20ab202519c283a842378f5f1791c1bf8dbc) diff --git a/Gems/PhysX/Code/Source/Platform/Windows/PAL_windows.cmake b/Gems/PhysX/Code/Source/Platform/Windows/PAL_windows.cmake index 7abd7ab9e9..336bb89c40 100644 --- a/Gems/PhysX/Code/Source/Platform/Windows/PAL_windows.cmake +++ b/Gems/PhysX/Code/Source/Platform/Windows/PAL_windows.cmake @@ -7,7 +7,6 @@ # set(PAL_TRAIT_PHYSX_SUPPORTED TRUE) -set(PAL_TRAIT_JOINTS_TYPED_TEST_CASE TRUE) if(PAL_TRAIT_BUILD_HOST_TOOLS) ly_associate_package(PACKAGE_NAME poly2tri-7f0487a-rev1-windows TARGETS poly2tri PACKAGE_HASH 5fea2bf294e5130e0654fbfa39f192e6369f3853901dde90bb9b3f3a11edcb1e) diff --git a/Gems/PhysX/Code/Source/Platform/iOS/PAL_ios.cmake b/Gems/PhysX/Code/Source/Platform/iOS/PAL_ios.cmake index 6316fa60c6..1d078bb505 100644 --- a/Gems/PhysX/Code/Source/Platform/iOS/PAL_ios.cmake +++ b/Gems/PhysX/Code/Source/Platform/iOS/PAL_ios.cmake @@ -7,4 +7,3 @@ # set(PAL_TRAIT_PHYSX_SUPPORTED TRUE) -set(PAL_TRAIT_JOINTS_TYPED_TEST_CASE FALSE) diff --git a/Gems/PhysX/Code/Source/Scene/PhysXScene.cpp b/Gems/PhysX/Code/Source/Scene/PhysXScene.cpp index 22fc665eec..dfac43b703 100644 --- a/Gems/PhysX/Code/Source/Scene/PhysXScene.cpp +++ b/Gems/PhysX/Code/Source/Scene/PhysXScene.cpp @@ -66,12 +66,12 @@ namespace PhysX { sceneDesc.filterShader = Collision::DefaultFilterShader; } - + if (config.m_enableActiveActors) { sceneDesc.flags |= physx::PxSceneFlag::eENABLE_ACTIVE_ACTORS; } - + if (config.m_enablePcm) { sceneDesc.flags |= physx::PxSceneFlag::eENABLE_PCM; @@ -80,19 +80,19 @@ namespace PhysX { sceneDesc.flags &= ~physx::PxSceneFlag::eENABLE_PCM; } - + if (config.m_kinematicFiltering) { sceneDesc.kineKineFilteringMode = physx::PxPairFilteringMode::eKEEP; } - + if (config.m_kinematicStaticFiltering) { sceneDesc.staticKineFilteringMode = physx::PxPairFilteringMode::eKEEP; } - + sceneDesc.bounceThresholdVelocity = config.m_bounceThresholdVelocity; - + sceneDesc.filterCallback = filterCallback; sceneDesc.simulationEventCallback = simEventCallback; #ifdef ENABLE_TGS_SOLVER @@ -139,9 +139,8 @@ namespace PhysX else if (auto* shapeColliderPairList = AZStd::get_if>(&shapeData)) { bool shapeAdded = false; - if (!shapeColliderPairList->empty()) + for (const auto& shapeColliderConfigs : *shapeColliderPairList) { - const auto& shapeColliderConfigs = shapeColliderPairList->front(); auto shapePtr = AZStd::make_shared(*(shapeColliderConfigs.first), *(shapeColliderConfigs.second)); AZStd::visit([shapePtr, &shapeAdded](auto&& body) { @@ -151,8 +150,8 @@ namespace PhysX shapeAdded = true; } }, simulatedBody); - return shapeAdded; } + return shapeAdded; } else if (auto* shape = AZStd::get_if>(&shapeData)) { @@ -233,10 +232,10 @@ namespace PhysX } template - AzPhysics::Joint* CreateJoint(const ConfigurationType* configuration, + AzPhysics::Joint* CreateJoint(const ConfigurationType* configuration, AzPhysics::SceneHandle sceneHandle, AzPhysics::SimulatedBodyHandle parentBodyHandle, - AzPhysics::SimulatedBodyHandle childBodyHandle, + AzPhysics::SimulatedBodyHandle childBodyHandle, AZ::Crc32& crc) { JointType* newBody = aznew JointType(*configuration, sceneHandle, parentBodyHandle, childBodyHandle); @@ -255,7 +254,7 @@ namespace PhysX // The filter should also use the eTOUCH flag to find all contacts with the ray. // Otherwise the default buffer (1 result) and eBLOCK flag is enough to find the first hit. physx::PxRaycastBuffer castResult; - SceneQueryHelpers::PhysXQueryFilterCallback queryFilterCallback; + SceneQueryHelpers::PhysXQueryFilterCallback queryFilterCallback; if (raycastRequest->m_reportMultipleHits) { const AZ::u64 maxSize = AZStd::min(raycastRequest->m_maxResults, sceneMaxResults); @@ -477,7 +476,7 @@ namespace PhysX //register for future changes to the buffer sizes. physXSystem->RegisterSystemConfigurationChangedEvent(m_physicsSystemConfigChanged); } - + PhysXScene::s_rayCastBuffer = {}; PhysXScene::s_sweepBuffer = {}; PhysXScene::s_overlapBuffer = {}; @@ -504,7 +503,7 @@ namespace PhysX { if (simulatedBody.second->m_simulating) { - // Disable simulation on body (not signaling OnSimulationBodySimulationDisabled event) + // Disable simulation on body (not signaling OnSimulationBodySimulationDisabled event) DisableSimulationOfBodyInternal(*simulatedBody.second); } m_simulatedBodyRemovedEvent.Signal(m_sceneHandle, simulatedBody.second->m_bodyHandle); @@ -578,7 +577,7 @@ namespace PhysX // Swap the buffers, invoke callbacks, build the list of active actors. m_pxScene->fetchResults(true); } - + if (activeActorsEnabled) { AZ_PROFILE_SCOPE(Physics, "PhysXScene::ActiveActors"); @@ -754,14 +753,14 @@ namespace PhysX { return; } - + AzPhysics::SimulatedBodyIndex index = AZStd::get(bodyHandle); if (index < m_simulatedBodies.size() && m_simulatedBodies[index].first == AZStd::get(bodyHandle)) { if (m_simulatedBodies[index].second->m_simulating) { - // Disable simulation on body (not signaling OnSimulationBodySimulationDisabled event) + // Disable simulation on body (not signaling OnSimulationBodySimulationDisabled event) DisableSimulationOfBodyInternal(*m_simulatedBodies[index].second); } @@ -801,7 +800,7 @@ namespace PhysX EnableSimulationOfBodyInternal(*body); } - else + else { AZ_Warning("PhysXScene", false, "Unable to enable Simulated body, failed to find body.") } @@ -831,8 +830,8 @@ namespace PhysX } } - AzPhysics::JointHandle PhysXScene::AddJoint(const AzPhysics::JointConfiguration* jointConfig, - AzPhysics::SimulatedBodyHandle parentBody, AzPhysics::SimulatedBodyHandle childBody) + AzPhysics::JointHandle PhysXScene::AddJoint(const AzPhysics::JointConfiguration* jointConfig, + AzPhysics::SimulatedBodyHandle parentBody, AzPhysics::SimulatedBodyHandle childBody) { AzPhysics::Joint* newJoint = nullptr; AZ::Crc32 newJointCrc; @@ -881,7 +880,7 @@ namespace PhysX return AzPhysics::InvalidJointHandle; } - AzPhysics::Joint* PhysXScene::GetJointFromHandle(AzPhysics::JointHandle jointHandle) + AzPhysics::Joint* PhysXScene::GetJointFromHandle(AzPhysics::JointHandle jointHandle) { if (jointHandle == AzPhysics::InvalidJointHandle) { @@ -897,13 +896,13 @@ namespace PhysX return nullptr; } - void PhysXScene::RemoveJoint(AzPhysics::JointHandle jointHandle) + void PhysXScene::RemoveJoint(AzPhysics::JointHandle jointHandle) { if (jointHandle == AzPhysics::InvalidJointHandle) { return; } - + AzPhysics::JointIndex index = AZStd::get(jointHandle); if (index < m_joints.size() && m_joints[index].first == AZStd::get(jointHandle)) @@ -922,7 +921,7 @@ namespace PhysX return {}; //return 0 hits } - // Query flags. + // Query flags. const physx::PxQueryFlags queryFlags = SceneQueryHelpers::GetPxQueryFlags(request->m_queryType); const physx::PxQueryFilterData queryData(queryFlags); @@ -1017,7 +1016,7 @@ namespace PhysX void PhysXScene::EnableSimulationOfBodyInternal(AzPhysics::SimulatedBody& body) { - //character controller is a special actor and only needs the m_simulating flag set, + //character controller is a special actor and only needs the m_simulating flag set, if (!azrtti_istypeof(body) && !azrtti_istypeof(body)) { @@ -1044,7 +1043,7 @@ namespace PhysX void PhysXScene::DisableSimulationOfBodyInternal(AzPhysics::SimulatedBody& body) { - //character controller is a special actor and only needs the m_simulating flag set, + //character controller is a special actor and only needs the m_simulating flag set, if (!azrtti_istypeof(body) && !azrtti_istypeof(body)) { @@ -1226,10 +1225,10 @@ namespace PhysX AZ_PROFILE_DATAPOINT(Physics, stats.getNbBroadPhaseRemoves(), RootCategory, BroadphaseSubCategory, "BroadPhaseRemoves"); // Compute pair stats for all geometry types +#if AZ_PROFILE_DATAPOINT AZ::u32 ccdPairs = 0; AZ::u32 modifiedPairs = 0; AZ::u32 triggerPairs = 0; - for (AZ::u32 i = 0; i < PxGeometryType::eGEOMETRY_COUNT; i++) { // stat[i][j] = stat[j][i], hence, discarding the symmetric entries @@ -1242,6 +1241,7 @@ namespace PhysX triggerPairs += stats.getRbPairStats(physx::PxSimulationStatistics::eTRIGGER_PAIRS, firstGeom, secondGeom); } } +#endif [[maybe_unused]] const char* CollisionsSubCategory = "Collisions"; AZ_PROFILE_DATAPOINT(Physics, ccdPairs, RootCategory, CollisionsSubCategory, "CCDPairs"); diff --git a/Gems/PhysX/Code/Source/Scene/PhysXScene.h b/Gems/PhysX/Code/Source/Scene/PhysXScene.h index 420c6f196c..a568c36e4e 100644 --- a/Gems/PhysX/Code/Source/Scene/PhysXScene.h +++ b/Gems/PhysX/Code/Source/Scene/PhysXScene.h @@ -53,7 +53,7 @@ namespace PhysX void RemoveSimulatedBodies(AzPhysics::SimulatedBodyHandleList& bodyHandles) override; void EnableSimulationOfBody(AzPhysics::SimulatedBodyHandle bodyHandle) override; void DisableSimulationOfBody(AzPhysics::SimulatedBodyHandle bodyHandle) override; - AzPhysics::JointHandle AddJoint(const AzPhysics::JointConfiguration* jointConfig, + AzPhysics::JointHandle AddJoint(const AzPhysics::JointConfiguration* jointConfig, AzPhysics::SimulatedBodyHandle parentBody, AzPhysics::SimulatedBodyHandle childBody) override; AzPhysics::Joint* GetJointFromHandle(AzPhysics::JointHandle jointHandle) override; void RemoveJoint(AzPhysics::JointHandle jointHandle) override; diff --git a/Gems/PhysX/Code/Source/System/PhysXSystem.cpp b/Gems/PhysX/Code/Source/System/PhysXSystem.cpp index cc21285f8c..39c0dfc686 100644 --- a/Gems/PhysX/Code/Source/System/PhysXSystem.cpp +++ b/Gems/PhysX/Code/Source/System/PhysXSystem.cpp @@ -7,6 +7,8 @@ */ #include #include +#include +#include #include #include @@ -59,7 +61,7 @@ namespace PhysX { m_onMaterialLibraryReloadedCallback(asset); } - + PhysXSystem::PhysXSystem(PhysXSettingsRegistryManager* registryManager, const physx::PxCookingParams& cookingParams) : m_registryManager(*registryManager) , m_materialLibraryAssetHelper( @@ -97,7 +99,18 @@ namespace PhysX m_systemConfig = *physXConfig; } - AzFramework::AssetCatalogEventBus::Handler::BusConnect(); + // If the settings registry isn't available, something earlier in startup will report that failure. + if (auto* settingsRegistry = AZ::SettingsRegistry::Get(); + settingsRegistry != nullptr) + { + AZ::ComponentApplicationLifecycle::RegisterHandler( + *settingsRegistry, m_componentApplicationLifecycleHandler, + [this]([[maybe_unused]] AZStd::string_view path, [[maybe_unused]] AZ::SettingsRegistryInterface::Type type) + { + InitializeMaterialLibrary(); + }, + "CriticalAssetsCompiled"); + } m_state = State::Initialized; m_initializeEvent.Signal(&m_systemConfig); @@ -118,7 +131,7 @@ namespace PhysX RemoveAllScenes(); - AzFramework::AssetCatalogEventBus::Handler::BusDisconnect(); + m_componentApplicationLifecycleHandler.Disconnect(); m_materialLibraryAssetHelper.Disconnect(); // Clear the asset reference in deactivate. The asset system is shut down before destructors are called // for system components, causing any hanging asset references to become crashes on shutdown in release builds. @@ -362,10 +375,8 @@ namespace PhysX return &m_systemConfig; } - void PhysXSystem::OnCatalogLoaded([[maybe_unused]]const char* catalogFile) + void PhysXSystem::InitializeMaterialLibrary() { - // now that assets can be resolved, lets load the default material library. - if (!m_systemConfig.m_materialLibraryAsset.GetId().IsValid()) { m_onMaterialLibraryLoadErrorEvent.Signal(AzPhysics::SystemEvents::MaterialLibraryLoadErrorType::InvalidId); @@ -515,7 +526,7 @@ namespace PhysX AZ_Warning("PhysX", loadedSuccessfully, "LoadDefaultMaterialLibrary: Default Material Library asset data is invalid."); - + return loadedSuccessfully; } diff --git a/Gems/PhysX/Code/Source/System/PhysXSystem.h b/Gems/PhysX/Code/Source/System/PhysXSystem.h index d1250b6958..56d56435a0 100644 --- a/Gems/PhysX/Code/Source/System/PhysXSystem.h +++ b/Gems/PhysX/Code/Source/System/PhysXSystem.h @@ -7,10 +7,9 @@ */ #pragma once -#include #include #include -#include +#include #include #include @@ -35,7 +34,6 @@ namespace PhysX { class PhysXSystem : public AZ::Interface::Registrar - , private AzFramework::AssetCatalogEventBus::Handler { public: AZ_CLASS_ALLOCATOR_DECL; @@ -86,13 +84,12 @@ namespace PhysX private: //! Initializes the PhysX SDK. //! This sets up the PhysX Foundation, Cooking, and other PhysX sub-systems. - //! @param cookingParams The cooking params to use when setting up PhysX cooking interface. + //! @param cookingParams The cooking params to use when setting up PhysX cooking interface. void InitializePhysXSdk(const physx::PxCookingParams& cookingParams); void ShutdownPhysXSdk(); - bool LoadMaterialLibrary(); - // AzFramework::AssetCatalogEventBus::Handler ... - void OnCatalogLoaded(const char* catalogFile) override; + void InitializeMaterialLibrary(); + bool LoadMaterialLibrary(); PhysXSystemConfiguration m_systemConfig; AzPhysics::SceneConfiguration m_defaultSceneConfiguration; @@ -145,6 +142,8 @@ namespace PhysX OnMaterialLibraryReloadedCallback m_onMaterialLibraryReloadedCallback; }; MaterialLibraryAssetHelper m_materialLibraryAssetHelper; + + AZ::SettingsRegistryInterface::NotifyEventHandler m_componentApplicationLifecycleHandler; }; //! Helper function for getting the PhysX System interface from inside the PhysX gem. diff --git a/Gems/PhysX/Code/Source/WindProvider.cpp b/Gems/PhysX/Code/Source/WindProvider.cpp index 3090cea062..3490e79412 100644 --- a/Gems/PhysX/Code/Source/WindProvider.cpp +++ b/Gems/PhysX/Code/Source/WindProvider.cpp @@ -159,6 +159,12 @@ namespace PhysX AZStd::swap(m_entityTransformHandlers[index], m_entityTransformHandlers.back()); m_entityTransformHandlers.pop_back(); + // When deleting entity from handler's m_entities, the AABB should be appended to m_pendingAabbUpdates + // for local wind handler to broadcast OnWindChanged to notify relative entities of wind changes in OnTick(). + m_pendingAabbUpdates.push_back(); + ColliderShapeRequestBus::EventResult(m_pendingAabbUpdates.back(), + entityId, &ColliderShapeRequestBus::Events::GetColliderShapeAabb); + m_changed = true; } } diff --git a/Gems/PhysX/Code/Tests/PhysXColliderComponentModeTests.cpp b/Gems/PhysX/Code/Tests/PhysXColliderComponentModeTests.cpp index 1f393386f8..5722d1a397 100644 --- a/Gems/PhysX/Code/Tests/PhysXColliderComponentModeTests.cpp +++ b/Gems/PhysX/Code/Tests/PhysXColliderComponentModeTests.cpp @@ -8,10 +8,13 @@ #include "TestColliderComponent.h" +#include +#include #include #include #include #include +#include #include #include #include @@ -66,7 +69,7 @@ namespace UnitTest PhysX::ColliderComponentModeRequests::SubMode subMode = PhysX::ColliderComponentModeRequests::SubMode::NumModes; PhysX::ColliderComponentModeRequestBus::BroadcastResult(subMode, &PhysX::ColliderComponentModeRequests::GetCurrentMode); - EXPECT_EQ(PhysX::ColliderComponentModeRequests::SubMode::Dimensions, subMode); + EXPECT_EQ(PhysX::ColliderComponentModeRequests::SubMode::Offset, subMode); // When the mouse wheel is scrolled while holding ctrl AzToolsFramework::ViewportInteraction::MouseInteractionEvent @@ -84,7 +87,7 @@ namespace UnitTest // Then the component mode is cycled. PhysX::ColliderComponentModeRequestBus::BroadcastResult(subMode, &PhysX::ColliderComponentModeRequests::GetCurrentMode); EXPECT_EQ(handled, MouseInteractionResult::Viewport); - EXPECT_EQ(PhysX::ColliderComponentModeRequests::SubMode::Offset, subMode); + EXPECT_EQ(PhysX::ColliderComponentModeRequests::SubMode::Dimensions, subMode); } TEST_F(PhysXColliderComponentModeTest, MouseWheelDownShouldSetPreviousMode) @@ -95,7 +98,7 @@ namespace UnitTest PhysX::ColliderComponentModeRequests::SubMode subMode = PhysX::ColliderComponentModeRequests::SubMode::NumModes; PhysX::ColliderComponentModeRequestBus::BroadcastResult(subMode, &PhysX::ColliderComponentModeRequests::GetCurrentMode); - EXPECT_EQ(PhysX::ColliderComponentModeRequests::SubMode::Dimensions, subMode); + EXPECT_EQ(PhysX::ColliderComponentModeRequests::SubMode::Offset, subMode); // When the mouse wheel is scrolled while holding ctrl AzToolsFramework::ViewportInteraction::MouseInteractionEvent @@ -116,7 +119,7 @@ namespace UnitTest EXPECT_EQ(PhysX::ColliderComponentModeRequests::SubMode::Rotation, subMode); } - TEST_F(PhysXColliderComponentModeTest, PressingKey1ShouldSetSizeMode) + TEST_F(PhysXColliderComponentModeTest, PressingKey1ShouldSetOffsetMode) { // Given there is a collider component in component mode. CreateColliderComponent(); @@ -124,17 +127,17 @@ namespace UnitTest PhysX::ColliderComponentModeRequests::SubMode subMode = PhysX::ColliderComponentModeRequests::SubMode::NumModes; PhysX::ColliderComponentModeRequestBus::BroadcastResult(subMode, &PhysX::ColliderComponentModeRequests::GetCurrentMode); - EXPECT_EQ(PhysX::ColliderComponentModeRequests::SubMode::Dimensions, subMode); + EXPECT_EQ(PhysX::ColliderComponentModeRequests::SubMode::Offset, subMode); // When the '1' key is pressed QTest::keyPress(&m_editorActions.m_componentModeWidget, Qt::Key_1); - // Then the component mode is set to Size. + // Then the component mode is set to Offset. PhysX::ColliderComponentModeRequestBus::BroadcastResult(subMode, &PhysX::ColliderComponentModeRequests::GetCurrentMode); - EXPECT_EQ(PhysX::ColliderComponentModeRequests::SubMode::Dimensions, subMode); + EXPECT_EQ(PhysX::ColliderComponentModeRequests::SubMode::Offset, subMode); } - TEST_F(PhysXColliderComponentModeTest, PressingKey2ShouldSetSizeMode) + TEST_F(PhysXColliderComponentModeTest, PressingKey2ShouldSetRotationMode) { // Given there is a collider component in component mode. auto colliderEntity = CreateColliderComponent(); @@ -143,14 +146,14 @@ namespace UnitTest PhysX::ColliderComponentModeRequests::SubMode subMode = PhysX::ColliderComponentModeRequests::SubMode::NumModes; PhysX::ColliderComponentModeRequestBus::BroadcastResult(subMode, &PhysX::ColliderComponentModeRequests::GetCurrentMode); - EXPECT_EQ(PhysX::ColliderComponentModeRequests::SubMode::Dimensions, subMode); + EXPECT_EQ(PhysX::ColliderComponentModeRequests::SubMode::Offset, subMode); // When the '2' key is pressed QTest::keyPress(&m_editorActions.m_componentModeWidget, Qt::Key_2); - // Then the component mode is set to Offset. + // Then the component mode is set to Rotation. PhysX::ColliderComponentModeRequestBus::BroadcastResult(subMode, &PhysX::ColliderComponentModeRequests::GetCurrentMode); - EXPECT_EQ(PhysX::ColliderComponentModeRequests::SubMode::Offset, subMode); + EXPECT_EQ(PhysX::ColliderComponentModeRequests::SubMode::Rotation, subMode); } TEST_F(PhysXColliderComponentModeTest, PressingKey3ShouldSetSizeMode) @@ -162,14 +165,14 @@ namespace UnitTest PhysX::ColliderComponentModeRequests::SubMode subMode = PhysX::ColliderComponentModeRequests::SubMode::NumModes; PhysX::ColliderComponentModeRequestBus::BroadcastResult(subMode, &PhysX::ColliderComponentModeRequests::GetCurrentMode); - EXPECT_EQ(PhysX::ColliderComponentModeRequests::SubMode::Dimensions, subMode); + EXPECT_EQ(PhysX::ColliderComponentModeRequests::SubMode::Offset, subMode); // When the '3' key is pressed QTest::keyPress(&m_editorActions.m_componentModeWidget, Qt::Key_3); - // Then the component mode is set to Rotation. + // Then the component mode is set to Size. PhysX::ColliderComponentModeRequestBus::BroadcastResult(subMode, &PhysX::ColliderComponentModeRequests::GetCurrentMode); - EXPECT_EQ(PhysX::ColliderComponentModeRequests::SubMode::Rotation, subMode); + EXPECT_EQ(PhysX::ColliderComponentModeRequests::SubMode::Dimensions, subMode); } TEST_F(PhysXColliderComponentModeTest, PressingKeyRShouldResetSphereRadius) @@ -292,7 +295,7 @@ namespace UnitTest // Check preconditions PhysX::ColliderComponentModeRequests::SubMode subMode = PhysX::ColliderComponentModeRequests::SubMode::NumModes; PhysX::ColliderComponentModeRequestBus::BroadcastResult(subMode, &PhysX::ColliderComponentModeRequests::GetCurrentMode); - EXPECT_EQ(PhysX::ColliderComponentModeRequests::SubMode::Dimensions, subMode); + EXPECT_EQ(PhysX::ColliderComponentModeRequests::SubMode::Offset, subMode); // Get the cluster and button Ids AzToolsFramework::ViewportUi::ClusterId modeSelectionClusterId; @@ -327,7 +330,7 @@ namespace UnitTest // Check preconditions PhysX::ColliderComponentModeRequests::SubMode subMode = PhysX::ColliderComponentModeRequests::SubMode::NumModes; PhysX::ColliderComponentModeRequestBus::BroadcastResult(subMode, &PhysX::ColliderComponentModeRequests::GetCurrentMode); - EXPECT_EQ(PhysX::ColliderComponentModeRequests::SubMode::Dimensions, subMode); + EXPECT_EQ(PhysX::ColliderComponentModeRequests::SubMode::Offset, subMode); // Get the cluster and button Ids AzToolsFramework::ViewportUi::ClusterId modeSelectionClusterId; @@ -362,7 +365,7 @@ namespace UnitTest // Check preconditions PhysX::ColliderComponentModeRequests::SubMode subMode = PhysX::ColliderComponentModeRequests::SubMode::NumModes; PhysX::ColliderComponentModeRequestBus::BroadcastResult(subMode, &PhysX::ColliderComponentModeRequests::GetCurrentMode); - EXPECT_EQ(PhysX::ColliderComponentModeRequests::SubMode::Dimensions, subMode); + EXPECT_EQ(PhysX::ColliderComponentModeRequests::SubMode::Offset, subMode); // Get the cluster and button Ids AzToolsFramework::ViewportUi::ClusterId modeSelectionClusterId; @@ -386,4 +389,52 @@ namespace UnitTest PhysX::ColliderComponentModeRequestBus::BroadcastResult(subMode, &PhysX::ColliderComponentModeRequests::GetCurrentMode); EXPECT_EQ(PhysX::ColliderComponentModeRequests::SubMode::Dimensions, subMode); } + + using PhysXColliderComponentModeManipulatorTest = + UnitTest::IndirectCallManipulatorViewportInteractionFixtureMixin; + + TEST_F(PhysXColliderComponentModeManipulatorTest, AssetScaleManipulatorsScaleInCorrectDirection) + { + auto colliderEntity = CreateColliderComponent(); + colliderEntity->FindComponent()->SetShapeType(Physics::ShapeType::PhysicsAsset); + colliderEntity->FindComponent()->SetAssetScale(AZ::Vector3::CreateOne()); + EnterComponentMode(); + PhysX::ColliderComponentModeRequestBus::Broadcast(&PhysX::ColliderComponentModeRequests::SetCurrentMode, + PhysX::ColliderComponentModeRequests::SubMode::Dimensions); + + // position the camera so the X axis manipulator will be flipped + AzFramework::SetCameraTransform( + m_cameraState, + AZ::Transform::CreateFromQuaternionAndTranslation( + AZ::Quaternion::CreateRotationZ(-AZ::Constants::QuarterPi), AZ::Vector3(-5.0f, -5.0f, 0.0f))); + + // select a point in world space slightly displaced from the position of the entity in the negative x direction + // in order to grab the X manipulator + const float x = 0.1f; + const float xDelta = 0.1f; + const AZ::Vector3 worldStart(-x, 0.0f, 0.0f); + + // position in world space to drag to + const AZ::Vector3 worldEnd(-(x + xDelta), 0.0f, 0.0f); + + const auto screenStart = AzFramework::WorldToScreen(worldStart, m_cameraState); + const auto screenEnd = AzFramework::WorldToScreen(worldEnd, m_cameraState); + + m_actionDispatcher + ->CameraState(m_cameraState) + // move the mouse to interact with the x scale manipulator + ->MousePosition(screenStart) + // drag to move the manipulator + ->MouseLButtonDown() + ->MousePosition(screenEnd) + ->MouseLButtonUp(); + + const auto worldToScreenMultiplier = 1.0f / AzToolsFramework::CalculateScreenToWorldMultiplier(worldStart, m_cameraState); + const auto assetScale = colliderEntity->FindComponent()->GetAssetScale(); + // need quite a large tolerance because using screen co-ordinates limits precision + const float tolerance = 0.01f; + EXPECT_NEAR(assetScale.GetX(), 1.0f + xDelta * worldToScreenMultiplier, tolerance); + EXPECT_NEAR(assetScale.GetY(), 1.0f, tolerance); + EXPECT_NEAR(assetScale.GetZ(), 1.0f, tolerance); + } } // namespace UnitTest diff --git a/Gems/PhysX/Code/Tests/PhysXJointsTest.cpp b/Gems/PhysX/Code/Tests/PhysXJointsTest.cpp index 3a7eac0884..8a624e0223 100644 --- a/Gems/PhysX/Code/Tests/PhysXJointsTest.cpp +++ b/Gems/PhysX/Code/Tests/PhysXJointsTest.cpp @@ -267,8 +267,6 @@ namespace PhysX EXPECT_GT(followerEndPosition.GetZ(), followerPosition.GetZ()); } -// for some reason TYPED_TEST_CASE with the fixture is not working on Android + Linux -#ifdef ENABLE_JOINTS_TYPED_TEST_CASE template class PhysXJointsApiTest : public PhysX::GenericPhysicsInterfaceTest { @@ -347,5 +345,4 @@ namespace PhysX EXPECT_GT(childCurrentPos.GetX(), this->m_childInitialPos.GetX()); } -#endif // ENABLE_JOINTS_TYPED_TEST_CASE } diff --git a/Gems/PhysX/Code/Tests/RagdollTests.cpp b/Gems/PhysX/Code/Tests/RagdollTests.cpp index 30e9400790..ff4637fd6e 100644 --- a/Gems/PhysX/Code/Tests/RagdollTests.cpp +++ b/Gems/PhysX/Code/Tests/RagdollTests.cpp @@ -367,4 +367,19 @@ namespace PhysX float minZ = ragdoll->GetAabb().GetMin().GetZ(); EXPECT_NEAR(minZ, 0.0f, 0.05f); } + + TEST(ComputeHierarchyDepthsTest, DepthValuesCorrect) + { + AZStd::vector parentIndices = + { 3, 5, AZStd::numeric_limits::max(), 1, 2, 9, 7, 4, 0, 6, 11, 12, 5, 14, 15, 16, 5, 18, 19, 4, 21, 22, 4 }; + + const AZStd::vector nodeDepths = Utils::Characters::ComputeHierarchyDepths(parentIndices); + + std::vector expectedDepths = { 8, 6, 0, 7, 1, 5, 3, 2, 9, 4, 8, 7, 6, 9, 8, 7, 6, 4, 3, 2, 4, 3, 2 }; + + for (size_t i = 0; i < parentIndices.size(); i++) + { + EXPECT_EQ(nodeDepths[i].m_depth, expectedDepths[i]); + } + } } // namespace PhysX diff --git a/Gems/PhysX/Code/Tests/TestColliderComponent.h b/Gems/PhysX/Code/Tests/TestColliderComponent.h index 91d3f16122..52b208ea80 100644 --- a/Gems/PhysX/Code/Tests/TestColliderComponent.h +++ b/Gems/PhysX/Code/Tests/TestColliderComponent.h @@ -67,13 +67,13 @@ namespace UnitTest private: AzToolsFramework::ComponentModeFramework::ComponentModeDelegate m_componentModeDelegate; - AZ::Vector3 m_offset; - AZ::Quaternion m_rotation; - AZ::Transform m_transform; - Physics::ShapeType m_shapeType; - float m_sphereRadius; - float m_capsuleHeight; - float m_capsuleRadius; - AZ::Vector3 m_assetScale; + AZ::Vector3 m_offset = AZ::Vector3::CreateZero(); + AZ::Quaternion m_rotation = AZ::Quaternion::CreateIdentity(); + AZ::Transform m_transform = AZ::Transform::CreateIdentity(); + Physics::ShapeType m_shapeType = Physics::ShapeType::PhysicsAsset; + float m_sphereRadius = 0.5f; + float m_capsuleHeight = 1.0f; + float m_capsuleRadius = 0.25f; + AZ::Vector3 m_assetScale = AZ::Vector3::CreateOne(); }; } // namespace UnitTest diff --git a/Gems/PhysX/gem.json b/Gems/PhysX/gem.json index bacbcf2dee..990d7502d8 100644 --- a/Gems/PhysX/gem.json +++ b/Gems/PhysX/gem.json @@ -2,6 +2,7 @@ "gem_name": "PhysX", "display_name": "PhysX", "license": "Apache-2.0 Or MIT", + "license_url": "https://github.com/o3de/o3de/blob/development/LICENSE.txt", "origin": "Open 3D Engine - o3de.org", "type": "Code", "summary": "The PhysX Gem provides physics simulation with NVIDIA PhysX including static and dynamic rigid body simulation, force regions, ragdolls, and dynamic PhysX joints.", diff --git a/Gems/PhysXDebug/Code/Source/EditorSystemComponent.h b/Gems/PhysXDebug/Code/Source/EditorSystemComponent.h index 14f37ef01e..fc0d60640c 100644 --- a/Gems/PhysXDebug/Code/Source/EditorSystemComponent.h +++ b/Gems/PhysXDebug/Code/Source/EditorSystemComponent.h @@ -32,7 +32,7 @@ namespace PhysXDebug static void GetProvidedServices(AZ::ComponentDescriptor::DependencyArrayType& provided) { - provided.push_back(AZ_CRC("PhysXDebugEditorService", 0xe3dde7d8)); + provided.push_back(AZ_CRC("PhysXDebugEditorService", 0xf8611967)); } static void GetRequiredServices(AZ::ComponentDescriptor::DependencyArrayType& required) diff --git a/Gems/PhysXDebug/Code/Source/SystemComponent.h b/Gems/PhysXDebug/Code/Source/SystemComponent.h index 83756f20f9..34c8142bac 100644 --- a/Gems/PhysXDebug/Code/Source/SystemComponent.h +++ b/Gems/PhysXDebug/Code/Source/SystemComponent.h @@ -16,7 +16,6 @@ #include #include -#include #include #include diff --git a/Gems/PhysXDebug/gem.json b/Gems/PhysXDebug/gem.json index ece0774210..2d9f4dc24d 100644 --- a/Gems/PhysXDebug/gem.json +++ b/Gems/PhysXDebug/gem.json @@ -2,6 +2,7 @@ "gem_name": "PhysXDebug", "display_name": "PhysX Debug", "license": "Apache-2.0 Or MIT", + "license_url": "https://github.com/o3de/o3de/blob/development/LICENSE.txt", "origin": "Open 3D Engine - o3de.org", "type": "Tool", "summary": "The PhysX Debug Gem provides debugging functionality and visualizations for NVIDIA PhysX in Open 3D Engine.", diff --git a/Gems/Prefab/PrefabBuilder/PrefabBuilderComponent.cpp b/Gems/Prefab/PrefabBuilder/PrefabBuilderComponent.cpp index a86d7b57e2..71464501ba 100644 --- a/Gems/Prefab/PrefabBuilder/PrefabBuilderComponent.cpp +++ b/Gems/Prefab/PrefabBuilder/PrefabBuilderComponent.cpp @@ -175,6 +175,8 @@ namespace AZ::Prefab const AzToolsFramework::Prefab::PrefabConversionUtils::PrefabProcessorContext::ProductAssetDependencyContainer& registeredDependencies, AZStd::vector& outputProducts) const { + using namespace AzToolsFramework::Prefab::PrefabConversionUtils; + outputProducts.reserve(store.size()); AZStd::vector data; @@ -211,17 +213,14 @@ namespace AZ::Prefab if (AssetBuilderSDK::OutputObject(&object.GetAsset(), object.GetAssetType(), productPath.String(), object.GetAssetType(), object.GetAsset().GetId().m_subId, product)) { - auto findRegisteredDependencies = registeredDependencies.find(object.GetAsset().GetId()); - if (findRegisteredDependencies != registeredDependencies.end()) - { - AZStd::transform(findRegisteredDependencies->second.begin(), findRegisteredDependencies->second.end(), - AZStd::back_inserter(product.m_dependencies), - [](const AZ::Data::AssetId& productId) -> AssetBuilderSDK::ProductDependency - { - return AssetBuilderSDK::ProductDependency(productId, - AZ::Data::ProductDependencyInfo::CreateFlags(AZ::Data::AssetLoadBehavior::NoLoad)); - }); - } + auto range = registeredDependencies.equal_range(object.GetAsset().GetId()); + AZStd::transform(range.first, range.second, + AZStd::back_inserter(product.m_dependencies), + [](const auto& dependency) -> AssetBuilderSDK::ProductDependency + { + return AssetBuilderSDK::ProductDependency( + dependency.second.m_assetId, AZ::Data::ProductDependencyInfo::CreateFlags(dependency.second.m_loadBehavior)); + }); outputProducts.push_back(AZStd::move(product)); } @@ -238,7 +237,7 @@ namespace AZ::Prefab bool PrefabBuilderComponent::ProcessPrefab( const AZ::PlatformTagSet& platformTags, const char* filePath, AZ::IO::PathView tempDirPath, const AZ::Uuid& sourceFileUuid, - AzToolsFramework::Prefab::PrefabDom& mutableRootDom, AZStd::vector& jobProducts) + AzToolsFramework::Prefab::PrefabDom&& rootDom, AZStd::vector& jobProducts) { AzToolsFramework::Prefab::PrefabConversionUtils::PrefabProcessorContext context(sourceFileUuid); AZStd::string rootPrefabName; @@ -248,7 +247,9 @@ namespace AZ::Prefab filePath); return false; } - context.AddPrefab(AZStd::move(rootPrefabName), AZStd::move(mutableRootDom)); + AzToolsFramework::Prefab::PrefabConversionUtils::PrefabDocument rootDocument(AZStd::move(rootPrefabName)); + rootDocument.SetPrefabDom(AZStd::move(rootDom)); + context.AddPrefab(AZStd::move(rootDocument)); context.SetPlatformTags(AZStd::move(platformTags)); @@ -320,8 +321,8 @@ namespace AZ::Prefab }); if (ProcessPrefab( - platformTags, request.m_fullPath.c_str(), request.m_tempDirPath.c_str(), request.m_sourceFileUUID, mutableRootDom, - response.m_outputProducts)) + platformTags, request.m_fullPath.c_str(), request.m_tempDirPath.c_str(), request.m_sourceFileUUID, + AZStd::move(mutableRootDom), response.m_outputProducts)) { response.m_resultCode = AssetBuilderSDK::ProcessJobResult_Success; } diff --git a/Gems/Prefab/PrefabBuilder/PrefabBuilderComponent.h b/Gems/Prefab/PrefabBuilder/PrefabBuilderComponent.h index 9ebdd690f5..73ef6b0426 100644 --- a/Gems/Prefab/PrefabBuilder/PrefabBuilderComponent.h +++ b/Gems/Prefab/PrefabBuilder/PrefabBuilderComponent.h @@ -53,7 +53,7 @@ namespace AZ::Prefab const AzToolsFramework::Prefab::PrefabDom& genericDocument); bool ProcessPrefab( const AZ::PlatformTagSet& platformTags, const char* filePath, AZ::IO::PathView tempDirPath, const AZ::Uuid& sourceFileUuid, - AzToolsFramework::Prefab::PrefabDom& mutableRootDom, + AzToolsFramework::Prefab::PrefabDom&& rootDom, AZStd::vector& jobProducts); protected: diff --git a/Gems/Prefab/PrefabBuilder/PrefabBuilderTests.cpp b/Gems/Prefab/PrefabBuilder/PrefabBuilderTests.cpp index ab6770c3fe..5ee23a9e3c 100644 --- a/Gems/Prefab/PrefabBuilder/PrefabBuilderTests.cpp +++ b/Gems/Prefab/PrefabBuilder/PrefabBuilderTests.cpp @@ -102,9 +102,12 @@ namespace UnitTest prefabBuilderComponent.Activate(); AZStd::vector jobProducts; - auto&& prefabDom = prefabSystemComponentInterface->FindTemplateDom(parentInstance->GetTemplateId()); + // Make a copy of the template DOM, as the prefab system still owns the existing template + AzToolsFramework::Prefab::PrefabDom prefabDom; + prefabDom.CopyFrom(prefabSystemComponentInterface->FindTemplateDom(parentInstance->GetTemplateId()), prefabDom.GetAllocator(), false); - ASSERT_TRUE(prefabBuilderComponent.ProcessPrefab({AZ::Crc32("pc")}, "parent.prefab", "unused", AZ::Uuid(), prefabDom, jobProducts)); + ASSERT_TRUE(prefabBuilderComponent.ProcessPrefab( + { AZ::Crc32("pc") }, "parent.prefab", "unused", AZ::Uuid(), AZStd::move(prefabDom), jobProducts)); ASSERT_EQ(jobProducts.size(), 1); ASSERT_EQ(jobProducts[0].m_dependencies.size(), 1); @@ -174,7 +177,9 @@ namespace UnitTest AZ::SettingsRegistryInterface* registry = AZ::SettingsRegistry::Get(); auto projectPathKey = AZ::SettingsRegistryInterface::FixedValueString(AZ::SettingsRegistryMergeUtils::BootstrapSettingsRootKey) + "/project_path"; - registry->Set(projectPathKey, "AutomatedTesting"); + AZ::IO::FixedMaxPath enginePath; + registry->Get(enginePath.Native(), AZ::SettingsRegistryMergeUtils::FilePathKey_EngineRootFolder); + registry->Set(projectPathKey, (enginePath / "AutomatedTesting").Native()); AZ::SettingsRegistryMergeUtils::MergeSettingsToRegistry_AddRuntimeFilePaths(*registry); AZ::ComponentApplication::Descriptor desc; diff --git a/Gems/Prefab/PrefabBuilder/PrefabGroup/PrefabBehaviorTests.cpp b/Gems/Prefab/PrefabBuilder/PrefabGroup/PrefabBehaviorTests.cpp index 856aba979b..6ccc82652b 100644 --- a/Gems/Prefab/PrefabBuilder/PrefabGroup/PrefabBehaviorTests.cpp +++ b/Gems/Prefab/PrefabBuilder/PrefabGroup/PrefabBehaviorTests.cpp @@ -136,6 +136,12 @@ namespace UnitTest auto jsonOutcome = AZ::JsonSerializationUtils::ReadJsonString(Data::jsonPrefab); ASSERT_TRUE(jsonOutcome); + // Register the asset to generate an AssetId in the catalog + AZ::Data::AssetId assetId; + AZ::Data::AssetCatalogRequestBus::BroadcastResult( + assetId, &AZ::Data::AssetCatalogRequestBus::Events::GetAssetIdByPath, "fake_prefab.procprefab", + azrtti_typeid(), true); + auto prefabGroup = AZStd::make_shared(); prefabGroup.get()->SetId(AZ::Uuid::CreateRandom()); prefabGroup.get()->SetName("fake_prefab"); diff --git a/Gems/Prefab/PrefabBuilder/PrefabGroup/ProceduralAssetHandler.cpp b/Gems/Prefab/PrefabBuilder/PrefabGroup/ProceduralAssetHandler.cpp index 17ed4d9c0c..bcfedad8a8 100644 --- a/Gems/Prefab/PrefabBuilder/PrefabGroup/ProceduralAssetHandler.cpp +++ b/Gems/Prefab/PrefabBuilder/PrefabGroup/ProceduralAssetHandler.cpp @@ -8,12 +8,16 @@ #include #include +#include #include #include -#include +#include +#include +#include #include +#include #include -#include +#include namespace AZ::Prefab { @@ -21,6 +25,7 @@ namespace AZ::Prefab class PrefabGroupAssetHandler::AssetTypeInfoHandler final : public AZ::AssetTypeInfoBus::Handler + , protected AzToolsFramework::AssetBrowser::AssetBrowserInteractionNotificationBus::Handler { public: AZ_CLASS_ALLOCATOR(AssetTypeInfoHandler, AZ::SystemAllocator, 0); @@ -31,15 +36,21 @@ namespace AZ::Prefab const char* GetGroup() const override; const char* GetBrowserIcon() const override; void GetAssetTypeExtensions(AZStd::vector& extensions) override; + + // AzToolsFramework::AssetBrowser::AssetBrowserInteractionNotificationBus::Handler + void AddContextMenuActions(QWidget* caller, QMenu* menu, const AZStd::vector& entries) override; + bool SaveAsAuthoredPrefab(const AZ::Data::AssetId& assetId, const char* destinationFilename); }; PrefabGroupAssetHandler::AssetTypeInfoHandler::AssetTypeInfoHandler() { AZ::AssetTypeInfoBus::Handler::BusConnect(azrtti_typeid()); + AzToolsFramework::AssetBrowser::AssetBrowserInteractionNotificationBus::Handler::BusConnect(); } PrefabGroupAssetHandler::AssetTypeInfoHandler::~AssetTypeInfoHandler() { + AzToolsFramework::AssetBrowser::AssetBrowserInteractionNotificationBus::Handler::BusDisconnect(); AZ::AssetTypeInfoBus::Handler::BusDisconnect(azrtti_typeid()); } @@ -68,6 +79,84 @@ namespace AZ::Prefab extensions.push_back(PrefabGroupAssetHandler::s_Extension); } + void PrefabGroupAssetHandler::AssetTypeInfoHandler::AddContextMenuActions( + [[maybe_unused]] QWidget* caller, + QMenu* menu, + const AZStd::vector& entries) + { + using namespace AzToolsFramework::AssetBrowser; + auto entryIt = AZStd::find_if + ( + entries.begin(), + entries.end(), + [](const AssetBrowserEntry* entry) -> bool + { + return entry->GetEntryType() == AssetBrowserEntry::AssetEntryType::Product; + } + ); + + if (entryIt == entries.end()) + { + return; + } + else if ((*entryIt)->GetEntryType() == AssetBrowserEntry::AssetEntryType::Product) + { + ProductAssetBrowserEntry* product = azrtti_cast(*entryIt); + if (product->GetAssetType() == azrtti_typeid()) + { + AZ::Data::AssetId assetId = product->GetAssetId(); + menu->addAction("Save as Prefab...", [assetId, this]() + { + QString filePath = AzQtComponents::FileDialog::GetSaveFileName(nullptr, QString("Save to file"), "", QString("Prefab file (*.prefab)")); + if (filePath.isEmpty()) + { + return; + } + if (SaveAsAuthoredPrefab(assetId, filePath.toUtf8().data())) + { + AZ_Printf("Prefab", "Prefab was saved to a .prefab file %s", filePath.toUtf8().data()); + } + }); + } + } + } + + bool PrefabGroupAssetHandler::AssetTypeInfoHandler::SaveAsAuthoredPrefab(const AZ::Data::AssetId& assetId, const char* destinationFilename) + { + using namespace AzToolsFramework::Prefab; + using namespace AZ::Data; + + auto procPrefabAsset = AssetManager::Instance().GetAsset(assetId, AssetLoadBehavior::Default); + const auto status = AssetManager::Instance().BlockUntilLoadComplete(procPrefabAsset); + if (status != AssetData::AssetStatus::Ready) + { + return false; + } + + auto* prefabLoaderInterface = AZ::Interface::Get(); + if (!prefabLoaderInterface) + { + return false; + } + + const auto templateId = procPrefabAsset.GetAs()->GetTemplateId(); + AZStd::string outputJson; + if (prefabLoaderInterface->SaveTemplateToString(templateId, outputJson) == false) + { + return false; + } + + const auto fileMode = AZ::IO::OpenMode::ModeWrite | AZ::IO::OpenMode::ModeCreatePath | AZ::IO::OpenMode::ModeText; + AZ::IO::FileIOStream outputFileStream; + if (outputFileStream.Open(destinationFilename, fileMode) == false) + { + return false; + } + + outputFileStream.Write(outputJson.size(), outputJson.data()); + return true; + } + // PrefabGroupAssetHandler AZStd::string_view PrefabGroupAssetHandler::s_Extension{ "procprefab" }; diff --git a/Gems/Prefab/PrefabBuilder/gem.json b/Gems/Prefab/PrefabBuilder/gem.json index ba78f96358..2233a7235e 100644 --- a/Gems/Prefab/PrefabBuilder/gem.json +++ b/Gems/Prefab/PrefabBuilder/gem.json @@ -2,6 +2,7 @@ "gem_name": "PrefabBuilder", "display_name": "Prefab Builder", "license": "Apache-2.0 Or MIT", + "license_url": "https://github.com/o3de/o3de/blob/development/LICENSE.txt", "origin": "Open 3D Engine - o3de.org", "type": "Code", "summary": "The Prefab Builder Gem provides an Asset Processor module for prefabs, which are complex assets built by combining smaller entities.", diff --git a/Gems/Presence/gem.json b/Gems/Presence/gem.json index a70953ae4e..624af2e62d 100644 --- a/Gems/Presence/gem.json +++ b/Gems/Presence/gem.json @@ -2,6 +2,7 @@ "gem_name": "Presence", "display_name": "Presence", "license": "Apache-2.0 Or MIT", + "license_url": "https://github.com/o3de/o3de/blob/development/LICENSE.txt", "origin": "Open 3D Engine - o3de.org", "type": "Code", "summary": "The Presence Gem provides a target platform agnostic interface for Presence services.", diff --git a/Gems/PrimitiveAssets/gem.json b/Gems/PrimitiveAssets/gem.json index 4ad3cb62ad..0e4c4689dc 100644 --- a/Gems/PrimitiveAssets/gem.json +++ b/Gems/PrimitiveAssets/gem.json @@ -2,6 +2,7 @@ "gem_name": "PrimitiveAssets", "display_name": "Primitive Assets", "license": "Apache-2.0 Or MIT", + "license_url": "https://github.com/o3de/o3de/blob/development/LICENSE.txt", "origin": "Open 3D Engine - o3de.org", "type": "Asset", "summary": "The Primitive Assets Gem provides primitive shape mesh assets with physics enabled.", diff --git a/Gems/Profiler/Code/Source/CpuProfiler.h b/Gems/Profiler/Code/Source/CpuProfiler.h index 23130efa63..9235ac7da9 100644 --- a/Gems/Profiler/Code/Source/CpuProfiler.h +++ b/Gems/Profiler/Code/Source/CpuProfiler.h @@ -8,7 +8,6 @@ #pragma once -#include #include #include #include diff --git a/Gems/Profiler/Code/Source/CpuProfilerImpl.cpp b/Gems/Profiler/Code/Source/CpuProfilerImpl.cpp index c88afdecd0..c9b32565d9 100644 --- a/Gems/Profiler/Code/Source/CpuProfilerImpl.cpp +++ b/Gems/Profiler/Code/Source/CpuProfilerImpl.cpp @@ -8,7 +8,6 @@ #include -#include #include #include #include @@ -282,7 +281,7 @@ namespace Profiler m_stackLevel = 0; m_cachedTimeRegionMap.clear(); m_timeRegionStack.clear(); - m_cachedTimeRegions.clear(); + ResetCachedData(); } timeRegion.m_stackDepth = aznumeric_cast(m_stackLevel); @@ -325,12 +324,26 @@ namespace Profiler // Gets called when region ends and all data is set void CpuTimingLocalStorage::AddCachedRegion(const CachedTimeRegion& timeRegionCached) { - if (m_hitSizeLimitMap[timeRegionCached.m_groupRegionName.m_regionName]) + if (auto iter = m_hitSizeLimitMap.find(timeRegionCached.m_groupRegionName.m_regionName); + iter != m_hitSizeLimitMap.end() && iter->second) { return; } - // Add an entry to the cached region - m_cachedTimeRegions.push_back(timeRegionCached); + // Add an entry to the cached region. Discard excess data in case there is too much to handle. + if (m_cachedTimeRegions.size() < TimeRegionStackSize) + { + m_cachedTimeRegions.push_back(timeRegionCached); + } + // Warn only once per thread if the cached data limit has been reached. + else if (!m_cachedDataLimitReached) + { + AZ_Warning( + "Profiler", false, + "Limit for profiling data has been reached by thread %i. Excess data will be discarded. Considering moving or reducing " + "profiler markers to prevent data loss.", + m_executingThreadId); + m_cachedDataLimitReached = true; + } // If the stack is empty, add it to the local cache map. Only gets called when the stack is empty // NOTE: this is where the largest overhead will be, but due to it only being called when the stack is empty @@ -354,7 +367,7 @@ namespace Profiler } // Clear the cached regions - m_cachedTimeRegions.clear(); + ResetCachedData(); } } @@ -371,10 +384,17 @@ namespace Profiler m_cachedTimeRegionMap.clear(); m_hitSizeLimitMap.clear(); } + m_cachedTimeRegionMutex.unlock(); } } + void CpuTimingLocalStorage::ResetCachedData() + { + m_cachedTimeRegions.clear(); + m_cachedDataLimitReached = false; + } + // --- CpuProfilingStatisticsSerializer --- CpuProfilingStatisticsSerializer::CpuProfilingStatisticsSerializer(const AZStd::ring_buffer& continuousData) diff --git a/Gems/Profiler/Code/Source/CpuProfilerImpl.h b/Gems/Profiler/Code/Source/CpuProfilerImpl.h index 1046b72cff..c97e45e69c 100644 --- a/Gems/Profiler/Code/Source/CpuProfilerImpl.h +++ b/Gems/Profiler/Code/Source/CpuProfilerImpl.h @@ -50,6 +50,9 @@ namespace Profiler // Tries to flush the map to the passed parameter, only if the thread's mutex is unlocked void TryFlushCachedMap(CpuProfiler::ThreadTimeRegionMap& cachedRegionMap); + // Clears m_cachedTimeRegions and resets m_cachedDataLimitReached flag. + void ResetCachedData(); + AZStd::thread_id m_executingThreadId; // Keeps track of the current thread's stack depth uint32_t m_stackLevel = 0u; @@ -75,6 +78,9 @@ namespace Profiler // Keep track of the regions that have hit the size limit so we don't have to lock to check AZStd::map m_hitSizeLimitMap; + + // Keeps track of the first time cached data limit was reached. + bool m_cachedDataLimitReached = false; }; //! CpuProfiler will keep track of the registered threads, and @@ -144,7 +150,7 @@ namespace Profiler AZStd::mutex m_continuousCaptureEndingMutex; - AZStd::atomic_bool m_continuousCaptureInProgress; + AZStd::atomic_bool m_continuousCaptureInProgress = false; // Stores multiple frames of profiling data, size is controlled by MaxFramesToSave. Flushed when EndContinuousCapture is called. // Ring buffer so that we can have fast append of new data + removal of old profiling data with good cache locality. diff --git a/Gems/Profiler/Code/Source/ImGuiCpuProfiler.cpp b/Gems/Profiler/Code/Source/ImGuiCpuProfiler.cpp index 26c2f9f974..27397f05f7 100644 --- a/Gems/Profiler/Code/Source/ImGuiCpuProfiler.cpp +++ b/Gems/Profiler/Code/Source/ImGuiCpuProfiler.cpp @@ -15,6 +15,7 @@ #include #include #include +#include #include #include #include @@ -23,9 +24,13 @@ #include #include #include +#include namespace Profiler { + constexpr AZStd::sys_time_t ProfilerViewEdgePadding = 5000; + constexpr size_t InitialCpuTimingStatsAllocation = 8; + namespace CpuProfilerImGuiHelper { float TicksToMs(double ticks) @@ -371,6 +376,7 @@ namespace Profiler DrawTable(); } + ImGui::EndChild(); } void ImGuiCpuProfiler::DrawFilePicker() @@ -435,6 +441,11 @@ namespace Profiler m_tableData.clear(); m_groupRegionMap.clear(); + // Since we don't serialize the frame boundaries, we will use "Component application simulation tick" from + // ComponentApplication::Tick as a heuristic. + static const AZ::Name::Hash frameBoundaryHash = AZ::Name("Component application simulation tick").GetHash(); + + AZStd::sys_time_t frameTime = 0; for (const auto& entry : deserializedData) { const auto [groupNameItr, wasGroupNameInserted] = m_deserializedStringPool.emplace(entry.m_groupName.GetCStr()); @@ -445,10 +456,12 @@ namespace Profiler const CachedTimeRegion newRegion(*groupRegionNameItr, entry.m_stackDepth, entry.m_startTick, entry.m_endTick); m_savedData[entry.m_threadId].push_back(newRegion); - // Since we don't serialize the frame boundaries, we need to use the RPI's OnSystemTick event as a heuristic. - const static AZ::Name frameBoundaryName = AZ::Name("RPISystem: OnSystemTick"); - if (entry.m_regionName == frameBoundaryName) + if (entry.m_regionName.GetHash() == frameBoundaryHash) { + if (!m_frameEndTicks.empty()) + { + frameTime = entry.m_endTick - m_frameEndTicks.back(); + } m_frameEndTicks.push_back(entry.m_endTick); } @@ -462,9 +475,9 @@ namespace Profiler m_groupRegionMap[*groupNameItr][*regionNameItr].RecordRegion(newRegion, entry.m_threadId); } - // Update viewport bounds with some added UX fudge factor - m_viewportStartTick = deserializedData.back().m_startTick - 1000; - m_viewportEndTick = deserializedData.back().m_endTick + 1000; + // Update viewport bounds to the estimated final frame time with some padding + m_viewportStartTick = m_frameEndTicks.back() - frameTime - ProfilerViewEdgePadding; + m_viewportEndTick = m_frameEndTicks.back() + ProfilerViewEdgePadding; // Invariant: each vector in m_savedData must be sorted so that we can efficiently cull region data. for (auto& [threadId, singleThreadData] : m_savedData) @@ -586,8 +599,9 @@ namespace Profiler DrawFrameBoundaries(); - // Draw an invisible button to capture inputs - ImGui::InvisibleButton("Timeline Input", { ImGui::GetWindowContentRegionWidth(), baseRow * RowHeight }); + // Draw an invisible button to capture inputs and make sure it has a non-zero height + ImGui::InvisibleButton("Timeline Input", + { ImGui::GetWindowContentRegionWidth(), AZ::GetMax(baseRow, decltype(baseRow){1}) * RowHeight }); // Controls ImGuiIO& io = ImGui::GetIO(); @@ -632,7 +646,9 @@ namespace Profiler } } } - ImGui::EndChild(); + ImGui::EndChild(); // "Timeline" + + ImGui::EndChild(); // "Options and Statistics" } void ImGuiCpuProfiler::CacheCpuTimingStatistics() @@ -642,21 +658,13 @@ namespace Profiler m_cpuTimingStatisticsWhenPause.clear(); if (auto statsProfiler = AZ::Interface::Get(); statsProfiler) { - auto& rhiMetrics = statsProfiler->GetProfiler(AZ_CRC_CE("RHI")); - - const NamedRunningStatistic* frameTimeMetric = rhiMetrics.GetStatistic(AZ_CRC_CE("Frame to Frame Time")); - if (frameTimeMetric) - { - m_frameToFrameTime = static_cast(frameTimeMetric->GetMostRecentSample()); - } - AZStd::vector statistics; - rhiMetrics.GetStatsManager().GetAllStatistics(statistics); + statistics.reserve(InitialCpuTimingStatsAllocation); + statsProfiler->GetAllStatisticsOfUnits(statistics, "clocks"); for (NamedRunningStatistic* stat : statistics) { m_cpuTimingStatisticsWhenPause.push_back({ stat->GetName(), stat->GetMostRecentSample() }); - stat->Reset(); } } } @@ -731,7 +739,11 @@ namespace Profiler void ImGuiCpuProfiler::CullFrameData() { - const AZStd::sys_time_t deleteBeforeTick = AZStd::GetTimeNowTicks() - m_frameToFrameTime * m_framesToCollect; + const AZ::TimeUs delta = AZ::GetRealTickDeltaTimeUs(); + const float deltaTimeInSeconds = AZ::TimeUsToSeconds(delta); + const AZStd::sys_time_t frameToFrameTime = static_cast(deltaTimeInSeconds * AZStd::GetTimeTicksPerSecond()); + + const AZStd::sys_time_t deleteBeforeTick = AZStd::GetTimeNowTicks() - frameToFrameTime * m_framesToCollect; // Remove old frame boundary data auto firstBoundaryToKeepItr = AZStd::upper_bound(m_frameEndTicks.begin(), m_frameEndTicks.end(), deleteBeforeTick); diff --git a/Gems/Profiler/Code/Source/ImGuiCpuProfiler.h b/Gems/Profiler/Code/Source/ImGuiCpuProfiler.h index 2e01b8fd6b..d5d27632f8 100644 --- a/Gems/Profiler/Code/Source/ImGuiCpuProfiler.h +++ b/Gems/Profiler/Code/Source/ImGuiCpuProfiler.h @@ -89,7 +89,7 @@ namespace Profiler struct CpuTimingEntry { const AZStd::string& m_name; - double m_executeDuration; + double m_executeDuration = 0; }; ImGuiCpuProfiler() = default; @@ -175,8 +175,8 @@ namespace Profiler AZ::u64 m_savedRegionCount = 0; // Viewport tick bounds, these are used to convert tick space -> screen space and cull so we only draw onscreen objects - AZStd::sys_time_t m_viewportStartTick; - AZStd::sys_time_t m_viewportEndTick; + AZStd::sys_time_t m_viewportStartTick = 0; + AZStd::sys_time_t m_viewportEndTick = 0; // Map to store each thread's TimeRegions, individual vectors are sorted by start tick // note: we use size_t as a proxy for thread_id because native_thread_id_type differs differs from @@ -215,7 +215,6 @@ namespace Profiler // Last captured CPU timing statistics AZStd::vector m_cpuTimingStatisticsWhenPause; - AZStd::sys_time_t m_frameToFrameTime{}; AZ::IO::FixedMaxPath m_lastCapturedFilePath; diff --git a/Gems/Profiler/gem.json b/Gems/Profiler/gem.json index 2f121d7618..b160bc4b3c 100644 --- a/Gems/Profiler/gem.json +++ b/Gems/Profiler/gem.json @@ -2,6 +2,7 @@ "gem_name": "Profiler", "display_name": "Profiler", "license": "Apache-2.0 Or MIT", + "license_url": "https://github.com/o3de/o3de/blob/development/LICENSE.txt", "origin": "Open 3D Engine - o3de.org", "type": "Code", "summary": "A collection of utilities for capturing performance data", diff --git a/Gems/PythonAssetBuilder/Code/Include/PythonAssetBuilder/PythonBuilderRequestBus.h b/Gems/PythonAssetBuilder/Code/Include/PythonAssetBuilder/PythonBuilderRequestBus.h deleted file mode 100644 index e88d793189..0000000000 --- a/Gems/PythonAssetBuilder/Code/Include/PythonAssetBuilder/PythonBuilderRequestBus.h +++ /dev/null @@ -1,38 +0,0 @@ -/* - * Copyright (c) Contributors to the Open 3D Engine Project. - * For complete copyright and license terms please see the LICENSE at the root of this distribution. - * - * SPDX-License-Identifier: Apache-2.0 OR MIT - * - */ - -#pragma once - -#include -#include - -namespace PythonAssetBuilder -{ - //! A request bus to help produce Open 3D Engine asset data - class PythonBuilderRequests - : public AZ::EBusTraits - { - public: - ////////////////////////////////////////////////////////////////////////// - // EBusTraits overrides - static const AZ::EBusHandlerPolicy HandlerPolicy = AZ::EBusHandlerPolicy::Single; - static const AZ::EBusAddressPolicy AddressPolicy = AZ::EBusAddressPolicy::Single; - ////////////////////////////////////////////////////////////////////////// - - //! Creates an AZ::Entity populated with Editor components and a name - virtual AZ::Outcome CreateEditorEntity(const AZStd::string& name) = 0; - - //! Writes out a .SLICE file with a given list of entities; optionally can be set to dynamic - virtual AZ::Outcome WriteSliceFile( - AZStd::string_view filename, - AZStd::vector entityList, - bool makeDynamic) = 0; - }; - - using PythonBuilderRequestBus = AZ::EBus; -} diff --git a/Gems/PythonAssetBuilder/Code/Source/PythonAssetBuilderModule.cpp b/Gems/PythonAssetBuilder/Code/Source/PythonAssetBuilderModule.cpp index d7143a159a..2675855e4b 100644 --- a/Gems/PythonAssetBuilder/Code/Source/PythonAssetBuilderModule.cpp +++ b/Gems/PythonAssetBuilder/Code/Source/PythonAssetBuilderModule.cpp @@ -9,12 +9,15 @@ #include #include +#include + #include namespace PythonAssetBuilder { class PythonAssetBuilderModule : public AZ::Module + , public AzToolsFramework::EmbeddedPython::PythonLoader { public: AZ_RTTI(PythonAssetBuilderModule, "{35C9457E-54C2-474C-AEBE-5A70CC1D435D}", AZ::Module); @@ -31,9 +34,7 @@ namespace PythonAssetBuilder // Add required SystemComponents to the SystemEntity. AZ::ComponentTypeList GetRequiredSystemComponents() const override { - return AZ::ComponentTypeList { - azrtti_typeid(), - }; + return AZ::ComponentTypeList{}; } }; } diff --git a/Gems/PythonAssetBuilder/Code/Source/PythonAssetBuilderSystemComponent.cpp b/Gems/PythonAssetBuilder/Code/Source/PythonAssetBuilderSystemComponent.cpp index 5a233e6656..36822bc656 100644 --- a/Gems/PythonAssetBuilder/Code/Source/PythonAssetBuilderSystemComponent.cpp +++ b/Gems/PythonAssetBuilder/Code/Source/PythonAssetBuilderSystemComponent.cpp @@ -8,7 +8,6 @@ #include #include -#include #include #include @@ -57,13 +56,6 @@ namespace PythonAssetBuilder ->Event("RegisterAssetBuilder", &PythonAssetBuilderRequestBus::Events::RegisterAssetBuilder) ->Event("GetExecutableFolder", &PythonAssetBuilderRequestBus::Events::GetExecutableFolder) ; - - behaviorContext->EBus("PythonBuilderRequestBus") - ->Attribute(AZ::Script::Attributes::Scope, AZ::Script::Attributes::ScopeFlags::Automation) - ->Attribute(AZ::Script::Attributes::Module, "asset.entity") - ->Event("WriteSliceFile", &PythonBuilderRequestBus::Events::WriteSliceFile) - ->Event("CreateEditorEntity", &PythonBuilderRequestBus::Events::CreateEditorEntity) - ; } } @@ -97,13 +89,10 @@ namespace PythonAssetBuilder { pythonInterface->StartPython(true); } - - PythonBuilderRequestBus::Handler::BusConnect(); } void PythonAssetBuilderSystemComponent::Deactivate() { - PythonBuilderRequestBus::Handler::BusDisconnect(); m_messageSink.reset(); if (PythonAssetBuilderRequestBus::HasHandlers()) @@ -148,109 +137,4 @@ namespace PythonAssetBuilder } return AZ::Failure(AZStd::string("GetExecutableFolder access is missing.")); } - - AZ::Outcome PythonAssetBuilderSystemComponent::CreateEditorEntity(const AZStd::string& name) - { - AZ::EntityId entityId; - AzToolsFramework::EditorEntityContextRequestBus::BroadcastResult( - entityId, - &AzToolsFramework::EditorEntityContextRequestBus::Events::CreateNewEditorEntity, - name.c_str()); - - if (entityId.IsValid() == false) - { - return AZ::Failure("Failed to CreateNewEditorEntity."); - } - - AZ::Entity* entity = nullptr; - AZ::ComponentApplicationBus::BroadcastResult(entity, &AZ::ComponentApplicationRequests::FindEntity, entityId); - - if (entity == nullptr) - { - return AZ::Failure(AZStd::string::format("Failed to find created entityId %s", entityId.ToString().c_str())); - } - - entity->Deactivate(); - - AzToolsFramework::EditorEntityContextRequestBus::Broadcast( - &AzToolsFramework::EditorEntityContextRequestBus::Events::AddRequiredComponents, - *entity); - - entity->Activate(); - - return AZ::Success(entityId); - } - - AZ::Outcome PythonAssetBuilderSystemComponent::WriteSliceFile( - AZStd::string_view filename, - AZStd::vector entityList, - bool makeDynamic) - { - using namespace AzToolsFramework::SliceUtilities; - - AZ::SerializeContext* serializeContext = nullptr; - AZ::ComponentApplicationBus::BroadcastResult(serializeContext, &AZ::ComponentApplicationBus::Events::GetSerializeContext); - if (serializeContext == nullptr) - { - return AZ::Failure("GetSerializeContext failed"); - } - - // transaction->Commit() requires the "@user@" alias - auto settingsRegistry = AZ::SettingsRegistry::Get(); - auto ioBase = AZ::IO::FileIOBase::GetInstance(); - if (ioBase->GetAlias("@user@") == nullptr) - { - if (AZ::IO::Path userPath; settingsRegistry->Get(userPath.Native(), AZ::SettingsRegistryMergeUtils::FilePathKey_ProjectUserPath)) - { - userPath /= "AssetProcessorTemp"; - ioBase->SetAlias("@user@", userPath.c_str()); - } - } - - // transaction->Commit() expects the file to exist and write-able - AZ::IO::HandleType fileHandle; - AZ::IO::LocalFileIO::GetInstance()->Open(filename.data(), AZ::IO::OpenMode::ModeWrite, fileHandle); - if (fileHandle == AZ::IO::InvalidHandle) - { - return AZ::Failure( - AZStd::string::format("Failed to create slice file %.*s", aznumeric_cast(filename.size()), filename.data())); - } - AZ::IO::LocalFileIO::GetInstance()->Close(fileHandle); - - AZ::u32 creationFlags = 0; - if (makeDynamic) - { - creationFlags |= SliceTransaction::CreateAsDynamic; - } - - SliceTransaction::TransactionPtr transaction = SliceTransaction::BeginNewSlice(nullptr, serializeContext, creationFlags); - - // add entities - for (const AZ::EntityId& entityId : entityList) - { - auto addResult = transaction->AddEntity(entityId, SliceTransaction::SliceAddEntityFlags::DiscardSliceAncestry); - if (!addResult) - { - return AZ::Failure(AZStd::string::format("Failed slice add entity: %s", addResult.GetError().c_str())); - } - } - - // commit to a file - AZ::Data::AssetType sliceAssetType; - auto resultCommit = transaction->Commit(filename.data(), nullptr, [&sliceAssetType]( - SliceTransaction::TransactionPtr transactionPtr, - [[maybe_unused]] const char* fullPath, - const SliceTransaction::SliceAssetPtr& sliceAssetPtr) - { - sliceAssetType = sliceAssetPtr->GetType(); - return AZ::Success(); - }); - - if (!resultCommit) - { - return AZ::Failure(AZStd::string::format("Failed commit slice: %s", resultCommit.GetError().c_str())); - } - - return AZ::Success(sliceAssetType); - } } diff --git a/Gems/PythonAssetBuilder/Code/Source/PythonAssetBuilderSystemComponent.h b/Gems/PythonAssetBuilder/Code/Source/PythonAssetBuilderSystemComponent.h index 8bb2512308..278df0873d 100644 --- a/Gems/PythonAssetBuilder/Code/Source/PythonAssetBuilderSystemComponent.h +++ b/Gems/PythonAssetBuilder/Code/Source/PythonAssetBuilderSystemComponent.h @@ -11,7 +11,6 @@ #include #include -#include namespace PythonAssetBuilder { @@ -21,7 +20,6 @@ namespace PythonAssetBuilder class PythonAssetBuilderSystemComponent : public AZ::Component , protected PythonAssetBuilderRequestBus::Handler - , protected PythonBuilderRequestBus::Handler { public: AZ_COMPONENT(PythonAssetBuilderSystemComponent, "{E2872C13-D103-4534-9A95-76A66C8DDB5D}"); @@ -42,13 +40,6 @@ namespace PythonAssetBuilder AZ::Outcome RegisterAssetBuilder(const AssetBuilderSDK::AssetBuilderDesc& desc) override; AZ::Outcome GetExecutableFolder() const override; - // PythonBuilderRequestBus - AZ::Outcome CreateEditorEntity(const AZStd::string& name) override; - AZ::Outcome WriteSliceFile( - AZStd::string_view filename, - AZStd::vector entityList, - bool makeDynamic) override; - private: using PythonBuilderWorkerPointer = AZStd::shared_ptr; using PythonBuilderWorkerMap = AZStd::unordered_map; diff --git a/Gems/PythonAssetBuilder/Code/Tests/PythonAssetBuilderTest.cpp b/Gems/PythonAssetBuilder/Code/Tests/PythonAssetBuilderTest.cpp index fb30264b66..ee9ff71b5a 100644 --- a/Gems/PythonAssetBuilder/Code/Tests/PythonAssetBuilderTest.cpp +++ b/Gems/PythonAssetBuilder/Code/Tests/PythonAssetBuilderTest.cpp @@ -14,7 +14,6 @@ #include "Source/PythonAssetBuilderSystemComponent.h" #include -#include #include #include @@ -87,65 +86,6 @@ namespace UnitTest &PythonAssetBuilderRequestBus::Events::GetExecutableFolder); EXPECT_TRUE(result.IsSuccess()); } - - // test bus API exists - - TEST_F(PythonAssetBuilderTest, PythonBuilderRequestBus_CreateEditorEntity_Exists) - { - using namespace PythonAssetBuilder; - - EXPECT_FALSE(PythonBuilderRequestBus::HasHandlers()); - - // Some static tests to make sure the public API has not changed since that - // would break Python asset builders using this EBus - { - AZ::Outcome result; - AZStd::string name; - PythonBuilderRequestBus::BroadcastResult( - result, - &PythonBuilderRequestBus::Events::CreateEditorEntity, - name); - EXPECT_FALSE(result.IsSuccess()); - } - - m_app->RegisterComponentDescriptor(PythonAssetBuilderSystemComponent::CreateDescriptor()); - m_systemEntity->CreateComponent(); - m_systemEntity->Init(); - m_systemEntity->Activate(); - - EXPECT_TRUE(PythonBuilderRequestBus::HasHandlers()); - } - - TEST_F(PythonAssetBuilderTest, PythonBuilderRequestBus_WriteSliceFile_Exists) - { - using namespace PythonAssetBuilder; - - EXPECT_FALSE(PythonBuilderRequestBus::HasHandlers()); - - // Some static tests to make sure the public API has not changed since that - // would break Python asset builders using this EBus - { - AZ::Outcome result; - AZStd::string_view filename; - AZStd::vector entities; - bool makeDynamic = {}; - PythonBuilderRequestBus::BroadcastResult( - result, - &PythonBuilderRequestBus::Events::WriteSliceFile, - filename, - entities, - makeDynamic); - EXPECT_FALSE(result.IsSuccess()); - } - - m_app->RegisterComponentDescriptor(PythonAssetBuilderSystemComponent::CreateDescriptor()); - m_systemEntity->CreateComponent(); - m_systemEntity->Init(); - m_systemEntity->Activate(); - - EXPECT_TRUE(PythonBuilderRequestBus::HasHandlers()); - } - } AZ_UNIT_TEST_HOOK(DEFAULT_UNIT_TEST_ENV); diff --git a/Gems/PythonAssetBuilder/Code/Tests/PythonBuilderProcessJobTest.cpp b/Gems/PythonAssetBuilder/Code/Tests/PythonBuilderProcessJobTest.cpp index c8cfd4264f..c7ea5f3df3 100644 --- a/Gems/PythonAssetBuilder/Code/Tests/PythonBuilderProcessJobTest.cpp +++ b/Gems/PythonAssetBuilder/Code/Tests/PythonBuilderProcessJobTest.cpp @@ -106,17 +106,4 @@ namespace UnitTest PythonBuilderNotificationBus::Event(builderId, &PythonBuilderNotificationBus::Events::OnCancel); EXPECT_EQ(1, mockJobHandler.m_onCancelCount); } - - TEST_F(PythonBuilderProcessJobTest, PythonBuilderRequestBus_Behavior_Exists) - { - using namespace PythonAssetBuilder; - using namespace AssetBuilderSDK; - - RegisterAssetBuilder(m_app.get(), m_systemEntity); - - auto entry = m_app->GetBehaviorContext()->m_ebuses.find("PythonBuilderRequestBus"); - ASSERT_NE(m_app->GetBehaviorContext()->m_ebuses.end(), entry); - EXPECT_NE(entry->second->m_events.end(), entry->second->m_events.find("WriteSliceFile")); - EXPECT_NE(entry->second->m_events.end(), entry->second->m_events.find("CreateEditorEntity")); - } } diff --git a/Gems/PythonAssetBuilder/Code/pythonassetbuilder_common_files.cmake b/Gems/PythonAssetBuilder/Code/pythonassetbuilder_common_files.cmake index 171c6b5357..35e512c97e 100644 --- a/Gems/PythonAssetBuilder/Code/pythonassetbuilder_common_files.cmake +++ b/Gems/PythonAssetBuilder/Code/pythonassetbuilder_common_files.cmake @@ -9,7 +9,6 @@ set(FILES Include/PythonAssetBuilder/PythonAssetBuilderBus.h Include/PythonAssetBuilder/PythonBuilderNotificationBus.h - Include/PythonAssetBuilder/PythonBuilderRequestBus.h Source/PythonAssetBuilderSystemComponent.cpp Source/PythonAssetBuilderSystemComponent.h Source/PythonBuilderMessageSink.cpp diff --git a/Gems/PythonAssetBuilder/Code/pythonassetbuilder_editor_files.cmake b/Gems/PythonAssetBuilder/Code/pythonassetbuilder_editor_files.cmake index 171c6b5357..35e512c97e 100644 --- a/Gems/PythonAssetBuilder/Code/pythonassetbuilder_editor_files.cmake +++ b/Gems/PythonAssetBuilder/Code/pythonassetbuilder_editor_files.cmake @@ -9,7 +9,6 @@ set(FILES Include/PythonAssetBuilder/PythonAssetBuilderBus.h Include/PythonAssetBuilder/PythonBuilderNotificationBus.h - Include/PythonAssetBuilder/PythonBuilderRequestBus.h Source/PythonAssetBuilderSystemComponent.cpp Source/PythonAssetBuilderSystemComponent.h Source/PythonBuilderMessageSink.cpp diff --git a/Gems/PythonAssetBuilder/Editor/Scripts/__init__.py b/Gems/PythonAssetBuilder/Editor/Scripts/__init__.py index f5193b300e..7a325ca97e 100755 --- a/Gems/PythonAssetBuilder/Editor/Scripts/__init__.py +++ b/Gems/PythonAssetBuilder/Editor/Scripts/__init__.py @@ -1,6 +1,7 @@ -""" -Copyright (c) Contributors to the Open 3D Engine Project. -For complete copyright and license terms please see the LICENSE at the root of this distribution. - -SPDX-License-Identifier: Apache-2.0 OR MIT -""" +# +# Copyright (c) Contributors to the Open 3D Engine Project. +# For complete copyright and license terms please see the LICENSE at the root of this distribution. +# +# SPDX-License-Identifier: Apache-2.0 OR MIT +# +# diff --git a/Gems/PythonAssetBuilder/Editor/Scripts/bootstrap.py b/Gems/PythonAssetBuilder/Editor/Scripts/bootstrap.py index bbcbcf1807..7a325ca97e 100755 --- a/Gems/PythonAssetBuilder/Editor/Scripts/bootstrap.py +++ b/Gems/PythonAssetBuilder/Editor/Scripts/bootstrap.py @@ -1,7 +1,7 @@ -""" -Copyright (c) Contributors to the Open 3D Engine Project. -For complete copyright and license terms please see the LICENSE at the root of this distribution. - -SPDX-License-Identifier: Apache-2.0 OR MIT -""" - +# +# Copyright (c) Contributors to the Open 3D Engine Project. +# For complete copyright and license terms please see the LICENSE at the root of this distribution. +# +# SPDX-License-Identifier: Apache-2.0 OR MIT +# +# diff --git a/Gems/PythonAssetBuilder/Editor/Scripts/scene_api/_init_.py b/Gems/PythonAssetBuilder/Editor/Scripts/scene_api/_init_.py index f5193b300e..7a325ca97e 100755 --- a/Gems/PythonAssetBuilder/Editor/Scripts/scene_api/_init_.py +++ b/Gems/PythonAssetBuilder/Editor/Scripts/scene_api/_init_.py @@ -1,6 +1,7 @@ -""" -Copyright (c) Contributors to the Open 3D Engine Project. -For complete copyright and license terms please see the LICENSE at the root of this distribution. - -SPDX-License-Identifier: Apache-2.0 OR MIT -""" +# +# Copyright (c) Contributors to the Open 3D Engine Project. +# For complete copyright and license terms please see the LICENSE at the root of this distribution. +# +# SPDX-License-Identifier: Apache-2.0 OR MIT +# +# diff --git a/Gems/PythonAssetBuilder/Editor/Scripts/scene_api/actor_group.py b/Gems/PythonAssetBuilder/Editor/Scripts/scene_api/actor_group.py new file mode 100644 index 0000000000..6878319fb0 --- /dev/null +++ b/Gems/PythonAssetBuilder/Editor/Scripts/scene_api/actor_group.py @@ -0,0 +1,355 @@ +# +# Copyright (c) Contributors to the Open 3D Engine Project. +# For complete copyright and license terms please see the LICENSE at the root of this distribution. +# +# SPDX-License-Identifier: Apache-2.0 OR MIT +# +# +import json +import uuid +import os, sys +import scene_api.physics_data +from scene_api.common_rules import RuleEncoder, BaseRule, SceneNodeSelectionList, CommentRule, CoordinateSystemRule + +class ActorGroup(): + """ + Configure actor data exporting. + + Attributes + ---------- + name: + Name for the group. This name will also be used as the name for the generated file. + + selectedRootBone: + The root bone of the animation that will be exported. + + rules: `list` of actor rules (derived from BaseRule) + modifiers to fine-tune the export process. + + Methods + ------- + + to_dict() + Converts contents to a Python dictionary + + add_rule(rule) + Adds a rule into the internal rules container + Returns True if the rule was added to the internal rules container + + create_rule(rule) + Helper method to add and return the rule + + remove_rule(type) + Removes the rule from the internal rules container + + to_dict() + Converts the contents to as a Python dictionary + + to_json() + Converts the contents to a JSON string + + """ + def __init__(self): + self.typename = 'ActorGroup' + self.name = '' + self.selectedRootBone = '' + self.id = uuid.uuid4() + self.rules = set() + + def add_rule(self, rule) -> bool: + if (rule not in self.rules): + self.rules.add(rule) + return True + return False + + def create_rule(self, rule) -> any: + if (self.add_rule(rule)): + return rule + return None + + def remove_rule(self, type) -> None: + self.rules.discard(rule) + + def to_dict(self) -> dict: + out = {} + out['$type'] = self.typename + out['name'] = self.name + out['selectedRootBone'] = self.selectedRootBone + out['id'] = f"{{{str(self.id)}}}" + # convert the rules + ruleList = [] + for rule in self.rules: + jsonStr = json.dumps(rule, cls=RuleEncoder) + jsonDict = json.loads(jsonStr) + ruleList.append(jsonDict) + out['rules'] = ruleList + return out + + def to_json(self, i = 0) -> any: + jsonDOM = self.to_dict() + return json.dumps(jsonDOM, cls=RuleEncoder, indent=i) + + +class LodNodeSelectionList(SceneNodeSelectionList): + """ + Level of Detail node selection list + + The selected nodes should be joints with BoneData + derived from SceneNodeSelectionList + see also LodRule + + Attributes + ---------- + lodLevel: int + the level of detail to target where 0 is nearest level of detail + up to 5 being the farthest level of detail range for 6 levels maximum + + Methods + ------- + + to_dict() + Converts contents to a Python dictionary + """ + def __init__(self): + super().__init__() + self.typename = 'LodNodeSelectionList' + self.lodLevel = 0 + + def to_dict(self): + data = super().to_dict() + data['lodLevel'] = self.lodLevel + return data + +class PhysicsAnimationConfiguration(): + """ + Configuration for animated physics structures which are more detailed than the character controller. + For example, ragdoll or hit detection configurations. + See also 'class Physics::AnimationConfiguration' + + Attributes + ---------- + hitDetectionConfig: CharacterColliderConfiguration + for hit detection + + ragdollConfig: RagdollConfiguration + to set up physics properties + + clothConfig: CharacterColliderConfiguration + for cloth physics + + simulatedObjectColliderConfig: CharacterColliderConfiguration + for simulation physics + + Methods + ------- + + to_dict() + Converts contents to a Python dictionary + """ + def __init__(self): + self.hitDetectionConfig = scene_api.physics_data.CharacterColliderConfiguration() + self.ragdollConfig = scene_api.physics_data.RagdollConfiguration() + self.clothConfig = scene_api.physics_data.CharacterColliderConfiguration() + self.simulatedObjectColliderConfig = scene_api.physics_data.CharacterColliderConfiguration() + + def to_dict(self): + data = {} + data["hitDetectionConfig"] = self.hitDetectionConfig.to_dict() + data["ragdollConfig"] = self.ragdollConfig.to_dict() + data["clothConfig"] = self.clothConfig.to_dict() + data["simulatedObjectColliderConfig"] = self.simulatedObjectColliderConfig.to_dict() + return data + +class EMotionFXPhysicsSetup(): + """ + Physics setup properties + See also 'class EMotionFX::PhysicsSetup' + + Attributes + ---------- + config: PhysicsAnimationConfiguration + Configuration to setup physics properties + + Methods + ------- + + to_dict() + Converts contents to a Python dictionary + """ + def __init__(self): + self.typename = 'PhysicsSetup' + self.config = PhysicsAnimationConfiguration() + + def to_dict(self): + return { + "config" : self.config.to_dict() + } + +class ActorPhysicsSetupRule(BaseRule): + """ + Physics setup properties + + Attributes + ---------- + data: EMotionFXPhysicsSetup + Data to setup physics properties + + Methods + ------- + + set_hit_detection_config(self, hitDetectionConfig) + Simple helper function to assign the hit detection configuration + + set_ragdoll_config(self, ragdollConfig) + Simple helper function to assign the ragdoll configuration + + set_cloth_config(self, clothConfig) + Simple helper function to assign the cloth configuration + + set_simulated_object_collider_config(self, simulatedObjectColliderConfig) + Simple helper function to assign the assign simulated object collider configuration + + to_dict() + Converts contents to a Python dictionary + + """ + def __init__(self): + super().__init__('ActorPhysicsSetupRule') + self.data = EMotionFXPhysicsSetup() + + def set_hit_detection_config(self, hitDetectionConfig) -> None: + self.data.config.hitDetectionConfig = hitDetectionConfig + + def set_ragdoll_config(self, ragdollConfig) -> None: + self.data.config.ragdollConfig = ragdollConfig + + def set_cloth_config(self, clothConfig) -> None: + self.data.config.clothConfig = clothConfig + + def set_simulated_object_collider_config(self, simulatedObjectColliderConfig) -> None: + self.data.config.simulatedObjectColliderConfig = simulatedObjectColliderConfig + + def to_dict(self): + data = super().to_dict() + data["data"] = self.data.to_dict() + return data + +class ActorScaleRule(BaseRule): + """ + Scale the actor + + Attributes + ---------- + scaleFactor: float + Set the multiplier to scale geometry. + + Methods + ------- + to_dict() + Converts contents to a Python dictionary + + """ + def __init__(self): + super().__init__('ActorScaleRule') + self.scaleFactor = 1.0 + +class SkeletonOptimizationRule(BaseRule): + """ + Advanced skeleton optimization rule. + + Attributes + ---------- + autoSkeletonLOD: bool + Client side skeleton LOD based on skinning information and critical bones list. + + serverSkeletonOptimization: bool + Server side skeleton optimization based on hit detections and critical bones list. + + criticalBonesList: `list` of SceneNodeSelectionList + Bones in this list will not be optimized out. + + Methods + ------- + + to_dict() + Converts contents to a Python dictionary + """ + def __init__(self): + super().__init__('SkeletonOptimizationRule') + self.autoSkeletonLOD = True + self.serverSkeletonOptimization = False + self.criticalBonesList = SceneNodeSelectionList() + + def to_dict(self): + data = super().to_dict() + self.criticalBonesList.convert_selection(data, 'criticalBonesList') + return data + +class LodRule(BaseRule): + """ + Set up the level of detail for the meshes in this group. + + The engine supports 6 total lods. + 1 for the base model then 5 more lods. + The rule only captures lods past level 0 so this is set to 5. + + Attributes + ---------- + nodeSelectionList: `list` of LodNodeSelectionList + Select the meshes to assign to each level of detail. + + Methods + ------- + + add_lod_level(lodLevel, selectedNodes=None, unselectedNodes=None) + A helper function to add selected nodes (list of node names) and unselected nodes (list of node names) + This creates a LodNodeSelectionList and adds it to the node selection list + returns the LodNodeSelectionList that was created + + to_dict() + Converts contents to a Python dictionary + """ + def __init__(self): + super().__init__('{3CB103B3-CEAF-49D7-A9DC-5A31E2DF15E4} LodRule') + self.nodeSelectionList = [] # list of LodNodeSelectionList + + def add_lod_level(self, lodLevel, selectedNodes=None, unselectedNodes=None) -> LodNodeSelectionList: + lodNodeSelection = LodNodeSelectionList() + lodNodeSelection.selectedNodes = selectedNodes + lodNodeSelection.unselectedNodes = unselectedNodes + lodNodeSelection.lodLevel = lodLevel + self.nodeSelectionList.append(lodNodeSelection) + return lodNodeSelection + + def to_dict(self): + data = super().to_dict() + selectionListList = data.pop('nodeSelectionList') + data['nodeSelectionList'] = [] + for nodeList in selectionListList: + data['nodeSelectionList'].append(nodeList.to_dict()) + return data + +class MorphTargetRule(BaseRule): + """ + Select morph targets for actor. + + Attributes + ---------- + targets: `list` of SceneNodeSelectionList + Select 1 or more meshes to include in the actor as morph targets. + + Methods + ------- + + to_dict() + Converts contents to a Python dictionary + """ + def __init__(self): + super().__init__('MorphTargetRule') + self.targets = SceneNodeSelectionList() + + def to_dict(self): + data = super().to_dict() + self.targets.convert_selection(data, 'targets') + return data + diff --git a/Gems/PythonAssetBuilder/Editor/Scripts/scene_api/common_rules.py b/Gems/PythonAssetBuilder/Editor/Scripts/scene_api/common_rules.py new file mode 100644 index 0000000000..72cac2b7c6 --- /dev/null +++ b/Gems/PythonAssetBuilder/Editor/Scripts/scene_api/common_rules.py @@ -0,0 +1,221 @@ +# +# Copyright (c) Contributors to the Open 3D Engine Project. +# For complete copyright and license terms please see the LICENSE at the root of this distribution. +# +# SPDX-License-Identifier: Apache-2.0 OR MIT +# +# +import traceback, sys, uuid, os, json, logging + +def log_exception_traceback(): + """ + Outputs an exception stacktrace. + """ + data = traceback.format_exc() + logger = logging.getLogger('python') + logger.error(data) + + +class BaseRule(): + """ + Base class of the actor rules to help encode the type name of abstract rules + + Parameters + ---------- + typename : str + A typename the $type will be in the JSON chunk object + + Attributes + ---------- + typename: str + The type name of the abstract classes to be serialized + + id: UUID + a unique ID for the rule + + Methods + ------- + to_dict() + Converts contents to a Python dictionary + Adds the '$type' member + Adds a random 'id' member + Note: Override this method if a derviced class needs to return a custom dictionary + + """ + def __init__(self, typename): + self.typename = typename + self.id = uuid.uuid4() + + def __eq__(self, other): + return self.id.__eq__(other.id) + + def __ne__(self, other): + return self.__eq__(other) is False + + def __hash__(self): + return self.id.__hash__() + + def to_dict(self): + data = vars(self) + data['id'] = f"{{{str(self.id)}}}" + # rename 'typename' to '$type' + data['$type'] = self.typename + data.pop('typename') + return data + +def convert_rule_to_json(rule:BaseRule, indentValue=0): + """ + Helper function to convert a BaseRule into a JSON string + + Parameters + ---------- + obj : any + The object to convert to a JSON string as long as the obj class has an *to_dict* method + + indentValue : int + The number of spaces to indent between each JSON block/value + """ + return json.dumps(rule.to_dict(), indent=indentValue, cls=RuleEncoder) + +class CommentRule(BaseRule): + """ + Add an optional comment to the asset's properties. + + Attributes + ---------- + text: str + Text for the comment. + + Methods + ------- + + to_dict() + Converts contents to a Python dictionary + """ + def __init__(self): + super().__init__('CommentRule') + self.text = '' + + +class SceneNodeSelectionList(BaseRule): + """ + Contains a list of node names to include (selectedNodes) and to exclude (unselectedNodes) + + Attributes + ---------- + selectedNodes: `list` of str + The node names to include for this group rule + + unselectedNodes: `list` of str + The node names to exclude for this group rule + + Methods + ------- + convert_selection(self, container, key): + this adds its contents to an existing dictionary container at a key position + + select_targets(self, selectedList, allNodesList:list) + helper function to include a small list of node names from list of all the node names + + to_dict() + Converts contents to a Python dictionary + """ + def __init__(self): + super().__init__('SceneNodeSelectionList') + self.selectedNodes = [] + self.unselectedNodes = [] + + def convert_selection(self, container, key): + container[key] = self.to_dict() + + def select_targets(self, selectedList, allNodesList:list): + self.selectedNodes = selectedList + self.unselectedNodes = allNodesList.copy() + for node in selectedList: + if node in self.unselectedNodes: + self.unselectedNodes.remove(node) + + +class CoordinateSystemRule(BaseRule): + """ + Modify the target coordinate system, applying a transformation to all data (transforms and vertex data if it exists). + + Attributes + ---------- + targetCoordinateSystem: int + Change the direction the actor/motion will face by applying a post transformation to the data. + + useAdvancedData: bool + If True, use advanced settings + + originNodeName: str + Select a Node from the scene as the origin for this export. + + rotation: [float, float, float, float] + Sets the orientation offset of the processed mesh in degrees. Rotates (yaw, pitch, roll) the group after translation. + + translation: [float, float, float] + Moves the group along the given vector3. + + scale: float + Sets the scale offset of the processed mesh. + + """ + def __init__(self): + super().__init__('CoordinateSystemRule') + self.targetCoordinateSystem = 0 + self.useAdvancedData = False + self.originNodeName = '' + self.rotation = [0.0, 0.0, 0.0, 1.0] + self.translation = [0.0, 0.0, 0.0] + self.scale = 1.0 + +class TypeId(): + """ + Wraps a UUID that represents a AZ::TypeId from O3DE + + Attributes + ---------- + valud: uuid.Uuid + A unique ID that defaults to AZ::TypeId::CreateNull() + """ + def __init__(self): + self.value = uuid.UUID('{00000000-0000-0000-0000-000000000000}') + + def __str__(self): + return f"{{{str(self.value)}}}" + + +class RuleEncoder(json.JSONEncoder): + """ + A helper class to encode the Python classes with to a Python dictionary + + Methods + ------- + + default(obj) + Converts a single object to a JSON value that can be stored with a key + + encode(obj) + Converts contents to a Python dictionary for the JSONEncoder + + """ + def default(self, obj): + if (isinstance(obj,TypeId)): + return str(obj) + elif hasattr(obj, 'to_json_value'): + return obj.to_json_value() + return super().default(obj) + + def encode(self, obj): + chunk = obj + if isinstance(obj, BaseRule): + chunk = obj.to_dict() + elif isinstance(obj, dict): + chunk = obj + elif hasattr(obj, 'to_dict'): + chunk = obj.to_dict() + else: + chunk = obj.__dict__ + + return super().encode(chunk) diff --git a/Gems/PythonAssetBuilder/Editor/Scripts/scene_api/motion_group.py b/Gems/PythonAssetBuilder/Editor/Scripts/scene_api/motion_group.py new file mode 100644 index 0000000000..e7d3896e9c --- /dev/null +++ b/Gems/PythonAssetBuilder/Editor/Scripts/scene_api/motion_group.py @@ -0,0 +1,214 @@ +# +# Copyright (c) Contributors to the Open 3D Engine Project. +# For complete copyright and license terms please see the LICENSE at the root of this distribution. +# +# SPDX-License-Identifier: Apache-2.0 OR MIT +# +# +from enum import Enum +import scene_api.common_rules + +class MotionGroup(scene_api.common_rules.BaseRule): + """ + Configure animation data for exporting. + + Attributes + ---------- + name: str + Name for the group. + This name will also be used as the name for the generated file. + + selectedRootBone: str + The root bone of the animation that will be exported. + + rules: list of BaseRule + Add or remove rules to fine-tune the export process. + List of rules for a motion group including: + MotionScaleRule + CoordinateSystemRule + MotionRangeRule + MotionAdditiveRule + MotionSamplingRule + + """ + def __init__(self): + super().__init__('MotionGroup') + self.name = '' + self.selectedRootBone = '' + self.rules = set() + + def add_rule(self, rule) -> bool: + if (rule not in self.rules): + self.rules.add(rule) + return True + return False + + def create_rule(self, rule) -> any: + if (self.add_rule(rule)): + return rule + return None + + def remove_rule(self, type) -> None: + self.rules.discard(rule) + + def to_dict(self) -> dict: + out = super().to_dict() + out['name'] = self.name + out['selectedRootBone'] = self.selectedRootBone + # convert the rules + ruleList = [] + for rule in self.rules: + ruleList.append(rule.to_dict()) + out['rules'] = ruleList + return out + + def to_json(self) -> str: + jsonDOM = self.to_dict() + return json.dumps(jsonDOM, cls=RuleEncoder) + + +class MotionCompressionSettingsRule(scene_api.common_rules.BaseRule): + """ + A BaseRule that ses the error tolerance settings while compressing the animation + + Attributes + ---------- + maxTranslationError: float + Maximum error allowed in translation. + Min 0.0, Max 0.1 + + maxRotationError: float + Maximum error allowed in rotation. + Min 0.0, Max 0.1 + + maxScaleError: float + Maximum error allowed in scale. + Min 0.0, Max 0.01 + """ + def __init__(self): + super().__init__('MotionCompressionSettingsRule') + self.maxTranslationError = 0.0001 + self.maxRotationError = 0.0001 + self.maxScaleError = 0.0001 + +class MotionScaleRule(scene_api.common_rules.BaseRule): + """ + A BaseRule that scales the spatial extent of motion + + Attributes + ---------- + scaleFactor: float + Scale factor; min 0.0001, max 10000.0 + + """ + def __init__(self): + super().__init__('MotionScaleRule') + self.scaleFactor = 1.0 + + +class MotionRangeRule(scene_api.common_rules.BaseRule): + """ + A BaseRule that defines the range of the motion that will be exported. + + Attributes + ---------- + startFrame: float + The start frame of the animation that will be exported. + + endFrame: float + The end frame of the animation that will be exported. + """ + def __init__(self): + super().__init__('MotionRangeRule') + self.startFrame = 0 + self.endFrame = 0 + + +class MotionAdditiveRule(scene_api.common_rules.BaseRule): + """ + A BaseRule that makes the motion an additive motion. + + Attributes + ---------- + sampleFrame: int + The frame number that the motion will be made relative to. + + """ + def __init__(self): + super().__init__('MotionAdditiveRule') + self.sampleFrame = 0 + + +class SampleRateMethod(Enum): + """ + A collection of settings related to sampling of the motion + + Attributes + ---------- + + FromSourceScene: int, value = 0 + Use the source scene's sample rate + + + Custom: int, value = 1 + Use the use a custom sample rate + """ + FromSourceScene = 0 + Custom = 1 + + def to_json_value(self): + if(self == SampleRateMethod.FromSourceScene): + return 0 + return 1 + + +class MotionSamplingRule(scene_api.common_rules.BaseRule): + """ + A collection of settings related to sampling of the motion + + Attributes + ---------- + motionDataType: scene_api.common_rules.TypeId() + The motion data type to use. This defines how the motion data is stored. + This can have an effect on performance and memory usage. + + sampleRateMethod: SampleRateMethod + Either use the sample rate from the source scene file or use a custom sample rate. + The sample rate is automatically limited to the rate from source scene file (e.g. FBX) + + customSampleRate: float + Overwrite the sample rate of the motion, in frames per second. + Min: 1.0, Max 240.0 + + translationQualityPercentage: float + The percentage of quality for translation. Higher values preserve quality, but increase memory usage. + Min: 1.0, Max 100.0 + + rotationQualityPercentage: float + The percentage of quality for rotation. Higher values preserve quality, but increase memory usage. + Min: 1.0, Max 100.0 + + scaleQualityPercentage: float + The percentage of quality for scale. Higher values preserve quality, but increase memory usage. + Min: 1.0, Max 100.0 + + allowedSizePercentage: float + The percentage of extra memory usage allowed compared to the smallest size. + For example a value of 10 means we are allowed 10 percent more memory worst case, in trade for extra performance. + Allow 15 percent larger size, in trade for performance (in Automatic mode, so when m_motionDataType is a Null typeId). + Min: 0.0, Max 100.0 + + keepDuration: bool + When enabled this keep the duration the same as the Fbx motion duration, even if no joints are animated. + When this option is disabled and the motion doesn't animate any joints then the resulting motion will have a duration of zero seconds. + """ + def __init__(self): + super().__init__('MotionSamplingRule') + self.motionDataType = scene_api.common_rules.TypeId() + self.sampleRateMethod = SampleRateMethod.FromSourceScene + self.customSampleRate = 60.0 + self.translationQualityPercentage = 75.0 + self.rotationQualityPercentage = 75.0 + self.scaleQualityPercentage = 75.0 + self.allowedSizePercentage = 15.0 + self.keepDuration = True diff --git a/Gems/PythonAssetBuilder/Editor/Scripts/scene_api/physics_data.py b/Gems/PythonAssetBuilder/Editor/Scripts/scene_api/physics_data.py new file mode 100644 index 0000000000..4b02e99531 --- /dev/null +++ b/Gems/PythonAssetBuilder/Editor/Scripts/scene_api/physics_data.py @@ -0,0 +1,581 @@ +# +# Copyright (c) Contributors to the Open 3D Engine Project. +# For complete copyright and license terms please see the LICENSE at the root of this distribution. +# +# SPDX-License-Identifier: Apache-2.0 OR MIT +# +# + +# for underlying data structures, see Code\Framework\AzFramework\AzFramework\Physics\Shape.h + +class ColliderConfiguration(): + """ + Configuration for a collider + + Attributes + ---------- + Trigger: bool + Should this shape act as a trigger shape. + + Simulated: bool + Should this shape partake in collision in the physical simulation. + + InSceneQueries: bool + Should this shape partake in scene queries (ray casts, overlap tests, sweeps). + + Exclusive: bool + Can this collider be shared between multiple bodies? + + Position: [float, float, float] Vector3 + Shape offset relative to the connected rigid body. + + Rotation: [float, float, float, float] Quaternion + Shape rotation relative to the connected rigid body. + + ColliderTag: str + Identification tag for the collider. + + RestOffset: float + Bodies will come to rest separated by the sum of their rest offsets. + + ContactOffset: float + Bodies will start to generate contacts when closer than the sum of their contact offsets. + Methods + ------- + to_dict() + Converts contents to a Python dictionary + """ + def __init__(self): + self.Trigger = True + self.Simulated = True + self.InSceneQueries = True + self.Exclusive = True + self.Position = [0.0, 0.0, 0.0] + self.Rotation = [0.0, 0.0, 0.0, 1.0] + self.ColliderTag = '' + self.RestOffset = 0.0 + self.ContactOffset = 0.02 + + def to_dict(self): + return self.__dict__ + +# for underlying data structures, see Code\Framework\AzFramework\AzFramework\Physics\Character.h + +class CharacterColliderNodeConfiguration(): + """ + Shapes to define the animation's to model of physics + + Attributes + ---------- + name : str + debug name of the node + + shapes : `list` of `tuple` of (ColliderConfiguration, ShapeConfiguration) + a list of pairs of collider and shape configuration + + Methods + ------- + add_collider_shape_pair(colliderConfiguration, shapeConfiguration) + Helper function to add a collider and shape configuration at the same time + + to_dict() + Converts contents to a Python dictionary + + """ + def __init__(self): + self.name = '' + self.shapes = [] # List of Tuple of (ColliderConfiguration, ShapeConfiguration) + + def add_collider_shape_pair(self, colliderConfiguration, shapeConfiguration) -> None: + pair = (colliderConfiguration, shapeConfiguration) + self.shapes.append(pair) + + def to_dict(self): + data = {} + shapeList = [] + for index, shape in enumerate(self.shapes): + tupleValue = (shape[0].to_dict(), # ColliderConfiguration + shape[1].to_dict()) # ShapeConfiguration + shapeList.append(tupleValue) + data['name'] = self.name + data['shapes'] = shapeList + return data + +class CharacterColliderConfiguration(): + """ + Information required to create the basic physics representation of a character. + + Attributes + ---------- + nodes : `list` of CharacterColliderNodeConfiguration + a list of CharacterColliderNodeConfiguration nodes + + Methods + ------- + add_character_collider_node_configuration(colliderConfiguration, shapeConfiguration) + Helper function to add a character collider node configuration into the nodes + + add_character_collider_node_configuration_node(name, colliderConfiguration, shapeConfiguration) + Helper function to add a character collider node configuration into the nodes + + **Returns**: CharacterColliderNodeConfiguration + + to_dict() + Converts contents to a Python dictionary + + """ + def __init__(self): + self.nodes = [] # list of CharacterColliderNodeConfiguration + + def add_character_collider_node_configuration(self, characterColliderNodeConfiguration) -> None: + self.nodes.append(characterColliderNodeConfiguration) + + def add_character_collider_node_configuration_node(self, name, colliderConfiguration, shapeConfiguration) -> CharacterColliderNodeConfiguration: + characterColliderNodeConfiguration = CharacterColliderNodeConfiguration() + self.add_character_collider_node_configuration(characterColliderNodeConfiguration) + characterColliderNodeConfiguration.name = name + characterColliderNodeConfiguration.add_collider_shape_pair(colliderConfiguration, shapeConfiguration) + return characterColliderNodeConfiguration + + def to_dict(self): + data = {} + nodeList = [] + for node in self.nodes: + nodeList.append(node.to_dict()) + data['nodes'] = nodeList + return data + +# see Code\Framework\AzFramework\AzFramework\Physics\ShapeConfiguration.h for underlying data structures + +class ShapeConfiguration(): + """ + Base class for all the shape collider configurations + + Attributes + ---------- + scale : [float, float, float] + a 3-element list to describe the scale along the X, Y, and Z axises such as [1.0, 1.0, 1.0] + + Methods + ------- + to_dict() + Converts contents to a Python dictionary + """ + def __init__(self, shapeType): + self._shapeType = shapeType + self.scale = [1.0, 1.0, 1.0] + + def to_dict(self): + return { + "$type": self._shapeType, + "Scale": self.scale + } + +class SphereShapeConfiguration(ShapeConfiguration): + """ + The configuration for a Sphere collider + + Attributes + ---------- + radius: float + a scalar value to define the radius of the sphere + + Methods + ------- + to_dict() + Converts contents to a Python dictionary + """ + def __init__(self): + super().__init__('SphereShapeConfiguration') + self.radius = 0.5 + + def to_dict(self): + data = super().to_dict() + data['Radius'] = self.radius + return data + +class BoxShapeConfiguration(ShapeConfiguration): + """ + The configuration for a Box collider + + Attributes + ---------- + dimensions: [float, float, float] + The width, height, and depth dimensions of the Box collider + + Methods + ------- + to_dict() + Converts contents to a Python dictionary + """ + def __init__(self): + super().__init__('BoxShapeConfiguration') + self.dimensions = [1.0, 1.0, 1.0] + + def to_dict(self): + data = super().to_dict() + data['Configuration'] = self.dimensions + return data + +class CapsuleShapeConfiguration(ShapeConfiguration): + """ + The configuration for a Capsule collider + + Attributes + ---------- + height: float + The height of the Capsule + + radius: float + The radius of the Capsule + + Methods + ------- + to_dict() + Converts contents to a Python dictionary + """ + def __init__(self): + super().__init__('CapsuleShapeConfiguration') + self.height = 1.00 + self.radius = 0.25 + + def to_dict(self): + data = super().to_dict() + data['Height'] = self.height + data['Radius'] = self.radius + return data + +class PhysicsAssetShapeConfiguration(ShapeConfiguration): + """ + The configuration for a Asset collider using a mesh asset for collision + + Attributes + ---------- + asset: { "assetHint": assetReference } + the name of the asset to load for collision information + + assetScale: [float, float, float] + The scale of the asset shape such as [1.0, 1.0, 1.0] + + useMaterialsFromAsset: bool + Auto-set physics materials using asset's physics material names + + subdivisionLevel: int + The level of subdivision if a primitive shape is replaced with a convex mesh due to scaling. + + Methods + ------- + set_asset_reference(self, assetReference: str) + Helper function to set the asset reference to the collision mesh such as 'my/folder/my_mesh.azmodel' + + to_dict() + Converts contents to a Python dictionary + """ + def __init__(self): + super().__init__('PhysicsAssetShapeConfiguration') + self.asset = {} + self.assetScale = [1.0, 1.0, 1.0] + self.useMaterialsFromAsset = True + self.subdivisionLevel = 4 + + def set_asset_reference(self, assetReference: str) -> None: + self.asset = { "assetHint": assetReference } + + def to_dict(self): + data = super().to_dict() + data['PhysicsAsset'] = self.asset + data['AssetScale'] = self.assetScale + data['UseMaterialsFromAsset'] = self.useMaterialsFromAsset + data['SubdivisionLevel'] = self.subdivisionLevel + return data + +# for underlying data structures, see Code\Framework\AzFramework\AzFramework\Physics\Configuration\JointConfiguration.h + +class JointConfiguration(): + """ + The joint configuration + + see also: class AzPhysics::JointConfiguration + + Attributes + ---------- + Name: str + For debugging/tracking purposes only. + + ParentLocalRotation: [float, float, float, float] + Parent joint frame relative to parent body. + + ParentLocalPosition: [float, float, float] + Joint position relative to parent body. + + ChildLocalRotation: [float, float, float, float] + Child joint frame relative to child body. + + ChildLocalPosition: [float, float, float] + Joint position relative to child body. + + StartSimulationEnabled: bool + When active, the joint will be enabled when the simulation begins. + + Methods + ------- + to_dict() + Converts contents to a Python dictionary + """ + def __init__(self): + self.Name = '' + self.ParentLocalRotation = [0.0, 0.0, 0.0, 1.0] + self.ParentLocalPosition = [0.0, 0.0, 0.0] + self.ChildLocalRotation = [0.0, 0.0, 0.0, 1.0] + self.ChildLocalPosition = [0.0, 0.0, 0.0] + self.StartSimulationEnabled = True + + def to_dict(self): + return self.__dict__ + +# for underlying data structures, see Code\Framework\AzFramework\AzFramework\Physics\Configuration\SimulatedBodyConfiguration.h + +class SimulatedBodyConfiguration(): + """ + Base Class of all Physics Bodies that will be simulated. + + see also: class AzPhysics::SimulatedBodyConfiguration + + Attributes + ---------- + name: str + For debugging/tracking purposes only. + + position: [float, float, float] + starting position offset + + orientation: [float, float, float, float] + starting rotation (Quaternion) + + startSimulationEnabled: bool + to start when simulation engine starts + + Methods + ------- + to_dict() + Converts contents to a Python dictionary + """ + def __init__(self): + self.name = '' + self.position = [0.0, 0.0, 0.0] + self.orientation = [0.0, 0.0, 0.0, 1.0] + self.startSimulationEnabled = True + + def to_dict(self): + return { + "name" : self.name, + "position" : self.position, + "orientation" : self.orientation, + "startSimulationEnabled" : self.startSimulationEnabled + } + + +# for underlying data structures, see Code\Framework\AzFramework\AzFramework\Physics\Configuration\RigidBodyConfiguration.h + +class RigidBodyConfiguration(SimulatedBodyConfiguration): + """ + PhysX Rigid Body Configuration + + see also: class AzPhysics::RigidBodyConfiguration + + Attributes + ---------- + initialLinearVelocity: [float, float, float] + Linear velocity applied when the rigid body is activated. + + initialAngularVelocity: [float, float, float] + Angular velocity applied when the rigid body is activated (limited by maximum angular velocity) + + centerOfMassOffset: [float, float, float] + Local space offset for the center of mass (COM). + + mass: float + The mass of the rigid body in kilograms. + A value of 0 is treated as infinite. + The trajectory of infinite mass bodies cannot be affected by any collisions or forces other than gravity. + + linearDamping: float + The rate of decay over time for linear velocity even if no forces are acting on the rigid body. + + angularDamping: float + The rate of decay over time for angular velocity even if no forces are acting on the rigid body. + + sleepMinEnergy: float + The rigid body can go to sleep (settle) when kinetic energy per unit mass is persistently below this value. + + maxAngularVelocity: float + Clamp angular velocities to this maximum value. + + startAsleep: bool + When active, the rigid body will be asleep when spawned, and wake when the body is disturbed. + + interpolateMotion: bool + When active, simulation results are interpolated resulting in smoother motion. + + gravityEnabled: bool + When active, global gravity affects this rigid body. + + kinematic: bool + When active, the rigid body is not affected by gravity or other forces and is moved by script. + + ccdEnabled: bool + When active, the rigid body has continuous collision detection (CCD). + Use this to ensure accurate collision detection, particularly for fast moving rigid bodies. + CCD must be activated in the global PhysX preferences. + + ccdMinAdvanceCoefficient: float + Coefficient affecting how granularly time is subdivided in CCD. + + ccdFrictionEnabled: bool + Whether friction is applied when resolving CCD collisions. + + computeCenterOfMass: bool + Compute the center of mass (COM) for this rigid body. + + computeInertiaTensor: bool + When active, inertia is computed based on the mass and shape of the rigid body. + + computeMass: bool + When active, the mass of the rigid body is computed based on the volume and density values of its colliders. + + Methods + ------- + to_dict() + Converts contents to a Python dictionary + """ + def __init__(self): + super().__init__() + + # Basic initial settings. + self.initialLinearVelocity = [0.0, 0.0, 0.0] + self.initialAngularVelocity = [0.0, 0.0, 0.0] + self.centerOfMassOffset = [0.0, 0.0, 0.0] + + # Simulation parameters. + self.mass = 1.0 + self.linearDamping = 0.05 + self.angularDamping = 0.15 + self.sleepMinEnergy = 0.005 + self.maxAngularVelocity = 100.0 + self.startAsleep = False + self.interpolateMotion = False + self.gravityEnabled = True + self.kinematic = False + self.ccdEnabled = False + self.ccdMinAdvanceCoefficient = 0.15 + self.ccdFrictionEnabled = False + self.computeCenterOfMass = True + self.computeInertiaTensor = True + self.computeMass = True + + # Flags to restrict motion along specific world-space axes. + self.lockLinearX = False + self.lockLinearY = False + self.lockLinearZ = False + + # Flags to restrict rotation around specific world-space axes. + self.lockAngularX = False + self.lockAngularY = False + self.lockAngularZ = False + + # If set, non-simulated shapes will also be included in the mass properties calculation. + self.includeAllShapesInMassCalculation = False + + def to_dict(self): + data = super().to_dict() + data["Initial linear velocity"] = self.initialLinearVelocity + data["Initial angular velocity"] = self.initialAngularVelocity + data["Linear damping"] = self.linearDamping + data["Angular damping"] = self.angularDamping + data["Sleep threshold"] = self.sleepMinEnergy + data["Start Asleep"] = self.startAsleep + data["Interpolate Motion"] = self.interpolateMotion + data["Gravity Enabled"] = self.gravityEnabled + data["Kinematic"] = self.kinematic + data["CCD Enabled"] = self.ccdEnabled + data["Compute Mass"] = self.computeMass + data["Lock Linear X"] = self.lockLinearX + data["Lock Linear Y"] = self.lockLinearY + data["Lock Linear Z"] = self.lockLinearZ + data["Lock Angular X"] = self.lockAngularX + data["Lock Angular Y"] = self.lockAngularY + data["Lock Angular Z"] = self.lockAngularZ + data["Mass"] = self.mass + data["Compute COM"] = self.computeCenterOfMass + data["Centre of mass offset"] = self.centerOfMassOffset + data["Compute inertia"] = self.computeInertiaTensor + data["Maximum Angular Velocity"] = self.maxAngularVelocity + data["Include All Shapes In Mass"] = self.includeAllShapesInMassCalculation + data["CCD Min Advance"] = self.ccdMinAdvanceCoefficient + data["CCD Friction"] = self.ccdFrictionEnabled + return data + +# for underlying data structures, see Code\Framework\AzFramework\AzFramework\Physics\Ragdoll.h + +class RagdollNodeConfiguration(RigidBodyConfiguration): + """ + Ragdoll node Configuration + + see also: class Physics::RagdollConfiguration + + Attributes + ---------- + JointConfig: JointConfiguration + Ragdoll joint node configuration + + Methods + ------- + to_dict() + Converts contents to a Python dictionary + """ + def __init__(self): + super().__init__() + self.JointConfig = JointConfiguration() + + def to_dict(self): + data = super().to_dict() + data['JointConfig'] = self.JointConfig.to_dict() + return data + +class RagdollConfiguration(): + """ + A configuration of join nodes and a character collider configuration for a ragdoll + + see also: class Physics::RagdollConfiguration + + Attributes + ---------- + nodes: `list` of RagdollNodeConfiguration + A list of RagdollNodeConfiguration entries + + colliders: CharacterColliderConfiguration + A CharacterColliderConfiguration + + Methods + ------- + add_ragdoll_node_configuration(ragdollNodeConfiguration) + Helper function to add a single ragdoll node configuration (normally for each joint/bone node) + + to_dict() + Converts contents to a Python dictionary + """ + def __init__(self): + self.nodes = [] # list of RagdollNodeConfiguration + self.colliders = CharacterColliderConfiguration() + + def add_ragdoll_node_configuration(self, ragdollNodeConfiguration) -> None: + self.nodes.append(ragdollNodeConfiguration) + + def to_dict(self): + data = {} + nodeList = [] + for index, node in enumerate(self.nodes): + nodeList.append(node.to_dict()) + data['nodes'] = nodeList + data['colliders'] = self.colliders.to_dict() + return data diff --git a/Gems/PythonAssetBuilder/Editor/Scripts/scene_api/scene_data.py b/Gems/PythonAssetBuilder/Editor/Scripts/scene_api/scene_data.py index 2578efeae2..7841f032b9 100755 --- a/Gems/PythonAssetBuilder/Editor/Scripts/scene_api/scene_data.py +++ b/Gems/PythonAssetBuilder/Editor/Scripts/scene_api/scene_data.py @@ -1,16 +1,19 @@ -""" -Copyright (c) Contributors to the Open 3D Engine Project. -For complete copyright and license terms please see the LICENSE at the root of this distribution. - -SPDX-License-Identifier: Apache-2.0 OR MIT -""" -import azlmbr.scene as sceneApi +# +# Copyright (c) Contributors to the Open 3D Engine Project. +# For complete copyright and license terms please see the LICENSE at the root of this distribution. +# +# SPDX-License-Identifier: Apache-2.0 OR MIT +# +# +import typing import json +import azlmbr.scene as sceneApi +from enum import IntEnum # Wraps the AZ.SceneAPI.Containers.SceneGraph.NodeIndex internal class class SceneGraphNodeIndex: - def __init__(self, sceneGraphNodeIndex) -> None: - self.nodeIndex = sceneGraphNodeIndex + def __init__(self, scene_graph_node_index) -> None: + self.nodeIndex = scene_graph_node_index def as_number(self): return self.nodeIndex.AsNumber() @@ -24,10 +27,11 @@ class SceneGraphNodeIndex: def equal(self, other) -> bool: return self.nodeIndex.Equal(other) + # Wraps AZ.SceneAPI.Containers.SceneGraph.Name internal class -class SceneGraphName(): - def __init__(self, sceneGraphName) -> None: - self.name = sceneGraphName +class SceneGraphName: + def __init__(self, scene_graph_name) -> None: + self.name = scene_graph_name def get_path(self) -> str: return self.name.GetPath() @@ -35,10 +39,11 @@ class SceneGraphName(): def get_name(self) -> str: return self.name.GetName() + # Wraps AZ.SceneAPI.Containers.SceneGraph class -class SceneGraph(): - def __init__(self, sceneGraphInstance) -> None: - self.sceneGraph = sceneGraphInstance +class SceneGraph: + def __init__(self, scene_graph_instance) -> None: + self.sceneGraph = scene_graph_instance @classmethod def is_valid_name(cls, name): @@ -90,53 +95,705 @@ class SceneGraph(): def get_node_content(self, node): return self.sceneGraph.GetNodeContent(node) + +class ColorChannel(IntEnum): + RED = 0 + """ Red color channel """ + GREEN = 1 + """ Green color channel """ + BLUE = 2 + """ Blue color channel """ + ALPHA = 3 + """ Alpha color channel """ + + +class TangentSpaceSource(IntEnum): + SCENE = 0 + """ Extract the tangents and bitangents directly from the source scene file. """ + MIKKT_GENERATION = 1 + """ Use MikkT algorithm to generate tangents """ + + +class TangentSpaceMethod(IntEnum): + TSPACE = 0 + """ Generates the tangents and bitangents with their true magnitudes which can be used for relief mapping effects. + It calculates the 'real' bitangent which may not be perpendicular to the tangent. + However, both, the tangent and bitangent are perpendicular to the vertex normal. + """ + TSPACE_BASIC = 1 + """ Calculates unit vector tangents and bitangents at pixel/vertex level which are sufficient for basic normal mapping. """ + + +class PrimitiveShape(IntEnum): + BEST_FIT = 0 + """ The algorithm will determine which of the shapes fits best. """ + SPHERE = 1 + """ Sphere shape """ + BOX = 2 + """ Box shape """ + CAPSULE = 3 + """ Capsule shape """ + + +class DecompositionMode(IntEnum): + VOXEL = 0 + """ Voxel-based approximate convex decomposition """ + TETRAHEDRON = 1 + """ Tetrahedron-based approximate convex decomposition """ + + # Contains a dictionary to contain and export AZ.SceneAPI.Containers.SceneManifest -class SceneManifest(): +class SceneManifest: def __init__(self): self.manifest = {'values': []} - def add_mesh_group(self, name) -> dict: - meshGroup = {} - meshGroup['$type'] = '{07B356B7-3635-40B5-878A-FAC4EFD5AD86} MeshGroup' - meshGroup['name'] = name - meshGroup['nodeSelectionList'] = {'selectedNodes': [], 'unselectedNodes': []} - meshGroup['rules'] = {'rules': [{'$type': 'MaterialRule'}]} - self.manifest['values'].append(meshGroup) - return meshGroup + def add_mesh_group(self, name: str) -> dict: + """Adds a Mesh Group to the scene manifest. - def add_prefab_group(self, name, id, json) -> dict: - prefabGroup = {} - prefabGroup['$type'] = '{99FE3C6F-5B55-4D8B-8013-2708010EC715} PrefabGroup' - prefabGroup['name'] = name - prefabGroup['id'] = id - prefabGroup['prefabDomData'] = json - self.manifest['values'].append(prefabGroup) - return prefabGroup + Parameters + ---------- + name : + Name of the mesh group. This will become a file on disk and be usable as a Mesh in the editor. + - def mesh_group_select_node(self, meshGroup, nodeName): - meshGroup['nodeSelectionList']['selectedNodes'].append(nodeName) + Returns + ------- + dict + Newly created mesh group. - def mesh_group_unselect_node(self, meshGroup, nodeName): - meshGroup['nodeSelectionList']['unselectedNodes'].append(nodeName) + """ + mesh_group = { + '$type': '{07B356B7-3635-40B5-878A-FAC4EFD5AD86} MeshGroup', + 'name': name, + 'nodeSelectionList': {'selectedNodes': [], 'unselectedNodes': []}, + 'rules': {'rules': [{'$type': 'MaterialRule'}]} + } + self.manifest['values'].append(mesh_group) + return mesh_group - def mesh_group_add_advanced_coordinate_system(self, meshGroup, originNodeName, translation, rotation, scale): - originRule = {} - originRule['$type'] = 'CoordinateSystemRule' - originRule['useAdvancedData'] = True - originRule['originNodeName'] = '' if originNodeName is None else originNodeName + def add_prefab_group(self, name: str, id: str, json: dict) -> dict: + """Adds a Prefab Group to the scene manifest. This will become a file on disk and be usable as a ProceduralPrefab in the editor. + + Parameters + ---------- + name : + Name of the prefab. + id : + Unique ID for this prefab group. + json : + The prefab template data. + + + Returns + ------- + dict + The newly created Prefab group + + """ + prefab_group = { + '$type': '{99FE3C6F-5B55-4D8B-8013-2708010EC715} PrefabGroup', + 'name': name, + 'id': id, + 'prefabDomData': json + } + self.manifest['values'].append(prefab_group) + return prefab_group + + def add_actor_group(self, group) -> dict: + groupDict = group.to_dict() + self.manifest['values'].append(groupDict) + return groupDict + + def add_motion_group(self, group) -> dict: + groupDict = group.to_dict() + self.manifest['values'].append(groupDict) + return groupDict + + def mesh_group_select_node(self, mesh_group: dict, node_name: str) -> None: + """Adds a node as a selected node. + + Parameters + ---------- + mesh_group : + Mesh group to apply the selection to. + node_name : + Path of the node. + + """ + mesh_group['nodeSelectionList']['selectedNodes'].append(node_name) + + def mesh_group_unselect_node(self, mesh_group: dict, node_name: str) -> None: + """Adds a node as an unselected node. + + Parameters + ---------- + mesh_group : + Mesh group to apply the selection to. + node_name : + Path of the node. + + """ + mesh_group['nodeSelectionList']['unselectedNodes'].append(node_name) + + def mesh_group_add_advanced_coordinate_system(self, mesh_group: dict, + origin_node_name: str = '', + translation: typing.Optional[object] = None, + rotation: typing.Optional[object] = None, + scale: float = 1.0) -> None: + """Adds an Advanced Coordinate System rule which modifies the target coordinate system, + applying a transformation to all data (transforms and vertex data if it exists). + + Parameters + ---------- + mesh_group : + Mesh group to add the Advanced Coordinate System rule to. + origin_node_name : + Path of the node to use as the origin. + translation : + Moves the group along the given vector. + rotation : + Sets the orientation offset of the processed mesh in degrees. Rotates the group after translation. + scale : + Sets the scale offset of the processed mesh. + + """ + origin_rule = { + '$type': 'CoordinateSystemRule', + 'useAdvancedData': True, + 'originNodeName': self.__default_or_value(origin_node_name, '') + } if translation is not None: - originRule['translation'] = translation + origin_rule['translation'] = translation if rotation is not None: - originRule['rotation'] = rotation + origin_rule['rotation'] = rotation if scale != 1.0: - originRule['scale'] = scale - meshGroup['rules']['rules'].append(originRule) + origin_rule['scale'] = scale + mesh_group['rules']['rules'].append(origin_rule) - def mesh_group_add_comment(self, meshGroup, comment): - commentRule = {} - commentRule['$type'] = 'CommentRule' - commentRule['comment'] = comment - meshGroup['rules']['rules'].append(commentRule) + def mesh_group_add_comment(self, mesh_group: dict, comment: str) -> None: + """Adds a Comment rule. + + Parameters + ---------- + mesh_group : + Mesh group to add the comment rule to. + comment : + Text for the comment rule. + + """ + comment_rule = { + '$type': 'CommentRule', + 'comment': comment + } + mesh_group['rules']['rules'].append(comment_rule) + + def __default_or_value(self, val, default): + return default if val is None else val + + def mesh_group_add_cloth_rule(self, mesh_group: dict, + cloth_node_name: str, + inverse_masses_stream_name: typing.Optional[str], + inverse_masses_channel: typing.Optional[ColorChannel], + motion_constraints_stream_name: typing.Optional[str], + motion_constraints_channel: typing.Optional[ColorChannel], + backstop_stream_name: typing.Optional[str], + backstop_offset_channel: typing.Optional[ColorChannel], + backstop_radius_channel: typing.Optional[ColorChannel]) -> None: + """Adds a Cloth rule. + + Parameters + ---------- + mesh_group : + Mesh Group to add the cloth rule to + cloth_node_name : + Name of the node that the rule applies to + inverse_masses_stream_name : + Name of the color stream to use for inverse masses + inverse_masses_channel : + Color channel (index) for inverse masses + motion_constraints_stream_name : + Name of the color stream to use for motion constraints + motion_constraints_channel : + Color channel (index) for motion constraints + backstop_stream_name : + Name of the color stream to use for backstop + backstop_offset_channel : + Color channel (index) for backstop offset value + backstop_radius_channel : + Color channel (index) for backstop radius value + + """ + cloth_rule = { + '$type': 'ClothRule', + 'meshNodeName': cloth_node_name, + 'inverseMassesStreamName': self.__default_or_value(inverse_masses_stream_name, 'Default: 1.0') + } + + if inverse_masses_channel is not None: + cloth_rule['inverseMassesChannel'] = int(inverse_masses_channel) + cloth_rule['motionConstraintsStreamName'] = self.__default_or_value(motion_constraints_stream_name, 'Default: 1.0') + if motion_constraints_channel is not None: + cloth_rule['motionConstraintsChannel'] = int(motion_constraints_channel) + cloth_rule['backstopStreamName'] = self.__default_or_value(backstop_stream_name, 'None') + if backstop_offset_channel is not None: + cloth_rule['backstopOffsetChannel'] = int(backstop_offset_channel) + if backstop_radius_channel is not None: + cloth_rule['backstopRadiusChannel'] = int(backstop_radius_channel) + mesh_group['rules']['rules'].append(cloth_rule) + + def mesh_group_add_lod_rule(self, mesh_group: dict) -> dict: + """Adds an LOD rule. + + Parameters + ---------- + mesh_group : + Mesh Group to add the rule to. + + + Returns + ------- + dict + LOD rule. + + """ + lod_rule = { + '$type': '{6E796AC8-1484-4909-860A-6D3F22A7346F} LodRule', + 'nodeSelectionList': [] + } + + mesh_group['rules']['rules'].append(lod_rule) + return lod_rule + + def lod_rule_add_lod(self, lod_rule: dict) -> dict: + """Adds an LOD level to the LOD rule. Nodes are added in order. The first node added represents LOD1, 2nd LOD2, etc. + + Parameters + ---------- + lod_rule : + LOD rule to add the LOD level to. + + + Returns + ------- + dict + LOD level. + + """ + lod = {'selectedNodes': [], 'unselectedNodes': []} + lod_rule['nodeSelectionList'].append(lod) + return lod + + def lod_select_node(self, lod: dict, selected_node: str) -> None: + """Adds a node as a selected node. + + Parameters + ---------- + lod : + LOD level to add the node to. + selected_node : + Path of the node. + + """ + lod['selectedNodes'].append(selected_node) + + def lod_unselect_node(self, lod: dict, unselected_node: str) -> None: + """Adds a node as an unselected node. + + Parameters + ---------- + lod : + LOD rule to add the node to. + unselected_node : + Path of the node. + + """ + lod['unselectedNodes'].append(unselected_node) + + def mesh_group_add_advanced_mesh_rule(self, mesh_group: dict, + use_32bit_vertices: bool = False, + merge_meshes: bool = True, + use_custom_normals: bool = True, + vertex_color_stream: typing.Optional[str] = None) -> None: + """Adds an Advanced Mesh rule. + + Parameters + ---------- + mesh_group : + Mesh Group to add the rule to. + use_32bit_vertices : + False = 16bit vertex position precision. True = 32bit vertex position precision. + merge_meshes : + Merge all meshes into a single mesh. + use_custom_normals : + True = use normals from DCC tool. False = average normals. + vertex_color_stream : + Color stream name to use for Vertex Coloring. + + """ + rule = { + '$type': 'StaticMeshAdvancedRule', + 'use32bitVertices': use_32bit_vertices, + 'mergeMeshes': merge_meshes, + 'useCustomNormals': use_custom_normals + } + + if vertex_color_stream is not None: + rule['vertexColorStreamName'] = vertex_color_stream + + mesh_group['rules']['rules'].append(rule) + + def mesh_group_add_skin_rule(self, mesh_group: dict, max_weights_per_vertex: int = 4, weight_threshold: float = 0.001) -> None: + """Adds a Skin rule. + + Parameters + ---------- + mesh_group : + Mesh Group to add the rule to. + max_weights_per_vertex : + Max number of joints that can influence a vertex. + weight_threshold : + Weight values below this value will be treated as 0. + + """ + rule = { + '$type': 'SkinRule', + 'maxWeightsPerVertex': max_weights_per_vertex, + 'weightThreshold': weight_threshold + } + + mesh_group['rules']['rules'].append(rule) + + def mesh_group_add_tangent_rule(self, mesh_group: dict, + tangent_space: TangentSpaceSource = TangentSpaceSource.SCENE, + tspace_method: TangentSpaceMethod = TangentSpaceMethod.TSPACE) -> None: + """Adds a Tangent rule to control tangent space generation. + + Parameters + ---------- + mesh_group : + Mesh Group to add the rule to. + tangent_space : + Tangent space source. 0 = Scene, 1 = MikkT Tangent Generation. + tspace_method : + MikkT Generation method. 0 = TSpace, 1 = TSpaceBasic. + + """ + rule = { + '$type': 'TangentsRule', + 'tangentSpace': int(tangent_space), + 'tSpaceMethod': int(tspace_method) + } + + mesh_group['rules']['rules'].append(rule) + + def __add_physx_base_mesh_group(self, name: str, physics_material: typing.Optional[str] = None) -> dict: + import azlmbr.math + group = { + '$type': '{5B03C8E6-8CEE-4DA0-A7FA-CD88689DD45B} MeshGroup', + 'id': azlmbr.math.Uuid_CreateRandom().ToString(), + 'name': name, + 'NodeSelectionList': { + 'selectedNodes': [], + 'unselectedNodes': [] + }, + "MaterialSlots": [ + "Material" + ], + "PhysicsMaterials": [ + self.__default_or_value(physics_material, "") + ], + "rules": { + "rules": [] + } + } + self.manifest['values'].append(group) + + return group + + def add_physx_triangle_mesh_group(self, name: str, + merge_meshes: bool = True, + weld_vertices: bool = False, + disable_clean_mesh: bool = False, + force_32bit_indices: bool = False, + suppress_triangle_mesh_remap_table: bool = False, + build_triangle_adjacencies: bool = False, + mesh_weld_tolerance: float = 0.0, + num_tris_per_leaf: int = 4, + physics_material: typing.Optional[str] = None) -> dict: + """Adds a Triangle type PhysX Mesh Group to the scene. + + Parameters + ---------- + name : + Name of the mesh group. + merge_meshes : + When true, all selected nodes will be merged into a single collision mesh. + weld_vertices : + When true, mesh welding is performed. Clean mesh must be enabled. + disable_clean_mesh : + When true, mesh cleaning is disabled. This makes cooking faster. + force_32bit_indices : + When true, 32-bit indices will always be created regardless of triangle count. + suppress_triangle_mesh_remap_table : + When true, the face remap table is not created. + This saves a significant amount of memory, but the SDK will not be able to provide the remap + information for internal mesh triangles returned by collisions, sweeps or raycasts hits. + build_triangle_adjacencies : + When true, the triangle adjacency information is created. + mesh_weld_tolerance : + If mesh welding is enabled, this controls the distance at + which vertices are welded. If mesh welding is not enabled, this value defines the + acceptance distance for mesh validation. Provided no two vertices are within this + distance, the mesh is considered to be clean. If not, a warning will be emitted. + num_tris_per_leaf : + Mesh cooking hint for max triangles per leaf limit. Fewer triangles per leaf + produces larger meshes with better runtime performance and worse cooking performance. + physics_material : + Configure which physics material to use. + + Returns + ------- + dict + The newly created mesh group. + + """ + group = self.__add_physx_base_mesh_group(name, physics_material) + group["export method"] = 0 + group["TriangleMeshAssetParams"] = { + "MergeMeshes": merge_meshes, + "WeldVertices": weld_vertices, + "DisableCleanMesh": disable_clean_mesh, + "Force32BitIndices": force_32bit_indices, + "SuppressTriangleMeshRemapTable": suppress_triangle_mesh_remap_table, + "BuildTriangleAdjacencies": build_triangle_adjacencies, + "MeshWeldTolerance": mesh_weld_tolerance, + "NumTrisPerLeaf": num_tris_per_leaf + } + + return group + + def add_physx_convex_mesh_group(self, name: str, area_test_epsilon: float = 0.059, plane_tolerance: float = 0.0006, + use_16bit_indices: bool = False, + check_zero_area_triangles: bool = False, + quantize_input: bool = False, + use_plane_shifting: bool = False, + shift_vertices: bool = False, + gauss_map_limit: int = 32, + build_gpu_data: bool = False, + physics_material: typing.Optional[str] = None) -> dict: + """Adds a Convex type PhysX Mesh Group to the scene. + + Parameters + ---------- + name : + Name of the mesh group. + area_test_epsilon : + If the area of a triangle of the hull is below this value, the triangle will be + rejected. This test is done only if Check Zero Area Triangles is used. + plane_tolerance : + The value is used during hull construction. When a new point is about to be added + to the hull it gets dropped when the point is closer to the hull than the planeTolerance. + use_16bit_indices : + Denotes the use of 16-bit vertex indices in Convex triangles or polygons. + check_zero_area_triangles : + Checks and removes almost zero-area triangles during convex hull computation. + The rejected area size is specified in Area Test Epsilon. + quantize_input : + Quantizes the input vertices using the k-means clustering. + use_plane_shifting : + Enables plane shifting vertex limit algorithm. Plane shifting is an alternative + algorithm for the case when the computed hull has more vertices than the specified vertex + limit. + shift_vertices : + Convex hull input vertices are shifted to be around origin to provide better + computation stability + gauss_map_limit : + Vertex limit beyond which additional acceleration structures are computed for each + convex mesh. Increase that limit to reduce memory usage. Computing the extra structures + all the time does not guarantee optimal performance. + build_gpu_data : + When true, additional information required for GPU-accelerated rigid body + simulation is created. This can increase memory usage and cooking times for convex meshes + and triangle meshes. Convex hulls are created with respect to GPU simulation limitations. + Vertex limit is set to 64 and vertex limit per face is internally set to 32. + physics_material : + Configure which physics material to use. + + Returns + ------- + dict + The newly created mesh group. + + """ + group = self.__add_physx_base_mesh_group(name, physics_material) + group["export method"] = 1 + group["ConvexAssetParams"] = { + "AreaTestEpsilon": area_test_epsilon, + "PlaneTolerance": plane_tolerance, + "Use16bitIndices": use_16bit_indices, + "CheckZeroAreaTriangles": check_zero_area_triangles, + "QuantizeInput": quantize_input, + "UsePlaneShifting": use_plane_shifting, + "ShiftVertices": shift_vertices, + "GaussMapLimit": gauss_map_limit, + "BuildGpuData": build_gpu_data + } + + return group + + def add_physx_primitive_mesh_group(self, name: str, + primitive_shape_target: PrimitiveShape = PrimitiveShape.BEST_FIT, + volume_term_coefficient: float = 0.0, + physics_material: typing.Optional[str] = None) -> dict: + """Adds a Primitive Shape type PhysX Mesh Group to the scene + + Parameters + ---------- + name : + Name of the mesh group. + primitive_shape_target : + The shape that should be fitted to this mesh. If BEST_FIT is selected, the + algorithm will determine which of the shapes fits best. + volume_term_coefficient : + This parameter controls how aggressively the primitive fitting algorithm will try + to minimize the volume of the fitted primitive. A value of 0 (no volume minimization) is + recommended for most meshes, especially those with moderate to high vertex counts. + physics_material : + Configure which physics material to use. + + Returns + ------- + dict + The newly created mesh group. + + """ + group = self.__add_physx_base_mesh_group(name, physics_material) + group["export method"] = 2 + group["PrimitiveAssetParams"] = { + "PrimitiveShapeTarget": int(primitive_shape_target), + "VolumeTermCoefficient": volume_term_coefficient + } + + return group + + def physx_mesh_group_decompose_meshes(self, mesh_group: dict, max_convex_hulls: int = 1024, + max_num_vertices_per_convex_hull: int = 64, + concavity: float = .001, + resolution: float = 100000, + mode: DecompositionMode = DecompositionMode.VOXEL, + alpha: float = .05, + beta: float = .05, + min_volume_per_convex_hull: float = 0.0001, + plane_downsampling: int = 4, + convex_hull_downsampling: int = 4, + pca: bool = False, + project_hull_vertices: bool = True) -> None: + """Enables and configures mesh decomposition for a PhysX Mesh Group. + Only valid for convex or primitive mesh types. + + Parameters + ---------- + mesh_group : + Mesh group to configure decomposition for. + max_convex_hulls : + Controls the maximum number of hulls to generate. + max_num_vertices_per_convex_hull : + Controls the maximum number of triangles per convex hull. + concavity : + Maximum concavity of each approximate convex hull. + resolution : + Maximum number of voxels generated during the voxelization stage. + mode : + Select voxel-based approximate convex decomposition or tetrahedron-based + approximate convex decomposition. + alpha : + Controls the bias toward clipping along symmetry planes. + beta : + Controls the bias toward clipping along revolution axes. + min_volume_per_convex_hull : + Controls the adaptive sampling of the generated convex hulls. + plane_downsampling : + Controls the granularity of the search for the best clipping plane. + convex_hull_downsampling : + Controls the precision of the convex hull generation process + during the clipping plane selection stage. + pca : + Enable or disable normalizing the mesh before applying the convex decomposition. + project_hull_vertices : + Project the output convex hull vertices onto the original source mesh to increase + the floating point accuracy of the results. + """ + mesh_group['DecomposeMeshes'] = True + mesh_group['ConvexDecompositionParams'] = { + "MaxConvexHulls": max_convex_hulls, + "MaxNumVerticesPerConvexHull": max_num_vertices_per_convex_hull, + "Concavity": concavity, + "Resolution": resolution, + "Mode": int(mode), + "Alpha": alpha, + "Beta": beta, + "MinVolumePerConvexHull": min_volume_per_convex_hull, + "PlaneDownsampling": plane_downsampling, + "ConvexHullDownsampling": convex_hull_downsampling, + "PCA": pca, + "ProjectHullVertices": project_hull_vertices + } + + def physx_mesh_group_add_selected_node(self, mesh_group: dict, node: str) -> None: + """Adds a node to the selected nodes list + + Parameters + ---------- + mesh_group : + Mesh group to add to. + node : + Node path to add. + """ + mesh_group['NodeSelectionList']['selectedNodes'].append(node) + + def physx_mesh_group_add_unselected_node(self, mesh_group: dict, node: str) -> None: + """Adds a node to the unselected nodes list + + Parameters + ---------- + mesh_group : + Mesh group to add to. + node : + Node path to add. + """ + mesh_group['NodeSelectionList']['unselectedNodes'].append(node) + + def physx_mesh_group_add_selected_unselected_nodes(self, mesh_group: dict, selected: typing.List[str], + unselected: typing.List[str]) -> None: + """Adds a set of nodes to the selected/unselected node lists + + Parameters + ---------- + mesh_group : + Mesh group to add to. + selected : + List of node paths to add to the selected list. + unselected : + List of node paths to add to the unselected list. + """ + mesh_group['NodeSelectionList']['selectedNodes'].extend(selected) + mesh_group['NodeSelectionList']['unselectedNodes'].extend(unselected) + + def physx_mesh_group_add_comment(self, mesh_group: dict, comment: str) -> None: + """Adds a comment rule + + Parameters + ---------- + mesh_group : + Mesh group to add the rule to. + comment : + Comment string. + """ + rule = { + "$type": "CommentRule", + "comment": comment + } + mesh_group['rules']['rules'].append(rule) def export(self): return json.dumps(self.manifest) diff --git a/Gems/PythonAssetBuilder/gem.json b/Gems/PythonAssetBuilder/gem.json index ce30ba9e82..8046104f03 100644 --- a/Gems/PythonAssetBuilder/gem.json +++ b/Gems/PythonAssetBuilder/gem.json @@ -2,6 +2,7 @@ "gem_name": "PythonAssetBuilder", "display_name": "Python Asset Builder", "license": "Apache-2.0 Or MIT", + "license_url": "https://github.com/o3de/o3de/blob/development/LICENSE.txt", "origin": "Open 3D Engine - o3de.org", "type": "Code", "summary": "The Python Asset Builder Gem provides functionality to implement custom asset builders in Python for Asset Processor.", diff --git a/Gems/QtForPython/Code/CMakeLists.txt b/Gems/QtForPython/Code/CMakeLists.txt index 48ce5c02d3..da763978a6 100644 --- a/Gems/QtForPython/Code/CMakeLists.txt +++ b/Gems/QtForPython/Code/CMakeLists.txt @@ -21,7 +21,8 @@ ly_add_target( NAME QtForPython.Editor.Static STATIC NAMESPACE Gem FILES_CMAKE - qtforpython_editor_${PAL_PLATFORM_NAME_LOWERCASE}_files.cmake + qtforpython_editor_files.cmake + ${CMAKE_CURRENT_SOURCE_DIR}/Source/Platform/${PAL_PLATFORM_NAME}/qtforpython_editor_${PAL_PLATFORM_NAME_LOWERCASE}_files.cmake PLATFORM_INCLUDE_FILES ${common_source_dir}/${PAL_TRAIT_COMPILER_ID}/qtforpython_${PAL_TRAIT_COMPILER_ID_LOWERCASE}.cmake INCLUDE_DIRECTORIES @@ -45,6 +46,9 @@ ly_add_target( NAMESPACE Gem FILES_CMAKE qtforpython_shared_files.cmake + INCLUDE_DIRECTORIES + PRIVATE + ${CMAKE_CURRENT_SOURCE_DIR}/Source/Platform/${PAL_PLATFORM_NAME} BUILD_DEPENDENCIES PRIVATE Gem::QtForPython.Editor.Static diff --git a/Gems/QtForPython/Code/Source/Platform/Linux/InitializeEmbeddedPyside2.h b/Gems/QtForPython/Code/Source/Platform/Linux/InitializeEmbeddedPyside2.h new file mode 100644 index 0000000000..dfdf2a66dc --- /dev/null +++ b/Gems/QtForPython/Code/Source/Platform/Linux/InitializeEmbeddedPyside2.h @@ -0,0 +1,64 @@ +/* + * Copyright (c) Contributors to the Open 3D Engine Project. + * For complete copyright and license terms please see the LICENSE at the root of this distribution. + * + * SPDX-License-Identifier: Apache-2.0 OR MIT + * + */ +#pragma once + +#include +#include + +namespace QtForPython +{ + const char* s_libPythonLibraryFile = "libpython3.7m.so.1.0"; + const char* s_libPyside2LibraryFile = "libpyside2.abi3.so.5.14"; + const char* s_libShibokenLibraryFile = "libshiboken2.abi3.so.5.14"; + const char* s_libQt5TestLibraryFile = "libQt5Test.so.5"; + + class InitializeEmbeddedPyside2 + { + public: + InitializeEmbeddedPyside2() + { + m_libPythonLibraryFile = InitializeEmbeddedPyside2::LoadModule(s_libPythonLibraryFile); + m_libPyside2LibraryFile = InitializeEmbeddedPyside2::LoadModule(s_libPyside2LibraryFile); + m_libShibokenLibraryFile = InitializeEmbeddedPyside2::LoadModule(s_libShibokenLibraryFile); + m_libQt5TestLibraryFile = InitializeEmbeddedPyside2::LoadModule(s_libQt5TestLibraryFile); + } + virtual ~InitializeEmbeddedPyside2() + { + InitializeEmbeddedPyside2::UnloadModule(m_libQt5TestLibraryFile); + InitializeEmbeddedPyside2::UnloadModule(m_libShibokenLibraryFile); + InitializeEmbeddedPyside2::UnloadModule(m_libPyside2LibraryFile); + InitializeEmbeddedPyside2::UnloadModule(m_libPythonLibraryFile); + } + + private: + static void* LoadModule(const char* moduleToLoad) + { + void* moduleHandle = dlopen(moduleToLoad, RTLD_NOW | RTLD_GLOBAL); + if (!moduleHandle) + { + [[maybe_unused]] const char* loadError = dlerror(); + AZ_Error("QtForPython", false, "Unable to load python library %s for Pyside2: %s", moduleToLoad, + loadError ? loadError : "Unknown Error"); + } + return moduleHandle; + } + + static void UnloadModule(void* moduleHandle) + { + if (moduleHandle) + { + dlclose(moduleHandle); + } + } + + void* m_libPythonLibraryFile; + void* m_libPyside2LibraryFile; + void* m_libShibokenLibraryFile; + void* m_libQt5TestLibraryFile; + }; +} // namespace QtForPython diff --git a/Gems/QtForPython/Code/Source/Platform/Linux/PAL_linux.cmake b/Gems/QtForPython/Code/Source/Platform/Linux/PAL_linux.cmake index 236043e893..789d2afae2 100644 --- a/Gems/QtForPython/Code/Source/Platform/Linux/PAL_linux.cmake +++ b/Gems/QtForPython/Code/Source/Platform/Linux/PAL_linux.cmake @@ -6,4 +6,4 @@ # # -set(PAL_TRAIT_BUILD_QTFORPYTHON_SUPPORTED FALSE) +set(PAL_TRAIT_BUILD_QTFORPYTHON_SUPPORTED TRUE) diff --git a/Gems/QtForPython/Code/Source/Platform/Linux/qtforpython_editor_linux_files.cmake b/Gems/QtForPython/Code/Source/Platform/Linux/qtforpython_editor_linux_files.cmake new file mode 100644 index 0000000000..54c588a247 --- /dev/null +++ b/Gems/QtForPython/Code/Source/Platform/Linux/qtforpython_editor_linux_files.cmake @@ -0,0 +1,11 @@ +# +# Copyright (c) Contributors to the Open 3D Engine Project. +# For complete copyright and license terms please see the LICENSE at the root of this distribution. +# +# SPDX-License-Identifier: Apache-2.0 OR MIT +# +# + +set(FILES + InitializeEmbeddedPyside2.h +) diff --git a/Gems/QtForPython/Code/Source/Platform/Mac/InitializeEmbeddedPyside2.h b/Gems/QtForPython/Code/Source/Platform/Mac/InitializeEmbeddedPyside2.h new file mode 100644 index 0000000000..819764620b --- /dev/null +++ b/Gems/QtForPython/Code/Source/Platform/Mac/InitializeEmbeddedPyside2.h @@ -0,0 +1,18 @@ +/* + * Copyright (c) Contributors to the Open 3D Engine Project. + * For complete copyright and license terms please see the LICENSE at the root of this distribution. + * + * SPDX-License-Identifier: Apache-2.0 OR MIT + * + */ +#pragma once + +namespace QtForPython +{ + class InitializeEmbeddedPyside2 + { + public: + InitializeEmbeddedPyside2() = default; + virtual ~InitializeEmbeddedPyside2() = default; + }; +} // namespace QtForPython diff --git a/Gems/QtForPython/Code/Source/Platform/Mac/qtforpython_editor_macos_files.cmake b/Gems/QtForPython/Code/Source/Platform/Mac/qtforpython_editor_macos_files.cmake new file mode 100644 index 0000000000..54c588a247 --- /dev/null +++ b/Gems/QtForPython/Code/Source/Platform/Mac/qtforpython_editor_macos_files.cmake @@ -0,0 +1,11 @@ +# +# Copyright (c) Contributors to the Open 3D Engine Project. +# For complete copyright and license terms please see the LICENSE at the root of this distribution. +# +# SPDX-License-Identifier: Apache-2.0 OR MIT +# +# + +set(FILES + InitializeEmbeddedPyside2.h +) diff --git a/Gems/QtForPython/Code/Source/Platform/Windows/InitializeEmbeddedPyside2.h b/Gems/QtForPython/Code/Source/Platform/Windows/InitializeEmbeddedPyside2.h new file mode 100644 index 0000000000..819764620b --- /dev/null +++ b/Gems/QtForPython/Code/Source/Platform/Windows/InitializeEmbeddedPyside2.h @@ -0,0 +1,18 @@ +/* + * Copyright (c) Contributors to the Open 3D Engine Project. + * For complete copyright and license terms please see the LICENSE at the root of this distribution. + * + * SPDX-License-Identifier: Apache-2.0 OR MIT + * + */ +#pragma once + +namespace QtForPython +{ + class InitializeEmbeddedPyside2 + { + public: + InitializeEmbeddedPyside2() = default; + virtual ~InitializeEmbeddedPyside2() = default; + }; +} // namespace QtForPython diff --git a/Gems/QtForPython/Code/Source/Platform/Windows/qtforpython_editor_windows_files.cmake b/Gems/QtForPython/Code/Source/Platform/Windows/qtforpython_editor_windows_files.cmake new file mode 100644 index 0000000000..54c588a247 --- /dev/null +++ b/Gems/QtForPython/Code/Source/Platform/Windows/qtforpython_editor_windows_files.cmake @@ -0,0 +1,11 @@ +# +# Copyright (c) Contributors to the Open 3D Engine Project. +# For complete copyright and license terms please see the LICENSE at the root of this distribution. +# +# SPDX-License-Identifier: Apache-2.0 OR MIT +# +# + +set(FILES + InitializeEmbeddedPyside2.h +) diff --git a/Gems/QtForPython/Code/Source/QtForPythonModule.cpp b/Gems/QtForPython/Code/Source/QtForPythonModule.cpp index 1ed79310b4..ad39d0b82c 100644 --- a/Gems/QtForPython/Code/Source/QtForPythonModule.cpp +++ b/Gems/QtForPython/Code/Source/QtForPythonModule.cpp @@ -8,13 +8,17 @@ #include #include +#include #include +#include "InitializeEmbeddedPyside2.h" + namespace QtForPython { class QtForPythonModule : public AZ::Module + , private InitializeEmbeddedPyside2 { public: AZ_RTTI(QtForPythonModule, "{81545CD5-79FA-47CE-96F2-1A9C5D59B4B9}", AZ::Module); @@ -22,11 +26,13 @@ namespace QtForPython QtForPythonModule() : AZ::Module() + , InitializeEmbeddedPyside2() { m_descriptors.insert(m_descriptors.end(), { QtForPythonSystemComponent::CreateDescriptor(), }); } + ~QtForPythonModule() override = default; /** * Add required SystemComponents to the SystemEntity. diff --git a/Gems/QtForPython/Code/Source/QtForPythonSystemComponent.cpp b/Gems/QtForPython/Code/Source/QtForPythonSystemComponent.cpp index 83a158dd18..240beff78e 100644 --- a/Gems/QtForPython/Code/Source/QtForPythonSystemComponent.cpp +++ b/Gems/QtForPython/Code/Source/QtForPythonSystemComponent.cpp @@ -203,10 +203,6 @@ namespace QtForPython { QtBootstrapParameters params; -#if !defined(Q_OS_WIN) -#error Unsupported OS platform for this QtForPython gem -#endif - params.m_mainWindowId = 0; using namespace AzToolsFramework; QWidget* activeWindow = nullptr; diff --git a/Gems/QtForPython/Code/qtforpython_editor_macos_files.cmake b/Gems/QtForPython/Code/Source/qtforpython_editor_files.cmake similarity index 100% rename from Gems/QtForPython/Code/qtforpython_editor_macos_files.cmake rename to Gems/QtForPython/Code/Source/qtforpython_editor_files.cmake diff --git a/Gems/QtForPython/Code/qtforpython_editor_windows_files.cmake b/Gems/QtForPython/Code/qtforpython_editor_files.cmake similarity index 100% rename from Gems/QtForPython/Code/qtforpython_editor_windows_files.cmake rename to Gems/QtForPython/Code/qtforpython_editor_files.cmake diff --git a/Gems/QtForPython/gem.json b/Gems/QtForPython/gem.json index f83be43342..17d3a26f21 100644 --- a/Gems/QtForPython/gem.json +++ b/Gems/QtForPython/gem.json @@ -2,6 +2,7 @@ "gem_name": "QtForPython", "display_name": "Qt for Python", "license": "Apache-2.0 Or MIT", + "license_url": "https://github.com/o3de/o3de/blob/development/LICENSE.txt", "origin": "Open 3D Engine - o3de.org", "type": "Tool", "summary": "The Qt for Python Gem provides the PySide2 Python libraries to manage Qt widgets.", diff --git a/Gems/SaveData/Code/Source/Platform/Linux/SaveData_SystemComponent_Linux.cpp b/Gems/SaveData/Code/Source/Platform/Linux/SaveData_SystemComponent_Linux.cpp new file mode 100644 index 0000000000..caa9e9bf54 --- /dev/null +++ b/Gems/SaveData/Code/Source/Platform/Linux/SaveData_SystemComponent_Linux.cpp @@ -0,0 +1,173 @@ +/* + * Copyright (c) Contributors to the Open 3D Engine Project. + * For complete copyright and license terms please see the LICENSE at the root of this distribution. + * + * SPDX-License-Identifier: Apache-2.0 OR MIT + * + */ + +#include + +#include +#include +#include +#include +#include + +#include +#include +#include + +//////////////////////////////////////////////////////////////////////////////////////////////////// +namespace SaveData +{ + //////////////////////////////////////////////////////////////////////////////////////////////// + //! Platform specific implementation for the save data system component on Linux + class SaveDataSystemComponentLinux : public SaveDataSystemComponent::Implementation + { + public: + //////////////////////////////////////////////////////////////////////////////////////////// + static constexpr const char* DefaultSaveDataDirectoryName = "SaveData"; + + //////////////////////////////////////////////////////////////////////////////////////////// + // Allocator + AZ_CLASS_ALLOCATOR(SaveDataSystemComponentLinux, AZ::SystemAllocator, 0); + + //////////////////////////////////////////////////////////////////////////////////////////// + //! Constructor + //! \param[in] saveDataSystemComponent Reference to the parent being implemented + SaveDataSystemComponentLinux(SaveDataSystemComponent& saveDataSystemComponent); + + //////////////////////////////////////////////////////////////////////////////////////////// + //! Destructor + ~SaveDataSystemComponentLinux() override; + + protected: + //////////////////////////////////////////////////////////////////////////////////////////// + //! \ref SaveData::SaveDataSystemComponent::Implementation::SaveDataBuffer + void SaveDataBuffer(const SaveDataRequests::SaveDataBufferParams& saveDataBufferParams) override; + + //////////////////////////////////////////////////////////////////////////////////////////// + //! \ref SaveData::SaveDataSystemComponent::Implementation::LoadDataBuffer + void LoadDataBuffer(const SaveDataRequests::LoadDataBufferParams& loadDataBufferParams) override; + + //////////////////////////////////////////////////////////////////////////////////////////// + //! \ref SaveData::SaveDataSystemComponent::Implementation::SetSaveDataDirectoryPath + void SetSaveDataDirectoryPath(const char* saveDataDirectoryPath) override; + + private: + //////////////////////////////////////////////////////////////////////////////////////////// + //! Convenience function to construct the full save data file path. + //! \param[in] dataBufferName The name of the save data buffer. + //! \param[in] localUserId The local user id the save data buffer is associated with. + AZ::IO::Path GetSaveDataFilePath(const AZStd::string& dataBufferName, + AzFramework::LocalUserId localUserId); + + //////////////////////////////////////////////////////////////////////////////////////////// + //! The absolute path to the application's save data dircetory. + AZ::IO::Path m_saveDataDirectoryPathAbsolute; + }; + + //////////////////////////////////////////////////////////////////////////////////////////////// + AZ::IO::Path GetDefaultLinuxUserSaveDataPath() + { + // First priority for the home directory is the 'HOME' environment variable + const char* homeDir = getenv("HOME"); + if (homeDir == nullptr) + { + // If the 'HOME' environment variable is not set, then retrieve it from the 'getpwuid' + // system call + auto uid = getuid(); + auto pwuid = getpwuid(uid); + homeDir = pwuid->pw_dir; + } + + AZ_Assert(homeDir, "Unable to determine home directory for current Linux user"); + if (homeDir == nullptr) + { + homeDir = "/tmp"; + } + + AZ::IO::Path homePath {homeDir}; + + // $HOME/.local/share is the standard directory where user data is stored on Ubuntu + return homePath / ".local" / "share"; + } + + //////////////////////////////////////////////////////////////////////////////////////////////// + AZStd::string GetExecutableName() + { + char moduleFileName[AZ_MAX_PATH_LEN]; + AZ::Utils::GetExecutablePath(moduleFileName, AZ_MAX_PATH_LEN); + + AZ::IO::Path executableFullPath {moduleFileName}; + AZStd::string moduleFileNameString {executableFullPath.Filename().Native()}; + return moduleFileNameString; + } + + //////////////////////////////////////////////////////////////////////////////////////////////// + SaveDataSystemComponent::Implementation* SaveDataSystemComponent::Implementation::Create(SaveDataSystemComponent& saveDataSystemComponent) + { + return aznew SaveDataSystemComponentLinux(saveDataSystemComponent); + } + + //////////////////////////////////////////////////////////////////////////////////////////////// + SaveDataSystemComponentLinux::SaveDataSystemComponentLinux(SaveDataSystemComponent& saveDataSystemComponent) + : SaveDataSystemComponent::Implementation(saveDataSystemComponent) + , m_saveDataDirectoryPathAbsolute(GetDefaultLinuxUserSaveDataPath() / + GetExecutableName().c_str() / + DefaultSaveDataDirectoryName) + { + } + + //////////////////////////////////////////////////////////////////////////////////////////////// + SaveDataSystemComponentLinux::~SaveDataSystemComponentLinux() + { + } + + //////////////////////////////////////////////////////////////////////////////////////////////// + void SaveDataSystemComponentLinux::SaveDataBuffer(const SaveDataRequests::SaveDataBufferParams& saveDataBufferParams) + { + const AZStd::string absoluteFilePath = GetSaveDataFilePath(saveDataBufferParams.dataBufferName, + saveDataBufferParams.localUserId).c_str(); + SaveDataBufferToFileSystem(saveDataBufferParams, absoluteFilePath); + } + + //////////////////////////////////////////////////////////////////////////////////////////////// + void SaveDataSystemComponentLinux::LoadDataBuffer(const SaveDataRequests::LoadDataBufferParams& loadDataBufferParams) + { + const AZStd::string absoluteFilePath = GetSaveDataFilePath(loadDataBufferParams.dataBufferName, + loadDataBufferParams.localUserId).c_str(); + LoadDataBufferFromFileSystem(loadDataBufferParams, absoluteFilePath); + } + + //////////////////////////////////////////////////////////////////////////////////////////////// + void SaveDataSystemComponentLinux::SetSaveDataDirectoryPath(const char* saveDataDirectoryPath) + { + AZ::IO::Path saveDataDirectoryBasicPath { saveDataDirectoryPath }; + + if (saveDataDirectoryBasicPath.IsAbsolute()) + { + m_saveDataDirectoryPathAbsolute = saveDataDirectoryBasicPath; + } + else + { + m_saveDataDirectoryPathAbsolute = GetDefaultLinuxUserSaveDataPath() / saveDataDirectoryBasicPath; + } + + AZ_Assert(!m_saveDataDirectoryPathAbsolute.empty(), "Cannot set an empty save data directory path."); + } + + //////////////////////////////////////////////////////////////////////////////////////////////// + AZ::IO::Path SaveDataSystemComponentLinux::GetSaveDataFilePath(const AZStd::string& dataBufferName, + AzFramework::LocalUserId localUserId) + { + AZ::IO::Path saveDataFilePath = m_saveDataDirectoryPathAbsolute; + if (localUserId != AzFramework::LocalUserIdNone) + { + saveDataFilePath /= AZStd::string::format("User_%u", localUserId); + } + saveDataFilePath /= dataBufferName; + return saveDataFilePath; + } +} // namespace SaveData diff --git a/Gems/SaveData/Code/Source/Platform/Linux/platform_linux_files.cmake b/Gems/SaveData/Code/Source/Platform/Linux/platform_linux_files.cmake index 2ef4de6b91..42209a111c 100644 --- a/Gems/SaveData/Code/Source/Platform/Linux/platform_linux_files.cmake +++ b/Gems/SaveData/Code/Source/Platform/Linux/platform_linux_files.cmake @@ -7,7 +7,7 @@ # set(FILES - ../Common/Unimplemented/SaveData_SystemComponent_Unimplemented.cpp + SaveData_SystemComponent_Linux.cpp SaveData_Traits_Platform.h SaveData_Traits_Linux.h ) diff --git a/Gems/SaveData/gem.json b/Gems/SaveData/gem.json index 333b4682d2..1ee5a54cec 100644 --- a/Gems/SaveData/gem.json +++ b/Gems/SaveData/gem.json @@ -2,6 +2,7 @@ "gem_name": "SaveData", "display_name": "Save Data", "license": "Apache-2.0 Or MIT", + "license_url": "https://github.com/o3de/o3de/blob/development/LICENSE.txt", "origin": "Open 3D Engine - o3de.org", "type": "Code", "summary": "The Save Data Gem provides a platform independent API to save and load persistent user data in Open 3D Engine projects.", diff --git a/Gems/SceneLoggingExample/gem.json b/Gems/SceneLoggingExample/gem.json index 16961b9c5b..ad950f3992 100644 --- a/Gems/SceneLoggingExample/gem.json +++ b/Gems/SceneLoggingExample/gem.json @@ -2,6 +2,7 @@ "gem_name": "SceneLoggingExample", "display_name": "Scene Logging Example", "license": "Apache-2.0 Or MIT", + "license_url": "https://github.com/o3de/o3de/blob/development/LICENSE.txt", "origin": "Open 3D Engine - o3de.org", "type": "Asset", "summary": "The Scene Logging Example Gem demonstrates the basics of extending the Open 3D Engine Scene API by adding additional logging to the pipeline.", diff --git a/Gems/SceneProcessing/Code/Source/Generation/Components/MeshOptimizer/MeshBuilderSkinningInfo.cpp b/Gems/SceneProcessing/Code/Source/Generation/Components/MeshOptimizer/MeshBuilderSkinningInfo.cpp index 1d62489fbe..f328f1502c 100644 --- a/Gems/SceneProcessing/Code/Source/Generation/Components/MeshOptimizer/MeshBuilderSkinningInfo.cpp +++ b/Gems/SceneProcessing/Code/Source/Generation/Components/MeshOptimizer/MeshBuilderSkinningInfo.cpp @@ -68,9 +68,8 @@ namespace AZ::MeshBuilder } } - // sort influences on weights, from big to small - void MeshBuilderSkinningInfo::SortInfluences(AZStd::vector& influences) + void MeshBuilderSkinningInfo::SortInfluencesByWeight(AZStd::vector& influences) { AZStd::sort(begin(influences), end(influences), [](const auto& lhs, const auto& rhs) { @@ -78,39 +77,17 @@ namespace AZ::MeshBuilder }); } - // optimize the weight data - void MeshBuilderSkinningInfo::Optimize(AZ::u32 maxNumWeightsPerVertex, float weightThreshold) + void MeshBuilderSkinningInfo::Optimize( + AZStd::vector& influences, AZ::u32 maxNumWeightsPerVertex, float weightThreshold) { - AZStd::vector influences; - - // for all vertices - const size_t numOrgVerts = GetNumOrgVertices(); - for (size_t v = 0; v < numOrgVerts; ++v) + // gather all weights + const size_t numInfluences = influences.size(); + if (numInfluences > 0) { - // gather all weights - const size_t numInfluences = GetNumInfluences(v); - influences.resize(numInfluences); - for (size_t i = 0; i < numInfluences; ++i) - { - influences[i] = GetInfluence(v, i); - } - // optimize the weights and sort them from big to small weight OptimizeSkinningInfluences(influences, weightThreshold, maxNumWeightsPerVertex); - SortInfluences(influences); - - // remove all influences - for (size_t i = 0; i < numInfluences; ++i) - { - RemoveInfluence(v, 0); - } - - // re-add them - for (const Influence& influence : influences) - { - AddInfluence(v, influence); - } + SortInfluencesByWeight(influences); } } } // namespace AZ::MeshBuilder diff --git a/Gems/SceneProcessing/Code/Source/Generation/Components/MeshOptimizer/MeshBuilderSkinningInfo.h b/Gems/SceneProcessing/Code/Source/Generation/Components/MeshOptimizer/MeshBuilderSkinningInfo.h index dd3b715a21..743cdb14df 100644 --- a/Gems/SceneProcessing/Code/Source/Generation/Components/MeshOptimizer/MeshBuilderSkinningInfo.h +++ b/Gems/SceneProcessing/Code/Source/Generation/Components/MeshOptimizer/MeshBuilderSkinningInfo.h @@ -50,13 +50,13 @@ namespace AZ::MeshBuilder } // optimize the weight data - void Optimize(AZ::u32 maxNumWeightsPerVertex = 4, float weightThreshold = 0.0001f); + void Optimize(AZStd::vector& influences, AZ::u32 maxNumWeightsPerVertex = 4, float weightThreshold = 0.0001f); // optimize weights static void OptimizeSkinningInfluences(AZStd::vector& influences, float tolerance, size_t maxWeights); // sort the influences, starting with the biggest weight - static void SortInfluences(AZStd::vector& influences); + static void SortInfluencesByWeight(AZStd::vector& influences); private: AZStd::vector> mInfluences; diff --git a/Gems/SceneProcessing/Code/Source/Generation/Components/MeshOptimizer/MeshOptimizerComponent.cpp b/Gems/SceneProcessing/Code/Source/Generation/Components/MeshOptimizer/MeshOptimizerComponent.cpp index a410c4e6c9..edc0d728fc 100644 --- a/Gems/SceneProcessing/Code/Source/Generation/Components/MeshOptimizer/MeshOptimizerComponent.cpp +++ b/Gems/SceneProcessing/Code/Source/Generation/Components/MeshOptimizer/MeshOptimizerComponent.cpp @@ -69,6 +69,10 @@ namespace AZ::MeshBuilder { using MeshBuilderVertexAttributeLayerColor = MeshBuilderVertexAttributeLayerT; AZ_CLASS_ALLOCATOR_IMPL_TEMPLATE(MeshBuilderVertexAttributeLayerColor, AZ::SystemAllocator, 0) + + using MeshBuilderVertexAttributeLayerSkinInfluence = MeshBuilderVertexAttributeLayerT; + AZ_CLASS_ALLOCATOR_IMPL_TEMPLATE(MeshBuilderVertexAttributeLayerSkinInfluence, AZ::SystemAllocator, 0) + } // namespace AZ::MeshBuilder namespace AZ::SceneGenerationComponents @@ -205,50 +209,27 @@ namespace AZ::SceneGenerationComponents auto* serializeContext = azrtti_cast(context); if (serializeContext) { - serializeContext->Class()->Version(4); + serializeContext->Class()->Version(11); } } - template - static AZStd::unique_ptr ExtractSkinningInfo( - const MeshDataType* meshData, - const SkinWeightDataView& skinWeights, + static AZStd::vector ExtractSkinningInfo( + const AZStd::vector& skinningInfluencesLayers, + const AZ::MeshBuilder::MeshBuilderVertexLookup& vertexLookup, AZ::u32 maxWeightsPerVertex, - float weightThreshold, - const Vector3Map& positionMap) + float weightThreshold) { - if (skinWeights.empty()) + AZ::MeshBuilder::MeshBuilderSkinningInfo skinningInfo(1); + + AZStd::vector influences; + for (const auto& skinLayer : skinningInfluencesLayers) { - return {}; + const ISkinWeightData::Link& link = skinLayer->GetVertexValue(vertexLookup.mOrgVtx, vertexLookup.mDuplicateNr); + influences.push_back({ aznumeric_caster(link.boneId), link.weight }); } - const size_t usedControlPointCount = positionMap.size(); - - auto skinningInfo = AZStd::make_unique(aznumeric_cast(usedControlPointCount)); - - for (const auto& skinData : skinWeights) - { - for (size_t controlPointIndex = 0; controlPointIndex < skinData.get().GetVertexCount(); ++controlPointIndex) - { - const int usedPointIndex = meshData->GetUsedPointIndexForControlPoint(meshData->GetControlPointIndex(aznumeric_caster(controlPointIndex))); - const size_t linkCount = skinData.get().GetLinkCount(controlPointIndex); - - if (usedPointIndex < 0 || linkCount == 0) - { - continue; - } - - for (size_t linkIndex = 0; linkIndex < linkCount; ++linkIndex) - { - const ISkinWeightData::Link& link = skinData.get().GetLink(controlPointIndex, linkIndex); - skinningInfo->AddInfluence(positionMap.at(usedPointIndex), {aznumeric_caster(link.boneId), link.weight}); - } - } - } - - skinningInfo->Optimize(maxWeightsPerVertex, weightThreshold); - - return skinningInfo; + skinningInfo.Optimize(influences, maxWeightsPerVertex, weightThreshold); + return influences; } // Recurse through the SceneAPI's iterator types, extracting the real underlying iterator. @@ -467,6 +448,40 @@ namespace AZ::SceneGenerationComponents return layers; }; + template + static const AZStd::vector MakeSkinInfluenceLayers( + AZ::MeshBuilder::MeshBuilder& meshBuilder, + const SkinWeightDataView& skinWeights, + size_t vertexCount) + { + if (skinWeights.empty()) + { + return {}; + } + + size_t maxInfluenceCount = 0; + + AZStd::vector outLayers; + + // Do a pass over the skin influences, and determine the max influence count for any one vertex, + // which will be the number of influence layers we add + for (const auto& skinData : skinWeights) + { + for (size_t controlPointIndex = 0; controlPointIndex < skinData.get().GetVertexCount(); ++controlPointIndex) + { + const size_t linkCount = skinData.get().GetLinkCount(controlPointIndex); + maxInfluenceCount = AZStd::max(maxInfluenceCount, linkCount); + } + } + + // Create the influence layers + for (size_t i = 0; i < maxInfluenceCount; ++i) + { + outLayers.push_back(meshBuilder.AddLayer(vertexCount)); + } + + return outLayers; + } template AZStd::tuple< @@ -492,7 +507,7 @@ namespace AZ::SceneGenerationComponents AZ::MeshBuilder::MeshBuilder meshBuilder(vertexCount, AZStd::numeric_limits::max(), AZStd::numeric_limits::max(), /*optimizeDuplicates=*/ !hasBlendShapes); // Make the layers to hold the vertex data - auto* orgVtxLayer = meshBuilder.AddLayer(vertexCount); + auto* controlPointLayer = meshBuilder.AddLayer(vertexCount); auto* posLayer = meshBuilder.AddLayer(vertexCount, false, true); auto* normalsLayer = meshBuilder.AddLayer(vertexCount, false, true); @@ -527,6 +542,8 @@ namespace AZ::SceneGenerationComponents const AZStd::vector tangentLayers = makeLayersForData(tangents); const AZStd::vector bitangentLayers = makeLayersForData(bitangents); const AZStd::vector vertexColorLayers = makeLayersForData(vertexColors); + const AZStd::vector skinningInfluencesLayers = + MakeSkinInfluenceLayers(meshBuilder, skinWeights, vertexCount); constexpr float positionTolerance = 0.0001f; Vector3Map positionMap(meshData, hasBlendShapes, positionTolerance); @@ -539,9 +556,9 @@ namespace AZ::SceneGenerationComponents meshBuilder.BeginPolygon(baseMesh->GetFaceMaterialId(faceIndex)); for (const AZ::u32 vertexIndex : meshData->GetFaceInfo(faceIndex).vertexIndex) { - const AZ::u32 orgVertexNumber = positionMap[vertexIndex]; + const AZ::u32 controlPointVertexIndex = positionMap[vertexIndex]; - orgVtxLayer->SetCurrentVertexValue(orgVertexNumber); + controlPointLayer->SetCurrentVertexValue(controlPointVertexIndex); posLayer->SetCurrentVertexValue(meshData->GetPosition(vertexIndex)); normalsLayer->SetCurrentVertexValue(meshData->GetNormal(vertexIndex)); @@ -563,9 +580,44 @@ namespace AZ::SceneGenerationComponents { vertexColorLayer->SetCurrentVertexValue(vertexColorData.get().GetColor(vertexIndex)); } + + // Initialize skin weights to 0, 0.0 + for (auto& skinInfluenceLayer : skinningInfluencesLayers) + { + skinInfluenceLayer->SetCurrentVertexValue(ISkinWeightData::Link{ 0, 0.0f }); + } + +#if defined(AZ_ENABLE_TRACING) + bool influencesFoundForThisVertex = false; +#endif + // Set any real weights, if they exist + for (const auto& skinWeightData : skinWeights) + { + const size_t linkCount = skinWeightData.get().GetLinkCount(vertexIndex); + AZ_Assert( + linkCount <= skinningInfluencesLayers.size(), + "MeshOptimizer - The previously calculated maximum influence count is less than the current link count."); + + // Check that either the current skinWeightData doesn't have any influences for this vertex, + // or that none of the ones which came before it had any influences for this vertex. + AZ_Assert( + linkCount == 0 || influencesFoundForThisVertex == false, + "Two different skinWeightData instances in skinWeights apply to the same vertex. " + "The mesh optimizer assumes there will only ever be one skinWeightData that impacts a given vertex."); +#if defined(AZ_ENABLE_TRACING) + // Mark that at least one influence has been found for this vertex + influencesFoundForThisVertex |= linkCount > 0; +#endif + + for (size_t linkIndex = 0; linkIndex < linkCount; ++linkIndex) + { + const ISkinWeightData::Link& link = skinWeightData.get().GetLink(vertexIndex, linkIndex); + skinningInfluencesLayers[linkIndex]->SetCurrentVertexValue(link); + } + } AZ_POP_DISABLE_WARNING - meshBuilder.AddPolygonVertex(orgVertexNumber); + meshBuilder.AddPolygonVertex(controlPointVertexIndex); } meshBuilder.EndPolygon(); @@ -574,10 +626,11 @@ namespace AZ::SceneGenerationComponents const auto* skinRule = meshGroup.GetRuleContainerConst().FindFirstByType().get(); const AZ::u32 maxWeightsPerVertex = skinRule ? skinRule->GetMaxWeightsPerVertex() : 4; const float weightThreshold = skinRule ? skinRule->GetWeightThreshold() : 0.001f; - meshBuilder.SetSkinningInfo(ExtractSkinningInfo(meshData, skinWeights, maxWeightsPerVertex, weightThreshold, positionMap)); meshBuilder.GenerateSubMeshVertexOrders(); + const size_t optimizedVertexCount = meshBuilder.CalcNumVertices(); + // Create the resulting nodes struct ResultingType { @@ -594,6 +647,13 @@ namespace AZ::SceneGenerationComponents AZStd::vector> optimizedTangents = makeSceneGraphNodesForMeshBuilderLayers(tangentLayers); AZStd::vector> optimizedBitangents = makeSceneGraphNodesForMeshBuilderLayers(bitangentLayers); AZStd::vector> optimizedVertexColors = makeSceneGraphNodesForMeshBuilderLayers(vertexColorLayers); + AZStd::unique_ptr optimizedSkinWeights = nullptr; + + if (!skinningInfluencesLayers.empty()) + { + optimizedSkinWeights = AZStd::make_unique(); + optimizedSkinWeights->ResizeContainerSpace(optimizedVertexCount); + } // Copy node attributes AZStd::apply([](const auto&&... nodePairView) { @@ -613,14 +673,16 @@ namespace AZ::SceneGenerationComponents for (size_t subMeshIndex = 0; subMeshIndex < meshBuilder.GetNumSubMeshes(); ++subMeshIndex) { const AZ::MeshBuilder::MeshBuilderSubMesh* subMesh = meshBuilder.GetSubMesh(subMeshIndex); - for (size_t vertexIndex = 0; vertexIndex < subMesh->GetNumVertices(); ++vertexIndex) + for (size_t subMeshVertexIndex = 0; subMeshVertexIndex < subMesh->GetNumVertices(); ++subMeshVertexIndex) { - const AZ::MeshBuilder::MeshBuilderVertexLookup& vertexLookup = subMesh->GetVertex(vertexIndex); + const AZ::MeshBuilder::MeshBuilderVertexLookup& vertexLookup = subMesh->GetVertex(subMeshVertexIndex); optimizedMesh->AddPosition(posLayer->GetVertexValue(vertexLookup.mOrgVtx, vertexLookup.mDuplicateNr)); optimizedMesh->AddNormal(normalsLayer->GetVertexValue(vertexLookup.mOrgVtx, vertexLookup.mDuplicateNr)); + + int modelVertexIndex = optimizedMesh->GetVertexCount() - 1; optimizedMesh->SetVertexIndexToControlPointIndexMap( - aznumeric_caster(optimizedMesh->GetVertexCount() - 1), - orgVtxLayer->GetVertexValue(vertexLookup.mOrgVtx, vertexLookup.mDuplicateNr) + modelVertexIndex, + controlPointLayer->GetVertexValue(vertexLookup.mOrgVtx, vertexLookup.mDuplicateNr) ); for (auto [uvLayer, optimizedUVNode] : Containers::Views::MakePairView(uvLayers, optimizedUVs)) @@ -639,6 +701,19 @@ namespace AZ::SceneGenerationComponents { optimizedVertexColorNode->AppendColor(vertexColorLayer->GetVertexValue(vertexLookup.mOrgVtx, vertexLookup.mDuplicateNr)); } + + if (optimizedSkinWeights) + { + AZStd::vector influences = + ExtractSkinningInfo(skinningInfluencesLayers, vertexLookup, maxWeightsPerVertex, weightThreshold); + + for (const auto& influence : influences) + { + const int boneId = + optimizedSkinWeights->GetBoneId(skinWeights[0].get().GetBoneName(aznumeric_caster(influence.mNodeNr))); + optimizedSkinWeights->AppendLink(aznumeric_caster(modelVertexIndex), { boneId, influence.mWeight }); + } + } } AZStd::unordered_set usedIndexes; for (size_t polygonIndex = 0; polygonIndex < subMesh->GetNumPolygons(); ++polygonIndex) @@ -656,26 +731,6 @@ namespace AZ::SceneGenerationComponents indexOffset += static_cast(usedIndexes.size()); } - AZStd::unique_ptr optimizedSkinWeights; - if (MeshBuilder::MeshBuilderSkinningInfo* skinningInfo = meshBuilder.GetSkinningInfo()) - { - optimizedSkinWeights = AZStd::make_unique(); - - const size_t skinnedVertexCount = skinningInfo->GetNumOrgVertices(); - optimizedSkinWeights->ResizeContainerSpace(skinnedVertexCount); - - for (size_t vertex = 0; vertex < skinnedVertexCount; ++vertex) - { - const size_t boneCountAffectingThisVertex = skinningInfo->GetNumInfluences(vertex); - for (size_t influencingBone = 0; influencingBone < boneCountAffectingThisVertex; ++influencingBone) - { - const MeshBuilder::MeshBuilderSkinningInfo::Influence& influence = skinningInfo->GetInfluence(vertex, influencingBone); - const int boneId = optimizedSkinWeights->GetBoneId(skinWeights[0].get().GetBoneName(aznumeric_caster(influence.mNodeNr))); - optimizedSkinWeights->AppendLink(vertex, {boneId, influence.mWeight}); - } - } - } - return AZStd::make_tuple( AZStd::move(optimizedMesh), AZStd::move(optimizedUVs), diff --git a/Gems/SceneProcessing/Code/Source/SceneBuilder/SceneBuilderWorker.cpp b/Gems/SceneProcessing/Code/Source/SceneBuilder/SceneBuilderWorker.cpp index 1d3cd60e49..c4300fc34d 100644 --- a/Gems/SceneProcessing/Code/Source/SceneBuilder/SceneBuilderWorker.cpp +++ b/Gems/SceneProcessing/Code/Source/SceneBuilder/SceneBuilderWorker.cpp @@ -71,7 +71,7 @@ namespace SceneBuilder context->EnumerateDerived(callback, azrtti_typeid(), azrtti_typeid()); context->EnumerateDerived(callback, azrtti_typeid(), azrtti_typeid()); } - + AZ::SceneAPI::SceneBuilderDependencyBus::Broadcast(&AZ::SceneAPI::SceneBuilderDependencyRequests::AddFingerprintInfo, fragments); for (const AZStd::string& element : fragments) @@ -79,7 +79,7 @@ namespace SceneBuilder m_cachedFingerprint.append(element); } // A general catch all version fingerprint. Update this to force all FBX files to recompile. - m_cachedFingerprint.append("Version 1"); + m_cachedFingerprint.append("Version 2"); } return m_cachedFingerprint.c_str(); @@ -223,7 +223,7 @@ namespace SceneBuilder // Only used during processing to redirect trace printfs with an warning or error window to the appropriate reporting function. TraceMessageHook messageHook; - + // Load Scene graph and manifest from the provided path and then initialize them. if (m_isShuttingDown) { @@ -282,9 +282,9 @@ namespace SceneBuilder } for (const AZStd::string& pathDependency : exportProduct.m_legacyPathDependencies) { - // SceneCore doesn't have access to AssetBuilderSDK, so it doesn't have access to the + // SceneCore doesn't have access to AssetBuilderSDK, so it doesn't have access to the // ProductPathDependency type or the ProductPathDependencyType enum. Exporters registered with the - // Scene Builder should report path dependencies on source files as absolute paths, while dependencies + // Scene Builder should report path dependencies on source files as absolute paths, while dependencies // on product files should be reported as relative paths. if (AzFramework::StringFunc::Path::IsRelative(pathDependency.c_str())) { @@ -314,7 +314,7 @@ namespace SceneBuilder using namespace AZ::SceneAPI; using namespace AZ::SceneAPI::Containers; using namespace AZ::SceneAPI::Events; - + AZ_TracePrintf(Utilities::LogWindow, "Loading scene.\n"); SceneSerializationBus::BroadcastResult(result, &SceneSerializationBus::Events::LoadScene, request.m_fullPath, request.m_sourceFileUUID); @@ -331,7 +331,7 @@ namespace SceneBuilder response.m_resultCode = AssetBuilderSDK::ProcessJobResult_Success; return false; // Still return false as there's no work so should exit. } - + return true; } @@ -379,7 +379,7 @@ namespace SceneBuilder using namespace AZ::SceneAPI::SceneCore; AZ_Assert(scene, "Invalid scene passed for exporting."); - + const AZStd::string& outputFolder = request.m_tempDirPath; const char* platformIdentifier = request.m_jobDescription.GetPlatformIdentifier().c_str(); AZ_TraceContext("Output folder", outputFolder.c_str()); diff --git a/Gems/SceneProcessing/Code/Tests/MeshBuilder/MeshOptimizerComponentTests.cpp b/Gems/SceneProcessing/Code/Tests/MeshBuilder/MeshOptimizerComponentTests.cpp index 81528fc3e4..d3f4383094 100644 --- a/Gems/SceneProcessing/Code/Tests/MeshBuilder/MeshOptimizerComponentTests.cpp +++ b/Gems/SceneProcessing/Code/Tests/MeshBuilder/MeshOptimizerComponentTests.cpp @@ -35,6 +35,21 @@ namespace AZ::SceneAPI::DataTypes } } +MATCHER(VectorOfLinksEq, "") +{ + return testing::ExplainMatchResult( + testing::AllOf( + testing::Field(&AZ::SceneData::GraphData::SkinWeightData::Link::boneId, testing::Eq(testing::get<0>(arg).boneId)), + testing::Field(&AZ::SceneData::GraphData::SkinWeightData::Link::weight, testing::FloatEq(testing::get<0>(arg).weight))), + testing::get<1>(arg), result_listener); +} + +MATCHER(VectorOfVectorOfLinksEq, "") +{ + return testing::ExplainMatchResult( + testing::UnorderedPointwise(VectorOfLinksEq(), testing::get<0>(arg)), testing::get<1>(arg), result_listener); +} + namespace SceneProcessing { class VertexDeduplicationFixture @@ -60,11 +75,12 @@ namespace SceneProcessing static AZStd::unique_ptr MakePlaneMesh() { // Create a simple plane with 2 triangles, 6 total vertices, 2 shared vertices - // 0 --- 1 - // | / | - // | / | - // | / | - // 2 --- 3 + // 0,5 --- 1 + // | \ | + // | \ | + // | \ | + // | \ | + // 4 --- 2,3 const AZStd::array planeVertexPositions = { AZ::Vector3{0.0f, 0.0f, 0.0f}, AZ::Vector3{0.0f, 0.0f, 1.0f}, @@ -94,7 +110,28 @@ namespace SceneProcessing return mesh; } - static AZStd::unique_ptr MakeSkinData() + static AZStd::unique_ptr MakeSkinData( + const AZStd::vector>& sourceLinks) + { + auto skinWeights = AZStd::make_unique(); + + skinWeights->ResizeContainerSpace(sourceLinks.size()); + + for (size_t vertexIndex = 0; vertexIndex < sourceLinks.size(); ++vertexIndex) + { + for (const auto& link : sourceLinks[vertexIndex]) + { + // Make sure the bone is added to the skin weights + skinWeights->GetBoneId(AZStd::to_string(link.boneId)); + + skinWeights->AppendLink(vertexIndex, link); + } + } + + return skinWeights; + } + + static AZStd::unique_ptr MakeDuplicateSkinData() { auto skinWeights = AZStd::make_unique(); @@ -104,16 +141,69 @@ namespace SceneProcessing skinWeights->GetBoneId("0"); skinWeights->GetBoneId("1"); - skinWeights->AppendLink(0, {/*.boneId=*/0, /*.weight=*/1}); - skinWeights->AppendLink(1, {/*.boneId=*/0, /*.weight=*/1}); - skinWeights->AppendLink(2, {/*.boneId=*/0, /*.weight=*/1}); - skinWeights->AppendLink(3, {/*.boneId=*/1, /*.weight=*/1}); - skinWeights->AppendLink(4, {/*.boneId=*/1, /*.weight=*/1}); - skinWeights->AppendLink(5, {/*.boneId=*/1, /*.weight=*/1}); + // Vertices 0,5 and 2,3 have duplicate skin data, in addition to duplicate positions + skinWeights->AppendLink(0, { /*.boneId=*/0, /*.weight=*/1 }); + skinWeights->AppendLink(1, { /*.boneId=*/1, /*.weight=*/1 }); + skinWeights->AppendLink(2, { /*.boneId=*/0, /*.weight=*/1 }); + skinWeights->AppendLink(3, { /*.boneId=*/0, /*.weight=*/1 }); + skinWeights->AppendLink(4, { /*.boneId=*/2, /*.weight=*/1 }); + skinWeights->AppendLink(5, { /*.boneId=*/0, /*.weight=*/1 }); return skinWeights; } + static void TestSkinDuplication( + const AZStd::shared_ptr skinData, + const AZStd::vector>& expectedLinks) + { + AZ::SceneAPI::Containers::Scene scene("testScene"); + AZ::SceneAPI::Containers::SceneGraph& graph = scene.GetGraph(); + + const auto meshNodeIndex = graph.AddChild(graph.GetRoot(), "testMesh", MakePlaneMesh()); + const auto skinDataNodeIndex = graph.AddChild(meshNodeIndex, "skinData", skinData); + graph.MakeEndPoint(skinDataNodeIndex); + + // The original source mesh should have 6 vertices + EXPECT_EQ( + AZStd::rtti_pointer_cast(graph.GetNodeContent(meshNodeIndex))->GetVertexCount(), 6); + + auto meshGroup = AZStd::make_unique(); + meshGroup->GetSceneNodeSelectionList().AddSelectedNode("testMesh"); + scene.GetManifest().AddEntry(AZStd::move(meshGroup)); + + AZ::SceneGenerationComponents::MeshOptimizerComponent component; + AZ::SceneAPI::Events::GenerateSimplificationEventContext context(scene, "pc"); + component.OptimizeMeshes(context); + + AZ::SceneAPI::Containers::SceneGraph::NodeIndex optimizedNodeIndex = + graph.Find(AZStd::string("testMesh").append(AZ::SceneAPI::Utilities::OptimizedMeshSuffix)); + ASSERT_TRUE(optimizedNodeIndex.IsValid()) << "Mesh optimizer did not add an optimized version of the mesh"; + + const auto& optimizedMesh = + AZStd::rtti_pointer_cast(graph.GetNodeContent(optimizedNodeIndex)); + ASSERT_TRUE(optimizedMesh); + + AZ::SceneAPI::Containers::SceneGraph::NodeIndex optimizedSkinDataNodeIndex = + graph.Find(AZStd::string("testMesh").append(AZ::SceneAPI::Utilities::OptimizedMeshSuffix).append(".skinWeights")); + ASSERT_TRUE(optimizedSkinDataNodeIndex.IsValid()) << "Mesh optimizer did not add an optimized version of the skin data"; + + const auto& optimizedSkinWeights = + AZStd::rtti_pointer_cast(graph.GetNodeContent(optimizedSkinDataNodeIndex)); + ASSERT_TRUE(optimizedSkinWeights); + + AZStd::vector> gotLinks(optimizedMesh->GetVertexCount()); + for (unsigned int vertexIndex = 0; vertexIndex < optimizedMesh->GetVertexCount(); ++vertexIndex) + { + for (size_t linkIndex = 0; linkIndex < optimizedSkinWeights->GetLinkCount(vertexIndex); ++linkIndex) + { + gotLinks[vertexIndex].emplace_back(optimizedSkinWeights->GetLink(vertexIndex, linkIndex)); + } + } + EXPECT_THAT(gotLinks, testing::Pointwise(VectorOfVectorOfLinksEq(), expectedLinks)); + + EXPECT_EQ(optimizedMesh->GetVertexCount(), expectedLinks.size()); + } + private: AZ::ComponentApplication m_app; AZ::Entity* m_systemEntity; @@ -147,75 +237,43 @@ namespace SceneProcessing EXPECT_EQ(optimizedMesh->GetVertexCount(), 4); } - MATCHER(VectorOfLinksEq, "") + TEST_F(VertexDeduplicationFixture, DeduplicatedVerticesKeepUniqueSkinInfluences) { - return testing::ExplainMatchResult( - testing::AllOf( - testing::Field(&AZ::SceneData::GraphData::SkinWeightData::Link::boneId, testing::Eq(testing::get<0>(arg).boneId)), - testing::Field(&AZ::SceneData::GraphData::SkinWeightData::Link::weight, testing::FloatEq(testing::get<0>(arg).weight)) - ), - testing::get<1>(arg), - result_listener - ); - } - - MATCHER(VectorOfVectorOfLinksEq, "") - { - return testing::ExplainMatchResult( - testing::UnorderedPointwise(VectorOfLinksEq(), testing::get<0>(arg)), - testing::get<1>(arg), - result_listener - ); - } - - TEST_F(VertexDeduplicationFixture, DeduplicatedVerticesRemapSkinning) - { - AZ::SceneAPI::Containers::Scene scene("testScene"); - AZ::SceneAPI::Containers::SceneGraph& graph = scene.GetGraph(); - - const auto meshNodeIndex = graph.AddChild(graph.GetRoot(), "testMesh", MakePlaneMesh()); - const auto skinDataNodeIndex = graph.AddChild(meshNodeIndex, "skinData", MakeSkinData()); - graph.MakeEndPoint(skinDataNodeIndex); - - // The original source mesh should have 6 vertices - EXPECT_EQ(AZStd::rtti_pointer_cast(graph.GetNodeContent(meshNodeIndex))->GetVertexCount(), 6); - - auto meshGroup = AZStd::make_unique(); - meshGroup->GetSceneNodeSelectionList().AddSelectedNode("testMesh"); - scene.GetManifest().AddEntry(AZStd::move(meshGroup)); - - AZ::SceneGenerationComponents::MeshOptimizerComponent component; - AZ::SceneAPI::Events::GenerateSimplificationEventContext context(scene, "pc"); - component.OptimizeMeshes(context); - - AZ::SceneAPI::Containers::SceneGraph::NodeIndex optimizedNodeIndex = graph.Find(AZStd::string("testMesh").append(AZ::SceneAPI::Utilities::OptimizedMeshSuffix)); - ASSERT_TRUE(optimizedNodeIndex.IsValid()) << "Mesh optimizer did not add an optimized version of the mesh"; - - const auto& optimizedMesh = AZStd::rtti_pointer_cast(graph.GetNodeContent(optimizedNodeIndex)); - ASSERT_TRUE(optimizedMesh); - - AZ::SceneAPI::Containers::SceneGraph::NodeIndex optimizedSkinDataNodeIndex = graph.Find(AZStd::string("testMesh").append(AZ::SceneAPI::Utilities::OptimizedMeshSuffix).append(".skinWeights")); - ASSERT_TRUE(optimizedSkinDataNodeIndex.IsValid()) << "Mesh optimizer did not add an optimized version of the skin data"; - - const auto& optimizedSkinWeights = AZStd::rtti_pointer_cast(graph.GetNodeContent(optimizedSkinDataNodeIndex)); - ASSERT_TRUE(optimizedSkinWeights); - - const AZStd::vector> expectedLinks - { - /*0*/ { {0, 0.5f}, {1, 0.5f} }, - /*1*/ { {0, 1.0f} }, - /*2*/ { {0, 0.5f}, {1, 0.5f} }, - /*3*/ { {1, 1.0f} }, + // Vertices 0,5 and 2,3 have duplicate positions, but unique links, + // so none of the vertices should be de-duplicated + // and the sourceLinks should be the same as the expected links + const AZStd::vector> sourceLinks{ + /*0*/ { { 0, 1.0f } }, + /*1*/ { { 0, 1.0f } }, + /*2*/ { { 0, 1.0f } }, + /*3*/ { { 1, 1.0f } }, + /*4*/ { { 1, 1.0f } }, + /*5*/ { { 1, 1.0f } }, }; - AZStd::vector> gotLinks(optimizedMesh->GetVertexCount()); - for (unsigned int vertexIndex = 0; vertexIndex < optimizedMesh->GetVertexCount(); ++vertexIndex) - { - for (size_t linkIndex = 0; linkIndex < optimizedSkinWeights->GetLinkCount(vertexIndex); ++linkIndex) - { - gotLinks[vertexIndex].emplace_back(optimizedSkinWeights->GetLink(vertexIndex, linkIndex)); - } - } - EXPECT_THAT(gotLinks, testing::Pointwise(VectorOfVectorOfLinksEq(), expectedLinks)); + TestSkinDuplication(MakeSkinData(sourceLinks), sourceLinks); + } + + TEST_F(VertexDeduplicationFixture, DeduplicatedVerticesDeduplicateSkinInfluences) + { + // Vertices 0,5 and 2,3 have duplicate positions, and also duplicate links, + // so they should be de-duplicated and the expected links + // should have two fewer links + const AZStd::vector> sourceLinks{ + /*0*/ { { 0, 1.0f } }, + /*1*/ { { 1, 1.0f } }, + /*2*/ { { 0, 1.0f } }, + /*3*/ { { 0, 1.0f } }, + /*4*/ { { 2, 1.0f } }, + /*5*/ { { 0, 1.0f } }, + }; + const AZStd::vector> expectedLinks{ + /*0*/ { { 0, 1.0f } }, + /*1*/ { { 1, 1.0f } }, + /*2*/ { { 0, 1.0f } }, + /*3*/ { { 2, 1.0f } }, + }; + + TestSkinDuplication(MakeSkinData(sourceLinks), expectedLinks); } } // namespace SceneProcessing diff --git a/Gems/SceneProcessing/Code/Tests/MeshBuilder/SkinInfluencesTests.cpp b/Gems/SceneProcessing/Code/Tests/MeshBuilder/SkinInfluencesTests.cpp index 5749e7ee7b..acf738a85f 100644 --- a/Gems/SceneProcessing/Code/Tests/MeshBuilder/SkinInfluencesTests.cpp +++ b/Gems/SceneProcessing/Code/Tests/MeshBuilder/SkinInfluencesTests.cpp @@ -75,14 +75,30 @@ namespace AZ::MeshBuilder return skinningInfo; } - static float CalcSkinInfluencesTotalWeight(const MeshBuilderSkinningInfo* skinInfo, size_t vtxNum) + static AZStd::vector GetInfluenceVector(const MeshBuilderSkinningInfo* skinInfo, size_t vtxNum) { const size_t numInfluence = skinInfo->GetNumInfluences(vtxNum); - float totalWeight = 0.0f; + AZStd::vector influences; + influences.reserve(numInfluence); for (size_t i = 0; i < numInfluence; ++i) { - const MeshBuilderSkinningInfo::Influence& inf = skinInfo->GetInfluence(vtxNum, i); - totalWeight += inf.mWeight; + influences.push_back(skinInfo->GetInfluence(vtxNum, i)); + } + return influences; + } + + static float CalcSkinInfluencesTotalWeight(const MeshBuilderSkinningInfo* skinInfo, size_t vtxNum) + { + AZStd::vector influences = GetInfluenceVector(skinInfo, vtxNum); + return CalcTotalWeight(influences); + } + + static float CalcTotalWeight(const AZStd::vector& influences) + { + float totalWeight = 0.0f; + for (const auto& influence : influences) + { + totalWeight += influence.mWeight; } return totalWeight; } @@ -96,12 +112,13 @@ namespace AZ::MeshBuilder MeshBuilderSkinningInfo* testSkinInfo = meshBuilder->GetSkinningInfo(); const float expectedTotalWeight = 1.0f; - testSkinInfo->Optimize(testParam.maxInfluencesAfterOptimization); for (size_t v = 0; v < testParam.numOrgVertices; ++v) { - const size_t numInfluence = testSkinInfo->GetNumInfluences(v); - EXPECT_EQ(numInfluence, testParam.maxInfluencesAfterOptimization); - const float totalWeight = CalcSkinInfluencesTotalWeight(testSkinInfo, v); + AZStd::vector influences = GetInfluenceVector(testSkinInfo, v); + + testSkinInfo->Optimize(influences, testParam.maxInfluencesAfterOptimization); + EXPECT_EQ(influences.size(), testParam.maxInfluencesAfterOptimization); + const float totalWeight = CalcTotalWeight(influences); EXPECT_NEAR(totalWeight, expectedTotalWeight, 0.00001f /* tolerance */) << "totalWeight of all influences in a vertex should be 1.0f."; } } diff --git a/Gems/SceneProcessing/Code/Tests/SceneBuilder/SceneBuilderPhasesTests.cpp b/Gems/SceneProcessing/Code/Tests/SceneBuilder/SceneBuilderPhasesTests.cpp index 2709cd40b7..15d50bcfa3 100644 --- a/Gems/SceneProcessing/Code/Tests/SceneBuilder/SceneBuilderPhasesTests.cpp +++ b/Gems/SceneProcessing/Code/Tests/SceneBuilder/SceneBuilderPhasesTests.cpp @@ -139,7 +139,9 @@ public: AZ::SettingsRegistryInterface* registry = AZ::SettingsRegistry::Get(); auto projectPathKey = AZ::SettingsRegistryInterface::FixedValueString(AZ::SettingsRegistryMergeUtils::BootstrapSettingsRootKey) + "/project_path"; - registry->Set(projectPathKey, "AutomatedTesting"); + AZ::IO::FixedMaxPath enginePath; + registry->Get(enginePath.Native(), AZ::SettingsRegistryMergeUtils::FilePathKey_EngineRootFolder); + registry->Set(projectPathKey, (enginePath / "AutomatedTesting").Native()); AZ::SettingsRegistryMergeUtils::MergeSettingsToRegistry_AddRuntimeFilePaths(*registry); m_app.Start(AZ::ComponentApplication::Descriptor()); diff --git a/Gems/SceneProcessing/Code/Tests/SceneBuilder/SceneBuilderTests.cpp b/Gems/SceneProcessing/Code/Tests/SceneBuilder/SceneBuilderTests.cpp index 3a7b20553e..a1ca5be766 100644 --- a/Gems/SceneProcessing/Code/Tests/SceneBuilder/SceneBuilderTests.cpp +++ b/Gems/SceneProcessing/Code/Tests/SceneBuilder/SceneBuilderTests.cpp @@ -35,7 +35,9 @@ protected: AZ::SettingsRegistryInterface* registry = AZ::SettingsRegistry::Get(); auto projectPathKey = AZ::SettingsRegistryInterface::FixedValueString(AZ::SettingsRegistryMergeUtils::BootstrapSettingsRootKey) + "/project_path"; - registry->Set(projectPathKey, "AutomatedTesting"); + AZ::IO::FixedMaxPath enginePath; + registry->Get(enginePath.Native(), AZ::SettingsRegistryMergeUtils::FilePathKey_EngineRootFolder); + registry->Set(projectPathKey, (enginePath / "AutomatedTesting").Native()); AZ::SettingsRegistryMergeUtils::MergeSettingsToRegistry_AddRuntimeFilePaths(*registry); m_app.Start(AZ::ComponentApplication::Descriptor()); diff --git a/Gems/SceneProcessing/gem.json b/Gems/SceneProcessing/gem.json index de1dfeb23f..576460d0a9 100644 --- a/Gems/SceneProcessing/gem.json +++ b/Gems/SceneProcessing/gem.json @@ -2,6 +2,7 @@ "gem_name": "SceneProcessing", "display_name": "Scene Processing", "license": "Apache-2.0 Or MIT", + "license_url": "https://github.com/o3de/o3de/blob/development/LICENSE.txt", "origin": "Open 3D Engine - o3de.org", "type": "Tool", "summary": "The Scene Processing Gem provides Scene Settings, a tool you can use to specify the default settings for processing asset files for actors, meshes, motions, and PhysX.", diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/AZEvents/AuthorityToAutonomousNoParamsNotifyEvent.names b/Gems/ScriptCanvas/Assets/TranslationAssets/AZEvents/AuthorityToAutonomousNoParamsNotifyEvent.names new file mode 100644 index 0000000000..216212ca4a --- /dev/null +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/AZEvents/AuthorityToAutonomousNoParamsNotifyEvent.names @@ -0,0 +1,50 @@ +{ + "entries": [ + { + "base": "AuthorityToAutonomousNoParams Notify Event", + "context": "AZEventHandler", + "variant": "", + "details": { + "name": "Authority To Autonomous No Params Notify Event" + }, + "slots": [ + { + "base": "AuthorityToAutonomousNoParams Notify Event", + "details": { + "name": "AuthorityToAutonomousNoParams Notify Event" + } + }, + { + "base": "Connect", + "details": { + "name": "Connect" + } + }, + { + "base": "Disconnect", + "details": { + "name": "Disconnect" + } + }, + { + "base": "On Connected", + "details": { + "name": "On Connected" + } + }, + { + "base": "On Disconnected", + "details": { + "name": "On Disconnected" + } + }, + { + "base": "OnEvent", + "details": { + "name": "OnEvent" + } + } + ] + } + ] +} \ No newline at end of file diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/AZEvents/AuthorityToAutonomousNotifyEvent.names b/Gems/ScriptCanvas/Assets/TranslationAssets/AZEvents/AuthorityToAutonomousNotifyEvent.names new file mode 100644 index 0000000000..50c0ec6013 --- /dev/null +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/AZEvents/AuthorityToAutonomousNotifyEvent.names @@ -0,0 +1,56 @@ +{ + "entries": [ + { + "base": "AuthorityToAutonomous Notify Event", + "context": "AZEventHandler", + "variant": "", + "details": { + "name": "Authority To Autonomous Notify Event" + }, + "slots": [ + { + "base": "someFloat", + "details": { + "name": "someFloat" + } + }, + { + "base": "AuthorityToAutonomous Notify Event", + "details": { + "name": "AuthorityToAutonomous Notify Event" + } + }, + { + "base": "Connect", + "details": { + "name": "Connect" + } + }, + { + "base": "Disconnect", + "details": { + "name": "Disconnect" + } + }, + { + "base": "On Connected", + "details": { + "name": "On Connected" + } + }, + { + "base": "On Disconnected", + "details": { + "name": "On Disconnected" + } + }, + { + "base": "OnEvent", + "details": { + "name": "OnEvent" + } + } + ] + } + ] +} \ No newline at end of file diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/AZEvents/AuthorityToClientNoParamsNotifyEvent.names b/Gems/ScriptCanvas/Assets/TranslationAssets/AZEvents/AuthorityToClientNoParamsNotifyEvent.names new file mode 100644 index 0000000000..bf5b975d63 --- /dev/null +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/AZEvents/AuthorityToClientNoParamsNotifyEvent.names @@ -0,0 +1,50 @@ +{ + "entries": [ + { + "base": "AuthorityToClientNoParams Notify Event", + "context": "AZEventHandler", + "variant": "", + "details": { + "name": "Authority To Client No Params Notify Event" + }, + "slots": [ + { + "base": "AuthorityToClientNoParams Notify Event", + "details": { + "name": "AuthorityToClientNoParams Notify Event" + } + }, + { + "base": "Connect", + "details": { + "name": "Connect" + } + }, + { + "base": "Disconnect", + "details": { + "name": "Disconnect" + } + }, + { + "base": "On Connected", + "details": { + "name": "On Connected" + } + }, + { + "base": "On Disconnected", + "details": { + "name": "On Disconnected" + } + }, + { + "base": "OnEvent", + "details": { + "name": "OnEvent" + } + } + ] + } + ] +} \ No newline at end of file diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/AZEvents/AuthorityToClientNotifyEvent.names b/Gems/ScriptCanvas/Assets/TranslationAssets/AZEvents/AuthorityToClientNotifyEvent.names new file mode 100644 index 0000000000..d3ba2e9299 --- /dev/null +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/AZEvents/AuthorityToClientNotifyEvent.names @@ -0,0 +1,56 @@ +{ + "entries": [ + { + "base": "AuthorityToClient Notify Event", + "context": "AZEventHandler", + "variant": "", + "details": { + "name": "Authority To Client Notify Event" + }, + "slots": [ + { + "base": "someFloat", + "details": { + "name": "someFloat" + } + }, + { + "base": "AuthorityToClient Notify Event", + "details": { + "name": "AuthorityToClient Notify Event" + } + }, + { + "base": "Connect", + "details": { + "name": "Connect" + } + }, + { + "base": "Disconnect", + "details": { + "name": "Disconnect" + } + }, + { + "base": "On Connected", + "details": { + "name": "On Connected" + } + }, + { + "base": "On Disconnected", + "details": { + "name": "On Disconnected" + } + }, + { + "base": "OnEvent", + "details": { + "name": "OnEvent" + } + } + ] + } + ] +} \ No newline at end of file diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/AZEvents/AutonomousToAuthorityNoParamsNotifyEvent.names b/Gems/ScriptCanvas/Assets/TranslationAssets/AZEvents/AutonomousToAuthorityNoParamsNotifyEvent.names new file mode 100644 index 0000000000..ba5f7aec0c --- /dev/null +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/AZEvents/AutonomousToAuthorityNoParamsNotifyEvent.names @@ -0,0 +1,50 @@ +{ + "entries": [ + { + "base": "AutonomousToAuthorityNoParams Notify Event", + "context": "AZEventHandler", + "variant": "", + "details": { + "name": "Autonomous To Authority No Params Notify Event" + }, + "slots": [ + { + "base": "AutonomousToAuthorityNoParams Notify Event", + "details": { + "name": "AutonomousToAuthorityNoParams Notify Event" + } + }, + { + "base": "Connect", + "details": { + "name": "Connect" + } + }, + { + "base": "Disconnect", + "details": { + "name": "Disconnect" + } + }, + { + "base": "On Connected", + "details": { + "name": "On Connected" + } + }, + { + "base": "On Disconnected", + "details": { + "name": "On Disconnected" + } + }, + { + "base": "OnEvent", + "details": { + "name": "OnEvent" + } + } + ] + } + ] +} \ No newline at end of file diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/AZEvents/AutonomousToAuthorityNotifyEvent.names b/Gems/ScriptCanvas/Assets/TranslationAssets/AZEvents/AutonomousToAuthorityNotifyEvent.names new file mode 100644 index 0000000000..73566d177e --- /dev/null +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/AZEvents/AutonomousToAuthorityNotifyEvent.names @@ -0,0 +1,56 @@ +{ + "entries": [ + { + "base": "AutonomousToAuthority Notify Event", + "context": "AZEventHandler", + "variant": "", + "details": { + "name": "Autonomous To Authority Notify Event" + }, + "slots": [ + { + "base": "someFloat", + "details": { + "name": "someFloat" + } + }, + { + "base": "AutonomousToAuthority Notify Event", + "details": { + "name": "AutonomousToAuthority Notify Event" + } + }, + { + "base": "Connect", + "details": { + "name": "Connect" + } + }, + { + "base": "Disconnect", + "details": { + "name": "Disconnect" + } + }, + { + "base": "On Connected", + "details": { + "name": "On Connected" + } + }, + { + "base": "On Disconnected", + "details": { + "name": "On Disconnected" + } + }, + { + "base": "OnEvent", + "details": { + "name": "OnEvent" + } + } + ] + } + ] +} \ No newline at end of file diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/AZEvents/OnCollisionBeginevent.names b/Gems/ScriptCanvas/Assets/TranslationAssets/AZEvents/OnCollisionBeginevent.names new file mode 100644 index 0000000000..d77596c36e --- /dev/null +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/AZEvents/OnCollisionBeginevent.names @@ -0,0 +1,62 @@ +{ + "entries": [ + { + "base": "On Collision Begin event", + "context": "AZEventHandler", + "variant": "", + "details": { + "name": "On Collision Begin event" + }, + "slots": [ + { + "base": "Simulated Body Handle", + "details": { + "name": "Simulated Body Handle" + } + }, + { + "base": "Collision Event", + "details": { + "name": "Collision Event" + } + }, + { + "base": "On Collision Begin event", + "details": { + "name": "On Collision Begin event" + } + }, + { + "base": "Connect", + "details": { + "name": "Connect" + } + }, + { + "base": "Disconnect", + "details": { + "name": "Disconnect" + } + }, + { + "base": "On Connected", + "details": { + "name": "On Connected" + } + }, + { + "base": "On Disconnected", + "details": { + "name": "On Disconnected" + } + }, + { + "base": "OnEvent", + "details": { + "name": "OnEvent" + } + } + ] + } + ] +} \ No newline at end of file diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/AZEvents/OnCollisionEndevent.names b/Gems/ScriptCanvas/Assets/TranslationAssets/AZEvents/OnCollisionEndevent.names new file mode 100644 index 0000000000..1d2c622e8c --- /dev/null +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/AZEvents/OnCollisionEndevent.names @@ -0,0 +1,62 @@ +{ + "entries": [ + { + "base": "On Collision End event", + "context": "AZEventHandler", + "variant": "", + "details": { + "name": "On Collision End event" + }, + "slots": [ + { + "base": "Simulated Body Handle", + "details": { + "name": "Simulated Body Handle" + } + }, + { + "base": "Collision Event", + "details": { + "name": "Collision Event" + } + }, + { + "base": "On Collision End event", + "details": { + "name": "On Collision End event" + } + }, + { + "base": "Connect", + "details": { + "name": "Connect" + } + }, + { + "base": "Disconnect", + "details": { + "name": "Disconnect" + } + }, + { + "base": "On Connected", + "details": { + "name": "On Connected" + } + }, + { + "base": "On Disconnected", + "details": { + "name": "On Disconnected" + } + }, + { + "base": "OnEvent", + "details": { + "name": "OnEvent" + } + } + ] + } + ] +} \ No newline at end of file diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/AZEvents/OnCollisionPersistevent.names b/Gems/ScriptCanvas/Assets/TranslationAssets/AZEvents/OnCollisionPersistevent.names new file mode 100644 index 0000000000..c685623d88 --- /dev/null +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/AZEvents/OnCollisionPersistevent.names @@ -0,0 +1,62 @@ +{ + "entries": [ + { + "base": "On Collision Persist event", + "context": "AZEventHandler", + "variant": "", + "details": { + "name": "On Collision Persist event" + }, + "slots": [ + { + "base": "Simulated Body Handle", + "details": { + "name": "Simulated Body Handle" + } + }, + { + "base": "Collision Event", + "details": { + "name": "Collision Event" + } + }, + { + "base": "On Collision Persist event", + "details": { + "name": "On Collision Persist event" + } + }, + { + "base": "Connect", + "details": { + "name": "Connect" + } + }, + { + "base": "Disconnect", + "details": { + "name": "Disconnect" + } + }, + { + "base": "On Connected", + "details": { + "name": "On Connected" + } + }, + { + "base": "On Disconnected", + "details": { + "name": "On Disconnected" + } + }, + { + "base": "OnEvent", + "details": { + "name": "OnEvent" + } + } + ] + } + ] +} \ No newline at end of file diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/AZEvents/OnGravityChangedevent.names b/Gems/ScriptCanvas/Assets/TranslationAssets/AZEvents/OnGravityChangedevent.names new file mode 100644 index 0000000000..dce2578ca9 --- /dev/null +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/AZEvents/OnGravityChangedevent.names @@ -0,0 +1,62 @@ +{ + "entries": [ + { + "base": "On Gravity Changed event", + "context": "AZEventHandler", + "variant": "", + "details": { + "name": "On Gravity Changed event" + }, + "slots": [ + { + "base": "Scene Handle", + "details": { + "name": "Scene Handle" + } + }, + { + "base": "Gravity Vector", + "details": { + "name": "Gravity Vector" + } + }, + { + "base": "On Gravity Changed event", + "details": { + "name": "On Gravity Changed event" + } + }, + { + "base": "Connect", + "details": { + "name": "Connect" + } + }, + { + "base": "Disconnect", + "details": { + "name": "Disconnect" + } + }, + { + "base": "On Connected", + "details": { + "name": "On Connected" + } + }, + { + "base": "On Disconnected", + "details": { + "name": "On Disconnected" + } + }, + { + "base": "OnEvent", + "details": { + "name": "OnEvent" + } + } + ] + } + ] +} \ No newline at end of file diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/AZEvents/OnTriggerEnterevent.names b/Gems/ScriptCanvas/Assets/TranslationAssets/AZEvents/OnTriggerEnterevent.names new file mode 100644 index 0000000000..0850092f0f --- /dev/null +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/AZEvents/OnTriggerEnterevent.names @@ -0,0 +1,62 @@ +{ + "entries": [ + { + "base": "On Trigger Enter event", + "context": "AZEventHandler", + "variant": "", + "details": { + "name": "On Trigger Enter event" + }, + "slots": [ + { + "base": "Simulated Body Handle", + "details": { + "name": "Simulated Body Handle" + } + }, + { + "base": "Trigger Event", + "details": { + "name": "Trigger Event" + } + }, + { + "base": "On Trigger Enter event", + "details": { + "name": "On Trigger Enter event" + } + }, + { + "base": "Connect", + "details": { + "name": "Connect" + } + }, + { + "base": "Disconnect", + "details": { + "name": "Disconnect" + } + }, + { + "base": "On Connected", + "details": { + "name": "On Connected" + } + }, + { + "base": "On Disconnected", + "details": { + "name": "On Disconnected" + } + }, + { + "base": "OnEvent", + "details": { + "name": "OnEvent" + } + } + ] + } + ] +} \ No newline at end of file diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/AZEvents/OnTriggerExitevent.names b/Gems/ScriptCanvas/Assets/TranslationAssets/AZEvents/OnTriggerExitevent.names new file mode 100644 index 0000000000..87c1c8e65f --- /dev/null +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/AZEvents/OnTriggerExitevent.names @@ -0,0 +1,62 @@ +{ + "entries": [ + { + "base": "On Trigger Exit event", + "context": "AZEventHandler", + "variant": "", + "details": { + "name": "On Trigger Exit event" + }, + "slots": [ + { + "base": "Simulated Body Handle", + "details": { + "name": "Simulated Body Handle" + } + }, + { + "base": "Trigger Event", + "details": { + "name": "Trigger Event" + } + }, + { + "base": "On Trigger Exit event", + "details": { + "name": "On Trigger Exit event" + } + }, + { + "base": "Connect", + "details": { + "name": "Connect" + } + }, + { + "base": "Disconnect", + "details": { + "name": "Disconnect" + } + }, + { + "base": "On Connected", + "details": { + "name": "On Connected" + } + }, + { + "base": "On Disconnected", + "details": { + "name": "On Disconnected" + } + }, + { + "base": "OnEvent", + "details": { + "name": "OnEvent" + } + } + ] + } + ] +} \ No newline at end of file diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/AZEvents/Postsimulateevent.names b/Gems/ScriptCanvas/Assets/TranslationAssets/AZEvents/Postsimulateevent.names new file mode 100644 index 0000000000..cbf2b98cb2 --- /dev/null +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/AZEvents/Postsimulateevent.names @@ -0,0 +1,56 @@ +{ + "entries": [ + { + "base": "Postsimulate event", + "context": "AZEventHandler", + "variant": "", + "details": { + "name": "Postsimulate event" + }, + "slots": [ + { + "base": "Tick time", + "details": { + "name": "Tick time" + } + }, + { + "base": "Postsimulate event", + "details": { + "name": "Postsimulate event" + } + }, + { + "base": "Connect", + "details": { + "name": "Connect" + } + }, + { + "base": "Disconnect", + "details": { + "name": "Disconnect" + } + }, + { + "base": "On Connected", + "details": { + "name": "On Connected" + } + }, + { + "base": "On Disconnected", + "details": { + "name": "On Disconnected" + } + }, + { + "base": "OnEvent", + "details": { + "name": "OnEvent" + } + } + ] + } + ] +} \ No newline at end of file diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/AZEvents/Presimulateevent.names b/Gems/ScriptCanvas/Assets/TranslationAssets/AZEvents/Presimulateevent.names new file mode 100644 index 0000000000..d71831f458 --- /dev/null +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/AZEvents/Presimulateevent.names @@ -0,0 +1,56 @@ +{ + "entries": [ + { + "base": "Presimulate event", + "context": "AZEventHandler", + "variant": "", + "details": { + "name": "Presimulate event" + }, + "slots": [ + { + "base": "Tick time", + "details": { + "name": "Tick time" + } + }, + { + "base": "Presimulate event", + "details": { + "name": "Presimulate event" + } + }, + { + "base": "Connect", + "details": { + "name": "Connect" + } + }, + { + "base": "Disconnect", + "details": { + "name": "Disconnect" + } + }, + { + "base": "On Connected", + "details": { + "name": "On Connected" + } + }, + { + "base": "On Disconnected", + "details": { + "name": "On Disconnected" + } + }, + { + "base": "OnEvent", + "details": { + "name": "OnEvent" + } + } + ] + } + ] +} \ No newline at end of file diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/AZEvents/ServerToAuthorityNoParamNotifyEvent.names b/Gems/ScriptCanvas/Assets/TranslationAssets/AZEvents/ServerToAuthorityNoParamNotifyEvent.names new file mode 100644 index 0000000000..b6694211cd --- /dev/null +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/AZEvents/ServerToAuthorityNoParamNotifyEvent.names @@ -0,0 +1,50 @@ +{ + "entries": [ + { + "base": "ServerToAuthorityNoParam Notify Event", + "context": "AZEventHandler", + "variant": "", + "details": { + "name": "Server To Authority No Param Notify Event" + }, + "slots": [ + { + "base": "ServerToAuthorityNoParam Notify Event", + "details": { + "name": "ServerToAuthorityNoParam Notify Event" + } + }, + { + "base": "Connect", + "details": { + "name": "Connect" + } + }, + { + "base": "Disconnect", + "details": { + "name": "Disconnect" + } + }, + { + "base": "On Connected", + "details": { + "name": "On Connected" + } + }, + { + "base": "On Disconnected", + "details": { + "name": "On Disconnected" + } + }, + { + "base": "OnEvent", + "details": { + "name": "OnEvent" + } + } + ] + } + ] +} \ No newline at end of file diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/AZEvents/ServerToAuthorityNotifyEvent.names b/Gems/ScriptCanvas/Assets/TranslationAssets/AZEvents/ServerToAuthorityNotifyEvent.names new file mode 100644 index 0000000000..71ab303260 --- /dev/null +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/AZEvents/ServerToAuthorityNotifyEvent.names @@ -0,0 +1,56 @@ +{ + "entries": [ + { + "base": "ServerToAuthority Notify Event", + "context": "AZEventHandler", + "variant": "", + "details": { + "name": "Server To Authority Notify Event" + }, + "slots": [ + { + "base": "someFloat", + "details": { + "name": "someFloat" + } + }, + { + "base": "ServerToAuthority Notify Event", + "details": { + "name": "ServerToAuthority Notify Event" + } + }, + { + "base": "Connect", + "details": { + "name": "Connect" + } + }, + { + "base": "Disconnect", + "details": { + "name": "Disconnect" + } + }, + { + "base": "On Connected", + "details": { + "name": "On Connected" + } + }, + { + "base": "On Disconnected", + "details": { + "name": "On Disconnected" + } + }, + { + "base": "OnEvent", + "details": { + "name": "OnEvent" + } + } + ] + } + ] +} \ No newline at end of file diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/AZEvents/SettingsRegistryNotifyEvent.names b/Gems/ScriptCanvas/Assets/TranslationAssets/AZEvents/SettingsRegistryNotifyEvent.names new file mode 100644 index 0000000000..6460d967b9 --- /dev/null +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/AZEvents/SettingsRegistryNotifyEvent.names @@ -0,0 +1,56 @@ +{ + "entries": [ + { + "base": "SettingsRegistry Notify Event", + "context": "AZEventHandler", + "variant": "", + "details": { + "name": "SettingsRegistry Notify Event" + }, + "slots": [ + { + "base": "Json Path", + "details": { + "name": "Json Path" + } + }, + { + "base": "SettingsRegistry Notify Event", + "details": { + "name": "SettingsRegistry Notify Event" + } + }, + { + "base": "Connect", + "details": { + "name": "Connect" + } + }, + { + "base": "Disconnect", + "details": { + "name": "Disconnect" + } + }, + { + "base": "On Connected", + "details": { + "name": "On Connected" + } + }, + { + "base": "On Disconnected", + "details": { + "name": "On Disconnected" + } + }, + { + "base": "OnEvent", + "details": { + "name": "OnEvent" + } + } + ] + } + ] +} \ No newline at end of file diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Classes/AWSGameLiftAcceptMatchRequest.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Classes/AWSGameLiftAcceptMatchRequest.names new file mode 100644 index 0000000000..fbcc3c69c0 --- /dev/null +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Classes/AWSGameLiftAcceptMatchRequest.names @@ -0,0 +1,147 @@ +{ + "entries": [ + { + "base": "AWSGameLiftAcceptMatchRequest", + "context": "BehaviorClass", + "variant": "", + "details": { + "name": "Accept Match Request", + "category": "AWS Game Lift" + }, + "methods": [ + { + "base": "GetAcceptMatch", + "details": { + "name": "Get Accept Match" + }, + "params": [ + { + "typeid": "{AD289D76-CEE2-424F-847E-E62AA83B7D79}", + "details": { + "name": "Accept Match Request", + "tooltip": "The container for AcceptMatch request parameters" + } + } + ], + "results": [ + { + "typeid": "{A0CA880C-AFE4-43CB-926C-59AC48496112}", + "details": { + "name": "Accept Match" + } + } + ] + }, + { + "base": "SetAcceptMatch", + "details": { + "name": "Set Accept Match" + }, + "params": [ + { + "typeid": "{AD289D76-CEE2-424F-847E-E62AA83B7D79}", + "details": { + "name": "Accept Match Request", + "tooltip": "The container for AcceptMatch request parameters" + } + }, + { + "typeid": "{A0CA880C-AFE4-43CB-926C-59AC48496112}", + "details": { + "name": "Accept Match" + } + } + ] + }, + { + "base": "GetPlayerIds", + "details": { + "name": "Get Player Ids" + }, + "params": [ + { + "typeid": "{AD289D76-CEE2-424F-847E-E62AA83B7D79}", + "details": { + "name": "Accept Match Request", + "tooltip": "The container for AcceptMatch request parameters" + } + } + ], + "results": [ + { + "typeid": "{99DAD0BC-740E-5E82-826B-8FC7968CC02C}", + "details": { + "name": "Player Ids" + } + } + ] + }, + { + "base": "SetPlayerIds", + "details": { + "name": "Set Player Ids" + }, + "params": [ + { + "typeid": "{AD289D76-CEE2-424F-847E-E62AA83B7D79}", + "details": { + "name": "Accept Match Request", + "tooltip": "The container for AcceptMatch request parameters" + } + }, + { + "typeid": "{99DAD0BC-740E-5E82-826B-8FC7968CC02C}", + "details": { + "name": "Player Ids" + } + } + ] + }, + { + "base": "GetTicketId", + "details": { + "name": "Get Ticket Id" + }, + "params": [ + { + "typeid": "{AD289D76-CEE2-424F-847E-E62AA83B7D79}", + "details": { + "name": "Accept Match Request", + "tooltip": "The container for AcceptMatch request parameters" + } + } + ], + "results": [ + { + "typeid": "{03AAAB3F-5C47-5A66-9EBC-D5FA4DB353C9}", + "details": { + "name": "Ticket Id" + } + } + ] + }, + { + "base": "SetTicketId", + "details": { + "name": "Set Ticket Id" + }, + "params": [ + { + "typeid": "{AD289D76-CEE2-424F-847E-E62AA83B7D79}", + "details": { + "name": "Accept Match Request", + "tooltip": "The container for AcceptMatch request parameters" + } + }, + { + "typeid": "{03AAAB3F-5C47-5A66-9EBC-D5FA4DB353C9}", + "details": { + "name": "Ticket Id" + } + } + ] + } + ] + } + ] +} \ No newline at end of file diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Classes/AWSGameLiftCreateSessionOnQueueRequest.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Classes/AWSGameLiftCreateSessionOnQueueRequest.names new file mode 100644 index 0000000000..38de95185f --- /dev/null +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Classes/AWSGameLiftCreateSessionOnQueueRequest.names @@ -0,0 +1,275 @@ +{ + "entries": [ + { + "base": "AWSGameLiftCreateSessionOnQueueRequest", + "context": "BehaviorClass", + "variant": "", + "details": { + "name": "Create Session On Queue Request", + "category": "AWS Game Lift" + }, + "methods": [ + { + "base": "GetPlacementId", + "details": { + "name": "Get Placement Id" + }, + "params": [ + { + "typeid": "{2B99E594-CE81-4EB0-8888-74EF4242B59F}", + "details": { + "name": "AWS Game Lift Create Session On Queue Request" + } + } + ], + "results": [ + { + "typeid": "{03AAAB3F-5C47-5A66-9EBC-D5FA4DB353C9}", + "details": { + "name": "Placement Id" + } + } + ] + }, + { + "base": "SetPlacementId", + "details": { + "name": "Set Placement Id" + }, + "params": [ + { + "typeid": "{2B99E594-CE81-4EB0-8888-74EF4242B59F}", + "details": { + "name": "AWS Game Lift Create Session On Queue Request" + } + }, + { + "typeid": "{03AAAB3F-5C47-5A66-9EBC-D5FA4DB353C9}", + "details": { + "name": "Placement Id" + } + } + ] + }, + { + "base": "GetQueueName", + "details": { + "name": "Get Queue Name" + }, + "params": [ + { + "typeid": "{2B99E594-CE81-4EB0-8888-74EF4242B59F}", + "details": { + "name": "AWS Game Lift Create Session On Queue Request" + } + } + ], + "results": [ + { + "typeid": "{03AAAB3F-5C47-5A66-9EBC-D5FA4DB353C9}", + "details": { + "name": "Queue Name" + } + } + ] + }, + { + "base": "SetQueueName", + "details": { + "name": "Set Queue Name" + }, + "params": [ + { + "typeid": "{2B99E594-CE81-4EB0-8888-74EF4242B59F}", + "details": { + "name": "AWS Game Lift Create Session On Queue Request" + } + }, + { + "typeid": "{03AAAB3F-5C47-5A66-9EBC-D5FA4DB353C9}", + "details": { + "name": "Queue Name" + } + } + ] + }, + { + "base": "GetSessionName", + "details": { + "name": "Get Session Name" + }, + "params": [ + { + "typeid": "{E39C2A45-89C9-4CFB-B337-9734DC798930}", + "details": { + "name": "Create Session Request", + "tooltip": "The container for CreateSession request parameters" + } + } + ], + "results": [ + { + "typeid": "{03AAAB3F-5C47-5A66-9EBC-D5FA4DB353C9}", + "details": { + "name": "Session Name" + } + } + ] + }, + { + "base": "SetSessionName", + "details": { + "name": "Set Session Name" + }, + "params": [ + { + "typeid": "{E39C2A45-89C9-4CFB-B337-9734DC798930}", + "details": { + "name": "Create Session Request", + "tooltip": "The container for CreateSession request parameters" + } + }, + { + "typeid": "{03AAAB3F-5C47-5A66-9EBC-D5FA4DB353C9}", + "details": { + "name": "Session Name" + } + } + ] + }, + { + "base": "GetMaxPlayer", + "details": { + "name": "Get Max Player" + }, + "params": [ + { + "typeid": "{E39C2A45-89C9-4CFB-B337-9734DC798930}", + "details": { + "name": "Create Session Request", + "tooltip": "The container for CreateSession request parameters" + } + } + ], + "results": [ + { + "typeid": "{D6597933-47CD-4FC8-B911-63F3E2B0993A}", + "details": { + "name": "Max Player" + } + } + ] + }, + { + "base": "SetMaxPlayer", + "details": { + "name": "Set Max Player" + }, + "params": [ + { + "typeid": "{E39C2A45-89C9-4CFB-B337-9734DC798930}", + "details": { + "name": "Create Session Request", + "tooltip": "The container for CreateSession request parameters" + } + }, + { + "typeid": "{D6597933-47CD-4FC8-B911-63F3E2B0993A}", + "details": { + "name": "Max Player" + } + } + ] + }, + { + "base": "GetSessionProperties", + "details": { + "name": "Get Session Properties" + }, + "params": [ + { + "typeid": "{E39C2A45-89C9-4CFB-B337-9734DC798930}", + "details": { + "name": "Create Session Request", + "tooltip": "The container for CreateSession request parameters" + } + } + ], + "results": [ + { + "typeid": "{F8A7460C-2CC2-5755-AFDA-49B1109A751E}", + "details": { + "name": "Session Properties" + } + } + ] + }, + { + "base": "SetSessionProperties", + "details": { + "name": "Set Session Properties" + }, + "params": [ + { + "typeid": "{E39C2A45-89C9-4CFB-B337-9734DC798930}", + "details": { + "name": "Create Session Request", + "tooltip": "The container for CreateSession request parameters" + } + }, + { + "typeid": "{F8A7460C-2CC2-5755-AFDA-49B1109A751E}", + "details": { + "name": "Session Properties" + } + } + ] + }, + { + "base": "GetCreatorId", + "details": { + "name": "Get Creator Id" + }, + "params": [ + { + "typeid": "{E39C2A45-89C9-4CFB-B337-9734DC798930}", + "details": { + "name": "Create Session Request", + "tooltip": "The container for CreateSession request parameters" + } + } + ], + "results": [ + { + "typeid": "{03AAAB3F-5C47-5A66-9EBC-D5FA4DB353C9}", + "details": { + "name": "Creator Id" + } + } + ] + }, + { + "base": "SetCreatorId", + "details": { + "name": "Set Creator Id" + }, + "params": [ + { + "typeid": "{E39C2A45-89C9-4CFB-B337-9734DC798930}", + "details": { + "name": "Create Session Request", + "tooltip": "The container for CreateSession request parameters" + } + }, + { + "typeid": "{03AAAB3F-5C47-5A66-9EBC-D5FA4DB353C9}", + "details": { + "name": "Creator Id" + } + } + ] + } + ] + } + ] +} \ No newline at end of file diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Classes/AWSGameLiftCreateSessionRequest.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Classes/AWSGameLiftCreateSessionRequest.names new file mode 100644 index 0000000000..3924b7164d --- /dev/null +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Classes/AWSGameLiftCreateSessionRequest.names @@ -0,0 +1,317 @@ +{ + "entries": [ + { + "base": "AWSGameLiftCreateSessionRequest", + "context": "BehaviorClass", + "variant": "", + "details": { + "name": "Create Session Request", + "category": "AWS Game Lift" + }, + "methods": [ + { + "base": "GetIdempotencyToken", + "details": { + "name": "Get Idempotency Token" + }, + "params": [ + { + "typeid": "{69612D5D-F899-4DEB-AD63-4C497ABC5C0D}", + "details": { + "name": "AWS Game Lift Create Session Request" + } + } + ], + "results": [ + { + "typeid": "{03AAAB3F-5C47-5A66-9EBC-D5FA4DB353C9}", + "details": { + "name": "Idempotency Token" + } + } + ] + }, + { + "base": "SetIdempotencyToken", + "details": { + "name": "Set Idempotency Token" + }, + "params": [ + { + "typeid": "{69612D5D-F899-4DEB-AD63-4C497ABC5C0D}", + "details": { + "name": "AWS Game Lift Create Session Request" + } + }, + { + "typeid": "{03AAAB3F-5C47-5A66-9EBC-D5FA4DB353C9}", + "details": { + "name": "Idempotency Token" + } + } + ] + }, + { + "base": "GetAliasId", + "details": { + "name": "Get Alias Id" + }, + "params": [ + { + "typeid": "{69612D5D-F899-4DEB-AD63-4C497ABC5C0D}", + "details": { + "name": "AWS Game Lift Create Session Request" + } + } + ], + "results": [ + { + "typeid": "{03AAAB3F-5C47-5A66-9EBC-D5FA4DB353C9}", + "details": { + "name": "Alias Id" + } + } + ] + }, + { + "base": "SetAliasId", + "details": { + "name": "Set Alias Id" + }, + "params": [ + { + "typeid": "{69612D5D-F899-4DEB-AD63-4C497ABC5C0D}", + "details": { + "name": "AWS Game Lift Create Session Request" + } + }, + { + "typeid": "{03AAAB3F-5C47-5A66-9EBC-D5FA4DB353C9}", + "details": { + "name": "Alias Id" + } + } + ] + }, + { + "base": "GetSessionName", + "details": { + "name": "Get Session Name" + }, + "params": [ + { + "typeid": "{E39C2A45-89C9-4CFB-B337-9734DC798930}", + "details": { + "name": "Create Session Request", + "tooltip": "The container for CreateSession request parameters" + } + } + ], + "results": [ + { + "typeid": "{03AAAB3F-5C47-5A66-9EBC-D5FA4DB353C9}", + "details": { + "name": "Session Name" + } + } + ] + }, + { + "base": "SetSessionName", + "details": { + "name": "Set Session Name" + }, + "params": [ + { + "typeid": "{E39C2A45-89C9-4CFB-B337-9734DC798930}", + "details": { + "name": "Create Session Request", + "tooltip": "The container for CreateSession request parameters" + } + }, + { + "typeid": "{03AAAB3F-5C47-5A66-9EBC-D5FA4DB353C9}", + "details": { + "name": "Session Name" + } + } + ] + }, + { + "base": "GetMaxPlayer", + "details": { + "name": "Get Max Player" + }, + "params": [ + { + "typeid": "{E39C2A45-89C9-4CFB-B337-9734DC798930}", + "details": { + "name": "Create Session Request", + "tooltip": "The container for CreateSession request parameters" + } + } + ], + "results": [ + { + "typeid": "{D6597933-47CD-4FC8-B911-63F3E2B0993A}", + "details": { + "name": "Max Player" + } + } + ] + }, + { + "base": "SetMaxPlayer", + "details": { + "name": "Set Max Player" + }, + "params": [ + { + "typeid": "{E39C2A45-89C9-4CFB-B337-9734DC798930}", + "details": { + "name": "Create Session Request", + "tooltip": "The container for CreateSession request parameters" + } + }, + { + "typeid": "{D6597933-47CD-4FC8-B911-63F3E2B0993A}", + "details": { + "name": "Max Player" + } + } + ] + }, + { + "base": "GetSessionProperties", + "details": { + "name": "Get Session Properties" + }, + "params": [ + { + "typeid": "{E39C2A45-89C9-4CFB-B337-9734DC798930}", + "details": { + "name": "Create Session Request", + "tooltip": "The container for CreateSession request parameters" + } + } + ], + "results": [ + { + "typeid": "{F8A7460C-2CC2-5755-AFDA-49B1109A751E}", + "details": { + "name": "Session Properties" + } + } + ] + }, + { + "base": "SetSessionProperties", + "details": { + "name": "Set Session Properties" + }, + "params": [ + { + "typeid": "{E39C2A45-89C9-4CFB-B337-9734DC798930}", + "details": { + "name": "Create Session Request", + "tooltip": "The container for CreateSession request parameters" + } + }, + { + "typeid": "{F8A7460C-2CC2-5755-AFDA-49B1109A751E}", + "details": { + "name": "Session Properties" + } + } + ] + }, + { + "base": "GetFleetId", + "details": { + "name": "Get Fleet Id" + }, + "params": [ + { + "typeid": "{69612D5D-F899-4DEB-AD63-4C497ABC5C0D}", + "details": { + "name": "AWS Game Lift Create Session Request" + } + } + ], + "results": [ + { + "typeid": "{03AAAB3F-5C47-5A66-9EBC-D5FA4DB353C9}", + "details": { + "name": "Fleet Id" + } + } + ] + }, + { + "base": "SetFleetId", + "details": { + "name": "Set Fleet Id" + }, + "params": [ + { + "typeid": "{69612D5D-F899-4DEB-AD63-4C497ABC5C0D}", + "details": { + "name": "AWS Game Lift Create Session Request" + } + }, + { + "typeid": "{03AAAB3F-5C47-5A66-9EBC-D5FA4DB353C9}", + "details": { + "name": "Fleet Id" + } + } + ] + }, + { + "base": "GetCreatorId", + "details": { + "name": "Get Creator Id" + }, + "params": [ + { + "typeid": "{E39C2A45-89C9-4CFB-B337-9734DC798930}", + "details": { + "name": "Create Session Request", + "tooltip": "The container for CreateSession request parameters" + } + } + ], + "results": [ + { + "typeid": "{03AAAB3F-5C47-5A66-9EBC-D5FA4DB353C9}", + "details": { + "name": "Creator Id" + } + } + ] + }, + { + "base": "SetCreatorId", + "details": { + "name": "Set Creator Id" + }, + "params": [ + { + "typeid": "{E39C2A45-89C9-4CFB-B337-9734DC798930}", + "details": { + "name": "Create Session Request", + "tooltip": "The container for CreateSession request parameters" + } + }, + { + "typeid": "{03AAAB3F-5C47-5A66-9EBC-D5FA4DB353C9}", + "details": { + "name": "Creator Id" + } + } + ] + } + ] + } + ] +} \ No newline at end of file diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Classes/AWSGameLiftJoinSessionRequest.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Classes/AWSGameLiftJoinSessionRequest.names new file mode 100644 index 0000000000..c4a8a515de --- /dev/null +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Classes/AWSGameLiftJoinSessionRequest.names @@ -0,0 +1,147 @@ +{ + "entries": [ + { + "base": "AWSGameLiftJoinSessionRequest", + "context": "BehaviorClass", + "variant": "", + "details": { + "name": "Join Session Request", + "category": "AWS Game Lift" + }, + "methods": [ + { + "base": "GetPlayerData", + "details": { + "name": "Get Player Data" + }, + "params": [ + { + "typeid": "{519769E8-3CDE-4385-A0D7-24DBB3685657}", + "details": { + "name": "Join Session Request", + "tooltip": "The container for JoinSession request parameters" + } + } + ], + "results": [ + { + "typeid": "{03AAAB3F-5C47-5A66-9EBC-D5FA4DB353C9}", + "details": { + "name": "Player Data" + } + } + ] + }, + { + "base": "SetPlayerData", + "details": { + "name": "Set Player Data" + }, + "params": [ + { + "typeid": "{519769E8-3CDE-4385-A0D7-24DBB3685657}", + "details": { + "name": "Join Session Request", + "tooltip": "The container for JoinSession request parameters" + } + }, + { + "typeid": "{03AAAB3F-5C47-5A66-9EBC-D5FA4DB353C9}", + "details": { + "name": "Player Data" + } + } + ] + }, + { + "base": "GetPlayerId", + "details": { + "name": "Get Player Id" + }, + "params": [ + { + "typeid": "{519769E8-3CDE-4385-A0D7-24DBB3685657}", + "details": { + "name": "Join Session Request", + "tooltip": "The container for JoinSession request parameters" + } + } + ], + "results": [ + { + "typeid": "{03AAAB3F-5C47-5A66-9EBC-D5FA4DB353C9}", + "details": { + "name": "Player Id" + } + } + ] + }, + { + "base": "SetPlayerId", + "details": { + "name": "Set Player Id" + }, + "params": [ + { + "typeid": "{519769E8-3CDE-4385-A0D7-24DBB3685657}", + "details": { + "name": "Join Session Request", + "tooltip": "The container for JoinSession request parameters" + } + }, + { + "typeid": "{03AAAB3F-5C47-5A66-9EBC-D5FA4DB353C9}", + "details": { + "name": "Player Id" + } + } + ] + }, + { + "base": "GetSessionId", + "details": { + "name": "Get Session Id" + }, + "params": [ + { + "typeid": "{519769E8-3CDE-4385-A0D7-24DBB3685657}", + "details": { + "name": "Join Session Request", + "tooltip": "The container for JoinSession request parameters" + } + } + ], + "results": [ + { + "typeid": "{03AAAB3F-5C47-5A66-9EBC-D5FA4DB353C9}", + "details": { + "name": "Session Id" + } + } + ] + }, + { + "base": "SetSessionId", + "details": { + "name": "Set Session Id" + }, + "params": [ + { + "typeid": "{519769E8-3CDE-4385-A0D7-24DBB3685657}", + "details": { + "name": "Join Session Request", + "tooltip": "The container for JoinSession request parameters" + } + }, + { + "typeid": "{03AAAB3F-5C47-5A66-9EBC-D5FA4DB353C9}", + "details": { + "name": "Session Id" + } + } + ] + } + ] + } + ] +} \ No newline at end of file diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Classes/AWSGameLiftPlayer.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Classes/AWSGameLiftPlayer.names new file mode 100644 index 0000000000..372cbdb019 --- /dev/null +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Classes/AWSGameLiftPlayer.names @@ -0,0 +1,183 @@ +{ + "entries": [ + { + "base": "AWSGameLiftPlayer", + "context": "BehaviorClass", + "variant": "", + "details": { + "name": "Player", + "category": "AWS Game Lift" + }, + "methods": [ + { + "base": "GetLatencyInMs", + "details": { + "name": "Get Latency In Ms" + }, + "params": [ + { + "typeid": "{B62C118E-C55D-4903-8ECB-E58E8CA613C4}", + "details": { + "name": "AWS Game Lift Player" + } + } + ], + "results": [ + { + "typeid": "{3F80885A-9011-5172-8D94-87108B31D950}", + "details": { + "name": "Latency In Ms" + } + } + ] + }, + { + "base": "SetLatencyInMs", + "details": { + "name": "Set Latency In Ms" + }, + "params": [ + { + "typeid": "{B62C118E-C55D-4903-8ECB-E58E8CA613C4}", + "details": { + "name": "AWS Game Lift Player" + } + }, + { + "typeid": "{3F80885A-9011-5172-8D94-87108B31D950}", + "details": { + "name": "Latency In Ms" + } + } + ] + }, + { + "base": "GetPlayerAttributes", + "details": { + "name": "Get Player Attributes" + }, + "params": [ + { + "typeid": "{B62C118E-C55D-4903-8ECB-E58E8CA613C4}", + "details": { + "name": "AWS Game Lift Player" + } + } + ], + "results": [ + { + "typeid": "{F8A7460C-2CC2-5755-AFDA-49B1109A751E}", + "details": { + "name": "Player Attributes" + } + } + ] + }, + { + "base": "SetPlayerAttributes", + "details": { + "name": "Set Player Attributes" + }, + "params": [ + { + "typeid": "{B62C118E-C55D-4903-8ECB-E58E8CA613C4}", + "details": { + "name": "AWS Game Lift Player" + } + }, + { + "typeid": "{F8A7460C-2CC2-5755-AFDA-49B1109A751E}", + "details": { + "name": "Player Attributes" + } + } + ] + }, + { + "base": "GetPlayerId", + "details": { + "name": "Get Player Id" + }, + "params": [ + { + "typeid": "{B62C118E-C55D-4903-8ECB-E58E8CA613C4}", + "details": { + "name": "AWS Game Lift Player" + } + } + ], + "results": [ + { + "typeid": "{03AAAB3F-5C47-5A66-9EBC-D5FA4DB353C9}", + "details": { + "name": "Player Id" + } + } + ] + }, + { + "base": "SetPlayerId", + "details": { + "name": "Set Player Id" + }, + "params": [ + { + "typeid": "{B62C118E-C55D-4903-8ECB-E58E8CA613C4}", + "details": { + "name": "AWS Game Lift Player" + } + }, + { + "typeid": "{03AAAB3F-5C47-5A66-9EBC-D5FA4DB353C9}", + "details": { + "name": "Player Id" + } + } + ] + }, + { + "base": "GetTeam", + "details": { + "name": "Get Team" + }, + "params": [ + { + "typeid": "{B62C118E-C55D-4903-8ECB-E58E8CA613C4}", + "details": { + "name": "AWS Game Lift Player" + } + } + ], + "results": [ + { + "typeid": "{03AAAB3F-5C47-5A66-9EBC-D5FA4DB353C9}", + "details": { + "name": "Team" + } + } + ] + }, + { + "base": "SetTeam", + "details": { + "name": "Set Team" + }, + "params": [ + { + "typeid": "{B62C118E-C55D-4903-8ECB-E58E8CA613C4}", + "details": { + "name": "AWS Game Lift Player" + } + }, + { + "typeid": "{03AAAB3F-5C47-5A66-9EBC-D5FA4DB353C9}", + "details": { + "name": "Team" + } + } + ] + } + ] + } + ] +} \ No newline at end of file diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Classes/AWSGameLiftSearchSessionsRequest.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Classes/AWSGameLiftSearchSessionsRequest.names new file mode 100644 index 0000000000..c2300b23bc --- /dev/null +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Classes/AWSGameLiftSearchSessionsRequest.names @@ -0,0 +1,317 @@ +{ + "entries": [ + { + "base": "AWSGameLiftSearchSessionsRequest", + "context": "BehaviorClass", + "variant": "", + "details": { + "name": "Search Sessions Request", + "category": "AWS Game Lift" + }, + "methods": [ + { + "base": "GetLocation", + "details": { + "name": "Get Location" + }, + "params": [ + { + "typeid": "{864C91C0-CA53-4585-BF07-066C0DF3E198}", + "details": { + "name": "AWS Game Lift Search Sessions Request" + } + } + ], + "results": [ + { + "typeid": "{03AAAB3F-5C47-5A66-9EBC-D5FA4DB353C9}", + "details": { + "name": "Location" + } + } + ] + }, + { + "base": "SetLocation", + "details": { + "name": "Set Location" + }, + "params": [ + { + "typeid": "{864C91C0-CA53-4585-BF07-066C0DF3E198}", + "details": { + "name": "AWS Game Lift Search Sessions Request" + } + }, + { + "typeid": "{03AAAB3F-5C47-5A66-9EBC-D5FA4DB353C9}", + "details": { + "name": "Location" + } + } + ] + }, + { + "base": "GetFleetId", + "details": { + "name": "Get Fleet Id" + }, + "params": [ + { + "typeid": "{864C91C0-CA53-4585-BF07-066C0DF3E198}", + "details": { + "name": "AWS Game Lift Search Sessions Request" + } + } + ], + "results": [ + { + "typeid": "{03AAAB3F-5C47-5A66-9EBC-D5FA4DB353C9}", + "details": { + "name": "Fleet Id" + } + } + ] + }, + { + "base": "SetFleetId", + "details": { + "name": "Set Fleet Id" + }, + "params": [ + { + "typeid": "{864C91C0-CA53-4585-BF07-066C0DF3E198}", + "details": { + "name": "AWS Game Lift Search Sessions Request" + } + }, + { + "typeid": "{03AAAB3F-5C47-5A66-9EBC-D5FA4DB353C9}", + "details": { + "name": "Fleet Id" + } + } + ] + }, + { + "base": "GetNextToken", + "details": { + "name": "Get Next Token" + }, + "params": [ + { + "typeid": "{B49207A8-8549-4ADB-B7D9-D7A4932F9B4B}", + "details": { + "name": "Search Sessions Request", + "tooltip": "The container for SearchSessions request parameters" + } + } + ], + "results": [ + { + "typeid": "{03AAAB3F-5C47-5A66-9EBC-D5FA4DB353C9}", + "details": { + "name": "Next Token" + } + } + ] + }, + { + "base": "SetNextToken", + "details": { + "name": "Set Next Token" + }, + "params": [ + { + "typeid": "{B49207A8-8549-4ADB-B7D9-D7A4932F9B4B}", + "details": { + "name": "Search Sessions Request", + "tooltip": "The container for SearchSessions request parameters" + } + }, + { + "typeid": "{03AAAB3F-5C47-5A66-9EBC-D5FA4DB353C9}", + "details": { + "name": "Next Token" + } + } + ] + }, + { + "base": "GetSortExpression", + "details": { + "name": "Get Sort Expression" + }, + "params": [ + { + "typeid": "{B49207A8-8549-4ADB-B7D9-D7A4932F9B4B}", + "details": { + "name": "Search Sessions Request", + "tooltip": "The container for SearchSessions request parameters" + } + } + ], + "results": [ + { + "typeid": "{03AAAB3F-5C47-5A66-9EBC-D5FA4DB353C9}", + "details": { + "name": "Sort Expression" + } + } + ] + }, + { + "base": "SetSortExpression", + "details": { + "name": "Set Sort Expression" + }, + "params": [ + { + "typeid": "{B49207A8-8549-4ADB-B7D9-D7A4932F9B4B}", + "details": { + "name": "Search Sessions Request", + "tooltip": "The container for SearchSessions request parameters" + } + }, + { + "typeid": "{03AAAB3F-5C47-5A66-9EBC-D5FA4DB353C9}", + "details": { + "name": "Sort Expression" + } + } + ] + }, + { + "base": "GetAliasId", + "details": { + "name": "Get Alias Id" + }, + "params": [ + { + "typeid": "{864C91C0-CA53-4585-BF07-066C0DF3E198}", + "details": { + "name": "AWS Game Lift Search Sessions Request" + } + } + ], + "results": [ + { + "typeid": "{03AAAB3F-5C47-5A66-9EBC-D5FA4DB353C9}", + "details": { + "name": "Alias Id" + } + } + ] + }, + { + "base": "SetAliasId", + "details": { + "name": "Set Alias Id" + }, + "params": [ + { + "typeid": "{864C91C0-CA53-4585-BF07-066C0DF3E198}", + "details": { + "name": "AWS Game Lift Search Sessions Request" + } + }, + { + "typeid": "{03AAAB3F-5C47-5A66-9EBC-D5FA4DB353C9}", + "details": { + "name": "Alias Id" + } + } + ] + }, + { + "base": "GetFilterExpression", + "details": { + "name": "Get Filter Expression" + }, + "params": [ + { + "typeid": "{B49207A8-8549-4ADB-B7D9-D7A4932F9B4B}", + "details": { + "name": "Search Sessions Request", + "tooltip": "The container for SearchSessions request parameters" + } + } + ], + "results": [ + { + "typeid": "{03AAAB3F-5C47-5A66-9EBC-D5FA4DB353C9}", + "details": { + "name": "Filter Expression" + } + } + ] + }, + { + "base": "SetFilterExpression", + "details": { + "name": "Set Filter Expression" + }, + "params": [ + { + "typeid": "{B49207A8-8549-4ADB-B7D9-D7A4932F9B4B}", + "details": { + "name": "Search Sessions Request", + "tooltip": "The container for SearchSessions request parameters" + } + }, + { + "typeid": "{03AAAB3F-5C47-5A66-9EBC-D5FA4DB353C9}", + "details": { + "name": "Filter Expression" + } + } + ] + }, + { + "base": "GetMaxResult", + "details": { + "name": "Get Max Result" + }, + "params": [ + { + "typeid": "{B49207A8-8549-4ADB-B7D9-D7A4932F9B4B}", + "details": { + "name": "Search Sessions Request", + "tooltip": "The container for SearchSessions request parameters" + } + } + ], + "results": [ + { + "typeid": "{72B9409A-7D1A-4831-9CFE-FCB3FADD3426}", + "details": { + "name": "Max Result" + } + } + ] + }, + { + "base": "SetMaxResult", + "details": { + "name": "Set Max Result" + }, + "params": [ + { + "typeid": "{B49207A8-8549-4ADB-B7D9-D7A4932F9B4B}", + "details": { + "name": "Search Sessions Request", + "tooltip": "The container for SearchSessions request parameters" + } + }, + { + "typeid": "{72B9409A-7D1A-4831-9CFE-FCB3FADD3426}", + "details": { + "name": "Max Result" + } + } + ] + } + ] + } + ] +} \ No newline at end of file diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Classes/AWSGameLiftStartMatchmakingRequest.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Classes/AWSGameLiftStartMatchmakingRequest.names new file mode 100644 index 0000000000..735f6d77f6 --- /dev/null +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Classes/AWSGameLiftStartMatchmakingRequest.names @@ -0,0 +1,143 @@ +{ + "entries": [ + { + "base": "AWSGameLiftStartMatchmakingRequest", + "context": "BehaviorClass", + "variant": "", + "details": { + "name": "Start Matchmaking Request", + "category": "AWS Game Lift" + }, + "methods": [ + { + "base": "GetTicketId", + "details": { + "name": "Get Ticket Id" + }, + "params": [ + { + "typeid": "{70B47776-E8E7-4993-BEC3-5CAEC3D48E47}", + "details": { + "name": "Start Matchmaking Request", + "tooltip": "The container for StartMatchmaking request parameters" + } + } + ], + "results": [ + { + "typeid": "{03AAAB3F-5C47-5A66-9EBC-D5FA4DB353C9}", + "details": { + "name": "Ticket Id" + } + } + ] + }, + { + "base": "SetTicketId", + "details": { + "name": "Set Ticket Id" + }, + "params": [ + { + "typeid": "{70B47776-E8E7-4993-BEC3-5CAEC3D48E47}", + "details": { + "name": "Start Matchmaking Request", + "tooltip": "The container for StartMatchmaking request parameters" + } + }, + { + "typeid": "{03AAAB3F-5C47-5A66-9EBC-D5FA4DB353C9}", + "details": { + "name": "Ticket Id" + } + } + ] + }, + { + "base": "GetConfigurationName", + "details": { + "name": "Get Configuration Name" + }, + "params": [ + { + "typeid": "{D273DF71-9C55-48C1-95F9-8D7B66B9CF3E}", + "details": { + "name": "AWS Game Lift Start Matchmaking Request" + } + } + ], + "results": [ + { + "typeid": "{03AAAB3F-5C47-5A66-9EBC-D5FA4DB353C9}", + "details": { + "name": "Configuration Name" + } + } + ] + }, + { + "base": "SetConfigurationName", + "details": { + "name": "Set Configuration Name" + }, + "params": [ + { + "typeid": "{D273DF71-9C55-48C1-95F9-8D7B66B9CF3E}", + "details": { + "name": "AWS Game Lift Start Matchmaking Request" + } + }, + { + "typeid": "{03AAAB3F-5C47-5A66-9EBC-D5FA4DB353C9}", + "details": { + "name": "Configuration Name" + } + } + ] + }, + { + "base": "GetPlayers", + "details": { + "name": "Get Players" + }, + "params": [ + { + "typeid": "{D273DF71-9C55-48C1-95F9-8D7B66B9CF3E}", + "details": { + "name": "AWS Game Lift Start Matchmaking Request" + } + } + ], + "results": [ + { + "typeid": "{EE12B610-77DD-56DD-AB5A-16A537F2CE5E}", + "details": { + "name": "Players" + } + } + ] + }, + { + "base": "SetPlayers", + "details": { + "name": "Set Players" + }, + "params": [ + { + "typeid": "{D273DF71-9C55-48C1-95F9-8D7B66B9CF3E}", + "details": { + "name": "AWS Game Lift Start Matchmaking Request" + } + }, + { + "typeid": "{EE12B610-77DD-56DD-AB5A-16A537F2CE5E}", + "details": { + "name": "Players" + } + } + ] + } + ] + } + ] +} \ No newline at end of file diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Classes/AWSGameLiftStopMatchmakingRequest.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Classes/AWSGameLiftStopMatchmakingRequest.names new file mode 100644 index 0000000000..fa9c71dae6 --- /dev/null +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Classes/AWSGameLiftStopMatchmakingRequest.names @@ -0,0 +1,59 @@ +{ + "entries": [ + { + "base": "AWSGameLiftStopMatchmakingRequest", + "context": "BehaviorClass", + "variant": "", + "details": { + "name": "Stop Matchmaking Request", + "category": "AWS Game Lift" + }, + "methods": [ + { + "base": "GetTicketId", + "details": { + "name": "Get Ticket Id" + }, + "params": [ + { + "typeid": "{6132E293-65EF-4DC2-A8A0-00269697229D}", + "details": { + "name": "Stop Matchmaking Request", + "tooltip": "The container for StopMatchmaking request parameters" + } + } + ], + "results": [ + { + "typeid": "{03AAAB3F-5C47-5A66-9EBC-D5FA4DB353C9}", + "details": { + "name": "Ticket Id" + } + } + ] + }, + { + "base": "SetTicketId", + "details": { + "name": "Set Ticket Id" + }, + "params": [ + { + "typeid": "{6132E293-65EF-4DC2-A8A0-00269697229D}", + "details": { + "name": "Stop Matchmaking Request", + "tooltip": "The container for StopMatchmaking request parameters" + } + }, + { + "typeid": "{03AAAB3F-5C47-5A66-9EBC-D5FA4DB353C9}", + "details": { + "name": "Ticket Id" + } + } + ] + } + ] + } + ] +} \ No newline at end of file diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Classes/AWSMetrics_AttributesSubmissionList.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Classes/AWSMetrics_AttributesSubmissionList.names new file mode 100644 index 0000000000..68e19cbfca --- /dev/null +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Classes/AWSMetrics_AttributesSubmissionList.names @@ -0,0 +1,57 @@ +{ + "entries": [ + { + "base": "AWSMetrics_AttributesSubmissionList", + "context": "BehaviorClass", + "variant": "", + "details": { + "name": "Attributes Submission List", + "category": "AWS Metrics" + }, + "methods": [ + { + "base": "Getattributes", + "details": { + "name": "Get Attributes" + }, + "params": [ + { + "typeid": "{B1106C14-D22B-482F-B33E-B6E154A53798}", + "details": { + "name": "Attribute Submission List" + } + } + ], + "results": [ + { + "typeid": "{1C1ABE6D-94D2-5CFD-A502-8813300FEC8D}", + "details": { + "name": "Metrics Attribute" + } + } + ] + }, + { + "base": "Setattributes", + "details": { + "name": "Set Attributes" + }, + "params": [ + { + "typeid": "{B1106C14-D22B-482F-B33E-B6E154A53798}", + "details": { + "name": "Attribute Submission List" + } + }, + { + "typeid": "{1C1ABE6D-94D2-5CFD-A502-8813300FEC8D}", + "details": { + "name": "Metrics Attribute" + } + } + ] + } + ] + } + ] +} \ No newline at end of file diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Classes/AWSMetrics_MetricsAttribute.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Classes/AWSMetrics_MetricsAttribute.names new file mode 100644 index 0000000000..a3ac9a92c5 --- /dev/null +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Classes/AWSMetrics_MetricsAttribute.names @@ -0,0 +1,131 @@ +{ + "entries": [ + { + "base": "AWSMetrics_MetricsAttribute", + "context": "BehaviorClass", + "variant": "", + "details": { + "name": "Metrics Attribute", + "category": "AWS Metrics" + }, + "methods": [ + { + "base": "SetName", + "context": "AWSMetrics_MetricsAttribute", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke SetName" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after SetName is invoked" + }, + "details": { + "name": "Set Name" + }, + "params": [ + { + "typeid": "{6483F481-0C18-4171-8B59-A44F2F28EAE5}", + "details": { + "name": "Metrics Attribute" + } + }, + { + "typeid": "{03AAAB3F-5C47-5A66-9EBC-D5FA4DB353C9}", + "details": { + "name": "Name" + } + } + ] + }, + { + "base": "SetStrValue", + "context": "AWSMetrics_MetricsAttribute", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke SetStrValue" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after SetStrValue is invoked" + }, + "details": { + "name": "Set String Value" + }, + "params": [ + { + "typeid": "{6483F481-0C18-4171-8B59-A44F2F28EAE5}", + "details": { + "name": "Metrics Attribute" + } + }, + { + "typeid": "{03AAAB3F-5C47-5A66-9EBC-D5FA4DB353C9}", + "details": { + "name": "Name" + } + } + ] + }, + { + "base": "SetIntValue", + "context": "AWSMetrics_MetricsAttribute", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke SetIntValue" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after SetIntValue is invoked" + }, + "details": { + "name": "Set Int Value" + }, + "params": [ + { + "typeid": "{6483F481-0C18-4171-8B59-A44F2F28EAE5}", + "details": { + "name": "Metrics Attribute" + } + }, + { + "typeid": "{72039442-EB38-4D42-A1AD-CB68F7E0EEF6}", + "details": { + "name": "Value" + } + } + ] + }, + { + "base": "SetDoubleValue", + "context": "AWSMetrics_MetricsAttribute", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke SetDoubleValue" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after SetDoubleValue is invoked" + }, + "details": { + "name": "Set Double Value" + }, + "params": [ + { + "typeid": "{6483F481-0C18-4171-8B59-A44F2F28EAE5}", + "details": { + "name": "Metrics Attribute" + } + }, + { + "typeid": "{110C4B14-11A8-4E9D-8638-5051013A56AC}", + "details": { + "name": "Value" + } + } + ] + } + ] + } + ] +} \ No newline at end of file diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Classes/AWSScriptBehaviorDynamoDB.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Classes/AWSScriptBehaviorDynamoDB.names new file mode 100644 index 0000000000..46ba1bad8d --- /dev/null +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Classes/AWSScriptBehaviorDynamoDB.names @@ -0,0 +1,81 @@ +{ + "entries": [ + { + "base": "AWSScriptBehaviorDynamoDB", + "context": "BehaviorClass", + "variant": "", + "details": { + "name": "AWS Dynamo DB", + "category": "AWS Core" + }, + "methods": [ + { + "base": "GetItem", + "context": "AWSScriptBehaviorDynamoDB", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke GetItem" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after GetItem is invoked" + }, + "details": { + "name": "Get Item", + "category": "Other" + }, + "params": [ + { + "typeid": "{03AAAB3F-5C47-5A66-9EBC-D5FA4DB353C9}", + "details": { + "name": "Table Resource Key" + } + }, + { + "typeid": "{F8A7460C-2CC2-5755-AFDA-49B1109A751E}", + "details": { + "name": "Key Map" + } + } + ] + }, + { + "base": "GetItemRaw", + "context": "AWSScriptBehaviorDynamoDB", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke GetItemRaw" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after GetItemRaw is invoked" + }, + "details": { + "name": "Get Item Raw", + "category": "Other" + }, + "params": [ + { + "typeid": "{03AAAB3F-5C47-5A66-9EBC-D5FA4DB353C9}", + "details": { + "name": "Table" + } + }, + { + "typeid": "{F8A7460C-2CC2-5755-AFDA-49B1109A751E}", + "details": { + "name": "Key Map" + } + }, + { + "typeid": "{03AAAB3F-5C47-5A66-9EBC-D5FA4DB353C9}", + "details": { + "name": "Region" + } + } + ] + } + ] + } + ] +} \ No newline at end of file diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Classes/AWSScriptBehaviorLambda.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Classes/AWSScriptBehaviorLambda.names new file mode 100644 index 0000000000..db4a42a152 --- /dev/null +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Classes/AWSScriptBehaviorLambda.names @@ -0,0 +1,79 @@ +{ + "entries": [ + { + "base": "AWSScriptBehaviorLambda", + "context": "BehaviorClass", + "variant": "", + "details": { + "name": "AWS Lambda", + "category": "AWS Core" + }, + "methods": [ + { + "base": "Invoke", + "context": "AWSScriptBehaviorLambda", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Invoke" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Invoke is invoked" + }, + "details": { + "name": "Invoke" + }, + "params": [ + { + "typeid": "{03AAAB3F-5C47-5A66-9EBC-D5FA4DB353C9}", + "details": { + "name": "Function Resource Key" + } + }, + { + "typeid": "{03AAAB3F-5C47-5A66-9EBC-D5FA4DB353C9}", + "details": { + "name": "Payload" + } + } + ] + }, + { + "base": "InvokeRaw", + "context": "AWSScriptBehaviorLambda", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke InvokeRaw" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after InvokeRaw is invoked" + }, + "details": { + "name": "Invoke Raw" + }, + "params": [ + { + "typeid": "{03AAAB3F-5C47-5A66-9EBC-D5FA4DB353C9}", + "details": { + "name": "Function Name" + } + }, + { + "typeid": "{03AAAB3F-5C47-5A66-9EBC-D5FA4DB353C9}", + "details": { + "name": "Payload" + } + }, + { + "typeid": "{03AAAB3F-5C47-5A66-9EBC-D5FA4DB353C9}", + "details": { + "name": "Region" + } + } + ] + } + ] + } + ] +} \ No newline at end of file diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Classes/AWSScriptBehaviorS3.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Classes/AWSScriptBehaviorS3.names new file mode 100644 index 0000000000..c4dd1d5827 --- /dev/null +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Classes/AWSScriptBehaviorS3.names @@ -0,0 +1,155 @@ +{ + "entries": [ + { + "base": "AWSScriptBehaviorS3", + "context": "BehaviorClass", + "variant": "", + "details": { + "name": "AWS S3", + "category": "AWS Core" + }, + "methods": [ + { + "base": "GetObject", + "context": "AWSScriptBehaviorS3", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke GetObject" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after GetObject is invoked" + }, + "details": { + "name": "Get Object" + }, + "params": [ + { + "typeid": "{03AAAB3F-5C47-5A66-9EBC-D5FA4DB353C9}", + "details": { + "name": "Bucket Resource Key" + } + }, + { + "typeid": "{03AAAB3F-5C47-5A66-9EBC-D5FA4DB353C9}", + "details": { + "name": "Object Key" + } + }, + { + "typeid": "{03AAAB3F-5C47-5A66-9EBC-D5FA4DB353C9}", + "details": { + "name": "File" + } + } + ] + }, + { + "base": "GetObjectRaw", + "context": "AWSScriptBehaviorS3", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke GetObjectRaw" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after GetObjectRaw is invoked" + }, + "details": { + "name": "Get Object Raw" + }, + "params": [ + { + "typeid": "{03AAAB3F-5C47-5A66-9EBC-D5FA4DB353C9}", + "details": { + "name": "Bucket" + } + }, + { + "typeid": "{03AAAB3F-5C47-5A66-9EBC-D5FA4DB353C9}", + "details": { + "name": "Object Key" + } + }, + { + "typeid": "{03AAAB3F-5C47-5A66-9EBC-D5FA4DB353C9}", + "details": { + "name": "Region" + } + }, + { + "typeid": "{03AAAB3F-5C47-5A66-9EBC-D5FA4DB353C9}", + "details": { + "name": "File" + } + } + ] + }, + { + "base": "HeadObject", + "context": "AWSScriptBehaviorS3", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke HeadObject" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after HeadObject is invoked" + }, + "details": { + "name": "Head Object" + }, + "params": [ + { + "typeid": "{03AAAB3F-5C47-5A66-9EBC-D5FA4DB353C9}", + "details": { + "name": "Bucket Resource Key" + } + }, + { + "typeid": "{03AAAB3F-5C47-5A66-9EBC-D5FA4DB353C9}", + "details": { + "name": "OBject Key" + } + } + ] + }, + { + "base": "HeadObjectRaw", + "context": "AWSScriptBehaviorS3", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke HeadObjectRaw" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after HeadObjectRaw is invoked" + }, + "details": { + "name": "Head Object Raw" + }, + "params": [ + { + "typeid": "{03AAAB3F-5C47-5A66-9EBC-D5FA4DB353C9}", + "details": { + "name": "Bucket" + } + }, + { + "typeid": "{03AAAB3F-5C47-5A66-9EBC-D5FA4DB353C9}", + "details": { + "name": "Object Key" + } + }, + { + "typeid": "{03AAAB3F-5C47-5A66-9EBC-D5FA4DB353C9}", + "details": { + "name": "Region" + } + } + ] + } + ] + } + ] +} \ No newline at end of file diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Classes/AZ__SceneAPI__Containers__SceneGraph.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Classes/AZ__SceneAPI__Containers__SceneGraph.names new file mode 100644 index 0000000000..9526e9d8af --- /dev/null +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Classes/AZ__SceneAPI__Containers__SceneGraph.names @@ -0,0 +1,581 @@ +{ + "entries": [ + { + "base": "AZ::SceneAPI::Containers::SceneGraph", + "context": "BehaviorClass", + "variant": "", + "details": { + "name": "Scene Graph", + "category": "Scene Graph" + }, + "methods": [ + { + "base": "GetNodeChild", + "context": "AZ::SceneAPI::Containers::SceneGraph", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Get Node Child" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Get Node Child is invoked" + }, + "details": { + "name": "Get Node Child" + }, + "params": [ + { + "typeid": "{CAC6556D-D5FE-4D0E-BCCD-8940357C1D35}", + "details": { + "name": "Scene Graph" + } + }, + { + "typeid": "{4AD18037-E629-480D-8165-997A137327FD}", + "details": { + "name": "Node Index" + } + } + ], + "results": [ + { + "typeid": "{4AD18037-E629-480D-8165-997A137327FD}", + "details": { + "name": "Node Index" + } + } + ] + }, + { + "base": "FindWithPath", + "context": "AZ::SceneAPI::Containers::SceneGraph", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Find With Path" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Find With Path is invoked" + }, + "details": { + "name": "Find With Path" + }, + "params": [ + { + "typeid": "{CAC6556D-D5FE-4D0E-BCCD-8940357C1D35}", + "details": { + "name": "Scene Graph" + } + }, + { + "typeid": "{03AAAB3F-5C47-5A66-9EBC-D5FA4DB353C9}", + "details": { + "name": "Path" + } + } + ], + "results": [ + { + "typeid": "{4AD18037-E629-480D-8165-997A137327FD}", + "details": { + "name": "Node Index" + } + } + ] + }, + { + "base": "HasNodeChild", + "context": "AZ::SceneAPI::Containers::SceneGraph", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Has Node Child" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Has Node Child is invoked" + }, + "details": { + "name": "Has Node Child" + }, + "params": [ + { + "typeid": "{CAC6556D-D5FE-4D0E-BCCD-8940357C1D35}", + "details": { + "name": "Scene Graph" + } + }, + { + "typeid": "{4AD18037-E629-480D-8165-997A137327FD}", + "details": { + "name": "Node Index" + } + } + ], + "results": [ + { + "typeid": "{A0CA880C-AFE4-43CB-926C-59AC48496112}", + "details": { + "name": "Has Node Child" + } + } + ] + }, + { + "base": "HasNodeParent", + "context": "AZ::SceneAPI::Containers::SceneGraph", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Has Node Parent" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Has Node Parent is invoked" + }, + "details": { + "name": "Has Node Parent" + }, + "params": [ + { + "typeid": "{CAC6556D-D5FE-4D0E-BCCD-8940357C1D35}", + "details": { + "name": "Scene Graph" + } + }, + { + "typeid": "{4AD18037-E629-480D-8165-997A137327FD}", + "details": { + "name": "Node Index" + } + } + ], + "results": [ + { + "typeid": "{A0CA880C-AFE4-43CB-926C-59AC48496112}", + "details": { + "name": "Has Node Parent" + } + } + ] + }, + { + "base": "GetNodeSibling", + "context": "AZ::SceneAPI::Containers::SceneGraph", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Get Node Sibling" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Get Node Sibling is invoked" + }, + "details": { + "name": "Get Node Sibling" + }, + "params": [ + { + "typeid": "{CAC6556D-D5FE-4D0E-BCCD-8940357C1D35}", + "details": { + "name": "Scene Graph" + } + }, + { + "typeid": "{4AD18037-E629-480D-8165-997A137327FD}", + "details": { + "name": "Node Index" + } + } + ], + "results": [ + { + "typeid": "{4AD18037-E629-480D-8165-997A137327FD}", + "details": { + "name": "Node Index" + } + } + ] + }, + { + "base": "HasNodeSibling", + "context": "AZ::SceneAPI::Containers::SceneGraph", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Has Node Sibling" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Has Node Sibling is invoked" + }, + "details": { + "name": "Has Node Sibling" + }, + "params": [ + { + "typeid": "{CAC6556D-D5FE-4D0E-BCCD-8940357C1D35}", + "details": { + "name": "Scene Graph" + } + }, + { + "typeid": "{4AD18037-E629-480D-8165-997A137327FD}", + "details": { + "name": "Node Index" + } + } + ], + "results": [ + { + "typeid": "{A0CA880C-AFE4-43CB-926C-59AC48496112}", + "details": { + "name": "Has Node Sibling" + } + } + ] + }, + { + "base": "IsNodeEndPoint", + "context": "AZ::SceneAPI::Containers::SceneGraph", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Is Node End Point" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Is Node End Point is invoked" + }, + "details": { + "name": "Is Node End Point" + }, + "params": [ + { + "typeid": "{CAC6556D-D5FE-4D0E-BCCD-8940357C1D35}", + "details": { + "name": "Scene Graph" + } + }, + { + "typeid": "{4AD18037-E629-480D-8165-997A137327FD}", + "details": { + "name": "Node Index" + } + } + ], + "results": [ + { + "typeid": "{A0CA880C-AFE4-43CB-926C-59AC48496112}", + "details": { + "name": "Is Node End Point" + } + } + ] + }, + { + "base": "GetNodeCount", + "context": "AZ::SceneAPI::Containers::SceneGraph", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Get Node Count" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Get Node Count is invoked" + }, + "details": { + "name": "Get Node Count" + }, + "params": [ + { + "typeid": "{CAC6556D-D5FE-4D0E-BCCD-8940357C1D35}", + "details": { + "name": "Scene Graph" + } + } + ], + "results": [ + { + "typeid": "{D6597933-47CD-4FC8-B911-63F3E2B0993A}", + "details": { + "name": "Node Count" + } + } + ] + }, + { + "base": "HasNodeContent", + "context": "AZ::SceneAPI::Containers::SceneGraph", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Has Node Content" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Has Node Content is invoked" + }, + "details": { + "name": "Has Node Content" + }, + "params": [ + { + "typeid": "{CAC6556D-D5FE-4D0E-BCCD-8940357C1D35}", + "details": { + "name": "Scene Graph" + } + }, + { + "typeid": "{4AD18037-E629-480D-8165-997A137327FD}", + "details": { + "name": "Node Index" + } + } + ], + "results": [ + { + "typeid": "{A0CA880C-AFE4-43CB-926C-59AC48496112}", + "details": { + "name": "Has Node Content" + } + } + ] + }, + { + "base": "GetNodeContent", + "context": "AZ::SceneAPI::Containers::SceneGraph", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Get Node Content" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Get Node Content is invoked" + }, + "details": { + "name": "Get Node Content" + }, + "params": [ + { + "typeid": "{CAC6556D-D5FE-4D0E-BCCD-8940357C1D35}", + "details": { + "name": "Scene Graph" + } + }, + { + "typeid": "{4AD18037-E629-480D-8165-997A137327FD}", + "details": { + "name": "Node Index" + } + } + ], + "results": [ + { + "typeid": "{3EF0DDEC-C734-4804-BE99-82058FEBDA71}", + "details": { + "name": "Graph Object Proxy" + } + } + ] + }, + { + "base": "GetNodeName", + "context": "AZ::SceneAPI::Containers::SceneGraph", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Get Node Name" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Get Node Name is invoked" + }, + "details": { + "name": "Get Node Name" + }, + "params": [ + { + "typeid": "{CAC6556D-D5FE-4D0E-BCCD-8940357C1D35}", + "details": { + "name": "Scene Graph" + } + }, + { + "typeid": "{4AD18037-E629-480D-8165-997A137327FD}", + "details": { + "name": "Node Index" + } + } + ], + "results": [ + { + "typeid": "{4077AC3C-B301-4F5A-BEA7-54D6511AEC2E}", + "details": { + "name": "Node Name" + } + } + ] + }, + { + "base": "GetRoot", + "context": "AZ::SceneAPI::Containers::SceneGraph", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Get Root" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Get Root is invoked" + }, + "details": { + "name": "Get Root" + }, + "params": [ + { + "typeid": "{CAC6556D-D5FE-4D0E-BCCD-8940357C1D35}", + "details": { + "name": "Scene Graph" + } + } + ], + "results": [ + { + "typeid": "{4AD18037-E629-480D-8165-997A137327FD}", + "details": { + "name": "Node Index" + } + } + ] + }, + { + "base": "GetNodeSeperationCharacter", + "context": "AZ::SceneAPI::Containers::SceneGraph", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Get Node Separation Character" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Get Node Separation Character is invoked" + }, + "details": { + "name": "Get Node Separation Character" + }, + "results": [ + { + "typeid": "{3AB0037F-AF8D-48CE-BCA0-A170D18B2C03}", + "details": { + "name": "Separation Character" + } + } + ] + }, + { + "base": "GetNodeParent", + "context": "AZ::SceneAPI::Containers::SceneGraph", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Get Node Parent" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Get Node Parent is invoked" + }, + "details": { + "name": "Get Node Parent" + }, + "params": [ + { + "typeid": "{CAC6556D-D5FE-4D0E-BCCD-8940357C1D35}", + "details": { + "name": "Scene Graph" + } + }, + { + "typeid": "{4AD18037-E629-480D-8165-997A137327FD}", + "details": { + "name": "Node Index" + } + } + ], + "results": [ + { + "typeid": "{4AD18037-E629-480D-8165-997A137327FD}", + "details": { + "name": "Node Index" + } + } + ] + }, + { + "base": "FindWithRootAndPath", + "context": "AZ::SceneAPI::Containers::SceneGraph", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Find With Root And Path" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Find With Root And Path is invoked" + }, + "details": { + "name": "Find With Root And Path" + }, + "params": [ + { + "typeid": "{CAC6556D-D5FE-4D0E-BCCD-8940357C1D35}", + "details": { + "name": "Scene Graph" + } + }, + { + "typeid": "{4AD18037-E629-480D-8165-997A137327FD}", + "details": { + "name": "Node Index" + } + }, + { + "typeid": "{03AAAB3F-5C47-5A66-9EBC-D5FA4DB353C9}", + "details": { + "name": "Path" + } + } + ], + "results": [ + { + "typeid": "{4AD18037-E629-480D-8165-997A137327FD}", + "details": { + "name": "Node Index" + } + } + ] + }, + { + "base": "IsValidName", + "context": "AZ::SceneAPI::Containers::SceneGraph", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Is Valid Name" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Is Valid Name is invoked" + }, + "details": { + "name": "Is Valid Name" + }, + "params": [ + { + "typeid": "{3AB0037F-AF8D-48CE-BCA0-A170D18B2C03}", + "details": { + "name": "Name" + } + } + ], + "results": [ + { + "typeid": "{A0CA880C-AFE4-43CB-926C-59AC48496112}", + "details": { + "name": "Is Valid" + } + } + ] + } + ] + } + ] +} \ No newline at end of file diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Classes/AZ__SceneAPI__DataTypes__IMeshData__Face.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Classes/AZ__SceneAPI__DataTypes__IMeshData__Face.names new file mode 100644 index 0000000000..49dd69edf3 --- /dev/null +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Classes/AZ__SceneAPI__DataTypes__IMeshData__Face.names @@ -0,0 +1,52 @@ +{ + "entries": [ + { + "base": "AZ::SceneAPI::DataTypes::IMeshData::Face", + "context": "BehaviorClass", + "variant": "", + "details": { + "name": "Mesh Data Face", + "category": "Scene Graph" + }, + "methods": [ + { + "base": "GetVertexIndex", + "context": "AZ::SceneAPI::DataTypes::IMeshData::Face", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Get Vertex Index" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Get Vertex Index is invoked" + }, + "details": { + "name": "Get Vertex Index" + }, + "params": [ + { + "typeid": "{F9F49C1A-014F-46F5-A46F-B56D8CB46C2B}", + "details": { + "name": "Mesh Data Face" + } + }, + { + "typeid": "{72039442-EB38-4D42-A1AD-CB68F7E0EEF6}", + "details": { + "name": "Face Index" + } + } + ], + "results": [ + { + "typeid": "{43DA906B-7DEF-4CA8-9790-854106D3F983}", + "details": { + "name": "Index" + } + } + ] + } + ] + } + ] +} \ No newline at end of file diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Classes/AcesParameterOverrides.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Classes/AcesParameterOverrides.names new file mode 100644 index 0000000000..370d185ab1 --- /dev/null +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Classes/AcesParameterOverrides.names @@ -0,0 +1,318 @@ +{ + "entries": [ + { + "base": "AcesParameterOverrides", + "context": "BehaviorClass", + "variant": "", + "details": { + "name": "Aces Parameter Overrides", + "category": "Rendering" + }, + "methods": [ + { + "base": "LoadPreset", + "context": "AcesParameterOverrides", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Load Preset" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Load Preset is invoked" + }, + "details": { + "name": "Load Preset" + }, + "params": [ + { + "typeid": "{3EE8C0D4-3792-46C0-B91C-B89A81C36B91}", + "details": { + "name": "Aces Parameter Overrides" + } + } + ] + }, + { + "base": "GetOutputDeviceTransformType_4000Nits", + "details": { + "name": "Get Output Device Transform Type 4000 Nits" + }, + "results": [ + { + "typeid": "{72039442-EB38-4D42-A1AD-CB68F7E0EEF6}", + "details": { + "name": "int" + } + } + ] + }, + { + "base": "GetOutputDeviceTransformType_2000Nits", + "details": { + "name": "Get Output Device Transform Type 2000 Nits" + }, + "results": [ + { + "typeid": "{72039442-EB38-4D42-A1AD-CB68F7E0EEF6}", + "details": { + "name": "int" + } + } + ] + }, + { + "base": "GetapplyCATD60toD65", + "details": { + "name": "Get Apply CATD 60 to D65" + }, + "params": [ + { + "typeid": "{3EE8C0D4-3792-46C0-B91C-B89A81C36B91}", + "details": { + "name": "Aces Parameter Overrides" + } + } + ], + "results": [ + { + "typeid": "{A0CA880C-AFE4-43CB-926C-59AC48496112}", + "details": { + "name": "Result" + } + } + ] + }, + { + "base": "SetapplyCATD60toD65", + "details": { + "name": "Set Apply CATD 60 to D65" + }, + "params": [ + { + "typeid": "{3EE8C0D4-3792-46C0-B91C-B89A81C36B91}", + "details": { + "name": "Aces Parameter Overrides" + } + }, + { + "typeid": "{A0CA880C-AFE4-43CB-926C-59AC48496112}", + "details": { + "name": "Result" + } + } + ] + }, + { + "base": "GetOutputDeviceTransformType_48Nits", + "details": { + "name": "Get Output Device Transform Type 48 Nits" + }, + "results": [ + { + "typeid": "{72039442-EB38-4D42-A1AD-CB68F7E0EEF6}", + "details": { + "name": "int" + } + } + ] + }, + { + "base": "GetOutputDeviceTransformType_NumOutputDeviceTransformTypes", + "details": { + "name": "Get Output Device Transform Type Num Output Device Transform Types" + }, + "results": [ + { + "typeid": "{72039442-EB38-4D42-A1AD-CB68F7E0EEF6}", + "details": { + "name": "int" + } + } + ] + }, + { + "base": "GetOutputDeviceTransformType_1000Nits", + "details": { + "name": "Get Output Device Transform Type 1000 Nits" + }, + "results": [ + { + "typeid": "{72039442-EB38-4D42-A1AD-CB68F7E0EEF6}", + "details": { + "name": "int" + } + } + ] + }, + { + "base": "GetapplyDesaturation", + "details": { + "name": "Get Apply Desaturation" + }, + "params": [ + { + "typeid": "{3EE8C0D4-3792-46C0-B91C-B89A81C36B91}", + "details": { + "name": "Aces Parameter Overrides" + } + } + ], + "results": [ + { + "typeid": "{A0CA880C-AFE4-43CB-926C-59AC48496112}", + "details": { + "name": "Result" + } + } + ] + }, + { + "base": "SetapplyDesaturation", + "details": { + "name": "Setapply Desaturation" + }, + "params": [ + { + "typeid": "{3EE8C0D4-3792-46C0-B91C-B89A81C36B91}", + "details": { + "name": "Aces Parameter Overrides" + } + }, + { + "typeid": "{A0CA880C-AFE4-43CB-926C-59AC48496112}", + "details": { + "name": "Result" + } + } + ] + }, + { + "base": "Getpreset", + "details": { + "name": "Getpreset" + }, + "params": [ + { + "typeid": "{3EE8C0D4-3792-46C0-B91C-B89A81C36B91}", + "details": { + "name": "Aces Parameter Overrides" + } + } + ], + "results": [ + { + "typeid": "{B94085B7-C0D4-466A-A791-188A4559EC8D}", + "details": { + "name": "Result" + } + } + ] + }, + { + "base": "Setpreset", + "details": { + "name": "Setpreset" + }, + "params": [ + { + "typeid": "{3EE8C0D4-3792-46C0-B91C-B89A81C36B91}", + "details": { + "name": "Aces Parameter Overrides" + } + }, + { + "typeid": "{B94085B7-C0D4-466A-A791-188A4559EC8D}", + "details": { + "name": "Result" + } + } + ] + }, + { + "base": "GetalterSurround", + "details": { + "name": "Getalter Surround" + }, + "params": [ + { + "typeid": "{3EE8C0D4-3792-46C0-B91C-B89A81C36B91}", + "details": { + "name": "Aces Parameter Overrides" + } + } + ], + "results": [ + { + "typeid": "{A0CA880C-AFE4-43CB-926C-59AC48496112}", + "details": { + "name": "Result" + } + } + ] + }, + { + "base": "SetalterSurround", + "details": { + "name": "Setalter Surround" + }, + "params": [ + { + "typeid": "{3EE8C0D4-3792-46C0-B91C-B89A81C36B91}", + "details": { + "name": "Aces Parameter Overrides" + } + }, + { + "typeid": "{A0CA880C-AFE4-43CB-926C-59AC48496112}", + "details": { + "name": "Result" + } + } + ] + }, + { + "base": "GetoverrideDefaults", + "details": { + "name": "Getoverride Defaults" + }, + "params": [ + { + "typeid": "{3EE8C0D4-3792-46C0-B91C-B89A81C36B91}", + "details": { + "name": "Aces Parameter Overrides" + } + } + ], + "results": [ + { + "typeid": "{A0CA880C-AFE4-43CB-926C-59AC48496112}", + "details": { + "name": "Result" + } + } + ] + }, + { + "base": "SetoverrideDefaults", + "details": { + "name": "Setoverride Defaults" + }, + "params": [ + { + "typeid": "{3EE8C0D4-3792-46C0-B91C-B89A81C36B91}", + "details": { + "name": "Aces Parameter Overrides" + } + }, + { + "typeid": "{A0CA880C-AFE4-43CB-926C-59AC48496112}", + "details": { + "name": "Result" + } + } + ] + } + ] + } + ] +} \ No newline at end of file diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Classes/ActorComponent.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Classes/ActorComponent.names new file mode 100644 index 0000000000..b6092e23f7 --- /dev/null +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Classes/ActorComponent.names @@ -0,0 +1,12 @@ +{ + "entries": [ + { + "base": "ActorComponent", + "context": "BehaviorClass", + "variant": "", + "details": { + "name": "ActorComponent" + } + } + ] +} \ No newline at end of file diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Classes/AnimationData.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Classes/AnimationData.names new file mode 100644 index 0000000000..d026c998ba --- /dev/null +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Classes/AnimationData.names @@ -0,0 +1,12 @@ +{ + "entries": [ + { + "base": "AnimationData", + "context": "BehaviorClass", + "variant": "", + "details": { + "name": "AnimationData" + } + } + ] +} \ No newline at end of file diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Classes/AssetData.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Classes/AssetData.names new file mode 100644 index 0000000000..c9a8cfe791 --- /dev/null +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Classes/AssetData.names @@ -0,0 +1,177 @@ +{ + "entries": [ + { + "base": "AssetData", + "context": "BehaviorClass", + "variant": "", + "details": { + "name": "Asset Data", + "category": "Asset" + }, + "methods": [ + { + "base": "GetUseCount", + "context": "AssetData", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Get Use Count" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Get Use Count is invoked" + }, + "details": { + "name": "Get Use Count" + }, + "params": [ + { + "typeid": "{AF3F7D32-1536-422A-89F3-A11E1F5B5A9C}", + "details": { + "name": "Asset Data" + } + } + ], + "results": [ + { + "typeid": "{72039442-EB38-4D42-A1AD-CB68F7E0EEF6}", + "details": { + "name": "Use Count" + } + } + ] + }, + { + "base": "IsLoading", + "context": "AssetData", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Is Loading" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Is Loading is invoked" + }, + "details": { + "name": "Is Loading", + "category": "Other" + }, + "params": [ + { + "typeid": "{AF3F7D32-1536-422A-89F3-A11E1F5B5A9C}", + "details": { + "name": "Asset Data" + } + }, + { + "typeid": "{A0CA880C-AFE4-43CB-926C-59AC48496112}", + "details": { + "name": "Include Queued" + } + } + ], + "results": [ + { + "typeid": "{A0CA880C-AFE4-43CB-926C-59AC48496112}", + "details": { + "name": "Is Loading" + } + } + ] + }, + { + "base": "IsError", + "context": "AssetData", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Is Error" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Is Error is invoked" + }, + "details": { + "name": "Is Error" + }, + "params": [ + { + "typeid": "{AF3F7D32-1536-422A-89F3-A11E1F5B5A9C}", + "details": { + "name": "Asset Data" + } + } + ], + "results": [ + { + "typeid": "{A0CA880C-AFE4-43CB-926C-59AC48496112}", + "details": { + "name": "Is Error" + } + } + ] + }, + { + "base": "IsReady", + "context": "AssetData", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Is Ready" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Is Ready is invoked" + }, + "details": { + "name": "Is Ready" + }, + "params": [ + { + "typeid": "{AF3F7D32-1536-422A-89F3-A11E1F5B5A9C}", + "details": { + "name": "Asset Data" + } + } + ], + "results": [ + { + "typeid": "{A0CA880C-AFE4-43CB-926C-59AC48496112}", + "details": { + "name": "Is Ready" + } + } + ] + }, + { + "base": "GetId", + "context": "AssetData", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Get Id" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Get Id is invoked" + }, + "details": { + "name": "Get Id" + }, + "params": [ + { + "typeid": "{AF3F7D32-1536-422A-89F3-A11E1F5B5A9C}", + "details": { + "name": "Asset Data" + } + } + ], + "results": [ + { + "typeid": "{652ED536-3402-439B-AEBE-4A5DBC554085}", + "details": { + "name": "Asset Id" + } + } + ] + } + ] + } + ] +} \ No newline at end of file diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Classes/AssetId.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Classes/AssetId.names new file mode 100644 index 0000000000..18c20bbd5a --- /dev/null +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Classes/AssetId.names @@ -0,0 +1,145 @@ +{ + "entries": [ + { + "base": "AssetId", + "context": "BehaviorClass", + "variant": "", + "details": { + "name": "Asset Id", + "category": "Asset" + }, + "methods": [ + { + "base": "CreateString", + "context": "AssetId", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke CreateString" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after CreateString is invoked" + }, + "details": { + "name": "Create String" + }, + "params": [ + { + "typeid": "{7114E998-A8B4-519B-9342-A86D1587B4F7}", + "details": { + "name": "String" + } + } + ], + "results": [ + { + "typeid": "{652ED536-3402-439B-AEBE-4A5DBC554085}", + "details": { + "name": "Asset Id" + } + } + ] + }, + { + "base": "IsValid", + "context": "AssetId", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke IsValid" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after IsValid is invoked" + }, + "details": { + "name": "Is Valid" + }, + "params": [ + { + "typeid": "{652ED536-3402-439B-AEBE-4A5DBC554085}", + "details": { + "name": "Asset Id" + } + } + ], + "results": [ + { + "typeid": "{A0CA880C-AFE4-43CB-926C-59AC48496112}", + "details": { + "name": "Is Valid" + } + } + ] + }, + { + "base": "ToString", + "context": "AssetId", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke ToString" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after ToString is invoked" + }, + "details": { + "name": "To String" + }, + "params": [ + { + "typeid": "{652ED536-3402-439B-AEBE-4A5DBC554085}", + "details": { + "name": "Asset Id" + } + } + ], + "results": [ + { + "typeid": "{03AAAB3F-5C47-5A66-9EBC-D5FA4DB353C9}", + "details": { + "name": "String" + } + } + ] + }, + { + "base": "IsEqual", + "context": "AssetId", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke IsEqual" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after IsEqual is invoked" + }, + "details": { + "name": "Is Equal" + }, + "params": [ + { + "typeid": "{652ED536-3402-439B-AEBE-4A5DBC554085}", + "details": { + "name": "Asset Id" + } + }, + { + "typeid": "{652ED536-3402-439B-AEBE-4A5DBC554085}", + "details": { + "name": "Asset Id" + } + } + ], + "results": [ + { + "typeid": "{A0CA880C-AFE4-43CB-926C-59AC48496112}", + "details": { + "name": "Equal" + } + } + ] + } + ] + } + ] +} \ No newline at end of file diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Classes/AssetInfo.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Classes/AssetInfo.names new file mode 100644 index 0000000000..db6fe2d2e3 --- /dev/null +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Classes/AssetInfo.names @@ -0,0 +1,102 @@ +{ + "entries": [ + { + "base": "AssetInfo", + "context": "BehaviorClass", + "variant": "", + "details": { + "name": "Asset Info" + }, + "methods": [ + { + "base": "GetassetId", + "details": { + "name": "Get Asset Id" + }, + "params": [ + { + "typeid": "{E6D8372B-8419-4287-B478-1353709A972F}", + "details": { + "name": "Asset Info" + } + } + ], + "results": [ + { + "typeid": "{652ED536-3402-439B-AEBE-4A5DBC554085}", + "details": { + "name": "Asset Id" + } + } + ] + }, + { + "base": "GetassetType", + "details": { + "name": "Get Asset Type" + }, + "params": [ + { + "typeid": "{E6D8372B-8419-4287-B478-1353709A972F}", + "details": { + "name": "Asset Info" + } + } + ], + "results": [ + { + "typeid": "{E152C105-A133-4D03-BBF8-3D4B2FBA3E2A}", + "details": { + "name": "Type" + } + } + ] + }, + { + "base": "GetsizeBytes", + "details": { + "name": "Get Size Bytes" + }, + "params": [ + { + "typeid": "{E6D8372B-8419-4287-B478-1353709A972F}", + "details": { + "name": "Asset Info" + } + } + ], + "results": [ + { + "typeid": "{D6597933-47CD-4FC8-B911-63F3E2B0993A}", + "details": { + "name": "Size" + } + } + ] + }, + { + "base": "GetrelativePath", + "details": { + "name": "Get Relative Path" + }, + "params": [ + { + "typeid": "{E6D8372B-8419-4287-B478-1353709A972F}", + "details": { + "name": "Asset Info" + } + } + ], + "results": [ + { + "typeid": "{03AAAB3F-5C47-5A66-9EBC-D5FA4DB353C9}", + "details": { + "name": "Relative Path" + } + } + ] + } + ] + } + ] +} \ No newline at end of file diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Classes/AtomToolsDocumentSystemSettings.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Classes/AtomToolsDocumentSystemSettings.names new file mode 100644 index 0000000000..b5c7982730 --- /dev/null +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Classes/AtomToolsDocumentSystemSettings.names @@ -0,0 +1,57 @@ +{ + "entries": [ + { + "base": "AtomToolsDocumentSystemSettings", + "context": "BehaviorClass", + "variant": "", + "details": { + "name": "Document System Settings", + "category": "Atom Tools" + }, + "methods": [ + { + "base": "GetshowReloadDocumentPrompt", + "details": { + "name": "Get Show Reload Document Prompt" + }, + "params": [ + { + "typeid": "{9E576D4F-A74A-4326-9135-C07284D0A3B9}", + "details": { + "name": "Document System Settings" + } + } + ], + "results": [ + { + "typeid": "{A0CA880C-AFE4-43CB-926C-59AC48496112}", + "details": { + "name": "Enabled" + } + } + ] + }, + { + "base": "SetshowReloadDocumentPrompt", + "details": { + "name": "Set Show Reload Document Prompt" + }, + "params": [ + { + "typeid": "{9E576D4F-A74A-4326-9135-C07284D0A3B9}", + "details": { + "name": "Document System Settings" + } + }, + { + "typeid": "{A0CA880C-AFE4-43CB-926C-59AC48496112}", + "details": { + "name": "Enabled" + } + } + ] + } + ] + } + ] +} \ No newline at end of file diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Classes/AuthenticationTokens.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Classes/AuthenticationTokens.names new file mode 100644 index 0000000000..c041aa00ff --- /dev/null +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Classes/AuthenticationTokens.names @@ -0,0 +1,145 @@ +{ + "entries": [ + { + "base": "AuthenticationTokens", + "context": "BehaviorClass", + "variant": "", + "details": { + "name": "Authentication Tokens", + "category": "AWS Client Auth" + }, + "methods": [ + { + "base": "GetAccessToken", + "details": { + "name": "Get Access Token" + }, + "params": [ + { + "typeid": "{F965D1B2-9DE3-4900-B44B-E58D9F083ACB}", + "details": { + "name": "Authentication Tokens" + } + } + ], + "results": [ + { + "typeid": "{03AAAB3F-5C47-5A66-9EBC-D5FA4DB353C9}", + "details": { + "name": "Access Token" + } + } + ] + }, + { + "base": "SetAccessToken", + "details": { + "name": "Set Access Token" + }, + "params": [ + { + "typeid": "{F965D1B2-9DE3-4900-B44B-E58D9F083ACB}", + "details": { + "name": "Authentication Tokens" + } + }, + { + "typeid": "{03AAAB3F-5C47-5A66-9EBC-D5FA4DB353C9}", + "details": { + "name": "Access Token" + } + } + ] + }, + { + "base": "GetOpenIdToken", + "context": "getter", + "details": { + "name": "Get OpenId Token" + }, + "params": [ + { + "typeid": "{F965D1B2-9DE3-4900-B44B-E58D9F083ACB}", + "details": { + "name": "Authentication Token" + } + } + ], + "results": [ + { + "typeid": "{03AAAB3F-5C47-5A66-9EBC-D5FA4DB353C9}", + "details": { + "name": "OpenId Token" + } + } + ] + }, + { + "base": "SetOpenIdToken", + "context": "setter", + "details": { + "name": "Set OpenId Token" + }, + "params": [ + { + "typeid": "{F965D1B2-9DE3-4900-B44B-E58D9F083ACB}", + "details": { + "name": "Authentication Token" + } + }, + { + "typeid": "{03AAAB3F-5C47-5A66-9EBC-D5FA4DB353C9}", + "details": { + "name": "OpenId Token" + } + } + ] + }, + { + "base": "GetRefreshToken", + "context": "getter", + "details": { + "name": "Get Refresh Token" + }, + "params": [ + { + "typeid": "{F965D1B2-9DE3-4900-B44B-E58D9F083ACB}", + "details": { + "name": "Authentication Token" + } + } + ], + "results": [ + { + "typeid": "{03AAAB3F-5C47-5A66-9EBC-D5FA4DB353C9}", + "details": { + "name": "Refresh Token" + } + } + ] + }, + { + "base": "SetRefreshToken", + "context": "setter", + "details": { + "name": "Set Refresh Token" + }, + "params": [ + { + "typeid": "{F965D1B2-9DE3-4900-B44B-E58D9F083ACB}", + "details": { + "name": "Authentication Token" + } + }, + { + "typeid": "{03AAAB3F-5C47-5A66-9EBC-D5FA4DB353C9}", + "details": { + "name": "Refresh Token" + } + } + ] + } + ] + } + ] +} \ No newline at end of file diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Classes/AxisType.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Classes/AxisType.names new file mode 100644 index 0000000000..c5fc0fe1f3 --- /dev/null +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Classes/AxisType.names @@ -0,0 +1,99 @@ +{ + "entries": [ + { + "base": "AxisType", + "context": "BehaviorClass", + "variant": "", + "details": { + "name": "Axis Type", + "category": "Constants" + }, + "methods": [ + { + "base": "GetZNegative", + "details": { + "name": "Get -Z" + }, + "results": [ + { + "typeid": "{72B9409A-7D1A-4831-9CFE-FCB3FADD3426}", + "details": { + "name": "-Z" + } + } + ] + }, + { + "base": "GetZPositive", + "details": { + "name": "Get +Z" + }, + "results": [ + { + "typeid": "{72B9409A-7D1A-4831-9CFE-FCB3FADD3426}", + "details": { + "name": "+Z" + } + } + ] + }, + { + "base": "GetYPositive", + "details": { + "name": "Get +Y" + }, + "results": [ + { + "typeid": "{72B9409A-7D1A-4831-9CFE-FCB3FADD3426}", + "details": { + "name": "+Y" + } + } + ] + }, + { + "base": "GetXNegative", + "details": { + "name": "Get -X" + }, + "results": [ + { + "typeid": "{72B9409A-7D1A-4831-9CFE-FCB3FADD3426}", + "details": { + "name": "-X" + } + } + ] + }, + { + "base": "GetXPositive", + "details": { + "name": "Get +X" + }, + "results": [ + { + "typeid": "{72B9409A-7D1A-4831-9CFE-FCB3FADD3426}", + "details": { + "name": "+X" + } + } + ] + }, + { + "base": "GetYNegative", + "details": { + "name": "Get -Y" + }, + "results": [ + { + "typeid": "{72B9409A-7D1A-4831-9CFE-FCB3FADD3426}", + "details": { + "name": "-Y" + } + } + ] + } + ] + } + ] +} \ No newline at end of file diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Classes/AzFramework__SurfaceData__SurfacePoint.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Classes/AzFramework__SurfaceData__SurfacePoint.names new file mode 100644 index 0000000000..b78273d630 --- /dev/null +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Classes/AzFramework__SurfaceData__SurfacePoint.names @@ -0,0 +1,141 @@ +{ + "entries": [ + { + "base": "AzFramework::SurfaceData::SurfacePoint", + "context": "BehaviorClass", + "variant": "", + "details": { + "name": "Surface Point", + "category": "Surface Data" + }, + "methods": [ + { + "base": "Getposition", + "details": { + "name": "Get Position" + }, + "params": [ + { + "typeid": "{331A3D0E-BB1D-47BF-96A2-249FAA0D720D}", + "details": { + "name": "Surface Point" + } + } + ], + "results": [ + { + "typeid": "{8379EB7D-01FA-4538-B64B-A6543B4BE73D}", + "details": { + "name": "Position" + } + } + ] + }, + { + "base": "Setposition", + "details": { + "name": "Set Position" + }, + "params": [ + { + "typeid": "{331A3D0E-BB1D-47BF-96A2-249FAA0D720D}", + "details": { + "name": "Surface Point" + } + }, + { + "typeid": "{8379EB7D-01FA-4538-B64B-A6543B4BE73D}", + "details": { + "name": "Position" + } + } + ] + }, + { + "base": "Getnormal", + "details": { + "name": "Get Normal" + }, + "params": [ + { + "typeid": "{331A3D0E-BB1D-47BF-96A2-249FAA0D720D}", + "details": { + "name": "Surface Point" + } + } + ], + "results": [ + { + "typeid": "{8379EB7D-01FA-4538-B64B-A6543B4BE73D}", + "details": { + "name": "Normal" + } + } + ] + }, + { + "base": "Setnormal", + "details": { + "name": "Set Normal" + }, + "params": [ + { + "typeid": "{331A3D0E-BB1D-47BF-96A2-249FAA0D720D}", + "details": { + "name": "Surface Point" + } + }, + { + "typeid": "{8379EB7D-01FA-4538-B64B-A6543B4BE73D}", + "details": { + "name": "Normal" + } + } + ] + }, + { + "base": "GetsurfaceTags", + "details": { + "name": "Get Surface Tags" + }, + "params": [ + { + "typeid": "{331A3D0E-BB1D-47BF-96A2-249FAA0D720D}", + "details": { + "name": "Surface Point" + } + } + ], + "results": [ + { + "typeid": "{8F60B4D4-06F0-577C-AFB9-ECBFA7B66D4E}", + "details": { + "name": "Surface Tags" + } + } + ] + }, + { + "base": "SetsurfaceTags", + "details": { + "name": "Set Surface Tags" + }, + "params": [ + { + "typeid": "{331A3D0E-BB1D-47BF-96A2-249FAA0D720D}", + "details": { + "name": "Surface Point" + } + }, + { + "typeid": "{8F60B4D4-06F0-577C-AFB9-ECBFA7B66D4E}", + "details": { + "name": "Surface Tags" + } + } + ] + } + ] + } + ] +} \ No newline at end of file diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Classes/BlastActorData.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Classes/BlastActorData.names new file mode 100644 index 0000000000..04aa2f21c2 --- /dev/null +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Classes/BlastActorData.names @@ -0,0 +1,105 @@ +{ + "entries": [ + { + "base": "BlastActorData", + "context": "BehaviorClass", + "variant": "", + "details": { + "name": "Actor Data", + "category": "Blast" + }, + "methods": [ + { + "base": "GetEntityId", + "details": { + "name": "Get Entity Id" + }, + "params": [ + { + "typeid": "{A23453D5-79A8-49C8-B9F0-9CC35D711DD4}", + "details": { + "name": "Blast Actor Data*", + "tooltip": "Represents Blast Actor in a Script Canvas friendly format." + } + } + ], + "results": [ + { + "typeid": "{6383F1D3-BB27-4E6B-A49A-6409B2059EAA}", + "details": { + "name": "Entity Id", + "tooltip": "Entity Unique Id" + } + } + ] + }, + { + "base": "SetEntityId", + "details": { + "name": "Set Entity Id" + }, + "params": [ + { + "typeid": "{A23453D5-79A8-49C8-B9F0-9CC35D711DD4}", + "details": { + "name": "Blast Actor Data*", + "tooltip": "Represents Blast Actor in a Script Canvas friendly format." + } + }, + { + "typeid": "{6383F1D3-BB27-4E6B-A49A-6409B2059EAA}", + "details": { + "name": "Entity Id", + "tooltip": "Entity Unique Id" + } + } + ] + }, + { + "base": "GetIsStatic", + "details": { + "name": "Get Is Static" + }, + "params": [ + { + "typeid": "{A23453D5-79A8-49C8-B9F0-9CC35D711DD4}", + "details": { + "name": "Blast Actor Data*", + "tooltip": "Represents Blast Actor in a Script Canvas friendly format." + } + } + ], + "results": [ + { + "typeid": "{A0CA880C-AFE4-43CB-926C-59AC48496112}", + "details": { + "name": "Is Static" + } + } + ] + }, + { + "base": "SetIsStatic", + "details": { + "name": "Set Is Static" + }, + "params": [ + { + "typeid": "{A23453D5-79A8-49C8-B9F0-9CC35D711DD4}", + "details": { + "name": "Blast Actor Data*", + "tooltip": "Represents Blast Actor in a Script Canvas friendly format." + } + }, + { + "typeid": "{A0CA880C-AFE4-43CB-926C-59AC48496112}", + "details": { + "name": "Is Static" + } + } + ] + } + ] + } + ] +} \ No newline at end of file diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Classes/BlendShapeAnimationData.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Classes/BlendShapeAnimationData.names new file mode 100644 index 0000000000..61b54272a5 --- /dev/null +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Classes/BlendShapeAnimationData.names @@ -0,0 +1,12 @@ +{ + "entries": [ + { + "base": "BlendShapeAnimationData", + "context": "BehaviorClass", + "variant": "", + "details": { + "name": "BlendShapeAnimationData" + } + } + ] +} \ No newline at end of file diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Classes/BlendShapeData.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Classes/BlendShapeData.names new file mode 100644 index 0000000000..b83eb56d2a --- /dev/null +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Classes/BlendShapeData.names @@ -0,0 +1,175 @@ +{ + "entries": [ + { + "base": "BlendShapeData", + "context": "BehaviorClass", + "variant": "", + "details": { + "name": "Blend Shape Data", + "category": "Rendering" + }, + "methods": [ + { + "base": "GetUV", + "context": "BlendShapeData", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Get UV" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Get UV is invoked" + }, + "details": { + "name": "Get UV" + }, + "params": [ + { + "typeid": "{FF875C22-2E4F-4CE3-BA49-09BF78C70A09}", + "details": { + "name": "Blend Shape Data" + } + }, + { + "typeid": "{43DA906B-7DEF-4CA8-9790-854106D3F983}", + "details": { + "name": "Vertex Index" + } + }, + { + "typeid": "{43DA906B-7DEF-4CA8-9790-854106D3F983}", + "details": { + "name": "UV Set Index" + } + } + ], + "results": [ + { + "typeid": "{3D80F623-C85C-4741-90D0-E4E66164E6BF}", + "details": { + "name": "UV" + } + } + ] + }, + { + "base": "GetTangent", + "context": "BlendShapeData", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Get Tangent" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Get Tangent is invoked" + }, + "details": { + "name": "Get Tangent" + }, + "params": [ + { + "typeid": "{FF875C22-2E4F-4CE3-BA49-09BF78C70A09}", + "details": { + "name": "Blend Shape Data" + } + }, + { + "typeid": "{D6597933-47CD-4FC8-B911-63F3E2B0993A}", + "details": { + "name": "Index" + } + } + ], + "results": [ + { + "typeid": "{0CE9FA36-1E3A-4C06-9254-B7C73A732053}", + "details": { + "name": "Tangents" + } + } + ] + }, + { + "base": "GetBitangent", + "context": "BlendShapeData", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Get Bitangent" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Get Bitangent is invoked" + }, + "details": { + "name": "Get Bi-Tangent" + }, + "params": [ + { + "typeid": "{FF875C22-2E4F-4CE3-BA49-09BF78C70A09}", + "details": { + "name": "Blend Shape Data" + } + }, + { + "typeid": "{D6597933-47CD-4FC8-B911-63F3E2B0993A}", + "details": { + "name": "Index" + } + } + ], + "results": [ + { + "typeid": "{8379EB7D-01FA-4538-B64B-A6543B4BE73D}", + "details": { + "name": "Bi-Tangent" + } + } + ] + }, + { + "base": "GetColor", + "context": "BlendShapeData", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Get Color" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Get Color is invoked" + }, + "details": { + "name": "Get Color" + }, + "params": [ + { + "typeid": "{FF875C22-2E4F-4CE3-BA49-09BF78C70A09}", + "details": { + "name": "Blend Shape Data" + } + }, + { + "typeid": "{72B9409A-7D1A-4831-9CFE-FCB3FADD3426}", + "details": { + "name": "Color Set Index" + } + }, + { + "typeid": "{72B9409A-7D1A-4831-9CFE-FCB3FADD3426}", + "details": { + "name": "Color Index" + } + } + ], + "results": [ + { + "typeid": "{937E3BF8-5204-4D40-A8DA-C8F083C89F9F}", + "details": { + "name": "Color" + } + } + ] + } + ] + } + ] +} \ No newline at end of file diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Classes/BlendShapeDataFace.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Classes/BlendShapeDataFace.names new file mode 100644 index 0000000000..b7bee4aee2 --- /dev/null +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Classes/BlendShapeDataFace.names @@ -0,0 +1,52 @@ +{ + "entries": [ + { + "base": "BlendShapeDataFace", + "context": "BehaviorClass", + "variant": "", + "details": { + "name": "Blend Shape Data Face", + "category": "Rendering" + }, + "methods": [ + { + "base": "GetVertexIndex", + "context": "BlendShapeDataFace", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Get Vertex Index" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Get Vertex Index is invoked" + }, + "details": { + "name": "Get Vertex Index" + }, + "params": [ + { + "typeid": "{C972EC9A-3A5C-47CD-9A92-ECB4C0C0451C}", + "details": { + "name": "Blend Shape Data Face" + } + }, + { + "typeid": "{72039442-EB38-4D42-A1AD-CB68F7E0EEF6}", + "details": { + "name": "Face Index" + } + } + ], + "results": [ + { + "typeid": "{43DA906B-7DEF-4CA8-9790-854106D3F983}", + "details": { + "name": "Vertex Index" + } + } + ] + } + ] + } + ] +} \ No newline at end of file diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Classes/BoxShapeConfig.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Classes/BoxShapeConfig.names new file mode 100644 index 0000000000..67818b0d8d --- /dev/null +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Classes/BoxShapeConfig.names @@ -0,0 +1,59 @@ +{ + "entries": [ + { + "base": "BoxShapeConfig", + "context": "BehaviorClass", + "variant": "", + "details": { + "name": "Box Shape Config", + "category": "Rendering/Shapes" + }, + "methods": [ + { + "base": "GetDimensions", + "details": { + "name": "Get Dimensions" + }, + "params": [ + { + "typeid": "{F034FBA2-AC2F-4E66-8152-14DFB90D6283}", + "details": { + "name": "Box Shape Config", + "tooltip": "Box shape configuration parameters" + } + } + ], + "results": [ + { + "typeid": "{8379EB7D-01FA-4538-B64B-A6543B4BE73D}", + "details": { + "name": "Dimensions" + } + } + ] + }, + { + "base": "SetDimensions", + "details": { + "name": "Set Dimensions" + }, + "params": [ + { + "typeid": "{F034FBA2-AC2F-4E66-8152-14DFB90D6283}", + "details": { + "name": "Box Shape Config", + "tooltip": "Box shape configuration parameters" + } + }, + { + "typeid": "{8379EB7D-01FA-4538-B64B-A6543B4BE73D}", + "details": { + "name": "Dimensions" + } + } + ] + } + ] + } + ] +} \ No newline at end of file diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Classes/CameraComponent.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Classes/CameraComponent.names new file mode 100644 index 0000000000..7a687e359e --- /dev/null +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Classes/CameraComponent.names @@ -0,0 +1,12 @@ +{ + "entries": [ + { + "base": "CameraComponent", + "context": "BehaviorClass", + "variant": "", + "details": { + "name": "CameraComponent" + } + } + ] +} \ No newline at end of file diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Classes/CapsuleShapeConfig.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Classes/CapsuleShapeConfig.names new file mode 100644 index 0000000000..8b96624e57 --- /dev/null +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Classes/CapsuleShapeConfig.names @@ -0,0 +1,103 @@ +{ + "entries": [ + { + "base": "CapsuleShapeConfig", + "context": "BehaviorClass", + "variant": "", + "details": { + "name": "Capsule Shape Config", + "category": "Rendering/Shapes" + }, + "methods": [ + { + "base": "GetHeight", + "details": { + "name": "Get Height" + }, + "params": [ + { + "typeid": "{00931AEB-2AD8-42CE-B1DC-FA4332F51501}", + "details": { + "name": "Capsule Shape Config", + "tooltip": "Capsule shape configuration parameters" + } + } + ], + "results": [ + { + "typeid": "{EA2C3E90-AFBE-44D4-A90D-FAAF79BAF93D}", + "details": { + "name": "Height" + } + } + ] + }, + { + "base": "SetHeight", + "details": { + "name": "Set Height" + }, + "params": [ + { + "typeid": "{00931AEB-2AD8-42CE-B1DC-FA4332F51501}", + "details": { + "name": "Capsule Shape Config", + "tooltip": "Capsule shape configuration parameters" + } + }, + { + "typeid": "{EA2C3E90-AFBE-44D4-A90D-FAAF79BAF93D}", + "details": { + "name": "Height" + } + } + ] + }, + { + "base": "GetRadius", + "details": { + "name": "Get Radius" + }, + "params": [ + { + "typeid": "{00931AEB-2AD8-42CE-B1DC-FA4332F51501}", + "details": { + "name": "Capsule Shape Config", + "tooltip": "Capsule shape configuration parameters" + } + } + ], + "results": [ + { + "typeid": "{EA2C3E90-AFBE-44D4-A90D-FAAF79BAF93D}", + "details": { + "name": "Radius" + } + } + ] + }, + { + "base": "SetRadius", + "details": { + "name": "Set Radius" + }, + "params": [ + { + "typeid": "{00931AEB-2AD8-42CE-B1DC-FA4332F51501}", + "details": { + "name": "Capsule Shape Config", + "tooltip": "Capsule shape configuration parameters" + } + }, + { + "typeid": "{EA2C3E90-AFBE-44D4-A90D-FAAF79BAF93D}", + "details": { + "name": "Radius" + } + } + ] + } + ] + } + ] +} \ No newline at end of file diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Classes/ClientAuthAWSCredentials.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Classes/ClientAuthAWSCredentials.names new file mode 100644 index 0000000000..da4fd03629 --- /dev/null +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Classes/ClientAuthAWSCredentials.names @@ -0,0 +1,141 @@ +{ + "entries": [ + { + "base": "ClientAuthAWSCredentials", + "context": "BehaviorClass", + "variant": "", + "details": { + "name": "AWS Client Auth Credentials", + "category": "AWS Client Auth" + }, + "methods": [ + { + "base": "GetAWSAccessKeyId", + "details": { + "name": "Get AWS Access Key Id" + }, + "params": [ + { + "typeid": "{02FB32C4-B94E-4084-9049-3DF32F87BD76}", + "details": { + "name": "AWS ClientAuth Credentials" + } + } + ], + "results": [ + { + "typeid": "{03AAAB3F-5C47-5A66-9EBC-D5FA4DB353C9}", + "details": { + "name": "AWS Access Key Id" + } + } + ] + }, + { + "base": "SetAWSAccessKeyId", + "details": { + "name": "Set AWS Access Key Id" + }, + "params": [ + { + "typeid": "{02FB32C4-B94E-4084-9049-3DF32F87BD76}", + "details": { + "name": "AWS ClientAuth Credentials" + } + }, + { + "typeid": "{03AAAB3F-5C47-5A66-9EBC-D5FA4DB353C9}", + "details": { + "name": "AWS Access Key Id" + } + } + ] + }, + { + "base": "GetAWSSecretKey", + "details": { + "name": "Get AWS Secret Key" + }, + "params": [ + { + "typeid": "{02FB32C4-B94E-4084-9049-3DF32F87BD76}", + "details": { + "name": "AWS ClientAuth Credentials" + } + } + ], + "results": [ + { + "typeid": "{03AAAB3F-5C47-5A66-9EBC-D5FA4DB353C9}", + "details": { + "name": "AWS Secret Key" + } + } + ] + }, + { + "base": "SetAWSSecretKey", + "details": { + "name": "Set AWS Secret Key" + }, + "params": [ + { + "typeid": "{02FB32C4-B94E-4084-9049-3DF32F87BD76}", + "details": { + "name": "AWS ClientAuth Credentials" + } + }, + { + "typeid": "{03AAAB3F-5C47-5A66-9EBC-D5FA4DB353C9}", + "details": { + "name": "AWS Secret Key" + } + } + ] + }, + { + "base": "GetAWSSessionToken", + "details": { + "name": "Get AWS Session Token" + }, + "params": [ + { + "typeid": "{02FB32C4-B94E-4084-9049-3DF32F87BD76}", + "details": { + "name": "AWS ClientAuth Credentials" + } + } + ], + "results": [ + { + "typeid": "{03AAAB3F-5C47-5A66-9EBC-D5FA4DB353C9}", + "details": { + "name": "AWS Session Token" + } + } + ] + }, + { + "base": "SetAWSSessionToken", + "details": { + "name": "Set AWS Session Token" + }, + "params": [ + { + "typeid": "{02FB32C4-B94E-4084-9049-3DF32F87BD76}", + "details": { + "name": "AWS ClientAuth Credentials" + } + }, + { + "typeid": "{03AAAB3F-5C47-5A66-9EBC-D5FA4DB353C9}", + "details": { + "name": "AWS Session Token" + } + } + ] + } + ] + } + ] +} \ No newline at end of file diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Classes/CollisionEvent.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Classes/CollisionEvent.names new file mode 100644 index 0000000000..5d4d37d1f3 --- /dev/null +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Classes/CollisionEvent.names @@ -0,0 +1,100 @@ +{ + "entries": [ + { + "base": "CollisionEvent", + "context": "BehaviorClass", + "variant": "", + "details": { + "name": "Collision Event" + }, + "methods": [ + { + "base": "GetBody1EntityId", + "context": "CollisionEvent", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Get Body 1 Entity Id" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Get Body 1 Entity Id is invoked" + }, + "details": { + "name": "Get Body 1 Entity Id" + }, + "params": [ + { + "typeid": "{7602AA36-792C-4BDC-BDF8-AA16792151A3}", + "details": { + "name": "Collision Event" + } + } + ], + "results": [ + { + "typeid": "{6383F1D3-BB27-4E6B-A49A-6409B2059EAA}", + "details": { + "name": "Entity Id", + "tooltip": "Entity Unique Id" + } + } + ] + }, + { + "base": "GetBody2EntityId", + "context": "CollisionEvent", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Get Body 2 Entity Id" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Get Body 2 Entity Id is invoked" + }, + "details": { + "name": "Get Body 2 Entity Id" + }, + "params": [ + { + "typeid": "{7602AA36-792C-4BDC-BDF8-AA16792151A3}", + "details": { + "name": "Collision Event" + } + } + ], + "results": [ + { + "typeid": "{6383F1D3-BB27-4E6B-A49A-6409B2059EAA}", + "details": { + "name": "Entity Id", + "tooltip": "Entity Unique Id" + } + } + ] + }, + { + "base": "GetContacts", + "details": { + "name": "Get Contacts" + }, + "params": [ + { + "typeid": "{7602AA36-792C-4BDC-BDF8-AA16792151A3}", + "details": { + "name": "Collision Event" + } + } + ], + "results": [ + { + "typeid": "{009022A1-16A5-50B0-958F-F69C729985A3}", + "details": { + "name": "Contacts" + } + } + ] + } + ] + } + ] +} \ No newline at end of file diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Classes/CollisionGroup.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Classes/CollisionGroup.names new file mode 100644 index 0000000000..2892f8b5c5 --- /dev/null +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Classes/CollisionGroup.names @@ -0,0 +1,12 @@ +{ + "entries": [ + { + "base": "CollisionGroup", + "context": "BehaviorClass", + "variant": "", + "details": { + "name": "CollisionGroup" + } + } + ] +} \ No newline at end of file diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Classes/ComponentId.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Classes/ComponentId.names new file mode 100644 index 0000000000..32213e9d4b --- /dev/null +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Classes/ComponentId.names @@ -0,0 +1,114 @@ +{ + "entries": [ + { + "base": "ComponentId", + "context": "BehaviorClass", + "variant": "", + "details": { + "name": "Component Id", + "category": "Entity" + }, + "methods": [ + { + "base": "IsValid", + "context": "ComponentId", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Is Valid" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Is Valid is invoked" + }, + "details": { + "name": "Is Valid" + }, + "params": [ + { + "typeid": "{60A9A069-9C3D-465A-B7AD-0D6CC803990A}", + "details": { + "name": "Behavior Component Id*" + } + } + ], + "results": [ + { + "typeid": "{A0CA880C-AFE4-43CB-926C-59AC48496112}", + "details": { + "name": "Is Valid" + } + } + ] + }, + { + "base": "Equal", + "context": "ComponentId", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Equal" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Equal is invoked" + }, + "details": { + "name": "Equal" + }, + "params": [ + { + "typeid": "{60A9A069-9C3D-465A-B7AD-0D6CC803990A}", + "details": { + "name": "Behavior Component Id" + } + }, + { + "typeid": "{60A9A069-9C3D-465A-B7AD-0D6CC803990A}", + "details": { + "name": "Behavior Component Id" + } + } + ], + "results": [ + { + "typeid": "{A0CA880C-AFE4-43CB-926C-59AC48496112}", + "details": { + "name": "Is Equal" + } + } + ] + }, + { + "base": "ToString", + "context": "ComponentId", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke To String" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after To String is invoked" + }, + "details": { + "name": "To String" + }, + "params": [ + { + "typeid": "{60A9A069-9C3D-465A-B7AD-0D6CC803990A}", + "details": { + "name": "Behavior Component Id*" + } + } + ], + "results": [ + { + "typeid": "{03AAAB3F-5C47-5A66-9EBC-D5FA4DB353C9}", + "details": { + "name": "String" + } + } + ] + } + ] + } + ] +} \ No newline at end of file diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Classes/ConstantGradientComponent.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Classes/ConstantGradientComponent.names new file mode 100644 index 0000000000..e51e6c292b --- /dev/null +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Classes/ConstantGradientComponent.names @@ -0,0 +1,12 @@ +{ + "entries": [ + { + "base": "ConstantGradientComponent", + "context": "BehaviorClass", + "variant": "", + "details": { + "name": "ConstantGradientComponent" + } + } + ] +} \ No newline at end of file diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Classes/ConstantGradientConfig.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Classes/ConstantGradientConfig.names new file mode 100644 index 0000000000..c7110f1a52 --- /dev/null +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Classes/ConstantGradientConfig.names @@ -0,0 +1,12 @@ +{ + "entries": [ + { + "base": "ConstantGradientConfig", + "context": "BehaviorClass", + "variant": "", + "details": { + "name": "ConstantGradientConfig" + } + } + ] +} \ No newline at end of file diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Classes/Contact.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Classes/Contact.names new file mode 100644 index 0000000000..515acd65a8 --- /dev/null +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Classes/Contact.names @@ -0,0 +1,183 @@ +{ + "entries": [ + { + "base": "Contact", + "context": "BehaviorClass", + "variant": "", + "details": { + "name": "Contact", + "category": "Physics" + }, + "methods": [ + { + "base": "GetPosition", + "details": { + "name": "Get Position" + }, + "params": [ + { + "typeid": "{D7439508-ED10-4395-9D48-1FC3D7815361}", + "details": { + "name": "Contact" + } + } + ], + "results": [ + { + "typeid": "{8379EB7D-01FA-4538-B64B-A6543B4BE73D}", + "details": { + "name": "Vector 3" + } + } + ] + }, + { + "base": "SetPosition", + "details": { + "name": "Set Position" + }, + "params": [ + { + "typeid": "{D7439508-ED10-4395-9D48-1FC3D7815361}", + "details": { + "name": "Contact" + } + }, + { + "typeid": "{8379EB7D-01FA-4538-B64B-A6543B4BE73D}", + "details": { + "name": "Vector 3" + } + } + ] + }, + { + "base": "GetNormal", + "details": { + "name": "Get Normal" + }, + "params": [ + { + "typeid": "{D7439508-ED10-4395-9D48-1FC3D7815361}", + "details": { + "name": "Contact" + } + } + ], + "results": [ + { + "typeid": "{8379EB7D-01FA-4538-B64B-A6543B4BE73D}", + "details": { + "name": "Vector 3" + } + } + ] + }, + { + "base": "SetNormal", + "details": { + "name": "Set Normal" + }, + "params": [ + { + "typeid": "{D7439508-ED10-4395-9D48-1FC3D7815361}", + "details": { + "name": "Contact" + } + }, + { + "typeid": "{8379EB7D-01FA-4538-B64B-A6543B4BE73D}", + "details": { + "name": "Vector 3" + } + } + ] + }, + { + "base": "GetImpulse", + "details": { + "name": "Get Impulse" + }, + "params": [ + { + "typeid": "{D7439508-ED10-4395-9D48-1FC3D7815361}", + "details": { + "name": "Contact" + } + } + ], + "results": [ + { + "typeid": "{8379EB7D-01FA-4538-B64B-A6543B4BE73D}", + "details": { + "name": "Vector 3" + } + } + ] + }, + { + "base": "SetImpulse", + "details": { + "name": "Set Impulse" + }, + "params": [ + { + "typeid": "{D7439508-ED10-4395-9D48-1FC3D7815361}", + "details": { + "name": "Contact" + } + }, + { + "typeid": "{8379EB7D-01FA-4538-B64B-A6543B4BE73D}", + "details": { + "name": "Vector 3" + } + } + ] + }, + { + "base": "GetSeparation", + "details": { + "name": "Get Separation" + }, + "params": [ + { + "typeid": "{D7439508-ED10-4395-9D48-1FC3D7815361}", + "details": { + "name": "Contact" + } + } + ], + "results": [ + { + "typeid": "{EA2C3E90-AFBE-44D4-A90D-FAAF79BAF93D}", + "details": { + "name": "float" + } + } + ] + }, + { + "base": "SetSeparation", + "details": { + "name": "Set Separation" + }, + "params": [ + { + "typeid": "{D7439508-ED10-4395-9D48-1FC3D7815361}", + "details": { + "name": "Contact" + } + }, + { + "typeid": "{EA2C3E90-AFBE-44D4-A90D-FAAF79BAF93D}", + "details": { + "name": "float" + } + } + ] + } + ] + } + ] +} \ No newline at end of file diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Classes/CryRange.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Classes/CryRange.names new file mode 100644 index 0000000000..aae928f16f --- /dev/null +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Classes/CryRange.names @@ -0,0 +1,12 @@ +{ + "entries": [ + { + "base": "CryRange", + "context": "BehaviorClass", + "variant": "", + "details": { + "name": "CryRange" + } + } + ] +} \ No newline at end of file diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Classes/CylinderShapeConfig.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Classes/CylinderShapeConfig.names new file mode 100644 index 0000000000..47a676caf5 --- /dev/null +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Classes/CylinderShapeConfig.names @@ -0,0 +1,103 @@ +{ + "entries": [ + { + "base": "CylinderShapeConfig", + "context": "BehaviorClass", + "variant": "", + "details": { + "name": "Cylinder Shape Config", + "category": "Rendering/Shapes" + }, + "methods": [ + { + "base": "GetHeight", + "details": { + "name": "Get Height" + }, + "params": [ + { + "typeid": "{53254779-82F1-441E-9116-81E1FACFECF4}", + "details": { + "name": "Cylinder Shape Config", + "tooltip": "Cylinder shape configuration parameters" + } + } + ], + "results": [ + { + "typeid": "{EA2C3E90-AFBE-44D4-A90D-FAAF79BAF93D}", + "details": { + "name": "Height" + } + } + ] + }, + { + "base": "SetHeight", + "details": { + "name": "Set Height" + }, + "params": [ + { + "typeid": "{53254779-82F1-441E-9116-81E1FACFECF4}", + "details": { + "name": "Cylinder Shape Config", + "tooltip": "Cylinder shape configuration parameters" + } + }, + { + "typeid": "{EA2C3E90-AFBE-44D4-A90D-FAAF79BAF93D}", + "details": { + "name": "Height" + } + } + ] + }, + { + "base": "GetRadius", + "details": { + "name": "Get Radius" + }, + "params": [ + { + "typeid": "{53254779-82F1-441E-9116-81E1FACFECF4}", + "details": { + "name": "Cylinder Shape Config", + "tooltip": "Cylinder shape configuration parameters" + } + } + ], + "results": [ + { + "typeid": "{EA2C3E90-AFBE-44D4-A90D-FAAF79BAF93D}", + "details": { + "name": "Radius" + } + } + ] + }, + { + "base": "SetRadius", + "details": { + "name": "Set Radius" + }, + "params": [ + { + "typeid": "{53254779-82F1-441E-9116-81E1FACFECF4}", + "details": { + "name": "Cylinder Shape Config", + "tooltip": "Cylinder shape configuration parameters" + } + }, + { + "typeid": "{EA2C3E90-AFBE-44D4-A90D-FAAF79BAF93D}", + "details": { + "name": "Radius" + } + } + ] + } + ] + } + ] +} \ No newline at end of file diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Classes/DiskShapeConfig.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Classes/DiskShapeConfig.names new file mode 100644 index 0000000000..c23fa14503 --- /dev/null +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Classes/DiskShapeConfig.names @@ -0,0 +1,59 @@ +{ + "entries": [ + { + "base": "DiskShapeConfig", + "context": "BehaviorClass", + "variant": "", + "details": { + "name": "Disk Shape Config", + "category": "Rendering/Shapes" + }, + "methods": [ + { + "base": "GetRadius", + "details": { + "name": "Get Radius" + }, + "params": [ + { + "typeid": "{24EC2919-F198-4871-8404-F6DE8A16275E}", + "details": { + "name": "Configuration", + "tooltip": "Disk shape configuration parameters" + } + } + ], + "results": [ + { + "typeid": "{EA2C3E90-AFBE-44D4-A90D-FAAF79BAF93D}", + "details": { + "name": "float" + } + } + ] + }, + { + "base": "SetRadius", + "details": { + "name": "Set Radius" + }, + "params": [ + { + "typeid": "{24EC2919-F198-4871-8404-F6DE8A16275E}", + "details": { + "name": "Configuration", + "tooltip": "Disk shape configuration parameters" + } + }, + { + "typeid": "{EA2C3E90-AFBE-44D4-A90D-FAAF79BAF93D}", + "details": { + "name": "float" + } + } + ] + } + ] + } + ] +} \ No newline at end of file diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Classes/DisplaySettingsState.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Classes/DisplaySettingsState.names new file mode 100644 index 0000000000..2addd0d656 --- /dev/null +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Classes/DisplaySettingsState.names @@ -0,0 +1,46 @@ +{ + "entries": [ + { + "base": "DisplaySettingsState", + "context": "BehaviorClass", + "variant": "", + "details": { + "name": "DisplaySettingsState" + }, + "methods": [ + { + "base": "ToString", + "context": "DisplaySettingsState", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke ToString" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after ToString is invoked" + }, + "details": { + "name": "DisplaySettingsState::ToString", + "category": "Other" + }, + "params": [ + { + "typeid": "{EBEDA5EC-29D3-4F23-ABCC-C7C4EE48FA36}", + "details": { + "name": "DisplaySettingsState*" + } + } + ], + "results": [ + { + "typeid": "{03AAAB3F-5C47-5A66-9EBC-D5FA4DB353C9}", + "details": { + "name": "AZStd::basic_string, allocator>" + } + } + ] + } + ] + } + ] +} \ No newline at end of file diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Classes/DitherGradientComponent.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Classes/DitherGradientComponent.names new file mode 100644 index 0000000000..e3b269f248 --- /dev/null +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Classes/DitherGradientComponent.names @@ -0,0 +1,12 @@ +{ + "entries": [ + { + "base": "DitherGradientComponent", + "context": "BehaviorClass", + "variant": "", + "details": { + "name": "DitherGradientComponent" + } + } + ] +} \ No newline at end of file diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Classes/DitherGradientConfig.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Classes/DitherGradientConfig.names new file mode 100644 index 0000000000..94ee3bc7c7 --- /dev/null +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Classes/DitherGradientConfig.names @@ -0,0 +1,12 @@ +{ + "entries": [ + { + "base": "DitherGradientConfig", + "context": "BehaviorClass", + "variant": "", + "details": { + "name": "DitherGradientConfig" + } + } + ] +} \ No newline at end of file diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Classes/EditorActorComponent.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Classes/EditorActorComponent.names new file mode 100644 index 0000000000..d07b60cb07 --- /dev/null +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Classes/EditorActorComponent.names @@ -0,0 +1,12 @@ +{ + "entries": [ + { + "base": "EditorActorComponent", + "context": "BehaviorClass", + "variant": "", + "details": { + "name": "EditorActorComponent" + } + } + ] +} \ No newline at end of file diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Classes/EditorCameraComponent.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Classes/EditorCameraComponent.names new file mode 100644 index 0000000000..23724acac1 --- /dev/null +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Classes/EditorCameraComponent.names @@ -0,0 +1,12 @@ +{ + "entries": [ + { + "base": "EditorCameraComponent", + "context": "BehaviorClass", + "variant": "", + "details": { + "name": "EditorCameraComponent" + } + } + ] +} \ No newline at end of file diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Classes/EditorLayerComponent.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Classes/EditorLayerComponent.names new file mode 100644 index 0000000000..415af30964 --- /dev/null +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Classes/EditorLayerComponent.names @@ -0,0 +1,71 @@ +{ + "entries": [ + { + "base": "EditorLayerComponent", + "context": "BehaviorClass", + "variant": "", + "details": { + "name": "EditorLayerComponent" + }, + "methods": [ + { + "base": "CreateLayerEntityFromName", + "context": "EditorLayerComponent", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke CreateLayerEntityFromName" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after CreateLayerEntityFromName is invoked" + }, + "details": { + "name": "EditorLayerComponent::CreateLayerEntityFromName", + "category": "Other" + }, + "params": [ + { + "typeid": "{03AAAB3F-5C47-5A66-9EBC-D5FA4DB353C9}", + "details": { + "name": "const AZStd::basic_string, alloc" + } + } + ], + "results": [ + { + "typeid": "{6383F1D3-BB27-4E6B-A49A-6409B2059EAA}", + "details": { + "name": "EntityId", + "tooltip": "Entity Unique Id" + } + } + ] + }, + { + "base": "RecoverLayer", + "context": "EditorLayerComponent", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke RecoverLayer" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after RecoverLayer is invoked" + }, + "details": { + "name": "EditorLayerComponent::RecoverLayer", + "category": "Other" + }, + "params": [ + { + "typeid": "{03AAAB3F-5C47-5A66-9EBC-D5FA4DB353C9}", + "details": { + "name": "const AZStd::basic_string, alloc" + } + } + ] + } + ] + } + ] +} \ No newline at end of file diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Classes/EditorMaterialComponentSlot.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Classes/EditorMaterialComponentSlot.names new file mode 100644 index 0000000000..5b20e07711 --- /dev/null +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Classes/EditorMaterialComponentSlot.names @@ -0,0 +1,12 @@ +{ + "entries": [ + { + "base": "EditorMaterialComponentSlot", + "context": "BehaviorClass", + "variant": "", + "details": { + "name": "EditorMaterialComponentSlot" + } + } + ] +} \ No newline at end of file diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Classes/EditorSequenceComponent.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Classes/EditorSequenceComponent.names new file mode 100644 index 0000000000..7e29d2e3cb --- /dev/null +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Classes/EditorSequenceComponent.names @@ -0,0 +1,12 @@ +{ + "entries": [ + { + "base": "EditorSequenceComponent", + "context": "BehaviorClass", + "variant": "", + "details": { + "name": "EditorSequenceComponent" + } + } + ] +} \ No newline at end of file diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Classes/EditorSimpleMotionComponent.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Classes/EditorSimpleMotionComponent.names new file mode 100644 index 0000000000..fa1366b36a --- /dev/null +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Classes/EditorSimpleMotionComponent.names @@ -0,0 +1,12 @@ +{ + "entries": [ + { + "base": "EditorSimpleMotionComponent", + "context": "BehaviorClass", + "variant": "", + "details": { + "name": "EditorSimpleMotionComponent" + } + } + ] +} \ No newline at end of file diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Classes/EditorTransformBus.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Classes/EditorTransformBus.names new file mode 100644 index 0000000000..cb681cedbd --- /dev/null +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Classes/EditorTransformBus.names @@ -0,0 +1,12 @@ +{ + "entries": [ + { + "base": "EditorTransformBus", + "context": "BehaviorClass", + "variant": "", + "details": { + "name": "EditorTransformBus" + } + } + ] +} \ No newline at end of file diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Classes/Entity.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Classes/Entity.names new file mode 100644 index 0000000000..22a3a46c7c --- /dev/null +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Classes/Entity.names @@ -0,0 +1,657 @@ +{ + "entries": [ + { + "base": "Entity", + "context": "BehaviorClass", + "variant": "", + "details": { + "name": "Behavior Entity", + "category": "Entity" + }, + "methods": [ + { + "base": "GetComponentName", + "context": "Entity", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Get Component Name" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Get Component Name is invoked" + }, + "details": { + "name": "Get Component Name", + "category": "Other" + }, + "params": [ + { + "typeid": "{41CC88A4-FE07-48E6-943D-998DE68AFF5C}", + "details": { + "name": "Behavior Entity", + "tooltip": "Entity" + } + }, + { + "typeid": "{60A9A069-9C3D-465A-B7AD-0D6CC803990A}", + "details": { + "name": "Behavior Component Id" + } + } + ], + "results": [ + { + "typeid": "{03AAAB3F-5C47-5A66-9EBC-D5FA4DB353C9}", + "details": { + "name": "Component Name" + } + } + ] + }, + { + "base": "GetComponentType", + "context": "Entity", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Get Component Type" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Get Component Type is invoked" + }, + "details": { + "name": "Get Component Type", + "category": "Other" + }, + "params": [ + { + "typeid": "{41CC88A4-FE07-48E6-943D-998DE68AFF5C}", + "details": { + "name": "Behavior Entity", + "tooltip": "Entity" + } + }, + { + "typeid": "{60A9A069-9C3D-465A-B7AD-0D6CC803990A}", + "details": { + "name": "Behavior Component Id" + } + } + ], + "results": [ + { + "typeid": "{E152C105-A133-4D03-BBF8-3D4B2FBA3E2A}", + "details": { + "name": "Type" + } + } + ] + }, + { + "base": "CreateComponent", + "context": "Entity", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Create Component" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Create Component is invoked" + }, + "details": { + "name": "Create Component", + "category": "Other" + }, + "params": [ + { + "typeid": "{41CC88A4-FE07-48E6-943D-998DE68AFF5C}", + "details": { + "name": "Behavior Entity", + "tooltip": "Entity" + } + }, + { + "typeid": "{E152C105-A133-4D03-BBF8-3D4B2FBA3E2A}", + "details": { + "name": "Component Type" + } + }, + { + "typeid": "{0A7929DF-2932-40EA-B2B3-79BC1C3490D0}", + "details": { + "name": "Component Config*" + } + } + ], + "results": [ + { + "typeid": "{60A9A069-9C3D-465A-B7AD-0D6CC803990A}", + "details": { + "name": "Behavior Component Id" + } + } + ] + }, + { + "base": "DestroyComponent", + "context": "Entity", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Destroy Component" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Destroy Component is invoked" + }, + "details": { + "name": "Destroy Component", + "category": "Other" + }, + "params": [ + { + "typeid": "{41CC88A4-FE07-48E6-943D-998DE68AFF5C}", + "details": { + "name": "Behavior Entity", + "tooltip": "Entity" + } + }, + { + "typeid": "{60A9A069-9C3D-465A-B7AD-0D6CC803990A}", + "details": { + "name": "Behavior Component Id" + } + } + ], + "results": [ + { + "typeid": "{A0CA880C-AFE4-43CB-926C-59AC48496112}", + "details": { + "name": "Success" + } + } + ] + }, + { + "base": "FindComponentOfType", + "context": "Entity", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Find Component Of Type" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Find Component Of Type is invoked" + }, + "details": { + "name": "Find Component Of Type", + "category": "Other" + }, + "params": [ + { + "typeid": "{41CC88A4-FE07-48E6-943D-998DE68AFF5C}", + "details": { + "name": "Behavior Entity", + "tooltip": "Entity" + } + }, + { + "typeid": "{E152C105-A133-4D03-BBF8-3D4B2FBA3E2A}", + "details": { + "name": "Component Type" + } + } + ], + "results": [ + { + "typeid": "{60A9A069-9C3D-465A-B7AD-0D6CC803990A}", + "details": { + "name": "Behavior Component Id" + } + } + ] + }, + { + "base": "SetComponentConfiguration", + "context": "Entity", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Set Component Configuration" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Set Component Configuration is invoked" + }, + "details": { + "name": "Set Component Configuration", + "category": "Other" + }, + "params": [ + { + "typeid": "{41CC88A4-FE07-48E6-943D-998DE68AFF5C}", + "details": { + "name": "Behavior Entity", + "tooltip": "Entity" + } + }, + { + "typeid": "{60A9A069-9C3D-465A-B7AD-0D6CC803990A}", + "details": { + "name": "Behavior Component Id" + } + }, + { + "typeid": "{0A7929DF-2932-40EA-B2B3-79BC1C3490D0}", + "details": { + "name": "Component Config" + } + } + ], + "results": [ + { + "typeid": "{A0CA880C-AFE4-43CB-926C-59AC48496112}", + "details": { + "name": "Success" + } + } + ] + }, + { + "base": "IsValid", + "context": "Entity", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Is Valid" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Is Valid is invoked" + }, + "details": { + "name": "Is Valid", + "category": "Other" + }, + "params": [ + { + "typeid": "{41CC88A4-FE07-48E6-943D-998DE68AFF5C}", + "details": { + "name": "Behavior Entity", + "tooltip": "Entity" + } + } + ], + "results": [ + { + "typeid": "{A0CA880C-AFE4-43CB-926C-59AC48496112}", + "details": { + "name": "Is Valid" + } + } + ] + }, + { + "base": "GetId", + "context": "Entity", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke GetId" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after GetId is invoked" + }, + "details": { + "name": "Get Id", + "category": "Other" + }, + "params": [ + { + "typeid": "{41CC88A4-FE07-48E6-943D-998DE68AFF5C}", + "details": { + "name": "Behavior Entity", + "tooltip": "Entity" + } + } + ], + "results": [ + { + "typeid": "{6383F1D3-BB27-4E6B-A49A-6409B2059EAA}", + "details": { + "name": "Entity Id", + "tooltip": "Entity Unique Id" + } + } + ] + }, + { + "base": "GetOwningContextId", + "context": "Entity", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke GetOwningContextId" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after GetOwningContextId is invoked" + }, + "details": { + "name": "Get Owning Context Id" + }, + "params": [ + { + "typeid": "{41CC88A4-FE07-48E6-943D-998DE68AFF5C}", + "details": { + "name": "Behavior Entity", + "tooltip": "Entity" + } + } + ], + "results": [ + { + "typeid": "{E152C105-A133-4D03-BBF8-3D4B2FBA3E2A}", + "details": { + "name": "Context Id" + } + } + ] + }, + { + "base": "GetComponents", + "context": "Entity", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Get Components" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Get Components is invoked" + }, + "details": { + "name": "Get Components", + "category": "Other" + }, + "params": [ + { + "typeid": "{41CC88A4-FE07-48E6-943D-998DE68AFF5C}", + "details": { + "name": "Behavior Entity", + "tooltip": "Entity" + } + } + ], + "results": [ + { + "typeid": "{8293031B-ABC3-5CD2-A1CB-1DB6792ADD5C}", + "details": { + "name": "Components" + } + } + ] + }, + { + "base": "FindAllComponentsOfType", + "context": "Entity", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Find All Components Of Type" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Find All Components Of Type is invoked" + }, + "details": { + "name": "Find All Components Of Type", + "category": "Other" + }, + "params": [ + { + "typeid": "{41CC88A4-FE07-48E6-943D-998DE68AFF5C}", + "details": { + "name": "Behavior Entity", + "tooltip": "Entity" + } + }, + { + "typeid": "{E152C105-A133-4D03-BBF8-3D4B2FBA3E2A}", + "details": { + "name": "Component Type" + } + } + ], + "results": [ + { + "typeid": "{8293031B-ABC3-5CD2-A1CB-1DB6792ADD5C}", + "details": { + "name": "Components" + } + } + ] + }, + { + "base": "GetComponentConfiguration", + "context": "Entity", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Get Component Configuration" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Get Component Configuration is invoked" + }, + "details": { + "name": "Get Component Configuration", + "category": "Other" + }, + "params": [ + { + "typeid": "{41CC88A4-FE07-48E6-943D-998DE68AFF5C}", + "details": { + "name": "Behavior Entity", + "tooltip": "Entity" + } + }, + { + "typeid": "{60A9A069-9C3D-465A-B7AD-0D6CC803990A}", + "details": { + "name": "Behavior Component Id" + } + }, + { + "typeid": "{0A7929DF-2932-40EA-B2B3-79BC1C3490D0}", + "details": { + "name": "Component Config" + } + } + ], + "results": [ + { + "typeid": "{A0CA880C-AFE4-43CB-926C-59AC48496112}", + "details": { + "name": "Success" + } + } + ] + }, + { + "base": "SetName", + "context": "Entity", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Set Name" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Set Name is invoked" + }, + "details": { + "name": "Set Name", + "category": "Other" + }, + "params": [ + { + "typeid": "{41CC88A4-FE07-48E6-943D-998DE68AFF5C}", + "details": { + "name": "Behavior Entity", + "tooltip": "Entity" + } + }, + { + "typeid": "{3AB0037F-AF8D-48CE-BCA0-A170D18B2C03}", + "details": { + "name": "Name" + } + } + ] + }, + { + "base": "IsActivated", + "context": "Entity", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Is Activated" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Is Activated is invoked" + }, + "details": { + "name": "Is Activated", + "category": "Other" + }, + "params": [ + { + "typeid": "{41CC88A4-FE07-48E6-943D-998DE68AFF5C}", + "details": { + "name": "Behavior Entity", + "tooltip": "Entity" + } + } + ], + "results": [ + { + "typeid": "{A0CA880C-AFE4-43CB-926C-59AC48496112}", + "details": { + "name": "Is Activated" + } + } + ] + }, + { + "base": "Activate", + "context": "Entity", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Activate" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Activate is invoked" + }, + "details": { + "name": "Activate", + "category": "Other" + }, + "params": [ + { + "typeid": "{41CC88A4-FE07-48E6-943D-998DE68AFF5C}", + "details": { + "name": "Behavior Entity", + "tooltip": "Entity" + } + } + ] + }, + { + "base": "Deactivate", + "context": "Entity", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Deactivate" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Deactivate is invoked" + }, + "details": { + "name": "Deactivate", + "category": "Other" + }, + "params": [ + { + "typeid": "{41CC88A4-FE07-48E6-943D-998DE68AFF5C}", + "details": { + "name": "Behavior Entity", + "tooltip": "Entity" + } + } + ] + }, + { + "base": "GetName", + "context": "Entity", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Get Name" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Get Name is invoked" + }, + "details": { + "name": "GetName", + "category": "Other" + }, + "params": [ + { + "typeid": "{41CC88A4-FE07-48E6-943D-998DE68AFF5C}", + "details": { + "name": "Behavior Entity", + "tooltip": "Entity" + } + } + ], + "results": [ + { + "typeid": "{03AAAB3F-5C47-5A66-9EBC-D5FA4DB353C9}", + "details": { + "name": "Name" + } + } + ] + }, + { + "base": "Exists", + "context": "Entity", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Exists" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Exists is invoked" + }, + "details": { + "name": "Exists", + "category": "Other" + }, + "params": [ + { + "typeid": "{41CC88A4-FE07-48E6-943D-998DE68AFF5C}", + "details": { + "name": "Behavior Entity", + "tooltip": "Entity" + } + } + ], + "results": [ + { + "typeid": "{A0CA880C-AFE4-43CB-926C-59AC48496112}", + "details": { + "name": "Exists" + } + } + ] + } + ] + } + ] +} \ No newline at end of file diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Classes/EntityComponentIdPair.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Classes/EntityComponentIdPair.names new file mode 100644 index 0000000000..50268aecb5 --- /dev/null +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Classes/EntityComponentIdPair.names @@ -0,0 +1,117 @@ +{ + "entries": [ + { + "base": "EntityComponentIdPair", + "context": "BehaviorClass", + "variant": "", + "details": { + "name": "EntityComponentIdPair" + }, + "methods": [ + { + "base": "GetEntityId", + "context": "EntityComponentIdPair", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke GetEntityId" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after GetEntityId is invoked" + }, + "details": { + "name": "EntityComponentIdPair::GetEntityId", + "category": "Other" + }, + "params": [ + { + "typeid": "{C845E5EC-5580-4E12-A9B2-9AE7E5B7826F}", + "details": { + "name": "EntityComponentIdPair*" + } + } + ], + "results": [ + { + "typeid": "{6383F1D3-BB27-4E6B-A49A-6409B2059EAA}", + "details": { + "name": "EntityId", + "tooltip": "Entity Unique Id" + } + } + ] + }, + { + "base": "Equal", + "context": "EntityComponentIdPair", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Equal" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Equal is invoked" + }, + "details": { + "name": "EntityComponentIdPair::Equal", + "category": "Other" + }, + "params": [ + { + "typeid": "{C845E5EC-5580-4E12-A9B2-9AE7E5B7826F}", + "details": { + "name": "EntityComponentIdPair*" + } + }, + { + "typeid": "{C845E5EC-5580-4E12-A9B2-9AE7E5B7826F}", + "details": { + "name": "const EntityComponentIdPair&" + } + } + ], + "results": [ + { + "typeid": "{A0CA880C-AFE4-43CB-926C-59AC48496112}", + "details": { + "name": "bool" + } + } + ] + }, + { + "base": "ToString", + "context": "EntityComponentIdPair", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke ToString" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after ToString is invoked" + }, + "details": { + "name": "EntityComponentIdPair::ToString", + "category": "Other" + }, + "params": [ + { + "typeid": "{C845E5EC-5580-4E12-A9B2-9AE7E5B7826F}", + "details": { + "name": "const EntityComponentIdPair*" + } + } + ], + "results": [ + { + "typeid": "{03AAAB3F-5C47-5A66-9EBC-D5FA4DB353C9}", + "details": { + "name": "AZStd::basic_string, allocator>" + } + } + ] + } + ] + } + ] +} \ No newline at end of file diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Classes/EntityEntity_VM.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Classes/EntityEntity_VM.names new file mode 100644 index 0000000000..ea810ec9f0 --- /dev/null +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Classes/EntityEntity_VM.names @@ -0,0 +1,230 @@ +{ + "entries": [ + { + "base": "EntityEntity_VM", + "context": "BehaviorClass", + "variant": "", + "details": { + "name": "EntityEntity_VM" + }, + "methods": [ + { + "base": "ToString", + "context": "EntityEntity_VM", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke ToString" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after ToString is invoked" + }, + "details": { + "name": "EntityEntity_VM::ToString", + "category": "Other" + }, + "params": [ + { + "typeid": "{6383F1D3-BB27-4E6B-A49A-6409B2059EAA}", + "details": { + "name": "const EntityId&", + "tooltip": "Entity Unique Id" + } + } + ], + "results": [ + { + "typeid": "{03AAAB3F-5C47-5A66-9EBC-D5FA4DB353C9}", + "details": { + "name": "AZStd::basic_string, allocator>" + } + } + ] + }, + { + "base": "IsValid", + "context": "EntityEntity_VM", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke IsValid" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after IsValid is invoked" + }, + "details": { + "name": "EntityEntity_VM::IsValid", + "category": "Other" + }, + "params": [ + { + "typeid": "{6383F1D3-BB27-4E6B-A49A-6409B2059EAA}", + "details": { + "name": "const EntityId&", + "tooltip": "Entity Unique Id" + } + } + ], + "results": [ + { + "typeid": "{A0CA880C-AFE4-43CB-926C-59AC48496112}", + "details": { + "name": "bool" + } + } + ] + }, + { + "base": "GetEntityForward", + "context": "EntityEntity_VM", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke GetEntityForward" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after GetEntityForward is invoked" + }, + "details": { + "name": "EntityEntity_VM::GetEntityForward", + "category": "Other" + }, + "params": [ + { + "typeid": "{6383F1D3-BB27-4E6B-A49A-6409B2059EAA}", + "details": { + "name": "EntityId", + "tooltip": "Entity Unique Id" + } + }, + { + "typeid": "{110C4B14-11A8-4E9D-8638-5051013A56AC}", + "details": { + "name": "double" + } + } + ], + "results": [ + { + "typeid": "{8379EB7D-01FA-4538-B64B-A6543B4BE73D}", + "details": { + "name": "Vector3" + } + } + ] + }, + { + "base": "IsActive", + "context": "EntityEntity_VM", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke IsActive" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after IsActive is invoked" + }, + "details": { + "name": "EntityEntity_VM::IsActive", + "category": "Other" + }, + "params": [ + { + "typeid": "{6383F1D3-BB27-4E6B-A49A-6409B2059EAA}", + "details": { + "name": "const EntityId&", + "tooltip": "Entity Unique Id" + } + } + ], + "results": [ + { + "typeid": "{A0CA880C-AFE4-43CB-926C-59AC48496112}", + "details": { + "name": "bool" + } + } + ] + }, + { + "base": "GetEntityRight", + "context": "EntityEntity_VM", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke GetEntityRight" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after GetEntityRight is invoked" + }, + "details": { + "name": "EntityEntity_VM::GetEntityRight", + "category": "Other" + }, + "params": [ + { + "typeid": "{6383F1D3-BB27-4E6B-A49A-6409B2059EAA}", + "details": { + "name": "EntityId", + "tooltip": "Entity Unique Id" + } + }, + { + "typeid": "{110C4B14-11A8-4E9D-8638-5051013A56AC}", + "details": { + "name": "double" + } + } + ], + "results": [ + { + "typeid": "{8379EB7D-01FA-4538-B64B-A6543B4BE73D}", + "details": { + "name": "Vector3" + } + } + ] + }, + { + "base": "GetEntityUp", + "context": "EntityEntity_VM", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke GetEntityUp" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after GetEntityUp is invoked" + }, + "details": { + "name": "EntityEntity_VM::GetEntityUp", + "category": "Other" + }, + "params": [ + { + "typeid": "{6383F1D3-BB27-4E6B-A49A-6409B2059EAA}", + "details": { + "name": "EntityId", + "tooltip": "Entity Unique Id" + } + }, + { + "typeid": "{110C4B14-11A8-4E9D-8638-5051013A56AC}", + "details": { + "name": "double" + } + } + ], + "results": [ + { + "typeid": "{8379EB7D-01FA-4538-B64B-A6543B4BE73D}", + "details": { + "name": "Vector3" + } + } + ] + } + ] + } + ] +} \ No newline at end of file diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Classes/EntityTransform.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Classes/EntityTransform.names new file mode 100644 index 0000000000..d86c656b89 --- /dev/null +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Classes/EntityTransform.names @@ -0,0 +1,46 @@ +{ + "entries": [ + { + "base": "Entity Transform", + "context": "BehaviorClass", + "variant": "", + "details": { + "name": "Entity Transform", + "category": "Entity/Transform" + }, + "methods": [ + { + "base": "Rotate", + "context": "Entity Transform", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Rotate" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Rotate is invoked" + }, + "details": { + "name": "Rotate" + }, + "params": [ + { + "typeid": "{6383F1D3-BB27-4E6B-A49A-6409B2059EAA}", + "details": { + "name": "Entity", + "tooltip": "The entity to apply the rotation on." + } + }, + { + "typeid": "{8379EB7D-01FA-4538-B64B-A6543B4BE73D}", + "details": { + "name": "Euler Angles", + "tooltip": "Euler angles, Pitch/Yaw/Roll." + } + } + ] + } + ] + } + ] +} \ No newline at end of file diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Classes/EntityType.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Classes/EntityType.names new file mode 100644 index 0000000000..3389be627a --- /dev/null +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Classes/EntityType.names @@ -0,0 +1,12 @@ +{ + "entries": [ + { + "base": "EntityType", + "context": "BehaviorClass", + "variant": "", + "details": { + "name": "EntityType" + } + } + ] +} \ No newline at end of file diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Classes/ExecutionStateInterpretedPerActivation.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Classes/ExecutionStateInterpretedPerActivation.names new file mode 100644 index 0000000000..a6a5e8142a --- /dev/null +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Classes/ExecutionStateInterpretedPerActivation.names @@ -0,0 +1,12 @@ +{ + "entries": [ + { + "base": "ExecutionStateInterpretedPerActivation", + "context": "BehaviorClass", + "variant": "", + "details": { + "name": "ExecutionStateInterpretedPerActivation" + } + } + ] +} \ No newline at end of file diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Classes/ExecutionStateInterpretedPerActivationOnGraphStart.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Classes/ExecutionStateInterpretedPerActivationOnGraphStart.names new file mode 100644 index 0000000000..416c6b2f5b --- /dev/null +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Classes/ExecutionStateInterpretedPerActivationOnGraphStart.names @@ -0,0 +1,12 @@ +{ + "entries": [ + { + "base": "ExecutionStateInterpretedPerActivationOnGraphStart", + "context": "BehaviorClass", + "variant": "", + "details": { + "name": "ExecutionStateInterpretedPerActivationOnGraphStart" + } + } + ] +} \ No newline at end of file diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Classes/ExecutionStateInterpretedPure.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Classes/ExecutionStateInterpretedPure.names new file mode 100644 index 0000000000..0dd0d06720 --- /dev/null +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Classes/ExecutionStateInterpretedPure.names @@ -0,0 +1,12 @@ +{ + "entries": [ + { + "base": "ExecutionStateInterpretedPure", + "context": "BehaviorClass", + "variant": "", + "details": { + "name": "ExecutionStateInterpretedPure" + } + } + ] +} \ No newline at end of file diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Classes/ExecutionStateInterpretedPureOnGraphStart.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Classes/ExecutionStateInterpretedPureOnGraphStart.names new file mode 100644 index 0000000000..94204607cc --- /dev/null +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Classes/ExecutionStateInterpretedPureOnGraphStart.names @@ -0,0 +1,12 @@ +{ + "entries": [ + { + "base": "ExecutionStateInterpretedPureOnGraphStart", + "context": "BehaviorClass", + "variant": "", + "details": { + "name": "ExecutionStateInterpretedPureOnGraphStart" + } + } + ] +} \ No newline at end of file diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Classes/ExecutionStateInterpretedSingleton.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Classes/ExecutionStateInterpretedSingleton.names new file mode 100644 index 0000000000..3303bba243 --- /dev/null +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Classes/ExecutionStateInterpretedSingleton.names @@ -0,0 +1,12 @@ +{ + "entries": [ + { + "base": "ExecutionStateInterpretedSingleton", + "context": "BehaviorClass", + "variant": "", + "details": { + "name": "ExecutionStateInterpretedSingleton" + } + } + ] +} \ No newline at end of file diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Classes/ExportProduct.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Classes/ExportProduct.names new file mode 100644 index 0000000000..ed46be444d --- /dev/null +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Classes/ExportProduct.names @@ -0,0 +1,225 @@ +{ + "entries": [ + { + "base": "ExportProduct", + "context": "BehaviorClass", + "variant": "", + "details": { + "name": "Export Product", + "category": "Scene" + }, + "methods": [ + { + "base": "GetsubId", + "details": { + "name": "Getsub Id" + }, + "params": [ + { + "typeid": "{6054EDCB-4C04-4D96-BF26-704999FFB725}", + "details": { + "name": "SceneAPI:: Events:: Export Product*" + } + } + ], + "results": [ + { + "typeid": "{43DA906B-7DEF-4CA8-9790-854106D3F983}", + "details": { + "name": "unsigned int" + } + } + ] + }, + { + "base": "SetsubId", + "details": { + "name": "Setsub Id" + }, + "params": [ + { + "typeid": "{6054EDCB-4C04-4D96-BF26-704999FFB725}", + "details": { + "name": "SceneAPI:: Events:: Export Product*" + } + }, + { + "typeid": "{43DA906B-7DEF-4CA8-9790-854106D3F983}", + "details": { + "name": "unsigned int" + } + } + ] + }, + { + "base": "GetproductDependencies", + "details": { + "name": "Getproduct Dependencies" + }, + "params": [ + { + "typeid": "{6054EDCB-4C04-4D96-BF26-704999FFB725}", + "details": { + "name": "SceneAPI:: Events:: Export Product*" + } + } + ], + "results": [ + { + "typeid": "{BFBA17B6-CDE2-5239-AEE0-58DF7FA14E3C}", + "details": { + "name": "AZ Std::vector< SceneAPI:: Events:: Export Product, allocator>&" + } + } + ] + }, + { + "base": "SetproductDependencies", + "details": { + "name": "Setproduct Dependencies" + }, + "params": [ + { + "typeid": "{6054EDCB-4C04-4D96-BF26-704999FFB725}", + "details": { + "name": "SceneAPI:: Events:: Export Product*" + } + }, + { + "typeid": "{BFBA17B6-CDE2-5239-AEE0-58DF7FA14E3C}", + "details": { + "name": "const AZ Std::vector< SceneAPI:: Events:: Export Product, allocator>" + } + } + ] + }, + { + "base": "GetassetType", + "details": { + "name": "Getasset Type" + }, + "params": [ + { + "typeid": "{6054EDCB-4C04-4D96-BF26-704999FFB725}", + "details": { + "name": "SceneAPI:: Events:: Export Product*" + } + } + ], + "results": [ + { + "typeid": "{E152C105-A133-4D03-BBF8-3D4B2FBA3E2A}", + "details": { + "name": "AZ:: Uuid" + } + } + ] + }, + { + "base": "SetassetType", + "details": { + "name": "Setasset Type" + }, + "params": [ + { + "typeid": "{6054EDCB-4C04-4D96-BF26-704999FFB725}", + "details": { + "name": "SceneAPI:: Events:: Export Product*" + } + }, + { + "typeid": "{E152C105-A133-4D03-BBF8-3D4B2FBA3E2A}", + "details": { + "name": "AZ:: Uuid" + } + } + ] + }, + { + "base": "Getfilename", + "details": { + "name": "Getfilename" + }, + "params": [ + { + "typeid": "{6054EDCB-4C04-4D96-BF26-704999FFB725}", + "details": { + "name": "SceneAPI:: Events:: Export Product*" + } + } + ], + "results": [ + { + "typeid": "{03AAAB3F-5C47-5A66-9EBC-D5FA4DB353C9}", + "details": { + "name": "AZ Std::string" + } + } + ] + }, + { + "base": "Setfilename", + "details": { + "name": "Setfilename" + }, + "params": [ + { + "typeid": "{6054EDCB-4C04-4D96-BF26-704999FFB725}", + "details": { + "name": "SceneAPI:: Events:: Export Product*" + } + }, + { + "typeid": "{03AAAB3F-5C47-5A66-9EBC-D5FA4DB353C9}", + "details": { + "name": "AZ Std::string" + } + } + ] + }, + { + "base": "GetsourceId", + "details": { + "name": "Getsource Id" + }, + "params": [ + { + "typeid": "{6054EDCB-4C04-4D96-BF26-704999FFB725}", + "details": { + "name": "SceneAPI:: Events:: Export Product*" + } + } + ], + "results": [ + { + "typeid": "{E152C105-A133-4D03-BBF8-3D4B2FBA3E2A}", + "details": { + "name": "AZ:: Uuid" + } + } + ] + }, + { + "base": "SetsourceId", + "details": { + "name": "Setsource Id" + }, + "params": [ + { + "typeid": "{6054EDCB-4C04-4D96-BF26-704999FFB725}", + "details": { + "name": "SceneAPI:: Events:: Export Product*" + } + }, + { + "typeid": "{E152C105-A133-4D03-BBF8-3D4B2FBA3E2A}", + "details": { + "name": "AZ:: Uuid" + } + } + ] + } + ] + } + ] +} \ No newline at end of file diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Classes/ExportProductList.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Classes/ExportProductList.names new file mode 100644 index 0000000000..c70e872bf5 --- /dev/null +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Classes/ExportProductList.names @@ -0,0 +1,102 @@ +{ + "entries": [ + { + "base": "ExportProductList", + "context": "BehaviorClass", + "variant": "", + "details": { + "name": "Export Product List", + "category": "Rendering" + }, + "methods": [ + { + "base": "AddProduct", + "context": "ExportProductList", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Add Product" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Add Product is invoked" + }, + "details": { + "name": "Add Product" + }, + "params": [ + { + "typeid": "{1C76A51F-431B-4987-B653-CFCC940D0D0F}", + "details": { + "name": "" + } + }, + { + "typeid": "{6054EDCB-4C04-4D96-BF26-704999FFB725}", + "details": { + "name": "" + } + } + ] + }, + { + "base": "GetProducts", + "context": "ExportProductList", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Get Products" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Get Products is invoked" + }, + "details": { + "name": "Get Products" + }, + "results": [ + { + "typeid": "{BFBA17B6-CDE2-5239-AEE0-58DF7FA14E3C}", + "details": { + "name": "const AZ Std::vector< SceneAPI:: Events:: Export Product, allocator>" + } + } + ] + }, + { + "base": "AddDependencyToProduct", + "context": "ExportProductList", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Add Dependency To Product" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Add Dependency To Product is invoked" + }, + "details": { + "name": "Add Dependency To Product" + }, + "params": [ + { + "typeid": "{1C76A51F-431B-4987-B653-CFCC940D0D0F}", + "details": { + "name": "" + } + }, + { + "typeid": "{03AAAB3F-5C47-5A66-9EBC-D5FA4DB353C9}", + "details": { + "name": "AZ Std::string" + } + }, + { + "typeid": "{6054EDCB-4C04-4D96-BF26-704999FFB725}", + "details": { + "name": "" + } + } + ] + } + ] + } + ] +} \ No newline at end of file diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Classes/ExposureControlConfig.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Classes/ExposureControlConfig.names new file mode 100644 index 0000000000..fc0bf98597 --- /dev/null +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Classes/ExposureControlConfig.names @@ -0,0 +1,266 @@ +{ + "entries": [ + { + "base": "ExposureControlConfig", + "context": "BehaviorClass", + "variant": "", + "details": { + "name": "Exposure Control Config" + }, + "methods": [ + { + "base": "GetautoExposureSpeedUp", + "details": { + "name": "Get Auto Exposure Speed Up" + }, + "params": [ + { + "typeid": "{C6FD75F7-58BA-46CE-8FBA-2D64CB4ECFF9}", + "details": { + "name": "Exposure Control Config" + } + } + ], + "results": [ + { + "typeid": "{EA2C3E90-AFBE-44D4-A90D-FAAF79BAF93D}", + "details": { + "name": "Auto Exposure Speed Up" + } + } + ] + }, + { + "base": "SetautoExposureSpeedUp", + "details": { + "name": "Set Auto Exposure Speed Up" + }, + "params": [ + { + "typeid": "{C6FD75F7-58BA-46CE-8FBA-2D64CB4ECFF9}", + "details": { + "name": "Exposure Control Config" + } + }, + { + "typeid": "{EA2C3E90-AFBE-44D4-A90D-FAAF79BAF93D}", + "details": { + "name": "Auto Exposure Speed Up" + } + } + ] + }, + { + "base": "GetautoExposureSpeedDown", + "details": { + "name": "Get Auto Exposure Speed Down" + }, + "params": [ + { + "typeid": "{C6FD75F7-58BA-46CE-8FBA-2D64CB4ECFF9}", + "details": { + "name": "Exposure Control Config" + } + } + ], + "results": [ + { + "typeid": "{EA2C3E90-AFBE-44D4-A90D-FAAF79BAF93D}", + "details": { + "name": "Auto Exposure Speed Down" + } + } + ] + }, + { + "base": "SetautoExposureSpeedDown", + "details": { + "name": "Setauto Exposure Speed Down" + }, + "params": [ + { + "typeid": "{C6FD75F7-58BA-46CE-8FBA-2D64CB4ECFF9}", + "details": { + "name": "Exposure Control Config" + } + }, + { + "typeid": "{EA2C3E90-AFBE-44D4-A90D-FAAF79BAF93D}", + "details": { + "name": "Exposure Speed Down" + } + } + ] + }, + { + "base": "GetautoExposureMax", + "details": { + "name": "Get Auto Exposure Max" + }, + "params": [ + { + "typeid": "{C6FD75F7-58BA-46CE-8FBA-2D64CB4ECFF9}", + "details": { + "name": "Exposure Control Config" + } + } + ], + "results": [ + { + "typeid": "{EA2C3E90-AFBE-44D4-A90D-FAAF79BAF93D}", + "details": { + "name": "Auto Exposure Max" + } + } + ] + }, + { + "base": "SetautoExposureMax", + "details": { + "name": "Set Auto Exposure Max" + }, + "params": [ + { + "typeid": "{C6FD75F7-58BA-46CE-8FBA-2D64CB4ECFF9}", + "details": { + "name": "Exposure Control Config" + } + }, + { + "typeid": "{EA2C3E90-AFBE-44D4-A90D-FAAF79BAF93D}", + "details": { + "name": "Auto Exposure Max" + } + } + ] + }, + { + "base": "GetautoExposureMin", + "details": { + "name": "Get Auto Exposure Min" + }, + "params": [ + { + "typeid": "{C6FD75F7-58BA-46CE-8FBA-2D64CB4ECFF9}", + "details": { + "name": "Exposure Control Config" + } + } + ], + "results": [ + { + "typeid": "{EA2C3E90-AFBE-44D4-A90D-FAAF79BAF93D}", + "details": { + "name": "Auto Exposure Min" + } + } + ] + }, + { + "base": "SetautoExposureMin", + "details": { + "name": "Set Auto Exposure Min" + }, + "params": [ + { + "typeid": "{C6FD75F7-58BA-46CE-8FBA-2D64CB4ECFF9}", + "details": { + "name": "Exposure Control Config" + } + }, + { + "typeid": "{EA2C3E90-AFBE-44D4-A90D-FAAF79BAF93D}", + "details": { + "name": "Auto Exposure Min" + } + } + ] + }, + { + "base": "GetexposureControlType", + "details": { + "name": "Get Exposure Control Type" + }, + "params": [ + { + "typeid": "{C6FD75F7-58BA-46CE-8FBA-2D64CB4ECFF9}", + "details": { + "name": "Exposure Control Config" + } + } + ], + "results": [ + { + "typeid": "{43DA906B-7DEF-4CA8-9790-854106D3F983}", + "details": { + "name": "Exposure Control Type" + } + } + ] + }, + { + "base": "SetexposureControlType", + "details": { + "name": "Set Exposure Control Type" + }, + "params": [ + { + "typeid": "{C6FD75F7-58BA-46CE-8FBA-2D64CB4ECFF9}", + "details": { + "name": "Exposure Control Config" + } + }, + { + "typeid": "{43DA906B-7DEF-4CA8-9790-854106D3F983}", + "details": { + "name": "Exposure Control Type" + } + } + ] + }, + { + "base": "GetcompensateValue", + "details": { + "name": "Get Compensate Value" + }, + "params": [ + { + "typeid": "{C6FD75F7-58BA-46CE-8FBA-2D64CB4ECFF9}", + "details": { + "name": "Exposure Control Config" + } + } + ], + "results": [ + { + "typeid": "{EA2C3E90-AFBE-44D4-A90D-FAAF79BAF93D}", + "details": { + "name": "Compensate Value" + } + } + ] + }, + { + "base": "SetcompensateValue", + "details": { + "name": "Set Compensate Value" + }, + "params": [ + { + "typeid": "{C6FD75F7-58BA-46CE-8FBA-2D64CB4ECFF9}", + "details": { + "name": "Exposure Control Config" + } + }, + { + "typeid": "{EA2C3E90-AFBE-44D4-A90D-FAAF79BAF93D}", + "details": { + "name": "Compensate Value" + } + } + ] + } + ] + } + ] +} \ No newline at end of file diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Classes/GameplayNotificationId.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Classes/GameplayNotificationId.names new file mode 100644 index 0000000000..27dab194a4 --- /dev/null +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Classes/GameplayNotificationId.names @@ -0,0 +1,117 @@ +{ + "entries": [ + { + "base": "GameplayNotificationId", + "context": "BehaviorClass", + "variant": "", + "details": { + "name": "Gameplay Notification ID", + "category": "Gameplay" + }, + "methods": [ + { + "base": "ToString", + "context": "GameplayNotificationId", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke ToString" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after ToString is invoked" + }, + "details": { + "name": "GameplayNotificationId::ToString", + "category": "Gameplay" + }, + "params": [ + { + "typeid": "{C5225D36-7068-412D-A46E-DDF79CA1D7FF}", + "details": { + "name": "GameplayNotificationId*" + } + } + ], + "results": [ + { + "typeid": "{03AAAB3F-5C47-5A66-9EBC-D5FA4DB353C9}", + "details": { + "name": "String" + } + } + ] + }, + { + "base": "Equal", + "context": "GameplayNotificationId", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Equal" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Equal is invoked" + }, + "details": { + "name": "GameplayNotificationId::Equal", + "category": "Gameplay" + }, + "params": [ + { + "typeid": "{C5225D36-7068-412D-A46E-DDF79CA1D7FF}", + "details": { + "name": "GameplayNotificationId*" + } + }, + { + "typeid": "{C5225D36-7068-412D-A46E-DDF79CA1D7FF}", + "details": { + "name": "const GameplayNotificationId&" + } + } + ], + "results": [ + { + "typeid": "{A0CA880C-AFE4-43CB-926C-59AC48496112}", + "details": { + "name": "Boolean" + } + } + ] + }, + { + "base": "Clone", + "context": "GameplayNotificationId", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Clone" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Clone is invoked" + }, + "details": { + "name": "GameplayNotificationId::Clone", + "category": "Gameplay" + }, + "params": [ + { + "typeid": "{C5225D36-7068-412D-A46E-DDF79CA1D7FF}", + "details": { + "name": "GameplayNotificationId*" + } + } + ], + "results": [ + { + "typeid": "{C5225D36-7068-412D-A46E-DDF79CA1D7FF}", + "details": { + "name": "GameplayNotificationID" + } + } + ] + } + ] + } + ] +} \ No newline at end of file diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Classes/GradientSampleParams.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Classes/GradientSampleParams.names new file mode 100644 index 0000000000..8db90358b4 --- /dev/null +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Classes/GradientSampleParams.names @@ -0,0 +1,12 @@ +{ + "entries": [ + { + "base": "GradientSampleParams", + "context": "BehaviorClass", + "variant": "", + "details": { + "name": "GradientSampleParams" + } + } + ] +} \ No newline at end of file diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Classes/GradientSampler.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Classes/GradientSampler.names new file mode 100644 index 0000000000..681731b74a --- /dev/null +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Classes/GradientSampler.names @@ -0,0 +1,563 @@ +{ + "entries": [ + { + "base": "GradientSampler", + "context": "BehaviorClass", + "variant": "", + "details": { + "name": "Gradient Sampler", + "category": "Rendering" + }, + "methods": [ + { + "base": "Getscale", + "details": { + "name": "Getscale" + }, + "params": [ + { + "typeid": "{3768D3A6-BF70-4ABC-B4EC-73C75A886916}", + "details": { + "name": "Gradient Sampler" + } + } + ], + "results": [ + { + "typeid": "{8379EB7D-01FA-4538-B64B-A6543B4BE73D}", + "details": { + "name": "Vector 3" + } + } + ] + }, + { + "base": "Setscale", + "details": { + "name": "Setscale" + }, + "params": [ + { + "typeid": "{3768D3A6-BF70-4ABC-B4EC-73C75A886916}", + "details": { + "name": "Gradient Sampler" + } + }, + { + "typeid": "{8379EB7D-01FA-4538-B64B-A6543B4BE73D}", + "details": { + "name": "Vector 3" + } + } + ] + }, + { + "base": "GetoutputMin", + "details": { + "name": "Getoutput Min" + }, + "params": [ + { + "typeid": "{3768D3A6-BF70-4ABC-B4EC-73C75A886916}", + "details": { + "name": "Gradient Sampler" + } + } + ], + "results": [ + { + "typeid": "{EA2C3E90-AFBE-44D4-A90D-FAAF79BAF93D}", + "details": { + "name": "float" + } + } + ] + }, + { + "base": "SetoutputMin", + "details": { + "name": "Setoutput Min" + }, + "params": [ + { + "typeid": "{3768D3A6-BF70-4ABC-B4EC-73C75A886916}", + "details": { + "name": "Gradient Sampler" + } + }, + { + "typeid": "{EA2C3E90-AFBE-44D4-A90D-FAAF79BAF93D}", + "details": { + "name": "float" + } + } + ] + }, + { + "base": "Getrotation", + "details": { + "name": "Getrotation" + }, + "params": [ + { + "typeid": "{3768D3A6-BF70-4ABC-B4EC-73C75A886916}", + "details": { + "name": "Gradient Sampler" + } + } + ], + "results": [ + { + "typeid": "{8379EB7D-01FA-4538-B64B-A6543B4BE73D}", + "details": { + "name": "Vector 3" + } + } + ] + }, + { + "base": "Setrotation", + "details": { + "name": "Setrotation" + }, + "params": [ + { + "typeid": "{3768D3A6-BF70-4ABC-B4EC-73C75A886916}", + "details": { + "name": "Gradient Sampler" + } + }, + { + "typeid": "{8379EB7D-01FA-4538-B64B-A6543B4BE73D}", + "details": { + "name": "Vector 3" + } + } + ] + }, + { + "base": "GetinputMin", + "details": { + "name": "Getinput Min" + }, + "params": [ + { + "typeid": "{3768D3A6-BF70-4ABC-B4EC-73C75A886916}", + "details": { + "name": "Gradient Sampler" + } + } + ], + "results": [ + { + "typeid": "{EA2C3E90-AFBE-44D4-A90D-FAAF79BAF93D}", + "details": { + "name": "float" + } + } + ] + }, + { + "base": "SetinputMin", + "details": { + "name": "Setinput Min" + }, + "params": [ + { + "typeid": "{3768D3A6-BF70-4ABC-B4EC-73C75A886916}", + "details": { + "name": "Gradient Sampler" + } + }, + { + "typeid": "{EA2C3E90-AFBE-44D4-A90D-FAAF79BAF93D}", + "details": { + "name": "float" + } + } + ] + }, + { + "base": "GetinvertInput", + "details": { + "name": "Getinvert Input" + }, + "params": [ + { + "typeid": "{3768D3A6-BF70-4ABC-B4EC-73C75A886916}", + "details": { + "name": "Gradient Sampler" + } + } + ], + "results": [ + { + "typeid": "{A0CA880C-AFE4-43CB-926C-59AC48496112}", + "details": { + "name": "bool" + } + } + ] + }, + { + "base": "SetinvertInput", + "details": { + "name": "Setinvert Input" + }, + "params": [ + { + "typeid": "{3768D3A6-BF70-4ABC-B4EC-73C75A886916}", + "details": { + "name": "Gradient Sampler" + } + }, + { + "typeid": "{A0CA880C-AFE4-43CB-926C-59AC48496112}", + "details": { + "name": "bool" + } + } + ] + }, + { + "base": "GetinputMid", + "details": { + "name": "Getinput Mid" + }, + "params": [ + { + "typeid": "{3768D3A6-BF70-4ABC-B4EC-73C75A886916}", + "details": { + "name": "Gradient Sampler" + } + } + ], + "results": [ + { + "typeid": "{EA2C3E90-AFBE-44D4-A90D-FAAF79BAF93D}", + "details": { + "name": "float" + } + } + ] + }, + { + "base": "SetinputMid", + "details": { + "name": "Setinput Mid" + }, + "params": [ + { + "typeid": "{3768D3A6-BF70-4ABC-B4EC-73C75A886916}", + "details": { + "name": "Gradient Sampler" + } + }, + { + "typeid": "{EA2C3E90-AFBE-44D4-A90D-FAAF79BAF93D}", + "details": { + "name": "float" + } + } + ] + }, + { + "base": "GetenableTransforms", + "details": { + "name": "Getenable Transforms" + }, + "params": [ + { + "typeid": "{3768D3A6-BF70-4ABC-B4EC-73C75A886916}", + "details": { + "name": "Gradient Sampler" + } + } + ], + "results": [ + { + "typeid": "{A0CA880C-AFE4-43CB-926C-59AC48496112}", + "details": { + "name": "bool" + } + } + ] + }, + { + "base": "SetenableTransforms", + "details": { + "name": "Setenable Transforms" + }, + "params": [ + { + "typeid": "{3768D3A6-BF70-4ABC-B4EC-73C75A886916}", + "details": { + "name": "Gradient Sampler" + } + }, + { + "typeid": "{A0CA880C-AFE4-43CB-926C-59AC48496112}", + "details": { + "name": "bool" + } + } + ] + }, + { + "base": "Getopacity", + "details": { + "name": "Getopacity" + }, + "params": [ + { + "typeid": "{3768D3A6-BF70-4ABC-B4EC-73C75A886916}", + "details": { + "name": "Gradient Sampler" + } + } + ], + "results": [ + { + "typeid": "{EA2C3E90-AFBE-44D4-A90D-FAAF79BAF93D}", + "details": { + "name": "float" + } + } + ] + }, + { + "base": "Setopacity", + "details": { + "name": "Setopacity" + }, + "params": [ + { + "typeid": "{3768D3A6-BF70-4ABC-B4EC-73C75A886916}", + "details": { + "name": "Gradient Sampler" + } + }, + { + "typeid": "{EA2C3E90-AFBE-44D4-A90D-FAAF79BAF93D}", + "details": { + "name": "float" + } + } + ] + }, + { + "base": "GetenableLevels", + "details": { + "name": "Getenable Levels" + }, + "params": [ + { + "typeid": "{3768D3A6-BF70-4ABC-B4EC-73C75A886916}", + "details": { + "name": "Gradient Sampler" + } + } + ], + "results": [ + { + "typeid": "{A0CA880C-AFE4-43CB-926C-59AC48496112}", + "details": { + "name": "bool" + } + } + ] + }, + { + "base": "SetenableLevels", + "details": { + "name": "Setenable Levels" + }, + "params": [ + { + "typeid": "{3768D3A6-BF70-4ABC-B4EC-73C75A886916}", + "details": { + "name": "Gradient Sampler" + } + }, + { + "typeid": "{A0CA880C-AFE4-43CB-926C-59AC48496112}", + "details": { + "name": "bool" + } + } + ] + }, + { + "base": "GetinputMax", + "details": { + "name": "Getinput Max" + }, + "params": [ + { + "typeid": "{3768D3A6-BF70-4ABC-B4EC-73C75A886916}", + "details": { + "name": "Gradient Sampler" + } + } + ], + "results": [ + { + "typeid": "{EA2C3E90-AFBE-44D4-A90D-FAAF79BAF93D}", + "details": { + "name": "float" + } + } + ] + }, + { + "base": "SetinputMax", + "details": { + "name": "Setinput Max" + }, + "params": [ + { + "typeid": "{3768D3A6-BF70-4ABC-B4EC-73C75A886916}", + "details": { + "name": "Gradient Sampler" + } + }, + { + "typeid": "{EA2C3E90-AFBE-44D4-A90D-FAAF79BAF93D}", + "details": { + "name": "float" + } + } + ] + }, + { + "base": "GetoutputMax", + "details": { + "name": "Getoutput Max" + }, + "params": [ + { + "typeid": "{3768D3A6-BF70-4ABC-B4EC-73C75A886916}", + "details": { + "name": "Gradient Sampler" + } + } + ], + "results": [ + { + "typeid": "{EA2C3E90-AFBE-44D4-A90D-FAAF79BAF93D}", + "details": { + "name": "float" + } + } + ] + }, + { + "base": "SetoutputMax", + "details": { + "name": "Setoutput Max" + }, + "params": [ + { + "typeid": "{3768D3A6-BF70-4ABC-B4EC-73C75A886916}", + "details": { + "name": "Gradient Sampler" + } + }, + { + "typeid": "{EA2C3E90-AFBE-44D4-A90D-FAAF79BAF93D}", + "details": { + "name": "float" + } + } + ] + }, + { + "base": "Gettranslation", + "details": { + "name": "Gettranslation" + }, + "params": [ + { + "typeid": "{3768D3A6-BF70-4ABC-B4EC-73C75A886916}", + "details": { + "name": "Gradient Sampler" + } + } + ], + "results": [ + { + "typeid": "{8379EB7D-01FA-4538-B64B-A6543B4BE73D}", + "details": { + "name": "Vector 3" + } + } + ] + }, + { + "base": "Settranslation", + "details": { + "name": "Settranslation" + }, + "params": [ + { + "typeid": "{3768D3A6-BF70-4ABC-B4EC-73C75A886916}", + "details": { + "name": "Gradient Sampler" + } + }, + { + "typeid": "{8379EB7D-01FA-4538-B64B-A6543B4BE73D}", + "details": { + "name": "Vector 3" + } + } + ] + }, + { + "base": "GetgradientId", + "details": { + "name": "Getgradient Id" + }, + "params": [ + { + "typeid": "{3768D3A6-BF70-4ABC-B4EC-73C75A886916}", + "details": { + "name": "Gradient Sampler" + } + } + ], + "results": [ + { + "typeid": "{6383F1D3-BB27-4E6B-A49A-6409B2059EAA}", + "details": { + "name": "Entity Id", + "tooltip": "Entity Unique Id" + } + } + ] + }, + { + "base": "SetgradientId", + "details": { + "name": "Setgradient Id" + }, + "params": [ + { + "typeid": "{3768D3A6-BF70-4ABC-B4EC-73C75A886916}", + "details": { + "name": "Gradient Sampler" + } + }, + { + "typeid": "{6383F1D3-BB27-4E6B-A49A-6409B2059EAA}", + "details": { + "name": "Entity Id", + "tooltip": "Entity Unique Id" + } + } + ] + } + ] + } + ] +} \ No newline at end of file diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Classes/GradientSurfaceDataComponent.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Classes/GradientSurfaceDataComponent.names new file mode 100644 index 0000000000..dbc0134c40 --- /dev/null +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Classes/GradientSurfaceDataComponent.names @@ -0,0 +1,12 @@ +{ + "entries": [ + { + "base": "GradientSurfaceDataComponent", + "context": "BehaviorClass", + "variant": "", + "details": { + "name": "GradientSurfaceDataComponent" + } + } + ] +} \ No newline at end of file diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Classes/GradientSurfaceDataConfig.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Classes/GradientSurfaceDataConfig.names new file mode 100644 index 0000000000..0a488feb78 --- /dev/null +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Classes/GradientSurfaceDataConfig.names @@ -0,0 +1,144 @@ +{ + "entries": [ + { + "base": "GradientSurfaceDataConfig", + "context": "BehaviorClass", + "variant": "", + "details": { + "name": "GradientSurfaceDataConfig" + }, + "methods": [ + { + "base": "GetNumTags", + "context": "GradientSurfaceDataConfig", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke GetNumTags" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after GetNumTags is invoked" + }, + "details": { + "name": "GradientSurfaceDataConfig::GetNumTags", + "category": "Other" + }, + "params": [ + { + "typeid": "{34516BA4-2B13-4A84-A46B-01E1980CA778}", + "details": { + "name": "GradientSurfaceDataConfig*" + } + } + ], + "results": [ + { + "typeid": "{D6597933-47CD-4FC8-B911-63F3E2B0993A}", + "details": { + "name": "AZ::u64" + } + } + ] + }, + { + "base": "GetTag", + "context": "GradientSurfaceDataConfig", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke GetTag" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after GetTag is invoked" + }, + "details": { + "name": "GradientSurfaceDataConfig::GetTag", + "category": "Other" + }, + "params": [ + { + "typeid": "{34516BA4-2B13-4A84-A46B-01E1980CA778}", + "details": { + "name": "GradientSurfaceDataConfig*" + } + }, + { + "typeid": "{72039442-EB38-4D42-A1AD-CB68F7E0EEF6}", + "details": { + "name": "int" + } + } + ], + "results": [ + { + "typeid": "{9F4E062E-06A0-46D4-85DF-E0DA96467D3A}", + "details": { + "name": "Crc32" + } + } + ] + }, + { + "base": "RemoveTag", + "context": "GradientSurfaceDataConfig", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke RemoveTag" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after RemoveTag is invoked" + }, + "details": { + "name": "GradientSurfaceDataConfig::RemoveTag", + "category": "Other" + }, + "params": [ + { + "typeid": "{34516BA4-2B13-4A84-A46B-01E1980CA778}", + "details": { + "name": "GradientSurfaceDataConfig*" + } + }, + { + "typeid": "{72039442-EB38-4D42-A1AD-CB68F7E0EEF6}", + "details": { + "name": "int" + } + } + ] + }, + { + "base": "AddTag", + "context": "GradientSurfaceDataConfig", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke AddTag" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after AddTag is invoked" + }, + "details": { + "name": "GradientSurfaceDataConfig::AddTag", + "category": "Other" + }, + "params": [ + { + "typeid": "{34516BA4-2B13-4A84-A46B-01E1980CA778}", + "details": { + "name": "GradientSurfaceDataConfig*" + } + }, + { + "typeid": "{03AAAB3F-5C47-5A66-9EBC-D5FA4DB353C9}", + "details": { + "name": "AZStd::basic_string, allocator>" + } + } + ] + } + ] + } + ] +} \ No newline at end of file diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Classes/GradientTransformComponent.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Classes/GradientTransformComponent.names new file mode 100644 index 0000000000..f0f587922a --- /dev/null +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Classes/GradientTransformComponent.names @@ -0,0 +1,12 @@ +{ + "entries": [ + { + "base": "GradientTransformComponent", + "context": "BehaviorClass", + "variant": "", + "details": { + "name": "GradientTransformComponent" + } + } + ] +} \ No newline at end of file diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Classes/GradientTransformConfig.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Classes/GradientTransformConfig.names new file mode 100644 index 0000000000..1156dfc75e --- /dev/null +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Classes/GradientTransformConfig.names @@ -0,0 +1,12 @@ +{ + "entries": [ + { + "base": "GradientTransformConfig", + "context": "BehaviorClass", + "variant": "", + "details": { + "name": "GradientTransformConfig" + } + } + ] +} \ No newline at end of file diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Classes/GraphModelSlotId.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Classes/GraphModelSlotId.names new file mode 100644 index 0000000000..232ec5f34a --- /dev/null +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Classes/GraphModelSlotId.names @@ -0,0 +1,12 @@ +{ + "entries": [ + { + "base": "GraphModelSlotId", + "context": "BehaviorClass", + "variant": "", + "details": { + "name": "GraphModelSlotId" + } + } + ] +} \ No newline at end of file diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Classes/IAnimationData.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Classes/IAnimationData.names new file mode 100644 index 0000000000..6642870078 --- /dev/null +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Classes/IAnimationData.names @@ -0,0 +1,92 @@ +{ + "entries": [ + { + "base": "IAnimationData", + "context": "BehaviorClass", + "variant": "", + "details": { + "name": "IAnimation Data", + "category": "Animation" + }, + "methods": [ + { + "base": "GetKeyFrameCount", + "context": "IAnimationData", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Get Key Frame Count" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Get Key Frame Count is invoked" + }, + "details": { + "name": "Get Key Frame Count" + }, + "results": [ + { + "typeid": "{D6597933-47CD-4FC8-B911-63F3E2B0993A}", + "details": { + "name": "AZ::u 64" + } + } + ] + }, + { + "base": "GetKeyFrame", + "context": "IAnimationData", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Get Key Frame" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Get Key Frame is invoked" + }, + "details": { + "name": "Get Key Frame" + }, + "params": [ + { + "typeid": "{D6597933-47CD-4FC8-B911-63F3E2B0993A}", + "details": { + "name": "AZ::u 64" + } + } + ], + "results": [ + { + "typeid": "{1906D8A5-7DEC-4DE3-A606-9E53BB3459E7}", + "details": { + "name": "const Matrix 3x 4&" + } + } + ] + }, + { + "base": "GetTimeStepBetweenFrames", + "context": "IAnimationData", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Get Time Step Between Frames" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Get Time Step Between Frames is invoked" + }, + "details": { + "name": "Get Time Step Between Frames" + }, + "results": [ + { + "typeid": "{110C4B14-11A8-4E9D-8638-5051013A56AC}", + "details": { + "name": "double" + } + } + ] + } + ] + } + ] +} \ No newline at end of file diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Classes/IBlendShapeAnimationData.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Classes/IBlendShapeAnimationData.names new file mode 100644 index 0000000000..d07ba28e39 --- /dev/null +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Classes/IBlendShapeAnimationData.names @@ -0,0 +1,115 @@ +{ + "entries": [ + { + "base": "IBlendShapeAnimationData", + "context": "BehaviorClass", + "variant": "", + "details": { + "name": "IBlend Shape Animation Data", + "category": "Animation" + }, + "methods": [ + { + "base": "GetBlendShapeName", + "context": "IBlendShapeAnimationData", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Get Blend Shape Name" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Get Blend Shape Name is invoked" + }, + "details": { + "name": "Get Blend Shape Name" + }, + "results": [ + { + "typeid": "{3AB0037F-AF8D-48CE-BCA0-A170D18B2C03}", + "details": { + "name": "const char*" + } + } + ] + }, + { + "base": "GetKeyFrameCount", + "context": "IBlendShapeAnimationData", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Get Key Frame Count" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Get Key Frame Count is invoked" + }, + "details": { + "name": "Get Key Frame Count" + }, + "results": [ + { + "typeid": "{D6597933-47CD-4FC8-B911-63F3E2B0993A}", + "details": { + "name": "AZ::u 64" + } + } + ] + }, + { + "base": "GetKeyFrame", + "context": "IBlendShapeAnimationData", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Get Key Frame" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Get Key Frame is invoked" + }, + "details": { + "name": "Get Key Frame" + }, + "params": [ + { + "typeid": "{D6597933-47CD-4FC8-B911-63F3E2B0993A}", + "details": { + "name": "AZ::u 64" + } + } + ], + "results": [ + { + "typeid": "{110C4B14-11A8-4E9D-8638-5051013A56AC}", + "details": { + "name": "double" + } + } + ] + }, + { + "base": "GetTimeStepBetweenFrames", + "context": "IBlendShapeAnimationData", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Get Time Step Between Frames" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Get Time Step Between Frames is invoked" + }, + "details": { + "name": "Get Time Step Between Frames" + }, + "results": [ + { + "typeid": "{110C4B14-11A8-4E9D-8638-5051013A56AC}", + "details": { + "name": "double" + } + } + ] + } + ] + } + ] +} \ No newline at end of file diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Classes/IBlendShapeData.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Classes/IBlendShapeData.names new file mode 100644 index 0000000000..70210664dc --- /dev/null +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Classes/IBlendShapeData.names @@ -0,0 +1,276 @@ +{ + "entries": [ + { + "base": "IBlendShapeData", + "context": "BehaviorClass", + "variant": "", + "details": { + "name": "IBlend Shape Data", + "category": "Animation" + }, + "methods": [ + { + "base": "GetNormal", + "context": "IBlendShapeData", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Get Normal" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Get Normal is invoked" + }, + "details": { + "name": "Get Normal" + }, + "params": [ + { + "typeid": "{43DA906B-7DEF-4CA8-9790-854106D3F983}", + "details": { + "name": "unsigned int" + } + } + ], + "results": [ + { + "typeid": "{8379EB7D-01FA-4538-B64B-A6543B4BE73D}", + "details": { + "name": "const Vector 3&" + } + } + ] + }, + { + "base": "GetFaceVertexIndex", + "context": "IBlendShapeData", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Get Face Vertex Index" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Get Face Vertex Index is invoked" + }, + "details": { + "name": "Get Face Vertex Index" + }, + "params": [ + { + "typeid": "{43DA906B-7DEF-4CA8-9790-854106D3F983}", + "details": { + "name": "unsigned int" + } + }, + { + "typeid": "{43DA906B-7DEF-4CA8-9790-854106D3F983}", + "details": { + "name": "unsigned int" + } + } + ], + "results": [ + { + "typeid": "{43DA906B-7DEF-4CA8-9790-854106D3F983}", + "details": { + "name": "unsigned int" + } + } + ] + }, + { + "base": "GetFaceInfo", + "context": "IBlendShapeData", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Get Face Info" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Get Face Info is invoked" + }, + "details": { + "name": "Get Face Info" + }, + "params": [ + { + "typeid": "{43DA906B-7DEF-4CA8-9790-854106D3F983}", + "details": { + "name": "unsigned int" + } + } + ], + "results": [ + { + "typeid": "{C972EC9A-3A5C-47CD-9A92-ECB4C0C0451C}", + "details": { + "name": "const SceneAPI:: Data Types::I Blend Shape Data:: Face&" + } + } + ] + }, + { + "base": "GetPosition", + "context": "IBlendShapeData", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Get Position" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Get Position is invoked" + }, + "details": { + "name": "Get Position" + }, + "params": [ + { + "typeid": "{43DA906B-7DEF-4CA8-9790-854106D3F983}", + "details": { + "name": "unsigned int" + } + } + ], + "results": [ + { + "typeid": "{8379EB7D-01FA-4538-B64B-A6543B4BE73D}", + "details": { + "name": "const Vector 3&" + } + } + ] + }, + { + "base": "GetUsedPointIndexForControlPoint", + "context": "IBlendShapeData", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Get Used Point Index For Control Point" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Get Used Point Index For Control Point is invoked" + }, + "details": { + "name": "Get Used Point Index For Control Point" + }, + "params": [ + { + "typeid": "{72039442-EB38-4D42-A1AD-CB68F7E0EEF6}", + "details": { + "name": "int" + } + } + ], + "results": [ + { + "typeid": "{72039442-EB38-4D42-A1AD-CB68F7E0EEF6}", + "details": { + "name": "int" + } + } + ] + }, + { + "base": "GetVertexCount", + "context": "IBlendShapeData", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Get Vertex Count" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Get Vertex Count is invoked" + }, + "details": { + "name": "Get Vertex Count" + }, + "results": [ + { + "typeid": "{43DA906B-7DEF-4CA8-9790-854106D3F983}", + "details": { + "name": "unsigned int" + } + } + ] + }, + { + "base": "GetFaceCount", + "context": "IBlendShapeData", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Get Face Count" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Get Face Count is invoked" + }, + "details": { + "name": "Get Face Count" + }, + "results": [ + { + "typeid": "{43DA906B-7DEF-4CA8-9790-854106D3F983}", + "details": { + "name": "unsigned int" + } + } + ] + }, + { + "base": "GetControlPointIndex", + "context": "IBlendShapeData", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Get Control Point Index" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Get Control Point Index is invoked" + }, + "details": { + "name": "Get Control Point Index" + }, + "params": [ + { + "typeid": "{72039442-EB38-4D42-A1AD-CB68F7E0EEF6}", + "details": { + "name": "int" + } + } + ], + "results": [ + { + "typeid": "{72039442-EB38-4D42-A1AD-CB68F7E0EEF6}", + "details": { + "name": "int" + } + } + ] + }, + { + "base": "GetUsedControlPointCount", + "context": "IBlendShapeData", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Get Used Control Point Count" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Get Used Control Point Count is invoked" + }, + "details": { + "name": "Get Used Control Point Count" + }, + "results": [ + { + "typeid": "{D6597933-47CD-4FC8-B911-63F3E2B0993A}", + "details": { + "name": "AZ::u 64" + } + } + ] + } + ] + } + ] +} \ No newline at end of file diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Classes/IGraphObject.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Classes/IGraphObject.names new file mode 100644 index 0000000000..b804be2319 --- /dev/null +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Classes/IGraphObject.names @@ -0,0 +1,12 @@ +{ + "entries": [ + { + "base": "IGraphObject", + "context": "BehaviorClass", + "variant": "", + "details": { + "name": "IGraphObject" + } + } + ] +} \ No newline at end of file diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Classes/IMeshData.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Classes/IMeshData.names new file mode 100644 index 0000000000..fa7950a47c --- /dev/null +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Classes/IMeshData.names @@ -0,0 +1,61 @@ +{ + "entries": [ + { + "base": "IMeshData", + "context": "BehaviorClass", + "variant": "", + "details": { + "name": "IMesh Data", + "category": "Rendering" + }, + "methods": [ + { + "base": "GetUnitSizeInMeters", + "context": "IMeshData", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Get Unit Size In Meters" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Get Unit Size In Meters is invoked" + }, + "details": { + "name": "Get Unit Size In Meters" + }, + "results": [ + { + "typeid": "{EA2C3E90-AFBE-44D4-A90D-FAAF79BAF93D}", + "details": { + "name": "float" + } + } + ] + }, + { + "base": "GetOriginalUnitSizeInMeters", + "context": "IMeshData", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Get Original Unit Size In Meters" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Get Original Unit Size In Meters is invoked" + }, + "details": { + "name": "Get Original Unit Size In Meters" + }, + "results": [ + { + "typeid": "{EA2C3E90-AFBE-44D4-A90D-FAAF79BAF93D}", + "details": { + "name": "float" + } + } + ] + } + ] + } + ] +} \ No newline at end of file diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Classes/ImageGradientComponent.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Classes/ImageGradientComponent.names new file mode 100644 index 0000000000..194c7eb028 --- /dev/null +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Classes/ImageGradientComponent.names @@ -0,0 +1,12 @@ +{ + "entries": [ + { + "base": "ImageGradientComponent", + "context": "BehaviorClass", + "variant": "", + "details": { + "name": "ImageGradientComponent" + } + } + ] +} \ No newline at end of file diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Classes/ImageGradientConfig.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Classes/ImageGradientConfig.names new file mode 100644 index 0000000000..75e0b09edf --- /dev/null +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Classes/ImageGradientConfig.names @@ -0,0 +1,12 @@ +{ + "entries": [ + { + "base": "ImageGradientConfig", + "context": "BehaviorClass", + "variant": "", + "details": { + "name": "ImageGradientConfig" + } + } + ] +} \ No newline at end of file diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Classes/InputDeviceGamepad.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Classes/InputDeviceGamepad.names new file mode 100644 index 0000000000..868a2eba61 --- /dev/null +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Classes/InputDeviceGamepad.names @@ -0,0 +1,449 @@ +{ + "entries": [ + { + "base": "InputDeviceGamepad", + "context": "BehaviorClass", + "variant": "", + "details": { + "name": "Input Device Gamepad", + "category": "Input" + }, + "methods": [ + { + "base": "gamepad_button_l3", + "details": { + "name": "gamepad_button_l3" + }, + "results": [ + { + "typeid": "{3AB0037F-AF8D-48CE-BCA0-A170D18B2C03}", + "details": { + "name": "char" + } + } + ] + }, + { + "base": "gamepad_thumbstick_r_x", + "details": { + "name": "gamepad_thumbstick_r_x" + }, + "results": [ + { + "typeid": "{3AB0037F-AF8D-48CE-BCA0-A170D18B2C03}", + "details": { + "name": "char" + } + } + ] + }, + { + "base": "gamepad_thumbstick_l_up", + "details": { + "name": "gamepad_thumbstick_l_up" + }, + "results": [ + { + "typeid": "{3AB0037F-AF8D-48CE-BCA0-A170D18B2C03}", + "details": { + "name": "char" + } + } + ] + }, + { + "base": "gamepad_trigger_l2", + "details": { + "name": "gamepad_trigger_l2" + }, + "results": [ + { + "typeid": "{3AB0037F-AF8D-48CE-BCA0-A170D18B2C03}", + "details": { + "name": "char" + } + } + ] + }, + { + "base": "gamepad_button_r3", + "details": { + "name": "gamepad_button_r3" + }, + "results": [ + { + "typeid": "{3AB0037F-AF8D-48CE-BCA0-A170D18B2C03}", + "details": { + "name": "char" + } + } + ] + }, + { + "base": "gamepad_thumbstick_r_left", + "details": { + "name": "gamepad_thumbstick_r_left" + }, + "results": [ + { + "typeid": "{3AB0037F-AF8D-48CE-BCA0-A170D18B2C03}", + "details": { + "name": "char" + } + } + ] + }, + { + "base": "gamepad_button_r1", + "details": { + "name": "gamepad_button_r1" + }, + "results": [ + { + "typeid": "{3AB0037F-AF8D-48CE-BCA0-A170D18B2C03}", + "details": { + "name": "char" + } + } + ] + }, + { + "base": "gamepad_button_b", + "details": { + "name": "gamepad_button_b" + }, + "results": [ + { + "typeid": "{3AB0037F-AF8D-48CE-BCA0-A170D18B2C03}", + "details": { + "name": "char" + } + } + ] + }, + { + "base": "gamepad_thumbstick_l", + "details": { + "name": "gamepad_thumbstick_l" + }, + "results": [ + { + "typeid": "{3AB0037F-AF8D-48CE-BCA0-A170D18B2C03}", + "details": { + "name": "char" + } + } + ] + }, + { + "base": "gamepad_button_d_right", + "details": { + "name": "gamepad_button_d_right" + }, + "results": [ + { + "typeid": "{3AB0037F-AF8D-48CE-BCA0-A170D18B2C03}", + "details": { + "name": "char" + } + } + ] + }, + { + "base": "gamepad_thumbstick_r_up", + "details": { + "name": "gamepad_thumbstick_r_up" + }, + "results": [ + { + "typeid": "{3AB0037F-AF8D-48CE-BCA0-A170D18B2C03}", + "details": { + "name": "char" + } + } + ] + }, + { + "base": "gamepad_thumbstick_r_y", + "details": { + "name": "gamepad_thumbstick_r_y" + }, + "results": [ + { + "typeid": "{3AB0037F-AF8D-48CE-BCA0-A170D18B2C03}", + "details": { + "name": "char" + } + } + ] + }, + { + "base": "gamepad_thumbstick_l_left", + "details": { + "name": "gamepad_thumbstick_l_left" + }, + "results": [ + { + "typeid": "{3AB0037F-AF8D-48CE-BCA0-A170D18B2C03}", + "details": { + "name": "char" + } + } + ] + }, + { + "base": "gamepad_thumbstick_r", + "details": { + "name": "gamepad_thumbstick_r" + }, + "results": [ + { + "typeid": "{3AB0037F-AF8D-48CE-BCA0-A170D18B2C03}", + "details": { + "name": "char" + } + } + ] + }, + { + "base": "gamepad_thumbstick_r_right", + "details": { + "name": "gamepad_thumbstick_r_right" + }, + "results": [ + { + "typeid": "{3AB0037F-AF8D-48CE-BCA0-A170D18B2C03}", + "details": { + "name": "char" + } + } + ] + }, + { + "base": "gamepad_button_d_up", + "details": { + "name": "gamepad_button_d_up" + }, + "results": [ + { + "typeid": "{3AB0037F-AF8D-48CE-BCA0-A170D18B2C03}", + "details": { + "name": "char" + } + } + ] + }, + { + "base": "gamepad_thumbstick_l_x", + "details": { + "name": "gamepad_thumbstick_l_x" + }, + "results": [ + { + "typeid": "{3AB0037F-AF8D-48CE-BCA0-A170D18B2C03}", + "details": { + "name": "char" + } + } + ] + }, + { + "base": "gamepad_button_d_down", + "details": { + "name": "gamepad_button_d_down" + }, + "results": [ + { + "typeid": "{3AB0037F-AF8D-48CE-BCA0-A170D18B2C03}", + "details": { + "name": "char" + } + } + ] + }, + { + "base": "gamepad_button_select", + "details": { + "name": "gamepad_button_select" + }, + "results": [ + { + "typeid": "{3AB0037F-AF8D-48CE-BCA0-A170D18B2C03}", + "details": { + "name": "char" + } + } + ] + }, + { + "base": "gamepad_button_y", + "details": { + "name": "gamepad_button_y" + }, + "results": [ + { + "typeid": "{3AB0037F-AF8D-48CE-BCA0-A170D18B2C03}", + "details": { + "name": "char" + } + } + ] + }, + { + "base": "gamepad_thumbstick_l_right", + "details": { + "name": "gamepad_thumbstick_l_right" + }, + "results": [ + { + "typeid": "{3AB0037F-AF8D-48CE-BCA0-A170D18B2C03}", + "details": { + "name": "char" + } + } + ] + }, + { + "base": "gamepad_button_l1", + "details": { + "name": "gamepad_button_l1" + }, + "results": [ + { + "typeid": "{3AB0037F-AF8D-48CE-BCA0-A170D18B2C03}", + "details": { + "name": "char" + } + } + ] + }, + { + "base": "gamepad_thumbstick_l_down", + "details": { + "name": "gamepad_thumbstick_l_down" + }, + "results": [ + { + "typeid": "{3AB0037F-AF8D-48CE-BCA0-A170D18B2C03}", + "details": { + "name": "char" + } + } + ] + }, + { + "base": "Getname", + "details": { + "name": "Get Name" + }, + "results": [ + { + "typeid": "{3AB0037F-AF8D-48CE-BCA0-A170D18B2C03}", + "details": { + "name": "Name" + } + } + ] + }, + { + "base": "gamepad_button_start", + "details": { + "name": "gamepad_button_start" + }, + "results": [ + { + "typeid": "{3AB0037F-AF8D-48CE-BCA0-A170D18B2C03}", + "details": { + "name": "char" + } + } + ] + }, + { + "base": "gamepad_button_x", + "details": { + "name": "gamepad_button_x" + }, + "results": [ + { + "typeid": "{3AB0037F-AF8D-48CE-BCA0-A170D18B2C03}", + "details": { + "name": "char" + } + } + ] + }, + { + "base": "gamepad_button_d_left", + "details": { + "name": "gamepad_button_d_left" + }, + "results": [ + { + "typeid": "{3AB0037F-AF8D-48CE-BCA0-A170D18B2C03}", + "details": { + "name": "char" + } + } + ] + }, + { + "base": "gamepad_trigger_r2", + "details": { + "name": "gamepad_trigger_r2" + }, + "results": [ + { + "typeid": "{3AB0037F-AF8D-48CE-BCA0-A170D18B2C03}", + "details": { + "name": "char" + } + } + ] + }, + { + "base": "gamepad_button_a", + "details": { + "name": "gamepad_button_a" + }, + "results": [ + { + "typeid": "{3AB0037F-AF8D-48CE-BCA0-A170D18B2C03}", + "details": { + "name": "char" + } + } + ] + }, + { + "base": "gamepad_thumbstick_r_down", + "details": { + "name": "gamepad_thumbstick_r_down" + }, + "results": [ + { + "typeid": "{3AB0037F-AF8D-48CE-BCA0-A170D18B2C03}", + "details": { + "name": "char" + } + } + ] + }, + { + "base": "gamepad_thumbstick_l_y", + "details": { + "name": "gamepad_thumbstick_l_y" + }, + "results": [ + { + "typeid": "{3AB0037F-AF8D-48CE-BCA0-A170D18B2C03}", + "details": { + "name": "char" + } + } + ] + } + ] + } + ] +} \ No newline at end of file diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Classes/InputDeviceGestures.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Classes/InputDeviceGestures.names new file mode 100644 index 0000000000..4cd51e56c9 --- /dev/null +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Classes/InputDeviceGestures.names @@ -0,0 +1,113 @@ +{ + "entries": [ + { + "base": "InputDeviceGestures", + "context": "BehaviorClass", + "variant": "", + "details": { + "name": "Input Device Gestures", + "category": "Input" + }, + "methods": [ + { + "base": "gesture_swipe", + "details": { + "name": "gesture_swipe" + }, + "results": [ + { + "typeid": "{3AB0037F-AF8D-48CE-BCA0-A170D18B2C03}", + "details": { + "name": "char" + } + } + ] + }, + { + "base": "gesture_rotate", + "details": { + "name": "gesture_rotate" + }, + "results": [ + { + "typeid": "{3AB0037F-AF8D-48CE-BCA0-A170D18B2C03}", + "details": { + "name": "char" + } + } + ] + }, + { + "base": "gesture_hold", + "details": { + "name": "gesture_hold" + }, + "results": [ + { + "typeid": "{3AB0037F-AF8D-48CE-BCA0-A170D18B2C03}", + "details": { + "name": "char" + } + } + ] + }, + { + "base": "gesture_pinch", + "details": { + "name": "gesture_pinch" + }, + "results": [ + { + "typeid": "{3AB0037F-AF8D-48CE-BCA0-A170D18B2C03}", + "details": { + "name": "char" + } + } + ] + }, + { + "base": "gesture_double_press", + "details": { + "name": "gesture_double_press" + }, + "results": [ + { + "typeid": "{3AB0037F-AF8D-48CE-BCA0-A170D18B2C03}", + "details": { + "name": "char" + } + } + ] + }, + { + "base": "gesture_drag", + "details": { + "name": "gesture_drag" + }, + "results": [ + { + "typeid": "{3AB0037F-AF8D-48CE-BCA0-A170D18B2C03}", + "details": { + "name": "char" + } + } + ] + }, + { + "base": "Getname", + "details": { + "name": "Get Name" + }, + "results": [ + { + "typeid": "{3AB0037F-AF8D-48CE-BCA0-A170D18B2C03}", + "details": { + "name": "Name" + } + } + ] + } + ] + } + ] +} \ No newline at end of file diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Classes/InputDeviceKeyboard.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Classes/InputDeviceKeyboard.names new file mode 100644 index 0000000000..2df09ea536 --- /dev/null +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Classes/InputDeviceKeyboard.names @@ -0,0 +1,1597 @@ +{ + "entries": [ + { + "base": "InputDeviceKeyboard", + "context": "BehaviorClass", + "variant": "", + "details": { + "name": "Input Device Keyboard", + "category": "Input" + }, + "methods": [ + { + "base": "keyboard_key_windows_system_scroll_lock", + "details": { + "name": "keyboard_key_windows_system_scroll_lock" + }, + "results": [ + { + "typeid": "{3AB0037F-AF8D-48CE-BCA0-A170D18B2C03}", + "details": { + "name": "char" + } + } + ] + }, + { + "base": "keyboard_key_punctuation_semicolon", + "details": { + "name": "keyboard_key_punctuation_semicolon" + }, + "results": [ + { + "typeid": "{3AB0037F-AF8D-48CE-BCA0-A170D18B2C03}", + "details": { + "name": "char" + } + } + ] + }, + { + "base": "keyboard_key_alphanumeric_7", + "details": { + "name": "keyboard_key_alphanumeric_ 7" + }, + "results": [ + { + "typeid": "{3AB0037F-AF8D-48CE-BCA0-A170D18B2C03}", + "details": { + "name": "char" + } + } + ] + }, + { + "base": "keyboard_key_function_F11", + "details": { + "name": "keyboard_key_function_F 11" + }, + "results": [ + { + "typeid": "{3AB0037F-AF8D-48CE-BCA0-A170D18B2C03}", + "details": { + "name": "char" + } + } + ] + }, + { + "base": "keyboard_key_alphanumeric_B", + "details": { + "name": "keyboard_key_alphanumeric_B" + }, + "results": [ + { + "typeid": "{3AB0037F-AF8D-48CE-BCA0-A170D18B2C03}", + "details": { + "name": "char" + } + } + ] + }, + { + "base": "keyboard_key_alphanumeric_R", + "details": { + "name": "keyboard_key_alphanumeric_R" + }, + "results": [ + { + "typeid": "{3AB0037F-AF8D-48CE-BCA0-A170D18B2C03}", + "details": { + "name": "char" + } + } + ] + }, + { + "base": "keyboard_key_function_F10", + "details": { + "name": "keyboard_key_function_F 10" + }, + "results": [ + { + "typeid": "{3AB0037F-AF8D-48CE-BCA0-A170D18B2C03}", + "details": { + "name": "char" + } + } + ] + }, + { + "base": "keyboard_key_punctuation_backslash", + "details": { + "name": "keyboard_key_punctuation_backslash" + }, + "results": [ + { + "typeid": "{3AB0037F-AF8D-48CE-BCA0-A170D18B2C03}", + "details": { + "name": "char" + } + } + ] + }, + { + "base": "keyboard_key_punctuation_bracket_r", + "details": { + "name": "keyboard_key_punctuation_bracket_r" + }, + "results": [ + { + "typeid": "{3AB0037F-AF8D-48CE-BCA0-A170D18B2C03}", + "details": { + "name": "char" + } + } + ] + }, + { + "base": "keyboard_key_function_F16", + "details": { + "name": "keyboard_key_function_F 16" + }, + "results": [ + { + "typeid": "{3AB0037F-AF8D-48CE-BCA0-A170D18B2C03}", + "details": { + "name": "char" + } + } + ] + }, + { + "base": "keyboard_key_alphanumeric_5", + "details": { + "name": "keyboard_key_alphanumeric_ 5" + }, + "results": [ + { + "typeid": "{3AB0037F-AF8D-48CE-BCA0-A170D18B2C03}", + "details": { + "name": "char" + } + } + ] + }, + { + "base": "keyboard_key_function_F01", + "details": { + "name": "keyboard_key_function_F 01" + }, + "results": [ + { + "typeid": "{3AB0037F-AF8D-48CE-BCA0-A170D18B2C03}", + "details": { + "name": "char" + } + } + ] + }, + { + "base": "keyboard_key_alphanumeric_A", + "details": { + "name": "keyboard_key_alphanumeric_A" + }, + "results": [ + { + "typeid": "{3AB0037F-AF8D-48CE-BCA0-A170D18B2C03}", + "details": { + "name": "char" + } + } + ] + }, + { + "base": "keyboard_key_punctuation_hyphen", + "details": { + "name": "keyboard_key_punctuation_hyphen" + }, + "results": [ + { + "typeid": "{3AB0037F-AF8D-48CE-BCA0-A170D18B2C03}", + "details": { + "name": "char" + } + } + ] + }, + { + "base": "keyboard_key_numpad_4", + "details": { + "name": "keyboard_key_numpad_ 4" + }, + "results": [ + { + "typeid": "{3AB0037F-AF8D-48CE-BCA0-A170D18B2C03}", + "details": { + "name": "char" + } + } + ] + }, + { + "base": "keyboard_key_alphanumeric_O", + "details": { + "name": "keyboard_key_alphanumeric_O" + }, + "results": [ + { + "typeid": "{3AB0037F-AF8D-48CE-BCA0-A170D18B2C03}", + "details": { + "name": "char" + } + } + ] + }, + { + "base": "keyboard_key_alphanumeric_E", + "details": { + "name": "keyboard_key_alphanumeric_E" + }, + "results": [ + { + "typeid": "{3AB0037F-AF8D-48CE-BCA0-A170D18B2C03}", + "details": { + "name": "char" + } + } + ] + }, + { + "base": "keyboard_key_windows_system_pause", + "details": { + "name": "keyboard_key_windows_system_pause" + }, + "results": [ + { + "typeid": "{3AB0037F-AF8D-48CE-BCA0-A170D18B2C03}", + "details": { + "name": "char" + } + } + ] + }, + { + "base": "keyboard_key_alphanumeric_F", + "details": { + "name": "keyboard_key_alphanumeric_F" + }, + "results": [ + { + "typeid": "{3AB0037F-AF8D-48CE-BCA0-A170D18B2C03}", + "details": { + "name": "char" + } + } + ] + }, + { + "base": "keyboard_key_windows_system_print", + "details": { + "name": "keyboard_key_windows_system_print" + }, + "results": [ + { + "typeid": "{3AB0037F-AF8D-48CE-BCA0-A170D18B2C03}", + "details": { + "name": "char" + } + } + ] + }, + { + "base": "keyboard_key_function_F14", + "details": { + "name": "keyboard_key_function_F 14" + }, + "results": [ + { + "typeid": "{3AB0037F-AF8D-48CE-BCA0-A170D18B2C03}", + "details": { + "name": "char" + } + } + ] + }, + { + "base": "keyboard_key_modifier_alt_l", + "details": { + "name": "keyboard_key_modifier_alt_l" + }, + "results": [ + { + "typeid": "{3AB0037F-AF8D-48CE-BCA0-A170D18B2C03}", + "details": { + "name": "char" + } + } + ] + }, + { + "base": "keyboard_key_edit_space", + "details": { + "name": "keyboard_key_edit_space" + }, + "results": [ + { + "typeid": "{3AB0037F-AF8D-48CE-BCA0-A170D18B2C03}", + "details": { + "name": "char" + } + } + ] + }, + { + "base": "keyboard_key_numpad_1", + "details": { + "name": "keyboard_key_numpad_ 1" + }, + "results": [ + { + "typeid": "{3AB0037F-AF8D-48CE-BCA0-A170D18B2C03}", + "details": { + "name": "char" + } + } + ] + }, + { + "base": "keyboard_key_function_F02", + "details": { + "name": "keyboard_key_function_F 02" + }, + "results": [ + { + "typeid": "{3AB0037F-AF8D-48CE-BCA0-A170D18B2C03}", + "details": { + "name": "char" + } + } + ] + }, + { + "base": "keyboard_key_numpad_enter", + "details": { + "name": "keyboard_key_numpad_enter" + }, + "results": [ + { + "typeid": "{3AB0037F-AF8D-48CE-BCA0-A170D18B2C03}", + "details": { + "name": "char" + } + } + ] + }, + { + "base": "keyboard_key_alphanumeric_1", + "details": { + "name": "keyboard_key_alphanumeric_ 1" + }, + "results": [ + { + "typeid": "{3AB0037F-AF8D-48CE-BCA0-A170D18B2C03}", + "details": { + "name": "char" + } + } + ] + }, + { + "base": "keyboard_key_modifier_ctrl_r", + "details": { + "name": "keyboard_key_modifier_ctrl_r" + }, + "results": [ + { + "typeid": "{3AB0037F-AF8D-48CE-BCA0-A170D18B2C03}", + "details": { + "name": "char" + } + } + ] + }, + { + "base": "keyboard_key_alphanumeric_D", + "details": { + "name": "keyboard_key_alphanumeric_D" + }, + "results": [ + { + "typeid": "{3AB0037F-AF8D-48CE-BCA0-A170D18B2C03}", + "details": { + "name": "char" + } + } + ] + }, + { + "base": "keyboard_key_num_lock", + "details": { + "name": "keyboard_key_num_lock" + }, + "results": [ + { + "typeid": "{3AB0037F-AF8D-48CE-BCA0-A170D18B2C03}", + "details": { + "name": "char" + } + } + ] + }, + { + "base": "keyboard_key_numpad_decimal", + "details": { + "name": "keyboard_key_numpad_decimal" + }, + "results": [ + { + "typeid": "{3AB0037F-AF8D-48CE-BCA0-A170D18B2C03}", + "details": { + "name": "char" + } + } + ] + }, + { + "base": "keyboard_key_alphanumeric_8", + "details": { + "name": "keyboard_key_alphanumeric_ 8" + }, + "results": [ + { + "typeid": "{3AB0037F-AF8D-48CE-BCA0-A170D18B2C03}", + "details": { + "name": "char" + } + } + ] + }, + { + "base": "keyboard_key_alphanumeric_V", + "details": { + "name": "keyboard_key_alphanumeric_V" + }, + "results": [ + { + "typeid": "{3AB0037F-AF8D-48CE-BCA0-A170D18B2C03}", + "details": { + "name": "char" + } + } + ] + }, + { + "base": "keyboard_key_navigation_home", + "details": { + "name": "keyboard_key_navigation_home" + }, + "results": [ + { + "typeid": "{3AB0037F-AF8D-48CE-BCA0-A170D18B2C03}", + "details": { + "name": "char" + } + } + ] + }, + { + "base": "Getname", + "details": { + "name": "Get Name" + }, + "results": [ + { + "typeid": "{3AB0037F-AF8D-48CE-BCA0-A170D18B2C03}", + "details": { + "name": "Name" + } + } + ] + }, + { + "base": "keyboard_key_numpad_5", + "details": { + "name": "keyboard_key_numpad_ 5" + }, + "results": [ + { + "typeid": "{3AB0037F-AF8D-48CE-BCA0-A170D18B2C03}", + "details": { + "name": "char" + } + } + ] + }, + { + "base": "keyboard_key_alphanumeric_H", + "details": { + "name": "keyboard_key_alphanumeric_H" + }, + "results": [ + { + "typeid": "{3AB0037F-AF8D-48CE-BCA0-A170D18B2C03}", + "details": { + "name": "char" + } + } + ] + }, + { + "base": "keyboard_key_punctuation_tilde", + "details": { + "name": "keyboard_key_punctuation_tilde" + }, + "results": [ + { + "typeid": "{3AB0037F-AF8D-48CE-BCA0-A170D18B2C03}", + "details": { + "name": "char" + } + } + ] + }, + { + "base": "keyboard_key_navigation_end", + "details": { + "name": "keyboard_key_navigation_end" + }, + "results": [ + { + "typeid": "{3AB0037F-AF8D-48CE-BCA0-A170D18B2C03}", + "details": { + "name": "char" + } + } + ] + }, + { + "base": "keyboard_key_punctuation_equals", + "details": { + "name": "keyboard_key_punctuation_equals" + }, + "results": [ + { + "typeid": "{3AB0037F-AF8D-48CE-BCA0-A170D18B2C03}", + "details": { + "name": "char" + } + } + ] + }, + { + "base": "keyboard_key_alphanumeric_0", + "details": { + "name": "keyboard_key_alphanumeric_ 0" + }, + "results": [ + { + "typeid": "{3AB0037F-AF8D-48CE-BCA0-A170D18B2C03}", + "details": { + "name": "char" + } + } + ] + }, + { + "base": "keyboard_key_function_F13", + "details": { + "name": "keyboard_key_function_F 13" + }, + "results": [ + { + "typeid": "{3AB0037F-AF8D-48CE-BCA0-A170D18B2C03}", + "details": { + "name": "char" + } + } + ] + }, + { + "base": "keyboard_key_punctuation_period", + "details": { + "name": "keyboard_key_punctuation_period" + }, + "results": [ + { + "typeid": "{3AB0037F-AF8D-48CE-BCA0-A170D18B2C03}", + "details": { + "name": "char" + } + } + ] + }, + { + "base": "keyboard_key_alphanumeric_U", + "details": { + "name": "keyboard_key_alphanumeric_U" + }, + "results": [ + { + "typeid": "{3AB0037F-AF8D-48CE-BCA0-A170D18B2C03}", + "details": { + "name": "char" + } + } + ] + }, + { + "base": "keyboard_key_navigation_page_down", + "details": { + "name": "keyboard_key_navigation_page_down" + }, + "results": [ + { + "typeid": "{3AB0037F-AF8D-48CE-BCA0-A170D18B2C03}", + "details": { + "name": "char" + } + } + ] + }, + { + "base": "keyboard_key_alphanumeric_T", + "details": { + "name": "keyboard_key_alphanumeric_T" + }, + "results": [ + { + "typeid": "{3AB0037F-AF8D-48CE-BCA0-A170D18B2C03}", + "details": { + "name": "char" + } + } + ] + }, + { + "base": "keyboard_key_modifier_super_r", + "details": { + "name": "keyboard_key_modifier_super_r" + }, + "results": [ + { + "typeid": "{3AB0037F-AF8D-48CE-BCA0-A170D18B2C03}", + "details": { + "name": "char" + } + } + ] + }, + { + "base": "keyboard_key_alphanumeric_3", + "details": { + "name": "keyboard_key_alphanumeric_ 3" + }, + "results": [ + { + "typeid": "{3AB0037F-AF8D-48CE-BCA0-A170D18B2C03}", + "details": { + "name": "char" + } + } + ] + }, + { + "base": "keyboard_key_numpad_2", + "details": { + "name": "keyboard_key_numpad_ 2" + }, + "results": [ + { + "typeid": "{3AB0037F-AF8D-48CE-BCA0-A170D18B2C03}", + "details": { + "name": "char" + } + } + ] + }, + { + "base": "keyboard_key_alphanumeric_I", + "details": { + "name": "keyboard_key_alphanumeric_I" + }, + "results": [ + { + "typeid": "{3AB0037F-AF8D-48CE-BCA0-A170D18B2C03}", + "details": { + "name": "char" + } + } + ] + }, + { + "base": "keyboard_key_numpad_divide", + "details": { + "name": "keyboard_key_numpad_divide" + }, + "results": [ + { + "typeid": "{3AB0037F-AF8D-48CE-BCA0-A170D18B2C03}", + "details": { + "name": "char" + } + } + ] + }, + { + "base": "keyboard_key_navigation_arrow_left", + "details": { + "name": "keyboard_key_navigation_arrow_left" + }, + "results": [ + { + "typeid": "{3AB0037F-AF8D-48CE-BCA0-A170D18B2C03}", + "details": { + "name": "char" + } + } + ] + }, + { + "base": "keyboard_key_edit_capslock", + "details": { + "name": "keyboard_key_edit_capslock" + }, + "results": [ + { + "typeid": "{3AB0037F-AF8D-48CE-BCA0-A170D18B2C03}", + "details": { + "name": "char" + } + } + ] + }, + { + "base": "keyboard_key_alphanumeric_S", + "details": { + "name": "keyboard_key_alphanumeric_S" + }, + "results": [ + { + "typeid": "{3AB0037F-AF8D-48CE-BCA0-A170D18B2C03}", + "details": { + "name": "char" + } + } + ] + }, + { + "base": "keyboard_key_alphanumeric_G", + "details": { + "name": "keyboard_key_alphanumeric_G" + }, + "results": [ + { + "typeid": "{3AB0037F-AF8D-48CE-BCA0-A170D18B2C03}", + "details": { + "name": "char" + } + } + ] + }, + { + "base": "keyboard_key_function_F03", + "details": { + "name": "keyboard_key_function_F 03" + }, + "results": [ + { + "typeid": "{3AB0037F-AF8D-48CE-BCA0-A170D18B2C03}", + "details": { + "name": "char" + } + } + ] + }, + { + "base": "keyboard_key_escape", + "details": { + "name": "keyboard_key_escape" + }, + "results": [ + { + "typeid": "{3AB0037F-AF8D-48CE-BCA0-A170D18B2C03}", + "details": { + "name": "char" + } + } + ] + }, + { + "base": "keyboard_key_function_F15", + "details": { + "name": "keyboard_key_function_F 15" + }, + "results": [ + { + "typeid": "{3AB0037F-AF8D-48CE-BCA0-A170D18B2C03}", + "details": { + "name": "char" + } + } + ] + }, + { + "base": "keyboard_key_modifier_super_l", + "details": { + "name": "keyboard_key_modifier_super_l" + }, + "results": [ + { + "typeid": "{3AB0037F-AF8D-48CE-BCA0-A170D18B2C03}", + "details": { + "name": "char" + } + } + ] + }, + { + "base": "keyboard_key_alphanumeric_4", + "details": { + "name": "keyboard_key_alphanumeric_ 4" + }, + "results": [ + { + "typeid": "{3AB0037F-AF8D-48CE-BCA0-A170D18B2C03}", + "details": { + "name": "char" + } + } + ] + }, + { + "base": "keyboard_key_navigation_arrow_up", + "details": { + "name": "keyboard_key_navigation_arrow_up" + }, + "results": [ + { + "typeid": "{3AB0037F-AF8D-48CE-BCA0-A170D18B2C03}", + "details": { + "name": "char" + } + } + ] + }, + { + "base": "keyboard_key_function_F17", + "details": { + "name": "keyboard_key_function_F 17" + }, + "results": [ + { + "typeid": "{3AB0037F-AF8D-48CE-BCA0-A170D18B2C03}", + "details": { + "name": "char" + } + } + ] + }, + { + "base": "keyboard_key_alphanumeric_6", + "details": { + "name": "keyboard_key_alphanumeric_ 6" + }, + "results": [ + { + "typeid": "{3AB0037F-AF8D-48CE-BCA0-A170D18B2C03}", + "details": { + "name": "char" + } + } + ] + }, + { + "base": "keyboard_key_modifier_alt_r", + "details": { + "name": "keyboard_key_modifier_alt_r" + }, + "results": [ + { + "typeid": "{3AB0037F-AF8D-48CE-BCA0-A170D18B2C03}", + "details": { + "name": "char" + } + } + ] + }, + { + "base": "keyboard_key_alphanumeric_Q", + "details": { + "name": "keyboard_key_alphanumeric_Q" + }, + "results": [ + { + "typeid": "{3AB0037F-AF8D-48CE-BCA0-A170D18B2C03}", + "details": { + "name": "char" + } + } + ] + }, + { + "base": "keyboard_key_numpad_subtract", + "details": { + "name": "keyboard_key_numpad_subtract" + }, + "results": [ + { + "typeid": "{3AB0037F-AF8D-48CE-BCA0-A170D18B2C03}", + "details": { + "name": "char" + } + } + ] + }, + { + "base": "keyboard_key_alphanumeric_X", + "details": { + "name": "keyboard_key_alphanumeric_X" + }, + "results": [ + { + "typeid": "{3AB0037F-AF8D-48CE-BCA0-A170D18B2C03}", + "details": { + "name": "char" + } + } + ] + }, + { + "base": "keyboard_key_navigation_delete", + "details": { + "name": "keyboard_key_navigation_delete" + }, + "results": [ + { + "typeid": "{3AB0037F-AF8D-48CE-BCA0-A170D18B2C03}", + "details": { + "name": "char" + } + } + ] + }, + { + "base": "keyboard_key_punctuation_bracket_l", + "details": { + "name": "keyboard_key_punctuation_bracket_l" + }, + "results": [ + { + "typeid": "{3AB0037F-AF8D-48CE-BCA0-A170D18B2C03}", + "details": { + "name": "char" + } + } + ] + }, + { + "base": "keyboard_key_numpad_8", + "details": { + "name": "keyboard_key_numpad_ 8" + }, + "results": [ + { + "typeid": "{3AB0037F-AF8D-48CE-BCA0-A170D18B2C03}", + "details": { + "name": "char" + } + } + ] + }, + { + "base": "keyboard_key_function_F07", + "details": { + "name": "keyboard_key_function_F 07" + }, + "results": [ + { + "typeid": "{3AB0037F-AF8D-48CE-BCA0-A170D18B2C03}", + "details": { + "name": "char" + } + } + ] + }, + { + "base": "keyboard_key_alphanumeric_C", + "details": { + "name": "keyboard_key_alphanumeric_C" + }, + "results": [ + { + "typeid": "{3AB0037F-AF8D-48CE-BCA0-A170D18B2C03}", + "details": { + "name": "char" + } + } + ] + }, + { + "base": "keyboard_key_function_F20", + "details": { + "name": "keyboard_key_function_F 20" + }, + "results": [ + { + "typeid": "{3AB0037F-AF8D-48CE-BCA0-A170D18B2C03}", + "details": { + "name": "char" + } + } + ] + }, + { + "base": "keyboard_key_navigation_insert", + "details": { + "name": "keyboard_key_navigation_insert" + }, + "results": [ + { + "typeid": "{3AB0037F-AF8D-48CE-BCA0-A170D18B2C03}", + "details": { + "name": "char" + } + } + ] + }, + { + "base": "keyboard_key_navigation_page_up", + "details": { + "name": "keyboard_key_navigation_page_up" + }, + "results": [ + { + "typeid": "{3AB0037F-AF8D-48CE-BCA0-A170D18B2C03}", + "details": { + "name": "char" + } + } + ] + }, + { + "base": "keyboard_key_alphanumeric_2", + "details": { + "name": "keyboard_key_alphanumeric_ 2" + }, + "results": [ + { + "typeid": "{3AB0037F-AF8D-48CE-BCA0-A170D18B2C03}", + "details": { + "name": "char" + } + } + ] + }, + { + "base": "keyboard_key_modifier_shift_l", + "details": { + "name": "keyboard_key_modifier_shift_l" + }, + "results": [ + { + "typeid": "{3AB0037F-AF8D-48CE-BCA0-A170D18B2C03}", + "details": { + "name": "char" + } + } + ] + }, + { + "base": "keyboard_key_alphanumeric_P", + "details": { + "name": "keyboard_key_alphanumeric_P" + }, + "results": [ + { + "typeid": "{3AB0037F-AF8D-48CE-BCA0-A170D18B2C03}", + "details": { + "name": "char" + } + } + ] + }, + { + "base": "keyboard_key_punctuation_apostrophe", + "details": { + "name": "keyboard_key_punctuation_apostrophe" + }, + "results": [ + { + "typeid": "{3AB0037F-AF8D-48CE-BCA0-A170D18B2C03}", + "details": { + "name": "char" + } + } + ] + }, + { + "base": "keyboard_key_alphanumeric_Y", + "details": { + "name": "keyboard_key_alphanumeric_Y" + }, + "results": [ + { + "typeid": "{3AB0037F-AF8D-48CE-BCA0-A170D18B2C03}", + "details": { + "name": "char" + } + } + ] + }, + { + "base": "keyboard_key_function_F09", + "details": { + "name": "keyboard_key_function_F 09" + }, + "results": [ + { + "typeid": "{3AB0037F-AF8D-48CE-BCA0-A170D18B2C03}", + "details": { + "name": "char" + } + } + ] + }, + { + "base": "keyboard_key_numpad_9", + "details": { + "name": "keyboard_key_numpad_ 9" + }, + "results": [ + { + "typeid": "{3AB0037F-AF8D-48CE-BCA0-A170D18B2C03}", + "details": { + "name": "char" + } + } + ] + }, + { + "base": "keyboard_key_function_F06", + "details": { + "name": "keyboard_key_function_F 06" + }, + "results": [ + { + "typeid": "{3AB0037F-AF8D-48CE-BCA0-A170D18B2C03}", + "details": { + "name": "char" + } + } + ] + }, + { + "base": "keyboard_key_alphanumeric_L", + "details": { + "name": "keyboard_key_alphanumeric_L" + }, + "results": [ + { + "typeid": "{3AB0037F-AF8D-48CE-BCA0-A170D18B2C03}", + "details": { + "name": "char" + } + } + ] + }, + { + "base": "keyboard_key_punctuation_slash", + "details": { + "name": "keyboard_key_punctuation_slash" + }, + "results": [ + { + "typeid": "{3AB0037F-AF8D-48CE-BCA0-A170D18B2C03}", + "details": { + "name": "char" + } + } + ] + }, + { + "base": "keyboard_key_function_F19", + "details": { + "name": "keyboard_key_function_F 19" + }, + "results": [ + { + "typeid": "{3AB0037F-AF8D-48CE-BCA0-A170D18B2C03}", + "details": { + "name": "char" + } + } + ] + }, + { + "base": "keyboard_key_alphanumeric_K", + "details": { + "name": "keyboard_key_alphanumeric_K" + }, + "results": [ + { + "typeid": "{3AB0037F-AF8D-48CE-BCA0-A170D18B2C03}", + "details": { + "name": "char" + } + } + ] + }, + { + "base": "keyboard_key_numpad_0", + "details": { + "name": "keyboard_key_numpad_ 0" + }, + "results": [ + { + "typeid": "{3AB0037F-AF8D-48CE-BCA0-A170D18B2C03}", + "details": { + "name": "char" + } + } + ] + }, + { + "base": "keyboard_key_edit_enter", + "details": { + "name": "keyboard_key_edit_enter" + }, + "results": [ + { + "typeid": "{3AB0037F-AF8D-48CE-BCA0-A170D18B2C03}", + "details": { + "name": "char" + } + } + ] + }, + { + "base": "keyboard_key_numpad_multiply", + "details": { + "name": "keyboard_key_numpad_multiply" + }, + "results": [ + { + "typeid": "{3AB0037F-AF8D-48CE-BCA0-A170D18B2C03}", + "details": { + "name": "char" + } + } + ] + }, + { + "base": "keyboard_key_alphanumeric_Z", + "details": { + "name": "keyboard_key_alphanumeric_Z" + }, + "results": [ + { + "typeid": "{3AB0037F-AF8D-48CE-BCA0-A170D18B2C03}", + "details": { + "name": "char" + } + } + ] + }, + { + "base": "keyboard_key_function_F08", + "details": { + "name": "keyboard_key_function_F 08" + }, + "results": [ + { + "typeid": "{3AB0037F-AF8D-48CE-BCA0-A170D18B2C03}", + "details": { + "name": "char" + } + } + ] + }, + { + "base": "keyboard_key_numpad_3", + "details": { + "name": "keyboard_key_numpad_ 3" + }, + "results": [ + { + "typeid": "{3AB0037F-AF8D-48CE-BCA0-A170D18B2C03}", + "details": { + "name": "char" + } + } + ] + }, + { + "base": "keyboard_key_edit_tab", + "details": { + "name": "keyboard_key_edit_tab" + }, + "results": [ + { + "typeid": "{3AB0037F-AF8D-48CE-BCA0-A170D18B2C03}", + "details": { + "name": "char" + } + } + ] + }, + { + "base": "keyboard_key_function_F18", + "details": { + "name": "keyboard_key_function_F 18" + }, + "results": [ + { + "typeid": "{3AB0037F-AF8D-48CE-BCA0-A170D18B2C03}", + "details": { + "name": "char" + } + } + ] + }, + { + "base": "keyboard_key_modifier_shift_r", + "details": { + "name": "keyboard_key_modifier_shift_r" + }, + "results": [ + { + "typeid": "{3AB0037F-AF8D-48CE-BCA0-A170D18B2C03}", + "details": { + "name": "char" + } + } + ] + }, + { + "base": "keyboard_key_alphanumeric_J", + "details": { + "name": "keyboard_key_alphanumeric_J" + }, + "results": [ + { + "typeid": "{3AB0037F-AF8D-48CE-BCA0-A170D18B2C03}", + "details": { + "name": "char" + } + } + ] + }, + { + "base": "keyboard_key_punctuation_comma", + "details": { + "name": "keyboard_key_punctuation_comma" + }, + "results": [ + { + "typeid": "{3AB0037F-AF8D-48CE-BCA0-A170D18B2C03}", + "details": { + "name": "char" + } + } + ] + }, + { + "base": "keyboard_key_supplementary_iso", + "details": { + "name": "keyboard_key_supplementary_iso" + }, + "results": [ + { + "typeid": "{3AB0037F-AF8D-48CE-BCA0-A170D18B2C03}", + "details": { + "name": "char" + } + } + ] + }, + { + "base": "keyboard_key_navigation_arrow_right", + "details": { + "name": "keyboard_key_navigation_arrow_right" + }, + "results": [ + { + "typeid": "{3AB0037F-AF8D-48CE-BCA0-A170D18B2C03}", + "details": { + "name": "char" + } + } + ] + }, + { + "base": "keyboard_key_edit_backspace", + "details": { + "name": "keyboard_key_edit_backspace" + }, + "results": [ + { + "typeid": "{3AB0037F-AF8D-48CE-BCA0-A170D18B2C03}", + "details": { + "name": "char" + } + } + ] + }, + { + "base": "keyboard_key_function_F12", + "details": { + "name": "keyboard_key_function_F 12" + }, + "results": [ + { + "typeid": "{3AB0037F-AF8D-48CE-BCA0-A170D18B2C03}", + "details": { + "name": "char" + } + } + ] + }, + { + "base": "keyboard_key_navigation_arrow_down", + "details": { + "name": "keyboard_key_navigation_arrow_down" + }, + "results": [ + { + "typeid": "{3AB0037F-AF8D-48CE-BCA0-A170D18B2C03}", + "details": { + "name": "char" + } + } + ] + }, + { + "base": "keyboard_key_numpad_add", + "details": { + "name": "keyboard_key_numpad_add" + }, + "results": [ + { + "typeid": "{3AB0037F-AF8D-48CE-BCA0-A170D18B2C03}", + "details": { + "name": "char" + } + } + ] + }, + { + "base": "keyboard_key_numpad_6", + "details": { + "name": "keyboard_key_numpad_ 6" + }, + "results": [ + { + "typeid": "{3AB0037F-AF8D-48CE-BCA0-A170D18B2C03}", + "details": { + "name": "char" + } + } + ] + }, + { + "base": "keyboard_key_function_F05", + "details": { + "name": "keyboard_key_function_F 05" + }, + "results": [ + { + "typeid": "{3AB0037F-AF8D-48CE-BCA0-A170D18B2C03}", + "details": { + "name": "char" + } + } + ] + }, + { + "base": "keyboard_key_alphanumeric_M", + "details": { + "name": "keyboard_key_alphanumeric_M" + }, + "results": [ + { + "typeid": "{3AB0037F-AF8D-48CE-BCA0-A170D18B2C03}", + "details": { + "name": "char" + } + } + ] + }, + { + "base": "keyboard_key_modifier_ctrl_l", + "details": { + "name": "keyboard_key_modifier_ctrl_l" + }, + "results": [ + { + "typeid": "{3AB0037F-AF8D-48CE-BCA0-A170D18B2C03}", + "details": { + "name": "char" + } + } + ] + }, + { + "base": "keyboard_key_alphanumeric_W", + "details": { + "name": "keyboard_key_alphanumeric_W" + }, + "results": [ + { + "typeid": "{3AB0037F-AF8D-48CE-BCA0-A170D18B2C03}", + "details": { + "name": "char" + } + } + ] + }, + { + "base": "keyboard_key_alphanumeric_9", + "details": { + "name": "keyboard_key_alphanumeric_ 9" + }, + "results": [ + { + "typeid": "{3AB0037F-AF8D-48CE-BCA0-A170D18B2C03}", + "details": { + "name": "char" + } + } + ] + }, + { + "base": "keyboard_key_function_F04", + "details": { + "name": "keyboard_key_function_F 04" + }, + "results": [ + { + "typeid": "{3AB0037F-AF8D-48CE-BCA0-A170D18B2C03}", + "details": { + "name": "char" + } + } + ] + }, + { + "base": "keyboard_key_alphanumeric_N", + "details": { + "name": "keyboard_key_alphanumeric_N" + }, + "results": [ + { + "typeid": "{3AB0037F-AF8D-48CE-BCA0-A170D18B2C03}", + "details": { + "name": "char" + } + } + ] + }, + { + "base": "keyboard_key_numpad_7", + "details": { + "name": "keyboard_key_numpad_ 7" + }, + "results": [ + { + "typeid": "{3AB0037F-AF8D-48CE-BCA0-A170D18B2C03}", + "details": { + "name": "char" + } + } + ] + } + ] + } + ] +} \ No newline at end of file diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Classes/InputDeviceMotion.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Classes/InputDeviceMotion.names new file mode 100644 index 0000000000..e265506eef --- /dev/null +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Classes/InputDeviceMotion.names @@ -0,0 +1,155 @@ +{ + "entries": [ + { + "base": "InputDeviceMotion", + "context": "BehaviorClass", + "variant": "", + "details": { + "name": "Input Device Motion", + "category": "Input" + }, + "methods": [ + { + "base": "motion_orientation_current", + "details": { + "name": "motion_orientation_current" + }, + "results": [ + { + "typeid": "{3AB0037F-AF8D-48CE-BCA0-A170D18B2C03}", + "details": { + "name": "char" + } + } + ] + }, + { + "base": "motion_rotation_rate_unbiased", + "details": { + "name": "motion_rotation_rate_unbiased" + }, + "results": [ + { + "typeid": "{3AB0037F-AF8D-48CE-BCA0-A170D18B2C03}", + "details": { + "name": "char" + } + } + ] + }, + { + "base": "motion_rotation_rate_raw", + "details": { + "name": "motion_rotation_rate_raw" + }, + "results": [ + { + "typeid": "{3AB0037F-AF8D-48CE-BCA0-A170D18B2C03}", + "details": { + "name": "char" + } + } + ] + }, + { + "base": "motion_magnetic_field_north", + "details": { + "name": "motion_magnetic_field_north" + }, + "results": [ + { + "typeid": "{3AB0037F-AF8D-48CE-BCA0-A170D18B2C03}", + "details": { + "name": "char" + } + } + ] + }, + { + "base": "motion_acceleration_gravity", + "details": { + "name": "motion_acceleration_gravity" + }, + "results": [ + { + "typeid": "{3AB0037F-AF8D-48CE-BCA0-A170D18B2C03}", + "details": { + "name": "char" + } + } + ] + }, + { + "base": "Getname", + "details": { + "name": "Get Name" + }, + "results": [ + { + "typeid": "{3AB0037F-AF8D-48CE-BCA0-A170D18B2C03}", + "details": { + "name": "Name" + } + } + ] + }, + { + "base": "motion_acceleration_raw", + "details": { + "name": "motion_acceleration_raw" + }, + "results": [ + { + "typeid": "{3AB0037F-AF8D-48CE-BCA0-A170D18B2C03}", + "details": { + "name": "char" + } + } + ] + }, + { + "base": "motion_acceleration_user", + "details": { + "name": "motion_acceleration_user" + }, + "results": [ + { + "typeid": "{3AB0037F-AF8D-48CE-BCA0-A170D18B2C03}", + "details": { + "name": "char" + } + } + ] + }, + { + "base": "motion_magnetic_field_raw", + "details": { + "name": "motion_magnetic_field_raw" + }, + "results": [ + { + "typeid": "{3AB0037F-AF8D-48CE-BCA0-A170D18B2C03}", + "details": { + "name": "char" + } + } + ] + }, + { + "base": "motion_magnetic_field_unbiased", + "details": { + "name": "motion_magnetic_field_unbiased" + }, + "results": [ + { + "typeid": "{3AB0037F-AF8D-48CE-BCA0-A170D18B2C03}", + "details": { + "name": "char" + } + } + ] + } + ] + } + ] +} \ No newline at end of file diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Classes/InputDeviceMouse.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Classes/InputDeviceMouse.names new file mode 100644 index 0000000000..c4f7f76a77 --- /dev/null +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Classes/InputDeviceMouse.names @@ -0,0 +1,141 @@ +{ + "entries": [ + { + "base": "InputDeviceMouse", + "context": "BehaviorClass", + "variant": "", + "details": { + "name": "Input Device Mouse", + "category": "Input" + }, + "methods": [ + { + "base": "mouse_delta_z", + "details": { + "name": "mouse_delta_z" + }, + "results": [ + { + "typeid": "{3AB0037F-AF8D-48CE-BCA0-A170D18B2C03}", + "details": { + "name": "char" + } + } + ] + }, + { + "base": "mouse_button_other2", + "details": { + "name": "mouse_button_other 2" + }, + "results": [ + { + "typeid": "{3AB0037F-AF8D-48CE-BCA0-A170D18B2C03}", + "details": { + "name": "char" + } + } + ] + }, + { + "base": "mouse_delta_x", + "details": { + "name": "mouse_delta_x" + }, + "results": [ + { + "typeid": "{3AB0037F-AF8D-48CE-BCA0-A170D18B2C03}", + "details": { + "name": "char" + } + } + ] + }, + { + "base": "mouse_button_middle", + "details": { + "name": "mouse_button_middle" + }, + "results": [ + { + "typeid": "{3AB0037F-AF8D-48CE-BCA0-A170D18B2C03}", + "details": { + "name": "char" + } + } + ] + }, + { + "base": "mouse_delta_y", + "details": { + "name": "mouse_delta_y" + }, + "results": [ + { + "typeid": "{3AB0037F-AF8D-48CE-BCA0-A170D18B2C03}", + "details": { + "name": "char" + } + } + ] + }, + { + "base": "mouse_button_right", + "details": { + "name": "mouse_button_right" + }, + "results": [ + { + "typeid": "{3AB0037F-AF8D-48CE-BCA0-A170D18B2C03}", + "details": { + "name": "char" + } + } + ] + }, + { + "base": "mouse_button_left", + "details": { + "name": "mouse_button_left" + }, + "results": [ + { + "typeid": "{3AB0037F-AF8D-48CE-BCA0-A170D18B2C03}", + "details": { + "name": "char" + } + } + ] + }, + { + "base": "Getname", + "details": { + "name": "Get Name" + }, + "results": [ + { + "typeid": "{3AB0037F-AF8D-48CE-BCA0-A170D18B2C03}", + "details": { + "name": "Name" + } + } + ] + }, + { + "base": "mouse_button_other1", + "details": { + "name": "mouse_button_other 1" + }, + "results": [ + { + "typeid": "{3AB0037F-AF8D-48CE-BCA0-A170D18B2C03}", + "details": { + "name": "char" + } + } + ] + } + ] + } + ] +} \ No newline at end of file diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Classes/InputDeviceTouch.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Classes/InputDeviceTouch.names new file mode 100644 index 0000000000..aa37285487 --- /dev/null +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Classes/InputDeviceTouch.names @@ -0,0 +1,169 @@ +{ + "entries": [ + { + "base": "InputDeviceTouch", + "context": "BehaviorClass", + "variant": "", + "details": { + "name": "Input Device Touch", + "category": "Input" + }, + "methods": [ + { + "base": "touch_index_7", + "details": { + "name": "touch_index_ 7" + }, + "results": [ + { + "typeid": "{3AB0037F-AF8D-48CE-BCA0-A170D18B2C03}", + "details": { + "name": "char" + } + } + ] + }, + { + "base": "touch_index_8", + "details": { + "name": "touch_index_ 8" + }, + "results": [ + { + "typeid": "{3AB0037F-AF8D-48CE-BCA0-A170D18B2C03}", + "details": { + "name": "char" + } + } + ] + }, + { + "base": "touch_index_6", + "details": { + "name": "touch_index_ 6" + }, + "results": [ + { + "typeid": "{3AB0037F-AF8D-48CE-BCA0-A170D18B2C03}", + "details": { + "name": "char" + } + } + ] + }, + { + "base": "touch_index_5", + "details": { + "name": "touch_index_ 5" + }, + "results": [ + { + "typeid": "{3AB0037F-AF8D-48CE-BCA0-A170D18B2C03}", + "details": { + "name": "char" + } + } + ] + }, + { + "base": "touch_index_3", + "details": { + "name": "touch_index_ 3" + }, + "results": [ + { + "typeid": "{3AB0037F-AF8D-48CE-BCA0-A170D18B2C03}", + "details": { + "name": "char" + } + } + ] + }, + { + "base": "touch_index_4", + "details": { + "name": "touch_index_ 4" + }, + "results": [ + { + "typeid": "{3AB0037F-AF8D-48CE-BCA0-A170D18B2C03}", + "details": { + "name": "char" + } + } + ] + }, + { + "base": "touch_index_2", + "details": { + "name": "touch_index_ 2" + }, + "results": [ + { + "typeid": "{3AB0037F-AF8D-48CE-BCA0-A170D18B2C03}", + "details": { + "name": "char" + } + } + ] + }, + { + "base": "touch_index_0", + "details": { + "name": "touch_index_ 0" + }, + "results": [ + { + "typeid": "{3AB0037F-AF8D-48CE-BCA0-A170D18B2C03}", + "details": { + "name": "char" + } + } + ] + }, + { + "base": "touch_index_9", + "details": { + "name": "touch_index_ 9" + }, + "results": [ + { + "typeid": "{3AB0037F-AF8D-48CE-BCA0-A170D18B2C03}", + "details": { + "name": "char" + } + } + ] + }, + { + "base": "Getname", + "details": { + "name": "Get Name" + }, + "results": [ + { + "typeid": "{3AB0037F-AF8D-48CE-BCA0-A170D18B2C03}", + "details": { + "name": "Name" + } + } + ] + }, + { + "base": "touch_index_1", + "details": { + "name": "touch_index_ 1" + }, + "results": [ + { + "typeid": "{3AB0037F-AF8D-48CE-BCA0-A170D18B2C03}", + "details": { + "name": "char" + } + } + ] + } + ] + } + ] +} \ No newline at end of file diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Classes/InputDeviceVirtualKeyboard.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Classes/InputDeviceVirtualKeyboard.names new file mode 100644 index 0000000000..71162dbc06 --- /dev/null +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Classes/InputDeviceVirtualKeyboard.names @@ -0,0 +1,71 @@ +{ + "entries": [ + { + "base": "InputDeviceVirtualKeyboard", + "context": "BehaviorClass", + "variant": "", + "details": { + "name": "Input Device Virtual Keyboard", + "category": "Input" + }, + "methods": [ + { + "base": "Getname", + "details": { + "name": "Get Name" + }, + "results": [ + { + "typeid": "{3AB0037F-AF8D-48CE-BCA0-A170D18B2C03}", + "details": { + "name": "Name" + } + } + ] + }, + { + "base": "virtual_keyboard_edit_enter", + "details": { + "name": "virtual_keyboard_edit_enter" + }, + "results": [ + { + "typeid": "{3AB0037F-AF8D-48CE-BCA0-A170D18B2C03}", + "details": { + "name": "char" + } + } + ] + }, + { + "base": "virtual_keyboard_edit_clear", + "details": { + "name": "virtual_keyboard_edit_clear" + }, + "results": [ + { + "typeid": "{3AB0037F-AF8D-48CE-BCA0-A170D18B2C03}", + "details": { + "name": "char" + } + } + ] + }, + { + "base": "virtual_keyboard_navigation_back", + "details": { + "name": "virtual_keyboard_navigation_back" + }, + "results": [ + { + "typeid": "{3AB0037F-AF8D-48CE-BCA0-A170D18B2C03}", + "details": { + "name": "char" + } + } + ] + } + ] + } + ] +} \ No newline at end of file diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Classes/InputEventNotificationId.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Classes/InputEventNotificationId.names new file mode 100644 index 0000000000..c510b34efd --- /dev/null +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Classes/InputEventNotificationId.names @@ -0,0 +1,255 @@ +{ + "entries": [ + { + "base": "InputEventNotificationId", + "context": "BehaviorClass", + "variant": "", + "details": { + "name": "Input", + "category": "Gameplay" + }, + "methods": [ + { + "base": "ToString", + "context": "InputEventNotificationId", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke To String" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after To String is invoked" + }, + "details": { + "name": "To String" + }, + "params": [ + { + "typeid": "{9E0F0801-348B-4FF9-AF9B-858D59404968}", + "details": { + "name": "Input Event Notification Id" + } + } + ], + "results": [ + { + "typeid": "{03AAAB3F-5C47-5A66-9EBC-D5FA4DB353C9}", + "details": { + "name": "String" + } + } + ] + }, + { + "base": "Equal", + "context": "InputEventNotificationId", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Equal" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Equal is invoked" + }, + "details": { + "name": "Equal" + }, + "params": [ + { + "typeid": "{9E0F0801-348B-4FF9-AF9B-858D59404968}", + "details": { + "name": "Input Event Notification Id" + } + }, + { + "typeid": "{9E0F0801-348B-4FF9-AF9B-858D59404968}", + "details": { + "name": "Input Event Notification Id" + } + } + ], + "results": [ + { + "typeid": "{A0CA880C-AFE4-43CB-926C-59AC48496112}", + "details": { + "name": "Equal" + } + } + ] + }, + { + "base": "Clone", + "context": "InputEventNotificationId", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Clone" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Clone is invoked" + }, + "details": { + "name": "Clone" + }, + "params": [ + { + "typeid": "{9E0F0801-348B-4FF9-AF9B-858D59404968}", + "details": { + "name": "Input Event Notification Id" + } + } + ], + "results": [ + { + "typeid": "{9E0F0801-348B-4FF9-AF9B-858D59404968}", + "details": { + "name": "Input Event Notification Id" + } + } + ] + }, + { + "base": "CreateInputEventNotificationId", + "context": "InputEventNotificationId", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Create Input Event Notification Id" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Create Input Event Notification Id is invoked" + }, + "details": { + "name": "Create Input Event Notification Id" + }, + "params": [ + { + "typeid": "{43DA906B-7DEF-4CA8-9790-854106D3F983}", + "details": { + "name": "Local User Id" + } + }, + { + "typeid": "{7114E998-A8B4-519B-9342-A86D1587B4F7}", + "details": { + "name": "Value" + } + } + ], + "results": [ + { + "typeid": "{9E0F0801-348B-4FF9-AF9B-858D59404968}", + "details": { + "name": "Input Event Notification Id" + } + } + ] + }, + { + "base": "GetactionNameCrc", + "details": { + "name": "Get Action Name Tag" + }, + "params": [ + { + "typeid": "{9E0F0801-348B-4FF9-AF9B-858D59404968}", + "details": { + "name": "Input Event Notification Id" + } + } + ], + "results": [ + { + "typeid": "{9F4E062E-06A0-46D4-85DF-E0DA96467D3A}", + "details": { + "name": "Tag" + } + } + ] + }, + { + "base": "SetactionNameCrc", + "details": { + "name": "Set Action Name Tag" + }, + "params": [ + { + "typeid": "{9E0F0801-348B-4FF9-AF9B-858D59404968}", + "details": { + "name": "Input Event Notification Id" + } + }, + { + "typeid": "{9F4E062E-06A0-46D4-85DF-E0DA96467D3A}", + "details": { + "name": "Tag" + } + } + ] + }, + { + "base": "GetlocalUserId", + "details": { + "name": "Get Local User Id" + }, + "params": [ + { + "typeid": "{9E0F0801-348B-4FF9-AF9B-858D59404968}", + "details": { + "name": "Input Event Notification Id" + } + } + ], + "results": [ + { + "typeid": "{43DA906B-7DEF-4CA8-9790-854106D3F983}", + "details": { + "name": "Local User Id" + } + } + ] + }, + { + "base": "SetlocalUserId", + "details": { + "name": "Set Local User Id" + }, + "params": [ + { + "typeid": "{9E0F0801-348B-4FF9-AF9B-858D59404968}", + "details": { + "name": "Input Event Notification Id" + } + }, + { + "typeid": "{43DA906B-7DEF-4CA8-9790-854106D3F983}", + "details": { + "name": "Local User Id" + } + } + ] + }, + { + "base": "SetactionName", + "details": { + "name": "Set Action Name" + }, + "params": [ + { + "typeid": "{9E0F0801-348B-4FF9-AF9B-858D59404968}", + "details": { + "name": "Input Event Notification Id" + } + }, + { + "typeid": "{7114E998-A8B4-519B-9342-A86D1587B4F7}", + "details": { + "name": "Action Name" + } + } + ] + } + ] + } + ] +} \ No newline at end of file diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Classes/InvertGradientComponent.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Classes/InvertGradientComponent.names new file mode 100644 index 0000000000..80153489d0 --- /dev/null +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Classes/InvertGradientComponent.names @@ -0,0 +1,12 @@ +{ + "entries": [ + { + "base": "InvertGradientComponent", + "context": "BehaviorClass", + "variant": "", + "details": { + "name": "InvertGradientComponent" + } + } + ] +} \ No newline at end of file diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Classes/InvertGradientConfig.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Classes/InvertGradientConfig.names new file mode 100644 index 0000000000..0c7f50683f --- /dev/null +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Classes/InvertGradientConfig.names @@ -0,0 +1,12 @@ +{ + "entries": [ + { + "base": "InvertGradientConfig", + "context": "BehaviorClass", + "variant": "", + "details": { + "name": "InvertGradientConfig" + } + } + ] +} \ No newline at end of file diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Classes/LevelsGradientComponent.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Classes/LevelsGradientComponent.names new file mode 100644 index 0000000000..c44335f796 --- /dev/null +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Classes/LevelsGradientComponent.names @@ -0,0 +1,12 @@ +{ + "entries": [ + { + "base": "LevelsGradientComponent", + "context": "BehaviorClass", + "variant": "", + "details": { + "name": "LevelsGradientComponent" + } + } + ] +} \ No newline at end of file diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Classes/LevelsGradientConfig.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Classes/LevelsGradientConfig.names new file mode 100644 index 0000000000..6b1b6f5d1f --- /dev/null +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Classes/LevelsGradientConfig.names @@ -0,0 +1,12 @@ +{ + "entries": [ + { + "base": "LevelsGradientConfig", + "context": "BehaviorClass", + "variant": "", + "details": { + "name": "LevelsGradientConfig" + } + } + ] +} \ No newline at end of file diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Classes/LightConfig.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Classes/LightConfig.names new file mode 100644 index 0000000000..9695d74586 --- /dev/null +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Classes/LightConfig.names @@ -0,0 +1,350 @@ +{ + "entries": [ + { + "base": "LightConfig", + "context": "BehaviorClass", + "variant": "", + "details": { + "name": "Light Config" + }, + "methods": [ + { + "base": "GetshadowmapSize", + "details": { + "name": "Get Shadowmap Size" + }, + "params": [ + { + "typeid": "{02644F52-9483-47A8-9028-37671695C34E}", + "details": { + "name": "Light Config" + } + } + ], + "results": [ + { + "typeid": "{3EC1CE83-483D-41FD-9909-D22B03E56F4E}", + "details": { + "name": "Shadowmap Size" + } + } + ] + }, + { + "base": "SetshadowmapSize", + "details": { + "name": "Set Shadowmap Size" + }, + "params": [ + { + "typeid": "{02644F52-9483-47A8-9028-37671695C34E}", + "details": { + "name": "Light Config" + } + }, + { + "typeid": "{3EC1CE83-483D-41FD-9909-D22B03E56F4E}", + "details": { + "name": "Shadowmap Size" + } + } + ] + }, + { + "base": "GetshadowCascadeCount", + "details": { + "name": "Get Shadow Cascade Count" + }, + "params": [ + { + "typeid": "{02644F52-9483-47A8-9028-37671695C34E}", + "details": { + "name": "Light Config" + } + } + ], + "results": [ + { + "typeid": "{ECA0B403-C4F8-4B86-95FC-81688D046E40}", + "details": { + "name": "Shadow Cascade Count" + } + } + ] + }, + { + "base": "SetshadowCascadeCount", + "details": { + "name": "Set Shadow Cascade Count" + }, + "params": [ + { + "typeid": "{02644F52-9483-47A8-9028-37671695C34E}", + "details": { + "name": "Light Config" + } + }, + { + "typeid": "{ECA0B403-C4F8-4B86-95FC-81688D046E40}", + "details": { + "name": "Shadow Cascade Count" + } + } + ] + }, + { + "base": "GetenableShadowDebugColoring", + "details": { + "name": "Get Enable Shadow Debug Coloring" + }, + "params": [ + { + "typeid": "{02644F52-9483-47A8-9028-37671695C34E}", + "details": { + "name": "Light Config" + } + } + ], + "results": [ + { + "typeid": "{A0CA880C-AFE4-43CB-926C-59AC48496112}", + "details": { + "name": "Enable" + } + } + ] + }, + { + "base": "SetenableShadowDebugColoring", + "details": { + "name": "Set Enable Shadow Debug Coloring" + }, + "params": [ + { + "typeid": "{02644F52-9483-47A8-9028-37671695C34E}", + "details": { + "name": "Light Config" + } + }, + { + "typeid": "{A0CA880C-AFE4-43CB-926C-59AC48496112}", + "details": { + "name": "Enable" + } + } + ] + }, + { + "base": "Getintensity", + "details": { + "name": "Get Intensity" + }, + "params": [ + { + "typeid": "{02644F52-9483-47A8-9028-37671695C34E}", + "details": { + "name": "Light Config" + } + } + ], + "results": [ + { + "typeid": "{EA2C3E90-AFBE-44D4-A90D-FAAF79BAF93D}", + "details": { + "name": "Intensity" + } + } + ] + }, + { + "base": "Setintensity", + "details": { + "name": "Set Intensity" + }, + "params": [ + { + "typeid": "{02644F52-9483-47A8-9028-37671695C34E}", + "details": { + "name": "Light Config" + } + }, + { + "typeid": "{EA2C3E90-AFBE-44D4-A90D-FAAF79BAF93D}", + "details": { + "name": "Intensity" + } + } + ] + }, + { + "base": "GetshadowRatioLogarithmUniform", + "details": { + "name": "Get Shadow Ratio Logarithm Uniform" + }, + "params": [ + { + "typeid": "{02644F52-9483-47A8-9028-37671695C34E}", + "details": { + "name": "Light Config" + } + } + ], + "results": [ + { + "typeid": "{EA2C3E90-AFBE-44D4-A90D-FAAF79BAF93D}", + "details": { + "name": "Shadow Ratio Logarithm Uniform" + } + } + ] + }, + { + "base": "SetshadowRatioLogarithmUniform", + "details": { + "name": "Set Shadow Ratio Logarithm Uniform" + }, + "params": [ + { + "typeid": "{02644F52-9483-47A8-9028-37671695C34E}", + "details": { + "name": "Light Config" + } + }, + { + "typeid": "{EA2C3E90-AFBE-44D4-A90D-FAAF79BAF93D}", + "details": { + "name": "Shadow Ratio Logarithm Uniform" + } + } + ] + }, + { + "base": "Getcolor", + "details": { + "name": "Get Color" + }, + "params": [ + { + "typeid": "{02644F52-9483-47A8-9028-37671695C34E}", + "details": { + "name": "Light Config" + } + } + ], + "results": [ + { + "typeid": "{7894072A-9050-4F0F-901B-34B1A0D29417}", + "details": { + "name": "Color" + } + } + ] + }, + { + "base": "Setcolor", + "details": { + "name": "Set Color" + }, + "params": [ + { + "typeid": "{02644F52-9483-47A8-9028-37671695C34E}", + "details": { + "name": "Light Config" + } + }, + { + "typeid": "{7894072A-9050-4F0F-901B-34B1A0D29417}", + "details": { + "name": "Color" + } + } + ] + }, + { + "base": "Getdirection", + "details": { + "name": "Get Direction" + }, + "params": [ + { + "typeid": "{02644F52-9483-47A8-9028-37671695C34E}", + "details": { + "name": "Light Config" + } + } + ], + "results": [ + { + "typeid": "{8379EB7D-01FA-4538-B64B-A6543B4BE73D}", + "details": { + "name": "Direction" + } + } + ] + }, + { + "base": "Setdirection", + "details": { + "name": "Set Direction" + }, + "params": [ + { + "typeid": "{02644F52-9483-47A8-9028-37671695C34E}", + "details": { + "name": "Light Config" + } + }, + { + "typeid": "{8379EB7D-01FA-4538-B64B-A6543B4BE73D}", + "details": { + "name": "Direction" + } + } + ] + }, + { + "base": "GetshadowFarClipDistance", + "details": { + "name": "Get Shadow Far Clip Distance" + }, + "params": [ + { + "typeid": "{02644F52-9483-47A8-9028-37671695C34E}", + "details": { + "name": "Light Config" + } + } + ], + "results": [ + { + "typeid": "{EA2C3E90-AFBE-44D4-A90D-FAAF79BAF93D}", + "details": { + "name": "Shadow Far Clip Distance" + } + } + ] + }, + { + "base": "SetshadowFarClipDistance", + "details": { + "name": "Set Shadow Far Clip Distance" + }, + "params": [ + { + "typeid": "{02644F52-9483-47A8-9028-37671695C34E}", + "details": { + "name": "Light Config" + } + }, + { + "typeid": "{EA2C3E90-AFBE-44D4-A90D-FAAF79BAF93D}", + "details": { + "name": "Shadow Far Clip Distance" + } + } + ] + } + ] + } + ] +} \ No newline at end of file diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Classes/LightingPreset.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Classes/LightingPreset.names new file mode 100644 index 0000000000..2de6836faf --- /dev/null +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Classes/LightingPreset.names @@ -0,0 +1,434 @@ +{ + "entries": [ + { + "base": "LightingPreset", + "context": "BehaviorClass", + "variant": "", + "details": { + "name": "Lighting Preset" + }, + "methods": [ + { + "base": "GetshadowCatcherOpacity", + "details": { + "name": "Get Shadow Catcher Opacity" + }, + "params": [ + { + "typeid": "{6EEACBC0-2D97-414C-8E87-088E7BA231A9}", + "details": { + "name": "Lighting Preset" + } + } + ], + "results": [ + { + "typeid": "{EA2C3E90-AFBE-44D4-A90D-FAAF79BAF93D}", + "details": { + "name": "Shadow Catcher Opacity" + } + } + ] + }, + { + "base": "SetshadowCatcherOpacity", + "details": { + "name": "Set Shadow Catcher Opacity" + }, + "params": [ + { + "typeid": "{6EEACBC0-2D97-414C-8E87-088E7BA231A9}", + "details": { + "name": "Lighting Preset" + } + }, + { + "typeid": "{EA2C3E90-AFBE-44D4-A90D-FAAF79BAF93D}", + "details": { + "name": "Shadow Catcher Opacity" + } + } + ] + }, + { + "base": "GetskyboxExposure", + "details": { + "name": "Get Skybox Exposure" + }, + "params": [ + { + "typeid": "{6EEACBC0-2D97-414C-8E87-088E7BA231A9}", + "details": { + "name": "Lighting Preset" + } + } + ], + "results": [ + { + "typeid": "{EA2C3E90-AFBE-44D4-A90D-FAAF79BAF93D}", + "details": { + "name": "Skybox Exposure" + } + } + ] + }, + { + "base": "SetskyboxExposure", + "details": { + "name": "Set Skybox Exposure" + }, + "params": [ + { + "typeid": "{6EEACBC0-2D97-414C-8E87-088E7BA231A9}", + "details": { + "name": "Lighting Preset" + } + }, + { + "typeid": "{EA2C3E90-AFBE-44D4-A90D-FAAF79BAF93D}", + "details": { + "name": "Skybox Exposure" + } + } + ] + }, + { + "base": "Getlights", + "details": { + "name": "Get Lights" + }, + "params": [ + { + "typeid": "{6EEACBC0-2D97-414C-8E87-088E7BA231A9}", + "details": { + "name": "Lighting Preset" + } + } + ], + "results": [ + { + "typeid": "{33492660-D9A8-5E84-9CFB-03CBCD87919F}", + "details": { + "name": "Light Configs" + } + } + ] + }, + { + "base": "Setlights", + "details": { + "name": "Set Lights" + }, + "params": [ + { + "typeid": "{6EEACBC0-2D97-414C-8E87-088E7BA231A9}", + "details": { + "name": "Lighting Preset" + } + }, + { + "typeid": "{33492660-D9A8-5E84-9CFB-03CBCD87919F}", + "details": { + "name": "Light Configs" + } + } + ] + }, + { + "base": "GetiblExposure", + "details": { + "name": "Get IBL Exposure" + }, + "params": [ + { + "typeid": "{6EEACBC0-2D97-414C-8E87-088E7BA231A9}", + "details": { + "name": "Lighting Preset" + } + } + ], + "results": [ + { + "typeid": "{EA2C3E90-AFBE-44D4-A90D-FAAF79BAF93D}", + "details": { + "name": "IBL Exposure" + } + } + ] + }, + { + "base": "SetiblExposure", + "details": { + "name": "Set IBL Exposure" + }, + "params": [ + { + "typeid": "{6EEACBC0-2D97-414C-8E87-088E7BA231A9}", + "details": { + "name": "Lighting Preset" + } + }, + { + "typeid": "{EA2C3E90-AFBE-44D4-A90D-FAAF79BAF93D}", + "details": { + "name": "IBL Exposure" + } + } + ] + }, + { + "base": "GetskyboxImageAsset", + "details": { + "name": "Get Skybox Image Asset" + }, + "params": [ + { + "typeid": "{6EEACBC0-2D97-414C-8E87-088E7BA231A9}", + "details": { + "name": "Lighting Preset" + } + } + ], + "results": [ + { + "typeid": "{403A7CFE-B218-5D57-8540-BD58E734BCFE}", + "details": { + "name": "Skybox Image Asset" + } + } + ] + }, + { + "base": "SetskyboxImageAsset", + "details": { + "name": "Set Skybox Image Asset" + }, + "params": [ + { + "typeid": "{6EEACBC0-2D97-414C-8E87-088E7BA231A9}", + "details": { + "name": "Lighting Preset" + } + }, + { + "typeid": "{403A7CFE-B218-5D57-8540-BD58E734BCFE}", + "details": { + "name": "Skybox Image Asset" + } + } + ] + }, + { + "base": "GetiblSpecularImageAsset", + "details": { + "name": "Get IBL Specular Image Asset" + }, + "params": [ + { + "typeid": "{6EEACBC0-2D97-414C-8E87-088E7BA231A9}", + "details": { + "name": "Lighting Preset" + } + } + ], + "results": [ + { + "typeid": "{403A7CFE-B218-5D57-8540-BD58E734BCFE}", + "details": { + "name": "IBL Specular Image Asset" + } + } + ] + }, + { + "base": "SetiblSpecularImageAsset", + "details": { + "name": "Set IBL Specular Image Asset" + }, + "params": [ + { + "typeid": "{6EEACBC0-2D97-414C-8E87-088E7BA231A9}", + "details": { + "name": "Lighting Preset" + } + }, + { + "typeid": "{403A7CFE-B218-5D57-8540-BD58E734BCFE}", + "details": { + "name": "IBL Specular Image Asset" + } + } + ] + }, + { + "base": "GetdisplayName", + "details": { + "name": "Get Display Name" + }, + "params": [ + { + "typeid": "{6EEACBC0-2D97-414C-8E87-088E7BA231A9}", + "details": { + "name": "Lighting Preset" + } + } + ], + "results": [ + { + "typeid": "{03AAAB3F-5C47-5A66-9EBC-D5FA4DB353C9}", + "details": { + "name": "Display Name" + } + } + ] + }, + { + "base": "SetdisplayName", + "details": { + "name": "Set Display Name" + }, + "params": [ + { + "typeid": "{6EEACBC0-2D97-414C-8E87-088E7BA231A9}", + "details": { + "name": "Lighting Preset" + } + }, + { + "typeid": "{03AAAB3F-5C47-5A66-9EBC-D5FA4DB353C9}", + "details": { + "name": "Display Name" + } + } + ] + }, + { + "base": "GetalternateSkyboxImageAsset", + "details": { + "name": "Get Alternate Skybox Image Asset" + }, + "params": [ + { + "typeid": "{6EEACBC0-2D97-414C-8E87-088E7BA231A9}", + "details": { + "name": "Lighting Preset" + } + } + ], + "results": [ + { + "typeid": "{403A7CFE-B218-5D57-8540-BD58E734BCFE}", + "details": { + "name": "Alternate Skybox Image Asset" + } + } + ] + }, + { + "base": "SetalternateSkyboxImageAsset", + "details": { + "name": "Set Alternate Skybox Image Asset" + }, + "params": [ + { + "typeid": "{6EEACBC0-2D97-414C-8E87-088E7BA231A9}", + "details": { + "name": "Lighting Preset" + } + }, + { + "typeid": "{403A7CFE-B218-5D57-8540-BD58E734BCFE}", + "details": { + "name": "Alternate Skybox Image Asset" + } + } + ] + }, + { + "base": "GetiblDiffuseImageAsset", + "details": { + "name": "Get IBL Diffuse Image Asset" + }, + "params": [ + { + "typeid": "{6EEACBC0-2D97-414C-8E87-088E7BA231A9}", + "details": { + "name": "Lighting Preset" + } + } + ], + "results": [ + { + "typeid": "{403A7CFE-B218-5D57-8540-BD58E734BCFE}", + "details": { + "name": "IBL Diffuse Image Asset" + } + } + ] + }, + { + "base": "SetiblDiffuseImageAsset", + "details": { + "name": "Set IBL Diffuse Image Asset" + }, + "params": [ + { + "typeid": "{6EEACBC0-2D97-414C-8E87-088E7BA231A9}", + "details": { + "name": "Lighting Preset" + } + }, + { + "typeid": "{403A7CFE-B218-5D57-8540-BD58E734BCFE}", + "details": { + "name": "IBL Diffuse Image Asset" + } + } + ] + }, + { + "base": "Getexposure", + "details": { + "name": "Get Exposure" + }, + "params": [ + { + "typeid": "{6EEACBC0-2D97-414C-8E87-088E7BA231A9}", + "details": { + "name": "Lighting Preset" + } + } + ], + "results": [ + { + "typeid": "{C6FD75F7-58BA-46CE-8FBA-2D64CB4ECFF9}", + "details": { + "name": "Exposure Control Config" + } + } + ] + }, + { + "base": "Setexposure", + "details": { + "name": "Set Exposure" + }, + "params": [ + { + "typeid": "{6EEACBC0-2D97-414C-8E87-088E7BA231A9}", + "details": { + "name": "Lighting Preset" + } + }, + { + "typeid": "{C6FD75F7-58BA-46CE-8FBA-2D64CB4ECFF9}", + "details": { + "name": "Exposure Control Config" + } + } + ] + } + ] + } + ] +} \ No newline at end of file diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Classes/LmbrCentral__QuadShapeConfig.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Classes/LmbrCentral__QuadShapeConfig.names new file mode 100644 index 0000000000..1289b55ba3 --- /dev/null +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Classes/LmbrCentral__QuadShapeConfig.names @@ -0,0 +1,103 @@ +{ + "entries": [ + { + "base": "LmbrCentral::QuadShapeConfig", + "context": "BehaviorClass", + "variant": "", + "details": { + "name": "Quad Shape Config", + "category": "Rendering/Shapes" + }, + "methods": [ + { + "base": "GetWidth", + "details": { + "name": "Get Width" + }, + "params": [ + { + "typeid": "{35CA7415-DB12-4630-B0D0-4A140CE1B9A7}", + "details": { + "name": "Configuration", + "tooltip": "Quad shape configuration parameters" + } + } + ], + "results": [ + { + "typeid": "{EA2C3E90-AFBE-44D4-A90D-FAAF79BAF93D}", + "details": { + "name": "float" + } + } + ] + }, + { + "base": "SetWidth", + "details": { + "name": "Set Width" + }, + "params": [ + { + "typeid": "{35CA7415-DB12-4630-B0D0-4A140CE1B9A7}", + "details": { + "name": "Configuration", + "tooltip": "Quad shape configuration parameters" + } + }, + { + "typeid": "{EA2C3E90-AFBE-44D4-A90D-FAAF79BAF93D}", + "details": { + "name": "float" + } + } + ] + }, + { + "base": "GetHeight", + "details": { + "name": "Get Height" + }, + "params": [ + { + "typeid": "{35CA7415-DB12-4630-B0D0-4A140CE1B9A7}", + "details": { + "name": "Configuration", + "tooltip": "Quad shape configuration parameters" + } + } + ], + "results": [ + { + "typeid": "{EA2C3E90-AFBE-44D4-A90D-FAAF79BAF93D}", + "details": { + "name": "float" + } + } + ] + }, + { + "base": "SetHeight", + "details": { + "name": "Set Height" + }, + "params": [ + { + "typeid": "{35CA7415-DB12-4630-B0D0-4A140CE1B9A7}", + "details": { + "name": "Configuration", + "tooltip": "Quad shape configuration parameters" + } + }, + { + "typeid": "{EA2C3E90-AFBE-44D4-A90D-FAAF79BAF93D}", + "details": { + "name": "float" + } + } + ] + } + ] + } + ] +} \ No newline at end of file diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Classes/MaterialAssignment.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Classes/MaterialAssignment.names new file mode 100644 index 0000000000..99a0fa5f78 --- /dev/null +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Classes/MaterialAssignment.names @@ -0,0 +1,122 @@ +{ + "entries": [ + { + "base": "MaterialAssignment", + "context": "BehaviorClass", + "variant": "", + "details": { + "name": "Material Assignment", + "category": "Rendering" + }, + "methods": [ + { + "base": "ToString", + "context": "MaterialAssignment", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke To String" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after To String is invoked" + }, + "details": { + "name": "To String" + }, + "results": [ + { + "typeid": "{03AAAB3F-5C47-5A66-9EBC-D5FA4DB353C9}", + "details": { + "name": "String" + } + } + ] + }, + { + "base": "GetmaterialAsset", + "details": { + "name": "Get Material Asset" + }, + "params": [ + { + "typeid": "{C66E5214-A24B-4722-B7F0-5991E6F8F163}", + "details": { + "name": "Material Assignment" + } + } + ], + "results": [ + { + "typeid": "{834DC049-5EC3-5C29-B621-5F0046864DC4}", + "details": { + "name": "Material Asset" + } + } + ] + }, + { + "base": "SetmaterialAsset", + "details": { + "name": "Set Material Asset" + }, + "params": [ + { + "typeid": "{C66E5214-A24B-4722-B7F0-5991E6F8F163}", + "details": { + "name": "Material Assignment" + } + }, + { + "typeid": "{834DC049-5EC3-5C29-B621-5F0046864DC4}", + "details": { + "name": "Material Asset" + } + } + ] + }, + { + "base": "GetpropertyOverrides", + "details": { + "name": "Get Property Overrides" + }, + "params": [ + { + "typeid": "{C66E5214-A24B-4722-B7F0-5991E6F8F163}", + "details": { + "name": "Material Assignment" + } + } + ], + "results": [ + { + "typeid": "{6E6962E1-04C9-56F9-89C4-361031CC1384}", + "details": { + "name": "Override" + } + } + ] + }, + { + "base": "SetpropertyOverrides", + "details": { + "name": "Set Property Overrides" + }, + "params": [ + { + "typeid": "{C66E5214-A24B-4722-B7F0-5991E6F8F163}", + "details": { + "name": "Material Assignment" + } + }, + { + "typeid": "{6E6962E1-04C9-56F9-89C4-361031CC1384}", + "details": { + "name": "Override" + } + } + ] + } + ] + } + ] +} \ No newline at end of file diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Classes/MaterialAssignmentId.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Classes/MaterialAssignmentId.names new file mode 100644 index 0000000000..47dc8122a1 --- /dev/null +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Classes/MaterialAssignmentId.names @@ -0,0 +1,237 @@ +{ + "entries": [ + { + "base": "MaterialAssignmentId", + "context": "BehaviorClass", + "variant": "", + "details": { + "name": "Material Assignment Id", + "category": "Rendering" + }, + "methods": [ + { + "base": "ToString", + "context": "MaterialAssignmentId", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke To String" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after To String is invoked" + }, + "details": { + "name": "To String" + }, + "results": [ + { + "typeid": "{03AAAB3F-5C47-5A66-9EBC-D5FA4DB353C9}", + "details": { + "name": "String" + } + } + ] + }, + { + "base": "IsAssetOnly", + "context": "MaterialAssignmentId", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Is Asset Only" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Is Asset Only is invoked" + }, + "details": { + "name": "Is Asset Only" + }, + "results": [ + { + "typeid": "{A0CA880C-AFE4-43CB-926C-59AC48496112}", + "details": { + "name": "Is Asset Only" + } + } + ] + }, + { + "base": "IsSlotIdOnly", + "context": "MaterialAssignmentId", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Is Slot Id Only" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Is Slot Id Only is invoked" + }, + "details": { + "name": "Is Slot Id Only" + }, + "results": [ + { + "typeid": "{A0CA880C-AFE4-43CB-926C-59AC48496112}", + "details": { + "name": "Is Slot Id Only" + } + } + ] + }, + { + "base": "IsLodAndSlotId", + "context": "MaterialAssignmentId", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Is Lod And Slot Id" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Is Lod And Slot Id is invoked" + }, + "details": { + "name": "Is Lod And Slot Id" + }, + "results": [ + { + "typeid": "{A0CA880C-AFE4-43CB-926C-59AC48496112}", + "details": { + "name": "Is Lod And Slot Id" + } + } + ] + }, + { + "base": "IsDefault", + "context": "MaterialAssignmentId", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Is Default" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Is Default is invoked" + }, + "details": { + "name": "Is Default" + }, + "results": [ + { + "typeid": "{A0CA880C-AFE4-43CB-926C-59AC48496112}", + "details": { + "name": "Is Default" + } + } + ] + }, + { + "base": "IsLodAndAsset", + "context": "MaterialAssignmentId", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Is Lod And Asset" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Is Lod And Asset is invoked" + }, + "details": { + "name": "Is Lod And Asset" + }, + "results": [ + { + "typeid": "{A0CA880C-AFE4-43CB-926C-59AC48496112}", + "details": { + "name": "Is Lod And Asset" + } + } + ] + }, + { + "base": "GetlodIndex", + "details": { + "name": "Get LOD Index" + }, + "params": [ + { + "typeid": "{EB603581-4654-4C17-B6DE-AE61E79EDA97}", + "details": { + "name": "Material Assignment Id" + } + } + ], + "results": [ + { + "typeid": "{D6597933-47CD-4FC8-B911-63F3E2B0993A}", + "details": { + "name": "Value" + } + } + ] + }, + { + "base": "SetlodIndex", + "details": { + "name": "Set LOD Index" + }, + "params": [ + { + "typeid": "{EB603581-4654-4C17-B6DE-AE61E79EDA97}", + "details": { + "name": "Material Assignment Id" + } + }, + { + "typeid": "{D6597933-47CD-4FC8-B911-63F3E2B0993A}", + "details": { + "name": "Value" + } + } + ] + }, + { + "base": "GetmaterialSlotStableId", + "details": { + "name": "Get Material Slot Stable Id" + }, + "params": [ + { + "typeid": "{EB603581-4654-4C17-B6DE-AE61E79EDA97}", + "details": { + "name": "Material Assignment Id" + } + } + ], + "results": [ + { + "typeid": "{43DA906B-7DEF-4CA8-9790-854106D3F983}", + "details": { + "name": "Value" + } + } + ] + }, + { + "base": "SetmaterialSlotStableId", + "details": { + "name": "Set Material Slot Stable Id" + }, + "params": [ + { + "typeid": "{EB603581-4654-4C17-B6DE-AE61E79EDA97}", + "details": { + "name": "Material Assignment Id" + } + }, + { + "typeid": "{43DA906B-7DEF-4CA8-9790-854106D3F983}", + "details": { + "name": "Value" + } + } + ] + } + ] + } + ] +} \ No newline at end of file diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Classes/MaterialComponentConfig.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Classes/MaterialComponentConfig.names new file mode 100644 index 0000000000..e167ff79a5 --- /dev/null +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Classes/MaterialComponentConfig.names @@ -0,0 +1,59 @@ +{ + "entries": [ + { + "base": "MaterialComponentConfig", + "context": "BehaviorClass", + "variant": "", + "details": { + "name": "Material Component Config", + "category": "Rendering" + }, + "methods": [ + { + "base": "Getmaterials", + "details": { + "name": "Get Materials" + }, + "params": [ + { + "typeid": "{3366C279-32AE-48F6-839B-7700AE117A54}", + "details": { + "name": "", + "tooltip": "Material Component Config" + } + } + ], + "results": [ + { + "typeid": "{50F6716F-698B-5A6C-AACD-940597FDEC24}", + "details": { + "name": "Material Assignment Map" + } + } + ] + }, + { + "base": "Setmaterials", + "details": { + "name": "Set Materials" + }, + "params": [ + { + "typeid": "{3366C279-32AE-48F6-839B-7700AE117A54}", + "details": { + "name": "", + "tooltip": "Material Component Config" + } + }, + { + "typeid": "{50F6716F-698B-5A6C-AACD-940597FDEC24}", + "details": { + "name": "Material Assignment Map" + } + } + ] + } + ] + } + ] +} \ No newline at end of file diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Classes/MaterialData.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Classes/MaterialData.names new file mode 100644 index 0000000000..9f6af426d0 --- /dev/null +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Classes/MaterialData.names @@ -0,0 +1,571 @@ +{ + "entries": [ + { + "base": "MaterialData", + "context": "BehaviorClass", + "variant": "", + "details": { + "name": "Material Data" + }, + "methods": [ + { + "base": "GetBaseColor", + "context": "MaterialData", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Get Base Color" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Get Base Color is invoked" + }, + "details": { + "name": "Get Base Color" + }, + "results": [ + { + "typeid": "{8379EB7D-01FA-4538-B64B-A6543B4BE73D}", + "details": { + "name": "Vector 3" + } + } + ] + }, + { + "base": "GetUseRoughnessMap", + "context": "MaterialData", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Get Use Roughness Map" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Get Use Roughness Map is invoked" + }, + "details": { + "name": "Get Use Roughness Map" + }, + "results": [ + { + "typeid": "{A0CA880C-AFE4-43CB-926C-59AC48496112}", + "details": { + "name": "bool" + } + } + ] + }, + { + "base": "GetShininess", + "context": "MaterialData", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Get Shininess" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Get Shininess is invoked" + }, + "details": { + "name": "Get Shininess" + }, + "results": [ + { + "typeid": "{EA2C3E90-AFBE-44D4-A90D-FAAF79BAF93D}", + "details": { + "name": "float" + } + } + ] + }, + { + "base": "GetUseEmissiveMap", + "context": "MaterialData", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Get Use Emissive Map" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Get Use Emissive Map is invoked" + }, + "details": { + "name": "Get Use Emissive Map" + }, + "results": [ + { + "typeid": "{A0CA880C-AFE4-43CB-926C-59AC48496112}", + "details": { + "name": "bool" + } + } + ] + }, + { + "base": "GetEmissiveColor", + "context": "MaterialData", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Get Emissive Color" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Get Emissive Color is invoked" + }, + "details": { + "name": "Get Emissive Color" + }, + "results": [ + { + "typeid": "{8379EB7D-01FA-4538-B64B-A6543B4BE73D}", + "details": { + "name": "const Vector 3&" + } + } + ] + }, + { + "base": "GetSpecularColor", + "context": "MaterialData", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Get Specular Color" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Get Specular Color is invoked" + }, + "details": { + "name": "Get Specular Color" + }, + "results": [ + { + "typeid": "{8379EB7D-01FA-4538-B64B-A6543B4BE73D}", + "details": { + "name": "const Vector 3&" + } + } + ] + }, + { + "base": "GetUniqueId", + "context": "MaterialData", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Get Unique Id" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Get Unique Id is invoked" + }, + "details": { + "name": "Get Unique Id" + }, + "results": [ + { + "typeid": "{D6597933-47CD-4FC8-B911-63F3E2B0993A}", + "details": { + "name": "AZ::u 64" + } + } + ] + }, + { + "base": "GetDiffuseColor", + "context": "MaterialData", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Get Diffuse Color" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Get Diffuse Color is invoked" + }, + "details": { + "name": "Get Diffuse Color" + }, + "results": [ + { + "typeid": "{8379EB7D-01FA-4538-B64B-A6543B4BE73D}", + "details": { + "name": "const Vector 3&" + } + } + ] + }, + { + "base": "GetEmissiveIntensity", + "context": "MaterialData", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Get Emissive Intensity" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Get Emissive Intensity is invoked" + }, + "details": { + "name": "Get Emissive Intensity" + }, + "results": [ + { + "typeid": "{EA2C3E90-AFBE-44D4-A90D-FAAF79BAF93D}", + "details": { + "name": "float" + } + } + ] + }, + { + "base": "GetMaterialName", + "context": "MaterialData", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Get Material Name" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Get Material Name is invoked" + }, + "details": { + "name": "Get Material Name" + }, + "results": [ + { + "typeid": "{03AAAB3F-5C47-5A66-9EBC-D5FA4DB353C9}", + "details": { + "name": "const AZ Std::basic_string, alloc" + } + } + ] + }, + { + "base": "GetUseMetallicMap", + "context": "MaterialData", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Get Use Metallic Map" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Get Use Metallic Map is invoked" + }, + "details": { + "name": "Get Use Metallic Map" + }, + "results": [ + { + "typeid": "{A0CA880C-AFE4-43CB-926C-59AC48496112}", + "details": { + "name": "bool" + } + } + ] + }, + { + "base": "GetMetallicFactor", + "context": "MaterialData", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Get Metallic Factor" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Get Metallic Factor is invoked" + }, + "details": { + "name": "Get Metallic Factor" + }, + "results": [ + { + "typeid": "{EA2C3E90-AFBE-44D4-A90D-FAAF79BAF93D}", + "details": { + "name": "float" + } + } + ] + }, + { + "base": "GetRoughnessFactor", + "context": "MaterialData", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Get Roughness Factor" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Get Roughness Factor is invoked" + }, + "details": { + "name": "Get Roughness Factor" + }, + "results": [ + { + "typeid": "{EA2C3E90-AFBE-44D4-A90D-FAAF79BAF93D}", + "details": { + "name": "float" + } + } + ] + }, + { + "base": "GetUseAOMap", + "context": "MaterialData", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Get UseAO Map" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Get UseAO Map is invoked" + }, + "details": { + "name": "Get UseAO Map" + }, + "results": [ + { + "typeid": "{A0CA880C-AFE4-43CB-926C-59AC48496112}", + "details": { + "name": "bool" + } + } + ] + }, + { + "base": "GetTexture", + "context": "MaterialData", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Get Texture" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Get Texture is invoked" + }, + "details": { + "name": "Get Texture" + }, + "params": [ + { + "typeid": "{72039442-EB38-4D42-A1AD-CB68F7E0EEF6}", + "details": { + "name": "int" + } + } + ], + "results": [ + { + "typeid": "{03AAAB3F-5C47-5A66-9EBC-D5FA4DB353C9}", + "details": { + "name": "const AZ Std::basic_string, alloc" + } + } + ] + }, + { + "base": "IsNoDraw", + "context": "MaterialData", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Is No Draw" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Is No Draw is invoked" + }, + "details": { + "name": "Is No Draw" + }, + "results": [ + { + "typeid": "{A0CA880C-AFE4-43CB-926C-59AC48496112}", + "details": { + "name": "bool" + } + } + ] + }, + { + "base": "GetOpacity", + "context": "MaterialData", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Get Opacity" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Get Opacity is invoked" + }, + "details": { + "name": "Get Opacity" + }, + "results": [ + { + "typeid": "{EA2C3E90-AFBE-44D4-A90D-FAAF79BAF93D}", + "details": { + "name": "float" + } + } + ] + }, + { + "base": "GetUseColorMap", + "context": "MaterialData", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Get Use Color Map" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Get Use Color Map is invoked" + }, + "details": { + "name": "Get Use Color Map" + }, + "results": [ + { + "typeid": "{A0CA880C-AFE4-43CB-926C-59AC48496112}", + "details": { + "name": "bool" + } + } + ] + }, + { + "base": "GetNormal", + "context": "Getter", + "details": { + "name": "Get Normal" + }, + "results": [ + { + "typeid": "{72039442-EB38-4D42-A1AD-CB68F7E0EEF6}", + "details": { + "name": "Normal" + } + } + ] + }, + { + "base": "GetDiffuse", + "context": "Getter", + "details": { + "name": "Get Diffuse" + }, + "results": [ + { + "typeid": "{72039442-EB38-4D42-A1AD-CB68F7E0EEF6}", + "details": { + "name": "Diffuse" + } + } + ] + }, + { + "base": "GetSpecular", + "context": "Getter", + "details": { + "name": "Get Specular" + }, + "results": [ + { + "typeid": "{72039442-EB38-4D42-A1AD-CB68F7E0EEF6}", + "details": { + "name": "Specular" + } + } + ] + }, + { + "base": "GetBump", + "context": "Getter", + "details": { + "name": "Get Bump" + }, + "results": [ + { + "typeid": "{72039442-EB38-4D42-A1AD-CB68F7E0EEF6}", + "details": { + "name": "Bump" + } + } + ] + }, + { + "base": "GetEmissive", + "context": "Getter", + "details": { + "name": "Get Emissive" + }, + "results": [ + { + "typeid": "{72039442-EB38-4D42-A1AD-CB68F7E0EEF6}", + "details": { + "name": "Emissive" + } + } + ] + }, + { + "base": "GetRoughness", + "context": "Getter", + "details": { + "name": "Get Roughness" + }, + "results": [ + { + "typeid": "{72039442-EB38-4D42-A1AD-CB68F7E0EEF6}", + "details": { + "name": "Roughness" + } + } + ] + }, + { + "base": "GetBaseColor", + "context": "Getter", + "details": { + "name": "Get Base Color" + }, + "results": [ + { + "typeid": "{72039442-EB38-4D42-A1AD-CB68F7E0EEF6}", + "details": { + "name": "Base Color" + } + } + ] + }, + { + "base": "GetAmbientOcclusion", + "context": "Getter", + "details": { + "name": "Get Ambient Occlusion" + }, + "results": [ + { + "typeid": "{72039442-EB38-4D42-A1AD-CB68F7E0EEF6}", + "details": { + "name": "Ambient Occlusion" + } + } + ] + }, + { + "base": "GetMetallic", + "context": "Getter", + "details": { + "name": "Get Metallic" + }, + "results": [ + { + "typeid": "{72039442-EB38-4D42-A1AD-CB68F7E0EEF6}", + "details": { + "name": "Metallic" + } + } + ] + } + ] + } + ] +} \ No newline at end of file diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Classes/Math.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Classes/Math.names new file mode 100644 index 0000000000..4cb39e58a4 --- /dev/null +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Classes/Math.names @@ -0,0 +1,966 @@ +{ + "entries": [ + { + "base": "Math", + "context": "BehaviorClass", + "variant": "", + "details": { + "name": "Functions", + "category": "Math" + }, + "methods": [ + { + "base": "DivideByNumber", + "context": "Math", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke DivideByNumber" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after DivideByNumber is invoked" + }, + "details": { + "name": "Divide By Number", + "category": "Other" + }, + "params": [ + { + "typeid": "{EA2C3E90-AFBE-44D4-A90D-FAAF79BAF93D}", + "details": { + "name": "X" + } + }, + { + "typeid": "{EA2C3E90-AFBE-44D4-A90D-FAAF79BAF93D}", + "details": { + "name": "Y" + } + } + ], + "results": [ + { + "typeid": "{EA2C3E90-AFBE-44D4-A90D-FAAF79BAF93D}", + "details": { + "name": "Result" + } + } + ] + }, + { + "base": "Round", + "context": "Math", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Round" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Round is invoked" + }, + "details": { + "name": "Round", + "category": "Other" + }, + "params": [ + { + "typeid": "{EA2C3E90-AFBE-44D4-A90D-FAAF79BAF93D}", + "details": { + "name": "Value" + } + } + ], + "results": [ + { + "typeid": "{EA2C3E90-AFBE-44D4-A90D-FAAF79BAF93D}", + "details": { + "name": "Result" + } + } + ] + }, + { + "base": "Sqrt", + "context": "Math", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Sqrt" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Sqrt is invoked" + }, + "details": { + "name": "Sqrt", + "category": "Other" + }, + "params": [ + { + "typeid": "{EA2C3E90-AFBE-44D4-A90D-FAAF79BAF93D}", + "details": { + "name": "Value" + } + } + ], + "results": [ + { + "typeid": "{EA2C3E90-AFBE-44D4-A90D-FAAF79BAF93D}", + "details": { + "name": "Result" + } + } + ] + }, + { + "base": "Mod", + "context": "Math", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Mod" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Mod is invoked" + }, + "details": { + "name": "Mod", + "category": "Other" + }, + "params": [ + { + "typeid": "{EA2C3E90-AFBE-44D4-A90D-FAAF79BAF93D}", + "details": { + "name": "A" + } + }, + { + "typeid": "{EA2C3E90-AFBE-44D4-A90D-FAAF79BAF93D}", + "details": { + "name": "B" + } + } + ], + "results": [ + { + "typeid": "{EA2C3E90-AFBE-44D4-A90D-FAAF79BAF93D}", + "details": { + "name": "Value" + } + } + ] + }, + { + "base": "Ceil", + "context": "Math", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Ceil" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Ceil is invoked" + }, + "details": { + "name": "Ceil", + "category": "Other" + }, + "params": [ + { + "typeid": "{EA2C3E90-AFBE-44D4-A90D-FAAF79BAF93D}", + "details": { + "name": "Value" + } + } + ], + "results": [ + { + "typeid": "{EA2C3E90-AFBE-44D4-A90D-FAAF79BAF93D}", + "details": { + "name": "Result" + } + } + ] + }, + { + "base": "IsEven", + "context": "Math", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke IsEven" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after IsEven is invoked" + }, + "details": { + "name": "Is Even", + "category": "Other" + }, + "params": [ + { + "typeid": "{72039442-EB38-4D42-A1AD-CB68F7E0EEF6}", + "details": { + "name": "Value" + } + } + ], + "results": [ + { + "typeid": "{A0CA880C-AFE4-43CB-926C-59AC48496112}", + "details": { + "name": "Is Event" + } + } + ] + }, + { + "base": "IsClose", + "context": "Math", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke IsClose" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after IsClose is invoked" + }, + "details": { + "name": "Is Close", + "category": "Other" + }, + "params": [ + { + "typeid": "{110C4B14-11A8-4E9D-8638-5051013A56AC}", + "details": { + "name": "A" + } + }, + { + "typeid": "{110C4B14-11A8-4E9D-8638-5051013A56AC}", + "details": { + "name": "B" + } + }, + { + "typeid": "{110C4B14-11A8-4E9D-8638-5051013A56AC}", + "details": { + "name": "Tolerance" + } + } + ], + "results": [ + { + "typeid": "{A0CA880C-AFE4-43CB-926C-59AC48496112}", + "details": { + "name": "Is Close" + } + } + ] + }, + { + "base": "ArcSin", + "context": "Math", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke ArcSin" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after ArcSin is invoked" + }, + "details": { + "name": "Arc Sin", + "category": "Other" + }, + "params": [ + { + "typeid": "{EA2C3E90-AFBE-44D4-A90D-FAAF79BAF93D}", + "details": { + "name": "Value" + } + } + ], + "results": [ + { + "typeid": "{EA2C3E90-AFBE-44D4-A90D-FAAF79BAF93D}", + "details": { + "name": "Result" + } + } + ] + }, + { + "base": "ArcTan", + "context": "Math", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke ArcTan" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after ArcTan is invoked" + }, + "details": { + "name": "Arc Tan", + "category": "Other" + }, + "params": [ + { + "typeid": "{EA2C3E90-AFBE-44D4-A90D-FAAF79BAF93D}", + "details": { + "name": "Value" + } + } + ], + "results": [ + { + "typeid": "{EA2C3E90-AFBE-44D4-A90D-FAAF79BAF93D}", + "details": { + "name": "Result" + } + } + ] + }, + { + "base": "Max", + "context": "Math", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Max" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Max is invoked" + }, + "details": { + "name": "Max", + "category": "Other" + }, + "params": [ + { + "typeid": "{EA2C3E90-AFBE-44D4-A90D-FAAF79BAF93D}", + "details": { + "name": "A" + } + }, + { + "typeid": "{EA2C3E90-AFBE-44D4-A90D-FAAF79BAF93D}", + "details": { + "name": "B" + } + } + ], + "results": [ + { + "typeid": "{EA2C3E90-AFBE-44D4-A90D-FAAF79BAF93D}", + "details": { + "name": "Result" + } + } + ] + }, + { + "base": "Tan", + "context": "Math", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Tan" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Tan is invoked" + }, + "details": { + "name": "Tan", + "category": "Other" + }, + "params": [ + { + "typeid": "{EA2C3E90-AFBE-44D4-A90D-FAAF79BAF93D}", + "details": { + "name": "Value" + } + } + ], + "results": [ + { + "typeid": "{EA2C3E90-AFBE-44D4-A90D-FAAF79BAF93D}", + "details": { + "name": "Result" + } + } + ] + }, + { + "base": "ArcTan2", + "context": "Math", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke ArcTan2" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after ArcTan2 is invoked" + }, + "details": { + "name": "Arc Tan 2", + "category": "Other" + }, + "params": [ + { + "typeid": "{EA2C3E90-AFBE-44D4-A90D-FAAF79BAF93D}", + "details": { + "name": "A" + } + }, + { + "typeid": "{EA2C3E90-AFBE-44D4-A90D-FAAF79BAF93D}", + "details": { + "name": "B" + } + } + ], + "results": [ + { + "typeid": "{EA2C3E90-AFBE-44D4-A90D-FAAF79BAF93D}", + "details": { + "name": "Result" + } + } + ] + }, + { + "base": "Floor", + "context": "Math", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Floor" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Floor is invoked" + }, + "details": { + "name": "Floor", + "category": "Other" + }, + "params": [ + { + "typeid": "{EA2C3E90-AFBE-44D4-A90D-FAAF79BAF93D}", + "details": { + "name": "Value" + } + } + ], + "results": [ + { + "typeid": "{EA2C3E90-AFBE-44D4-A90D-FAAF79BAF93D}", + "details": { + "name": "Result" + } + } + ] + }, + { + "base": "Min", + "context": "Math", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Min" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Min is invoked" + }, + "details": { + "name": "Min", + "category": "Other" + }, + "params": [ + { + "typeid": "{EA2C3E90-AFBE-44D4-A90D-FAAF79BAF93D}", + "details": { + "name": "A" + } + }, + { + "typeid": "{EA2C3E90-AFBE-44D4-A90D-FAAF79BAF93D}", + "details": { + "name": "B" + } + } + ], + "results": [ + { + "typeid": "{EA2C3E90-AFBE-44D4-A90D-FAAF79BAF93D}", + "details": { + "name": "Result" + } + } + ] + }, + { + "base": "Lerp", + "context": "Math", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Lerp" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Lerp is invoked" + }, + "details": { + "name": "Lerp", + "category": "Other" + }, + "params": [ + { + "typeid": "{EA2C3E90-AFBE-44D4-A90D-FAAF79BAF93D}", + "details": { + "name": "A" + } + }, + { + "typeid": "{EA2C3E90-AFBE-44D4-A90D-FAAF79BAF93D}", + "details": { + "name": "B" + } + }, + { + "typeid": "{EA2C3E90-AFBE-44D4-A90D-FAAF79BAF93D}", + "details": { + "name": "Time" + } + } + ], + "results": [ + { + "typeid": "{EA2C3E90-AFBE-44D4-A90D-FAAF79BAF93D}", + "details": { + "name": "Result" + } + } + ] + }, + { + "base": "LerpInverse", + "context": "Math", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke LerpInverse" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after LerpInverse is invoked" + }, + "details": { + "name": "LerpInverse", + "category": "Other" + }, + "params": [ + { + "typeid": "{EA2C3E90-AFBE-44D4-A90D-FAAF79BAF93D}", + "details": { + "name": "A" + } + }, + { + "typeid": "{EA2C3E90-AFBE-44D4-A90D-FAAF79BAF93D}", + "details": { + "name": "B" + } + }, + { + "typeid": "{EA2C3E90-AFBE-44D4-A90D-FAAF79BAF93D}", + "details": { + "name": "Time" + } + } + ], + "results": [ + { + "typeid": "{EA2C3E90-AFBE-44D4-A90D-FAAF79BAF93D}", + "details": { + "name": "Result" + } + } + ] + }, + { + "base": "IsOdd", + "context": "Math", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke IsOdd" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after IsOdd is invoked" + }, + "details": { + "name": "Is Odd", + "category": "Other" + }, + "params": [ + { + "typeid": "{72039442-EB38-4D42-A1AD-CB68F7E0EEF6}", + "details": { + "name": "Value" + } + } + ], + "results": [ + { + "typeid": "{A0CA880C-AFE4-43CB-926C-59AC48496112}", + "details": { + "name": "Is Odd" + } + } + ] + }, + { + "base": "Abs", + "context": "Math", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Abs" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Abs is invoked" + }, + "details": { + "name": "Abs" + }, + "params": [ + { + "typeid": "{EA2C3E90-AFBE-44D4-A90D-FAAF79BAF93D}", + "details": { + "name": "Value" + } + } + ], + "results": [ + { + "typeid": "{EA2C3E90-AFBE-44D4-A90D-FAAF79BAF93D}", + "details": { + "name": "Result" + } + } + ] + }, + { + "base": "RadToDeg", + "context": "Math", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke RadToDeg" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after RadToDeg is invoked" + }, + "details": { + "name": "Radians To Degrees", + "category": "Other" + }, + "params": [ + { + "typeid": "{EA2C3E90-AFBE-44D4-A90D-FAAF79BAF93D}", + "details": { + "name": "Radians" + } + } + ], + "results": [ + { + "typeid": "{EA2C3E90-AFBE-44D4-A90D-FAAF79BAF93D}", + "details": { + "name": "Degrees" + } + } + ] + }, + { + "base": "Sin", + "context": "Math", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Sin" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Sin is invoked" + }, + "details": { + "name": "Sin", + "category": "Other" + }, + "params": [ + { + "typeid": "{EA2C3E90-AFBE-44D4-A90D-FAAF79BAF93D}", + "details": { + "name": "Value" + } + } + ], + "results": [ + { + "typeid": "{EA2C3E90-AFBE-44D4-A90D-FAAF79BAF93D}", + "details": { + "name": "Result" + } + } + ] + }, + { + "base": "Cos", + "context": "Math", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Cos" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Cos is invoked" + }, + "details": { + "name": "Cos", + "category": "Other" + }, + "params": [ + { + "typeid": "{EA2C3E90-AFBE-44D4-A90D-FAAF79BAF93D}", + "details": { + "name": "Value" + } + } + ], + "results": [ + { + "typeid": "{EA2C3E90-AFBE-44D4-A90D-FAAF79BAF93D}", + "details": { + "name": "Result" + } + } + ] + }, + { + "base": "ArcCos", + "context": "Math", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke ArcCos" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after ArcCos is invoked" + }, + "details": { + "name": "Arc Cos", + "category": "Other" + }, + "params": [ + { + "typeid": "{EA2C3E90-AFBE-44D4-A90D-FAAF79BAF93D}", + "details": { + "name": "Value" + } + } + ], + "results": [ + { + "typeid": "{EA2C3E90-AFBE-44D4-A90D-FAAF79BAF93D}", + "details": { + "name": "Result" + } + } + ] + }, + { + "base": "Sign", + "context": "Math", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Sign" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Sign is invoked" + }, + "details": { + "name": "Sign", + "category": "Other" + }, + "params": [ + { + "typeid": "{EA2C3E90-AFBE-44D4-A90D-FAAF79BAF93D}", + "details": { + "name": "Value" + } + } + ], + "results": [ + { + "typeid": "{EA2C3E90-AFBE-44D4-A90D-FAAF79BAF93D}", + "details": { + "name": "Result" + } + } + ] + }, + { + "base": "Clamp", + "context": "Math", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Clamp" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Clamp is invoked" + }, + "details": { + "name": "Clamp", + "category": "Other" + }, + "params": [ + { + "typeid": "{EA2C3E90-AFBE-44D4-A90D-FAAF79BAF93D}", + "details": { + "name": "Value" + } + }, + { + "typeid": "{EA2C3E90-AFBE-44D4-A90D-FAAF79BAF93D}", + "details": { + "name": "Minimum" + } + }, + { + "typeid": "{EA2C3E90-AFBE-44D4-A90D-FAAF79BAF93D}", + "details": { + "name": "Maximum" + } + } + ], + "results": [ + { + "typeid": "{EA2C3E90-AFBE-44D4-A90D-FAAF79BAF93D}", + "details": { + "name": "Result" + } + } + ] + }, + { + "base": "GetSinCos", + "context": "Math", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke GetSinCos" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after GetSinCos is invoked" + }, + "details": { + "name": "Get Sin Cos", + "category": "Other" + }, + "params": [ + { + "typeid": "{EA2C3E90-AFBE-44D4-A90D-FAAF79BAF93D}", + "details": { + "name": "Value" + } + }, + { + "typeid": "{EA2C3E90-AFBE-44D4-A90D-FAAF79BAF93D}", + "details": { + "name": "Sin" + } + }, + { + "typeid": "{EA2C3E90-AFBE-44D4-A90D-FAAF79BAF93D}", + "details": { + "name": "Cos" + } + } + ] + }, + { + "base": "DegToRad", + "context": "Math", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke DegToRad" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after DegToRad is invoked" + }, + "details": { + "name": "Degrees To Radians", + "category": "Other" + }, + "params": [ + { + "typeid": "{EA2C3E90-AFBE-44D4-A90D-FAAF79BAF93D}", + "details": { + "name": "Degrees" + } + } + ], + "results": [ + { + "typeid": "{EA2C3E90-AFBE-44D4-A90D-FAAF79BAF93D}", + "details": { + "name": "Radians" + } + } + ] + }, + { + "base": "Pow", + "context": "Math", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Pow" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Pow is invoked" + }, + "details": { + "name": "Pow", + "category": "Other" + }, + "params": [ + { + "typeid": "{EA2C3E90-AFBE-44D4-A90D-FAAF79BAF93D}", + "details": { + "name": "Value" + } + }, + { + "typeid": "{EA2C3E90-AFBE-44D4-A90D-FAAF79BAF93D}", + "details": { + "name": "Exponent" + } + } + ], + "results": [ + { + "typeid": "{EA2C3E90-AFBE-44D4-A90D-FAAF79BAF93D}", + "details": { + "name": "Result" + } + } + ] + } + ] + } + ] +} \ No newline at end of file diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Classes/MathAABB_VM.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Classes/MathAABB_VM.names new file mode 100644 index 0000000000..56f6267643 --- /dev/null +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Classes/MathAABB_VM.names @@ -0,0 +1,948 @@ +{ + "entries": [ + { + "base": "MathAABB_VM", + "context": "BehaviorClass", + "variant": "", + "details": { + "name": "MathAABB_VM" + }, + "methods": [ + { + "base": "Overlaps", + "context": "MathAABB_VM", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Overlaps" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Overlaps is invoked" + }, + "details": { + "name": "MathAABB_VM::Overlaps", + "category": "Other" + }, + "params": [ + { + "typeid": "{A54C2B36-D5B8-46A1-A529-4EBDBD2450E7}", + "details": { + "name": "const Aabb&" + } + }, + { + "typeid": "{A54C2B36-D5B8-46A1-A529-4EBDBD2450E7}", + "details": { + "name": "const Aabb&" + } + } + ], + "results": [ + { + "typeid": "{A0CA880C-AFE4-43CB-926C-59AC48496112}", + "details": { + "name": "bool" + } + } + ] + }, + { + "base": "SurfaceArea", + "context": "MathAABB_VM", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke SurfaceArea" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after SurfaceArea is invoked" + }, + "details": { + "name": "MathAABB_VM::SurfaceArea", + "category": "Other" + }, + "params": [ + { + "typeid": "{A54C2B36-D5B8-46A1-A529-4EBDBD2450E7}", + "details": { + "name": "const Aabb&" + } + } + ], + "results": [ + { + "typeid": "{110C4B14-11A8-4E9D-8638-5051013A56AC}", + "details": { + "name": "double" + } + } + ] + }, + { + "base": "ToSphere", + "context": "MathAABB_VM", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke ToSphere" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after ToSphere is invoked" + }, + "details": { + "name": "MathAABB_VM::ToSphere", + "category": "Other" + }, + "params": [ + { + "typeid": "{A54C2B36-D5B8-46A1-A529-4EBDBD2450E7}", + "details": { + "name": "const Aabb&" + } + } + ], + "results": [ + { + "typeid": "{CD6328B1-6CC4-54CE-97F4-9D91F5A242F4}", + "details": { + "name": "tuple" + } + } + ] + }, + { + "base": "FromOBB", + "context": "MathAABB_VM", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke FromOBB" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after FromOBB is invoked" + }, + "details": { + "name": "MathAABB_VM::FromOBB", + "category": "Other" + }, + "params": [ + { + "typeid": "{004ABD25-CF14-4EB3-BD41-022C247C07FA}", + "details": { + "name": "const Obb&" + } + } + ], + "results": [ + { + "typeid": "{A54C2B36-D5B8-46A1-A529-4EBDBD2450E7}", + "details": { + "name": "Aabb" + } + } + ] + }, + { + "base": "Translate", + "context": "MathAABB_VM", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Translate" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Translate is invoked" + }, + "details": { + "name": "MathAABB_VM::Translate", + "category": "Other" + }, + "params": [ + { + "typeid": "{A54C2B36-D5B8-46A1-A529-4EBDBD2450E7}", + "details": { + "name": "const Aabb&" + } + }, + { + "typeid": "{8379EB7D-01FA-4538-B64B-A6543B4BE73D}", + "details": { + "name": "Vector3" + } + } + ], + "results": [ + { + "typeid": "{A54C2B36-D5B8-46A1-A529-4EBDBD2450E7}", + "details": { + "name": "Aabb" + } + } + ] + }, + { + "base": "ContainsVector3", + "context": "MathAABB_VM", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke ContainsVector3" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after ContainsVector3 is invoked" + }, + "details": { + "name": "MathAABB_VM::ContainsVector3", + "category": "Other" + }, + "params": [ + { + "typeid": "{A54C2B36-D5B8-46A1-A529-4EBDBD2450E7}", + "details": { + "name": "const Aabb&" + } + }, + { + "typeid": "{8379EB7D-01FA-4538-B64B-A6543B4BE73D}", + "details": { + "name": "const Vector3&" + } + } + ], + "results": [ + { + "typeid": "{A0CA880C-AFE4-43CB-926C-59AC48496112}", + "details": { + "name": "bool" + } + } + ] + }, + { + "base": "Distance", + "context": "MathAABB_VM", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Distance" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Distance is invoked" + }, + "details": { + "name": "MathAABB_VM::Distance", + "category": "Other" + }, + "params": [ + { + "typeid": "{A54C2B36-D5B8-46A1-A529-4EBDBD2450E7}", + "details": { + "name": "const Aabb&" + } + }, + { + "typeid": "{8379EB7D-01FA-4538-B64B-A6543B4BE73D}", + "details": { + "name": "Vector3" + } + } + ], + "results": [ + { + "typeid": "{110C4B14-11A8-4E9D-8638-5051013A56AC}", + "details": { + "name": "double" + } + } + ] + }, + { + "base": "FromPoint", + "context": "MathAABB_VM", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke FromPoint" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after FromPoint is invoked" + }, + "details": { + "name": "MathAABB_VM::FromPoint", + "category": "Other" + }, + "params": [ + { + "typeid": "{8379EB7D-01FA-4538-B64B-A6543B4BE73D}", + "details": { + "name": "const Vector3&" + } + } + ], + "results": [ + { + "typeid": "{A54C2B36-D5B8-46A1-A529-4EBDBD2450E7}", + "details": { + "name": "Aabb" + } + } + ] + }, + { + "base": "Null", + "context": "MathAABB_VM", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Null" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Null is invoked" + }, + "details": { + "name": "MathAABB_VM::Null", + "category": "Other" + }, + "results": [ + { + "typeid": "{A54C2B36-D5B8-46A1-A529-4EBDBD2450E7}", + "details": { + "name": "Aabb" + } + } + ] + }, + { + "base": "YExtent", + "context": "MathAABB_VM", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke YExtent" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after YExtent is invoked" + }, + "details": { + "name": "MathAABB_VM::YExtent", + "category": "Other" + }, + "params": [ + { + "typeid": "{A54C2B36-D5B8-46A1-A529-4EBDBD2450E7}", + "details": { + "name": "const Aabb&" + } + } + ], + "results": [ + { + "typeid": "{110C4B14-11A8-4E9D-8638-5051013A56AC}", + "details": { + "name": "double" + } + } + ] + }, + { + "base": "Clamp", + "context": "MathAABB_VM", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Clamp" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Clamp is invoked" + }, + "details": { + "name": "MathAABB_VM::Clamp", + "category": "Other" + }, + "params": [ + { + "typeid": "{A54C2B36-D5B8-46A1-A529-4EBDBD2450E7}", + "details": { + "name": "const Aabb&" + } + }, + { + "typeid": "{A54C2B36-D5B8-46A1-A529-4EBDBD2450E7}", + "details": { + "name": "const Aabb&" + } + } + ], + "results": [ + { + "typeid": "{A54C2B36-D5B8-46A1-A529-4EBDBD2450E7}", + "details": { + "name": "Aabb" + } + } + ] + }, + { + "base": "ContainsAABB", + "context": "MathAABB_VM", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke ContainsAABB" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after ContainsAABB is invoked" + }, + "details": { + "name": "MathAABB_VM::ContainsAABB", + "category": "Other" + }, + "params": [ + { + "typeid": "{A54C2B36-D5B8-46A1-A529-4EBDBD2450E7}", + "details": { + "name": "const Aabb&" + } + }, + { + "typeid": "{A54C2B36-D5B8-46A1-A529-4EBDBD2450E7}", + "details": { + "name": "const Aabb&" + } + } + ], + "results": [ + { + "typeid": "{A0CA880C-AFE4-43CB-926C-59AC48496112}", + "details": { + "name": "bool" + } + } + ] + }, + { + "base": "Expand", + "context": "MathAABB_VM", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Expand" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Expand is invoked" + }, + "details": { + "name": "MathAABB_VM::Expand", + "category": "Other" + }, + "params": [ + { + "typeid": "{A54C2B36-D5B8-46A1-A529-4EBDBD2450E7}", + "details": { + "name": "const Aabb&" + } + }, + { + "typeid": "{8379EB7D-01FA-4538-B64B-A6543B4BE73D}", + "details": { + "name": "Vector3" + } + } + ], + "results": [ + { + "typeid": "{A54C2B36-D5B8-46A1-A529-4EBDBD2450E7}", + "details": { + "name": "Aabb" + } + } + ] + }, + { + "base": "Extents", + "context": "MathAABB_VM", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Extents" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Extents is invoked" + }, + "details": { + "name": "MathAABB_VM::Extents", + "category": "Other" + }, + "params": [ + { + "typeid": "{A54C2B36-D5B8-46A1-A529-4EBDBD2450E7}", + "details": { + "name": "const Aabb&" + } + } + ], + "results": [ + { + "typeid": "{8379EB7D-01FA-4538-B64B-A6543B4BE73D}", + "details": { + "name": "Vector3" + } + } + ] + }, + { + "base": "FromCenterHalfExtents", + "context": "MathAABB_VM", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke FromCenterHalfExtents" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after FromCenterHalfExtents is invoked" + }, + "details": { + "name": "MathAABB_VM::FromCenterHalfExtents", + "category": "Other" + }, + "params": [ + { + "typeid": "{8379EB7D-01FA-4538-B64B-A6543B4BE73D}", + "details": { + "name": "Vector3" + } + }, + { + "typeid": "{8379EB7D-01FA-4538-B64B-A6543B4BE73D}", + "details": { + "name": "Vector3" + } + } + ], + "results": [ + { + "typeid": "{A54C2B36-D5B8-46A1-A529-4EBDBD2450E7}", + "details": { + "name": "Aabb" + } + } + ] + }, + { + "base": "GetMin", + "context": "MathAABB_VM", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke GetMin" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after GetMin is invoked" + }, + "details": { + "name": "MathAABB_VM::GetMin", + "category": "Other" + }, + "params": [ + { + "typeid": "{A54C2B36-D5B8-46A1-A529-4EBDBD2450E7}", + "details": { + "name": "const Aabb&" + } + } + ], + "results": [ + { + "typeid": "{8379EB7D-01FA-4538-B64B-A6543B4BE73D}", + "details": { + "name": "Vector3" + } + } + ] + }, + { + "base": "ApplyTransform", + "context": "MathAABB_VM", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke ApplyTransform" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after ApplyTransform is invoked" + }, + "details": { + "name": "MathAABB_VM::ApplyTransform", + "category": "Other" + }, + "params": [ + { + "typeid": "{A54C2B36-D5B8-46A1-A529-4EBDBD2450E7}", + "details": { + "name": "Aabb" + } + }, + { + "typeid": "{5D9958E9-9F1E-4985-B532-FFFDE75FEDFD}", + "details": { + "name": "const Transform&" + } + } + ], + "results": [ + { + "typeid": "{A54C2B36-D5B8-46A1-A529-4EBDBD2450E7}", + "details": { + "name": "Aabb" + } + } + ] + }, + { + "base": "Center", + "context": "MathAABB_VM", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Center" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Center is invoked" + }, + "details": { + "name": "MathAABB_VM::Center", + "category": "Other" + }, + "params": [ + { + "typeid": "{A54C2B36-D5B8-46A1-A529-4EBDBD2450E7}", + "details": { + "name": "const Aabb&" + } + } + ], + "results": [ + { + "typeid": "{8379EB7D-01FA-4538-B64B-A6543B4BE73D}", + "details": { + "name": "Vector3" + } + } + ] + }, + { + "base": "FromMinMax", + "context": "MathAABB_VM", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke FromMinMax" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after FromMinMax is invoked" + }, + "details": { + "name": "MathAABB_VM::FromMinMax", + "category": "Other" + }, + "params": [ + { + "typeid": "{8379EB7D-01FA-4538-B64B-A6543B4BE73D}", + "details": { + "name": "Vector3" + } + }, + { + "typeid": "{8379EB7D-01FA-4538-B64B-A6543B4BE73D}", + "details": { + "name": "Vector3" + } + } + ], + "results": [ + { + "typeid": "{A54C2B36-D5B8-46A1-A529-4EBDBD2450E7}", + "details": { + "name": "Aabb" + } + } + ] + }, + { + "base": "IsFinite", + "context": "MathAABB_VM", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke IsFinite" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after IsFinite is invoked" + }, + "details": { + "name": "MathAABB_VM::IsFinite", + "category": "Other" + }, + "params": [ + { + "typeid": "{A54C2B36-D5B8-46A1-A529-4EBDBD2450E7}", + "details": { + "name": "const Aabb&" + } + } + ], + "results": [ + { + "typeid": "{A0CA880C-AFE4-43CB-926C-59AC48496112}", + "details": { + "name": "bool" + } + } + ] + }, + { + "base": "IsValid", + "context": "MathAABB_VM", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke IsValid" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after IsValid is invoked" + }, + "details": { + "name": "MathAABB_VM::IsValid", + "category": "Other" + }, + "params": [ + { + "typeid": "{A54C2B36-D5B8-46A1-A529-4EBDBD2450E7}", + "details": { + "name": "const Aabb&" + } + } + ], + "results": [ + { + "typeid": "{A0CA880C-AFE4-43CB-926C-59AC48496112}", + "details": { + "name": "bool" + } + } + ] + }, + { + "base": "GetMax", + "context": "MathAABB_VM", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke GetMax" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after GetMax is invoked" + }, + "details": { + "name": "MathAABB_VM::GetMax", + "category": "Other" + }, + "params": [ + { + "typeid": "{A54C2B36-D5B8-46A1-A529-4EBDBD2450E7}", + "details": { + "name": "const Aabb&" + } + } + ], + "results": [ + { + "typeid": "{8379EB7D-01FA-4538-B64B-A6543B4BE73D}", + "details": { + "name": "Vector3" + } + } + ] + }, + { + "base": "XExtent", + "context": "MathAABB_VM", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke XExtent" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after XExtent is invoked" + }, + "details": { + "name": "MathAABB_VM::XExtent", + "category": "Other" + }, + "params": [ + { + "typeid": "{A54C2B36-D5B8-46A1-A529-4EBDBD2450E7}", + "details": { + "name": "const Aabb&" + } + } + ], + "results": [ + { + "typeid": "{110C4B14-11A8-4E9D-8638-5051013A56AC}", + "details": { + "name": "double" + } + } + ] + }, + { + "base": "AddPoint", + "context": "MathAABB_VM", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke AddPoint" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after AddPoint is invoked" + }, + "details": { + "name": "MathAABB_VM::AddPoint", + "category": "Other" + }, + "params": [ + { + "typeid": "{A54C2B36-D5B8-46A1-A529-4EBDBD2450E7}", + "details": { + "name": "Aabb" + } + }, + { + "typeid": "{8379EB7D-01FA-4538-B64B-A6543B4BE73D}", + "details": { + "name": "Vector3" + } + } + ], + "results": [ + { + "typeid": "{A54C2B36-D5B8-46A1-A529-4EBDBD2450E7}", + "details": { + "name": "Aabb" + } + } + ] + }, + { + "base": "AddAABB", + "context": "MathAABB_VM", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke AddAABB" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after AddAABB is invoked" + }, + "details": { + "name": "MathAABB_VM::AddAABB", + "category": "Other" + }, + "params": [ + { + "typeid": "{A54C2B36-D5B8-46A1-A529-4EBDBD2450E7}", + "details": { + "name": "Aabb" + } + }, + { + "typeid": "{A54C2B36-D5B8-46A1-A529-4EBDBD2450E7}", + "details": { + "name": "const Aabb&" + } + } + ], + "results": [ + { + "typeid": "{A54C2B36-D5B8-46A1-A529-4EBDBD2450E7}", + "details": { + "name": "Aabb" + } + } + ] + }, + { + "base": "FromCenterRadius", + "context": "MathAABB_VM", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke FromCenterRadius" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after FromCenterRadius is invoked" + }, + "details": { + "name": "MathAABB_VM::FromCenterRadius", + "category": "Other" + }, + "params": [ + { + "typeid": "{8379EB7D-01FA-4538-B64B-A6543B4BE73D}", + "details": { + "name": "Vector3" + } + }, + { + "typeid": "{110C4B14-11A8-4E9D-8638-5051013A56AC}", + "details": { + "name": "double" + } + } + ], + "results": [ + { + "typeid": "{A54C2B36-D5B8-46A1-A529-4EBDBD2450E7}", + "details": { + "name": "Aabb" + } + } + ] + }, + { + "base": "ZExtent", + "context": "MathAABB_VM", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke ZExtent" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after ZExtent is invoked" + }, + "details": { + "name": "MathAABB_VM::ZExtent", + "category": "Other" + }, + "params": [ + { + "typeid": "{A54C2B36-D5B8-46A1-A529-4EBDBD2450E7}", + "details": { + "name": "const Aabb&" + } + } + ], + "results": [ + { + "typeid": "{110C4B14-11A8-4E9D-8638-5051013A56AC}", + "details": { + "name": "double" + } + } + ] + } + ] + } + ] +} \ No newline at end of file diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Classes/MathColor_VM.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Classes/MathColor_VM.names new file mode 100644 index 0000000000..cc13a61532 --- /dev/null +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Classes/MathColor_VM.names @@ -0,0 +1,602 @@ +{ + "entries": [ + { + "base": "MathColor_VM", + "context": "BehaviorClass", + "variant": "", + "details": { + "name": "MathColor_VM" + }, + "methods": [ + { + "base": "One", + "context": "MathColor_VM", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke One" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after One is invoked" + }, + "details": { + "name": "MathColor_VM::One", + "category": "Other" + }, + "results": [ + { + "typeid": "{7894072A-9050-4F0F-901B-34B1A0D29417}", + "details": { + "name": "Color" + } + } + ] + }, + { + "base": "LinearToGamma", + "context": "MathColor_VM", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke LinearToGamma" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after LinearToGamma is invoked" + }, + "details": { + "name": "MathColor_VM::LinearToGamma", + "category": "Other" + }, + "params": [ + { + "typeid": "{7894072A-9050-4F0F-901B-34B1A0D29417}", + "details": { + "name": "Color" + } + } + ], + "results": [ + { + "typeid": "{7894072A-9050-4F0F-901B-34B1A0D29417}", + "details": { + "name": "Color" + } + } + ] + }, + { + "base": "FromVector3", + "context": "MathColor_VM", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke FromVector3" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after FromVector3 is invoked" + }, + "details": { + "name": "MathColor_VM::FromVector3", + "category": "Other" + }, + "params": [ + { + "typeid": "{8379EB7D-01FA-4538-B64B-A6543B4BE73D}", + "details": { + "name": "Vector3" + } + } + ], + "results": [ + { + "typeid": "{7894072A-9050-4F0F-901B-34B1A0D29417}", + "details": { + "name": "Color" + } + } + ] + }, + { + "base": "MultiplyByNumber", + "context": "MathColor_VM", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke MultiplyByNumber" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after MultiplyByNumber is invoked" + }, + "details": { + "name": "MathColor_VM::MultiplyByNumber", + "category": "Other" + }, + "params": [ + { + "typeid": "{7894072A-9050-4F0F-901B-34B1A0D29417}", + "details": { + "name": "Color" + } + }, + { + "typeid": "{110C4B14-11A8-4E9D-8638-5051013A56AC}", + "details": { + "name": "double" + } + } + ], + "results": [ + { + "typeid": "{7894072A-9050-4F0F-901B-34B1A0D29417}", + "details": { + "name": "Color" + } + } + ] + }, + { + "base": "Negate", + "context": "MathColor_VM", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Negate" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Negate is invoked" + }, + "details": { + "name": "MathColor_VM::Negate", + "category": "Other" + }, + "params": [ + { + "typeid": "{7894072A-9050-4F0F-901B-34B1A0D29417}", + "details": { + "name": "Color" + } + } + ], + "results": [ + { + "typeid": "{7894072A-9050-4F0F-901B-34B1A0D29417}", + "details": { + "name": "Color" + } + } + ] + }, + { + "base": "Dot3", + "context": "MathColor_VM", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Dot3" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Dot3 is invoked" + }, + "details": { + "name": "MathColor_VM::Dot3", + "category": "Other" + }, + "params": [ + { + "typeid": "{7894072A-9050-4F0F-901B-34B1A0D29417}", + "details": { + "name": "Color" + } + }, + { + "typeid": "{7894072A-9050-4F0F-901B-34B1A0D29417}", + "details": { + "name": "Color" + } + } + ], + "results": [ + { + "typeid": "{110C4B14-11A8-4E9D-8638-5051013A56AC}", + "details": { + "name": "double" + } + } + ] + }, + { + "base": "Dot", + "context": "MathColor_VM", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Dot" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Dot is invoked" + }, + "details": { + "name": "MathColor_VM::Dot", + "category": "Other" + }, + "params": [ + { + "typeid": "{7894072A-9050-4F0F-901B-34B1A0D29417}", + "details": { + "name": "Color" + } + }, + { + "typeid": "{7894072A-9050-4F0F-901B-34B1A0D29417}", + "details": { + "name": "Color" + } + } + ], + "results": [ + { + "typeid": "{110C4B14-11A8-4E9D-8638-5051013A56AC}", + "details": { + "name": "double" + } + } + ] + }, + { + "base": "FromValues", + "context": "MathColor_VM", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke FromValues" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after FromValues is invoked" + }, + "details": { + "name": "MathColor_VM::FromValues", + "category": "Other" + }, + "params": [ + { + "typeid": "{110C4B14-11A8-4E9D-8638-5051013A56AC}", + "details": { + "name": "double" + } + }, + { + "typeid": "{110C4B14-11A8-4E9D-8638-5051013A56AC}", + "details": { + "name": "double" + } + }, + { + "typeid": "{110C4B14-11A8-4E9D-8638-5051013A56AC}", + "details": { + "name": "double" + } + }, + { + "typeid": "{110C4B14-11A8-4E9D-8638-5051013A56AC}", + "details": { + "name": "double" + } + } + ], + "results": [ + { + "typeid": "{7894072A-9050-4F0F-901B-34B1A0D29417}", + "details": { + "name": "Color" + } + } + ] + }, + { + "base": "DivideByNumber", + "context": "MathColor_VM", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke DivideByNumber" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after DivideByNumber is invoked" + }, + "details": { + "name": "MathColor_VM::DivideByNumber", + "category": "Other" + }, + "params": [ + { + "typeid": "{7894072A-9050-4F0F-901B-34B1A0D29417}", + "details": { + "name": "Color" + } + }, + { + "typeid": "{110C4B14-11A8-4E9D-8638-5051013A56AC}", + "details": { + "name": "double" + } + } + ], + "results": [ + { + "typeid": "{7894072A-9050-4F0F-901B-34B1A0D29417}", + "details": { + "name": "Color" + } + } + ] + }, + { + "base": "FromVector3AndNumber", + "context": "MathColor_VM", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke FromVector3AndNumber" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after FromVector3AndNumber is invoked" + }, + "details": { + "name": "MathColor_VM::FromVector3AndNumber", + "category": "Other" + }, + "params": [ + { + "typeid": "{8379EB7D-01FA-4538-B64B-A6543B4BE73D}", + "details": { + "name": "Vector3" + } + }, + { + "typeid": "{110C4B14-11A8-4E9D-8638-5051013A56AC}", + "details": { + "name": "double" + } + } + ], + "results": [ + { + "typeid": "{7894072A-9050-4F0F-901B-34B1A0D29417}", + "details": { + "name": "Color" + } + } + ] + }, + { + "base": "GammaToLinear", + "context": "MathColor_VM", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke GammaToLinear" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after GammaToLinear is invoked" + }, + "details": { + "name": "MathColor_VM::GammaToLinear", + "category": "Other" + }, + "params": [ + { + "typeid": "{7894072A-9050-4F0F-901B-34B1A0D29417}", + "details": { + "name": "Color" + } + } + ], + "results": [ + { + "typeid": "{7894072A-9050-4F0F-901B-34B1A0D29417}", + "details": { + "name": "Color" + } + } + ] + }, + { + "base": "IsClose", + "context": "MathColor_VM", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke IsClose" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after IsClose is invoked" + }, + "details": { + "name": "MathColor_VM::IsClose", + "category": "Other" + }, + "params": [ + { + "typeid": "{7894072A-9050-4F0F-901B-34B1A0D29417}", + "details": { + "name": "Color" + } + }, + { + "typeid": "{7894072A-9050-4F0F-901B-34B1A0D29417}", + "details": { + "name": "Color" + } + }, + { + "typeid": "{110C4B14-11A8-4E9D-8638-5051013A56AC}", + "details": { + "name": "double" + } + } + ], + "results": [ + { + "typeid": "{A0CA880C-AFE4-43CB-926C-59AC48496112}", + "details": { + "name": "bool" + } + } + ] + }, + { + "base": "IsZero", + "context": "MathColor_VM", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke IsZero" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after IsZero is invoked" + }, + "details": { + "name": "MathColor_VM::IsZero", + "category": "Other" + }, + "params": [ + { + "typeid": "{7894072A-9050-4F0F-901B-34B1A0D29417}", + "details": { + "name": "Color" + } + }, + { + "typeid": "{110C4B14-11A8-4E9D-8638-5051013A56AC}", + "details": { + "name": "double" + } + } + ], + "results": [ + { + "typeid": "{A0CA880C-AFE4-43CB-926C-59AC48496112}", + "details": { + "name": "bool" + } + } + ] + }, + { + "base": "MultiplyByColor", + "context": "MathColor_VM", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke MultiplyByColor" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after MultiplyByColor is invoked" + }, + "details": { + "name": "MathColor_VM::MultiplyByColor", + "category": "Other" + }, + "params": [ + { + "typeid": "{7894072A-9050-4F0F-901B-34B1A0D29417}", + "details": { + "name": "Color" + } + }, + { + "typeid": "{7894072A-9050-4F0F-901B-34B1A0D29417}", + "details": { + "name": "Color" + } + } + ], + "results": [ + { + "typeid": "{7894072A-9050-4F0F-901B-34B1A0D29417}", + "details": { + "name": "Color" + } + } + ] + }, + { + "base": "Add", + "context": "MathColor_VM", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Add" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Add is invoked" + }, + "details": { + "name": "MathColor_VM::Add", + "category": "Other" + }, + "params": [ + { + "typeid": "{7894072A-9050-4F0F-901B-34B1A0D29417}", + "details": { + "name": "Color" + } + }, + { + "typeid": "{7894072A-9050-4F0F-901B-34B1A0D29417}", + "details": { + "name": "Color" + } + } + ], + "results": [ + { + "typeid": "{7894072A-9050-4F0F-901B-34B1A0D29417}", + "details": { + "name": "Color" + } + } + ] + }, + { + "base": "Subtract", + "context": "MathColor_VM", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Subtract" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Subtract is invoked" + }, + "details": { + "name": "MathColor_VM::Subtract", + "category": "Other" + }, + "params": [ + { + "typeid": "{7894072A-9050-4F0F-901B-34B1A0D29417}", + "details": { + "name": "Color" + } + }, + { + "typeid": "{7894072A-9050-4F0F-901B-34B1A0D29417}", + "details": { + "name": "Color" + } + } + ], + "results": [ + { + "typeid": "{7894072A-9050-4F0F-901B-34B1A0D29417}", + "details": { + "name": "Color" + } + } + ] + } + ] + } + ] +} \ No newline at end of file diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Classes/MathCrc32_VM.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Classes/MathCrc32_VM.names new file mode 100644 index 0000000000..339b02c5fd --- /dev/null +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Classes/MathCrc32_VM.names @@ -0,0 +1,46 @@ +{ + "entries": [ + { + "base": "MathCrc32_VM", + "context": "BehaviorClass", + "variant": "", + "details": { + "name": "MathCrc32_VM" + }, + "methods": [ + { + "base": "FromString", + "context": "MathCrc32_VM", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke FromString" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after FromString is invoked" + }, + "details": { + "name": "MathCrc32_VM::FromString", + "category": "Other" + }, + "params": [ + { + "typeid": "{03AAAB3F-5C47-5A66-9EBC-D5FA4DB353C9}", + "details": { + "name": "AZStd::basic_string, allocator>" + } + } + ], + "results": [ + { + "typeid": "{9F4E062E-06A0-46D4-85DF-E0DA96467D3A}", + "details": { + "name": "Crc32" + } + } + ] + } + ] + } + ] +} \ No newline at end of file diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Classes/MathMatrix3x3_VM.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Classes/MathMatrix3x3_VM.names new file mode 100644 index 0000000000..b1722ef645 --- /dev/null +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Classes/MathMatrix3x3_VM.names @@ -0,0 +1,1158 @@ +{ + "entries": [ + { + "base": "MathMatrix3x3_VM", + "context": "BehaviorClass", + "variant": "", + "details": { + "name": "MathMatrix3x3_VM" + }, + "methods": [ + { + "base": "Transpose", + "context": "MathMatrix3x3_VM", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Transpose" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Transpose is invoked" + }, + "details": { + "name": "MathMatrix3x3_VM::Transpose", + "category": "Other" + }, + "params": [ + { + "typeid": "{15A4332F-7C3F-4A58-AC35-50E1CE53FB9C}", + "details": { + "name": "const Matrix3x3&" + } + } + ], + "results": [ + { + "typeid": "{15A4332F-7C3F-4A58-AC35-50E1CE53FB9C}", + "details": { + "name": "Matrix3x3" + } + } + ] + }, + { + "base": "Zero", + "context": "MathMatrix3x3_VM", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Zero" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Zero is invoked" + }, + "details": { + "name": "MathMatrix3x3_VM::Zero", + "category": "Other" + }, + "results": [ + { + "typeid": "{15A4332F-7C3F-4A58-AC35-50E1CE53FB9C}", + "details": { + "name": "Matrix3x3" + } + } + ] + }, + { + "base": "Subtract", + "context": "MathMatrix3x3_VM", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Subtract" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Subtract is invoked" + }, + "details": { + "name": "MathMatrix3x3_VM::Subtract", + "category": "Other" + }, + "params": [ + { + "typeid": "{15A4332F-7C3F-4A58-AC35-50E1CE53FB9C}", + "details": { + "name": "const Matrix3x3&" + } + }, + { + "typeid": "{15A4332F-7C3F-4A58-AC35-50E1CE53FB9C}", + "details": { + "name": "const Matrix3x3&" + } + } + ], + "results": [ + { + "typeid": "{15A4332F-7C3F-4A58-AC35-50E1CE53FB9C}", + "details": { + "name": "Matrix3x3" + } + } + ] + }, + { + "base": "GetElement", + "context": "MathMatrix3x3_VM", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke GetElement" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after GetElement is invoked" + }, + "details": { + "name": "MathMatrix3x3_VM::GetElement", + "category": "Other" + }, + "params": [ + { + "typeid": "{15A4332F-7C3F-4A58-AC35-50E1CE53FB9C}", + "details": { + "name": "const Matrix3x3&" + } + }, + { + "typeid": "{110C4B14-11A8-4E9D-8638-5051013A56AC}", + "details": { + "name": "double" + } + }, + { + "typeid": "{110C4B14-11A8-4E9D-8638-5051013A56AC}", + "details": { + "name": "double" + } + } + ], + "results": [ + { + "typeid": "{110C4B14-11A8-4E9D-8638-5051013A56AC}", + "details": { + "name": "double" + } + } + ] + }, + { + "base": "Invert", + "context": "MathMatrix3x3_VM", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Invert" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Invert is invoked" + }, + "details": { + "name": "MathMatrix3x3_VM::Invert", + "category": "Other" + }, + "params": [ + { + "typeid": "{15A4332F-7C3F-4A58-AC35-50E1CE53FB9C}", + "details": { + "name": "const Matrix3x3&" + } + } + ], + "results": [ + { + "typeid": "{15A4332F-7C3F-4A58-AC35-50E1CE53FB9C}", + "details": { + "name": "Matrix3x3" + } + } + ] + }, + { + "base": "GetDiagonal", + "context": "MathMatrix3x3_VM", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke GetDiagonal" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after GetDiagonal is invoked" + }, + "details": { + "name": "MathMatrix3x3_VM::GetDiagonal", + "category": "Other" + }, + "params": [ + { + "typeid": "{15A4332F-7C3F-4A58-AC35-50E1CE53FB9C}", + "details": { + "name": "const Matrix3x3&" + } + } + ], + "results": [ + { + "typeid": "{8379EB7D-01FA-4538-B64B-A6543B4BE73D}", + "details": { + "name": "Vector3" + } + } + ] + }, + { + "base": "GetColumn", + "context": "MathMatrix3x3_VM", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke GetColumn" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after GetColumn is invoked" + }, + "details": { + "name": "MathMatrix3x3_VM::GetColumn", + "category": "Other" + }, + "params": [ + { + "typeid": "{15A4332F-7C3F-4A58-AC35-50E1CE53FB9C}", + "details": { + "name": "const Matrix3x3&" + } + }, + { + "typeid": "{110C4B14-11A8-4E9D-8638-5051013A56AC}", + "details": { + "name": "double" + } + } + ], + "results": [ + { + "typeid": "{8379EB7D-01FA-4538-B64B-A6543B4BE73D}", + "details": { + "name": "Vector3" + } + } + ] + }, + { + "base": "MultiplyByVector", + "context": "MathMatrix3x3_VM", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke MultiplyByVector" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after MultiplyByVector is invoked" + }, + "details": { + "name": "MathMatrix3x3_VM::MultiplyByVector", + "category": "Other" + }, + "params": [ + { + "typeid": "{15A4332F-7C3F-4A58-AC35-50E1CE53FB9C}", + "details": { + "name": "const Matrix3x3&" + } + }, + { + "typeid": "{8379EB7D-01FA-4538-B64B-A6543B4BE73D}", + "details": { + "name": "const Vector3&" + } + } + ], + "results": [ + { + "typeid": "{8379EB7D-01FA-4538-B64B-A6543B4BE73D}", + "details": { + "name": "Vector3" + } + } + ] + }, + { + "base": "Add", + "context": "MathMatrix3x3_VM", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Add" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Add is invoked" + }, + "details": { + "name": "MathMatrix3x3_VM::Add", + "category": "Other" + }, + "params": [ + { + "typeid": "{15A4332F-7C3F-4A58-AC35-50E1CE53FB9C}", + "details": { + "name": "const Matrix3x3&" + } + }, + { + "typeid": "{15A4332F-7C3F-4A58-AC35-50E1CE53FB9C}", + "details": { + "name": "const Matrix3x3&" + } + } + ], + "results": [ + { + "typeid": "{15A4332F-7C3F-4A58-AC35-50E1CE53FB9C}", + "details": { + "name": "Matrix3x3" + } + } + ] + }, + { + "base": "IsFinite", + "context": "MathMatrix3x3_VM", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke IsFinite" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after IsFinite is invoked" + }, + "details": { + "name": "MathMatrix3x3_VM::IsFinite", + "category": "Other" + }, + "params": [ + { + "typeid": "{15A4332F-7C3F-4A58-AC35-50E1CE53FB9C}", + "details": { + "name": "const Matrix3x3&" + } + } + ], + "results": [ + { + "typeid": "{A0CA880C-AFE4-43CB-926C-59AC48496112}", + "details": { + "name": "bool" + } + } + ] + }, + { + "base": "DivideByNumber", + "context": "MathMatrix3x3_VM", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke DivideByNumber" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after DivideByNumber is invoked" + }, + "details": { + "name": "MathMatrix3x3_VM::DivideByNumber", + "category": "Other" + }, + "params": [ + { + "typeid": "{15A4332F-7C3F-4A58-AC35-50E1CE53FB9C}", + "details": { + "name": "const Matrix3x3&" + } + }, + { + "typeid": "{110C4B14-11A8-4E9D-8638-5051013A56AC}", + "details": { + "name": "double" + } + } + ], + "results": [ + { + "typeid": "{15A4332F-7C3F-4A58-AC35-50E1CE53FB9C}", + "details": { + "name": "Matrix3x3" + } + } + ] + }, + { + "base": "ToAdjugate", + "context": "MathMatrix3x3_VM", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke ToAdjugate" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after ToAdjugate is invoked" + }, + "details": { + "name": "MathMatrix3x3_VM::ToAdjugate", + "category": "Other" + }, + "params": [ + { + "typeid": "{15A4332F-7C3F-4A58-AC35-50E1CE53FB9C}", + "details": { + "name": "const Matrix3x3&" + } + } + ], + "results": [ + { + "typeid": "{15A4332F-7C3F-4A58-AC35-50E1CE53FB9C}", + "details": { + "name": "Matrix3x3" + } + } + ] + }, + { + "base": "IsClose", + "context": "MathMatrix3x3_VM", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke IsClose" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after IsClose is invoked" + }, + "details": { + "name": "MathMatrix3x3_VM::IsClose", + "category": "Other" + }, + "params": [ + { + "typeid": "{15A4332F-7C3F-4A58-AC35-50E1CE53FB9C}", + "details": { + "name": "const Matrix3x3&" + } + }, + { + "typeid": "{15A4332F-7C3F-4A58-AC35-50E1CE53FB9C}", + "details": { + "name": "const Matrix3x3&" + } + }, + { + "typeid": "{110C4B14-11A8-4E9D-8638-5051013A56AC}", + "details": { + "name": "double" + } + } + ], + "results": [ + { + "typeid": "{A0CA880C-AFE4-43CB-926C-59AC48496112}", + "details": { + "name": "bool" + } + } + ] + }, + { + "base": "MultiplyByMatrix", + "context": "MathMatrix3x3_VM", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke MultiplyByMatrix" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after MultiplyByMatrix is invoked" + }, + "details": { + "name": "MathMatrix3x3_VM::MultiplyByMatrix", + "category": "Other" + }, + "params": [ + { + "typeid": "{15A4332F-7C3F-4A58-AC35-50E1CE53FB9C}", + "details": { + "name": "const Matrix3x3&" + } + }, + { + "typeid": "{15A4332F-7C3F-4A58-AC35-50E1CE53FB9C}", + "details": { + "name": "const Matrix3x3&" + } + } + ], + "results": [ + { + "typeid": "{15A4332F-7C3F-4A58-AC35-50E1CE53FB9C}", + "details": { + "name": "Matrix3x3" + } + } + ] + }, + { + "base": "IsOrthogonal", + "context": "MathMatrix3x3_VM", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke IsOrthogonal" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after IsOrthogonal is invoked" + }, + "details": { + "name": "MathMatrix3x3_VM::IsOrthogonal", + "category": "Other" + }, + "params": [ + { + "typeid": "{15A4332F-7C3F-4A58-AC35-50E1CE53FB9C}", + "details": { + "name": "const Matrix3x3&" + } + } + ], + "results": [ + { + "typeid": "{A0CA880C-AFE4-43CB-926C-59AC48496112}", + "details": { + "name": "bool" + } + } + ] + }, + { + "base": "Orthogonalize", + "context": "MathMatrix3x3_VM", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Orthogonalize" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Orthogonalize is invoked" + }, + "details": { + "name": "MathMatrix3x3_VM::Orthogonalize", + "category": "Other" + }, + "params": [ + { + "typeid": "{15A4332F-7C3F-4A58-AC35-50E1CE53FB9C}", + "details": { + "name": "const Matrix3x3&" + } + } + ], + "results": [ + { + "typeid": "{15A4332F-7C3F-4A58-AC35-50E1CE53FB9C}", + "details": { + "name": "Matrix3x3" + } + } + ] + }, + { + "base": "GetRows", + "context": "MathMatrix3x3_VM", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke GetRows" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after GetRows is invoked" + }, + "details": { + "name": "MathMatrix3x3_VM::GetRows", + "category": "Other" + }, + "params": [ + { + "typeid": "{15A4332F-7C3F-4A58-AC35-50E1CE53FB9C}", + "details": { + "name": "const Matrix3x3&" + } + } + ], + "results": [ + { + "typeid": "{93942742-473F-5EE3-8420-D8F22C612221}", + "details": { + "name": "tuple" + } + } + ] + }, + { + "base": "FromCrossProduct", + "context": "MathMatrix3x3_VM", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke FromCrossProduct" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after FromCrossProduct is invoked" + }, + "details": { + "name": "MathMatrix3x3_VM::FromCrossProduct", + "category": "Other" + }, + "params": [ + { + "typeid": "{8379EB7D-01FA-4538-B64B-A6543B4BE73D}", + "details": { + "name": "const Vector3&" + } + } + ], + "results": [ + { + "typeid": "{15A4332F-7C3F-4A58-AC35-50E1CE53FB9C}", + "details": { + "name": "Matrix3x3" + } + } + ] + }, + { + "base": "GetColumns", + "context": "MathMatrix3x3_VM", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke GetColumns" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after GetColumns is invoked" + }, + "details": { + "name": "MathMatrix3x3_VM::GetColumns", + "category": "Other" + }, + "params": [ + { + "typeid": "{15A4332F-7C3F-4A58-AC35-50E1CE53FB9C}", + "details": { + "name": "const Matrix3x3&" + } + } + ], + "results": [ + { + "typeid": "{93942742-473F-5EE3-8420-D8F22C612221}", + "details": { + "name": "tuple" + } + } + ] + }, + { + "base": "FromTransform", + "context": "MathMatrix3x3_VM", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke FromTransform" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after FromTransform is invoked" + }, + "details": { + "name": "MathMatrix3x3_VM::FromTransform", + "category": "Other" + }, + "params": [ + { + "typeid": "{5D9958E9-9F1E-4985-B532-FFFDE75FEDFD}", + "details": { + "name": "const Transform&" + } + } + ], + "results": [ + { + "typeid": "{15A4332F-7C3F-4A58-AC35-50E1CE53FB9C}", + "details": { + "name": "Matrix3x3" + } + } + ] + }, + { + "base": "FromScale", + "context": "MathMatrix3x3_VM", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke FromScale" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after FromScale is invoked" + }, + "details": { + "name": "MathMatrix3x3_VM::FromScale", + "category": "Other" + }, + "params": [ + { + "typeid": "{8379EB7D-01FA-4538-B64B-A6543B4BE73D}", + "details": { + "name": "const Vector3&" + } + } + ], + "results": [ + { + "typeid": "{15A4332F-7C3F-4A58-AC35-50E1CE53FB9C}", + "details": { + "name": "Matrix3x3" + } + } + ] + }, + { + "base": "ToScale", + "context": "MathMatrix3x3_VM", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke ToScale" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after ToScale is invoked" + }, + "details": { + "name": "MathMatrix3x3_VM::ToScale", + "category": "Other" + }, + "params": [ + { + "typeid": "{15A4332F-7C3F-4A58-AC35-50E1CE53FB9C}", + "details": { + "name": "const Matrix3x3&" + } + } + ], + "results": [ + { + "typeid": "{8379EB7D-01FA-4538-B64B-A6543B4BE73D}", + "details": { + "name": "Vector3" + } + } + ] + }, + { + "base": "FromQuaternion", + "context": "MathMatrix3x3_VM", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke FromQuaternion" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after FromQuaternion is invoked" + }, + "details": { + "name": "MathMatrix3x3_VM::FromQuaternion", + "category": "Other" + }, + "params": [ + { + "typeid": "{73103120-3DD3-4873-BAB3-9713FA2804FB}", + "details": { + "name": "const Quaternion&" + } + } + ], + "results": [ + { + "typeid": "{15A4332F-7C3F-4A58-AC35-50E1CE53FB9C}", + "details": { + "name": "Matrix3x3" + } + } + ] + }, + { + "base": "MultiplyByNumber", + "context": "MathMatrix3x3_VM", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke MultiplyByNumber" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after MultiplyByNumber is invoked" + }, + "details": { + "name": "MathMatrix3x3_VM::MultiplyByNumber", + "category": "Other" + }, + "params": [ + { + "typeid": "{15A4332F-7C3F-4A58-AC35-50E1CE53FB9C}", + "details": { + "name": "const Matrix3x3&" + } + }, + { + "typeid": "{110C4B14-11A8-4E9D-8638-5051013A56AC}", + "details": { + "name": "double" + } + } + ], + "results": [ + { + "typeid": "{15A4332F-7C3F-4A58-AC35-50E1CE53FB9C}", + "details": { + "name": "Matrix3x3" + } + } + ] + }, + { + "base": "GetRow", + "context": "MathMatrix3x3_VM", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke GetRow" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after GetRow is invoked" + }, + "details": { + "name": "MathMatrix3x3_VM::GetRow", + "category": "Other" + }, + "params": [ + { + "typeid": "{15A4332F-7C3F-4A58-AC35-50E1CE53FB9C}", + "details": { + "name": "const Matrix3x3&" + } + }, + { + "typeid": "{110C4B14-11A8-4E9D-8638-5051013A56AC}", + "details": { + "name": "double" + } + } + ], + "results": [ + { + "typeid": "{8379EB7D-01FA-4538-B64B-A6543B4BE73D}", + "details": { + "name": "Vector3" + } + } + ] + }, + { + "base": "FromRotationYDegrees", + "context": "MathMatrix3x3_VM", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke FromRotationYDegrees" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after FromRotationYDegrees is invoked" + }, + "details": { + "name": "MathMatrix3x3_VM::FromRotationYDegrees", + "category": "Other" + }, + "params": [ + { + "typeid": "{110C4B14-11A8-4E9D-8638-5051013A56AC}", + "details": { + "name": "double" + } + } + ], + "results": [ + { + "typeid": "{15A4332F-7C3F-4A58-AC35-50E1CE53FB9C}", + "details": { + "name": "Matrix3x3" + } + } + ] + }, + { + "base": "FromRows", + "context": "MathMatrix3x3_VM", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke FromRows" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after FromRows is invoked" + }, + "details": { + "name": "MathMatrix3x3_VM::FromRows", + "category": "Other" + }, + "params": [ + { + "typeid": "{8379EB7D-01FA-4538-B64B-A6543B4BE73D}", + "details": { + "name": "const Vector3&" + } + }, + { + "typeid": "{8379EB7D-01FA-4538-B64B-A6543B4BE73D}", + "details": { + "name": "const Vector3&" + } + }, + { + "typeid": "{8379EB7D-01FA-4538-B64B-A6543B4BE73D}", + "details": { + "name": "const Vector3&" + } + } + ], + "results": [ + { + "typeid": "{15A4332F-7C3F-4A58-AC35-50E1CE53FB9C}", + "details": { + "name": "Matrix3x3" + } + } + ] + }, + { + "base": "FromDiagonal", + "context": "MathMatrix3x3_VM", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke FromDiagonal" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after FromDiagonal is invoked" + }, + "details": { + "name": "MathMatrix3x3_VM::FromDiagonal", + "category": "Other" + }, + "params": [ + { + "typeid": "{8379EB7D-01FA-4538-B64B-A6543B4BE73D}", + "details": { + "name": "const Vector3&" + } + } + ], + "results": [ + { + "typeid": "{15A4332F-7C3F-4A58-AC35-50E1CE53FB9C}", + "details": { + "name": "Matrix3x3" + } + } + ] + }, + { + "base": "FromRotationZDegrees", + "context": "MathMatrix3x3_VM", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke FromRotationZDegrees" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after FromRotationZDegrees is invoked" + }, + "details": { + "name": "MathMatrix3x3_VM::FromRotationZDegrees", + "category": "Other" + }, + "params": [ + { + "typeid": "{110C4B14-11A8-4E9D-8638-5051013A56AC}", + "details": { + "name": "double" + } + } + ], + "results": [ + { + "typeid": "{15A4332F-7C3F-4A58-AC35-50E1CE53FB9C}", + "details": { + "name": "Matrix3x3" + } + } + ] + }, + { + "base": "FromMatrix4x4", + "context": "MathMatrix3x3_VM", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke FromMatrix4x4" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after FromMatrix4x4 is invoked" + }, + "details": { + "name": "MathMatrix3x3_VM::FromMatrix4x4", + "category": "Other" + }, + "params": [ + { + "typeid": "{157193C7-B673-4A2B-8B43-5681DCC3DEC3}", + "details": { + "name": "const Matrix4x4&" + } + } + ], + "results": [ + { + "typeid": "{15A4332F-7C3F-4A58-AC35-50E1CE53FB9C}", + "details": { + "name": "Matrix3x3" + } + } + ] + }, + { + "base": "FromColumns", + "context": "MathMatrix3x3_VM", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke FromColumns" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after FromColumns is invoked" + }, + "details": { + "name": "MathMatrix3x3_VM::FromColumns", + "category": "Other" + }, + "params": [ + { + "typeid": "{8379EB7D-01FA-4538-B64B-A6543B4BE73D}", + "details": { + "name": "const Vector3&" + } + }, + { + "typeid": "{8379EB7D-01FA-4538-B64B-A6543B4BE73D}", + "details": { + "name": "const Vector3&" + } + }, + { + "typeid": "{8379EB7D-01FA-4538-B64B-A6543B4BE73D}", + "details": { + "name": "const Vector3&" + } + } + ], + "results": [ + { + "typeid": "{15A4332F-7C3F-4A58-AC35-50E1CE53FB9C}", + "details": { + "name": "Matrix3x3" + } + } + ] + }, + { + "base": "FromRotationXDegrees", + "context": "MathMatrix3x3_VM", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke FromRotationXDegrees" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after FromRotationXDegrees is invoked" + }, + "details": { + "name": "MathMatrix3x3_VM::FromRotationXDegrees", + "category": "Other" + }, + "params": [ + { + "typeid": "{110C4B14-11A8-4E9D-8638-5051013A56AC}", + "details": { + "name": "double" + } + } + ], + "results": [ + { + "typeid": "{15A4332F-7C3F-4A58-AC35-50E1CE53FB9C}", + "details": { + "name": "Matrix3x3" + } + } + ] + }, + { + "base": "ToDeterminant", + "context": "MathMatrix3x3_VM", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke ToDeterminant" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after ToDeterminant is invoked" + }, + "details": { + "name": "MathMatrix3x3_VM::ToDeterminant", + "category": "Other" + }, + "params": [ + { + "typeid": "{15A4332F-7C3F-4A58-AC35-50E1CE53FB9C}", + "details": { + "name": "const Matrix3x3&" + } + } + ], + "results": [ + { + "typeid": "{110C4B14-11A8-4E9D-8638-5051013A56AC}", + "details": { + "name": "double" + } + } + ] + } + ] + } + ] +} \ No newline at end of file diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Classes/MathMatrix4x4_VM.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Classes/MathMatrix4x4_VM.names new file mode 100644 index 0000000000..7df54c7060 --- /dev/null +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Classes/MathMatrix4x4_VM.names @@ -0,0 +1,960 @@ +{ + "entries": [ + { + "base": "MathMatrix4x4_VM", + "context": "BehaviorClass", + "variant": "", + "details": { + "name": "MathMatrix4x4_VM" + }, + "methods": [ + { + "base": "GetRow", + "context": "MathMatrix4x4_VM", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke GetRow" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after GetRow is invoked" + }, + "details": { + "name": "MathMatrix4x4_VM::GetRow", + "category": "Other" + }, + "params": [ + { + "typeid": "{157193C7-B673-4A2B-8B43-5681DCC3DEC3}", + "details": { + "name": "const Matrix4x4&" + } + }, + { + "typeid": "{110C4B14-11A8-4E9D-8638-5051013A56AC}", + "details": { + "name": "double" + } + } + ], + "results": [ + { + "typeid": "{0CE9FA36-1E3A-4C06-9254-B7C73A732053}", + "details": { + "name": "Vector4" + } + } + ] + }, + { + "base": "FromRotationXDegrees", + "context": "MathMatrix4x4_VM", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke FromRotationXDegrees" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after FromRotationXDegrees is invoked" + }, + "details": { + "name": "MathMatrix4x4_VM::FromRotationXDegrees", + "category": "Other" + }, + "params": [ + { + "typeid": "{110C4B14-11A8-4E9D-8638-5051013A56AC}", + "details": { + "name": "double" + } + } + ], + "results": [ + { + "typeid": "{157193C7-B673-4A2B-8B43-5681DCC3DEC3}", + "details": { + "name": "Matrix4x4" + } + } + ] + }, + { + "base": "FromRotationZDegrees", + "context": "MathMatrix4x4_VM", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke FromRotationZDegrees" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after FromRotationZDegrees is invoked" + }, + "details": { + "name": "MathMatrix4x4_VM::FromRotationZDegrees", + "category": "Other" + }, + "params": [ + { + "typeid": "{110C4B14-11A8-4E9D-8638-5051013A56AC}", + "details": { + "name": "double" + } + } + ], + "results": [ + { + "typeid": "{157193C7-B673-4A2B-8B43-5681DCC3DEC3}", + "details": { + "name": "Matrix4x4" + } + } + ] + }, + { + "base": "FromRows", + "context": "MathMatrix4x4_VM", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke FromRows" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after FromRows is invoked" + }, + "details": { + "name": "MathMatrix4x4_VM::FromRows", + "category": "Other" + }, + "params": [ + { + "typeid": "{0CE9FA36-1E3A-4C06-9254-B7C73A732053}", + "details": { + "name": "const Vector4&" + } + }, + { + "typeid": "{0CE9FA36-1E3A-4C06-9254-B7C73A732053}", + "details": { + "name": "const Vector4&" + } + }, + { + "typeid": "{0CE9FA36-1E3A-4C06-9254-B7C73A732053}", + "details": { + "name": "const Vector4&" + } + }, + { + "typeid": "{0CE9FA36-1E3A-4C06-9254-B7C73A732053}", + "details": { + "name": "const Vector4&" + } + } + ], + "results": [ + { + "typeid": "{157193C7-B673-4A2B-8B43-5681DCC3DEC3}", + "details": { + "name": "Matrix4x4" + } + } + ] + }, + { + "base": "ToScale", + "context": "MathMatrix4x4_VM", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke ToScale" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after ToScale is invoked" + }, + "details": { + "name": "MathMatrix4x4_VM::ToScale", + "category": "Other" + }, + "params": [ + { + "typeid": "{157193C7-B673-4A2B-8B43-5681DCC3DEC3}", + "details": { + "name": "const Matrix4x4&" + } + } + ], + "results": [ + { + "typeid": "{8379EB7D-01FA-4538-B64B-A6543B4BE73D}", + "details": { + "name": "Vector3" + } + } + ] + }, + { + "base": "FromQuaternion", + "context": "MathMatrix4x4_VM", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke FromQuaternion" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after FromQuaternion is invoked" + }, + "details": { + "name": "MathMatrix4x4_VM::FromQuaternion", + "category": "Other" + }, + "params": [ + { + "typeid": "{73103120-3DD3-4873-BAB3-9713FA2804FB}", + "details": { + "name": "const Quaternion&" + } + } + ], + "results": [ + { + "typeid": "{157193C7-B673-4A2B-8B43-5681DCC3DEC3}", + "details": { + "name": "Matrix4x4" + } + } + ] + }, + { + "base": "FromScale", + "context": "MathMatrix4x4_VM", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke FromScale" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after FromScale is invoked" + }, + "details": { + "name": "MathMatrix4x4_VM::FromScale", + "category": "Other" + }, + "params": [ + { + "typeid": "{8379EB7D-01FA-4538-B64B-A6543B4BE73D}", + "details": { + "name": "const Vector3&" + } + } + ], + "results": [ + { + "typeid": "{157193C7-B673-4A2B-8B43-5681DCC3DEC3}", + "details": { + "name": "Matrix4x4" + } + } + ] + }, + { + "base": "FromTransform", + "context": "MathMatrix4x4_VM", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke FromTransform" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after FromTransform is invoked" + }, + "details": { + "name": "MathMatrix4x4_VM::FromTransform", + "category": "Other" + }, + "params": [ + { + "typeid": "{5D9958E9-9F1E-4985-B532-FFFDE75FEDFD}", + "details": { + "name": "const Transform&" + } + } + ], + "results": [ + { + "typeid": "{157193C7-B673-4A2B-8B43-5681DCC3DEC3}", + "details": { + "name": "Matrix4x4" + } + } + ] + }, + { + "base": "GetTranslation", + "context": "MathMatrix4x4_VM", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke GetTranslation" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after GetTranslation is invoked" + }, + "details": { + "name": "MathMatrix4x4_VM::GetTranslation", + "category": "Other" + }, + "params": [ + { + "typeid": "{157193C7-B673-4A2B-8B43-5681DCC3DEC3}", + "details": { + "name": "const Matrix4x4&" + } + } + ], + "results": [ + { + "typeid": "{8379EB7D-01FA-4538-B64B-A6543B4BE73D}", + "details": { + "name": "Vector3" + } + } + ] + }, + { + "base": "FromQuaternionAndTranslation", + "context": "MathMatrix4x4_VM", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke FromQuaternionAndTranslation" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after FromQuaternionAndTranslation is invoked" + }, + "details": { + "name": "MathMatrix4x4_VM::FromQuaternionAndTranslation", + "category": "Other" + }, + "params": [ + { + "typeid": "{73103120-3DD3-4873-BAB3-9713FA2804FB}", + "details": { + "name": "const Quaternion&" + } + }, + { + "typeid": "{8379EB7D-01FA-4538-B64B-A6543B4BE73D}", + "details": { + "name": "const Vector3&" + } + } + ], + "results": [ + { + "typeid": "{157193C7-B673-4A2B-8B43-5681DCC3DEC3}", + "details": { + "name": "Matrix4x4" + } + } + ] + }, + { + "base": "GetColumn", + "context": "MathMatrix4x4_VM", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke GetColumn" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after GetColumn is invoked" + }, + "details": { + "name": "MathMatrix4x4_VM::GetColumn", + "category": "Other" + }, + "params": [ + { + "typeid": "{157193C7-B673-4A2B-8B43-5681DCC3DEC3}", + "details": { + "name": "const Matrix4x4&" + } + }, + { + "typeid": "{110C4B14-11A8-4E9D-8638-5051013A56AC}", + "details": { + "name": "double" + } + } + ], + "results": [ + { + "typeid": "{0CE9FA36-1E3A-4C06-9254-B7C73A732053}", + "details": { + "name": "Vector4" + } + } + ] + }, + { + "base": "GetDiagonal", + "context": "MathMatrix4x4_VM", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke GetDiagonal" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after GetDiagonal is invoked" + }, + "details": { + "name": "MathMatrix4x4_VM::GetDiagonal", + "category": "Other" + }, + "params": [ + { + "typeid": "{157193C7-B673-4A2B-8B43-5681DCC3DEC3}", + "details": { + "name": "const Matrix4x4&" + } + } + ], + "results": [ + { + "typeid": "{0CE9FA36-1E3A-4C06-9254-B7C73A732053}", + "details": { + "name": "Vector4" + } + } + ] + }, + { + "base": "Invert", + "context": "MathMatrix4x4_VM", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Invert" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Invert is invoked" + }, + "details": { + "name": "MathMatrix4x4_VM::Invert", + "category": "Other" + }, + "params": [ + { + "typeid": "{157193C7-B673-4A2B-8B43-5681DCC3DEC3}", + "details": { + "name": "const Matrix4x4&" + } + } + ], + "results": [ + { + "typeid": "{157193C7-B673-4A2B-8B43-5681DCC3DEC3}", + "details": { + "name": "Matrix4x4" + } + } + ] + }, + { + "base": "IsClose", + "context": "MathMatrix4x4_VM", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke IsClose" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after IsClose is invoked" + }, + "details": { + "name": "MathMatrix4x4_VM::IsClose", + "category": "Other" + }, + "params": [ + { + "typeid": "{157193C7-B673-4A2B-8B43-5681DCC3DEC3}", + "details": { + "name": "const Matrix4x4&" + } + }, + { + "typeid": "{157193C7-B673-4A2B-8B43-5681DCC3DEC3}", + "details": { + "name": "const Matrix4x4&" + } + }, + { + "typeid": "{110C4B14-11A8-4E9D-8638-5051013A56AC}", + "details": { + "name": "double" + } + } + ], + "results": [ + { + "typeid": "{A0CA880C-AFE4-43CB-926C-59AC48496112}", + "details": { + "name": "bool" + } + } + ] + }, + { + "base": "FromMatrix3x3", + "context": "MathMatrix4x4_VM", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke FromMatrix3x3" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after FromMatrix3x3 is invoked" + }, + "details": { + "name": "MathMatrix4x4_VM::FromMatrix3x3", + "category": "Other" + }, + "params": [ + { + "typeid": "{15A4332F-7C3F-4A58-AC35-50E1CE53FB9C}", + "details": { + "name": "const Matrix3x3&" + } + } + ], + "results": [ + { + "typeid": "{157193C7-B673-4A2B-8B43-5681DCC3DEC3}", + "details": { + "name": "Matrix4x4" + } + } + ] + }, + { + "base": "GetColumns", + "context": "MathMatrix4x4_VM", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke GetColumns" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after GetColumns is invoked" + }, + "details": { + "name": "MathMatrix4x4_VM::GetColumns", + "category": "Other" + }, + "params": [ + { + "typeid": "{157193C7-B673-4A2B-8B43-5681DCC3DEC3}", + "details": { + "name": "const Matrix4x4&" + } + } + ], + "results": [ + { + "typeid": "{3750867E-BD2D-52A2-B93B-51032E86C4D4}", + "details": { + "name": "tuple" + } + } + ] + }, + { + "base": "GetRows", + "context": "MathMatrix4x4_VM", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke GetRows" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after GetRows is invoked" + }, + "details": { + "name": "MathMatrix4x4_VM::GetRows", + "category": "Other" + }, + "params": [ + { + "typeid": "{157193C7-B673-4A2B-8B43-5681DCC3DEC3}", + "details": { + "name": "const Matrix4x4&" + } + } + ], + "results": [ + { + "typeid": "{3750867E-BD2D-52A2-B93B-51032E86C4D4}", + "details": { + "name": "tuple" + } + } + ] + }, + { + "base": "MultiplyByMatrix", + "context": "MathMatrix4x4_VM", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke MultiplyByMatrix" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after MultiplyByMatrix is invoked" + }, + "details": { + "name": "MathMatrix4x4_VM::MultiplyByMatrix", + "category": "Other" + }, + "params": [ + { + "typeid": "{157193C7-B673-4A2B-8B43-5681DCC3DEC3}", + "details": { + "name": "const Matrix4x4&" + } + }, + { + "typeid": "{157193C7-B673-4A2B-8B43-5681DCC3DEC3}", + "details": { + "name": "const Matrix4x4&" + } + } + ], + "results": [ + { + "typeid": "{157193C7-B673-4A2B-8B43-5681DCC3DEC3}", + "details": { + "name": "Matrix4x4" + } + } + ] + }, + { + "base": "FromDiagonal", + "context": "MathMatrix4x4_VM", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke FromDiagonal" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after FromDiagonal is invoked" + }, + "details": { + "name": "MathMatrix4x4_VM::FromDiagonal", + "category": "Other" + }, + "params": [ + { + "typeid": "{0CE9FA36-1E3A-4C06-9254-B7C73A732053}", + "details": { + "name": "const Vector4&" + } + } + ], + "results": [ + { + "typeid": "{157193C7-B673-4A2B-8B43-5681DCC3DEC3}", + "details": { + "name": "Matrix4x4" + } + } + ] + }, + { + "base": "FromRotationYDegrees", + "context": "MathMatrix4x4_VM", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke FromRotationYDegrees" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after FromRotationYDegrees is invoked" + }, + "details": { + "name": "MathMatrix4x4_VM::FromRotationYDegrees", + "category": "Other" + }, + "params": [ + { + "typeid": "{110C4B14-11A8-4E9D-8638-5051013A56AC}", + "details": { + "name": "double" + } + } + ], + "results": [ + { + "typeid": "{157193C7-B673-4A2B-8B43-5681DCC3DEC3}", + "details": { + "name": "Matrix4x4" + } + } + ] + }, + { + "base": "GetElement", + "context": "MathMatrix4x4_VM", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke GetElement" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after GetElement is invoked" + }, + "details": { + "name": "MathMatrix4x4_VM::GetElement", + "category": "Other" + }, + "params": [ + { + "typeid": "{157193C7-B673-4A2B-8B43-5681DCC3DEC3}", + "details": { + "name": "const Matrix4x4&" + } + }, + { + "typeid": "{110C4B14-11A8-4E9D-8638-5051013A56AC}", + "details": { + "name": "double" + } + }, + { + "typeid": "{110C4B14-11A8-4E9D-8638-5051013A56AC}", + "details": { + "name": "double" + } + } + ], + "results": [ + { + "typeid": "{110C4B14-11A8-4E9D-8638-5051013A56AC}", + "details": { + "name": "double" + } + } + ] + }, + { + "base": "Transpose", + "context": "MathMatrix4x4_VM", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Transpose" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Transpose is invoked" + }, + "details": { + "name": "MathMatrix4x4_VM::Transpose", + "category": "Other" + }, + "params": [ + { + "typeid": "{157193C7-B673-4A2B-8B43-5681DCC3DEC3}", + "details": { + "name": "const Matrix4x4&" + } + } + ], + "results": [ + { + "typeid": "{157193C7-B673-4A2B-8B43-5681DCC3DEC3}", + "details": { + "name": "Matrix4x4" + } + } + ] + }, + { + "base": "FromColumns", + "context": "MathMatrix4x4_VM", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke FromColumns" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after FromColumns is invoked" + }, + "details": { + "name": "MathMatrix4x4_VM::FromColumns", + "category": "Other" + }, + "params": [ + { + "typeid": "{0CE9FA36-1E3A-4C06-9254-B7C73A732053}", + "details": { + "name": "const Vector4&" + } + }, + { + "typeid": "{0CE9FA36-1E3A-4C06-9254-B7C73A732053}", + "details": { + "name": "const Vector4&" + } + }, + { + "typeid": "{0CE9FA36-1E3A-4C06-9254-B7C73A732053}", + "details": { + "name": "const Vector4&" + } + }, + { + "typeid": "{0CE9FA36-1E3A-4C06-9254-B7C73A732053}", + "details": { + "name": "const Vector4&" + } + } + ], + "results": [ + { + "typeid": "{157193C7-B673-4A2B-8B43-5681DCC3DEC3}", + "details": { + "name": "Matrix4x4" + } + } + ] + }, + { + "base": "FromTranslation", + "context": "MathMatrix4x4_VM", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke FromTranslation" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after FromTranslation is invoked" + }, + "details": { + "name": "MathMatrix4x4_VM::FromTranslation", + "category": "Other" + }, + "params": [ + { + "typeid": "{8379EB7D-01FA-4538-B64B-A6543B4BE73D}", + "details": { + "name": "const Vector3&" + } + } + ], + "results": [ + { + "typeid": "{157193C7-B673-4A2B-8B43-5681DCC3DEC3}", + "details": { + "name": "Matrix4x4" + } + } + ] + }, + { + "base": "IsFinite", + "context": "MathMatrix4x4_VM", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke IsFinite" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after IsFinite is invoked" + }, + "details": { + "name": "MathMatrix4x4_VM::IsFinite", + "category": "Other" + }, + "params": [ + { + "typeid": "{157193C7-B673-4A2B-8B43-5681DCC3DEC3}", + "details": { + "name": "const Matrix4x4&" + } + } + ], + "results": [ + { + "typeid": "{A0CA880C-AFE4-43CB-926C-59AC48496112}", + "details": { + "name": "bool" + } + } + ] + }, + { + "base": "MultiplyByVector", + "context": "MathMatrix4x4_VM", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke MultiplyByVector" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after MultiplyByVector is invoked" + }, + "details": { + "name": "MathMatrix4x4_VM::MultiplyByVector", + "category": "Other" + }, + "params": [ + { + "typeid": "{157193C7-B673-4A2B-8B43-5681DCC3DEC3}", + "details": { + "name": "const Matrix4x4&" + } + }, + { + "typeid": "{0CE9FA36-1E3A-4C06-9254-B7C73A732053}", + "details": { + "name": "const Vector4&" + } + } + ], + "results": [ + { + "typeid": "{0CE9FA36-1E3A-4C06-9254-B7C73A732053}", + "details": { + "name": "Vector4" + } + } + ] + }, + { + "base": "Zero", + "context": "MathMatrix4x4_VM", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Zero" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Zero is invoked" + }, + "details": { + "name": "MathMatrix4x4_VM::Zero", + "category": "Other" + }, + "results": [ + { + "typeid": "{157193C7-B673-4A2B-8B43-5681DCC3DEC3}", + "details": { + "name": "Matrix4x4" + } + } + ] + } + ] + } + ] +} \ No newline at end of file diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Classes/MathOBB_VM.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Classes/MathOBB_VM.names new file mode 100644 index 0000000000..4932723ee9 --- /dev/null +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Classes/MathOBB_VM.names @@ -0,0 +1,250 @@ +{ + "entries": [ + { + "base": "MathOBB_VM", + "context": "BehaviorClass", + "variant": "", + "details": { + "name": "MathOBB_VM" + }, + "methods": [ + { + "base": "GetPosition", + "context": "MathOBB_VM", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke GetPosition" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after GetPosition is invoked" + }, + "details": { + "name": "MathOBB_VM::GetPosition", + "category": "Other" + }, + "params": [ + { + "typeid": "{004ABD25-CF14-4EB3-BD41-022C247C07FA}", + "details": { + "name": "const Obb&" + } + } + ], + "results": [ + { + "typeid": "{8379EB7D-01FA-4538-B64B-A6543B4BE73D}", + "details": { + "name": "Vector3" + } + } + ] + }, + { + "base": "GetAxisY", + "context": "MathOBB_VM", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke GetAxisY" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after GetAxisY is invoked" + }, + "details": { + "name": "MathOBB_VM::GetAxisY", + "category": "Other" + }, + "params": [ + { + "typeid": "{004ABD25-CF14-4EB3-BD41-022C247C07FA}", + "details": { + "name": "const Obb&" + } + } + ], + "results": [ + { + "typeid": "{8379EB7D-01FA-4538-B64B-A6543B4BE73D}", + "details": { + "name": "Vector3" + } + } + ] + }, + { + "base": "GetAxisX", + "context": "MathOBB_VM", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke GetAxisX" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after GetAxisX is invoked" + }, + "details": { + "name": "MathOBB_VM::GetAxisX", + "category": "Other" + }, + "params": [ + { + "typeid": "{004ABD25-CF14-4EB3-BD41-022C247C07FA}", + "details": { + "name": "const Obb&" + } + } + ], + "results": [ + { + "typeid": "{8379EB7D-01FA-4538-B64B-A6543B4BE73D}", + "details": { + "name": "Vector3" + } + } + ] + }, + { + "base": "FromAabb", + "context": "MathOBB_VM", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke FromAabb" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after FromAabb is invoked" + }, + "details": { + "name": "MathOBB_VM::FromAabb", + "category": "Other" + }, + "params": [ + { + "typeid": "{A54C2B36-D5B8-46A1-A529-4EBDBD2450E7}", + "details": { + "name": "const Aabb&" + } + } + ], + "results": [ + { + "typeid": "{004ABD25-CF14-4EB3-BD41-022C247C07FA}", + "details": { + "name": "Obb" + } + } + ] + }, + { + "base": "FromPositionRotationAndHalfLengths", + "context": "MathOBB_VM", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke FromPositionRotationAndHalfLengths" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after FromPositionRotationAndHalfLengths is invoked" + }, + "details": { + "name": "MathOBB_VM::FromPositionRotationAndHalfLengths", + "category": "Other" + }, + "params": [ + { + "typeid": "{8379EB7D-01FA-4538-B64B-A6543B4BE73D}", + "details": { + "name": "Vector3" + } + }, + { + "typeid": "{73103120-3DD3-4873-BAB3-9713FA2804FB}", + "details": { + "name": "Quaternion" + } + }, + { + "typeid": "{8379EB7D-01FA-4538-B64B-A6543B4BE73D}", + "details": { + "name": "Vector3" + } + } + ], + "results": [ + { + "typeid": "{004ABD25-CF14-4EB3-BD41-022C247C07FA}", + "details": { + "name": "Obb" + } + } + ] + }, + { + "base": "GetAxisZ", + "context": "MathOBB_VM", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke GetAxisZ" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after GetAxisZ is invoked" + }, + "details": { + "name": "MathOBB_VM::GetAxisZ", + "category": "Other" + }, + "params": [ + { + "typeid": "{004ABD25-CF14-4EB3-BD41-022C247C07FA}", + "details": { + "name": "const Obb&" + } + } + ], + "results": [ + { + "typeid": "{8379EB7D-01FA-4538-B64B-A6543B4BE73D}", + "details": { + "name": "Vector3" + } + } + ] + }, + { + "base": "IsFinite", + "context": "MathOBB_VM", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke IsFinite" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after IsFinite is invoked" + }, + "details": { + "name": "MathOBB_VM::IsFinite", + "category": "Other" + }, + "params": [ + { + "typeid": "{004ABD25-CF14-4EB3-BD41-022C247C07FA}", + "details": { + "name": "const Obb&" + } + } + ], + "results": [ + { + "typeid": "{A0CA880C-AFE4-43CB-926C-59AC48496112}", + "details": { + "name": "bool" + } + } + ] + } + ] + } + ] +} \ No newline at end of file diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Classes/MathPlane_VM.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Classes/MathPlane_VM.names new file mode 100644 index 0000000000..36d88d5fe9 --- /dev/null +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Classes/MathPlane_VM.names @@ -0,0 +1,382 @@ +{ + "entries": [ + { + "base": "MathPlane_VM", + "context": "BehaviorClass", + "variant": "", + "details": { + "name": "MathPlane_VM" + }, + "methods": [ + { + "base": "GetPlaneEquationCoefficients", + "context": "MathPlane_VM", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke GetPlaneEquationCoefficients" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after GetPlaneEquationCoefficients is invoked" + }, + "details": { + "name": "MathPlane_VM::GetPlaneEquationCoefficients", + "category": "Other" + }, + "params": [ + { + "typeid": "{847DD984-9DBF-4789-8E25-E0334402E8AD}", + "details": { + "name": "Plane" + } + } + ], + "results": [ + { + "typeid": "{7352CD6D-91DA-536F-BFCC-BC513FB48B2D}", + "details": { + "name": "tuple" + } + } + ] + }, + { + "base": "GetDistance", + "context": "MathPlane_VM", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke GetDistance" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after GetDistance is invoked" + }, + "details": { + "name": "MathPlane_VM::GetDistance", + "category": "Other" + }, + "params": [ + { + "typeid": "{847DD984-9DBF-4789-8E25-E0334402E8AD}", + "details": { + "name": "Plane" + } + } + ], + "results": [ + { + "typeid": "{110C4B14-11A8-4E9D-8638-5051013A56AC}", + "details": { + "name": "double" + } + } + ] + }, + { + "base": "Project", + "context": "MathPlane_VM", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Project" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Project is invoked" + }, + "details": { + "name": "MathPlane_VM::Project", + "category": "Other" + }, + "params": [ + { + "typeid": "{847DD984-9DBF-4789-8E25-E0334402E8AD}", + "details": { + "name": "Plane" + } + }, + { + "typeid": "{8379EB7D-01FA-4538-B64B-A6543B4BE73D}", + "details": { + "name": "Vector3" + } + } + ], + "results": [ + { + "typeid": "{8379EB7D-01FA-4538-B64B-A6543B4BE73D}", + "details": { + "name": "Vector3" + } + } + ] + }, + { + "base": "FromNormalAndPoint", + "context": "MathPlane_VM", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke FromNormalAndPoint" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after FromNormalAndPoint is invoked" + }, + "details": { + "name": "MathPlane_VM::FromNormalAndPoint", + "category": "Other" + }, + "params": [ + { + "typeid": "{8379EB7D-01FA-4538-B64B-A6543B4BE73D}", + "details": { + "name": "Vector3" + } + }, + { + "typeid": "{8379EB7D-01FA-4538-B64B-A6543B4BE73D}", + "details": { + "name": "Vector3" + } + } + ], + "results": [ + { + "typeid": "{847DD984-9DBF-4789-8E25-E0334402E8AD}", + "details": { + "name": "Plane" + } + } + ] + }, + { + "base": "IsFinite", + "context": "MathPlane_VM", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke IsFinite" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after IsFinite is invoked" + }, + "details": { + "name": "MathPlane_VM::IsFinite", + "category": "Other" + }, + "params": [ + { + "typeid": "{847DD984-9DBF-4789-8E25-E0334402E8AD}", + "details": { + "name": "Plane" + } + } + ], + "results": [ + { + "typeid": "{A0CA880C-AFE4-43CB-926C-59AC48496112}", + "details": { + "name": "bool" + } + } + ] + }, + { + "base": "Transform", + "context": "MathPlane_VM", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Transform" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Transform is invoked" + }, + "details": { + "name": "MathPlane_VM::Transform", + "category": "Other" + }, + "params": [ + { + "typeid": "{847DD984-9DBF-4789-8E25-E0334402E8AD}", + "details": { + "name": "Plane" + } + }, + { + "typeid": "{5D9958E9-9F1E-4985-B532-FFFDE75FEDFD}", + "details": { + "name": "const Transform&" + } + } + ], + "results": [ + { + "typeid": "{847DD984-9DBF-4789-8E25-E0334402E8AD}", + "details": { + "name": "Plane" + } + } + ] + }, + { + "base": "DistanceToPoint", + "context": "MathPlane_VM", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke DistanceToPoint" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after DistanceToPoint is invoked" + }, + "details": { + "name": "MathPlane_VM::DistanceToPoint", + "category": "Other" + }, + "params": [ + { + "typeid": "{847DD984-9DBF-4789-8E25-E0334402E8AD}", + "details": { + "name": "Plane" + } + }, + { + "typeid": "{8379EB7D-01FA-4538-B64B-A6543B4BE73D}", + "details": { + "name": "Vector3" + } + } + ], + "results": [ + { + "typeid": "{110C4B14-11A8-4E9D-8638-5051013A56AC}", + "details": { + "name": "double" + } + } + ] + }, + { + "base": "FromCoefficients", + "context": "MathPlane_VM", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke FromCoefficients" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after FromCoefficients is invoked" + }, + "details": { + "name": "MathPlane_VM::FromCoefficients", + "category": "Other" + }, + "params": [ + { + "typeid": "{110C4B14-11A8-4E9D-8638-5051013A56AC}", + "details": { + "name": "double" + } + }, + { + "typeid": "{110C4B14-11A8-4E9D-8638-5051013A56AC}", + "details": { + "name": "double" + } + }, + { + "typeid": "{110C4B14-11A8-4E9D-8638-5051013A56AC}", + "details": { + "name": "double" + } + }, + { + "typeid": "{110C4B14-11A8-4E9D-8638-5051013A56AC}", + "details": { + "name": "double" + } + } + ], + "results": [ + { + "typeid": "{847DD984-9DBF-4789-8E25-E0334402E8AD}", + "details": { + "name": "Plane" + } + } + ] + }, + { + "base": "FromNormalAndDistance", + "context": "MathPlane_VM", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke FromNormalAndDistance" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after FromNormalAndDistance is invoked" + }, + "details": { + "name": "MathPlane_VM::FromNormalAndDistance", + "category": "Other" + }, + "params": [ + { + "typeid": "{8379EB7D-01FA-4538-B64B-A6543B4BE73D}", + "details": { + "name": "Vector3" + } + }, + { + "typeid": "{110C4B14-11A8-4E9D-8638-5051013A56AC}", + "details": { + "name": "double" + } + } + ], + "results": [ + { + "typeid": "{847DD984-9DBF-4789-8E25-E0334402E8AD}", + "details": { + "name": "Plane" + } + } + ] + }, + { + "base": "GetNormal", + "context": "MathPlane_VM", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke GetNormal" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after GetNormal is invoked" + }, + "details": { + "name": "MathPlane_VM::GetNormal", + "category": "Other" + }, + "params": [ + { + "typeid": "{847DD984-9DBF-4789-8E25-E0334402E8AD}", + "details": { + "name": "Plane" + } + } + ], + "results": [ + { + "typeid": "{8379EB7D-01FA-4538-B64B-A6543B4BE73D}", + "details": { + "name": "Vector3" + } + } + ] + } + ] + } + ] +} \ No newline at end of file diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Classes/MathQuaternion_VM.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Classes/MathQuaternion_VM.names new file mode 100644 index 0000000000..cc9f2ba875 --- /dev/null +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Classes/MathQuaternion_VM.names @@ -0,0 +1,1176 @@ +{ + "entries": [ + { + "base": "MathQuaternion_VM", + "context": "BehaviorClass", + "variant": "", + "details": { + "name": "MathQuaternion_VM" + }, + "methods": [ + { + "base": "Subtract", + "context": "MathQuaternion_VM", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Subtract" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Subtract is invoked" + }, + "details": { + "name": "MathQuaternion_VM::Subtract", + "category": "Other" + }, + "params": [ + { + "typeid": "{73103120-3DD3-4873-BAB3-9713FA2804FB}", + "details": { + "name": "Quaternion" + } + }, + { + "typeid": "{73103120-3DD3-4873-BAB3-9713FA2804FB}", + "details": { + "name": "Quaternion" + } + } + ], + "results": [ + { + "typeid": "{73103120-3DD3-4873-BAB3-9713FA2804FB}", + "details": { + "name": "Quaternion" + } + } + ] + }, + { + "base": "RotationYDegrees", + "context": "MathQuaternion_VM", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke RotationYDegrees" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after RotationYDegrees is invoked" + }, + "details": { + "name": "MathQuaternion_VM::RotationYDegrees", + "category": "Other" + }, + "params": [ + { + "typeid": "{110C4B14-11A8-4E9D-8638-5051013A56AC}", + "details": { + "name": "double" + } + } + ], + "results": [ + { + "typeid": "{73103120-3DD3-4873-BAB3-9713FA2804FB}", + "details": { + "name": "Quaternion" + } + } + ] + }, + { + "base": "Normalize", + "context": "MathQuaternion_VM", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Normalize" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Normalize is invoked" + }, + "details": { + "name": "MathQuaternion_VM::Normalize", + "category": "Other" + }, + "params": [ + { + "typeid": "{73103120-3DD3-4873-BAB3-9713FA2804FB}", + "details": { + "name": "Quaternion" + } + } + ], + "results": [ + { + "typeid": "{73103120-3DD3-4873-BAB3-9713FA2804FB}", + "details": { + "name": "Quaternion" + } + } + ] + }, + { + "base": "LengthReciprocal", + "context": "MathQuaternion_VM", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke LengthReciprocal" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after LengthReciprocal is invoked" + }, + "details": { + "name": "MathQuaternion_VM::LengthReciprocal", + "category": "Other" + }, + "params": [ + { + "typeid": "{73103120-3DD3-4873-BAB3-9713FA2804FB}", + "details": { + "name": "Quaternion" + } + } + ], + "results": [ + { + "typeid": "{110C4B14-11A8-4E9D-8638-5051013A56AC}", + "details": { + "name": "double" + } + } + ] + }, + { + "base": "CreateFromEulerAngles", + "context": "MathQuaternion_VM", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke CreateFromEulerAngles" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after CreateFromEulerAngles is invoked" + }, + "details": { + "name": "MathQuaternion_VM::CreateFromEulerAngles", + "category": "Other" + }, + "params": [ + { + "typeid": "{110C4B14-11A8-4E9D-8638-5051013A56AC}", + "details": { + "name": "double" + } + }, + { + "typeid": "{110C4B14-11A8-4E9D-8638-5051013A56AC}", + "details": { + "name": "double" + } + }, + { + "typeid": "{110C4B14-11A8-4E9D-8638-5051013A56AC}", + "details": { + "name": "double" + } + } + ], + "results": [ + { + "typeid": "{73103120-3DD3-4873-BAB3-9713FA2804FB}", + "details": { + "name": "Quaternion" + } + } + ] + }, + { + "base": "IsIdentity", + "context": "MathQuaternion_VM", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke IsIdentity" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after IsIdentity is invoked" + }, + "details": { + "name": "MathQuaternion_VM::IsIdentity", + "category": "Other" + }, + "params": [ + { + "typeid": "{73103120-3DD3-4873-BAB3-9713FA2804FB}", + "details": { + "name": "Quaternion" + } + }, + { + "typeid": "{110C4B14-11A8-4E9D-8638-5051013A56AC}", + "details": { + "name": "double" + } + } + ], + "results": [ + { + "typeid": "{A0CA880C-AFE4-43CB-926C-59AC48496112}", + "details": { + "name": "bool" + } + } + ] + }, + { + "base": "FromTransform", + "context": "MathQuaternion_VM", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke FromTransform" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after FromTransform is invoked" + }, + "details": { + "name": "MathQuaternion_VM::FromTransform", + "category": "Other" + }, + "params": [ + { + "typeid": "{5D9958E9-9F1E-4985-B532-FFFDE75FEDFD}", + "details": { + "name": "const Transform&" + } + } + ], + "results": [ + { + "typeid": "{73103120-3DD3-4873-BAB3-9713FA2804FB}", + "details": { + "name": "Quaternion" + } + } + ] + }, + { + "base": "Lerp", + "context": "MathQuaternion_VM", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Lerp" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Lerp is invoked" + }, + "details": { + "name": "MathQuaternion_VM::Lerp", + "category": "Other" + }, + "params": [ + { + "typeid": "{73103120-3DD3-4873-BAB3-9713FA2804FB}", + "details": { + "name": "Quaternion" + } + }, + { + "typeid": "{73103120-3DD3-4873-BAB3-9713FA2804FB}", + "details": { + "name": "Quaternion" + } + }, + { + "typeid": "{110C4B14-11A8-4E9D-8638-5051013A56AC}", + "details": { + "name": "double" + } + } + ], + "results": [ + { + "typeid": "{73103120-3DD3-4873-BAB3-9713FA2804FB}", + "details": { + "name": "Quaternion" + } + } + ] + }, + { + "base": "RotationZDegrees", + "context": "MathQuaternion_VM", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke RotationZDegrees" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after RotationZDegrees is invoked" + }, + "details": { + "name": "MathQuaternion_VM::RotationZDegrees", + "category": "Other" + }, + "params": [ + { + "typeid": "{110C4B14-11A8-4E9D-8638-5051013A56AC}", + "details": { + "name": "double" + } + } + ], + "results": [ + { + "typeid": "{73103120-3DD3-4873-BAB3-9713FA2804FB}", + "details": { + "name": "Quaternion" + } + } + ] + }, + { + "base": "ConvertTransformToRotation", + "context": "MathQuaternion_VM", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke ConvertTransformToRotation" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after ConvertTransformToRotation is invoked" + }, + "details": { + "name": "MathQuaternion_VM::ConvertTransformToRotation", + "category": "Other" + }, + "params": [ + { + "typeid": "{5D9958E9-9F1E-4985-B532-FFFDE75FEDFD}", + "details": { + "name": "const Transform&" + } + } + ], + "results": [ + { + "typeid": "{73103120-3DD3-4873-BAB3-9713FA2804FB}", + "details": { + "name": "Quaternion" + } + } + ] + }, + { + "base": "ShortestArc", + "context": "MathQuaternion_VM", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke ShortestArc" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after ShortestArc is invoked" + }, + "details": { + "name": "MathQuaternion_VM::ShortestArc", + "category": "Other" + }, + "params": [ + { + "typeid": "{8379EB7D-01FA-4538-B64B-A6543B4BE73D}", + "details": { + "name": "Vector3" + } + }, + { + "typeid": "{8379EB7D-01FA-4538-B64B-A6543B4BE73D}", + "details": { + "name": "Vector3" + } + } + ], + "results": [ + { + "typeid": "{73103120-3DD3-4873-BAB3-9713FA2804FB}", + "details": { + "name": "Quaternion" + } + } + ] + }, + { + "base": "RotationXDegrees", + "context": "MathQuaternion_VM", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke RotationXDegrees" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after RotationXDegrees is invoked" + }, + "details": { + "name": "MathQuaternion_VM::RotationXDegrees", + "category": "Other" + }, + "params": [ + { + "typeid": "{110C4B14-11A8-4E9D-8638-5051013A56AC}", + "details": { + "name": "double" + } + } + ], + "results": [ + { + "typeid": "{73103120-3DD3-4873-BAB3-9713FA2804FB}", + "details": { + "name": "Quaternion" + } + } + ] + }, + { + "base": "IsZero", + "context": "MathQuaternion_VM", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke IsZero" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after IsZero is invoked" + }, + "details": { + "name": "MathQuaternion_VM::IsZero", + "category": "Other" + }, + "params": [ + { + "typeid": "{73103120-3DD3-4873-BAB3-9713FA2804FB}", + "details": { + "name": "Quaternion" + } + }, + { + "typeid": "{110C4B14-11A8-4E9D-8638-5051013A56AC}", + "details": { + "name": "double" + } + } + ], + "results": [ + { + "typeid": "{A0CA880C-AFE4-43CB-926C-59AC48496112}", + "details": { + "name": "bool" + } + } + ] + }, + { + "base": "IsClose", + "context": "MathQuaternion_VM", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke IsClose" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after IsClose is invoked" + }, + "details": { + "name": "MathQuaternion_VM::IsClose", + "category": "Other" + }, + "params": [ + { + "typeid": "{73103120-3DD3-4873-BAB3-9713FA2804FB}", + "details": { + "name": "Quaternion" + } + }, + { + "typeid": "{73103120-3DD3-4873-BAB3-9713FA2804FB}", + "details": { + "name": "Quaternion" + } + }, + { + "typeid": "{110C4B14-11A8-4E9D-8638-5051013A56AC}", + "details": { + "name": "double" + } + } + ], + "results": [ + { + "typeid": "{A0CA880C-AFE4-43CB-926C-59AC48496112}", + "details": { + "name": "bool" + } + } + ] + }, + { + "base": "Length", + "context": "MathQuaternion_VM", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Length" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Length is invoked" + }, + "details": { + "name": "MathQuaternion_VM::Length", + "category": "Other" + }, + "params": [ + { + "typeid": "{73103120-3DD3-4873-BAB3-9713FA2804FB}", + "details": { + "name": "Quaternion" + } + } + ], + "results": [ + { + "typeid": "{110C4B14-11A8-4E9D-8638-5051013A56AC}", + "details": { + "name": "double" + } + } + ] + }, + { + "base": "Conjugate", + "context": "MathQuaternion_VM", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Conjugate" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Conjugate is invoked" + }, + "details": { + "name": "MathQuaternion_VM::Conjugate", + "category": "Other" + }, + "params": [ + { + "typeid": "{73103120-3DD3-4873-BAB3-9713FA2804FB}", + "details": { + "name": "Quaternion" + } + } + ], + "results": [ + { + "typeid": "{73103120-3DD3-4873-BAB3-9713FA2804FB}", + "details": { + "name": "Quaternion" + } + } + ] + }, + { + "base": "ToAngleDegrees", + "context": "MathQuaternion_VM", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke ToAngleDegrees" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after ToAngleDegrees is invoked" + }, + "details": { + "name": "MathQuaternion_VM::ToAngleDegrees", + "category": "Other" + }, + "params": [ + { + "typeid": "{73103120-3DD3-4873-BAB3-9713FA2804FB}", + "details": { + "name": "Quaternion" + } + } + ], + "results": [ + { + "typeid": "{110C4B14-11A8-4E9D-8638-5051013A56AC}", + "details": { + "name": "double" + } + } + ] + }, + { + "base": "Dot", + "context": "MathQuaternion_VM", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Dot" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Dot is invoked" + }, + "details": { + "name": "MathQuaternion_VM::Dot", + "category": "Other" + }, + "params": [ + { + "typeid": "{73103120-3DD3-4873-BAB3-9713FA2804FB}", + "details": { + "name": "Quaternion" + } + }, + { + "typeid": "{73103120-3DD3-4873-BAB3-9713FA2804FB}", + "details": { + "name": "Quaternion" + } + } + ], + "results": [ + { + "typeid": "{110C4B14-11A8-4E9D-8638-5051013A56AC}", + "details": { + "name": "double" + } + } + ] + }, + { + "base": "Negate", + "context": "MathQuaternion_VM", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Negate" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Negate is invoked" + }, + "details": { + "name": "MathQuaternion_VM::Negate", + "category": "Other" + }, + "params": [ + { + "typeid": "{73103120-3DD3-4873-BAB3-9713FA2804FB}", + "details": { + "name": "Quaternion" + } + } + ], + "results": [ + { + "typeid": "{73103120-3DD3-4873-BAB3-9713FA2804FB}", + "details": { + "name": "Quaternion" + } + } + ] + }, + { + "base": "Add", + "context": "MathQuaternion_VM", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Add" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Add is invoked" + }, + "details": { + "name": "MathQuaternion_VM::Add", + "category": "Other" + }, + "params": [ + { + "typeid": "{73103120-3DD3-4873-BAB3-9713FA2804FB}", + "details": { + "name": "Quaternion" + } + }, + { + "typeid": "{73103120-3DD3-4873-BAB3-9713FA2804FB}", + "details": { + "name": "Quaternion" + } + } + ], + "results": [ + { + "typeid": "{73103120-3DD3-4873-BAB3-9713FA2804FB}", + "details": { + "name": "Quaternion" + } + } + ] + }, + { + "base": "MultiplyByNumber", + "context": "MathQuaternion_VM", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke MultiplyByNumber" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after MultiplyByNumber is invoked" + }, + "details": { + "name": "MathQuaternion_VM::MultiplyByNumber", + "category": "Other" + }, + "params": [ + { + "typeid": "{73103120-3DD3-4873-BAB3-9713FA2804FB}", + "details": { + "name": "Quaternion" + } + }, + { + "typeid": "{110C4B14-11A8-4E9D-8638-5051013A56AC}", + "details": { + "name": "double" + } + } + ], + "results": [ + { + "typeid": "{73103120-3DD3-4873-BAB3-9713FA2804FB}", + "details": { + "name": "Quaternion" + } + } + ] + }, + { + "base": "Slerp", + "context": "MathQuaternion_VM", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Slerp" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Slerp is invoked" + }, + "details": { + "name": "MathQuaternion_VM::Slerp", + "category": "Other" + }, + "params": [ + { + "typeid": "{73103120-3DD3-4873-BAB3-9713FA2804FB}", + "details": { + "name": "Quaternion" + } + }, + { + "typeid": "{73103120-3DD3-4873-BAB3-9713FA2804FB}", + "details": { + "name": "Quaternion" + } + }, + { + "typeid": "{110C4B14-11A8-4E9D-8638-5051013A56AC}", + "details": { + "name": "double" + } + } + ], + "results": [ + { + "typeid": "{73103120-3DD3-4873-BAB3-9713FA2804FB}", + "details": { + "name": "Quaternion" + } + } + ] + }, + { + "base": "InvertFull", + "context": "MathQuaternion_VM", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke InvertFull" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after InvertFull is invoked" + }, + "details": { + "name": "MathQuaternion_VM::InvertFull", + "category": "Other" + }, + "params": [ + { + "typeid": "{73103120-3DD3-4873-BAB3-9713FA2804FB}", + "details": { + "name": "Quaternion" + } + } + ], + "results": [ + { + "typeid": "{73103120-3DD3-4873-BAB3-9713FA2804FB}", + "details": { + "name": "Quaternion" + } + } + ] + }, + { + "base": "FromMatrix4x4", + "context": "MathQuaternion_VM", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke FromMatrix4x4" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after FromMatrix4x4 is invoked" + }, + "details": { + "name": "MathQuaternion_VM::FromMatrix4x4", + "category": "Other" + }, + "params": [ + { + "typeid": "{157193C7-B673-4A2B-8B43-5681DCC3DEC3}", + "details": { + "name": "const Matrix4x4&" + } + } + ], + "results": [ + { + "typeid": "{73103120-3DD3-4873-BAB3-9713FA2804FB}", + "details": { + "name": "Quaternion" + } + } + ] + }, + { + "base": "RotateVector3", + "context": "MathQuaternion_VM", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke RotateVector3" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after RotateVector3 is invoked" + }, + "details": { + "name": "MathQuaternion_VM::RotateVector3", + "category": "Other" + }, + "params": [ + { + "typeid": "{73103120-3DD3-4873-BAB3-9713FA2804FB}", + "details": { + "name": "Quaternion" + } + }, + { + "typeid": "{8379EB7D-01FA-4538-B64B-A6543B4BE73D}", + "details": { + "name": "Vector3" + } + } + ], + "results": [ + { + "typeid": "{8379EB7D-01FA-4538-B64B-A6543B4BE73D}", + "details": { + "name": "Vector3" + } + } + ] + }, + { + "base": "FromMatrix3x3", + "context": "MathQuaternion_VM", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke FromMatrix3x3" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after FromMatrix3x3 is invoked" + }, + "details": { + "name": "MathQuaternion_VM::FromMatrix3x3", + "category": "Other" + }, + "params": [ + { + "typeid": "{15A4332F-7C3F-4A58-AC35-50E1CE53FB9C}", + "details": { + "name": "const Matrix3x3&" + } + } + ], + "results": [ + { + "typeid": "{73103120-3DD3-4873-BAB3-9713FA2804FB}", + "details": { + "name": "Quaternion" + } + } + ] + }, + { + "base": "Squad", + "context": "MathQuaternion_VM", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Squad" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Squad is invoked" + }, + "details": { + "name": "MathQuaternion_VM::Squad", + "category": "Other" + }, + "params": [ + { + "typeid": "{73103120-3DD3-4873-BAB3-9713FA2804FB}", + "details": { + "name": "Quaternion" + } + }, + { + "typeid": "{73103120-3DD3-4873-BAB3-9713FA2804FB}", + "details": { + "name": "Quaternion" + } + }, + { + "typeid": "{73103120-3DD3-4873-BAB3-9713FA2804FB}", + "details": { + "name": "Quaternion" + } + }, + { + "typeid": "{73103120-3DD3-4873-BAB3-9713FA2804FB}", + "details": { + "name": "Quaternion" + } + }, + { + "typeid": "{110C4B14-11A8-4E9D-8638-5051013A56AC}", + "details": { + "name": "double" + } + } + ], + "results": [ + { + "typeid": "{73103120-3DD3-4873-BAB3-9713FA2804FB}", + "details": { + "name": "Quaternion" + } + } + ] + }, + { + "base": "FromAxisAngleDegrees", + "context": "MathQuaternion_VM", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke FromAxisAngleDegrees" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after FromAxisAngleDegrees is invoked" + }, + "details": { + "name": "MathQuaternion_VM::FromAxisAngleDegrees", + "category": "Other" + }, + "params": [ + { + "typeid": "{8379EB7D-01FA-4538-B64B-A6543B4BE73D}", + "details": { + "name": "Vector3" + } + }, + { + "typeid": "{110C4B14-11A8-4E9D-8638-5051013A56AC}", + "details": { + "name": "double" + } + } + ], + "results": [ + { + "typeid": "{73103120-3DD3-4873-BAB3-9713FA2804FB}", + "details": { + "name": "Quaternion" + } + } + ] + }, + { + "base": "LengthSquared", + "context": "MathQuaternion_VM", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke LengthSquared" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after LengthSquared is invoked" + }, + "details": { + "name": "MathQuaternion_VM::LengthSquared", + "category": "Other" + }, + "params": [ + { + "typeid": "{73103120-3DD3-4873-BAB3-9713FA2804FB}", + "details": { + "name": "Quaternion" + } + } + ], + "results": [ + { + "typeid": "{110C4B14-11A8-4E9D-8638-5051013A56AC}", + "details": { + "name": "double" + } + } + ] + }, + { + "base": "IsFinite", + "context": "MathQuaternion_VM", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke IsFinite" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after IsFinite is invoked" + }, + "details": { + "name": "MathQuaternion_VM::IsFinite", + "category": "Other" + }, + "params": [ + { + "typeid": "{73103120-3DD3-4873-BAB3-9713FA2804FB}", + "details": { + "name": "Quaternion" + } + } + ], + "results": [ + { + "typeid": "{A0CA880C-AFE4-43CB-926C-59AC48496112}", + "details": { + "name": "bool" + } + } + ] + }, + { + "base": "DivideByNumber", + "context": "MathQuaternion_VM", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke DivideByNumber" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after DivideByNumber is invoked" + }, + "details": { + "name": "MathQuaternion_VM::DivideByNumber", + "category": "Other" + }, + "params": [ + { + "typeid": "{73103120-3DD3-4873-BAB3-9713FA2804FB}", + "details": { + "name": "Quaternion" + } + }, + { + "typeid": "{110C4B14-11A8-4E9D-8638-5051013A56AC}", + "details": { + "name": "double" + } + } + ], + "results": [ + { + "typeid": "{73103120-3DD3-4873-BAB3-9713FA2804FB}", + "details": { + "name": "Quaternion" + } + } + ] + }, + { + "base": "MultiplyByRotation", + "context": "MathQuaternion_VM", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke MultiplyByRotation" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after MultiplyByRotation is invoked" + }, + "details": { + "name": "MathQuaternion_VM::MultiplyByRotation", + "category": "Other" + }, + "params": [ + { + "typeid": "{73103120-3DD3-4873-BAB3-9713FA2804FB}", + "details": { + "name": "Quaternion" + } + }, + { + "typeid": "{73103120-3DD3-4873-BAB3-9713FA2804FB}", + "details": { + "name": "Quaternion" + } + } + ], + "results": [ + { + "typeid": "{73103120-3DD3-4873-BAB3-9713FA2804FB}", + "details": { + "name": "Quaternion" + } + } + ] + } + ] + } + ] +} \ No newline at end of file diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Classes/MathRandom_VM.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Classes/MathRandom_VM.names new file mode 100644 index 0000000000..9dffa229ca --- /dev/null +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Classes/MathRandom_VM.names @@ -0,0 +1,784 @@ +{ + "entries": [ + { + "base": "MathRandom_VM", + "context": "BehaviorClass", + "variant": "", + "details": { + "name": "MathRandom_VM" + }, + "methods": [ + { + "base": "RandomPointOnSphere", + "context": "MathRandom_VM", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke RandomPointOnSphere" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after RandomPointOnSphere is invoked" + }, + "details": { + "name": "MathRandom_VM::RandomPointOnSphere", + "category": "Other" + }, + "params": [ + { + "typeid": "{110C4B14-11A8-4E9D-8638-5051013A56AC}", + "details": { + "name": "double" + } + } + ], + "results": [ + { + "typeid": "{8379EB7D-01FA-4538-B64B-A6543B4BE73D}", + "details": { + "name": "Vector3" + } + } + ] + }, + { + "base": "RandomPointInCircle", + "context": "MathRandom_VM", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke RandomPointInCircle" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after RandomPointInCircle is invoked" + }, + "details": { + "name": "MathRandom_VM::RandomPointInCircle", + "category": "Other" + }, + "params": [ + { + "typeid": "{110C4B14-11A8-4E9D-8638-5051013A56AC}", + "details": { + "name": "double" + } + } + ], + "results": [ + { + "typeid": "{8379EB7D-01FA-4538-B64B-A6543B4BE73D}", + "details": { + "name": "Vector3" + } + } + ] + }, + { + "base": "RandomPointInSquare", + "context": "MathRandom_VM", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke RandomPointInSquare" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after RandomPointInSquare is invoked" + }, + "details": { + "name": "MathRandom_VM::RandomPointInSquare", + "category": "Other" + }, + "params": [ + { + "typeid": "{3D80F623-C85C-4741-90D0-E4E66164E6BF}", + "details": { + "name": "Vector2" + } + } + ], + "results": [ + { + "typeid": "{8379EB7D-01FA-4538-B64B-A6543B4BE73D}", + "details": { + "name": "Vector3" + } + } + ] + }, + { + "base": "RandomUnitVector2", + "context": "MathRandom_VM", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke RandomUnitVector2" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after RandomUnitVector2 is invoked" + }, + "details": { + "name": "MathRandom_VM::RandomUnitVector2", + "category": "Other" + }, + "results": [ + { + "typeid": "{3D80F623-C85C-4741-90D0-E4E66164E6BF}", + "details": { + "name": "Vector2" + } + } + ] + }, + { + "base": "RandomVector2", + "context": "MathRandom_VM", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke RandomVector2" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after RandomVector2 is invoked" + }, + "details": { + "name": "MathRandom_VM::RandomVector2", + "category": "Other" + }, + "params": [ + { + "typeid": "{3D80F623-C85C-4741-90D0-E4E66164E6BF}", + "details": { + "name": "Vector2" + } + }, + { + "typeid": "{3D80F623-C85C-4741-90D0-E4E66164E6BF}", + "details": { + "name": "Vector2" + } + } + ], + "results": [ + { + "typeid": "{3D80F623-C85C-4741-90D0-E4E66164E6BF}", + "details": { + "name": "Vector2" + } + } + ] + }, + { + "base": "RandomPointInCylinder", + "context": "MathRandom_VM", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke RandomPointInCylinder" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after RandomPointInCylinder is invoked" + }, + "details": { + "name": "MathRandom_VM::RandomPointInCylinder", + "category": "Other" + }, + "params": [ + { + "typeid": "{110C4B14-11A8-4E9D-8638-5051013A56AC}", + "details": { + "name": "double" + } + }, + { + "typeid": "{110C4B14-11A8-4E9D-8638-5051013A56AC}", + "details": { + "name": "double" + } + } + ], + "results": [ + { + "typeid": "{8379EB7D-01FA-4538-B64B-A6543B4BE73D}", + "details": { + "name": "Vector3" + } + } + ] + }, + { + "base": "RandomQuaternion", + "context": "MathRandom_VM", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke RandomQuaternion" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after RandomQuaternion is invoked" + }, + "details": { + "name": "MathRandom_VM::RandomQuaternion", + "category": "Other" + }, + "params": [ + { + "typeid": "{110C4B14-11A8-4E9D-8638-5051013A56AC}", + "details": { + "name": "double" + } + }, + { + "typeid": "{110C4B14-11A8-4E9D-8638-5051013A56AC}", + "details": { + "name": "double" + } + } + ], + "results": [ + { + "typeid": "{73103120-3DD3-4873-BAB3-9713FA2804FB}", + "details": { + "name": "Quaternion" + } + } + ] + }, + { + "base": "RandomVector4", + "context": "MathRandom_VM", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke RandomVector4" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after RandomVector4 is invoked" + }, + "details": { + "name": "MathRandom_VM::RandomVector4", + "category": "Other" + }, + "params": [ + { + "typeid": "{0CE9FA36-1E3A-4C06-9254-B7C73A732053}", + "details": { + "name": "Vector4" + } + }, + { + "typeid": "{0CE9FA36-1E3A-4C06-9254-B7C73A732053}", + "details": { + "name": "Vector4" + } + } + ], + "results": [ + { + "typeid": "{0CE9FA36-1E3A-4C06-9254-B7C73A732053}", + "details": { + "name": "Vector4" + } + } + ] + }, + { + "base": "RandomPointInBox", + "context": "MathRandom_VM", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke RandomPointInBox" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after RandomPointInBox is invoked" + }, + "details": { + "name": "MathRandom_VM::RandomPointInBox", + "category": "Other" + }, + "params": [ + { + "typeid": "{8379EB7D-01FA-4538-B64B-A6543B4BE73D}", + "details": { + "name": "Vector3" + } + } + ], + "results": [ + { + "typeid": "{8379EB7D-01FA-4538-B64B-A6543B4BE73D}", + "details": { + "name": "Vector3" + } + } + ] + }, + { + "base": "RandomPointOnCircle", + "context": "MathRandom_VM", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke RandomPointOnCircle" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after RandomPointOnCircle is invoked" + }, + "details": { + "name": "MathRandom_VM::RandomPointOnCircle", + "category": "Other" + }, + "params": [ + { + "typeid": "{110C4B14-11A8-4E9D-8638-5051013A56AC}", + "details": { + "name": "double" + } + } + ], + "results": [ + { + "typeid": "{8379EB7D-01FA-4538-B64B-A6543B4BE73D}", + "details": { + "name": "Vector3" + } + } + ] + }, + { + "base": "RandomPointInEllipsoid", + "context": "MathRandom_VM", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke RandomPointInEllipsoid" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after RandomPointInEllipsoid is invoked" + }, + "details": { + "name": "MathRandom_VM::RandomPointInEllipsoid", + "category": "Other" + }, + "params": [ + { + "typeid": "{8379EB7D-01FA-4538-B64B-A6543B4BE73D}", + "details": { + "name": "Vector3" + } + } + ], + "results": [ + { + "typeid": "{8379EB7D-01FA-4538-B64B-A6543B4BE73D}", + "details": { + "name": "Vector3" + } + } + ] + }, + { + "base": "RandomInteger", + "context": "MathRandom_VM", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke RandomInteger" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after RandomInteger is invoked" + }, + "details": { + "name": "MathRandom_VM::RandomInteger", + "category": "Other" + }, + "params": [ + { + "typeid": "{110C4B14-11A8-4E9D-8638-5051013A56AC}", + "details": { + "name": "double" + } + }, + { + "typeid": "{110C4B14-11A8-4E9D-8638-5051013A56AC}", + "details": { + "name": "double" + } + } + ], + "results": [ + { + "typeid": "{110C4B14-11A8-4E9D-8638-5051013A56AC}", + "details": { + "name": "double" + } + } + ] + }, + { + "base": "RandomPointInWedge", + "context": "MathRandom_VM", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke RandomPointInWedge" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after RandomPointInWedge is invoked" + }, + "details": { + "name": "MathRandom_VM::RandomPointInWedge", + "category": "Other" + }, + "params": [ + { + "typeid": "{8379EB7D-01FA-4538-B64B-A6543B4BE73D}", + "details": { + "name": "Vector3" + } + }, + { + "typeid": "{8379EB7D-01FA-4538-B64B-A6543B4BE73D}", + "details": { + "name": "Vector3" + } + }, + { + "typeid": "{8379EB7D-01FA-4538-B64B-A6543B4BE73D}", + "details": { + "name": "Vector3" + } + }, + { + "typeid": "{110C4B14-11A8-4E9D-8638-5051013A56AC}", + "details": { + "name": "double" + } + }, + { + "typeid": "{110C4B14-11A8-4E9D-8638-5051013A56AC}", + "details": { + "name": "double" + } + }, + { + "typeid": "{110C4B14-11A8-4E9D-8638-5051013A56AC}", + "details": { + "name": "double" + } + } + ], + "results": [ + { + "typeid": "{8379EB7D-01FA-4538-B64B-A6543B4BE73D}", + "details": { + "name": "Vector3" + } + } + ] + }, + { + "base": "RandomGrayscale", + "context": "MathRandom_VM", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke RandomGrayscale" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after RandomGrayscale is invoked" + }, + "details": { + "name": "MathRandom_VM::RandomGrayscale", + "category": "Other" + }, + "params": [ + { + "typeid": "{110C4B14-11A8-4E9D-8638-5051013A56AC}", + "details": { + "name": "double" + } + }, + { + "typeid": "{110C4B14-11A8-4E9D-8638-5051013A56AC}", + "details": { + "name": "double" + } + } + ], + "results": [ + { + "typeid": "{7894072A-9050-4F0F-901B-34B1A0D29417}", + "details": { + "name": "Color" + } + } + ] + }, + { + "base": "RandomPointInCone", + "context": "MathRandom_VM", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke RandomPointInCone" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after RandomPointInCone is invoked" + }, + "details": { + "name": "MathRandom_VM::RandomPointInCone", + "category": "Other" + }, + "params": [ + { + "typeid": "{110C4B14-11A8-4E9D-8638-5051013A56AC}", + "details": { + "name": "double" + } + }, + { + "typeid": "{110C4B14-11A8-4E9D-8638-5051013A56AC}", + "details": { + "name": "double" + } + } + ], + "results": [ + { + "typeid": "{8379EB7D-01FA-4538-B64B-A6543B4BE73D}", + "details": { + "name": "Vector3" + } + } + ] + }, + { + "base": "RandomColor", + "context": "MathRandom_VM", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke RandomColor" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after RandomColor is invoked" + }, + "details": { + "name": "MathRandom_VM::RandomColor", + "category": "Other" + }, + "params": [ + { + "typeid": "{7894072A-9050-4F0F-901B-34B1A0D29417}", + "details": { + "name": "Color" + } + }, + { + "typeid": "{7894072A-9050-4F0F-901B-34B1A0D29417}", + "details": { + "name": "Color" + } + } + ], + "results": [ + { + "typeid": "{7894072A-9050-4F0F-901B-34B1A0D29417}", + "details": { + "name": "Color" + } + } + ] + }, + { + "base": "RandomNumber", + "context": "MathRandom_VM", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke RandomNumber" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after RandomNumber is invoked" + }, + "details": { + "name": "MathRandom_VM::RandomNumber", + "category": "Other" + }, + "params": [ + { + "typeid": "{110C4B14-11A8-4E9D-8638-5051013A56AC}", + "details": { + "name": "double" + } + }, + { + "typeid": "{110C4B14-11A8-4E9D-8638-5051013A56AC}", + "details": { + "name": "double" + } + } + ], + "results": [ + { + "typeid": "{110C4B14-11A8-4E9D-8638-5051013A56AC}", + "details": { + "name": "double" + } + } + ] + }, + { + "base": "RandomPointInSphere", + "context": "MathRandom_VM", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke RandomPointInSphere" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after RandomPointInSphere is invoked" + }, + "details": { + "name": "MathRandom_VM::RandomPointInSphere", + "category": "Other" + }, + "params": [ + { + "typeid": "{110C4B14-11A8-4E9D-8638-5051013A56AC}", + "details": { + "name": "double" + } + } + ], + "results": [ + { + "typeid": "{8379EB7D-01FA-4538-B64B-A6543B4BE73D}", + "details": { + "name": "Vector3" + } + } + ] + }, + { + "base": "RandomUnitVector3", + "context": "MathRandom_VM", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke RandomUnitVector3" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after RandomUnitVector3 is invoked" + }, + "details": { + "name": "MathRandom_VM::RandomUnitVector3", + "category": "Other" + }, + "results": [ + { + "typeid": "{8379EB7D-01FA-4538-B64B-A6543B4BE73D}", + "details": { + "name": "Vector3" + } + } + ] + }, + { + "base": "RandomVector3", + "context": "MathRandom_VM", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke RandomVector3" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after RandomVector3 is invoked" + }, + "details": { + "name": "MathRandom_VM::RandomVector3", + "category": "Other" + }, + "params": [ + { + "typeid": "{8379EB7D-01FA-4538-B64B-A6543B4BE73D}", + "details": { + "name": "Vector3" + } + }, + { + "typeid": "{8379EB7D-01FA-4538-B64B-A6543B4BE73D}", + "details": { + "name": "Vector3" + } + } + ], + "results": [ + { + "typeid": "{8379EB7D-01FA-4538-B64B-A6543B4BE73D}", + "details": { + "name": "Vector3" + } + } + ] + }, + { + "base": "RandomPointInArc", + "context": "MathRandom_VM", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke RandomPointInArc" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after RandomPointInArc is invoked" + }, + "details": { + "name": "MathRandom_VM::RandomPointInArc", + "category": "Other" + }, + "params": [ + { + "typeid": "{8379EB7D-01FA-4538-B64B-A6543B4BE73D}", + "details": { + "name": "Vector3" + } + }, + { + "typeid": "{8379EB7D-01FA-4538-B64B-A6543B4BE73D}", + "details": { + "name": "Vector3" + } + }, + { + "typeid": "{8379EB7D-01FA-4538-B64B-A6543B4BE73D}", + "details": { + "name": "Vector3" + } + }, + { + "typeid": "{110C4B14-11A8-4E9D-8638-5051013A56AC}", + "details": { + "name": "double" + } + }, + { + "typeid": "{110C4B14-11A8-4E9D-8638-5051013A56AC}", + "details": { + "name": "double" + } + } + ], + "results": [ + { + "typeid": "{8379EB7D-01FA-4538-B64B-A6543B4BE73D}", + "details": { + "name": "Vector3" + } + } + ] + } + ] + } + ] +} \ No newline at end of file diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Classes/MathTransform_VM.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Classes/MathTransform_VM.names new file mode 100644 index 0000000000..392596d90b --- /dev/null +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Classes/MathTransform_VM.names @@ -0,0 +1,790 @@ +{ + "entries": [ + { + "base": "MathTransform_VM", + "context": "BehaviorClass", + "variant": "", + "details": { + "name": "MathTransform_VM" + }, + "methods": [ + { + "base": "RotationZDegrees", + "context": "MathTransform_VM", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke RotationZDegrees" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after RotationZDegrees is invoked" + }, + "details": { + "name": "MathTransform_VM::RotationZDegrees", + "category": "Other" + }, + "params": [ + { + "typeid": "{110C4B14-11A8-4E9D-8638-5051013A56AC}", + "details": { + "name": "double" + } + } + ], + "results": [ + { + "typeid": "{5D9958E9-9F1E-4985-B532-FFFDE75FEDFD}", + "details": { + "name": "Transform" + } + } + ] + }, + { + "base": "GetUp", + "context": "MathTransform_VM", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke GetUp" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after GetUp is invoked" + }, + "details": { + "name": "MathTransform_VM::GetUp", + "category": "Other" + }, + "params": [ + { + "typeid": "{5D9958E9-9F1E-4985-B532-FFFDE75FEDFD}", + "details": { + "name": "const Transform&" + } + }, + { + "typeid": "{110C4B14-11A8-4E9D-8638-5051013A56AC}", + "details": { + "name": "double" + } + } + ], + "results": [ + { + "typeid": "{8379EB7D-01FA-4538-B64B-A6543B4BE73D}", + "details": { + "name": "Vector3" + } + } + ] + }, + { + "base": "GetForward", + "context": "MathTransform_VM", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke GetForward" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after GetForward is invoked" + }, + "details": { + "name": "MathTransform_VM::GetForward", + "category": "Other" + }, + "params": [ + { + "typeid": "{5D9958E9-9F1E-4985-B532-FFFDE75FEDFD}", + "details": { + "name": "const Transform&" + } + }, + { + "typeid": "{110C4B14-11A8-4E9D-8638-5051013A56AC}", + "details": { + "name": "double" + } + } + ], + "results": [ + { + "typeid": "{8379EB7D-01FA-4538-B64B-A6543B4BE73D}", + "details": { + "name": "Vector3" + } + } + ] + }, + { + "base": "IsClose", + "context": "MathTransform_VM", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke IsClose" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after IsClose is invoked" + }, + "details": { + "name": "MathTransform_VM::IsClose", + "category": "Other" + }, + "params": [ + { + "typeid": "{5D9958E9-9F1E-4985-B532-FFFDE75FEDFD}", + "details": { + "name": "const Transform&" + } + }, + { + "typeid": "{5D9958E9-9F1E-4985-B532-FFFDE75FEDFD}", + "details": { + "name": "const Transform&" + } + }, + { + "typeid": "{110C4B14-11A8-4E9D-8638-5051013A56AC}", + "details": { + "name": "double" + } + } + ], + "results": [ + { + "typeid": "{A0CA880C-AFE4-43CB-926C-59AC48496112}", + "details": { + "name": "bool" + } + } + ] + }, + { + "base": "RotationXDegrees", + "context": "MathTransform_VM", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke RotationXDegrees" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after RotationXDegrees is invoked" + }, + "details": { + "name": "MathTransform_VM::RotationXDegrees", + "category": "Other" + }, + "params": [ + { + "typeid": "{110C4B14-11A8-4E9D-8638-5051013A56AC}", + "details": { + "name": "double" + } + } + ], + "results": [ + { + "typeid": "{5D9958E9-9F1E-4985-B532-FFFDE75FEDFD}", + "details": { + "name": "Transform" + } + } + ] + }, + { + "base": "FromTranslation", + "context": "MathTransform_VM", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke FromTranslation" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after FromTranslation is invoked" + }, + "details": { + "name": "MathTransform_VM::FromTranslation", + "category": "Other" + }, + "params": [ + { + "typeid": "{8379EB7D-01FA-4538-B64B-A6543B4BE73D}", + "details": { + "name": "Vector3" + } + } + ], + "results": [ + { + "typeid": "{5D9958E9-9F1E-4985-B532-FFFDE75FEDFD}", + "details": { + "name": "Transform" + } + } + ] + }, + { + "base": "IsFinite", + "context": "MathTransform_VM", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke IsFinite" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after IsFinite is invoked" + }, + "details": { + "name": "MathTransform_VM::IsFinite", + "category": "Other" + }, + "params": [ + { + "typeid": "{5D9958E9-9F1E-4985-B532-FFFDE75FEDFD}", + "details": { + "name": "const Transform&" + } + } + ], + "results": [ + { + "typeid": "{A0CA880C-AFE4-43CB-926C-59AC48496112}", + "details": { + "name": "bool" + } + } + ] + }, + { + "base": "MultiplyByUniformScale", + "context": "MathTransform_VM", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke MultiplyByUniformScale" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after MultiplyByUniformScale is invoked" + }, + "details": { + "name": "MathTransform_VM::MultiplyByUniformScale", + "category": "Other" + }, + "params": [ + { + "typeid": "{5D9958E9-9F1E-4985-B532-FFFDE75FEDFD}", + "details": { + "name": "Transform" + } + }, + { + "typeid": "{110C4B14-11A8-4E9D-8638-5051013A56AC}", + "details": { + "name": "double" + } + } + ], + "results": [ + { + "typeid": "{5D9958E9-9F1E-4985-B532-FFFDE75FEDFD}", + "details": { + "name": "Transform" + } + } + ] + }, + { + "base": "MultiplyByTransform", + "context": "MathTransform_VM", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke MultiplyByTransform" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after MultiplyByTransform is invoked" + }, + "details": { + "name": "MathTransform_VM::MultiplyByTransform", + "category": "Other" + }, + "params": [ + { + "typeid": "{5D9958E9-9F1E-4985-B532-FFFDE75FEDFD}", + "details": { + "name": "const Transform&" + } + }, + { + "typeid": "{5D9958E9-9F1E-4985-B532-FFFDE75FEDFD}", + "details": { + "name": "const Transform&" + } + } + ], + "results": [ + { + "typeid": "{5D9958E9-9F1E-4985-B532-FFFDE75FEDFD}", + "details": { + "name": "Transform" + } + } + ] + }, + { + "base": "FromRotation", + "context": "MathTransform_VM", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke FromRotation" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after FromRotation is invoked" + }, + "details": { + "name": "MathTransform_VM::FromRotation", + "category": "Other" + }, + "params": [ + { + "typeid": "{73103120-3DD3-4873-BAB3-9713FA2804FB}", + "details": { + "name": "Quaternion" + } + } + ], + "results": [ + { + "typeid": "{5D9958E9-9F1E-4985-B532-FFFDE75FEDFD}", + "details": { + "name": "Transform" + } + } + ] + }, + { + "base": "RotationYDegrees", + "context": "MathTransform_VM", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke RotationYDegrees" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after RotationYDegrees is invoked" + }, + "details": { + "name": "MathTransform_VM::RotationYDegrees", + "category": "Other" + }, + "params": [ + { + "typeid": "{110C4B14-11A8-4E9D-8638-5051013A56AC}", + "details": { + "name": "double" + } + } + ], + "results": [ + { + "typeid": "{5D9958E9-9F1E-4985-B532-FFFDE75FEDFD}", + "details": { + "name": "Transform" + } + } + ] + }, + { + "base": "FromRotationAndTranslation", + "context": "MathTransform_VM", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke FromRotationAndTranslation" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after FromRotationAndTranslation is invoked" + }, + "details": { + "name": "MathTransform_VM::FromRotationAndTranslation", + "category": "Other" + }, + "params": [ + { + "typeid": "{73103120-3DD3-4873-BAB3-9713FA2804FB}", + "details": { + "name": "Quaternion" + } + }, + { + "typeid": "{8379EB7D-01FA-4538-B64B-A6543B4BE73D}", + "details": { + "name": "Vector3" + } + } + ], + "results": [ + { + "typeid": "{5D9958E9-9F1E-4985-B532-FFFDE75FEDFD}", + "details": { + "name": "Transform" + } + } + ] + }, + { + "base": "MultiplyByVector3", + "context": "MathTransform_VM", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke MultiplyByVector3" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after MultiplyByVector3 is invoked" + }, + "details": { + "name": "MathTransform_VM::MultiplyByVector3", + "category": "Other" + }, + "params": [ + { + "typeid": "{5D9958E9-9F1E-4985-B532-FFFDE75FEDFD}", + "details": { + "name": "const Transform&" + } + }, + { + "typeid": "{8379EB7D-01FA-4538-B64B-A6543B4BE73D}", + "details": { + "name": "Vector3" + } + } + ], + "results": [ + { + "typeid": "{8379EB7D-01FA-4538-B64B-A6543B4BE73D}", + "details": { + "name": "Vector3" + } + } + ] + }, + { + "base": "MultiplyByVector4", + "context": "MathTransform_VM", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke MultiplyByVector4" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after MultiplyByVector4 is invoked" + }, + "details": { + "name": "MathTransform_VM::MultiplyByVector4", + "category": "Other" + }, + "params": [ + { + "typeid": "{5D9958E9-9F1E-4985-B532-FFFDE75FEDFD}", + "details": { + "name": "const Transform&" + } + }, + { + "typeid": "{0CE9FA36-1E3A-4C06-9254-B7C73A732053}", + "details": { + "name": "Vector4" + } + } + ], + "results": [ + { + "typeid": "{0CE9FA36-1E3A-4C06-9254-B7C73A732053}", + "details": { + "name": "Vector4" + } + } + ] + }, + { + "base": "ToScale", + "context": "MathTransform_VM", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke ToScale" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after ToScale is invoked" + }, + "details": { + "name": "MathTransform_VM::ToScale", + "category": "Other" + }, + "params": [ + { + "typeid": "{5D9958E9-9F1E-4985-B532-FFFDE75FEDFD}", + "details": { + "name": "const Transform&" + } + } + ], + "results": [ + { + "typeid": "{110C4B14-11A8-4E9D-8638-5051013A56AC}", + "details": { + "name": "double" + } + } + ] + }, + { + "base": "FromMatrix3x3", + "context": "MathTransform_VM", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke FromMatrix3x3" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after FromMatrix3x3 is invoked" + }, + "details": { + "name": "MathTransform_VM::FromMatrix3x3", + "category": "Other" + }, + "params": [ + { + "typeid": "{15A4332F-7C3F-4A58-AC35-50E1CE53FB9C}", + "details": { + "name": "Matrix3x3" + } + } + ], + "results": [ + { + "typeid": "{5D9958E9-9F1E-4985-B532-FFFDE75FEDFD}", + "details": { + "name": "Transform" + } + } + ] + }, + { + "base": "GetRight", + "context": "MathTransform_VM", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke GetRight" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after GetRight is invoked" + }, + "details": { + "name": "MathTransform_VM::GetRight", + "category": "Other" + }, + "params": [ + { + "typeid": "{5D9958E9-9F1E-4985-B532-FFFDE75FEDFD}", + "details": { + "name": "const Transform&" + } + }, + { + "typeid": "{110C4B14-11A8-4E9D-8638-5051013A56AC}", + "details": { + "name": "double" + } + } + ], + "results": [ + { + "typeid": "{8379EB7D-01FA-4538-B64B-A6543B4BE73D}", + "details": { + "name": "Vector3" + } + } + ] + }, + { + "base": "IsOrthogonal", + "context": "MathTransform_VM", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke IsOrthogonal" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after IsOrthogonal is invoked" + }, + "details": { + "name": "MathTransform_VM::IsOrthogonal", + "category": "Other" + }, + "params": [ + { + "typeid": "{5D9958E9-9F1E-4985-B532-FFFDE75FEDFD}", + "details": { + "name": "const Transform&" + } + }, + { + "typeid": "{110C4B14-11A8-4E9D-8638-5051013A56AC}", + "details": { + "name": "double" + } + } + ], + "results": [ + { + "typeid": "{A0CA880C-AFE4-43CB-926C-59AC48496112}", + "details": { + "name": "bool" + } + } + ] + }, + { + "base": "Orthogonalize", + "context": "MathTransform_VM", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Orthogonalize" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Orthogonalize is invoked" + }, + "details": { + "name": "MathTransform_VM::Orthogonalize", + "category": "Other" + }, + "params": [ + { + "typeid": "{5D9958E9-9F1E-4985-B532-FFFDE75FEDFD}", + "details": { + "name": "const Transform&" + } + } + ], + "results": [ + { + "typeid": "{5D9958E9-9F1E-4985-B532-FFFDE75FEDFD}", + "details": { + "name": "Transform" + } + } + ] + }, + { + "base": "FromMatrix3x3AndTranslation", + "context": "MathTransform_VM", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke FromMatrix3x3AndTranslation" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after FromMatrix3x3AndTranslation is invoked" + }, + "details": { + "name": "MathTransform_VM::FromMatrix3x3AndTranslation", + "category": "Other" + }, + "params": [ + { + "typeid": "{15A4332F-7C3F-4A58-AC35-50E1CE53FB9C}", + "details": { + "name": "Matrix3x3" + } + }, + { + "typeid": "{8379EB7D-01FA-4538-B64B-A6543B4BE73D}", + "details": { + "name": "Vector3" + } + } + ], + "results": [ + { + "typeid": "{5D9958E9-9F1E-4985-B532-FFFDE75FEDFD}", + "details": { + "name": "Transform" + } + } + ] + }, + { + "base": "FromScale", + "context": "MathTransform_VM", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke FromScale" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after FromScale is invoked" + }, + "details": { + "name": "MathTransform_VM::FromScale", + "category": "Other" + }, + "params": [ + { + "typeid": "{110C4B14-11A8-4E9D-8638-5051013A56AC}", + "details": { + "name": "double" + } + } + ], + "results": [ + { + "typeid": "{5D9958E9-9F1E-4985-B532-FFFDE75FEDFD}", + "details": { + "name": "Transform" + } + } + ] + }, + { + "base": "GetTranslation", + "context": "MathTransform_VM", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke GetTranslation" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after GetTranslation is invoked" + }, + "details": { + "name": "MathTransform_VM::GetTranslation", + "category": "Other" + }, + "params": [ + { + "typeid": "{5D9958E9-9F1E-4985-B532-FFFDE75FEDFD}", + "details": { + "name": "const Transform&" + } + } + ], + "results": [ + { + "typeid": "{8379EB7D-01FA-4538-B64B-A6543B4BE73D}", + "details": { + "name": "Vector3" + } + } + ] + } + ] + } + ] +} \ No newline at end of file diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Classes/MathUtils.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Classes/MathUtils.names new file mode 100644 index 0000000000..d394306ed0 --- /dev/null +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Classes/MathUtils.names @@ -0,0 +1,308 @@ +{ + "entries": [ + { + "base": "MathUtils", + "context": "BehaviorClass", + "variant": "", + "details": { + "name": "Utilities", + "category": "Math" + }, + "methods": [ + { + "base": "ConvertEulerDegreesToQuaternion", + "context": "MathUtils", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Convert Euler Angles To Quaternion" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Convert Euler Angles To Quaternion is invoked" + }, + "details": { + "name": "Convert Euler Angles To Quaternion" + }, + "params": [ + { + "typeid": "{8379EB7D-01FA-4538-B64B-A6543B4BE73D}", + "details": { + "name": "Angles (Degrees)" + } + } + ], + "results": [ + { + "typeid": "{73103120-3DD3-4873-BAB3-9713FA2804FB}", + "details": { + "name": "Quaternion" + } + } + ] + }, + { + "base": "ConvertEulerDegreesToTransformPrecise", + "context": "MathUtils", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Convert Euler Angles To Transform (Precise)" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Convert Euler Angles To Transform (Precise) is invoked" + }, + "details": { + "name": "Convert Euler Angles To Transform (Precise)", + "category": "Other" + }, + "params": [ + { + "typeid": "{8379EB7D-01FA-4538-B64B-A6543B4BE73D}", + "details": { + "name": "Angles (Degrees)" + } + } + ], + "results": [ + { + "typeid": "{5D9958E9-9F1E-4985-B532-FFFDE75FEDFD}", + "details": { + "name": "Transform" + } + } + ] + }, + { + "base": "ConvertEulerDegreesToTransform", + "context": "MathUtils", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Convert Euler Angles To Transform" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Convert Euler Angles To Transform is invoked" + }, + "details": { + "name": "Convert Euler Angles To Transform" + }, + "params": [ + { + "typeid": "{8379EB7D-01FA-4538-B64B-A6543B4BE73D}", + "details": { + "name": "Angles (Degrees)" + } + } + ], + "results": [ + { + "typeid": "{5D9958E9-9F1E-4985-B532-FFFDE75FEDFD}", + "details": { + "name": "Transform" + } + } + ] + }, + { + "base": "ConvertQuaternionToEulerRadians", + "context": "MathUtils", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Convert Quaternion To Euler Angles (Radians)" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Convert Quaternion To Euler Angles (Radians) is invoked" + }, + "details": { + "name": "Convert Quaternion To Euler Angles (Radians)" + }, + "params": [ + { + "typeid": "{73103120-3DD3-4873-BAB3-9713FA2804FB}", + "details": { + "name": "Quaternion" + } + } + ], + "results": [ + { + "typeid": "{8379EB7D-01FA-4538-B64B-A6543B4BE73D}", + "details": { + "name": "Angles (Radians)" + } + } + ] + }, + { + "base": "CreateLookAt", + "context": "MathUtils", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Create Look At" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Create Look At is invoked" + }, + "details": { + "name": "Create Look At" + }, + "params": [ + { + "typeid": "{8379EB7D-01FA-4538-B64B-A6543B4BE73D}", + "details": { + "name": "From" + } + }, + { + "typeid": "{8379EB7D-01FA-4538-B64B-A6543B4BE73D}", + "details": { + "name": "To" + } + }, + { + "typeid": "{72B9409A-7D1A-4831-9CFE-FCB3FADD3426}", + "details": { + "name": "Axis", + "tooltip": "0: X+, 1: X-, 2: Y+, 3: Y-, 4: Z+, 5: Z-" + } + } + ], + "results": [ + { + "typeid": "{5D9958E9-9F1E-4985-B532-FFFDE75FEDFD}", + "details": { + "name": "Transform" + } + } + ] + }, + { + "base": "ConvertTransformToEulerRadians", + "context": "MathUtils", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Convert Transform To Euler Angles (Radians)" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Convert Transform To Euler Angles (Radians) is invoked" + }, + "details": { + "name": "Convert Transform To Euler Angles (Radians)" + }, + "params": [ + { + "typeid": "{5D9958E9-9F1E-4985-B532-FFFDE75FEDFD}", + "details": { + "name": "Transform" + } + } + ], + "results": [ + { + "typeid": "{8379EB7D-01FA-4538-B64B-A6543B4BE73D}", + "details": { + "name": "Angles (Radians)" + } + } + ] + }, + { + "base": "ConvertQuaternionToEulerDegrees", + "context": "MathUtils", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Convert Quaternion To Euler Angles (Degrees)" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Convert Quaternion To Euler Angles (Degrees) is invoked" + }, + "details": { + "name": "Convert Quaternion To Euler Angles (Degrees)" + }, + "params": [ + { + "typeid": "{73103120-3DD3-4873-BAB3-9713FA2804FB}", + "details": { + "name": "Quaternion" + } + } + ], + "results": [ + { + "typeid": "{8379EB7D-01FA-4538-B64B-A6543B4BE73D}", + "details": { + "name": "Angles (Degrees)" + } + } + ] + }, + { + "base": "ConvertTransformToEulerDegrees", + "context": "MathUtils", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Convert Transform To Euler Angles (Degrees)" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Convert Transform To Euler Angles (Degrees) is invoked" + }, + "details": { + "name": "Convert Transform To Euler Angles (Degrees)" + }, + "params": [ + { + "typeid": "{5D9958E9-9F1E-4985-B532-FFFDE75FEDFD}", + "details": { + "name": "Transform" + } + } + ], + "results": [ + { + "typeid": "{8379EB7D-01FA-4538-B64B-A6543B4BE73D}", + "details": { + "name": "Angles (Degrees)" + } + } + ] + }, + { + "base": "ConvertEulerRadiansToQuaternion", + "context": "MathUtils", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Convert Euler Angles (Radians) To Quaternion" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Convert Euler Angles (Radians) To Quaternion is invoked" + }, + "details": { + "name": "Convert Euler Angles (Radians) To Quaternion" + }, + "params": [ + { + "typeid": "{8379EB7D-01FA-4538-B64B-A6543B4BE73D}", + "details": { + "name": "Angles (Radians)" + } + } + ], + "results": [ + { + "typeid": "{73103120-3DD3-4873-BAB3-9713FA2804FB}", + "details": { + "name": "Quaternion" + } + } + ] + } + ] + } + ] +} \ No newline at end of file diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Classes/MathVector2_VM.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Classes/MathVector2_VM.names new file mode 100644 index 0000000000..ad6cca60a4 --- /dev/null +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Classes/MathVector2_VM.names @@ -0,0 +1,1174 @@ +{ + "entries": [ + { + "base": "MathVector2_VM", + "context": "BehaviorClass", + "variant": "", + "details": { + "name": "MathVector2_VM" + }, + "methods": [ + { + "base": "DirectionTo", + "context": "MathVector2_VM", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke DirectionTo" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after DirectionTo is invoked" + }, + "details": { + "name": "MathVector2_VM::DirectionTo", + "category": "Other" + }, + "params": [ + { + "typeid": "{3D80F623-C85C-4741-90D0-E4E66164E6BF}", + "details": { + "name": "Vector2" + } + }, + { + "typeid": "{3D80F623-C85C-4741-90D0-E4E66164E6BF}", + "details": { + "name": "Vector2" + } + }, + { + "typeid": "{110C4B14-11A8-4E9D-8638-5051013A56AC}", + "details": { + "name": "double" + } + } + ], + "results": [ + { + "typeid": "{3A98C3C6-91C4-5B49-8559-1C4C9EA9BCB8}", + "details": { + "name": "tuple" + } + } + ] + }, + { + "base": "Subtract", + "context": "MathVector2_VM", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Subtract" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Subtract is invoked" + }, + "details": { + "name": "MathVector2_VM::Subtract", + "category": "Other" + }, + "params": [ + { + "typeid": "{3D80F623-C85C-4741-90D0-E4E66164E6BF}", + "details": { + "name": "const Vector2&" + } + }, + { + "typeid": "{3D80F623-C85C-4741-90D0-E4E66164E6BF}", + "details": { + "name": "const Vector2&" + } + } + ], + "results": [ + { + "typeid": "{3D80F623-C85C-4741-90D0-E4E66164E6BF}", + "details": { + "name": "Vector2" + } + } + ] + }, + { + "base": "Project", + "context": "MathVector2_VM", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Project" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Project is invoked" + }, + "details": { + "name": "MathVector2_VM::Project", + "category": "Other" + }, + "params": [ + { + "typeid": "{3D80F623-C85C-4741-90D0-E4E66164E6BF}", + "details": { + "name": "Vector2" + } + }, + { + "typeid": "{3D80F623-C85C-4741-90D0-E4E66164E6BF}", + "details": { + "name": "Vector2" + } + } + ], + "results": [ + { + "typeid": "{3D80F623-C85C-4741-90D0-E4E66164E6BF}", + "details": { + "name": "Vector2" + } + } + ] + }, + { + "base": "Distance", + "context": "MathVector2_VM", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Distance" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Distance is invoked" + }, + "details": { + "name": "MathVector2_VM::Distance", + "category": "Other" + }, + "params": [ + { + "typeid": "{3D80F623-C85C-4741-90D0-E4E66164E6BF}", + "details": { + "name": "Vector2" + } + }, + { + "typeid": "{3D80F623-C85C-4741-90D0-E4E66164E6BF}", + "details": { + "name": "Vector2" + } + } + ], + "results": [ + { + "typeid": "{110C4B14-11A8-4E9D-8638-5051013A56AC}", + "details": { + "name": "double" + } + } + ] + }, + { + "base": "FromValues", + "context": "MathVector2_VM", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke FromValues" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after FromValues is invoked" + }, + "details": { + "name": "MathVector2_VM::FromValues", + "category": "Other" + }, + "params": [ + { + "typeid": "{110C4B14-11A8-4E9D-8638-5051013A56AC}", + "details": { + "name": "double" + } + }, + { + "typeid": "{110C4B14-11A8-4E9D-8638-5051013A56AC}", + "details": { + "name": "double" + } + } + ], + "results": [ + { + "typeid": "{3D80F623-C85C-4741-90D0-E4E66164E6BF}", + "details": { + "name": "Vector2" + } + } + ] + }, + { + "base": "Dot", + "context": "MathVector2_VM", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Dot" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Dot is invoked" + }, + "details": { + "name": "MathVector2_VM::Dot", + "category": "Other" + }, + "params": [ + { + "typeid": "{3D80F623-C85C-4741-90D0-E4E66164E6BF}", + "details": { + "name": "Vector2" + } + }, + { + "typeid": "{3D80F623-C85C-4741-90D0-E4E66164E6BF}", + "details": { + "name": "Vector2" + } + } + ], + "results": [ + { + "typeid": "{110C4B14-11A8-4E9D-8638-5051013A56AC}", + "details": { + "name": "double" + } + } + ] + }, + { + "base": "Angle", + "context": "MathVector2_VM", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Angle" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Angle is invoked" + }, + "details": { + "name": "MathVector2_VM::Angle", + "category": "Other" + }, + "params": [ + { + "typeid": "{110C4B14-11A8-4E9D-8638-5051013A56AC}", + "details": { + "name": "double" + } + } + ], + "results": [ + { + "typeid": "{3D80F623-C85C-4741-90D0-E4E66164E6BF}", + "details": { + "name": "Vector2" + } + } + ] + }, + { + "base": "Negate", + "context": "MathVector2_VM", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Negate" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Negate is invoked" + }, + "details": { + "name": "MathVector2_VM::Negate", + "category": "Other" + }, + "params": [ + { + "typeid": "{3D80F623-C85C-4741-90D0-E4E66164E6BF}", + "details": { + "name": "Vector2" + } + } + ], + "results": [ + { + "typeid": "{3D80F623-C85C-4741-90D0-E4E66164E6BF}", + "details": { + "name": "Vector2" + } + } + ] + }, + { + "base": "MultiplyByVector", + "context": "MathVector2_VM", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke MultiplyByVector" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after MultiplyByVector is invoked" + }, + "details": { + "name": "MathVector2_VM::MultiplyByVector", + "category": "Other" + }, + "params": [ + { + "typeid": "{3D80F623-C85C-4741-90D0-E4E66164E6BF}", + "details": { + "name": "Vector2" + } + }, + { + "typeid": "{3D80F623-C85C-4741-90D0-E4E66164E6BF}", + "details": { + "name": "Vector2" + } + } + ], + "results": [ + { + "typeid": "{3D80F623-C85C-4741-90D0-E4E66164E6BF}", + "details": { + "name": "Vector2" + } + } + ] + }, + { + "base": "Add", + "context": "MathVector2_VM", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Add" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Add is invoked" + }, + "details": { + "name": "MathVector2_VM::Add", + "category": "Other" + }, + "params": [ + { + "typeid": "{3D80F623-C85C-4741-90D0-E4E66164E6BF}", + "details": { + "name": "Vector2" + } + }, + { + "typeid": "{3D80F623-C85C-4741-90D0-E4E66164E6BF}", + "details": { + "name": "Vector2" + } + } + ], + "results": [ + { + "typeid": "{3D80F623-C85C-4741-90D0-E4E66164E6BF}", + "details": { + "name": "Vector2" + } + } + ] + }, + { + "base": "Clamp", + "context": "MathVector2_VM", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Clamp" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Clamp is invoked" + }, + "details": { + "name": "MathVector2_VM::Clamp", + "category": "Other" + }, + "params": [ + { + "typeid": "{3D80F623-C85C-4741-90D0-E4E66164E6BF}", + "details": { + "name": "Vector2" + } + }, + { + "typeid": "{3D80F623-C85C-4741-90D0-E4E66164E6BF}", + "details": { + "name": "Vector2" + } + }, + { + "typeid": "{3D80F623-C85C-4741-90D0-E4E66164E6BF}", + "details": { + "name": "Vector2" + } + } + ], + "results": [ + { + "typeid": "{3D80F623-C85C-4741-90D0-E4E66164E6BF}", + "details": { + "name": "Vector2" + } + } + ] + }, + { + "base": "MultiplyByNumber", + "context": "MathVector2_VM", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke MultiplyByNumber" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after MultiplyByNumber is invoked" + }, + "details": { + "name": "MathVector2_VM::MultiplyByNumber", + "category": "Other" + }, + "params": [ + { + "typeid": "{3D80F623-C85C-4741-90D0-E4E66164E6BF}", + "details": { + "name": "Vector2" + } + }, + { + "typeid": "{110C4B14-11A8-4E9D-8638-5051013A56AC}", + "details": { + "name": "double" + } + } + ], + "results": [ + { + "typeid": "{3D80F623-C85C-4741-90D0-E4E66164E6BF}", + "details": { + "name": "Vector2" + } + } + ] + }, + { + "base": "Slerp", + "context": "MathVector2_VM", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Slerp" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Slerp is invoked" + }, + "details": { + "name": "MathVector2_VM::Slerp", + "category": "Other" + }, + "params": [ + { + "typeid": "{3D80F623-C85C-4741-90D0-E4E66164E6BF}", + "details": { + "name": "Vector2" + } + }, + { + "typeid": "{3D80F623-C85C-4741-90D0-E4E66164E6BF}", + "details": { + "name": "Vector2" + } + }, + { + "typeid": "{110C4B14-11A8-4E9D-8638-5051013A56AC}", + "details": { + "name": "double" + } + } + ], + "results": [ + { + "typeid": "{3D80F623-C85C-4741-90D0-E4E66164E6BF}", + "details": { + "name": "Vector2" + } + } + ] + }, + { + "base": "IsZero", + "context": "MathVector2_VM", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke IsZero" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after IsZero is invoked" + }, + "details": { + "name": "MathVector2_VM::IsZero", + "category": "Other" + }, + "params": [ + { + "typeid": "{3D80F623-C85C-4741-90D0-E4E66164E6BF}", + "details": { + "name": "Vector2" + } + }, + { + "typeid": "{110C4B14-11A8-4E9D-8638-5051013A56AC}", + "details": { + "name": "double" + } + } + ], + "results": [ + { + "typeid": "{A0CA880C-AFE4-43CB-926C-59AC48496112}", + "details": { + "name": "bool" + } + } + ] + }, + { + "base": "SetY", + "context": "MathVector2_VM", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke SetY" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after SetY is invoked" + }, + "details": { + "name": "MathVector2_VM::SetY", + "category": "Other" + }, + "params": [ + { + "typeid": "{3D80F623-C85C-4741-90D0-E4E66164E6BF}", + "details": { + "name": "Vector2" + } + }, + { + "typeid": "{110C4B14-11A8-4E9D-8638-5051013A56AC}", + "details": { + "name": "double" + } + } + ], + "results": [ + { + "typeid": "{3D80F623-C85C-4741-90D0-E4E66164E6BF}", + "details": { + "name": "Vector2" + } + } + ] + }, + { + "base": "IsClose", + "context": "MathVector2_VM", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke IsClose" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after IsClose is invoked" + }, + "details": { + "name": "MathVector2_VM::IsClose", + "category": "Other" + }, + "params": [ + { + "typeid": "{3D80F623-C85C-4741-90D0-E4E66164E6BF}", + "details": { + "name": "Vector2" + } + }, + { + "typeid": "{3D80F623-C85C-4741-90D0-E4E66164E6BF}", + "details": { + "name": "Vector2" + } + }, + { + "typeid": "{110C4B14-11A8-4E9D-8638-5051013A56AC}", + "details": { + "name": "double" + } + } + ], + "results": [ + { + "typeid": "{A0CA880C-AFE4-43CB-926C-59AC48496112}", + "details": { + "name": "bool" + } + } + ] + }, + { + "base": "DivideByNumber", + "context": "MathVector2_VM", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke DivideByNumber" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after DivideByNumber is invoked" + }, + "details": { + "name": "MathVector2_VM::DivideByNumber", + "category": "Other" + }, + "params": [ + { + "typeid": "{3D80F623-C85C-4741-90D0-E4E66164E6BF}", + "details": { + "name": "Vector2" + } + }, + { + "typeid": "{110C4B14-11A8-4E9D-8638-5051013A56AC}", + "details": { + "name": "double" + } + } + ], + "results": [ + { + "typeid": "{3D80F623-C85C-4741-90D0-E4E66164E6BF}", + "details": { + "name": "Vector2" + } + } + ] + }, + { + "base": "IsNormalized", + "context": "MathVector2_VM", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke IsNormalized" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after IsNormalized is invoked" + }, + "details": { + "name": "MathVector2_VM::IsNormalized", + "category": "Other" + }, + "params": [ + { + "typeid": "{3D80F623-C85C-4741-90D0-E4E66164E6BF}", + "details": { + "name": "Vector2" + } + }, + { + "typeid": "{110C4B14-11A8-4E9D-8638-5051013A56AC}", + "details": { + "name": "double" + } + } + ], + "results": [ + { + "typeid": "{A0CA880C-AFE4-43CB-926C-59AC48496112}", + "details": { + "name": "bool" + } + } + ] + }, + { + "base": "LengthSquared", + "context": "MathVector2_VM", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke LengthSquared" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after LengthSquared is invoked" + }, + "details": { + "name": "MathVector2_VM::LengthSquared", + "category": "Other" + }, + "params": [ + { + "typeid": "{3D80F623-C85C-4741-90D0-E4E66164E6BF}", + "details": { + "name": "Vector2" + } + } + ], + "results": [ + { + "typeid": "{110C4B14-11A8-4E9D-8638-5051013A56AC}", + "details": { + "name": "double" + } + } + ] + }, + { + "base": "IsFinite", + "context": "MathVector2_VM", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke IsFinite" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after IsFinite is invoked" + }, + "details": { + "name": "MathVector2_VM::IsFinite", + "category": "Other" + }, + "params": [ + { + "typeid": "{3D80F623-C85C-4741-90D0-E4E66164E6BF}", + "details": { + "name": "Vector2" + } + } + ], + "results": [ + { + "typeid": "{A0CA880C-AFE4-43CB-926C-59AC48496112}", + "details": { + "name": "bool" + } + } + ] + }, + { + "base": "ToPerpendicular", + "context": "MathVector2_VM", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke ToPerpendicular" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after ToPerpendicular is invoked" + }, + "details": { + "name": "MathVector2_VM::ToPerpendicular", + "category": "Other" + }, + "params": [ + { + "typeid": "{3D80F623-C85C-4741-90D0-E4E66164E6BF}", + "details": { + "name": "Vector2" + } + } + ], + "results": [ + { + "typeid": "{3D80F623-C85C-4741-90D0-E4E66164E6BF}", + "details": { + "name": "Vector2" + } + } + ] + }, + { + "base": "Normalize", + "context": "MathVector2_VM", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Normalize" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Normalize is invoked" + }, + "details": { + "name": "MathVector2_VM::Normalize", + "category": "Other" + }, + "params": [ + { + "typeid": "{3D80F623-C85C-4741-90D0-E4E66164E6BF}", + "details": { + "name": "Vector2" + } + } + ], + "results": [ + { + "typeid": "{3D80F623-C85C-4741-90D0-E4E66164E6BF}", + "details": { + "name": "Vector2" + } + } + ] + }, + { + "base": "Max", + "context": "MathVector2_VM", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Max" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Max is invoked" + }, + "details": { + "name": "MathVector2_VM::Max", + "category": "Other" + }, + "params": [ + { + "typeid": "{3D80F623-C85C-4741-90D0-E4E66164E6BF}", + "details": { + "name": "Vector2" + } + }, + { + "typeid": "{3D80F623-C85C-4741-90D0-E4E66164E6BF}", + "details": { + "name": "Vector2" + } + } + ], + "results": [ + { + "typeid": "{3D80F623-C85C-4741-90D0-E4E66164E6BF}", + "details": { + "name": "Vector2" + } + } + ] + }, + { + "base": "GetElement", + "context": "MathVector2_VM", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke GetElement" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after GetElement is invoked" + }, + "details": { + "name": "MathVector2_VM::GetElement", + "category": "Other" + }, + "params": [ + { + "typeid": "{3D80F623-C85C-4741-90D0-E4E66164E6BF}", + "details": { + "name": "Vector2" + } + }, + { + "typeid": "{110C4B14-11A8-4E9D-8638-5051013A56AC}", + "details": { + "name": "double" + } + } + ], + "results": [ + { + "typeid": "{110C4B14-11A8-4E9D-8638-5051013A56AC}", + "details": { + "name": "double" + } + } + ] + }, + { + "base": "Absolute", + "context": "MathVector2_VM", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Absolute" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Absolute is invoked" + }, + "details": { + "name": "MathVector2_VM::Absolute", + "category": "Other" + }, + "params": [ + { + "typeid": "{3D80F623-C85C-4741-90D0-E4E66164E6BF}", + "details": { + "name": "Vector2" + } + } + ], + "results": [ + { + "typeid": "{3D80F623-C85C-4741-90D0-E4E66164E6BF}", + "details": { + "name": "Vector2" + } + } + ] + }, + { + "base": "SetX", + "context": "MathVector2_VM", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke SetX" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after SetX is invoked" + }, + "details": { + "name": "MathVector2_VM::SetX", + "category": "Other" + }, + "params": [ + { + "typeid": "{3D80F623-C85C-4741-90D0-E4E66164E6BF}", + "details": { + "name": "Vector2" + } + }, + { + "typeid": "{110C4B14-11A8-4E9D-8638-5051013A56AC}", + "details": { + "name": "double" + } + } + ], + "results": [ + { + "typeid": "{3D80F623-C85C-4741-90D0-E4E66164E6BF}", + "details": { + "name": "Vector2" + } + } + ] + }, + { + "base": "Min", + "context": "MathVector2_VM", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Min" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Min is invoked" + }, + "details": { + "name": "MathVector2_VM::Min", + "category": "Other" + }, + "params": [ + { + "typeid": "{3D80F623-C85C-4741-90D0-E4E66164E6BF}", + "details": { + "name": "Vector2" + } + }, + { + "typeid": "{3D80F623-C85C-4741-90D0-E4E66164E6BF}", + "details": { + "name": "Vector2" + } + } + ], + "results": [ + { + "typeid": "{3D80F623-C85C-4741-90D0-E4E66164E6BF}", + "details": { + "name": "Vector2" + } + } + ] + }, + { + "base": "DivideByVector", + "context": "MathVector2_VM", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke DivideByVector" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after DivideByVector is invoked" + }, + "details": { + "name": "MathVector2_VM::DivideByVector", + "category": "Other" + }, + "params": [ + { + "typeid": "{3D80F623-C85C-4741-90D0-E4E66164E6BF}", + "details": { + "name": "Vector2" + } + }, + { + "typeid": "{3D80F623-C85C-4741-90D0-E4E66164E6BF}", + "details": { + "name": "Vector2" + } + } + ], + "results": [ + { + "typeid": "{3D80F623-C85C-4741-90D0-E4E66164E6BF}", + "details": { + "name": "Vector2" + } + } + ] + }, + { + "base": "DistanceSquared", + "context": "MathVector2_VM", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke DistanceSquared" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after DistanceSquared is invoked" + }, + "details": { + "name": "MathVector2_VM::DistanceSquared", + "category": "Other" + }, + "params": [ + { + "typeid": "{3D80F623-C85C-4741-90D0-E4E66164E6BF}", + "details": { + "name": "Vector2" + } + }, + { + "typeid": "{3D80F623-C85C-4741-90D0-E4E66164E6BF}", + "details": { + "name": "Vector2" + } + } + ], + "results": [ + { + "typeid": "{110C4B14-11A8-4E9D-8638-5051013A56AC}", + "details": { + "name": "double" + } + } + ] + }, + { + "base": "Length", + "context": "MathVector2_VM", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Length" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Length is invoked" + }, + "details": { + "name": "MathVector2_VM::Length", + "category": "Other" + }, + "params": [ + { + "typeid": "{3D80F623-C85C-4741-90D0-E4E66164E6BF}", + "details": { + "name": "Vector2" + } + } + ], + "results": [ + { + "typeid": "{110C4B14-11A8-4E9D-8638-5051013A56AC}", + "details": { + "name": "double" + } + } + ] + }, + { + "base": "Lerp", + "context": "MathVector2_VM", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Lerp" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Lerp is invoked" + }, + "details": { + "name": "MathVector2_VM::Lerp", + "category": "Other" + }, + "params": [ + { + "typeid": "{3D80F623-C85C-4741-90D0-E4E66164E6BF}", + "details": { + "name": "const Vector2&" + } + }, + { + "typeid": "{3D80F623-C85C-4741-90D0-E4E66164E6BF}", + "details": { + "name": "const Vector2&" + } + }, + { + "typeid": "{110C4B14-11A8-4E9D-8638-5051013A56AC}", + "details": { + "name": "double" + } + } + ], + "results": [ + { + "typeid": "{3D80F623-C85C-4741-90D0-E4E66164E6BF}", + "details": { + "name": "Vector2" + } + } + ] + } + ] + } + ] +} \ No newline at end of file diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Classes/MathVector3_VM.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Classes/MathVector3_VM.names new file mode 100644 index 0000000000..445031012f --- /dev/null +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Classes/MathVector3_VM.names @@ -0,0 +1,1332 @@ +{ + "entries": [ + { + "base": "MathVector3_VM", + "context": "BehaviorClass", + "variant": "", + "details": { + "name": "MathVector3_VM" + }, + "methods": [ + { + "base": "Reciprocal", + "context": "MathVector3_VM", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Reciprocal" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Reciprocal is invoked" + }, + "details": { + "name": "MathVector3_VM::Reciprocal", + "category": "Other" + }, + "params": [ + { + "typeid": "{8379EB7D-01FA-4538-B64B-A6543B4BE73D}", + "details": { + "name": "Vector3" + } + } + ], + "results": [ + { + "typeid": "{8379EB7D-01FA-4538-B64B-A6543B4BE73D}", + "details": { + "name": "Vector3" + } + } + ] + }, + { + "base": "Subtract", + "context": "MathVector3_VM", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Subtract" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Subtract is invoked" + }, + "details": { + "name": "MathVector3_VM::Subtract", + "category": "Other" + }, + "params": [ + { + "typeid": "{8379EB7D-01FA-4538-B64B-A6543B4BE73D}", + "details": { + "name": "const Vector3&" + } + }, + { + "typeid": "{8379EB7D-01FA-4538-B64B-A6543B4BE73D}", + "details": { + "name": "const Vector3&" + } + } + ], + "results": [ + { + "typeid": "{8379EB7D-01FA-4538-B64B-A6543B4BE73D}", + "details": { + "name": "Vector3" + } + } + ] + }, + { + "base": "Project", + "context": "MathVector3_VM", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Project" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Project is invoked" + }, + "details": { + "name": "MathVector3_VM::Project", + "category": "Other" + }, + "params": [ + { + "typeid": "{8379EB7D-01FA-4538-B64B-A6543B4BE73D}", + "details": { + "name": "Vector3" + } + }, + { + "typeid": "{8379EB7D-01FA-4538-B64B-A6543B4BE73D}", + "details": { + "name": "Vector3" + } + } + ], + "results": [ + { + "typeid": "{8379EB7D-01FA-4538-B64B-A6543B4BE73D}", + "details": { + "name": "Vector3" + } + } + ] + }, + { + "base": "Normalize", + "context": "MathVector3_VM", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Normalize" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Normalize is invoked" + }, + "details": { + "name": "MathVector3_VM::Normalize", + "category": "Other" + }, + "params": [ + { + "typeid": "{8379EB7D-01FA-4538-B64B-A6543B4BE73D}", + "details": { + "name": "Vector3" + } + } + ], + "results": [ + { + "typeid": "{8379EB7D-01FA-4538-B64B-A6543B4BE73D}", + "details": { + "name": "Vector3" + } + } + ] + }, + { + "base": "Distance", + "context": "MathVector3_VM", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Distance" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Distance is invoked" + }, + "details": { + "name": "MathVector3_VM::Distance", + "category": "Other" + }, + "params": [ + { + "typeid": "{8379EB7D-01FA-4538-B64B-A6543B4BE73D}", + "details": { + "name": "Vector3" + } + }, + { + "typeid": "{8379EB7D-01FA-4538-B64B-A6543B4BE73D}", + "details": { + "name": "Vector3" + } + } + ], + "results": [ + { + "typeid": "{110C4B14-11A8-4E9D-8638-5051013A56AC}", + "details": { + "name": "double" + } + } + ] + }, + { + "base": "SetZ", + "context": "MathVector3_VM", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke SetZ" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after SetZ is invoked" + }, + "details": { + "name": "MathVector3_VM::SetZ", + "category": "Other" + }, + "params": [ + { + "typeid": "{8379EB7D-01FA-4538-B64B-A6543B4BE73D}", + "details": { + "name": "Vector3" + } + }, + { + "typeid": "{110C4B14-11A8-4E9D-8638-5051013A56AC}", + "details": { + "name": "double" + } + } + ], + "results": [ + { + "typeid": "{8379EB7D-01FA-4538-B64B-A6543B4BE73D}", + "details": { + "name": "Vector3" + } + } + ] + }, + { + "base": "Max", + "context": "MathVector3_VM", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Max" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Max is invoked" + }, + "details": { + "name": "MathVector3_VM::Max", + "category": "Other" + }, + "params": [ + { + "typeid": "{8379EB7D-01FA-4538-B64B-A6543B4BE73D}", + "details": { + "name": "Vector3" + } + }, + { + "typeid": "{8379EB7D-01FA-4538-B64B-A6543B4BE73D}", + "details": { + "name": "Vector3" + } + } + ], + "results": [ + { + "typeid": "{8379EB7D-01FA-4538-B64B-A6543B4BE73D}", + "details": { + "name": "Vector3" + } + } + ] + }, + { + "base": "GetElement", + "context": "MathVector3_VM", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke GetElement" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after GetElement is invoked" + }, + "details": { + "name": "MathVector3_VM::GetElement", + "category": "Other" + }, + "params": [ + { + "typeid": "{8379EB7D-01FA-4538-B64B-A6543B4BE73D}", + "details": { + "name": "Vector3" + } + }, + { + "typeid": "{110C4B14-11A8-4E9D-8638-5051013A56AC}", + "details": { + "name": "double" + } + } + ], + "results": [ + { + "typeid": "{110C4B14-11A8-4E9D-8638-5051013A56AC}", + "details": { + "name": "double" + } + } + ] + }, + { + "base": "Absolute", + "context": "MathVector3_VM", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Absolute" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Absolute is invoked" + }, + "details": { + "name": "MathVector3_VM::Absolute", + "category": "Other" + }, + "params": [ + { + "typeid": "{8379EB7D-01FA-4538-B64B-A6543B4BE73D}", + "details": { + "name": "Vector3" + } + } + ], + "results": [ + { + "typeid": "{8379EB7D-01FA-4538-B64B-A6543B4BE73D}", + "details": { + "name": "Vector3" + } + } + ] + }, + { + "base": "BuildTangentBasis", + "context": "MathVector3_VM", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke BuildTangentBasis" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after BuildTangentBasis is invoked" + }, + "details": { + "name": "MathVector3_VM::BuildTangentBasis", + "category": "Other" + }, + "params": [ + { + "typeid": "{8379EB7D-01FA-4538-B64B-A6543B4BE73D}", + "details": { + "name": "Vector3" + } + } + ], + "results": [ + { + "typeid": "{1F24C807-BE2F-54C7-8F2B-498727236DF5}", + "details": { + "name": "tuple" + } + } + ] + }, + { + "base": "Clamp", + "context": "MathVector3_VM", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Clamp" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Clamp is invoked" + }, + "details": { + "name": "MathVector3_VM::Clamp", + "category": "Other" + }, + "params": [ + { + "typeid": "{8379EB7D-01FA-4538-B64B-A6543B4BE73D}", + "details": { + "name": "Vector3" + } + }, + { + "typeid": "{8379EB7D-01FA-4538-B64B-A6543B4BE73D}", + "details": { + "name": "Vector3" + } + }, + { + "typeid": "{8379EB7D-01FA-4538-B64B-A6543B4BE73D}", + "details": { + "name": "Vector3" + } + } + ], + "results": [ + { + "typeid": "{8379EB7D-01FA-4538-B64B-A6543B4BE73D}", + "details": { + "name": "Vector3" + } + } + ] + }, + { + "base": "MultiplyByNumber", + "context": "MathVector3_VM", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke MultiplyByNumber" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after MultiplyByNumber is invoked" + }, + "details": { + "name": "MathVector3_VM::MultiplyByNumber", + "category": "Other" + }, + "params": [ + { + "typeid": "{8379EB7D-01FA-4538-B64B-A6543B4BE73D}", + "details": { + "name": "Vector3" + } + }, + { + "typeid": "{110C4B14-11A8-4E9D-8638-5051013A56AC}", + "details": { + "name": "double" + } + } + ], + "results": [ + { + "typeid": "{8379EB7D-01FA-4538-B64B-A6543B4BE73D}", + "details": { + "name": "Vector3" + } + } + ] + }, + { + "base": "Slerp", + "context": "MathVector3_VM", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Slerp" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Slerp is invoked" + }, + "details": { + "name": "MathVector3_VM::Slerp", + "category": "Other" + }, + "params": [ + { + "typeid": "{8379EB7D-01FA-4538-B64B-A6543B4BE73D}", + "details": { + "name": "Vector3" + } + }, + { + "typeid": "{8379EB7D-01FA-4538-B64B-A6543B4BE73D}", + "details": { + "name": "Vector3" + } + }, + { + "typeid": "{110C4B14-11A8-4E9D-8638-5051013A56AC}", + "details": { + "name": "double" + } + } + ], + "results": [ + { + "typeid": "{8379EB7D-01FA-4538-B64B-A6543B4BE73D}", + "details": { + "name": "Vector3" + } + } + ] + }, + { + "base": "IsZero", + "context": "MathVector3_VM", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke IsZero" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after IsZero is invoked" + }, + "details": { + "name": "MathVector3_VM::IsZero", + "category": "Other" + }, + "params": [ + { + "typeid": "{8379EB7D-01FA-4538-B64B-A6543B4BE73D}", + "details": { + "name": "Vector3" + } + }, + { + "typeid": "{110C4B14-11A8-4E9D-8638-5051013A56AC}", + "details": { + "name": "double" + } + } + ], + "results": [ + { + "typeid": "{A0CA880C-AFE4-43CB-926C-59AC48496112}", + "details": { + "name": "bool" + } + } + ] + }, + { + "base": "SetY", + "context": "MathVector3_VM", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke SetY" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after SetY is invoked" + }, + "details": { + "name": "MathVector3_VM::SetY", + "category": "Other" + }, + "params": [ + { + "typeid": "{8379EB7D-01FA-4538-B64B-A6543B4BE73D}", + "details": { + "name": "Vector3" + } + }, + { + "typeid": "{110C4B14-11A8-4E9D-8638-5051013A56AC}", + "details": { + "name": "double" + } + } + ], + "results": [ + { + "typeid": "{8379EB7D-01FA-4538-B64B-A6543B4BE73D}", + "details": { + "name": "Vector3" + } + } + ] + }, + { + "base": "IsClose", + "context": "MathVector3_VM", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke IsClose" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after IsClose is invoked" + }, + "details": { + "name": "MathVector3_VM::IsClose", + "category": "Other" + }, + "params": [ + { + "typeid": "{8379EB7D-01FA-4538-B64B-A6543B4BE73D}", + "details": { + "name": "Vector3" + } + }, + { + "typeid": "{8379EB7D-01FA-4538-B64B-A6543B4BE73D}", + "details": { + "name": "Vector3" + } + }, + { + "typeid": "{110C4B14-11A8-4E9D-8638-5051013A56AC}", + "details": { + "name": "double" + } + } + ], + "results": [ + { + "typeid": "{A0CA880C-AFE4-43CB-926C-59AC48496112}", + "details": { + "name": "bool" + } + } + ] + }, + { + "base": "Cross", + "context": "MathVector3_VM", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Cross" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Cross is invoked" + }, + "details": { + "name": "MathVector3_VM::Cross", + "category": "Other" + }, + "params": [ + { + "typeid": "{8379EB7D-01FA-4538-B64B-A6543B4BE73D}", + "details": { + "name": "Vector3" + } + }, + { + "typeid": "{8379EB7D-01FA-4538-B64B-A6543B4BE73D}", + "details": { + "name": "Vector3" + } + } + ], + "results": [ + { + "typeid": "{8379EB7D-01FA-4538-B64B-A6543B4BE73D}", + "details": { + "name": "Vector3" + } + } + ] + }, + { + "base": "DirectionTo", + "context": "MathVector3_VM", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke DirectionTo" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after DirectionTo is invoked" + }, + "details": { + "name": "MathVector3_VM::DirectionTo", + "category": "Other" + }, + "params": [ + { + "typeid": "{8379EB7D-01FA-4538-B64B-A6543B4BE73D}", + "details": { + "name": "Vector3" + } + }, + { + "typeid": "{8379EB7D-01FA-4538-B64B-A6543B4BE73D}", + "details": { + "name": "Vector3" + } + }, + { + "typeid": "{110C4B14-11A8-4E9D-8638-5051013A56AC}", + "details": { + "name": "double" + } + } + ], + "results": [ + { + "typeid": "{CD6328B1-6CC4-54CE-97F4-9D91F5A242F4}", + "details": { + "name": "tuple" + } + } + ] + }, + { + "base": "MultiplyByVector", + "context": "MathVector3_VM", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke MultiplyByVector" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after MultiplyByVector is invoked" + }, + "details": { + "name": "MathVector3_VM::MultiplyByVector", + "category": "Other" + }, + "params": [ + { + "typeid": "{8379EB7D-01FA-4538-B64B-A6543B4BE73D}", + "details": { + "name": "Vector3" + } + }, + { + "typeid": "{8379EB7D-01FA-4538-B64B-A6543B4BE73D}", + "details": { + "name": "Vector3" + } + } + ], + "results": [ + { + "typeid": "{8379EB7D-01FA-4538-B64B-A6543B4BE73D}", + "details": { + "name": "Vector3" + } + } + ] + }, + { + "base": "Negate", + "context": "MathVector3_VM", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Negate" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Negate is invoked" + }, + "details": { + "name": "MathVector3_VM::Negate", + "category": "Other" + }, + "params": [ + { + "typeid": "{8379EB7D-01FA-4538-B64B-A6543B4BE73D}", + "details": { + "name": "Vector3" + } + } + ], + "results": [ + { + "typeid": "{8379EB7D-01FA-4538-B64B-A6543B4BE73D}", + "details": { + "name": "Vector3" + } + } + ] + }, + { + "base": "Add", + "context": "MathVector3_VM", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Add" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Add is invoked" + }, + "details": { + "name": "MathVector3_VM::Add", + "category": "Other" + }, + "params": [ + { + "typeid": "{8379EB7D-01FA-4538-B64B-A6543B4BE73D}", + "details": { + "name": "Vector3" + } + }, + { + "typeid": "{8379EB7D-01FA-4538-B64B-A6543B4BE73D}", + "details": { + "name": "Vector3" + } + } + ], + "results": [ + { + "typeid": "{8379EB7D-01FA-4538-B64B-A6543B4BE73D}", + "details": { + "name": "Vector3" + } + } + ] + }, + { + "base": "IsPerpendicular", + "context": "MathVector3_VM", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke IsPerpendicular" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after IsPerpendicular is invoked" + }, + "details": { + "name": "MathVector3_VM::IsPerpendicular", + "category": "Other" + }, + "params": [ + { + "typeid": "{8379EB7D-01FA-4538-B64B-A6543B4BE73D}", + "details": { + "name": "Vector3" + } + }, + { + "typeid": "{8379EB7D-01FA-4538-B64B-A6543B4BE73D}", + "details": { + "name": "Vector3" + } + }, + { + "typeid": "{110C4B14-11A8-4E9D-8638-5051013A56AC}", + "details": { + "name": "double" + } + } + ], + "results": [ + { + "typeid": "{A0CA880C-AFE4-43CB-926C-59AC48496112}", + "details": { + "name": "bool" + } + } + ] + }, + { + "base": "IsFinite", + "context": "MathVector3_VM", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke IsFinite" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after IsFinite is invoked" + }, + "details": { + "name": "MathVector3_VM::IsFinite", + "category": "Other" + }, + "params": [ + { + "typeid": "{8379EB7D-01FA-4538-B64B-A6543B4BE73D}", + "details": { + "name": "Vector3" + } + } + ], + "results": [ + { + "typeid": "{A0CA880C-AFE4-43CB-926C-59AC48496112}", + "details": { + "name": "bool" + } + } + ] + }, + { + "base": "DivideByNumber", + "context": "MathVector3_VM", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke DivideByNumber" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after DivideByNumber is invoked" + }, + "details": { + "name": "MathVector3_VM::DivideByNumber", + "category": "Other" + }, + "params": [ + { + "typeid": "{8379EB7D-01FA-4538-B64B-A6543B4BE73D}", + "details": { + "name": "Vector3" + } + }, + { + "typeid": "{110C4B14-11A8-4E9D-8638-5051013A56AC}", + "details": { + "name": "double" + } + } + ], + "results": [ + { + "typeid": "{8379EB7D-01FA-4538-B64B-A6543B4BE73D}", + "details": { + "name": "Vector3" + } + } + ] + }, + { + "base": "IsNormalized", + "context": "MathVector3_VM", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke IsNormalized" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after IsNormalized is invoked" + }, + "details": { + "name": "MathVector3_VM::IsNormalized", + "category": "Other" + }, + "params": [ + { + "typeid": "{8379EB7D-01FA-4538-B64B-A6543B4BE73D}", + "details": { + "name": "Vector3" + } + }, + { + "typeid": "{110C4B14-11A8-4E9D-8638-5051013A56AC}", + "details": { + "name": "double" + } + } + ], + "results": [ + { + "typeid": "{A0CA880C-AFE4-43CB-926C-59AC48496112}", + "details": { + "name": "bool" + } + } + ] + }, + { + "base": "LengthSquared", + "context": "MathVector3_VM", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke LengthSquared" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after LengthSquared is invoked" + }, + "details": { + "name": "MathVector3_VM::LengthSquared", + "category": "Other" + }, + "params": [ + { + "typeid": "{8379EB7D-01FA-4538-B64B-A6543B4BE73D}", + "details": { + "name": "Vector3" + } + } + ], + "results": [ + { + "typeid": "{110C4B14-11A8-4E9D-8638-5051013A56AC}", + "details": { + "name": "double" + } + } + ] + }, + { + "base": "FromValues", + "context": "MathVector3_VM", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke FromValues" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after FromValues is invoked" + }, + "details": { + "name": "MathVector3_VM::FromValues", + "category": "Other" + }, + "params": [ + { + "typeid": "{110C4B14-11A8-4E9D-8638-5051013A56AC}", + "details": { + "name": "double" + } + }, + { + "typeid": "{110C4B14-11A8-4E9D-8638-5051013A56AC}", + "details": { + "name": "double" + } + }, + { + "typeid": "{110C4B14-11A8-4E9D-8638-5051013A56AC}", + "details": { + "name": "double" + } + } + ], + "results": [ + { + "typeid": "{8379EB7D-01FA-4538-B64B-A6543B4BE73D}", + "details": { + "name": "Vector3" + } + } + ] + }, + { + "base": "Dot", + "context": "MathVector3_VM", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Dot" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Dot is invoked" + }, + "details": { + "name": "MathVector3_VM::Dot", + "category": "Other" + }, + "params": [ + { + "typeid": "{8379EB7D-01FA-4538-B64B-A6543B4BE73D}", + "details": { + "name": "Vector3" + } + }, + { + "typeid": "{8379EB7D-01FA-4538-B64B-A6543B4BE73D}", + "details": { + "name": "Vector3" + } + } + ], + "results": [ + { + "typeid": "{110C4B14-11A8-4E9D-8638-5051013A56AC}", + "details": { + "name": "double" + } + } + ] + }, + { + "base": "SetX", + "context": "MathVector3_VM", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke SetX" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after SetX is invoked" + }, + "details": { + "name": "MathVector3_VM::SetX", + "category": "Other" + }, + "params": [ + { + "typeid": "{8379EB7D-01FA-4538-B64B-A6543B4BE73D}", + "details": { + "name": "Vector3" + } + }, + { + "typeid": "{110C4B14-11A8-4E9D-8638-5051013A56AC}", + "details": { + "name": "double" + } + } + ], + "results": [ + { + "typeid": "{8379EB7D-01FA-4538-B64B-A6543B4BE73D}", + "details": { + "name": "Vector3" + } + } + ] + }, + { + "base": "LengthReciprocal", + "context": "MathVector3_VM", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke LengthReciprocal" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after LengthReciprocal is invoked" + }, + "details": { + "name": "MathVector3_VM::LengthReciprocal", + "category": "Other" + }, + "params": [ + { + "typeid": "{8379EB7D-01FA-4538-B64B-A6543B4BE73D}", + "details": { + "name": "Vector3" + } + } + ], + "results": [ + { + "typeid": "{110C4B14-11A8-4E9D-8638-5051013A56AC}", + "details": { + "name": "double" + } + } + ] + }, + { + "base": "Min", + "context": "MathVector3_VM", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Min" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Min is invoked" + }, + "details": { + "name": "MathVector3_VM::Min", + "category": "Other" + }, + "params": [ + { + "typeid": "{8379EB7D-01FA-4538-B64B-A6543B4BE73D}", + "details": { + "name": "Vector3" + } + }, + { + "typeid": "{8379EB7D-01FA-4538-B64B-A6543B4BE73D}", + "details": { + "name": "Vector3" + } + } + ], + "results": [ + { + "typeid": "{8379EB7D-01FA-4538-B64B-A6543B4BE73D}", + "details": { + "name": "Vector3" + } + } + ] + }, + { + "base": "DistanceSquared", + "context": "MathVector3_VM", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke DistanceSquared" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after DistanceSquared is invoked" + }, + "details": { + "name": "MathVector3_VM::DistanceSquared", + "category": "Other" + }, + "params": [ + { + "typeid": "{8379EB7D-01FA-4538-B64B-A6543B4BE73D}", + "details": { + "name": "Vector3" + } + }, + { + "typeid": "{8379EB7D-01FA-4538-B64B-A6543B4BE73D}", + "details": { + "name": "Vector3" + } + } + ], + "results": [ + { + "typeid": "{110C4B14-11A8-4E9D-8638-5051013A56AC}", + "details": { + "name": "double" + } + } + ] + }, + { + "base": "Length", + "context": "MathVector3_VM", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Length" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Length is invoked" + }, + "details": { + "name": "MathVector3_VM::Length", + "category": "Other" + }, + "params": [ + { + "typeid": "{8379EB7D-01FA-4538-B64B-A6543B4BE73D}", + "details": { + "name": "Vector3" + } + } + ], + "results": [ + { + "typeid": "{110C4B14-11A8-4E9D-8638-5051013A56AC}", + "details": { + "name": "double" + } + } + ] + }, + { + "base": "DivideByVector", + "context": "MathVector3_VM", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke DivideByVector" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after DivideByVector is invoked" + }, + "details": { + "name": "MathVector3_VM::DivideByVector", + "category": "Other" + }, + "params": [ + { + "typeid": "{8379EB7D-01FA-4538-B64B-A6543B4BE73D}", + "details": { + "name": "Vector3" + } + }, + { + "typeid": "{8379EB7D-01FA-4538-B64B-A6543B4BE73D}", + "details": { + "name": "Vector3" + } + } + ], + "results": [ + { + "typeid": "{8379EB7D-01FA-4538-B64B-A6543B4BE73D}", + "details": { + "name": "Vector3" + } + } + ] + }, + { + "base": "Lerp", + "context": "MathVector3_VM", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Lerp" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Lerp is invoked" + }, + "details": { + "name": "MathVector3_VM::Lerp", + "category": "Other" + }, + "params": [ + { + "typeid": "{8379EB7D-01FA-4538-B64B-A6543B4BE73D}", + "details": { + "name": "const Vector3&" + } + }, + { + "typeid": "{8379EB7D-01FA-4538-B64B-A6543B4BE73D}", + "details": { + "name": "const Vector3&" + } + }, + { + "typeid": "{110C4B14-11A8-4E9D-8638-5051013A56AC}", + "details": { + "name": "double" + } + } + ], + "results": [ + { + "typeid": "{8379EB7D-01FA-4538-B64B-A6543B4BE73D}", + "details": { + "name": "Vector3" + } + } + ] + } + ] + } + ] +} \ No newline at end of file diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Classes/MathVector4_VM.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Classes/MathVector4_VM.names new file mode 100644 index 0000000000..5caadf4728 --- /dev/null +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Classes/MathVector4_VM.names @@ -0,0 +1,940 @@ +{ + "entries": [ + { + "base": "MathVector4_VM", + "context": "BehaviorClass", + "variant": "", + "details": { + "name": "MathVector4_VM" + }, + "methods": [ + { + "base": "SetW", + "context": "MathVector4_VM", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke SetW" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after SetW is invoked" + }, + "details": { + "name": "MathVector4_VM::SetW", + "category": "Other" + }, + "params": [ + { + "typeid": "{0CE9FA36-1E3A-4C06-9254-B7C73A732053}", + "details": { + "name": "Vector4" + } + }, + { + "typeid": "{110C4B14-11A8-4E9D-8638-5051013A56AC}", + "details": { + "name": "double" + } + } + ], + "results": [ + { + "typeid": "{0CE9FA36-1E3A-4C06-9254-B7C73A732053}", + "details": { + "name": "Vector4" + } + } + ] + }, + { + "base": "SetX", + "context": "MathVector4_VM", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke SetX" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after SetX is invoked" + }, + "details": { + "name": "MathVector4_VM::SetX", + "category": "Other" + }, + "params": [ + { + "typeid": "{0CE9FA36-1E3A-4C06-9254-B7C73A732053}", + "details": { + "name": "Vector4" + } + }, + { + "typeid": "{110C4B14-11A8-4E9D-8638-5051013A56AC}", + "details": { + "name": "double" + } + } + ], + "results": [ + { + "typeid": "{0CE9FA36-1E3A-4C06-9254-B7C73A732053}", + "details": { + "name": "Vector4" + } + } + ] + }, + { + "base": "IsNormalized", + "context": "MathVector4_VM", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke IsNormalized" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after IsNormalized is invoked" + }, + "details": { + "name": "MathVector4_VM::IsNormalized", + "category": "Other" + }, + "params": [ + { + "typeid": "{0CE9FA36-1E3A-4C06-9254-B7C73A732053}", + "details": { + "name": "Vector4" + } + }, + { + "typeid": "{110C4B14-11A8-4E9D-8638-5051013A56AC}", + "details": { + "name": "double" + } + } + ], + "results": [ + { + "typeid": "{A0CA880C-AFE4-43CB-926C-59AC48496112}", + "details": { + "name": "bool" + } + } + ] + }, + { + "base": "LengthSquared", + "context": "MathVector4_VM", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke LengthSquared" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after LengthSquared is invoked" + }, + "details": { + "name": "MathVector4_VM::LengthSquared", + "category": "Other" + }, + "params": [ + { + "typeid": "{0CE9FA36-1E3A-4C06-9254-B7C73A732053}", + "details": { + "name": "Vector4" + } + } + ], + "results": [ + { + "typeid": "{110C4B14-11A8-4E9D-8638-5051013A56AC}", + "details": { + "name": "double" + } + } + ] + }, + { + "base": "MultiplyByNumber", + "context": "MathVector4_VM", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke MultiplyByNumber" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after MultiplyByNumber is invoked" + }, + "details": { + "name": "MathVector4_VM::MultiplyByNumber", + "category": "Other" + }, + "params": [ + { + "typeid": "{0CE9FA36-1E3A-4C06-9254-B7C73A732053}", + "details": { + "name": "Vector4" + } + }, + { + "typeid": "{110C4B14-11A8-4E9D-8638-5051013A56AC}", + "details": { + "name": "double" + } + } + ], + "results": [ + { + "typeid": "{0CE9FA36-1E3A-4C06-9254-B7C73A732053}", + "details": { + "name": "Vector4" + } + } + ] + }, + { + "base": "Negate", + "context": "MathVector4_VM", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Negate" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Negate is invoked" + }, + "details": { + "name": "MathVector4_VM::Negate", + "category": "Other" + }, + "params": [ + { + "typeid": "{0CE9FA36-1E3A-4C06-9254-B7C73A732053}", + "details": { + "name": "Vector4" + } + } + ], + "results": [ + { + "typeid": "{0CE9FA36-1E3A-4C06-9254-B7C73A732053}", + "details": { + "name": "Vector4" + } + } + ] + }, + { + "base": "Dot", + "context": "MathVector4_VM", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Dot" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Dot is invoked" + }, + "details": { + "name": "MathVector4_VM::Dot", + "category": "Other" + }, + "params": [ + { + "typeid": "{0CE9FA36-1E3A-4C06-9254-B7C73A732053}", + "details": { + "name": "Vector4" + } + }, + { + "typeid": "{0CE9FA36-1E3A-4C06-9254-B7C73A732053}", + "details": { + "name": "Vector4" + } + } + ], + "results": [ + { + "typeid": "{110C4B14-11A8-4E9D-8638-5051013A56AC}", + "details": { + "name": "double" + } + } + ] + }, + { + "base": "FromValues", + "context": "MathVector4_VM", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke FromValues" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after FromValues is invoked" + }, + "details": { + "name": "MathVector4_VM::FromValues", + "category": "Other" + }, + "params": [ + { + "typeid": "{110C4B14-11A8-4E9D-8638-5051013A56AC}", + "details": { + "name": "double" + } + }, + { + "typeid": "{110C4B14-11A8-4E9D-8638-5051013A56AC}", + "details": { + "name": "double" + } + }, + { + "typeid": "{110C4B14-11A8-4E9D-8638-5051013A56AC}", + "details": { + "name": "double" + } + }, + { + "typeid": "{110C4B14-11A8-4E9D-8638-5051013A56AC}", + "details": { + "name": "double" + } + } + ], + "results": [ + { + "typeid": "{0CE9FA36-1E3A-4C06-9254-B7C73A732053}", + "details": { + "name": "Vector4" + } + } + ] + }, + { + "base": "IsFinite", + "context": "MathVector4_VM", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke IsFinite" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after IsFinite is invoked" + }, + "details": { + "name": "MathVector4_VM::IsFinite", + "category": "Other" + }, + "params": [ + { + "typeid": "{0CE9FA36-1E3A-4C06-9254-B7C73A732053}", + "details": { + "name": "Vector4" + } + } + ], + "results": [ + { + "typeid": "{A0CA880C-AFE4-43CB-926C-59AC48496112}", + "details": { + "name": "bool" + } + } + ] + }, + { + "base": "Length", + "context": "MathVector4_VM", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Length" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Length is invoked" + }, + "details": { + "name": "MathVector4_VM::Length", + "category": "Other" + }, + "params": [ + { + "typeid": "{0CE9FA36-1E3A-4C06-9254-B7C73A732053}", + "details": { + "name": "Vector4" + } + } + ], + "results": [ + { + "typeid": "{110C4B14-11A8-4E9D-8638-5051013A56AC}", + "details": { + "name": "double" + } + } + ] + }, + { + "base": "MultiplyByVector", + "context": "MathVector4_VM", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke MultiplyByVector" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after MultiplyByVector is invoked" + }, + "details": { + "name": "MathVector4_VM::MultiplyByVector", + "category": "Other" + }, + "params": [ + { + "typeid": "{0CE9FA36-1E3A-4C06-9254-B7C73A732053}", + "details": { + "name": "Vector4" + } + }, + { + "typeid": "{0CE9FA36-1E3A-4C06-9254-B7C73A732053}", + "details": { + "name": "Vector4" + } + } + ], + "results": [ + { + "typeid": "{0CE9FA36-1E3A-4C06-9254-B7C73A732053}", + "details": { + "name": "Vector4" + } + } + ] + }, + { + "base": "DirectionTo", + "context": "MathVector4_VM", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke DirectionTo" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after DirectionTo is invoked" + }, + "details": { + "name": "MathVector4_VM::DirectionTo", + "category": "Other" + }, + "params": [ + { + "typeid": "{0CE9FA36-1E3A-4C06-9254-B7C73A732053}", + "details": { + "name": "Vector4" + } + }, + { + "typeid": "{0CE9FA36-1E3A-4C06-9254-B7C73A732053}", + "details": { + "name": "Vector4" + } + }, + { + "typeid": "{110C4B14-11A8-4E9D-8638-5051013A56AC}", + "details": { + "name": "double" + } + } + ], + "results": [ + { + "typeid": "{F31AA4C4-5A73-510B-BFD3-20ACE0D9CE67}", + "details": { + "name": "tuple" + } + } + ] + }, + { + "base": "DivideByVector", + "context": "MathVector4_VM", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke DivideByVector" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after DivideByVector is invoked" + }, + "details": { + "name": "MathVector4_VM::DivideByVector", + "category": "Other" + }, + "params": [ + { + "typeid": "{0CE9FA36-1E3A-4C06-9254-B7C73A732053}", + "details": { + "name": "Vector4" + } + }, + { + "typeid": "{0CE9FA36-1E3A-4C06-9254-B7C73A732053}", + "details": { + "name": "Vector4" + } + } + ], + "results": [ + { + "typeid": "{0CE9FA36-1E3A-4C06-9254-B7C73A732053}", + "details": { + "name": "Vector4" + } + } + ] + }, + { + "base": "LengthReciprocal", + "context": "MathVector4_VM", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke LengthReciprocal" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after LengthReciprocal is invoked" + }, + "details": { + "name": "MathVector4_VM::LengthReciprocal", + "category": "Other" + }, + "params": [ + { + "typeid": "{0CE9FA36-1E3A-4C06-9254-B7C73A732053}", + "details": { + "name": "Vector4" + } + } + ], + "results": [ + { + "typeid": "{110C4B14-11A8-4E9D-8638-5051013A56AC}", + "details": { + "name": "double" + } + } + ] + }, + { + "base": "SetZ", + "context": "MathVector4_VM", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke SetZ" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after SetZ is invoked" + }, + "details": { + "name": "MathVector4_VM::SetZ", + "category": "Other" + }, + "params": [ + { + "typeid": "{0CE9FA36-1E3A-4C06-9254-B7C73A732053}", + "details": { + "name": "Vector4" + } + }, + { + "typeid": "{110C4B14-11A8-4E9D-8638-5051013A56AC}", + "details": { + "name": "double" + } + } + ], + "results": [ + { + "typeid": "{0CE9FA36-1E3A-4C06-9254-B7C73A732053}", + "details": { + "name": "Vector4" + } + } + ] + }, + { + "base": "Normalize", + "context": "MathVector4_VM", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Normalize" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Normalize is invoked" + }, + "details": { + "name": "MathVector4_VM::Normalize", + "category": "Other" + }, + "params": [ + { + "typeid": "{0CE9FA36-1E3A-4C06-9254-B7C73A732053}", + "details": { + "name": "Vector4" + } + } + ], + "results": [ + { + "typeid": "{0CE9FA36-1E3A-4C06-9254-B7C73A732053}", + "details": { + "name": "Vector4" + } + } + ] + }, + { + "base": "DivideByNumber", + "context": "MathVector4_VM", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke DivideByNumber" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after DivideByNumber is invoked" + }, + "details": { + "name": "MathVector4_VM::DivideByNumber", + "category": "Other" + }, + "params": [ + { + "typeid": "{0CE9FA36-1E3A-4C06-9254-B7C73A732053}", + "details": { + "name": "Vector4" + } + }, + { + "typeid": "{110C4B14-11A8-4E9D-8638-5051013A56AC}", + "details": { + "name": "double" + } + } + ], + "results": [ + { + "typeid": "{0CE9FA36-1E3A-4C06-9254-B7C73A732053}", + "details": { + "name": "Vector4" + } + } + ] + }, + { + "base": "IsClose", + "context": "MathVector4_VM", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke IsClose" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after IsClose is invoked" + }, + "details": { + "name": "MathVector4_VM::IsClose", + "category": "Other" + }, + "params": [ + { + "typeid": "{0CE9FA36-1E3A-4C06-9254-B7C73A732053}", + "details": { + "name": "Vector4" + } + }, + { + "typeid": "{0CE9FA36-1E3A-4C06-9254-B7C73A732053}", + "details": { + "name": "Vector4" + } + }, + { + "typeid": "{110C4B14-11A8-4E9D-8638-5051013A56AC}", + "details": { + "name": "double" + } + } + ], + "results": [ + { + "typeid": "{A0CA880C-AFE4-43CB-926C-59AC48496112}", + "details": { + "name": "bool" + } + } + ] + }, + { + "base": "IsZero", + "context": "MathVector4_VM", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke IsZero" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after IsZero is invoked" + }, + "details": { + "name": "MathVector4_VM::IsZero", + "category": "Other" + }, + "params": [ + { + "typeid": "{0CE9FA36-1E3A-4C06-9254-B7C73A732053}", + "details": { + "name": "Vector4" + } + }, + { + "typeid": "{110C4B14-11A8-4E9D-8638-5051013A56AC}", + "details": { + "name": "double" + } + } + ], + "results": [ + { + "typeid": "{A0CA880C-AFE4-43CB-926C-59AC48496112}", + "details": { + "name": "bool" + } + } + ] + }, + { + "base": "Add", + "context": "MathVector4_VM", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Add" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Add is invoked" + }, + "details": { + "name": "MathVector4_VM::Add", + "category": "Other" + }, + "params": [ + { + "typeid": "{0CE9FA36-1E3A-4C06-9254-B7C73A732053}", + "details": { + "name": "Vector4" + } + }, + { + "typeid": "{0CE9FA36-1E3A-4C06-9254-B7C73A732053}", + "details": { + "name": "Vector4" + } + } + ], + "results": [ + { + "typeid": "{0CE9FA36-1E3A-4C06-9254-B7C73A732053}", + "details": { + "name": "Vector4" + } + } + ] + }, + { + "base": "GetElement", + "context": "MathVector4_VM", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke GetElement" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after GetElement is invoked" + }, + "details": { + "name": "MathVector4_VM::GetElement", + "category": "Other" + }, + "params": [ + { + "typeid": "{0CE9FA36-1E3A-4C06-9254-B7C73A732053}", + "details": { + "name": "Vector4" + } + }, + { + "typeid": "{110C4B14-11A8-4E9D-8638-5051013A56AC}", + "details": { + "name": "double" + } + } + ], + "results": [ + { + "typeid": "{110C4B14-11A8-4E9D-8638-5051013A56AC}", + "details": { + "name": "double" + } + } + ] + }, + { + "base": "Reciprocal", + "context": "MathVector4_VM", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Reciprocal" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Reciprocal is invoked" + }, + "details": { + "name": "MathVector4_VM::Reciprocal", + "category": "Other" + }, + "params": [ + { + "typeid": "{0CE9FA36-1E3A-4C06-9254-B7C73A732053}", + "details": { + "name": "Vector4" + } + } + ], + "results": [ + { + "typeid": "{0CE9FA36-1E3A-4C06-9254-B7C73A732053}", + "details": { + "name": "Vector4" + } + } + ] + }, + { + "base": "Subtract", + "context": "MathVector4_VM", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Subtract" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Subtract is invoked" + }, + "details": { + "name": "MathVector4_VM::Subtract", + "category": "Other" + }, + "params": [ + { + "typeid": "{0CE9FA36-1E3A-4C06-9254-B7C73A732053}", + "details": { + "name": "const Vector4&" + } + }, + { + "typeid": "{0CE9FA36-1E3A-4C06-9254-B7C73A732053}", + "details": { + "name": "const Vector4&" + } + } + ], + "results": [ + { + "typeid": "{0CE9FA36-1E3A-4C06-9254-B7C73A732053}", + "details": { + "name": "Vector4" + } + } + ] + }, + { + "base": "Absolute", + "context": "MathVector4_VM", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Absolute" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Absolute is invoked" + }, + "details": { + "name": "MathVector4_VM::Absolute", + "category": "Other" + }, + "params": [ + { + "typeid": "{0CE9FA36-1E3A-4C06-9254-B7C73A732053}", + "details": { + "name": "Vector4" + } + } + ], + "results": [ + { + "typeid": "{0CE9FA36-1E3A-4C06-9254-B7C73A732053}", + "details": { + "name": "Vector4" + } + } + ] + }, + { + "base": "SetY", + "context": "MathVector4_VM", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke SetY" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after SetY is invoked" + }, + "details": { + "name": "MathVector4_VM::SetY", + "category": "Other" + }, + "params": [ + { + "typeid": "{0CE9FA36-1E3A-4C06-9254-B7C73A732053}", + "details": { + "name": "Vector4" + } + }, + { + "typeid": "{110C4B14-11A8-4E9D-8638-5051013A56AC}", + "details": { + "name": "double" + } + } + ], + "results": [ + { + "typeid": "{0CE9FA36-1E3A-4C06-9254-B7C73A732053}", + "details": { + "name": "Vector4" + } + } + ] + } + ] + } + ] +} \ No newline at end of file diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Classes/Math_VM.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Classes/Math_VM.names new file mode 100644 index 0000000000..e8a695f972 --- /dev/null +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Classes/Math_VM.names @@ -0,0 +1,134 @@ +{ + "entries": [ + { + "base": "Math_VM", + "context": "BehaviorClass", + "variant": "", + "details": { + "name": "Math_VM" + }, + "methods": [ + { + "base": "ThreeGeneric", + "context": "Math_VM", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke ThreeGeneric" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after ThreeGeneric is invoked" + }, + "details": { + "name": "Math_VM::ThreeGeneric", + "category": "Other" + }, + "params": [ + { + "typeid": "{8379EB7D-01FA-4538-B64B-A6543B4BE73D}", + "details": { + "name": "const Vector3&" + } + }, + { + "typeid": "{03AAAB3F-5C47-5A66-9EBC-D5FA4DB353C9}", + "details": { + "name": "const AZStd::basic_string, alloc" + } + }, + { + "typeid": "{A0CA880C-AFE4-43CB-926C-59AC48496112}", + "details": { + "name": "const bool&" + } + } + ], + "results": [ + { + "typeid": "{5BAFAD11-D6AF-5946-B09B-6E0B72E1209C}", + "details": { + "name": "tuple, allocator> bool >" + } + } + ] + }, + { + "base": "MultiplyAndAdd", + "context": "Math_VM", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke MultiplyAndAdd" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after MultiplyAndAdd is invoked" + }, + "details": { + "name": "Math_VM::MultiplyAndAdd", + "category": "Other" + }, + "params": [ + { + "typeid": "{110C4B14-11A8-4E9D-8638-5051013A56AC}", + "details": { + "name": "double" + } + }, + { + "typeid": "{110C4B14-11A8-4E9D-8638-5051013A56AC}", + "details": { + "name": "double" + } + }, + { + "typeid": "{110C4B14-11A8-4E9D-8638-5051013A56AC}", + "details": { + "name": "double" + } + } + ], + "results": [ + { + "typeid": "{110C4B14-11A8-4E9D-8638-5051013A56AC}", + "details": { + "name": "double" + } + } + ] + }, + { + "base": "StringToNumber", + "context": "Math_VM", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke StringToNumber" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after StringToNumber is invoked" + }, + "details": { + "name": "Math_VM::StringToNumber", + "category": "Other" + }, + "params": [ + { + "typeid": "{03AAAB3F-5C47-5A66-9EBC-D5FA4DB353C9}", + "details": { + "name": "const AZStd::basic_string, alloc" + } + } + ], + "results": [ + { + "typeid": "{110C4B14-11A8-4E9D-8638-5051013A56AC}", + "details": { + "name": "double" + } + } + ] + } + ] + } + ] +} \ No newline at end of file diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Classes/Matrix3x4.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Classes/Matrix3x4.names new file mode 100644 index 0000000000..bfa6c885cb --- /dev/null +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Classes/Matrix3x4.names @@ -0,0 +1,1870 @@ +{ + "entries": [ + { + "base": "Matrix3x4", + "context": "BehaviorClass", + "variant": "", + "details": { + "name": "Matrix 3x 4" + }, + "methods": [ + { + "base": "CreateZero", + "context": "Matrix3x4", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Create Zero" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Create Zero is invoked" + }, + "details": { + "name": "Create Zero" + }, + "results": [ + { + "typeid": "{1906D8A5-7DEC-4DE3-A606-9E53BB3459E7}", + "details": { + "name": "Matrix 3x 4" + } + } + ] + }, + { + "base": "SetRotationPartFromQuaternion", + "context": "Matrix3x4", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Set Rotation Part From Quaternion" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Set Rotation Part From Quaternion is invoked" + }, + "details": { + "name": "Set Rotation Part From Quaternion" + }, + "params": [ + { + "typeid": "{1906D8A5-7DEC-4DE3-A606-9E53BB3459E7}", + "details": { + "name": "Matrix 3x 4" + } + }, + { + "typeid": "{73103120-3DD3-4873-BAB3-9713FA2804FB}", + "details": { + "name": "Quaternion" + } + } + ] + }, + { + "base": "CreateFromColumns", + "context": "Matrix3x4", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Create From Columns" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Create From Columns is invoked" + }, + "details": { + "name": "Create From Columns" + }, + "params": [ + { + "typeid": "{8379EB7D-01FA-4538-B64B-A6543B4BE73D}", + "details": { + "name": "Vector 3" + } + }, + { + "typeid": "{8379EB7D-01FA-4538-B64B-A6543B4BE73D}", + "details": { + "name": "Vector 3" + } + }, + { + "typeid": "{8379EB7D-01FA-4538-B64B-A6543B4BE73D}", + "details": { + "name": "Vector 3" + } + } + ], + "results": [ + { + "typeid": "{1906D8A5-7DEC-4DE3-A606-9E53BB3459E7}", + "details": { + "name": "Matrix 3x 4" + } + } + ] + }, + { + "base": "IsClose", + "context": "Matrix3x4", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Is Close" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Is Close is invoked" + }, + "details": { + "name": "Is Close" + }, + "params": [ + { + "typeid": "{1906D8A5-7DEC-4DE3-A606-9E53BB3459E7}", + "details": { + "name": "Matrix 3x 4" + } + }, + { + "typeid": "{EA2C3E90-AFBE-44D4-A90D-FAAF79BAF93D}", + "details": { + "name": "float" + } + } + ], + "results": [ + { + "typeid": "{A0CA880C-AFE4-43CB-926C-59AC48496112}", + "details": { + "name": "bool" + } + } + ] + }, + { + "base": "IsOrthogonal", + "context": "Matrix3x4", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Is Orthogonal" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Is Orthogonal is invoked" + }, + "details": { + "name": "Is Orthogonal" + }, + "params": [ + { + "typeid": "{EA2C3E90-AFBE-44D4-A90D-FAAF79BAF93D}", + "details": { + "name": "float" + } + } + ], + "results": [ + { + "typeid": "{A0CA880C-AFE4-43CB-926C-59AC48496112}", + "details": { + "name": "bool" + } + } + ] + }, + { + "base": "Orthogonalize", + "context": "Matrix3x4", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Orthogonalize" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Orthogonalize is invoked" + }, + "details": { + "name": "Orthogonalize" + }, + "params": [ + { + "typeid": "{1906D8A5-7DEC-4DE3-A606-9E53BB3459E7}", + "details": { + "name": "Matrix 3x 4" + } + } + ] + }, + { + "base": "CreateFromMatrix3x3", + "context": "Matrix3x4", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Create From Matrix 3x 3" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Create From Matrix 3x 3 is invoked" + }, + "details": { + "name": "Create From Matrix 3x 3" + }, + "results": [ + { + "typeid": "{1906D8A5-7DEC-4DE3-A606-9E53BB3459E7}", + "details": { + "name": "Matrix 3x 4" + } + } + ] + }, + { + "base": "RetrieveScale", + "context": "Matrix3x4", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Retrieve Scale" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Retrieve Scale is invoked" + }, + "details": { + "name": "Retrieve Scale" + }, + "results": [ + { + "typeid": "{8379EB7D-01FA-4538-B64B-A6543B4BE73D}", + "details": { + "name": "Vector 3" + } + } + ] + }, + { + "base": "CreateRotationX", + "context": "Matrix3x4", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Create RotationX" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Create RotationX is invoked" + }, + "details": { + "name": "Create RotationX" + }, + "results": [ + { + "typeid": "{1906D8A5-7DEC-4DE3-A606-9E53BB3459E7}", + "details": { + "name": "Matrix 3x 4" + } + } + ] + }, + { + "base": "CreateFromMatrix3x3AndTranslation", + "context": "Matrix3x4", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Create From Matrix 3x 3 And Translation" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Create From Matrix 3x 3 And Translation is invoked" + }, + "details": { + "name": "Create From Matrix 3x 3 And Translation" + }, + "params": [ + { + "typeid": "{8379EB7D-01FA-4538-B64B-A6543B4BE73D}", + "details": { + "name": "Vector 3" + } + } + ], + "results": [ + { + "typeid": "{1906D8A5-7DEC-4DE3-A606-9E53BB3459E7}", + "details": { + "name": "Matrix 3x 4" + } + } + ] + }, + { + "base": "ToString", + "context": "Matrix3x4", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke To String" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after To String is invoked" + }, + "details": { + "name": "To String" + }, + "results": [ + { + "typeid": "{03AAAB3F-5C47-5A66-9EBC-D5FA4DB353C9}", + "details": { + "name": "AZ Std::basic_string, allocator>" + } + } + ] + }, + { + "base": "ExtractScale", + "context": "Matrix3x4", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Extract Scale" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Extract Scale is invoked" + }, + "details": { + "name": "Extract Scale" + }, + "results": [ + { + "typeid": "{8379EB7D-01FA-4538-B64B-A6543B4BE73D}", + "details": { + "name": "Vector 3" + } + } + ] + }, + { + "base": "GetTranspose", + "context": "Matrix3x4", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Get Transpose" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Get Transpose is invoked" + }, + "details": { + "name": "Get Transpose" + }, + "results": [ + { + "typeid": "{1906D8A5-7DEC-4DE3-A606-9E53BB3459E7}", + "details": { + "name": "Matrix 3x 4" + } + } + ] + }, + { + "base": "InvertFast", + "context": "Matrix3x4", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Invert Fast" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Invert Fast is invoked" + }, + "details": { + "name": "Invert Fast" + }, + "params": [ + { + "typeid": "{1906D8A5-7DEC-4DE3-A606-9E53BB3459E7}", + "details": { + "name": "Matrix 3x 4" + } + } + ] + }, + { + "base": "CreateFromRows", + "context": "Matrix3x4", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Create From Rows" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Create From Rows is invoked" + }, + "details": { + "name": "Create From Rows" + }, + "params": [ + { + "typeid": "{0CE9FA36-1E3A-4C06-9254-B7C73A732053}", + "details": { + "name": "Vector 4" + } + }, + { + "typeid": "{0CE9FA36-1E3A-4C06-9254-B7C73A732053}", + "details": { + "name": "Vector 4" + } + } + ], + "results": [ + { + "typeid": "{1906D8A5-7DEC-4DE3-A606-9E53BB3459E7}", + "details": { + "name": "Matrix 3x 4" + } + } + ] + }, + { + "base": "CreateTranslation", + "context": "Matrix3x4", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Create Translation" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Create Translation is invoked" + }, + "details": { + "name": "Create Translation" + }, + "results": [ + { + "typeid": "{1906D8A5-7DEC-4DE3-A606-9E53BB3459E7}", + "details": { + "name": "Matrix 3x 4" + } + } + ] + }, + { + "base": "GetTranspose3x3", + "context": "Matrix3x4", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Get Transpose 3x 3" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Get Transpose 3x 3 is invoked" + }, + "details": { + "name": "Get Transpose 3x 3" + }, + "results": [ + { + "typeid": "{1906D8A5-7DEC-4DE3-A606-9E53BB3459E7}", + "details": { + "name": "Matrix 3x 4" + } + } + ] + }, + { + "base": "SetColumn", + "context": "Matrix3x4", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Set Column" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Set Column is invoked" + }, + "details": { + "name": "Set Column" + }, + "params": [ + { + "typeid": "{1906D8A5-7DEC-4DE3-A606-9E53BB3459E7}", + "details": { + "name": "Matrix 3x 4" + } + }, + { + "typeid": "{72039442-EB38-4D42-A1AD-CB68F7E0EEF6}", + "details": { + "name": "int" + } + }, + { + "typeid": "{8379EB7D-01FA-4538-B64B-A6543B4BE73D}", + "details": { + "name": "Vector 3" + } + } + ] + }, + { + "base": "GetRow", + "context": "Matrix3x4", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Get Row" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Get Row is invoked" + }, + "details": { + "name": "Get Row" + }, + "params": [ + { + "typeid": "{72039442-EB38-4D42-A1AD-CB68F7E0EEF6}", + "details": { + "name": "int" + } + } + ], + "results": [ + { + "typeid": "{0CE9FA36-1E3A-4C06-9254-B7C73A732053}", + "details": { + "name": "Vector 4" + } + } + ] + }, + { + "base": "GetInverseFast", + "context": "Matrix3x4", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Get Inverse Fast" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Get Inverse Fast is invoked" + }, + "details": { + "name": "Get Inverse Fast" + }, + "results": [ + { + "typeid": "{1906D8A5-7DEC-4DE3-A606-9E53BB3459E7}", + "details": { + "name": "Matrix 3x 4" + } + } + ] + }, + { + "base": "GetOrthogonalized", + "context": "Matrix3x4", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Get Orthogonalized" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Get Orthogonalized is invoked" + }, + "details": { + "name": "Get Orthogonalized" + }, + "results": [ + { + "typeid": "{1906D8A5-7DEC-4DE3-A606-9E53BB3459E7}", + "details": { + "name": "Matrix 3x 4" + } + } + ] + }, + { + "base": "Multiply3x3", + "context": "Matrix3x4", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Multiply 3x 3" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Multiply 3x 3 is invoked" + }, + "details": { + "name": "Multiply 3x 3" + }, + "params": [ + { + "typeid": "{8379EB7D-01FA-4538-B64B-A6543B4BE73D}", + "details": { + "name": "Vector 3" + } + } + ], + "results": [ + { + "typeid": "{8379EB7D-01FA-4538-B64B-A6543B4BE73D}", + "details": { + "name": "Vector 3" + } + } + ] + }, + { + "base": "IsFinite", + "context": "Matrix3x4", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Is Finite" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Is Finite is invoked" + }, + "details": { + "name": "Is Finite" + }, + "results": [ + { + "typeid": "{A0CA880C-AFE4-43CB-926C-59AC48496112}", + "details": { + "name": "bool" + } + } + ] + }, + { + "base": "CreateFromQuaternion", + "context": "Matrix3x4", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Create From Quaternion" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Create From Quaternion is invoked" + }, + "details": { + "name": "Create From Quaternion" + }, + "results": [ + { + "typeid": "{1906D8A5-7DEC-4DE3-A606-9E53BB3459E7}", + "details": { + "name": "Matrix 3x 4" + } + } + ] + }, + { + "base": "SetBasisAndTranslation", + "context": "Matrix3x4", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Set Basis And Translation" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Set Basis And Translation is invoked" + }, + "details": { + "name": "Set Basis And Translation" + }, + "params": [ + { + "typeid": "{1906D8A5-7DEC-4DE3-A606-9E53BB3459E7}", + "details": { + "name": "Matrix 3x 4" + } + }, + { + "typeid": "{8379EB7D-01FA-4538-B64B-A6543B4BE73D}", + "details": { + "name": "Vector 3" + } + }, + { + "typeid": "{8379EB7D-01FA-4538-B64B-A6543B4BE73D}", + "details": { + "name": "Vector 3" + } + }, + { + "typeid": "{8379EB7D-01FA-4538-B64B-A6543B4BE73D}", + "details": { + "name": "Vector 3" + } + }, + { + "typeid": "{8379EB7D-01FA-4538-B64B-A6543B4BE73D}", + "details": { + "name": "Vector 3" + } + } + ] + }, + { + "base": "MultiplyVector4", + "context": "Matrix3x4", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Multiply Vector 4" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Multiply Vector 4 is invoked" + }, + "details": { + "name": "Multiply Vector 4" + }, + "params": [ + { + "typeid": "{0CE9FA36-1E3A-4C06-9254-B7C73A732053}", + "details": { + "name": "Vector 4" + } + } + ], + "results": [ + { + "typeid": "{0CE9FA36-1E3A-4C06-9254-B7C73A732053}", + "details": { + "name": "Vector 4" + } + } + ] + }, + { + "base": "CreateScale", + "context": "Matrix3x4", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Create Scale" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Create Scale is invoked" + }, + "details": { + "name": "Create Scale" + }, + "results": [ + { + "typeid": "{1906D8A5-7DEC-4DE3-A606-9E53BB3459E7}", + "details": { + "name": "Matrix 3x 4" + } + } + ] + }, + { + "base": "CreateDiagonal", + "context": "Matrix3x4", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Create Diagonal" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Create Diagonal is invoked" + }, + "details": { + "name": "Create Diagonal" + }, + "results": [ + { + "typeid": "{1906D8A5-7DEC-4DE3-A606-9E53BB3459E7}", + "details": { + "name": "Matrix 3x 4" + } + } + ] + }, + { + "base": "GetTranslation", + "context": "Matrix3x4", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Get Translation" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Get Translation is invoked" + }, + "details": { + "name": "Get Translation" + }, + "results": [ + { + "typeid": "{8379EB7D-01FA-4538-B64B-A6543B4BE73D}", + "details": { + "name": "Vector 3" + } + } + ] + }, + { + "base": "InvertFull", + "context": "Matrix3x4", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Invert Full" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Invert Full is invoked" + }, + "details": { + "name": "Invert Full" + }, + "params": [ + { + "typeid": "{1906D8A5-7DEC-4DE3-A606-9E53BB3459E7}", + "details": { + "name": "Matrix 3x 4" + } + } + ] + }, + { + "base": "SetColumns", + "context": "Matrix3x4", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Set Columns" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Set Columns is invoked" + }, + "details": { + "name": "Set Columns" + }, + "params": [ + { + "typeid": "{1906D8A5-7DEC-4DE3-A606-9E53BB3459E7}", + "details": { + "name": "Matrix 3x 4" + } + }, + { + "typeid": "{8379EB7D-01FA-4538-B64B-A6543B4BE73D}", + "details": { + "name": "Vector 3" + } + }, + { + "typeid": "{8379EB7D-01FA-4538-B64B-A6543B4BE73D}", + "details": { + "name": "Vector 3" + } + }, + { + "typeid": "{8379EB7D-01FA-4538-B64B-A6543B4BE73D}", + "details": { + "name": "Vector 3" + } + }, + { + "typeid": "{8379EB7D-01FA-4538-B64B-A6543B4BE73D}", + "details": { + "name": "Vector 3" + } + } + ] + }, + { + "base": "SetElement", + "context": "Matrix3x4", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Set Element" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Set Element is invoked" + }, + "details": { + "name": "Set Element" + }, + "params": [ + { + "typeid": "{1906D8A5-7DEC-4DE3-A606-9E53BB3459E7}", + "details": { + "name": "Matrix 3x 4" + } + }, + { + "typeid": "{72039442-EB38-4D42-A1AD-CB68F7E0EEF6}", + "details": { + "name": "int" + } + }, + { + "typeid": "{72039442-EB38-4D42-A1AD-CB68F7E0EEF6}", + "details": { + "name": "int" + } + }, + { + "typeid": "{EA2C3E90-AFBE-44D4-A90D-FAAF79BAF93D}", + "details": { + "name": "float" + } + } + ] + }, + { + "base": "Equal", + "context": "Matrix3x4", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Equal" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Equal is invoked" + }, + "details": { + "name": "Equal" + }, + "params": [ + { + "typeid": "{1906D8A5-7DEC-4DE3-A606-9E53BB3459E7}", + "details": { + "name": "Matrix 3x 4" + } + } + ], + "results": [ + { + "typeid": "{A0CA880C-AFE4-43CB-926C-59AC48496112}", + "details": { + "name": "bool" + } + } + ] + }, + { + "base": "GetDeterminant3x3", + "context": "Matrix3x4", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Get Determinant 3x 3" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Get Determinant 3x 3 is invoked" + }, + "details": { + "name": "Get Determinant 3x 3" + }, + "results": [ + { + "typeid": "{EA2C3E90-AFBE-44D4-A90D-FAAF79BAF93D}", + "details": { + "name": "float" + } + } + ] + }, + { + "base": "GetColumns", + "context": "Matrix3x4", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Get Columns" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Get Columns is invoked" + }, + "details": { + "name": "Get Columns" + }, + "params": [ + { + "typeid": "{1906D8A5-7DEC-4DE3-A606-9E53BB3459E7}", + "details": { + "name": "Matrix 3x 4" + } + }, + { + "typeid": "{8379EB7D-01FA-4538-B64B-A6543B4BE73D}", + "details": { + "name": "Vector 3" + } + }, + { + "typeid": "{8379EB7D-01FA-4538-B64B-A6543B4BE73D}", + "details": { + "name": "Vector 3" + } + }, + { + "typeid": "{8379EB7D-01FA-4538-B64B-A6543B4BE73D}", + "details": { + "name": "Vector 3" + } + }, + { + "typeid": "{8379EB7D-01FA-4538-B64B-A6543B4BE73D}", + "details": { + "name": "Vector 3" + } + } + ] + }, + { + "base": "SetRows", + "context": "Matrix3x4", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Set Rows" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Set Rows is invoked" + }, + "details": { + "name": "Set Rows" + }, + "params": [ + { + "typeid": "{1906D8A5-7DEC-4DE3-A606-9E53BB3459E7}", + "details": { + "name": "Matrix 3x 4" + } + }, + { + "typeid": "{0CE9FA36-1E3A-4C06-9254-B7C73A732053}", + "details": { + "name": "Vector 4" + } + }, + { + "typeid": "{0CE9FA36-1E3A-4C06-9254-B7C73A732053}", + "details": { + "name": "Vector 4" + } + }, + { + "typeid": "{0CE9FA36-1E3A-4C06-9254-B7C73A732053}", + "details": { + "name": "Vector 4" + } + } + ] + }, + { + "base": "GetMultipliedByScale", + "context": "Matrix3x4", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Get Multiplied By Scale" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Get Multiplied By Scale is invoked" + }, + "details": { + "name": "Get Multiplied By Scale" + }, + "params": [ + { + "typeid": "{8379EB7D-01FA-4538-B64B-A6543B4BE73D}", + "details": { + "name": "Vector 3" + } + } + ], + "results": [ + { + "typeid": "{1906D8A5-7DEC-4DE3-A606-9E53BB3459E7}", + "details": { + "name": "Matrix 3x 4" + } + } + ] + }, + { + "base": "CreateRotationZ", + "context": "Matrix3x4", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Create RotationZ" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Create RotationZ is invoked" + }, + "details": { + "name": "Create RotationZ" + }, + "results": [ + { + "typeid": "{1906D8A5-7DEC-4DE3-A606-9E53BB3459E7}", + "details": { + "name": "Matrix 3x 4" + } + } + ] + }, + { + "base": "CreateFromQuaternionAndTranslation", + "context": "Matrix3x4", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Create From Quaternion And Translation" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Create From Quaternion And Translation is invoked" + }, + "details": { + "name": "Create From Quaternion And Translation" + }, + "params": [ + { + "typeid": "{8379EB7D-01FA-4538-B64B-A6543B4BE73D}", + "details": { + "name": "Vector 3" + } + } + ], + "results": [ + { + "typeid": "{1906D8A5-7DEC-4DE3-A606-9E53BB3459E7}", + "details": { + "name": "Matrix 3x 4" + } + } + ] + }, + { + "base": "GetRowAsVector3", + "context": "Matrix3x4", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Get Row As Vector 3" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Get Row As Vector 3 is invoked" + }, + "details": { + "name": "Get Row As Vector 3" + }, + "params": [ + { + "typeid": "{72039442-EB38-4D42-A1AD-CB68F7E0EEF6}", + "details": { + "name": "int" + } + } + ], + "results": [ + { + "typeid": "{8379EB7D-01FA-4538-B64B-A6543B4BE73D}", + "details": { + "name": "Vector 3" + } + } + ] + }, + { + "base": "MultiplyMatrix3x4", + "context": "Matrix3x4", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Multiply Matrix 3x 4" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Multiply Matrix 3x 4 is invoked" + }, + "details": { + "name": "Multiply Matrix 3x 4" + }, + "params": [ + { + "typeid": "{1906D8A5-7DEC-4DE3-A606-9E53BB3459E7}", + "details": { + "name": "Matrix 3x 4" + } + } + ], + "results": [ + { + "typeid": "{1906D8A5-7DEC-4DE3-A606-9E53BB3459E7}", + "details": { + "name": "Matrix 3x 4" + } + } + ] + }, + { + "base": "UnsafeCreateFromMatrix4x4", + "context": "Matrix3x4", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Unsafe Create From Matrix 4x 4" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Unsafe Create From Matrix 4x 4 is invoked" + }, + "details": { + "name": "Unsafe Create From Matrix 4x 4" + }, + "results": [ + { + "typeid": "{1906D8A5-7DEC-4DE3-A606-9E53BB3459E7}", + "details": { + "name": "Matrix 3x 4" + } + } + ] + }, + { + "base": "GetRows", + "context": "Matrix3x4", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Get Rows" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Get Rows is invoked" + }, + "details": { + "name": "Get Rows" + }, + "params": [ + { + "typeid": "{1906D8A5-7DEC-4DE3-A606-9E53BB3459E7}", + "details": { + "name": "Matrix 3x 4" + } + }, + { + "typeid": "{0CE9FA36-1E3A-4C06-9254-B7C73A732053}", + "details": { + "name": "Vector 4" + } + }, + { + "typeid": "{0CE9FA36-1E3A-4C06-9254-B7C73A732053}", + "details": { + "name": "Vector 4" + } + }, + { + "typeid": "{0CE9FA36-1E3A-4C06-9254-B7C73A732053}", + "details": { + "name": "Vector 4" + } + } + ] + }, + { + "base": "Clone", + "context": "Matrix3x4", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Clone" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Clone is invoked" + }, + "details": { + "name": "Clone" + }, + "results": [ + { + "typeid": "{1906D8A5-7DEC-4DE3-A606-9E53BB3459E7}", + "details": { + "name": "Matrix 3x 4" + } + } + ] + }, + { + "base": "MultiplyVector3", + "context": "Matrix3x4", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Multiply Vector 3" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Multiply Vector 3 is invoked" + }, + "details": { + "name": "Multiply Vector 3" + }, + "params": [ + { + "typeid": "{8379EB7D-01FA-4538-B64B-A6543B4BE73D}", + "details": { + "name": "Vector 3" + } + } + ], + "results": [ + { + "typeid": "{8379EB7D-01FA-4538-B64B-A6543B4BE73D}", + "details": { + "name": "Vector 3" + } + } + ] + }, + { + "base": "CreateIdentity", + "context": "Matrix3x4", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Create Identity" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Create Identity is invoked" + }, + "details": { + "name": "Create Identity" + }, + "results": [ + { + "typeid": "{1906D8A5-7DEC-4DE3-A606-9E53BB3459E7}", + "details": { + "name": "Matrix 3x 4" + } + } + ] + }, + { + "base": "GetBasisAndTranslation", + "context": "Matrix3x4", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Get Basis And Translation" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Get Basis And Translation is invoked" + }, + "details": { + "name": "Get Basis And Translation" + }, + "params": [ + { + "typeid": "{1906D8A5-7DEC-4DE3-A606-9E53BB3459E7}", + "details": { + "name": "Matrix 3x 4" + } + }, + { + "typeid": "{8379EB7D-01FA-4538-B64B-A6543B4BE73D}", + "details": { + "name": "Vector 3" + } + }, + { + "typeid": "{8379EB7D-01FA-4538-B64B-A6543B4BE73D}", + "details": { + "name": "Vector 3" + } + }, + { + "typeid": "{8379EB7D-01FA-4538-B64B-A6543B4BE73D}", + "details": { + "name": "Vector 3" + } + }, + { + "typeid": "{8379EB7D-01FA-4538-B64B-A6543B4BE73D}", + "details": { + "name": "Vector 3" + } + } + ] + }, + { + "base": "CreateFromValue", + "context": "Matrix3x4", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Create From Value" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Create From Value is invoked" + }, + "details": { + "name": "Create From Value" + }, + "results": [ + { + "typeid": "{1906D8A5-7DEC-4DE3-A606-9E53BB3459E7}", + "details": { + "name": "Matrix 3x 4" + } + } + ] + }, + { + "base": "GetElement", + "context": "Matrix3x4", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Get Element" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Get Element is invoked" + }, + "details": { + "name": "Get Element" + }, + "params": [ + { + "typeid": "{72039442-EB38-4D42-A1AD-CB68F7E0EEF6}", + "details": { + "name": "int" + } + }, + { + "typeid": "{72039442-EB38-4D42-A1AD-CB68F7E0EEF6}", + "details": { + "name": "int" + } + } + ], + "results": [ + { + "typeid": "{EA2C3E90-AFBE-44D4-A90D-FAAF79BAF93D}", + "details": { + "name": "float" + } + } + ] + }, + { + "base": "Transpose3x3", + "context": "Matrix3x4", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Transpose 3x 3" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Transpose 3x 3 is invoked" + }, + "details": { + "name": "Transpose 3x 3" + }, + "params": [ + { + "typeid": "{1906D8A5-7DEC-4DE3-A606-9E53BB3459E7}", + "details": { + "name": "Matrix 3x 4" + } + } + ] + }, + { + "base": "Transpose", + "context": "Matrix3x4", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Transpose" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Transpose is invoked" + }, + "details": { + "name": "Transpose" + }, + "params": [ + { + "typeid": "{1906D8A5-7DEC-4DE3-A606-9E53BB3459E7}", + "details": { + "name": "Matrix 3x 4" + } + } + ] + }, + { + "base": "CreateRotationY", + "context": "Matrix3x4", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Create RotationY" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Create RotationY is invoked" + }, + "details": { + "name": "Create RotationY" + }, + "results": [ + { + "typeid": "{1906D8A5-7DEC-4DE3-A606-9E53BB3459E7}", + "details": { + "name": "Matrix 3x 4" + } + } + ] + }, + { + "base": "SetRow", + "context": "Matrix3x4", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Set Row" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Set Row is invoked" + }, + "details": { + "name": "Set Row" + }, + "params": [ + { + "typeid": "{1906D8A5-7DEC-4DE3-A606-9E53BB3459E7}", + "details": { + "name": "Matrix 3x 4" + } + }, + { + "typeid": "{72039442-EB38-4D42-A1AD-CB68F7E0EEF6}", + "details": { + "name": "int" + } + }, + { + "typeid": "{0CE9FA36-1E3A-4C06-9254-B7C73A732053}", + "details": { + "name": "Vector 4" + } + } + ] + }, + { + "base": "GetInverseFull", + "context": "Matrix3x4", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Get Inverse Full" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Get Inverse Full is invoked" + }, + "details": { + "name": "Get Inverse Full" + }, + "results": [ + { + "typeid": "{1906D8A5-7DEC-4DE3-A606-9E53BB3459E7}", + "details": { + "name": "Matrix 3x 4" + } + } + ] + }, + { + "base": "GetColumn", + "context": "Matrix3x4", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Get Column" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Get Column is invoked" + }, + "details": { + "name": "Get Column" + }, + "params": [ + { + "typeid": "{72039442-EB38-4D42-A1AD-CB68F7E0EEF6}", + "details": { + "name": "int" + } + } + ], + "results": [ + { + "typeid": "{8379EB7D-01FA-4538-B64B-A6543B4BE73D}", + "details": { + "name": "Vector 3" + } + } + ] + }, + { + "base": "SetTranslation", + "context": "Matrix3x4", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Set Translation" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Set Translation is invoked" + }, + "details": { + "name": "Set Translation" + }, + "params": [ + { + "typeid": "{1906D8A5-7DEC-4DE3-A606-9E53BB3459E7}", + "details": { + "name": "Matrix 3x 4" + } + }, + { + "typeid": "{8379EB7D-01FA-4538-B64B-A6543B4BE73D}", + "details": { + "name": "Vector 3" + } + } + ] + }, + { + "base": "GetbasisX", + "context": "Getter", + "details": { + "name": "GetbasisX" + }, + "params": [ + { + "typeid": "{1906D8A5-7DEC-4DE3-A606-9E53BB3459E7}", + "details": { + "name": "Matrix 3x 4" + } + }, + { + "typeid": "", + "details": { + "name": "basisX" + } + }, + { + "typeid": "", + "details": { + "name": "" + } + } + ], + "results": [ + { + "typeid": "{8379EB7D-01FA-4538-B64B-A6543B4BE73D}", + "details": { + "name": "Vector 3" + } + } + ] + }, + { + "base": "SetbasisX", + "context": "Setter", + "details": { + "name": "SetbasisX" + }, + "params": [ + { + "typeid": "{1906D8A5-7DEC-4DE3-A606-9E53BB3459E7}", + "details": { + "name": "Matrix 3x 4" + } + }, + { + "typeid": "{8379EB7D-01FA-4538-B64B-A6543B4BE73D}", + "details": { + "name": "basisX" + } + } + ] + }, + { + "base": "GetbasisY", + "context": "Getter", + "details": { + "name": "GetbasisY" + }, + "params": [ + { + "typeid": "{1906D8A5-7DEC-4DE3-A606-9E53BB3459E7}", + "details": { + "name": "Matrix 3x 4" + } + }, + { + "typeid": "", + "details": { + "name": "basisY" + } + }, + { + "typeid": "", + "details": { + "name": "" + } + } + ], + "results": [ + { + "typeid": "{8379EB7D-01FA-4538-B64B-A6543B4BE73D}", + "details": { + "name": "Vector 3" + } + } + ] + }, + { + "base": "SetbasisY", + "context": "Setter", + "details": { + "name": "SetbasisY" + }, + "params": [ + { + "typeid": "{1906D8A5-7DEC-4DE3-A606-9E53BB3459E7}", + "details": { + "name": "Matrix 3x 4" + } + }, + { + "typeid": "{8379EB7D-01FA-4538-B64B-A6543B4BE73D}", + "details": { + "name": "basisY" + } + } + ] + }, + { + "base": "GetbasisZ", + "context": "Getter", + "details": { + "name": "GetbasisZ" + }, + "params": [ + { + "typeid": "{1906D8A5-7DEC-4DE3-A606-9E53BB3459E7}", + "details": { + "name": "Matrix 3x 4" + } + }, + { + "typeid": "", + "details": { + "name": "basisZ" + } + }, + { + "typeid": "", + "details": { + "name": "" + } + } + ], + "results": [ + { + "typeid": "{8379EB7D-01FA-4538-B64B-A6543B4BE73D}", + "details": { + "name": "Vector 3" + } + } + ] + }, + { + "base": "SetbasisZ", + "context": "Setter", + "details": { + "name": "SetbasisZ" + }, + "params": [ + { + "typeid": "{1906D8A5-7DEC-4DE3-A606-9E53BB3459E7}", + "details": { + "name": "Matrix 3x 4" + } + }, + { + "typeid": "{8379EB7D-01FA-4538-B64B-A6543B4BE73D}", + "details": { + "name": "basisZ" + } + } + ] + }, + { + "base": "Gettranslation", + "context": "Getter", + "details": { + "name": "Gettranslation" + }, + "params": [ + { + "typeid": "{1906D8A5-7DEC-4DE3-A606-9E53BB3459E7}", + "details": { + "name": "Matrix 3x 4" + } + }, + { + "typeid": "", + "details": { + "name": "translation" + } + }, + { + "typeid": "", + "details": { + "name": "" + } + } + ], + "results": [ + { + "typeid": "{8379EB7D-01FA-4538-B64B-A6543B4BE73D}", + "details": { + "name": "Vector 3" + } + } + ] + }, + { + "base": "Settranslation", + "context": "Setter", + "details": { + "name": "Settranslation" + }, + "params": [ + { + "typeid": "{1906D8A5-7DEC-4DE3-A606-9E53BB3459E7}", + "details": { + "name": "Matrix 3x 4" + } + }, + { + "typeid": "{8379EB7D-01FA-4538-B64B-A6543B4BE73D}", + "details": { + "name": "translation" + } + } + ] + } + ] + } + ] +} \ No newline at end of file diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Classes/MeshData.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Classes/MeshData.names new file mode 100644 index 0000000000..cb88951159 --- /dev/null +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Classes/MeshData.names @@ -0,0 +1,330 @@ +{ + "entries": [ + { + "base": "MeshData", + "context": "BehaviorClass", + "variant": "", + "details": { + "name": "Mesh Data", + "category": "Rendering" + }, + "methods": [ + { + "base": "GetVertexIndex", + "context": "MeshData", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Get Vertex Index" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Get Vertex Index is invoked" + }, + "details": { + "name": "Get Vertex Index" + }, + "params": [ + { + "typeid": "{72039442-EB38-4D42-A1AD-CB68F7E0EEF6}", + "details": { + "name": "int" + } + }, + { + "typeid": "{72039442-EB38-4D42-A1AD-CB68F7E0EEF6}", + "details": { + "name": "int" + } + } + ], + "results": [ + { + "typeid": "{43DA906B-7DEF-4CA8-9790-854106D3F983}", + "details": { + "name": "unsigned int" + } + } + ] + }, + { + "base": "GetPosition", + "context": "MeshData", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Get Position" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Get Position is invoked" + }, + "details": { + "name": "Get Position" + }, + "params": [ + { + "typeid": "{43DA906B-7DEF-4CA8-9790-854106D3F983}", + "details": { + "name": "unsigned int" + } + } + ], + "results": [ + { + "typeid": "{8379EB7D-01FA-4538-B64B-A6543B4BE73D}", + "details": { + "name": "const Vector 3&" + } + } + ] + }, + { + "base": "GetFaceInfo", + "context": "MeshData", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Get Face Info" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Get Face Info is invoked" + }, + "details": { + "name": "Get Face Info" + }, + "params": [ + { + "typeid": "{43DA906B-7DEF-4CA8-9790-854106D3F983}", + "details": { + "name": "unsigned int" + } + } + ], + "results": [ + { + "typeid": "{F9F49C1A-014F-46F5-A46F-B56D8CB46C2B}", + "details": { + "name": "const AZ:: SceneAPI:: Data Types::I Mesh Data:: Face&" + } + } + ] + }, + { + "base": "HasNormalData", + "context": "MeshData", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Has Normal Data" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Has Normal Data is invoked" + }, + "details": { + "name": "Has Normal Data" + }, + "results": [ + { + "typeid": "{A0CA880C-AFE4-43CB-926C-59AC48496112}", + "details": { + "name": "bool" + } + } + ] + }, + { + "base": "GetNormal", + "context": "MeshData", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Get Normal" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Get Normal is invoked" + }, + "details": { + "name": "Get Normal" + }, + "params": [ + { + "typeid": "{43DA906B-7DEF-4CA8-9790-854106D3F983}", + "details": { + "name": "unsigned int" + } + } + ], + "results": [ + { + "typeid": "{8379EB7D-01FA-4538-B64B-A6543B4BE73D}", + "details": { + "name": "const Vector 3&" + } + } + ] + }, + { + "base": "GetUsedPointIndexForControlPoint", + "context": "MeshData", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Get Used Point Index For Control Point" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Get Used Point Index For Control Point is invoked" + }, + "details": { + "name": "Get Used Point Index For Control Point" + }, + "params": [ + { + "typeid": "{72039442-EB38-4D42-A1AD-CB68F7E0EEF6}", + "details": { + "name": "int" + } + } + ], + "results": [ + { + "typeid": "{72039442-EB38-4D42-A1AD-CB68F7E0EEF6}", + "details": { + "name": "int" + } + } + ] + }, + { + "base": "GetVertexCount", + "context": "MeshData", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Get Vertex Count" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Get Vertex Count is invoked" + }, + "details": { + "name": "Get Vertex Count" + }, + "results": [ + { + "typeid": "{43DA906B-7DEF-4CA8-9790-854106D3F983}", + "details": { + "name": "unsigned int" + } + } + ] + }, + { + "base": "GetFaceCount", + "context": "MeshData", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Get Face Count" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Get Face Count is invoked" + }, + "details": { + "name": "Get Face Count" + }, + "results": [ + { + "typeid": "{43DA906B-7DEF-4CA8-9790-854106D3F983}", + "details": { + "name": "unsigned int" + } + } + ] + }, + { + "base": "GetUsedControlPointCount", + "context": "MeshData", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Get Used Control Point Count" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Get Used Control Point Count is invoked" + }, + "details": { + "name": "Get Used Control Point Count" + }, + "results": [ + { + "typeid": "{D6597933-47CD-4FC8-B911-63F3E2B0993A}", + "details": { + "name": "AZ::u 64" + } + } + ] + }, + { + "base": "GetFaceMaterialId", + "context": "MeshData", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Get Face Material Id" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Get Face Material Id is invoked" + }, + "details": { + "name": "Get Face Material Id" + }, + "params": [ + { + "typeid": "{43DA906B-7DEF-4CA8-9790-854106D3F983}", + "details": { + "name": "unsigned int" + } + } + ], + "results": [ + { + "typeid": "{43DA906B-7DEF-4CA8-9790-854106D3F983}", + "details": { + "name": "unsigned int" + } + } + ] + }, + { + "base": "GetControlPointIndex", + "context": "MeshData", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Get Control Point Index" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Get Control Point Index is invoked" + }, + "details": { + "name": "Get Control Point Index" + }, + "params": [ + { + "typeid": "{72039442-EB38-4D42-A1AD-CB68F7E0EEF6}", + "details": { + "name": "int" + } + } + ], + "results": [ + { + "typeid": "{72039442-EB38-4D42-A1AD-CB68F7E0EEF6}", + "details": { + "name": "int" + } + } + ] + } + ] + } + ] +} \ No newline at end of file diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Classes/MeshVertexBitangentData.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Classes/MeshVertexBitangentData.names new file mode 100644 index 0000000000..94bb07c7bd --- /dev/null +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Classes/MeshVertexBitangentData.names @@ -0,0 +1,143 @@ +{ + "entries": [ + { + "base": "MeshVertexBitangentData", + "context": "BehaviorClass", + "variant": "", + "details": { + "name": "Mesh Vertex Bitangent Data", + "category": "Rendering" + }, + "methods": [ + { + "base": "GetCount", + "context": "MeshVertexBitangentData", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Get Count" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Get Count is invoked" + }, + "details": { + "name": "Get Count" + }, + "results": [ + { + "typeid": "{D6597933-47CD-4FC8-B911-63F3E2B0993A}", + "details": { + "name": "AZ::u 64" + } + } + ] + }, + { + "base": "GetBitangent", + "context": "MeshVertexBitangentData", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Get Bitangent" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Get Bitangent is invoked" + }, + "details": { + "name": "Get Bitangent" + }, + "params": [ + { + "typeid": "{D6597933-47CD-4FC8-B911-63F3E2B0993A}", + "details": { + "name": "AZ::u 64" + } + } + ], + "results": [ + { + "typeid": "{8379EB7D-01FA-4538-B64B-A6543B4BE73D}", + "details": { + "name": "const Vector 3&" + } + } + ] + }, + { + "base": "GetBitangentSetIndex", + "context": "MeshVertexBitangentData", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Get Bitangent Set Index" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Get Bitangent Set Index is invoked" + }, + "details": { + "name": "Get Bitangent Set Index" + }, + "results": [ + { + "typeid": "{D6597933-47CD-4FC8-B911-63F3E2B0993A}", + "details": { + "name": "AZ::u 64" + } + } + ] + }, + { + "base": "GetGenerationMethod", + "context": "MeshVertexBitangentData", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Get Generation Method" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Get Generation Method is invoked" + }, + "details": { + "name": "Get Generation Method" + }, + "results": [ + { + "typeid": "{72039442-EB38-4D42-A1AD-CB68F7E0EEF6}", + "details": { + "name": "int" + } + } + ] + }, + { + "base": "GetFromSourceScene", + "details": { + "name": "Get From Source Scene" + }, + "results": [ + { + "typeid": "{72039442-EB38-4D42-A1AD-CB68F7E0EEF6}", + "details": { + "name": "int" + } + } + ] + }, + { + "base": "GetMikkT", + "details": { + "name": "Get MikkT" + }, + "results": [ + { + "typeid": "{72039442-EB38-4D42-A1AD-CB68F7E0EEF6}", + "details": { + "name": "int" + } + } + ] + } + ] + } + ] +} \ No newline at end of file diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Classes/MeshVertexColorData.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Classes/MeshVertexColorData.names new file mode 100644 index 0000000000..ef3d2d6966 --- /dev/null +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Classes/MeshVertexColorData.names @@ -0,0 +1,92 @@ +{ + "entries": [ + { + "base": "MeshVertexColorData", + "context": "BehaviorClass", + "variant": "", + "details": { + "name": "Mesh Vertex Color Data", + "category": "Rendering" + }, + "methods": [ + { + "base": "GetCustomName", + "context": "MeshVertexColorData", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Get Custom Name" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Get Custom Name is invoked" + }, + "details": { + "name": "Get Custom Name" + }, + "results": [ + { + "typeid": "{3AB0037F-AF8D-48CE-BCA0-A170D18B2C03}", + "details": { + "name": "const char*" + } + } + ] + }, + { + "base": "GetCount", + "context": "MeshVertexColorData", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Get Count" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Get Count is invoked" + }, + "details": { + "name": "Get Count" + }, + "results": [ + { + "typeid": "{D6597933-47CD-4FC8-B911-63F3E2B0993A}", + "details": { + "name": "AZ::u 64" + } + } + ] + }, + { + "base": "GetColor", + "context": "MeshVertexColorData", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Get Color" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Get Color is invoked" + }, + "details": { + "name": "Get Color" + }, + "params": [ + { + "typeid": "{D6597933-47CD-4FC8-B911-63F3E2B0993A}", + "details": { + "name": "AZ::u 64" + } + } + ], + "results": [ + { + "typeid": "{937E3BF8-5204-4D40-A8DA-C8F083C89F9F}", + "details": { + "name": "const SceneAPI:: Data Types:: Color&" + } + } + ] + } + ] + } + ] +} \ No newline at end of file diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Classes/MeshVertexTangentData.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Classes/MeshVertexTangentData.names new file mode 100644 index 0000000000..c31e00a38e --- /dev/null +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Classes/MeshVertexTangentData.names @@ -0,0 +1,143 @@ +{ + "entries": [ + { + "base": "MeshVertexTangentData", + "context": "BehaviorClass", + "variant": "", + "details": { + "name": "Mesh Vertex Tangent Data", + "category": "Rendering" + }, + "methods": [ + { + "base": "GetCount", + "context": "MeshVertexTangentData", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Get Count" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Get Count is invoked" + }, + "details": { + "name": "Get Count" + }, + "results": [ + { + "typeid": "{D6597933-47CD-4FC8-B911-63F3E2B0993A}", + "details": { + "name": "AZ::u 64" + } + } + ] + }, + { + "base": "GetTangent", + "context": "MeshVertexTangentData", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Get Tangent" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Get Tangent is invoked" + }, + "details": { + "name": "Get Tangent" + }, + "params": [ + { + "typeid": "{D6597933-47CD-4FC8-B911-63F3E2B0993A}", + "details": { + "name": "AZ::u 64" + } + } + ], + "results": [ + { + "typeid": "{0CE9FA36-1E3A-4C06-9254-B7C73A732053}", + "details": { + "name": "const Vector 4&" + } + } + ] + }, + { + "base": "GetTangentSetIndex", + "context": "MeshVertexTangentData", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Get Tangent Set Index" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Get Tangent Set Index is invoked" + }, + "details": { + "name": "Get Tangent Set Index" + }, + "results": [ + { + "typeid": "{D6597933-47CD-4FC8-B911-63F3E2B0993A}", + "details": { + "name": "AZ::u 64" + } + } + ] + }, + { + "base": "GetGenerationMethod", + "context": "MeshVertexTangentData", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Get Generation Method" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Get Generation Method is invoked" + }, + "details": { + "name": "Get Generation Method" + }, + "results": [ + { + "typeid": "{72039442-EB38-4D42-A1AD-CB68F7E0EEF6}", + "details": { + "name": "int" + } + } + ] + }, + { + "base": "GetFromSourceScene", + "details": { + "name": "Get From Source Scene" + }, + "results": [ + { + "typeid": "{72039442-EB38-4D42-A1AD-CB68F7E0EEF6}", + "details": { + "name": "int" + } + } + ] + }, + { + "base": "GetMikkT", + "details": { + "name": "Get MikkT" + }, + "results": [ + { + "typeid": "{72039442-EB38-4D42-A1AD-CB68F7E0EEF6}", + "details": { + "name": "int" + } + } + ] + } + ] + } + ] +} \ No newline at end of file diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Classes/MeshVertexUVData.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Classes/MeshVertexUVData.names new file mode 100644 index 0000000000..b9b2c3252b --- /dev/null +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Classes/MeshVertexUVData.names @@ -0,0 +1,92 @@ +{ + "entries": [ + { + "base": "MeshVertexUVData", + "context": "BehaviorClass", + "variant": "", + "details": { + "name": "Mesh VertexUV Data", + "category": "Rendering" + }, + "methods": [ + { + "base": "GetCustomName", + "context": "MeshVertexUVData", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Get Custom Name" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Get Custom Name is invoked" + }, + "details": { + "name": "Get Custom Name" + }, + "results": [ + { + "typeid": "{3AB0037F-AF8D-48CE-BCA0-A170D18B2C03}", + "details": { + "name": "const char*" + } + } + ] + }, + { + "base": "GetCount", + "context": "MeshVertexUVData", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Get Count" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Get Count is invoked" + }, + "details": { + "name": "Get Count" + }, + "results": [ + { + "typeid": "{D6597933-47CD-4FC8-B911-63F3E2B0993A}", + "details": { + "name": "AZ::u 64" + } + } + ] + }, + { + "base": "GetUV", + "context": "MeshVertexUVData", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke GetUV" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after GetUV is invoked" + }, + "details": { + "name": "GetUV" + }, + "params": [ + { + "typeid": "{D6597933-47CD-4FC8-B911-63F3E2B0993A}", + "details": { + "name": "AZ::u 64" + } + } + ], + "results": [ + { + "typeid": "{3D80F623-C85C-4741-90D0-E4E66164E6BF}", + "details": { + "name": "const Vector 2&" + } + } + ] + } + ] + } + ] +} \ No newline at end of file diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Classes/MixedGradientComponent.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Classes/MixedGradientComponent.names new file mode 100644 index 0000000000..d25ce96a86 --- /dev/null +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Classes/MixedGradientComponent.names @@ -0,0 +1,12 @@ +{ + "entries": [ + { + "base": "MixedGradientComponent", + "context": "BehaviorClass", + "variant": "", + "details": { + "name": "MixedGradientComponent" + } + } + ] +} \ No newline at end of file diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Classes/MixedGradientConfig.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Classes/MixedGradientConfig.names new file mode 100644 index 0000000000..a9d42f497a --- /dev/null +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Classes/MixedGradientConfig.names @@ -0,0 +1,138 @@ +{ + "entries": [ + { + "base": "MixedGradientConfig", + "context": "BehaviorClass", + "variant": "", + "details": { + "name": "MixedGradientConfig" + }, + "methods": [ + { + "base": "GetNumLayers", + "context": "MixedGradientConfig", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke GetNumLayers" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after GetNumLayers is invoked" + }, + "details": { + "name": "MixedGradientConfig::GetNumLayers", + "category": "Other" + }, + "params": [ + { + "typeid": "{40403A44-31FE-4D1D-941C-6593759CCCBD}", + "details": { + "name": "MixedGradientConfig*" + } + } + ], + "results": [ + { + "typeid": "{D6597933-47CD-4FC8-B911-63F3E2B0993A}", + "details": { + "name": "AZ::u64" + } + } + ] + }, + { + "base": "AddLayer", + "context": "MixedGradientConfig", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke AddLayer" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after AddLayer is invoked" + }, + "details": { + "name": "MixedGradientConfig::AddLayer", + "category": "Other" + }, + "params": [ + { + "typeid": "{40403A44-31FE-4D1D-941C-6593759CCCBD}", + "details": { + "name": "MixedGradientConfig*" + } + } + ] + }, + { + "base": "RemoveLayer", + "context": "MixedGradientConfig", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke RemoveLayer" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after RemoveLayer is invoked" + }, + "details": { + "name": "MixedGradientConfig::RemoveLayer", + "category": "Other" + }, + "params": [ + { + "typeid": "{40403A44-31FE-4D1D-941C-6593759CCCBD}", + "details": { + "name": "MixedGradientConfig*" + } + }, + { + "typeid": "{72039442-EB38-4D42-A1AD-CB68F7E0EEF6}", + "details": { + "name": "int" + } + } + ] + }, + { + "base": "GetLayer", + "context": "MixedGradientConfig", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke GetLayer" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after GetLayer is invoked" + }, + "details": { + "name": "MixedGradientConfig::GetLayer", + "category": "Other" + }, + "params": [ + { + "typeid": "{40403A44-31FE-4D1D-941C-6593759CCCBD}", + "details": { + "name": "MixedGradientConfig*" + } + }, + { + "typeid": "{72039442-EB38-4D42-A1AD-CB68F7E0EEF6}", + "details": { + "name": "int" + } + } + ], + "results": [ + { + "typeid": "{957264F7-A169-4D47-B94C-659B078026D4}", + "details": { + "name": "MixedGradientLayer*" + } + } + ] + } + ] + } + ] +} \ No newline at end of file diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Classes/MixedGradientLayer.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Classes/MixedGradientLayer.names new file mode 100644 index 0000000000..e192fe2c63 --- /dev/null +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Classes/MixedGradientLayer.names @@ -0,0 +1,12 @@ +{ + "entries": [ + { + "base": "MixedGradientLayer", + "context": "BehaviorClass", + "variant": "", + "details": { + "name": "MixedGradientLayer" + } + } + ] +} \ No newline at end of file diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Classes/ModelPreset.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Classes/ModelPreset.names new file mode 100644 index 0000000000..c69a75db5e --- /dev/null +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Classes/ModelPreset.names @@ -0,0 +1,140 @@ +{ + "entries": [ + { + "base": "ModelPreset", + "context": "BehaviorClass", + "variant": "", + "details": { + "name": "Model Preset" + }, + "methods": [ + { + "base": "GetdisplayName", + "details": { + "name": "Get Display Name" + }, + "params": [ + { + "typeid": "{A7304AE2-EC26-44A4-8C00-89D9731CCB13}", + "details": { + "name": "Model Preset" + } + } + ], + "results": [ + { + "typeid": "{03AAAB3F-5C47-5A66-9EBC-D5FA4DB353C9}", + "details": { + "name": "Display Name" + } + } + ] + }, + { + "base": "SetdisplayName", + "details": { + "name": "Set Display Name" + }, + "params": [ + { + "typeid": "{A7304AE2-EC26-44A4-8C00-89D9731CCB13}", + "details": { + "name": "Model Preset" + } + }, + { + "typeid": "{03AAAB3F-5C47-5A66-9EBC-D5FA4DB353C9}", + "details": { + "name": "Display Name" + } + } + ] + }, + { + "base": "GetmodelAsset", + "details": { + "name": "Get Model Asset" + }, + "params": [ + { + "typeid": "{A7304AE2-EC26-44A4-8C00-89D9731CCB13}", + "details": { + "name": "Model Preset" + } + } + ], + "results": [ + { + "typeid": "{A1F6761B-B5CA-59E6-89FF-EB0ABDF6BD68}", + "details": { + "name": "Model Asset" + } + } + ] + }, + { + "base": "SetmodelAsset", + "details": { + "name": "Set Model Asset" + }, + "params": [ + { + "typeid": "{A7304AE2-EC26-44A4-8C00-89D9731CCB13}", + "details": { + "name": "Model Preset" + } + }, + { + "typeid": "{A1F6761B-B5CA-59E6-89FF-EB0ABDF6BD68}", + "details": { + "name": "Model Asset" + } + } + ] + }, + { + "base": "GetpreviewImageAsset", + "details": { + "name": "Get Preview Image Asset" + }, + "params": [ + { + "typeid": "{A7304AE2-EC26-44A4-8C00-89D9731CCB13}", + "details": { + "name": "Model Preset" + } + } + ], + "results": [ + { + "typeid": "{403A7CFE-B218-5D57-8540-BD58E734BCFE}", + "details": { + "name": "Preview Image Asset" + } + } + ] + }, + { + "base": "SetpreviewImageAsset", + "details": { + "name": "Set Preview Image Asset" + }, + "params": [ + { + "typeid": "{A7304AE2-EC26-44A4-8C00-89D9731CCB13}", + "details": { + "name": "Model Preset" + } + }, + { + "typeid": "{403A7CFE-B218-5D57-8540-BD58E734BCFE}", + "details": { + "name": "Preview Image Asset" + } + } + ] + } + ] + } + ] +} \ No newline at end of file diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Classes/MotionEvent.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Classes/MotionEvent.names new file mode 100644 index 0000000000..fccd0720b5 --- /dev/null +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Classes/MotionEvent.names @@ -0,0 +1,353 @@ +{ + "entries": [ + { + "base": "MotionEvent", + "context": "BehaviorClass", + "variant": "", + "details": { + "name": "Motion Event", + "category": "Animation" + }, + "methods": [ + { + "base": "GetlocalWeight", + "details": { + "name": "Get Local Weight" + }, + "params": [ + { + "typeid": "{0C899DAC-6B19-4BDD-AD8C-8A11EF2A6729}", + "details": { + "name": "Motion Event" + } + } + ], + "results": [ + { + "typeid": "{EA2C3E90-AFBE-44D4-A90D-FAAF79BAF93D}", + "details": { + "name": "Local Weight" + } + } + ] + }, + { + "base": "SetlocalWeight", + "details": { + "name": "Set Local Weight" + }, + "params": [ + { + "typeid": "{0C899DAC-6B19-4BDD-AD8C-8A11EF2A6729}", + "details": { + "name": "Motion Event" + } + }, + { + "typeid": "{EA2C3E90-AFBE-44D4-A90D-FAAF79BAF93D}", + "details": { + "name": "Local Weight" + } + } + ] + }, + { + "base": "GetglobalWeight", + "details": { + "name": "Get Global Weight" + }, + "params": [ + { + "typeid": "{0C899DAC-6B19-4BDD-AD8C-8A11EF2A6729}", + "details": { + "name": "Motion Event" + } + } + ], + "results": [ + { + "typeid": "{EA2C3E90-AFBE-44D4-A90D-FAAF79BAF93D}", + "details": { + "name": "Global Weight" + } + } + ] + }, + { + "base": "SetglobalWeight", + "details": { + "name": "Set Global Weight" + }, + "params": [ + { + "typeid": "{0C899DAC-6B19-4BDD-AD8C-8A11EF2A6729}", + "details": { + "name": "Motion Event" + } + }, + { + "typeid": "{EA2C3E90-AFBE-44D4-A90D-FAAF79BAF93D}", + "details": { + "name": "Global Weight" + } + } + ] + }, + { + "base": "Gettime", + "details": { + "name": "Get Time" + }, + "params": [ + { + "typeid": "{0C899DAC-6B19-4BDD-AD8C-8A11EF2A6729}", + "details": { + "name": "Motion Event" + } + } + ], + "results": [ + { + "typeid": "{EA2C3E90-AFBE-44D4-A90D-FAAF79BAF93D}", + "details": { + "name": "Time" + } + } + ] + }, + { + "base": "Settime", + "details": { + "name": "Set Time" + }, + "params": [ + { + "typeid": "{0C899DAC-6B19-4BDD-AD8C-8A11EF2A6729}", + "details": { + "name": "Motion Event" + } + }, + { + "typeid": "{EA2C3E90-AFBE-44D4-A90D-FAAF79BAF93D}", + "details": { + "name": "Time" + } + } + ] + }, + { + "base": "GeteventType", + "details": { + "name": "Get Event Type" + }, + "params": [ + { + "typeid": "{0C899DAC-6B19-4BDD-AD8C-8A11EF2A6729}", + "details": { + "name": "Motion Event" + } + } + ], + "results": [ + { + "typeid": "{43DA906B-7DEF-4CA8-9790-854106D3F983}", + "details": { + "name": "Event Type" + } + } + ] + }, + { + "base": "SeteventType", + "details": { + "name": "Set Event Type" + }, + "params": [ + { + "typeid": "{0C899DAC-6B19-4BDD-AD8C-8A11EF2A6729}", + "details": { + "name": "Motion Event" + } + }, + { + "typeid": "{43DA906B-7DEF-4CA8-9790-854106D3F983}", + "details": { + "name": "Event Type" + } + } + ] + }, + { + "base": "GeteventTypeName", + "details": { + "name": "Get Event Type Name" + }, + "params": [ + { + "typeid": "{0C899DAC-6B19-4BDD-AD8C-8A11EF2A6729}", + "details": { + "name": "Motion Event" + } + } + ], + "results": [ + { + "typeid": "{3AB0037F-AF8D-48CE-BCA0-A170D18B2C03}", + "details": { + "name": "Event Type Name" + } + } + ] + }, + { + "base": "SeteventTypeName", + "details": { + "name": "Set Event Type Name" + }, + "params": [ + { + "typeid": "{0C899DAC-6B19-4BDD-AD8C-8A11EF2A6729}", + "details": { + "name": "Motion Event" + } + }, + { + "typeid": "{3AB0037F-AF8D-48CE-BCA0-A170D18B2C03}", + "details": { + "name": "Event Type Name" + } + } + ] + }, + { + "base": "GetisEventStart", + "details": { + "name": "Get Is Event Start" + }, + "params": [ + { + "typeid": "{0C899DAC-6B19-4BDD-AD8C-8A11EF2A6729}", + "details": { + "name": "Motion Event" + } + } + ], + "results": [ + { + "typeid": "{A0CA880C-AFE4-43CB-926C-59AC48496112}", + "details": { + "name": "Is Event Start" + } + } + ] + }, + { + "base": "SetisEventStart", + "details": { + "name": "Set Is Event Start" + }, + "params": [ + { + "typeid": "{0C899DAC-6B19-4BDD-AD8C-8A11EF2A6729}", + "details": { + "name": "Motion Event" + } + }, + { + "typeid": "{A0CA880C-AFE4-43CB-926C-59AC48496112}", + "details": { + "name": "Is Event Start" + } + } + ] + }, + { + "base": "Getparameter", + "details": { + "name": "Get Parameter" + }, + "params": [ + { + "typeid": "{0C899DAC-6B19-4BDD-AD8C-8A11EF2A6729}", + "details": { + "name": "Motion Event" + } + } + ], + "results": [ + { + "typeid": "{3AB0037F-AF8D-48CE-BCA0-A170D18B2C03}", + "details": { + "name": "Parameter" + } + } + ] + }, + { + "base": "Setparameter", + "details": { + "name": "Set Parameter" + }, + "params": [ + { + "typeid": "{0C899DAC-6B19-4BDD-AD8C-8A11EF2A6729}", + "details": { + "name": "Motion Event" + } + }, + { + "typeid": "{3AB0037F-AF8D-48CE-BCA0-A170D18B2C03}", + "details": { + "name": "Parameter" + } + } + ] + }, + { + "base": "GetentityId", + "details": { + "name": "Get Entity Id" + }, + "params": [ + { + "typeid": "{0C899DAC-6B19-4BDD-AD8C-8A11EF2A6729}", + "details": { + "name": "Motion Event" + } + } + ], + "results": [ + { + "typeid": "{6383F1D3-BB27-4E6B-A49A-6409B2059EAA}", + "details": { + "name": "Entity Id", + "tooltip": "Entity Unique Id" + } + } + ] + }, + { + "base": "SetentityId", + "details": { + "name": "Set Entity Id" + }, + "params": [ + { + "typeid": "{0C899DAC-6B19-4BDD-AD8C-8A11EF2A6729}", + "details": { + "name": "Motion Event" + } + }, + { + "typeid": "{6383F1D3-BB27-4E6B-A49A-6409B2059EAA}", + "details": { + "name": "Entity Id", + "tooltip": "Entity Unique Id" + } + } + ] + } + ] + } + ] +} \ No newline at end of file diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Classes/MultiplayerSystemComponent.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Classes/MultiplayerSystemComponent.names new file mode 100644 index 0000000000..d7ed32a229 --- /dev/null +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Classes/MultiplayerSystemComponent.names @@ -0,0 +1,47 @@ +{ + "entries": [ + { + "base": "MultiplayerSystemComponent", + "context": "BehaviorClass", + "variant": "", + "details": { + "name": "Multiplayer" + }, + "methods": [ + { + "base": "GetOnClientDisconnectedEvent", + "context": "MultiplayerSystemComponent", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Get On Client Disconnected Event" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Get On Client Disconnected Event is invoked" + }, + "details": { + "name": "Get On Client Disconnected Event", + "category": "Other" + }, + "params": [ + { + "typeid": "{6383F1D3-BB27-4E6B-A49A-6409B2059EAA}", + "details": { + "name": "Entity Id", + "tooltip": "Entity Unique Id" + } + } + ], + "results": [ + { + "typeid": "{F429F985-AF00-529B-8449-16E56694E5F9}", + "details": { + "name": "Event" + } + } + ] + } + ] + } + ] +} \ No newline at end of file diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Classes/Name.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Classes/Name.names new file mode 100644 index 0000000000..a6625f39d1 --- /dev/null +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Classes/Name.names @@ -0,0 +1,121 @@ +{ + "entries": [ + { + "base": "Name", + "context": "BehaviorClass", + "variant": "", + "details": { + "name": "Name", + "category": "Utilities" + }, + "methods": [ + { + "base": "ToString", + "context": "Name", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke To String" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after To String is invoked" + }, + "details": { + "name": "To String" + }, + "results": [ + { + "typeid": "{3AB0037F-AF8D-48CE-BCA0-A170D18B2C03}", + "details": { + "name": "const char*" + } + } + ] + }, + { + "base": "Set", + "context": "Name", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Set" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Set is invoked" + }, + "details": { + "name": "Set" + }, + "params": [ + { + "typeid": "{3D2B920C-9EFD-40D5-AAE0-DF131C3D4931}", + "details": { + "name": "Name" + } + }, + { + "typeid": "{7114E998-A8B4-519B-9342-A86D1587B4F7}", + "details": { + "name": "" + } + } + ] + }, + { + "base": "IsEmpty", + "context": "Name", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Is Empty" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Is Empty is invoked" + }, + "details": { + "name": "Is Empty" + }, + "results": [ + { + "typeid": "{A0CA880C-AFE4-43CB-926C-59AC48496112}", + "details": { + "name": "bool" + } + } + ] + }, + { + "base": "Equal", + "context": "Name", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Equal" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Equal is invoked" + }, + "details": { + "name": "Equal" + }, + "params": [ + { + "typeid": "{3D2B920C-9EFD-40D5-AAE0-DF131C3D4931}", + "details": { + "name": "Name" + } + } + ], + "results": [ + { + "typeid": "{A0CA880C-AFE4-43CB-926C-59AC48496112}", + "details": { + "name": "bool" + } + } + ] + } + ] + } + ] +} \ No newline at end of file diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Classes/NetBindComponent.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Classes/NetBindComponent.names new file mode 100644 index 0000000000..0a5f5f8de8 --- /dev/null +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Classes/NetBindComponent.names @@ -0,0 +1,147 @@ +{ + "entries": [ + { + "base": "NetBindComponent", + "context": "BehaviorClass", + "variant": "", + "details": { + "name": "Net Entity", + "category": "Multiplayer" + }, + "methods": [ + { + "base": "IsNetEntityRoleAuthority", + "context": "NetBindComponent", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Is Net Entity Role Authority" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Is Net Entity Role Authority is invoked" + }, + "details": { + "name": "Is Role Authority", + "category": "Other" + }, + "params": [ + { + "typeid": "{6383F1D3-BB27-4E6B-A49A-6409B2059EAA}", + "details": { + "name": "Entity Id", + "tooltip": "Entity Unique Id" + } + } + ], + "results": [ + { + "typeid": "{A0CA880C-AFE4-43CB-926C-59AC48496112}", + "details": { + "name": "Is Role Authority" + } + } + ] + }, + { + "base": "IsNetEntityRoleAutonomous", + "context": "NetBindComponent", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke IsNetEntityRoleAutonomous" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Is Net Entity Role Autonomous is invoked" + }, + "details": { + "name": "Is Role Autonomous", + "category": "Other" + }, + "params": [ + { + "typeid": "{6383F1D3-BB27-4E6B-A49A-6409B2059EAA}", + "details": { + "name": "Entity Id", + "tooltip": "Entity Unique Id" + } + } + ], + "results": [ + { + "typeid": "{A0CA880C-AFE4-43CB-926C-59AC48496112}", + "details": { + "name": "Is Role Autonomous" + } + } + ] + }, + { + "base": "IsNetEntityRoleClient", + "context": "NetBindComponent", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Is Role Client" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Is Role Client is invoked" + }, + "details": { + "name": "Is Role Client", + "category": "Other" + }, + "params": [ + { + "typeid": "{6383F1D3-BB27-4E6B-A49A-6409B2059EAA}", + "details": { + "name": "Entity Id", + "tooltip": "Entity Unique Id" + } + } + ], + "results": [ + { + "typeid": "{A0CA880C-AFE4-43CB-926C-59AC48496112}", + "details": { + "name": "Is Role Client" + } + } + ] + }, + { + "base": "IsNetEntityRoleServer", + "context": "NetBindComponent", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Is Role Server" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Is Role Server is invoked" + }, + "details": { + "name": "Is Role Server", + "category": "Other" + }, + "params": [ + { + "typeid": "{6383F1D3-BB27-4E6B-A49A-6409B2059EAA}", + "details": { + "name": "Entity Id", + "tooltip": "Entity Unique Id" + } + } + ], + "results": [ + { + "typeid": "{A0CA880C-AFE4-43CB-926C-59AC48496112}", + "details": { + "name": "Is Role Server" + } + } + ] + } + ] + } + ] +} \ No newline at end of file diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Classes/NetworkTestPlayerComponent.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Classes/NetworkTestPlayerComponent.names new file mode 100644 index 0000000000..22636e0453 --- /dev/null +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Classes/NetworkTestPlayerComponent.names @@ -0,0 +1,438 @@ +{ + "entries": [ + { + "base": "NetworkTestPlayerComponent", + "context": "BehaviorClass", + "variant": "", + "details": { + "name": "Network Test Player Component" + }, + "methods": [ + { + "base": "AutonomousToAuthority", + "context": "NetworkTestPlayerComponent", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Autonomous To Authority" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Autonomous To Authority is invoked" + }, + "details": { + "name": "Autonomous To Authority" + }, + "params": [ + { + "typeid": "{CA5E5C37-98A6-04D2-E15C-1B4BFEE4C7DD}", + "details": { + "name": "Network Test Player Component" + } + }, + { + "typeid": "{EA2C3E90-AFBE-44D4-A90D-FAAF79BAF93D}", + "details": { + "name": "float" + } + } + ] + }, + { + "base": "ServerToAuthority", + "context": "NetworkTestPlayerComponent", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Server To Authority" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Server To Authority is invoked" + }, + "details": { + "name": "Server To Authority" + }, + "params": [ + { + "typeid": "{CA5E5C37-98A6-04D2-E15C-1B4BFEE4C7DD}", + "details": { + "name": "Network Test Player Component" + } + }, + { + "typeid": "{EA2C3E90-AFBE-44D4-A90D-FAAF79BAF93D}", + "details": { + "name": "float" + } + } + ] + }, + { + "base": "AutonomousToAuthorityByEntityId", + "context": "NetworkTestPlayerComponent", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Autonomous To Authority By Entity Id" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Autonomous To Authority By Entity Id is invoked" + }, + "details": { + "name": "Autonomous To Authority By Entity Id" + }, + "params": [ + { + "typeid": "{6383F1D3-BB27-4E6B-A49A-6409B2059EAA}", + "details": { + "name": "Source", + "tooltip": "The Source containing the NetworkTestPlayerComponentController" + } + }, + { + "typeid": "{EA2C3E90-AFBE-44D4-A90D-FAAF79BAF93D}", + "details": { + "name": "some Float" + } + } + ] + }, + { + "base": "ServerToAuthorityByEntityId", + "context": "NetworkTestPlayerComponent", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Server To Authority By Entity Id" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Server To Authority By Entity Id is invoked" + }, + "details": { + "name": "Server To Authority By Entity Id" + }, + "params": [ + { + "typeid": "{6383F1D3-BB27-4E6B-A49A-6409B2059EAA}", + "details": { + "name": "Source", + "tooltip": "The Source containing the NetworkTestPlayerComponentController" + } + }, + { + "typeid": "{EA2C3E90-AFBE-44D4-A90D-FAAF79BAF93D}", + "details": { + "name": "some Float" + } + } + ] + }, + { + "base": "AutonomousToAuthorityNoParams", + "context": "NetworkTestPlayerComponent", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Autonomous To Authority No Params" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Autonomous To Authority No Params is invoked" + }, + "details": { + "name": "Autonomous To Authority No Params" + }, + "params": [ + { + "typeid": "{CA5E5C37-98A6-04D2-E15C-1B4BFEE4C7DD}", + "details": { + "name": "Network Test Player Component" + } + } + ] + }, + { + "base": "AuthorityToAutonomous", + "context": "NetworkTestPlayerComponent", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Authority To Autonomous" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Authority To Autonomous is invoked" + }, + "details": { + "name": "Authority To Autonomous" + }, + "params": [ + { + "typeid": "{CA5E5C37-98A6-04D2-E15C-1B4BFEE4C7DD}", + "details": { + "name": "Network Test Player Component" + } + }, + { + "typeid": "{EA2C3E90-AFBE-44D4-A90D-FAAF79BAF93D}", + "details": { + "name": "float" + } + } + ] + }, + { + "base": "AuthorityToClientNoParams", + "context": "NetworkTestPlayerComponent", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Authority To Client No Params" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Authority To Client No Params is invoked" + }, + "details": { + "name": "Authority To Client No Params" + }, + "params": [ + { + "typeid": "{CA5E5C37-98A6-04D2-E15C-1B4BFEE4C7DD}", + "details": { + "name": "Network Test Player Component" + } + } + ] + }, + { + "base": "AuthorityToClientByEntityId", + "context": "NetworkTestPlayerComponent", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Authority To Client By Entity Id" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Authority To Client By Entity Id is invoked" + }, + "details": { + "name": "Authority To Client By Entity Id" + }, + "params": [ + { + "typeid": "{6383F1D3-BB27-4E6B-A49A-6409B2059EAA}", + "details": { + "name": "Source", + "tooltip": "The Source containing the NetworkTestPlayerComponentController" + } + }, + { + "typeid": "{EA2C3E90-AFBE-44D4-A90D-FAAF79BAF93D}", + "details": { + "name": "some Float" + } + } + ] + }, + { + "base": "AuthorityToClient", + "context": "NetworkTestPlayerComponent", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Authority To Client" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Authority To Client is invoked" + }, + "details": { + "name": "Authority To Client" + }, + "params": [ + { + "typeid": "{CA5E5C37-98A6-04D2-E15C-1B4BFEE4C7DD}", + "details": { + "name": "Network Test Player Component" + } + }, + { + "typeid": "{EA2C3E90-AFBE-44D4-A90D-FAAF79BAF93D}", + "details": { + "name": "float" + } + } + ] + }, + { + "base": "AuthorityToAutonomousNoParams", + "context": "NetworkTestPlayerComponent", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Authority To Autonomous No Params" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Authority To Autonomous No Params is invoked" + }, + "details": { + "name": "Authority To Autonomous No Params" + }, + "params": [ + { + "typeid": "{CA5E5C37-98A6-04D2-E15C-1B4BFEE4C7DD}", + "details": { + "name": "Network Test Player Component" + } + } + ] + }, + { + "base": "ServerToAuthorityNoParamByEntityId", + "context": "NetworkTestPlayerComponent", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Server To Authority No Param By Entity Id" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Server To Authority No Param By Entity Id is invoked" + }, + "details": { + "name": "Server To Authority No Param By Entity Id" + }, + "params": [ + { + "typeid": "{6383F1D3-BB27-4E6B-A49A-6409B2059EAA}", + "details": { + "name": "Source", + "tooltip": "The Source containing the NetworkTestPlayerComponentController" + } + } + ] + }, + { + "base": "AuthorityToClientNoParamsByEntityId", + "context": "NetworkTestPlayerComponent", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Authority To Client No Params By Entity Id" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Authority To Client No Params By Entity Id is invoked" + }, + "details": { + "name": "Authority To Client No Params By Entity Id" + }, + "params": [ + { + "typeid": "{6383F1D3-BB27-4E6B-A49A-6409B2059EAA}", + "details": { + "name": "Source", + "tooltip": "The Source containing the NetworkTestPlayerComponentController" + } + } + ] + }, + { + "base": "AuthorityToAutonomousByEntityId", + "context": "NetworkTestPlayerComponent", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Authority To Autonomous By Entity Id" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Authority To Autonomous By Entity Id is invoked" + }, + "details": { + "name": "Authority To Autonomous By Entity Id" + }, + "params": [ + { + "typeid": "{6383F1D3-BB27-4E6B-A49A-6409B2059EAA}", + "details": { + "name": "Source", + "tooltip": "The Source containing the NetworkTestPlayerComponentController" + } + }, + { + "typeid": "{EA2C3E90-AFBE-44D4-A90D-FAAF79BAF93D}", + "details": { + "name": "some Float" + } + } + ] + }, + { + "base": "AutonomousToAuthorityNoParamsByEntityId", + "context": "NetworkTestPlayerComponent", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Autonomous To Authority No Params By Entity Id" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Autonomous To Authority No Params By Entity Id is invoked" + }, + "details": { + "name": "Autonomous To Authority No Params By Entity Id" + }, + "params": [ + { + "typeid": "{6383F1D3-BB27-4E6B-A49A-6409B2059EAA}", + "details": { + "name": "Source", + "tooltip": "The Source containing the NetworkTestPlayerComponentController" + } + } + ] + }, + { + "base": "AuthorityToAutonomousNoParamsByEntityId", + "context": "NetworkTestPlayerComponent", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Authority To Autonomous No Params By Entity Id" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Authority To Autonomous No Params By Entity Id is invoked" + }, + "details": { + "name": "Authority To Autonomous No Params By Entity Id" + }, + "params": [ + { + "typeid": "{6383F1D3-BB27-4E6B-A49A-6409B2059EAA}", + "details": { + "name": "Source", + "tooltip": "The Source containing the NetworkTestPlayerComponentController" + } + } + ] + }, + { + "base": "ServerToAuthorityNoParam", + "context": "NetworkTestPlayerComponent", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Server To Authority No Param" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Server To Authority No Param is invoked" + }, + "details": { + "name": "Server To Authority No Param" + }, + "params": [ + { + "typeid": "{CA5E5C37-98A6-04D2-E15C-1B4BFEE4C7DD}", + "details": { + "name": "Network Test Player Component" + } + } + ] + } + ] + } + ] +} \ No newline at end of file diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Classes/NetworkTestPlayerComponentNetworkInput.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Classes/NetworkTestPlayerComponentNetworkInput.names new file mode 100644 index 0000000000..d8c016db0f --- /dev/null +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Classes/NetworkTestPlayerComponentNetworkInput.names @@ -0,0 +1,129 @@ +{ + "entries": [ + { + "base": "NetworkTestPlayerComponentNetworkInput", + "context": "BehaviorClass", + "variant": "", + "details": { + "name": "Network Test Player Component Network Input" + }, + "methods": [ + { + "base": "CreateFromValues", + "context": "NetworkTestPlayerComponentNetworkInput", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Create From Values" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Create From Values is invoked" + }, + "details": { + "name": "Create From Values" + }, + "params": [ + { + "typeid": "{EA2C3E90-AFBE-44D4-A90D-FAAF79BAF93D}", + "details": { + "name": "left Right" + } + } + ], + "results": [ + { + "typeid": "{12A1776B-61F6-4E5F-356A-AD718A62051F}", + "details": { + "name": "Network Test Player Component Network Input" + } + } + ] + }, + { + "base": "GetFwdBack", + "details": { + "name": "Get Fwd Back" + }, + "params": [ + { + "typeid": "{12A1776B-61F6-4E5F-356A-AD718A62051F}", + "details": { + "name": "Network Test Player Component Network Input" + } + } + ], + "results": [ + { + "typeid": "{EA2C3E90-AFBE-44D4-A90D-FAAF79BAF93D}", + "details": { + "name": "Fwd Back" + } + } + ] + }, + { + "base": "SetFwdBack", + "details": { + "name": "Set Fwd Back" + }, + "params": [ + { + "typeid": "{12A1776B-61F6-4E5F-356A-AD718A62051F}", + "details": { + "name": "Network Test Player Component Network Input" + } + }, + { + "typeid": "{EA2C3E90-AFBE-44D4-A90D-FAAF79BAF93D}", + "details": { + "name": "Fwd Back" + } + } + ] + }, + { + "base": "GetLeftRight", + "details": { + "name": "Get Left Right" + }, + "params": [ + { + "typeid": "{12A1776B-61F6-4E5F-356A-AD718A62051F}", + "details": { + "name": "Network Test Player Component Network Input" + } + } + ], + "results": [ + { + "typeid": "{EA2C3E90-AFBE-44D4-A90D-FAAF79BAF93D}", + "details": { + "name": "Left Right" + } + } + ] + }, + { + "base": "SetLeftRight", + "details": { + "name": "Set Left Right" + }, + "params": [ + { + "typeid": "{12A1776B-61F6-4E5F-356A-AD718A62051F}", + "details": { + "name": "Network Test Player Component Network Input" + } + }, + { + "typeid": "{EA2C3E90-AFBE-44D4-A90D-FAAF79BAF93D}", + "details": { + "name": "Left Right" + } + } + ] + } + ] + } + ] +} \ No newline at end of file diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Classes/NodeIndex.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Classes/NodeIndex.names new file mode 100644 index 0000000000..1a47f39a19 --- /dev/null +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Classes/NodeIndex.names @@ -0,0 +1,145 @@ +{ + "entries": [ + { + "base": "NodeIndex", + "context": "BehaviorClass", + "variant": "", + "details": { + "name": "Node Index" + }, + "methods": [ + { + "base": "Equal", + "context": "NodeIndex", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Equal" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Equal is invoked" + }, + "details": { + "name": "Equal" + }, + "params": [ + { + "typeid": "{4AD18037-E629-480D-8165-997A137327FD}", + "details": { + "name": "" + } + } + ], + "results": [ + { + "typeid": "{A0CA880C-AFE4-43CB-926C-59AC48496112}", + "details": { + "name": "bool" + } + } + ] + }, + { + "base": "ToString", + "context": "NodeIndex", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke To String" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after To String is invoked" + }, + "details": { + "name": "To String" + }, + "results": [ + { + "typeid": "{03AAAB3F-5C47-5A66-9EBC-D5FA4DB353C9}", + "details": { + "name": "AZ Std::basic_string, allocator>" + } + } + ] + }, + { + "base": "IsValid", + "context": "NodeIndex", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Is Valid" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Is Valid is invoked" + }, + "details": { + "name": "Is Valid" + }, + "results": [ + { + "typeid": "{A0CA880C-AFE4-43CB-926C-59AC48496112}", + "details": { + "name": "bool" + } + } + ] + }, + { + "base": "Distance", + "context": "NodeIndex", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Distance" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Distance is invoked" + }, + "details": { + "name": "Distance" + }, + "params": [ + { + "typeid": "{4AD18037-E629-480D-8165-997A137327FD}", + "details": { + "name": "" + } + } + ], + "results": [ + { + "typeid": "{72039442-EB38-4D42-A1AD-CB68F7E0EEF6}", + "details": { + "name": "int" + } + } + ] + }, + { + "base": "AsNumber", + "context": "NodeIndex", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke As Number" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after As Number is invoked" + }, + "details": { + "name": "As Number" + }, + "results": [ + { + "typeid": "{43DA906B-7DEF-4CA8-9790-854106D3F983}", + "details": { + "name": "unsigned int" + } + } + ] + } + ] + } + ] +} \ No newline at end of file diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Classes/OutputDeviceTransformType.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Classes/OutputDeviceTransformType.names new file mode 100644 index 0000000000..31eae88454 --- /dev/null +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Classes/OutputDeviceTransformType.names @@ -0,0 +1,85 @@ +{ + "entries": [ + { + "base": "OutputDeviceTransformType", + "context": "BehaviorClass", + "variant": "", + "details": { + "name": "Output Device Transform Type", + "category": "Rendering" + }, + "methods": [ + { + "base": "GetOutputDeviceTransformType_NumOutputDeviceTransformTypes", + "details": { + "name": "Get Output Device Transform Type_ Num Output Device Transform Types" + }, + "results": [ + { + "typeid": "{72039442-EB38-4D42-A1AD-CB68F7E0EEF6}", + "details": { + "name": "int" + } + } + ] + }, + { + "base": "GetOutputDeviceTransformType_4000Nits", + "details": { + "name": "Get Output Device Transform Type_ 4000 Nits" + }, + "results": [ + { + "typeid": "{72039442-EB38-4D42-A1AD-CB68F7E0EEF6}", + "details": { + "name": "int" + } + } + ] + }, + { + "base": "GetOutputDeviceTransformType_2000Nits", + "details": { + "name": "Get Output Device Transform Type_ 2000 Nits" + }, + "results": [ + { + "typeid": "{72039442-EB38-4D42-A1AD-CB68F7E0EEF6}", + "details": { + "name": "int" + } + } + ] + }, + { + "base": "GetOutputDeviceTransformType_100Nits", + "details": { + "name": "Get Output Device Transform Type_ 100 Nits" + }, + "results": [ + { + "typeid": "{72039442-EB38-4D42-A1AD-CB68F7E0EEF6}", + "details": { + "name": "int" + } + } + ] + }, + { + "base": "GetOutputDeviceTransformType_48Nits", + "details": { + "name": "Get Output Device Transform Type_ 48 Nits" + }, + "results": [ + { + "typeid": "{72039442-EB38-4D42-A1AD-CB68F7E0EEF6}", + "details": { + "name": "int" + } + } + ] + } + ] + } + ] +} \ No newline at end of file diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Classes/PerlinGradientComponent.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Classes/PerlinGradientComponent.names new file mode 100644 index 0000000000..1f84509238 --- /dev/null +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Classes/PerlinGradientComponent.names @@ -0,0 +1,12 @@ +{ + "entries": [ + { + "base": "PerlinGradientComponent", + "context": "BehaviorClass", + "variant": "", + "details": { + "name": "PerlinGradientComponent" + } + } + ] +} \ No newline at end of file diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Classes/PerlinGradientConfig.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Classes/PerlinGradientConfig.names new file mode 100644 index 0000000000..970558cfd9 --- /dev/null +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Classes/PerlinGradientConfig.names @@ -0,0 +1,12 @@ +{ + "entries": [ + { + "base": "PerlinGradientConfig", + "context": "BehaviorClass", + "variant": "", + "details": { + "name": "PerlinGradientConfig" + } + } + ] +} \ No newline at end of file diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Classes/PhysicsScene.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Classes/PhysicsScene.names new file mode 100644 index 0000000000..07faa4053b --- /dev/null +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Classes/PhysicsScene.names @@ -0,0 +1,83 @@ +{ + "entries": [ + { + "base": "PhysicsScene", + "context": "BehaviorClass", + "variant": "", + "details": { + "name": "Physics Scene" + }, + "methods": [ + { + "base": "GetOnGravityChangeEvent", + "context": "PhysicsScene", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Get On Gravity Change Event" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Get On Gravity Change Event is invoked" + }, + "details": { + "name": "Get On Gravity Change Event" + }, + "params": [ + { + "typeid": "{03AAAB3F-5C47-5A66-9EBC-D5FA4DB353C9}", + "details": { + "name": "Scene Name" + } + } + ], + "results": [ + { + "typeid": "{4985DFB0-7CD9-5B28-980B-BA2C701BE3D6}", + "details": { + "name": "Gravity Change Event" + } + } + ] + }, + { + "base": "QueryScene", + "context": "PhysicsScene", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Query Scene" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Query Scene is invoked" + }, + "details": { + "name": "Query Scene" + }, + "params": [ + { + "typeid": "{52BD8163-BDC4-4B09-ABB2-11DD1F601FFD}", + "details": { + "name": "Scene" + } + }, + { + "typeid": "{76ECAB7D-42BA-461F-82E6-DCED8E1BDCB9}", + "details": { + "name": "const SceneQueryRequest*", + "tooltip": "Parameters for scene queries" + } + } + ], + "results": [ + { + "typeid": "{BAFCC4E7-A06B-4909-B2AE-C89D9E84FE4E}", + "details": { + "name": "Scene Query Hits" + } + } + ] + } + ] + } + ] +} \ No newline at end of file diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Classes/PhysicsSystemInterface.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Classes/PhysicsSystemInterface.names new file mode 100644 index 0000000000..d1eb03798d --- /dev/null +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Classes/PhysicsSystemInterface.names @@ -0,0 +1,135 @@ +{ + "entries": [ + { + "base": "PhysicsSystemInterface", + "context": "BehaviorClass", + "variant": "", + "details": { + "name": "Physics System", + "category": "PhysX" + }, + "methods": [ + { + "base": "GetOnPresimulateEvent", + "context": "PhysicsSystemInterface", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Get On Pre Simulate Event" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Get On Pre Simulate Event is invoked" + }, + "details": { + "name": "Get On Pre Simulate Event" + }, + "results": [ + { + "typeid": "{F0A3166F-115C-5C3E-8D65-28FBA4420028}", + "details": { + "name": "Event" + } + } + ] + }, + { + "base": "GetOnPostsimulateEvent", + "context": "PhysicsSystemInterface", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Get On Post Simulate Event" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Get On Post Simulate Event is invoked" + }, + "details": { + "name": "Get On Post Simulate Event" + }, + "results": [ + { + "typeid": "{F0A3166F-115C-5C3E-8D65-28FBA4420028}", + "details": { + "name": "Event" + } + } + ] + }, + { + "base": "GetSceneHandle", + "context": "PhysicsSystemInterface", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Get Scene Handle" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Get Scene Handle is invoked" + }, + "details": { + "name": "Get Scene Handle" + }, + "params": [ + { + "typeid": "{B6F4D92A-061B-4CB3-AAB5-984B599A53AE}", + "details": { + "name": "System Interface" + } + }, + { + "typeid": "{03AAAB3F-5C47-5A66-9EBC-D5FA4DB353C9}", + "details": { + "name": "Scene Name" + } + } + ], + "results": [ + { + "typeid": "{36669095-4036-5479-B116-41A32E4E16EA}", + "details": { + "name": "Scene Handle" + } + } + ] + }, + { + "base": "GetScene", + "context": "PhysicsSystemInterface", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Get Scene" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Get Scene is invoked" + }, + "details": { + "name": "Get Scene" + }, + "params": [ + { + "typeid": "{B6F4D92A-061B-4CB3-AAB5-984B599A53AE}", + "details": { + "name": "System Interface" + } + }, + { + "typeid": "{36669095-4036-5479-B116-41A32E4E16EA}", + "details": { + "name": "Scene Handle" + } + } + ], + "results": [ + { + "typeid": "{52BD8163-BDC4-4B09-ABB2-11DD1F601FFD}", + "details": { + "name": "Scene" + } + } + ] + } + ] + } + ] +} \ No newline at end of file diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Classes/Platform.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Classes/Platform.names new file mode 100644 index 0000000000..c07b27df44 --- /dev/null +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Classes/Platform.names @@ -0,0 +1,130 @@ +{ + "entries": [ + { + "base": "Platform", + "context": "BehaviorClass", + "variant": "", + "details": { + "name": "Platform", + "category": "Utilities" + }, + "methods": [ + { + "base": "GetName", + "context": "Platform", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Get Name" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Get Name is invoked" + }, + "details": { + "name": "Get Name" + }, + "params": [ + { + "typeid": "{72039442-EB38-4D42-A1AD-CB68F7E0EEF6}", + "details": { + "name": "Id" + } + } + ], + "results": [ + { + "typeid": "{3AB0037F-AF8D-48CE-BCA0-A170D18B2C03}", + "details": { + "name": "Name" + } + } + ] + }, + { + "base": "GetMac", + "details": { + "name": "Get Mac" + }, + "results": [ + { + "typeid": "{72039442-EB38-4D42-A1AD-CB68F7E0EEF6}", + "details": { + "name": "Id" + } + } + ] + }, + { + "base": "GetLinux", + "details": { + "name": "Get Linux" + }, + "results": [ + { + "typeid": "{72039442-EB38-4D42-A1AD-CB68F7E0EEF6}", + "details": { + "name": "Id" + } + } + ] + }, + { + "base": "GetiOS", + "details": { + "name": "Get iOS" + }, + "results": [ + { + "typeid": "{72039442-EB38-4D42-A1AD-CB68F7E0EEF6}", + "details": { + "name": "Id" + } + } + ] + }, + { + "base": "GetWindows64", + "details": { + "name": "Get Windows64" + }, + "results": [ + { + "typeid": "{72039442-EB38-4D42-A1AD-CB68F7E0EEF6}", + "details": { + "name": "Id" + } + } + ] + }, + { + "base": "GetAndroid64", + "details": { + "name": "Get Android64" + }, + "results": [ + { + "typeid": "{72039442-EB38-4D42-A1AD-CB68F7E0EEF6}", + "details": { + "name": "Id" + } + } + ] + }, + { + "base": "GetCurrent", + "details": { + "name": "Get Current" + }, + "results": [ + { + "typeid": "{72039442-EB38-4D42-A1AD-CB68F7E0EEF6}", + "details": { + "name": "Id" + } + } + ] + } + ] + } + ] +} \ No newline at end of file diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Classes/PolygonPrism.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Classes/PolygonPrism.names new file mode 100644 index 0000000000..3b2cc44451 --- /dev/null +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Classes/PolygonPrism.names @@ -0,0 +1,62 @@ +{ + "entries": [ + { + "base": "PolygonPrism", + "context": "BehaviorClass", + "variant": "", + "details": { + "name": "Polygon Prism", + "category": "Shape" + }, + "methods": [ + { + "base": "height", + "details": { + "name": "Get Height" + }, + "params": [ + { + "typeid": "{F01C8BDD-6F24-4344-8945-521A8750B30B}", + "details": { + "name": "Polygon Prism", + "tooltip": "Polygon prism shape" + } + } + ], + "results": [ + { + "typeid": "{EA2C3E90-AFBE-44D4-A90D-FAAF79BAF93D}", + "details": { + "name": "Height" + } + } + ] + }, + { + "base": "vertexContainer", + "details": { + "name": "Get Vertex Container" + }, + "params": [ + { + "typeid": "{F01C8BDD-6F24-4344-8945-521A8750B30B}", + "details": { + "name": "Polygon Prism", + "tooltip": "Polygon prism shape" + } + } + ], + "results": [ + { + "typeid": "{EBE98B36-0783-5226-9739-064BD41EBB52}", + "details": { + "name": "Vertex Container", + "tooltip": "Vertex data" + } + } + ] + } + ] + } + ] +} \ No newline at end of file diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Classes/PositionSplineQueryResult.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Classes/PositionSplineQueryResult.names new file mode 100644 index 0000000000..45a805a43b --- /dev/null +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Classes/PositionSplineQueryResult.names @@ -0,0 +1,59 @@ +{ + "entries": [ + { + "base": "PositionSplineQueryResult", + "context": "BehaviorClass", + "variant": "", + "details": { + "name": "Position Spline Query Result", + "category": "Physics" + }, + "methods": [ + { + "base": "GetsplineAddress", + "details": { + "name": "Getspline Address" + }, + "params": [ + { + "typeid": "{E35DCF28-1AC3-49E8-A0AB-2F6115348F45}", + "details": { + "name": "Position Spline Query Result" + } + } + ], + "results": [ + { + "typeid": "{865BA2EC-43C5-4E1F-9B6F-2D63F6DC2E70}", + "details": { + "name": "Spline Address" + } + } + ] + }, + { + "base": "GetdistanceSq", + "details": { + "name": "Getdistance Sq" + }, + "params": [ + { + "typeid": "{E35DCF28-1AC3-49E8-A0AB-2F6115348F45}", + "details": { + "name": "Position Spline Query Result" + } + } + ], + "results": [ + { + "typeid": "{EA2C3E90-AFBE-44D4-A90D-FAAF79BAF93D}", + "details": { + "name": "float" + } + } + ] + } + ] + } + ] +} \ No newline at end of file diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Classes/PosterizeGradientComponent.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Classes/PosterizeGradientComponent.names new file mode 100644 index 0000000000..6c2372d99c --- /dev/null +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Classes/PosterizeGradientComponent.names @@ -0,0 +1,12 @@ +{ + "entries": [ + { + "base": "PosterizeGradientComponent", + "context": "BehaviorClass", + "variant": "", + "details": { + "name": "PosterizeGradientComponent" + } + } + ] +} \ No newline at end of file diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Classes/PosterizeGradientConfig.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Classes/PosterizeGradientConfig.names new file mode 100644 index 0000000000..03b82c4262 --- /dev/null +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Classes/PosterizeGradientConfig.names @@ -0,0 +1,12 @@ +{ + "entries": [ + { + "base": "PosterizeGradientConfig", + "context": "BehaviorClass", + "variant": "", + "details": { + "name": "PosterizeGradientConfig" + } + } + ] +} \ No newline at end of file diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Classes/PropertyTreeEditor.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Classes/PropertyTreeEditor.names new file mode 100644 index 0000000000..8224b2617c --- /dev/null +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Classes/PropertyTreeEditor.names @@ -0,0 +1,624 @@ +{ + "entries": [ + { + "base": "PropertyTreeEditor", + "context": "BehaviorClass", + "variant": "", + "details": { + "name": "PropertyTreeEditor" + }, + "methods": [ + { + "base": "ResetContainer", + "context": "PropertyTreeEditor", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke ResetContainer" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after ResetContainer is invoked" + }, + "details": { + "name": "PropertyTreeEditor::ResetContainer", + "category": "Other" + }, + "params": [ + { + "typeid": "{704E727E-E941-47EE-9C70-065BC3AD66F3}", + "details": { + "name": "PropertyTreeEditor*" + } + }, + { + "typeid": "{7114E998-A8B4-519B-9342-A86D1587B4F7}", + "details": { + "name": "AZStd::basic_string_view>" + } + } + ], + "results": [ + { + "typeid": "{B57176AF-63A1-5531-B77E-BD7337E66127}", + "details": { + "name": "Outcome, allocator>>" + } + } + ] + }, + { + "base": "CompareProperty", + "context": "PropertyTreeEditor", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke CompareProperty" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after CompareProperty is invoked" + }, + "details": { + "name": "PropertyTreeEditor::CompareProperty", + "category": "Other" + }, + "params": [ + { + "typeid": "{704E727E-E941-47EE-9C70-065BC3AD66F3}", + "details": { + "name": "PropertyTreeEditor*" + } + }, + { + "typeid": "{7114E998-A8B4-519B-9342-A86D1587B4F7}", + "details": { + "name": "AZStd::basic_string_view>" + } + }, + { + "typeid": "{03924488-C7F4-4D6D-948B-ABC2D1AE2FD3}", + "details": { + "name": "const any&" + } + } + ], + "results": [ + { + "typeid": "{A0CA880C-AFE4-43CB-926C-59AC48496112}", + "details": { + "name": "bool" + } + } + ] + }, + { + "base": "IsContainer", + "context": "PropertyTreeEditor", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke IsContainer" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after IsContainer is invoked" + }, + "details": { + "name": "PropertyTreeEditor::IsContainer", + "category": "Other" + }, + "params": [ + { + "typeid": "{704E727E-E941-47EE-9C70-065BC3AD66F3}", + "details": { + "name": "PropertyTreeEditor*" + } + }, + { + "typeid": "{7114E998-A8B4-519B-9342-A86D1587B4F7}", + "details": { + "name": "AZStd::basic_string_view>" + } + } + ], + "results": [ + { + "typeid": "{A0CA880C-AFE4-43CB-926C-59AC48496112}", + "details": { + "name": "bool" + } + } + ] + }, + { + "base": "GetContainerCount", + "context": "PropertyTreeEditor", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke GetContainerCount" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after GetContainerCount is invoked" + }, + "details": { + "name": "PropertyTreeEditor::GetContainerCount", + "category": "Other" + }, + "params": [ + { + "typeid": "{704E727E-E941-47EE-9C70-065BC3AD66F3}", + "details": { + "name": "PropertyTreeEditor*" + } + }, + { + "typeid": "{7114E998-A8B4-519B-9342-A86D1587B4F7}", + "details": { + "name": "AZStd::basic_string_view>" + } + } + ], + "results": [ + { + "typeid": "{B57176AF-63A1-5531-B77E-BD7337E66127}", + "details": { + "name": "Outcome, allocator>>" + } + } + ] + }, + { + "base": "SetProperty", + "context": "PropertyTreeEditor", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke SetProperty" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after SetProperty is invoked" + }, + "details": { + "name": "PropertyTreeEditor::SetProperty", + "category": "Other" + }, + "params": [ + { + "typeid": "{704E727E-E941-47EE-9C70-065BC3AD66F3}", + "details": { + "name": "PropertyTreeEditor*" + } + }, + { + "typeid": "{7114E998-A8B4-519B-9342-A86D1587B4F7}", + "details": { + "name": "AZStd::basic_string_view>" + } + }, + { + "typeid": "{03924488-C7F4-4D6D-948B-ABC2D1AE2FD3}", + "details": { + "name": "const any&" + } + } + ], + "results": [ + { + "typeid": "{B57176AF-63A1-5531-B77E-BD7337E66127}", + "details": { + "name": "Outcome, allocator>>" + } + } + ] + }, + { + "base": "AppendContainerItem", + "context": "PropertyTreeEditor", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke AppendContainerItem" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after AppendContainerItem is invoked" + }, + "details": { + "name": "PropertyTreeEditor::AppendContainerItem", + "category": "Other" + }, + "params": [ + { + "typeid": "{704E727E-E941-47EE-9C70-065BC3AD66F3}", + "details": { + "name": "PropertyTreeEditor*" + } + }, + { + "typeid": "{7114E998-A8B4-519B-9342-A86D1587B4F7}", + "details": { + "name": "AZStd::basic_string_view>" + } + }, + { + "typeid": "{03924488-C7F4-4D6D-948B-ABC2D1AE2FD3}", + "details": { + "name": "const any&" + } + } + ], + "results": [ + { + "typeid": "{B57176AF-63A1-5531-B77E-BD7337E66127}", + "details": { + "name": "Outcome, allocator>>" + } + } + ] + }, + { + "base": "GetProperty", + "context": "PropertyTreeEditor", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke GetProperty" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after GetProperty is invoked" + }, + "details": { + "name": "PropertyTreeEditor::GetProperty", + "category": "Other" + }, + "params": [ + { + "typeid": "{704E727E-E941-47EE-9C70-065BC3AD66F3}", + "details": { + "name": "PropertyTreeEditor*" + } + }, + { + "typeid": "{7114E998-A8B4-519B-9342-A86D1587B4F7}", + "details": { + "name": "AZStd::basic_string_view>" + } + } + ], + "results": [ + { + "typeid": "{B57176AF-63A1-5531-B77E-BD7337E66127}", + "details": { + "name": "Outcome, allocator>>" + } + } + ] + }, + { + "base": "AddContainerItem", + "context": "PropertyTreeEditor", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke AddContainerItem" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after AddContainerItem is invoked" + }, + "details": { + "name": "PropertyTreeEditor::AddContainerItem", + "category": "Other" + }, + "params": [ + { + "typeid": "{704E727E-E941-47EE-9C70-065BC3AD66F3}", + "details": { + "name": "PropertyTreeEditor*" + } + }, + { + "typeid": "{7114E998-A8B4-519B-9342-A86D1587B4F7}", + "details": { + "name": "AZStd::basic_string_view>" + } + }, + { + "typeid": "{03924488-C7F4-4D6D-948B-ABC2D1AE2FD3}", + "details": { + "name": "const any&" + } + }, + { + "typeid": "{03924488-C7F4-4D6D-948B-ABC2D1AE2FD3}", + "details": { + "name": "const any&" + } + } + ], + "results": [ + { + "typeid": "{B57176AF-63A1-5531-B77E-BD7337E66127}", + "details": { + "name": "Outcome, allocator>>" + } + } + ] + }, + { + "base": "RemoveContainerItem", + "context": "PropertyTreeEditor", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke RemoveContainerItem" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after RemoveContainerItem is invoked" + }, + "details": { + "name": "PropertyTreeEditor::RemoveContainerItem", + "category": "Other" + }, + "params": [ + { + "typeid": "{704E727E-E941-47EE-9C70-065BC3AD66F3}", + "details": { + "name": "PropertyTreeEditor*" + } + }, + { + "typeid": "{7114E998-A8B4-519B-9342-A86D1587B4F7}", + "details": { + "name": "AZStd::basic_string_view>" + } + }, + { + "typeid": "{03924488-C7F4-4D6D-948B-ABC2D1AE2FD3}", + "details": { + "name": "const any&" + } + } + ], + "results": [ + { + "typeid": "{B57176AF-63A1-5531-B77E-BD7337E66127}", + "details": { + "name": "Outcome, allocator>>" + } + } + ] + }, + { + "base": "BuildPathsListWithTypes", + "context": "PropertyTreeEditor", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke BuildPathsListWithTypes" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after BuildPathsListWithTypes is invoked" + }, + "details": { + "name": "PropertyTreeEditor::BuildPathsListWithTypes", + "category": "Other" + }, + "params": [ + { + "typeid": "{704E727E-E941-47EE-9C70-065BC3AD66F3}", + "details": { + "name": "PropertyTreeEditor*" + } + } + ], + "results": [ + { + "typeid": "{99DAD0BC-740E-5E82-826B-8FC7968CC02C}", + "details": { + "name": "const AZStd::vector>" + } + }, + { + "typeid": "{7114E998-A8B4-519B-9342-A86D1587B4F7}", + "details": { + "name": "AZStd::basic_string_view>" + } + } + ], + "results": [ + { + "typeid": "{A0CA880C-AFE4-43CB-926C-59AC48496112}", + "details": { + "name": "bool" + } + } + ] + }, + { + "base": "BuildPathsList", + "context": "PropertyTreeEditor", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke BuildPathsList" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after BuildPathsList is invoked" + }, + "details": { + "name": "PropertyTreeEditor::BuildPathsList", + "category": "Other" + }, + "params": [ + { + "typeid": "{704E727E-E941-47EE-9C70-065BC3AD66F3}", + "details": { + "name": "PropertyTreeEditor*" + } + } + ], + "results": [ + { + "typeid": "{99DAD0BC-740E-5E82-826B-8FC7968CC02C}", + "details": { + "name": "const AZStd::vector>" + } + }, + { + "typeid": "{03924488-C7F4-4D6D-948B-ABC2D1AE2FD3}", + "details": { + "name": "const any&" + } + }, + { + "typeid": "{03924488-C7F4-4D6D-948B-ABC2D1AE2FD3}", + "details": { + "name": "const any&" + } + } + ], + "results": [ + { + "typeid": "{B57176AF-63A1-5531-B77E-BD7337E66127}", + "details": { + "name": "Outcome, allocator>>" + } + } + ] + }, + { + "base": "GetContainerItem", + "context": "PropertyTreeEditor", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke GetContainerItem" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after GetContainerItem is invoked" + }, + "details": { + "name": "PropertyTreeEditor::GetContainerItem", + "category": "Other" + }, + "params": [ + { + "typeid": "{704E727E-E941-47EE-9C70-065BC3AD66F3}", + "details": { + "name": "PropertyTreeEditor*" + } + }, + { + "typeid": "{7114E998-A8B4-519B-9342-A86D1587B4F7}", + "details": { + "name": "AZStd::basic_string_view>" + } + }, + { + "typeid": "{03924488-C7F4-4D6D-948B-ABC2D1AE2FD3}", + "details": { + "name": "const any&" + } + } + ], + "results": [ + { + "typeid": "{B57176AF-63A1-5531-B77E-BD7337E66127}", + "details": { + "name": "Outcome, allocator>>" + } + } + ] + } + ] + } + ] +} \ No newline at end of file diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Classes/PythonBehaviorInfo.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Classes/PythonBehaviorInfo.names new file mode 100644 index 0000000000..3c8442e38f --- /dev/null +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Classes/PythonBehaviorInfo.names @@ -0,0 +1,80 @@ +{ + "entries": [ + { + "base": "PythonBehaviorInfo", + "context": "BehaviorClass", + "variant": "", + "details": { + "name": "Python Behavior Info" + }, + "methods": [ + { + "base": "GetclassName", + "details": { + "name": "Getclass Name" + }, + "params": [ + { + "typeid": "{8055BD03-5B3B-490D-AEC5-1B1E2616D529}", + "details": { + "name": "const Python Behavior Info&" + } + } + ], + "results": [ + { + "typeid": "{03AAAB3F-5C47-5A66-9EBC-D5FA4DB353C9}", + "details": { + "name": "AZ Std::string" + } + } + ] + }, + { + "base": "GetclassUuid", + "details": { + "name": "Getclass Uuid" + }, + "params": [ + { + "typeid": "{8055BD03-5B3B-490D-AEC5-1B1E2616D529}", + "details": { + "name": "const Python Behavior Info&" + } + } + ], + "results": [ + { + "typeid": "{03AAAB3F-5C47-5A66-9EBC-D5FA4DB353C9}", + "details": { + "name": "AZ Std::string" + } + } + ] + }, + { + "base": "GetmethodList", + "details": { + "name": "Getmethod List" + }, + "params": [ + { + "typeid": "{8055BD03-5B3B-490D-AEC5-1B1E2616D529}", + "details": { + "name": "Python Behavior Info*" + } + } + ], + "results": [ + { + "typeid": "{99DAD0BC-740E-5E82-826B-8FC7968CC02C}", + "details": { + "name": "AZ Std::vector" + } + } + ] + } + ] + } + ] +} \ No newline at end of file diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Classes/RandomGradientComponent.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Classes/RandomGradientComponent.names new file mode 100644 index 0000000000..528f0f6ba1 --- /dev/null +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Classes/RandomGradientComponent.names @@ -0,0 +1,12 @@ +{ + "entries": [ + { + "base": "RandomGradientComponent", + "context": "BehaviorClass", + "variant": "", + "details": { + "name": "RandomGradientComponent" + } + } + ] +} \ No newline at end of file diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Classes/RandomGradientConfig.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Classes/RandomGradientConfig.names new file mode 100644 index 0000000000..16cde16465 --- /dev/null +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Classes/RandomGradientConfig.names @@ -0,0 +1,12 @@ +{ + "entries": [ + { + "base": "RandomGradientConfig", + "context": "BehaviorClass", + "variant": "", + "details": { + "name": "RandomGradientConfig" + } + } + ] +} \ No newline at end of file diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Classes/RandomTimedSpawnerComponent.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Classes/RandomTimedSpawnerComponent.names new file mode 100644 index 0000000000..7be82eb510 --- /dev/null +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Classes/RandomTimedSpawnerComponent.names @@ -0,0 +1,12 @@ +{ + "entries": [ + { + "base": "RandomTimedSpawnerComponent", + "context": "BehaviorClass", + "variant": "", + "details": { + "name": "RandomTimedSpawnerComponent" + } + } + ] +} \ No newline at end of file diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Classes/RaySplineQueryResult.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Classes/RaySplineQueryResult.names new file mode 100644 index 0000000000..9dc7d5c1da --- /dev/null +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Classes/RaySplineQueryResult.names @@ -0,0 +1,81 @@ +{ + "entries": [ + { + "base": "RaySplineQueryResult", + "context": "BehaviorClass", + "variant": "", + "details": { + "name": "Ray Spline Query Result", + "category": "Physics" + }, + "methods": [ + { + "base": "GetsplineAddress", + "details": { + "name": "Getspline Address" + }, + "params": [ + { + "typeid": "{FE862126-C838-4999-9B7B-4AEEA5507A49}", + "details": { + "name": "Ray Spline Query Result" + } + } + ], + "results": [ + { + "typeid": "{865BA2EC-43C5-4E1F-9B6F-2D63F6DC2E70}", + "details": { + "name": "Spline Address" + } + } + ] + }, + { + "base": "GetdistanceSq", + "details": { + "name": "Getdistance Sq" + }, + "params": [ + { + "typeid": "{FE862126-C838-4999-9B7B-4AEEA5507A49}", + "details": { + "name": "Ray Spline Query Result" + } + } + ], + "results": [ + { + "typeid": "{EA2C3E90-AFBE-44D4-A90D-FAAF79BAF93D}", + "details": { + "name": "float" + } + } + ] + }, + { + "base": "GetrayDistance", + "details": { + "name": "Getray Distance" + }, + "params": [ + { + "typeid": "{FE862126-C838-4999-9B7B-4AEEA5507A49}", + "details": { + "name": "Ray Spline Query Result" + } + } + ], + "results": [ + { + "typeid": "{EA2C3E90-AFBE-44D4-A90D-FAAF79BAF93D}", + "details": { + "name": "float" + } + } + ] + } + ] + } + ] +} \ No newline at end of file diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Classes/ReferenceGradientComponent.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Classes/ReferenceGradientComponent.names new file mode 100644 index 0000000000..f55bd9b2fc --- /dev/null +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Classes/ReferenceGradientComponent.names @@ -0,0 +1,12 @@ +{ + "entries": [ + { + "base": "ReferenceGradientComponent", + "context": "BehaviorClass", + "variant": "", + "details": { + "name": "ReferenceGradientComponent" + } + } + ] +} \ No newline at end of file diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Classes/ReferenceGradientConfig.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Classes/ReferenceGradientConfig.names new file mode 100644 index 0000000000..75c14d2132 --- /dev/null +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Classes/ReferenceGradientConfig.names @@ -0,0 +1,12 @@ +{ + "entries": [ + { + "base": "ReferenceGradientConfig", + "context": "BehaviorClass", + "variant": "", + "details": { + "name": "ReferenceGradientConfig" + } + } + ] +} \ No newline at end of file diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Classes/ReferenceShapeConfig.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Classes/ReferenceShapeConfig.names new file mode 100644 index 0000000000..d52ef119df --- /dev/null +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Classes/ReferenceShapeConfig.names @@ -0,0 +1,72 @@ +{ + "entries": [ + { + "base": "ReferenceShapeConfig", + "context": "BehaviorClass", + "variant": "", + "details": { + "name": "Reference Shape Config" + }, + "methods": [ + { + "base": "GetshapeEntityId", + "context": "Getter", + "details": { + "name": "Getshape Entity Id" + }, + "params": [ + { + "typeid": "{3E49974D-2EE0-4AF9-92B9-229A22B515C3}", + "details": { + "name": "Vegetation Reference Shape" + } + }, + { + "typeid": "", + "details": { + "name": "shape Entity Id" + } + }, + { + "typeid": "", + "details": { + "name": "" + } + } + ], + "results": [ + { + "typeid": "{6383F1D3-BB27-4E6B-A49A-6409B2059EAA}", + "details": { + "name": "Entity Id", + "tooltip": "Entity Unique Id" + } + } + ] + }, + { + "base": "SetshapeEntityId", + "context": "Setter", + "details": { + "name": "Setshape Entity Id" + }, + "params": [ + { + "typeid": "{3E49974D-2EE0-4AF9-92B9-229A22B515C3}", + "details": { + "name": "Vegetation Reference Shape" + } + }, + { + "typeid": "{6383F1D3-BB27-4E6B-A49A-6409B2059EAA}", + "details": { + "name": "shape Entity Id", + "tooltip": "Entity Unique Id" + } + } + ] + } + ] + } + ] +} \ No newline at end of file diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Classes/Render__DisplayMapperOperationType.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Classes/Render__DisplayMapperOperationType.names new file mode 100644 index 0000000000..5f05143021 --- /dev/null +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Classes/Render__DisplayMapperOperationType.names @@ -0,0 +1,99 @@ +{ + "entries": [ + { + "base": "Render::DisplayMapperOperationType", + "context": "BehaviorClass", + "variant": "", + "details": { + "name": "Display Mapper Operation Type", + "category": "Rendering" + }, + "methods": [ + { + "base": "GetDisplayMapperOperationType_GammaSRGB", + "details": { + "name": "Get Display Mapper Operation Type_ GammaSRGB" + }, + "results": [ + { + "typeid": "{43DA906B-7DEF-4CA8-9790-854106D3F983}", + "details": { + "name": "unsigned int" + } + } + ] + }, + { + "base": "GetDisplayMapperOperationType_Invalid", + "details": { + "name": "Get Display Mapper Operation Type_ Invalid" + }, + "results": [ + { + "typeid": "{43DA906B-7DEF-4CA8-9790-854106D3F983}", + "details": { + "name": "unsigned int" + } + } + ] + }, + { + "base": "GetDisplayMapperOperationType_Passthrough", + "details": { + "name": "Get Display Mapper Operation Type_ Passthrough" + }, + "results": [ + { + "typeid": "{43DA906B-7DEF-4CA8-9790-854106D3F983}", + "details": { + "name": "unsigned int" + } + } + ] + }, + { + "base": "GetDisplayMapperOperationType_Reinhard", + "details": { + "name": "Get Display Mapper Operation Type_ Reinhard" + }, + "results": [ + { + "typeid": "{43DA906B-7DEF-4CA8-9790-854106D3F983}", + "details": { + "name": "unsigned int" + } + } + ] + }, + { + "base": "GetDisplayMapperOperationType_Aces", + "details": { + "name": "Get Display Mapper Operation Type_ Aces" + }, + "results": [ + { + "typeid": "{43DA906B-7DEF-4CA8-9790-854106D3F983}", + "details": { + "name": "unsigned int" + } + } + ] + }, + { + "base": "GetDisplayMapperOperationType_AcesLut", + "details": { + "name": "Get Display Mapper Operation Type_ Aces Lut" + }, + "results": [ + { + "typeid": "{43DA906B-7DEF-4CA8-9790-854106D3F983}", + "details": { + "name": "unsigned int" + } + } + ] + } + ] + } + ] +} \ No newline at end of file diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Classes/Render__ShadowmapSize.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Classes/Render__ShadowmapSize.names new file mode 100644 index 0000000000..bde0892936 --- /dev/null +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Classes/Render__ShadowmapSize.names @@ -0,0 +1,85 @@ +{ + "entries": [ + { + "base": "Render::ShadowmapSize", + "context": "BehaviorClass", + "variant": "", + "details": { + "name": "Shadowmap Size", + "category": "Rendering" + }, + "methods": [ + { + "base": "GetShadowmapSize_512", + "details": { + "name": "Get Shadowmap Size_ 512" + }, + "results": [ + { + "typeid": "{43DA906B-7DEF-4CA8-9790-854106D3F983}", + "details": { + "name": "unsigned int" + } + } + ] + }, + { + "base": "GetShadowmapSize_1024", + "details": { + "name": "Get Shadowmap Size_ 1024" + }, + "results": [ + { + "typeid": "{43DA906B-7DEF-4CA8-9790-854106D3F983}", + "details": { + "name": "unsigned int" + } + } + ] + }, + { + "base": "GetShadowmapSize_2048", + "details": { + "name": "Get Shadowmap Size_ 2048" + }, + "results": [ + { + "typeid": "{43DA906B-7DEF-4CA8-9790-854106D3F983}", + "details": { + "name": "unsigned int" + } + } + ] + }, + { + "base": "GetShadowmapSize_256", + "details": { + "name": "Get Shadowmap Size_ 256" + }, + "results": [ + { + "typeid": "{43DA906B-7DEF-4CA8-9790-854106D3F983}", + "details": { + "name": "unsigned int" + } + } + ] + }, + { + "base": "GetShadowmapSize_None", + "details": { + "name": "Get Shadowmap Size_ None" + }, + "results": [ + { + "typeid": "{43DA906B-7DEF-4CA8-9790-854106D3F983}", + "details": { + "name": "unsigned int" + } + } + ] + } + ] + } + ] +} \ No newline at end of file diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Classes/RuntimeData.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Classes/RuntimeData.names new file mode 100644 index 0000000000..6625e13e6b --- /dev/null +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Classes/RuntimeData.names @@ -0,0 +1,37 @@ +{ + "entries": [ + { + "base": "RuntimeData", + "context": "BehaviorClass", + "variant": "", + "details": { + "name": "Runtime Data" + }, + "methods": [ + { + "base": "GetRequiredAssets", + "context": "RuntimeData", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Get Required Assets" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Get Required Assets is invoked" + }, + "details": { + "name": "Get Required Assets" + }, + "results": [ + { + "typeid": "{5600E444-1E66-5CB4-81A9-053AD1F4453E}", + "details": { + "name": "AZ Std::vector< Asset< Runtime Asset>, allocator>" + } + } + ] + } + ] + } + ] +} \ No newline at end of file diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Classes/Scene.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Classes/Scene.names new file mode 100644 index 0000000000..7a00163d89 --- /dev/null +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Classes/Scene.names @@ -0,0 +1,276 @@ +{ + "entries": [ + { + "base": "Scene", + "context": "BehaviorClass", + "variant": "", + "details": { + "name": "Scene", + "category": "Scene" + }, + "methods": [ + { + "base": "GetOriginalSceneOrientation", + "context": "Scene", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Get Original Scene Orientation" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Get Original Scene Orientation is invoked" + }, + "details": { + "name": "Get Original Scene Orientation" + }, + "results": [ + { + "typeid": "{72039442-EB38-4D42-A1AD-CB68F7E0EEF6}", + "details": { + "name": "int" + } + } + ] + }, + { + "base": "GetSceneOrientation_XUp", + "details": { + "name": "Get Scene Orientation_X Up" + }, + "results": [ + { + "typeid": "{72039442-EB38-4D42-A1AD-CB68F7E0EEF6}", + "details": { + "name": "int" + } + } + ] + }, + { + "base": "GetSceneOrientation_NegYUp", + "details": { + "name": "Get Scene Orientation_ NegY Up" + }, + "results": [ + { + "typeid": "{72039442-EB38-4D42-A1AD-CB68F7E0EEF6}", + "details": { + "name": "int" + } + } + ] + }, + { + "base": "GetwatchFolder", + "details": { + "name": "Getwatch Folder" + }, + "params": [ + { + "typeid": "{1F2E6142-B0D8-42C6-A6E5-CD726DAA9EF0}", + "details": { + "name": "Scene*" + } + } + ], + "results": [ + { + "typeid": "{03AAAB3F-5C47-5A66-9EBC-D5FA4DB353C9}", + "details": { + "name": "AZ Std::string" + } + } + ] + }, + { + "base": "GetSceneOrientation_NegZUp", + "details": { + "name": "Get Scene Orientation_ NegZ Up" + }, + "results": [ + { + "typeid": "{72039442-EB38-4D42-A1AD-CB68F7E0EEF6}", + "details": { + "name": "int" + } + } + ] + }, + { + "base": "Getgraph", + "details": { + "name": "Getgraph" + }, + "params": [ + { + "typeid": "{1F2E6142-B0D8-42C6-A6E5-CD726DAA9EF0}", + "details": { + "name": "Scene*" + } + } + ], + "results": [ + { + "typeid": "{CAC6556D-D5FE-4D0E-BCCD-8940357C1D35}", + "details": { + "name": "AZ:: SceneAPI:: Containers:: Scene Graph&" + } + } + ] + }, + { + "base": "GetsourceGuid", + "details": { + "name": "Getsource Guid" + }, + "params": [ + { + "typeid": "{1F2E6142-B0D8-42C6-A6E5-CD726DAA9EF0}", + "details": { + "name": "Scene*" + } + } + ], + "results": [ + { + "typeid": "{E152C105-A133-4D03-BBF8-3D4B2FBA3E2A}", + "details": { + "name": "AZ:: Uuid" + } + } + ] + }, + { + "base": "GetSceneOrientation_YUp", + "details": { + "name": "Get Scene Orientation_Y Up" + }, + "results": [ + { + "typeid": "{72039442-EB38-4D42-A1AD-CB68F7E0EEF6}", + "details": { + "name": "int" + } + } + ] + }, + { + "base": "GetsourceFilename", + "details": { + "name": "Getsource Filename" + }, + "params": [ + { + "typeid": "{1F2E6142-B0D8-42C6-A6E5-CD726DAA9EF0}", + "details": { + "name": "Scene*" + } + } + ], + "results": [ + { + "typeid": "{03AAAB3F-5C47-5A66-9EBC-D5FA4DB353C9}", + "details": { + "name": "AZ Std::string" + } + } + ] + }, + { + "base": "GetmanifestFilename", + "details": { + "name": "Getmanifest Filename" + }, + "params": [ + { + "typeid": "{1F2E6142-B0D8-42C6-A6E5-CD726DAA9EF0}", + "details": { + "name": "Scene*" + } + } + ], + "results": [ + { + "typeid": "{03AAAB3F-5C47-5A66-9EBC-D5FA4DB353C9}", + "details": { + "name": "AZ Std::string" + } + } + ] + }, + { + "base": "GetSceneOrientation_NegXUp", + "details": { + "name": "Get Scene Orientation_ NegX Up" + }, + "results": [ + { + "typeid": "{72039442-EB38-4D42-A1AD-CB68F7E0EEF6}", + "details": { + "name": "int" + } + } + ] + }, + { + "base": "Getname", + "details": { + "name": "Getname" + }, + "params": [ + { + "typeid": "{1F2E6142-B0D8-42C6-A6E5-CD726DAA9EF0}", + "details": { + "name": "Scene*" + } + } + ], + "results": [ + { + "typeid": "{03AAAB3F-5C47-5A66-9EBC-D5FA4DB353C9}", + "details": { + "name": "AZ Std::string" + } + } + ] + }, + { + "base": "Getmanifest", + "details": { + "name": "Getmanifest" + }, + "params": [ + { + "typeid": "{1F2E6142-B0D8-42C6-A6E5-CD726DAA9EF0}", + "details": { + "name": "Scene*" + } + } + ], + "results": [ + { + "typeid": "{9274AD17-3212-4651-9F3B-7DCCB080E467}", + "details": { + "name": "Scene Manifest" + } + } + ] + }, + { + "base": "GetSceneOrientation_ZUp", + "details": { + "name": "Get Scene Orientation_Z Up" + }, + "results": [ + { + "typeid": "{72039442-EB38-4D42-A1AD-CB68F7E0EEF6}", + "details": { + "name": "int" + } + } + ] + } + ] + } + ] +} \ No newline at end of file diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Classes/SceneGraphName.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Classes/SceneGraphName.names new file mode 100644 index 0000000000..5c7fb58120 --- /dev/null +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Classes/SceneGraphName.names @@ -0,0 +1,108 @@ +{ + "entries": [ + { + "base": "SceneGraphName", + "context": "BehaviorClass", + "variant": "", + "details": { + "name": "Scene Graph Name", + "category": "Scene Graph" + }, + "methods": [ + { + "base": "GetPath", + "context": "SceneGraphName", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Get Path" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Get Path is invoked" + }, + "details": { + "name": "Get Path" + }, + "params": [ + { + "typeid": "{4077AC3C-B301-4F5A-BEA7-54D6511AEC2E}", + "details": { + "name": "Scene Graph Name" + } + } + ], + "results": [ + { + "typeid": "{3AB0037F-AF8D-48CE-BCA0-A170D18B2C03}", + "details": { + "name": "Path" + } + } + ] + }, + { + "base": "GetName", + "context": "SceneGraphName", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Get Name" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Get Name is invoked" + }, + "details": { + "name": "Get Name" + }, + "params": [ + { + "typeid": "{4077AC3C-B301-4F5A-BEA7-54D6511AEC2E}", + "details": { + "name": "Scene Graph Name" + } + } + ], + "results": [ + { + "typeid": "{3AB0037F-AF8D-48CE-BCA0-A170D18B2C03}", + "details": { + "name": "Name" + } + } + ] + }, + { + "base": "ToString", + "context": "SceneGraphName", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke To String" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after To String is invoked" + }, + "details": { + "name": "To String" + }, + "params": [ + { + "typeid": "{4077AC3C-B301-4F5A-BEA7-54D6511AEC2E}", + "details": { + "name": "Scene Graph Name" + } + } + ], + "results": [ + { + "typeid": "{3AB0037F-AF8D-48CE-BCA0-A170D18B2C03}", + "details": { + "name": "String" + } + } + ] + } + ] + } + ] +} \ No newline at end of file diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Classes/SceneManifest.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Classes/SceneManifest.names new file mode 100644 index 0000000000..151b93f217 --- /dev/null +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Classes/SceneManifest.names @@ -0,0 +1,69 @@ +{ + "entries": [ + { + "base": "SceneManifest", + "context": "BehaviorClass", + "variant": "", + "details": { + "name": "Scene Manifest", + "category": "Scene" + }, + "methods": [ + { + "base": "ImportFromJson", + "context": "SceneManifest", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Import From Json" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Import From Json is invoked" + }, + "details": { + "name": "Import From Json" + }, + "params": [ + { + "typeid": "{7114E998-A8B4-519B-9342-A86D1587B4F7}", + "details": { + "name": "" + } + } + ], + "results": [ + { + "typeid": "{A0CA880C-AFE4-43CB-926C-59AC48496112}", + "details": { + "name": "bool" + } + } + ] + }, + { + "base": "ExportToJson", + "context": "SceneManifest", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Export To Json" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Export To Json is invoked" + }, + "details": { + "name": "Export To Json" + }, + "results": [ + { + "typeid": "{03AAAB3F-5C47-5A66-9EBC-D5FA4DB353C9}", + "details": { + "name": "AZ Std::basic_string, allocator>" + } + } + ] + } + ] + } + ] +} \ No newline at end of file diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Classes/SceneQueries.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Classes/SceneQueries.names new file mode 100644 index 0000000000..1aa7a6642c --- /dev/null +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Classes/SceneQueries.names @@ -0,0 +1,69 @@ +{ + "entries": [ + { + "base": "SceneQueries", + "context": "BehaviorClass", + "variant": "", + "details": { + "name": "Scene Queries" + }, + "methods": [ + { + "base": "CreateRayCastRequest", + "context": "SceneQueries", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke CreateRayCastRequest" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after CreateRayCastRequest is invoked" + }, + "details": { + "name": "SceneQueries::CreateRayCastRequest", + "category": "Other" + }, + "params": [ + { + "typeid": "{8379EB7D-01FA-4538-B64B-A6543B4BE73D}", + "details": { + "name": "Start", + "tooltip": "The position from which the raycast starts" + } + }, + { + "typeid": "{8379EB7D-01FA-4538-B64B-A6543B4BE73D}", + "details": { + "name": "Direction", + "tooltip": "The (normalized) direction in which to fire the raycast" + } + }, + { + "typeid": "{EA2C3E90-AFBE-44D4-A90D-FAAF79BAF93D}", + "details": { + "name": "Distance", + "tooltip": "The length of the raycast" + } + }, + { + "typeid": "{03AAAB3F-5C47-5A66-9EBC-D5FA4DB353C9}", + "details": { + "name": "Collision Group", + "tooltip": "Allows filtering of objects intersecting the raycast based on their collision layers" + } + } + ], + "results": [ + { + "typeid": "{53EAD088-A391-48F1-8370-2A1DBA31512F}", + "details": { + "name": "RayCastRequest", + "tooltip": "Parameters for raycast" + } + } + ] + } + ] + } + ] +} \ No newline at end of file diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Classes/ScriptTimePoint.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Classes/ScriptTimePoint.names new file mode 100644 index 0000000000..1a38873aaa --- /dev/null +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Classes/ScriptTimePoint.names @@ -0,0 +1,84 @@ +{ + "entries": [ + { + "base": "ScriptTimePoint", + "context": "BehaviorClass", + "variant": "", + "details": { + "name": "Script Time Point", + "category": "Timing" + }, + "methods": [ + { + "base": "ToString", + "context": "ScriptTimePoint", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke To String" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after To String is invoked" + }, + "details": { + "name": "To String" + }, + "results": [ + { + "typeid": "{03AAAB3F-5C47-5A66-9EBC-D5FA4DB353C9}", + "details": { + "name": "String" + } + } + ] + }, + { + "base": "GetSeconds", + "context": "ScriptTimePoint", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Get Seconds" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Get Seconds is invoked" + }, + "details": { + "name": "Get Seconds" + }, + "results": [ + { + "typeid": "{110C4B14-11A8-4E9D-8638-5051013A56AC}", + "details": { + "name": "Seconds" + } + } + ] + }, + { + "base": "GetMilliseconds", + "context": "ScriptTimePoint", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Get Milliseconds" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Get Milliseconds is invoked" + }, + "details": { + "name": "Get Milliseconds" + }, + "results": [ + { + "typeid": "{110C4B14-11A8-4E9D-8638-5051013A56AC}", + "details": { + "name": "Milliseconds" + } + } + ] + } + ] + } + ] +} \ No newline at end of file diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Classes/SearchFilter.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Classes/SearchFilter.names new file mode 100644 index 0000000000..693e465864 --- /dev/null +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Classes/SearchFilter.names @@ -0,0 +1,12 @@ +{ + "entries": [ + { + "base": "SearchFilter", + "context": "BehaviorClass", + "variant": "", + "details": { + "name": "SearchFilter" + } + } + ] +} \ No newline at end of file diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Classes/SequenceComponent.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Classes/SequenceComponent.names new file mode 100644 index 0000000000..c330e85e85 --- /dev/null +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Classes/SequenceComponent.names @@ -0,0 +1,12 @@ +{ + "entries": [ + { + "base": "SequenceComponent", + "context": "BehaviorClass", + "variant": "", + "details": { + "name": "SequenceComponent" + } + } + ] +} \ No newline at end of file diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Classes/SettingsRegistryInterface.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Classes/SettingsRegistryInterface.names new file mode 100644 index 0000000000..660fb5206f --- /dev/null +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Classes/SettingsRegistryInterface.names @@ -0,0 +1,694 @@ +{ + "entries": [ + { + "base": "SettingsRegistryInterface", + "context": "BehaviorClass", + "variant": "", + "details": { + "name": "Settings Registry", + "category": "Registry" + }, + "methods": [ + { + "base": "GetFloat", + "context": "SettingsRegistryInterface", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Get Float" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Get Float is invoked" + }, + "details": { + "name": "Get Float" + }, + "params": [ + { + "typeid": "{795C80A0-D243-473B-972A-C32CA487BAA5}", + "details": { + "name": "Settings Registry Proxy" + } + }, + { + "typeid": "{7114E998-A8B4-519B-9342-A86D1587B4F7}", + "details": { + "name": "JSON Path" + } + } + ], + "results": [ + { + "typeid": "{8FE8A00F-5FE8-54A1-A314-346843AD21B6}", + "details": { + "name": "Value" + } + } + ] + }, + { + "base": "SetFloat", + "context": "SettingsRegistryInterface", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Set Float" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Set Float is invoked" + }, + "details": { + "name": "Set Float" + }, + "params": [ + { + "typeid": "{795C80A0-D243-473B-972A-C32CA487BAA5}", + "details": { + "name": "Settings Registry Proxy" + } + }, + { + "typeid": "{7114E998-A8B4-519B-9342-A86D1587B4F7}", + "details": { + "name": "JSON Path" + } + }, + { + "typeid": "{110C4B14-11A8-4E9D-8638-5051013A56AC}", + "details": { + "name": "Value" + } + } + ], + "results": [ + { + "typeid": "{A0CA880C-AFE4-43CB-926C-59AC48496112}", + "details": { + "name": "Success" + } + } + ] + }, + { + "base": "RemoveKey", + "context": "SettingsRegistryInterface", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Remove Key" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Remove Key is invoked" + }, + "details": { + "name": "Remove Key" + }, + "params": [ + { + "typeid": "{795C80A0-D243-473B-972A-C32CA487BAA5}", + "details": { + "name": "Settings Registry Proxy" + } + }, + { + "typeid": "{7114E998-A8B4-519B-9342-A86D1587B4F7}", + "details": { + "name": "JSON Path" + } + } + ], + "results": [ + { + "typeid": "{A0CA880C-AFE4-43CB-926C-59AC48496112}", + "details": { + "name": "Success" + } + } + ] + }, + { + "base": "SetInt", + "context": "SettingsRegistryInterface", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Set Int" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Set Int is invoked" + }, + "details": { + "name": "Set Int" + }, + "params": [ + { + "typeid": "{795C80A0-D243-473B-972A-C32CA487BAA5}", + "details": { + "name": "Settings Registry Proxy" + } + }, + { + "typeid": "{7114E998-A8B4-519B-9342-A86D1587B4F7}", + "details": { + "name": "JSON Path" + } + }, + { + "typeid": "{70D8A282-A1EA-462D-9D04-51EDE81FAC2F}", + "details": { + "name": "Value" + } + } + ], + "results": [ + { + "typeid": "{A0CA880C-AFE4-43CB-926C-59AC48496112}", + "details": { + "name": "Success" + } + } + ] + }, + { + "base": "SetUInt", + "context": "SettingsRegistryInterface", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Set UInt" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Set UInt is invoked" + }, + "details": { + "name": "Set UInt" + }, + "params": [ + { + "typeid": "{795C80A0-D243-473B-972A-C32CA487BAA5}", + "details": { + "name": "Settings Registry Proxy" + } + }, + { + "typeid": "{7114E998-A8B4-519B-9342-A86D1587B4F7}", + "details": { + "name": "JSON Path" + } + }, + { + "typeid": "{D6597933-47CD-4FC8-B911-63F3E2B0993A}", + "details": { + "name": "Value" + } + } + ], + "results": [ + { + "typeid": "{A0CA880C-AFE4-43CB-926C-59AC48496112}", + "details": { + "name": "Success" + } + } + ] + }, + { + "base": "GetBool", + "context": "SettingsRegistryInterface", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Get Bool" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Get Bool is invoked" + }, + "details": { + "name": "Get Bool" + }, + "params": [ + { + "typeid": "{795C80A0-D243-473B-972A-C32CA487BAA5}", + "details": { + "name": "Settings Registry Proxy" + } + }, + { + "typeid": "{7114E998-A8B4-519B-9342-A86D1587B4F7}", + "details": { + "name": "JSON Path" + } + } + ], + "results": [ + { + "typeid": "{0170062C-2E7E-5CEB-BAB8-F7663BEF7B3E}", + "details": { + "name": "Value" + } + } + ] + }, + { + "base": "GetInt", + "context": "SettingsRegistryInterface", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Get Int" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Get Int is invoked" + }, + "details": { + "name": "Get Int" + }, + "params": [ + { + "typeid": "{795C80A0-D243-473B-972A-C32CA487BAA5}", + "details": { + "name": "Settings Registry Proxy" + } + }, + { + "typeid": "{7114E998-A8B4-519B-9342-A86D1587B4F7}", + "details": { + "name": "JSON Path" + } + } + ], + "results": [ + { + "typeid": "{8E0A7AC1-C649-56B4-99CF-8BE08EEFC47B}", + "details": { + "name": "Value" + } + } + ] + }, + { + "base": "GetUInt", + "context": "SettingsRegistryInterface", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Get UInt" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Get UInt is invoked" + }, + "details": { + "name": "Get UInt" + }, + "params": [ + { + "typeid": "{795C80A0-D243-473B-972A-C32CA487BAA5}", + "details": { + "name": "Settings Registry Proxy" + } + }, + { + "typeid": "{7114E998-A8B4-519B-9342-A86D1587B4F7}", + "details": { + "name": "JSON Path" + } + } + ], + "results": [ + { + "typeid": "{858A22B8-1B5E-5016-BF33-B2469DD9CAD3}", + "details": { + "name": "Value" + } + } + ] + }, + { + "base": "GetNotifyEvent", + "context": "SettingsRegistryInterface", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Get Notify Event" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Get Notify Event is invoked" + }, + "details": { + "name": "Get Notify Event" + }, + "params": [ + { + "typeid": "{795C80A0-D243-473B-972A-C32CA487BAA5}", + "details": { + "name": "Settings Registry Proxy" + } + } + ], + "results": [ + { + "typeid": "{84290CFC-1335-5341-AD8B-0A3FE9FE46D0}", + "details": { + "name": "Script Notify Event" + } + } + ] + }, + { + "base": "MergeSettings", + "context": "SettingsRegistryInterface", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Merge Settings" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Merge Settings is invoked" + }, + "details": { + "name": "Merge Settings" + }, + "params": [ + { + "typeid": "{795C80A0-D243-473B-972A-C32CA487BAA5}", + "details": { + "name": "Settings Registry Proxy" + } + }, + { + "typeid": "{7114E998-A8B4-519B-9342-A86D1587B4F7}", + "details": { + "name": "JSON Path" + } + }, + { + "typeid": "{72039442-EB38-4D42-A1AD-CB68F7E0EEF6}", + "details": { + "name": "Format", + "tooltip": "0: Json Path, 1: Json Merge Patch" + } + } + ], + "results": [ + { + "typeid": "{A0CA880C-AFE4-43CB-926C-59AC48496112}", + "details": { + "name": "Success" + } + } + ] + }, + { + "base": "MergeSettingsFile", + "context": "SettingsRegistryInterface", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Merge Settings File" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Merge Settings File is invoked" + }, + "details": { + "name": "Merge Settings File" + }, + "params": [ + { + "typeid": "{795C80A0-D243-473B-972A-C32CA487BAA5}", + "details": { + "name": "Settings Registry Proxy" + } + }, + { + "typeid": "{7114E998-A8B4-519B-9342-A86D1587B4F7}", + "details": { + "name": "JSON Path" + } + }, + { + "typeid": "{7114E998-A8B4-519B-9342-A86D1587B4F7}", + "details": { + "name": "Root Key" + } + }, + { + "typeid": "{72039442-EB38-4D42-A1AD-CB68F7E0EEF6}", + "details": { + "name": "Format", + "tooltip": "0: Json Path, 1: Json Merge Patch" + } + } + ], + "results": [ + { + "typeid": "{A0CA880C-AFE4-43CB-926C-59AC48496112}", + "details": { + "name": "Success" + } + } + ] + }, + { + "base": "GetString", + "context": "SettingsRegistryInterface", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Get String" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Get String is invoked" + }, + "details": { + "name": "Get String" + }, + "params": [ + { + "typeid": "{795C80A0-D243-473B-972A-C32CA487BAA5}", + "details": { + "name": "Settings Registry Proxy" + } + }, + { + "typeid": "{7114E998-A8B4-519B-9342-A86D1587B4F7}", + "details": { + "name": "JSON Path" + } + } + ], + "results": [ + { + "typeid": "{B0D91084-263A-54B9-A4F3-7C5F4240E248}", + "details": { + "name": "Output" + } + } + ] + }, + { + "base": "IsValid", + "context": "SettingsRegistryInterface", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Is Valid" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Is Valid is invoked" + }, + "details": { + "name": "Is Valid" + }, + "params": [ + { + "typeid": "{795C80A0-D243-473B-972A-C32CA487BAA5}", + "details": { + "name": "Settings Registry Proxy" + } + } + ], + "results": [ + { + "typeid": "{A0CA880C-AFE4-43CB-926C-59AC48496112}", + "details": { + "name": "Success" + } + } + ] + }, + { + "base": "MergeSettingsFolder", + "context": "SettingsRegistryInterface", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Merge Settings Folder" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Merge Settings Folder is invoked" + }, + "details": { + "name": "Merge Settings Folder" + }, + "params": [ + { + "typeid": "{795C80A0-D243-473B-972A-C32CA487BAA5}", + "details": { + "name": "Settings Registry Proxy" + } + }, + { + "typeid": "{7114E998-A8B4-519B-9342-A86D1587B4F7}", + "details": { + "name": "JSON Path" + } + }, + { + "typeid": "{EB6B8ADF-ABAA-4D22-B596-127F9C611740}", + "details": { + "name": "Specializations Proxy" + } + }, + { + "typeid": "{7114E998-A8B4-519B-9342-A86D1587B4F7}", + "details": { + "name": "JSON Path" + } + } + ], + "results": [ + { + "typeid": "{A0CA880C-AFE4-43CB-926C-59AC48496112}", + "details": { + "name": "Success" + } + } + ] + }, + { + "base": "SetBool", + "context": "SettingsRegistryInterface", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Set Bool" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Set Bool is invoked" + }, + "details": { + "name": "Set Bool" + }, + "params": [ + { + "typeid": "{795C80A0-D243-473B-972A-C32CA487BAA5}", + "details": { + "name": "Settings Registry Proxy" + } + }, + { + "typeid": "{7114E998-A8B4-519B-9342-A86D1587B4F7}", + "details": { + "name": "JSON Path" + } + }, + { + "typeid": "{A0CA880C-AFE4-43CB-926C-59AC48496112}", + "details": { + "name": "Success" + } + } + ], + "results": [ + { + "typeid": "{A0CA880C-AFE4-43CB-926C-59AC48496112}", + "details": { + "name": "Success" + } + } + ] + }, + { + "base": "SetString", + "context": "SettingsRegistryInterface", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Set String" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Set String is invoked" + }, + "details": { + "name": "Set String" + }, + "params": [ + { + "typeid": "{795C80A0-D243-473B-972A-C32CA487BAA5}", + "details": { + "name": "Settings Registry Proxy" + } + }, + { + "typeid": "{7114E998-A8B4-519B-9342-A86D1587B4F7}", + "details": { + "name": "JSON Path" + } + }, + { + "typeid": "{7114E998-A8B4-519B-9342-A86D1587B4F7}", + "details": { + "name": "JSON Path" + } + } + ], + "results": [ + { + "typeid": "{A0CA880C-AFE4-43CB-926C-59AC48496112}", + "details": { + "name": "Success" + } + } + ] + }, + { + "base": "DumpSettings", + "context": "SettingsRegistryInterface", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Dump Settings" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Dump Settings is invoked" + }, + "details": { + "name": "Dump Settings" + }, + "params": [ + { + "typeid": "{795C80A0-D243-473B-972A-C32CA487BAA5}", + "details": { + "name": "Settings Registry Proxy" + } + }, + { + "typeid": "{7114E998-A8B4-519B-9342-A86D1587B4F7}", + "details": { + "name": "JSON Path" + } + } + ], + "results": [ + { + "typeid": "{B0D91084-263A-54B9-A4F3-7C5F4240E248}", + "details": { + "name": "Output" + } + } + ] + } + ] + } + ] +} \ No newline at end of file diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Classes/ShaderCollectionItem.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Classes/ShaderCollectionItem.names new file mode 100644 index 0000000000..0e081769b4 --- /dev/null +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Classes/ShaderCollectionItem.names @@ -0,0 +1,142 @@ +{ + "entries": [ + { + "base": "ShaderCollectionItem", + "context": "BehaviorClass", + "variant": "", + "details": { + "name": "ShaderCollectionItem" + }, + "methods": [ + { + "base": "GetShaderAsset", + "context": "ShaderCollectionItem", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke GetShaderAsset" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after GetShaderAsset is invoked" + }, + "details": { + "name": "ShaderCollectionItem::GetShaderAsset", + "category": "Other" + }, + "params": [ + { + "typeid": "{64C7F381-3313-46E8-B23B-D7AA9A915F35}", + "details": { + "name": "Item*" + } + } + ], + "results": [ + { + "typeid": "{C3B16018-28FB-5CFE-B871-25B6E2F0B110}", + "details": { + "name": "const Asset&" + } + } + ] + }, + { + "base": "GetShaderAssetId", + "context": "ShaderCollectionItem", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke GetShaderAssetId" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after GetShaderAssetId is invoked" + }, + "details": { + "name": "ShaderCollectionItem::GetShaderAssetId", + "category": "Other" + }, + "params": [ + { + "typeid": "{64C7F381-3313-46E8-B23B-D7AA9A915F35}", + "details": { + "name": "Item*" + } + } + ], + "results": [ + { + "typeid": "{652ED536-3402-439B-AEBE-4A5DBC554085}", + "details": { + "name": "const AssetId&" + } + } + ] + }, + { + "base": "GetShaderVariantId", + "context": "ShaderCollectionItem", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke GetShaderVariantId" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after GetShaderVariantId is invoked" + }, + "details": { + "name": "ShaderCollectionItem::GetShaderVariantId", + "category": "Other" + }, + "params": [ + { + "typeid": "{64C7F381-3313-46E8-B23B-D7AA9A915F35}", + "details": { + "name": "Item*" + } + } + ], + "results": [ + { + "typeid": "{27B1FEC2-8C8A-47D7-A034-6609FA092B34}", + "details": { + "name": "const ShaderVariantId&" + } + } + ] + }, + { + "base": "GetShaderOptionGroup", + "context": "ShaderCollectionItem", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke GetShaderOptionGroup" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after GetShaderOptionGroup is invoked" + }, + "details": { + "name": "ShaderCollectionItem::GetShaderOptionGroup", + "category": "Other" + }, + "params": [ + { + "typeid": "{64C7F381-3313-46E8-B23B-D7AA9A915F35}", + "details": { + "name": "Item*" + } + } + ], + "results": [ + { + "typeid": "{906F69F5-52F0-4095-9562-0E91DDDE6E2F}", + "details": { + "name": "const ShaderOptionGroup&" + } + } + ] + } + ] + } + ] +} \ No newline at end of file diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Classes/ShaderOptionGroup.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Classes/ShaderOptionGroup.names new file mode 100644 index 0000000000..24c1085b7d --- /dev/null +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Classes/ShaderOptionGroup.names @@ -0,0 +1,116 @@ +{ + "entries": [ + { + "base": "ShaderOptionGroup", + "context": "BehaviorClass", + "variant": "", + "details": { + "name": "ShaderOptionGroup" + }, + "methods": [ + { + "base": "GetValueByOptionName", + "context": "ShaderOptionGroup", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke GetValueByOptionName" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after GetValueByOptionName is invoked" + }, + "details": { + "name": "ShaderOptionGroup::GetValueByOptionName", + "category": "Other" + }, + "params": [ + { + "typeid": "{906F69F5-52F0-4095-9562-0E91DDDE6E2F}", + "details": { + "name": "ShaderOptionGroup*" + } + }, + { + "typeid": "{3D2B920C-9EFD-40D5-AAE0-DF131C3D4931}", + "details": { + "name": "const Name&" + } + } + ], + "results": [ + { + "typeid": "{C10E7B12-BCB6-5872-810D-D597F123DB61}", + "details": { + "name": "AZ::RHI::Handle" + } + } + ] + }, + { + "base": "GetShaderOptionDescriptors", + "context": "ShaderOptionGroup", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke GetShaderOptionDescriptors" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after GetShaderOptionDescriptors is invoked" + }, + "details": { + "name": "ShaderOptionGroup::GetShaderOptionDescriptors", + "category": "Other" + }, + "params": [ + { + "typeid": "{906F69F5-52F0-4095-9562-0E91DDDE6E2F}", + "details": { + "name": "ShaderOptionGroup*" + } + } + ], + "results": [ + { + "typeid": "{13D041F6-75FA-5093-AD85-827A2CEA1646}", + "details": { + "name": "const AZStd::vector" + } + } + ] + }, + { + "base": "GetShaderVariantId", + "context": "ShaderOptionGroup", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke GetShaderVariantId" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after GetShaderVariantId is invoked" + }, + "details": { + "name": "ShaderOptionGroup::GetShaderVariantId", + "category": "Other" + }, + "params": [ + { + "typeid": "{906F69F5-52F0-4095-9562-0E91DDDE6E2F}", + "details": { + "name": "ShaderOptionGroup*" + } + } + ], + "results": [ + { + "typeid": "{27B1FEC2-8C8A-47D7-A034-6609FA092B34}", + "details": { + "name": "const ShaderVariantId&" + } + } + ] + } + ] + } + ] +} \ No newline at end of file diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Classes/ShaderSemantic.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Classes/ShaderSemantic.names new file mode 100644 index 0000000000..f89b6017a6 --- /dev/null +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Classes/ShaderSemantic.names @@ -0,0 +1,122 @@ +{ + "entries": [ + { + "base": "ShaderSemantic", + "context": "BehaviorClass", + "variant": "", + "details": { + "name": "Shader Semantic", + "category": "Rendering" + }, + "methods": [ + { + "base": "ToString", + "context": "ShaderSemantic", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke To String" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after To String is invoked" + }, + "details": { + "name": "To String" + }, + "results": [ + { + "typeid": "{03AAAB3F-5C47-5A66-9EBC-D5FA4DB353C9}", + "details": { + "name": "String" + } + } + ] + }, + { + "base": "Getname", + "details": { + "name": "Get Name" + }, + "params": [ + { + "typeid": "{C6FFF25F-FE52-4D08-8D96-D04C14048816}", + "details": { + "name": "Shader Semantic" + } + } + ], + "results": [ + { + "typeid": "{3D2B920C-9EFD-40D5-AAE0-DF131C3D4931}", + "details": { + "name": "Name" + } + } + ] + }, + { + "base": "Setname", + "details": { + "name": "Set Name" + }, + "params": [ + { + "typeid": "{C6FFF25F-FE52-4D08-8D96-D04C14048816}", + "details": { + "name": "Shader Semantic" + } + }, + { + "typeid": "{3D2B920C-9EFD-40D5-AAE0-DF131C3D4931}", + "details": { + "name": "Name" + } + } + ] + }, + { + "base": "Getindex", + "details": { + "name": "Get Index" + }, + "params": [ + { + "typeid": "{C6FFF25F-FE52-4D08-8D96-D04C14048816}", + "details": { + "name": "Shader Semantic" + } + } + ], + "results": [ + { + "typeid": "{43DA906B-7DEF-4CA8-9790-854106D3F983}", + "details": { + "name": "Index" + } + } + ] + }, + { + "base": "Setindex", + "details": { + "name": "Set Index" + }, + "params": [ + { + "typeid": "{C6FFF25F-FE52-4D08-8D96-D04C14048816}", + "details": { + "name": "Shader Semantic" + } + }, + { + "typeid": "{43DA906B-7DEF-4CA8-9790-854106D3F983}", + "details": { + "name": "Index" + } + } + ] + } + ] + } + ] +} \ No newline at end of file diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Classes/ShaderVariantId.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Classes/ShaderVariantId.names new file mode 100644 index 0000000000..b56def1788 --- /dev/null +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Classes/ShaderVariantId.names @@ -0,0 +1,84 @@ +{ + "entries": [ + { + "base": "ShaderVariantId", + "context": "BehaviorClass", + "variant": "", + "details": { + "name": "ShaderVariantId" + }, + "methods": [ + { + "base": "Equal", + "context": "ShaderVariantId", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Equal" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Equal is invoked" + }, + "details": { + "name": "ShaderVariantId::Equal", + "category": "Other" + }, + "params": [ + { + "typeid": "{27B1FEC2-8C8A-47D7-A034-6609FA092B34}", + "details": { + "name": "ShaderVariantId*" + } + }, + { + "typeid": "{27B1FEC2-8C8A-47D7-A034-6609FA092B34}", + "details": { + "name": "const ShaderVariantId&" + } + } + ], + "results": [ + { + "typeid": "{A0CA880C-AFE4-43CB-926C-59AC48496112}", + "details": { + "name": "bool" + } + } + ] + }, + { + "base": "IsEmpty", + "context": "ShaderVariantId", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke IsEmpty" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after IsEmpty is invoked" + }, + "details": { + "name": "ShaderVariantId::IsEmpty", + "category": "Other" + }, + "params": [ + { + "typeid": "{27B1FEC2-8C8A-47D7-A034-6609FA092B34}", + "details": { + "name": "ShaderVariantId*" + } + } + ], + "results": [ + { + "typeid": "{A0CA880C-AFE4-43CB-926C-59AC48496112}", + "details": { + "name": "bool" + } + } + ] + } + ] + } + ] +} \ No newline at end of file diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Classes/ShaderVariantInfo.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Classes/ShaderVariantInfo.names new file mode 100644 index 0000000000..3f503edf3c --- /dev/null +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Classes/ShaderVariantInfo.names @@ -0,0 +1,12 @@ +{ + "entries": [ + { + "base": "ShaderVariantInfo", + "context": "BehaviorClass", + "variant": "", + "details": { + "name": "ShaderVariantInfo" + } + } + ] +} \ No newline at end of file diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Classes/ShaderVariantListSourceData.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Classes/ShaderVariantListSourceData.names new file mode 100644 index 0000000000..42dc75b474 --- /dev/null +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Classes/ShaderVariantListSourceData.names @@ -0,0 +1,12 @@ +{ + "entries": [ + { + "base": "ShaderVariantListSourceData", + "context": "BehaviorClass", + "variant": "", + "details": { + "name": "ShaderVariantListSourceData" + } + } + ] +} \ No newline at end of file diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Classes/ShapeAreaFalloffGradientComponent.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Classes/ShapeAreaFalloffGradientComponent.names new file mode 100644 index 0000000000..728a4412b5 --- /dev/null +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Classes/ShapeAreaFalloffGradientComponent.names @@ -0,0 +1,12 @@ +{ + "entries": [ + { + "base": "ShapeAreaFalloffGradientComponent", + "context": "BehaviorClass", + "variant": "", + "details": { + "name": "ShapeAreaFalloffGradientComponent" + } + } + ] +} \ No newline at end of file diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Classes/ShapeAreaFalloffGradientConfig.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Classes/ShapeAreaFalloffGradientConfig.names new file mode 100644 index 0000000000..32fd92f533 --- /dev/null +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Classes/ShapeAreaFalloffGradientConfig.names @@ -0,0 +1,12 @@ +{ + "entries": [ + { + "base": "ShapeAreaFalloffGradientConfig", + "context": "BehaviorClass", + "variant": "", + "details": { + "name": "ShapeAreaFalloffGradientConfig" + } + } + ] +} \ No newline at end of file diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Classes/SimpleAssetReferenceBase.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Classes/SimpleAssetReferenceBase.names new file mode 100644 index 0000000000..b4da62d2e8 --- /dev/null +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Classes/SimpleAssetReferenceBase.names @@ -0,0 +1,113 @@ +{ + "entries": [ + { + "base": "SimpleAssetReferenceBase", + "context": "BehaviorClass", + "variant": "", + "details": { + "name": "Simple Asset Reference" + }, + "methods": [ + { + "base": "SetAssetPath", + "context": "SimpleAssetReferenceBase", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Set Asset Path" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Set Asset Path is invoked" + }, + "details": { + "name": "Set Asset Path" + }, + "params": [ + { + "typeid": "{E16CA6C5-5C78-4AD9-8E9B-F8C1FB4D1DB8}", + "details": { + "name": "Asset path", + "tooltip": "Asset reference as a project-relative path" + } + }, + { + "typeid": "{3AB0037F-AF8D-48CE-BCA0-A170D18B2C03}", + "details": { + "name": "char" + } + } + ] + }, + { + "base": "GetassetPath", + "details": { + "name": "Get Asset Path" + }, + "params": [ + { + "typeid": "{E16CA6C5-5C78-4AD9-8E9B-F8C1FB4D1DB8}", + "details": { + "name": "Asset path", + "tooltip": "Asset reference as a project-relative path" + } + } + ], + "results": [ + { + "typeid": "{03AAAB3F-5C47-5A66-9EBC-D5FA4DB353C9}", + "details": { + "name": "AZ Std::string" + } + } + ] + }, + { + "base": "GetassetType", + "details": { + "name": "Get Asset Type" + }, + "params": [ + { + "typeid": "{E16CA6C5-5C78-4AD9-8E9B-F8C1FB4D1DB8}", + "details": { + "name": "Asset path", + "tooltip": "Asset reference as a project-relative path" + } + } + ], + "results": [ + { + "typeid": "{E152C105-A133-4D03-BBF8-3D4B2FBA3E2A}", + "details": { + "name": "AZ:: Uuid" + } + } + ] + }, + { + "base": "GetfileFilter", + "details": { + "name": "Get File Filter" + }, + "params": [ + { + "typeid": "{E16CA6C5-5C78-4AD9-8E9B-F8C1FB4D1DB8}", + "details": { + "name": "Asset path", + "tooltip": "Asset reference as a project-relative path" + } + } + ], + "results": [ + { + "typeid": "{3AB0037F-AF8D-48CE-BCA0-A170D18B2C03}", + "details": { + "name": "char" + } + } + ] + } + ] + } + ] +} \ No newline at end of file diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Classes/SimpleMotionComponent.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Classes/SimpleMotionComponent.names new file mode 100644 index 0000000000..cac9c16821 --- /dev/null +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Classes/SimpleMotionComponent.names @@ -0,0 +1,12 @@ +{ + "entries": [ + { + "base": "SimpleMotionComponent", + "context": "BehaviorClass", + "variant": "", + "details": { + "name": "SimpleMotionComponent" + } + } + ] +} \ No newline at end of file diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Classes/SimulatedBody.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Classes/SimulatedBody.names new file mode 100644 index 0000000000..05f66ca154 --- /dev/null +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Classes/SimulatedBody.names @@ -0,0 +1,175 @@ +{ + "entries": [ + { + "base": "SimulatedBody", + "context": "BehaviorClass", + "variant": "", + "details": { + "name": "Simulated Body" + }, + "methods": [ + { + "base": "GetOnCollisionEndEvent", + "context": "SimulatedBody", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Get On Collision End Event" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Get On Collision End Event is invoked" + }, + "details": { + "name": "Get On Collision End Event" + }, + "params": [ + { + "typeid": "{6383F1D3-BB27-4E6B-A49A-6409B2059EAA}", + "details": { + "name": "Entity Id", + "tooltip": "Entity Unique Id" + } + } + ], + "results": [ + { + "typeid": "{4C19E257-F929-524E-80E3-C910C5F3E2D9}", + "details": { + "name": "Collision Event" + } + } + ] + }, + { + "base": "GetOnCollisionPersistEvent", + "context": "SimulatedBody", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Get On Collision Persist Event" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Get On Collision Persist Event is invoked" + }, + "details": { + "name": "Get On Collision Persist Event" + }, + "params": [ + { + "typeid": "{6383F1D3-BB27-4E6B-A49A-6409B2059EAA}", + "details": { + "name": "Entity Id", + "tooltip": "Entity Unique Id" + } + } + ], + "results": [ + { + "typeid": "{4C19E257-F929-524E-80E3-C910C5F3E2D9}", + "details": { + "name": "Collision Event" + } + } + ] + }, + { + "base": "GetOnTriggerEnterEvent", + "context": "SimulatedBody", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Get On Trigger Enter Event" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Get On Trigger Enter Event is invoked" + }, + "details": { + "name": "Get On Trigger Enter Event" + }, + "params": [ + { + "typeid": "{6383F1D3-BB27-4E6B-A49A-6409B2059EAA}", + "details": { + "name": "Entity Id", + "tooltip": "Entity Unique Id" + } + } + ], + "results": [ + { + "typeid": "{C00D2478-E0F3-57A3-AB60-A04DFC515016}", + "details": { + "name": "Trigger Event" + } + } + ] + }, + { + "base": "GetOnCollisionBeginEvent", + "context": "SimulatedBody", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Get On Collision Begin Event" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Get On Collision Begin Event is invoked" + }, + "details": { + "name": "Get On Collision Begin Event" + }, + "params": [ + { + "typeid": "{6383F1D3-BB27-4E6B-A49A-6409B2059EAA}", + "details": { + "name": "Entity Id", + "tooltip": "Entity Unique Id" + } + } + ], + "results": [ + { + "typeid": "{4C19E257-F929-524E-80E3-C910C5F3E2D9}", + "details": { + "name": "Collision Event" + } + } + ] + }, + { + "base": "GetOnTriggerExitEvent", + "context": "SimulatedBody", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Get On Trigger Exit Event" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Get On Trigger Exit Event is invoked" + }, + "details": { + "name": "Get On Trigger Exit Event", + "category": "Other" + }, + "params": [ + { + "typeid": "{6383F1D3-BB27-4E6B-A49A-6409B2059EAA}", + "details": { + "name": "Entity Id", + "tooltip": "Entity Unique Id" + } + } + ], + "results": [ + { + "typeid": "{C00D2478-E0F3-57A3-AB60-A04DFC515016}", + "details": { + "name": "Trigger Event" + } + } + ] + } + ] + } + ] +} \ No newline at end of file diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Classes/SliceInstanceAddress.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Classes/SliceInstanceAddress.names new file mode 100644 index 0000000000..3aa69fd61a --- /dev/null +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Classes/SliceInstanceAddress.names @@ -0,0 +1,46 @@ +{ + "entries": [ + { + "base": "SliceInstanceAddress", + "context": "BehaviorClass", + "variant": "", + "details": { + "name": "SliceInstanceAddress" + }, + "methods": [ + { + "base": "IsValid", + "context": "SliceInstanceAddress", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke IsValid" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after IsValid is invoked" + }, + "details": { + "name": "SliceInstanceAddress::IsValid", + "category": "Other" + }, + "params": [ + { + "typeid": "{94142EA2-1319-44D5-82C8-A6D9D34A63BC}", + "details": { + "name": "SliceInstanceAddress*" + } + } + ], + "results": [ + { + "typeid": "{A0CA880C-AFE4-43CB-926C-59AC48496112}", + "details": { + "name": "bool" + } + } + ] + } + ] + } + ] +} \ No newline at end of file diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Classes/SliceInstantiationTicket.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Classes/SliceInstantiationTicket.names new file mode 100644 index 0000000000..b914cad636 --- /dev/null +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Classes/SliceInstantiationTicket.names @@ -0,0 +1,92 @@ +{ + "entries": [ + { + "base": "SliceInstantiationTicket", + "context": "BehaviorClass", + "variant": "", + "details": { + "name": "Slice Instantiation Ticket", + "category": "Slices" + }, + "methods": [ + { + "base": "Equal", + "context": "SliceInstantiationTicket", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Equal" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Equal is invoked" + }, + "details": { + "name": "Equal" + }, + "params": [ + { + "typeid": "{E6E7C0C5-07C9-44BB-A38C-930431948667}", + "details": { + "name": "Slice Instantiation Ticket" + } + } + ], + "results": [ + { + "typeid": "{A0CA880C-AFE4-43CB-926C-59AC48496112}", + "details": { + "name": "bool" + } + } + ] + }, + { + "base": "ToString", + "context": "SliceInstantiationTicket", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke To String" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after To String is invoked" + }, + "details": { + "name": "To String" + }, + "results": [ + { + "typeid": "{03AAAB3F-5C47-5A66-9EBC-D5FA4DB353C9}", + "details": { + "name": "AZ Std::basic_string, allocator>" + } + } + ] + }, + { + "base": "IsValid", + "context": "SliceInstantiationTicket", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Is Valid" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Is Valid is invoked" + }, + "details": { + "name": "Is Valid" + }, + "results": [ + { + "typeid": "{A0CA880C-AFE4-43CB-926C-59AC48496112}", + "details": { + "name": "bool" + } + } + ] + } + ] + } + ] +} \ No newline at end of file diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Classes/SmoothStep.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Classes/SmoothStep.names new file mode 100644 index 0000000000..260bfce9a4 --- /dev/null +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Classes/SmoothStep.names @@ -0,0 +1,147 @@ +{ + "entries": [ + { + "base": "SmoothStep", + "context": "BehaviorClass", + "variant": "", + "details": { + "name": "Smooth Step", + "category": "Rendering" + }, + "methods": [ + { + "base": "GetfalloffMidpoint", + "details": { + "name": "Getfalloff Midpoint" + }, + "params": [ + { + "typeid": "{F392F061-BF40-43C5-89F6-7323D6EF11F4}", + "details": { + "name": "Smooth Step Gradient", + "tooltip": "Smooth Step Gradient" + } + } + ], + "results": [ + { + "typeid": "{EA2C3E90-AFBE-44D4-A90D-FAAF79BAF93D}", + "details": { + "name": "float" + } + } + ] + }, + { + "base": "SetfalloffMidpoint", + "details": { + "name": "Setfalloff Midpoint" + }, + "params": [ + { + "typeid": "{F392F061-BF40-43C5-89F6-7323D6EF11F4}", + "details": { + "name": "Smooth Step Gradient", + "tooltip": "Smooth Step Gradient" + } + }, + { + "typeid": "{EA2C3E90-AFBE-44D4-A90D-FAAF79BAF93D}", + "details": { + "name": "float" + } + } + ] + }, + { + "base": "GetfalloffRange", + "details": { + "name": "Getfalloff Range" + }, + "params": [ + { + "typeid": "{F392F061-BF40-43C5-89F6-7323D6EF11F4}", + "details": { + "name": "Smooth Step Gradient", + "tooltip": "Smooth Step Gradient" + } + } + ], + "results": [ + { + "typeid": "{EA2C3E90-AFBE-44D4-A90D-FAAF79BAF93D}", + "details": { + "name": "float" + } + } + ] + }, + { + "base": "SetfalloffRange", + "details": { + "name": "Setfalloff Range" + }, + "params": [ + { + "typeid": "{F392F061-BF40-43C5-89F6-7323D6EF11F4}", + "details": { + "name": "Smooth Step Gradient", + "tooltip": "Smooth Step Gradient" + } + }, + { + "typeid": "{EA2C3E90-AFBE-44D4-A90D-FAAF79BAF93D}", + "details": { + "name": "float" + } + } + ] + }, + { + "base": "GetfalloffStrength", + "details": { + "name": "Getfalloff Strength" + }, + "params": [ + { + "typeid": "{F392F061-BF40-43C5-89F6-7323D6EF11F4}", + "details": { + "name": "Smooth Step Gradient", + "tooltip": "Smooth Step Gradient" + } + } + ], + "results": [ + { + "typeid": "{EA2C3E90-AFBE-44D4-A90D-FAAF79BAF93D}", + "details": { + "name": "float" + } + } + ] + }, + { + "base": "SetfalloffStrength", + "details": { + "name": "Setfalloff Strength" + }, + "params": [ + { + "typeid": "{F392F061-BF40-43C5-89F6-7323D6EF11F4}", + "details": { + "name": "Smooth Step Gradient", + "tooltip": "Smooth Step Gradient" + } + }, + { + "typeid": "{EA2C3E90-AFBE-44D4-A90D-FAAF79BAF93D}", + "details": { + "name": "float" + } + } + ] + } + ] + } + ] +} \ No newline at end of file diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Classes/SmoothStepGradientComponent.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Classes/SmoothStepGradientComponent.names new file mode 100644 index 0000000000..63bbb21361 --- /dev/null +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Classes/SmoothStepGradientComponent.names @@ -0,0 +1,12 @@ +{ + "entries": [ + { + "base": "SmoothStepGradientComponent", + "context": "BehaviorClass", + "variant": "", + "details": { + "name": "SmoothStepGradientComponent" + } + } + ] +} \ No newline at end of file diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Classes/SmoothStepGradientConfig.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Classes/SmoothStepGradientConfig.names new file mode 100644 index 0000000000..29331f4a45 --- /dev/null +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Classes/SmoothStepGradientConfig.names @@ -0,0 +1,12 @@ +{ + "entries": [ + { + "base": "SmoothStepGradientConfig", + "context": "BehaviorClass", + "variant": "", + "details": { + "name": "SmoothStepGradientConfig" + } + } + ] +} \ No newline at end of file diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Classes/SpawnerConfig.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Classes/SpawnerConfig.names new file mode 100644 index 0000000000..0956b4294c --- /dev/null +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Classes/SpawnerConfig.names @@ -0,0 +1,99 @@ +{ + "entries": [ + { + "base": "SpawnerConfig", + "context": "BehaviorClass", + "variant": "", + "details": { + "name": "Spawner Config", + "category": "Gameplay/Spawner" + }, + "methods": [ + { + "base": "GetspawnOnActivate", + "details": { + "name": "Get Spawn On Activate" + }, + "params": [ + { + "typeid": "{D4D68E8E-9031-448F-9D56-B5575CF4833C}", + "details": { + "name": "Spawner Config" + } + } + ], + "results": [ + { + "typeid": "{A0CA880C-AFE4-43CB-926C-59AC48496112}", + "details": { + "name": "bool" + } + } + ] + }, + { + "base": "SetspawnOnActivate", + "details": { + "name": "Set Spawn On Activate" + }, + "params": [ + { + "typeid": "{D4D68E8E-9031-448F-9D56-B5575CF4833C}", + "details": { + "name": "Spawner Config" + } + }, + { + "typeid": "{A0CA880C-AFE4-43CB-926C-59AC48496112}", + "details": { + "name": "bool" + } + } + ] + }, + { + "base": "GetdestroyOnDeactivate", + "details": { + "name": "Get Destroy On Deactivate" + }, + "params": [ + { + "typeid": "{D4D68E8E-9031-448F-9D56-B5575CF4833C}", + "details": { + "name": "Spawner Config" + } + } + ], + "results": [ + { + "typeid": "{A0CA880C-AFE4-43CB-926C-59AC48496112}", + "details": { + "name": "bool" + } + } + ] + }, + { + "base": "SetdestroyOnDeactivate", + "details": { + "name": "Set Destroy On Deactivate" + }, + "params": [ + { + "typeid": "{D4D68E8E-9031-448F-9D56-B5575CF4833C}", + "details": { + "name": "Spawner Config" + } + }, + { + "typeid": "{A0CA880C-AFE4-43CB-926C-59AC48496112}", + "details": { + "name": "bool" + } + } + ] + } + ] + } + ] +} \ No newline at end of file diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Classes/Specializations.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Classes/Specializations.names new file mode 100644 index 0000000000..6e7070b006 --- /dev/null +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Classes/Specializations.names @@ -0,0 +1,195 @@ +{ + "entries": [ + { + "base": "Specializations", + "context": "BehaviorClass", + "variant": "", + "details": { + "name": "Specializations", + "category": "Registry" + }, + "methods": [ + { + "base": "GetPriority", + "context": "Specializations", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Get Priority" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Get Priority is invoked" + }, + "details": { + "name": "Get Priority", + "category": "Other" + }, + "params": [ + { + "typeid": "{EB6B8ADF-ABAA-4D22-B596-127F9C611740}", + "details": { + "name": "Specializations Proxy" + } + }, + { + "typeid": "{7114E998-A8B4-519B-9342-A86D1587B4F7}", + "details": { + "name": "Specialization" + } + } + ], + "results": [ + { + "typeid": "{D6597933-47CD-4FC8-B911-63F3E2B0993A}", + "details": { + "name": "Priority" + } + } + ] + }, + { + "base": "GetCount", + "context": "Specializations", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Get Count" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Get Count is invoked" + }, + "details": { + "name": "Get Count" + }, + "params": [ + { + "typeid": "{EB6B8ADF-ABAA-4D22-B596-127F9C611740}", + "details": { + "name": "Specializations Proxy" + } + } + ], + "results": [ + { + "typeid": "{D6597933-47CD-4FC8-B911-63F3E2B0993A}", + "details": { + "name": "Count" + } + } + ] + }, + { + "base": "Contains", + "context": "Specializations", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Contains" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Contains is invoked" + }, + "details": { + "name": "Contains" + }, + "params": [ + { + "typeid": "{EB6B8ADF-ABAA-4D22-B596-127F9C611740}", + "details": { + "name": "Specializations Proxy" + } + }, + { + "typeid": "{7114E998-A8B4-519B-9342-A86D1587B4F7}", + "details": { + "name": "Specialization" + } + } + ], + "results": [ + { + "typeid": "{A0CA880C-AFE4-43CB-926C-59AC48496112}", + "details": { + "name": "Contains" + } + } + ] + }, + { + "base": "Append", + "context": "Specializations", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Append" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Append is invoked" + }, + "details": { + "name": "Append" + }, + "params": [ + { + "typeid": "{EB6B8ADF-ABAA-4D22-B596-127F9C611740}", + "details": { + "name": "Specializations Proxy" + } + }, + { + "typeid": "{7114E998-A8B4-519B-9342-A86D1587B4F7}", + "details": { + "name": "Specialization" + } + } + ], + "results": [ + { + "typeid": "{A0CA880C-AFE4-43CB-926C-59AC48496112}", + "details": { + "name": "Success" + } + } + ] + }, + { + "base": "GetSpecialization", + "context": "Specializations", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Get Specialization" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Get Specialization is invoked" + }, + "details": { + "name": "Get Specialization" + }, + "params": [ + { + "typeid": "{EB6B8ADF-ABAA-4D22-B596-127F9C611740}", + "details": { + "name": "Specializations Proxy" + } + }, + { + "typeid": "{D6597933-47CD-4FC8-B911-63F3E2B0993A}", + "details": { + "name": "Index" + } + } + ], + "results": [ + { + "typeid": "{7114E998-A8B4-519B-9342-A86D1587B4F7}", + "details": { + "name": "Specialization" + } + } + ] + } + ] + } + ] +} \ No newline at end of file diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Classes/SphereShapeConfig.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Classes/SphereShapeConfig.names new file mode 100644 index 0000000000..9fe47a8724 --- /dev/null +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Classes/SphereShapeConfig.names @@ -0,0 +1,59 @@ +{ + "entries": [ + { + "base": "SphereShapeConfig", + "context": "BehaviorClass", + "variant": "", + "details": { + "name": "Sphere Shape Config", + "category": "Rendering/Shapes" + }, + "methods": [ + { + "base": "GetRadius", + "details": { + "name": "Get Radius" + }, + "params": [ + { + "typeid": "{4AADFD75-48A7-4F31-8F30-FE4505F09E35}", + "details": { + "name": "Configuration", + "tooltip": "Sphere shape configuration parameters" + } + } + ], + "results": [ + { + "typeid": "{EA2C3E90-AFBE-44D4-A90D-FAAF79BAF93D}", + "details": { + "name": "float" + } + } + ] + }, + { + "base": "SetRadius", + "details": { + "name": "Set Radius" + }, + "params": [ + { + "typeid": "{4AADFD75-48A7-4F31-8F30-FE4505F09E35}", + "details": { + "name": "Configuration", + "tooltip": "Sphere shape configuration parameters" + } + }, + { + "typeid": "{EA2C3E90-AFBE-44D4-A90D-FAAF79BAF93D}", + "details": { + "name": "float" + } + } + ] + } + ] + } + ] +} \ No newline at end of file diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Classes/String.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Classes/String.names new file mode 100644 index 0000000000..1bc9b2414d --- /dev/null +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Classes/String.names @@ -0,0 +1,272 @@ +{ + "entries": [ + { + "base": "String", + "context": "BehaviorClass", + "variant": "", + "details": { + "name": "Utilities", + "category": "String" + }, + "methods": [ + { + "base": "ReplaceString", + "context": "String", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Replace String" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Replace String is invoked" + }, + "details": { + "name": "Replace String" + }, + "params": [ + { + "typeid": "{03AAAB3F-5C47-5A66-9EBC-D5FA4DB353C9}", + "details": { + "name": "Replace", + "tooltip": "The substring to search for." + } + }, + { + "typeid": "{03AAAB3F-5C47-5A66-9EBC-D5FA4DB353C9}", + "details": { + "name": "With", + "tooltip": "The string to replace the substring with." + } + }, + { + "typeid": "{A0CA880C-AFE4-43CB-926C-59AC48496112}", + "details": { + "name": "Case Sensitive", + "tooltip": "Take into account the case of the string when searching." + } + } + ], + "results": [ + { + "typeid": "{03AAAB3F-5C47-5A66-9EBC-D5FA4DB353C9}", + "details": { + "name": "AZ Std::basic_string, allocator>" + } + } + ] + }, + { + "base": "Join", + "context": "String", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Join" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Join is invoked" + }, + "details": { + "name": "Join" + }, + "params": [ + { + "typeid": "{03AAAB3F-5C47-5A66-9EBC-D5FA4DB353C9}", + "details": { + "name": "Separator", + "tooltip": "Will use this string when concatenating the strings from the array." + } + } + ], + "results": [ + { + "typeid": "{03AAAB3F-5C47-5A66-9EBC-D5FA4DB353C9}", + "details": { + "name": "AZ Std::basic_string, allocator>" + } + } + ] + }, + { + "base": "StartsWith", + "context": "String", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Starts With" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Starts With is invoked" + }, + "details": { + "name": "Starts With" + }, + "params": [ + { + "typeid": "{03AAAB3F-5C47-5A66-9EBC-D5FA4DB353C9}", + "details": { + "name": "Pattern", + "tooltip": "The substring to search for." + } + }, + { + "typeid": "{A0CA880C-AFE4-43CB-926C-59AC48496112}", + "details": { + "name": "Case Sensitive", + "tooltip": "Take into account the case of the string when searching." + } + } + ], + "results": [ + { + "typeid": "{A0CA880C-AFE4-43CB-926C-59AC48496112}", + "details": { + "name": "bool" + } + } + ] + }, + { + "base": "ContainsString", + "context": "String", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Contains String" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Contains String is invoked" + }, + "details": { + "name": "Contains String" + }, + "params": [ + { + "typeid": "{03AAAB3F-5C47-5A66-9EBC-D5FA4DB353C9}", + "details": { + "name": "Pattern", + "tooltip": "The substring to search for." + } + }, + { + "typeid": "{A0CA880C-AFE4-43CB-926C-59AC48496112}", + "details": { + "name": "Search From End", + "tooltip": "Start the match checking from the end of a string." + } + }, + { + "typeid": "{A0CA880C-AFE4-43CB-926C-59AC48496112}", + "details": { + "name": "Case Sensitive", + "tooltip": "Take into account the case of the string when searching." + } + } + ], + "results": [ + { + "typeid": "{D6597933-47CD-4FC8-B911-63F3E2B0993A}", + "details": { + "name": "AZ::u 64" + } + } + ] + }, + { + "base": "Split", + "context": "String", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Split" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Split is invoked" + }, + "details": { + "name": "Split" + }, + "params": [ + { + "typeid": "{03AAAB3F-5C47-5A66-9EBC-D5FA4DB353C9}", + "details": { + "name": "Delimiters", + "tooltip": "The characters that can be used as delimiters." + } + } + ], + "results": [ + { + "typeid": "{99DAD0BC-740E-5E82-826B-8FC7968CC02C}", + "details": { + "name": "AZ Std::vector, allocator>, allocator>" + } + } + ] + }, + { + "base": "IsValidFindPosition", + "context": "String", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Is Valid Find Position" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Is Valid Find Position is invoked" + }, + "details": { + "name": "Is Valid Find Position" + }, + "results": [ + { + "typeid": "{A0CA880C-AFE4-43CB-926C-59AC48496112}", + "details": { + "name": "bool" + } + } + ] + }, + { + "base": "EndsWith", + "context": "String", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Ends With" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Ends With is invoked" + }, + "details": { + "name": "Ends With" + }, + "params": [ + { + "typeid": "{03AAAB3F-5C47-5A66-9EBC-D5FA4DB353C9}", + "details": { + "name": "Pattern", + "tooltip": "The substring to search for." + } + }, + { + "typeid": "{A0CA880C-AFE4-43CB-926C-59AC48496112}", + "details": { + "name": "Case Sensitive", + "tooltip": "Take into account the case of the string when searching." + } + } + ], + "results": [ + { + "typeid": "{A0CA880C-AFE4-43CB-926C-59AC48496112}", + "details": { + "name": "bool" + } + } + ] + } + ] + } + ] +} \ No newline at end of file diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Classes/String_VM.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Classes/String_VM.names new file mode 100644 index 0000000000..86a0f9e3c0 --- /dev/null +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Classes/String_VM.names @@ -0,0 +1,122 @@ +{ + "entries": [ + { + "base": "String_VM", + "context": "BehaviorClass", + "variant": "", + "details": { + "name": "String_VM" + }, + "methods": [ + { + "base": "ToLower", + "context": "String_VM", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke ToLower" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after ToLower is invoked" + }, + "details": { + "name": "String_VM::ToLower", + "category": "Other" + }, + "params": [ + { + "typeid": "{03AAAB3F-5C47-5A66-9EBC-D5FA4DB353C9}", + "details": { + "name": "AZStd::basic_string, allocator>" + } + } + ], + "results": [ + { + "typeid": "{03AAAB3F-5C47-5A66-9EBC-D5FA4DB353C9}", + "details": { + "name": "AZStd::basic_string, allocator>" + } + } + ] + }, + { + "base": "ToUpper", + "context": "String_VM", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke ToUpper" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after ToUpper is invoked" + }, + "details": { + "name": "String_VM::ToUpper", + "category": "Other" + }, + "params": [ + { + "typeid": "{03AAAB3F-5C47-5A66-9EBC-D5FA4DB353C9}", + "details": { + "name": "AZStd::basic_string, allocator>" + } + } + ], + "results": [ + { + "typeid": "{03AAAB3F-5C47-5A66-9EBC-D5FA4DB353C9}", + "details": { + "name": "AZStd::basic_string, allocator>" + } + } + ] + }, + { + "base": "Substring", + "context": "String_VM", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Substring" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Substring is invoked" + }, + "details": { + "name": "String_VM::Substring", + "category": "Other" + }, + "params": [ + { + "typeid": "{03AAAB3F-5C47-5A66-9EBC-D5FA4DB353C9}", + "details": { + "name": "AZStd::basic_string, allocator>" + } + }, + { + "typeid": "{43DA906B-7DEF-4CA8-9790-854106D3F983}", + "details": { + "name": "unsigned int" + } + }, + { + "typeid": "{43DA906B-7DEF-4CA8-9790-854106D3F983}", + "details": { + "name": "unsigned int" + } + } + ], + "results": [ + { + "typeid": "{03AAAB3F-5C47-5A66-9EBC-D5FA4DB353C9}", + "details": { + "name": "AZStd::basic_string, allocator>" + } + } + ] + } + ] + } + ] +} \ No newline at end of file diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Classes/SurfaceAltitudeGradientComponent.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Classes/SurfaceAltitudeGradientComponent.names new file mode 100644 index 0000000000..6d5e6004b3 --- /dev/null +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Classes/SurfaceAltitudeGradientComponent.names @@ -0,0 +1,12 @@ +{ + "entries": [ + { + "base": "SurfaceAltitudeGradientComponent", + "context": "BehaviorClass", + "variant": "", + "details": { + "name": "SurfaceAltitudeGradientComponent" + } + } + ] +} \ No newline at end of file diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Classes/SurfaceAltitudeGradientConfig.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Classes/SurfaceAltitudeGradientConfig.names new file mode 100644 index 0000000000..55f73fe1a0 --- /dev/null +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Classes/SurfaceAltitudeGradientConfig.names @@ -0,0 +1,148 @@ +{ + "entries": [ + { + "base": "SurfaceAltitudeGradientConfig", + "context": "BehaviorClass", + "variant": "", + "details": { + "name": "SurfaceAltitudeGradientConfig" + }, + "methods": [ + { + "base": "GetNumTags", + "context": "SurfaceAltitudeGradientConfig", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke GetNumTags" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after GetNumTags is invoked" + }, + "details": { + "name": "SurfaceAltitudeGradientConfig::GetNumTags", + "category": "Other" + }, + "params": [ + { + "typeid": "{3CB05FC9-6E0F-435E-B420-F027B6716804}", + "details": { + "name": "SurfaceAltitudeGradientConfig*", + "tooltip": "altitude Gradient" + } + } + ], + "results": [ + { + "typeid": "{D6597933-47CD-4FC8-B911-63F3E2B0993A}", + "details": { + "name": "AZ::u64" + } + } + ] + }, + { + "base": "GetTag", + "context": "SurfaceAltitudeGradientConfig", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke GetTag" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after GetTag is invoked" + }, + "details": { + "name": "SurfaceAltitudeGradientConfig::GetTag", + "category": "Other" + }, + "params": [ + { + "typeid": "{3CB05FC9-6E0F-435E-B420-F027B6716804}", + "details": { + "name": "SurfaceAltitudeGradientConfig*", + "tooltip": "altitude Gradient" + } + }, + { + "typeid": "{72039442-EB38-4D42-A1AD-CB68F7E0EEF6}", + "details": { + "name": "int" + } + } + ], + "results": [ + { + "typeid": "{9F4E062E-06A0-46D4-85DF-E0DA96467D3A}", + "details": { + "name": "Crc32" + } + } + ] + }, + { + "base": "RemoveTag", + "context": "SurfaceAltitudeGradientConfig", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke RemoveTag" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after RemoveTag is invoked" + }, + "details": { + "name": "SurfaceAltitudeGradientConfig::RemoveTag", + "category": "Other" + }, + "params": [ + { + "typeid": "{3CB05FC9-6E0F-435E-B420-F027B6716804}", + "details": { + "name": "SurfaceAltitudeGradientConfig*", + "tooltip": "altitude Gradient" + } + }, + { + "typeid": "{72039442-EB38-4D42-A1AD-CB68F7E0EEF6}", + "details": { + "name": "int" + } + } + ] + }, + { + "base": "AddTag", + "context": "SurfaceAltitudeGradientConfig", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke AddTag" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after AddTag is invoked" + }, + "details": { + "name": "SurfaceAltitudeGradientConfig::AddTag", + "category": "Other" + }, + "params": [ + { + "typeid": "{3CB05FC9-6E0F-435E-B420-F027B6716804}", + "details": { + "name": "SurfaceAltitudeGradientConfig*", + "tooltip": "altitude Gradient" + } + }, + { + "typeid": "{03AAAB3F-5C47-5A66-9EBC-D5FA4DB353C9}", + "details": { + "name": "AZStd::basic_string, allocator>" + } + } + ] + } + ] + } + ] +} \ No newline at end of file diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Classes/SurfaceMaskGradientComponent.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Classes/SurfaceMaskGradientComponent.names new file mode 100644 index 0000000000..d3c50d9034 --- /dev/null +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Classes/SurfaceMaskGradientComponent.names @@ -0,0 +1,12 @@ +{ + "entries": [ + { + "base": "SurfaceMaskGradientComponent", + "context": "BehaviorClass", + "variant": "", + "details": { + "name": "SurfaceMaskGradientComponent" + } + } + ] +} \ No newline at end of file diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Classes/SurfaceMaskGradientConfig.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Classes/SurfaceMaskGradientConfig.names new file mode 100644 index 0000000000..4bf5c687ec --- /dev/null +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Classes/SurfaceMaskGradientConfig.names @@ -0,0 +1,144 @@ +{ + "entries": [ + { + "base": "SurfaceMaskGradientConfig", + "context": "BehaviorClass", + "variant": "", + "details": { + "name": "SurfaceMaskGradientConfig" + }, + "methods": [ + { + "base": "GetNumTags", + "context": "SurfaceMaskGradientConfig", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke GetNumTags" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after GetNumTags is invoked" + }, + "details": { + "name": "SurfaceMaskGradientConfig::GetNumTags", + "category": "Other" + }, + "params": [ + { + "typeid": "{E59D0A4C-BA3D-4288-B409-A00B7D5566AA}", + "details": { + "name": "SurfaceMaskGradientConfig*" + } + } + ], + "results": [ + { + "typeid": "{D6597933-47CD-4FC8-B911-63F3E2B0993A}", + "details": { + "name": "AZ::u64" + } + } + ] + }, + { + "base": "GetTag", + "context": "SurfaceMaskGradientConfig", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke GetTag" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after GetTag is invoked" + }, + "details": { + "name": "SurfaceMaskGradientConfig::GetTag", + "category": "Other" + }, + "params": [ + { + "typeid": "{E59D0A4C-BA3D-4288-B409-A00B7D5566AA}", + "details": { + "name": "SurfaceMaskGradientConfig*" + } + }, + { + "typeid": "{72039442-EB38-4D42-A1AD-CB68F7E0EEF6}", + "details": { + "name": "int" + } + } + ], + "results": [ + { + "typeid": "{9F4E062E-06A0-46D4-85DF-E0DA96467D3A}", + "details": { + "name": "Crc32" + } + } + ] + }, + { + "base": "RemoveTag", + "context": "SurfaceMaskGradientConfig", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke RemoveTag" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after RemoveTag is invoked" + }, + "details": { + "name": "SurfaceMaskGradientConfig::RemoveTag", + "category": "Other" + }, + "params": [ + { + "typeid": "{E59D0A4C-BA3D-4288-B409-A00B7D5566AA}", + "details": { + "name": "SurfaceMaskGradientConfig*" + } + }, + { + "typeid": "{72039442-EB38-4D42-A1AD-CB68F7E0EEF6}", + "details": { + "name": "int" + } + } + ] + }, + { + "base": "AddTag", + "context": "SurfaceMaskGradientConfig", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke AddTag" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after AddTag is invoked" + }, + "details": { + "name": "SurfaceMaskGradientConfig::AddTag", + "category": "Other" + }, + "params": [ + { + "typeid": "{E59D0A4C-BA3D-4288-B409-A00B7D5566AA}", + "details": { + "name": "SurfaceMaskGradientConfig*" + } + }, + { + "typeid": "{03AAAB3F-5C47-5A66-9EBC-D5FA4DB353C9}", + "details": { + "name": "AZStd::basic_string, allocator>" + } + } + ] + } + ] + } + ] +} \ No newline at end of file diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Classes/SurfaceSlopeGradientComponent.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Classes/SurfaceSlopeGradientComponent.names new file mode 100644 index 0000000000..dad8d7b765 --- /dev/null +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Classes/SurfaceSlopeGradientComponent.names @@ -0,0 +1,12 @@ +{ + "entries": [ + { + "base": "SurfaceSlopeGradientComponent", + "context": "BehaviorClass", + "variant": "", + "details": { + "name": "SurfaceSlopeGradientComponent" + } + } + ] +} \ No newline at end of file diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Classes/SurfaceSlopeGradientConfig.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Classes/SurfaceSlopeGradientConfig.names new file mode 100644 index 0000000000..4a9e8e25dd --- /dev/null +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Classes/SurfaceSlopeGradientConfig.names @@ -0,0 +1,144 @@ +{ + "entries": [ + { + "base": "SurfaceSlopeGradientConfig", + "context": "BehaviorClass", + "variant": "", + "details": { + "name": "SurfaceSlopeGradientConfig" + }, + "methods": [ + { + "base": "GetNumTags", + "context": "SurfaceSlopeGradientConfig", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke GetNumTags" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after GetNumTags is invoked" + }, + "details": { + "name": "SurfaceSlopeGradientConfig::GetNumTags", + "category": "Other" + }, + "params": [ + { + "typeid": "{691E0F23-37E9-434F-A1D1-E8DE5B4A3405}", + "details": { + "name": "SurfaceSlopeGradientConfig*" + } + } + ], + "results": [ + { + "typeid": "{D6597933-47CD-4FC8-B911-63F3E2B0993A}", + "details": { + "name": "AZ::u64" + } + } + ] + }, + { + "base": "GetTag", + "context": "SurfaceSlopeGradientConfig", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke GetTag" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after GetTag is invoked" + }, + "details": { + "name": "SurfaceSlopeGradientConfig::GetTag", + "category": "Other" + }, + "params": [ + { + "typeid": "{691E0F23-37E9-434F-A1D1-E8DE5B4A3405}", + "details": { + "name": "SurfaceSlopeGradientConfig*" + } + }, + { + "typeid": "{72039442-EB38-4D42-A1AD-CB68F7E0EEF6}", + "details": { + "name": "int" + } + } + ], + "results": [ + { + "typeid": "{9F4E062E-06A0-46D4-85DF-E0DA96467D3A}", + "details": { + "name": "Crc32" + } + } + ] + }, + { + "base": "RemoveTag", + "context": "SurfaceSlopeGradientConfig", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke RemoveTag" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after RemoveTag is invoked" + }, + "details": { + "name": "SurfaceSlopeGradientConfig::RemoveTag", + "category": "Other" + }, + "params": [ + { + "typeid": "{691E0F23-37E9-434F-A1D1-E8DE5B4A3405}", + "details": { + "name": "SurfaceSlopeGradientConfig*" + } + }, + { + "typeid": "{72039442-EB38-4D42-A1AD-CB68F7E0EEF6}", + "details": { + "name": "int" + } + } + ] + }, + { + "base": "AddTag", + "context": "SurfaceSlopeGradientConfig", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke AddTag" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after AddTag is invoked" + }, + "details": { + "name": "SurfaceSlopeGradientConfig::AddTag", + "category": "Other" + }, + "params": [ + { + "typeid": "{691E0F23-37E9-434F-A1D1-E8DE5B4A3405}", + "details": { + "name": "SurfaceSlopeGradientConfig*" + } + }, + { + "typeid": "{03AAAB3F-5C47-5A66-9EBC-D5FA4DB353C9}", + "details": { + "name": "AZStd::basic_string, allocator>" + } + } + ] + } + ] + } + ] +} \ No newline at end of file diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Classes/SurfaceTagWeight.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Classes/SurfaceTagWeight.names new file mode 100644 index 0000000000..52c8078238 --- /dev/null +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Classes/SurfaceTagWeight.names @@ -0,0 +1,99 @@ +{ + "entries": [ + { + "base": "SurfaceTagWeight", + "context": "BehaviorClass", + "variant": "", + "details": { + "name": "Surface Tag Weight", + "category": "Surface Data" + }, + "methods": [ + { + "base": "GetsurfaceType", + "details": { + "name": "Get Surface Type" + }, + "params": [ + { + "typeid": "{EA14018E-E853-4BF5-8E13-D83BB99A54CC}", + "details": { + "name": "Surface Tag Weight" + } + } + ], + "results": [ + { + "typeid": "{9F4E062E-06A0-46D4-85DF-E0DA96467D3A}", + "details": { + "name": "Tag" + } + } + ] + }, + { + "base": "SetsurfaceType", + "details": { + "name": "Set Surface Type" + }, + "params": [ + { + "typeid": "{EA14018E-E853-4BF5-8E13-D83BB99A54CC}", + "details": { + "name": "Surface Tag Weight" + } + }, + { + "typeid": "{9F4E062E-06A0-46D4-85DF-E0DA96467D3A}", + "details": { + "name": "Tag" + } + } + ] + }, + { + "base": "Getweight", + "details": { + "name": "Get Weight" + }, + "params": [ + { + "typeid": "{EA14018E-E853-4BF5-8E13-D83BB99A54CC}", + "details": { + "name": "Surface Tag Weight" + } + } + ], + "results": [ + { + "typeid": "{EA2C3E90-AFBE-44D4-A90D-FAAF79BAF93D}", + "details": { + "name": "Weight" + } + } + ] + }, + { + "base": "Setweight", + "details": { + "name": "Set Weight" + }, + "params": [ + { + "typeid": "{EA14018E-E853-4BF5-8E13-D83BB99A54CC}", + "details": { + "name": "Surface Tag Weight" + } + }, + { + "typeid": "{EA2C3E90-AFBE-44D4-A90D-FAAF79BAF93D}", + "details": { + "name": "Weight" + } + } + ] + } + ] + } + ] +} \ No newline at end of file diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Classes/TestTupleMethods.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Classes/TestTupleMethods.names new file mode 100644 index 0000000000..03702818ca --- /dev/null +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Classes/TestTupleMethods.names @@ -0,0 +1,58 @@ +{ + "entries": [ + { + "base": "TestTupleMethods", + "context": "BehaviorClass", + "variant": "", + "details": { + "name": "TestTupleMethods" + }, + "methods": [ + { + "base": "Three", + "context": "TestTupleMethods", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Three" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Three is invoked" + }, + "details": { + "name": "TestTupleMethods::Three", + "category": "Other" + }, + "params": [ + { + "typeid": "{8379EB7D-01FA-4538-B64B-A6543B4BE73D}", + "details": { + "name": "const Vector3&" + } + }, + { + "typeid": "{03AAAB3F-5C47-5A66-9EBC-D5FA4DB353C9}", + "details": { + "name": "const AZStd::basic_string, alloc" + } + }, + { + "typeid": "{A0CA880C-AFE4-43CB-926C-59AC48496112}", + "details": { + "name": "const bool&" + } + } + ], + "results": [ + { + "typeid": "{5BAFAD11-D6AF-5946-B09B-6E0B72E1209C}", + "details": { + "name": "tuple, allocator> bool >" + } + } + ] + } + ] + } + ] +} \ No newline at end of file diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Classes/ThresholdGradientComponent.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Classes/ThresholdGradientComponent.names new file mode 100644 index 0000000000..1418df947e --- /dev/null +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Classes/ThresholdGradientComponent.names @@ -0,0 +1,12 @@ +{ + "entries": [ + { + "base": "ThresholdGradientComponent", + "context": "BehaviorClass", + "variant": "", + "details": { + "name": "ThresholdGradientComponent" + } + } + ] +} \ No newline at end of file diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Classes/ThresholdGradientConfig.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Classes/ThresholdGradientConfig.names new file mode 100644 index 0000000000..4ca077834f --- /dev/null +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Classes/ThresholdGradientConfig.names @@ -0,0 +1,12 @@ +{ + "entries": [ + { + "base": "ThresholdGradientConfig", + "context": "BehaviorClass", + "variant": "", + "details": { + "name": "ThresholdGradientConfig" + } + } + ] +} \ No newline at end of file diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Classes/TickOrder.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Classes/TickOrder.names new file mode 100644 index 0000000000..58d8b41aac --- /dev/null +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Classes/TickOrder.names @@ -0,0 +1,169 @@ +{ + "entries": [ + { + "base": "TickOrder", + "context": "BehaviorClass", + "variant": "", + "details": { + "name": "Tick Order", + "category": "Timing" + }, + "methods": [ + { + "base": "GetPhysics", + "details": { + "name": "Get Physics" + }, + "results": [ + { + "typeid": "{72039442-EB38-4D42-A1AD-CB68F7E0EEF6}", + "details": { + "name": "int" + } + } + ] + }, + { + "base": "GetAnimation", + "details": { + "name": "Get Animation" + }, + "results": [ + { + "typeid": "{72039442-EB38-4D42-A1AD-CB68F7E0EEF6}", + "details": { + "name": "int" + } + } + ] + }, + { + "base": "GetPreRender", + "details": { + "name": "Get Pre Render" + }, + "results": [ + { + "typeid": "{72039442-EB38-4D42-A1AD-CB68F7E0EEF6}", + "details": { + "name": "int" + } + } + ] + }, + { + "base": "GetGame", + "details": { + "name": "Get Game" + }, + "results": [ + { + "typeid": "{72039442-EB38-4D42-A1AD-CB68F7E0EEF6}", + "details": { + "name": "int" + } + } + ] + }, + { + "base": "GetInput", + "details": { + "name": "Get Input" + }, + "results": [ + { + "typeid": "{72039442-EB38-4D42-A1AD-CB68F7E0EEF6}", + "details": { + "name": "int" + } + } + ] + }, + { + "base": "GetAttachment", + "details": { + "name": "Get Attachment" + }, + "results": [ + { + "typeid": "{72039442-EB38-4D42-A1AD-CB68F7E0EEF6}", + "details": { + "name": "int" + } + } + ] + }, + { + "base": "GetPlacement", + "details": { + "name": "Get Placement" + }, + "results": [ + { + "typeid": "{72039442-EB38-4D42-A1AD-CB68F7E0EEF6}", + "details": { + "name": "int" + } + } + ] + }, + { + "base": "GetDefault", + "details": { + "name": "Get Default" + }, + "results": [ + { + "typeid": "{72039442-EB38-4D42-A1AD-CB68F7E0EEF6}", + "details": { + "name": "int" + } + } + ] + }, + { + "base": "GetFirst", + "details": { + "name": "Get First" + }, + "results": [ + { + "typeid": "{72039442-EB38-4D42-A1AD-CB68F7E0EEF6}", + "details": { + "name": "int" + } + } + ] + }, + { + "base": "GetUI", + "details": { + "name": "GetUI" + }, + "results": [ + { + "typeid": "{72039442-EB38-4D42-A1AD-CB68F7E0EEF6}", + "details": { + "name": "int" + } + } + ] + }, + { + "base": "GetLast", + "details": { + "name": "Get Last" + }, + "results": [ + { + "typeid": "{72039442-EB38-4D42-A1AD-CB68F7E0EEF6}", + "details": { + "name": "int" + } + } + ] + } + ] + } + ] +} \ No newline at end of file diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Classes/TransformComponent.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Classes/TransformComponent.names new file mode 100644 index 0000000000..ebf6400d43 --- /dev/null +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Classes/TransformComponent.names @@ -0,0 +1,12 @@ +{ + "entries": [ + { + "base": "TransformComponent", + "context": "BehaviorClass", + "variant": "", + "details": { + "name": "TransformComponent" + } + } + ] +} \ No newline at end of file diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Classes/TransformConfig.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Classes/TransformConfig.names new file mode 100644 index 0000000000..3c5ade5a55 --- /dev/null +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Classes/TransformConfig.names @@ -0,0 +1,321 @@ +{ + "entries": [ + { + "base": "TransformConfig", + "context": "BehaviorClass", + "variant": "", + "details": { + "name": "Transform Config", + "category": "Entity" + }, + "methods": [ + { + "base": "SetTransform", + "context": "TransformConfig", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Set Transform" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Set Transform is invoked" + }, + "details": { + "name": "Set Transform" + }, + "params": [ + { + "typeid": "{B3AAB26D-D075-4E2B-9653-9527EE363DF8}", + "details": { + "name": "Transform Config" + } + }, + { + "typeid": "{5D9958E9-9F1E-4985-B532-FFFDE75FEDFD}", + "details": { + "name": "Transform" + } + } + ] + }, + { + "base": "SetLocalAndWorldTransform", + "context": "TransformConfig", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Set Local And World Transform" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Set Local And World Transform is invoked" + }, + "details": { + "name": "Set Local And World Transform" + }, + "params": [ + { + "typeid": "{B3AAB26D-D075-4E2B-9653-9527EE363DF8}", + "details": { + "name": "Transform Config" + } + }, + { + "typeid": "{5D9958E9-9F1E-4985-B532-FFFDE75FEDFD}", + "details": { + "name": "Local" + } + }, + { + "typeid": "{5D9958E9-9F1E-4985-B532-FFFDE75FEDFD}", + "details": { + "name": "World" + } + } + ] + }, + { + "base": "GetparentActivationTransformMode", + "details": { + "name": "Get Parent Activation Transform Mode" + }, + "params": [ + { + "typeid": "{B3AAB26D-D075-4E2B-9653-9527EE363DF8}", + "details": { + "name": "Transform Config" + } + } + ], + "results": [ + { + "typeid": "{72039442-EB38-4D42-A1AD-CB68F7E0EEF6}", + "details": { + "name": "Mode", + "tooltip": "0: Maintain Original Relative Transform\n1: Maintain Current World Transform" + } + } + ] + }, + { + "base": "SetparentActivationTransformMode", + "details": { + "name": "Set Parent Activation Transform Mode" + }, + "params": [ + { + "typeid": "{B3AAB26D-D075-4E2B-9653-9527EE363DF8}", + "details": { + "name": "Transform Config" + } + }, + { + "typeid": "{72039442-EB38-4D42-A1AD-CB68F7E0EEF6}", + "details": { + "name": "Mode", + "tooltip": "0: Maintain Original Relative Transform\n1: Maintain Current World Transform" + } + } + ] + }, + { + "base": "GetparentId", + "details": { + "name": "Get Parent Id" + }, + "params": [ + { + "typeid": "{B3AAB26D-D075-4E2B-9653-9527EE363DF8}", + "details": { + "name": "Transform Config" + } + } + ], + "results": [ + { + "typeid": "{6383F1D3-BB27-4E6B-A49A-6409B2059EAA}", + "details": { + "name": "Parent Id", + "tooltip": "Entity Unique Id" + } + } + ] + }, + { + "base": "SetparentId", + "details": { + "name": "Set Parent Id" + }, + "params": [ + { + "typeid": "{B3AAB26D-D075-4E2B-9653-9527EE363DF8}", + "details": { + "name": "Transform Config" + } + }, + { + "typeid": "{6383F1D3-BB27-4E6B-A49A-6409B2059EAA}", + "details": { + "name": "Parent Id", + "tooltip": "Entity Unique Id" + } + } + ] + }, + { + "base": "GetworldTransform", + "details": { + "name": "Get World Transform" + }, + "params": [ + { + "typeid": "{B3AAB26D-D075-4E2B-9653-9527EE363DF8}", + "details": { + "name": "Transform Config" + } + } + ], + "results": [ + { + "typeid": "{5D9958E9-9F1E-4985-B532-FFFDE75FEDFD}", + "details": { + "name": "World" + } + } + ] + }, + { + "base": "SetworldTransform", + "details": { + "name": "Set World Transform" + }, + "params": [ + { + "typeid": "{B3AAB26D-D075-4E2B-9653-9527EE363DF8}", + "details": { + "name": "Transform Config" + } + }, + { + "typeid": "{5D9958E9-9F1E-4985-B532-FFFDE75FEDFD}", + "details": { + "name": "World" + } + } + ] + }, + { + "base": "GetMaintainCurrentWorldTransform", + "details": { + "name": "Get Maintain Current World Transform" + }, + "results": [ + { + "typeid": "{72039442-EB38-4D42-A1AD-CB68F7E0EEF6}", + "details": { + "name": "Value" + } + } + ] + }, + { + "base": "GetisStatic", + "details": { + "name": "Get Is Static" + }, + "params": [ + { + "typeid": "{B3AAB26D-D075-4E2B-9653-9527EE363DF8}", + "details": { + "name": "Transform Config" + } + } + ], + "results": [ + { + "typeid": "{A0CA880C-AFE4-43CB-926C-59AC48496112}", + "details": { + "name": "Is Static" + } + } + ] + }, + { + "base": "SetisStatic", + "details": { + "name": "Set Is Static" + }, + "params": [ + { + "typeid": "{B3AAB26D-D075-4E2B-9653-9527EE363DF8}", + "details": { + "name": "Transform Config" + } + }, + { + "typeid": "{A0CA880C-AFE4-43CB-926C-59AC48496112}", + "details": { + "name": "Is Static" + } + } + ] + }, + { + "base": "GetMaintainOriginalRelativeTransform", + "details": { + "name": "Get Maintain Original Relative Transform" + }, + "results": [ + { + "typeid": "{72039442-EB38-4D42-A1AD-CB68F7E0EEF6}", + "details": { + "name": "Value" + } + } + ] + }, + { + "base": "GetlocalTransform", + "details": { + "name": "Get Local Transform" + }, + "params": [ + { + "typeid": "{B3AAB26D-D075-4E2B-9653-9527EE363DF8}", + "details": { + "name": "Transform Config" + } + } + ], + "results": [ + { + "typeid": "{5D9958E9-9F1E-4985-B532-FFFDE75FEDFD}", + "details": { + "name": "Local" + } + } + ] + }, + { + "base": "SetlocalTransform", + "details": { + "name": "Set Local Transform" + }, + "params": [ + { + "typeid": "{B3AAB26D-D075-4E2B-9653-9527EE363DF8}", + "details": { + "name": "Transform Config" + } + }, + { + "typeid": "{5D9958E9-9F1E-4985-B532-FFFDE75FEDFD}", + "details": { + "name": "Local" + } + } + ] + } + ] + } + ] +} \ No newline at end of file diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Classes/TriggerEvent.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Classes/TriggerEvent.names new file mode 100644 index 0000000000..7dd601aab9 --- /dev/null +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Classes/TriggerEvent.names @@ -0,0 +1,80 @@ +{ + "entries": [ + { + "base": "TriggerEvent", + "context": "BehaviorClass", + "variant": "", + "details": { + "name": "Trigger Event" + }, + "methods": [ + { + "base": "GetTriggerEntityId", + "context": "TriggerEvent", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Get Trigger Entity Id" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Get Trigger Entity Id is invoked" + }, + "details": { + "name": "Get Trigger Entity Id", + "category": "Other" + }, + "params": [ + { + "typeid": "{7A0851A3-2CBD-4A03-85D5-1C40221E7F61}", + "details": { + "name": "Trigger Event" + } + } + ], + "results": [ + { + "typeid": "{6383F1D3-BB27-4E6B-A49A-6409B2059EAA}", + "details": { + "name": "Entity Id", + "tooltip": "Entity Unique Id" + } + } + ] + }, + { + "base": "GetOtherEntityId", + "context": "TriggerEvent", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Get Other Entity Id" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Get Other Entity Id is invoked" + }, + "details": { + "name": "Get Other Entity Id", + "category": "Other" + }, + "params": [ + { + "typeid": "{7A0851A3-2CBD-4A03-85D5-1C40221E7F61}", + "details": { + "name": "Trigger Event" + } + } + ], + "results": [ + { + "typeid": "{6383F1D3-BB27-4E6B-A49A-6409B2059EAA}", + "details": { + "name": "Entity Id", + "tooltip": "Entity Unique Id" + } + } + ] + } + ] + } + ] +} \ No newline at end of file diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Classes/TypeExposition.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Classes/TypeExposition.names new file mode 100644 index 0000000000..5cb7fe9b2d --- /dev/null +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Classes/TypeExposition.names @@ -0,0 +1,78 @@ +{ + "entries": [ + { + "base": "TypeExposition", + "context": "BehaviorClass", + "variant": "", + "details": { + "name": "TypeExposition" + }, + "methods": [ + { + "base": "Reflect_AZStd__array_AZ__Vector3_2", + "context": "TypeExposition", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Reflect_AZStd__array_AZ__Vector3_2" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Reflect_AZStd__array_AZ__Vector3_2 is invoked" + }, + "details": { + "name": "TypeExposition::Reflect_AZStd::array", + "category": "Other" + }, + "params": [ + { + "typeid": "{E65D74A8-908B-51B4-94CC-7226AC363DD5}", + "details": { + "name": "AZStd::array&" + } + } + ], + "results": [ + { + "typeid": "{D6597933-47CD-4FC8-B911-63F3E2B0993A}", + "details": { + "name": "AZ::u64" + } + } + ] + }, + { + "base": "Reflect_AZ__Outcome_AZ__Vector3_void", + "context": "TypeExposition", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Reflect_AZ__Outcome_AZ__Vector3_void" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Reflect_AZ__Outcome_AZ__Vector3_void is invoked" + }, + "details": { + "name": "TypeExposition::Reflect_AZ::Outcome", + "category": "Other" + }, + "params": [ + { + "typeid": "{D1FEE25B-F252-5625-863C-1312E1F822A0}", + "details": { + "name": "Outcome&" + } + } + ], + "results": [ + { + "typeid": "{A0CA880C-AFE4-43CB-926C-59AC48496112}", + "details": { + "name": "bool" + } + } + ] + } + ] + } + ] +} \ No newline at end of file diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Classes/UVCoords.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Classes/UVCoords.names new file mode 100644 index 0000000000..ecbd6b8618 --- /dev/null +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Classes/UVCoords.names @@ -0,0 +1,346 @@ +{ + "entries": [ + { + "base": "UVCoords", + "context": "BehaviorClass", + "variant": "", + "details": { + "name": "UV Coords", + "category": "UI/UI Examples" + }, + "methods": [ + { + "base": "SetUVCoords", + "context": "UVCoords", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke SetUV Coords" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after SetUV Coords is invoked" + }, + "details": { + "name": "Set UV Coords" + }, + "params": [ + { + "typeid": "{E134EAE8-52A1-4E43-847B-09E546CC5B95}", + "details": { + "name": "UV Rect" + } + }, + { + "typeid": "{EA2C3E90-AFBE-44D4-A90D-FAAF79BAF93D}", + "details": { + "name": "Left" + } + }, + { + "typeid": "{EA2C3E90-AFBE-44D4-A90D-FAAF79BAF93D}", + "details": { + "name": "Top" + } + }, + { + "typeid": "{EA2C3E90-AFBE-44D4-A90D-FAAF79BAF93D}", + "details": { + "name": "Right" + } + }, + { + "typeid": "{EA2C3E90-AFBE-44D4-A90D-FAAF79BAF93D}", + "details": { + "name": "Bottom" + } + } + ] + }, + { + "base": "SetBottom", + "context": "UVCoords", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Set Bottom" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Set Bottom is invoked" + }, + "details": { + "name": "Set Bottom" + }, + "params": [ + { + "typeid": "{E134EAE8-52A1-4E43-847B-09E546CC5B95}", + "details": { + "name": "UV Rect" + } + }, + { + "typeid": "{EA2C3E90-AFBE-44D4-A90D-FAAF79BAF93D}", + "details": { + "name": "Bottom" + } + } + ] + }, + { + "base": "SetRight", + "context": "UVCoords", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Set Right" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Set Right is invoked" + }, + "details": { + "name": "Set Right" + }, + "params": [ + { + "typeid": "{E134EAE8-52A1-4E43-847B-09E546CC5B95}", + "details": { + "name": "UV Rect" + } + }, + { + "typeid": "{EA2C3E90-AFBE-44D4-A90D-FAAF79BAF93D}", + "details": { + "name": "Right" + } + } + ] + }, + { + "base": "SetTop", + "context": "UVCoords", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Set Top" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Set Top is invoked" + }, + "details": { + "name": "Set Top" + }, + "params": [ + { + "typeid": "{E134EAE8-52A1-4E43-847B-09E546CC5B95}", + "details": { + "name": "UV Rect" + } + }, + { + "typeid": "{EA2C3E90-AFBE-44D4-A90D-FAAF79BAF93D}", + "details": { + "name": "Top" + } + } + ] + }, + { + "base": "SetLeft", + "context": "UVCoords", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Set Left" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Set Left is invoked" + }, + "details": { + "name": "Set Left" + }, + "params": [ + { + "typeid": "{E134EAE8-52A1-4E43-847B-09E546CC5B95}", + "details": { + "name": "UV Rect" + } + }, + { + "typeid": "{EA2C3E90-AFBE-44D4-A90D-FAAF79BAF93D}", + "details": { + "name": "Left" + } + } + ] + }, + { + "base": "Getleft", + "details": { + "name": "Left" + }, + "params": [ + { + "typeid": "{E134EAE8-52A1-4E43-847B-09E546CC5B95}", + "details": { + "name": "UV Rect" + } + } + ], + "results": [ + { + "typeid": "{EA2C3E90-AFBE-44D4-A90D-FAAF79BAF93D}", + "details": { + "name": "Left" + } + } + ] + }, + { + "base": "Setleft", + "details": { + "name": "Set Left" + }, + "params": [ + { + "typeid": "{E134EAE8-52A1-4E43-847B-09E546CC5B95}", + "details": { + "name": "UV Rect" + } + }, + { + "typeid": "{EA2C3E90-AFBE-44D4-A90D-FAAF79BAF93D}", + "details": { + "name": "Left" + } + } + ] + }, + { + "base": "Gettop", + "details": { + "name": "Top" + }, + "params": [ + { + "typeid": "{E134EAE8-52A1-4E43-847B-09E546CC5B95}", + "details": { + "name": "UV Rect" + } + } + ], + "results": [ + { + "typeid": "{EA2C3E90-AFBE-44D4-A90D-FAAF79BAF93D}", + "details": { + "name": "Top" + } + } + ] + }, + { + "base": "Settop", + "details": { + "name": "Set Top" + }, + "params": [ + { + "typeid": "{E134EAE8-52A1-4E43-847B-09E546CC5B95}", + "details": { + "name": "UV Rect" + } + }, + { + "typeid": "{EA2C3E90-AFBE-44D4-A90D-FAAF79BAF93D}", + "details": { + "name": "Top" + } + } + ] + }, + { + "base": "Getright", + "details": { + "name": "Get Right" + }, + "params": [ + { + "typeid": "{E134EAE8-52A1-4E43-847B-09E546CC5B95}", + "details": { + "name": "UV Rect" + } + } + ], + "results": [ + { + "typeid": "{EA2C3E90-AFBE-44D4-A90D-FAAF79BAF93D}", + "details": { + "name": "Right" + } + } + ] + }, + { + "base": "Setright", + "details": { + "name": "Set Right" + }, + "params": [ + { + "typeid": "{E134EAE8-52A1-4E43-847B-09E546CC5B95}", + "details": { + "name": "UV Rect" + } + }, + { + "typeid": "{EA2C3E90-AFBE-44D4-A90D-FAAF79BAF93D}", + "details": { + "name": "Right" + } + } + ] + }, + { + "base": "Getbottom", + "details": { + "name": "Get Bottom" + }, + "params": [ + { + "typeid": "{E134EAE8-52A1-4E43-847B-09E546CC5B95}", + "details": { + "name": "UV Rect" + } + } + ], + "results": [ + { + "typeid": "{EA2C3E90-AFBE-44D4-A90D-FAAF79BAF93D}", + "details": { + "name": "Bottom" + } + } + ] + }, + { + "base": "Setbottom", + "details": { + "name": "Bottom" + }, + "params": [ + { + "typeid": "{E134EAE8-52A1-4E43-847B-09E546CC5B95}", + "details": { + "name": "UV Rect" + } + }, + { + "typeid": "{EA2C3E90-AFBE-44D4-A90D-FAAF79BAF93D}", + "details": { + "name": "Bottom" + } + } + ] + } + ] + } + ] +} \ No newline at end of file diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Classes/UiAnchors.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Classes/UiAnchors.names new file mode 100644 index 0000000000..69c64e6c7a --- /dev/null +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Classes/UiAnchors.names @@ -0,0 +1,346 @@ +{ + "entries": [ + { + "base": "UiAnchors", + "context": "BehaviorClass", + "variant": "", + "details": { + "name": "UI Anchors", + "category": "UI" + }, + "methods": [ + { + "base": "SetBottom", + "context": "UiAnchors", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Set Bottom" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Set Bottom is invoked" + }, + "details": { + "name": "Set Bottom" + }, + "params": [ + { + "typeid": "{65D4346C-FB16-4CB0-9BDC-1185B122C4A9}", + "details": { + "name": "Anchors" + } + }, + { + "typeid": "{EA2C3E90-AFBE-44D4-A90D-FAAF79BAF93D}", + "details": { + "name": "float" + } + } + ] + }, + { + "base": "SetRight", + "context": "UiAnchors", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Set Right" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Set Right is invoked" + }, + "details": { + "name": "Set Right" + }, + "params": [ + { + "typeid": "{65D4346C-FB16-4CB0-9BDC-1185B122C4A9}", + "details": { + "name": "Anchors" + } + }, + { + "typeid": "{EA2C3E90-AFBE-44D4-A90D-FAAF79BAF93D}", + "details": { + "name": "float" + } + } + ] + }, + { + "base": "SetTop", + "context": "UiAnchors", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Set Top" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Set Top is invoked" + }, + "details": { + "name": "Set Top" + }, + "params": [ + { + "typeid": "{65D4346C-FB16-4CB0-9BDC-1185B122C4A9}", + "details": { + "name": "Anchors" + } + }, + { + "typeid": "{EA2C3E90-AFBE-44D4-A90D-FAAF79BAF93D}", + "details": { + "name": "float" + } + } + ] + }, + { + "base": "SetLeft", + "context": "UiAnchors", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Set Left" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Set Left is invoked" + }, + "details": { + "name": "Set Left" + }, + "params": [ + { + "typeid": "{65D4346C-FB16-4CB0-9BDC-1185B122C4A9}", + "details": { + "name": "Anchors" + } + }, + { + "typeid": "{EA2C3E90-AFBE-44D4-A90D-FAAF79BAF93D}", + "details": { + "name": "float" + } + } + ] + }, + { + "base": "SetAnchors", + "context": "UiAnchors", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Set Anchors" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Set Anchors is invoked" + }, + "details": { + "name": "Set Anchors" + }, + "params": [ + { + "typeid": "{65D4346C-FB16-4CB0-9BDC-1185B122C4A9}", + "details": { + "name": "Anchors" + } + }, + { + "typeid": "{EA2C3E90-AFBE-44D4-A90D-FAAF79BAF93D}", + "details": { + "name": "float" + } + }, + { + "typeid": "{EA2C3E90-AFBE-44D4-A90D-FAAF79BAF93D}", + "details": { + "name": "float" + } + }, + { + "typeid": "{EA2C3E90-AFBE-44D4-A90D-FAAF79BAF93D}", + "details": { + "name": "float" + } + }, + { + "typeid": "{EA2C3E90-AFBE-44D4-A90D-FAAF79BAF93D}", + "details": { + "name": "float" + } + } + ] + }, + { + "base": "Getleft", + "details": { + "name": "Getleft" + }, + "params": [ + { + "typeid": "{65D4346C-FB16-4CB0-9BDC-1185B122C4A9}", + "details": { + "name": "Anchors" + } + } + ], + "results": [ + { + "typeid": "{EA2C3E90-AFBE-44D4-A90D-FAAF79BAF93D}", + "details": { + "name": "float" + } + } + ] + }, + { + "base": "Setleft", + "details": { + "name": "Setleft" + }, + "params": [ + { + "typeid": "{65D4346C-FB16-4CB0-9BDC-1185B122C4A9}", + "details": { + "name": "Anchors" + } + }, + { + "typeid": "{EA2C3E90-AFBE-44D4-A90D-FAAF79BAF93D}", + "details": { + "name": "float" + } + } + ] + }, + { + "base": "Gettop", + "details": { + "name": "Gettop" + }, + "params": [ + { + "typeid": "{65D4346C-FB16-4CB0-9BDC-1185B122C4A9}", + "details": { + "name": "Anchors" + } + } + ], + "results": [ + { + "typeid": "{EA2C3E90-AFBE-44D4-A90D-FAAF79BAF93D}", + "details": { + "name": "float" + } + } + ] + }, + { + "base": "Settop", + "details": { + "name": "Settop" + }, + "params": [ + { + "typeid": "{65D4346C-FB16-4CB0-9BDC-1185B122C4A9}", + "details": { + "name": "Anchors" + } + }, + { + "typeid": "{EA2C3E90-AFBE-44D4-A90D-FAAF79BAF93D}", + "details": { + "name": "float" + } + } + ] + }, + { + "base": "Getright", + "details": { + "name": "Getright" + }, + "params": [ + { + "typeid": "{65D4346C-FB16-4CB0-9BDC-1185B122C4A9}", + "details": { + "name": "Anchors" + } + } + ], + "results": [ + { + "typeid": "{EA2C3E90-AFBE-44D4-A90D-FAAF79BAF93D}", + "details": { + "name": "float" + } + } + ] + }, + { + "base": "Setright", + "details": { + "name": "Setright" + }, + "params": [ + { + "typeid": "{65D4346C-FB16-4CB0-9BDC-1185B122C4A9}", + "details": { + "name": "Anchors" + } + }, + { + "typeid": "{EA2C3E90-AFBE-44D4-A90D-FAAF79BAF93D}", + "details": { + "name": "float" + } + } + ] + }, + { + "base": "Getbottom", + "details": { + "name": "Getbottom" + }, + "params": [ + { + "typeid": "{65D4346C-FB16-4CB0-9BDC-1185B122C4A9}", + "details": { + "name": "Anchors" + } + } + ], + "results": [ + { + "typeid": "{EA2C3E90-AFBE-44D4-A90D-FAAF79BAF93D}", + "details": { + "name": "float" + } + } + ] + }, + { + "base": "Setbottom", + "details": { + "name": "Setbottom" + }, + "params": [ + { + "typeid": "{65D4346C-FB16-4CB0-9BDC-1185B122C4A9}", + "details": { + "name": "Anchors" + } + }, + { + "typeid": "{EA2C3E90-AFBE-44D4-A90D-FAAF79BAF93D}", + "details": { + "name": "float" + } + } + ] + } + ] + } + ] +} \ No newline at end of file diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Classes/UiFaderComponent.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Classes/UiFaderComponent.names new file mode 100644 index 0000000000..7f7fcd9478 --- /dev/null +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Classes/UiFaderComponent.names @@ -0,0 +1,12 @@ +{ + "entries": [ + { + "base": "UiFaderComponent", + "context": "BehaviorClass", + "variant": "", + "details": { + "name": "UiFaderComponent" + } + } + ] +} \ No newline at end of file diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Classes/UiImageComponent.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Classes/UiImageComponent.names new file mode 100644 index 0000000000..42ce5b7de3 --- /dev/null +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Classes/UiImageComponent.names @@ -0,0 +1,12 @@ +{ + "entries": [ + { + "base": "UiImageComponent", + "context": "BehaviorClass", + "variant": "", + "details": { + "name": "UiImageComponent" + } + } + ] +} \ No newline at end of file diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Classes/UiImageSequenceComponent.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Classes/UiImageSequenceComponent.names new file mode 100644 index 0000000000..86c01c7510 --- /dev/null +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Classes/UiImageSequenceComponent.names @@ -0,0 +1,12 @@ +{ + "entries": [ + { + "base": "UiImageSequenceComponent", + "context": "BehaviorClass", + "variant": "", + "details": { + "name": "UiImageSequenceComponent" + } + } + ] +} \ No newline at end of file diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Classes/UiLayoutCellComponent.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Classes/UiLayoutCellComponent.names new file mode 100644 index 0000000000..d7f8882110 --- /dev/null +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Classes/UiLayoutCellComponent.names @@ -0,0 +1,12 @@ +{ + "entries": [ + { + "base": "UiLayoutCellComponent", + "context": "BehaviorClass", + "variant": "", + "details": { + "name": "UiLayoutCellComponent" + } + } + ] +} \ No newline at end of file diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Classes/UiLayoutColumnComponent.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Classes/UiLayoutColumnComponent.names new file mode 100644 index 0000000000..bc37e12574 --- /dev/null +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Classes/UiLayoutColumnComponent.names @@ -0,0 +1,12 @@ +{ + "entries": [ + { + "base": "UiLayoutColumnComponent", + "context": "BehaviorClass", + "variant": "", + "details": { + "name": "UiLayoutColumnComponent" + } + } + ] +} \ No newline at end of file diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Classes/UiLayoutRowComponent.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Classes/UiLayoutRowComponent.names new file mode 100644 index 0000000000..7f576d62e9 --- /dev/null +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Classes/UiLayoutRowComponent.names @@ -0,0 +1,12 @@ +{ + "entries": [ + { + "base": "UiLayoutRowComponent", + "context": "BehaviorClass", + "variant": "", + "details": { + "name": "UiLayoutRowComponent" + } + } + ] +} \ No newline at end of file diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Classes/UiOffsets.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Classes/UiOffsets.names new file mode 100644 index 0000000000..8115b68587 --- /dev/null +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Classes/UiOffsets.names @@ -0,0 +1,346 @@ +{ + "entries": [ + { + "base": "UiOffsets", + "context": "BehaviorClass", + "variant": "", + "details": { + "name": "UI Offsets", + "category": "UI" + }, + "methods": [ + { + "base": "SetBottom", + "context": "UiOffsets", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Set Bottom" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Set Bottom is invoked" + }, + "details": { + "name": "Set Bottom" + }, + "params": [ + { + "typeid": "{F681BA9D-245C-4630-B20E-05DD752FAD57}", + "details": { + "name": "Offsets" + } + }, + { + "typeid": "{EA2C3E90-AFBE-44D4-A90D-FAAF79BAF93D}", + "details": { + "name": "Value" + } + } + ] + }, + { + "base": "SetRight", + "context": "UiOffsets", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Set Right" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Set Right is invoked" + }, + "details": { + "name": "Set Right" + }, + "params": [ + { + "typeid": "{F681BA9D-245C-4630-B20E-05DD752FAD57}", + "details": { + "name": "Offsets" + } + }, + { + "typeid": "{EA2C3E90-AFBE-44D4-A90D-FAAF79BAF93D}", + "details": { + "name": "Value" + } + } + ] + }, + { + "base": "SetOffsets", + "context": "UiOffsets", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Set Offsets" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Set Offsets is invoked" + }, + "details": { + "name": "Set Offsets" + }, + "params": [ + { + "typeid": "{F681BA9D-245C-4630-B20E-05DD752FAD57}", + "details": { + "name": "Offsets" + } + }, + { + "typeid": "{EA2C3E90-AFBE-44D4-A90D-FAAF79BAF93D}", + "details": { + "name": "Left" + } + }, + { + "typeid": "{EA2C3E90-AFBE-44D4-A90D-FAAF79BAF93D}", + "details": { + "name": "Top" + } + }, + { + "typeid": "{EA2C3E90-AFBE-44D4-A90D-FAAF79BAF93D}", + "details": { + "name": "Right" + } + }, + { + "typeid": "{EA2C3E90-AFBE-44D4-A90D-FAAF79BAF93D}", + "details": { + "name": "Bottom" + } + } + ] + }, + { + "base": "SetTop", + "context": "UiOffsets", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Set Top" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Set Top is invoked" + }, + "details": { + "name": "Set Top" + }, + "params": [ + { + "typeid": "{F681BA9D-245C-4630-B20E-05DD752FAD57}", + "details": { + "name": "Offsets" + } + }, + { + "typeid": "{EA2C3E90-AFBE-44D4-A90D-FAAF79BAF93D}", + "details": { + "name": "Value" + } + } + ] + }, + { + "base": "SetLeft", + "context": "UiOffsets", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Set Left" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Set Left is invoked" + }, + "details": { + "name": "Set Left" + }, + "params": [ + { + "typeid": "{F681BA9D-245C-4630-B20E-05DD752FAD57}", + "details": { + "name": "Offsets" + } + }, + { + "typeid": "{EA2C3E90-AFBE-44D4-A90D-FAAF79BAF93D}", + "details": { + "name": "Value" + } + } + ] + }, + { + "base": "Getleft", + "details": { + "name": "Get Left" + }, + "params": [ + { + "typeid": "{F681BA9D-245C-4630-B20E-05DD752FAD57}", + "details": { + "name": "Offsets" + } + } + ], + "results": [ + { + "typeid": "{EA2C3E90-AFBE-44D4-A90D-FAAF79BAF93D}", + "details": { + "name": "Value" + } + } + ] + }, + { + "base": "Setleft", + "details": { + "name": "Set Left" + }, + "params": [ + { + "typeid": "{F681BA9D-245C-4630-B20E-05DD752FAD57}", + "details": { + "name": "Offsets" + } + }, + { + "typeid": "{EA2C3E90-AFBE-44D4-A90D-FAAF79BAF93D}", + "details": { + "name": "Value" + } + } + ] + }, + { + "base": "Gettop", + "details": { + "name": "Get Top" + }, + "params": [ + { + "typeid": "{F681BA9D-245C-4630-B20E-05DD752FAD57}", + "details": { + "name": "Offsets" + } + } + ], + "results": [ + { + "typeid": "{EA2C3E90-AFBE-44D4-A90D-FAAF79BAF93D}", + "details": { + "name": "Value" + } + } + ] + }, + { + "base": "Settop", + "details": { + "name": "Set Top" + }, + "params": [ + { + "typeid": "{F681BA9D-245C-4630-B20E-05DD752FAD57}", + "details": { + "name": "Offsets" + } + }, + { + "typeid": "{EA2C3E90-AFBE-44D4-A90D-FAAF79BAF93D}", + "details": { + "name": "Value" + } + } + ] + }, + { + "base": "Getright", + "details": { + "name": "Get Right" + }, + "params": [ + { + "typeid": "{F681BA9D-245C-4630-B20E-05DD752FAD57}", + "details": { + "name": "Offsets" + } + } + ], + "results": [ + { + "typeid": "{EA2C3E90-AFBE-44D4-A90D-FAAF79BAF93D}", + "details": { + "name": "Value" + } + } + ] + }, + { + "base": "Setright", + "details": { + "name": "Set Right" + }, + "params": [ + { + "typeid": "{F681BA9D-245C-4630-B20E-05DD752FAD57}", + "details": { + "name": "Offsets" + } + }, + { + "typeid": "{EA2C3E90-AFBE-44D4-A90D-FAAF79BAF93D}", + "details": { + "name": "Value" + } + } + ] + }, + { + "base": "Getbottom", + "details": { + "name": "Get Bottom" + }, + "params": [ + { + "typeid": "{F681BA9D-245C-4630-B20E-05DD752FAD57}", + "details": { + "name": "Offsets" + } + } + ], + "results": [ + { + "typeid": "{EA2C3E90-AFBE-44D4-A90D-FAAF79BAF93D}", + "details": { + "name": "Value" + } + } + ] + }, + { + "base": "Setbottom", + "details": { + "name": "Set Bottom" + }, + "params": [ + { + "typeid": "{F681BA9D-245C-4630-B20E-05DD752FAD57}", + "details": { + "name": "Offsets" + } + }, + { + "typeid": "{EA2C3E90-AFBE-44D4-A90D-FAAF79BAF93D}", + "details": { + "name": "Value" + } + } + ] + } + ] + } + ] +} \ No newline at end of file diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Classes/UiPadding.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Classes/UiPadding.names new file mode 100644 index 0000000000..4249172ac9 --- /dev/null +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Classes/UiPadding.names @@ -0,0 +1,346 @@ +{ + "entries": [ + { + "base": "UiPadding", + "context": "BehaviorClass", + "variant": "", + "details": { + "name": "UI Padding", + "category": "UI" + }, + "methods": [ + { + "base": "SetPadding", + "context": "UiPadding", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Set Padding" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Set Padding is invoked" + }, + "details": { + "name": "Set Padding" + }, + "params": [ + { + "typeid": "{DE5C18B0-4214-4A37-B590-8D45CC450A96}", + "details": { + "name": "Padding" + } + }, + { + "typeid": "{72039442-EB38-4D42-A1AD-CB68F7E0EEF6}", + "details": { + "name": "int" + } + }, + { + "typeid": "{72039442-EB38-4D42-A1AD-CB68F7E0EEF6}", + "details": { + "name": "int" + } + }, + { + "typeid": "{72039442-EB38-4D42-A1AD-CB68F7E0EEF6}", + "details": { + "name": "int" + } + }, + { + "typeid": "{72039442-EB38-4D42-A1AD-CB68F7E0EEF6}", + "details": { + "name": "int" + } + } + ] + }, + { + "base": "SetBottom", + "context": "UiPadding", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Set Bottom" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Set Bottom is invoked" + }, + "details": { + "name": "Set Bottom" + }, + "params": [ + { + "typeid": "{DE5C18B0-4214-4A37-B590-8D45CC450A96}", + "details": { + "name": "Padding" + } + }, + { + "typeid": "{72039442-EB38-4D42-A1AD-CB68F7E0EEF6}", + "details": { + "name": "int" + } + } + ] + }, + { + "base": "SetRight", + "context": "UiPadding", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Set Right" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Set Right is invoked" + }, + "details": { + "name": "Set Right" + }, + "params": [ + { + "typeid": "{DE5C18B0-4214-4A37-B590-8D45CC450A96}", + "details": { + "name": "Padding" + } + }, + { + "typeid": "{72039442-EB38-4D42-A1AD-CB68F7E0EEF6}", + "details": { + "name": "int" + } + } + ] + }, + { + "base": "SetTop", + "context": "UiPadding", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Set Top" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Set Top is invoked" + }, + "details": { + "name": "Set Top" + }, + "params": [ + { + "typeid": "{DE5C18B0-4214-4A37-B590-8D45CC450A96}", + "details": { + "name": "Padding" + } + }, + { + "typeid": "{72039442-EB38-4D42-A1AD-CB68F7E0EEF6}", + "details": { + "name": "int" + } + } + ] + }, + { + "base": "SetLeft", + "context": "UiPadding", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Set Left" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Set Left is invoked" + }, + "details": { + "name": "Set Left" + }, + "params": [ + { + "typeid": "{DE5C18B0-4214-4A37-B590-8D45CC450A96}", + "details": { + "name": "Padding" + } + }, + { + "typeid": "{72039442-EB38-4D42-A1AD-CB68F7E0EEF6}", + "details": { + "name": "int" + } + } + ] + }, + { + "base": "Getleft", + "details": { + "name": "Getleft" + }, + "params": [ + { + "typeid": "{DE5C18B0-4214-4A37-B590-8D45CC450A96}", + "details": { + "name": "Padding" + } + } + ], + "results": [ + { + "typeid": "{72039442-EB38-4D42-A1AD-CB68F7E0EEF6}", + "details": { + "name": "int" + } + } + ] + }, + { + "base": "Setleft", + "details": { + "name": "Setleft" + }, + "params": [ + { + "typeid": "{DE5C18B0-4214-4A37-B590-8D45CC450A96}", + "details": { + "name": "Padding" + } + }, + { + "typeid": "{72039442-EB38-4D42-A1AD-CB68F7E0EEF6}", + "details": { + "name": "int" + } + } + ] + }, + { + "base": "Getright", + "details": { + "name": "Getright" + }, + "params": [ + { + "typeid": "{DE5C18B0-4214-4A37-B590-8D45CC450A96}", + "details": { + "name": "Padding" + } + } + ], + "results": [ + { + "typeid": "{72039442-EB38-4D42-A1AD-CB68F7E0EEF6}", + "details": { + "name": "int" + } + } + ] + }, + { + "base": "Setright", + "details": { + "name": "Setright" + }, + "params": [ + { + "typeid": "{DE5C18B0-4214-4A37-B590-8D45CC450A96}", + "details": { + "name": "Padding" + } + }, + { + "typeid": "{72039442-EB38-4D42-A1AD-CB68F7E0EEF6}", + "details": { + "name": "int" + } + } + ] + }, + { + "base": "Gettop", + "details": { + "name": "Gettop" + }, + "params": [ + { + "typeid": "{DE5C18B0-4214-4A37-B590-8D45CC450A96}", + "details": { + "name": "Padding" + } + } + ], + "results": [ + { + "typeid": "{72039442-EB38-4D42-A1AD-CB68F7E0EEF6}", + "details": { + "name": "int" + } + } + ] + }, + { + "base": "Settop", + "details": { + "name": "Settop" + }, + "params": [ + { + "typeid": "{DE5C18B0-4214-4A37-B590-8D45CC450A96}", + "details": { + "name": "Padding" + } + }, + { + "typeid": "{72039442-EB38-4D42-A1AD-CB68F7E0EEF6}", + "details": { + "name": "int" + } + } + ] + }, + { + "base": "Getbottom", + "details": { + "name": "Getbottom" + }, + "params": [ + { + "typeid": "{DE5C18B0-4214-4A37-B590-8D45CC450A96}", + "details": { + "name": "Padding" + } + } + ], + "results": [ + { + "typeid": "{72039442-EB38-4D42-A1AD-CB68F7E0EEF6}", + "details": { + "name": "int" + } + } + ] + }, + { + "base": "Setbottom", + "details": { + "name": "Setbottom" + }, + "params": [ + { + "typeid": "{DE5C18B0-4214-4A37-B590-8D45CC450A96}", + "details": { + "name": "Padding" + } + }, + { + "typeid": "{72039442-EB38-4D42-A1AD-CB68F7E0EEF6}", + "details": { + "name": "int" + } + } + ] + } + ] + } + ] +} \ No newline at end of file diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Classes/UiParticleEmitterComponent.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Classes/UiParticleEmitterComponent.names new file mode 100644 index 0000000000..8218d063fb --- /dev/null +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Classes/UiParticleEmitterComponent.names @@ -0,0 +1,12 @@ +{ + "entries": [ + { + "base": "UiParticleEmitterComponent", + "context": "BehaviorClass", + "variant": "", + "details": { + "name": "UiParticleEmitterComponent" + } + } + ] +} \ No newline at end of file diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Classes/UiScrollBarComponent.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Classes/UiScrollBarComponent.names new file mode 100644 index 0000000000..13a890a74e --- /dev/null +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Classes/UiScrollBarComponent.names @@ -0,0 +1,12 @@ +{ + "entries": [ + { + "base": "UiScrollBarComponent", + "context": "BehaviorClass", + "variant": "", + "details": { + "name": "UiScrollBarComponent" + } + } + ] +} \ No newline at end of file diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Classes/UiSliderComponent.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Classes/UiSliderComponent.names new file mode 100644 index 0000000000..52a5928940 --- /dev/null +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Classes/UiSliderComponent.names @@ -0,0 +1,12 @@ +{ + "entries": [ + { + "base": "UiSliderComponent", + "context": "BehaviorClass", + "variant": "", + "details": { + "name": "UiSliderComponent" + } + } + ] +} \ No newline at end of file diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Classes/UiTextComponent.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Classes/UiTextComponent.names new file mode 100644 index 0000000000..e611e3bc50 --- /dev/null +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Classes/UiTextComponent.names @@ -0,0 +1,12 @@ +{ + "entries": [ + { + "base": "UiTextComponent", + "context": "BehaviorClass", + "variant": "", + "details": { + "name": "UiTextComponent" + } + } + ] +} \ No newline at end of file diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Classes/UiTextInputComponent.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Classes/UiTextInputComponent.names new file mode 100644 index 0000000000..872ee6c4b0 --- /dev/null +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Classes/UiTextInputComponent.names @@ -0,0 +1,12 @@ +{ + "entries": [ + { + "base": "UiTextInputComponent", + "context": "BehaviorClass", + "variant": "", + "details": { + "name": "UiTextInputComponent" + } + } + ] +} \ No newline at end of file diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Classes/UiTooltipDisplayComponent.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Classes/UiTooltipDisplayComponent.names new file mode 100644 index 0000000000..436f9265b7 --- /dev/null +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Classes/UiTooltipDisplayComponent.names @@ -0,0 +1,12 @@ +{ + "entries": [ + { + "base": "UiTooltipDisplayComponent", + "context": "BehaviorClass", + "variant": "", + "details": { + "name": "UiTooltipDisplayComponent" + } + } + ] +} \ No newline at end of file diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Classes/UiTransform2dComponent.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Classes/UiTransform2dComponent.names new file mode 100644 index 0000000000..dd8b4126c6 --- /dev/null +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Classes/UiTransform2dComponent.names @@ -0,0 +1,12 @@ +{ + "entries": [ + { + "base": "UiTransform2dComponent", + "context": "BehaviorClass", + "variant": "", + "details": { + "name": "UiTransform2dComponent" + } + } + ] +} \ No newline at end of file diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Classes/UnitTesting.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Classes/UnitTesting.names new file mode 100644 index 0000000000..64ecdb414a --- /dev/null +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Classes/UnitTesting.names @@ -0,0 +1,484 @@ +{ + "entries": [ + { + "base": "Unit Testing", + "context": "BehaviorClass", + "variant": "", + "details": { + "name": "Unit Testing" + }, + "methods": [ + { + "base": "ExpectLessThanEqual", + "context": "Unit Testing", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Expect Less Than Equal" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Expect Less Than Equal is invoked" + }, + "details": { + "name": "Expect Less Than Equal" + }, + "params": [ + { + "typeid": "{6383F1D3-BB27-4E6B-A49A-6409B2059EAA}", + "details": { + "name": "Entity Id", + "tooltip": "Entity Unique Id" + } + }, + { + "typeid": "{110C4B14-11A8-4E9D-8638-5051013A56AC}", + "details": { + "name": "Candidate", + "tooltip": "left of <=" + } + }, + { + "typeid": "{110C4B14-11A8-4E9D-8638-5051013A56AC}", + "details": { + "name": "Reference", + "tooltip": "right of <=" + } + }, + { + "typeid": "{03AAAB3F-5C47-5A66-9EBC-D5FA4DB353C9}", + "details": { + "name": "Report", + "tooltip": "additional notes for the test report" + } + } + ] + }, + { + "base": "ExpectGreaterThanEqual", + "context": "Unit Testing", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Expect Greater Than Equal" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Expect Greater Than Equal is invoked" + }, + "details": { + "name": "Expect Greater Than Equal" + }, + "params": [ + { + "typeid": "{6383F1D3-BB27-4E6B-A49A-6409B2059EAA}", + "details": { + "name": "Entity Id", + "tooltip": "Entity Unique Id" + } + }, + { + "typeid": "{110C4B14-11A8-4E9D-8638-5051013A56AC}", + "details": { + "name": "Candidate", + "tooltip": "left of >=" + } + }, + { + "typeid": "{110C4B14-11A8-4E9D-8638-5051013A56AC}", + "details": { + "name": "Reference", + "tooltip": "right of >=" + } + }, + { + "typeid": "{03AAAB3F-5C47-5A66-9EBC-D5FA4DB353C9}", + "details": { + "name": "Report", + "tooltip": "additional notes for the test report" + } + } + ] + }, + { + "base": "MarkComplete", + "context": "Unit Testing", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Mark Complete" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Mark Complete is invoked" + }, + "details": { + "name": "Mark Complete" + }, + "params": [ + { + "typeid": "{6383F1D3-BB27-4E6B-A49A-6409B2059EAA}", + "details": { + "name": "Entity Id", + "tooltip": "Entity Unique Id" + } + }, + { + "typeid": "{03AAAB3F-5C47-5A66-9EBC-D5FA4DB353C9}", + "details": { + "name": "Report", + "tooltip": "additional notes for the test report" + } + } + ] + }, + { + "base": "ExpectTrue", + "context": "Unit Testing", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Expect True" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Expect True is invoked" + }, + "details": { + "name": "Expect True" + }, + "params": [ + { + "typeid": "{6383F1D3-BB27-4E6B-A49A-6409B2059EAA}", + "details": { + "name": "Entity Id", + "tooltip": "Entity Unique Id" + } + }, + { + "typeid": "{A0CA880C-AFE4-43CB-926C-59AC48496112}", + "details": { + "name": "Candidate", + "tooltip": "a value that must be true" + } + }, + { + "typeid": "{03AAAB3F-5C47-5A66-9EBC-D5FA4DB353C9}", + "details": { + "name": "Report", + "tooltip": "additional notes for the test report" + } + } + ] + }, + { + "base": "Checkpoint", + "context": "Unit Testing", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Checkpoint" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Checkpoint is invoked" + }, + "details": { + "name": "Checkpoint" + }, + "params": [ + { + "typeid": "{6383F1D3-BB27-4E6B-A49A-6409B2059EAA}", + "details": { + "name": "Entity Id", + "tooltip": "Entity Unique Id" + } + }, + { + "typeid": "{03AAAB3F-5C47-5A66-9EBC-D5FA4DB353C9}", + "details": { + "name": "Report", + "tooltip": "additional notes for the test report" + } + } + ] + }, + { + "base": "ExpectFalse", + "context": "Unit Testing", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Expect False" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Expect False is invoked" + }, + "details": { + "name": "Expect False" + }, + "params": [ + { + "typeid": "{6383F1D3-BB27-4E6B-A49A-6409B2059EAA}", + "details": { + "name": "Entity Id", + "tooltip": "Entity Unique Id" + } + }, + { + "typeid": "{A0CA880C-AFE4-43CB-926C-59AC48496112}", + "details": { + "name": "Candidate", + "tooltip": "a value that must be false" + } + }, + { + "typeid": "{03AAAB3F-5C47-5A66-9EBC-D5FA4DB353C9}", + "details": { + "name": "Report", + "tooltip": "additional notes for the test report" + } + } + ] + }, + { + "base": "ExpectEqual", + "context": "Unit Testing", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Expect Equal" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Expect Equal is invoked" + }, + "details": { + "name": "Expect Equal" + }, + "params": [ + { + "typeid": "{6383F1D3-BB27-4E6B-A49A-6409B2059EAA}", + "details": { + "name": "Entity Id", + "tooltip": "Entity Unique Id" + } + }, + { + "typeid": "{A54C2B36-D5B8-46A1-A529-4EBDBD2450E7}", + "details": { + "name": "Candidate", + "tooltip": "left of ==" + } + }, + { + "typeid": "{A54C2B36-D5B8-46A1-A529-4EBDBD2450E7}", + "details": { + "name": "Reference", + "tooltip": "right of ==" + } + }, + { + "typeid": "{03AAAB3F-5C47-5A66-9EBC-D5FA4DB353C9}", + "details": { + "name": "Report", + "tooltip": "additional notes for the test report" + } + } + ] + }, + { + "base": "ExpectLessThan", + "context": "Unit Testing", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Expect Less Than" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Expect Less Than is invoked" + }, + "details": { + "name": "Expect Less Than" + }, + "params": [ + { + "typeid": "{6383F1D3-BB27-4E6B-A49A-6409B2059EAA}", + "details": { + "name": "Entity Id", + "tooltip": "Entity Unique Id" + } + }, + { + "typeid": "{110C4B14-11A8-4E9D-8638-5051013A56AC}", + "details": { + "name": "Candidate", + "tooltip": "left of <" + } + }, + { + "typeid": "{110C4B14-11A8-4E9D-8638-5051013A56AC}", + "details": { + "name": "Reference", + "tooltip": "right of <" + } + }, + { + "typeid": "{03AAAB3F-5C47-5A66-9EBC-D5FA4DB353C9}", + "details": { + "name": "Report", + "tooltip": "additional notes for the test report" + } + } + ] + }, + { + "base": "AddSuccess", + "context": "Unit Testing", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Add Success" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Add Success is invoked" + }, + "details": { + "name": "Add Success" + }, + "params": [ + { + "typeid": "{6383F1D3-BB27-4E6B-A49A-6409B2059EAA}", + "details": { + "name": "Entity Id", + "tooltip": "Entity Unique Id" + } + }, + { + "typeid": "{03AAAB3F-5C47-5A66-9EBC-D5FA4DB353C9}", + "details": { + "name": "Report", + "tooltip": "additional notes for the test report" + } + } + ] + }, + { + "base": "ExpectNotEqual", + "context": "Unit Testing", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Expect Not Equal" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Expect Not Equal is invoked" + }, + "details": { + "name": "Expect Not Equal" + }, + "params": [ + { + "typeid": "{6383F1D3-BB27-4E6B-A49A-6409B2059EAA}", + "details": { + "name": "Entity Id", + "tooltip": "Entity Unique Id" + } + }, + { + "typeid": "{A54C2B36-D5B8-46A1-A529-4EBDBD2450E7}", + "details": { + "name": "Candidate", + "tooltip": "left of !=" + } + }, + { + "typeid": "{A54C2B36-D5B8-46A1-A529-4EBDBD2450E7}", + "details": { + "name": "Reference", + "tooltip": "right of !=" + } + }, + { + "typeid": "{03AAAB3F-5C47-5A66-9EBC-D5FA4DB353C9}", + "details": { + "name": "Report", + "tooltip": "additional notes for the test report" + } + } + ] + }, + { + "base": "ExpectGreaterThan", + "context": "Unit Testing", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Expect Greater Than" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Expect Greater Than is invoked" + }, + "details": { + "name": "Expect Greater Than" + }, + "params": [ + { + "typeid": "{6383F1D3-BB27-4E6B-A49A-6409B2059EAA}", + "details": { + "name": "Entity Id", + "tooltip": "Entity Unique Id" + } + }, + { + "typeid": "{110C4B14-11A8-4E9D-8638-5051013A56AC}", + "details": { + "name": "Candidate", + "tooltip": "left of >" + } + }, + { + "typeid": "{110C4B14-11A8-4E9D-8638-5051013A56AC}", + "details": { + "name": "Reference", + "tooltip": "right of >" + } + }, + { + "typeid": "{03AAAB3F-5C47-5A66-9EBC-D5FA4DB353C9}", + "details": { + "name": "Report", + "tooltip": "additional notes for the test report" + } + } + ] + }, + { + "base": "AddFailure", + "context": "Unit Testing", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Add Failure" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Add Failure is invoked" + }, + "details": { + "name": "Add Failure" + }, + "params": [ + { + "typeid": "{6383F1D3-BB27-4E6B-A49A-6409B2059EAA}", + "details": { + "name": "Entity Id", + "tooltip": "Entity Unique Id" + } + }, + { + "typeid": "{03AAAB3F-5C47-5A66-9EBC-D5FA4DB353C9}", + "details": { + "name": "Report", + "tooltip": "additional notes for the test report" + } + } + ] + } + ] + } + ] +} \ No newline at end of file diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Classes/Uuid.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Classes/Uuid.names new file mode 100644 index 0000000000..504c64f4b3 --- /dev/null +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Classes/Uuid.names @@ -0,0 +1,319 @@ +{ + "entries": [ + { + "base": "Uuid", + "context": "BehaviorClass", + "variant": "", + "details": { + "name": "Uuid", + "category": "Utilities" + }, + "methods": [ + { + "base": "CreateRandom", + "context": "Uuid", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Create Random" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Create Random is invoked" + }, + "details": { + "name": "Create Random" + }, + "results": [ + { + "typeid": "{E152C105-A133-4D03-BBF8-3D4B2FBA3E2A}", + "details": { + "name": "Uuid" + } + } + ] + }, + { + "base": "CreateNull", + "context": "Uuid", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Create Null" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Create Null is invoked" + }, + "details": { + "name": "Create Null" + }, + "results": [ + { + "typeid": "{E152C105-A133-4D03-BBF8-3D4B2FBA3E2A}", + "details": { + "name": "Uuid" + } + } + ] + }, + { + "base": "Create", + "context": "Uuid", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Create" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Create is invoked" + }, + "details": { + "name": "Create" + }, + "results": [ + { + "typeid": "{E152C105-A133-4D03-BBF8-3D4B2FBA3E2A}", + "details": { + "name": "Uuid" + } + } + ] + }, + { + "base": "CreateName", + "context": "Uuid", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Create Name" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Create Name is invoked" + }, + "details": { + "name": "Create Name" + }, + "params": [ + { + "typeid": "{3AB0037F-AF8D-48CE-BCA0-A170D18B2C03}", + "details": { + "name": "Name" + } + } + ], + "results": [ + { + "typeid": "{E152C105-A133-4D03-BBF8-3D4B2FBA3E2A}", + "details": { + "name": "Uuid" + } + } + ] + }, + { + "base": "Clone", + "context": "Uuid", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Clone" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Clone is invoked" + }, + "details": { + "name": "Clone" + }, + "params": [ + { + "typeid": "{E152C105-A133-4D03-BBF8-3D4B2FBA3E2A}", + "details": { + "name": "Uuid" + } + } + ], + "results": [ + { + "typeid": "{E152C105-A133-4D03-BBF8-3D4B2FBA3E2A}", + "details": { + "name": "Uuid" + } + } + ] + }, + { + "base": "LessThan", + "context": "Uuid", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Less Than" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Less Than is invoked" + }, + "details": { + "name": "Less Than" + }, + "params": [ + { + "typeid": "{E152C105-A133-4D03-BBF8-3D4B2FBA3E2A}", + "details": { + "name": "Uuid" + } + }, + { + "typeid": "{E152C105-A133-4D03-BBF8-3D4B2FBA3E2A}", + "details": { + "name": "Uuid" + } + } + ], + "results": [ + { + "typeid": "{A0CA880C-AFE4-43CB-926C-59AC48496112}", + "details": { + "name": "Less Than" + } + } + ] + }, + { + "base": "IsNull", + "context": "Uuid", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Is Null" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Is Null is invoked" + }, + "details": { + "name": "Is Null" + }, + "params": [ + { + "typeid": "{E152C105-A133-4D03-BBF8-3D4B2FBA3E2A}", + "details": { + "name": "Uuid" + } + } + ], + "results": [ + { + "typeid": "{A0CA880C-AFE4-43CB-926C-59AC48496112}", + "details": { + "name": "Is Null" + } + } + ] + }, + { + "base": "CreateString", + "context": "Uuid", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Create String" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Create String is invoked" + }, + "details": { + "name": "Create String" + }, + "params": [ + { + "typeid": "{3AB0037F-AF8D-48CE-BCA0-A170D18B2C03}", + "details": { + "name": "String" + } + }, + { + "typeid": "{D6597933-47CD-4FC8-B911-63F3E2B0993A}", + "details": { + "name": "Size" + } + } + ], + "results": [ + { + "typeid": "{E152C105-A133-4D03-BBF8-3D4B2FBA3E2A}", + "details": { + "name": "Uuid" + } + } + ] + }, + { + "base": "ToString", + "context": "Uuid", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke To String" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after To String is invoked" + }, + "details": { + "name": "To String" + }, + "params": [ + { + "typeid": "{E152C105-A133-4D03-BBF8-3D4B2FBA3E2A}", + "details": { + "name": "Uuid" + } + } + ], + "results": [ + { + "typeid": "{03AAAB3F-5C47-5A66-9EBC-D5FA4DB353C9}", + "details": { + "name": "String" + } + } + ] + }, + { + "base": "Equal", + "context": "Uuid", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Equal" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Equal is invoked" + }, + "details": { + "name": "Equal" + }, + "params": [ + { + "typeid": "{E152C105-A133-4D03-BBF8-3D4B2FBA3E2A}", + "details": { + "name": "Uuid" + } + }, + { + "typeid": "{E152C105-A133-4D03-BBF8-3D4B2FBA3E2A}", + "details": { + "name": "Uuid" + } + } + ], + "results": [ + { + "typeid": "{A0CA880C-AFE4-43CB-926C-59AC48496112}", + "details": { + "name": "Is Equal" + } + } + ] + } + ] + } + ] +} \ No newline at end of file diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Classes/VertexColor.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Classes/VertexColor.names new file mode 100644 index 0000000000..a6efefc37e --- /dev/null +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Classes/VertexColor.names @@ -0,0 +1,103 @@ +{ + "entries": [ + { + "base": "VertexColor", + "context": "BehaviorClass", + "variant": "", + "details": { + "name": "Vertex Color", + "category": "Rendering" + }, + "methods": [ + { + "base": "Getred", + "details": { + "name": "Get Red" + }, + "params": [ + { + "typeid": "{937E3BF8-5204-4D40-A8DA-C8F083C89F9F}", + "details": { + "name": "Color" + } + } + ], + "results": [ + { + "typeid": "{EA2C3E90-AFBE-44D4-A90D-FAAF79BAF93D}", + "details": { + "name": "Red" + } + } + ] + }, + { + "base": "Getgreen", + "details": { + "name": "Get Green" + }, + "params": [ + { + "typeid": "{937E3BF8-5204-4D40-A8DA-C8F083C89F9F}", + "details": { + "name": "Color" + } + } + ], + "results": [ + { + "typeid": "{EA2C3E90-AFBE-44D4-A90D-FAAF79BAF93D}", + "details": { + "name": "Green" + } + } + ] + }, + { + "base": "Getblue", + "details": { + "name": "Get Blue" + }, + "params": [ + { + "typeid": "{937E3BF8-5204-4D40-A8DA-C8F083C89F9F}", + "details": { + "name": "Color" + } + } + ], + "results": [ + { + "typeid": "{EA2C3E90-AFBE-44D4-A90D-FAAF79BAF93D}", + "details": { + "name": "Blue" + } + } + ] + }, + { + "base": "Getalpha", + "details": { + "name": "Get Alpha" + }, + "params": [ + { + "typeid": "{937E3BF8-5204-4D40-A8DA-C8F083C89F9F}", + "details": { + "name": "Color" + } + } + ], + "results": [ + { + "typeid": "{EA2C3E90-AFBE-44D4-A90D-FAAF79BAF93D}", + "details": { + "name": "Alpha" + } + } + ] + } + ] + } + ] +} \ No newline at end of file diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Classes/ViewPaneOptions.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Classes/ViewPaneOptions.names new file mode 100644 index 0000000000..6d88ffc05b --- /dev/null +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Classes/ViewPaneOptions.names @@ -0,0 +1,12 @@ +{ + "entries": [ + { + "base": "ViewPaneOptions", + "context": "BehaviorClass", + "variant": "", + "details": { + "name": "ViewPaneOptions" + } + } + ] +} \ No newline at end of file diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/EBus/Handlers/AWSCognitoAuthorizationNotificationBus.names b/Gems/ScriptCanvas/Assets/TranslationAssets/EBus/Handlers/AWSCognitoAuthorizationNotificationBus.names new file mode 100644 index 0000000000..94be770939 --- /dev/null +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/EBus/Handlers/AWSCognitoAuthorizationNotificationBus.names @@ -0,0 +1,43 @@ +{ + "entries": [ + { + "base": "AWSCognitoAuthorizationNotificationBus", + "context": "EBusHandler", + "variant": "", + "details": { + "name": "AWS Cognito Authorization", + "category": "AWS Core" + }, + "methods": [ + { + "base": "OnRequestAWSCredentialsSuccess", + "details": { + "name": "On Request AWS Credentials Success" + }, + "params": [ + { + "typeid": "{02FB32C4-B94E-4084-9049-3DF32F87BD76}", + "details": { + "name": "AWS Client Auth Credentials" + } + } + ] + }, + { + "base": "OnRequestAWSCredentialsFail", + "details": { + "name": "On Request AWS Credentials Fail" + }, + "params": [ + { + "typeid": "{03AAAB3F-5C47-5A66-9EBC-D5FA4DB353C9}", + "details": { + "name": "Error" + } + } + ] + } + ] + } + ] +} \ No newline at end of file diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/EBus/Handlers/AWSCognitoUserManagementNotificationBus.names b/Gems/ScriptCanvas/Assets/TranslationAssets/EBus/Handlers/AWSCognitoUserManagementNotificationBus.names new file mode 100644 index 0000000000..0286fffc7d --- /dev/null +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/EBus/Handlers/AWSCognitoUserManagementNotificationBus.names @@ -0,0 +1,151 @@ +{ + "entries": [ + { + "base": "AWSCognitoUserManagementNotificationBus", + "context": "EBusHandler", + "variant": "", + "details": { + "name": "AWS Cognito User Management", + "category": "AWS Client Auth" + }, + "methods": [ + { + "base": "OnEmailSignUpSuccess", + "details": { + "name": "On Email Sign Up Success" + }, + "params": [ + { + "typeid": "{03AAAB3F-5C47-5A66-9EBC-D5FA4DB353C9}", + "details": { + "name": "Unique Id" + } + } + ] + }, + { + "base": "OnEmailSignUpFail", + "details": { + "name": "On Email Sign Up Fail" + }, + "params": [ + { + "typeid": "{03AAAB3F-5C47-5A66-9EBC-D5FA4DB353C9}", + "details": { + "name": "Error" + } + } + ] + }, + { + "base": "OnPhoneSignUpSuccess", + "details": { + "name": "On Phone Sign Up Success" + }, + "params": [ + { + "typeid": "{03AAAB3F-5C47-5A66-9EBC-D5FA4DB353C9}", + "details": { + "name": "Unique Id" + } + } + ] + }, + { + "base": "OnPhoneSignUpFail", + "details": { + "name": "On Phone Sign Up Fail" + }, + "params": [ + { + "typeid": "{03AAAB3F-5C47-5A66-9EBC-D5FA4DB353C9}", + "details": { + "name": "Error" + } + } + ] + }, + { + "base": "OnConfirmSignUpSuccess", + "details": { + "name": "On Confirm Sign Up Success" + } + }, + { + "base": "OnConfirmSignUpFail", + "details": { + "name": "On Confirm Sign Up Fail" + }, + "params": [ + { + "typeid": "{03AAAB3F-5C47-5A66-9EBC-D5FA4DB353C9}", + "details": { + "name": "Error" + } + } + ] + }, + { + "base": "OnForgotPasswordSuccess", + "details": { + "name": "On Forgot Password Success" + } + }, + { + "base": "OnForgotPasswordFail", + "details": { + "name": "On Forgot Password Fail" + }, + "params": [ + { + "typeid": "{03AAAB3F-5C47-5A66-9EBC-D5FA4DB353C9}", + "details": { + "name": "Error" + } + } + ] + }, + { + "base": "OnConfirmForgotPasswordSuccess", + "details": { + "name": "On Confirm Forgot Password Success" + } + }, + { + "base": "OnConfirmForgotPasswordFail", + "details": { + "name": "On Confirm Forgot Password Fail" + }, + "params": [ + { + "typeid": "{03AAAB3F-5C47-5A66-9EBC-D5FA4DB353C9}", + "details": { + "name": "Error" + } + } + ] + }, + { + "base": "OnEnableMFASuccess", + "details": { + "name": "On Enable MFA Success" + } + }, + { + "base": "OnEnableMFAFail", + "details": { + "name": "On Enable MFA Fail" + }, + "params": [ + { + "typeid": "{03AAAB3F-5C47-5A66-9EBC-D5FA4DB353C9}", + "details": { + "name": "Error" + } + } + ] + } + ] + } + ] +} \ No newline at end of file diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/EBus/Handlers/AWSDynamoDBBehaviorNotificationBus.names b/Gems/ScriptCanvas/Assets/TranslationAssets/EBus/Handlers/AWSDynamoDBBehaviorNotificationBus.names new file mode 100644 index 0000000000..77e324d882 --- /dev/null +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/EBus/Handlers/AWSDynamoDBBehaviorNotificationBus.names @@ -0,0 +1,43 @@ +{ + "entries": [ + { + "base": "AWSDynamoDBBehaviorNotificationBus", + "context": "EBusHandler", + "variant": "", + "details": { + "name": "AWS Dynamo DB", + "category": "AWS Core" + }, + "methods": [ + { + "base": "OnGetItemSuccess", + "details": { + "name": "On Get Item Success" + }, + "params": [ + { + "typeid": "{F8A7460C-2CC2-5755-AFDA-49B1109A751E}", + "details": { + "name": "Result" + } + } + ] + }, + { + "base": "OnGetItemError", + "details": { + "name": "On Get Item Error" + }, + "params": [ + { + "typeid": "{03AAAB3F-5C47-5A66-9EBC-D5FA4DB353C9}", + "details": { + "name": "Error" + } + } + ] + } + ] + } + ] +} \ No newline at end of file diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/EBus/Handlers/AWSLambdaBehaviorNotificationBus.names b/Gems/ScriptCanvas/Assets/TranslationAssets/EBus/Handlers/AWSLambdaBehaviorNotificationBus.names new file mode 100644 index 0000000000..b02432eb5f --- /dev/null +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/EBus/Handlers/AWSLambdaBehaviorNotificationBus.names @@ -0,0 +1,43 @@ +{ + "entries": [ + { + "base": "AWSLambdaBehaviorNotificationBus", + "context": "EBusHandler", + "variant": "", + "details": { + "name": "AWS Lambda", + "category": "AWS Core" + }, + "methods": [ + { + "base": "OnInvokeSuccess", + "details": { + "name": "On Invoke Success" + }, + "params": [ + { + "typeid": "{03AAAB3F-5C47-5A66-9EBC-D5FA4DB353C9}", + "details": { + "name": "Result" + } + } + ] + }, + { + "base": "OnInvokeError", + "details": { + "name": "On Invoke Error" + }, + "params": [ + { + "typeid": "{03AAAB3F-5C47-5A66-9EBC-D5FA4DB353C9}", + "details": { + "name": "Error" + } + } + ] + } + ] + } + ] +} \ No newline at end of file diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/EBus/Handlers/AWSMetricsNotificationBus.names b/Gems/ScriptCanvas/Assets/TranslationAssets/EBus/Handlers/AWSMetricsNotificationBus.names new file mode 100644 index 0000000000..22a39aece5 --- /dev/null +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/EBus/Handlers/AWSMetricsNotificationBus.names @@ -0,0 +1,49 @@ +{ + "entries": [ + { + "base": "AWSMetricsNotificationBus", + "context": "EBusHandler", + "variant": "", + "details": { + "name": "AWS Metrics", + "category": "AWS Core" + }, + "methods": [ + { + "base": "OnSendMetricsSuccess", + "details": { + "name": "On Send Metrics Success" + }, + "params": [ + { + "typeid": "{72039442-EB38-4D42-A1AD-CB68F7E0EEF6}", + "details": { + "name": "Request Id" + } + } + ] + }, + { + "base": "OnSendMetricsFailure", + "details": { + "name": "On Send Metrics Failure" + }, + "params": [ + { + "typeid": "{72039442-EB38-4D42-A1AD-CB68F7E0EEF6}", + "details": { + "name": "Request Id" + } + }, + { + "typeid": "{03AAAB3F-5C47-5A66-9EBC-D5FA4DB353C9}", + "details": { + "name": "Error" + } + } + ] + } + ] + } + ] +} \ No newline at end of file diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/EBus/Handlers/AWSS3BehaviorNotificationBus.names b/Gems/ScriptCanvas/Assets/TranslationAssets/EBus/Handlers/AWSS3BehaviorNotificationBus.names new file mode 100644 index 0000000000..38b0d6467d --- /dev/null +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/EBus/Handlers/AWSS3BehaviorNotificationBus.names @@ -0,0 +1,71 @@ +{ + "entries": [ + { + "base": "AWSS3BehaviorNotificationBus", + "context": "EBusHandler", + "variant": "", + "details": { + "name": "AWS S3", + "category": "AWS Core" + }, + "methods": [ + { + "base": "OnHeadObjectSuccess", + "details": { + "name": "On Head Object Success" + }, + "params": [ + { + "typeid": "{03AAAB3F-5C47-5A66-9EBC-D5FA4DB353C9}", + "details": { + "name": "Result" + } + } + ] + }, + { + "base": "OnHeadObjectError", + "details": { + "name": "On Head Object Error" + }, + "params": [ + { + "typeid": "{03AAAB3F-5C47-5A66-9EBC-D5FA4DB353C9}", + "details": { + "name": "Error" + } + } + ] + }, + { + "base": "OnGetObjectSuccess", + "details": { + "name": "On Get Object Success" + }, + "params": [ + { + "typeid": "{03AAAB3F-5C47-5A66-9EBC-D5FA4DB353C9}", + "details": { + "name": "Result" + } + } + ] + }, + { + "base": "OnGetObjectError", + "details": { + "name": "On Get Object Error" + }, + "params": [ + { + "typeid": "{03AAAB3F-5C47-5A66-9EBC-D5FA4DB353C9}", + "details": { + "name": "Error" + } + } + ] + } + ] + } + ] +} \ No newline at end of file diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/EBus/Handlers/ActorComponentNotificationBus.names b/Gems/ScriptCanvas/Assets/TranslationAssets/EBus/Handlers/ActorComponentNotificationBus.names new file mode 100644 index 0000000000..4ea752408b --- /dev/null +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/EBus/Handlers/ActorComponentNotificationBus.names @@ -0,0 +1,43 @@ +{ + "entries": [ + { + "base": "ActorComponentNotificationBus", + "context": "EBusHandler", + "variant": "", + "details": { + "name": "Actor", + "category": "Animation" + }, + "methods": [ + { + "base": "OnActorInstanceCreated", + "details": { + "name": "On Actor Instance Created" + }, + "params": [ + { + "typeid": "{280A0170-EB6A-4E90-B2F1-E18D8EAEFB36}", + "details": { + "name": "Actor Instance" + } + } + ] + }, + { + "base": "OnActorInstanceDestroyed", + "details": { + "name": "On Actor Instance Destroyed" + }, + "params": [ + { + "typeid": "{280A0170-EB6A-4E90-B2F1-E18D8EAEFB36}", + "details": { + "name": "Actor Instance" + } + } + ] + } + ] + } + ] +} \ No newline at end of file diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/EBus/Handlers/ActorNotificationBus.names b/Gems/ScriptCanvas/Assets/TranslationAssets/EBus/Handlers/ActorNotificationBus.names new file mode 100644 index 0000000000..103b584015 --- /dev/null +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/EBus/Handlers/ActorNotificationBus.names @@ -0,0 +1,139 @@ +{ + "entries": [ + { + "base": "ActorNotificationBus", + "context": "EBusHandler", + "variant": "", + "details": { + "name": "Actor", + "category": "Animation" + }, + "methods": [ + { + "base": "OnMotionEvent", + "details": { + "name": "On Motion Event" + }, + "params": [ + { + "typeid": "{0C899DAC-6B19-4BDD-AD8C-8A11EF2A6729}", + "details": { + "name": "Motion Event" + } + } + ] + }, + { + "base": "OnMotionLoop", + "details": { + "name": "On Motion Loop" + }, + "params": [ + { + "typeid": "{3AB0037F-AF8D-48CE-BCA0-A170D18B2C03}", + "details": { + "name": "char" + } + } + ] + }, + { + "base": "OnStateEntering", + "details": { + "name": "On State Entering" + }, + "params": [ + { + "typeid": "{3AB0037F-AF8D-48CE-BCA0-A170D18B2C03}", + "details": { + "name": "char" + } + } + ] + }, + { + "base": "OnStateEntered", + "details": { + "name": "On State Entered" + }, + "params": [ + { + "typeid": "{3AB0037F-AF8D-48CE-BCA0-A170D18B2C03}", + "details": { + "name": "char" + } + } + ] + }, + { + "base": "OnStateExiting", + "details": { + "name": "On State Exiting" + }, + "params": [ + { + "typeid": "{3AB0037F-AF8D-48CE-BCA0-A170D18B2C03}", + "details": { + "name": "char" + } + } + ] + }, + { + "base": "OnStateExited", + "details": { + "name": "On State Exited" + }, + "params": [ + { + "typeid": "{3AB0037F-AF8D-48CE-BCA0-A170D18B2C03}", + "details": { + "name": "char" + } + } + ] + }, + { + "base": "OnStateTransitionStart", + "details": { + "name": "On State Transition Start" + }, + "params": [ + { + "typeid": "{3AB0037F-AF8D-48CE-BCA0-A170D18B2C03}", + "details": { + "name": "char" + } + }, + { + "typeid": "{3AB0037F-AF8D-48CE-BCA0-A170D18B2C03}", + "details": { + "name": "char" + } + } + ] + }, + { + "base": "OnStateTransitionEnd", + "details": { + "name": "On State Transition End" + }, + "params": [ + { + "typeid": "{3AB0037F-AF8D-48CE-BCA0-A170D18B2C03}", + "details": { + "name": "char" + } + }, + { + "typeid": "{3AB0037F-AF8D-48CE-BCA0-A170D18B2C03}", + "details": { + "name": "char" + } + } + ] + } + ] + } + ] +} \ No newline at end of file diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/EBus/Handlers/AnimGraphComponentNotificationBus.names b/Gems/ScriptCanvas/Assets/TranslationAssets/EBus/Handlers/AnimGraphComponentNotificationBus.names new file mode 100644 index 0000000000..f34fe7445a --- /dev/null +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/EBus/Handlers/AnimGraphComponentNotificationBus.names @@ -0,0 +1,235 @@ +{ + "entries": [ + { + "base": "AnimGraphComponentNotificationBus", + "context": "EBusHandler", + "variant": "", + "details": { + "name": "Anim Graph", + "category": "Animation" + }, + "methods": [ + { + "base": "OnAnimGraphInstanceCreated", + "details": { + "name": "On Anim Graph Instance Created" + }, + "params": [ + { + "typeid": "{2CC86AA2-AFC0-434B-A317-B102FD02E76D}", + "details": { + "name": "Anim Graph Instance" + } + } + ] + }, + { + "base": "OnAnimGraphInstanceDestroyed", + "details": { + "name": "On Anim Graph Instance Destroyed" + }, + "params": [ + { + "typeid": "{2CC86AA2-AFC0-434B-A317-B102FD02E76D}", + "details": { + "name": "Anim Graph Instance" + } + } + ] + }, + { + "base": "OnAnimGraphFloatParameterChanged", + "details": { + "name": "On Anim Graph Float Parameter Changed" + }, + "params": [ + { + "typeid": "{2CC86AA2-AFC0-434B-A317-B102FD02E76D}", + "details": { + "name": "Anim Graph Instance" + } + }, + { + "typeid": "{D6597933-47CD-4FC8-B911-63F3E2B0993A}", + "details": { + "name": "Parameter Index" + } + }, + { + "typeid": "{EA2C3E90-AFBE-44D4-A90D-FAAF79BAF93D}", + "details": { + "name": "Previous Value" + } + }, + { + "typeid": "{EA2C3E90-AFBE-44D4-A90D-FAAF79BAF93D}", + "details": { + "name": "Current Value" + } + } + ] + }, + { + "base": "OnAnimGraphBoolParameterChanged", + "details": { + "name": "On Anim Graph Bool Parameter Changed" + }, + "params": [ + { + "typeid": "{2CC86AA2-AFC0-434B-A317-B102FD02E76D}", + "details": { + "name": "Anim Graph Instance" + } + }, + { + "typeid": "{D6597933-47CD-4FC8-B911-63F3E2B0993A}", + "details": { + "name": "Parameter Index" + } + }, + { + "typeid": "{A0CA880C-AFE4-43CB-926C-59AC48496112}", + "details": { + "name": "Previous Value" + } + }, + { + "typeid": "{A0CA880C-AFE4-43CB-926C-59AC48496112}", + "details": { + "name": "Current Value" + } + } + ] + }, + { + "base": "OnAnimGraphStringParameterChanged", + "details": { + "name": "On Anim Graph String Parameter Changed" + }, + "params": [ + { + "typeid": "{2CC86AA2-AFC0-434B-A317-B102FD02E76D}", + "details": { + "name": "Anim Graph Instance" + } + }, + { + "typeid": "{D6597933-47CD-4FC8-B911-63F3E2B0993A}", + "details": { + "name": "Parameter Index" + } + }, + { + "typeid": "{3AB0037F-AF8D-48CE-BCA0-A170D18B2C03}", + "details": { + "name": "Previous Value" + } + }, + { + "typeid": "{3AB0037F-AF8D-48CE-BCA0-A170D18B2C03}", + "details": { + "name": "Current Value" + } + } + ] + }, + { + "base": "OnAnimGraphVector2ParameterChanged", + "details": { + "name": "On Anim Graph Vector2 Parameter Changed" + }, + "params": [ + { + "typeid": "{2CC86AA2-AFC0-434B-A317-B102FD02E76D}", + "details": { + "name": "Anim Graph Instance" + } + }, + { + "typeid": "{D6597933-47CD-4FC8-B911-63F3E2B0993A}", + "details": { + "name": "Parameter Index" + } + }, + { + "typeid": "{3D80F623-C85C-4741-90D0-E4E66164E6BF}", + "details": { + "name": "Previous Value" + } + }, + { + "typeid": "{3D80F623-C85C-4741-90D0-E4E66164E6BF}", + "details": { + "name": "Current Value" + } + } + ] + }, + { + "base": "OnAnimGraphVector3ParameterChanged", + "details": { + "name": "On Anim Graph Vector3 Parameter Changed" + }, + "params": [ + { + "typeid": "{2CC86AA2-AFC0-434B-A317-B102FD02E76D}", + "details": { + "name": "Anim Graph Instance" + } + }, + { + "typeid": "{D6597933-47CD-4FC8-B911-63F3E2B0993A}", + "details": { + "name": "Parameter Index" + } + }, + { + "typeid": "{8379EB7D-01FA-4538-B64B-A6543B4BE73D}", + "details": { + "name": "Previous Value" + } + }, + { + "typeid": "{8379EB7D-01FA-4538-B64B-A6543B4BE73D}", + "details": { + "name": "Current Value" + } + } + ] + }, + { + "base": "OnAnimGraphRotationParameterChanged", + "details": { + "name": "On Anim Graph Rotation Parameter Changed" + }, + "params": [ + { + "typeid": "{2CC86AA2-AFC0-434B-A317-B102FD02E76D}", + "details": { + "name": "Anim Graph Instance" + } + }, + { + "typeid": "{D6597933-47CD-4FC8-B911-63F3E2B0993A}", + "details": { + "name": "Parameter Index" + } + }, + { + "typeid": "{73103120-3DD3-4873-BAB3-9713FA2804FB}", + "details": { + "name": "Previous Value" + } + }, + { + "typeid": "{73103120-3DD3-4873-BAB3-9713FA2804FB}", + "details": { + "name": "Current Value" + } + } + ] + } + ] + } + ] +} \ No newline at end of file diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/EBus/Handlers/AttachmentComponentNotificationBus.names b/Gems/ScriptCanvas/Assets/TranslationAssets/EBus/Handlers/AttachmentComponentNotificationBus.names new file mode 100644 index 0000000000..76c3024999 --- /dev/null +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/EBus/Handlers/AttachmentComponentNotificationBus.names @@ -0,0 +1,45 @@ +{ + "entries": [ + { + "base": "AttachmentComponentNotificationBus", + "context": "EBusHandler", + "variant": "", + "details": { + "name": "Attachment", + "category": "Animation" + }, + "methods": [ + { + "base": "OnAttached", + "details": { + "name": "On Attached" + }, + "params": [ + { + "typeid": "{6383F1D3-BB27-4E6B-A49A-6409B2059EAA}", + "details": { + "name": "Entity Id", + "tooltip": "Entity Unique Id" + } + } + ] + }, + { + "base": "OnDetached", + "details": { + "name": "On Detached" + }, + "params": [ + { + "typeid": "{6383F1D3-BB27-4E6B-A49A-6409B2059EAA}", + "details": { + "name": "Entity Id", + "tooltip": "Entity Unique Id" + } + } + ] + } + ] + } + ] +} \ No newline at end of file diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/EBus/Handlers/Audio System Component Notifications.names b/Gems/ScriptCanvas/Assets/TranslationAssets/EBus/Handlers/Audio System Component Notifications.names new file mode 100644 index 0000000000..7909af5ebd --- /dev/null +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/EBus/Handlers/Audio System Component Notifications.names @@ -0,0 +1,27 @@ +{ + "entries": [ + { + "base": "Audio System Component Notifications", + "context": "EBusHandler", + "variant": "", + "details": { + "name": "Audio System", + "category": "Audio" + }, + "methods": [ + { + "base": "OnGamePaused", + "details": { + "name": "On Game Paused" + } + }, + { + "base": "OnGameUnpaused", + "details": { + "name": "On Game Unpaused" + } + } + ] + } + ] +} \ No newline at end of file diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/EBus/Handlers/AudioTriggerComponentNotificationBus.names b/Gems/ScriptCanvas/Assets/TranslationAssets/EBus/Handlers/AudioTriggerComponentNotificationBus.names new file mode 100644 index 0000000000..45baf45199 --- /dev/null +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/EBus/Handlers/AudioTriggerComponentNotificationBus.names @@ -0,0 +1,31 @@ +{ + "entries": [ + { + "base": "AudioTriggerComponentNotificationBus", + "context": "EBusHandler", + "variant": "", + "details": { + "name": "Audio Trigger", + "category": "Audio" + }, + "methods": [ + { + "base": "OnTriggerFinished", + "details": { + "name": "On Trigger Finished", + "tooltip": "Executes when an audio trigger has finished playing (the sound has ended)." + }, + "params": [ + { + "typeid": "{D6597933-47CD-4FC8-B911-63F3E2B0993A}", + "details": { + "name": "Trigger ID", + "tooltip": "The ID of the trigger that was successfully executed" + } + } + ] + } + ] + } + ] +} \ No newline at end of file diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/EBus/Handlers/AuthenticationProviderNotificationBus.names b/Gems/ScriptCanvas/Assets/TranslationAssets/EBus/Handlers/AuthenticationProviderNotificationBus.names new file mode 100644 index 0000000000..c567504c83 --- /dev/null +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/EBus/Handlers/AuthenticationProviderNotificationBus.names @@ -0,0 +1,187 @@ +{ + "entries": [ + { + "base": "AuthenticationProviderNotificationBus", + "context": "EBusHandler", + "variant": "", + "details": { + "name": "AWS Authentication Provider", + "category": "AWS Client Auth" + }, + "methods": [ + { + "base": "OnPasswordGrantSingleFactorSignInSuccess", + "details": { + "name": "On Password Grant Single Factor Sign In Success" + }, + "params": [ + { + "typeid": "{F965D1B2-9DE3-4900-B44B-E58D9F083ACB}", + "details": { + "name": "Authentication Tokens" + } + } + ] + }, + { + "base": "OnPasswordGrantSingleFactorSignInFail", + "details": { + "name": "On Password Grant Single Factor Sign In Fail" + }, + "params": [ + { + "typeid": "{03AAAB3F-5C47-5A66-9EBC-D5FA4DB353C9}", + "details": { + "name": "Error" + } + } + ] + }, + { + "base": "OnPasswordGrantMultiFactorSignInSuccess", + "details": { + "name": "On Password Grant Multi Factor Sign In Success" + } + }, + { + "base": "OnPasswordGrantMultiFactorSignInFail", + "details": { + "name": "On Password Grant Multi Factor Sign In Fail" + }, + "params": [ + { + "typeid": "{03AAAB3F-5C47-5A66-9EBC-D5FA4DB353C9}", + "details": { + "name": "Error" + } + } + ] + }, + { + "base": "OnPasswordGrantMultiFactorConfirmSignInSuccess", + "details": { + "name": "On Password Grant Multi Factor Confirm Sign In Success" + }, + "params": [ + { + "typeid": "{F965D1B2-9DE3-4900-B44B-E58D9F083ACB}", + "details": { + "name": "AuthenticationTokens" + } + } + ] + }, + { + "base": "OnPasswordGrantMultiFactorConfirmSignInFail", + "details": { + "name": "On Password Grant Multi Factor Confirm Sign In Fail" + }, + "params": [ + { + "typeid": "{03AAAB3F-5C47-5A66-9EBC-D5FA4DB353C9}", + "details": { + "name": "Error" + } + } + ] + }, + { + "base": "OnDeviceCodeGrantSignInSuccess", + "details": { + "name": "On Device Code Grant Sign In Success" + }, + "params": [ + { + "typeid": "{03AAAB3F-5C47-5A66-9EBC-D5FA4DB353C9}", + "details": { + "name": "User Code" + } + }, + { + "typeid": "{03AAAB3F-5C47-5A66-9EBC-D5FA4DB353C9}", + "details": { + "name": "Verification URL" + } + }, + { + "typeid": "{72039442-EB38-4D42-A1AD-CB68F7E0EEF6}", + "details": { + "name": "Code Expiration (Seconds)" + } + } + ] + }, + { + "base": "OnDeviceCodeGrantSignInFail", + "details": { + "name": "On Device Code Grant Sign In Fail" + }, + "params": [ + { + "typeid": "{03AAAB3F-5C47-5A66-9EBC-D5FA4DB353C9}", + "details": { + "name": "Error" + } + } + ] + }, + { + "base": "OnDeviceCodeGrantConfirmSignInSuccess", + "details": { + "name": "On Device Code Grant Confirm Sign In Success" + }, + "params": [ + { + "typeid": "{F965D1B2-9DE3-4900-B44B-E58D9F083ACB}", + "details": { + "name": "Authentication Tokens" + } + } + ] + }, + { + "base": "OnDeviceCodeGrantConfirmSignInFail", + "details": { + "name": "On Device Code Grant Confirm Sign In Fail" + }, + "params": [ + { + "typeid": "{03AAAB3F-5C47-5A66-9EBC-D5FA4DB353C9}", + "details": { + "name": "Error" + } + } + ] + }, + { + "base": "OnRefreshTokensSuccess", + "details": { + "name": "On Refresh Tokens Success" + }, + "params": [ + { + "typeid": "{F965D1B2-9DE3-4900-B44B-E58D9F083ACB}", + "details": { + "name": "Authentication Tokens" + } + } + ] + }, + { + "base": "OnRefreshTokensFail", + "details": { + "name": "On Refresh Tokens Fail" + }, + "params": [ + { + "typeid": "{03AAAB3F-5C47-5A66-9EBC-D5FA4DB353C9}", + "details": { + "name": "Error" + } + } + ] + } + ] + } + ] +} \ No newline at end of file diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/EBus/Handlers/BlastFamilyComponentNotificationBus.names b/Gems/ScriptCanvas/Assets/TranslationAssets/EBus/Handlers/BlastFamilyComponentNotificationBus.names new file mode 100644 index 0000000000..b083994547 --- /dev/null +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/EBus/Handlers/BlastFamilyComponentNotificationBus.names @@ -0,0 +1,45 @@ +{ + "entries": [ + { + "base": "BlastFamilyComponentNotificationBus", + "context": "EBusHandler", + "variant": "", + "details": { + "name": "Blast Family", + "category": "Blast" + }, + "methods": [ + { + "base": "OnActorCreated", + "details": { + "name": "On Actor Created" + }, + "params": [ + { + "typeid": "{A23453D5-79A8-49C8-B9F0-9CC35D711DD4}", + "details": { + "name": "Blast Actor Data", + "tooltip": "Represents Blast Actor in a Script Canvas friendly format." + } + } + ] + }, + { + "base": "OnActorDestroyed", + "details": { + "name": "On Actor Destroyed" + }, + "params": [ + { + "typeid": "{A23453D5-79A8-49C8-B9F0-9CC35D711DD4}", + "details": { + "name": "Blast Actor Data", + "tooltip": "Represents Blast Actor in a Script Canvas friendly format." + } + } + ] + } + ] + } + ] +} \ No newline at end of file diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/EBus/Handlers/CameraNotificationBus.names b/Gems/ScriptCanvas/Assets/TranslationAssets/EBus/Handlers/CameraNotificationBus.names new file mode 100644 index 0000000000..d1c0a4942e --- /dev/null +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/EBus/Handlers/CameraNotificationBus.names @@ -0,0 +1,60 @@ +{ + "entries": [ + { + "base": "CameraNotificationBus", + "context": "EBusHandler", + "variant": "", + "details": { + "name": "Camera", + "category": "Camera" + }, + "methods": [ + { + "base": "OnCameraAdded", + "details": { + "name": "On Camera Added" + }, + "params": [ + { + "typeid": "{6383F1D3-BB27-4E6B-A49A-6409B2059EAA}", + "details": { + "name": "Entity Id", + "tooltip": "Entity Unique Id" + } + } + ] + }, + { + "base": "OnCameraRemoved", + "details": { + "name": "On Camera Removed" + }, + "params": [ + { + "typeid": "{6383F1D3-BB27-4E6B-A49A-6409B2059EAA}", + "details": { + "name": "Entity Id", + "tooltip": "Entity Unique Id" + } + } + ] + }, + { + "base": "OnActiveViewChanged", + "details": { + "name": "On Active View Changed" + }, + "params": [ + { + "typeid": "{6383F1D3-BB27-4E6B-A49A-6409B2059EAA}", + "details": { + "name": "Entity Id", + "tooltip": "Entity Unique Id" + } + } + ] + } + ] + } + ] +} \ No newline at end of file diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/EBus/Handlers/CollisionNotificationBus.names b/Gems/ScriptCanvas/Assets/TranslationAssets/EBus/Handlers/CollisionNotificationBus.names new file mode 100644 index 0000000000..76327e1006 --- /dev/null +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/EBus/Handlers/CollisionNotificationBus.names @@ -0,0 +1,74 @@ +{ + "entries": [ + { + "base": "CollisionNotificationBus", + "context": "EBusHandler", + "variant": "", + "details": { + "name": "Collision", + "category": "PhysX" + }, + "methods": [ + { + "base": "OnCollisionBegin", + "details": { + "name": "On Collision Begin" + }, + "params": [ + { + "typeid": "{6383F1D3-BB27-4E6B-A49A-6409B2059EAA}", + "details": { + "name": "EntityId", + "tooltip": "Entity Unique Id" + } + }, + { + "typeid": "{009022A1-16A5-50B0-958F-F69C729985A3}", + "details": { + "name": "AZStd::vector" + } + } + ] + }, + { + "base": "OnCollisionPersist", + "details": { + "name": "On Collision Persist", + "tooltip": "Raised while this collider is in contact with another collider" + }, + "params": [ + { + "typeid": "{6383F1D3-BB27-4E6B-A49A-6409B2059EAA}", + "details": { + "name": "EntityId", + "tooltip": "Entity Unique Id" + } + }, + { + "typeid": "{009022A1-16A5-50B0-958F-F69C729985A3}", + "details": { + "name": "AZStd::vector" + } + } + ] + }, + { + "base": "OnCollisionEnd", + "details": { + "name": "On Collision End", + "tooltip": "Raised when a collider loses contact with another collider" + }, + "params": [ + { + "typeid": "{6383F1D3-BB27-4E6B-A49A-6409B2059EAA}", + "details": { + "name": "EntityId", + "tooltip": "Entity Unique Id" + } + } + ] + } + ] + } + ] +} \ No newline at end of file diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/EBus/Handlers/ConsoleNotificationBus.names b/Gems/ScriptCanvas/Assets/TranslationAssets/EBus/Handlers/ConsoleNotificationBus.names new file mode 100644 index 0000000000..0f990a40b1 --- /dev/null +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/EBus/Handlers/ConsoleNotificationBus.names @@ -0,0 +1,29 @@ +{ + "entries": [ + { + "base": "ConsoleNotificationBus", + "context": "EBusHandler", + "variant": "", + "details": { + "name": "Console", + "category": "Utilities" + }, + "methods": [ + { + "base": "OnConsoleCommandExecuted", + "details": { + "name": "On Console Command Executed" + }, + "params": [ + { + "typeid": "{3AB0037F-AF8D-48CE-BCA0-A170D18B2C03}", + "details": { + "name": "Command" + } + } + ] + } + ] + } + ] +} \ No newline at end of file diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/EBus/Handlers/EditorComponentModeNotificationBus.names b/Gems/ScriptCanvas/Assets/TranslationAssets/EBus/Handlers/EditorComponentModeNotificationBus.names new file mode 100644 index 0000000000..391f467a6b --- /dev/null +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/EBus/Handlers/EditorComponentModeNotificationBus.names @@ -0,0 +1,28 @@ +{ + "entries": [ + { + "base": "EditorComponentModeNotificationBus", + "context": "EBusHandler", + "variant": "", + "details": { + "name": "EditorComponentModeNotificationBus" + }, + "methods": [ + { + "base": "ActiveComponentModeChanged", + "details": { + "name": "ActiveComponentModeChanged" + }, + "params": [ + { + "typeid": "{E152C105-A133-4D03-BBF8-3D4B2FBA3E2A}", + "details": { + "name": "AZ::Uuid" + } + } + ] + } + ] + } + ] +} \ No newline at end of file diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/EBus/Handlers/EditorEntityContextNotificationBus.names b/Gems/ScriptCanvas/Assets/TranslationAssets/EBus/Handlers/EditorEntityContextNotificationBus.names new file mode 100644 index 0000000000..52472570a4 --- /dev/null +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/EBus/Handlers/EditorEntityContextNotificationBus.names @@ -0,0 +1,44 @@ +{ + "entries": [ + { + "base": "EditorEntityContextNotificationBus", + "context": "EBusHandler", + "variant": "", + "details": { + "name": "EditorEntityContextNotificationBus" + }, + "methods": [ + { + "base": "OnEditorEntityCreated", + "details": { + "name": "OnEditorEntityCreated" + }, + "params": [ + { + "typeid": "{6383F1D3-BB27-4E6B-A49A-6409B2059EAA}", + "details": { + "name": "EntityId", + "tooltip": "Entity Unique Id" + } + } + ] + }, + { + "base": "OnEditorEntityDeleted", + "details": { + "name": "OnEditorEntityDeleted" + }, + "params": [ + { + "typeid": "{6383F1D3-BB27-4E6B-A49A-6409B2059EAA}", + "details": { + "name": "EntityId", + "tooltip": "Entity Unique Id" + } + } + ] + } + ] + } + ] +} \ No newline at end of file diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/EBus/Handlers/EditorEventBus.names b/Gems/ScriptCanvas/Assets/TranslationAssets/EBus/Handlers/EditorEventBus.names new file mode 100644 index 0000000000..6327d02fb3 --- /dev/null +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/EBus/Handlers/EditorEventBus.names @@ -0,0 +1,20 @@ +{ + "entries": [ + { + "base": "EditorEventBus", + "context": "EBusHandler", + "variant": "", + "details": { + "name": "EditorEventBus" + }, + "methods": [ + { + "base": "NotifyRegisterViews", + "details": { + "name": "NotifyRegisterViews" + } + } + ] + } + ] +} \ No newline at end of file diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/EBus/Handlers/EntityBus.names b/Gems/ScriptCanvas/Assets/TranslationAssets/EBus/Handlers/EntityBus.names new file mode 100644 index 0000000000..3e3cec1916 --- /dev/null +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/EBus/Handlers/EntityBus.names @@ -0,0 +1,47 @@ +{ + "entries": [ + { + "base": "EntityBus", + "context": "EBusHandler", + "variant": "", + "details": { + "name": "Game Entity", + "category": "Entity" + }, + "methods": [ + { + "base": "OnEntityActivated", + "details": { + "name": "On Entity Activated", + "tooltip": "Signals that an entity was activated" + }, + "params": [ + { + "typeid": "{6383F1D3-BB27-4E6B-A49A-6409B2059EAA}", + "details": { + "name": "Entity", + "tooltip": "The ID of the entity that was activated" + } + } + ] + }, + { + "base": "OnEntityDeactivated", + "details": { + "name": "On Entity Deactivated", + "tooltip": "Signals that an entity is being deactivated" + }, + "params": [ + { + "typeid": "{6383F1D3-BB27-4E6B-A49A-6409B2059EAA}", + "details": { + "name": "Entity", + "tooltip": "The ID of the entity that is being deactivated" + } + } + ] + } + ] + } + ] +} \ No newline at end of file diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/EBus/Handlers/ForceRegionNotificationBus.names b/Gems/ScriptCanvas/Assets/TranslationAssets/EBus/Handlers/ForceRegionNotificationBus.names new file mode 100644 index 0000000000..e4c43e1d30 --- /dev/null +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/EBus/Handlers/ForceRegionNotificationBus.names @@ -0,0 +1,49 @@ +{ + "entries": [ + { + "base": "ForceRegionNotificationBus", + "context": "EBusHandler", + "variant": "", + "details": { + "name": "Force Region", + "category": "Physics" + }, + "methods": [ + { + "base": "OnCalculateNetForce", + "details": { + "name": "On Calculate Net Force" + }, + "params": [ + { + "typeid": "{6383F1D3-BB27-4E6B-A49A-6409B2059EAA}", + "details": { + "name": "Entity Id", + "tooltip": "Entity Unique Id" + } + }, + { + "typeid": "{6383F1D3-BB27-4E6B-A49A-6409B2059EAA}", + "details": { + "name": "Entity Id", + "tooltip": "Entity Unique Id" + } + }, + { + "typeid": "{8379EB7D-01FA-4538-B64B-A6543B4BE73D}", + "details": { + "name": "Vector 3" + } + }, + { + "typeid": "{EA2C3E90-AFBE-44D4-A90D-FAAF79BAF93D}", + "details": { + "name": "float" + } + } + ] + } + ] + } + ] +} \ No newline at end of file diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/EBus/Handlers/FrameCaptureNotificationBus.names b/Gems/ScriptCanvas/Assets/TranslationAssets/EBus/Handlers/FrameCaptureNotificationBus.names new file mode 100644 index 0000000000..ab5be84903 --- /dev/null +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/EBus/Handlers/FrameCaptureNotificationBus.names @@ -0,0 +1,34 @@ +{ + "entries": [ + { + "base": "FrameCaptureNotificationBus", + "context": "EBusHandler", + "variant": "", + "details": { + "name": "FrameCaptureNotificationBus" + }, + "methods": [ + { + "base": "OnCaptureFinished", + "details": { + "name": "OnCaptureFinished" + }, + "params": [ + { + "typeid": "{72039442-EB38-4D42-A1AD-CB68F7E0EEF6}", + "details": { + "name": "int" + } + }, + { + "typeid": "{03AAAB3F-5C47-5A66-9EBC-D5FA4DB353C9}", + "details": { + "name": "AZStd::string" + } + } + ] + } + ] + } + ] +} \ No newline at end of file diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/EBus/Handlers/GlobalScriptEvents.names b/Gems/ScriptCanvas/Assets/TranslationAssets/EBus/Handlers/GlobalScriptEvents.names new file mode 100644 index 0000000000..4b0b9d1ef5 --- /dev/null +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/EBus/Handlers/GlobalScriptEvents.names @@ -0,0 +1,64 @@ +{ + "entries": [ + { + "base": "GlobalScriptEvents", + "context": "EBusHandler", + "variant": "", + "details": { + "name": "GlobalScriptEvents" + }, + "methods": [ + { + "base": "Void", + "details": { + "name": "Void" + } + }, + { + "base": "Not", + "details": { + "name": "Not" + }, + "params": [ + { + "typeid": "{A0CA880C-AFE4-43CB-926C-59AC48496112}", + "details": { + "name": "Not" + } + } + ], + "results": [ + { + "typeid": "{A0CA880C-AFE4-43CB-926C-59AC48496112}", + "details": { + "name": "Not" + } + } + ] + }, + { + "base": "Increment", + "details": { + "name": "Increment" + }, + "params": [ + { + "typeid": "{110C4B14-11A8-4E9D-8638-5051013A56AC}", + "details": { + "name": "Increment" + } + } + ], + "results": [ + { + "typeid": "{110C4B14-11A8-4E9D-8638-5051013A56AC}", + "details": { + "name": "Increment" + } + } + ] + } + ] + } + ] +} \ No newline at end of file diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/EBus/Handlers/InputSystemNotificationBus.names b/Gems/ScriptCanvas/Assets/TranslationAssets/EBus/Handlers/InputSystemNotificationBus.names new file mode 100644 index 0000000000..b3893a3486 --- /dev/null +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/EBus/Handlers/InputSystemNotificationBus.names @@ -0,0 +1,27 @@ +{ + "entries": [ + { + "base": "InputSystemNotificationBus", + "context": "EBusHandler", + "variant": "", + "details": { + "name": "Input System", + "category": "Input" + }, + "methods": [ + { + "base": "OnPreInputUpdate", + "details": { + "name": "On Pre Input Update" + } + }, + { + "base": "OnPostInputUpdate", + "details": { + "name": "On Post Input Update" + } + } + ] + } + ] +} \ No newline at end of file diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/EBus/Handlers/LocalScriptEvents.names b/Gems/ScriptCanvas/Assets/TranslationAssets/EBus/Handlers/LocalScriptEvents.names new file mode 100644 index 0000000000..ed27ffe5e1 --- /dev/null +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/EBus/Handlers/LocalScriptEvents.names @@ -0,0 +1,64 @@ +{ + "entries": [ + { + "base": "LocalScriptEvents", + "context": "EBusHandler", + "variant": "", + "details": { + "name": "LocalScriptEvents" + }, + "methods": [ + { + "base": "Void", + "details": { + "name": "Void" + } + }, + { + "base": "Not", + "details": { + "name": "Not" + }, + "params": [ + { + "typeid": "{A0CA880C-AFE4-43CB-926C-59AC48496112}", + "details": { + "name": "Not" + } + } + ], + "results": [ + { + "typeid": "{A0CA880C-AFE4-43CB-926C-59AC48496112}", + "details": { + "name": "Not" + } + } + ] + }, + { + "base": "Increment", + "details": { + "name": "Increment" + }, + "params": [ + { + "typeid": "{110C4B14-11A8-4E9D-8638-5051013A56AC}", + "details": { + "name": "Increment" + } + } + ], + "results": [ + { + "typeid": "{110C4B14-11A8-4E9D-8638-5051013A56AC}", + "details": { + "name": "Increment" + } + } + ] + } + ] + } + ] +} \ No newline at end of file diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/EBus/Handlers/LookAtNotification.names b/Gems/ScriptCanvas/Assets/TranslationAssets/EBus/Handlers/LookAtNotification.names new file mode 100644 index 0000000000..e27ea1f05b --- /dev/null +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/EBus/Handlers/LookAtNotification.names @@ -0,0 +1,30 @@ +{ + "entries": [ + { + "base": "LookAtNotification", + "context": "EBusHandler", + "variant": "", + "details": { + "name": "Look At", + "category": "Gameplay" + }, + "methods": [ + { + "base": "OnTargetChanged", + "details": { + "name": "On Target Changed" + }, + "params": [ + { + "typeid": "{6383F1D3-BB27-4E6B-A49A-6409B2059EAA}", + "details": { + "name": "Entity Id", + "tooltip": "Entity Unique Id" + } + } + ] + } + ] + } + ] +} \ No newline at end of file diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/EBus/Handlers/MeshComponentNotificationBus.names b/Gems/ScriptCanvas/Assets/TranslationAssets/EBus/Handlers/MeshComponentNotificationBus.names new file mode 100644 index 0000000000..08e5be460a --- /dev/null +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/EBus/Handlers/MeshComponentNotificationBus.names @@ -0,0 +1,35 @@ +{ + "entries": [ + { + "base": "MeshComponentNotificationBus", + "context": "EBusHandler", + "variant": "", + "details": { + "name": "Mesh", + "category": "Rendering" + }, + "methods": [ + { + "base": "OnModelReady", + "details": { + "name": "On Model Ready" + }, + "params": [ + { + "typeid": "{A1F6761B-B5CA-59E6-89FF-EB0ABDF6BD68}", + "details": { + "name": "Asset" + } + }, + { + "typeid": "{2B7F6107-B177-5C17-9408-823396E6D8B8}", + "details": { + "name": "" + } + } + ] + } + ] + } + ] +} \ No newline at end of file diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/EBus/Handlers/NavigationComponentNotificationBus.names b/Gems/ScriptCanvas/Assets/TranslationAssets/EBus/Handlers/NavigationComponentNotificationBus.names new file mode 100644 index 0000000000..15e4a9a85f --- /dev/null +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/EBus/Handlers/NavigationComponentNotificationBus.names @@ -0,0 +1,126 @@ +{ + "entries": [ + { + "base": "NavigationComponentNotificationBus", + "context": "EBusHandler", + "variant": "", + "details": { + "name": "Movement", + "category": "Navigation" + }, + "methods": [ + { + "base": "OnSearchingForPath", + "details": { + "name": "On Searching For Path" + }, + "params": [ + { + "typeid": "{43DA906B-7DEF-4CA8-9790-854106D3F983}", + "details": { + "name": "Request Id", + "tooltip": "Navigation request Id" + } + } + ] + }, + { + "base": "OnTraversalStarted", + "details": { + "name": "On Traversal Started" + }, + "params": [ + { + "typeid": "{43DA906B-7DEF-4CA8-9790-854106D3F983}", + "details": { + "name": "Request Id", + "tooltip": "Navigation request Id" + } + } + ] + }, + { + "base": "OnTraversalPathUpdate", + "details": { + "name": "On Traversal Path Update" + }, + "params": [ + { + "typeid": "{43DA906B-7DEF-4CA8-9790-854106D3F983}", + "details": { + "name": "Request Id", + "tooltip": "Navigation request Id" + } + }, + { + "typeid": "{8379EB7D-01FA-4538-B64B-A6543B4BE73D}", + "details": { + "name": "Next Path Position", + "tooltip": "Next path position" + } + }, + { + "typeid": "{8379EB7D-01FA-4538-B64B-A6543B4BE73D}", + "details": { + "name": "Inflection Position", + "tooltip": "Next inflection position" + } + } + ] + }, + { + "base": "OnTraversalInProgress", + "details": { + "name": "On Traversal In Progress" + }, + "params": [ + { + "typeid": "{43DA906B-7DEF-4CA8-9790-854106D3F983}", + "details": { + "name": "Request Id", + "tooltip": "Navigation request Id" + } + }, + { + "typeid": "{EA2C3E90-AFBE-44D4-A90D-FAAF79BAF93D}", + "details": { + "name": "Distance", + "tooltip": "Distance remaining" + } + } + ] + }, + { + "base": "OnTraversalComplete", + "details": { + "name": "On Traversal Complete" + }, + "params": [ + { + "typeid": "{43DA906B-7DEF-4CA8-9790-854106D3F983}", + "details": { + "name": "Request Id", + "tooltip": "Navigation request Id" + } + } + ] + }, + { + "base": "OnTraversalCancelled", + "details": { + "name": "On Traversal Cancelled" + }, + "params": [ + { + "typeid": "{43DA906B-7DEF-4CA8-9790-854106D3F983}", + "details": { + "name": "Request Id", + "tooltip": "Navigation request Id" + } + } + ] + } + ] + } + ] +} \ No newline at end of file diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/EBus/Handlers/NetworkTestPlayerComponentBusHandler.names b/Gems/ScriptCanvas/Assets/TranslationAssets/EBus/Handlers/NetworkTestPlayerComponentBusHandler.names new file mode 100644 index 0000000000..ddb3349d59 --- /dev/null +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/EBus/Handlers/NetworkTestPlayerComponentBusHandler.names @@ -0,0 +1,57 @@ +{ + "entries": [ + { + "base": "NetworkTestPlayerComponentBusHandler", + "context": "EBusHandler", + "variant": "", + "details": { + "name": "Network Test Player", + "category": "Automated Testing" + }, + "methods": [ + { + "base": "CreateInput", + "details": { + "name": "Create Input" + }, + "params": [ + { + "typeid": "{EA2C3E90-AFBE-44D4-A90D-FAAF79BAF93D}", + "details": { + "name": "Delta Time" + } + } + ], + "results": [ + { + "typeid": "{12A1776B-61F6-4E5F-356A-AD718A62051F}", + "details": { + "name": "Network Test Player Component Network Input" + } + } + ] + }, + { + "base": "ProcessInput", + "details": { + "name": "Process Input" + }, + "params": [ + { + "typeid": "{12A1776B-61F6-4E5F-356A-AD718A62051F}", + "details": { + "name": "Network Test Player Component Network Input" + } + }, + { + "typeid": "{EA2C3E90-AFBE-44D4-A90D-FAAF79BAF93D}", + "details": { + "name": "Delta Time" + } + } + ] + } + ] + } + ] +} \ No newline at end of file diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/EBus/Handlers/ProfilingCaptureNotificationBus.names b/Gems/ScriptCanvas/Assets/TranslationAssets/EBus/Handlers/ProfilingCaptureNotificationBus.names new file mode 100644 index 0000000000..d02dcfb1a0 --- /dev/null +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/EBus/Handlers/ProfilingCaptureNotificationBus.names @@ -0,0 +1,94 @@ +{ + "entries": [ + { + "base": "ProfilingCaptureNotificationBus", + "context": "EBusHandler", + "variant": "", + "details": { + "name": "ProfilingCaptureNotificationBus" + }, + "methods": [ + { + "base": "OnCaptureQueryTimestampFinished", + "details": { + "name": "OnCaptureQueryTimestampFinished" + }, + "params": [ + { + "typeid": "{A0CA880C-AFE4-43CB-926C-59AC48496112}", + "details": { + "name": "bool" + } + }, + { + "typeid": "{03AAAB3F-5C47-5A66-9EBC-D5FA4DB353C9}", + "details": { + "name": "AZStd::string" + } + } + ] + }, + { + "base": "OnCaptureCpuFrameTimeFinished", + "details": { + "name": "OnCaptureCpuFrameTimeFinished" + }, + "params": [ + { + "typeid": "{A0CA880C-AFE4-43CB-926C-59AC48496112}", + "details": { + "name": "bool" + } + }, + { + "typeid": "{03AAAB3F-5C47-5A66-9EBC-D5FA4DB353C9}", + "details": { + "name": "AZStd::string" + } + } + ] + }, + { + "base": "OnCaptureQueryPipelineStatisticsFinished", + "details": { + "name": "OnCaptureQueryPipelineStatisticsFinished" + }, + "params": [ + { + "typeid": "{A0CA880C-AFE4-43CB-926C-59AC48496112}", + "details": { + "name": "bool" + } + }, + { + "typeid": "{03AAAB3F-5C47-5A66-9EBC-D5FA4DB353C9}", + "details": { + "name": "AZStd::string" + } + } + ] + }, + { + "base": "OnCaptureBenchmarkMetadataFinished", + "details": { + "name": "OnCaptureBenchmarkMetadataFinished" + }, + "params": [ + { + "typeid": "{A0CA880C-AFE4-43CB-926C-59AC48496112}", + "details": { + "name": "bool" + } + }, + { + "typeid": "{03AAAB3F-5C47-5A66-9EBC-D5FA4DB353C9}", + "details": { + "name": "AZStd::string" + } + } + ] + } + ] + } + ] +} \ No newline at end of file diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/EBus/Handlers/ScriptBuildingNotificationBus.names b/Gems/ScriptCanvas/Assets/TranslationAssets/EBus/Handlers/ScriptBuildingNotificationBus.names new file mode 100644 index 0000000000..3d501e7ad9 --- /dev/null +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/EBus/Handlers/ScriptBuildingNotificationBus.names @@ -0,0 +1,76 @@ +{ + "entries": [ + { + "base": "ScriptBuildingNotificationBus", + "context": "EBusHandler", + "variant": "", + "details": { + "name": "ScriptBuildingNotificationBus" + }, + "methods": [ + { + "base": "OnUpdateManifest", + "details": { + "name": "OnUpdateManifest" + }, + "params": [ + { + "typeid": "{1F2E6142-B0D8-42C6-A6E5-CD726DAA9EF0}", + "details": { + "name": "" + } + } + ], + "results": [ + { + "typeid": "{03AAAB3F-5C47-5A66-9EBC-D5FA4DB353C9}", + "details": { + "name": "AZStd::string" + } + } + ] + }, + { + "base": "OnPrepareForExport", + "details": { + "name": "OnPrepareForExport" + }, + "params": [ + { + "typeid": "{1F2E6142-B0D8-42C6-A6E5-CD726DAA9EF0}", + "details": { + "name": "" + } + }, + { + "typeid": "{7114E998-A8B4-519B-9342-A86D1587B4F7}", + "details": { + "name": "" + } + }, + { + "typeid": "{7114E998-A8B4-519B-9342-A86D1587B4F7}", + "details": { + "name": "" + } + }, + { + "typeid": "{1C76A51F-431B-4987-B653-CFCC940D0D0F}", + "details": { + "name": "" + } + } + ], + "results": [ + { + "typeid": "{1C76A51F-431B-4987-B653-CFCC940D0D0F}", + "details": { + "name": "" + } + } + ] + } + ] + } + ] +} \ No newline at end of file diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/EBus/Handlers/SequenceComponentNotificationBus.names b/Gems/ScriptCanvas/Assets/TranslationAssets/EBus/Handlers/SequenceComponentNotificationBus.names new file mode 100644 index 0000000000..146d5b4401 --- /dev/null +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/EBus/Handlers/SequenceComponentNotificationBus.names @@ -0,0 +1,110 @@ +{ + "entries": [ + { + "base": "SequenceComponentNotificationBus", + "context": "EBusHandler", + "variant": "", + "details": { + "name": "Sequence", + "category": "Animation" + }, + "methods": [ + { + "base": "OnStart", + "details": { + "name": "On Start", + "tooltip": "Called when Sequence starts" + }, + "params": [ + { + "typeid": "{EA2C3E90-AFBE-44D4-A90D-FAAF79BAF93D}", + "details": { + "name": "Start Time" + } + } + ] + }, + { + "base": "OnStop", + "details": { + "name": "On Stop", + "tooltip": "Called when Sequence stops" + }, + "params": [ + { + "typeid": "{EA2C3E90-AFBE-44D4-A90D-FAAF79BAF93D}", + "details": { + "name": "Stop Time" + } + } + ] + }, + { + "base": "OnPause", + "details": { + "name": "On Pause", + "tooltip": "Called when Sequence pauses" + } + }, + { + "base": "OnResume", + "details": { + "name": "On Resume", + "tooltip": "Called when Sequence resumes" + } + }, + { + "base": "OnAbort", + "details": { + "name": "On Abort", + "tooltip": "Called when Sequence is aborted" + }, + "params": [ + { + "typeid": "{EA2C3E90-AFBE-44D4-A90D-FAAF79BAF93D}", + "details": { + "name": "Abort Time" + } + } + ] + }, + { + "base": "OnUpdate", + "details": { + "name": "On Update", + "tooltip": "Called when Sequence is updated. That is, when the current play time changes, or the playback speed changes" + }, + "params": [ + { + "typeid": "{EA2C3E90-AFBE-44D4-A90D-FAAF79BAF93D}", + "details": { + "name": "Update Time" + } + } + ] + }, + { + "base": "OnTrackEventTriggered", + "details": { + "name": "On Track Event Triggered", + "tooltip": "Called when Sequence Event is triggered" + }, + "params": [ + { + "typeid": "{3AB0037F-AF8D-48CE-BCA0-A170D18B2C03}", + "details": { + "name": "Event Name" + } + }, + { + "typeid": "{3AB0037F-AF8D-48CE-BCA0-A170D18B2C03}", + "details": { + "name": "Event Value" + } + } + ] + } + ] + } + ] +} \ No newline at end of file diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/EBus/Handlers/ShapeComponentNotificationsBus.names b/Gems/ScriptCanvas/Assets/TranslationAssets/EBus/Handlers/ShapeComponentNotificationsBus.names new file mode 100644 index 0000000000..5a3a4ae797 --- /dev/null +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/EBus/Handlers/ShapeComponentNotificationsBus.names @@ -0,0 +1,29 @@ +{ + "entries": [ + { + "base": "ShapeComponentNotificationsBus", + "context": "EBusHandler", + "variant": "", + "details": { + "name": "Shape Component", + "category": "Shape" + }, + "methods": [ + { + "base": "OnShapeChanged", + "details": { + "name": "On Shape Changed" + }, + "params": [ + { + "typeid": "{72039442-EB38-4D42-A1AD-CB68F7E0EEF6}", + "details": { + "name": "int" + } + } + ] + } + ] + } + ] +} \ No newline at end of file diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/EBus/Handlers/SimpleStateComponentNotificationBus.names b/Gems/ScriptCanvas/Assets/TranslationAssets/EBus/Handlers/SimpleStateComponentNotificationBus.names new file mode 100644 index 0000000000..3c198f9de5 --- /dev/null +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/EBus/Handlers/SimpleStateComponentNotificationBus.names @@ -0,0 +1,38 @@ +{ + "entries": [ + { + "base": "SimpleStateComponentNotificationBus", + "context": "EBusHandler", + "variant": "", + "details": { + "name": "Simple State", + "category": "Gameplay" + }, + "methods": [ + { + "base": "OnStateChanged", + "details": { + "name": "On State Changed", + "tooltip": "Notifies that the state has changed from state oldName to state newName" + }, + "params": [ + { + "typeid": "{3AB0037F-AF8D-48CE-BCA0-A170D18B2C03}", + "details": { + "name": "Old State", + "tooltip": "Name of the old state" + } + }, + { + "typeid": "{3AB0037F-AF8D-48CE-BCA0-A170D18B2C03}", + "details": { + "name": "New State", + "tooltip": "Name of the new state" + } + } + ] + } + ] + } + ] +} \ No newline at end of file diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/EBus/Handlers/SpawnerComponentNotificationBus.names b/Gems/ScriptCanvas/Assets/TranslationAssets/EBus/Handlers/SpawnerComponentNotificationBus.names new file mode 100644 index 0000000000..31f0b8a34f --- /dev/null +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/EBus/Handlers/SpawnerComponentNotificationBus.names @@ -0,0 +1,98 @@ +{ + "entries": [ + { + "base": "SpawnerComponentNotificationBus", + "context": "EBusHandler", + "variant": "", + "details": { + "name": "Spawner", + "category": "Gameplay" + }, + "methods": [ + { + "base": "OnSpawnBegin", + "details": { + "name": "On Spawn Begin" + }, + "params": [ + { + "typeid": "{E6E7C0C5-07C9-44BB-A38C-930431948667}", + "details": { + "name": "Slice Instantiation Ticket" + } + } + ] + }, + { + "base": "OnSpawnEnd", + "details": { + "name": "On Spawn End" + }, + "params": [ + { + "typeid": "{E6E7C0C5-07C9-44BB-A38C-930431948667}", + "details": { + "name": "Slice Instantiation Ticket" + } + } + ] + }, + { + "base": "OnEntitySpawned", + "details": { + "name": "On Entity Spawned" + }, + "params": [ + { + "typeid": "{E6E7C0C5-07C9-44BB-A38C-930431948667}", + "details": { + "name": "Slice Instantiation Ticket" + } + }, + { + "typeid": "{6383F1D3-BB27-4E6B-A49A-6409B2059EAA}", + "details": { + "name": "Entity Id", + "tooltip": "Entity Unique Id" + } + } + ] + }, + { + "base": "OnSpawnedSliceDestroyed", + "details": { + "name": "On Spawned Slice Destroyed" + }, + "params": [ + { + "typeid": "{E6E7C0C5-07C9-44BB-A38C-930431948667}", + "details": { + "name": "Slice Instantiation Ticket" + } + } + ] + }, + { + "base": "OnEntitiesSpawned", + "details": { + "name": "On Entities Spawned" + }, + "params": [ + { + "typeid": "{E6E7C0C5-07C9-44BB-A38C-930431948667}", + "details": { + "name": "Slice Instantiation Ticket" + } + }, + { + "typeid": "{4841CFF0-7A5C-519C-BD16-D3625E99605E}", + "details": { + "name": "Entities" + } + } + ] + } + ] + } + ] +} \ No newline at end of file diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/EBus/Handlers/SubmarineEvents.names b/Gems/ScriptCanvas/Assets/TranslationAssets/EBus/Handlers/SubmarineEvents.names new file mode 100644 index 0000000000..93469fc2e1 --- /dev/null +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/EBus/Handlers/SubmarineEvents.names @@ -0,0 +1,28 @@ +{ + "entries": [ + { + "base": "SubmarineEvents", + "context": "EBusHandler", + "variant": "", + "details": { + "name": "SubmarineEvents" + }, + "methods": [ + { + "base": "SetSpeed", + "details": { + "name": "SetSpeed" + }, + "params": [ + { + "typeid": "{110C4B14-11A8-4E9D-8638-5051013A56AC}", + "details": { + "name": "SetSpeed" + } + } + ] + } + ] + } + ] +} \ No newline at end of file diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/EBus/Handlers/TagComponentNotificationsBus.names b/Gems/ScriptCanvas/Assets/TranslationAssets/EBus/Handlers/TagComponentNotificationsBus.names new file mode 100644 index 0000000000..9067ed5694 --- /dev/null +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/EBus/Handlers/TagComponentNotificationsBus.names @@ -0,0 +1,47 @@ +{ + "entries": [ + { + "base": "TagComponentNotificationsBus", + "context": "EBusHandler", + "variant": "", + "details": { + "name": "Tag", + "category": "Gameplay" + }, + "methods": [ + { + "base": "OnTagAdded", + "details": { + "name": "On Tag Added", + "tooltip": "Executes when a tag is added to the source entity" + }, + "params": [ + { + "typeid": "{9F4E062E-06A0-46D4-85DF-E0DA96467D3A}", + "details": { + "name": "Tag", + "tooltip": "The tag that was added to the source entity" + } + } + ] + }, + { + "base": "OnTagRemoved", + "details": { + "name": "On Tag Removed", + "tooltip": "Executes when a tag is removed from the source entity" + }, + "params": [ + { + "typeid": "{9F4E062E-06A0-46D4-85DF-E0DA96467D3A}", + "details": { + "name": "Tag", + "tooltip": "The tag that was removed from the source entity" + } + } + ] + } + ] + } + ] +} \ No newline at end of file diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/EBus/Handlers/TagGlobalNotificationBus.names b/Gems/ScriptCanvas/Assets/TranslationAssets/EBus/Handlers/TagGlobalNotificationBus.names new file mode 100644 index 0000000000..e1a74900be --- /dev/null +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/EBus/Handlers/TagGlobalNotificationBus.names @@ -0,0 +1,47 @@ +{ + "entries": [ + { + "base": "TagGlobalNotificationBus", + "context": "EBusHandler", + "variant": "", + "details": { + "name": "Tag", + "category": "Gameplay" + }, + "methods": [ + { + "base": "OnEntityTagAdded", + "details": { + "name": "On Entity Tag Added", + "tooltip": "Executes when the specified source tag is added to any entity" + }, + "params": [ + { + "typeid": "{6383F1D3-BB27-4E6B-A49A-6409B2059EAA}", + "details": { + "name": "Entity", + "tooltip": "The ID of the entity that the tag was added to" + } + } + ] + }, + { + "base": "OnEntityTagRemoved", + "details": { + "name": "On Entity Tag Removed", + "tooltip": "Executes when the specified source tag is removed from any entity" + }, + "params": [ + { + "typeid": "{6383F1D3-BB27-4E6B-A49A-6409B2059EAA}", + "details": { + "name": "Entity", + "tooltip": "The ID of the entity that the tag was removed from" + } + } + ] + } + ] + } + ] +} \ No newline at end of file diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/EBus/Handlers/TickBus.names b/Gems/ScriptCanvas/Assets/TranslationAssets/EBus/Handlers/TickBus.names new file mode 100644 index 0000000000..690529859a --- /dev/null +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/EBus/Handlers/TickBus.names @@ -0,0 +1,54 @@ +{ + "entries": [ + { + "base": "TickBus", + "context": "EBusHandler", + "variant": "", + "details": { + "name": "Tick", + "category": "Timing" + }, + "methods": [ + { + "base": "OnTick", + "details": { + "name": "On Tick", + "tooltip": "Signals that the application has issued a tick" + }, + "params": [ + { + "typeid": "{EA2C3E90-AFBE-44D4-A90D-FAAF79BAF93D}", + "details": { + "name": "Delta", + "tooltip": "The delta (in seconds) from the previous tick and the current time" + } + }, + { + "typeid": "{4C0F6AD4-0D4F-4354-AD4A-0C01E948245C}", + "details": { + "name": "Time", + "tooltip": "The current time relatve to the epoch (January 1, 1970)" + } + } + ] + }, + { + "base": "GetTickOrder", + "details": { + "name": "Get Tick Order", + "tooltip": "Specifies the order in which a handler receives tick events relative to other handlers" + }, + "results": [ + { + "typeid": "{72039442-EB38-4D42-A1AD-CB68F7E0EEF6}", + "details": { + "name": "Order", + "tooltip": "A value specifying this handler's relative order" + } + } + ] + } + ] + } + ] +} \ No newline at end of file diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/EBus/Handlers/ToolsApplicationNotificationBus.names b/Gems/ScriptCanvas/Assets/TranslationAssets/EBus/Handlers/ToolsApplicationNotificationBus.names new file mode 100644 index 0000000000..7829467814 --- /dev/null +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/EBus/Handlers/ToolsApplicationNotificationBus.names @@ -0,0 +1,44 @@ +{ + "entries": [ + { + "base": "ToolsApplicationNotificationBus", + "context": "EBusHandler", + "variant": "", + "details": { + "name": "ToolsApplicationNotificationBus" + }, + "methods": [ + { + "base": "EntityRegistered", + "details": { + "name": "EntityRegistered" + }, + "params": [ + { + "typeid": "{6383F1D3-BB27-4E6B-A49A-6409B2059EAA}", + "details": { + "name": "EntityId", + "tooltip": "Entity Unique Id" + } + } + ] + }, + { + "base": "EntityDeregistered", + "details": { + "name": "EntityDeregistered" + }, + "params": [ + { + "typeid": "{6383F1D3-BB27-4E6B-A49A-6409B2059EAA}", + "details": { + "name": "EntityId", + "tooltip": "Entity Unique Id" + } + } + ] + } + ] + } + ] +} \ No newline at end of file diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/EBus/Handlers/TraceMessageBus.names b/Gems/ScriptCanvas/Assets/TranslationAssets/EBus/Handlers/TraceMessageBus.names new file mode 100644 index 0000000000..3f5bb30372 --- /dev/null +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/EBus/Handlers/TraceMessageBus.names @@ -0,0 +1,302 @@ +{ + "entries": [ + { + "base": "TraceMessageBus", + "context": "EBusHandler", + "variant": "", + "details": { + "name": "TraceMessageBus" + }, + "methods": [ + { + "base": "OnPreAssert", + "details": { + "name": "OnPreAssert" + }, + "params": [ + { + "typeid": "{3AB0037F-AF8D-48CE-BCA0-A170D18B2C03}", + "details": { + "name": "char" + } + }, + { + "typeid": "{72039442-EB38-4D42-A1AD-CB68F7E0EEF6}", + "details": { + "name": "int" + } + }, + { + "typeid": "{3AB0037F-AF8D-48CE-BCA0-A170D18B2C03}", + "details": { + "name": "char" + } + }, + { + "typeid": "{3AB0037F-AF8D-48CE-BCA0-A170D18B2C03}", + "details": { + "name": "char" + } + } + ], + "results": [ + { + "typeid": "{A0CA880C-AFE4-43CB-926C-59AC48496112}", + "details": { + "name": "bool" + } + } + ] + }, + { + "base": "OnPreError", + "details": { + "name": "OnPreError" + }, + "params": [ + { + "typeid": "{3AB0037F-AF8D-48CE-BCA0-A170D18B2C03}", + "details": { + "name": "char" + } + }, + { + "typeid": "{3AB0037F-AF8D-48CE-BCA0-A170D18B2C03}", + "details": { + "name": "char" + } + }, + { + "typeid": "{72039442-EB38-4D42-A1AD-CB68F7E0EEF6}", + "details": { + "name": "int" + } + }, + { + "typeid": "{3AB0037F-AF8D-48CE-BCA0-A170D18B2C03}", + "details": { + "name": "char" + } + }, + { + "typeid": "{3AB0037F-AF8D-48CE-BCA0-A170D18B2C03}", + "details": { + "name": "char" + } + } + ], + "results": [ + { + "typeid": "{A0CA880C-AFE4-43CB-926C-59AC48496112}", + "details": { + "name": "bool" + } + } + ] + }, + { + "base": "OnPreWarning", + "details": { + "name": "OnPreWarning" + }, + "params": [ + { + "typeid": "{3AB0037F-AF8D-48CE-BCA0-A170D18B2C03}", + "details": { + "name": "char" + } + }, + { + "typeid": "{3AB0037F-AF8D-48CE-BCA0-A170D18B2C03}", + "details": { + "name": "char" + } + }, + { + "typeid": "{72039442-EB38-4D42-A1AD-CB68F7E0EEF6}", + "details": { + "name": "int" + } + }, + { + "typeid": "{3AB0037F-AF8D-48CE-BCA0-A170D18B2C03}", + "details": { + "name": "char" + } + }, + { + "typeid": "{3AB0037F-AF8D-48CE-BCA0-A170D18B2C03}", + "details": { + "name": "char" + } + } + ], + "results": [ + { + "typeid": "{A0CA880C-AFE4-43CB-926C-59AC48496112}", + "details": { + "name": "bool" + } + } + ] + }, + { + "base": "OnAssert", + "details": { + "name": "OnAssert" + }, + "params": [ + { + "typeid": "{3AB0037F-AF8D-48CE-BCA0-A170D18B2C03}", + "details": { + "name": "char" + } + } + ], + "results": [ + { + "typeid": "{A0CA880C-AFE4-43CB-926C-59AC48496112}", + "details": { + "name": "bool" + } + } + ] + }, + { + "base": "OnError", + "details": { + "name": "OnError" + }, + "params": [ + { + "typeid": "{3AB0037F-AF8D-48CE-BCA0-A170D18B2C03}", + "details": { + "name": "char" + } + }, + { + "typeid": "{3AB0037F-AF8D-48CE-BCA0-A170D18B2C03}", + "details": { + "name": "char" + } + } + ], + "results": [ + { + "typeid": "{A0CA880C-AFE4-43CB-926C-59AC48496112}", + "details": { + "name": "bool" + } + } + ] + }, + { + "base": "OnWarning", + "details": { + "name": "OnWarning" + }, + "params": [ + { + "typeid": "{3AB0037F-AF8D-48CE-BCA0-A170D18B2C03}", + "details": { + "name": "char" + } + }, + { + "typeid": "{3AB0037F-AF8D-48CE-BCA0-A170D18B2C03}", + "details": { + "name": "char" + } + } + ], + "results": [ + { + "typeid": "{A0CA880C-AFE4-43CB-926C-59AC48496112}", + "details": { + "name": "bool" + } + } + ] + }, + { + "base": "OnException", + "details": { + "name": "OnException" + }, + "params": [ + { + "typeid": "{3AB0037F-AF8D-48CE-BCA0-A170D18B2C03}", + "details": { + "name": "char" + } + } + ], + "results": [ + { + "typeid": "{A0CA880C-AFE4-43CB-926C-59AC48496112}", + "details": { + "name": "bool" + } + } + ] + }, + { + "base": "OnPrintf", + "details": { + "name": "OnPrintf" + }, + "params": [ + { + "typeid": "{3AB0037F-AF8D-48CE-BCA0-A170D18B2C03}", + "details": { + "name": "char" + } + }, + { + "typeid": "{3AB0037F-AF8D-48CE-BCA0-A170D18B2C03}", + "details": { + "name": "char" + } + } + ], + "results": [ + { + "typeid": "{A0CA880C-AFE4-43CB-926C-59AC48496112}", + "details": { + "name": "bool" + } + } + ] + }, + { + "base": "OnOutput", + "details": { + "name": "OnOutput" + }, + "params": [ + { + "typeid": "{3AB0037F-AF8D-48CE-BCA0-A170D18B2C03}", + "details": { + "name": "char" + } + }, + { + "typeid": "{3AB0037F-AF8D-48CE-BCA0-A170D18B2C03}", + "details": { + "name": "char" + } + } + ], + "results": [ + { + "typeid": "{A0CA880C-AFE4-43CB-926C-59AC48496112}", + "details": { + "name": "bool" + } + } + ] + } + ] + } + ] +} \ No newline at end of file diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/EBus/Handlers/TransformNotificationBus.names b/Gems/ScriptCanvas/Assets/TranslationAssets/EBus/Handlers/TransformNotificationBus.names new file mode 100644 index 0000000000..aefaab4035 --- /dev/null +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/EBus/Handlers/TransformNotificationBus.names @@ -0,0 +1,93 @@ +{ + "entries": [ + { + "base": "TransformNotificationBus", + "context": "EBusHandler", + "variant": "", + "details": { + "name": "Transform", + "category": "Entity" + }, + "methods": [ + { + "base": "OnTransformChanged", + "details": { + "name": "On Transform Changed", + "tooltip": "Signals that the local or world transform of the entity changed" + }, + "params": [ + { + "typeid": "{5D9958E9-9F1E-4985-B532-FFFDE75FEDFD}", + "details": { + "name": "Local Transform", + "tooltip": "A reference to the new local transform of the entity" + } + }, + { + "typeid": "{5D9958E9-9F1E-4985-B532-FFFDE75FEDFD}", + "details": { + "name": "World Transform", + "tooltip": "A reference to the new world transform of the entity" + } + } + ] + }, + { + "base": "OnParentChanged", + "details": { + "name": "On Parent Changed", + "tooltip": "Signals that the parent of the entity changed" + }, + "params": [ + { + "typeid": "{6383F1D3-BB27-4E6B-A49A-6409B2059EAA}", + "details": { + "name": "Old Parent", + "tooltip": "The EntityID of the old parent. The EntityID is invalid if there was no old parent" + } + }, + { + "typeid": "{6383F1D3-BB27-4E6B-A49A-6409B2059EAA}", + "details": { + "name": "New Parent", + "tooltip": "The EntityID of the new parent. The EntityID is invalid if there is no new parent" + } + } + ] + }, + { + "base": "OnChildAdded", + "details": { + "name": "On Child Added", + "tooltip": "Signals that a child was added to the entity" + }, + "params": [ + { + "typeid": "{6383F1D3-BB27-4E6B-A49A-6409B2059EAA}", + "details": { + "name": "Child", + "tooltip": "The EntityID of the added child" + } + } + ] + }, + { + "base": "OnChildRemoved", + "details": { + "name": "On Child Removed", + "tooltip": "Signals that a child was removed from the entity" + }, + "params": [ + { + "typeid": "{6383F1D3-BB27-4E6B-A49A-6409B2059EAA}", + "details": { + "name": "Child", + "tooltip": "The EntityID of the removed child" + } + } + ] + } + ] + } + ] +} \ No newline at end of file diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/EBus/Handlers/TriggerNotificationBus.names b/Gems/ScriptCanvas/Assets/TranslationAssets/EBus/Handlers/TriggerNotificationBus.names new file mode 100644 index 0000000000..a78fcf4dc4 --- /dev/null +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/EBus/Handlers/TriggerNotificationBus.names @@ -0,0 +1,47 @@ +{ + "entries": [ + { + "base": "TriggerNotificationBus", + "context": "EBusHandler", + "variant": "", + "details": { + "name": "Trigger", + "category": "PhysX" + }, + "methods": [ + { + "base": "OnTriggerEnter", + "details": { + "name": "On Trigger Enter", + "tooltip": "Triggered when another collider enters this trigger" + }, + "params": [ + { + "typeid": "{6383F1D3-BB27-4E6B-A49A-6409B2059EAA}", + "details": { + "name": "EntityId", + "tooltip": "Entity Unique Id" + } + } + ] + }, + { + "base": "OnTriggerExit", + "details": { + "name": "On Trigger Exit", + "tooltip": "Triggered when another collider exits this trigger" + }, + "params": [ + { + "typeid": "{6383F1D3-BB27-4E6B-A49A-6409B2059EAA}", + "details": { + "name": "EntityId", + "tooltip": "Entity Unique Id" + } + } + ] + } + ] + } + ] +} \ No newline at end of file diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/EBus/Handlers/UiAnimationNotificationBus.names b/Gems/ScriptCanvas/Assets/TranslationAssets/EBus/Handlers/UiAnimationNotificationBus.names new file mode 100644 index 0000000000..06a9ed1f38 --- /dev/null +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/EBus/Handlers/UiAnimationNotificationBus.names @@ -0,0 +1,64 @@ +{ + "entries": [ + { + "base": "UiAnimationNotificationBus", + "context": "EBusHandler", + "variant": "", + "details": { + "name": "UI Animation", + "category": "UI" + }, + "methods": [ + { + "base": "OnUiAnimationEvent", + "details": { + "name": "On Animation Event", + "tooltip": "Executes when an animation event occurs" + }, + "params": [ + { + "typeid": "{72039442-EB38-4D42-A1AD-CB68F7E0EEF6}", + "details": { + "name": "Event Type", + "tooltip": "The type of animation event that occurred (0=Started, 1=Stopped, 2=Aborted, 3=Updated)" + } + }, + { + "typeid": "{03AAAB3F-5C47-5A66-9EBC-D5FA4DB353C9}", + "details": { + "name": "Sequence Name", + "tooltip": "The name of the sequence that triggered the event" + } + } + ] + }, + { + "base": "OnUiTrackEvent", + "details": { + "name": "OnUiTrackEvent" + }, + "params": [ + { + "typeid": "{03AAAB3F-5C47-5A66-9EBC-D5FA4DB353C9}", + "details": { + "name": "AZStd::string" + } + }, + { + "typeid": "{03AAAB3F-5C47-5A66-9EBC-D5FA4DB353C9}", + "details": { + "name": "AZStd::string" + } + }, + { + "typeid": "{03AAAB3F-5C47-5A66-9EBC-D5FA4DB353C9}", + "details": { + "name": "AZStd::string" + } + } + ] + } + ] + } + ] +} \ No newline at end of file diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/EBus/Handlers/UiButtonNotificationBus.names b/Gems/ScriptCanvas/Assets/TranslationAssets/EBus/Handlers/UiButtonNotificationBus.names new file mode 100644 index 0000000000..7e36a2ba20 --- /dev/null +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/EBus/Handlers/UiButtonNotificationBus.names @@ -0,0 +1,22 @@ +{ + "entries": [ + { + "base": "UiButtonNotificationBus", + "context": "EBusHandler", + "variant": "", + "details": { + "name": "UI Button", + "category": "UI" + }, + "methods": [ + { + "base": "OnButtonClick", + "details": { + "name": "On Button Click", + "tooltip": "Executes when the button has been clicked" + } + } + ] + } + ] +} \ No newline at end of file diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/EBus/Handlers/UiCanvasAssetRefNotificationBus.names b/Gems/ScriptCanvas/Assets/TranslationAssets/EBus/Handlers/UiCanvasAssetRefNotificationBus.names new file mode 100644 index 0000000000..15e2b87526 --- /dev/null +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/EBus/Handlers/UiCanvasAssetRefNotificationBus.names @@ -0,0 +1,31 @@ +{ + "entries": [ + { + "base": "UiCanvasAssetRefNotificationBus", + "context": "EBusHandler", + "variant": "", + "details": { + "name": "UI Canvas Asset Ref", + "category": "UI" + }, + "methods": [ + { + "base": "OnCanvasLoadedIntoEntity", + "details": { + "name": "On Canvas Loaded Into Entity", + "tooltip": "Executes when the canvas asset reference loads a canvas" + }, + "params": [ + { + "typeid": "{6383F1D3-BB27-4E6B-A49A-6409B2059EAA}", + "details": { + "name": "Canvas EntityID", + "tooltip": "The canvas that was loaded" + } + } + ] + } + ] + } + ] +} \ No newline at end of file diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/EBus/Handlers/UiCanvasInputNotificationBus.names b/Gems/ScriptCanvas/Assets/TranslationAssets/EBus/Handlers/UiCanvasInputNotificationBus.names new file mode 100644 index 0000000000..86d7ff6b69 --- /dev/null +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/EBus/Handlers/UiCanvasInputNotificationBus.names @@ -0,0 +1,157 @@ +{ + "entries": [ + { + "base": "UiCanvasInputNotificationBus", + "context": "EBusHandler", + "variant": "", + "details": { + "name": "UI Canvas Input", + "category": "UI" + }, + "methods": [ + { + "base": "OnCanvasPrimaryPressed", + "details": { + "name": "On Canvas Primary Pressed", + "tooltip": "Executes on a positional input press" + }, + "params": [ + { + "typeid": "{6383F1D3-BB27-4E6B-A49A-6409B2059EAA}", + "details": { + "name": "Pressed EntityID", + "tooltip": "The element that was pressed or an invalid entityID if no element was pressed" + } + } + ] + }, + { + "base": "OnCanvasPrimaryReleased", + "details": { + "name": "On Canvas Primary Released", + "tooltip": "Executes on a positional input release" + }, + "params": [ + { + "typeid": "{6383F1D3-BB27-4E6B-A49A-6409B2059EAA}", + "details": { + "name": "Released EntityID", + "tooltip": "The element that was released or an invalid EntityID if no element was released" + } + } + ] + }, + { + "base": "OnCanvasMultiTouchPressed", + "details": { + "name": "On Canvas Multi-touch Pressed", + "tooltip": "Executes on a positional input press" + }, + "params": [ + { + "typeid": "{6383F1D3-BB27-4E6B-A49A-6409B2059EAA}", + "details": { + "name": "Pressed EntityID", + "tooltip": "The element that was pressed or an invalid entityID if no element was pressed" + } + }, + { + "typeid": "{72039442-EB38-4D42-A1AD-CB68F7E0EEF6}", + "details": { + "name": "Multi-touch Index", + "tooltip": "The multi-touch index" + } + } + ] + }, + { + "base": "OnCanvasMultiTouchReleased", + "details": { + "name": "On Canvas Multi-touch Released", + "tooltip": "Executes on a positional input release" + }, + "params": [ + { + "typeid": "{6383F1D3-BB27-4E6B-A49A-6409B2059EAA}", + "details": { + "name": "Released EntityID", + "tooltip": "The element that was released or an invalid EntityID if no element was released" + } + }, + { + "typeid": "{72039442-EB38-4D42-A1AD-CB68F7E0EEF6}", + "details": { + "name": "Multi-touch Index", + "tooltip": "The multi-touch index" + } + } + ] + }, + { + "base": "OnCanvasHoverStart", + "details": { + "name": "On Canvas Hover Start", + "tooltip": "Executes when an element starts being hovered" + }, + "params": [ + { + "typeid": "{6383F1D3-BB27-4E6B-A49A-6409B2059EAA}", + "details": { + "name": "EntityID", + "tooltip": "The element that has started being hovered" + } + } + ] + }, + { + "base": "OnCanvasHoverEnd", + "details": { + "name": "On Canvas Hover End", + "tooltip": "Executes when an element ends being hovered" + }, + "params": [ + { + "typeid": "{6383F1D3-BB27-4E6B-A49A-6409B2059EAA}", + "details": { + "name": "EntityID", + "tooltip": "The element that ended being hovered" + } + } + ] + }, + { + "base": "OnCanvasEnterPressed", + "details": { + "name": "On Canvas Enter Pressed", + "tooltip": "Executes when the “enter” key is pressed" + }, + "params": [ + { + "typeid": "{6383F1D3-BB27-4E6B-A49A-6409B2059EAA}", + "details": { + "name": "Pressed EntityID", + "tooltip": "The element that was pressed or an invalid entityID if no element was pressed" + } + } + ] + }, + { + "base": "OnCanvasEnterReleased", + "details": { + "name": "On Canvas Enter Released", + "tooltip": "Executes when the enter key is released" + }, + "params": [ + { + "typeid": "{6383F1D3-BB27-4E6B-A49A-6409B2059EAA}", + "details": { + "name": "Released EntityID", + "tooltip": "The element that was released or an invalid entityID if no element was released" + } + } + ] + } + ] + } + ] +} \ No newline at end of file diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/EBus/Handlers/UiCanvasNotificationBus.names b/Gems/ScriptCanvas/Assets/TranslationAssets/EBus/Handlers/UiCanvasNotificationBus.names new file mode 100644 index 0000000000..e919f654c7 --- /dev/null +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/EBus/Handlers/UiCanvasNotificationBus.names @@ -0,0 +1,38 @@ +{ + "entries": [ + { + "base": "UiCanvasNotificationBus", + "context": "EBusHandler", + "variant": "", + "details": { + "name": "UI Canvas", + "category": "UI" + }, + "methods": [ + { + "base": "OnAction", + "details": { + "name": "On Action", + "tooltip": "Executes when the canvas sends an action" + }, + "params": [ + { + "typeid": "{6383F1D3-BB27-4E6B-A49A-6409B2059EAA}", + "details": { + "name": "EntityID", + "tooltip": "The element that triggered the action" + } + }, + { + "typeid": "{03AAAB3F-5C47-5A66-9EBC-D5FA4DB353C9}", + "details": { + "name": "Action Name", + "tooltip": "The name of the action" + } + } + ] + } + ] + } + ] +} \ No newline at end of file diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/EBus/Handlers/UiCanvasRefNotificationBus.names b/Gems/ScriptCanvas/Assets/TranslationAssets/EBus/Handlers/UiCanvasRefNotificationBus.names new file mode 100644 index 0000000000..9677c9241a --- /dev/null +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/EBus/Handlers/UiCanvasRefNotificationBus.names @@ -0,0 +1,38 @@ +{ + "entries": [ + { + "base": "UiCanvasRefNotificationBus", + "context": "EBusHandler", + "variant": "", + "details": { + "name": "UI Canvas Ref", + "category": "UI" + }, + "methods": [ + { + "base": "OnCanvasRefChanged", + "details": { + "name": "On Canvas Ref Changed", + "tooltip": "Executes when the canvas referenced by a UiCanvasAssetRefComponent has changed. This can happen when \"Load Canvas\", \"Unload Canvas\", or \"Set Canvas Ref Entity\" is called" + }, + "params": [ + { + "typeid": "{6383F1D3-BB27-4E6B-A49A-6409B2059EAA}", + "details": { + "name": "Canvas Ref EntityID", + "tooltip": "The entity associated with the canvas" + } + }, + { + "typeid": "{6383F1D3-BB27-4E6B-A49A-6409B2059EAA}", + "details": { + "name": "Canvas EntityID", + "tooltip": "The canvas" + } + } + ] + } + ] + } + ] +} \ No newline at end of file diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/EBus/Handlers/UiCheckboxNotificationBus.names b/Gems/ScriptCanvas/Assets/TranslationAssets/EBus/Handlers/UiCheckboxNotificationBus.names new file mode 100644 index 0000000000..d64769915e --- /dev/null +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/EBus/Handlers/UiCheckboxNotificationBus.names @@ -0,0 +1,31 @@ +{ + "entries": [ + { + "base": "UiCheckboxNotificationBus", + "context": "EBusHandler", + "variant": "", + "details": { + "name": "UI Checkbox", + "category": "UI" + }, + "methods": [ + { + "base": "OnCheckboxStateChange", + "details": { + "name": "On Checkbox State Change", + "tooltip": "Executes when the checkbox state has changed" + }, + "params": [ + { + "typeid": "{A0CA880C-AFE4-43CB-926C-59AC48496112}", + "details": { + "name": "Checked", + "tooltip": "Indicates whether the checkbox is checked" + } + } + ] + } + ] + } + ] +} \ No newline at end of file diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/EBus/Handlers/UiDraggableNotificationBus.names b/Gems/ScriptCanvas/Assets/TranslationAssets/EBus/Handlers/UiDraggableNotificationBus.names new file mode 100644 index 0000000000..6fa083ccf6 --- /dev/null +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/EBus/Handlers/UiDraggableNotificationBus.names @@ -0,0 +1,63 @@ +{ + "entries": [ + { + "base": "UiDraggableNotificationBus", + "context": "EBusHandler", + "variant": "", + "details": { + "name": "UI Draggable", + "category": "UI" + }, + "methods": [ + { + "base": "OnDragStart", + "details": { + "name": "On Drag Start", + "tooltip": "Executes when dragging is detected on the draggable component. For mouse or touch input, this occurs when movement has been detected after the press or touch" + }, + "params": [ + { + "typeid": "{3D80F623-C85C-4741-90D0-E4E66164E6BF}", + "details": { + "name": "Position", + "tooltip": "The position of the start of the drag" + } + } + ] + }, + { + "base": "OnDrag", + "details": { + "name": "On Drag", + "tooltip": "Executes each time the drag position changes during dragging. \"On Drag\" events happen only between \"On Drag Start\" and \"On Drag End\" events" + }, + "params": [ + { + "typeid": "{3D80F623-C85C-4741-90D0-E4E66164E6BF}", + "details": { + "name": "Position", + "tooltip": "The position of the drag" + } + } + ] + }, + { + "base": "OnDragEnd", + "details": { + "name": "On Drag End", + "tooltip": "Executes at the end of dragging when the release input event occurs. The \"On Drag End\" notification is sent before the \"On Drop\" drop target notification" + }, + "params": [ + { + "typeid": "{3D80F623-C85C-4741-90D0-E4E66164E6BF}", + "details": { + "name": "Position", + "tooltip": "The position of the end of the drag" + } + } + ] + } + ] + } + ] +} \ No newline at end of file diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/EBus/Handlers/UiDropTargetNotificationBus.names b/Gems/ScriptCanvas/Assets/TranslationAssets/EBus/Handlers/UiDropTargetNotificationBus.names new file mode 100644 index 0000000000..1cc9259db4 --- /dev/null +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/EBus/Handlers/UiDropTargetNotificationBus.names @@ -0,0 +1,63 @@ +{ + "entries": [ + { + "base": "UiDropTargetNotificationBus", + "context": "EBusHandler", + "variant": "", + "details": { + "name": "UI Drop Target", + "category": "UI" + }, + "methods": [ + { + "base": "OnDropHoverStart", + "details": { + "name": "On Drop Hover Start", + "tooltip": "Executes when the focus starts to be on the drop target during dragging" + }, + "params": [ + { + "typeid": "{6383F1D3-BB27-4E6B-A49A-6409B2059EAA}", + "details": { + "name": "Dragged EntityID", + "tooltip": "The draggable element that is being dragged" + } + } + ] + }, + { + "base": "OnDropHoverEnd", + "details": { + "name": "On Drop Hover End", + "tooltip": "Executes when the focus stops being on the drop target during dragging" + }, + "params": [ + { + "typeid": "{6383F1D3-BB27-4E6B-A49A-6409B2059EAA}", + "details": { + "name": "Dragged EntityID", + "tooltip": "The draggable element that is being dragged" + } + } + ] + }, + { + "base": "OnDrop", + "details": { + "name": "On Drop", + "tooltip": "Executes when a draggable element is dropped on the drop target. Implement the game logic of what should happen on drag and drop here" + }, + "params": [ + { + "typeid": "{6383F1D3-BB27-4E6B-A49A-6409B2059EAA}", + "details": { + "name": "Dropped EntityID", + "tooltip": "The draggable element that was dropped" + } + } + ] + } + ] + } + ] +} \ No newline at end of file diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/EBus/Handlers/UiDropdownNotificationBus.names b/Gems/ScriptCanvas/Assets/TranslationAssets/EBus/Handlers/UiDropdownNotificationBus.names new file mode 100644 index 0000000000..be7c62fbb6 --- /dev/null +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/EBus/Handlers/UiDropdownNotificationBus.names @@ -0,0 +1,45 @@ +{ + "entries": [ + { + "base": "UiDropdownNotificationBus", + "context": "EBusHandler", + "variant": "", + "details": { + "name": "UI Dropdown", + "category": "UI" + }, + "methods": [ + { + "base": "OnDropdownExpanded", + "details": { + "name": "On Dropdown Expanded", + "tooltip": "Executes when the dropdown is expanded" + } + }, + { + "base": "OnDropdownCollapsed", + "details": { + "name": "On Dropdown Collapsed", + "tooltip": "Executes when the dropdown is collapsed" + } + }, + { + "base": "OnDropdownValueChanged", + "details": { + "name": "On Dropdown Value Changed", + "tooltip": "Executes when an option is selected" + }, + "params": [ + { + "typeid": "{6383F1D3-BB27-4E6B-A49A-6409B2059EAA}", + "details": { + "name": "Option EntityID", + "tooltip": "The option element that was selected" + } + } + ] + } + ] + } + ] +} \ No newline at end of file diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/EBus/Handlers/UiDropdownOptionNotificationBus.names b/Gems/ScriptCanvas/Assets/TranslationAssets/EBus/Handlers/UiDropdownOptionNotificationBus.names new file mode 100644 index 0000000000..f285f552a0 --- /dev/null +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/EBus/Handlers/UiDropdownOptionNotificationBus.names @@ -0,0 +1,22 @@ +{ + "entries": [ + { + "base": "UiDropdownOptionNotificationBus", + "context": "EBusHandler", + "variant": "", + "details": { + "name": "UI Dropdown Option", + "category": "UI" + }, + "methods": [ + { + "base": "OnDropdownOptionSelected", + "details": { + "name": "On Dropdown Option Selected", + "tooltip": "Executes when the dropdown option was selected" + } + } + ] + } + ] +} \ No newline at end of file diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/EBus/Handlers/UiDynamicScrollBoxDataBus.names b/Gems/ScriptCanvas/Assets/TranslationAssets/EBus/Handlers/UiDynamicScrollBoxDataBus.names new file mode 100644 index 0000000000..19407e35ea --- /dev/null +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/EBus/Handlers/UiDynamicScrollBoxDataBus.names @@ -0,0 +1,235 @@ +{ + "entries": [ + { + "base": "UiDynamicScrollBoxDataBus", + "context": "EBusHandler", + "variant": "", + "details": { + "name": "UI Dynamic Scroll Box Data", + "category": "UI", + "tooltip": "Provides a dynamic scrollbox with the information it needs to build the list" + }, + "methods": [ + { + "base": "GetNumElements", + "details": { + "name": "Get Number Of Elements", + "tooltip": "Gets the number of elements in the list. Called when the list is being constructed (in the component's InGamePostActivate or when RefreshContent is being called explicitly). Used with lists that are not divided into sections" + }, + "results": [ + { + "typeid": "{72039442-EB38-4D42-A1AD-CB68F7E0EEF6}", + "details": { + "name": "int" + } + } + ] + }, + { + "base": "GetElementWidth", + "details": { + "name": "Get Element Width", + "tooltip": "Gets the width of an element at the specified index. Called when an element’s size is needed by a horizontal list of variable element sizes, and the “auto calculate size” option is disabled. Used with lists that are not divided into sections" + }, + "params": [ + { + "typeid": "{72039442-EB38-4D42-A1AD-CB68F7E0EEF6}", + "details": { + "name": "Element Index", + "tooltip": "The index of the element" + } + } + ], + "results": [ + { + "typeid": "{EA2C3E90-AFBE-44D4-A90D-FAAF79BAF93D}", + "details": { + "name": "Element Index", + "tooltip": "The index of the element" + } + } + ] + }, + { + "base": "GetElementHeight", + "details": { + "name": "Get Element Height", + "tooltip": "Gets the height of an element at the specified index. Called when an element’s size is needed by a vertical list of variable element sizes, and the “auto calculate size” option is disabled. Used with lists that are not divided into sections" + }, + "params": [ + { + "typeid": "{72039442-EB38-4D42-A1AD-CB68F7E0EEF6}", + "details": { + "name": "Element Index", + "tooltip": "The index of the element" + } + } + ], + "results": [ + { + "typeid": "{EA2C3E90-AFBE-44D4-A90D-FAAF79BAF93D}", + "details": { + "name": "Element Index", + "tooltip": "The index of the element" + } + } + ] + }, + { + "base": "GetNumSections", + "details": { + "name": "Get Number Of Sections", + "tooltip": "Gets the number of sections in the list. Called when the list is being constructed (in the component's InGamePostActivate or when RefreshContent is being called explicitly). Used with lists that are divided into section" + }, + "results": [ + { + "typeid": "{72039442-EB38-4D42-A1AD-CB68F7E0EEF6}", + "details": { + "name": "int" + } + } + ] + }, + { + "base": "GetNumElementsInSection", + "details": { + "name": "Get Num Elements in Section", + "tooltip": "Gets the number of elements in the specified section. Called when the list is being constructed (in the component's InGamePostActivate or when RefreshContent is being called explicitly). Used with lists that are divided into sections" + }, + "params": [ + { + "typeid": "{72039442-EB38-4D42-A1AD-CB68F7E0EEF6}", + "details": { + "name": "Section Index", + "tooltip": "The index of the section" + } + } + ], + "results": [ + { + "typeid": "{72039442-EB38-4D42-A1AD-CB68F7E0EEF6}", + "details": { + "name": "Section Index", + "tooltip": "The index of the section" + } + } + ] + }, + { + "base": "GetElementInSectionWidth", + "details": { + "name": "Get Element In Section Width", + "tooltip": "Gets the width of an element at the specified section and element index. Called when an element’s size is needed by a horizontal list of variable element sizes, and the “auto calculate size” option is disabled. Used with lists that are divided into sections" + }, + "params": [ + { + "typeid": "{72039442-EB38-4D42-A1AD-CB68F7E0EEF6}", + "details": { + "name": "Section Index", + "tooltip": "The index of the section" + } + }, + { + "typeid": "{72039442-EB38-4D42-A1AD-CB68F7E0EEF6}", + "details": { + "name": "Element Index", + "tooltip": "The index of the element in the specified section" + } + } + ], + "results": [ + { + "typeid": "{EA2C3E90-AFBE-44D4-A90D-FAAF79BAF93D}", + "details": { + "name": "Section Index", + "tooltip": "The index of the section" + } + } + ] + }, + { + "base": "GetElementInSectionHeight", + "details": { + "name": "Get Element In Section Height", + "tooltip": "Gets the height of an element at the specified section and element index. Called when an element’s size is needed by a vertical list of variable element sizes, and the “auto calculate size” option is disabled. Used with lists that are divided into sections" + }, + "params": [ + { + "typeid": "{72039442-EB38-4D42-A1AD-CB68F7E0EEF6}", + "details": { + "name": "Section Index", + "tooltip": "The index of the section" + } + }, + { + "typeid": "{72039442-EB38-4D42-A1AD-CB68F7E0EEF6}", + "details": { + "name": "Element Index", + "tooltip": "The index of the element in the specified section" + } + } + ], + "results": [ + { + "typeid": "{EA2C3E90-AFBE-44D4-A90D-FAAF79BAF93D}", + "details": { + "name": "Section Index", + "tooltip": "The index of the section" + } + } + ] + }, + { + "base": "GetSectionHeaderWidth", + "details": { + "name": "Get Section Header Width", + "tooltip": "Gets the width of a header at the specified section. Called when a header’s size is needed by a horizontal list of variable header sizes, and the “auto calculate size” option is disabled. Used with lists that are divided into sections" + }, + "params": [ + { + "typeid": "{72039442-EB38-4D42-A1AD-CB68F7E0EEF6}", + "details": { + "name": "Section Index", + "tooltip": "The index of the section" + } + } + ], + "results": [ + { + "typeid": "{EA2C3E90-AFBE-44D4-A90D-FAAF79BAF93D}", + "details": { + "name": "Section Index", + "tooltip": "The index of the section" + } + } + ] + }, + { + "base": "GetSectionHeaderHeight", + "details": { + "name": "Get Section Header Height", + "tooltip": "Gets the height of a header at the specified section. Called when a header's size is needed by a vertical list of variable header sizes, and the “auto calculate size” option is disabled. Used with lists that are divided into sections" + }, + "params": [ + { + "typeid": "{72039442-EB38-4D42-A1AD-CB68F7E0EEF6}", + "details": { + "name": "Section Index", + "tooltip": "The index of the section" + } + } + ], + "results": [ + { + "typeid": "{EA2C3E90-AFBE-44D4-A90D-FAAF79BAF93D}", + "details": { + "name": "Section Index", + "tooltip": "The index of the section" + } + } + ] + } + ] + } + ] +} \ No newline at end of file diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/EBus/Handlers/UiDynamicScrollBoxElementNotificationBus.names b/Gems/ScriptCanvas/Assets/TranslationAssets/EBus/Handlers/UiDynamicScrollBoxElementNotificationBus.names new file mode 100644 index 0000000000..3978c48472 --- /dev/null +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/EBus/Handlers/UiDynamicScrollBoxElementNotificationBus.names @@ -0,0 +1,168 @@ +{ + "entries": [ + { + "base": "UiDynamicScrollBoxElementNotificationBus", + "context": "EBusHandler", + "variant": "", + "details": { + "name": "UI Dynamic Scroll Box Element Changes", + "category": "UI", + "tooltip": "Create this handler to receive notifications of dynamic scrollbox element state changes, such as when an element is about to scroll into view" + }, + "methods": [ + { + "base": "OnElementBecomingVisible", + "details": { + "name": "On Element Becoming Visible", + "tooltip": "Executes when a child of the scroll box is about to become visible. Use this event to populate the child with data for display" + }, + "params": [ + { + "typeid": "{6383F1D3-BB27-4E6B-A49A-6409B2059EAA}", + "details": { + "name": "EntityID", + "tooltip": "The child that is about to become visible" + } + }, + { + "typeid": "{72039442-EB38-4D42-A1AD-CB68F7E0EEF6}", + "details": { + "name": "Element Index", + "tooltip": "The index of the child that is about to become visible" + } + } + ] + }, + { + "base": "OnPrepareElementForSizeCalculation", + "details": { + "name": "On Prepare Element For Size Calculation", + "tooltip": "Executes when elements have variable sizes and are set to auto calculate. Used with lists that are not divided into sections" + }, + "params": [ + { + "typeid": "{6383F1D3-BB27-4E6B-A49A-6409B2059EAA}", + "details": { + "name": "EntityID", + "tooltip": "The element being prepared" + } + }, + { + "typeid": "{72039442-EB38-4D42-A1AD-CB68F7E0EEF6}", + "details": { + "name": "Element Index", + "tooltip": "The index of the child that is being prepared" + } + } + ] + }, + { + "base": "OnElementInSectionBecomingVisible", + "details": { + "name": "On Element In Section Becoming Visible", + "tooltip": "Executes when an element in a section is about to become visible. Used to populate the element with data for display. Used with lists that are divided into sections" + }, + "params": [ + { + "typeid": "{6383F1D3-BB27-4E6B-A49A-6409B2059EAA}", + "details": { + "name": "EntityID", + "tooltip": "The element becoming visible" + } + }, + { + "typeid": "{72039442-EB38-4D42-A1AD-CB68F7E0EEF6}", + "details": { + "name": "Section Index", + "tooltip": "The index of the section that contains the element" + } + }, + { + "typeid": "{72039442-EB38-4D42-A1AD-CB68F7E0EEF6}", + "details": { + "name": "Element Index", + "tooltip": "The index of the child that is becoming visible" + } + } + ] + }, + { + "base": "OnPrepareElementInSectionForSizeCalculation", + "details": { + "name": "On Prepare Element In Section For Size Calculation", + "tooltip": "Executes when elements in sections have variable sizes and are set to auto calculate. Used with lists that are divided into sections" + }, + "params": [ + { + "typeid": "{6383F1D3-BB27-4E6B-A49A-6409B2059EAA}", + "details": { + "name": "EntityID", + "tooltip": "The element being prepared" + } + }, + { + "typeid": "{72039442-EB38-4D42-A1AD-CB68F7E0EEF6}", + "details": { + "name": "Section Index", + "tooltip": "The index of the section that is being prepared" + } + }, + { + "typeid": "{72039442-EB38-4D42-A1AD-CB68F7E0EEF6}", + "details": { + "name": "Element Index", + "tooltip": "The index of the child that is being prepared" + } + } + ] + }, + { + "base": "OnSectionHeaderBecomingVisible", + "details": { + "name": "On Section Header Becoming Visible", + "tooltip": "Executes when a header is about to become visible. Used to populate the header with data for display. Used with lists that are divided into sections" + }, + "params": [ + { + "typeid": "{6383F1D3-BB27-4E6B-A49A-6409B2059EAA}", + "details": { + "name": "EntityID", + "tooltip": "The header element becoming visible" + } + }, + { + "typeid": "{72039442-EB38-4D42-A1AD-CB68F7E0EEF6}", + "details": { + "name": "Section Index", + "tooltip": "The index of the section that contains the header" + } + } + ] + }, + { + "base": "OnPrepareSectionHeaderForSizeCalculation", + "details": { + "name": "On Prepare Section Header For Size Calculation", + "tooltip": "Executes when headers have variable sizes and are set to auto calculate. Used with lists that are divided into sections" + }, + "params": [ + { + "typeid": "{6383F1D3-BB27-4E6B-A49A-6409B2059EAA}", + "details": { + "name": "EntityID", + "tooltip": "The element being prepared" + } + }, + { + "typeid": "{72039442-EB38-4D42-A1AD-CB68F7E0EEF6}", + "details": { + "name": "Section Index", + "tooltip": "The index of the section that is being prepared" + } + } + ] + } + ] + } + ] +} \ No newline at end of file diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/EBus/Handlers/UiFaderNotificationBus.names b/Gems/ScriptCanvas/Assets/TranslationAssets/EBus/Handlers/UiFaderNotificationBus.names new file mode 100644 index 0000000000..b6ad05a4e5 --- /dev/null +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/EBus/Handlers/UiFaderNotificationBus.names @@ -0,0 +1,36 @@ +{ + "entries": [ + { + "base": "UiFaderNotificationBus", + "context": "EBusHandler", + "variant": "", + "details": { + "name": "UI Fader", + "category": "UI" + }, + "methods": [ + { + "base": "OnFadeComplete", + "details": { + "name": "On Fade Complete", + "tooltip": "Executes when the fade is done" + } + }, + { + "base": "OnFadeInterrupted", + "details": { + "name": "On Fade Interrupted", + "tooltip": "Executes when the fade has been interrupted" + } + }, + { + "base": "OnFaderDestroyed", + "details": { + "name": "On Fader Destroyed", + "tooltip": "Executes when the fader component has been destroyed" + } + } + ] + } + ] +} \ No newline at end of file diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/EBus/Handlers/UiFlipbookAnimationNotificationsBus.names b/Gems/ScriptCanvas/Assets/TranslationAssets/EBus/Handlers/UiFlipbookAnimationNotificationsBus.names new file mode 100644 index 0000000000..8446eb9b12 --- /dev/null +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/EBus/Handlers/UiFlipbookAnimationNotificationsBus.names @@ -0,0 +1,36 @@ +{ + "entries": [ + { + "base": "UiFlipbookAnimationNotificationsBus", + "context": "EBusHandler", + "variant": "", + "details": { + "name": "UI Flipbook Animation", + "category": "UI" + }, + "methods": [ + { + "base": "OnAnimationStarted", + "details": { + "name": "On Animation Started", + "tooltip": "Executes when the flipbook animation has begun playing" + } + }, + { + "base": "OnAnimationStopped", + "details": { + "name": "On Animation Stopped", + "tooltip": "Executes when the flipbook animation has stopped playing" + } + }, + { + "base": "OnLoopSequenceCompleted", + "details": { + "name": "On Loop Sequence Completed", + "tooltip": "Executes when the flipbook animation has completed one loop iteration. This triggers only when the \"Loop Type\" of the flipbook animation is configured to anything other than \"None\".\n\nFor \"Linear\" loops, this triggers when \"End Frame\" is displayed.\n\nFor \"Ping Pong\" loops, this triggers when either \"Start Frame\" or \"End Frame\" is displayed (depending on the current loop direction of the loop)" + } + } + ] + } + ] +} \ No newline at end of file diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/EBus/Handlers/UiInitializationBus.names b/Gems/ScriptCanvas/Assets/TranslationAssets/EBus/Handlers/UiInitializationBus.names new file mode 100644 index 0000000000..074d8dd7b9 --- /dev/null +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/EBus/Handlers/UiInitializationBus.names @@ -0,0 +1,22 @@ +{ + "entries": [ + { + "base": "UiInitializationBus", + "context": "EBusHandler", + "variant": "", + "details": { + "name": "UI Initialization", + "category": "UI" + }, + "methods": [ + { + "base": "InGamePostActivate", + "details": { + "name": "In-game Post-activate", + "tooltip": "Executes after all loaded UI elements have been activated and their parent and canvas references fixed-up" + } + } + ] + } + ] +} \ No newline at end of file diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/EBus/Handlers/UiInteractableNotificationBus.names b/Gems/ScriptCanvas/Assets/TranslationAssets/EBus/Handlers/UiInteractableNotificationBus.names new file mode 100644 index 0000000000..635630c1b0 --- /dev/null +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/EBus/Handlers/UiInteractableNotificationBus.names @@ -0,0 +1,59 @@ +{ + "entries": [ + { + "base": "UiInteractableNotificationBus", + "context": "EBusHandler", + "variant": "", + "details": { + "name": "UI Interactable", + "category": "UI" + }, + "methods": [ + { + "base": "OnHoverStart", + "details": { + "name": "On Hover Start", + "tooltip": "Executes when the interactive element starts being hovered" + } + }, + { + "base": "OnHoverEnd", + "details": { + "name": "On Hover End", + "tooltip": "Executes when the interactive element ends being hovered" + } + }, + { + "base": "OnPressed", + "details": { + "name": "On Pressed", + "tooltip": "Executes when the interactive element has been pressed" + } + }, + { + "base": "OnReleased", + "details": { + "name": "On Released", + "tooltip": "Executes when the interactive element has been released" + } + }, + { + "base": "OnReceivedHoverByNavigatingFromDescendant", + "details": { + "name": "On Received Hover By Navigating From Descendant", + "tooltip": "Executes when the interactive element receives the hover by being navigated to from a descendant" + }, + "params": [ + { + "typeid": "{6383F1D3-BB27-4E6B-A49A-6409B2059EAA}", + "details": { + "name": "Descendant EntityID", + "tooltip": "The descendant element" + } + } + ] + } + ] + } + ] +} \ No newline at end of file diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/EBus/Handlers/UiMarkupButtonNotificationsBus.names b/Gems/ScriptCanvas/Assets/TranslationAssets/EBus/Handlers/UiMarkupButtonNotificationsBus.names new file mode 100644 index 0000000000..6d3b96553c --- /dev/null +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/EBus/Handlers/UiMarkupButtonNotificationsBus.names @@ -0,0 +1,165 @@ +{ + "entries": [ + { + "base": "UiMarkupButtonNotificationsBus", + "context": "EBusHandler", + "variant": "", + "details": { + "name": "UI Markup Button", + "category": "UI" + }, + "methods": [ + { + "base": "OnHoverStart", + "details": { + "name": "On Hover Start", + "tooltip": "Executes when the button has become hovered" + }, + "params": [ + { + "typeid": "{72039442-EB38-4D42-A1AD-CB68F7E0EEF6}", + "details": { + "name": "ID", + "tooltip": "The markup ID of the clickable text" + } + }, + { + "typeid": "{03AAAB3F-5C47-5A66-9EBC-D5FA4DB353C9}", + "details": { + "name": "Action", + "tooltip": "The action string of the clickable text" + } + }, + { + "typeid": "{03AAAB3F-5C47-5A66-9EBC-D5FA4DB353C9}", + "details": { + "name": "Data", + "tooltip": "The data string of the clickable text" + } + } + ] + }, + { + "base": "OnHoverEnd", + "details": { + "name": "On Hover End", + "tooltip": "Executes when the button is no longer hovered" + }, + "params": [ + { + "typeid": "{72039442-EB38-4D42-A1AD-CB68F7E0EEF6}", + "details": { + "name": "ID", + "tooltip": "The markup ID of the clickable text" + } + }, + { + "typeid": "{03AAAB3F-5C47-5A66-9EBC-D5FA4DB353C9}", + "details": { + "name": "Action", + "tooltip": "The action string of the clickable text" + } + }, + { + "typeid": "{03AAAB3F-5C47-5A66-9EBC-D5FA4DB353C9}", + "details": { + "name": "Data", + "tooltip": "The data string of the clickable text" + } + } + ] + }, + { + "base": "OnPressed", + "details": { + "name": "On Pressed", + "tooltip": "Executes when the button receives a press event" + }, + "params": [ + { + "typeid": "{72039442-EB38-4D42-A1AD-CB68F7E0EEF6}", + "details": { + "name": "ID", + "tooltip": "The markup ID of the clickable text" + } + }, + { + "typeid": "{03AAAB3F-5C47-5A66-9EBC-D5FA4DB353C9}", + "details": { + "name": "Action", + "tooltip": "The action string of the clickable text" + } + }, + { + "typeid": "{03AAAB3F-5C47-5A66-9EBC-D5FA4DB353C9}", + "details": { + "name": "Data", + "tooltip": "The data string of the clickable text" + } + } + ] + }, + { + "base": "OnReleased", + "details": { + "name": "On Released", + "tooltip": "Executes when the button receives a release event" + }, + "params": [ + { + "typeid": "{72039442-EB38-4D42-A1AD-CB68F7E0EEF6}", + "details": { + "name": "ID", + "tooltip": "The markup ID of the clickable text" + } + }, + { + "typeid": "{03AAAB3F-5C47-5A66-9EBC-D5FA4DB353C9}", + "details": { + "name": "Action", + "tooltip": "The action string of the clickable text" + } + }, + { + "typeid": "{03AAAB3F-5C47-5A66-9EBC-D5FA4DB353C9}", + "details": { + "name": "Data", + "tooltip": "The data string of the clickable text" + } + } + ] + }, + { + "base": "OnClick", + "details": { + "name": "On Click", + "tooltip": "Executes when the button is clicked (a release on the button following a press on the button)" + }, + "params": [ + { + "typeid": "{72039442-EB38-4D42-A1AD-CB68F7E0EEF6}", + "details": { + "name": "ID", + "tooltip": "The markup ID of the clickable text" + } + }, + { + "typeid": "{03AAAB3F-5C47-5A66-9EBC-D5FA4DB353C9}", + "details": { + "name": "Action", + "tooltip": "The action string of the clickable text" + } + }, + { + "typeid": "{03AAAB3F-5C47-5A66-9EBC-D5FA4DB353C9}", + "details": { + "name": "Data", + "tooltip": "The data string of the clickable text" + } + } + ] + } + ] + } + ] +} \ No newline at end of file diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/EBus/Handlers/UiRadioButtonGroupNotificationBus.names b/Gems/ScriptCanvas/Assets/TranslationAssets/EBus/Handlers/UiRadioButtonGroupNotificationBus.names new file mode 100644 index 0000000000..7104cc3079 --- /dev/null +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/EBus/Handlers/UiRadioButtonGroupNotificationBus.names @@ -0,0 +1,30 @@ +{ + "entries": [ + { + "base": "UiRadioButtonGroupNotificationBus", + "context": "EBusHandler", + "variant": "", + "details": { + "name": "Ui Radio Button Group", + "category": "UI" + }, + "methods": [ + { + "base": "OnRadioButtonGroupStateChange", + "details": { + "name": "On Radio Button Group State Change" + }, + "params": [ + { + "typeid": "{6383F1D3-BB27-4E6B-A49A-6409B2059EAA}", + "details": { + "name": "Entity Id", + "tooltip": "Entity Unique Id" + } + } + ] + } + ] + } + ] +} \ No newline at end of file diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/EBus/Handlers/UiRadioButtonNotificationBus.names b/Gems/ScriptCanvas/Assets/TranslationAssets/EBus/Handlers/UiRadioButtonNotificationBus.names new file mode 100644 index 0000000000..df18c13d58 --- /dev/null +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/EBus/Handlers/UiRadioButtonNotificationBus.names @@ -0,0 +1,29 @@ +{ + "entries": [ + { + "base": "UiRadioButtonNotificationBus", + "context": "EBusHandler", + "variant": "", + "details": { + "name": "Ui Radio Button", + "category": "UI" + }, + "methods": [ + { + "base": "OnRadioButtonStateChange", + "details": { + "name": "On Radio Button State Change" + }, + "params": [ + { + "typeid": "{A0CA880C-AFE4-43CB-926C-59AC48496112}", + "details": { + "name": "Checked" + } + } + ] + } + ] + } + ] +} \ No newline at end of file diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/EBus/Handlers/UiScrollBoxNotificationBus.names b/Gems/ScriptCanvas/Assets/TranslationAssets/EBus/Handlers/UiScrollBoxNotificationBus.names new file mode 100644 index 0000000000..9e8a042255 --- /dev/null +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/EBus/Handlers/UiScrollBoxNotificationBus.names @@ -0,0 +1,47 @@ +{ + "entries": [ + { + "base": "UiScrollBoxNotificationBus", + "context": "EBusHandler", + "variant": "", + "details": { + "name": "UI Scroll Box", + "category": "UI" + }, + "methods": [ + { + "base": "OnScrollOffsetChanging", + "details": { + "name": "On Scroll Offset Changing", + "tooltip": "Executes when the scroll offset is changing" + }, + "params": [ + { + "typeid": "{3D80F623-C85C-4741-90D0-E4E66164E6BF}", + "details": { + "name": "Scroll Offset", + "tooltip": "The new scroll offset" + } + } + ] + }, + { + "base": "OnScrollOffsetChanged", + "details": { + "name": "On Scroll Offset Changed", + "tooltip": "Executes when the scroll offset has changed" + }, + "params": [ + { + "typeid": "{3D80F623-C85C-4741-90D0-E4E66164E6BF}", + "details": { + "name": "Scroll Offset", + "tooltip": "The new scroll offset" + } + } + ] + } + ] + } + ] +} \ No newline at end of file diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/EBus/Handlers/UiScrollableNotificationBus.names b/Gems/ScriptCanvas/Assets/TranslationAssets/EBus/Handlers/UiScrollableNotificationBus.names new file mode 100644 index 0000000000..7c4092175c --- /dev/null +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/EBus/Handlers/UiScrollableNotificationBus.names @@ -0,0 +1,47 @@ +{ + "entries": [ + { + "base": "UiScrollableNotificationBus", + "context": "EBusHandler", + "variant": "", + "details": { + "name": "UI Scrollable", + "category": "UI" + }, + "methods": [ + { + "base": "OnScrollableValueChanging", + "details": { + "name": "On Scrollable Value Changing", + "tooltip": "Executes when the scroll value is changing" + }, + "params": [ + { + "typeid": "{3D80F623-C85C-4741-90D0-E4E66164E6BF}", + "details": { + "name": "Scroll Value", + "tooltip": "The new scroll value [0-1]" + } + } + ] + }, + { + "base": "OnScrollableValueChanged", + "details": { + "name": "On Scrollable Value Changed", + "tooltip": "Executes when the scroll value has changed" + }, + "params": [ + { + "typeid": "{3D80F623-C85C-4741-90D0-E4E66164E6BF}", + "details": { + "name": "Scroll Value", + "tooltip": "The new scroll value [0-1]" + } + } + ] + } + ] + } + ] +} \ No newline at end of file diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/EBus/Handlers/UiScrollerNotificationBus.names b/Gems/ScriptCanvas/Assets/TranslationAssets/EBus/Handlers/UiScrollerNotificationBus.names new file mode 100644 index 0000000000..fc5e701451 --- /dev/null +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/EBus/Handlers/UiScrollerNotificationBus.names @@ -0,0 +1,47 @@ +{ + "entries": [ + { + "base": "UiScrollerNotificationBus", + "context": "EBusHandler", + "variant": "", + "details": { + "name": "UI Scroller", + "category": "UI" + }, + "methods": [ + { + "base": "OnScrollerValueChanging", + "details": { + "name": "On Scroller Value Changing", + "tooltip": "Executes when the scroller value is changing" + }, + "params": [ + { + "typeid": "{EA2C3E90-AFBE-44D4-A90D-FAAF79BAF93D}", + "details": { + "name": "Scroller Value", + "tooltip": "The new scroller value [0-1]" + } + } + ] + }, + { + "base": "OnScrollerValueChanged", + "details": { + "name": "On Scroller Value Changed", + "tooltip": "Executes when the scroller value has changed" + }, + "params": [ + { + "typeid": "{EA2C3E90-AFBE-44D4-A90D-FAAF79BAF93D}", + "details": { + "name": "Scroller Value", + "tooltip": "The new scroller value [0-1]" + } + } + ] + } + ] + } + ] +} \ No newline at end of file diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/EBus/Handlers/UiSliderNotificationBus.names b/Gems/ScriptCanvas/Assets/TranslationAssets/EBus/Handlers/UiSliderNotificationBus.names new file mode 100644 index 0000000000..770ca8d183 --- /dev/null +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/EBus/Handlers/UiSliderNotificationBus.names @@ -0,0 +1,47 @@ +{ + "entries": [ + { + "base": "UiSliderNotificationBus", + "context": "EBusHandler", + "variant": "", + "details": { + "name": "UI Slider", + "category": "UI" + }, + "methods": [ + { + "base": "OnSliderValueChanging", + "details": { + "name": "On Slider Value Changing", + "tooltip": "Executes when the slider value is changing" + }, + "params": [ + { + "typeid": "{EA2C3E90-AFBE-44D4-A90D-FAAF79BAF93D}", + "details": { + "name": "Slider Value", + "tooltip": "The new slider value" + } + } + ] + }, + { + "base": "OnSliderValueChanged", + "details": { + "name": "On Slider Value Changed", + "tooltip": "Executes when the slider value has finished changing" + }, + "params": [ + { + "typeid": "{EA2C3E90-AFBE-44D4-A90D-FAAF79BAF93D}", + "details": { + "name": "Slider Value", + "tooltip": "The new slider value" + } + } + ] + } + ] + } + ] +} \ No newline at end of file diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/EBus/Handlers/UiSpawnerNotificationBus.names b/Gems/ScriptCanvas/Assets/TranslationAssets/EBus/Handlers/UiSpawnerNotificationBus.names new file mode 100644 index 0000000000..e78828f936 --- /dev/null +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/EBus/Handlers/UiSpawnerNotificationBus.names @@ -0,0 +1,132 @@ +{ + "entries": [ + { + "base": "UiSpawnerNotificationBus", + "context": "EBusHandler", + "variant": "", + "details": { + "name": "UI Spawner", + "category": "UI" + }, + "methods": [ + { + "base": "OnSpawnBegin", + "details": { + "name": "On Spawn Begin", + "tooltip": "Executes when the slice has been spawned, but entities have not yet been activated. \"On Entity Spawned\" events are about to be dispatched" + }, + "params": [ + { + "typeid": "{E6E7C0C5-07C9-44BB-A38C-930431948667}", + "details": { + "name": "Slice Instantiation Ticket", + "tooltip": "The slice instantiation ticket. These can be compared in order to know which spawn request it relates to" + } + } + ] + }, + { + "base": "OnEntitySpawned", + "details": { + "name": "On Entity Spawned", + "tooltip": "Executes when an entity has been created during a spawn. Called once for each entity created while spawning a slice" + }, + "params": [ + { + "typeid": "{E6E7C0C5-07C9-44BB-A38C-930431948667}", + "details": { + "name": "Slice Instantiation Ticket", + "tooltip": "The slice instantiation ticket. These can be compared in order to know which spawn request it relates to" + } + }, + { + "typeid": "{6383F1D3-BB27-4E6B-A49A-6409B2059EAA}", + "details": { + "name": "Spawned EntityID", + "tooltip": "The spawned entity" + } + } + ] + }, + { + "base": "OnEntitiesSpawned", + "details": { + "name": "On Entities Spawned", + "tooltip": "Executes when all entities have been created during a spawn.\n\nCalled only once for each spawn request. Called after the \"On Entity Spawned\" calls and before the \"On Spawn End\" call" + }, + "params": [ + { + "typeid": "{E6E7C0C5-07C9-44BB-A38C-930431948667}", + "details": { + "name": "Slice Instantiation Ticket", + "tooltip": "The slice instantiation ticket. These can be compared in order to know which spawn request it relates to" + } + }, + { + "typeid": "{4841CFF0-7A5C-519C-BD16-D3625E99605E}", + "details": { + "name": "Spawned EntityIDs", + "tooltip": "A list of all entities that were created during the spawn" + } + } + ] + }, + { + "base": "OnTopLevelEntitiesSpawned", + "details": { + "name": "On Top Level Entities Spawned", + "tooltip": "Executes when all top-level entities have been created during the spawn.\n\nTop-level entities are entities that do not have any parent within the slice. Typically, there is only one top-level entity for each slice.\n\nCalled only once for each spawn request. Called after the \"On Entity Spawned\" calls and before the \"On Spawn End\" call" + }, + "params": [ + { + "typeid": "{E6E7C0C5-07C9-44BB-A38C-930431948667}", + "details": { + "name": "Slice Instantiation Ticket", + "tooltip": "The slice instantiation ticket. These can be compared in order to know which spawn request it relates to" + } + }, + { + "typeid": "{4841CFF0-7A5C-519C-BD16-D3625E99605E}", + "details": { + "name": "Spawned EntityIDs", + "tooltip": "A list of all top-level entities that were created during the spawn" + } + } + ] + }, + { + "base": "OnSpawnEnd", + "details": { + "name": "On Spawn End", + "tooltip": "Executes when a slice has been spawned. Called once for each spawn request. All \"On Entity Spawned\" events have been dispatched" + }, + "params": [ + { + "typeid": "{E6E7C0C5-07C9-44BB-A38C-930431948667}", + "details": { + "name": "Slice Instantiation Ticket", + "tooltip": "The slice instantiation ticket. These can be compared in order to know which spawn request it relates to" + } + } + ] + }, + { + "base": "OnSpawnFailed", + "details": { + "name": "On Spawn Failed", + "tooltip": "Executes when a spawn request has failed" + }, + "params": [ + { + "typeid": "{E6E7C0C5-07C9-44BB-A38C-930431948667}", + "details": { + "name": "Slice Instantiation Ticket", + "tooltip": "The slice instantiation ticket. These can be compared in order to know which spawn request it relates to" + } + } + ] + } + ] + } + ] +} \ No newline at end of file diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/EBus/Handlers/UiTextInputNotificationBus.names b/Gems/ScriptCanvas/Assets/TranslationAssets/EBus/Handlers/UiTextInputNotificationBus.names new file mode 100644 index 0000000000..b5ad552ef1 --- /dev/null +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/EBus/Handlers/UiTextInputNotificationBus.names @@ -0,0 +1,63 @@ +{ + "entries": [ + { + "base": "UiTextInputNotificationBus", + "context": "EBusHandler", + "variant": "", + "details": { + "name": "UI Text Input", + "category": "UI" + }, + "methods": [ + { + "base": "OnTextInputChange", + "details": { + "name": "On Text Input Change", + "tooltip": "Executes when a character is added, removed, or changed" + }, + "params": [ + { + "typeid": "{03AAAB3F-5C47-5A66-9EBC-D5FA4DB353C9}", + "details": { + "name": "Text", + "tooltip": "The new text string" + } + } + ] + }, + { + "base": "OnTextInputEndEdit", + "details": { + "name": "On Text Input End Edit", + "tooltip": "Executes when edit of text is completed" + }, + "params": [ + { + "typeid": "{03AAAB3F-5C47-5A66-9EBC-D5FA4DB353C9}", + "details": { + "name": "Text", + "tooltip": "The text string" + } + } + ] + }, + { + "base": "OnTextInputEnter", + "details": { + "name": "On Text Input Enter", + "tooltip": "Executes when \"Enter\" is pressed on the keyboard" + }, + "params": [ + { + "typeid": "{03AAAB3F-5C47-5A66-9EBC-D5FA4DB353C9}", + "details": { + "name": "Text", + "tooltip": "The text string" + } + } + ] + } + ] + } + ] +} \ No newline at end of file diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/EBus/Handlers/VariableNotification.names b/Gems/ScriptCanvas/Assets/TranslationAssets/EBus/Handlers/VariableNotification.names new file mode 100644 index 0000000000..3ef35b24b7 --- /dev/null +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/EBus/Handlers/VariableNotification.names @@ -0,0 +1,22 @@ +{ + "entries": [ + { + "base": "VariableNotification", + "context": "EBusHandler", + "variant": "", + "details": { + "name": "Variable Notification", + "category": "Variables", + "tooltip": "Notifications from the Variables in the current Script Canvas graph" + }, + "methods": [ + { + "base": "OnVariableValueChanged", + "details": { + "name": "On Variable Value Changed" + } + } + ] + } + ] +} \ No newline at end of file diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/EBus/Handlers/ViewPaneCallbackBus.names b/Gems/ScriptCanvas/Assets/TranslationAssets/EBus/Handlers/ViewPaneCallbackBus.names new file mode 100644 index 0000000000..45bbf4cbc9 --- /dev/null +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/EBus/Handlers/ViewPaneCallbackBus.names @@ -0,0 +1,28 @@ +{ + "entries": [ + { + "base": "ViewPaneCallbackBus", + "context": "EBusHandler", + "variant": "", + "details": { + "name": "ViewPaneCallbackBus" + }, + "methods": [ + { + "base": "CreateViewPaneWidget", + "details": { + "name": "CreateViewPaneWidget" + }, + "results": [ + { + "typeid": "{D6597933-47CD-4FC8-B911-63F3E2B0993A}", + "details": { + "name": "AZ::u64" + } + } + ] + } + ] + } + ] +} \ No newline at end of file diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/EBus/Senders/AWSCognitoAuthorizationRequestBus.names b/Gems/ScriptCanvas/Assets/TranslationAssets/EBus/Senders/AWSCognitoAuthorizationRequestBus.names new file mode 100644 index 0000000000..3b01bcc40b --- /dev/null +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/EBus/Senders/AWSCognitoAuthorizationRequestBus.names @@ -0,0 +1,109 @@ +{ + "entries": [ + { + "base": "AWSCognitoAuthorizationRequestBus", + "context": "EBusSender", + "variant": "", + "details": { + "name": "AWS Cognito Authorization", + "category": "AWS Client Auth" + }, + "methods": [ + { + "base": "Reset", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Reset" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Reset is invoked" + }, + "details": { + "name": "Reset" + } + }, + { + "base": "GetIdentityId", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke GetIdentityId" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after GetIdentityId is invoked" + }, + "details": { + "name": "Get Identity Id" + }, + "results": [ + { + "typeid": "{03AAAB3F-5C47-5A66-9EBC-D5FA4DB353C9}", + "details": { + "name": "Identity" + } + } + ] + }, + { + "base": "HasPersistedLogins", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke HasPersistedLogins" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after HasPersistedLogins is invoked" + }, + "details": { + "name": "Has Persisted Logins" + }, + "results": [ + { + "typeid": "{A0CA880C-AFE4-43CB-926C-59AC48496112}", + "details": { + "name": "Has Persisted Logins" + } + } + ] + }, + { + "base": "Initialize", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Initialize" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Initialize is invoked" + }, + "details": { + "name": "Initialize" + }, + "results": [ + { + "typeid": "{A0CA880C-AFE4-43CB-926C-59AC48496112}", + "details": { + "name": "Initialized" + } + } + ] + }, + { + "base": "RequestAWSCredentialsAsync", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke RequestAWSCredentialsAsync" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after RequestAWSCredentialsAsync is invoked" + }, + "details": { + "name": "Request AWS Credentials Async" + } + } + ] + } + ] +} \ No newline at end of file diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/EBus/Senders/AWSCognitoUserManagementRequestBus.names b/Gems/ScriptCanvas/Assets/TranslationAssets/EBus/Senders/AWSCognitoUserManagementRequestBus.names new file mode 100644 index 0000000000..1c1cab22fd --- /dev/null +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/EBus/Senders/AWSCognitoUserManagementRequestBus.names @@ -0,0 +1,224 @@ +{ + "entries": [ + { + "base": "AWSCognitoUserManagementRequestBus", + "context": "EBusSender", + "variant": "", + "details": { + "name": "AWS Cognito User Management", + "category": "AWS Client Auth" + }, + "methods": [ + { + "base": "EnableMFAAsync", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Enable MFA Async" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Enable MFA Async is invoked" + }, + "details": { + "name": "Enable MFA Async" + }, + "params": [ + { + "typeid": "{03AAAB3F-5C47-5A66-9EBC-D5FA4DB353C9}", + "details": { + "name": "Access token", + "tooltip": "The MFA access token" + } + } + ] + }, + { + "base": "ConfirmSignUpAsync", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Confirm Sign Up Async" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Confirm Sign Up Async is invoked" + }, + "details": { + "name": "Confirm Sign Up Async" + }, + "params": [ + { + "typeid": "{03AAAB3F-5C47-5A66-9EBC-D5FA4DB353C9}", + "details": { + "name": "Username", + "tooltip": "The client's username" + } + }, + { + "typeid": "{03AAAB3F-5C47-5A66-9EBC-D5FA4DB353C9}", + "details": { + "name": "Confirmation code", + "tooltip": "The client's confirmation code" + } + } + ] + }, + { + "base": "PhoneSignUpAsync", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Phone Sign Up Async" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Phone Sign Up Async is invoked" + }, + "details": { + "name": "Phone Sign Up Async" + }, + "params": [ + { + "typeid": "{03AAAB3F-5C47-5A66-9EBC-D5FA4DB353C9}", + "details": { + "name": "Username", + "tooltip": "The client's username" + } + }, + { + "typeid": "{03AAAB3F-5C47-5A66-9EBC-D5FA4DB353C9}", + "details": { + "name": "Password", + "tooltip": "The client's password" + } + }, + { + "typeid": "{03AAAB3F-5C47-5A66-9EBC-D5FA4DB353C9}", + "details": { + "name": "Phone number", + "tooltip": "The phone number used to sign up" + } + } + ] + }, + { + "base": "EmailSignUpAsync", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Email Sign Up Async" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Email Sign Up Async is invoked" + }, + "details": { + "name": "Email Sign Up Async" + }, + "params": [ + { + "typeid": "{03AAAB3F-5C47-5A66-9EBC-D5FA4DB353C9}", + "details": { + "name": "Username", + "tooltip": "The client's username" + } + }, + { + "typeid": "{03AAAB3F-5C47-5A66-9EBC-D5FA4DB353C9}", + "details": { + "name": "Password", + "tooltip": "The client's password" + } + }, + { + "typeid": "{03AAAB3F-5C47-5A66-9EBC-D5FA4DB353C9}", + "details": { + "name": "Email", + "tooltip": "The email address used to sign up" + } + } + ] + }, + { + "base": "ConfirmForgotPasswordAsync", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Confirm Forgot Password Async" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Confirm Forgot Password Async is invoked" + }, + "details": { + "name": "Confirm Forgot Password Async" + }, + "params": [ + { + "typeid": "{03AAAB3F-5C47-5A66-9EBC-D5FA4DB353C9}", + "details": { + "name": "Username", + "tooltip": "The client's username" + } + }, + { + "typeid": "{03AAAB3F-5C47-5A66-9EBC-D5FA4DB353C9}", + "details": { + "name": "Confirmation code", + "tooltip": "The client's confirmation code" + } + }, + { + "typeid": "{03AAAB3F-5C47-5A66-9EBC-D5FA4DB353C9}", + "details": { + "name": "New password", + "tooltip": "The new password for the client" + } + } + ] + }, + { + "base": "Initialize", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Initialize" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Initialize is invoked" + }, + "details": { + "name": "Initialize" + }, + "results": [ + { + "typeid": "{A0CA880C-AFE4-43CB-926C-59AC48496112}", + "details": { + "name": "Initialized" + } + } + ] + }, + { + "base": "ForgotPasswordAsync", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Forgot Password Async" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Forgot Password Async is invoked" + }, + "details": { + "name": "Forgot Password Async" + }, + "params": [ + { + "typeid": "{03AAAB3F-5C47-5A66-9EBC-D5FA4DB353C9}", + "details": { + "name": "Username", + "tooltip": "The client's username" + } + } + ] + } + ] + } + ] +} \ No newline at end of file diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/EBus/Senders/AWSGameLiftRequestBus.names b/Gems/ScriptCanvas/Assets/TranslationAssets/EBus/Senders/AWSGameLiftRequestBus.names new file mode 100644 index 0000000000..3e32cecee8 --- /dev/null +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/EBus/Senders/AWSGameLiftRequestBus.names @@ -0,0 +1,81 @@ +{ + "entries": [ + { + "base": "AWSGameLiftRequestBus", + "context": "EBusSender", + "variant": "", + "details": { + "name": "Requests", + "category": "AWS Game Lift" + }, + "methods": [ + { + "base": "ConfigureGameLiftClient", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Configure Game Lift Client" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Configure Game Lift Client is invoked" + }, + "details": { + "name": "Configure Game Lift Client" + }, + "params": [ + { + "typeid": "{03AAAB3F-5C47-5A66-9EBC-D5FA4DB353C9}", + "details": { + "name": "Region" + } + } + ], + "results": [ + { + "typeid": "{A0CA880C-AFE4-43CB-926C-59AC48496112}", + "details": { + "name": "Result" + } + } + ] + }, + { + "base": "CreatePlayerId", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Create Player Id" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Create Player Id is invoked" + }, + "details": { + "name": "Create Player Id" + }, + "params": [ + { + "typeid": "{A0CA880C-AFE4-43CB-926C-59AC48496112}", + "details": { + "name": "Include Brackets" + } + }, + { + "typeid": "{A0CA880C-AFE4-43CB-926C-59AC48496112}", + "details": { + "name": "Include Dashes" + } + } + ], + "results": [ + { + "typeid": "{03AAAB3F-5C47-5A66-9EBC-D5FA4DB353C9}", + "details": { + "name": "Player Id" + } + } + ] + } + ] + } + ] +} \ No newline at end of file diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/EBus/Senders/AWSMetricsRequestBus.names b/Gems/ScriptCanvas/Assets/TranslationAssets/EBus/Senders/AWSMetricsRequestBus.names new file mode 100644 index 0000000000..99df5e2d5e --- /dev/null +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/EBus/Senders/AWSMetricsRequestBus.names @@ -0,0 +1,81 @@ +{ + "entries": [ + { + "base": "AWSMetricsRequestBus", + "context": "EBusSender", + "variant": "", + "details": { + "name": "Metrics", + "category": "AWS Metrics" + }, + "methods": [ + { + "base": "SubmitMetrics", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke SubmitMetrics" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after SubmitMetrics is invoked" + }, + "details": { + "name": "Submit Metrics" + }, + "params": [ + { + "typeid": "{1C1ABE6D-94D2-5CFD-A502-8813300FEC8D}", + "details": { + "name": "Metrics Attributes list", + "tooltip": "The list of metrics attributes to submit." + } + }, + { + "typeid": "{72039442-EB38-4D42-A1AD-CB68F7E0EEF6}", + "details": { + "name": "Event priority", + "tooltip": "Priority of the event. Defaults to 0, which is highest priority." + } + }, + { + "typeid": "{03AAAB3F-5C47-5A66-9EBC-D5FA4DB353C9}", + "details": { + "name": "Event source override", + "tooltip": "Event source used to override the default, 'AWSMetricGem'." + } + }, + { + "typeid": "{A0CA880C-AFE4-43CB-926C-59AC48496112}", + "details": { + "name": "Buffer metrics", + "tooltip": "Whether to buffer metrics and send them in a batch." + } + } + ], + "results": [ + { + "typeid": "{A0CA880C-AFE4-43CB-926C-59AC48496112}", + "details": { + "name": "Success" + } + } + ] + }, + { + "base": "FlushMetrics", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke FlushMetrics" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after FlushMetrics is invoked" + }, + "details": { + "name": "Flush Metrics" + } + } + ] + } + ] +} \ No newline at end of file diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/EBus/Senders/AWSResourceMappingRequestBus.names b/Gems/ScriptCanvas/Assets/TranslationAssets/EBus/Senders/AWSResourceMappingRequestBus.names new file mode 100644 index 0000000000..4bda3ef0ff --- /dev/null +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/EBus/Senders/AWSResourceMappingRequestBus.names @@ -0,0 +1,206 @@ +{ + "entries": [ + { + "base": "AWSResourceMappingRequestBus", + "context": "EBusSender", + "variant": "", + "details": { + "name": "AWS Resource Mapping", + "category": "AWS Core" + }, + "methods": [ + { + "base": "GetResourceNameId", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Get Resource Name Id" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Get Resource Name Id is invoked" + }, + "details": { + "name": "Get Resource Name Id" + }, + "params": [ + { + "typeid": "{03AAAB3F-5C47-5A66-9EBC-D5FA4DB353C9}", + "details": { + "name": "Resource Key Name", + "tooltip": "Resource mapping key name is used to identify individual resource attributes." + } + } + ], + "results": [ + { + "typeid": "{03AAAB3F-5C47-5A66-9EBC-D5FA4DB353C9}", + "details": { + "name": "Name / Id" + } + } + ] + }, + { + "base": "GetResourceRegion", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Get Resource Region" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Get Resource Region is invoked" + }, + "details": { + "name": "Get Resource Region" + }, + "params": [ + { + "typeid": "{03AAAB3F-5C47-5A66-9EBC-D5FA4DB353C9}", + "details": { + "name": "Resource Key Name", + "tooltip": "Resource mapping key name is used to identify individual resource attributes." + } + } + ], + "results": [ + { + "typeid": "{03AAAB3F-5C47-5A66-9EBC-D5FA4DB353C9}", + "details": { + "name": "Region" + } + } + ] + }, + { + "base": "GetDefaultRegion", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Get Default Region" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Get Default Region is invoked" + }, + "details": { + "name": "Get Default Region" + }, + "results": [ + { + "typeid": "{03AAAB3F-5C47-5A66-9EBC-D5FA4DB353C9}", + "details": { + "name": "Region" + } + } + ] + }, + { + "base": "GetDefaultAccountId", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Get Default Account Id" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Get Default Account Id is invoked" + }, + "details": { + "name": "Get Default Account Id" + }, + "results": [ + { + "typeid": "{03AAAB3F-5C47-5A66-9EBC-D5FA4DB353C9}", + "details": { + "name": "Default Account Id" + } + } + ] + }, + { + "base": "GetResourceAccountId", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Get Resource Account Id" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Get Resource Account Id is invoked" + }, + "details": { + "name": "Get Resource Account Id" + }, + "params": [ + { + "typeid": "{03AAAB3F-5C47-5A66-9EBC-D5FA4DB353C9}", + "details": { + "name": "Resource Key Name", + "tooltip": "Resource mapping key name is used to identify individual resource attributes." + } + } + ], + "results": [ + { + "typeid": "{03AAAB3F-5C47-5A66-9EBC-D5FA4DB353C9}", + "details": { + "name": "Resource Account Id" + } + } + ] + }, + { + "base": "GetResourceType", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Get Resource Type" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Get Resource Type is invoked" + }, + "details": { + "name": "Get Resource Type" + }, + "params": [ + { + "typeid": "{03AAAB3F-5C47-5A66-9EBC-D5FA4DB353C9}", + "details": { + "name": "Resource Key Name", + "tooltip": "Resource mapping key name is used to identify individual resource attributes." + } + } + ], + "results": [ + { + "typeid": "{03AAAB3F-5C47-5A66-9EBC-D5FA4DB353C9}", + "details": { + "name": "Resource Type" + } + } + ] + }, + { + "base": "ReloadConfigFile", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Reload Config File" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Reload Config File is invoked" + }, + "details": { + "name": "Reload Config File" + }, + "params": [ + { + "typeid": "{A0CA880C-AFE4-43CB-926C-59AC48496112}", + "details": { + "name": "Is Reloading Config FileName", + "tooltip": "Whether reload resource mapping config file name from AWS core configuration settings registry file." + } + } + ] + } + ] + } + ] +} \ No newline at end of file diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/EBus/Senders/ActorComponentRequestBus.names b/Gems/ScriptCanvas/Assets/TranslationAssets/EBus/Senders/ActorComponentRequestBus.names new file mode 100644 index 0000000000..d40cfe2045 --- /dev/null +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/EBus/Senders/ActorComponentRequestBus.names @@ -0,0 +1,193 @@ +{ + "entries": [ + { + "base": "ActorComponentRequestBus", + "context": "EBusSender", + "variant": "", + "details": { + "name": "Actor", + "category": "Animation" + }, + "methods": [ + { + "base": "GetRenderCharacter", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Get Render Character" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Get Render Character is invoked" + }, + "details": { + "name": "Get Render Character" + }, + "results": [ + { + "typeid": "{A0CA880C-AFE4-43CB-926C-59AC48496112}", + "details": { + "name": "Enabled" + } + } + ] + }, + { + "base": "DetachFromEntity", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Detach From Entity" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Detach From Entity is invoked" + }, + "details": { + "name": "Detach From Entity" + } + }, + { + "base": "GetRenderActorVisible", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Get Render Actor Visible" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Get Render Actor Visible is invoked" + }, + "details": { + "name": "Get Render Actor Visible" + }, + "results": [ + { + "typeid": "{A0CA880C-AFE4-43CB-926C-59AC48496112}", + "details": { + "name": "Visible" + } + } + ] + }, + { + "base": "AttachToEntity", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Attach To Entity" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Attach To Entity is invoked" + }, + "details": { + "name": "Attach To Entity", + "category": "Actor Animation" + }, + "params": [ + { + "typeid": "{6383F1D3-BB27-4E6B-A49A-6409B2059EAA}", + "details": { + "name": "EntityId", + "tooltip": "Entity Unique Id" + } + }, + { + "typeid": "{43DA906B-7DEF-4CA8-9790-854106D3F983}", + "details": { + "name": "Attachment Type", + "tooltip": "0: Actor, 1: Skin" + } + } + ] + }, + { + "base": "SetRenderCharacter", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Set Render Character" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Set Render Character is invoked" + }, + "details": { + "name": "Set Render Character" + }, + "params": [ + { + "typeid": "{A0CA880C-AFE4-43CB-926C-59AC48496112}", + "details": { + "name": "Enable" + } + } + ] + }, + { + "base": "GetJointTransform", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Get Joint Transform" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Get Joint Transform is invoked" + }, + "details": { + "name": "Get Joint Transform" + }, + "params": [ + { + "typeid": "{D6597933-47CD-4FC8-B911-63F3E2B0993A}", + "details": { + "name": "Joint Index" + } + }, + { + "typeid": "{43DA906B-7DEF-4CA8-9790-854106D3F983}", + "details": { + "name": "Space", + "tooltip": "0: Local, 1: Model, 2: World" + } + } + ], + "results": [ + { + "typeid": "{5D9958E9-9F1E-4985-B532-FFFDE75FEDFD}", + "details": { + "name": "Transform" + } + } + ] + }, + { + "base": "GetJointIndexByName", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Get Joint Index By Name" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Get Joint Index By Name is invoked" + }, + "details": { + "name": "Get Joint Index By Name" + }, + "params": [ + { + "typeid": "{3AB0037F-AF8D-48CE-BCA0-A170D18B2C03}", + "details": { + "name": "Name" + } + } + ], + "results": [ + { + "typeid": "{D6597933-47CD-4FC8-B911-63F3E2B0993A}", + "details": { + "name": "Joint Index" + } + } + ] + } + ] + } + ] +} \ No newline at end of file diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/EBus/Senders/AnimAudioComponentRequestBus.names b/Gems/ScriptCanvas/Assets/TranslationAssets/EBus/Senders/AnimAudioComponentRequestBus.names new file mode 100644 index 0000000000..25180e8ae7 --- /dev/null +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/EBus/Senders/AnimAudioComponentRequestBus.names @@ -0,0 +1,88 @@ +{ + "entries": [ + { + "base": "AnimAudioComponentRequestBus", + "context": "EBusSender", + "variant": "", + "details": { + "name": "Audio", + "category": "Animation" + }, + "methods": [ + { + "base": "AddTriggerEvent", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Add Trigger Event" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Add Trigger Event is invoked" + }, + "details": { + "name": "Add Trigger Event", + "tooltip": "Adds audio support to when an animation event is fired" + }, + "params": [ + { + "typeid": "{03AAAB3F-5C47-5A66-9EBC-D5FA4DB353C9}", + "details": { + "name": "Event Name" + } + }, + { + "typeid": "{03AAAB3F-5C47-5A66-9EBC-D5FA4DB353C9}", + "details": { + "name": "Trigger Name" + } + }, + { + "typeid": "{03AAAB3F-5C47-5A66-9EBC-D5FA4DB353C9}", + "details": { + "name": "Joint Name" + } + } + ] + }, + { + "base": "ClearTriggerEvents", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Clear Trigger Events" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Clear Trigger Events is invoked" + }, + "details": { + "name": "Clear Trigger Events", + "tooltip": "Clears all audio support for animation events" + } + }, + { + "base": "RemoveTriggerEvent", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Remove Trigger Event" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Remove Trigger Event is invoked" + }, + "details": { + "name": "Remove Trigger Event", + "tooltip": "Removes audio support from an anim event" + }, + "params": [ + { + "typeid": "{03AAAB3F-5C47-5A66-9EBC-D5FA4DB353C9}", + "details": { + "name": "Event Name" + } + } + ] + } + ] + } + ] +} \ No newline at end of file diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/EBus/Senders/AnimGraphComponentNetworkRequestBus.names b/Gems/ScriptCanvas/Assets/TranslationAssets/EBus/Senders/AnimGraphComponentNetworkRequestBus.names new file mode 100644 index 0000000000..865335410e --- /dev/null +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/EBus/Senders/AnimGraphComponentNetworkRequestBus.names @@ -0,0 +1,125 @@ +{ + "entries": [ + { + "base": "AnimGraphComponentNetworkRequestBus", + "context": "EBusSender", + "variant": "", + "details": { + "name": "Anim Graph", + "category": "Animation" + }, + "methods": [ + { + "base": "GetActiveStates", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Get Active States" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Get Active States is invoked" + }, + "details": { + "name": "Get Active States" + }, + "results": [ + { + "typeid": "{3349AACD-BE04-50BC-9478-528BF2ACFD55}", + "details": { + "name": "Active States" + } + } + ] + }, + { + "base": "CreateSnapshot", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Create Snapshot" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Create Snapshot is invoked" + }, + "details": { + "name": "Create Snapshot" + }, + "params": [ + { + "typeid": "{A0CA880C-AFE4-43CB-926C-59AC48496112}", + "details": { + "name": "Is Authoritative" + } + } + ] + }, + { + "base": "SetActiveStates", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke SetActiveStates" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after SetActiveStates is invoked" + }, + "details": { + "name": "Set Active States" + }, + "params": [ + { + "typeid": "{3349AACD-BE04-50BC-9478-528BF2ACFD55}", + "details": { + "name": "Active States" + } + } + ] + }, + { + "base": "IsAssetReady", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Is Asset Ready" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Is Asset Ready is invoked" + }, + "details": { + "name": "Is Asset Ready" + }, + "results": [ + { + "typeid": "{A0CA880C-AFE4-43CB-926C-59AC48496112}", + "details": { + "name": "Is Asset Ready" + } + } + ] + }, + { + "base": "HasSnapshot", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Has Snapshot" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Has Snapshot is invoked" + }, + "details": { + "name": "Has Snapshot" + }, + "results": [ + { + "typeid": "{A0CA880C-AFE4-43CB-926C-59AC48496112}", + "details": { + "name": "Has Snapshot" + } + } + ] + } + ] + } + ] +} \ No newline at end of file diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/EBus/Senders/AnimGraphComponentRequestBus.names b/Gems/ScriptCanvas/Assets/TranslationAssets/EBus/Senders/AnimGraphComponentRequestBus.names new file mode 100644 index 0000000000..976c253f89 --- /dev/null +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/EBus/Senders/AnimGraphComponentRequestBus.names @@ -0,0 +1,977 @@ +{ + "entries": [ + { + "base": "AnimGraphComponentRequestBus", + "context": "EBusSender", + "variant": "", + "details": { + "name": "Anim Graph", + "category": "Animation" + }, + "methods": [ + { + "base": "GetVisualizeEnabled", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Get Visualize Enabled" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Get Visualize Enabled is invoked" + }, + "details": { + "name": "Get Visualize Enabled" + }, + "results": [ + { + "typeid": "{A0CA880C-AFE4-43CB-926C-59AC48496112}", + "details": { + "name": "Enabled" + } + } + ] + }, + { + "base": "SetNamedParameterRotation", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Set Named Parameter Rotation" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Set Named Parameter Rotation is invoked" + }, + "details": { + "name": "Set Named Parameter Rotation" + }, + "params": [ + { + "typeid": "{3AB0037F-AF8D-48CE-BCA0-A170D18B2C03}", + "details": { + "name": "Name" + } + }, + { + "typeid": "{73103120-3DD3-4873-BAB3-9713FA2804FB}", + "details": { + "name": "Quaternion" + } + } + ] + }, + { + "base": "SetParameterString", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Set Parameter String" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Set Parameter String is invoked" + }, + "details": { + "name": "Set Parameter String" + }, + "params": [ + { + "typeid": "{D6597933-47CD-4FC8-B911-63F3E2B0993A}", + "details": { + "name": "Index" + } + }, + { + "typeid": "{3AB0037F-AF8D-48CE-BCA0-A170D18B2C03}", + "details": { + "name": "Value" + } + } + ] + }, + { + "base": "GetNamedParameterString", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Get Named Parameter String" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Get Named Parameter String is invoked" + }, + "details": { + "name": "Get Named Parameter String" + }, + "params": [ + { + "typeid": "{3AB0037F-AF8D-48CE-BCA0-A170D18B2C03}", + "details": { + "name": "Parameter Name" + } + } + ], + "results": [ + { + "typeid": "{03AAAB3F-5C47-5A66-9EBC-D5FA4DB353C9}", + "details": { + "name": "Value" + } + } + ] + }, + { + "base": "GetNamedParameterVector2", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Get Named Parameter Vector2" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Get Named Parameter Vector2 is invoked" + }, + "details": { + "name": "Get Named Parameter Vector2" + }, + "params": [ + { + "typeid": "{3AB0037F-AF8D-48CE-BCA0-A170D18B2C03}", + "details": { + "name": "Parameter Name" + } + } + ], + "results": [ + { + "typeid": "{3D80F623-C85C-4741-90D0-E4E66164E6BF}", + "details": { + "name": "Value" + } + } + ] + }, + { + "base": "GetParameterFloat", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Get Parameter Float" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Get Parameter Float is invoked" + }, + "details": { + "name": "Get Parameter Float" + }, + "params": [ + { + "typeid": "{D6597933-47CD-4FC8-B911-63F3E2B0993A}", + "details": { + "name": "Parameter Index" + } + } + ], + "results": [ + { + "typeid": "{EA2C3E90-AFBE-44D4-A90D-FAAF79BAF93D}", + "details": { + "name": "Value" + } + } + ] + }, + { + "base": "SetParameterRotation", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Set Parameter Rotation" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Set Parameter Rotation is invoked" + }, + "details": { + "name": "Set Parameter Rotation" + }, + "params": [ + { + "typeid": "{3AB0037F-AF8D-48CE-BCA0-A170D18B2C03}", + "details": { + "name": "Parameter Name" + } + }, + { + "typeid": "{73103120-3DD3-4873-BAB3-9713FA2804FB}", + "details": { + "name": "Quaternion" + } + } + ] + }, + { + "base": "GetNamedParameterFloat", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Get Named Parameter Float" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Get Named Parameter Float is invoked" + }, + "details": { + "name": "Get Named Parameter Float" + }, + "params": [ + { + "typeid": "{3AB0037F-AF8D-48CE-BCA0-A170D18B2C03}", + "details": { + "name": "Parameter Name" + } + } + ], + "results": [ + { + "typeid": "{EA2C3E90-AFBE-44D4-A90D-FAAF79BAF93D}", + "details": { + "name": "Value" + } + } + ] + }, + { + "base": "SetParameterBool", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Set Parameter Bool" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Set Parameter Bool is invoked" + }, + "details": { + "name": "Set Parameter Bool" + }, + "params": [ + { + "typeid": "{D6597933-47CD-4FC8-B911-63F3E2B0993A}", + "details": { + "name": "Parameter Index" + } + }, + { + "typeid": "{A0CA880C-AFE4-43CB-926C-59AC48496112}", + "details": { + "name": "Value" + } + } + ] + }, + { + "base": "FindParameterName", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Find Parameter Name" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Find Parameter Name is invoked" + }, + "details": { + "name": "Find Parameter Name" + }, + "params": [ + { + "typeid": "{D6597933-47CD-4FC8-B911-63F3E2B0993A}", + "details": { + "name": "Parameter Index" + } + } + ], + "results": [ + { + "typeid": "{3AB0037F-AF8D-48CE-BCA0-A170D18B2C03}", + "details": { + "name": "Name" + } + } + ] + }, + { + "base": "GetNamedParameterBool", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Get Named Parameter Bool" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Get Named Parameter Bool is invoked" + }, + "details": { + "name": "Get Named Parameter Bool" + }, + "params": [ + { + "typeid": "{3AB0037F-AF8D-48CE-BCA0-A170D18B2C03}", + "details": { + "name": "Name" + } + } + ], + "results": [ + { + "typeid": "{A0CA880C-AFE4-43CB-926C-59AC48496112}", + "details": { + "name": "Value" + } + } + ] + }, + { + "base": "SetParameterFloat", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Set Parameter Float" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Set Parameter Float is invoked" + }, + "details": { + "name": "Set Parameter Float" + }, + "params": [ + { + "typeid": "{D6597933-47CD-4FC8-B911-63F3E2B0993A}", + "details": { + "name": "Parameter Index" + } + }, + { + "typeid": "{EA2C3E90-AFBE-44D4-A90D-FAAF79BAF93D}", + "details": { + "name": "Value" + } + } + ] + }, + { + "base": "GetParameterVector2", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Get Parameter Vector2" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Get Parameter Vector2 is invoked" + }, + "details": { + "name": "Get Parameter Vector2" + }, + "params": [ + { + "typeid": "{D6597933-47CD-4FC8-B911-63F3E2B0993A}", + "details": { + "name": "Parameter Index" + } + } + ], + "results": [ + { + "typeid": "{3D80F623-C85C-4741-90D0-E4E66164E6BF}", + "details": { + "name": "Value" + } + } + ] + }, + { + "base": "GetParameterBool", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Get Parameter Bool" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Get Parameter Bool is invoked" + }, + "details": { + "name": "Get Parameter Bool" + }, + "params": [ + { + "typeid": "{D6597933-47CD-4FC8-B911-63F3E2B0993A}", + "details": { + "name": "Parameter Index" + } + } + ], + "results": [ + { + "typeid": "{A0CA880C-AFE4-43CB-926C-59AC48496112}", + "details": { + "name": "Value" + } + } + ] + }, + { + "base": "SetNamedParameterVector3", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Set Named Parameter Vector3" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Set Named Parameter Vector3 is invoked" + }, + "details": { + "name": "Set Named Parameter Vector3" + }, + "params": [ + { + "typeid": "{3AB0037F-AF8D-48CE-BCA0-A170D18B2C03}", + "details": { + "name": "Name" + } + }, + { + "typeid": "{8379EB7D-01FA-4538-B64B-A6543B4BE73D}", + "details": { + "name": "Value" + } + } + ] + }, + { + "base": "FindParameterIndex", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Find Parameter Index" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Find Parameter Index is invoked" + }, + "details": { + "name": "Find Parameter Index" + }, + "params": [ + { + "typeid": "{3AB0037F-AF8D-48CE-BCA0-A170D18B2C03}", + "details": { + "name": "Name" + } + } + ], + "results": [ + { + "typeid": "{D6597933-47CD-4FC8-B911-63F3E2B0993A}", + "details": { + "name": "Parameter Index" + } + } + ] + }, + { + "base": "SetNamedParameterString", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Set Named Parameter String" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Set Named Parameter String is invoked" + }, + "details": { + "name": "Set Named Parameter String" + }, + "params": [ + { + "typeid": "{3AB0037F-AF8D-48CE-BCA0-A170D18B2C03}", + "details": { + "name": "Name" + } + }, + { + "typeid": "{3AB0037F-AF8D-48CE-BCA0-A170D18B2C03}", + "details": { + "name": "Value" + } + } + ] + }, + { + "base": "SetParameterVector3", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Set Parameter Vector3" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Set Parameter Vector3 is invoked" + }, + "details": { + "name": "Set Parameter Vector3" + }, + "params": [ + { + "typeid": "{D6597933-47CD-4FC8-B911-63F3E2B0993A}", + "details": { + "name": "Parameter Index" + } + }, + { + "typeid": "{8379EB7D-01FA-4538-B64B-A6543B4BE73D}", + "details": { + "name": "Value" + } + } + ] + }, + { + "base": "GetParameterVector3", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Get Parameter Vector3" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Get Parameter Vector3 is invoked" + }, + "details": { + "name": "Get Parameter Vector3" + }, + "params": [ + { + "typeid": "{D6597933-47CD-4FC8-B911-63F3E2B0993A}", + "details": { + "name": "Parameter Index" + } + } + ], + "results": [ + { + "typeid": "{8379EB7D-01FA-4538-B64B-A6543B4BE73D}", + "details": { + "name": "Value" + } + } + ] + }, + { + "base": "SyncAnimGraph", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Sync Anim Graph" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Sync Anim Graph is invoked" + }, + "details": { + "name": "Sync Anim Graph" + }, + "params": [ + { + "typeid": "{6383F1D3-BB27-4E6B-A49A-6409B2059EAA}", + "details": { + "name": "Entity Id", + "tooltip": "Entity Unique Id" + } + } + ] + }, + { + "base": "SetParameterRotationEuler", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Set Parameter Rotation Euler" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Set Parameter Rotation Euler is invoked" + }, + "details": { + "name": "Set Parameter Rotation Euler" + }, + "params": [ + { + "typeid": "{D6597933-47CD-4FC8-B911-63F3E2B0993A}", + "details": { + "name": "Parameter Index" + } + }, + { + "typeid": "{8379EB7D-01FA-4538-B64B-A6543B4BE73D}", + "details": { + "name": "Angles (Radians)" + } + } + ] + }, + { + "base": "GetParameterRotationEuler", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Get Parameter Rotation Euler" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Get Parameter Rotation Euler is invoked" + }, + "details": { + "name": "Get Parameter Rotation Euler" + }, + "params": [ + { + "typeid": "{D6597933-47CD-4FC8-B911-63F3E2B0993A}", + "details": { + "name": "Parameter Index" + } + } + ], + "results": [ + { + "typeid": "{8379EB7D-01FA-4538-B64B-A6543B4BE73D}", + "details": { + "name": "Angles (Radians)" + } + } + ] + }, + { + "base": "GetParameterRotation", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Get Parameter Rotation" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Get Parameter Rotation is invoked" + }, + "details": { + "name": "Get Parameter Rotation" + }, + "params": [ + { + "typeid": "{3AB0037F-AF8D-48CE-BCA0-A170D18B2C03}", + "details": { + "name": "Parameter Name" + } + } + ], + "results": [ + { + "typeid": "{73103120-3DD3-4873-BAB3-9713FA2804FB}", + "details": { + "name": "Quaternion" + } + } + ] + }, + { + "base": "GetNamedParameterRotationEuler", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Get Named Parameter Rotation Euler" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Get Named Parameter Rotation Euler is invoked" + }, + "details": { + "name": "Get Named Parameter Rotation Euler" + }, + "params": [ + { + "typeid": "{3AB0037F-AF8D-48CE-BCA0-A170D18B2C03}", + "details": { + "name": "Name" + } + } + ], + "results": [ + { + "typeid": "{8379EB7D-01FA-4538-B64B-A6543B4BE73D}", + "details": { + "name": "Angles (Radians)" + } + } + ] + }, + { + "base": "DesyncAnimGraph", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Desync Anim Graph" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Desync Anim Graph is invoked" + }, + "details": { + "name": "Desync Anim Graph" + }, + "params": [ + { + "typeid": "{6383F1D3-BB27-4E6B-A49A-6409B2059EAA}", + "details": { + "name": "Entity Id", + "tooltip": "Entity Unique Id" + } + } + ] + }, + { + "base": "SetNamedParameterRotationEuler", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Set Named Parameter Rotation Euler" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Set Named Parameter Rotation Euler is invoked" + }, + "details": { + "name": "Set Named Parameter Rotation Euler" + }, + "params": [ + { + "typeid": "{3AB0037F-AF8D-48CE-BCA0-A170D18B2C03}", + "details": { + "name": "Parameter Name" + } + }, + { + "typeid": "{8379EB7D-01FA-4538-B64B-A6543B4BE73D}", + "details": { + "name": "Angles (Radians)" + } + } + ] + }, + { + "base": "SetParameterVector2", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Set Parameter Vector2" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Set Parameter Vector2 is invoked" + }, + "details": { + "name": "Set Parameter Vector2" + }, + "params": [ + { + "typeid": "{D6597933-47CD-4FC8-B911-63F3E2B0993A}", + "details": { + "name": "Parameter Index" + } + }, + { + "typeid": "{3D80F623-C85C-4741-90D0-E4E66164E6BF}", + "details": { + "name": "Value" + } + } + ] + }, + { + "base": "GetNamedParameterRotation", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Get Named Parameter Rotation" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Get Named Parameter Rotation is invoked" + }, + "details": { + "name": "Get Named Parameter Rotation" + }, + "params": [ + { + "typeid": "{3AB0037F-AF8D-48CE-BCA0-A170D18B2C03}", + "details": { + "name": "Name" + } + } + ], + "results": [ + { + "typeid": "{73103120-3DD3-4873-BAB3-9713FA2804FB}", + "details": { + "name": "Quaternion" + } + } + ] + }, + { + "base": "SetNamedParameterBool", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Set Named Parameter Bool" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Set Named Parameter Bool is invoked" + }, + "details": { + "name": "Set Named Parameter Bool" + }, + "params": [ + { + "typeid": "{3AB0037F-AF8D-48CE-BCA0-A170D18B2C03}", + "details": { + "name": "Name" + } + }, + { + "typeid": "{A0CA880C-AFE4-43CB-926C-59AC48496112}", + "details": { + "name": "Value" + } + } + ] + }, + { + "base": "SetVisualizeEnabled", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Set Visualize Enabled" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Set Visualize Enabled is invoked" + }, + "details": { + "name": "Set Visualize Enabled" + }, + "params": [ + { + "typeid": "{A0CA880C-AFE4-43CB-926C-59AC48496112}", + "details": { + "name": "Value" + } + } + ] + }, + { + "base": "SetNamedParameterFloat", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Set Named Parameter Float" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Set Named Parameter Float is invoked" + }, + "details": { + "name": "Set Named Parameter Float" + }, + "params": [ + { + "typeid": "{3AB0037F-AF8D-48CE-BCA0-A170D18B2C03}", + "details": { + "name": "Name" + } + }, + { + "typeid": "{EA2C3E90-AFBE-44D4-A90D-FAAF79BAF93D}", + "details": { + "name": "Value" + } + } + ] + }, + { + "base": "SetNamedParameterVector2", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Set Named Parameter Vector2" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Set Named Parameter Vector2 is invoked" + }, + "details": { + "name": "Set Named Parameter Vector2" + }, + "params": [ + { + "typeid": "{3AB0037F-AF8D-48CE-BCA0-A170D18B2C03}", + "details": { + "name": "Name" + } + }, + { + "typeid": "{3D80F623-C85C-4741-90D0-E4E66164E6BF}", + "details": { + "name": "Value" + } + } + ] + }, + { + "base": "GetNamedParameterVector3", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Get Named Parameter Vector3" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Get Named Parameter Vector3 is invoked" + }, + "details": { + "name": "Get Named Parameter Vector3" + }, + "params": [ + { + "typeid": "{3AB0037F-AF8D-48CE-BCA0-A170D18B2C03}", + "details": { + "name": "Name" + } + } + ], + "results": [ + { + "typeid": "{8379EB7D-01FA-4538-B64B-A6543B4BE73D}", + "details": { + "name": "Value" + } + } + ] + }, + { + "base": "GetParameterString", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Get Parameter String" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Get Parameter String is invoked" + }, + "details": { + "name": "Get Parameter String" + }, + "params": [ + { + "typeid": "{D6597933-47CD-4FC8-B911-63F3E2B0993A}", + "details": { + "name": "Parameter Index" + } + } + ], + "results": [ + { + "typeid": "{03AAAB3F-5C47-5A66-9EBC-D5FA4DB353C9}", + "details": { + "name": "Value" + } + } + ] + } + ] + } + ] +} \ No newline at end of file diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/EBus/Senders/ArcBallControllerRequestBus.names b/Gems/ScriptCanvas/Assets/TranslationAssets/EBus/Senders/ArcBallControllerRequestBus.names new file mode 100644 index 0000000000..293c391360 --- /dev/null +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/EBus/Senders/ArcBallControllerRequestBus.names @@ -0,0 +1,429 @@ +{ + "entries": [ + { + "base": "ArcBallControllerRequestBus", + "context": "EBusSender", + "variant": "", + "details": { + "name": "Arc Ball Controller", + "subtitle": "Camera" + }, + "methods": [ + { + "base": "GetPan", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke GetPan" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after GetPan is invoked" + }, + "details": { + "name": "Get Pan", + "subtitle": "Arc Ball Controller" + }, + "results": [ + { + "typeid": "{8379EB7D-01FA-4538-B64B-A6543B4BE73D}", + "details": { + "name": "Pan" + } + } + ] + }, + { + "base": "GetCenter", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke GetCenter" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after GetCenter is invoked" + }, + "details": { + "name": "Get Center", + "subtitle": "Arc Ball Controller" + }, + "results": [ + { + "typeid": "{8379EB7D-01FA-4538-B64B-A6543B4BE73D}", + "details": { + "name": "Center" + } + } + ] + }, + { + "base": "SetZoomingSensitivity", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke SetZoomingSensitivity" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after SetZoomingSensitivity is invoked" + }, + "details": { + "name": "Set Zooming Sensitivity", + "subtitle": "Arc Ball Controller" + }, + "params": [ + { + "typeid": "{EA2C3E90-AFBE-44D4-A90D-FAAF79BAF93D}", + "details": { + "name": "Sensitivity" + } + } + ] + }, + { + "base": "GetPitch", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke GetPitch" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after GetPitch is invoked" + }, + "details": { + "name": "Get Pitch", + "subtitle": "Arc Ball Controller" + }, + "results": [ + { + "typeid": "{EA2C3E90-AFBE-44D4-A90D-FAAF79BAF93D}", + "details": { + "name": "Pitch" + } + } + ] + }, + { + "base": "SetPanningSensitivity", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke SetPanningSensitivity" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after SetPanningSensitivity is invoked" + }, + "details": { + "name": "Set Panning Sensitivity", + "subtitle": "Arc Ball Controller" + }, + "params": [ + { + "typeid": "{EA2C3E90-AFBE-44D4-A90D-FAAF79BAF93D}", + "details": { + "name": "Sensitivity" + } + } + ] + }, + { + "base": "GetZoomingSensitivity", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke GetZoomingSensitivity" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after GetZoomingSensitivity is invoked" + }, + "details": { + "name": "Get Zooming Sensitivity", + "subtitle": "Arc Ball Controller" + }, + "results": [ + { + "typeid": "{EA2C3E90-AFBE-44D4-A90D-FAAF79BAF93D}", + "details": { + "name": "Sensitivity" + } + } + ] + }, + { + "base": "SetHeading", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke SetHeading" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after SetHeading is invoked" + }, + "details": { + "name": "Set Heading", + "subtitle": "Arc Ball Controller" + }, + "params": [ + { + "typeid": "{EA2C3E90-AFBE-44D4-A90D-FAAF79BAF93D}", + "details": { + "name": "Heading" + } + } + ] + }, + { + "base": "GetMaxDistance", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke GetMaxDistance" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after GetMaxDistance is invoked" + }, + "details": { + "name": "Get Max Distance", + "subtitle": "Arc Ball Controller" + }, + "results": [ + { + "typeid": "{EA2C3E90-AFBE-44D4-A90D-FAAF79BAF93D}", + "details": { + "name": "Max Distance" + } + } + ] + }, + { + "base": "SetDistance", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke SetDistance" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after SetDistance is invoked" + }, + "details": { + "name": "Set Distance", + "subtitle": "Arc Ball Controller" + }, + "params": [ + { + "typeid": "{EA2C3E90-AFBE-44D4-A90D-FAAF79BAF93D}", + "details": { + "name": "Distance" + } + } + ] + }, + { + "base": "SetMinDistance", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke SetMinDistance" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after SetMinDistance is invoked" + }, + "details": { + "name": "Set Min Distance", + "subtitle": "Arc Ball Controller" + }, + "params": [ + { + "typeid": "{EA2C3E90-AFBE-44D4-A90D-FAAF79BAF93D}", + "details": { + "name": "Min Distance" + } + } + ] + }, + { + "base": "SetMaxDistance", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke SetMaxDistance" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after SetMaxDistance is invoked" + }, + "details": { + "name": "Set Max Distance", + "subtitle": "Arc Ball Controller" + }, + "params": [ + { + "typeid": "{EA2C3E90-AFBE-44D4-A90D-FAAF79BAF93D}", + "details": { + "name": "Max Distance" + } + } + ] + }, + { + "base": "GetMinDistance", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke GetMinDistance" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after GetMinDistance is invoked" + }, + "details": { + "name": "Get Min Distance", + "subtitle": "Arc Ball Controller" + }, + "results": [ + { + "typeid": "{EA2C3E90-AFBE-44D4-A90D-FAAF79BAF93D}", + "details": { + "name": "Min Distance" + } + } + ] + }, + { + "base": "GetHeading", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke GetHeading" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after GetHeading is invoked" + }, + "details": { + "name": "Get Heading", + "subtitle": "Arc Ball Controller" + }, + "results": [ + { + "typeid": "{EA2C3E90-AFBE-44D4-A90D-FAAF79BAF93D}", + "details": { + "name": "Heading" + } + } + ] + }, + { + "base": "GetPanningSensitivity", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke GetPanningSensitivity" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after GetPanningSensitivity is invoked" + }, + "details": { + "name": "Get Panning Sensitivity", + "subtitle": "Arc Ball Controller" + }, + "results": [ + { + "typeid": "{EA2C3E90-AFBE-44D4-A90D-FAAF79BAF93D}", + "details": { + "name": "Sensitivity" + } + } + ] + }, + { + "base": "SetCenter", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke SetCenter" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after SetCenter is invoked" + }, + "details": { + "name": "Set Center", + "subtitle": "Arc Ball Controller" + }, + "params": [ + { + "typeid": "{8379EB7D-01FA-4538-B64B-A6543B4BE73D}", + "details": { + "name": "Center" + } + } + ] + }, + { + "base": "SetPan", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke SetPan" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after SetPan is invoked" + }, + "details": { + "name": "Set Pan", + "subtitle": "Arc Ball Controller" + }, + "params": [ + { + "typeid": "{8379EB7D-01FA-4538-B64B-A6543B4BE73D}", + "details": { + "name": "Pan" + } + } + ] + }, + { + "base": "SetPitch", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke SetPitch" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after SetPitch is invoked" + }, + "details": { + "name": "Set Pitch", + "subtitle": "Arc Ball Controller" + }, + "params": [ + { + "typeid": "{EA2C3E90-AFBE-44D4-A90D-FAAF79BAF93D}", + "details": { + "name": "Pitch" + } + } + ] + }, + { + "base": "GetDistance", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke GetDistance" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after GetDistance is invoked" + }, + "details": { + "name": "Get Distance", + "subtitle": "Arc Ball Controller" + }, + "results": [ + { + "typeid": "{EA2C3E90-AFBE-44D4-A90D-FAAF79BAF93D}", + "details": { + "name": "Distance" + } + } + ] + } + ] + } + ] +} \ No newline at end of file diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/EBus/Senders/AreaLightRequestBus.names b/Gems/ScriptCanvas/Assets/TranslationAssets/EBus/Senders/AreaLightRequestBus.names new file mode 100644 index 0000000000..d57b9b6ffe --- /dev/null +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/EBus/Senders/AreaLightRequestBus.names @@ -0,0 +1,728 @@ +{ + "entries": [ + { + "base": "AreaLightRequestBus", + "context": "EBusSender", + "variant": "", + "details": { + "name": "Area Light", + "category": "Lights" + }, + "methods": [ + { + "base": "SetFilteringSampleCount", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Set Filtering Sample Count" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Set Filtering Sample Count is invoked" + }, + "details": { + "name": "Set Filtering Sample Count", + "tooltip": "Sets the sample count for filtering of the shadow boundary. Maximum 64" + }, + "params": [ + { + "typeid": "{43DA906B-7DEF-4CA8-9790-854106D3F983}", + "details": { + "name": "Sample Count" + } + } + ] + }, + { + "base": "SetIntensity", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Set Intensity" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Set Intensity is invoked" + }, + "details": { + "name": "Set Intensity", + "tooltip": "Sets an area light's intensity and intensity mode. This value is indepedent from its color" + }, + "params": [ + { + "typeid": "{EA2C3E90-AFBE-44D4-A90D-FAAF79BAF93D}", + "details": { + "name": "Intensity" + } + } + ] + }, + { + "base": "SetEsmExponent", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Set Esm Exponent" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Set Esm Exponent is invoked" + }, + "details": { + "name": "Set Esm Exponent", + "tooltip": "Sets the Esm exponent. Higher values produce a steeper falloff between light and shadow" + }, + "params": [ + { + "typeid": "{EA2C3E90-AFBE-44D4-A90D-FAAF79BAF93D}", + "details": { + "name": "Exponent" + } + } + ] + }, + { + "base": "GetOuterShutterAngle", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Get Outer Shutter Angle" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Get Outer Shutter Angle is invoked" + }, + "details": { + "name": "Get Outer Shutter Angle", + "tooltip": "Returns the outer angle of the shutters in degrees" + }, + "results": [ + { + "typeid": "{EA2C3E90-AFBE-44D4-A90D-FAAF79BAF93D}", + "details": { + "name": "Angle (Degrees)" + } + } + ] + }, + { + "base": "GetInnerShutterAngle", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Get Inner Shutter Angle" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Get Inner Shutter Angle is invoked" + }, + "details": { + "name": "Get Inner Shutter Angle", + "tooltip": "Returns the outer angle of the shutters in degrees" + }, + "results": [ + { + "typeid": "{EA2C3E90-AFBE-44D4-A90D-FAAF79BAF93D}", + "details": { + "name": "Angles (Degrees)" + } + } + ] + }, + { + "base": "SetColor", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Set Color" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Set Color is invoked" + }, + "details": { + "name": "Set Color", + "tooltip": "Sets an area light's color. This value is indepedent from its intensity" + }, + "params": [ + { + "typeid": "{7894072A-9050-4F0F-901B-34B1A0D29417}", + "details": { + "name": "Color" + } + } + ] + }, + { + "base": "SetShadowBias", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Set Shadow Bias" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Set Shadow Bias is invoked" + }, + "details": { + "name": "Set Shadow Bias" + }, + "params": [ + { + "typeid": "{EA2C3E90-AFBE-44D4-A90D-FAAF79BAF93D}", + "details": { + "name": "Bias" + } + } + ] + }, + { + "base": "SetShadowFilterMethod", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Set Shadow Filter Method" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Set Shadow Filter Method is invoked" + }, + "details": { + "name": "Set Shadow Filter Method", + "tooltip": "Sets the filter method of shadows, 0: None, 1: Percentage Closer Filtering (PCF), 2: Exponential Shadow Maps (ESM), 3: ESM with PCF Fallback" + }, + "params": [ + { + "typeid": "{43DA906B-7DEF-4CA8-9790-854106D3F983}", + "details": { + "name": "Shadow Filter Method", + "tooltip": "0: None, 1: Percentage Closer Filtering (PCF), 2: Exponential Shadow Maps (ESM), 3: ESM with PCF Fallback" + } + } + ] + }, + { + "base": "GetEsmExponent", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Get Esm Exponent" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Get Esm Exponent is invoked" + }, + "details": { + "name": "Get Esm Exponent", + "tooltip": "Gets the Esm exponent. Higher values produce a steeper falloff between light and shadow" + }, + "results": [ + { + "typeid": "{EA2C3E90-AFBE-44D4-A90D-FAAF79BAF93D}", + "details": { + "name": "Exponent" + } + } + ] + }, + { + "base": "SetInnerShutterAngle", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Set Inner Shutter Angle" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Set Inner Shutter Angle is invoked" + }, + "details": { + "name": "Set Inner Shutter Angle", + "tooltip": "Sets the inner angle of the shutters in degrees" + }, + "params": [ + { + "typeid": "{EA2C3E90-AFBE-44D4-A90D-FAAF79BAF93D}", + "details": { + "name": "Angle (Degrees)" + } + } + ] + }, + { + "base": "SetEnableShadow", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Set Enable Shadow" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Set Enable Shadow is invoked" + }, + "details": { + "name": "Set Enable Shadow", + "tooltip": "Sets if shadows should be enabled" + }, + "params": [ + { + "typeid": "{A0CA880C-AFE4-43CB-926C-59AC48496112}", + "details": { + "name": "Enable" + } + } + ] + }, + { + "base": "SetUseFastApproximation", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Set Use Fast Approximation" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Set Use Fast Approximation is invoked" + }, + "details": { + "name": "Set Use Fast Approximation", + "tooltip": "Sets whether the light should use the default high quality linearly transformed cosine lights (false) or a faster approximation (true)" + }, + "params": [ + { + "typeid": "{A0CA880C-AFE4-43CB-926C-59AC48496112}", + "details": { + "name": "Use Fast Approximation" + } + } + ] + }, + { + "base": "GetUseFastApproximation", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Get Use Fast Approximation" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Get Use Fast Approximation is invoked" + }, + "details": { + "name": "Get Use Fast Approximation", + "tooltip" : "Gets whether the light is using the default high quality linearly transformed cosine lights (false) or a faster approximation (true)" + }, + "results": [ + { + "typeid": "{A0CA880C-AFE4-43CB-926C-59AC48496112}", + "details": { + "name": "Uses Fast Approximation" + } + } + ] + }, + { + "base": "GetFilteringSampleCount", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Get Filtering Sample Count" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Get Filtering Sample Count is invoked" + }, + "details": { + "name": "Get Filtering Sample Count", + "tooltip": "Gets the sample count for filtering of the shadow boundary" + }, + "results": [ + { + "typeid": "{43DA906B-7DEF-4CA8-9790-854106D3F983}", + "details": { + "name": "Sample Count" + } + } + ] + }, + { + "base": "GetEnableShadow", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Get Enable Shadow" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Get Enable Shadow is invoked" + }, + "details": { + "name": "Get Enable Shadow", + "tooltip": "Returns true if shadows are enabled" + }, + "results": [ + { + "typeid": "{A0CA880C-AFE4-43CB-926C-59AC48496112}", + "details": { + "name": "Enabled" + } + } + ] + }, + { + "base": "GetShadowFilterMethod", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Get Shadow Filter Method" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Get Shadow Filter Method is invoked" + }, + "details": { + "name": "Get Shadow Filter Method", + "tooltip": "Gets the filter method of shadows, 0: None, 1: Percentage Closer Filtering (PCF), 2: Exponential Shadow Maps (ESM), 3: ESM with PCF Fallback" + }, + "results": [ + { + "typeid": "{43DA906B-7DEF-4CA8-9790-854106D3F983}", + "details": { + "name": "Filter Method", + "tooltip": "0: None, 1: Percentage Closer Filtering (PCF), 2: Exponential Shadow Maps (ESM), 3: ESM with PCF Fallback" + } + } + ] + }, + { + "base": "GetIntensityMode", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Get Intensity Mode" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Get Intensity Mode is invoked" + }, + "details": { + "name": "Get Intensity Mode", + "tooltip": "Gets an area light's photometric type\n0: Lumen (Total amount of luminous power emitted. Since a unit sphere is 4 pi steradians, 1 candela emitting uniformly in all directions is 4 pi lumens)\n1: Candela (Base unit of luminous intensity; luminous power per unit solid angle)\n2: Lux (One lux is one lumen per square meter. The same lux emitting from larger areas emits more lumens than smaller areas)\n3: Nit (Nits are candela per square meter. It can be calculated as Lux / Pi)\n4: Ev100Luminance (Exposure value for luminance - Similar to nits, A measurement of illuminance that grows exponentially. See https://en.wikipedia.org/wiki/Exposure_value)\n5: Ev100Illuminance (Exposure value for illuminance - Similar to lux, A measurement of illuminance that grows exponentially. See https://en.wikipedia.org/wiki/Exposure_value)" + }, + "results": [ + { + "typeid": "{3AB0037F-AF8D-48CE-BCA0-A170D18B2C03}", + "details": { + "name": "Intensity Mode", + "tooltip": "0: Lumen (Total amount of luminous power emitted. Since a unit sphere is 4 pi steradians, 1 candela emitting uniformly in all directions is 4 pi lumens)\n1: Candela (Base unit of luminous intensity; luminous power per unit solid angle)\n2: Lux (One lux is one lumen per square meter. The same lux emitting from larger areas emits more lumens than smaller areas)\n3: Nit (Nits are candela per square meter. It can be calculated as Lux / Pi)\n4: Ev100Luminance (Exposure value for luminance - Similar to nits, A measurement of illuminance that grows exponentially. See https://en.wikipedia.org/wiki/Exposure_value)\n5: Ev100Illuminance (Exposure value for illuminance - Similar to lux, A measurement of illuminance that grows exponentially. See https://en.wikipedia.org/wiki/Exposure_value)" + } + } + ] + }, + { + "base": "GetShadowBias", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Get Shadow Bias" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Get Shadow Bias is invoked" + }, + "details": { + "name": "Get Shadow Bias", + "tooltip": "Returns the shadow bias" + }, + "results": [ + { + "typeid": "{EA2C3E90-AFBE-44D4-A90D-FAAF79BAF93D}", + "details": { + "name": "Bias" + } + } + ] + }, + { + "base": "SetAttenuationRadiusMode", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Set Attenuation Radius Mode" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Set Attenuation Radius Mode is invoked" + }, + "details": { + "name": "Set Attenuation Radius Mode", + "tooltip": "0: Automatic, the radius will immediately be recalculated based on the intensity\n1: Explicit, the radius value will be unchanged from its previous value" + + }, + "params": [ + { + "typeid": "{72B9409A-7D1A-4831-9CFE-FCB3FADD3426}", + "details": { + "name": "Mode", + "tooltip": "0: Automatic, the radius will immediately be recalculated based on the intensity\n1: Explicit, the radius value will be unchanged from its previous value" + } + } + ] + }, + { + "base": "SetEmitsLightBothDirections", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Set Emits Light Both Directions" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Set Emits Light Both Directions is invoked" + }, + "details": { + "name": "Set Emits Light Both Directions" + }, + "params": [ + { + "typeid": "{A0CA880C-AFE4-43CB-926C-59AC48496112}", + "details": { + "name": "Enable" + } + } + ] + }, + { + "base": "SetEnableShutters", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Set Enable Shutters" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Set Enable Shutters is invoked" + }, + "details": { + "name": "Set Enable Shutters" + }, + "params": [ + { + "typeid": "{A0CA880C-AFE4-43CB-926C-59AC48496112}", + "details": { + "name": "Enable" + } + } + ] + }, + { + "base": "GetShadowmapMaxSize", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Get Shadowmap Max Size" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Get Shadowmap Max Size is invoked" + }, + "details": { + "name": "Get Shadowmap Max Size", + "tooltip": "Returns the maximum width and height of shadowmap" + }, + "results": [ + { + "typeid": "{43DA906B-7DEF-4CA8-9790-854106D3F983}", + "details": { + "name": "Max Size" + } + } + ] + }, + { + "base": "GetEmitsLightBothDirections", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Get Emits Light Both Directions" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Get Emits Light Both Directions is invoked" + }, + "details": { + "name": "Get Emits Light Both Directions" + }, + "results": [ + { + "typeid": "{A0CA880C-AFE4-43CB-926C-59AC48496112}", + "details": { + "name": "Enabled" + } + } + ] + }, + { + "base": "SetOuterShutterAngle", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Set Outer Shutter Angle" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Set Outer Shutter Angle is invoked" + }, + "details": { + "name": "Set Outer Shutter Angle", + "tooltip": "Sets the outer angle of the shutters in degrees" + }, + "params": [ + { + "typeid": "{EA2C3E90-AFBE-44D4-A90D-FAAF79BAF93D}", + "details": { + "name": "Angle (Degrees)" + } + } + ] + }, + { + "base": "SetAttenuationRadius", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Set Attenuation Radius" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Set Attenuation Radius is invoked" + }, + "details": { + "name": "Set Attenuation Radius", + "tooltip": "Set the distance and which an area light will no longer affect lighting. Setting this forces the Radius Calculation to Explicit mode" + }, + "params": [ + { + "typeid": "{EA2C3E90-AFBE-44D4-A90D-FAAF79BAF93D}", + "details": { + "name": "Radius" + } + } + ] + }, + { + "base": "GetAttenuationRadius", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Get Attenuation Radius" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Get Attenuation Radius is invoked" + }, + "details": { + "name": "Get Attenuation Radius", + "tooltip" : "Gets the distance at which the area light will no longer affect lighting" + }, + "results": [ + { + "typeid": "{EA2C3E90-AFBE-44D4-A90D-FAAF79BAF93D}", + "details": { + "name": "Radius" + } + } + ] + }, + { + "base": "GetEnableShutters", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Get Enable Shutters" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Get Enable Shutters is invoked" + }, + "details": { + "name": "Get Enable Shutters", + "tooltip": "Returns true if shutters are enabled" + }, + "results": [ + { + "typeid": "{A0CA880C-AFE4-43CB-926C-59AC48496112}", + "details": { + "name": "Enabled" + } + } + ] + }, + { + "base": "GetColor", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Get Color" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Get Color is invoked" + }, + "details": { + "name": "Get Color" + }, + "results": [ + { + "typeid": "{7894072A-9050-4F0F-901B-34B1A0D29417}", + "details": { + "name": "Color" + } + } + ] + }, + { + "base": "ConvertToIntensityMode", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Convert To Intensity Mode" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Convert To Intensity Mode is invoked" + }, + "details": { + "name": "Convert To Intensity Mode", + "tooltip": "Sets the photometric unit to the one provided and converts the intensity to the photometric unit so actual light intensity remains constant" + }, + "params": [ + { + "typeid": "{3AB0037F-AF8D-48CE-BCA0-A170D18B2C03}", + "details": { + "name": "Mode", + "tooltip": "0: Lumen (Total amount of luminous power emitted. Since a unit sphere is 4 pi steradians, 1 candela emitting uniformly in all directions is 4 pi lumens)\n1: Candela (Base unit of luminous intensity; luminous power per unit solid angle)\n2: Lux (One lux is one lumen per square meter. The same lux emitting from larger areas emits more lumens than smaller areas)\n3: Nit (Nits are candela per square meter. It can be calculated as Lux / Pi)\n4: Ev100Luminance (Exposure value for luminance - Similar to nits, A measurement of illuminance that grows exponentially. See https://en.wikipedia.org/wiki/Exposure_value)\n5: Ev100Illuminance (Exposure value for illuminance - Similar to lux, A measurement of illuminance that grows exponentially. See https://en.wikipedia.org/wiki/Exposure_value)" + } + } + ] + }, + { + "base": "SetShadowmapMaxSize", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Set Shadowmap Max Size" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Set Shadowmap Max Size is invoked" + }, + "details": { + "name": "Set Shadowmap Max Size" + }, + "params": [ + { + "typeid": "{43DA906B-7DEF-4CA8-9790-854106D3F983}", + "details": { + "name": "Max Size" + } + } + ] + }, + { + "base": "GetIntensity", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Get Intensity" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Get Intensity is invoked" + }, + "details": { + "name": "Get Intensity", + "tooltip": "Gets an area light's intensity. This value is indepedent from its color" + }, + "results": [ + { + "typeid": "{EA2C3E90-AFBE-44D4-A90D-FAAF79BAF93D}", + "details": { + "name": "Intensity" + } + } + ] + } + ] + } + ] +} \ No newline at end of file diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/EBus/Senders/AreaSystemRequestBus.names b/Gems/ScriptCanvas/Assets/TranslationAssets/EBus/Senders/AreaSystemRequestBus.names new file mode 100644 index 0000000000..57f718450a --- /dev/null +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/EBus/Senders/AreaSystemRequestBus.names @@ -0,0 +1,74 @@ +{ + "entries": [ + { + "base": "AreaSystemRequestBus", + "context": "EBusSender", + "variant": "", + "details": { + "category": "Area System" + }, + "methods": [ + { + "base": "GetInstanceCountInAabb", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Get Instance Count In AABB" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after GetInstance Count In AABB is invoked" + }, + "details": { + "name": "Get Instance Count In AABB" + }, + "params": [ + { + "typeid": "{A54C2B36-D5B8-46A1-A529-4EBDBD2450E7}", + "details": { + "name": "AABB" + } + } + ], + "results": [ + { + "typeid": "{D6597933-47CD-4FC8-B911-63F3E2B0993A}", + "details": { + "name": "Instance Count" + } + } + ] + }, + { + "base": "GetInstancesInAabb", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Get Instances In AABB" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Get Instances In AABB is invoked" + }, + "details": { + "name": "Get Instances In AABB" + }, + "params": [ + { + "typeid": "{A54C2B36-D5B8-46A1-A529-4EBDBD2450E7}", + "details": { + "name": "AABB" + } + } + ], + "results": [ + { + "typeid": "{F323EFB3-042D-51E9-ABE8-0B55D587CC8E}", + "details": { + "name": "Instances" + } + } + ] + } + ] + } + ] +} \ No newline at end of file diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/EBus/Senders/AssetCollectionAsyncLoaderTestBus.names b/Gems/ScriptCanvas/Assets/TranslationAssets/EBus/Senders/AssetCollectionAsyncLoaderTestBus.names new file mode 100644 index 0000000000..6195542299 --- /dev/null +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/EBus/Senders/AssetCollectionAsyncLoaderTestBus.names @@ -0,0 +1,162 @@ +{ + "entries": [ + { + "base": "AssetCollectionAsyncLoaderTestBus", + "context": "EBusSender", + "variant": "", + "details": { + "name": "Asset Collection Async Loader Test" + }, + "methods": [ + { + "base": "GetPendingAssetsList", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke GetPendingAssetsList" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after GetPendingAssetsList is invoked" + }, + "details": { + "name": "GetPendingAssetsList" + }, + "results": [ + { + "typeid": "{99DAD0BC-740E-5E82-826B-8FC7968CC02C}", + "details": { + "name": "AZStd::vector" + } + } + ] + }, + { + "base": "GetCountOfPendingAssets", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke GetCountOfPendingAssets" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after GetCountOfPendingAssets is invoked" + }, + "details": { + "name": "GetCountOfPendingAssets" + }, + "results": [ + { + "typeid": "{43DA906B-7DEF-4CA8-9790-854106D3F983}", + "details": { + "name": "unsigned int" + } + } + ] + }, + { + "base": "ValidateAssetWasLoaded", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke ValidateAssetWasLoaded" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after ValidateAssetWasLoaded is invoked" + }, + "details": { + "name": "ValidateAssetWasLoaded" + }, + "params": [ + { + "typeid": "{03AAAB3F-5C47-5A66-9EBC-D5FA4DB353C9}", + "details": { + "name": "AZStd::string" + } + } + ], + "results": [ + { + "typeid": "{A0CA880C-AFE4-43CB-926C-59AC48496112}", + "details": { + "name": "bool" + } + } + ] + }, + { + "base": "CancelLoadingAssets", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke CancelLoadingAssets" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after CancelLoadingAssets is invoked" + }, + "details": { + "name": "CancelLoadingAssets" + } + }, + { + "base": "StartLoadingAssetsFromAssetList", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke StartLoadingAssetsFromAssetList" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after StartLoadingAssetsFromAssetList is invoked" + }, + "details": { + "name": "StartLoadingAssetsFromAssetList" + }, + "params": [ + { + "typeid": "{99DAD0BC-740E-5E82-826B-8FC7968CC02C}", + "details": { + "name": "AZStd::vector" + } + } + ], + "results": [ + { + "typeid": "{A0CA880C-AFE4-43CB-926C-59AC48496112}", + "details": { + "name": "bool" + } + } + ] + }, + { + "base": "StartLoadingAssetsFromJsonFile", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke StartLoadingAssetsFromJsonFile" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after StartLoadingAssetsFromJsonFile is invoked" + }, + "details": { + "name": "StartLoadingAssetsFromJsonFile" + }, + "params": [ + { + "typeid": "{03AAAB3F-5C47-5A66-9EBC-D5FA4DB353C9}", + "details": { + "name": "AZStd::string" + } + } + ], + "results": [ + { + "typeid": "{A0CA880C-AFE4-43CB-926C-59AC48496112}", + "details": { + "name": "bool" + } + } + ] + } + ] + } + ] +} \ No newline at end of file diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/EBus/Senders/AssetEditorRequestBus.names b/Gems/ScriptCanvas/Assets/TranslationAssets/EBus/Senders/AssetEditorRequestBus.names new file mode 100644 index 0000000000..d3a7087a65 --- /dev/null +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/EBus/Senders/AssetEditorRequestBus.names @@ -0,0 +1,99 @@ +{ + "entries": [ + { + "base": "AssetEditorRequestBus", + "context": "EBusSender", + "variant": "", + "details": { + "name": "Asset Editor" + }, + "methods": [ + { + "base": "CreateNewGraph", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke CreateNewGraph" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after CreateNewGraph is invoked" + }, + "details": { + "name": "CreateNewGraph" + }, + "results": [ + { + "typeid": "{6383F1D3-BB27-4E6B-A49A-6409B2059EAA}", + "details": { + "name": "EntityId", + "tooltip": "Entity Unique Id" + } + } + ] + }, + { + "base": "ContainsGraph", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke ContainsGraph" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after ContainsGraph is invoked" + }, + "details": { + "name": "ContainsGraph" + }, + "params": [ + { + "typeid": "{6383F1D3-BB27-4E6B-A49A-6409B2059EAA}", + "details": { + "name": "EntityId", + "tooltip": "Entity Unique Id" + } + } + ], + "results": [ + { + "typeid": "{A0CA880C-AFE4-43CB-926C-59AC48496112}", + "details": { + "name": "bool" + } + } + ] + }, + { + "base": "CloseGraph", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke CloseGraph" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after CloseGraph is invoked" + }, + "details": { + "name": "CloseGraph" + }, + "params": [ + { + "typeid": "{6383F1D3-BB27-4E6B-A49A-6409B2059EAA}", + "details": { + "name": "EntityId", + "tooltip": "Entity Unique Id" + } + } + ], + "results": [ + { + "typeid": "{A0CA880C-AFE4-43CB-926C-59AC48496112}", + "details": { + "name": "bool" + } + } + ] + } + ] + } + ] +} \ No newline at end of file diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/EBus/Senders/AtomToolsDocumentRequestBus.names b/Gems/ScriptCanvas/Assets/TranslationAssets/EBus/Senders/AtomToolsDocumentRequestBus.names new file mode 100644 index 0000000000..13e66d2420 --- /dev/null +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/EBus/Senders/AtomToolsDocumentRequestBus.names @@ -0,0 +1,471 @@ +{ + "entries": [ + { + "base": "AtomToolsDocumentRequestBus", + "context": "EBusSender", + "variant": "", + "details": { + "name": "Document", + "category": "Atom Tools" + }, + "methods": [ + { + "base": "CanRedo", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Can Redo" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Can Redo is invoked" + }, + "details": { + "name": "Can Redo" + }, + "results": [ + { + "typeid": "{A0CA880C-AFE4-43CB-926C-59AC48496112}", + "details": { + "name": "Can Redo" + } + } + ] + }, + { + "base": "SaveAsChild", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Save As Child" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Save As Child is invoked" + }, + "details": { + "name": "Save As Child" + }, + "params": [ + { + "typeid": "{7114E998-A8B4-519B-9342-A86D1587B4F7}", + "details": { + "name": "Save Path" + } + } + ], + "results": [ + { + "typeid": "{A0CA880C-AFE4-43CB-926C-59AC48496112}", + "details": { + "name": "Success" + } + } + ] + }, + { + "base": "Reopen", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Reopen" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Reopen is invoked" + }, + "details": { + "name": "Reopen" + }, + "results": [ + { + "typeid": "{A0CA880C-AFE4-43CB-926C-59AC48496112}", + "details": { + "name": "Success" + } + } + ] + }, + { + "base": "Save", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Save" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Save is invoked" + }, + "details": { + "name": "Save" + }, + "results": [ + { + "typeid": "{A0CA880C-AFE4-43CB-926C-59AC48496112}", + "details": { + "name": "Success" + } + } + ] + }, + { + "base": "IsOpen", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Is Open" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Is Open is invoked" + }, + "details": { + "name": "Is Open" + }, + "results": [ + { + "typeid": "{A0CA880C-AFE4-43CB-926C-59AC48496112}", + "details": { + "name": "Is Open" + } + } + ] + }, + { + "base": "Undo", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Undo" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Undo is invoked" + }, + "details": { + "name": "Undo" + }, + "results": [ + { + "typeid": "{A0CA880C-AFE4-43CB-926C-59AC48496112}", + "details": { + "name": "Success" + } + } + ] + }, + { + "base": "Open", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Open" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Open is invoked" + }, + "details": { + "name": "Open" + }, + "params": [ + { + "typeid": "{7114E998-A8B4-519B-9342-A86D1587B4F7}", + "details": { + "name": "Load Path" + } + } + ], + "results": [ + { + "typeid": "{A0CA880C-AFE4-43CB-926C-59AC48496112}", + "details": { + "name": "Success" + } + } + ] + }, + { + "base": "CanUndo", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Can Undo" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Can Undo is invoked" + }, + "details": { + "name": "Can Undo" + }, + "results": [ + { + "typeid": "{A0CA880C-AFE4-43CB-926C-59AC48496112}", + "details": { + "name": "Can Undo" + } + } + ] + }, + { + "base": "SetPropertyValue", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Set Property Value" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Set Property Value is invoked" + }, + "details": { + "name": "Set Property Value" + }, + "params": [ + { + "typeid": "{3D2B920C-9EFD-40D5-AAE0-DF131C3D4931}", + "details": { + "name": "Property Full Name" + } + }, + { + "typeid": "{03924488-C7F4-4D6D-948B-ABC2D1AE2FD3}", + "details": { + "name": "Value" + } + } + ] + }, + { + "base": "SaveAsCopy", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Save As Copy" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Save As Copy is invoked" + }, + "details": { + "name": "Save As Copy" + }, + "params": [ + { + "typeid": "{7114E998-A8B4-519B-9342-A86D1587B4F7}", + "details": { + "name": "Save Path" + } + } + ], + "results": [ + { + "typeid": "{A0CA880C-AFE4-43CB-926C-59AC48496112}", + "details": { + "name": "Success" + } + } + ] + }, + { + "base": "BeginEdit", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Begin Edit" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Begin Edit is invoked" + }, + "details": { + "name": "Begin Edit" + }, + "results": [ + { + "typeid": "{A0CA880C-AFE4-43CB-926C-59AC48496112}", + "details": { + "name": "Begin" + } + } + ] + }, + { + "base": "GetPropertyValue", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Get Property Value" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Get Property Value is invoked" + }, + "details": { + "name": "Get Property Value" + }, + "params": [ + { + "typeid": "{3D2B920C-9EFD-40D5-AAE0-DF131C3D4931}", + "details": { + "name": "Property Full Name" + } + } + ], + "results": [ + { + "typeid": "{03924488-C7F4-4D6D-948B-ABC2D1AE2FD3}", + "details": { + "name": "Value" + } + } + ] + }, + { + "base": "Close", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Close" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Close is invoked" + }, + "details": { + "name": "Close" + }, + "results": [ + { + "typeid": "{A0CA880C-AFE4-43CB-926C-59AC48496112}", + "details": { + "name": "Success" + } + } + ] + }, + { + "base": "IsModified", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke IsModified" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after IsModified is invoked" + }, + "details": { + "name": "Is Modified" + }, + "results": [ + { + "typeid": "{A0CA880C-AFE4-43CB-926C-59AC48496112}", + "details": { + "name": "Is Modified" + } + } + ] + }, + { + "base": "EndEdit", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke End Edit" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after End Edit is invoked" + }, + "details": { + "name": "End Edit" + }, + "results": [ + { + "typeid": "{A0CA880C-AFE4-43CB-926C-59AC48496112}", + "details": { + "name": "End Edit" + } + } + ] + }, + { + "base": "GetAbsolutePath", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Get Absolute Path" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Get Absolute Path is invoked" + }, + "details": { + "name": "Get Absolute Path" + }, + "results": [ + { + "typeid": "{7114E998-A8B4-519B-9342-A86D1587B4F7}", + "details": { + "name": "Path" + } + } + ] + }, + { + "base": "GetRelativePath", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Get Relative Path" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Get Relative Path is invoked" + }, + "details": { + "name": "Get Relative Path" + }, + "results": [ + { + "typeid": "{7114E998-A8B4-519B-9342-A86D1587B4F7}", + "details": { + "name": "Path" + } + } + ] + }, + { + "base": "IsSavable", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Is Savable" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Is Savable is invoked" + }, + "details": { + "name": "Is Savable" + }, + "results": [ + { + "typeid": "{A0CA880C-AFE4-43CB-926C-59AC48496112}", + "details": { + "name": "Is Savable" + } + } + ] + }, + { + "base": "Redo", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Redo" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Redo is invoked" + }, + "details": { + "name": "Redo" + }, + "results": [ + { + "typeid": "{A0CA880C-AFE4-43CB-926C-59AC48496112}", + "details": { + "name": "Success" + } + } + ] + } + ] + } + ] +} \ No newline at end of file diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/EBus/Senders/AtomToolsDocumentSystemRequestBus.names b/Gems/ScriptCanvas/Assets/TranslationAssets/EBus/Senders/AtomToolsDocumentSystemRequestBus.names new file mode 100644 index 0000000000..020f951c51 --- /dev/null +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/EBus/Senders/AtomToolsDocumentSystemRequestBus.names @@ -0,0 +1,339 @@ +{ + "entries": [ + { + "base": "AtomToolsDocumentSystemRequestBus", + "context": "EBusSender", + "variant": "", + "details": { + "name": "Document", + "category": "Atom Tools" + }, + "methods": [ + { + "base": "SaveDocument", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Save Document" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Save Document is invoked" + }, + "details": { + "name": "Save Document" + }, + "params": [ + { + "typeid": "{E152C105-A133-4D03-BBF8-3D4B2FBA3E2A}", + "details": { + "name": "Document Id" + } + } + ], + "results": [ + { + "typeid": "{A0CA880C-AFE4-43CB-926C-59AC48496112}", + "details": { + "name": "Success" + } + } + ] + }, + { + "base": "SaveDocumentAsChild", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Save Document As Child" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Save Document As Child is invoked" + }, + "details": { + "name": "Save Document As Child" + }, + "params": [ + { + "typeid": "{E152C105-A133-4D03-BBF8-3D4B2FBA3E2A}", + "details": { + "name": "Document Id" + } + }, + { + "typeid": "{7114E998-A8B4-519B-9342-A86D1587B4F7}", + "details": { + "name": "Target Path" + } + } + ], + "results": [ + { + "typeid": "{A0CA880C-AFE4-43CB-926C-59AC48496112}", + "details": { + "name": "Success" + } + } + ] + }, + { + "base": "OpenDocument", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Open Document" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Open Document is invoked" + }, + "details": { + "name": "Open Document" + }, + "params": [ + { + "typeid": "{7114E998-A8B4-519B-9342-A86D1587B4F7}", + "details": { + "name": "Source Path" + } + } + ], + "results": [ + { + "typeid": "{E152C105-A133-4D03-BBF8-3D4B2FBA3E2A}", + "details": { + "name": "Document Id" + } + } + ] + }, + { + "base": "CreateDocumentFromFile", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Create Document From File" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Create Document From File is invoked" + }, + "details": { + "name": "Create Document From File" + }, + "params": [ + { + "typeid": "{7114E998-A8B4-519B-9342-A86D1587B4F7}", + "details": { + "name": "Source Path" + } + }, + { + "typeid": "{7114E998-A8B4-519B-9342-A86D1587B4F7}", + "details": { + "name": "Target Path" + } + } + ], + "results": [ + { + "typeid": "{E152C105-A133-4D03-BBF8-3D4B2FBA3E2A}", + "details": { + "name": "Document Id" + } + } + ] + }, + { + "base": "CloseDocument", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Close Document" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Close Document is invoked" + }, + "details": { + "name": "Close Document" + }, + "params": [ + { + "typeid": "{E152C105-A133-4D03-BBF8-3D4B2FBA3E2A}", + "details": { + "name": "Document Id" + } + } + ], + "results": [ + { + "typeid": "{A0CA880C-AFE4-43CB-926C-59AC48496112}", + "details": { + "name": "Success" + } + } + ] + }, + { + "base": "CloseAllDocuments", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Close All Documents" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Close All Documents is invoked" + }, + "details": { + "name": "Close All Documents" + }, + "results": [ + { + "typeid": "{A0CA880C-AFE4-43CB-926C-59AC48496112}", + "details": { + "name": "Success" + } + } + ] + }, + { + "base": "CloseAllDocumentsExcept", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Close All Documents Except" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Close All Documents Except is invoked" + }, + "details": { + "name": "Close All Documents Except" + }, + "params": [ + { + "typeid": "{E152C105-A133-4D03-BBF8-3D4B2FBA3E2A}", + "details": { + "name": "Document Id" + } + } + ], + "results": [ + { + "typeid": "{A0CA880C-AFE4-43CB-926C-59AC48496112}", + "details": { + "name": "Success" + } + } + ] + }, + { + "base": "CreateDocument", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Create Document" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Create Document is invoked" + }, + "details": { + "name": "Create Document" + }, + "results": [ + { + "typeid": "{E152C105-A133-4D03-BBF8-3D4B2FBA3E2A}", + "details": { + "name": "Document Id" + } + } + ] + }, + { + "base": "DestroyDocument", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Destroy Document" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Destroy Document is invoked" + }, + "details": { + "name": "Destroy Document" + }, + "params": [ + { + "typeid": "{E152C105-A133-4D03-BBF8-3D4B2FBA3E2A}", + "details": { + "name": "Document Id" + } + } + ], + "results": [ + { + "typeid": "{A0CA880C-AFE4-43CB-926C-59AC48496112}", + "details": { + "name": "Success" + } + } + ] + }, + { + "base": "SaveDocumentAsCopy", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Save Document As Copy" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Save Document As Copy is invoked" + }, + "details": { + "name": "Save Document As Copy" + }, + "params": [ + { + "typeid": "{E152C105-A133-4D03-BBF8-3D4B2FBA3E2A}", + "details": { + "name": "Document Id" + } + }, + { + "typeid": "{7114E998-A8B4-519B-9342-A86D1587B4F7}", + "details": { + "name": "Target Path" + } + } + ], + "results": [ + { + "typeid": "{A0CA880C-AFE4-43CB-926C-59AC48496112}", + "details": { + "name": "Success" + } + } + ] + }, + { + "base": "SaveAllDocuments", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Save All Documents" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Save All Documents is invoked" + }, + "details": { + "name": "Save All Documents" + }, + "results": [ + { + "typeid": "{A0CA880C-AFE4-43CB-926C-59AC48496112}", + "details": { + "name": "Success" + } + } + ] + } + ] + } + ] +} \ No newline at end of file diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/EBus/Senders/AtomToolsMainWindowFactoryRequestBus.names b/Gems/ScriptCanvas/Assets/TranslationAssets/EBus/Senders/AtomToolsMainWindowFactoryRequestBus.names new file mode 100644 index 0000000000..bbb141f329 --- /dev/null +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/EBus/Senders/AtomToolsMainWindowFactoryRequestBus.names @@ -0,0 +1,43 @@ +{ + "entries": [ + { + "base": "AtomToolsMainWindowFactoryRequestBus", + "context": "EBusSender", + "variant": "", + "details": { + "name": "Main Window Factory", + "category": "Atom Tools" + }, + "methods": [ + { + "base": "CreateMainWindow", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Create Main Window" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Create Main Window is invoked" + }, + "details": { + "name": "Create Main Window" + } + }, + { + "base": "DestroyMainWindow", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Destroy Main Window" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Destroy Main Window is invoked" + }, + "details": { + "name": "Destroy Main Window" + } + } + ] + } + ] +} \ No newline at end of file diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/EBus/Senders/AtomToolsMainWindowRequestBus.names b/Gems/ScriptCanvas/Assets/TranslationAssets/EBus/Senders/AtomToolsMainWindowRequestBus.names new file mode 100644 index 0000000000..741afa30af --- /dev/null +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/EBus/Senders/AtomToolsMainWindowRequestBus.names @@ -0,0 +1,179 @@ +{ + "entries": [ + { + "base": "AtomToolsMainWindowRequestBus", + "context": "EBusSender", + "variant": "", + "details": { + "name": "Main Window", + "category": "Atom Tools" + }, + "methods": [ + { + "base": "UnlockViewportRenderTargetSize", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Unlock Viewport Render Target Size" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Unlock Viewport Render Target Size is invoked" + }, + "details": { + "name": "Unlock Viewport Render Target Size" + } + }, + { + "base": "GetDockWidgetNames", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Get Dock Widget Names" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Get Dock Widget Names is invoked" + }, + "details": { + "name": "Get Dock Widget Names" + }, + "results": [ + { + "typeid": "{99DAD0BC-740E-5E82-826B-8FC7968CC02C}", + "details": { + "name": "Widget Names" + } + } + ] + }, + { + "base": "ResizeViewportRenderTarget", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Resize Viewport Render Target" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Resize Viewport Render Target is invoked" + }, + "details": { + "name": "Resize Viewport Render Target" + }, + "params": [ + { + "typeid": "{43DA906B-7DEF-4CA8-9790-854106D3F983}", + "details": { + "name": "Width" + } + }, + { + "typeid": "{43DA906B-7DEF-4CA8-9790-854106D3F983}", + "details": { + "name": "Height" + } + } + ] + }, + { + "base": "SetDockWidgetVisible", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Set Dock Widget Visible" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Set Dock Widget Visible is invoked" + }, + "details": { + "name": "Set Dock Widget Visible" + }, + "params": [ + { + "typeid": "{03AAAB3F-5C47-5A66-9EBC-D5FA4DB353C9}", + "details": { + "name": "Widget Name" + } + }, + { + "typeid": "{A0CA880C-AFE4-43CB-926C-59AC48496112}", + "details": { + "name": "Is Visible" + } + } + ] + }, + { + "base": "IsDockWidgetVisible", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Is Dock Widget Visible" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Is Dock Widget Visible is invoked" + }, + "details": { + "name": "Is Dock Widget Visible" + }, + "params": [ + { + "typeid": "{03AAAB3F-5C47-5A66-9EBC-D5FA4DB353C9}", + "details": { + "name": "Widget Name" + } + } + ], + "results": [ + { + "typeid": "{A0CA880C-AFE4-43CB-926C-59AC48496112}", + "details": { + "name": "Is Visible" + } + } + ] + }, + { + "base": "LockViewportRenderTargetSize", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Lock Viewport Render Target Size" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Lock Viewport Render Target Size is invoked" + }, + "details": { + "name": "Lock Viewport Render Target Size" + }, + "params": [ + { + "typeid": "{43DA906B-7DEF-4CA8-9790-854106D3F983}", + "details": { + "name": "Width" + } + }, + { + "typeid": "{43DA906B-7DEF-4CA8-9790-854106D3F983}", + "details": { + "name": "Height" + } + } + ] + }, + { + "base": "ActivateWindow", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Activate Window" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Activate Window is invoked" + }, + "details": { + "name": "Activate Window" + } + } + ] + } + ] +} \ No newline at end of file diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/EBus/Senders/AttachmentComponentRequestBus.names b/Gems/ScriptCanvas/Assets/TranslationAssets/EBus/Senders/AttachmentComponentRequestBus.names new file mode 100644 index 0000000000..5e097988a6 --- /dev/null +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/EBus/Senders/AttachmentComponentRequestBus.names @@ -0,0 +1,86 @@ +{ + "entries": [ + { + "base": "AttachmentComponentRequestBus", + "context": "EBusSender", + "variant": "", + "details": { + "name": "Attachment", + "category": "Animation" + }, + "methods": [ + { + "base": "Attach", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Attach" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Attach is invoked" + }, + "details": { + "name": "Attach" + }, + "params": [ + { + "typeid": "{6383F1D3-BB27-4E6B-A49A-6409B2059EAA}", + "details": { + "name": "Target Entity Id", + "tooltip": "The Entity to attach" + } + }, + { + "typeid": "{3AB0037F-AF8D-48CE-BCA0-A170D18B2C03}", + "details": { + "name": "Target Bone Name" + } + }, + { + "typeid": "{5D9958E9-9F1E-4985-B532-FFFDE75FEDFD}", + "details": { + "name": "Offset Transform" + } + } + ] + }, + { + "base": "Detach", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Detach" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Detach is invoked" + }, + "details": { + "name": "Detach" + } + }, + { + "base": "SetAttachmentOffset", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke SetAttachmentOffset" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after SetAttachmentOffset is invoked" + }, + "details": { + "name": "Set Attachment Offset" + }, + "params": [ + { + "typeid": "{5D9958E9-9F1E-4985-B532-FFFDE75FEDFD}", + "details": { + "name": "Offset Transform" + } + } + ] + } + ] + } + ] +} \ No newline at end of file diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/EBus/Senders/AudioEnvironmentComponentRequestBus.names b/Gems/ScriptCanvas/Assets/TranslationAssets/EBus/Senders/AudioEnvironmentComponentRequestBus.names new file mode 100644 index 0000000000..6d5ba9f6a2 --- /dev/null +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/EBus/Senders/AudioEnvironmentComponentRequestBus.names @@ -0,0 +1,68 @@ +{ + "entries": [ + { + "base": "AudioEnvironmentComponentRequestBus", + "context": "EBusSender", + "variant": "", + "details": { + "name": "Audio Environment", + "category": "Audio" + }, + "methods": [ + { + "base": "SetAmount", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Set Amount" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Set Amount is invoked" + }, + "details": { + "name": "Set Amount", + "tooltip": "Sets the amount of environmental 'send' to apply to the default environment, if set." + }, + "params": [ + { + "typeid": "{EA2C3E90-AFBE-44D4-A90D-FAAF79BAF93D}", + "details": { + "name": "Amount" + } + } + ] + }, + { + "base": "SetEnvironmentAmount", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Set Environment Amount" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Set Environment Amount is invoked" + }, + "details": { + "name": "Set Environment Amount", + "tooltip": "Sets the amount of envrionmental 'send' to apply to the specified envrionment" + }, + "params": [ + { + "typeid": "{3AB0037F-AF8D-48CE-BCA0-A170D18B2C03}", + "details": { + "name": "Envrionment", + "tooltip": "The name of the ATL Envrionment to set an amount on" + } + }, + { + "typeid": "{EA2C3E90-AFBE-44D4-A90D-FAAF79BAF93D}", + "details": { + "name": "Amount" + } + } + ] + } + ] + } + ] +} \ No newline at end of file diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/EBus/Senders/AudioListenerComponentRequestBus.names b/Gems/ScriptCanvas/Assets/TranslationAssets/EBus/Senders/AudioListenerComponentRequestBus.names new file mode 100644 index 0000000000..4f1afdb06d --- /dev/null +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/EBus/Senders/AudioListenerComponentRequestBus.names @@ -0,0 +1,109 @@ +{ + "entries": [ + { + "base": "AudioListenerComponentRequestBus", + "context": "EBusSender", + "variant": "", + "details": { + "name": "Audio Listener", + "category": "Audio" + }, + "methods": [ + { + "base": "SetRotationEntity", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Set Rotation Entity" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Set Rotation Entity is invoked" + }, + "details": { + "name": "Set Rotation Entity", + "tooltip": "Specify the entity with the rotational part of the transform that the audio listener will adopt." + }, + "params": [ + { + "typeid": "{6383F1D3-BB27-4E6B-A49A-6409B2059EAA}", + "details": { + "name": "EntityID", + "tooltip": "The entity to use for the rotational part of the transform" + } + } + ] + }, + { + "base": "SetPositionEntity", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Set Position Entity" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Set Position Entity is invoked" + }, + "details": { + "name": "Set Position Entity", + "tooltip": "Specify the entity with the positional part of the transform that the audio listener will adopt." + }, + "params": [ + { + "typeid": "{6383F1D3-BB27-4E6B-A49A-6409B2059EAA}", + "details": { + "name": "EntityID", + "tooltip": "The entity to use for the positional part of the transform" + } + } + ] + }, + { + "base": "SetFullTransformEntity", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Set Full Transform Entity" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Set Full Transform Entity is invoked" + }, + "details": { + "name": "Set Full Transform Entity", + "tooltip": "Specify the entity with the full transform that the audio listener will adopt" + }, + "params": [ + { + "typeid": "{6383F1D3-BB27-4E6B-A49A-6409B2059EAA}", + "details": { + "name": "EntityID", + "tooltip": "Entity to use for the transform" + } + } + ] + }, + { + "base": "SetListenerEnabled", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Set Listener Enabled" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Set Listener Enabled is invoked" + }, + "details": { + "name": "Set Listener Enabled" + }, + "params": [ + { + "typeid": "{A0CA880C-AFE4-43CB-926C-59AC48496112}", + "details": { + "name": "Enabled" + } + } + ] + } + ] + } + ] +} \ No newline at end of file diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/EBus/Senders/AudioPreloadComponentRequestBus.names b/Gems/ScriptCanvas/Assets/TranslationAssets/EBus/Senders/AudioPreloadComponentRequestBus.names new file mode 100644 index 0000000000..f2ce00d72e --- /dev/null +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/EBus/Senders/AudioPreloadComponentRequestBus.names @@ -0,0 +1,117 @@ +{ + "entries": [ + { + "base": "AudioPreloadComponentRequestBus", + "context": "EBusSender", + "variant": "", + "details": { + "name": "Audio Preload", + "category": "Audio" + }, + "methods": [ + { + "base": "IsLoaded", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Is Loaded" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Is Loaded is invoked" + }, + "details": { + "name": "Is Loaded" + }, + "params": [ + { + "typeid": "{3AB0037F-AF8D-48CE-BCA0-A170D18B2C03}", + "details": { + "name": "char" + } + } + ], + "results": [ + { + "typeid": "{A0CA880C-AFE4-43CB-926C-59AC48496112}", + "details": { + "name": "bool" + } + } + ] + }, + { + "base": "Unload", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Unload" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Unload is invoked" + }, + "details": { + "name": "Unload" + } + }, + { + "base": "UnloadPreload", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Unload Preload" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Unload Preload is invoked" + }, + "details": { + "name": "Unload Preload" + }, + "params": [ + { + "typeid": "{3AB0037F-AF8D-48CE-BCA0-A170D18B2C03}", + "details": { + "name": "char" + } + } + ] + }, + { + "base": "Load", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Load" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Load is invoked" + }, + "details": { + "name": "Load" + } + }, + { + "base": "LoadPreload", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Load Preload" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Load Preload is invoked" + }, + "details": { + "name": "Load Preload" + }, + "params": [ + { + "typeid": "{3AB0037F-AF8D-48CE-BCA0-A170D18B2C03}", + "details": { + "name": "char" + } + } + ] + } + ] + } + ] +} \ No newline at end of file diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/EBus/Senders/AudioRtpcComponentRequestBus.names b/Gems/ScriptCanvas/Assets/TranslationAssets/EBus/Senders/AudioRtpcComponentRequestBus.names new file mode 100644 index 0000000000..2053611961 --- /dev/null +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/EBus/Senders/AudioRtpcComponentRequestBus.names @@ -0,0 +1,67 @@ +{ + "entries": [ + { + "base": "AudioRtpcComponentRequestBus", + "context": "EBusSender", + "variant": "", + "details": { + "name": "Audio RTPC", + "category": "Audio" + }, + "methods": [ + { + "base": "SetValue", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Set Value" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Set Value is invoked" + }, + "details": { + "name": "Set Value", + "tooltip": "Sets the value of the default RTPC." + }, + "params": [ + { + "typeid": "{EA2C3E90-AFBE-44D4-A90D-FAAF79BAF93D}", + "details": { + "name": "Value" + } + } + ] + }, + { + "base": "SetRtpcValue", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Set RTPC Value" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Set RTPC Value is invoked" + }, + "details": { + "name": "Set RTPC Value", + "tooltip": "Sets the value of the specified RTPC" + }, + "params": [ + { + "typeid": "{3AB0037F-AF8D-48CE-BCA0-A170D18B2C03}", + "details": { + "name": "RTPC Name" + } + }, + { + "typeid": "{EA2C3E90-AFBE-44D4-A90D-FAAF79BAF93D}", + "details": { + "name": "Value" + } + } + ] + } + ] + } + ] +} \ No newline at end of file diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/EBus/Senders/AudioSwitchComponentRequestBus.names b/Gems/ScriptCanvas/Assets/TranslationAssets/EBus/Senders/AudioSwitchComponentRequestBus.names new file mode 100644 index 0000000000..87d263ac96 --- /dev/null +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/EBus/Senders/AudioSwitchComponentRequestBus.names @@ -0,0 +1,70 @@ +{ + "entries": [ + { + "base": "AudioSwitchComponentRequestBus", + "context": "EBusSender", + "variant": "", + "details": { + "name": "Audio Switch", + "category": "Audio" + }, + "methods": [ + { + "base": "SetState", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Set State" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Set State is invoked" + }, + "details": { + "name": "Set State", + "tooltip": "Sets the specified state of the default switch" + }, + "params": [ + { + "typeid": "{3AB0037F-AF8D-48CE-BCA0-A170D18B2C03}", + "details": { + "name": "State Name", + "tooltip": "Name of the state to set" + } + } + ] + }, + { + "base": "SetSwitchState", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Set Switch State" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Set Switch State is invoked" + }, + "details": { + "name": "Set Switch State", + "tooltip": "Sets a specified switch to a specified state" + }, + "params": [ + { + "typeid": "{3AB0037F-AF8D-48CE-BCA0-A170D18B2C03}", + "details": { + "name": "Switch Name", + "tooltip": "Name of the switch to set" + } + }, + { + "typeid": "{3AB0037F-AF8D-48CE-BCA0-A170D18B2C03}", + "details": { + "name": "State Name", + "tooltip": "Name of the state to set" + } + } + ] + } + ] + } + ] +} \ No newline at end of file diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/EBus/Senders/AudioSystemComponentRequestBus.names b/Gems/ScriptCanvas/Assets/TranslationAssets/EBus/Senders/AudioSystemComponentRequestBus.names new file mode 100644 index 0000000000..526eada299 --- /dev/null +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/EBus/Senders/AudioSystemComponentRequestBus.names @@ -0,0 +1,243 @@ +{ + "entries": [ + { + "base": "AudioSystemComponentRequestBus", + "context": "EBusSender", + "variant": "", + "details": { + "name": "Audio System", + "category": "Audio" + }, + "methods": [ + { + "base": "LevelUnloadAudio", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke LevelUnloadAudio" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after LevelUnloadAudio is invoked" + }, + "details": { + "name": "Level Unload Audio" + } + }, + { + "base": "LevelLoadAudio", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke LevelLoadAudio" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after LevelLoadAudio is invoked" + }, + "details": { + "name": "Level Load Audio" + }, + "params": [ + { + "typeid": "{7114E998-A8B4-519B-9342-A86D1587B4F7}", + "details": { + "name": "Level Name" + } + } + ] + }, + { + "base": "GlobalKillAudioTrigger", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Global Kill Audio Trigger" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Global Kill Audio Trigger is invoked" + }, + "details": { + "name": "Global Kill Audio Trigger" + }, + "params": [ + { + "typeid": "{3AB0037F-AF8D-48CE-BCA0-A170D18B2C03}", + "details": { + "name": "Trigger Name" + } + }, + { + "typeid": "{6383F1D3-BB27-4E6B-A49A-6409B2059EAA}", + "details": { + "name": "Callback Owner", + "tooltip": "Entity Unique Id" + } + } + ] + }, + { + "base": "GlobalSetAudioRtpc", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Global Set Audio RTPC" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Global Set Audio RTPC is invoked" + }, + "details": { + "name": "Global Set Audio RTPC" + }, + "params": [ + { + "typeid": "{3AB0037F-AF8D-48CE-BCA0-A170D18B2C03}", + "details": { + "name": "RTPC Name" + } + }, + { + "typeid": "{EA2C3E90-AFBE-44D4-A90D-FAAF79BAF93D}", + "details": { + "name": "Value" + } + } + ] + }, + { + "base": "GlobalSetAudioSwitchState", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Global Set Audio Switch State" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Global Set Audio Switch State is invoked" + }, + "details": { + "name": "Global Set Audio Switch State" + }, + "params": [ + { + "typeid": "{3AB0037F-AF8D-48CE-BCA0-A170D18B2C03}", + "details": { + "name": "Switch Name" + } + }, + { + "typeid": "{3AB0037F-AF8D-48CE-BCA0-A170D18B2C03}", + "details": { + "name": "State Name" + } + } + ] + }, + { + "base": "GlobalRefreshAudio", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke GlobalRefreshAudio" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after GlobalRefreshAudio is invoked" + }, + "details": { + "name": "Global Refresh Audio" + }, + "params": [ + { + "typeid": "{7114E998-A8B4-519B-9342-A86D1587B4F7}", + "details": { + "name": "Level Name" + } + } + ] + }, + { + "base": "GlobalMuteAudio", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Global Mute Audio" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Global Mute Audio is invoked" + }, + "details": { + "name": "Global Mute Audio" + } + }, + { + "base": "GlobalExecuteAudioTrigger", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Global Execute Audio Trigger" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Global Execute Audio Trigger is invoked" + }, + "details": { + "name": "Global Execute Audio Trigger" + }, + "params": [ + { + "typeid": "{3AB0037F-AF8D-48CE-BCA0-A170D18B2C03}", + "details": { + "name": "Trigger Name" + } + }, + { + "typeid": "{6383F1D3-BB27-4E6B-A49A-6409B2059EAA}", + "details": { + "name": "Callback Owner", + "tooltip": "Entity Unique Id" + } + } + ] + }, + { + "base": "GlobalStopAllSounds", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Global Stop All Sounds" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Global Stop All Sounds is invoked" + }, + "details": { + "name": "Global Stop All Sounds" + } + }, + { + "base": "GlobalUnmuteAudio", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Global Unmute Audio" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Global Unmute Audio is invoked" + }, + "details": { + "name": "Global Unmute Audio" + } + }, + { + "base": "GlobalResetAudioRtpcs", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Global Reset Audio RTPCs" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Global Reset Audio RTPCs is invoked" + }, + "details": { + "name": "Global Reset Audio RTPCs" + } + } + ] + } + ] +} \ No newline at end of file diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/EBus/Senders/AudioTriggerComponentRequestBus.names b/Gems/ScriptCanvas/Assets/TranslationAssets/EBus/Senders/AudioTriggerComponentRequestBus.names new file mode 100644 index 0000000000..3f584ca463 --- /dev/null +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/EBus/Senders/AudioTriggerComponentRequestBus.names @@ -0,0 +1,155 @@ +{ + "entries": [ + { + "base": "AudioTriggerComponentRequestBus", + "context": "EBusSender", + "variant": "", + "details": { + "name": "Audio Trigger", + "category": "Audio" + }, + "methods": [ + { + "base": "SetObstructionType", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Set Obstruction Type" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Set Obstruction Type is invoked" + }, + "details": { + "name": "Set Obstruction Type" + }, + "params": [ + { + "typeid": "{43DA906B-7DEF-4CA8-9790-854106D3F983}", + "details": { + "name": "Obstruction Type", + "tooltip": "0: Ignore, 1: Single Ray, 2: Multi Ray" + } + } + ] + }, + { + "base": "KillAllTriggers", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Kill All Triggers" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Kill All Triggers is invoked" + }, + "details": { + "name": "Kill All Triggers", + "tooltip": "Cancels all audio triggers that are active on an entity" + } + }, + { + "base": "ExecuteTrigger", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Execute Trigger" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Execute Trigger is invoked" + }, + "details": { + "name": "Execute Trigger", + "tooltip": "Runs the specified audio trigger" + }, + "params": [ + { + "typeid": "{3AB0037F-AF8D-48CE-BCA0-A170D18B2C03}", + "details": { + "name": "Trigger Name", + "tooltip": "Name of the audio trigger to run" + } + } + ] + }, + { + "base": "SetMovesWithEntity", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Set Moves With Entity" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Set Moves With Entity is invoked" + }, + "details": { + "name": "Set Moves With Entity", + "tooltip": "Specifies whether triggers should update position as the entity moves" + }, + "params": [ + { + "typeid": "{A0CA880C-AFE4-43CB-926C-59AC48496112}", + "details": { + "name": "Track Entity", + "tooltip": "Set whether triggers should track the entity's position (1 is Track, 0 is Don't Track)" + } + } + ] + }, + { + "base": "Stop", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Stop" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Stop is invoked" + }, + "details": { + "name": "Stop", + "tooltip": "Runs the default 'stop' trigger, if set. If no 'stop' trigger is set, kills the default 'play' trigger." + } + }, + { + "base": "Play", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Play" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Play is invoked" + }, + "details": { + "name": "Play", + "tooltip": "Runs the default 'play' trigger, if set." + } + }, + { + "base": "KillTrigger", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Kill Trigger" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Kill Trigger is invoked" + }, + "details": { + "name": "Kill Trigger", + "tooltip": "Cancels the specified audio trigger" + }, + "params": [ + { + "typeid": "{3AB0037F-AF8D-48CE-BCA0-A170D18B2C03}", + "details": { + "name": "Trigger Name", + "tooltip": "Name of the audio trigger to cancel" + } + } + ] + } + ] + } + ] +} \ No newline at end of file diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/EBus/Senders/AuthenticationProviderRequestBus.names b/Gems/ScriptCanvas/Assets/TranslationAssets/EBus/Senders/AuthenticationProviderRequestBus.names new file mode 100644 index 0000000000..c0db453e2e --- /dev/null +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/EBus/Senders/AuthenticationProviderRequestBus.names @@ -0,0 +1,342 @@ +{ + "entries": [ + { + "base": "AuthenticationProviderRequestBus", + "context": "EBusSender", + "variant": "", + "details": { + "name": "AWS Authentication Provider", + "category": "AWS Client Auth" + }, + "methods": [ + { + "base": "SignOut", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke SignOut" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after SignOut is invoked" + }, + "details": { + "name": "Sign Out" + }, + "params": [ + { + "typeid": "{03AAAB3F-5C47-5A66-9EBC-D5FA4DB353C9}", + "details": { + "name": "Provider name", + "tooltip": "The identity provider name" + } + } + ], + "results": [ + { + "typeid": "{A0CA880C-AFE4-43CB-926C-59AC48496112}", + "details": { + "name": "Signed Out", + "tooltip": "True: Successfully sign out" + } + } + ] + }, + { + "base": "DeviceCodeGrantConfirmSignInAsync", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Device Code Grant Confirm Sign In Async" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Device Code Grant Confirm Sign In Async is invoked" + }, + "details": { + "name": "Device Code Grant Confirm Sign In Async" + }, + "params": [ + { + "typeid": "{03AAAB3F-5C47-5A66-9EBC-D5FA4DB353C9}", + "details": { + "name": "Provider name", + "tooltip": "The identity provider name" + } + } + ] + }, + { + "base": "DeviceCodeGrantSignInAsync", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Device Code Grant Sign In Async" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Device Code Grant Sign In Async is invoked" + }, + "details": { + "name": "Device Code Grant Sign In Async" + }, + "params": [ + { + "typeid": "{03AAAB3F-5C47-5A66-9EBC-D5FA4DB353C9}", + "details": { + "name": "Provider name", + "tooltip": "The identity provider name" + } + } + ] + }, + { + "base": "PasswordGrantMultiFactorSignInAsync", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Password Grant Multi Factor Sign In Async" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Password Grant Multi Factor Sign In Async is invoked" + }, + "details": { + "name": "Password Grant Multi Factor Sign In Async" + }, + "params": [ + { + "typeid": "{03AAAB3F-5C47-5A66-9EBC-D5FA4DB353C9}", + "details": { + "name": "Provider name", + "tooltip": "The identity provider name" + } + }, + { + "typeid": "{03AAAB3F-5C47-5A66-9EBC-D5FA4DB353C9}", + "details": { + "name": "Username", + "tooltip": "The client's username" + } + }, + { + "typeid": "{03AAAB3F-5C47-5A66-9EBC-D5FA4DB353C9}", + "details": { + "name": "Password", + "tooltip": "The client's password" + } + } + ] + }, + { + "base": "GetAuthenticationTokens", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Get Authentication Tokens" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Get Authentication Tokens is invoked" + }, + "details": { + "name": "Get Authentication Tokens" + }, + "params": [ + { + "typeid": "{03AAAB3F-5C47-5A66-9EBC-D5FA4DB353C9}", + "details": { + "name": "Provider name", + "tooltip": "The identity provider name" + } + } + ], + "results": [ + { + "typeid": "{F965D1B2-9DE3-4900-B44B-E58D9F083ACB}", + "details": { + "name": "AuthenticationTokens" + } + } + ] + }, + { + "base": "GetTokensWithRefreshAsync", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Get Tokens With Refresh Async" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Get Tokens With Refresh Async is invoked" + }, + "details": { + "name": "Get Tokens With Refresh Async" + }, + "params": [ + { + "typeid": "{03AAAB3F-5C47-5A66-9EBC-D5FA4DB353C9}", + "details": { + "name": "Provider name", + "tooltip": "The identity provider name" + } + } + ] + }, + { + "base": "IsSignedIn", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Is Signed In" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Is Signed In is invoked" + }, + "details": { + "name": "Is Signed In" + }, + "params": [ + { + "typeid": "{03AAAB3F-5C47-5A66-9EBC-D5FA4DB353C9}", + "details": { + "name": "Provider name", + "tooltip": "The identity provider name" + } + } + ], + "results": [ + { + "typeid": "{A0CA880C-AFE4-43CB-926C-59AC48496112}", + "details": { + "name": "Is Signed In" + } + } + ] + }, + { + "base": "PasswordGrantSingleFactorSignInAsync", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Password GrantSingle Factor Sign In Async" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Password GrantSingle Factor Sign In Async is invoked" + }, + "details": { + "name": "Password GrantSingle Factor Sign In Async" + }, + "params": [ + { + "typeid": "{03AAAB3F-5C47-5A66-9EBC-D5FA4DB353C9}", + "details": { + "name": "Provider name", + "tooltip": "The identity provider" + } + }, + { + "typeid": "{03AAAB3F-5C47-5A66-9EBC-D5FA4DB353C9}", + "details": { + "name": "Username", + "tooltip": "The client's username" + } + }, + { + "typeid": "{03AAAB3F-5C47-5A66-9EBC-D5FA4DB353C9}", + "details": { + "name": "Password", + "tooltip": "The client's password" + } + } + ] + }, + { + "base": "RefreshTokensAsync", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Refresh Tokens Async" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Refresh Tokens Async is invoked" + }, + "details": { + "name": "Refresh Tokens Async" + }, + "params": [ + { + "typeid": "{03AAAB3F-5C47-5A66-9EBC-D5FA4DB353C9}", + "details": { + "name": "Provider name", + "tooltip": "The identity provider name" + } + } + ] + }, + { + "base": "Initialize", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Initialize" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Initialize is invoked" + }, + "details": { + "name": "Initialize" + }, + "params": [ + { + "typeid": "{99DAD0BC-740E-5E82-826B-8FC7968CC02C}", + "details": { + "name": "Provider Names" + } + } + ], + "results": [ + { + "typeid": "{A0CA880C-AFE4-43CB-926C-59AC48496112}", + "details": { + "name": "Initialized" + } + } + ] + }, + { + "base": "PasswordGrantMultiFactorConfirmSignInAsync", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Password Grant Multi Factor Confirm Sign In Async" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Password Grant Multi Factor Confirm Sign In Async is invoked" + }, + "details": { + "name": "Password Grant Multi Factor Confirm Sign In Async" + }, + "params": [ + { + "typeid": "{03AAAB3F-5C47-5A66-9EBC-D5FA4DB353C9}", + "details": { + "name": "Provider name", + "tooltip": "The identity provider name" + } + }, + { + "typeid": "{03AAAB3F-5C47-5A66-9EBC-D5FA4DB353C9}", + "details": { + "name": "Username", + "tooltip": "The client's username" + } + }, + { + "typeid": "{03AAAB3F-5C47-5A66-9EBC-D5FA4DB353C9}", + "details": { + "name": "Confirmation code", + "tooltip": "The client's confirmation code" + } + } + ] + } + ] + } + ] +} \ No newline at end of file diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/EBus/Senders/BlastFamilyComponentRequestBus.names b/Gems/ScriptCanvas/Assets/TranslationAssets/EBus/Senders/BlastFamilyComponentRequestBus.names new file mode 100644 index 0000000000..3c71a6e04c --- /dev/null +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/EBus/Senders/BlastFamilyComponentRequestBus.names @@ -0,0 +1,36 @@ +{ + "entries": [ + { + "base": "BlastFamilyComponentRequestBus", + "context": "EBusSender", + "variant": "", + "details": { + "name": "Blast Family" + }, + "methods": [ + { + "base": "Get Actors Data", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Get Actors Data" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Get Actors Data is invoked" + }, + "details": { + "name": "Get Actors Data" + }, + "results": [ + { + "typeid": "{9B2C5410-EFDC-5A61-8B89-0F515B41AB24}", + "details": { + "name": "Actors Data" + } + } + ] + } + ] + } + ] +} \ No newline at end of file diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/EBus/Senders/BlastFamilyDamageRequestBus.names b/Gems/ScriptCanvas/Assets/TranslationAssets/EBus/Senders/BlastFamilyDamageRequestBus.names new file mode 100644 index 0000000000..9dec40475a --- /dev/null +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/EBus/Senders/BlastFamilyDamageRequestBus.names @@ -0,0 +1,315 @@ +{ + "entries": [ + { + "base": "BlastFamilyDamageRequestBus", + "context": "EBusSender", + "variant": "", + "details": { + "name": "Blast Family Damage" + }, + "methods": [ + { + "base": "Get Family Id", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Get Family Id" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Get Family Id is invoked" + }, + "details": { + "name": "Get Family Id" + }, + "results": [ + { + "typeid": "{6383F1D3-BB27-4E6B-A49A-6409B2059EAA}", + "details": { + "name": "Entity Id", + "tooltip": "Entity Unique Id" + } + } + ] + }, + { + "base": "Destroy actor", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Destroy actor" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Destroy actor is invoked" + }, + "details": { + "name": "Destroy Actor" + } + }, + { + "base": "Triangle Damage", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Triangle Damage" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Triangle Damage is invoked" + }, + "details": { + "name": "Triangle Damage" + }, + "params": [ + { + "typeid": "{8379EB7D-01FA-4538-B64B-A6543B4BE73D}", + "details": { + "name": "Position 0", + "tooltip": "Vertex of the triangle." + } + }, + { + "typeid": "{8379EB7D-01FA-4538-B64B-A6543B4BE73D}", + "details": { + "name": "Position 1", + "tooltip": "Vertex of the triangle." + } + }, + { + "typeid": "{8379EB7D-01FA-4538-B64B-A6543B4BE73D}", + "details": { + "name": "Position 2", + "tooltip": "Vertex of the triangle." + } + }, + { + "typeid": "{EA2C3E90-AFBE-44D4-A90D-FAAF79BAF93D}", + "details": { + "name": "Damage", + "tooltip": "How much damage to deal." + } + } + ] + }, + { + "base": "Impact Spread Damage", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Impact Spread Damage" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Impact Spread Damage is invoked" + }, + "details": { + "name": "Impact Spread Damage" + }, + "params": [ + { + "typeid": "{8379EB7D-01FA-4538-B64B-A6543B4BE73D}", + "details": { + "name": "Position", + "tooltip": "The global position of the damage's hit." + } + }, + { + "typeid": "{EA2C3E90-AFBE-44D4-A90D-FAAF79BAF93D}", + "details": { + "name": "Min Radius", + "tooltip": "Damages all chunks/bonds that are in the range [0, minRadius] with full damage" + } + }, + { + "typeid": "{EA2C3E90-AFBE-44D4-A90D-FAAF79BAF93D}", + "details": { + "name": "Max Radius", + "tooltip": "Damages all chunks/bonds that are in the range [minRadius, maxRadius] with linearly decreasing damage." + } + }, + { + "typeid": "{EA2C3E90-AFBE-44D4-A90D-FAAF79BAF93D}", + "details": { + "name": "Damage", + "tooltip": "How much damage to deal." + } + } + ] + }, + { + "base": "Stress Damage", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Stress Damage" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Stress Damage is invoked" + }, + "details": { + "name": "Stress Damage" + }, + "params": [ + { + "typeid": "{8379EB7D-01FA-4538-B64B-A6543B4BE73D}", + "details": { + "name": "Position", + "tooltip": "The global position of the damage's hit." + } + }, + { + "typeid": "{8379EB7D-01FA-4538-B64B-A6543B4BE73D}", + "details": { + "name": "Force", + "tooltip": "The force applied at the position." + } + } + ] + }, + { + "base": "Shear Damage", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Shear Damage" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Shear Damage is invoked" + }, + "details": { + "name": "Shear Damage" + }, + "params": [ + { + "typeid": "{8379EB7D-01FA-4538-B64B-A6543B4BE73D}", + "details": { + "name": "Position", + "tooltip": "The global position of the damage's hit." + } + }, + { + "typeid": "{8379EB7D-01FA-4538-B64B-A6543B4BE73D}", + "details": { + "name": "Normal", + "tooltip": "The normal of the damage's hit." + } + }, + { + "typeid": "{EA2C3E90-AFBE-44D4-A90D-FAAF79BAF93D}", + "details": { + "name": "Min Radius", + "tooltip": "Damages all chunks/bonds that are in the range [0, minRadius] with full damage." + } + }, + { + "typeid": "{EA2C3E90-AFBE-44D4-A90D-FAAF79BAF93D}", + "details": { + "name": "Max Radius", + "tooltip": "Damages all chunks/bonds that are in the range [minRadius, maxRadius] with linearly decreasing damage." + } + }, + { + "typeid": "{EA2C3E90-AFBE-44D4-A90D-FAAF79BAF93D}", + "details": { + "name": "Damage", + "tooltip": "How much damage to deal." + } + } + ] + }, + { + "base": "Capsule Damage", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Capsule Damage" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Capsule Damage is invoked" + }, + "details": { + "name": "Capsule Damage" + }, + "params": [ + { + "typeid": "{8379EB7D-01FA-4538-B64B-A6543B4BE73D}", + "details": { + "name": "Position 0", + "tooltip": "The global position of one of the capsule's ends." + } + }, + { + "typeid": "{8379EB7D-01FA-4538-B64B-A6543B4BE73D}", + "details": { + "name": "Position 1", + "tooltip": "The global position of another of the capsule's ends." + } + }, + { + "typeid": "{EA2C3E90-AFBE-44D4-A90D-FAAF79BAF93D}", + "details": { + "name": "Min Radius", + "tooltip": "Damages all chunks/bonds that are in the range [0, minRadius] with full damage." + } + }, + { + "typeid": "{EA2C3E90-AFBE-44D4-A90D-FAAF79BAF93D}", + "details": { + "name": "Max Radius", + "tooltip": "Damages all chunks/bonds that are in the range [minRadius, maxRadius] with linearly decreasing damage." + } + }, + { + "typeid": "{EA2C3E90-AFBE-44D4-A90D-FAAF79BAF93D}", + "details": { + "name": "Damage", + "tooltip": "How much damage to deal." + } + } + ] + }, + { + "base": "Radial Damage", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Radial Damage" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Radial Damage is invoked" + }, + "details": { + "name": "Radial Damage" + }, + "params": [ + { + "typeid": "{8379EB7D-01FA-4538-B64B-A6543B4BE73D}", + "details": { + "name": "Position", + "tooltip": "The global position of the damage's hit." + } + }, + { + "typeid": "{EA2C3E90-AFBE-44D4-A90D-FAAF79BAF93D}", + "details": { + "name": "Min Radius", + "tooltip": "Damages all chunks/bonds that are in the range [0, minRadius] with full damage." + } + }, + { + "typeid": "{EA2C3E90-AFBE-44D4-A90D-FAAF79BAF93D}", + "details": { + "name": "Max Radius", + "tooltip": "Damages all chunks/bonds that are in the range [minRadius, maxRadius] with linearly decreasing damage." + } + }, + { + "typeid": "{EA2C3E90-AFBE-44D4-A90D-FAAF79BAF93D}", + "details": { + "name": "Damage", + "tooltip": "How much damage to deal." + } + } + ] + } + ] + } + ] +} \ No newline at end of file diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/EBus/Senders/BloomRequestBus.names b/Gems/ScriptCanvas/Assets/TranslationAssets/EBus/Senders/BloomRequestBus.names new file mode 100644 index 0000000000..4e7b53693e --- /dev/null +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/EBus/Senders/BloomRequestBus.names @@ -0,0 +1,1423 @@ +{ + "entries": [ + { + "base": "BloomRequestBus", + "context": "EBusSender", + "variant": "", + "details": { + "name": "Bloom", + "category": "Rendering" + }, + "methods": [ + { + "base": "GetTintStage0Override", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Get Tint Stage 0 Override" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Get Tint Stage 0 Override is invoked" + }, + "details": { + "name": "Get Tint Stage 0 Override" + }, + "results": [ + { + "typeid": "{EA2C3E90-AFBE-44D4-A90D-FAAF79BAF93D}", + "details": { + "name": "Value" + } + } + ] + }, + { + "base": "SetTintStage0Override", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Set Tint Stage 0 Override" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Set Tint Stage 0 Override is invoked" + }, + "details": { + "name": "Set Tint Stage 0 Override" + }, + "params": [ + { + "typeid": "{EA2C3E90-AFBE-44D4-A90D-FAAF79BAF93D}", + "details": { + "name": "Value" + } + } + ] + }, + { + "base": "SetTintStage1", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Set Tint Stage 1" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Set Tint Stage 1 is invoked" + }, + "details": { + "name": "Set Tint Stage 1" + }, + "params": [ + { + "typeid": "{8379EB7D-01FA-4538-B64B-A6543B4BE73D}", + "details": { + "name": "Value" + } + } + ] + }, + { + "base": "SetTintStage0", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Set Tint Stage 0" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Set Tint Stage 0 is invoked" + }, + "details": { + "name": "Set Tint Stage 0" + }, + "params": [ + { + "typeid": "{8379EB7D-01FA-4538-B64B-A6543B4BE73D}", + "details": { + "name": "Value" + } + } + ] + }, + { + "base": "GetKernelSizeStage3Override", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Get Kernel Size Stage 3 Override" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Get Kernel Size Stage 3 Override is invoked" + }, + "details": { + "name": "Get Kernel Size Stage 3 Override" + }, + "results": [ + { + "typeid": "{EA2C3E90-AFBE-44D4-A90D-FAAF79BAF93D}", + "details": { + "name": "Value" + } + } + ] + }, + { + "base": "GetTintStage3Override", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Get Tint Stage 3 Override" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Get Tint Stage 3 Override is invoked" + }, + "details": { + "name": "Get Tint Stage 3 Override" + }, + "results": [ + { + "typeid": "{EA2C3E90-AFBE-44D4-A90D-FAAF79BAF93D}", + "details": { + "name": "Value" + } + } + ] + }, + { + "base": "SetKernelSizeScaleOverride", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Set Kernel Size Scale Override" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Set Kernel Size Scale Override is invoked" + }, + "details": { + "name": "Set Kernel Size Scale Override" + }, + "params": [ + { + "typeid": "{EA2C3E90-AFBE-44D4-A90D-FAAF79BAF93D}", + "details": { + "name": "Value" + } + } + ] + }, + { + "base": "SetKernelSizeStage2", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Set Kernel Size Stage 2" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Set Kernel Size Stage 2 is invoked" + }, + "details": { + "name": "Set Kernel Size Stage 2" + }, + "params": [ + { + "typeid": "{EA2C3E90-AFBE-44D4-A90D-FAAF79BAF93D}", + "details": { + "name": "Value" + } + } + ] + }, + { + "base": "GetKernelSizeStage4", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Get Kernel Size Stage 4" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Get Kernel Size Stage 4 is invoked" + }, + "details": { + "name": "Get Kernel Size Stage 4" + }, + "results": [ + { + "typeid": "{EA2C3E90-AFBE-44D4-A90D-FAAF79BAF93D}", + "details": { + "name": "Value" + } + } + ] + }, + { + "base": "GetTintStage0", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Get Tint Stage 0" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Get Tint Stage 0 is invoked" + }, + "details": { + "name": "Get Tint Stage 0" + }, + "results": [ + { + "typeid": "{8379EB7D-01FA-4538-B64B-A6543B4BE73D}", + "details": { + "name": "Value" + } + } + ] + }, + { + "base": "SetTintStage4Override", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Set Tint Stage 4 Override" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Set Tint Stage 4 Override is invoked" + }, + "details": { + "name": "Set Tint Stage 4 Override" + }, + "params": [ + { + "typeid": "{EA2C3E90-AFBE-44D4-A90D-FAAF79BAF93D}", + "details": { + "name": "Value" + } + } + ] + }, + { + "base": "GetKernelSizeScale", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Get Kernel Size Scale" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Get Kernel Size Scale is invoked" + }, + "details": { + "name": "Get Kernel Size Scale" + }, + "results": [ + { + "typeid": "{EA2C3E90-AFBE-44D4-A90D-FAAF79BAF93D}", + "details": { + "name": "Value" + } + } + ] + }, + { + "base": "GetKernelSizeStage2", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Get Kernel Size Stage 2" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Get Kernel Size Stage 2 is invoked" + }, + "details": { + "name": "Get Kernel Size Stage 2" + }, + "results": [ + { + "typeid": "{EA2C3E90-AFBE-44D4-A90D-FAAF79BAF93D}", + "details": { + "name": "Value" + } + } + ] + }, + { + "base": "SetTintStage1Override", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Set Tint Stage 1 Override" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Set Tint Stage 1 Override is invoked" + }, + "details": { + "name": "Set Tint Stage 1 Override" + }, + "params": [ + { + "typeid": "{EA2C3E90-AFBE-44D4-A90D-FAAF79BAF93D}", + "details": { + "name": "Value" + } + } + ] + }, + { + "base": "SetTintStage3", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Set Tint Stage 3" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Set Tint Stage 3 is invoked" + }, + "details": { + "name": "Set Tint Stage 3" + }, + "params": [ + { + "typeid": "{8379EB7D-01FA-4538-B64B-A6543B4BE73D}", + "details": { + "name": "Value" + } + } + ] + }, + { + "base": "GetEnabledOverride", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Get Enabled Override" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Get Enabled Override is invoked" + }, + "details": { + "name": "Get Enabled Override" + }, + "results": [ + { + "typeid": "{A0CA880C-AFE4-43CB-926C-59AC48496112}", + "details": { + "name": "Enabled" + } + } + ] + }, + { + "base": "SetTintStage3Override", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Set Tint Stage 3 Override" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Set Tint Stage 3 Override is invoked" + }, + "details": { + "name": "Set Tint Stage 3 Override" + }, + "params": [ + { + "typeid": "{EA2C3E90-AFBE-44D4-A90D-FAAF79BAF93D}", + "details": { + "name": "Value" + } + } + ] + }, + { + "base": "SetEnabledOverride", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Set Enabled Override" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Set Enabled Override is invoked" + }, + "details": { + "name": "Set Enabled Override" + }, + "params": [ + { + "typeid": "{A0CA880C-AFE4-43CB-926C-59AC48496112}", + "details": { + "name": "Enabled" + } + } + ] + }, + { + "base": "SetKernelSizeStage0", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Set Kernel Size Stage 0" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Set Kernel Size Stage 0 is invoked" + }, + "details": { + "name": "Set Kernel Size Stage 0" + }, + "params": [ + { + "typeid": "{EA2C3E90-AFBE-44D4-A90D-FAAF79BAF93D}", + "details": { + "name": "Value" + } + } + ] + }, + { + "base": "GetKernelSizeStage0Override", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Get Kernel Size Stage 0 Override" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Get Kernel Size Stage 0 Override is invoked" + }, + "details": { + "name": "Get Kernel Size Stage 0 Override" + }, + "results": [ + { + "typeid": "{EA2C3E90-AFBE-44D4-A90D-FAAF79BAF93D}", + "details": { + "name": "Value" + } + } + ] + }, + { + "base": "SetKernelSizeStage4Override", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Set Kernel Size Stage 4 Override" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Set Kernel Size Stage 4 Override is invoked" + }, + "details": { + "name": "Set Kernel Size Stage 4 Override" + }, + "params": [ + { + "typeid": "{EA2C3E90-AFBE-44D4-A90D-FAAF79BAF93D}", + "details": { + "name": "Value" + } + } + ] + }, + { + "base": "GetTintStage2", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Get Tint Stage 2" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Get Tint Stage 2 is invoked" + }, + "details": { + "name": "Get Tint Stage 2" + }, + "results": [ + { + "typeid": "{8379EB7D-01FA-4538-B64B-A6543B4BE73D}", + "details": { + "name": "Value" + } + } + ] + }, + { + "base": "GetTintStage4Override", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Get Tint Stage 4 Override" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Get Tint Stage 4 Override is invoked" + }, + "details": { + "name": "Get Tint Stage 4 Override" + }, + "results": [ + { + "typeid": "{EA2C3E90-AFBE-44D4-A90D-FAAF79BAF93D}", + "details": { + "name": "Value" + } + } + ] + }, + { + "base": "SetKernelSizeStage0Override", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Set Kernel Size Stage 0 Override" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Set Kernel Size Stage 0 Override is invoked" + }, + "details": { + "name": "Set Kernel Size Stage 0 Override" + }, + "params": [ + { + "typeid": "{EA2C3E90-AFBE-44D4-A90D-FAAF79BAF93D}", + "details": { + "name": "Value" + } + } + ] + }, + { + "base": "GetKernelSizeStage4Override", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Get Kernel Size Stage 4 Override" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Get Kernel Size Stage 4 Override is invoked" + }, + "details": { + "name": "Get Kernel Size Stage 4 Override" + }, + "results": [ + { + "typeid": "{EA2C3E90-AFBE-44D4-A90D-FAAF79BAF93D}", + "details": { + "name": "Value" + } + } + ] + }, + { + "base": "GetTintStage2Override", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Get Tint Stage 2 Override" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Get Tint Stage 2 Override is invoked" + }, + "details": { + "name": "Get Tint Stage 2 Override" + }, + "results": [ + { + "typeid": "{EA2C3E90-AFBE-44D4-A90D-FAAF79BAF93D}", + "details": { + "name": "Value" + } + } + ] + }, + { + "base": "GetTintStage3", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Get Tint Stage 3" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Get Tint Stage 3 is invoked" + }, + "details": { + "name": "Get Tint Stage 3" + }, + "results": [ + { + "typeid": "{8379EB7D-01FA-4538-B64B-A6543B4BE73D}", + "details": { + "name": "Value" + } + } + ] + }, + { + "base": "SetKernelSizeScale", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Set Kernel Size Scale" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Set Kernel Size Scale is invoked" + }, + "details": { + "name": "Set Kernel Size Scale" + }, + "params": [ + { + "typeid": "{EA2C3E90-AFBE-44D4-A90D-FAAF79BAF93D}", + "details": { + "name": "Value" + } + } + ] + }, + { + "base": "GetIntensity", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Get Intensity" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Get Intensity is invoked" + }, + "details": { + "name": "Get Intensity" + }, + "results": [ + { + "typeid": "{EA2C3E90-AFBE-44D4-A90D-FAAF79BAF93D}", + "details": { + "name": "Value" + } + } + ] + }, + { + "base": "GetBicubicEnabledOverride", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Get Bicubic Enabled Override" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Get Bicubic Enabled Override is invoked" + }, + "details": { + "name": "Get Bicubic Enabled Override" + }, + "results": [ + { + "typeid": "{A0CA880C-AFE4-43CB-926C-59AC48496112}", + "details": { + "name": "Enabled" + } + } + ] + }, + { + "base": "SetKernelSizeStage4", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Set Kernel Size Stage 4" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Set Kernel Size Stage 4 is invoked" + }, + "details": { + "name": "Set Kernel Size Stage 4" + }, + "params": [ + { + "typeid": "{EA2C3E90-AFBE-44D4-A90D-FAAF79BAF93D}", + "details": { + "name": "Value" + } + } + ] + }, + { + "base": "SetBicubicEnabled", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Set Bicubic Enabled" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Set Bicubic Enabled is invoked" + }, + "details": { + "name": "Set Bicubic Enabled" + }, + "params": [ + { + "typeid": "{A0CA880C-AFE4-43CB-926C-59AC48496112}", + "details": { + "name": "Enabled" + } + } + ] + }, + { + "base": "GetKernelSizeStage1Override", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Get Kernel Size Stage 1 Override" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Get Kernel Size Stage 1 Override is invoked" + }, + "details": { + "name": "Get Kernel Size Stage 1 Override" + }, + "results": [ + { + "typeid": "{EA2C3E90-AFBE-44D4-A90D-FAAF79BAF93D}", + "details": { + "name": "Value" + } + } + ] + }, + { + "base": "GetThresholdOverride", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Get Threshold Override" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Get Threshold Override is invoked" + }, + "details": { + "name": "Get Threshold Override" + }, + "results": [ + { + "typeid": "{EA2C3E90-AFBE-44D4-A90D-FAAF79BAF93D}", + "details": { + "name": "Value" + } + } + ] + }, + { + "base": "SetIntensity", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Set Intensity" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Set Intensity is invoked" + }, + "details": { + "name": "Set Intensity" + }, + "params": [ + { + "typeid": "{EA2C3E90-AFBE-44D4-A90D-FAAF79BAF93D}", + "details": { + "name": "Value" + } + } + ] + }, + { + "base": "SetBicubicEnabledOverride", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Set Bicubic Enabled Override" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Set Bicubic Enabled Override is invoked" + }, + "details": { + "name": "Set Bicubic Enabled Override" + }, + "params": [ + { + "typeid": "{A0CA880C-AFE4-43CB-926C-59AC48496112}", + "details": { + "name": "Enabled" + } + } + ] + }, + { + "base": "GetKernelSizeStage1", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Get Kernel Size Stage 1" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Get Kernel Size Stage 1 is invoked" + }, + "details": { + "name": "Get Kernel Size Stage 1" + }, + "results": [ + { + "typeid": "{EA2C3E90-AFBE-44D4-A90D-FAAF79BAF93D}", + "details": { + "name": "Value" + } + } + ] + }, + { + "base": "GetKernelSizeStage2Override", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Get Kernel Size Stage 2 Override" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Get Kernel Size Stage 2 Override is invoked" + }, + "details": { + "name": "Get Kernel Size Stage 2 Override" + }, + "results": [ + { + "typeid": "{EA2C3E90-AFBE-44D4-A90D-FAAF79BAF93D}", + "details": { + "name": "Value" + } + } + ] + }, + { + "base": "SetTintStage4", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Set Tint Stage 4" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Set Tint Stage 4 is invoked" + }, + "details": { + "name": "Set Tint Stage 4" + }, + "params": [ + { + "typeid": "{8379EB7D-01FA-4538-B64B-A6543B4BE73D}", + "details": { + "name": "Value" + } + } + ] + }, + { + "base": "SetKernelSizeStage1", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Set Kernel Size Stage 1" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Set Kernel Size Stage 1 is invoked" + }, + "details": { + "name": "Set Kernel Size Stage 1" + }, + "params": [ + { + "typeid": "{EA2C3E90-AFBE-44D4-A90D-FAAF79BAF93D}", + "details": { + "name": "Value" + } + } + ] + }, + { + "base": "SetThresholdOverride", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Set Threshold Override" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Set Threshold Override is invoked" + }, + "details": { + "name": "Set Threshold Override" + }, + "params": [ + { + "typeid": "{EA2C3E90-AFBE-44D4-A90D-FAAF79BAF93D}", + "details": { + "name": "Value" + } + } + ] + }, + { + "base": "GetTintStage1", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Get Tint Stage 1" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Get Tint Stage 1 is invoked" + }, + "details": { + "name": "Get Tint Stage 1" + }, + "results": [ + { + "typeid": "{8379EB7D-01FA-4538-B64B-A6543B4BE73D}", + "details": { + "name": "Value" + } + } + ] + }, + { + "base": "GetKnee", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Get Knee" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Get Knee is invoked" + }, + "details": { + "name": "Get Knee" + }, + "results": [ + { + "typeid": "{EA2C3E90-AFBE-44D4-A90D-FAAF79BAF93D}", + "details": { + "name": "Value" + } + } + ] + }, + { + "base": "SetThreshold", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Set Threshold" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Set Threshold is invoked" + }, + "details": { + "name": "Set Threshold" + }, + "params": [ + { + "typeid": "{EA2C3E90-AFBE-44D4-A90D-FAAF79BAF93D}", + "details": { + "name": "Value" + } + } + ] + }, + { + "base": "SetIntensityOverride", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Set Intensity Override" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Set Intensity Override is invoked" + }, + "details": { + "name": "Set Intensity Override" + }, + "params": [ + { + "typeid": "{EA2C3E90-AFBE-44D4-A90D-FAAF79BAF93D}", + "details": { + "name": "Value" + } + } + ] + }, + { + "base": "GetEnabled", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Get Enabled" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Get Enabled is invoked" + }, + "details": { + "name": "Get Enabled" + }, + "results": [ + { + "typeid": "{A0CA880C-AFE4-43CB-926C-59AC48496112}", + "details": { + "name": "Enabled" + } + } + ] + }, + { + "base": "SetKernelSizeStage1Override", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Set Kernel Size Stage 1 Override" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Set Kernel Size Stage 1 Override is invoked" + }, + "details": { + "name": "Set Kernel Size Stage 1 Override" + }, + "params": [ + { + "typeid": "{EA2C3E90-AFBE-44D4-A90D-FAAF79BAF93D}", + "details": { + "name": "Value" + } + } + ] + }, + { + "base": "GetKernelSizeStage0", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Get Kernel Size Stage 0" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Get Kernel Size Stage 0 is invoked" + }, + "details": { + "name": "Get Kernel Size Stage 0" + }, + "results": [ + { + "typeid": "{EA2C3E90-AFBE-44D4-A90D-FAAF79BAF93D}", + "details": { + "name": "Value" + } + } + ] + }, + { + "base": "SetTintStage2Override", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Set Tint Stage 2 Override" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Set Tint Stage 2 Override is invoked" + }, + "details": { + "name": "Set Tint Stage 2 Override" + }, + "params": [ + { + "typeid": "{EA2C3E90-AFBE-44D4-A90D-FAAF79BAF93D}", + "details": { + "name": "Value" + } + } + ] + }, + { + "base": "GetTintStage4", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Get Tint Stage 4" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Get Tint Stage 4 is invoked" + }, + "details": { + "name": "Get Tint Stage 4" + }, + "results": [ + { + "typeid": "{8379EB7D-01FA-4538-B64B-A6543B4BE73D}", + "details": { + "name": "Value" + } + } + ] + }, + { + "base": "GetKernelSizeScaleOverride", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Get Kernel Size Scale Override" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Get Kernel Size Scale Override is invoked" + }, + "details": { + "name": "Get Kernel Size Scale Override" + }, + "results": [ + { + "typeid": "{EA2C3E90-AFBE-44D4-A90D-FAAF79BAF93D}", + "details": { + "name": "Value" + } + } + ] + }, + { + "base": "SetKernelSizeStage2Override", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Set Kernel Size Stage 2 Override" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Set Kernel Size Stage 2 Override is invoked" + }, + "details": { + "name": "Set Kernel Size Stage 2 Override" + }, + "params": [ + { + "typeid": "{EA2C3E90-AFBE-44D4-A90D-FAAF79BAF93D}", + "details": { + "name": "Value" + } + } + ] + }, + { + "base": "GetKernelSizeStage3", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Get Kernel Size Stage 3" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Get Kernel Size Stage 3 is invoked" + }, + "details": { + "name": "Get Kernel Size Stage 3" + }, + "results": [ + { + "typeid": "{EA2C3E90-AFBE-44D4-A90D-FAAF79BAF93D}", + "details": { + "name": "Value" + } + } + ] + }, + { + "base": "GetTintStage1Override", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Get Tint Stage 1 Override" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Get Tint Stage 1 Override is invoked" + }, + "details": { + "name": "Get Tint Stage 1 Override" + }, + "results": [ + { + "typeid": "{EA2C3E90-AFBE-44D4-A90D-FAAF79BAF93D}", + "details": { + "name": "Value" + } + } + ] + }, + { + "base": "SetTintStage2", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Set Tint Stage 2" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Set Tint Stage 2 is invoked" + }, + "details": { + "name": "Set Tint Stage 2" + }, + "params": [ + { + "typeid": "{8379EB7D-01FA-4538-B64B-A6543B4BE73D}", + "details": { + "name": "Value" + } + } + ] + }, + { + "base": "GetKneeOverride", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Get Knee Override" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Get Knee Override is invoked" + }, + "details": { + "name": "Get Knee Override" + }, + "results": [ + { + "typeid": "{EA2C3E90-AFBE-44D4-A90D-FAAF79BAF93D}", + "details": { + "name": "Value" + } + } + ] + }, + { + "base": "SetKnee", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Set Knee" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Set Knee is invoked" + }, + "details": { + "name": "Set Knee" + }, + "params": [ + { + "typeid": "{EA2C3E90-AFBE-44D4-A90D-FAAF79BAF93D}", + "details": { + "name": "Value" + } + } + ] + }, + { + "base": "GetIntensityOverride", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Get Intensity Override" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Get Intensity Override is invoked" + }, + "details": { + "name": "Get Intensity Override" + }, + "results": [ + { + "typeid": "{EA2C3E90-AFBE-44D4-A90D-FAAF79BAF93D}", + "details": { + "name": "Value" + } + } + ] + }, + { + "base": "SetEnabled", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Set Enabled" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Set Enabled is invoked" + }, + "details": { + "name": "Set Enabled" + }, + "params": [ + { + "typeid": "{A0CA880C-AFE4-43CB-926C-59AC48496112}", + "details": { + "name": "Enabled" + } + } + ] + }, + { + "base": "GetThreshold", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Get Threshold" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Get Threshold is invoked" + }, + "details": { + "name": "Get Threshold" + }, + "results": [ + { + "typeid": "{EA2C3E90-AFBE-44D4-A90D-FAAF79BAF93D}", + "details": { + "name": "Value" + } + } + ] + }, + { + "base": "SetKernelSizeStage3", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Set Kernel Size Stage 3" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Set Kernel Size Stage 3 is invoked" + }, + "details": { + "name": "Set Kernel Size Stage 3" + }, + "params": [ + { + "typeid": "{EA2C3E90-AFBE-44D4-A90D-FAAF79BAF93D}", + "details": { + "name": "Value" + } + } + ] + }, + { + "base": "SetKernelSizeStage3Override", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Set Kernel Size Stage 3 Override" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Set Kernel Size Stage 3 Override is invoked" + }, + "details": { + "name": "Set Kernel Size Stage 3 Override" + }, + "params": [ + { + "typeid": "{EA2C3E90-AFBE-44D4-A90D-FAAF79BAF93D}", + "details": { + "name": "Value" + } + } + ] + }, + { + "base": "SetKneeOverride", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Set Knee Override" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Set Knee Override is invoked" + }, + "details": { + "name": "Set Knee Override" + }, + "params": [ + { + "typeid": "{EA2C3E90-AFBE-44D4-A90D-FAAF79BAF93D}", + "details": { + "name": "Value" + } + } + ] + }, + { + "base": "GetBicubicEnabled", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Get Bicubic Enabled" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Get Bicubic Enabled is invoked" + }, + "details": { + "name": "Get Bicubic Enabled" + }, + "results": [ + { + "typeid": "{A0CA880C-AFE4-43CB-926C-59AC48496112}", + "details": { + "name": "Enabled" + } + } + ] + } + ] + } + ] +} \ No newline at end of file diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/EBus/Senders/BoundsRequestBus.names b/Gems/ScriptCanvas/Assets/TranslationAssets/EBus/Senders/BoundsRequestBus.names new file mode 100644 index 0000000000..a9b4bea946 --- /dev/null +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/EBus/Senders/BoundsRequestBus.names @@ -0,0 +1,59 @@ +{ + "entries": [ + { + "base": "BoundsRequestBus", + "context": "EBusSender", + "variant": "", + "details": { + "name": "Bounds", + "category": "Rendering" + }, + "methods": [ + { + "base": "GetWorldBounds", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Get World Bounds" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Get World Bounds is invoked" + }, + "details": { + "name": "Get World Bounds" + }, + "results": [ + { + "typeid": "{A54C2B36-D5B8-46A1-A529-4EBDBD2450E7}", + "details": { + "name": "AABB" + } + } + ] + }, + { + "base": "GetLocalBounds", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Get Local Bounds" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Get Local Bounds is invoked" + }, + "details": { + "name": "Get Local Bounds" + }, + "results": [ + { + "typeid": "{A54C2B36-D5B8-46A1-A529-4EBDBD2450E7}", + "details": { + "name": "AABB" + } + } + ] + } + ] + } + ] +} \ No newline at end of file diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/EBus/Senders/BoxShapeComponentRequestsBus.names b/Gems/ScriptCanvas/Assets/TranslationAssets/EBus/Senders/BoxShapeComponentRequestsBus.names new file mode 100644 index 0000000000..fa5d79c19d --- /dev/null +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/EBus/Senders/BoxShapeComponentRequestsBus.names @@ -0,0 +1,86 @@ +{ + "entries": [ + { + "base": "BoxShapeComponentRequestsBus", + "context": "EBusSender", + "variant": "", + "details": { + "name": "Box Shape Component", + "category": "Shape" + }, + "methods": [ + { + "base": "GetBoxConfiguration", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Get Configuration" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Get Configuration is invoked" + }, + "details": { + "name": "Get Configuration", + "tooltip": "Returns the box configuration of a source entity" + }, + "results": [ + { + "typeid": "{F034FBA2-AC2F-4E66-8152-14DFB90D6283}", + "details": { + "name": "Configuration", + "tooltip": "Box shape configuration parameters" + } + } + ] + }, + { + "base": "GetBoxDimensions", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Get Dimensions" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Get Dimensions is invoked" + }, + "details": { + "name": "Get Dimensions", + "tooltip": "Returns the box dimentions of a source entity as x,y,z" + }, + "results": [ + { + "typeid": "{8379EB7D-01FA-4538-B64B-A6543B4BE73D}", + "details": { + "name": "Vector3" + } + } + ] + }, + { + "base": "SetBoxDimensions", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Set Dimensions" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Set Dimensions is invoked" + }, + "details": { + "name": "Set Dimensions", + "tooltip": "Sets the box dimentions of a source entity as x,y,z" + }, + "params": [ + { + "typeid": "{8379EB7D-01FA-4538-B64B-A6543B4BE73D}", + "details": { + "name": "Dimensions", + "tooltip": "Box dimentions as x,y,z" + } + } + ] + } + ] + } + ] +} \ No newline at end of file diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/EBus/Senders/CameraRequestBus.names b/Gems/ScriptCanvas/Assets/TranslationAssets/EBus/Senders/CameraRequestBus.names new file mode 100644 index 0000000000..6c0112bfc2 --- /dev/null +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/EBus/Senders/CameraRequestBus.names @@ -0,0 +1,359 @@ +{ + "entries": [ + { + "base": "CameraRequestBus", + "context": "EBusSender", + "variant": "", + "details": { + "name": "Camera", + "category": "Camera" + }, + "methods": [ + { + "base": "GetOrthographicHalfWidth", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Get Orthographic Half Width" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Get Orthographic Half Width is invoked" + }, + "details": { + "name": "Get Orthographic Half Width" + }, + "results": [ + { + "typeid": "{EA2C3E90-AFBE-44D4-A90D-FAAF79BAF93D}", + "details": { + "name": "Half Width" + } + } + ] + }, + { + "base": "GetFov", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Get Field of View" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Get Field of View is invoked" + }, + "details": { + "name": "Get Field of View" + }, + "results": [ + { + "typeid": "{EA2C3E90-AFBE-44D4-A90D-FAAF79BAF93D}", + "details": { + "name": "FOV" + } + } + ] + }, + { + "base": "SetFovRadians", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Set Field of View (Radians)" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Set Field of View (Radians) is invoked" + }, + "details": { + "name": "Set Field of View (Radians)" + }, + "params": [ + { + "typeid": "{EA2C3E90-AFBE-44D4-A90D-FAAF79BAF93D}", + "details": { + "name": "FOV (Radians)" + } + } + ] + }, + { + "base": "SetNearClipDistance", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Set Near Clip Distance" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Set Near Clip Distance is invoked" + }, + "details": { + "name": "Set Near Clip Distance" + }, + "params": [ + { + "typeid": "{EA2C3E90-AFBE-44D4-A90D-FAAF79BAF93D}", + "details": { + "name": "Near Clip Distance" + } + } + ] + }, + { + "base": "IsOrthographic", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Is Orthographic" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Is Orthographic is invoked" + }, + "details": { + "name": "Is Orthographic" + }, + "results": [ + { + "typeid": "{A0CA880C-AFE4-43CB-926C-59AC48496112}", + "details": { + "name": "Is Orthographic" + } + } + ] + }, + { + "base": "SetFovDegrees", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Set Field of View (Degrees)" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Set Field of View (Degrees) is invoked" + }, + "details": { + "name": "Set Field of View (Degrees)" + }, + "params": [ + { + "typeid": "{EA2C3E90-AFBE-44D4-A90D-FAAF79BAF93D}", + "details": { + "name": "Field of View (Degrees)" + } + } + ] + }, + { + "base": "GetFovRadians", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Get Field of View (Radians)" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Get Field of View (Radians) is invoked" + }, + "details": { + "name": "Get Field of View (Radians)" + }, + "results": [ + { + "typeid": "{EA2C3E90-AFBE-44D4-A90D-FAAF79BAF93D}", + "details": { + "name": "Field of View (Radians)" + } + } + ] + }, + { + "base": "SetFov", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Set Field of View" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Set Field of View is invoked" + }, + "details": { + "name": "Set Field of View" + }, + "params": [ + { + "typeid": "{EA2C3E90-AFBE-44D4-A90D-FAAF79BAF93D}", + "details": { + "name": "Field of View" + } + } + ] + }, + { + "base": "MakeActiveView", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Make Active View" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Make Active View is invoked" + }, + "details": { + "name": "Make Active View" + } + }, + { + "base": "GetFarClipDistance", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Get Far Clip Distance" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Get Far Clip Distance is invoked" + }, + "details": { + "name": "Get Far Clip Distance" + }, + "results": [ + { + "typeid": "{EA2C3E90-AFBE-44D4-A90D-FAAF79BAF93D}", + "details": { + "name": "Far Clip Distance" + } + } + ] + }, + { + "base": "GetFovDegrees", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Get Field of View (Degrees)" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Get Field of View (Degrees) is invoked" + }, + "details": { + "name": "Get Field of View (Degrees)" + }, + "results": [ + { + "typeid": "{EA2C3E90-AFBE-44D4-A90D-FAAF79BAF93D}", + "details": { + "name": "Field of View (Degrees)" + } + } + ] + }, + { + "base": "SetOrthographic", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Set Orthographic" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Set Orthographic is invoked" + }, + "details": { + "name": "Set Orthographic" + }, + "params": [ + { + "typeid": "{A0CA880C-AFE4-43CB-926C-59AC48496112}", + "details": { + "name": "Orthographic" + } + } + ] + }, + { + "base": "SetOrthographicHalfWidth", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Set Orthographic Half Width" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Set Orthographic Half Width is invoked" + }, + "details": { + "name": "Set Orthographic Half Width" + }, + "params": [ + { + "typeid": "{EA2C3E90-AFBE-44D4-A90D-FAAF79BAF93D}", + "details": { + "name": "Half Width" + } + } + ] + }, + { + "base": "GetNearClipDistance", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Get Near Clip Distance" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Get Near Clip Distance is invoked" + }, + "details": { + "name": "Get Near Clip Distance" + }, + "results": [ + { + "typeid": "{EA2C3E90-AFBE-44D4-A90D-FAAF79BAF93D}", + "details": { + "name": "Near Clip Distance" + } + } + ] + }, + { + "base": "SetFarClipDistance", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Set Far Clip Distance" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Set Far Clip Distance is invoked" + }, + "details": { + "name": "Set Far Clip Distance" + }, + "params": [ + { + "typeid": "{EA2C3E90-AFBE-44D4-A90D-FAAF79BAF93D}", + "details": { + "name": "Far Clip Distance" + } + } + ] + }, + { + "base": "IsActiveView", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Is Active View" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Is Active View is invoked" + }, + "details": { + "name": "Is Active View" + }, + "results": [ + { + "typeid": "{A0CA880C-AFE4-43CB-926C-59AC48496112}", + "details": { + "name": "Is Active View" + } + } + ] + } + ] + } + ] +} \ No newline at end of file diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/EBus/Senders/CameraSystemRequestBus.names b/Gems/ScriptCanvas/Assets/TranslationAssets/EBus/Senders/CameraSystemRequestBus.names new file mode 100644 index 0000000000..c8f9638b52 --- /dev/null +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/EBus/Senders/CameraSystemRequestBus.names @@ -0,0 +1,37 @@ +{ + "entries": [ + { + "base": "CameraSystemRequestBus", + "context": "EBusSender", + "variant": "", + "details": { + "name": "Camera" + }, + "methods": [ + { + "base": "GetActiveCamera", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Get Active Camera" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Get Active Camera is invoked" + }, + "details": { + "name": "Get Active Camera" + }, + "results": [ + { + "typeid": "{6383F1D3-BB27-4E6B-A49A-6409B2059EAA}", + "details": { + "name": "Entity Id", + "tooltip": "Entity Unique Id" + } + } + ] + } + ] + } + ] +} \ No newline at end of file diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/EBus/Senders/CapsuleShapeComponentRequestsBus.names b/Gems/ScriptCanvas/Assets/TranslationAssets/EBus/Senders/CapsuleShapeComponentRequestsBus.names new file mode 100644 index 0000000000..e6d8a64a2e --- /dev/null +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/EBus/Senders/CapsuleShapeComponentRequestsBus.names @@ -0,0 +1,87 @@ +{ + "entries": [ + { + "base": "CapsuleShapeComponentRequestsBus", + "context": "EBusSender", + "variant": "", + "details": { + "name": "Capsule Shape Component", + "category": "Shape" + }, + "methods": [ + { + "base": "GetCapsuleConfiguration", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Get Configuration" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Get Configuration is invoked" + }, + "details": { + "name": "Get Configuration", + "tooltip": "Returns the capsule configuration of a source entity" + }, + "results": [ + { + "typeid": "{00931AEB-2AD8-42CE-B1DC-FA4332F51501}", + "details": { + "name": "Configuration", + "tooltip": "Capsule shape configuration parameters" + } + } + ] + }, + { + "base": "SetHeight", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Set Height" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Set Height is invoked" + }, + "details": { + "name": "Set Height", + "tooltip": "Sets the capsule height" + }, + "params": [ + { + "typeid": "{EA2C3E90-AFBE-44D4-A90D-FAAF79BAF93D}", + "details": { + "name": "Height", + "tooltip": "Height in meters" + } + } + ] + }, + { + "base": "SetRadius", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Set Radius" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Set Radius is invoked" + }, + "details": { + "name": "Set Radius", + "tooltip": "Sets the capsule radius" + }, + "params": [ + { + "typeid": "{EA2C3E90-AFBE-44D4-A90D-FAAF79BAF93D}", + "details": { + "name": "Radius", + "tooltip": "Radius in radians" + } + } + ] + } + ] + } + ] +} \ No newline at end of file diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/EBus/Senders/CharacterControllerRequestBus.names b/Gems/ScriptCanvas/Assets/TranslationAssets/EBus/Senders/CharacterControllerRequestBus.names new file mode 100644 index 0000000000..e0226d0a6f --- /dev/null +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/EBus/Senders/CharacterControllerRequestBus.names @@ -0,0 +1,279 @@ +{ + "entries": [ + { + "base": "CharacterControllerRequestBus", + "context": "EBusSender", + "variant": "", + "details": { + "name": "Character", + "category": "PhysX" + }, + "methods": [ + { + "base": "SetSlopeLimitDegrees", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Set Slope Limit Degrees" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Set Slope Limit Degrees is invoked" + }, + "details": { + "name": "Set Slope Limit Degrees" + }, + "params": [ + { + "typeid": "{EA2C3E90-AFBE-44D4-A90D-FAAF79BAF93D}", + "details": { + "name": "Slope Limit" + } + } + ] + }, + { + "base": "GetSlopeLimitDegrees", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Get Slope Limit Degrees" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Get Slope Limit Degrees is invoked" + }, + "details": { + "name": "Get Slope Limit Degrees" + }, + "results": [ + { + "typeid": "{EA2C3E90-AFBE-44D4-A90D-FAAF79BAF93D}", + "details": { + "name": "Slope Limit" + } + } + ] + }, + { + "base": "SetMaximumSpeed", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Set Maximum Speed" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Set Maximum Speed is invoked" + }, + "details": { + "name": "Set Maximum Speed" + }, + "params": [ + { + "typeid": "{EA2C3E90-AFBE-44D4-A90D-FAAF79BAF93D}", + "details": { + "name": "Maximum Speed" + } + } + ] + }, + { + "base": "GetUpDirection", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Get Up Direction" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Get Up Direction is invoked" + }, + "details": { + "name": "Get Up Direction" + }, + "results": [ + { + "typeid": "{8379EB7D-01FA-4538-B64B-A6543B4BE73D}", + "details": { + "name": "Up" + } + } + ] + }, + { + "base": "AddVelocity", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Add Velocity" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Add Velocity is invoked" + }, + "details": { + "name": "Add Velocity" + }, + "params": [ + { + "typeid": "{8379EB7D-01FA-4538-B64B-A6543B4BE73D}", + "details": { + "name": "Velocity" + } + } + ] + }, + { + "base": "SetBasePosition", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Set Base Position" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Set Base Position is invoked" + }, + "details": { + "name": "Set Base Position" + }, + "params": [ + { + "typeid": "{8379EB7D-01FA-4538-B64B-A6543B4BE73D}", + "details": { + "name": "Position" + } + } + ] + }, + { + "base": "GetCenterPosition", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Get Center Position" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Get Center Position is invoked" + }, + "details": { + "name": "Get Center Position" + }, + "results": [ + { + "typeid": "{8379EB7D-01FA-4538-B64B-A6543B4BE73D}", + "details": { + "name": "Position" + } + } + ] + }, + { + "base": "GetStepHeight", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Get Step Height" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Get Step Height is invoked" + }, + "details": { + "name": "Get Step Height" + }, + "results": [ + { + "typeid": "{EA2C3E90-AFBE-44D4-A90D-FAAF79BAF93D}", + "details": { + "name": "Step Height" + } + } + ] + }, + { + "base": "GetBasePosition", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Get Base Position" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Get Base Position is invoked" + }, + "details": { + "name": "Get Base Position" + }, + "results": [ + { + "typeid": "{8379EB7D-01FA-4538-B64B-A6543B4BE73D}", + "details": { + "name": "Position" + } + } + ] + }, + { + "base": "SetStepHeight", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Set Step Height" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Set Step Height is invoked" + }, + "details": { + "name": "Set Step Height" + }, + "params": [ + { + "typeid": "{EA2C3E90-AFBE-44D4-A90D-FAAF79BAF93D}", + "details": { + "name": "Step Height" + } + } + ] + }, + { + "base": "GetMaximumSpeed", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Get Maximum Speed" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Get Maximum Speed is invoked" + }, + "details": { + "name": "Get Maximum Speed" + }, + "results": [ + { + "typeid": "{EA2C3E90-AFBE-44D4-A90D-FAAF79BAF93D}", + "details": { + "name": "Maximum Speed" + } + } + ] + }, + { + "base": "GetVelocity", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Get Velocity" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Get Velocity is invoked" + }, + "details": { + "name": "Get Velocity" + }, + "results": [ + { + "typeid": "{8379EB7D-01FA-4538-B64B-A6543B4BE73D}", + "details": { + "name": "Velocity" + } + } + ] + } + ] + } + ] +} \ No newline at end of file diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/EBus/Senders/CharacterGameplayRequestBus.names b/Gems/ScriptCanvas/Assets/TranslationAssets/EBus/Senders/CharacterGameplayRequestBus.names new file mode 100644 index 0000000000..f3b01b7898 --- /dev/null +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/EBus/Senders/CharacterGameplayRequestBus.names @@ -0,0 +1,124 @@ +{ + "entries": [ + { + "base": "CharacterGameplayRequestBus", + "context": "EBusSender", + "variant": "", + "details": { + "name": "Character" + }, + "methods": [ + { + "base": "GetFallingVelocity", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Get Falling Velocity" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Get Falling Velocity is invoked" + }, + "details": { + "name": "Get Falling Velocity" + }, + "results": [ + { + "typeid": "{8379EB7D-01FA-4538-B64B-A6543B4BE73D}", + "details": { + "name": "Falling Velocity" + } + } + ] + }, + { + "base": "GetGravityMultiplier", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Get Gravity Multiplier" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Get Gravity Multiplier is invoked" + }, + "details": { + "name": "Get Gravity Multiplier" + }, + "results": [ + { + "typeid": "{EA2C3E90-AFBE-44D4-A90D-FAAF79BAF93D}", + "details": { + "name": "Gravity Multiplier" + } + } + ] + }, + { + "base": "SetGravityMultiplier", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Set Gravity Multiplier" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Set Gravity Multiplier is invoked" + }, + "details": { + "name": "Set Gravity Multiplier" + }, + "params": [ + { + "typeid": "{EA2C3E90-AFBE-44D4-A90D-FAAF79BAF93D}", + "details": { + "name": "Gravity Multiplier" + } + } + ] + }, + { + "base": "IsOnGround", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Is On Ground" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Is On Ground is invoked" + }, + "details": { + "name": "Is On Ground" + }, + "results": [ + { + "typeid": "{A0CA880C-AFE4-43CB-926C-59AC48496112}", + "details": { + "name": "Is On Ground" + } + } + ] + }, + { + "base": "SetFallingVelocity", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Set Falling Velocity" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Set Falling Velocity is invoked" + }, + "details": { + "name": "Set Falling Velocity" + }, + "params": [ + { + "typeid": "{8379EB7D-01FA-4538-B64B-A6543B4BE73D}", + "details": { + "name": "Falling Velocity" + } + } + ] + } + ] + } + ] +} \ No newline at end of file diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/EBus/Senders/CollisionFilteringBus.names b/Gems/ScriptCanvas/Assets/TranslationAssets/EBus/Senders/CollisionFilteringBus.names new file mode 100644 index 0000000000..b4f903b1d2 --- /dev/null +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/EBus/Senders/CollisionFilteringBus.names @@ -0,0 +1,148 @@ +{ + "entries": [ + { + "base": "CollisionFilteringBus", + "context": "EBusSender", + "variant": "", + "details": { + "name": "Collision Filtering" + }, + "methods": [ + { + "base": "ToggleCollisionLayer", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Toggle Collision Layer" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Toggle Collision Layer is invoked" + }, + "details": { + "name": "Toggle Collision Layer" + }, + "params": [ + { + "typeid": "{03AAAB3F-5C47-5A66-9EBC-D5FA4DB353C9}", + "details": { + "name": "Layer Name" + } + }, + { + "typeid": "{9F4E062E-06A0-46D4-85DF-E0DA96467D3A}", + "details": { + "name": "Collider Tag" + } + }, + { + "typeid": "{A0CA880C-AFE4-43CB-926C-59AC48496112}", + "details": { + "name": "Enabled" + } + } + ] + }, + { + "base": "SetCollisionGroup", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Set Collision Group" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Set Collision Group is invoked" + }, + "details": { + "name": "Set Collision Group" + }, + "params": [ + { + "typeid": "{03AAAB3F-5C47-5A66-9EBC-D5FA4DB353C9}", + "details": { + "name": "Group Name" + } + }, + { + "typeid": "{9F4E062E-06A0-46D4-85DF-E0DA96467D3A}", + "details": { + "name": "Collider Tag" + } + } + ] + }, + { + "base": "GetCollisionGroupName", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Get Collision Group Name" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Get Collision Group Name is invoked" + }, + "details": { + "name": "Get Collision Group Name" + }, + "results": [ + { + "typeid": "{03AAAB3F-5C47-5A66-9EBC-D5FA4DB353C9}", + "details": { + "name": "Name" + } + } + ] + }, + { + "base": "GetCollisionLayerName", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Get Collision Layer Name" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Get Collision Layer Name is invoked" + }, + "details": { + "name": "Get Collision Layer Name" + }, + "results": [ + { + "typeid": "{03AAAB3F-5C47-5A66-9EBC-D5FA4DB353C9}", + "details": { + "name": "Name" + } + } + ] + }, + { + "base": "SetCollisionLayer", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Set Collision Layer" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Set Collision Layer is invoked" + }, + "details": { + "name": "Set Collision Layer" + }, + "params": [ + { + "typeid": "{03AAAB3F-5C47-5A66-9EBC-D5FA4DB353C9}", + "details": { + "name": "Layer Name" + } + }, + { + "typeid": "{9F4E062E-06A0-46D4-85DF-E0DA96467D3A}", + "details": { + "name": "Collider Tag" + } + } + ] + } + ] + } + ] +} \ No newline at end of file diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/EBus/Senders/ComponentApplicationBus.names b/Gems/ScriptCanvas/Assets/TranslationAssets/EBus/Senders/ComponentApplicationBus.names new file mode 100644 index 0000000000..21682964e3 --- /dev/null +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/EBus/Senders/ComponentApplicationBus.names @@ -0,0 +1,83 @@ +{ + "entries": [ + { + "base": "ComponentApplicationBus", + "context": "EBusSender", + "variant": "", + "details": { + "name": "Application", + "category": "Components" + }, + "methods": [ + { + "base": "GetEntityName", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Get Entity Name" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Get Entity Name is invoked" + }, + "details": { + "name": "Get Entity Name" + }, + "params": [ + { + "typeid": "{6383F1D3-BB27-4E6B-A49A-6409B2059EAA}", + "details": { + "name": "Entity Id", + "tooltip": "Entity Unique Id" + } + } + ], + "results": [ + { + "typeid": "{03AAAB3F-5C47-5A66-9EBC-D5FA4DB353C9}", + "details": { + "name": "AZStd::string" + } + } + ] + }, + { + "base": "SetEntityName", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Set Entity Name" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Set Entity Name is invoked" + }, + "details": { + "name": "Set Entity Name" + }, + "params": [ + { + "typeid": "{6383F1D3-BB27-4E6B-A49A-6409B2059EAA}", + "details": { + "name": "Entity Id", + "tooltip": "Entity Unique Id" + } + }, + { + "typeid": "{7114E998-A8B4-519B-9342-A86D1587B4F7}", + "details": { + "name": "Name" + } + } + ], + "results": [ + { + "typeid": "{A0CA880C-AFE4-43CB-926C-59AC48496112}", + "details": { + "name": "Succesful" + } + } + ] + } + ] + } + ] +} \ No newline at end of file diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/EBus/Senders/ComponentModeSystemRequestBus.names b/Gems/ScriptCanvas/Assets/TranslationAssets/EBus/Senders/ComponentModeSystemRequestBus.names new file mode 100644 index 0000000000..e8297fc8d0 --- /dev/null +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/EBus/Senders/ComponentModeSystemRequestBus.names @@ -0,0 +1,50 @@ +{ + "entries": [ + { + "base": "ComponentModeSystemRequestBus", + "context": "EBusSender", + "variant": "", + "details": { + "name": "Component Mode System" + }, + "methods": [ + { + "base": "EnterComponentMode", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke EnterComponentMode" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after EnterComponentMode is invoked" + }, + "details": { + "name": "EnterComponentMode" + }, + "params": [ + { + "typeid": "{E152C105-A133-4D03-BBF8-3D4B2FBA3E2A}", + "details": { + "name": "AZ::Uuid" + } + } + ] + }, + { + "base": "EndComponentMode", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke EndComponentMode" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after EndComponentMode is invoked" + }, + "details": { + "name": "EndComponentMode" + } + } + ] + } + ] +} \ No newline at end of file diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/EBus/Senders/ConsoleRequestBus.names b/Gems/ScriptCanvas/Assets/TranslationAssets/EBus/Senders/ConsoleRequestBus.names new file mode 100644 index 0000000000..2f2c1a69f7 --- /dev/null +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/EBus/Senders/ConsoleRequestBus.names @@ -0,0 +1,37 @@ +{ + "entries": [ + { + "base": "ConsoleRequestBus", + "context": "EBusSender", + "variant": "", + "details": { + "name": "Console", + "category": "Utilities" + }, + "methods": [ + { + "base": "ExecuteConsoleCommand", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Execute Console Command" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Execute Console Command is invoked" + }, + "details": { + "name": "Execute Console Command" + }, + "params": [ + { + "typeid": "{3AB0037F-AF8D-48CE-BCA0-A170D18B2C03}", + "details": { + "name": "Command" + } + } + ] + } + ] + } + ] +} \ No newline at end of file diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/EBus/Senders/ConstantGradientRequestBus.names b/Gems/ScriptCanvas/Assets/TranslationAssets/EBus/Senders/ConstantGradientRequestBus.names new file mode 100644 index 0000000000..fb39e2431c --- /dev/null +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/EBus/Senders/ConstantGradientRequestBus.names @@ -0,0 +1,58 @@ +{ + "entries": [ + { + "base": "ConstantGradientRequestBus", + "context": "EBusSender", + "variant": "", + "details": { + "name": "Constant Gradient" + }, + "methods": [ + { + "base": "GetConstantValue", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke GetConstantValue" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after GetConstantValue is invoked" + }, + "details": { + "name": "GetConstantValue" + }, + "results": [ + { + "typeid": "{EA2C3E90-AFBE-44D4-A90D-FAAF79BAF93D}", + "details": { + "name": "float" + } + } + ] + }, + { + "base": "SetConstantValue", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke SetConstantValue" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after SetConstantValue is invoked" + }, + "details": { + "name": "SetConstantValue" + }, + "params": [ + { + "typeid": "{EA2C3E90-AFBE-44D4-A90D-FAAF79BAF93D}", + "details": { + "name": "float" + } + } + ] + } + ] + } + ] +} \ No newline at end of file diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/EBus/Senders/CylinderShapeComponentRequestsBus.names b/Gems/ScriptCanvas/Assets/TranslationAssets/EBus/Senders/CylinderShapeComponentRequestsBus.names new file mode 100644 index 0000000000..f576047ecb --- /dev/null +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/EBus/Senders/CylinderShapeComponentRequestsBus.names @@ -0,0 +1,87 @@ +{ + "entries": [ + { + "base": "CylinderShapeComponentRequestsBus", + "context": "EBusSender", + "variant": "", + "details": { + "name": "Cylinder Shape Component", + "category": "Shape" + }, + "methods": [ + { + "base": "GetCylinderConfiguration", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Get Configuration" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Get Configuration is invoked" + }, + "details": { + "name": "Get Configuration", + "tooltip": "Returns the cylinder configuration of a source entity" + }, + "results": [ + { + "typeid": "{53254779-82F1-441E-9116-81E1FACFECF4}", + "details": { + "name": "Configuration", + "tooltip": "Cylinder shape configuration parameters" + } + } + ] + }, + { + "base": "SetHeight", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Set Height" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Set Height is invoked" + }, + "details": { + "name": "Set Height", + "tooltip": "Sets the cylinder height" + }, + "params": [ + { + "typeid": "{EA2C3E90-AFBE-44D4-A90D-FAAF79BAF93D}", + "details": { + "name": "Height", + "tooltip": "Height in meters" + } + } + ] + }, + { + "base": "SetRadius", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Set Radius" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Set Radius is invoked" + }, + "details": { + "name": "Set Radius", + "tooltip": "Sets the cylinder radius" + }, + "params": [ + { + "typeid": "{EA2C3E90-AFBE-44D4-A90D-FAAF79BAF93D}", + "details": { + "name": "Radius", + "tooltip": "Radius in radians" + } + } + ] + } + ] + } + ] +} \ No newline at end of file diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/EBus/Senders/DebugDrawRequestBus.names b/Gems/ScriptCanvas/Assets/TranslationAssets/EBus/Senders/DebugDrawRequestBus.names new file mode 100644 index 0000000000..78c04e0aea --- /dev/null +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/EBus/Senders/DebugDrawRequestBus.names @@ -0,0 +1,606 @@ +{ + "entries": [ + { + "base": "DebugDrawRequestBus", + "context": "EBusSender", + "variant": "", + "details": { + "name": "Debug Draw" + }, + "methods": [ + { + "base": "DrawTextOnEntity", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Draw Text On Entity" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Draw Text On Entity is invoked" + }, + "details": { + "name": "Draw Text On Entity" + }, + "params": [ + { + "typeid": "{6383F1D3-BB27-4E6B-A49A-6409B2059EAA}", + "details": { + "name": "Entity Id", + "tooltip": "Entity Unique Id" + } + }, + { + "typeid": "{03AAAB3F-5C47-5A66-9EBC-D5FA4DB353C9}", + "details": { + "name": "Text" + } + }, + { + "typeid": "{7894072A-9050-4F0F-901B-34B1A0D29417}", + "details": { + "name": "Color" + } + }, + { + "typeid": "{EA2C3E90-AFBE-44D4-A90D-FAAF79BAF93D}", + "details": { + "name": "Duration" + } + } + ] + }, + { + "base": "DrawRayEntityToDirection", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Draw Ray Entity To Direction" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Draw Ray Entity To Direction is invoked" + }, + "details": { + "name": "Draw Ray Entity To Direction" + }, + "params": [ + { + "typeid": "{6383F1D3-BB27-4E6B-A49A-6409B2059EAA}", + "details": { + "name": "Entity Id", + "tooltip": "Entity Unique Id" + } + }, + { + "typeid": "{8379EB7D-01FA-4538-B64B-A6543B4BE73D}", + "details": { + "name": "Direction" + } + }, + { + "typeid": "{7894072A-9050-4F0F-901B-34B1A0D29417}", + "details": { + "name": "Color" + } + }, + { + "typeid": "{EA2C3E90-AFBE-44D4-A90D-FAAF79BAF93D}", + "details": { + "name": "Duration" + } + } + ] + }, + { + "base": "DrawObb", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Draw Oriented Bounding Box" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Draw Oriented Bounding Box is invoked" + }, + "details": { + "name": "Draw Oriented Bounding Box" + }, + "params": [ + { + "typeid": "{004ABD25-CF14-4EB3-BD41-022C247C07FA}", + "details": { + "name": "OBB" + } + }, + { + "typeid": "{7894072A-9050-4F0F-901B-34B1A0D29417}", + "details": { + "name": "Color" + } + }, + { + "typeid": "{EA2C3E90-AFBE-44D4-A90D-FAAF79BAF93D}", + "details": { + "name": "Duration" + } + } + ] + }, + { + "base": "DrawObbOnEntity", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Draw Oriented Bounding Box on Entity" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Draw Oriented Bounding Box on Entity is invoked" + }, + "details": { + "name": "Draw Oriented Bounding Box on Entity" + }, + "params": [ + { + "typeid": "{6383F1D3-BB27-4E6B-A49A-6409B2059EAA}", + "details": { + "name": "Entity Id", + "tooltip": "Entity Unique Id" + } + }, + { + "typeid": "{004ABD25-CF14-4EB3-BD41-022C247C07FA}", + "details": { + "name": "OBB" + } + }, + { + "typeid": "{7894072A-9050-4F0F-901B-34B1A0D29417}", + "details": { + "name": "Color" + } + }, + { + "typeid": "{EA2C3E90-AFBE-44D4-A90D-FAAF79BAF93D}", + "details": { + "name": "Duration" + } + } + ] + }, + { + "base": "DrawRayLocationToDirection", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Draw Ray Location To Direction" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Draw Ray Location To Direction is invoked" + }, + "details": { + "name": "Draw Ray Location To Direction" + }, + "params": [ + { + "typeid": "{8379EB7D-01FA-4538-B64B-A6543B4BE73D}", + "details": { + "name": "Position" + } + }, + { + "typeid": "{8379EB7D-01FA-4538-B64B-A6543B4BE73D}", + "details": { + "name": "Direction" + } + }, + { + "typeid": "{7894072A-9050-4F0F-901B-34B1A0D29417}", + "details": { + "name": "Color" + } + }, + { + "typeid": "{EA2C3E90-AFBE-44D4-A90D-FAAF79BAF93D}", + "details": { + "name": "Duration" + } + } + ] + }, + { + "base": "DrawSphereOnEntity", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Draw Sphere On Entity" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Draw Sphere On Entity is invoked" + }, + "details": { + "name": "Draw Sphere On Entity" + }, + "params": [ + { + "typeid": "{6383F1D3-BB27-4E6B-A49A-6409B2059EAA}", + "details": { + "name": "Entity Id", + "tooltip": "Entity Unique Id" + } + }, + { + "typeid": "{EA2C3E90-AFBE-44D4-A90D-FAAF79BAF93D}", + "details": { + "name": "Radius" + } + }, + { + "typeid": "{7894072A-9050-4F0F-901B-34B1A0D29417}", + "details": { + "name": "Color" + } + }, + { + "typeid": "{EA2C3E90-AFBE-44D4-A90D-FAAF79BAF93D}", + "details": { + "name": "Duration" + } + } + ] + }, + { + "base": "DrawAabbOnEntity", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Draw Axis Aligned Bounding Box On Entity" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Draw Axis Aligned Bounding Box On Entity is invoked" + }, + "details": { + "name": "Draw Axis Aligned Bounding Box On Entity" + }, + "params": [ + { + "typeid": "{6383F1D3-BB27-4E6B-A49A-6409B2059EAA}", + "details": { + "name": "Entity Id", + "tooltip": "Entity Unique Id" + } + }, + { + "typeid": "{A54C2B36-D5B8-46A1-A529-4EBDBD2450E7}", + "details": { + "name": "AABB" + } + }, + { + "typeid": "{7894072A-9050-4F0F-901B-34B1A0D29417}", + "details": { + "name": "Color" + } + }, + { + "typeid": "{EA2C3E90-AFBE-44D4-A90D-FAAF79BAF93D}", + "details": { + "name": "Duration" + } + } + ] + }, + { + "base": "DrawLineEntityToEntity", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Draw Line Entity To Entity" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Draw Line Entity To Entity is invoked" + }, + "details": { + "name": "Draw Line Entity To Entity" + }, + "params": [ + { + "typeid": "{6383F1D3-BB27-4E6B-A49A-6409B2059EAA}", + "details": { + "name": "From Entity Id", + "tooltip": "Entity Unique Id" + } + }, + { + "typeid": "{6383F1D3-BB27-4E6B-A49A-6409B2059EAA}", + "details": { + "name": "To Entity Id", + "tooltip": "Entity Unique Id" + } + }, + { + "typeid": "{7894072A-9050-4F0F-901B-34B1A0D29417}", + "details": { + "name": "Color" + } + }, + { + "typeid": "{EA2C3E90-AFBE-44D4-A90D-FAAF79BAF93D}", + "details": { + "name": "Duration" + } + } + ] + }, + { + "base": "DrawTextAtLocation", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Draw Text At Location" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Draw Text At Location is invoked" + }, + "details": { + "name": "Draw Text At Location" + }, + "params": [ + { + "typeid": "{8379EB7D-01FA-4538-B64B-A6543B4BE73D}", + "details": { + "name": "Position" + } + }, + { + "typeid": "{03AAAB3F-5C47-5A66-9EBC-D5FA4DB353C9}", + "details": { + "name": "Text" + } + }, + { + "typeid": "{7894072A-9050-4F0F-901B-34B1A0D29417}", + "details": { + "name": "Color" + } + }, + { + "typeid": "{EA2C3E90-AFBE-44D4-A90D-FAAF79BAF93D}", + "details": { + "name": "Duration" + } + } + ] + }, + { + "base": "DrawTextOnScreen", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Draw Text On Screen" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Draw Text On Screen is invoked" + }, + "details": { + "name": "Draw Text On Screen" + }, + "params": [ + { + "typeid": "{03AAAB3F-5C47-5A66-9EBC-D5FA4DB353C9}", + "details": { + "name": "Text" + } + }, + { + "typeid": "{7894072A-9050-4F0F-901B-34B1A0D29417}", + "details": { + "name": "Color" + } + }, + { + "typeid": "{EA2C3E90-AFBE-44D4-A90D-FAAF79BAF93D}", + "details": { + "name": "Duration" + } + } + ] + }, + { + "base": "DrawAabb", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Draw Axis Aligned Bounding Box" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Draw Axis Aligned Bounding Box is invoked" + }, + "details": { + "name": "Draw Axis Aligned Bounding Box" + }, + "params": [ + { + "typeid": "{A54C2B36-D5B8-46A1-A529-4EBDBD2450E7}", + "details": { + "name": "AABB" + } + }, + { + "typeid": "{7894072A-9050-4F0F-901B-34B1A0D29417}", + "details": { + "name": "Color" + } + }, + { + "typeid": "{EA2C3E90-AFBE-44D4-A90D-FAAF79BAF93D}", + "details": { + "name": "Duration" + } + } + ] + }, + { + "base": "DrawLineLocationToLocation", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Draw Line Location To Location" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Draw Line Location To Location is invoked" + }, + "details": { + "name": "Draw Line Location To Location" + }, + "params": [ + { + "typeid": "{8379EB7D-01FA-4538-B64B-A6543B4BE73D}", + "details": { + "name": "Position" + } + }, + { + "typeid": "{8379EB7D-01FA-4538-B64B-A6543B4BE73D}", + "details": { + "name": "Position" + } + }, + { + "typeid": "{7894072A-9050-4F0F-901B-34B1A0D29417}", + "details": { + "name": "Color" + } + }, + { + "typeid": "{EA2C3E90-AFBE-44D4-A90D-FAAF79BAF93D}", + "details": { + "name": "Duration" + } + } + ] + }, + { + "base": "DrawLineEntityToLocation", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Draw Line Entity To Location" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Draw Line Entity To Location is invoked" + }, + "details": { + "name": "Draw Line Entity To Location" + }, + "params": [ + { + "typeid": "{6383F1D3-BB27-4E6B-A49A-6409B2059EAA}", + "details": { + "name": "Entity Id", + "tooltip": "Entity Unique Id" + } + }, + { + "typeid": "{8379EB7D-01FA-4538-B64B-A6543B4BE73D}", + "details": { + "name": "Position" + } + }, + { + "typeid": "{7894072A-9050-4F0F-901B-34B1A0D29417}", + "details": { + "name": "Color" + } + }, + { + "typeid": "{EA2C3E90-AFBE-44D4-A90D-FAAF79BAF93D}", + "details": { + "name": "Duration" + } + } + ] + }, + { + "base": "DrawRayEntityToEntity", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Draw Ray Entity To Entity" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Draw Ray Entity To Entity is invoked" + }, + "details": { + "name": "Draw Ray Entity To Entity" + }, + "params": [ + { + "typeid": "{6383F1D3-BB27-4E6B-A49A-6409B2059EAA}", + "details": { + "name": "From Entity Id", + "tooltip": "Entity to draw the ray from" + } + }, + { + "typeid": "{6383F1D3-BB27-4E6B-A49A-6409B2059EAA}", + "details": { + "name": "To Entity Id", + "tooltip": "Entity to draw the ray to" + } + }, + { + "typeid": "{7894072A-9050-4F0F-901B-34B1A0D29417}", + "details": { + "name": "Color" + } + }, + { + "typeid": "{EA2C3E90-AFBE-44D4-A90D-FAAF79BAF93D}", + "details": { + "name": "Duration" + } + } + ] + }, + { + "base": "DrawSphereAtLocation", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Draw Sphere At Location" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Draw Sphere At Location is invoked" + }, + "details": { + "name": "Draw Sphere At Location" + }, + "params": [ + { + "typeid": "{8379EB7D-01FA-4538-B64B-A6543B4BE73D}", + "details": { + "name": "Position" + } + }, + { + "typeid": "{EA2C3E90-AFBE-44D4-A90D-FAAF79BAF93D}", + "details": { + "name": "Radius" + } + }, + { + "typeid": "{7894072A-9050-4F0F-901B-34B1A0D29417}", + "details": { + "name": "Color" + } + }, + { + "typeid": "{EA2C3E90-AFBE-44D4-A90D-FAAF79BAF93D}", + "details": { + "name": "Duration" + } + } + ] + } + ] + } + ] +} \ No newline at end of file diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/EBus/Senders/DecalRequestBus.names b/Gems/ScriptCanvas/Assets/TranslationAssets/EBus/Senders/DecalRequestBus.names new file mode 100644 index 0000000000..7be614892d --- /dev/null +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/EBus/Senders/DecalRequestBus.names @@ -0,0 +1,191 @@ +{ + "entries": [ + { + "base": "DecalRequestBus", + "context": "EBusSender", + "variant": "", + "details": { + "name": "Decal", + "category": "Rendering" + }, + "methods": [ + { + "base": "GetMaterial", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Get Material" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Get Material is invoked" + }, + "details": { + "name": "Get Material" + }, + "results": [ + { + "typeid": "{652ED536-3402-439B-AEBE-4A5DBC554085}", + "details": { + "name": "Asset Id" + } + } + ] + }, + { + "base": "GetSortKey", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Get Sort Key" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Get Sort Key is invoked" + }, + "details": { + "name": "Get Sort Key" + }, + "results": [ + { + "typeid": "{72B9409A-7D1A-4831-9CFE-FCB3FADD3426}", + "details": { + "name": "Sort Key" + } + } + ] + }, + { + "base": "SetSortKey", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Set Sort Key" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Set Sort Key is invoked" + }, + "details": { + "name": "Set Sort Key" + }, + "params": [ + { + "typeid": "{72B9409A-7D1A-4831-9CFE-FCB3FADD3426}", + "details": { + "name": "Sort Key" + } + } + ] + }, + { + "base": "SetMaterial", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Set Material" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Set Material is invoked" + }, + "details": { + "name": "Set Material" + }, + "params": [ + { + "typeid": "{652ED536-3402-439B-AEBE-4A5DBC554085}", + "details": { + "name": "Asset Id" + } + } + ] + }, + { + "base": "SetAttenuationAngle", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Set Attenuation Angle" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Set Attenuation Angle is invoked" + }, + "details": { + "name": "Set Attenuation Angle" + }, + "params": [ + { + "typeid": "{EA2C3E90-AFBE-44D4-A90D-FAAF79BAF93D}", + "details": { + "name": "Attenuation Angle" + } + } + ] + }, + { + "base": "GetOpacity", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Get Opacity" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Get Opacity is invoked" + }, + "details": { + "name": "Get Opacity" + }, + "results": [ + { + "typeid": "{EA2C3E90-AFBE-44D4-A90D-FAAF79BAF93D}", + "details": { + "name": "Opacity" + } + } + ] + }, + { + "base": "SetOpacity", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Set Opacity" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Set Opacity is invoked" + }, + "details": { + "name": "Set Opacity" + }, + "params": [ + { + "typeid": "{EA2C3E90-AFBE-44D4-A90D-FAAF79BAF93D}", + "details": { + "name": "Opacity" + } + } + ] + }, + { + "base": "GetAttenuationAngle", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Get Attenuation Angle" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Get Attenuation Angle is invoked" + }, + "details": { + "name": "Get Attenuation Angle" + }, + "results": [ + { + "typeid": "{EA2C3E90-AFBE-44D4-A90D-FAAF79BAF93D}", + "details": { + "name": "Attenuation Angle" + } + } + ] + } + ] + } + ] +} \ No newline at end of file diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/EBus/Senders/DeferredFogRequestsBus.names b/Gems/ScriptCanvas/Assets/TranslationAssets/EBus/Senders/DeferredFogRequestsBus.names new file mode 100644 index 0000000000..a3ba8eda5d --- /dev/null +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/EBus/Senders/DeferredFogRequestsBus.names @@ -0,0 +1,499 @@ +{ + "entries": [ + { + "base": "DeferredFogRequestsBus", + "context": "EBusSender", + "variant": "", + "details": { + "name": "Deferred Fog", + "category": "Rendering" + }, + "methods": [ + { + "base": "SetNoiseTexture", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Set Noise Texture" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Set Noise Texture is invoked" + }, + "details": { + "name": "Set Noise Texture" + }, + "params": [ + { + "typeid": "{03AAAB3F-5C47-5A66-9EBC-D5FA4DB353C9}", + "details": { + "name": "Path" + } + } + ] + }, + { + "base": "SetNoiseTexCoordScale", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Set Noise Tex Coord Scale" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Set Noise Tex Coord Scale is invoked" + }, + "details": { + "name": "Set Noise Tex Coord Scale" + }, + "params": [ + { + "typeid": "{3D80F623-C85C-4741-90D0-E4E66164E6BF}", + "details": { + "name": "Tex Coord Scale" + } + } + ] + }, + { + "base": "SetNoiseTexCoord2Scale", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Set Noise Tex Coord 2 Scale" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Set Noise Tex Coord 2 Scale is invoked" + }, + "details": { + "name": "Set Noise Tex Coord 2 Scale" + }, + "params": [ + { + "typeid": "{3D80F623-C85C-4741-90D0-E4E66164E6BF}", + "details": { + "name": "Tex Coord 2 Scale" + } + } + ] + }, + { + "base": "GetFogMaxHeight", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Get Fog Max Height" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Get Fog Max Height is invoked" + }, + "details": { + "name": "Get Fog Max Height" + }, + "results": [ + { + "typeid": "{EA2C3E90-AFBE-44D4-A90D-FAAF79BAF93D}", + "details": { + "name": "Max Height" + } + } + ] + }, + { + "base": "GetNoiseTexCoordScale", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Get Noise Tex Coord Scale" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Get Noise Tex Coord Scale is invoked" + }, + "details": { + "name": "Get Noise Tex Coord Scale" + }, + "results": [ + { + "typeid": "{3D80F623-C85C-4741-90D0-E4E66164E6BF}", + "details": { + "name": "Tex Coord Scale" + } + } + ] + }, + { + "base": "GetNoiseTexCoordVelocity", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Get Noise Tex Coord Velocity" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Get Noise Tex Coord Velocity is invoked" + }, + "details": { + "name": "Get Noise Tex Coord Velocity" + }, + "results": [ + { + "typeid": "{3D80F623-C85C-4741-90D0-E4E66164E6BF}", + "details": { + "name": "Tex Coord Velocity" + } + } + ] + }, + { + "base": "SetFogEndDistance", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Set Fog End Distance" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Set Fog End Distance is invoked" + }, + "details": { + "name": "Set Fog End Distance" + }, + "params": [ + { + "typeid": "{EA2C3E90-AFBE-44D4-A90D-FAAF79BAF93D}", + "details": { + "name": "Fod End Distance" + } + } + ] + }, + { + "base": "GetFogEndDistance", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Get Fog End Distance" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Get Fog End Distance is invoked" + }, + "details": { + "name": "Get Fog End Distance" + }, + "results": [ + { + "typeid": "{EA2C3E90-AFBE-44D4-A90D-FAAF79BAF93D}", + "details": { + "name": "Fog End Distance" + } + } + ] + }, + { + "base": "GetNoiseTexCoord2Scale", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Get Noise Tex Coord 2 Scale" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Get Noise Tex Coord 2 Scale is invoked" + }, + "details": { + "name": "Get Noise Tex Coord 2 Scale" + }, + "results": [ + { + "typeid": "{3D80F623-C85C-4741-90D0-E4E66164E6BF}", + "details": { + "name": "Tex Coord 2 Scale" + } + } + ] + }, + { + "base": "SetNoiseTexCoord2Velocity", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Set Noise Tex Coord 2 Velocity" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Set Noise Tex Coord 2 Velocity is invoked" + }, + "details": { + "name": "Set Noise Tex Coord 2 Velocity" + }, + "params": [ + { + "typeid": "{3D80F623-C85C-4741-90D0-E4E66164E6BF}", + "details": { + "name": "Tex Coord 2 Velocity" + } + } + ] + }, + { + "base": "GetFogStartDistance", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Get Fog Start Distance" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Get Fog Start Distance is invoked" + }, + "details": { + "name": "Get Fog Start Distance" + }, + "results": [ + { + "typeid": "{EA2C3E90-AFBE-44D4-A90D-FAAF79BAF93D}", + "details": { + "name": "Fog Start Distance" + } + } + ] + }, + { + "base": "SetFogMaxHeight", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Set Fog Max Height" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Set Fog Max Height is invoked" + }, + "details": { + "name": "Set Fog Max Height" + }, + "params": [ + { + "typeid": "{EA2C3E90-AFBE-44D4-A90D-FAAF79BAF93D}", + "details": { + "name": "Fog Max Height" + } + } + ] + }, + { + "base": "SetNoiseTexCoordVelocity", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Set Noise Tex Coord Velocity" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Set Noise Tex Coord Velocity is invoked" + }, + "details": { + "name": "Set Noise Tex Coord Velocity" + }, + "params": [ + { + "typeid": "{3D80F623-C85C-4741-90D0-E4E66164E6BF}", + "details": { + "name": "Tex Coord Velocity" + } + } + ] + }, + { + "base": "GetNoiseTexCoord2Velocity", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Get Noise Tex Coord 2 Velocity" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Get Noise Tex Coord 2 Velocity is invoked" + }, + "details": { + "name": "Get Noise Tex Coord 2 Velocity" + }, + "results": [ + { + "typeid": "{3D80F623-C85C-4741-90D0-E4E66164E6BF}", + "details": { + "name": "Tex Coord 2 Velocity" + } + } + ] + }, + { + "base": "SetFogStartDistance", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Set Fog Start Distance" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Set Fog Start Distance is invoked" + }, + "details": { + "name": "Set Fog Start Distance" + }, + "params": [ + { + "typeid": "{EA2C3E90-AFBE-44D4-A90D-FAAF79BAF93D}", + "details": { + "name": "Fog Start Distance" + } + } + ] + }, + { + "base": "GetFogMinHeight", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Get Fog Min Height" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Get Fog Min Height is invoked" + }, + "details": { + "name": "Get Fog Min Height" + }, + "results": [ + { + "typeid": "{EA2C3E90-AFBE-44D4-A90D-FAAF79BAF93D}", + "details": { + "name": "Fog Min Height" + } + } + ] + }, + { + "base": "GetFogColor", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Get Fog Color" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Get Fog Color is invoked" + }, + "details": { + "name": "Get Fog Color" + }, + "results": [ + { + "typeid": "{8379EB7D-01FA-4538-B64B-A6543B4BE73D}", + "details": { + "name": "Fog Color" + } + } + ] + }, + { + "base": "SetOctavesBlendFactor", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Set Octaves Blend Factor" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Set Octaves Blend Factor is invoked" + }, + "details": { + "name": "Set Octaves Blend Factor" + }, + "params": [ + { + "typeid": "{EA2C3E90-AFBE-44D4-A90D-FAAF79BAF93D}", + "details": { + "name": "Octaves Blend Factor" + } + } + ] + }, + { + "base": "GetOctavesBlendFactor", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Get Octaves Blend Factor" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Get Octaves Blend Factor is invoked" + }, + "details": { + "name": "Get Octaves Blend Factor" + }, + "results": [ + { + "typeid": "{EA2C3E90-AFBE-44D4-A90D-FAAF79BAF93D}", + "details": { + "name": "Octaves Blend Factor" + } + } + ] + }, + { + "base": "SetFogColor", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Set Fog Color" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Set Fog Color is invoked" + }, + "details": { + "name": "Set Fog Color" + }, + "params": [ + { + "typeid": "{8379EB7D-01FA-4538-B64B-A6543B4BE73D}", + "details": { + "name": "Fog Color" + } + } + ] + }, + { + "base": "SetFogMinHeight", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Set Fog Min Height" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Set Fog Min Height is invoked" + }, + "details": { + "name": "Set Fog Min Height" + }, + "params": [ + { + "typeid": "{EA2C3E90-AFBE-44D4-A90D-FAAF79BAF93D}", + "details": { + "name": "Fog Min Height" + } + } + ] + }, + { + "base": "GetNoiseTexture", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Get Noise Texture" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Get Noise Texture is invoked" + }, + "details": { + "name": "Get Noise Texture" + }, + "results": [ + { + "typeid": "{03AAAB3F-5C47-5A66-9EBC-D5FA4DB353C9}", + "details": { + "name": "Path" + } + } + ] + } + ] + } + ] +} \ No newline at end of file diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/EBus/Senders/DepthOfFieldRequestBus.names b/Gems/ScriptCanvas/Assets/TranslationAssets/EBus/Senders/DepthOfFieldRequestBus.names new file mode 100644 index 0000000000..781ef189cc --- /dev/null +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/EBus/Senders/DepthOfFieldRequestBus.names @@ -0,0 +1,1029 @@ +{ + "entries": [ + { + "base": "DepthOfFieldRequestBus", + "context": "EBusSender", + "variant": "", + "details": { + "name": "Depth Of Field", + "category": "Post Process" + }, + "methods": [ + { + "base": "GetEnableDebugColoringOverride", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Get Enable Debug Coloring Override" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Get Enable Debug Coloring Override is invoked" + }, + "details": { + "name": "Get Enable Debug Coloring Override" + }, + "results": [ + { + "typeid": "{A0CA880C-AFE4-43CB-926C-59AC48496112}", + "details": { + "name": "Enabled" + } + } + ] + }, + { + "base": "GetAutoFocusSpeedOverride", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Get Auto Focus Speed Override" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Get Auto Focus Speed Override is invoked" + }, + "details": { + "name": "Get Auto Focus Speed Override" + }, + "results": [ + { + "typeid": "{EA2C3E90-AFBE-44D4-A90D-FAAF79BAF93D}", + "details": { + "name": "Auto Focus Speed" + } + } + ] + }, + { + "base": "SetAutoFocusSensitivity", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Set Auto Focus Sensitivity" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Set Auto Focus Sensitivity is invoked" + }, + "details": { + "name": "Set Auto Focus Sensitivity" + }, + "params": [ + { + "typeid": "{EA2C3E90-AFBE-44D4-A90D-FAAF79BAF93D}", + "details": { + "name": "Auto Focus Sensitivity" + } + } + ] + }, + { + "base": "SetAutoFocusDelayOverride", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Set Auto Focus Delay Override" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Set Auto Focus Delay Override is invoked" + }, + "details": { + "name": "Set Auto Focus Delay Override" + }, + "params": [ + { + "typeid": "{EA2C3E90-AFBE-44D4-A90D-FAAF79BAF93D}", + "details": { + "name": "Auto Focus Delay" + } + } + ] + }, + { + "base": "GetAutoFocusScreenPosition", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Get Auto Focus Screen Position" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Get Auto Focus Screen Position is invoked" + }, + "details": { + "name": "Get Auto Focus Screen Position" + }, + "results": [ + { + "typeid": "{3D80F623-C85C-4741-90D0-E4E66164E6BF}", + "details": { + "name": "Auto Focus Screen" + } + } + ] + }, + { + "base": "GetEnableDebugColoring", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Get Enable Debug Coloring" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Get Enable Debug Coloring is invoked" + }, + "details": { + "name": "Get Enable Debug Coloring" + }, + "results": [ + { + "typeid": "{A0CA880C-AFE4-43CB-926C-59AC48496112}", + "details": { + "name": "Enabled" + } + } + ] + }, + { + "base": "SetFocusDistance", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Set Focus Distance" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Set Focus Distance is invoked" + }, + "details": { + "name": "Set Focus Distance" + }, + "params": [ + { + "typeid": "{EA2C3E90-AFBE-44D4-A90D-FAAF79BAF93D}", + "details": { + "name": "Focus Distance" + } + } + ] + }, + { + "base": "SetQualityLevel", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Set Quality Level" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Set Quality Level is invoked" + }, + "details": { + "name": "Set Quality Level" + }, + "params": [ + { + "typeid": "{43DA906B-7DEF-4CA8-9790-854106D3F983}", + "details": { + "name": "Quality Level" + } + } + ] + }, + { + "base": "SetCameraEntityId", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Set Camera Entity Id" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Set Camera Entity Id is invoked" + }, + "details": { + "name": "Set Camera Entity Id" + }, + "params": [ + { + "typeid": "{6383F1D3-BB27-4E6B-A49A-6409B2059EAA}", + "details": { + "name": "Entity Id", + "tooltip": "Entity Unique Id" + } + } + ] + }, + { + "base": "SetAutoFocusDelay", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Set Auto Focus Delay" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Set Auto Focus Delay is invoked" + }, + "details": { + "name": "Set Auto Focus Delay" + }, + "params": [ + { + "typeid": "{EA2C3E90-AFBE-44D4-A90D-FAAF79BAF93D}", + "details": { + "name": "Auto Focus Delay" + } + } + ] + }, + { + "base": "GetAutoFocusDelay", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Get Auto Focus Delay" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Get Auto Focus Delay is invoked" + }, + "details": { + "name": "Get Auto Focus Delay" + }, + "results": [ + { + "typeid": "{EA2C3E90-AFBE-44D4-A90D-FAAF79BAF93D}", + "details": { + "name": "Auto Focus Delay" + } + } + ] + }, + { + "base": "SetAutoFocusScreenPosition", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Set Auto Focus Screen Position" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Set Auto Focus Screen Position is invoked" + }, + "details": { + "name": "Set Auto Focus Screen Position" + }, + "params": [ + { + "typeid": "{3D80F623-C85C-4741-90D0-E4E66164E6BF}", + "details": { + "name": "Auto Focus Screen Position" + } + } + ] + }, + { + "base": "GetFNumber", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke GetF Number" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after GetF Number is invoked" + }, + "details": { + "name": "Get F Number" + }, + "results": [ + { + "typeid": "{EA2C3E90-AFBE-44D4-A90D-FAAF79BAF93D}", + "details": { + "name": "F Number" + } + } + ] + }, + { + "base": "SetApertureFOverride", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Set ApertureF Override" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Set ApertureF Override is invoked" + }, + "details": { + "name": "Set Aperture F Override" + }, + "params": [ + { + "typeid": "{EA2C3E90-AFBE-44D4-A90D-FAAF79BAF93D}", + "details": { + "name": "Aperture F" + } + } + ] + }, + { + "base": "SetEnabled", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Set Enabled" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Set Enabled is invoked" + }, + "details": { + "name": "Set Enabled" + }, + "params": [ + { + "typeid": "{A0CA880C-AFE4-43CB-926C-59AC48496112}", + "details": { + "name": "Enabled" + } + } + ] + }, + { + "base": "SetAutoFocusScreenPositionOverride", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Set Auto Focus Screen Position Override" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Set Auto Focus Screen Position Override is invoked" + }, + "details": { + "name": "Set Auto Focus Screen Position Override" + }, + "params": [ + { + "typeid": "{EA2C3E90-AFBE-44D4-A90D-FAAF79BAF93D}", + "details": { + "name": "Auto Focus Screen Position" + } + } + ] + }, + { + "base": "GetQualityLevelOverride", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Get Quality Level Override" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Get Quality Level Override is invoked" + }, + "details": { + "name": "Get Quality Level Override" + }, + "results": [ + { + "typeid": "{A0CA880C-AFE4-43CB-926C-59AC48496112}", + "details": { + "name": "Quality Level" + } + } + ] + }, + { + "base": "SetAutoFocusSpeedOverride", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Set Auto Focus Speed Override" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Set Auto Focus Speed Override is invoked" + }, + "details": { + "name": "Set Auto Focus Speed Override" + }, + "params": [ + { + "typeid": "{EA2C3E90-AFBE-44D4-A90D-FAAF79BAF93D}", + "details": { + "name": "Auto Focus Speed" + } + } + ] + }, + { + "base": "GetEnableAutoFocusOverride", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Get Enable Auto Focus Override" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Get Enable Auto Focus Override is invoked" + }, + "details": { + "name": "Get Enable Auto Focus Override" + }, + "results": [ + { + "typeid": "{A0CA880C-AFE4-43CB-926C-59AC48496112}", + "details": { + "name": "Enabled" + } + } + ] + }, + { + "base": "SetEnableDebugColoring", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Set Enable Debug Coloring" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Set Enable Debug Coloring is invoked" + }, + "details": { + "name": "Set Enable Debug Coloring" + }, + "params": [ + { + "typeid": "{A0CA880C-AFE4-43CB-926C-59AC48496112}", + "details": { + "name": "Enabled" + } + } + ] + }, + { + "base": "SetFocusDistanceOverride", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Set Focus Distance Override" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Set Focus Distance Override is invoked" + }, + "details": { + "name": "Set Focus Distance Override" + }, + "params": [ + { + "typeid": "{EA2C3E90-AFBE-44D4-A90D-FAAF79BAF93D}", + "details": { + "name": "Focus Distance" + } + } + ] + }, + { + "base": "GetEnableAutoFocus", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Get Enable Auto Focus" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Get Enable Auto Focus is invoked" + }, + "details": { + "name": "Get Enable Auto Focus" + }, + "results": [ + { + "typeid": "{A0CA880C-AFE4-43CB-926C-59AC48496112}", + "details": { + "name": "Enable" + } + } + ] + }, + { + "base": "SetApertureF", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Set ApertureF" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Set ApertureF is invoked" + }, + "details": { + "name": "Set Aperture F" + }, + "params": [ + { + "typeid": "{EA2C3E90-AFBE-44D4-A90D-FAAF79BAF93D}", + "details": { + "name": "Aperture F" + } + } + ] + }, + { + "base": "SetCameraEntityIdOverride", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Set Camera Entity Id Override" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Set Camera Entity Id Override is invoked" + }, + "details": { + "name": "Set Camera Entity Id Override" + }, + "params": [ + { + "typeid": "{A0CA880C-AFE4-43CB-926C-59AC48496112}", + "details": { + "name": "bool" + } + } + ] + }, + { + "base": "GetEnabled", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Get Enabled" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Get Enabled is invoked" + }, + "details": { + "name": "Get Enabled" + }, + "results": [ + { + "typeid": "{A0CA880C-AFE4-43CB-926C-59AC48496112}", + "details": { + "name": "Enabled" + } + } + ] + }, + { + "base": "GetFocusDistance", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Get Focus Distance" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Get Focus Distance is invoked" + }, + "details": { + "name": "Get Focus Distance" + }, + "results": [ + { + "typeid": "{EA2C3E90-AFBE-44D4-A90D-FAAF79BAF93D}", + "details": { + "name": "Focus Distance" + } + } + ] + }, + { + "base": "GetEnabledOverride", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Get Enabled Override" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Get Enabled Override is invoked" + }, + "details": { + "name": "Get Enabled Override" + }, + "results": [ + { + "typeid": "{A0CA880C-AFE4-43CB-926C-59AC48496112}", + "details": { + "name": "Enabled" + } + } + ] + }, + { + "base": "GetCameraEntityId", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Get Camera Entity Id" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Get Camera Entity Id is invoked" + }, + "details": { + "name": "Get Camera Entity Id" + }, + "results": [ + { + "typeid": "{6383F1D3-BB27-4E6B-A49A-6409B2059EAA}", + "details": { + "name": "Entity Id", + "tooltip": "Entity Unique Id" + } + } + ] + }, + { + "base": "GetAutoFocusScreenPositionOverride", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Get Auto Focus Screen Position Override" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Get Auto Focus Screen Position Override is invoked" + }, + "details": { + "name": "Get Auto Focus Screen Position Override" + }, + "results": [ + { + "typeid": "{EA2C3E90-AFBE-44D4-A90D-FAAF79BAF93D}", + "details": { + "name": "Auto Focus Screen Position" + } + } + ] + }, + { + "base": "GetAutoFocusSpeed", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Get Auto Focus Speed" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Get Auto Focus Speed is invoked" + }, + "details": { + "name": "Get Auto Focus Speed" + }, + "results": [ + { + "typeid": "{EA2C3E90-AFBE-44D4-A90D-FAAF79BAF93D}", + "details": { + "name": "Auto Focus Speed" + } + } + ] + }, + { + "base": "SetEnabledOverride", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Set Enabled Override" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Set Enabled Override is invoked" + }, + "details": { + "name": "Set Enabled Override" + }, + "params": [ + { + "typeid": "{A0CA880C-AFE4-43CB-926C-59AC48496112}", + "details": { + "name": "Enabled" + } + } + ] + }, + { + "base": "GetAutoFocusSensitivity", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Get Auto Focus Sensitivity" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Get Auto Focus Sensitivity is invoked" + }, + "details": { + "name": "Get Auto Focus Sensitivity" + }, + "results": [ + { + "typeid": "{EA2C3E90-AFBE-44D4-A90D-FAAF79BAF93D}", + "details": { + "name": "Auto Focus Sensitivity" + } + } + ] + }, + { + "base": "GetAutoFocusDelayOverride", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Get Auto Focus Delay Override" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Get Auto Focus Delay Override is invoked" + }, + "details": { + "name": "Get Auto Focus Delay Override" + }, + "results": [ + { + "typeid": "{EA2C3E90-AFBE-44D4-A90D-FAAF79BAF93D}", + "details": { + "name": "Auto Focus Delay" + } + } + ] + }, + { + "base": "GetApertureF", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Get ApertureF" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Get ApertureF is invoked" + }, + "details": { + "name": "Get Aperture F" + }, + "results": [ + { + "typeid": "{EA2C3E90-AFBE-44D4-A90D-FAAF79BAF93D}", + "details": { + "name": "Aperture F" + } + } + ] + }, + { + "base": "GetApertureFOverride", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Get ApertureF Override" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Get ApertureF Override is invoked" + }, + "details": { + "name": "Get Aperture F Override" + }, + "results": [ + { + "typeid": "{EA2C3E90-AFBE-44D4-A90D-FAAF79BAF93D}", + "details": { + "name": "Aperture F" + } + } + ] + }, + { + "base": "SetAutoFocusSensitivityOverride", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Set Auto Focus Sensitivity Override" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Set Auto Focus Sensitivity Override is invoked" + }, + "details": { + "name": "Set Auto Focus Sensitivity Override" + }, + "params": [ + { + "typeid": "{EA2C3E90-AFBE-44D4-A90D-FAAF79BAF93D}", + "details": { + "name": "Auto Focus Sensitivity" + } + } + ] + }, + { + "base": "SetQualityLevelOverride", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Set Quality Level Override" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Set Quality Level Override is invoked" + }, + "details": { + "name": "Set Quality Level Override" + }, + "params": [ + { + "typeid": "{A0CA880C-AFE4-43CB-926C-59AC48496112}", + "details": { + "name": "Quality Level" + } + } + ] + }, + { + "base": "GetFocusDistanceOverride", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Get Focus Distance Override" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Get Focus Distance Override is invoked" + }, + "details": { + "name": "Get Focus Distance Override" + }, + "results": [ + { + "typeid": "{EA2C3E90-AFBE-44D4-A90D-FAAF79BAF93D}", + "details": { + "name": "Focus Distance" + } + } + ] + }, + { + "base": "SetAutoFocusSpeed", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Set Auto Focus Speed" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Set Auto Focus Speed is invoked" + }, + "details": { + "name": "Set Auto Focus Speed" + }, + "params": [ + { + "typeid": "{EA2C3E90-AFBE-44D4-A90D-FAAF79BAF93D}", + "details": { + "name": "Auto Focus Speed" + } + } + ] + }, + { + "base": "SetEnableAutoFocusOverride", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Set Enable Auto Focus Override" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Set Enable Auto Focus Override is invoked" + }, + "details": { + "name": "Set Enable Auto Focus Override" + }, + "params": [ + { + "typeid": "{A0CA880C-AFE4-43CB-926C-59AC48496112}", + "details": { + "name": "Enable" + } + } + ] + }, + { + "base": "GetQualityLevel", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Get Quality Level" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Get Quality Level is invoked" + }, + "details": { + "name": "Get Quality Level" + }, + "results": [ + { + "typeid": "{43DA906B-7DEF-4CA8-9790-854106D3F983}", + "details": { + "name": "Quality Level" + } + } + ] + }, + { + "base": "GetAutoFocusSensitivityOverride", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Get Auto Focus Sensitivity Override" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Get Auto Focus Sensitivity Override is invoked" + }, + "details": { + "name": "Get Auto Focus Sensitivity Override" + }, + "results": [ + { + "typeid": "{EA2C3E90-AFBE-44D4-A90D-FAAF79BAF93D}", + "details": { + "name": "Auto Focus Sensitivity" + } + } + ] + }, + { + "base": "SetEnableDebugColoringOverride", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Set Enable Debug Coloring Override" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Set Enable Debug Coloring Override is invoked" + }, + "details": { + "name": "Set Enable Debug Coloring Override" + }, + "params": [ + { + "typeid": "{A0CA880C-AFE4-43CB-926C-59AC48496112}", + "details": { + "name": "Enable" + } + } + ] + }, + { + "base": "SetFNumber", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke SetF Number" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after SetF Number is invoked" + }, + "details": { + "name": "Set F Number" + }, + "params": [ + { + "typeid": "{EA2C3E90-AFBE-44D4-A90D-FAAF79BAF93D}", + "details": { + "name": "F Number" + } + } + ] + }, + { + "base": "GetCameraEntityIdOverride", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Get Camera Entity Id Override" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Get Camera Entity Id Override is invoked" + }, + "details": { + "name": "Get Camera Entity Id Override" + }, + "results": [ + { + "typeid": "{A0CA880C-AFE4-43CB-926C-59AC48496112}", + "details": { + "name": "bool" + } + } + ] + }, + { + "base": "SetEnableAutoFocus", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Set Enable Auto Focus" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Set Enable Auto Focus is invoked" + }, + "details": { + "name": "Set Enable Auto Focus" + }, + "params": [ + { + "typeid": "{A0CA880C-AFE4-43CB-926C-59AC48496112}", + "details": { + "name": "Enable" + } + } + ] + } + ] + } + ] +} \ No newline at end of file diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/EBus/Senders/DirectionalLightRequestBus.names b/Gems/ScriptCanvas/Assets/TranslationAssets/EBus/Senders/DirectionalLightRequestBus.names new file mode 100644 index 0000000000..bed5f6de73 --- /dev/null +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/EBus/Senders/DirectionalLightRequestBus.names @@ -0,0 +1,809 @@ +{ + "entries": [ + { + "base": "DirectionalLightRequestBus", + "context": "EBusSender", + "variant": "", + "details": { + "name": "Directional Light", + "category": "Lights" + }, + "methods": [ + { + "base": "GetNormalShadowBias", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Get Normal Shadow Bias" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Get Normal Shadow Bias is invoked" + }, + "details": { + "name": "Get Normal Shadow Bias" + }, + "results": [ + { + "typeid": "{EA2C3E90-AFBE-44D4-A90D-FAAF79BAF93D}", + "details": { + "name": "Normal Shadow Bias" + } + } + ] + }, + { + "base": "GetShadowBias", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Get Shadow Bias" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Get Shadow Bias is invoked" + }, + "details": { + "name": "Get Shadow Bias" + }, + "results": [ + { + "typeid": "{EA2C3E90-AFBE-44D4-A90D-FAAF79BAF93D}", + "details": { + "name": "Shadow Bias" + } + } + ] + }, + { + "base": "SetAngularDiameter", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Set Angular Diameter" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Set Angular Diameter is invoked" + }, + "details": { + "name": "Set Angular Diameter" + }, + "params": [ + { + "typeid": "{EA2C3E90-AFBE-44D4-A90D-FAAF79BAF93D}", + "details": { + "name": "Angular Diameter" + } + } + ] + }, + { + "base": "GetShadowFarClipDistance", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Get Shadow Far Clip Distance" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Get Shadow Far Clip Distance is invoked" + }, + "details": { + "name": "Get Shadow Far Clip Distance" + }, + "results": [ + { + "typeid": "{EA2C3E90-AFBE-44D4-A90D-FAAF79BAF93D}", + "details": { + "name": "Shadow Far Clip Distance" + } + } + ] + }, + { + "base": "SetShadowBias", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Set Shadow Bias" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Set Shadow Bias is invoked" + }, + "details": { + "name": "Set Shadow Bias" + }, + "params": [ + { + "typeid": "{EA2C3E90-AFBE-44D4-A90D-FAAF79BAF93D}", + "details": { + "name": "Shadow Bias" + } + } + ] + }, + { + "base": "SetIntensity", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Set Intensity" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Set Intensity is invoked" + }, + "details": { + "name": "Set Intensity" + }, + "params": [ + { + "typeid": "{EA2C3E90-AFBE-44D4-A90D-FAAF79BAF93D}", + "details": { + "name": "Intensity" + } + } + ] + }, + { + "base": "SetSplitRatio", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Set Split Ratio" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Set Split Ratio is invoked" + }, + "details": { + "name": "Set Split Ratio" + }, + "params": [ + { + "typeid": "{EA2C3E90-AFBE-44D4-A90D-FAAF79BAF93D}", + "details": { + "name": "Split Ratio" + } + } + ] + }, + { + "base": "GetFilteringSampleCount", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Get Filtering Sample Count" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Get Filtering Sample Count is invoked" + }, + "details": { + "name": "Get Filtering Sample Count" + }, + "results": [ + { + "typeid": "{43DA906B-7DEF-4CA8-9790-854106D3F983}", + "details": { + "name": "Filtering Sample Count" + } + } + ] + }, + { + "base": "GetShadowFilterMethod", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Get Shadow Filter Method" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Get Shadow Filter Method is invoked" + }, + "details": { + "name": "Get Shadow Filter Method" + }, + "results": [ + { + "typeid": "{43DA906B-7DEF-4CA8-9790-854106D3F983}", + "details": { + "name": "Shadow Filter Method" + } + } + ] + }, + { + "base": "GetCameraEntityId", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Get Camera Entity Id" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Get Camera Entity Id is invoked" + }, + "details": { + "name": "Get Camera Entity Id" + }, + "results": [ + { + "typeid": "{6383F1D3-BB27-4E6B-A49A-6409B2059EAA}", + "details": { + "name": "Camera Entity Id", + "tooltip": "Entity Unique Id" + } + } + ] + }, + { + "base": "SetDebugColoringEnabled", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Set Debug Coloring Enabled" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Set Debug Coloring Enabled is invoked" + }, + "details": { + "name": "Set Debug Coloring Enabled" + }, + "params": [ + { + "typeid": "{A0CA880C-AFE4-43CB-926C-59AC48496112}", + "details": { + "name": "Enabled" + } + } + ] + }, + { + "base": "GetDebugColoringEnabled", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Get Debug Coloring Enabled" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Get Debug Coloring Enabled is invoked" + }, + "details": { + "name": "Get Debug Coloring Enabled" + }, + "results": [ + { + "typeid": "{A0CA880C-AFE4-43CB-926C-59AC48496112}", + "details": { + "name": "Enabled" + } + } + ] + }, + { + "base": "GetViewFrustumCorrectionEnabled", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Get View Frustum Correction Enabled" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Get View Frustum Correction Enabled is invoked" + }, + "details": { + "name": "Get View Frustum Correction Enabled" + }, + "results": [ + { + "typeid": "{A0CA880C-AFE4-43CB-926C-59AC48496112}", + "details": { + "name": "Enabled" + } + } + ] + }, + { + "base": "SetViewFrustumCorrectionEnabled", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Set View Frustum Correction Enabled" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Set View Frustum Correction Enabled is invoked" + }, + "details": { + "name": "Set View Frustum Correction Enabled" + }, + "params": [ + { + "typeid": "{A0CA880C-AFE4-43CB-926C-59AC48496112}", + "details": { + "name": "Enabled" + } + } + ] + }, + { + "base": "SetGroundHeight", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Set Ground Height" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Set Ground Height is invoked" + }, + "details": { + "name": "Set Ground Height" + }, + "params": [ + { + "typeid": "{EA2C3E90-AFBE-44D4-A90D-FAAF79BAF93D}", + "details": { + "name": "Ground Height" + } + } + ] + }, + { + "base": "GetShadowReceiverPlaneBiasEnabled", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Get Shadow Receiver Plane Bias Enabled" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Get Shadow Receiver Plane Bias Enabled is invoked" + }, + "details": { + "name": "Get Shadow Receiver Plane Bias Enabled" + }, + "results": [ + { + "typeid": "{A0CA880C-AFE4-43CB-926C-59AC48496112}", + "details": { + "name": "Shadow Receiver Plane Bias" + } + } + ] + }, + { + "base": "SetShadowmapSize", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Set Shadowmap Size" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Set Shadowmap Size is invoked" + }, + "details": { + "name": "Set Shadowmap Size" + }, + "params": [ + { + "typeid": "{43DA906B-7DEF-4CA8-9790-854106D3F983}", + "details": { + "name": "Shadowmap Size" + } + } + ] + }, + { + "base": "SetShadowFarClipDistance", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Set Shadow Far Clip Distance" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Set Shadow Far Clip Distance is invoked" + }, + "details": { + "name": "Set Shadow Far Clip Distance" + }, + "params": [ + { + "typeid": "{EA2C3E90-AFBE-44D4-A90D-FAAF79BAF93D}", + "details": { + "name": "Shadow Far Clip Distance" + } + } + ] + }, + { + "base": "SetCameraEntityId", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Set Camera Entity Id" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Set Camera Entity Id is invoked" + }, + "details": { + "name": "Set Camera Entity Id" + }, + "params": [ + { + "typeid": "{6383F1D3-BB27-4E6B-A49A-6409B2059EAA}", + "details": { + "name": "Camera Entity Id", + "tooltip": "Entity Unique Id" + } + } + ] + }, + { + "base": "GetColor", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Get Color" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Get Color is invoked" + }, + "details": { + "name": "Get Color" + }, + "results": [ + { + "typeid": "{7894072A-9050-4F0F-901B-34B1A0D29417}", + "details": { + "name": "Color" + } + } + ] + }, + { + "base": "SetSplitAutomatic", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Set Split Automatic" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Set Split Automatic is invoked" + }, + "details": { + "name": "Set Split Automatic" + }, + "params": [ + { + "typeid": "{A0CA880C-AFE4-43CB-926C-59AC48496112}", + "details": { + "name": "Split Automatic" + } + } + ] + }, + { + "base": "SetCascadeFarDepth", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Set Cascade Far Depth" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Set Cascade Far Depth is invoked" + }, + "details": { + "name": "Set Cascade Far Depth" + }, + "params": [ + { + "typeid": "{0CE9FA36-1E3A-4C06-9254-B7C73A732053}", + "details": { + "name": "Cascade Far Depth" + } + } + ] + }, + { + "base": "GetSplitAutomatic", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Get Split Automatic" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Get Split Automatic is invoked" + }, + "details": { + "name": "Get Split Automatic" + }, + "results": [ + { + "typeid": "{A0CA880C-AFE4-43CB-926C-59AC48496112}", + "details": { + "name": "Split Automatic" + } + } + ] + }, + { + "base": "GetGroundHeight", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Get Ground Height" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Get Ground Height is invoked" + }, + "details": { + "name": "Get Ground Height" + }, + "results": [ + { + "typeid": "{EA2C3E90-AFBE-44D4-A90D-FAAF79BAF93D}", + "details": { + "name": "Ground Height" + } + } + ] + }, + { + "base": "SetCascadeCount", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Set Cascade Count" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Set Cascade Count is invoked" + }, + "details": { + "name": "Set Cascade Count" + }, + "params": [ + { + "typeid": "{43DA906B-7DEF-4CA8-9790-854106D3F983}", + "details": { + "name": "Cascade Count" + } + } + ] + }, + { + "base": "SetFilteringSampleCount", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Set Filtering Sample Count" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Set Filtering Sample Count is invoked" + }, + "details": { + "name": "Set Filtering Sample Count" + }, + "params": [ + { + "typeid": "{43DA906B-7DEF-4CA8-9790-854106D3F983}", + "details": { + "name": "Filtering Sample Count" + } + } + ] + }, + { + "base": "GetCascadeCount", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Get Cascade Count" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Get Cascade Count is invoked" + }, + "details": { + "name": "Get Cascade Count" + }, + "results": [ + { + "typeid": "{43DA906B-7DEF-4CA8-9790-854106D3F983}", + "details": { + "name": "Cascade Count" + } + } + ] + }, + { + "base": "GetIntensity", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Get Intensity" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Get Intensity is invoked" + }, + "details": { + "name": "Get Intensity" + }, + "results": [ + { + "typeid": "{EA2C3E90-AFBE-44D4-A90D-FAAF79BAF93D}", + "details": { + "name": "Intensity" + } + } + ] + }, + { + "base": "SetNormalShadowBias", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Set Normal Shadow Bias" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Set Normal Shadow Bias is invoked" + }, + "details": { + "name": "Set Normal Shadow Bias" + }, + "params": [ + { + "typeid": "{EA2C3E90-AFBE-44D4-A90D-FAAF79BAF93D}", + "details": { + "name": "Normal Shadow Bias" + } + } + ] + }, + { + "base": "GetShadowmapSize", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Get Shadowmap Size" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Get Shadowmap Size is invoked" + }, + "details": { + "name": "Get Shadowmap Size" + }, + "results": [ + { + "typeid": "{43DA906B-7DEF-4CA8-9790-854106D3F983}", + "details": { + "name": "Shadowmap Size" + } + } + ] + }, + { + "base": "GetAngularDiameter", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Get Angular Diameter" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Get Angular Diameter is invoked" + }, + "details": { + "name": "Get Angular Diameter" + }, + "results": [ + { + "typeid": "{EA2C3E90-AFBE-44D4-A90D-FAAF79BAF93D}", + "details": { + "name": "Angular Diameter" + } + } + ] + }, + { + "base": "SetShadowFilterMethod", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Set Shadow Filter Method" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Set Shadow Filter Method is invoked" + }, + "details": { + "name": "Set Shadow Filter Method" + }, + "params": [ + { + "typeid": "{43DA906B-7DEF-4CA8-9790-854106D3F983}", + "details": { + "name": "Shadow Filter Method" + } + } + ] + }, + { + "base": "SetShadowReceiverPlaneBiasEnabled", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Set Shadow Receiver Plane Bias Enabled" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Set Shadow Receiver Plane Bias Enabled is invoked" + }, + "details": { + "name": "Set Shadow Receiver Plane Bias Enabled" + }, + "params": [ + { + "typeid": "{A0CA880C-AFE4-43CB-926C-59AC48496112}", + "details": { + "name": "Enabled" + } + } + ] + }, + { + "base": "GetSplitRatio", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Get Split Ratio" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Get Split Ratio is invoked" + }, + "details": { + "name": "Get Split Ratio" + }, + "results": [ + { + "typeid": "{EA2C3E90-AFBE-44D4-A90D-FAAF79BAF93D}", + "details": { + "name": "Split Ratio" + } + } + ] + }, + { + "base": "GetCascadeFarDepth", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Get Cascade Far Depth" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Get Cascade Far Depth is invoked" + }, + "details": { + "name": "Get Cascade Far Depth" + }, + "results": [ + { + "typeid": "{0CE9FA36-1E3A-4C06-9254-B7C73A732053}", + "details": { + "name": "Cascade Far Depth" + } + } + ] + }, + { + "base": "SetColor", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Set Color" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Set Color is invoked" + }, + "details": { + "name": "Set Color" + }, + "params": [ + { + "typeid": "{7894072A-9050-4F0F-901B-34B1A0D29417}", + "details": { + "name": "Color" + } + } + ] + } + ] + } + ] +} \ No newline at end of file diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/EBus/Senders/DiskShapeComponentRequestsBus.names b/Gems/ScriptCanvas/Assets/TranslationAssets/EBus/Senders/DiskShapeComponentRequestsBus.names new file mode 100644 index 0000000000..05dd1a0e62 --- /dev/null +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/EBus/Senders/DiskShapeComponentRequestsBus.names @@ -0,0 +1,82 @@ +{ + "entries": [ + { + "base": "DiskShapeComponentRequestsBus", + "context": "EBusSender", + "variant": "", + "details": { + "name": "Disk Shape Component", + "category": "Rendering/Shapes" + }, + "methods": [ + { + "base": "GetDiskConfiguration", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Get Disk Configuration" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Get Disk Configuration is invoked" + }, + "details": { + "name": "Get Disk Configuration" + }, + "results": [ + { + "typeid": "{24EC2919-F198-4871-8404-F6DE8A16275E}", + "details": { + "name": "Configuration", + "tooltip": "Disk shape configuration parameters" + } + } + ] + }, + { + "base": "SetRadius", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Set Radius" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Set Radius is invoked" + }, + "details": { + "name": "Set Radius" + }, + "params": [ + { + "typeid": "{EA2C3E90-AFBE-44D4-A90D-FAAF79BAF93D}", + "details": { + "name": "float" + } + } + ] + }, + { + "base": "GetRadius", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Get Radius" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Get Radius is invoked" + }, + "details": { + "name": "Get Radius" + }, + "results": [ + { + "typeid": "{EA2C3E90-AFBE-44D4-A90D-FAAF79BAF93D}", + "details": { + "name": "float" + } + } + ] + } + ] + } + ] +} \ No newline at end of file diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/EBus/Senders/DitherGradientRequestBus.names b/Gems/ScriptCanvas/Assets/TranslationAssets/EBus/Senders/DitherGradientRequestBus.names new file mode 100644 index 0000000000..8179539db3 --- /dev/null +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/EBus/Senders/DitherGradientRequestBus.names @@ -0,0 +1,212 @@ +{ + "entries": [ + { + "base": "DitherGradientRequestBus", + "context": "EBusSender", + "variant": "", + "details": { + "name": "Dither Gradient" + }, + "methods": [ + { + "base": "GetPatternType", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke GetPatternType" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after GetPatternType is invoked" + }, + "details": { + "name": "GetPatternType" + }, + "results": [ + { + "typeid": "{72B9409A-7D1A-4831-9CFE-FCB3FADD3426}", + "details": { + "name": "unsigned char" + } + } + ] + }, + { + "base": "SetPatternType", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke SetPatternType" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after SetPatternType is invoked" + }, + "details": { + "name": "SetPatternType" + }, + "params": [ + { + "typeid": "{72B9409A-7D1A-4831-9CFE-FCB3FADD3426}", + "details": { + "name": "unsigned char" + } + } + ] + }, + { + "base": "SetPatternOffset", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke SetPatternOffset" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after SetPatternOffset is invoked" + }, + "details": { + "name": "SetPatternOffset" + }, + "params": [ + { + "typeid": "{8379EB7D-01FA-4538-B64B-A6543B4BE73D}", + "details": { + "name": "Vector3" + } + } + ] + }, + { + "base": "GetPatternOffset", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke GetPatternOffset" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after GetPatternOffset is invoked" + }, + "details": { + "name": "GetPatternOffset" + }, + "results": [ + { + "typeid": "{8379EB7D-01FA-4538-B64B-A6543B4BE73D}", + "details": { + "name": "Vector3" + } + } + ] + }, + { + "base": "GetPointsPerUnit", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke GetPointsPerUnit" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after GetPointsPerUnit is invoked" + }, + "details": { + "name": "GetPointsPerUnit" + }, + "results": [ + { + "typeid": "{EA2C3E90-AFBE-44D4-A90D-FAAF79BAF93D}", + "details": { + "name": "float" + } + } + ] + }, + { + "base": "SetPointsPerUnit", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke SetPointsPerUnit" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after SetPointsPerUnit is invoked" + }, + "details": { + "name": "SetPointsPerUnit" + }, + "params": [ + { + "typeid": "{EA2C3E90-AFBE-44D4-A90D-FAAF79BAF93D}", + "details": { + "name": "float" + } + } + ] + }, + { + "base": "SetUseSystemPointsPerUnit", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke SetUseSystemPointsPerUnit" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after SetUseSystemPointsPerUnit is invoked" + }, + "details": { + "name": "SetUseSystemPointsPerUnit" + }, + "params": [ + { + "typeid": "{A0CA880C-AFE4-43CB-926C-59AC48496112}", + "details": { + "name": "bool" + } + } + ] + }, + { + "base": "GetUseSystemPointsPerUnit", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke GetUseSystemPointsPerUnit" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after GetUseSystemPointsPerUnit is invoked" + }, + "details": { + "name": "GetUseSystemPointsPerUnit" + }, + "results": [ + { + "typeid": "{A0CA880C-AFE4-43CB-926C-59AC48496112}", + "details": { + "name": "bool" + } + } + ] + }, + { + "base": "GetGradientSampler", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke GetGradientSampler" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after GetGradientSampler is invoked" + }, + "details": { + "name": "GetGradientSampler" + }, + "results": [ + { + "typeid": "{3768D3A6-BF70-4ABC-B4EC-73C75A886916}", + "details": { + "name": "Gradient Sampler" + } + } + ] + } + ] + } + ] +} \ No newline at end of file diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/EBus/Senders/EditorCameraRequestBus.names b/Gems/ScriptCanvas/Assets/TranslationAssets/EBus/Senders/EditorCameraRequestBus.names new file mode 100644 index 0000000000..000d01dd63 --- /dev/null +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/EBus/Senders/EditorCameraRequestBus.names @@ -0,0 +1,120 @@ +{ + "entries": [ + { + "base": "EditorCameraRequestBus", + "context": "EBusSender", + "variant": "", + "details": { + "name": "Editor Camera", + "category": "Editor" + }, + "methods": [ + { + "base": "SetViewFromEntityPerspective", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Set View From Entity Perspective" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Set View From Entity Perspective is invoked" + }, + "details": { + "name": "Set View From Entity Perspective" + }, + "params": [ + { + "typeid": "{6383F1D3-BB27-4E6B-A49A-6409B2059EAA}", + "details": { + "name": "Entity Id", + "tooltip": "Entity Unique Id" + } + } + ] + }, + { + "base": "SetViewAndMovementLockFromEntityPerspective", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Set View And Movement Lock From Entity Perspective" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Set View And Movement Lock From Entity Perspective is invoked" + }, + "details": { + "name": "Set View And Movement Lock From Entity Perspective" + }, + "params": [ + { + "typeid": "{6383F1D3-BB27-4E6B-A49A-6409B2059EAA}", + "details": { + "name": "Entity Id", + "tooltip": "Entity Unique Id" + } + }, + { + "typeid": "{A0CA880C-AFE4-43CB-926C-59AC48496112}", + "details": { + "name": "Lock Camera Movement" + } + } + ] + }, + { + "base": "GetCurrentViewEntityId", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Get Current View Entity Id" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Get Current View Entity Id is invoked" + }, + "details": { + "name": "Get Current View Entity Id" + }, + "results": [ + { + "typeid": "{6383F1D3-BB27-4E6B-A49A-6409B2059EAA}", + "details": { + "name": "Entity Id", + "tooltip": "Entity Unique Id" + } + } + ] + }, + { + "base": "GetActiveCameraPosition", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Get Active Camera Position" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Get Active Camera Position is invoked" + }, + "details": { + "name": "Get Active Camera Position" + }, + "params": [ + { + "typeid": "{8379EB7D-01FA-4538-B64B-A6543B4BE73D}", + "details": { + "name": "Position" + } + } + ], + "results": [ + { + "typeid": "{A0CA880C-AFE4-43CB-926C-59AC48496112}", + "details": { + "name": "Success" + } + } + ] + } + ] + } + ] +} \ No newline at end of file diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/EBus/Senders/EditorCameraViewRequestBus.names b/Gems/ScriptCanvas/Assets/TranslationAssets/EBus/Senders/EditorCameraViewRequestBus.names new file mode 100644 index 0000000000..8fa5f016fe --- /dev/null +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/EBus/Senders/EditorCameraViewRequestBus.names @@ -0,0 +1,28 @@ +{ + "entries": [ + { + "base": "EditorCameraViewRequestBus", + "context": "EBusSender", + "variant": "", + "details": { + "name": "Editor Camera View" + }, + "methods": [ + { + "base": "ToggleCameraAsActiveView", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke ToggleCameraAsActiveView" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after ToggleCameraAsActiveView is invoked" + }, + "details": { + "name": "ToggleCameraAsActiveView" + } + } + ] + } + ] +} \ No newline at end of file diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/EBus/Senders/EditorEntityAPIBus.names b/Gems/ScriptCanvas/Assets/TranslationAssets/EBus/Senders/EditorEntityAPIBus.names new file mode 100644 index 0000000000..cfe5aa0540 --- /dev/null +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/EBus/Senders/EditorEntityAPIBus.names @@ -0,0 +1,125 @@ +{ + "entries": [ + { + "base": "EditorEntityAPIBus", + "context": "EBusSender", + "variant": "", + "details": { + "name": "Editor Entity API" + }, + "methods": [ + { + "base": "SetVisibilityState", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke SetVisibilityState" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after SetVisibilityState is invoked" + }, + "details": { + "name": "SetVisibilityState" + }, + "params": [ + { + "typeid": "{A0CA880C-AFE4-43CB-926C-59AC48496112}", + "details": { + "name": "bool" + } + } + ] + }, + { + "base": "SetLockState", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke SetLockState" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after SetLockState is invoked" + }, + "details": { + "name": "SetLockState" + }, + "params": [ + { + "typeid": "{A0CA880C-AFE4-43CB-926C-59AC48496112}", + "details": { + "name": "bool" + } + } + ] + }, + { + "base": "SetStartStatus", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke SetStartStatus" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after SetStartStatus is invoked" + }, + "details": { + "name": "SetStartStatus" + }, + "params": [ + { + "typeid": "{72039442-EB38-4D42-A1AD-CB68F7E0EEF6}", + "details": { + "name": "int" + } + } + ] + }, + { + "base": "SetName", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke SetName" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after SetName is invoked" + }, + "details": { + "name": "SetName" + }, + "params": [ + { + "typeid": "{03AAAB3F-5C47-5A66-9EBC-D5FA4DB353C9}", + "details": { + "name": "AZStd::string" + } + } + ] + }, + { + "base": "SetParent", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke SetParent" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after SetParent is invoked" + }, + "details": { + "name": "SetParent" + }, + "params": [ + { + "typeid": "{6383F1D3-BB27-4E6B-A49A-6409B2059EAA}", + "details": { + "name": "EntityId", + "tooltip": "Entity Unique Id" + } + } + ] + } + ] + } + ] +} \ No newline at end of file diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/EBus/Senders/EditorEntityContextRequestBus.names b/Gems/ScriptCanvas/Assets/TranslationAssets/EBus/Senders/EditorEntityContextRequestBus.names new file mode 100644 index 0000000000..6411ef233e --- /dev/null +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/EBus/Senders/EditorEntityContextRequestBus.names @@ -0,0 +1,36 @@ +{ + "entries": [ + { + "base": "EditorEntityContextRequestBus", + "context": "EBusSender", + "variant": "", + "details": { + "name": "Editor Entity Context" + }, + "methods": [ + { + "base": "GetEditorEntityContextId", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke GetEditorEntityContextId" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after GetEditorEntityContextId is invoked" + }, + "details": { + "name": "GetEditorEntityContextId" + }, + "results": [ + { + "typeid": "{E152C105-A133-4D03-BBF8-3D4B2FBA3E2A}", + "details": { + "name": "AZ::Uuid" + } + } + ] + } + ] + } + ] +} \ No newline at end of file diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/EBus/Senders/EditorEntityInfoRequestBus.names b/Gems/ScriptCanvas/Assets/TranslationAssets/EBus/Senders/EditorEntityInfoRequestBus.names new file mode 100644 index 0000000000..b817a475c0 --- /dev/null +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/EBus/Senders/EditorEntityInfoRequestBus.names @@ -0,0 +1,253 @@ +{ + "entries": [ + { + "base": "EditorEntityInfoRequestBus", + "context": "EBusSender", + "variant": "", + "details": { + "name": "Editor Entity Info" + }, + "methods": [ + { + "base": "GetName", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke GetName" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after GetName is invoked" + }, + "details": { + "name": "GetName" + }, + "results": [ + { + "typeid": "{03AAAB3F-5C47-5A66-9EBC-D5FA4DB353C9}", + "details": { + "name": "AZStd::string" + } + } + ] + }, + { + "base": "IsVisible", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke IsVisible" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after IsVisible is invoked" + }, + "details": { + "name": "IsVisible" + }, + "results": [ + { + "typeid": "{A0CA880C-AFE4-43CB-926C-59AC48496112}", + "details": { + "name": "bool" + } + } + ] + }, + { + "base": "GetChildIndex", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke GetChildIndex" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after GetChildIndex is invoked" + }, + "details": { + "name": "GetChildIndex" + }, + "params": [ + { + "typeid": "{6383F1D3-BB27-4E6B-A49A-6409B2059EAA}", + "details": { + "name": "EntityId", + "tooltip": "Entity Unique Id" + } + } + ], + "results": [ + { + "typeid": "{D6597933-47CD-4FC8-B911-63F3E2B0993A}", + "details": { + "name": "AZ::u64" + } + } + ] + }, + { + "base": "GetStartStatus", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke GetStartStatus" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after GetStartStatus is invoked" + }, + "details": { + "name": "GetStartStatus" + }, + "results": [ + { + "typeid": "{72039442-EB38-4D42-A1AD-CB68F7E0EEF6}", + "details": { + "name": "int" + } + } + ] + }, + { + "base": "GetChild", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke GetChild" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after GetChild is invoked" + }, + "details": { + "name": "GetChild" + }, + "params": [ + { + "typeid": "{D6597933-47CD-4FC8-B911-63F3E2B0993A}", + "details": { + "name": "AZ::u64" + } + } + ], + "results": [ + { + "typeid": "{6383F1D3-BB27-4E6B-A49A-6409B2059EAA}", + "details": { + "name": "EntityId", + "tooltip": "Entity Unique Id" + } + } + ] + }, + { + "base": "GetChildCount", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke GetChildCount" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after GetChildCount is invoked" + }, + "details": { + "name": "GetChildCount" + }, + "results": [ + { + "typeid": "{D6597933-47CD-4FC8-B911-63F3E2B0993A}", + "details": { + "name": "AZ::u64" + } + } + ] + }, + { + "base": "GetChildren", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke GetChildren" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after GetChildren is invoked" + }, + "details": { + "name": "GetChildren" + }, + "results": [ + { + "typeid": "{4841CFF0-7A5C-519C-BD16-D3625E99605E}", + "details": { + "name": "AZStd::vector" + } + } + ] + }, + { + "base": "IsLocked", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke IsLocked" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after IsLocked is invoked" + }, + "details": { + "name": "IsLocked" + }, + "results": [ + { + "typeid": "{A0CA880C-AFE4-43CB-926C-59AC48496112}", + "details": { + "name": "bool" + } + } + ] + }, + { + "base": "GetParent", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke GetParent" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after GetParent is invoked" + }, + "details": { + "name": "GetParent" + }, + "results": [ + { + "typeid": "{6383F1D3-BB27-4E6B-A49A-6409B2059EAA}", + "details": { + "name": "EntityId", + "tooltip": "Entity Unique Id" + } + } + ] + }, + { + "base": "IsHidden", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke IsHidden" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after IsHidden is invoked" + }, + "details": { + "name": "IsHidden" + }, + "results": [ + { + "typeid": "{A0CA880C-AFE4-43CB-926C-59AC48496112}", + "details": { + "name": "bool" + } + } + ] + } + ] + } + ] +} \ No newline at end of file diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/EBus/Senders/EditorLayerComponentRequestBus.names b/Gems/ScriptCanvas/Assets/TranslationAssets/EBus/Senders/EditorLayerComponentRequestBus.names new file mode 100644 index 0000000000..a65a960fa4 --- /dev/null +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/EBus/Senders/EditorLayerComponentRequestBus.names @@ -0,0 +1,80 @@ +{ + "entries": [ + { + "base": "EditorLayerComponentRequestBus", + "context": "EBusSender", + "variant": "", + "details": { + "name": "Editor Layer Component" + }, + "methods": [ + { + "base": "SetVisibility", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke SetVisibility" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after SetVisibility is invoked" + }, + "details": { + "name": "SetVisibility" + }, + "params": [ + { + "typeid": "{A0CA880C-AFE4-43CB-926C-59AC48496112}", + "details": { + "name": "bool" + } + } + ] + }, + { + "base": "SetLayerColor", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke SetLayerColor" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after SetLayerColor is invoked" + }, + "details": { + "name": "SetLayerColor" + }, + "params": [ + { + "typeid": "{7894072A-9050-4F0F-901B-34B1A0D29417}", + "details": { + "name": "Color" + } + } + ] + }, + { + "base": "GetColorPropertyValue", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke GetColorPropertyValue" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after GetColorPropertyValue is invoked" + }, + "details": { + "name": "GetColorPropertyValue" + }, + "results": [ + { + "typeid": "{7894072A-9050-4F0F-901B-34B1A0D29417}", + "details": { + "name": "Color" + } + } + ] + } + ] + } + ] +} \ No newline at end of file diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/EBus/Senders/EditorLayerTrackViewRequestBus.names b/Gems/ScriptCanvas/Assets/TranslationAssets/EBus/Senders/EditorLayerTrackViewRequestBus.names new file mode 100644 index 0000000000..18f70bbc55 --- /dev/null +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/EBus/Senders/EditorLayerTrackViewRequestBus.names @@ -0,0 +1,654 @@ +{ + "entries": [ + { + "base": "EditorLayerTrackViewRequestBus", + "context": "EBusSender", + "variant": "", + "details": { + "name": "Editor Layer TrackView" + }, + "methods": [ + { + "base": "NewSequence", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke NewSequence" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after NewSequence is invoked" + }, + "details": { + "name": "NewSequence" + }, + "params": [ + { + "typeid": "{3AB0037F-AF8D-48CE-BCA0-A170D18B2C03}", + "details": { + "name": "char" + } + }, + { + "typeid": "{72039442-EB38-4D42-A1AD-CB68F7E0EEF6}", + "details": { + "name": "int" + } + } + ] + }, + { + "base": "SetRecording", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke SetRecording" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after SetRecording is invoked" + }, + "details": { + "name": "SetRecording" + }, + "params": [ + { + "typeid": "{A0CA880C-AFE4-43CB-926C-59AC48496112}", + "details": { + "name": "bool" + } + } + ] + }, + { + "base": "GetNumSequences", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke GetNumSequences" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after GetNumSequences is invoked" + }, + "details": { + "name": "GetNumSequences" + }, + "results": [ + { + "typeid": "{72039442-EB38-4D42-A1AD-CB68F7E0EEF6}", + "details": { + "name": "int" + } + } + ] + }, + { + "base": "GetSequenceName", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke GetSequenceName" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after GetSequenceName is invoked" + }, + "details": { + "name": "GetSequenceName" + }, + "params": [ + { + "typeid": "{43DA906B-7DEF-4CA8-9790-854106D3F983}", + "details": { + "name": "unsigned int" + } + } + ], + "results": [ + { + "typeid": "{03AAAB3F-5C47-5A66-9EBC-D5FA4DB353C9}", + "details": { + "name": "AZStd::string" + } + } + ] + }, + { + "base": "GetSequenceTimeRange", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke GetSequenceTimeRange" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after GetSequenceTimeRange is invoked" + }, + "details": { + "name": "GetSequenceTimeRange" + }, + "params": [ + { + "typeid": "{3AB0037F-AF8D-48CE-BCA0-A170D18B2C03}", + "details": { + "name": "char" + } + } + ], + "results": [ + { + "typeid": "{515CF4CF-4992-4139-BDE5-42A887432B45}", + "details": { + "name": "Range" + } + } + ] + }, + { + "base": "PlaySequence", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke PlaySequence" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after PlaySequence is invoked" + }, + "details": { + "name": "PlaySequence" + } + }, + { + "base": "GetNodeName", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke GetNodeName" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after GetNodeName is invoked" + }, + "details": { + "name": "GetNodeName" + }, + "params": [ + { + "typeid": "{72039442-EB38-4D42-A1AD-CB68F7E0EEF6}", + "details": { + "name": "int" + } + }, + { + "typeid": "{7114E998-A8B4-519B-9342-A86D1587B4F7}", + "details": { + "name": "" + } + } + ], + "results": [ + { + "typeid": "{03AAAB3F-5C47-5A66-9EBC-D5FA4DB353C9}", + "details": { + "name": "AZStd::string" + } + } + ] + }, + { + "base": "SetSequenceTimeRange", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke SetSequenceTimeRange" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after SetSequenceTimeRange is invoked" + }, + "details": { + "name": "SetSequenceTimeRange" + }, + "params": [ + { + "typeid": "{3AB0037F-AF8D-48CE-BCA0-A170D18B2C03}", + "details": { + "name": "char" + } + }, + { + "typeid": "{EA2C3E90-AFBE-44D4-A90D-FAAF79BAF93D}", + "details": { + "name": "float" + } + }, + { + "typeid": "{EA2C3E90-AFBE-44D4-A90D-FAAF79BAF93D}", + "details": { + "name": "float" + } + } + ] + }, + { + "base": "DeleteSequence", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke DeleteSequence" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after DeleteSequence is invoked" + }, + "details": { + "name": "DeleteSequence" + }, + "params": [ + { + "typeid": "{3AB0037F-AF8D-48CE-BCA0-A170D18B2C03}", + "details": { + "name": "char" + } + } + ] + }, + { + "base": "GetKeyValue", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke GetKeyValue" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after GetKeyValue is invoked" + }, + "details": { + "name": "GetKeyValue" + }, + "params": [ + { + "typeid": "{3AB0037F-AF8D-48CE-BCA0-A170D18B2C03}", + "details": { + "name": "char" + } + }, + { + "typeid": "{72039442-EB38-4D42-A1AD-CB68F7E0EEF6}", + "details": { + "name": "int" + } + }, + { + "typeid": "{72039442-EB38-4D42-A1AD-CB68F7E0EEF6}", + "details": { + "name": "int" + } + }, + { + "typeid": "{3AB0037F-AF8D-48CE-BCA0-A170D18B2C03}", + "details": { + "name": "char" + } + }, + { + "typeid": "{3AB0037F-AF8D-48CE-BCA0-A170D18B2C03}", + "details": { + "name": "char" + } + } + ], + "results": [ + { + "typeid": "{03924488-C7F4-4D6D-948B-ABC2D1AE2FD3}", + "details": { + "name": "any" + } + } + ] + }, + { + "base": "StopSequence", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke StopSequence" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after StopSequence is invoked" + }, + "details": { + "name": "StopSequence" + } + }, + { + "base": "AddSelectedEntities", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke AddSelectedEntities" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after AddSelectedEntities is invoked" + }, + "details": { + "name": "AddSelectedEntities" + } + }, + { + "base": "GetNumTrackKeys", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke GetNumTrackKeys" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after GetNumTrackKeys is invoked" + }, + "details": { + "name": "GetNumTrackKeys" + }, + "params": [ + { + "typeid": "{3AB0037F-AF8D-48CE-BCA0-A170D18B2C03}", + "details": { + "name": "char" + } + }, + { + "typeid": "{72039442-EB38-4D42-A1AD-CB68F7E0EEF6}", + "details": { + "name": "int" + } + }, + { + "typeid": "{3AB0037F-AF8D-48CE-BCA0-A170D18B2C03}", + "details": { + "name": "char" + } + }, + { + "typeid": "{3AB0037F-AF8D-48CE-BCA0-A170D18B2C03}", + "details": { + "name": "char" + } + } + ], + "results": [ + { + "typeid": "{72039442-EB38-4D42-A1AD-CB68F7E0EEF6}", + "details": { + "name": "int" + } + } + ] + }, + { + "base": "AddLayerNode", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke AddLayerNode" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after AddLayerNode is invoked" + }, + "details": { + "name": "AddLayerNode" + } + }, + { + "base": "DeleteNode", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke DeleteNode" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after DeleteNode is invoked" + }, + "details": { + "name": "DeleteNode" + }, + "params": [ + { + "typeid": "{7114E998-A8B4-519B-9342-A86D1587B4F7}", + "details": { + "name": "" + } + }, + { + "typeid": "{7114E998-A8B4-519B-9342-A86D1587B4F7}", + "details": { + "name": "" + } + } + ] + }, + { + "base": "GetInterpolatedValue", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke GetInterpolatedValue" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after GetInterpolatedValue is invoked" + }, + "details": { + "name": "GetInterpolatedValue" + }, + "params": [ + { + "typeid": "{3AB0037F-AF8D-48CE-BCA0-A170D18B2C03}", + "details": { + "name": "char" + } + }, + { + "typeid": "{72039442-EB38-4D42-A1AD-CB68F7E0EEF6}", + "details": { + "name": "int" + } + }, + { + "typeid": "{EA2C3E90-AFBE-44D4-A90D-FAAF79BAF93D}", + "details": { + "name": "float" + } + }, + { + "typeid": "{3AB0037F-AF8D-48CE-BCA0-A170D18B2C03}", + "details": { + "name": "char" + } + }, + { + "typeid": "{3AB0037F-AF8D-48CE-BCA0-A170D18B2C03}", + "details": { + "name": "char" + } + } + ], + "results": [ + { + "typeid": "{03924488-C7F4-4D6D-948B-ABC2D1AE2FD3}", + "details": { + "name": "any" + } + } + ] + }, + { + "base": "GetNumNodes", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke GetNumNodes" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after GetNumNodes is invoked" + }, + "details": { + "name": "GetNumNodes" + }, + "params": [ + { + "typeid": "{7114E998-A8B4-519B-9342-A86D1587B4F7}", + "details": { + "name": "" + } + } + ], + "results": [ + { + "typeid": "{72039442-EB38-4D42-A1AD-CB68F7E0EEF6}", + "details": { + "name": "int" + } + } + ] + }, + { + "base": "AddNode", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke AddNode" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after AddNode is invoked" + }, + "details": { + "name": "AddNode" + }, + "params": [ + { + "typeid": "{3AB0037F-AF8D-48CE-BCA0-A170D18B2C03}", + "details": { + "name": "char" + } + }, + { + "typeid": "{3AB0037F-AF8D-48CE-BCA0-A170D18B2C03}", + "details": { + "name": "char" + } + } + ] + }, + { + "base": "AddTrack", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke AddTrack" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after AddTrack is invoked" + }, + "details": { + "name": "AddTrack" + }, + "params": [ + { + "typeid": "{3AB0037F-AF8D-48CE-BCA0-A170D18B2C03}", + "details": { + "name": "char" + } + }, + { + "typeid": "{3AB0037F-AF8D-48CE-BCA0-A170D18B2C03}", + "details": { + "name": "char" + } + }, + { + "typeid": "{3AB0037F-AF8D-48CE-BCA0-A170D18B2C03}", + "details": { + "name": "char" + } + } + ] + }, + { + "base": "DeleteTrack", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke DeleteTrack" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after DeleteTrack is invoked" + }, + "details": { + "name": "DeleteTrack" + }, + "params": [ + { + "typeid": "{3AB0037F-AF8D-48CE-BCA0-A170D18B2C03}", + "details": { + "name": "char" + } + }, + { + "typeid": "{43DA906B-7DEF-4CA8-9790-854106D3F983}", + "details": { + "name": "unsigned int" + } + }, + { + "typeid": "{3AB0037F-AF8D-48CE-BCA0-A170D18B2C03}", + "details": { + "name": "char" + } + }, + { + "typeid": "{3AB0037F-AF8D-48CE-BCA0-A170D18B2C03}", + "details": { + "name": "char" + } + } + ] + }, + { + "base": "SetCurrentSequence", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke SetCurrentSequence" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after SetCurrentSequence is invoked" + }, + "details": { + "name": "SetCurrentSequence" + }, + "params": [ + { + "typeid": "{3AB0037F-AF8D-48CE-BCA0-A170D18B2C03}", + "details": { + "name": "char" + } + } + ] + }, + { + "base": "SetTime", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke SetTime" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after SetTime is invoked" + }, + "details": { + "name": "SetTime" + }, + "params": [ + { + "typeid": "{EA2C3E90-AFBE-44D4-A90D-FAAF79BAF93D}", + "details": { + "name": "float" + } + } + ] + } + ] + } + ] +} \ No newline at end of file diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/EBus/Senders/EditorReflectionProbeBus.names b/Gems/ScriptCanvas/Assets/TranslationAssets/EBus/Senders/EditorReflectionProbeBus.names new file mode 100644 index 0000000000..ba03233971 --- /dev/null +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/EBus/Senders/EditorReflectionProbeBus.names @@ -0,0 +1,37 @@ +{ + "entries": [ + { + "base": "EditorReflectionProbeBus", + "context": "EBusSender", + "variant": "", + "details": { + "name": "Editor Reflection Probe", + "category": "Rendering" + }, + "methods": [ + { + "base": "BakeReflectionProbe", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Bake Reflection Probe" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Bake Reflection Probe is invoked" + }, + "details": { + "name": "Bake Reflection Probe" + }, + "results": [ + { + "typeid": "{43DA906B-7DEF-4CA8-9790-854106D3F983}", + "details": { + "name": "unsigned int" + } + } + ] + } + ] + } + ] +} \ No newline at end of file diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/EBus/Senders/EditorRequestBus.names b/Gems/ScriptCanvas/Assets/TranslationAssets/EBus/Senders/EditorRequestBus.names new file mode 100644 index 0000000000..a2dae6e173 --- /dev/null +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/EBus/Senders/EditorRequestBus.names @@ -0,0 +1,70 @@ +{ + "entries": [ + { + "base": "EditorRequestBus", + "context": "EBusSender", + "variant": "", + "details": { + "name": "Editor" + }, + "methods": [ + { + "base": "RegisterCustomViewPane", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke RegisterCustomViewPane" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after RegisterCustomViewPane is invoked" + }, + "details": { + "name": "RegisterCustomViewPane" + }, + "params": [ + { + "typeid": "{3AB0037F-AF8D-48CE-BCA0-A170D18B2C03}", + "details": { + "name": "char" + } + }, + { + "typeid": "{3AB0037F-AF8D-48CE-BCA0-A170D18B2C03}", + "details": { + "name": "char" + } + }, + { + "typeid": "{E9FB803A-2A47-4BCF-8A50-AB4C9D73AED2}", + "details": { + "name": "" + } + } + ] + }, + { + "base": "UnregisterViewPane", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke UnregisterViewPane" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after UnregisterViewPane is invoked" + }, + "details": { + "name": "UnregisterViewPane" + }, + "params": [ + { + "typeid": "{3AB0037F-AF8D-48CE-BCA0-A170D18B2C03}", + "details": { + "name": "char" + } + } + ] + } + ] + } + ] +} \ No newline at end of file diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/EBus/Senders/EditorToolsApplicationRequestBus.names b/Gems/ScriptCanvas/Assets/TranslationAssets/EBus/Senders/EditorToolsApplicationRequestBus.names new file mode 100644 index 0000000000..bcb75ef940 --- /dev/null +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/EBus/Senders/EditorToolsApplicationRequestBus.names @@ -0,0 +1,246 @@ +{ + "entries": [ + { + "base": "EditorToolsApplicationRequestBus", + "context": "EBusSender", + "variant": "", + "details": { + "name": "Editor Tools Application" + }, + "methods": [ + { + "base": "Exit", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Exit" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Exit is invoked" + }, + "details": { + "name": "Exit" + } + }, + { + "base": "GetCurrentLevelName", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke GetCurrentLevelName" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after GetCurrentLevelName is invoked" + }, + "details": { + "name": "GetCurrentLevelName" + }, + "results": [ + { + "typeid": "{03AAAB3F-5C47-5A66-9EBC-D5FA4DB353C9}", + "details": { + "name": "AZStd::string" + } + } + ] + }, + { + "base": "GetGameFolder", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke GetGameFolder" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after GetGameFolder is invoked" + }, + "details": { + "name": "GetGameFolder" + }, + "results": [ + { + "typeid": "{03AAAB3F-5C47-5A66-9EBC-D5FA4DB353C9}", + "details": { + "name": "AZStd::string" + } + } + ] + }, + { + "base": "CreateLevelNoPrompt", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke CreateLevelNoPrompt" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after CreateLevelNoPrompt is invoked" + }, + "details": { + "name": "CreateLevelNoPrompt" + }, + "params": [ + { + "typeid": "{7114E998-A8B4-519B-9342-A86D1587B4F7}", + "details": { + "name": "" + } + }, + { + "typeid": "{72039442-EB38-4D42-A1AD-CB68F7E0EEF6}", + "details": { + "name": "int" + } + }, + { + "typeid": "{A0CA880C-AFE4-43CB-926C-59AC48496112}", + "details": { + "name": "bool" + } + } + ], + "results": [ + { + "typeid": "{72039442-EB38-4D42-A1AD-CB68F7E0EEF6}", + "details": { + "name": "int" + } + } + ] + }, + { + "base": "OpenLevelNoPrompt", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke OpenLevelNoPrompt" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after OpenLevelNoPrompt is invoked" + }, + "details": { + "name": "OpenLevelNoPrompt" + }, + "params": [ + { + "typeid": "{7114E998-A8B4-519B-9342-A86D1587B4F7}", + "details": { + "name": "" + } + } + ], + "results": [ + { + "typeid": "{A0CA880C-AFE4-43CB-926C-59AC48496112}", + "details": { + "name": "bool" + } + } + ] + }, + { + "base": "GetCurrentLevelPath", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke GetCurrentLevelPath" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after GetCurrentLevelPath is invoked" + }, + "details": { + "name": "GetCurrentLevelPath" + }, + "results": [ + { + "typeid": "{03AAAB3F-5C47-5A66-9EBC-D5FA4DB353C9}", + "details": { + "name": "AZStd::string" + } + } + ] + }, + { + "base": "ExitNoPrompt", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke ExitNoPrompt" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after ExitNoPrompt is invoked" + }, + "details": { + "name": "ExitNoPrompt" + } + }, + { + "base": "OpenLevel", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke OpenLevel" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after OpenLevel is invoked" + }, + "details": { + "name": "OpenLevel" + }, + "params": [ + { + "typeid": "{7114E998-A8B4-519B-9342-A86D1587B4F7}", + "details": { + "name": "" + } + } + ], + "results": [ + { + "typeid": "{A0CA880C-AFE4-43CB-926C-59AC48496112}", + "details": { + "name": "bool" + } + } + ] + }, + { + "base": "CreateLevel", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke CreateLevel" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after CreateLevel is invoked" + }, + "details": { + "name": "CreateLevel" + }, + "params": [ + { + "typeid": "{7114E998-A8B4-519B-9342-A86D1587B4F7}", + "details": { + "name": "" + } + }, + { + "typeid": "{A0CA880C-AFE4-43CB-926C-59AC48496112}", + "details": { + "name": "bool" + } + } + ], + "results": [ + { + "typeid": "{72039442-EB38-4D42-A1AD-CB68F7E0EEF6}", + "details": { + "name": "int" + } + } + ] + } + ] + } + ] +} \ No newline at end of file diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/EBus/Senders/EditorTransformComponentSelectionRequestBus.names b/Gems/ScriptCanvas/Assets/TranslationAssets/EBus/Senders/EditorTransformComponentSelectionRequestBus.names new file mode 100644 index 0000000000..bd7e0157b9 --- /dev/null +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/EBus/Senders/EditorTransformComponentSelectionRequestBus.names @@ -0,0 +1,285 @@ +{ + "entries": [ + { + "base": "EditorTransformComponentSelectionRequestBus", + "context": "EBusSender", + "variant": "", + "details": { + "name": "Editor Transform Component Selection", + "category": "Editor" + }, + "methods": [ + { + "base": "CopyTranslationToSelectedEntitiesGroup", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Copy Translation To Selected Entities Group" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Copy Translation To Selected Entities Group is invoked" + }, + "details": { + "name": "Copy Translation To Selected Entities Group" + }, + "params": [ + { + "typeid": "{8379EB7D-01FA-4538-B64B-A6543B4BE73D}", + "details": { + "name": "Translation" + } + } + ] + }, + { + "base": "CopyOrientationToSelectedEntitiesIndividual", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Copy Orientation To Selected Entities Individual" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Copy Orientation To Selected Entities Individual is invoked" + }, + "details": { + "name": "Copy Orientation To Selected Entities Individual" + }, + "params": [ + { + "typeid": "{73103120-3DD3-4873-BAB3-9713FA2804FB}", + "details": { + "name": "Quaternion" + } + } + ] + }, + { + "base": "CopyOrientationToSelectedEntitiesGroup", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Copy Orientation To Selected Entities Group" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Copy Orientation To Selected Entities Group is invoked" + }, + "details": { + "name": "Copy Orientation To Selected Entities Group" + }, + "params": [ + { + "typeid": "{73103120-3DD3-4873-BAB3-9713FA2804FB}", + "details": { + "name": "Quaternion" + } + } + ] + }, + { + "base": "CopyTranslationToSelectedEntitiesIndividual", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Copy Translation To Selected Entities Individual" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Copy Translation To Selected Entities Individual is invoked" + }, + "details": { + "name": "Copy Translation To Selected Entities Individual" + }, + "params": [ + { + "typeid": "{8379EB7D-01FA-4538-B64B-A6543B4BE73D}", + "details": { + "name": "Translation" + } + } + ] + }, + { + "base": "CopyScaleToSelectedEntitiesIndividualLocal", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Copy Scale To Selected Entities Individual Local" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Copy Scale To Selected Entities Individual Local is invoked" + }, + "details": { + "name": "Copy Scale To Selected Entities Individual Local" + }, + "params": [ + { + "typeid": "{EA2C3E90-AFBE-44D4-A90D-FAAF79BAF93D}", + "details": { + "name": "float" + } + } + ] + }, + { + "base": "OverrideManipulatorTranslation", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Override Manipulator Translation" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Override Manipulator Translation is invoked" + }, + "details": { + "name": "Override Manipulator Translation" + }, + "params": [ + { + "typeid": "{8379EB7D-01FA-4538-B64B-A6543B4BE73D}", + "details": { + "name": "Vector 3" + } + } + ] + }, + { + "base": "RefreshManipulators", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Refresh Manipulators" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Refresh Manipulators is invoked" + }, + "details": { + "name": "Refresh Manipulators" + }, + "params": [ + { + "typeid": "{72039442-EB38-4D42-A1AD-CB68F7E0EEF6}", + "details": { + "name": "int" + } + } + ] + }, + { + "base": "OverrideManipulatorOrientation", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Override Manipulator Orientation" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Override Manipulator Orientation is invoked" + }, + "details": { + "name": "Override Manipulator Orientation" + }, + "params": [ + { + "typeid": "{73103120-3DD3-4873-BAB3-9713FA2804FB}", + "details": { + "name": "Quaternion" + } + } + ] + }, + { + "base": "GetTransformMode", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Get Transform Mode" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Get Transform Mode is invoked" + }, + "details": { + "name": "Get Transform Mode" + }, + "results": [ + { + "typeid": "{72039442-EB38-4D42-A1AD-CB68F7E0EEF6}", + "details": { + "name": "int" + } + } + ] + }, + { + "base": "CopyScaleToSelectedEntitiesIndividualWorld", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Copy Scale To Selected Entities Individual World" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Copy Scale To Selected Entities Individual World is invoked" + }, + "details": { + "name": "Copy Scale To Selected Entities Individual World" + }, + "params": [ + { + "typeid": "{EA2C3E90-AFBE-44D4-A90D-FAAF79BAF93D}", + "details": { + "name": "float" + } + } + ] + }, + { + "base": "SetTransformMode", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Set Transform Mode" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Set Transform Mode is invoked" + }, + "details": { + "name": "Set Transform Mode" + }, + "params": [ + { + "typeid": "{72039442-EB38-4D42-A1AD-CB68F7E0EEF6}", + "details": { + "name": "int" + } + } + ] + }, + { + "base": "ResetTranslationForSelectedEntitiesLocal", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Reset Translation For Selected Entities Local" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Reset Translation For Selected Entities Local is invoked" + }, + "details": { + "name": "Reset Translation For Selected Entities Local" + } + }, + { + "base": "ResetOrientationForSelectedEntitiesLocal", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Reset Orientation For Selected Entities Local" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Reset Orientation For Selected Entities Local is invoked" + }, + "details": { + "name": "Reset Orientation For Selected Entities Local" + } + } + ] + } + ] +} \ No newline at end of file diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/EBus/Senders/ExposureControlRequestBus.names b/Gems/ScriptCanvas/Assets/TranslationAssets/EBus/Senders/ExposureControlRequestBus.names new file mode 100644 index 0000000000..7ff05531a5 --- /dev/null +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/EBus/Senders/ExposureControlRequestBus.names @@ -0,0 +1,719 @@ +{ + "entries": [ + { + "base": "ExposureControlRequestBus", + "context": "EBusSender", + "variant": "", + "details": { + "name": "Exposure Control", + "category": "Rendering" + }, + "methods": [ + { + "base": "SetEyeAdaptationSpeedDownOverride", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Set Eye Adaptation Speed Down Override" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Set Eye Adaptation Speed Down Override is invoked" + }, + "details": { + "name": "Set Eye Adaptation Speed Down Override" + }, + "params": [ + { + "typeid": "{EA2C3E90-AFBE-44D4-A90D-FAAF79BAF93D}", + "details": { + "name": "float" + } + } + ] + }, + { + "base": "GetEnabled", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Get Enabled" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Get Enabled is invoked" + }, + "details": { + "name": "Get Enabled" + }, + "results": [ + { + "typeid": "{A0CA880C-AFE4-43CB-926C-59AC48496112}", + "details": { + "name": "bool" + } + } + ] + }, + { + "base": "SetEnabledOverride", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Set Enabled Override" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Set Enabled Override is invoked" + }, + "details": { + "name": "Set Enabled Override" + }, + "params": [ + { + "typeid": "{A0CA880C-AFE4-43CB-926C-59AC48496112}", + "details": { + "name": "bool" + } + } + ] + }, + { + "base": "SetManualCompensation", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Set Manual Compensation" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Set Manual Compensation is invoked" + }, + "details": { + "name": "Set Manual Compensation" + }, + "params": [ + { + "typeid": "{EA2C3E90-AFBE-44D4-A90D-FAAF79BAF93D}", + "details": { + "name": "float" + } + } + ] + }, + { + "base": "SetEyeAdaptationSpeedDown", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Set Eye Adaptation Speed Down" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Set Eye Adaptation Speed Down is invoked" + }, + "details": { + "name": "Set Eye Adaptation Speed Down" + }, + "params": [ + { + "typeid": "{EA2C3E90-AFBE-44D4-A90D-FAAF79BAF93D}", + "details": { + "name": "float" + } + } + ] + }, + { + "base": "GetExposureControlTypeOverride", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Get Exposure Control Type Override" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Get Exposure Control Type Override is invoked" + }, + "details": { + "name": "Get Exposure Control Type Override" + }, + "results": [ + { + "typeid": "{A0CA880C-AFE4-43CB-926C-59AC48496112}", + "details": { + "name": "bool" + } + } + ] + }, + { + "base": "GetHeatmapEnabled", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Get Heatmap Enabled" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Get Heatmap Enabled is invoked" + }, + "details": { + "name": "Get Heatmap Enabled" + }, + "results": [ + { + "typeid": "{A0CA880C-AFE4-43CB-926C-59AC48496112}", + "details": { + "name": "bool" + } + } + ] + }, + { + "base": "SetEyeAdaptationSpeedUpOverride", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Set Eye Adaptation Speed Up Override" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Set Eye Adaptation Speed Up Override is invoked" + }, + "details": { + "name": "Set Eye Adaptation Speed Up Override" + }, + "params": [ + { + "typeid": "{EA2C3E90-AFBE-44D4-A90D-FAAF79BAF93D}", + "details": { + "name": "float" + } + } + ] + }, + { + "base": "SetExposureControlType", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Set Exposure Control Type" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Set Exposure Control Type is invoked" + }, + "details": { + "name": "Set Exposure Control Type" + }, + "params": [ + { + "typeid": "{72039442-EB38-4D42-A1AD-CB68F7E0EEF6}", + "details": { + "name": "int" + } + } + ] + }, + { + "base": "SetEnabled", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Set Enabled" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Set Enabled is invoked" + }, + "details": { + "name": "Set Enabled" + }, + "params": [ + { + "typeid": "{A0CA880C-AFE4-43CB-926C-59AC48496112}", + "details": { + "name": "bool" + } + } + ] + }, + { + "base": "GetExposureControlType", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Get Exposure Control Type" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Get Exposure Control Type is invoked" + }, + "details": { + "name": "Get Exposure Control Type" + }, + "results": [ + { + "typeid": "{72039442-EB38-4D42-A1AD-CB68F7E0EEF6}", + "details": { + "name": "int" + } + } + ] + }, + { + "base": "SetEyeAdaptationExposureMax", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Set Eye Adaptation Exposure Max" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Set Eye Adaptation Exposure Max is invoked" + }, + "details": { + "name": "Set Eye Adaptation Exposure Max" + }, + "params": [ + { + "typeid": "{EA2C3E90-AFBE-44D4-A90D-FAAF79BAF93D}", + "details": { + "name": "float" + } + } + ] + }, + { + "base": "GetEyeAdaptationSpeedDownOverride", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Get Eye Adaptation Speed Down Override" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Get Eye Adaptation Speed Down Override is invoked" + }, + "details": { + "name": "Get Eye Adaptation Speed Down Override" + }, + "results": [ + { + "typeid": "{EA2C3E90-AFBE-44D4-A90D-FAAF79BAF93D}", + "details": { + "name": "float" + } + } + ] + }, + { + "base": "GetManualCompensationOverride", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Get Manual Compensation Override" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Get Manual Compensation Override is invoked" + }, + "details": { + "name": "Get Manual Compensation Override" + }, + "results": [ + { + "typeid": "{EA2C3E90-AFBE-44D4-A90D-FAAF79BAF93D}", + "details": { + "name": "float" + } + } + ] + }, + { + "base": "GetHeatmapEnabledOverride", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Get Heatmap Enabled Override" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Get Heatmap Enabled Override is invoked" + }, + "details": { + "name": "Get Heatmap Enabled Override" + }, + "results": [ + { + "typeid": "{A0CA880C-AFE4-43CB-926C-59AC48496112}", + "details": { + "name": "bool" + } + } + ] + }, + { + "base": "SetEyeAdaptationSpeedUp", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Set Eye Adaptation Speed Up" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Set Eye Adaptation Speed Up is invoked" + }, + "details": { + "name": "Set Eye Adaptation Speed Up" + }, + "params": [ + { + "typeid": "{EA2C3E90-AFBE-44D4-A90D-FAAF79BAF93D}", + "details": { + "name": "float" + } + } + ] + }, + { + "base": "GetEyeAdaptationSpeedUpOverride", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Get Eye Adaptation Speed Up Override" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Get Eye Adaptation Speed Up Override is invoked" + }, + "details": { + "name": "Get Eye Adaptation Speed Up Override" + }, + "results": [ + { + "typeid": "{EA2C3E90-AFBE-44D4-A90D-FAAF79BAF93D}", + "details": { + "name": "float" + } + } + ] + }, + { + "base": "GetEyeAdaptationExposureMinOverride", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Get Eye Adaptation Exposure Min Override" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Get Eye Adaptation Exposure Min Override is invoked" + }, + "details": { + "name": "Get Eye Adaptation Exposure Min Override" + }, + "results": [ + { + "typeid": "{EA2C3E90-AFBE-44D4-A90D-FAAF79BAF93D}", + "details": { + "name": "float" + } + } + ] + }, + { + "base": "GetEyeAdaptationExposureMaxOverride", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Get Eye Adaptation Exposure Max Override" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Get Eye Adaptation Exposure Max Override is invoked" + }, + "details": { + "name": "Get Eye Adaptation Exposure Max Override" + }, + "results": [ + { + "typeid": "{EA2C3E90-AFBE-44D4-A90D-FAAF79BAF93D}", + "details": { + "name": "float" + } + } + ] + }, + { + "base": "GetEnabledOverride", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Get Enabled Override" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Get Enabled Override is invoked" + }, + "details": { + "name": "Get Enabled Override" + }, + "results": [ + { + "typeid": "{A0CA880C-AFE4-43CB-926C-59AC48496112}", + "details": { + "name": "bool" + } + } + ] + }, + { + "base": "SetExposureControlTypeOverride", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Set Exposure Control Type Override" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Set Exposure Control Type Override is invoked" + }, + "details": { + "name": "Set Exposure Control Type Override" + }, + "params": [ + { + "typeid": "{A0CA880C-AFE4-43CB-926C-59AC48496112}", + "details": { + "name": "bool" + } + } + ] + }, + { + "base": "GetEyeAdaptationExposureMin", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Get Eye Adaptation Exposure Min" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Get Eye Adaptation Exposure Min is invoked" + }, + "details": { + "name": "Get Eye Adaptation Exposure Min" + }, + "results": [ + { + "typeid": "{EA2C3E90-AFBE-44D4-A90D-FAAF79BAF93D}", + "details": { + "name": "float" + } + } + ] + }, + { + "base": "GetManualCompensation", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Get Manual Compensation" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Get Manual Compensation is invoked" + }, + "details": { + "name": "Get Manual Compensation" + }, + "results": [ + { + "typeid": "{EA2C3E90-AFBE-44D4-A90D-FAAF79BAF93D}", + "details": { + "name": "float" + } + } + ] + }, + { + "base": "SetEyeAdaptationExposureMinOverride", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Set Eye Adaptation Exposure Min Override" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Set Eye Adaptation Exposure Min Override is invoked" + }, + "details": { + "name": "Set Eye Adaptation Exposure Min Override" + }, + "params": [ + { + "typeid": "{EA2C3E90-AFBE-44D4-A90D-FAAF79BAF93D}", + "details": { + "name": "float" + } + } + ] + }, + { + "base": "SetManualCompensationOverride", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Set Manual Compensation Override" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Set Manual Compensation Override is invoked" + }, + "details": { + "name": "Set Manual Compensation Override" + }, + "params": [ + { + "typeid": "{EA2C3E90-AFBE-44D4-A90D-FAAF79BAF93D}", + "details": { + "name": "float" + } + } + ] + }, + { + "base": "GetEyeAdaptationSpeedDown", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Get Eye Adaptation Speed Down" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Get Eye Adaptation Speed Down is invoked" + }, + "details": { + "name": "Get Eye Adaptation Speed Down" + }, + "results": [ + { + "typeid": "{EA2C3E90-AFBE-44D4-A90D-FAAF79BAF93D}", + "details": { + "name": "float" + } + } + ] + }, + { + "base": "GetEyeAdaptationSpeedUp", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Get Eye Adaptation Speed Up" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Get Eye Adaptation Speed Up is invoked" + }, + "details": { + "name": "Get Eye Adaptation Speed Up" + }, + "results": [ + { + "typeid": "{EA2C3E90-AFBE-44D4-A90D-FAAF79BAF93D}", + "details": { + "name": "float" + } + } + ] + }, + { + "base": "SetEyeAdaptationExposureMin", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Set Eye Adaptation Exposure Min" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Set Eye Adaptation Exposure Min is invoked" + }, + "details": { + "name": "Set Eye Adaptation Exposure Min" + }, + "params": [ + { + "typeid": "{EA2C3E90-AFBE-44D4-A90D-FAAF79BAF93D}", + "details": { + "name": "float" + } + } + ] + }, + { + "base": "SetHeatmapEnabled", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Set Heatmap Enabled" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Set Heatmap Enabled is invoked" + }, + "details": { + "name": "Set Heatmap Enabled" + }, + "params": [ + { + "typeid": "{A0CA880C-AFE4-43CB-926C-59AC48496112}", + "details": { + "name": "bool" + } + } + ] + }, + { + "base": "SetEyeAdaptationExposureMaxOverride", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Set Eye Adaptation Exposure Max Override" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Set Eye Adaptation Exposure Max Override is invoked" + }, + "details": { + "name": "Set Eye Adaptation Exposure Max Override" + }, + "params": [ + { + "typeid": "{EA2C3E90-AFBE-44D4-A90D-FAAF79BAF93D}", + "details": { + "name": "float" + } + } + ] + }, + { + "base": "GetEyeAdaptationExposureMax", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Get Eye Adaptation Exposure Max" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Get Eye Adaptation Exposure Max is invoked" + }, + "details": { + "name": "Get Eye Adaptation Exposure Max" + }, + "results": [ + { + "typeid": "{EA2C3E90-AFBE-44D4-A90D-FAAF79BAF93D}", + "details": { + "name": "float" + } + } + ] + }, + { + "base": "SetHeatmapEnabledOverride", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Set Heatmap Enabled Override" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Set Heatmap Enabled Override is invoked" + }, + "details": { + "name": "Set Heatmap Enabled Override" + }, + "params": [ + { + "typeid": "{A0CA880C-AFE4-43CB-926C-59AC48496112}", + "details": { + "name": "bool" + } + } + ] + } + ] + } + ] +} \ No newline at end of file diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/EBus/Senders/FlyCameraInputBus.names b/Gems/ScriptCanvas/Assets/TranslationAssets/EBus/Senders/FlyCameraInputBus.names new file mode 100644 index 0000000000..d8bba2a01f --- /dev/null +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/EBus/Senders/FlyCameraInputBus.names @@ -0,0 +1,59 @@ +{ + "entries": [ + { + "base": "FlyCameraInputBus", + "context": "EBusSender", + "variant": "", + "details": { + "name": "Fly Camera", + "category": "Camera" + }, + "methods": [ + { + "base": "SetIsEnabled", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Set Is Enabled" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Set Is Enabled is invoked" + }, + "details": { + "name": "Set Is Enabled" + }, + "params": [ + { + "typeid": "{A0CA880C-AFE4-43CB-926C-59AC48496112}", + "details": { + "name": "Is Enabled" + } + } + ] + }, + { + "base": "GetIsEnabled", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Get Is Enabled" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Get Is Enabled is invoked" + }, + "details": { + "name": "Get Is Enabled" + }, + "results": [ + { + "typeid": "{A0CA880C-AFE4-43CB-926C-59AC48496112}", + "details": { + "name": "Is Enabled" + } + } + ] + } + ] + } + ] +} \ No newline at end of file diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/EBus/Senders/ForceLinearDampingRequestBus.names b/Gems/ScriptCanvas/Assets/TranslationAssets/EBus/Senders/ForceLinearDampingRequestBus.names new file mode 100644 index 0000000000..a54c222351 --- /dev/null +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/EBus/Senders/ForceLinearDampingRequestBus.names @@ -0,0 +1,58 @@ +{ + "entries": [ + { + "base": "ForceLinearDampingRequestBus", + "context": "EBusSender", + "variant": "", + "details": { + "name": "Force Linear Damping" + }, + "methods": [ + { + "base": "SetDamping", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Set Damping" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Set Damping is invoked" + }, + "details": { + "name": "Set Damping" + }, + "params": [ + { + "typeid": "{EA2C3E90-AFBE-44D4-A90D-FAAF79BAF93D}", + "details": { + "name": "Damping" + } + } + ] + }, + { + "base": "GetDamping", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Get Damping" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Get Damping is invoked" + }, + "details": { + "name": "Get Damping" + }, + "results": [ + { + "typeid": "{EA2C3E90-AFBE-44D4-A90D-FAAF79BAF93D}", + "details": { + "name": "Damping" + } + } + ] + } + ] + } + ] +} \ No newline at end of file diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/EBus/Senders/ForceLocalSpaceRequestBus.names b/Gems/ScriptCanvas/Assets/TranslationAssets/EBus/Senders/ForceLocalSpaceRequestBus.names new file mode 100644 index 0000000000..bc3416daca --- /dev/null +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/EBus/Senders/ForceLocalSpaceRequestBus.names @@ -0,0 +1,102 @@ +{ + "entries": [ + { + "base": "ForceLocalSpaceRequestBus", + "context": "EBusSender", + "variant": "", + "details": { + "name": "Force Local Space" + }, + "methods": [ + { + "base": "SetDirection", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Set Direction" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after SetDirection is invoked" + }, + "details": { + "name": "Set Direction" + }, + "params": [ + { + "typeid": "{8379EB7D-01FA-4538-B64B-A6543B4BE73D}", + "details": { + "name": "Direction" + } + } + ] + }, + { + "base": "GetDirection", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Get Direction" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Get Direction is invoked" + }, + "details": { + "name": "Get Direction" + }, + "results": [ + { + "typeid": "{8379EB7D-01FA-4538-B64B-A6543B4BE73D}", + "details": { + "name": "Direction" + } + } + ] + }, + { + "base": "SetMagnitude", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Set Magnitude" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Set Magnitude is invoked" + }, + "details": { + "name": "Set Magnitude" + }, + "params": [ + { + "typeid": "{EA2C3E90-AFBE-44D4-A90D-FAAF79BAF93D}", + "details": { + "name": "Magnitude" + } + } + ] + }, + { + "base": "GetMagnitude", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Get Magnitude" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Get Magnitude is invoked" + }, + "details": { + "name": "Get Magnitude" + }, + "results": [ + { + "typeid": "{EA2C3E90-AFBE-44D4-A90D-FAAF79BAF93D}", + "details": { + "name": "Magnitude" + } + } + ] + } + ] + } + ] +} \ No newline at end of file diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/EBus/Senders/ForcePointRequestBus.names b/Gems/ScriptCanvas/Assets/TranslationAssets/EBus/Senders/ForcePointRequestBus.names new file mode 100644 index 0000000000..0c0f959f66 --- /dev/null +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/EBus/Senders/ForcePointRequestBus.names @@ -0,0 +1,58 @@ +{ + "entries": [ + { + "base": "ForcePointRequestBus", + "context": "EBusSender", + "variant": "", + "details": { + "name": "Force Point" + }, + "methods": [ + { + "base": "SetMagnitude", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Set Magnitude" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Set Magnitude is invoked" + }, + "details": { + "name": "Set Magnitude" + }, + "params": [ + { + "typeid": "{EA2C3E90-AFBE-44D4-A90D-FAAF79BAF93D}", + "details": { + "name": "Magnitude" + } + } + ] + }, + { + "base": "GetMagnitude", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Get Magnitude" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Get Magnitude is invoked" + }, + "details": { + "name": "Get Magnitude" + }, + "results": [ + { + "typeid": "{EA2C3E90-AFBE-44D4-A90D-FAAF79BAF93D}", + "details": { + "name": "Magnitude" + } + } + ] + } + ] + } + ] +} \ No newline at end of file diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/EBus/Senders/ForceSimpleDragRequestBus.names b/Gems/ScriptCanvas/Assets/TranslationAssets/EBus/Senders/ForceSimpleDragRequestBus.names new file mode 100644 index 0000000000..a5540e1f3a --- /dev/null +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/EBus/Senders/ForceSimpleDragRequestBus.names @@ -0,0 +1,58 @@ +{ + "entries": [ + { + "base": "ForceSimpleDragRequestBus", + "context": "EBusSender", + "variant": "", + "details": { + "name": "Force Simple Drag" + }, + "methods": [ + { + "base": "SetDensity", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Set Density" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Set Density is invoked" + }, + "details": { + "name": "Set Density" + }, + "params": [ + { + "typeid": "{EA2C3E90-AFBE-44D4-A90D-FAAF79BAF93D}", + "details": { + "name": "Density" + } + } + ] + }, + { + "base": "GetDensity", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Get Density" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Get Density is invoked" + }, + "details": { + "name": "Get Density" + }, + "results": [ + { + "typeid": "{EA2C3E90-AFBE-44D4-A90D-FAAF79BAF93D}", + "details": { + "name": "Density" + } + } + ] + } + ] + } + ] +} \ No newline at end of file diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/EBus/Senders/ForceSplineFollowRequestBus.names b/Gems/ScriptCanvas/Assets/TranslationAssets/EBus/Senders/ForceSplineFollowRequestBus.names new file mode 100644 index 0000000000..9cf29c9653 --- /dev/null +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/EBus/Senders/ForceSplineFollowRequestBus.names @@ -0,0 +1,190 @@ +{ + "entries": [ + { + "base": "ForceSplineFollowRequestBus", + "context": "EBusSender", + "variant": "", + "details": { + "name": "Force Spline Follow" + }, + "methods": [ + { + "base": "GetLookAhead", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Get Look Ahead" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Get Look Ahead is invoked" + }, + "details": { + "name": "Get Look Ahead" + }, + "results": [ + { + "typeid": "{EA2C3E90-AFBE-44D4-A90D-FAAF79BAF93D}", + "details": { + "name": "Look Ahead" + } + } + ] + }, + { + "base": "SetLookAhead", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Set Look Ahead" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Set Look Ahead is invoked" + }, + "details": { + "name": "Set Look Ahead" + }, + "params": [ + { + "typeid": "{EA2C3E90-AFBE-44D4-A90D-FAAF79BAF93D}", + "details": { + "name": "Look Ahead" + } + } + ] + }, + { + "base": "SetTargetSpeed", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Set Target Speed" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Set Target Speed is invoked" + }, + "details": { + "name": "Set Target Speed" + }, + "params": [ + { + "typeid": "{EA2C3E90-AFBE-44D4-A90D-FAAF79BAF93D}", + "details": { + "name": "Target Speed" + } + } + ] + }, + { + "base": "GetFrequency", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Get Frequency" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Get Frequency is invoked" + }, + "details": { + "name": "Get Frequency" + }, + "results": [ + { + "typeid": "{EA2C3E90-AFBE-44D4-A90D-FAAF79BAF93D}", + "details": { + "name": "Frequency" + } + } + ] + }, + { + "base": "GetDampingRatio", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Get Damping Ratio" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Get Damping Ratio is invoked" + }, + "details": { + "name": "Get Damping Ratio" + }, + "results": [ + { + "typeid": "{EA2C3E90-AFBE-44D4-A90D-FAAF79BAF93D}", + "details": { + "name": "Damping Ratio" + } + } + ] + }, + { + "base": "SetFrequency", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Set Frequency" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Set Frequency is invoked" + }, + "details": { + "name": "Set Frequency" + }, + "params": [ + { + "typeid": "{EA2C3E90-AFBE-44D4-A90D-FAAF79BAF93D}", + "details": { + "name": "Frequency" + } + } + ] + }, + { + "base": "GetTargetSpeed", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Get Target Speed" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Get Target Speed is invoked" + }, + "details": { + "name": "Get Target Speed" + }, + "results": [ + { + "typeid": "{EA2C3E90-AFBE-44D4-A90D-FAAF79BAF93D}", + "details": { + "name": "Target Speed" + } + } + ] + }, + { + "base": "SetDampingRatio", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Set Damping Ratio" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Set Damping Ratio is invoked" + }, + "details": { + "name": "Set Damping Ratio" + }, + "params": [ + { + "typeid": "{EA2C3E90-AFBE-44D4-A90D-FAAF79BAF93D}", + "details": { + "name": "Damping Ratio" + } + } + ] + } + ] + } + ] +} \ No newline at end of file diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/EBus/Senders/ForceWorldSpaceRequestBus.names b/Gems/ScriptCanvas/Assets/TranslationAssets/EBus/Senders/ForceWorldSpaceRequestBus.names new file mode 100644 index 0000000000..bb7f2efc9b --- /dev/null +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/EBus/Senders/ForceWorldSpaceRequestBus.names @@ -0,0 +1,102 @@ +{ + "entries": [ + { + "base": "ForceWorldSpaceRequestBus", + "context": "EBusSender", + "variant": "", + "details": { + "name": "Force World Space" + }, + "methods": [ + { + "base": "SetDirection", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Set Direction" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Set Direction is invoked" + }, + "details": { + "name": "Set Direction" + }, + "params": [ + { + "typeid": "{8379EB7D-01FA-4538-B64B-A6543B4BE73D}", + "details": { + "name": "Direction" + } + } + ] + }, + { + "base": "GetDirection", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Get Direction" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Get Direction is invoked" + }, + "details": { + "name": "Get Direction" + }, + "results": [ + { + "typeid": "{8379EB7D-01FA-4538-B64B-A6543B4BE73D}", + "details": { + "name": "Direction" + } + } + ] + }, + { + "base": "SetMagnitude", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Set Magnitude" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Set Magnitude is invoked" + }, + "details": { + "name": "Set Magnitude" + }, + "params": [ + { + "typeid": "{EA2C3E90-AFBE-44D4-A90D-FAAF79BAF93D}", + "details": { + "name": "Magnitude" + } + } + ] + }, + { + "base": "GetMagnitude", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Get Magnitude" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Get Magnitude is invoked" + }, + "details": { + "name": "Get Magnitude" + }, + "results": [ + { + "typeid": "{EA2C3E90-AFBE-44D4-A90D-FAAF79BAF93D}", + "details": { + "name": "Magnitude" + } + } + ] + } + ] + } + ] +} \ No newline at end of file diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/EBus/Senders/FrameCaptureRequestBus.names b/Gems/ScriptCanvas/Assets/TranslationAssets/EBus/Senders/FrameCaptureRequestBus.names new file mode 100644 index 0000000000..e62d9335ab --- /dev/null +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/EBus/Senders/FrameCaptureRequestBus.names @@ -0,0 +1,122 @@ +{ + "entries": [ + { + "base": "FrameCaptureRequestBus", + "context": "EBusSender", + "variant": "", + "details": { + "name": "Frame Capture" + }, + "methods": [ + { + "base": "CaptureScreenshot", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke CaptureScreenshot" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after CaptureScreenshot is invoked" + }, + "details": { + "name": "CaptureScreenshot" + }, + "params": [ + { + "typeid": "{03AAAB3F-5C47-5A66-9EBC-D5FA4DB353C9}", + "details": { + "name": "AZStd::string" + } + } + ], + "results": [ + { + "typeid": "{A0CA880C-AFE4-43CB-926C-59AC48496112}", + "details": { + "name": "bool" + } + } + ] + }, + { + "base": "CaptureScreenshotWithPreview", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke CaptureScreenshotWithPreview" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after CaptureScreenshotWithPreview is invoked" + }, + "details": { + "name": "CaptureScreenshotWithPreview" + }, + "params": [ + { + "typeid": "{03AAAB3F-5C47-5A66-9EBC-D5FA4DB353C9}", + "details": { + "name": "AZStd::string" + } + } + ], + "results": [ + { + "typeid": "{A0CA880C-AFE4-43CB-926C-59AC48496112}", + "details": { + "name": "bool" + } + } + ] + }, + { + "base": "CapturePassAttachment", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke CapturePassAttachment" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after CapturePassAttachment is invoked" + }, + "details": { + "name": "CapturePassAttachment" + }, + "params": [ + { + "typeid": "{99DAD0BC-740E-5E82-826B-8FC7968CC02C}", + "details": { + "name": "AZStd::vector" + } + }, + { + "typeid": "{03AAAB3F-5C47-5A66-9EBC-D5FA4DB353C9}", + "details": { + "name": "AZStd::string" + } + }, + { + "typeid": "{03AAAB3F-5C47-5A66-9EBC-D5FA4DB353C9}", + "details": { + "name": "AZStd::string" + } + }, + { + "typeid": "{72B9409A-7D1A-4831-9CFE-FCB3FADD3426}", + "details": { + "name": "unsigned char" + } + } + ], + "results": [ + { + "typeid": "{A0CA880C-AFE4-43CB-926C-59AC48496112}", + "details": { + "name": "bool" + } + } + ] + } + ] + } + ] +} \ No newline at end of file diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/EBus/Senders/GameEntityContextRequestBus.names b/Gems/ScriptCanvas/Assets/TranslationAssets/EBus/Senders/GameEntityContextRequestBus.names new file mode 100644 index 0000000000..fcb99ddf16 --- /dev/null +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/EBus/Senders/GameEntityContextRequestBus.names @@ -0,0 +1,169 @@ +{ + "entries": [ + { + "base": "GameEntityContextRequestBus", + "context": "EBusSender", + "variant": "", + "details": { + "name": "Game Entity Context", + "category": "Game Entity" + }, + "methods": [ + { + "base": "DeactivateGameEntity", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Deactivate Game Entity" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Deactivate Game Entity is invoked" + }, + "details": { + "name": "Deactivate Game Entity" + }, + "params": [ + { + "typeid": "{6383F1D3-BB27-4E6B-A49A-6409B2059EAA}", + "details": { + "name": "Entity Id", + "tooltip": "Entity Unique Id" + } + } + ] + }, + { + "base": "GetEntityName", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Get Entity Name" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Get Entity Name is invoked" + }, + "details": { + "name": "Get Entity Name" + }, + "params": [ + { + "typeid": "{6383F1D3-BB27-4E6B-A49A-6409B2059EAA}", + "details": { + "name": "Entity Id", + "tooltip": "Entity Unique Id" + } + } + ], + "results": [ + { + "typeid": "{03AAAB3F-5C47-5A66-9EBC-D5FA4DB353C9}", + "details": { + "name": "Name" + } + } + ] + }, + { + "base": "ActivateGameEntity", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Activate Game Entity" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Activate Game Entity is invoked" + }, + "details": { + "name": "Activate Game Entity" + }, + "params": [ + { + "typeid": "{6383F1D3-BB27-4E6B-A49A-6409B2059EAA}", + "details": { + "name": "Entity Id", + "tooltip": "Entity Unique Id" + } + } + ] + }, + { + "base": "DestroyGameEntityAndDescendants", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Destroy Game Entity And Descendants" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Destroy Game Entity And Descendants is invoked" + }, + "details": { + "name": "Destroy Game Entity And Descendants" + }, + "params": [ + { + "typeid": "{6383F1D3-BB27-4E6B-A49A-6409B2059EAA}", + "details": { + "name": "Entity Id", + "tooltip": "Entity Unique Id" + } + } + ] + }, + { + "base": "DestroyGameEntity", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Destroy Game Entity" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Destroy Game Entity is invoked" + }, + "details": { + "name": "Destroy Game Entity" + }, + "params": [ + { + "typeid": "{6383F1D3-BB27-4E6B-A49A-6409B2059EAA}", + "details": { + "name": "Entity Id", + "tooltip": "Entity Unique Id" + } + } + ] + }, + { + "base": "CreateGameEntity", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Create Game Entity" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Create Game Entity is invoked" + }, + "details": { + "name": "Create Game Entity" + }, + "params": [ + { + "typeid": "{3AB0037F-AF8D-48CE-BCA0-A170D18B2C03}", + "details": { + "name": "Name" + } + } + ], + "results": [ + { + "typeid": "{41CC88A4-FE07-48E6-943D-998DE68AFF5C}", + "details": { + "name": "Entity", + "tooltip": "Entity" + } + } + ] + } + ] + } + ] +} \ No newline at end of file diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/EBus/Senders/GradientRequestBus.names b/Gems/ScriptCanvas/Assets/TranslationAssets/EBus/Senders/GradientRequestBus.names new file mode 100644 index 0000000000..35aa9d5795 --- /dev/null +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/EBus/Senders/GradientRequestBus.names @@ -0,0 +1,45 @@ +{ + "entries": [ + { + "base": "GradientRequestBus", + "context": "EBusSender", + "variant": "", + "details": { + "name": "Gradient", + "category": "Rendering" + }, + "methods": [ + { + "base": "GetValue", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Get Value" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Get Value is invoked" + }, + "details": { + "name": "Get Value" + }, + "params": [ + { + "typeid": "{DC4B9269-CB3C-4071-989D-C885FB9946A5}", + "details": { + "name": "" + } + } + ], + "results": [ + { + "typeid": "{EA2C3E90-AFBE-44D4-A90D-FAAF79BAF93D}", + "details": { + "name": "float" + } + } + ] + } + ] + } + ] +} \ No newline at end of file diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/EBus/Senders/GradientSurfaceDataRequestBus.names b/Gems/ScriptCanvas/Assets/TranslationAssets/EBus/Senders/GradientSurfaceDataRequestBus.names new file mode 100644 index 0000000000..da7eee15d3 --- /dev/null +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/EBus/Senders/GradientSurfaceDataRequestBus.names @@ -0,0 +1,244 @@ +{ + "entries": [ + { + "base": "GradientSurfaceDataRequestBus", + "context": "EBusSender", + "variant": "", + "details": { + "name": "Gradient Surface Data" + }, + "methods": [ + { + "base": "GetThresholdMax", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke GetThresholdMax" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after GetThresholdMax is invoked" + }, + "details": { + "name": "GetThresholdMax" + }, + "results": [ + { + "typeid": "{EA2C3E90-AFBE-44D4-A90D-FAAF79BAF93D}", + "details": { + "name": "float" + } + } + ] + }, + { + "base": "SetThresholdMax", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke SetThresholdMax" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after SetThresholdMax is invoked" + }, + "details": { + "name": "SetThresholdMax" + }, + "params": [ + { + "typeid": "{EA2C3E90-AFBE-44D4-A90D-FAAF79BAF93D}", + "details": { + "name": "float" + } + } + ] + }, + { + "base": "GetNumTags", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke GetNumTags" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after GetNumTags is invoked" + }, + "details": { + "name": "GetNumTags" + }, + "results": [ + { + "typeid": "{D6597933-47CD-4FC8-B911-63F3E2B0993A}", + "details": { + "name": "AZ::u64" + } + } + ] + }, + { + "base": "RemoveTag", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke RemoveTag" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after RemoveTag is invoked" + }, + "details": { + "name": "RemoveTag" + }, + "params": [ + { + "typeid": "{72039442-EB38-4D42-A1AD-CB68F7E0EEF6}", + "details": { + "name": "int" + } + } + ] + }, + { + "base": "GetThresholdMin", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke GetThresholdMin" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after GetThresholdMin is invoked" + }, + "details": { + "name": "GetThresholdMin" + }, + "results": [ + { + "typeid": "{EA2C3E90-AFBE-44D4-A90D-FAAF79BAF93D}", + "details": { + "name": "float" + } + } + ] + }, + { + "base": "SetShapeConstraintEntityId", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke SetShapeConstraintEntityId" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after SetShapeConstraintEntityId is invoked" + }, + "details": { + "name": "SetShapeConstraintEntityId" + }, + "params": [ + { + "typeid": "{6383F1D3-BB27-4E6B-A49A-6409B2059EAA}", + "details": { + "name": "EntityId", + "tooltip": "Entity Unique Id" + } + } + ] + }, + { + "base": "SetThresholdMin", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke SetThresholdMin" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after SetThresholdMin is invoked" + }, + "details": { + "name": "SetThresholdMin" + }, + "params": [ + { + "typeid": "{EA2C3E90-AFBE-44D4-A90D-FAAF79BAF93D}", + "details": { + "name": "float" + } + } + ] + }, + { + "base": "GetTag", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke GetTag" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after GetTag is invoked" + }, + "details": { + "name": "GetTag" + }, + "params": [ + { + "typeid": "{72039442-EB38-4D42-A1AD-CB68F7E0EEF6}", + "details": { + "name": "int" + } + } + ], + "results": [ + { + "typeid": "{9F4E062E-06A0-46D4-85DF-E0DA96467D3A}", + "details": { + "name": "Crc32" + } + } + ] + }, + { + "base": "AddTag", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke AddTag" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after AddTag is invoked" + }, + "details": { + "name": "AddTag" + }, + "params": [ + { + "typeid": "{03AAAB3F-5C47-5A66-9EBC-D5FA4DB353C9}", + "details": { + "name": "AZStd::string" + } + } + ] + }, + { + "base": "GetShapeConstraintEntityId", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke GetShapeConstraintEntityId" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after GetShapeConstraintEntityId is invoked" + }, + "details": { + "name": "GetShapeConstraintEntityId" + }, + "results": [ + { + "typeid": "{6383F1D3-BB27-4E6B-A49A-6409B2059EAA}", + "details": { + "name": "EntityId", + "tooltip": "Entity Unique Id" + } + } + ] + } + ] + } + ] +} \ No newline at end of file diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/EBus/Senders/GradientTransformModifierRequestBus.names b/Gems/ScriptCanvas/Assets/TranslationAssets/EBus/Senders/GradientTransformModifierRequestBus.names new file mode 100644 index 0000000000..39d89b89cf --- /dev/null +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/EBus/Senders/GradientTransformModifierRequestBus.names @@ -0,0 +1,632 @@ +{ + "entries": [ + { + "base": "GradientTransformModifierRequestBus", + "context": "EBusSender", + "variant": "", + "details": { + "name": "Gradient TransformModifier" + }, + "methods": [ + { + "base": "SetOverrideTranslate", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke SetOverrideTranslate" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after SetOverrideTranslate is invoked" + }, + "details": { + "name": "SetOverrideTranslate" + }, + "params": [ + { + "typeid": "{A0CA880C-AFE4-43CB-926C-59AC48496112}", + "details": { + "name": "bool" + } + } + ] + }, + { + "base": "GetRotate", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke GetRotate" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after GetRotate is invoked" + }, + "details": { + "name": "GetRotate" + }, + "results": [ + { + "typeid": "{8379EB7D-01FA-4538-B64B-A6543B4BE73D}", + "details": { + "name": "Vector3" + } + } + ] + }, + { + "base": "GetBounds", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke GetBounds" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after GetBounds is invoked" + }, + "details": { + "name": "GetBounds" + }, + "results": [ + { + "typeid": "{8379EB7D-01FA-4538-B64B-A6543B4BE73D}", + "details": { + "name": "Vector3" + } + } + ] + }, + { + "base": "SetTransformType", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke SetTransformType" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after SetTransformType is invoked" + }, + "details": { + "name": "SetTransformType" + }, + "params": [ + { + "typeid": "{72B9409A-7D1A-4831-9CFE-FCB3FADD3426}", + "details": { + "name": "unsigned char" + } + } + ] + }, + { + "base": "GetOverrideTranslate", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke GetOverrideTranslate" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after GetOverrideTranslate is invoked" + }, + "details": { + "name": "GetOverrideTranslate" + }, + "results": [ + { + "typeid": "{A0CA880C-AFE4-43CB-926C-59AC48496112}", + "details": { + "name": "bool" + } + } + ] + }, + { + "base": "GetOverrideBounds", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke GetOverrideBounds" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after GetOverrideBounds is invoked" + }, + "details": { + "name": "GetOverrideBounds" + }, + "results": [ + { + "typeid": "{A0CA880C-AFE4-43CB-926C-59AC48496112}", + "details": { + "name": "bool" + } + } + ] + }, + { + "base": "SetRotate", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke SetRotate" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after SetRotate is invoked" + }, + "details": { + "name": "SetRotate" + }, + "params": [ + { + "typeid": "{8379EB7D-01FA-4538-B64B-A6543B4BE73D}", + "details": { + "name": "Vector3" + } + } + ] + }, + { + "base": "SetOverrideScale", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke SetOverrideScale" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after SetOverrideScale is invoked" + }, + "details": { + "name": "SetOverrideScale" + }, + "params": [ + { + "typeid": "{A0CA880C-AFE4-43CB-926C-59AC48496112}", + "details": { + "name": "bool" + } + } + ] + }, + { + "base": "GetScale", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke GetScale" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after GetScale is invoked" + }, + "details": { + "name": "GetScale" + }, + "results": [ + { + "typeid": "{8379EB7D-01FA-4538-B64B-A6543B4BE73D}", + "details": { + "name": "Vector3" + } + } + ] + }, + { + "base": "SetScale", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke SetScale" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after SetScale is invoked" + }, + "details": { + "name": "SetScale" + }, + "params": [ + { + "typeid": "{8379EB7D-01FA-4538-B64B-A6543B4BE73D}", + "details": { + "name": "Vector3" + } + } + ] + }, + { + "base": "GetIs3D", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke GetIs3D" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after GetIs3D is invoked" + }, + "details": { + "name": "GetIs3D" + }, + "results": [ + { + "typeid": "{A0CA880C-AFE4-43CB-926C-59AC48496112}", + "details": { + "name": "bool" + } + } + ] + }, + { + "base": "SetShapeReference", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke SetShapeReference" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after SetShapeReference is invoked" + }, + "details": { + "name": "SetShapeReference" + }, + "params": [ + { + "typeid": "{6383F1D3-BB27-4E6B-A49A-6409B2059EAA}", + "details": { + "name": "EntityId", + "tooltip": "Entity Unique Id" + } + } + ] + }, + { + "base": "SetBounds", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke SetBounds" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after SetBounds is invoked" + }, + "details": { + "name": "SetBounds" + }, + "params": [ + { + "typeid": "{8379EB7D-01FA-4538-B64B-A6543B4BE73D}", + "details": { + "name": "Vector3" + } + } + ] + }, + { + "base": "SetFrequencyZoom", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke SetFrequencyZoom" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after SetFrequencyZoom is invoked" + }, + "details": { + "name": "SetFrequencyZoom" + }, + "params": [ + { + "typeid": "{EA2C3E90-AFBE-44D4-A90D-FAAF79BAF93D}", + "details": { + "name": "float" + } + } + ] + }, + { + "base": "SetWrappingType", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke SetWrappingType" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after SetWrappingType is invoked" + }, + "details": { + "name": "SetWrappingType" + }, + "params": [ + { + "typeid": "{72B9409A-7D1A-4831-9CFE-FCB3FADD3426}", + "details": { + "name": "unsigned char" + } + } + ] + }, + { + "base": "GetShapeReference", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke GetShapeReference" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after GetShapeReference is invoked" + }, + "details": { + "name": "GetShapeReference" + }, + "results": [ + { + "typeid": "{6383F1D3-BB27-4E6B-A49A-6409B2059EAA}", + "details": { + "name": "EntityId", + "tooltip": "Entity Unique Id" + } + } + ] + }, + { + "base": "SetOverrideBounds", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke SetOverrideBounds" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after SetOverrideBounds is invoked" + }, + "details": { + "name": "SetOverrideBounds" + }, + "params": [ + { + "typeid": "{A0CA880C-AFE4-43CB-926C-59AC48496112}", + "details": { + "name": "bool" + } + } + ] + }, + { + "base": "GetTransformType", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke GetTransformType" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after GetTransformType is invoked" + }, + "details": { + "name": "GetTransformType" + }, + "results": [ + { + "typeid": "{72B9409A-7D1A-4831-9CFE-FCB3FADD3426}", + "details": { + "name": "unsigned char" + } + } + ] + }, + { + "base": "GetOverrideScale", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke GetOverrideScale" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after GetOverrideScale is invoked" + }, + "details": { + "name": "GetOverrideScale" + }, + "results": [ + { + "typeid": "{A0CA880C-AFE4-43CB-926C-59AC48496112}", + "details": { + "name": "bool" + } + } + ] + }, + { + "base": "SetIs3D", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke SetIs3D" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after SetIs3D is invoked" + }, + "details": { + "name": "SetIs3D" + }, + "params": [ + { + "typeid": "{A0CA880C-AFE4-43CB-926C-59AC48496112}", + "details": { + "name": "bool" + } + } + ] + }, + { + "base": "SetAllowReference", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke SetAllowReference" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after SetAllowReference is invoked" + }, + "details": { + "name": "SetAllowReference" + }, + "params": [ + { + "typeid": "{A0CA880C-AFE4-43CB-926C-59AC48496112}", + "details": { + "name": "bool" + } + } + ] + }, + { + "base": "SetTranslate", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke SetTranslate" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after SetTranslate is invoked" + }, + "details": { + "name": "SetTranslate" + }, + "params": [ + { + "typeid": "{8379EB7D-01FA-4538-B64B-A6543B4BE73D}", + "details": { + "name": "Vector3" + } + } + ] + }, + { + "base": "SetOverrideRotate", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke SetOverrideRotate" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after SetOverrideRotate is invoked" + }, + "details": { + "name": "SetOverrideRotate" + }, + "params": [ + { + "typeid": "{A0CA880C-AFE4-43CB-926C-59AC48496112}", + "details": { + "name": "bool" + } + } + ] + }, + { + "base": "GetAllowReference", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke GetAllowReference" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after GetAllowReference is invoked" + }, + "details": { + "name": "GetAllowReference" + }, + "results": [ + { + "typeid": "{A0CA880C-AFE4-43CB-926C-59AC48496112}", + "details": { + "name": "bool" + } + } + ] + }, + { + "base": "GetTranslate", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke GetTranslate" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after GetTranslate is invoked" + }, + "details": { + "name": "GetTranslate" + }, + "results": [ + { + "typeid": "{8379EB7D-01FA-4538-B64B-A6543B4BE73D}", + "details": { + "name": "Vector3" + } + } + ] + }, + { + "base": "GetOverrideRotate", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke GetOverrideRotate" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after GetOverrideRotate is invoked" + }, + "details": { + "name": "GetOverrideRotate" + }, + "results": [ + { + "typeid": "{A0CA880C-AFE4-43CB-926C-59AC48496112}", + "details": { + "name": "bool" + } + } + ] + }, + { + "base": "GetFrequencyZoom", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke GetFrequencyZoom" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after GetFrequencyZoom is invoked" + }, + "details": { + "name": "GetFrequencyZoom" + }, + "results": [ + { + "typeid": "{EA2C3E90-AFBE-44D4-A90D-FAAF79BAF93D}", + "details": { + "name": "float" + } + } + ] + }, + { + "base": "GetWrappingType", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke GetWrappingType" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after GetWrappingType is invoked" + }, + "details": { + "name": "GetWrappingType" + }, + "results": [ + { + "typeid": "{72B9409A-7D1A-4831-9CFE-FCB3FADD3426}", + "details": { + "name": "unsigned char" + } + } + ] + } + ] + } + ] +} \ No newline at end of file diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/EBus/Senders/GraphControllerRequestBus.names b/Gems/ScriptCanvas/Assets/TranslationAssets/EBus/Senders/GraphControllerRequestBus.names new file mode 100644 index 0000000000..88c29db6dc --- /dev/null +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/EBus/Senders/GraphControllerRequestBus.names @@ -0,0 +1,259 @@ +{ + "entries": [ + { + "base": "GraphControllerRequestBus", + "context": "EBusSender", + "variant": "", + "details": { + "name": "Graph Controller" + }, + "methods": [ + { + "base": "RemoveConnection", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke RemoveConnection" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after RemoveConnection is invoked" + }, + "details": { + "name": "RemoveConnection" + }, + "params": [ + { + "typeid": "{B51CFD94-318D-5E30-BE18-6ACC6CFCC2EC}", + "details": { + "name": "AZStd::shared_ptr" + } + } + ], + "results": [ + { + "typeid": "{A0CA880C-AFE4-43CB-926C-59AC48496112}", + "details": { + "name": "bool" + } + } + ] + }, + { + "base": "AddConnection", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke AddConnection" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after AddConnection is invoked" + }, + "details": { + "name": "AddConnection" + }, + "params": [ + { + "typeid": "{444B2C18-8D7E-5B43-9524-0C9F6C351542}", + "details": { + "name": "AZStd::shared_ptr" + } + }, + { + "typeid": "{444B2C18-8D7E-5B43-9524-0C9F6C351542}", + "details": { + "name": "AZStd::shared_ptr" + } + } + ], + "results": [ + { + "typeid": "{B51CFD94-318D-5E30-BE18-6ACC6CFCC2EC}", + "details": { + "name": "AZStd::shared_ptr" + } + } + ] + }, + { + "base": "WrapNode", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke WrapNode" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after WrapNode is invoked" + }, + "details": { + "name": "WrapNode" + }, + "params": [ + { + "typeid": "{9A6CD726-97FC-54C4-A34B-5996F6948697}", + "details": { + "name": "AZStd::shared_ptr" + } + }, + { + "typeid": "{9A6CD726-97FC-54C4-A34B-5996F6948697}", + "details": { + "name": "AZStd::shared_ptr" + } + } + ] + }, + { + "base": "AddConnectionBySlotId", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke AddConnectionBySlotId" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after AddConnectionBySlotId is invoked" + }, + "details": { + "name": "AddConnectionBySlotId" + }, + "params": [ + { + "typeid": "{9A6CD726-97FC-54C4-A34B-5996F6948697}", + "details": { + "name": "AZStd::shared_ptr" + } + }, + { + "typeid": "{D24130B9-89C4-4EAA-9A5D-3469B05C5065}", + "details": { + "name": "SlotIdData" + } + }, + { + "typeid": "{9A6CD726-97FC-54C4-A34B-5996F6948697}", + "details": { + "name": "AZStd::shared_ptr" + } + }, + { + "typeid": "{D24130B9-89C4-4EAA-9A5D-3469B05C5065}", + "details": { + "name": "SlotIdData" + } + } + ], + "results": [ + { + "typeid": "{B51CFD94-318D-5E30-BE18-6ACC6CFCC2EC}", + "details": { + "name": "AZStd::shared_ptr" + } + } + ] + }, + { + "base": "AddNode", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke AddNode" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after AddNode is invoked" + }, + "details": { + "name": "AddNode" + }, + "params": [ + { + "typeid": "{9A6CD726-97FC-54C4-A34B-5996F6948697}", + "details": { + "name": "AZStd::shared_ptr" + } + }, + { + "typeid": "{3D80F623-C85C-4741-90D0-E4E66164E6BF}", + "details": { + "name": "Vector2" + } + } + ], + "results": [ + { + "typeid": "{6383F1D3-BB27-4E6B-A49A-6409B2059EAA}", + "details": { + "name": "EntityId", + "tooltip": "Entity Unique Id" + } + } + ] + }, + { + "base": "RemoveNode", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke RemoveNode" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after RemoveNode is invoked" + }, + "details": { + "name": "RemoveNode" + }, + "params": [ + { + "typeid": "{9A6CD726-97FC-54C4-A34B-5996F6948697}", + "details": { + "name": "AZStd::shared_ptr" + } + } + ], + "results": [ + { + "typeid": "{A0CA880C-AFE4-43CB-926C-59AC48496112}", + "details": { + "name": "bool" + } + } + ] + }, + { + "base": "ExtendSlot", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke ExtendSlot" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after ExtendSlot is invoked" + }, + "details": { + "name": "ExtendSlot" + }, + "params": [ + { + "typeid": "{9A6CD726-97FC-54C4-A34B-5996F6948697}", + "details": { + "name": "AZStd::shared_ptr" + } + }, + { + "typeid": "{03AAAB3F-5C47-5A66-9EBC-D5FA4DB353C9}", + "details": { + "name": "AZStd::string" + } + } + ], + "results": [ + { + "typeid": "{D24130B9-89C4-4EAA-9A5D-3469B05C5065}", + "details": { + "name": "SlotIdData" + } + } + ] + } + ] + } + ] +} \ No newline at end of file diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/EBus/Senders/GraphManagerRequestBus.names b/Gems/ScriptCanvas/Assets/TranslationAssets/EBus/Senders/GraphManagerRequestBus.names new file mode 100644 index 0000000000..36ece545e5 --- /dev/null +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/EBus/Senders/GraphManagerRequestBus.names @@ -0,0 +1,45 @@ +{ + "entries": [ + { + "base": "GraphManagerRequestBus", + "context": "EBusSender", + "variant": "", + "details": { + "name": "Graph Manager" + }, + "methods": [ + { + "base": "GetGraph", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke GetGraph" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after GetGraph is invoked" + }, + "details": { + "name": "GetGraph" + }, + "params": [ + { + "typeid": "{6383F1D3-BB27-4E6B-A49A-6409B2059EAA}", + "details": { + "name": "EntityId", + "tooltip": "Entity Unique Id" + } + } + ], + "results": [ + { + "typeid": "{E51F56F8-D4E9-5C9F-AE6F-3F9C5D28F4C6}", + "details": { + "name": "" + } + } + ] + } + ] + } + ] +} \ No newline at end of file diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/EBus/Senders/GridComponentRequestBus.names b/Gems/ScriptCanvas/Assets/TranslationAssets/EBus/Senders/GridComponentRequestBus.names new file mode 100644 index 0000000000..7e810b515b --- /dev/null +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/EBus/Senders/GridComponentRequestBus.names @@ -0,0 +1,279 @@ +{ + "entries": [ + { + "base": "GridComponentRequestBus", + "context": "EBusSender", + "variant": "", + "details": { + "name": "Grid Component", + "category": "Rendering" + }, + "methods": [ + { + "base": "SetSecondaryColor", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Set Secondary Color" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Set Secondary Color is invoked" + }, + "details": { + "name": "Set Secondary Color" + }, + "params": [ + { + "typeid": "{7894072A-9050-4F0F-901B-34B1A0D29417}", + "details": { + "name": "Color" + } + } + ] + }, + { + "base": "GetPrimarySpacing", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Get Primary Spacing" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Get Primary Spacing is invoked" + }, + "details": { + "name": "Get Primary Spacing" + }, + "results": [ + { + "typeid": "{EA2C3E90-AFBE-44D4-A90D-FAAF79BAF93D}", + "details": { + "name": "float" + } + } + ] + }, + { + "base": "GetSecondaryColor", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Get Secondary Color" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Get Secondary Color is invoked" + }, + "details": { + "name": "Get Secondary Color" + }, + "results": [ + { + "typeid": "{7894072A-9050-4F0F-901B-34B1A0D29417}", + "details": { + "name": "Color" + } + } + ] + }, + { + "base": "SetAxisColor", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Set Axis Color" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Set Axis Color is invoked" + }, + "details": { + "name": "Set Axis Color" + }, + "params": [ + { + "typeid": "{7894072A-9050-4F0F-901B-34B1A0D29417}", + "details": { + "name": "Color" + } + } + ] + }, + { + "base": "SetPrimaryColor", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Set Primary Color" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Set Primary Color is invoked" + }, + "details": { + "name": "Set Primary Color" + }, + "params": [ + { + "typeid": "{7894072A-9050-4F0F-901B-34B1A0D29417}", + "details": { + "name": "Color" + } + } + ] + }, + { + "base": "GetAxisColor", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Get Axis Color" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Get Axis Color is invoked" + }, + "details": { + "name": "Get Axis Color" + }, + "results": [ + { + "typeid": "{7894072A-9050-4F0F-901B-34B1A0D29417}", + "details": { + "name": "Color" + } + } + ] + }, + { + "base": "SetPrimarySpacing", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Set Primary Spacing" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Set Primary Spacing is invoked" + }, + "details": { + "name": "Set Primary Spacing" + }, + "params": [ + { + "typeid": "{EA2C3E90-AFBE-44D4-A90D-FAAF79BAF93D}", + "details": { + "name": "float" + } + } + ] + }, + { + "base": "GetSecondarySpacing", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Get Secondary Spacing" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Get Secondary Spacing is invoked" + }, + "details": { + "name": "Get Secondary Spacing" + }, + "results": [ + { + "typeid": "{EA2C3E90-AFBE-44D4-A90D-FAAF79BAF93D}", + "details": { + "name": "float" + } + } + ] + }, + { + "base": "SetSecondarySpacing", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Set Secondary Spacing" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Set Secondary Spacing is invoked" + }, + "details": { + "name": "Set Secondary Spacing" + }, + "params": [ + { + "typeid": "{EA2C3E90-AFBE-44D4-A90D-FAAF79BAF93D}", + "details": { + "name": "float" + } + } + ] + }, + { + "base": "SetSize", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Set Size" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Set Size is invoked" + }, + "details": { + "name": "Set Size" + }, + "params": [ + { + "typeid": "{EA2C3E90-AFBE-44D4-A90D-FAAF79BAF93D}", + "details": { + "name": "float" + } + } + ] + }, + { + "base": "GetSize", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Get Size" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Get Size is invoked" + }, + "details": { + "name": "Get Size" + }, + "results": [ + { + "typeid": "{EA2C3E90-AFBE-44D4-A90D-FAAF79BAF93D}", + "details": { + "name": "float" + } + } + ] + }, + { + "base": "GetPrimaryColor", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Get Primary Color" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Get Primary Color is invoked" + }, + "details": { + "name": "Get Primary Color" + }, + "results": [ + { + "typeid": "{7894072A-9050-4F0F-901B-34B1A0D29417}", + "details": { + "name": "Color" + } + } + ] + } + ] + } + ] +} \ No newline at end of file diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/EBus/Senders/HDRColorGradingRequestBus.names b/Gems/ScriptCanvas/Assets/TranslationAssets/EBus/Senders/HDRColorGradingRequestBus.names new file mode 100644 index 0000000000..febfae7fc5 --- /dev/null +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/EBus/Senders/HDRColorGradingRequestBus.names @@ -0,0 +1,1555 @@ +{ + "entries": [ + { + "base": "HDRColorGradingRequestBus", + "context": "EBusSender", + "variant": "", + "details": { + "name": "HDR Color Grading", + "category": "Rendering" + }, + "methods": [ + { + "base": "SetSmhHighlightsColor", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Set Smh Highlights Color" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Set Smh Highlights Color is invoked" + }, + "details": { + "name": "Set Smh Highlights Color" + }, + "params": [ + { + "typeid": "{8379EB7D-01FA-4538-B64B-A6543B4BE73D}", + "details": { + "name": "Vector 3" + } + } + ] + }, + { + "base": "SetLutResolution", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Set Lut Resolution" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Set Lut Resolution is invoked" + }, + "details": { + "name": "Set Lut Resolution" + }, + "params": [ + { + "typeid": "{72039442-EB38-4D42-A1AD-CB68F7E0EEF6}", + "details": { + "name": "int" + } + } + ] + }, + { + "base": "GetSmhMidtonesColor", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Get Smh Midtones Color" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Get Smh Midtones Color is invoked" + }, + "details": { + "name": "Get Smh Midtones Color" + }, + "results": [ + { + "typeid": "{8379EB7D-01FA-4538-B64B-A6543B4BE73D}", + "details": { + "name": "Vector 3" + } + } + ] + }, + { + "base": "GetSmhHighlightsEnd", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Get Smh Highlights End" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Get Smh Highlights End is invoked" + }, + "details": { + "name": "Get Smh Highlights End" + }, + "results": [ + { + "typeid": "{EA2C3E90-AFBE-44D4-A90D-FAAF79BAF93D}", + "details": { + "name": "float" + } + } + ] + }, + { + "base": "GetCustomMinExposure", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Get Custom Min Exposure" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Get Custom Min Exposure is invoked" + }, + "details": { + "name": "Get Custom Min Exposure" + }, + "results": [ + { + "typeid": "{EA2C3E90-AFBE-44D4-A90D-FAAF79BAF93D}", + "details": { + "name": "float" + } + } + ] + }, + { + "base": "SetSmhHighlightsEnd", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Set Smh Highlights End" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Set Smh Highlights End is invoked" + }, + "details": { + "name": "Set Smh Highlights End" + }, + "params": [ + { + "typeid": "{EA2C3E90-AFBE-44D4-A90D-FAAF79BAF93D}", + "details": { + "name": "float" + } + } + ] + }, + { + "base": "GetChannelMixingGreen", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Get Channel Mixing Green" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Get Channel Mixing Green is invoked" + }, + "details": { + "name": "Get Channel Mixing Green" + }, + "results": [ + { + "typeid": "{8379EB7D-01FA-4538-B64B-A6543B4BE73D}", + "details": { + "name": "Vector 3" + } + } + ] + }, + { + "base": "SetSmhShadowsEnd", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Set Smh Shadows End" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Set Smh Shadows End is invoked" + }, + "details": { + "name": "Set Smh Shadows End" + }, + "params": [ + { + "typeid": "{EA2C3E90-AFBE-44D4-A90D-FAAF79BAF93D}", + "details": { + "name": "float" + } + } + ] + }, + { + "base": "SetSmhWeight", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Set Smh Weight" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Set Smh Weight is invoked" + }, + "details": { + "name": "Set Smh Weight" + }, + "params": [ + { + "typeid": "{EA2C3E90-AFBE-44D4-A90D-FAAF79BAF93D}", + "details": { + "name": "float" + } + } + ] + }, + { + "base": "SetShaperPresetType", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Set Shaper Preset Type" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Set Shaper Preset Type is invoked" + }, + "details": { + "name": "Set Shaper Preset Type" + }, + "params": [ + { + "typeid": "{72039442-EB38-4D42-A1AD-CB68F7E0EEF6}", + "details": { + "name": "int" + } + } + ] + }, + { + "base": "GetShaperPresetType", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Get Shaper Preset Type" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Get Shaper Preset Type is invoked" + }, + "details": { + "name": "Get Shaper Preset Type" + }, + "results": [ + { + "typeid": "{72039442-EB38-4D42-A1AD-CB68F7E0EEF6}", + "details": { + "name": "int" + } + } + ] + }, + { + "base": "SetEnabled", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Set Enabled" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Set Enabled is invoked" + }, + "details": { + "name": "Set Enabled" + }, + "params": [ + { + "typeid": "{A0CA880C-AFE4-43CB-926C-59AC48496112}", + "details": { + "name": "bool" + } + } + ] + }, + { + "base": "GetSmhShadowsColor", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Get Smh Shadows Color" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Get Smh Shadows Color is invoked" + }, + "details": { + "name": "Get Smh Shadows Color" + }, + "results": [ + { + "typeid": "{8379EB7D-01FA-4538-B64B-A6543B4BE73D}", + "details": { + "name": "Vector 3" + } + } + ] + }, + { + "base": "GetColorGradingPreSaturation", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Get Color Grading Pre Saturation" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Get Color Grading Pre Saturation is invoked" + }, + "details": { + "name": "Get Color Grading Pre Saturation" + }, + "results": [ + { + "typeid": "{EA2C3E90-AFBE-44D4-A90D-FAAF79BAF93D}", + "details": { + "name": "float" + } + } + ] + }, + { + "base": "GetSplitToneHighlightsColor", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Get Split Tone Highlights Color" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Get Split Tone Highlights Color is invoked" + }, + "details": { + "name": "Get Split Tone Highlights Color" + }, + "results": [ + { + "typeid": "{8379EB7D-01FA-4538-B64B-A6543B4BE73D}", + "details": { + "name": "Vector 3" + } + } + ] + }, + { + "base": "GetColorGradingHueShift", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Get Color Grading Hue Shift" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Get Color Grading Hue Shift is invoked" + }, + "details": { + "name": "Get Color Grading Hue Shift" + }, + "results": [ + { + "typeid": "{EA2C3E90-AFBE-44D4-A90D-FAAF79BAF93D}", + "details": { + "name": "float" + } + } + ] + }, + { + "base": "SetColorGradingExposure", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Set Color Grading Exposure" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Set Color Grading Exposure is invoked" + }, + "details": { + "name": "Set Color Grading Exposure" + }, + "params": [ + { + "typeid": "{EA2C3E90-AFBE-44D4-A90D-FAAF79BAF93D}", + "details": { + "name": "float" + } + } + ] + }, + { + "base": "GetColorFilterSwatch", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Get Color Filter Swatch" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Get Color Filter Swatch is invoked" + }, + "details": { + "name": "Get Color Filter Swatch" + }, + "results": [ + { + "typeid": "{8379EB7D-01FA-4538-B64B-A6543B4BE73D}", + "details": { + "name": "Vector 3" + } + } + ] + }, + { + "base": "GetWhiteBalanceTint", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Get White Balance Tint" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Get White Balance Tint is invoked" + }, + "details": { + "name": "Get White Balance Tint" + }, + "results": [ + { + "typeid": "{EA2C3E90-AFBE-44D4-A90D-FAAF79BAF93D}", + "details": { + "name": "float" + } + } + ] + }, + { + "base": "GetColorGradingExposure", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Get Color Grading Exposure" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Get Color Grading Exposure is invoked" + }, + "details": { + "name": "Get Color Grading Exposure" + }, + "results": [ + { + "typeid": "{EA2C3E90-AFBE-44D4-A90D-FAAF79BAF93D}", + "details": { + "name": "float" + } + } + ] + }, + { + "base": "GetSmhWeight", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Get Smh Weight" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Get Smh Weight is invoked" + }, + "details": { + "name": "Get Smh Weight" + }, + "results": [ + { + "typeid": "{EA2C3E90-AFBE-44D4-A90D-FAAF79BAF93D}", + "details": { + "name": "float" + } + } + ] + }, + { + "base": "SetSmhMidtonesColor", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Set Smh Midtones Color" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Set Smh Midtones Color is invoked" + }, + "details": { + "name": "Set Smh Midtones Color" + }, + "params": [ + { + "typeid": "{8379EB7D-01FA-4538-B64B-A6543B4BE73D}", + "details": { + "name": "Vector 3" + } + } + ] + }, + { + "base": "SetChannelMixingBlue", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Set Channel Mixing Blue" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Set Channel Mixing Blue is invoked" + }, + "details": { + "name": "Set Channel Mixing Blue" + }, + "params": [ + { + "typeid": "{8379EB7D-01FA-4538-B64B-A6543B4BE73D}", + "details": { + "name": "Vector 3" + } + } + ] + }, + { + "base": "GetGenerateLut", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Get Generate Lut" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Get Generate Lut is invoked" + }, + "details": { + "name": "Get Generate Lut" + }, + "results": [ + { + "typeid": "{A0CA880C-AFE4-43CB-926C-59AC48496112}", + "details": { + "name": "bool" + } + } + ] + }, + { + "base": "SetSplitToneBalance", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Set Split Tone Balance" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Set Split Tone Balance is invoked" + }, + "details": { + "name": "Set Split Tone Balance" + }, + "params": [ + { + "typeid": "{EA2C3E90-AFBE-44D4-A90D-FAAF79BAF93D}", + "details": { + "name": "float" + } + } + ] + }, + { + "base": "GetLutResolution", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Get Lut Resolution" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Get Lut Resolution is invoked" + }, + "details": { + "name": "Get Lut Resolution" + }, + "results": [ + { + "typeid": "{72039442-EB38-4D42-A1AD-CB68F7E0EEF6}", + "details": { + "name": "int" + } + } + ] + }, + { + "base": "GetWhiteBalanceLuminancePreservation", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Get White Balance Luminance Preservation" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Get White Balance Luminance Preservation is invoked" + }, + "details": { + "name": "Get White Balance Luminance Preservation" + }, + "results": [ + { + "typeid": "{EA2C3E90-AFBE-44D4-A90D-FAAF79BAF93D}", + "details": { + "name": "float" + } + } + ] + }, + { + "base": "SetCustomMinExposure", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Set Custom Min Exposure" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Set Custom Min Exposure is invoked" + }, + "details": { + "name": "Set Custom Min Exposure" + }, + "params": [ + { + "typeid": "{EA2C3E90-AFBE-44D4-A90D-FAAF79BAF93D}", + "details": { + "name": "float" + } + } + ] + }, + { + "base": "GetFinalAdjustmentWeight", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Get Final Adjustment Weight" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Get Final Adjustment Weight is invoked" + }, + "details": { + "name": "Get Final Adjustment Weight" + }, + "results": [ + { + "typeid": "{EA2C3E90-AFBE-44D4-A90D-FAAF79BAF93D}", + "details": { + "name": "float" + } + } + ] + }, + { + "base": "SetColorGradingContrast", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Set Color Grading Contrast" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Set Color Grading Contrast is invoked" + }, + "details": { + "name": "Set Color Grading Contrast" + }, + "params": [ + { + "typeid": "{EA2C3E90-AFBE-44D4-A90D-FAAF79BAF93D}", + "details": { + "name": "float" + } + } + ] + }, + { + "base": "GetWhiteBalanceKelvin", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Get White Balance Kelvin" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Get White Balance Kelvin is invoked" + }, + "details": { + "name": "Get White Balance Kelvin" + }, + "results": [ + { + "typeid": "{EA2C3E90-AFBE-44D4-A90D-FAAF79BAF93D}", + "details": { + "name": "float" + } + } + ] + }, + { + "base": "SetSplitToneHighlightsColor", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Set Split Tone Highlights Color" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Set Split Tone Highlights Color is invoked" + }, + "details": { + "name": "Set Split Tone Highlights Color" + }, + "params": [ + { + "typeid": "{8379EB7D-01FA-4538-B64B-A6543B4BE73D}", + "details": { + "name": "Vector 3" + } + } + ] + }, + { + "base": "GetSmhShadowsEnd", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Get Smh Shadows End" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Get Smh Shadows End is invoked" + }, + "details": { + "name": "Get Smh Shadows End" + }, + "results": [ + { + "typeid": "{EA2C3E90-AFBE-44D4-A90D-FAAF79BAF93D}", + "details": { + "name": "float" + } + } + ] + }, + { + "base": "SetSmhHighlightsStart", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Set Smh Highlights Start" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Set Smh Highlights Start is invoked" + }, + "details": { + "name": "Set Smh Highlights Start" + }, + "params": [ + { + "typeid": "{EA2C3E90-AFBE-44D4-A90D-FAAF79BAF93D}", + "details": { + "name": "float" + } + } + ] + }, + { + "base": "SetColorFilterSwatch", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Set Color Filter Swatch" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Set Color Filter Swatch is invoked" + }, + "details": { + "name": "Set Color Filter Swatch" + }, + "params": [ + { + "typeid": "{8379EB7D-01FA-4538-B64B-A6543B4BE73D}", + "details": { + "name": "Vector 3" + } + } + ] + }, + { + "base": "GetColorGradingFilterIntensity", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Get Color Grading Filter Intensity" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Get Color Grading Filter Intensity is invoked" + }, + "details": { + "name": "Get Color Grading Filter Intensity" + }, + "results": [ + { + "typeid": "{EA2C3E90-AFBE-44D4-A90D-FAAF79BAF93D}", + "details": { + "name": "float" + } + } + ] + }, + { + "base": "SetWhiteBalanceWeight", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Set White Balance Weight" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Set White Balance Weight is invoked" + }, + "details": { + "name": "Set White Balance Weight" + }, + "params": [ + { + "typeid": "{EA2C3E90-AFBE-44D4-A90D-FAAF79BAF93D}", + "details": { + "name": "float" + } + } + ] + }, + { + "base": "SetSmhShadowsStart", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Set Smh Shadows Start" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Set Smh Shadows Start is invoked" + }, + "details": { + "name": "Set Smh Shadows Start" + }, + "params": [ + { + "typeid": "{EA2C3E90-AFBE-44D4-A90D-FAAF79BAF93D}", + "details": { + "name": "float" + } + } + ] + }, + { + "base": "GetChannelMixingRed", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Get Channel Mixing Red" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Get Channel Mixing Red is invoked" + }, + "details": { + "name": "Get Channel Mixing Red" + }, + "results": [ + { + "typeid": "{8379EB7D-01FA-4538-B64B-A6543B4BE73D}", + "details": { + "name": "Vector 3" + } + } + ] + }, + { + "base": "GetColorGradingFilterMultiply", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Get Color Grading Filter Multiply" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Get Color Grading Filter Multiply is invoked" + }, + "details": { + "name": "Get Color Grading Filter Multiply" + }, + "results": [ + { + "typeid": "{EA2C3E90-AFBE-44D4-A90D-FAAF79BAF93D}", + "details": { + "name": "float" + } + } + ] + }, + { + "base": "SetColorGradingFilterMultiply", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Set Color Grading Filter Multiply" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Set Color Grading Filter Multiply is invoked" + }, + "details": { + "name": "Set Color Grading Filter Multiply" + }, + "params": [ + { + "typeid": "{EA2C3E90-AFBE-44D4-A90D-FAAF79BAF93D}", + "details": { + "name": "float" + } + } + ] + }, + { + "base": "SetSplitToneWeight", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Set Split Tone Weight" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Set Split Tone Weight is invoked" + }, + "details": { + "name": "Set Split Tone Weight" + }, + "params": [ + { + "typeid": "{EA2C3E90-AFBE-44D4-A90D-FAAF79BAF93D}", + "details": { + "name": "float" + } + } + ] + }, + { + "base": "SetSplitToneShadowsColor", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Set Split Tone Shadows Color" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Set Split Tone Shadows Color is invoked" + }, + "details": { + "name": "Set Split Tone Shadows Color" + }, + "params": [ + { + "typeid": "{8379EB7D-01FA-4538-B64B-A6543B4BE73D}", + "details": { + "name": "Vector 3" + } + } + ] + }, + { + "base": "GetSplitToneShadowsColor", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Get Split Tone Shadows Color" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Get Split Tone Shadows Color is invoked" + }, + "details": { + "name": "Get Split Tone Shadows Color" + }, + "results": [ + { + "typeid": "{8379EB7D-01FA-4538-B64B-A6543B4BE73D}", + "details": { + "name": "Vector 3" + } + } + ] + }, + { + "base": "GetSmhHighlightsStart", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Get Smh Highlights Start" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Get Smh Highlights Start is invoked" + }, + "details": { + "name": "Get Smh Highlights Start" + }, + "results": [ + { + "typeid": "{EA2C3E90-AFBE-44D4-A90D-FAAF79BAF93D}", + "details": { + "name": "float" + } + } + ] + }, + { + "base": "SetChannelMixingRed", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Set Channel Mixing Red" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Set Channel Mixing Red is invoked" + }, + "details": { + "name": "Set Channel Mixing Red" + }, + "params": [ + { + "typeid": "{8379EB7D-01FA-4538-B64B-A6543B4BE73D}", + "details": { + "name": "Vector 3" + } + } + ] + }, + { + "base": "SetChannelMixingGreen", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Set Channel Mixing Green" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Set Channel Mixing Green is invoked" + }, + "details": { + "name": "Set Channel Mixing Green" + }, + "params": [ + { + "typeid": "{8379EB7D-01FA-4538-B64B-A6543B4BE73D}", + "details": { + "name": "Vector 3" + } + } + ] + }, + { + "base": "SetColorGradingFilterIntensity", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Set Color Grading Filter Intensity" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Set Color Grading Filter Intensity is invoked" + }, + "details": { + "name": "Set Color Grading Filter Intensity" + }, + "params": [ + { + "typeid": "{EA2C3E90-AFBE-44D4-A90D-FAAF79BAF93D}", + "details": { + "name": "float" + } + } + ] + }, + { + "base": "SetGenerateLut", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Set Generate Lut" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Set Generate Lut is invoked" + }, + "details": { + "name": "Set Generate Lut" + }, + "params": [ + { + "typeid": "{A0CA880C-AFE4-43CB-926C-59AC48496112}", + "details": { + "name": "bool" + } + } + ] + }, + { + "base": "SetColorAdjustmentWeight", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Set Color Adjustment Weight" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Set Color Adjustment Weight is invoked" + }, + "details": { + "name": "Set Color Adjustment Weight" + }, + "params": [ + { + "typeid": "{EA2C3E90-AFBE-44D4-A90D-FAAF79BAF93D}", + "details": { + "name": "float" + } + } + ] + }, + { + "base": "GetSmhShadowsStart", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Get Smh Shadows Start" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Get Smh Shadows Start is invoked" + }, + "details": { + "name": "Get Smh Shadows Start" + }, + "results": [ + { + "typeid": "{EA2C3E90-AFBE-44D4-A90D-FAAF79BAF93D}", + "details": { + "name": "float" + } + } + ] + }, + { + "base": "SetSmhShadowsColor", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Set Smh Shadows Color" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Set Smh Shadows Color is invoked" + }, + "details": { + "name": "Set Smh Shadows Color" + }, + "params": [ + { + "typeid": "{8379EB7D-01FA-4538-B64B-A6543B4BE73D}", + "details": { + "name": "Vector 3" + } + } + ] + }, + { + "base": "SetFinalAdjustmentWeight", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Set Final Adjustment Weight" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Set Final Adjustment Weight is invoked" + }, + "details": { + "name": "Set Final Adjustment Weight" + }, + "params": [ + { + "typeid": "{EA2C3E90-AFBE-44D4-A90D-FAAF79BAF93D}", + "details": { + "name": "float" + } + } + ] + }, + { + "base": "GetColorGradingPostSaturation", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Get Color Grading Post Saturation" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Get Color Grading Post Saturation is invoked" + }, + "details": { + "name": "Get Color Grading Post Saturation" + }, + "results": [ + { + "typeid": "{EA2C3E90-AFBE-44D4-A90D-FAAF79BAF93D}", + "details": { + "name": "float" + } + } + ] + }, + { + "base": "SetColorGradingPreSaturation", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Set Color Grading Pre Saturation" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Set Color Grading Pre Saturation is invoked" + }, + "details": { + "name": "Set Color Grading Pre Saturation" + }, + "params": [ + { + "typeid": "{EA2C3E90-AFBE-44D4-A90D-FAAF79BAF93D}", + "details": { + "name": "float" + } + } + ] + }, + { + "base": "SetColorGradingHueShift", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Set Color Grading Hue Shift" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Set Color Grading Hue Shift is invoked" + }, + "details": { + "name": "Set Color Grading Hue Shift" + }, + "params": [ + { + "typeid": "{EA2C3E90-AFBE-44D4-A90D-FAAF79BAF93D}", + "details": { + "name": "float" + } + } + ] + }, + { + "base": "GetSplitToneWeight", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Get Split Tone Weight" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Get Split Tone Weight is invoked" + }, + "details": { + "name": "Get Split Tone Weight" + }, + "results": [ + { + "typeid": "{EA2C3E90-AFBE-44D4-A90D-FAAF79BAF93D}", + "details": { + "name": "float" + } + } + ] + }, + { + "base": "SetColorGradingPostSaturation", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Set Color Grading Post Saturation" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Set Color Grading Post Saturation is invoked" + }, + "details": { + "name": "Set Color Grading Post Saturation" + }, + "params": [ + { + "typeid": "{EA2C3E90-AFBE-44D4-A90D-FAAF79BAF93D}", + "details": { + "name": "float" + } + } + ] + }, + { + "base": "SetWhiteBalanceLuminancePreservation", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Set White Balance Luminance Preservation" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Set White Balance Luminance Preservation is invoked" + }, + "details": { + "name": "Set White Balance Luminance Preservation" + }, + "params": [ + { + "typeid": "{EA2C3E90-AFBE-44D4-A90D-FAAF79BAF93D}", + "details": { + "name": "float" + } + } + ] + }, + { + "base": "GetColorAdjustmentWeight", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Get Color Adjustment Weight" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Get Color Adjustment Weight is invoked" + }, + "details": { + "name": "Get Color Adjustment Weight" + }, + "results": [ + { + "typeid": "{EA2C3E90-AFBE-44D4-A90D-FAAF79BAF93D}", + "details": { + "name": "float" + } + } + ] + }, + { + "base": "GetSplitToneBalance", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Get Split Tone Balance" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Get Split Tone Balance is invoked" + }, + "details": { + "name": "Get Split Tone Balance" + }, + "results": [ + { + "typeid": "{EA2C3E90-AFBE-44D4-A90D-FAAF79BAF93D}", + "details": { + "name": "float" + } + } + ] + }, + { + "base": "GetSmhHighlightsColor", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Get Smh Highlights Color" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Get Smh Highlights Color is invoked" + }, + "details": { + "name": "Get Smh Highlights Color" + }, + "results": [ + { + "typeid": "{8379EB7D-01FA-4538-B64B-A6543B4BE73D}", + "details": { + "name": "Vector 3" + } + } + ] + }, + { + "base": "SetWhiteBalanceKelvin", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Set White Balance Kelvin" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Set White Balance Kelvin is invoked" + }, + "details": { + "name": "Set White Balance Kelvin" + }, + "params": [ + { + "typeid": "{EA2C3E90-AFBE-44D4-A90D-FAAF79BAF93D}", + "details": { + "name": "float" + } + } + ] + }, + { + "base": "GetWhiteBalanceWeight", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Get White Balance Weight" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Get White Balance Weight is invoked" + }, + "details": { + "name": "Get White Balance Weight" + }, + "results": [ + { + "typeid": "{EA2C3E90-AFBE-44D4-A90D-FAAF79BAF93D}", + "details": { + "name": "float" + } + } + ] + }, + { + "base": "GetColorGradingContrast", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Get Color Grading Contrast" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Get Color Grading Contrast is invoked" + }, + "details": { + "name": "Get Color Grading Contrast" + }, + "results": [ + { + "typeid": "{EA2C3E90-AFBE-44D4-A90D-FAAF79BAF93D}", + "details": { + "name": "float" + } + } + ] + }, + { + "base": "GetEnabled", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Get Enabled" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Get Enabled is invoked" + }, + "details": { + "name": "Get Enabled" + }, + "results": [ + { + "typeid": "{A0CA880C-AFE4-43CB-926C-59AC48496112}", + "details": { + "name": "bool" + } + } + ] + }, + { + "base": "GetCustomMaxExposure", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Get Custom Max Exposure" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Get Custom Max Exposure is invoked" + }, + "details": { + "name": "Get Custom Max Exposure" + }, + "results": [ + { + "typeid": "{EA2C3E90-AFBE-44D4-A90D-FAAF79BAF93D}", + "details": { + "name": "float" + } + } + ] + }, + { + "base": "SetWhiteBalanceTint", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Set White Balance Tint" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Set White Balance Tint is invoked" + }, + "details": { + "name": "Set White Balance Tint" + }, + "params": [ + { + "typeid": "{EA2C3E90-AFBE-44D4-A90D-FAAF79BAF93D}", + "details": { + "name": "float" + } + } + ] + }, + { + "base": "GetChannelMixingBlue", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Get Channel Mixing Blue" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Get Channel Mixing Blue is invoked" + }, + "details": { + "name": "Get Channel Mixing Blue" + }, + "results": [ + { + "typeid": "{8379EB7D-01FA-4538-B64B-A6543B4BE73D}", + "details": { + "name": "Vector 3" + } + } + ] + }, + { + "base": "SetCustomMaxExposure", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Set Custom Max Exposure" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Set Custom Max Exposure is invoked" + }, + "details": { + "name": "Set Custom Max Exposure" + }, + "params": [ + { + "typeid": "{EA2C3E90-AFBE-44D4-A90D-FAAF79BAF93D}", + "details": { + "name": "float" + } + } + ] + } + ] + } + ] +} \ No newline at end of file diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/EBus/Senders/HDRiSkyboxRequestBus.names b/Gems/ScriptCanvas/Assets/TranslationAssets/EBus/Senders/HDRiSkyboxRequestBus.names new file mode 100644 index 0000000000..588785965f --- /dev/null +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/EBus/Senders/HDRiSkyboxRequestBus.names @@ -0,0 +1,59 @@ +{ + "entries": [ + { + "base": "HDRiSkyboxRequestBus", + "context": "EBusSender", + "variant": "", + "details": { + "name": "HDRi Skybox", + "category": "Rendering" + }, + "methods": [ + { + "base": "SetExposure", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke SetExposure" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after SetExposure is invoked" + }, + "details": { + "name": "SetExposure" + }, + "params": [ + { + "typeid": "{EA2C3E90-AFBE-44D4-A90D-FAAF79BAF93D}", + "details": { + "name": "float" + } + } + ] + }, + { + "base": "GetExposure", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke GetExposure" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after GetExposure is invoked" + }, + "details": { + "name": "GetExposure" + }, + "results": [ + { + "typeid": "{EA2C3E90-AFBE-44D4-A90D-FAAF79BAF93D}", + "details": { + "name": "float" + } + } + ] + } + ] + } + ] +} \ No newline at end of file diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/EBus/Senders/HeightfieldProviderRequestsBus.names b/Gems/ScriptCanvas/Assets/TranslationAssets/EBus/Senders/HeightfieldProviderRequestsBus.names new file mode 100644 index 0000000000..a27119f0b6 --- /dev/null +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/EBus/Senders/HeightfieldProviderRequestsBus.names @@ -0,0 +1,234 @@ +{ + "entries": [ + { + "base": "HeightfieldProviderRequestsBus", + "context": "EBusSender", + "variant": "", + "details": { + "name": "Heightfield Provider" + }, + "methods": [ + { + "base": "GetHeightfieldMinHeight", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Get Heightfield Min Height" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Get Heightfield Min Height is invoked" + }, + "details": { + "name": "Get Heightfield Min Height" + }, + "results": [ + { + "typeid": "{EA2C3E90-AFBE-44D4-A90D-FAAF79BAF93D}", + "details": { + "name": "Heightfield Min Height" + } + } + ] + }, + { + "base": "GetHeights", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Get Heights" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Get Heights is invoked" + }, + "details": { + "name": "Get Heights" + }, + "results": [ + { + "typeid": "{6106BF95-5ACD-5071-8D0E-4F846C2138AD}", + "details": { + "name": "Heights" + } + } + ] + }, + { + "base": "GetHeightfieldMaxHeight", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Get Heightfield Max Height" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Get Heightfield Max Height is invoked" + }, + "details": { + "name": "Get Heightfield Max Height" + }, + "results": [ + { + "typeid": "{EA2C3E90-AFBE-44D4-A90D-FAAF79BAF93D}", + "details": { + "name": "Heightfield Max Height" + } + } + ] + }, + { + "base": "GetHeightfieldGridColumns", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Get Heightfield Grid Columns" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Get Heightfield Grid Columns is invoked" + }, + "details": { + "name": "Get Heightfield Grid Columns" + }, + "results": [ + { + "typeid": "{72039442-EB38-4D42-A1AD-CB68F7E0EEF6}", + "details": { + "name": "Heightfield Grid Columns" + } + } + ] + }, + { + "base": "GetMaterialList", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Get Material List" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Get Material List is invoked" + }, + "details": { + "name": "Get Material List" + }, + "results": [ + { + "typeid": "{82111EAD-9C65-57F0-BA72-46D6D931B434}", + "details": { + "name": "Material List" + } + } + ] + }, + { + "base": "GetHeightfieldTransform", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Get Heightfield Transform" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Get Heightfield Transform is invoked" + }, + "details": { + "name": "Get Heightfield Transform" + }, + "results": [ + { + "typeid": "{5D9958E9-9F1E-4985-B532-FFFDE75FEDFD}", + "details": { + "name": "Heightfield Transform" + } + } + ] + }, + { + "base": "GetHeightfieldGridRows", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Get Heightfield Grid Rows" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Get Heightfield Grid Rows is invoked" + }, + "details": { + "name": "Get Heightfield Grid Rows" + }, + "results": [ + { + "typeid": "{72039442-EB38-4D42-A1AD-CB68F7E0EEF6}", + "details": { + "name": "Heightfield Grid Rows" + } + } + ] + }, + { + "base": "GetHeightfieldGridSpacing", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Get Heightfield Grid Spacing" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Get Heightfield Grid Spacing is invoked" + }, + "details": { + "name": "Get Heightfield Grid Spacing" + }, + "results": [ + { + "typeid": "{3D80F623-C85C-4741-90D0-E4E66164E6BF}", + "details": { + "name": "Heightfield Grid Spacing" + } + } + ] + }, + { + "base": "GetHeightfieldAabb", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Get Heightfield AABB" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Get Heightfield AABB is invoked" + }, + "details": { + "name": "Get Heightfield AABB" + }, + "results": [ + { + "typeid": "{A54C2B36-D5B8-46A1-A529-4EBDBD2450E7}", + "details": { + "name": "AABB" + } + } + ] + }, + { + "base": "GetHeightsAndMaterials", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Get Heights And Materials" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Get Heights And Materials is invoked" + }, + "details": { + "name": "Get Heights And Materials" + }, + "results": [ + { + "typeid": "{887288A6-8B56-55A7-BD10-3E4B19CBFD6C}", + "details": { + "name": "Heights And Materials" + } + } + ] + } + ] + } + ] +} \ No newline at end of file diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/EBus/Senders/ImageBasedLightComponentRequestBus.names b/Gems/ScriptCanvas/Assets/TranslationAssets/EBus/Senders/ImageBasedLightComponentRequestBus.names new file mode 100644 index 0000000000..f01c273236 --- /dev/null +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/EBus/Senders/ImageBasedLightComponentRequestBus.names @@ -0,0 +1,191 @@ +{ + "entries": [ + { + "base": "ImageBasedLightComponentRequestBus", + "context": "EBusSender", + "variant": "", + "details": { + "name": "Image Based Light Component", + "category": "Rendering" + }, + "methods": [ + { + "base": "GetDiffuseImageAssetId", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Get Diffuse Image Asset Id" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Get Diffuse Image Asset Id is invoked" + }, + "details": { + "name": "Get Diffuse Image Asset Id" + }, + "results": [ + { + "typeid": "{652ED536-3402-439B-AEBE-4A5DBC554085}", + "details": { + "name": "Asset Id" + } + } + ] + }, + { + "base": "SetDiffuseImageAssetPath", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Set Diffuse Image Asset Path" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Set Diffuse Image Asset Path is invoked" + }, + "details": { + "name": "Set Diffuse Image Asset Path" + }, + "params": [ + { + "typeid": "{03AAAB3F-5C47-5A66-9EBC-D5FA4DB353C9}", + "details": { + "name": "AZ Std::string" + } + } + ] + }, + { + "base": "SetDiffuseImageAssetId", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Set Diffuse Image Asset Id" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Set Diffuse Image Asset Id is invoked" + }, + "details": { + "name": "Set Diffuse Image Asset Id" + }, + "params": [ + { + "typeid": "{652ED536-3402-439B-AEBE-4A5DBC554085}", + "details": { + "name": "Asset Id" + } + } + ] + }, + { + "base": "GetSpecularImageAssetId", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Get Specular Image Asset Id" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Get Specular Image Asset Id is invoked" + }, + "details": { + "name": "Get Specular Image Asset Id" + }, + "results": [ + { + "typeid": "{652ED536-3402-439B-AEBE-4A5DBC554085}", + "details": { + "name": "Asset Id" + } + } + ] + }, + { + "base": "SetSpecularImageAssetPath", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Set Specular Image Asset Path" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Set Specular Image Asset Path is invoked" + }, + "details": { + "name": "Set Specular Image Asset Path" + }, + "params": [ + { + "typeid": "{03AAAB3F-5C47-5A66-9EBC-D5FA4DB353C9}", + "details": { + "name": "AZ Std::string" + } + } + ] + }, + { + "base": "GetSpecularImageAssetPath", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Get Specular Image Asset Path" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Get Specular Image Asset Path is invoked" + }, + "details": { + "name": "Get Specular Image Asset Path" + }, + "results": [ + { + "typeid": "{03AAAB3F-5C47-5A66-9EBC-D5FA4DB353C9}", + "details": { + "name": "AZ Std::string" + } + } + ] + }, + { + "base": "GetDiffuseImageAssetPath", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Get Diffuse Image Asset Path" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Get Diffuse Image Asset Path is invoked" + }, + "details": { + "name": "Get Diffuse Image Asset Path" + }, + "results": [ + { + "typeid": "{03AAAB3F-5C47-5A66-9EBC-D5FA4DB353C9}", + "details": { + "name": "AZ Std::string" + } + } + ] + }, + { + "base": "SetSpecularImageAssetId", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Set Specular Image Asset Id" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Set Specular Image Asset Id is invoked" + }, + "details": { + "name": "Set Specular Image Asset Id" + }, + "params": [ + { + "typeid": "{652ED536-3402-439B-AEBE-4A5DBC554085}", + "details": { + "name": "Asset Id" + } + } + ] + } + ] + } + ] +} \ No newline at end of file diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/EBus/Senders/ImageGradientRequestBus.names b/Gems/ScriptCanvas/Assets/TranslationAssets/EBus/Senders/ImageGradientRequestBus.names new file mode 100644 index 0000000000..390c21325d --- /dev/null +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/EBus/Senders/ImageGradientRequestBus.names @@ -0,0 +1,146 @@ +{ + "entries": [ + { + "base": "ImageGradientRequestBus", + "context": "EBusSender", + "variant": "", + "details": { + "name": "Image Gradient" + }, + "methods": [ + { + "base": "SetTilingX", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke SetTilingX" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after SetTilingX is invoked" + }, + "details": { + "name": "SetTilingX" + }, + "params": [ + { + "typeid": "{EA2C3E90-AFBE-44D4-A90D-FAAF79BAF93D}", + "details": { + "name": "float" + } + } + ] + }, + { + "base": "GetTilingX", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke GetTilingX" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after GetTilingX is invoked" + }, + "details": { + "name": "GetTilingX" + }, + "results": [ + { + "typeid": "{EA2C3E90-AFBE-44D4-A90D-FAAF79BAF93D}", + "details": { + "name": "float" + } + } + ] + }, + { + "base": "SetImageAssetPath", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke SetImageAssetPath" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after SetImageAssetPath is invoked" + }, + "details": { + "name": "SetImageAssetPath" + }, + "params": [ + { + "typeid": "{03AAAB3F-5C47-5A66-9EBC-D5FA4DB353C9}", + "details": { + "name": "AZStd::string" + } + } + ] + }, + { + "base": "SetTilingY", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke SetTilingY" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after SetTilingY is invoked" + }, + "details": { + "name": "SetTilingY" + }, + "params": [ + { + "typeid": "{EA2C3E90-AFBE-44D4-A90D-FAAF79BAF93D}", + "details": { + "name": "float" + } + } + ] + }, + { + "base": "GetImageAssetPath", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke GetImageAssetPath" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after GetImageAssetPath is invoked" + }, + "details": { + "name": "GetImageAssetPath" + }, + "results": [ + { + "typeid": "{03AAAB3F-5C47-5A66-9EBC-D5FA4DB353C9}", + "details": { + "name": "AZStd::string" + } + } + ] + }, + { + "base": "GetTilingY", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke GetTilingY" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after GetTilingY is invoked" + }, + "details": { + "name": "GetTilingY" + }, + "results": [ + { + "typeid": "{EA2C3E90-AFBE-44D4-A90D-FAAF79BAF93D}", + "details": { + "name": "float" + } + } + ] + } + ] + } + ] +} \ No newline at end of file diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/EBus/Senders/InAppPurchasesRequestBus.names b/Gems/ScriptCanvas/Assets/TranslationAssets/EBus/Senders/InAppPurchasesRequestBus.names new file mode 100644 index 0000000000..d444d11b65 --- /dev/null +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/EBus/Senders/InAppPurchasesRequestBus.names @@ -0,0 +1,178 @@ +{ + "entries": [ + { + "base": "InAppPurchasesRequestBus", + "context": "EBusSender", + "variant": "", + "details": { + "name": "In App Purchases" + }, + "methods": [ + { + "base": "FinishTransaction", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Finish Transaction" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Finish Transaction is invoked" + }, + "details": { + "name": "Finish Transaction" + }, + "params": [ + { + "typeid": "{03AAAB3F-5C47-5A66-9EBC-D5FA4DB353C9}", + "details": { + "name": "AZ Std::string" + } + }, + { + "typeid": "{A0CA880C-AFE4-43CB-926C-59AC48496112}", + "details": { + "name": "bool" + } + } + ] + }, + { + "base": "QueryPurchasedProducts", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Query Purchased Products" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Query Purchased Products is invoked" + }, + "details": { + "name": "Query Purchased Products" + } + }, + { + "base": "PurchaseProductWithDeveloperPayload", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Purchase Product With Developer Payload" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Purchase Product With Developer Payload is invoked" + }, + "details": { + "name": "Purchase Product With Developer Payload" + }, + "params": [ + { + "typeid": "{03AAAB3F-5C47-5A66-9EBC-D5FA4DB353C9}", + "details": { + "name": "AZ Std::string" + } + }, + { + "typeid": "{03AAAB3F-5C47-5A66-9EBC-D5FA4DB353C9}", + "details": { + "name": "AZ Std::string" + } + } + ] + }, + { + "base": "QueryProductInfoFromJson", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Query Product Info From Json" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Query Product Info From Json is invoked" + }, + "details": { + "name": "Query Product Info From Json" + }, + "params": [ + { + "typeid": "{03AAAB3F-5C47-5A66-9EBC-D5FA4DB353C9}", + "details": { + "name": "AZ Std::string" + } + } + ] + }, + { + "base": "PurchaseProduct", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Purchase Product" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Purchase Product is invoked" + }, + "details": { + "name": "Purchase Product" + }, + "params": [ + { + "typeid": "{03AAAB3F-5C47-5A66-9EBC-D5FA4DB353C9}", + "details": { + "name": "AZ Std::string" + } + } + ] + }, + { + "base": "QueryProductInfo", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Query Product Info" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Query Product Info is invoked" + }, + "details": { + "name": "Query Product Info" + } + }, + { + "base": "ConsumePurchase", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Consume Purchase" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Consume Purchase is invoked" + }, + "details": { + "name": "Consume Purchase" + }, + "params": [ + { + "typeid": "{03AAAB3F-5C47-5A66-9EBC-D5FA4DB353C9}", + "details": { + "name": "AZ Std::string" + } + } + ] + }, + { + "base": "Initialize", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Initialize" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Initialize is invoked" + }, + "details": { + "name": "Initialize" + } + } + ] + } + ] +} \ No newline at end of file diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/EBus/Senders/InAppPurchasesResponseAccessorBus.names b/Gems/ScriptCanvas/Assets/TranslationAssets/EBus/Senders/InAppPurchasesResponseAccessorBus.names new file mode 100644 index 0000000000..2ecfd9ccab --- /dev/null +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/EBus/Senders/InAppPurchasesResponseAccessorBus.names @@ -0,0 +1,534 @@ +{ + "entries": [ + { + "base": "InAppPurchasesResponseAccessorBus", + "context": "EBusSender", + "variant": "", + "details": { + "name": "In App Purchases Response Accessor" + }, + "methods": [ + { + "base": "RestoredOrderId", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Restored Order Id" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Restored Order Id is invoked" + }, + "details": { + "name": "Restored Order Id" + }, + "results": [ + { + "typeid": "{03AAAB3F-5C47-5A66-9EBC-D5FA4DB353C9}", + "details": { + "name": "AZ Std::string" + } + } + ] + }, + { + "base": "ProductDescription", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Product Description" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Product Description is invoked" + }, + "details": { + "name": "Product Description" + }, + "results": [ + { + "typeid": "{03AAAB3F-5C47-5A66-9EBC-D5FA4DB353C9}", + "details": { + "name": "AZ Std::string" + } + } + ] + }, + { + "base": "PurchaseToken", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Purchase Token" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Purchase Token is invoked" + }, + "details": { + "name": "Purchase Token" + }, + "results": [ + { + "typeid": "{03AAAB3F-5C47-5A66-9EBC-D5FA4DB353C9}", + "details": { + "name": "AZ Std::string" + } + } + ] + }, + { + "base": "ResetIndices", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Reset Indices" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Reset Indices is invoked" + }, + "details": { + "name": "Reset Indices" + } + }, + { + "base": "ProductTitle", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Product Title" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Product Title is invoked" + }, + "details": { + "name": "Product Title" + }, + "results": [ + { + "typeid": "{03AAAB3F-5C47-5A66-9EBC-D5FA4DB353C9}", + "details": { + "name": "AZ Std::string" + } + } + ] + }, + { + "base": "ProductPrice", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Product Price" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Product Price is invoked" + }, + "details": { + "name": "Product Price" + }, + "results": [ + { + "typeid": "{03AAAB3F-5C47-5A66-9EBC-D5FA4DB353C9}", + "details": { + "name": "AZ Std::string" + } + } + ] + }, + { + "base": "IsAutoRenewing", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Is Auto Renewing" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Is Auto Renewing is invoked" + }, + "details": { + "name": "Is Auto Renewing" + }, + "results": [ + { + "typeid": "{A0CA880C-AFE4-43CB-926C-59AC48496112}", + "details": { + "name": "bool" + } + } + ] + }, + { + "base": "ProductId", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Product Id" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Product Id is invoked" + }, + "details": { + "name": "Product Id" + }, + "results": [ + { + "typeid": "{03AAAB3F-5C47-5A66-9EBC-D5FA4DB353C9}", + "details": { + "name": "AZ Std::string" + } + } + ] + }, + { + "base": "ProductPriceMicro", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Product Price Micro" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Product Price Micro is invoked" + }, + "details": { + "name": "Product Price Micro" + }, + "results": [ + { + "typeid": "{D6597933-47CD-4FC8-B911-63F3E2B0993A}", + "details": { + "name": "AZ::u 64" + } + } + ] + }, + { + "base": "PurchasedProductId", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Purchased Product Id" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Purchased Product Id is invoked" + }, + "details": { + "name": "Purchased Product Id" + }, + "results": [ + { + "typeid": "{03AAAB3F-5C47-5A66-9EBC-D5FA4DB353C9}", + "details": { + "name": "AZ Std::string" + } + } + ] + }, + { + "base": "PurchaseTime", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Purchase Time" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Purchase Time is invoked" + }, + "details": { + "name": "Purchase Time" + }, + "results": [ + { + "typeid": "{03AAAB3F-5C47-5A66-9EBC-D5FA4DB353C9}", + "details": { + "name": "AZ Std::string" + } + } + ] + }, + { + "base": "SubscriptionExpirationTime", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Subscription Expiration Time" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Subscription Expiration Time is invoked" + }, + "details": { + "name": "Subscription Expiration Time" + }, + "results": [ + { + "typeid": "{D6597933-47CD-4FC8-B911-63F3E2B0993A}", + "details": { + "name": "AZ::u 64" + } + } + ] + }, + { + "base": "RestoredPurchaseTime", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Restored Purchase Time" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Restored Purchase Time is invoked" + }, + "details": { + "name": "Restored Purchase Time" + }, + "results": [ + { + "typeid": "{D6597933-47CD-4FC8-B911-63F3E2B0993A}", + "details": { + "name": "AZ::u 64" + } + } + ] + }, + { + "base": "PreviousPurchasedProduct", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Previous Purchased Product" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Previous Purchased Product is invoked" + }, + "details": { + "name": "Previous Purchased Product" + }, + "results": [ + { + "typeid": "{A0CA880C-AFE4-43CB-926C-59AC48496112}", + "details": { + "name": "bool" + } + } + ] + }, + { + "base": "DeveloperPayload", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Developer Payload" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Developer Payload is invoked" + }, + "details": { + "name": "Developer Payload" + }, + "results": [ + { + "typeid": "{03AAAB3F-5C47-5A66-9EBC-D5FA4DB353C9}", + "details": { + "name": "AZ Std::string" + } + } + ] + }, + { + "base": "PackageName", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Package Name" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Package Name is invoked" + }, + "details": { + "name": "Package Name" + }, + "results": [ + { + "typeid": "{03AAAB3F-5C47-5A66-9EBC-D5FA4DB353C9}", + "details": { + "name": "AZ Std::string" + } + } + ] + }, + { + "base": "PreviousProduct", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Previous Product" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Previous Product is invoked" + }, + "details": { + "name": "Previous Product" + }, + "results": [ + { + "typeid": "{A0CA880C-AFE4-43CB-926C-59AC48496112}", + "details": { + "name": "bool" + } + } + ] + }, + { + "base": "NextPurchasedProduct", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Next Purchased Product" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Next Purchased Product is invoked" + }, + "details": { + "name": "Next Purchased Product" + }, + "results": [ + { + "typeid": "{A0CA880C-AFE4-43CB-926C-59AC48496112}", + "details": { + "name": "bool" + } + } + ] + }, + { + "base": "ProductCurrencyCode", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Product Currency Code" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Product Currency Code is invoked" + }, + "details": { + "name": "Product Currency Code" + }, + "results": [ + { + "typeid": "{03AAAB3F-5C47-5A66-9EBC-D5FA4DB353C9}", + "details": { + "name": "AZ Std::string" + } + } + ] + }, + { + "base": "HasDownloads", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Has Downloads" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Has Downloads is invoked" + }, + "details": { + "name": "Has Downloads" + }, + "results": [ + { + "typeid": "{A0CA880C-AFE4-43CB-926C-59AC48496112}", + "details": { + "name": "bool" + } + } + ] + }, + { + "base": "NextProduct", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Next Product" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Next Product is invoked" + }, + "details": { + "name": "Next Product" + }, + "results": [ + { + "typeid": "{A0CA880C-AFE4-43CB-926C-59AC48496112}", + "details": { + "name": "bool" + } + } + ] + }, + { + "base": "OrderId", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Order Id" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Order Id is invoked" + }, + "details": { + "name": "Order Id" + }, + "results": [ + { + "typeid": "{03AAAB3F-5C47-5A66-9EBC-D5FA4DB353C9}", + "details": { + "name": "AZ Std::string" + } + } + ] + }, + { + "base": "PurchaseSignature", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Purchase Signature" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Purchase Signature is invoked" + }, + "details": { + "name": "Purchase Signature" + }, + "results": [ + { + "typeid": "{03AAAB3F-5C47-5A66-9EBC-D5FA4DB353C9}", + "details": { + "name": "AZ Std::string" + } + } + ] + }, + { + "base": "IsProductOwned", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Is Product Owned" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Is Product Owned is invoked" + }, + "details": { + "name": "Is Product Owned" + }, + "results": [ + { + "typeid": "{A0CA880C-AFE4-43CB-926C-59AC48496112}", + "details": { + "name": "bool" + } + } + ] + } + ] + } + ] +} \ No newline at end of file diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/EBus/Senders/InputSystemRequestBus.names b/Gems/ScriptCanvas/Assets/TranslationAssets/EBus/Senders/InputSystemRequestBus.names new file mode 100644 index 0000000000..a30ad8ba30 --- /dev/null +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/EBus/Senders/InputSystemRequestBus.names @@ -0,0 +1,29 @@ +{ + "entries": [ + { + "base": "InputSystemRequestBus", + "context": "EBusSender", + "variant": "", + "details": { + "name": "Input System", + "category": "Input" + }, + "methods": [ + { + "base": "RecreateEnabledInputDevices", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Recreate Enabled Input Devices" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Recreate Enabled Input Devices is invoked" + }, + "details": { + "name": "Recreate Enabled Input Devices" + } + } + ] + } + ] +} \ No newline at end of file diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/EBus/Senders/InvertGradientRequestBus.names b/Gems/ScriptCanvas/Assets/TranslationAssets/EBus/Senders/InvertGradientRequestBus.names new file mode 100644 index 0000000000..ad15c077a2 --- /dev/null +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/EBus/Senders/InvertGradientRequestBus.names @@ -0,0 +1,36 @@ +{ + "entries": [ + { + "base": "InvertGradientRequestBus", + "context": "EBusSender", + "variant": "", + "details": { + "name": "Invert Gradient" + }, + "methods": [ + { + "base": "GetGradientSampler", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke GetGradientSampler" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after GetGradientSampler is invoked" + }, + "details": { + "name": "GetGradientSampler" + }, + "results": [ + { + "typeid": "{3768D3A6-BF70-4ABC-B4EC-73C75A886916}", + "details": { + "name": "Gradient Sampler" + } + } + ] + } + ] + } + ] +} \ No newline at end of file diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/EBus/Senders/LevelsGradientRequestBus.names b/Gems/ScriptCanvas/Assets/TranslationAssets/EBus/Senders/LevelsGradientRequestBus.names new file mode 100644 index 0000000000..24d7087be4 --- /dev/null +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/EBus/Senders/LevelsGradientRequestBus.names @@ -0,0 +1,256 @@ +{ + "entries": [ + { + "base": "LevelsGradientRequestBus", + "context": "EBusSender", + "variant": "", + "details": { + "name": "Levels Gradient" + }, + "methods": [ + { + "base": "GetOutputMax", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke GetOutputMax" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after GetOutputMax is invoked" + }, + "details": { + "name": "GetOutputMax" + }, + "results": [ + { + "typeid": "{EA2C3E90-AFBE-44D4-A90D-FAAF79BAF93D}", + "details": { + "name": "float" + } + } + ] + }, + { + "base": "SetInputMax", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke SetInputMax" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after SetInputMax is invoked" + }, + "details": { + "name": "SetInputMax" + }, + "params": [ + { + "typeid": "{EA2C3E90-AFBE-44D4-A90D-FAAF79BAF93D}", + "details": { + "name": "float" + } + } + ] + }, + { + "base": "SetOutputMax", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke SetOutputMax" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after SetOutputMax is invoked" + }, + "details": { + "name": "SetOutputMax" + }, + "params": [ + { + "typeid": "{EA2C3E90-AFBE-44D4-A90D-FAAF79BAF93D}", + "details": { + "name": "float" + } + } + ] + }, + { + "base": "SetInputMid", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke SetInputMid" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after SetInputMid is invoked" + }, + "details": { + "name": "SetInputMid" + }, + "params": [ + { + "typeid": "{EA2C3E90-AFBE-44D4-A90D-FAAF79BAF93D}", + "details": { + "name": "float" + } + } + ] + }, + { + "base": "SetOutputMin", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke SetOutputMin" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after SetOutputMin is invoked" + }, + "details": { + "name": "SetOutputMin" + }, + "params": [ + { + "typeid": "{EA2C3E90-AFBE-44D4-A90D-FAAF79BAF93D}", + "details": { + "name": "float" + } + } + ] + }, + { + "base": "GetGradientSampler", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke GetGradientSampler" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after GetGradientSampler is invoked" + }, + "details": { + "name": "GetGradientSampler" + }, + "results": [ + { + "typeid": "{3768D3A6-BF70-4ABC-B4EC-73C75A886916}", + "details": { + "name": "Gradient Sampler" + } + } + ] + }, + { + "base": "SetInputMin", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke SetInputMin" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after SetInputMin is invoked" + }, + "details": { + "name": "SetInputMin" + }, + "params": [ + { + "typeid": "{EA2C3E90-AFBE-44D4-A90D-FAAF79BAF93D}", + "details": { + "name": "float" + } + } + ] + }, + { + "base": "GetInputMid", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke GetInputMid" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after GetInputMid is invoked" + }, + "details": { + "name": "GetInputMid" + }, + "results": [ + { + "typeid": "{EA2C3E90-AFBE-44D4-A90D-FAAF79BAF93D}", + "details": { + "name": "float" + } + } + ] + }, + { + "base": "GetInputMax", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke GetInputMax" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after GetInputMax is invoked" + }, + "details": { + "name": "GetInputMax" + }, + "results": [ + { + "typeid": "{EA2C3E90-AFBE-44D4-A90D-FAAF79BAF93D}", + "details": { + "name": "float" + } + } + ] + }, + { + "base": "GetOutputMin", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke GetOutputMin" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after GetOutputMin is invoked" + }, + "details": { + "name": "GetOutputMin" + }, + "results": [ + { + "typeid": "{EA2C3E90-AFBE-44D4-A90D-FAAF79BAF93D}", + "details": { + "name": "float" + } + } + ] + }, + { + "base": "GetInputMin", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke GetInputMin" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after GetInputMin is invoked" + }, + "details": { + "name": "GetInputMin" + }, + "results": [ + { + "typeid": "{EA2C3E90-AFBE-44D4-A90D-FAAF79BAF93D}", + "details": { + "name": "float" + } + } + ] + } + ] + } + ] +} \ No newline at end of file diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/EBus/Senders/LookAt.names b/Gems/ScriptCanvas/Assets/TranslationAssets/EBus/Senders/LookAt.names new file mode 100644 index 0000000000..699b0195ca --- /dev/null +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/EBus/Senders/LookAt.names @@ -0,0 +1,87 @@ +{ + "entries": [ + { + "base": "LookAt", + "context": "EBusSender", + "variant": "", + "details": { + "name": "Look At", + "category": "Gameplay" + }, + "methods": [ + { + "base": "SetTarget", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Set Target" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Set Target is invoked" + }, + "details": { + "name": "Set Target", + "tooltip": "Set the entity to look at" + }, + "params": [ + { + "typeid": "{6383F1D3-BB27-4E6B-A49A-6409B2059EAA}", + "details": { + "name": "Target", + "tooltip": "The entity to look at" + } + } + ] + }, + { + "base": "SetTargetPosition", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Set Target Position" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Set Target Position is invoked" + }, + "details": { + "name": "Set Target Position", + "tooltip": "Sets the target position to look at." + }, + "params": [ + { + "typeid": "{8379EB7D-01FA-4538-B64B-A6543B4BE73D}", + "details": { + "name": "Position", + "tooltip": "The position to look at" + } + } + ] + }, + { + "base": "SetAxis", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Set Axis" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Set Axis is invoked" + }, + "details": { + "name": "Set Axis", + "tooltip": "Specify the forward axis to use as reference for the look at" + }, + "params": [ + { + "typeid": "{72B9409A-7D1A-4831-9CFE-FCB3FADD3426}", + "details": { + "name": "Axis", + "tooltip": "The forward axis to use as reference" + } + } + ] + } + ] + } + ] +} \ No newline at end of file diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/EBus/Senders/LookModificationRequestBus.names b/Gems/ScriptCanvas/Assets/TranslationAssets/EBus/Senders/LookModificationRequestBus.names new file mode 100644 index 0000000000..736915ef9c --- /dev/null +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/EBus/Senders/LookModificationRequestBus.names @@ -0,0 +1,323 @@ +{ + "entries": [ + { + "base": "LookModificationRequestBus", + "context": "EBusSender", + "variant": "", + "details": { + "name": "Look Modification", + "category": "Rendering" + }, + "methods": [ + { + "base": "SetColorGradingLutOverride", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Set Color Grading Lut Override" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Set Color Grading Lut Override is invoked" + }, + "details": { + "name": "Set Color Grading Lut Override" + }, + "params": [ + { + "typeid": "{EA2C3E90-AFBE-44D4-A90D-FAAF79BAF93D}", + "details": { + "name": "float" + } + } + ] + }, + { + "base": "SetCustomMaxExposure", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Set Custom Max Exposure" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Set Custom Max Exposure is invoked" + }, + "details": { + "name": "Set Custom Max Exposure" + }, + "params": [ + { + "typeid": "{EA2C3E90-AFBE-44D4-A90D-FAAF79BAF93D}", + "details": { + "name": "float" + } + } + ] + }, + { + "base": "SetCustomMinExposure", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Set Custom Min Exposure" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Set Custom Min Exposure is invoked" + }, + "details": { + "name": "Set Custom Min Exposure" + }, + "params": [ + { + "typeid": "{EA2C3E90-AFBE-44D4-A90D-FAAF79BAF93D}", + "details": { + "name": "float" + } + } + ] + }, + { + "base": "GetCustomMinExposure", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Get Custom Min Exposure" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Get Custom Min Exposure is invoked" + }, + "details": { + "name": "Get Custom Min Exposure" + }, + "results": [ + { + "typeid": "{EA2C3E90-AFBE-44D4-A90D-FAAF79BAF93D}", + "details": { + "name": "float" + } + } + ] + }, + { + "base": "GetColorGradingLut", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Get Color Grading Lut" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Get Color Grading Lut is invoked" + }, + "details": { + "name": "Get Color Grading Lut" + }, + "results": [ + { + "typeid": "{895CEA57-551B-5B79-A32B-B2DA0A912C87}", + "details": { + "name": "Asset" + } + } + ] + }, + { + "base": "GetColorGradingLutIntensity", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Get Color Grading Lut Intensity" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Get Color Grading Lut Intensity is invoked" + }, + "details": { + "name": "Get Color Grading Lut Intensity" + }, + "results": [ + { + "typeid": "{EA2C3E90-AFBE-44D4-A90D-FAAF79BAF93D}", + "details": { + "name": "float" + } + } + ] + }, + { + "base": "GetColorGradingLutOverride", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Get Color Grading Lut Override" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Get Color Grading Lut Override is invoked" + }, + "details": { + "name": "Get Color Grading Lut Override" + }, + "results": [ + { + "typeid": "{EA2C3E90-AFBE-44D4-A90D-FAAF79BAF93D}", + "details": { + "name": "float" + } + } + ] + }, + { + "base": "SetColorGradingLut", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Set Color Grading Lut" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Set Color Grading Lut is invoked" + }, + "details": { + "name": "Set Color Grading Lut" + }, + "params": [ + { + "typeid": "{895CEA57-551B-5B79-A32B-B2DA0A912C87}", + "details": { + "name": "Asset" + } + } + ] + }, + { + "base": "SetColorGradingLutIntensity", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Set Color Grading Lut Intensity" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Set Color Grading Lut Intensity is invoked" + }, + "details": { + "name": "Set Color Grading Lut Intensity" + }, + "params": [ + { + "typeid": "{EA2C3E90-AFBE-44D4-A90D-FAAF79BAF93D}", + "details": { + "name": "float" + } + } + ] + }, + { + "base": "SetEnabled", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Set Enabled" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Set Enabled is invoked" + }, + "details": { + "name": "Set Enabled" + }, + "params": [ + { + "typeid": "{A0CA880C-AFE4-43CB-926C-59AC48496112}", + "details": { + "name": "bool" + } + } + ] + }, + { + "base": "GetEnabled", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Get Enabled" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Get Enabled is invoked" + }, + "details": { + "name": "Get Enabled" + }, + "results": [ + { + "typeid": "{A0CA880C-AFE4-43CB-926C-59AC48496112}", + "details": { + "name": "bool" + } + } + ] + }, + { + "base": "SetShaperPresetType", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Set Shaper Preset Type" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Set Shaper Preset Type is invoked" + }, + "details": { + "name": "Set Shaper Preset Type" + }, + "params": [ + { + "typeid": "{72039442-EB38-4D42-A1AD-CB68F7E0EEF6}", + "details": { + "name": "int" + } + } + ] + }, + { + "base": "GetShaperPresetType", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Get Shaper Preset Type" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Get Shaper Preset Type is invoked" + }, + "details": { + "name": "Get Shaper Preset Type" + }, + "results": [ + { + "typeid": "{72039442-EB38-4D42-A1AD-CB68F7E0EEF6}", + "details": { + "name": "int" + } + } + ] + }, + { + "base": "GetCustomMaxExposure", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Get Custom Max Exposure" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Get Custom Max Exposure is invoked" + }, + "details": { + "name": "Get Custom Max Exposure" + }, + "results": [ + { + "typeid": "{EA2C3E90-AFBE-44D4-A90D-FAAF79BAF93D}", + "details": { + "name": "float" + } + } + ] + } + ] + } + ] +} \ No newline at end of file diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/EBus/Senders/LyShineExamplesCppExampleBus.names b/Gems/ScriptCanvas/Assets/TranslationAssets/EBus/Senders/LyShineExamplesCppExampleBus.names new file mode 100644 index 0000000000..3287656724 --- /dev/null +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/EBus/Senders/LyShineExamplesCppExampleBus.names @@ -0,0 +1,43 @@ +{ + "entries": [ + { + "base": "LyShineExamplesCppExampleBus", + "context": "EBusSender", + "variant": "", + "details": { + "name": "UI Examples", + "category": "UI" + }, + "methods": [ + { + "base": "CreateCanvas", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Create Canvas" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Create Canvas is invoked" + }, + "details": { + "name": "Create Canvas" + } + }, + { + "base": "DestroyCanvas", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Destroy Canvas" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Destroy Canvas is invoked" + }, + "details": { + "name": "Destroy Canvas" + } + } + ] + } + ] +} \ No newline at end of file diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/EBus/Senders/MaterialComponentRequestBus.names b/Gems/ScriptCanvas/Assets/TranslationAssets/EBus/Senders/MaterialComponentRequestBus.names new file mode 100644 index 0000000000..fa2ade0412 --- /dev/null +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/EBus/Senders/MaterialComponentRequestBus.names @@ -0,0 +1,1383 @@ +{ + "entries": [ + { + "base": "MaterialComponentRequestBus", + "context": "EBusSender", + "variant": "", + "details": { + "name": "Material", + "category": "Rendering" + }, + "methods": [ + { + "base": "GetPropertyOverrides", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Get Property Overrides" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Get Property Overrides is invoked" + }, + "details": { + "name": "Get Property Overrides" + }, + "params": [ + { + "typeid": "{EB603581-4654-4C17-B6DE-AE61E79EDA97}", + "details": { + "name": "AZ:: Render:: Material Assignment Id" + } + } + ], + "results": [ + { + "typeid": "{6E6962E1-04C9-56F9-89C4-361031CC1384}", + "details": { + "name": "AZ Std::unordered_map" + } + } + ] + }, + { + "base": "SetPropertyOverrides", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Set Property Overrides" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Set Property Overrides is invoked" + }, + "details": { + "name": "Set Property Overrides" + }, + "params": [ + { + "typeid": "{EB603581-4654-4C17-B6DE-AE61E79EDA97}", + "details": { + "name": "AZ:: Render:: Material Assignment Id" + } + }, + { + "typeid": "{6E6962E1-04C9-56F9-89C4-361031CC1384}", + "details": { + "name": "AZ Std::unordered_map" + } + } + ] + }, + { + "base": "ClearPropertyOverride", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Clear Property Override" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Clear Property Override is invoked" + }, + "details": { + "name": "Clear Property Override" + }, + "params": [ + { + "typeid": "{EB603581-4654-4C17-B6DE-AE61E79EDA97}", + "details": { + "name": "AZ:: Render:: Material Assignment Id" + } + }, + { + "typeid": "{03AAAB3F-5C47-5A66-9EBC-D5FA4DB353C9}", + "details": { + "name": "AZ Std::string" + } + } + ] + }, + { + "base": "ClearPropertyOverrides", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Clear Property Overrides" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Clear Property Overrides is invoked" + }, + "details": { + "name": "Clear Property Overrides" + }, + "params": [ + { + "typeid": "{EB603581-4654-4C17-B6DE-AE61E79EDA97}", + "details": { + "name": "AZ:: Render:: Material Assignment Id" + } + } + ] + }, + { + "base": "GetPropertyOverrideVector4", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Get Property Override Vector 4" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Get Property Override Vector 4 is invoked" + }, + "details": { + "name": "Get Property Override Vector 4" + }, + "params": [ + { + "typeid": "{EB603581-4654-4C17-B6DE-AE61E79EDA97}", + "details": { + "name": "AZ:: Render:: Material Assignment Id" + } + }, + { + "typeid": "{03AAAB3F-5C47-5A66-9EBC-D5FA4DB353C9}", + "details": { + "name": "AZ Std::string" + } + } + ], + "results": [ + { + "typeid": "{0CE9FA36-1E3A-4C06-9254-B7C73A732053}", + "details": { + "name": "Vector 4" + } + } + ] + }, + { + "base": "GetPropertyOverrideUInt32", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Get Property OverrideU Int 32" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Get Property OverrideU Int 32 is invoked" + }, + "details": { + "name": "Get Property OverrideU Int 32" + }, + "params": [ + { + "typeid": "{EB603581-4654-4C17-B6DE-AE61E79EDA97}", + "details": { + "name": "AZ:: Render:: Material Assignment Id" + } + }, + { + "typeid": "{03AAAB3F-5C47-5A66-9EBC-D5FA4DB353C9}", + "details": { + "name": "AZ Std::string" + } + } + ], + "results": [ + { + "typeid": "{43DA906B-7DEF-4CA8-9790-854106D3F983}", + "details": { + "name": "unsigned int" + } + } + ] + }, + { + "base": "GetPropertyOverrideBool", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Get Property Override Bool" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Get Property Override Bool is invoked" + }, + "details": { + "name": "Get Property Override Bool" + }, + "params": [ + { + "typeid": "{EB603581-4654-4C17-B6DE-AE61E79EDA97}", + "details": { + "name": "AZ:: Render:: Material Assignment Id" + } + }, + { + "typeid": "{03AAAB3F-5C47-5A66-9EBC-D5FA4DB353C9}", + "details": { + "name": "AZ Std::string" + } + } + ], + "results": [ + { + "typeid": "{A0CA880C-AFE4-43CB-926C-59AC48496112}", + "details": { + "name": "bool" + } + } + ] + }, + { + "base": "SetPropertyOverrideEnum", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Set Property Override Enum" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Set Property Override Enum is invoked" + }, + "details": { + "name": "Set Property Override Enum" + }, + "params": [ + { + "typeid": "{EB603581-4654-4C17-B6DE-AE61E79EDA97}", + "details": { + "name": "AZ:: Render:: Material Assignment Id" + } + }, + { + "typeid": "{03AAAB3F-5C47-5A66-9EBC-D5FA4DB353C9}", + "details": { + "name": "AZ Std::string" + } + }, + { + "typeid": "{43DA906B-7DEF-4CA8-9790-854106D3F983}", + "details": { + "name": "unsigned int" + } + } + ] + }, + { + "base": "SetPropertyOverrideVector2", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Set Property Override Vector 2" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Set Property Override Vector 2 is invoked" + }, + "details": { + "name": "Set Property Override Vector 2" + }, + "params": [ + { + "typeid": "{EB603581-4654-4C17-B6DE-AE61E79EDA97}", + "details": { + "name": "AZ:: Render:: Material Assignment Id" + } + }, + { + "typeid": "{03AAAB3F-5C47-5A66-9EBC-D5FA4DB353C9}", + "details": { + "name": "AZ Std::string" + } + }, + { + "typeid": "{3D80F623-C85C-4741-90D0-E4E66164E6BF}", + "details": { + "name": "Vector 2" + } + } + ] + }, + { + "base": "GetPropertyOverrideImage", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Get Property Override Image" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Get Property Override Image is invoked" + }, + "details": { + "name": "Get Property Override Image" + }, + "params": [ + { + "typeid": "{EB603581-4654-4C17-B6DE-AE61E79EDA97}", + "details": { + "name": "AZ:: Render:: Material Assignment Id" + } + }, + { + "typeid": "{03AAAB3F-5C47-5A66-9EBC-D5FA4DB353C9}", + "details": { + "name": "AZ Std::string" + } + } + ], + "results": [ + { + "typeid": "{652ED536-3402-439B-AEBE-4A5DBC554085}", + "details": { + "name": "Asset Id" + } + } + ] + }, + { + "base": "ClearAllPropertyOverrides", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Clear All Property Overrides" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Clear All Property Overrides is invoked" + }, + "details": { + "name": "Clear All Property Overrides" + } + }, + { + "base": "GetMaterialSlotLabel", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Get Material Slot Label" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Get Material Slot Label is invoked" + }, + "details": { + "name": "Get Material Slot Label" + }, + "params": [ + { + "typeid": "{EB603581-4654-4C17-B6DE-AE61E79EDA97}", + "details": { + "name": "AZ:: Render:: Material Assignment Id" + } + } + ], + "results": [ + { + "typeid": "{03AAAB3F-5C47-5A66-9EBC-D5FA4DB353C9}", + "details": { + "name": "AZ Std::string" + } + } + ] + }, + { + "base": "SetPropertyOverrideVector3", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Set Property Override Vector 3" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Set Property Override Vector 3 is invoked" + }, + "details": { + "name": "Set Property Override Vector 3" + }, + "params": [ + { + "typeid": "{EB603581-4654-4C17-B6DE-AE61E79EDA97}", + "details": { + "name": "AZ:: Render:: Material Assignment Id" + } + }, + { + "typeid": "{03AAAB3F-5C47-5A66-9EBC-D5FA4DB353C9}", + "details": { + "name": "AZ Std::string" + } + }, + { + "typeid": "{8379EB7D-01FA-4538-B64B-A6543B4BE73D}", + "details": { + "name": "Vector 3" + } + } + ] + }, + { + "base": "ClearInvalidMaterialOverrides", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Clear Invalid Material Overrides" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Clear Invalid Material Overrides is invoked" + }, + "details": { + "name": "Clear Invalid Material Overrides" + } + }, + { + "base": "SetPropertyOverrideBool", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Set Property Override Bool" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Set Property Override Bool is invoked" + }, + "details": { + "name": "Set Property Override Bool" + }, + "params": [ + { + "typeid": "{EB603581-4654-4C17-B6DE-AE61E79EDA97}", + "details": { + "name": "AZ:: Render:: Material Assignment Id" + } + }, + { + "typeid": "{03AAAB3F-5C47-5A66-9EBC-D5FA4DB353C9}", + "details": { + "name": "AZ Std::string" + } + }, + { + "typeid": "{A0CA880C-AFE4-43CB-926C-59AC48496112}", + "details": { + "name": "bool" + } + } + ] + }, + { + "base": "RepairInvalidMaterialOverrides", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Repair Invalid Material Overrides" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Repair Invalid Material Overrides is invoked" + }, + "details": { + "name": "Repair Invalid Material Overrides" + } + }, + { + "base": "SetPropertyOverrideString", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Set Property Override String" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Set Property Override String is invoked" + }, + "details": { + "name": "Set Property Override String" + }, + "params": [ + { + "typeid": "{EB603581-4654-4C17-B6DE-AE61E79EDA97}", + "details": { + "name": "AZ:: Render:: Material Assignment Id" + } + }, + { + "typeid": "{03AAAB3F-5C47-5A66-9EBC-D5FA4DB353C9}", + "details": { + "name": "AZ Std::string" + } + }, + { + "typeid": "{03AAAB3F-5C47-5A66-9EBC-D5FA4DB353C9}", + "details": { + "name": "AZ Std::string" + } + } + ] + }, + { + "base": "SetDefaultMaterialOverride", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Set Default Material Override" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Set Default Material Override is invoked" + }, + "details": { + "name": "Set Default Material Override" + }, + "params": [ + { + "typeid": "{652ED536-3402-439B-AEBE-4A5DBC554085}", + "details": { + "name": "Asset Id" + } + } + ] + }, + { + "base": "GetDefaultMaterialOverride", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Get Default Material Override" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Get Default Material Override is invoked" + }, + "details": { + "name": "Get Default Material Override" + }, + "results": [ + { + "typeid": "{652ED536-3402-439B-AEBE-4A5DBC554085}", + "details": { + "name": "Asset Id" + } + } + ] + }, + { + "base": "SetMaterialOverrides", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Set Material Overrides" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Set Material Overrides is invoked" + }, + "details": { + "name": "Set Material Overrides" + }, + "params": [ + { + "typeid": "{50F6716F-698B-5A6C-AACD-940597FDEC24}", + "details": { + "name": "AZ Std::unordered_map" + } + } + ] + }, + { + "base": "GetPropertyOverrideString", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Get Property Override String" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Get Property Override String is invoked" + }, + "details": { + "name": "Get Property Override String" + }, + "params": [ + { + "typeid": "{EB603581-4654-4C17-B6DE-AE61E79EDA97}", + "details": { + "name": "AZ:: Render:: Material Assignment Id" + } + }, + { + "typeid": "{03AAAB3F-5C47-5A66-9EBC-D5FA4DB353C9}", + "details": { + "name": "AZ Std::string" + } + } + ], + "results": [ + { + "typeid": "{03AAAB3F-5C47-5A66-9EBC-D5FA4DB353C9}", + "details": { + "name": "AZ Std::string" + } + } + ] + }, + { + "base": "GetMaterialOverrides", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Get Material Overrides" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Get Material Overrides is invoked" + }, + "details": { + "name": "Get Material Overrides" + }, + "results": [ + { + "typeid": "{50F6716F-698B-5A6C-AACD-940597FDEC24}", + "details": { + "name": "AZ Std::unordered_map" + } + } + ] + }, + { + "base": "GetMaterialOverride", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Get Material Override" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Get Material Override is invoked" + }, + "details": { + "name": "Get Material Override" + }, + "params": [ + { + "typeid": "{EB603581-4654-4C17-B6DE-AE61E79EDA97}", + "details": { + "name": "AZ:: Render:: Material Assignment Id" + } + } + ], + "results": [ + { + "typeid": "{652ED536-3402-439B-AEBE-4A5DBC554085}", + "details": { + "name": "Asset Id" + } + } + ] + }, + { + "base": "SetPropertyOverrideVector4", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Set Property Override Vector 4" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Set Property Override Vector 4 is invoked" + }, + "details": { + "name": "Set Property Override Vector 4" + }, + "params": [ + { + "typeid": "{EB603581-4654-4C17-B6DE-AE61E79EDA97}", + "details": { + "name": "AZ:: Render:: Material Assignment Id" + } + }, + { + "typeid": "{03AAAB3F-5C47-5A66-9EBC-D5FA4DB353C9}", + "details": { + "name": "AZ Std::string" + } + }, + { + "typeid": "{0CE9FA36-1E3A-4C06-9254-B7C73A732053}", + "details": { + "name": "Vector 4" + } + } + ] + }, + { + "base": "SetPropertyOverrideUInt32", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Set Property OverrideU Int 32" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Set Property OverrideU Int 32 is invoked" + }, + "details": { + "name": "Set Property OverrideU Int 32" + }, + "params": [ + { + "typeid": "{EB603581-4654-4C17-B6DE-AE61E79EDA97}", + "details": { + "name": "AZ:: Render:: Material Assignment Id" + } + }, + { + "typeid": "{03AAAB3F-5C47-5A66-9EBC-D5FA4DB353C9}", + "details": { + "name": "AZ Std::string" + } + }, + { + "typeid": "{43DA906B-7DEF-4CA8-9790-854106D3F983}", + "details": { + "name": "unsigned int" + } + } + ] + }, + { + "base": "FindMaterialAssignmentId", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Find Material Assignment Id" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Find Material Assignment Id is invoked" + }, + "details": { + "name": "Find Material Assignment Id" + }, + "params": [ + { + "typeid": "{D6597933-47CD-4FC8-B911-63F3E2B0993A}", + "details": { + "name": "AZ::u 64" + } + }, + { + "typeid": "{03AAAB3F-5C47-5A66-9EBC-D5FA4DB353C9}", + "details": { + "name": "AZ Std::string" + } + } + ], + "results": [ + { + "typeid": "{EB603581-4654-4C17-B6DE-AE61E79EDA97}", + "details": { + "name": "AZ:: Render:: Material Assignment Id" + } + } + ] + }, + { + "base": "GetPropertyOverrideInt32", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Get Property Override Int 32" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Get Property Override Int 32 is invoked" + }, + "details": { + "name": "Get Property Override Int 32" + }, + "params": [ + { + "typeid": "{EB603581-4654-4C17-B6DE-AE61E79EDA97}", + "details": { + "name": "AZ:: Render:: Material Assignment Id" + } + }, + { + "typeid": "{03AAAB3F-5C47-5A66-9EBC-D5FA4DB353C9}", + "details": { + "name": "AZ Std::string" + } + } + ], + "results": [ + { + "typeid": "{72039442-EB38-4D42-A1AD-CB68F7E0EEF6}", + "details": { + "name": "int" + } + } + ] + }, + { + "base": "GetPropertyOverrideEnum", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Get Property Override Enum" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Get Property Override Enum is invoked" + }, + "details": { + "name": "Get Property Override Enum" + }, + "params": [ + { + "typeid": "{EB603581-4654-4C17-B6DE-AE61E79EDA97}", + "details": { + "name": "AZ:: Render:: Material Assignment Id" + } + }, + { + "typeid": "{03AAAB3F-5C47-5A66-9EBC-D5FA4DB353C9}", + "details": { + "name": "AZ Std::string" + } + } + ], + "results": [ + { + "typeid": "{43DA906B-7DEF-4CA8-9790-854106D3F983}", + "details": { + "name": "unsigned int" + } + } + ] + }, + { + "base": "SetPropertyOverride", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Set Property Override" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Set Property Override is invoked" + }, + "details": { + "name": "Set Property Override" + }, + "params": [ + { + "typeid": "{EB603581-4654-4C17-B6DE-AE61E79EDA97}", + "details": { + "name": "AZ:: Render:: Material Assignment Id" + } + }, + { + "typeid": "{03AAAB3F-5C47-5A66-9EBC-D5FA4DB353C9}", + "details": { + "name": "AZ Std::string" + } + }, + { + "typeid": "{03924488-C7F4-4D6D-948B-ABC2D1AE2FD3}", + "details": { + "name": "any" + } + } + ] + }, + { + "base": "GetOriginalMaterialAssignments", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Get Original Material Assignments" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Get Original Material Assignments is invoked" + }, + "details": { + "name": "Get Original Material Assignments" + }, + "results": [ + { + "typeid": "{50F6716F-698B-5A6C-AACD-940597FDEC24}", + "details": { + "name": "AZ Std::unordered_map" + } + } + ] + }, + { + "base": "GetPropertyOverride", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Get Property Override" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Get Property Override is invoked" + }, + "details": { + "name": "Get Property Override" + }, + "params": [ + { + "typeid": "{EB603581-4654-4C17-B6DE-AE61E79EDA97}", + "details": { + "name": "AZ:: Render:: Material Assignment Id" + } + }, + { + "typeid": "{03AAAB3F-5C47-5A66-9EBC-D5FA4DB353C9}", + "details": { + "name": "AZ Std::string" + } + } + ], + "results": [ + { + "typeid": "{03924488-C7F4-4D6D-948B-ABC2D1AE2FD3}", + "details": { + "name": "any" + } + } + ] + }, + { + "base": "ClearModelMaterialOverrides", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Clear Model Material Overrides" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Clear Model Material Overrides is invoked" + }, + "details": { + "name": "Clear Model Material Overrides" + } + }, + { + "base": "GetDefaultMaterialAssetId", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Get Default Material Asset Id" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Get Default Material Asset Id is invoked" + }, + "details": { + "name": "Get Default Material Asset Id" + }, + "params": [ + { + "typeid": "{EB603581-4654-4C17-B6DE-AE61E79EDA97}", + "details": { + "name": "AZ:: Render:: Material Assignment Id" + } + } + ], + "results": [ + { + "typeid": "{652ED536-3402-439B-AEBE-4A5DBC554085}", + "details": { + "name": "Asset Id" + } + } + ] + }, + { + "base": "SetPropertyOverrideInt32", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Set Property Override Int 32" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Set Property Override Int 32 is invoked" + }, + "details": { + "name": "Set Property Override Int 32" + }, + "params": [ + { + "typeid": "{EB603581-4654-4C17-B6DE-AE61E79EDA97}", + "details": { + "name": "AZ:: Render:: Material Assignment Id" + } + }, + { + "typeid": "{03AAAB3F-5C47-5A66-9EBC-D5FA4DB353C9}", + "details": { + "name": "AZ Std::string" + } + }, + { + "typeid": "{72039442-EB38-4D42-A1AD-CB68F7E0EEF6}", + "details": { + "name": "int" + } + } + ] + }, + { + "base": "SetPropertyOverrideImage", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Set Property Override Image" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Set Property Override Image is invoked" + }, + "details": { + "name": "Set Property Override Image" + }, + "params": [ + { + "typeid": "{EB603581-4654-4C17-B6DE-AE61E79EDA97}", + "details": { + "name": "AZ:: Render:: Material Assignment Id" + } + }, + { + "typeid": "{03AAAB3F-5C47-5A66-9EBC-D5FA4DB353C9}", + "details": { + "name": "AZ Std::string" + } + }, + { + "typeid": "{652ED536-3402-439B-AEBE-4A5DBC554085}", + "details": { + "name": "Asset Id" + } + } + ] + }, + { + "base": "GetPropertyOverrideVector2", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Get Property Override Vector 2" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Get Property Override Vector 2 is invoked" + }, + "details": { + "name": "Get Property Override Vector 2" + }, + "params": [ + { + "typeid": "{EB603581-4654-4C17-B6DE-AE61E79EDA97}", + "details": { + "name": "AZ:: Render:: Material Assignment Id" + } + }, + { + "typeid": "{03AAAB3F-5C47-5A66-9EBC-D5FA4DB353C9}", + "details": { + "name": "AZ Std::string" + } + } + ], + "results": [ + { + "typeid": "{3D80F623-C85C-4741-90D0-E4E66164E6BF}", + "details": { + "name": "Vector 2" + } + } + ] + }, + { + "base": "ClearAllMaterialOverrides", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Clear All Material Overrides" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Clear All Material Overrides is invoked" + }, + "details": { + "name": "Clear All Material Overrides" + } + }, + { + "base": "GetPropertyOverrideColor", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Get Property Override Color" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Get Property Override Color is invoked" + }, + "details": { + "name": "Get Property Override Color" + }, + "params": [ + { + "typeid": "{EB603581-4654-4C17-B6DE-AE61E79EDA97}", + "details": { + "name": "AZ:: Render:: Material Assignment Id" + } + }, + { + "typeid": "{03AAAB3F-5C47-5A66-9EBC-D5FA4DB353C9}", + "details": { + "name": "AZ Std::string" + } + } + ], + "results": [ + { + "typeid": "{7894072A-9050-4F0F-901B-34B1A0D29417}", + "details": { + "name": "Color" + } + } + ] + }, + { + "base": "SetPropertyOverrideFloat", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Set Property Override Float" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Set Property Override Float is invoked" + }, + "details": { + "name": "Set Property Override Float" + }, + "params": [ + { + "typeid": "{EB603581-4654-4C17-B6DE-AE61E79EDA97}", + "details": { + "name": "AZ:: Render:: Material Assignment Id" + } + }, + { + "typeid": "{03AAAB3F-5C47-5A66-9EBC-D5FA4DB353C9}", + "details": { + "name": "AZ Std::string" + } + }, + { + "typeid": "{EA2C3E90-AFBE-44D4-A90D-FAAF79BAF93D}", + "details": { + "name": "float" + } + } + ] + }, + { + "base": "ApplyAutomaticPropertyUpdates", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Apply Automatic Property Updates" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Apply Automatic Property Updates is invoked" + }, + "details": { + "name": "Apply Automatic Property Updates" + }, + "results": [ + { + "typeid": "{43DA906B-7DEF-4CA8-9790-854106D3F983}", + "details": { + "name": "unsigned int" + } + } + ] + }, + { + "base": "ClearMaterialOverride", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Clear Material Override" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Clear Material Override is invoked" + }, + "details": { + "name": "Clear Material Override" + }, + "params": [ + { + "typeid": "{EB603581-4654-4C17-B6DE-AE61E79EDA97}", + "details": { + "name": "AZ:: Render:: Material Assignment Id" + } + } + ] + }, + { + "base": "ClearLodMaterialOverrides", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Clear Lod Material Overrides" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Clear Lod Material Overrides is invoked" + }, + "details": { + "name": "Clear Lod Material Overrides" + } + }, + { + "base": "ClearIncompatibleMaterialOverrides", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Clear Incompatible Material Overrides" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Clear Incompatible Material Overrides is invoked" + }, + "details": { + "name": "Clear Incompatible Material Overrides" + } + }, + { + "base": "GetPropertyOverrideVector3", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Get Property Override Vector 3" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Get Property Override Vector 3 is invoked" + }, + "details": { + "name": "Get Property Override Vector 3" + }, + "params": [ + { + "typeid": "{EB603581-4654-4C17-B6DE-AE61E79EDA97}", + "details": { + "name": "AZ:: Render:: Material Assignment Id" + } + }, + { + "typeid": "{03AAAB3F-5C47-5A66-9EBC-D5FA4DB353C9}", + "details": { + "name": "AZ Std::string" + } + } + ], + "results": [ + { + "typeid": "{8379EB7D-01FA-4538-B64B-A6543B4BE73D}", + "details": { + "name": "Vector 3" + } + } + ] + }, + { + "base": "ClearDefaultMaterialOverride", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Clear Default Material Override" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Clear Default Material Override is invoked" + }, + "details": { + "name": "Clear Default Material Override" + } + }, + { + "base": "SetPropertyOverrideColor", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Set Property Override Color" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Set Property Override Color is invoked" + }, + "details": { + "name": "Set Property Override Color" + }, + "params": [ + { + "typeid": "{EB603581-4654-4C17-B6DE-AE61E79EDA97}", + "details": { + "name": "AZ:: Render:: Material Assignment Id" + } + }, + { + "typeid": "{03AAAB3F-5C47-5A66-9EBC-D5FA4DB353C9}", + "details": { + "name": "AZ Std::string" + } + }, + { + "typeid": "{7894072A-9050-4F0F-901B-34B1A0D29417}", + "details": { + "name": "Color" + } + } + ] + }, + { + "base": "SetMaterialOverride", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Set Material Override" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Set Material Override is invoked" + }, + "details": { + "name": "Set Material Override" + }, + "params": [ + { + "typeid": "{EB603581-4654-4C17-B6DE-AE61E79EDA97}", + "details": { + "name": "AZ:: Render:: Material Assignment Id" + } + }, + { + "typeid": "{652ED536-3402-439B-AEBE-4A5DBC554085}", + "details": { + "name": "Asset Id" + } + } + ] + }, + { + "base": "GetPropertyOverrideFloat", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Get Property Override Float" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Get Property Override Float is invoked" + }, + "details": { + "name": "Get Property Override Float" + }, + "params": [ + { + "typeid": "{EB603581-4654-4C17-B6DE-AE61E79EDA97}", + "details": { + "name": "AZ:: Render:: Material Assignment Id" + } + }, + { + "typeid": "{03AAAB3F-5C47-5A66-9EBC-D5FA4DB353C9}", + "details": { + "name": "AZ Std::string" + } + } + ], + "results": [ + { + "typeid": "{EA2C3E90-AFBE-44D4-A90D-FAAF79BAF93D}", + "details": { + "name": "float" + } + } + ] + } + ] + } + ] +} \ No newline at end of file diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/EBus/Senders/MetastreamRequestBus.names b/Gems/ScriptCanvas/Assets/TranslationAssets/EBus/Senders/MetastreamRequestBus.names new file mode 100644 index 0000000000..93acae35d7 --- /dev/null +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/EBus/Senders/MetastreamRequestBus.names @@ -0,0 +1,883 @@ +{ + "entries": [ + { + "base": "MetastreamRequestBus", + "context": "EBusSender", + "variant": "", + "details": { + "name": "Metastream" + }, + "methods": [ + { + "base": "AddDoubleToArray", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Add Double To Array" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Add Double To Array is invoked" + }, + "details": { + "name": "Add Double To Array" + }, + "params": [ + { + "typeid": "{3AB0037F-AF8D-48CE-BCA0-A170D18B2C03}", + "details": { + "name": "char" + } + }, + { + "typeid": "{3AB0037F-AF8D-48CE-BCA0-A170D18B2C03}", + "details": { + "name": "char" + } + }, + { + "typeid": "{110C4B14-11A8-4E9D-8638-5051013A56AC}", + "details": { + "name": "double" + } + } + ] + }, + { + "base": "AddEntityIdToArray", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Add Entity Id To Array" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Add Entity Id To Array is invoked" + }, + "details": { + "name": "Add Entity Id To Array" + }, + "params": [ + { + "typeid": "{3AB0037F-AF8D-48CE-BCA0-A170D18B2C03}", + "details": { + "name": "char" + } + }, + { + "typeid": "{3AB0037F-AF8D-48CE-BCA0-A170D18B2C03}", + "details": { + "name": "char" + } + }, + { + "typeid": "{6383F1D3-BB27-4E6B-A49A-6409B2059EAA}", + "details": { + "name": "Entity Id", + "tooltip": "Entity Unique Id" + } + } + ] + }, + { + "base": "AddStringToArray", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Add String To Array" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Add String To Array is invoked" + }, + "details": { + "name": "Add String To Array" + }, + "params": [ + { + "typeid": "{3AB0037F-AF8D-48CE-BCA0-A170D18B2C03}", + "details": { + "name": "char" + } + }, + { + "typeid": "{3AB0037F-AF8D-48CE-BCA0-A170D18B2C03}", + "details": { + "name": "char" + } + }, + { + "typeid": "{3AB0037F-AF8D-48CE-BCA0-A170D18B2C03}", + "details": { + "name": "char" + } + } + ] + }, + { + "base": "AddStringToObject", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Add String To Object" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Add String To Object is invoked" + }, + "details": { + "name": "Add String To Object" + }, + "params": [ + { + "typeid": "{3AB0037F-AF8D-48CE-BCA0-A170D18B2C03}", + "details": { + "name": "char" + } + }, + { + "typeid": "{3AB0037F-AF8D-48CE-BCA0-A170D18B2C03}", + "details": { + "name": "char" + } + }, + { + "typeid": "{3AB0037F-AF8D-48CE-BCA0-A170D18B2C03}", + "details": { + "name": "char" + } + }, + { + "typeid": "{3AB0037F-AF8D-48CE-BCA0-A170D18B2C03}", + "details": { + "name": "char" + } + } + ] + }, + { + "base": "AddSigned64ToCache", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Add Signed 64 To Cache" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Add Signed 64 To Cache is invoked" + }, + "details": { + "name": "Add Signed 64 To Cache" + }, + "params": [ + { + "typeid": "{3AB0037F-AF8D-48CE-BCA0-A170D18B2C03}", + "details": { + "name": "char" + } + }, + { + "typeid": "{3AB0037F-AF8D-48CE-BCA0-A170D18B2C03}", + "details": { + "name": "char" + } + }, + { + "typeid": "{70D8A282-A1EA-462D-9D04-51EDE81FAC2F}", + "details": { + "name": "AZ::s 64" + } + } + ] + }, + { + "base": "AddUnsigned64ToArray", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Add Unsigned 64 To Array" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Add Unsigned 64 To Array is invoked" + }, + "details": { + "name": "Add Unsigned 64 To Array" + }, + "params": [ + { + "typeid": "{3AB0037F-AF8D-48CE-BCA0-A170D18B2C03}", + "details": { + "name": "char" + } + }, + { + "typeid": "{3AB0037F-AF8D-48CE-BCA0-A170D18B2C03}", + "details": { + "name": "char" + } + }, + { + "typeid": "{D6597933-47CD-4FC8-B911-63F3E2B0993A}", + "details": { + "name": "AZ::u 64" + } + } + ] + }, + { + "base": "AddSigned64ToObject", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Add Signed 64 To Object" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Add Signed 64 To Object is invoked" + }, + "details": { + "name": "Add Signed 64 To Object" + }, + "params": [ + { + "typeid": "{3AB0037F-AF8D-48CE-BCA0-A170D18B2C03}", + "details": { + "name": "char" + } + }, + { + "typeid": "{3AB0037F-AF8D-48CE-BCA0-A170D18B2C03}", + "details": { + "name": "char" + } + }, + { + "typeid": "{3AB0037F-AF8D-48CE-BCA0-A170D18B2C03}", + "details": { + "name": "char" + } + }, + { + "typeid": "{70D8A282-A1EA-462D-9D04-51EDE81FAC2F}", + "details": { + "name": "AZ::s 64" + } + } + ] + }, + { + "base": "AddUnsigned64ToCache", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Add Unsigned 64 To Cache" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Add Unsigned 64 To Cache is invoked" + }, + "details": { + "name": "Add Unsigned 64 To Cache" + }, + "params": [ + { + "typeid": "{3AB0037F-AF8D-48CE-BCA0-A170D18B2C03}", + "details": { + "name": "char" + } + }, + { + "typeid": "{3AB0037F-AF8D-48CE-BCA0-A170D18B2C03}", + "details": { + "name": "char" + } + }, + { + "typeid": "{D6597933-47CD-4FC8-B911-63F3E2B0993A}", + "details": { + "name": "AZ::u 64" + } + } + ] + }, + { + "base": "AddStringToCache", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Add String To Cache" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Add String To Cache is invoked" + }, + "details": { + "name": "Add String To Cache" + }, + "params": [ + { + "typeid": "{3AB0037F-AF8D-48CE-BCA0-A170D18B2C03}", + "details": { + "name": "char" + } + }, + { + "typeid": "{3AB0037F-AF8D-48CE-BCA0-A170D18B2C03}", + "details": { + "name": "char" + } + }, + { + "typeid": "{3AB0037F-AF8D-48CE-BCA0-A170D18B2C03}", + "details": { + "name": "char" + } + } + ] + }, + { + "base": "AddBoolToCache", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Add Bool To Cache" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Add Bool To Cache is invoked" + }, + "details": { + "name": "Add Bool To Cache" + }, + "params": [ + { + "typeid": "{3AB0037F-AF8D-48CE-BCA0-A170D18B2C03}", + "details": { + "name": "char" + } + }, + { + "typeid": "{3AB0037F-AF8D-48CE-BCA0-A170D18B2C03}", + "details": { + "name": "char" + } + }, + { + "typeid": "{A0CA880C-AFE4-43CB-926C-59AC48496112}", + "details": { + "name": "bool" + } + } + ] + }, + { + "base": "AddDoubleToCache", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Add Double To Cache" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Add Double To Cache is invoked" + }, + "details": { + "name": "Add Double To Cache" + }, + "params": [ + { + "typeid": "{3AB0037F-AF8D-48CE-BCA0-A170D18B2C03}", + "details": { + "name": "char" + } + }, + { + "typeid": "{3AB0037F-AF8D-48CE-BCA0-A170D18B2C03}", + "details": { + "name": "char" + } + }, + { + "typeid": "{110C4B14-11A8-4E9D-8638-5051013A56AC}", + "details": { + "name": "double" + } + } + ] + }, + { + "base": "AddArrayToObject", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Add Array To Object" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Add Array To Object is invoked" + }, + "details": { + "name": "Add Array To Object" + }, + "params": [ + { + "typeid": "{3AB0037F-AF8D-48CE-BCA0-A170D18B2C03}", + "details": { + "name": "char" + } + }, + { + "typeid": "{3AB0037F-AF8D-48CE-BCA0-A170D18B2C03}", + "details": { + "name": "char" + } + }, + { + "typeid": "{3AB0037F-AF8D-48CE-BCA0-A170D18B2C03}", + "details": { + "name": "char" + } + }, + { + "typeid": "{3AB0037F-AF8D-48CE-BCA0-A170D18B2C03}", + "details": { + "name": "char" + } + } + ] + }, + { + "base": "AddObjectToObject", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Add Object To Object" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Add Object To Object is invoked" + }, + "details": { + "name": "Add Object To Object" + }, + "params": [ + { + "typeid": "{3AB0037F-AF8D-48CE-BCA0-A170D18B2C03}", + "details": { + "name": "char" + } + }, + { + "typeid": "{3AB0037F-AF8D-48CE-BCA0-A170D18B2C03}", + "details": { + "name": "char" + } + }, + { + "typeid": "{3AB0037F-AF8D-48CE-BCA0-A170D18B2C03}", + "details": { + "name": "char" + } + }, + { + "typeid": "{3AB0037F-AF8D-48CE-BCA0-A170D18B2C03}", + "details": { + "name": "char" + } + } + ] + }, + { + "base": "AddBoolToArray", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Add Bool To Array" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Add Bool To Array is invoked" + }, + "details": { + "name": "Add Bool To Array" + }, + "params": [ + { + "typeid": "{3AB0037F-AF8D-48CE-BCA0-A170D18B2C03}", + "details": { + "name": "char" + } + }, + { + "typeid": "{3AB0037F-AF8D-48CE-BCA0-A170D18B2C03}", + "details": { + "name": "char" + } + }, + { + "typeid": "{A0CA880C-AFE4-43CB-926C-59AC48496112}", + "details": { + "name": "bool" + } + } + ] + }, + { + "base": "AddBoolToObject", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Add Bool To Object" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Add Bool To Object is invoked" + }, + "details": { + "name": "Add Bool To Object" + }, + "params": [ + { + "typeid": "{3AB0037F-AF8D-48CE-BCA0-A170D18B2C03}", + "details": { + "name": "char" + } + }, + { + "typeid": "{3AB0037F-AF8D-48CE-BCA0-A170D18B2C03}", + "details": { + "name": "char" + } + }, + { + "typeid": "{3AB0037F-AF8D-48CE-BCA0-A170D18B2C03}", + "details": { + "name": "char" + } + }, + { + "typeid": "{A0CA880C-AFE4-43CB-926C-59AC48496112}", + "details": { + "name": "bool" + } + } + ] + }, + { + "base": "AddEntityIdToObject", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Add Entity Id To Object" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Add Entity Id To Object is invoked" + }, + "details": { + "name": "Add Entity Id To Object" + }, + "params": [ + { + "typeid": "{3AB0037F-AF8D-48CE-BCA0-A170D18B2C03}", + "details": { + "name": "char" + } + }, + { + "typeid": "{3AB0037F-AF8D-48CE-BCA0-A170D18B2C03}", + "details": { + "name": "char" + } + }, + { + "typeid": "{3AB0037F-AF8D-48CE-BCA0-A170D18B2C03}", + "details": { + "name": "char" + } + }, + { + "typeid": "{6383F1D3-BB27-4E6B-A49A-6409B2059EAA}", + "details": { + "name": "Entity Id", + "tooltip": "Entity Unique Id" + } + } + ] + }, + { + "base": "StopHTTPServer", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke StopHTTP Server" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after StopHTTP Server is invoked" + }, + "details": { + "name": "StopHTTP Server" + } + }, + { + "base": "AddEntityIdToCache", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Add Entity Id To Cache" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Add Entity Id To Cache is invoked" + }, + "details": { + "name": "Add Entity Id To Cache" + }, + "params": [ + { + "typeid": "{3AB0037F-AF8D-48CE-BCA0-A170D18B2C03}", + "details": { + "name": "char" + } + }, + { + "typeid": "{3AB0037F-AF8D-48CE-BCA0-A170D18B2C03}", + "details": { + "name": "char" + } + }, + { + "typeid": "{6383F1D3-BB27-4E6B-A49A-6409B2059EAA}", + "details": { + "name": "Entity Id", + "tooltip": "Entity Unique Id" + } + } + ] + }, + { + "base": "AddArrayToCache", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Add Array To Cache" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Add Array To Cache is invoked" + }, + "details": { + "name": "Add Array To Cache" + }, + "params": [ + { + "typeid": "{3AB0037F-AF8D-48CE-BCA0-A170D18B2C03}", + "details": { + "name": "char" + } + }, + { + "typeid": "{3AB0037F-AF8D-48CE-BCA0-A170D18B2C03}", + "details": { + "name": "char" + } + }, + { + "typeid": "{3AB0037F-AF8D-48CE-BCA0-A170D18B2C03}", + "details": { + "name": "char" + } + } + ] + }, + { + "base": "AddObjectToCache", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Add Object To Cache" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Add Object To Cache is invoked" + }, + "details": { + "name": "Add Object To Cache" + }, + "params": [ + { + "typeid": "{3AB0037F-AF8D-48CE-BCA0-A170D18B2C03}", + "details": { + "name": "char" + } + }, + { + "typeid": "{3AB0037F-AF8D-48CE-BCA0-A170D18B2C03}", + "details": { + "name": "char" + } + }, + { + "typeid": "{3AB0037F-AF8D-48CE-BCA0-A170D18B2C03}", + "details": { + "name": "char" + } + } + ] + }, + { + "base": "AddUnsigned64ToObject", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Add Unsigned 64 To Object" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Add Unsigned 64 To Object is invoked" + }, + "details": { + "name": "Add Unsigned 64 To Object" + }, + "params": [ + { + "typeid": "{3AB0037F-AF8D-48CE-BCA0-A170D18B2C03}", + "details": { + "name": "char" + } + }, + { + "typeid": "{3AB0037F-AF8D-48CE-BCA0-A170D18B2C03}", + "details": { + "name": "char" + } + }, + { + "typeid": "{3AB0037F-AF8D-48CE-BCA0-A170D18B2C03}", + "details": { + "name": "char" + } + }, + { + "typeid": "{D6597933-47CD-4FC8-B911-63F3E2B0993A}", + "details": { + "name": "AZ::u 64" + } + } + ] + }, + { + "base": "StartHTTPServer", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke StartHTTP Server" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after StartHTTP Server is invoked" + }, + "details": { + "name": "StartHTTP Server" + }, + "results": [ + { + "typeid": "{A0CA880C-AFE4-43CB-926C-59AC48496112}", + "details": { + "name": "bool" + } + } + ] + }, + { + "base": "AddObjectToArray", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Add Object To Array" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Add Object To Array is invoked" + }, + "details": { + "name": "Add Object To Array" + }, + "params": [ + { + "typeid": "{3AB0037F-AF8D-48CE-BCA0-A170D18B2C03}", + "details": { + "name": "char" + } + }, + { + "typeid": "{3AB0037F-AF8D-48CE-BCA0-A170D18B2C03}", + "details": { + "name": "char" + } + }, + { + "typeid": "{3AB0037F-AF8D-48CE-BCA0-A170D18B2C03}", + "details": { + "name": "char" + } + } + ] + }, + { + "base": "AddSigned64ToArray", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Add Signed 64 To Array" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Add Signed 64 To Array is invoked" + }, + "details": { + "name": "Add Signed 64 To Array" + }, + "params": [ + { + "typeid": "{3AB0037F-AF8D-48CE-BCA0-A170D18B2C03}", + "details": { + "name": "char" + } + }, + { + "typeid": "{3AB0037F-AF8D-48CE-BCA0-A170D18B2C03}", + "details": { + "name": "char" + } + }, + { + "typeid": "{70D8A282-A1EA-462D-9D04-51EDE81FAC2F}", + "details": { + "name": "AZ::s 64" + } + } + ] + }, + { + "base": "AddDoubleToObject", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Add Double To Object" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Add Double To Object is invoked" + }, + "details": { + "name": "Add Double To Object" + }, + "params": [ + { + "typeid": "{3AB0037F-AF8D-48CE-BCA0-A170D18B2C03}", + "details": { + "name": "char" + } + }, + { + "typeid": "{3AB0037F-AF8D-48CE-BCA0-A170D18B2C03}", + "details": { + "name": "char" + } + }, + { + "typeid": "{3AB0037F-AF8D-48CE-BCA0-A170D18B2C03}", + "details": { + "name": "char" + } + }, + { + "typeid": "{110C4B14-11A8-4E9D-8638-5051013A56AC}", + "details": { + "name": "double" + } + } + ] + } + ] + } + ] +} \ No newline at end of file diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/EBus/Senders/MixedGradientRequestBus.names b/Gems/ScriptCanvas/Assets/TranslationAssets/EBus/Senders/MixedGradientRequestBus.names new file mode 100644 index 0000000000..f20f3359af --- /dev/null +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/EBus/Senders/MixedGradientRequestBus.names @@ -0,0 +1,102 @@ +{ + "entries": [ + { + "base": "MixedGradientRequestBus", + "context": "EBusSender", + "variant": "", + "details": { + "name": "Mixed Gradient" + }, + "methods": [ + { + "base": "GetNumLayers", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke GetNumLayers" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after GetNumLayers is invoked" + }, + "details": { + "name": "GetNumLayers" + }, + "results": [ + { + "typeid": "{D6597933-47CD-4FC8-B911-63F3E2B0993A}", + "details": { + "name": "AZ::u64" + } + } + ] + }, + { + "base": "AddLayer", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke AddLayer" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after AddLayer is invoked" + }, + "details": { + "name": "AddLayer" + } + }, + { + "base": "RemoveLayer", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke RemoveLayer" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after RemoveLayer is invoked" + }, + "details": { + "name": "RemoveLayer" + }, + "params": [ + { + "typeid": "{72039442-EB38-4D42-A1AD-CB68F7E0EEF6}", + "details": { + "name": "int" + } + } + ] + }, + { + "base": "GetLayer", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke GetLayer" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after GetLayer is invoked" + }, + "details": { + "name": "GetLayer" + }, + "params": [ + { + "typeid": "{72039442-EB38-4D42-A1AD-CB68F7E0EEF6}", + "details": { + "name": "int" + } + } + ], + "results": [ + { + "typeid": "{957264F7-A169-4D47-B94C-659B078026D4}", + "details": { + "name": "Mixed Gradient Layer" + } + } + ] + } + ] + } + ] +} \ No newline at end of file diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/EBus/Senders/Multi-Position Audio Requests.names b/Gems/ScriptCanvas/Assets/TranslationAssets/EBus/Senders/Multi-Position Audio Requests.names new file mode 100644 index 0000000000..d30deb459a --- /dev/null +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/EBus/Senders/Multi-Position Audio Requests.names @@ -0,0 +1,83 @@ +{ + "entries": [ + { + "base": "Multi-Position Audio Requests", + "context": "EBusSender", + "variant": "", + "details": { + "name": "Multi-Position Audio Requests" + }, + "methods": [ + { + "base": "Add Entity", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Add Entity" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Add Entity is invoked" + }, + "details": { + "name": "Add Entity" + }, + "params": [ + { + "typeid": "{6383F1D3-BB27-4E6B-A49A-6409B2059EAA}", + "details": { + "name": "Entity Id", + "tooltip": "Entity Unique Id" + } + } + ] + }, + { + "base": "RemoveEntity", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Remove Entity" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Remove Entity is invoked" + }, + "details": { + "name": "Remove Entity" + }, + "params": [ + { + "typeid": "{6383F1D3-BB27-4E6B-A49A-6409B2059EAA}", + "details": { + "name": "Entity Id", + "tooltip": "Entity Unique Id" + } + } + ] + }, + { + "base": "SetBehaviorType", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Set Behavior Type" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Set Behavior Type is invoked" + }, + "details": { + "name": "Set Behavior Type" + }, + "params": [ + { + "typeid": "{72039442-EB38-4D42-A1AD-CB68F7E0EEF6}", + "details": { + "name": "Type", + "tooltip": "0: Separate\n1: Blended" + } + } + ] + } + ] + } + ] +} \ No newline at end of file diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/EBus/Senders/NavigationComponentRequestBus.names b/Gems/ScriptCanvas/Assets/TranslationAssets/EBus/Senders/NavigationComponentRequestBus.names new file mode 100644 index 0000000000..d30f1a0cf6 --- /dev/null +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/EBus/Senders/NavigationComponentRequestBus.names @@ -0,0 +1,191 @@ +{ + "entries": [ + { + "base": "NavigationComponentRequestBus", + "context": "EBusSender", + "variant": "", + "details": { + "name": "Movement", + "category": "Navigation" + }, + "methods": [ + { + "base": "SetAgentSpeed", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Set Agent Speed" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Set Agent Speed is invoked" + }, + "details": { + "name": "Set Agent Speed" + }, + "params": [ + { + "typeid": "{EA2C3E90-AFBE-44D4-A90D-FAAF79BAF93D}", + "details": { + "name": "Speed", + "tooltip": "The agent speed in meters per second" + } + } + ] + }, + { + "base": "SetAgentMovementMethod", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Set Agent Movement Method" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Set Agent Movement Method is invoked" + }, + "details": { + "name": "Set Agent Movement Method" + }, + "params": [ + { + "typeid": "{72039442-EB38-4D42-A1AD-CB68F7E0EEF6}", + "details": { + "name": "Method", + "tooltip": "0: Transform, 1: Physics, 2: Custom" + } + } + ] + }, + { + "base": "GetAgentSpeed", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke GetAgentSpeed" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after GetAgentSpeed is invoked" + }, + "details": { + "name": "Get Agent Speed" + }, + "results": [ + { + "typeid": "{EA2C3E90-AFBE-44D4-A90D-FAAF79BAF93D}", + "details": { + "name": "Speed" + } + } + ] + }, + { + "base": "FindPathToPosition", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Find Path To Position" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Find Path To Position is invoked" + }, + "details": { + "name": "Find Path To Position" + }, + "params": [ + { + "typeid": "{8379EB7D-01FA-4538-B64B-A6543B4BE73D}", + "details": { + "name": "Position", + "tooltip": "The position to navigate to" + } + } + ], + "results": [ + { + "typeid": "{43DA906B-7DEF-4CA8-9790-854106D3F983}", + "details": { + "name": "Request Id" + } + } + ] + }, + { + "base": "Stop", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Stop" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Stop is invoked" + }, + "details": { + "name": "Stop" + }, + "params": [ + { + "typeid": "{43DA906B-7DEF-4CA8-9790-854106D3F983}", + "details": { + "name": "Request Id", + "tooltip": "The request Id of the navigation process to stop" + } + } + ] + }, + { + "base": "FindPathToEntity", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Find Path To Entity" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Find Path To Entity is invoked" + }, + "details": { + "name": "Find Path To Entity" + }, + "params": [ + { + "typeid": "{6383F1D3-BB27-4E6B-A49A-6409B2059EAA}", + "details": { + "name": "Entity Id", + "tooltip": "The entity to follow" + } + } + ], + "results": [ + { + "typeid": "{43DA906B-7DEF-4CA8-9790-854106D3F983}", + "details": { + "name": "Request Id" + } + } + ] + }, + { + "base": "GetAgentMovementMethod", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Get Agent Movement Method" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Get Agent Movement Method is invoked" + }, + "details": { + "name": "Get Agent Movement Method" + }, + "results": [ + { + "typeid": "{72039442-EB38-4D42-A1AD-CB68F7E0EEF6}", + "details": { + "name": "Method", + "tooltip": "0: Transform, 1: Physics, 2: Custom" + } + } + ] + } + ] + } + ] +} \ No newline at end of file diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/EBus/Senders/NetworkCharacterRequestBus.names b/Gems/ScriptCanvas/Assets/TranslationAssets/EBus/Senders/NetworkCharacterRequestBus.names new file mode 100644 index 0000000000..83f7c105c2 --- /dev/null +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/EBus/Senders/NetworkCharacterRequestBus.names @@ -0,0 +1,51 @@ +{ + "entries": [ + { + "base": "NetworkCharacterRequestBus", + "context": "EBusSender", + "variant": "", + "details": { + "name": "Network Character", + "category": "Multiplayer" + }, + "methods": [ + { + "base": "TryMoveWithVelocity", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Try Move With Velocity" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Try Move With Velocity is invoked" + }, + "details": { + "name": "Try Move With Velocity" + }, + "params": [ + { + "typeid": "{8379EB7D-01FA-4538-B64B-A6543B4BE73D}", + "details": { + "name": "Velocity" + } + }, + { + "typeid": "{EA2C3E90-AFBE-44D4-A90D-FAAF79BAF93D}", + "details": { + "name": "Delta Time" + } + } + ], + "results": [ + { + "typeid": "{8379EB7D-01FA-4538-B64B-A6543B4BE73D}", + "details": { + "name": "Position" + } + } + ] + } + ] + } + ] +} \ No newline at end of file diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/EBus/Senders/NonUniformScaleRequestBus.names b/Gems/ScriptCanvas/Assets/TranslationAssets/EBus/Senders/NonUniformScaleRequestBus.names new file mode 100644 index 0000000000..ac540f94df --- /dev/null +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/EBus/Senders/NonUniformScaleRequestBus.names @@ -0,0 +1,58 @@ +{ + "entries": [ + { + "base": "NonUniformScaleRequestBus", + "context": "EBusSender", + "variant": "", + "details": { + "name": "Non Uniform Scale" + }, + "methods": [ + { + "base": "GetScale", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Get Scale" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Get Scale is invoked" + }, + "details": { + "name": "Get Scale" + }, + "results": [ + { + "typeid": "{8379EB7D-01FA-4538-B64B-A6543B4BE73D}", + "details": { + "name": "Scale" + } + } + ] + }, + { + "base": "SetScale", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Set Scale" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Set Scale is invoked" + }, + "details": { + "name": "Set Scale" + }, + "params": [ + { + "typeid": "{8379EB7D-01FA-4538-B64B-A6543B4BE73D}", + "details": { + "name": "Scale" + } + } + ] + } + ] + } + ] +} \ No newline at end of file diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/EBus/Senders/PerformanceStatisticsEBus.names b/Gems/ScriptCanvas/Assets/TranslationAssets/EBus/Senders/PerformanceStatisticsEBus.names new file mode 100644 index 0000000000..d4d98c8d57 --- /dev/null +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/EBus/Senders/PerformanceStatisticsEBus.names @@ -0,0 +1,92 @@ +{ + "entries": [ + { + "base": "PerformanceStatisticsEBus", + "context": "EBusSender", + "variant": "", + "details": { + "name": "Performance Statistics EBus" + }, + "methods": [ + { + "base": "TrackPerFrameStop", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke TrackPerFrameStop" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after TrackPerFrameStop is invoked" + }, + "details": { + "name": "TrackPerFrameStop" + } + }, + { + "base": "TrackPerFrameStart", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke TrackPerFrameStart" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after TrackPerFrameStart is invoked" + }, + "details": { + "name": "TrackPerFrameStart" + } + }, + { + "base": "TrackAccumulatedStart", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke TrackAccumulatedStart" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after TrackAccumulatedStart is invoked" + }, + "details": { + "name": "TrackAccumulatedStart" + }, + "params": [ + { + "typeid": "{72039442-EB38-4D42-A1AD-CB68F7E0EEF6}", + "details": { + "name": "int" + } + } + ] + }, + { + "base": "TrackAccumulatedStop", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke TrackAccumulatedStop" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after TrackAccumulatedStop is invoked" + }, + "details": { + "name": "TrackAccumulatedStop" + } + }, + { + "base": "ClearSnaphotStatistics", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke ClearSnaphotStatistics" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after ClearSnaphotStatistics is invoked" + }, + "details": { + "name": "ClearSnaphotStatistics" + } + } + ] + } + ] +} \ No newline at end of file diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/EBus/Senders/PerlinGradientRequestBus.names b/Gems/ScriptCanvas/Assets/TranslationAssets/EBus/Senders/PerlinGradientRequestBus.names new file mode 100644 index 0000000000..ab568ed21d --- /dev/null +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/EBus/Senders/PerlinGradientRequestBus.names @@ -0,0 +1,190 @@ +{ + "entries": [ + { + "base": "PerlinGradientRequestBus", + "context": "EBusSender", + "variant": "", + "details": { + "name": "Perlin Gradient" + }, + "methods": [ + { + "base": "SetOctaves", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke SetOctaves" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after SetOctaves is invoked" + }, + "details": { + "name": "SetOctaves" + }, + "params": [ + { + "typeid": "{72039442-EB38-4D42-A1AD-CB68F7E0EEF6}", + "details": { + "name": "int" + } + } + ] + }, + { + "base": "GetFrequency", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke GetFrequency" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after GetFrequency is invoked" + }, + "details": { + "name": "GetFrequency" + }, + "results": [ + { + "typeid": "{EA2C3E90-AFBE-44D4-A90D-FAAF79BAF93D}", + "details": { + "name": "float" + } + } + ] + }, + { + "base": "GetOctaves", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke GetOctaves" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after GetOctaves is invoked" + }, + "details": { + "name": "GetOctaves" + }, + "results": [ + { + "typeid": "{72039442-EB38-4D42-A1AD-CB68F7E0EEF6}", + "details": { + "name": "int" + } + } + ] + }, + { + "base": "SetFrequency", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke SetFrequency" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after SetFrequency is invoked" + }, + "details": { + "name": "SetFrequency" + }, + "params": [ + { + "typeid": "{EA2C3E90-AFBE-44D4-A90D-FAAF79BAF93D}", + "details": { + "name": "float" + } + } + ] + }, + { + "base": "SetAmplitude", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke SetAmplitude" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after SetAmplitude is invoked" + }, + "details": { + "name": "SetAmplitude" + }, + "params": [ + { + "typeid": "{EA2C3E90-AFBE-44D4-A90D-FAAF79BAF93D}", + "details": { + "name": "float" + } + } + ] + }, + { + "base": "GetAmplitude", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke GetAmplitude" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after GetAmplitude is invoked" + }, + "details": { + "name": "GetAmplitude" + }, + "results": [ + { + "typeid": "{EA2C3E90-AFBE-44D4-A90D-FAAF79BAF93D}", + "details": { + "name": "float" + } + } + ] + }, + { + "base": "GetRandomSeed", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke GetRandomSeed" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after GetRandomSeed is invoked" + }, + "details": { + "name": "GetRandomSeed" + }, + "results": [ + { + "typeid": "{72039442-EB38-4D42-A1AD-CB68F7E0EEF6}", + "details": { + "name": "int" + } + } + ] + }, + { + "base": "SetRandomSeed", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke SetRandomSeed" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after SetRandomSeed is invoked" + }, + "details": { + "name": "SetRandomSeed" + }, + "params": [ + { + "typeid": "{72039442-EB38-4D42-A1AD-CB68F7E0EEF6}", + "details": { + "name": "int" + } + } + ] + } + ] + } + ] +} \ No newline at end of file diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/EBus/Senders/PhysXCharacterControllerRequestBus.names b/Gems/ScriptCanvas/Assets/TranslationAssets/EBus/Senders/PhysXCharacterControllerRequestBus.names new file mode 100644 index 0000000000..dfec47011a --- /dev/null +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/EBus/Senders/PhysXCharacterControllerRequestBus.names @@ -0,0 +1,212 @@ +{ + "entries": [ + { + "base": "PhysXCharacterControllerRequestBus", + "context": "EBusSender", + "variant": "", + "details": { + "name": "Character Controller" + }, + "methods": [ + { + "base": "GetHalfForwardExtent", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Get Half Forward Extent" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Get Half Forward Extent is invoked" + }, + "details": { + "name": "Get Half Forward Extent" + }, + "results": [ + { + "typeid": "{EA2C3E90-AFBE-44D4-A90D-FAAF79BAF93D}", + "details": { + "name": "Half Forward Extent" + } + } + ] + }, + { + "base": "GetRadius", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Get Radius" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Get Radius is invoked" + }, + "details": { + "name": "Get Radius" + }, + "results": [ + { + "typeid": "{EA2C3E90-AFBE-44D4-A90D-FAAF79BAF93D}", + "details": { + "name": "Radius" + } + } + ] + }, + { + "base": "SetRadius", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Set Radius" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Set Radius is invoked" + }, + "details": { + "name": "Set Radius" + }, + "params": [ + { + "typeid": "{EA2C3E90-AFBE-44D4-A90D-FAAF79BAF93D}", + "details": { + "name": "Radius" + } + } + ] + }, + { + "base": "SetHalfForwardExtent", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Set Half Forward Extent" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Set Half Forward Extent is invoked" + }, + "details": { + "name": "Set Half Forward Extent" + }, + "params": [ + { + "typeid": "{EA2C3E90-AFBE-44D4-A90D-FAAF79BAF93D}", + "details": { + "name": "Half Forward Extent" + } + } + ] + }, + { + "base": "SetHeight", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Set Height" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Set Height is invoked" + }, + "details": { + "name": "Set Height" + }, + "params": [ + { + "typeid": "{EA2C3E90-AFBE-44D4-A90D-FAAF79BAF93D}", + "details": { + "name": "Height" + } + } + ] + }, + { + "base": "GetHalfSideExtent", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Get Half Side Extent" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Get Half Side Extent is invoked" + }, + "details": { + "name": "Get Half Side Extent" + }, + "results": [ + { + "typeid": "{EA2C3E90-AFBE-44D4-A90D-FAAF79BAF93D}", + "details": { + "name": "Half Side Extent" + } + } + ] + }, + { + "base": "GetHeight", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Get Height" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Get Height is invoked" + }, + "details": { + "name": "Get Height" + }, + "results": [ + { + "typeid": "{EA2C3E90-AFBE-44D4-A90D-FAAF79BAF93D}", + "details": { + "name": "Height" + } + } + ] + }, + { + "base": "Resize", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Resize" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Resize is invoked" + }, + "details": { + "name": "Resize" + }, + "params": [ + { + "typeid": "{EA2C3E90-AFBE-44D4-A90D-FAAF79BAF93D}", + "details": { + "name": "Size" + } + } + ] + }, + { + "base": "SetHalfSideExtent", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Set Half Side Extent" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Set Half Side Extent is invoked" + }, + "details": { + "name": "Set Half Side Extent" + }, + "params": [ + { + "typeid": "{EA2C3E90-AFBE-44D4-A90D-FAAF79BAF93D}", + "details": { + "name": "Half Side Extent" + } + } + ] + } + ] + } + ] +} \ No newline at end of file diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/EBus/Senders/PhysicalSkyRequestBus.names b/Gems/ScriptCanvas/Assets/TranslationAssets/EBus/Senders/PhysicalSkyRequestBus.names new file mode 100644 index 0000000000..31500b0762 --- /dev/null +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/EBus/Senders/PhysicalSkyRequestBus.names @@ -0,0 +1,191 @@ +{ + "entries": [ + { + "base": "PhysicalSkyRequestBus", + "context": "EBusSender", + "variant": "", + "details": { + "name": "Physical Sky", + "category": "Rendering" + }, + "methods": [ + { + "base": "SetSkyIntensity", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Set Sky Intensity" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Set Sky Intensity is invoked" + }, + "details": { + "name": "Set Sky Intensity" + }, + "params": [ + { + "typeid": "{EA2C3E90-AFBE-44D4-A90D-FAAF79BAF93D}", + "details": { + "name": "float" + } + } + ] + }, + { + "base": "SetSunIntensity", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Set Sun Intensity" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Set Sun Intensity is invoked" + }, + "details": { + "name": "Set Sun Intensity" + }, + "params": [ + { + "typeid": "{EA2C3E90-AFBE-44D4-A90D-FAAF79BAF93D}", + "details": { + "name": "float" + } + } + ] + }, + { + "base": "GetSunIntensity", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Get Sun Intensity" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Get Sun Intensity is invoked" + }, + "details": { + "name": "Get Sun Intensity" + }, + "results": [ + { + "typeid": "{EA2C3E90-AFBE-44D4-A90D-FAAF79BAF93D}", + "details": { + "name": "float" + } + } + ] + }, + { + "base": "GetSunRadiusFactor", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Get Sun Radius Factor" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Get Sun Radius Factor is invoked" + }, + "details": { + "name": "Get Sun Radius Factor" + }, + "results": [ + { + "typeid": "{EA2C3E90-AFBE-44D4-A90D-FAAF79BAF93D}", + "details": { + "name": "float" + } + } + ] + }, + { + "base": "SetSunRadiusFactor", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Set Sun Radius Factor" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Set Sun Radius Factor is invoked" + }, + "details": { + "name": "Set Sun Radius Factor" + }, + "params": [ + { + "typeid": "{EA2C3E90-AFBE-44D4-A90D-FAAF79BAF93D}", + "details": { + "name": "float" + } + } + ] + }, + { + "base": "GetTurbidity", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Get Turbidity" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Get Turbidity is invoked" + }, + "details": { + "name": "Get Turbidity" + }, + "results": [ + { + "typeid": "{72039442-EB38-4D42-A1AD-CB68F7E0EEF6}", + "details": { + "name": "int" + } + } + ] + }, + { + "base": "GetSkyIntensity", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Get Sky Intensity" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Get Sky Intensity is invoked" + }, + "details": { + "name": "Get Sky Intensity" + }, + "results": [ + { + "typeid": "{EA2C3E90-AFBE-44D4-A90D-FAAF79BAF93D}", + "details": { + "name": "float" + } + } + ] + }, + { + "base": "SetTurbidity", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Set Turbidity" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Set Turbidity is invoked" + }, + "details": { + "name": "Set Turbidity" + }, + "params": [ + { + "typeid": "{72039442-EB38-4D42-A1AD-CB68F7E0EEF6}", + "details": { + "name": "int" + } + } + ] + } + ] + } + ] +} \ No newline at end of file diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/EBus/Senders/PolygonPrismShapeComponentRequestBus.names b/Gems/ScriptCanvas/Assets/TranslationAssets/EBus/Senders/PolygonPrismShapeComponentRequestBus.names new file mode 100644 index 0000000000..c8beed2423 --- /dev/null +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/EBus/Senders/PolygonPrismShapeComponentRequestBus.names @@ -0,0 +1,196 @@ +{ + "entries": [ + { + "base": "PolygonPrismShapeComponentRequestBus", + "context": "EBusSender", + "variant": "", + "details": { + "name": "Polygon Prism" + }, + "methods": [ + { + "base": "ClearVertices", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke ClearVertices" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after ClearVertices is invoked" + }, + "details": { + "name": "Clear Vertices" + } + }, + { + "base": "InsertVertex", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke InsertVertex" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after InsertVertex is invoked" + }, + "details": { + "name": "Insert Vertex" + }, + "params": [ + { + "typeid": "{D6597933-47CD-4FC8-B911-63F3E2B0993A}", + "details": { + "name": "Index" + } + }, + { + "typeid": "{3D80F623-C85C-4741-90D0-E4E66164E6BF}", + "details": { + "name": "Vertex" + } + } + ], + "results": [ + { + "typeid": "{A0CA880C-AFE4-43CB-926C-59AC48496112}", + "details": { + "name": "Inserted" + } + } + ] + }, + { + "base": "UpdateVertex", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke UpdateVertex" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after UpdateVertex is invoked" + }, + "details": { + "name": "Update Vertex" + }, + "params": [ + { + "typeid": "{D6597933-47CD-4FC8-B911-63F3E2B0993A}", + "details": { + "name": "Index" + } + }, + { + "typeid": "{3D80F623-C85C-4741-90D0-E4E66164E6BF}", + "details": { + "name": "Vertex" + } + } + ], + "results": [ + { + "typeid": "{A0CA880C-AFE4-43CB-926C-59AC48496112}", + "details": { + "name": "Updated" + } + } + ] + }, + { + "base": "AddVertex", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke AddVertex" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after AddVertex is invoked" + }, + "details": { + "name": "Add Vertex" + }, + "params": [ + { + "typeid": "{3D80F623-C85C-4741-90D0-E4E66164E6BF}", + "details": { + "name": "Vertex" + } + } + ] + }, + { + "base": "GetPolygonPrism", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke GetPolygonPrism" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after GetPolygonPrism is invoked" + }, + "details": { + "name": "Get Polygon Prism" + }, + "results": [ + { + "typeid": "{2E879A16-9143-5862-A5B3-EDED931C60BC}", + "details": { + "name": "Polygon Prism" + } + } + ] + }, + { + "base": "SetHeight", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke SetHeight" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after SetHeight is invoked" + }, + "details": { + "name": "Set Height" + }, + "params": [ + { + "typeid": "{EA2C3E90-AFBE-44D4-A90D-FAAF79BAF93D}", + "details": { + "name": "Height" + } + } + ] + }, + { + "base": "RemoveVertex", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke RemoveVertex" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after RemoveVertex is invoked" + }, + "details": { + "name": "Remove Vertex" + }, + "params": [ + { + "typeid": "{D6597933-47CD-4FC8-B911-63F3E2B0993A}", + "details": { + "name": "Index" + } + } + ], + "results": [ + { + "typeid": "{A0CA880C-AFE4-43CB-926C-59AC48496112}", + "details": { + "name": "Removed" + } + } + ] + } + ] + } + ] +} \ No newline at end of file diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/EBus/Senders/PostFxLayerRequestBus.names b/Gems/ScriptCanvas/Assets/TranslationAssets/EBus/Senders/PostFxLayerRequestBus.names new file mode 100644 index 0000000000..d58a8a419c --- /dev/null +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/EBus/Senders/PostFxLayerRequestBus.names @@ -0,0 +1,103 @@ +{ + "entries": [ + { + "base": "PostFxLayerRequestBus", + "context": "EBusSender", + "variant": "", + "details": { + "name": "Post Fx Layer", + "category": "Rendering" + }, + "methods": [ + { + "base": "SetPriority", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Set Priority" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Set Priority is invoked" + }, + "details": { + "name": "Set Priority" + }, + "params": [ + { + "typeid": "{43DA906B-7DEF-4CA8-9790-854106D3F983}", + "details": { + "name": "unsigned int" + } + } + ] + }, + { + "base": "GetPriority", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Get Priority" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Get Priority is invoked" + }, + "details": { + "name": "Get Priority" + }, + "results": [ + { + "typeid": "{43DA906B-7DEF-4CA8-9790-854106D3F983}", + "details": { + "name": "unsigned int" + } + } + ] + }, + { + "base": "SetOverrideFactor", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Set Override Factor" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Set Override Factor is invoked" + }, + "details": { + "name": "Set Override Factor" + }, + "params": [ + { + "typeid": "{EA2C3E90-AFBE-44D4-A90D-FAAF79BAF93D}", + "details": { + "name": "float" + } + } + ] + }, + { + "base": "GetOverrideFactor", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Get Override Factor" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Get Override Factor is invoked" + }, + "details": { + "name": "Get Override Factor" + }, + "results": [ + { + "typeid": "{EA2C3E90-AFBE-44D4-A90D-FAAF79BAF93D}", + "details": { + "name": "float" + } + } + ] + } + ] + } + ] +} \ No newline at end of file diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/EBus/Senders/PosterizeGradientRequestBus.names b/Gems/ScriptCanvas/Assets/TranslationAssets/EBus/Senders/PosterizeGradientRequestBus.names new file mode 100644 index 0000000000..5bc37563f4 --- /dev/null +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/EBus/Senders/PosterizeGradientRequestBus.names @@ -0,0 +1,124 @@ +{ + "entries": [ + { + "base": "PosterizeGradientRequestBus", + "context": "EBusSender", + "variant": "", + "details": { + "name": "Posterize Gradient" + }, + "methods": [ + { + "base": "GetGradientSampler", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke GetGradientSampler" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after GetGradientSampler is invoked" + }, + "details": { + "name": "GetGradientSampler" + }, + "results": [ + { + "typeid": "{3768D3A6-BF70-4ABC-B4EC-73C75A886916}", + "details": { + "name": "Gradient Sampler" + } + } + ] + }, + { + "base": "GetModeType", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke GetModeType" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after GetModeType is invoked" + }, + "details": { + "name": "GetModeType" + }, + "results": [ + { + "typeid": "{72B9409A-7D1A-4831-9CFE-FCB3FADD3426}", + "details": { + "name": "unsigned char" + } + } + ] + }, + { + "base": "SetModeType", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke SetModeType" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after SetModeType is invoked" + }, + "details": { + "name": "SetModeType" + }, + "params": [ + { + "typeid": "{72B9409A-7D1A-4831-9CFE-FCB3FADD3426}", + "details": { + "name": "unsigned char" + } + } + ] + }, + { + "base": "SetBands", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke SetBands" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after SetBands is invoked" + }, + "details": { + "name": "SetBands" + }, + "params": [ + { + "typeid": "{72039442-EB38-4D42-A1AD-CB68F7E0EEF6}", + "details": { + "name": "int" + } + } + ] + }, + { + "base": "GetBands", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke GetBands" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after GetBands is invoked" + }, + "details": { + "name": "GetBands" + }, + "results": [ + { + "typeid": "{72039442-EB38-4D42-A1AD-CB68F7E0EEF6}", + "details": { + "name": "int" + } + } + ] + } + ] + } + ] +} \ No newline at end of file diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/EBus/Senders/PrefabLoaderScriptingBus.names b/Gems/ScriptCanvas/Assets/TranslationAssets/EBus/Senders/PrefabLoaderScriptingBus.names new file mode 100644 index 0000000000..c57b57f9fe --- /dev/null +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/EBus/Senders/PrefabLoaderScriptingBus.names @@ -0,0 +1,44 @@ +{ + "entries": [ + { + "base": "PrefabLoaderScriptingBus", + "context": "EBusSender", + "variant": "", + "details": { + "name": "Prefab Loader" + }, + "methods": [ + { + "base": "SaveTemplateToString", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Save Template To String" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Save Template To String is invoked" + }, + "details": { + "name": "Save Template To String" + }, + "params": [ + { + "typeid": "{D6597933-47CD-4FC8-B911-63F3E2B0993A}", + "details": { + "name": "Template Id" + } + } + ], + "results": [ + { + "typeid": "{92FC6941-F5F5-5141-97A4-1965FC8B09CD}", + "details": { + "name": "Success" + } + } + ] + } + ] + } + ] +} \ No newline at end of file diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/EBus/Senders/PrefabPublicRequestBus.names b/Gems/ScriptCanvas/Assets/TranslationAssets/EBus/Senders/PrefabPublicRequestBus.names new file mode 100644 index 0000000000..8b0d5008aa --- /dev/null +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/EBus/Senders/PrefabPublicRequestBus.names @@ -0,0 +1,123 @@ +{ + "entries": [ + { + "base": "PrefabPublicRequestBus", + "context": "EBusSender", + "variant": "", + "details": { + "name": "Prefab Public" + }, + "methods": [ + { + "base": "CreatePrefabInMemory", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke CreatePrefabInMemory" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after CreatePrefabInMemory is invoked" + }, + "details": { + "name": "CreatePrefabInMemory" + }, + "params": [ + { + "typeid": "{4841CFF0-7A5C-519C-BD16-D3625E99605E}", + "details": { + "name": "AZStd::vector" + } + }, + { + "typeid": "{7114E998-A8B4-519B-9342-A86D1587B4F7}", + "details": { + "name": "" + } + } + ], + "results": [ + { + "typeid": "{0E9C062F-96E1-58E9-BCE0-AB93C4C425A1}", + "details": { + "name": "" + } + } + ] + }, + { + "base": "InstantiatePrefab", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke InstantiatePrefab" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after InstantiatePrefab is invoked" + }, + "details": { + "name": "InstantiatePrefab" + }, + "params": [ + { + "typeid": "{7114E998-A8B4-519B-9342-A86D1587B4F7}", + "details": { + "name": "" + } + }, + { + "typeid": "{6383F1D3-BB27-4E6B-A49A-6409B2059EAA}", + "details": { + "name": "EntityId", + "tooltip": "Entity Unique Id" + } + }, + { + "typeid": "{8379EB7D-01FA-4538-B64B-A6543B4BE73D}", + "details": { + "name": "Vector3" + } + } + ], + "results": [ + { + "typeid": "{0E9C062F-96E1-58E9-BCE0-AB93C4C425A1}", + "details": { + "name": "" + } + } + ] + }, + { + "base": "DeleteEntitiesAndAllDescendantsInInstance", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke DeleteEntitiesAndAllDescendantsInInstance" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after DeleteEntitiesAndAllDescendantsInInstance is invoked" + }, + "details": { + "name": "DeleteEntitiesAndAllDescendantsInInstance" + }, + "params": [ + { + "typeid": "{4841CFF0-7A5C-519C-BD16-D3625E99605E}", + "details": { + "name": "AZStd::vector" + } + } + ], + "results": [ + { + "typeid": "{0D5A4347-BCEC-58D6-A2D5-259F78FA0BF0}", + "details": { + "name": "" + } + } + ] + } + ] + } + ] +} \ No newline at end of file diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/EBus/Senders/PrefabSystemScriptingBus.names b/Gems/ScriptCanvas/Assets/TranslationAssets/EBus/Senders/PrefabSystemScriptingBus.names new file mode 100644 index 0000000000..511c0523d1 --- /dev/null +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/EBus/Senders/PrefabSystemScriptingBus.names @@ -0,0 +1,50 @@ +{ + "entries": [ + { + "base": "PrefabSystemScriptingBus", + "context": "EBusSender", + "variant": "", + "details": { + "name": "Prefab System" + }, + "methods": [ + { + "base": "CreatePrefab", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Create Prefab" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Create Prefab is invoked" + }, + "details": { + "name": "Create Prefab" + }, + "params": [ + { + "typeid": "{4841CFF0-7A5C-519C-BD16-D3625E99605E}", + "details": { + "name": "Entity Ids" + } + }, + { + "typeid": "{03AAAB3F-5C47-5A66-9EBC-D5FA4DB353C9}", + "details": { + "name": "File Path" + } + } + ], + "results": [ + { + "typeid": "{D6597933-47CD-4FC8-B911-63F3E2B0993A}", + "details": { + "name": "Template Id" + } + } + ] + } + ] + } + ] +} \ No newline at end of file diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/EBus/Senders/ProfilingCaptureRequestBus.names b/Gems/ScriptCanvas/Assets/TranslationAssets/EBus/Senders/ProfilingCaptureRequestBus.names new file mode 100644 index 0000000000..d4096662ad --- /dev/null +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/EBus/Senders/ProfilingCaptureRequestBus.names @@ -0,0 +1,140 @@ +{ + "entries": [ + { + "base": "ProfilingCaptureRequestBus", + "context": "EBusSender", + "variant": "", + "details": { + "name": "Profiling Capture" + }, + "methods": [ + { + "base": "CapturePassTimestamp", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke CapturePassTimestamp" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after CapturePassTimestamp is invoked" + }, + "details": { + "name": "CapturePassTimestamp" + }, + "params": [ + { + "typeid": "{03AAAB3F-5C47-5A66-9EBC-D5FA4DB353C9}", + "details": { + "name": "AZStd::string" + } + } + ], + "results": [ + { + "typeid": "{A0CA880C-AFE4-43CB-926C-59AC48496112}", + "details": { + "name": "bool" + } + } + ] + }, + { + "base": "CaptureCpuFrameTime", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke CaptureCpuFrameTime" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after CaptureCpuFrameTime is invoked" + }, + "details": { + "name": "CaptureCpuFrameTime" + }, + "params": [ + { + "typeid": "{03AAAB3F-5C47-5A66-9EBC-D5FA4DB353C9}", + "details": { + "name": "AZStd::string" + } + } + ], + "results": [ + { + "typeid": "{A0CA880C-AFE4-43CB-926C-59AC48496112}", + "details": { + "name": "bool" + } + } + ] + }, + { + "base": "CapturePassPipelineStatistics", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke CapturePassPipelineStatistics" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after CapturePassPipelineStatistics is invoked" + }, + "details": { + "name": "CapturePassPipelineStatistics" + }, + "params": [ + { + "typeid": "{03AAAB3F-5C47-5A66-9EBC-D5FA4DB353C9}", + "details": { + "name": "AZStd::string" + } + } + ], + "results": [ + { + "typeid": "{A0CA880C-AFE4-43CB-926C-59AC48496112}", + "details": { + "name": "bool" + } + } + ] + }, + { + "base": "CaptureBenchmarkMetadata", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke CaptureBenchmarkMetadata" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after CaptureBenchmarkMetadata is invoked" + }, + "details": { + "name": "CaptureBenchmarkMetadata" + }, + "params": [ + { + "typeid": "{03AAAB3F-5C47-5A66-9EBC-D5FA4DB353C9}", + "details": { + "name": "AZStd::string" + } + }, + { + "typeid": "{03AAAB3F-5C47-5A66-9EBC-D5FA4DB353C9}", + "details": { + "name": "AZStd::string" + } + } + ], + "results": [ + { + "typeid": "{A0CA880C-AFE4-43CB-926C-59AC48496112}", + "details": { + "name": "bool" + } + } + ] + } + ] + } + ] +} \ No newline at end of file diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/EBus/Senders/PythonEditorBus.names b/Gems/ScriptCanvas/Assets/TranslationAssets/EBus/Senders/PythonEditorBus.names new file mode 100644 index 0000000000..978b3e128f --- /dev/null +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/EBus/Senders/PythonEditorBus.names @@ -0,0 +1,752 @@ +{ + "entries": [ + { + "base": "PythonEditorBus", + "context": "EBusSender", + "variant": "", + "details": { + "name": "Python Editor" + }, + "methods": [ + { + "base": "ExecuteCommand", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke ExecuteCommand" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after ExecuteCommand is invoked" + }, + "details": { + "name": "ExecuteCommand" + }, + "params": [ + { + "typeid": "{3AB0037F-AF8D-48CE-BCA0-A170D18B2C03}", + "details": { + "name": "char" + } + } + ] + }, + { + "base": "GetCVar", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke GetCVar" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after GetCVar is invoked" + }, + "details": { + "name": "GetCVar" + }, + "params": [ + { + "typeid": "{3AB0037F-AF8D-48CE-BCA0-A170D18B2C03}", + "details": { + "name": "char" + } + } + ], + "results": [ + { + "typeid": "{3AB0037F-AF8D-48CE-BCA0-A170D18B2C03}", + "details": { + "name": "char" + } + } + ] + }, + { + "base": "IsInSimulationMode", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke IsInSimulationMode" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after IsInSimulationMode is invoked" + }, + "details": { + "name": "IsInSimulationMode" + }, + "results": [ + { + "typeid": "{A0CA880C-AFE4-43CB-926C-59AC48496112}", + "details": { + "name": "bool" + } + } + ] + }, + { + "base": "SetAxisConstraint", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke SetAxisConstraint" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after SetAxisConstraint is invoked" + }, + "details": { + "name": "SetAxisConstraint" + }, + "params": [ + { + "typeid": "{7114E998-A8B4-519B-9342-A86D1587B4F7}", + "details": { + "name": "" + } + } + ] + }, + { + "base": "IsInGameMode", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke IsInGameMode" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after IsInGameMode is invoked" + }, + "details": { + "name": "IsInGameMode" + }, + "results": [ + { + "typeid": "{A0CA880C-AFE4-43CB-926C-59AC48496112}", + "details": { + "name": "bool" + } + } + ] + }, + { + "base": "SetCVarFromFloat", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke SetCVarFromFloat" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after SetCVarFromFloat is invoked" + }, + "details": { + "name": "SetCVarFromFloat" + }, + "params": [ + { + "typeid": "{3AB0037F-AF8D-48CE-BCA0-A170D18B2C03}", + "details": { + "name": "char" + } + }, + { + "typeid": "{EA2C3E90-AFBE-44D4-A90D-FAAF79BAF93D}", + "details": { + "name": "float" + } + } + ] + }, + { + "base": "MessageBoxYesNo", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke MessageBoxYesNo" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after MessageBoxYesNo is invoked" + }, + "details": { + "name": "MessageBoxYesNo" + }, + "params": [ + { + "typeid": "{3AB0037F-AF8D-48CE-BCA0-A170D18B2C03}", + "details": { + "name": "char" + } + } + ], + "results": [ + { + "typeid": "{A0CA880C-AFE4-43CB-926C-59AC48496112}", + "details": { + "name": "bool" + } + } + ] + }, + { + "base": "Redo", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Redo" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Redo is invoked" + }, + "details": { + "name": "Redo" + } + }, + { + "base": "SetCVarFromInteger", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke SetCVarFromInteger" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after SetCVarFromInteger is invoked" + }, + "details": { + "name": "SetCVarFromInteger" + }, + "params": [ + { + "typeid": "{3AB0037F-AF8D-48CE-BCA0-A170D18B2C03}", + "details": { + "name": "char" + } + }, + { + "typeid": "{72039442-EB38-4D42-A1AD-CB68F7E0EEF6}", + "details": { + "name": "int" + } + } + ] + }, + { + "base": "DrawLabel", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke DrawLabel" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after DrawLabel is invoked" + }, + "details": { + "name": "DrawLabel" + }, + "params": [ + { + "typeid": "{72039442-EB38-4D42-A1AD-CB68F7E0EEF6}", + "details": { + "name": "int" + } + }, + { + "typeid": "{72039442-EB38-4D42-A1AD-CB68F7E0EEF6}", + "details": { + "name": "int" + } + }, + { + "typeid": "{EA2C3E90-AFBE-44D4-A90D-FAAF79BAF93D}", + "details": { + "name": "float" + } + }, + { + "typeid": "{EA2C3E90-AFBE-44D4-A90D-FAAF79BAF93D}", + "details": { + "name": "float" + } + }, + { + "typeid": "{EA2C3E90-AFBE-44D4-A90D-FAAF79BAF93D}", + "details": { + "name": "float" + } + }, + { + "typeid": "{EA2C3E90-AFBE-44D4-A90D-FAAF79BAF93D}", + "details": { + "name": "float" + } + }, + { + "typeid": "{EA2C3E90-AFBE-44D4-A90D-FAAF79BAF93D}", + "details": { + "name": "float" + } + }, + { + "typeid": "{3AB0037F-AF8D-48CE-BCA0-A170D18B2C03}", + "details": { + "name": "char" + } + } + ] + }, + { + "base": "Undo", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Undo" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Undo is invoked" + }, + "details": { + "name": "Undo" + } + }, + { + "base": "Log", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Log" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Log is invoked" + }, + "details": { + "name": "Log" + }, + "params": [ + { + "typeid": "{3AB0037F-AF8D-48CE-BCA0-A170D18B2C03}", + "details": { + "name": "char" + } + } + ] + }, + { + "base": "ComboBox", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke ComboBox" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after ComboBox is invoked" + }, + "details": { + "name": "ComboBox" + }, + "params": [ + { + "typeid": "{03AAAB3F-5C47-5A66-9EBC-D5FA4DB353C9}", + "details": { + "name": "AZStd::string" + } + }, + { + "typeid": "{99DAD0BC-740E-5E82-826B-8FC7968CC02C}", + "details": { + "name": "AZStd::vector" + } + }, + { + "typeid": "{72039442-EB38-4D42-A1AD-CB68F7E0EEF6}", + "details": { + "name": "int" + } + } + ], + "results": [ + { + "typeid": "{03AAAB3F-5C47-5A66-9EBC-D5FA4DB353C9}", + "details": { + "name": "AZStd::string" + } + } + ] + }, + { + "base": "ExitGameMode", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke ExitGameMode" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after ExitGameMode is invoked" + }, + "details": { + "name": "ExitGameMode" + } + }, + { + "base": "OpenFileBox", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke OpenFileBox" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after OpenFileBox is invoked" + }, + "details": { + "name": "OpenFileBox" + }, + "results": [ + { + "typeid": "{03AAAB3F-5C47-5A66-9EBC-D5FA4DB353C9}", + "details": { + "name": "AZStd::string" + } + } + ] + }, + { + "base": "MessageBoxOk", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke MessageBoxOk" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after MessageBoxOk is invoked" + }, + "details": { + "name": "MessageBoxOk" + }, + "params": [ + { + "typeid": "{3AB0037F-AF8D-48CE-BCA0-A170D18B2C03}", + "details": { + "name": "char" + } + } + ], + "results": [ + { + "typeid": "{A0CA880C-AFE4-43CB-926C-59AC48496112}", + "details": { + "name": "bool" + } + } + ] + }, + { + "base": "RunFile", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke RunFile" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after RunFile is invoked" + }, + "details": { + "name": "RunFile" + }, + "params": [ + { + "typeid": "{3AB0037F-AF8D-48CE-BCA0-A170D18B2C03}", + "details": { + "name": "char" + } + } + ] + }, + { + "base": "EditBoxCheckDataType", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke EditBoxCheckDataType" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after EditBoxCheckDataType is invoked" + }, + "details": { + "name": "EditBoxCheckDataType" + }, + "params": [ + { + "typeid": "{3AB0037F-AF8D-48CE-BCA0-A170D18B2C03}", + "details": { + "name": "char" + } + } + ], + "results": [ + { + "typeid": "{03924488-C7F4-4D6D-948B-ABC2D1AE2FD3}", + "details": { + "name": "any" + } + } + ] + }, + { + "base": "SetCVarFromString", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke SetCVarFromString" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after SetCVarFromString is invoked" + }, + "details": { + "name": "SetCVarFromString" + }, + "params": [ + { + "typeid": "{3AB0037F-AF8D-48CE-BCA0-A170D18B2C03}", + "details": { + "name": "char" + } + }, + { + "typeid": "{3AB0037F-AF8D-48CE-BCA0-A170D18B2C03}", + "details": { + "name": "char" + } + } + ] + }, + { + "base": "RunConsole", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke RunConsole" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after RunConsole is invoked" + }, + "details": { + "name": "RunConsole" + }, + "params": [ + { + "typeid": "{3AB0037F-AF8D-48CE-BCA0-A170D18B2C03}", + "details": { + "name": "char" + } + } + ] + }, + { + "base": "ExitSimulationMode", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke ExitSimulationMode" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after ExitSimulationMode is invoked" + }, + "details": { + "name": "ExitSimulationMode" + } + }, + { + "base": "SetCVar", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke SetCVar" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after SetCVar is invoked" + }, + "details": { + "name": "SetCVar" + }, + "params": [ + { + "typeid": "{3AB0037F-AF8D-48CE-BCA0-A170D18B2C03}", + "details": { + "name": "char" + } + }, + { + "typeid": "{03924488-C7F4-4D6D-948B-ABC2D1AE2FD3}", + "details": { + "name": "any" + } + } + ] + }, + { + "base": "GetPakFromFile", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke GetPakFromFile" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after GetPakFromFile is invoked" + }, + "details": { + "name": "GetPakFromFile" + }, + "params": [ + { + "typeid": "{3AB0037F-AF8D-48CE-BCA0-A170D18B2C03}", + "details": { + "name": "char" + } + } + ], + "results": [ + { + "typeid": "{88E0A40F-3085-4CAB-8B11-EF5A2659C71A}", + "details": { + "name": "AZ::IO::Path" + } + } + ] + }, + { + "base": "RunFileParameters", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke RunFileParameters" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after RunFileParameters is invoked" + }, + "details": { + "name": "RunFileParameters" + }, + "params": [ + { + "typeid": "{3AB0037F-AF8D-48CE-BCA0-A170D18B2C03}", + "details": { + "name": "char" + } + }, + { + "typeid": "{3AB0037F-AF8D-48CE-BCA0-A170D18B2C03}", + "details": { + "name": "char" + } + } + ] + }, + { + "base": "EnterSimulationMode", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke EnterSimulationMode" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after EnterSimulationMode is invoked" + }, + "details": { + "name": "EnterSimulationMode" + } + }, + { + "base": "GetAxisConstraint", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke GetAxisConstraint" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after GetAxisConstraint is invoked" + }, + "details": { + "name": "GetAxisConstraint" + }, + "results": [ + { + "typeid": "{3AB0037F-AF8D-48CE-BCA0-A170D18B2C03}", + "details": { + "name": "char" + } + } + ] + }, + { + "base": "EnterGameMode", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke EnterGameMode" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after EnterGameMode is invoked" + }, + "details": { + "name": "EnterGameMode" + } + }, + { + "base": "MessageBoxOkCancel", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke MessageBoxOkCancel" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after MessageBoxOkCancel is invoked" + }, + "details": { + "name": "MessageBoxOkCancel" + }, + "params": [ + { + "typeid": "{3AB0037F-AF8D-48CE-BCA0-A170D18B2C03}", + "details": { + "name": "char" + } + } + ], + "results": [ + { + "typeid": "{A0CA880C-AFE4-43CB-926C-59AC48496112}", + "details": { + "name": "bool" + } + } + ] + }, + { + "base": "EditBox", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke EditBox" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after EditBox is invoked" + }, + "details": { + "name": "EditBox" + }, + "params": [ + { + "typeid": "{7114E998-A8B4-519B-9342-A86D1587B4F7}", + "details": { + "name": "" + } + } + ], + "results": [ + { + "typeid": "{03AAAB3F-5C47-5A66-9EBC-D5FA4DB353C9}", + "details": { + "name": "AZStd::string" + } + } + ] + } + ] + } + ] +} \ No newline at end of file diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/EBus/Senders/QuadShapeComponentRequestsBus.names b/Gems/ScriptCanvas/Assets/TranslationAssets/EBus/Senders/QuadShapeComponentRequestsBus.names new file mode 100644 index 0000000000..2365e05ec1 --- /dev/null +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/EBus/Senders/QuadShapeComponentRequestsBus.names @@ -0,0 +1,148 @@ +{ + "entries": [ + { + "base": "QuadShapeComponentRequestsBus", + "context": "EBusSender", + "variant": "", + "details": { + "name": "Quad Shape Component", + "category": "Rendering/Shapes" + }, + "methods": [ + { + "base": "SetQuadHeight", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Set Quad Height" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Set Quad Height is invoked" + }, + "details": { + "name": "Set Quad Height" + }, + "params": [ + { + "typeid": "{EA2C3E90-AFBE-44D4-A90D-FAAF79BAF93D}", + "details": { + "name": "float" + } + } + ] + }, + { + "base": "GetQuadWidth", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Get Quad Width" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Get Quad Width is invoked" + }, + "details": { + "name": "Get Quad Width" + }, + "results": [ + { + "typeid": "{EA2C3E90-AFBE-44D4-A90D-FAAF79BAF93D}", + "details": { + "name": "float" + } + } + ] + }, + { + "base": "GetQuadHeight", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Get Quad Height" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Get Quad Height is invoked" + }, + "details": { + "name": "Get Quad Height" + }, + "results": [ + { + "typeid": "{EA2C3E90-AFBE-44D4-A90D-FAAF79BAF93D}", + "details": { + "name": "float" + } + } + ] + }, + { + "base": "GetQuadConfiguration", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Get Quad Configuration" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Get Quad Configuration is invoked" + }, + "details": { + "name": "Get Quad Configuration" + }, + "results": [ + { + "typeid": "{35CA7415-DB12-4630-B0D0-4A140CE1B9A7}", + "details": { + "name": "Configuration", + "tooltip": "Quad shape configuration parameters" + } + } + ] + }, + { + "base": "SetQuadWidth", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Set Quad Width" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Set Quad Width is invoked" + }, + "details": { + "name": "Set Quad Width" + }, + "params": [ + { + "typeid": "{EA2C3E90-AFBE-44D4-A90D-FAAF79BAF93D}", + "details": { + "name": "float" + } + } + ] + }, + { + "base": "GetQuadOrientation", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Get Quad Orientation" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Get Quad Orientation is invoked" + }, + "details": { + "name": "Get Quad Orientation" + }, + "results": [ + { + "typeid": "{73103120-3DD3-4873-BAB3-9713FA2804FB}", + "details": { + "name": "Quaternion" + } + } + ] + } + ] + } + ] +} \ No newline at end of file diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/EBus/Senders/RandomGradientRequestBus.names b/Gems/ScriptCanvas/Assets/TranslationAssets/EBus/Senders/RandomGradientRequestBus.names new file mode 100644 index 0000000000..d2680911dc --- /dev/null +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/EBus/Senders/RandomGradientRequestBus.names @@ -0,0 +1,58 @@ +{ + "entries": [ + { + "base": "RandomGradientRequestBus", + "context": "EBusSender", + "variant": "", + "details": { + "name": "Random Gradient" + }, + "methods": [ + { + "base": "GetRandomSeed", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke GetRandomSeed" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after GetRandomSeed is invoked" + }, + "details": { + "name": "GetRandomSeed" + }, + "results": [ + { + "typeid": "{72039442-EB38-4D42-A1AD-CB68F7E0EEF6}", + "details": { + "name": "int" + } + } + ] + }, + { + "base": "SetRandomSeed", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke SetRandomSeed" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after SetRandomSeed is invoked" + }, + "details": { + "name": "SetRandomSeed" + }, + "params": [ + { + "typeid": "{72039442-EB38-4D42-A1AD-CB68F7E0EEF6}", + "details": { + "name": "int" + } + } + ] + } + ] + } + ] +} \ No newline at end of file diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/EBus/Senders/RandomTimedSpawnerRequestBus.names b/Gems/ScriptCanvas/Assets/TranslationAssets/EBus/Senders/RandomTimedSpawnerRequestBus.names new file mode 100644 index 0000000000..bef8a10b5f --- /dev/null +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/EBus/Senders/RandomTimedSpawnerRequestBus.names @@ -0,0 +1,211 @@ +{ + "entries": [ + { + "base": "RandomTimedSpawnerRequestBus", + "context": "EBusSender", + "variant": "", + "details": { + "name": "Random Timed Spawner", + "category": "Gameplay/Spawner" + }, + "methods": [ + { + "base": "SetSpawnDelay", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Set Spawn Delay" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Set Spawn Delay is invoked" + }, + "details": { + "name": "Set Spawn Delay" + }, + "params": [ + { + "typeid": "{110C4B14-11A8-4E9D-8638-5051013A56AC}", + "details": { + "name": "double" + } + } + ] + }, + { + "base": "GetSpawnDelay", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Get Spawn Delay" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Get Spawn Delay is invoked" + }, + "details": { + "name": "Get Spawn Delay" + }, + "results": [ + { + "typeid": "{110C4B14-11A8-4E9D-8638-5051013A56AC}", + "details": { + "name": "double" + } + } + ] + }, + { + "base": "SetSpawnDelayVariation", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Set Spawn Delay Variation" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Set Spawn Delay Variation is invoked" + }, + "details": { + "name": "Set Spawn Delay Variation" + }, + "params": [ + { + "typeid": "{110C4B14-11A8-4E9D-8638-5051013A56AC}", + "details": { + "name": "double" + } + } + ] + }, + { + "base": "SetRandomDistribution", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Set Random Distribution" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Set Random Distribution is invoked" + }, + "details": { + "name": "Set Random Distribution" + }, + "params": [ + { + "typeid": "{43DA906B-7DEF-4CA8-9790-854106D3F983}", + "details": { + "name": "unsigned int" + } + } + ] + }, + { + "base": "IsEnabled", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Is Enabled" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Is Enabled is invoked" + }, + "details": { + "name": "Is Enabled" + }, + "results": [ + { + "typeid": "{A0CA880C-AFE4-43CB-926C-59AC48496112}", + "details": { + "name": "bool" + } + } + ] + }, + { + "base": "Disable", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Disable" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Disable is invoked" + }, + "details": { + "name": "Disable" + } + }, + { + "base": "Toggle", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Toggle" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Toggle is invoked" + }, + "details": { + "name": "Toggle" + } + }, + { + "base": "GetRandomDistribution", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Get Random Distribution" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Get Random Distribution is invoked" + }, + "details": { + "name": "Get Random Distribution" + }, + "results": [ + { + "typeid": "{43DA906B-7DEF-4CA8-9790-854106D3F983}", + "details": { + "name": "unsigned int" + } + } + ] + }, + { + "base": "Enable", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Enable" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Enable is invoked" + }, + "details": { + "name": "Enable" + } + }, + { + "base": "GetSpawnDelayVariation", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Get Spawn Delay Variation" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Get Spawn Delay Variation is invoked" + }, + "details": { + "name": "Get Spawn Delay Variation" + }, + "results": [ + { + "typeid": "{110C4B14-11A8-4E9D-8638-5051013A56AC}", + "details": { + "name": "double" + } + } + ] + } + ] + } + ] +} \ No newline at end of file diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/EBus/Senders/ReferenceGradientRequestBus.names b/Gems/ScriptCanvas/Assets/TranslationAssets/EBus/Senders/ReferenceGradientRequestBus.names new file mode 100644 index 0000000000..83c07428fe --- /dev/null +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/EBus/Senders/ReferenceGradientRequestBus.names @@ -0,0 +1,36 @@ +{ + "entries": [ + { + "base": "ReferenceGradientRequestBus", + "context": "EBusSender", + "variant": "", + "details": { + "name": "Reference Gradient" + }, + "methods": [ + { + "base": "GetGradientSampler", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke GetGradientSampler" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after GetGradientSampler is invoked" + }, + "details": { + "name": "GetGradientSampler" + }, + "results": [ + { + "typeid": "{3768D3A6-BF70-4ABC-B4EC-73C75A886916}", + "details": { + "name": "Gradient Sampler" + } + } + ] + } + ] + } + ] +} \ No newline at end of file diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/EBus/Senders/RenderMeshComponentRequestBus.names b/Gems/ScriptCanvas/Assets/TranslationAssets/EBus/Senders/RenderMeshComponentRequestBus.names new file mode 100644 index 0000000000..33337df200 --- /dev/null +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/EBus/Senders/RenderMeshComponentRequestBus.names @@ -0,0 +1,323 @@ +{ + "entries": [ + { + "base": "RenderMeshComponentRequestBus", + "context": "EBusSender", + "variant": "", + "details": { + "name": "Render Mesh Component", + "category": "Rendering" + }, + "methods": [ + { + "base": "GetLodOverride", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Get Lod Override" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Get Lod Override is invoked" + }, + "details": { + "name": "Get Lod Override" + }, + "results": [ + { + "typeid": "{72B9409A-7D1A-4831-9CFE-FCB3FADD3426}", + "details": { + "name": "unsigned char" + } + } + ] + }, + { + "base": "GetSortKey", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Get Sort Key" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Get Sort Key is invoked" + }, + "details": { + "name": "Get Sort Key" + }, + "results": [ + { + "typeid": "{70D8A282-A1EA-462D-9D04-51EDE81FAC2F}", + "details": { + "name": "AZ::s 64" + } + } + ] + }, + { + "base": "SetQualityDecayRate", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Set Quality Decay Rate" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Set Quality Decay Rate is invoked" + }, + "details": { + "name": "Set Quality Decay Rate" + }, + "params": [ + { + "typeid": "{EA2C3E90-AFBE-44D4-A90D-FAAF79BAF93D}", + "details": { + "name": "float" + } + } + ] + }, + { + "base": "SetSortKey", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Set Sort Key" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Set Sort Key is invoked" + }, + "details": { + "name": "Set Sort Key" + }, + "params": [ + { + "typeid": "{70D8A282-A1EA-462D-9D04-51EDE81FAC2F}", + "details": { + "name": "AZ::s 64" + } + } + ] + }, + { + "base": "GetModelAssetPath", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Get Model Asset Path" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Get Model Asset Path is invoked" + }, + "details": { + "name": "Get Model Asset Path" + }, + "results": [ + { + "typeid": "{03AAAB3F-5C47-5A66-9EBC-D5FA4DB353C9}", + "details": { + "name": "AZ Std::string" + } + } + ] + }, + { + "base": "SetLodType", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Set Lod Type" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Set Lod Type is invoked" + }, + "details": { + "name": "Set Lod Type" + }, + "params": [ + { + "typeid": "{72B9409A-7D1A-4831-9CFE-FCB3FADD3426}", + "details": { + "name": "unsigned char" + } + } + ] + }, + { + "base": "SetLodOverride", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Set Lod Override" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Set Lod Override is invoked" + }, + "details": { + "name": "Set Lod Override" + }, + "params": [ + { + "typeid": "{72B9409A-7D1A-4831-9CFE-FCB3FADD3426}", + "details": { + "name": "unsigned char" + } + } + ] + }, + { + "base": "SetMinimumScreenCoverage", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Set Minimum Screen Coverage" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Set Minimum Screen Coverage is invoked" + }, + "details": { + "name": "Set Minimum Screen Coverage" + }, + "params": [ + { + "typeid": "{EA2C3E90-AFBE-44D4-A90D-FAAF79BAF93D}", + "details": { + "name": "float" + } + } + ] + }, + { + "base": "SetModelAssetId", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Set Model Asset Id" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Set Model Asset Id is invoked" + }, + "details": { + "name": "Set Model Asset Id" + }, + "params": [ + { + "typeid": "{652ED536-3402-439B-AEBE-4A5DBC554085}", + "details": { + "name": "Asset Id" + } + } + ] + }, + { + "base": "GetLodType", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Get Lod Type" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Get Lod Type is invoked" + }, + "details": { + "name": "Get Lod Type" + }, + "results": [ + { + "typeid": "{72B9409A-7D1A-4831-9CFE-FCB3FADD3426}", + "details": { + "name": "unsigned char" + } + } + ] + }, + { + "base": "GetMinimumScreenCoverage", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Get Minimum Screen Coverage" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Get Minimum Screen Coverage is invoked" + }, + "details": { + "name": "Get Minimum Screen Coverage" + }, + "results": [ + { + "typeid": "{EA2C3E90-AFBE-44D4-A90D-FAAF79BAF93D}", + "details": { + "name": "float" + } + } + ] + }, + { + "base": "GetModelAssetId", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Get Model Asset Id" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Get Model Asset Id is invoked" + }, + "details": { + "name": "Get Model Asset Id" + }, + "results": [ + { + "typeid": "{652ED536-3402-439B-AEBE-4A5DBC554085}", + "details": { + "name": "Asset Id" + } + } + ] + }, + { + "base": "SetModelAssetPath", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Set Model Asset Path" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Set Model Asset Path is invoked" + }, + "details": { + "name": "Set Model Asset Path" + }, + "params": [ + { + "typeid": "{03AAAB3F-5C47-5A66-9EBC-D5FA4DB353C9}", + "details": { + "name": "AZ Std::string" + } + } + ] + }, + { + "base": "GetQualityDecayRate", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Get Quality Decay Rate" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Get Quality Decay Rate is invoked" + }, + "details": { + "name": "Get Quality Decay Rate" + }, + "results": [ + { + "typeid": "{EA2C3E90-AFBE-44D4-A90D-FAAF79BAF93D}", + "details": { + "name": "float" + } + } + ] + } + ] + } + ] +} \ No newline at end of file diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/EBus/Senders/RigidBodyRequestBus.names b/Gems/ScriptCanvas/Assets/TranslationAssets/EBus/Senders/RigidBodyRequestBus.names new file mode 100644 index 0000000000..474e3f89e3 --- /dev/null +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/EBus/Senders/RigidBodyRequestBus.names @@ -0,0 +1,722 @@ +{ + "entries": [ + { + "base": "RigidBodyRequestBus", + "context": "EBusSender", + "variant": "", + "details": { + "name": "Rigid Body" + }, + "methods": [ + { + "base": "SetLinearVelocity", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Set Linear Velocity" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Set Linear Velocity is invoked" + }, + "details": { + "name": "Set Linear Velocity" + }, + "params": [ + { + "typeid": "{8379EB7D-01FA-4538-B64B-A6543B4BE73D}", + "details": { + "name": "Linear Velocity" + } + } + ] + }, + { + "base": "SetKinematic", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Set Kinematic" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Set Kinematic is invoked" + }, + "details": { + "name": "Set Kinematic" + }, + "params": [ + { + "typeid": "{A0CA880C-AFE4-43CB-926C-59AC48496112}", + "details": { + "name": "Enabled" + } + } + ] + }, + { + "base": "SetMass", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Set Mass" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Set Mass is invoked" + }, + "details": { + "name": "Set Mass" + }, + "params": [ + { + "typeid": "{EA2C3E90-AFBE-44D4-A90D-FAAF79BAF93D}", + "details": { + "name": "Mass" + } + } + ] + }, + { + "base": "SetGravityEnabled", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Set Gravity Enabled" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Set Gravity Enabled is invoked" + }, + "details": { + "name": "Set Gravity Enabled" + }, + "params": [ + { + "typeid": "{A0CA880C-AFE4-43CB-926C-59AC48496112}", + "details": { + "name": "Enabled" + } + } + ] + }, + { + "base": "GetAabb", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Get AABB" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Get AABB is invoked" + }, + "details": { + "name": "Get AABB" + }, + "results": [ + { + "typeid": "{A54C2B36-D5B8-46A1-A529-4EBDBD2450E7}", + "details": { + "name": "AABB" + } + } + ] + }, + { + "base": "ForceAwake", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Force Awake" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Force Awake is invoked" + }, + "details": { + "name": "Force Awake" + } + }, + { + "base": "SetAngularDamping", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Set Angular Damping" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Set Angular Damping is invoked" + }, + "details": { + "name": "Set Angular Damping" + }, + "params": [ + { + "typeid": "{EA2C3E90-AFBE-44D4-A90D-FAAF79BAF93D}", + "details": { + "name": "Angular Damping" + } + } + ] + }, + { + "base": "ApplyAngularImpulse", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Apply Angular Impulse" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Apply Angular Impulse is invoked" + }, + "details": { + "name": "Apply Angular Impulse" + }, + "params": [ + { + "typeid": "{8379EB7D-01FA-4538-B64B-A6543B4BE73D}", + "details": { + "name": "Angular Impulse" + } + } + ] + }, + { + "base": "DisablePhysics", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Disable Physics" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Disable Physics is invoked" + }, + "details": { + "name": "Disable Physics" + } + }, + { + "base": "SetSimulationEnabled", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Set Simulation Enabled" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Set Simulation Enabled is invoked" + }, + "details": { + "name": "Set Simulation Enabled" + }, + "params": [ + { + "typeid": "{A0CA880C-AFE4-43CB-926C-59AC48496112}", + "details": { + "name": "Enabled" + } + } + ] + }, + { + "base": "GetLinearVelocityAtWorldPoint", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Get Linear Velocity At World Point" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Get Linear Velocity At World Point is invoked" + }, + "details": { + "name": "Get Linear Velocity At World Point" + }, + "params": [ + { + "typeid": "{8379EB7D-01FA-4538-B64B-A6543B4BE73D}", + "details": { + "name": "Linear Velocity" + } + } + ], + "results": [ + { + "typeid": "{8379EB7D-01FA-4538-B64B-A6543B4BE73D}", + "details": { + "name": "World Point" + } + } + ] + }, + { + "base": "SetAngularVelocity", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Set Angular Velocity" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Set Angular Velocity is invoked" + }, + "details": { + "name": "Set Angular Velocity" + }, + "params": [ + { + "typeid": "{8379EB7D-01FA-4538-B64B-A6543B4BE73D}", + "details": { + "name": "Angular Velocity" + } + } + ] + }, + { + "base": "SetCenterOfMassOffset", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Set Center Of Mass Offset" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Set Center Of Mass Offset is invoked" + }, + "details": { + "name": "Set Center Of Mass Offset" + }, + "params": [ + { + "typeid": "{8379EB7D-01FA-4538-B64B-A6543B4BE73D}", + "details": { + "name": "Offset" + } + } + ] + }, + { + "base": "IsPhysicsEnabled", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Is Physics Enabled" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Is Physics Enabled is invoked" + }, + "details": { + "name": "Is Physics Enabled" + }, + "results": [ + { + "typeid": "{A0CA880C-AFE4-43CB-926C-59AC48496112}", + "details": { + "name": "Enabled" + } + } + ] + }, + { + "base": "GetSleepThreshold", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Get Sleep Threshold" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Get Sleep Threshold is invoked" + }, + "details": { + "name": "Get Sleep Threshold" + }, + "results": [ + { + "typeid": "{EA2C3E90-AFBE-44D4-A90D-FAAF79BAF93D}", + "details": { + "name": "Sleep Threshold" + } + } + ] + }, + { + "base": "SetKinematicTarget", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Set Kinematic Target" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Set Kinematic Target is invoked" + }, + "details": { + "name": "Set Kinematic Target" + }, + "params": [ + { + "typeid": "{5D9958E9-9F1E-4985-B532-FFFDE75FEDFD}", + "details": { + "name": "Kinematic Target" + } + } + ] + }, + { + "base": "EnablePhysics", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Enable Physics" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Enable Physics is invoked" + }, + "details": { + "name": "Enable Physics" + } + }, + { + "base": "GetLinearDamping", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Get Linear Damping" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Get Linear Damping is invoked" + }, + "details": { + "name": "Get Linear Damping" + }, + "results": [ + { + "typeid": "{EA2C3E90-AFBE-44D4-A90D-FAAF79BAF93D}", + "details": { + "name": "Linear Damping" + } + } + ] + }, + { + "base": "ApplyLinearImpulseAtWorldPoint", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Apply Linear Impulse At World Point" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Apply Linear Impulse At World Point is invoked" + }, + "details": { + "name": "Apply Linear Impulse At World Point" + }, + "params": [ + { + "typeid": "{8379EB7D-01FA-4538-B64B-A6543B4BE73D}", + "details": { + "name": "Linear Impulse" + } + }, + { + "typeid": "{8379EB7D-01FA-4538-B64B-A6543B4BE73D}", + "details": { + "name": "World Point" + } + } + ] + }, + { + "base": "GetCenterOfMassWorld", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Get Center Of Mass World" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Get Center Of Mass World is invoked" + }, + "details": { + "name": "Get Center Of Mass World" + }, + "results": [ + { + "typeid": "{8379EB7D-01FA-4538-B64B-A6543B4BE73D}", + "details": { + "name": "Center of Mass (World)" + } + } + ] + }, + { + "base": "GetCenterOfMassLocal", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Get Center Of Mass Local" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Get Center Of Mass Local is invoked" + }, + "details": { + "name": "Get Center Of Mass Local" + }, + "results": [ + { + "typeid": "{8379EB7D-01FA-4538-B64B-A6543B4BE73D}", + "details": { + "name": "Center Of Mass (Local)" + } + } + ] + }, + { + "base": "SetLinearDamping", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Set Linear Damping" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Set Linear Damping is invoked" + }, + "details": { + "name": "Set Linear Damping" + }, + "params": [ + { + "typeid": "{EA2C3E90-AFBE-44D4-A90D-FAAF79BAF93D}", + "details": { + "name": "Linear Damping" + } + } + ] + }, + { + "base": "GetAngularDamping", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Get Angular Damping" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Get Angular Damping is invoked" + }, + "details": { + "name": "Get Angular Damping" + }, + "results": [ + { + "typeid": "{EA2C3E90-AFBE-44D4-A90D-FAAF79BAF93D}", + "details": { + "name": "Angular Damping" + } + } + ] + }, + { + "base": "GetLinearVelocity", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Get Linear Velocity" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Get Linear Velocity is invoked" + }, + "details": { + "name": "Get Linear Velocity" + }, + "results": [ + { + "typeid": "{8379EB7D-01FA-4538-B64B-A6543B4BE73D}", + "details": { + "name": "Linear Velocity" + } + } + ] + }, + { + "base": "IsAwake", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Is Awake" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Is Awake is invoked" + }, + "details": { + "name": "Is Awake" + }, + "results": [ + { + "typeid": "{A0CA880C-AFE4-43CB-926C-59AC48496112}", + "details": { + "name": "Is Awake" + } + } + ] + }, + { + "base": "IsGravityEnabled", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Is Gravity Enabled" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Is Gravity Enabled is invoked" + }, + "details": { + "name": "Is Gravity Enabled" + }, + "results": [ + { + "typeid": "{A0CA880C-AFE4-43CB-926C-59AC48496112}", + "details": { + "name": "Is Gravity Enabled" + } + } + ] + }, + { + "base": "GetInverseMass", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Get Inverse Mass" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Get Inverse Mass is invoked" + }, + "details": { + "name": "Get Inverse Mass" + }, + "results": [ + { + "typeid": "{EA2C3E90-AFBE-44D4-A90D-FAAF79BAF93D}", + "details": { + "name": "Inverse Mass" + } + } + ] + }, + { + "base": "SetSleepThreshold", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Set Sleep Threshold" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Set Sleep Threshold is invoked" + }, + "details": { + "name": "Set Sleep Threshold" + }, + "params": [ + { + "typeid": "{EA2C3E90-AFBE-44D4-A90D-FAAF79BAF93D}", + "details": { + "name": "Sleep Threshold" + } + } + ] + }, + { + "base": "ForceAsleep", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Force Asleep" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Force Asleep is invoked" + }, + "details": { + "name": "Force Asleep" + } + }, + { + "base": "GetMass", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Get Mass" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Get Mass is invoked" + }, + "details": { + "name": "Get Mass" + }, + "results": [ + { + "typeid": "{EA2C3E90-AFBE-44D4-A90D-FAAF79BAF93D}", + "details": { + "name": "Mass" + } + } + ] + }, + { + "base": "IsKinematic", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Is Kinematic" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Is Kinematic is invoked" + }, + "details": { + "name": "Is Kinematic" + }, + "results": [ + { + "typeid": "{A0CA880C-AFE4-43CB-926C-59AC48496112}", + "details": { + "name": "Is Kinematic" + } + } + ] + }, + { + "base": "ApplyLinearImpulse", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Apply Linear Impulse" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Apply Linear Impulse is invoked" + }, + "details": { + "name": "Apply Linear Impulse" + }, + "params": [ + { + "typeid": "{8379EB7D-01FA-4538-B64B-A6543B4BE73D}", + "details": { + "name": "Linear Impulse" + } + } + ] + }, + { + "base": "GetAngularVelocity", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Get Angular Velocity" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Get Angular Velocity is invoked" + }, + "details": { + "name": "Get Angular Velocity" + }, + "results": [ + { + "typeid": "{8379EB7D-01FA-4538-B64B-A6543B4BE73D}", + "details": { + "name": "Angular Velocity" + } + } + ] + } + ] + } + ] +} \ No newline at end of file diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/EBus/Senders/SceneRequestBus.names b/Gems/ScriptCanvas/Assets/TranslationAssets/EBus/Senders/SceneRequestBus.names new file mode 100644 index 0000000000..0e32488786 --- /dev/null +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/EBus/Senders/SceneRequestBus.names @@ -0,0 +1,70 @@ +{ + "entries": [ + { + "base": "SceneRequestBus", + "context": "EBusSender", + "variant": "", + "details": { + "name": "Scene" + }, + "methods": [ + { + "base": "CutSelection", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke CutSelection" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after CutSelection is invoked" + }, + "details": { + "name": "CutSelection" + } + }, + { + "base": "CopySelection", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke CopySelection" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after CopySelection is invoked" + }, + "details": { + "name": "CopySelection" + } + }, + { + "base": "Paste", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Paste" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Paste is invoked" + }, + "details": { + "name": "Paste" + } + }, + { + "base": "DuplicateSelection", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke DuplicateSelection" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after DuplicateSelection is invoked" + }, + "details": { + "name": "DuplicateSelection" + } + } + ] + } + ] +} \ No newline at end of file diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/EBus/Senders/SequenceComponentRequestBus.names b/Gems/ScriptCanvas/Assets/TranslationAssets/EBus/Senders/SequenceComponentRequestBus.names new file mode 100644 index 0000000000..d7fc9033e4 --- /dev/null +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/EBus/Senders/SequenceComponentRequestBus.names @@ -0,0 +1,226 @@ +{ + "entries": [ + { + "base": "SequenceComponentRequestBus", + "context": "EBusSender", + "variant": "", + "details": { + "name": "Sequence", + "category": "Animation" + }, + "methods": [ + { + "base": "GetPlaySpeed", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke GetPlaySpeed" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after GetPlaySpeed is invoked" + }, + "details": { + "name": "Get Play Speed", + "tooltip": "Returns the current play back speed as a multiplier (1.0 is normal speed, less is slower, more is faster)" + }, + "results": [ + { + "typeid": "{EA2C3E90-AFBE-44D4-A90D-FAAF79BAF93D}", + "details": { + "name": "Play Speed" + } + } + ] + }, + { + "base": "JumpToTime", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Jump To Time" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Jump To Time is invoked" + }, + "details": { + "name": "Jump To Time", + "tooltip": "Move the Playhead to the given time" + }, + "params": [ + { + "typeid": "{EA2C3E90-AFBE-44D4-A90D-FAAF79BAF93D}", + "details": { + "name": "Time" + } + } + ] + }, + { + "base": "Resume", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Resume" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Resume is invoked" + }, + "details": { + "name": "Resume", + "tooltip": "Resume the sequence. Resume essentially 'unpauses' a sequence. It must have been playing before the pause for playback to start again" + } + }, + { + "base": "JumpToEnd", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Jump To End" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Jump To End is invoked" + }, + "details": { + "name": "Jump To End", + "tooltip": "Move the Playhead to the end of the sequence" + } + }, + { + "base": "GetCurrentPlayTime", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Get Current Play Time" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Get Current Play Time is invoked" + }, + "details": { + "name": "Get Current Play Time", + "tooltip": " Returns the current play time in seconds" + }, + "results": [ + { + "typeid": "{EA2C3E90-AFBE-44D4-A90D-FAAF79BAF93D}", + "details": { + "name": "Play Time" + } + } + ] + }, + { + "base": "Pause", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Pause" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Pause is invoked" + }, + "details": { + "name": "Pause", + "tooltip": "Pause the sequence. Sequence must be playing for pause to have an effect. Pausing leaves the play time at its current position" + } + }, + { + "base": "PlayBetweenTimes", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke PlayBetweenTimes" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after PlayBetweenTimes is invoked" + }, + "details": { + "name": "PlayBetweenTimes", + "tooltip": "Play sequence between the start to end times, outside of which the sequence behaves according to its 'Out of Range' time setting" + }, + "params": [ + { + "typeid": "{EA2C3E90-AFBE-44D4-A90D-FAAF79BAF93D}", + "details": { + "name": "Start Time" + } + }, + { + "typeid": "{EA2C3E90-AFBE-44D4-A90D-FAAF79BAF93D}", + "details": { + "name": "End Time" + } + } + ] + }, + { + "base": "Stop", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Stop" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Stop is invoked" + }, + "details": { + "name": "Stop", + "tooltip": "Pause the sequence. Sequence must be playing for pause to have an effect. Pausing leaves the play time at its current position" + } + }, + { + "base": "JumpToBeginning", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Jump To Beginning" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Jump To Beginning is invoked" + }, + "details": { + "name": "Jump To Beginning", + "tooltip": "Move the Playhead to the beginning of the sequence" + } + }, + { + "base": "Play", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Play" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Play is invoked" + }, + "details": { + "name": "Play", + "tooltip": "Play sequence from the start to end times set the sequence" + } + }, + { + "base": "SetPlaySpeed", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke SetPlaySpeed" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after SetPlaySpeed is invoked" + }, + "details": { + "name": "SetPlaySpeed", + "tooltip": "Set the play speed" + }, + "params": [ + { + "typeid": "{EA2C3E90-AFBE-44D4-A90D-FAAF79BAF93D}", + "details": { + "name": "Play Speed" + } + } + ] + } + ] + } + ] +} \ No newline at end of file diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/EBus/Senders/ShapeAreaFalloffGradientRequestBus.names b/Gems/ScriptCanvas/Assets/TranslationAssets/EBus/Senders/ShapeAreaFalloffGradientRequestBus.names new file mode 100644 index 0000000000..0071164355 --- /dev/null +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/EBus/Senders/ShapeAreaFalloffGradientRequestBus.names @@ -0,0 +1,148 @@ +{ + "entries": [ + { + "base": "ShapeAreaFalloffGradientRequestBus", + "context": "EBusSender", + "variant": "", + "details": { + "name": "Shape Area Falloff Gradient" + }, + "methods": [ + { + "base": "SetFalloffType", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke SetFalloffType" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after SetFalloffType is invoked" + }, + "details": { + "name": "SetFalloffType" + }, + "params": [ + { + "typeid": "{72B9409A-7D1A-4831-9CFE-FCB3FADD3426}", + "details": { + "name": "unsigned char" + } + } + ] + }, + { + "base": "SetFalloffWidth", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke SetFalloffWidth" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after SetFalloffWidth is invoked" + }, + "details": { + "name": "SetFalloffWidth" + }, + "params": [ + { + "typeid": "{EA2C3E90-AFBE-44D4-A90D-FAAF79BAF93D}", + "details": { + "name": "float" + } + } + ] + }, + { + "base": "GetFalloffType", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke GetFalloffType" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after GetFalloffType is invoked" + }, + "details": { + "name": "GetFalloffType" + }, + "results": [ + { + "typeid": "{72B9409A-7D1A-4831-9CFE-FCB3FADD3426}", + "details": { + "name": "unsigned char" + } + } + ] + }, + { + "base": "GetFalloffWidth", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke GetFalloffWidth" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after GetFalloffWidth is invoked" + }, + "details": { + "name": "GetFalloffWidth" + }, + "results": [ + { + "typeid": "{EA2C3E90-AFBE-44D4-A90D-FAAF79BAF93D}", + "details": { + "name": "float" + } + } + ] + }, + { + "base": "SetShapeEntityId", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke SetShapeEntityId" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after SetShapeEntityId is invoked" + }, + "details": { + "name": "SetShapeEntityId" + }, + "params": [ + { + "typeid": "{6383F1D3-BB27-4E6B-A49A-6409B2059EAA}", + "details": { + "name": "EntityId", + "tooltip": "Entity Unique Id" + } + } + ] + }, + { + "base": "GetShapeEntityId", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke GetShapeEntityId" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after GetShapeEntityId is invoked" + }, + "details": { + "name": "GetShapeEntityId" + }, + "results": [ + { + "typeid": "{6383F1D3-BB27-4E6B-A49A-6409B2059EAA}", + "details": { + "name": "EntityId", + "tooltip": "Entity Unique Id" + } + } + ] + } + ] + } + ] +} \ No newline at end of file diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/EBus/Senders/ShapeComponentRequestsBus.names b/Gems/ScriptCanvas/Assets/TranslationAssets/EBus/Senders/ShapeComponentRequestsBus.names new file mode 100644 index 0000000000..f52f102e5f --- /dev/null +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/EBus/Senders/ShapeComponentRequestsBus.names @@ -0,0 +1,160 @@ +{ + "entries": [ + { + "base": "ShapeComponentRequestsBus", + "context": "EBusSender", + "variant": "", + "details": { + "name": "Shape Component", + "category": "Shape" + }, + "methods": [ + { + "base": "DistanceSquaredFromPoint", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Distance Squared From Point" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Distance Squared From Point is invoked" + }, + "details": { + "name": "Distance Squared From Point", + "tooltip": "Returns the minimum squared distance between a specified point and the shape" + }, + "params": [ + { + "typeid": "{8379EB7D-01FA-4538-B64B-A6543B4BE73D}", + "details": { + "name": "Point", + "tooltip": "Point from which to calculate square distance" + } + } + ], + "results": [ + { + "typeid": "{EA2C3E90-AFBE-44D4-A90D-FAAF79BAF93D}", + "details": { + "name": "float", + "tooltip": "Point from which to calculate square distance" + } + } + ] + }, + { + "base": "DistanceFromPoint", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Distance From Point" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Distance From Point is invoked" + }, + "details": { + "name": "Distance From Point", + "tooltip": "Returns the minimum distance between a specified point and the shape" + }, + "params": [ + { + "typeid": "{8379EB7D-01FA-4538-B64B-A6543B4BE73D}", + "details": { + "name": "Point", + "tooltip": "Point from which to calculate distance" + } + } + ], + "results": [ + { + "typeid": "{EA2C3E90-AFBE-44D4-A90D-FAAF79BAF93D}", + "details": { + "name": "float", + "tooltip": "Point from which to calculate distance" + } + } + ] + }, + { + "base": "IsPointInside", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Is Point Inside" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Is Point Inside is invoked" + }, + "details": { + "name": "Is Point Inside", + "tooltip": "Checks if a given point is inside a shape or outside it" + }, + "params": [ + { + "typeid": "{8379EB7D-01FA-4538-B64B-A6543B4BE73D}", + "details": { + "name": "Point", + "tooltip": "The point to be checked" + } + } + ], + "results": [ + { + "typeid": "{A0CA880C-AFE4-43CB-926C-59AC48496112}", + "details": { + "name": "bool", + "tooltip": "The point to be checked" + } + } + ] + }, + { + "base": "GetEncompassingAabb", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Get Encompassing Aabb" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Get Encompassing Aabb is invoked" + }, + "details": { + "name": "Get Encompassing Aabb", + "tooltip": "Returns an AABB that encompasses this entire shape" + }, + "results": [ + { + "typeid": "{A54C2B36-D5B8-46A1-A529-4EBDBD2450E7}", + "details": { + "name": "Aabb" + } + } + ] + }, + { + "base": "GetShapeType", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Get Shape Type" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Get Shape Type is invoked" + }, + "details": { + "name": "Get Shape Type", + "tooltip": "Allows users to fetch the type of shape that this component is using" + }, + "results": [ + { + "typeid": "{9F4E062E-06A0-46D4-85DF-E0DA96467D3A}", + "details": { + "name": "Crc32" + } + } + ] + } + ] + } + ] +} \ No newline at end of file diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/EBus/Senders/SimpleMotionComponentRequestBus.names b/Gems/ScriptCanvas/Assets/TranslationAssets/EBus/Senders/SimpleMotionComponentRequestBus.names new file mode 100644 index 0000000000..fb09158ca4 --- /dev/null +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/EBus/Senders/SimpleMotionComponentRequestBus.names @@ -0,0 +1,359 @@ +{ + "entries": [ + { + "base": "SimpleMotionComponentRequestBus", + "context": "EBusSender", + "variant": "", + "details": { + "name": "Simple Motion", + "category": "Animation" + }, + "methods": [ + { + "base": "BlendOutTime", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Blend Out Time" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Blend Out Time is invoked" + }, + "details": { + "name": "Blend Out Time" + }, + "params": [ + { + "typeid": "{EA2C3E90-AFBE-44D4-A90D-FAAF79BAF93D}", + "details": { + "name": "Time" + } + } + ] + }, + { + "base": "GetBlendInTime", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Get Blend In Time" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Get Blend In Time is invoked" + }, + "details": { + "name": "Get Blend In Time" + }, + "results": [ + { + "typeid": "{EA2C3E90-AFBE-44D4-A90D-FAAF79BAF93D}", + "details": { + "name": "Time" + } + } + ] + }, + { + "base": "PlayMotion", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke PlayMotion" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after PlayMotion is invoked" + }, + "details": { + "name": "Play Motion" + } + }, + { + "base": "GetMotion", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke GetMotion" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after GetMotion is invoked" + }, + "details": { + "name": "Get Motion" + }, + "results": [ + { + "typeid": "{652ED536-3402-439B-AEBE-4A5DBC554085}", + "details": { + "name": "Asset Id" + } + } + ] + }, + { + "base": "GetBlendOutTime", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Get Blend Out Time" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Get Blend Out Time is invoked" + }, + "details": { + "name": "Get Blend Out Time" + }, + "results": [ + { + "typeid": "{EA2C3E90-AFBE-44D4-A90D-FAAF79BAF93D}", + "details": { + "name": "Time" + } + } + ] + }, + { + "base": "ReverseMotion", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Reverse Motion" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Reverse Motion is invoked" + }, + "details": { + "name": "Reverse Motion" + }, + "params": [ + { + "typeid": "{A0CA880C-AFE4-43CB-926C-59AC48496112}", + "details": { + "name": "Enable" + } + } + ] + }, + { + "base": "GetPlaySpeed", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Get Play Speed" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Get Play Speed is invoked" + }, + "details": { + "name": "Get Play Speed" + }, + "results": [ + { + "typeid": "{EA2C3E90-AFBE-44D4-A90D-FAAF79BAF93D}", + "details": { + "name": "Speed" + } + } + ] + }, + { + "base": "GetPlayTime", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Get Play Time" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Get Play Time is invoked" + }, + "details": { + "name": "Get Play Time" + }, + "results": [ + { + "typeid": "{EA2C3E90-AFBE-44D4-A90D-FAAF79BAF93D}", + "details": { + "name": "Time" + } + } + ] + }, + { + "base": "RetargetMotion", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Retarget Motion" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Retarget Motion is invoked" + }, + "details": { + "name": "Retarget Motion" + }, + "params": [ + { + "typeid": "{A0CA880C-AFE4-43CB-926C-59AC48496112}", + "details": { + "name": "Enable" + } + } + ] + }, + { + "base": "SetPlaySpeed", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Set Play Speed" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Set Play Speed is invoked" + }, + "details": { + "name": "Set Play Speed" + }, + "params": [ + { + "typeid": "{EA2C3E90-AFBE-44D4-A90D-FAAF79BAF93D}", + "details": { + "name": "Speed" + } + } + ] + }, + { + "base": "Motion", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Motion" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Motion is invoked" + }, + "details": { + "name": "Motion" + }, + "params": [ + { + "typeid": "{652ED536-3402-439B-AEBE-4A5DBC554085}", + "details": { + "name": "Asset Id" + } + } + ] + }, + { + "base": "BlendInTime", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Blend In Time" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Blend In Time is invoked" + }, + "details": { + "name": "Blend In Time" + }, + "params": [ + { + "typeid": "{EA2C3E90-AFBE-44D4-A90D-FAAF79BAF93D}", + "details": { + "name": "Time" + } + } + ] + }, + { + "base": "GetLoopMotion", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Get Loop Motion" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Get Loop Motion is invoked" + }, + "details": { + "name": "Get Loop Motion" + }, + "results": [ + { + "typeid": "{A0CA880C-AFE4-43CB-926C-59AC48496112}", + "details": { + "name": "Loop Motion" + } + } + ] + }, + { + "base": "PlayTime", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Play Time" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Play Time is invoked" + }, + "details": { + "name": "Play Time" + }, + "params": [ + { + "typeid": "{EA2C3E90-AFBE-44D4-A90D-FAAF79BAF93D}", + "details": { + "name": "Time" + } + } + ] + }, + { + "base": "LoopMotion", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Loop Motion" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Loop Motion is invoked" + }, + "details": { + "name": "Loop Motion" + }, + "params": [ + { + "typeid": "{A0CA880C-AFE4-43CB-926C-59AC48496112}", + "details": { + "name": "Enable" + } + } + ] + }, + { + "base": "MirrorMotion", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Mirror Motion" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Mirror Motion is invoked" + }, + "details": { + "name": "Mirror Motion" + }, + "params": [ + { + "typeid": "{A0CA880C-AFE4-43CB-926C-59AC48496112}", + "details": { + "name": "Enable" + } + } + ] + } + ] + } + ] +} \ No newline at end of file diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/EBus/Senders/SimpleStateComponentRequestBus.names b/Gems/ScriptCanvas/Assets/TranslationAssets/EBus/Senders/SimpleStateComponentRequestBus.names new file mode 100644 index 0000000000..4dbabdfb97 --- /dev/null +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/EBus/Senders/SimpleStateComponentRequestBus.names @@ -0,0 +1,159 @@ +{ + "entries": [ + { + "base": "SimpleStateComponentRequestBus", + "context": "EBusSender", + "variant": "", + "details": { + "name": "Simple State", + "category": "Gameplay" + }, + "methods": [ + { + "base": "GetNumStates", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Get Num States" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Get Num States is invoked" + }, + "details": { + "name": "Get Num States" + }, + "results": [ + { + "typeid": "{43DA906B-7DEF-4CA8-9790-854106D3F983}", + "details": { + "name": "State Count" + } + } + ] + }, + { + "base": "SetToLastState", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Set To Last State" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Set To Last State is invoked" + }, + "details": { + "name": "Set To Last State" + } + }, + { + "base": "SetToPreviousState", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Set To Previous State" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Set To Previous State is invoked" + }, + "details": { + "name": "Set To Previous State" + } + }, + { + "base": "SetToFirstState", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Set To First State" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Set To First State is invoked" + }, + "details": { + "name": "Set To First State" + } + }, + { + "base": "SetToNextState", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Set To Next State" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Set To Next State is invoked" + }, + "details": { + "name": "Set To Next State" + } + }, + { + "base": "SetStateByIndex", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Set State By Index" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Set State By Index is invoked" + }, + "details": { + "name": "Set State By Index" + }, + "params": [ + { + "typeid": "{43DA906B-7DEF-4CA8-9790-854106D3F983}", + "details": { + "name": "Index" + } + } + ] + }, + { + "base": "SetState", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Set State" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Set State is invoked" + }, + "details": { + "name": "Set State" + }, + "params": [ + { + "typeid": "{3AB0037F-AF8D-48CE-BCA0-A170D18B2C03}", + "details": { + "name": "State Name" + } + } + ] + }, + { + "base": "GetCurrentState", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Get Current State" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Get Current State is invoked" + }, + "details": { + "name": "Get Current State" + }, + "results": [ + { + "typeid": "{3AB0037F-AF8D-48CE-BCA0-A170D18B2C03}", + "details": { + "name": "State Name" + } + } + ] + } + ] + } + ] +} \ No newline at end of file diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/EBus/Senders/SimulatedBodyComponentRequestBus.names b/Gems/ScriptCanvas/Assets/TranslationAssets/EBus/Senders/SimulatedBodyComponentRequestBus.names new file mode 100644 index 0000000000..e646bbef2f --- /dev/null +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/EBus/Senders/SimulatedBodyComponentRequestBus.names @@ -0,0 +1,117 @@ +{ + "entries": [ + { + "base": "SimulatedBodyComponentRequestBus", + "context": "EBusSender", + "variant": "", + "details": { + "name": "Simulated Body" + }, + "methods": [ + { + "base": "GetAabb", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Get AABB" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Get AABB is invoked" + }, + "details": { + "name": "Get AABB" + }, + "results": [ + { + "typeid": "{A54C2B36-D5B8-46A1-A529-4EBDBD2450E7}", + "details": { + "name": "AABB" + } + } + ] + }, + { + "base": "IsPhysicsEnabled", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke IsPhysicsEnabled" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after IsPhysicsEnabled is invoked" + }, + "details": { + "name": "Is Physics Enabled" + }, + "results": [ + { + "typeid": "{A0CA880C-AFE4-43CB-926C-59AC48496112}", + "details": { + "name": "Enabled" + } + } + ] + }, + { + "base": "RayCast", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke RayCast" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after RayCast is invoked" + }, + "details": { + "name": "Ray Cast" + }, + "params": [ + { + "typeid": "{53EAD088-A391-48F1-8370-2A1DBA31512F}", + "details": { + "name": "RayCast Request", + "tooltip": "Parameters for raycast" + } + } + ], + "results": [ + { + "typeid": "{7A7201B9-67B5-438B-B4EB-F3EEBB78C617}", + "details": { + "name": "Scene Query Hit" + } + } + ] + }, + { + "base": "DisablePhysics", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Disable Physics" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Disable Physics is invoked" + }, + "details": { + "name": "Disable Physics" + } + }, + { + "base": "EnablePhysics", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke EnablePhysics" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after EnablePhysics is invoked" + }, + "details": { + "name": "Enable Physics" + } + } + ] + } + ] +} \ No newline at end of file diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/EBus/Senders/SkyBoxFogRequestBus.names b/Gems/ScriptCanvas/Assets/TranslationAssets/EBus/Senders/SkyBoxFogRequestBus.names new file mode 100644 index 0000000000..9a283e509f --- /dev/null +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/EBus/Senders/SkyBoxFogRequestBus.names @@ -0,0 +1,191 @@ +{ + "entries": [ + { + "base": "SkyBoxFogRequestBus", + "context": "EBusSender", + "variant": "", + "details": { + "name": "Sky Box Fog", + "category": "Rendering" + }, + "methods": [ + { + "base": "GetBottomHeight", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Get Bottom Height" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Get Bottom Height is invoked" + }, + "details": { + "name": "Get Bottom Height" + }, + "results": [ + { + "typeid": "{EA2C3E90-AFBE-44D4-A90D-FAAF79BAF93D}", + "details": { + "name": "float" + } + } + ] + }, + { + "base": "GetColor", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Get Color" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Get Color is invoked" + }, + "details": { + "name": "Get Color" + }, + "results": [ + { + "typeid": "{7894072A-9050-4F0F-901B-34B1A0D29417}", + "details": { + "name": "Color" + } + } + ] + }, + { + "base": "SetBottomHeight", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Set Bottom Height" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Set Bottom Height is invoked" + }, + "details": { + "name": "Set Bottom Height" + }, + "params": [ + { + "typeid": "{EA2C3E90-AFBE-44D4-A90D-FAAF79BAF93D}", + "details": { + "name": "float" + } + } + ] + }, + { + "base": "SetColor", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Set Color" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Set Color is invoked" + }, + "details": { + "name": "Set Color" + }, + "params": [ + { + "typeid": "{7894072A-9050-4F0F-901B-34B1A0D29417}", + "details": { + "name": "Color" + } + } + ] + }, + { + "base": "GetTopHeight", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Get Top Height" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Get Top Height is invoked" + }, + "details": { + "name": "Get Top Height" + }, + "results": [ + { + "typeid": "{EA2C3E90-AFBE-44D4-A90D-FAAF79BAF93D}", + "details": { + "name": "float" + } + } + ] + }, + { + "base": "IsEnabled", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Is Enabled" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Is Enabled is invoked" + }, + "details": { + "name": "Is Enabled" + }, + "results": [ + { + "typeid": "{A0CA880C-AFE4-43CB-926C-59AC48496112}", + "details": { + "name": "bool" + } + } + ] + }, + { + "base": "SetTopHeight", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Set Top Height" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Set Top Height is invoked" + }, + "details": { + "name": "Set Top Height" + }, + "params": [ + { + "typeid": "{EA2C3E90-AFBE-44D4-A90D-FAAF79BAF93D}", + "details": { + "name": "float" + } + } + ] + }, + { + "base": "SetEnabled", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Set Enabled" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Set Enabled is invoked" + }, + "details": { + "name": "Set Enabled" + }, + "params": [ + { + "typeid": "{A0CA880C-AFE4-43CB-926C-59AC48496112}", + "details": { + "name": "bool" + } + } + ] + } + ] + } + ] +} \ No newline at end of file diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/EBus/Senders/SliceRequestBus.names b/Gems/ScriptCanvas/Assets/TranslationAssets/EBus/Senders/SliceRequestBus.names new file mode 100644 index 0000000000..e8eca764e7 --- /dev/null +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/EBus/Senders/SliceRequestBus.names @@ -0,0 +1,167 @@ +{ + "entries": [ + { + "base": "SliceRequestBus", + "context": "EBusSender", + "variant": "", + "details": { + "name": "Slice" + }, + "methods": [ + { + "base": "CreateNewSlice", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke CreateNewSlice" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after CreateNewSlice is invoked" + }, + "details": { + "name": "CreateNewSlice" + }, + "params": [ + { + "typeid": "{6383F1D3-BB27-4E6B-A49A-6409B2059EAA}", + "details": { + "name": "EntityId", + "tooltip": "Entity Unique Id" + } + }, + { + "typeid": "{3AB0037F-AF8D-48CE-BCA0-A170D18B2C03}", + "details": { + "name": "char" + } + } + ], + "results": [ + { + "typeid": "{A0CA880C-AFE4-43CB-926C-59AC48496112}", + "details": { + "name": "bool" + } + } + ] + }, + { + "base": "InstantiateSliceFromAssetId", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke InstantiateSliceFromAssetId" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after InstantiateSliceFromAssetId is invoked" + }, + "details": { + "name": "InstantiateSliceFromAssetId" + }, + "params": [ + { + "typeid": "{652ED536-3402-439B-AEBE-4A5DBC554085}", + "details": { + "name": "AssetId" + } + }, + { + "typeid": "{5D9958E9-9F1E-4985-B532-FFFDE75FEDFD}", + "details": { + "name": "Transform" + } + } + ], + "results": [ + { + "typeid": "{E6E7C0C5-07C9-44BB-A38C-930431948667}", + "details": { + "name": "SliceInstantiationTicket" + } + } + ] + }, + { + "base": "SetSliceDynamic", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke SetSliceDynamic" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after SetSliceDynamic is invoked" + }, + "details": { + "name": "SetSliceDynamic" + }, + "params": [ + { + "typeid": "{652ED536-3402-439B-AEBE-4A5DBC554085}", + "details": { + "name": "AssetId" + } + }, + { + "typeid": "{A0CA880C-AFE4-43CB-926C-59AC48496112}", + "details": { + "name": "bool" + } + } + ] + }, + { + "base": "ShowPushDialog", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke ShowPushDialog" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after ShowPushDialog is invoked" + }, + "details": { + "name": "ShowPushDialog" + }, + "params": [ + { + "typeid": "{4841CFF0-7A5C-519C-BD16-D3625E99605E}", + "details": { + "name": "AZStd::vector" + } + } + ] + }, + { + "base": "IsSliceDynamic", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke IsSliceDynamic" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after IsSliceDynamic is invoked" + }, + "details": { + "name": "IsSliceDynamic" + }, + "params": [ + { + "typeid": "{652ED536-3402-439B-AEBE-4A5DBC554085}", + "details": { + "name": "AssetId" + } + } + ], + "results": [ + { + "typeid": "{A0CA880C-AFE4-43CB-926C-59AC48496112}", + "details": { + "name": "bool" + } + } + ] + } + ] + } + ] +} \ No newline at end of file diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/EBus/Senders/SmoothStepGradientRequestBus.names b/Gems/ScriptCanvas/Assets/TranslationAssets/EBus/Senders/SmoothStepGradientRequestBus.names new file mode 100644 index 0000000000..27de9cad35 --- /dev/null +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/EBus/Senders/SmoothStepGradientRequestBus.names @@ -0,0 +1,36 @@ +{ + "entries": [ + { + "base": "SmoothStepGradientRequestBus", + "context": "EBusSender", + "variant": "", + "details": { + "name": "Smooth Step Gradient" + }, + "methods": [ + { + "base": "GetGradientSampler", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke GetGradientSampler" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after GetGradientSampler is invoked" + }, + "details": { + "name": "GetGradientSampler" + }, + "results": [ + { + "typeid": "{3768D3A6-BF70-4ABC-B4EC-73C75A886916}", + "details": { + "name": "Gradient Sampler" + } + } + ] + } + ] + } + ] +} \ No newline at end of file diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/EBus/Senders/SmoothStepRequestBus.names b/Gems/ScriptCanvas/Assets/TranslationAssets/EBus/Senders/SmoothStepRequestBus.names new file mode 100644 index 0000000000..7d4f344644 --- /dev/null +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/EBus/Senders/SmoothStepRequestBus.names @@ -0,0 +1,146 @@ +{ + "entries": [ + { + "base": "SmoothStepRequestBus", + "context": "EBusSender", + "variant": "", + "details": { + "name": "Smooth Step" + }, + "methods": [ + { + "base": "GetFallOffStrength", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke GetFallOffStrength" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after GetFallOffStrength is invoked" + }, + "details": { + "name": "GetFallOffStrength" + }, + "results": [ + { + "typeid": "{EA2C3E90-AFBE-44D4-A90D-FAAF79BAF93D}", + "details": { + "name": "float" + } + } + ] + }, + { + "base": "SetFallOffStrength", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke SetFallOffStrength" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after SetFallOffStrength is invoked" + }, + "details": { + "name": "SetFallOffStrength" + }, + "params": [ + { + "typeid": "{EA2C3E90-AFBE-44D4-A90D-FAAF79BAF93D}", + "details": { + "name": "float" + } + } + ] + }, + { + "base": "GetFallOffRange", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke GetFallOffRange" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after GetFallOffRange is invoked" + }, + "details": { + "name": "GetFallOffRange" + }, + "results": [ + { + "typeid": "{EA2C3E90-AFBE-44D4-A90D-FAAF79BAF93D}", + "details": { + "name": "float" + } + } + ] + }, + { + "base": "SetFallOffMidpoint", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke SetFallOffMidpoint" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after SetFallOffMidpoint is invoked" + }, + "details": { + "name": "SetFallOffMidpoint" + }, + "params": [ + { + "typeid": "{EA2C3E90-AFBE-44D4-A90D-FAAF79BAF93D}", + "details": { + "name": "float" + } + } + ] + }, + { + "base": "SetFallOffRange", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke SetFallOffRange" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after SetFallOffRange is invoked" + }, + "details": { + "name": "SetFallOffRange" + }, + "params": [ + { + "typeid": "{EA2C3E90-AFBE-44D4-A90D-FAAF79BAF93D}", + "details": { + "name": "float" + } + } + ] + }, + { + "base": "GetFallOffMidpoint", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke GetFallOffMidpoint" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after GetFallOffMidpoint is invoked" + }, + "details": { + "name": "GetFallOffMidpoint" + }, + "results": [ + { + "typeid": "{EA2C3E90-AFBE-44D4-A90D-FAAF79BAF93D}", + "details": { + "name": "float" + } + } + ] + } + ] + } + ] +} \ No newline at end of file diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/EBus/Senders/SpawnerComponentRequestBus.names b/Gems/ScriptCanvas/Assets/TranslationAssets/EBus/Senders/SpawnerComponentRequestBus.names new file mode 100644 index 0000000000..b9aeb3538a --- /dev/null +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/EBus/Senders/SpawnerComponentRequestBus.names @@ -0,0 +1,273 @@ +{ + "entries": [ + { + "base": "SpawnerComponentRequestBus", + "context": "EBusSender", + "variant": "", + "details": { + "name": "Spawner", + "category": "Gameplay" + }, + "methods": [ + { + "base": "SetDynamicSlice", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Set Dynamic Slice" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Set Dynamic Slice is invoked" + }, + "details": { + "name": "Set Dynamic Slice" + }, + "params": [ + { + "typeid": "{652ED536-3402-439B-AEBE-4A5DBC554085}", + "details": { + "name": "Asset Id" + } + } + ] + }, + { + "base": "GetCurrentlySpawnedSlices", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Get Currently Spawned Slices" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Get Currently Spawned Slices is invoked" + }, + "details": { + "name": "Get Currently Spawned Slices" + }, + "results": [ + { + "typeid": "{DCAD95EA-9447-5B13-AACC-6C7223E1C04D}", + "details": { + "name": "Spawned Slices" + } + } + ] + }, + { + "base": "HasAnyCurrentlySpawnedSlices", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Has Any Currently Spawned Slices" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Has Any Currently Spawned Slices is invoked" + }, + "details": { + "name": "Has Any Currently Spawned Slices" + }, + "results": [ + { + "typeid": "{A0CA880C-AFE4-43CB-926C-59AC48496112}", + "details": { + "name": "Result" + } + } + ] + }, + { + "base": "GetAllCurrentlySpawnedEntities", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Get All Currently Spawned Entities" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Get All Currently Spawned Entities is invoked" + }, + "details": { + "name": "Get All Currently Spawned Entities" + }, + "results": [ + { + "typeid": "{4841CFF0-7A5C-519C-BD16-D3625E99605E}", + "details": { + "name": "Spawned Entities" + } + } + ] + }, + { + "base": "DestroyAllSpawnedSlices", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Destroy All Spawned Slices" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Destroy All Spawned Slices is invoked" + }, + "details": { + "name": "Destroy All Spawned Slices" + } + }, + { + "base": "GetCurrentEntitiesFromSpawnedSlice", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Get Current Entities From Spawned Slice" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Get Current Entities From Spawned Slice is invoked" + }, + "details": { + "name": "Get Current Entities From Spawned Slice" + }, + "params": [ + { + "typeid": "{E6E7C0C5-07C9-44BB-A38C-930431948667}", + "details": { + "name": "Slice Instantiation Ticket" + } + } + ], + "results": [ + { + "typeid": "{4841CFF0-7A5C-519C-BD16-D3625E99605E}", + "details": { + "name": "Entities" + } + } + ] + }, + { + "base": "DestroySpawnedSlice", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Destroy Spawned Slice" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Destroy Spawned Slice is invoked" + }, + "details": { + "name": "Destroy Spawned Slice" + }, + "params": [ + { + "typeid": "{E6E7C0C5-07C9-44BB-A38C-930431948667}", + "details": { + "name": "Slice Instantiation Ticket" + } + } + ] + }, + { + "base": "IsReadyToSpawn", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Is Ready To Spawn" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Is Ready To Spawn is invoked" + }, + "details": { + "name": "Is Ready To Spawn" + }, + "results": [ + { + "typeid": "{A0CA880C-AFE4-43CB-926C-59AC48496112}", + "details": { + "name": "Is Ready" + } + } + ] + }, + { + "base": "SpawnRelative", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Spawn Relative" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Spawn Relative is invoked" + }, + "details": { + "name": "Spawn Relative" + }, + "params": [ + { + "typeid": "{5D9958E9-9F1E-4985-B532-FFFDE75FEDFD}", + "details": { + "name": "Transform" + } + } + ], + "results": [ + { + "typeid": "{E6E7C0C5-07C9-44BB-A38C-930431948667}", + "details": { + "name": "Slice Instantiation Ticket" + } + } + ] + }, + { + "base": "Spawn", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Spawn" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Spawn is invoked" + }, + "details": { + "name": "Spawn" + }, + "results": [ + { + "typeid": "{E6E7C0C5-07C9-44BB-A38C-930431948667}", + "details": { + "name": "Slice Instantiation Ticket" + } + } + ] + }, + { + "base": "SpawnAbsolute", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Spawn Absolute" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Spawn Absolute is invoked" + }, + "details": { + "name": "Spawn Absolute" + }, + "params": [ + { + "typeid": "{5D9958E9-9F1E-4985-B532-FFFDE75FEDFD}", + "details": { + "name": "Transform" + } + } + ], + "results": [ + { + "typeid": "{E6E7C0C5-07C9-44BB-A38C-930431948667}", + "details": { + "name": "Slice Instantiation Ticket" + } + } + ] + } + ] + } + ] +} \ No newline at end of file diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/EBus/Senders/SphereShapeComponentRequestsBus.names b/Gems/ScriptCanvas/Assets/TranslationAssets/EBus/Senders/SphereShapeComponentRequestsBus.names new file mode 100644 index 0000000000..c19e21564e --- /dev/null +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/EBus/Senders/SphereShapeComponentRequestsBus.names @@ -0,0 +1,63 @@ +{ + "entries": [ + { + "base": "SphereShapeComponentRequestsBus", + "context": "EBusSender", + "variant": "", + "details": { + "name": "Sphere Shape Component", + "category": "Shape" + }, + "methods": [ + { + "base": "GetSphereConfiguration", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Get Configuration" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Get Configuration is invoked" + }, + "details": { + "name": "Get Configuration", + "tooltip": "Returns the sphere configuration of a source entity" + }, + "results": [ + { + "typeid": "{4AADFD75-48A7-4F31-8F30-FE4505F09E35}", + "details": { + "name": "Configuration", + "tooltip": "Sphere shape configuration parameters" + } + } + ] + }, + { + "base": "SetRadius", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Set Radius" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Set Radius is invoked" + }, + "details": { + "name": "Set Radius", + "tooltip": "Sets the sphere radius" + }, + "params": [ + { + "typeid": "{EA2C3E90-AFBE-44D4-A90D-FAAF79BAF93D}", + "details": { + "name": "Radius", + "tooltip": "Radius in radians" + } + } + ] + } + ] + } + ] +} \ No newline at end of file diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/EBus/Senders/SplineComponentRequestBus.names b/Gems/ScriptCanvas/Assets/TranslationAssets/EBus/Senders/SplineComponentRequestBus.names new file mode 100644 index 0000000000..ea1d84e847 --- /dev/null +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/EBus/Senders/SplineComponentRequestBus.names @@ -0,0 +1,197 @@ +{ + "entries": [ + { + "base": "SplineComponentRequestBus", + "context": "EBusSender", + "variant": "", + "details": { + "name": "Spline Component", + "category": "Shape" + }, + "methods": [ + { + "base": "ClearVertices", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Clear Vertices" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Clear Vertices is invoked" + }, + "details": { + "name": "Clear Vertices" + } + }, + { + "base": "RemoveVertex", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Remove Vertex" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Remove Vertex is invoked" + }, + "details": { + "name": "Remove Vertex" + }, + "params": [ + { + "typeid": "{D6597933-47CD-4FC8-B911-63F3E2B0993A}", + "details": { + "name": "AZ::u64" + } + } + ], + "results": [ + { + "typeid": "{A0CA880C-AFE4-43CB-926C-59AC48496112}", + "details": { + "name": "bool" + } + } + ] + }, + { + "base": "UpdateVertex", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Update Vertex" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Update Vertex is invoked" + }, + "details": { + "name": "Update Vertex" + }, + "params": [ + { + "typeid": "{D6597933-47CD-4FC8-B911-63F3E2B0993A}", + "details": { + "name": "AZ::u64" + } + }, + { + "typeid": "{8379EB7D-01FA-4538-B64B-A6543B4BE73D}", + "details": { + "name": "Vector3" + } + } + ], + "results": [ + { + "typeid": "{A0CA880C-AFE4-43CB-926C-59AC48496112}", + "details": { + "name": "bool" + } + } + ] + }, + { + "base": "AddVertex", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Add Vertex" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Add Vertex is invoked" + }, + "details": { + "name": "Add Vertex" + }, + "params": [ + { + "typeid": "{8379EB7D-01FA-4538-B64B-A6543B4BE73D}", + "details": { + "name": "Vector3" + } + } + ] + }, + { + "base": "GetSpline", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Get Spline" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Get Spline is invoked" + }, + "details": { + "name": "Get Spline" + }, + "results": [ + { + "typeid": "{E13859C4-1F24-5C44-A133-F17B4B050D7C}", + "details": { + "name": "AZStd::shared_ptr" + } + } + ] + }, + { + "base": "SetClosed", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Set Closed" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Set Closed is invoked" + }, + "details": { + "name": "Set Closed" + }, + "params": [ + { + "typeid": "{A0CA880C-AFE4-43CB-926C-59AC48496112}", + "details": { + "name": "bool" + } + } + ] + }, + { + "base": "InsertVertex", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Insert Vertex" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Insert Vertex is invoked" + }, + "details": { + "name": "Insert Vertex" + }, + "params": [ + { + "typeid": "{D6597933-47CD-4FC8-B911-63F3E2B0993A}", + "details": { + "name": "AZ::u64" + } + }, + { + "typeid": "{8379EB7D-01FA-4538-B64B-A6543B4BE73D}", + "details": { + "name": "Vector3" + } + } + ], + "results": [ + { + "typeid": "{A0CA880C-AFE4-43CB-926C-59AC48496112}", + "details": { + "name": "bool" + } + } + ] + } + ] + } + ] +} \ No newline at end of file diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/EBus/Senders/SsaoRequestBus.names b/Gems/ScriptCanvas/Assets/TranslationAssets/EBus/Senders/SsaoRequestBus.names new file mode 100644 index 0000000000..9c3265fa01 --- /dev/null +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/EBus/Senders/SsaoRequestBus.names @@ -0,0 +1,719 @@ +{ + "entries": [ + { + "base": "SsaoRequestBus", + "context": "EBusSender", + "variant": "", + "details": { + "name": "SSAO", + "category": "Rendering" + }, + "methods": [ + { + "base": "SetBlurDepthFalloffStrength", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Set Blur Depth Falloff Strength" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Set Blur Depth Falloff Strength is invoked" + }, + "details": { + "name": "Set Blur Depth Falloff Strength" + }, + "params": [ + { + "typeid": "{EA2C3E90-AFBE-44D4-A90D-FAAF79BAF93D}", + "details": { + "name": "float" + } + } + ] + }, + { + "base": "SetBlurDepthFalloffThreshold", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Set Blur Depth Falloff Threshold" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Set Blur Depth Falloff Threshold is invoked" + }, + "details": { + "name": "Set Blur Depth Falloff Threshold" + }, + "params": [ + { + "typeid": "{EA2C3E90-AFBE-44D4-A90D-FAAF79BAF93D}", + "details": { + "name": "float" + } + } + ] + }, + { + "base": "SetEnableDownsampleOverride", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Set Enable Downsample Override" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Set Enable Downsample Override is invoked" + }, + "details": { + "name": "Set Enable Downsample Override" + }, + "params": [ + { + "typeid": "{A0CA880C-AFE4-43CB-926C-59AC48496112}", + "details": { + "name": "bool" + } + } + ] + }, + { + "base": "SetEnableBlurOverride", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Set Enable Blur Override" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Set Enable Blur Override is invoked" + }, + "details": { + "name": "Set Enable Blur Override" + }, + "params": [ + { + "typeid": "{A0CA880C-AFE4-43CB-926C-59AC48496112}", + "details": { + "name": "bool" + } + } + ] + }, + { + "base": "GetEnabledOverride", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Get Enabled Override" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Get Enabled Override is invoked" + }, + "details": { + "name": "Get Enabled Override" + }, + "results": [ + { + "typeid": "{A0CA880C-AFE4-43CB-926C-59AC48496112}", + "details": { + "name": "bool" + } + } + ] + }, + { + "base": "GetSamplingRadius", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Get Sampling Radius" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Get Sampling Radius is invoked" + }, + "details": { + "name": "Get Sampling Radius" + }, + "results": [ + { + "typeid": "{EA2C3E90-AFBE-44D4-A90D-FAAF79BAF93D}", + "details": { + "name": "float" + } + } + ] + }, + { + "base": "SetBlurDepthFalloffStrengthOverride", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Set Blur Depth Falloff Strength Override" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Set Blur Depth Falloff Strength Override is invoked" + }, + "details": { + "name": "Set Blur Depth Falloff Strength Override" + }, + "params": [ + { + "typeid": "{EA2C3E90-AFBE-44D4-A90D-FAAF79BAF93D}", + "details": { + "name": "float" + } + } + ] + }, + { + "base": "GetBlurDepthFalloffThresholdOverride", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Get Blur Depth Falloff Threshold Override" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Get Blur Depth Falloff Threshold Override is invoked" + }, + "details": { + "name": "Get Blur Depth Falloff Threshold Override" + }, + "results": [ + { + "typeid": "{EA2C3E90-AFBE-44D4-A90D-FAAF79BAF93D}", + "details": { + "name": "float" + } + } + ] + }, + { + "base": "GetBlurDepthFalloffThreshold", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Get Blur Depth Falloff Threshold" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Get Blur Depth Falloff Threshold is invoked" + }, + "details": { + "name": "Get Blur Depth Falloff Threshold" + }, + "results": [ + { + "typeid": "{EA2C3E90-AFBE-44D4-A90D-FAAF79BAF93D}", + "details": { + "name": "float" + } + } + ] + }, + { + "base": "GetSamplingRadiusOverride", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Get Sampling Radius Override" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Get Sampling Radius Override is invoked" + }, + "details": { + "name": "Get Sampling Radius Override" + }, + "results": [ + { + "typeid": "{EA2C3E90-AFBE-44D4-A90D-FAAF79BAF93D}", + "details": { + "name": "float" + } + } + ] + }, + { + "base": "SetStrengthOverride", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Set Strength Override" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Set Strength Override is invoked" + }, + "details": { + "name": "Set Strength Override" + }, + "params": [ + { + "typeid": "{EA2C3E90-AFBE-44D4-A90D-FAAF79BAF93D}", + "details": { + "name": "float" + } + } + ] + }, + { + "base": "GetStrength", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Get Strength" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Get Strength is invoked" + }, + "details": { + "name": "Get Strength" + }, + "results": [ + { + "typeid": "{EA2C3E90-AFBE-44D4-A90D-FAAF79BAF93D}", + "details": { + "name": "float" + } + } + ] + }, + { + "base": "GetEnabled", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Get Enabled" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Get Enabled is invoked" + }, + "details": { + "name": "Get Enabled" + }, + "results": [ + { + "typeid": "{A0CA880C-AFE4-43CB-926C-59AC48496112}", + "details": { + "name": "bool" + } + } + ] + }, + { + "base": "GetEnableDownsample", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Get Enable Downsample" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Get Enable Downsample is invoked" + }, + "details": { + "name": "Get Enable Downsample" + }, + "results": [ + { + "typeid": "{A0CA880C-AFE4-43CB-926C-59AC48496112}", + "details": { + "name": "bool" + } + } + ] + }, + { + "base": "GetBlurDepthFalloffStrength", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Get Blur Depth Falloff Strength" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Get Blur Depth Falloff Strength is invoked" + }, + "details": { + "name": "Get Blur Depth Falloff Strength" + }, + "results": [ + { + "typeid": "{EA2C3E90-AFBE-44D4-A90D-FAAF79BAF93D}", + "details": { + "name": "float" + } + } + ] + }, + { + "base": "SetBlurConstFalloff", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Set Blur Const Falloff" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Set Blur Const Falloff is invoked" + }, + "details": { + "name": "Set Blur Const Falloff" + }, + "params": [ + { + "typeid": "{EA2C3E90-AFBE-44D4-A90D-FAAF79BAF93D}", + "details": { + "name": "float" + } + } + ] + }, + { + "base": "GetEnableDownsampleOverride", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Get Enable Downsample Override" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Get Enable Downsample Override is invoked" + }, + "details": { + "name": "Get Enable Downsample Override" + }, + "results": [ + { + "typeid": "{A0CA880C-AFE4-43CB-926C-59AC48496112}", + "details": { + "name": "bool" + } + } + ] + }, + { + "base": "GetEnableBlurOverride", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Get Enable Blur Override" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Get Enable Blur Override is invoked" + }, + "details": { + "name": "Get Enable Blur Override" + }, + "results": [ + { + "typeid": "{A0CA880C-AFE4-43CB-926C-59AC48496112}", + "details": { + "name": "bool" + } + } + ] + }, + { + "base": "SetSamplingRadiusOverride", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Set Sampling Radius Override" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Set Sampling Radius Override is invoked" + }, + "details": { + "name": "Set Sampling Radius Override" + }, + "params": [ + { + "typeid": "{EA2C3E90-AFBE-44D4-A90D-FAAF79BAF93D}", + "details": { + "name": "float" + } + } + ] + }, + { + "base": "SetSamplingRadius", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Set Sampling Radius" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Set Sampling Radius is invoked" + }, + "details": { + "name": "Set Sampling Radius" + }, + "params": [ + { + "typeid": "{EA2C3E90-AFBE-44D4-A90D-FAAF79BAF93D}", + "details": { + "name": "float" + } + } + ] + }, + { + "base": "SetStrength", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Set Strength" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Set Strength is invoked" + }, + "details": { + "name": "Set Strength" + }, + "params": [ + { + "typeid": "{EA2C3E90-AFBE-44D4-A90D-FAAF79BAF93D}", + "details": { + "name": "float" + } + } + ] + }, + { + "base": "SetEnabled", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Set Enabled" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Set Enabled is invoked" + }, + "details": { + "name": "Set Enabled" + }, + "params": [ + { + "typeid": "{A0CA880C-AFE4-43CB-926C-59AC48496112}", + "details": { + "name": "bool" + } + } + ] + }, + { + "base": "GetStrengthOverride", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Get Strength Override" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Get Strength Override is invoked" + }, + "details": { + "name": "Get Strength Override" + }, + "results": [ + { + "typeid": "{EA2C3E90-AFBE-44D4-A90D-FAAF79BAF93D}", + "details": { + "name": "float" + } + } + ] + }, + { + "base": "GetEnableBlur", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Get Enable Blur" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Get Enable Blur is invoked" + }, + "details": { + "name": "Get Enable Blur" + }, + "results": [ + { + "typeid": "{A0CA880C-AFE4-43CB-926C-59AC48496112}", + "details": { + "name": "bool" + } + } + ] + }, + { + "base": "SetEnableDownsample", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Set Enable Downsample" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Set Enable Downsample is invoked" + }, + "details": { + "name": "Set Enable Downsample" + }, + "params": [ + { + "typeid": "{A0CA880C-AFE4-43CB-926C-59AC48496112}", + "details": { + "name": "bool" + } + } + ] + }, + { + "base": "SetBlurDepthFalloffThresholdOverride", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Set Blur Depth Falloff Threshold Override" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Set Blur Depth Falloff Threshold Override is invoked" + }, + "details": { + "name": "Set Blur Depth Falloff Threshold Override" + }, + "params": [ + { + "typeid": "{EA2C3E90-AFBE-44D4-A90D-FAAF79BAF93D}", + "details": { + "name": "float" + } + } + ] + }, + { + "base": "SetBlurConstFalloffOverride", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Set Blur Const Falloff Override" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Set Blur Const Falloff Override is invoked" + }, + "details": { + "name": "Set Blur Const Falloff Override" + }, + "params": [ + { + "typeid": "{EA2C3E90-AFBE-44D4-A90D-FAAF79BAF93D}", + "details": { + "name": "float" + } + } + ] + }, + { + "base": "GetBlurConstFalloff", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Get Blur Const Falloff" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Get Blur Const Falloff is invoked" + }, + "details": { + "name": "Get Blur Const Falloff" + }, + "results": [ + { + "typeid": "{EA2C3E90-AFBE-44D4-A90D-FAAF79BAF93D}", + "details": { + "name": "float" + } + } + ] + }, + { + "base": "SetEnabledOverride", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Set Enabled Override" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Set Enabled Override is invoked" + }, + "details": { + "name": "Set Enabled Override" + }, + "params": [ + { + "typeid": "{A0CA880C-AFE4-43CB-926C-59AC48496112}", + "details": { + "name": "bool" + } + } + ] + }, + { + "base": "SetEnableBlur", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Set Enable Blur" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Set Enable Blur is invoked" + }, + "details": { + "name": "Set Enable Blur" + }, + "params": [ + { + "typeid": "{A0CA880C-AFE4-43CB-926C-59AC48496112}", + "details": { + "name": "bool" + } + } + ] + }, + { + "base": "GetBlurConstFalloffOverride", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Get Blur Const Falloff Override" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Get Blur Const Falloff Override is invoked" + }, + "details": { + "name": "Get Blur Const Falloff Override" + }, + "results": [ + { + "typeid": "{EA2C3E90-AFBE-44D4-A90D-FAAF79BAF93D}", + "details": { + "name": "float" + } + } + ] + }, + { + "base": "GetBlurDepthFalloffStrengthOverride", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Get Blur Depth Falloff Strength Override" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Get Blur Depth Falloff Strength Override is invoked" + }, + "details": { + "name": "Get Blur Depth Falloff Strength Override" + }, + "results": [ + { + "typeid": "{EA2C3E90-AFBE-44D4-A90D-FAAF79BAF93D}", + "details": { + "name": "float" + } + } + ] + } + ] + } + ] +} \ No newline at end of file diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/EBus/Senders/SurfaceAltitudeGradientRequestBus.names b/Gems/ScriptCanvas/Assets/TranslationAssets/EBus/Senders/SurfaceAltitudeGradientRequestBus.names new file mode 100644 index 0000000000..9ef0487372 --- /dev/null +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/EBus/Senders/SurfaceAltitudeGradientRequestBus.names @@ -0,0 +1,244 @@ +{ + "entries": [ + { + "base": "SurfaceAltitudeGradientRequestBus", + "context": "EBusSender", + "variant": "", + "details": { + "name": "Surface Altitude Gradient" + }, + "methods": [ + { + "base": "GetNumTags", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke GetNumTags" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after GetNumTags is invoked" + }, + "details": { + "name": "GetNumTags" + }, + "results": [ + { + "typeid": "{D6597933-47CD-4FC8-B911-63F3E2B0993A}", + "details": { + "name": "AZ::u64" + } + } + ] + }, + { + "base": "RemoveTag", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke RemoveTag" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after RemoveTag is invoked" + }, + "details": { + "name": "RemoveTag" + }, + "params": [ + { + "typeid": "{72039442-EB38-4D42-A1AD-CB68F7E0EEF6}", + "details": { + "name": "int" + } + } + ] + }, + { + "base": "GetAltitudeMax", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke GetAltitudeMax" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after GetAltitudeMax is invoked" + }, + "details": { + "name": "GetAltitudeMax" + }, + "results": [ + { + "typeid": "{EA2C3E90-AFBE-44D4-A90D-FAAF79BAF93D}", + "details": { + "name": "float" + } + } + ] + }, + { + "base": "SetAltitudeMin", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke SetAltitudeMin" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after SetAltitudeMin is invoked" + }, + "details": { + "name": "SetAltitudeMin" + }, + "params": [ + { + "typeid": "{EA2C3E90-AFBE-44D4-A90D-FAAF79BAF93D}", + "details": { + "name": "float" + } + } + ] + }, + { + "base": "GetAltitudeMin", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke GetAltitudeMin" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after GetAltitudeMin is invoked" + }, + "details": { + "name": "GetAltitudeMin" + }, + "results": [ + { + "typeid": "{EA2C3E90-AFBE-44D4-A90D-FAAF79BAF93D}", + "details": { + "name": "float" + } + } + ] + }, + { + "base": "GetTag", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke GetTag" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after GetTag is invoked" + }, + "details": { + "name": "GetTag" + }, + "params": [ + { + "typeid": "{72039442-EB38-4D42-A1AD-CB68F7E0EEF6}", + "details": { + "name": "int" + } + } + ], + "results": [ + { + "typeid": "{9F4E062E-06A0-46D4-85DF-E0DA96467D3A}", + "details": { + "name": "Crc32" + } + } + ] + }, + { + "base": "AddTag", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke AddTag" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after AddTag is invoked" + }, + "details": { + "name": "AddTag" + }, + "params": [ + { + "typeid": "{03AAAB3F-5C47-5A66-9EBC-D5FA4DB353C9}", + "details": { + "name": "AZStd::string" + } + } + ] + }, + { + "base": "SetShapeEntityId", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke SetShapeEntityId" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after SetShapeEntityId is invoked" + }, + "details": { + "name": "SetShapeEntityId" + }, + "params": [ + { + "typeid": "{6383F1D3-BB27-4E6B-A49A-6409B2059EAA}", + "details": { + "name": "EntityId", + "tooltip": "Entity Unique Id" + } + } + ] + }, + { + "base": "SetAltitudeMax", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke SetAltitudeMax" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after SetAltitudeMax is invoked" + }, + "details": { + "name": "SetAltitudeMax" + }, + "params": [ + { + "typeid": "{EA2C3E90-AFBE-44D4-A90D-FAAF79BAF93D}", + "details": { + "name": "float" + } + } + ] + }, + { + "base": "GetShapeEntityId", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke GetShapeEntityId" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after GetShapeEntityId is invoked" + }, + "details": { + "name": "GetShapeEntityId" + }, + "results": [ + { + "typeid": "{6383F1D3-BB27-4E6B-A49A-6409B2059EAA}", + "details": { + "name": "EntityId", + "tooltip": "Entity Unique Id" + } + } + ] + } + ] + } + ] +} \ No newline at end of file diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/EBus/Senders/SurfaceMaskGradientRequestBus.names b/Gems/ScriptCanvas/Assets/TranslationAssets/EBus/Senders/SurfaceMaskGradientRequestBus.names new file mode 100644 index 0000000000..5fa94d9dc8 --- /dev/null +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/EBus/Senders/SurfaceMaskGradientRequestBus.names @@ -0,0 +1,110 @@ +{ + "entries": [ + { + "base": "SurfaceMaskGradientRequestBus", + "context": "EBusSender", + "variant": "", + "details": { + "name": "Surface Mask Gradient" + }, + "methods": [ + { + "base": "GetNumTags", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke GetNumTags" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after GetNumTags is invoked" + }, + "details": { + "name": "GetNumTags" + }, + "results": [ + { + "typeid": "{D6597933-47CD-4FC8-B911-63F3E2B0993A}", + "details": { + "name": "AZ::u64" + } + } + ] + }, + { + "base": "GetTag", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke GetTag" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after GetTag is invoked" + }, + "details": { + "name": "GetTag" + }, + "params": [ + { + "typeid": "{72039442-EB38-4D42-A1AD-CB68F7E0EEF6}", + "details": { + "name": "int" + } + } + ], + "results": [ + { + "typeid": "{9F4E062E-06A0-46D4-85DF-E0DA96467D3A}", + "details": { + "name": "Crc32" + } + } + ] + }, + { + "base": "RemoveTag", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke RemoveTag" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after RemoveTag is invoked" + }, + "details": { + "name": "RemoveTag" + }, + "params": [ + { + "typeid": "{72039442-EB38-4D42-A1AD-CB68F7E0EEF6}", + "details": { + "name": "int" + } + } + ] + }, + { + "base": "AddTag", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke AddTag" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after AddTag is invoked" + }, + "details": { + "name": "AddTag" + }, + "params": [ + { + "typeid": "{03AAAB3F-5C47-5A66-9EBC-D5FA4DB353C9}", + "details": { + "name": "AZStd::string" + } + } + ] + } + ] + } + ] +} \ No newline at end of file diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/EBus/Senders/SurfaceSlopeGradientRequestBus.names b/Gems/ScriptCanvas/Assets/TranslationAssets/EBus/Senders/SurfaceSlopeGradientRequestBus.names new file mode 100644 index 0000000000..ac699f5fc5 --- /dev/null +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/EBus/Senders/SurfaceSlopeGradientRequestBus.names @@ -0,0 +1,242 @@ +{ + "entries": [ + { + "base": "SurfaceSlopeGradientRequestBus", + "context": "EBusSender", + "variant": "", + "details": { + "name": "Surface Slope Gradient" + }, + "methods": [ + { + "base": "SetRampType", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke SetRampType" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after SetRampType is invoked" + }, + "details": { + "name": "SetRampType" + }, + "params": [ + { + "typeid": "{72B9409A-7D1A-4831-9CFE-FCB3FADD3426}", + "details": { + "name": "unsigned char" + } + } + ] + }, + { + "base": "GetTag", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke GetTag" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after GetTag is invoked" + }, + "details": { + "name": "GetTag" + }, + "params": [ + { + "typeid": "{72039442-EB38-4D42-A1AD-CB68F7E0EEF6}", + "details": { + "name": "int" + } + } + ], + "results": [ + { + "typeid": "{9F4E062E-06A0-46D4-85DF-E0DA96467D3A}", + "details": { + "name": "Crc32" + } + } + ] + }, + { + "base": "AddTag", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke AddTag" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after AddTag is invoked" + }, + "details": { + "name": "AddTag" + }, + "params": [ + { + "typeid": "{03AAAB3F-5C47-5A66-9EBC-D5FA4DB353C9}", + "details": { + "name": "AZStd::string" + } + } + ] + }, + { + "base": "SetSlopeMax", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke SetSlopeMax" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after SetSlopeMax is invoked" + }, + "details": { + "name": "SetSlopeMax" + }, + "params": [ + { + "typeid": "{EA2C3E90-AFBE-44D4-A90D-FAAF79BAF93D}", + "details": { + "name": "float" + } + } + ] + }, + { + "base": "GetNumTags", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke GetNumTags" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after GetNumTags is invoked" + }, + "details": { + "name": "GetNumTags" + }, + "results": [ + { + "typeid": "{D6597933-47CD-4FC8-B911-63F3E2B0993A}", + "details": { + "name": "AZ::u64" + } + } + ] + }, + { + "base": "RemoveTag", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke RemoveTag" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after RemoveTag is invoked" + }, + "details": { + "name": "RemoveTag" + }, + "params": [ + { + "typeid": "{72039442-EB38-4D42-A1AD-CB68F7E0EEF6}", + "details": { + "name": "int" + } + } + ] + }, + { + "base": "GetRampType", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke GetRampType" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after GetRampType is invoked" + }, + "details": { + "name": "GetRampType" + }, + "results": [ + { + "typeid": "{72B9409A-7D1A-4831-9CFE-FCB3FADD3426}", + "details": { + "name": "unsigned char" + } + } + ] + }, + { + "base": "GetSlopeMax", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke GetSlopeMax" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after GetSlopeMax is invoked" + }, + "details": { + "name": "GetSlopeMax" + }, + "results": [ + { + "typeid": "{EA2C3E90-AFBE-44D4-A90D-FAAF79BAF93D}", + "details": { + "name": "float" + } + } + ] + }, + { + "base": "SetSlopeMin", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke SetSlopeMin" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after SetSlopeMin is invoked" + }, + "details": { + "name": "SetSlopeMin" + }, + "params": [ + { + "typeid": "{EA2C3E90-AFBE-44D4-A90D-FAAF79BAF93D}", + "details": { + "name": "float" + } + } + ] + }, + { + "base": "GetSlopeMin", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke GetSlopeMin" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after GetSlopeMin is invoked" + }, + "details": { + "name": "GetSlopeMin" + }, + "results": [ + { + "typeid": "{EA2C3E90-AFBE-44D4-A90D-FAAF79BAF93D}", + "details": { + "name": "float" + } + } + ] + } + ] + } + ] +} \ No newline at end of file diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/EBus/Senders/TagComponentRequestBus.names b/Gems/ScriptCanvas/Assets/TranslationAssets/EBus/Senders/TagComponentRequestBus.names new file mode 100644 index 0000000000..f1d8a7bc31 --- /dev/null +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/EBus/Senders/TagComponentRequestBus.names @@ -0,0 +1,89 @@ +{ + "entries": [ + { + "base": "TagComponentRequestBus", + "context": "EBusSender", + "variant": "", + "details": { + "name": "Requests", + "category": "Gameplay/Tag" + }, + "methods": [ + { + "base": "HasTag", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Has Tag" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Has Tag is invoked" + }, + "details": { + "name": "Has Tag" + }, + "params": [ + { + "typeid": "{9F4E062E-06A0-46D4-85DF-E0DA96467D3A}", + "details": { + "name": "Tag" + } + } + ], + "results": [ + { + "typeid": "{A0CA880C-AFE4-43CB-926C-59AC48496112}", + "details": { + "name": "Has Tag" + } + } + ] + }, + { + "base": "AddTag", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Add Tag" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Add Tag is invoked" + }, + "details": { + "name": "Add Tag" + }, + "params": [ + { + "typeid": "{9F4E062E-06A0-46D4-85DF-E0DA96467D3A}", + "details": { + "name": "Tag" + } + } + ] + }, + { + "base": "RemoveTag", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Remove Tag" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Remove Tag is invoked" + }, + "details": { + "name": "Remove Tag" + }, + "params": [ + { + "typeid": "{9F4E062E-06A0-46D4-85DF-E0DA96467D3A}", + "details": { + "name": "Tag" + } + } + ] + } + ] + } + ] +} \ No newline at end of file diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/EBus/Senders/TagGlobalRequestBus.names b/Gems/ScriptCanvas/Assets/TranslationAssets/EBus/Senders/TagGlobalRequestBus.names new file mode 100644 index 0000000000..8136a2c947 --- /dev/null +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/EBus/Senders/TagGlobalRequestBus.names @@ -0,0 +1,38 @@ +{ + "entries": [ + { + "base": "TagGlobalRequestBus", + "context": "EBusSender", + "variant": "", + "details": { + "name": "Requests", + "category": "Gameplay/Tag" + }, + "methods": [ + { + "base": "RequestTaggedEntities", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Request Tagged Entities" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Request Tagged Entities is invoked" + }, + "details": { + "name": "Request Tagged Entities" + }, + "results": [ + { + "typeid": "{6383F1D3-BB27-4E6B-A49A-6409B2059EAA}", + "details": { + "name": "Entity Id", + "tooltip": "Entity Unique Id" + } + } + ] + } + ] + } + ] +} \ No newline at end of file diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/EBus/Senders/TerrainDataRequestBus.names b/Gems/ScriptCanvas/Assets/TranslationAssets/EBus/Senders/TerrainDataRequestBus.names new file mode 100644 index 0000000000..50b0c9794b --- /dev/null +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/EBus/Senders/TerrainDataRequestBus.names @@ -0,0 +1,437 @@ +{ + "entries": [ + { + "base": "TerrainDataRequestBus", + "context": "EBusSender", + "variant": "", + "details": { + "name": "Terrain Data" + }, + "methods": [ + { + "base": "GetIsHoleFromFloats", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Get Is Hole From Floats" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Get Is Hole From Floats is invoked" + }, + "details": { + "name": "Get Is Hole From Floats" + }, + "params": [ + { + "typeid": "{EA2C3E90-AFBE-44D4-A90D-FAAF79BAF93D}", + "details": { + "name": "X" + } + }, + { + "typeid": "{EA2C3E90-AFBE-44D4-A90D-FAAF79BAF93D}", + "details": { + "name": "Y" + } + }, + { + "typeid": "{72039442-EB38-4D42-A1AD-CB68F7E0EEF6}", + "details": { + "name": "Sample Filter", + "tooltip": "0: Bilinear, 1: Clamp, 2: Exact" + } + } + ], + "results": [ + { + "typeid": "{A0CA880C-AFE4-43CB-926C-59AC48496112}", + "details": { + "name": "Terrain Exists" + } + } + ] + }, + { + "base": "GetSurfaceWeightsFromVector2", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Get Surface Weights From Vector2" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Get Surface Weights From Vector2 is invoked" + }, + "details": { + "name": "Get Surface Weights From Vector2" + }, + "params": [ + { + "typeid": "{3D80F623-C85C-4741-90D0-E4E66164E6BF}", + "details": { + "name": "Position" + } + }, + { + "typeid": "{8F60B4D4-06F0-577C-AFB9-ECBFA7B66D4E}", + "details": { + "name": "Surface Weights" + } + }, + { + "typeid": "{72039442-EB38-4D42-A1AD-CB68F7E0EEF6}", + "details": { + "name": "Sample Filter", + "tooltip": "0: Bilinear, 1: Clamp, 2: Exact" + } + }, + { + "typeid": "{A0CA880C-AFE4-43CB-926C-59AC48496112}", + "details": { + "name": "Terrain Exists" + } + } + ] + }, + { + "base": "GetSurfaceWeights", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke GetSurfaceWeights" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after GetSurfaceWeights is invoked" + }, + "details": { + "name": "GetSurfaceWeights" + }, + "params": [ + { + "typeid": "{8379EB7D-01FA-4538-B64B-A6543B4BE73D}", + "details": { + "name": "Position" + } + }, + { + "typeid": "{8F60B4D4-06F0-577C-AFB9-ECBFA7B66D4E}", + "details": { + "name": "Surface Weights" + } + }, + { + "typeid": "{72039442-EB38-4D42-A1AD-CB68F7E0EEF6}", + "details": { + "name": "Sample Filter", + "tooltip": "0: Bilinear, 1: Clamp, 2: Exact" + } + }, + { + "typeid": "{A0CA880C-AFE4-43CB-926C-59AC48496112}", + "details": { + "name": "Terrain Exists" + } + } + ] + }, + { + "base": "GetMaxSurfaceWeight", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Get Max Surface Weight" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Get Max Surface Weight is invoked" + }, + "details": { + "name": "Get Max Surface Weight" + }, + "params": [ + { + "typeid": "{8379EB7D-01FA-4538-B64B-A6543B4BE73D}", + "details": { + "name": "Position" + } + }, + { + "typeid": "{72039442-EB38-4D42-A1AD-CB68F7E0EEF6}", + "details": { + "name": "Sample Filter", + "tooltip": "0: Bilinear, 1: Clamp, 2: Exact" + } + }, + { + "typeid": "{A0CA880C-AFE4-43CB-926C-59AC48496112}", + "details": { + "name": "Terrain Exists" + } + } + ], + "results": [ + { + "typeid": "{EA14018E-E853-4BF5-8E13-D83BB99A54CC}", + "details": { + "name": "Surface Tag Weight" + } + } + ] + }, + { + "base": "GetSurfacePointFromVector2", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Get Surface Point From Vector2" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Get Surface Point From Vector2 is invoked" + }, + "details": { + "name": "Get Surface Point From Vector2" + }, + "params": [ + { + "typeid": "{3D80F623-C85C-4741-90D0-E4E66164E6BF}", + "details": { + "name": "Position" + } + }, + { + "typeid": "{331A3D0E-BB1D-47BF-96A2-249FAA0D720D}", + "details": { + "name": "Surface Point" + } + }, + { + "typeid": "{72039442-EB38-4D42-A1AD-CB68F7E0EEF6}", + "details": { + "name": "Sample Filter", + "tooltip": "0: Bilinear, 1: Clamp, 2: Exact" + } + }, + { + "typeid": "{A0CA880C-AFE4-43CB-926C-59AC48496112}", + "details": { + "name": "Terrain Exists" + } + } + ] + }, + { + "base": "GetTerrainHeightQueryResolution", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Get Terrain Height Query Resolution" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Get Terrain Height Query Resolution is invoked" + }, + "details": { + "name": "Get Terrain Height Query Resolution" + }, + "results": [ + { + "typeid": "{3D80F623-C85C-4741-90D0-E4E66164E6BF}", + "details": { + "name": "Position" + } + } + ] + }, + { + "base": "GetNormal", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Get Normal" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Get Normal is invoked" + }, + "details": { + "name": "Get Normal" + }, + "params": [ + { + "typeid": "{8379EB7D-01FA-4538-B64B-A6543B4BE73D}", + "details": { + "name": "Position" + } + }, + { + "typeid": "{72039442-EB38-4D42-A1AD-CB68F7E0EEF6}", + "details": { + "name": "Sample Filter", + "tooltip": "0: Bilinear, 1: Clamp, 2: Exact" + } + }, + { + "typeid": "{A0CA880C-AFE4-43CB-926C-59AC48496112}", + "details": { + "name": "Terrain Exists" + } + } + ], + "results": [ + { + "typeid": "{8379EB7D-01FA-4538-B64B-A6543B4BE73D}", + "details": { + "name": "Normal" + } + } + ] + }, + { + "base": "GetMaxSurfaceWeightFromVector2", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Get Max Surface Weight From Vector2" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Get Max Surface Weight From Vector2 is invoked" + }, + "details": { + "name": "Get Max Surface Weight From Vector2" + }, + "params": [ + { + "typeid": "{3D80F623-C85C-4741-90D0-E4E66164E6BF}", + "details": { + "name": "Position" + } + }, + { + "typeid": "{72039442-EB38-4D42-A1AD-CB68F7E0EEF6}", + "details": { + "name": "Sample Filter", + "tooltip": "0: Bilinear, 1: Clamp, 2: Exact" + } + }, + { + "typeid": "{A0CA880C-AFE4-43CB-926C-59AC48496112}", + "details": { + "name": "Terrain Exists" + } + } + ], + "results": [ + { + "typeid": "{EA14018E-E853-4BF5-8E13-D83BB99A54CC}", + "details": { + "name": "Surface Tag Weight" + } + } + ] + }, + { + "base": "GetTerrainAabb", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Get Terrain AABB" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Get Terrain AABB is invoked" + }, + "details": { + "name": "Get Terrain AABB" + }, + "results": [ + { + "typeid": "{A54C2B36-D5B8-46A1-A529-4EBDBD2450E7}", + "details": { + "name": "AABB" + } + } + ] + }, + { + "base": "GetHeight", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Get Height" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Get Height is invoked" + }, + "details": { + "name": "Get Height" + }, + "params": [ + { + "typeid": "{8379EB7D-01FA-4538-B64B-A6543B4BE73D}", + "details": { + "name": "Position" + } + }, + { + "typeid": "{72039442-EB38-4D42-A1AD-CB68F7E0EEF6}", + "details": { + "name": "Sample Filter", + "tooltip": "0: Bilinear, 1: Clamp, 2: Exact" + } + }, + { + "typeid": "{A0CA880C-AFE4-43CB-926C-59AC48496112}", + "details": { + "name": "Terrain Exists" + } + } + ], + "results": [ + { + "typeid": "{EA2C3E90-AFBE-44D4-A90D-FAAF79BAF93D}", + "details": { + "name": "Height" + } + } + ] + }, + { + "base": "GetSurfacePoint", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Get Surface Point" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Get Surface Point is invoked" + }, + "details": { + "name": "Get Surface Point" + }, + "params": [ + { + "typeid": "{8379EB7D-01FA-4538-B64B-A6543B4BE73D}", + "details": { + "name": "Position" + } + }, + { + "typeid": "{331A3D0E-BB1D-47BF-96A2-249FAA0D720D}", + "details": { + "name": "Surface Point" + } + }, + { + "typeid": "{72039442-EB38-4D42-A1AD-CB68F7E0EEF6}", + "details": { + "name": "Sample Filter", + "tooltip": "0: Bilinear, 1: Clamp, 2: Exact" + } + }, + { + "typeid": "{A0CA880C-AFE4-43CB-926C-59AC48496112}", + "details": { + "name": "Terrain Exists" + } + } + ] + } + ] + } + ] +} \ No newline at end of file diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/EBus/Senders/ThresholdGradientRequestBus.names b/Gems/ScriptCanvas/Assets/TranslationAssets/EBus/Senders/ThresholdGradientRequestBus.names new file mode 100644 index 0000000000..8ffeee9ab3 --- /dev/null +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/EBus/Senders/ThresholdGradientRequestBus.names @@ -0,0 +1,80 @@ +{ + "entries": [ + { + "base": "ThresholdGradientRequestBus", + "context": "EBusSender", + "variant": "", + "details": { + "name": "Threshold Gradient" + }, + "methods": [ + { + "base": "GetThreshold", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke GetThreshold" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after GetThreshold is invoked" + }, + "details": { + "name": "GetThreshold" + }, + "results": [ + { + "typeid": "{EA2C3E90-AFBE-44D4-A90D-FAAF79BAF93D}", + "details": { + "name": "float" + } + } + ] + }, + { + "base": "SetThreshold", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke SetThreshold" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after SetThreshold is invoked" + }, + "details": { + "name": "SetThreshold" + }, + "params": [ + { + "typeid": "{EA2C3E90-AFBE-44D4-A90D-FAAF79BAF93D}", + "details": { + "name": "float" + } + } + ] + }, + { + "base": "GetGradientSampler", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke GetGradientSampler" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after GetGradientSampler is invoked" + }, + "details": { + "name": "GetGradientSampler" + }, + "results": [ + { + "typeid": "{3768D3A6-BF70-4ABC-B4EC-73C75A886916}", + "details": { + "name": "Gradient Sampler" + } + } + ] + } + ] + } + ] +} \ No newline at end of file diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/EBus/Senders/TickRequestBus.names b/Gems/ScriptCanvas/Assets/TranslationAssets/EBus/Senders/TickRequestBus.names new file mode 100644 index 0000000000..f3589b8d78 --- /dev/null +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/EBus/Senders/TickRequestBus.names @@ -0,0 +1,59 @@ +{ + "entries": [ + { + "base": "TickRequestBus", + "context": "EBusSender", + "variant": "", + "details": { + "name": "Tick", + "category": "Timing" + }, + "methods": [ + { + "base": "GetTickDeltaTime", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Get Tick Delta Time" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Get Tick Delta Time is invoked" + }, + "details": { + "name": "Get Tick Delta Time" + }, + "results": [ + { + "typeid": "{EA2C3E90-AFBE-44D4-A90D-FAAF79BAF93D}", + "details": { + "name": "float" + } + } + ] + }, + { + "base": "GetTimeAtCurrentTick", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Get Time At Current Tick" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Get Time At Current Tick is invoked" + }, + "details": { + "name": "Get Time At Current Tick" + }, + "results": [ + { + "typeid": "{4C0F6AD4-0D4F-4354-AD4A-0C01E948245C}", + "details": { + "name": "Script Time Point" + } + } + ] + } + ] + } + ] +} \ No newline at end of file diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/EBus/Senders/ToolsApplicationRequestBus.names b/Gems/ScriptCanvas/Assets/TranslationAssets/EBus/Senders/ToolsApplicationRequestBus.names new file mode 100644 index 0000000000..a3c9841952 --- /dev/null +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/EBus/Senders/ToolsApplicationRequestBus.names @@ -0,0 +1,468 @@ +{ + "entries": [ + { + "base": "ToolsApplicationRequestBus", + "context": "EBusSender", + "variant": "", + "details": { + "name": "Tools Application" + }, + "methods": [ + { + "base": "MarkEntitySelected", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke MarkEntitySelected" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after MarkEntitySelected is invoked" + }, + "details": { + "name": "MarkEntitySelected" + }, + "params": [ + { + "typeid": "{6383F1D3-BB27-4E6B-A49A-6409B2059EAA}", + "details": { + "name": "EntityId", + "tooltip": "Entity Unique Id" + } + } + ] + }, + { + "base": "IsSelected", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke IsSelected" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after IsSelected is invoked" + }, + "details": { + "name": "IsSelected" + }, + "params": [ + { + "typeid": "{6383F1D3-BB27-4E6B-A49A-6409B2059EAA}", + "details": { + "name": "EntityId", + "tooltip": "Entity Unique Id" + } + } + ], + "results": [ + { + "typeid": "{A0CA880C-AFE4-43CB-926C-59AC48496112}", + "details": { + "name": "bool" + } + } + ] + }, + { + "base": "GetSelectedEntitiesCount", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke GetSelectedEntitiesCount" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after GetSelectedEntitiesCount is invoked" + }, + "details": { + "name": "GetSelectedEntitiesCount" + }, + "results": [ + { + "typeid": "{72039442-EB38-4D42-A1AD-CB68F7E0EEF6}", + "details": { + "name": "int" + } + } + ] + }, + { + "base": "GetSelectedEntities", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke GetSelectedEntities" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after GetSelectedEntities is invoked" + }, + "details": { + "name": "GetSelectedEntities" + }, + "results": [ + { + "typeid": "{4841CFF0-7A5C-519C-BD16-D3625E99605E}", + "details": { + "name": "AZStd::vector" + } + } + ] + }, + { + "base": "DeleteEntitiesAndAllDescendants", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke DeleteEntitiesAndAllDescendants" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after DeleteEntitiesAndAllDescendants is invoked" + }, + "details": { + "name": "DeleteEntitiesAndAllDescendants" + }, + "params": [ + { + "typeid": "{4841CFF0-7A5C-519C-BD16-D3625E99605E}", + "details": { + "name": "AZStd::vector" + } + } + ] + }, + { + "base": "GetExistingEntity", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke GetExistingEntity" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after GetExistingEntity is invoked" + }, + "details": { + "name": "GetExistingEntity" + }, + "params": [ + { + "typeid": "{D6597933-47CD-4FC8-B911-63F3E2B0993A}", + "details": { + "name": "AZ::u64" + } + } + ], + "results": [ + { + "typeid": "{6383F1D3-BB27-4E6B-A49A-6409B2059EAA}", + "details": { + "name": "EntityId", + "tooltip": "Entity Unique Id" + } + } + ] + }, + { + "base": "SetSelectedEntities", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke SetSelectedEntities" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after SetSelectedEntities is invoked" + }, + "details": { + "name": "SetSelectedEntities" + }, + "params": [ + { + "typeid": "{4841CFF0-7A5C-519C-BD16-D3625E99605E}", + "details": { + "name": "AZStd::vector" + } + } + ] + }, + { + "base": "MarkEntitiesSelected", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke MarkEntitiesSelected" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after MarkEntitiesSelected is invoked" + }, + "details": { + "name": "MarkEntitiesSelected" + }, + "params": [ + { + "typeid": "{4841CFF0-7A5C-519C-BD16-D3625E99605E}", + "details": { + "name": "AZStd::vector" + } + } + ] + }, + { + "base": "MarkEntityDeselected", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke MarkEntityDeselected" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after MarkEntityDeselected is invoked" + }, + "details": { + "name": "MarkEntityDeselected" + }, + "params": [ + { + "typeid": "{6383F1D3-BB27-4E6B-A49A-6409B2059EAA}", + "details": { + "name": "EntityId", + "tooltip": "Entity Unique Id" + } + } + ] + }, + { + "base": "GetCurrentLevelEntityId", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke GetCurrentLevelEntityId" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after GetCurrentLevelEntityId is invoked" + }, + "details": { + "name": "GetCurrentLevelEntityId" + }, + "results": [ + { + "typeid": "{6383F1D3-BB27-4E6B-A49A-6409B2059EAA}", + "details": { + "name": "EntityId", + "tooltip": "Entity Unique Id" + } + } + ] + }, + { + "base": "AreAnyEntitiesSelected", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke AreAnyEntitiesSelected" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after AreAnyEntitiesSelected is invoked" + }, + "details": { + "name": "AreAnyEntitiesSelected" + }, + "results": [ + { + "typeid": "{A0CA880C-AFE4-43CB-926C-59AC48496112}", + "details": { + "name": "bool" + } + } + ] + }, + { + "base": "CreateNewEntityAtPosition", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke CreateNewEntityAtPosition" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after CreateNewEntityAtPosition is invoked" + }, + "details": { + "name": "CreateNewEntityAtPosition" + }, + "params": [ + { + "typeid": "{8379EB7D-01FA-4538-B64B-A6543B4BE73D}", + "details": { + "name": "Vector3" + } + }, + { + "typeid": "{6383F1D3-BB27-4E6B-A49A-6409B2059EAA}", + "details": { + "name": "EntityId", + "tooltip": "Entity Unique Id" + } + } + ], + "results": [ + { + "typeid": "{6383F1D3-BB27-4E6B-A49A-6409B2059EAA}", + "details": { + "name": "EntityId", + "tooltip": "Entity Unique Id" + } + } + ] + }, + { + "base": "DeleteEntityAndAllDescendants", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke DeleteEntityAndAllDescendants" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after DeleteEntityAndAllDescendants is invoked" + }, + "details": { + "name": "DeleteEntityAndAllDescendants" + }, + "params": [ + { + "typeid": "{6383F1D3-BB27-4E6B-A49A-6409B2059EAA}", + "details": { + "name": "EntityId", + "tooltip": "Entity Unique Id" + } + } + ] + }, + { + "base": "CreateNewEntity", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke CreateNewEntity" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after CreateNewEntity is invoked" + }, + "details": { + "name": "CreateNewEntity" + }, + "params": [ + { + "typeid": "{6383F1D3-BB27-4E6B-A49A-6409B2059EAA}", + "details": { + "name": "EntityId", + "tooltip": "Entity Unique Id" + } + } + ], + "results": [ + { + "typeid": "{6383F1D3-BB27-4E6B-A49A-6409B2059EAA}", + "details": { + "name": "EntityId", + "tooltip": "Entity Unique Id" + } + } + ] + }, + { + "base": "EntityExists", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke EntityExists" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after EntityExists is invoked" + }, + "details": { + "name": "EntityExists" + }, + "params": [ + { + "typeid": "{6383F1D3-BB27-4E6B-A49A-6409B2059EAA}", + "details": { + "name": "EntityId", + "tooltip": "Entity Unique Id" + } + } + ], + "results": [ + { + "typeid": "{A0CA880C-AFE4-43CB-926C-59AC48496112}", + "details": { + "name": "bool" + } + } + ] + }, + { + "base": "DeleteEntityById", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke DeleteEntityById" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after DeleteEntityById is invoked" + }, + "details": { + "name": "DeleteEntityById" + }, + "params": [ + { + "typeid": "{6383F1D3-BB27-4E6B-A49A-6409B2059EAA}", + "details": { + "name": "EntityId", + "tooltip": "Entity Unique Id" + } + } + ] + }, + { + "base": "DeleteEntities", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke DeleteEntities" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after DeleteEntities is invoked" + }, + "details": { + "name": "DeleteEntities" + }, + "params": [ + { + "typeid": "{4841CFF0-7A5C-519C-BD16-D3625E99605E}", + "details": { + "name": "AZStd::vector" + } + } + ] + }, + { + "base": "MarkEntitiesDeselected", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke MarkEntitiesDeselected" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after MarkEntitiesDeselected is invoked" + }, + "details": { + "name": "MarkEntitiesDeselected" + }, + "params": [ + { + "typeid": "{4841CFF0-7A5C-519C-BD16-D3625E99605E}", + "details": { + "name": "AZStd::vector" + } + } + ] + } + ] + } + ] +} \ No newline at end of file diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/EBus/Senders/TransformBus.names b/Gems/ScriptCanvas/Assets/TranslationAssets/EBus/Senders/TransformBus.names new file mode 100644 index 0000000000..2d8bc4ede4 --- /dev/null +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/EBus/Senders/TransformBus.names @@ -0,0 +1,950 @@ +{ + "entries": [ + { + "base": "TransformBus", + "context": "EBusSender", + "variant": "", + "details": { + "name": "Transform", + "category": "Entity" + }, + "methods": [ + { + "base": "SetLocalUniformScale", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Set Local Uniform Scale" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Set Local Uniform Scale is invoked" + }, + "details": { + "name": "Set Local Uniform Scale" + }, + "params": [ + { + "typeid": "{EA2C3E90-AFBE-44D4-A90D-FAAF79BAF93D}", + "details": { + "name": "Local Uniform Scale" + } + } + ] + }, + { + "base": "SetLocalRotationQuaternion", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Set Local Rotation Quaternion" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Set Local Rotation Quaternion is invoked" + }, + "details": { + "name": "Set Local Rotation Quaternion" + }, + "params": [ + { + "typeid": "{73103120-3DD3-4873-BAB3-9713FA2804FB}", + "details": { + "name": "Quaternion" + } + } + ] + }, + { + "base": "GetLocalRotation", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Get Local Rotation" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Get Local Rotation is invoked" + }, + "details": { + "name": "Get Local Rotation" + }, + "results": [ + { + "typeid": "{8379EB7D-01FA-4538-B64B-A6543B4BE73D}", + "details": { + "name": "Angles (Radians)" + } + } + ] + }, + { + "base": "GetLocalTM", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Get Local Transform" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Get Local Transform is invoked" + }, + "details": { + "name": "Get Local Transform", + "tooltip": "Returns the entity's local transform, not including the parent transform" + }, + "results": [ + { + "typeid": "{5D9958E9-9F1E-4985-B532-FFFDE75FEDFD}", + "details": { + "name": "Transform" + } + } + ] + }, + { + "base": "GetEntityAndAllDescendants", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Get Entity And All Descendants" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Get Entity And All Descendants is invoked" + }, + "details": { + "name": "Get Entity And All Descendants" + }, + "results": [ + { + "typeid": "{4841CFF0-7A5C-519C-BD16-D3625E99605E}", + "details": { + "name": "Entity and Descendants" + } + } + ] + }, + { + "base": "SetLocalZ", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Set Local Z" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Set Local Z is invoked" + }, + "details": { + "name": "Set Local Z" + }, + "params": [ + { + "typeid": "{EA2C3E90-AFBE-44D4-A90D-FAAF79BAF93D}", + "details": { + "name": "Z" + } + } + ] + }, + { + "base": "GetAllDescendants", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Get All Descendants" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Get All Descendants is invoked" + }, + "details": { + "name": "Get All Descendants" + }, + "results": [ + { + "typeid": "{4841CFF0-7A5C-519C-BD16-D3625E99605E}", + "details": { + "name": "Descendants" + } + } + ] + }, + { + "base": "GetLocalAndWorld", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Get Local And World" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Get Local And World is invoked" + }, + "details": { + "name": "Get Local And World Transforms" + }, + "params": [ + { + "typeid": "{5D9958E9-9F1E-4985-B532-FFFDE75FEDFD}", + "details": { + "name": "Local" + } + }, + { + "typeid": "{5D9958E9-9F1E-4985-B532-FFFDE75FEDFD}", + "details": { + "name": "World" + } + } + ] + }, + { + "base": "RotateAroundLocalZ", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Rotate Around Local Z" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Rotate Around Local Z is invoked" + }, + "details": { + "name": "Rotate Around Local Z" + }, + "params": [ + { + "typeid": "{EA2C3E90-AFBE-44D4-A90D-FAAF79BAF93D}", + "details": { + "name": "Angle (Radians)" + } + } + ] + }, + { + "base": "GetWorldRotationQuaternion", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Get World Rotation Quaternion" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Get World Rotation Quaternion is invoked" + }, + "details": { + "name": "Get World Rotation Quaternion" + }, + "results": [ + { + "typeid": "{73103120-3DD3-4873-BAB3-9713FA2804FB}", + "details": { + "name": "Quaternion" + } + } + ] + }, + { + "base": "RotateAroundLocalX", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Rotate Around Local X" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Rotate Around Local X is invoked" + }, + "details": { + "name": "Rotate Around Local X" + }, + "params": [ + { + "typeid": "{EA2C3E90-AFBE-44D4-A90D-FAAF79BAF93D}", + "details": { + "name": "Angle (Radians)" + } + } + ] + }, + { + "base": "SetParent", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Set Parent" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Set Parent is invoked" + }, + "details": { + "name": "Set Parent" + }, + "params": [ + { + "typeid": "{6383F1D3-BB27-4E6B-A49A-6409B2059EAA}", + "details": { + "name": "Parent", + "tooltip": "Entity Unique Id" + } + } + ] + }, + { + "base": "GetLocalZ", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Get Local Z" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Get Local Z is invoked" + }, + "details": { + "name": "Get Local Z" + }, + "results": [ + { + "typeid": "{EA2C3E90-AFBE-44D4-A90D-FAAF79BAF93D}", + "details": { + "name": "Z" + } + } + ] + }, + { + "base": "SetLocalRotation", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Set Local Rotation" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after SetLocalRotation is invoked" + }, + "details": { + "name": "Set Local Rotation" + }, + "params": [ + { + "typeid": "{8379EB7D-01FA-4538-B64B-A6543B4BE73D}", + "details": { + "name": "Euler Angles (Radians)" + } + } + ] + }, + { + "base": "SetLocalX", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Set Local X" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Set Local X is invoked" + }, + "details": { + "name": "Set Local X" + }, + "params": [ + { + "typeid": "{EA2C3E90-AFBE-44D4-A90D-FAAF79BAF93D}", + "details": { + "name": "X" + } + } + ] + }, + { + "base": "GetLocalRotationQuaternion", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Get Local Rotation Quaternion" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Get Local Rotation Quaternion is invoked" + }, + "details": { + "name": "Get Local Rotation Quaternion" + }, + "results": [ + { + "typeid": "{73103120-3DD3-4873-BAB3-9713FA2804FB}", + "details": { + "name": "Quaternion" + } + } + ] + }, + { + "base": "GetWorldX", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Get World X" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Get World X is invoked" + }, + "details": { + "name": "Get World X" + }, + "results": [ + { + "typeid": "{EA2C3E90-AFBE-44D4-A90D-FAAF79BAF93D}", + "details": { + "name": "X" + } + } + ] + }, + { + "base": "SetWorldTranslation", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Set World Translation" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Set World Translation is invoked" + }, + "details": { + "name": "Set World Translation" + }, + "params": [ + { + "typeid": "{8379EB7D-01FA-4538-B64B-A6543B4BE73D}", + "details": { + "name": "World Translation" + } + } + ] + }, + { + "base": "MoveEntity", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Move Entity" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Move Entity is invoked" + }, + "details": { + "name": "Move Entity" + }, + "params": [ + { + "typeid": "{8379EB7D-01FA-4538-B64B-A6543B4BE73D}", + "details": { + "name": "Offset" + } + } + ] + }, + { + "base": "GetChildren", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Get Children" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Get Children is invoked" + }, + "details": { + "name": "Get Children" + }, + "results": [ + { + "typeid": "{4841CFF0-7A5C-519C-BD16-D3625E99605E}", + "details": { + "name": "Children" + } + } + ] + }, + { + "base": "SetParentRelative", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Set Parent Relative" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Set Parent Relative is invoked" + }, + "details": { + "name": "Set Parent Relative" + }, + "params": [ + { + "typeid": "{6383F1D3-BB27-4E6B-A49A-6409B2059EAA}", + "details": { + "name": "Parent", + "tooltip": "Entity Unique Id" + } + } + ] + }, + { + "base": "SetWorldTM", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Set World Transform" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Set World Transform is invoked" + }, + "details": { + "name": "Set World Transform" + }, + "params": [ + { + "typeid": "{5D9958E9-9F1E-4985-B532-FFFDE75FEDFD}", + "details": { + "name": "Transform" + } + } + ] + }, + { + "base": "SetWorldRotationQuaternion", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Set World Rotation Quaternion" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Set World Rotation Quaternion is invoked" + }, + "details": { + "name": "Set World Rotation Quaternion" + }, + "params": [ + { + "typeid": "{73103120-3DD3-4873-BAB3-9713FA2804FB}", + "details": { + "name": "Quaternion" + } + } + ] + }, + { + "base": "SetWorldX", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Set World X" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Set World X is invoked" + }, + "details": { + "name": "Set World X" + }, + "params": [ + { + "typeid": "{EA2C3E90-AFBE-44D4-A90D-FAAF79BAF93D}", + "details": { + "name": "X" + } + } + ] + }, + { + "base": "GetWorldY", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Get World Y" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Get World Y is invoked" + }, + "details": { + "name": "Get World Y" + }, + "results": [ + { + "typeid": "{EA2C3E90-AFBE-44D4-A90D-FAAF79BAF93D}", + "details": { + "name": "Y" + } + } + ] + }, + { + "base": "GetLocalUniformScale", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Get Local Uniform Scale" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Get Local Uniform Scale is invoked" + }, + "details": { + "name": "Get Local Uniform Scale" + }, + "results": [ + { + "typeid": "{EA2C3E90-AFBE-44D4-A90D-FAAF79BAF93D}", + "details": { + "name": "Uniform Scale" + } + } + ] + }, + { + "base": "SetWorldZ", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Set World Z" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Set World Z is invoked" + }, + "details": { + "name": "Set World Z" + }, + "params": [ + { + "typeid": "{EA2C3E90-AFBE-44D4-A90D-FAAF79BAF93D}", + "details": { + "name": "Z" + } + } + ] + }, + { + "base": "SetLocalTM", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Set Local Transform" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Set Local Transform is invoked" + }, + "details": { + "name": "Set Local Transform" + }, + "params": [ + { + "typeid": "{5D9958E9-9F1E-4985-B532-FFFDE75FEDFD}", + "details": { + "name": "Transform" + } + } + ] + }, + { + "base": "SetLocalTranslation", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Set Local Translation" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Set Local Translation is invoked" + }, + "details": { + "name": "Set Local Translation" + }, + "params": [ + { + "typeid": "{8379EB7D-01FA-4538-B64B-A6543B4BE73D}", + "details": { + "name": "Translation" + } + } + ] + }, + { + "base": "GetLocalScale", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Get Local Scale" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Get Local Scale is invoked" + }, + "details": { + "name": "Get Local Scale" + }, + "results": [ + { + "typeid": "{8379EB7D-01FA-4538-B64B-A6543B4BE73D}", + "details": { + "name": "Scale" + } + } + ] + }, + { + "base": "SetWorldY", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Set World Y" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Set World Y is invoked" + }, + "details": { + "name": "Set World Y" + }, + "params": [ + { + "typeid": "{EA2C3E90-AFBE-44D4-A90D-FAAF79BAF93D}", + "details": { + "name": "Y" + } + } + ] + }, + { + "base": "RotateAroundLocalY", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Rotate Around Local Y" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Rotate Around Local Y is invoked" + }, + "details": { + "name": "Rotate Around Local Y" + }, + "params": [ + { + "typeid": "{EA2C3E90-AFBE-44D4-A90D-FAAF79BAF93D}", + "details": { + "name": "Euler Angle (Radians)" + } + } + ] + }, + { + "base": "GetLocalTranslation", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Get Local Translation" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Get Local Translation is invoked" + }, + "details": { + "name": "Get Local Translation" + }, + "results": [ + { + "typeid": "{8379EB7D-01FA-4538-B64B-A6543B4BE73D}", + "details": { + "name": "Translation" + } + } + ] + }, + { + "base": "GetWorldRotation", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Get World Rotation" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Get World Rotation is invoked" + }, + "details": { + "name": "Get World Rotation" + }, + "results": [ + { + "typeid": "{8379EB7D-01FA-4538-B64B-A6543B4BE73D}", + "details": { + "name": "Euler Angles (Radians)", + "tooltip": "Euler angles (Pitch, Yaw, Roll), in radians" + } + } + ] + }, + { + "base": "GetWorldZ", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Get World Z" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Get World Z is invoked" + }, + "details": { + "name": "Get World Z" + }, + "results": [ + { + "typeid": "{EA2C3E90-AFBE-44D4-A90D-FAAF79BAF93D}", + "details": { + "name": "Z" + } + } + ] + }, + { + "base": "GetLocalY", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Get Local Y" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Get Local Y is invoked" + }, + "details": { + "name": "Get Local Y" + }, + "results": [ + { + "typeid": "{EA2C3E90-AFBE-44D4-A90D-FAAF79BAF93D}", + "details": { + "name": "Y" + } + } + ] + }, + { + "base": "GetWorldTranslation", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Get World Translation" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Get World Translation is invoked" + }, + "details": { + "name": "Get World Translation" + }, + "results": [ + { + "typeid": "{8379EB7D-01FA-4538-B64B-A6543B4BE73D}", + "details": { + "name": "Translation" + } + } + ] + }, + { + "base": "SetLocalY", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Set Local Y" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Set Local Y is invoked" + }, + "details": { + "name": "Set Local Y" + }, + "params": [ + { + "typeid": "{EA2C3E90-AFBE-44D4-A90D-FAAF79BAF93D}", + "details": { + "name": "Y" + } + } + ] + }, + { + "base": "GetLocalX", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Get Local X" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Get Local X is invoked" + }, + "details": { + "name": "Get Local X" + }, + "results": [ + { + "typeid": "{EA2C3E90-AFBE-44D4-A90D-FAAF79BAF93D}", + "details": { + "name": "X" + } + } + ] + }, + { + "base": "GetWorldTM", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Get World Transform" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Get World Transform is invoked" + }, + "details": { + "name": "Get World Transform" + }, + "results": [ + { + "typeid": "{5D9958E9-9F1E-4985-B532-FFFDE75FEDFD}", + "details": { + "name": "Transform" + } + } + ] + }, + { + "base": "GetParentId", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Get Parent Id" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Get Parent Id is invoked" + }, + "details": { + "name": "Get Parent Id" + }, + "results": [ + { + "typeid": "{6383F1D3-BB27-4E6B-A49A-6409B2059EAA}", + "details": { + "name": "Parent Id", + "tooltip": "Entity Unique Id" + } + } + ] + }, + { + "base": "IsStaticTransform", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Is Static Transform" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Is Static Transform is invoked" + }, + "details": { + "name": "Is Static Transform" + }, + "results": [ + { + "typeid": "{A0CA880C-AFE4-43CB-926C-59AC48496112}", + "details": { + "name": "Is Static Transform" + } + } + ] + } + ] + } + ] +} \ No newline at end of file diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/EBus/Senders/TubeShapeComponentRequestsBus.names b/Gems/ScriptCanvas/Assets/TranslationAssets/EBus/Senders/TubeShapeComponentRequestsBus.names new file mode 100644 index 0000000000..93c77fc3e2 --- /dev/null +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/EBus/Senders/TubeShapeComponentRequestsBus.names @@ -0,0 +1,146 @@ +{ + "entries": [ + { + "base": "TubeShapeComponentRequestsBus", + "context": "EBusSender", + "variant": "", + "details": { + "name": "Tube Shape Component" + }, + "methods": [ + { + "base": "GetVariableRadius", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke GetVariableRadius" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after GetVariableRadius is invoked" + }, + "details": { + "name": "GetVariableRadius" + }, + "params": [ + { + "typeid": "{72039442-EB38-4D42-A1AD-CB68F7E0EEF6}", + "details": { + "name": "int" + } + } + ], + "results": [ + { + "typeid": "{EA2C3E90-AFBE-44D4-A90D-FAAF79BAF93D}", + "details": { + "name": "float" + } + } + ] + }, + { + "base": "SetVariableRadius", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke SetVariableRadius" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after SetVariableRadius is invoked" + }, + "details": { + "name": "SetVariableRadius" + }, + "params": [ + { + "typeid": "{72039442-EB38-4D42-A1AD-CB68F7E0EEF6}", + "details": { + "name": "int" + } + }, + { + "typeid": "{EA2C3E90-AFBE-44D4-A90D-FAAF79BAF93D}", + "details": { + "name": "float" + } + } + ] + }, + { + "base": "SetRadius", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke SetRadius" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after SetRadius is invoked" + }, + "details": { + "name": "SetRadius" + }, + "params": [ + { + "typeid": "{EA2C3E90-AFBE-44D4-A90D-FAAF79BAF93D}", + "details": { + "name": "float" + } + } + ] + }, + { + "base": "GetRadius", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke GetRadius" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after GetRadius is invoked" + }, + "details": { + "name": "GetRadius" + }, + "results": [ + { + "typeid": "{EA2C3E90-AFBE-44D4-A90D-FAAF79BAF93D}", + "details": { + "name": "float" + } + } + ] + }, + { + "base": "GetTotalRadius", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke GetTotalRadius" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after GetTotalRadius is invoked" + }, + "details": { + "name": "GetTotalRadius" + }, + "params": [ + { + "typeid": "{865BA2EC-43C5-4E1F-9B6F-2D63F6DC2E70}", + "details": { + "name": "SplineAddress" + } + } + ], + "results": [ + { + "typeid": "{EA2C3E90-AFBE-44D4-A90D-FAAF79BAF93D}", + "details": { + "name": "float" + } + } + ] + } + ] + } + ] +} \ No newline at end of file diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/EBus/Senders/UiAnimationBus.names b/Gems/ScriptCanvas/Assets/TranslationAssets/EBus/Senders/UiAnimationBus.names new file mode 100644 index 0000000000..07a619288a --- /dev/null +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/EBus/Senders/UiAnimationBus.names @@ -0,0 +1,380 @@ +{ + "entries": [ + { + "base": "UiAnimationBus", + "context": "EBusSender", + "variant": "", + "details": { + "name": "UI Animation", + "category": "UI" + }, + "methods": [ + { + "base": "ResetSequence", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Reset Sequence" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Reset Sequence is invoked" + }, + "details": { + "name": "Reset Sequence", + "tooltip": "Resets the sequence to the first frame" + }, + "params": [ + { + "typeid": "{03AAAB3F-5C47-5A66-9EBC-D5FA4DB353C9}", + "details": { + "name": "Sequence Name", + "tooltip": "The name of the sequence" + } + } + ] + }, + { + "base": "GetSequencePlayingSpeed", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Get Sequence Playing Speed" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Get Sequence Playing Speed is invoked" + }, + "details": { + "name": "Get Sequence Playing Speed", + "tooltip": "Gets the speed of the playing sequence" + }, + "params": [ + { + "typeid": "{03AAAB3F-5C47-5A66-9EBC-D5FA4DB353C9}", + "details": { + "name": "Sequence Name", + "tooltip": "The name of the sequence" + } + } + ], + "results": [ + { + "typeid": "{EA2C3E90-AFBE-44D4-A90D-FAAF79BAF93D}", + "details": { + "name": "float", + "tooltip": "The name of the sequence" + } + } + ] + }, + { + "base": "GetSequencePlayingTime", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Get Sequence Playing Time" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Get Sequence Playing Time is invoked" + }, + "details": { + "name": "Get Sequence Playing Time", + "tooltip": "Gets the current time of the playing sequence" + }, + "params": [ + { + "typeid": "{03AAAB3F-5C47-5A66-9EBC-D5FA4DB353C9}", + "details": { + "name": "Sequence Name", + "tooltip": "The name of the sequence" + } + } + ], + "results": [ + { + "typeid": "{EA2C3E90-AFBE-44D4-A90D-FAAF79BAF93D}", + "details": { + "name": "float", + "tooltip": "The name of the sequence" + } + } + ] + }, + { + "base": "AbortSequence", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Abort Sequence" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Abort Sequence is invoked" + }, + "details": { + "name": "Abort Sequence", + "tooltip": "Stops playing the sequence and displays the last frame" + }, + "params": [ + { + "typeid": "{03AAAB3F-5C47-5A66-9EBC-D5FA4DB353C9}", + "details": { + "name": "Sequence Name", + "tooltip": "The name of the sequence" + } + } + ] + }, + { + "base": "IsSequencePlaying", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Is Sequence Playing" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Is Sequence Playing is invoked" + }, + "details": { + "name": "Is Sequence Playing", + "tooltip": "Returns whether the sequence is currently playing" + }, + "params": [ + { + "typeid": "{03AAAB3F-5C47-5A66-9EBC-D5FA4DB353C9}", + "details": { + "name": "Sequence Name", + "tooltip": "The name of the sequence" + } + } + ], + "results": [ + { + "typeid": "{A0CA880C-AFE4-43CB-926C-59AC48496112}", + "details": { + "name": "bool", + "tooltip": "The name of the sequence" + } + } + ] + }, + { + "base": "GetSequenceLength", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Get Sequence Length" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Get Sequence Length is invoked" + }, + "details": { + "name": "Get Sequence Length", + "tooltip": "Gets the length of the sequence" + }, + "params": [ + { + "typeid": "{03AAAB3F-5C47-5A66-9EBC-D5FA4DB353C9}", + "details": { + "name": "Sequence Name", + "tooltip": "The name of the sequence" + } + } + ], + "results": [ + { + "typeid": "{EA2C3E90-AFBE-44D4-A90D-FAAF79BAF93D}", + "details": { + "name": "float", + "tooltip": "The name of the sequence" + } + } + ] + }, + { + "base": "StopSequence", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Stop Sequence" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Stop Sequence is invoked" + }, + "details": { + "name": "Stop Sequence", + "tooltip": "Stops playing the sequence and displays the last frame" + }, + "params": [ + { + "typeid": "{03AAAB3F-5C47-5A66-9EBC-D5FA4DB353C9}", + "details": { + "name": "Sequence Name", + "tooltip": "The name of the sequence" + } + } + ] + }, + { + "base": "PlaySequenceRange", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke PlaySequenceRange" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after PlaySequenceRange is invoked" + }, + "details": { + "name": "PlaySequenceRange" + }, + "params": [ + { + "typeid": "{03AAAB3F-5C47-5A66-9EBC-D5FA4DB353C9}", + "details": { + "name": "AZStd::string" + } + }, + { + "typeid": "{EA2C3E90-AFBE-44D4-A90D-FAAF79BAF93D}", + "details": { + "name": "float" + } + }, + { + "typeid": "{EA2C3E90-AFBE-44D4-A90D-FAAF79BAF93D}", + "details": { + "name": "float" + } + } + ] + }, + { + "base": "PauseSequence", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Pause Sequence" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Pause Sequence is invoked" + }, + "details": { + "name": "Pause Sequence", + "tooltip": "Pauses the playing sequence" + }, + "params": [ + { + "typeid": "{03AAAB3F-5C47-5A66-9EBC-D5FA4DB353C9}", + "details": { + "name": "Sequence Name", + "tooltip": "The name of the sequence" + } + } + ] + }, + { + "base": "ResumeSequence", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Resume Sequence" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Resume Sequence is invoked" + }, + "details": { + "name": "Resume Sequence", + "tooltip": "Resumes the paused sequence" + }, + "params": [ + { + "typeid": "{03AAAB3F-5C47-5A66-9EBC-D5FA4DB353C9}", + "details": { + "name": "Sequence Name", + "tooltip": "The name of the sequence" + } + } + ] + }, + { + "base": "StartSequence", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Start Sequence" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Start Sequence is invoked" + }, + "details": { + "name": "Start Sequence", + "tooltip": "Starts playing the sequence" + }, + "params": [ + { + "typeid": "{03AAAB3F-5C47-5A66-9EBC-D5FA4DB353C9}", + "details": { + "name": "Sequence Name", + "tooltip": "The name of the sequence" + } + } + ] + }, + { + "base": "SetSequencePlayingSpeed", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Set Sequence Playing Speed" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Set Sequence Playing Speed is invoked" + }, + "details": { + "name": "Set Sequence Playing Speed", + "tooltip": "Sets the speed of the playing sequence" + }, + "params": [ + { + "typeid": "{03AAAB3F-5C47-5A66-9EBC-D5FA4DB353C9}", + "details": { + "name": "Sequence Name", + "tooltip": "The name of the sequence" + } + }, + { + "typeid": "{EA2C3E90-AFBE-44D4-A90D-FAAF79BAF93D}", + "details": { + "name": "Speed", + "tooltip": "The speed of the playing sequence" + } + } + ] + }, + { + "base": "SetSequenceStopBehavior", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Set Sequence Stop Behavior" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Set Sequence Stop Behavior is invoked" + }, + "details": { + "name": "Set Sequence Stop Behavior", + "tooltip": "Sets the behavior a sequence will exhibit when it stops playing" + }, + "params": [ + { + "typeid": "{72039442-EB38-4D42-A1AD-CB68F7E0EEF6}", + "details": { + "name": "Stop Behavior", + "tooltip": "The behavior a sequence will exhibit when it stops playing (0=Leave Time, 1=Go To End Time, 2=Go To Start Time)" + } + } + ] + } + ] + } + ] +} \ No newline at end of file diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/EBus/Senders/UiButtonBus.names b/Gems/ScriptCanvas/Assets/TranslationAssets/EBus/Senders/UiButtonBus.names new file mode 100644 index 0000000000..f5b4c62fd1 --- /dev/null +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/EBus/Senders/UiButtonBus.names @@ -0,0 +1,62 @@ +{ + "entries": [ + { + "base": "UiButtonBus", + "context": "EBusSender", + "variant": "", + "details": { + "name": "UI Button", + "category": "UI" + }, + "methods": [ + { + "base": "GetOnClickActionName", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Get On Click Action Name" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Get On Click Action Name is invoked" + }, + "details": { + "name": "Get On Click Action Name", + "tooltip": "Gets the name of the action triggered when the button is released" + }, + "results": [ + { + "typeid": "{03AAAB3F-5C47-5A66-9EBC-D5FA4DB353C9}", + "details": { + "name": "Name" + } + } + ] + }, + { + "base": "SetOnClickActionName", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Set On Click Action Name" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Set On Click Action Name is invoked" + }, + "details": { + "name": "Set On Click Action Name", + "tooltip": "Sets the name of the action triggered when the button is released" + }, + "params": [ + { + "typeid": "{03AAAB3F-5C47-5A66-9EBC-D5FA4DB353C9}", + "details": { + "name": "Name", + "tooltip": "The name of the action triggered when the button is released" + } + } + ] + } + ] + } + ] +} \ No newline at end of file diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/EBus/Senders/UiCanvasAssetRefBus.names b/Gems/ScriptCanvas/Assets/TranslationAssets/EBus/Senders/UiCanvasAssetRefBus.names new file mode 100644 index 0000000000..1cb8e93a10 --- /dev/null +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/EBus/Senders/UiCanvasAssetRefBus.names @@ -0,0 +1,54 @@ +{ + "entries": [ + { + "base": "UiCanvasAssetRefBus", + "context": "EBusSender", + "variant": "", + "details": { + "name": "UI Canvas Asset Ref", + "category": "UI" + }, + "methods": [ + { + "base": "LoadCanvas", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Load Canvas" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Load Canvas is invoked" + }, + "details": { + "name": "Load Canvas", + "tooltip": "Loads a canvas" + }, + "results": [ + { + "typeid": "{6383F1D3-BB27-4E6B-A49A-6409B2059EAA}", + "details": { + "name": "EntityId", + "tooltip": "Entity Unique Id" + } + } + ] + }, + { + "base": "UnloadCanvas", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Unload Canvas" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Unload Canvas is invoked" + }, + "details": { + "name": "Unload Canvas", + "tooltip": "Unloads the loaded canvas" + } + } + ] + } + ] +} \ No newline at end of file diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/EBus/Senders/UiCanvasBus.names b/Gems/ScriptCanvas/Assets/TranslationAssets/EBus/Senders/UiCanvasBus.names new file mode 100644 index 0000000000..434023c071 --- /dev/null +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/EBus/Senders/UiCanvasBus.names @@ -0,0 +1,957 @@ +{ + "entries": [ + { + "base": "UiCanvasBus", + "context": "EBusSender", + "variant": "", + "details": { + "name": "UI Canvas", + "category": "UI" + }, + "methods": [ + { + "base": "ForceHoverInteractable", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Force Hover Interactable" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Force Hover Interactable is invoked" + }, + "details": { + "name": "Force Hover Interactable", + "tooltip": "Forces the specified interactive element to receive the hover" + }, + "params": [ + { + "typeid": "{6383F1D3-BB27-4E6B-A49A-6409B2059EAA}", + "details": { + "name": "Hover EntityID", + "tooltip": "The element to receive the hover" + } + } + ] + }, + { + "base": "GetNavigationRepeatPeriod", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke GetNavigationRepeatPeriod" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after GetNavigationRepeatPeriod is invoked" + }, + "details": { + "name": "GetNavigationRepeatPeriod" + }, + "results": [ + { + "typeid": "{D6597933-47CD-4FC8-B911-63F3E2B0993A}", + "details": { + "name": "AZ::u64" + } + } + ] + }, + { + "base": "GetNavigationRepeatDelay", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke GetNavigationRepeatDelay" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after GetNavigationRepeatDelay is invoked" + }, + "details": { + "name": "GetNavigationRepeatDelay" + }, + "results": [ + { + "typeid": "{D6597933-47CD-4FC8-B911-63F3E2B0993A}", + "details": { + "name": "AZ::u64" + } + } + ] + }, + { + "base": "GetHoverInteractable", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Get Hover Interactable" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Get Hover Interactable is invoked" + }, + "details": { + "name": "Get Hover Interactable", + "tooltip": "Gets the interactive element that has the hover" + }, + "results": [ + { + "typeid": "{6383F1D3-BB27-4E6B-A49A-6409B2059EAA}", + "details": { + "name": "EntityId", + "tooltip": "Entity Unique Id" + } + } + ] + }, + { + "base": "SetNavigationThreshold", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke SetNavigationThreshold" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after SetNavigationThreshold is invoked" + }, + "details": { + "name": "SetNavigationThreshold" + }, + "params": [ + { + "typeid": "{EA2C3E90-AFBE-44D4-A90D-FAAF79BAF93D}", + "details": { + "name": "float" + } + } + ] + }, + { + "base": "SetIsConsumingAllInputEvents", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Set Is Consuming All Input Events" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Set Is Consuming All Input Events is invoked" + }, + "details": { + "name": "Set Is Consuming All Input Events", + "tooltip": "Sets whether all input events should be consumed by the canvas while it is enabled" + }, + "params": [ + { + "typeid": "{A0CA880C-AFE4-43CB-926C-59AC48496112}", + "details": { + "name": "Consume", + "tooltip": "Indicates whether all input events should be consumed by the canvas while it is enabled" + } + } + ] + }, + { + "base": "SetDrawOrder", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Set Draw Order" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Set Draw Order is invoked" + }, + "details": { + "name": "Set Draw Order", + "tooltip": "Sets the draw order of the canvas. Rendering is back-to-front, so higher numbers render in front of lower numbers" + }, + "params": [ + { + "typeid": "{72039442-EB38-4D42-A1AD-CB68F7E0EEF6}", + "details": { + "name": "Draw Order", + "tooltip": "The draw order of the canvas" + } + } + ] + }, + { + "base": "GetIsPositionalInputSupported", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Is Positional Input Supported" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Is Positional Input Supported is invoked" + }, + "details": { + "name": "Is Positional Input Supported", + "tooltip": "Returns whether the canvas automatically responds to positional input such as mouse movement, mouse button clicks, and touch screen input, as well as keyboard input when an interactive element is active" + }, + "results": [ + { + "typeid": "{A0CA880C-AFE4-43CB-926C-59AC48496112}", + "details": { + "name": "bool" + } + } + ] + }, + { + "base": "RecomputeChangedLayouts", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Recompute Changed Layouts" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Recompute Changed Layouts is invoked" + }, + "details": { + "name": "Recompute Changed Layouts", + "tooltip": "Forces an immediate recalculation of all layouts on the canvas that have been flagged for recomputing" + } + }, + { + "base": "SetRenderTargetName", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Set Render Target Name" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Set Render Target Name is invoked" + }, + "details": { + "name": "Set Render Target Name", + "tooltip": "Sets the name of the render target" + }, + "params": [ + { + "typeid": "{03AAAB3F-5C47-5A66-9EBC-D5FA4DB353C9}", + "details": { + "name": "Name", + "tooltip": "The name of the render target" + } + } + ] + }, + { + "base": "GetTooltipDisplayElement", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Get Tooltip Display Element" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Get Tooltip Display Element is invoked" + }, + "details": { + "name": "Get Tooltip Display Element", + "tooltip": "Gets the element that defines the tooltip's display behavior. This element must have a TooltipDisplay component" + }, + "results": [ + { + "typeid": "{6383F1D3-BB27-4E6B-A49A-6409B2059EAA}", + "details": { + "name": "EntityId", + "tooltip": "Entity Unique Id" + } + } + ] + }, + { + "base": "GetIsNavigationSupported", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Is Navigation Supported" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Is Navigation Supported is invoked" + }, + "details": { + "name": "Is Navigation Supported", + "tooltip": "Returns whether the canvas automatically responds to navigation input" + }, + "results": [ + { + "typeid": "{A0CA880C-AFE4-43CB-926C-59AC48496112}", + "details": { + "name": "bool" + } + } + ] + }, + { + "base": "SetNavigationRepeatPeriod", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke SetNavigationRepeatPeriod" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after SetNavigationRepeatPeriod is invoked" + }, + "details": { + "name": "SetNavigationRepeatPeriod" + }, + "params": [ + { + "typeid": "{D6597933-47CD-4FC8-B911-63F3E2B0993A}", + "details": { + "name": "AZ::u64" + } + } + ] + }, + { + "base": "GetRenderTargetName", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Get Render Target Name" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Get Render Target Name is invoked" + }, + "details": { + "name": "Get Render Target Name", + "tooltip": "Gets the name of the render target" + }, + "results": [ + { + "typeid": "{03AAAB3F-5C47-5A66-9EBC-D5FA4DB353C9}", + "details": { + "name": "AZStd::string" + } + } + ] + }, + { + "base": "FindElementByName", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Find Element By Name" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Find Element By Name is invoked" + }, + "details": { + "name": "Find Element By Name", + "tooltip": "Finds an element by its name" + }, + "params": [ + { + "typeid": "{03AAAB3F-5C47-5A66-9EBC-D5FA4DB353C9}", + "details": { + "name": "Name", + "tooltip": "The name of the element" + } + } + ], + "results": [ + { + "typeid": "{6383F1D3-BB27-4E6B-A49A-6409B2059EAA}", + "details": { + "name": "EntityId", + "tooltip": "The name of the element" + } + } + ] + }, + { + "base": "SetTooltipDisplayElement", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Set Tooltip Display Element" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Set Tooltip Display Element is invoked" + }, + "details": { + "name": "Set Tooltip Display Element", + "tooltip": "Sets the element that defines the tooltip's display behavior. This element must have a TooltipDisplay component" + }, + "params": [ + { + "typeid": "{6383F1D3-BB27-4E6B-A49A-6409B2059EAA}", + "details": { + "name": "Tooltip Display EntityID", + "tooltip": "The element that defines the tooltip's display behavior. This element must have a TooltipDisplay component" + } + } + ] + }, + { + "base": "GetChildElement", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Get Child Element" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Get Child Element is invoked" + }, + "details": { + "name": "Get Child Element", + "tooltip": "Gets a child of the canvas by index" + }, + "params": [ + { + "typeid": "{72039442-EB38-4D42-A1AD-CB68F7E0EEF6}", + "details": { + "name": "Child Index", + "tooltip": "The index of the child element" + } + } + ], + "results": [ + { + "typeid": "{6383F1D3-BB27-4E6B-A49A-6409B2059EAA}", + "details": { + "name": "EntityId", + "tooltip": "The index of the child element" + } + } + ] + }, + { + "base": "GetKeepLoadedOnLevelUnload", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Get Keep Loaded On Level Unload" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Get Keep Loaded On Level Unload is invoked" + }, + "details": { + "name": "Get Keep Loaded On Level Unload", + "tooltip": "Returns whether the canvas should remain loaded when the level is unloaded" + }, + "results": [ + { + "typeid": "{A0CA880C-AFE4-43CB-926C-59AC48496112}", + "details": { + "name": "bool" + } + } + ] + }, + { + "base": "GetIsTextPixelAligned", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Is Text Pixel Aligned" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Is Text Pixel Aligned is invoked" + }, + "details": { + "name": "Is Text Pixel Aligned", + "tooltip": "Returns whether the canvas pixel-aligns the corners of its text quads to the nearest pixel when they are rendered" + }, + "results": [ + { + "typeid": "{A0CA880C-AFE4-43CB-926C-59AC48496112}", + "details": { + "name": "bool" + } + } + ] + }, + { + "base": "GetIsConsumingAllInputEvents", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Is Consuming All Input Events" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Is Consuming All Input Events is invoked" + }, + "details": { + "name": "Is Consuming All Input Events", + "tooltip": "Returns whether all input events will be consumed by the canvas while it is enabled" + }, + "results": [ + { + "typeid": "{A0CA880C-AFE4-43CB-926C-59AC48496112}", + "details": { + "name": "bool" + } + } + ] + }, + { + "base": "GetNavigationThreshold", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke GetNavigationThreshold" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after GetNavigationThreshold is invoked" + }, + "details": { + "name": "GetNavigationThreshold" + }, + "results": [ + { + "typeid": "{EA2C3E90-AFBE-44D4-A90D-FAAF79BAF93D}", + "details": { + "name": "float" + } + } + ] + }, + { + "base": "SetKeepLoadedOnLevelUnload", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Set Keep Loaded On Level Unload" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Set Keep Loaded On Level Unload is invoked" + }, + "details": { + "name": "Set Keep Loaded On Level Unload", + "tooltip": "Sets whether the canvas should remain loaded when the level is unloaded" + }, + "params": [ + { + "typeid": "{A0CA880C-AFE4-43CB-926C-59AC48496112}", + "details": { + "name": "Keep Loaded", + "tooltip": "Indicates whether the canvas should remain loaded when the level is unloaded" + } + } + ] + }, + { + "base": "SetIsMultiTouchSupported", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Set Is Multi-touch Supported" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Set Is Multi-touch Supported is invoked" + }, + "details": { + "name": "Set Is Multi-touch Supported", + "tooltip": "Sets whether multi-touch input will automatically be handled" + }, + "params": [ + { + "typeid": "{A0CA880C-AFE4-43CB-926C-59AC48496112}", + "details": { + "name": "Multi-touch", + "tooltip": "Indicates whether multi-touch input will automatically be handled" + } + } + ] + }, + { + "base": "SetIsRenderToTexture", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Set Render To Texture" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Set Render To Texture is invoked" + }, + "details": { + "name": "Set Render To Texture", + "tooltip": "Sets whether the canvas should draw to a texture rather than to the screen" + }, + "params": [ + { + "typeid": "{A0CA880C-AFE4-43CB-926C-59AC48496112}", + "details": { + "name": "Render to Texture", + "tooltip": "Indicates whether the canvas should draw to a texture rather than to the screen" + } + } + ] + }, + { + "base": "GetChildElements", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Get Child Elements" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Get Child Elements is invoked" + }, + "details": { + "name": "Get Child Elements", + "tooltip": "Gets the children of the canvas" + }, + "results": [ + { + "typeid": "{4841CFF0-7A5C-519C-BD16-D3625E99605E}", + "details": { + "name": "AZStd::vector" + } + } + ] + }, + { + "base": "GetNumChildElements", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Get Number Of Child Elements" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Get Number Of Child Elements is invoked" + }, + "details": { + "name": "Get Number Of Child Elements", + "tooltip": "Gets the number of children of the canvas" + }, + "results": [ + { + "typeid": "{72039442-EB38-4D42-A1AD-CB68F7E0EEF6}", + "details": { + "name": "int" + } + } + ] + }, + { + "base": "GetIsPixelAligned", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Is Pixel Aligned" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Is Pixel Aligned is invoked" + }, + "details": { + "name": "Is Pixel Aligned", + "tooltip": "Returns whether the canvas pixel-aligns the corners of its elements to the nearest pixel when they are rendered" + }, + "results": [ + { + "typeid": "{A0CA880C-AFE4-43CB-926C-59AC48496112}", + "details": { + "name": "bool" + } + } + ] + }, + { + "base": "GetEnabled", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Is Enabled" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Is Enabled is invoked" + }, + "details": { + "name": "Is Enabled", + "tooltip": "Returns whether the canvas is enabled" + }, + "results": [ + { + "typeid": "{A0CA880C-AFE4-43CB-926C-59AC48496112}", + "details": { + "name": "bool" + } + } + ] + }, + { + "base": "SetIsNavigationSupported", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Set Is Navigation Supported" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Set Is Navigation Supported is invoked" + }, + "details": { + "name": "Set Is Navigation Supported", + "tooltip": "Sets whether the canvas should automatically respond to navigation input" + }, + "params": [ + { + "typeid": "{A0CA880C-AFE4-43CB-926C-59AC48496112}", + "details": { + "name": "Navigation", + "tooltip": "Indicates whether the canvas should automatically respond to navigation input" + } + } + ] + }, + { + "base": "GetDrawOrder", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Get Draw Order" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Get Draw Order is invoked" + }, + "details": { + "name": "Get Draw Order", + "tooltip": "Gets the draw order of the canvas. Rendering is back-to-front, so higher numbers render in front of lower numbers" + }, + "results": [ + { + "typeid": "{72039442-EB38-4D42-A1AD-CB68F7E0EEF6}", + "details": { + "name": "int" + } + } + ] + }, + { + "base": "ForceEnterInputEventOnInteractable", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke ForceEnterInputEventOnInteractable" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after ForceEnterInputEventOnInteractable is invoked" + }, + "details": { + "name": "ForceEnterInputEventOnInteractable" + }, + "params": [ + { + "typeid": "{6383F1D3-BB27-4E6B-A49A-6409B2059EAA}", + "details": { + "name": "EntityId", + "tooltip": "Entity Unique Id" + } + } + ] + }, + { + "base": "GetIsMultiTouchSupported", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Is Multi-touch Supported" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Is Multi-touch Supported is invoked" + }, + "details": { + "name": "Is Multi-touch Supported", + "tooltip": "Returns whether multi-touch input will automatically be handled" + }, + "results": [ + { + "typeid": "{A0CA880C-AFE4-43CB-926C-59AC48496112}", + "details": { + "name": "bool" + } + } + ] + }, + { + "base": "SetIsPixelAligned", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Set Is Pixel Aligned" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Set Is Pixel Aligned is invoked" + }, + "details": { + "name": "Set Is Pixel Aligned", + "tooltip": "Sets whether the canvas should pixel-align the corners of its elements to the nearest pixel when they are rendered" + }, + "params": [ + { + "typeid": "{A0CA880C-AFE4-43CB-926C-59AC48496112}", + "details": { + "name": "Pixel Aligned", + "tooltip": "Indicates whether the canvas should pixel-align the corners of its elements to the nearest pixel when they are rendered" + } + } + ] + }, + { + "base": "SetIsPositionalInputSupported", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Set Is Positional Input Supported" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Set Is Positional Input Supported is invoked" + }, + "details": { + "name": "Set Is Positional Input Supported", + "tooltip": "Sets whether the canvas should automatically respond to positional input such as mouse movement, mouse button clicks, and touch screen input, as well as keyboard input when an interactive element is active" + }, + "params": [ + { + "typeid": "{A0CA880C-AFE4-43CB-926C-59AC48496112}", + "details": { + "name": "Positional Input", + "tooltip": "Indicates whether the canvas should automatically respond to positional input such as mouse movement, mouse button clicks, and touch screen input, as well as keyboard input when an interactive element is active" + } + } + ] + }, + { + "base": "CloneElement", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Clone Element" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Clone Element is invoked" + }, + "details": { + "name": "Clone Element", + "tooltip": "Clones an element" + }, + "params": [ + { + "typeid": "{6383F1D3-BB27-4E6B-A49A-6409B2059EAA}", + "details": { + "name": "EntityID to Clone", + "tooltip": "The element to clone" + } + }, + { + "typeid": "{6383F1D3-BB27-4E6B-A49A-6409B2059EAA}", + "details": { + "name": "Parent EntityID", + "tooltip": "The parent of the cloned element" + } + }, + { + "typeid": "{6383F1D3-BB27-4E6B-A49A-6409B2059EAA}", + "details": { + "name": "Insert Before EntityID", + "tooltip": "The element to insert the cloned element before" + } + } + ], + "results": [ + { + "typeid": "{6383F1D3-BB27-4E6B-A49A-6409B2059EAA}", + "details": { + "name": "EntityId", + "tooltip": "The element to clone" + } + } + ] + }, + { + "base": "SetNavigationRepeatDelay", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke SetNavigationRepeatDelay" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after SetNavigationRepeatDelay is invoked" + }, + "details": { + "name": "SetNavigationRepeatDelay" + }, + "params": [ + { + "typeid": "{D6597933-47CD-4FC8-B911-63F3E2B0993A}", + "details": { + "name": "AZ::u64" + } + } + ] + }, + { + "base": "GetIsRenderToTexture", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Get Render To Texture" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Get Render To Texture is invoked" + }, + "details": { + "name": "Get Render To Texture", + "tooltip": "Returns whether the canvas draws to a texture rather than to the screen" + }, + "results": [ + { + "typeid": "{A0CA880C-AFE4-43CB-926C-59AC48496112}", + "details": { + "name": "bool" + } + } + ] + }, + { + "base": "SetEnabled", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Set Is Enabled" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Set Is Enabled is invoked" + }, + "details": { + "name": "Set Is Enabled", + "tooltip": "Sets whether the canvas is enabled" + }, + "params": [ + { + "typeid": "{A0CA880C-AFE4-43CB-926C-59AC48496112}", + "details": { + "name": "Enabled", + "tooltip": "Indicates whether the canvas is enabled" + } + } + ] + }, + { + "base": "SetIsTextPixelAligned", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Set Is Text Pixel Aligned" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Set Is Text Pixel Aligned is invoked" + }, + "details": { + "name": "Set Is Text Pixel Aligned", + "tooltip": "Sets whether the canvas should pixel-align the corners of its text quads to the nearest pixel when they are rendered" + }, + "params": [ + { + "typeid": "{A0CA880C-AFE4-43CB-926C-59AC48496112}", + "details": { + "name": "Pixel Aligned", + "tooltip": "Indicates whether the canvas should pixel-align the corners of its text quads to the nearest pixel when they are rendered" + } + } + ] + } + ] + } + ] +} \ No newline at end of file diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/EBus/Senders/UiCanvasManagerBus.names b/Gems/ScriptCanvas/Assets/TranslationAssets/EBus/Senders/UiCanvasManagerBus.names new file mode 100644 index 0000000000..ba03658aa7 --- /dev/null +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/EBus/Senders/UiCanvasManagerBus.names @@ -0,0 +1,135 @@ +{ + "entries": [ + { + "base": "UiCanvasManagerBus", + "context": "EBusSender", + "variant": "", + "details": { + "name": "UI Canvas Manager", + "category": "UI" + }, + "methods": [ + { + "base": "CreateCanvas", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Create Canvas" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Create Canvas is invoked" + }, + "details": { + "name": "Create Canvas", + "tooltip": "Creates an empty canvas" + }, + "results": [ + { + "typeid": "{6383F1D3-BB27-4E6B-A49A-6409B2059EAA}", + "details": { + "name": "EntityId", + "tooltip": "Entity Unique Id" + } + } + ] + }, + { + "base": "LoadCanvas", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Load Canvas" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Load Canvas is invoked" + }, + "details": { + "name": "Load Canvas", + "tooltip": "Loads a canvas" + }, + "params": [ + { + "typeid": "{03AAAB3F-5C47-5A66-9EBC-D5FA4DB353C9}", + "details": { + "name": "Pathname", + "tooltip": "The pathname of the canvas" + } + } + ], + "results": [ + { + "typeid": "{6383F1D3-BB27-4E6B-A49A-6409B2059EAA}", + "details": { + "name": "EntityId", + "tooltip": "The pathname of the canvas" + } + } + ] + }, + { + "base": "UnloadCanvas", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Unload Canvas" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Unload Canvas is invoked" + }, + "details": { + "name": "Unload Canvas", + "tooltip": "Unloads a loaded canvas" + }, + "params": [ + { + "typeid": "{6383F1D3-BB27-4E6B-A49A-6409B2059EAA}", + "details": { + "name": "Canvas EntityID", + "tooltip": "The canvas to unload" + } + } + ] + }, + { + "base": "FindLoadedCanvasByPathName", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Find Loaded Canvas By Pathname" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Find Loaded Canvas By Pathname is invoked" + }, + "details": { + "name": "Find Loaded Canvas By Pathname", + "tooltip": "Finds a loaded canvas by its pathname" + }, + "params": [ + { + "typeid": "{03AAAB3F-5C47-5A66-9EBC-D5FA4DB353C9}", + "details": { + "name": "Pathname", + "tooltip": "The pathname of the loaded canvas" + } + }, + { + "typeid": "{A0CA880C-AFE4-43CB-926C-59AC48496112}", + "details": { + "name": "bool" + } + } + ], + "results": [ + { + "typeid": "{6383F1D3-BB27-4E6B-A49A-6409B2059EAA}", + "details": { + "name": "EntityId", + "tooltip": "The pathname of the loaded canvas" + } + } + ] + } + ] + } + ] +} \ No newline at end of file diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/EBus/Senders/UiCanvasProxyRefBus.names b/Gems/ScriptCanvas/Assets/TranslationAssets/EBus/Senders/UiCanvasProxyRefBus.names new file mode 100644 index 0000000000..7c582146cc --- /dev/null +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/EBus/Senders/UiCanvasProxyRefBus.names @@ -0,0 +1,39 @@ +{ + "entries": [ + { + "base": "UiCanvasProxyRefBus", + "context": "EBusSender", + "variant": "", + "details": { + "name": "UI Canvas Proxy Ref", + "category": "UI" + }, + "methods": [ + { + "base": "SetCanvasRefEntity", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Set Canvas Ref Entity" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Set Canvas Ref Entity is invoked" + }, + "details": { + "name": "Set Canvas Ref Entity", + "tooltip": "Sets the entity to mirror. The entity should have a Ui Canvas Asset Ref component. Used to display the same UI canvas on multiple entities in the 3D world" + }, + "params": [ + { + "typeid": "{6383F1D3-BB27-4E6B-A49A-6409B2059EAA}", + "details": { + "name": "Canvas Asset Ref EntityID", + "tooltip": "The entity to mirror" + } + } + ] + } + ] + } + ] +} \ No newline at end of file diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/EBus/Senders/UiCanvasRefBus.names b/Gems/ScriptCanvas/Assets/TranslationAssets/EBus/Senders/UiCanvasRefBus.names new file mode 100644 index 0000000000..19b74b1ddb --- /dev/null +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/EBus/Senders/UiCanvasRefBus.names @@ -0,0 +1,39 @@ +{ + "entries": [ + { + "base": "UiCanvasRefBus", + "context": "EBusSender", + "variant": "", + "details": { + "name": "UI Canvas Ref", + "category": "UI" + }, + "methods": [ + { + "base": "GetCanvas", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Get Canvas" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Get Canvas is invoked" + }, + "details": { + "name": "Get Canvas", + "tooltip": "Gets the canvas" + }, + "results": [ + { + "typeid": "{6383F1D3-BB27-4E6B-A49A-6409B2059EAA}", + "details": { + "name": "EntityId", + "tooltip": "Entity Unique Id" + } + } + ] + } + ] + } + ] +} \ No newline at end of file diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/EBus/Senders/UiCheckboxBus.names b/Gems/ScriptCanvas/Assets/TranslationAssets/EBus/Senders/UiCheckboxBus.names new file mode 100644 index 0000000000..0e0182b9c1 --- /dev/null +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/EBus/Senders/UiCheckboxBus.names @@ -0,0 +1,322 @@ +{ + "entries": [ + { + "base": "UiCheckboxBus", + "context": "EBusSender", + "variant": "", + "details": { + "name": "UI Checkbox", + "category": "UI" + }, + "methods": [ + { + "base": "SetChangedActionName", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Set Changed Action Name" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Set Changed Action Name is invoked" + }, + "details": { + "name": "Set Changed Action Name", + "tooltip": "Sets the name of the action triggered when the checkbox state changes" + }, + "params": [ + { + "typeid": "{03AAAB3F-5C47-5A66-9EBC-D5FA4DB353C9}", + "details": { + "name": "Name", + "tooltip": "The name of the action triggered when the checkbox state changes" + } + } + ] + }, + { + "base": "GetChangedActionName", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Get Changed Action Name" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Get Changed Action Name is invoked" + }, + "details": { + "name": "Get Changed Action Name", + "tooltip": "Gets the name of the action triggered when the checkbox state changes" + }, + "results": [ + { + "typeid": "{03AAAB3F-5C47-5A66-9EBC-D5FA4DB353C9}", + "details": { + "name": "AZStd::string" + } + } + ] + }, + { + "base": "SetCheckedEntity", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Set Checked Entity" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Set Checked Entity is invoked" + }, + "details": { + "name": "Set Checked Entity", + "tooltip": "Sets the child element to show when the checkbox is checked" + }, + "params": [ + { + "typeid": "{6383F1D3-BB27-4E6B-A49A-6409B2059EAA}", + "details": { + "name": "Checked EntityID", + "tooltip": "The child element to show when the checkbox is checked" + } + } + ] + }, + { + "base": "SetUncheckedEntity", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Set Unchecked Entity" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Set Unchecked Entity is invoked" + }, + "details": { + "name": "Set Unchecked Entity", + "tooltip": "Sets the child element to show when the checkbox is unchecked" + }, + "params": [ + { + "typeid": "{6383F1D3-BB27-4E6B-A49A-6409B2059EAA}", + "details": { + "name": "Unchecked EntityID", + "tooltip": "The child element to show when the checkbox is unchecked" + } + } + ] + }, + { + "base": "SetTurnOnActionName", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Set Turn On Action Name" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Set Turn On Action Name is invoked" + }, + "details": { + "name": "Set Turn On Action Name", + "tooltip": "Sets the name of the action triggered when the checkbox is checked" + }, + "params": [ + { + "typeid": "{03AAAB3F-5C47-5A66-9EBC-D5FA4DB353C9}", + "details": { + "name": "Name", + "tooltip": "The name of the action triggered when the checkbox is checked" + } + } + ] + }, + { + "base": "GetTurnOffActionName", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Get Turn Off Action Name" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Get Turn Off Action Name is invoked" + }, + "details": { + "name": "Get Turn Off Action Name", + "tooltip": "Gets the name of the action triggered when the checkbox is unchecked" + }, + "results": [ + { + "typeid": "{03AAAB3F-5C47-5A66-9EBC-D5FA4DB353C9}", + "details": { + "name": "AZStd::string" + } + } + ] + }, + { + "base": "SetState", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Set State" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Set State is invoked" + }, + "details": { + "name": "Set State", + "tooltip": "Sets whether the checkbox is checked" + }, + "params": [ + { + "typeid": "{A0CA880C-AFE4-43CB-926C-59AC48496112}", + "details": { + "name": "Checked", + "tooltip": "Indicates whether the checkbox is checked" + } + } + ] + }, + { + "base": "ToggleState", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Toggle State" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Toggle State is invoked" + }, + "details": { + "name": "Toggle State", + "tooltip": "Toggles the checked/unchecked state of the checkbox" + }, + "results": [ + { + "typeid": "{A0CA880C-AFE4-43CB-926C-59AC48496112}", + "details": { + "name": "bool" + } + } + ] + }, + { + "base": "GetState", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Get State" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Get State is invoked" + }, + "details": { + "name": "Get State", + "tooltip": "Returns whether the checkbox is checked" + }, + "results": [ + { + "typeid": "{A0CA880C-AFE4-43CB-926C-59AC48496112}", + "details": { + "name": "bool" + } + } + ] + }, + { + "base": "GetCheckedEntity", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Get Checked Entity" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Get Checked Entity is invoked" + }, + "details": { + "name": "Get Checked Entity", + "tooltip": "Gets the child element that is shown when the checkbox is checked" + }, + "results": [ + { + "typeid": "{6383F1D3-BB27-4E6B-A49A-6409B2059EAA}", + "details": { + "name": "EntityId", + "tooltip": "Entity Unique Id" + } + } + ] + }, + { + "base": "GetUncheckedEntity", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Get Unchecked Entity" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Get Unchecked Entity is invoked" + }, + "details": { + "name": "Get Unchecked Entity", + "tooltip": "Gets the child element that is shown when the checkbox is unchecked" + }, + "results": [ + { + "typeid": "{6383F1D3-BB27-4E6B-A49A-6409B2059EAA}", + "details": { + "name": "EntityId", + "tooltip": "Entity Unique Id" + } + } + ] + }, + { + "base": "GetTurnOnActionName", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Get Turn On Action Name" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Get Turn On Action Name is invoked" + }, + "details": { + "name": "Get Turn On Action Name", + "tooltip": "Gets the name of the action triggered when the checkbox is checked" + }, + "results": [ + { + "typeid": "{03AAAB3F-5C47-5A66-9EBC-D5FA4DB353C9}", + "details": { + "name": "AZStd::string" + } + } + ] + }, + { + "base": "SetTurnOffActionName", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Set Turn Off Action Name" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Set Turn Off Action Name is invoked" + }, + "details": { + "name": "Set Turn Off Action Name", + "tooltip": "Sets the name of the action triggered when the checkbox is unchecked" + }, + "params": [ + { + "typeid": "{03AAAB3F-5C47-5A66-9EBC-D5FA4DB353C9}", + "details": { + "name": "Name", + "tooltip": "The name of the action triggered when the checkbox is unchecked" + } + } + ] + } + ] + } + ] +} \ No newline at end of file diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/EBus/Senders/UiClickableTextBus.names b/Gems/ScriptCanvas/Assets/TranslationAssets/EBus/Senders/UiClickableTextBus.names new file mode 100644 index 0000000000..96f80aff68 --- /dev/null +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/EBus/Senders/UiClickableTextBus.names @@ -0,0 +1,46 @@ +{ + "entries": [ + { + "base": "UiClickableTextBus", + "context": "EBusSender", + "variant": "", + "details": { + "name": "UI Clickable Text", + "category": "UI" + }, + "methods": [ + { + "base": "SetClickableTextColor", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Set Clickable Text Color" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Set Clickable Text Color is invoked" + }, + "details": { + "name": "Set Clickable Text Color", + "tooltip": "Sets the color of the clickable text, overriding the value from the markup button" + }, + "params": [ + { + "typeid": "{72039442-EB38-4D42-A1AD-CB68F7E0EEF6}", + "details": { + "name": "ID", + "tooltip": "The markup ID of the clickable text" + } + }, + { + "typeid": "{7894072A-9050-4F0F-901B-34B1A0D29417}", + "details": { + "name": "Color", + "tooltip": "The color for the clickable text" + } + } + ] + } + ] + } + ] +} \ No newline at end of file diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/EBus/Senders/UiCursorBus.names b/Gems/ScriptCanvas/Assets/TranslationAssets/EBus/Senders/UiCursorBus.names new file mode 100644 index 0000000000..6da1ec95a1 --- /dev/null +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/EBus/Senders/UiCursorBus.names @@ -0,0 +1,115 @@ +{ + "entries": [ + { + "base": "UiCursorBus", + "context": "EBusSender", + "variant": "", + "details": { + "name": "UI Cursor", + "category": "UI" + }, + "methods": [ + { + "base": "GetUiCursorPosition", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Get Position" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Get Position is invoked" + }, + "details": { + "name": "Get Position", + "tooltip": "Gets the cursor position relative to the top left corner of the UI overlay viewport" + }, + "results": [ + { + "typeid": "{3D80F623-C85C-4741-90D0-E4E66164E6BF}", + "details": { + "name": "Vector2" + } + } + ] + }, + { + "base": "IsUiCursorVisible", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Is Visible" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Is Visible is invoked" + }, + "details": { + "name": "Is Visible", + "tooltip": "Returns whether the cursor is visible" + }, + "results": [ + { + "typeid": "{A0CA880C-AFE4-43CB-926C-59AC48496112}", + "details": { + "name": "bool" + } + } + ] + }, + { + "base": "DecrementVisibleCounter", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Decrement Visible Counter" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Decrement Visible Counter is invoked" + }, + "details": { + "name": "Decrement Visible Counter", + "tooltip": "Decrements the cursor visible counter. Should be paired with a call to \"Increment Visible Counter\"" + } + }, + { + "base": "IncrementVisibleCounter", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Increment Visible Counter" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Increment Visible Counter is invoked" + }, + "details": { + "name": "Increment Visible Counter", + "tooltip": "Increments the cursor visible counter. Should be paired with a call to \"Decrement Visible Counter\"" + } + }, + { + "base": "SetUiCursor", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Set Cursor" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Set Cursor is invoked" + }, + "details": { + "name": "Set Cursor", + "tooltip": "Sets the cursor image" + }, + "params": [ + { + "typeid": "{3AB0037F-AF8D-48CE-BCA0-A170D18B2C03}", + "details": { + "name": "Pathname", + "tooltip": "The pathname to the cursor image" + } + } + ] + } + ] + } + ] +} \ No newline at end of file diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/EBus/Senders/UiCustomImageBus.names b/Gems/ScriptCanvas/Assets/TranslationAssets/EBus/Senders/UiCustomImageBus.names new file mode 100644 index 0000000000..1f492b34ec --- /dev/null +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/EBus/Senders/UiCustomImageBus.names @@ -0,0 +1,203 @@ +{ + "entries": [ + { + "base": "UiCustomImageBus", + "context": "EBusSender", + "variant": "", + "details": { + "name": "UI Custom Image", + "category": "UI/LyShine Examples" + }, + "methods": [ + { + "base": "GetClamp", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Get Clamp" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Get Clamp is invoked" + }, + "details": { + "name": "Get Clamp", + "tooltip": "Returns whether the image is clamped" + }, + "results": [ + { + "typeid": "{A0CA880C-AFE4-43CB-926C-59AC48496112}", + "details": { + "name": "bool" + } + } + ] + }, + { + "base": "SetUVs", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Set UVs" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Set UVs is invoked" + }, + "details": { + "name": "Set UVs", + "tooltip": "Sets the UV coordinates of the rectangle for rendering the texture" + }, + "params": [ + { + "typeid": "{E134EAE8-52A1-4E43-847B-09E546CC5B95}", + "details": { + "name": "UV Coords", + "tooltip": "The UV coordinates of the rectangle for rendering the texture" + } + } + ] + }, + { + "base": "SetClamp", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Set Clamp" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Set Clamp is invoked" + }, + "details": { + "name": "Set Clamp", + "tooltip": "Sets whether the image should be clamped" + }, + "params": [ + { + "typeid": "{A0CA880C-AFE4-43CB-926C-59AC48496112}", + "details": { + "name": "Clamp", + "tooltip": "Indicates whether the image should be clamped" + } + } + ] + }, + { + "base": "SetSpritePathname", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Set Sprite Pathname" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Set Sprite Pathname is invoked" + }, + "details": { + "name": "Set Sprite Pathname", + "tooltip": "Sets the sprite pathname" + }, + "params": [ + { + "typeid": "{03AAAB3F-5C47-5A66-9EBC-D5FA4DB353C9}", + "details": { + "name": "Pathname", + "tooltip": "The sprite pathname" + } + } + ] + }, + { + "base": "GetSpritePathname", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Get Sprite Pathname" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Get Sprite Pathname is invoked" + }, + "details": { + "name": "Get Sprite Pathname", + "tooltip": "Gets the sprite pathname" + }, + "results": [ + { + "typeid": "{03AAAB3F-5C47-5A66-9EBC-D5FA4DB353C9}", + "details": { + "name": "AZStd::string" + } + } + ] + }, + { + "base": "GetUVs", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Get UVs" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Get UVs is invoked" + }, + "details": { + "name": "Get UVs", + "tooltip": "Gets the UV coordinates of the rectangle for rendering the texture" + }, + "results": [ + { + "typeid": "{E134EAE8-52A1-4E43-847B-09E546CC5B95}", + "details": { + "name": "UVRect" + } + } + ] + }, + { + "base": "SetColor", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Set Color" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Set Color is invoked" + }, + "details": { + "name": "Set Color", + "tooltip": "Sets the color tint for the image" + }, + "params": [ + { + "typeid": "{7894072A-9050-4F0F-901B-34B1A0D29417}", + "details": { + "name": "Color", + "tooltip": "The color tint for the image" + } + } + ] + }, + { + "base": "GetColor", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Get Color" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Get Color is invoked" + }, + "details": { + "name": "Get Color", + "tooltip": "Gets the color tint for the image" + }, + "results": [ + { + "typeid": "{7894072A-9050-4F0F-901B-34B1A0D29417}", + "details": { + "name": "Color" + } + } + ] + } + ] + } + ] +} \ No newline at end of file diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/EBus/Senders/UiDraggableBus.names b/Gems/ScriptCanvas/Assets/TranslationAssets/EBus/Senders/UiDraggableBus.names new file mode 100644 index 0000000000..d44fbcc422 --- /dev/null +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/EBus/Senders/UiDraggableBus.names @@ -0,0 +1,235 @@ +{ + "entries": [ + { + "base": "UiDraggableBus", + "context": "EBusSender", + "variant": "", + "details": { + "name": "UI Draggable", + "category": "UI" + }, + "methods": [ + { + "base": "ProxyDragEnd", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Proxy Drag End" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Proxy Drag End is invoked" + }, + "details": { + "name": "Proxy Drag End", + "tooltip": "Concludes the drag of the proxy. Call \"Proxy Drag End\" at the end of a drag if \"Set As Proxy\" was used for the drag.\n\nCall \"Proxy Drag End\" from the \"On Drag End\" handler of the proxy element. This results in a call to \"On Drag End\" for the original draggable element" + }, + "params": [ + { + "typeid": "{3D80F623-C85C-4741-90D0-E4E66164E6BF}", + "details": { + "name": "Position", + "tooltip": "The released position" + } + } + ] + }, + { + "base": "RedoDrag", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Redo Drag" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Redo Drag is invoked" + }, + "details": { + "name": "Redo Drag", + "tooltip": "Causes the draggable component to redetect the drop targets that are underneath the pointer and resends \"On Drop Hover Start\" or \"On Drop Hover End\" messages if needed.\n\nYou can call \"Redo Drag\" from a script after the script has caused drop targets to change positions. This function is most useful for keyboard or gamepad navigation" + }, + "params": [ + { + "typeid": "{3D80F623-C85C-4741-90D0-E4E66164E6BF}", + "details": { + "name": "Position", + "tooltip": "The drag position" + } + } + ] + }, + { + "base": "SetAsProxy", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Set As Proxy" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Set As Proxy is invoked" + }, + "details": { + "name": "Set As Proxy", + "tooltip": "Sets the draggable element to be a proxy for another draggable element and starts a drag on the draggable element at the specified point" + }, + "params": [ + { + "typeid": "{6383F1D3-BB27-4E6B-A49A-6409B2059EAA}", + "details": { + "name": "Original Draggable EntityID", + "tooltip": "The original draggable element" + } + }, + { + "typeid": "{3D80F623-C85C-4741-90D0-E4E66164E6BF}", + "details": { + "name": "Position", + "tooltip": "The position at which to start the drag" + } + } + ] + }, + { + "base": "IsProxy", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Is Proxy" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Is Proxy is invoked" + }, + "details": { + "name": "Is Proxy", + "tooltip": "Returns whether the draggable element is acting as a proxy for another draggable element" + }, + "results": [ + { + "typeid": "{A0CA880C-AFE4-43CB-926C-59AC48496112}", + "details": { + "name": "bool" + } + } + ] + }, + { + "base": "SetDragState", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Set Drag State" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Set Drag State is invoked" + }, + "details": { + "name": "Set Drag State", + "tooltip": "Sets the drag state" + }, + "params": [ + { + "typeid": "{72039442-EB38-4D42-A1AD-CB68F7E0EEF6}", + "details": { + "name": "Drag State", + "tooltip": "The drag state (0=Normal, 1=Valid, 2=Invalid)" + } + } + ] + }, + { + "base": "GetCanDropOnAnyCanvas", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Get Can Drop On Any Canvas" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Get Can Drop On Any Canvas is invoked" + }, + "details": { + "name": "Get Can Drop On Any Canvas", + "tooltip": "Returns whether the draggable element can be dropped on any loaded canvas" + }, + "results": [ + { + "typeid": "{A0CA880C-AFE4-43CB-926C-59AC48496112}", + "details": { + "name": "bool" + } + } + ] + }, + { + "base": "SetCanDropOnAnyCanvas", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Set Can Drop On Any Canvas" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Set Can Drop On Any Canvas is invoked" + }, + "details": { + "name": "Set Can Drop On Any Canvas", + "tooltip": "Sets whether the draggable element can be dropped on any loaded canvas" + }, + "params": [ + { + "typeid": "{A0CA880C-AFE4-43CB-926C-59AC48496112}", + "details": { + "name": "Drop on Any", + "tooltip": "Indicates whether the draggable element can be dropped on any loaded canvas" + } + } + ] + }, + { + "base": "GetDragState", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Get Drag State" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Get Drag State is invoked" + }, + "details": { + "name": "Get Drag State", + "tooltip": "Gets the drag state" + }, + "results": [ + { + "typeid": "{72039442-EB38-4D42-A1AD-CB68F7E0EEF6}", + "details": { + "name": "int" + } + } + ] + }, + { + "base": "GetOriginalFromProxy", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Get Original From Proxy" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Get Original From Proxy is invoked" + }, + "details": { + "name": "Get Original From Proxy", + "tooltip": "Gets the original draggable element that the element is a proxy for" + }, + "results": [ + { + "typeid": "{6383F1D3-BB27-4E6B-A49A-6409B2059EAA}", + "details": { + "name": "EntityId", + "tooltip": "Entity Unique Id" + } + } + ] + } + ] + } + ] +} \ No newline at end of file diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/EBus/Senders/UiDropTargetBus.names b/Gems/ScriptCanvas/Assets/TranslationAssets/EBus/Senders/UiDropTargetBus.names new file mode 100644 index 0000000000..5601160a98 --- /dev/null +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/EBus/Senders/UiDropTargetBus.names @@ -0,0 +1,109 @@ +{ + "entries": [ + { + "base": "UiDropTargetBus", + "context": "EBusSender", + "variant": "", + "details": { + "name": "UI Drop Target", + "category": "UI" + }, + "methods": [ + { + "base": "GetOnDropActionName", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Get On Drop Action Name" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Get On Drop Action Name is invoked" + }, + "details": { + "name": "Get On Drop Action Name", + "tooltip": "Gets the name of the action triggered when a draggable component is dropped on the drop target" + }, + "results": [ + { + "typeid": "{03AAAB3F-5C47-5A66-9EBC-D5FA4DB353C9}", + "details": { + "name": "AZStd::string" + } + } + ] + }, + { + "base": "SetOnDropActionName", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Set On Drop Action Name" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Set On Drop Action Name is invoked" + }, + "details": { + "name": "Set On Drop Action Name", + "tooltip": "Sets the name of the action triggered when a draggable component is dropped on the drop target" + }, + "params": [ + { + "typeid": "{03AAAB3F-5C47-5A66-9EBC-D5FA4DB353C9}", + "details": { + "name": "Name", + "tooltip": "The name of the action triggered when a draggable component is dropped on the drop target" + } + } + ] + }, + { + "base": "GetDropState", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Get Drop State" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Get Drop State is invoked" + }, + "details": { + "name": "Get Drop State", + "tooltip": "Gets the drop state" + }, + "results": [ + { + "typeid": "{72039442-EB38-4D42-A1AD-CB68F7E0EEF6}", + "details": { + "name": "int" + } + } + ] + }, + { + "base": "SetDropState", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Set Drop State" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Set Drop State is invoked" + }, + "details": { + "name": "Set Drop State", + "tooltip": "Sets the drop state" + }, + "params": [ + { + "typeid": "{72039442-EB38-4D42-A1AD-CB68F7E0EEF6}", + "details": { + "name": "Drop State", + "tooltip": "The drop state (0=Normal, 1=Valid, 2=Invalid)" + } + } + ] + } + ] + } + ] +} \ No newline at end of file diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/EBus/Senders/UiDropdownBus.names b/Gems/ScriptCanvas/Assets/TranslationAssets/EBus/Senders/UiDropdownBus.names new file mode 100644 index 0000000000..ec68dc2a3e --- /dev/null +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/EBus/Senders/UiDropdownBus.names @@ -0,0 +1,567 @@ +{ + "entries": [ + { + "base": "UiDropdownBus", + "context": "EBusSender", + "variant": "", + "details": { + "name": "UI Dropdown", + "category": "UI" + }, + "methods": [ + { + "base": "GetOptionSelectedActionName", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Get Option Selected Action Name" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Get Option Selected Action Name is invoked" + }, + "details": { + "name": "Get Option Selected Action Name", + "tooltip": "Gets the name of the action triggered when an option is selected" + }, + "results": [ + { + "typeid": "{03AAAB3F-5C47-5A66-9EBC-D5FA4DB353C9}", + "details": { + "name": "AZStd::string" + } + } + ] + }, + { + "base": "GetWaitTime", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Get Wait Time" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Get Wait Time is invoked" + }, + "details": { + "name": "Get Wait Time", + "tooltip": "Gets how long to wait before expanding upon hover and collapsing upon exit" + }, + "results": [ + { + "typeid": "{EA2C3E90-AFBE-44D4-A90D-FAAF79BAF93D}", + "details": { + "name": "float" + } + } + ] + }, + { + "base": "SetCollapseOnOutsideClick", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Set Collapse On Outside Click" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Set Collapse On Outside Click is invoked" + }, + "details": { + "name": "Set Collapse On Outside Click", + "tooltip": "Sets whether the dropdown should collapse when the user clicks outside the dropdown" + }, + "params": [ + { + "typeid": "{A0CA880C-AFE4-43CB-926C-59AC48496112}", + "details": { + "name": "Collapse", + "tooltip": "Indicates whether the dropdown should collapse when the user clicks outside the dropdown" + } + } + ] + }, + { + "base": "SetExpandOnHover", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Set Expand On Hover" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Set Expand On Hover is invoked" + }, + "details": { + "name": "Set Expand On Hover", + "tooltip": "Sets whether the dropdown should expand automatically on hover" + }, + "params": [ + { + "typeid": "{A0CA880C-AFE4-43CB-926C-59AC48496112}", + "details": { + "name": "Expand", + "tooltip": "Indicates whether the dropdown should expand automatically on hover" + } + } + ] + }, + { + "base": "Expand", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Expand" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Expand is invoked" + }, + "details": { + "name": "Expand", + "tooltip": "Expands the dropdown menu" + } + }, + { + "base": "Collapse", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Collapse" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Collapse is invoked" + }, + "details": { + "name": "Collapse", + "tooltip": "Collapses the dropdown menu" + } + }, + { + "base": "SetCollapsedActionName", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Set Collapsed Action Name" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Set Collapsed Action Name is invoked" + }, + "details": { + "name": "Set Collapsed Action Name", + "tooltip": "Sets the name of the action triggered when the dropdown is collapsed" + }, + "params": [ + { + "typeid": "{03AAAB3F-5C47-5A66-9EBC-D5FA4DB353C9}", + "details": { + "name": "Name", + "tooltip": "The name of the action triggered when the dropdown is collapsed" + } + } + ] + }, + { + "base": "GetExpandOnHover", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Get Expand On Hover" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Get Expand On Hover is invoked" + }, + "details": { + "name": "Get Expand On Hover", + "tooltip": "Returns whether the dropdown expands automatically on hover" + }, + "results": [ + { + "typeid": "{A0CA880C-AFE4-43CB-926C-59AC48496112}", + "details": { + "name": "bool" + } + } + ] + }, + { + "base": "SetWaitTime", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Set Wait Time" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Set Wait Time is invoked" + }, + "details": { + "name": "Set Wait Time", + "tooltip": "Sets how long to wait before expanding upon hover and collapsing upon exit" + }, + "params": [ + { + "typeid": "{EA2C3E90-AFBE-44D4-A90D-FAAF79BAF93D}", + "details": { + "name": "Time", + "tooltip": "How long to wait before expanding upon hover and collapsing upon exit" + } + } + ] + }, + { + "base": "GetCollapseOnOutsideClick", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Get Collapse On Outside Click" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Get Collapse On Outside Click is invoked" + }, + "details": { + "name": "Get Collapse On Outside Click", + "tooltip": "Returns whether the dropdown collapses when the user clicks outside the dropdown" + }, + "results": [ + { + "typeid": "{A0CA880C-AFE4-43CB-926C-59AC48496112}", + "details": { + "name": "bool" + } + } + ] + }, + { + "base": "GetExpandedParentId", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Get Expanded Parent" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Get Expanded Parent is invoked" + }, + "details": { + "name": "Get Expanded Parent", + "tooltip": "Gets the element that the dropdown content parents to when expanded (the root element by default)" + }, + "results": [ + { + "typeid": "{6383F1D3-BB27-4E6B-A49A-6409B2059EAA}", + "details": { + "name": "EntityId", + "tooltip": "Entity Unique Id" + } + } + ] + }, + { + "base": "GetTextElement", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Get Text Element" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Get Text Element is invoked" + }, + "details": { + "name": "Get Text Element", + "tooltip": "Gets the text element that displays the text of the currently selected option" + }, + "results": [ + { + "typeid": "{6383F1D3-BB27-4E6B-A49A-6409B2059EAA}", + "details": { + "name": "EntityId", + "tooltip": "Entity Unique Id" + } + } + ] + }, + { + "base": "GetIconElement", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Get Icon Element" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Get Icon Element is invoked" + }, + "details": { + "name": "Get Icon Element", + "tooltip": "Gets the icon element that displays the icon of the currently selected option" + }, + "results": [ + { + "typeid": "{6383F1D3-BB27-4E6B-A49A-6409B2059EAA}", + "details": { + "name": "EntityId", + "tooltip": "Entity Unique Id" + } + } + ] + }, + { + "base": "SetIconElement", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Set Icon Element" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Set Icon Element is invoked" + }, + "details": { + "name": "Set Icon Element", + "tooltip": "Sets the icon element that displays the icon of the currently selected option" + }, + "params": [ + { + "typeid": "{6383F1D3-BB27-4E6B-A49A-6409B2059EAA}", + "details": { + "name": "Icon EntityID", + "tooltip": "The icon element that displays the icon of the currently selected option" + } + } + ] + }, + { + "base": "SetExpandedActionName", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Set Expanded Action Name" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Set Expanded Action Name is invoked" + }, + "details": { + "name": "Set Expanded Action Name", + "tooltip": "Sets the name of the action triggered when the dropdown is expanded" + }, + "params": [ + { + "typeid": "{03AAAB3F-5C47-5A66-9EBC-D5FA4DB353C9}", + "details": { + "name": "Name", + "tooltip": "The name of the action triggered when the dropdown is expanded" + } + } + ] + }, + { + "base": "SetContent", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Set Content" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Set Content is invoked" + }, + "details": { + "name": "Set Content", + "tooltip": "Sets the content element that the dropdown expands" + }, + "params": [ + { + "typeid": "{6383F1D3-BB27-4E6B-A49A-6409B2059EAA}", + "details": { + "name": "Content EntityID", + "tooltip": "The content element that the dropdown expands" + } + } + ] + }, + { + "base": "SetTextElement", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Set Text Element" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Set Text Element is invoked" + }, + "details": { + "name": "Set Text Element", + "tooltip": "Sets the text element that displays the text of the currently selected option" + }, + "params": [ + { + "typeid": "{6383F1D3-BB27-4E6B-A49A-6409B2059EAA}", + "details": { + "name": "Text EntityID", + "tooltip": "The text element that displays the text of the currently selected option" + } + } + ] + }, + { + "base": "SetValue", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Set Value" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Set Value is invoked" + }, + "details": { + "name": "Set Value", + "tooltip": "Sets the currently selected option of the dropdown manually" + }, + "params": [ + { + "typeid": "{6383F1D3-BB27-4E6B-A49A-6409B2059EAA}", + "details": { + "name": "Option EntityID", + "tooltip": "The currently selected option of the dropdown" + } + } + ] + }, + { + "base": "GetContent", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Get Content" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Get Content is invoked" + }, + "details": { + "name": "Get Content", + "tooltip": "Gets the content element the dropdown will expand" + }, + "results": [ + { + "typeid": "{6383F1D3-BB27-4E6B-A49A-6409B2059EAA}", + "details": { + "name": "EntityId", + "tooltip": "Entity Unique Id" + } + } + ] + }, + { + "base": "GetExpandedActionName", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Get Expanded Action Name" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Get Expanded Action Name is invoked" + }, + "details": { + "name": "Get Expanded Action Name", + "tooltip": "Gets the name of the action triggered when the dropdown is expanded" + }, + "results": [ + { + "typeid": "{03AAAB3F-5C47-5A66-9EBC-D5FA4DB353C9}", + "details": { + "name": "AZStd::string" + } + } + ] + }, + { + "base": "GetCollapsedActionName", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Get Collapsed Action Name" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Get Collapsed Action Name is invoked" + }, + "details": { + "name": "Get Collapsed Action Name", + "tooltip": "Gets the name of the action triggered when the dropdown is collapsed" + }, + "results": [ + { + "typeid": "{03AAAB3F-5C47-5A66-9EBC-D5FA4DB353C9}", + "details": { + "name": "AZStd::string" + } + } + ] + }, + { + "base": "GetValue", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Get Value" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Get Value is invoked" + }, + "details": { + "name": "Get Value", + "tooltip": "Gets the currently selected option" + }, + "results": [ + { + "typeid": "{6383F1D3-BB27-4E6B-A49A-6409B2059EAA}", + "details": { + "name": "EntityId", + "tooltip": "Entity Unique Id" + } + } + ] + }, + { + "base": "SetExpandedParentId", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Set Expanded Parent" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Set Expanded Parent is invoked" + }, + "details": { + "name": "Set Expanded Parent", + "tooltip": "Sets the element that the dropdown content parents to when expanded" + }, + "params": [ + { + "typeid": "{6383F1D3-BB27-4E6B-A49A-6409B2059EAA}", + "details": { + "name": "Expanded EntityID", + "tooltip": "The element that the dropdown content parents to when expanded" + } + } + ] + }, + { + "base": "SetOptionSelectedActionName", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Set Option Selected Action Name" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Set Option Selected Action Name is invoked" + }, + "details": { + "name": "Set Option Selected Action Name", + "tooltip": "Sets the name of the action triggered when an option is selected" + }, + "params": [ + { + "typeid": "{03AAAB3F-5C47-5A66-9EBC-D5FA4DB353C9}", + "details": { + "name": "Name", + "tooltip": "The name of the action triggered when an option is selected" + } + } + ] + } + ] + } + ] +} \ No newline at end of file diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/EBus/Senders/UiDropdownOptionBus.names b/Gems/ScriptCanvas/Assets/TranslationAssets/EBus/Senders/UiDropdownOptionBus.names new file mode 100644 index 0000000000..0491203755 --- /dev/null +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/EBus/Senders/UiDropdownOptionBus.names @@ -0,0 +1,159 @@ +{ + "entries": [ + { + "base": "UiDropdownOptionBus", + "context": "EBusSender", + "variant": "", + "details": { + "name": "UI Dropdown Option", + "category": "UI" + }, + "methods": [ + { + "base": "GetTextElement", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Get Text Element" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Get Text Element is invoked" + }, + "details": { + "name": "Get Text Element", + "tooltip": "Gets the text element that is used to display the dropdown option’s text" + }, + "results": [ + { + "typeid": "{6383F1D3-BB27-4E6B-A49A-6409B2059EAA}", + "details": { + "name": "EntityId", + "tooltip": "Entity Unique Id" + } + } + ] + }, + { + "base": "GetIconElement", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Get Icon Element" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Get Icon Element is invoked" + }, + "details": { + "name": "Get Icon Element", + "tooltip": "Gets the icon element that is used to display the dropdown option’s icon" + }, + "results": [ + { + "typeid": "{6383F1D3-BB27-4E6B-A49A-6409B2059EAA}", + "details": { + "name": "EntityId", + "tooltip": "Entity Unique Id" + } + } + ] + }, + { + "base": "SetIconElement", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Set Icon Element" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Set Icon Element is invoked" + }, + "details": { + "name": "Set Icon Element", + "tooltip": "Sets the icon element that is used to display the dropdown option’s icon" + }, + "params": [ + { + "typeid": "{6383F1D3-BB27-4E6B-A49A-6409B2059EAA}", + "details": { + "name": "Icon EntityID", + "tooltip": "The icon element that is used to display the dropdown option’s icon" + } + } + ] + }, + { + "base": "SetOwningDropdown", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Set Owning Dropdown" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Set Owning Dropdown is invoked" + }, + "details": { + "name": "Set Owning Dropdown", + "tooltip": "Sets the owning dropdown to be modified when the dropdown option is selected" + }, + "params": [ + { + "typeid": "{6383F1D3-BB27-4E6B-A49A-6409B2059EAA}", + "details": { + "name": "Dropdown EntityID", + "tooltip": "The owning dropdown to be modified when the dropdown option is selected" + } + } + ] + }, + { + "base": "SetTextElement", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Set Text Element" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Set Text Element is invoked" + }, + "details": { + "name": "Set Text Element", + "tooltip": "Sets the text element that is used to display the dropdown option’s text" + }, + "params": [ + { + "typeid": "{6383F1D3-BB27-4E6B-A49A-6409B2059EAA}", + "details": { + "name": "Text EntityID", + "tooltip": "The text element that is used to display the dropdown option’s text" + } + } + ] + }, + { + "base": "GetOwningDropdown", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Get Owning Dropdown" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Get Owning Dropdown is invoked" + }, + "details": { + "name": "Get Owning Dropdown", + "tooltip": "Gets the owning dropdown to be modified when the dropdown option is selected" + }, + "results": [ + { + "typeid": "{6383F1D3-BB27-4E6B-A49A-6409B2059EAA}", + "details": { + "name": "EntityId", + "tooltip": "Entity Unique Id" + } + } + ] + } + ] + } + ] +} \ No newline at end of file diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/EBus/Senders/UiDynamicContentDatabaseBus.names b/Gems/ScriptCanvas/Assets/TranslationAssets/EBus/Senders/UiDynamicContentDatabaseBus.names new file mode 100644 index 0000000000..8bc978d30f --- /dev/null +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/EBus/Senders/UiDynamicContentDatabaseBus.names @@ -0,0 +1,199 @@ +{ + "entries": [ + { + "base": "UiDynamicContentDatabaseBus", + "context": "EBusSender", + "variant": "", + "details": { + "name": "UI Dynamic Content Database", + "category": "UI/LyShine Examples" + }, + "methods": [ + { + "base": "Refresh", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Refresh" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Refresh is invoked" + }, + "details": { + "name": "Refresh", + "tooltip": "Refreshes the database with new content" + }, + "params": [ + { + "typeid": "{72039442-EB38-4D42-A1AD-CB68F7E0EEF6}", + "details": { + "name": "Color Type", + "tooltip": "The color type (0=Free, 1=Paid)" + } + }, + { + "typeid": "{03AAAB3F-5C47-5A66-9EBC-D5FA4DB353C9}", + "details": { + "name": "Pathname", + "tooltip": "The pathname to a json file containing color data" + } + } + ] + }, + { + "base": "GetColorPrice", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Get Color Price" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Get Color Price is invoked" + }, + "details": { + "name": "Get Color Price", + "tooltip": "Gets the price of a color" + }, + "params": [ + { + "typeid": "{72039442-EB38-4D42-A1AD-CB68F7E0EEF6}", + "details": { + "name": "Color Type", + "tooltip": "The color type (0=Free, 1=Paid)" + } + }, + { + "typeid": "{72039442-EB38-4D42-A1AD-CB68F7E0EEF6}", + "details": { + "name": "Color Index", + "tooltip": "The index of the color" + } + } + ], + "results": [ + { + "typeid": "{03AAAB3F-5C47-5A66-9EBC-D5FA4DB353C9}", + "details": { + "name": "AZStd::string", + "tooltip": "The color type (0=Free, 1=Paid)" + } + } + ] + }, + { + "base": "GetColorName", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Get Color Name" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Get Color Name is invoked" + }, + "details": { + "name": "Get Color Name", + "tooltip": "Gets the name of a color" + }, + "params": [ + { + "typeid": "{72039442-EB38-4D42-A1AD-CB68F7E0EEF6}", + "details": { + "name": "Color Type", + "tooltip": "The color type (0=Free, 1=Paid)" + } + }, + { + "typeid": "{72039442-EB38-4D42-A1AD-CB68F7E0EEF6}", + "details": { + "name": "Color Index", + "tooltip": "The index of the color" + } + } + ], + "results": [ + { + "typeid": "{03AAAB3F-5C47-5A66-9EBC-D5FA4DB353C9}", + "details": { + "name": "AZStd::string", + "tooltip": "The color type (0=Free, 1=Paid)" + } + } + ] + }, + { + "base": "GetColor", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Get Color" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Get Color is invoked" + }, + "details": { + "name": "Get Color", + "tooltip": "Gets the color value of a color" + }, + "params": [ + { + "typeid": "{72039442-EB38-4D42-A1AD-CB68F7E0EEF6}", + "details": { + "name": "Color Type", + "tooltip": "The color type (0=Free, 1=Paid)" + } + }, + { + "typeid": "{72039442-EB38-4D42-A1AD-CB68F7E0EEF6}", + "details": { + "name": "Color index", + "tooltip": "The index of the color" + } + } + ], + "results": [ + { + "typeid": "{7894072A-9050-4F0F-901B-34B1A0D29417}", + "details": { + "name": "Color", + "tooltip": "The color type (0=Free, 1=Paid)" + } + } + ] + }, + { + "base": "GetNumColors", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Get Number Of Colors" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Get Number Of Colors is invoked" + }, + "details": { + "name": "Get Number Of Colors", + "tooltip": "Gets the number of colors in the database" + }, + "params": [ + { + "typeid": "{72039442-EB38-4D42-A1AD-CB68F7E0EEF6}", + "details": { + "name": "Color Type", + "tooltip": "The color type (0=Free, 1=Paid)" + } + } + ], + "results": [ + { + "typeid": "{72039442-EB38-4D42-A1AD-CB68F7E0EEF6}", + "details": { + "name": "int", + "tooltip": "The color type (0=Free, 1=Paid)" + } + } + ] + } + ] + } + ] +} \ No newline at end of file diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/EBus/Senders/UiDynamicLayoutBus.names b/Gems/ScriptCanvas/Assets/TranslationAssets/EBus/Senders/UiDynamicLayoutBus.names new file mode 100644 index 0000000000..3107acf0cc --- /dev/null +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/EBus/Senders/UiDynamicLayoutBus.names @@ -0,0 +1,39 @@ +{ + "entries": [ + { + "base": "UiDynamicLayoutBus", + "context": "EBusSender", + "variant": "", + "details": { + "name": "UI Dynamic Layout", + "category": "UI" + }, + "methods": [ + { + "base": "SetNumChildElements", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Set Number Of Child Elements" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Set Number Of Child Elements is invoked" + }, + "details": { + "name": "Set Number Of Child Elements", + "tooltip": "Sets the number of children to be cloned from a prototype element" + }, + "params": [ + { + "typeid": "{72039442-EB38-4D42-A1AD-CB68F7E0EEF6}", + "details": { + "name": "Count", + "tooltip": "The number of children to be cloned from a prototype element" + } + } + ] + } + ] + } + ] +} \ No newline at end of file diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/EBus/Senders/UiDynamicScrollBoxBus.names b/Gems/ScriptCanvas/Assets/TranslationAssets/EBus/Senders/UiDynamicScrollBoxBus.names new file mode 100644 index 0000000000..579c2c61dc --- /dev/null +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/EBus/Senders/UiDynamicScrollBoxBus.names @@ -0,0 +1,758 @@ +{ + "entries": [ + { + "base": "UiDynamicScrollBoxBus", + "context": "EBusSender", + "variant": "", + "details": { + "name": "UI Dynamic Scroll Box", + "category": "UI" + }, + "methods": [ + { + "base": "SetSectionsEnabled", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Set Sections Enabled" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Set Sections Enabled is invoked" + }, + "details": { + "name": "Set Sections Enabled", + "tooltip": "Set whether the list is divided into sections with headers" + }, + "params": [ + { + "typeid": "{A0CA880C-AFE4-43CB-926C-59AC48496112}", + "details": { + "name": "Sections Enabled", + "tooltip": "Whether the list is divided into sections with headers" + } + } + ] + }, + { + "base": "GetEstimatedVariableElementSize", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Get Estimated Variable Element Size" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Get Estimated Variable Element Size is invoked" + }, + "details": { + "name": "Get Estimated Variable Element Size", + "tooltip": "Get the estimated size for the variable elements. If set to 0, then element sizes are calculated up front rather than when becoming visible" + }, + "results": [ + { + "typeid": "{EA2C3E90-AFBE-44D4-A90D-FAAF79BAF93D}", + "details": { + "name": "float" + } + } + ] + }, + { + "base": "SetAutoCalculateVariableElementSize", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Set Auto-calculate Variable Element Size" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Set Auto-calculate Variable Element Size is invoked" + }, + "details": { + "name": "Set Auto-calculate Variable Element Size", + "tooltip": "Set whether to auto-calculate the elements when they vary in size" + }, + "params": [ + { + "typeid": "{A0CA880C-AFE4-43CB-926C-59AC48496112}", + "details": { + "name": "Auto-calculate", + "tooltip": "Whether to auto-calculate the elements when they vary in size" + } + } + ] + }, + { + "base": "GetEstimatedVariableHeaderSize", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Get Estimated Variable Header Size" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Get Estimated Variable Header Size is invoked" + }, + "details": { + "name": "Get Estimated Variable Header Size", + "tooltip": "Get the estimated size for the variable headers. If set to 0, then header sizes are calculated up front rather than when becoming visible" + }, + "results": [ + { + "typeid": "{EA2C3E90-AFBE-44D4-A90D-FAAF79BAF93D}", + "details": { + "name": "float" + } + } + ] + }, + { + "base": "SetEstimatedVariableHeaderSize", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Set Estimated Variable Header Size" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Set Estimated Variable Header Size is invoked" + }, + "details": { + "name": "Set Estimated Variable Header Size", + "tooltip": "Set the estimated size for the variable headers. If set to 0, then header sizes are calculated up front rather than when becoming visible" + }, + "params": [ + { + "typeid": "{EA2C3E90-AFBE-44D4-A90D-FAAF79BAF93D}", + "details": { + "name": "Estimated Size", + "tooltip": "The estimated size for the variable headers" + } + } + ] + }, + { + "base": "SetPrototypeElement", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Set Prototype Element" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Set Prototype Element is invoked" + }, + "details": { + "name": "Set Prototype Element", + "tooltip": "Set the prototype entity used for the elements" + }, + "params": [ + { + "typeid": "{6383F1D3-BB27-4E6B-A49A-6409B2059EAA}", + "details": { + "name": "Prototype Element", + "tooltip": "The prototype entity used for the elements" + } + } + ] + }, + { + "base": "SetElementsVaryInSize", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Set Elements Vary In Size" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Set Elements Vary In Size is invoked" + }, + "details": { + "name": "Set Elements Vary In Size", + "tooltip": "Set whether the elements vary in size" + }, + "params": [ + { + "typeid": "{A0CA880C-AFE4-43CB-926C-59AC48496112}", + "details": { + "name": "Elements Vary In Size", + "tooltip": "Whether the elements vary in size" + } + } + ] + }, + { + "base": "RemoveElementsFromFront", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Remove Elements From Front" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Remove Elements From Front is invoked" + }, + "details": { + "name": "Remove Elements From Front", + "tooltip": "Remove elements from the front of the list" + }, + "params": [ + { + "typeid": "{72039442-EB38-4D42-A1AD-CB68F7E0EEF6}", + "details": { + "name": "Number To Remove", + "tooltip": "The number of elements to remove from the front" + } + } + ] + }, + { + "base": "GetElementIndexOfChild", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Get Element Index Of Child" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Get Element Index Of Child is invoked" + }, + "details": { + "name": "Get Element Index Of Child", + "tooltip": "Get the element index of the specified child element. Returns -1 if not found." + }, + "params": [ + { + "typeid": "{6383F1D3-BB27-4E6B-A49A-6409B2059EAA}", + "details": { + "name": "Child EntityID", + "tooltip": "The child" + } + } + ], + "results": [ + { + "typeid": "{72039442-EB38-4D42-A1AD-CB68F7E0EEF6}", + "details": { + "name": "int", + "tooltip": "The child" + } + } + ] + }, + { + "base": "GetElementsVaryInSize", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Get Elements Vary In Size" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Get Elements Vary In Size is invoked" + }, + "details": { + "name": "Get Elements Vary In Size", + "tooltip": "Get whether the elements vary in size" + }, + "results": [ + { + "typeid": "{A0CA880C-AFE4-43CB-926C-59AC48496112}", + "details": { + "name": "bool" + } + } + ] + }, + { + "base": "GetHeadersSticky", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Get Headers Sticky" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Get Headers Sticky is invoked" + }, + "details": { + "name": "Get Headers Sticky", + "tooltip": "Get whether headers stick to the beginning of the visible list area" + }, + "results": [ + { + "typeid": "{A0CA880C-AFE4-43CB-926C-59AC48496112}", + "details": { + "name": "bool" + } + } + ] + }, + { + "base": "GetAutoRefreshOnPostActivate", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Get Auto-refresh On Post-activate" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Get Auto-refresh On Post-activate is invoked" + }, + "details": { + "name": "Get Auto-refresh On Post-activate", + "tooltip": "Get whether the list should automatically prepare and refresh its content post activation" + }, + "results": [ + { + "typeid": "{A0CA880C-AFE4-43CB-926C-59AC48496112}", + "details": { + "name": "bool" + } + } + ] + }, + { + "base": "SetEstimatedVariableElementSize", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Set Estimated Variable Element Size" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Set Estimated Variable Element Size is invoked" + }, + "details": { + "name": "Set Estimated Variable Element Size", + "tooltip": "Set the estimated size for the variable elements. If set to 0, then element sizes are calculated up front rather than when becoming visible" + }, + "params": [ + { + "typeid": "{EA2C3E90-AFBE-44D4-A90D-FAAF79BAF93D}", + "details": { + "name": "Estimated Size", + "tooltip": "The estimated size for the variable elements" + } + } + ] + }, + { + "base": "SetPrototypeHeader", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Set Prototype Header" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Set Prototype Header is invoked" + }, + "details": { + "name": "Set Prototype Header", + "tooltip": "Set the prototype entity used for the headers" + }, + "params": [ + { + "typeid": "{6383F1D3-BB27-4E6B-A49A-6409B2059EAA}", + "details": { + "name": "Prototype Header", + "tooltip": "The prototype entity used for the headers" + } + } + ] + }, + { + "base": "GetSectionsEnabled", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Get Sections Enabled" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Get Sections Enabled is invoked" + }, + "details": { + "name": "Get Sections Enabled", + "tooltip": "Get whether the list is divided into sections with headers" + }, + "results": [ + { + "typeid": "{A0CA880C-AFE4-43CB-926C-59AC48496112}", + "details": { + "name": "bool" + } + } + ] + }, + { + "base": "ScrollToEnd", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Scroll To End" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Scroll To End is invoked" + }, + "details": { + "name": "Scroll To End", + "tooltip": "Scroll to the end of the list" + } + }, + { + "base": "GetPrototypeElement", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Get Prototype Element" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Get Prototype Element is invoked" + }, + "details": { + "name": "Get Prototype Element", + "tooltip": "Get the prototype entity used for the elements" + }, + "results": [ + { + "typeid": "{6383F1D3-BB27-4E6B-A49A-6409B2059EAA}", + "details": { + "name": "EntityId", + "tooltip": "Entity Unique Id" + } + } + ] + }, + { + "base": "SetHeadersVaryInSize", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Set Headers Vary In Size" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Set Headers Vary In Size is invoked" + }, + "details": { + "name": "Set Headers Vary In Size", + "tooltip": "Set whether the headers vary in size" + }, + "params": [ + { + "typeid": "{A0CA880C-AFE4-43CB-926C-59AC48496112}", + "details": { + "name": "Headers Vary In Size", + "tooltip": "Whether the headers vary in size" + } + } + ] + }, + { + "base": "AddElementsToEnd", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Add Elements To End" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Add Elements To End is invoked" + }, + "details": { + "name": "Add Elements To End", + "tooltip": "Add elements to the end of the list" + }, + "params": [ + { + "typeid": "{72039442-EB38-4D42-A1AD-CB68F7E0EEF6}", + "details": { + "name": "Number To Add", + "tooltip": "The number of elements to add to the end" + } + }, + { + "typeid": "{A0CA880C-AFE4-43CB-926C-59AC48496112}", + "details": { + "name": "Scroll To End If Was At End", + "tooltip": "If set and the scroll box was already scrolled to the end then it will scroll to the end after adding the elements" + } + } + ] + }, + { + "base": "GetChildAtElementIndex", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Get Child At Element Index" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Get Child At Element Index is invoked" + }, + "details": { + "name": "Get Child At Element Index", + "tooltip": "Get the child element at the specified element index. Used with lists that are not divided into sections" + }, + "params": [ + { + "typeid": "{72039442-EB38-4D42-A1AD-CB68F7E0EEF6}", + "details": { + "name": "Child Element Index", + "tooltip": "The index of the child" + } + } + ], + "results": [ + { + "typeid": "{6383F1D3-BB27-4E6B-A49A-6409B2059EAA}", + "details": { + "name": "EntityId", + "tooltip": "The index of the child" + } + } + ] + }, + { + "base": "SetHeadersSticky", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Set Headers Sticky" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Set Headers Sticky is invoked" + }, + "details": { + "name": "Set Headers Sticky", + "tooltip": "Set whether headers stick to the beginning of the visible list area" + }, + "params": [ + { + "typeid": "{A0CA880C-AFE4-43CB-926C-59AC48496112}", + "details": { + "name": "Sticky Headers", + "tooltip": "Whether headers stick to the beginning of the visible list area" + } + } + ] + }, + { + "base": "GetChildAtSectionAndElementIndex", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Get Child At Section And Element Index" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Get Child At Section And Element Index is invoked" + }, + "details": { + "name": "Get Child At Section And Element Index", + "tooltip": "Get the child element at the specified section index and element index. Used with lists that are divided into sections" + }, + "params": [ + { + "typeid": "{72039442-EB38-4D42-A1AD-CB68F7E0EEF6}", + "details": { + "name": "Section Index", + "tooltip": "The index of the section" + } + }, + { + "typeid": "{72039442-EB38-4D42-A1AD-CB68F7E0EEF6}", + "details": { + "name": "Element Index", + "tooltip": "The index of the element within the section" + } + } + ], + "results": [ + { + "typeid": "{6383F1D3-BB27-4E6B-A49A-6409B2059EAA}", + "details": { + "name": "EntityId", + "tooltip": "The index of the section" + } + } + ] + }, + { + "base": "SetAutoRefreshOnPostActivate", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Set Auto-refresh On Post-activate" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Set Auto-refresh On Post-activate is invoked" + }, + "details": { + "name": "Set Auto-refresh On Post-activate", + "tooltip": "Set whether the list should automatically prepare and refresh its content post activation" + }, + "params": [ + { + "typeid": "{A0CA880C-AFE4-43CB-926C-59AC48496112}", + "details": { + "name": "Auto-refresh", + "tooltip": "Whether the list should automatically prepare and refresh its content post activation" + } + } + ] + }, + { + "base": "GetSectionIndexOfChild", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Get Section Index Of Child" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Get Section Index Of Child is invoked" + }, + "details": { + "name": "Get Section Index Of Child", + "tooltip": "Get the section index of the specified child element. Returns -1 if not found. Used with lists that are divided into sections" + }, + "params": [ + { + "typeid": "{6383F1D3-BB27-4E6B-A49A-6409B2059EAA}", + "details": { + "name": "Child Element", + "tooltip": "The child element" + } + } + ], + "results": [ + { + "typeid": "{72039442-EB38-4D42-A1AD-CB68F7E0EEF6}", + "details": { + "name": "int", + "tooltip": "The child element" + } + } + ] + }, + { + "base": "RefreshContent", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Refresh Content" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Refresh Content is invoked" + }, + "details": { + "name": "Refresh Content", + "tooltip": "Refreshes the content. You should call this when the list size or element content has changed" + } + }, + { + "base": "GetHeadersVaryInSize", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Get Headers Vary In Size" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Get Headers Vary In Size is invoked" + }, + "details": { + "name": "Get Headers Vary In Size", + "tooltip": "Get whether the headers vary in size" + }, + "results": [ + { + "typeid": "{A0CA880C-AFE4-43CB-926C-59AC48496112}", + "details": { + "name": "bool" + } + } + ] + }, + { + "base": "GetPrototypeHeader", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Get Prototype Header" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Get Prototype Header is invoked" + }, + "details": { + "name": "Get Prototype Header", + "tooltip": "Get the prototype entity used for the headers" + }, + "results": [ + { + "typeid": "{6383F1D3-BB27-4E6B-A49A-6409B2059EAA}", + "details": { + "name": "EntityId", + "tooltip": "Entity Unique Id" + } + } + ] + }, + { + "base": "SetAutoCalculateVariableHeaderSize", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Set Auto-calculate Variable Header Size" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Set Auto-calculate Variable Header Size is invoked" + }, + "details": { + "name": "Set Auto-calculate Variable Header Size", + "tooltip": "Set whether to auto calculate the headers when they vary in size" + }, + "params": [ + { + "typeid": "{A0CA880C-AFE4-43CB-926C-59AC48496112}", + "details": { + "name": "Auto-calculate", + "tooltip": "Whether to auto calculate the headers when they vary in size" + } + } + ] + }, + { + "base": "GetAutoCalculateVariableElementSize", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Get Auto-calculate Variable Element Size" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Get Auto-calculate Variable Element Size is invoked" + }, + "details": { + "name": "Get Auto-calculate Variable Element Size", + "tooltip": "Get whether to auto-calculate the elements when they vary in size" + }, + "results": [ + { + "typeid": "{A0CA880C-AFE4-43CB-926C-59AC48496112}", + "details": { + "name": "bool" + } + } + ] + }, + { + "base": "GetAutoCalculateVariableHeaderSize", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Get Auto-calculate Variable Header Size" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Get Auto-calculate Variable Header Size is invoked" + }, + "details": { + "name": "Get Auto-calculate Variable Header Size", + "tooltip": "Get whether to auto-calculate the headers when they vary in size" + }, + "results": [ + { + "typeid": "{A0CA880C-AFE4-43CB-926C-59AC48496112}", + "details": { + "name": "bool" + } + } + ] + } + ] + } + ] +} \ No newline at end of file diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/EBus/Senders/UiElementBus.names b/Gems/ScriptCanvas/Assets/TranslationAssets/EBus/Senders/UiElementBus.names new file mode 100644 index 0000000000..481223a96e --- /dev/null +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/EBus/Senders/UiElementBus.names @@ -0,0 +1,390 @@ +{ + "entries": [ + { + "base": "UiElementBus", + "context": "EBusSender", + "variant": "", + "details": { + "name": "UI Element", + "category": "UI" + }, + "methods": [ + { + "base": "FindChildByName", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Find Child By Name" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Find Child By Name is invoked" + }, + "details": { + "name": "Find Child By Name", + "tooltip": "Returns the first immediate child with the specified name" + }, + "params": [ + { + "typeid": "{03AAAB3F-5C47-5A66-9EBC-D5FA4DB353C9}", + "details": { + "name": "Name", + "tooltip": "The name of the child" + } + } + ], + "results": [ + { + "typeid": "{6383F1D3-BB27-4E6B-A49A-6409B2059EAA}", + "details": { + "name": "EntityId", + "tooltip": "The name of the child" + } + } + ] + }, + { + "base": "GetChild", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Get Child" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Get Child is invoked" + }, + "details": { + "name": "Get Child", + "tooltip": "Gets a child by index" + }, + "params": [ + { + "typeid": "{72039442-EB38-4D42-A1AD-CB68F7E0EEF6}", + "details": { + "name": "Child Index", + "tooltip": "The index of the child" + } + } + ], + "results": [ + { + "typeid": "{6383F1D3-BB27-4E6B-A49A-6409B2059EAA}", + "details": { + "name": "EntityId", + "tooltip": "The index of the child" + } + } + ] + }, + { + "base": "GetNumChildElements", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Get Number Of Child Elements" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Get Number Of Child Elements is invoked" + }, + "details": { + "name": "Get Number Of Child Elements", + "tooltip": "Gets the number of children of the element" + }, + "results": [ + { + "typeid": "{72039442-EB38-4D42-A1AD-CB68F7E0EEF6}", + "details": { + "name": "int" + } + } + ] + }, + { + "base": "GetChildren", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Get Children" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Get Children is invoked" + }, + "details": { + "name": "Get Children", + "tooltip": "Gets the children of the element" + }, + "results": [ + { + "typeid": "{4841CFF0-7A5C-519C-BD16-D3625E99605E}", + "details": { + "name": "AZStd::vector" + } + } + ] + }, + { + "base": "DestroyElement", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Destroy Element" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Destroy Element is invoked" + }, + "details": { + "name": "Destroy Element", + "tooltip": "Destroys the element" + } + }, + { + "base": "IsAncestor", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Is Ancestor" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Is Ancestor is invoked" + }, + "details": { + "name": "Is Ancestor", + "tooltip": "Return whether a given element is an ancestor of the element" + }, + "params": [ + { + "typeid": "{6383F1D3-BB27-4E6B-A49A-6409B2059EAA}", + "details": { + "name": "Ancestor EntityID", + "tooltip": "The element to check whether it's an ancestor of the element" + } + } + ], + "results": [ + { + "typeid": "{A0CA880C-AFE4-43CB-926C-59AC48496112}", + "details": { + "name": "bool", + "tooltip": "The element to check whether it's an ancestor of the element" + } + } + ] + }, + { + "base": "GetParent", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Get Parent" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Get Parent is invoked" + }, + "details": { + "name": "Get Parent", + "tooltip": "Gets the parent of the element" + }, + "results": [ + { + "typeid": "{6383F1D3-BB27-4E6B-A49A-6409B2059EAA}", + "details": { + "name": "EntityId", + "tooltip": "Entity Unique Id" + } + } + ] + }, + { + "base": "FindDescendantByName", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Find Descendant By Name" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Find Descendant By Name is invoked" + }, + "details": { + "name": "Find Descendant By Name", + "tooltip": "Returns the first descendant element with the specified name" + }, + "params": [ + { + "typeid": "{03AAAB3F-5C47-5A66-9EBC-D5FA4DB353C9}", + "details": { + "name": "Name", + "tooltip": "The name of the descendant" + } + } + ], + "results": [ + { + "typeid": "{6383F1D3-BB27-4E6B-A49A-6409B2059EAA}", + "details": { + "name": "EntityId", + "tooltip": "The name of the descendant" + } + } + ] + }, + { + "base": "IsEnabled", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Is Enabled" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Is Enabled is invoked" + }, + "details": { + "name": "Is Enabled", + "tooltip": "Returns whether the element is enabled" + }, + "results": [ + { + "typeid": "{A0CA880C-AFE4-43CB-926C-59AC48496112}", + "details": { + "name": "bool" + } + } + ] + }, + { + "base": "GetCanvas", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Get Canvas" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Get Canvas is invoked" + }, + "details": { + "name": "Get Canvas", + "tooltip": "Gets the canvas that contains the element" + }, + "results": [ + { + "typeid": "{6383F1D3-BB27-4E6B-A49A-6409B2059EAA}", + "details": { + "name": "EntityId", + "tooltip": "Entity Unique Id" + } + } + ] + }, + { + "base": "Reparent", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Reparent" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Reparent is invoked" + }, + "details": { + "name": "Reparent", + "tooltip": "Changes the element to be the child of a new parent.\n\nThe element is removed from its current parent and added as a child of the new parent. If the new parent is invalid, the element becomes a top-level element\n\n If an \"insert before\" element is specified, then the element is inserted before that element if the \"insert before\" element is a child of the new parent" + }, + "params": [ + { + "typeid": "{6383F1D3-BB27-4E6B-A49A-6409B2059EAA}", + "details": { + "name": "Parent EntityID", + "tooltip": "The new parent" + } + }, + { + "typeid": "{6383F1D3-BB27-4E6B-A49A-6409B2059EAA}", + "details": { + "name": "Insert Before EntityID", + "tooltip": "The element to insert before" + } + } + ] + }, + { + "base": "GetName", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Get Name" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Get Name is invoked" + }, + "details": { + "name": "Get Name", + "tooltip": "Gets the name of the element" + }, + "results": [ + { + "typeid": "{03AAAB3F-5C47-5A66-9EBC-D5FA4DB353C9}", + "details": { + "name": "AZStd::string" + } + } + ] + }, + { + "base": "GetIndexOfChildByEntityId", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Get Index Of Child By EntityID" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Get Index Of Child By EntityID is invoked" + }, + "details": { + "name": "Get Index Of Child By EntityID", + "tooltip": "Gets the index of the specified child" + }, + "params": [ + { + "typeid": "{6383F1D3-BB27-4E6B-A49A-6409B2059EAA}", + "details": { + "name": "Child EntityID", + "tooltip": "The child" + } + } + ], + "results": [ + { + "typeid": "{72039442-EB38-4D42-A1AD-CB68F7E0EEF6}", + "details": { + "name": "int", + "tooltip": "The child" + } + } + ] + }, + { + "base": "SetIsEnabled", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Set Is Enabled" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Set Is Enabled is invoked" + }, + "details": { + "name": "Set Is Enabled", + "tooltip": "Sets whether the element is enabled" + }, + "params": [ + { + "typeid": "{A0CA880C-AFE4-43CB-926C-59AC48496112}", + "details": { + "name": "Enabled", + "tooltip": "Indicates whether the element is enabled" + } + } + ] + } + ] + } + ] +} \ No newline at end of file diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/EBus/Senders/UiFaderBus.names b/Gems/ScriptCanvas/Assets/TranslationAssets/EBus/Senders/UiFaderBus.names new file mode 100644 index 0000000000..154918a041 --- /dev/null +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/EBus/Senders/UiFaderBus.names @@ -0,0 +1,163 @@ +{ + "entries": [ + { + "base": "UiFaderBus", + "context": "EBusSender", + "variant": "", + "details": { + "name": "UI Fader", + "category": "UI" + }, + "methods": [ + { + "base": "GetUseRenderToTexture", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Get Use Render To Texture" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Get Use Render To Texture is invoked" + }, + "details": { + "name": "Get Use Render To Texture", + "tooltip": "Get the flag that indicates whether the fader should use render to texture" + }, + "results": [ + { + "typeid": "{A0CA880C-AFE4-43CB-926C-59AC48496112}", + "details": { + "name": "bool" + } + } + ] + }, + { + "base": "IsFading", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Is Fading" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Is Fading is invoked" + }, + "details": { + "name": "Is Fading", + "tooltip": "Returns whether a fade is taking place" + }, + "results": [ + { + "typeid": "{A0CA880C-AFE4-43CB-926C-59AC48496112}", + "details": { + "name": "bool" + } + } + ] + }, + { + "base": "Fade", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Fade" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Fade is invoked" + }, + "details": { + "name": "Fade", + "tooltip": "Triggers a fade" + }, + "params": [ + { + "typeid": "{EA2C3E90-AFBE-44D4-A90D-FAAF79BAF93D}", + "details": { + "name": "Target Value", + "tooltip": "The value at which to end the fade [0-1]. One means no fade; zero means complete fade to invisible" + } + }, + { + "typeid": "{EA2C3E90-AFBE-44D4-A90D-FAAF79BAF93D}", + "details": { + "name": "Speed", + "tooltip": "The speed of the fade in full fade amount per second; 0 means instant" + } + } + ] + }, + { + "base": "SetFadeValue", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Set Fade Value" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Set Fade Value is invoked" + }, + "details": { + "name": "Set Fade Value", + "tooltip": "Sets the fade value" + }, + "params": [ + { + "typeid": "{EA2C3E90-AFBE-44D4-A90D-FAAF79BAF93D}", + "details": { + "name": "Fade Value", + "tooltip": "The fade value [0-1]. One means no fade; zero means complete fade to invisible" + } + } + ] + }, + { + "base": "GetFadeValue", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Get Fade Value" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Get Fade Value is invoked" + }, + "details": { + "name": "Get Fade Value", + "tooltip": "Gets the fade value" + }, + "results": [ + { + "typeid": "{EA2C3E90-AFBE-44D4-A90D-FAAF79BAF93D}", + "details": { + "name": "float" + } + } + ] + }, + { + "base": "SetUseRenderToTexture", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Set Use Render To Texture" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Set Use Render To Texture is invoked" + }, + "details": { + "name": "Set Use Render To Texture", + "tooltip": "Set the flag that indicates whether the fader should use render to texture" + }, + "params": [ + { + "typeid": "{A0CA880C-AFE4-43CB-926C-59AC48496112}", + "details": { + "name": "Use Render To Texture", + "tooltip": "Whether the fader should use render to texture" + } + } + ] + } + ] + } + ] +} \ No newline at end of file diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/EBus/Senders/UiFlipbookAnimationBus.names b/Gems/ScriptCanvas/Assets/TranslationAssets/EBus/Senders/UiFlipbookAnimationBus.names new file mode 100644 index 0000000000..c0f62a816b --- /dev/null +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/EBus/Senders/UiFlipbookAnimationBus.names @@ -0,0 +1,585 @@ +{ + "entries": [ + { + "base": "UiFlipbookAnimationBus", + "context": "EBusSender", + "variant": "", + "details": { + "name": "UI Flipbook Animation", + "category": "UI" + }, + "methods": [ + { + "base": "GetLoopType", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Get Loop Type" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Get Loop Type is invoked" + }, + "details": { + "name": "Get Loop Type", + "tooltip": "Gets the type of looping behavior for the animation" + }, + "results": [ + { + "typeid": "{72039442-EB38-4D42-A1AD-CB68F7E0EEF6}", + "details": { + "name": "int" + } + } + ] + }, + { + "base": "GetReverseDelay", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Get Reverse Delay" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Get Reverse Delay is invoked" + }, + "details": { + "name": "Get Reverse Delay", + "tooltip": "Gets the delay (in seconds) before playing the reverse loop sequence (PingPong loop types only)" + }, + "results": [ + { + "typeid": "{EA2C3E90-AFBE-44D4-A90D-FAAF79BAF93D}", + "details": { + "name": "float" + } + } + ] + }, + { + "base": "SetIsAutoPlay", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Set Is Auto Play Enabled" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Set Is Auto Play Enabled is invoked" + }, + "details": { + "name": "Set Is Auto Play Enabled", + "tooltip": "Sets whether the animation will begin playing as soon as the element is activated" + }, + "params": [ + { + "typeid": "{A0CA880C-AFE4-43CB-926C-59AC48496112}", + "details": { + "name": "Auto Play", + "tooltip": "Indicates whether the animation will begin playing as soon as the element is activated" + } + } + ] + }, + { + "base": "SetCurrentFrame", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Set Current Frame" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Set Current Frame is invoked" + }, + "details": { + "name": "Set Current Frame", + "tooltip": "Sets the frame to immediately display for the animation" + }, + "params": [ + { + "typeid": "{43DA906B-7DEF-4CA8-9790-854106D3F983}", + "details": { + "name": "Frame", + "tooltip": "The frame to immediately display for the animation" + } + } + ] + }, + { + "base": "GetLoopStartFrame", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Get Loop Start Frame" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Get Loop Start Frame is invoked" + }, + "details": { + "name": "Get Loop Start Frame", + "tooltip": "Gets the first frame that is displayed within an animation loop. Applicable only when the \"Loop Type\" is set to anything other than \"None\"" + }, + "results": [ + { + "typeid": "{43DA906B-7DEF-4CA8-9790-854106D3F983}", + "details": { + "name": "unsigned int" + } + } + ] + }, + { + "base": "SetLoopType", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Set Loop Type" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Set Loop Type is invoked" + }, + "details": { + "name": "Set Loop Type", + "tooltip": "Sets the type of looping behavior for this animation" + }, + "params": [ + { + "typeid": "{72039442-EB38-4D42-A1AD-CB68F7E0EEF6}", + "details": { + "name": "Loop Type", + "tooltip": "The looping behavior for the animation (0=None, 1=Linear, 2=Ping Pong)" + } + } + ] + }, + { + "base": "GetStartDelay", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Get Start Delay" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Get Start Delay is invoked" + }, + "details": { + "name": "Get Start Delay", + "tooltip": "Gets the delay (in seconds) before playing the flipbook (applied only once during playback)" + }, + "results": [ + { + "typeid": "{EA2C3E90-AFBE-44D4-A90D-FAAF79BAF93D}", + "details": { + "name": "float" + } + } + ] + }, + { + "base": "SetStartDelay", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Set Start Delay" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Set Start Delay is invoked" + }, + "details": { + "name": "Set Start Delay", + "tooltip": "Sets the delay (in seconds) before playing the flipbook (applied only once during playback)" + }, + "params": [ + { + "typeid": "{EA2C3E90-AFBE-44D4-A90D-FAAF79BAF93D}", + "details": { + "name": "Start Delay", + "tooltip": "The delay (in seconds) before playing the flipbook" + } + } + ] + }, + { + "base": "GetCurrentFrame", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Get Current Frame" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Get Current Frame is invoked" + }, + "details": { + "name": "Get Current Frame", + "tooltip": "Gets the frame of the animation currently displayed" + }, + "results": [ + { + "typeid": "{43DA906B-7DEF-4CA8-9790-854106D3F983}", + "details": { + "name": "unsigned int" + } + } + ] + }, + { + "base": "GetFramerate", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Get Framerate" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Get Framerate is invoked" + }, + "details": { + "name": "Get Framerate", + "tooltip": "Gets the speed used to determine when to transition to the next frame. Framerate is defined relative to unit of time, specified by FramerateUnits" + }, + "results": [ + { + "typeid": "{EA2C3E90-AFBE-44D4-A90D-FAAF79BAF93D}", + "details": { + "name": "float" + } + } + ] + }, + { + "base": "SetLoopDelay", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Set Loop Delay" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Set Loop Delay is invoked" + }, + "details": { + "name": "Set Loop Delay", + "tooltip": "Sets the delay (in seconds) before playing the loop sequence" + }, + "params": [ + { + "typeid": "{EA2C3E90-AFBE-44D4-A90D-FAAF79BAF93D}", + "details": { + "name": "Loop Delay", + "tooltip": "The delay (in seconds) before playing the loop sequence" + } + } + ] + }, + { + "base": "GetStartFrame", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Get Start Frame" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Get Start Frame is invoked" + }, + "details": { + "name": "Get Start Frame", + "tooltip": "Gets the first frame to display when starting the animation" + }, + "results": [ + { + "typeid": "{43DA906B-7DEF-4CA8-9790-854106D3F983}", + "details": { + "name": "unsigned int" + } + } + ] + }, + { + "base": "SetFramerateUnit", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Set Framerate Unit" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Set Framerate Unit is invoked" + }, + "details": { + "name": "Set Framerate Unit", + "tooltip": "Sets the framerate unit (0 = Frames per second, 1 = Seconds per frame)" + }, + "params": [ + { + "typeid": "{72039442-EB38-4D42-A1AD-CB68F7E0EEF6}", + "details": { + "name": "Framerate Unit", + "tooltip": "The framerate unit (0 = Frames per second, 1 = Seconds per frame)" + } + } + ] + }, + { + "base": "IsPlaying", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Is Playing" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Is Playing is invoked" + }, + "details": { + "name": "Is Playing", + "tooltip": "Returns whether the animation is currently playing" + }, + "results": [ + { + "typeid": "{A0CA880C-AFE4-43CB-926C-59AC48496112}", + "details": { + "name": "bool" + } + } + ] + }, + { + "base": "SetEndFrame", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Set End Frame" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Set End Frame is invoked" + }, + "details": { + "name": "Set End Frame", + "tooltip": "Sets the last frame to display for the animation" + }, + "params": [ + { + "typeid": "{43DA906B-7DEF-4CA8-9790-854106D3F983}", + "details": { + "name": "Frame", + "tooltip": "The last frame to display for the animation" + } + } + ] + }, + { + "base": "SetLoopStartFrame", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Set Loop Start Frame" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Set Loop Start Frame is invoked" + }, + "details": { + "name": "Set Loop Start Frame", + "tooltip": "Sets the first frame that is displayed within an animation loop. Applicable only when the \"Loop Type\" is set to anything other than \"None\"" + }, + "params": [ + { + "typeid": "{43DA906B-7DEF-4CA8-9790-854106D3F983}", + "details": { + "name": "Frame", + "tooltip": "The first frame that is displayed within an animation loop" + } + } + ] + }, + { + "base": "SetReverseDelay", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Set Reverse Delay" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Set Reverse Delay is invoked" + }, + "details": { + "name": "Set Reverse Delay", + "tooltip": "Sets the delay (in seconds) before playing the reverse loop sequence (PingPong loop types only)" + }, + "params": [ + { + "typeid": "{EA2C3E90-AFBE-44D4-A90D-FAAF79BAF93D}", + "details": { + "name": "Reverse Delay", + "tooltip": "The delay (in seconds) before playing the reverse loop sequence" + } + } + ] + }, + { + "base": "Stop", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Stop" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Stop is invoked" + }, + "details": { + "name": "Stop", + "tooltip": "Ends the animation" + } + }, + { + "base": "SetFramerate", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Set Framerate" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Set Framerate is invoked" + }, + "details": { + "name": "Set Framerate", + "tooltip": "Sets the speed used to determine when to transition to the next frame. Framerate is defined relative to unit of time, specified by FramerateUnits" + }, + "params": [ + { + "typeid": "{EA2C3E90-AFBE-44D4-A90D-FAAF79BAF93D}", + "details": { + "name": "Framerate", + "tooltip": "The framerate in whatever units are specified by Set Framerate Unit" + } + } + ] + }, + { + "base": "GetIsAutoPlay", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Is Auto Play Enabled" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Is Auto Play Enabled is invoked" + }, + "details": { + "name": "Is Auto Play Enabled", + "tooltip": "Returns whether the animation will begin playing as soon as the element is activated" + }, + "results": [ + { + "typeid": "{A0CA880C-AFE4-43CB-926C-59AC48496112}", + "details": { + "name": "bool" + } + } + ] + }, + { + "base": "Start", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Start" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Start is invoked" + }, + "details": { + "name": "Start", + "tooltip": "Begins playing the flipbook animation" + } + }, + { + "base": "SetStartFrame", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Set Start Frame" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Set Start Frame is invoked" + }, + "details": { + "name": "Set Start Frame", + "tooltip": "Sets the first frame to display when starting the animation" + }, + "params": [ + { + "typeid": "{43DA906B-7DEF-4CA8-9790-854106D3F983}", + "details": { + "name": "Frame", + "tooltip": "The first frame to display when starting the animation" + } + } + ] + }, + { + "base": "GetEndFrame", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Get End Frame" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Get End Frame is invoked" + }, + "details": { + "name": "Get End Frame", + "tooltip": "Gets the last frame to display for the animation" + }, + "results": [ + { + "typeid": "{43DA906B-7DEF-4CA8-9790-854106D3F983}", + "details": { + "name": "unsigned int" + } + } + ] + }, + { + "base": "GetFramerateUnit", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Get Framerate Unit" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Get Framerate Unit is invoked" + }, + "details": { + "name": "Get Framerate Unit", + "tooltip": "Gets the framerate unit (0 = Frames per second, 1 = Seconds per frame)" + }, + "results": [ + { + "typeid": "{72039442-EB38-4D42-A1AD-CB68F7E0EEF6}", + "details": { + "name": "int" + } + } + ] + }, + { + "base": "GetLoopDelay", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Get Loop Delay" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Get Loop Delay is invoked" + }, + "details": { + "name": "Get Loop Delay", + "tooltip": "Gets the delay (in seconds) before playing the loop sequence" + }, + "results": [ + { + "typeid": "{EA2C3E90-AFBE-44D4-A90D-FAAF79BAF93D}", + "details": { + "name": "float" + } + } + ] + } + ] + } + ] +} \ No newline at end of file diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/EBus/Senders/UiImageBus.names b/Gems/ScriptCanvas/Assets/TranslationAssets/EBus/Senders/UiImageBus.names new file mode 100644 index 0000000000..fdaf5e3252 --- /dev/null +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/EBus/Senders/UiImageBus.names @@ -0,0 +1,706 @@ +{ + "entries": [ + { + "base": "UiImageBus", + "context": "EBusSender", + "variant": "", + "details": { + "name": "UI Image", + "category": "UI" + }, + "methods": [ + { + "base": "GetColor", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Get Color" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Get Color is invoked" + }, + "details": { + "name": "Get Color", + "tooltip": "Gets the color tint for the image" + }, + "results": [ + { + "typeid": "{7894072A-9050-4F0F-901B-34B1A0D29417}", + "details": { + "name": "Color" + } + } + ] + }, + { + "base": "SetColor", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Set Color" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Set Color is invoked" + }, + "details": { + "name": "Set Color", + "tooltip": "Sets the color tint for the image" + }, + "params": [ + { + "typeid": "{7894072A-9050-4F0F-901B-34B1A0D29417}", + "details": { + "name": "Color", + "tooltip": "The color tint for the image" + } + } + ] + }, + { + "base": "SetSpriteType", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Set Sprite Type" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Set Sprite Type is invoked" + }, + "details": { + "name": "Set Sprite Type", + "tooltip": "Sets the type of the sprite" + }, + "params": [ + { + "typeid": "{72039442-EB38-4D42-A1AD-CB68F7E0EEF6}", + "details": { + "name": "Sprite Type", + "tooltip": "The type of the sprite (0=Sprite Asset, 1=Render Target)" + } + } + ] + }, + { + "base": "GetFillClockwise", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Get Fill Clockwise" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Get Fill Clockwise is invoked" + }, + "details": { + "name": "Get Fill Clockwise", + "tooltip": "Returns whether the image is radially filled clockwise" + }, + "results": [ + { + "typeid": "{A0CA880C-AFE4-43CB-926C-59AC48496112}", + "details": { + "name": "bool" + } + } + ] + }, + { + "base": "SetRenderTargetName", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Set Render Target Name" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Set Render Target Name is invoked" + }, + "details": { + "name": "Set Render Target Name", + "tooltip": "Sets the name of the render target associated with the sprite" + }, + "params": [ + { + "typeid": "{03AAAB3F-5C47-5A66-9EBC-D5FA4DB353C9}", + "details": { + "name": "Name", + "tooltip": "The name of the render target associated with the sprite" + } + } + ] + }, + { + "base": "SetSpritePathnameIfExists", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Set Sprite Pathname If Exists" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Set Sprite Pathname If Exists is invoked" + }, + "details": { + "name": "Set Sprite Pathname If Exists", + "tooltip": "Sets the source location of the image to be displayed by the element - only if the sprite asset exists. Otherwise, the current sprite remains unchanged. Returns whether the sprite changed" + }, + "params": [ + { + "typeid": "{03AAAB3F-5C47-5A66-9EBC-D5FA4DB353C9}", + "details": { + "name": "Pathname", + "tooltip": "The source location of the image to be displayed by the element" + } + } + ], + "results": [ + { + "typeid": "{A0CA880C-AFE4-43CB-926C-59AC48496112}", + "details": { + "name": "bool", + "tooltip": "The source location of the image to be displayed by the element" + } + } + ] + }, + { + "base": "SetEdgeFillOrigin", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Set Edge Fill Origin" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Set Edge Fill Origin is invoked" + }, + "details": { + "name": "Set Edge Fill Origin", + "tooltip": "Sets the edge fill origin of the image" + }, + "params": [ + { + "typeid": "{72039442-EB38-4D42-A1AD-CB68F7E0EEF6}", + "details": { + "name": "Origin", + "tooltip": "The edge fill origin (0=Left, 1=Top, 2=Right, 3=Bottom)" + } + } + ] + }, + { + "base": "GetEdgeFillOrigin", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Get Edge Fill Origin" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Get Edge Fill Origin is invoked" + }, + "details": { + "name": "Get Edge Fill Origin", + "tooltip": "Gets the edge fill origin of the image" + }, + "results": [ + { + "typeid": "{72039442-EB38-4D42-A1AD-CB68F7E0EEF6}", + "details": { + "name": "int" + } + } + ] + }, + { + "base": "SetFillClockwise", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Set Fill Clockwise" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Set Fill Clockwise is invoked" + }, + "details": { + "name": "Set Fill Clockwise", + "tooltip": "Sets whether the image is radially filled clockwise" + }, + "params": [ + { + "typeid": "{A0CA880C-AFE4-43CB-926C-59AC48496112}", + "details": { + "name": "Fill Clockwise", + "tooltip": "Indicates whether the image is radially filled clockwise" + } + } + ] + }, + { + "base": "SetSpritePathname", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Set Sprite Pathname" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Set Sprite Pathname is invoked" + }, + "details": { + "name": "Set Sprite Pathname", + "tooltip": "Sets the source location of the image to be displayed by the element" + }, + "params": [ + { + "typeid": "{03AAAB3F-5C47-5A66-9EBC-D5FA4DB353C9}", + "details": { + "name": "Pathname", + "tooltip": "The source location of the image to be displayed by the element" + } + } + ] + }, + { + "base": "SetFillCenter", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Set Fill Center" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Set Fill Center is invoked" + }, + "details": { + "name": "Set Fill Center", + "tooltip": "Sets whether the center of a sliced image is filled" + }, + "params": [ + { + "typeid": "{A0CA880C-AFE4-43CB-926C-59AC48496112}", + "details": { + "name": "Fill Center", + "tooltip": "Indicates whether the center of a sliced image is filled" + } + } + ] + }, + { + "base": "SetAlpha", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Set Alpha" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Set Alpha is invoked" + }, + "details": { + "name": "Set Alpha", + "tooltip": "Sets the image alpha (opacity)" + }, + "params": [ + { + "typeid": "{EA2C3E90-AFBE-44D4-A90D-FAAF79BAF93D}", + "details": { + "name": "Alpha", + "tooltip": "The image alpha (opacity)" + } + } + ] + }, + { + "base": "SetFillType", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Set Fill Type" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Set Fill Type is invoked" + }, + "details": { + "name": "Set Fill Type", + "tooltip": "Sets the fill type of the image. Fill type determines how the image component is filled" + }, + "params": [ + { + "typeid": "{72039442-EB38-4D42-A1AD-CB68F7E0EEF6}", + "details": { + "name": "Fill Type", + "tooltip": "The fill type (0=None, 1=Linear, 2=Radial, 3=Radial Corner, 4=Radial Edge)" + } + } + ] + }, + { + "base": "SetFillAmount", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Set Fill Amount" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Set Fill Amount is invoked" + }, + "details": { + "name": "Set Fill Amount", + "tooltip": "Sets the fill amount" + }, + "params": [ + { + "typeid": "{EA2C3E90-AFBE-44D4-A90D-FAAF79BAF93D}", + "details": { + "name": "Fill Amount", + "tooltip": "The fill amount [0-1]. One indicates that the image is completely filled. Zero means no part of the image is filled" + } + } + ] + }, + { + "base": "GetRadialFillStartAngle", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Get Radial Fill Start Angle" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Get Radial Fill Start Angle is invoked" + }, + "details": { + "name": "Get Radial Fill Start Angle", + "tooltip": "Gets the starting angle of the radial fill" + }, + "results": [ + { + "typeid": "{EA2C3E90-AFBE-44D4-A90D-FAAF79BAF93D}", + "details": { + "name": "float" + } + } + ] + }, + { + "base": "GetRenderTargetName", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Get Render Target Name" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Get Render Target Name is invoked" + }, + "details": { + "name": "Get Render Target Name", + "tooltip": "Gets the name of the render target associated with the sprite" + }, + "results": [ + { + "typeid": "{03AAAB3F-5C47-5A66-9EBC-D5FA4DB353C9}", + "details": { + "name": "AZStd::string" + } + } + ] + }, + { + "base": "SetIsRenderTargetSRGB", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Set Is Render Target sRGB" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Set Is Render Target sRGB is invoked" + }, + "details": { + "name": "Set Is Render Target sRGB", + "tooltip": "Sets whether the render target is in sRGB color space" + }, + "params": [ + { + "typeid": "{A0CA880C-AFE4-43CB-926C-59AC48496112}", + "details": { + "name": "Is sRGB", + "tooltip": "Whether the render target is in sRGB color space" + } + } + ] + }, + { + "base": "GetAlpha", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Get Alpha" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Get Alpha is invoked" + }, + "details": { + "name": "Get Alpha", + "tooltip": "Gets the image alpha (opacity)" + }, + "results": [ + { + "typeid": "{EA2C3E90-AFBE-44D4-A90D-FAAF79BAF93D}", + "details": { + "name": "float" + } + } + ] + }, + { + "base": "GetIsRenderTargetSRGB", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Get Is Render Target sRGB" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Get Is Render Target sRGB is invoked" + }, + "details": { + "name": "Get Is Render Target sRGB", + "tooltip": "Gets whether the render target is in sRGB color space" + }, + "results": [ + { + "typeid": "{A0CA880C-AFE4-43CB-926C-59AC48496112}", + "details": { + "name": "bool" + } + } + ] + }, + { + "base": "SetImageType", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Set Image Type" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Set Image Type is invoked" + }, + "details": { + "name": "Set Image Type", + "tooltip": "Sets the type of the image. Affects how the texture or sprite is mapped to the image rectangle" + }, + "params": [ + { + "typeid": "{72039442-EB38-4D42-A1AD-CB68F7E0EEF6}", + "details": { + "name": "Image Type", + "tooltip": "The image type (0=Stretched, 1=Sliced, 2=Fixed, 3=Tiled, 4=Stretched To Fit, 5=Stretched To Fill)" + } + } + ] + }, + { + "base": "GetSpritePathname", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Get Sprite Pathname" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Get Sprite Pathname is invoked" + }, + "details": { + "name": "Get Sprite Pathname", + "tooltip": "Gets the source location of the image to be displayed by the element" + }, + "results": [ + { + "typeid": "{03AAAB3F-5C47-5A66-9EBC-D5FA4DB353C9}", + "details": { + "name": "AZStd::string" + } + } + ] + }, + { + "base": "GetFillType", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Get Fill Type" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Get Fill Type is invoked" + }, + "details": { + "name": "Get Fill Type", + "tooltip": "Gets the fill type" + }, + "results": [ + { + "typeid": "{72039442-EB38-4D42-A1AD-CB68F7E0EEF6}", + "details": { + "name": "int" + } + } + ] + }, + { + "base": "SetCornerFillOrigin", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Set Corner Fill Origin" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Set Corner Fill Origin is invoked" + }, + "details": { + "name": "Set Corner Fill Origin", + "tooltip": "Sets the corner fill origin of the image" + }, + "params": [ + { + "typeid": "{72039442-EB38-4D42-A1AD-CB68F7E0EEF6}", + "details": { + "name": "Origin", + "tooltip": "The corner fill origin (0=Top Left, 1=Top Right, 2=Bottom Right, 3=Bottom Left)" + } + } + ] + }, + { + "base": "GetCornerFillOrigin", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Get Corner Fill Origin" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Get Corner Fill Origin is invoked" + }, + "details": { + "name": "Get Corner Fill Origin", + "tooltip": "Gets the corner fill origin of the image" + }, + "results": [ + { + "typeid": "{72039442-EB38-4D42-A1AD-CB68F7E0EEF6}", + "details": { + "name": "int" + } + } + ] + }, + { + "base": "GetImageType", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Get Image Type" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Get Image Type is invoked" + }, + "details": { + "name": "Get Image Type", + "tooltip": "Gets the type of the image" + }, + "results": [ + { + "typeid": "{72039442-EB38-4D42-A1AD-CB68F7E0EEF6}", + "details": { + "name": "int" + } + } + ] + }, + { + "base": "SetRadialFillStartAngle", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Set Radial Fill Start Angle" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Set Radial Fill Start Angle is invoked" + }, + "details": { + "name": "Set Radial Fill Start Angle", + "tooltip": "Sets the starting angle of the radial fill in degrees clockwise" + }, + "params": [ + { + "typeid": "{EA2C3E90-AFBE-44D4-A90D-FAAF79BAF93D}", + "details": { + "name": "Angle", + "tooltip": "The starting angle of the radial fill in degrees clockwise. A value of 0 indicates the top center of the image" + } + } + ] + }, + { + "base": "GetSpriteType", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Get Sprite Type" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Get Sprite Type is invoked" + }, + "details": { + "name": "Get Sprite Type", + "tooltip": "Gets the type of the sprite" + }, + "results": [ + { + "typeid": "{72039442-EB38-4D42-A1AD-CB68F7E0EEF6}", + "details": { + "name": "int" + } + } + ] + }, + { + "base": "GetFillAmount", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Get Fill Amount" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Get Fill Amount is invoked" + }, + "details": { + "name": "Get Fill Amount", + "tooltip": "Gets the fill amount" + }, + "results": [ + { + "typeid": "{EA2C3E90-AFBE-44D4-A90D-FAAF79BAF93D}", + "details": { + "name": "float" + } + } + ] + }, + { + "base": "GetFillCenter", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Get Fill Center" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Get Fill Center is invoked" + }, + "details": { + "name": "Get Fill Center", + "tooltip": "Returns whether the center of a sliced image is filled" + }, + "results": [ + { + "typeid": "{A0CA880C-AFE4-43CB-926C-59AC48496112}", + "details": { + "name": "bool" + } + } + ] + } + ] + } + ] +} \ No newline at end of file diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/EBus/Senders/UiImageSequenceBus.names b/Gems/ScriptCanvas/Assets/TranslationAssets/EBus/Senders/UiImageSequenceBus.names new file mode 100644 index 0000000000..ff048262e0 --- /dev/null +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/EBus/Senders/UiImageSequenceBus.names @@ -0,0 +1,62 @@ +{ + "entries": [ + { + "base": "UiImageSequenceBus", + "context": "EBusSender", + "variant": "", + "details": { + "name": "UI Image Sequence", + "category": "UI" + }, + "methods": [ + { + "base": "GetImageType", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Get Image Type" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Get Image Type is invoked" + }, + "details": { + "name": "Get Image Type", + "tooltip": "Gets the image type of the image sequence" + }, + "results": [ + { + "typeid": "{72039442-EB38-4D42-A1AD-CB68F7E0EEF6}", + "details": { + "name": "int" + } + } + ] + }, + { + "base": "SetImageType", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Set Image Type" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Set Image Type is invoked" + }, + "details": { + "name": "Set Image Type", + "tooltip": "Sets the image type of the image sequence" + }, + "params": [ + { + "typeid": "{72039442-EB38-4D42-A1AD-CB68F7E0EEF6}", + "details": { + "name": "Image Type", + "tooltip": "The image type (0 = Stretched, 1 = Fixed, 2 = Stretched To Fit, 3 = Stretched To Fill)" + } + } + ] + } + ] + } + ] +} \ No newline at end of file diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/EBus/Senders/UiIndexableImageBus.names b/Gems/ScriptCanvas/Assets/TranslationAssets/EBus/Senders/UiIndexableImageBus.names new file mode 100644 index 0000000000..7e8e1c11d8 --- /dev/null +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/EBus/Senders/UiIndexableImageBus.names @@ -0,0 +1,182 @@ +{ + "entries": [ + { + "base": "UiIndexableImageBus", + "context": "EBusSender", + "variant": "", + "details": { + "name": "UI Indexable Image", + "category": "UI" + }, + "methods": [ + { + "base": "GetImageIndexAlias", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Get Image Index Alias" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Get Image Index Alias is invoked" + }, + "details": { + "name": "Get Image Index Alias", + "tooltip": "Given an index, return its alias (if defined)" + }, + "params": [ + { + "typeid": "{43DA906B-7DEF-4CA8-9790-854106D3F983}", + "details": { + "name": "Image Index", + "tooltip": "The index to get alias for" + } + } + ], + "results": [ + { + "typeid": "{03AAAB3F-5C47-5A66-9EBC-D5FA4DB353C9}", + "details": { + "name": "AZStd::string", + "tooltip": "The index to get alias for" + } + } + ] + }, + { + "base": "GetImageIndexCount", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Get Image Index Count" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Get Image Index Count is invoked" + }, + "details": { + "name": "Get Image Index Count", + "tooltip": "Gets the number of indices for this image" + }, + "results": [ + { + "typeid": "{43DA906B-7DEF-4CA8-9790-854106D3F983}", + "details": { + "name": "unsigned int" + } + } + ] + }, + { + "base": "SetImageIndex", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Set Image Index" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Set Image Index is invoked" + }, + "details": { + "name": "Set Image Index", + "tooltip": "Sets the index of the image to display" + }, + "params": [ + { + "typeid": "{43DA906B-7DEF-4CA8-9790-854106D3F983}", + "details": { + "name": "Image Index", + "tooltip": "The index of the image to display" + } + } + ] + }, + { + "base": "SetImageIndexAlias", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Set Image Index Alias" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Set Image Index Alias is invoked" + }, + "details": { + "name": "Set Image Index Alias", + "tooltip": "Given an index, set an alias for it" + }, + "params": [ + { + "typeid": "{43DA906B-7DEF-4CA8-9790-854106D3F983}", + "details": { + "name": "Image Index", + "tooltip": "The index of the image to set alias for" + } + }, + { + "typeid": "{03AAAB3F-5C47-5A66-9EBC-D5FA4DB353C9}", + "details": { + "name": "Image Alias", + "tooltip": "The alias for the given index" + } + } + ] + }, + { + "base": "GetImageIndexFromAlias", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Get Image Index From Alias" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Get Image Index From Alias is invoked" + }, + "details": { + "name": "Get Image Index From Alias", + "tooltip": "Given an alias, return its index" + }, + "params": [ + { + "typeid": "{03AAAB3F-5C47-5A66-9EBC-D5FA4DB353C9}", + "details": { + "name": "Image Alias", + "tooltip": "The alias for image" + } + } + ], + "results": [ + { + "typeid": "{43DA906B-7DEF-4CA8-9790-854106D3F983}", + "details": { + "name": "unsigned int", + "tooltip": "The alias for image" + } + } + ] + }, + { + "base": "GetImageIndex", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Get Image Index" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Get Image Index is invoked" + }, + "details": { + "name": "Get Image Index", + "tooltip": "Gets the index of the image being displayed" + }, + "results": [ + { + "typeid": "{43DA906B-7DEF-4CA8-9790-854106D3F983}", + "details": { + "name": "unsigned int" + } + } + ] + } + ] + } + ] +} \ No newline at end of file diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/EBus/Senders/UiInteractableActionsBus.names b/Gems/ScriptCanvas/Assets/TranslationAssets/EBus/Senders/UiInteractableActionsBus.names new file mode 100644 index 0000000000..6d061bec5d --- /dev/null +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/EBus/Senders/UiInteractableActionsBus.names @@ -0,0 +1,203 @@ +{ + "entries": [ + { + "base": "UiInteractableActionsBus", + "context": "EBusSender", + "variant": "", + "details": { + "name": "UI Interactable Actions", + "category": "UI" + }, + "methods": [ + { + "base": "SetPressedActionName", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Set Pressed Action Name" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Set Pressed Action Name is invoked" + }, + "details": { + "name": "Set Pressed Action Name", + "tooltip": "Sets the name of the action triggered when the interactive element is pressed" + }, + "params": [ + { + "typeid": "{03AAAB3F-5C47-5A66-9EBC-D5FA4DB353C9}", + "details": { + "name": "Name", + "tooltip": "The name of the action triggered when the interactive element is pressed" + } + } + ] + }, + { + "base": "GetPressedActionName", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Get Pressed Action Name" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Get Pressed Action Name is invoked" + }, + "details": { + "name": "Get Pressed Action Name", + "tooltip": "Gets the name of the action triggered when the interactive element is pressed" + }, + "results": [ + { + "typeid": "{03AAAB3F-5C47-5A66-9EBC-D5FA4DB353C9}", + "details": { + "name": "AZStd::string" + } + } + ] + }, + { + "base": "GetHoverEndActionName", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Get Hover End Action Name" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Get Hover End Action Name is invoked" + }, + "details": { + "name": "Get Hover End Action Name", + "tooltip": "Gets the name of the action triggered when the interactive element is done being hovered over" + }, + "results": [ + { + "typeid": "{03AAAB3F-5C47-5A66-9EBC-D5FA4DB353C9}", + "details": { + "name": "AZStd::string" + } + } + ] + }, + { + "base": "SetHoverStartActionName", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Set Hover Start Action Name" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Set Hover Start Action Name is invoked" + }, + "details": { + "name": "Set Hover Start Action Name", + "tooltip": "Sets the name of the action triggered when the interactive element starts being hovered over" + }, + "params": [ + { + "typeid": "{03AAAB3F-5C47-5A66-9EBC-D5FA4DB353C9}", + "details": { + "name": "Name", + "tooltip": "The name of the action triggered when the interactive element starts being hovered over" + } + } + ] + }, + { + "base": "GetHoverStartActionName", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Get Hover Start Action Name" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Get Hover Start Action Name is invoked" + }, + "details": { + "name": "Get Hover Start Action Name", + "tooltip": "Gets the name of the action triggered when the interactive element starts being hovered over" + }, + "results": [ + { + "typeid": "{03AAAB3F-5C47-5A66-9EBC-D5FA4DB353C9}", + "details": { + "name": "AZStd::string" + } + } + ] + }, + { + "base": "SetHoverEndActionName", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Set Hover End Action Name" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Set Hover End Action Name is invoked" + }, + "details": { + "name": "Set Hover End Action Name", + "tooltip": "Sets the name of the action triggered when the interactive element is done being hovered over" + }, + "params": [ + { + "typeid": "{03AAAB3F-5C47-5A66-9EBC-D5FA4DB353C9}", + "details": { + "name": "Name", + "tooltip": "The name of the action triggered when the interactive element is done being hovered over" + } + } + ] + }, + { + "base": "GetReleasedActionName", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Get Released Action Name" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Get Released Action Name is invoked" + }, + "details": { + "name": "Get Released Action Name", + "tooltip": "Gets the name of the action triggered when the interactive element is released" + }, + "results": [ + { + "typeid": "{03AAAB3F-5C47-5A66-9EBC-D5FA4DB353C9}", + "details": { + "name": "AZStd::string" + } + } + ] + }, + { + "base": "SetReleasedActionName", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Set Released Action Name" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Set Released Action Name is invoked" + }, + "details": { + "name": "Set Released Action Name", + "tooltip": "Sets the name of the action triggered when the interactive element is released" + }, + "params": [ + { + "typeid": "{03AAAB3F-5C47-5A66-9EBC-D5FA4DB353C9}", + "details": { + "name": "Name", + "tooltip": "The name of the action triggered when the interactive element is released" + } + } + ] + } + ] + } + ] +} \ No newline at end of file diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/EBus/Senders/UiInteractableBus.names b/Gems/ScriptCanvas/Assets/TranslationAssets/EBus/Senders/UiInteractableBus.names new file mode 100644 index 0000000000..f45fd09b4f --- /dev/null +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/EBus/Senders/UiInteractableBus.names @@ -0,0 +1,156 @@ +{ + "entries": [ + { + "base": "UiInteractableBus", + "context": "EBusSender", + "variant": "", + "details": { + "name": "UI Interactable", + "category": "UI" + }, + "methods": [ + { + "base": "SetIsAutoActivationEnabled", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Set Is Auto Activation Enabled" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Set Is Auto Activation Enabled is invoked" + }, + "details": { + "name": "Set Is Auto Activation Enabled", + "tooltip": "Sets whether the interactive element should automatically become active when navigated to via gamepad/keyboard" + }, + "params": [ + { + "typeid": "{A0CA880C-AFE4-43CB-926C-59AC48496112}", + "details": { + "name": "Auto Activate", + "tooltip": "Indicates whether the interactive element should automatically become active when navigated to via gamepad/keyboard" + } + } + ] + }, + { + "base": "GetIsAutoActivationEnabled", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Is Auto Activation Enabled" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Is Auto Activation Enabled is invoked" + }, + "details": { + "name": "Is Auto Activation Enabled", + "tooltip": "Returns whether the interactive element automatically becomes active when navigated to via gamepad/keyboard" + }, + "results": [ + { + "typeid": "{A0CA880C-AFE4-43CB-926C-59AC48496112}", + "details": { + "name": "bool" + } + } + ] + }, + { + "base": "SetIsHandlingMultiTouchEvents", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Set Is Handling Multi-touch Events" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Set Is Handling Multi-touch Events is invoked" + }, + "details": { + "name": "Set Is Handling Multi-touch Events", + "tooltip": "Sets whether multi-touch event handling is enabled" + }, + "params": [ + { + "typeid": "{A0CA880C-AFE4-43CB-926C-59AC48496112}", + "details": { + "name": "Multi-touch", + "tooltip": "Indicates whether multi-touch event handling is enabled" + } + } + ] + }, + { + "base": "IsHandlingMultiTouchEvents", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Is Handling Multi-touch Events" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Is Handling Multi-touch Events is invoked" + }, + "details": { + "name": "Is Handling Multi-touch Events", + "tooltip": "Returns whether multi-touch event handling is enabled" + }, + "results": [ + { + "typeid": "{A0CA880C-AFE4-43CB-926C-59AC48496112}", + "details": { + "name": "bool" + } + } + ] + }, + { + "base": "IsHandlingEvents", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Is Handling Events" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Is Handling Events is invoked" + }, + "details": { + "name": "Is Handling Events", + "tooltip": "Returns whether event handling is enabled" + }, + "results": [ + { + "typeid": "{A0CA880C-AFE4-43CB-926C-59AC48496112}", + "details": { + "name": "bool" + } + } + ] + }, + { + "base": "SetIsHandlingEvents", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Set Is Handling Events" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Set Is Handling Events is invoked" + }, + "details": { + "name": "Set Is Handling Events", + "tooltip": "Sets whether event handling is enabled" + }, + "params": [ + { + "typeid": "{A0CA880C-AFE4-43CB-926C-59AC48496112}", + "details": { + "name": "Handling Events", + "tooltip": "Indicates whether event handling is enabled" + } + } + ] + } + ] + } + ] +} \ No newline at end of file diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/EBus/Senders/UiInteractableStatesBus.names b/Gems/ScriptCanvas/Assets/TranslationAssets/EBus/Senders/UiInteractableStatesBus.names new file mode 100644 index 0000000000..f6948637e9 --- /dev/null +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/EBus/Senders/UiInteractableStatesBus.names @@ -0,0 +1,534 @@ +{ + "entries": [ + { + "base": "UiInteractableStatesBus", + "context": "EBusSender", + "variant": "", + "details": { + "name": "UI Interactable States", + "category": "UI" + }, + "methods": [ + { + "base": "SetStateFont", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Set State Font" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Set State Font is invoked" + }, + "details": { + "name": "Set State Font", + "tooltip": "Sets the font to be used for the specified target when the interactive element is in the specified state" + }, + "params": [ + { + "typeid": "{72039442-EB38-4D42-A1AD-CB68F7E0EEF6}", + "details": { + "name": "Interactable State", + "tooltip": "The interactable state (0=Normal, 1=Hover, 2=Pressed, 3=Disabled)" + } + }, + { + "typeid": "{6383F1D3-BB27-4E6B-A49A-6409B2059EAA}", + "details": { + "name": "Target EntityID", + "tooltip": "The target element" + } + }, + { + "typeid": "{03AAAB3F-5C47-5A66-9EBC-D5FA4DB353C9}", + "details": { + "name": "Pathname", + "tooltip": "The pathname to the font" + } + }, + { + "typeid": "{43DA906B-7DEF-4CA8-9790-854106D3F983}", + "details": { + "name": "Font Effect Index", + "tooltip": "The index of the font effect" + } + } + ] + }, + { + "base": "SetStateSpritePathname", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Set State Sprite Pathname" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Set State Sprite Pathname is invoked" + }, + "details": { + "name": "Set State Sprite Pathname", + "tooltip": "Sets the sprite path to be used for the specified target when the interactive element is in the specified state" + }, + "params": [ + { + "typeid": "{72039442-EB38-4D42-A1AD-CB68F7E0EEF6}", + "details": { + "name": "Interactable State", + "tooltip": "The interactable state (0=Normal, 1=Hover, 2=Pressed, 3=Disabled)" + } + }, + { + "typeid": "{6383F1D3-BB27-4E6B-A49A-6409B2059EAA}", + "details": { + "name": "Target EntityID", + "tooltip": "The target element" + } + }, + { + "typeid": "{03AAAB3F-5C47-5A66-9EBC-D5FA4DB353C9}", + "details": { + "name": "Pathname", + "tooltip": "The pathname to the sprite" + } + } + ] + }, + { + "base": "GetStateFontPathname", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Get State Font Pathname" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Get State Font Pathname is invoked" + }, + "details": { + "name": "Get State Font Pathname", + "tooltip": "Gets the font pathname to be used for the specified target when the interactive element is in the specified state" + }, + "params": [ + { + "typeid": "{72039442-EB38-4D42-A1AD-CB68F7E0EEF6}", + "details": { + "name": "Interactable State", + "tooltip": "The interactable state (0=Normal, 1=Hover, 2=Pressed, 3=Disabled)" + } + }, + { + "typeid": "{6383F1D3-BB27-4E6B-A49A-6409B2059EAA}", + "details": { + "name": "Target EntityID", + "tooltip": "The target element" + } + } + ], + "results": [ + { + "typeid": "{03AAAB3F-5C47-5A66-9EBC-D5FA4DB353C9}", + "details": { + "name": "AZStd::string", + "tooltip": "The interactable state (0=Normal, 1=Hover, 2=Pressed, 3=Disabled)" + } + } + ] + }, + { + "base": "HasStateFont", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Has State Font" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Has State Font is invoked" + }, + "details": { + "name": "Has State Font", + "tooltip": "Returns whether the interactive element has a font action for the specified state and target combination" + }, + "params": [ + { + "typeid": "{72039442-EB38-4D42-A1AD-CB68F7E0EEF6}", + "details": { + "name": "Interactable State", + "tooltip": "The interactable state (0=Normal, 1=Hover, 2=Pressed, 3=Disabled)" + } + }, + { + "typeid": "{6383F1D3-BB27-4E6B-A49A-6409B2059EAA}", + "details": { + "name": "Target EntityID", + "tooltip": "The target element" + } + } + ], + "results": [ + { + "typeid": "{A0CA880C-AFE4-43CB-926C-59AC48496112}", + "details": { + "name": "bool", + "tooltip": "The interactable state (0=Normal, 1=Hover, 2=Pressed, 3=Disabled)" + } + } + ] + }, + { + "base": "SetStateAlpha", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Set State Alpha" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Set State Alpha is invoked" + }, + "details": { + "name": "Set State Alpha", + "tooltip": "Sets the alpha to be used for the specified target when the interactive element is in the specified state" + }, + "params": [ + { + "typeid": "{72039442-EB38-4D42-A1AD-CB68F7E0EEF6}", + "details": { + "name": "Interactable State", + "tooltip": "The interactable state (0=Normal, 1=Hover, 2=Pressed, 3=Disabled)" + } + }, + { + "typeid": "{6383F1D3-BB27-4E6B-A49A-6409B2059EAA}", + "details": { + "name": "Target EntityID", + "tooltip": "The target element" + } + }, + { + "typeid": "{EA2C3E90-AFBE-44D4-A90D-FAAF79BAF93D}", + "details": { + "name": "Alpha", + "tooltip": "The alpha to be used for the specified target when the interactive element is in the specified state [0-1]" + } + } + ] + }, + { + "base": "GetStateAlpha", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Get State Alpha" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Get State Alpha is invoked" + }, + "details": { + "name": "Get State Alpha", + "tooltip": "Gets the alpha to be used for the specified target when the interactive element is in the specified state" + }, + "params": [ + { + "typeid": "{72039442-EB38-4D42-A1AD-CB68F7E0EEF6}", + "details": { + "name": "Interactable State", + "tooltip": "The interactable state (0=Normal, 1=Hover, 2=Pressed, 3=Disabled)" + } + }, + { + "typeid": "{6383F1D3-BB27-4E6B-A49A-6409B2059EAA}", + "details": { + "name": "Target EntityID", + "tooltip": "The target element" + } + } + ], + "results": [ + { + "typeid": "{EA2C3E90-AFBE-44D4-A90D-FAAF79BAF93D}", + "details": { + "name": "float", + "tooltip": "The interactable state (0=Normal, 1=Hover, 2=Pressed, 3=Disabled)" + } + } + ] + }, + { + "base": "GetStateFontEffectIndex", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Get State Font Effect Index" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Get State Font Effect Index is invoked" + }, + "details": { + "name": "Get State Font Effect Index", + "tooltip": "Gets the font effect to be used for the specified target when the interactive element is in the specified state" + }, + "params": [ + { + "typeid": "{72039442-EB38-4D42-A1AD-CB68F7E0EEF6}", + "details": { + "name": "Interactable State", + "tooltip": "The interactable state (0=Normal, 1=Hover, 2=Pressed, 3=Disabled)" + } + }, + { + "typeid": "{6383F1D3-BB27-4E6B-A49A-6409B2059EAA}", + "details": { + "name": "Target EntityID", + "tooltip": "The target element" + } + } + ], + "results": [ + { + "typeid": "{43DA906B-7DEF-4CA8-9790-854106D3F983}", + "details": { + "name": "unsigned int", + "tooltip": "The interactable state (0=Normal, 1=Hover, 2=Pressed, 3=Disabled)" + } + } + ] + }, + { + "base": "HasStateColor", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Has State Color" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Has State Color is invoked" + }, + "details": { + "name": "Has State Color", + "tooltip": "Returns whether the interactive element has a color action for the specified state and target combination" + }, + "params": [ + { + "typeid": "{72039442-EB38-4D42-A1AD-CB68F7E0EEF6}", + "details": { + "name": "Interactable State", + "tooltip": "The interactable state (0=Normal, 1=Hover, 2=Pressed, 3=Disabled)" + } + }, + { + "typeid": "{6383F1D3-BB27-4E6B-A49A-6409B2059EAA}", + "details": { + "name": "Target EntityID", + "tooltip": "The target element" + } + } + ], + "results": [ + { + "typeid": "{A0CA880C-AFE4-43CB-926C-59AC48496112}", + "details": { + "name": "bool", + "tooltip": "The interactable state (0=Normal, 1=Hover, 2=Pressed, 3=Disabled)" + } + } + ] + }, + { + "base": "GetStateSpritePathname", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Get State Sprite Pathname" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Get State Sprite Pathname is invoked" + }, + "details": { + "name": "Get State Sprite Pathname", + "tooltip": "Gets the sprite pathname to be used for the specified target when the interactive element is in the specified state" + }, + "params": [ + { + "typeid": "{72039442-EB38-4D42-A1AD-CB68F7E0EEF6}", + "details": { + "name": "Interactable State", + "tooltip": "The interactable state (0=Normal, 1=Hover, 2=Pressed, 3=Disabled)" + } + }, + { + "typeid": "{6383F1D3-BB27-4E6B-A49A-6409B2059EAA}", + "details": { + "name": "Target EntityID", + "tooltip": "The target element" + } + } + ], + "results": [ + { + "typeid": "{03AAAB3F-5C47-5A66-9EBC-D5FA4DB353C9}", + "details": { + "name": "AZStd::string", + "tooltip": "The interactable state (0=Normal, 1=Hover, 2=Pressed, 3=Disabled)" + } + } + ] + }, + { + "base": "HasStateSprite", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Has State Sprite" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Has State Sprite is invoked" + }, + "details": { + "name": "Has State Sprite", + "tooltip": "Returns whether the interactive element has a sprite action for the specified state and target combination" + }, + "params": [ + { + "typeid": "{72039442-EB38-4D42-A1AD-CB68F7E0EEF6}", + "details": { + "name": "Interactable State", + "tooltip": "The interactable state (0=Normal, 1=Hover, 2=Pressed, 3=Disabled)" + } + }, + { + "typeid": "{6383F1D3-BB27-4E6B-A49A-6409B2059EAA}", + "details": { + "name": "Target EntityID", + "tooltip": "The target element" + } + } + ], + "results": [ + { + "typeid": "{A0CA880C-AFE4-43CB-926C-59AC48496112}", + "details": { + "name": "bool", + "tooltip": "The interactable state (0=Normal, 1=Hover, 2=Pressed, 3=Disabled)" + } + } + ] + }, + { + "base": "SetStateColor", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Set State Color" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Set State Color is invoked" + }, + "details": { + "name": "Set State Color", + "tooltip": "Sets the color to be used for the specified target when the interactive element is in the specified state" + }, + "params": [ + { + "typeid": "{72039442-EB38-4D42-A1AD-CB68F7E0EEF6}", + "details": { + "name": "Interactable State", + "tooltip": "The interactable state (0=Normal, 1=Hover, 2=Pressed, 3=Disabled)" + } + }, + { + "typeid": "{6383F1D3-BB27-4E6B-A49A-6409B2059EAA}", + "details": { + "name": "Target EntityID", + "tooltip": "The target element" + } + }, + { + "typeid": "{7894072A-9050-4F0F-901B-34B1A0D29417}", + "details": { + "name": "Color", + "tooltip": "The color to be used for the specified target when the interactive element is in the specified state" + } + } + ] + }, + { + "base": "HasStateAlpha", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Has State Alpha" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Has State Alpha is invoked" + }, + "details": { + "name": "Has State Alpha", + "tooltip": "Returns whether the interactive element has an alpha action for the specified state and target combination" + }, + "params": [ + { + "typeid": "{72039442-EB38-4D42-A1AD-CB68F7E0EEF6}", + "details": { + "name": "Interactable State", + "tooltip": "The interactable state (0=Normal, 1=Hover, 2=Pressed, 3=Disabled)" + } + }, + { + "typeid": "{6383F1D3-BB27-4E6B-A49A-6409B2059EAA}", + "details": { + "name": "Target EntityID", + "tooltip": "The target element" + } + } + ], + "results": [ + { + "typeid": "{A0CA880C-AFE4-43CB-926C-59AC48496112}", + "details": { + "name": "bool", + "tooltip": "The interactable state (0=Normal, 1=Hover, 2=Pressed, 3=Disabled)" + } + } + ] + }, + { + "base": "GetStateColor", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Get State Color" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Get State Color is invoked" + }, + "details": { + "name": "Get State Color", + "tooltip": "Gets the color to be used for the specified target when the interactive element is in the specified state" + }, + "params": [ + { + "typeid": "{72039442-EB38-4D42-A1AD-CB68F7E0EEF6}", + "details": { + "name": "Interactable State", + "tooltip": "The interactable state (0=Normal, 1=Hover, 2=Pressed, 3=Disabled)" + } + }, + { + "typeid": "{6383F1D3-BB27-4E6B-A49A-6409B2059EAA}", + "details": { + "name": "Target EntityID", + "tooltip": "The target element" + } + } + ], + "results": [ + { + "typeid": "{7894072A-9050-4F0F-901B-34B1A0D29417}", + "details": { + "name": "Color", + "tooltip": "The interactable state (0=Normal, 1=Hover, 2=Pressed, 3=Disabled)" + } + } + ] + } + ] + } + ] +} \ No newline at end of file diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/EBus/Senders/UiLayoutBus.names b/Gems/ScriptCanvas/Assets/TranslationAssets/EBus/Senders/UiLayoutBus.names new file mode 100644 index 0000000000..fa1b209aa6 --- /dev/null +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/EBus/Senders/UiLayoutBus.names @@ -0,0 +1,156 @@ +{ + "entries": [ + { + "base": "UiLayoutBus", + "context": "EBusSender", + "variant": "", + "details": { + "name": "UI Layout", + "category": "UI" + }, + "methods": [ + { + "base": "SetIgnoreDefaultLayoutCells", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Set Ignore Default Layout Cells" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Set Ignore Default Layout Cells is invoked" + }, + "details": { + "name": "Set Ignore Default Layout Cells", + "tooltip": "Sets whether default layout cell values calculated by other components on the child should be ignored" + }, + "params": [ + { + "typeid": "{A0CA880C-AFE4-43CB-926C-59AC48496112}", + "details": { + "name": "Ignore", + "tooltip": "Indicates whether default layout cell values calculated by other components on the child should be ignored" + } + } + ] + }, + { + "base": "SetVerticalChildAlignment", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Set Vertical Child Alignment" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Set Vertical Child Alignment is invoked" + }, + "details": { + "name": "Set Vertical Child Alignment", + "tooltip": "Sets the vertical child alignment" + }, + "params": [ + { + "typeid": "{72039442-EB38-4D42-A1AD-CB68F7E0EEF6}", + "details": { + "name": "Vertical Alignment", + "tooltip": "The vertical child alignment (0=Top, 1=Center, 2=Bottom)" + } + } + ] + }, + { + "base": "SetHorizontalChildAlignment", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Set Horizontal Child Alignment" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Set Horizontal Child Alignment is invoked" + }, + "details": { + "name": "Set Horizontal Child Alignment", + "tooltip": "Sets the horizontal child alignment" + }, + "params": [ + { + "typeid": "{72039442-EB38-4D42-A1AD-CB68F7E0EEF6}", + "details": { + "name": "Horizontal Alignment", + "tooltip": "The horizontal child alignment (0=Left, 1=Center, 2=Right)" + } + } + ] + }, + { + "base": "GetHorizontalChildAlignment", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Get Horizontal Child Alignment" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Get Horizontal Child Alignment is invoked" + }, + "details": { + "name": "Get Horizontal Child Alignment", + "tooltip": "Gets the horizontal child alignment" + }, + "results": [ + { + "typeid": "{72039442-EB38-4D42-A1AD-CB68F7E0EEF6}", + "details": { + "name": "int" + } + } + ] + }, + { + "base": "GetVerticalChildAlignment", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Get Vertical Child Alignment" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Get Vertical Child Alignment is invoked" + }, + "details": { + "name": "Get Vertical Child Alignment", + "tooltip": "Gets the vertical child alignment" + }, + "results": [ + { + "typeid": "{72039442-EB38-4D42-A1AD-CB68F7E0EEF6}", + "details": { + "name": "int" + } + } + ] + }, + { + "base": "GetIgnoreDefaultLayoutCells", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Get Ignore Default Layout Cells" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Get Ignore Default Layout Cells is invoked" + }, + "details": { + "name": "Get Ignore Default Layout Cells", + "tooltip": "Returns whether default layout cell values calculated by other components on the child are ignored" + }, + "results": [ + { + "typeid": "{A0CA880C-AFE4-43CB-926C-59AC48496112}", + "details": { + "name": "bool" + } + } + ] + } + ] + } + ] +} \ No newline at end of file diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/EBus/Senders/UiLayoutCellBus.names b/Gems/ScriptCanvas/Assets/TranslationAssets/EBus/Senders/UiLayoutCellBus.names new file mode 100644 index 0000000000..1a8001adaf --- /dev/null +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/EBus/Senders/UiLayoutCellBus.names @@ -0,0 +1,385 @@ +{ + "entries": [ + { + "base": "UiLayoutCellBus", + "context": "EBusSender", + "variant": "", + "details": { + "name": "UI Layout Cell", + "category": "UI" + }, + "methods": [ + { + "base": "SetExtraHeightRatio", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Set Extra Height Ratio" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Set Extra Height Ratio is invoked" + }, + "details": { + "name": "Set Extra Height Ratio", + "tooltip": "Sets the overridden extra height ratio for the element" + }, + "params": [ + { + "typeid": "{EA2C3E90-AFBE-44D4-A90D-FAAF79BAF93D}", + "details": { + "name": "Extra Height Ratio", + "tooltip": "The overridden extra height ratio for the element. A value of –1 means don’t override" + } + } + ] + }, + { + "base": "GetExtraWidthRatio", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Get Extra Width Ratio" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Get Extra Width Ratio is invoked" + }, + "details": { + "name": "Get Extra Width Ratio", + "tooltip": "Gets the overridden extra width ratio for the element" + }, + "results": [ + { + "typeid": "{EA2C3E90-AFBE-44D4-A90D-FAAF79BAF93D}", + "details": { + "name": "float" + } + } + ] + }, + { + "base": "SetExtraWidthRatio", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Set Extra Width Ratio" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Set Extra Width Ratio is invoked" + }, + "details": { + "name": "Set Extra Width Ratio", + "tooltip": "Sets the overridden extra width ratio for the element" + }, + "params": [ + { + "typeid": "{EA2C3E90-AFBE-44D4-A90D-FAAF79BAF93D}", + "details": { + "name": "Extra Width Ratio", + "tooltip": "The overridden extra width ratio for the element. A value of –1 means don’t override" + } + } + ] + }, + { + "base": "SetMaxWidth", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke SetMaxWidth" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after SetMaxWidth is invoked" + }, + "details": { + "name": "SetMaxWidth" + }, + "params": [ + { + "typeid": "{EA2C3E90-AFBE-44D4-A90D-FAAF79BAF93D}", + "details": { + "name": "float" + } + } + ] + }, + { + "base": "SetMaxHeight", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke SetMaxHeight" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after SetMaxHeight is invoked" + }, + "details": { + "name": "SetMaxHeight" + }, + "params": [ + { + "typeid": "{EA2C3E90-AFBE-44D4-A90D-FAAF79BAF93D}", + "details": { + "name": "float" + } + } + ] + }, + { + "base": "GetMaxWidth", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke GetMaxWidth" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after GetMaxWidth is invoked" + }, + "details": { + "name": "GetMaxWidth" + }, + "results": [ + { + "typeid": "{EA2C3E90-AFBE-44D4-A90D-FAAF79BAF93D}", + "details": { + "name": "float" + } + } + ] + }, + { + "base": "GetMaxHeight", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke GetMaxHeight" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after GetMaxHeight is invoked" + }, + "details": { + "name": "GetMaxHeight" + }, + "results": [ + { + "typeid": "{EA2C3E90-AFBE-44D4-A90D-FAAF79BAF93D}", + "details": { + "name": "float" + } + } + ] + }, + { + "base": "GetExtraHeightRatio", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Get Extra Height Ratio" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Get Extra Height Ratio is invoked" + }, + "details": { + "name": "Get Extra Height Ratio", + "tooltip": "Gets the overridden extra height ratio for the element" + }, + "results": [ + { + "typeid": "{EA2C3E90-AFBE-44D4-A90D-FAAF79BAF93D}", + "details": { + "name": "float" + } + } + ] + }, + { + "base": "GetTargetHeight", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Get Target Height" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Get Target Height is invoked" + }, + "details": { + "name": "Get Target Height", + "tooltip": "Gets the overridden target height for the element" + }, + "results": [ + { + "typeid": "{EA2C3E90-AFBE-44D4-A90D-FAAF79BAF93D}", + "details": { + "name": "float" + } + } + ] + }, + { + "base": "SetMinWidth", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Set Min Width" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Set Min Width is invoked" + }, + "details": { + "name": "Set Min Width", + "tooltip": "Sets the overridden minimum width for the element" + }, + "params": [ + { + "typeid": "{EA2C3E90-AFBE-44D4-A90D-FAAF79BAF93D}", + "details": { + "name": "Min Width", + "tooltip": "The overridden minimum width for the element. A value of –1 means don’t override" + } + } + ] + }, + { + "base": "SetMinHeight", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Set Min Height" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Set Min Height is invoked" + }, + "details": { + "name": "Set Min Height", + "tooltip": "Sets the overridden minimum height for the element" + }, + "params": [ + { + "typeid": "{EA2C3E90-AFBE-44D4-A90D-FAAF79BAF93D}", + "details": { + "name": "Min Height", + "tooltip": "The overridden minimum height for the element. A value of –1 means don’t override" + } + } + ] + }, + { + "base": "GetMinWidth", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Get Min Width" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Get Min Width is invoked" + }, + "details": { + "name": "Get Min Width", + "tooltip": "Gets the overridden minimum width for the element" + }, + "results": [ + { + "typeid": "{EA2C3E90-AFBE-44D4-A90D-FAAF79BAF93D}", + "details": { + "name": "float" + } + } + ] + }, + { + "base": "GetMinHeight", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Get Min Height" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Get Min Height is invoked" + }, + "details": { + "name": "Get Min Height", + "tooltip": "Gets the overridden minimum height for the element" + }, + "results": [ + { + "typeid": "{EA2C3E90-AFBE-44D4-A90D-FAAF79BAF93D}", + "details": { + "name": "float" + } + } + ] + }, + { + "base": "GetTargetWidth", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Get Target Width" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Get Target Width is invoked" + }, + "details": { + "name": "Get Target Width", + "tooltip": "Gets the overridden target width for the element" + }, + "results": [ + { + "typeid": "{EA2C3E90-AFBE-44D4-A90D-FAAF79BAF93D}", + "details": { + "name": "float" + } + } + ] + }, + { + "base": "SetTargetWidth", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Set Target Width" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Set Target Width is invoked" + }, + "details": { + "name": "Set Target Width", + "tooltip": "Sets the overridden target width for the element" + }, + "params": [ + { + "typeid": "{EA2C3E90-AFBE-44D4-A90D-FAAF79BAF93D}", + "details": { + "name": "Target Width", + "tooltip": "The overridden target width for the element. A value of –1 means don’t override" + } + } + ] + }, + { + "base": "SetTargetHeight", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Set Target Height" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Set Target Height is invoked" + }, + "details": { + "name": "Set Target Height", + "tooltip": "Sets the overridden target height for the element" + }, + "params": [ + { + "typeid": "{EA2C3E90-AFBE-44D4-A90D-FAAF79BAF93D}", + "details": { + "name": "Target Height", + "tooltip": "The overridden target height for the element. A value of –1 means don’t override" + } + } + ] + } + ] + } + ] +} \ No newline at end of file diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/EBus/Senders/UiLayoutColumnBus.names b/Gems/ScriptCanvas/Assets/TranslationAssets/EBus/Senders/UiLayoutColumnBus.names new file mode 100644 index 0000000000..d0f4e7d3e4 --- /dev/null +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/EBus/Senders/UiLayoutColumnBus.names @@ -0,0 +1,156 @@ +{ + "entries": [ + { + "base": "UiLayoutColumnBus", + "context": "EBusSender", + "variant": "", + "details": { + "name": "UI Layout Column", + "category": "UI" + }, + "methods": [ + { + "base": "SetSpacing", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Set Spacing" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Set Spacing is invoked" + }, + "details": { + "name": "Set Spacing", + "tooltip": "Sets the spacing between child elements" + }, + "params": [ + { + "typeid": "{EA2C3E90-AFBE-44D4-A90D-FAAF79BAF93D}", + "details": { + "name": "Spacing", + "tooltip": "The spacing between child elements in pixels" + } + } + ] + }, + { + "base": "GetOrder", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Get Order" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Get Order is invoked" + }, + "details": { + "name": "Get Order", + "tooltip": "Returns the vertical order for the layout" + }, + "results": [ + { + "typeid": "{72039442-EB38-4D42-A1AD-CB68F7E0EEF6}", + "details": { + "name": "int" + } + } + ] + }, + { + "base": "SetOrder", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Set Order" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Set Order is invoked" + }, + "details": { + "name": "Set Order", + "tooltip": "Sets the vertical order for the layout" + }, + "params": [ + { + "typeid": "{72039442-EB38-4D42-A1AD-CB68F7E0EEF6}", + "details": { + "name": "Order", + "tooltip": "The vertical order for the layout (0=Top To Bottom, 1=Bottom To Top)" + } + } + ] + }, + { + "base": "GetSpacing", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Get Spacing" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Get Spacing is invoked" + }, + "details": { + "name": "Get Spacing", + "tooltip": "Gets the spacing between child elements" + }, + "results": [ + { + "typeid": "{EA2C3E90-AFBE-44D4-A90D-FAAF79BAF93D}", + "details": { + "name": "float" + } + } + ] + }, + { + "base": "GetPadding", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Get Padding" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Get Padding is invoked" + }, + "details": { + "name": "Get Padding", + "tooltip": "Gets the padding inside the edges of the element" + }, + "results": [ + { + "typeid": "{DE5C18B0-4214-4A37-B590-8D45CC450A96}", + "details": { + "name": "Padding" + } + } + ] + }, + { + "base": "SetPadding", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Set Padding" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Set Padding is invoked" + }, + "details": { + "name": "Set Padding", + "tooltip": "Sets the padding inside the edges of the element" + }, + "params": [ + { + "typeid": "{DE5C18B0-4214-4A37-B590-8D45CC450A96}", + "details": { + "name": "Padding", + "tooltip": "The padding inside the edges of the element in pixels" + } + } + ] + } + ] + } + ] +} \ No newline at end of file diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/EBus/Senders/UiLayoutFitterBus.names b/Gems/ScriptCanvas/Assets/TranslationAssets/EBus/Senders/UiLayoutFitterBus.names new file mode 100644 index 0000000000..672db1bd4e --- /dev/null +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/EBus/Senders/UiLayoutFitterBus.names @@ -0,0 +1,109 @@ +{ + "entries": [ + { + "base": "UiLayoutFitterBus", + "context": "EBusSender", + "variant": "", + "details": { + "name": "UI Layout Fitter", + "category": "UI" + }, + "methods": [ + { + "base": "GetHorizontalFit", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Get Horizontal Fit" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Get Horizontal Fit is invoked" + }, + "details": { + "name": "Get Horizontal Fit", + "tooltip": "Returns whether to resize the element horizontally" + }, + "results": [ + { + "typeid": "{A0CA880C-AFE4-43CB-926C-59AC48496112}", + "details": { + "name": "bool" + } + } + ] + }, + { + "base": "SetHorizontalFit", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Set Horizontal Fit" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Set Horizontal Fit is invoked" + }, + "details": { + "name": "Set Horizontal Fit", + "tooltip": "Sets whether to resize the element horizontally" + }, + "params": [ + { + "typeid": "{A0CA880C-AFE4-43CB-926C-59AC48496112}", + "details": { + "name": "Resize Horizontally", + "tooltip": "Indicates whether to resize the element horizontally" + } + } + ] + }, + { + "base": "GetVerticalFit", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Get Vertical Fit" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Get Vertical Fit is invoked" + }, + "details": { + "name": "Get Vertical Fit", + "tooltip": "Returns whether to resize the element vertically" + }, + "results": [ + { + "typeid": "{A0CA880C-AFE4-43CB-926C-59AC48496112}", + "details": { + "name": "bool" + } + } + ] + }, + { + "base": "SetVerticalFit", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Set Vertical Fit" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Set Vertical Fit is invoked" + }, + "details": { + "name": "Set Vertical Fit", + "tooltip": "Sets whether to resize the element vertically" + }, + "params": [ + { + "typeid": "{A0CA880C-AFE4-43CB-926C-59AC48496112}", + "details": { + "name": "Resize Vertically", + "tooltip": "Indicates whether to resize the element vertically" + } + } + ] + } + ] + } + ] +} \ No newline at end of file diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/EBus/Senders/UiLayoutGridBus.names b/Gems/ScriptCanvas/Assets/TranslationAssets/EBus/Senders/UiLayoutGridBus.names new file mode 100644 index 0000000000..9ee462316e --- /dev/null +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/EBus/Senders/UiLayoutGridBus.names @@ -0,0 +1,297 @@ +{ + "entries": [ + { + "base": "UiLayoutGridBus", + "context": "EBusSender", + "variant": "", + "details": { + "name": "UI Layout Grid", + "category": "UI" + }, + "methods": [ + { + "base": "GetStartingDirection", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Get Starting Direction" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Get Starting Direction is invoked" + }, + "details": { + "name": "Get Starting Direction", + "tooltip": "Gets the starting direction for the layout" + }, + "results": [ + { + "typeid": "{72039442-EB38-4D42-A1AD-CB68F7E0EEF6}", + "details": { + "name": "int" + } + } + ] + }, + { + "base": "SetHorizontalOrder", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Set Horizontal Order" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Set Horizontal Order is invoked" + }, + "details": { + "name": "Set Horizontal Order", + "tooltip": "Sets the horizontal order for the layout" + }, + "params": [ + { + "typeid": "{72039442-EB38-4D42-A1AD-CB68F7E0EEF6}", + "details": { + "name": "Horizontal Order", + "tooltip": "The horizontal order for the layout (0=Left to Right, 1=Right to Left)" + } + } + ] + }, + { + "base": "SetCellSize", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Set Cell Size" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Set Cell Size is invoked" + }, + "details": { + "name": "Set Cell Size", + "tooltip": "Sets the size of a child element" + }, + "params": [ + { + "typeid": "{3D80F623-C85C-4741-90D0-E4E66164E6BF}", + "details": { + "name": "Cell Size", + "tooltip": "The size of a child element in pixels" + } + } + ] + }, + { + "base": "SetSpacing", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Set Spacing" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Set Spacing is invoked" + }, + "details": { + "name": "Set Spacing", + "tooltip": "Sets the spacing between child elements" + }, + "params": [ + { + "typeid": "{3D80F623-C85C-4741-90D0-E4E66164E6BF}", + "details": { + "name": "Spacing", + "tooltip": "The spacing between child elements in pixels" + } + } + ] + }, + { + "base": "GetSpacing", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Get Spacing" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Get Spacing is invoked" + }, + "details": { + "name": "Get Spacing", + "tooltip": "Gets the spacing between child elements" + }, + "results": [ + { + "typeid": "{3D80F623-C85C-4741-90D0-E4E66164E6BF}", + "details": { + "name": "Vector2" + } + } + ] + }, + { + "base": "GetCellSize", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Get Cell Size" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Get Cell Size is invoked" + }, + "details": { + "name": "Get Cell Size", + "tooltip": "Gets the size of a child element" + }, + "results": [ + { + "typeid": "{3D80F623-C85C-4741-90D0-E4E66164E6BF}", + "details": { + "name": "Vector2" + } + } + ] + }, + { + "base": "GetPadding", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Get Padding" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Get Padding is invoked" + }, + "details": { + "name": "Get Padding", + "tooltip": "Gets the padding inside the edges of the element" + }, + "results": [ + { + "typeid": "{DE5C18B0-4214-4A37-B590-8D45CC450A96}", + "details": { + "name": "Padding" + } + } + ] + }, + { + "base": "SetPadding", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Set Padding" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Set Padding is invoked" + }, + "details": { + "name": "Set Padding", + "tooltip": "Sets the padding inside the edges of the element" + }, + "params": [ + { + "typeid": "{DE5C18B0-4214-4A37-B590-8D45CC450A96}", + "details": { + "name": "Padding", + "tooltip": "The padding inside the edges of the element in pixels" + } + } + ] + }, + { + "base": "GetHorizontalOrder", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Get Horizontal Order" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Get Horizontal Order is invoked" + }, + "details": { + "name": "Get Horizontal Order", + "tooltip": "Gets the horizontal order for the layout" + }, + "results": [ + { + "typeid": "{72039442-EB38-4D42-A1AD-CB68F7E0EEF6}", + "details": { + "name": "int" + } + } + ] + }, + { + "base": "GetVerticalOrder", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Get Vertical Order" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Get Vertical Order is invoked" + }, + "details": { + "name": "Get Vertical Order", + "tooltip": "Gets the vertical order for the layout" + }, + "results": [ + { + "typeid": "{72039442-EB38-4D42-A1AD-CB68F7E0EEF6}", + "details": { + "name": "int" + } + } + ] + }, + { + "base": "SetVerticalOrder", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Set Vertical Order" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Set Vertical Order is invoked" + }, + "details": { + "name": "Set Vertical Order", + "tooltip": "Sets the vertical order for the layout" + }, + "params": [ + { + "typeid": "{72039442-EB38-4D42-A1AD-CB68F7E0EEF6}", + "details": { + "name": "Vertical Order", + "tooltip": "The vertical order for the layout (0=Top to Bottom, 1=Bottom to Top)" + } + } + ] + }, + { + "base": "SetStartingDirection", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Set Starting Direction" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Set Starting Direction is invoked" + }, + "details": { + "name": "Set Starting Direction", + "tooltip": "Sets the starting direction for the layout" + }, + "params": [ + { + "typeid": "{72039442-EB38-4D42-A1AD-CB68F7E0EEF6}", + "details": { + "name": "Starting Direction", + "tooltip": "The starting direction for the layout (0=Horizontal Order, 1=Vertical Order)" + } + } + ] + } + ] + } + ] +} \ No newline at end of file diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/EBus/Senders/UiLayoutRowBus.names b/Gems/ScriptCanvas/Assets/TranslationAssets/EBus/Senders/UiLayoutRowBus.names new file mode 100644 index 0000000000..ba3e4fc81b --- /dev/null +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/EBus/Senders/UiLayoutRowBus.names @@ -0,0 +1,156 @@ +{ + "entries": [ + { + "base": "UiLayoutRowBus", + "context": "EBusSender", + "variant": "", + "details": { + "name": "UI Layout Row", + "category": "UI" + }, + "methods": [ + { + "base": "SetSpacing", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Set Spacing" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Set Spacing is invoked" + }, + "details": { + "name": "Set Spacing", + "tooltip": "Sets the spacing between child elements" + }, + "params": [ + { + "typeid": "{EA2C3E90-AFBE-44D4-A90D-FAAF79BAF93D}", + "details": { + "name": "Spacing", + "tooltip": "The spacing between child elements in pixels" + } + } + ] + }, + { + "base": "GetOrder", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Get Order" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Get Order is invoked" + }, + "details": { + "name": "Get Order", + "tooltip": "Gets the horizontal order for the layout" + }, + "results": [ + { + "typeid": "{72039442-EB38-4D42-A1AD-CB68F7E0EEF6}", + "details": { + "name": "int" + } + } + ] + }, + { + "base": "SetOrder", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Set Order" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Set Order is invoked" + }, + "details": { + "name": "Set Order", + "tooltip": "Sets the horizontal order for the layout" + }, + "params": [ + { + "typeid": "{72039442-EB38-4D42-A1AD-CB68F7E0EEF6}", + "details": { + "name": "Order", + "tooltip": "The horizontal order for the layout (0=Left to Right, 1=Right to Left)" + } + } + ] + }, + { + "base": "GetSpacing", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Get Spacing" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Get Spacing is invoked" + }, + "details": { + "name": "Get Spacing", + "tooltip": "Gets the spacing between child elements" + }, + "results": [ + { + "typeid": "{EA2C3E90-AFBE-44D4-A90D-FAAF79BAF93D}", + "details": { + "name": "float" + } + } + ] + }, + { + "base": "GetPadding", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Get Padding" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Get Padding is invoked" + }, + "details": { + "name": "Get Padding", + "tooltip": "Gets the padding inside the edges of the element" + }, + "results": [ + { + "typeid": "{DE5C18B0-4214-4A37-B590-8D45CC450A96}", + "details": { + "name": "Padding" + } + } + ] + }, + { + "base": "SetPadding", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Set Padding" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Set Padding is invoked" + }, + "details": { + "name": "Set Padding", + "tooltip": "Sets the padding inside the edges of the element" + }, + "params": [ + { + "typeid": "{DE5C18B0-4214-4A37-B590-8D45CC450A96}", + "details": { + "name": "Padding", + "tooltip": "The padding inside the edges of the element in pixels" + } + } + ] + } + ] + } + ] +} \ No newline at end of file diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/EBus/Senders/UiMarkupButtonBus.names b/Gems/ScriptCanvas/Assets/TranslationAssets/EBus/Senders/UiMarkupButtonBus.names new file mode 100644 index 0000000000..a877e8a6bb --- /dev/null +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/EBus/Senders/UiMarkupButtonBus.names @@ -0,0 +1,109 @@ +{ + "entries": [ + { + "base": "UiMarkupButtonBus", + "context": "EBusSender", + "variant": "", + "details": { + "name": "UI Markup Button", + "category": "UI" + }, + "methods": [ + { + "base": "GetLinkColor", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Get Link Color" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Get Link Color is invoked" + }, + "details": { + "name": "Get Link Color", + "tooltip": "Gets the normal color of the clickable links" + }, + "results": [ + { + "typeid": "{7894072A-9050-4F0F-901B-34B1A0D29417}", + "details": { + "name": "Color" + } + } + ] + }, + { + "base": "SetLinkColor", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Set Link Color" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Set Link Color is invoked" + }, + "details": { + "name": "Set Link Color", + "tooltip": "Sets the normal color of the clickable links" + }, + "params": [ + { + "typeid": "{7894072A-9050-4F0F-901B-34B1A0D29417}", + "details": { + "name": "Color", + "tooltip": "The normal color for the clickable links" + } + } + ] + }, + { + "base": "GetLinkHoverColor", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Get Link Hover Color" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Get Link Hover Color is invoked" + }, + "details": { + "name": "Get Link Hover Color", + "tooltip": "Gets the hovered color of the clickable links" + }, + "results": [ + { + "typeid": "{7894072A-9050-4F0F-901B-34B1A0D29417}", + "details": { + "name": "Color" + } + } + ] + }, + { + "base": "SetLinkHoverColor", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Set Link Hover Color" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Set Link Hover Color is invoked" + }, + "details": { + "name": "Set Link Hover Color", + "tooltip": "Sets the hovered color of the clickable links" + }, + "params": [ + { + "typeid": "{7894072A-9050-4F0F-901B-34B1A0D29417}", + "details": { + "name": "Color", + "tooltip": "The hovered color for the clickable links" + } + } + ] + } + ] + } + ] +} \ No newline at end of file diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/EBus/Senders/UiMaskBus.names b/Gems/ScriptCanvas/Assets/TranslationAssets/EBus/Senders/UiMaskBus.names new file mode 100644 index 0000000000..dca599e33c --- /dev/null +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/EBus/Senders/UiMaskBus.names @@ -0,0 +1,297 @@ +{ + "entries": [ + { + "base": "UiMaskBus", + "context": "EBusSender", + "variant": "", + "details": { + "name": "UI Mask", + "category": "UI" + }, + "methods": [ + { + "base": "SetDrawInFront", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Set Draw In Front" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Set Draw In Front is invoked" + }, + "details": { + "name": "Set Draw In Front", + "tooltip": "Sets whether the mask should be drawn in front of the child elements" + }, + "params": [ + { + "typeid": "{A0CA880C-AFE4-43CB-926C-59AC48496112}", + "details": { + "name": "Draw In Front", + "tooltip": "Indicates whether the mask should be drawn in front of the child elements" + } + } + ] + }, + { + "base": "GetUseRenderToTexture", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Get Use Render To Texture" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Get Use Render To Texture is invoked" + }, + "details": { + "name": "Get Use Render To Texture", + "tooltip": "Get the flag that indicates whether the mask should use render to texture which allows an alpha gradient for soft-edged masks" + }, + "results": [ + { + "typeid": "{A0CA880C-AFE4-43CB-926C-59AC48496112}", + "details": { + "name": "bool" + } + } + ] + }, + { + "base": "GetDrawInFront", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Get Draw In Front" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Get Draw In Front is invoked" + }, + "details": { + "name": "Get Draw In Front", + "tooltip": "Returns whether the mask is drawn in front of the child elements" + }, + "results": [ + { + "typeid": "{A0CA880C-AFE4-43CB-926C-59AC48496112}", + "details": { + "name": "bool" + } + } + ] + }, + { + "base": "GetDrawBehind", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Get Draw Behind" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Get Draw Behind is invoked" + }, + "details": { + "name": "Get Draw Behind", + "tooltip": "Returns whether the mask is drawn behind the child elements" + }, + "results": [ + { + "typeid": "{A0CA880C-AFE4-43CB-926C-59AC48496112}", + "details": { + "name": "bool" + } + } + ] + }, + { + "base": "GetIsInteractionMaskingEnabled", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Is Interaction Masking Enabled" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Is Interaction Masking Enabled is invoked" + }, + "details": { + "name": "Is Interaction Masking Enabled", + "tooltip": "Returns whether children hidden by the mask are prevented from getting input events" + }, + "results": [ + { + "typeid": "{A0CA880C-AFE4-43CB-926C-59AC48496112}", + "details": { + "name": "bool" + } + } + ] + }, + { + "base": "GetUseAlphaTest", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Get Use Alpha Test" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Get Use Alpha Test is invoked" + }, + "details": { + "name": "Get Use Alpha Test", + "tooltip": "Returns whether to use the alpha channel in the mask visual's texture to define the mask" + }, + "results": [ + { + "typeid": "{A0CA880C-AFE4-43CB-926C-59AC48496112}", + "details": { + "name": "bool" + } + } + ] + }, + { + "base": "SetIsMaskingEnabled", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Set Is Masking Enabled" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Set Is Masking Enabled is invoked" + }, + "details": { + "name": "Set Is Masking Enabled", + "tooltip": "Sets whether masking should be enabled" + }, + "params": [ + { + "typeid": "{A0CA880C-AFE4-43CB-926C-59AC48496112}", + "details": { + "name": "Enabled", + "tooltip": "Indicates whether masking should be enabled" + } + } + ] + }, + { + "base": "SetUseRenderToTexture", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Set Use Render To Texture" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Set Use Render To Texture is invoked" + }, + "details": { + "name": "Set Use Render To Texture", + "tooltip": "Set the flag that indicates whether the mask should use render to texture which allows an alpha gradient for soft-edged masks" + }, + "params": [ + { + "typeid": "{A0CA880C-AFE4-43CB-926C-59AC48496112}", + "details": { + "name": "Use Render To Texture", + "tooltip": "Whether the mask should use render to texture" + } + } + ] + }, + { + "base": "GetIsMaskingEnabled", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Is Masking Enabled" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Is Masking Enabled is invoked" + }, + "details": { + "name": "Is Masking Enabled", + "tooltip": "Returns whether masking is enabled" + }, + "results": [ + { + "typeid": "{A0CA880C-AFE4-43CB-926C-59AC48496112}", + "details": { + "name": "bool" + } + } + ] + }, + { + "base": "SetIsInteractionMaskingEnabled", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Set Is Interaction Masking Enabled" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Set Is Interaction Masking Enabled is invoked" + }, + "details": { + "name": "Set Is Interaction Masking Enabled", + "tooltip": "Sets whether children hidden by the mask should be prevented from getting input events" + }, + "params": [ + { + "typeid": "{A0CA880C-AFE4-43CB-926C-59AC48496112}", + "details": { + "name": "Interaction Masking", + "tooltip": "Indicates whether children hidden by the mask should be prevented from getting input events" + } + } + ] + }, + { + "base": "SetDrawBehind", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Set Draw Behind" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Set Draw Behind is invoked" + }, + "details": { + "name": "Set Draw Behind", + "tooltip": "Sets whether the mask should be drawn behind the child elements" + }, + "params": [ + { + "typeid": "{A0CA880C-AFE4-43CB-926C-59AC48496112}", + "details": { + "name": "Draw Behind", + "tooltip": "Indicates whether the mask should be drawn behind the child elements" + } + } + ] + }, + { + "base": "SetUseAlphaTest", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Set Use Alpha Test" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Set Use Alpha Test is invoked" + }, + "details": { + "name": "Set Use Alpha Test", + "tooltip": "Sets whether to use the alpha channel in the mask visual's texture to define the mask" + }, + "params": [ + { + "typeid": "{A0CA880C-AFE4-43CB-926C-59AC48496112}", + "details": { + "name": "Use Alpha Test", + "tooltip": "Indicates whether to use the alpha channel in the mask visual's texture to define the mask" + } + } + ] + } + ] + } + ] +} \ No newline at end of file diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/EBus/Senders/UiNavigationBus.names b/Gems/ScriptCanvas/Assets/TranslationAssets/EBus/Senders/UiNavigationBus.names new file mode 100644 index 0000000000..9dc985f263 --- /dev/null +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/EBus/Senders/UiNavigationBus.names @@ -0,0 +1,254 @@ +{ + "entries": [ + { + "base": "UiNavigationBus", + "context": "EBusSender", + "variant": "", + "details": { + "name": "UI Navigation", + "category": "UI" + }, + "methods": [ + { + "base": "GetOnRightEntity", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Get On Right Entity" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Get On Right Entity is invoked" + }, + "details": { + "name": "Get On Right Entity", + "tooltip": "Gets the element to receive focus when right is pressed" + }, + "results": [ + { + "typeid": "{6383F1D3-BB27-4E6B-A49A-6409B2059EAA}", + "details": { + "name": "EntityId", + "tooltip": "Entity Unique Id" + } + } + ] + }, + { + "base": "SetOnLeftEntity", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Set On Left Entity" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Set On Left Entity is invoked" + }, + "details": { + "name": "Set On Left Entity", + "tooltip": "Sets the element to receive focus when left is pressed" + }, + "params": [ + { + "typeid": "{6383F1D3-BB27-4E6B-A49A-6409B2059EAA}", + "details": { + "name": "EntityID", + "tooltip": "The element to receive focus when left is pressed" + } + } + ] + }, + { + "base": "GetOnLeftEntity", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Get On Left Entity" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Get On Left Entity is invoked" + }, + "details": { + "name": "Get On Left Entity", + "tooltip": "Gets the element to receive focus when left is pressed" + }, + "results": [ + { + "typeid": "{6383F1D3-BB27-4E6B-A49A-6409B2059EAA}", + "details": { + "name": "EntityId", + "tooltip": "Entity Unique Id" + } + } + ] + }, + { + "base": "SetOnDownEntity", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Set On Down Entity" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Set On Down Entity is invoked" + }, + "details": { + "name": "Set On Down Entity", + "tooltip": "Sets the element to receive focus when down is pressed" + }, + "params": [ + { + "typeid": "{6383F1D3-BB27-4E6B-A49A-6409B2059EAA}", + "details": { + "name": "EntityID", + "tooltip": "The element to receive focus when down is pressed" + } + } + ] + }, + { + "base": "GetOnUpEntity", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Get On Up Entity" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Get On Up Entity is invoked" + }, + "details": { + "name": "Get On Up Entity", + "tooltip": "Gets the element to receive focus when up is pressed" + }, + "results": [ + { + "typeid": "{6383F1D3-BB27-4E6B-A49A-6409B2059EAA}", + "details": { + "name": "EntityId", + "tooltip": "Entity Unique Id" + } + } + ] + }, + { + "base": "SetOnUpEntity", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Set On Up Entity" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Set On Up Entity is invoked" + }, + "details": { + "name": "Set On Up Entity", + "tooltip": "Sets the element to receive focus when up is pressed" + }, + "params": [ + { + "typeid": "{6383F1D3-BB27-4E6B-A49A-6409B2059EAA}", + "details": { + "name": "EntityID", + "tooltip": "The element to receive focus when up is pressed" + } + } + ] + }, + { + "base": "SetOnRightEntity", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Set On Right Entity" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Set On Right Entity is invoked" + }, + "details": { + "name": "Set On Right Entity", + "tooltip": "Sets the element to receive focus when right is pressed" + }, + "params": [ + { + "typeid": "{6383F1D3-BB27-4E6B-A49A-6409B2059EAA}", + "details": { + "name": "EntityID", + "tooltip": "The element to receive focus when right is pressed" + } + } + ] + }, + { + "base": "SetNavigationMode", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Set Navigation Mode" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Set Navigation Mode is invoked" + }, + "details": { + "name": "Set Navigation Mode", + "tooltip": "Sets how the next element to receive focus is chosen when a navigation event occurs" + }, + "params": [ + { + "typeid": "{72039442-EB38-4D42-A1AD-CB68F7E0EEF6}", + "details": { + "name": "Navigation Mode", + "tooltip": "Indicates how the next element to receive focus is chosen when a navigation event occurs (0=Automatic, 1=Custom, 2=None)" + } + } + ] + }, + { + "base": "GetOnDownEntity", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Get On Down Entity" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Get On Down Entity is invoked" + }, + "details": { + "name": "Get On Down Entity", + "tooltip": "Gets the element to receive focus when down is pressed" + }, + "results": [ + { + "typeid": "{6383F1D3-BB27-4E6B-A49A-6409B2059EAA}", + "details": { + "name": "EntityId", + "tooltip": "Entity Unique Id" + } + } + ] + }, + { + "base": "GetNavigationMode", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Get Navigation Mode" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Get Navigation Mode is invoked" + }, + "details": { + "name": "Get Navigation Mode", + "tooltip": "Gets how the next element to receive focus is chosen when a navigation event occurs" + }, + "results": [ + { + "typeid": "{72039442-EB38-4D42-A1AD-CB68F7E0EEF6}", + "details": { + "name": "int" + } + } + ] + } + ] + } + ] +} \ No newline at end of file diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/EBus/Senders/UiParticleEmitterBus.names b/Gems/ScriptCanvas/Assets/TranslationAssets/EBus/Senders/UiParticleEmitterBus.names new file mode 100644 index 0000000000..87d6e0ee6d --- /dev/null +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/EBus/Senders/UiParticleEmitterBus.names @@ -0,0 +1,2412 @@ +{ + "entries": [ + { + "base": "UiParticleEmitterBus", + "context": "EBusSender", + "variant": "", + "details": { + "name": "UI Particle Emitter", + "category": "UI" + }, + "methods": [ + { + "base": "SetParticleColorTintVariation", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Set Particle Color Tint Variation" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Set Particle Color Tint Variation is invoked" + }, + "details": { + "name": "Set Particle Color Tint Variation", + "tooltip": "Sets the variation in color tint of the emitted particles" + }, + "params": [ + { + "typeid": "{EA2C3E90-AFBE-44D4-A90D-FAAF79BAF93D}", + "details": { + "name": "Variation", + "tooltip": "The variation in color tint of the emitted particles [0-1]" + } + } + ] + }, + { + "base": "GetSpriteSheetFrameDelay", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Get Sprite Sheet Frame Delay" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Get Sprite Sheet Frame Delay is invoked" + }, + "details": { + "name": "Get Sprite Sheet Frame Delay", + "tooltip": "Gets the delay between each sprite sheet frame" + }, + "results": [ + { + "typeid": "{EA2C3E90-AFBE-44D4-A90D-FAAF79BAF93D}", + "details": { + "name": "float" + } + } + ] + }, + { + "base": "SetParticleAlpha", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Set Particle Alpha" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Set Particle Alpha is invoked" + }, + "details": { + "name": "Set Particle Alpha", + "tooltip": "Sets the alpha of the emitted particles" + }, + "params": [ + { + "typeid": "{EA2C3E90-AFBE-44D4-A90D-FAAF79BAF93D}", + "details": { + "name": "Alpha", + "tooltip": "The alpha of the emitted particles [0-1]" + } + } + ] + }, + { + "base": "GetIsEmitting", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Is Emitting" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Is Emitting is invoked" + }, + "details": { + "name": "Is Emitting", + "tooltip": "Returns whether the emitter is currently emitting" + }, + "results": [ + { + "typeid": "{A0CA880C-AFE4-43CB-926C-59AC48496112}", + "details": { + "name": "bool" + } + } + ] + }, + { + "base": "SetParticleHeight", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Set Particle Height" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Set Particle Height is invoked" + }, + "details": { + "name": "Set Particle Height", + "tooltip": "Sets the height of the emitted particles" + }, + "params": [ + { + "typeid": "{EA2C3E90-AFBE-44D4-A90D-FAAF79BAF93D}", + "details": { + "name": "Height", + "tooltip": "The height of the emitted particles" + } + } + ] + }, + { + "base": "GetSpriteSheetCellIndex", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Get Sprite Sheet Cell Index" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Get Sprite Sheet Cell Index is invoked" + }, + "details": { + "name": "Get Sprite Sheet Cell Index", + "tooltip": "Gets the sprite sheet cell index to be used for emitted particles" + }, + "results": [ + { + "typeid": "{72039442-EB38-4D42-A1AD-CB68F7E0EEF6}", + "details": { + "name": "int" + } + } + ] + }, + { + "base": "GetIsParticleInitialRotationFromInitialVelocity", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Is Particle Initial Rotation From Initial Velocity" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Is Particle Initial Rotation From Initial Velocity is invoked" + }, + "details": { + "name": "Is Particle Initial Rotation From Initial Velocity", + "tooltip": "Returns whether the particle will be initially orientated so that the top of each particle points towards the initial velocity vector" + }, + "results": [ + { + "typeid": "{A0CA880C-AFE4-43CB-926C-59AC48496112}", + "details": { + "name": "bool" + } + } + ] + }, + { + "base": "GetParticleLifetime", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Get Particle Lifetime" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Get Particle Lifetime is invoked" + }, + "details": { + "name": "Get Particle Lifetime", + "tooltip": "Gets the lifetime of the emitted particles" + }, + "results": [ + { + "typeid": "{EA2C3E90-AFBE-44D4-A90D-FAAF79BAF93D}", + "details": { + "name": "float" + } + } + ] + }, + { + "base": "GetIsRandomSeedFixed", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Is Random Seed Fixed" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Is Random Seed Fixed is invoked" + }, + "details": { + "name": "Is Random Seed Fixed", + "tooltip": "Returns whether the emitter uses a fixed random seed" + }, + "results": [ + { + "typeid": "{A0CA880C-AFE4-43CB-926C-59AC48496112}", + "details": { + "name": "bool" + } + } + ] + }, + { + "base": "GetSpritePathname", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Get Sprite Pathname" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Get Sprite Pathname is invoked" + }, + "details": { + "name": "Get Sprite Pathname", + "tooltip": "Gets the source location of the image to be used by the emitted particles" + }, + "results": [ + { + "typeid": "{03AAAB3F-5C47-5A66-9EBC-D5FA4DB353C9}", + "details": { + "name": "AZStd::string" + } + } + ] + }, + { + "base": "GetParticleLifetimeVariation", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Get Particle Lifetime Variation" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Get Particle Lifetime Variation is invoked" + }, + "details": { + "name": "Get Particle Lifetime Variation", + "tooltip": "Gets the variation in lifetime of the emitted particles. A variation of 5 seconds will be up to 5 seconds on either side of the chosen initial lifetime" + }, + "results": [ + { + "typeid": "{EA2C3E90-AFBE-44D4-A90D-FAAF79BAF93D}", + "details": { + "name": "float" + } + } + ] + }, + { + "base": "GetParticleColor", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Get Particle Color" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Get Particle Color is invoked" + }, + "details": { + "name": "Get Particle Color", + "tooltip": "Gets the color of the emitted particles" + }, + "results": [ + { + "typeid": "{7894072A-9050-4F0F-901B-34B1A0D29417}", + "details": { + "name": "Color" + } + } + ] + }, + { + "base": "GetParticleInitialRotationVariation", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Get Particle Initial Rotation Variation" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Get Particle Initial Rotation Variation is invoked" + }, + "details": { + "name": "Get Particle Initial Rotation Variation", + "tooltip": "Gets the variation of the initial rotation" + }, + "results": [ + { + "typeid": "{EA2C3E90-AFBE-44D4-A90D-FAAF79BAF93D}", + "details": { + "name": "float" + } + } + ] + }, + { + "base": "SetParticleLifetimeVariation", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Set Particle Lifetime Variation" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Set Particle Lifetime Variation is invoked" + }, + "details": { + "name": "Set Particle Lifetime Variation", + "tooltip": "Sets the variation in lifetime of the emitted particles. A variation of 5 seconds will be up to 5 seconds on either side of the chosen initial lifetime" + }, + "params": [ + { + "typeid": "{EA2C3E90-AFBE-44D4-A90D-FAAF79BAF93D}", + "details": { + "name": "Variation", + "tooltip": "The variation in lifetime of the emitted particles. A variation of 5 seconds will be up to 5 seconds on either side of the chosen initial lifetime" + } + } + ] + }, + { + "base": "GetIsEmitOnEdge", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Is Emit On Edge" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Is Emit On Edge is invoked" + }, + "details": { + "name": "Is Emit On Edge", + "tooltip": "Returns whether the particles are emitted on the edge of the selected shape" + }, + "results": [ + { + "typeid": "{A0CA880C-AFE4-43CB-926C-59AC48496112}", + "details": { + "name": "bool" + } + } + ] + }, + { + "base": "GetParticleRotationSpeedVariation", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Get Particle Rotation Speed Variation" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Get Particle Rotation Speed Variation is invoked" + }, + "details": { + "name": "Get Particle Rotation Speed Variation", + "tooltip": "Gets the variation in rotation speed of the emitted particles" + }, + "results": [ + { + "typeid": "{EA2C3E90-AFBE-44D4-A90D-FAAF79BAF93D}", + "details": { + "name": "float" + } + } + ] + }, + { + "base": "SetIsEmitOnActivate", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Set Is Emit On Activate" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Set Is Emit On Activate is invoked" + }, + "details": { + "name": "Set Is Emit On Activate", + "tooltip": "Sets whether the particle emitter starts emitting when the component is activated" + }, + "params": [ + { + "typeid": "{A0CA880C-AFE4-43CB-926C-59AC48496112}", + "details": { + "name": "Emit on Activate", + "tooltip": "Indicates whether the particle emitter starts emitting when the component is activated" + } + } + ] + }, + { + "base": "GetParticleRotationSpeed", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Get Particle Rotation Speed" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Get Particle Rotation Speed is invoked" + }, + "details": { + "name": "Get Particle Rotation Speed", + "tooltip": "Gets the rotation speed of the emitted particles" + }, + "results": [ + { + "typeid": "{EA2C3E90-AFBE-44D4-A90D-FAAF79BAF93D}", + "details": { + "name": "float" + } + } + ] + }, + { + "base": "SetParticleRotationSpeed", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Set Particle Rotation Speed" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Set Particle Rotation Speed is invoked" + }, + "details": { + "name": "Set Particle Rotation Speed", + "tooltip": "Sets the rotation speed of the emitted particles" + }, + "params": [ + { + "typeid": "{EA2C3E90-AFBE-44D4-A90D-FAAF79BAF93D}", + "details": { + "name": "Rotation Speed", + "tooltip": "The rotation speed of the emitted particles in degrees clockwise per second" + } + } + ] + }, + { + "base": "GetIsParticlePositionRelativeToEmitter", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Is Particle Position Relative To Emitter" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Is Particle Position Relative To Emitter is invoked" + }, + "details": { + "name": "Is Particle Position Relative To Emitter", + "tooltip": "Returns whether the emitted particles move relative to the emitter" + }, + "results": [ + { + "typeid": "{A0CA880C-AFE4-43CB-926C-59AC48496112}", + "details": { + "name": "bool" + } + } + ] + }, + { + "base": "SetIsParticleAspectRatioLocked", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Set Is Particle Aspect Ratio Locked" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Set Is Particle Aspect Ratio Locked is invoked" + }, + "details": { + "name": "Set Is Particle Aspect Ratio Locked", + "tooltip": "Sets whether the width and height of the emitted particles will be locked into the current aspect ratio" + }, + "params": [ + { + "typeid": "{A0CA880C-AFE4-43CB-926C-59AC48496112}", + "details": { + "name": "Aspect Ratio Locked", + "tooltip": "Indicates whether the width and height of the emitted particles will be locked into the current aspect ratio" + } + } + ] + }, + { + "base": "SetEmitAngleVariation", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Set Emit Angle Variation" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Set Emit Angle Variation is invoked" + }, + "details": { + "name": "Set Emit Angle Variation", + "tooltip": "Sets the variation in the emit angle" + }, + "params": [ + { + "typeid": "{EA2C3E90-AFBE-44D4-A90D-FAAF79BAF93D}", + "details": { + "name": "Variation", + "tooltip": "The variation in the emit angle in degrees. A variation of 10 would be up to +/- 10 degrees on each side of the current emit angle" + } + } + ] + }, + { + "base": "SetParticleLifetime", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Set Particle Lifetime" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Set Particle Lifetime is invoked" + }, + "details": { + "name": "Set Particle Lifetime", + "tooltip": "Sets the lifetime of the emitted particles" + }, + "params": [ + { + "typeid": "{EA2C3E90-AFBE-44D4-A90D-FAAF79BAF93D}", + "details": { + "name": "Lifetime", + "tooltip": "The lifetime of the emitted particles in seconds" + } + } + ] + }, + { + "base": "SetSpriteSheetFrameDelay", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Set Sprite Sheet Frame Delay" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Set Sprite Sheet Frame Delay is invoked" + }, + "details": { + "name": "Set Sprite Sheet Frame Delay", + "tooltip": "Sets the delay between each sprite sheet frame" + }, + "params": [ + { + "typeid": "{EA2C3E90-AFBE-44D4-A90D-FAAF79BAF93D}", + "details": { + "name": "Delay", + "tooltip": "The delay in seconds between each sprite sheet frame" + } + } + ] + }, + { + "base": "SetIsParticleInitialRotationFromInitialVelocity", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Set Is Particle Initial Rotation From Initial Velocity" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Set Is Particle Initial Rotation From Initial Velocity is invoked" + }, + "details": { + "name": "Set Is Particle Initial Rotation From Initial Velocity", + "tooltip": "Sets whether the particle will be initially orientated so that the top of each particles points towards the initial velocity vector" + }, + "params": [ + { + "typeid": "{A0CA880C-AFE4-43CB-926C-59AC48496112}", + "details": { + "name": "Initial Rotation from Velocity", + "tooltip": "Indicates whether the particle will be initially orientated so that the top of each particles points towards the initial velocity vector" + } + } + ] + }, + { + "base": "SetParticleAccelerationMovementSpace", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Set Particle Acceleration Movement Space" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Set Particle Acceleration Movement Space is invoked" + }, + "details": { + "name": "Set Particle Acceleration Movement Space", + "tooltip": "Sets the coordinate system used for the acceleration of particles" + }, + "params": [ + { + "typeid": "{72039442-EB38-4D42-A1AD-CB68F7E0EEF6}", + "details": { + "name": "Coordinate System", + "tooltip": "The coordinate system used for the acceleration of particles (0=Cartesian, 1=Polar)" + } + } + ] + }, + { + "base": "SetIsSpriteSheetAnimated", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Set Is Sprite Sheet Animated" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Set Is Sprite Sheet Animated is invoked" + }, + "details": { + "name": "Set Is Sprite Sheet Animated", + "tooltip": "Sets whether the sprite sheet cell index changes over time on each particle" + }, + "params": [ + { + "typeid": "{A0CA880C-AFE4-43CB-926C-59AC48496112}", + "details": { + "name": "Animated", + "tooltip": "Indicates whether the sprite sheet cell index changes over time on each particle" + } + } + ] + }, + { + "base": "SetIsParticleCountLimited", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Set Is Particle Count Limited" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Set Is Particle Count Limited is invoked" + }, + "details": { + "name": "Set Is Particle Count Limited", + "tooltip": "Sets whether there is a limit to the amount of active particles" + }, + "params": [ + { + "typeid": "{A0CA880C-AFE4-43CB-926C-59AC48496112}", + "details": { + "name": "Particle Count Limited", + "tooltip": "Indicates whether there is a limit to the amount of active particles" + } + } + ] + }, + { + "base": "GetParticleSize", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Get Particle Size" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Get Particle Size is invoked" + }, + "details": { + "name": "Get Particle Size", + "tooltip": "Gets the size of the emitted particles" + }, + "results": [ + { + "typeid": "{3D80F623-C85C-4741-90D0-E4E66164E6BF}", + "details": { + "name": "Vector2" + } + } + ] + }, + { + "base": "GetParticleAccelerationMovementSpace", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Get Particle Acceleration Movement Space" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Get Particle Acceleration Movement Space is invoked" + }, + "details": { + "name": "Get Particle Acceleration Movement Space", + "tooltip": "Gets the coordinate system used for the acceleration of particles" + }, + "results": [ + { + "typeid": "{72039442-EB38-4D42-A1AD-CB68F7E0EEF6}", + "details": { + "name": "int" + } + } + ] + }, + { + "base": "SetEmitAngle", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Set Emit Angle" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Set Emit Angle is invoked" + }, + "details": { + "name": "Set Emit Angle", + "tooltip": "Sets the angle that particles are emitted along" + }, + "params": [ + { + "typeid": "{EA2C3E90-AFBE-44D4-A90D-FAAF79BAF93D}", + "details": { + "name": "Angle", + "tooltip": "The angle that particles are emitted along, in degrees clockwise from straight up" + } + } + ] + }, + { + "base": "SetParticleEmitRate", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Set Particle Emit Rate" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Set Particle Emit Rate is invoked" + }, + "details": { + "name": "Set Particle Emit Rate", + "tooltip": "Sets the particle emitter emit rate" + }, + "params": [ + { + "typeid": "{EA2C3E90-AFBE-44D4-A90D-FAAF79BAF93D}", + "details": { + "name": "Emit Rate", + "tooltip": "The particle emitter emit rate in particles per second" + } + } + ] + }, + { + "base": "GetMaxParticles", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Get Max Particles" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Get Max Particles is invoked" + }, + "details": { + "name": "Get Max Particles", + "tooltip": "Gets the limit of the amount of active particles" + }, + "results": [ + { + "typeid": "{43DA906B-7DEF-4CA8-9790-854106D3F983}", + "details": { + "name": "unsigned int" + } + } + ] + }, + { + "base": "GetParticleColorBrightnessVariation", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Get Particle Color Brightness Variation" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Get Particle Color Brightness Variation is invoked" + }, + "details": { + "name": "Get Particle Color Brightness Variation", + "tooltip": "Gets the variation in color brightness of the emitted particles" + }, + "results": [ + { + "typeid": "{EA2C3E90-AFBE-44D4-A90D-FAAF79BAF93D}", + "details": { + "name": "float" + } + } + ] + }, + { + "base": "SetMaxParticles", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Set Max Particles" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Set Max Particles is invoked" + }, + "details": { + "name": "Set Max Particles", + "tooltip": "Sets the limit of the amount of active particles" + }, + "params": [ + { + "typeid": "{43DA906B-7DEF-4CA8-9790-854106D3F983}", + "details": { + "name": "Max Particles", + "tooltip": "The limit of the amount of active particles" + } + } + ] + }, + { + "base": "GetInsideEmitDistance", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Get Inside Emit Distance" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Get Inside Emit Distance is invoked" + }, + "details": { + "name": "Get Inside Emit Distance", + "tooltip": "Gets the distance inside the emitter shape edge that particles are emitted" + }, + "results": [ + { + "typeid": "{EA2C3E90-AFBE-44D4-A90D-FAAF79BAF93D}", + "details": { + "name": "float" + } + } + ] + }, + { + "base": "SetParticlePivot", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Set Particle Pivot" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Set Particle Pivot is invoked" + }, + "details": { + "name": "Set Particle Pivot", + "tooltip": "Sets the pivot for the particles" + }, + "params": [ + { + "typeid": "{3D80F623-C85C-4741-90D0-E4E66164E6BF}", + "details": { + "name": "Pivot", + "tooltip": "The pivot for the particles from (0,0) at the top left to (1,1) at the bottom right" + } + } + ] + }, + { + "base": "GetParticleInitialDirectionType", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Get Particle Initial Direction Type" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Get Particle Initial Direction Type is invoked" + }, + "details": { + "name": "Get Particle Initial Direction Type", + "tooltip": "Gets how the initial direction of the emitted particles are calculated" + }, + "results": [ + { + "typeid": "{72039442-EB38-4D42-A1AD-CB68F7E0EEF6}", + "details": { + "name": "int" + } + } + ] + }, + { + "base": "SetEmitterLifetime", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Set Emitter Lifetime" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Set Emitter Lifetime is invoked" + }, + "details": { + "name": "Set Emitter Lifetime", + "tooltip": "Sets the emitter lifetime. When the lifetime is reached the emitter will stop emitting" + }, + "params": [ + { + "typeid": "{EA2C3E90-AFBE-44D4-A90D-FAAF79BAF93D}", + "details": { + "name": "Lifetime", + "tooltip": "The emitter lifetime in seconds" + } + } + ] + }, + { + "base": "GetSpriteSheetCellEndIndex", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Get Sprite Sheet Cell End Index" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Get Sprite Sheet Cell End Index is invoked" + }, + "details": { + "name": "Get Sprite Sheet Cell End Index", + "tooltip": "Gets the end index of the sprite sheet cell range used for sprite sheet animation or for randomly choosing the index" + }, + "results": [ + { + "typeid": "{72039442-EB38-4D42-A1AD-CB68F7E0EEF6}", + "details": { + "name": "int" + } + } + ] + }, + { + "base": "SetIsEmitOnEdge", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Set Is Emit On Edge" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Set Is Emit On Edge is invoked" + }, + "details": { + "name": "Set Is Emit On Edge", + "tooltip": "Sets whether the particles are emitted on the edge of the selected shape" + }, + "params": [ + { + "typeid": "{A0CA880C-AFE4-43CB-926C-59AC48496112}", + "details": { + "name": "Emit on Edge", + "tooltip": "Indicates whether the particles are emitted on the edge of the selected shape" + } + } + ] + }, + { + "base": "GetParticleColorTintVariation", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Get Particle Color Tint Variation" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Get Particle Color Tint Variation is invoked" + }, + "details": { + "name": "Get Particle Color Tint Variation", + "tooltip": "Gets the variation in color tint of the emitted particles" + }, + "results": [ + { + "typeid": "{EA2C3E90-AFBE-44D4-A90D-FAAF79BAF93D}", + "details": { + "name": "float" + } + } + ] + }, + { + "base": "SetParticleInitialVelocity", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Set Particle Initial Velocity" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Set Particle Initial Velocity is invoked" + }, + "details": { + "name": "Set Particle Initial Velocity", + "tooltip": "Sets the initial velocity of the emitted particles (used only when the emitter doesn’t control the emit direction)" + }, + "params": [ + { + "typeid": "{3D80F623-C85C-4741-90D0-E4E66164E6BF}", + "details": { + "name": "Velocity", + "tooltip": "The initial velocity of the emitted particles" + } + } + ] + }, + { + "base": "GetIsParticleCountLimited", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Is Particle Count Limited" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Is Particle Count Limited is invoked" + }, + "details": { + "name": "Is Particle Count Limited", + "tooltip": "Returns whether there is a limit to the amount of active particles" + }, + "results": [ + { + "typeid": "{A0CA880C-AFE4-43CB-926C-59AC48496112}", + "details": { + "name": "bool" + } + } + ] + }, + { + "base": "SetParticleWidthVariation", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Set Particle Width Variation" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Set Particle Width Variation is invoked" + }, + "details": { + "name": "Set Particle Width Variation", + "tooltip": "Sets the variation in width of the emitted particles" + }, + "params": [ + { + "typeid": "{EA2C3E90-AFBE-44D4-A90D-FAAF79BAF93D}", + "details": { + "name": "Variation", + "tooltip": "The variation in width of the emitted particles" + } + } + ] + }, + { + "base": "GetOutsideEmitDistance", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Get Outside Emit Distance" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Get Outside Emit Distance is invoked" + }, + "details": { + "name": "Get Outside Emit Distance", + "tooltip": "Gets the distance outside the emitter shape edge that particles are emitted" + }, + "results": [ + { + "typeid": "{EA2C3E90-AFBE-44D4-A90D-FAAF79BAF93D}", + "details": { + "name": "float" + } + } + ] + }, + { + "base": "GetIsParticleLifetimeInfinite", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Is Particle Lifetime Infinite" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Is Particle Lifetime Infinite is invoked" + }, + "details": { + "name": "Is Particle Lifetime Infinite", + "tooltip": "Returns whether the emitted particles have an infinite lifetime" + }, + "results": [ + { + "typeid": "{A0CA880C-AFE4-43CB-926C-59AC48496112}", + "details": { + "name": "bool" + } + } + ] + }, + { + "base": "SetIsParticleRotationFromVelocity", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Set Is Particle Rotation From Velocity" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Set Is Particle Rotation From Velocity is invoked" + }, + "details": { + "name": "Set Is Particle Rotation From Velocity", + "tooltip": "Sets whether the particle will be orientated so that the top of each particles points towards the current velocity vector" + }, + "params": [ + { + "typeid": "{A0CA880C-AFE4-43CB-926C-59AC48496112}", + "details": { + "name": "Rotation from Velocity", + "tooltip": "Indicates whether the particle will be orientated so that the top of each particles points towards the current velocity vector" + } + } + ] + }, + { + "base": "GetIsSpriteSheetAnimated", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Is Sprite Sheet Animated" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Is Sprite Sheet Animated is invoked" + }, + "details": { + "name": "Is Sprite Sheet Animated", + "tooltip": "Returns whether the sprite sheet cell index changes over time on each particle" + }, + "results": [ + { + "typeid": "{A0CA880C-AFE4-43CB-926C-59AC48496112}", + "details": { + "name": "bool" + } + } + ] + }, + { + "base": "SetInsideEmitDistance", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Set Inside Emit Distance" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Set Inside Emit Distance is invoked" + }, + "details": { + "name": "Set Inside Emit Distance", + "tooltip": "Sets the distance inside the emitter shape edge that particles are emitted" + }, + "params": [ + { + "typeid": "{EA2C3E90-AFBE-44D4-A90D-FAAF79BAF93D}", + "details": { + "name": "Distance", + "tooltip": "The distance inside the emitter shape edge that particles are emitted" + } + } + ] + }, + { + "base": "SetSpritePathname", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Set Sprite Pathname" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Set Sprite Pathname is invoked" + }, + "details": { + "name": "Set Sprite Pathname", + "tooltip": "Sets the source location of the image to be used by the emitted particles" + }, + "params": [ + { + "typeid": "{03AAAB3F-5C47-5A66-9EBC-D5FA4DB353C9}", + "details": { + "name": "Pathname", + "tooltip": "The source location of the image to be used by the emitted particles" + } + } + ] + }, + { + "base": "GetEmitterShape", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Get Emitter Shape" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Get Emitter Shape is invoked" + }, + "details": { + "name": "Get Emitter Shape", + "tooltip": "Gets the emitter shape" + }, + "results": [ + { + "typeid": "{72039442-EB38-4D42-A1AD-CB68F7E0EEF6}", + "details": { + "name": "int" + } + } + ] + }, + { + "base": "SetOutsideEmitDistance", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Set Outside Emit Distance" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Set Outside Emit Distance is invoked" + }, + "details": { + "name": "Set Outside Emit Distance", + "tooltip": "Sets the distance outside the emitter shape edge that particles are emitted" + }, + "params": [ + { + "typeid": "{EA2C3E90-AFBE-44D4-A90D-FAAF79BAF93D}", + "details": { + "name": "Distance", + "tooltip": "The distance outside the emitter shape edge that particles are emitted" + } + } + ] + }, + { + "base": "SetRandomSeed", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Set Random Seed" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Set Random Seed is invoked" + }, + "details": { + "name": "Set Random Seed", + "tooltip": "Sets the random seed used by the emitter" + }, + "params": [ + { + "typeid": "{72039442-EB38-4D42-A1AD-CB68F7E0EEF6}", + "details": { + "name": "Random Seed", + "tooltip": "The random seed used by the emitter" + } + } + ] + }, + { + "base": "GetIsParticleRotationFromVelocity", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Is Particle Rotation From Velocity" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Is Particle Rotation From Velocity is invoked" + }, + "details": { + "name": "Is Particle Rotation From Velocity", + "tooltip": "Returns whether the particle will be orientated so that the top of each particles points towards the current velocity vector" + }, + "results": [ + { + "typeid": "{A0CA880C-AFE4-43CB-926C-59AC48496112}", + "details": { + "name": "bool" + } + } + ] + }, + { + "base": "GetRandomSeed", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Get Random Seed" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Get Random Seed is invoked" + }, + "details": { + "name": "Get Random Seed", + "tooltip": "Gets the random seed used by the emitter" + }, + "results": [ + { + "typeid": "{72039442-EB38-4D42-A1AD-CB68F7E0EEF6}", + "details": { + "name": "int" + } + } + ] + }, + { + "base": "GetParticleEmitRate", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Get Particle Emit Rate" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Get Particle Emit Rate is invoked" + }, + "details": { + "name": "Get Particle Emit Rate", + "tooltip": "Gets the particle emitter emit rate" + }, + "results": [ + { + "typeid": "{EA2C3E90-AFBE-44D4-A90D-FAAF79BAF93D}", + "details": { + "name": "float" + } + } + ] + }, + { + "base": "GetIsSpriteSheetIndexRandom", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Is Sprite Sheet Index Random" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Is Sprite Sheet Index Random is invoked" + }, + "details": { + "name": "Is Sprite Sheet Index Random", + "tooltip": "Returns whether the initial sprite sheet index is randomly chosen" + }, + "results": [ + { + "typeid": "{A0CA880C-AFE4-43CB-926C-59AC48496112}", + "details": { + "name": "bool" + } + } + ] + }, + { + "base": "SetIsEmitting", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Set Is Emitting" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Set Is Emitting is invoked" + }, + "details": { + "name": "Set Is Emitting", + "tooltip": "Sets whether the emitter is currently emitting" + }, + "params": [ + { + "typeid": "{A0CA880C-AFE4-43CB-926C-59AC48496112}", + "details": { + "name": "Emitting", + "tooltip": "Indicates whether the emitter is currently emitting" + } + } + ] + }, + { + "base": "GetParticleWidth", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Get Particle Width" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Get Particle Width is invoked" + }, + "details": { + "name": "Get Particle Width", + "tooltip": "Gets the width of the emitted particles" + }, + "results": [ + { + "typeid": "{EA2C3E90-AFBE-44D4-A90D-FAAF79BAF93D}", + "details": { + "name": "float" + } + } + ] + }, + { + "base": "GetParticleInitialRotation", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Get Particle Initial Rotation" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Get Particle Initial Rotation is invoked" + }, + "details": { + "name": "Get Particle Initial Rotation", + "tooltip": "Gets the initial rotation" + }, + "results": [ + { + "typeid": "{EA2C3E90-AFBE-44D4-A90D-FAAF79BAF93D}", + "details": { + "name": "float" + } + } + ] + }, + { + "base": "SetIsSpriteSheetAnimationLooped", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Set Is Sprite Sheet Animation Looped" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Set Is Sprite Sheet Animation Looped is invoked" + }, + "details": { + "name": "Set Is Sprite Sheet Animation Looped", + "tooltip": "Sets whether the sprite sheet cell animation is looped" + }, + "params": [ + { + "typeid": "{A0CA880C-AFE4-43CB-926C-59AC48496112}", + "details": { + "name": "Animation Looped", + "tooltip": "Indicates whether the sprite sheet cell animation is looped" + } + } + ] + }, + { + "base": "SetParticleInitialRotationVariation", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Set Particle Initial Rotation Variation" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Set Particle Initial Rotation Variation is invoked" + }, + "details": { + "name": "Set Particle Initial Rotation Variation", + "tooltip": "Sets the variation of the initial rotation" + }, + "params": [ + { + "typeid": "{EA2C3E90-AFBE-44D4-A90D-FAAF79BAF93D}", + "details": { + "name": "Variation", + "tooltip": "The variation of the initial rotation in degrees clockwise measured from straight up" + } + } + ] + }, + { + "base": "SetIsRandomSeedFixed", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Set Is Random Seed Fixed" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Set Is Random Seed Fixed is invoked" + }, + "details": { + "name": "Set Is Random Seed Fixed", + "tooltip": "Sets whether the emitter uses a fixed random seed" + }, + "params": [ + { + "typeid": "{A0CA880C-AFE4-43CB-926C-59AC48496112}", + "details": { + "name": "Seed Fixed", + "tooltip": "Indicates whether the emitter uses a fixed random seed" + } + } + ] + }, + { + "base": "SetIsEmitterLifetimeInfinite", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Set Is Emitter Lifetime Infinite" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Set Is Emitter Lifetime Infinite is invoked" + }, + "details": { + "name": "Set Is Emitter Lifetime Infinite", + "tooltip": "Sets whether the emitter lifetime is infinite" + }, + "params": [ + { + "typeid": "{A0CA880C-AFE4-43CB-926C-59AC48496112}", + "details": { + "name": "Emitter Lifetime Infinite", + "tooltip": "Indicates whether the emitter lifetime is infinite" + } + } + ] + }, + { + "base": "GetEmitAngle", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Get Emit Angle" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Get Emit Angle is invoked" + }, + "details": { + "name": "Get Emit Angle", + "tooltip": "Gets the angle that particles are emitted along" + }, + "results": [ + { + "typeid": "{EA2C3E90-AFBE-44D4-A90D-FAAF79BAF93D}", + "details": { + "name": "float" + } + } + ] + }, + { + "base": "GetIsEmitterLifetimeInfinite", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Is Emitter Lifetime Infinite" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Is Emitter Lifetime Infinite is invoked" + }, + "details": { + "name": "Is Emitter Lifetime Infinite", + "tooltip": "Returns whether the emitter lifetime is infinite" + }, + "results": [ + { + "typeid": "{A0CA880C-AFE4-43CB-926C-59AC48496112}", + "details": { + "name": "bool" + } + } + ] + }, + { + "base": "SetIsHitParticleCountOnActivate", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Set Is Hit Particle Count On Activate" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Set Is Hit Particle Count On Activate is invoked" + }, + "details": { + "name": "Set Is Hit Particle Count On Activate", + "tooltip": "Sets whether the average amount of particles will be emitted and processed when the emitter starts emitting" + }, + "params": [ + { + "typeid": "{A0CA880C-AFE4-43CB-926C-59AC48496112}", + "details": { + "name": "Hit on Activate", + "tooltip": "Indicates whether the average amount of particles will be emitted and processed when the emitter starts emitting" + } + } + ] + }, + { + "base": "SetParticleMovementCoordinateType", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Set Particle Movement Coordinate Type" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Set Particle Movement Coordinate Type is invoked" + }, + "details": { + "name": "Set Particle Movement Coordinate Type", + "tooltip": "Sets the coordinate system used for the movement of the emitted particles" + }, + "params": [ + { + "typeid": "{72039442-EB38-4D42-A1AD-CB68F7E0EEF6}", + "details": { + "name": "Coordinate System", + "tooltip": "The coordinate system used for the movement of the emitted particles (0=Cartesian, 1=Polar)" + } + } + ] + }, + { + "base": "SetSpriteSheetCellEndIndex", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Set Sprite Sheet Cell End Index" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Set Sprite Sheet Cell End Index is invoked" + }, + "details": { + "name": "Set Sprite Sheet Cell End Index", + "tooltip": "Sets the end index of the sprite sheet cell range used for sprite sheet animation or for randomly choosing the index" + }, + "params": [ + { + "typeid": "{72039442-EB38-4D42-A1AD-CB68F7E0EEF6}", + "details": { + "name": "Cell End Index", + "tooltip": "The end index of the sprite sheet cell range" + } + } + ] + }, + { + "base": "SetParticleColor", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Set Particle Color" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Set Particle Color is invoked" + }, + "details": { + "name": "Set Particle Color", + "tooltip": "Sets the color of the emitted particles" + }, + "params": [ + { + "typeid": "{7894072A-9050-4F0F-901B-34B1A0D29417}", + "details": { + "name": "Color", + "tooltip": "The color of the emitted particles" + } + } + ] + }, + { + "base": "SetSpriteSheetCellIndex", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Set Sprite Sheet Cell Index" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Set Sprite Sheet Cell Index is invoked" + }, + "details": { + "name": "Set Sprite Sheet Cell Index", + "tooltip": "Sets the sprite sheet cell index to be used for emitted particles" + }, + "params": [ + { + "typeid": "{72039442-EB38-4D42-A1AD-CB68F7E0EEF6}", + "details": { + "name": "Cell Index", + "tooltip": "The sprite sheet cell index to be used for emitted particles" + } + } + ] + }, + { + "base": "SetIsParticleLifetimeInfinite", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Set Is Particle Lifetime Infinite" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Set Is Particle Lifetime Infinite is invoked" + }, + "details": { + "name": "Set Is Particle Lifetime Infinite", + "tooltip": "Sets whether the emitted particles have an infinite lifetime" + }, + "params": [ + { + "typeid": "{A0CA880C-AFE4-43CB-926C-59AC48496112}", + "details": { + "name": "Particle Lifetime Infinite", + "tooltip": "Indicates whether the emitted particles have an infinite lifetime" + } + } + ] + }, + { + "base": "SetParticleSpeed", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Set Particle Speed" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Set Particle Speed is invoked" + }, + "details": { + "name": "Set Particle Speed", + "tooltip": "Sets the initial particle speed (used only when the emitter controls the emit direction)" + }, + "params": [ + { + "typeid": "{EA2C3E90-AFBE-44D4-A90D-FAAF79BAF93D}", + "details": { + "name": "Speed", + "tooltip": "The initial particle speed" + } + } + ] + }, + { + "base": "GetIsHitParticleCountOnActivate", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Is Hit Particle Count On Activate" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Is Hit Particle Count On Activate is invoked" + }, + "details": { + "name": "Is Hit Particle Count On Activate", + "tooltip": "Returns whether the average amount of particles will be emitted and processed when the emitter starts emitting" + }, + "results": [ + { + "typeid": "{A0CA880C-AFE4-43CB-926C-59AC48496112}", + "details": { + "name": "bool" + } + } + ] + }, + { + "base": "GetParticleAlpha", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Get Particle Alpha" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Get Particle Alpha is invoked" + }, + "details": { + "name": "Get Particle Alpha", + "tooltip": "Gets the alpha of the emitted particles" + }, + "results": [ + { + "typeid": "{EA2C3E90-AFBE-44D4-A90D-FAAF79BAF93D}", + "details": { + "name": "float" + } + } + ] + }, + { + "base": "GetEmitAngleVariation", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Get Emit Angle Variation" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Get Emit Angle Variation is invoked" + }, + "details": { + "name": "Get Emit Angle Variation", + "tooltip": "Gets the variation in the emit angle" + }, + "results": [ + { + "typeid": "{EA2C3E90-AFBE-44D4-A90D-FAAF79BAF93D}", + "details": { + "name": "float" + } + } + ] + }, + { + "base": "SetEmitterShape", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Set Emitter Shape" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Set Emitter Shape is invoked" + }, + "details": { + "name": "Set Emitter Shape", + "tooltip": "Sets the emitter shape" + }, + "params": [ + { + "typeid": "{72039442-EB38-4D42-A1AD-CB68F7E0EEF6}", + "details": { + "name": "Shape", + "tooltip": "The emitter shape (0=Point, 1=Circle, 2=Quad)" + } + } + ] + }, + { + "base": "GetParticleSpeedVariation", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Get Particle Speed Variation" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Get Particle Speed Variation is invoked" + }, + "details": { + "name": "Get Particle Speed Variation", + "tooltip": "Gets the variation in initial particle speed (used only when the emitter controls the emit direction)" + }, + "results": [ + { + "typeid": "{EA2C3E90-AFBE-44D4-A90D-FAAF79BAF93D}", + "details": { + "name": "float" + } + } + ] + }, + { + "base": "SetParticleAcceleration", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Set Particle Acceleration" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Set Particle Acceleration is invoked" + }, + "details": { + "name": "Set Particle Acceleration", + "tooltip": "Sets the acceleration of the emitted particles" + }, + "params": [ + { + "typeid": "{3D80F623-C85C-4741-90D0-E4E66164E6BF}", + "details": { + "name": "Acceleration", + "tooltip": "The acceleration of the emitted particles" + } + } + ] + }, + { + "base": "SetParticleSpeedVariation", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Set Particle Speed Variation" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Set Particle Speed Variation is invoked" + }, + "details": { + "name": "Set Particle Speed Variation", + "tooltip": "Sets the variation in initial particle speed (used only when the emitter controls the emit direction)" + }, + "params": [ + { + "typeid": "{EA2C3E90-AFBE-44D4-A90D-FAAF79BAF93D}", + "details": { + "name": "Variation", + "tooltip": "The variation in initial particle speed" + } + } + ] + }, + { + "base": "GetIsParticleAspectRatioLocked", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Is Particle Aspect Ratio Locked" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Is Particle Aspect Ratio Locked is invoked" + }, + "details": { + "name": "Is Particle Aspect Ratio Locked", + "tooltip": "Returns whether the width and height of the emitted particles will be locked into the current aspect ratio" + }, + "results": [ + { + "typeid": "{A0CA880C-AFE4-43CB-926C-59AC48496112}", + "details": { + "name": "bool" + } + } + ] + }, + { + "base": "GetIsSpriteSheetAnimationLooped", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Is Sprite Sheet Animation Looped" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Is Sprite Sheet Animation Looped is invoked" + }, + "details": { + "name": "Is Sprite Sheet Animation Looped", + "tooltip": "Returns whether the sprite sheet cell animation is looped" + }, + "results": [ + { + "typeid": "{A0CA880C-AFE4-43CB-926C-59AC48496112}", + "details": { + "name": "bool" + } + } + ] + }, + { + "base": "GetParticleAcceleration", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Get Particle Acceleration" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Get Particle Acceleration is invoked" + }, + "details": { + "name": "Get Particle Acceleration", + "tooltip": "Gets the acceleration of the emitted particles" + }, + "results": [ + { + "typeid": "{3D80F623-C85C-4741-90D0-E4E66164E6BF}", + "details": { + "name": "Vector2" + } + } + ] + }, + { + "base": "SetIsSpriteSheetIndexRandom", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Set Is Sprite Sheet Index Random" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Set Is Sprite Sheet Index Random is invoked" + }, + "details": { + "name": "Set Is Sprite Sheet Index Random", + "tooltip": "Sets whether the initial sprite sheet index is randomly chosen" + }, + "params": [ + { + "typeid": "{A0CA880C-AFE4-43CB-926C-59AC48496112}", + "details": { + "name": "Index Random", + "tooltip": "Indicates whether the initial sprite sheet index is randomly chosen" + } + } + ] + }, + { + "base": "GetParticleMovementCoordinateType", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Get Particle Movement Coordinate Type" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Get Particle Movement Coordinate Type is invoked" + }, + "details": { + "name": "Get Particle Movement Coordinate Type", + "tooltip": "Gets the coordinate system used for the movement of the emitted particles" + }, + "results": [ + { + "typeid": "{72039442-EB38-4D42-A1AD-CB68F7E0EEF6}", + "details": { + "name": "int" + } + } + ] + }, + { + "base": "GetParticleInitialVelocity", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Get Particle Initial Velocity" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Get Particle Initial Velocity is invoked" + }, + "details": { + "name": "Get Particle Initial Velocity", + "tooltip": "Gets the initial velocity of the emitted particles (used only when the emitter doesn’t control the emit direction)" + }, + "results": [ + { + "typeid": "{3D80F623-C85C-4741-90D0-E4E66164E6BF}", + "details": { + "name": "Vector2" + } + } + ] + }, + { + "base": "SetParticleWidth", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Set Particle Width" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Set Particle Width is invoked" + }, + "details": { + "name": "Set Particle Width", + "tooltip": "Sets the width of the emitted particles" + }, + "params": [ + { + "typeid": "{EA2C3E90-AFBE-44D4-A90D-FAAF79BAF93D}", + "details": { + "name": "Width", + "tooltip": "The width of the emitted particles" + } + } + ] + }, + { + "base": "SetParticleSize", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Set Particle Size" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Set Particle Size is invoked" + }, + "details": { + "name": "Set Particle Size", + "tooltip": "Sets the size of the emitted particles" + }, + "params": [ + { + "typeid": "{3D80F623-C85C-4741-90D0-E4E66164E6BF}", + "details": { + "name": "Size", + "tooltip": "The size of the emitted particles" + } + } + ] + }, + { + "base": "GetEmitterLifetime", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Get Emitter Lifetime" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Get Emitter Lifetime is invoked" + }, + "details": { + "name": "Get Emitter Lifetime", + "tooltip": "Gets the emitter lifetime. When the lifetime is reached the emitter will stop emitting" + }, + "results": [ + { + "typeid": "{EA2C3E90-AFBE-44D4-A90D-FAAF79BAF93D}", + "details": { + "name": "float" + } + } + ] + }, + { + "base": "GetParticleSpeed", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Get Particle Speed" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Get Particle Speed is invoked" + }, + "details": { + "name": "Get Particle Speed", + "tooltip": "Gets the initial particle speed (used only when the emitter controls the emit direction)" + }, + "results": [ + { + "typeid": "{EA2C3E90-AFBE-44D4-A90D-FAAF79BAF93D}", + "details": { + "name": "float" + } + } + ] + }, + { + "base": "SetParticleRotationSpeedVariation", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Set Particle Rotation Speed Variation" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Set Particle Rotation Speed Variation is invoked" + }, + "details": { + "name": "Set Particle Rotation Speed Variation", + "tooltip": "Sets the variation in rotation speed of the emitted particles" + }, + "params": [ + { + "typeid": "{EA2C3E90-AFBE-44D4-A90D-FAAF79BAF93D}", + "details": { + "name": "Variation", + "tooltip": "The variation in rotation speed of the emitted particles in degrees clockwise per second" + } + } + ] + }, + { + "base": "GetParticleHeight", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Get Particle Height" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Get Particle Height is invoked" + }, + "details": { + "name": "Get Particle Height", + "tooltip": "Gets the height of the emitted particles" + }, + "results": [ + { + "typeid": "{EA2C3E90-AFBE-44D4-A90D-FAAF79BAF93D}", + "details": { + "name": "float" + } + } + ] + }, + { + "base": "SetParticleHeightVariation", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Set Particle Height Variation" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Set Particle Height Variation is invoked" + }, + "details": { + "name": "Set Particle Height Variation", + "tooltip": "Sets the variation in height of the emitted particles" + }, + "params": [ + { + "typeid": "{EA2C3E90-AFBE-44D4-A90D-FAAF79BAF93D}", + "details": { + "name": "Variation", + "tooltip": "The variation in height of the emitted particles" + } + } + ] + }, + { + "base": "SetParticleInitialRotation", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Set Particle Initial Rotation" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Set Particle Initial Rotation is invoked" + }, + "details": { + "name": "Set Particle Initial Rotation", + "tooltip": "Sets the initial rotation" + }, + "params": [ + { + "typeid": "{EA2C3E90-AFBE-44D4-A90D-FAAF79BAF93D}", + "details": { + "name": "Rotation", + "tooltip": "The initial rotation in degrees clockwise measured from straight up" + } + } + ] + }, + { + "base": "GetParticlePivot", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Get Particle Pivot" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Get Particle Pivot is invoked" + }, + "details": { + "name": "Get Particle Pivot", + "tooltip": "Gets the pivot for the particles" + }, + "results": [ + { + "typeid": "{3D80F623-C85C-4741-90D0-E4E66164E6BF}", + "details": { + "name": "Vector2" + } + } + ] + }, + { + "base": "GetParticleWidthVariation", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Get Particle Width Variation" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Get Particle Width Variation is invoked" + }, + "details": { + "name": "Get Particle Width Variation", + "tooltip": "Gets the variation in width of the emitted particles" + }, + "results": [ + { + "typeid": "{EA2C3E90-AFBE-44D4-A90D-FAAF79BAF93D}", + "details": { + "name": "float" + } + } + ] + }, + { + "base": "GetIsEmitOnActivate", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Is Emit On Activate" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Is Emit On Activate is invoked" + }, + "details": { + "name": "Is Emit On Activate", + "tooltip": "Returns whether the particle emitter starts emitting when the component is activated" + }, + "results": [ + { + "typeid": "{A0CA880C-AFE4-43CB-926C-59AC48496112}", + "details": { + "name": "bool" + } + } + ] + }, + { + "base": "SetIsParticlePositionRelativeToEmitter", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Set Is Particle Position Relative To Emitter" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Set Is Particle Position Relative To Emitter is invoked" + }, + "details": { + "name": "Set Is Particle Position Relative To Emitter", + "tooltip": "Sets whether the emitted particles move relative to the emitter" + }, + "params": [ + { + "typeid": "{A0CA880C-AFE4-43CB-926C-59AC48496112}", + "details": { + "name": "Relative to Emitter", + "tooltip": "Indicates whether the emitted particles move relative to the emitter" + } + } + ] + }, + { + "base": "SetParticleInitialDirectionType", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Set Particle Initial Direction Type" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Set Particle Initial Direction Type is invoked" + }, + "details": { + "name": "Set Particle Initial Direction Type", + "tooltip": "Sets how the initial direction of the emitted particles are calculated" + }, + "params": [ + { + "typeid": "{72039442-EB38-4D42-A1AD-CB68F7E0EEF6}", + "details": { + "name": "Initial Direction Type", + "tooltip": "Indicates how the initial direction of the emitted particles are calculated (0=Relative to Emit Angle, 1=Relative to Emitter Center)" + } + } + ] + }, + { + "base": "GetParticleHeightVariation", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Get Particle Height Variation" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Get Particle Height Variation is invoked" + }, + "details": { + "name": "Get Particle Height Variation", + "tooltip": "Gets the variation in height of the emitted particles" + }, + "results": [ + { + "typeid": "{EA2C3E90-AFBE-44D4-A90D-FAAF79BAF93D}", + "details": { + "name": "float" + } + } + ] + }, + { + "base": "SetParticleColorBrightnessVariation", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Set Particle Color Brightness Variation" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Set Particle Color Brightness Variation is invoked" + }, + "details": { + "name": "Set Particle Color Brightness Variation", + "tooltip": "Sets the variation in color brightness of the emitted particles" + }, + "params": [ + { + "typeid": "{EA2C3E90-AFBE-44D4-A90D-FAAF79BAF93D}", + "details": { + "name": "Variation", + "tooltip": "The variation in color brightness of the emitted particles [0-1]" + } + } + ] + } + ] + } + ] +} \ No newline at end of file diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/EBus/Senders/UiRadioButtonBus.names b/Gems/ScriptCanvas/Assets/TranslationAssets/EBus/Senders/UiRadioButtonBus.names new file mode 100644 index 0000000000..891d2eb945 --- /dev/null +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/EBus/Senders/UiRadioButtonBus.names @@ -0,0 +1,299 @@ +{ + "entries": [ + { + "base": "UiRadioButtonBus", + "context": "EBusSender", + "variant": "", + "details": { + "name": "UI Radio Button", + "category": "UI" + }, + "methods": [ + { + "base": "SetChangedActionName", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Set Changed Action Name" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Set Changed Action Name is invoked" + }, + "details": { + "name": "Set Changed Action Name", + "tooltip": "Sets the name of the action triggered when the radio button state changes" + }, + "params": [ + { + "typeid": "{03AAAB3F-5C47-5A66-9EBC-D5FA4DB353C9}", + "details": { + "name": "Name", + "tooltip": "The name of the action triggered when the radio button state changes" + } + } + ] + }, + { + "base": "GetChangedActionName", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Get Changed Action Name" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Get Changed Action Name is invoked" + }, + "details": { + "name": "Get Changed Action Name", + "tooltip": "Gets the name of the action triggered when the radio button state changes" + }, + "results": [ + { + "typeid": "{03AAAB3F-5C47-5A66-9EBC-D5FA4DB353C9}", + "details": { + "name": "AZStd::string" + } + } + ] + }, + { + "base": "SetCheckedEntity", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Set Checked Entity" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Set Checked Entity is invoked" + }, + "details": { + "name": "Set Checked Entity", + "tooltip": "Sets the child element to show when the radio button is checked" + }, + "params": [ + { + "typeid": "{6383F1D3-BB27-4E6B-A49A-6409B2059EAA}", + "details": { + "name": "Checked EntityID", + "tooltip": "The child element to show when the radio button is checked" + } + } + ] + }, + { + "base": "SetUncheckedEntity", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Set Unchecked Entity" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Set Unchecked Entity is invoked" + }, + "details": { + "name": "Set Unchecked Entity", + "tooltip": "Sets the child element to show when the radio button is unchecked" + }, + "params": [ + { + "typeid": "{6383F1D3-BB27-4E6B-A49A-6409B2059EAA}", + "details": { + "name": "Unchecked EntityID", + "tooltip": "The child element to show when the radio button is unchecked" + } + } + ] + }, + { + "base": "SetTurnOnActionName", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Set Turn On Action Name" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Set Turn On Action Name is invoked" + }, + "details": { + "name": "Set Turn On Action Name", + "tooltip": "Sets the name of the action triggered when the radio button is checked" + }, + "params": [ + { + "typeid": "{03AAAB3F-5C47-5A66-9EBC-D5FA4DB353C9}", + "details": { + "name": "Name", + "tooltip": "The name of the action triggered when the radio button is checked" + } + } + ] + }, + { + "base": "GetTurnOffActionName", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Get Turn Off Action Name" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Get Turn Off Action Name is invoked" + }, + "details": { + "name": "Get Turn Off Action Name", + "tooltip": "Gets the name of the action triggered when the radio button is unchecked" + }, + "results": [ + { + "typeid": "{03AAAB3F-5C47-5A66-9EBC-D5FA4DB353C9}", + "details": { + "name": "AZStd::string" + } + } + ] + }, + { + "base": "GetGroup", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Get Group" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Get Group is invoked" + }, + "details": { + "name": "Get Group", + "tooltip": "Gets the group of the radio button" + }, + "results": [ + { + "typeid": "{6383F1D3-BB27-4E6B-A49A-6409B2059EAA}", + "details": { + "name": "EntityId", + "tooltip": "Entity Unique Id" + } + } + ] + }, + { + "base": "GetState", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Get State" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Get State is invoked" + }, + "details": { + "name": "Get State", + "tooltip": "Returns whether the radio button is checked" + }, + "results": [ + { + "typeid": "{A0CA880C-AFE4-43CB-926C-59AC48496112}", + "details": { + "name": "bool" + } + } + ] + }, + { + "base": "GetCheckedEntity", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Get Checked Entity" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Get Checked Entity is invoked" + }, + "details": { + "name": "Get Checked Entity", + "tooltip": "Gets the child element that is shown when the radio button is checked" + }, + "results": [ + { + "typeid": "{6383F1D3-BB27-4E6B-A49A-6409B2059EAA}", + "details": { + "name": "EntityId", + "tooltip": "Entity Unique Id" + } + } + ] + }, + { + "base": "GetUncheckedEntity", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Get Unchecked Entity" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Get Unchecked Entity is invoked" + }, + "details": { + "name": "Get Unchecked Entity", + "tooltip": "Gets the child element that is shown when the radio button is unchecked" + }, + "results": [ + { + "typeid": "{6383F1D3-BB27-4E6B-A49A-6409B2059EAA}", + "details": { + "name": "EntityId", + "tooltip": "Entity Unique Id" + } + } + ] + }, + { + "base": "GetTurnOnActionName", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Get Turn On Action Name" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Get Turn On Action Name is invoked" + }, + "details": { + "name": "Get Turn On Action Name", + "tooltip": "Gets the name of the action triggered when the radio button is checked" + }, + "results": [ + { + "typeid": "{03AAAB3F-5C47-5A66-9EBC-D5FA4DB353C9}", + "details": { + "name": "AZStd::string" + } + } + ] + }, + { + "base": "SetTurnOffActionName", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Set Turn Off Action Name" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Set Turn Off Action Name is invoked" + }, + "details": { + "name": "Set Turn Off Action Name", + "tooltip": "Sets the name of the action triggered when the radio button is unchecked" + }, + "params": [ + { + "typeid": "{03AAAB3F-5C47-5A66-9EBC-D5FA4DB353C9}", + "details": { + "name": "Name", + "tooltip": "The name of the action triggered when the radio button is unchecked" + } + } + ] + } + ] + } + ] +} \ No newline at end of file diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/EBus/Senders/UiRadioButtonGroupBus.names b/Gems/ScriptCanvas/Assets/TranslationAssets/EBus/Senders/UiRadioButtonGroupBus.names new file mode 100644 index 0000000000..0eec1b3599 --- /dev/null +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/EBus/Senders/UiRadioButtonGroupBus.names @@ -0,0 +1,245 @@ +{ + "entries": [ + { + "base": "UiRadioButtonGroupBus", + "context": "EBusSender", + "variant": "", + "details": { + "name": "UI Radio Button Group", + "category": "UI" + }, + "methods": [ + { + "base": "AddRadioButton", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Add Radio Button" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Add Radio Button is invoked" + }, + "details": { + "name": "Add Radio Button", + "tooltip": "Adds a new radio button to the group" + }, + "params": [ + { + "typeid": "{6383F1D3-BB27-4E6B-A49A-6409B2059EAA}", + "details": { + "name": "Radio Button EntityID", + "tooltip": "A radio button to add to the group" + } + } + ] + }, + { + "base": "SetChangedActionName", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Set Changed Action Name" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Set Changed Action Name is invoked" + }, + "details": { + "name": "Set Changed Action Name", + "tooltip": "Sets the name of the action triggered when the radio button group state changes" + }, + "params": [ + { + "typeid": "{03AAAB3F-5C47-5A66-9EBC-D5FA4DB353C9}", + "details": { + "name": "Name", + "tooltip": "The name of the action triggered when the radio button group state changes" + } + } + ] + }, + { + "base": "SetAllowUncheck", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Set Allow Uncheck" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Set Allow Uncheck is invoked" + }, + "details": { + "name": "Set Allow Uncheck", + "tooltip": "Sets whether to allow clicking on the selected radio button to uncheck it" + }, + "params": [ + { + "typeid": "{A0CA880C-AFE4-43CB-926C-59AC48496112}", + "details": { + "name": "Allow Uncheck", + "tooltip": "Indicates whether to allow clicking on the selected radio button to uncheck it" + } + } + ] + }, + { + "base": "ContainsRadioButton", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Contains Radio Button" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Contains Radio Button is invoked" + }, + "details": { + "name": "Contains Radio Button", + "tooltip": "Returns whether a radio button is in the group" + }, + "params": [ + { + "typeid": "{6383F1D3-BB27-4E6B-A49A-6409B2059EAA}", + "details": { + "name": "Radio Button EntityID", + "tooltip": "The radio button" + } + } + ], + "results": [ + { + "typeid": "{A0CA880C-AFE4-43CB-926C-59AC48496112}", + "details": { + "name": "bool", + "tooltip": "The radio button" + } + } + ] + }, + { + "base": "GetChangedActionName", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Get Changed Action Name" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Get Changed Action Name is invoked" + }, + "details": { + "name": "Get Changed Action Name", + "tooltip": "Gets the name of the action triggered when the radio button group state changes" + }, + "results": [ + { + "typeid": "{03AAAB3F-5C47-5A66-9EBC-D5FA4DB353C9}", + "details": { + "name": "AZStd::string" + } + } + ] + }, + { + "base": "GetAllowUncheck", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Get Allow Uncheck" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Get Allow Uncheck is invoked" + }, + "details": { + "name": "Get Allow Uncheck", + "tooltip": "Returns whether to allow clicking on the selected radio button to uncheck it" + }, + "results": [ + { + "typeid": "{A0CA880C-AFE4-43CB-926C-59AC48496112}", + "details": { + "name": "bool" + } + } + ] + }, + { + "base": "RemoveRadioButton", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Remove Radio Button" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Remove Radio Button is invoked" + }, + "details": { + "name": "Remove Radio Button", + "tooltip": "Removes a radio button from the group" + }, + "params": [ + { + "typeid": "{6383F1D3-BB27-4E6B-A49A-6409B2059EAA}", + "details": { + "name": "Radio Button EntityID", + "tooltip": "The radio button to remove from the group" + } + } + ] + }, + { + "base": "SetState", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Set State" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Set State is invoked" + }, + "details": { + "name": "Set State", + "tooltip": "Sets the checked/unchecked state of a radio button" + }, + "params": [ + { + "typeid": "{6383F1D3-BB27-4E6B-A49A-6409B2059EAA}", + "details": { + "name": "Radio Button EntityID", + "tooltip": "The radio button change the checked/unchecked state on" + } + }, + { + "typeid": "{A0CA880C-AFE4-43CB-926C-59AC48496112}", + "details": { + "name": "Checked", + "tooltip": "Indicates whether to set the radio button state to checked" + } + } + ] + }, + { + "base": "GetState", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Get State" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Get State is invoked" + }, + "details": { + "name": "Get State", + "tooltip": "Gets the radio button that is checked" + }, + "results": [ + { + "typeid": "{6383F1D3-BB27-4E6B-A49A-6409B2059EAA}", + "details": { + "name": "EntityId", + "tooltip": "Entity Unique Id" + } + } + ] + } + ] + } + ] +} \ No newline at end of file diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/EBus/Senders/UiScrollBarBus.names b/Gems/ScriptCanvas/Assets/TranslationAssets/EBus/Senders/UiScrollBarBus.names new file mode 100644 index 0000000000..26a03d0a85 --- /dev/null +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/EBus/Senders/UiScrollBarBus.names @@ -0,0 +1,289 @@ +{ + "entries": [ + { + "base": "UiScrollBarBus", + "context": "EBusSender", + "variant": "", + "details": { + "name": "UI Scroll Bar", + "category": "UI" + }, + "methods": [ + { + "base": "GetAutoFadeSpeed", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke GetAutoFadeSpeed" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after GetAutoFadeSpeed is invoked" + }, + "details": { + "name": "GetAutoFadeSpeed" + }, + "results": [ + { + "typeid": "{EA2C3E90-AFBE-44D4-A90D-FAAF79BAF93D}", + "details": { + "name": "float" + } + } + ] + }, + { + "base": "IsAutoFadeEnabled", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke IsAutoFadeEnabled" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after IsAutoFadeEnabled is invoked" + }, + "details": { + "name": "IsAutoFadeEnabled" + }, + "results": [ + { + "typeid": "{A0CA880C-AFE4-43CB-926C-59AC48496112}", + "details": { + "name": "bool" + } + } + ] + }, + { + "base": "SetAutoFadeSpeed", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke SetAutoFadeSpeed" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after SetAutoFadeSpeed is invoked" + }, + "details": { + "name": "SetAutoFadeSpeed" + }, + "params": [ + { + "typeid": "{EA2C3E90-AFBE-44D4-A90D-FAAF79BAF93D}", + "details": { + "name": "float" + } + } + ] + }, + { + "base": "SetHandleEntity", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Set Handle Entity" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Set Handle Entity is invoked" + }, + "details": { + "name": "Set Handle Entity", + "tooltip": "Gets the handle element" + }, + "params": [ + { + "typeid": "{6383F1D3-BB27-4E6B-A49A-6409B2059EAA}", + "details": { + "name": "Handle EntityID", + "tooltip": "The handle element" + } + } + ] + }, + { + "base": "GetHandleEntity", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Get Handle Entity" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Get Handle Entity is invoked" + }, + "details": { + "name": "Get Handle Entity", + "tooltip": "Gets the handle element" + }, + "results": [ + { + "typeid": "{6383F1D3-BB27-4E6B-A49A-6409B2059EAA}", + "details": { + "name": "EntityId", + "tooltip": "Entity Unique Id" + } + } + ] + }, + { + "base": "GetAutoFadeDelay", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke GetAutoFadeDelay" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after GetAutoFadeDelay is invoked" + }, + "details": { + "name": "GetAutoFadeDelay" + }, + "results": [ + { + "typeid": "{EA2C3E90-AFBE-44D4-A90D-FAAF79BAF93D}", + "details": { + "name": "float" + } + } + ] + }, + { + "base": "GetMinHandlePixelSize", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Get Min Handle Pixel Size" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Get Min Handle Pixel Size is invoked" + }, + "details": { + "name": "Get Min Handle Pixel Size", + "tooltip": "Gets the minimum size of the handle" + }, + "results": [ + { + "typeid": "{EA2C3E90-AFBE-44D4-A90D-FAAF79BAF93D}", + "details": { + "name": "float" + } + } + ] + }, + { + "base": "SetAutoFadeEnabled", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke SetAutoFadeEnabled" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after SetAutoFadeEnabled is invoked" + }, + "details": { + "name": "SetAutoFadeEnabled" + }, + "params": [ + { + "typeid": "{A0CA880C-AFE4-43CB-926C-59AC48496112}", + "details": { + "name": "bool" + } + } + ] + }, + { + "base": "SetHandleSize", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Set Handle Size" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Set Handle Size is invoked" + }, + "details": { + "name": "Set Handle Size", + "tooltip": "Sets the size of the handle relative to the scroll bar" + }, + "params": [ + { + "typeid": "{EA2C3E90-AFBE-44D4-A90D-FAAF79BAF93D}", + "details": { + "name": "Handle Size", + "tooltip": "The size of the handle relative to the scroll bar [0-1]" + } + } + ] + }, + { + "base": "SetMinHandlePixelSize", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Set Min Handle Pixel Size" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Set Min Handle Pixel Size is invoked" + }, + "details": { + "name": "Set Min Handle Pixel Size", + "tooltip": "Sets the minimum size of the handle" + }, + "params": [ + { + "typeid": "{EA2C3E90-AFBE-44D4-A90D-FAAF79BAF93D}", + "details": { + "name": "Min Handle Size", + "tooltip": "The minimum size of the handle in pixels" + } + } + ] + }, + { + "base": "GetHandleSize", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Get Handle Size" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Get Handle Size is invoked" + }, + "details": { + "name": "Get Handle Size", + "tooltip": "Gets the size of the handle relative to the scroll bar" + }, + "results": [ + { + "typeid": "{EA2C3E90-AFBE-44D4-A90D-FAAF79BAF93D}", + "details": { + "name": "float" + } + } + ] + }, + { + "base": "SetAutoFadeDelay", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke SetAutoFadeDelay" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after SetAutoFadeDelay is invoked" + }, + "details": { + "name": "SetAutoFadeDelay" + }, + "params": [ + { + "typeid": "{EA2C3E90-AFBE-44D4-A90D-FAAF79BAF93D}", + "details": { + "name": "float" + } + } + ] + } + ] + } + ] +} \ No newline at end of file diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/EBus/Senders/UiScrollBoxBus.names b/Gems/ScriptCanvas/Assets/TranslationAssets/EBus/Senders/UiScrollBoxBus.names new file mode 100644 index 0000000000..d8dee354dd --- /dev/null +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/EBus/Senders/UiScrollBoxBus.names @@ -0,0 +1,722 @@ +{ + "entries": [ + { + "base": "UiScrollBoxBus", + "context": "EBusSender", + "variant": "", + "details": { + "name": "UI Scroll Box", + "category": "UI" + }, + "methods": [ + { + "base": "FindClosestContentChildElement", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Find Closest Content Child Element" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Find Closest Content Child Element is invoked" + }, + "details": { + "name": "Find Closest Content Child Element", + "tooltip": "Finds the child of the content element that is closest to the content anchors at the current scroll offset (the currently selected child)" + }, + "results": [ + { + "typeid": "{6383F1D3-BB27-4E6B-A49A-6409B2059EAA}", + "details": { + "name": "EntityId", + "tooltip": "Entity Unique Id" + } + } + ] + }, + { + "base": "GetHorizontalScrollBarVisibility", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Get Horizontal Scroll Bar Visibility" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Get Horizontal Scroll Bar Visibility is invoked" + }, + "details": { + "name": "Get Horizontal Scroll Bar Visibility", + "tooltip": "Gets the visibility behavior for the horizontal scroll bar of the scroll box" + }, + "results": [ + { + "typeid": "{72039442-EB38-4D42-A1AD-CB68F7E0EEF6}", + "details": { + "name": "int" + } + } + ] + }, + { + "base": "GetVerticalScrollBarEntity", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Get Vertical Scroll Bar Entity" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Get Vertical Scroll Bar Entity is invoked" + }, + "details": { + "name": "Get Vertical Scroll Bar Entity", + "tooltip": "Gets the vertical scroll bar element for the scroll box" + }, + "results": [ + { + "typeid": "{6383F1D3-BB27-4E6B-A49A-6409B2059EAA}", + "details": { + "name": "EntityId", + "tooltip": "Entity Unique Id" + } + } + ] + }, + { + "base": "SetHorizontalScrollBarVisibility", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Set Horizontal Scroll Bar Visibility" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Set Horizontal Scroll Bar Visibility is invoked" + }, + "details": { + "name": "Set Horizontal Scroll Bar Visibility", + "tooltip": "Sets the visibility behavior for the horizontal scroll bar of the scroll box" + }, + "params": [ + { + "typeid": "{72039442-EB38-4D42-A1AD-CB68F7E0EEF6}", + "details": { + "name": "Visibility", + "tooltip": "The visibility behavior (0=Always Show, 1=Auto Hide, 2=Auto Hide and Resize Viewport)" + } + } + ] + }, + { + "base": "SetScrollOffsetChangingActionName", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Set Scroll Offset Changing Action Name" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Set Scroll Offset Changing Action Name is invoked" + }, + "details": { + "name": "Set Scroll Offset Changing Action Name", + "tooltip": "Sets the name of the action triggered while the scroll box is being dragged" + }, + "params": [ + { + "typeid": "{03AAAB3F-5C47-5A66-9EBC-D5FA4DB353C9}", + "details": { + "name": "Name", + "tooltip": "The name of the action triggered while the scroll box is being dragged" + } + } + ] + }, + { + "base": "GetScrollOffsetChangingActionName", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Get Scroll Offset Changing Action Name" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Get Scroll Offset Changing Action Name is invoked" + }, + "details": { + "name": "Get Scroll Offset Changing Action Name", + "tooltip": "Gets the name of the action triggered while the scroll box is being dragged" + }, + "results": [ + { + "typeid": "{03AAAB3F-5C47-5A66-9EBC-D5FA4DB353C9}", + "details": { + "name": "AZStd::string" + } + } + ] + }, + { + "base": "GetHorizontalScrollBarEntity", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Get Horizontal Scroll Bar Entity" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Get Horizontal Scroll Bar Entity is invoked" + }, + "details": { + "name": "Get Horizontal Scroll Bar Entity", + "tooltip": "Gets the horizontal scroll bar element for the scroll box" + }, + "results": [ + { + "typeid": "{6383F1D3-BB27-4E6B-A49A-6409B2059EAA}", + "details": { + "name": "EntityId", + "tooltip": "Entity Unique Id" + } + } + ] + }, + { + "base": "HasHorizontalContentToScroll", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Has Horizontal Content To Scroll" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Has Horizontal Content To Scroll is invoked" + }, + "details": { + "name": "Has Horizontal Content To Scroll", + "tooltip": "Returns whether there is content to scroll horizontally" + }, + "results": [ + { + "typeid": "{A0CA880C-AFE4-43CB-926C-59AC48496112}", + "details": { + "name": "bool" + } + } + ] + }, + { + "base": "SetContentEntity", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Set Content Entity" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Set Content Entity is invoked" + }, + "details": { + "name": "Set Content Entity", + "tooltip": "Sets the content element for the scroll box" + }, + "params": [ + { + "typeid": "{6383F1D3-BB27-4E6B-A49A-6409B2059EAA}", + "details": { + "name": "Content EntityID", + "tooltip": "The content element for the scroll box" + } + } + ] + }, + { + "base": "GetIsScrollingConstrained", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Is Scrolling Constrained" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Is Scrolling Constrained is invoked" + }, + "details": { + "name": "Is Scrolling Constrained", + "tooltip": "Returns whether the scroll box restricts scrolling to the content area" + }, + "results": [ + { + "typeid": "{A0CA880C-AFE4-43CB-926C-59AC48496112}", + "details": { + "name": "bool" + } + } + ] + }, + { + "base": "HasVerticalContentToScroll", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Has Vertical Content To Scroll" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Has Vertical Content To Scroll is invoked" + }, + "details": { + "name": "Has Vertical Content To Scroll", + "tooltip": "Returns whether there is content to scroll vertically" + }, + "results": [ + { + "typeid": "{A0CA880C-AFE4-43CB-926C-59AC48496112}", + "details": { + "name": "bool" + } + } + ] + }, + { + "base": "GetIsVerticalScrollingEnabled", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Is Vertical Scrolling Enabled" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Is Vertical Scrolling Enabled is invoked" + }, + "details": { + "name": "Is Vertical Scrolling Enabled", + "tooltip": "Returns whether the scroll box allows vertical scrolling" + }, + "results": [ + { + "typeid": "{A0CA880C-AFE4-43CB-926C-59AC48496112}", + "details": { + "name": "bool" + } + } + ] + }, + { + "base": "GetVerticalScrollBarVisibility", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Get Vertical Scroll Bar Visibility" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Get Vertical Scroll Bar Visibility is invoked" + }, + "details": { + "name": "Get Vertical Scroll Bar Visibility", + "tooltip": "Gets the visibility behavior for the vertical scroll bar of the scroll box" + }, + "results": [ + { + "typeid": "{72039442-EB38-4D42-A1AD-CB68F7E0EEF6}", + "details": { + "name": "int" + } + } + ] + }, + { + "base": "SetIsHorizontalScrollingEnabled", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Set Is Horizontal Scrolling Enabled" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Set Is Horizontal Scrolling Enabled is invoked" + }, + "details": { + "name": "Set Is Horizontal Scrolling Enabled", + "tooltip": "Sets whether the scroll box allows horizontal scrolling" + }, + "params": [ + { + "typeid": "{A0CA880C-AFE4-43CB-926C-59AC48496112}", + "details": { + "name": "Horizontal Scrolling", + "tooltip": "Indicates whether the scroll box allows horizontal scrolling" + } + } + ] + }, + { + "base": "GetNormalizedScrollValue", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Get Normalized Scroll Value" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Get Normalized Scroll Value is invoked" + }, + "details": { + "name": "Get Normalized Scroll Value", + "tooltip": "Returns the scroll value normalized to [0-1]" + }, + "results": [ + { + "typeid": "{3D80F623-C85C-4741-90D0-E4E66164E6BF}", + "details": { + "name": "Vector2" + } + } + ] + }, + { + "base": "SetScrollOffset", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Set Scroll Offset" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Set Scroll Offset is invoked" + }, + "details": { + "name": "Set Scroll Offset", + "tooltip": "Sets the scroll offset of the scroll box" + }, + "params": [ + { + "typeid": "{3D80F623-C85C-4741-90D0-E4E66164E6BF}", + "details": { + "name": "Scroll Offset", + "tooltip": "The scroll offset of the scroll box" + } + } + ] + }, + { + "base": "SetHorizontalScrollBarEntity", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Set Horizontal Scroll Bar Entity" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Set Horizontal Scroll Bar Entity is invoked" + }, + "details": { + "name": "Set Horizontal Scroll Bar Entity", + "tooltip": "Sets the horizontal scroll bar element for the scroll box" + }, + "params": [ + { + "typeid": "{6383F1D3-BB27-4E6B-A49A-6409B2059EAA}", + "details": { + "name": "Horizontal Scroll Bar EntityID", + "tooltip": "The horizontal scroll bar element for the scroll box" + } + } + ] + }, + { + "base": "GetScrollOffset", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Get Scroll Offset" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Get Scroll Offset is invoked" + }, + "details": { + "name": "Get Scroll Offset", + "tooltip": "Gets the scroll offset of the scroll box. The scroll offset is the offset from the content element's anchor point to the content element's pivot" + }, + "results": [ + { + "typeid": "{3D80F623-C85C-4741-90D0-E4E66164E6BF}", + "details": { + "name": "Vector2" + } + } + ] + }, + { + "base": "GetScrollOffsetChangedActionName", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Get Scroll Offset Changed Action Name" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Get Scroll Offset Changed Action Name is invoked" + }, + "details": { + "name": "Get Scroll Offset Changed Action Name", + "tooltip": "Gets the name of the action triggered when the scroll box drag is completed" + }, + "results": [ + { + "typeid": "{03AAAB3F-5C47-5A66-9EBC-D5FA4DB353C9}", + "details": { + "name": "AZStd::string" + } + } + ] + }, + { + "base": "SetVerticalScrollBarVisibility", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Set Vertical Scroll Bar Visibility" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Set Vertical Scroll Bar Visibility is invoked" + }, + "details": { + "name": "Set Vertical Scroll Bar Visibility", + "tooltip": "Sets the visibility behavior for the vertical scroll bar of the scroll box" + }, + "params": [ + { + "typeid": "{72039442-EB38-4D42-A1AD-CB68F7E0EEF6}", + "details": { + "name": "Visibility", + "tooltip": "The visibility behavior (0=Always Show, 1=Auto Hide, 2=Auto Hide and Resize Viewport)" + } + } + ] + }, + { + "base": "GetIsHorizontalScrollingEnabled", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Is Horizontal Scrolling Enabled" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Is Horizontal Scrolling Enabled is invoked" + }, + "details": { + "name": "Is Horizontal Scrolling Enabled", + "tooltip": "Returns whether the scroll box allows horizontal scrolling" + }, + "results": [ + { + "typeid": "{A0CA880C-AFE4-43CB-926C-59AC48496112}", + "details": { + "name": "bool" + } + } + ] + }, + { + "base": "SetIsScrollingConstrained", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Set Is Scrolling Constrained" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Set Is Scrolling Constrained is invoked" + }, + "details": { + "name": "Set Is Scrolling Constrained", + "tooltip": "Sets whether the scroll box restricts scrolling to the content area" + }, + "params": [ + { + "typeid": "{A0CA880C-AFE4-43CB-926C-59AC48496112}", + "details": { + "name": "Constrained", + "tooltip": "Indicates whether the scroll box restricts scrolling to the content area" + } + } + ] + }, + { + "base": "SetSnapGrid", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Set Snap Grid" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Set Snap Grid is invoked" + }, + "details": { + "name": "Set Snap Grid", + "tooltip": "Sets the snapping grid of the scroll box. The scroll offset will be snapped to multiples of these values" + }, + "params": [ + { + "typeid": "{3D80F623-C85C-4741-90D0-E4E66164E6BF}", + "details": { + "name": "Grid Spacing", + "tooltip": "The grid spacing. The scroll offset will be snapped to multiples of these values" + } + } + ] + }, + { + "base": "SetIsVerticalScrollingEnabled", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Set Is Vertical Scrolling Enabled" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Set Is Vertical Scrolling Enabled is invoked" + }, + "details": { + "name": "Set Is Vertical Scrolling Enabled", + "tooltip": "Sets whether the scroll box allows vertical scrolling" + }, + "params": [ + { + "typeid": "{A0CA880C-AFE4-43CB-926C-59AC48496112}", + "details": { + "name": "Vertical Scrolling", + "tooltip": "Indicates whether the scroll box allows vertical scrolling" + } + } + ] + }, + { + "base": "GetSnapGrid", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Get Snap Grid" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Get Snap Grid is invoked" + }, + "details": { + "name": "Get Snap Grid", + "tooltip": "Gets the snapping grid of the scroll box. The scroll offset will be snapped to multiples of these values" + }, + "results": [ + { + "typeid": "{3D80F623-C85C-4741-90D0-E4E66164E6BF}", + "details": { + "name": "Vector2" + } + } + ] + }, + { + "base": "GetSnapMode", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Get Snap Mode" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Get Snap Mode is invoked" + }, + "details": { + "name": "Get Snap Mode", + "tooltip": "Gets the snap mode for the scroll box" + }, + "results": [ + { + "typeid": "{72039442-EB38-4D42-A1AD-CB68F7E0EEF6}", + "details": { + "name": "int" + } + } + ] + }, + { + "base": "SetScrollOffsetChangedActionName", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Set Scroll Offset Changed Action Name" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Set Scroll Offset Changed Action Name is invoked" + }, + "details": { + "name": "Set Scroll Offset Changed Action Name", + "tooltip": "Sets the name of the action triggered when the scroll box drag is completed" + }, + "params": [ + { + "typeid": "{03AAAB3F-5C47-5A66-9EBC-D5FA4DB353C9}", + "details": { + "name": "Name", + "tooltip": "The name of the action triggered when the scroll box drag is completed" + } + } + ] + }, + { + "base": "SetVerticalScrollBarEntity", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Set Vertical Scroll Bar Entity" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Set Vertical Scroll Bar Entity is invoked" + }, + "details": { + "name": "Set Vertical Scroll Bar Entity", + "tooltip": "Sets the vertical scroll bar element for the scroll box" + }, + "params": [ + { + "typeid": "{6383F1D3-BB27-4E6B-A49A-6409B2059EAA}", + "details": { + "name": "Vertical Scroll Bar EntityID", + "tooltip": "The vertical scroll bar element for the scroll box" + } + } + ] + }, + { + "base": "GetContentEntity", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Get Content Entity" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Get Content Entity is invoked" + }, + "details": { + "name": "Get Content Entity", + "tooltip": "Gets the content element for the scroll box" + }, + "results": [ + { + "typeid": "{6383F1D3-BB27-4E6B-A49A-6409B2059EAA}", + "details": { + "name": "EntityId", + "tooltip": "Entity Unique Id" + } + } + ] + }, + { + "base": "SetSnapMode", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Set Snap Mode" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Set Snap Mode is invoked" + }, + "details": { + "name": "Set Snap Mode", + "tooltip": "Sets the snap mode for the scroll box" + }, + "params": [ + { + "typeid": "{72039442-EB38-4D42-A1AD-CB68F7E0EEF6}", + "details": { + "name": "Snap Mode", + "tooltip": "The snap mode for the scroll box (0=None, 1=Children, 2=Grid)" + } + } + ] + } + ] + } + ] +} \ No newline at end of file diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/EBus/Senders/UiScrollerBus.names b/Gems/ScriptCanvas/Assets/TranslationAssets/EBus/Senders/UiScrollerBus.names new file mode 100644 index 0000000000..da05529331 --- /dev/null +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/EBus/Senders/UiScrollerBus.names @@ -0,0 +1,203 @@ +{ + "entries": [ + { + "base": "UiScrollerBus", + "context": "EBusSender", + "variant": "", + "details": { + "name": "UI Scroller Bus", + "category": "UI" + }, + "methods": [ + { + "base": "GetValueChangedActionName", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Get Value Changed Action Name" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Get Value Changed Action Name is invoked" + }, + "details": { + "name": "Get Value Changed Action Name", + "tooltip": "Gets the name of the action triggered when the value has changed" + }, + "results": [ + { + "typeid": "{03AAAB3F-5C47-5A66-9EBC-D5FA4DB353C9}", + "details": { + "name": "AZStd::string" + } + } + ] + }, + { + "base": "SetOrientation", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Set Orientation" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Set Orientation is invoked" + }, + "details": { + "name": "Set Orientation", + "tooltip": "Sets the orientation of the scroller" + }, + "params": [ + { + "typeid": "{72039442-EB38-4D42-A1AD-CB68F7E0EEF6}", + "details": { + "name": "Orientation", + "tooltip": "The orientation of the scroller (0=Horizontal, 1=Vertical)" + } + } + ] + }, + { + "base": "GetOrientation", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Get Orientation" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Get Orientation is invoked" + }, + "details": { + "name": "Get Orientation", + "tooltip": "Gets the orientation of the scroller" + }, + "results": [ + { + "typeid": "{72039442-EB38-4D42-A1AD-CB68F7E0EEF6}", + "details": { + "name": "int" + } + } + ] + }, + { + "base": "GetValueChangingActionName", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Get Value Changing Action Name" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Get Value Changing Action Name is invoked" + }, + "details": { + "name": "Get Value Changing Action Name", + "tooltip": "Gets the name of the action triggered while the value is changing" + }, + "results": [ + { + "typeid": "{03AAAB3F-5C47-5A66-9EBC-D5FA4DB353C9}", + "details": { + "name": "AZStd::string" + } + } + ] + }, + { + "base": "SetValueChangingActionName", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Set Value Changing Action Name" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Set Value Changing Action Name is invoked" + }, + "details": { + "name": "Set Value Changing Action Name", + "tooltip": "Sets the name of the action triggered while the value is changing" + }, + "params": [ + { + "typeid": "{03AAAB3F-5C47-5A66-9EBC-D5FA4DB353C9}", + "details": { + "name": "Name", + "tooltip": "The name of the action triggered while the value is changing" + } + } + ] + }, + { + "base": "SetValue", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Set Value" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Set Value is invoked" + }, + "details": { + "name": "Set Value", + "tooltip": "Sets the value of the scroller" + }, + "params": [ + { + "typeid": "{EA2C3E90-AFBE-44D4-A90D-FAAF79BAF93D}", + "details": { + "name": "Value", + "tooltip": "The value of the scroller [0-1]" + } + } + ] + }, + { + "base": "GetValue", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Get Value" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Get Value is invoked" + }, + "details": { + "name": "Get Value", + "tooltip": "Gets the value of the scroller" + }, + "results": [ + { + "typeid": "{EA2C3E90-AFBE-44D4-A90D-FAAF79BAF93D}", + "details": { + "name": "float" + } + } + ] + }, + { + "base": "SetValueChangedActionName", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Set Value Changed Action Name" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Set Value Changed Action Name is invoked" + }, + "details": { + "name": "Set Value Changed Action Name", + "tooltip": "Sets the name of the action triggered when the value has changed" + }, + "params": [ + { + "typeid": "{03AAAB3F-5C47-5A66-9EBC-D5FA4DB353C9}", + "details": { + "name": "Name", + "tooltip": "The name of the action triggered when the value has changed" + } + } + ] + } + ] + } + ] +} \ No newline at end of file diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/EBus/Senders/UiSliderBus.names b/Gems/ScriptCanvas/Assets/TranslationAssets/EBus/Senders/UiSliderBus.names new file mode 100644 index 0000000000..0cecbe20f0 --- /dev/null +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/EBus/Senders/UiSliderBus.names @@ -0,0 +1,441 @@ +{ + "entries": [ + { + "base": "UiSliderBus", + "context": "EBusSender", + "variant": "", + "details": { + "name": "UI Slider", + "category": "UI" + }, + "methods": [ + { + "base": "GetValueChangingActionName", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Get Value Changing Action Name" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Get Value Changing Action Name is invoked" + }, + "details": { + "name": "Get Value Changing Action Name", + "tooltip": "Gets the name of the action triggered while the value is changing" + }, + "results": [ + { + "typeid": "{03AAAB3F-5C47-5A66-9EBC-D5FA4DB353C9}", + "details": { + "name": "AZStd::string" + } + } + ] + }, + { + "base": "SetValueChangingActionName", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Set Value Changing Action Name" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Set Value Changing Action Name is invoked" + }, + "details": { + "name": "Set Value Changing Action Name", + "tooltip": "Sets the name of the action triggered while the value is changing" + }, + "params": [ + { + "typeid": "{03AAAB3F-5C47-5A66-9EBC-D5FA4DB353C9}", + "details": { + "name": "Name", + "tooltip": "The name of the action triggered while the value is changing" + } + } + ] + }, + { + "base": "GetManipulatorEntity", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Get Manipulator Entity" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Get Manipulator Entity is invoked" + }, + "details": { + "name": "Get Manipulator Entity", + "tooltip": "Gets the manipulator element" + }, + "results": [ + { + "typeid": "{6383F1D3-BB27-4E6B-A49A-6409B2059EAA}", + "details": { + "name": "EntityId", + "tooltip": "Entity Unique Id" + } + } + ] + }, + { + "base": "SetTrackEntity", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Set Track Entity" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Set Track Entity is invoked" + }, + "details": { + "name": "Set Track Entity", + "tooltip": "Sets the track element" + }, + "params": [ + { + "typeid": "{6383F1D3-BB27-4E6B-A49A-6409B2059EAA}", + "details": { + "name": "Track EntityID", + "tooltip": "The track element" + } + } + ] + }, + { + "base": "GetFillEntity", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Get Fill Entity" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Get Fill Entity is invoked" + }, + "details": { + "name": "Get Fill Entity", + "tooltip": "Gets the fill element" + }, + "results": [ + { + "typeid": "{6383F1D3-BB27-4E6B-A49A-6409B2059EAA}", + "details": { + "name": "EntityId", + "tooltip": "Entity Unique Id" + } + } + ] + }, + { + "base": "SetFillEntity", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Set Fill Entity" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Set Fill Entity is invoked" + }, + "details": { + "name": "Set Fill Entity", + "tooltip": "Sets the fill element" + }, + "params": [ + { + "typeid": "{6383F1D3-BB27-4E6B-A49A-6409B2059EAA}", + "details": { + "name": "Fill EntityID", + "tooltip": "The fill element" + } + } + ] + }, + { + "base": "SetManipulatorEntity", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Set Manipulator Entity" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Set Manipulator Entity is invoked" + }, + "details": { + "name": "Set Manipulator Entity", + "tooltip": "Sets the manipulator element" + }, + "params": [ + { + "typeid": "{6383F1D3-BB27-4E6B-A49A-6409B2059EAA}", + "details": { + "name": "Manipulator EntityID", + "tooltip": "The manipulator element" + } + } + ] + }, + { + "base": "GetValueChangedActionName", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Get Value Changed Action Name" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Get Value Changed Action Name is invoked" + }, + "details": { + "name": "Get Value Changed Action Name", + "tooltip": "Gets the name of the action triggered when the value has finished changing" + }, + "results": [ + { + "typeid": "{03AAAB3F-5C47-5A66-9EBC-D5FA4DB353C9}", + "details": { + "name": "AZStd::string" + } + } + ] + }, + { + "base": "GetTrackEntity", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Get Track Entity" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Get Track Entity is invoked" + }, + "details": { + "name": "Get Track Entity", + "tooltip": "Gets the track element" + }, + "results": [ + { + "typeid": "{6383F1D3-BB27-4E6B-A49A-6409B2059EAA}", + "details": { + "name": "EntityId", + "tooltip": "Entity Unique Id" + } + } + ] + }, + { + "base": "GetMinValue", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Get Min Value" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Get Min Value is invoked" + }, + "details": { + "name": "Get Min Value", + "tooltip": "Gets the minimum value of the slider" + }, + "results": [ + { + "typeid": "{EA2C3E90-AFBE-44D4-A90D-FAAF79BAF93D}", + "details": { + "name": "float" + } + } + ] + }, + { + "base": "SetMinValue", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Set Min Value" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Set Min Value is invoked" + }, + "details": { + "name": "Set Min Value", + "tooltip": "Sets the minimum value of the slider" + }, + "params": [ + { + "typeid": "{EA2C3E90-AFBE-44D4-A90D-FAAF79BAF93D}", + "details": { + "name": "Min Value", + "tooltip": "The minimum value of the slider" + } + } + ] + }, + { + "base": "SetStepValue", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Set Step Value" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Set Step Value is invoked" + }, + "details": { + "name": "Set Step Value", + "tooltip": "Sets the smallest increment allowed between values. Zero means no restriction" + }, + "params": [ + { + "typeid": "{EA2C3E90-AFBE-44D4-A90D-FAAF79BAF93D}", + "details": { + "name": "Step Value", + "tooltip": "The smallest increment allowed between values. Zero means no restriction" + } + } + ] + }, + { + "base": "SetValue", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Set Value" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Set Value is invoked" + }, + "details": { + "name": "Set Value", + "tooltip": "Sets the value of the slider" + }, + "params": [ + { + "typeid": "{EA2C3E90-AFBE-44D4-A90D-FAAF79BAF93D}", + "details": { + "name": "Value", + "tooltip": "The value of the slider" + } + } + ] + }, + { + "base": "SetMaxValue", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Set Max Value" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Set Max Value is invoked" + }, + "details": { + "name": "Set Max Value", + "tooltip": "Sets the maximum value of the slider" + }, + "params": [ + { + "typeid": "{EA2C3E90-AFBE-44D4-A90D-FAAF79BAF93D}", + "details": { + "name": "Max Value", + "tooltip": "The maximum value of the slider" + } + } + ] + }, + { + "base": "GetStepValue", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Get Step Value" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Get Step Value is invoked" + }, + "details": { + "name": "Get Step Value", + "tooltip": "Gets the smallest increment allowed between values. Zero means no restriction" + }, + "results": [ + { + "typeid": "{EA2C3E90-AFBE-44D4-A90D-FAAF79BAF93D}", + "details": { + "name": "float" + } + } + ] + }, + { + "base": "GetValue", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Get Value" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Get Value is invoked" + }, + "details": { + "name": "Get Value", + "tooltip": "Gets the value of the slider" + }, + "results": [ + { + "typeid": "{EA2C3E90-AFBE-44D4-A90D-FAAF79BAF93D}", + "details": { + "name": "float" + } + } + ] + }, + { + "base": "GetMaxValue", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Get Max Value" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Get Max Value is invoked" + }, + "details": { + "name": "Get Max Value", + "tooltip": "Gets the maximum value of the slider" + }, + "results": [ + { + "typeid": "{EA2C3E90-AFBE-44D4-A90D-FAAF79BAF93D}", + "details": { + "name": "float" + } + } + ] + }, + { + "base": "SetValueChangedActionName", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Set Value Changed Action Name" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Set Value Changed Action Name is invoked" + }, + "details": { + "name": "Set Value Changed Action Name", + "tooltip": "Sets the name of the action triggered when the value is done changing" + }, + "params": [ + { + "typeid": "{03AAAB3F-5C47-5A66-9EBC-D5FA4DB353C9}", + "details": { + "name": "Name", + "tooltip": "The name of the action triggered when the value is done changing" + } + } + ] + } + ] + } + ] +} \ No newline at end of file diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/EBus/Senders/UiSpawnerBus.names b/Gems/ScriptCanvas/Assets/TranslationAssets/EBus/Senders/UiSpawnerBus.names new file mode 100644 index 0000000000..707f8903ec --- /dev/null +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/EBus/Senders/UiSpawnerBus.names @@ -0,0 +1,104 @@ +{ + "entries": [ + { + "base": "UiSpawnerBus", + "context": "EBusSender", + "variant": "", + "details": { + "name": "UI Spawner", + "category": "UI" + }, + "methods": [ + { + "base": "Spawn", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Spawn" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Spawn is invoked" + }, + "details": { + "name": "Spawn", + "tooltip": "Spawns the slice specified in the component at the element's location" + }, + "results": [ + { + "typeid": "{E6E7C0C5-07C9-44BB-A38C-930431948667}", + "details": { + "name": "SliceInstantiationTicket" + } + } + ] + }, + { + "base": "SpawnRelative", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Spawn Relative" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Spawn Relative is invoked" + }, + "details": { + "name": "Spawn Relative", + "tooltip": "Spawns the slice specified in the component at the element's location with the specified relative offset" + }, + "params": [ + { + "typeid": "{3D80F623-C85C-4741-90D0-E4E66164E6BF}", + "details": { + "name": "Relative Position", + "tooltip": "The offset position from the element with the spawner component" + } + } + ], + "results": [ + { + "typeid": "{E6E7C0C5-07C9-44BB-A38C-930431948667}", + "details": { + "name": "SliceInstantiationTicket", + "tooltip": "The offset position from the element with the spawner component" + } + } + ] + }, + { + "base": "SpawnAbsolute", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Spawn Absolute" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Spawn Absolute is invoked" + }, + "details": { + "name": "Spawn Absolute", + "tooltip": "Spawns the slice specified in the component at the specified viewport position" + }, + "params": [ + { + "typeid": "{3D80F623-C85C-4741-90D0-E4E66164E6BF}", + "details": { + "name": "Viewport Position", + "tooltip": "The viewport position at which to spawn the slice" + } + } + ], + "results": [ + { + "typeid": "{E6E7C0C5-07C9-44BB-A38C-930431948667}", + "details": { + "name": "SliceInstantiationTicket", + "tooltip": "The viewport position at which to spawn the slice" + } + } + ] + } + ] + } + ] +} \ No newline at end of file diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/EBus/Senders/UiTextBus.names b/Gems/ScriptCanvas/Assets/TranslationAssets/EBus/Senders/UiTextBus.names new file mode 100644 index 0000000000..7b14419e16 --- /dev/null +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/EBus/Senders/UiTextBus.names @@ -0,0 +1,751 @@ +{ + "entries": [ + { + "base": "UiTextBus", + "context": "EBusSender", + "variant": "", + "details": { + "name": "UI Text", + "category": "UI" + }, + "methods": [ + { + "base": "GetTextHeight", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Get Text Height" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Get Text Height is invoked" + }, + "details": { + "name": "Get Text Height", + "tooltip": "Get the height of the text" + }, + "results": [ + { + "typeid": "{EA2C3E90-AFBE-44D4-A90D-FAAF79BAF93D}", + "details": { + "name": "float" + } + } + ] + }, + { + "base": "GetColor", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Get Color" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Get Color is invoked" + }, + "details": { + "name": "Get Color", + "tooltip": "Gets the color to draw the text string" + }, + "results": [ + { + "typeid": "{7894072A-9050-4F0F-901B-34B1A0D29417}", + "details": { + "name": "Color" + } + } + ] + }, + { + "base": "GetLineSpacing", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Get Line Spacing" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Get Line Spacing is invoked" + }, + "details": { + "name": "Get Line Spacing", + "tooltip": "Gets the amount of pixels to add between each two consecutive lines" + }, + "results": [ + { + "typeid": "{EA2C3E90-AFBE-44D4-A90D-FAAF79BAF93D}", + "details": { + "name": "float" + } + } + ] + }, + { + "base": "GetTextWidth", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Get Text Width" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Get Text Width is invoked" + }, + "details": { + "name": "Get Text Width", + "tooltip": "Get the width of the text" + }, + "results": [ + { + "typeid": "{EA2C3E90-AFBE-44D4-A90D-FAAF79BAF93D}", + "details": { + "name": "float" + } + } + ] + }, + { + "base": "SetWrapText", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Set Wrap Text" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Set Wrap Text is invoked" + }, + "details": { + "name": "Set Wrap Text", + "tooltip": "Sets whether text is wrapped" + }, + "params": [ + { + "typeid": "{72039442-EB38-4D42-A1AD-CB68F7E0EEF6}", + "details": { + "name": "Wrap Mode", + "tooltip": "The wrap mode (0=NoWrap, 1=Wrap)" + } + } + ] + }, + { + "base": "GetFontEffectName", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Get Font Effect Name" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Get Font Effect Name is invoked" + }, + "details": { + "name": "Get Font Effect Name", + "tooltip": "Get the name of the font effect with the given index in the current font" + }, + "params": [ + { + "typeid": "{72039442-EB38-4D42-A1AD-CB68F7E0EEF6}", + "details": { + "name": "Font Effect Index", + "tooltip": "The index of the effect in the font" + } + } + ], + "results": [ + { + "typeid": "{03AAAB3F-5C47-5A66-9EBC-D5FA4DB353C9}", + "details": { + "name": "AZStd::string", + "tooltip": "The index of the effect in the font" + } + } + ] + }, + { + "base": "GetShrinkToFit", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Get Shrink To Fit" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Get Shrink To Fit is invoked" + }, + "details": { + "name": "Get Shrink To Fit", + "tooltip": "Gets the shrink-to-fit setting of the text" + }, + "results": [ + { + "typeid": "{72039442-EB38-4D42-A1AD-CB68F7E0EEF6}", + "details": { + "name": "int" + } + } + ] + }, + { + "base": "GetOverflowMode", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Get Overflow Mode" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Get Overflow Mode is invoked" + }, + "details": { + "name": "Get Overflow Mode", + "tooltip": "Gets the overflow behavior of the text" + }, + "results": [ + { + "typeid": "{72039442-EB38-4D42-A1AD-CB68F7E0EEF6}", + "details": { + "name": "int" + } + } + ] + }, + { + "base": "GetFontEffect", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Get Font Effect" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Get Font Effect is invoked" + }, + "details": { + "name": "Get Font Effect", + "tooltip": "Gets the font effect" + }, + "results": [ + { + "typeid": "{72039442-EB38-4D42-A1AD-CB68F7E0EEF6}", + "details": { + "name": "int" + } + } + ] + }, + { + "base": "SetFontEffect", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Set Font Effect" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Set Font Effect is invoked" + }, + "details": { + "name": "Set Font Effect", + "tooltip": "Sets the font effect" + }, + "params": [ + { + "typeid": "{72039442-EB38-4D42-A1AD-CB68F7E0EEF6}", + "details": { + "name": "Font Effect Index", + "tooltip": "The font effect index" + } + } + ] + }, + { + "base": "GetHorizontalTextAlignment", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Get Horizontal Text Alignment" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Get Horizontal Text Alignment is invoked" + }, + "details": { + "name": "Get Horizontal Text Alignment", + "tooltip": "Gets the horizontal text alignment" + }, + "results": [ + { + "typeid": "{72039442-EB38-4D42-A1AD-CB68F7E0EEF6}", + "details": { + "name": "int" + } + } + ] + }, + { + "base": "GetFont", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Get Font" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Get Font is invoked" + }, + "details": { + "name": "Get Font", + "tooltip": "Gets the pathname to the font" + }, + "results": [ + { + "typeid": "{03AAAB3F-5C47-5A66-9EBC-D5FA4DB353C9}", + "details": { + "name": "AZStd::string" + } + } + ] + }, + { + "base": "SetVerticalTextAlignment", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Set Vertical Text Alignment" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Set Vertical Text Alignment is invoked" + }, + "details": { + "name": "Set Vertical Text Alignment", + "tooltip": "Sets the vertical text alignment" + }, + "params": [ + { + "typeid": "{72039442-EB38-4D42-A1AD-CB68F7E0EEF6}", + "details": { + "name": "Vertical Alignment", + "tooltip": "The vertical text alignment (0=Top, 1=Center, 2=Bottom)" + } + } + ] + }, + { + "base": "GetVerticalTextAlignment", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Get Vertical Text Alignment" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Get Vertical Text Alignment is invoked" + }, + "details": { + "name": "Get Vertical Text Alignment", + "tooltip": "Gets the vertical text alignment" + }, + "results": [ + { + "typeid": "{72039442-EB38-4D42-A1AD-CB68F7E0EEF6}", + "details": { + "name": "int" + } + } + ] + }, + { + "base": "SetOverflowMode", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Set Overflow Mode" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Set Overflow Mode is invoked" + }, + "details": { + "name": "Set Overflow Mode", + "tooltip": "Sets the overflow behavior of the text" + }, + "params": [ + { + "typeid": "{72039442-EB38-4D42-A1AD-CB68F7E0EEF6}", + "details": { + "name": "Overflow Mode", + "tooltip": "The overflow behavior of the text (0=Overflow Text, 1=Clip Text, 2=Ellipsis)" + } + } + ] + }, + { + "base": "SetColor", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Set Color" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Set Color is invoked" + }, + "details": { + "name": "Set Color", + "tooltip": "Sets the color to draw the text string" + }, + "params": [ + { + "typeid": "{7894072A-9050-4F0F-901B-34B1A0D29417}", + "details": { + "name": "Color", + "tooltip": "The color to draw the text string" + } + } + ] + }, + { + "base": "SetFontSize", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Set Font Size" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Set Font Size is invoked" + }, + "details": { + "name": "Set Font Size", + "tooltip": "Sets the size of the font in points" + }, + "params": [ + { + "typeid": "{EA2C3E90-AFBE-44D4-A90D-FAAF79BAF93D}", + "details": { + "name": "Font Size", + "tooltip": "The size of the font in points" + } + } + ] + }, + { + "base": "SetCharacterSpacing", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Set Character Spacing" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Set Character Spacing is invoked" + }, + "details": { + "name": "Set Character Spacing", + "tooltip": "Sets the spacing in 1/1000th of ems to add between each two consecutive characters. One em is equal to the currently specified font size" + }, + "params": [ + { + "typeid": "{EA2C3E90-AFBE-44D4-A90D-FAAF79BAF93D}", + "details": { + "name": "Character Spacing", + "tooltip": "The spacing in 1/1000th of ems to add between each two consecutive characters. One em is equal to the currently specified font size" + } + } + ] + }, + { + "base": "SetLineSpacing", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Set Line Spacing" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Set Line Spacing is invoked" + }, + "details": { + "name": "Set Line Spacing", + "tooltip": "Sets the amount of pixels to add between each two consecutive lines" + }, + "params": [ + { + "typeid": "{EA2C3E90-AFBE-44D4-A90D-FAAF79BAF93D}", + "details": { + "name": "Line Spacing", + "tooltip": "The amount of pixels to add between each two consecutive lines" + } + } + ] + }, + { + "base": "GetCharacterSpacing", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Get Character Spacing" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Get Character Spacing is invoked" + }, + "details": { + "name": "Get Character Spacing", + "tooltip": "Gets the spacing in 1/1000th of ems to add between each two consecutive characters. One em is equal to the currently specified font size" + }, + "results": [ + { + "typeid": "{EA2C3E90-AFBE-44D4-A90D-FAAF79BAF93D}", + "details": { + "name": "float" + } + } + ] + }, + { + "base": "SetHorizontalTextAlignment", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Set Horizontal Text Alignment" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Set Horizontal Text Alignment is invoked" + }, + "details": { + "name": "Set Horizontal Text Alignment", + "tooltip": "Sets the horizontal text alignment" + }, + "params": [ + { + "typeid": "{72039442-EB38-4D42-A1AD-CB68F7E0EEF6}", + "details": { + "name": "Horizontal Alignment", + "tooltip": "The horizontal text alignment (0=Left, 1=Center, 2=Right)" + } + } + ] + }, + { + "base": "SetText", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Set Text" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Set Text is invoked" + }, + "details": { + "name": "Set Text", + "tooltip": "Sets the text string being displayed by the element" + }, + "params": [ + { + "typeid": "{03AAAB3F-5C47-5A66-9EBC-D5FA4DB353C9}", + "details": { + "name": "Text", + "tooltip": "The text string being displayed by the element" + } + } + ] + }, + { + "base": "SetFont", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Set Font" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Set Font is invoked" + }, + "details": { + "name": "Set Font", + "tooltip": "Sets the pathname to the font" + }, + "params": [ + { + "typeid": "{03AAAB3F-5C47-5A66-9EBC-D5FA4DB353C9}", + "details": { + "name": "Pathname", + "tooltip": "The pathname to the font" + } + } + ] + }, + { + "base": "SetFontEffectByName", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Set Font Effect By Name" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Set Font Effect By Name is invoked" + }, + "details": { + "name": "Set Font Effect By Name", + "tooltip": "Set the font effect to use for this text, given the name of the font effect" + }, + "params": [ + { + "typeid": "{03AAAB3F-5C47-5A66-9EBC-D5FA4DB353C9}", + "details": { + "name": "Font Effect Name", + "tooltip": "The name of the font effect to use for this text" + } + } + ] + }, + { + "base": "SetIsMarkupEnabled", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Set Is Markup Enabled" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Set Is Markup Enabled is invoked" + }, + "details": { + "name": "Set Is Markup Enabled", + "tooltip": "Sets whether markup is enabled. If true then the text string is parsed for XML markup" + }, + "params": [ + { + "typeid": "{A0CA880C-AFE4-43CB-926C-59AC48496112}", + "details": { + "name": "Is Enabled", + "tooltip": "Whether whether markup is enabled" + } + } + ] + }, + { + "base": "GetWrapText", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Get Wrap Text" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Get Wrap Text is invoked" + }, + "details": { + "name": "Get Wrap Text", + "tooltip": "Returns whether text is wrapped" + }, + "results": [ + { + "typeid": "{72039442-EB38-4D42-A1AD-CB68F7E0EEF6}", + "details": { + "name": "int" + } + } + ] + }, + { + "base": "GetText", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Get Text" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Get Text is invoked" + }, + "details": { + "name": "Get Text", + "tooltip": "Gets the text string being displayed by the element" + }, + "results": [ + { + "typeid": "{03AAAB3F-5C47-5A66-9EBC-D5FA4DB353C9}", + "details": { + "name": "AZStd::string" + } + } + ] + }, + { + "base": "GetTextSize", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke GetTextSize" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after GetTextSize is invoked" + }, + "details": { + "name": "GetTextSize" + }, + "results": [ + { + "typeid": "{3D80F623-C85C-4741-90D0-E4E66164E6BF}", + "details": { + "name": "Vector2" + } + } + ] + }, + { + "base": "GetIsMarkupEnabled", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Get Is Markup Enabled" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Get Is Markup Enabled is invoked" + }, + "details": { + "name": "Get Is Markup Enabled", + "tooltip": "Gets whether markup is enabled. If true then the text string is parsed for XML markup" + }, + "results": [ + { + "typeid": "{A0CA880C-AFE4-43CB-926C-59AC48496112}", + "details": { + "name": "bool" + } + } + ] + }, + { + "base": "GetFontSize", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Get Font Size" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Get Font Size is invoked" + }, + "details": { + "name": "Get Font Size", + "tooltip": "Gets the size of the font in points" + }, + "results": [ + { + "typeid": "{EA2C3E90-AFBE-44D4-A90D-FAAF79BAF93D}", + "details": { + "name": "float" + } + } + ] + }, + { + "base": "SetShrinkToFit", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Set Shrink To Fit" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Set Shrink To Fit is invoked" + }, + "details": { + "name": "Set Shrink To Fit", + "tooltip": "Sets the shrink-to-fit setting of the text" + }, + "params": [ + { + "typeid": "{72039442-EB38-4D42-A1AD-CB68F7E0EEF6}", + "details": { + "name": "Shrink To Fit", + "tooltip": "The shrink-to-fit setting (0 = None, 1 = Uniform, 2 = Width-only)" + } + } + ] + } + ] + } + ] +} \ No newline at end of file diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/EBus/Senders/UiTextInputBus.names b/Gems/ScriptCanvas/Assets/TranslationAssets/EBus/Senders/UiTextInputBus.names new file mode 100644 index 0000000000..4ccb34553c --- /dev/null +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/EBus/Senders/UiTextInputBus.names @@ -0,0 +1,625 @@ +{ + "entries": [ + { + "base": "UiTextInputBus", + "context": "EBusSender", + "variant": "", + "details": { + "name": "UI Text Input", + "category": "UI" + }, + "methods": [ + { + "base": "SetChangeAction", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Set Change Action" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Set Change Action is invoked" + }, + "details": { + "name": "Set Change Action", + "tooltip": "Sets the name of the action triggered when the text is changed" + }, + "params": [ + { + "typeid": "{03AAAB3F-5C47-5A66-9EBC-D5FA4DB353C9}", + "details": { + "name": "Name", + "tooltip": "The name of the action triggered when the text is changed" + } + } + ] + }, + { + "base": "GetEndEditAction", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Get End Edit Action" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Get End Edit Action is invoked" + }, + "details": { + "name": "Get End Edit Action", + "tooltip": "Gets the name of the action triggered when the editing of text is finished" + }, + "results": [ + { + "typeid": "{03AAAB3F-5C47-5A66-9EBC-D5FA4DB353C9}", + "details": { + "name": "AZStd::string" + } + } + ] + }, + { + "base": "SetEndEditAction", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Set End Edit Action" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Set End Edit Action is invoked" + }, + "details": { + "name": "Set End Edit Action", + "tooltip": "Sets the name of the action triggered when the editing of text is finished" + }, + "params": [ + { + "typeid": "{03AAAB3F-5C47-5A66-9EBC-D5FA4DB353C9}", + "details": { + "name": "Name", + "tooltip": "Sets the name of the action triggered when the editing of text is finished" + } + } + ] + }, + { + "base": "GetPlaceHolderTextEntity", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Get Placeholder Text Entity" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Get Placeholder Text Entity is invoked" + }, + "details": { + "name": "Get Placeholder Text Entity", + "tooltip": "Gets the placeholder text element" + }, + "results": [ + { + "typeid": "{6383F1D3-BB27-4E6B-A49A-6409B2059EAA}", + "details": { + "name": "EntityId", + "tooltip": "Entity Unique Id" + } + } + ] + }, + { + "base": "GetIsPasswordField", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Is Password Field" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Is Password Field is invoked" + }, + "details": { + "name": "Is Password Field", + "tooltip": "Returns whether the text input is configured as a password field" + }, + "results": [ + { + "typeid": "{A0CA880C-AFE4-43CB-926C-59AC48496112}", + "details": { + "name": "bool" + } + } + ] + }, + { + "base": "GetChangeAction", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Get Change Action" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Get Change Action is invoked" + }, + "details": { + "name": "Get Change Action", + "tooltip": "Gets the name of the action triggered when the text is changed" + }, + "results": [ + { + "typeid": "{03AAAB3F-5C47-5A66-9EBC-D5FA4DB353C9}", + "details": { + "name": "AZStd::string" + } + } + ] + }, + { + "base": "SetEnterAction", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Set Enter Action" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Set Enter Action is invoked" + }, + "details": { + "name": "Set Enter Action", + "tooltip": "Sets the name of the action triggered when enter is pressed" + }, + "params": [ + { + "typeid": "{03AAAB3F-5C47-5A66-9EBC-D5FA4DB353C9}", + "details": { + "name": "Name", + "tooltip": "The name of the action triggered when enter is pressed" + } + } + ] + }, + { + "base": "SetText", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Set Text" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Set Text is invoked" + }, + "details": { + "name": "Set Text", + "tooltip": "Sets the text string being displayed or edited by the element" + }, + "params": [ + { + "typeid": "{03AAAB3F-5C47-5A66-9EBC-D5FA4DB353C9}", + "details": { + "name": "Text", + "tooltip": "The text string being displayed or edited by the element" + } + } + ] + }, + { + "base": "SetIsClipboardEnabled", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke SetIsClipboardEnabled" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after SetIsClipboardEnabled is invoked" + }, + "details": { + "name": "SetIsClipboardEnabled" + }, + "params": [ + { + "typeid": "{A0CA880C-AFE4-43CB-926C-59AC48496112}", + "details": { + "name": "bool" + } + } + ] + }, + { + "base": "SetMaxStringLength", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Set Max String Length" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Set Max String Length is invoked" + }, + "details": { + "name": "Set Max String Length", + "tooltip": "Sets the maximum number of characters that can be entered" + }, + "params": [ + { + "typeid": "{72039442-EB38-4D42-A1AD-CB68F7E0EEF6}", + "details": { + "name": "Max Length", + "tooltip": "The maximum number of characters that can be entered" + } + } + ] + }, + { + "base": "GetEnterAction", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Get Enter Action" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Get Enter Action is invoked" + }, + "details": { + "name": "Get Enter Action", + "tooltip": "Gets the name of the action triggered when enter is pressed" + }, + "results": [ + { + "typeid": "{03AAAB3F-5C47-5A66-9EBC-D5FA4DB353C9}", + "details": { + "name": "AZStd::string" + } + } + ] + }, + { + "base": "GetText", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Get Text" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Get Text is invoked" + }, + "details": { + "name": "Get Text", + "tooltip": "Gets the text string being displayed or edited by the element" + }, + "results": [ + { + "typeid": "{03AAAB3F-5C47-5A66-9EBC-D5FA4DB353C9}", + "details": { + "name": "AZStd::string" + } + } + ] + }, + { + "base": "GetCursorBlinkInterval", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Get Cursor Blink Interval" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Get Cursor Blink Interval is invoked" + }, + "details": { + "name": "Get Cursor Blink Interval", + "tooltip": "Gets the cursor blink interval of the text input" + }, + "results": [ + { + "typeid": "{EA2C3E90-AFBE-44D4-A90D-FAAF79BAF93D}", + "details": { + "name": "float" + } + } + ] + }, + { + "base": "GetMaxStringLength", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Get Max String Length" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Get Max String Length is invoked" + }, + "details": { + "name": "Get Max String Length", + "tooltip": "Gets the maximum number of characters that can be entered" + }, + "results": [ + { + "typeid": "{72039442-EB38-4D42-A1AD-CB68F7E0EEF6}", + "details": { + "name": "int" + } + } + ] + }, + { + "base": "SetIsPasswordField", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Set Is Password Field" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Set Is Password Field is invoked" + }, + "details": { + "name": "Set Is Password Field", + "tooltip": "Sets whether the text input is configured as a password field" + }, + "params": [ + { + "typeid": "{A0CA880C-AFE4-43CB-926C-59AC48496112}", + "details": { + "name": "Password Field", + "tooltip": "Indicates whether the text input is configured as a password field" + } + } + ] + }, + { + "base": "GetTextCursorColor", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Get Text Cursor Color" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Get Text Cursor Color is invoked" + }, + "details": { + "name": "Get Text Cursor Color", + "tooltip": "Gets the color to be used for the text cursor" + }, + "results": [ + { + "typeid": "{7894072A-9050-4F0F-901B-34B1A0D29417}", + "details": { + "name": "Color" + } + } + ] + }, + { + "base": "SetTextEntity", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Set Text Entity" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Set Text Entity is invoked" + }, + "details": { + "name": "Set Text Entity", + "tooltip": "Sets the text element" + }, + "params": [ + { + "typeid": "{6383F1D3-BB27-4E6B-A49A-6409B2059EAA}", + "details": { + "name": "Text EntityID", + "tooltip": "The text element" + } + } + ] + }, + { + "base": "SetTextSelectionColor", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Set Text Selection Color" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Set Text Selection Color is invoked" + }, + "details": { + "name": "Set Text Selection Color", + "tooltip": "Sets the color to be used for the text background when it is selected" + }, + "params": [ + { + "typeid": "{7894072A-9050-4F0F-901B-34B1A0D29417}", + "details": { + "name": "Selection Color", + "tooltip": "The color to be used for the text background when it is selected" + } + } + ] + }, + { + "base": "SetTextCursorColor", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Set Text Cursor Color" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Set Text Cursor Color is invoked" + }, + "details": { + "name": "Set Text Cursor Color", + "tooltip": "Sets the color to be used for the text cursor" + }, + "params": [ + { + "typeid": "{7894072A-9050-4F0F-901B-34B1A0D29417}", + "details": { + "name": "Cursor Color", + "tooltip": "The color to be used for the text cursor" + } + } + ] + }, + { + "base": "SetCursorBlinkInterval", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Set Cursor Blink Interval" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Set Cursor Blink Interval is invoked" + }, + "details": { + "name": "Set Cursor Blink Interval", + "tooltip": "Sets the cursor blink interval of the text input" + }, + "params": [ + { + "typeid": "{EA2C3E90-AFBE-44D4-A90D-FAAF79BAF93D}", + "details": { + "name": "Interval", + "tooltip": "The cursor blink interval of the text input in seconds" + } + } + ] + }, + { + "base": "GetTextEntity", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Get Text Entity" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Get Text Entity is invoked" + }, + "details": { + "name": "Get Text Entity", + "tooltip": "Gets the text element" + }, + "results": [ + { + "typeid": "{6383F1D3-BB27-4E6B-A49A-6409B2059EAA}", + "details": { + "name": "EntityId", + "tooltip": "Entity Unique Id" + } + } + ] + }, + { + "base": "SetPlaceHolderTextEntity", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Set Placeholder Text Entity" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Set Placeholder Text Entity is invoked" + }, + "details": { + "name": "Set Placeholder Text Entity", + "tooltip": "Sets the placeholder text element" + }, + "params": [ + { + "typeid": "{6383F1D3-BB27-4E6B-A49A-6409B2059EAA}", + "details": { + "name": "Placeholder EntityID", + "tooltip": "The placeholder text element" + } + } + ] + }, + { + "base": "GetReplacementCharacter", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Get Replacement Character" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Get Replacement Character is invoked" + }, + "details": { + "name": "Get Replacement Character", + "tooltip": "Gets the replacement character used to hide password text" + }, + "results": [ + { + "typeid": "{43DA906B-7DEF-4CA8-9790-854106D3F983}", + "details": { + "name": "unsigned int" + } + } + ] + }, + { + "base": "GetIsClipboardEnabled", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke GetIsClipboardEnabled" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after GetIsClipboardEnabled is invoked" + }, + "details": { + "name": "GetIsClipboardEnabled" + }, + "results": [ + { + "typeid": "{A0CA880C-AFE4-43CB-926C-59AC48496112}", + "details": { + "name": "bool" + } + } + ] + }, + { + "base": "GetTextSelectionColor", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Get Text Selection Color" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Get Text Selection Color is invoked" + }, + "details": { + "name": "Get Text Selection Color", + "tooltip": "Gets the color to be used for the text background when it is selected" + }, + "results": [ + { + "typeid": "{7894072A-9050-4F0F-901B-34B1A0D29417}", + "details": { + "name": "Color" + } + } + ] + }, + { + "base": "SetReplacementCharacter", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Set Replacement Character" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Set Replacement Character is invoked" + }, + "details": { + "name": "Set Replacement Character", + "tooltip": "Sets the replacement character used to hide password text" + }, + "params": [ + { + "typeid": "{43DA906B-7DEF-4CA8-9790-854106D3F983}", + "details": { + "name": "Replacement Character", + "tooltip": "The decimal code point of the replacement character used to hide password text" + } + } + ] + } + ] + } + ] +} \ No newline at end of file diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/EBus/Senders/UiTooltipBus.names b/Gems/ScriptCanvas/Assets/TranslationAssets/EBus/Senders/UiTooltipBus.names new file mode 100644 index 0000000000..596b456cd0 --- /dev/null +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/EBus/Senders/UiTooltipBus.names @@ -0,0 +1,62 @@ +{ + "entries": [ + { + "base": "UiTooltipBus", + "context": "EBusSender", + "variant": "", + "details": { + "name": "UI Tooltip", + "category": "UI" + }, + "methods": [ + { + "base": "GetText", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Get Text" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Get Text is invoked" + }, + "details": { + "name": "Get Text", + "tooltip": "Gets the tooltip text" + }, + "results": [ + { + "typeid": "{03AAAB3F-5C47-5A66-9EBC-D5FA4DB353C9}", + "details": { + "name": "AZStd::string" + } + } + ] + }, + { + "base": "SetText", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Set Text" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Set Text is invoked" + }, + "details": { + "name": "Set Text", + "tooltip": "Sets the tooltip text" + }, + "params": [ + { + "typeid": "{03AAAB3F-5C47-5A66-9EBC-D5FA4DB353C9}", + "details": { + "name": "Text", + "tooltip": "The tooltip text" + } + } + ] + } + ] + } + ] +} \ No newline at end of file diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/EBus/Senders/UiTooltipDisplayBus.names b/Gems/ScriptCanvas/Assets/TranslationAssets/EBus/Senders/UiTooltipDisplayBus.names new file mode 100644 index 0000000000..33ec35863e --- /dev/null +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/EBus/Senders/UiTooltipDisplayBus.names @@ -0,0 +1,389 @@ +{ + "entries": [ + { + "base": "UiTooltipDisplayBus", + "context": "EBusSender", + "variant": "", + "details": { + "name": "UI Tooltip Display", + "category": "UI" + }, + "methods": [ + { + "base": "GetAutoSize", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Get Auto Size" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Get Auto Size is invoked" + }, + "details": { + "name": "Get Auto Size", + "tooltip": "Returns whether the tooltip display element should be resized so that the text element size matches the size of the string" + }, + "results": [ + { + "typeid": "{A0CA880C-AFE4-43CB-926C-59AC48496112}", + "details": { + "name": "bool" + } + } + ] + }, + { + "base": "GetTextEntity", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Get Text Entity" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Get Text Entity is invoked" + }, + "details": { + "name": "Get Text Entity", + "tooltip": "Gets the text element that is used for resizing" + }, + "results": [ + { + "typeid": "{6383F1D3-BB27-4E6B-A49A-6409B2059EAA}", + "details": { + "name": "EntityId", + "tooltip": "Entity Unique Id" + } + } + ] + }, + { + "base": "GetDelayTime", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Get Delay Time" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Get Delay Time is invoked" + }, + "details": { + "name": "Get Delay Time", + "tooltip": "Gets the amount of time to wait before showing the tooltip display element after hover start" + }, + "results": [ + { + "typeid": "{EA2C3E90-AFBE-44D4-A90D-FAAF79BAF93D}", + "details": { + "name": "float" + } + } + ] + }, + { + "base": "SetDelayTime", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Set Delay Time" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Set Delay Time is invoked" + }, + "details": { + "name": "Set Delay Time", + "tooltip": "Sets the amount of time to wait before showing the tooltip display element after hover start" + }, + "params": [ + { + "typeid": "{EA2C3E90-AFBE-44D4-A90D-FAAF79BAF93D}", + "details": { + "name": "Delay Time", + "tooltip": "The amount of time to wait in seconds before showing the tooltip display element after hover start" + } + } + ] + }, + { + "base": "SetDisplayTime", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Set Display Time" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Set Display Time is invoked" + }, + "details": { + "name": "Set Display Time", + "tooltip": "Sets the amount of time the tooltip display element is to remain visible" + }, + "params": [ + { + "typeid": "{EA2C3E90-AFBE-44D4-A90D-FAAF79BAF93D}", + "details": { + "name": "Display Time", + "tooltip": "The amount of time in seconds the tooltip display element is to remain visible" + } + } + ] + }, + { + "base": "SetOffset", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Set Offset" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Set Offset is invoked" + }, + "details": { + "name": "Set Offset", + "tooltip": "Sets the offset from the tooltip display element's pivot to the mouse position" + }, + "params": [ + { + "typeid": "{3D80F623-C85C-4741-90D0-E4E66164E6BF}", + "details": { + "name": "Offset", + "tooltip": "The offset from the tooltip display element's pivot to the mouse position" + } + } + ] + }, + { + "base": "GetOffset", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Get Offset" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Get Offset is invoked" + }, + "details": { + "name": "Get Offset", + "tooltip": "Gets the offset from the tooltip display element's pivot to the mouse position" + }, + "results": [ + { + "typeid": "{3D80F623-C85C-4741-90D0-E4E66164E6BF}", + "details": { + "name": "Vector2" + } + } + ] + }, + { + "base": "GetAutoPositionMode", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Get Auto Position Mode" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Get Auto Position Mode is invoked" + }, + "details": { + "name": "Get Auto Position Mode", + "tooltip": "Gets the auto position mode" + }, + "results": [ + { + "typeid": "{72039442-EB38-4D42-A1AD-CB68F7E0EEF6}", + "details": { + "name": "int" + } + } + ] + }, + { + "base": "SetAutoPosition", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Set Auto Position" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Set Auto Position is invoked" + }, + "details": { + "name": "Set Auto Position", + "tooltip": "Sets whether the tooltip display element is automatically positioned" + }, + "params": [ + { + "typeid": "{A0CA880C-AFE4-43CB-926C-59AC48496112}", + "details": { + "name": "Auto Position", + "tooltip": "Indicates whether the tooltip display element is automatically positioned" + } + } + ] + }, + { + "base": "SetAutoSize", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Set Auto Size" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Set Auto Size is invoked" + }, + "details": { + "name": "Set Auto Size", + "tooltip": "Sets whether the tooltip display element should be resized so that the text element size matches the size of the string" + }, + "params": [ + { + "typeid": "{A0CA880C-AFE4-43CB-926C-59AC48496112}", + "details": { + "name": "Auto Size", + "tooltip": "Indicates whether the tooltip display element should be resized so that the text element size matches the size of the string" + } + } + ] + }, + { + "base": "GetAutoPosition", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Get Auto Position" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Get Auto Position is invoked" + }, + "details": { + "name": "Get Auto Position", + "tooltip": "Returns whether the tooltip display element is automatically positioned" + }, + "results": [ + { + "typeid": "{A0CA880C-AFE4-43CB-926C-59AC48496112}", + "details": { + "name": "bool" + } + } + ] + }, + { + "base": "SetTextEntity", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Set Text Entity" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Set Text Entity is invoked" + }, + "details": { + "name": "Set Text Entity", + "tooltip": "Sets the text element that is used for resizing" + }, + "params": [ + { + "typeid": "{6383F1D3-BB27-4E6B-A49A-6409B2059EAA}", + "details": { + "name": "Text EntityID", + "tooltip": "The text element that is used for resizing" + } + } + ] + }, + { + "base": "GetDisplayTime", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Get Display Time" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Get Display Time is invoked" + }, + "details": { + "name": "Get Display Time", + "tooltip": "Gets the amount of time the tooltip display element is to remain visible" + }, + "results": [ + { + "typeid": "{EA2C3E90-AFBE-44D4-A90D-FAAF79BAF93D}", + "details": { + "name": "float" + } + } + ] + }, + { + "base": "GetTriggerMode", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke GetTriggerMode" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after GetTriggerMode is invoked" + }, + "details": { + "name": "GetTriggerMode" + }, + "results": [ + { + "typeid": "{72039442-EB38-4D42-A1AD-CB68F7E0EEF6}", + "details": { + "name": "int" + } + } + ] + }, + { + "base": "SetTriggerMode", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke SetTriggerMode" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after SetTriggerMode is invoked" + }, + "details": { + "name": "SetTriggerMode" + }, + "params": [ + { + "typeid": "{72039442-EB38-4D42-A1AD-CB68F7E0EEF6}", + "details": { + "name": "int" + } + } + ] + }, + { + "base": "SetAutoPositionMode", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Set Auto Position Mode" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Set Auto Position Mode is invoked" + }, + "details": { + "name": "Set Auto Position Mode", + "tooltip": "Sets the auto position mode" + }, + "params": [ + { + "typeid": "{72039442-EB38-4D42-A1AD-CB68F7E0EEF6}", + "details": { + "name": "Auto Position Mode", + "tooltip": "The auto position mode (0=Offset From Mouse, 1=Offset From Element)" + } + } + ] + } + ] + } + ] +} \ No newline at end of file diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/EBus/Senders/UiTransform2dBus.names b/Gems/ScriptCanvas/Assets/TranslationAssets/EBus/Senders/UiTransform2dBus.names new file mode 100644 index 0000000000..c75e4dad79 --- /dev/null +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/EBus/Senders/UiTransform2dBus.names @@ -0,0 +1,241 @@ +{ + "entries": [ + { + "base": "UiTransform2dBus", + "context": "EBusSender", + "variant": "", + "details": { + "name": "UI Transform 2D", + "category": "UI" + }, + "methods": [ + { + "base": "GetLocalHeight", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Get Local Height" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Get Local Height is invoked" + }, + "details": { + "name": "Get Local Height", + "tooltip": "Gets the height of the element based off its offsets" + }, + "results": [ + { + "typeid": "{EA2C3E90-AFBE-44D4-A90D-FAAF79BAF93D}", + "details": { + "name": "float" + } + } + ] + }, + { + "base": "SetLocalHeight", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Set Local Height" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Set Local Height is invoked" + }, + "details": { + "name": "Set Local Height", + "tooltip": "Modifes the top and bottom offsets relative to the element's anchors" + }, + "params": [ + { + "typeid": "{EA2C3E90-AFBE-44D4-A90D-FAAF79BAF93D}", + "details": { + "name": "Local Height", + "tooltip": "The height of the element based off its offsets" + } + } + ] + }, + { + "base": "GetLocalWidth", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Get Local Width" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Get Local Width is invoked" + }, + "details": { + "name": "Get Local Width", + "tooltip": "Gets the width of the element based off its offsets" + }, + "results": [ + { + "typeid": "{EA2C3E90-AFBE-44D4-A90D-FAAF79BAF93D}", + "details": { + "name": "float" + } + } + ] + }, + { + "base": "SetPivotAndAdjustOffsets", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Set Pivot And Adjust Offsets" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Set Pivot And Adjust Offsets is invoked" + }, + "details": { + "name": "Set Pivot And Adjust Offsets", + "tooltip": "Sets the pivot and adjusts the offsets so that the element stays in the same place" + }, + "params": [ + { + "typeid": "{3D80F623-C85C-4741-90D0-E4E66164E6BF}", + "details": { + "name": "Pivot", + "tooltip": "The pivot" + } + } + ] + }, + { + "base": "SetLocalWidth", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Set Local Width" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Set Local Width is invoked" + }, + "details": { + "name": "Set Local Width", + "tooltip": "Modifies the left and right offsets relative to the element's anchors" + }, + "params": [ + { + "typeid": "{EA2C3E90-AFBE-44D4-A90D-FAAF79BAF93D}", + "details": { + "name": "Local Width", + "tooltip": "The width of the element based off its offsets" + } + } + ] + }, + { + "base": "GetOffsets", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Get Offsets" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Get Offsets is invoked" + }, + "details": { + "name": "Get Offsets", + "tooltip": "Gets the offsets" + }, + "results": [ + { + "typeid": "{F681BA9D-245C-4630-B20E-05DD752FAD57}", + "details": { + "name": "Offsets" + } + } + ] + }, + { + "base": "SetAnchors", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Set Anchors" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Set Anchors is invoked" + }, + "details": { + "name": "Set Anchors", + "tooltip": "Sets the anchors" + }, + "params": [ + { + "typeid": "{65D4346C-FB16-4CB0-9BDC-1185B122C4A9}", + "details": { + "name": "Anchors", + "tooltip": "The anchors" + } + }, + { + "typeid": "{A0CA880C-AFE4-43CB-926C-59AC48496112}", + "details": { + "name": "Adjust Offsets", + "tooltip": "Indicates whether the offsets are adjusted to keep the rectangle in the same position" + } + }, + { + "typeid": "{A0CA880C-AFE4-43CB-926C-59AC48496112}", + "details": { + "name": "Allow Push", + "tooltip": "Only takes effect if the anchors are invalid. If true, when an anchor is changed to overlap the anchor opposite it, the opposite anchor moves" + } + } + ] + }, + { + "base": "GetAnchors", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Get Anchors" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Get Anchors is invoked" + }, + "details": { + "name": "Get Anchors", + "tooltip": "Gets the anchors" + }, + "results": [ + { + "typeid": "{65D4346C-FB16-4CB0-9BDC-1185B122C4A9}", + "details": { + "name": "Anchors" + } + } + ] + }, + { + "base": "SetOffsets", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Set Offsets" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Set Offsets is invoked" + }, + "details": { + "name": "Set Offsets", + "tooltip": "Sets the offsets" + }, + "params": [ + { + "typeid": "{F681BA9D-245C-4630-B20E-05DD752FAD57}", + "details": { + "name": "Offsets", + "tooltip": "The offsets" + } + } + ] + } + ] + } + ] +} \ No newline at end of file diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/EBus/Senders/UiTransformBus.names b/Gems/ScriptCanvas/Assets/TranslationAssets/EBus/Senders/UiTransformBus.names new file mode 100644 index 0000000000..d432305852 --- /dev/null +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/EBus/Senders/UiTransformBus.names @@ -0,0 +1,653 @@ +{ + "entries": [ + { + "base": "UiTransformBus", + "context": "EBusSender", + "variant": "", + "details": { + "name": "UI Transform", + "category": "UI" + }, + "methods": [ + { + "base": "GetPivotY", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Get PivotY" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Get PivotY is invoked" + }, + "details": { + "name": "Get PivotY" + }, + "results": [ + { + "typeid": "{EA2C3E90-AFBE-44D4-A90D-FAAF79BAF93D}", + "details": { + "name": "float" + } + } + ] + }, + { + "base": "GetScaleX", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Get ScaleX" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Get ScaleX is invoked" + }, + "details": { + "name": "Get ScaleX" + }, + "results": [ + { + "typeid": "{EA2C3E90-AFBE-44D4-A90D-FAAF79BAF93D}", + "details": { + "name": "float" + } + } + ] + }, + { + "base": "GetScale", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Get Scale" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Get Scale is invoked" + }, + "details": { + "name": "Get Scale" + }, + "results": [ + { + "typeid": "{3D80F623-C85C-4741-90D0-E4E66164E6BF}", + "details": { + "name": "Vector 2" + } + } + ] + }, + { + "base": "SetLocalPositionX", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Set Local PositionX" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Set Local PositionX is invoked" + }, + "details": { + "name": "Set Local PositionX" + }, + "params": [ + { + "typeid": "{EA2C3E90-AFBE-44D4-A90D-FAAF79BAF93D}", + "details": { + "name": "float" + } + } + ] + }, + { + "base": "SetScaleX", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Set ScaleX" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Set ScaleX is invoked" + }, + "details": { + "name": "Set ScaleX" + }, + "params": [ + { + "typeid": "{EA2C3E90-AFBE-44D4-A90D-FAAF79BAF93D}", + "details": { + "name": "float" + } + } + ] + }, + { + "base": "SetZRotation", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke SetZ Rotation" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after SetZ Rotation is invoked" + }, + "details": { + "name": "SetZ Rotation" + }, + "params": [ + { + "typeid": "{EA2C3E90-AFBE-44D4-A90D-FAAF79BAF93D}", + "details": { + "name": "float" + } + } + ] + }, + { + "base": "GetScaleToDeviceMode", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Get Scale To Device Mode" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Get Scale To Device Mode is invoked" + }, + "details": { + "name": "Get Scale To Device Mode" + }, + "results": [ + { + "typeid": "{72039442-EB38-4D42-A1AD-CB68F7E0EEF6}", + "details": { + "name": "int" + } + } + ] + }, + { + "base": "SetPivot", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Set Pivot" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Set Pivot is invoked" + }, + "details": { + "name": "Set Pivot" + }, + "params": [ + { + "typeid": "{3D80F623-C85C-4741-90D0-E4E66164E6BF}", + "details": { + "name": "Vector 2" + } + } + ] + }, + { + "base": "GetScaleY", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Get ScaleY" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Get ScaleY is invoked" + }, + "details": { + "name": "Get ScaleY" + }, + "results": [ + { + "typeid": "{EA2C3E90-AFBE-44D4-A90D-FAAF79BAF93D}", + "details": { + "name": "float" + } + } + ] + }, + { + "base": "MoveLocalPositionBy", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Move Local Position By" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Move Local Position By is invoked" + }, + "details": { + "name": "Move Local Position By" + }, + "params": [ + { + "typeid": "{3D80F623-C85C-4741-90D0-E4E66164E6BF}", + "details": { + "name": "Vector 2" + } + } + ] + }, + { + "base": "SetLocalPositionY", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Set Local PositionY" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Set Local PositionY is invoked" + }, + "details": { + "name": "Set Local PositionY" + }, + "params": [ + { + "typeid": "{EA2C3E90-AFBE-44D4-A90D-FAAF79BAF93D}", + "details": { + "name": "float" + } + } + ] + }, + { + "base": "SetViewportPosition", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Set Viewport Position" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Set Viewport Position is invoked" + }, + "details": { + "name": "Set Viewport Position" + }, + "params": [ + { + "typeid": "{3D80F623-C85C-4741-90D0-E4E66164E6BF}", + "details": { + "name": "Vector 2" + } + } + ] + }, + { + "base": "SetScaleToDeviceMode", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Set Scale To Device Mode" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Set Scale To Device Mode is invoked" + }, + "details": { + "name": "Set Scale To Device Mode" + }, + "params": [ + { + "typeid": "{72039442-EB38-4D42-A1AD-CB68F7E0EEF6}", + "details": { + "name": "int" + } + } + ] + }, + { + "base": "GetLocalPositionX", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Get Local PositionX" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Get Local PositionX is invoked" + }, + "details": { + "name": "Get Local PositionX" + }, + "results": [ + { + "typeid": "{EA2C3E90-AFBE-44D4-A90D-FAAF79BAF93D}", + "details": { + "name": "float" + } + } + ] + }, + { + "base": "MoveCanvasPositionBy", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Move Canvas Position By" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Move Canvas Position By is invoked" + }, + "details": { + "name": "Move Canvas Position By" + }, + "params": [ + { + "typeid": "{3D80F623-C85C-4741-90D0-E4E66164E6BF}", + "details": { + "name": "Vector 2" + } + } + ] + }, + { + "base": "SetPivotX", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Set PivotX" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Set PivotX is invoked" + }, + "details": { + "name": "Set PivotX" + }, + "params": [ + { + "typeid": "{EA2C3E90-AFBE-44D4-A90D-FAAF79BAF93D}", + "details": { + "name": "float" + } + } + ] + }, + { + "base": "MoveViewportPositionBy", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Move Viewport Position By" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Move Viewport Position By is invoked" + }, + "details": { + "name": "Move Viewport Position By" + }, + "params": [ + { + "typeid": "{3D80F623-C85C-4741-90D0-E4E66164E6BF}", + "details": { + "name": "Vector 2" + } + } + ] + }, + { + "base": "SetPivotY", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Set PivotY" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Set PivotY is invoked" + }, + "details": { + "name": "Set PivotY" + }, + "params": [ + { + "typeid": "{EA2C3E90-AFBE-44D4-A90D-FAAF79BAF93D}", + "details": { + "name": "float" + } + } + ] + }, + { + "base": "GetViewportPosition", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Get Viewport Position" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Get Viewport Position is invoked" + }, + "details": { + "name": "Get Viewport Position" + }, + "results": [ + { + "typeid": "{3D80F623-C85C-4741-90D0-E4E66164E6BF}", + "details": { + "name": "Vector 2" + } + } + ] + }, + { + "base": "SetScale", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Set Scale" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Set Scale is invoked" + }, + "details": { + "name": "Set Scale" + }, + "params": [ + { + "typeid": "{3D80F623-C85C-4741-90D0-E4E66164E6BF}", + "details": { + "name": "Vector 2" + } + } + ] + }, + { + "base": "SetLocalPosition", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Set Local Position" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Set Local Position is invoked" + }, + "details": { + "name": "Set Local Position" + }, + "params": [ + { + "typeid": "{3D80F623-C85C-4741-90D0-E4E66164E6BF}", + "details": { + "name": "Vector 2" + } + } + ] + }, + { + "base": "GetCanvasPosition", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Get Canvas Position" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Get Canvas Position is invoked" + }, + "details": { + "name": "Get Canvas Position" + }, + "results": [ + { + "typeid": "{3D80F623-C85C-4741-90D0-E4E66164E6BF}", + "details": { + "name": "Vector 2" + } + } + ] + }, + { + "base": "GetPivotX", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Get PivotX" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Get PivotX is invoked" + }, + "details": { + "name": "Get PivotX" + }, + "results": [ + { + "typeid": "{EA2C3E90-AFBE-44D4-A90D-FAAF79BAF93D}", + "details": { + "name": "float" + } + } + ] + }, + { + "base": "GetZRotation", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke GetZ Rotation" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after GetZ Rotation is invoked" + }, + "details": { + "name": "GetZ Rotation" + }, + "results": [ + { + "typeid": "{EA2C3E90-AFBE-44D4-A90D-FAAF79BAF93D}", + "details": { + "name": "float" + } + } + ] + }, + { + "base": "GetLocalPosition", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Get Local Position" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Get Local Position is invoked" + }, + "details": { + "name": "Get Local Position" + }, + "results": [ + { + "typeid": "{3D80F623-C85C-4741-90D0-E4E66164E6BF}", + "details": { + "name": "Vector 2" + } + } + ] + }, + { + "base": "SetScaleY", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Set ScaleY" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Set ScaleY is invoked" + }, + "details": { + "name": "Set ScaleY" + }, + "params": [ + { + "typeid": "{EA2C3E90-AFBE-44D4-A90D-FAAF79BAF93D}", + "details": { + "name": "float" + } + } + ] + }, + { + "base": "GetPivot", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Get Pivot" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Get Pivot is invoked" + }, + "details": { + "name": "Get Pivot" + }, + "results": [ + { + "typeid": "{3D80F623-C85C-4741-90D0-E4E66164E6BF}", + "details": { + "name": "Vector 2" + } + } + ] + }, + { + "base": "SetCanvasPosition", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Set Canvas Position" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Set Canvas Position is invoked" + }, + "details": { + "name": "Set Canvas Position" + }, + "params": [ + { + "typeid": "{3D80F623-C85C-4741-90D0-E4E66164E6BF}", + "details": { + "name": "Vector 2" + } + } + ] + }, + { + "base": "GetLocalPositionY", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Get Local PositionY" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Get Local PositionY is invoked" + }, + "details": { + "name": "Get Local PositionY" + }, + "results": [ + { + "typeid": "{EA2C3E90-AFBE-44D4-A90D-FAAF79BAF93D}", + "details": { + "name": "float" + } + } + ] + } + ] + } + ] +} \ No newline at end of file diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/EBus/Senders/ViewportRequestBus.names b/Gems/ScriptCanvas/Assets/TranslationAssets/EBus/Senders/ViewportRequestBus.names new file mode 100644 index 0000000000..bd483d39de --- /dev/null +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/EBus/Senders/ViewportRequestBus.names @@ -0,0 +1,147 @@ +{ + "entries": [ + { + "base": "ViewportRequestBus", + "context": "EBusSender", + "variant": "", + "details": { + "name": "Viewport", + "category": "Rendering" + }, + "methods": [ + { + "base": "SetCameraTransform", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Set Camera Transform" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Set Camera Transform is invoked" + }, + "details": { + "name": "Set Camera Transform" + }, + "params": [ + { + "typeid": "{5D9958E9-9F1E-4985-B532-FFFDE75FEDFD}", + "details": { + "name": "Transform" + } + } + ] + }, + { + "base": "GetCameraProjectionMatrix", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Get Camera Projection Matrix" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Get Camera Projection Matrix is invoked" + }, + "details": { + "name": "Get Camera Projection Matrix" + }, + "results": [ + { + "typeid": "{157193C7-B673-4A2B-8B43-5681DCC3DEC3}", + "details": { + "name": "Matrix 4x 4" + } + } + ] + }, + { + "base": "SetCameraViewMatrix", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Set Camera View Matrix" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Set Camera View Matrix is invoked" + }, + "details": { + "name": "Set Camera View Matrix" + }, + "params": [ + { + "typeid": "{157193C7-B673-4A2B-8B43-5681DCC3DEC3}", + "details": { + "name": "Matrix 4x 4" + } + } + ] + }, + { + "base": "GetCameraViewMatrix", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Get Camera View Matrix" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Get Camera View Matrix is invoked" + }, + "details": { + "name": "Get Camera View Matrix" + }, + "results": [ + { + "typeid": "{157193C7-B673-4A2B-8B43-5681DCC3DEC3}", + "details": { + "name": "Matrix 4x 4" + } + } + ] + }, + { + "base": "SetCameraProjectionMatrix", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Set Camera Projection Matrix" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Set Camera Projection Matrix is invoked" + }, + "details": { + "name": "Set Camera Projection Matrix" + }, + "params": [ + { + "typeid": "{157193C7-B673-4A2B-8B43-5681DCC3DEC3}", + "details": { + "name": "Matrix 4x 4" + } + } + ] + }, + { + "base": "GetCameraTransform", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Get Camera Transform" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Get Camera Transform is invoked" + }, + "details": { + "name": "Get Camera Transform" + }, + "results": [ + { + "typeid": "{5D9958E9-9F1E-4985-B532-FFFDE75FEDFD}", + "details": { + "name": "Transform" + } + } + ] + } + ] + } + ] +} \ No newline at end of file diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/EBus/Senders/WindRequestsBus.names b/Gems/ScriptCanvas/Assets/TranslationAssets/EBus/Senders/WindRequestsBus.names new file mode 100644 index 0000000000..5913af7499 --- /dev/null +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/EBus/Senders/WindRequestsBus.names @@ -0,0 +1,96 @@ +{ + "entries": [ + { + "base": "WindRequestsBus", + "context": "EBusSender", + "variant": "", + "details": { + "name": "Wind" + }, + "methods": [ + { + "base": "GetGlobalWind", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Get Global Wind" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Get Global Wind is invoked" + }, + "details": { + "name": "Get Global Wind" + }, + "results": [ + { + "typeid": "{8379EB7D-01FA-4538-B64B-A6543B4BE73D}", + "details": { + "name": "Global Wind Direction" + } + } + ] + }, + { + "base": "GetWindAtPosition", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Get Wind At Position" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Get Wind At Position is invoked" + }, + "details": { + "name": "Get Wind At Position" + }, + "params": [ + { + "typeid": "{8379EB7D-01FA-4538-B64B-A6543B4BE73D}", + "details": { + "name": "Position" + } + } + ], + "results": [ + { + "typeid": "{8379EB7D-01FA-4538-B64B-A6543B4BE73D}", + "details": { + "name": "Wind Direction" + } + } + ] + }, + { + "base": "GetWindInsideAabb", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Get Wind Inside AABB" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Get Wind Inside AABB is invoked" + }, + "details": { + "name": "Get Wind Inside AABB" + }, + "params": [ + { + "typeid": "{A54C2B36-D5B8-46A1-A529-4EBDBD2450E7}", + "details": { + "name": "AABB" + } + } + ], + "results": [ + { + "typeid": "{8379EB7D-01FA-4538-B64B-A6543B4BE73D}", + "details": { + "name": "Wind Direction" + } + } + ] + } + ] + } + ] +} \ No newline at end of file diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/GlobalMethods/CreateBoxCastRequest.names b/Gems/ScriptCanvas/Assets/TranslationAssets/GlobalMethods/CreateBoxCastRequest.names new file mode 100644 index 0000000000..72b911f0cd --- /dev/null +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/GlobalMethods/CreateBoxCastRequest.names @@ -0,0 +1,77 @@ +{ + "entries": [ + { + "base": "CreateBoxCastRequest", + "context": "Method", + "variant": "", + "details": { + "name": "", + "category": "Globals" + }, + "methods": [ + { + "base": "CreateBoxCastRequest", + "context": "Global", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke CreateBoxCastRequest" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after CreateBoxCastRequest is invoked" + }, + "details": { + "name": "CreateBoxCastRequest", + "category": "Other" + }, + "params": [ + { + "typeid": "{8379EB7D-01FA-4538-B64B-A6543B4BE73D}", + "details": { + "name": "const Vector3&" + } + }, + { + "typeid": "{5D9958E9-9F1E-4985-B532-FFFDE75FEDFD}", + "details": { + "name": "const Transform&" + } + }, + { + "typeid": "{8379EB7D-01FA-4538-B64B-A6543B4BE73D}", + "details": { + "name": "const Vector3&" + } + }, + { + "typeid": "{EA2C3E90-AFBE-44D4-A90D-FAAF79BAF93D}", + "details": { + "name": "float" + } + }, + { + "typeid": "{72B9409A-7D1A-4831-9CFE-FCB3FADD3426}", + "details": { + "name": "unsigned char" + } + }, + { + "typeid": "{E6DA080B-7ED1-4135-A78C-A6A5E495A43E}", + "details": { + "name": "CollisionGroup" + } + } + ], + "results": [ + { + "typeid": "{52F6C536-92F6-4C05-983D-0A74800AE56D}", + "details": { + "name": "ShapeCastRequest" + } + } + ] + } + ] + } + ] +} \ No newline at end of file diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/GlobalMethods/CreateBoxOverlapRequest.names b/Gems/ScriptCanvas/Assets/TranslationAssets/GlobalMethods/CreateBoxOverlapRequest.names new file mode 100644 index 0000000000..984c7008ab --- /dev/null +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/GlobalMethods/CreateBoxOverlapRequest.names @@ -0,0 +1,53 @@ +{ + "entries": [ + { + "base": "CreateBoxOverlapRequest", + "context": "Method", + "variant": "", + "details": { + "name": "", + "category": "Globals" + }, + "methods": [ + { + "base": "CreateBoxOverlapRequest", + "context": "Global", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke CreateBoxOverlapRequest" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after CreateBoxOverlapRequest is invoked" + }, + "details": { + "name": "CreateBoxOverlapRequest", + "category": "Other" + }, + "params": [ + { + "typeid": "{8379EB7D-01FA-4538-B64B-A6543B4BE73D}", + "details": { + "name": "const Vector3&" + } + }, + { + "typeid": "{5D9958E9-9F1E-4985-B532-FFFDE75FEDFD}", + "details": { + "name": "const Transform&" + } + } + ], + "results": [ + { + "typeid": "{3DC986C2-316B-4C54-A0A6-8ABBB8ABCC4A}", + "details": { + "name": "OverlapRequest" + } + } + ] + } + ] + } + ] +} \ No newline at end of file diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/GlobalMethods/CreateCapsuleCastRequest.names b/Gems/ScriptCanvas/Assets/TranslationAssets/GlobalMethods/CreateCapsuleCastRequest.names new file mode 100644 index 0000000000..8ae6f324e6 --- /dev/null +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/GlobalMethods/CreateCapsuleCastRequest.names @@ -0,0 +1,83 @@ +{ + "entries": [ + { + "base": "CreateCapsuleCastRequest", + "context": "Method", + "variant": "", + "details": { + "name": "", + "category": "Globals" + }, + "methods": [ + { + "base": "CreateCapsuleCastRequest", + "context": "Global", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke CreateCapsuleCastRequest" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after CreateCapsuleCastRequest is invoked" + }, + "details": { + "name": "CreateCapsuleCastRequest", + "category": "Other" + }, + "params": [ + { + "typeid": "{EA2C3E90-AFBE-44D4-A90D-FAAF79BAF93D}", + "details": { + "name": "float" + } + }, + { + "typeid": "{EA2C3E90-AFBE-44D4-A90D-FAAF79BAF93D}", + "details": { + "name": "float" + } + }, + { + "typeid": "{5D9958E9-9F1E-4985-B532-FFFDE75FEDFD}", + "details": { + "name": "const Transform&" + } + }, + { + "typeid": "{8379EB7D-01FA-4538-B64B-A6543B4BE73D}", + "details": { + "name": "const Vector3&" + } + }, + { + "typeid": "{EA2C3E90-AFBE-44D4-A90D-FAAF79BAF93D}", + "details": { + "name": "float" + } + }, + { + "typeid": "{72B9409A-7D1A-4831-9CFE-FCB3FADD3426}", + "details": { + "name": "unsigned char" + } + }, + { + "typeid": "{E6DA080B-7ED1-4135-A78C-A6A5E495A43E}", + "details": { + "name": "CollisionGroup" + } + } + ], + "results": [ + { + "typeid": "{52F6C536-92F6-4C05-983D-0A74800AE56D}", + "details": { + "name": "ShapeCastRequest" + } + } + ] + } + ] + } + ] +} \ No newline at end of file diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/GlobalMethods/CreateCapsuleOverlapRequest.names b/Gems/ScriptCanvas/Assets/TranslationAssets/GlobalMethods/CreateCapsuleOverlapRequest.names new file mode 100644 index 0000000000..d9b5f8d555 --- /dev/null +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/GlobalMethods/CreateCapsuleOverlapRequest.names @@ -0,0 +1,59 @@ +{ + "entries": [ + { + "base": "CreateCapsuleOverlapRequest", + "context": "Method", + "variant": "", + "details": { + "name": "", + "category": "Globals" + }, + "methods": [ + { + "base": "CreateCapsuleOverlapRequest", + "context": "Global", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke CreateCapsuleOverlapRequest" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after CreateCapsuleOverlapRequest is invoked" + }, + "details": { + "name": "CreateCapsuleOverlapRequest", + "category": "Other" + }, + "params": [ + { + "typeid": "{EA2C3E90-AFBE-44D4-A90D-FAAF79BAF93D}", + "details": { + "name": "float" + } + }, + { + "typeid": "{EA2C3E90-AFBE-44D4-A90D-FAAF79BAF93D}", + "details": { + "name": "float" + } + }, + { + "typeid": "{5D9958E9-9F1E-4985-B532-FFFDE75FEDFD}", + "details": { + "name": "const Transform&" + } + } + ], + "results": [ + { + "typeid": "{3DC986C2-316B-4C54-A0A6-8ABBB8ABCC4A}", + "details": { + "name": "OverlapRequest" + } + } + ] + } + ] + } + ] +} \ No newline at end of file diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/GlobalMethods/CreateSphereCastRequest.names b/Gems/ScriptCanvas/Assets/TranslationAssets/GlobalMethods/CreateSphereCastRequest.names new file mode 100644 index 0000000000..c8dbbf9509 --- /dev/null +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/GlobalMethods/CreateSphereCastRequest.names @@ -0,0 +1,77 @@ +{ + "entries": [ + { + "base": "CreateSphereCastRequest", + "context": "Method", + "variant": "", + "details": { + "name": "", + "category": "Globals" + }, + "methods": [ + { + "base": "CreateSphereCastRequest", + "context": "Global", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke CreateSphereCastRequest" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after CreateSphereCastRequest is invoked" + }, + "details": { + "name": "CreateSphereCastRequest", + "category": "Other" + }, + "params": [ + { + "typeid": "{EA2C3E90-AFBE-44D4-A90D-FAAF79BAF93D}", + "details": { + "name": "float" + } + }, + { + "typeid": "{5D9958E9-9F1E-4985-B532-FFFDE75FEDFD}", + "details": { + "name": "const Transform&" + } + }, + { + "typeid": "{8379EB7D-01FA-4538-B64B-A6543B4BE73D}", + "details": { + "name": "const Vector3&" + } + }, + { + "typeid": "{EA2C3E90-AFBE-44D4-A90D-FAAF79BAF93D}", + "details": { + "name": "float" + } + }, + { + "typeid": "{72B9409A-7D1A-4831-9CFE-FCB3FADD3426}", + "details": { + "name": "unsigned char" + } + }, + { + "typeid": "{E6DA080B-7ED1-4135-A78C-A6A5E495A43E}", + "details": { + "name": "CollisionGroup" + } + } + ], + "results": [ + { + "typeid": "{52F6C536-92F6-4C05-983D-0A74800AE56D}", + "details": { + "name": "ShapeCastRequest" + } + } + ] + } + ] + } + ] +} \ No newline at end of file diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/GlobalMethods/CreateSphereOverlapRequest.names b/Gems/ScriptCanvas/Assets/TranslationAssets/GlobalMethods/CreateSphereOverlapRequest.names new file mode 100644 index 0000000000..3656d75837 --- /dev/null +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/GlobalMethods/CreateSphereOverlapRequest.names @@ -0,0 +1,53 @@ +{ + "entries": [ + { + "base": "CreateSphereOverlapRequest", + "context": "Method", + "variant": "", + "details": { + "name": "", + "category": "Globals" + }, + "methods": [ + { + "base": "CreateSphereOverlapRequest", + "context": "Global", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke CreateSphereOverlapRequest" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after CreateSphereOverlapRequest is invoked" + }, + "details": { + "name": "CreateSphereOverlapRequest", + "category": "Other" + }, + "params": [ + { + "typeid": "{EA2C3E90-AFBE-44D4-A90D-FAAF79BAF93D}", + "details": { + "name": "float" + } + }, + { + "typeid": "{5D9958E9-9F1E-4985-B532-FFFDE75FEDFD}", + "details": { + "name": "const Transform&" + } + } + ], + "results": [ + { + "typeid": "{3DC986C2-316B-4C54-A0A6-8ABBB8ABCC4A}", + "details": { + "name": "OverlapRequest" + } + } + ] + } + ] + } + ] +} \ No newline at end of file diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/GlobalMethods/GetPhysicsSystem.names b/Gems/ScriptCanvas/Assets/TranslationAssets/GlobalMethods/GetPhysicsSystem.names new file mode 100644 index 0000000000..ddaf1afb71 --- /dev/null +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/GlobalMethods/GetPhysicsSystem.names @@ -0,0 +1,39 @@ +{ + "entries": [ + { + "base": "GetPhysicsSystem", + "context": "Method", + "variant": "", + "details": { + "name": "", + "category": "Globals" + }, + "methods": [ + { + "base": "GetPhysicsSystem", + "context": "Global", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke GetPhysicsSystem" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after GetPhysicsSystem is invoked" + }, + "details": { + "name": "GetPhysicsSystem", + "category": "Other" + }, + "results": [ + { + "typeid": "{B6F4D92A-061B-4CB3-AAB5-984B599A53AE}", + "details": { + "name": "SystemInterface*" + } + } + ] + } + ] + } + ] +} \ No newline at end of file diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/GlobalMethods/SaveShaderVariantListSourceData.names b/Gems/ScriptCanvas/Assets/TranslationAssets/GlobalMethods/SaveShaderVariantListSourceData.names new file mode 100644 index 0000000000..c78a97bab8 --- /dev/null +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/GlobalMethods/SaveShaderVariantListSourceData.names @@ -0,0 +1,53 @@ +{ + "entries": [ + { + "base": "SaveShaderVariantListSourceData", + "context": "Method", + "variant": "", + "details": { + "name": "", + "category": "Globals" + }, + "methods": [ + { + "base": "SaveShaderVariantListSourceData", + "context": "Global", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke SaveShaderVariantListSourceData" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after SaveShaderVariantListSourceData is invoked" + }, + "details": { + "name": "SaveShaderVariantListSourceData", + "category": "Other" + }, + "params": [ + { + "typeid": "{03AAAB3F-5C47-5A66-9EBC-D5FA4DB353C9}", + "details": { + "name": "const AZStd::basic_string, alloc" + } + }, + { + "typeid": "{F8679938-6D3F-47CC-A078-3D6EC0011366}", + "details": { + "name": "const AZ::RPI::ShaderVariantListSourceData&" + } + } + ], + "results": [ + { + "typeid": "{A0CA880C-AFE4-43CB-926C-59AC48496112}", + "details": { + "name": "bool" + } + } + ] + } + ] + } + ] +} \ No newline at end of file diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/GlobalMethods/SettingsRegistry.names b/Gems/ScriptCanvas/Assets/TranslationAssets/GlobalMethods/SettingsRegistry.names new file mode 100644 index 0000000000..8d55c7c22c --- /dev/null +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/GlobalMethods/SettingsRegistry.names @@ -0,0 +1,39 @@ +{ + "entries": [ + { + "base": "SettingsRegistry", + "context": "Method", + "variant": "", + "details": { + "name": "", + "category": "Globals" + }, + "methods": [ + { + "base": "SettingsRegistry", + "context": "Global", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke SettingsRegistry" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after SettingsRegistry is invoked" + }, + "details": { + "name": "SettingsRegistry", + "category": "Other" + }, + "results": [ + { + "typeid": "{795C80A0-D243-473B-972A-C32CA487BAA5}", + "details": { + "name": "SettingsRegistryScriptProxy" + } + } + ] + } + ] + } + ] +} \ No newline at end of file diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/GlobalMethods/Terminate.names b/Gems/ScriptCanvas/Assets/TranslationAssets/GlobalMethods/Terminate.names new file mode 100644 index 0000000000..177cc5510a --- /dev/null +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/GlobalMethods/Terminate.names @@ -0,0 +1,39 @@ +{ + "entries": [ + { + "base": "Terminate", + "context": "Method", + "variant": "", + "details": { + "name": "", + "category": "Globals" + }, + "methods": [ + { + "base": "Terminate", + "context": "Global", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Terminate" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Terminate is invoked" + }, + "details": { + "name": "Terminate", + "category": "Other" + }, + "params": [ + { + "typeid": "{72039442-EB38-4D42-A1AD-CB68F7E0EEF6}", + "details": { + "name": "int" + } + } + ] + } + ] + } + ] +} \ No newline at end of file diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/GlobalMethods/add_layer_node.names b/Gems/ScriptCanvas/Assets/TranslationAssets/GlobalMethods/add_layer_node.names new file mode 100644 index 0000000000..b6732eb7bf --- /dev/null +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/GlobalMethods/add_layer_node.names @@ -0,0 +1,31 @@ +{ + "entries": [ + { + "base": "add_layer_node", + "context": "Method", + "variant": "", + "details": { + "name": "", + "category": "Globals" + }, + "methods": [ + { + "base": "add_layer_node", + "context": "Global", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke add_layer_node" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after add_layer_node is invoked" + }, + "details": { + "name": "add_layer_node", + "category": "Other" + } + } + ] + } + ] +} \ No newline at end of file diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/GlobalMethods/add_node.names b/Gems/ScriptCanvas/Assets/TranslationAssets/GlobalMethods/add_node.names new file mode 100644 index 0000000000..0c7a598968 --- /dev/null +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/GlobalMethods/add_node.names @@ -0,0 +1,45 @@ +{ + "entries": [ + { + "base": "add_node", + "context": "Method", + "variant": "", + "details": { + "name": "", + "category": "Globals" + }, + "methods": [ + { + "base": "add_node", + "context": "Global", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke add_node" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after add_node is invoked" + }, + "details": { + "name": "add_node", + "category": "Other" + }, + "params": [ + { + "typeid": "{3AB0037F-AF8D-48CE-BCA0-A170D18B2C03}", + "details": { + "name": "const char*" + } + }, + { + "typeid": "{3AB0037F-AF8D-48CE-BCA0-A170D18B2C03}", + "details": { + "name": "const char*" + } + } + ] + } + ] + } + ] +} \ No newline at end of file diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/GlobalMethods/add_selected_entities.names b/Gems/ScriptCanvas/Assets/TranslationAssets/GlobalMethods/add_selected_entities.names new file mode 100644 index 0000000000..fa67e69277 --- /dev/null +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/GlobalMethods/add_selected_entities.names @@ -0,0 +1,31 @@ +{ + "entries": [ + { + "base": "add_selected_entities", + "context": "Method", + "variant": "", + "details": { + "name": "", + "category": "Globals" + }, + "methods": [ + { + "base": "add_selected_entities", + "context": "Global", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke add_selected_entities" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after add_selected_entities is invoked" + }, + "details": { + "name": "add_selected_entities", + "category": "Other" + } + } + ] + } + ] +} \ No newline at end of file diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/GlobalMethods/add_track.names b/Gems/ScriptCanvas/Assets/TranslationAssets/GlobalMethods/add_track.names new file mode 100644 index 0000000000..312eafd1d4 --- /dev/null +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/GlobalMethods/add_track.names @@ -0,0 +1,51 @@ +{ + "entries": [ + { + "base": "add_track", + "context": "Method", + "variant": "", + "details": { + "name": "", + "category": "Globals" + }, + "methods": [ + { + "base": "add_track", + "context": "Global", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke add_track" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after add_track is invoked" + }, + "details": { + "name": "add_track", + "category": "Other" + }, + "params": [ + { + "typeid": "{3AB0037F-AF8D-48CE-BCA0-A170D18B2C03}", + "details": { + "name": "const char*" + } + }, + { + "typeid": "{3AB0037F-AF8D-48CE-BCA0-A170D18B2C03}", + "details": { + "name": "const char*" + } + }, + { + "typeid": "{3AB0037F-AF8D-48CE-BCA0-A170D18B2C03}", + "details": { + "name": "const char*" + } + } + ] + } + ] + } + ] +} \ No newline at end of file diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/GlobalMethods/attach_debugger.names b/Gems/ScriptCanvas/Assets/TranslationAssets/GlobalMethods/attach_debugger.names new file mode 100644 index 0000000000..8432caefe0 --- /dev/null +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/GlobalMethods/attach_debugger.names @@ -0,0 +1,39 @@ +{ + "entries": [ + { + "base": "attach_debugger", + "context": "Method", + "variant": "", + "details": { + "name": "", + "category": "Globals" + }, + "methods": [ + { + "base": "attach_debugger", + "context": "Global", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke attach_debugger" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after attach_debugger is invoked" + }, + "details": { + "name": "attach_debugger", + "category": "Other" + }, + "results": [ + { + "typeid": "{A0CA880C-AFE4-43CB-926C-59AC48496112}", + "details": { + "name": "bool" + } + } + ] + } + ] + } + ] +} \ No newline at end of file diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/GlobalMethods/bind_viewport.names b/Gems/ScriptCanvas/Assets/TranslationAssets/GlobalMethods/bind_viewport.names new file mode 100644 index 0000000000..ad2bbcd5f9 --- /dev/null +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/GlobalMethods/bind_viewport.names @@ -0,0 +1,39 @@ +{ + "entries": [ + { + "base": "bind_viewport", + "context": "Method", + "variant": "", + "details": { + "name": "", + "category": "Globals" + }, + "methods": [ + { + "base": "bind_viewport", + "context": "Global", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke bind_viewport" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after bind_viewport is invoked" + }, + "details": { + "name": "bind_viewport", + "category": "Other" + }, + "params": [ + { + "typeid": "{3AB0037F-AF8D-48CE-BCA0-A170D18B2C03}", + "details": { + "name": "const char*" + } + } + ] + } + ] + } + ] +} \ No newline at end of file diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/GlobalMethods/clear_selection.names b/Gems/ScriptCanvas/Assets/TranslationAssets/GlobalMethods/clear_selection.names new file mode 100644 index 0000000000..2105e431b1 --- /dev/null +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/GlobalMethods/clear_selection.names @@ -0,0 +1,39 @@ +{ + "entries": [ + { + "base": "clear_selection", + "context": "Method", + "variant": "", + "details": { + "name": "", + "category": "Globals" + }, + "methods": [ + { + "base": "clear_selection", + "context": "Global", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke clear_selection" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after clear_selection is invoked" + }, + "details": { + "name": "clear_selection", + "category": "Other" + }, + "results": [ + { + "typeid": "{72039442-EB38-4D42-A1AD-CB68F7E0EEF6}", + "details": { + "name": "int" + } + } + ] + } + ] + } + ] +} \ No newline at end of file diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/GlobalMethods/close_pane.names b/Gems/ScriptCanvas/Assets/TranslationAssets/GlobalMethods/close_pane.names new file mode 100644 index 0000000000..cc31fc5bce --- /dev/null +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/GlobalMethods/close_pane.names @@ -0,0 +1,39 @@ +{ + "entries": [ + { + "base": "close_pane", + "context": "Method", + "variant": "", + "details": { + "name": "", + "category": "Globals" + }, + "methods": [ + { + "base": "close_pane", + "context": "Global", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke close_pane" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after close_pane is invoked" + }, + "details": { + "name": "close_pane", + "category": "Other" + }, + "params": [ + { + "typeid": "{3AB0037F-AF8D-48CE-BCA0-A170D18B2C03}", + "details": { + "name": "const char*" + } + } + ] + } + ] + } + ] +} \ No newline at end of file diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/GlobalMethods/combo_box.names b/Gems/ScriptCanvas/Assets/TranslationAssets/GlobalMethods/combo_box.names new file mode 100644 index 0000000000..09d4a594f9 --- /dev/null +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/GlobalMethods/combo_box.names @@ -0,0 +1,59 @@ +{ + "entries": [ + { + "base": "combo_box", + "context": "Method", + "variant": "", + "details": { + "name": "", + "category": "Globals" + }, + "methods": [ + { + "base": "combo_box", + "context": "Global", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke combo_box" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after combo_box is invoked" + }, + "details": { + "name": "combo_box", + "category": "Other" + }, + "params": [ + { + "typeid": "{03AAAB3F-5C47-5A66-9EBC-D5FA4DB353C9}", + "details": { + "name": "AZStd::basic_string, allocator>" + } + }, + { + "typeid": "{99DAD0BC-740E-5E82-826B-8FC7968CC02C}", + "details": { + "name": "AZStd::vector, allocator>, allocator>" + } + }, + { + "typeid": "{72039442-EB38-4D42-A1AD-CB68F7E0EEF6}", + "details": { + "name": "int" + } + } + ], + "results": [ + { + "typeid": "{03AAAB3F-5C47-5A66-9EBC-D5FA4DB353C9}", + "details": { + "name": "AZStd::basic_string, allocator>" + } + } + ] + } + ] + } + ] +} \ No newline at end of file diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/GlobalMethods/crash.names b/Gems/ScriptCanvas/Assets/TranslationAssets/GlobalMethods/crash.names new file mode 100644 index 0000000000..c45360fa27 --- /dev/null +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/GlobalMethods/crash.names @@ -0,0 +1,31 @@ +{ + "entries": [ + { + "base": "crash", + "context": "Method", + "variant": "", + "details": { + "name": "", + "category": "Globals" + }, + "methods": [ + { + "base": "crash", + "context": "Global", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke crash" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after crash is invoked" + }, + "details": { + "name": "crash", + "category": "Other" + } + } + ] + } + ] +} \ No newline at end of file diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/GlobalMethods/create_level.names b/Gems/ScriptCanvas/Assets/TranslationAssets/GlobalMethods/create_level.names new file mode 100644 index 0000000000..f893c6e77d --- /dev/null +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/GlobalMethods/create_level.names @@ -0,0 +1,65 @@ +{ + "entries": [ + { + "base": "create_level", + "context": "Method", + "variant": "", + "details": { + "name": "", + "category": "Globals" + }, + "methods": [ + { + "base": "create_level", + "context": "Global", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke create_level" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after create_level is invoked" + }, + "details": { + "name": "create_level", + "category": "Other" + }, + "params": [ + { + "typeid": "{3AB0037F-AF8D-48CE-BCA0-A170D18B2C03}", + "details": { + "name": "const char*" + } + }, + { + "typeid": "{72039442-EB38-4D42-A1AD-CB68F7E0EEF6}", + "details": { + "name": "int" + } + }, + { + "typeid": "{72039442-EB38-4D42-A1AD-CB68F7E0EEF6}", + "details": { + "name": "int" + } + }, + { + "typeid": "{A0CA880C-AFE4-43CB-926C-59AC48496112}", + "details": { + "name": "bool" + } + } + ], + "results": [ + { + "typeid": "{72039442-EB38-4D42-A1AD-CB68F7E0EEF6}", + "details": { + "name": "int" + } + } + ] + } + ] + } + ] +} \ No newline at end of file diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/GlobalMethods/create_level_no_prompt.names b/Gems/ScriptCanvas/Assets/TranslationAssets/GlobalMethods/create_level_no_prompt.names new file mode 100644 index 0000000000..82185c453f --- /dev/null +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/GlobalMethods/create_level_no_prompt.names @@ -0,0 +1,71 @@ +{ + "entries": [ + { + "base": "create_level_no_prompt", + "context": "Method", + "variant": "", + "details": { + "name": "", + "category": "Globals" + }, + "methods": [ + { + "base": "create_level_no_prompt", + "context": "Global", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke create_level_no_prompt" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after create_level_no_prompt is invoked" + }, + "details": { + "name": "create_level_no_prompt", + "category": "Other" + }, + "params": [ + { + "typeid": "{3AB0037F-AF8D-48CE-BCA0-A170D18B2C03}", + "details": { + "name": "const char*" + } + }, + { + "typeid": "{72039442-EB38-4D42-A1AD-CB68F7E0EEF6}", + "details": { + "name": "int" + } + }, + { + "typeid": "{72039442-EB38-4D42-A1AD-CB68F7E0EEF6}", + "details": { + "name": "int" + } + }, + { + "typeid": "{72039442-EB38-4D42-A1AD-CB68F7E0EEF6}", + "details": { + "name": "int" + } + }, + { + "typeid": "{A0CA880C-AFE4-43CB-926C-59AC48496112}", + "details": { + "name": "bool" + } + } + ], + "results": [ + { + "typeid": "{72039442-EB38-4D42-A1AD-CB68F7E0EEF6}", + "details": { + "name": "int" + } + } + ] + } + ] + } + ] +} \ No newline at end of file diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/GlobalMethods/delete_node.names b/Gems/ScriptCanvas/Assets/TranslationAssets/GlobalMethods/delete_node.names new file mode 100644 index 0000000000..689a66a1c6 --- /dev/null +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/GlobalMethods/delete_node.names @@ -0,0 +1,45 @@ +{ + "entries": [ + { + "base": "delete_node", + "context": "Method", + "variant": "", + "details": { + "name": "", + "category": "Globals" + }, + "methods": [ + { + "base": "delete_node", + "context": "Global", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke delete_node" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after delete_node is invoked" + }, + "details": { + "name": "delete_node", + "category": "Other" + }, + "params": [ + { + "typeid": "{7114E998-A8B4-519B-9342-A86D1587B4F7}", + "details": { + "name": "AZStd::basic_string_view>" + } + }, + { + "typeid": "{7114E998-A8B4-519B-9342-A86D1587B4F7}", + "details": { + "name": "AZStd::basic_string_view>" + } + } + ] + } + ] + } + ] +} \ No newline at end of file diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/GlobalMethods/delete_object.names b/Gems/ScriptCanvas/Assets/TranslationAssets/GlobalMethods/delete_object.names new file mode 100644 index 0000000000..13c8aae783 --- /dev/null +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/GlobalMethods/delete_object.names @@ -0,0 +1,39 @@ +{ + "entries": [ + { + "base": "delete_object", + "context": "Method", + "variant": "", + "details": { + "name": "", + "category": "Globals" + }, + "methods": [ + { + "base": "delete_object", + "context": "Global", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke delete_object" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after delete_object is invoked" + }, + "details": { + "name": "delete_object", + "category": "Other" + }, + "params": [ + { + "typeid": "{3AB0037F-AF8D-48CE-BCA0-A170D18B2C03}", + "details": { + "name": "const char*" + } + } + ] + } + ] + } + ] +} \ No newline at end of file diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/GlobalMethods/delete_selected.names b/Gems/ScriptCanvas/Assets/TranslationAssets/GlobalMethods/delete_selected.names new file mode 100644 index 0000000000..bc09f6f0af --- /dev/null +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/GlobalMethods/delete_selected.names @@ -0,0 +1,31 @@ +{ + "entries": [ + { + "base": "delete_selected", + "context": "Method", + "variant": "", + "details": { + "name": "", + "category": "Globals" + }, + "methods": [ + { + "base": "delete_selected", + "context": "Global", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke delete_selected" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after delete_selected is invoked" + }, + "details": { + "name": "delete_selected", + "category": "Other" + } + } + ] + } + ] +} \ No newline at end of file diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/GlobalMethods/delete_sequence.names b/Gems/ScriptCanvas/Assets/TranslationAssets/GlobalMethods/delete_sequence.names new file mode 100644 index 0000000000..64ec10e0ac --- /dev/null +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/GlobalMethods/delete_sequence.names @@ -0,0 +1,39 @@ +{ + "entries": [ + { + "base": "delete_sequence", + "context": "Method", + "variant": "", + "details": { + "name": "", + "category": "Globals" + }, + "methods": [ + { + "base": "delete_sequence", + "context": "Global", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke delete_sequence" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after delete_sequence is invoked" + }, + "details": { + "name": "delete_sequence", + "category": "Other" + }, + "params": [ + { + "typeid": "{3AB0037F-AF8D-48CE-BCA0-A170D18B2C03}", + "details": { + "name": "const char*" + } + } + ] + } + ] + } + ] +} \ No newline at end of file diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/GlobalMethods/delete_track.names b/Gems/ScriptCanvas/Assets/TranslationAssets/GlobalMethods/delete_track.names new file mode 100644 index 0000000000..ca1f49b29c --- /dev/null +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/GlobalMethods/delete_track.names @@ -0,0 +1,57 @@ +{ + "entries": [ + { + "base": "delete_track", + "context": "Method", + "variant": "", + "details": { + "name": "", + "category": "Globals" + }, + "methods": [ + { + "base": "delete_track", + "context": "Global", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke delete_track" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after delete_track is invoked" + }, + "details": { + "name": "delete_track", + "category": "Other" + }, + "params": [ + { + "typeid": "{3AB0037F-AF8D-48CE-BCA0-A170D18B2C03}", + "details": { + "name": "const char*" + } + }, + { + "typeid": "{43DA906B-7DEF-4CA8-9790-854106D3F983}", + "details": { + "name": "unsigned int" + } + }, + { + "typeid": "{3AB0037F-AF8D-48CE-BCA0-A170D18B2C03}", + "details": { + "name": "const char*" + } + }, + { + "typeid": "{3AB0037F-AF8D-48CE-BCA0-A170D18B2C03}", + "details": { + "name": "const char*" + } + } + ] + } + ] + } + ] +} \ No newline at end of file diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/GlobalMethods/draw_label.names b/Gems/ScriptCanvas/Assets/TranslationAssets/GlobalMethods/draw_label.names new file mode 100644 index 0000000000..cff6a5c812 --- /dev/null +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/GlobalMethods/draw_label.names @@ -0,0 +1,81 @@ +{ + "entries": [ + { + "base": "draw_label", + "context": "Method", + "variant": "", + "details": { + "name": "", + "category": "Globals" + }, + "methods": [ + { + "base": "draw_label", + "context": "Global", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke draw_label" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after draw_label is invoked" + }, + "details": { + "name": "draw_label", + "category": "Other" + }, + "params": [ + { + "typeid": "{72039442-EB38-4D42-A1AD-CB68F7E0EEF6}", + "details": { + "name": "int" + } + }, + { + "typeid": "{72039442-EB38-4D42-A1AD-CB68F7E0EEF6}", + "details": { + "name": "int" + } + }, + { + "typeid": "{EA2C3E90-AFBE-44D4-A90D-FAAF79BAF93D}", + "details": { + "name": "float" + } + }, + { + "typeid": "{EA2C3E90-AFBE-44D4-A90D-FAAF79BAF93D}", + "details": { + "name": "float" + } + }, + { + "typeid": "{EA2C3E90-AFBE-44D4-A90D-FAAF79BAF93D}", + "details": { + "name": "float" + } + }, + { + "typeid": "{EA2C3E90-AFBE-44D4-A90D-FAAF79BAF93D}", + "details": { + "name": "float" + } + }, + { + "typeid": "{EA2C3E90-AFBE-44D4-A90D-FAAF79BAF93D}", + "details": { + "name": "float" + } + }, + { + "typeid": "{3AB0037F-AF8D-48CE-BCA0-A170D18B2C03}", + "details": { + "name": "const char*" + } + } + ] + } + ] + } + ] +} \ No newline at end of file diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/GlobalMethods/dump_exposed_classes.names b/Gems/ScriptCanvas/Assets/TranslationAssets/GlobalMethods/dump_exposed_classes.names new file mode 100644 index 0000000000..d7b1bf9d23 --- /dev/null +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/GlobalMethods/dump_exposed_classes.names @@ -0,0 +1,39 @@ +{ + "entries": [ + { + "base": "dump_exposed_classes", + "context": "Method", + "variant": "", + "details": { + "name": "", + "category": "Globals" + }, + "methods": [ + { + "base": "dump_exposed_classes", + "context": "Global", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke dump_exposed_classes" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after dump_exposed_classes is invoked" + }, + "details": { + "name": "dump_exposed_classes", + "category": "Other" + }, + "results": [ + { + "typeid": "{03AAAB3F-5C47-5A66-9EBC-D5FA4DB353C9}", + "details": { + "name": "AZStd::basic_string, allocator>" + } + } + ] + } + ] + } + ] +} \ No newline at end of file diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/GlobalMethods/edit_box.names b/Gems/ScriptCanvas/Assets/TranslationAssets/GlobalMethods/edit_box.names new file mode 100644 index 0000000000..59b1eea8db --- /dev/null +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/GlobalMethods/edit_box.names @@ -0,0 +1,47 @@ +{ + "entries": [ + { + "base": "edit_box", + "context": "Method", + "variant": "", + "details": { + "name": "", + "category": "Globals" + }, + "methods": [ + { + "base": "edit_box", + "context": "Global", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke edit_box" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after edit_box is invoked" + }, + "details": { + "name": "edit_box", + "category": "Other" + }, + "params": [ + { + "typeid": "{7114E998-A8B4-519B-9342-A86D1587B4F7}", + "details": { + "name": "AZStd::basic_string_view>" + } + } + ], + "results": [ + { + "typeid": "{03AAAB3F-5C47-5A66-9EBC-D5FA4DB353C9}", + "details": { + "name": "AZStd::basic_string, allocator>" + } + } + ] + } + ] + } + ] +} \ No newline at end of file diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/GlobalMethods/edit_box_check_data_type.names b/Gems/ScriptCanvas/Assets/TranslationAssets/GlobalMethods/edit_box_check_data_type.names new file mode 100644 index 0000000000..582787dc7b --- /dev/null +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/GlobalMethods/edit_box_check_data_type.names @@ -0,0 +1,47 @@ +{ + "entries": [ + { + "base": "edit_box_check_data_type", + "context": "Method", + "variant": "", + "details": { + "name": "", + "category": "Globals" + }, + "methods": [ + { + "base": "edit_box_check_data_type", + "context": "Global", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke edit_box_check_data_type" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after edit_box_check_data_type is invoked" + }, + "details": { + "name": "edit_box_check_data_type", + "category": "Other" + }, + "params": [ + { + "typeid": "{3AB0037F-AF8D-48CE-BCA0-A170D18B2C03}", + "details": { + "name": "const char*" + } + } + ], + "results": [ + { + "typeid": "{03924488-C7F4-4D6D-948B-ABC2D1AE2FD3}", + "details": { + "name": "any" + } + } + ] + } + ] + } + ] +} \ No newline at end of file diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/GlobalMethods/enable_for_all.names b/Gems/ScriptCanvas/Assets/TranslationAssets/GlobalMethods/enable_for_all.names new file mode 100644 index 0000000000..c32a111c5d --- /dev/null +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/GlobalMethods/enable_for_all.names @@ -0,0 +1,47 @@ +{ + "entries": [ + { + "base": "enable_for_all", + "context": "Method", + "variant": "", + "details": { + "name": "", + "category": "Globals" + }, + "methods": [ + { + "base": "enable_for_all", + "context": "Global", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke enable_for_all" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after enable_for_all is invoked" + }, + "details": { + "name": "enable_for_all", + "category": "Other" + }, + "params": [ + { + "typeid": "{A0CA880C-AFE4-43CB-926C-59AC48496112}", + "details": { + "name": "bool" + } + } + ], + "results": [ + { + "typeid": "{A0CA880C-AFE4-43CB-926C-59AC48496112}", + "details": { + "name": "bool" + } + } + ] + } + ] + } + ] +} \ No newline at end of file diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/GlobalMethods/enter_game_mode.names b/Gems/ScriptCanvas/Assets/TranslationAssets/GlobalMethods/enter_game_mode.names new file mode 100644 index 0000000000..84e713519b --- /dev/null +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/GlobalMethods/enter_game_mode.names @@ -0,0 +1,31 @@ +{ + "entries": [ + { + "base": "enter_game_mode", + "context": "Method", + "variant": "", + "details": { + "name": "", + "category": "Globals" + }, + "methods": [ + { + "base": "enter_game_mode", + "context": "Global", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke enter_game_mode" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after enter_game_mode is invoked" + }, + "details": { + "name": "enter_game_mode", + "category": "Other" + } + } + ] + } + ] +} \ No newline at end of file diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/GlobalMethods/enter_simulation_mode.names b/Gems/ScriptCanvas/Assets/TranslationAssets/GlobalMethods/enter_simulation_mode.names new file mode 100644 index 0000000000..67a399c5b2 --- /dev/null +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/GlobalMethods/enter_simulation_mode.names @@ -0,0 +1,31 @@ +{ + "entries": [ + { + "base": "enter_simulation_mode", + "context": "Method", + "variant": "", + "details": { + "name": "", + "category": "Globals" + }, + "methods": [ + { + "base": "enter_simulation_mode", + "context": "Global", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke enter_simulation_mode" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after enter_simulation_mode is invoked" + }, + "details": { + "name": "enter_simulation_mode", + "category": "Other" + } + } + ] + } + ] +} \ No newline at end of file diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/GlobalMethods/execute_command.names b/Gems/ScriptCanvas/Assets/TranslationAssets/GlobalMethods/execute_command.names new file mode 100644 index 0000000000..7410e5a7b6 --- /dev/null +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/GlobalMethods/execute_command.names @@ -0,0 +1,39 @@ +{ + "entries": [ + { + "base": "execute_command", + "context": "Method", + "variant": "", + "details": { + "name": "", + "category": "Globals" + }, + "methods": [ + { + "base": "execute_command", + "context": "Global", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke execute_command" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after execute_command is invoked" + }, + "details": { + "name": "execute_command", + "category": "Other" + }, + "params": [ + { + "typeid": "{3AB0037F-AF8D-48CE-BCA0-A170D18B2C03}", + "details": { + "name": "const char*" + } + } + ] + } + ] + } + ] +} \ No newline at end of file diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/GlobalMethods/exit.names b/Gems/ScriptCanvas/Assets/TranslationAssets/GlobalMethods/exit.names new file mode 100644 index 0000000000..335edab62c --- /dev/null +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/GlobalMethods/exit.names @@ -0,0 +1,31 @@ +{ + "entries": [ + { + "base": "exit", + "context": "Method", + "variant": "", + "details": { + "name": "", + "category": "Globals" + }, + "methods": [ + { + "base": "exit", + "context": "Global", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke exit" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after exit is invoked" + }, + "details": { + "name": "exit", + "category": "Other" + } + } + ] + } + ] +} \ No newline at end of file diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/GlobalMethods/exit_game_mode.names b/Gems/ScriptCanvas/Assets/TranslationAssets/GlobalMethods/exit_game_mode.names new file mode 100644 index 0000000000..e202395b15 --- /dev/null +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/GlobalMethods/exit_game_mode.names @@ -0,0 +1,31 @@ +{ + "entries": [ + { + "base": "exit_game_mode", + "context": "Method", + "variant": "", + "details": { + "name": "", + "category": "Globals" + }, + "methods": [ + { + "base": "exit_game_mode", + "context": "Global", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke exit_game_mode" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after exit_game_mode is invoked" + }, + "details": { + "name": "exit_game_mode", + "category": "Other" + } + } + ] + } + ] +} \ No newline at end of file diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/GlobalMethods/exit_no_prompt.names b/Gems/ScriptCanvas/Assets/TranslationAssets/GlobalMethods/exit_no_prompt.names new file mode 100644 index 0000000000..240fac0896 --- /dev/null +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/GlobalMethods/exit_no_prompt.names @@ -0,0 +1,31 @@ +{ + "entries": [ + { + "base": "exit_no_prompt", + "context": "Method", + "variant": "", + "details": { + "name": "", + "category": "Globals" + }, + "methods": [ + { + "base": "exit_no_prompt", + "context": "Global", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke exit_no_prompt" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after exit_no_prompt is invoked" + }, + "details": { + "name": "exit_no_prompt", + "category": "Other" + } + } + ] + } + ] +} \ No newline at end of file diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/GlobalMethods/exit_simulation_mode.names b/Gems/ScriptCanvas/Assets/TranslationAssets/GlobalMethods/exit_simulation_mode.names new file mode 100644 index 0000000000..1fbf1ae15a --- /dev/null +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/GlobalMethods/exit_simulation_mode.names @@ -0,0 +1,31 @@ +{ + "entries": [ + { + "base": "exit_simulation_mode", + "context": "Method", + "variant": "", + "details": { + "name": "", + "category": "Globals" + }, + "methods": [ + { + "base": "exit_simulation_mode", + "context": "Global", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke exit_simulation_mode" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after exit_simulation_mode is invoked" + }, + "details": { + "name": "exit_simulation_mode", + "category": "Other" + } + } + ] + } + ] +} \ No newline at end of file diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/GlobalMethods/export_to_engine.names b/Gems/ScriptCanvas/Assets/TranslationAssets/GlobalMethods/export_to_engine.names new file mode 100644 index 0000000000..1201f008b6 --- /dev/null +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/GlobalMethods/export_to_engine.names @@ -0,0 +1,39 @@ +{ + "entries": [ + { + "base": "export_to_engine", + "context": "Method", + "variant": "", + "details": { + "name": "", + "category": "Globals" + }, + "methods": [ + { + "base": "export_to_engine", + "context": "Global", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke export_to_engine" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after export_to_engine is invoked" + }, + "details": { + "name": "export_to_engine", + "category": "Other" + }, + "results": [ + { + "typeid": "{A0CA880C-AFE4-43CB-926C-59AC48496112}", + "details": { + "name": "bool" + } + } + ] + } + ] + } + ] +} \ No newline at end of file diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/GlobalMethods/find_editor_entity.names b/Gems/ScriptCanvas/Assets/TranslationAssets/GlobalMethods/find_editor_entity.names new file mode 100644 index 0000000000..f4a6511cb0 --- /dev/null +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/GlobalMethods/find_editor_entity.names @@ -0,0 +1,48 @@ +{ + "entries": [ + { + "base": "find_editor_entity", + "context": "Method", + "variant": "", + "details": { + "name": "", + "category": "Globals" + }, + "methods": [ + { + "base": "find_editor_entity", + "context": "Global", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke find_editor_entity" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after find_editor_entity is invoked" + }, + "details": { + "name": "find_editor_entity", + "category": "Other" + }, + "params": [ + { + "typeid": "{3AB0037F-AF8D-48CE-BCA0-A170D18B2C03}", + "details": { + "name": "const char*" + } + } + ], + "results": [ + { + "typeid": "{6383F1D3-BB27-4E6B-A49A-6409B2059EAA}", + "details": { + "name": "EntityId", + "tooltip": "Entity Unique Id" + } + } + ] + } + ] + } + ] +} \ No newline at end of file diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/GlobalMethods/find_game_entity.names b/Gems/ScriptCanvas/Assets/TranslationAssets/GlobalMethods/find_game_entity.names new file mode 100644 index 0000000000..49edae2728 --- /dev/null +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/GlobalMethods/find_game_entity.names @@ -0,0 +1,48 @@ +{ + "entries": [ + { + "base": "find_game_entity", + "context": "Method", + "variant": "", + "details": { + "name": "", + "category": "Globals" + }, + "methods": [ + { + "base": "find_game_entity", + "context": "Global", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke find_game_entity" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after find_game_entity is invoked" + }, + "details": { + "name": "find_game_entity", + "category": "Other" + }, + "params": [ + { + "typeid": "{3AB0037F-AF8D-48CE-BCA0-A170D18B2C03}", + "details": { + "name": "const char*" + } + } + ], + "results": [ + { + "typeid": "{6383F1D3-BB27-4E6B-A49A-6409B2059EAA}", + "details": { + "name": "EntityId", + "tooltip": "Entity Unique Id" + } + } + ] + } + ] + } + ] +} \ No newline at end of file diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/GlobalMethods/freeze_object.names b/Gems/ScriptCanvas/Assets/TranslationAssets/GlobalMethods/freeze_object.names new file mode 100644 index 0000000000..86902f625d --- /dev/null +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/GlobalMethods/freeze_object.names @@ -0,0 +1,39 @@ +{ + "entries": [ + { + "base": "freeze_object", + "context": "Method", + "variant": "", + "details": { + "name": "", + "category": "Globals" + }, + "methods": [ + { + "base": "freeze_object", + "context": "Global", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke freeze_object" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after freeze_object is invoked" + }, + "details": { + "name": "freeze_object", + "category": "Other" + }, + "params": [ + { + "typeid": "{3AB0037F-AF8D-48CE-BCA0-A170D18B2C03}", + "details": { + "name": "const char*" + } + } + ] + } + ] + } + ] +} \ No newline at end of file diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/GlobalMethods/get_active_viewport.names b/Gems/ScriptCanvas/Assets/TranslationAssets/GlobalMethods/get_active_viewport.names new file mode 100644 index 0000000000..d8df792445 --- /dev/null +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/GlobalMethods/get_active_viewport.names @@ -0,0 +1,39 @@ +{ + "entries": [ + { + "base": "get_active_viewport", + "context": "Method", + "variant": "", + "details": { + "name": "", + "category": "Globals" + }, + "methods": [ + { + "base": "get_active_viewport", + "context": "Global", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke get_active_viewport" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after get_active_viewport is invoked" + }, + "details": { + "name": "get_active_viewport", + "category": "Other" + }, + "results": [ + { + "typeid": "{43DA906B-7DEF-4CA8-9790-854106D3F983}", + "details": { + "name": "unsigned int" + } + } + ] + } + ] + } + ] +} \ No newline at end of file diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/GlobalMethods/get_all_objects.names b/Gems/ScriptCanvas/Assets/TranslationAssets/GlobalMethods/get_all_objects.names new file mode 100644 index 0000000000..d39e48c0d9 --- /dev/null +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/GlobalMethods/get_all_objects.names @@ -0,0 +1,39 @@ +{ + "entries": [ + { + "base": "get_all_objects", + "context": "Method", + "variant": "", + "details": { + "name": "", + "category": "Globals" + }, + "methods": [ + { + "base": "get_all_objects", + "context": "Global", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke get_all_objects" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after get_all_objects is invoked" + }, + "details": { + "name": "get_all_objects", + "category": "Other" + }, + "results": [ + { + "typeid": "{99DAD0BC-740E-5E82-826B-8FC7968CC02C}", + "details": { + "name": "AZStd::vector, allocator>, allocator>" + } + } + ] + } + ] + } + ] +} \ No newline at end of file diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/GlobalMethods/get_axis_constraint.names b/Gems/ScriptCanvas/Assets/TranslationAssets/GlobalMethods/get_axis_constraint.names new file mode 100644 index 0000000000..8b7e6c5217 --- /dev/null +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/GlobalMethods/get_axis_constraint.names @@ -0,0 +1,39 @@ +{ + "entries": [ + { + "base": "get_axis_constraint", + "context": "Method", + "variant": "", + "details": { + "name": "", + "category": "Globals" + }, + "methods": [ + { + "base": "get_axis_constraint", + "context": "Global", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke get_axis_constraint" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after get_axis_constraint is invoked" + }, + "details": { + "name": "get_axis_constraint", + "category": "Other" + }, + "results": [ + { + "typeid": "{3AB0037F-AF8D-48CE-BCA0-A170D18B2C03}", + "details": { + "name": "const char*" + } + } + ] + } + ] + } + ] +} \ No newline at end of file diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/GlobalMethods/get_config_platform.names b/Gems/ScriptCanvas/Assets/TranslationAssets/GlobalMethods/get_config_platform.names new file mode 100644 index 0000000000..c330306110 --- /dev/null +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/GlobalMethods/get_config_platform.names @@ -0,0 +1,39 @@ +{ + "entries": [ + { + "base": "get_config_platform", + "context": "Method", + "variant": "", + "details": { + "name": "", + "category": "Globals" + }, + "methods": [ + { + "base": "get_config_platform", + "context": "Global", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke get_config_platform" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after get_config_platform is invoked" + }, + "details": { + "name": "get_config_platform", + "category": "Other" + }, + "results": [ + { + "typeid": "{72039442-EB38-4D42-A1AD-CB68F7E0EEF6}", + "details": { + "name": "int" + } + } + ] + } + ] + } + ] +} \ No newline at end of file diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/GlobalMethods/get_config_spec.names b/Gems/ScriptCanvas/Assets/TranslationAssets/GlobalMethods/get_config_spec.names new file mode 100644 index 0000000000..e20edd59c6 --- /dev/null +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/GlobalMethods/get_config_spec.names @@ -0,0 +1,39 @@ +{ + "entries": [ + { + "base": "get_config_spec", + "context": "Method", + "variant": "", + "details": { + "name": "", + "category": "Globals" + }, + "methods": [ + { + "base": "get_config_spec", + "context": "Global", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke get_config_spec" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after get_config_spec is invoked" + }, + "details": { + "name": "get_config_spec", + "category": "Other" + }, + "results": [ + { + "typeid": "{72039442-EB38-4D42-A1AD-CB68F7E0EEF6}", + "details": { + "name": "int" + } + } + ] + } + ] + } + ] +} \ No newline at end of file diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/GlobalMethods/get_current_level_name.names b/Gems/ScriptCanvas/Assets/TranslationAssets/GlobalMethods/get_current_level_name.names new file mode 100644 index 0000000000..8c8833b372 --- /dev/null +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/GlobalMethods/get_current_level_name.names @@ -0,0 +1,39 @@ +{ + "entries": [ + { + "base": "get_current_level_name", + "context": "Method", + "variant": "", + "details": { + "name": "", + "category": "Globals" + }, + "methods": [ + { + "base": "get_current_level_name", + "context": "Global", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke get_current_level_name" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after get_current_level_name is invoked" + }, + "details": { + "name": "get_current_level_name", + "category": "Other" + }, + "results": [ + { + "typeid": "{3AB0037F-AF8D-48CE-BCA0-A170D18B2C03}", + "details": { + "name": "const char*" + } + } + ] + } + ] + } + ] +} \ No newline at end of file diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/GlobalMethods/get_current_level_path.names b/Gems/ScriptCanvas/Assets/TranslationAssets/GlobalMethods/get_current_level_path.names new file mode 100644 index 0000000000..846b236e48 --- /dev/null +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/GlobalMethods/get_current_level_path.names @@ -0,0 +1,39 @@ +{ + "entries": [ + { + "base": "get_current_level_path", + "context": "Method", + "variant": "", + "details": { + "name": "", + "category": "Globals" + }, + "methods": [ + { + "base": "get_current_level_path", + "context": "Global", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke get_current_level_path" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after get_current_level_path is invoked" + }, + "details": { + "name": "get_current_level_path", + "category": "Other" + }, + "results": [ + { + "typeid": "{3AB0037F-AF8D-48CE-BCA0-A170D18B2C03}", + "details": { + "name": "const char*" + } + } + ] + } + ] + } + ] +} \ No newline at end of file diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/GlobalMethods/get_current_view_position.names b/Gems/ScriptCanvas/Assets/TranslationAssets/GlobalMethods/get_current_view_position.names new file mode 100644 index 0000000000..c5509b1cf9 --- /dev/null +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/GlobalMethods/get_current_view_position.names @@ -0,0 +1,39 @@ +{ + "entries": [ + { + "base": "get_current_view_position", + "context": "Method", + "variant": "", + "details": { + "name": "", + "category": "Globals" + }, + "methods": [ + { + "base": "get_current_view_position", + "context": "Global", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke get_current_view_position" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after get_current_view_position is invoked" + }, + "details": { + "name": "get_current_view_position", + "category": "Other" + }, + "results": [ + { + "typeid": "{8379EB7D-01FA-4538-B64B-A6543B4BE73D}", + "details": { + "name": "Vector3" + } + } + ] + } + ] + } + ] +} \ No newline at end of file diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/GlobalMethods/get_current_view_rotation.names b/Gems/ScriptCanvas/Assets/TranslationAssets/GlobalMethods/get_current_view_rotation.names new file mode 100644 index 0000000000..f2de184318 --- /dev/null +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/GlobalMethods/get_current_view_rotation.names @@ -0,0 +1,39 @@ +{ + "entries": [ + { + "base": "get_current_view_rotation", + "context": "Method", + "variant": "", + "details": { + "name": "", + "category": "Globals" + }, + "methods": [ + { + "base": "get_current_view_rotation", + "context": "Global", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke get_current_view_rotation" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after get_current_view_rotation is invoked" + }, + "details": { + "name": "get_current_view_rotation", + "category": "Other" + }, + "results": [ + { + "typeid": "{8379EB7D-01FA-4538-B64B-A6543B4BE73D}", + "details": { + "name": "Vector3" + } + } + ] + } + ] + } + ] +} \ No newline at end of file diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/GlobalMethods/get_cvar.names b/Gems/ScriptCanvas/Assets/TranslationAssets/GlobalMethods/get_cvar.names new file mode 100644 index 0000000000..e3acfc818b --- /dev/null +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/GlobalMethods/get_cvar.names @@ -0,0 +1,47 @@ +{ + "entries": [ + { + "base": "get_cvar", + "context": "Method", + "variant": "", + "details": { + "name": "", + "category": "Globals" + }, + "methods": [ + { + "base": "get_cvar", + "context": "Global", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke get_cvar" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after get_cvar is invoked" + }, + "details": { + "name": "get_cvar", + "category": "Other" + }, + "params": [ + { + "typeid": "{3AB0037F-AF8D-48CE-BCA0-A170D18B2C03}", + "details": { + "name": "const char*" + } + } + ], + "results": [ + { + "typeid": "{3AB0037F-AF8D-48CE-BCA0-A170D18B2C03}", + "details": { + "name": "const char*" + } + } + ] + } + ] + } + ] +} \ No newline at end of file diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/GlobalMethods/get_file_alias.names b/Gems/ScriptCanvas/Assets/TranslationAssets/GlobalMethods/get_file_alias.names new file mode 100644 index 0000000000..f52c2db932 --- /dev/null +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/GlobalMethods/get_file_alias.names @@ -0,0 +1,47 @@ +{ + "entries": [ + { + "base": "get_file_alias", + "context": "Method", + "variant": "", + "details": { + "name": "", + "category": "Globals" + }, + "methods": [ + { + "base": "get_file_alias", + "context": "Global", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke get_file_alias" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after get_file_alias is invoked" + }, + "details": { + "name": "get_file_alias", + "category": "Other" + }, + "params": [ + { + "typeid": "{03AAAB3F-5C47-5A66-9EBC-D5FA4DB353C9}", + "details": { + "name": "AZStd::basic_string, allocator>" + } + } + ], + "results": [ + { + "typeid": "{03AAAB3F-5C47-5A66-9EBC-D5FA4DB353C9}", + "details": { + "name": "AZStd::basic_string, allocator>" + } + } + ] + } + ] + } + ] +} \ No newline at end of file diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/GlobalMethods/get_game_folder.names b/Gems/ScriptCanvas/Assets/TranslationAssets/GlobalMethods/get_game_folder.names new file mode 100644 index 0000000000..67e6a1cebe --- /dev/null +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/GlobalMethods/get_game_folder.names @@ -0,0 +1,39 @@ +{ + "entries": [ + { + "base": "get_game_folder", + "context": "Method", + "variant": "", + "details": { + "name": "", + "category": "Globals" + }, + "methods": [ + { + "base": "get_game_folder", + "context": "Global", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke get_game_folder" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after get_game_folder is invoked" + }, + "details": { + "name": "get_game_folder", + "category": "Other" + }, + "results": [ + { + "typeid": "{03AAAB3F-5C47-5A66-9EBC-D5FA4DB353C9}", + "details": { + "name": "AZStd::basic_string, allocator>" + } + } + ] + } + ] + } + ] +} \ No newline at end of file diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/GlobalMethods/get_interpolated_value.names b/Gems/ScriptCanvas/Assets/TranslationAssets/GlobalMethods/get_interpolated_value.names new file mode 100644 index 0000000000..76229b6777 --- /dev/null +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/GlobalMethods/get_interpolated_value.names @@ -0,0 +1,71 @@ +{ + "entries": [ + { + "base": "get_interpolated_value", + "context": "Method", + "variant": "", + "details": { + "name": "", + "category": "Globals" + }, + "methods": [ + { + "base": "get_interpolated_value", + "context": "Global", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke get_interpolated_value" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after get_interpolated_value is invoked" + }, + "details": { + "name": "get_interpolated_value", + "category": "Other" + }, + "params": [ + { + "typeid": "{3AB0037F-AF8D-48CE-BCA0-A170D18B2C03}", + "details": { + "name": "const char*" + } + }, + { + "typeid": "{72039442-EB38-4D42-A1AD-CB68F7E0EEF6}", + "details": { + "name": "int" + } + }, + { + "typeid": "{EA2C3E90-AFBE-44D4-A90D-FAAF79BAF93D}", + "details": { + "name": "float" + } + }, + { + "typeid": "{3AB0037F-AF8D-48CE-BCA0-A170D18B2C03}", + "details": { + "name": "const char*" + } + }, + { + "typeid": "{3AB0037F-AF8D-48CE-BCA0-A170D18B2C03}", + "details": { + "name": "const char*" + } + } + ], + "results": [ + { + "typeid": "{03924488-C7F4-4D6D-948B-ABC2D1AE2FD3}", + "details": { + "name": "any" + } + } + ] + } + ] + } + ] +} \ No newline at end of file diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/GlobalMethods/get_key_value.names b/Gems/ScriptCanvas/Assets/TranslationAssets/GlobalMethods/get_key_value.names new file mode 100644 index 0000000000..25ff2b7731 --- /dev/null +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/GlobalMethods/get_key_value.names @@ -0,0 +1,71 @@ +{ + "entries": [ + { + "base": "get_key_value", + "context": "Method", + "variant": "", + "details": { + "name": "", + "category": "Globals" + }, + "methods": [ + { + "base": "get_key_value", + "context": "Global", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke get_key_value" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after get_key_value is invoked" + }, + "details": { + "name": "get_key_value", + "category": "Other" + }, + "params": [ + { + "typeid": "{3AB0037F-AF8D-48CE-BCA0-A170D18B2C03}", + "details": { + "name": "const char*" + } + }, + { + "typeid": "{72039442-EB38-4D42-A1AD-CB68F7E0EEF6}", + "details": { + "name": "int" + } + }, + { + "typeid": "{72039442-EB38-4D42-A1AD-CB68F7E0EEF6}", + "details": { + "name": "int" + } + }, + { + "typeid": "{3AB0037F-AF8D-48CE-BCA0-A170D18B2C03}", + "details": { + "name": "const char*" + } + }, + { + "typeid": "{3AB0037F-AF8D-48CE-BCA0-A170D18B2C03}", + "details": { + "name": "const char*" + } + } + ], + "results": [ + { + "typeid": "{03924488-C7F4-4D6D-948B-ABC2D1AE2FD3}", + "details": { + "name": "any" + } + } + ] + } + ] + } + ] +} \ No newline at end of file diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/GlobalMethods/get_misc_editor_settings.names b/Gems/ScriptCanvas/Assets/TranslationAssets/GlobalMethods/get_misc_editor_settings.names new file mode 100644 index 0000000000..613c0322cb --- /dev/null +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/GlobalMethods/get_misc_editor_settings.names @@ -0,0 +1,39 @@ +{ + "entries": [ + { + "base": "get_misc_editor_settings", + "context": "Method", + "variant": "", + "details": { + "name": "", + "category": "Globals" + }, + "methods": [ + { + "base": "get_misc_editor_settings", + "context": "Global", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke get_misc_editor_settings" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after get_misc_editor_settings is invoked" + }, + "details": { + "name": "get_misc_editor_settings", + "category": "Other" + }, + "results": [ + { + "typeid": "{72039442-EB38-4D42-A1AD-CB68F7E0EEF6}", + "details": { + "name": "int" + } + } + ] + } + ] + } + ] +} \ No newline at end of file diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/GlobalMethods/get_names_of_selected_objects.names b/Gems/ScriptCanvas/Assets/TranslationAssets/GlobalMethods/get_names_of_selected_objects.names new file mode 100644 index 0000000000..fd53f4eabb --- /dev/null +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/GlobalMethods/get_names_of_selected_objects.names @@ -0,0 +1,39 @@ +{ + "entries": [ + { + "base": "get_names_of_selected_objects", + "context": "Method", + "variant": "", + "details": { + "name": "", + "category": "Globals" + }, + "methods": [ + { + "base": "get_names_of_selected_objects", + "context": "Global", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke get_names_of_selected_objects" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after get_names_of_selected_objects is invoked" + }, + "details": { + "name": "get_names_of_selected_objects", + "category": "Other" + }, + "results": [ + { + "typeid": "{99DAD0BC-740E-5E82-826B-8FC7968CC02C}", + "details": { + "name": "AZStd::vector, allocator>, allocator>" + } + } + ] + } + ] + } + ] +} \ No newline at end of file diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/GlobalMethods/get_node_name.names b/Gems/ScriptCanvas/Assets/TranslationAssets/GlobalMethods/get_node_name.names new file mode 100644 index 0000000000..2ea9de8513 --- /dev/null +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/GlobalMethods/get_node_name.names @@ -0,0 +1,53 @@ +{ + "entries": [ + { + "base": "get_node_name", + "context": "Method", + "variant": "", + "details": { + "name": "", + "category": "Globals" + }, + "methods": [ + { + "base": "get_node_name", + "context": "Global", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke get_node_name" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after get_node_name is invoked" + }, + "details": { + "name": "get_node_name", + "category": "Other" + }, + "params": [ + { + "typeid": "{72039442-EB38-4D42-A1AD-CB68F7E0EEF6}", + "details": { + "name": "int" + } + }, + { + "typeid": "{7114E998-A8B4-519B-9342-A86D1587B4F7}", + "details": { + "name": "AZStd::basic_string_view>" + } + } + ], + "results": [ + { + "typeid": "{03AAAB3F-5C47-5A66-9EBC-D5FA4DB353C9}", + "details": { + "name": "AZStd::basic_string, allocator>" + } + } + ] + } + ] + } + ] +} \ No newline at end of file diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/GlobalMethods/get_num_nodes.names b/Gems/ScriptCanvas/Assets/TranslationAssets/GlobalMethods/get_num_nodes.names new file mode 100644 index 0000000000..87a6db5f5a --- /dev/null +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/GlobalMethods/get_num_nodes.names @@ -0,0 +1,47 @@ +{ + "entries": [ + { + "base": "get_num_nodes", + "context": "Method", + "variant": "", + "details": { + "name": "", + "category": "Globals" + }, + "methods": [ + { + "base": "get_num_nodes", + "context": "Global", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke get_num_nodes" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after get_num_nodes is invoked" + }, + "details": { + "name": "get_num_nodes", + "category": "Other" + }, + "params": [ + { + "typeid": "{7114E998-A8B4-519B-9342-A86D1587B4F7}", + "details": { + "name": "AZStd::basic_string_view>" + } + } + ], + "results": [ + { + "typeid": "{72039442-EB38-4D42-A1AD-CB68F7E0EEF6}", + "details": { + "name": "int" + } + } + ] + } + ] + } + ] +} \ No newline at end of file diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/GlobalMethods/get_num_selected.names b/Gems/ScriptCanvas/Assets/TranslationAssets/GlobalMethods/get_num_selected.names new file mode 100644 index 0000000000..3761118834 --- /dev/null +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/GlobalMethods/get_num_selected.names @@ -0,0 +1,39 @@ +{ + "entries": [ + { + "base": "get_num_selected", + "context": "Method", + "variant": "", + "details": { + "name": "", + "category": "Globals" + }, + "methods": [ + { + "base": "get_num_selected", + "context": "Global", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke get_num_selected" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after get_num_selected is invoked" + }, + "details": { + "name": "get_num_selected", + "category": "Other" + }, + "results": [ + { + "typeid": "{72039442-EB38-4D42-A1AD-CB68F7E0EEF6}", + "details": { + "name": "int" + } + } + ] + } + ] + } + ] +} \ No newline at end of file diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/GlobalMethods/get_num_sequences.names b/Gems/ScriptCanvas/Assets/TranslationAssets/GlobalMethods/get_num_sequences.names new file mode 100644 index 0000000000..74ba982883 --- /dev/null +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/GlobalMethods/get_num_sequences.names @@ -0,0 +1,39 @@ +{ + "entries": [ + { + "base": "get_num_sequences", + "context": "Method", + "variant": "", + "details": { + "name": "", + "category": "Globals" + }, + "methods": [ + { + "base": "get_num_sequences", + "context": "Global", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke get_num_sequences" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after get_num_sequences is invoked" + }, + "details": { + "name": "get_num_sequences", + "category": "Other" + }, + "results": [ + { + "typeid": "{72039442-EB38-4D42-A1AD-CB68F7E0EEF6}", + "details": { + "name": "int" + } + } + ] + } + ] + } + ] +} \ No newline at end of file diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/GlobalMethods/get_num_track_keys.names b/Gems/ScriptCanvas/Assets/TranslationAssets/GlobalMethods/get_num_track_keys.names new file mode 100644 index 0000000000..cbaf89bc8c --- /dev/null +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/GlobalMethods/get_num_track_keys.names @@ -0,0 +1,65 @@ +{ + "entries": [ + { + "base": "get_num_track_keys", + "context": "Method", + "variant": "", + "details": { + "name": "", + "category": "Globals" + }, + "methods": [ + { + "base": "get_num_track_keys", + "context": "Global", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke get_num_track_keys" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after get_num_track_keys is invoked" + }, + "details": { + "name": "get_num_track_keys", + "category": "Other" + }, + "params": [ + { + "typeid": "{3AB0037F-AF8D-48CE-BCA0-A170D18B2C03}", + "details": { + "name": "const char*" + } + }, + { + "typeid": "{72039442-EB38-4D42-A1AD-CB68F7E0EEF6}", + "details": { + "name": "int" + } + }, + { + "typeid": "{3AB0037F-AF8D-48CE-BCA0-A170D18B2C03}", + "details": { + "name": "const char*" + } + }, + { + "typeid": "{3AB0037F-AF8D-48CE-BCA0-A170D18B2C03}", + "details": { + "name": "const char*" + } + } + ], + "results": [ + { + "typeid": "{72039442-EB38-4D42-A1AD-CB68F7E0EEF6}", + "details": { + "name": "int" + } + } + ] + } + ] + } + ] +} \ No newline at end of file diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/GlobalMethods/get_pak_from_file.names b/Gems/ScriptCanvas/Assets/TranslationAssets/GlobalMethods/get_pak_from_file.names new file mode 100644 index 0000000000..ec00c17b40 --- /dev/null +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/GlobalMethods/get_pak_from_file.names @@ -0,0 +1,47 @@ +{ + "entries": [ + { + "base": "get_pak_from_file", + "context": "Method", + "variant": "", + "details": { + "name": "", + "category": "Globals" + }, + "methods": [ + { + "base": "get_pak_from_file", + "context": "Global", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke get_pak_from_file" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after get_pak_from_file is invoked" + }, + "details": { + "name": "get_pak_from_file", + "category": "Other" + }, + "params": [ + { + "typeid": "{3AB0037F-AF8D-48CE-BCA0-A170D18B2C03}", + "details": { + "name": "const char*" + } + } + ], + "results": [ + { + "typeid": "{03AAAB3F-5C47-5A66-9EBC-D5FA4DB353C9}", + "details": { + "name": "AZStd::basic_string, allocator>" + } + } + ] + } + ] + } + ] +} \ No newline at end of file diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/GlobalMethods/get_pane_class_names.names b/Gems/ScriptCanvas/Assets/TranslationAssets/GlobalMethods/get_pane_class_names.names new file mode 100644 index 0000000000..52b66ebbb0 --- /dev/null +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/GlobalMethods/get_pane_class_names.names @@ -0,0 +1,39 @@ +{ + "entries": [ + { + "base": "get_pane_class_names", + "context": "Method", + "variant": "", + "details": { + "name": "", + "category": "Globals" + }, + "methods": [ + { + "base": "get_pane_class_names", + "context": "Global", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke get_pane_class_names" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after get_pane_class_names is invoked" + }, + "details": { + "name": "get_pane_class_names", + "category": "Other" + }, + "results": [ + { + "typeid": "{99DAD0BC-740E-5E82-826B-8FC7968CC02C}", + "details": { + "name": "AZStd::vector, allocator>, allocator>" + } + } + ] + } + ] + } + ] +} \ No newline at end of file diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/GlobalMethods/get_position.names b/Gems/ScriptCanvas/Assets/TranslationAssets/GlobalMethods/get_position.names new file mode 100644 index 0000000000..31de8b96dc --- /dev/null +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/GlobalMethods/get_position.names @@ -0,0 +1,47 @@ +{ + "entries": [ + { + "base": "get_position", + "context": "Method", + "variant": "", + "details": { + "name": "", + "category": "Globals" + }, + "methods": [ + { + "base": "get_position", + "context": "Global", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke get_position" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after get_position is invoked" + }, + "details": { + "name": "get_position", + "category": "Other" + }, + "params": [ + { + "typeid": "{3AB0037F-AF8D-48CE-BCA0-A170D18B2C03}", + "details": { + "name": "const char*" + } + } + ], + "results": [ + { + "typeid": "{8379EB7D-01FA-4538-B64B-A6543B4BE73D}", + "details": { + "name": "Vector3" + } + } + ] + } + ] + } + ] +} \ No newline at end of file diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/GlobalMethods/get_rotation.names b/Gems/ScriptCanvas/Assets/TranslationAssets/GlobalMethods/get_rotation.names new file mode 100644 index 0000000000..4d5c644b46 --- /dev/null +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/GlobalMethods/get_rotation.names @@ -0,0 +1,47 @@ +{ + "entries": [ + { + "base": "get_rotation", + "context": "Method", + "variant": "", + "details": { + "name": "", + "category": "Globals" + }, + "methods": [ + { + "base": "get_rotation", + "context": "Global", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke get_rotation" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after get_rotation is invoked" + }, + "details": { + "name": "get_rotation", + "category": "Other" + }, + "params": [ + { + "typeid": "{3AB0037F-AF8D-48CE-BCA0-A170D18B2C03}", + "details": { + "name": "const char*" + } + } + ], + "results": [ + { + "typeid": "{8379EB7D-01FA-4538-B64B-A6543B4BE73D}", + "details": { + "name": "Vector3" + } + } + ] + } + ] + } + ] +} \ No newline at end of file diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/GlobalMethods/get_scale.names b/Gems/ScriptCanvas/Assets/TranslationAssets/GlobalMethods/get_scale.names new file mode 100644 index 0000000000..c444d34332 --- /dev/null +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/GlobalMethods/get_scale.names @@ -0,0 +1,47 @@ +{ + "entries": [ + { + "base": "get_scale", + "context": "Method", + "variant": "", + "details": { + "name": "", + "category": "Globals" + }, + "methods": [ + { + "base": "get_scale", + "context": "Global", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke get_scale" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after get_scale is invoked" + }, + "details": { + "name": "get_scale", + "category": "Other" + }, + "params": [ + { + "typeid": "{3AB0037F-AF8D-48CE-BCA0-A170D18B2C03}", + "details": { + "name": "const char*" + } + } + ], + "results": [ + { + "typeid": "{8379EB7D-01FA-4538-B64B-A6543B4BE73D}", + "details": { + "name": "Vector3" + } + } + ] + } + ] + } + ] +} \ No newline at end of file diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/GlobalMethods/get_selection_aabb.names b/Gems/ScriptCanvas/Assets/TranslationAssets/GlobalMethods/get_selection_aabb.names new file mode 100644 index 0000000000..e0835c4823 --- /dev/null +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/GlobalMethods/get_selection_aabb.names @@ -0,0 +1,39 @@ +{ + "entries": [ + { + "base": "get_selection_aabb", + "context": "Method", + "variant": "", + "details": { + "name": "", + "category": "Globals" + }, + "methods": [ + { + "base": "get_selection_aabb", + "context": "Global", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke get_selection_aabb" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after get_selection_aabb is invoked" + }, + "details": { + "name": "get_selection_aabb", + "category": "Other" + }, + "results": [ + { + "typeid": "{A54C2B36-D5B8-46A1-A529-4EBDBD2450E7}", + "details": { + "name": "Aabb" + } + } + ] + } + ] + } + ] +} \ No newline at end of file diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/GlobalMethods/get_selection_center.names b/Gems/ScriptCanvas/Assets/TranslationAssets/GlobalMethods/get_selection_center.names new file mode 100644 index 0000000000..445ef2d2ac --- /dev/null +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/GlobalMethods/get_selection_center.names @@ -0,0 +1,39 @@ +{ + "entries": [ + { + "base": "get_selection_center", + "context": "Method", + "variant": "", + "details": { + "name": "", + "category": "Globals" + }, + "methods": [ + { + "base": "get_selection_center", + "context": "Global", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke get_selection_center" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after get_selection_center is invoked" + }, + "details": { + "name": "get_selection_center", + "category": "Other" + }, + "results": [ + { + "typeid": "{8379EB7D-01FA-4538-B64B-A6543B4BE73D}", + "details": { + "name": "Vector3" + } + } + ] + } + ] + } + ] +} \ No newline at end of file diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/GlobalMethods/get_sequence_name.names b/Gems/ScriptCanvas/Assets/TranslationAssets/GlobalMethods/get_sequence_name.names new file mode 100644 index 0000000000..83482c09d2 --- /dev/null +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/GlobalMethods/get_sequence_name.names @@ -0,0 +1,47 @@ +{ + "entries": [ + { + "base": "get_sequence_name", + "context": "Method", + "variant": "", + "details": { + "name": "", + "category": "Globals" + }, + "methods": [ + { + "base": "get_sequence_name", + "context": "Global", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke get_sequence_name" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after get_sequence_name is invoked" + }, + "details": { + "name": "get_sequence_name", + "category": "Other" + }, + "params": [ + { + "typeid": "{43DA906B-7DEF-4CA8-9790-854106D3F983}", + "details": { + "name": "unsigned int" + } + } + ], + "results": [ + { + "typeid": "{03AAAB3F-5C47-5A66-9EBC-D5FA4DB353C9}", + "details": { + "name": "AZStd::basic_string, allocator>" + } + } + ] + } + ] + } + ] +} \ No newline at end of file diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/GlobalMethods/get_sequence_time_range.names b/Gems/ScriptCanvas/Assets/TranslationAssets/GlobalMethods/get_sequence_time_range.names new file mode 100644 index 0000000000..2231d6c807 --- /dev/null +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/GlobalMethods/get_sequence_time_range.names @@ -0,0 +1,47 @@ +{ + "entries": [ + { + "base": "get_sequence_time_range", + "context": "Method", + "variant": "", + "details": { + "name": "", + "category": "Globals" + }, + "methods": [ + { + "base": "get_sequence_time_range", + "context": "Global", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke get_sequence_time_range" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after get_sequence_time_range is invoked" + }, + "details": { + "name": "get_sequence_time_range", + "category": "Other" + }, + "params": [ + { + "typeid": "{3AB0037F-AF8D-48CE-BCA0-A170D18B2C03}", + "details": { + "name": "const char*" + } + } + ], + "results": [ + { + "typeid": "{515CF4CF-4992-4139-BDE5-42A887432B45}", + "details": { + "name": "Range" + } + } + ] + } + ] + } + ] +} \ No newline at end of file diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/GlobalMethods/get_view_pane_layout.names b/Gems/ScriptCanvas/Assets/TranslationAssets/GlobalMethods/get_view_pane_layout.names new file mode 100644 index 0000000000..aa014dcab8 --- /dev/null +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/GlobalMethods/get_view_pane_layout.names @@ -0,0 +1,39 @@ +{ + "entries": [ + { + "base": "get_view_pane_layout", + "context": "Method", + "variant": "", + "details": { + "name": "", + "category": "Globals" + }, + "methods": [ + { + "base": "get_view_pane_layout", + "context": "Global", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke get_view_pane_layout" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after get_view_pane_layout is invoked" + }, + "details": { + "name": "get_view_pane_layout", + "category": "Other" + }, + "results": [ + { + "typeid": "{43DA906B-7DEF-4CA8-9790-854106D3F983}", + "details": { + "name": "unsigned int" + } + } + ] + } + ] + } + ] +} \ No newline at end of file diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/GlobalMethods/get_viewport_count.names b/Gems/ScriptCanvas/Assets/TranslationAssets/GlobalMethods/get_viewport_count.names new file mode 100644 index 0000000000..462816b556 --- /dev/null +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/GlobalMethods/get_viewport_count.names @@ -0,0 +1,39 @@ +{ + "entries": [ + { + "base": "get_viewport_count", + "context": "Method", + "variant": "", + "details": { + "name": "", + "category": "Globals" + }, + "methods": [ + { + "base": "get_viewport_count", + "context": "Global", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke get_viewport_count" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after get_viewport_count is invoked" + }, + "details": { + "name": "get_viewport_count", + "category": "Other" + }, + "results": [ + { + "typeid": "{43DA906B-7DEF-4CA8-9790-854106D3F983}", + "details": { + "name": "unsigned int" + } + } + ] + } + ] + } + ] +} \ No newline at end of file diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/GlobalMethods/get_viewport_expansion_policy.names b/Gems/ScriptCanvas/Assets/TranslationAssets/GlobalMethods/get_viewport_expansion_policy.names new file mode 100644 index 0000000000..04ee539630 --- /dev/null +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/GlobalMethods/get_viewport_expansion_policy.names @@ -0,0 +1,39 @@ +{ + "entries": [ + { + "base": "get_viewport_expansion_policy", + "context": "Method", + "variant": "", + "details": { + "name": "", + "category": "Globals" + }, + "methods": [ + { + "base": "get_viewport_expansion_policy", + "context": "Global", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke get_viewport_expansion_policy" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after get_viewport_expansion_policy is invoked" + }, + "details": { + "name": "get_viewport_expansion_policy", + "category": "Other" + }, + "results": [ + { + "typeid": "{3AB0037F-AF8D-48CE-BCA0-A170D18B2C03}", + "details": { + "name": "const char*" + } + } + ] + } + ] + } + ] +} \ No newline at end of file diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/GlobalMethods/get_viewport_size.names b/Gems/ScriptCanvas/Assets/TranslationAssets/GlobalMethods/get_viewport_size.names new file mode 100644 index 0000000000..254dce0763 --- /dev/null +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/GlobalMethods/get_viewport_size.names @@ -0,0 +1,39 @@ +{ + "entries": [ + { + "base": "get_viewport_size", + "context": "Method", + "variant": "", + "details": { + "name": "", + "category": "Globals" + }, + "methods": [ + { + "base": "get_viewport_size", + "context": "Global", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke get_viewport_size" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after get_viewport_size is invoked" + }, + "details": { + "name": "get_viewport_size", + "category": "Other" + }, + "results": [ + { + "typeid": "{3D80F623-C85C-4741-90D0-E4E66164E6BF}", + "details": { + "name": "Vector2" + } + } + ] + } + ] + } + ] +} \ No newline at end of file diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/GlobalMethods/hide_all_objects.names b/Gems/ScriptCanvas/Assets/TranslationAssets/GlobalMethods/hide_all_objects.names new file mode 100644 index 0000000000..61bc6e2f23 --- /dev/null +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/GlobalMethods/hide_all_objects.names @@ -0,0 +1,31 @@ +{ + "entries": [ + { + "base": "hide_all_objects", + "context": "Method", + "variant": "", + "details": { + "name": "", + "category": "Globals" + }, + "methods": [ + { + "base": "hide_all_objects", + "context": "Global", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke hide_all_objects" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after hide_all_objects is invoked" + }, + "details": { + "name": "hide_all_objects", + "category": "Other" + } + } + ] + } + ] +} \ No newline at end of file diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/GlobalMethods/hide_object.names b/Gems/ScriptCanvas/Assets/TranslationAssets/GlobalMethods/hide_object.names new file mode 100644 index 0000000000..4df0d7458b --- /dev/null +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/GlobalMethods/hide_object.names @@ -0,0 +1,39 @@ +{ + "entries": [ + { + "base": "hide_object", + "context": "Method", + "variant": "", + "details": { + "name": "", + "category": "Globals" + }, + "methods": [ + { + "base": "hide_object", + "context": "Global", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke hide_object" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after hide_object is invoked" + }, + "details": { + "name": "hide_object", + "category": "Other" + }, + "params": [ + { + "typeid": "{3AB0037F-AF8D-48CE-BCA0-A170D18B2C03}", + "details": { + "name": "const char*" + } + } + ] + } + ] + } + ] +} \ No newline at end of file diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/GlobalMethods/idle_enable.names b/Gems/ScriptCanvas/Assets/TranslationAssets/GlobalMethods/idle_enable.names new file mode 100644 index 0000000000..751e63dad2 --- /dev/null +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/GlobalMethods/idle_enable.names @@ -0,0 +1,39 @@ +{ + "entries": [ + { + "base": "idle_enable", + "context": "Method", + "variant": "", + "details": { + "name": "", + "category": "Globals" + }, + "methods": [ + { + "base": "idle_enable", + "context": "Global", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke idle_enable" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after idle_enable is invoked" + }, + "details": { + "name": "idle_enable", + "category": "Other" + }, + "params": [ + { + "typeid": "{A0CA880C-AFE4-43CB-926C-59AC48496112}", + "details": { + "name": "bool" + } + } + ] + } + ] + } + ] +} \ No newline at end of file diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/GlobalMethods/idle_is_enabled.names b/Gems/ScriptCanvas/Assets/TranslationAssets/GlobalMethods/idle_is_enabled.names new file mode 100644 index 0000000000..7a910121fb --- /dev/null +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/GlobalMethods/idle_is_enabled.names @@ -0,0 +1,39 @@ +{ + "entries": [ + { + "base": "idle_is_enabled", + "context": "Method", + "variant": "", + "details": { + "name": "", + "category": "Globals" + }, + "methods": [ + { + "base": "idle_is_enabled", + "context": "Global", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke idle_is_enabled" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after idle_is_enabled is invoked" + }, + "details": { + "name": "idle_is_enabled", + "category": "Other" + }, + "results": [ + { + "typeid": "{A0CA880C-AFE4-43CB-926C-59AC48496112}", + "details": { + "name": "bool" + } + } + ] + } + ] + } + ] +} \ No newline at end of file diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/GlobalMethods/idle_wait.names b/Gems/ScriptCanvas/Assets/TranslationAssets/GlobalMethods/idle_wait.names new file mode 100644 index 0000000000..e90a794abb --- /dev/null +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/GlobalMethods/idle_wait.names @@ -0,0 +1,39 @@ +{ + "entries": [ + { + "base": "idle_wait", + "context": "Method", + "variant": "", + "details": { + "name": "", + "category": "Globals" + }, + "methods": [ + { + "base": "idle_wait", + "context": "Global", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke idle_wait" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after idle_wait is invoked" + }, + "details": { + "name": "idle_wait", + "category": "Other" + }, + "params": [ + { + "typeid": "{110C4B14-11A8-4E9D-8638-5051013A56AC}", + "details": { + "name": "double" + } + } + ] + } + ] + } + ] +} \ No newline at end of file diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/GlobalMethods/idle_wait_frames.names b/Gems/ScriptCanvas/Assets/TranslationAssets/GlobalMethods/idle_wait_frames.names new file mode 100644 index 0000000000..809ba3291a --- /dev/null +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/GlobalMethods/idle_wait_frames.names @@ -0,0 +1,39 @@ +{ + "entries": [ + { + "base": "idle_wait_frames", + "context": "Method", + "variant": "", + "details": { + "name": "", + "category": "Globals" + }, + "methods": [ + { + "base": "idle_wait_frames", + "context": "Global", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke idle_wait_frames" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after idle_wait_frames is invoked" + }, + "details": { + "name": "idle_wait_frames", + "category": "Other" + }, + "params": [ + { + "typeid": "{43DA906B-7DEF-4CA8-9790-854106D3F983}", + "details": { + "name": "unsigned int" + } + } + ] + } + ] + } + ] +} \ No newline at end of file diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/GlobalMethods/is_helpers_shown.names b/Gems/ScriptCanvas/Assets/TranslationAssets/GlobalMethods/is_helpers_shown.names new file mode 100644 index 0000000000..bddddbf5f6 --- /dev/null +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/GlobalMethods/is_helpers_shown.names @@ -0,0 +1,39 @@ +{ + "entries": [ + { + "base": "is_helpers_shown", + "context": "Method", + "variant": "", + "details": { + "name": "", + "category": "Globals" + }, + "methods": [ + { + "base": "is_helpers_shown", + "context": "Global", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke is_helpers_shown" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after is_helpers_shown is invoked" + }, + "details": { + "name": "is_helpers_shown", + "category": "Other" + }, + "results": [ + { + "typeid": "{A0CA880C-AFE4-43CB-926C-59AC48496112}", + "details": { + "name": "bool" + } + } + ] + } + ] + } + ] +} \ No newline at end of file diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/GlobalMethods/is_idle_enabled.names b/Gems/ScriptCanvas/Assets/TranslationAssets/GlobalMethods/is_idle_enabled.names new file mode 100644 index 0000000000..690c6a9e26 --- /dev/null +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/GlobalMethods/is_idle_enabled.names @@ -0,0 +1,39 @@ +{ + "entries": [ + { + "base": "is_idle_enabled", + "context": "Method", + "variant": "", + "details": { + "name": "", + "category": "Globals" + }, + "methods": [ + { + "base": "is_idle_enabled", + "context": "Global", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke is_idle_enabled" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after is_idle_enabled is invoked" + }, + "details": { + "name": "is_idle_enabled", + "category": "Other" + }, + "results": [ + { + "typeid": "{A0CA880C-AFE4-43CB-926C-59AC48496112}", + "details": { + "name": "bool" + } + } + ] + } + ] + } + ] +} \ No newline at end of file diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/GlobalMethods/is_in_game_mode.names b/Gems/ScriptCanvas/Assets/TranslationAssets/GlobalMethods/is_in_game_mode.names new file mode 100644 index 0000000000..62612ae3f0 --- /dev/null +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/GlobalMethods/is_in_game_mode.names @@ -0,0 +1,39 @@ +{ + "entries": [ + { + "base": "is_in_game_mode", + "context": "Method", + "variant": "", + "details": { + "name": "", + "category": "Globals" + }, + "methods": [ + { + "base": "is_in_game_mode", + "context": "Global", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke is_in_game_mode" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after is_in_game_mode is invoked" + }, + "details": { + "name": "is_in_game_mode", + "category": "Other" + }, + "results": [ + { + "typeid": "{A0CA880C-AFE4-43CB-926C-59AC48496112}", + "details": { + "name": "bool" + } + } + ] + } + ] + } + ] +} \ No newline at end of file diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/GlobalMethods/is_in_simulation_mode.names b/Gems/ScriptCanvas/Assets/TranslationAssets/GlobalMethods/is_in_simulation_mode.names new file mode 100644 index 0000000000..f4ae7b054a --- /dev/null +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/GlobalMethods/is_in_simulation_mode.names @@ -0,0 +1,39 @@ +{ + "entries": [ + { + "base": "is_in_simulation_mode", + "context": "Method", + "variant": "", + "details": { + "name": "", + "category": "Globals" + }, + "methods": [ + { + "base": "is_in_simulation_mode", + "context": "Global", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke is_in_simulation_mode" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after is_in_simulation_mode is invoked" + }, + "details": { + "name": "is_in_simulation_mode", + "category": "Other" + }, + "results": [ + { + "typeid": "{A0CA880C-AFE4-43CB-926C-59AC48496112}", + "details": { + "name": "bool" + } + } + ] + } + ] + } + ] +} \ No newline at end of file diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/GlobalMethods/is_object_frozen.names b/Gems/ScriptCanvas/Assets/TranslationAssets/GlobalMethods/is_object_frozen.names new file mode 100644 index 0000000000..77c9aa1f3b --- /dev/null +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/GlobalMethods/is_object_frozen.names @@ -0,0 +1,47 @@ +{ + "entries": [ + { + "base": "is_object_frozen", + "context": "Method", + "variant": "", + "details": { + "name": "", + "category": "Globals" + }, + "methods": [ + { + "base": "is_object_frozen", + "context": "Global", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke is_object_frozen" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after is_object_frozen is invoked" + }, + "details": { + "name": "is_object_frozen", + "category": "Other" + }, + "params": [ + { + "typeid": "{3AB0037F-AF8D-48CE-BCA0-A170D18B2C03}", + "details": { + "name": "const char*" + } + } + ], + "results": [ + { + "typeid": "{A0CA880C-AFE4-43CB-926C-59AC48496112}", + "details": { + "name": "bool" + } + } + ] + } + ] + } + ] +} \ No newline at end of file diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/GlobalMethods/is_object_hidden.names b/Gems/ScriptCanvas/Assets/TranslationAssets/GlobalMethods/is_object_hidden.names new file mode 100644 index 0000000000..46d6757c9f --- /dev/null +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/GlobalMethods/is_object_hidden.names @@ -0,0 +1,47 @@ +{ + "entries": [ + { + "base": "is_object_hidden", + "context": "Method", + "variant": "", + "details": { + "name": "", + "category": "Globals" + }, + "methods": [ + { + "base": "is_object_hidden", + "context": "Global", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke is_object_hidden" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after is_object_hidden is invoked" + }, + "details": { + "name": "is_object_hidden", + "category": "Other" + }, + "params": [ + { + "typeid": "{3AB0037F-AF8D-48CE-BCA0-A170D18B2C03}", + "details": { + "name": "const char*" + } + } + ], + "results": [ + { + "typeid": "{A0CA880C-AFE4-43CB-926C-59AC48496112}", + "details": { + "name": "bool" + } + } + ] + } + ] + } + ] +} \ No newline at end of file diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/GlobalMethods/is_pane_visible.names b/Gems/ScriptCanvas/Assets/TranslationAssets/GlobalMethods/is_pane_visible.names new file mode 100644 index 0000000000..1912f6cd4a --- /dev/null +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/GlobalMethods/is_pane_visible.names @@ -0,0 +1,47 @@ +{ + "entries": [ + { + "base": "is_pane_visible", + "context": "Method", + "variant": "", + "details": { + "name": "", + "category": "Globals" + }, + "methods": [ + { + "base": "is_pane_visible", + "context": "Global", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke is_pane_visible" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after is_pane_visible is invoked" + }, + "details": { + "name": "is_pane_visible", + "category": "Other" + }, + "params": [ + { + "typeid": "{3AB0037F-AF8D-48CE-BCA0-A170D18B2C03}", + "details": { + "name": "const char*" + } + } + ], + "results": [ + { + "typeid": "{A0CA880C-AFE4-43CB-926C-59AC48496112}", + "details": { + "name": "bool" + } + } + ] + } + ] + } + ] +} \ No newline at end of file diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/GlobalMethods/launch_lua_editor.names b/Gems/ScriptCanvas/Assets/TranslationAssets/GlobalMethods/launch_lua_editor.names new file mode 100644 index 0000000000..faf537d82c --- /dev/null +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/GlobalMethods/launch_lua_editor.names @@ -0,0 +1,39 @@ +{ + "entries": [ + { + "base": "launch_lua_editor", + "context": "Method", + "variant": "", + "details": { + "name": "", + "category": "Globals" + }, + "methods": [ + { + "base": "launch_lua_editor", + "context": "Global", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke launch_lua_editor" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after launch_lua_editor is invoked" + }, + "details": { + "name": "launch_lua_editor", + "category": "Other" + }, + "params": [ + { + "typeid": "{3AB0037F-AF8D-48CE-BCA0-A170D18B2C03}", + "details": { + "name": "const char*" + } + } + ] + } + ] + } + ] +} \ No newline at end of file diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/GlobalMethods/load_all_plugins.names b/Gems/ScriptCanvas/Assets/TranslationAssets/GlobalMethods/load_all_plugins.names new file mode 100644 index 0000000000..ea52f9730f --- /dev/null +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/GlobalMethods/load_all_plugins.names @@ -0,0 +1,31 @@ +{ + "entries": [ + { + "base": "load_all_plugins", + "context": "Method", + "variant": "", + "details": { + "name": "", + "category": "Globals" + }, + "methods": [ + { + "base": "load_all_plugins", + "context": "Global", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke load_all_plugins" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after load_all_plugins is invoked" + }, + "details": { + "name": "load_all_plugins", + "category": "Other" + } + } + ] + } + ] +} \ No newline at end of file diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/GlobalMethods/log.names b/Gems/ScriptCanvas/Assets/TranslationAssets/GlobalMethods/log.names new file mode 100644 index 0000000000..77d1490486 --- /dev/null +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/GlobalMethods/log.names @@ -0,0 +1,39 @@ +{ + "entries": [ + { + "base": "log", + "context": "Method", + "variant": "", + "details": { + "name": "", + "category": "Globals" + }, + "methods": [ + { + "base": "log", + "context": "Global", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke log" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after log is invoked" + }, + "details": { + "name": "log", + "category": "Other" + }, + "params": [ + { + "typeid": "{3AB0037F-AF8D-48CE-BCA0-A170D18B2C03}", + "details": { + "name": "const char*" + } + } + ] + } + ] + } + ] +} \ No newline at end of file diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/GlobalMethods/message_box.names b/Gems/ScriptCanvas/Assets/TranslationAssets/GlobalMethods/message_box.names new file mode 100644 index 0000000000..173dab3495 --- /dev/null +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/GlobalMethods/message_box.names @@ -0,0 +1,47 @@ +{ + "entries": [ + { + "base": "message_box", + "context": "Method", + "variant": "", + "details": { + "name": "", + "category": "Globals" + }, + "methods": [ + { + "base": "message_box", + "context": "Global", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke message_box" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after message_box is invoked" + }, + "details": { + "name": "message_box", + "category": "Other" + }, + "params": [ + { + "typeid": "{3AB0037F-AF8D-48CE-BCA0-A170D18B2C03}", + "details": { + "name": "const char*" + } + } + ], + "results": [ + { + "typeid": "{A0CA880C-AFE4-43CB-926C-59AC48496112}", + "details": { + "name": "bool" + } + } + ] + } + ] + } + ] +} \ No newline at end of file diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/GlobalMethods/message_box_ok.names b/Gems/ScriptCanvas/Assets/TranslationAssets/GlobalMethods/message_box_ok.names new file mode 100644 index 0000000000..d743366a40 --- /dev/null +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/GlobalMethods/message_box_ok.names @@ -0,0 +1,47 @@ +{ + "entries": [ + { + "base": "message_box_ok", + "context": "Method", + "variant": "", + "details": { + "name": "", + "category": "Globals" + }, + "methods": [ + { + "base": "message_box_ok", + "context": "Global", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke message_box_ok" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after message_box_ok is invoked" + }, + "details": { + "name": "message_box_ok", + "category": "Other" + }, + "params": [ + { + "typeid": "{3AB0037F-AF8D-48CE-BCA0-A170D18B2C03}", + "details": { + "name": "const char*" + } + } + ], + "results": [ + { + "typeid": "{A0CA880C-AFE4-43CB-926C-59AC48496112}", + "details": { + "name": "bool" + } + } + ] + } + ] + } + ] +} \ No newline at end of file diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/GlobalMethods/message_box_yes_no.names b/Gems/ScriptCanvas/Assets/TranslationAssets/GlobalMethods/message_box_yes_no.names new file mode 100644 index 0000000000..4025735021 --- /dev/null +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/GlobalMethods/message_box_yes_no.names @@ -0,0 +1,47 @@ +{ + "entries": [ + { + "base": "message_box_yes_no", + "context": "Method", + "variant": "", + "details": { + "name": "", + "category": "Globals" + }, + "methods": [ + { + "base": "message_box_yes_no", + "context": "Global", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke message_box_yes_no" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after message_box_yes_no is invoked" + }, + "details": { + "name": "message_box_yes_no", + "category": "Other" + }, + "params": [ + { + "typeid": "{3AB0037F-AF8D-48CE-BCA0-A170D18B2C03}", + "details": { + "name": "const char*" + } + } + ], + "results": [ + { + "typeid": "{A0CA880C-AFE4-43CB-926C-59AC48496112}", + "details": { + "name": "bool" + } + } + ] + } + ] + } + ] +} \ No newline at end of file diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/GlobalMethods/new_sequence.names b/Gems/ScriptCanvas/Assets/TranslationAssets/GlobalMethods/new_sequence.names new file mode 100644 index 0000000000..39736db34c --- /dev/null +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/GlobalMethods/new_sequence.names @@ -0,0 +1,45 @@ +{ + "entries": [ + { + "base": "new_sequence", + "context": "Method", + "variant": "", + "details": { + "name": "", + "category": "Globals" + }, + "methods": [ + { + "base": "new_sequence", + "context": "Global", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke new_sequence" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after new_sequence is invoked" + }, + "details": { + "name": "new_sequence", + "category": "Other" + }, + "params": [ + { + "typeid": "{3AB0037F-AF8D-48CE-BCA0-A170D18B2C03}", + "details": { + "name": "const char*" + } + }, + { + "typeid": "{72039442-EB38-4D42-A1AD-CB68F7E0EEF6}", + "details": { + "name": "int" + } + } + ] + } + ] + } + ] +} \ No newline at end of file diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/GlobalMethods/open_file_box.names b/Gems/ScriptCanvas/Assets/TranslationAssets/GlobalMethods/open_file_box.names new file mode 100644 index 0000000000..859d6ddeae --- /dev/null +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/GlobalMethods/open_file_box.names @@ -0,0 +1,39 @@ +{ + "entries": [ + { + "base": "open_file_box", + "context": "Method", + "variant": "", + "details": { + "name": "", + "category": "Globals" + }, + "methods": [ + { + "base": "open_file_box", + "context": "Global", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke open_file_box" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after open_file_box is invoked" + }, + "details": { + "name": "open_file_box", + "category": "Other" + }, + "results": [ + { + "typeid": "{03AAAB3F-5C47-5A66-9EBC-D5FA4DB353C9}", + "details": { + "name": "AZStd::basic_string, allocator>" + } + } + ] + } + ] + } + ] +} \ No newline at end of file diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/GlobalMethods/open_level.names b/Gems/ScriptCanvas/Assets/TranslationAssets/GlobalMethods/open_level.names new file mode 100644 index 0000000000..2f3d6933bd --- /dev/null +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/GlobalMethods/open_level.names @@ -0,0 +1,47 @@ +{ + "entries": [ + { + "base": "open_level", + "context": "Method", + "variant": "", + "details": { + "name": "", + "category": "Globals" + }, + "methods": [ + { + "base": "open_level", + "context": "Global", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke open_level" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after open_level is invoked" + }, + "details": { + "name": "open_level", + "category": "Other" + }, + "params": [ + { + "typeid": "{3AB0037F-AF8D-48CE-BCA0-A170D18B2C03}", + "details": { + "name": "const char*" + } + } + ], + "results": [ + { + "typeid": "{A0CA880C-AFE4-43CB-926C-59AC48496112}", + "details": { + "name": "bool" + } + } + ] + } + ] + } + ] +} \ No newline at end of file diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/GlobalMethods/open_level_no_prompt.names b/Gems/ScriptCanvas/Assets/TranslationAssets/GlobalMethods/open_level_no_prompt.names new file mode 100644 index 0000000000..51662f268d --- /dev/null +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/GlobalMethods/open_level_no_prompt.names @@ -0,0 +1,47 @@ +{ + "entries": [ + { + "base": "open_level_no_prompt", + "context": "Method", + "variant": "", + "details": { + "name": "", + "category": "Globals" + }, + "methods": [ + { + "base": "open_level_no_prompt", + "context": "Global", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke open_level_no_prompt" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after open_level_no_prompt is invoked" + }, + "details": { + "name": "open_level_no_prompt", + "category": "Other" + }, + "params": [ + { + "typeid": "{3AB0037F-AF8D-48CE-BCA0-A170D18B2C03}", + "details": { + "name": "const char*" + } + } + ], + "results": [ + { + "typeid": "{A0CA880C-AFE4-43CB-926C-59AC48496112}", + "details": { + "name": "bool" + } + } + ] + } + ] + } + ] +} \ No newline at end of file diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/GlobalMethods/open_pane.names b/Gems/ScriptCanvas/Assets/TranslationAssets/GlobalMethods/open_pane.names new file mode 100644 index 0000000000..d438c7759f --- /dev/null +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/GlobalMethods/open_pane.names @@ -0,0 +1,39 @@ +{ + "entries": [ + { + "base": "open_pane", + "context": "Method", + "variant": "", + "details": { + "name": "", + "category": "Globals" + }, + "methods": [ + { + "base": "open_pane", + "context": "Global", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke open_pane" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after open_pane is invoked" + }, + "details": { + "name": "open_pane", + "category": "Other" + }, + "params": [ + { + "typeid": "{3AB0037F-AF8D-48CE-BCA0-A170D18B2C03}", + "details": { + "name": "const char*" + } + } + ] + } + ] + } + ] +} \ No newline at end of file diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/GlobalMethods/play_sequence.names b/Gems/ScriptCanvas/Assets/TranslationAssets/GlobalMethods/play_sequence.names new file mode 100644 index 0000000000..df1c6cb348 --- /dev/null +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/GlobalMethods/play_sequence.names @@ -0,0 +1,31 @@ +{ + "entries": [ + { + "base": "play_sequence", + "context": "Method", + "variant": "", + "details": { + "name": "", + "category": "Globals" + }, + "methods": [ + { + "base": "play_sequence", + "context": "Global", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke play_sequence" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after play_sequence is invoked" + }, + "details": { + "name": "play_sequence", + "category": "Other" + } + } + ] + } + ] +} \ No newline at end of file diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/GlobalMethods/redo.names b/Gems/ScriptCanvas/Assets/TranslationAssets/GlobalMethods/redo.names new file mode 100644 index 0000000000..0a16085a12 --- /dev/null +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/GlobalMethods/redo.names @@ -0,0 +1,31 @@ +{ + "entries": [ + { + "base": "redo", + "context": "Method", + "variant": "", + "details": { + "name": "", + "category": "Globals" + }, + "methods": [ + { + "base": "redo", + "context": "Global", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke redo" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after redo is invoked" + }, + "details": { + "name": "redo", + "category": "Other" + } + } + ] + } + ] +} \ No newline at end of file diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/GlobalMethods/reload_current_level.names b/Gems/ScriptCanvas/Assets/TranslationAssets/GlobalMethods/reload_current_level.names new file mode 100644 index 0000000000..9d327766d3 --- /dev/null +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/GlobalMethods/reload_current_level.names @@ -0,0 +1,39 @@ +{ + "entries": [ + { + "base": "reload_current_level", + "context": "Method", + "variant": "", + "details": { + "name": "", + "category": "Globals" + }, + "methods": [ + { + "base": "reload_current_level", + "context": "Global", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke reload_current_level" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after reload_current_level is invoked" + }, + "details": { + "name": "reload_current_level", + "category": "Other" + }, + "results": [ + { + "typeid": "{A0CA880C-AFE4-43CB-926C-59AC48496112}", + "details": { + "name": "bool" + } + } + ] + } + ] + } + ] +} \ No newline at end of file diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/GlobalMethods/rename_object.names b/Gems/ScriptCanvas/Assets/TranslationAssets/GlobalMethods/rename_object.names new file mode 100644 index 0000000000..4cd5fdb146 --- /dev/null +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/GlobalMethods/rename_object.names @@ -0,0 +1,45 @@ +{ + "entries": [ + { + "base": "rename_object", + "context": "Method", + "variant": "", + "details": { + "name": "", + "category": "Globals" + }, + "methods": [ + { + "base": "rename_object", + "context": "Global", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke rename_object" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after rename_object is invoked" + }, + "details": { + "name": "rename_object", + "category": "Other" + }, + "params": [ + { + "typeid": "{3AB0037F-AF8D-48CE-BCA0-A170D18B2C03}", + "details": { + "name": "const char*" + } + }, + { + "typeid": "{3AB0037F-AF8D-48CE-BCA0-A170D18B2C03}", + "details": { + "name": "const char*" + } + } + ] + } + ] + } + ] +} \ No newline at end of file diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/GlobalMethods/resize_viewport.names b/Gems/ScriptCanvas/Assets/TranslationAssets/GlobalMethods/resize_viewport.names new file mode 100644 index 0000000000..586f480591 --- /dev/null +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/GlobalMethods/resize_viewport.names @@ -0,0 +1,45 @@ +{ + "entries": [ + { + "base": "resize_viewport", + "context": "Method", + "variant": "", + "details": { + "name": "", + "category": "Globals" + }, + "methods": [ + { + "base": "resize_viewport", + "context": "Global", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke resize_viewport" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after resize_viewport is invoked" + }, + "details": { + "name": "resize_viewport", + "category": "Other" + }, + "params": [ + { + "typeid": "{72039442-EB38-4D42-A1AD-CB68F7E0EEF6}", + "details": { + "name": "int" + } + }, + { + "typeid": "{72039442-EB38-4D42-A1AD-CB68F7E0EEF6}", + "details": { + "name": "int" + } + } + ] + } + ] + } + ] +} \ No newline at end of file diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/GlobalMethods/run_console.names b/Gems/ScriptCanvas/Assets/TranslationAssets/GlobalMethods/run_console.names new file mode 100644 index 0000000000..0454fdc37a --- /dev/null +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/GlobalMethods/run_console.names @@ -0,0 +1,39 @@ +{ + "entries": [ + { + "base": "run_console", + "context": "Method", + "variant": "", + "details": { + "name": "", + "category": "Globals" + }, + "methods": [ + { + "base": "run_console", + "context": "Global", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke run_console" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after run_console is invoked" + }, + "details": { + "name": "run_console", + "category": "Other" + }, + "params": [ + { + "typeid": "{3AB0037F-AF8D-48CE-BCA0-A170D18B2C03}", + "details": { + "name": "const char*" + } + } + ] + } + ] + } + ] +} \ No newline at end of file diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/GlobalMethods/run_file.names b/Gems/ScriptCanvas/Assets/TranslationAssets/GlobalMethods/run_file.names new file mode 100644 index 0000000000..4724515921 --- /dev/null +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/GlobalMethods/run_file.names @@ -0,0 +1,39 @@ +{ + "entries": [ + { + "base": "run_file", + "context": "Method", + "variant": "", + "details": { + "name": "", + "category": "Globals" + }, + "methods": [ + { + "base": "run_file", + "context": "Global", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke run_file" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after run_file is invoked" + }, + "details": { + "name": "run_file", + "category": "Other" + }, + "params": [ + { + "typeid": "{3AB0037F-AF8D-48CE-BCA0-A170D18B2C03}", + "details": { + "name": "const char*" + } + } + ] + } + ] + } + ] +} \ No newline at end of file diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/GlobalMethods/run_file_parameters.names b/Gems/ScriptCanvas/Assets/TranslationAssets/GlobalMethods/run_file_parameters.names new file mode 100644 index 0000000000..6417544230 --- /dev/null +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/GlobalMethods/run_file_parameters.names @@ -0,0 +1,45 @@ +{ + "entries": [ + { + "base": "run_file_parameters", + "context": "Method", + "variant": "", + "details": { + "name": "", + "category": "Globals" + }, + "methods": [ + { + "base": "run_file_parameters", + "context": "Global", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke run_file_parameters" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after run_file_parameters is invoked" + }, + "details": { + "name": "run_file_parameters", + "category": "Other" + }, + "params": [ + { + "typeid": "{3AB0037F-AF8D-48CE-BCA0-A170D18B2C03}", + "details": { + "name": "const char*" + } + }, + { + "typeid": "{3AB0037F-AF8D-48CE-BCA0-A170D18B2C03}", + "details": { + "name": "const char*" + } + } + ] + } + ] + } + ] +} \ No newline at end of file diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/GlobalMethods/save_level.names b/Gems/ScriptCanvas/Assets/TranslationAssets/GlobalMethods/save_level.names new file mode 100644 index 0000000000..f96f70092a --- /dev/null +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/GlobalMethods/save_level.names @@ -0,0 +1,39 @@ +{ + "entries": [ + { + "base": "save_level", + "context": "Method", + "variant": "", + "details": { + "name": "", + "category": "Globals" + }, + "methods": [ + { + "base": "save_level", + "context": "Global", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke save_level" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after save_level is invoked" + }, + "details": { + "name": "save_level", + "category": "Other" + }, + "results": [ + { + "typeid": "{A0CA880C-AFE4-43CB-926C-59AC48496112}", + "details": { + "name": "bool" + } + } + ] + } + ] + } + ] +} \ No newline at end of file diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/GlobalMethods/select_object.names b/Gems/ScriptCanvas/Assets/TranslationAssets/GlobalMethods/select_object.names new file mode 100644 index 0000000000..c317cc8741 --- /dev/null +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/GlobalMethods/select_object.names @@ -0,0 +1,39 @@ +{ + "entries": [ + { + "base": "select_object", + "context": "Method", + "variant": "", + "details": { + "name": "", + "category": "Globals" + }, + "methods": [ + { + "base": "select_object", + "context": "Global", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke select_object" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after select_object is invoked" + }, + "details": { + "name": "select_object", + "category": "Other" + }, + "params": [ + { + "typeid": "{3AB0037F-AF8D-48CE-BCA0-A170D18B2C03}", + "details": { + "name": "const char*" + } + } + ] + } + ] + } + ] +} \ No newline at end of file diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/GlobalMethods/select_objects.names b/Gems/ScriptCanvas/Assets/TranslationAssets/GlobalMethods/select_objects.names new file mode 100644 index 0000000000..30582c5674 --- /dev/null +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/GlobalMethods/select_objects.names @@ -0,0 +1,39 @@ +{ + "entries": [ + { + "base": "select_objects", + "context": "Method", + "variant": "", + "details": { + "name": "", + "category": "Globals" + }, + "methods": [ + { + "base": "select_objects", + "context": "Global", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke select_objects" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after select_objects is invoked" + }, + "details": { + "name": "select_objects", + "category": "Other" + }, + "params": [ + { + "typeid": "{99DAD0BC-740E-5E82-826B-8FC7968CC02C}", + "details": { + "name": "const AZStd::vector>" + } + } + ] + } + ] + } + ] +} \ No newline at end of file diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/GlobalMethods/set_config_spec.names b/Gems/ScriptCanvas/Assets/TranslationAssets/GlobalMethods/set_config_spec.names new file mode 100644 index 0000000000..61f95d9a04 --- /dev/null +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/GlobalMethods/set_config_spec.names @@ -0,0 +1,45 @@ +{ + "entries": [ + { + "base": "set_config_spec", + "context": "Method", + "variant": "", + "details": { + "name": "", + "category": "Globals" + }, + "methods": [ + { + "base": "set_config_spec", + "context": "Global", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke set_config_spec" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after set_config_spec is invoked" + }, + "details": { + "name": "set_config_spec", + "category": "Other" + }, + "params": [ + { + "typeid": "{72039442-EB38-4D42-A1AD-CB68F7E0EEF6}", + "details": { + "name": "int" + } + }, + { + "typeid": "{72039442-EB38-4D42-A1AD-CB68F7E0EEF6}", + "details": { + "name": "int" + } + } + ] + } + ] + } + ] +} \ No newline at end of file diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/GlobalMethods/set_current_sequence.names b/Gems/ScriptCanvas/Assets/TranslationAssets/GlobalMethods/set_current_sequence.names new file mode 100644 index 0000000000..aa878daf01 --- /dev/null +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/GlobalMethods/set_current_sequence.names @@ -0,0 +1,39 @@ +{ + "entries": [ + { + "base": "set_current_sequence", + "context": "Method", + "variant": "", + "details": { + "name": "", + "category": "Globals" + }, + "methods": [ + { + "base": "set_current_sequence", + "context": "Global", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke set_current_sequence" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after set_current_sequence is invoked" + }, + "details": { + "name": "set_current_sequence", + "category": "Other" + }, + "params": [ + { + "typeid": "{3AB0037F-AF8D-48CE-BCA0-A170D18B2C03}", + "details": { + "name": "const char*" + } + } + ] + } + ] + } + ] +} \ No newline at end of file diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/GlobalMethods/set_current_view_position.names b/Gems/ScriptCanvas/Assets/TranslationAssets/GlobalMethods/set_current_view_position.names new file mode 100644 index 0000000000..7639083302 --- /dev/null +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/GlobalMethods/set_current_view_position.names @@ -0,0 +1,51 @@ +{ + "entries": [ + { + "base": "set_current_view_position", + "context": "Method", + "variant": "", + "details": { + "name": "", + "category": "Globals" + }, + "methods": [ + { + "base": "set_current_view_position", + "context": "Global", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke set_current_view_position" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after set_current_view_position is invoked" + }, + "details": { + "name": "set_current_view_position", + "category": "Other" + }, + "params": [ + { + "typeid": "{EA2C3E90-AFBE-44D4-A90D-FAAF79BAF93D}", + "details": { + "name": "float" + } + }, + { + "typeid": "{EA2C3E90-AFBE-44D4-A90D-FAAF79BAF93D}", + "details": { + "name": "float" + } + }, + { + "typeid": "{EA2C3E90-AFBE-44D4-A90D-FAAF79BAF93D}", + "details": { + "name": "float" + } + } + ] + } + ] + } + ] +} \ No newline at end of file diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/GlobalMethods/set_current_view_rotation.names b/Gems/ScriptCanvas/Assets/TranslationAssets/GlobalMethods/set_current_view_rotation.names new file mode 100644 index 0000000000..afffc8bc0f --- /dev/null +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/GlobalMethods/set_current_view_rotation.names @@ -0,0 +1,51 @@ +{ + "entries": [ + { + "base": "set_current_view_rotation", + "context": "Method", + "variant": "", + "details": { + "name": "", + "category": "Globals" + }, + "methods": [ + { + "base": "set_current_view_rotation", + "context": "Global", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke set_current_view_rotation" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after set_current_view_rotation is invoked" + }, + "details": { + "name": "set_current_view_rotation", + "category": "Other" + }, + "params": [ + { + "typeid": "{EA2C3E90-AFBE-44D4-A90D-FAAF79BAF93D}", + "details": { + "name": "float" + } + }, + { + "typeid": "{EA2C3E90-AFBE-44D4-A90D-FAAF79BAF93D}", + "details": { + "name": "float" + } + }, + { + "typeid": "{EA2C3E90-AFBE-44D4-A90D-FAAF79BAF93D}", + "details": { + "name": "float" + } + } + ] + } + ] + } + ] +} \ No newline at end of file diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/GlobalMethods/set_cvar.names b/Gems/ScriptCanvas/Assets/TranslationAssets/GlobalMethods/set_cvar.names new file mode 100644 index 0000000000..181d11bef8 --- /dev/null +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/GlobalMethods/set_cvar.names @@ -0,0 +1,45 @@ +{ + "entries": [ + { + "base": "set_cvar", + "context": "Method", + "variant": "", + "details": { + "name": "", + "category": "Globals" + }, + "methods": [ + { + "base": "set_cvar", + "context": "Global", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke set_cvar" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after set_cvar is invoked" + }, + "details": { + "name": "set_cvar", + "category": "Other" + }, + "params": [ + { + "typeid": "{3AB0037F-AF8D-48CE-BCA0-A170D18B2C03}", + "details": { + "name": "const char*" + } + }, + { + "typeid": "{03924488-C7F4-4D6D-948B-ABC2D1AE2FD3}", + "details": { + "name": "const any&" + } + } + ] + } + ] + } + ] +} \ No newline at end of file diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/GlobalMethods/set_cvar_float.names b/Gems/ScriptCanvas/Assets/TranslationAssets/GlobalMethods/set_cvar_float.names new file mode 100644 index 0000000000..c788a79edc --- /dev/null +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/GlobalMethods/set_cvar_float.names @@ -0,0 +1,45 @@ +{ + "entries": [ + { + "base": "set_cvar_float", + "context": "Method", + "variant": "", + "details": { + "name": "", + "category": "Globals" + }, + "methods": [ + { + "base": "set_cvar_float", + "context": "Global", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke set_cvar_float" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after set_cvar_float is invoked" + }, + "details": { + "name": "set_cvar_float", + "category": "Other" + }, + "params": [ + { + "typeid": "{3AB0037F-AF8D-48CE-BCA0-A170D18B2C03}", + "details": { + "name": "const char*" + } + }, + { + "typeid": "{EA2C3E90-AFBE-44D4-A90D-FAAF79BAF93D}", + "details": { + "name": "float" + } + } + ] + } + ] + } + ] +} \ No newline at end of file diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/GlobalMethods/set_cvar_integer.names b/Gems/ScriptCanvas/Assets/TranslationAssets/GlobalMethods/set_cvar_integer.names new file mode 100644 index 0000000000..f5ec182a8a --- /dev/null +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/GlobalMethods/set_cvar_integer.names @@ -0,0 +1,45 @@ +{ + "entries": [ + { + "base": "set_cvar_integer", + "context": "Method", + "variant": "", + "details": { + "name": "", + "category": "Globals" + }, + "methods": [ + { + "base": "set_cvar_integer", + "context": "Global", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke set_cvar_integer" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after set_cvar_integer is invoked" + }, + "details": { + "name": "set_cvar_integer", + "category": "Other" + }, + "params": [ + { + "typeid": "{3AB0037F-AF8D-48CE-BCA0-A170D18B2C03}", + "details": { + "name": "const char*" + } + }, + { + "typeid": "{72039442-EB38-4D42-A1AD-CB68F7E0EEF6}", + "details": { + "name": "int" + } + } + ] + } + ] + } + ] +} \ No newline at end of file diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/GlobalMethods/set_cvar_string.names b/Gems/ScriptCanvas/Assets/TranslationAssets/GlobalMethods/set_cvar_string.names new file mode 100644 index 0000000000..f096f5528f --- /dev/null +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/GlobalMethods/set_cvar_string.names @@ -0,0 +1,45 @@ +{ + "entries": [ + { + "base": "set_cvar_string", + "context": "Method", + "variant": "", + "details": { + "name": "", + "category": "Globals" + }, + "methods": [ + { + "base": "set_cvar_string", + "context": "Global", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke set_cvar_string" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after set_cvar_string is invoked" + }, + "details": { + "name": "set_cvar_string", + "category": "Other" + }, + "params": [ + { + "typeid": "{3AB0037F-AF8D-48CE-BCA0-A170D18B2C03}", + "details": { + "name": "const char*" + } + }, + { + "typeid": "{3AB0037F-AF8D-48CE-BCA0-A170D18B2C03}", + "details": { + "name": "const char*" + } + } + ] + } + ] + } + ] +} \ No newline at end of file diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/GlobalMethods/set_misc_editor_settings.names b/Gems/ScriptCanvas/Assets/TranslationAssets/GlobalMethods/set_misc_editor_settings.names new file mode 100644 index 0000000000..00adf7c80f --- /dev/null +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/GlobalMethods/set_misc_editor_settings.names @@ -0,0 +1,39 @@ +{ + "entries": [ + { + "base": "set_misc_editor_settings", + "context": "Method", + "variant": "", + "details": { + "name": "", + "category": "Globals" + }, + "methods": [ + { + "base": "set_misc_editor_settings", + "context": "Global", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke set_misc_editor_settings" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after set_misc_editor_settings is invoked" + }, + "details": { + "name": "set_misc_editor_settings", + "category": "Other" + }, + "params": [ + { + "typeid": "{72039442-EB38-4D42-A1AD-CB68F7E0EEF6}", + "details": { + "name": "int" + } + } + ] + } + ] + } + ] +} \ No newline at end of file diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/GlobalMethods/set_position.names b/Gems/ScriptCanvas/Assets/TranslationAssets/GlobalMethods/set_position.names new file mode 100644 index 0000000000..fc9d588b4d --- /dev/null +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/GlobalMethods/set_position.names @@ -0,0 +1,57 @@ +{ + "entries": [ + { + "base": "set_position", + "context": "Method", + "variant": "", + "details": { + "name": "", + "category": "Globals" + }, + "methods": [ + { + "base": "set_position", + "context": "Global", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke set_position" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after set_position is invoked" + }, + "details": { + "name": "set_position", + "category": "Other" + }, + "params": [ + { + "typeid": "{3AB0037F-AF8D-48CE-BCA0-A170D18B2C03}", + "details": { + "name": "const char*" + } + }, + { + "typeid": "{EA2C3E90-AFBE-44D4-A90D-FAAF79BAF93D}", + "details": { + "name": "float" + } + }, + { + "typeid": "{EA2C3E90-AFBE-44D4-A90D-FAAF79BAF93D}", + "details": { + "name": "float" + } + }, + { + "typeid": "{EA2C3E90-AFBE-44D4-A90D-FAAF79BAF93D}", + "details": { + "name": "float" + } + } + ] + } + ] + } + ] +} \ No newline at end of file diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/GlobalMethods/set_recording.names b/Gems/ScriptCanvas/Assets/TranslationAssets/GlobalMethods/set_recording.names new file mode 100644 index 0000000000..80c0825e98 --- /dev/null +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/GlobalMethods/set_recording.names @@ -0,0 +1,39 @@ +{ + "entries": [ + { + "base": "set_recording", + "context": "Method", + "variant": "", + "details": { + "name": "", + "category": "Globals" + }, + "methods": [ + { + "base": "set_recording", + "context": "Global", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke set_recording" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after set_recording is invoked" + }, + "details": { + "name": "set_recording", + "category": "Other" + }, + "params": [ + { + "typeid": "{A0CA880C-AFE4-43CB-926C-59AC48496112}", + "details": { + "name": "bool" + } + } + ] + } + ] + } + ] +} \ No newline at end of file diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/GlobalMethods/set_result_to_failure.names b/Gems/ScriptCanvas/Assets/TranslationAssets/GlobalMethods/set_result_to_failure.names new file mode 100644 index 0000000000..5ee0d43f1f --- /dev/null +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/GlobalMethods/set_result_to_failure.names @@ -0,0 +1,31 @@ +{ + "entries": [ + { + "base": "set_result_to_failure", + "context": "Method", + "variant": "", + "details": { + "name": "", + "category": "Globals" + }, + "methods": [ + { + "base": "set_result_to_failure", + "context": "Global", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke set_result_to_failure" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after set_result_to_failure is invoked" + }, + "details": { + "name": "set_result_to_failure", + "category": "Other" + } + } + ] + } + ] +} \ No newline at end of file diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/GlobalMethods/set_result_to_success.names b/Gems/ScriptCanvas/Assets/TranslationAssets/GlobalMethods/set_result_to_success.names new file mode 100644 index 0000000000..1abb4b73f1 --- /dev/null +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/GlobalMethods/set_result_to_success.names @@ -0,0 +1,31 @@ +{ + "entries": [ + { + "base": "set_result_to_success", + "context": "Method", + "variant": "", + "details": { + "name": "", + "category": "Globals" + }, + "methods": [ + { + "base": "set_result_to_success", + "context": "Global", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke set_result_to_success" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after set_result_to_success is invoked" + }, + "details": { + "name": "set_result_to_success", + "category": "Other" + } + } + ] + } + ] +} \ No newline at end of file diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/GlobalMethods/set_rotation.names b/Gems/ScriptCanvas/Assets/TranslationAssets/GlobalMethods/set_rotation.names new file mode 100644 index 0000000000..c4024f2fc3 --- /dev/null +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/GlobalMethods/set_rotation.names @@ -0,0 +1,57 @@ +{ + "entries": [ + { + "base": "set_rotation", + "context": "Method", + "variant": "", + "details": { + "name": "", + "category": "Globals" + }, + "methods": [ + { + "base": "set_rotation", + "context": "Global", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke set_rotation" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after set_rotation is invoked" + }, + "details": { + "name": "set_rotation", + "category": "Other" + }, + "params": [ + { + "typeid": "{3AB0037F-AF8D-48CE-BCA0-A170D18B2C03}", + "details": { + "name": "const char*" + } + }, + { + "typeid": "{EA2C3E90-AFBE-44D4-A90D-FAAF79BAF93D}", + "details": { + "name": "float" + } + }, + { + "typeid": "{EA2C3E90-AFBE-44D4-A90D-FAAF79BAF93D}", + "details": { + "name": "float" + } + }, + { + "typeid": "{EA2C3E90-AFBE-44D4-A90D-FAAF79BAF93D}", + "details": { + "name": "float" + } + } + ] + } + ] + } + ] +} \ No newline at end of file diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/GlobalMethods/set_scale.names b/Gems/ScriptCanvas/Assets/TranslationAssets/GlobalMethods/set_scale.names new file mode 100644 index 0000000000..9f2072047c --- /dev/null +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/GlobalMethods/set_scale.names @@ -0,0 +1,57 @@ +{ + "entries": [ + { + "base": "set_scale", + "context": "Method", + "variant": "", + "details": { + "name": "", + "category": "Globals" + }, + "methods": [ + { + "base": "set_scale", + "context": "Global", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke set_scale" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after set_scale is invoked" + }, + "details": { + "name": "set_scale", + "category": "Other" + }, + "params": [ + { + "typeid": "{3AB0037F-AF8D-48CE-BCA0-A170D18B2C03}", + "details": { + "name": "const char*" + } + }, + { + "typeid": "{EA2C3E90-AFBE-44D4-A90D-FAAF79BAF93D}", + "details": { + "name": "float" + } + }, + { + "typeid": "{EA2C3E90-AFBE-44D4-A90D-FAAF79BAF93D}", + "details": { + "name": "float" + } + }, + { + "typeid": "{EA2C3E90-AFBE-44D4-A90D-FAAF79BAF93D}", + "details": { + "name": "float" + } + } + ] + } + ] + } + ] +} \ No newline at end of file diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/GlobalMethods/set_sequence_time_range.names b/Gems/ScriptCanvas/Assets/TranslationAssets/GlobalMethods/set_sequence_time_range.names new file mode 100644 index 0000000000..5d48f6e909 --- /dev/null +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/GlobalMethods/set_sequence_time_range.names @@ -0,0 +1,51 @@ +{ + "entries": [ + { + "base": "set_sequence_time_range", + "context": "Method", + "variant": "", + "details": { + "name": "", + "category": "Globals" + }, + "methods": [ + { + "base": "set_sequence_time_range", + "context": "Global", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke set_sequence_time_range" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after set_sequence_time_range is invoked" + }, + "details": { + "name": "set_sequence_time_range", + "category": "Other" + }, + "params": [ + { + "typeid": "{3AB0037F-AF8D-48CE-BCA0-A170D18B2C03}", + "details": { + "name": "const char*" + } + }, + { + "typeid": "{EA2C3E90-AFBE-44D4-A90D-FAAF79BAF93D}", + "details": { + "name": "float" + } + }, + { + "typeid": "{EA2C3E90-AFBE-44D4-A90D-FAAF79BAF93D}", + "details": { + "name": "float" + } + } + ] + } + ] + } + ] +} \ No newline at end of file diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/GlobalMethods/set_time.names b/Gems/ScriptCanvas/Assets/TranslationAssets/GlobalMethods/set_time.names new file mode 100644 index 0000000000..7cec862361 --- /dev/null +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/GlobalMethods/set_time.names @@ -0,0 +1,39 @@ +{ + "entries": [ + { + "base": "set_time", + "context": "Method", + "variant": "", + "details": { + "name": "", + "category": "Globals" + }, + "methods": [ + { + "base": "set_time", + "context": "Global", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke set_time" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after set_time is invoked" + }, + "details": { + "name": "set_time", + "category": "Other" + }, + "params": [ + { + "typeid": "{EA2C3E90-AFBE-44D4-A90D-FAAF79BAF93D}", + "details": { + "name": "float" + } + } + ] + } + ] + } + ] +} \ No newline at end of file diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/GlobalMethods/set_view_pane_layout.names b/Gems/ScriptCanvas/Assets/TranslationAssets/GlobalMethods/set_view_pane_layout.names new file mode 100644 index 0000000000..bedaf68083 --- /dev/null +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/GlobalMethods/set_view_pane_layout.names @@ -0,0 +1,39 @@ +{ + "entries": [ + { + "base": "set_view_pane_layout", + "context": "Method", + "variant": "", + "details": { + "name": "", + "category": "Globals" + }, + "methods": [ + { + "base": "set_view_pane_layout", + "context": "Global", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke set_view_pane_layout" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after set_view_pane_layout is invoked" + }, + "details": { + "name": "set_view_pane_layout", + "category": "Other" + }, + "params": [ + { + "typeid": "{43DA906B-7DEF-4CA8-9790-854106D3F983}", + "details": { + "name": "unsigned int" + } + } + ] + } + ] + } + ] +} \ No newline at end of file diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/GlobalMethods/set_viewport_expansion_policy.names b/Gems/ScriptCanvas/Assets/TranslationAssets/GlobalMethods/set_viewport_expansion_policy.names new file mode 100644 index 0000000000..cbcfd8722b --- /dev/null +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/GlobalMethods/set_viewport_expansion_policy.names @@ -0,0 +1,39 @@ +{ + "entries": [ + { + "base": "set_viewport_expansion_policy", + "context": "Method", + "variant": "", + "details": { + "name": "", + "category": "Globals" + }, + "methods": [ + { + "base": "set_viewport_expansion_policy", + "context": "Global", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke set_viewport_expansion_policy" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after set_viewport_expansion_policy is invoked" + }, + "details": { + "name": "set_viewport_expansion_policy", + "category": "Other" + }, + "params": [ + { + "typeid": "{3AB0037F-AF8D-48CE-BCA0-A170D18B2C03}", + "details": { + "name": "const char*" + } + } + ] + } + ] + } + ] +} \ No newline at end of file diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/GlobalMethods/set_viewport_size.names b/Gems/ScriptCanvas/Assets/TranslationAssets/GlobalMethods/set_viewport_size.names new file mode 100644 index 0000000000..473499e785 --- /dev/null +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/GlobalMethods/set_viewport_size.names @@ -0,0 +1,45 @@ +{ + "entries": [ + { + "base": "set_viewport_size", + "context": "Method", + "variant": "", + "details": { + "name": "", + "category": "Globals" + }, + "methods": [ + { + "base": "set_viewport_size", + "context": "Global", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke set_viewport_size" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after set_viewport_size is invoked" + }, + "details": { + "name": "set_viewport_size", + "category": "Other" + }, + "params": [ + { + "typeid": "{72039442-EB38-4D42-A1AD-CB68F7E0EEF6}", + "details": { + "name": "int" + } + }, + { + "typeid": "{72039442-EB38-4D42-A1AD-CB68F7E0EEF6}", + "details": { + "name": "int" + } + } + ] + } + ] + } + ] +} \ No newline at end of file diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/GlobalMethods/start_process_detached.names b/Gems/ScriptCanvas/Assets/TranslationAssets/GlobalMethods/start_process_detached.names new file mode 100644 index 0000000000..284efd4cb1 --- /dev/null +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/GlobalMethods/start_process_detached.names @@ -0,0 +1,45 @@ +{ + "entries": [ + { + "base": "start_process_detached", + "context": "Method", + "variant": "", + "details": { + "name": "", + "category": "Globals" + }, + "methods": [ + { + "base": "start_process_detached", + "context": "Global", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke start_process_detached" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after start_process_detached is invoked" + }, + "details": { + "name": "start_process_detached", + "category": "Other" + }, + "params": [ + { + "typeid": "{3AB0037F-AF8D-48CE-BCA0-A170D18B2C03}", + "details": { + "name": "const char*" + } + }, + { + "typeid": "{3AB0037F-AF8D-48CE-BCA0-A170D18B2C03}", + "details": { + "name": "const char*" + } + } + ] + } + ] + } + ] +} \ No newline at end of file diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/GlobalMethods/stop_sequence.names b/Gems/ScriptCanvas/Assets/TranslationAssets/GlobalMethods/stop_sequence.names new file mode 100644 index 0000000000..8bd02f3962 --- /dev/null +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/GlobalMethods/stop_sequence.names @@ -0,0 +1,31 @@ +{ + "entries": [ + { + "base": "stop_sequence", + "context": "Method", + "variant": "", + "details": { + "name": "", + "category": "Globals" + }, + "methods": [ + { + "base": "stop_sequence", + "context": "Global", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke stop_sequence" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after stop_sequence is invoked" + }, + "details": { + "name": "stop_sequence", + "category": "Other" + } + } + ] + } + ] +} \ No newline at end of file diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/GlobalMethods/test_output.names b/Gems/ScriptCanvas/Assets/TranslationAssets/GlobalMethods/test_output.names new file mode 100644 index 0000000000..472f548239 --- /dev/null +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/GlobalMethods/test_output.names @@ -0,0 +1,39 @@ +{ + "entries": [ + { + "base": "test_output", + "context": "Method", + "variant": "", + "details": { + "name": "", + "category": "Globals" + }, + "methods": [ + { + "base": "test_output", + "context": "Global", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke test_output" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after test_output is invoked" + }, + "details": { + "name": "test_output", + "category": "Other" + }, + "params": [ + { + "typeid": "{03AAAB3F-5C47-5A66-9EBC-D5FA4DB353C9}", + "details": { + "name": "const AZStd::basic_string, alloc" + } + } + ] + } + ] + } + ] +} \ No newline at end of file diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/GlobalMethods/toggle_helpers.names b/Gems/ScriptCanvas/Assets/TranslationAssets/GlobalMethods/toggle_helpers.names new file mode 100644 index 0000000000..f3d5f14365 --- /dev/null +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/GlobalMethods/toggle_helpers.names @@ -0,0 +1,31 @@ +{ + "entries": [ + { + "base": "toggle_helpers", + "context": "Method", + "variant": "", + "details": { + "name": "", + "category": "Globals" + }, + "methods": [ + { + "base": "toggle_helpers", + "context": "Global", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke toggle_helpers" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after toggle_helpers is invoked" + }, + "details": { + "name": "toggle_helpers", + "category": "Other" + } + } + ] + } + ] +} \ No newline at end of file diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/GlobalMethods/undo.names b/Gems/ScriptCanvas/Assets/TranslationAssets/GlobalMethods/undo.names new file mode 100644 index 0000000000..9b222815c6 --- /dev/null +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/GlobalMethods/undo.names @@ -0,0 +1,31 @@ +{ + "entries": [ + { + "base": "undo", + "context": "Method", + "variant": "", + "details": { + "name": "", + "category": "Globals" + }, + "methods": [ + { + "base": "undo", + "context": "Global", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke undo" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after undo is invoked" + }, + "details": { + "name": "undo", + "category": "Other" + } + } + ] + } + ] +} \ No newline at end of file diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/GlobalMethods/unfreeze_object.names b/Gems/ScriptCanvas/Assets/TranslationAssets/GlobalMethods/unfreeze_object.names new file mode 100644 index 0000000000..5b1d3c5d5c --- /dev/null +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/GlobalMethods/unfreeze_object.names @@ -0,0 +1,39 @@ +{ + "entries": [ + { + "base": "unfreeze_object", + "context": "Method", + "variant": "", + "details": { + "name": "", + "category": "Globals" + }, + "methods": [ + { + "base": "unfreeze_object", + "context": "Global", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke unfreeze_object" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after unfreeze_object is invoked" + }, + "details": { + "name": "unfreeze_object", + "category": "Other" + }, + "params": [ + { + "typeid": "{3AB0037F-AF8D-48CE-BCA0-A170D18B2C03}", + "details": { + "name": "const char*" + } + } + ] + } + ] + } + ] +} \ No newline at end of file diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/GlobalMethods/unhide_all_objects.names b/Gems/ScriptCanvas/Assets/TranslationAssets/GlobalMethods/unhide_all_objects.names new file mode 100644 index 0000000000..c2526a981a --- /dev/null +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/GlobalMethods/unhide_all_objects.names @@ -0,0 +1,31 @@ +{ + "entries": [ + { + "base": "unhide_all_objects", + "context": "Method", + "variant": "", + "details": { + "name": "", + "category": "Globals" + }, + "methods": [ + { + "base": "unhide_all_objects", + "context": "Global", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke unhide_all_objects" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after unhide_all_objects is invoked" + }, + "details": { + "name": "unhide_all_objects", + "category": "Other" + } + } + ] + } + ] +} \ No newline at end of file diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/GlobalMethods/unhide_object.names b/Gems/ScriptCanvas/Assets/TranslationAssets/GlobalMethods/unhide_object.names new file mode 100644 index 0000000000..d15ceed4bb --- /dev/null +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/GlobalMethods/unhide_object.names @@ -0,0 +1,39 @@ +{ + "entries": [ + { + "base": "unhide_object", + "context": "Method", + "variant": "", + "details": { + "name": "", + "category": "Globals" + }, + "methods": [ + { + "base": "unhide_object", + "context": "Global", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke unhide_object" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after unhide_object is invoked" + }, + "details": { + "name": "unhide_object", + "category": "Other" + }, + "params": [ + { + "typeid": "{3AB0037F-AF8D-48CE-BCA0-A170D18B2C03}", + "details": { + "name": "const char*" + } + } + ] + } + ] + } + ] +} \ No newline at end of file diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/GlobalMethods/unselect_objects.names b/Gems/ScriptCanvas/Assets/TranslationAssets/GlobalMethods/unselect_objects.names new file mode 100644 index 0000000000..19b8dba917 --- /dev/null +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/GlobalMethods/unselect_objects.names @@ -0,0 +1,39 @@ +{ + "entries": [ + { + "base": "unselect_objects", + "context": "Method", + "variant": "", + "details": { + "name": "", + "category": "Globals" + }, + "methods": [ + { + "base": "unselect_objects", + "context": "Global", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke unselect_objects" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after unselect_objects is invoked" + }, + "details": { + "name": "unselect_objects", + "category": "Other" + }, + "params": [ + { + "typeid": "{99DAD0BC-740E-5E82-826B-8FC7968CC02C}", + "details": { + "name": "const AZStd::vector max), adding any point to it will make it valid" + }, + "slots": [ + { + "base": "Input_In_0", + "details": { + "name": "In" + } + }, + { + "base": "Output_Out_0", + "details": { + "name": "Out" + } + }, + { + "base": "DataOutput_Result_0", + "details": { + "name": "Result" + } + } + ] + } + ] +} \ No newline at end of file diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathAABB_Overlaps.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathAABB_Overlaps.names new file mode 100644 index 0000000000..1a69a2d819 --- /dev/null +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathAABB_Overlaps.names @@ -0,0 +1,46 @@ +{ + "entries": [ + { + "base": "{CE4AF636-AB72-589D-92E9-A3C75A3F9C7F}", + "context": "ScriptCanvas::Node", + "variant": "", + "details": { + "name": "Overlaps", + "category": "Math/AABB", + "tooltip": "returns true if A overlaps B, else false" + }, + "slots": [ + { + "base": "Input_In_0", + "details": { + "name": "In" + } + }, + { + "base": "Output_Out_0", + "details": { + "name": "Out" + } + }, + { + "base": "DataInput_A_0", + "details": { + "name": "A" + } + }, + { + "base": "DataInput_B_1", + "details": { + "name": "B" + } + }, + { + "base": "DataOutput_Result_0", + "details": { + "name": "Result" + } + } + ] + } + ] +} \ No newline at end of file diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathAABB_SurfaceArea.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathAABB_SurfaceArea.names new file mode 100644 index 0000000000..22152bd4a6 --- /dev/null +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathAABB_SurfaceArea.names @@ -0,0 +1,40 @@ +{ + "entries": [ + { + "base": "{46EE9F31-DDE1-5482-9A03-A0D4A6BE429C}", + "context": "ScriptCanvas::Node", + "variant": "", + "details": { + "name": "Surface Area", + "category": "Math/AABB", + "tooltip": "returns the sum of the surface area of all six faces of Source" + }, + "slots": [ + { + "base": "Input_In_0", + "details": { + "name": "In" + } + }, + { + "base": "Output_Out_0", + "details": { + "name": "Out" + } + }, + { + "base": "DataInput_Source_0", + "details": { + "name": "Source" + } + }, + { + "base": "DataOutput_Result_0", + "details": { + "name": "Result" + } + } + ] + } + ] +} \ No newline at end of file diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathAABB_ToSphere.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathAABB_ToSphere.names new file mode 100644 index 0000000000..30d54f3e14 --- /dev/null +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathAABB_ToSphere.names @@ -0,0 +1,46 @@ +{ + "entries": [ + { + "base": "{214CCB41-01CA-578C-9D7F-1237202A885B}", + "context": "ScriptCanvas::Node", + "variant": "", + "details": { + "name": "To Sphere", + "category": "Math/AABB", + "tooltip": "returns the center and radius of smallest sphere that contains Source" + }, + "slots": [ + { + "base": "Input_In_0", + "details": { + "name": "In" + } + }, + { + "base": "Output_Out_0", + "details": { + "name": "Out" + } + }, + { + "base": "DataInput_Source_0", + "details": { + "name": "Source" + } + }, + { + "base": "DataOutput_Center_0", + "details": { + "name": "Center" + } + }, + { + "base": "DataOutput_Radius_1", + "details": { + "name": "Radius" + } + } + ] + } + ] +} \ No newline at end of file diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathAABB_Translate.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathAABB_Translate.names new file mode 100644 index 0000000000..34c66d8e43 --- /dev/null +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathAABB_Translate.names @@ -0,0 +1,46 @@ +{ + "entries": [ + { + "base": "{22DBE624-D16E-51E7-BFF5-6C136E8E4581}", + "context": "ScriptCanvas::Node", + "variant": "", + "details": { + "name": "Translate", + "category": "Math/AABB", + "tooltip": "returns the Source with each point added with Translation" + }, + "slots": [ + { + "base": "Input_In_0", + "details": { + "name": "In" + } + }, + { + "base": "Output_Out_0", + "details": { + "name": "Out" + } + }, + { + "base": "DataInput_Source_0", + "details": { + "name": "Source" + } + }, + { + "base": "DataInput_Translation_1", + "details": { + "name": "Translation" + } + }, + { + "base": "DataOutput_Result_0", + "details": { + "name": "Result" + } + } + ] + } + ] +} \ No newline at end of file diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathAABB_XExtent.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathAABB_XExtent.names new file mode 100644 index 0000000000..0795654fa1 --- /dev/null +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathAABB_XExtent.names @@ -0,0 +1,40 @@ +{ + "entries": [ + { + "base": "{58B36FE7-19EB-5407-95BD-D16C62F04E0D}", + "context": "ScriptCanvas::Node", + "variant": "", + "details": { + "name": "X Extent", + "category": "Math/AABB", + "tooltip": "returns the X extent (max X - min X) of Source" + }, + "slots": [ + { + "base": "Input_In_0", + "details": { + "name": "In" + } + }, + { + "base": "Output_Out_0", + "details": { + "name": "Out" + } + }, + { + "base": "DataInput_Source_0", + "details": { + "name": "Source" + } + }, + { + "base": "DataOutput_Result_0", + "details": { + "name": "Result" + } + } + ] + } + ] +} \ No newline at end of file diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathAABB_YExtent.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathAABB_YExtent.names new file mode 100644 index 0000000000..277ba3cef5 --- /dev/null +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathAABB_YExtent.names @@ -0,0 +1,40 @@ +{ + "entries": [ + { + "base": "{631968DE-47B3-5214-B564-E14025135BAA}", + "context": "ScriptCanvas::Node", + "variant": "", + "details": { + "name": "Y Extent", + "category": "Math/AABB", + "tooltip": "returns the Y extent (max Y - min Y) of Source" + }, + "slots": [ + { + "base": "Input_In_0", + "details": { + "name": "In" + } + }, + { + "base": "Output_Out_0", + "details": { + "name": "Out" + } + }, + { + "base": "DataInput_Source_0", + "details": { + "name": "Source" + } + }, + { + "base": "DataOutput_Result_0", + "details": { + "name": "Result" + } + } + ] + } + ] +} \ No newline at end of file diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathAABB_ZExtent.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathAABB_ZExtent.names new file mode 100644 index 0000000000..8f477f3325 --- /dev/null +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathAABB_ZExtent.names @@ -0,0 +1,40 @@ +{ + "entries": [ + { + "base": "{0CE6DD20-9E09-5CCE-A514-196958FD4871}", + "context": "ScriptCanvas::Node", + "variant": "", + "details": { + "name": "Z Extent", + "category": "Math/AABB", + "tooltip": "returns the Z extent (max Z - min Z) of Source" + }, + "slots": [ + { + "base": "Input_In_0", + "details": { + "name": "In" + } + }, + { + "base": "Output_Out_0", + "details": { + "name": "Out" + } + }, + { + "base": "DataInput_Source_0", + "details": { + "name": "Source" + } + }, + { + "base": "DataOutput_Result_0", + "details": { + "name": "Result" + } + } + ] + } + ] +} \ No newline at end of file diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathColor_Dot.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathColor_Dot.names new file mode 100644 index 0000000000..c3d3a759ab --- /dev/null +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathColor_Dot.names @@ -0,0 +1,46 @@ +{ + "entries": [ + { + "base": "{92A67932-241C-5BF4-8D4F-327F3E819F56}", + "context": "ScriptCanvas::Node", + "variant": "", + "details": { + "name": "Dot", + "category": "Math/Color", + "tooltip": "returns the 4-element dot product of A and B" + }, + "slots": [ + { + "base": "Input_In_0", + "details": { + "name": "In" + } + }, + { + "base": "Output_Out_0", + "details": { + "name": "Out" + } + }, + { + "base": "DataInput_A_0", + "details": { + "name": "A" + } + }, + { + "base": "DataInput_B_1", + "details": { + "name": "B" + } + }, + { + "base": "DataOutput_Result_0", + "details": { + "name": "Result" + } + } + ] + } + ] +} \ No newline at end of file diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathColor_Dot3.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathColor_Dot3.names new file mode 100644 index 0000000000..5e548beccf --- /dev/null +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathColor_Dot3.names @@ -0,0 +1,46 @@ +{ + "entries": [ + { + "base": "{91E89FD2-F929-5491-BD2A-4B83D2455AAB}", + "context": "ScriptCanvas::Node", + "variant": "", + "details": { + "name": "Dot 3", + "category": "Math/Color", + "tooltip": "returns the 3-element dot product of A and B, using only the R, G, B elements" + }, + "slots": [ + { + "base": "Input_In_0", + "details": { + "name": "In" + } + }, + { + "base": "Output_Out_0", + "details": { + "name": "Out" + } + }, + { + "base": "DataInput_A_0", + "details": { + "name": "A" + } + }, + { + "base": "DataInput_B_1", + "details": { + "name": "B" + } + }, + { + "base": "DataOutput_Result_0", + "details": { + "name": "Result" + } + } + ] + } + ] +} \ No newline at end of file diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathColor_FromValues.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathColor_FromValues.names new file mode 100644 index 0000000000..327b08382e --- /dev/null +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathColor_FromValues.names @@ -0,0 +1,58 @@ +{ + "entries": [ + { + "base": "{84F9B63C-F6F5-58AD-8669-C25287CDC037}", + "context": "ScriptCanvas::Node", + "variant": "", + "details": { + "name": "From Values", + "category": "Math/Color", + "tooltip": "returns a Color from the R, G, B, A inputs" + }, + "slots": [ + { + "base": "Input_In_0", + "details": { + "name": "In" + } + }, + { + "base": "Output_Out_0", + "details": { + "name": "Out" + } + }, + { + "base": "DataInput_R_0", + "details": { + "name": "R" + } + }, + { + "base": "DataInput_G_1", + "details": { + "name": "G" + } + }, + { + "base": "DataInput_B_2", + "details": { + "name": "B" + } + }, + { + "base": "DataInput_A_3", + "details": { + "name": "A" + } + }, + { + "base": "DataOutput_Result_0", + "details": { + "name": "Result" + } + } + ] + } + ] +} \ No newline at end of file diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathColor_FromVector3.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathColor_FromVector3.names new file mode 100644 index 0000000000..c5ae0aa32e --- /dev/null +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathColor_FromVector3.names @@ -0,0 +1,40 @@ +{ + "entries": [ + { + "base": "{4EC849DB-B390-5C13-ADE9-A0CD8F06D63E}", + "context": "ScriptCanvas::Node", + "variant": "", + "details": { + "name": "From Vector 3", + "category": "Math/Color", + "tooltip": "returns a Color with R, G, B set to X, Y, Z values of RGB, respectively. A is set to 1.0" + }, + "slots": [ + { + "base": "Input_In_0", + "details": { + "name": "In" + } + }, + { + "base": "Output_Out_0", + "details": { + "name": "Out" + } + }, + { + "base": "DataInput_RGB_0", + "details": { + "name": "RGB" + } + }, + { + "base": "DataOutput_Result_0", + "details": { + "name": "Result" + } + } + ] + } + ] +} \ No newline at end of file diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathColor_FromVector3AndNumber.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathColor_FromVector3AndNumber.names new file mode 100644 index 0000000000..9364547804 --- /dev/null +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathColor_FromVector3AndNumber.names @@ -0,0 +1,46 @@ +{ + "entries": [ + { + "base": "{5829F3E6-1F1D-58C2-BD72-66D4DE866AB9}", + "context": "ScriptCanvas::Node", + "variant": "", + "details": { + "name": "From Vector 3 And Number", + "category": "Math/Color", + "tooltip": "returns a Color with R, G, B set to X, Y, Z values of RGB, respectively. A is set to A" + }, + "slots": [ + { + "base": "Input_In_0", + "details": { + "name": "In" + } + }, + { + "base": "Output_Out_0", + "details": { + "name": "Out" + } + }, + { + "base": "DataInput_RGB_0", + "details": { + "name": "RGB" + } + }, + { + "base": "DataInput_A_1", + "details": { + "name": "A" + } + }, + { + "base": "DataOutput_Result_0", + "details": { + "name": "Result" + } + } + ] + } + ] +} \ No newline at end of file diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathColor_GammaToLinear.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathColor_GammaToLinear.names new file mode 100644 index 0000000000..5c94cfdc4e --- /dev/null +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathColor_GammaToLinear.names @@ -0,0 +1,40 @@ +{ + "entries": [ + { + "base": "{721CF0C9-BE86-59B4-A5B6-AC936744CE5E}", + "context": "ScriptCanvas::Node", + "variant": "", + "details": { + "name": "Gamma To Linear", + "category": "Math/Color", + "tooltip": "returns Source converted from gamma corrected to linear space" + }, + "slots": [ + { + "base": "Input_In_0", + "details": { + "name": "In" + } + }, + { + "base": "Output_Out_0", + "details": { + "name": "Out" + } + }, + { + "base": "DataInput_Source_0", + "details": { + "name": "Source" + } + }, + { + "base": "DataOutput_Result_0", + "details": { + "name": "Result" + } + } + ] + } + ] +} \ No newline at end of file diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathColor_IsClose.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathColor_IsClose.names new file mode 100644 index 0000000000..1b3e666878 --- /dev/null +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathColor_IsClose.names @@ -0,0 +1,52 @@ +{ + "entries": [ + { + "base": "{629BABFE-B9D2-5D29-BCC1-3E5CBDD7CAA4}", + "context": "ScriptCanvas::Node", + "variant": "", + "details": { + "name": "Is Close", + "category": "Math/Color", + "tooltip": "returns true if A is within Tolerance of B, else false" + }, + "slots": [ + { + "base": "Input_In_0", + "details": { + "name": "In" + } + }, + { + "base": "Output_Out_0", + "details": { + "name": "Out" + } + }, + { + "base": "DataInput_A_0", + "details": { + "name": "A" + } + }, + { + "base": "DataInput_B_1", + "details": { + "name": "B" + } + }, + { + "base": "DataInput_Tolerance_2", + "details": { + "name": "Tolerance" + } + }, + { + "base": "DataOutput_Result_0", + "details": { + "name": "Result" + } + } + ] + } + ] +} \ No newline at end of file diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathColor_IsZero.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathColor_IsZero.names new file mode 100644 index 0000000000..a2efd6ad06 --- /dev/null +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathColor_IsZero.names @@ -0,0 +1,46 @@ +{ + "entries": [ + { + "base": "{8A949DAB-0F0E-52FA-83EF-EA75B38076C8}", + "context": "ScriptCanvas::Node", + "variant": "", + "details": { + "name": "Is Zero", + "category": "Math/Color", + "tooltip": "returns true if Source is within Tolerance of zero" + }, + "slots": [ + { + "base": "Input_In_0", + "details": { + "name": "In" + } + }, + { + "base": "Output_Out_0", + "details": { + "name": "Out" + } + }, + { + "base": "DataInput_Source_0", + "details": { + "name": "Source" + } + }, + { + "base": "DataInput_Tolerance_1", + "details": { + "name": "Tolerance" + } + }, + { + "base": "DataOutput_Result_0", + "details": { + "name": "Result" + } + } + ] + } + ] +} \ No newline at end of file diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathColor_LinearToGamma.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathColor_LinearToGamma.names new file mode 100644 index 0000000000..79de306912 --- /dev/null +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathColor_LinearToGamma.names @@ -0,0 +1,40 @@ +{ + "entries": [ + { + "base": "{8F561D51-2991-5493-8CED-B2FBAF168E72}", + "context": "ScriptCanvas::Node", + "variant": "", + "details": { + "name": "Linear To Gamma", + "category": "Math/Color", + "tooltip": "returns Source converted from linear to gamma corrected space" + }, + "slots": [ + { + "base": "Input_In_0", + "details": { + "name": "In" + } + }, + { + "base": "Output_Out_0", + "details": { + "name": "Out" + } + }, + { + "base": "DataInput_Source_0", + "details": { + "name": "Source" + } + }, + { + "base": "DataOutput_Result_0", + "details": { + "name": "Result" + } + } + ] + } + ] +} \ No newline at end of file diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathColor_MultiplyByNumber.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathColor_MultiplyByNumber.names new file mode 100644 index 0000000000..588c0fd3d6 --- /dev/null +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathColor_MultiplyByNumber.names @@ -0,0 +1,46 @@ +{ + "entries": [ + { + "base": "{B779B815-EC1B-5075-A167-0F213445BB53}", + "context": "ScriptCanvas::Node", + "variant": "", + "details": { + "name": "Multiply By Number", + "category": "Math/Color", + "tooltip": "returns Source with every elemented multiplied by Multiplier" + }, + "slots": [ + { + "base": "Input_In_0", + "details": { + "name": "In" + } + }, + { + "base": "Output_Out_0", + "details": { + "name": "Out" + } + }, + { + "base": "DataInput_Source_0", + "details": { + "name": "Source" + } + }, + { + "base": "DataInput_Multiplier_1", + "details": { + "name": "Multiplier" + } + }, + { + "base": "DataOutput_Result_0", + "details": { + "name": "Result" + } + } + ] + } + ] +} \ No newline at end of file diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathColor_One.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathColor_One.names new file mode 100644 index 0000000000..9ea9b55a68 --- /dev/null +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathColor_One.names @@ -0,0 +1,34 @@ +{ + "entries": [ + { + "base": "{E70E232F-9B2E-5802-9A58-422D47D88405}", + "context": "ScriptCanvas::Node", + "variant": "", + "details": { + "name": "One", + "category": "Math/Color", + "tooltip": "returns a Color with every element set to 1" + }, + "slots": [ + { + "base": "Input_In_0", + "details": { + "name": "In" + } + }, + { + "base": "Output_Out_0", + "details": { + "name": "Out" + } + }, + { + "base": "DataOutput_Result_0", + "details": { + "name": "Result" + } + } + ] + } + ] +} \ No newline at end of file diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathComparisons_EqualTo_==_.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathComparisons_EqualTo_==_.names new file mode 100644 index 0000000000..7ee72caed6 --- /dev/null +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathComparisons_EqualTo_==_.names @@ -0,0 +1,55 @@ +{ + "entries": [ + { + "base": "{02A3A3E6-9D80-432B-8AF5-F3AF24CF6959}", + "context": "ScriptCanvas::Node", + "variant": "", + "details": { + "name": "Equal To (==)", + "category": "Math/Comparisons", + "tooltip": "Checks if Value A and Value B are equal to each other" + }, + "slots": [ + { + "base": "DataOutput_Result_0", + "details": { + "name": "Result" + } + }, + { + "base": "Input_In_0", + "details": { + "name": "In", + "tooltip": "Signal to perform the evaluation when desired." + } + }, + { + "base": "Output_True_0", + "details": { + "name": "True", + "tooltip": "Signaled if the result of the operation is true." + } + }, + { + "base": "Output_False_1", + "details": { + "name": "False", + "tooltip": "Signaled if the result of the operation is false." + } + }, + { + "base": "DataInput_Value A_0", + "details": { + "name": "Value A" + } + }, + { + "base": "DataInput_Value B_1", + "details": { + "name": "Value B" + } + } + ] + } + ] +} \ No newline at end of file diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathComparisons_GreaterThan__.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathComparisons_GreaterThan__.names new file mode 100644 index 0000000000..aad4fffa7c --- /dev/null +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathComparisons_GreaterThan__.names @@ -0,0 +1,55 @@ +{ + "entries": [ + { + "base": "{218F5872-8D89-4FEA-9761-662625E29580}", + "context": "ScriptCanvas::Node", + "variant": "", + "details": { + "name": "Greater Than (>)", + "category": "Math/Comparisons", + "tooltip": "Checks if Value A is greater than Value B" + }, + "slots": [ + { + "base": "DataOutput_Result_0", + "details": { + "name": "Result" + } + }, + { + "base": "Input_In_0", + "details": { + "name": "In", + "tooltip": "Signal to perform the evaluation when desired." + } + }, + { + "base": "Output_True_0", + "details": { + "name": "True", + "tooltip": "Signaled if the result of the operation is true." + } + }, + { + "base": "Output_False_1", + "details": { + "name": "False", + "tooltip": "Signaled if the result of the operation is false." + } + }, + { + "base": "DataInput_Value A_0", + "details": { + "name": "Value A" + } + }, + { + "base": "DataInput_Value B_1", + "details": { + "name": "Value B" + } + } + ] + } + ] +} \ No newline at end of file diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathComparisons_GreaterThanorEqualTo_=_.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathComparisons_GreaterThanorEqualTo_=_.names new file mode 100644 index 0000000000..5dd48b7df6 --- /dev/null +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathComparisons_GreaterThanorEqualTo_=_.names @@ -0,0 +1,55 @@ +{ + "entries": [ + { + "base": "{8CA0C442-9139-4180-96EC-300FF888C35A}", + "context": "ScriptCanvas::Node", + "variant": "", + "details": { + "name": "Greater Than or Equal To (>=)", + "category": "Math/Comparisons", + "tooltip": "Checks if Value A is greater than or equal to Value B" + }, + "slots": [ + { + "base": "DataOutput_Result_0", + "details": { + "name": "Result" + } + }, + { + "base": "Input_In_0", + "details": { + "name": "In", + "tooltip": "Signal to perform the evaluation when desired." + } + }, + { + "base": "Output_True_0", + "details": { + "name": "True", + "tooltip": "Signaled if the result of the operation is true." + } + }, + { + "base": "Output_False_1", + "details": { + "name": "False", + "tooltip": "Signaled if the result of the operation is false." + } + }, + { + "base": "DataInput_Value A_0", + "details": { + "name": "Value A" + } + }, + { + "base": "DataInput_Value B_1", + "details": { + "name": "Value B" + } + } + ] + } + ] +} \ No newline at end of file diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathComparisons_LessThan___.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathComparisons_LessThan___.names new file mode 100644 index 0000000000..8d74f9f791 --- /dev/null +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathComparisons_LessThan___.names @@ -0,0 +1,55 @@ +{ + "entries": [ + { + "base": "{1B93426F-AAA2-4134-BE9A-C33B8F07F867}", + "context": "ScriptCanvas::Node", + "variant": "", + "details": { + "name": "Less Than (<)", + "category": "Math/Comparisons", + "tooltip": "Checks if Value A is less than Value B" + }, + "slots": [ + { + "base": "DataOutput_Result_0", + "details": { + "name": "Result" + } + }, + { + "base": "Input_In_0", + "details": { + "name": "In", + "tooltip": "Signal to perform the evaluation when desired." + } + }, + { + "base": "Output_True_0", + "details": { + "name": "True", + "tooltip": "Signaled if the result of the operation is true." + } + }, + { + "base": "Output_False_1", + "details": { + "name": "False", + "tooltip": "Signaled if the result of the operation is false." + } + }, + { + "base": "DataInput_Value A_0", + "details": { + "name": "Value A" + } + }, + { + "base": "DataInput_Value B_1", + "details": { + "name": "Value B" + } + } + ] + } + ] +} \ No newline at end of file diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathComparisons_LessThanorEqualTo__=_.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathComparisons_LessThanorEqualTo__=_.names new file mode 100644 index 0000000000..48329b3495 --- /dev/null +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathComparisons_LessThanorEqualTo__=_.names @@ -0,0 +1,55 @@ +{ + "entries": [ + { + "base": "{73F6E302-A2E9-4BE6-A88F-98F81A24100D}", + "context": "ScriptCanvas::Node", + "variant": "", + "details": { + "name": "Less Than or Equal To (<=)", + "category": "Math/Comparisons", + "tooltip": "Checks if Value A is less than or equal to Value B" + }, + "slots": [ + { + "base": "DataOutput_Result_0", + "details": { + "name": "Result" + } + }, + { + "base": "Input_In_0", + "details": { + "name": "In", + "tooltip": "Signal to perform the evaluation when desired." + } + }, + { + "base": "Output_True_0", + "details": { + "name": "True", + "tooltip": "Signaled if the result of the operation is true." + } + }, + { + "base": "Output_False_1", + "details": { + "name": "False", + "tooltip": "Signaled if the result of the operation is false." + } + }, + { + "base": "DataInput_Value A_0", + "details": { + "name": "Value A" + } + }, + { + "base": "DataInput_Value B_1", + "details": { + "name": "Value B" + } + } + ] + } + ] +} \ No newline at end of file diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathComparisons_NotEqualTo_!=_.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathComparisons_NotEqualTo_!=_.names new file mode 100644 index 0000000000..8fedb7632d --- /dev/null +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathComparisons_NotEqualTo_!=_.names @@ -0,0 +1,55 @@ +{ + "entries": [ + { + "base": "{C8D7A10F-A919-4467-96B1-F1852C282628}", + "context": "ScriptCanvas::Node", + "variant": "", + "details": { + "name": "Not Equal To (!=)", + "category": "Math/Comparisons", + "tooltip": "Checks if Value A is not equal to Value B" + }, + "slots": [ + { + "base": "DataOutput_Result_0", + "details": { + "name": "Result" + } + }, + { + "base": "Input_In_0", + "details": { + "name": "In", + "tooltip": "Signal to perform the evaluation when desired." + } + }, + { + "base": "Output_True_0", + "details": { + "name": "True", + "tooltip": "Signaled if the result of the operation is true." + } + }, + { + "base": "Output_False_1", + "details": { + "name": "False", + "tooltip": "Signaled if the result of the operation is false." + } + }, + { + "base": "DataInput_Value A_0", + "details": { + "name": "Value A" + } + }, + { + "base": "DataInput_Value B_1", + "details": { + "name": "Value B" + } + } + ] + } + ] +} \ No newline at end of file diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathCrc32_FromString.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathCrc32_FromString.names new file mode 100644 index 0000000000..636371c087 --- /dev/null +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathCrc32_FromString.names @@ -0,0 +1,40 @@ +{ + "entries": [ + { + "base": "{5C734A52-7CB1-5571-B6B2-F1C19A8CCE5A}", + "context": "ScriptCanvas::Node", + "variant": "", + "details": { + "name": "From String", + "category": "Math/Crc32", + "tooltip": "returns a Crc32 from the string" + }, + "slots": [ + { + "base": "Input_In_0", + "details": { + "name": "In" + } + }, + { + "base": "Output_Out_0", + "details": { + "name": "Out" + } + }, + { + "base": "DataInput_Value_0", + "details": { + "name": "Value" + } + }, + { + "base": "DataOutput_Result_0", + "details": { + "name": "Result" + } + } + ] + } + ] +} \ No newline at end of file diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathMatrix3x3_FromColumns.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathMatrix3x3_FromColumns.names new file mode 100644 index 0000000000..90ba23eaf8 --- /dev/null +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathMatrix3x3_FromColumns.names @@ -0,0 +1,52 @@ +{ + "entries": [ + { + "base": "{2185A730-0CA3-5B97-8150-51D9F28EA9C8}", + "context": "ScriptCanvas::Node", + "variant": "", + "details": { + "name": "From Columns", + "category": "Math/Matrix3x3", + "tooltip": "returns a rotation matrix based on angle around Z axis" + }, + "slots": [ + { + "base": "Input_In_0", + "details": { + "name": "In" + } + }, + { + "base": "Output_Out_0", + "details": { + "name": "Out" + } + }, + { + "base": "DataInput_Column1_0", + "details": { + "name": "Column1" + } + }, + { + "base": "DataInput_Column2_1", + "details": { + "name": "Column2" + } + }, + { + "base": "DataInput_Column3_2", + "details": { + "name": "Column3" + } + }, + { + "base": "DataOutput_Result_0", + "details": { + "name": "Result" + } + } + ] + } + ] +} \ No newline at end of file diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathMatrix3x3_FromCrossProduct.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathMatrix3x3_FromCrossProduct.names new file mode 100644 index 0000000000..a5660a3c6f --- /dev/null +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathMatrix3x3_FromCrossProduct.names @@ -0,0 +1,40 @@ +{ + "entries": [ + { + "base": "{06538E6D-FE44-5A9C-8081-083D5D19D4FC}", + "context": "ScriptCanvas::Node", + "variant": "", + "details": { + "name": "From Cross Product", + "category": "Math/Matrix3x3", + "tooltip": "returns a skew-symmetric cross product matrix based on supplied vector" + }, + "slots": [ + { + "base": "Input_In_0", + "details": { + "name": "In" + } + }, + { + "base": "Output_Out_0", + "details": { + "name": "Out" + } + }, + { + "base": "DataInput_Source_0", + "details": { + "name": "Source" + } + }, + { + "base": "DataOutput_Result_0", + "details": { + "name": "Result" + } + } + ] + } + ] +} \ No newline at end of file diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathMatrix3x3_FromDiagonal.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathMatrix3x3_FromDiagonal.names new file mode 100644 index 0000000000..b92cdef563 --- /dev/null +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathMatrix3x3_FromDiagonal.names @@ -0,0 +1,40 @@ +{ + "entries": [ + { + "base": "{F99F5D84-CDE6-5130-BAAC-7377F52D34FD}", + "context": "ScriptCanvas::Node", + "variant": "", + "details": { + "name": "From Diagonal", + "category": "Math/Matrix3x3", + "tooltip": "returns a diagonal matrix using the supplied vector" + }, + "slots": [ + { + "base": "Input_In_0", + "details": { + "name": "In" + } + }, + { + "base": "Output_Out_0", + "details": { + "name": "Out" + } + }, + { + "base": "DataInput_Source_0", + "details": { + "name": "Source" + } + }, + { + "base": "DataOutput_Result_0", + "details": { + "name": "Result" + } + } + ] + } + ] +} \ No newline at end of file diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathMatrix3x3_FromMatrix4x4.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathMatrix3x3_FromMatrix4x4.names new file mode 100644 index 0000000000..3040b5b8ed --- /dev/null +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathMatrix3x3_FromMatrix4x4.names @@ -0,0 +1,40 @@ +{ + "entries": [ + { + "base": "{5E5DA784-9D18-595F-BB1E-FA3AC8BA7DD6}", + "context": "ScriptCanvas::Node", + "variant": "", + "details": { + "name": "From Matrix 4x 4", + "category": "Math/Matrix3x3", + "tooltip": "returns a matrix from the first 3 rows of a Matrix3x3" + }, + "slots": [ + { + "base": "Input_In_0", + "details": { + "name": "In" + } + }, + { + "base": "Output_Out_0", + "details": { + "name": "Out" + } + }, + { + "base": "DataInput_Source_0", + "details": { + "name": "Source" + } + }, + { + "base": "DataOutput_Result_0", + "details": { + "name": "Result" + } + } + ] + } + ] +} \ No newline at end of file diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathMatrix3x3_FromQuaternion.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathMatrix3x3_FromQuaternion.names new file mode 100644 index 0000000000..3b381ff3b5 --- /dev/null +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathMatrix3x3_FromQuaternion.names @@ -0,0 +1,40 @@ +{ + "entries": [ + { + "base": "{1D87EFAE-3FC2-5D8A-931D-7D56DB4E3123}", + "context": "ScriptCanvas::Node", + "variant": "", + "details": { + "name": "From Quaternion", + "category": "Math/Matrix3x3", + "tooltip": "returns a rotation matrix using the supplied quaternion" + }, + "slots": [ + { + "base": "Input_In_0", + "details": { + "name": "In" + } + }, + { + "base": "Output_Out_0", + "details": { + "name": "Out" + } + }, + { + "base": "DataInput_Source_0", + "details": { + "name": "Source" + } + }, + { + "base": "DataOutput_Result_0", + "details": { + "name": "Result" + } + } + ] + } + ] +} \ No newline at end of file diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathMatrix3x3_FromRotationXDegrees.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathMatrix3x3_FromRotationXDegrees.names new file mode 100644 index 0000000000..2289885994 --- /dev/null +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathMatrix3x3_FromRotationXDegrees.names @@ -0,0 +1,40 @@ +{ + "entries": [ + { + "base": "{478D4CC5-BC42-574A-A81C-818FA9A3C635}", + "context": "ScriptCanvas::Node", + "variant": "", + "details": { + "name": "From RotationX Degrees", + "category": "Math/Matrix3x3", + "tooltip": "returns a rotation matrix representing a rotation in degrees around X-axis" + }, + "slots": [ + { + "base": "Input_In_0", + "details": { + "name": "In" + } + }, + { + "base": "Output_Out_0", + "details": { + "name": "Out" + } + }, + { + "base": "DataInput_Degrees_0", + "details": { + "name": "Degrees" + } + }, + { + "base": "DataOutput_Result_0", + "details": { + "name": "Result" + } + } + ] + } + ] +} \ No newline at end of file diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathMatrix3x3_FromRotationYDegrees.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathMatrix3x3_FromRotationYDegrees.names new file mode 100644 index 0000000000..362ff04556 --- /dev/null +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathMatrix3x3_FromRotationYDegrees.names @@ -0,0 +1,40 @@ +{ + "entries": [ + { + "base": "{A69D13B7-FBC3-5038-93CD-4FB822CFF8D4}", + "context": "ScriptCanvas::Node", + "variant": "", + "details": { + "name": "From RotationY Degrees", + "category": "Math/Matrix3x3", + "tooltip": "returns a rotation matrix representing a rotation in degrees around Y-axis" + }, + "slots": [ + { + "base": "Input_In_0", + "details": { + "name": "In" + } + }, + { + "base": "Output_Out_0", + "details": { + "name": "Out" + } + }, + { + "base": "DataInput_Degrees_0", + "details": { + "name": "Degrees" + } + }, + { + "base": "DataOutput_Result_0", + "details": { + "name": "Result" + } + } + ] + } + ] +} \ No newline at end of file diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathMatrix3x3_FromRotationZDegrees.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathMatrix3x3_FromRotationZDegrees.names new file mode 100644 index 0000000000..bf51a84455 --- /dev/null +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathMatrix3x3_FromRotationZDegrees.names @@ -0,0 +1,40 @@ +{ + "entries": [ + { + "base": "{5E449312-5741-59EB-A778-7FB6C75DB90A}", + "context": "ScriptCanvas::Node", + "variant": "", + "details": { + "name": "From RotationZ Degrees", + "category": "Math/Matrix3x3", + "tooltip": "returns a rotation matrix representing a rotation in degrees around Z-axis" + }, + "slots": [ + { + "base": "Input_In_0", + "details": { + "name": "In" + } + }, + { + "base": "Output_Out_0", + "details": { + "name": "Out" + } + }, + { + "base": "DataInput_Degrees_0", + "details": { + "name": "Degrees" + } + }, + { + "base": "DataOutput_Result_0", + "details": { + "name": "Result" + } + } + ] + } + ] +} \ No newline at end of file diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathMatrix3x3_FromRows.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathMatrix3x3_FromRows.names new file mode 100644 index 0000000000..879e73fa67 --- /dev/null +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathMatrix3x3_FromRows.names @@ -0,0 +1,52 @@ +{ + "entries": [ + { + "base": "{B70E2447-DE12-5D81-80E4-06BEE5A0219E}", + "context": "ScriptCanvas::Node", + "variant": "", + "details": { + "name": "From Rows", + "category": "Math/Matrix3x3", + "tooltip": "returns a matrix from three row" + }, + "slots": [ + { + "base": "Input_In_0", + "details": { + "name": "In" + } + }, + { + "base": "Output_Out_0", + "details": { + "name": "Out" + } + }, + { + "base": "DataInput_Row1_0", + "details": { + "name": "Row1" + } + }, + { + "base": "DataInput_Row2_1", + "details": { + "name": "Row2" + } + }, + { + "base": "DataInput_Row3_2", + "details": { + "name": "Row3" + } + }, + { + "base": "DataOutput_Result_0", + "details": { + "name": "Result" + } + } + ] + } + ] +} \ No newline at end of file diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathMatrix3x3_FromScale.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathMatrix3x3_FromScale.names new file mode 100644 index 0000000000..d331aa7cd1 --- /dev/null +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathMatrix3x3_FromScale.names @@ -0,0 +1,40 @@ +{ + "entries": [ + { + "base": "{A3F6A35C-068E-57D5-9761-69DC5AB0BD1B}", + "context": "ScriptCanvas::Node", + "variant": "", + "details": { + "name": "From Scale", + "category": "Math/Matrix3x3", + "tooltip": "returns a scale matrix using the supplied vector" + }, + "slots": [ + { + "base": "Input_In_0", + "details": { + "name": "In" + } + }, + { + "base": "Output_Out_0", + "details": { + "name": "Out" + } + }, + { + "base": "DataInput_Scale_0", + "details": { + "name": "Scale" + } + }, + { + "base": "DataOutput_Result_0", + "details": { + "name": "Result" + } + } + ] + } + ] +} \ No newline at end of file diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathMatrix3x3_FromTransform.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathMatrix3x3_FromTransform.names new file mode 100644 index 0000000000..69982d93ab --- /dev/null +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathMatrix3x3_FromTransform.names @@ -0,0 +1,40 @@ +{ + "entries": [ + { + "base": "{F54FFF79-75FF-5444-B941-DF216680BEA1}", + "context": "ScriptCanvas::Node", + "variant": "", + "details": { + "name": "From Transform", + "category": "Math/Matrix3x3", + "tooltip": "returns a matrix using the supplied transform" + }, + "slots": [ + { + "base": "Input_In_0", + "details": { + "name": "In" + } + }, + { + "base": "Output_Out_0", + "details": { + "name": "Out" + } + }, + { + "base": "DataInput_Transform_0", + "details": { + "name": "Transform" + } + }, + { + "base": "DataOutput_Result_0", + "details": { + "name": "Result" + } + } + ] + } + ] +} \ No newline at end of file diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathMatrix3x3_GetColumn.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathMatrix3x3_GetColumn.names new file mode 100644 index 0000000000..7e5e053278 --- /dev/null +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathMatrix3x3_GetColumn.names @@ -0,0 +1,46 @@ +{ + "entries": [ + { + "base": "{50724E19-5472-5E35-9F88-F226ABB37D1A}", + "context": "ScriptCanvas::Node", + "variant": "", + "details": { + "name": "Get Column", + "category": "Math/Matrix3x3", + "tooltip": "returns vector from matrix corresponding to the Column index" + }, + "slots": [ + { + "base": "Input_In_0", + "details": { + "name": "In" + } + }, + { + "base": "Output_Out_0", + "details": { + "name": "Out" + } + }, + { + "base": "DataInput_Source_0", + "details": { + "name": "Source" + } + }, + { + "base": "DataInput_Column_1", + "details": { + "name": "Column" + } + }, + { + "base": "DataOutput_Result_0", + "details": { + "name": "Result" + } + } + ] + } + ] +} \ No newline at end of file diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathMatrix3x3_GetColumns.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathMatrix3x3_GetColumns.names new file mode 100644 index 0000000000..4fe70dce73 --- /dev/null +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathMatrix3x3_GetColumns.names @@ -0,0 +1,52 @@ +{ + "entries": [ + { + "base": "{13EE83FC-EA87-5957-966F-EFD4E88A7698}", + "context": "ScriptCanvas::Node", + "variant": "", + "details": { + "name": "Get Columns", + "category": "Math/Matrix3x3", + "tooltip": "returns all columns from matrix" + }, + "slots": [ + { + "base": "Input_In_0", + "details": { + "name": "In" + } + }, + { + "base": "Output_Out_0", + "details": { + "name": "Out" + } + }, + { + "base": "DataInput_Source_0", + "details": { + "name": "Source" + } + }, + { + "base": "DataOutput_Column1_0", + "details": { + "name": "Column1" + } + }, + { + "base": "DataOutput_Column2_1", + "details": { + "name": "Column2" + } + }, + { + "base": "DataOutput_Column3_2", + "details": { + "name": "Column3" + } + } + ] + } + ] +} \ No newline at end of file diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathMatrix3x3_GetDiagonal.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathMatrix3x3_GetDiagonal.names new file mode 100644 index 0000000000..ab47e40a1f --- /dev/null +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathMatrix3x3_GetDiagonal.names @@ -0,0 +1,40 @@ +{ + "entries": [ + { + "base": "{68B65AD0-B42F-5C85-B194-4FC6C31AD237}", + "context": "ScriptCanvas::Node", + "variant": "", + "details": { + "name": "Get Diagonal", + "category": "Math/Matrix3x3", + "tooltip": "returns vector of matrix diagonal values" + }, + "slots": [ + { + "base": "Input_In_0", + "details": { + "name": "In" + } + }, + { + "base": "Output_Out_0", + "details": { + "name": "Out" + } + }, + { + "base": "DataInput_Source_0", + "details": { + "name": "Source" + } + }, + { + "base": "DataOutput_Result_0", + "details": { + "name": "Result" + } + } + ] + } + ] +} \ No newline at end of file diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathMatrix3x3_GetElement.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathMatrix3x3_GetElement.names new file mode 100644 index 0000000000..efe3dd4ae6 --- /dev/null +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathMatrix3x3_GetElement.names @@ -0,0 +1,52 @@ +{ + "entries": [ + { + "base": "{6FA2A21C-2189-55E4-B65E-2A961586F31E}", + "context": "ScriptCanvas::Node", + "variant": "", + "details": { + "name": "Get Element", + "category": "Math/Matrix3x3", + "tooltip": "returns scalar from matrix corresponding to the (Row,Column) pair" + }, + "slots": [ + { + "base": "Input_In_0", + "details": { + "name": "In" + } + }, + { + "base": "Output_Out_0", + "details": { + "name": "Out" + } + }, + { + "base": "DataInput_Source_0", + "details": { + "name": "Source" + } + }, + { + "base": "DataInput_Row_1", + "details": { + "name": "Row" + } + }, + { + "base": "DataInput_Column_2", + "details": { + "name": "Column" + } + }, + { + "base": "DataOutput_Result_0", + "details": { + "name": "Result" + } + } + ] + } + ] +} \ No newline at end of file diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathMatrix3x3_GetRow.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathMatrix3x3_GetRow.names new file mode 100644 index 0000000000..e6e954f231 --- /dev/null +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathMatrix3x3_GetRow.names @@ -0,0 +1,46 @@ +{ + "entries": [ + { + "base": "{89B55821-3E77-5410-B0EC-336A3D747308}", + "context": "ScriptCanvas::Node", + "variant": "", + "details": { + "name": "Get Row", + "category": "Math/Matrix3x3", + "tooltip": "returns vector from matrix corresponding to the Row index" + }, + "slots": [ + { + "base": "Input_In_0", + "details": { + "name": "In" + } + }, + { + "base": "Output_Out_0", + "details": { + "name": "Out" + } + }, + { + "base": "DataInput_Source_0", + "details": { + "name": "Source" + } + }, + { + "base": "DataInput_Row_1", + "details": { + "name": "Row" + } + }, + { + "base": "DataOutput_Result_0", + "details": { + "name": "Result" + } + } + ] + } + ] +} \ No newline at end of file diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathMatrix3x3_GetRows.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathMatrix3x3_GetRows.names new file mode 100644 index 0000000000..1896cb9da3 --- /dev/null +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathMatrix3x3_GetRows.names @@ -0,0 +1,52 @@ +{ + "entries": [ + { + "base": "{8DE78AF8-44B4-58D8-AC3B-7B4ED77B75DF}", + "context": "ScriptCanvas::Node", + "variant": "", + "details": { + "name": "Get Rows", + "category": "Math/Matrix3x3", + "tooltip": "returns all rows from matrix" + }, + "slots": [ + { + "base": "Input_In_0", + "details": { + "name": "In" + } + }, + { + "base": "Output_Out_0", + "details": { + "name": "Out" + } + }, + { + "base": "DataInput_Source_0", + "details": { + "name": "Source" + } + }, + { + "base": "DataOutput_Row1_0", + "details": { + "name": "Row1" + } + }, + { + "base": "DataOutput_Row2_1", + "details": { + "name": "Row2" + } + }, + { + "base": "DataOutput_Row3_2", + "details": { + "name": "Row3" + } + } + ] + } + ] +} \ No newline at end of file diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathMatrix3x3_Invert.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathMatrix3x3_Invert.names new file mode 100644 index 0000000000..33491ec876 --- /dev/null +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathMatrix3x3_Invert.names @@ -0,0 +1,40 @@ +{ + "entries": [ + { + "base": "{1F420C54-6920-511B-9025-D91E92ABF0C3}", + "context": "ScriptCanvas::Node", + "variant": "", + "details": { + "name": "Invert", + "category": "Math/Matrix3x3", + "tooltip": "returns inverse of Matrix" + }, + "slots": [ + { + "base": "Input_In_0", + "details": { + "name": "In" + } + }, + { + "base": "Output_Out_0", + "details": { + "name": "Out" + } + }, + { + "base": "DataInput_Source_0", + "details": { + "name": "Source" + } + }, + { + "base": "DataOutput_Result_0", + "details": { + "name": "Result" + } + } + ] + } + ] +} \ No newline at end of file diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathMatrix3x3_IsClose.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathMatrix3x3_IsClose.names new file mode 100644 index 0000000000..7852102617 --- /dev/null +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathMatrix3x3_IsClose.names @@ -0,0 +1,52 @@ +{ + "entries": [ + { + "base": "{87F8C39D-47CC-5E63-B02A-675F2F1EE56E}", + "context": "ScriptCanvas::Node", + "variant": "", + "details": { + "name": "Is Close", + "category": "Math/Matrix3x3", + "tooltip": "returns true if each element of both Matrix are equal within some tolerance" + }, + "slots": [ + { + "base": "Input_In_0", + "details": { + "name": "In" + } + }, + { + "base": "Output_Out_0", + "details": { + "name": "Out" + } + }, + { + "base": "DataInput_A_0", + "details": { + "name": "A" + } + }, + { + "base": "DataInput_B_1", + "details": { + "name": "B" + } + }, + { + "base": "DataInput_Tolerance_2", + "details": { + "name": "Tolerance" + } + }, + { + "base": "DataOutput_Result_0", + "details": { + "name": "Result" + } + } + ] + } + ] +} \ No newline at end of file diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathMatrix3x3_IsFinite.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathMatrix3x3_IsFinite.names new file mode 100644 index 0000000000..96cd01c1f6 --- /dev/null +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathMatrix3x3_IsFinite.names @@ -0,0 +1,40 @@ +{ + "entries": [ + { + "base": "{36E2943D-23B3-5CBA-A7EC-AA51288075AA}", + "context": "ScriptCanvas::Node", + "variant": "", + "details": { + "name": "Is Finite", + "category": "Math/Matrix3x3", + "tooltip": "returns true if all numbers in matrix is finite" + }, + "slots": [ + { + "base": "Input_In_0", + "details": { + "name": "In" + } + }, + { + "base": "Output_Out_0", + "details": { + "name": "Out" + } + }, + { + "base": "DataInput_Source_0", + "details": { + "name": "Source" + } + }, + { + "base": "DataOutput_Result_0", + "details": { + "name": "Result" + } + } + ] + } + ] +} \ No newline at end of file diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathMatrix3x3_IsOrthogonal.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathMatrix3x3_IsOrthogonal.names new file mode 100644 index 0000000000..134e985d08 --- /dev/null +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathMatrix3x3_IsOrthogonal.names @@ -0,0 +1,40 @@ +{ + "entries": [ + { + "base": "{1A78319F-7924-5114-8D85-C09C6F8D701D}", + "context": "ScriptCanvas::Node", + "variant": "", + "details": { + "name": "Is Orthogonal", + "category": "Math/Matrix3x3", + "tooltip": "returns true if the matrix is orthogonal" + }, + "slots": [ + { + "base": "Input_In_0", + "details": { + "name": "In" + } + }, + { + "base": "Output_Out_0", + "details": { + "name": "Out" + } + }, + { + "base": "DataInput_Source_0", + "details": { + "name": "Source" + } + }, + { + "base": "DataOutput_Result_0", + "details": { + "name": "Result" + } + } + ] + } + ] +} \ No newline at end of file diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathMatrix3x3_MultiplyByNumber.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathMatrix3x3_MultiplyByNumber.names new file mode 100644 index 0000000000..82442a675d --- /dev/null +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathMatrix3x3_MultiplyByNumber.names @@ -0,0 +1,46 @@ +{ + "entries": [ + { + "base": "{2B0CF330-B397-519C-867F-800AECBB84A8}", + "context": "ScriptCanvas::Node", + "variant": "", + "details": { + "name": "Multiply By Number", + "category": "Math/Matrix3x3", + "tooltip": "returns matrix created from multiply the source matrix by Multiplier" + }, + "slots": [ + { + "base": "Input_In_0", + "details": { + "name": "In" + } + }, + { + "base": "Output_Out_0", + "details": { + "name": "Out" + } + }, + { + "base": "DataInput_Source_0", + "details": { + "name": "Source" + } + }, + { + "base": "DataInput_Multiplier_1", + "details": { + "name": "Multiplier" + } + }, + { + "base": "DataOutput_Result_0", + "details": { + "name": "Result" + } + } + ] + } + ] +} \ No newline at end of file diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathMatrix3x3_MultiplyByVector.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathMatrix3x3_MultiplyByVector.names new file mode 100644 index 0000000000..35b4b06bc6 --- /dev/null +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathMatrix3x3_MultiplyByVector.names @@ -0,0 +1,46 @@ +{ + "entries": [ + { + "base": "{6FAEAA22-12D6-51E5-8600-F60103ECFF8C}", + "context": "ScriptCanvas::Node", + "variant": "", + "details": { + "name": "Multiply By Vector", + "category": "Math/Matrix3x3", + "tooltip": "returns vector created by right left multiplying matrix by supplied vector" + }, + "slots": [ + { + "base": "Input_In_0", + "details": { + "name": "In" + } + }, + { + "base": "Output_Out_0", + "details": { + "name": "Out" + } + }, + { + "base": "DataInput_Source_0", + "details": { + "name": "Source" + } + }, + { + "base": "DataInput_Vector_1", + "details": { + "name": "Vector" + } + }, + { + "base": "DataOutput_Result_0", + "details": { + "name": "Result" + } + } + ] + } + ] +} \ No newline at end of file diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathMatrix3x3_Orthogonalize.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathMatrix3x3_Orthogonalize.names new file mode 100644 index 0000000000..4d5778ce63 --- /dev/null +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathMatrix3x3_Orthogonalize.names @@ -0,0 +1,40 @@ +{ + "entries": [ + { + "base": "{BFC5A535-734B-54E8-BDF1-B60120D831EC}", + "context": "ScriptCanvas::Node", + "variant": "", + "details": { + "name": "Orthogonalize", + "category": "Math/Matrix3x3", + "tooltip": "returns an orthogonal matrix from the Source matrix" + }, + "slots": [ + { + "base": "Input_In_0", + "details": { + "name": "In" + } + }, + { + "base": "Output_Out_0", + "details": { + "name": "Out" + } + }, + { + "base": "DataInput_Source_0", + "details": { + "name": "Source" + } + }, + { + "base": "DataOutput_Result_0", + "details": { + "name": "Result" + } + } + ] + } + ] +} \ No newline at end of file diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathMatrix3x3_ToAdjugate.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathMatrix3x3_ToAdjugate.names new file mode 100644 index 0000000000..7e78ac305f --- /dev/null +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathMatrix3x3_ToAdjugate.names @@ -0,0 +1,40 @@ +{ + "entries": [ + { + "base": "{FDE00D83-D0A6-5ACA-B48B-DD5E0415FF80}", + "context": "ScriptCanvas::Node", + "variant": "", + "details": { + "name": "To Adjugate", + "category": "Math/Matrix3x3", + "tooltip": "returns the transpose of Matrix of cofactors" + }, + "slots": [ + { + "base": "Input_In_0", + "details": { + "name": "In" + } + }, + { + "base": "Output_Out_0", + "details": { + "name": "Out" + } + }, + { + "base": "DataInput_Source_0", + "details": { + "name": "Source" + } + }, + { + "base": "DataOutput_Result_0", + "details": { + "name": "Result" + } + } + ] + } + ] +} \ No newline at end of file diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathMatrix3x3_ToDeterminant.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathMatrix3x3_ToDeterminant.names new file mode 100644 index 0000000000..8296a2177e --- /dev/null +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathMatrix3x3_ToDeterminant.names @@ -0,0 +1,40 @@ +{ + "entries": [ + { + "base": "{D0C69C1C-1653-54A4-8A5A-1ECB3500D9C1}", + "context": "ScriptCanvas::Node", + "variant": "", + "details": { + "name": "To Determinant", + "category": "Math/Matrix3x3", + "tooltip": "returns determinant of Matrix" + }, + "slots": [ + { + "base": "Input_In_0", + "details": { + "name": "In" + } + }, + { + "base": "Output_Out_0", + "details": { + "name": "Out" + } + }, + { + "base": "DataInput_Source_0", + "details": { + "name": "Source" + } + }, + { + "base": "DataOutput_Determinant_0", + "details": { + "name": "Determinant" + } + } + ] + } + ] +} \ No newline at end of file diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathMatrix3x3_ToScale.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathMatrix3x3_ToScale.names new file mode 100644 index 0000000000..dc2816e915 --- /dev/null +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathMatrix3x3_ToScale.names @@ -0,0 +1,40 @@ +{ + "entries": [ + { + "base": "{8250935C-5B8D-5DF4-9E09-FDA2A445C099}", + "context": "ScriptCanvas::Node", + "variant": "", + "details": { + "name": "To Scale", + "category": "Math/Matrix3x3", + "tooltip": "returns scale part of the transformation matrix" + }, + "slots": [ + { + "base": "Input_In_0", + "details": { + "name": "In" + } + }, + { + "base": "Output_Out_0", + "details": { + "name": "Out" + } + }, + { + "base": "DataInput_Source_0", + "details": { + "name": "Source" + } + }, + { + "base": "DataOutput_Result_0", + "details": { + "name": "Result" + } + } + ] + } + ] +} \ No newline at end of file diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathMatrix3x3_Transpose.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathMatrix3x3_Transpose.names new file mode 100644 index 0000000000..a95931218a --- /dev/null +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathMatrix3x3_Transpose.names @@ -0,0 +1,40 @@ +{ + "entries": [ + { + "base": "{F57314B3-AFD8-5BDB-A0F0-8EAF5C13CAC9}", + "context": "ScriptCanvas::Node", + "variant": "", + "details": { + "name": "Transpose", + "category": "Math/Matrix3x3", + "tooltip": "returns transpose of Matrix" + }, + "slots": [ + { + "base": "Input_In_0", + "details": { + "name": "In" + } + }, + { + "base": "Output_Out_0", + "details": { + "name": "Out" + } + }, + { + "base": "DataInput_Source_0", + "details": { + "name": "Source" + } + }, + { + "base": "DataOutput_Result_0", + "details": { + "name": "Result" + } + } + ] + } + ] +} \ No newline at end of file diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathMatrix3x3_Zero.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathMatrix3x3_Zero.names new file mode 100644 index 0000000000..7a65f849a8 --- /dev/null +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathMatrix3x3_Zero.names @@ -0,0 +1,34 @@ +{ + "entries": [ + { + "base": "{66D46B8E-5722-57DB-8760-61AE1D69E6A3}", + "context": "ScriptCanvas::Node", + "variant": "", + "details": { + "name": "Zero", + "category": "Math/Matrix3x3", + "tooltip": "returns the zero matrix" + }, + "slots": [ + { + "base": "Input_In_0", + "details": { + "name": "In" + } + }, + { + "base": "Output_Out_0", + "details": { + "name": "Out" + } + }, + { + "base": "DataOutput_Result_0", + "details": { + "name": "Result" + } + } + ] + } + ] +} \ No newline at end of file diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathMatrix4x4_FromColumns.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathMatrix4x4_FromColumns.names new file mode 100644 index 0000000000..ac4641b312 --- /dev/null +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathMatrix4x4_FromColumns.names @@ -0,0 +1,58 @@ +{ + "entries": [ + { + "base": "{B17F2D7F-22DF-512D-BF2A-98890D337661}", + "context": "ScriptCanvas::Node", + "variant": "", + "details": { + "name": "From Columns", + "category": "Math/Matrix4x4", + "tooltip": "returns a rotation matrix based on angle around Z axis" + }, + "slots": [ + { + "base": "Input_In_0", + "details": { + "name": "In" + } + }, + { + "base": "Output_Out_0", + "details": { + "name": "Out" + } + }, + { + "base": "DataInput_Column1_0", + "details": { + "name": "Column1" + } + }, + { + "base": "DataInput_Column2_1", + "details": { + "name": "Column2" + } + }, + { + "base": "DataInput_Column3_2", + "details": { + "name": "Column3" + } + }, + { + "base": "DataInput_Column4_3", + "details": { + "name": "Column4" + } + }, + { + "base": "DataOutput_Result_0", + "details": { + "name": "Result" + } + } + ] + } + ] +} \ No newline at end of file diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathMatrix4x4_FromDiagonal.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathMatrix4x4_FromDiagonal.names new file mode 100644 index 0000000000..f041a0304c --- /dev/null +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathMatrix4x4_FromDiagonal.names @@ -0,0 +1,40 @@ +{ + "entries": [ + { + "base": "{4DD9115A-D1D0-53B3-8CC5-EA08EAA8BF13}", + "context": "ScriptCanvas::Node", + "variant": "", + "details": { + "name": "From Diagonal", + "category": "Math/Matrix4x4", + "tooltip": "returns a diagonal matrix using the supplied vector" + }, + "slots": [ + { + "base": "Input_In_0", + "details": { + "name": "In" + } + }, + { + "base": "Output_Out_0", + "details": { + "name": "Out" + } + }, + { + "base": "DataInput_Source_0", + "details": { + "name": "Source" + } + }, + { + "base": "DataOutput_Result_0", + "details": { + "name": "Result" + } + } + ] + } + ] +} \ No newline at end of file diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathMatrix4x4_FromMatrix3x3.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathMatrix4x4_FromMatrix3x3.names new file mode 100644 index 0000000000..36a8f92060 --- /dev/null +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathMatrix4x4_FromMatrix3x3.names @@ -0,0 +1,40 @@ +{ + "entries": [ + { + "base": "{ACD49054-0267-55C7-80E9-1513CAD9182F}", + "context": "ScriptCanvas::Node", + "variant": "", + "details": { + "name": "From Matrix 3x 3", + "category": "Math/Matrix4x4", + "tooltip": "returns a matrix from the from the Matrix3x3" + }, + "slots": [ + { + "base": "Input_In_0", + "details": { + "name": "In" + } + }, + { + "base": "Output_Out_0", + "details": { + "name": "Out" + } + }, + { + "base": "DataInput_Source_0", + "details": { + "name": "Source" + } + }, + { + "base": "DataOutput_Result_0", + "details": { + "name": "Result" + } + } + ] + } + ] +} \ No newline at end of file diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathMatrix4x4_FromQuaternion.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathMatrix4x4_FromQuaternion.names new file mode 100644 index 0000000000..59acee1602 --- /dev/null +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathMatrix4x4_FromQuaternion.names @@ -0,0 +1,40 @@ +{ + "entries": [ + { + "base": "{B522091B-B802-5B9C-97CB-B208F58FC535}", + "context": "ScriptCanvas::Node", + "variant": "", + "details": { + "name": "From Quaternion", + "category": "Math/Matrix4x4", + "tooltip": "returns a rotation matrix using the supplied quaternion" + }, + "slots": [ + { + "base": "Input_In_0", + "details": { + "name": "In" + } + }, + { + "base": "Output_Out_0", + "details": { + "name": "Out" + } + }, + { + "base": "DataInput_Source_0", + "details": { + "name": "Source" + } + }, + { + "base": "DataOutput_Result_0", + "details": { + "name": "Result" + } + } + ] + } + ] +} \ No newline at end of file diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathMatrix4x4_FromQuaternionAndTranslation.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathMatrix4x4_FromQuaternionAndTranslation.names new file mode 100644 index 0000000000..74aacf6e19 --- /dev/null +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathMatrix4x4_FromQuaternionAndTranslation.names @@ -0,0 +1,46 @@ +{ + "entries": [ + { + "base": "{18B8A477-A413-5477-ACA7-8A27C7C9A966}", + "context": "ScriptCanvas::Node", + "variant": "", + "details": { + "name": "From Quaternion And Translation", + "category": "Math/Matrix4x4", + "tooltip": "returns a skew-symmetric cross product matrix based on supplied vector" + }, + "slots": [ + { + "base": "Input_In_0", + "details": { + "name": "In" + } + }, + { + "base": "Output_Out_0", + "details": { + "name": "Out" + } + }, + { + "base": "DataInput_Rotation_0", + "details": { + "name": "Rotation" + } + }, + { + "base": "DataInput_Translation_1", + "details": { + "name": "Translation" + } + }, + { + "base": "DataOutput_Result_0", + "details": { + "name": "Result" + } + } + ] + } + ] +} \ No newline at end of file diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathMatrix4x4_FromRotationXDegrees.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathMatrix4x4_FromRotationXDegrees.names new file mode 100644 index 0000000000..fcd02e86ac --- /dev/null +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathMatrix4x4_FromRotationXDegrees.names @@ -0,0 +1,40 @@ +{ + "entries": [ + { + "base": "{A50EB8F8-1BF9-5E03-9CC3-628CF58A3996}", + "context": "ScriptCanvas::Node", + "variant": "", + "details": { + "name": "From RotationX Degrees", + "category": "Math/Matrix4x4", + "tooltip": "returns a rotation matrix representing a rotation in degrees around X-axis" + }, + "slots": [ + { + "base": "Input_In_0", + "details": { + "name": "In" + } + }, + { + "base": "Output_Out_0", + "details": { + "name": "Out" + } + }, + { + "base": "DataInput_Degrees_0", + "details": { + "name": "Degrees" + } + }, + { + "base": "DataOutput_Result_0", + "details": { + "name": "Result" + } + } + ] + } + ] +} \ No newline at end of file diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathMatrix4x4_FromRotationYDegrees.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathMatrix4x4_FromRotationYDegrees.names new file mode 100644 index 0000000000..62a5e6f877 --- /dev/null +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathMatrix4x4_FromRotationYDegrees.names @@ -0,0 +1,40 @@ +{ + "entries": [ + { + "base": "{14332A8E-425B-5A31-A8D3-EDFD96DE4BA5}", + "context": "ScriptCanvas::Node", + "variant": "", + "details": { + "name": "From RotationY Degrees", + "category": "Math/Matrix4x4", + "tooltip": "returns a rotation matrix representing a rotation in degrees around Y-axis" + }, + "slots": [ + { + "base": "Input_In_0", + "details": { + "name": "In" + } + }, + { + "base": "Output_Out_0", + "details": { + "name": "Out" + } + }, + { + "base": "DataInput_Degrees_0", + "details": { + "name": "Degrees" + } + }, + { + "base": "DataOutput_Result_0", + "details": { + "name": "Result" + } + } + ] + } + ] +} \ No newline at end of file diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathMatrix4x4_FromRotationZDegrees.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathMatrix4x4_FromRotationZDegrees.names new file mode 100644 index 0000000000..f41b0edc7d --- /dev/null +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathMatrix4x4_FromRotationZDegrees.names @@ -0,0 +1,40 @@ +{ + "entries": [ + { + "base": "{99E6908F-AA83-571C-AC12-8DA12B112F79}", + "context": "ScriptCanvas::Node", + "variant": "", + "details": { + "name": "From RotationZ Degrees", + "category": "Math/Matrix4x4", + "tooltip": "returns a rotation matrix representing a rotation in degrees around Z-axis" + }, + "slots": [ + { + "base": "Input_In_0", + "details": { + "name": "In" + } + }, + { + "base": "Output_Out_0", + "details": { + "name": "Out" + } + }, + { + "base": "DataInput_Degrees_0", + "details": { + "name": "Degrees" + } + }, + { + "base": "DataOutput_Result_0", + "details": { + "name": "Result" + } + } + ] + } + ] +} \ No newline at end of file diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathMatrix4x4_FromRows.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathMatrix4x4_FromRows.names new file mode 100644 index 0000000000..0f90d8ba79 --- /dev/null +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathMatrix4x4_FromRows.names @@ -0,0 +1,58 @@ +{ + "entries": [ + { + "base": "{B5272AB2-1312-5B55-A801-2A976B31665E}", + "context": "ScriptCanvas::Node", + "variant": "", + "details": { + "name": "From Rows", + "category": "Math/Matrix4x4", + "tooltip": "returns a matrix from three row" + }, + "slots": [ + { + "base": "Input_In_0", + "details": { + "name": "In" + } + }, + { + "base": "Output_Out_0", + "details": { + "name": "Out" + } + }, + { + "base": "DataInput_Row1_0", + "details": { + "name": "Row1" + } + }, + { + "base": "DataInput_Row2_1", + "details": { + "name": "Row2" + } + }, + { + "base": "DataInput_Row3_2", + "details": { + "name": "Row3" + } + }, + { + "base": "DataInput_Row4_3", + "details": { + "name": "Row4" + } + }, + { + "base": "DataOutput_Result_0", + "details": { + "name": "Result" + } + } + ] + } + ] +} \ No newline at end of file diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathMatrix4x4_FromScale.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathMatrix4x4_FromScale.names new file mode 100644 index 0000000000..9d3e41426c --- /dev/null +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathMatrix4x4_FromScale.names @@ -0,0 +1,40 @@ +{ + "entries": [ + { + "base": "{B49D6046-B959-53B1-88AD-E977038DB001}", + "context": "ScriptCanvas::Node", + "variant": "", + "details": { + "name": "From Scale", + "category": "Math/Matrix4x4", + "tooltip": "returns a scale matrix using the supplied vector" + }, + "slots": [ + { + "base": "Input_In_0", + "details": { + "name": "In" + } + }, + { + "base": "Output_Out_0", + "details": { + "name": "Out" + } + }, + { + "base": "DataInput_Scale_0", + "details": { + "name": "Scale" + } + }, + { + "base": "DataOutput_Result_0", + "details": { + "name": "Result" + } + } + ] + } + ] +} \ No newline at end of file diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathMatrix4x4_FromTransform.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathMatrix4x4_FromTransform.names new file mode 100644 index 0000000000..adff3f7877 --- /dev/null +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathMatrix4x4_FromTransform.names @@ -0,0 +1,40 @@ +{ + "entries": [ + { + "base": "{739E534B-CD9B-55DF-9757-89B0C379387F}", + "context": "ScriptCanvas::Node", + "variant": "", + "details": { + "name": "From Transform", + "category": "Math/Matrix4x4", + "tooltip": "returns a matrix using the supplied transform" + }, + "slots": [ + { + "base": "Input_In_0", + "details": { + "name": "In" + } + }, + { + "base": "Output_Out_0", + "details": { + "name": "Out" + } + }, + { + "base": "DataInput_Transform_0", + "details": { + "name": "Transform" + } + }, + { + "base": "DataOutput_Result_0", + "details": { + "name": "Result" + } + } + ] + } + ] +} \ No newline at end of file diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathMatrix4x4_FromTranslation.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathMatrix4x4_FromTranslation.names new file mode 100644 index 0000000000..28288fa217 --- /dev/null +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathMatrix4x4_FromTranslation.names @@ -0,0 +1,40 @@ +{ + "entries": [ + { + "base": "{35D8B012-2C19-5570-A606-4E644D01A9AD}", + "context": "ScriptCanvas::Node", + "variant": "", + "details": { + "name": "From Translation", + "category": "Math/Matrix4x4", + "tooltip": "returns a skew-symmetric cross product matrix based on supplied vector" + }, + "slots": [ + { + "base": "Input_In_0", + "details": { + "name": "In" + } + }, + { + "base": "Output_Out_0", + "details": { + "name": "Out" + } + }, + { + "base": "DataInput_Source_0", + "details": { + "name": "Source" + } + }, + { + "base": "DataOutput_Result_0", + "details": { + "name": "Result" + } + } + ] + } + ] +} \ No newline at end of file diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathMatrix4x4_GetColumn.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathMatrix4x4_GetColumn.names new file mode 100644 index 0000000000..39572748ab --- /dev/null +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathMatrix4x4_GetColumn.names @@ -0,0 +1,46 @@ +{ + "entries": [ + { + "base": "{DE1D987E-8B96-5899-B663-CA4269A284DC}", + "context": "ScriptCanvas::Node", + "variant": "", + "details": { + "name": "Get Column", + "category": "Math/Matrix4x4", + "tooltip": "returns vector from matrix corresponding to the Column index" + }, + "slots": [ + { + "base": "Input_In_0", + "details": { + "name": "In" + } + }, + { + "base": "Output_Out_0", + "details": { + "name": "Out" + } + }, + { + "base": "DataInput_Source_0", + "details": { + "name": "Source" + } + }, + { + "base": "DataInput_Column_1", + "details": { + "name": "Column" + } + }, + { + "base": "DataOutput_Result_0", + "details": { + "name": "Result" + } + } + ] + } + ] +} \ No newline at end of file diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathMatrix4x4_GetColumns.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathMatrix4x4_GetColumns.names new file mode 100644 index 0000000000..9a8c298188 --- /dev/null +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathMatrix4x4_GetColumns.names @@ -0,0 +1,58 @@ +{ + "entries": [ + { + "base": "{A2A41479-B90B-5615-A72E-AAB3A6D0332E}", + "context": "ScriptCanvas::Node", + "variant": "", + "details": { + "name": "Get Columns", + "category": "Math/Matrix4x4", + "tooltip": "returns all columns from matrix" + }, + "slots": [ + { + "base": "Input_In_0", + "details": { + "name": "In" + } + }, + { + "base": "Output_Out_0", + "details": { + "name": "Out" + } + }, + { + "base": "DataInput_Source_0", + "details": { + "name": "Source" + } + }, + { + "base": "DataOutput_Column1_0", + "details": { + "name": "Column1" + } + }, + { + "base": "DataOutput_Column2_1", + "details": { + "name": "Column2" + } + }, + { + "base": "DataOutput_Column3_2", + "details": { + "name": "Column3" + } + }, + { + "base": "DataOutput_Column4_3", + "details": { + "name": "Column4" + } + } + ] + } + ] +} \ No newline at end of file diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathMatrix4x4_GetDiagonal.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathMatrix4x4_GetDiagonal.names new file mode 100644 index 0000000000..d1c60e00a7 --- /dev/null +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathMatrix4x4_GetDiagonal.names @@ -0,0 +1,40 @@ +{ + "entries": [ + { + "base": "{7ECE6E97-31F9-5455-8560-BB6578CD1F3D}", + "context": "ScriptCanvas::Node", + "variant": "", + "details": { + "name": "Get Diagonal", + "category": "Math/Matrix4x4", + "tooltip": "returns vector of matrix diagonal values" + }, + "slots": [ + { + "base": "Input_In_0", + "details": { + "name": "In" + } + }, + { + "base": "Output_Out_0", + "details": { + "name": "Out" + } + }, + { + "base": "DataInput_Source_0", + "details": { + "name": "Source" + } + }, + { + "base": "DataOutput_Result_0", + "details": { + "name": "Result" + } + } + ] + } + ] +} \ No newline at end of file diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathMatrix4x4_GetElement.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathMatrix4x4_GetElement.names new file mode 100644 index 0000000000..20eae66177 --- /dev/null +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathMatrix4x4_GetElement.names @@ -0,0 +1,52 @@ +{ + "entries": [ + { + "base": "{2677AF1E-FAC3-5360-96E4-CC3054372340}", + "context": "ScriptCanvas::Node", + "variant": "", + "details": { + "name": "Get Element", + "category": "Math/Matrix4x4", + "tooltip": "returns scalar from matrix corresponding to the (Row,Column) pair" + }, + "slots": [ + { + "base": "Input_In_0", + "details": { + "name": "In" + } + }, + { + "base": "Output_Out_0", + "details": { + "name": "Out" + } + }, + { + "base": "DataInput_Source_0", + "details": { + "name": "Source" + } + }, + { + "base": "DataInput_Row_1", + "details": { + "name": "Row" + } + }, + { + "base": "DataInput_Column_2", + "details": { + "name": "Column" + } + }, + { + "base": "DataOutput_Result_0", + "details": { + "name": "Result" + } + } + ] + } + ] +} \ No newline at end of file diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathMatrix4x4_GetRow.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathMatrix4x4_GetRow.names new file mode 100644 index 0000000000..fcf7b55e3c --- /dev/null +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathMatrix4x4_GetRow.names @@ -0,0 +1,46 @@ +{ + "entries": [ + { + "base": "{6A153DA6-666E-59ED-93B7-5EE7F19EFC02}", + "context": "ScriptCanvas::Node", + "variant": "", + "details": { + "name": "Get Row", + "category": "Math/Matrix4x4", + "tooltip": "returns vector from matrix corresponding to the Row index" + }, + "slots": [ + { + "base": "Input_In_0", + "details": { + "name": "In" + } + }, + { + "base": "Output_Out_0", + "details": { + "name": "Out" + } + }, + { + "base": "DataInput_Source_0", + "details": { + "name": "Source" + } + }, + { + "base": "DataInput_Row_1", + "details": { + "name": "Row" + } + }, + { + "base": "DataOutput_Result_0", + "details": { + "name": "Result" + } + } + ] + } + ] +} \ No newline at end of file diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathMatrix4x4_GetRows.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathMatrix4x4_GetRows.names new file mode 100644 index 0000000000..47f4681441 --- /dev/null +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathMatrix4x4_GetRows.names @@ -0,0 +1,58 @@ +{ + "entries": [ + { + "base": "{3A69C35B-287E-5F0F-A372-713B77B0CBC6}", + "context": "ScriptCanvas::Node", + "variant": "", + "details": { + "name": "Get Rows", + "category": "Math/Matrix4x4", + "tooltip": "returns all rows from matrix" + }, + "slots": [ + { + "base": "Input_In_0", + "details": { + "name": "In" + } + }, + { + "base": "Output_Out_0", + "details": { + "name": "Out" + } + }, + { + "base": "DataInput_Source_0", + "details": { + "name": "Source" + } + }, + { + "base": "DataOutput_Row1_0", + "details": { + "name": "Row1" + } + }, + { + "base": "DataOutput_Row2_1", + "details": { + "name": "Row2" + } + }, + { + "base": "DataOutput_Row3_2", + "details": { + "name": "Row3" + } + }, + { + "base": "DataOutput_Row4_3", + "details": { + "name": "Row4" + } + } + ] + } + ] +} \ No newline at end of file diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathMatrix4x4_GetTranslation.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathMatrix4x4_GetTranslation.names new file mode 100644 index 0000000000..9ee8dbb79e --- /dev/null +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathMatrix4x4_GetTranslation.names @@ -0,0 +1,40 @@ +{ + "entries": [ + { + "base": "{B71EAC83-D0E9-5E1C-B694-6665896F49FE}", + "context": "ScriptCanvas::Node", + "variant": "", + "details": { + "name": "Get Translation", + "category": "Math/Matrix4x4", + "tooltip": "returns translation vector from the matrix" + }, + "slots": [ + { + "base": "Input_In_0", + "details": { + "name": "In" + } + }, + { + "base": "Output_Out_0", + "details": { + "name": "Out" + } + }, + { + "base": "DataInput_Source_0", + "details": { + "name": "Source" + } + }, + { + "base": "DataOutput_Result_0", + "details": { + "name": "Result" + } + } + ] + } + ] +} \ No newline at end of file diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathMatrix4x4_Invert.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathMatrix4x4_Invert.names new file mode 100644 index 0000000000..d69062c969 --- /dev/null +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathMatrix4x4_Invert.names @@ -0,0 +1,40 @@ +{ + "entries": [ + { + "base": "{4E82FDCE-50B3-5AFD-8E96-57E982B94D74}", + "context": "ScriptCanvas::Node", + "variant": "", + "details": { + "name": "Invert", + "category": "Math/Matrix4x4", + "tooltip": "returns inverse of Matrix" + }, + "slots": [ + { + "base": "Input_In_0", + "details": { + "name": "In" + } + }, + { + "base": "Output_Out_0", + "details": { + "name": "Out" + } + }, + { + "base": "DataInput_Source_0", + "details": { + "name": "Source" + } + }, + { + "base": "DataOutput_Result_0", + "details": { + "name": "Result" + } + } + ] + } + ] +} \ No newline at end of file diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathMatrix4x4_IsClose.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathMatrix4x4_IsClose.names new file mode 100644 index 0000000000..466f9e3c83 --- /dev/null +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathMatrix4x4_IsClose.names @@ -0,0 +1,52 @@ +{ + "entries": [ + { + "base": "{52504B30-D3B4-5C09-80D6-3CAF47DAEB1E}", + "context": "ScriptCanvas::Node", + "variant": "", + "details": { + "name": "Is Close", + "category": "Math/Matrix4x4", + "tooltip": "returns true if each element of both Matrix are equal within some tolerance" + }, + "slots": [ + { + "base": "Input_In_0", + "details": { + "name": "In" + } + }, + { + "base": "Output_Out_0", + "details": { + "name": "Out" + } + }, + { + "base": "DataInput_A_0", + "details": { + "name": "A" + } + }, + { + "base": "DataInput_B_1", + "details": { + "name": "B" + } + }, + { + "base": "DataInput_Tolerance_2", + "details": { + "name": "Tolerance" + } + }, + { + "base": "DataOutput_Result_0", + "details": { + "name": "Result" + } + } + ] + } + ] +} \ No newline at end of file diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathMatrix4x4_IsFinite.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathMatrix4x4_IsFinite.names new file mode 100644 index 0000000000..2438332ba5 --- /dev/null +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathMatrix4x4_IsFinite.names @@ -0,0 +1,40 @@ +{ + "entries": [ + { + "base": "{90FFB3EE-DBFF-57C7-8D10-136810B762F2}", + "context": "ScriptCanvas::Node", + "variant": "", + "details": { + "name": "Is Finite", + "category": "Math/Matrix4x4", + "tooltip": "returns true if all numbers in matrix is finite" + }, + "slots": [ + { + "base": "Input_In_0", + "details": { + "name": "In" + } + }, + { + "base": "Output_Out_0", + "details": { + "name": "Out" + } + }, + { + "base": "DataInput_Source_0", + "details": { + "name": "Source" + } + }, + { + "base": "DataOutput_Result_0", + "details": { + "name": "Result" + } + } + ] + } + ] +} \ No newline at end of file diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathMatrix4x4_MultiplyByVector.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathMatrix4x4_MultiplyByVector.names new file mode 100644 index 0000000000..5c6ff232cd --- /dev/null +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathMatrix4x4_MultiplyByVector.names @@ -0,0 +1,46 @@ +{ + "entries": [ + { + "base": "{CE8BA72E-E595-5653-9229-D77A0CB1BAFA}", + "context": "ScriptCanvas::Node", + "variant": "", + "details": { + "name": "Multiply By Vector", + "category": "Math/Matrix4x4", + "tooltip": "returns vector created by right left multiplying matrix by supplied vector" + }, + "slots": [ + { + "base": "Input_In_0", + "details": { + "name": "In" + } + }, + { + "base": "Output_Out_0", + "details": { + "name": "Out" + } + }, + { + "base": "DataInput_Source_0", + "details": { + "name": "Source" + } + }, + { + "base": "DataInput_Vector_1", + "details": { + "name": "Vector" + } + }, + { + "base": "DataOutput_Result_0", + "details": { + "name": "Result" + } + } + ] + } + ] +} \ No newline at end of file diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathMatrix4x4_ToScale.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathMatrix4x4_ToScale.names new file mode 100644 index 0000000000..35b40a84ab --- /dev/null +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathMatrix4x4_ToScale.names @@ -0,0 +1,40 @@ +{ + "entries": [ + { + "base": "{2FB31ABF-7712-5C5F-BE1B-409D1D0AC120}", + "context": "ScriptCanvas::Node", + "variant": "", + "details": { + "name": "To Scale", + "category": "Math/Matrix4x4", + "tooltip": "returns scale part of the transformation matrix" + }, + "slots": [ + { + "base": "Input_In_0", + "details": { + "name": "In" + } + }, + { + "base": "Output_Out_0", + "details": { + "name": "Out" + } + }, + { + "base": "DataInput_Source_0", + "details": { + "name": "Source" + } + }, + { + "base": "DataOutput_Result_0", + "details": { + "name": "Result" + } + } + ] + } + ] +} \ No newline at end of file diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathMatrix4x4_Transpose.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathMatrix4x4_Transpose.names new file mode 100644 index 0000000000..5552f5743d --- /dev/null +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathMatrix4x4_Transpose.names @@ -0,0 +1,40 @@ +{ + "entries": [ + { + "base": "{8A4A10DF-A019-57A6-BF9D-493BBCA6B5E2}", + "context": "ScriptCanvas::Node", + "variant": "", + "details": { + "name": "Transpose", + "category": "Math/Matrix4x4", + "tooltip": "returns transpose of Matrix" + }, + "slots": [ + { + "base": "Input_In_0", + "details": { + "name": "In" + } + }, + { + "base": "Output_Out_0", + "details": { + "name": "Out" + } + }, + { + "base": "DataInput_Source_0", + "details": { + "name": "Source" + } + }, + { + "base": "DataOutput_Result_0", + "details": { + "name": "Result" + } + } + ] + } + ] +} \ No newline at end of file diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathMatrix4x4_Zero.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathMatrix4x4_Zero.names new file mode 100644 index 0000000000..f131e57d79 --- /dev/null +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathMatrix4x4_Zero.names @@ -0,0 +1,34 @@ +{ + "entries": [ + { + "base": "{9BCEE0D6-B0A0-5944-AC25-7A8111798704}", + "context": "ScriptCanvas::Node", + "variant": "", + "details": { + "name": "Zero", + "category": "Math/Matrix4x4", + "tooltip": "returns the zero matrix" + }, + "slots": [ + { + "base": "Input_In_0", + "details": { + "name": "In" + } + }, + { + "base": "Output_Out_0", + "details": { + "name": "Out" + } + }, + { + "base": "DataOutput_Result_0", + "details": { + "name": "Result" + } + } + ] + } + ] +} \ No newline at end of file diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathNumberDeprecated_Add.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathNumberDeprecated_Add.names new file mode 100644 index 0000000000..06a74eb189 --- /dev/null +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathNumberDeprecated_Add.names @@ -0,0 +1,48 @@ +{ + "entries": [ + { + "base": "{6C52B2D1-3526-4855-A217-5106D54F6B90}", + "context": "ScriptCanvas::Node", + "variant": "", + "details": { + "name": "Add", + "category": "Math/Number/Deprecated", + "tooltip": "Add" + }, + "slots": [ + { + "base": "DataOutput_Result_0", + "details": { + "name": "Result" + } + }, + { + "base": "Input_In_0", + "details": { + "name": "In", + "tooltip": "Signal to perform the evaluation when desired." + } + }, + { + "base": "Output_Out_0", + "details": { + "name": "Out", + "tooltip": "Signaled after the arithmetic operation is done." + } + }, + { + "base": "DataInput_Value A_0", + "details": { + "name": "Value A" + } + }, + { + "base": "DataInput_Value B_1", + "details": { + "name": "Value B" + } + } + ] + } + ] +} \ No newline at end of file diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathNumberDeprecated_Divide.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathNumberDeprecated_Divide.names new file mode 100644 index 0000000000..db5af885f4 --- /dev/null +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathNumberDeprecated_Divide.names @@ -0,0 +1,48 @@ +{ + "entries": [ + { + "base": "{7379D5B4-787B-4C46-9394-288F16E5BF3A}", + "context": "ScriptCanvas::Node", + "variant": "", + "details": { + "name": "Divide", + "category": "Math/Number/Deprecated", + "tooltip": "Divide" + }, + "slots": [ + { + "base": "DataOutput_Result_0", + "details": { + "name": "Result" + } + }, + { + "base": "Input_In_0", + "details": { + "name": "In", + "tooltip": "Signal to perform the evaluation when desired." + } + }, + { + "base": "Output_Out_0", + "details": { + "name": "Out", + "tooltip": "Signaled after the arithmetic operation is done." + } + }, + { + "base": "DataInput_Value A_0", + "details": { + "name": "Value A" + } + }, + { + "base": "DataInput_Value B_1", + "details": { + "name": "Value B" + } + } + ] + } + ] +} \ No newline at end of file diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathNumberDeprecated_Multiply.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathNumberDeprecated_Multiply.names new file mode 100644 index 0000000000..d1755f18c8 --- /dev/null +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathNumberDeprecated_Multiply.names @@ -0,0 +1,48 @@ +{ + "entries": [ + { + "base": "{1BC9A5A9-9BF3-4DA7-A8F7-911254AEB243}", + "context": "ScriptCanvas::Node", + "variant": "", + "details": { + "name": "Multiply", + "category": "Math/Number/Deprecated", + "tooltip": "Multiply" + }, + "slots": [ + { + "base": "DataOutput_Result_0", + "details": { + "name": "Result" + } + }, + { + "base": "Input_In_0", + "details": { + "name": "In", + "tooltip": "Signal to perform the evaluation when desired." + } + }, + { + "base": "Output_Out_0", + "details": { + "name": "Out", + "tooltip": "Signaled after the arithmetic operation is done." + } + }, + { + "base": "DataInput_Value A_0", + "details": { + "name": "Value A" + } + }, + { + "base": "DataInput_Value B_1", + "details": { + "name": "Value B" + } + } + ] + } + ] +} \ No newline at end of file diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathNumberDeprecated_Subtract.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathNumberDeprecated_Subtract.names new file mode 100644 index 0000000000..8f963de916 --- /dev/null +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathNumberDeprecated_Subtract.names @@ -0,0 +1,48 @@ +{ + "entries": [ + { + "base": "{A10AD4C7-B633-4A75-8210-1353A87441E4}", + "context": "ScriptCanvas::Node", + "variant": "", + "details": { + "name": "Subtract", + "category": "Math/Number/Deprecated", + "tooltip": "Subtract" + }, + "slots": [ + { + "base": "DataOutput_Result_0", + "details": { + "name": "Result" + } + }, + { + "base": "Input_In_0", + "details": { + "name": "In", + "tooltip": "Signal to perform the evaluation when desired." + } + }, + { + "base": "Output_Out_0", + "details": { + "name": "Out", + "tooltip": "Signaled after the arithmetic operation is done." + } + }, + { + "base": "DataInput_Value A_0", + "details": { + "name": "Value A" + } + }, + { + "base": "DataInput_Value B_1", + "details": { + "name": "Value B" + } + } + ] + } + ] +} \ No newline at end of file diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathOBB_FromAabb.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathOBB_FromAabb.names new file mode 100644 index 0000000000..8776fb9f9a --- /dev/null +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathOBB_FromAabb.names @@ -0,0 +1,40 @@ +{ + "entries": [ + { + "base": "{25B5779B-C1A0-5963-8F5F-1A7C59F675CD}", + "context": "ScriptCanvas::Node", + "variant": "", + "details": { + "name": "From Aabb", + "category": "Math/OBB", + "tooltip": "converts the Source to an OBB" + }, + "slots": [ + { + "base": "Input_In_0", + "details": { + "name": "In" + } + }, + { + "base": "Output_Out_0", + "details": { + "name": "Out" + } + }, + { + "base": "DataInput_Source_0", + "details": { + "name": "Source" + } + }, + { + "base": "DataOutput_Result_0", + "details": { + "name": "Result" + } + } + ] + } + ] +} \ No newline at end of file diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathOBB_FromPositionRotationAndHalfLengths.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathOBB_FromPositionRotationAndHalfLengths.names new file mode 100644 index 0000000000..6bd745fc00 --- /dev/null +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathOBB_FromPositionRotationAndHalfLengths.names @@ -0,0 +1,52 @@ +{ + "entries": [ + { + "base": "{6F7A0335-C2D2-53A3-BF18-B3735DBFF8AA}", + "context": "ScriptCanvas::Node", + "variant": "", + "details": { + "name": "From Position Rotation And Half Lengths", + "category": "Math/OBB", + "tooltip": "returns an OBB from the position, rotation and half lengths" + }, + "slots": [ + { + "base": "Input_In_0", + "details": { + "name": "In" + } + }, + { + "base": "Output_Out_0", + "details": { + "name": "Out" + } + }, + { + "base": "DataInput_Position_0", + "details": { + "name": "Position" + } + }, + { + "base": "DataInput_Rotation_1", + "details": { + "name": "Rotation" + } + }, + { + "base": "DataInput_HalfLengths_2", + "details": { + "name": "HalfLengths" + } + }, + { + "base": "DataOutput_Result_0", + "details": { + "name": "Result" + } + } + ] + } + ] +} \ No newline at end of file diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathOBB_GetAxisX.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathOBB_GetAxisX.names new file mode 100644 index 0000000000..acc9b81354 --- /dev/null +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathOBB_GetAxisX.names @@ -0,0 +1,40 @@ +{ + "entries": [ + { + "base": "{924A1027-ECC4-574D-808A-E4A4EB128552}", + "context": "ScriptCanvas::Node", + "variant": "", + "details": { + "name": "Get AxisX", + "category": "Math/OBB", + "tooltip": "returns the X-Axis of Source" + }, + "slots": [ + { + "base": "Input_In_0", + "details": { + "name": "In" + } + }, + { + "base": "Output_Out_0", + "details": { + "name": "Out" + } + }, + { + "base": "DataInput_Source_0", + "details": { + "name": "Source" + } + }, + { + "base": "DataOutput_Result_0", + "details": { + "name": "Result" + } + } + ] + } + ] +} \ No newline at end of file diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathOBB_GetAxisY.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathOBB_GetAxisY.names new file mode 100644 index 0000000000..6e5fdd5fe0 --- /dev/null +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathOBB_GetAxisY.names @@ -0,0 +1,40 @@ +{ + "entries": [ + { + "base": "{20C14ACD-F093-5E7D-8EA8-AD89ACDA8438}", + "context": "ScriptCanvas::Node", + "variant": "", + "details": { + "name": "Get AxisY", + "category": "Math/OBB", + "tooltip": "returns the Y-Axis of Source" + }, + "slots": [ + { + "base": "Input_In_0", + "details": { + "name": "In" + } + }, + { + "base": "Output_Out_0", + "details": { + "name": "Out" + } + }, + { + "base": "DataInput_Source_0", + "details": { + "name": "Source" + } + }, + { + "base": "DataOutput_Result_0", + "details": { + "name": "Result" + } + } + ] + } + ] +} \ No newline at end of file diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathOBB_GetAxisZ.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathOBB_GetAxisZ.names new file mode 100644 index 0000000000..fd17b6ab97 --- /dev/null +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathOBB_GetAxisZ.names @@ -0,0 +1,40 @@ +{ + "entries": [ + { + "base": "{1A6BADCE-77F7-59F4-9F27-6C08B9D13374}", + "context": "ScriptCanvas::Node", + "variant": "", + "details": { + "name": "Get AxisZ", + "category": "Math/OBB", + "tooltip": "returns the Z-Axis of Source" + }, + "slots": [ + { + "base": "Input_In_0", + "details": { + "name": "In" + } + }, + { + "base": "Output_Out_0", + "details": { + "name": "Out" + } + }, + { + "base": "DataInput_Source_0", + "details": { + "name": "Source" + } + }, + { + "base": "DataOutput_Result_0", + "details": { + "name": "Result" + } + } + ] + } + ] +} \ No newline at end of file diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathOBB_GetPosition.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathOBB_GetPosition.names new file mode 100644 index 0000000000..d1f99364fb --- /dev/null +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathOBB_GetPosition.names @@ -0,0 +1,40 @@ +{ + "entries": [ + { + "base": "{44BAE83D-1C90-5026-BD0D-65406C837A27}", + "context": "ScriptCanvas::Node", + "variant": "", + "details": { + "name": "Get Position", + "category": "Math/OBB", + "tooltip": "returns the position of Source" + }, + "slots": [ + { + "base": "Input_In_0", + "details": { + "name": "In" + } + }, + { + "base": "Output_Out_0", + "details": { + "name": "Out" + } + }, + { + "base": "DataInput_Source_0", + "details": { + "name": "Source" + } + }, + { + "base": "DataOutput_Result_0", + "details": { + "name": "Result" + } + } + ] + } + ] +} \ No newline at end of file diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathOBB_IsFinite.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathOBB_IsFinite.names new file mode 100644 index 0000000000..eb0f6401c5 --- /dev/null +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathOBB_IsFinite.names @@ -0,0 +1,40 @@ +{ + "entries": [ + { + "base": "{150329C4-45BF-5E9C-9358-41C648586F00}", + "context": "ScriptCanvas::Node", + "variant": "", + "details": { + "name": "Is Finite", + "category": "Math/OBB", + "tooltip": "returns true if every element in Source is finite, is false" + }, + "slots": [ + { + "base": "Input_In_0", + "details": { + "name": "In" + } + }, + { + "base": "Output_Out_0", + "details": { + "name": "Out" + } + }, + { + "base": "DataInput_Source_0", + "details": { + "name": "Source" + } + }, + { + "base": "DataOutput_Result_0", + "details": { + "name": "Result" + } + } + ] + } + ] +} \ No newline at end of file diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathPlane_DistanceToPoint.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathPlane_DistanceToPoint.names new file mode 100644 index 0000000000..9a11d578ab --- /dev/null +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathPlane_DistanceToPoint.names @@ -0,0 +1,46 @@ +{ + "entries": [ + { + "base": "{7D49F3FC-A625-5166-9CF6-6F3757A56C14}", + "context": "ScriptCanvas::Node", + "variant": "", + "details": { + "name": "Distance To Point", + "category": "Math/Plane", + "tooltip": "returns the closest distance from Source to Point" + }, + "slots": [ + { + "base": "Input_In_0", + "details": { + "name": "In" + } + }, + { + "base": "Output_Out_0", + "details": { + "name": "Out" + } + }, + { + "base": "DataInput_Source_0", + "details": { + "name": "Source" + } + }, + { + "base": "DataInput_Point_1", + "details": { + "name": "Point" + } + }, + { + "base": "DataOutput_Result_0", + "details": { + "name": "Result" + } + } + ] + } + ] +} \ No newline at end of file diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathPlane_FromCoefficients.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathPlane_FromCoefficients.names new file mode 100644 index 0000000000..9e201a9994 --- /dev/null +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathPlane_FromCoefficients.names @@ -0,0 +1,58 @@ +{ + "entries": [ + { + "base": "{C281152D-1617-52B6-BB82-8146F881CCA5}", + "context": "ScriptCanvas::Node", + "variant": "", + "details": { + "name": "From Coefficients", + "category": "Math/Plane", + "tooltip": "returns the plane that satisfies the equation Ax + By + Cz + D = 0" + }, + "slots": [ + { + "base": "Input_In_0", + "details": { + "name": "In" + } + }, + { + "base": "Output_Out_0", + "details": { + "name": "Out" + } + }, + { + "base": "DataInput_A_0", + "details": { + "name": "A" + } + }, + { + "base": "DataInput_B_1", + "details": { + "name": "B" + } + }, + { + "base": "DataInput_C_2", + "details": { + "name": "C" + } + }, + { + "base": "DataInput_D_3", + "details": { + "name": "D" + } + }, + { + "base": "DataOutput_Result_0", + "details": { + "name": "Result" + } + } + ] + } + ] +} \ No newline at end of file diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathPlane_FromNormalAndDistance.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathPlane_FromNormalAndDistance.names new file mode 100644 index 0000000000..4a0689cd17 --- /dev/null +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathPlane_FromNormalAndDistance.names @@ -0,0 +1,46 @@ +{ + "entries": [ + { + "base": "{85C2F69F-4E0D-5336-B1B1-29AE5A8339E2}", + "context": "ScriptCanvas::Node", + "variant": "", + "details": { + "name": "From Normal And Distance", + "category": "Math/Plane", + "tooltip": "returns the plane with the specified Normal and Distance from the origin" + }, + "slots": [ + { + "base": "Input_In_0", + "details": { + "name": "In" + } + }, + { + "base": "Output_Out_0", + "details": { + "name": "Out" + } + }, + { + "base": "DataInput_Normal_0", + "details": { + "name": "Normal" + } + }, + { + "base": "DataInput_Distance_1", + "details": { + "name": "Distance" + } + }, + { + "base": "DataOutput_Result_0", + "details": { + "name": "Result" + } + } + ] + } + ] +} \ No newline at end of file diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathPlane_FromNormalAndPoint.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathPlane_FromNormalAndPoint.names new file mode 100644 index 0000000000..a1b4402320 --- /dev/null +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathPlane_FromNormalAndPoint.names @@ -0,0 +1,46 @@ +{ + "entries": [ + { + "base": "{ED542A26-BBB3-5747-A40C-2CD08C369C54}", + "context": "ScriptCanvas::Node", + "variant": "", + "details": { + "name": "From Normal And Point", + "category": "Math/Plane", + "tooltip": "returns the plane which includes the Point with the specified Normal" + }, + "slots": [ + { + "base": "Input_In_0", + "details": { + "name": "In" + } + }, + { + "base": "Output_Out_0", + "details": { + "name": "Out" + } + }, + { + "base": "DataInput_Normal_0", + "details": { + "name": "Normal" + } + }, + { + "base": "DataInput_Point_1", + "details": { + "name": "Point" + } + }, + { + "base": "DataOutput_Result_0", + "details": { + "name": "Result" + } + } + ] + } + ] +} \ No newline at end of file diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathPlane_GetDistance.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathPlane_GetDistance.names new file mode 100644 index 0000000000..f2af07c680 --- /dev/null +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathPlane_GetDistance.names @@ -0,0 +1,40 @@ +{ + "entries": [ + { + "base": "{5A3021D3-46AC-5751-B057-7B4E476417F3}", + "context": "ScriptCanvas::Node", + "variant": "", + "details": { + "name": "Get Distance", + "category": "Math/Plane", + "tooltip": "returns the Source's distance from the origin" + }, + "slots": [ + { + "base": "Input_In_0", + "details": { + "name": "In" + } + }, + { + "base": "Output_Out_0", + "details": { + "name": "Out" + } + }, + { + "base": "DataInput_Source_0", + "details": { + "name": "Source" + } + }, + { + "base": "DataOutput_Result_0", + "details": { + "name": "Result" + } + } + ] + } + ] +} \ No newline at end of file diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathPlane_GetNormal.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathPlane_GetNormal.names new file mode 100644 index 0000000000..a8e548c0c9 --- /dev/null +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathPlane_GetNormal.names @@ -0,0 +1,40 @@ +{ + "entries": [ + { + "base": "{76467598-DB87-59DD-8B65-B7636880EAB4}", + "context": "ScriptCanvas::Node", + "variant": "", + "details": { + "name": "Get Normal", + "category": "Math/Plane", + "tooltip": "returns the surface normal of Source" + }, + "slots": [ + { + "base": "Input_In_0", + "details": { + "name": "In" + } + }, + { + "base": "Output_Out_0", + "details": { + "name": "Out" + } + }, + { + "base": "DataInput_Source_0", + "details": { + "name": "Source" + } + }, + { + "base": "DataOutput_Result_0", + "details": { + "name": "Result" + } + } + ] + } + ] +} \ No newline at end of file diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathPlane_GetPlaneEquationCoefficients.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathPlane_GetPlaneEquationCoefficients.names new file mode 100644 index 0000000000..82162af98c --- /dev/null +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathPlane_GetPlaneEquationCoefficients.names @@ -0,0 +1,58 @@ +{ + "entries": [ + { + "base": "{9F5030EF-15D1-5AEC-988E-8BE2D9C6DD64}", + "context": "ScriptCanvas::Node", + "variant": "", + "details": { + "name": "Get Plane Equation Coefficients", + "category": "Math/Plane", + "tooltip": "returns Source's coefficient's (A, B, C, D) in the equation Ax + By + Cz + D = 0" + }, + "slots": [ + { + "base": "Input_In_0", + "details": { + "name": "In" + } + }, + { + "base": "Output_Out_0", + "details": { + "name": "Out" + } + }, + { + "base": "DataInput_Source_0", + "details": { + "name": "Source" + } + }, + { + "base": "DataOutput_A_0", + "details": { + "name": "A" + } + }, + { + "base": "DataOutput_B_1", + "details": { + "name": "B" + } + }, + { + "base": "DataOutput_C_2", + "details": { + "name": "C" + } + }, + { + "base": "DataOutput_D_3", + "details": { + "name": "D" + } + } + ] + } + ] +} \ No newline at end of file diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathPlane_IsFinite.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathPlane_IsFinite.names new file mode 100644 index 0000000000..ec8d1c181b --- /dev/null +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathPlane_IsFinite.names @@ -0,0 +1,40 @@ +{ + "entries": [ + { + "base": "{AB336D86-5967-568C-9E2E-D678BAE4DFAC}", + "context": "ScriptCanvas::Node", + "variant": "", + "details": { + "name": "Is Finite", + "category": "Math/Plane", + "tooltip": "returns true if Source is finite, else false" + }, + "slots": [ + { + "base": "Input_In_0", + "details": { + "name": "In" + } + }, + { + "base": "Output_Out_0", + "details": { + "name": "Out" + } + }, + { + "base": "DataInput_Source_0", + "details": { + "name": "Source" + } + }, + { + "base": "DataOutput_Result_0", + "details": { + "name": "Result" + } + } + ] + } + ] +} \ No newline at end of file diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathPlane_Project.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathPlane_Project.names new file mode 100644 index 0000000000..49d1fe077b --- /dev/null +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathPlane_Project.names @@ -0,0 +1,46 @@ +{ + "entries": [ + { + "base": "{BE7F52C0-3FEA-5C78-BAB1-41A8BFEB38EC}", + "context": "ScriptCanvas::Node", + "variant": "", + "details": { + "name": "Project", + "category": "Math/Plane", + "tooltip": "returns the projection of Point onto Source" + }, + "slots": [ + { + "base": "Input_In_0", + "details": { + "name": "In" + } + }, + { + "base": "Output_Out_0", + "details": { + "name": "Out" + } + }, + { + "base": "DataInput_Source_0", + "details": { + "name": "Source" + } + }, + { + "base": "DataInput_Point_1", + "details": { + "name": "Point" + } + }, + { + "base": "DataOutput_Result_0", + "details": { + "name": "Result" + } + } + ] + } + ] +} \ No newline at end of file diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathPlane_Transform.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathPlane_Transform.names new file mode 100644 index 0000000000..f1a7d85fd0 --- /dev/null +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathPlane_Transform.names @@ -0,0 +1,46 @@ +{ + "entries": [ + { + "base": "{43FB92F5-CBC4-553E-982B-714EA2226D42}", + "context": "ScriptCanvas::Node", + "variant": "", + "details": { + "name": "Transform", + "category": "Math/Plane", + "tooltip": "returns Source transformed by Transform" + }, + "slots": [ + { + "base": "Input_In_0", + "details": { + "name": "In" + } + }, + { + "base": "Output_Out_0", + "details": { + "name": "Out" + } + }, + { + "base": "DataInput_Source_0", + "details": { + "name": "Source" + } + }, + { + "base": "DataInput_Transform_1", + "details": { + "name": "Transform" + } + }, + { + "base": "DataOutput_Result_0", + "details": { + "name": "Result" + } + } + ] + } + ] +} \ No newline at end of file diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathQuaternion_Conjugate.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathQuaternion_Conjugate.names new file mode 100644 index 0000000000..cf5021610f --- /dev/null +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathQuaternion_Conjugate.names @@ -0,0 +1,40 @@ +{ + "entries": [ + { + "base": "{1328993D-4413-5E46-9116-3AA5C25E97D2}", + "context": "ScriptCanvas::Node", + "variant": "", + "details": { + "name": "Conjugate", + "category": "Math/Quaternion", + "tooltip": "returns the conjugate of the source, (-x, -y, -z, w)" + }, + "slots": [ + { + "base": "Input_In_0", + "details": { + "name": "In" + } + }, + { + "base": "Output_Out_0", + "details": { + "name": "Out" + } + }, + { + "base": "DataInput_Source_0", + "details": { + "name": "Source" + } + }, + { + "base": "DataOutput_Result_0", + "details": { + "name": "Result" + } + } + ] + } + ] +} \ No newline at end of file diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathQuaternion_ConvertTransformToRotation.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathQuaternion_ConvertTransformToRotation.names new file mode 100644 index 0000000000..52a1be1d0c --- /dev/null +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathQuaternion_ConvertTransformToRotation.names @@ -0,0 +1,39 @@ +{ + "entries": [ + { + "base": "{10B3E787-BC20-5317-9553-647D40D79DCD}", + "context": "ScriptCanvas::Node", + "variant": "", + "details": { + "name": "Convert Transform To Rotation", + "category": "Math/Quaternion" + }, + "slots": [ + { + "base": "Input_In_0", + "details": { + "name": "In" + } + }, + { + "base": "Output_Out_0", + "details": { + "name": "Out" + } + }, + { + "base": "DataInput_Transform_0", + "details": { + "name": "Transform" + } + }, + { + "base": "DataOutput_Result_0", + "details": { + "name": "Result" + } + } + ] + } + ] +} \ No newline at end of file diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathQuaternion_CreateFromEulerAngles.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathQuaternion_CreateFromEulerAngles.names new file mode 100644 index 0000000000..f8c8f89710 --- /dev/null +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathQuaternion_CreateFromEulerAngles.names @@ -0,0 +1,52 @@ +{ + "entries": [ + { + "base": "{82FB60FB-2417-5BDC-ADF7-9C08DE88E793}", + "context": "ScriptCanvas::Node", + "variant": "", + "details": { + "name": "Create From Euler Angles", + "category": "Math/Quaternion", + "tooltip": "Returns a new Quaternion initialized with the specified Angles" + }, + "slots": [ + { + "base": "Input_In_0", + "details": { + "name": "In" + } + }, + { + "base": "Output_Out_0", + "details": { + "name": "Out" + } + }, + { + "base": "DataInput_Pitch_0", + "details": { + "name": "Pitch" + } + }, + { + "base": "DataInput_Roll_1", + "details": { + "name": "Roll" + } + }, + { + "base": "DataInput_Yaw_2", + "details": { + "name": "Yaw" + } + }, + { + "base": "DataOutput_Result_0", + "details": { + "name": "Result" + } + } + ] + } + ] +} \ No newline at end of file diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathQuaternion_Dot.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathQuaternion_Dot.names new file mode 100644 index 0000000000..d17ba8d861 --- /dev/null +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathQuaternion_Dot.names @@ -0,0 +1,46 @@ +{ + "entries": [ + { + "base": "{46366DEB-4F16-54AF-A618-073E0E2C1DA4}", + "context": "ScriptCanvas::Node", + "variant": "", + "details": { + "name": "Dot", + "category": "Math/Quaternion", + "tooltip": "returns the Dot product of A and B" + }, + "slots": [ + { + "base": "Input_In_0", + "details": { + "name": "In" + } + }, + { + "base": "Output_Out_0", + "details": { + "name": "Out" + } + }, + { + "base": "DataInput_A_0", + "details": { + "name": "A" + } + }, + { + "base": "DataInput_B_1", + "details": { + "name": "B" + } + }, + { + "base": "DataOutput_Result_0", + "details": { + "name": "Result" + } + } + ] + } + ] +} \ No newline at end of file diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathQuaternion_FromAxisAngleDegrees.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathQuaternion_FromAxisAngleDegrees.names new file mode 100644 index 0000000000..6921811814 --- /dev/null +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathQuaternion_FromAxisAngleDegrees.names @@ -0,0 +1,46 @@ +{ + "entries": [ + { + "base": "{6AEAAC03-A8D7-5C29-9F23-07FF59EE55D7}", + "context": "ScriptCanvas::Node", + "variant": "", + "details": { + "name": "From Axis Angle Degrees", + "category": "Math/Quaternion", + "tooltip": "returns the rotation created from Axis the angle Degrees" + }, + "slots": [ + { + "base": "Input_In_0", + "details": { + "name": "In" + } + }, + { + "base": "Output_Out_0", + "details": { + "name": "Out" + } + }, + { + "base": "DataInput_Axis_0", + "details": { + "name": "Axis" + } + }, + { + "base": "DataInput_Degrees_1", + "details": { + "name": "Degrees" + } + }, + { + "base": "DataOutput_Result_0", + "details": { + "name": "Result" + } + } + ] + } + ] +} \ No newline at end of file diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathQuaternion_FromMatrix3x3.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathQuaternion_FromMatrix3x3.names new file mode 100644 index 0000000000..00dea8ed2c --- /dev/null +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathQuaternion_FromMatrix3x3.names @@ -0,0 +1,40 @@ +{ + "entries": [ + { + "base": "{59C4651F-A5E7-59FD-81FE-D7BD07B36346}", + "context": "ScriptCanvas::Node", + "variant": "", + "details": { + "name": "From Matrix 3x 3", + "category": "Math/Quaternion", + "tooltip": "returns a rotation created from the 3x3 matrix source" + }, + "slots": [ + { + "base": "Input_In_0", + "details": { + "name": "In" + } + }, + { + "base": "Output_Out_0", + "details": { + "name": "Out" + } + }, + { + "base": "DataInput_Source_0", + "details": { + "name": "Source" + } + }, + { + "base": "DataOutput_Result_0", + "details": { + "name": "Result" + } + } + ] + } + ] +} \ No newline at end of file diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathQuaternion_FromMatrix4x4.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathQuaternion_FromMatrix4x4.names new file mode 100644 index 0000000000..793b3535e7 --- /dev/null +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathQuaternion_FromMatrix4x4.names @@ -0,0 +1,40 @@ +{ + "entries": [ + { + "base": "{B2C7B9DD-C9DD-5971-AA76-95603BED9BD8}", + "context": "ScriptCanvas::Node", + "variant": "", + "details": { + "name": "From Matrix 4x 4", + "category": "Math/Quaternion", + "tooltip": "returns a rotation created from the 4x4 matrix source" + }, + "slots": [ + { + "base": "Input_In_0", + "details": { + "name": "In" + } + }, + { + "base": "Output_Out_0", + "details": { + "name": "Out" + } + }, + { + "base": "DataInput_Source_0", + "details": { + "name": "Source" + } + }, + { + "base": "DataOutput_Result_0", + "details": { + "name": "Result" + } + } + ] + } + ] +} \ No newline at end of file diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathQuaternion_FromTransform.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathQuaternion_FromTransform.names new file mode 100644 index 0000000000..7961a836fe --- /dev/null +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathQuaternion_FromTransform.names @@ -0,0 +1,40 @@ +{ + "entries": [ + { + "base": "{2F3E079E-23F9-5BC4-9B1A-DD2FAFBF921F}", + "context": "ScriptCanvas::Node", + "variant": "", + "details": { + "name": "From Transform", + "category": "Math/Quaternion", + "tooltip": "returns a rotation created from the rotation part of the transform source" + }, + "slots": [ + { + "base": "Input_In_0", + "details": { + "name": "In" + } + }, + { + "base": "Output_Out_0", + "details": { + "name": "Out" + } + }, + { + "base": "DataInput_Source_0", + "details": { + "name": "Source" + } + }, + { + "base": "DataOutput_Result_0", + "details": { + "name": "Result" + } + } + ] + } + ] +} \ No newline at end of file diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathQuaternion_InvertFull.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathQuaternion_InvertFull.names new file mode 100644 index 0000000000..80bf8b6d94 --- /dev/null +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathQuaternion_InvertFull.names @@ -0,0 +1,40 @@ +{ + "entries": [ + { + "base": "{25150C46-3ECA-596A-8643-DB9B143D17C9}", + "context": "ScriptCanvas::Node", + "variant": "", + "details": { + "name": "Invert Full", + "category": "Math/Quaternion", + "tooltip": "returns the inverse for any rotation, not just unit rotations" + }, + "slots": [ + { + "base": "Input_In_0", + "details": { + "name": "In" + } + }, + { + "base": "Output_Out_0", + "details": { + "name": "Out" + } + }, + { + "base": "DataInput_Source_0", + "details": { + "name": "Source" + } + }, + { + "base": "DataOutput_Result_0", + "details": { + "name": "Result" + } + } + ] + } + ] +} \ No newline at end of file diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathQuaternion_IsClose.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathQuaternion_IsClose.names new file mode 100644 index 0000000000..962de452f1 --- /dev/null +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathQuaternion_IsClose.names @@ -0,0 +1,52 @@ +{ + "entries": [ + { + "base": "{7CF70E06-039B-5DFB-BA6D-A94DBB010A91}", + "context": "ScriptCanvas::Node", + "variant": "", + "details": { + "name": "Is Close", + "category": "Math/Quaternion", + "tooltip": "returns true if A and B are within Tolerance of each other" + }, + "slots": [ + { + "base": "Input_In_0", + "details": { + "name": "In" + } + }, + { + "base": "Output_Out_0", + "details": { + "name": "Out" + } + }, + { + "base": "DataInput_A_0", + "details": { + "name": "A" + } + }, + { + "base": "DataInput_B_1", + "details": { + "name": "B" + } + }, + { + "base": "DataInput_Tolerance_2", + "details": { + "name": "Tolerance" + } + }, + { + "base": "DataOutput_Result_0", + "details": { + "name": "Result" + } + } + ] + } + ] +} \ No newline at end of file diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathQuaternion_IsFinite.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathQuaternion_IsFinite.names new file mode 100644 index 0000000000..53e98df1ca --- /dev/null +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathQuaternion_IsFinite.names @@ -0,0 +1,40 @@ +{ + "entries": [ + { + "base": "{0FF1A082-1200-57C4-8CE6-A17844BEBD1A}", + "context": "ScriptCanvas::Node", + "variant": "", + "details": { + "name": "Is Finite", + "category": "Math/Quaternion", + "tooltip": "returns true if every element in Source is finite" + }, + "slots": [ + { + "base": "Input_In_0", + "details": { + "name": "In" + } + }, + { + "base": "Output_Out_0", + "details": { + "name": "Out" + } + }, + { + "base": "DataInput_Source_0", + "details": { + "name": "Source" + } + }, + { + "base": "DataOutput_Result_0", + "details": { + "name": "Result" + } + } + ] + } + ] +} \ No newline at end of file diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathQuaternion_IsIdentity.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathQuaternion_IsIdentity.names new file mode 100644 index 0000000000..dbede4c06f --- /dev/null +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathQuaternion_IsIdentity.names @@ -0,0 +1,46 @@ +{ + "entries": [ + { + "base": "{6D6D359A-BD00-5ADA-B634-C4F6B0949BFF}", + "context": "ScriptCanvas::Node", + "variant": "", + "details": { + "name": "Is Identity", + "category": "Math/Quaternion", + "tooltip": "returns true if Source is within Tolerance of the Identity rotation" + }, + "slots": [ + { + "base": "Input_In_0", + "details": { + "name": "In" + } + }, + { + "base": "Output_Out_0", + "details": { + "name": "Out" + } + }, + { + "base": "DataInput_Source_0", + "details": { + "name": "Source" + } + }, + { + "base": "DataInput_Tolerance_1", + "details": { + "name": "Tolerance" + } + }, + { + "base": "DataOutput_Result_0", + "details": { + "name": "Result" + } + } + ] + } + ] +} \ No newline at end of file diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathQuaternion_IsZero.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathQuaternion_IsZero.names new file mode 100644 index 0000000000..94158d1744 --- /dev/null +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathQuaternion_IsZero.names @@ -0,0 +1,46 @@ +{ + "entries": [ + { + "base": "{F7805CC3-4A0A-58BD-968F-5D1CAA4D8215}", + "context": "ScriptCanvas::Node", + "variant": "", + "details": { + "name": "Is Zero", + "category": "Math/Quaternion", + "tooltip": "returns true if Source is within Tolerance of the Zero rotation" + }, + "slots": [ + { + "base": "Input_In_0", + "details": { + "name": "In" + } + }, + { + "base": "Output_Out_0", + "details": { + "name": "Out" + } + }, + { + "base": "DataInput_Source_0", + "details": { + "name": "Source" + } + }, + { + "base": "DataInput_Tolerance_1", + "details": { + "name": "Tolerance" + } + }, + { + "base": "DataOutput_Result_0", + "details": { + "name": "Result" + } + } + ] + } + ] +} \ No newline at end of file diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathQuaternion_LengthReciprocal.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathQuaternion_LengthReciprocal.names new file mode 100644 index 0000000000..00b3b45081 --- /dev/null +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathQuaternion_LengthReciprocal.names @@ -0,0 +1,40 @@ +{ + "entries": [ + { + "base": "{4CDE86F1-8ABD-5F13-8BFE-622728F845DC}", + "context": "ScriptCanvas::Node", + "variant": "", + "details": { + "name": "Length Reciprocal", + "category": "Math/Quaternion", + "tooltip": "returns the reciprocal length of Source" + }, + "slots": [ + { + "base": "Input_In_0", + "details": { + "name": "In" + } + }, + { + "base": "Output_Out_0", + "details": { + "name": "Out" + } + }, + { + "base": "DataInput_Source_0", + "details": { + "name": "Source" + } + }, + { + "base": "DataOutput_Result_0", + "details": { + "name": "Result" + } + } + ] + } + ] +} \ No newline at end of file diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathQuaternion_LengthSquared.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathQuaternion_LengthSquared.names new file mode 100644 index 0000000000..4a5dff7480 --- /dev/null +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathQuaternion_LengthSquared.names @@ -0,0 +1,40 @@ +{ + "entries": [ + { + "base": "{FC266E04-338B-57CE-A529-28056AB3AB43}", + "context": "ScriptCanvas::Node", + "variant": "", + "details": { + "name": "Length Squared", + "category": "Math/Quaternion", + "tooltip": "returns the square of the length of Source" + }, + "slots": [ + { + "base": "Input_In_0", + "details": { + "name": "In" + } + }, + { + "base": "Output_Out_0", + "details": { + "name": "Out" + } + }, + { + "base": "DataInput_Source_0", + "details": { + "name": "Source" + } + }, + { + "base": "DataOutput_Result_0", + "details": { + "name": "Result" + } + } + ] + } + ] +} \ No newline at end of file diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathQuaternion_Lerp.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathQuaternion_Lerp.names new file mode 100644 index 0000000000..c85e98643f --- /dev/null +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathQuaternion_Lerp.names @@ -0,0 +1,52 @@ +{ + "entries": [ + { + "base": "{A3B1E26D-BF69-5009-A3B4-868DBE3106A3}", + "context": "ScriptCanvas::Node", + "variant": "", + "details": { + "name": "Lerp", + "category": "Math/Quaternion", + "tooltip": "returns a the linear interpolation between From and To by the amount T" + }, + "slots": [ + { + "base": "Input_In_0", + "details": { + "name": "In" + } + }, + { + "base": "Output_Out_0", + "details": { + "name": "Out" + } + }, + { + "base": "DataInput_From_0", + "details": { + "name": "From" + } + }, + { + "base": "DataInput_To_1", + "details": { + "name": "To" + } + }, + { + "base": "DataInput_T_2", + "details": { + "name": "T" + } + }, + { + "base": "DataOutput_Result_0", + "details": { + "name": "Result" + } + } + ] + } + ] +} \ No newline at end of file diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathQuaternion_MultiplyByNumber.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathQuaternion_MultiplyByNumber.names new file mode 100644 index 0000000000..0515825242 --- /dev/null +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathQuaternion_MultiplyByNumber.names @@ -0,0 +1,46 @@ +{ + "entries": [ + { + "base": "{36ECEF91-815A-5D40-B21F-0CAA4D6DAD53}", + "context": "ScriptCanvas::Node", + "variant": "", + "details": { + "name": "Multiply By Number", + "category": "Math/Quaternion", + "tooltip": "returns the Source with each element multiplied by Multiplier" + }, + "slots": [ + { + "base": "Input_In_0", + "details": { + "name": "In" + } + }, + { + "base": "Output_Out_0", + "details": { + "name": "Out" + } + }, + { + "base": "DataInput_Source_0", + "details": { + "name": "Source" + } + }, + { + "base": "DataInput_Multiplier_1", + "details": { + "name": "Multiplier" + } + }, + { + "base": "DataOutput_Result_0", + "details": { + "name": "Result" + } + } + ] + } + ] +} \ No newline at end of file diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathQuaternion_Negate.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathQuaternion_Negate.names new file mode 100644 index 0000000000..bfb9c642bd --- /dev/null +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathQuaternion_Negate.names @@ -0,0 +1,40 @@ +{ + "entries": [ + { + "base": "{0E9A2E40-9EEE-5D46-92BD-60E20F99E96E}", + "context": "ScriptCanvas::Node", + "variant": "", + "details": { + "name": "Negate", + "category": "Math/Quaternion", + "tooltip": "returns the Source with each element negated" + }, + "slots": [ + { + "base": "Input_In_0", + "details": { + "name": "In" + } + }, + { + "base": "Output_Out_0", + "details": { + "name": "Out" + } + }, + { + "base": "DataInput_Source_0", + "details": { + "name": "Source" + } + }, + { + "base": "DataOutput_Result_0", + "details": { + "name": "Result" + } + } + ] + } + ] +} \ No newline at end of file diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathQuaternion_Normalize.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathQuaternion_Normalize.names new file mode 100644 index 0000000000..38d4ab42ec --- /dev/null +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathQuaternion_Normalize.names @@ -0,0 +1,40 @@ +{ + "entries": [ + { + "base": "{215978F2-1B5F-597D-BE5D-C01A1E77F2BF}", + "context": "ScriptCanvas::Node", + "variant": "", + "details": { + "name": "Normalize", + "category": "Math/Quaternion", + "tooltip": "returns the normalized version of Source" + }, + "slots": [ + { + "base": "Input_In_0", + "details": { + "name": "In" + } + }, + { + "base": "Output_Out_0", + "details": { + "name": "Out" + } + }, + { + "base": "DataInput_Source_0", + "details": { + "name": "Source" + } + }, + { + "base": "DataOutput_Result_0", + "details": { + "name": "Result" + } + } + ] + } + ] +} \ No newline at end of file diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathQuaternion_RotateVector3.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathQuaternion_RotateVector3.names new file mode 100644 index 0000000000..17098ac745 --- /dev/null +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathQuaternion_RotateVector3.names @@ -0,0 +1,46 @@ +{ + "entries": [ + { + "base": "{56C01595-FE08-54FC-9668-D203D59F506D}", + "context": "ScriptCanvas::Node", + "variant": "", + "details": { + "name": "Rotate Vector 3", + "category": "Math/Quaternion", + "tooltip": "Returns a new Vector3 that is the source vector3 rotated by the given Quaternion" + }, + "slots": [ + { + "base": "Input_In_0", + "details": { + "name": "In" + } + }, + { + "base": "Output_Out_0", + "details": { + "name": "Out" + } + }, + { + "base": "DataInput_Quaternion_0", + "details": { + "name": "Quaternion" + } + }, + { + "base": "DataInput_Vector_1", + "details": { + "name": "Vector" + } + }, + { + "base": "DataOutput_Result_0", + "details": { + "name": "Result" + } + } + ] + } + ] +} \ No newline at end of file diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathQuaternion_RotationXDegrees.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathQuaternion_RotationXDegrees.names new file mode 100644 index 0000000000..6b44d7cb7b --- /dev/null +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathQuaternion_RotationXDegrees.names @@ -0,0 +1,40 @@ +{ + "entries": [ + { + "base": "{261E424C-4241-5777-8742-21945C69FD29}", + "context": "ScriptCanvas::Node", + "variant": "", + "details": { + "name": "RotationX Degrees", + "category": "Math/Quaternion", + "tooltip": "creates a rotation of Degrees around the x-axis" + }, + "slots": [ + { + "base": "Input_In_0", + "details": { + "name": "In" + } + }, + { + "base": "Output_Out_0", + "details": { + "name": "Out" + } + }, + { + "base": "DataInput_Degrees_0", + "details": { + "name": "Degrees" + } + }, + { + "base": "DataOutput_Result_0", + "details": { + "name": "Result" + } + } + ] + } + ] +} \ No newline at end of file diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathQuaternion_RotationYDegrees.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathQuaternion_RotationYDegrees.names new file mode 100644 index 0000000000..5821211706 --- /dev/null +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathQuaternion_RotationYDegrees.names @@ -0,0 +1,40 @@ +{ + "entries": [ + { + "base": "{66AC039B-8D0D-5E4C-A4EA-20F767C4EAF5}", + "context": "ScriptCanvas::Node", + "variant": "", + "details": { + "name": "RotationY Degrees", + "category": "Math/Quaternion", + "tooltip": "creates a rotation of Degrees around the y-axis" + }, + "slots": [ + { + "base": "Input_In_0", + "details": { + "name": "In" + } + }, + { + "base": "Output_Out_0", + "details": { + "name": "Out" + } + }, + { + "base": "DataInput_Degrees_0", + "details": { + "name": "Degrees" + } + }, + { + "base": "DataOutput_Result_0", + "details": { + "name": "Result" + } + } + ] + } + ] +} \ No newline at end of file diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathQuaternion_RotationZDegrees.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathQuaternion_RotationZDegrees.names new file mode 100644 index 0000000000..0e48e214a1 --- /dev/null +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathQuaternion_RotationZDegrees.names @@ -0,0 +1,40 @@ +{ + "entries": [ + { + "base": "{1373DA97-B94D-5DBB-9F0C-175CAE46851A}", + "context": "ScriptCanvas::Node", + "variant": "", + "details": { + "name": "RotationZ Degrees", + "category": "Math/Quaternion", + "tooltip": "creates a rotation of Degrees around the z-axis" + }, + "slots": [ + { + "base": "Input_In_0", + "details": { + "name": "In" + } + }, + { + "base": "Output_Out_0", + "details": { + "name": "Out" + } + }, + { + "base": "DataInput_Degrees_0", + "details": { + "name": "Degrees" + } + }, + { + "base": "DataOutput_Result_0", + "details": { + "name": "Result" + } + } + ] + } + ] +} \ No newline at end of file diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathQuaternion_ShortestArc.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathQuaternion_ShortestArc.names new file mode 100644 index 0000000000..e08982faeb --- /dev/null +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathQuaternion_ShortestArc.names @@ -0,0 +1,46 @@ +{ + "entries": [ + { + "base": "{7809B038-3F50-533D-8AEF-35CDBDDFCA71}", + "context": "ScriptCanvas::Node", + "variant": "", + "details": { + "name": "Shortest Arc", + "category": "Math/Quaternion", + "tooltip": "creates a rotation representing the shortest arc between From and To" + }, + "slots": [ + { + "base": "Input_In_0", + "details": { + "name": "In" + } + }, + { + "base": "Output_Out_0", + "details": { + "name": "Out" + } + }, + { + "base": "DataInput_From_0", + "details": { + "name": "From" + } + }, + { + "base": "DataInput_To_1", + "details": { + "name": "To" + } + }, + { + "base": "DataOutput_Result_0", + "details": { + "name": "Result" + } + } + ] + } + ] +} \ No newline at end of file diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathQuaternion_Slerp.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathQuaternion_Slerp.names new file mode 100644 index 0000000000..eccaf84a6f --- /dev/null +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathQuaternion_Slerp.names @@ -0,0 +1,52 @@ +{ + "entries": [ + { + "base": "{92A204FE-A6E2-5EB7-B2A2-F782DBA8C1C3}", + "context": "ScriptCanvas::Node", + "variant": "", + "details": { + "name": "Slerp", + "category": "Math/Quaternion", + "tooltip": "returns the spherical linear interpolation between From and To by the amount T, the result is NOT normalized" + }, + "slots": [ + { + "base": "Input_In_0", + "details": { + "name": "In" + } + }, + { + "base": "Output_Out_0", + "details": { + "name": "Out" + } + }, + { + "base": "DataInput_From_0", + "details": { + "name": "From" + } + }, + { + "base": "DataInput_To_1", + "details": { + "name": "To" + } + }, + { + "base": "DataInput_T_2", + "details": { + "name": "T" + } + }, + { + "base": "DataOutput_Result_0", + "details": { + "name": "Result" + } + } + ] + } + ] +} \ No newline at end of file diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathQuaternion_Squad.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathQuaternion_Squad.names new file mode 100644 index 0000000000..1205b6cb84 --- /dev/null +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathQuaternion_Squad.names @@ -0,0 +1,64 @@ +{ + "entries": [ + { + "base": "{E7275C69-D728-5468-9402-C4FBA1ADDA97}", + "context": "ScriptCanvas::Node", + "variant": "", + "details": { + "name": "Squad", + "category": "Math/Quaternion", + "tooltip": "returns the quadratic interpolation, that is: Squad(From, To, In, Out, T) = Slerp(Slerp(From, Out, T), Slerp(To, In, T), 2(1 - T)T)" + }, + "slots": [ + { + "base": "Input_In_0", + "details": { + "name": "In" + } + }, + { + "base": "Output_Out_0", + "details": { + "name": "Out" + } + }, + { + "base": "DataInput_From_0", + "details": { + "name": "From" + } + }, + { + "base": "DataInput_To_1", + "details": { + "name": "To" + } + }, + { + "base": "DataInput_In_2", + "details": { + "name": "In" + } + }, + { + "base": "DataInput_Out_3", + "details": { + "name": "Out" + } + }, + { + "base": "DataInput_T_4", + "details": { + "name": "T" + } + }, + { + "base": "DataOutput_Result_0", + "details": { + "name": "Result" + } + } + ] + } + ] +} \ No newline at end of file diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathQuaternion_ToAngleDegrees.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathQuaternion_ToAngleDegrees.names new file mode 100644 index 0000000000..cc57f52606 --- /dev/null +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathQuaternion_ToAngleDegrees.names @@ -0,0 +1,40 @@ +{ + "entries": [ + { + "base": "{D3471394-97F1-5A37-82E0-F570B882F9C9}", + "context": "ScriptCanvas::Node", + "variant": "", + "details": { + "name": "To Angle Degrees", + "category": "Math/Quaternion", + "tooltip": "returns the angle of angle-axis pair that Source represents in degrees" + }, + "slots": [ + { + "base": "Input_In_0", + "details": { + "name": "In" + } + }, + { + "base": "Output_Out_0", + "details": { + "name": "Out" + } + }, + { + "base": "DataInput_Source_0", + "details": { + "name": "Source" + } + }, + { + "base": "DataOutput_Result_0", + "details": { + "name": "Result" + } + } + ] + } + ] +} \ No newline at end of file diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathRandom_RandomColor.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathRandom_RandomColor.names new file mode 100644 index 0000000000..74a47ea568 --- /dev/null +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathRandom_RandomColor.names @@ -0,0 +1,46 @@ +{ + "entries": [ + { + "base": "{66072FDF-E318-5A40-B0C1-FD9EE0F59D7B}", + "context": "ScriptCanvas::Node", + "variant": "", + "details": { + "name": "Random Color", + "category": "Math/Random", + "tooltip": "Returns a random color [Min, Max]" + }, + "slots": [ + { + "base": "Input_In_0", + "details": { + "name": "In" + } + }, + { + "base": "Output_Out_0", + "details": { + "name": "Out" + } + }, + { + "base": "DataInput_Min_0", + "details": { + "name": "Min" + } + }, + { + "base": "DataInput_Max_1", + "details": { + "name": "Max" + } + }, + { + "base": "DataOutput_Result_0", + "details": { + "name": "Result" + } + } + ] + } + ] +} \ No newline at end of file diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathRandom_RandomGrayscale.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathRandom_RandomGrayscale.names new file mode 100644 index 0000000000..3b32743229 --- /dev/null +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathRandom_RandomGrayscale.names @@ -0,0 +1,46 @@ +{ + "entries": [ + { + "base": "{E16EC7BB-A046-5CD7-B26C-0A75358A37F2}", + "context": "ScriptCanvas::Node", + "variant": "", + "details": { + "name": "Random Grayscale", + "category": "Math/Random", + "tooltip": "Returns a random grayscale color between [Min, Max] intensities" + }, + "slots": [ + { + "base": "Input_In_0", + "details": { + "name": "In" + } + }, + { + "base": "Output_Out_0", + "details": { + "name": "Out" + } + }, + { + "base": "DataInput_Min_0", + "details": { + "name": "Min" + } + }, + { + "base": "DataInput_Max_1", + "details": { + "name": "Max" + } + }, + { + "base": "DataOutput_Result_0", + "details": { + "name": "Result" + } + } + ] + } + ] +} \ No newline at end of file diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathRandom_RandomInteger.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathRandom_RandomInteger.names new file mode 100644 index 0000000000..009fd55a8a --- /dev/null +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathRandom_RandomInteger.names @@ -0,0 +1,46 @@ +{ + "entries": [ + { + "base": "{48BF5246-995E-5EFD-B541-F468937D2423}", + "context": "ScriptCanvas::Node", + "variant": "", + "details": { + "name": "Random Integer", + "category": "Math/Random", + "tooltip": "returns a random integer [Min, Max]" + }, + "slots": [ + { + "base": "Input_In_0", + "details": { + "name": "In" + } + }, + { + "base": "Output_Out_0", + "details": { + "name": "Out" + } + }, + { + "base": "DataInput_Min_0", + "details": { + "name": "Min" + } + }, + { + "base": "DataInput_Max_1", + "details": { + "name": "Max" + } + }, + { + "base": "DataOutput_Result_0", + "details": { + "name": "Result" + } + } + ] + } + ] +} \ No newline at end of file diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathRandom_RandomNumber.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathRandom_RandomNumber.names new file mode 100644 index 0000000000..e441a5011e --- /dev/null +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathRandom_RandomNumber.names @@ -0,0 +1,46 @@ +{ + "entries": [ + { + "base": "{898C7B53-2829-58ED-A053-1641A2BC14E2}", + "context": "ScriptCanvas::Node", + "variant": "", + "details": { + "name": "Random Number", + "category": "Math/Random", + "tooltip": "returns a random real number [Min, Max]" + }, + "slots": [ + { + "base": "Input_In_0", + "details": { + "name": "In" + } + }, + { + "base": "Output_Out_0", + "details": { + "name": "Out" + } + }, + { + "base": "DataInput_Min_0", + "details": { + "name": "Min" + } + }, + { + "base": "DataInput_Max_1", + "details": { + "name": "Max" + } + }, + { + "base": "DataOutput_Result_0", + "details": { + "name": "Result" + } + } + ] + } + ] +} \ No newline at end of file diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathRandom_RandomPointInArc.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathRandom_RandomPointInArc.names new file mode 100644 index 0000000000..fc877f24aa --- /dev/null +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathRandom_RandomPointInArc.names @@ -0,0 +1,64 @@ +{ + "entries": [ + { + "base": "{3A668745-A312-5849-A2D3-AEF533F2CE3D}", + "context": "ScriptCanvas::Node", + "variant": "", + "details": { + "name": "Random Point In Arc", + "category": "Math/Random", + "tooltip": "returns a random point in the specified arc" + }, + "slots": [ + { + "base": "Input_In_0", + "details": { + "name": "In" + } + }, + { + "base": "Output_Out_0", + "details": { + "name": "Out" + } + }, + { + "base": "DataInput_Origin_0", + "details": { + "name": "Origin" + } + }, + { + "base": "DataInput_Direction_1", + "details": { + "name": "Direction" + } + }, + { + "base": "DataInput_Normal_2", + "details": { + "name": "Normal" + } + }, + { + "base": "DataInput_Radius_3", + "details": { + "name": "Radius" + } + }, + { + "base": "DataInput_Angle_4", + "details": { + "name": "Angle" + } + }, + { + "base": "DataOutput_Result_0", + "details": { + "name": "Result" + } + } + ] + } + ] +} \ No newline at end of file diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathRandom_RandomPointInBox.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathRandom_RandomPointInBox.names new file mode 100644 index 0000000000..6b65ca9940 --- /dev/null +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathRandom_RandomPointInBox.names @@ -0,0 +1,40 @@ +{ + "entries": [ + { + "base": "{8F7532AC-DABD-5EE6-8D84-A063032A82D4}", + "context": "ScriptCanvas::Node", + "variant": "", + "details": { + "name": "Random Point In Box", + "category": "Math/Random", + "tooltip": "returns a random point in a box" + }, + "slots": [ + { + "base": "Input_In_0", + "details": { + "name": "In" + } + }, + { + "base": "Output_Out_0", + "details": { + "name": "Out" + } + }, + { + "base": "DataInput_Dimensions_0", + "details": { + "name": "Dimensions" + } + }, + { + "base": "DataOutput_Result_0", + "details": { + "name": "Result" + } + } + ] + } + ] +} \ No newline at end of file diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathRandom_RandomPointInCircle.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathRandom_RandomPointInCircle.names new file mode 100644 index 0000000000..c87ca2880a --- /dev/null +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathRandom_RandomPointInCircle.names @@ -0,0 +1,40 @@ +{ + "entries": [ + { + "base": "{90F4E470-10AB-5D78-9B20-100132F0BEA9}", + "context": "ScriptCanvas::Node", + "variant": "", + "details": { + "name": "Random Point In Circle", + "category": "Math/Random", + "tooltip": "returns a random point inside the area of a circle" + }, + "slots": [ + { + "base": "Input_In_0", + "details": { + "name": "In" + } + }, + { + "base": "Output_Out_0", + "details": { + "name": "Out" + } + }, + { + "base": "DataInput_Radius_0", + "details": { + "name": "Radius" + } + }, + { + "base": "DataOutput_Result_0", + "details": { + "name": "Result" + } + } + ] + } + ] +} \ No newline at end of file diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathRandom_RandomPointInCone.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathRandom_RandomPointInCone.names new file mode 100644 index 0000000000..756ae87ce1 --- /dev/null +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathRandom_RandomPointInCone.names @@ -0,0 +1,46 @@ +{ + "entries": [ + { + "base": "{00464520-3FAA-5725-BE01-4F13A50E430F}", + "context": "ScriptCanvas::Node", + "variant": "", + "details": { + "name": "Random Point In Cone", + "category": "Math/Random", + "tooltip": "returns a random point in a cone" + }, + "slots": [ + { + "base": "Input_In_0", + "details": { + "name": "In" + } + }, + { + "base": "Output_Out_0", + "details": { + "name": "Out" + } + }, + { + "base": "DataInput_Radius_0", + "details": { + "name": "Radius" + } + }, + { + "base": "DataInput_Angle_1", + "details": { + "name": "Angle" + } + }, + { + "base": "DataOutput_Result_0", + "details": { + "name": "Result" + } + } + ] + } + ] +} \ No newline at end of file diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathRandom_RandomPointInCylinder.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathRandom_RandomPointInCylinder.names new file mode 100644 index 0000000000..655e5512ee --- /dev/null +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathRandom_RandomPointInCylinder.names @@ -0,0 +1,46 @@ +{ + "entries": [ + { + "base": "{DE205B79-32D5-5FA9-868A-442CE0388F7F}", + "context": "ScriptCanvas::Node", + "variant": "", + "details": { + "name": "Random Point In Cylinder", + "category": "Math/Random", + "tooltip": "returns a random point in a cylinder" + }, + "slots": [ + { + "base": "Input_In_0", + "details": { + "name": "In" + } + }, + { + "base": "Output_Out_0", + "details": { + "name": "Out" + } + }, + { + "base": "DataInput_Radius_0", + "details": { + "name": "Radius" + } + }, + { + "base": "DataInput_Height_1", + "details": { + "name": "Height" + } + }, + { + "base": "DataOutput_Result_0", + "details": { + "name": "Result" + } + } + ] + } + ] +} \ No newline at end of file diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathRandom_RandomPointInEllipsoid.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathRandom_RandomPointInEllipsoid.names new file mode 100644 index 0000000000..67e9387d22 --- /dev/null +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathRandom_RandomPointInEllipsoid.names @@ -0,0 +1,40 @@ +{ + "entries": [ + { + "base": "{3234ADB9-4B1E-594B-8AF6-EC857CCA1241}", + "context": "ScriptCanvas::Node", + "variant": "", + "details": { + "name": "Random Point In Ellipsoid", + "category": "Math/Random", + "tooltip": "returns a random point in an ellipsoid" + }, + "slots": [ + { + "base": "Input_In_0", + "details": { + "name": "In" + } + }, + { + "base": "Output_Out_0", + "details": { + "name": "Out" + } + }, + { + "base": "DataInput_Dimensions_0", + "details": { + "name": "Dimensions" + } + }, + { + "base": "DataOutput_Result_0", + "details": { + "name": "Result" + } + } + ] + } + ] +} \ No newline at end of file diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathRandom_RandomPointInSphere.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathRandom_RandomPointInSphere.names new file mode 100644 index 0000000000..b135084d49 --- /dev/null +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathRandom_RandomPointInSphere.names @@ -0,0 +1,40 @@ +{ + "entries": [ + { + "base": "{5C87299A-E9AF-591D-8E20-4A1B8F4A92CD}", + "context": "ScriptCanvas::Node", + "variant": "", + "details": { + "name": "Random Point In Sphere", + "category": "Math/Random", + "tooltip": "returns a random point in a sphere" + }, + "slots": [ + { + "base": "Input_In_0", + "details": { + "name": "In" + } + }, + { + "base": "Output_Out_0", + "details": { + "name": "Out" + } + }, + { + "base": "DataInput_Radius_0", + "details": { + "name": "Radius" + } + }, + { + "base": "DataOutput_Result_0", + "details": { + "name": "Result" + } + } + ] + } + ] +} \ No newline at end of file diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathRandom_RandomPointInSquare.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathRandom_RandomPointInSquare.names new file mode 100644 index 0000000000..0c176a2897 --- /dev/null +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathRandom_RandomPointInSquare.names @@ -0,0 +1,40 @@ +{ + "entries": [ + { + "base": "{4CF31307-D138-5021-A5AE-F352C95DC212}", + "context": "ScriptCanvas::Node", + "variant": "", + "details": { + "name": "Random Point In Square", + "category": "Math/Random", + "tooltip": "returns a random point in a square" + }, + "slots": [ + { + "base": "Input_In_0", + "details": { + "name": "In" + } + }, + { + "base": "Output_Out_0", + "details": { + "name": "Out" + } + }, + { + "base": "DataInput_Dimensions_0", + "details": { + "name": "Dimensions" + } + }, + { + "base": "DataOutput_Result_0", + "details": { + "name": "Result" + } + } + ] + } + ] +} \ No newline at end of file diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathRandom_RandomPointInWedge.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathRandom_RandomPointInWedge.names new file mode 100644 index 0000000000..33c2b9eec3 --- /dev/null +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathRandom_RandomPointInWedge.names @@ -0,0 +1,70 @@ +{ + "entries": [ + { + "base": "{A2D614BC-1636-5F54-868A-BF5544910967}", + "context": "ScriptCanvas::Node", + "variant": "", + "details": { + "name": "Random Point In Wedge", + "category": "Math/Random", + "tooltip": "returns a random point in the specified wedge" + }, + "slots": [ + { + "base": "Input_In_0", + "details": { + "name": "In" + } + }, + { + "base": "Output_Out_0", + "details": { + "name": "Out" + } + }, + { + "base": "DataInput_Origin_0", + "details": { + "name": "Origin" + } + }, + { + "base": "DataInput_Direction_1", + "details": { + "name": "Direction" + } + }, + { + "base": "DataInput_Normal_2", + "details": { + "name": "Normal" + } + }, + { + "base": "DataInput_Radius_3", + "details": { + "name": "Radius" + } + }, + { + "base": "DataInput_Height_4", + "details": { + "name": "Height" + } + }, + { + "base": "DataInput_Angle_5", + "details": { + "name": "Angle" + } + }, + { + "base": "DataOutput_Result_0", + "details": { + "name": "Result" + } + } + ] + } + ] +} \ No newline at end of file diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathRandom_RandomPointOnCircle.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathRandom_RandomPointOnCircle.names new file mode 100644 index 0000000000..16a3a0f396 --- /dev/null +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathRandom_RandomPointOnCircle.names @@ -0,0 +1,40 @@ +{ + "entries": [ + { + "base": "{D726B72F-9300-5D21-BE2C-8CB089BFDBA3}", + "context": "ScriptCanvas::Node", + "variant": "", + "details": { + "name": "Random Point On Circle", + "category": "Math/Random", + "tooltip": "returns a random point on the circumference of a circle" + }, + "slots": [ + { + "base": "Input_In_0", + "details": { + "name": "In" + } + }, + { + "base": "Output_Out_0", + "details": { + "name": "Out" + } + }, + { + "base": "DataInput_Radius_0", + "details": { + "name": "Radius" + } + }, + { + "base": "DataOutput_Result_0", + "details": { + "name": "Result" + } + } + ] + } + ] +} \ No newline at end of file diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathRandom_RandomPointOnSphere.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathRandom_RandomPointOnSphere.names new file mode 100644 index 0000000000..e2f6db1112 --- /dev/null +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathRandom_RandomPointOnSphere.names @@ -0,0 +1,40 @@ +{ + "entries": [ + { + "base": "{7DFA3F08-B554-550A-93F8-4D7CBAA775E9}", + "context": "ScriptCanvas::Node", + "variant": "", + "details": { + "name": "Random Point On Sphere", + "category": "Math/Random", + "tooltip": "returns a random point on the surface of a sphere" + }, + "slots": [ + { + "base": "Input_In_0", + "details": { + "name": "In" + } + }, + { + "base": "Output_Out_0", + "details": { + "name": "Out" + } + }, + { + "base": "DataInput_Radius_0", + "details": { + "name": "Radius" + } + }, + { + "base": "DataOutput_Result_0", + "details": { + "name": "Result" + } + } + ] + } + ] +} \ No newline at end of file diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathRandom_RandomQuaternion.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathRandom_RandomQuaternion.names new file mode 100644 index 0000000000..e4813c0dc5 --- /dev/null +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathRandom_RandomQuaternion.names @@ -0,0 +1,46 @@ +{ + "entries": [ + { + "base": "{E9902EB1-82B9-5EF2-B7B6-51BAFECA0B91}", + "context": "ScriptCanvas::Node", + "variant": "", + "details": { + "name": "Random Quaternion", + "category": "Math/Random", + "tooltip": "returns a random quaternion" + }, + "slots": [ + { + "base": "Input_In_0", + "details": { + "name": "In" + } + }, + { + "base": "Output_Out_0", + "details": { + "name": "Out" + } + }, + { + "base": "DataInput_Min_0", + "details": { + "name": "Min" + } + }, + { + "base": "DataInput_Max_1", + "details": { + "name": "Max" + } + }, + { + "base": "DataOutput_Result_0", + "details": { + "name": "Result" + } + } + ] + } + ] +} \ No newline at end of file diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathRandom_RandomUnitVector2.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathRandom_RandomUnitVector2.names new file mode 100644 index 0000000000..22c7e14c01 --- /dev/null +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathRandom_RandomUnitVector2.names @@ -0,0 +1,34 @@ +{ + "entries": [ + { + "base": "{4DC88D65-16B5-525C-AA9A-5C19F2F9165C}", + "context": "ScriptCanvas::Node", + "variant": "", + "details": { + "name": "Random Unit Vector 2", + "category": "Math/Random", + "tooltip": "returns a random Vector2 direction" + }, + "slots": [ + { + "base": "Input_In_0", + "details": { + "name": "In" + } + }, + { + "base": "Output_Out_0", + "details": { + "name": "Out" + } + }, + { + "base": "DataOutput_Result_0", + "details": { + "name": "Result" + } + } + ] + } + ] +} \ No newline at end of file diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathRandom_RandomUnitVector3.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathRandom_RandomUnitVector3.names new file mode 100644 index 0000000000..e5a11144d9 --- /dev/null +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathRandom_RandomUnitVector3.names @@ -0,0 +1,34 @@ +{ + "entries": [ + { + "base": "{D0A2F62C-EB98-51CC-A482-80F9623CE128}", + "context": "ScriptCanvas::Node", + "variant": "", + "details": { + "name": "Random Unit Vector 3", + "category": "Math/Random", + "tooltip": "returns a random Vector3 direction" + }, + "slots": [ + { + "base": "Input_In_0", + "details": { + "name": "In" + } + }, + { + "base": "Output_Out_0", + "details": { + "name": "Out" + } + }, + { + "base": "DataOutput_Result_0", + "details": { + "name": "Result" + } + } + ] + } + ] +} \ No newline at end of file diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathRandom_RandomVector2.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathRandom_RandomVector2.names new file mode 100644 index 0000000000..07b1d1930d --- /dev/null +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathRandom_RandomVector2.names @@ -0,0 +1,46 @@ +{ + "entries": [ + { + "base": "{00E27150-6B42-5C54-B600-70051B106C82}", + "context": "ScriptCanvas::Node", + "variant": "", + "details": { + "name": "Random Vector 2", + "category": "Math/Random", + "tooltip": "returns a random Vector2" + }, + "slots": [ + { + "base": "Input_In_0", + "details": { + "name": "In" + } + }, + { + "base": "Output_Out_0", + "details": { + "name": "Out" + } + }, + { + "base": "DataInput_Min_0", + "details": { + "name": "Min" + } + }, + { + "base": "DataInput_Max_1", + "details": { + "name": "Max" + } + }, + { + "base": "DataOutput_Result_0", + "details": { + "name": "Result" + } + } + ] + } + ] +} \ No newline at end of file diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathRandom_RandomVector3.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathRandom_RandomVector3.names new file mode 100644 index 0000000000..8711307413 --- /dev/null +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathRandom_RandomVector3.names @@ -0,0 +1,46 @@ +{ + "entries": [ + { + "base": "{0A1CA315-EFAB-50DC-8C61-2C9763D25E31}", + "context": "ScriptCanvas::Node", + "variant": "", + "details": { + "name": "Random Vector 3", + "category": "Math/Random", + "tooltip": "returns a random Vector3" + }, + "slots": [ + { + "base": "Input_In_0", + "details": { + "name": "In" + } + }, + { + "base": "Output_Out_0", + "details": { + "name": "Out" + } + }, + { + "base": "DataInput_Min_0", + "details": { + "name": "Min" + } + }, + { + "base": "DataInput_Max_1", + "details": { + "name": "Max" + } + }, + { + "base": "DataOutput_Result_0", + "details": { + "name": "Result" + } + } + ] + } + ] +} \ No newline at end of file diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathRandom_RandomVector4.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathRandom_RandomVector4.names new file mode 100644 index 0000000000..045f653c45 --- /dev/null +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathRandom_RandomVector4.names @@ -0,0 +1,46 @@ +{ + "entries": [ + { + "base": "{1C8987BF-7EA0-58CF-A4CC-2A998C9ADA68}", + "context": "ScriptCanvas::Node", + "variant": "", + "details": { + "name": "Random Vector 4", + "category": "Math/Random", + "tooltip": "returns a random Vector4" + }, + "slots": [ + { + "base": "Input_In_0", + "details": { + "name": "In" + } + }, + { + "base": "Output_Out_0", + "details": { + "name": "Out" + } + }, + { + "base": "DataInput_Min_0", + "details": { + "name": "Min" + } + }, + { + "base": "DataInput_Max_1", + "details": { + "name": "Max" + } + }, + { + "base": "DataOutput_Result_0", + "details": { + "name": "Result" + } + } + ] + } + ] +} \ No newline at end of file diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathTransform_FromMatrix3x3.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathTransform_FromMatrix3x3.names new file mode 100644 index 0000000000..8c3f7f8cfa --- /dev/null +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathTransform_FromMatrix3x3.names @@ -0,0 +1,40 @@ +{ + "entries": [ + { + "base": "{BC6D613C-CBE5-5B01-9207-16D0B158799D}", + "context": "ScriptCanvas::Node", + "variant": "", + "details": { + "name": "From Matrix 3x 3", + "category": "Math/Transform", + "tooltip": "returns a transform with from 3x3 matrix and with the translation set to zero" + }, + "slots": [ + { + "base": "Input_In_0", + "details": { + "name": "In" + } + }, + { + "base": "Output_Out_0", + "details": { + "name": "Out" + } + }, + { + "base": "DataInput_Source_0", + "details": { + "name": "Source" + } + }, + { + "base": "DataOutput_Result_0", + "details": { + "name": "Result" + } + } + ] + } + ] +} \ No newline at end of file diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathTransform_FromMatrix3x3AndTranslation.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathTransform_FromMatrix3x3AndTranslation.names new file mode 100644 index 0000000000..583e0aa059 --- /dev/null +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathTransform_FromMatrix3x3AndTranslation.names @@ -0,0 +1,46 @@ +{ + "entries": [ + { + "base": "{D2321D1F-C3B8-516E-AFE2-3A536A89BCAB}", + "context": "ScriptCanvas::Node", + "variant": "", + "details": { + "name": "From Matrix 3x 3 And Translation", + "category": "Math/Transform", + "tooltip": "returns a transform from the 3x3 matrix and the translation" + }, + "slots": [ + { + "base": "Input_In_0", + "details": { + "name": "In" + } + }, + { + "base": "Output_Out_0", + "details": { + "name": "Out" + } + }, + { + "base": "DataInput_Matrix_0", + "details": { + "name": "Matrix" + } + }, + { + "base": "DataInput_Translation_1", + "details": { + "name": "Translation" + } + }, + { + "base": "DataOutput_Result_0", + "details": { + "name": "Result" + } + } + ] + } + ] +} \ No newline at end of file diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathTransform_FromRotation.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathTransform_FromRotation.names new file mode 100644 index 0000000000..f8cb3a7033 --- /dev/null +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathTransform_FromRotation.names @@ -0,0 +1,40 @@ +{ + "entries": [ + { + "base": "{B5BCF19E-2EF2-584E-B4B6-0FC7E9FEE99B}", + "context": "ScriptCanvas::Node", + "variant": "", + "details": { + "name": "From Rotation", + "category": "Math/Transform", + "tooltip": "returns a transform from the rotation and with the translation set to zero" + }, + "slots": [ + { + "base": "Input_In_0", + "details": { + "name": "In" + } + }, + { + "base": "Output_Out_0", + "details": { + "name": "Out" + } + }, + { + "base": "DataInput_Source_0", + "details": { + "name": "Source" + } + }, + { + "base": "DataOutput_Result_0", + "details": { + "name": "Result" + } + } + ] + } + ] +} \ No newline at end of file diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathTransform_FromRotationAndTranslation.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathTransform_FromRotationAndTranslation.names new file mode 100644 index 0000000000..3474a53f52 --- /dev/null +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathTransform_FromRotationAndTranslation.names @@ -0,0 +1,46 @@ +{ + "entries": [ + { + "base": "{C2A304B1-9D48-5A2A-BCEE-69BCD72379E3}", + "context": "ScriptCanvas::Node", + "variant": "", + "details": { + "name": "From Rotation And Translation", + "category": "Math/Transform", + "tooltip": "returns a transform from the rotation and the translation" + }, + "slots": [ + { + "base": "Input_In_0", + "details": { + "name": "In" + } + }, + { + "base": "Output_Out_0", + "details": { + "name": "Out" + } + }, + { + "base": "DataInput_Rotation_0", + "details": { + "name": "Rotation" + } + }, + { + "base": "DataInput_Translation_1", + "details": { + "name": "Translation" + } + }, + { + "base": "DataOutput_Result_0", + "details": { + "name": "Result" + } + } + ] + } + ] +} \ No newline at end of file diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathTransform_FromScale.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathTransform_FromScale.names new file mode 100644 index 0000000000..59bbce441f --- /dev/null +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathTransform_FromScale.names @@ -0,0 +1,40 @@ +{ + "entries": [ + { + "base": "{5DAB6076-4F49-5163-9E3C-CE3DF59E710C}", + "context": "ScriptCanvas::Node", + "variant": "", + "details": { + "name": "From Scale", + "category": "Math/Transform", + "tooltip": "returns a transform which applies the specified uniform Scale, but no rotation or translation" + }, + "slots": [ + { + "base": "Input_In_0", + "details": { + "name": "In" + } + }, + { + "base": "Output_Out_0", + "details": { + "name": "Out" + } + }, + { + "base": "DataInput_Scale_0", + "details": { + "name": "Scale" + } + }, + { + "base": "DataOutput_Result_0", + "details": { + "name": "Result" + } + } + ] + } + ] +} \ No newline at end of file diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathTransform_FromTranslation.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathTransform_FromTranslation.names new file mode 100644 index 0000000000..20cad0b8f5 --- /dev/null +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathTransform_FromTranslation.names @@ -0,0 +1,40 @@ +{ + "entries": [ + { + "base": "{DFCF0A6F-9907-52B1-BBF3-632CB929C1B1}", + "context": "ScriptCanvas::Node", + "variant": "", + "details": { + "name": "From Translation", + "category": "Math/Transform", + "tooltip": "returns a translation matrix and the rotation set to zero" + }, + "slots": [ + { + "base": "Input_In_0", + "details": { + "name": "In" + } + }, + { + "base": "Output_Out_0", + "details": { + "name": "Out" + } + }, + { + "base": "DataInput_Translation_0", + "details": { + "name": "Translation" + } + }, + { + "base": "DataOutput_Result_0", + "details": { + "name": "Result" + } + } + ] + } + ] +} \ No newline at end of file diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathTransform_GetForward.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathTransform_GetForward.names new file mode 100644 index 0000000000..1894819e38 --- /dev/null +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathTransform_GetForward.names @@ -0,0 +1,46 @@ +{ + "entries": [ + { + "base": "{1D27BC5A-44D6-526E-B1EC-4B080B750ED1}", + "context": "ScriptCanvas::Node", + "variant": "", + "details": { + "name": "Get Forward", + "category": "Math/Transform", + "tooltip": "returns the forward direction vector from the specified transform scaled by a given value (O3DE uses Z up, right handed)" + }, + "slots": [ + { + "base": "Input_In_0", + "details": { + "name": "In" + } + }, + { + "base": "Output_Out_0", + "details": { + "name": "Out" + } + }, + { + "base": "DataInput_Source_0", + "details": { + "name": "Source" + } + }, + { + "base": "DataInput_Scale_1", + "details": { + "name": "Scale" + } + }, + { + "base": "DataOutput_Result_0", + "details": { + "name": "Result" + } + } + ] + } + ] +} \ No newline at end of file diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathTransform_GetRight.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathTransform_GetRight.names new file mode 100644 index 0000000000..5a3d979a9d --- /dev/null +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathTransform_GetRight.names @@ -0,0 +1,46 @@ +{ + "entries": [ + { + "base": "{78E62FB8-7CD0-5E4D-BA31-9E62867C4F6A}", + "context": "ScriptCanvas::Node", + "variant": "", + "details": { + "name": "Get Right", + "category": "Math/Transform", + "tooltip": "returns the right direction vector from the specified transform scaled by a given value (O3DE uses Z up, right handed)" + }, + "slots": [ + { + "base": "Input_In_0", + "details": { + "name": "In" + } + }, + { + "base": "Output_Out_0", + "details": { + "name": "Out" + } + }, + { + "base": "DataInput_Source_0", + "details": { + "name": "Source" + } + }, + { + "base": "DataInput_Scale_1", + "details": { + "name": "Scale" + } + }, + { + "base": "DataOutput_Result_0", + "details": { + "name": "Result" + } + } + ] + } + ] +} \ No newline at end of file diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathTransform_GetTranslation.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathTransform_GetTranslation.names new file mode 100644 index 0000000000..0d56cee4df --- /dev/null +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathTransform_GetTranslation.names @@ -0,0 +1,40 @@ +{ + "entries": [ + { + "base": "{BA0C1841-5632-5329-BCD3-CDF12B1D8682}", + "context": "ScriptCanvas::Node", + "variant": "", + "details": { + "name": "Get Translation", + "category": "Math/Transform", + "tooltip": "returns the translation of Source" + }, + "slots": [ + { + "base": "Input_In_0", + "details": { + "name": "In" + } + }, + { + "base": "Output_Out_0", + "details": { + "name": "Out" + } + }, + { + "base": "DataInput_Source_0", + "details": { + "name": "Source" + } + }, + { + "base": "DataOutput_Result_0", + "details": { + "name": "Result" + } + } + ] + } + ] +} \ No newline at end of file diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathTransform_GetUp.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathTransform_GetUp.names new file mode 100644 index 0000000000..a1baecdfdb --- /dev/null +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathTransform_GetUp.names @@ -0,0 +1,46 @@ +{ + "entries": [ + { + "base": "{0351A1F0-7F51-58C2-9ED4-F617B897A523}", + "context": "ScriptCanvas::Node", + "variant": "", + "details": { + "name": "Get Up", + "category": "Math/Transform", + "tooltip": "returns the up direction vector from the specified transform scaled by a given value (O3DE uses Z up, right handed)" + }, + "slots": [ + { + "base": "Input_In_0", + "details": { + "name": "In" + } + }, + { + "base": "Output_Out_0", + "details": { + "name": "Out" + } + }, + { + "base": "DataInput_Source_0", + "details": { + "name": "Source" + } + }, + { + "base": "DataInput_Scale_1", + "details": { + "name": "Scale" + } + }, + { + "base": "DataOutput_Result_0", + "details": { + "name": "Result" + } + } + ] + } + ] +} \ No newline at end of file diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathTransform_IsClose.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathTransform_IsClose.names new file mode 100644 index 0000000000..936f1f52cb --- /dev/null +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathTransform_IsClose.names @@ -0,0 +1,52 @@ +{ + "entries": [ + { + "base": "{D58A9E0D-5C09-56AB-8D8C-C9C501BA62A3}", + "context": "ScriptCanvas::Node", + "variant": "", + "details": { + "name": "Is Close", + "category": "Math/Transform", + "tooltip": "returns true if every row of A is within Tolerance of corresponding row in B, else false" + }, + "slots": [ + { + "base": "Input_In_0", + "details": { + "name": "In" + } + }, + { + "base": "Output_Out_0", + "details": { + "name": "Out" + } + }, + { + "base": "DataInput_A_0", + "details": { + "name": "A" + } + }, + { + "base": "DataInput_B_1", + "details": { + "name": "B" + } + }, + { + "base": "DataInput_Tolerance_2", + "details": { + "name": "Tolerance" + } + }, + { + "base": "DataOutput_Result_0", + "details": { + "name": "Result" + } + } + ] + } + ] +} \ No newline at end of file diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathTransform_IsFinite.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathTransform_IsFinite.names new file mode 100644 index 0000000000..38a8b05377 --- /dev/null +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathTransform_IsFinite.names @@ -0,0 +1,40 @@ +{ + "entries": [ + { + "base": "{BFF80CFD-5A54-5ADA-83FF-3849FD4E675D}", + "context": "ScriptCanvas::Node", + "variant": "", + "details": { + "name": "Is Finite", + "category": "Math/Transform", + "tooltip": "returns true if every row of source is finite, else false" + }, + "slots": [ + { + "base": "Input_In_0", + "details": { + "name": "In" + } + }, + { + "base": "Output_Out_0", + "details": { + "name": "Out" + } + }, + { + "base": "DataInput_Source_0", + "details": { + "name": "Source" + } + }, + { + "base": "DataOutput_Result_0", + "details": { + "name": "Result" + } + } + ] + } + ] +} \ No newline at end of file diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathTransform_IsOrthogonal.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathTransform_IsOrthogonal.names new file mode 100644 index 0000000000..f55e2af0bd --- /dev/null +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathTransform_IsOrthogonal.names @@ -0,0 +1,46 @@ +{ + "entries": [ + { + "base": "{D6B704EB-62A7-5CEB-B715-4CD402E1BAF9}", + "context": "ScriptCanvas::Node", + "variant": "", + "details": { + "name": "Is Orthogonal", + "category": "Math/Transform", + "tooltip": "returns true if the upper 3x3 matrix of Source is within Tolerance of orthogonal, else false" + }, + "slots": [ + { + "base": "Input_In_0", + "details": { + "name": "In" + } + }, + { + "base": "Output_Out_0", + "details": { + "name": "Out" + } + }, + { + "base": "DataInput_Source_0", + "details": { + "name": "Source" + } + }, + { + "base": "DataInput_Tolerance_1", + "details": { + "name": "Tolerance" + } + }, + { + "base": "DataOutput_Result_0", + "details": { + "name": "Result" + } + } + ] + } + ] +} \ No newline at end of file diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathTransform_MultiplyByUniformScale.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathTransform_MultiplyByUniformScale.names new file mode 100644 index 0000000000..6e38a48fee --- /dev/null +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathTransform_MultiplyByUniformScale.names @@ -0,0 +1,46 @@ +{ + "entries": [ + { + "base": "{493F14D7-FC42-5544-9BA1-400762EB6D41}", + "context": "ScriptCanvas::Node", + "variant": "", + "details": { + "name": "Multiply By Uniform Scale", + "category": "Math/Transform", + "tooltip": "returns Source multiplied uniformly by Scale" + }, + "slots": [ + { + "base": "Input_In_0", + "details": { + "name": "In" + } + }, + { + "base": "Output_Out_0", + "details": { + "name": "Out" + } + }, + { + "base": "DataInput_Source_0", + "details": { + "name": "Source" + } + }, + { + "base": "DataInput_Scale_1", + "details": { + "name": "Scale" + } + }, + { + "base": "DataOutput_Result_0", + "details": { + "name": "Result" + } + } + ] + } + ] +} \ No newline at end of file diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathTransform_MultiplyByVector3.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathTransform_MultiplyByVector3.names new file mode 100644 index 0000000000..ae3f713886 --- /dev/null +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathTransform_MultiplyByVector3.names @@ -0,0 +1,46 @@ +{ + "entries": [ + { + "base": "{00EEE23E-7FAC-5DE4-A3B1-9AC4DBD40AE4}", + "context": "ScriptCanvas::Node", + "variant": "", + "details": { + "name": "Multiply By Vector 3", + "category": "Math/Transform", + "tooltip": "returns Source post multiplied by Multiplier" + }, + "slots": [ + { + "base": "Input_In_0", + "details": { + "name": "In" + } + }, + { + "base": "Output_Out_0", + "details": { + "name": "Out" + } + }, + { + "base": "DataInput_Source_0", + "details": { + "name": "Source" + } + }, + { + "base": "DataInput_Multiplier_1", + "details": { + "name": "Multiplier" + } + }, + { + "base": "DataOutput_Result_0", + "details": { + "name": "Result" + } + } + ] + } + ] +} \ No newline at end of file diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathTransform_MultiplyByVector4.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathTransform_MultiplyByVector4.names new file mode 100644 index 0000000000..9ccc2c12ff --- /dev/null +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathTransform_MultiplyByVector4.names @@ -0,0 +1,46 @@ +{ + "entries": [ + { + "base": "{FB87C32E-BB06-5499-B210-4EE109C419DC}", + "context": "ScriptCanvas::Node", + "variant": "", + "details": { + "name": "Multiply By Vector 4", + "category": "Math/Transform", + "tooltip": "returns Source post multiplied by Multiplier" + }, + "slots": [ + { + "base": "Input_In_0", + "details": { + "name": "In" + } + }, + { + "base": "Output_Out_0", + "details": { + "name": "Out" + } + }, + { + "base": "DataInput_Source_0", + "details": { + "name": "Source" + } + }, + { + "base": "DataInput_Multiplier_1", + "details": { + "name": "Multiplier" + } + }, + { + "base": "DataOutput_Result_0", + "details": { + "name": "Result" + } + } + ] + } + ] +} \ No newline at end of file diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathTransform_Orthogonalize.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathTransform_Orthogonalize.names new file mode 100644 index 0000000000..6a4691eb4d --- /dev/null +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathTransform_Orthogonalize.names @@ -0,0 +1,40 @@ +{ + "entries": [ + { + "base": "{0CF20F04-C784-546B-80FB-0A705BB3D25A}", + "context": "ScriptCanvas::Node", + "variant": "", + "details": { + "name": "Orthogonalize", + "category": "Math/Transform", + "tooltip": "returns an orthogonal matrix if the Source is almost orthogonal" + }, + "slots": [ + { + "base": "Input_In_0", + "details": { + "name": "In" + } + }, + { + "base": "Output_Out_0", + "details": { + "name": "Out" + } + }, + { + "base": "DataInput_Source_0", + "details": { + "name": "Source" + } + }, + { + "base": "DataOutput_Result_0", + "details": { + "name": "Result" + } + } + ] + } + ] +} \ No newline at end of file diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathTransform_RotationXDegrees.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathTransform_RotationXDegrees.names new file mode 100644 index 0000000000..3483c6b3ce --- /dev/null +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathTransform_RotationXDegrees.names @@ -0,0 +1,40 @@ +{ + "entries": [ + { + "base": "{93283EA1-ADED-53B8-B3BE-A7B933918286}", + "context": "ScriptCanvas::Node", + "variant": "", + "details": { + "name": "RotationX Degrees", + "category": "Math/Transform", + "tooltip": "returns a transform representing a rotation Degrees around the X-Axis" + }, + "slots": [ + { + "base": "Input_In_0", + "details": { + "name": "In" + } + }, + { + "base": "Output_Out_0", + "details": { + "name": "Out" + } + }, + { + "base": "DataInput_Degrees_0", + "details": { + "name": "Degrees" + } + }, + { + "base": "DataOutput_Result_0", + "details": { + "name": "Result" + } + } + ] + } + ] +} \ No newline at end of file diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathTransform_RotationYDegrees.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathTransform_RotationYDegrees.names new file mode 100644 index 0000000000..57d72f8e16 --- /dev/null +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathTransform_RotationYDegrees.names @@ -0,0 +1,40 @@ +{ + "entries": [ + { + "base": "{380DB52D-3BEB-553C-B903-F5824AE1A0C6}", + "context": "ScriptCanvas::Node", + "variant": "", + "details": { + "name": "RotationY Degrees", + "category": "Math/Transform", + "tooltip": "returns a transform representing a rotation Degrees around the Y-Axis" + }, + "slots": [ + { + "base": "Input_In_0", + "details": { + "name": "In" + } + }, + { + "base": "Output_Out_0", + "details": { + "name": "Out" + } + }, + { + "base": "DataInput_Degrees_0", + "details": { + "name": "Degrees" + } + }, + { + "base": "DataOutput_Result_0", + "details": { + "name": "Result" + } + } + ] + } + ] +} \ No newline at end of file diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathTransform_RotationZDegrees.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathTransform_RotationZDegrees.names new file mode 100644 index 0000000000..8564b42541 --- /dev/null +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathTransform_RotationZDegrees.names @@ -0,0 +1,40 @@ +{ + "entries": [ + { + "base": "{70D7DC40-B9AB-55F6-8E80-A9F8EA9BE964}", + "context": "ScriptCanvas::Node", + "variant": "", + "details": { + "name": "RotationZ Degrees", + "category": "Math/Transform", + "tooltip": "returns a transform representing a rotation Degrees around the Z-Axis" + }, + "slots": [ + { + "base": "Input_In_0", + "details": { + "name": "In" + } + }, + { + "base": "Output_Out_0", + "details": { + "name": "Out" + } + }, + { + "base": "DataInput_Degrees_0", + "details": { + "name": "Degrees" + } + }, + { + "base": "DataOutput_Result_0", + "details": { + "name": "Result" + } + } + ] + } + ] +} \ No newline at end of file diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathTransform_ToScale.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathTransform_ToScale.names new file mode 100644 index 0000000000..a18853d95d --- /dev/null +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathTransform_ToScale.names @@ -0,0 +1,40 @@ +{ + "entries": [ + { + "base": "{AC6712AA-0494-5879-B7F8-4B04352924DE}", + "context": "ScriptCanvas::Node", + "variant": "", + "details": { + "name": "To Scale", + "category": "Math/Transform", + "tooltip": "returns the uniform scale of the Source" + }, + "slots": [ + { + "base": "Input_In_0", + "details": { + "name": "In" + } + }, + { + "base": "Output_Out_0", + "details": { + "name": "Out" + } + }, + { + "base": "DataInput_Source_0", + "details": { + "name": "Source" + } + }, + { + "base": "DataOutput_Result_0", + "details": { + "name": "Result" + } + } + ] + } + ] +} \ No newline at end of file diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathVector2_Absolute.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathVector2_Absolute.names new file mode 100644 index 0000000000..49c80b7cab --- /dev/null +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathVector2_Absolute.names @@ -0,0 +1,40 @@ +{ + "entries": [ + { + "base": "{97858B5F-57A8-5DE4-BA1D-ABE2504DE79D}", + "context": "ScriptCanvas::Node", + "variant": "", + "details": { + "name": "Absolute", + "category": "Math/Vector2", + "tooltip": "returns a vector with the absolute values of the elements of the source" + }, + "slots": [ + { + "base": "Input_In_0", + "details": { + "name": "In" + } + }, + { + "base": "Output_Out_0", + "details": { + "name": "Out" + } + }, + { + "base": "DataInput_Source_0", + "details": { + "name": "Source" + } + }, + { + "base": "DataOutput_Result_0", + "details": { + "name": "Result" + } + } + ] + } + ] +} \ No newline at end of file diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathVector2_Angle.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathVector2_Angle.names new file mode 100644 index 0000000000..cdf2bbcdb7 --- /dev/null +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathVector2_Angle.names @@ -0,0 +1,40 @@ +{ + "entries": [ + { + "base": "{BAA9A44B-EC0E-536B-B64A-EA652596F40A}", + "context": "ScriptCanvas::Node", + "variant": "", + "details": { + "name": "Angle", + "category": "Math/Vector2", + "tooltip": "returns a unit length vector from an angle in radians" + }, + "slots": [ + { + "base": "Input_In_0", + "details": { + "name": "In" + } + }, + { + "base": "Output_Out_0", + "details": { + "name": "Out" + } + }, + { + "base": "DataInput_Angle_0", + "details": { + "name": "Angle" + } + }, + { + "base": "DataOutput_Result_0", + "details": { + "name": "Result" + } + } + ] + } + ] +} \ No newline at end of file diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathVector2_Clamp.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathVector2_Clamp.names new file mode 100644 index 0000000000..57e7569bc2 --- /dev/null +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathVector2_Clamp.names @@ -0,0 +1,52 @@ +{ + "entries": [ + { + "base": "{636D27FE-E3E3-5983-A364-9147CD42F2D2}", + "context": "ScriptCanvas::Node", + "variant": "", + "details": { + "name": "Clamp", + "category": "Math/Vector2", + "tooltip": "returns vector clamped to [min, max] and equal to source if possible" + }, + "slots": [ + { + "base": "Input_In_0", + "details": { + "name": "In" + } + }, + { + "base": "Output_Out_0", + "details": { + "name": "Out" + } + }, + { + "base": "DataInput_Source_0", + "details": { + "name": "Source" + } + }, + { + "base": "DataInput_Min_1", + "details": { + "name": "Min" + } + }, + { + "base": "DataInput_Max_2", + "details": { + "name": "Max" + } + }, + { + "base": "DataOutput_Result_0", + "details": { + "name": "Result" + } + } + ] + } + ] +} \ No newline at end of file diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathVector2_DirectionTo.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathVector2_DirectionTo.names new file mode 100644 index 0000000000..d6eb1a6b5f --- /dev/null +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathVector2_DirectionTo.names @@ -0,0 +1,52 @@ +{ + "entries": [ + { + "base": "{ECDE911F-56B4-5D91-86A6-32C4F9461305}", + "context": "ScriptCanvas::Node", + "variant": "", + "details": { + "name": "Direction To", + "category": "Math/Vector2", + "tooltip": "Returns a direction vector between two points and the distance between them, by default the direction will be normalized, but it may be optionally scaled using the Scale parameter if different from 1.0" + }, + "slots": [ + { + "base": "Input_In_0", + "details": { + "name": "In" + } + }, + { + "base": "Output_Out_0", + "details": { + "name": "Out" + } + }, + { + "base": "DataInput_From_0", + "details": { + "name": "From" + } + }, + { + "base": "DataInput_To_1", + "details": { + "name": "To" + } + }, + { + "base": "DataInput_Scale_2", + "details": { + "name": "Scale" + } + }, + { + "base": "DataOutput_Result_0", + "details": { + "name": "Result" + } + } + ] + } + ] +} \ No newline at end of file diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathVector2_Distance.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathVector2_Distance.names new file mode 100644 index 0000000000..787b44de82 --- /dev/null +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathVector2_Distance.names @@ -0,0 +1,46 @@ +{ + "entries": [ + { + "base": "{38BE4B13-7B8C-5FCF-9313-74E6C9C3BE06}", + "context": "ScriptCanvas::Node", + "variant": "", + "details": { + "name": "Distance", + "category": "Math/Vector2", + "tooltip": "returns the distance from B to A, that is the magnitude of the vector (A - B)" + }, + "slots": [ + { + "base": "Input_In_0", + "details": { + "name": "In" + } + }, + { + "base": "Output_Out_0", + "details": { + "name": "Out" + } + }, + { + "base": "DataInput_A_0", + "details": { + "name": "A" + } + }, + { + "base": "DataInput_B_1", + "details": { + "name": "B" + } + }, + { + "base": "DataOutput_Result_0", + "details": { + "name": "Result" + } + } + ] + } + ] +} \ No newline at end of file diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathVector2_DistanceSquared.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathVector2_DistanceSquared.names new file mode 100644 index 0000000000..43fab99734 --- /dev/null +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathVector2_DistanceSquared.names @@ -0,0 +1,46 @@ +{ + "entries": [ + { + "base": "{1CBF4712-4BB5-5FB9-BC5F-C34E0C076334}", + "context": "ScriptCanvas::Node", + "variant": "", + "details": { + "name": "Distance Squared", + "category": "Math/Vector2", + "tooltip": "returns the distance squared from B to A, (generally faster than the actual distance if only needed for comparison)" + }, + "slots": [ + { + "base": "Input_In_0", + "details": { + "name": "In" + } + }, + { + "base": "Output_Out_0", + "details": { + "name": "Out" + } + }, + { + "base": "DataInput_A_0", + "details": { + "name": "A" + } + }, + { + "base": "DataInput_B_1", + "details": { + "name": "B" + } + }, + { + "base": "DataOutput_Result_0", + "details": { + "name": "Result" + } + } + ] + } + ] +} \ No newline at end of file diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathVector2_Dot.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathVector2_Dot.names new file mode 100644 index 0000000000..08578bdf77 --- /dev/null +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathVector2_Dot.names @@ -0,0 +1,46 @@ +{ + "entries": [ + { + "base": "{9F91A118-D85A-5357-ACE3-92A78AA2C4FC}", + "context": "ScriptCanvas::Node", + "variant": "", + "details": { + "name": "Dot", + "category": "Math/Vector2", + "tooltip": "returns the vector dot product of A dot B" + }, + "slots": [ + { + "base": "Input_In_0", + "details": { + "name": "In" + } + }, + { + "base": "Output_Out_0", + "details": { + "name": "Out" + } + }, + { + "base": "DataInput_A_0", + "details": { + "name": "A" + } + }, + { + "base": "DataInput_B_1", + "details": { + "name": "B" + } + }, + { + "base": "DataOutput_Result_0", + "details": { + "name": "Result" + } + } + ] + } + ] +} \ No newline at end of file diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathVector2_FromValues.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathVector2_FromValues.names new file mode 100644 index 0000000000..b6078271fe --- /dev/null +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathVector2_FromValues.names @@ -0,0 +1,46 @@ +{ + "entries": [ + { + "base": "{10158AAB-73B0-5863-A7CA-11616E05CBE4}", + "context": "ScriptCanvas::Node", + "variant": "", + "details": { + "name": "From Values", + "category": "Math/Vector2", + "tooltip": "returns a vector from elements" + }, + "slots": [ + { + "base": "Input_In_0", + "details": { + "name": "In" + } + }, + { + "base": "Output_Out_0", + "details": { + "name": "Out" + } + }, + { + "base": "DataInput_X_0", + "details": { + "name": "X" + } + }, + { + "base": "DataInput_Y_1", + "details": { + "name": "Y" + } + }, + { + "base": "DataOutput_Result_0", + "details": { + "name": "Result" + } + } + ] + } + ] +} \ No newline at end of file diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathVector2_GetElement.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathVector2_GetElement.names new file mode 100644 index 0000000000..fb5cc44f25 --- /dev/null +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathVector2_GetElement.names @@ -0,0 +1,46 @@ +{ + "entries": [ + { + "base": "{4843E512-0335-5411-A548-8AC8245B6845}", + "context": "ScriptCanvas::Node", + "variant": "", + "details": { + "name": "Get Element", + "category": "Math/Vector2", + "tooltip": "returns the element corresponding to the index (0 -> x) (1 -> y)" + }, + "slots": [ + { + "base": "Input_In_0", + "details": { + "name": "In" + } + }, + { + "base": "Output_Out_0", + "details": { + "name": "Out" + } + }, + { + "base": "DataInput_Source_0", + "details": { + "name": "Source" + } + }, + { + "base": "DataInput_Index_1", + "details": { + "name": "Index" + } + }, + { + "base": "DataOutput_Result_0", + "details": { + "name": "Result" + } + } + ] + } + ] +} \ No newline at end of file diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathVector2_IsClose.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathVector2_IsClose.names new file mode 100644 index 0000000000..caf90e9d61 --- /dev/null +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathVector2_IsClose.names @@ -0,0 +1,52 @@ +{ + "entries": [ + { + "base": "{82F6EBA6-BBF5-5063-84E6-8C4BCEF7E4A3}", + "context": "ScriptCanvas::Node", + "variant": "", + "details": { + "name": "Is Close", + "category": "Math/Vector2", + "tooltip": "returns true if the difference between A and B is less than tolerance, else false" + }, + "slots": [ + { + "base": "Input_In_0", + "details": { + "name": "In" + } + }, + { + "base": "Output_Out_0", + "details": { + "name": "Out" + } + }, + { + "base": "DataInput_A_0", + "details": { + "name": "A" + } + }, + { + "base": "DataInput_B_1", + "details": { + "name": "B" + } + }, + { + "base": "DataInput_Tolerance_2", + "details": { + "name": "Tolerance" + } + }, + { + "base": "DataOutput_Result_0", + "details": { + "name": "Result" + } + } + ] + } + ] +} \ No newline at end of file diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathVector2_IsFinite.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathVector2_IsFinite.names new file mode 100644 index 0000000000..050662feff --- /dev/null +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathVector2_IsFinite.names @@ -0,0 +1,40 @@ +{ + "entries": [ + { + "base": "{3D6F65B5-020D-55EE-B807-C54D10DDC647}", + "context": "ScriptCanvas::Node", + "variant": "", + "details": { + "name": "Is Finite", + "category": "Math/Vector2", + "tooltip": "returns true if every element in the source is finite, else false" + }, + "slots": [ + { + "base": "Input_In_0", + "details": { + "name": "In" + } + }, + { + "base": "Output_Out_0", + "details": { + "name": "Out" + } + }, + { + "base": "DataInput_Source_0", + "details": { + "name": "Source" + } + }, + { + "base": "DataOutput_Result_0", + "details": { + "name": "Result" + } + } + ] + } + ] +} \ No newline at end of file diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathVector2_IsNormalized.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathVector2_IsNormalized.names new file mode 100644 index 0000000000..9d8dbff14d --- /dev/null +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathVector2_IsNormalized.names @@ -0,0 +1,46 @@ +{ + "entries": [ + { + "base": "{AD815735-ED31-535E-BEEF-471259B271E3}", + "context": "ScriptCanvas::Node", + "variant": "", + "details": { + "name": "Is Normalized", + "category": "Math/Vector2", + "tooltip": "returns true if the length of the source is within tolerance of 1.0, else false" + }, + "slots": [ + { + "base": "Input_In_0", + "details": { + "name": "In" + } + }, + { + "base": "Output_Out_0", + "details": { + "name": "Out" + } + }, + { + "base": "DataInput_Source_0", + "details": { + "name": "Source" + } + }, + { + "base": "DataInput_Tolerance_1", + "details": { + "name": "Tolerance" + } + }, + { + "base": "DataOutput_Result_0", + "details": { + "name": "Result" + } + } + ] + } + ] +} \ No newline at end of file diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathVector2_IsZero.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathVector2_IsZero.names new file mode 100644 index 0000000000..f0b7d32768 --- /dev/null +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathVector2_IsZero.names @@ -0,0 +1,46 @@ +{ + "entries": [ + { + "base": "{A8F6E886-BFCC-5546-8516-1564C1A56D18}", + "context": "ScriptCanvas::Node", + "variant": "", + "details": { + "name": "Is Zero", + "category": "Math/Vector2", + "tooltip": "returns true if A is within tolerance of the zero vector, else false" + }, + "slots": [ + { + "base": "Input_In_0", + "details": { + "name": "In" + } + }, + { + "base": "Output_Out_0", + "details": { + "name": "Out" + } + }, + { + "base": "DataInput_Source_0", + "details": { + "name": "Source" + } + }, + { + "base": "DataInput_Tolerance_1", + "details": { + "name": "Tolerance" + } + }, + { + "base": "DataOutput_Result_0", + "details": { + "name": "Result" + } + } + ] + } + ] +} \ No newline at end of file diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathVector2_Length.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathVector2_Length.names new file mode 100644 index 0000000000..f88ed3b3f7 --- /dev/null +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathVector2_Length.names @@ -0,0 +1,40 @@ +{ + "entries": [ + { + "base": "{AD0A51F8-F87B-504E-84F0-8C60927D3798}", + "context": "ScriptCanvas::Node", + "variant": "", + "details": { + "name": "Length", + "category": "Math/Vector2", + "tooltip": "returns the magnitude of source" + }, + "slots": [ + { + "base": "Input_In_0", + "details": { + "name": "In" + } + }, + { + "base": "Output_Out_0", + "details": { + "name": "Out" + } + }, + { + "base": "DataInput_Source_0", + "details": { + "name": "Source" + } + }, + { + "base": "DataOutput_Result_0", + "details": { + "name": "Result" + } + } + ] + } + ] +} \ No newline at end of file diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathVector2_LengthSquared.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathVector2_LengthSquared.names new file mode 100644 index 0000000000..8691e634d2 --- /dev/null +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathVector2_LengthSquared.names @@ -0,0 +1,40 @@ +{ + "entries": [ + { + "base": "{EF19330A-6FF7-5B8C-B029-C429525A3223}", + "context": "ScriptCanvas::Node", + "variant": "", + "details": { + "name": "Length Squared", + "category": "Math/Vector2", + "tooltip": "returns the magnitude squared of the source, generally faster than getting the exact length" + }, + "slots": [ + { + "base": "Input_In_0", + "details": { + "name": "In" + } + }, + { + "base": "Output_Out_0", + "details": { + "name": "Out" + } + }, + { + "base": "DataInput_Source_0", + "details": { + "name": "Source" + } + }, + { + "base": "DataOutput_Result_0", + "details": { + "name": "Result" + } + } + ] + } + ] +} \ No newline at end of file diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathVector2_Lerp.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathVector2_Lerp.names new file mode 100644 index 0000000000..a1e6ebf739 --- /dev/null +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathVector2_Lerp.names @@ -0,0 +1,52 @@ +{ + "entries": [ + { + "base": "{978B5227-CE5B-501A-8EA8-54DE40DFF558}", + "context": "ScriptCanvas::Node", + "variant": "", + "details": { + "name": "Lerp", + "category": "Math/Vector2", + "tooltip": "returns the linear interpolation (From + ((To - From) * T)" + }, + "slots": [ + { + "base": "Input_In_0", + "details": { + "name": "In" + } + }, + { + "base": "Output_Out_0", + "details": { + "name": "Out" + } + }, + { + "base": "DataInput_From_0", + "details": { + "name": "From" + } + }, + { + "base": "DataInput_To_1", + "details": { + "name": "To" + } + }, + { + "base": "DataInput_T_2", + "details": { + "name": "T" + } + }, + { + "base": "DataOutput_Result_0", + "details": { + "name": "Result" + } + } + ] + } + ] +} \ No newline at end of file diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathVector2_Max.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathVector2_Max.names new file mode 100644 index 0000000000..5f76551e9d --- /dev/null +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathVector2_Max.names @@ -0,0 +1,46 @@ +{ + "entries": [ + { + "base": "{5CA4EE87-53A9-514C-8278-F311F447B7B1}", + "context": "ScriptCanvas::Node", + "variant": "", + "details": { + "name": "Max", + "category": "Math/Vector2", + "tooltip": "returns the vector (max(A.x, B.x), max(A.y, B.y))" + }, + "slots": [ + { + "base": "Input_In_0", + "details": { + "name": "In" + } + }, + { + "base": "Output_Out_0", + "details": { + "name": "Out" + } + }, + { + "base": "DataInput_A_0", + "details": { + "name": "A" + } + }, + { + "base": "DataInput_B_1", + "details": { + "name": "B" + } + }, + { + "base": "DataOutput_Result_0", + "details": { + "name": "Result" + } + } + ] + } + ] +} \ No newline at end of file diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathVector2_Min.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathVector2_Min.names new file mode 100644 index 0000000000..737ae89554 --- /dev/null +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathVector2_Min.names @@ -0,0 +1,46 @@ +{ + "entries": [ + { + "base": "{894F73E5-0447-5627-9B16-FDD649DA7A42}", + "context": "ScriptCanvas::Node", + "variant": "", + "details": { + "name": "Min", + "category": "Math/Vector2", + "tooltip": "returns the vector (min(A.x, B.x), min(A.y, B.y))" + }, + "slots": [ + { + "base": "Input_In_0", + "details": { + "name": "In" + } + }, + { + "base": "Output_Out_0", + "details": { + "name": "Out" + } + }, + { + "base": "DataInput_A_0", + "details": { + "name": "A" + } + }, + { + "base": "DataInput_B_1", + "details": { + "name": "B" + } + }, + { + "base": "DataOutput_Result_0", + "details": { + "name": "Result" + } + } + ] + } + ] +} \ No newline at end of file diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathVector2_MultiplyByNumber.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathVector2_MultiplyByNumber.names new file mode 100644 index 0000000000..cf592cd151 --- /dev/null +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathVector2_MultiplyByNumber.names @@ -0,0 +1,46 @@ +{ + "entries": [ + { + "base": "{4FA0D3F0-A95B-5DEB-B46D-E9D08C43D55E}", + "context": "ScriptCanvas::Node", + "variant": "", + "details": { + "name": "Multiply By Number", + "category": "Math/Vector2", + "tooltip": "returns the vector Source with each element multiplied by Multiplier" + }, + "slots": [ + { + "base": "Input_In_0", + "details": { + "name": "In" + } + }, + { + "base": "Output_Out_0", + "details": { + "name": "Out" + } + }, + { + "base": "DataInput_Source_0", + "details": { + "name": "Source" + } + }, + { + "base": "DataInput_Multiplier_1", + "details": { + "name": "Multiplier" + } + }, + { + "base": "DataOutput_Result_0", + "details": { + "name": "Result" + } + } + ] + } + ] +} \ No newline at end of file diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathVector2_Negate.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathVector2_Negate.names new file mode 100644 index 0000000000..5aa72fe327 --- /dev/null +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathVector2_Negate.names @@ -0,0 +1,40 @@ +{ + "entries": [ + { + "base": "{E4C28D60-B4AA-555A-BE46-DB4D7196C532}", + "context": "ScriptCanvas::Node", + "variant": "", + "details": { + "name": "Negate", + "category": "Math/Vector2", + "tooltip": "returns the vector Source with each element multiplied by -1" + }, + "slots": [ + { + "base": "Input_In_0", + "details": { + "name": "In" + } + }, + { + "base": "Output_Out_0", + "details": { + "name": "Out" + } + }, + { + "base": "DataInput_Source_0", + "details": { + "name": "Source" + } + }, + { + "base": "DataOutput_Result_0", + "details": { + "name": "Result" + } + } + ] + } + ] +} \ No newline at end of file diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathVector2_Normalize.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathVector2_Normalize.names new file mode 100644 index 0000000000..1dc7e0ac99 --- /dev/null +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathVector2_Normalize.names @@ -0,0 +1,40 @@ +{ + "entries": [ + { + "base": "{E019ADBA-0793-5653-A4BD-446F41FED0BC}", + "context": "ScriptCanvas::Node", + "variant": "", + "details": { + "name": "Normalize", + "category": "Math/Vector2", + "tooltip": "returns a unit length vector in the same direction as the source, or (1,0,0) if the source length is too small" + }, + "slots": [ + { + "base": "Input_In_0", + "details": { + "name": "In" + } + }, + { + "base": "Output_Out_0", + "details": { + "name": "Out" + } + }, + { + "base": "DataInput_Source_0", + "details": { + "name": "Source" + } + }, + { + "base": "DataOutput_Result_0", + "details": { + "name": "Result" + } + } + ] + } + ] +} \ No newline at end of file diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathVector2_Project.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathVector2_Project.names new file mode 100644 index 0000000000..2aba28f2ed --- /dev/null +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathVector2_Project.names @@ -0,0 +1,46 @@ +{ + "entries": [ + { + "base": "{F4826124-F3C7-59B5-B92B-4CD00AADFED3}", + "context": "ScriptCanvas::Node", + "variant": "", + "details": { + "name": "Project", + "category": "Math/Vector2", + "tooltip": "returns the vector of A projected onto B, (Dot(A, B)/(Dot(B, B)) * B" + }, + "slots": [ + { + "base": "Input_In_0", + "details": { + "name": "In" + } + }, + { + "base": "Output_Out_0", + "details": { + "name": "Out" + } + }, + { + "base": "DataInput_A_0", + "details": { + "name": "A" + } + }, + { + "base": "DataInput_B_1", + "details": { + "name": "B" + } + }, + { + "base": "DataOutput_Result_0", + "details": { + "name": "Result" + } + } + ] + } + ] +} \ No newline at end of file diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathVector2_SetX.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathVector2_SetX.names new file mode 100644 index 0000000000..d2e7b90095 --- /dev/null +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathVector2_SetX.names @@ -0,0 +1,46 @@ +{ + "entries": [ + { + "base": "{6FA3AADA-3B14-5C7C-8F7C-75818C3AEC94}", + "context": "ScriptCanvas::Node", + "variant": "", + "details": { + "name": "SetX", + "category": "Math/Vector2", + "tooltip": "returns a the vector(X, Source.Y)" + }, + "slots": [ + { + "base": "Input_In_0", + "details": { + "name": "In" + } + }, + { + "base": "Output_Out_0", + "details": { + "name": "Out" + } + }, + { + "base": "DataInput_Source_0", + "details": { + "name": "Source" + } + }, + { + "base": "DataInput_X_1", + "details": { + "name": "X" + } + }, + { + "base": "DataOutput_Result_0", + "details": { + "name": "Result" + } + } + ] + } + ] +} \ No newline at end of file diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathVector2_SetY.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathVector2_SetY.names new file mode 100644 index 0000000000..db6c5072a4 --- /dev/null +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathVector2_SetY.names @@ -0,0 +1,46 @@ +{ + "entries": [ + { + "base": "{2969A368-000E-5723-8821-1B97790917E7}", + "context": "ScriptCanvas::Node", + "variant": "", + "details": { + "name": "SetY", + "category": "Math/Vector2", + "tooltip": "returns a the vector(Source.X, Y)" + }, + "slots": [ + { + "base": "Input_In_0", + "details": { + "name": "In" + } + }, + { + "base": "Output_Out_0", + "details": { + "name": "Out" + } + }, + { + "base": "DataInput_Source_0", + "details": { + "name": "Source" + } + }, + { + "base": "DataInput_Y_1", + "details": { + "name": "Y" + } + }, + { + "base": "DataOutput_Result_0", + "details": { + "name": "Result" + } + } + ] + } + ] +} \ No newline at end of file diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathVector2_Slerp.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathVector2_Slerp.names new file mode 100644 index 0000000000..24ad2a5b8e --- /dev/null +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathVector2_Slerp.names @@ -0,0 +1,52 @@ +{ + "entries": [ + { + "base": "{6071D322-86AF-5900-B073-33E74146525B}", + "context": "ScriptCanvas::Node", + "variant": "", + "details": { + "name": "Slerp", + "category": "Math/Vector2", + "tooltip": "returns a vector that is the spherical linear interpolation T, between From and To" + }, + "slots": [ + { + "base": "Input_In_0", + "details": { + "name": "In" + } + }, + { + "base": "Output_Out_0", + "details": { + "name": "Out" + } + }, + { + "base": "DataInput_From_0", + "details": { + "name": "From" + } + }, + { + "base": "DataInput_To_1", + "details": { + "name": "To" + } + }, + { + "base": "DataInput_T_2", + "details": { + "name": "T" + } + }, + { + "base": "DataOutput_Result_0", + "details": { + "name": "Result" + } + } + ] + } + ] +} \ No newline at end of file diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathVector2_ToPerpendicular.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathVector2_ToPerpendicular.names new file mode 100644 index 0000000000..64488f330a --- /dev/null +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathVector2_ToPerpendicular.names @@ -0,0 +1,40 @@ +{ + "entries": [ + { + "base": "{78889490-B826-5682-9464-117DB8083AF4}", + "context": "ScriptCanvas::Node", + "variant": "", + "details": { + "name": "To Perpendicular", + "category": "Math/Vector2", + "tooltip": "returns the vector (-Source.y, Source.x), a 90 degree, positive rotation" + }, + "slots": [ + { + "base": "Input_In_0", + "details": { + "name": "In" + } + }, + { + "base": "Output_Out_0", + "details": { + "name": "Out" + } + }, + { + "base": "DataInput_Source_0", + "details": { + "name": "Source" + } + }, + { + "base": "DataOutput_Result_0", + "details": { + "name": "Result" + } + } + ] + } + ] +} \ No newline at end of file diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathVector3_Absolute.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathVector3_Absolute.names new file mode 100644 index 0000000000..4281eb162b --- /dev/null +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathVector3_Absolute.names @@ -0,0 +1,40 @@ +{ + "entries": [ + { + "base": "{8C3D49FD-9913-5104-B67B-2DFC9223E08B}", + "context": "ScriptCanvas::Node", + "variant": "", + "details": { + "name": "Absolute", + "category": "Math/Vector3", + "tooltip": "returns a vector with the absolute values of the elements of the source" + }, + "slots": [ + { + "base": "Input_In_0", + "details": { + "name": "In" + } + }, + { + "base": "Output_Out_0", + "details": { + "name": "Out" + } + }, + { + "base": "DataInput_Source_0", + "details": { + "name": "Source" + } + }, + { + "base": "DataOutput_Result_0", + "details": { + "name": "Result" + } + } + ] + } + ] +} \ No newline at end of file diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathVector3_BuildTangentBasis.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathVector3_BuildTangentBasis.names new file mode 100644 index 0000000000..7f93c15e41 --- /dev/null +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathVector3_BuildTangentBasis.names @@ -0,0 +1,46 @@ +{ + "entries": [ + { + "base": "{07875A9A-81DF-59BA-95E8-3BB5D3E7CF0E}", + "context": "ScriptCanvas::Node", + "variant": "", + "details": { + "name": "Build Tangent Basis", + "category": "Math/Vector3", + "tooltip": "returns a tangent basis from the normal" + }, + "slots": [ + { + "base": "Input_In_0", + "details": { + "name": "In" + } + }, + { + "base": "Output_Out_0", + "details": { + "name": "Out" + } + }, + { + "base": "DataInput_Normal_0", + "details": { + "name": "Normal" + } + }, + { + "base": "DataOutput_Tangent_0", + "details": { + "name": "Tangent" + } + }, + { + "base": "DataOutput_Bitangent_1", + "details": { + "name": "Bitangent" + } + } + ] + } + ] +} \ No newline at end of file diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathVector3_Clamp.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathVector3_Clamp.names new file mode 100644 index 0000000000..a5ccbaa27d --- /dev/null +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathVector3_Clamp.names @@ -0,0 +1,52 @@ +{ + "entries": [ + { + "base": "{F14339D1-DB1C-584F-A91E-2D10D29255DF}", + "context": "ScriptCanvas::Node", + "variant": "", + "details": { + "name": "Clamp", + "category": "Math/Vector3", + "tooltip": "returns vector clamped to [min, max] and equal to source if possible" + }, + "slots": [ + { + "base": "Input_In_0", + "details": { + "name": "In" + } + }, + { + "base": "Output_Out_0", + "details": { + "name": "Out" + } + }, + { + "base": "DataInput_Source_0", + "details": { + "name": "Source" + } + }, + { + "base": "DataInput_Min_1", + "details": { + "name": "Min" + } + }, + { + "base": "DataInput_Max_2", + "details": { + "name": "Max" + } + }, + { + "base": "DataOutput_Result_0", + "details": { + "name": "Result" + } + } + ] + } + ] +} \ No newline at end of file diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathVector3_Cross.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathVector3_Cross.names new file mode 100644 index 0000000000..c14d744da9 --- /dev/null +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathVector3_Cross.names @@ -0,0 +1,46 @@ +{ + "entries": [ + { + "base": "{8645F3FA-D1BE-59A2-B183-19FEA198101D}", + "context": "ScriptCanvas::Node", + "variant": "", + "details": { + "name": "Cross", + "category": "Math/Vector3", + "tooltip": "returns the vector cross product of A X B" + }, + "slots": [ + { + "base": "Input_In_0", + "details": { + "name": "In" + } + }, + { + "base": "Output_Out_0", + "details": { + "name": "Out" + } + }, + { + "base": "DataInput_A_0", + "details": { + "name": "A" + } + }, + { + "base": "DataInput_B_1", + "details": { + "name": "B" + } + }, + { + "base": "DataOutput_Result_0", + "details": { + "name": "Result" + } + } + ] + } + ] +} \ No newline at end of file diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathVector3_DirectionTo.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathVector3_DirectionTo.names new file mode 100644 index 0000000000..4d663478aa --- /dev/null +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathVector3_DirectionTo.names @@ -0,0 +1,52 @@ +{ + "entries": [ + { + "base": "{CA0FE782-4D45-5CFD-94D4-88CC687429FB}", + "context": "ScriptCanvas::Node", + "variant": "", + "details": { + "name": "Direction To", + "category": "Math/Vector3", + "tooltip": "Returns a direction vector between two points and the distance between them, by default the direction will be normalized, but it may be optionally scaled using the Scale parameter if different from 1.0" + }, + "slots": [ + { + "base": "Input_In_0", + "details": { + "name": "In" + } + }, + { + "base": "Output_Out_0", + "details": { + "name": "Out" + } + }, + { + "base": "DataInput_From_0", + "details": { + "name": "From" + } + }, + { + "base": "DataInput_To_1", + "details": { + "name": "To" + } + }, + { + "base": "DataInput_Scale_2", + "details": { + "name": "Scale" + } + }, + { + "base": "DataOutput_Result_0", + "details": { + "name": "Result" + } + } + ] + } + ] +} \ No newline at end of file diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathVector3_Distance.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathVector3_Distance.names new file mode 100644 index 0000000000..f21bd649b9 --- /dev/null +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathVector3_Distance.names @@ -0,0 +1,46 @@ +{ + "entries": [ + { + "base": "{2326F5E9-022F-5754-9A65-8E4BBD712A5A}", + "context": "ScriptCanvas::Node", + "variant": "", + "details": { + "name": "Distance", + "category": "Math/Vector3", + "tooltip": "returns the distance from B to A, that is the magnitude of the vector (A - B)" + }, + "slots": [ + { + "base": "Input_In_0", + "details": { + "name": "In" + } + }, + { + "base": "Output_Out_0", + "details": { + "name": "Out" + } + }, + { + "base": "DataInput_A_0", + "details": { + "name": "A" + } + }, + { + "base": "DataInput_B_1", + "details": { + "name": "B" + } + }, + { + "base": "DataOutput_Result_0", + "details": { + "name": "Result" + } + } + ] + } + ] +} \ No newline at end of file diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathVector3_DistanceSquared.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathVector3_DistanceSquared.names new file mode 100644 index 0000000000..d955098b71 --- /dev/null +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathVector3_DistanceSquared.names @@ -0,0 +1,46 @@ +{ + "entries": [ + { + "base": "{920C0CA6-3393-5AC7-805E-09D52E134ED4}", + "context": "ScriptCanvas::Node", + "variant": "", + "details": { + "name": "Distance Squared", + "category": "Math/Vector3", + "tooltip": "returns the distance squared from B to A, (generally faster than the actual distance if only needed for comparison)" + }, + "slots": [ + { + "base": "Input_In_0", + "details": { + "name": "In" + } + }, + { + "base": "Output_Out_0", + "details": { + "name": "Out" + } + }, + { + "base": "DataInput_A_0", + "details": { + "name": "A" + } + }, + { + "base": "DataInput_B_1", + "details": { + "name": "B" + } + }, + { + "base": "DataOutput_Result_0", + "details": { + "name": "Result" + } + } + ] + } + ] +} \ No newline at end of file diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathVector3_Dot.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathVector3_Dot.names new file mode 100644 index 0000000000..95ab3e2d3d --- /dev/null +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathVector3_Dot.names @@ -0,0 +1,46 @@ +{ + "entries": [ + { + "base": "{233F747E-7E53-5F9F-8355-EBF96FAAAEE4}", + "context": "ScriptCanvas::Node", + "variant": "", + "details": { + "name": "Dot", + "category": "Math/Vector3", + "tooltip": "returns the vector dot product of A dot B" + }, + "slots": [ + { + "base": "Input_In_0", + "details": { + "name": "In" + } + }, + { + "base": "Output_Out_0", + "details": { + "name": "Out" + } + }, + { + "base": "DataInput_A_0", + "details": { + "name": "A" + } + }, + { + "base": "DataInput_B_1", + "details": { + "name": "B" + } + }, + { + "base": "DataOutput_Result_0", + "details": { + "name": "Result" + } + } + ] + } + ] +} \ No newline at end of file diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathVector3_FromValues.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathVector3_FromValues.names new file mode 100644 index 0000000000..e640a3b0e0 --- /dev/null +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathVector3_FromValues.names @@ -0,0 +1,52 @@ +{ + "entries": [ + { + "base": "{A3F601EF-4E3C-5852-ADE9-D3F8FA9D571D}", + "context": "ScriptCanvas::Node", + "variant": "", + "details": { + "name": "From Values", + "category": "Math/Vector3", + "tooltip": "returns a vector from elements" + }, + "slots": [ + { + "base": "Input_In_0", + "details": { + "name": "In" + } + }, + { + "base": "Output_Out_0", + "details": { + "name": "Out" + } + }, + { + "base": "DataInput_X_0", + "details": { + "name": "X" + } + }, + { + "base": "DataInput_Y_1", + "details": { + "name": "Y" + } + }, + { + "base": "DataInput_Z_2", + "details": { + "name": "Z" + } + }, + { + "base": "DataOutput_Result_0", + "details": { + "name": "Result" + } + } + ] + } + ] +} \ No newline at end of file diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathVector3_GetElement.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathVector3_GetElement.names new file mode 100644 index 0000000000..1e683d24a2 --- /dev/null +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathVector3_GetElement.names @@ -0,0 +1,46 @@ +{ + "entries": [ + { + "base": "{E009C313-15F5-5B1F-99F0-8C83555BA8E1}", + "context": "ScriptCanvas::Node", + "variant": "", + "details": { + "name": "Get Element", + "category": "Math/Vector3", + "tooltip": "returns the element corresponding to the index (0 -> x) (1 -> y) (2 -> z)" + }, + "slots": [ + { + "base": "Input_In_0", + "details": { + "name": "In" + } + }, + { + "base": "Output_Out_0", + "details": { + "name": "Out" + } + }, + { + "base": "DataInput_Source_0", + "details": { + "name": "Source" + } + }, + { + "base": "DataInput_Index_1", + "details": { + "name": "Index" + } + }, + { + "base": "DataOutput_Result_0", + "details": { + "name": "Result" + } + } + ] + } + ] +} \ No newline at end of file diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathVector3_IsClose.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathVector3_IsClose.names new file mode 100644 index 0000000000..e1278a293d --- /dev/null +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathVector3_IsClose.names @@ -0,0 +1,52 @@ +{ + "entries": [ + { + "base": "{4C54A897-39D7-5612-AAA6-B5CC25D65CE2}", + "context": "ScriptCanvas::Node", + "variant": "", + "details": { + "name": "Is Close", + "category": "Math/Vector3", + "tooltip": "returns true if the difference between A and B is less than tolerance, else false" + }, + "slots": [ + { + "base": "Input_In_0", + "details": { + "name": "In" + } + }, + { + "base": "Output_Out_0", + "details": { + "name": "Out" + } + }, + { + "base": "DataInput_A_0", + "details": { + "name": "A" + } + }, + { + "base": "DataInput_B_1", + "details": { + "name": "B" + } + }, + { + "base": "DataInput_Tolerance_2", + "details": { + "name": "Tolerance" + } + }, + { + "base": "DataOutput_Result_0", + "details": { + "name": "Result" + } + } + ] + } + ] +} \ No newline at end of file diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathVector3_IsFinite.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathVector3_IsFinite.names new file mode 100644 index 0000000000..c916809a96 --- /dev/null +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathVector3_IsFinite.names @@ -0,0 +1,40 @@ +{ + "entries": [ + { + "base": "{7C09FF34-0608-57A9-8CEE-66DCA0485F08}", + "context": "ScriptCanvas::Node", + "variant": "", + "details": { + "name": "Is Finite", + "category": "Math/Vector3", + "tooltip": "returns true if every element in the source is finite, else false" + }, + "slots": [ + { + "base": "Input_In_0", + "details": { + "name": "In" + } + }, + { + "base": "Output_Out_0", + "details": { + "name": "Out" + } + }, + { + "base": "DataInput_Source_0", + "details": { + "name": "Source" + } + }, + { + "base": "DataOutput_Result_0", + "details": { + "name": "Result" + } + } + ] + } + ] +} \ No newline at end of file diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathVector3_IsNormalized.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathVector3_IsNormalized.names new file mode 100644 index 0000000000..84ffdc22f2 --- /dev/null +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathVector3_IsNormalized.names @@ -0,0 +1,46 @@ +{ + "entries": [ + { + "base": "{7C895C3A-972B-5CF4-9F1D-62C2A9BBBEAD}", + "context": "ScriptCanvas::Node", + "variant": "", + "details": { + "name": "Is Normalized", + "category": "Math/Vector3", + "tooltip": "returns true if the length of the source is within tolerance of 1.0, else false" + }, + "slots": [ + { + "base": "Input_In_0", + "details": { + "name": "In" + } + }, + { + "base": "Output_Out_0", + "details": { + "name": "Out" + } + }, + { + "base": "DataInput_Source_0", + "details": { + "name": "Source" + } + }, + { + "base": "DataInput_Tolerance_1", + "details": { + "name": "Tolerance" + } + }, + { + "base": "DataOutput_Result_0", + "details": { + "name": "Result" + } + } + ] + } + ] +} \ No newline at end of file diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathVector3_IsPerpendicular.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathVector3_IsPerpendicular.names new file mode 100644 index 0000000000..2a08ec2a0f --- /dev/null +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathVector3_IsPerpendicular.names @@ -0,0 +1,52 @@ +{ + "entries": [ + { + "base": "{775DA8B7-881F-55AF-911B-9CD28DC5F9B0}", + "context": "ScriptCanvas::Node", + "variant": "", + "details": { + "name": "Is Perpendicular", + "category": "Math/Vector3", + "tooltip": "returns true if A is within tolerance of perpendicular with B, that is if Dot(A, B) < tolerance, else false" + }, + "slots": [ + { + "base": "Input_In_0", + "details": { + "name": "In" + } + }, + { + "base": "Output_Out_0", + "details": { + "name": "Out" + } + }, + { + "base": "DataInput_A_0", + "details": { + "name": "A" + } + }, + { + "base": "DataInput_B_1", + "details": { + "name": "B" + } + }, + { + "base": "DataInput_Tolerance_2", + "details": { + "name": "Tolerance" + } + }, + { + "base": "DataOutput_Result_0", + "details": { + "name": "Result" + } + } + ] + } + ] +} \ No newline at end of file diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathVector3_IsZero.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathVector3_IsZero.names new file mode 100644 index 0000000000..22369c83eb --- /dev/null +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathVector3_IsZero.names @@ -0,0 +1,46 @@ +{ + "entries": [ + { + "base": "{282F32C7-5806-5C1A-BA31-E14E37913599}", + "context": "ScriptCanvas::Node", + "variant": "", + "details": { + "name": "Is Zero", + "category": "Math/Vector3", + "tooltip": "returns true if A is within tolerance of the zero vector, else false" + }, + "slots": [ + { + "base": "Input_In_0", + "details": { + "name": "In" + } + }, + { + "base": "Output_Out_0", + "details": { + "name": "Out" + } + }, + { + "base": "DataInput_Source_0", + "details": { + "name": "Source" + } + }, + { + "base": "DataInput_Tolerance_1", + "details": { + "name": "Tolerance" + } + }, + { + "base": "DataOutput_Result_0", + "details": { + "name": "Result" + } + } + ] + } + ] +} \ No newline at end of file diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathVector3_Length.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathVector3_Length.names new file mode 100644 index 0000000000..1048e34e55 --- /dev/null +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathVector3_Length.names @@ -0,0 +1,40 @@ +{ + "entries": [ + { + "base": "{899CC124-10D8-5081-BD8E-00BD2B0DAD2B}", + "context": "ScriptCanvas::Node", + "variant": "", + "details": { + "name": "Length", + "category": "Math/Vector3", + "tooltip": "returns the magnitude of source" + }, + "slots": [ + { + "base": "Input_In_0", + "details": { + "name": "In" + } + }, + { + "base": "Output_Out_0", + "details": { + "name": "Out" + } + }, + { + "base": "DataInput_Source_0", + "details": { + "name": "Source" + } + }, + { + "base": "DataOutput_Result_0", + "details": { + "name": "Result" + } + } + ] + } + ] +} \ No newline at end of file diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathVector3_LengthReciprocal.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathVector3_LengthReciprocal.names new file mode 100644 index 0000000000..26d305ab5a --- /dev/null +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathVector3_LengthReciprocal.names @@ -0,0 +1,40 @@ +{ + "entries": [ + { + "base": "{299657FE-6A44-52DA-919E-3F266EFC7535}", + "context": "ScriptCanvas::Node", + "variant": "", + "details": { + "name": "Length Reciprocal", + "category": "Math/Vector3", + "tooltip": "returns the 1 / magnitude of the source" + }, + "slots": [ + { + "base": "Input_In_0", + "details": { + "name": "In" + } + }, + { + "base": "Output_Out_0", + "details": { + "name": "Out" + } + }, + { + "base": "DataInput_Source_0", + "details": { + "name": "Source" + } + }, + { + "base": "DataOutput_Result_0", + "details": { + "name": "Result" + } + } + ] + } + ] +} \ No newline at end of file diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathVector3_LengthSquared.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathVector3_LengthSquared.names new file mode 100644 index 0000000000..81bc413403 --- /dev/null +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathVector3_LengthSquared.names @@ -0,0 +1,40 @@ +{ + "entries": [ + { + "base": "{12A6C1D4-5C8A-5FFB-B7BC-E5E983DA72CC}", + "context": "ScriptCanvas::Node", + "variant": "", + "details": { + "name": "Length Squared", + "category": "Math/Vector3", + "tooltip": "returns the magnitude squared of the source, generally faster than getting the exact length" + }, + "slots": [ + { + "base": "Input_In_0", + "details": { + "name": "In" + } + }, + { + "base": "Output_Out_0", + "details": { + "name": "Out" + } + }, + { + "base": "DataInput_Source_0", + "details": { + "name": "Source" + } + }, + { + "base": "DataOutput_Result_0", + "details": { + "name": "Result" + } + } + ] + } + ] +} \ No newline at end of file diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathVector3_Lerp.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathVector3_Lerp.names new file mode 100644 index 0000000000..4dfc86f953 --- /dev/null +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathVector3_Lerp.names @@ -0,0 +1,52 @@ +{ + "entries": [ + { + "base": "{722A4327-0D64-5ADF-BCDD-CDCF7EDDD16D}", + "context": "ScriptCanvas::Node", + "variant": "", + "details": { + "name": "Lerp", + "category": "Math/Vector3", + "tooltip": "returns the linear interpolation (From + ((To - From) * T)" + }, + "slots": [ + { + "base": "Input_In_0", + "details": { + "name": "In" + } + }, + { + "base": "Output_Out_0", + "details": { + "name": "Out" + } + }, + { + "base": "DataInput_From_0", + "details": { + "name": "From" + } + }, + { + "base": "DataInput_To_1", + "details": { + "name": "To" + } + }, + { + "base": "DataInput_T_2", + "details": { + "name": "T" + } + }, + { + "base": "DataOutput_Result_0", + "details": { + "name": "Result" + } + } + ] + } + ] +} \ No newline at end of file diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathVector3_Max.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathVector3_Max.names new file mode 100644 index 0000000000..9377255408 --- /dev/null +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathVector3_Max.names @@ -0,0 +1,46 @@ +{ + "entries": [ + { + "base": "{C1E9BE9C-DD4E-5AD5-BFBD-23A012619BD3}", + "context": "ScriptCanvas::Node", + "variant": "", + "details": { + "name": "Max", + "category": "Math/Vector3", + "tooltip": "returns the vector (max(A.x, B.x), max(A.y, B.y), max(A.z, B.z))" + }, + "slots": [ + { + "base": "Input_In_0", + "details": { + "name": "In" + } + }, + { + "base": "Output_Out_0", + "details": { + "name": "Out" + } + }, + { + "base": "DataInput_A_0", + "details": { + "name": "A" + } + }, + { + "base": "DataInput_B_1", + "details": { + "name": "B" + } + }, + { + "base": "DataOutput_Result_0", + "details": { + "name": "Result" + } + } + ] + } + ] +} \ No newline at end of file diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathVector3_Min.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathVector3_Min.names new file mode 100644 index 0000000000..ae84d7da5e --- /dev/null +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathVector3_Min.names @@ -0,0 +1,46 @@ +{ + "entries": [ + { + "base": "{343EA674-C05F-5803-BB86-C6D26C3F6D89}", + "context": "ScriptCanvas::Node", + "variant": "", + "details": { + "name": "Min", + "category": "Math/Vector3", + "tooltip": "returns the vector (min(A.x, B.x), min(A.y, B.y), min(A.z, B.z))" + }, + "slots": [ + { + "base": "Input_In_0", + "details": { + "name": "In" + } + }, + { + "base": "Output_Out_0", + "details": { + "name": "Out" + } + }, + { + "base": "DataInput_A_0", + "details": { + "name": "A" + } + }, + { + "base": "DataInput_B_1", + "details": { + "name": "B" + } + }, + { + "base": "DataOutput_Result_0", + "details": { + "name": "Result" + } + } + ] + } + ] +} \ No newline at end of file diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathVector3_MultiplyByNumber.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathVector3_MultiplyByNumber.names new file mode 100644 index 0000000000..d000076f9c --- /dev/null +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathVector3_MultiplyByNumber.names @@ -0,0 +1,46 @@ +{ + "entries": [ + { + "base": "{B1CAAC2D-A568-5CB2-B580-5B239D013466}", + "context": "ScriptCanvas::Node", + "variant": "", + "details": { + "name": "Multiply By Number", + "category": "Math/Vector3", + "tooltip": "returns the vector Source with each element multiplied by Multipler" + }, + "slots": [ + { + "base": "Input_In_0", + "details": { + "name": "In" + } + }, + { + "base": "Output_Out_0", + "details": { + "name": "Out" + } + }, + { + "base": "DataInput_Source_0", + "details": { + "name": "Source" + } + }, + { + "base": "DataInput_Multiplier_1", + "details": { + "name": "Multiplier" + } + }, + { + "base": "DataOutput_Result_0", + "details": { + "name": "Result" + } + } + ] + } + ] +} \ No newline at end of file diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathVector3_Negate.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathVector3_Negate.names new file mode 100644 index 0000000000..4e71256752 --- /dev/null +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathVector3_Negate.names @@ -0,0 +1,40 @@ +{ + "entries": [ + { + "base": "{A239FB13-643C-5D47-9580-A373491FECCA}", + "context": "ScriptCanvas::Node", + "variant": "", + "details": { + "name": "Negate", + "category": "Math/Vector3", + "tooltip": "returns the vector Source with each element multiplied by -1" + }, + "slots": [ + { + "base": "Input_In_0", + "details": { + "name": "In" + } + }, + { + "base": "Output_Out_0", + "details": { + "name": "Out" + } + }, + { + "base": "DataInput_Source_0", + "details": { + "name": "Source" + } + }, + { + "base": "DataOutput_Result_0", + "details": { + "name": "Result" + } + } + ] + } + ] +} \ No newline at end of file diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathVector3_Normalize.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathVector3_Normalize.names new file mode 100644 index 0000000000..73cbdbb7b3 --- /dev/null +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathVector3_Normalize.names @@ -0,0 +1,40 @@ +{ + "entries": [ + { + "base": "{CF4EBDEE-B16A-5402-B44D-75FF06AD89AE}", + "context": "ScriptCanvas::Node", + "variant": "", + "details": { + "name": "Normalize", + "category": "Math/Vector3", + "tooltip": "returns a unit length vector in the same direction as the source, or (1,0,0) if the source length is too small" + }, + "slots": [ + { + "base": "Input_In_0", + "details": { + "name": "In" + } + }, + { + "base": "Output_Out_0", + "details": { + "name": "Out" + } + }, + { + "base": "DataInput_Source_0", + "details": { + "name": "Source" + } + }, + { + "base": "DataOutput_Result_0", + "details": { + "name": "Result" + } + } + ] + } + ] +} \ No newline at end of file diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathVector3_Project.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathVector3_Project.names new file mode 100644 index 0000000000..862d7c06a6 --- /dev/null +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathVector3_Project.names @@ -0,0 +1,46 @@ +{ + "entries": [ + { + "base": "{D24123BA-6C59-5F58-90E2-FCB085384BAA}", + "context": "ScriptCanvas::Node", + "variant": "", + "details": { + "name": "Project", + "category": "Math/Vector3", + "tooltip": "returns the vector of A projected onto B, (Dot(A, B)/(Dot(B, B)) * B" + }, + "slots": [ + { + "base": "Input_In_0", + "details": { + "name": "In" + } + }, + { + "base": "Output_Out_0", + "details": { + "name": "Out" + } + }, + { + "base": "DataInput_A_0", + "details": { + "name": "A" + } + }, + { + "base": "DataInput_B_1", + "details": { + "name": "B" + } + }, + { + "base": "DataOutput_Result_0", + "details": { + "name": "Result" + } + } + ] + } + ] +} \ No newline at end of file diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathVector3_Reciprocal.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathVector3_Reciprocal.names new file mode 100644 index 0000000000..a5120d6279 --- /dev/null +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathVector3_Reciprocal.names @@ -0,0 +1,40 @@ +{ + "entries": [ + { + "base": "{E90663EA-FFD1-5908-8530-3C21BD6A9A62}", + "context": "ScriptCanvas::Node", + "variant": "", + "details": { + "name": "Reciprocal", + "category": "Math/Vector3", + "tooltip": "returns the vector (1/x, 1/y, 1/z) with elements from Source" + }, + "slots": [ + { + "base": "Input_In_0", + "details": { + "name": "In" + } + }, + { + "base": "Output_Out_0", + "details": { + "name": "Out" + } + }, + { + "base": "DataInput_Source_0", + "details": { + "name": "Source" + } + }, + { + "base": "DataOutput_Result_0", + "details": { + "name": "Result" + } + } + ] + } + ] +} \ No newline at end of file diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathVector3_SetX.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathVector3_SetX.names new file mode 100644 index 0000000000..a70f83b745 --- /dev/null +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathVector3_SetX.names @@ -0,0 +1,46 @@ +{ + "entries": [ + { + "base": "{A5945988-1E94-5560-B1EE-B513AD113E1C}", + "context": "ScriptCanvas::Node", + "variant": "", + "details": { + "name": "SetX", + "category": "Math/Vector3", + "tooltip": "returns a the vector(X, Source.Y, Source.Z)" + }, + "slots": [ + { + "base": "Input_In_0", + "details": { + "name": "In" + } + }, + { + "base": "Output_Out_0", + "details": { + "name": "Out" + } + }, + { + "base": "DataInput_Source_0", + "details": { + "name": "Source" + } + }, + { + "base": "DataInput_X_1", + "details": { + "name": "X" + } + }, + { + "base": "DataOutput_Result_0", + "details": { + "name": "Result" + } + } + ] + } + ] +} \ No newline at end of file diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathVector3_SetY.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathVector3_SetY.names new file mode 100644 index 0000000000..f5c78805c2 --- /dev/null +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathVector3_SetY.names @@ -0,0 +1,46 @@ +{ + "entries": [ + { + "base": "{08880FE1-8C3E-5380-A3FF-CA1AE16953FC}", + "context": "ScriptCanvas::Node", + "variant": "", + "details": { + "name": "SetY", + "category": "Math/Vector3", + "tooltip": "returns a the vector(Source.X, Y, Source.Z)" + }, + "slots": [ + { + "base": "Input_In_0", + "details": { + "name": "In" + } + }, + { + "base": "Output_Out_0", + "details": { + "name": "Out" + } + }, + { + "base": "DataInput_Source_0", + "details": { + "name": "Source" + } + }, + { + "base": "DataInput_Y_1", + "details": { + "name": "Y" + } + }, + { + "base": "DataOutput_Result_0", + "details": { + "name": "Result" + } + } + ] + } + ] +} \ No newline at end of file diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathVector3_SetZ.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathVector3_SetZ.names new file mode 100644 index 0000000000..870826d84b --- /dev/null +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathVector3_SetZ.names @@ -0,0 +1,46 @@ +{ + "entries": [ + { + "base": "{12C93A22-5B0B-55CC-90FC-7DB17C1C36DF}", + "context": "ScriptCanvas::Node", + "variant": "", + "details": { + "name": "SetZ", + "category": "Math/Vector3", + "tooltip": "returns a the vector(Source.X, Source.Y, Z)" + }, + "slots": [ + { + "base": "Input_In_0", + "details": { + "name": "In" + } + }, + { + "base": "Output_Out_0", + "details": { + "name": "Out" + } + }, + { + "base": "DataInput_Source_0", + "details": { + "name": "Source" + } + }, + { + "base": "DataInput_Z_1", + "details": { + "name": "Z" + } + }, + { + "base": "DataOutput_Result_0", + "details": { + "name": "Result" + } + } + ] + } + ] +} \ No newline at end of file diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathVector3_Slerp.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathVector3_Slerp.names new file mode 100644 index 0000000000..3eee6e3d05 --- /dev/null +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathVector3_Slerp.names @@ -0,0 +1,52 @@ +{ + "entries": [ + { + "base": "{55EA4F53-2789-54B2-9CC7-4DB62B2CB270}", + "context": "ScriptCanvas::Node", + "variant": "", + "details": { + "name": "Slerp", + "category": "Math/Vector3", + "tooltip": "returns a vector that is the spherical linear interpolation T, between From and To" + }, + "slots": [ + { + "base": "Input_In_0", + "details": { + "name": "In" + } + }, + { + "base": "Output_Out_0", + "details": { + "name": "Out" + } + }, + { + "base": "DataInput_From_0", + "details": { + "name": "From" + } + }, + { + "base": "DataInput_To_1", + "details": { + "name": "To" + } + }, + { + "base": "DataInput_T_2", + "details": { + "name": "T" + } + }, + { + "base": "DataOutput_Result_0", + "details": { + "name": "Result" + } + } + ] + } + ] +} \ No newline at end of file diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathVector4_Absolute.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathVector4_Absolute.names new file mode 100644 index 0000000000..5f955d54b6 --- /dev/null +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathVector4_Absolute.names @@ -0,0 +1,40 @@ +{ + "entries": [ + { + "base": "{A5BAEA40-C676-5C16-AEA0-D01C78E5918E}", + "context": "ScriptCanvas::Node", + "variant": "", + "details": { + "name": "Absolute", + "category": "Math/Vector4", + "tooltip": "returns a vector with the absolute values of the elements of the source" + }, + "slots": [ + { + "base": "Input_In_0", + "details": { + "name": "In" + } + }, + { + "base": "Output_Out_0", + "details": { + "name": "Out" + } + }, + { + "base": "DataInput_Source_0", + "details": { + "name": "Source" + } + }, + { + "base": "DataOutput_Result_0", + "details": { + "name": "Result" + } + } + ] + } + ] +} \ No newline at end of file diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathVector4_DirectionTo.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathVector4_DirectionTo.names new file mode 100644 index 0000000000..55c3f0dc5f --- /dev/null +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathVector4_DirectionTo.names @@ -0,0 +1,52 @@ +{ + "entries": [ + { + "base": "{1FC1ABCB-220E-5CBF-AE38-14E7389D0AE4}", + "context": "ScriptCanvas::Node", + "variant": "", + "details": { + "name": "Direction To", + "category": "Math/Vector4", + "tooltip": "Returns a direction vector between two points and the distance between them, by default the direction will be normalized, but it may be optionally scaled using the Scale parameter if different from 1.0" + }, + "slots": [ + { + "base": "Input_In_0", + "details": { + "name": "In" + } + }, + { + "base": "Output_Out_0", + "details": { + "name": "Out" + } + }, + { + "base": "DataInput_From_0", + "details": { + "name": "From" + } + }, + { + "base": "DataInput_To_1", + "details": { + "name": "To" + } + }, + { + "base": "DataInput_Scale_2", + "details": { + "name": "Scale" + } + }, + { + "base": "DataOutput_Result_0", + "details": { + "name": "Result" + } + } + ] + } + ] +} \ No newline at end of file diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathVector4_Dot.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathVector4_Dot.names new file mode 100644 index 0000000000..b4022c9aad --- /dev/null +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathVector4_Dot.names @@ -0,0 +1,46 @@ +{ + "entries": [ + { + "base": "{59AF8BA5-11BA-5E5E-982C-2E7A8C6600D4}", + "context": "ScriptCanvas::Node", + "variant": "", + "details": { + "name": "Dot", + "category": "Math/Vector4", + "tooltip": "returns the vector dot product of A dot B" + }, + "slots": [ + { + "base": "Input_In_0", + "details": { + "name": "In" + } + }, + { + "base": "Output_Out_0", + "details": { + "name": "Out" + } + }, + { + "base": "DataInput_A_0", + "details": { + "name": "A" + } + }, + { + "base": "DataInput_B_1", + "details": { + "name": "B" + } + }, + { + "base": "DataOutput_Result_0", + "details": { + "name": "Result" + } + } + ] + } + ] +} \ No newline at end of file diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathVector4_FromValues.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathVector4_FromValues.names new file mode 100644 index 0000000000..8e0f291742 --- /dev/null +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathVector4_FromValues.names @@ -0,0 +1,58 @@ +{ + "entries": [ + { + "base": "{DFDC391C-782D-58D9-BF81-C7B13A0F4CFC}", + "context": "ScriptCanvas::Node", + "variant": "", + "details": { + "name": "From Values", + "category": "Math/Vector4", + "tooltip": "returns a vector from elements" + }, + "slots": [ + { + "base": "Input_In_0", + "details": { + "name": "In" + } + }, + { + "base": "Output_Out_0", + "details": { + "name": "Out" + } + }, + { + "base": "DataInput_X_0", + "details": { + "name": "X" + } + }, + { + "base": "DataInput_Y_1", + "details": { + "name": "Y" + } + }, + { + "base": "DataInput_Z_2", + "details": { + "name": "Z" + } + }, + { + "base": "DataInput_W_3", + "details": { + "name": "W" + } + }, + { + "base": "DataOutput_Result_0", + "details": { + "name": "Result" + } + } + ] + } + ] +} \ No newline at end of file diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathVector4_GetElement.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathVector4_GetElement.names new file mode 100644 index 0000000000..4d8ee5cc43 --- /dev/null +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathVector4_GetElement.names @@ -0,0 +1,46 @@ +{ + "entries": [ + { + "base": "{1AC44E60-9560-58DD-A210-48A755155D6D}", + "context": "ScriptCanvas::Node", + "variant": "", + "details": { + "name": "Get Element", + "category": "Math/Vector4", + "tooltip": "returns the element corresponding to the index (0 -> x) (1 -> y) (2 -> z) (3 -> w)" + }, + "slots": [ + { + "base": "Input_In_0", + "details": { + "name": "In" + } + }, + { + "base": "Output_Out_0", + "details": { + "name": "Out" + } + }, + { + "base": "DataInput_Source_0", + "details": { + "name": "Source" + } + }, + { + "base": "DataInput_Index_1", + "details": { + "name": "Index" + } + }, + { + "base": "DataOutput_Result_0", + "details": { + "name": "Result" + } + } + ] + } + ] +} \ No newline at end of file diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathVector4_IsClose.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathVector4_IsClose.names new file mode 100644 index 0000000000..a94b2e24fd --- /dev/null +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathVector4_IsClose.names @@ -0,0 +1,52 @@ +{ + "entries": [ + { + "base": "{DD9F50A6-AC60-59E1-8C63-C6C392DA8C15}", + "context": "ScriptCanvas::Node", + "variant": "", + "details": { + "name": "Is Close", + "category": "Math/Vector4", + "tooltip": "returns true if the difference between A and B is less than tolerance, else false" + }, + "slots": [ + { + "base": "Input_In_0", + "details": { + "name": "In" + } + }, + { + "base": "Output_Out_0", + "details": { + "name": "Out" + } + }, + { + "base": "DataInput_A_0", + "details": { + "name": "A" + } + }, + { + "base": "DataInput_B_1", + "details": { + "name": "B" + } + }, + { + "base": "DataInput_Tolerance_2", + "details": { + "name": "Tolerance" + } + }, + { + "base": "DataOutput_Result_0", + "details": { + "name": "Result" + } + } + ] + } + ] +} \ No newline at end of file diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathVector4_IsFinite.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathVector4_IsFinite.names new file mode 100644 index 0000000000..6a24bbc17a --- /dev/null +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathVector4_IsFinite.names @@ -0,0 +1,40 @@ +{ + "entries": [ + { + "base": "{138EE359-9CA0-520B-873D-90C2183C96FE}", + "context": "ScriptCanvas::Node", + "variant": "", + "details": { + "name": "Is Finite", + "category": "Math/Vector4", + "tooltip": "returns true if every element in the source is finite, else false" + }, + "slots": [ + { + "base": "Input_In_0", + "details": { + "name": "In" + } + }, + { + "base": "Output_Out_0", + "details": { + "name": "Out" + } + }, + { + "base": "DataInput_Source_0", + "details": { + "name": "Source" + } + }, + { + "base": "DataOutput_Result_0", + "details": { + "name": "Result" + } + } + ] + } + ] +} \ No newline at end of file diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathVector4_IsNormalized.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathVector4_IsNormalized.names new file mode 100644 index 0000000000..800ff856e2 --- /dev/null +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathVector4_IsNormalized.names @@ -0,0 +1,46 @@ +{ + "entries": [ + { + "base": "{B2EE1FD3-D33D-5348-AC29-E2D08C1E3363}", + "context": "ScriptCanvas::Node", + "variant": "", + "details": { + "name": "Is Normalized", + "category": "Math/Vector4", + "tooltip": "returns true if the length of the source is within tolerance of 1.0, else false" + }, + "slots": [ + { + "base": "Input_In_0", + "details": { + "name": "In" + } + }, + { + "base": "Output_Out_0", + "details": { + "name": "Out" + } + }, + { + "base": "DataInput_Source_0", + "details": { + "name": "Source" + } + }, + { + "base": "DataInput_Tolerance_1", + "details": { + "name": "Tolerance" + } + }, + { + "base": "DataOutput_Result_0", + "details": { + "name": "Result" + } + } + ] + } + ] +} \ No newline at end of file diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathVector4_IsZero.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathVector4_IsZero.names new file mode 100644 index 0000000000..2d6526e973 --- /dev/null +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathVector4_IsZero.names @@ -0,0 +1,46 @@ +{ + "entries": [ + { + "base": "{EBD3BEF3-0FA8-5508-8C9B-BDCA64A00E5E}", + "context": "ScriptCanvas::Node", + "variant": "", + "details": { + "name": "Is Zero", + "category": "Math/Vector4", + "tooltip": "returns true if A is within tolerance of the zero vector, else false" + }, + "slots": [ + { + "base": "Input_In_0", + "details": { + "name": "In" + } + }, + { + "base": "Output_Out_0", + "details": { + "name": "Out" + } + }, + { + "base": "DataInput_Source_0", + "details": { + "name": "Source" + } + }, + { + "base": "DataInput_Tolerance_1", + "details": { + "name": "Tolerance" + } + }, + { + "base": "DataOutput_Result_0", + "details": { + "name": "Result" + } + } + ] + } + ] +} \ No newline at end of file diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathVector4_Length.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathVector4_Length.names new file mode 100644 index 0000000000..c9c6c5fb45 --- /dev/null +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathVector4_Length.names @@ -0,0 +1,40 @@ +{ + "entries": [ + { + "base": "{768CD3CA-09E3-51EB-AE59-8D34DC0D12A8}", + "context": "ScriptCanvas::Node", + "variant": "", + "details": { + "name": "Length", + "category": "Math/Vector4", + "tooltip": "returns the magnitude of source" + }, + "slots": [ + { + "base": "Input_In_0", + "details": { + "name": "In" + } + }, + { + "base": "Output_Out_0", + "details": { + "name": "Out" + } + }, + { + "base": "DataInput_Source_0", + "details": { + "name": "Source" + } + }, + { + "base": "DataOutput_Result_0", + "details": { + "name": "Result" + } + } + ] + } + ] +} \ No newline at end of file diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathVector4_LengthReciprocal.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathVector4_LengthReciprocal.names new file mode 100644 index 0000000000..9f34b605c0 --- /dev/null +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathVector4_LengthReciprocal.names @@ -0,0 +1,40 @@ +{ + "entries": [ + { + "base": "{60E6D939-6105-53CB-865B-4F401A1B487B}", + "context": "ScriptCanvas::Node", + "variant": "", + "details": { + "name": "Length Reciprocal", + "category": "Math/Vector4", + "tooltip": "returns the 1 / magnitude of the source" + }, + "slots": [ + { + "base": "Input_In_0", + "details": { + "name": "In" + } + }, + { + "base": "Output_Out_0", + "details": { + "name": "Out" + } + }, + { + "base": "DataInput_Source_0", + "details": { + "name": "Source" + } + }, + { + "base": "DataOutput_Result_0", + "details": { + "name": "Result" + } + } + ] + } + ] +} \ No newline at end of file diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathVector4_LengthSquared.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathVector4_LengthSquared.names new file mode 100644 index 0000000000..2404613170 --- /dev/null +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathVector4_LengthSquared.names @@ -0,0 +1,40 @@ +{ + "entries": [ + { + "base": "{4DFB1966-BDE3-55C3-A0B4-0D04926AB732}", + "context": "ScriptCanvas::Node", + "variant": "", + "details": { + "name": "Length Squared", + "category": "Math/Vector4", + "tooltip": "returns the magnitude squared of the source, generally faster than getting the exact length" + }, + "slots": [ + { + "base": "Input_In_0", + "details": { + "name": "In" + } + }, + { + "base": "Output_Out_0", + "details": { + "name": "Out" + } + }, + { + "base": "DataInput_Source_0", + "details": { + "name": "Source" + } + }, + { + "base": "DataOutput_Result_0", + "details": { + "name": "Result" + } + } + ] + } + ] +} \ No newline at end of file diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathVector4_MultiplyByNumber.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathVector4_MultiplyByNumber.names new file mode 100644 index 0000000000..68624b8316 --- /dev/null +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathVector4_MultiplyByNumber.names @@ -0,0 +1,46 @@ +{ + "entries": [ + { + "base": "{317BA61D-AEEA-566E-A113-2384C5BDADD6}", + "context": "ScriptCanvas::Node", + "variant": "", + "details": { + "name": "Multiply By Number", + "category": "Math/Vector4", + "tooltip": "returns the vector Source with each element multiplied by Multipler" + }, + "slots": [ + { + "base": "Input_In_0", + "details": { + "name": "In" + } + }, + { + "base": "Output_Out_0", + "details": { + "name": "Out" + } + }, + { + "base": "DataInput_Source_0", + "details": { + "name": "Source" + } + }, + { + "base": "DataInput_Multiplier_1", + "details": { + "name": "Multiplier" + } + }, + { + "base": "DataOutput_Result_0", + "details": { + "name": "Result" + } + } + ] + } + ] +} \ No newline at end of file diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathVector4_Negate.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathVector4_Negate.names new file mode 100644 index 0000000000..d2cf095379 --- /dev/null +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathVector4_Negate.names @@ -0,0 +1,40 @@ +{ + "entries": [ + { + "base": "{B8B0E83E-F1C3-5F0B-93A5-1756B79E1316}", + "context": "ScriptCanvas::Node", + "variant": "", + "details": { + "name": "Negate", + "category": "Math/Vector4", + "tooltip": "returns the vector Source with each element multiplied by -1" + }, + "slots": [ + { + "base": "Input_In_0", + "details": { + "name": "In" + } + }, + { + "base": "Output_Out_0", + "details": { + "name": "Out" + } + }, + { + "base": "DataInput_Source_0", + "details": { + "name": "Source" + } + }, + { + "base": "DataOutput_Result_0", + "details": { + "name": "Result" + } + } + ] + } + ] +} \ No newline at end of file diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathVector4_Normalize.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathVector4_Normalize.names new file mode 100644 index 0000000000..b8159887c2 --- /dev/null +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathVector4_Normalize.names @@ -0,0 +1,40 @@ +{ + "entries": [ + { + "base": "{9337FBC7-20D8-51C7-8D69-D9E53B739BD7}", + "context": "ScriptCanvas::Node", + "variant": "", + "details": { + "name": "Normalize", + "category": "Math/Vector4", + "tooltip": "returns a unit length vector in the same direction as the source, or (1,0,0,0) if the source length is too small" + }, + "slots": [ + { + "base": "Input_In_0", + "details": { + "name": "In" + } + }, + { + "base": "Output_Out_0", + "details": { + "name": "Out" + } + }, + { + "base": "DataInput_Source_0", + "details": { + "name": "Source" + } + }, + { + "base": "DataOutput_Result_0", + "details": { + "name": "Result" + } + } + ] + } + ] +} \ No newline at end of file diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathVector4_Reciprocal.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathVector4_Reciprocal.names new file mode 100644 index 0000000000..502cd22c37 --- /dev/null +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathVector4_Reciprocal.names @@ -0,0 +1,40 @@ +{ + "entries": [ + { + "base": "{A7AB6D14-CDAF-519D-B29F-2E1292257A4C}", + "context": "ScriptCanvas::Node", + "variant": "", + "details": { + "name": "Reciprocal", + "category": "Math/Vector4", + "tooltip": "returns the vector (1/x, 1/y, 1/z, 1/w) with elements from Source" + }, + "slots": [ + { + "base": "Input_In_0", + "details": { + "name": "In" + } + }, + { + "base": "Output_Out_0", + "details": { + "name": "Out" + } + }, + { + "base": "DataInput_Source_0", + "details": { + "name": "Source" + } + }, + { + "base": "DataOutput_Result_0", + "details": { + "name": "Result" + } + } + ] + } + ] +} \ No newline at end of file diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathVector4_SetW.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathVector4_SetW.names new file mode 100644 index 0000000000..1797b85b69 --- /dev/null +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathVector4_SetW.names @@ -0,0 +1,46 @@ +{ + "entries": [ + { + "base": "{48337108-38AA-5A58-BBFD-D15560A0B685}", + "context": "ScriptCanvas::Node", + "variant": "", + "details": { + "name": "SetW", + "category": "Math/Vector4", + "tooltip": "returns a the vector(Source.X, Source.Y, Source.Z, W)" + }, + "slots": [ + { + "base": "Input_In_0", + "details": { + "name": "In" + } + }, + { + "base": "Output_Out_0", + "details": { + "name": "Out" + } + }, + { + "base": "DataInput_Source_0", + "details": { + "name": "Source" + } + }, + { + "base": "DataInput_W_1", + "details": { + "name": "W" + } + }, + { + "base": "DataOutput_Result_0", + "details": { + "name": "Result" + } + } + ] + } + ] +} \ No newline at end of file diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathVector4_SetX.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathVector4_SetX.names new file mode 100644 index 0000000000..b1a2f8d94f --- /dev/null +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathVector4_SetX.names @@ -0,0 +1,46 @@ +{ + "entries": [ + { + "base": "{E39B02FA-3231-57AC-8D2F-E9448E2CECD3}", + "context": "ScriptCanvas::Node", + "variant": "", + "details": { + "name": "SetX", + "category": "Math/Vector4", + "tooltip": "returns a the vector(X, Source.Y, Source.Z, Source.W)" + }, + "slots": [ + { + "base": "Input_In_0", + "details": { + "name": "In" + } + }, + { + "base": "Output_Out_0", + "details": { + "name": "Out" + } + }, + { + "base": "DataInput_Source_0", + "details": { + "name": "Source" + } + }, + { + "base": "DataInput_X_1", + "details": { + "name": "X" + } + }, + { + "base": "DataOutput_Result_0", + "details": { + "name": "Result" + } + } + ] + } + ] +} \ No newline at end of file diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathVector4_SetY.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathVector4_SetY.names new file mode 100644 index 0000000000..533a7178bd --- /dev/null +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathVector4_SetY.names @@ -0,0 +1,46 @@ +{ + "entries": [ + { + "base": "{45D44536-DCE8-5CC1-9311-9BC79BBF333C}", + "context": "ScriptCanvas::Node", + "variant": "", + "details": { + "name": "SetY", + "category": "Math/Vector4", + "tooltip": "returns a the vector(Source.X, Y, Source.Z, Source.W)" + }, + "slots": [ + { + "base": "Input_In_0", + "details": { + "name": "In" + } + }, + { + "base": "Output_Out_0", + "details": { + "name": "Out" + } + }, + { + "base": "DataInput_Source_0", + "details": { + "name": "Source" + } + }, + { + "base": "DataInput_Y_1", + "details": { + "name": "Y" + } + }, + { + "base": "DataOutput_Result_0", + "details": { + "name": "Result" + } + } + ] + } + ] +} \ No newline at end of file diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathVector4_SetZ.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathVector4_SetZ.names new file mode 100644 index 0000000000..d631cef009 --- /dev/null +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathVector4_SetZ.names @@ -0,0 +1,46 @@ +{ + "entries": [ + { + "base": "{8CC2A1A7-FD41-5C7B-BC1A-BEF5BBF74D62}", + "context": "ScriptCanvas::Node", + "variant": "", + "details": { + "name": "SetZ", + "category": "Math/Vector4", + "tooltip": "returns a the vector(Source.X, Source.Y, Z, Source.W)" + }, + "slots": [ + { + "base": "Input_In_0", + "details": { + "name": "In" + } + }, + { + "base": "Output_Out_0", + "details": { + "name": "Out" + } + }, + { + "base": "DataInput_Source_0", + "details": { + "name": "Source" + } + }, + { + "base": "DataInput_Z_1", + "details": { + "name": "Z" + } + }, + { + "base": "DataOutput_Result_0", + "details": { + "name": "Result" + } + } + ] + } + ] +} \ No newline at end of file diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/Math_Add_+_.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/Math_Add_+_.names new file mode 100644 index 0000000000..b50bb39aaf --- /dev/null +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/Math_Add_+_.names @@ -0,0 +1,46 @@ +{ + "entries": [ + { + "base": "{C1B42FEC-0545-4511-9FAC-11E0387FEDF0}", + "context": "ScriptCanvas::Node", + "variant": "", + "details": { + "name": "Add (+)", + "category": "Math", + "tooltip": "Adds two or more values" + }, + "slots": [ + { + "base": "Input_In_0", + "details": { + "name": "In" + } + }, + { + "base": "Output_Out_0", + "details": { + "name": "Out" + } + }, + { + "base": "DataInput_Value_0", + "details": { + "name": "Value" + } + }, + { + "base": "DataInput_Value_1", + "details": { + "name": "Value" + } + }, + { + "base": "DataOutput_Result_0", + "details": { + "name": "Result" + } + } + ] + } + ] +} \ No newline at end of file diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/Math_Divide__.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/Math_Divide__.names new file mode 100644 index 0000000000..c0891eb923 --- /dev/null +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/Math_Divide__.names @@ -0,0 +1,46 @@ +{ + "entries": [ + { + "base": "{DC17E19F-3829-410D-9A0B-AD60C6066DAA}", + "context": "ScriptCanvas::Node", + "variant": "", + "details": { + "name": "Divide (/)", + "category": "Math", + "tooltip": "Divides two or more values" + }, + "slots": [ + { + "base": "Input_In_0", + "details": { + "name": "In" + } + }, + { + "base": "Output_Out_0", + "details": { + "name": "Out" + } + }, + { + "base": "DataInput_Value_0", + "details": { + "name": "Value" + } + }, + { + "base": "DataInput_Value_1", + "details": { + "name": "Value" + } + }, + { + "base": "DataOutput_Result_0", + "details": { + "name": "Result" + } + } + ] + } + ] +} \ No newline at end of file diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/Math_DividebyNumber__.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/Math_DividebyNumber__.names new file mode 100644 index 0000000000..01a061eae9 --- /dev/null +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/Math_DividebyNumber__.names @@ -0,0 +1,46 @@ +{ + "entries": [ + { + "base": "{8305B5C9-1B9F-4D5B-B3E7-66925F491E9D}", + "context": "ScriptCanvas::Node", + "variant": "", + "details": { + "name": "Divide by Number (/)", + "category": "Math", + "tooltip": "Divides certain types by a given number" + }, + "slots": [ + { + "base": "DataInput_Divisor_0", + "details": { + "name": "Divisor" + } + }, + { + "base": "Input_In_0", + "details": { + "name": "In" + } + }, + { + "base": "Output_Out_0", + "details": { + "name": "Out" + } + }, + { + "base": "DataInput_Source_1", + "details": { + "name": "Source" + } + }, + { + "base": "DataOutput_Result_0", + "details": { + "name": "Result" + } + } + ] + } + ] +} \ No newline at end of file diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/Math_Length.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/Math_Length.names new file mode 100644 index 0000000000..80a5a6a356 --- /dev/null +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/Math_Length.names @@ -0,0 +1,40 @@ +{ + "entries": [ + { + "base": "{AEE15BEA-CD51-4C1A-B06D-C09FB9EAA005}", + "context": "ScriptCanvas::Node", + "variant": "", + "details": { + "name": "Length", + "category": "Math", + "tooltip": "Given a vector this returns the magnitude (length) of the vector. For a quaternion, magnitude is the cosine of half the angle of rotation." + }, + "slots": [ + { + "base": "DataOutput_Length_0", + "details": { + "name": "Length" + } + }, + { + "base": "Input_In_0", + "details": { + "name": "In" + } + }, + { + "base": "Output_Out_0", + "details": { + "name": "Out" + } + }, + { + "base": "DataInput_Source_0", + "details": { + "name": "Source" + } + } + ] + } + ] +} \ No newline at end of file diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/Math_LerpBetween.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/Math_LerpBetween.names new file mode 100644 index 0000000000..1cb015b756 --- /dev/null +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/Math_LerpBetween.names @@ -0,0 +1,93 @@ +{ + "entries": [ + { + "base": "{A4CFB2F2-4045-47ED-AE73-ED60C2072EE4}", + "context": "ScriptCanvas::Node", + "variant": "", + "details": { + "name": "Lerp Between", + "category": "Math" + }, + "slots": [ + { + "base": "Input_In_0", + "details": { + "name": "In", + "tooltip": "Starts the lerp action from the beginning." + } + }, + { + "base": "DataInput_Start_0", + "details": { + "name": "Start" + } + }, + { + "base": "DataInput_Stop_1", + "details": { + "name": "Stop" + } + }, + { + "base": "DataInput_Speed_2", + "details": { + "name": "Speed" + } + }, + { + "base": "DataInput_Maximum Duration_3", + "details": { + "name": "Maximum Duration" + } + }, + { + "base": "Output_Out_0", + "details": { + "name": "Out", + "tooltip": "Executes immediately after the lerp action is started." + } + }, + { + "base": "Input_Cancel_1", + "details": { + "name": "Cancel", + "tooltip": "Stops the lerp action immediately." + } + }, + { + "base": "Output_Canceled_1", + "details": { + "name": "Canceled", + "tooltip": "Executes immediately after the operation is canceled." + } + }, + { + "base": "Output_Tick_2", + "details": { + "name": "Tick", + "tooltip": "Signaled at each step of the lerp." + } + }, + { + "base": "DataOutput_Step_0", + "details": { + "name": "Step" + } + }, + { + "base": "DataOutput_Percent_1", + "details": { + "name": "Percent" + } + }, + { + "base": "Output_Lerp Complete_3", + "details": { + "name": "Lerp Complete", + "tooltip": "Signaled after the last Tick, when the lerp is complete" + } + } + ] + } + ] +} \ No newline at end of file diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/Math_MathExpression.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/Math_MathExpression.names new file mode 100644 index 0000000000..36d0aeac01 --- /dev/null +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/Math_MathExpression.names @@ -0,0 +1,36 @@ +{ + "entries": [ + { + "base": "{A5841DE8-CA11-4364-9C34-5ECE8B9623D7}", + "context": "ScriptCanvas::Node", + "variant": "", + "details": { + "name": "Math Expression", + "category": "Math", + "tooltip": "Will evaluate a series of math operations, allowing users to specify inputs using {}." + }, + "slots": [ + { + "base": "Input_In_0", + "details": { + "name": "In", + "tooltip": "Input signal" + } + }, + { + "base": "DataOutput_Result_0", + "details": { + "name": "Result" + } + }, + { + "base": "Output_Out_0", + "details": { + "name": "Out", + "tooltip": "Output signal" + } + } + ] + } + ] +} \ No newline at end of file diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/Math_MultiplyAndAdd.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/Math_MultiplyAndAdd.names new file mode 100644 index 0000000000..0e452f6f36 --- /dev/null +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/Math_MultiplyAndAdd.names @@ -0,0 +1,51 @@ +{ + "entries": [ + { + "base": "{9A2FDC22-90E1-5A32-9670-156BB7EE8149}", + "context": "ScriptCanvas::Node", + "variant": "", + "details": { + "name": "Multiply And Add", + "category": "Math" + }, + "slots": [ + { + "base": "Input_In_0", + "details": { + "name": "In" + } + }, + { + "base": "Output_Out_0", + "details": { + "name": "Out" + } + }, + { + "base": "DataInput_Multiplicand_0", + "details": { + "name": "Multiplicand" + } + }, + { + "base": "DataInput_Multiplier_1", + "details": { + "name": "Multiplier" + } + }, + { + "base": "DataInput_Addend_2", + "details": { + "name": "Addend" + } + }, + { + "base": "DataOutput_Result_0", + "details": { + "name": "Result" + } + } + ] + } + ] +} \ No newline at end of file diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/Math_Multiply_x_.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/Math_Multiply_x_.names new file mode 100644 index 0000000000..3ce427647d --- /dev/null +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/Math_Multiply_x_.names @@ -0,0 +1,46 @@ +{ + "entries": [ + { + "base": "{E9BB45A1-AE96-47B0-B2BF-2927D420A28C}", + "context": "ScriptCanvas::Node", + "variant": "", + "details": { + "name": "Multiply (*)", + "category": "Math", + "tooltip": "Multiplies two of more values" + }, + "slots": [ + { + "base": "Input_In_0", + "details": { + "name": "In" + } + }, + { + "base": "Output_Out_0", + "details": { + "name": "Out" + } + }, + { + "base": "DataInput_Value_0", + "details": { + "name": "Value" + } + }, + { + "base": "DataInput_Value_1", + "details": { + "name": "Value" + } + }, + { + "base": "DataOutput_Result_0", + "details": { + "name": "Result" + } + } + ] + } + ] +} \ No newline at end of file diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/Math_StringToNumber.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/Math_StringToNumber.names new file mode 100644 index 0000000000..45b8ba8cb5 --- /dev/null +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/Math_StringToNumber.names @@ -0,0 +1,34 @@ +{ + "entries": [ + { + "base": "{8A57777C-AD84-5CF4-B411-03ABF982EF55}", + "context": "ScriptCanvas::Node", + "variant": "", + "details": { + "name": "String To Number", + "category": "Math", + "tooltip": "Converts the given string to it's numeric representation if possible." + }, + "slots": [ + { + "base": "Input_In_0", + "details": { + "name": "In" + } + }, + { + "base": "Output_Out_0", + "details": { + "name": "Out" + } + }, + { + "base": "DataOutput_Result_0", + "details": { + "name": "Result" + } + } + ] + } + ] +} \ No newline at end of file diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/Math_Subtract_-_.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/Math_Subtract_-_.names new file mode 100644 index 0000000000..cec6c3ec91 --- /dev/null +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/Math_Subtract_-_.names @@ -0,0 +1,46 @@ +{ + "entries": [ + { + "base": "{D0615D0A-027F-47F6-A02B-E35DAF22F431}", + "context": "ScriptCanvas::Node", + "variant": "", + "details": { + "name": "Subtract (-)", + "category": "Math", + "tooltip": "Subtracts two of more elements" + }, + "slots": [ + { + "base": "Input_In_0", + "details": { + "name": "In" + } + }, + { + "base": "Output_Out_0", + "details": { + "name": "Out" + } + }, + { + "base": "DataInput_Value_0", + "details": { + "name": "Value" + } + }, + { + "base": "DataInput_Value_1", + "details": { + "name": "Value" + } + }, + { + "base": "DataOutput_Result_0", + "details": { + "name": "Result" + } + } + ] + } + ] +} \ No newline at end of file diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/Math_ThreeGeneric.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/Math_ThreeGeneric.names new file mode 100644 index 0000000000..b76b0099d3 --- /dev/null +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/Math_ThreeGeneric.names @@ -0,0 +1,64 @@ +{ + "entries": [ + { + "base": "{9E334D28-CBB3-53AF-AFA1-8223F50312CE}", + "context": "ScriptCanvas::Node", + "variant": "", + "details": { + "name": "Three Generic", + "category": "Math", + "tooltip": "returns all columns from matrix" + }, + "slots": [ + { + "base": "Input_In_0", + "details": { + "name": "In" + } + }, + { + "base": "Output_Out_0", + "details": { + "name": "Out" + } + }, + { + "base": "DataInput_One_0", + "details": { + "name": "One" + } + }, + { + "base": "DataInput_Two_1", + "details": { + "name": "Two" + } + }, + { + "base": "DataInput_Three_2", + "details": { + "name": "Three" + } + }, + { + "base": "DataOutput_One_0", + "details": { + "name": "One" + } + }, + { + "base": "DataOutput_Two_1", + "details": { + "name": "Two" + } + }, + { + "base": "DataOutput_Three_2", + "details": { + "name": "Three" + } + } + ] + } + ] +} \ No newline at end of file diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/Nodeables_Duration.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/Nodeables_Duration.names new file mode 100644 index 0000000000..009ef7cd75 --- /dev/null +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/Nodeables_Duration.names @@ -0,0 +1,54 @@ +{ + "entries": [ + { + "base": "{CCF1F41F-39C2-C847-9D9E-0155C8B46E1C}", + "context": "ScriptCanvas::Node", + "variant": "", + "details": { + "name": "Duration", + "category": "Nodeables", + "tooltip": "Triggers a signal every frame during the specified duration." + }, + "slots": [ + { + "base": "Input_Start_0", + "details": { + "name": "Start" + } + }, + { + "base": "DataInput_Duration_0", + "details": { + "name": "Duration" + } + }, + { + "base": "Output_On Start_0", + "details": { + "name": "On Start" + } + }, + { + "base": "Output_OnTick_1", + "details": { + "name": "OnTick", + "tooltip": "Signaled every frame while the duration is active." + } + }, + { + "base": "DataOutput_Elapsed_0", + "details": { + "name": "Elapsed" + } + }, + { + "base": "Output_Done_2", + "details": { + "name": "Done", + "tooltip": "Signaled after waiting for the specified amount of times." + } + } + ] + } + ] +} \ No newline at end of file diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/Nodeables_Repeater.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/Nodeables_Repeater.names new file mode 100644 index 0000000000..ae4868ad60 --- /dev/null +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/Nodeables_Repeater.names @@ -0,0 +1,54 @@ +{ + "entries": [ + { + "base": "{AB587027-2270-4CA6-242F-6069C6D9BBB6}", + "context": "ScriptCanvas::Node", + "variant": "", + "details": { + "name": "Repeater", + "category": "Nodeables", + "tooltip": "Repeats the output signal the given number of times using the specified delay to space the signals out." + }, + "slots": [ + { + "base": "Input_Start_0", + "details": { + "name": "Start" + } + }, + { + "base": "DataInput_Repetitions_0", + "details": { + "name": "Repetitions" + } + }, + { + "base": "DataInput_Interval_1", + "details": { + "name": "Interval" + } + }, + { + "base": "Output_On Start_0", + "details": { + "name": "On Start" + } + }, + { + "base": "Output_Complete_1", + "details": { + "name": "Complete", + "tooltip": "Signaled upon node exit" + } + }, + { + "base": "Output_Action_2", + "details": { + "name": "Action", + "tooltip": "Signaled every repetition" + } + } + ] + } + ] +} \ No newline at end of file diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/Nodeables_TimeDelay.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/Nodeables_TimeDelay.names new file mode 100644 index 0000000000..618f0c3378 --- /dev/null +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/Nodeables_TimeDelay.names @@ -0,0 +1,41 @@ +{ + "entries": [ + { + "base": "{D3629902-02E9-AE59-0424-F366D342B433}", + "context": "ScriptCanvas::Node", + "variant": "", + "details": { + "name": "Time Delay", + "category": "Nodeables", + "tooltip": "Delays all incoming execution for the specified number of ticks" + }, + "slots": [ + { + "base": "Input_Start_0", + "details": { + "name": "Start" + } + }, + { + "base": "DataInput_Delay_0", + "details": { + "name": "Delay" + } + }, + { + "base": "Output_On Start_0", + "details": { + "name": "On Start" + } + }, + { + "base": "Output_Done_1", + "details": { + "name": "Done", + "tooltip": "Signaled after waiting for the specified amount of times." + } + } + ] + } + ] +} \ No newline at end of file diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/OperatorsMath_OperatorArithmeticUnary.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/OperatorsMath_OperatorArithmeticUnary.names new file mode 100644 index 0000000000..c7bfae7988 --- /dev/null +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/OperatorsMath_OperatorArithmeticUnary.names @@ -0,0 +1,45 @@ +{ + "entries": [ + { + "base": "{4B68DF49-35DE-48CF-BCE3-F892CCF2639D}", + "context": "ScriptCanvas::Node", + "variant": "", + "details": { + "name": "Operator Arithmetic Unary", + "category": "Operators/Math" + }, + "slots": [ + { + "base": "Input_In_0", + "details": { + "name": "In" + } + }, + { + "base": "Output_Out_0", + "details": { + "name": "Out" + } + }, + { + "base": "DataInput_Value_0", + "details": { + "name": "Value" + } + }, + { + "base": "DataInput_Value_1", + "details": { + "name": "Value" + } + }, + { + "base": "DataOutput_Result_0", + "details": { + "name": "Result" + } + } + ] + } + ] +} \ No newline at end of file diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/Operators_OperatorArithmetic.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/Operators_OperatorArithmetic.names new file mode 100644 index 0000000000..6f3ef18469 --- /dev/null +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/Operators_OperatorArithmetic.names @@ -0,0 +1,45 @@ +{ + "entries": [ + { + "base": "{FE0589B0-F835-4CD5-BBD3-86510CBB985B}", + "context": "ScriptCanvas::Node", + "variant": "", + "details": { + "name": "Operator Arithmetic", + "category": "Operators" + }, + "slots": [ + { + "base": "Input_In_0", + "details": { + "name": "In" + } + }, + { + "base": "Output_Out_0", + "details": { + "name": "Out" + } + }, + { + "base": "DataInput_Value_0", + "details": { + "name": "Value" + } + }, + { + "base": "DataInput_Value_1", + "details": { + "name": "Value" + } + }, + { + "base": "DataOutput_Result_0", + "details": { + "name": "Result" + } + } + ] + } + ] +} \ No newline at end of file diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/Operators_OperatorBase.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/Operators_OperatorBase.names new file mode 100644 index 0000000000..179ead79e9 --- /dev/null +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/Operators_OperatorBase.names @@ -0,0 +1,29 @@ +{ + "entries": [ + { + "base": "{30FED030-71ED-4498-AB2C-F5586DFA490E}", + "context": "ScriptCanvas::Node", + "variant": "", + "details": { + "name": "Operator Base", + "category": "Operators" + }, + "slots": [ + { + "base": "Input_In_0", + "details": { + "name": "In", + "tooltip": "Input signal" + } + }, + { + "base": "Output_Out_0", + "details": { + "name": "Out", + "tooltip": "Output signal" + } + } + ] + } + ] +} \ No newline at end of file diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/PhysXWorld_BoxCastWithGroup.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/PhysXWorld_BoxCastWithGroup.names new file mode 100644 index 0000000000..62f08e481e --- /dev/null +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/PhysXWorld_BoxCastWithGroup.names @@ -0,0 +1,100 @@ +{ + "entries": [ + { + "base": "{022255F7-DD50-5654-967E-6E00E8360F00}", + "context": "ScriptCanvas::Node", + "variant": "", + "details": { + "name": "Box Cast With Group", + "category": "PhysX/World", + "tooltip": "BoxCast" + }, + "slots": [ + { + "base": "Input_In_0", + "details": { + "name": "In" + } + }, + { + "base": "Output_Out_0", + "details": { + "name": "Out" + } + }, + { + "base": "DataInput_Distance_0", + "details": { + "name": "Distance" + } + }, + { + "base": "DataInput_Pose_1", + "details": { + "name": "Pose" + } + }, + { + "base": "DataInput_Direction_2", + "details": { + "name": "Direction" + } + }, + { + "base": "DataInput_Dimensions_3", + "details": { + "name": "Dimensions" + } + }, + { + "base": "DataInput_Collision group_4", + "details": { + "name": "Collision group" + } + }, + { + "base": "DataInput_Ignore_5", + "details": { + "name": "Ignore" + } + }, + { + "base": "DataOutput_Object Hit_0", + "details": { + "name": "Object Hit" + } + }, + { + "base": "DataOutput_Position_1", + "details": { + "name": "Position" + } + }, + { + "base": "DataOutput_Normal_2", + "details": { + "name": "Normal" + } + }, + { + "base": "DataOutput_Distance_3", + "details": { + "name": "Distance" + } + }, + { + "base": "DataOutput_EntityId_4", + "details": { + "name": "EntityId" + } + }, + { + "base": "DataOutput_Surface_5", + "details": { + "name": "Surface" + } + } + ] + } + ] +} \ No newline at end of file diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/PhysXWorld_CapsuleCastWithGroup.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/PhysXWorld_CapsuleCastWithGroup.names new file mode 100644 index 0000000000..cd8fd7f240 --- /dev/null +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/PhysXWorld_CapsuleCastWithGroup.names @@ -0,0 +1,106 @@ +{ + "entries": [ + { + "base": "{1467D2BE-D829-5A8A-976D-6D06FDCD3310}", + "context": "ScriptCanvas::Node", + "variant": "", + "details": { + "name": "Capsule Cast With Group", + "category": "PhysX/World", + "tooltip": "CapsuleCast" + }, + "slots": [ + { + "base": "Input_In_0", + "details": { + "name": "In" + } + }, + { + "base": "Output_Out_0", + "details": { + "name": "Out" + } + }, + { + "base": "DataInput_Distance_0", + "details": { + "name": "Distance" + } + }, + { + "base": "DataInput_Pose_1", + "details": { + "name": "Pose" + } + }, + { + "base": "DataInput_Direction_2", + "details": { + "name": "Direction" + } + }, + { + "base": "DataInput_Height_3", + "details": { + "name": "Height" + } + }, + { + "base": "DataInput_Radius_4", + "details": { + "name": "Radius" + } + }, + { + "base": "DataInput_Collision group_5", + "details": { + "name": "Collision group" + } + }, + { + "base": "DataInput_Ignore_6", + "details": { + "name": "Ignore" + } + }, + { + "base": "DataOutput_Object Hit_0", + "details": { + "name": "Object Hit" + } + }, + { + "base": "DataOutput_Position_1", + "details": { + "name": "Position" + } + }, + { + "base": "DataOutput_Normal_2", + "details": { + "name": "Normal" + } + }, + { + "base": "DataOutput_Distance_3", + "details": { + "name": "Distance" + } + }, + { + "base": "DataOutput_EntityId_4", + "details": { + "name": "EntityId" + } + }, + { + "base": "DataOutput_Surface_5", + "details": { + "name": "Surface" + } + } + ] + } + ] +} \ No newline at end of file diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/PhysXWorld_OverlapBoxWithGroup.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/PhysXWorld_OverlapBoxWithGroup.names new file mode 100644 index 0000000000..d01ae23354 --- /dev/null +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/PhysXWorld_OverlapBoxWithGroup.names @@ -0,0 +1,58 @@ +{ + "entries": [ + { + "base": "{B4F46A1B-7C2F-553F-BAE8-867066A365FA}", + "context": "ScriptCanvas::Node", + "variant": "", + "details": { + "name": "Overlap Box With Group", + "category": "PhysX/World", + "tooltip": "Returns the objects overlapping a box at a position" + }, + "slots": [ + { + "base": "Input_In_0", + "details": { + "name": "In" + } + }, + { + "base": "Output_Out_0", + "details": { + "name": "Out" + } + }, + { + "base": "DataInput_Pose_0", + "details": { + "name": "Pose" + } + }, + { + "base": "DataInput_Dimensions_1", + "details": { + "name": "Dimensions" + } + }, + { + "base": "DataInput_Collision group_2", + "details": { + "name": "Collision group" + } + }, + { + "base": "DataInput_Ignore_3", + "details": { + "name": "Ignore" + } + }, + { + "base": "DataOutput_Result_0", + "details": { + "name": "Result" + } + } + ] + } + ] +} \ No newline at end of file diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/PhysXWorld_OverlapCapsuleWithGroup.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/PhysXWorld_OverlapCapsuleWithGroup.names new file mode 100644 index 0000000000..e1ac954107 --- /dev/null +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/PhysXWorld_OverlapCapsuleWithGroup.names @@ -0,0 +1,64 @@ +{ + "entries": [ + { + "base": "{588E1C8F-D18E-5C00-AF13-C4FCD5A9519D}", + "context": "ScriptCanvas::Node", + "variant": "", + "details": { + "name": "Overlap Capsule With Group", + "category": "PhysX/World", + "tooltip": "Returns the objects overlapping a capsule at a position" + }, + "slots": [ + { + "base": "Input_In_0", + "details": { + "name": "In" + } + }, + { + "base": "Output_Out_0", + "details": { + "name": "Out" + } + }, + { + "base": "DataInput_Pose_0", + "details": { + "name": "Pose" + } + }, + { + "base": "DataInput_Height_1", + "details": { + "name": "Height" + } + }, + { + "base": "DataInput_Radius_2", + "details": { + "name": "Radius" + } + }, + { + "base": "DataInput_Collision group_3", + "details": { + "name": "Collision group" + } + }, + { + "base": "DataInput_Ignore_4", + "details": { + "name": "Ignore" + } + }, + { + "base": "DataOutput_Result_0", + "details": { + "name": "Result" + } + } + ] + } + ] +} \ No newline at end of file diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/PhysXWorld_OverlapSphereWithGroup.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/PhysXWorld_OverlapSphereWithGroup.names new file mode 100644 index 0000000000..2d7cad3dce --- /dev/null +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/PhysXWorld_OverlapSphereWithGroup.names @@ -0,0 +1,58 @@ +{ + "entries": [ + { + "base": "{4BEFF98E-4147-55AF-B105-29085951CBA9}", + "context": "ScriptCanvas::Node", + "variant": "", + "details": { + "name": "Overlap Sphere With Group", + "category": "PhysX/World", + "tooltip": "Returns the objects overlapping a sphere at a position" + }, + "slots": [ + { + "base": "Input_In_0", + "details": { + "name": "In" + } + }, + { + "base": "Output_Out_0", + "details": { + "name": "Out" + } + }, + { + "base": "DataInput_Position_0", + "details": { + "name": "Position" + } + }, + { + "base": "DataInput_Radius_1", + "details": { + "name": "Radius" + } + }, + { + "base": "DataInput_Collision group_2", + "details": { + "name": "Collision group" + } + }, + { + "base": "DataInput_Ignore_3", + "details": { + "name": "Ignore" + } + }, + { + "base": "DataOutput_Result_0", + "details": { + "name": "Result" + } + } + ] + } + ] +} \ No newline at end of file diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/PhysXWorld_RayCastLocalSpaceWithGroup.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/PhysXWorld_RayCastLocalSpaceWithGroup.names new file mode 100644 index 0000000000..68a432668f --- /dev/null +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/PhysXWorld_RayCastLocalSpaceWithGroup.names @@ -0,0 +1,94 @@ +{ + "entries": [ + { + "base": "{BD7F9C50-62EA-56C0-9B8B-D23E5D28300D}", + "context": "ScriptCanvas::Node", + "variant": "", + "details": { + "name": "Ray Cast Local Space With Group", + "category": "PhysX/World", + "tooltip": "Returns the first entity hit by a ray cast in local space from the source entity in the specified direction." + }, + "slots": [ + { + "base": "Input_In_0", + "details": { + "name": "In" + } + }, + { + "base": "Output_Out_0", + "details": { + "name": "Out" + } + }, + { + "base": "DataInput_Source_0", + "details": { + "name": "Source" + } + }, + { + "base": "DataInput_Direction_1", + "details": { + "name": "Direction" + } + }, + { + "base": "DataInput_Distance_2", + "details": { + "name": "Distance" + } + }, + { + "base": "DataInput_Collision group_3", + "details": { + "name": "Collision group" + } + }, + { + "base": "DataInput_Ignore_4", + "details": { + "name": "Ignore" + } + }, + { + "base": "DataOutput_Object hit_0", + "details": { + "name": "Object hit" + } + }, + { + "base": "DataOutput_Position_1", + "details": { + "name": "Position" + } + }, + { + "base": "DataOutput_Normal_2", + "details": { + "name": "Normal" + } + }, + { + "base": "DataOutput_Distance_3", + "details": { + "name": "Distance" + } + }, + { + "base": "DataOutput_EntityId_4", + "details": { + "name": "EntityId" + } + }, + { + "base": "DataOutput_Surface_5", + "details": { + "name": "Surface" + } + } + ] + } + ] +} \ No newline at end of file diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/PhysXWorld_RayCastMultipleLocalSpaceWithGroup.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/PhysXWorld_RayCastMultipleLocalSpaceWithGroup.names new file mode 100644 index 0000000000..2744ac87d5 --- /dev/null +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/PhysXWorld_RayCastMultipleLocalSpaceWithGroup.names @@ -0,0 +1,64 @@ +{ + "entries": [ + { + "base": "{FB91B476-0015-508A-AC0B-18F8A860EB7A}", + "context": "ScriptCanvas::Node", + "variant": "", + "details": { + "name": "Ray Cast Multiple Local Space With Group", + "category": "PhysX/World", + "tooltip": "Returns all entities hit by a ray cast in local space from the source entity in the specified direction." + }, + "slots": [ + { + "base": "Input_In_0", + "details": { + "name": "In" + } + }, + { + "base": "Output_Out_0", + "details": { + "name": "Out" + } + }, + { + "base": "DataInput_Source_0", + "details": { + "name": "Source" + } + }, + { + "base": "DataInput_Direction_1", + "details": { + "name": "Direction" + } + }, + { + "base": "DataInput_Distance_2", + "details": { + "name": "Distance" + } + }, + { + "base": "DataInput_Collision group_3", + "details": { + "name": "Collision group" + } + }, + { + "base": "DataInput_Ignore_4", + "details": { + "name": "Ignore" + } + }, + { + "base": "DataOutput_Objects hit_0", + "details": { + "name": "Objects hit" + } + } + ] + } + ] +} \ No newline at end of file diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/PhysXWorld_RayCastWorldSpaceWithGroup.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/PhysXWorld_RayCastWorldSpaceWithGroup.names new file mode 100644 index 0000000000..98b20ea4f5 --- /dev/null +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/PhysXWorld_RayCastWorldSpaceWithGroup.names @@ -0,0 +1,94 @@ +{ + "entries": [ + { + "base": "{33EE1562-D9B5-5DA2-BB9E-F1F75B927B9C}", + "context": "ScriptCanvas::Node", + "variant": "", + "details": { + "name": "Ray Cast World Space With Group", + "category": "PhysX/World", + "tooltip": "Returns the first entity hit by a ray cast in world space from the start position in the specified direction." + }, + "slots": [ + { + "base": "Input_In_0", + "details": { + "name": "In" + } + }, + { + "base": "Output_Out_0", + "details": { + "name": "Out" + } + }, + { + "base": "DataInput_Start_0", + "details": { + "name": "Start" + } + }, + { + "base": "DataInput_Direction_1", + "details": { + "name": "Direction" + } + }, + { + "base": "DataInput_Distance_2", + "details": { + "name": "Distance" + } + }, + { + "base": "DataInput_Collision group_3", + "details": { + "name": "Collision group" + } + }, + { + "base": "DataInput_Ignore_4", + "details": { + "name": "Ignore" + } + }, + { + "base": "DataOutput_Object hit_0", + "details": { + "name": "Object hit" + } + }, + { + "base": "DataOutput_Position_1", + "details": { + "name": "Position" + } + }, + { + "base": "DataOutput_Normal_2", + "details": { + "name": "Normal" + } + }, + { + "base": "DataOutput_Distance_3", + "details": { + "name": "Distance" + } + }, + { + "base": "DataOutput_EntityId_4", + "details": { + "name": "EntityId" + } + }, + { + "base": "DataOutput_Surface_5", + "details": { + "name": "Surface" + } + } + ] + } + ] +} \ No newline at end of file diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/PhysXWorld_SphereCastWithGroup.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/PhysXWorld_SphereCastWithGroup.names new file mode 100644 index 0000000000..7b6c389171 --- /dev/null +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/PhysXWorld_SphereCastWithGroup.names @@ -0,0 +1,100 @@ +{ + "entries": [ + { + "base": "{FF1EE92C-FD34-51E9-B128-00595ABB78E6}", + "context": "ScriptCanvas::Node", + "variant": "", + "details": { + "name": "Sphere Cast With Group", + "category": "PhysX/World", + "tooltip": "SphereCast" + }, + "slots": [ + { + "base": "Input_In_0", + "details": { + "name": "In" + } + }, + { + "base": "Output_Out_0", + "details": { + "name": "Out" + } + }, + { + "base": "DataInput_Distance_0", + "details": { + "name": "Distance" + } + }, + { + "base": "DataInput_Pose_1", + "details": { + "name": "Pose" + } + }, + { + "base": "DataInput_Direction_2", + "details": { + "name": "Direction" + } + }, + { + "base": "DataInput_Radius_3", + "details": { + "name": "Radius" + } + }, + { + "base": "DataInput_Collision group_4", + "details": { + "name": "Collision group" + } + }, + { + "base": "DataInput_Ignore_5", + "details": { + "name": "Ignore" + } + }, + { + "base": "DataOutput_Object Hit_0", + "details": { + "name": "Object Hit" + } + }, + { + "base": "DataOutput_Position_1", + "details": { + "name": "Position" + } + }, + { + "base": "DataOutput_Normal_2", + "details": { + "name": "Normal" + } + }, + { + "base": "DataOutput_Distance_3", + "details": { + "name": "Distance" + } + }, + { + "base": "DataOutput_EntityId_4", + "details": { + "name": "EntityId" + } + }, + { + "base": "DataOutput_Surface_5", + "details": { + "name": "Surface" + } + } + ] + } + ] +} \ No newline at end of file diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/Spawning_Spawn.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/Spawning_Spawn.names new file mode 100644 index 0000000000..5588c71675 --- /dev/null +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/Spawning_Spawn.names @@ -0,0 +1,58 @@ +{ + "entries": [ + { + "base": "{2447798B-B970-FDBA-A2E2-B563513663F0}", + "context": "ScriptCanvas::Node", + "variant": "", + "details": { + "name": "Spawn", + "category": "Spawning", + "tooltip": "Spawns a selected prefab, positioned using the provided transform inputs" + }, + "slots": [ + { + "base": "Input_Request Spawn_0", + "details": { + "name": "Request Spawn" + } + }, + { + "base": "DataInput_Translation_0", + "details": { + "name": "Translation" + } + }, + { + "base": "DataInput_Rotation_1", + "details": { + "name": "Rotation" + } + }, + { + "base": "DataInput_Scale_2", + "details": { + "name": "Scale" + } + }, + { + "base": "Output_Spawn Requested_0", + "details": { + "name": "Spawn Requested" + } + }, + { + "base": "Output_On Spawn_1", + "details": { + "name": "On Spawn" + } + }, + { + "base": "DataOutput_SpawnedEntitiesList_0", + "details": { + "name": "SpawnedEntitiesList" + } + } + ] + } + ] +} \ No newline at end of file diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/String_BuildString.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/String_BuildString.names new file mode 100644 index 0000000000..6eaa6a08b4 --- /dev/null +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/String_BuildString.names @@ -0,0 +1,41 @@ +{ + "entries": [ + { + "base": "{B16259BA-9CF6-4143-B09B-5A0F3B4585E6}", + "context": "ScriptCanvas::Node", + "variant": "", + "details": { + "name": "Build String", + "category": "String", + "tooltip": "Formats and creates a string from the provided text.\nAny word within {} will create a data pin on this node." + }, + "slots": [ + { + "base": "Input_In_0", + "details": { + "name": "In", + "tooltip": "Input signal" + } + }, + { + "base": "Output_Out_0", + "details": { + "name": "Out" + } + }, + { + "base": "DataInput_Value_0", + "details": { + "name": "Value" + } + }, + { + "base": "DataOutput_String_0", + "details": { + "name": "String" + } + } + ] + } + ] +} \ No newline at end of file diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/String_ContainsString.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/String_ContainsString.names new file mode 100644 index 0000000000..b882e8a505 --- /dev/null +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/String_ContainsString.names @@ -0,0 +1,67 @@ +{ + "entries": [ + { + "base": "{8481E892-DE37-4CCF-86AA-E4770DE90643}", + "context": "ScriptCanvas::Node", + "variant": "", + "details": { + "name": "Contains String", + "category": "String", + "tooltip": "Checks if a string contains an instance of a specified string, if true, it returns the index to the first instance matched." + }, + "slots": [ + { + "base": "DataInput_Source_0", + "details": { + "name": "Source" + } + }, + { + "base": "DataInput_Pattern_1", + "details": { + "name": "Pattern" + } + }, + { + "base": "DataInput_Search From End_2", + "details": { + "name": "Search From End" + } + }, + { + "base": "DataInput_Case Sensitive_3", + "details": { + "name": "Case Sensitive" + } + }, + { + "base": "DataOutput_Index_0", + "details": { + "name": "Index" + } + }, + { + "base": "Input_In_0", + "details": { + "name": "In", + "tooltip": "Input signal" + } + }, + { + "base": "Output_True_0", + "details": { + "name": "True", + "tooltip": "The string contains the provided pattern." + } + }, + { + "base": "Output_False_1", + "details": { + "name": "False", + "tooltip": "The string did not contain the provided pattern." + } + } + ] + } + ] +} \ No newline at end of file diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/String_EndsWith.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/String_EndsWith.names new file mode 100644 index 0000000000..22857d3f5e --- /dev/null +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/String_EndsWith.names @@ -0,0 +1,53 @@ +{ + "entries": [ + { + "base": "{6C1CECA6-C155-4ED5-96BC-1D4F11C7A0FE}", + "context": "ScriptCanvas::Node", + "variant": "", + "details": { + "name": "Ends With", + "category": "String", + "tooltip": "." + }, + "slots": [ + { + "base": "DataInput_Source_0", + "details": { + "name": "Source" + } + }, + { + "base": "DataInput_Pattern_1", + "details": { + "name": "Pattern" + } + }, + { + "base": "DataInput_Case Sensitive_2", + "details": { + "name": "Case Sensitive" + } + }, + { + "base": "Input_In_0", + "details": { + "name": "In", + "tooltip": "Input signal" + } + }, + { + "base": "Output_True_0", + "details": { + "name": "True" + } + }, + { + "base": "Output_False_1", + "details": { + "name": "False" + } + } + ] + } + ] +} \ No newline at end of file diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/String_Join.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/String_Join.names new file mode 100644 index 0000000000..ef38e1a991 --- /dev/null +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/String_Join.names @@ -0,0 +1,47 @@ +{ + "entries": [ + { + "base": "{121E5B89-5A8A-4477-A3B7-078B0F1B36FD}", + "context": "ScriptCanvas::Node", + "variant": "", + "details": { + "name": "Join", + "category": "String", + "tooltip": "." + }, + "slots": [ + { + "base": "DataInput_String Array_0", + "details": { + "name": "String Array" + } + }, + { + "base": "DataInput_Separator_1", + "details": { + "name": "Separator" + } + }, + { + "base": "DataOutput_String_0", + "details": { + "name": "String" + } + }, + { + "base": "Input_In_0", + "details": { + "name": "In", + "tooltip": "Input signal" + } + }, + { + "base": "Output_Out_0", + "details": { + "name": "Out" + } + } + ] + } + ] +} \ No newline at end of file diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/String_ReplaceString.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/String_ReplaceString.names new file mode 100644 index 0000000000..601c05c89c --- /dev/null +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/String_ReplaceString.names @@ -0,0 +1,59 @@ +{ + "entries": [ + { + "base": "{197D0BAA-FCAF-4922-872B-3A95BEA574B2}", + "context": "ScriptCanvas::Node", + "variant": "", + "details": { + "name": "Replace String", + "category": "String", + "tooltip": "Allows replacing a substring from a given string." + }, + "slots": [ + { + "base": "DataInput_Source_0", + "details": { + "name": "Source" + } + }, + { + "base": "DataInput_Replace_1", + "details": { + "name": "Replace" + } + }, + { + "base": "DataInput_With_2", + "details": { + "name": "With" + } + }, + { + "base": "DataInput_Case Sensitive_3", + "details": { + "name": "Case Sensitive" + } + }, + { + "base": "DataOutput_Result_0", + "details": { + "name": "Result" + } + }, + { + "base": "Input_In_0", + "details": { + "name": "In", + "tooltip": "Input signal" + } + }, + { + "base": "Output_Out_0", + "details": { + "name": "Out" + } + } + ] + } + ] +} \ No newline at end of file diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/String_Split.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/String_Split.names new file mode 100644 index 0000000000..6a2943bf0f --- /dev/null +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/String_Split.names @@ -0,0 +1,47 @@ +{ + "entries": [ + { + "base": "{327EFC0F-F71E-4028-BAF9-C4223B933FB6}", + "context": "ScriptCanvas::Node", + "variant": "", + "details": { + "name": "Split", + "category": "String", + "tooltip": "." + }, + "slots": [ + { + "base": "DataInput_Source_0", + "details": { + "name": "Source" + } + }, + { + "base": "DataInput_Delimiters_1", + "details": { + "name": "Delimiters" + } + }, + { + "base": "DataOutput_String Array_0", + "details": { + "name": "String Array" + } + }, + { + "base": "Input_In_0", + "details": { + "name": "In", + "tooltip": "Input signal" + } + }, + { + "base": "Output_Out_0", + "details": { + "name": "Out" + } + } + ] + } + ] +} \ No newline at end of file diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/String_StartsWith.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/String_StartsWith.names new file mode 100644 index 0000000000..a3a17b4ff7 --- /dev/null +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/String_StartsWith.names @@ -0,0 +1,53 @@ +{ + "entries": [ + { + "base": "{60EB479A-CF31-4734-B2E5-422828A54A46}", + "context": "ScriptCanvas::Node", + "variant": "", + "details": { + "name": "Starts With", + "category": "String", + "tooltip": "." + }, + "slots": [ + { + "base": "DataInput_Source_0", + "details": { + "name": "Source" + } + }, + { + "base": "DataInput_Pattern_1", + "details": { + "name": "Pattern" + } + }, + { + "base": "DataInput_Case Sensitive_2", + "details": { + "name": "Case Sensitive" + } + }, + { + "base": "Input_In_0", + "details": { + "name": "In", + "tooltip": "Input signal" + } + }, + { + "base": "Output_True_0", + "details": { + "name": "True" + } + }, + { + "base": "Output_False_1", + "details": { + "name": "False" + } + } + ] + } + ] +} \ No newline at end of file diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/String_Substring.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/String_Substring.names new file mode 100644 index 0000000000..5f489934bd --- /dev/null +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/String_Substring.names @@ -0,0 +1,52 @@ +{ + "entries": [ + { + "base": "{F57D790D-01D5-5241-865C-3348CCB3536B}", + "context": "ScriptCanvas::Node", + "variant": "", + "details": { + "name": "Substring", + "category": "String", + "tooltip": "Returns a sub string from a given string" + }, + "slots": [ + { + "base": "Input_In_0", + "details": { + "name": "In" + } + }, + { + "base": "Output_Out_0", + "details": { + "name": "Out" + } + }, + { + "base": "DataInput_Source_0", + "details": { + "name": "Source" + } + }, + { + "base": "DataInput_From_1", + "details": { + "name": "From" + } + }, + { + "base": "DataInput_Length_2", + "details": { + "name": "Length" + } + }, + { + "base": "DataOutput_Result_0", + "details": { + "name": "Result" + } + } + ] + } + ] +} \ No newline at end of file diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/String_ToLower.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/String_ToLower.names new file mode 100644 index 0000000000..3ec07352e0 --- /dev/null +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/String_ToLower.names @@ -0,0 +1,40 @@ +{ + "entries": [ + { + "base": "{B81632B7-AE9E-50D1-9F19-00F92F77B580}", + "context": "ScriptCanvas::Node", + "variant": "", + "details": { + "name": "To Lower", + "category": "String", + "tooltip": "Makes all the characters in the string lower case" + }, + "slots": [ + { + "base": "Input_In_0", + "details": { + "name": "In" + } + }, + { + "base": "Output_Out_0", + "details": { + "name": "Out" + } + }, + { + "base": "DataInput_Source_0", + "details": { + "name": "Source" + } + }, + { + "base": "DataOutput_Result_0", + "details": { + "name": "Result" + } + } + ] + } + ] +} \ No newline at end of file diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/String_ToUpper.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/String_ToUpper.names new file mode 100644 index 0000000000..62089de059 --- /dev/null +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/String_ToUpper.names @@ -0,0 +1,40 @@ +{ + "entries": [ + { + "base": "{3AB66179-2097-5C83-BA8F-B8BD1D75D1CA}", + "context": "ScriptCanvas::Node", + "variant": "", + "details": { + "name": "To Upper", + "category": "String", + "tooltip": "Makes all the characters in the string upper case" + }, + "slots": [ + { + "base": "Input_In_0", + "details": { + "name": "In" + } + }, + { + "base": "Output_Out_0", + "details": { + "name": "Out" + } + }, + { + "base": "DataInput_Source_0", + "details": { + "name": "Source" + } + }, + { + "base": "DataOutput_Result_0", + "details": { + "name": "Result" + } + } + ] + } + ] +} \ No newline at end of file diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/Tests_BranchInputTypeExample.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/Tests_BranchInputTypeExample.names new file mode 100644 index 0000000000..4fd4b95308 --- /dev/null +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/Tests_BranchInputTypeExample.names @@ -0,0 +1,71 @@ +{ + "entries": [ + { + "base": "{FDD3D684-2C9A-0C05-D2A3-FD67685D8F26}", + "context": "ScriptCanvas::Node", + "variant": "", + "details": { + "name": "BranchInputTypeExample", + "category": "Tests", + "tooltip": "Example of branch passing as input by value, pointer and reference.", + "subtitle": "Tests" + }, + "slots": [ + { + "base": "Input_Get Internal Vector", + "details": { + "name": "Get Internal Vector" + } + }, + { + "base": "Output_On Get Internal Vector", + "details": { + "name": "On Get Internal Vector" + } + }, + { + "base": "DataOutput_Result", + "details": { + "name": "Result" + } + }, + { + "base": "Input_Branches On Input Type", + "details": { + "name": "Branches On Input Type" + } + }, + { + "base": "DataInput_Input Type", + "details": { + "name": "Input Type" + } + }, + { + "base": "Output_By Value", + "details": { + "name": "By Value" + } + }, + { + "base": "DataOutput_Value Input", + "details": { + "name": "Value Input" + } + }, + { + "base": "Output_By Pointer", + "details": { + "name": "By Pointer" + } + }, + { + "base": "DataOutput_Pointer Input", + "details": { + "name": "Pointer Input" + } + } + ] + } + ] +} \ No newline at end of file diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/Tests_BranchMethodSharedDataSlotExample.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/Tests_BranchMethodSharedDataSlotExample.names new file mode 100644 index 0000000000..6b966bfb55 --- /dev/null +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/Tests_BranchMethodSharedDataSlotExample.names @@ -0,0 +1,76 @@ +{ + "entries": [ + { + "base": "{131C7ECE-D083-F7CD-09FC-EE0FCF80AB86}", + "context": "ScriptCanvas::Node", + "variant": "", + "details": { + "name": "Branch Method Shared Data Slot Example", + "category": "Tests", + "tooltip": "Branch Test" + }, + "slots": [ + { + "base": "Output_One String_0", + "details": { + "name": "One String" + } + }, + { + "base": "DataOutput_string_0", + "details": { + "name": "string" + } + }, + { + "base": "Output_Two Strings_1", + "details": { + "name": "Two Strings" + } + }, + { + "base": "DataOutput_string1_1", + "details": { + "name": "string1" + } + }, + { + "base": "DataOutput_string2_2", + "details": { + "name": "string2" + } + }, + { + "base": "Output_Three Strings_2", + "details": { + "name": "Three Strings" + } + }, + { + "base": "DataOutput_string3_3", + "details": { + "name": "string3" + } + }, + { + "base": "Output_Square_3", + "details": { + "name": "Square" + } + }, + { + "base": "Output_Pants_4", + "details": { + "name": "Pants" + } + }, + { + "base": "Output_Hello_5", + "details": { + "name": "Hello" + } + } + ] + } + ] +} \ No newline at end of file diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/Tests_InputMethodSharedDataSlotExample.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/Tests_InputMethodSharedDataSlotExample.names new file mode 100644 index 0000000000..c88f0fea97 --- /dev/null +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/Tests_InputMethodSharedDataSlotExample.names @@ -0,0 +1,82 @@ +{ + "entries": [ + { + "base": "{32B1B2DB-59E6-88D7-14A3-9C5366A39A81}", + "context": "ScriptCanvas::Node", + "variant": "", + "details": { + "name": "Input Method Shared Data Slot Example", + "category": "Tests", + "tooltip": "Input Method Shared Data" + }, + "slots": [ + { + "base": "Input_Append Hello_0", + "details": { + "name": "Append Hello" + } + }, + { + "base": "DataInput_str_0", + "details": { + "name": "str" + } + }, + { + "base": "Output_On Append Hello_0", + "details": { + "name": "On Append Hello" + } + }, + { + "base": "DataOutput_Output_0", + "details": { + "name": "Output" + } + }, + { + "base": "Input_Concatenate Two_1", + "details": { + "name": "Concatenate Two" + } + }, + { + "base": "DataInput_a_1", + "details": { + "name": "a" + } + }, + { + "base": "DataInput_b_2", + "details": { + "name": "b" + } + }, + { + "base": "Output_On Concatenate Two_1", + "details": { + "name": "On Concatenate Two" + } + }, + { + "base": "Input_Concatenate Three_2", + "details": { + "name": "Concatenate Three" + } + }, + { + "base": "DataInput_c_3", + "details": { + "name": "c" + } + }, + { + "base": "Output_On Concatenate Three_2", + "details": { + "name": "On Concatenate Three" + } + } + ] + } + ] +} \ No newline at end of file diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/Timing_Delay.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/Timing_Delay.names new file mode 100644 index 0000000000..ac6387256c --- /dev/null +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/Timing_Delay.names @@ -0,0 +1,107 @@ +{ + "entries": [ + { + "base": "{233C84A7-44DE-A948-D65C-46C11F1F7162}", + "context": "ScriptCanvas::Node", + "variant": "", + "details": { + "name": "Delay", + "category": "Timing", + "tooltip": "While active, will signal the output at the given interval." + }, + "slots": [ + { + "base": "Input_Start_0", + "details": { + "name": "Start", + "tooltip": "When signaled, execution is delayed at this node according to the specified properties." + } + }, + { + "base": "DataInput_Start: Time_0", + "details": { + "name": "Start: Time" + } + }, + { + "base": "DataInput_Start: Loop_1", + "details": { + "name": "Start: Loop" + } + }, + { + "base": "DataInput_Start: Hold_2", + "details": { + "name": "Start: Hold" + } + }, + { + "base": "Output_On Start_0", + "details": { + "name": "On Start", + "tooltip": "When signaled, execution is delayed at this node according to the specified properties." + } + }, + { + "base": "Input_Reset_1", + "details": { + "name": "Reset", + "tooltip": "When signaled, execution is delayed at this node according to the specified properties." + } + }, + { + "base": "DataInput_Reset: Time_3", + "details": { + "name": "Reset: Time" + } + }, + { + "base": "DataInput_Reset: Loop_4", + "details": { + "name": "Reset: Loop" + } + }, + { + "base": "DataInput_Reset: Hold_5", + "details": { + "name": "Reset: Hold" + } + }, + { + "base": "Output_On Reset_1", + "details": { + "name": "On Reset", + "tooltip": "When signaled, execution is delayed at this node according to the specified properties." + } + }, + { + "base": "Input_Cancel_2", + "details": { + "name": "Cancel", + "tooltip": "Cancels the current delay." + } + }, + { + "base": "Output_On Cancel_2", + "details": { + "name": "On Cancel", + "tooltip": "Cancels the current delay." + } + }, + { + "base": "Output_Done_3", + "details": { + "name": "Done", + "tooltip": "Signaled when the delay reaches zero." + } + }, + { + "base": "DataOutput_Elapsed_0", + "details": { + "name": "Elapsed" + } + } + ] + } + ] +} \ No newline at end of file diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/Timing_Duration.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/Timing_Duration.names new file mode 100644 index 0000000000..280ef54ea0 --- /dev/null +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/Timing_Duration.names @@ -0,0 +1,49 @@ +{ + "entries": [ + { + "base": "{D93538FF-3553-4C65-AB81-9089C5270214}", + "context": "ScriptCanvas::Node", + "variant": "", + "details": { + "name": "Duration", + "category": "Timing", + "tooltip": "Triggers a signal every frame during the specified duration." + }, + "slots": [ + { + "base": "DataInput_Duration_0", + "details": { + "name": "Duration" + } + }, + { + "base": "DataOutput_Elapsed_0", + "details": { + "name": "Elapsed" + } + }, + { + "base": "Input_Start_0", + "details": { + "name": "Start", + "tooltip": "Starts the countdown" + } + }, + { + "base": "Output_Out_0", + "details": { + "name": "Out", + "tooltip": "Signaled every frame while the duration is active." + } + }, + { + "base": "Output_Done_1", + "details": { + "name": "Done", + "tooltip": "Signaled once the duration is complete." + } + } + ] + } + ] +} \ No newline at end of file diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/Timing_HeartBeat.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/Timing_HeartBeat.names new file mode 100644 index 0000000000..6f5f2a3f24 --- /dev/null +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/Timing_HeartBeat.names @@ -0,0 +1,40 @@ +{ + "entries": [ + { + "base": "{BA107060-249D-4818-9CEC-7573718273FC}", + "context": "ScriptCanvas::Node", + "variant": "", + "details": { + "name": "Heart Beat", + "category": "Timing", + "tooltip": "While active, will signal the output at the given interval." + }, + "slots": [ + { + "base": "Input_Start_0", + "details": { + "name": "Start" + } + }, + { + "base": "Input_Stop_1", + "details": { + "name": "Stop" + } + }, + { + "base": "Output_Pulse_0", + "details": { + "name": "Pulse" + } + }, + { + "base": "DataInput_Interval_0", + "details": { + "name": "Interval" + } + } + ] + } + ] +} \ No newline at end of file diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/Timing_OnGraphStart.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/Timing_OnGraphStart.names new file mode 100644 index 0000000000..b723bc06e1 --- /dev/null +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/Timing_OnGraphStart.names @@ -0,0 +1,23 @@ +{ + "entries": [ + { + "base": "{F200B22A-5903-483A-BF63-5241BC03632B}", + "context": "ScriptCanvas::Node", + "variant": "", + "details": { + "name": "On Graph Start", + "category": "Timing", + "tooltip": "Starts executing the graph when the entity that owns the graph is fully activated." + }, + "slots": [ + { + "base": "Output_Out_0", + "details": { + "name": "Out", + "tooltip": "Signaled when the entity that owns this graph is fully activated." + } + } + ] + } + ] +} \ No newline at end of file diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/Timing_TickDelay.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/Timing_TickDelay.names new file mode 100644 index 0000000000..d0dcd75f85 --- /dev/null +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/Timing_TickDelay.names @@ -0,0 +1,42 @@ +{ + "entries": [ + { + "base": "{399A2608-77E3-41F9-90FA-58A9B6E0E34D}", + "context": "ScriptCanvas::Node", + "variant": "", + "details": { + "name": "Tick Delay", + "category": "Timing", + "tooltip": "Delays all incoming execution for the specified number of ticks" + }, + "slots": [ + { + "base": "DataInput_Ticks_0", + "details": { + "name": "Ticks" + } + }, + { + "base": "DataInput_Tick Order_1", + "details": { + "name": "Tick Order" + } + }, + { + "base": "Input_In_0", + "details": { + "name": "In", + "tooltip": "When signaled, execution is delayed at this node for the specified amount of frames." + } + }, + { + "base": "Output_Out_0", + "details": { + "name": "Out", + "tooltip": "Signaled after waiting for the specified amount of frames." + } + } + ] + } + ] +} \ No newline at end of file diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/Timing_TimeDelay.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/Timing_TimeDelay.names new file mode 100644 index 0000000000..3a83df9031 --- /dev/null +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/Timing_TimeDelay.names @@ -0,0 +1,36 @@ +{ + "entries": [ + { + "base": "{364F5AC9-8351-44B6-A069-03367B21F7AA}", + "context": "ScriptCanvas::Node", + "variant": "", + "details": { + "name": "Time Delay", + "category": "Timing", + "tooltip": "Delays all incoming execution for the specified number of ticks" + }, + "slots": [ + { + "base": "Input_In_0", + "details": { + "name": "In", + "tooltip": "When signaled, execution is delayed at this node for the specified amount of times." + } + }, + { + "base": "Output_Out_0", + "details": { + "name": "Out", + "tooltip": "Signaled after waiting for the specified amount of times." + } + }, + { + "base": "DataInput_Delay_0", + "details": { + "name": "Delay" + } + } + ] + } + ] +} \ No newline at end of file diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/Timing_Timer.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/Timing_Timer.names new file mode 100644 index 0000000000..8d5bc6e536 --- /dev/null +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/Timing_Timer.names @@ -0,0 +1,63 @@ +{ + "entries": [ + { + "base": "{32A4BEDC-C207-4472-61DE-9A716402620A}", + "context": "ScriptCanvas::Node", + "variant": "", + "details": { + "name": "Timer", + "category": "Timing", + "tooltip": "While active, will signal the output at the given interval." + }, + "slots": [ + { + "base": "Input_Start_0", + "details": { + "name": "Start", + "tooltip": "Starts the timer" + } + }, + { + "base": "Output_On Start_0", + "details": { + "name": "On Start", + "tooltip": "Starts the timer" + } + }, + { + "base": "Input_Stop_1", + "details": { + "name": "Stop", + "tooltip": "Stops the timer" + } + }, + { + "base": "Output_On Stop_1", + "details": { + "name": "On Stop", + "tooltip": "Stops the timer" + } + }, + { + "base": "Output_On Tick_2", + "details": { + "name": "On Tick", + "tooltip": "Signaled at each tick while the timer is in operation." + } + }, + { + "base": "DataOutput_Milliseconds_0", + "details": { + "name": "Milliseconds" + } + }, + { + "base": "DataOutput_Seconds_1", + "details": { + "name": "Seconds" + } + } + ] + } + ] +} \ No newline at end of file diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/Uncategorized_ArithmeticExpression.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/Uncategorized_ArithmeticExpression.names new file mode 100644 index 0000000000..4b867599f9 --- /dev/null +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/Uncategorized_ArithmeticExpression.names @@ -0,0 +1,47 @@ +{ + "entries": [ + { + "base": "{B13F8DE1-E017-484D-9910-BABFB355D72E}", + "context": "ScriptCanvas::Node", + "variant": "", + "details": { + "name": "Arithmetic Expression", + "tooltip": "ArithmeticExpression" + }, + "slots": [ + { + "base": "DataOutput_Result_0", + "details": { + "name": "Result" + } + }, + { + "base": "Input_In_0", + "details": { + "name": "In", + "tooltip": "Signal to perform the evaluation when desired." + } + }, + { + "base": "Output_Out_0", + "details": { + "name": "Out", + "tooltip": "Signaled after the arithmetic operation is done." + } + }, + { + "base": "DataInput_Value A_0", + "details": { + "name": "Value A" + } + }, + { + "base": "DataInput_Value B_1", + "details": { + "name": "Value B" + } + } + ] + } + ] +} \ No newline at end of file diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/Uncategorized_BinaryOperator.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/Uncategorized_BinaryOperator.names new file mode 100644 index 0000000000..44eaa0b48f --- /dev/null +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/Uncategorized_BinaryOperator.names @@ -0,0 +1,22 @@ +{ + "entries": [ + { + "base": "{5BD0E8C7-9B0A-42F5-9EB0-199E6EC8FA99}", + "context": "ScriptCanvas::Node", + "variant": "", + "details": { + "name": "Binary Operator", + "tooltip": "BinaryOperator" + }, + "slots": [ + { + "base": "Input_In_0", + "details": { + "name": "In", + "tooltip": "Signal to perform the evaluation when desired." + } + } + ] + } + ] +} \ No newline at end of file diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/Uncategorized_BooleanExpression.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/Uncategorized_BooleanExpression.names new file mode 100644 index 0000000000..6309542f71 --- /dev/null +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/Uncategorized_BooleanExpression.names @@ -0,0 +1,42 @@ +{ + "entries": [ + { + "base": "{36C69825-CFF8-4F70-8F3B-1A9227E8BEEA}", + "context": "ScriptCanvas::Node", + "variant": "", + "details": { + "name": "Boolean Expression", + "tooltip": "BooleanExpression" + }, + "slots": [ + { + "base": "DataOutput_Result_0", + "details": { + "name": "Result" + } + }, + { + "base": "Input_In_0", + "details": { + "name": "In", + "tooltip": "Signal to perform the evaluation when desired." + } + }, + { + "base": "Output_True_0", + "details": { + "name": "True", + "tooltip": "Signaled if the result of the operation is true." + } + }, + { + "base": "Output_False_1", + "details": { + "name": "False", + "tooltip": "Signaled if the result of the operation is false." + } + } + ] + } + ] +} \ No newline at end of file diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/Uncategorized_ComparisonExpression.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/Uncategorized_ComparisonExpression.names new file mode 100644 index 0000000000..a99ea08c00 --- /dev/null +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/Uncategorized_ComparisonExpression.names @@ -0,0 +1,54 @@ +{ + "entries": [ + { + "base": "{82C50EAD-D3DD-45D2-BFCE-981D95771DC8}", + "context": "ScriptCanvas::Node", + "variant": "", + "details": { + "name": "Comparison Expression", + "tooltip": "ComparisonExpression" + }, + "slots": [ + { + "base": "DataOutput_Result_0", + "details": { + "name": "Result" + } + }, + { + "base": "Input_In_0", + "details": { + "name": "In", + "tooltip": "Signal to perform the evaluation when desired." + } + }, + { + "base": "Output_True_0", + "details": { + "name": "True", + "tooltip": "Signaled if the result of the operation is true." + } + }, + { + "base": "Output_False_1", + "details": { + "name": "False", + "tooltip": "Signaled if the result of the operation is false." + } + }, + { + "base": "DataInput_Value A_0", + "details": { + "name": "Value A" + } + }, + { + "base": "DataInput_Value B_1", + "details": { + "name": "Value B" + } + } + ] + } + ] +} \ No newline at end of file diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/Uncategorized_EqualityExpression.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/Uncategorized_EqualityExpression.names new file mode 100644 index 0000000000..d53cb9357a --- /dev/null +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/Uncategorized_EqualityExpression.names @@ -0,0 +1,54 @@ +{ + "entries": [ + { + "base": "{78D20EB6-BA07-4071-B646-7C2D68A0A4A6}", + "context": "ScriptCanvas::Node", + "variant": "", + "details": { + "name": "Equality Expression", + "tooltip": "EqualityExpression" + }, + "slots": [ + { + "base": "DataOutput_Result_0", + "details": { + "name": "Result" + } + }, + { + "base": "Input_In_0", + "details": { + "name": "In", + "tooltip": "Signal to perform the evaluation when desired." + } + }, + { + "base": "Output_True_0", + "details": { + "name": "True", + "tooltip": "Signaled if the result of the operation is true." + } + }, + { + "base": "Output_False_1", + "details": { + "name": "False", + "tooltip": "Signaled if the result of the operation is false." + } + }, + { + "base": "DataInput_Value A_0", + "details": { + "name": "Value A" + } + }, + { + "base": "DataInput_Value B_1", + "details": { + "name": "Value B" + } + } + ] + } + ] +} \ No newline at end of file diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/Uncategorized_GetVariable.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/Uncategorized_GetVariable.names new file mode 100644 index 0000000000..1f2b2061f4 --- /dev/null +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/Uncategorized_GetVariable.names @@ -0,0 +1,29 @@ +{ + "entries": [ + { + "base": "{8225BE35-4C45-4A32-94D9-3DE114F6F5AF}", + "context": "ScriptCanvas::Node", + "variant": "", + "details": { + "name": "Get Variable", + "tooltip": "Node for referencing a property within the graph" + }, + "slots": [ + { + "base": "Input_In_0", + "details": { + "name": "In", + "tooltip": "When signaled sends the property referenced by this node to a Data Output slot" + } + }, + { + "base": "Output_Out_0", + "details": { + "name": "Out", + "tooltip": "Signaled after the referenced property has been pushed to the Data Output slot" + } + } + ] + } + ] +} \ No newline at end of file diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/Uncategorized_NodeableNode.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/Uncategorized_NodeableNode.names new file mode 100644 index 0000000000..3122d622eb --- /dev/null +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/Uncategorized_NodeableNode.names @@ -0,0 +1,13 @@ +{ + "entries": [ + { + "base": "{80351020-5778-491A-B6CA-C78364C19499}", + "context": "ScriptCanvas::Node", + "variant": "", + "details": { + "name": "Nodeable Node", + "tooltip": "NodeableNode" + } + } + ] +} \ No newline at end of file diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/Uncategorized_NodeableNodeOverloaded.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/Uncategorized_NodeableNodeOverloaded.names new file mode 100644 index 0000000000..0628ef14b2 --- /dev/null +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/Uncategorized_NodeableNodeOverloaded.names @@ -0,0 +1,13 @@ +{ + "entries": [ + { + "base": "{C5C21008-F0B8-4FC8-843E-9C5C50B9DCDC}", + "context": "ScriptCanvas::Node", + "variant": "", + "details": { + "name": "Nodeable Node Overloaded", + "tooltip": "NodeableNode" + } + } + ] +} \ No newline at end of file diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/Uncategorized_SetVariable.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/Uncategorized_SetVariable.names new file mode 100644 index 0000000000..e4050ce1f7 --- /dev/null +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/Uncategorized_SetVariable.names @@ -0,0 +1,29 @@ +{ + "entries": [ + { + "base": "{5EFD2942-AFF9-4137-939C-023AEAA72EB0}", + "context": "ScriptCanvas::Node", + "variant": "", + "details": { + "name": "Set Variable", + "tooltip": "Node for setting a property within the graph" + }, + "slots": [ + { + "base": "Input_In_0", + "details": { + "name": "In", + "tooltip": "When signaled sends the variable referenced by this node to a Data Output slot" + } + }, + { + "base": "Output_Out_0", + "details": { + "name": "Out", + "tooltip": "Signaled after the referenced variable has been pushed to the Data Output slot" + } + } + ] + } + ] +} \ No newline at end of file diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/Uncategorized_UnaryExpression.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/Uncategorized_UnaryExpression.names new file mode 100644 index 0000000000..33fab189e4 --- /dev/null +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/Uncategorized_UnaryExpression.names @@ -0,0 +1,48 @@ +{ + "entries": [ + { + "base": "{70FF2162-3D01-41F1-B009-7DC071A38471}", + "context": "ScriptCanvas::Node", + "variant": "", + "details": { + "name": "Unary Expression", + "tooltip": "UnaryExpression" + }, + "slots": [ + { + "base": "DataInput_Value_0", + "details": { + "name": "Value" + } + }, + { + "base": "DataOutput_Result_0", + "details": { + "name": "Result" + } + }, + { + "base": "Input_In_0", + "details": { + "name": "In", + "tooltip": "Signal to perform the evaluation when desired." + } + }, + { + "base": "Output_True_0", + "details": { + "name": "True", + "tooltip": "Signaled if the result of the operation is true." + } + }, + { + "base": "Output_False_1", + "details": { + "name": "False", + "tooltip": "Signaled if the result of the operation is false." + } + } + ] + } + ] +} \ No newline at end of file diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/Uncategorized_UnaryOperator.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/Uncategorized_UnaryOperator.names new file mode 100644 index 0000000000..6b51a011d9 --- /dev/null +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/Uncategorized_UnaryOperator.names @@ -0,0 +1,22 @@ +{ + "entries": [ + { + "base": "{B0BF8615-D718-4115-B3D8-CAB554BC6863}", + "context": "ScriptCanvas::Node", + "variant": "", + "details": { + "name": "Unary Operator", + "tooltip": "UnaryOperator" + }, + "slots": [ + { + "base": "Input_In_0", + "details": { + "name": "In", + "tooltip": "Signal to perform the evaluation when desired." + } + } + ] + } + ] +} \ No newline at end of file diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/UtilitiesDebug_Print.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/UtilitiesDebug_Print.names new file mode 100644 index 0000000000..a78f033284 --- /dev/null +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/UtilitiesDebug_Print.names @@ -0,0 +1,35 @@ +{ + "entries": [ + { + "base": "{E1940FB4-83FE-4594-9AFF-375FF7603338}", + "context": "ScriptCanvas::Node", + "variant": "", + "details": { + "name": "Print", + "category": "Utilities/Debug", + "tooltip": "Formats and prints the provided text in the debug console.\nAny word within {} will create a data pin on this node." + }, + "slots": [ + { + "base": "Input_In_0", + "details": { + "name": "In", + "tooltip": "Input signal" + } + }, + { + "base": "DataInput_Value_0", + "details": { + "name": "Value" + } + }, + { + "base": "Output_Out_0", + "details": { + "name": "Out" + } + } + ] + } + ] +} \ No newline at end of file diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/UtilitiesUnitTesting_AddFailure.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/UtilitiesUnitTesting_AddFailure.names new file mode 100644 index 0000000000..7029cc839b --- /dev/null +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/UtilitiesUnitTesting_AddFailure.names @@ -0,0 +1,35 @@ +{ + "entries": [ + { + "base": "{1C4971A7-DE76-4E8E-9381-F579A57B2A78}", + "context": "ScriptCanvas::Node", + "variant": "", + "details": { + "name": "Add Failure", + "category": "Utilities/Unit Testing", + "tooltip": "adds a failure directly to the unit testing framework" + }, + "slots": [ + { + "base": "DataInput_Report_0", + "details": { + "name": "Report" + } + }, + { + "base": "Input_In_0", + "details": { + "name": "In", + "tooltip": "Input signal" + } + }, + { + "base": "Output_Out_0", + "details": { + "name": "Out" + } + } + ] + } + ] +} \ No newline at end of file diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/UtilitiesUnitTesting_AddSuccess.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/UtilitiesUnitTesting_AddSuccess.names new file mode 100644 index 0000000000..fb81c2fdef --- /dev/null +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/UtilitiesUnitTesting_AddSuccess.names @@ -0,0 +1,35 @@ +{ + "entries": [ + { + "base": "{0D5B9544-C36B-490F-899A-E260D8351620}", + "context": "ScriptCanvas::Node", + "variant": "", + "details": { + "name": "Add Success", + "category": "Utilities/Unit Testing", + "tooltip": "adds a success directly to the unit testing framework" + }, + "slots": [ + { + "base": "DataInput_Report_0", + "details": { + "name": "Report" + } + }, + { + "base": "Input_In_0", + "details": { + "name": "In", + "tooltip": "Input signal" + } + }, + { + "base": "Output_Out_0", + "details": { + "name": "Out" + } + } + ] + } + ] +} \ No newline at end of file diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/UtilitiesUnitTesting_Checkpoint.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/UtilitiesUnitTesting_Checkpoint.names new file mode 100644 index 0000000000..c80f59964a --- /dev/null +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/UtilitiesUnitTesting_Checkpoint.names @@ -0,0 +1,35 @@ +{ + "entries": [ + { + "base": "{E65449D2-45A9-402B-ADF7-4E4F27A99245}", + "context": "ScriptCanvas::Node", + "variant": "", + "details": { + "name": "Checkpoint", + "category": "Utilities/Unit Testing", + "tooltip": "Add a progress checkpoint for test debugging" + }, + "slots": [ + { + "base": "DataInput_Report_0", + "details": { + "name": "Report" + } + }, + { + "base": "Input_In_0", + "details": { + "name": "In", + "tooltip": "Input signal" + } + }, + { + "base": "Output_Out_0", + "details": { + "name": "Out" + } + } + ] + } + ] +} \ No newline at end of file diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/UtilitiesUnitTesting_ExpectEqual.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/UtilitiesUnitTesting_ExpectEqual.names new file mode 100644 index 0000000000..1ce3b3b1f2 --- /dev/null +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/UtilitiesUnitTesting_ExpectEqual.names @@ -0,0 +1,47 @@ +{ + "entries": [ + { + "base": "{856DB72A-48CB-4142-A032-1253D3AB8BEC}", + "context": "ScriptCanvas::Node", + "variant": "", + "details": { + "name": "Expect Equal", + "category": "Utilities/Unit Testing", + "tooltip": "Expects lhs equal to rhs" + }, + "slots": [ + { + "base": "DataInput_Report_0", + "details": { + "name": "Report" + } + }, + { + "base": "Input_In_0", + "details": { + "name": "In", + "tooltip": "Input signal" + } + }, + { + "base": "Output_Out_0", + "details": { + "name": "Out" + } + }, + { + "base": "DataInput_Candidate_1", + "details": { + "name": "Candidate" + } + }, + { + "base": "DataInput_Reference_2", + "details": { + "name": "Reference" + } + } + ] + } + ] +} \ No newline at end of file diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/UtilitiesUnitTesting_ExpectFalse.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/UtilitiesUnitTesting_ExpectFalse.names new file mode 100644 index 0000000000..cd6aca7679 --- /dev/null +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/UtilitiesUnitTesting_ExpectFalse.names @@ -0,0 +1,41 @@ +{ + "entries": [ + { + "base": "{3838E12C-CEAB-4CED-9958-B6C0399FCD92}", + "context": "ScriptCanvas::Node", + "variant": "", + "details": { + "name": "Expect False", + "category": "Utilities/Unit Testing", + "tooltip": "Expects a value to be false" + }, + "slots": [ + { + "base": "DataInput_Candidate_0", + "details": { + "name": "Candidate" + } + }, + { + "base": "DataInput_Report_1", + "details": { + "name": "Report" + } + }, + { + "base": "Input_In_0", + "details": { + "name": "In", + "tooltip": "Input signal" + } + }, + { + "base": "Output_Out_0", + "details": { + "name": "Out" + } + } + ] + } + ] +} \ No newline at end of file diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/UtilitiesUnitTesting_ExpectGreaterThan.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/UtilitiesUnitTesting_ExpectGreaterThan.names new file mode 100644 index 0000000000..fd1feee008 --- /dev/null +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/UtilitiesUnitTesting_ExpectGreaterThan.names @@ -0,0 +1,47 @@ +{ + "entries": [ + { + "base": "{8DD464A5-C09D-4017-82B7-B1EA672BA9EA}", + "context": "ScriptCanvas::Node", + "variant": "", + "details": { + "name": "Expect Greater Than", + "category": "Utilities/Unit Testing", + "tooltip": "Expects lhs to be greater than rhs" + }, + "slots": [ + { + "base": "DataInput_Report_0", + "details": { + "name": "Report" + } + }, + { + "base": "Input_In_0", + "details": { + "name": "In", + "tooltip": "Input signal" + } + }, + { + "base": "Output_Out_0", + "details": { + "name": "Out" + } + }, + { + "base": "DataInput_Candidate_1", + "details": { + "name": "Candidate" + } + }, + { + "base": "DataInput_Reference_2", + "details": { + "name": "Reference" + } + } + ] + } + ] +} \ No newline at end of file diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/UtilitiesUnitTesting_ExpectGreaterThanEqual.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/UtilitiesUnitTesting_ExpectGreaterThanEqual.names new file mode 100644 index 0000000000..35a1123f77 --- /dev/null +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/UtilitiesUnitTesting_ExpectGreaterThanEqual.names @@ -0,0 +1,47 @@ +{ + "entries": [ + { + "base": "{8EB4E313-1479-4428-AE0C-75F233C5F5EB}", + "context": "ScriptCanvas::Node", + "variant": "", + "details": { + "name": "Expect Greater Than Equal", + "category": "Utilities/Unit Testing", + "tooltip": "Expects lhs to be greater than rhs" + }, + "slots": [ + { + "base": "DataInput_Report_0", + "details": { + "name": "Report" + } + }, + { + "base": "Input_In_0", + "details": { + "name": "In", + "tooltip": "Input signal" + } + }, + { + "base": "Output_Out_0", + "details": { + "name": "Out" + } + }, + { + "base": "DataInput_Candidate_1", + "details": { + "name": "Candidate" + } + }, + { + "base": "DataInput_Reference_2", + "details": { + "name": "Reference" + } + } + ] + } + ] +} \ No newline at end of file diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/UtilitiesUnitTesting_ExpectLessThan.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/UtilitiesUnitTesting_ExpectLessThan.names new file mode 100644 index 0000000000..e2d3cb289d --- /dev/null +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/UtilitiesUnitTesting_ExpectLessThan.names @@ -0,0 +1,47 @@ +{ + "entries": [ + { + "base": "{693FD406-8735-4DBB-B0A8-39E7DA467559}", + "context": "ScriptCanvas::Node", + "variant": "", + "details": { + "name": "Expect Less Than", + "category": "Utilities/Unit Testing", + "tooltip": "Expects lhs to be less than rhs" + }, + "slots": [ + { + "base": "DataInput_Report_0", + "details": { + "name": "Report" + } + }, + { + "base": "Input_In_0", + "details": { + "name": "In", + "tooltip": "Input signal" + } + }, + { + "base": "Output_Out_0", + "details": { + "name": "Out" + } + }, + { + "base": "DataInput_Candidate_1", + "details": { + "name": "Candidate" + } + }, + { + "base": "DataInput_Reference_2", + "details": { + "name": "Reference" + } + } + ] + } + ] +} \ No newline at end of file diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/UtilitiesUnitTesting_ExpectLessThanEqual.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/UtilitiesUnitTesting_ExpectLessThanEqual.names new file mode 100644 index 0000000000..e5078ea233 --- /dev/null +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/UtilitiesUnitTesting_ExpectLessThanEqual.names @@ -0,0 +1,47 @@ +{ + "entries": [ + { + "base": "{52D4803F-6273-4A4E-96CC-F2892CFE433B}", + "context": "ScriptCanvas::Node", + "variant": "", + "details": { + "name": "Expect Less Than Equal", + "category": "Utilities/Unit Testing", + "tooltip": "Expects lhs to be greater than rhs" + }, + "slots": [ + { + "base": "DataInput_Report_0", + "details": { + "name": "Report" + } + }, + { + "base": "Input_In_0", + "details": { + "name": "In", + "tooltip": "Input signal" + } + }, + { + "base": "Output_Out_0", + "details": { + "name": "Out" + } + }, + { + "base": "DataInput_Candidate_1", + "details": { + "name": "Candidate" + } + }, + { + "base": "DataInput_Reference_2", + "details": { + "name": "Reference" + } + } + ] + } + ] +} \ No newline at end of file diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/UtilitiesUnitTesting_ExpectNotEqual.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/UtilitiesUnitTesting_ExpectNotEqual.names new file mode 100644 index 0000000000..518adf430e --- /dev/null +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/UtilitiesUnitTesting_ExpectNotEqual.names @@ -0,0 +1,47 @@ +{ + "entries": [ + { + "base": "{66334794-0F98-4BFC-9DB0-8AB6A4052D09}", + "context": "ScriptCanvas::Node", + "variant": "", + "details": { + "name": "Expect Not Equal", + "category": "Utilities/Unit Testing", + "tooltip": "Expects lhs not equal to rhs" + }, + "slots": [ + { + "base": "DataInput_Report_0", + "details": { + "name": "Report" + } + }, + { + "base": "Input_In_0", + "details": { + "name": "In", + "tooltip": "Input signal" + } + }, + { + "base": "Output_Out_0", + "details": { + "name": "Out" + } + }, + { + "base": "DataInput_Candidate_1", + "details": { + "name": "Candidate" + } + }, + { + "base": "DataInput_Reference_2", + "details": { + "name": "Reference" + } + } + ] + } + ] +} \ No newline at end of file diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/UtilitiesUnitTesting_ExpectTrue.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/UtilitiesUnitTesting_ExpectTrue.names new file mode 100644 index 0000000000..b78afd825a --- /dev/null +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/UtilitiesUnitTesting_ExpectTrue.names @@ -0,0 +1,41 @@ +{ + "entries": [ + { + "base": "{88F9BE2D-F591-45AD-9682-FBB67C39C504}", + "context": "ScriptCanvas::Node", + "variant": "", + "details": { + "name": "Expect True", + "category": "Utilities/Unit Testing", + "tooltip": "Expects a value to be true" + }, + "slots": [ + { + "base": "DataInput_Candidate_0", + "details": { + "name": "Candidate" + } + }, + { + "base": "DataInput_Report_1", + "details": { + "name": "Report" + } + }, + { + "base": "Input_In_0", + "details": { + "name": "In", + "tooltip": "Input signal" + } + }, + { + "base": "Output_Out_0", + "details": { + "name": "Out" + } + } + ] + } + ] +} \ No newline at end of file diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/UtilitiesUnitTesting_MarkComplete.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/UtilitiesUnitTesting_MarkComplete.names new file mode 100644 index 0000000000..b8b33eeff2 --- /dev/null +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/UtilitiesUnitTesting_MarkComplete.names @@ -0,0 +1,35 @@ +{ + "entries": [ + { + "base": "{DC0BCFE9-3066-4232-AA68-AAFB206C917F}", + "context": "ScriptCanvas::Node", + "variant": "", + "details": { + "name": "Mark Complete", + "category": "Utilities/Unit Testing", + "tooltip": "reports that the graph completed to the unit testing framework" + }, + "slots": [ + { + "base": "DataInput_Report_0", + "details": { + "name": "Report" + } + }, + { + "base": "Input_In_0", + "details": { + "name": "In", + "tooltip": "Input signal" + } + }, + { + "base": "Output_Out_0", + "details": { + "name": "Out" + } + } + ] + } + ] +} \ No newline at end of file diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/Utilities_BaseTimerNode.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/Utilities_BaseTimerNode.names new file mode 100644 index 0000000000..88167b2d3e --- /dev/null +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/Utilities_BaseTimerNode.names @@ -0,0 +1,22 @@ +{ + "entries": [ + { + "base": "{BAD6C904-6078-49E8-B461-CA4410B785A4}", + "context": "ScriptCanvas::Node", + "variant": "", + "details": { + "name": "Base Timer Node", + "category": "Utilities", + "tooltip": "Provides a basic interaction layer for all time based nodes for users(handles swapping between ticks and seconds)." + }, + "slots": [ + { + "base": "DataInput_Delay_0", + "details": { + "name": "Delay" + } + } + ] + } + ] +} \ No newline at end of file diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/Utilities_ExtractProperties.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/Utilities_ExtractProperties.names new file mode 100644 index 0000000000..6a2884f972 --- /dev/null +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/Utilities_ExtractProperties.names @@ -0,0 +1,36 @@ +{ + "entries": [ + { + "base": "{D4C9DA8E-838B-41C6-B870-C75294C323DC}", + "context": "ScriptCanvas::Node", + "variant": "", + "details": { + "name": "Extract Properties", + "category": "Utilities", + "tooltip": "Extracts property values from connected input" + }, + "slots": [ + { + "base": "Input_In_0", + "details": { + "name": "In", + "tooltip": "When signaled assigns property values using the supplied source input" + } + }, + { + "base": "Output_Out_0", + "details": { + "name": "Out", + "tooltip": "Signaled after all property haves have been pushed to the output slots" + } + }, + { + "base": "DataInput_Source_0", + "details": { + "name": "Source" + } + } + ] + } + ] +} \ No newline at end of file diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/Utilities_Repeater.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/Utilities_Repeater.names new file mode 100644 index 0000000000..ee6eacf751 --- /dev/null +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/Utilities_Repeater.names @@ -0,0 +1,49 @@ +{ + "entries": [ + { + "base": "{0A38EDCA-0571-48F0-9199-F6168C1EAAF0}", + "context": "ScriptCanvas::Node", + "variant": "", + "details": { + "name": "Repeater", + "category": "Utilities", + "tooltip": "Repeats the output signal the given number of times using the specified delay to space the signals out" + }, + "slots": [ + { + "base": "DataInput_Repetitions_0", + "details": { + "name": "Repetitions" + } + }, + { + "base": "Input_In_0", + "details": { + "name": "In", + "tooltip": "Input signal" + } + }, + { + "base": "Output_Complete_0", + "details": { + "name": "Complete", + "tooltip": "Signaled upon node exit" + } + }, + { + "base": "Output_Action_1", + "details": { + "name": "Action", + "tooltip": "The signal that will be repeated" + } + }, + { + "base": "DataInput_Interval_1", + "details": { + "name": "Interval" + } + } + ] + } + ] +} \ No newline at end of file diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/AreaBlenderComponentTypeId.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/AreaBlenderComponentTypeId.names new file mode 100644 index 0000000000..f024e4e28b --- /dev/null +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/AreaBlenderComponentTypeId.names @@ -0,0 +1,29 @@ +{ + "entries": [ + { + "base": "AreaBlenderComponentTypeId", + "context": "Constant", + "variant": "", + "details": { + "name": "Area Blender Component Type Id", + "category": "Constants/Editor" + }, + "methods": [ + { + "base": "GetAreaBlenderComponentTypeId", + "details": { + "name": "Get Area Blender Component Type Id" + }, + "results": [ + { + "typeid": "{E152C105-A133-4D03-BBF8-3D4B2FBA3E2A}", + "details": { + "name": "AZ:: Uuid" + } + } + ] + } + ] + } + ] +} \ No newline at end of file diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/AreaLightComponentTypeId.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/AreaLightComponentTypeId.names new file mode 100644 index 0000000000..c1a45e9088 --- /dev/null +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/AreaLightComponentTypeId.names @@ -0,0 +1,29 @@ +{ + "entries": [ + { + "base": "AreaLightComponentTypeId", + "context": "Constant", + "variant": "", + "details": { + "name": "Area Light Component Type Id", + "category": "Constants/Editor" + }, + "methods": [ + { + "base": "GetAreaLightComponentTypeId", + "details": { + "name": "Get Area Light Component Type Id" + }, + "results": [ + { + "typeid": "{E152C105-A133-4D03-BBF8-3D4B2FBA3E2A}", + "details": { + "name": "AZ:: Uuid" + } + } + ] + } + ] + } + ] +} \ No newline at end of file diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/AudioObstructionType_Ignore.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/AudioObstructionType_Ignore.names new file mode 100644 index 0000000000..f3de6ac1c3 --- /dev/null +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/AudioObstructionType_Ignore.names @@ -0,0 +1,29 @@ +{ + "entries": [ + { + "base": "AudioObstructionType_Ignore", + "context": "Constant", + "variant": "", + "details": { + "name": " Ignore", + "category": "Constants/Audio Obstruction" + }, + "methods": [ + { + "base": "GetAudioObstructionType_Ignore", + "details": { + "name": "Ignore" + }, + "results": [ + { + "typeid": "{43DA906B-7DEF-4CA8-9790-854106D3F983}", + "details": { + "name": "unsigned int" + } + } + ] + } + ] + } + ] +} \ No newline at end of file diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/AudioObstructionType_MultiRay.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/AudioObstructionType_MultiRay.names new file mode 100644 index 0000000000..b9b6d4fc0a --- /dev/null +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/AudioObstructionType_MultiRay.names @@ -0,0 +1,29 @@ +{ + "entries": [ + { + "base": "AudioObstructionType_MultiRay", + "context": "Constant", + "variant": "", + "details": { + "name": "Multi Ray", + "category": "Constants/Audio Obstruction" + }, + "methods": [ + { + "base": "GetAudioObstructionType_MultiRay", + "details": { + "name": "Multi Ray" + }, + "results": [ + { + "typeid": "{43DA906B-7DEF-4CA8-9790-854106D3F983}", + "details": { + "name": "unsigned int" + } + } + ] + } + ] + } + ] +} \ No newline at end of file diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/AudioObstructionType_SingleRay.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/AudioObstructionType_SingleRay.names new file mode 100644 index 0000000000..b86d40f250 --- /dev/null +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/AudioObstructionType_SingleRay.names @@ -0,0 +1,29 @@ +{ + "entries": [ + { + "base": "AudioObstructionType_SingleRay", + "context": "Constant", + "variant": "", + "details": { + "name": "Single Ray", + "category": "Constants/Audio Obstruction" + }, + "methods": [ + { + "base": "GetAudioObstructionType_SingleRay", + "details": { + "name": "Single Ray" + }, + "results": [ + { + "typeid": "{43DA906B-7DEF-4CA8-9790-854106D3F983}", + "details": { + "name": "unsigned int" + } + } + ] + } + ] + } + ] +} \ No newline at end of file diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/AudioPreloadComponentLoadType_Auto.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/AudioPreloadComponentLoadType_Auto.names new file mode 100644 index 0000000000..f6d2c8a197 --- /dev/null +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/AudioPreloadComponentLoadType_Auto.names @@ -0,0 +1,29 @@ +{ + "entries": [ + { + "base": "AudioPreloadComponentLoadType_Auto", + "context": "Constant", + "variant": "", + "details": { + "name": "Load Type Auto", + "category": "Constants/Audio Preload" + }, + "methods": [ + { + "base": "GetAudioPreloadComponentLoadType_Auto", + "details": { + "name": "Load Type Auto" + }, + "results": [ + { + "typeid": "{43DA906B-7DEF-4CA8-9790-854106D3F983}", + "details": { + "name": "unsigned int" + } + } + ] + } + ] + } + ] +} \ No newline at end of file diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/AudioPreloadComponentLoadType_Manual.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/AudioPreloadComponentLoadType_Manual.names new file mode 100644 index 0000000000..4d5feaad5b --- /dev/null +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/AudioPreloadComponentLoadType_Manual.names @@ -0,0 +1,29 @@ +{ + "entries": [ + { + "base": "AudioPreloadComponentLoadType_Manual", + "context": "Constant", + "variant": "", + "details": { + "name": "Load Type Manual", + "category": "Constants/Audio Preload" + }, + "methods": [ + { + "base": "GetAudioPreloadComponentLoadType_Manual", + "details": { + "name": "Load Type Manual" + }, + "results": [ + { + "typeid": "{43DA906B-7DEF-4CA8-9790-854106D3F983}", + "details": { + "name": "unsigned int" + } + } + ] + } + ] + } + ] +} \ No newline at end of file diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/AxisAlignedBoxShapeComponentTypeId.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/AxisAlignedBoxShapeComponentTypeId.names new file mode 100644 index 0000000000..abbb47ca89 --- /dev/null +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/AxisAlignedBoxShapeComponentTypeId.names @@ -0,0 +1,29 @@ +{ + "entries": [ + { + "base": "AxisAlignedBoxShapeComponentTypeId", + "context": "Constant", + "variant": "", + "details": { + "name": "Axis Aligned Box Shape Component Type Id", + "category": "Constants/Editor" + }, + "methods": [ + { + "base": "GetAxisAlignedBoxShapeComponentTypeId", + "details": { + "name": "Get Axis Aligned Box Shape Component Type Id" + }, + "results": [ + { + "typeid": "{E152C105-A133-4D03-BBF8-3D4B2FBA3E2A}", + "details": { + "name": "AZ:: Uuid" + } + } + ] + } + ] + } + ] +} \ No newline at end of file diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/BlendFactor_AlphaDest.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/BlendFactor_AlphaDest.names new file mode 100644 index 0000000000..fdde3cc1d1 --- /dev/null +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/BlendFactor_AlphaDest.names @@ -0,0 +1,29 @@ +{ + "entries": [ + { + "base": "BlendFactor_AlphaDest", + "context": "Constant", + "variant": "", + "details": { + "name": "Alpha Dest", + "category": "Constants/Blend Factor" + }, + "methods": [ + { + "base": "GetBlendFactor_AlphaDest", + "details": { + "name": "Get Alpha Dest" + }, + "results": [ + { + "typeid": "{72039442-EB38-4D42-A1AD-CB68F7E0EEF6}", + "details": { + "name": "int" + } + } + ] + } + ] + } + ] +} \ No newline at end of file diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/BlendFactor_AlphaDestInverse.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/BlendFactor_AlphaDestInverse.names new file mode 100644 index 0000000000..c94109b0cd --- /dev/null +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/BlendFactor_AlphaDestInverse.names @@ -0,0 +1,29 @@ +{ + "entries": [ + { + "base": "BlendFactor_AlphaDestInverse", + "context": "Constant", + "variant": "", + "details": { + "name": "Alpha Dest Inverse", + "category": "Constants/Blend Factor" + }, + "methods": [ + { + "base": "GetBlendFactor_AlphaDestInverse", + "details": { + "name": "Get Alpha Dest Inverse" + }, + "results": [ + { + "typeid": "{72039442-EB38-4D42-A1AD-CB68F7E0EEF6}", + "details": { + "name": "int" + } + } + ] + } + ] + } + ] +} \ No newline at end of file diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/BlendFactor_AlphaSource.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/BlendFactor_AlphaSource.names new file mode 100644 index 0000000000..b8825ce046 --- /dev/null +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/BlendFactor_AlphaSource.names @@ -0,0 +1,29 @@ +{ + "entries": [ + { + "base": "BlendFactor_AlphaSource", + "context": "Constant", + "variant": "", + "details": { + "name": "Alpha Source", + "category": "Constants/Blend Factor" + }, + "methods": [ + { + "base": "AlphaSource", + "details": { + "name": "Get Alpha Source" + }, + "results": [ + { + "typeid": "{72039442-EB38-4D42-A1AD-CB68F7E0EEF6}", + "details": { + "name": "int" + } + } + ] + } + ] + } + ] +} \ No newline at end of file diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/BlendFactor_AlphaSource1.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/BlendFactor_AlphaSource1.names new file mode 100644 index 0000000000..cb229071a4 --- /dev/null +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/BlendFactor_AlphaSource1.names @@ -0,0 +1,29 @@ +{ + "entries": [ + { + "base": "BlendFactor_AlphaSource1", + "context": "Constant", + "variant": "", + "details": { + "name": "Alpha Source 1", + "category": "Constants/Blend Factor" + }, + "methods": [ + { + "base": "GetBlendFactor_AlphaSource1", + "details": { + "name": "Get Alpha Source 1" + }, + "results": [ + { + "typeid": "{72039442-EB38-4D42-A1AD-CB68F7E0EEF6}", + "details": { + "name": "int" + } + } + ] + } + ] + } + ] +} \ No newline at end of file diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/BlendFactor_AlphaSource1Inverse.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/BlendFactor_AlphaSource1Inverse.names new file mode 100644 index 0000000000..bf9b3144bf --- /dev/null +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/BlendFactor_AlphaSource1Inverse.names @@ -0,0 +1,29 @@ +{ + "entries": [ + { + "base": "BlendFactor_AlphaSource1Inverse", + "context": "Constant", + "variant": "", + "details": { + "name": "Alpha Source 1 Inverse", + "category": "Constants/Blend Factor" + }, + "methods": [ + { + "base": "GetBlendFactor_AlphaSource1Inverse", + "details": { + "name": "Get Alpha Source 1 Inverse" + }, + "results": [ + { + "typeid": "{72039442-EB38-4D42-A1AD-CB68F7E0EEF6}", + "details": { + "name": "int" + } + } + ] + } + ] + } + ] +} \ No newline at end of file diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/BlendFactor_AlphaSourceInverse.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/BlendFactor_AlphaSourceInverse.names new file mode 100644 index 0000000000..49eff72742 --- /dev/null +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/BlendFactor_AlphaSourceInverse.names @@ -0,0 +1,29 @@ +{ + "entries": [ + { + "base": "BlendFactor_AlphaSourceInverse", + "context": "Constant", + "variant": "", + "details": { + "name": "Alpha Source Inverse", + "category": "Constants/Blend Factor" + }, + "methods": [ + { + "base": "GetBlendFactor_AlphaSourceInverse", + "details": { + "name": "Get Alpha Source Inverse" + }, + "results": [ + { + "typeid": "{72039442-EB38-4D42-A1AD-CB68F7E0EEF6}", + "details": { + "name": "int" + } + } + ] + } + ] + } + ] +} \ No newline at end of file diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/BlendFactor_AlphaSourceSaturate.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/BlendFactor_AlphaSourceSaturate.names new file mode 100644 index 0000000000..8a104eba15 --- /dev/null +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/BlendFactor_AlphaSourceSaturate.names @@ -0,0 +1,29 @@ +{ + "entries": [ + { + "base": "BlendFactor_AlphaSourceSaturate", + "context": "Constant", + "variant": "", + "details": { + "name": "Alpha Source Saturate", + "category": "Constants/Blend Factor" + }, + "methods": [ + { + "base": "GetBlendFactor_AlphaSourceSaturate", + "details": { + "name": "Get Alpha Source Saturate" + }, + "results": [ + { + "typeid": "{72039442-EB38-4D42-A1AD-CB68F7E0EEF6}", + "details": { + "name": "int" + } + } + ] + } + ] + } + ] +} \ No newline at end of file diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/BlendFactor_ColorDest.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/BlendFactor_ColorDest.names new file mode 100644 index 0000000000..a17f1e2915 --- /dev/null +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/BlendFactor_ColorDest.names @@ -0,0 +1,29 @@ +{ + "entries": [ + { + "base": "BlendFactor_ColorDest", + "context": "Constant", + "variant": "", + "details": { + "name": "Color Dest", + "category": "Constants/Blend Factor" + }, + "methods": [ + { + "base": "GetBlendFactor_ColorDest", + "details": { + "name": "Get Color Dest" + }, + "results": [ + { + "typeid": "{72039442-EB38-4D42-A1AD-CB68F7E0EEF6}", + "details": { + "name": "int" + } + } + ] + } + ] + } + ] +} \ No newline at end of file diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/BlendFactor_ColorDestInverse.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/BlendFactor_ColorDestInverse.names new file mode 100644 index 0000000000..25553bed9e --- /dev/null +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/BlendFactor_ColorDestInverse.names @@ -0,0 +1,29 @@ +{ + "entries": [ + { + "base": "BlendFactor_ColorDestInverse", + "context": "Constant", + "variant": "", + "details": { + "name": "Color Dest Inverse", + "category": "Constants/Blend Factor" + }, + "methods": [ + { + "base": "GetBlendFactor_ColorDestInverse", + "details": { + "name": "Get Color Dest Inverse" + }, + "results": [ + { + "typeid": "{72039442-EB38-4D42-A1AD-CB68F7E0EEF6}", + "details": { + "name": "int" + } + } + ] + } + ] + } + ] +} \ No newline at end of file diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/BlendFactor_ColorSource.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/BlendFactor_ColorSource.names new file mode 100644 index 0000000000..c693053cb7 --- /dev/null +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/BlendFactor_ColorSource.names @@ -0,0 +1,29 @@ +{ + "entries": [ + { + "base": "BlendFactor_ColorSource", + "context": "Constant", + "variant": "", + "details": { + "name": "Color Source", + "category": "Constants/Blend Factor" + }, + "methods": [ + { + "base": "GetBlendFactor_ColorSource", + "details": { + "name": "Get Color Source" + }, + "results": [ + { + "typeid": "{72039442-EB38-4D42-A1AD-CB68F7E0EEF6}", + "details": { + "name": "int" + } + } + ] + } + ] + } + ] +} \ No newline at end of file diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/BlendFactor_ColorSource1.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/BlendFactor_ColorSource1.names new file mode 100644 index 0000000000..62407ba8c9 --- /dev/null +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/BlendFactor_ColorSource1.names @@ -0,0 +1,29 @@ +{ + "entries": [ + { + "base": "BlendFactor_ColorSource1", + "context": "Constant", + "variant": "", + "details": { + "name": "Color Source 1", + "category": "Constants/Blend Factor" + }, + "methods": [ + { + "base": "GetBlendFactor_ColorSource1", + "details": { + "name": "Get Color Source 1" + }, + "results": [ + { + "typeid": "{72039442-EB38-4D42-A1AD-CB68F7E0EEF6}", + "details": { + "name": "int" + } + } + ] + } + ] + } + ] +} \ No newline at end of file diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/BlendFactor_ColorSource1Inverse.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/BlendFactor_ColorSource1Inverse.names new file mode 100644 index 0000000000..4e1178fd61 --- /dev/null +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/BlendFactor_ColorSource1Inverse.names @@ -0,0 +1,29 @@ +{ + "entries": [ + { + "base": "BlendFactor_ColorSource1Inverse", + "context": "Constant", + "variant": "", + "details": { + "name": "Color Source 1 Inverse", + "category": "Constants/Blend Factor" + }, + "methods": [ + { + "base": "GetBlendFactor_ColorSource1Inverse", + "details": { + "name": "Get Color Source 1 Inverse" + }, + "results": [ + { + "typeid": "{72039442-EB38-4D42-A1AD-CB68F7E0EEF6}", + "details": { + "name": "int" + } + } + ] + } + ] + } + ] +} \ No newline at end of file diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/BlendFactor_ColorSourceInverse.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/BlendFactor_ColorSourceInverse.names new file mode 100644 index 0000000000..e33a9389ee --- /dev/null +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/BlendFactor_ColorSourceInverse.names @@ -0,0 +1,29 @@ +{ + "entries": [ + { + "base": "BlendFactor_ColorSourceInverse", + "context": "Constant", + "variant": "", + "details": { + "name": "Color Source Inverse", + "category": "Constants/Blend Factor" + }, + "methods": [ + { + "base": "GetBlendFactor_ColorSourceInverse", + "details": { + "name": "Get Color Source Inverse" + }, + "results": [ + { + "typeid": "{72039442-EB38-4D42-A1AD-CB68F7E0EEF6}", + "details": { + "name": "int" + } + } + ] + } + ] + } + ] +} \ No newline at end of file diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/BlendFactor_Factor.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/BlendFactor_Factor.names new file mode 100644 index 0000000000..1e235c0054 --- /dev/null +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/BlendFactor_Factor.names @@ -0,0 +1,29 @@ +{ + "entries": [ + { + "base": "BlendFactor_Factor", + "context": "Constant", + "variant": "", + "details": { + "name": "Factor", + "category": "Constants/Blend Factor" + }, + "methods": [ + { + "base": "GetBlendFactor_Factor", + "details": { + "name": "Get Factor" + }, + "results": [ + { + "typeid": "{72039442-EB38-4D42-A1AD-CB68F7E0EEF6}", + "details": { + "name": "int" + } + } + ] + } + ] + } + ] +} \ No newline at end of file diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/BlendFactor_FactorInverse.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/BlendFactor_FactorInverse.names new file mode 100644 index 0000000000..69eddb1fab --- /dev/null +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/BlendFactor_FactorInverse.names @@ -0,0 +1,29 @@ +{ + "entries": [ + { + "base": "BlendFactor_FactorInverse", + "context": "Constant", + "variant": "", + "details": { + "name": "Factor Inverse", + "category": "Constants/Blend Factor" + }, + "methods": [ + { + "base": "GetBlendFactor_FactorInverse", + "details": { + "name": "Get Factor Inverse" + }, + "results": [ + { + "typeid": "{72039442-EB38-4D42-A1AD-CB68F7E0EEF6}", + "details": { + "name": "int" + } + } + ] + } + ] + } + ] +} \ No newline at end of file diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/BlendFactor_Invalid.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/BlendFactor_Invalid.names new file mode 100644 index 0000000000..0751a6a29f --- /dev/null +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/BlendFactor_Invalid.names @@ -0,0 +1,29 @@ +{ + "entries": [ + { + "base": "BlendFactor_Invalid", + "context": "Constant", + "variant": "", + "details": { + "name": "Invalid", + "category": "Constants/Blend Factor" + }, + "methods": [ + { + "base": "GetBlendFactor_Invalid", + "details": { + "name": "Get Invalid" + }, + "results": [ + { + "typeid": "{72039442-EB38-4D42-A1AD-CB68F7E0EEF6}", + "details": { + "name": "int" + } + } + ] + } + ] + } + ] +} \ No newline at end of file diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/BlendFactor_One.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/BlendFactor_One.names new file mode 100644 index 0000000000..3909d3cffe --- /dev/null +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/BlendFactor_One.names @@ -0,0 +1,29 @@ +{ + "entries": [ + { + "base": "BlendFactor_One", + "context": "Constant", + "variant": "", + "details": { + "name": "One", + "category": "Constants/Blend Factor" + }, + "methods": [ + { + "base": "GetBlendFactor_One", + "details": { + "name": "Get One" + }, + "results": [ + { + "typeid": "{72039442-EB38-4D42-A1AD-CB68F7E0EEF6}", + "details": { + "name": "int" + } + } + ] + } + ] + } + ] +} \ No newline at end of file diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/BlendFactor_Zero.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/BlendFactor_Zero.names new file mode 100644 index 0000000000..638a238661 --- /dev/null +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/BlendFactor_Zero.names @@ -0,0 +1,29 @@ +{ + "entries": [ + { + "base": "BlendFactor_Zero", + "context": "Constant", + "variant": "", + "details": { + "name": "Zero", + "category": "Constants/Blend Factor" + }, + "methods": [ + { + "base": "GetBlendFactor_Zero", + "details": { + "name": "Get Zero" + }, + "results": [ + { + "typeid": "{72039442-EB38-4D42-A1AD-CB68F7E0EEF6}", + "details": { + "name": "int" + } + } + ] + } + ] + } + ] +} \ No newline at end of file diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/BlendOp_Add.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/BlendOp_Add.names new file mode 100644 index 0000000000..ad4cf9dd21 --- /dev/null +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/BlendOp_Add.names @@ -0,0 +1,29 @@ +{ + "entries": [ + { + "base": "BlendOp_Add", + "context": "Constant", + "variant": "", + "details": { + "name": "Add", + "category": "Constants/Blend Operation" + }, + "methods": [ + { + "base": "GetBlendOp_Add", + "details": { + "name": "Get Add" + }, + "results": [ + { + "typeid": "{72039442-EB38-4D42-A1AD-CB68F7E0EEF6}", + "details": { + "name": "int" + } + } + ] + } + ] + } + ] +} \ No newline at end of file diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/BlendOp_Invalid.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/BlendOp_Invalid.names new file mode 100644 index 0000000000..1b19a6d22a --- /dev/null +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/BlendOp_Invalid.names @@ -0,0 +1,29 @@ +{ + "entries": [ + { + "base": "BlendOp_Invalid", + "context": "Constant", + "variant": "", + "details": { + "name": "Invalid", + "category": "Constants/Blend Operation" + }, + "methods": [ + { + "base": "GetBlendOp_Invalid", + "details": { + "name": "Get Invalid" + }, + "results": [ + { + "typeid": "{72039442-EB38-4D42-A1AD-CB68F7E0EEF6}", + "details": { + "name": "int" + } + } + ] + } + ] + } + ] +} \ No newline at end of file diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/BlendOp_Maximum.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/BlendOp_Maximum.names new file mode 100644 index 0000000000..2bd78c05f2 --- /dev/null +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/BlendOp_Maximum.names @@ -0,0 +1,29 @@ +{ + "entries": [ + { + "base": "BlendOp_Maximum", + "context": "Constant", + "variant": "", + "details": { + "name": "Maximum", + "category": "Constants/Blend Operation" + }, + "methods": [ + { + "base": "GetBlendOp_Maximum", + "details": { + "name": "Get Maximum" + }, + "results": [ + { + "typeid": "{72039442-EB38-4D42-A1AD-CB68F7E0EEF6}", + "details": { + "name": "int" + } + } + ] + } + ] + } + ] +} \ No newline at end of file diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/BlendOp_Minimum.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/BlendOp_Minimum.names new file mode 100644 index 0000000000..f28d104183 --- /dev/null +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/BlendOp_Minimum.names @@ -0,0 +1,29 @@ +{ + "entries": [ + { + "base": "BlendOp_Minimum", + "context": "Constant", + "variant": "", + "details": { + "name": "Minimum", + "category": "Constants/Blend Operation" + }, + "methods": [ + { + "base": "Minimum", + "details": { + "name": "Get Minimum" + }, + "results": [ + { + "typeid": "{72039442-EB38-4D42-A1AD-CB68F7E0EEF6}", + "details": { + "name": "int" + } + } + ] + } + ] + } + ] +} \ No newline at end of file diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/BlendOp_Subtract.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/BlendOp_Subtract.names new file mode 100644 index 0000000000..bab41f7aa3 --- /dev/null +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/BlendOp_Subtract.names @@ -0,0 +1,29 @@ +{ + "entries": [ + { + "base": "BlendOp_Subtract", + "context": "Constant", + "variant": "", + "details": { + "name": "Subtract", + "category": "Constants/Blend Operation" + }, + "methods": [ + { + "base": "GetBlendOp_Subtract", + "details": { + "name": "Get Subtract" + }, + "results": [ + { + "typeid": "{72039442-EB38-4D42-A1AD-CB68F7E0EEF6}", + "details": { + "name": "int" + } + } + ] + } + ] + } + ] +} \ No newline at end of file diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/BlendOp_SubtractReverse.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/BlendOp_SubtractReverse.names new file mode 100644 index 0000000000..74d3c63499 --- /dev/null +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/BlendOp_SubtractReverse.names @@ -0,0 +1,29 @@ +{ + "entries": [ + { + "base": "BlendOp_SubtractReverse", + "context": "Constant", + "variant": "", + "details": { + "name": "Subtract Reverse", + "category": "Constants/Blend Operation" + }, + "methods": [ + { + "base": "GetBlendOp_SubtractReverse", + "details": { + "name": "Get Subtract Reverse" + }, + "results": [ + { + "typeid": "{72039442-EB38-4D42-A1AD-CB68F7E0EEF6}", + "details": { + "name": "int" + } + } + ] + } + ] + } + ] +} \ No newline at end of file diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/BlockerComponentTypeId.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/BlockerComponentTypeId.names new file mode 100644 index 0000000000..b2590a66f5 --- /dev/null +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/BlockerComponentTypeId.names @@ -0,0 +1,29 @@ +{ + "entries": [ + { + "base": "BlockerComponentTypeId", + "context": "Constant", + "variant": "", + "details": { + "name": "Blocker Component Type Id", + "category": "Constants/Editor" + }, + "methods": [ + { + "base": "GetBlockerComponentTypeId", + "details": { + "name": "Get Blocker Component Type Id" + }, + "results": [ + { + "typeid": "{E152C105-A133-4D03-BBF8-3D4B2FBA3E2A}", + "details": { + "name": "AZ:: Uuid" + } + } + ] + } + ] + } + ] +} \ No newline at end of file diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/BloomComponentTypeId.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/BloomComponentTypeId.names new file mode 100644 index 0000000000..da75eeee0a --- /dev/null +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/BloomComponentTypeId.names @@ -0,0 +1,29 @@ +{ + "entries": [ + { + "base": "BloomComponentTypeId", + "context": "Constant", + "variant": "", + "details": { + "name": "Bloom Component Type Id", + "category": "Constants/Editor" + }, + "methods": [ + { + "base": "GetBloomComponentTypeId", + "details": { + "name": "Get Bloom Component Type Id" + }, + "results": [ + { + "typeid": "{E152C105-A133-4D03-BBF8-3D4B2FBA3E2A}", + "details": { + "name": "AZ:: Uuid" + } + } + ] + } + ] + } + ] +} \ No newline at end of file diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/BoxShapeComponentTypeId.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/BoxShapeComponentTypeId.names new file mode 100644 index 0000000000..47e43d6214 --- /dev/null +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/BoxShapeComponentTypeId.names @@ -0,0 +1,29 @@ +{ + "entries": [ + { + "base": "BoxShapeComponentTypeId", + "context": "Constant", + "variant": "", + "details": { + "name": "Box Shape Component Type Id", + "category": "Constants/Editor" + }, + "methods": [ + { + "base": "GetBoxShapeComponentTypeId", + "details": { + "name": "Get Box Shape Component Type Id" + }, + "results": [ + { + "typeid": "{E152C105-A133-4D03-BBF8-3D4B2FBA3E2A}", + "details": { + "name": "AZ:: Uuid" + } + } + ] + } + ] + } + ] +} \ No newline at end of file diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/CUBE.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/CUBE.names new file mode 100644 index 0000000000..3ec26e189b --- /dev/null +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/CUBE.names @@ -0,0 +1,29 @@ +{ + "entries": [ + { + "base": "CUBE", + "context": "Constant", + "variant": "", + "details": { + "name": "Cube", + "category": "Constants/White Box" + }, + "methods": [ + { + "base": "GetCUBE", + "details": { + "name": "Cube" + }, + "results": [ + { + "typeid": "{72039442-EB38-4D42-A1AD-CB68F7E0EEF6}", + "details": { + "name": "int" + } + } + ] + } + ] + } + ] +} \ No newline at end of file diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/CYLINDER.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/CYLINDER.names new file mode 100644 index 0000000000..b893ee0fef --- /dev/null +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/CYLINDER.names @@ -0,0 +1,29 @@ +{ + "entries": [ + { + "base": "CYLINDER", + "context": "Constant", + "variant": "", + "details": { + "name": "Cylinder", + "category": "Constants/White Box" + }, + "methods": [ + { + "base": "GetCYLINDER", + "details": { + "name": "Cylinder" + }, + "results": [ + { + "typeid": "{72039442-EB38-4D42-A1AD-CB68F7E0EEF6}", + "details": { + "name": "int" + } + } + ] + } + ] + } + ] +} \ No newline at end of file diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/CapsuleShapeComponentTypeId.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/CapsuleShapeComponentTypeId.names new file mode 100644 index 0000000000..cdb1bbc238 --- /dev/null +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/CapsuleShapeComponentTypeId.names @@ -0,0 +1,29 @@ +{ + "entries": [ + { + "base": "CapsuleShapeComponentTypeId", + "context": "Constant", + "variant": "", + "details": { + "name": "Capsule Shape Component Type Id", + "category": "Constants/Editor" + }, + "methods": [ + { + "base": "GetCapsuleShapeComponentTypeId", + "details": { + "name": "Get Capsule Shape Component Type Id" + }, + "results": [ + { + "typeid": "{E152C105-A133-4D03-BBF8-3D4B2FBA3E2A}", + "details": { + "name": "AZ:: Uuid" + } + } + ] + } + ] + } + ] +} \ No newline at end of file diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/ConstantGradientComponentTypeId.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/ConstantGradientComponentTypeId.names new file mode 100644 index 0000000000..6ff166295b --- /dev/null +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/ConstantGradientComponentTypeId.names @@ -0,0 +1,29 @@ +{ + "entries": [ + { + "base": "ConstantGradientComponentTypeId", + "context": "Constant", + "variant": "", + "details": { + "name": "Constant Gradient Component Type Id", + "category": "Constants/Editor" + }, + "methods": [ + { + "base": "GetConstantGradientComponentTypeId", + "details": { + "name": "Get Constant Gradient Component Type Id" + }, + "results": [ + { + "typeid": "{E152C105-A133-4D03-BBF8-3D4B2FBA3E2A}", + "details": { + "name": "AZ:: Uuid" + } + } + ] + } + ] + } + ] +} \ No newline at end of file diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/CullMode_Back.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/CullMode_Back.names new file mode 100644 index 0000000000..7f7caceb93 --- /dev/null +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/CullMode_Back.names @@ -0,0 +1,29 @@ +{ + "entries": [ + { + "base": "CullMode_Back", + "context": "Constant", + "variant": "", + "details": { + "name": "Back", + "category": "Constants/Cull Mode" + }, + "methods": [ + { + "base": "GetCullMode_Back", + "details": { + "name": "Get Back" + }, + "results": [ + { + "typeid": "{72039442-EB38-4D42-A1AD-CB68F7E0EEF6}", + "details": { + "name": "int" + } + } + ] + } + ] + } + ] +} \ No newline at end of file diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/CullMode_Front.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/CullMode_Front.names new file mode 100644 index 0000000000..b7f8af903b --- /dev/null +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/CullMode_Front.names @@ -0,0 +1,29 @@ +{ + "entries": [ + { + "base": "CullMode_Front", + "context": "Constant", + "variant": "", + "details": { + "name": "Front", + "category": "Constants/Cull Mode" + }, + "methods": [ + { + "base": "GetCullMode_Front", + "details": { + "name": "Get Front" + }, + "results": [ + { + "typeid": "{72039442-EB38-4D42-A1AD-CB68F7E0EEF6}", + "details": { + "name": "int" + } + } + ] + } + ] + } + ] +} \ No newline at end of file diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/CullMode_Invalid.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/CullMode_Invalid.names new file mode 100644 index 0000000000..e5367958fa --- /dev/null +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/CullMode_Invalid.names @@ -0,0 +1,29 @@ +{ + "entries": [ + { + "base": "CullMode_Invalid", + "context": "Constant", + "variant": "", + "details": { + "name": "Invalid", + "category": "Constants/Cull Mode" + }, + "methods": [ + { + "base": "GetCullMode_Invalid", + "details": { + "name": "Get Invalid" + }, + "results": [ + { + "typeid": "{72039442-EB38-4D42-A1AD-CB68F7E0EEF6}", + "details": { + "name": "int" + } + } + ] + } + ] + } + ] +} \ No newline at end of file diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/CullMode_None.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/CullMode_None.names new file mode 100644 index 0000000000..c563d43a64 --- /dev/null +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/CullMode_None.names @@ -0,0 +1,29 @@ +{ + "entries": [ + { + "base": "CullMode_None", + "context": "Constant", + "variant": "", + "details": { + "name": "None", + "category": "Constants/Cull Mode" + }, + "methods": [ + { + "base": "GetCullMode_None", + "details": { + "name": "Get None" + }, + "results": [ + { + "typeid": "{72039442-EB38-4D42-A1AD-CB68F7E0EEF6}", + "details": { + "name": "int" + } + } + ] + } + ] + } + ] +} \ No newline at end of file diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/CylinderShapeComponentTypeId.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/CylinderShapeComponentTypeId.names new file mode 100644 index 0000000000..2934f89ed4 --- /dev/null +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/CylinderShapeComponentTypeId.names @@ -0,0 +1,29 @@ +{ + "entries": [ + { + "base": "CylinderShapeComponentTypeId", + "context": "Constant", + "variant": "", + "details": { + "name": "Cylinder Shape Component Type Id", + "category": "Constants/Editor" + }, + "methods": [ + { + "base": "GetCylinderShapeComponentTypeId", + "details": { + "name": "Get Cylinder Shape Component Type Id" + }, + "results": [ + { + "typeid": "{E152C105-A133-4D03-BBF8-3D4B2FBA3E2A}", + "details": { + "name": "AZ:: Uuid" + } + } + ] + } + ] + } + ] +} \ No newline at end of file diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/DecalComponentTypeId.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/DecalComponentTypeId.names new file mode 100644 index 0000000000..2187dfeb24 --- /dev/null +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/DecalComponentTypeId.names @@ -0,0 +1,29 @@ +{ + "entries": [ + { + "base": "DecalComponentTypeId", + "context": "Constant", + "variant": "", + "details": { + "name": "Decal Component Type Id", + "category": "Constants/Editor" + }, + "methods": [ + { + "base": "GetDecalComponentTypeId", + "details": { + "name": "Get Decal Component Type Id" + }, + "results": [ + { + "typeid": "{E152C105-A133-4D03-BBF8-3D4B2FBA3E2A}", + "details": { + "name": "AZ:: Uuid" + } + } + ] + } + ] + } + ] +} \ No newline at end of file diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/DefaultLodOverride.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/DefaultLodOverride.names new file mode 100644 index 0000000000..1ac1fdb105 --- /dev/null +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/DefaultLodOverride.names @@ -0,0 +1,29 @@ +{ + "entries": [ + { + "base": "DefaultLodOverride", + "context": "Constant", + "variant": "", + "details": { + "name": "Default Lod Override", + "category": "Constants/Defaults" + }, + "methods": [ + { + "base": "GetDefaultLodOverride", + "details": { + "name": "Get Default Lod Override" + }, + "results": [ + { + "typeid": "{72039442-EB38-4D42-A1AD-CB68F7E0EEF6}", + "details": { + "name": "int" + } + } + ] + } + ] + } + ] +} \ No newline at end of file diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/DefaultLodType.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/DefaultLodType.names new file mode 100644 index 0000000000..f5884c2a8c --- /dev/null +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/DefaultLodType.names @@ -0,0 +1,29 @@ +{ + "entries": [ + { + "base": "DefaultLodType", + "context": "Constant", + "variant": "", + "details": { + "name": "Default Lod Type", + "category": "Constants/Defaults" + }, + "methods": [ + { + "base": "GetDefaultLodType", + "details": { + "name": "Get Default Lod Type" + }, + "results": [ + { + "typeid": "{72B9409A-7D1A-4831-9CFE-FCB3FADD3426}", + "details": { + "name": "unsigned char" + } + } + ] + } + ] + } + ] +} \ No newline at end of file diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/DefaultMaterialAssignment.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/DefaultMaterialAssignment.names new file mode 100644 index 0000000000..2086ad1c9b --- /dev/null +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/DefaultMaterialAssignment.names @@ -0,0 +1,29 @@ +{ + "entries": [ + { + "base": "DefaultMaterialAssignment", + "context": "Constant", + "variant": "", + "details": { + "name": "Default Material Assignment", + "category": "Constants/Defaults" + }, + "methods": [ + { + "base": "GetDefaultMaterialAssignment", + "details": { + "name": "Get Default Material Assignment" + }, + "results": [ + { + "typeid": "{C66E5214-A24B-4722-B7F0-5991E6F8F163}", + "details": { + "name": "AZ:: Render:: Material Assignment" + } + } + ] + } + ] + } + ] +} \ No newline at end of file diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/DefaultMaterialAssignmentId.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/DefaultMaterialAssignmentId.names new file mode 100644 index 0000000000..edf35bc3b1 --- /dev/null +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/DefaultMaterialAssignmentId.names @@ -0,0 +1,29 @@ +{ + "entries": [ + { + "base": "DefaultMaterialAssignmentId", + "context": "Constant", + "variant": "", + "details": { + "name": "Default Material Assignment Id", + "category": "Constants/Defaults" + }, + "methods": [ + { + "base": "GetDefaultMaterialAssignmentId", + "details": { + "name": "Get Default Material Assignment Id" + }, + "results": [ + { + "typeid": "{EB603581-4654-4C17-B6DE-AE61E79EDA97}", + "details": { + "name": "AZ:: Render:: Material Assignment Id" + } + } + ] + } + ] + } + ] +} \ No newline at end of file diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/DefaultMaterialAssignmentMap.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/DefaultMaterialAssignmentMap.names new file mode 100644 index 0000000000..50867c97e1 --- /dev/null +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/DefaultMaterialAssignmentMap.names @@ -0,0 +1,29 @@ +{ + "entries": [ + { + "base": "DefaultMaterialAssignmentMap", + "context": "Constant", + "variant": "", + "details": { + "name": "Default Material Assignment Map", + "category": "Constants/Defaults" + }, + "methods": [ + { + "base": "GetDefaultMaterialAssignmentMap", + "details": { + "name": "Get Default Material Assignment Map" + }, + "results": [ + { + "typeid": "{50F6716F-698B-5A6C-AACD-940597FDEC24}", + "details": { + "name": "AZ Std::unordered_map" + } + } + ] + } + ] + } + ] +} \ No newline at end of file diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/DefaultPhysicsSceneId.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/DefaultPhysicsSceneId.names new file mode 100644 index 0000000000..e66d74e456 --- /dev/null +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/DefaultPhysicsSceneId.names @@ -0,0 +1,29 @@ +{ + "entries": [ + { + "base": "DefaultPhysicsSceneId", + "context": "Constant", + "variant": "", + "details": { + "name": "Default Physics Scene Id", + "category": "Constants/Defaults" + }, + "methods": [ + { + "base": "GetDefaultPhysicsSceneId", + "details": { + "name": "Get Default Physics Scene Id" + }, + "results": [ + { + "typeid": "{9F4E062E-06A0-46D4-85DF-E0DA96467D3A}", + "details": { + "name": "Crc 32" + } + } + ] + } + ] + } + ] +} \ No newline at end of file diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/DefaultPhysicsSceneName.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/DefaultPhysicsSceneName.names new file mode 100644 index 0000000000..07a47cfae4 --- /dev/null +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/DefaultPhysicsSceneName.names @@ -0,0 +1,29 @@ +{ + "entries": [ + { + "base": "DefaultPhysicsSceneName", + "context": "Constant", + "variant": "", + "details": { + "name": "Default Physics Scene Name", + "category": "Constants/Defaults" + }, + "methods": [ + { + "base": "GetDefaultPhysicsSceneName", + "details": { + "name": "Get Default Physics Scene Name" + }, + "results": [ + { + "typeid": "{3AB0037F-AF8D-48CE-BCA0-A170D18B2C03}", + "details": { + "name": "char" + } + } + ] + } + ] + } + ] +} \ No newline at end of file diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/DeferredFogComponentTypeId.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/DeferredFogComponentTypeId.names new file mode 100644 index 0000000000..4ab65691fe --- /dev/null +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/DeferredFogComponentTypeId.names @@ -0,0 +1,29 @@ +{ + "entries": [ + { + "base": "DeferredFogComponentTypeId", + "context": "Constant", + "variant": "", + "details": { + "name": "Deferred Fog Component Type Id", + "category": "Constants/Editor" + }, + "methods": [ + { + "base": "GetDeferredFogComponentTypeId", + "details": { + "name": "Get Deferred Fog Component Type Id" + }, + "results": [ + { + "typeid": "{E152C105-A133-4D03-BBF8-3D4B2FBA3E2A}", + "details": { + "name": "AZ:: Uuid" + } + } + ] + } + ] + } + ] +} \ No newline at end of file diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/DepthOfFieldComponentTypeId.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/DepthOfFieldComponentTypeId.names new file mode 100644 index 0000000000..3d24f7dd7e --- /dev/null +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/DepthOfFieldComponentTypeId.names @@ -0,0 +1,29 @@ +{ + "entries": [ + { + "base": "DepthOfFieldComponentTypeId", + "context": "Constant", + "variant": "", + "details": { + "name": "Depth Of Field Component Type Id", + "category": "Constants/Editor" + }, + "methods": [ + { + "base": "GetDepthOfFieldComponentTypeId", + "details": { + "name": "Get Depth Of Field Component Type Id" + }, + "results": [ + { + "typeid": "{E152C105-A133-4D03-BBF8-3D4B2FBA3E2A}", + "details": { + "name": "AZ:: Uuid" + } + } + ] + } + ] + } + ] +} \ No newline at end of file diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/DepthWriteMask_All.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/DepthWriteMask_All.names new file mode 100644 index 0000000000..fda594cedf --- /dev/null +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/DepthWriteMask_All.names @@ -0,0 +1,29 @@ +{ + "entries": [ + { + "base": "DepthWriteMask_All", + "context": "Constant", + "variant": "", + "details": { + "name": "All", + "category": "Constants/Depth Write Mask" + }, + "methods": [ + { + "base": "GetDepthWriteMask_All", + "details": { + "name": "All" + }, + "results": [ + { + "typeid": "{72039442-EB38-4D42-A1AD-CB68F7E0EEF6}", + "details": { + "name": "int" + } + } + ] + } + ] + } + ] +} \ No newline at end of file diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/DepthWriteMask_Invalid.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/DepthWriteMask_Invalid.names new file mode 100644 index 0000000000..d28d0a68f1 --- /dev/null +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/DepthWriteMask_Invalid.names @@ -0,0 +1,29 @@ +{ + "entries": [ + { + "base": "DepthWriteMask_Invalid", + "context": "Constant", + "variant": "", + "details": { + "name": "Invalid", + "category": "Constants/Depth Write Mask" + }, + "methods": [ + { + "base": "GetDepthWriteMask_Invalid", + "details": { + "name": "Invalid" + }, + "results": [ + { + "typeid": "{72039442-EB38-4D42-A1AD-CB68F7E0EEF6}", + "details": { + "name": "int" + } + } + ] + } + ] + } + ] +} \ No newline at end of file diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/DepthWriteMask_Zero.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/DepthWriteMask_Zero.names new file mode 100644 index 0000000000..e33a0af623 --- /dev/null +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/DepthWriteMask_Zero.names @@ -0,0 +1,29 @@ +{ + "entries": [ + { + "base": "DepthWriteMask_Zero", + "context": "Constant", + "variant": "", + "details": { + "name": "Zero", + "category": "Constants/Depth Write Mask" + }, + "methods": [ + { + "base": "GetDepthWriteMask_Zero", + "details": { + "name": "Zero" + }, + "results": [ + { + "typeid": "{72039442-EB38-4D42-A1AD-CB68F7E0EEF6}", + "details": { + "name": "int" + } + } + ] + } + ] + } + ] +} \ No newline at end of file diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/DescriptorListCombinerComponentTypeId.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/DescriptorListCombinerComponentTypeId.names new file mode 100644 index 0000000000..4b66d5c7a2 --- /dev/null +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/DescriptorListCombinerComponentTypeId.names @@ -0,0 +1,29 @@ +{ + "entries": [ + { + "base": "DescriptorListCombinerComponentTypeId", + "context": "Constant", + "variant": "", + "details": { + "name": "Descriptor List Combiner Component Type Id", + "category": "Constants/Editor" + }, + "methods": [ + { + "base": "GetDescriptorListCombinerComponentTypeId", + "details": { + "name": "Get Descriptor List Combiner Component Type Id" + }, + "results": [ + { + "typeid": "{E152C105-A133-4D03-BBF8-3D4B2FBA3E2A}", + "details": { + "name": "AZ:: Uuid" + } + } + ] + } + ] + } + ] +} \ No newline at end of file diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/DescriptorListComponentTypeId.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/DescriptorListComponentTypeId.names new file mode 100644 index 0000000000..c190cc2a6d --- /dev/null +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/DescriptorListComponentTypeId.names @@ -0,0 +1,29 @@ +{ + "entries": [ + { + "base": "DescriptorListComponentTypeId", + "context": "Constant", + "variant": "", + "details": { + "name": "Descriptor List Component Type Id", + "category": "Constants/Editor" + }, + "methods": [ + { + "base": "GetDescriptorListComponentTypeId", + "details": { + "name": "Get Descriptor List Component Type Id" + }, + "results": [ + { + "typeid": "{E152C105-A133-4D03-BBF8-3D4B2FBA3E2A}", + "details": { + "name": "AZ:: Uuid" + } + } + ] + } + ] + } + ] +} \ No newline at end of file diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/DescriptorWeightSelectorComponentTypeId.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/DescriptorWeightSelectorComponentTypeId.names new file mode 100644 index 0000000000..806f846ca7 --- /dev/null +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/DescriptorWeightSelectorComponentTypeId.names @@ -0,0 +1,29 @@ +{ + "entries": [ + { + "base": "DescriptorWeightSelectorComponentTypeId", + "context": "Constant", + "variant": "", + "details": { + "name": "Descriptor Weight Selector Component Type Id", + "category": "Constants/Editor" + }, + "methods": [ + { + "base": "GetDescriptorWeightSelectorComponentTypeId", + "details": { + "name": "Get Descriptor Weight Selector Component Type Id" + }, + "results": [ + { + "typeid": "{E152C105-A133-4D03-BBF8-3D4B2FBA3E2A}", + "details": { + "name": "AZ:: Uuid" + } + } + ] + } + ] + } + ] +} \ No newline at end of file diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/DiffuseGlobalIlluminationComponentTypeId.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/DiffuseGlobalIlluminationComponentTypeId.names new file mode 100644 index 0000000000..123f3768a0 --- /dev/null +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/DiffuseGlobalIlluminationComponentTypeId.names @@ -0,0 +1,29 @@ +{ + "entries": [ + { + "base": "DiffuseGlobalIlluminationComponentTypeId", + "context": "Constant", + "variant": "", + "details": { + "name": "Diffuse Global Illumination Component Type Id", + "category": "Constants/Editor" + }, + "methods": [ + { + "base": "GetDiffuseGlobalIlluminationComponentTypeId", + "details": { + "name": "Get Diffuse Global Illumination Component Type Id" + }, + "results": [ + { + "typeid": "{E152C105-A133-4D03-BBF8-3D4B2FBA3E2A}", + "details": { + "name": "AZ:: Uuid" + } + } + ] + } + ] + } + ] +} \ No newline at end of file diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/DiffuseProbeGridComponentTypeId.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/DiffuseProbeGridComponentTypeId.names new file mode 100644 index 0000000000..255fda6778 --- /dev/null +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/DiffuseProbeGridComponentTypeId.names @@ -0,0 +1,29 @@ +{ + "entries": [ + { + "base": "DiffuseProbeGridComponentTypeId", + "context": "Constant", + "variant": "", + "details": { + "name": "Diffuse Probe Grid Component Type Id", + "category": "Constants/Editor" + }, + "methods": [ + { + "base": "GetDiffuseProbeGridComponentTypeId", + "details": { + "name": "Get Diffuse Probe Grid Component Type Id" + }, + "results": [ + { + "typeid": "{E152C105-A133-4D03-BBF8-3D4B2FBA3E2A}", + "details": { + "name": "AZ:: Uuid" + } + } + ] + } + ] + } + ] +} \ No newline at end of file diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/DirectionalLightComponentTypeId.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/DirectionalLightComponentTypeId.names new file mode 100644 index 0000000000..bc81a2d511 --- /dev/null +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/DirectionalLightComponentTypeId.names @@ -0,0 +1,29 @@ +{ + "entries": [ + { + "base": "DirectionalLightComponentTypeId", + "context": "Constant", + "variant": "", + "details": { + "name": "Directional Light Component Type Id", + "category": "Constants/Editor" + }, + "methods": [ + { + "base": "GetDirectionalLightComponentTypeId", + "details": { + "name": "Get Directional Light Component Type Id" + }, + "results": [ + { + "typeid": "{E152C105-A133-4D03-BBF8-3D4B2FBA3E2A}", + "details": { + "name": "AZ:: Uuid" + } + } + ] + } + ] + } + ] +} \ No newline at end of file diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/DiskShapeComponentTypeId.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/DiskShapeComponentTypeId.names new file mode 100644 index 0000000000..fee2376420 --- /dev/null +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/DiskShapeComponentTypeId.names @@ -0,0 +1,29 @@ +{ + "entries": [ + { + "base": "DiskShapeComponentTypeId", + "context": "Constant", + "variant": "", + "details": { + "name": "Disk Shape Component Type Id", + "category": "Constants/Editor" + }, + "methods": [ + { + "base": "GetDiskShapeComponentTypeId", + "details": { + "name": "Get Disk Shape Component Type Id" + }, + "results": [ + { + "typeid": "{E152C105-A133-4D03-BBF8-3D4B2FBA3E2A}", + "details": { + "name": "AZ:: Uuid" + } + } + ] + } + ] + } + ] +} \ No newline at end of file diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/DisplayMapperComponentTypeId.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/DisplayMapperComponentTypeId.names new file mode 100644 index 0000000000..b284f80a68 --- /dev/null +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/DisplayMapperComponentTypeId.names @@ -0,0 +1,29 @@ +{ + "entries": [ + { + "base": "DisplayMapperComponentTypeId", + "context": "Constant", + "variant": "", + "details": { + "name": "Display Mapper Component Type Id", + "category": "Constants/Editor" + }, + "methods": [ + { + "base": "GetDisplayMapperComponentTypeId", + "details": { + "name": "Get Display Mapper Component Type Id" + }, + "results": [ + { + "typeid": "{E152C105-A133-4D03-BBF8-3D4B2FBA3E2A}", + "details": { + "name": "AZ:: Uuid" + } + } + ] + } + ] + } + ] +} \ No newline at end of file diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/DisplaySettings_HideHelpers.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/DisplaySettings_HideHelpers.names new file mode 100644 index 0000000000..9f47789e24 --- /dev/null +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/DisplaySettings_HideHelpers.names @@ -0,0 +1,29 @@ +{ + "entries": [ + { + "base": "DisplaySettings_HideHelpers", + "context": "Constant", + "variant": "", + "details": { + "name": "Hide Helpers", + "category": "Constants/Display Settings" + }, + "methods": [ + { + "base": "GetDisplaySettings_HideHelpers", + "details": { + "name": "Get Hide Helpers" + }, + "results": [ + { + "typeid": "{72039442-EB38-4D42-A1AD-CB68F7E0EEF6}", + "details": { + "name": "int" + } + } + ] + } + ] + } + ] +} \ No newline at end of file diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/DisplaySettings_HideLinks.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/DisplaySettings_HideLinks.names new file mode 100644 index 0000000000..93fc163a67 --- /dev/null +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/DisplaySettings_HideLinks.names @@ -0,0 +1,29 @@ +{ + "entries": [ + { + "base": "DisplaySettings_HideLinks", + "context": "Constant", + "variant": "", + "details": { + "name": "Hide Links", + "category": "Constants/Display Settings" + }, + "methods": [ + { + "base": "GetDisplaySettings_HideLinks", + "details": { + "name": "Get Hide Links" + }, + "results": [ + { + "typeid": "{72039442-EB38-4D42-A1AD-CB68F7E0EEF6}", + "details": { + "name": "int" + } + } + ] + } + ] + } + ] +} \ No newline at end of file diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/DisplaySettings_HideTracks.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/DisplaySettings_HideTracks.names new file mode 100644 index 0000000000..45872cce0d --- /dev/null +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/DisplaySettings_HideTracks.names @@ -0,0 +1,29 @@ +{ + "entries": [ + { + "base": "DisplaySettings_HideTracks", + "context": "Constant", + "variant": "", + "details": { + "name": "Hide Tracks", + "category": "Constants/Display Settings" + }, + "methods": [ + { + "base": "GetDisplaySettings_HideTracks", + "details": { + "name": "Get Hide Tracks" + }, + "results": [ + { + "typeid": "{72039442-EB38-4D42-A1AD-CB68F7E0EEF6}", + "details": { + "name": "int" + } + } + ] + } + ] + } + ] +} \ No newline at end of file diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/DisplaySettings_NoCollision.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/DisplaySettings_NoCollision.names new file mode 100644 index 0000000000..096407f338 --- /dev/null +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/DisplaySettings_NoCollision.names @@ -0,0 +1,29 @@ +{ + "entries": [ + { + "base": "DisplaySettings_NoCollision", + "context": "Constant", + "variant": "", + "details": { + "name": "No Collision", + "category": "Constants/Display Settings" + }, + "methods": [ + { + "base": "GetDisplaySettings_NoCollision", + "details": { + "name": "Get No Collision" + }, + "results": [ + { + "typeid": "{72039442-EB38-4D42-A1AD-CB68F7E0EEF6}", + "details": { + "name": "int" + } + } + ] + } + ] + } + ] +} \ No newline at end of file diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/DisplaySettings_NoLabels.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/DisplaySettings_NoLabels.names new file mode 100644 index 0000000000..b0d8562db6 --- /dev/null +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/DisplaySettings_NoLabels.names @@ -0,0 +1,29 @@ +{ + "entries": [ + { + "base": "DisplaySettings_NoLabels", + "context": "Constant", + "variant": "", + "details": { + "name": "No Labels", + "category": "Constants/Display Settings" + }, + "methods": [ + { + "base": "GetDisplaySettings_NoLabels", + "details": { + "name": "Get No Labels" + }, + "results": [ + { + "typeid": "{72039442-EB38-4D42-A1AD-CB68F7E0EEF6}", + "details": { + "name": "int" + } + } + ] + } + ] + } + ] +} \ No newline at end of file diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/DisplaySettings_Physics.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/DisplaySettings_Physics.names new file mode 100644 index 0000000000..224f6d48f0 --- /dev/null +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/DisplaySettings_Physics.names @@ -0,0 +1,29 @@ +{ + "entries": [ + { + "base": "DisplaySettings_Physics", + "context": "Constant", + "variant": "", + "details": { + "name": "Physics", + "category": "Constants/Display Settings" + }, + "methods": [ + { + "base": "GetDisplaySettings_Physics", + "details": { + "name": "Get Physics" + }, + "results": [ + { + "typeid": "{72039442-EB38-4D42-A1AD-CB68F7E0EEF6}", + "details": { + "name": "int" + } + } + ] + } + ] + } + ] +} \ No newline at end of file diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/DisplaySettings_SerializableFlagsMask.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/DisplaySettings_SerializableFlagsMask.names new file mode 100644 index 0000000000..ae664ce8a6 --- /dev/null +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/DisplaySettings_SerializableFlagsMask.names @@ -0,0 +1,29 @@ +{ + "entries": [ + { + "base": "DisplaySettings_SerializableFlagsMask", + "context": "Constant", + "variant": "", + "details": { + "name": "Serializable Flags Mask", + "category": "Constants/Display Settings" + }, + "methods": [ + { + "base": "GetDisplaySettings_SerializableFlagsMask", + "details": { + "name": "Get Serializable Flags Mask" + }, + "results": [ + { + "typeid": "{72039442-EB38-4D42-A1AD-CB68F7E0EEF6}", + "details": { + "name": "int" + } + } + ] + } + ] + } + ] +} \ No newline at end of file diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/DisplaySettings_ShowDimensionFigures.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/DisplaySettings_ShowDimensionFigures.names new file mode 100644 index 0000000000..d6d9de0549 --- /dev/null +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/DisplaySettings_ShowDimensionFigures.names @@ -0,0 +1,29 @@ +{ + "entries": [ + { + "base": "DisplaySettings_ShowDimensionFigures", + "context": "Constant", + "variant": "", + "details": { + "name": "Show Dimension Figures", + "category": "Constants/Display Settings" + }, + "methods": [ + { + "base": "GetDisplaySettings_ShowDimensionFigures", + "details": { + "name": "Get Show Dimension Figures" + }, + "results": [ + { + "typeid": "{72039442-EB38-4D42-A1AD-CB68F7E0EEF6}", + "details": { + "name": "int" + } + } + ] + } + ] + } + ] +} \ No newline at end of file diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/DistanceBetweenFilterComponentTypeId.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/DistanceBetweenFilterComponentTypeId.names new file mode 100644 index 0000000000..2e1801b3b0 --- /dev/null +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/DistanceBetweenFilterComponentTypeId.names @@ -0,0 +1,29 @@ +{ + "entries": [ + { + "base": "DistanceBetweenFilterComponentTypeId", + "context": "Constant", + "variant": "", + "details": { + "name": "Distance Between Filter Component Type Id", + "category": "Constants/Editor" + }, + "methods": [ + { + "base": "GetDistanceBetweenFilterComponentTypeId", + "details": { + "name": "Get Distance Between Filter Component Type Id" + }, + "results": [ + { + "typeid": "{E152C105-A133-4D03-BBF8-3D4B2FBA3E2A}", + "details": { + "name": "AZ:: Uuid" + } + } + ] + } + ] + } + ] +} \ No newline at end of file diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/DistributionFilterComponentTypeId.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/DistributionFilterComponentTypeId.names new file mode 100644 index 0000000000..b5e1b96354 --- /dev/null +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/DistributionFilterComponentTypeId.names @@ -0,0 +1,29 @@ +{ + "entries": [ + { + "base": "DistributionFilterComponentTypeId", + "context": "Constant", + "variant": "", + "details": { + "name": "Distribution Filter Component Type Id", + "category": "Constants/Editor" + }, + "methods": [ + { + "base": "GetDistributionFilterComponentTypeId", + "details": { + "name": "Get Distribution Filter Component Type Id" + }, + "results": [ + { + "typeid": "{E152C105-A133-4D03-BBF8-3D4B2FBA3E2A}", + "details": { + "name": "AZ:: Uuid" + } + } + ] + } + ] + } + ] +} \ No newline at end of file diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/DitherGradientComponentTypeId.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/DitherGradientComponentTypeId.names new file mode 100644 index 0000000000..b43e059a52 --- /dev/null +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/DitherGradientComponentTypeId.names @@ -0,0 +1,29 @@ +{ + "entries": [ + { + "base": "DitherGradientComponentTypeId", + "context": "Constant", + "variant": "", + "details": { + "name": "Dither Gradient Component Type Id", + "category": "Constants/Editor/Component Type Id" + }, + "methods": [ + { + "base": "GetDitherGradientComponentTypeId", + "details": { + "name": "Get Dither Gradient Component Type Id" + }, + "results": [ + { + "typeid": "{E152C105-A133-4D03-BBF8-3D4B2FBA3E2A}", + "details": { + "name": "AZ:: Uuid" + } + } + ] + } + ] + } + ] +} \ No newline at end of file diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/EditorAreaLightComponentTypeId.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/EditorAreaLightComponentTypeId.names new file mode 100644 index 0000000000..c219df25cf --- /dev/null +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/EditorAreaLightComponentTypeId.names @@ -0,0 +1,29 @@ +{ + "entries": [ + { + "base": "EditorAreaLightComponentTypeId", + "context": "Constant", + "variant": "", + "details": { + "name": "Editor Area Light Component Type Id", + "category": "Constants/Editor/Component Type Id" + }, + "methods": [ + { + "base": "GetEditorAreaLightComponentTypeId", + "details": { + "name": "Get Editor Area Light Component Type Id" + }, + "results": [ + { + "typeid": "{E152C105-A133-4D03-BBF8-3D4B2FBA3E2A}", + "details": { + "name": "AZ:: Uuid" + } + } + ] + } + ] + } + ] +} \ No newline at end of file diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/EditorBloomComponentTypeId.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/EditorBloomComponentTypeId.names new file mode 100644 index 0000000000..29cb903318 --- /dev/null +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/EditorBloomComponentTypeId.names @@ -0,0 +1,29 @@ +{ + "entries": [ + { + "base": "EditorBloomComponentTypeId", + "context": "Constant", + "variant": "", + "details": { + "name": "Editor Bloom Component Type Id", + "category": "Constants/Editor/Component Type Id" + }, + "methods": [ + { + "base": "GetEditorBloomComponentTypeId", + "details": { + "name": "Get Editor Bloom Component Type Id" + }, + "results": [ + { + "typeid": "{E152C105-A133-4D03-BBF8-3D4B2FBA3E2A}", + "details": { + "name": "AZ:: Uuid" + } + } + ] + } + ] + } + ] +} \ No newline at end of file diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/EditorDecalComponentTypeId.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/EditorDecalComponentTypeId.names new file mode 100644 index 0000000000..30bb2a1c29 --- /dev/null +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/EditorDecalComponentTypeId.names @@ -0,0 +1,29 @@ +{ + "entries": [ + { + "base": "EditorDecalComponentTypeId", + "context": "Constant", + "variant": "", + "details": { + "name": "Editor Decal Component Type Id", + "category": "Constants/Editor/Component Type Id" + }, + "methods": [ + { + "base": "GetEditorDecalComponentTypeId", + "details": { + "name": "Get Editor Decal Component Type Id" + }, + "results": [ + { + "typeid": "{E152C105-A133-4D03-BBF8-3D4B2FBA3E2A}", + "details": { + "name": "AZ:: Uuid" + } + } + ] + } + ] + } + ] +} \ No newline at end of file diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/EditorDeferredFogComponentTypeId.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/EditorDeferredFogComponentTypeId.names new file mode 100644 index 0000000000..d8bdd04e6b --- /dev/null +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/EditorDeferredFogComponentTypeId.names @@ -0,0 +1,29 @@ +{ + "entries": [ + { + "base": "EditorDeferredFogComponentTypeId", + "context": "Constant", + "variant": "", + "details": { + "name": "Editor Deferred Fog Component Type Id", + "category": "Constants/Editor/Component Type Id" + }, + "methods": [ + { + "base": "GetEditorDeferredFogComponentTypeId", + "details": { + "name": "Get Editor Deferred Fog Component Type Id" + }, + "results": [ + { + "typeid": "{E152C105-A133-4D03-BBF8-3D4B2FBA3E2A}", + "details": { + "name": "AZ:: Uuid" + } + } + ] + } + ] + } + ] +} \ No newline at end of file diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/EditorDepthOfFieldComponentTypeId.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/EditorDepthOfFieldComponentTypeId.names new file mode 100644 index 0000000000..df6073be7c --- /dev/null +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/EditorDepthOfFieldComponentTypeId.names @@ -0,0 +1,29 @@ +{ + "entries": [ + { + "base": "EditorDepthOfFieldComponentTypeId", + "context": "Constant", + "variant": "", + "details": { + "name": "Editor Depth Of Field Component Type Id", + "category": "Constants/Editor/Component Type Id" + }, + "methods": [ + { + "base": "GetEditorDepthOfFieldComponentTypeId", + "details": { + "name": "Get Editor Depth Of Field Component Type Id" + }, + "results": [ + { + "typeid": "{E152C105-A133-4D03-BBF8-3D4B2FBA3E2A}", + "details": { + "name": "AZ:: Uuid" + } + } + ] + } + ] + } + ] +} \ No newline at end of file diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/EditorDiffuseGlobalIlluminationComponentTypeId.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/EditorDiffuseGlobalIlluminationComponentTypeId.names new file mode 100644 index 0000000000..3ce4b30d34 --- /dev/null +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/EditorDiffuseGlobalIlluminationComponentTypeId.names @@ -0,0 +1,29 @@ +{ + "entries": [ + { + "base": "EditorDiffuseGlobalIlluminationComponentTypeId", + "context": "Constant", + "variant": "", + "details": { + "name": "Editor Diffuse Global Illumination Component Type Id", + "category": "Constants/Editor/Component Type Id" + }, + "methods": [ + { + "base": "GetEditorDiffuseGlobalIlluminationComponentTypeId", + "details": { + "name": "Get Editor Diffuse Global Illumination Component Type Id" + }, + "results": [ + { + "typeid": "{E152C105-A133-4D03-BBF8-3D4B2FBA3E2A}", + "details": { + "name": "AZ:: Uuid" + } + } + ] + } + ] + } + ] +} \ No newline at end of file diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/EditorDiffuseProbeGridComponentTypeId.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/EditorDiffuseProbeGridComponentTypeId.names new file mode 100644 index 0000000000..2d76298124 --- /dev/null +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/EditorDiffuseProbeGridComponentTypeId.names @@ -0,0 +1,29 @@ +{ + "entries": [ + { + "base": "EditorDiffuseProbeGridComponentTypeId", + "context": "Constant", + "variant": "", + "details": { + "name": "Editor Diffuse Probe Grid Component Type Id", + "category": "Constants/Editor" + }, + "methods": [ + { + "base": "GetEditorDiffuseProbeGridComponentTypeId", + "details": { + "name": "Get Editor Diffuse Probe Grid Component Type Id" + }, + "results": [ + { + "typeid": "{E152C105-A133-4D03-BBF8-3D4B2FBA3E2A}", + "details": { + "name": "AZ:: Uuid" + } + } + ] + } + ] + } + ] +} \ No newline at end of file diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/EditorDirectionalLightComponentTypeId.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/EditorDirectionalLightComponentTypeId.names new file mode 100644 index 0000000000..697762e490 --- /dev/null +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/EditorDirectionalLightComponentTypeId.names @@ -0,0 +1,29 @@ +{ + "entries": [ + { + "base": "EditorDirectionalLightComponentTypeId", + "context": "Constant", + "variant": "", + "details": { + "name": "Editor Directional Light Component Type Id", + "category": "Constants/Editor" + }, + "methods": [ + { + "base": "GetEditorDirectionalLightComponentTypeId", + "details": { + "name": "Get Editor Directional Light Component Type Id" + }, + "results": [ + { + "typeid": "{E152C105-A133-4D03-BBF8-3D4B2FBA3E2A}", + "details": { + "name": "AZ:: Uuid" + } + } + ] + } + ] + } + ] +} \ No newline at end of file diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/EditorDisplayMapperComponentTypeId.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/EditorDisplayMapperComponentTypeId.names new file mode 100644 index 0000000000..18c54519a9 --- /dev/null +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/EditorDisplayMapperComponentTypeId.names @@ -0,0 +1,29 @@ +{ + "entries": [ + { + "base": "EditorDisplayMapperComponentTypeId", + "context": "Constant", + "variant": "", + "details": { + "name": "Editor Display Mapper Component Type Id", + "category": "Constants/Editor" + }, + "methods": [ + { + "base": "GetEditorDisplayMapperComponentTypeId", + "details": { + "name": "Get Editor Display Mapper Component Type Id" + }, + "results": [ + { + "typeid": "{E152C105-A133-4D03-BBF8-3D4B2FBA3E2A}", + "details": { + "name": "AZ:: Uuid" + } + } + ] + } + ] + } + ] +} \ No newline at end of file diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/EditorEntityReferenceComponentTypeId.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/EditorEntityReferenceComponentTypeId.names new file mode 100644 index 0000000000..96f3adf90b --- /dev/null +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/EditorEntityReferenceComponentTypeId.names @@ -0,0 +1,29 @@ +{ + "entries": [ + { + "base": "EditorEntityReferenceComponentTypeId", + "context": "Constant", + "variant": "", + "details": { + "name": "Editor Entity Reference Component Type Id", + "category": "Constants/Editor" + }, + "methods": [ + { + "base": "GetEditorEntityReferenceComponentTypeId", + "details": { + "name": "Get Editor Entity Reference Component Type Id" + }, + "results": [ + { + "typeid": "{E152C105-A133-4D03-BBF8-3D4B2FBA3E2A}", + "details": { + "name": "AZ:: Uuid" + } + } + ] + } + ] + } + ] +} \ No newline at end of file diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/EditorEntityStartStatus_EditorOnly.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/EditorEntityStartStatus_EditorOnly.names new file mode 100644 index 0000000000..f9536eeddc --- /dev/null +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/EditorEntityStartStatus_EditorOnly.names @@ -0,0 +1,29 @@ +{ + "entries": [ + { + "base": "EditorEntityStartStatus_EditorOnly", + "context": "Constant", + "variant": "", + "details": { + "name": "Editor Entity Start Status_ Editor Only", + "category": "Constants/Editor" + }, + "methods": [ + { + "base": "GetEditorEntityStartStatus_EditorOnly", + "details": { + "name": "Get Editor Entity Start Status_ Editor Only" + }, + "results": [ + { + "typeid": "{72039442-EB38-4D42-A1AD-CB68F7E0EEF6}", + "details": { + "name": "int" + } + } + ] + } + ] + } + ] +} \ No newline at end of file diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/EditorEntityStartStatus_StartActive.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/EditorEntityStartStatus_StartActive.names new file mode 100644 index 0000000000..a6585f24ed --- /dev/null +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/EditorEntityStartStatus_StartActive.names @@ -0,0 +1,29 @@ +{ + "entries": [ + { + "base": "EditorEntityStartStatus_StartActive", + "context": "Constant", + "variant": "", + "details": { + "name": "Editor Entity Start Status_ Start Active", + "category": "Constants/Editor" + }, + "methods": [ + { + "base": "GetEditorEntityStartStatus_StartActive", + "details": { + "name": "Get Editor Entity Start Status_ Start Active" + }, + "results": [ + { + "typeid": "{72039442-EB38-4D42-A1AD-CB68F7E0EEF6}", + "details": { + "name": "int" + } + } + ] + } + ] + } + ] +} \ No newline at end of file diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/EditorEntityStartStatus_StartInactive.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/EditorEntityStartStatus_StartInactive.names new file mode 100644 index 0000000000..20ed53be3d --- /dev/null +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/EditorEntityStartStatus_StartInactive.names @@ -0,0 +1,29 @@ +{ + "entries": [ + { + "base": "EditorEntityStartStatus_StartInactive", + "context": "Constant", + "variant": "", + "details": { + "name": "Editor Entity Start Status_ Start Inactive", + "category": "Constants/Editor" + }, + "methods": [ + { + "base": "GetEditorEntityStartStatus_StartInactive", + "details": { + "name": "Get Editor Entity Start Status_ Start Inactive" + }, + "results": [ + { + "typeid": "{72039442-EB38-4D42-A1AD-CB68F7E0EEF6}", + "details": { + "name": "int" + } + } + ] + } + ] + } + ] +} \ No newline at end of file diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/EditorExposureControlComponentTypeId.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/EditorExposureControlComponentTypeId.names new file mode 100644 index 0000000000..d5722e7279 --- /dev/null +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/EditorExposureControlComponentTypeId.names @@ -0,0 +1,29 @@ +{ + "entries": [ + { + "base": "EditorExposureControlComponentTypeId", + "context": "Constant", + "variant": "", + "details": { + "name": "Editor Exposure Control Component Type Id", + "category": "Constants/Editor" + }, + "methods": [ + { + "base": "GetEditorExposureControlComponentTypeId", + "details": { + "name": "Get Editor Exposure Control Component Type Id" + }, + "results": [ + { + "typeid": "{E152C105-A133-4D03-BBF8-3D4B2FBA3E2A}", + "details": { + "name": "AZ:: Uuid" + } + } + ] + } + ] + } + ] +} \ No newline at end of file diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/EditorGradientWeightModifierComponentTypeId.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/EditorGradientWeightModifierComponentTypeId.names new file mode 100644 index 0000000000..12178cd421 --- /dev/null +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/EditorGradientWeightModifierComponentTypeId.names @@ -0,0 +1,29 @@ +{ + "entries": [ + { + "base": "EditorGradientWeightModifierComponentTypeId", + "context": "Constant", + "variant": "", + "details": { + "name": "Editor Gradient Weight Modifier Component Type Id", + "category": "Constants/Editor" + }, + "methods": [ + { + "base": "GetEditorGradientWeightModifierComponentTypeId", + "details": { + "name": "Get Editor Gradient Weight Modifier Component Type Id" + }, + "results": [ + { + "typeid": "{E152C105-A133-4D03-BBF8-3D4B2FBA3E2A}", + "details": { + "name": "AZ:: Uuid" + } + } + ] + } + ] + } + ] +} \ No newline at end of file diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/EditorGridComponentTypeId.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/EditorGridComponentTypeId.names new file mode 100644 index 0000000000..72969664a5 --- /dev/null +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/EditorGridComponentTypeId.names @@ -0,0 +1,29 @@ +{ + "entries": [ + { + "base": "EditorGridComponentTypeId", + "context": "Constant", + "variant": "", + "details": { + "name": "Editor Grid Component Type Id", + "category": "Constants/Editor" + }, + "methods": [ + { + "base": "GetEditorGridComponentTypeId", + "details": { + "name": "Get Editor Grid Component Type Id" + }, + "results": [ + { + "typeid": "{E152C105-A133-4D03-BBF8-3D4B2FBA3E2A}", + "details": { + "name": "AZ:: Uuid" + } + } + ] + } + ] + } + ] +} \ No newline at end of file diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/EditorHDRiSkyboxComponentTypeId.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/EditorHDRiSkyboxComponentTypeId.names new file mode 100644 index 0000000000..52bd2fe5af --- /dev/null +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/EditorHDRiSkyboxComponentTypeId.names @@ -0,0 +1,29 @@ +{ + "entries": [ + { + "base": "EditorHDRiSkyboxComponentTypeId", + "context": "Constant", + "variant": "", + "details": { + "name": "EditorHD Ri Skybox Component Type Id", + "category": "Constants/Editor" + }, + "methods": [ + { + "base": "GetEditorHDRiSkyboxComponentTypeId", + "details": { + "name": "Get EditorHD Ri Skybox Component Type Id" + }, + "results": [ + { + "typeid": "{E152C105-A133-4D03-BBF8-3D4B2FBA3E2A}", + "details": { + "name": "AZ:: Uuid" + } + } + ] + } + ] + } + ] +} \ No newline at end of file diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/EditorHairComponentTypeId.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/EditorHairComponentTypeId.names new file mode 100644 index 0000000000..17df6d3de5 --- /dev/null +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/EditorHairComponentTypeId.names @@ -0,0 +1,29 @@ +{ + "entries": [ + { + "base": "EditorHairComponentTypeId", + "context": "Constant", + "variant": "", + "details": { + "name": "Editor Hair Component Type Id", + "category": "Constants/Editor" + }, + "methods": [ + { + "base": "GetEditorHairComponentTypeId", + "details": { + "name": "Get Editor Hair Component Type Id" + }, + "results": [ + { + "typeid": "{E152C105-A133-4D03-BBF8-3D4B2FBA3E2A}", + "details": { + "name": "AZ:: Uuid" + } + } + ] + } + ] + } + ] +} \ No newline at end of file diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/EditorImageBasedLightComponentTypeId.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/EditorImageBasedLightComponentTypeId.names new file mode 100644 index 0000000000..a57151ad18 --- /dev/null +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/EditorImageBasedLightComponentTypeId.names @@ -0,0 +1,29 @@ +{ + "entries": [ + { + "base": "EditorImageBasedLightComponentTypeId", + "context": "Constant", + "variant": "", + "details": { + "name": "Editor Image Based Light Component Type Id", + "category": "Constants/Editor" + }, + "methods": [ + { + "base": "GetEditorImageBasedLightComponentTypeId", + "details": { + "name": "Get Editor Image Based Light Component Type Id" + }, + "results": [ + { + "typeid": "{E152C105-A133-4D03-BBF8-3D4B2FBA3E2A}", + "details": { + "name": "AZ:: Uuid" + } + } + ] + } + ] + } + ] +} \ No newline at end of file diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/EditorLookModificationComponentTypeId.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/EditorLookModificationComponentTypeId.names new file mode 100644 index 0000000000..6d2fdbd5f0 --- /dev/null +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/EditorLookModificationComponentTypeId.names @@ -0,0 +1,29 @@ +{ + "entries": [ + { + "base": "EditorLookModificationComponentTypeId", + "context": "Constant", + "variant": "", + "details": { + "name": "Editor Look Modification Component Type Id", + "category": "Constants/Editor" + }, + "methods": [ + { + "base": "GetEditorLookModificationComponentTypeId", + "details": { + "name": "Get Editor Look Modification Component Type Id" + }, + "results": [ + { + "typeid": "{E152C105-A133-4D03-BBF8-3D4B2FBA3E2A}", + "details": { + "name": "AZ:: Uuid" + } + } + ] + } + ] + } + ] +} \ No newline at end of file diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/EditorMaterialComponentTypeId.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/EditorMaterialComponentTypeId.names new file mode 100644 index 0000000000..385edba4d8 --- /dev/null +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/EditorMaterialComponentTypeId.names @@ -0,0 +1,29 @@ +{ + "entries": [ + { + "base": "EditorMaterialComponentTypeId", + "context": "Constant", + "variant": "", + "details": { + "name": "Editor Material Component Type Id", + "category": "Constants/Editor" + }, + "methods": [ + { + "base": "GetEditorMaterialComponentTypeId", + "details": { + "name": "Get Editor Material Component Type Id" + }, + "results": [ + { + "typeid": "{E152C105-A133-4D03-BBF8-3D4B2FBA3E2A}", + "details": { + "name": "AZ:: Uuid" + } + } + ] + } + ] + } + ] +} \ No newline at end of file diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/EditorMeshComponentTypeId.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/EditorMeshComponentTypeId.names new file mode 100644 index 0000000000..59cdcabefa --- /dev/null +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/EditorMeshComponentTypeId.names @@ -0,0 +1,29 @@ +{ + "entries": [ + { + "base": "EditorMeshComponentTypeId", + "context": "Constant", + "variant": "", + "details": { + "name": "Editor Mesh Component Type Id", + "category": "Constants/Editor" + }, + "methods": [ + { + "base": "GetEditorMeshComponentTypeId", + "details": { + "name": "Get Editor Mesh Component Type Id" + }, + "results": [ + { + "typeid": "{E152C105-A133-4D03-BBF8-3D4B2FBA3E2A}", + "details": { + "name": "AZ:: Uuid" + } + } + ] + } + ] + } + ] +} \ No newline at end of file diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/EditorNonUniformScaleComponentTypeId.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/EditorNonUniformScaleComponentTypeId.names new file mode 100644 index 0000000000..bde0970c36 --- /dev/null +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/EditorNonUniformScaleComponentTypeId.names @@ -0,0 +1,29 @@ +{ + "entries": [ + { + "base": "EditorNonUniformScaleComponentTypeId", + "context": "Constant", + "variant": "", + "details": { + "name": "Editor Non Uniform Scale Component Type Id", + "category": "Constants/Editor" + }, + "methods": [ + { + "base": "GetEditorNonUniformScaleComponentTypeId", + "details": { + "name": "Get Editor Non Uniform Scale Component Type Id" + }, + "results": [ + { + "typeid": "{E152C105-A133-4D03-BBF8-3D4B2FBA3E2A}", + "details": { + "name": "AZ:: Uuid" + } + } + ] + } + ] + } + ] +} \ No newline at end of file diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/EditorOcclusionCullingPlaneComponentTypeId.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/EditorOcclusionCullingPlaneComponentTypeId.names new file mode 100644 index 0000000000..bd40fae6ac --- /dev/null +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/EditorOcclusionCullingPlaneComponentTypeId.names @@ -0,0 +1,29 @@ +{ + "entries": [ + { + "base": "EditorOcclusionCullingPlaneComponentTypeId", + "context": "Constant", + "variant": "", + "details": { + "name": "Editor Occlusion Culling Plane Component Type Id", + "category": "Constants/Editor" + }, + "methods": [ + { + "base": "GetEditorOcclusionCullingPlaneComponentTypeId", + "details": { + "name": "Get Editor Occlusion Culling Plane Component Type Id" + }, + "results": [ + { + "typeid": "{E152C105-A133-4D03-BBF8-3D4B2FBA3E2A}", + "details": { + "name": "AZ:: Uuid" + } + } + ] + } + ] + } + ] +} \ No newline at end of file diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/EditorPhysicalSkyComponentTypeId.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/EditorPhysicalSkyComponentTypeId.names new file mode 100644 index 0000000000..f021e937f5 --- /dev/null +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/EditorPhysicalSkyComponentTypeId.names @@ -0,0 +1,29 @@ +{ + "entries": [ + { + "base": "EditorPhysicalSkyComponentTypeId", + "context": "Constant", + "variant": "", + "details": { + "name": "Editor Physical Sky Component Type Id", + "category": "Constants/Editor" + }, + "methods": [ + { + "base": "GetEditorPhysicalSkyComponentTypeId", + "details": { + "name": "Get Editor Physical Sky Component Type Id" + }, + "results": [ + { + "typeid": "{E152C105-A133-4D03-BBF8-3D4B2FBA3E2A}", + "details": { + "name": "AZ:: Uuid" + } + } + ] + } + ] + } + ] +} \ No newline at end of file diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/EditorPhysicsSceneId.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/EditorPhysicsSceneId.names new file mode 100644 index 0000000000..3961b7492a --- /dev/null +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/EditorPhysicsSceneId.names @@ -0,0 +1,29 @@ +{ + "entries": [ + { + "base": "EditorPhysicsSceneId", + "context": "Constant", + "variant": "", + "details": { + "name": "Editor Physics Scene Id", + "category": "Constants/Editor" + }, + "methods": [ + { + "base": "GetEditorPhysicsSceneId", + "details": { + "name": "Get Editor Physics Scene Id" + }, + "results": [ + { + "typeid": "{9F4E062E-06A0-46D4-85DF-E0DA96467D3A}", + "details": { + "name": "Crc 32" + } + } + ] + } + ] + } + ] +} \ No newline at end of file diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/EditorPhysicsSceneName.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/EditorPhysicsSceneName.names new file mode 100644 index 0000000000..1c8884e7a3 --- /dev/null +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/EditorPhysicsSceneName.names @@ -0,0 +1,29 @@ +{ + "entries": [ + { + "base": "EditorPhysicsSceneName", + "context": "Constant", + "variant": "", + "details": { + "name": "Editor Physics Scene Name", + "category": "Constants/Editor" + }, + "methods": [ + { + "base": "GetEditorPhysicsSceneName", + "details": { + "name": "Get Editor Physics Scene Name" + }, + "results": [ + { + "typeid": "{3AB0037F-AF8D-48CE-BCA0-A170D18B2C03}", + "details": { + "name": "char" + } + } + ] + } + ] + } + ] +} \ No newline at end of file diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/EditorPostFxLayerComponentTypeId.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/EditorPostFxLayerComponentTypeId.names new file mode 100644 index 0000000000..45c05cc768 --- /dev/null +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/EditorPostFxLayerComponentTypeId.names @@ -0,0 +1,29 @@ +{ + "entries": [ + { + "base": "EditorPostFxLayerComponentTypeId", + "context": "Constant", + "variant": "", + "details": { + "name": "Editor Post Fx Layer Component Type Id", + "category": "Constants/Editor" + }, + "methods": [ + { + "base": "GetEditorPostFxLayerComponentTypeId", + "details": { + "name": "Get Editor Post Fx Layer Component Type Id" + }, + "results": [ + { + "typeid": "{E152C105-A133-4D03-BBF8-3D4B2FBA3E2A}", + "details": { + "name": "AZ:: Uuid" + } + } + ] + } + ] + } + ] +} \ No newline at end of file diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/EditorPrefabComponentTypeId.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/EditorPrefabComponentTypeId.names new file mode 100644 index 0000000000..c120f6de8e --- /dev/null +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/EditorPrefabComponentTypeId.names @@ -0,0 +1,29 @@ +{ + "entries": [ + { + "base": "EditorPrefabComponentTypeId", + "context": "Constant", + "variant": "", + "details": { + "name": "Editor Prefab Component Type Id", + "category": "Constants/Editor" + }, + "methods": [ + { + "base": "GetEditorPrefabComponentTypeId", + "details": { + "name": "Get Editor Prefab Component Type Id" + }, + "results": [ + { + "typeid": "{E152C105-A133-4D03-BBF8-3D4B2FBA3E2A}", + "details": { + "name": "AZ:: Uuid" + } + } + ] + } + ] + } + ] +} \ No newline at end of file diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/EditorRadiusWeightModifierComponentTypeId.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/EditorRadiusWeightModifierComponentTypeId.names new file mode 100644 index 0000000000..f7b519633f --- /dev/null +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/EditorRadiusWeightModifierComponentTypeId.names @@ -0,0 +1,29 @@ +{ + "entries": [ + { + "base": "EditorRadiusWeightModifierComponentTypeId", + "context": "Constant", + "variant": "", + "details": { + "name": "Editor Radius Weight Modifier Component Type Id", + "category": "Constants/Editor" + }, + "methods": [ + { + "base": "GetEditorRadiusWeightModifierComponentTypeId", + "details": { + "name": "Get Editor Radius Weight Modifier Component Type Id" + }, + "results": [ + { + "typeid": "{E152C105-A133-4D03-BBF8-3D4B2FBA3E2A}", + "details": { + "name": "AZ:: Uuid" + } + } + ] + } + ] + } + ] +} \ No newline at end of file diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/EditorReflectionProbeComponentTypeId.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/EditorReflectionProbeComponentTypeId.names new file mode 100644 index 0000000000..caf01ce791 --- /dev/null +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/EditorReflectionProbeComponentTypeId.names @@ -0,0 +1,29 @@ +{ + "entries": [ + { + "base": "EditorReflectionProbeComponentTypeId", + "context": "Constant", + "variant": "", + "details": { + "name": "Editor Reflection Probe Component Type Id", + "category": "Constants/Editor" + }, + "methods": [ + { + "base": "GetEditorReflectionProbeComponentTypeId", + "details": { + "name": "Get Editor Reflection Probe Component Type Id" + }, + "results": [ + { + "typeid": "{E152C105-A133-4D03-BBF8-3D4B2FBA3E2A}", + "details": { + "name": "AZ:: Uuid" + } + } + ] + } + ] + } + ] +} \ No newline at end of file diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/EditorShapeWeightModifierComponentTypeId.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/EditorShapeWeightModifierComponentTypeId.names new file mode 100644 index 0000000000..965d0a0264 --- /dev/null +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/EditorShapeWeightModifierComponentTypeId.names @@ -0,0 +1,29 @@ +{ + "entries": [ + { + "base": "EditorShapeWeightModifierComponentTypeId", + "context": "Constant", + "variant": "", + "details": { + "name": "Editor Shape Weight Modifier Component Type Id", + "category": "Constants/Editor" + }, + "methods": [ + { + "base": "GetEditorShapeWeightModifierComponentTypeId", + "details": { + "name": "Get Editor Shape Weight Modifier Component Type Id" + }, + "results": [ + { + "typeid": "{E152C105-A133-4D03-BBF8-3D4B2FBA3E2A}", + "details": { + "name": "AZ:: Uuid" + } + } + ] + } + ] + } + ] +} \ No newline at end of file diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/EditorSsaoComponentTypeId.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/EditorSsaoComponentTypeId.names new file mode 100644 index 0000000000..c041c1bf04 --- /dev/null +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/EditorSsaoComponentTypeId.names @@ -0,0 +1,29 @@ +{ + "entries": [ + { + "base": "EditorSsaoComponentTypeId", + "context": "Constant", + "variant": "", + "details": { + "name": "Editor Ssao Component Type Id", + "category": "Constants/Editor" + }, + "methods": [ + { + "base": "GetEditorSsaoComponentTypeId", + "details": { + "name": "Get Editor Ssao Component Type Id" + }, + "results": [ + { + "typeid": "{E152C105-A133-4D03-BBF8-3D4B2FBA3E2A}", + "details": { + "name": "AZ:: Uuid" + } + } + ] + } + ] + } + ] +} \ No newline at end of file diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/EditorTransformComponentTypeId.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/EditorTransformComponentTypeId.names new file mode 100644 index 0000000000..d3d17c73cc --- /dev/null +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/EditorTransformComponentTypeId.names @@ -0,0 +1,29 @@ +{ + "entries": [ + { + "base": "EditorTransformComponentTypeId", + "context": "Constant", + "variant": "", + "details": { + "name": "Editor Transform Component Type Id", + "category": "Constants/Editor" + }, + "methods": [ + { + "base": "GetEditorTransformComponentTypeId", + "details": { + "name": "Get Editor Transform Component Type Id" + }, + "results": [ + { + "typeid": "{E152C105-A133-4D03-BBF8-3D4B2FBA3E2A}", + "details": { + "name": "AZ:: Uuid" + } + } + ] + } + ] + } + ] +} \ No newline at end of file diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/EntityReferenceComponentTypeId.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/EntityReferenceComponentTypeId.names new file mode 100644 index 0000000000..e5d76d415c --- /dev/null +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/EntityReferenceComponentTypeId.names @@ -0,0 +1,29 @@ +{ + "entries": [ + { + "base": "EntityReferenceComponentTypeId", + "context": "Constant", + "variant": "", + "details": { + "name": "Entity Reference Component Type Id", + "category": "Constants/Editor" + }, + "methods": [ + { + "base": "GetEntityReferenceComponentTypeId", + "details": { + "name": "Get Entity Reference Component Type Id" + }, + "results": [ + { + "typeid": "{E152C105-A133-4D03-BBF8-3D4B2FBA3E2A}", + "details": { + "name": "AZ:: Uuid" + } + } + ] + } + ] + } + ] +} \ No newline at end of file diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/ExposureControlComponentTypeId.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/ExposureControlComponentTypeId.names new file mode 100644 index 0000000000..cea1b1bcee --- /dev/null +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/ExposureControlComponentTypeId.names @@ -0,0 +1,29 @@ +{ + "entries": [ + { + "base": "ExposureControlComponentTypeId", + "context": "Constant", + "variant": "", + "details": { + "name": "Exposure Control Component Type Id", + "category": "Constants/Editor" + }, + "methods": [ + { + "base": "GetExposureControlComponentTypeId", + "details": { + "name": "Get Exposure Control Component Type Id" + }, + "results": [ + { + "typeid": "{E152C105-A133-4D03-BBF8-3D4B2FBA3E2A}", + "details": { + "name": "AZ:: Uuid" + } + } + ] + } + ] + } + ] +} \ No newline at end of file diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/FastNoiseGradientComponentTypeId.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/FastNoiseGradientComponentTypeId.names new file mode 100644 index 0000000000..3a1b1e3def --- /dev/null +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/FastNoiseGradientComponentTypeId.names @@ -0,0 +1,29 @@ +{ + "entries": [ + { + "base": "FastNoiseGradientComponentTypeId", + "context": "Constant", + "variant": "", + "details": { + "name": "Fast Noise Gradient Component Type Id", + "category": "Constants/Editor" + }, + "methods": [ + { + "base": "GetFastNoiseGradientComponentTypeId", + "details": { + "name": "Get Fast Noise Gradient Component Type Id" + }, + "results": [ + { + "typeid": "{E152C105-A133-4D03-BBF8-3D4B2FBA3E2A}", + "details": { + "name": "AZ:: Uuid" + } + } + ] + } + ] + } + ] +} \ No newline at end of file diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/FillMode_Invalid.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/FillMode_Invalid.names new file mode 100644 index 0000000000..aa856455f5 --- /dev/null +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/FillMode_Invalid.names @@ -0,0 +1,29 @@ +{ + "entries": [ + { + "base": "FillMode_Invalid", + "context": "Constant", + "variant": "", + "details": { + "name": "Invalid", + "category": "Constants/Fill Mode" + }, + "methods": [ + { + "base": "GetFillMode_Invalid", + "details": { + "name": "Invalid" + }, + "results": [ + { + "typeid": "{72039442-EB38-4D42-A1AD-CB68F7E0EEF6}", + "details": { + "name": "int" + } + } + ] + } + ] + } + ] +} \ No newline at end of file diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/FillMode_Solid.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/FillMode_Solid.names new file mode 100644 index 0000000000..1eecbacacf --- /dev/null +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/FillMode_Solid.names @@ -0,0 +1,29 @@ +{ + "entries": [ + { + "base": "FillMode_Solid", + "context": "Constant", + "variant": "", + "details": { + "name": "Solid", + "category": "Constants/Fill Mode" + }, + "methods": [ + { + "base": "GetFillMode_Solid", + "details": { + "name": "Solid" + }, + "results": [ + { + "typeid": "{72039442-EB38-4D42-A1AD-CB68F7E0EEF6}", + "details": { + "name": "int" + } + } + ] + } + ] + } + ] +} \ No newline at end of file diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/FillMode_Wireframe.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/FillMode_Wireframe.names new file mode 100644 index 0000000000..382f55dca8 --- /dev/null +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/FillMode_Wireframe.names @@ -0,0 +1,29 @@ +{ + "entries": [ + { + "base": "FillMode_Wireframe", + "context": "Constant", + "variant": "", + "details": { + "name": "Wireframe", + "category": "Constants/Fill Mode" + }, + "methods": [ + { + "base": "GetFillMode_Wireframe", + "details": { + "name": "Wireframe" + }, + "results": [ + { + "typeid": "{72039442-EB38-4D42-A1AD-CB68F7E0EEF6}", + "details": { + "name": "int" + } + } + ] + } + ] + } + ] +} \ No newline at end of file diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/FloatEpsilon.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/FloatEpsilon.names new file mode 100644 index 0000000000..b5dc4c02d7 --- /dev/null +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/FloatEpsilon.names @@ -0,0 +1,29 @@ +{ + "entries": [ + { + "base": "FloatEpsilon", + "context": "Constant", + "variant": "", + "details": { + "name": "Float Epsilon", + "category": "Constants/Numeric" + }, + "methods": [ + { + "base": "GetFloatEpsilon", + "details": { + "name": "Float Epsilon" + }, + "results": [ + { + "typeid": "{EA2C3E90-AFBE-44D4-A90D-FAAF79BAF93D}", + "details": { + "name": "float" + } + } + ] + } + ] + } + ] +} \ No newline at end of file diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/FrameCaptureResult_FileWriteError.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/FrameCaptureResult_FileWriteError.names new file mode 100644 index 0000000000..81ab3e2c12 --- /dev/null +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/FrameCaptureResult_FileWriteError.names @@ -0,0 +1,29 @@ +{ + "entries": [ + { + "base": "FrameCaptureResult_FileWriteError", + "context": "Constant", + "variant": "", + "details": { + "name": "File Write Error", + "category": "Constants/Frame Capture Result" + }, + "methods": [ + { + "base": "GetFrameCaptureResult_FileWriteError", + "details": { + "name": "File Write Error" + }, + "results": [ + { + "typeid": "{72039442-EB38-4D42-A1AD-CB68F7E0EEF6}", + "details": { + "name": "int" + } + } + ] + } + ] + } + ] +} \ No newline at end of file diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/FrameCaptureResult_InternalError.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/FrameCaptureResult_InternalError.names new file mode 100644 index 0000000000..168f94594e --- /dev/null +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/FrameCaptureResult_InternalError.names @@ -0,0 +1,29 @@ +{ + "entries": [ + { + "base": "FrameCaptureResult_InternalError", + "context": "Constant", + "variant": "", + "details": { + "name": "Internal Error", + "category": "Constants/Frame Capture Result" + }, + "methods": [ + { + "base": "GetFrameCaptureResult_InternalError", + "details": { + "name": "Internal Error" + }, + "results": [ + { + "typeid": "{72039442-EB38-4D42-A1AD-CB68F7E0EEF6}", + "details": { + "name": "int" + } + } + ] + } + ] + } + ] +} \ No newline at end of file diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/FrameCaptureResult_InvalidArgument.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/FrameCaptureResult_InvalidArgument.names new file mode 100644 index 0000000000..983e8193e3 --- /dev/null +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/FrameCaptureResult_InvalidArgument.names @@ -0,0 +1,29 @@ +{ + "entries": [ + { + "base": "FrameCaptureResult_InvalidArgument", + "context": "Constant", + "variant": "", + "details": { + "name": "Invalid Argument", + "category": "Constants/Frame Capture Result" + }, + "methods": [ + { + "base": "GetFrameCaptureResult_InvalidArgument", + "details": { + "name": "Invalid Argument" + }, + "results": [ + { + "typeid": "{72039442-EB38-4D42-A1AD-CB68F7E0EEF6}", + "details": { + "name": "int" + } + } + ] + } + ] + } + ] +} \ No newline at end of file diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/FrameCaptureResult_None.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/FrameCaptureResult_None.names new file mode 100644 index 0000000000..8ab7a2ff17 --- /dev/null +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/FrameCaptureResult_None.names @@ -0,0 +1,29 @@ +{ + "entries": [ + { + "base": "FrameCaptureResult_None", + "context": "Constant", + "variant": "", + "details": { + "name": "None", + "category": "Constants/Frame Capture Result" + }, + "methods": [ + { + "base": "GetFrameCaptureResult_None", + "details": { + "name": "None" + }, + "results": [ + { + "typeid": "{72039442-EB38-4D42-A1AD-CB68F7E0EEF6}", + "details": { + "name": "int" + } + } + ] + } + ] + } + ] +} \ No newline at end of file diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/FrameCaptureResult_Success.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/FrameCaptureResult_Success.names new file mode 100644 index 0000000000..a7704a07a0 --- /dev/null +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/FrameCaptureResult_Success.names @@ -0,0 +1,29 @@ +{ + "entries": [ + { + "base": "FrameCaptureResult_Success", + "context": "Constant", + "variant": "", + "details": { + "name": "Success", + "category": "Constants/Frame Capture Result" + }, + "methods": [ + { + "base": "GetFrameCaptureResult_Success", + "details": { + "name": "Success" + }, + "results": [ + { + "typeid": "{72039442-EB38-4D42-A1AD-CB68F7E0EEF6}", + "details": { + "name": "int" + } + } + ] + } + ] + } + ] +} \ No newline at end of file diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/FrameCaptureResult_UnsupportedFormat.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/FrameCaptureResult_UnsupportedFormat.names new file mode 100644 index 0000000000..f16d51f8a0 --- /dev/null +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/FrameCaptureResult_UnsupportedFormat.names @@ -0,0 +1,29 @@ +{ + "entries": [ + { + "base": "FrameCaptureResult_UnsupportedFormat", + "context": "Constant", + "variant": "", + "details": { + "name": "Unsupported Format", + "category": "Constants/Frame Capture Result" + }, + "methods": [ + { + "base": "GetFrameCaptureResult_UnsupportedFormat", + "details": { + "name": "Unsupported Format" + }, + "results": [ + { + "typeid": "{72039442-EB38-4D42-A1AD-CB68F7E0EEF6}", + "details": { + "name": "int" + } + } + ] + } + ] + } + ] +} \ No newline at end of file diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/GradientSurfaceDataComponentTypeId.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/GradientSurfaceDataComponentTypeId.names new file mode 100644 index 0000000000..977aa61049 --- /dev/null +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/GradientSurfaceDataComponentTypeId.names @@ -0,0 +1,29 @@ +{ + "entries": [ + { + "base": "GradientSurfaceDataComponentTypeId", + "context": "Constant", + "variant": "", + "details": { + "name": "Gradient Surface Data Component Type Id", + "category": "Constants/Editor" + }, + "methods": [ + { + "base": "GetGradientSurfaceDataComponentTypeId", + "details": { + "name": "Get Gradient Surface Data Component Type Id" + }, + "results": [ + { + "typeid": "{E152C105-A133-4D03-BBF8-3D4B2FBA3E2A}", + "details": { + "name": "AZ:: Uuid" + } + } + ] + } + ] + } + ] +} \ No newline at end of file diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/GradientTransformComponentTypeId.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/GradientTransformComponentTypeId.names new file mode 100644 index 0000000000..ff20414bcf --- /dev/null +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/GradientTransformComponentTypeId.names @@ -0,0 +1,29 @@ +{ + "entries": [ + { + "base": "GradientTransformComponentTypeId", + "context": "Constant", + "variant": "", + "details": { + "name": "Gradient Transform Component Type Id", + "category": "Constants/Editor" + }, + "methods": [ + { + "base": "GetGradientTransformComponentTypeId", + "details": { + "name": "Get Gradient Transform Component Type Id" + }, + "results": [ + { + "typeid": "{E152C105-A133-4D03-BBF8-3D4B2FBA3E2A}", + "details": { + "name": "AZ:: Uuid" + } + } + ] + } + ] + } + ] +} \ No newline at end of file diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/GradientWeightModifierComponentTypeId.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/GradientWeightModifierComponentTypeId.names new file mode 100644 index 0000000000..f5f5bfbbc9 --- /dev/null +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/GradientWeightModifierComponentTypeId.names @@ -0,0 +1,29 @@ +{ + "entries": [ + { + "base": "GradientWeightModifierComponentTypeId", + "context": "Constant", + "variant": "", + "details": { + "name": "Gradient Weight Modifier Component Type Id", + "category": "Constants/Editor" + }, + "methods": [ + { + "base": "GetGradientWeightModifierComponentTypeId", + "details": { + "name": "Get Gradient Weight Modifier Component Type Id" + }, + "results": [ + { + "typeid": "{E152C105-A133-4D03-BBF8-3D4B2FBA3E2A}", + "details": { + "name": "AZ:: Uuid" + } + } + ] + } + ] + } + ] +} \ No newline at end of file diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/GridComponentTypeId.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/GridComponentTypeId.names new file mode 100644 index 0000000000..dbe919d573 --- /dev/null +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/GridComponentTypeId.names @@ -0,0 +1,29 @@ +{ + "entries": [ + { + "base": "GridComponentTypeId", + "context": "Constant", + "variant": "", + "details": { + "name": "Grid Component Type Id", + "category": "Constants/Editor" + }, + "methods": [ + { + "base": "GetGridComponentTypeId", + "details": { + "name": "Get Grid Component Type Id" + }, + "results": [ + { + "typeid": "{E152C105-A133-4D03-BBF8-3D4B2FBA3E2A}", + "details": { + "name": "AZ:: Uuid" + } + } + ] + } + ] + } + ] +} \ No newline at end of file diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/HDRiSkyboxComponentTypeId.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/HDRiSkyboxComponentTypeId.names new file mode 100644 index 0000000000..d840a65997 --- /dev/null +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/HDRiSkyboxComponentTypeId.names @@ -0,0 +1,29 @@ +{ + "entries": [ + { + "base": "HDRiSkyboxComponentTypeId", + "context": "Constant", + "variant": "", + "details": { + "name": "HD Ri Skybox Component Type Id", + "category": "Constants/Editor" + }, + "methods": [ + { + "base": "GetHDRiSkyboxComponentTypeId", + "details": { + "name": "GetHD Ri Skybox Component Type Id" + }, + "results": [ + { + "typeid": "{E152C105-A133-4D03-BBF8-3D4B2FBA3E2A}", + "details": { + "name": "AZ:: Uuid" + } + } + ] + } + ] + } + ] +} \ No newline at end of file diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/HairComponentTypeId.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/HairComponentTypeId.names new file mode 100644 index 0000000000..072a9214c8 --- /dev/null +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/HairComponentTypeId.names @@ -0,0 +1,29 @@ +{ + "entries": [ + { + "base": "HairComponentTypeId", + "context": "Constant", + "variant": "", + "details": { + "name": "Hair Component Type Id", + "category": "Constants/Editor" + }, + "methods": [ + { + "base": "GetHairComponentTypeId", + "details": { + "name": "Get Hair Component Type Id" + }, + "results": [ + { + "typeid": "{E152C105-A133-4D03-BBF8-3D4B2FBA3E2A}", + "details": { + "name": "AZ:: Uuid" + } + } + ] + } + ] + } + ] +} \ No newline at end of file diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/ICOSAHEDRON.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/ICOSAHEDRON.names new file mode 100644 index 0000000000..50fd81277d --- /dev/null +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/ICOSAHEDRON.names @@ -0,0 +1,29 @@ +{ + "entries": [ + { + "base": "ICOSAHEDRON", + "context": "Constant", + "variant": "", + "details": { + "name": "Icosahedron", + "category": "Constants/White Box" + }, + "methods": [ + { + "base": "GetICOSAHEDRON", + "details": { + "name": "Icosahedron" + }, + "results": [ + { + "typeid": "{72039442-EB38-4D42-A1AD-CB68F7E0EEF6}", + "details": { + "name": "int" + } + } + ] + } + ] + } + ] +} \ No newline at end of file diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/ImageBasedLightComponentTypeId.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/ImageBasedLightComponentTypeId.names new file mode 100644 index 0000000000..9216b7bfb0 --- /dev/null +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/ImageBasedLightComponentTypeId.names @@ -0,0 +1,29 @@ +{ + "entries": [ + { + "base": "ImageBasedLightComponentTypeId", + "context": "Constant", + "variant": "", + "details": { + "name": "Image Based Light Component Type Id", + "category": "Constants/Editor" + }, + "methods": [ + { + "base": "GetImageBasedLightComponentTypeId", + "details": { + "name": "Get Image Based Light Component Type Id" + }, + "results": [ + { + "typeid": "{E152C105-A133-4D03-BBF8-3D4B2FBA3E2A}", + "details": { + "name": "AZ:: Uuid" + } + } + ] + } + ] + } + ] +} \ No newline at end of file diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/ImageGradientComponentTypeId.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/ImageGradientComponentTypeId.names new file mode 100644 index 0000000000..7a19cff05d --- /dev/null +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/ImageGradientComponentTypeId.names @@ -0,0 +1,29 @@ +{ + "entries": [ + { + "base": "ImageGradientComponentTypeId", + "context": "Constant", + "variant": "", + "details": { + "name": "Image Gradient Component Type Id", + "category": "Constants/Editor" + }, + "methods": [ + { + "base": "GetImageGradientComponentTypeId", + "details": { + "name": "Get Image Gradient Component Type Id" + }, + "results": [ + { + "typeid": "{E152C105-A133-4D03-BBF8-3D4B2FBA3E2A}", + "details": { + "name": "AZ:: Uuid" + } + } + ] + } + ] + } + ] +} \ No newline at end of file diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/InvalidComponentId.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/InvalidComponentId.names new file mode 100644 index 0000000000..726f894d8d --- /dev/null +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/InvalidComponentId.names @@ -0,0 +1,29 @@ +{ + "entries": [ + { + "base": "InvalidComponentId", + "context": "Constant", + "variant": "", + "details": { + "name": "Invalid Component Id", + "category": "Constants/Editor" + }, + "methods": [ + { + "base": "GetInvalidComponentId", + "details": { + "name": "Get Invalid Component Id" + }, + "results": [ + { + "typeid": "{D6597933-47CD-4FC8-B911-63F3E2B0993A}", + "details": { + "name": "AZ::u 64" + } + } + ] + } + ] + } + ] +} \ No newline at end of file diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/InvalidParameterIndex.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/InvalidParameterIndex.names new file mode 100644 index 0000000000..a278dccb34 --- /dev/null +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/InvalidParameterIndex.names @@ -0,0 +1,29 @@ +{ + "entries": [ + { + "base": "InvalidParameterIndex", + "context": "Constant", + "variant": "", + "details": { + "name": "Invalid Parameter Index", + "category": "Constants/Editor" + }, + "methods": [ + { + "base": "GetInvalidParameterIndex", + "details": { + "name": "Get Invalid Parameter Index" + }, + "results": [ + { + "typeid": "{D6597933-47CD-4FC8-B911-63F3E2B0993A}", + "details": { + "name": "AZ::u 64" + } + } + ] + } + ] + } + ] +} \ No newline at end of file diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/InvalidTemplateId.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/InvalidTemplateId.names new file mode 100644 index 0000000000..34f0345f45 --- /dev/null +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/InvalidTemplateId.names @@ -0,0 +1,29 @@ +{ + "entries": [ + { + "base": "InvalidTemplateId", + "context": "Constant", + "variant": "", + "details": { + "name": "Invalid Template Id", + "category": "Constants/Editor" + }, + "methods": [ + { + "base": "GetInvalidTemplateId", + "details": { + "name": "Get Invalid Template Id" + }, + "results": [ + { + "typeid": "{D6597933-47CD-4FC8-B911-63F3E2B0993A}", + "details": { + "name": "AZ::u 64" + } + } + ] + } + ] + } + ] +} \ No newline at end of file diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/InvertGradientComponentTypeId.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/InvertGradientComponentTypeId.names new file mode 100644 index 0000000000..e09f65f71f --- /dev/null +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/InvertGradientComponentTypeId.names @@ -0,0 +1,29 @@ +{ + "entries": [ + { + "base": "InvertGradientComponentTypeId", + "context": "Constant", + "variant": "", + "details": { + "name": "Invert Gradient Component Type Id", + "category": "Constants/Editor" + }, + "methods": [ + { + "base": "GetInvertGradientComponentTypeId", + "details": { + "name": "Get Invert Gradient Component Type Id" + }, + "results": [ + { + "typeid": "{E152C105-A133-4D03-BBF8-3D4B2FBA3E2A}", + "details": { + "name": "AZ:: Uuid" + } + } + ] + } + ] + } + ] +} \ No newline at end of file diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/JsonMergePatch.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/JsonMergePatch.names new file mode 100644 index 0000000000..dda23f91e7 --- /dev/null +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/JsonMergePatch.names @@ -0,0 +1,29 @@ +{ + "entries": [ + { + "base": "JsonMergePatch", + "context": "Constant", + "variant": "", + "details": { + "name": "Json Merge Patch", + "category": "Constants/Json" + }, + "methods": [ + { + "base": "GetJsonMergePatch", + "details": { + "name": "Get Json Merge Patch" + }, + "results": [ + { + "typeid": "{72039442-EB38-4D42-A1AD-CB68F7E0EEF6}", + "details": { + "name": "int" + } + } + ] + } + ] + } + ] +} \ No newline at end of file diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/JsonPatch.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/JsonPatch.names new file mode 100644 index 0000000000..c5288b5e5a --- /dev/null +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/JsonPatch.names @@ -0,0 +1,29 @@ +{ + "entries": [ + { + "base": "JsonPatch", + "context": "Constant", + "variant": "", + "details": { + "name": "Json Patch", + "category": "Constants/Json" + }, + "methods": [ + { + "base": "GetJsonPatch", + "details": { + "name": "Get Json Patch" + }, + "results": [ + { + "typeid": "{72039442-EB38-4D42-A1AD-CB68F7E0EEF6}", + "details": { + "name": "int" + } + } + ] + } + ] + } + ] +} \ No newline at end of file diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/LANDSCAPE_CANVAS_EDITOR_ID.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/LANDSCAPE_CANVAS_EDITOR_ID.names new file mode 100644 index 0000000000..b9aabee87c --- /dev/null +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/LANDSCAPE_CANVAS_EDITOR_ID.names @@ -0,0 +1,29 @@ +{ + "entries": [ + { + "base": "LANDSCAPE_CANVAS_EDITOR_ID", + "context": "Constant", + "variant": "", + "details": { + "name": "Editor Id", + "category": "Constants/Landscape Canvas" + }, + "methods": [ + { + "base": "GetLANDSCAPE_CANVAS_EDITOR_ID", + "details": { + "name": "Editor Id" + }, + "results": [ + { + "typeid": "{9F4E062E-06A0-46D4-85DF-E0DA96467D3A}", + "details": { + "name": "Crc 32" + } + } + ] + } + ] + } + ] +} \ No newline at end of file diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/LevelSettingsComponentTypeId.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/LevelSettingsComponentTypeId.names new file mode 100644 index 0000000000..af01c5f258 --- /dev/null +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/LevelSettingsComponentTypeId.names @@ -0,0 +1,29 @@ +{ + "entries": [ + { + "base": "LevelSettingsComponentTypeId", + "context": "Constant", + "variant": "", + "details": { + "name": "Level Settings Component Type Id", + "category": "Constants/Editor" + }, + "methods": [ + { + "base": "GetLevelSettingsComponentTypeId", + "details": { + "name": "Get Level Settings Component Type Id" + }, + "results": [ + { + "typeid": "{E152C105-A133-4D03-BBF8-3D4B2FBA3E2A}", + "details": { + "name": "AZ:: Uuid" + } + } + ] + } + ] + } + ] +} \ No newline at end of file diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/LevelsGradientComponentTypeId.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/LevelsGradientComponentTypeId.names new file mode 100644 index 0000000000..0f44a7eb3d --- /dev/null +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/LevelsGradientComponentTypeId.names @@ -0,0 +1,29 @@ +{ + "entries": [ + { + "base": "LevelsGradientComponentTypeId", + "context": "Constant", + "variant": "", + "details": { + "name": "Levels Gradient Component Type Id", + "category": "Constants/Editor" + }, + "methods": [ + { + "base": "GetLevelsGradientComponentTypeId", + "details": { + "name": "Get Levels Gradient Component Type Id" + }, + "results": [ + { + "typeid": "{E152C105-A133-4D03-BBF8-3D4B2FBA3E2A}", + "details": { + "name": "AZ:: Uuid" + } + } + ] + } + ] + } + ] +} \ No newline at end of file diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/LightAttenuationRadiusMode_Automatic.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/LightAttenuationRadiusMode_Automatic.names new file mode 100644 index 0000000000..8dac5f9651 --- /dev/null +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/LightAttenuationRadiusMode_Automatic.names @@ -0,0 +1,29 @@ +{ + "entries": [ + { + "base": "LightAttenuationRadiusMode_Automatic", + "context": "Constant", + "variant": "", + "details": { + "name": "Automatic", + "category": "Constants/Light Attenuation Radius Mode" + }, + "methods": [ + { + "base": "GetLightAttenuationRadiusMode_Automatic", + "details": { + "name": "Automatic" + }, + "results": [ + { + "typeid": "{72039442-EB38-4D42-A1AD-CB68F7E0EEF6}", + "details": { + "name": "int" + } + } + ] + } + ] + } + ] +} \ No newline at end of file diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/LightAttenuationRadiusMode_Explicit.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/LightAttenuationRadiusMode_Explicit.names new file mode 100644 index 0000000000..d3f754b147 --- /dev/null +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/LightAttenuationRadiusMode_Explicit.names @@ -0,0 +1,29 @@ +{ + "entries": [ + { + "base": "LightAttenuationRadiusMode_Explicit", + "context": "Constant", + "variant": "", + "details": { + "name": "Explicit", + "category": "Constants/Light Attenuation Radius Mode" + }, + "methods": [ + { + "base": "GetLightAttenuationRadiusMode_Explicit", + "details": { + "name": "Explicit" + }, + "results": [ + { + "typeid": "{72039442-EB38-4D42-A1AD-CB68F7E0EEF6}", + "details": { + "name": "int" + } + } + ] + } + ] + } + ] +} \ No newline at end of file diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/LookModificationComponentTypeId.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/LookModificationComponentTypeId.names new file mode 100644 index 0000000000..4455d529d9 --- /dev/null +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/LookModificationComponentTypeId.names @@ -0,0 +1,29 @@ +{ + "entries": [ + { + "base": "LookModificationComponentTypeId", + "context": "Constant", + "variant": "", + "details": { + "name": "Look Modification Component Type Id", + "category": "Constants/Editor" + }, + "methods": [ + { + "base": "GetLookModificationComponentTypeId", + "details": { + "name": "Get Look Modification Component Type Id" + }, + "results": [ + { + "typeid": "{E152C105-A133-4D03-BBF8-3D4B2FBA3E2A}", + "details": { + "name": "AZ:: Uuid" + } + } + ] + } + ] + } + ] +} \ No newline at end of file diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/MaterialComponentTypeId.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/MaterialComponentTypeId.names new file mode 100644 index 0000000000..30f9afc015 --- /dev/null +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/MaterialComponentTypeId.names @@ -0,0 +1,29 @@ +{ + "entries": [ + { + "base": "MaterialComponentTypeId", + "context": "Constant", + "variant": "", + "details": { + "name": "Material Component Type Id", + "category": "Constants/Editor" + }, + "methods": [ + { + "base": "GetMaterialComponentTypeId", + "details": { + "name": "Get Material Component Type Id" + }, + "results": [ + { + "typeid": "{E152C105-A133-4D03-BBF8-3D4B2FBA3E2A}", + "details": { + "name": "AZ:: Uuid" + } + } + ] + } + ] + } + ] +} \ No newline at end of file diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/MaterialPropertyGroupVisibility_Enabled.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/MaterialPropertyGroupVisibility_Enabled.names new file mode 100644 index 0000000000..2f7eceec8e --- /dev/null +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/MaterialPropertyGroupVisibility_Enabled.names @@ -0,0 +1,29 @@ +{ + "entries": [ + { + "base": "MaterialPropertyGroupVisibility_Enabled", + "context": "Constant", + "variant": "", + "details": { + "name": "Enabled", + "category": "Constants/Material Property Group Visibility" + }, + "methods": [ + { + "base": "GetMaterialPropertyGroupVisibility_Enabled", + "details": { + "name": "Enabled" + }, + "results": [ + { + "typeid": "{72039442-EB38-4D42-A1AD-CB68F7E0EEF6}", + "details": { + "name": "int" + } + } + ] + } + ] + } + ] +} \ No newline at end of file diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/MaterialPropertyGroupVisibility_Hidden.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/MaterialPropertyGroupVisibility_Hidden.names new file mode 100644 index 0000000000..398499a02e --- /dev/null +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/MaterialPropertyGroupVisibility_Hidden.names @@ -0,0 +1,29 @@ +{ + "entries": [ + { + "base": "MaterialPropertyGroupVisibility_Hidden", + "context": "Constant", + "variant": "", + "details": { + "name": "Hidden", + "category": "Constants/Material Property Group Visibility" + }, + "methods": [ + { + "base": "GetMaterialPropertyGroupVisibility_Hidden", + "details": { + "name": "Hidden" + }, + "results": [ + { + "typeid": "{72039442-EB38-4D42-A1AD-CB68F7E0EEF6}", + "details": { + "name": "int" + } + } + ] + } + ] + } + ] +} \ No newline at end of file diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/MaterialPropertyVisibility_Disabled.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/MaterialPropertyVisibility_Disabled.names new file mode 100644 index 0000000000..41647e6229 --- /dev/null +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/MaterialPropertyVisibility_Disabled.names @@ -0,0 +1,29 @@ +{ + "entries": [ + { + "base": "MaterialPropertyVisibility_Disabled", + "context": "Constant", + "variant": "", + "details": { + "name": "Disabled", + "category": "Constants/Material Property Visibility" + }, + "methods": [ + { + "base": "GetMaterialPropertyVisibility_Disabled", + "details": { + "name": "Disabled" + }, + "results": [ + { + "typeid": "{72039442-EB38-4D42-A1AD-CB68F7E0EEF6}", + "details": { + "name": "int" + } + } + ] + } + ] + } + ] +} \ No newline at end of file diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/MaterialPropertyVisibility_Enabled.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/MaterialPropertyVisibility_Enabled.names new file mode 100644 index 0000000000..0b8f55854a --- /dev/null +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/MaterialPropertyVisibility_Enabled.names @@ -0,0 +1,29 @@ +{ + "entries": [ + { + "base": "MaterialPropertyVisibility_Enabled", + "context": "Constant", + "variant": "", + "details": { + "name": "Enabled", + "category": "Constants/Material Property Visibility" + }, + "methods": [ + { + "base": "GetMaterialPropertyVisibility_Enabled", + "details": { + "name": "Enabled" + }, + "results": [ + { + "typeid": "{72039442-EB38-4D42-A1AD-CB68F7E0EEF6}", + "details": { + "name": "int" + } + } + ] + } + ] + } + ] +} \ No newline at end of file diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/MaterialPropertyVisibility_Hidden.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/MaterialPropertyVisibility_Hidden.names new file mode 100644 index 0000000000..f07a8c1a52 --- /dev/null +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/MaterialPropertyVisibility_Hidden.names @@ -0,0 +1,29 @@ +{ + "entries": [ + { + "base": "MaterialPropertyVisibility_Hidden", + "context": "Constant", + "variant": "", + "details": { + "name": "Hidden", + "category": "Constants/Material Property Visibility" + }, + "methods": [ + { + "base": "GetMaterialPropertyVisibility_Hidden", + "details": { + "name": "Hidden" + }, + "results": [ + { + "typeid": "{72039442-EB38-4D42-A1AD-CB68F7E0EEF6}", + "details": { + "name": "int" + } + } + ] + } + ] + } + ] +} \ No newline at end of file diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/MeshBlockerComponentTypeId.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/MeshBlockerComponentTypeId.names new file mode 100644 index 0000000000..d20e624867 --- /dev/null +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/MeshBlockerComponentTypeId.names @@ -0,0 +1,29 @@ +{ + "entries": [ + { + "base": "MeshBlockerComponentTypeId", + "context": "Constant", + "variant": "", + "details": { + "name": "Mesh Blocker Component Type Id", + "category": "Constants/Editor" + }, + "methods": [ + { + "base": "GetMeshBlockerComponentTypeId", + "details": { + "name": "Get Mesh Blocker Component Type Id" + }, + "results": [ + { + "typeid": "{E152C105-A133-4D03-BBF8-3D4B2FBA3E2A}", + "details": { + "name": "AZ:: Uuid" + } + } + ] + } + ] + } + ] +} \ No newline at end of file diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/MeshComponentTypeId.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/MeshComponentTypeId.names new file mode 100644 index 0000000000..0833a7bb15 --- /dev/null +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/MeshComponentTypeId.names @@ -0,0 +1,29 @@ +{ + "entries": [ + { + "base": "MeshComponentTypeId", + "context": "Constant", + "variant": "", + "details": { + "name": "Mesh Component Type Id", + "category": "Constants/Editor" + }, + "methods": [ + { + "base": "GetMeshComponentTypeId", + "details": { + "name": "Get Mesh Component Type Id" + }, + "results": [ + { + "typeid": "{E152C105-A133-4D03-BBF8-3D4B2FBA3E2A}", + "details": { + "name": "AZ:: Uuid" + } + } + ] + } + ] + } + ] +} \ No newline at end of file diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/MixedGradientComponentTypeId.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/MixedGradientComponentTypeId.names new file mode 100644 index 0000000000..3780e45102 --- /dev/null +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/MixedGradientComponentTypeId.names @@ -0,0 +1,29 @@ +{ + "entries": [ + { + "base": "MixedGradientComponentTypeId", + "context": "Constant", + "variant": "", + "details": { + "name": "Mixed Gradient Component Type Id", + "category": "Constants/Editor" + }, + "methods": [ + { + "base": "GetMixedGradientComponentTypeId", + "details": { + "name": "Get Mixed Gradient Component Type Id" + }, + "results": [ + { + "typeid": "{E152C105-A133-4D03-BBF8-3D4B2FBA3E2A}", + "details": { + "name": "AZ:: Uuid" + } + } + ] + } + ] + } + ] +} \ No newline at end of file diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/MultiPositionBehaviorType_Blended.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/MultiPositionBehaviorType_Blended.names new file mode 100644 index 0000000000..3d14e91e22 --- /dev/null +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/MultiPositionBehaviorType_Blended.names @@ -0,0 +1,29 @@ +{ + "entries": [ + { + "base": "MultiPositionBehaviorType_Blended", + "context": "Constant", + "variant": "", + "details": { + "name": "Blended", + "category": "Constants/Multi Position Behavior Type" + }, + "methods": [ + { + "base": "GetMultiPositionBehaviorType_Blended", + "details": { + "name": "Blended" + }, + "results": [ + { + "typeid": "{43DA906B-7DEF-4CA8-9790-854106D3F983}", + "details": { + "name": "unsigned int" + } + } + ] + } + ] + } + ] +} \ No newline at end of file diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/MultiPositionBehaviorType_Separate.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/MultiPositionBehaviorType_Separate.names new file mode 100644 index 0000000000..15577ca173 --- /dev/null +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/MultiPositionBehaviorType_Separate.names @@ -0,0 +1,29 @@ +{ + "entries": [ + { + "base": "MultiPositionBehaviorType_Separate", + "context": "Constant", + "variant": "", + "details": { + "name": "Separate", + "category": "Constants/Multi Position Behavior Type" + }, + "methods": [ + { + "base": "GetMultiPositionBehaviorType_Separate", + "details": { + "name": "Separate" + }, + "results": [ + { + "typeid": "{43DA906B-7DEF-4CA8-9790-854106D3F983}", + "details": { + "name": "unsigned int" + } + } + ] + } + ] + } + ] +} \ No newline at end of file diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/OcclusionCullingPlaneComponentTypeId.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/OcclusionCullingPlaneComponentTypeId.names new file mode 100644 index 0000000000..685d61f8a7 --- /dev/null +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/OcclusionCullingPlaneComponentTypeId.names @@ -0,0 +1,29 @@ +{ + "entries": [ + { + "base": "OcclusionCullingPlaneComponentTypeId", + "context": "Constant", + "variant": "", + "details": { + "name": "Occlusion Culling Plane Component Type Id", + "category": "Constants/Editor" + }, + "methods": [ + { + "base": "GetOcclusionCullingPlaneComponentTypeId", + "details": { + "name": "Get Occlusion Culling Plane Component Type Id" + }, + "results": [ + { + "typeid": "{E152C105-A133-4D03-BBF8-3D4B2FBA3E2A}", + "details": { + "name": "AZ:: Uuid" + } + } + ] + } + ] + } + ] +} \ No newline at end of file diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/PerlinGradientComponentTypeId.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/PerlinGradientComponentTypeId.names new file mode 100644 index 0000000000..d16cca8ebb --- /dev/null +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/PerlinGradientComponentTypeId.names @@ -0,0 +1,29 @@ +{ + "entries": [ + { + "base": "PerlinGradientComponentTypeId", + "context": "Constant", + "variant": "", + "details": { + "name": "Perlin Gradient Component Type Id", + "category": "Constants/Editor" + }, + "methods": [ + { + "base": "GetPerlinGradientComponentTypeId", + "details": { + "name": "Get Perlin Gradient Component Type Id" + }, + "results": [ + { + "typeid": "{E152C105-A133-4D03-BBF8-3D4B2FBA3E2A}", + "details": { + "name": "AZ:: Uuid" + } + } + ] + } + ] + } + ] +} \ No newline at end of file diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/PhotometricUnit_Candela.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/PhotometricUnit_Candela.names new file mode 100644 index 0000000000..5312a86409 --- /dev/null +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/PhotometricUnit_Candela.names @@ -0,0 +1,29 @@ +{ + "entries": [ + { + "base": "PhotometricUnit_Candela", + "context": "Constant", + "variant": "", + "details": { + "name": "Candela", + "category": "Constants/Photometric Unit" + }, + "methods": [ + { + "base": "GetPhotometricUnit_Candela", + "details": { + "name": "Candela" + }, + "results": [ + { + "typeid": "{72039442-EB38-4D42-A1AD-CB68F7E0EEF6}", + "details": { + "name": "int" + } + } + ] + } + ] + } + ] +} \ No newline at end of file diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/PhotometricUnit_Ev100_Illuminance.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/PhotometricUnit_Ev100_Illuminance.names new file mode 100644 index 0000000000..ffb2e3875f --- /dev/null +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/PhotometricUnit_Ev100_Illuminance.names @@ -0,0 +1,29 @@ +{ + "entries": [ + { + "base": "PhotometricUnit_Ev100_Illuminance", + "context": "Constant", + "variant": "", + "details": { + "name": "Ev 100 Illuminance", + "category": "Constants/Photometric Unit" + }, + "methods": [ + { + "base": "GetPhotometricUnit_Ev100_Illuminance", + "details": { + "name": "Ev 100 Illuminance" + }, + "results": [ + { + "typeid": "{72039442-EB38-4D42-A1AD-CB68F7E0EEF6}", + "details": { + "name": "int" + } + } + ] + } + ] + } + ] +} \ No newline at end of file diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/PhotometricUnit_Ev100_Luminance.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/PhotometricUnit_Ev100_Luminance.names new file mode 100644 index 0000000000..b0a0fe6a47 --- /dev/null +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/PhotometricUnit_Ev100_Luminance.names @@ -0,0 +1,29 @@ +{ + "entries": [ + { + "base": "PhotometricUnit_Ev100_Luminance", + "context": "Constant", + "variant": "", + "details": { + "name": "Ev 100 Luminance", + "category": "Constants/Photometric Unit" + }, + "methods": [ + { + "base": "GetPhotometricUnit_Ev100_Luminance", + "details": { + "name": "Ev 100 Luminance" + }, + "results": [ + { + "typeid": "{72039442-EB38-4D42-A1AD-CB68F7E0EEF6}", + "details": { + "name": "int" + } + } + ] + } + ] + } + ] +} \ No newline at end of file diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/PhotometricUnit_Lumen.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/PhotometricUnit_Lumen.names new file mode 100644 index 0000000000..9e67c249af --- /dev/null +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/PhotometricUnit_Lumen.names @@ -0,0 +1,29 @@ +{ + "entries": [ + { + "base": "PhotometricUnit_Lumen", + "context": "Constant", + "variant": "", + "details": { + "name": "Lumen", + "category": "Constants/Photometric Unit" + }, + "methods": [ + { + "base": "GetPhotometricUnit_Lumen", + "details": { + "name": "Lumen" + }, + "results": [ + { + "typeid": "{72039442-EB38-4D42-A1AD-CB68F7E0EEF6}", + "details": { + "name": "int" + } + } + ] + } + ] + } + ] +} \ No newline at end of file diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/PhotometricUnit_Lux.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/PhotometricUnit_Lux.names new file mode 100644 index 0000000000..a82a2cbc0a --- /dev/null +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/PhotometricUnit_Lux.names @@ -0,0 +1,29 @@ +{ + "entries": [ + { + "base": "PhotometricUnit_Lux", + "context": "Constant", + "variant": "", + "details": { + "name": "Lux", + "category": "Constants/Photometric Unit" + }, + "methods": [ + { + "base": "GetPhotometricUnit_Lux", + "details": { + "name": "Lux" + }, + "results": [ + { + "typeid": "{72039442-EB38-4D42-A1AD-CB68F7E0EEF6}", + "details": { + "name": "int" + } + } + ] + } + ] + } + ] +} \ No newline at end of file diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/PhotometricUnit_Nit.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/PhotometricUnit_Nit.names new file mode 100644 index 0000000000..3a66270b8a --- /dev/null +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/PhotometricUnit_Nit.names @@ -0,0 +1,29 @@ +{ + "entries": [ + { + "base": "PhotometricUnit_Nit", + "context": "Constant", + "variant": "", + "details": { + "name": "Nit", + "category": "Constants/Photometric Unit" + }, + "methods": [ + { + "base": "GetPhotometricUnit_Nit", + "details": { + "name": "Nit" + }, + "results": [ + { + "typeid": "{72039442-EB38-4D42-A1AD-CB68F7E0EEF6}", + "details": { + "name": "int" + } + } + ] + } + ] + } + ] +} \ No newline at end of file diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/PhotometricUnit_Unknown.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/PhotometricUnit_Unknown.names new file mode 100644 index 0000000000..f07cfd2be4 --- /dev/null +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/PhotometricUnit_Unknown.names @@ -0,0 +1,29 @@ +{ + "entries": [ + { + "base": "PhotometricUnit_Unknown", + "context": "Constant", + "variant": "", + "details": { + "name": "Unknown", + "category": "Constants/Photometric Unit" + }, + "methods": [ + { + "base": "GetPhotometricUnit_Unknown", + "details": { + "name": "Unknown" + }, + "results": [ + { + "typeid": "{72039442-EB38-4D42-A1AD-CB68F7E0EEF6}", + "details": { + "name": "int" + } + } + ] + } + ] + } + ] +} \ No newline at end of file diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/PhysicalSkyComponentTypeId.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/PhysicalSkyComponentTypeId.names new file mode 100644 index 0000000000..acd3e30945 --- /dev/null +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/PhysicalSkyComponentTypeId.names @@ -0,0 +1,29 @@ +{ + "entries": [ + { + "base": "PhysicalSkyComponentTypeId", + "context": "Constant", + "variant": "", + "details": { + "name": "Physical Sky Component Type Id", + "category": "Constants/Editor" + }, + "methods": [ + { + "base": "GetPhysicalSkyComponentTypeId", + "details": { + "name": "Get Physical Sky Component Type Id" + }, + "results": [ + { + "typeid": "{E152C105-A133-4D03-BBF8-3D4B2FBA3E2A}", + "details": { + "name": "AZ:: Uuid" + } + } + ] + } + ] + } + ] +} \ No newline at end of file diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/PositionModifierComponentTypeId.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/PositionModifierComponentTypeId.names new file mode 100644 index 0000000000..3934036ae6 --- /dev/null +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/PositionModifierComponentTypeId.names @@ -0,0 +1,29 @@ +{ + "entries": [ + { + "base": "PositionModifierComponentTypeId", + "context": "Constant", + "variant": "", + "details": { + "name": "Position Modifier Component Type Id", + "category": "Constants/Editor" + }, + "methods": [ + { + "base": "GetPositionModifierComponentTypeId", + "details": { + "name": "Get Position Modifier Component Type Id" + }, + "results": [ + { + "typeid": "{E152C105-A133-4D03-BBF8-3D4B2FBA3E2A}", + "details": { + "name": "AZ:: Uuid" + } + } + ] + } + ] + } + ] +} \ No newline at end of file diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/PostFxLayerComponentTypeId.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/PostFxLayerComponentTypeId.names new file mode 100644 index 0000000000..a09eb0fe51 --- /dev/null +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/PostFxLayerComponentTypeId.names @@ -0,0 +1,29 @@ +{ + "entries": [ + { + "base": "PostFxLayerComponentTypeId", + "context": "Constant", + "variant": "", + "details": { + "name": "Post Fx Layer Component Type Id", + "category": "Constants/Editor" + }, + "methods": [ + { + "base": "GetPostFxLayerComponentTypeId", + "details": { + "name": "Get Post Fx Layer Component Type Id" + }, + "results": [ + { + "typeid": "{E152C105-A133-4D03-BBF8-3D4B2FBA3E2A}", + "details": { + "name": "AZ:: Uuid" + } + } + ] + } + ] + } + ] +} \ No newline at end of file diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/PosterizeGradientComponentTypeId.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/PosterizeGradientComponentTypeId.names new file mode 100644 index 0000000000..28956d8520 --- /dev/null +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/PosterizeGradientComponentTypeId.names @@ -0,0 +1,29 @@ +{ + "entries": [ + { + "base": "PosterizeGradientComponentTypeId", + "context": "Constant", + "variant": "", + "details": { + "name": "Posterize Gradient Component Type Id", + "category": "Constants/Editor" + }, + "methods": [ + { + "base": "GetPosterizeGradientComponentTypeId", + "details": { + "name": "Get Posterize Gradient Component Type Id" + }, + "results": [ + { + "typeid": "{E152C105-A133-4D03-BBF8-3D4B2FBA3E2A}", + "details": { + "name": "AZ:: Uuid" + } + } + ] + } + ] + } + ] +} \ No newline at end of file diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/ProviderNameEnum_AWSCognitoIDP.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/ProviderNameEnum_AWSCognitoIDP.names new file mode 100644 index 0000000000..35dd35606c --- /dev/null +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/ProviderNameEnum_AWSCognitoIDP.names @@ -0,0 +1,29 @@ +{ + "entries": [ + { + "base": "ProviderNameEnum_AWSCognitoIDP", + "context": "Constant", + "variant": "", + "details": { + "name": "AWS Cognito IDP", + "category": "Constants/Provider Name" + }, + "methods": [ + { + "base": "GetProviderNameEnum_AWSCognitoIDP", + "details": { + "name": "AWS Cognito IDP" + }, + "results": [ + { + "typeid": "{72039442-EB38-4D42-A1AD-CB68F7E0EEF6}", + "details": { + "name": "int" + } + } + ] + } + ] + } + ] +} \ No newline at end of file diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/ProviderNameEnum_Google.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/ProviderNameEnum_Google.names new file mode 100644 index 0000000000..11b91a902c --- /dev/null +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/ProviderNameEnum_Google.names @@ -0,0 +1,29 @@ +{ + "entries": [ + { + "base": "ProviderNameEnum_Google", + "context": "Constant", + "variant": "", + "details": { + "name": "Google", + "category": "Constants/Provider Name" + }, + "methods": [ + { + "base": "GetProviderNameEnum_Google", + "details": { + "name": "Google" + }, + "results": [ + { + "typeid": "{72039442-EB38-4D42-A1AD-CB68F7E0EEF6}", + "details": { + "name": "int" + } + } + ] + } + ] + } + ] +} \ No newline at end of file diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/ProviderNameEnum_LoginWithAmazon.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/ProviderNameEnum_LoginWithAmazon.names new file mode 100644 index 0000000000..9f63f5a2ad --- /dev/null +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/ProviderNameEnum_LoginWithAmazon.names @@ -0,0 +1,29 @@ +{ + "entries": [ + { + "base": "ProviderNameEnum_LoginWithAmazon", + "context": "Constant", + "variant": "", + "details": { + "name": "Amazon", + "category": "Constants/Provider Name" + }, + "methods": [ + { + "base": "GetProviderNameEnum_LoginWithAmazon", + "details": { + "name": "Amazon" + }, + "results": [ + { + "typeid": "{72039442-EB38-4D42-A1AD-CB68F7E0EEF6}", + "details": { + "name": "int" + } + } + ] + } + ] + } + ] +} \ No newline at end of file diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/ProviderNameEnum_None.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/ProviderNameEnum_None.names new file mode 100644 index 0000000000..5f7f21d88a --- /dev/null +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/ProviderNameEnum_None.names @@ -0,0 +1,29 @@ +{ + "entries": [ + { + "base": "ProviderNameEnum_None", + "context": "Constant", + "variant": "", + "details": { + "name": "None", + "category": "Constants/Provider Name" + }, + "methods": [ + { + "base": "GetProviderNameEnum_None", + "details": { + "name": "None" + }, + "results": [ + { + "typeid": "{72039442-EB38-4D42-A1AD-CB68F7E0EEF6}", + "details": { + "name": "int" + } + } + ] + } + ] + } + ] +} \ No newline at end of file diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/QuadShapeComponentTypeId.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/QuadShapeComponentTypeId.names new file mode 100644 index 0000000000..913f9c6a8e --- /dev/null +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/QuadShapeComponentTypeId.names @@ -0,0 +1,29 @@ +{ + "entries": [ + { + "base": "QuadShapeComponentTypeId", + "context": "Constant", + "variant": "", + "details": { + "name": "Quad Shape Component Type Id", + "category": "Constants/Editor" + }, + "methods": [ + { + "base": "GetQuadShapeComponentTypeId", + "details": { + "name": "Get Quad Shape Component Type Id" + }, + "results": [ + { + "typeid": "{E152C105-A133-4D03-BBF8-3D4B2FBA3E2A}", + "details": { + "name": "AZ:: Uuid" + } + } + ] + } + ] + } + ] +} \ No newline at end of file diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/RadiusWeightModifierComponentTypeId.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/RadiusWeightModifierComponentTypeId.names new file mode 100644 index 0000000000..b47fe93984 --- /dev/null +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/RadiusWeightModifierComponentTypeId.names @@ -0,0 +1,29 @@ +{ + "entries": [ + { + "base": "RadiusWeightModifierComponentTypeId", + "context": "Constant", + "variant": "", + "details": { + "name": "Radius Weight Modifier Component Type Id", + "category": "Constants/Editor" + }, + "methods": [ + { + "base": "GetRadiusWeightModifierComponentTypeId", + "details": { + "name": "Get Radius Weight Modifier Component Type Id" + }, + "results": [ + { + "typeid": "{E152C105-A133-4D03-BBF8-3D4B2FBA3E2A}", + "details": { + "name": "AZ:: Uuid" + } + } + ] + } + ] + } + ] +} \ No newline at end of file diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/RandomGradientComponentTypeId.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/RandomGradientComponentTypeId.names new file mode 100644 index 0000000000..625f76bba8 --- /dev/null +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/RandomGradientComponentTypeId.names @@ -0,0 +1,29 @@ +{ + "entries": [ + { + "base": "RandomGradientComponentTypeId", + "context": "Constant", + "variant": "", + "details": { + "name": "Random Gradient Component Type Id", + "category": "Constants/Editor" + }, + "methods": [ + { + "base": "GetRandomGradientComponentTypeId", + "details": { + "name": "Get Random Gradient Component Type Id" + }, + "results": [ + { + "typeid": "{E152C105-A133-4D03-BBF8-3D4B2FBA3E2A}", + "details": { + "name": "AZ:: Uuid" + } + } + ] + } + ] + } + ] +} \ No newline at end of file diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/ReferenceGradientComponentTypeId.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/ReferenceGradientComponentTypeId.names new file mode 100644 index 0000000000..b96e97dfaa --- /dev/null +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/ReferenceGradientComponentTypeId.names @@ -0,0 +1,29 @@ +{ + "entries": [ + { + "base": "ReferenceGradientComponentTypeId", + "context": "Constant", + "variant": "", + "details": { + "name": "Reference Gradient Component Type Id", + "category": "Constants/Editor" + }, + "methods": [ + { + "base": "GetReferenceGradientComponentTypeId", + "details": { + "name": "Get Reference Gradient Component Type Id" + }, + "results": [ + { + "typeid": "{E152C105-A133-4D03-BBF8-3D4B2FBA3E2A}", + "details": { + "name": "AZ:: Uuid" + } + } + ] + } + ] + } + ] +} \ No newline at end of file diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/ReferenceShapeComponentTypeId.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/ReferenceShapeComponentTypeId.names new file mode 100644 index 0000000000..bbcfd7f88c --- /dev/null +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/ReferenceShapeComponentTypeId.names @@ -0,0 +1,29 @@ +{ + "entries": [ + { + "base": "ReferenceShapeComponentTypeId", + "context": "Constant", + "variant": "", + "details": { + "name": "Reference Shape Component Type Id", + "category": "Constants/Editor" + }, + "methods": [ + { + "base": "GetReferenceShapeComponentTypeId", + "details": { + "name": "Get Reference Shape Component Type Id" + }, + "results": [ + { + "typeid": "{E152C105-A133-4D03-BBF8-3D4B2FBA3E2A}", + "details": { + "name": "AZ:: Uuid" + } + } + ] + } + ] + } + ] +} \ No newline at end of file diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/ReflectionProbeComponentTypeId.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/ReflectionProbeComponentTypeId.names new file mode 100644 index 0000000000..5b6d58c067 --- /dev/null +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/ReflectionProbeComponentTypeId.names @@ -0,0 +1,29 @@ +{ + "entries": [ + { + "base": "ReflectionProbeComponentTypeId", + "context": "Constant", + "variant": "", + "details": { + "name": "Reflection Probe Component Type Id", + "category": "Constants/Editor" + }, + "methods": [ + { + "base": "GetReflectionProbeComponentTypeId", + "details": { + "name": "Get Reflection Probe Component Type Id" + }, + "results": [ + { + "typeid": "{E152C105-A133-4D03-BBF8-3D4B2FBA3E2A}", + "details": { + "name": "AZ:: Uuid" + } + } + ] + } + ] + } + ] +} \ No newline at end of file diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/RotationModifierComponentTypeId.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/RotationModifierComponentTypeId.names new file mode 100644 index 0000000000..18c7ac1f82 --- /dev/null +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/RotationModifierComponentTypeId.names @@ -0,0 +1,29 @@ +{ + "entries": [ + { + "base": "RotationModifierComponentTypeId", + "context": "Constant", + "variant": "", + "details": { + "name": "Rotation Modifier Component Type Id", + "category": "Constants/Editor" + }, + "methods": [ + { + "base": "GetRotationModifierComponentTypeId", + "details": { + "name": "Get Rotation Modifier Component Type Id" + }, + "results": [ + { + "typeid": "{E152C105-A133-4D03-BBF8-3D4B2FBA3E2A}", + "details": { + "name": "AZ:: Uuid" + } + } + ] + } + ] + } + ] +} \ No newline at end of file diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/SPHERE.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/SPHERE.names new file mode 100644 index 0000000000..4743d85db3 --- /dev/null +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/SPHERE.names @@ -0,0 +1,29 @@ +{ + "entries": [ + { + "base": "SPHERE", + "context": "Constant", + "variant": "", + "details": { + "name": "Sphere", + "category": "Constants/White Box" + }, + "methods": [ + { + "base": "GetSPHERE", + "details": { + "name": "Sphere" + }, + "results": [ + { + "typeid": "{72039442-EB38-4D42-A1AD-CB68F7E0EEF6}", + "details": { + "name": "int" + } + } + ] + } + ] + } + ] +} \ No newline at end of file diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/ScaleModifierComponentTypeId.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/ScaleModifierComponentTypeId.names new file mode 100644 index 0000000000..cee50e1569 --- /dev/null +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/ScaleModifierComponentTypeId.names @@ -0,0 +1,29 @@ +{ + "entries": [ + { + "base": "ScaleModifierComponentTypeId", + "context": "Constant", + "variant": "", + "details": { + "name": "Scale Modifier Component Type Id", + "category": "Constants/Editor" + }, + "methods": [ + { + "base": "GetScaleModifierComponentTypeId", + "details": { + "name": "Get Scale Modifier Component Type Id" + }, + "results": [ + { + "typeid": "{E152C105-A133-4D03-BBF8-3D4B2FBA3E2A}", + "details": { + "name": "AZ:: Uuid" + } + } + ] + } + ] + } + ] +} \ No newline at end of file diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/ShadowFilterMethod_ESM.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/ShadowFilterMethod_ESM.names new file mode 100644 index 0000000000..9d16d36c6b --- /dev/null +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/ShadowFilterMethod_ESM.names @@ -0,0 +1,29 @@ +{ + "entries": [ + { + "base": "ShadowFilterMethod_ESM", + "context": "Constant", + "variant": "", + "details": { + "name": "ESM", + "category": "Constants/Shadowmap/Filter" + }, + "methods": [ + { + "base": "GetShadowFilterMethod_ESM", + "details": { + "name": "ESM" + }, + "results": [ + { + "typeid": "{43DA906B-7DEF-4CA8-9790-854106D3F983}", + "details": { + "name": "unsigned int" + } + } + ] + } + ] + } + ] +} \ No newline at end of file diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/ShadowFilterMethod_ESM_PCF.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/ShadowFilterMethod_ESM_PCF.names new file mode 100644 index 0000000000..75750dd2a2 --- /dev/null +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/ShadowFilterMethod_ESM_PCF.names @@ -0,0 +1,29 @@ +{ + "entries": [ + { + "base": "ShadowFilterMethod_ESM_PCF", + "context": "Constant", + "variant": "", + "details": { + "name": "ESM_PCF", + "category": "Constants/Shadowmap/Filter" + }, + "methods": [ + { + "base": "GetShadowFilterMethod_ESM_PCF", + "details": { + "name": "ESM_PCF" + }, + "results": [ + { + "typeid": "{43DA906B-7DEF-4CA8-9790-854106D3F983}", + "details": { + "name": "unsigned int" + } + } + ] + } + ] + } + ] +} \ No newline at end of file diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/ShadowFilterMethod_None.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/ShadowFilterMethod_None.names new file mode 100644 index 0000000000..f604ed1147 --- /dev/null +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/ShadowFilterMethod_None.names @@ -0,0 +1,29 @@ +{ + "entries": [ + { + "base": "ShadowFilterMethod_None", + "context": "Constant", + "variant": "", + "details": { + "name": "None", + "category": "Constants/Shadowmap/Filter" + }, + "methods": [ + { + "base": "GetShadowFilterMethod_None", + "details": { + "name": "None" + }, + "results": [ + { + "typeid": "{43DA906B-7DEF-4CA8-9790-854106D3F983}", + "details": { + "name": "unsigned int" + } + } + ] + } + ] + } + ] +} \ No newline at end of file diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/ShadowFilterMethod_PCF.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/ShadowFilterMethod_PCF.names new file mode 100644 index 0000000000..7d63db3ad7 --- /dev/null +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/ShadowFilterMethod_PCF.names @@ -0,0 +1,29 @@ +{ + "entries": [ + { + "base": "ShadowFilterMethod_PCF", + "context": "Constant", + "variant": "", + "details": { + "name": "PCF", + "category": "Constants/Shadowmap/Filter" + }, + "methods": [ + { + "base": "GetShadowFilterMethod_PCF", + "details": { + "name": "PCF" + }, + "results": [ + { + "typeid": "{43DA906B-7DEF-4CA8-9790-854106D3F983}", + "details": { + "name": "unsigned int" + } + } + ] + } + ] + } + ] +} \ No newline at end of file diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/ShadowmapSize_1024.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/ShadowmapSize_1024.names new file mode 100644 index 0000000000..82fcb11aaf --- /dev/null +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/ShadowmapSize_1024.names @@ -0,0 +1,29 @@ +{ + "entries": [ + { + "base": "ShadowmapSize_1024", + "context": "Constant", + "variant": "", + "details": { + "name": "1024", + "category": "Constants/Shadowmap/Size" + }, + "methods": [ + { + "base": "GetShadowmapSize_1024", + "details": { + "name": "1024" + }, + "results": [ + { + "typeid": "{43DA906B-7DEF-4CA8-9790-854106D3F983}", + "details": { + "name": "unsigned int" + } + } + ] + } + ] + } + ] +} \ No newline at end of file diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/ShadowmapSize_2045.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/ShadowmapSize_2045.names new file mode 100644 index 0000000000..545ecbe5f7 --- /dev/null +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/ShadowmapSize_2045.names @@ -0,0 +1,29 @@ +{ + "entries": [ + { + "base": "ShadowmapSize_2045", + "context": "Constant", + "variant": "", + "details": { + "name": "2045", + "category": "Constants/Shadowmap/Size" + }, + "methods": [ + { + "base": "GetShadowmapSize_2045", + "details": { + "name": "2045" + }, + "results": [ + { + "typeid": "{43DA906B-7DEF-4CA8-9790-854106D3F983}", + "details": { + "name": "unsigned int" + } + } + ] + } + ] + } + ] +} \ No newline at end of file diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/ShadowmapSize_256.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/ShadowmapSize_256.names new file mode 100644 index 0000000000..26b11da3d9 --- /dev/null +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/ShadowmapSize_256.names @@ -0,0 +1,29 @@ +{ + "entries": [ + { + "base": "ShadowmapSize_256", + "context": "Constant", + "variant": "", + "details": { + "name": "256", + "category": "Constants/Shadowmap/Size" + }, + "methods": [ + { + "base": "GetShadowmapSize_256", + "details": { + "name": "256" + }, + "results": [ + { + "typeid": "{43DA906B-7DEF-4CA8-9790-854106D3F983}", + "details": { + "name": "unsigned int" + } + } + ] + } + ] + } + ] +} \ No newline at end of file diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/ShadowmapSize_512.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/ShadowmapSize_512.names new file mode 100644 index 0000000000..541b28b10d --- /dev/null +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/ShadowmapSize_512.names @@ -0,0 +1,29 @@ +{ + "entries": [ + { + "base": "ShadowmapSize_512", + "context": "Constant", + "variant": "", + "details": { + "name": "512", + "category": "Constants/Shadowmap/Size" + }, + "methods": [ + { + "base": "GetShadowmapSize_512", + "details": { + "name": "512" + }, + "results": [ + { + "typeid": "{43DA906B-7DEF-4CA8-9790-854106D3F983}", + "details": { + "name": "unsigned int" + } + } + ] + } + ] + } + ] +} \ No newline at end of file diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/ShadowmapSize_None.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/ShadowmapSize_None.names new file mode 100644 index 0000000000..092d435e9d --- /dev/null +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/ShadowmapSize_None.names @@ -0,0 +1,29 @@ +{ + "entries": [ + { + "base": "ShadowmapSize_None", + "context": "Constant", + "variant": "", + "details": { + "name": "None", + "category": "Constants/Shadowmap/Size" + }, + "methods": [ + { + "base": "GetShadowmapSize_None", + "details": { + "name": "None" + }, + "results": [ + { + "typeid": "{43DA906B-7DEF-4CA8-9790-854106D3F983}", + "details": { + "name": "unsigned int" + } + } + ] + } + ] + } + ] +} \ No newline at end of file diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/ShapeAreaFalloffGradientComponentTypeId.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/ShapeAreaFalloffGradientComponentTypeId.names new file mode 100644 index 0000000000..ca7dc09c50 --- /dev/null +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/ShapeAreaFalloffGradientComponentTypeId.names @@ -0,0 +1,29 @@ +{ + "entries": [ + { + "base": "ShapeAreaFalloffGradientComponentTypeId", + "context": "Constant", + "variant": "", + "details": { + "name": "Shape Area Falloff Gradient Component Type Id", + "category": "Constants/Editor" + }, + "methods": [ + { + "base": "GetShapeAreaFalloffGradientComponentTypeId", + "details": { + "name": "Get Shape Area Falloff Gradient Component Type Id" + }, + "results": [ + { + "typeid": "{E152C105-A133-4D03-BBF8-3D4B2FBA3E2A}", + "details": { + "name": "AZ:: Uuid" + } + } + ] + } + ] + } + ] +} \ No newline at end of file diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/ShapeChangeReasons_ShapeChanged.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/ShapeChangeReasons_ShapeChanged.names new file mode 100644 index 0000000000..310ae3155b --- /dev/null +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/ShapeChangeReasons_ShapeChanged.names @@ -0,0 +1,29 @@ +{ + "entries": [ + { + "base": "ShapeChangeReasons_ShapeChanged", + "context": "Constant", + "variant": "", + "details": { + "name": "Shape Change Reasons_ Shape Changed", + "category": "Constants/Editor" + }, + "methods": [ + { + "base": "GetShapeChangeReasons_ShapeChanged", + "details": { + "name": "Get Shape Change Reasons_ Shape Changed" + }, + "results": [ + { + "typeid": "{72039442-EB38-4D42-A1AD-CB68F7E0EEF6}", + "details": { + "name": "int" + } + } + ] + } + ] + } + ] +} \ No newline at end of file diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/ShapeChangeReasons_TransformChanged.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/ShapeChangeReasons_TransformChanged.names new file mode 100644 index 0000000000..864d389080 --- /dev/null +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/ShapeChangeReasons_TransformChanged.names @@ -0,0 +1,29 @@ +{ + "entries": [ + { + "base": "ShapeChangeReasons_TransformChanged", + "context": "Constant", + "variant": "", + "details": { + "name": "Shape Change Reasons_ Transform Changed", + "category": "Constants/Editor" + }, + "methods": [ + { + "base": "GetShapeChangeReasons_TransformChanged", + "details": { + "name": "Get Shape Change Reasons_ Transform Changed" + }, + "results": [ + { + "typeid": "{72039442-EB38-4D42-A1AD-CB68F7E0EEF6}", + "details": { + "name": "int" + } + } + ] + } + ] + } + ] +} \ No newline at end of file diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/ShapeIntersectionFilterComponentTypeId.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/ShapeIntersectionFilterComponentTypeId.names new file mode 100644 index 0000000000..8c5ef12adf --- /dev/null +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/ShapeIntersectionFilterComponentTypeId.names @@ -0,0 +1,29 @@ +{ + "entries": [ + { + "base": "ShapeIntersectionFilterComponentTypeId", + "context": "Constant", + "variant": "", + "details": { + "name": "Shape Intersection Filter Component Type Id", + "category": "Constants/Editor" + }, + "methods": [ + { + "base": "GetShapeIntersectionFilterComponentTypeId", + "details": { + "name": "Get Shape Intersection Filter Component Type Id" + }, + "results": [ + { + "typeid": "{E152C105-A133-4D03-BBF8-3D4B2FBA3E2A}", + "details": { + "name": "AZ:: Uuid" + } + } + ] + } + ] + } + ] +} \ No newline at end of file diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/ShapeType_Box.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/ShapeType_Box.names new file mode 100644 index 0000000000..233bc2c76f --- /dev/null +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/ShapeType_Box.names @@ -0,0 +1,30 @@ +{ + "entries": [ + { + "base": "ShapeType_Box", + "context": "Constant", + "variant": "", + "details": { + "name": "Get Shape Type: Box", + "category": "Constants/Physics" + }, + "methods": [ + { + "base": "ShapeType_Box", + "details": { + "name": "Get Shape Type: Box", + "subtitle": "Shape Type" + }, + "results": [ + { + "typeid": "{72039442-EB38-4D42-A1AD-CB68F7E0EEF6}", + "details": { + "name": "Shape Type" + } + } + ] + } + ] + } + ] +} \ No newline at end of file diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/ShapeType_Cylinder.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/ShapeType_Cylinder.names new file mode 100644 index 0000000000..a4e02a53da --- /dev/null +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/ShapeType_Cylinder.names @@ -0,0 +1,30 @@ +{ + "entries": [ + { + "base": "ShapeType_Cylinder", + "context": "Constant", + "variant": "", + "details": { + "name": "Get Shape Type: Cylinder", + "category": "Constants/Physics" + }, + "methods": [ + { + "base": "ShapeType_Cylinder", + "details": { + "name": "Get Shape Type: Cylinder", + "subtitle": "Shape Type" + }, + "results": [ + { + "typeid": "{72039442-EB38-4D42-A1AD-CB68F7E0EEF6}", + "details": { + "name": "Shape Type" + } + } + ] + } + ] + } + ] +} \ No newline at end of file diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/ShapeType_Heightfield.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/ShapeType_Heightfield.names new file mode 100644 index 0000000000..8ede2d9b87 --- /dev/null +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/ShapeType_Heightfield.names @@ -0,0 +1,30 @@ +{ + "entries": [ + { + "base": "ShapeType_Heightfield", + "context": "Constant", + "variant": "", + "details": { + "name": "Get Shape Type: Heightfield", + "category": "Constants/Physics" + }, + "methods": [ + { + "base": "GetShapeType_Heightfield", + "details": { + "name": "Get Shape Type: Heightfield", + "subtitle": "Shape Type" + }, + "results": [ + { + "typeid": "{72039442-EB38-4D42-A1AD-CB68F7E0EEF6}", + "details": { + "name": "Shape Type" + } + } + ] + } + ] + } + ] +} \ No newline at end of file diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/ShapeType_PhysicsAsset.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/ShapeType_PhysicsAsset.names new file mode 100644 index 0000000000..9ac02b4f53 --- /dev/null +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/ShapeType_PhysicsAsset.names @@ -0,0 +1,30 @@ +{ + "entries": [ + { + "base": "ShapeType_PhysicsAsset", + "context": "Constant", + "variant": "", + "details": { + "name": "Get Shape Type: Physics Asset", + "category": "Constants/Physics" + }, + "methods": [ + { + "base": "ShapeType_PhysicsAsset", + "details": { + "name": "Get Shape Type: Physics Asset", + "subtitle": "Shape Type" + }, + "results": [ + { + "typeid": "{72039442-EB38-4D42-A1AD-CB68F7E0EEF6}", + "details": { + "name": "Shape Type" + } + } + ] + } + ] + } + ] +} \ No newline at end of file diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/ShapeType_Sphere.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/ShapeType_Sphere.names new file mode 100644 index 0000000000..f2441aacee --- /dev/null +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/ShapeType_Sphere.names @@ -0,0 +1,30 @@ +{ + "entries": [ + { + "base": "ShapeType_Sphere", + "context": "Constant", + "variant": "", + "details": { + "name": "Get Shape Type: Sphere", + "category": "Constants/Physics" + }, + "methods": [ + { + "base": "ShapeType_Sphere", + "details": { + "name": "SGet Shape Type: Sphere", + "subtitle": "Shape Type" + }, + "results": [ + { + "typeid": "{72039442-EB38-4D42-A1AD-CB68F7E0EEF6}", + "details": { + "name": "Shape Type" + } + } + ] + } + ] + } + ] +} \ No newline at end of file diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/ShapeWeightModifierComponentTypeId.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/ShapeWeightModifierComponentTypeId.names new file mode 100644 index 0000000000..bd0f817dfd --- /dev/null +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/ShapeWeightModifierComponentTypeId.names @@ -0,0 +1,29 @@ +{ + "entries": [ + { + "base": "ShapeWeightModifierComponentTypeId", + "context": "Constant", + "variant": "", + "details": { + "name": "Shape Weight Modifier Component Type Id", + "category": "Constants/Editor" + }, + "methods": [ + { + "base": "GetShapeWeightModifierComponentTypeId", + "details": { + "name": "Get Shape Weight Modifier Component Type Id" + }, + "results": [ + { + "typeid": "{E152C105-A133-4D03-BBF8-3D4B2FBA3E2A}", + "details": { + "name": "AZ:: Uuid" + } + } + ] + } + ] + } + ] +} \ No newline at end of file diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/SlopeAlignmentModifierComponentTypeId.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/SlopeAlignmentModifierComponentTypeId.names new file mode 100644 index 0000000000..219f05a14b --- /dev/null +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/SlopeAlignmentModifierComponentTypeId.names @@ -0,0 +1,29 @@ +{ + "entries": [ + { + "base": "SlopeAlignmentModifierComponentTypeId", + "context": "Constant", + "variant": "", + "details": { + "name": "Slope Alignment Modifier Component Type Id", + "category": "Constants/Editor" + }, + "methods": [ + { + "base": "GetSlopeAlignmentModifierComponentTypeId", + "details": { + "name": "Get Slope Alignment Modifier Component Type Id" + }, + "results": [ + { + "typeid": "{E152C105-A133-4D03-BBF8-3D4B2FBA3E2A}", + "details": { + "name": "AZ:: Uuid" + } + } + ] + } + ] + } + ] +} \ No newline at end of file diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/SmoothStepGradientComponentTypeId.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/SmoothStepGradientComponentTypeId.names new file mode 100644 index 0000000000..b9cf0e8631 --- /dev/null +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/SmoothStepGradientComponentTypeId.names @@ -0,0 +1,29 @@ +{ + "entries": [ + { + "base": "SmoothStepGradientComponentTypeId", + "context": "Constant", + "variant": "", + "details": { + "name": "Smooth Step Gradient Component Type Id", + "category": "Constants/Editor" + }, + "methods": [ + { + "base": "GetSmoothStepGradientComponentTypeId", + "details": { + "name": "Get Smooth Step Gradient Component Type Id" + }, + "results": [ + { + "typeid": "{E152C105-A133-4D03-BBF8-3D4B2FBA3E2A}", + "details": { + "name": "AZ:: Uuid" + } + } + ] + } + ] + } + ] +} \ No newline at end of file diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/SpawnerComponentTypeId.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/SpawnerComponentTypeId.names new file mode 100644 index 0000000000..6cab8d6b00 --- /dev/null +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/SpawnerComponentTypeId.names @@ -0,0 +1,29 @@ +{ + "entries": [ + { + "base": "SpawnerComponentTypeId", + "context": "Constant", + "variant": "", + "details": { + "name": "Spawner Component Type Id", + "category": "Constants/Editor" + }, + "methods": [ + { + "base": "GetSpawnerComponentTypeId", + "details": { + "name": "Get Spawner Component Type Id" + }, + "results": [ + { + "typeid": "{E152C105-A133-4D03-BBF8-3D4B2FBA3E2A}", + "details": { + "name": "AZ:: Uuid" + } + } + ] + } + ] + } + ] +} \ No newline at end of file diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/SphereShapeComponentTypeId.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/SphereShapeComponentTypeId.names new file mode 100644 index 0000000000..52f9ed8c57 --- /dev/null +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/SphereShapeComponentTypeId.names @@ -0,0 +1,29 @@ +{ + "entries": [ + { + "base": "SphereShapeComponentTypeId", + "context": "Constant", + "variant": "", + "details": { + "name": "Sphere Shape Component Type Id", + "category": "Constants/Editor" + }, + "methods": [ + { + "base": "GetSphereShapeComponentTypeId", + "details": { + "name": "Get Sphere Shape Component Type Id" + }, + "results": [ + { + "typeid": "{E152C105-A133-4D03-BBF8-3D4B2FBA3E2A}", + "details": { + "name": "AZ:: Uuid" + } + } + ] + } + ] + } + ] +} \ No newline at end of file diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/SsaoComponentTypeId.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/SsaoComponentTypeId.names new file mode 100644 index 0000000000..bce10c89ca --- /dev/null +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/SsaoComponentTypeId.names @@ -0,0 +1,29 @@ +{ + "entries": [ + { + "base": "SsaoComponentTypeId", + "context": "Constant", + "variant": "", + "details": { + "name": "Ssao Component Type Id", + "category": "Constants/Editor" + }, + "methods": [ + { + "base": "GetSsaoComponentTypeId", + "details": { + "name": "Get Ssao Component Type Id" + }, + "results": [ + { + "typeid": "{E152C105-A133-4D03-BBF8-3D4B2FBA3E2A}", + "details": { + "name": "AZ:: Uuid" + } + } + ] + } + ] + } + ] +} \ No newline at end of file diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/StencilOp_Decrement.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/StencilOp_Decrement.names new file mode 100644 index 0000000000..83cd8924db --- /dev/null +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/StencilOp_Decrement.names @@ -0,0 +1,29 @@ +{ + "entries": [ + { + "base": "StencilOp_Decrement", + "context": "Constant", + "variant": "", + "details": { + "name": "Decrement", + "category": "Constants/Stencil Op" + }, + "methods": [ + { + "base": "GetStencilOp_Decrement", + "details": { + "name": "Decrement" + }, + "results": [ + { + "typeid": "{72039442-EB38-4D42-A1AD-CB68F7E0EEF6}", + "details": { + "name": "int" + } + } + ] + } + ] + } + ] +} \ No newline at end of file diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/StencilOp_DecrementSaturate.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/StencilOp_DecrementSaturate.names new file mode 100644 index 0000000000..8bbc398180 --- /dev/null +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/StencilOp_DecrementSaturate.names @@ -0,0 +1,29 @@ +{ + "entries": [ + { + "base": "StencilOp_DecrementSaturate", + "context": "Constant", + "variant": "", + "details": { + "name": "Decrement Saturate", + "category": "Constants/Stencil Op" + }, + "methods": [ + { + "base": "GetStencilOp_DecrementSaturate", + "details": { + "name": "Decrement Saturate" + }, + "results": [ + { + "typeid": "{72039442-EB38-4D42-A1AD-CB68F7E0EEF6}", + "details": { + "name": "int" + } + } + ] + } + ] + } + ] +} \ No newline at end of file diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/StencilOp_Increment.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/StencilOp_Increment.names new file mode 100644 index 0000000000..7b034e8a45 --- /dev/null +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/StencilOp_Increment.names @@ -0,0 +1,29 @@ +{ + "entries": [ + { + "base": "StencilOp_Increment", + "context": "Constant", + "variant": "", + "details": { + "name": "Increment", + "category": "Constants/Stencil Op" + }, + "methods": [ + { + "base": "GetStencilOp_Increment", + "details": { + "name": "Increment" + }, + "results": [ + { + "typeid": "{72039442-EB38-4D42-A1AD-CB68F7E0EEF6}", + "details": { + "name": "int" + } + } + ] + } + ] + } + ] +} \ No newline at end of file diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/StencilOp_IncrementSaturate.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/StencilOp_IncrementSaturate.names new file mode 100644 index 0000000000..110e816592 --- /dev/null +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/StencilOp_IncrementSaturate.names @@ -0,0 +1,29 @@ +{ + "entries": [ + { + "base": "StencilOp_IncrementSaturate", + "context": "Constant", + "variant": "", + "details": { + "name": "Increment Saturate", + "category": "Constants/Stencil Op" + }, + "methods": [ + { + "base": "GetStencilOp_IncrementSaturate", + "details": { + "name": "Increment Saturate" + }, + "results": [ + { + "typeid": "{72039442-EB38-4D42-A1AD-CB68F7E0EEF6}", + "details": { + "name": "int" + } + } + ] + } + ] + } + ] +} \ No newline at end of file diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/StencilOp_Invalid.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/StencilOp_Invalid.names new file mode 100644 index 0000000000..e92a5b3526 --- /dev/null +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/StencilOp_Invalid.names @@ -0,0 +1,29 @@ +{ + "entries": [ + { + "base": "StencilOp_Invalid", + "context": "Constant", + "variant": "", + "details": { + "name": "Invalid", + "category": "Constants/Stencil Op" + }, + "methods": [ + { + "base": "GetStencilOp_Invalid", + "details": { + "name": "Invalid" + }, + "results": [ + { + "typeid": "{72039442-EB38-4D42-A1AD-CB68F7E0EEF6}", + "details": { + "name": "int" + } + } + ] + } + ] + } + ] +} \ No newline at end of file diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/StencilOp_Invert.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/StencilOp_Invert.names new file mode 100644 index 0000000000..adfaf23d6a --- /dev/null +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/StencilOp_Invert.names @@ -0,0 +1,29 @@ +{ + "entries": [ + { + "base": "StencilOp_Invert", + "context": "Constant", + "variant": "", + "details": { + "name": "Invert", + "category": "Constants/Stencil Op" + }, + "methods": [ + { + "base": "GetStencilOp_Invert", + "details": { + "name": "Invert" + }, + "results": [ + { + "typeid": "{72039442-EB38-4D42-A1AD-CB68F7E0EEF6}", + "details": { + "name": "int" + } + } + ] + } + ] + } + ] +} \ No newline at end of file diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/StencilOp_Keep.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/StencilOp_Keep.names new file mode 100644 index 0000000000..be2d814bad --- /dev/null +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/StencilOp_Keep.names @@ -0,0 +1,29 @@ +{ + "entries": [ + { + "base": "StencilOp_Keep", + "context": "Constant", + "variant": "", + "details": { + "name": "Keep", + "category": "Constants/Stencil Op" + }, + "methods": [ + { + "base": "GetStencilOp_Keep", + "details": { + "name": "Keep" + }, + "results": [ + { + "typeid": "{72039442-EB38-4D42-A1AD-CB68F7E0EEF6}", + "details": { + "name": "int" + } + } + ] + } + ] + } + ] +} \ No newline at end of file diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/StencilOp_Replace.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/StencilOp_Replace.names new file mode 100644 index 0000000000..307677368f --- /dev/null +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/StencilOp_Replace.names @@ -0,0 +1,29 @@ +{ + "entries": [ + { + "base": "StencilOp_Replace", + "context": "Constant", + "variant": "", + "details": { + "name": "Replace", + "category": "Constants/Stencil Op" + }, + "methods": [ + { + "base": "GetStencilOp_Replace", + "details": { + "name": "Replace" + }, + "results": [ + { + "typeid": "{72039442-EB38-4D42-A1AD-CB68F7E0EEF6}", + "details": { + "name": "int" + } + } + ] + } + ] + } + ] +} \ No newline at end of file diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/StencilOp_Zero.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/StencilOp_Zero.names new file mode 100644 index 0000000000..a4a62b177a --- /dev/null +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/StencilOp_Zero.names @@ -0,0 +1,29 @@ +{ + "entries": [ + { + "base": "StencilOp_Zero", + "context": "Constant", + "variant": "", + "details": { + "name": "Zero", + "category": "Constants/Stencil Op" + }, + "methods": [ + { + "base": "GetStencilOp_Zero", + "details": { + "name": "Zero" + }, + "results": [ + { + "typeid": "{72039442-EB38-4D42-A1AD-CB68F7E0EEF6}", + "details": { + "name": "int" + } + } + ] + } + ] + } + ] +} \ No newline at end of file diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/SurfaceAltitudeFilterComponentTypeId.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/SurfaceAltitudeFilterComponentTypeId.names new file mode 100644 index 0000000000..cb55df8149 --- /dev/null +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/SurfaceAltitudeFilterComponentTypeId.names @@ -0,0 +1,29 @@ +{ + "entries": [ + { + "base": "SurfaceAltitudeFilterComponentTypeId", + "context": "Constant", + "variant": "", + "details": { + "name": "Surface Altitude Filter Component Type Id", + "category": "Constants/Editor" + }, + "methods": [ + { + "base": "GetSurfaceAltitudeFilterComponentTypeId", + "details": { + "name": "Get Surface Altitude Filter Component Type Id" + }, + "results": [ + { + "typeid": "{E152C105-A133-4D03-BBF8-3D4B2FBA3E2A}", + "details": { + "name": "AZ:: Uuid" + } + } + ] + } + ] + } + ] +} \ No newline at end of file diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/SurfaceAltitudeGradientComponentTypeId.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/SurfaceAltitudeGradientComponentTypeId.names new file mode 100644 index 0000000000..012f58f387 --- /dev/null +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/SurfaceAltitudeGradientComponentTypeId.names @@ -0,0 +1,29 @@ +{ + "entries": [ + { + "base": "SurfaceAltitudeGradientComponentTypeId", + "context": "Constant", + "variant": "", + "details": { + "name": "Surface Altitude Gradient Component Type Id", + "category": "Constants/Editor" + }, + "methods": [ + { + "base": "GetSurfaceAltitudeGradientComponentTypeId", + "details": { + "name": "Get Surface Altitude Gradient Component Type Id" + }, + "results": [ + { + "typeid": "{E152C105-A133-4D03-BBF8-3D4B2FBA3E2A}", + "details": { + "name": "AZ:: Uuid" + } + } + ] + } + ] + } + ] +} \ No newline at end of file diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/SurfaceMaskDepthFilterComponentTypeId.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/SurfaceMaskDepthFilterComponentTypeId.names new file mode 100644 index 0000000000..54af468172 --- /dev/null +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/SurfaceMaskDepthFilterComponentTypeId.names @@ -0,0 +1,29 @@ +{ + "entries": [ + { + "base": "SurfaceMaskDepthFilterComponentTypeId", + "context": "Constant", + "variant": "", + "details": { + "name": "Surface Mask Depth Filter Component Type Id", + "category": "Constants/Editor" + }, + "methods": [ + { + "base": "GetSurfaceMaskDepthFilterComponentTypeId", + "details": { + "name": "Get Surface Mask Depth Filter Component Type Id" + }, + "results": [ + { + "typeid": "{E152C105-A133-4D03-BBF8-3D4B2FBA3E2A}", + "details": { + "name": "AZ:: Uuid" + } + } + ] + } + ] + } + ] +} \ No newline at end of file diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/SurfaceMaskFilterComponentTypeId.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/SurfaceMaskFilterComponentTypeId.names new file mode 100644 index 0000000000..6c8b21cde1 --- /dev/null +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/SurfaceMaskFilterComponentTypeId.names @@ -0,0 +1,29 @@ +{ + "entries": [ + { + "base": "SurfaceMaskFilterComponentTypeId", + "context": "Constant", + "variant": "", + "details": { + "name": "Surface Mask Filter Component Type Id", + "category": "Constants/Editor" + }, + "methods": [ + { + "base": "GetSurfaceMaskFilterComponentTypeId", + "details": { + "name": "Get Surface Mask Filter Component Type Id" + }, + "results": [ + { + "typeid": "{E152C105-A133-4D03-BBF8-3D4B2FBA3E2A}", + "details": { + "name": "AZ:: Uuid" + } + } + ] + } + ] + } + ] +} \ No newline at end of file diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/SurfaceMaskGradientComponentTypeId.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/SurfaceMaskGradientComponentTypeId.names new file mode 100644 index 0000000000..d8784fe67e --- /dev/null +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/SurfaceMaskGradientComponentTypeId.names @@ -0,0 +1,29 @@ +{ + "entries": [ + { + "base": "SurfaceMaskGradientComponentTypeId", + "context": "Constant", + "variant": "", + "details": { + "name": "Surface Mask Gradient Component Type Id", + "category": "Constants/Editor" + }, + "methods": [ + { + "base": "GetSurfaceMaskGradientComponentTypeId", + "details": { + "name": "Get Surface Mask Gradient Component Type Id" + }, + "results": [ + { + "typeid": "{E152C105-A133-4D03-BBF8-3D4B2FBA3E2A}", + "details": { + "name": "AZ:: Uuid" + } + } + ] + } + ] + } + ] +} \ No newline at end of file diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/SurfaceSlopeFilterComponentTypeId.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/SurfaceSlopeFilterComponentTypeId.names new file mode 100644 index 0000000000..d55caa7830 --- /dev/null +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/SurfaceSlopeFilterComponentTypeId.names @@ -0,0 +1,29 @@ +{ + "entries": [ + { + "base": "SurfaceSlopeFilterComponentTypeId", + "context": "Constant", + "variant": "", + "details": { + "name": "Surface Slope Filter Component Type Id", + "category": "Constants/Editor" + }, + "methods": [ + { + "base": "GetSurfaceSlopeFilterComponentTypeId", + "details": { + "name": "Get Surface Slope Filter Component Type Id" + }, + "results": [ + { + "typeid": "{E152C105-A133-4D03-BBF8-3D4B2FBA3E2A}", + "details": { + "name": "AZ:: Uuid" + } + } + ] + } + ] + } + ] +} \ No newline at end of file diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/SurfaceSlopeGradientComponentTypeId.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/SurfaceSlopeGradientComponentTypeId.names new file mode 100644 index 0000000000..cf856cfbbf --- /dev/null +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/SurfaceSlopeGradientComponentTypeId.names @@ -0,0 +1,29 @@ +{ + "entries": [ + { + "base": "SurfaceSlopeGradientComponentTypeId", + "context": "Constant", + "variant": "", + "details": { + "name": "Surface Slope Gradient Component Type Id", + "category": "Constants/Editor" + }, + "methods": [ + { + "base": "GetSurfaceSlopeGradientComponentTypeId", + "details": { + "name": "Get Surface Slope Gradient Component Type Id" + }, + "results": [ + { + "typeid": "{E152C105-A133-4D03-BBF8-3D4B2FBA3E2A}", + "details": { + "name": "AZ:: Uuid" + } + } + ] + } + ] + } + ] +} \ No newline at end of file diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/SystemConfigPlatform_Android.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/SystemConfigPlatform_Android.names new file mode 100644 index 0000000000..48ff4a80d5 --- /dev/null +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/SystemConfigPlatform_Android.names @@ -0,0 +1,29 @@ +{ + "entries": [ + { + "base": "SystemConfigPlatform_Android", + "context": "Constant", + "variant": "", + "details": { + "name": "Android", + "category": "Constants/System Configuration" + }, + "methods": [ + { + "base": "GetSystemConfigPlatform_Android", + "details": { + "name": "Android" + }, + "results": [ + { + "typeid": "{72039442-EB38-4D42-A1AD-CB68F7E0EEF6}", + "details": { + "name": "int" + } + } + ] + } + ] + } + ] +} \ No newline at end of file diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/SystemConfigPlatform_InvalidPlatform.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/SystemConfigPlatform_InvalidPlatform.names new file mode 100644 index 0000000000..72b62a5d03 --- /dev/null +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/SystemConfigPlatform_InvalidPlatform.names @@ -0,0 +1,29 @@ +{ + "entries": [ + { + "base": "SystemConfigPlatform_InvalidPlatform", + "context": "Constant", + "variant": "", + "details": { + "name": "Invalid Platform", + "category": "Constants/System Configuration" + }, + "methods": [ + { + "base": "GetSystemConfigPlatform_InvalidPlatform", + "details": { + "name": "Invalid Platform" + }, + "results": [ + { + "typeid": "{72039442-EB38-4D42-A1AD-CB68F7E0EEF6}", + "details": { + "name": "int" + } + } + ] + } + ] + } + ] +} \ No newline at end of file diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/SystemConfigPlatform_Ios.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/SystemConfigPlatform_Ios.names new file mode 100644 index 0000000000..f8c15e5505 --- /dev/null +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/SystemConfigPlatform_Ios.names @@ -0,0 +1,29 @@ +{ + "entries": [ + { + "base": "SystemConfigPlatform_Ios", + "context": "Constant", + "variant": "", + "details": { + "name": "Ios", + "category": "Constants/System Configuration" + }, + "methods": [ + { + "base": "GetSystemConfigPlatform_Ios", + "details": { + "name": "Ios" + }, + "results": [ + { + "typeid": "{72039442-EB38-4D42-A1AD-CB68F7E0EEF6}", + "details": { + "name": "int" + } + } + ] + } + ] + } + ] +} \ No newline at end of file diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/SystemConfigPlatform_Mac.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/SystemConfigPlatform_Mac.names new file mode 100644 index 0000000000..d30dd7446b --- /dev/null +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/SystemConfigPlatform_Mac.names @@ -0,0 +1,29 @@ +{ + "entries": [ + { + "base": "SystemConfigPlatform_Mac", + "context": "Constant", + "variant": "", + "details": { + "name": "Mac", + "category": "Constants/System Configuration" + }, + "methods": [ + { + "base": "GetSystemConfigPlatform_Mac", + "details": { + "name": "Mac" + }, + "results": [ + { + "typeid": "{72039442-EB38-4D42-A1AD-CB68F7E0EEF6}", + "details": { + "name": "int" + } + } + ] + } + ] + } + ] +} \ No newline at end of file diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/SystemConfigPlatform_OsxMetal.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/SystemConfigPlatform_OsxMetal.names new file mode 100644 index 0000000000..8d2bd15940 --- /dev/null +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/SystemConfigPlatform_OsxMetal.names @@ -0,0 +1,29 @@ +{ + "entries": [ + { + "base": "SystemConfigPlatform_OsxMetal", + "context": "Constant", + "variant": "", + "details": { + "name": "Osx Metal", + "category": "Constants/System Configuration" + }, + "methods": [ + { + "base": "GetSystemConfigPlatform_OsxMetal", + "details": { + "name": "Osx Metal" + }, + "results": [ + { + "typeid": "{72039442-EB38-4D42-A1AD-CB68F7E0EEF6}", + "details": { + "name": "int" + } + } + ] + } + ] + } + ] +} \ No newline at end of file diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/SystemConfigPlatform_Pc.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/SystemConfigPlatform_Pc.names new file mode 100644 index 0000000000..1c0e05387d --- /dev/null +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/SystemConfigPlatform_Pc.names @@ -0,0 +1,29 @@ +{ + "entries": [ + { + "base": "SystemConfigPlatform_Pc", + "context": "Constant", + "variant": "", + "details": { + "name": "Pc", + "category": "Constants/System Configuration" + }, + "methods": [ + { + "base": "GetSystemConfigPlatform_Pc", + "details": { + "name": "Pc" + }, + "results": [ + { + "typeid": "{72039442-EB38-4D42-A1AD-CB68F7E0EEF6}", + "details": { + "name": "int" + } + } + ] + } + ] + } + ] +} \ No newline at end of file diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/SystemConfigPlatform_Provo.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/SystemConfigPlatform_Provo.names new file mode 100644 index 0000000000..84757fb237 --- /dev/null +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/SystemConfigPlatform_Provo.names @@ -0,0 +1,29 @@ +{ + "entries": [ + { + "base": "SystemConfigPlatform_Provo", + "context": "Constant", + "variant": "", + "details": { + "name": "Provo", + "category": "Constants/System Configuration" + }, + "methods": [ + { + "base": "GetSystemConfigPlatform_Provo", + "details": { + "name": "Provo" + }, + "results": [ + { + "typeid": "{72039442-EB38-4D42-A1AD-CB68F7E0EEF6}", + "details": { + "name": "int" + } + } + ] + } + ] + } + ] +} \ No newline at end of file diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/SystemConfigSpec_Auto.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/SystemConfigSpec_Auto.names new file mode 100644 index 0000000000..6362ad592f --- /dev/null +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/SystemConfigSpec_Auto.names @@ -0,0 +1,29 @@ +{ + "entries": [ + { + "base": "SystemConfigSpec_Auto", + "context": "Constant", + "variant": "", + "details": { + "name": "Auto", + "category": "Constants/System Spec" + }, + "methods": [ + { + "base": "GetSystemConfigSpec_Auto", + "details": { + "name": "Auto" + }, + "results": [ + { + "typeid": "{72039442-EB38-4D42-A1AD-CB68F7E0EEF6}", + "details": { + "name": "int" + } + } + ] + } + ] + } + ] +} \ No newline at end of file diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/SystemConfigSpec_High.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/SystemConfigSpec_High.names new file mode 100644 index 0000000000..24ca308d2a --- /dev/null +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/SystemConfigSpec_High.names @@ -0,0 +1,29 @@ +{ + "entries": [ + { + "base": "SystemConfigSpec_High", + "context": "Constant", + "variant": "", + "details": { + "name": "High", + "category": "Constants/System Spec" + }, + "methods": [ + { + "base": "GetSystemConfigSpec_High", + "details": { + "name": "High" + }, + "results": [ + { + "typeid": "{72039442-EB38-4D42-A1AD-CB68F7E0EEF6}", + "details": { + "name": "int" + } + } + ] + } + ] + } + ] +} \ No newline at end of file diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/SystemConfigSpec_Low.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/SystemConfigSpec_Low.names new file mode 100644 index 0000000000..17250ade92 --- /dev/null +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/SystemConfigSpec_Low.names @@ -0,0 +1,29 @@ +{ + "entries": [ + { + "base": "SystemConfigSpec_Low", + "context": "Constant", + "variant": "", + "details": { + "name": "Low", + "category": "Constants/System Spec" + }, + "methods": [ + { + "base": "GetSystemConfigSpec_Low", + "details": { + "name": "Low" + }, + "results": [ + { + "typeid": "{72039442-EB38-4D42-A1AD-CB68F7E0EEF6}", + "details": { + "name": "int" + } + } + ] + } + ] + } + ] +} \ No newline at end of file diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/SystemConfigSpec_Medium.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/SystemConfigSpec_Medium.names new file mode 100644 index 0000000000..dcdae1a975 --- /dev/null +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/SystemConfigSpec_Medium.names @@ -0,0 +1,29 @@ +{ + "entries": [ + { + "base": "SystemConfigSpec_Medium", + "context": "Constant", + "variant": "", + "details": { + "name": "Medium", + "category": "Constants/System Spec" + }, + "methods": [ + { + "base": "GetSystemConfigSpec_Medium", + "details": { + "name": "Medium" + }, + "results": [ + { + "typeid": "{72039442-EB38-4D42-A1AD-CB68F7E0EEF6}", + "details": { + "name": "int" + } + } + ] + } + ] + } + ] +} \ No newline at end of file diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/SystemConfigSpec_VeryHigh.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/SystemConfigSpec_VeryHigh.names new file mode 100644 index 0000000000..44c36f472c --- /dev/null +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/SystemConfigSpec_VeryHigh.names @@ -0,0 +1,29 @@ +{ + "entries": [ + { + "base": "SystemConfigSpec_VeryHigh", + "context": "Constant", + "variant": "", + "details": { + "name": "Very High", + "category": "Constants/System Spec" + }, + "methods": [ + { + "base": "GetSystemConfigSpec_VeryHigh", + "details": { + "name": "Very High" + }, + "results": [ + { + "typeid": "{72039442-EB38-4D42-A1AD-CB68F7E0EEF6}", + "details": { + "name": "int" + } + } + ] + } + ] + } + ] +} \ No newline at end of file diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/SystemEntityId.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/SystemEntityId.names new file mode 100644 index 0000000000..fecc69eb1c --- /dev/null +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/SystemEntityId.names @@ -0,0 +1,30 @@ +{ + "entries": [ + { + "base": "SystemEntityId", + "context": "Constant", + "variant": "", + "details": { + "name": "System Entity Id", + "category": "Constants/System" + }, + "methods": [ + { + "base": "GetSystemEntityId", + "details": { + "name": "Get System Entity Id" + }, + "results": [ + { + "typeid": "{6383F1D3-BB27-4E6B-A49A-6409B2059EAA}", + "details": { + "name": "Entity Id", + "tooltip": "Entity Unique Id" + } + } + ] + } + ] + } + ] +} \ No newline at end of file diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/TETRAHEDRON.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/TETRAHEDRON.names new file mode 100644 index 0000000000..8506904701 --- /dev/null +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/TETRAHEDRON.names @@ -0,0 +1,29 @@ +{ + "entries": [ + { + "base": "TETRAHEDRON", + "context": "Constant", + "variant": "", + "details": { + "name": "Tetrahedron", + "category": "Constants/White Box" + }, + "methods": [ + { + "base": "GetTETRAHEDRON", + "details": { + "name": "Tetrahedron" + }, + "results": [ + { + "typeid": "{72039442-EB38-4D42-A1AD-CB68F7E0EEF6}", + "details": { + "name": "int" + } + } + ] + } + ] + } + ] +} \ No newline at end of file diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/ThresholdGradientComponentTypeId.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/ThresholdGradientComponentTypeId.names new file mode 100644 index 0000000000..be9c791c63 --- /dev/null +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/ThresholdGradientComponentTypeId.names @@ -0,0 +1,29 @@ +{ + "entries": [ + { + "base": "ThresholdGradientComponentTypeId", + "context": "Constant", + "variant": "", + "details": { + "name": "Threshold Gradient Component Type Id", + "category": "Constants/Editor" + }, + "methods": [ + { + "base": "GetThresholdGradientComponentTypeId", + "details": { + "name": "Get Threshold Gradient Component Type Id" + }, + "results": [ + { + "typeid": "{E152C105-A133-4D03-BBF8-3D4B2FBA3E2A}", + "details": { + "name": "AZ:: Uuid" + } + } + ] + } + ] + } + ] +} \ No newline at end of file diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/TransformComponentTypeId.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/TransformComponentTypeId.names new file mode 100644 index 0000000000..b1039ce129 --- /dev/null +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/TransformComponentTypeId.names @@ -0,0 +1,29 @@ +{ + "entries": [ + { + "base": "TransformComponentTypeId", + "context": "Constant", + "variant": "", + "details": { + "name": "Transform Component Type Id", + "category": "Constants/Editor" + }, + "methods": [ + { + "base": "GetTransformComponentTypeId", + "details": { + "name": "Get Transform Component Type Id" + }, + "results": [ + { + "typeid": "{E152C105-A133-4D03-BBF8-3D4B2FBA3E2A}", + "details": { + "name": "AZ:: Uuid" + } + } + ] + } + ] + } + ] +} \ No newline at end of file diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/TransformMode_Rotation.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/TransformMode_Rotation.names new file mode 100644 index 0000000000..3a9f17cf87 --- /dev/null +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/TransformMode_Rotation.names @@ -0,0 +1,29 @@ +{ + "entries": [ + { + "base": "TransformMode_Rotation", + "context": "Constant", + "variant": "", + "details": { + "name": "Rotation", + "category": "Constants/Transform/Mode" + }, + "methods": [ + { + "base": "GetTransformMode_Rotation", + "details": { + "name": "Rotation" + }, + "results": [ + { + "typeid": "{72039442-EB38-4D42-A1AD-CB68F7E0EEF6}", + "details": { + "name": "int" + } + } + ] + } + ] + } + ] +} \ No newline at end of file diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/TransformMode_Scale.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/TransformMode_Scale.names new file mode 100644 index 0000000000..45c665434a --- /dev/null +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/TransformMode_Scale.names @@ -0,0 +1,29 @@ +{ + "entries": [ + { + "base": "TransformMode_Scale", + "context": "Constant", + "variant": "", + "details": { + "name": "Scale", + "category": "Constants/Transform/Mode" + }, + "methods": [ + { + "base": "GetTransformMode_Scale", + "details": { + "name": "Scale" + }, + "results": [ + { + "typeid": "{72039442-EB38-4D42-A1AD-CB68F7E0EEF6}", + "details": { + "name": "int" + } + } + ] + } + ] + } + ] +} \ No newline at end of file diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/TransformMode_Translation.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/TransformMode_Translation.names new file mode 100644 index 0000000000..fbcf88a7da --- /dev/null +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/TransformMode_Translation.names @@ -0,0 +1,29 @@ +{ + "entries": [ + { + "base": "TransformMode_Translation", + "context": "Constant", + "variant": "", + "details": { + "name": "Translation", + "category": "Constants/Transform/Mode" + }, + "methods": [ + { + "base": "GetTransformMode_Translation", + "details": { + "name": "Translation" + }, + "results": [ + { + "typeid": "{72039442-EB38-4D42-A1AD-CB68F7E0EEF6}", + "details": { + "name": "int" + } + } + ] + } + ] + } + ] +} \ No newline at end of file diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/TransformPivot_Center.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/TransformPivot_Center.names new file mode 100644 index 0000000000..0c88ae1d0b --- /dev/null +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/TransformPivot_Center.names @@ -0,0 +1,29 @@ +{ + "entries": [ + { + "base": "TransformPivot_Center", + "context": "Constant", + "variant": "", + "details": { + "name": "Center", + "category": "Constants/Transform/Pivot" + }, + "methods": [ + { + "base": "GetTransformPivot_Center", + "details": { + "name": "Center" + }, + "results": [ + { + "typeid": "{72039442-EB38-4D42-A1AD-CB68F7E0EEF6}", + "details": { + "name": "int" + } + } + ] + } + ] + } + ] +} \ No newline at end of file diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/TransformPivot_Object.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/TransformPivot_Object.names new file mode 100644 index 0000000000..340bc2dd33 --- /dev/null +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/TransformPivot_Object.names @@ -0,0 +1,29 @@ +{ + "entries": [ + { + "base": "TransformPivot_Object", + "context": "Constant", + "variant": "", + "details": { + "name": "Object", + "category": "Constants/Transform/Pivot" + }, + "methods": [ + { + "base": "GetTransformPivot_Object", + "details": { + "name": "Object" + }, + "results": [ + { + "typeid": "{72039442-EB38-4D42-A1AD-CB68F7E0EEF6}", + "details": { + "name": "int" + } + } + ] + } + ] + } + ] +} \ No newline at end of file diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/TransformRefreshType_All.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/TransformRefreshType_All.names new file mode 100644 index 0000000000..0d024e0bbc --- /dev/null +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/TransformRefreshType_All.names @@ -0,0 +1,29 @@ +{ + "entries": [ + { + "base": "TransformRefreshType_All", + "context": "Constant", + "variant": "", + "details": { + "name": "All", + "category": "Constants/Transform/Refresh Type" + }, + "methods": [ + { + "base": "GetTransformRefreshType_All", + "details": { + "name": "All" + }, + "results": [ + { + "typeid": "{72039442-EB38-4D42-A1AD-CB68F7E0EEF6}", + "details": { + "name": "int" + } + } + ] + } + ] + } + ] +} \ No newline at end of file diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/TransformRefreshType_Orientation.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/TransformRefreshType_Orientation.names new file mode 100644 index 0000000000..e80e1fc12d --- /dev/null +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/TransformRefreshType_Orientation.names @@ -0,0 +1,29 @@ +{ + "entries": [ + { + "base": "TransformRefreshType_Orientation", + "context": "Constant", + "variant": "", + "details": { + "name": "Orientation", + "category": "Constants/Transform/Refresh Type" + }, + "methods": [ + { + "base": "GetTransformRefreshType_Orientation", + "details": { + "name": "Orientation" + }, + "results": [ + { + "typeid": "{72039442-EB38-4D42-A1AD-CB68F7E0EEF6}", + "details": { + "name": "int" + } + } + ] + } + ] + } + ] +} \ No newline at end of file diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/TransformRefreshType_Translation.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/TransformRefreshType_Translation.names new file mode 100644 index 0000000000..a4ce9607e3 --- /dev/null +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/TransformRefreshType_Translation.names @@ -0,0 +1,29 @@ +{ + "entries": [ + { + "base": "TransformRefreshType_Translation", + "context": "Constant", + "variant": "", + "details": { + "name": "Translation", + "category": "Constants/Transform/Refresh Type" + }, + "methods": [ + { + "base": "GetTransformRefreshType_Translation", + "details": { + "name": "Translation" + }, + "results": [ + { + "typeid": "{72039442-EB38-4D42-A1AD-CB68F7E0EEF6}", + "details": { + "name": "int" + } + } + ] + } + ] + } + ] +} \ No newline at end of file diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/TubeShapeComponentTypeId.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/TubeShapeComponentTypeId.names new file mode 100644 index 0000000000..d0c4f47888 --- /dev/null +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/TubeShapeComponentTypeId.names @@ -0,0 +1,29 @@ +{ + "entries": [ + { + "base": "TubeShapeComponentTypeId", + "context": "Constant", + "variant": "", + "details": { + "name": "Tube Shape Component Type Id", + "category": "Constants/Editor" + }, + "methods": [ + { + "base": "GetTubeShapeComponentTypeId", + "details": { + "name": "Get Tube Shape Component Type Id" + }, + "results": [ + { + "typeid": "{E152C105-A133-4D03-BBF8-3D4B2FBA3E2A}", + "details": { + "name": "AZ:: Uuid" + } + } + ] + } + ] + } + ] +} \ No newline at end of file diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/UiLayoutCellUnspecifiedSize.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/UiLayoutCellUnspecifiedSize.names new file mode 100644 index 0000000000..63d58ba29a --- /dev/null +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/UiLayoutCellUnspecifiedSize.names @@ -0,0 +1,29 @@ +{ + "entries": [ + { + "base": "UiLayoutCellUnspecifiedSize", + "context": "Constant", + "variant": "", + "details": { + "name": "Cell Unspecified Size", + "category": "Constants/UI/Ui Layout" + }, + "methods": [ + { + "base": "GetUiLayoutCellUnspecifiedSize", + "details": { + "name": "Layout Cell Unspecified Size" + }, + "results": [ + { + "typeid": "{EA2C3E90-AFBE-44D4-A90D-FAAF79BAF93D}", + "details": { + "name": "float" + } + } + ] + } + ] + } + ] +} \ No newline at end of file diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/VegetationSpawnerComponentTypeId.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/VegetationSpawnerComponentTypeId.names new file mode 100644 index 0000000000..5b9e9394bd --- /dev/null +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/VegetationSpawnerComponentTypeId.names @@ -0,0 +1,29 @@ +{ + "entries": [ + { + "base": "VegetationSpawnerComponentTypeId", + "context": "Constant", + "variant": "", + "details": { + "name": "Vegetation Spawner Component Type Id", + "category": "Constants/Editor" + }, + "methods": [ + { + "base": "GetVegetationSpawnerComponentTypeId", + "details": { + "name": "Get Vegetation Spawner Component Type Id" + }, + "results": [ + { + "typeid": "{E152C105-A133-4D03-BBF8-3D4B2FBA3E2A}", + "details": { + "name": "AZ:: Uuid" + } + } + ] + } + ] + } + ] +} \ No newline at end of file diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/eSSB_GotoEndTime.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/eSSB_GotoEndTime.names new file mode 100644 index 0000000000..4a5990bb0d --- /dev/null +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/eSSB_GotoEndTime.names @@ -0,0 +1,29 @@ +{ + "entries": [ + { + "base": "eSSB_GotoEndTime", + "context": "Constant", + "variant": "", + "details": { + "name": "Goto End Time", + "category": "Constants/UI/Animation/Sequence Stop Behavior" + }, + "methods": [ + { + "base": "GeteSSB_GotoEndTime", + "details": { + "name": "Goto End Time" + }, + "results": [ + { + "typeid": "{72039442-EB38-4D42-A1AD-CB68F7E0EEF6}", + "details": { + "name": "int" + } + } + ] + } + ] + } + ] +} \ No newline at end of file diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/eSSB_GotoStartTime.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/eSSB_GotoStartTime.names new file mode 100644 index 0000000000..d962801a59 --- /dev/null +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/eSSB_GotoStartTime.names @@ -0,0 +1,29 @@ +{ + "entries": [ + { + "base": "eSSB_GotoStartTime", + "context": "Constant", + "variant": "", + "details": { + "name": "Goto Start Time", + "category": "Constants/UI/Animation/Sequence Stop Behavior" + }, + "methods": [ + { + "base": "GeteSSB_GotoStartTime", + "details": { + "name": "Goto Start Time" + }, + "results": [ + { + "typeid": "{72039442-EB38-4D42-A1AD-CB68F7E0EEF6}", + "details": { + "name": "int" + } + } + ] + } + ] + } + ] +} \ No newline at end of file diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/eSSB_LeaveTime.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/eSSB_LeaveTime.names new file mode 100644 index 0000000000..e78c9df425 --- /dev/null +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/eSSB_LeaveTime.names @@ -0,0 +1,29 @@ +{ + "entries": [ + { + "base": "eSSB_LeaveTime", + "context": "Constant", + "variant": "", + "details": { + "name": "Leave Time", + "category": "Constants/UI/Animation/Sequence Stop Behavior" + }, + "methods": [ + { + "base": "GeteSSB_LeaveTime", + "details": { + "name": "Leave Time" + }, + "results": [ + { + "typeid": "{72039442-EB38-4D42-A1AD-CB68F7E0EEF6}", + "details": { + "name": "int" + } + } + ] + } + ] + } + ] +} \ No newline at end of file diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/eUiAnimationEvent_Aborted.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/eUiAnimationEvent_Aborted.names new file mode 100644 index 0000000000..81d6b94038 --- /dev/null +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/eUiAnimationEvent_Aborted.names @@ -0,0 +1,29 @@ +{ + "entries": [ + { + "base": "eUiAnimationEvent_Aborted", + "context": "Constant", + "variant": "", + "details": { + "name": "Aborted", + "category": "Constants/UI/Animation Event" + }, + "methods": [ + { + "base": "GeteUiAnimationEvent_Aborted", + "details": { + "name": "Aborted" + }, + "results": [ + { + "typeid": "{72039442-EB38-4D42-A1AD-CB68F7E0EEF6}", + "details": { + "name": "int" + } + } + ] + } + ] + } + ] +} \ No newline at end of file diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/eUiAnimationEvent_Started.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/eUiAnimationEvent_Started.names new file mode 100644 index 0000000000..85684e5627 --- /dev/null +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/eUiAnimationEvent_Started.names @@ -0,0 +1,29 @@ +{ + "entries": [ + { + "base": "eUiAnimationEvent_Started", + "context": "Constant", + "variant": "", + "details": { + "name": "Started", + "category": "Constants/UI/Animation Event" + }, + "methods": [ + { + "base": "GeteUiAnimationEvent_Started", + "details": { + "name": "Get Started" + }, + "results": [ + { + "typeid": "{72039442-EB38-4D42-A1AD-CB68F7E0EEF6}", + "details": { + "name": "int" + } + } + ] + } + ] + } + ] +} \ No newline at end of file diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/eUiAnimationEvent_Stopped.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/eUiAnimationEvent_Stopped.names new file mode 100644 index 0000000000..9a8c843449 --- /dev/null +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/eUiAnimationEvent_Stopped.names @@ -0,0 +1,29 @@ +{ + "entries": [ + { + "base": "eUiAnimationEvent_Stopped", + "context": "Constant", + "variant": "", + "details": { + "name": "Stopped", + "category": "Constants/UI/Animation Event" + }, + "methods": [ + { + "base": "GeteUiAnimationEvent_Stopped", + "details": { + "name": "Stopped" + }, + "results": [ + { + "typeid": "{72039442-EB38-4D42-A1AD-CB68F7E0EEF6}", + "details": { + "name": "int" + } + } + ] + } + ] + } + ] +} \ No newline at end of file diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/eUiAnimationEvent_Updated.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/eUiAnimationEvent_Updated.names new file mode 100644 index 0000000000..8cce3444ad --- /dev/null +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/eUiAnimationEvent_Updated.names @@ -0,0 +1,29 @@ +{ + "entries": [ + { + "base": "eUiAnimationEvent_Updated", + "context": "Constant", + "variant": "", + "details": { + "name": "Updated", + "category": "Constants/UI/Animation Event" + }, + "methods": [ + { + "base": "GeteUiAnimationEvent_Updated", + "details": { + "name": "Updated" + }, + "results": [ + { + "typeid": "{72039442-EB38-4D42-A1AD-CB68F7E0EEF6}", + "details": { + "name": "int" + } + } + ] + } + ] + } + ] +} \ No newline at end of file diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/eUiDragState_Invalid.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/eUiDragState_Invalid.names new file mode 100644 index 0000000000..bfb9de3855 --- /dev/null +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/eUiDragState_Invalid.names @@ -0,0 +1,29 @@ +{ + "entries": [ + { + "base": "eUiDragState_Invalid", + "context": "Constant", + "variant": "", + "details": { + "name": "Invalid", + "category": "Constants/UI/Drag State" + }, + "methods": [ + { + "base": "GeteUiDragState_Invalid", + "details": { + "name": "Invalid" + }, + "results": [ + { + "typeid": "{72039442-EB38-4D42-A1AD-CB68F7E0EEF6}", + "details": { + "name": "int" + } + } + ] + } + ] + } + ] +} \ No newline at end of file diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/eUiDragState_Normal.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/eUiDragState_Normal.names new file mode 100644 index 0000000000..b1d31d25de --- /dev/null +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/eUiDragState_Normal.names @@ -0,0 +1,29 @@ +{ + "entries": [ + { + "base": "eUiDragState_Normal", + "context": "Constant", + "variant": "", + "details": { + "name": "Normal", + "category": "Constants/UI/Drag State" + }, + "methods": [ + { + "base": "GeteUiDragState_Normal", + "details": { + "name": "Normal" + }, + "results": [ + { + "typeid": "{72039442-EB38-4D42-A1AD-CB68F7E0EEF6}", + "details": { + "name": "int" + } + } + ] + } + ] + } + ] +} \ No newline at end of file diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/eUiDragState_Valid.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/eUiDragState_Valid.names new file mode 100644 index 0000000000..f58ad69a9a --- /dev/null +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/eUiDragState_Valid.names @@ -0,0 +1,29 @@ +{ + "entries": [ + { + "base": "eUiDragState_Valid", + "context": "Constant", + "variant": "", + "details": { + "name": "Valid", + "category": "Constants/UI/Drag State" + }, + "methods": [ + { + "base": "GeteUiDragState_Valid", + "details": { + "name": "Valid" + }, + "results": [ + { + "typeid": "{72039442-EB38-4D42-A1AD-CB68F7E0EEF6}", + "details": { + "name": "int" + } + } + ] + } + ] + } + ] +} \ No newline at end of file diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/eUiDropState_Invalid.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/eUiDropState_Invalid.names new file mode 100644 index 0000000000..26f2d83294 --- /dev/null +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/eUiDropState_Invalid.names @@ -0,0 +1,29 @@ +{ + "entries": [ + { + "base": "eUiDropState_Invalid", + "context": "Constant", + "variant": "", + "details": { + "name": "Invalid", + "category": "Constants/UI/Drop State" + }, + "methods": [ + { + "base": "GeteUiDropState_Invalid", + "details": { + "name": "Invalid" + }, + "results": [ + { + "typeid": "{72039442-EB38-4D42-A1AD-CB68F7E0EEF6}", + "details": { + "name": "int" + } + } + ] + } + ] + } + ] +} \ No newline at end of file diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/eUiDropState_Normal.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/eUiDropState_Normal.names new file mode 100644 index 0000000000..076dd2d7fe --- /dev/null +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/eUiDropState_Normal.names @@ -0,0 +1,29 @@ +{ + "entries": [ + { + "base": "eUiDropState_Normal", + "context": "Constant", + "variant": "", + "details": { + "name": "Normal", + "category": "Constants/UI/Drop State" + }, + "methods": [ + { + "base": "GeteUiDropState_Normal", + "details": { + "name": "Normal" + }, + "results": [ + { + "typeid": "{72039442-EB38-4D42-A1AD-CB68F7E0EEF6}", + "details": { + "name": "int" + } + } + ] + } + ] + } + ] +} \ No newline at end of file diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/eUiDropState_Valid.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/eUiDropState_Valid.names new file mode 100644 index 0000000000..3a8db2c23c --- /dev/null +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/eUiDropState_Valid.names @@ -0,0 +1,29 @@ +{ + "entries": [ + { + "base": "eUiDropState_Valid", + "context": "Constant", + "variant": "", + "details": { + "name": "Valid", + "category": "Constants/UI/Drop State" + }, + "methods": [ + { + "base": "GeteUiDropState_Valid", + "details": { + "name": "Valid" + }, + "results": [ + { + "typeid": "{72039442-EB38-4D42-A1AD-CB68F7E0EEF6}", + "details": { + "name": "int" + } + } + ] + } + ] + } + ] +} \ No newline at end of file diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/eUiDynamicContentDBColorType_Free.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/eUiDynamicContentDBColorType_Free.names new file mode 100644 index 0000000000..e420f6ad42 --- /dev/null +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/eUiDynamicContentDBColorType_Free.names @@ -0,0 +1,29 @@ +{ + "entries": [ + { + "base": "eUiDynamicContentDBColorType_Free", + "context": "Constant", + "variant": "", + "details": { + "name": "Color Type Free", + "category": "Constants/UI/Dynamic ContentDB" + }, + "methods": [ + { + "base": "GeteUiDynamicContentDBColorType_Free", + "details": { + "name": "Color Type Free" + }, + "results": [ + { + "typeid": "{72039442-EB38-4D42-A1AD-CB68F7E0EEF6}", + "details": { + "name": "int" + } + } + ] + } + ] + } + ] +} \ No newline at end of file diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/eUiDynamicContentDBColorType_Paid.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/eUiDynamicContentDBColorType_Paid.names new file mode 100644 index 0000000000..98f6c71f48 --- /dev/null +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/eUiDynamicContentDBColorType_Paid.names @@ -0,0 +1,29 @@ +{ + "entries": [ + { + "base": "eUiDynamicContentDBColorType_Paid", + "context": "Constant", + "variant": "", + "details": { + "name": "Color Type Paid", + "category": "Constants/UI/Dynamic ContentDB" + }, + "methods": [ + { + "base": "GeteUiDynamicContentDBColorType_Paid", + "details": { + "name": "Color Type Paid" + }, + "results": [ + { + "typeid": "{72039442-EB38-4D42-A1AD-CB68F7E0EEF6}", + "details": { + "name": "int" + } + } + ] + } + ] + } + ] +} \ No newline at end of file diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/eUiEmitShape_Circle.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/eUiEmitShape_Circle.names new file mode 100644 index 0000000000..4b9f83c1f8 --- /dev/null +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/eUiEmitShape_Circle.names @@ -0,0 +1,29 @@ +{ + "entries": [ + { + "base": "eUiEmitShape_Circle", + "context": "Constant", + "variant": "", + "details": { + "name": "Circle", + "category": "Constants/UI/Emit Shape" + }, + "methods": [ + { + "base": "GeteUiEmitShape_Circle", + "details": { + "name": "Circle" + }, + "results": [ + { + "typeid": "{72039442-EB38-4D42-A1AD-CB68F7E0EEF6}", + "details": { + "name": "int" + } + } + ] + } + ] + } + ] +} \ No newline at end of file diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/eUiEmitShape_Point.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/eUiEmitShape_Point.names new file mode 100644 index 0000000000..965d9445dd --- /dev/null +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/eUiEmitShape_Point.names @@ -0,0 +1,29 @@ +{ + "entries": [ + { + "base": "eUiEmitShape_Point", + "context": "Constant", + "variant": "", + "details": { + "name": "Point", + "category": "Constants/UI/Emit Shape" + }, + "methods": [ + { + "base": "GeteUiEmitShape_Point", + "details": { + "name": "Point" + }, + "results": [ + { + "typeid": "{72039442-EB38-4D42-A1AD-CB68F7E0EEF6}", + "details": { + "name": "int" + } + } + ] + } + ] + } + ] +} \ No newline at end of file diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/eUiEmitShape_Quad.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/eUiEmitShape_Quad.names new file mode 100644 index 0000000000..76c7c7d9f1 --- /dev/null +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/eUiEmitShape_Quad.names @@ -0,0 +1,29 @@ +{ + "entries": [ + { + "base": "eUiEmitShape_Quad", + "context": "Constant", + "variant": "", + "details": { + "name": "Quad", + "category": "Constants/UI/Emit Shape" + }, + "methods": [ + { + "base": "GeteUiEmitShape_Quad", + "details": { + "name": "Quad" + }, + "results": [ + { + "typeid": "{72039442-EB38-4D42-A1AD-CB68F7E0EEF6}", + "details": { + "name": "int" + } + } + ] + } + ] + } + ] +} \ No newline at end of file diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/eUiFillCornerOrigin_BottomLeft.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/eUiFillCornerOrigin_BottomLeft.names new file mode 100644 index 0000000000..8911478f3c --- /dev/null +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/eUiFillCornerOrigin_BottomLeft.names @@ -0,0 +1,29 @@ +{ + "entries": [ + { + "base": "eUiFillCornerOrigin_BottomLeft", + "context": "Constant", + "variant": "", + "details": { + "name": "Bottom Left", + "category": "Constants/UI/Fill Corner" + }, + "methods": [ + { + "base": "GeteUiFillCornerOrigin_BottomLeft", + "details": { + "name": "Bottom Left" + }, + "results": [ + { + "typeid": "{72039442-EB38-4D42-A1AD-CB68F7E0EEF6}", + "details": { + "name": "int" + } + } + ] + } + ] + } + ] +} \ No newline at end of file diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/eUiFillCornerOrigin_BottomRight.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/eUiFillCornerOrigin_BottomRight.names new file mode 100644 index 0000000000..da3225dd0b --- /dev/null +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/eUiFillCornerOrigin_BottomRight.names @@ -0,0 +1,29 @@ +{ + "entries": [ + { + "base": "eUiFillCornerOrigin_BottomRight", + "context": "Constant", + "variant": "", + "details": { + "name": "Bottom Right", + "category": "Constants/UI/Fill Corner" + }, + "methods": [ + { + "base": "GeteUiFillCornerOrigin_BottomRight", + "details": { + "name": "Bottom Right" + }, + "results": [ + { + "typeid": "{72039442-EB38-4D42-A1AD-CB68F7E0EEF6}", + "details": { + "name": "int" + } + } + ] + } + ] + } + ] +} \ No newline at end of file diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/eUiFillCornerOrigin_TopLeft.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/eUiFillCornerOrigin_TopLeft.names new file mode 100644 index 0000000000..63fa743485 --- /dev/null +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/eUiFillCornerOrigin_TopLeft.names @@ -0,0 +1,29 @@ +{ + "entries": [ + { + "base": "eUiFillCornerOrigin_TopLeft", + "context": "Constant", + "variant": "", + "details": { + "name": "Top Left", + "category": "Constants/UI/Fill Corner" + }, + "methods": [ + { + "base": "GeteUiFillCornerOrigin_TopLeft", + "details": { + "name": "Top Left" + }, + "results": [ + { + "typeid": "{72039442-EB38-4D42-A1AD-CB68F7E0EEF6}", + "details": { + "name": "int" + } + } + ] + } + ] + } + ] +} \ No newline at end of file diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/eUiFillCornerOrigin_TopRight.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/eUiFillCornerOrigin_TopRight.names new file mode 100644 index 0000000000..7b1c1204d4 --- /dev/null +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/eUiFillCornerOrigin_TopRight.names @@ -0,0 +1,29 @@ +{ + "entries": [ + { + "base": "eUiFillCornerOrigin_TopRight", + "context": "Constant", + "variant": "", + "details": { + "name": "Top Right", + "category": "Constants/UI/Fill Corner" + }, + "methods": [ + { + "base": "GeteUiFillCornerOrigin_TopRight", + "details": { + "name": "Top Right" + }, + "results": [ + { + "typeid": "{72039442-EB38-4D42-A1AD-CB68F7E0EEF6}", + "details": { + "name": "int" + } + } + ] + } + ] + } + ] +} \ No newline at end of file diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/eUiFillEdgeOrigin_Bottom.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/eUiFillEdgeOrigin_Bottom.names new file mode 100644 index 0000000000..430943dba2 --- /dev/null +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/eUiFillEdgeOrigin_Bottom.names @@ -0,0 +1,29 @@ +{ + "entries": [ + { + "base": "eUiFillEdgeOrigin_Bottom", + "context": "Constant", + "variant": "", + "details": { + "name": "Bottom", + "category": "Constants/UI/Fill Edge" + }, + "methods": [ + { + "base": "GeteUiFillEdgeOrigin_Bottom", + "details": { + "name": "Bottom" + }, + "results": [ + { + "typeid": "{72039442-EB38-4D42-A1AD-CB68F7E0EEF6}", + "details": { + "name": "int" + } + } + ] + } + ] + } + ] +} \ No newline at end of file diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/eUiFillEdgeOrigin_Left.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/eUiFillEdgeOrigin_Left.names new file mode 100644 index 0000000000..f28601e4f4 --- /dev/null +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/eUiFillEdgeOrigin_Left.names @@ -0,0 +1,29 @@ +{ + "entries": [ + { + "base": "eUiFillEdgeOrigin_Left", + "context": "Constant", + "variant": "", + "details": { + "name": "Left", + "category": "Constants/UI/Fill Edge" + }, + "methods": [ + { + "base": "GeteUiFillEdgeOrigin_Left", + "details": { + "name": "Left" + }, + "results": [ + { + "typeid": "{72039442-EB38-4D42-A1AD-CB68F7E0EEF6}", + "details": { + "name": "int" + } + } + ] + } + ] + } + ] +} \ No newline at end of file diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/eUiFillEdgeOrigin_Right.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/eUiFillEdgeOrigin_Right.names new file mode 100644 index 0000000000..cd75d8a15f --- /dev/null +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/eUiFillEdgeOrigin_Right.names @@ -0,0 +1,29 @@ +{ + "entries": [ + { + "base": "eUiFillEdgeOrigin_Right", + "context": "Constant", + "variant": "", + "details": { + "name": "Right", + "category": "Constants/UI/Fill Edge" + }, + "methods": [ + { + "base": "GeteUiFillEdgeOrigin_Right", + "details": { + "name": "Right" + }, + "results": [ + { + "typeid": "{72039442-EB38-4D42-A1AD-CB68F7E0EEF6}", + "details": { + "name": "int" + } + } + ] + } + ] + } + ] +} \ No newline at end of file diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/eUiFillEdgeOrigin_Top.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/eUiFillEdgeOrigin_Top.names new file mode 100644 index 0000000000..648f9cc379 --- /dev/null +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/eUiFillEdgeOrigin_Top.names @@ -0,0 +1,30 @@ +{ + "entries": [ + { + "base": "eUiFillEdgeOrigin_Top", + "context": "Constant", + "variant": "", + "details": { + "name": "Top", + "category": "Constants/UI/Fill Edge", + "subtitle": "Fill Edge" + }, + "methods": [ + { + "base": "GeteUiFillEdgeOrigin_Top", + "details": { + "name": "Top" + }, + "results": [ + { + "typeid": "{72039442-EB38-4D42-A1AD-CB68F7E0EEF6}", + "details": { + "name": "int" + } + } + ] + } + ] + } + ] +} \ No newline at end of file diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/eUiFillType_Linear.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/eUiFillType_Linear.names new file mode 100644 index 0000000000..64cf4df11b --- /dev/null +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/eUiFillType_Linear.names @@ -0,0 +1,29 @@ +{ + "entries": [ + { + "base": "eUiFillType_Linear", + "context": "Constant", + "variant": "", + "details": { + "name": "Linear", + "category": "Constants/UI/Fill Type" + }, + "methods": [ + { + "base": "GeteUiFillType_Linear", + "details": { + "name": "Linear" + }, + "results": [ + { + "typeid": "{72039442-EB38-4D42-A1AD-CB68F7E0EEF6}", + "details": { + "name": "int" + } + } + ] + } + ] + } + ] +} \ No newline at end of file diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/eUiFillType_None.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/eUiFillType_None.names new file mode 100644 index 0000000000..31746bdda5 --- /dev/null +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/eUiFillType_None.names @@ -0,0 +1,29 @@ +{ + "entries": [ + { + "base": "eUiFillType_None", + "context": "Constant", + "variant": "", + "details": { + "name": "None", + "category": "Constants/UI/Fill Type" + }, + "methods": [ + { + "base": "GeteUiFillType_None", + "details": { + "name": "None" + }, + "results": [ + { + "typeid": "{72039442-EB38-4D42-A1AD-CB68F7E0EEF6}", + "details": { + "name": "int" + } + } + ] + } + ] + } + ] +} \ No newline at end of file diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/eUiFillType_Radial.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/eUiFillType_Radial.names new file mode 100644 index 0000000000..3a92aafdd7 --- /dev/null +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/eUiFillType_Radial.names @@ -0,0 +1,29 @@ +{ + "entries": [ + { + "base": "eUiFillType_Radial", + "context": "Constant", + "variant": "", + "details": { + "name": "Radial", + "category": "Constants/UI/Fill Type" + }, + "methods": [ + { + "base": "GeteUiFillType_Radial", + "details": { + "name": "Radial" + }, + "results": [ + { + "typeid": "{72039442-EB38-4D42-A1AD-CB68F7E0EEF6}", + "details": { + "name": "int" + } + } + ] + } + ] + } + ] +} \ No newline at end of file diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/eUiFillType_RadialCorner.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/eUiFillType_RadialCorner.names new file mode 100644 index 0000000000..25ec95691c --- /dev/null +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/eUiFillType_RadialCorner.names @@ -0,0 +1,29 @@ +{ + "entries": [ + { + "base": "eUiFillType_RadialCorner", + "context": "Constant", + "variant": "", + "details": { + "name": "Radial Corner", + "category": "Constants/UI/Fill Type" + }, + "methods": [ + { + "base": "GeteUiFillType_RadialCorner", + "details": { + "name": "Radial Corner" + }, + "results": [ + { + "typeid": "{72039442-EB38-4D42-A1AD-CB68F7E0EEF6}", + "details": { + "name": "int" + } + } + ] + } + ] + } + ] +} \ No newline at end of file diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/eUiFillType_RadialEdge.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/eUiFillType_RadialEdge.names new file mode 100644 index 0000000000..99a7798bed --- /dev/null +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/eUiFillType_RadialEdge.names @@ -0,0 +1,29 @@ +{ + "entries": [ + { + "base": "eUiFillType_RadialEdge", + "context": "Constant", + "variant": "", + "details": { + "name": "Radial Edge", + "category": "Constants/UI/Fill Type" + }, + "methods": [ + { + "base": "GeteUiFillType_RadialEdge", + "details": { + "name": "Radial Edge" + }, + "results": [ + { + "typeid": "{72039442-EB38-4D42-A1AD-CB68F7E0EEF6}", + "details": { + "name": "int" + } + } + ] + } + ] + } + ] +} \ No newline at end of file diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/eUiFlipbookAnimationFramerateUnits_FPS.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/eUiFlipbookAnimationFramerateUnits_FPS.names new file mode 100644 index 0000000000..ffab126757 --- /dev/null +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/eUiFlipbookAnimationFramerateUnits_FPS.names @@ -0,0 +1,29 @@ +{ + "entries": [ + { + "base": "eUiFlipbookAnimationFramerateUnits_FPS", + "context": "Constant", + "variant": "", + "details": { + "name": "Frames Per Second", + "category": "Constants/UI/Flipbook Animation" + }, + "methods": [ + { + "base": "GeteUiFlipbookAnimationFramerateUnits_FPS", + "details": { + "name": "Frames Per Second" + }, + "results": [ + { + "typeid": "{72039442-EB38-4D42-A1AD-CB68F7E0EEF6}", + "details": { + "name": "int" + } + } + ] + } + ] + } + ] +} \ No newline at end of file diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/eUiFlipbookAnimationFramerateUnits_SecondsPerFrame.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/eUiFlipbookAnimationFramerateUnits_SecondsPerFrame.names new file mode 100644 index 0000000000..273d36c382 --- /dev/null +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/eUiFlipbookAnimationFramerateUnits_SecondsPerFrame.names @@ -0,0 +1,29 @@ +{ + "entries": [ + { + "base": "eUiFlipbookAnimationFramerateUnits_SecondsPerFrame", + "context": "Constant", + "variant": "", + "details": { + "name": "Seconds Per Frame", + "category": "Constants/UI/Flipbook Animation" + }, + "methods": [ + { + "base": "GeteUiFlipbookAnimationFramerateUnits_SecondsPerFrame", + "details": { + "name": "Seconds Per Frame" + }, + "results": [ + { + "typeid": "{72039442-EB38-4D42-A1AD-CB68F7E0EEF6}", + "details": { + "name": "int" + } + } + ] + } + ] + } + ] +} \ No newline at end of file diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/eUiFlipbookAnimationLoopType_Linear.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/eUiFlipbookAnimationLoopType_Linear.names new file mode 100644 index 0000000000..72dc9a0a98 --- /dev/null +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/eUiFlipbookAnimationLoopType_Linear.names @@ -0,0 +1,29 @@ +{ + "entries": [ + { + "base": "eUiFlipbookAnimationLoopType_Linear", + "context": "Constant", + "variant": "", + "details": { + "name": "Linear", + "category": "Constants/UI/Flipbook Animation/Loop Type" + }, + "methods": [ + { + "base": "GeteUiFlipbookAnimationLoopType_Linear", + "details": { + "name": "Linear" + }, + "results": [ + { + "typeid": "{72039442-EB38-4D42-A1AD-CB68F7E0EEF6}", + "details": { + "name": "int" + } + } + ] + } + ] + } + ] +} \ No newline at end of file diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/eUiFlipbookAnimationLoopType_None.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/eUiFlipbookAnimationLoopType_None.names new file mode 100644 index 0000000000..c59df78329 --- /dev/null +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/eUiFlipbookAnimationLoopType_None.names @@ -0,0 +1,29 @@ +{ + "entries": [ + { + "base": "eUiFlipbookAnimationLoopType_None", + "context": "Constant", + "variant": "", + "details": { + "name": "None", + "category": "Constants/UI/Flipbook Animation/Loop Type" + }, + "methods": [ + { + "base": "GeteUiFlipbookAnimationLoopType_None", + "details": { + "name": "None" + }, + "results": [ + { + "typeid": "{72039442-EB38-4D42-A1AD-CB68F7E0EEF6}", + "details": { + "name": "int" + } + } + ] + } + ] + } + ] +} \ No newline at end of file diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/eUiFlipbookAnimationLoopType_PingPong.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/eUiFlipbookAnimationLoopType_PingPong.names new file mode 100644 index 0000000000..39d2672941 --- /dev/null +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/eUiFlipbookAnimationLoopType_PingPong.names @@ -0,0 +1,29 @@ +{ + "entries": [ + { + "base": "eUiFlipbookAnimationLoopType_PingPong", + "context": "Constant", + "variant": "", + "details": { + "name": "Ping Pong", + "category": "Constants/UI/Flipbook Animation/Loop Type" + }, + "methods": [ + { + "base": "GeteUiFlipbookAnimationLoopType_PingPong", + "details": { + "name": "Ping Pong" + }, + "results": [ + { + "typeid": "{72039442-EB38-4D42-A1AD-CB68F7E0EEF6}", + "details": { + "name": "int" + } + } + ] + } + ] + } + ] +} \ No newline at end of file diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/eUiHAlign_Center.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/eUiHAlign_Center.names new file mode 100644 index 0000000000..0e724f97a5 --- /dev/null +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/eUiHAlign_Center.names @@ -0,0 +1,29 @@ +{ + "entries": [ + { + "base": "eUiHAlign_Center", + "context": "Constant", + "variant": "", + "details": { + "name": "Horizontal Align Center", + "category": "Constants/UI/Align" + }, + "methods": [ + { + "base": "GeteUiHAlign_Center", + "details": { + "name": "Horizontal Align: Center" + }, + "results": [ + { + "typeid": "{72039442-EB38-4D42-A1AD-CB68F7E0EEF6}", + "details": { + "name": "int" + } + } + ] + } + ] + } + ] +} \ No newline at end of file diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/eUiHAlign_Left.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/eUiHAlign_Left.names new file mode 100644 index 0000000000..f5291df8a4 --- /dev/null +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/eUiHAlign_Left.names @@ -0,0 +1,29 @@ +{ + "entries": [ + { + "base": "eUiHAlign_Left", + "context": "Constant", + "variant": "", + "details": { + "name": "Horizontal Align Left", + "category": "Constants/UI/Align" + }, + "methods": [ + { + "base": "GeteUiHAlign_Left", + "details": { + "name": "Horizontal Align: Left" + }, + "results": [ + { + "typeid": "{72039442-EB38-4D42-A1AD-CB68F7E0EEF6}", + "details": { + "name": "int" + } + } + ] + } + ] + } + ] +} \ No newline at end of file diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/eUiHAlign_Right.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/eUiHAlign_Right.names new file mode 100644 index 0000000000..f198f249f6 --- /dev/null +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/eUiHAlign_Right.names @@ -0,0 +1,29 @@ +{ + "entries": [ + { + "base": "eUiHAlign_Right", + "context": "Constant", + "variant": "", + "details": { + "name": "Horizontal Align Right", + "category": "Constants/UI/Align" + }, + "methods": [ + { + "base": "GeteUiHAlign_Right", + "details": { + "name": "Horizontal Align: Right" + }, + "results": [ + { + "typeid": "{72039442-EB38-4D42-A1AD-CB68F7E0EEF6}", + "details": { + "name": "int" + } + } + ] + } + ] + } + ] +} \ No newline at end of file diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/eUiHorizontalOrder_LeftToRight.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/eUiHorizontalOrder_LeftToRight.names new file mode 100644 index 0000000000..ffd3607db8 --- /dev/null +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/eUiHorizontalOrder_LeftToRight.names @@ -0,0 +1,29 @@ +{ + "entries": [ + { + "base": "eUiHorizontalOrder_LeftToRight", + "context": "Constant", + "variant": "", + "details": { + "name": "Left To Right", + "category": "Constants/UI/Order/Horizontal" + }, + "methods": [ + { + "base": "GeteUiHorizontalOrder_LeftToRight", + "details": { + "name": "Left To Right" + }, + "results": [ + { + "typeid": "{72039442-EB38-4D42-A1AD-CB68F7E0EEF6}", + "details": { + "name": "int" + } + } + ] + } + ] + } + ] +} \ No newline at end of file diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/eUiHorizontalOrder_RightToLeft.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/eUiHorizontalOrder_RightToLeft.names new file mode 100644 index 0000000000..816220904a --- /dev/null +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/eUiHorizontalOrder_RightToLeft.names @@ -0,0 +1,29 @@ +{ + "entries": [ + { + "base": "eUiHorizontalOrder_RightToLeft", + "context": "Constant", + "variant": "", + "details": { + "name": "Right To Left", + "category": "Constants/UI/Order/Horizontal" + }, + "methods": [ + { + "base": "GeteUiHorizontalOrder_RightToLeft", + "details": { + "name": "Right To Left" + }, + "results": [ + { + "typeid": "{72039442-EB38-4D42-A1AD-CB68F7E0EEF6}", + "details": { + "name": "int" + } + } + ] + } + ] + } + ] +} \ No newline at end of file diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/eUiImageSequenceImageType_Fixed.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/eUiImageSequenceImageType_Fixed.names new file mode 100644 index 0000000000..303fb21025 --- /dev/null +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/eUiImageSequenceImageType_Fixed.names @@ -0,0 +1,29 @@ +{ + "entries": [ + { + "base": "eUiImageSequenceImageType_Fixed", + "context": "Constant", + "variant": "", + "details": { + "name": "Image Type: Fixed", + "category": "Constants/UI/Image Sequence" + }, + "methods": [ + { + "base": "GeteUiImageSequenceImageType_Fixed", + "details": { + "name": "Image Type: Fixed" + }, + "results": [ + { + "typeid": "{72039442-EB38-4D42-A1AD-CB68F7E0EEF6}", + "details": { + "name": "int" + } + } + ] + } + ] + } + ] +} \ No newline at end of file diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/eUiImageSequenceImageType_Stretched.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/eUiImageSequenceImageType_Stretched.names new file mode 100644 index 0000000000..2aaca0318f --- /dev/null +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/eUiImageSequenceImageType_Stretched.names @@ -0,0 +1,29 @@ +{ + "entries": [ + { + "base": "eUiImageSequenceImageType_Stretched", + "context": "Constant", + "variant": "", + "details": { + "name": "Image Type: Stretched", + "category": "Constants/UI/Image Sequence" + }, + "methods": [ + { + "base": "GeteUiImageSequenceImageType_Stretched", + "details": { + "name": "Image Type: Stretched" + }, + "results": [ + { + "typeid": "{72039442-EB38-4D42-A1AD-CB68F7E0EEF6}", + "details": { + "name": "int" + } + } + ] + } + ] + } + ] +} \ No newline at end of file diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/eUiImageSequenceImageType_StretchedToFill.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/eUiImageSequenceImageType_StretchedToFill.names new file mode 100644 index 0000000000..4213ec205a --- /dev/null +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/eUiImageSequenceImageType_StretchedToFill.names @@ -0,0 +1,29 @@ +{ + "entries": [ + { + "base": "eUiImageSequenceImageType_StretchedToFill", + "context": "Constant", + "variant": "", + "details": { + "name": "Image Type: Stretched To Fill", + "category": "Constants/UI/Image Sequence" + }, + "methods": [ + { + "base": "GeteUiImageSequenceImageType_StretchedToFill", + "details": { + "name": "Image Type: Stretched To Fill" + }, + "results": [ + { + "typeid": "{72039442-EB38-4D42-A1AD-CB68F7E0EEF6}", + "details": { + "name": "int" + } + } + ] + } + ] + } + ] +} \ No newline at end of file diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/eUiImageSequenceImageType_StretchedToFit.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/eUiImageSequenceImageType_StretchedToFit.names new file mode 100644 index 0000000000..acc64fa708 --- /dev/null +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/eUiImageSequenceImageType_StretchedToFit.names @@ -0,0 +1,29 @@ +{ + "entries": [ + { + "base": "eUiImageSequenceImageType_StretchedToFit", + "context": "Constant", + "variant": "", + "details": { + "name": "Image Type: Stretched To Fit", + "category": "Constants/UI/Image Sequence" + }, + "methods": [ + { + "base": "GeteUiImageSequenceImageType_StretchedToFit", + "details": { + "name": "Image Type: Stretched To Fit" + }, + "results": [ + { + "typeid": "{72039442-EB38-4D42-A1AD-CB68F7E0EEF6}", + "details": { + "name": "int" + } + } + ] + } + ] + } + ] +} \ No newline at end of file diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/eUiImageType_Fixed.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/eUiImageType_Fixed.names new file mode 100644 index 0000000000..73d2ff7381 --- /dev/null +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/eUiImageType_Fixed.names @@ -0,0 +1,29 @@ +{ + "entries": [ + { + "base": "eUiImageType_Fixed", + "context": "Constant", + "variant": "", + "details": { + "name": "Fixed", + "category": "Constants/UI/Image Type" + }, + "methods": [ + { + "base": "GeteUiImageType_Fixed", + "details": { + "name": "Fixed" + }, + "results": [ + { + "typeid": "{72039442-EB38-4D42-A1AD-CB68F7E0EEF6}", + "details": { + "name": "int" + } + } + ] + } + ] + } + ] +} \ No newline at end of file diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/eUiImageType_Sliced.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/eUiImageType_Sliced.names new file mode 100644 index 0000000000..6f3158e08e --- /dev/null +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/eUiImageType_Sliced.names @@ -0,0 +1,29 @@ +{ + "entries": [ + { + "base": "eUiImageType_Sliced", + "context": "Constant", + "variant": "", + "details": { + "name": "Sliced", + "category": "Constants/UI/Image Type" + }, + "methods": [ + { + "base": "GeteUiImageType_Sliced", + "details": { + "name": "Sliced" + }, + "results": [ + { + "typeid": "{72039442-EB38-4D42-A1AD-CB68F7E0EEF6}", + "details": { + "name": "int" + } + } + ] + } + ] + } + ] +} \ No newline at end of file diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/eUiImageType_Stretched.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/eUiImageType_Stretched.names new file mode 100644 index 0000000000..65a02f354d --- /dev/null +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/eUiImageType_Stretched.names @@ -0,0 +1,29 @@ +{ + "entries": [ + { + "base": "eUiImageType_Stretched", + "context": "Constant", + "variant": "", + "details": { + "name": "Stretched", + "category": "Constants/UI/Image Type" + }, + "methods": [ + { + "base": "GeteUiImageType_Stretched", + "details": { + "name": "Stretched" + }, + "results": [ + { + "typeid": "{72039442-EB38-4D42-A1AD-CB68F7E0EEF6}", + "details": { + "name": "int" + } + } + ] + } + ] + } + ] +} \ No newline at end of file diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/eUiImageType_StretchedToFill.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/eUiImageType_StretchedToFill.names new file mode 100644 index 0000000000..b61130487a --- /dev/null +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/eUiImageType_StretchedToFill.names @@ -0,0 +1,29 @@ +{ + "entries": [ + { + "base": "eUiImageType_StretchedToFill", + "context": "Constant", + "variant": "", + "details": { + "name": "Stretched To Fill", + "category": "Constants/UI/Image Type" + }, + "methods": [ + { + "base": "GeteUiImageType_StretchedToFill", + "details": { + "name": "Stretched To Fill" + }, + "results": [ + { + "typeid": "{72039442-EB38-4D42-A1AD-CB68F7E0EEF6}", + "details": { + "name": "int" + } + } + ] + } + ] + } + ] +} \ No newline at end of file diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/eUiImageType_StretchedToFit.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/eUiImageType_StretchedToFit.names new file mode 100644 index 0000000000..1223714053 --- /dev/null +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/eUiImageType_StretchedToFit.names @@ -0,0 +1,29 @@ +{ + "entries": [ + { + "base": "eUiImageType_StretchedToFit", + "context": "Constant", + "variant": "", + "details": { + "name": "Stretched To Fit", + "category": "Constants/UI/Image Type" + }, + "methods": [ + { + "base": "GeteUiImageType_StretchedToFit", + "details": { + "name": "Stretched To Fit" + }, + "results": [ + { + "typeid": "{72039442-EB38-4D42-A1AD-CB68F7E0EEF6}", + "details": { + "name": "int" + } + } + ] + } + ] + } + ] +} \ No newline at end of file diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/eUiImageType_Tiled.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/eUiImageType_Tiled.names new file mode 100644 index 0000000000..ea65a0911e --- /dev/null +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/eUiImageType_Tiled.names @@ -0,0 +1,29 @@ +{ + "entries": [ + { + "base": "eUiImageType_Tiled", + "context": "Constant", + "variant": "", + "details": { + "name": "Tiled", + "category": "Constants/UI/Image Type" + }, + "methods": [ + { + "base": "GeteUiImageType_Tiled", + "details": { + "name": "Tiled" + }, + "results": [ + { + "typeid": "{72039442-EB38-4D42-A1AD-CB68F7E0EEF6}", + "details": { + "name": "int" + } + } + ] + } + ] + } + ] +} \ No newline at end of file diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/eUiInteractableState_Disabled.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/eUiInteractableState_Disabled.names new file mode 100644 index 0000000000..014fa172d7 --- /dev/null +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/eUiInteractableState_Disabled.names @@ -0,0 +1,29 @@ +{ + "entries": [ + { + "base": "eUiInteractableState_Disabled", + "context": "Constant", + "variant": "", + "details": { + "name": "Disabled", + "category": "Constants/UI/Interactable State" + }, + "methods": [ + { + "base": "GeteUiInteractableState_Disabled", + "details": { + "name": "Disabled" + }, + "results": [ + { + "typeid": "{72039442-EB38-4D42-A1AD-CB68F7E0EEF6}", + "details": { + "name": "int" + } + } + ] + } + ] + } + ] +} \ No newline at end of file diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/eUiInteractableState_Hover.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/eUiInteractableState_Hover.names new file mode 100644 index 0000000000..978dd826d6 --- /dev/null +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/eUiInteractableState_Hover.names @@ -0,0 +1,29 @@ +{ + "entries": [ + { + "base": "eUiInteractableState_Hover", + "context": "Constant", + "variant": "", + "details": { + "name": "Hover", + "category": "Constants/UI/Interactable State" + }, + "methods": [ + { + "base": "GeteUiInteractableState_Hover", + "details": { + "name": "Hover" + }, + "results": [ + { + "typeid": "{72039442-EB38-4D42-A1AD-CB68F7E0EEF6}", + "details": { + "name": "int" + } + } + ] + } + ] + } + ] +} \ No newline at end of file diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/eUiInteractableState_Normal.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/eUiInteractableState_Normal.names new file mode 100644 index 0000000000..9ab36fba53 --- /dev/null +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/eUiInteractableState_Normal.names @@ -0,0 +1,29 @@ +{ + "entries": [ + { + "base": "eUiInteractableState_Normal", + "context": "Constant", + "variant": "", + "details": { + "name": "Normal", + "category": "Constants/UI/Interactable State" + }, + "methods": [ + { + "base": "GeteUiInteractableState_Normal", + "details": { + "name": "Normal" + }, + "results": [ + { + "typeid": "{72039442-EB38-4D42-A1AD-CB68F7E0EEF6}", + "details": { + "name": "int" + } + } + ] + } + ] + } + ] +} \ No newline at end of file diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/eUiInteractableState_Pressed.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/eUiInteractableState_Pressed.names new file mode 100644 index 0000000000..295c75a89b --- /dev/null +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/eUiInteractableState_Pressed.names @@ -0,0 +1,29 @@ +{ + "entries": [ + { + "base": "eUiInteractableState_Pressed", + "context": "Constant", + "variant": "", + "details": { + "name": "Pressed", + "category": "Constants/UI/Interactable State" + }, + "methods": [ + { + "base": "GeteUiInteractableState_Pressed", + "details": { + "name": "Pressed" + }, + "results": [ + { + "typeid": "{72039442-EB38-4D42-A1AD-CB68F7E0EEF6}", + "details": { + "name": "int" + } + } + ] + } + ] + } + ] +} \ No newline at end of file diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/eUiLayoutGridStartingDirection_HorizontalOrder.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/eUiLayoutGridStartingDirection_HorizontalOrder.names new file mode 100644 index 0000000000..c4a6d39865 --- /dev/null +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/eUiLayoutGridStartingDirection_HorizontalOrder.names @@ -0,0 +1,29 @@ +{ + "entries": [ + { + "base": "eUiLayoutGridStartingDirection_HorizontalOrder", + "context": "Constant", + "variant": "", + "details": { + "name": "Horizontal Order", + "category": "Constants/UI/Layout Grid Starting Direction" + }, + "methods": [ + { + "base": "GeteUiLayoutGridStartingDirection_HorizontalOrder", + "details": { + "name": "Horizontal Order" + }, + "results": [ + { + "typeid": "{72039442-EB38-4D42-A1AD-CB68F7E0EEF6}", + "details": { + "name": "int" + } + } + ] + } + ] + } + ] +} \ No newline at end of file diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/eUiLayoutGridStartingDirection_VerticalOrder.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/eUiLayoutGridStartingDirection_VerticalOrder.names new file mode 100644 index 0000000000..33d50cf441 --- /dev/null +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/eUiLayoutGridStartingDirection_VerticalOrder.names @@ -0,0 +1,29 @@ +{ + "entries": [ + { + "base": "eUiLayoutGridStartingDirection_VerticalOrder", + "context": "Constant", + "variant": "", + "details": { + "name": "Vertical Order", + "category": "Constants/UI/Layout Grid Starting Direction" + }, + "methods": [ + { + "base": "GeteUiLayoutGridStartingDirection_VerticalOrder", + "details": { + "name": "Vertical Order" + }, + "results": [ + { + "typeid": "{72039442-EB38-4D42-A1AD-CB68F7E0EEF6}", + "details": { + "name": "int" + } + } + ] + } + ] + } + ] +} \ No newline at end of file diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/eUiNavigationMode_Automatic.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/eUiNavigationMode_Automatic.names new file mode 100644 index 0000000000..e3c9a9ecd7 --- /dev/null +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/eUiNavigationMode_Automatic.names @@ -0,0 +1,29 @@ +{ + "entries": [ + { + "base": "eUiNavigationMode_Automatic", + "context": "Constant", + "variant": "", + "details": { + "name": "Automatic", + "category": "Constants/UI/Navigation Mode" + }, + "methods": [ + { + "base": "GeteUiNavigationMode_Automatic", + "details": { + "name": "Automatic" + }, + "results": [ + { + "typeid": "{72039442-EB38-4D42-A1AD-CB68F7E0EEF6}", + "details": { + "name": "int" + } + } + ] + } + ] + } + ] +} \ No newline at end of file diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/eUiNavigationMode_Custom.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/eUiNavigationMode_Custom.names new file mode 100644 index 0000000000..6a1beeb293 --- /dev/null +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/eUiNavigationMode_Custom.names @@ -0,0 +1,29 @@ +{ + "entries": [ + { + "base": "eUiNavigationMode_Custom", + "context": "Constant", + "variant": "", + "details": { + "name": "Custom", + "category": "Constants/UI/Navigation Mode" + }, + "methods": [ + { + "base": "GeteUiNavigationMode_Custom", + "details": { + "name": "Custom" + }, + "results": [ + { + "typeid": "{72039442-EB38-4D42-A1AD-CB68F7E0EEF6}", + "details": { + "name": "int" + } + } + ] + } + ] + } + ] +} \ No newline at end of file diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/eUiNavigationMode_None.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/eUiNavigationMode_None.names new file mode 100644 index 0000000000..19e02a0412 --- /dev/null +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/eUiNavigationMode_None.names @@ -0,0 +1,29 @@ +{ + "entries": [ + { + "base": "eUiNavigationMode_None", + "context": "Constant", + "variant": "", + "details": { + "name": "None", + "category": "Constants/UI/Navigation Mode" + }, + "methods": [ + { + "base": "GeteUiNavigationMode_None", + "details": { + "name": "None" + }, + "results": [ + { + "typeid": "{72039442-EB38-4D42-A1AD-CB68F7E0EEF6}", + "details": { + "name": "int" + } + } + ] + } + ] + } + ] +} \ No newline at end of file diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/eUiParticleCoordinateType_Cartesian.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/eUiParticleCoordinateType_Cartesian.names new file mode 100644 index 0000000000..00e0aaece8 --- /dev/null +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/eUiParticleCoordinateType_Cartesian.names @@ -0,0 +1,29 @@ +{ + "entries": [ + { + "base": "eUiParticleCoordinateType_Cartesian", + "context": "Constant", + "variant": "", + "details": { + "name": "Cartesian", + "category": "Constants/UI/Particle Coordinate Type" + }, + "methods": [ + { + "base": "GeteUiParticleCoordinateType_Cartesian", + "details": { + "name": "Cartesian" + }, + "results": [ + { + "typeid": "{72039442-EB38-4D42-A1AD-CB68F7E0EEF6}", + "details": { + "name": "int" + } + } + ] + } + ] + } + ] +} \ No newline at end of file diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/eUiParticleCoordinateType_Polar.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/eUiParticleCoordinateType_Polar.names new file mode 100644 index 0000000000..c0014a0a48 --- /dev/null +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/eUiParticleCoordinateType_Polar.names @@ -0,0 +1,29 @@ +{ + "entries": [ + { + "base": "eUiParticleCoordinateType_Polar", + "context": "Constant", + "variant": "", + "details": { + "name": "Polar", + "category": "Constants/UI/Particle Coordinate Type" + }, + "methods": [ + { + "base": "GeteUiParticleCoordinateType_Polar", + "details": { + "name": "Polar" + }, + "results": [ + { + "typeid": "{72039442-EB38-4D42-A1AD-CB68F7E0EEF6}", + "details": { + "name": "int" + } + } + ] + } + ] + } + ] +} \ No newline at end of file diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/eUiParticleInitialDirectionType_RelativeToEmitAngle.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/eUiParticleInitialDirectionType_RelativeToEmitAngle.names new file mode 100644 index 0000000000..000c00bcb2 --- /dev/null +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/eUiParticleInitialDirectionType_RelativeToEmitAngle.names @@ -0,0 +1,29 @@ +{ + "entries": [ + { + "base": "eUiParticleInitialDirectionType_RelativeToEmitAngle", + "context": "Constant", + "variant": "", + "details": { + "name": "Relative To Emit Angle", + "category": "Constants/UI/Particle Initial Direction Type" + }, + "methods": [ + { + "base": "GeteUiParticleInitialDirectionType_RelativeToEmitAngle", + "details": { + "name": "Relative To Emit Angle" + }, + "results": [ + { + "typeid": "{72039442-EB38-4D42-A1AD-CB68F7E0EEF6}", + "details": { + "name": "int" + } + } + ] + } + ] + } + ] +} \ No newline at end of file diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/eUiParticleInitialDirectionType_RelativeToEmitterCenter.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/eUiParticleInitialDirectionType_RelativeToEmitterCenter.names new file mode 100644 index 0000000000..2a3d5ce1a2 --- /dev/null +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/eUiParticleInitialDirectionType_RelativeToEmitterCenter.names @@ -0,0 +1,29 @@ +{ + "entries": [ + { + "base": "eUiParticleInitialDirectionType_RelativeToEmitterCenter", + "context": "Constant", + "variant": "", + "details": { + "name": "Relative To Emitter Center", + "category": "Constants/UI/Particle Initial Direction Type" + }, + "methods": [ + { + "base": "GeteUiParticleInitialDirectionType_RelativeToEmitterCenter", + "details": { + "name": "Relative To Emitter Center" + }, + "results": [ + { + "typeid": "{72039442-EB38-4D42-A1AD-CB68F7E0EEF6}", + "details": { + "name": "int" + } + } + ] + } + ] + } + ] +} \ No newline at end of file diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/eUiScaleToDeviceMode_NonUniformScale.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/eUiScaleToDeviceMode_NonUniformScale.names new file mode 100644 index 0000000000..839a22e304 --- /dev/null +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/eUiScaleToDeviceMode_NonUniformScale.names @@ -0,0 +1,29 @@ +{ + "entries": [ + { + "base": "eUiScaleToDeviceMode_NonUniformScale", + "context": "Constant", + "variant": "", + "details": { + "name": "Non Uniform Scale", + "category": "Constants/UI/Scale To Device Mode" + }, + "methods": [ + { + "base": "GeteUiScaleToDeviceMode_NonUniformScale", + "details": { + "name": "Non Uniform Scale" + }, + "results": [ + { + "typeid": "{72039442-EB38-4D42-A1AD-CB68F7E0EEF6}", + "details": { + "name": "int" + } + } + ] + } + ] + } + ] +} \ No newline at end of file diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/eUiScaleToDeviceMode_None.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/eUiScaleToDeviceMode_None.names new file mode 100644 index 0000000000..1739b984d2 --- /dev/null +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/eUiScaleToDeviceMode_None.names @@ -0,0 +1,29 @@ +{ + "entries": [ + { + "base": "eUiScaleToDeviceMode_None", + "context": "Constant", + "variant": "", + "details": { + "name": "None", + "category": "Constants/UI/Scale To Device Mode" + }, + "methods": [ + { + "base": "GeteUiScaleToDeviceMode_None", + "details": { + "name": "None" + }, + "results": [ + { + "typeid": "{72039442-EB38-4D42-A1AD-CB68F7E0EEF6}", + "details": { + "name": "int" + } + } + ] + } + ] + } + ] +} \ No newline at end of file diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/eUiScaleToDeviceMode_ScaleXOnly.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/eUiScaleToDeviceMode_ScaleXOnly.names new file mode 100644 index 0000000000..883068240f --- /dev/null +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/eUiScaleToDeviceMode_ScaleXOnly.names @@ -0,0 +1,29 @@ +{ + "entries": [ + { + "base": "eUiScaleToDeviceMode_ScaleXOnly", + "context": "Constant", + "variant": "", + "details": { + "name": "Scale X Only", + "category": "Constants/UI/Scale To Device Mode" + }, + "methods": [ + { + "base": "GeteUiScaleToDeviceMode_ScaleXOnly", + "details": { + "name": "Scale X Only" + }, + "results": [ + { + "typeid": "{72039442-EB38-4D42-A1AD-CB68F7E0EEF6}", + "details": { + "name": "int" + } + } + ] + } + ] + } + ] +} \ No newline at end of file diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/eUiScaleToDeviceMode_ScaleYOnly.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/eUiScaleToDeviceMode_ScaleYOnly.names new file mode 100644 index 0000000000..3589e6b7cf --- /dev/null +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/eUiScaleToDeviceMode_ScaleYOnly.names @@ -0,0 +1,29 @@ +{ + "entries": [ + { + "base": "eUiScaleToDeviceMode_ScaleYOnly", + "context": "Constant", + "variant": "", + "details": { + "name": "Scale Y Only", + "category": "Constants/UI/Scale To Device Mode" + }, + "methods": [ + { + "base": "GeteUiScaleToDeviceMode_ScaleYOnly", + "details": { + "name": "Scale Y Only" + }, + "results": [ + { + "typeid": "{72039442-EB38-4D42-A1AD-CB68F7E0EEF6}", + "details": { + "name": "int" + } + } + ] + } + ] + } + ] +} \ No newline at end of file diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/eUiScaleToDeviceMode_UniformScaleToFill.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/eUiScaleToDeviceMode_UniformScaleToFill.names new file mode 100644 index 0000000000..e6e0a8c72d --- /dev/null +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/eUiScaleToDeviceMode_UniformScaleToFill.names @@ -0,0 +1,29 @@ +{ + "entries": [ + { + "base": "eUiScaleToDeviceMode_UniformScaleToFill", + "context": "Constant", + "variant": "", + "details": { + "name": "Uniform Scale To Fill", + "category": "Constants/UI/Scale To Device Mode" + }, + "methods": [ + { + "base": "GeteUiScaleToDeviceMode_UniformScaleToFill", + "details": { + "name": "Uniform Scale To Fill" + }, + "results": [ + { + "typeid": "{72039442-EB38-4D42-A1AD-CB68F7E0EEF6}", + "details": { + "name": "int" + } + } + ] + } + ] + } + ] +} \ No newline at end of file diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/eUiScaleToDeviceMode_UniformScaleToFit.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/eUiScaleToDeviceMode_UniformScaleToFit.names new file mode 100644 index 0000000000..8f2e3c80ee --- /dev/null +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/eUiScaleToDeviceMode_UniformScaleToFit.names @@ -0,0 +1,29 @@ +{ + "entries": [ + { + "base": "eUiScaleToDeviceMode_UniformScaleToFit", + "context": "Constant", + "variant": "", + "details": { + "name": "Uniform Scale To Fit", + "category": "Constants/UI/Scale To Device Mode" + }, + "methods": [ + { + "base": "GeteUiScaleToDeviceMode_UniformScaleToFit", + "details": { + "name": "Uniform Scale To Fit" + }, + "results": [ + { + "typeid": "{72039442-EB38-4D42-A1AD-CB68F7E0EEF6}", + "details": { + "name": "int" + } + } + ] + } + ] + } + ] +} \ No newline at end of file diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/eUiScaleToDeviceMode_UniformScaleToFitX.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/eUiScaleToDeviceMode_UniformScaleToFitX.names new file mode 100644 index 0000000000..dd07d3e4c3 --- /dev/null +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/eUiScaleToDeviceMode_UniformScaleToFitX.names @@ -0,0 +1,29 @@ +{ + "entries": [ + { + "base": "eUiScaleToDeviceMode_UniformScaleToFitX", + "context": "Constant", + "variant": "", + "details": { + "name": "Uniform Scale To Fit X", + "category": "Constants/UI/Scale To Device Mode" + }, + "methods": [ + { + "base": "GeteUiScaleToDeviceMode_UniformScaleToFitX", + "details": { + "name": "Uniform Scale To Fit X" + }, + "results": [ + { + "typeid": "{72039442-EB38-4D42-A1AD-CB68F7E0EEF6}", + "details": { + "name": "int" + } + } + ] + } + ] + } + ] +} \ No newline at end of file diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/eUiScaleToDeviceMode_UniformScaleToFitY.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/eUiScaleToDeviceMode_UniformScaleToFitY.names new file mode 100644 index 0000000000..5519e48332 --- /dev/null +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/eUiScaleToDeviceMode_UniformScaleToFitY.names @@ -0,0 +1,29 @@ +{ + "entries": [ + { + "base": "eUiScaleToDeviceMode_UniformScaleToFitY", + "context": "Constant", + "variant": "", + "details": { + "name": "Uniform Scale To Fit Y", + "category": "Constants/UI/Scale To Device Mode" + }, + "methods": [ + { + "base": "GeteUiScaleToDeviceMode_UniformScaleToFitY", + "details": { + "name": "Uniform Scale To Fit Y" + }, + "results": [ + { + "typeid": "{72039442-EB38-4D42-A1AD-CB68F7E0EEF6}", + "details": { + "name": "int" + } + } + ] + } + ] + } + ] +} \ No newline at end of file diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/eUiScrollBoxScrollBarVisibility_AlwaysShow.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/eUiScrollBoxScrollBarVisibility_AlwaysShow.names new file mode 100644 index 0000000000..8db8786d20 --- /dev/null +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/eUiScrollBoxScrollBarVisibility_AlwaysShow.names @@ -0,0 +1,29 @@ +{ + "entries": [ + { + "base": "eUiScrollBoxScrollBarVisibility_AlwaysShow", + "context": "Constant", + "variant": "", + "details": { + "name": "Always Show", + "category": "Constants/UI/Scroll Box Scroll Bar Visibility" + }, + "methods": [ + { + "base": "GeteUiScrollBoxScrollBarVisibility_AlwaysShow", + "details": { + "name": "Always Show" + }, + "results": [ + { + "typeid": "{72039442-EB38-4D42-A1AD-CB68F7E0EEF6}", + "details": { + "name": "int" + } + } + ] + } + ] + } + ] +} \ No newline at end of file diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/eUiScrollBoxScrollBarVisibility_AutoHide.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/eUiScrollBoxScrollBarVisibility_AutoHide.names new file mode 100644 index 0000000000..df81d761aa --- /dev/null +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/eUiScrollBoxScrollBarVisibility_AutoHide.names @@ -0,0 +1,29 @@ +{ + "entries": [ + { + "base": "eUiScrollBoxScrollBarVisibility_AutoHide", + "context": "Constant", + "variant": "", + "details": { + "name": "Auto Hide", + "category": "Constants/UI/Scroll Box Scroll Bar Visibility" + }, + "methods": [ + { + "base": "GeteUiScrollBoxScrollBarVisibility_AutoHide", + "details": { + "name": "Auto Hide" + }, + "results": [ + { + "typeid": "{72039442-EB38-4D42-A1AD-CB68F7E0EEF6}", + "details": { + "name": "int" + } + } + ] + } + ] + } + ] +} \ No newline at end of file diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/eUiScrollBoxScrollBarVisibility_AutoHideAndResizeViewport.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/eUiScrollBoxScrollBarVisibility_AutoHideAndResizeViewport.names new file mode 100644 index 0000000000..c65f31e223 --- /dev/null +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/eUiScrollBoxScrollBarVisibility_AutoHideAndResizeViewport.names @@ -0,0 +1,29 @@ +{ + "entries": [ + { + "base": "eUiScrollBoxScrollBarVisibility_AutoHideAndResizeViewport", + "context": "Constant", + "variant": "", + "details": { + "name": "Auto Hide And Resize Viewport", + "category": "Constants/UI/Scroll Box Scroll Bar Visibility" + }, + "methods": [ + { + "base": "GeteUiScrollBoxScrollBarVisibility_AutoHideAndResizeViewport", + "details": { + "name": "Auto Hide And Resize Viewport" + }, + "results": [ + { + "typeid": "{72039442-EB38-4D42-A1AD-CB68F7E0EEF6}", + "details": { + "name": "int" + } + } + ] + } + ] + } + ] +} \ No newline at end of file diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/eUiScrollBoxSnapMode_Children.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/eUiScrollBoxSnapMode_Children.names new file mode 100644 index 0000000000..2552d2d348 --- /dev/null +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/eUiScrollBoxSnapMode_Children.names @@ -0,0 +1,29 @@ +{ + "entries": [ + { + "base": "eUiScrollBoxSnapMode_Children", + "context": "Constant", + "variant": "", + "details": { + "name": "Children", + "category": "Constants/UI/Scroll Box Snap Mode" + }, + "methods": [ + { + "base": "GeteUiScrollBoxSnapMode_Children", + "details": { + "name": "Children" + }, + "results": [ + { + "typeid": "{72039442-EB38-4D42-A1AD-CB68F7E0EEF6}", + "details": { + "name": "int" + } + } + ] + } + ] + } + ] +} \ No newline at end of file diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/eUiScrollBoxSnapMode_Grid.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/eUiScrollBoxSnapMode_Grid.names new file mode 100644 index 0000000000..3369cb4df1 --- /dev/null +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/eUiScrollBoxSnapMode_Grid.names @@ -0,0 +1,29 @@ +{ + "entries": [ + { + "base": "eUiScrollBoxSnapMode_Grid", + "context": "Constant", + "variant": "", + "details": { + "name": "Grid", + "category": "Constants/UI/Scroll Box Snap Mode" + }, + "methods": [ + { + "base": "GeteUiScrollBoxSnapMode_Grid", + "details": { + "name": "Grid" + }, + "results": [ + { + "typeid": "{72039442-EB38-4D42-A1AD-CB68F7E0EEF6}", + "details": { + "name": "int" + } + } + ] + } + ] + } + ] +} \ No newline at end of file diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/eUiScrollBoxSnapMode_None.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/eUiScrollBoxSnapMode_None.names new file mode 100644 index 0000000000..e806ef8347 --- /dev/null +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/eUiScrollBoxSnapMode_None.names @@ -0,0 +1,29 @@ +{ + "entries": [ + { + "base": "eUiScrollBoxSnapMode_None", + "context": "Constant", + "variant": "", + "details": { + "name": "None", + "category": "Constants/UI/Scroll Box Snap Mode" + }, + "methods": [ + { + "base": "GeteUiScrollBoxSnapMode_None", + "details": { + "name": "None" + }, + "results": [ + { + "typeid": "{72039442-EB38-4D42-A1AD-CB68F7E0EEF6}", + "details": { + "name": "int" + } + } + ] + } + ] + } + ] +} \ No newline at end of file diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/eUiScrollerOrientation_Horizontal.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/eUiScrollerOrientation_Horizontal.names new file mode 100644 index 0000000000..89b4e75151 --- /dev/null +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/eUiScrollerOrientation_Horizontal.names @@ -0,0 +1,29 @@ +{ + "entries": [ + { + "base": "eUiScrollerOrientation_Horizontal", + "context": "Constant", + "variant": "", + "details": { + "name": "Horizontal", + "category": "Constants/UI/Scroller Orientation" + }, + "methods": [ + { + "base": "GeteUiScrollerOrientation_Horizontal", + "details": { + "name": "Horizontal" + }, + "results": [ + { + "typeid": "{72039442-EB38-4D42-A1AD-CB68F7E0EEF6}", + "details": { + "name": "int" + } + } + ] + } + ] + } + ] +} \ No newline at end of file diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/eUiScrollerOrientation_Vertical.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/eUiScrollerOrientation_Vertical.names new file mode 100644 index 0000000000..7823992830 --- /dev/null +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/eUiScrollerOrientation_Vertical.names @@ -0,0 +1,29 @@ +{ + "entries": [ + { + "base": "eUiScrollerOrientation_Vertical", + "context": "Constant", + "variant": "", + "details": { + "name": "Vertical", + "category": "Constants/UI/Scroller Orientation" + }, + "methods": [ + { + "base": "GeteUiScrollerOrientation_Vertical", + "details": { + "name": "Vertical" + }, + "results": [ + { + "typeid": "{72039442-EB38-4D42-A1AD-CB68F7E0EEF6}", + "details": { + "name": "int" + } + } + ] + } + ] + } + ] +} \ No newline at end of file diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/eUiSpriteType_RenderTarget.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/eUiSpriteType_RenderTarget.names new file mode 100644 index 0000000000..94056daa38 --- /dev/null +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/eUiSpriteType_RenderTarget.names @@ -0,0 +1,29 @@ +{ + "entries": [ + { + "base": "eUiSpriteType_RenderTarget", + "context": "Constant", + "variant": "", + "details": { + "name": "Render Target", + "category": "Constants/UI/Sprite Type" + }, + "methods": [ + { + "base": "GeteUiSpriteType_RenderTarget", + "details": { + "name": "Render Target" + }, + "results": [ + { + "typeid": "{72039442-EB38-4D42-A1AD-CB68F7E0EEF6}", + "details": { + "name": "int" + } + } + ] + } + ] + } + ] +} \ No newline at end of file diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/eUiSpriteType_SpriteAsset.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/eUiSpriteType_SpriteAsset.names new file mode 100644 index 0000000000..c47a3c4192 --- /dev/null +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/eUiSpriteType_SpriteAsset.names @@ -0,0 +1,29 @@ +{ + "entries": [ + { + "base": "eUiSpriteType_SpriteAsset", + "context": "Constant", + "variant": "", + "details": { + "name": "Sprite Asset", + "category": "Constants/UI/Sprite Type" + }, + "methods": [ + { + "base": "GeteUiSpriteType_SpriteAsset", + "details": { + "name": "Sprite Asset" + }, + "results": [ + { + "typeid": "{72039442-EB38-4D42-A1AD-CB68F7E0EEF6}", + "details": { + "name": "int" + } + } + ] + } + ] + } + ] +} \ No newline at end of file diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/eUiTextOverflowMode_ClipText.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/eUiTextOverflowMode_ClipText.names new file mode 100644 index 0000000000..9aa0a64317 --- /dev/null +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/eUiTextOverflowMode_ClipText.names @@ -0,0 +1,29 @@ +{ + "entries": [ + { + "base": "eUiTextOverflowMode_ClipText", + "context": "Constant", + "variant": "", + "details": { + "name": "Clip Text", + "category": "Constants/UI/Text Overflow Mode" + }, + "methods": [ + { + "base": "GeteUiTextOverflowMode_ClipText", + "details": { + "name": "Clip Text" + }, + "results": [ + { + "typeid": "{72039442-EB38-4D42-A1AD-CB68F7E0EEF6}", + "details": { + "name": "int" + } + } + ] + } + ] + } + ] +} \ No newline at end of file diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/eUiTextOverflowMode_Ellipsis.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/eUiTextOverflowMode_Ellipsis.names new file mode 100644 index 0000000000..b930c80c95 --- /dev/null +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/eUiTextOverflowMode_Ellipsis.names @@ -0,0 +1,29 @@ +{ + "entries": [ + { + "base": "eUiTextOverflowMode_Ellipsis", + "context": "Constant", + "variant": "", + "details": { + "name": "Ellipsis", + "category": "Constants/UI/Text Overflow Mode" + }, + "methods": [ + { + "base": "GeteUiTextOverflowMode_Ellipsis", + "details": { + "name": "Ellipsis" + }, + "results": [ + { + "typeid": "{72039442-EB38-4D42-A1AD-CB68F7E0EEF6}", + "details": { + "name": "int" + } + } + ] + } + ] + } + ] +} \ No newline at end of file diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/eUiTextOverflowMode_OverflowText.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/eUiTextOverflowMode_OverflowText.names new file mode 100644 index 0000000000..51271d943f --- /dev/null +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/eUiTextOverflowMode_OverflowText.names @@ -0,0 +1,29 @@ +{ + "entries": [ + { + "base": "eUiTextOverflowMode_OverflowText", + "context": "Constant", + "variant": "", + "details": { + "name": "Overflow Text", + "category": "Constants/UI/Text Overflow Mode" + }, + "methods": [ + { + "base": "GeteUiTextOverflowMode_OverflowText", + "details": { + "name": "Overflow Text" + }, + "results": [ + { + "typeid": "{72039442-EB38-4D42-A1AD-CB68F7E0EEF6}", + "details": { + "name": "int" + } + } + ] + } + ] + } + ] +} \ No newline at end of file diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/eUiTextShrinkToFit_None.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/eUiTextShrinkToFit_None.names new file mode 100644 index 0000000000..614c337c6b --- /dev/null +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/eUiTextShrinkToFit_None.names @@ -0,0 +1,29 @@ +{ + "entries": [ + { + "base": "eUiTextShrinkToFit_None", + "context": "Constant", + "variant": "", + "details": { + "name": "None", + "category": "Constants/UI/Text Shrink To Fit" + }, + "methods": [ + { + "base": "GeteUiTextShrinkToFit_None", + "details": { + "name": "None" + }, + "results": [ + { + "typeid": "{72039442-EB38-4D42-A1AD-CB68F7E0EEF6}", + "details": { + "name": "int" + } + } + ] + } + ] + } + ] +} \ No newline at end of file diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/eUiTextShrinkToFit_Uniform.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/eUiTextShrinkToFit_Uniform.names new file mode 100644 index 0000000000..72c29c8b5a --- /dev/null +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/eUiTextShrinkToFit_Uniform.names @@ -0,0 +1,29 @@ +{ + "entries": [ + { + "base": "eUiTextShrinkToFit_Uniform", + "context": "Constant", + "variant": "", + "details": { + "name": "Uniform", + "category": "Constants/UI/Text Shrink To Fit" + }, + "methods": [ + { + "base": "GeteUiTextShrinkToFit_Uniform", + "details": { + "name": "Uniform" + }, + "results": [ + { + "typeid": "{72039442-EB38-4D42-A1AD-CB68F7E0EEF6}", + "details": { + "name": "int" + } + } + ] + } + ] + } + ] +} \ No newline at end of file diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/eUiTextShrinkToFit_WidthOnly.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/eUiTextShrinkToFit_WidthOnly.names new file mode 100644 index 0000000000..67524f593f --- /dev/null +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/eUiTextShrinkToFit_WidthOnly.names @@ -0,0 +1,29 @@ +{ + "entries": [ + { + "base": "eUiTextShrinkToFit_WidthOnly", + "context": "Constant", + "variant": "", + "details": { + "name": "Width Only", + "category": "Constants/UI/Text Shrink To Fit" + }, + "methods": [ + { + "base": "GeteUiTextShrinkToFit_WidthOnly", + "details": { + "name": "Width Only" + }, + "results": [ + { + "typeid": "{72039442-EB38-4D42-A1AD-CB68F7E0EEF6}", + "details": { + "name": "int" + } + } + ] + } + ] + } + ] +} \ No newline at end of file diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/eUiTextWrapTextSetting_NoWrap.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/eUiTextWrapTextSetting_NoWrap.names new file mode 100644 index 0000000000..dfb70ab7ba --- /dev/null +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/eUiTextWrapTextSetting_NoWrap.names @@ -0,0 +1,29 @@ +{ + "entries": [ + { + "base": "eUiTextWrapTextSetting_NoWrap", + "context": "Constant", + "variant": "", + "details": { + "name": "No Wrap", + "category": "Constants/UI/Text Wrap" + }, + "methods": [ + { + "base": "GeteUiTextWrapTextSetting_NoWrap", + "details": { + "name": "No Wrap" + }, + "results": [ + { + "typeid": "{72039442-EB38-4D42-A1AD-CB68F7E0EEF6}", + "details": { + "name": "int" + } + } + ] + } + ] + } + ] +} \ No newline at end of file diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/eUiTextWrapTextSetting_Wrap.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/eUiTextWrapTextSetting_Wrap.names new file mode 100644 index 0000000000..96c98744d1 --- /dev/null +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/eUiTextWrapTextSetting_Wrap.names @@ -0,0 +1,29 @@ +{ + "entries": [ + { + "base": "eUiTextWrapTextSetting_Wrap", + "context": "Constant", + "variant": "", + "details": { + "name": "Wrap", + "category": "Constants/UI/Text Wrap" + }, + "methods": [ + { + "base": "GeteUiTextWrapTextSetting_Wrap", + "details": { + "name": "Wrap" + }, + "results": [ + { + "typeid": "{72039442-EB38-4D42-A1AD-CB68F7E0EEF6}", + "details": { + "name": "int" + } + } + ] + } + ] + } + ] +} \ No newline at end of file diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/eUiTooltipDisplayAutoPositionMode_OffsetFromElement.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/eUiTooltipDisplayAutoPositionMode_OffsetFromElement.names new file mode 100644 index 0000000000..c0fb71abc1 --- /dev/null +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/eUiTooltipDisplayAutoPositionMode_OffsetFromElement.names @@ -0,0 +1,29 @@ +{ + "entries": [ + { + "base": "eUiTooltipDisplayAutoPositionMode_OffsetFromElement", + "context": "Constant", + "variant": "", + "details": { + "name": "Offset From Element", + "category": "Constants/UI/Tooltip Display Auto Position Mode" + }, + "methods": [ + { + "base": "GeteUiTooltipDisplayAutoPositionMode_OffsetFromElement", + "details": { + "name": "Offset From Element" + }, + "results": [ + { + "typeid": "{72039442-EB38-4D42-A1AD-CB68F7E0EEF6}", + "details": { + "name": "int" + } + } + ] + } + ] + } + ] +} \ No newline at end of file diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/eUiTooltipDisplayAutoPositionMode_OffsetFromMouse.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/eUiTooltipDisplayAutoPositionMode_OffsetFromMouse.names new file mode 100644 index 0000000000..5c12e0a60e --- /dev/null +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/eUiTooltipDisplayAutoPositionMode_OffsetFromMouse.names @@ -0,0 +1,29 @@ +{ + "entries": [ + { + "base": "eUiTooltipDisplayAutoPositionMode_OffsetFromMouse", + "context": "Constant", + "variant": "", + "details": { + "name": "Offset From Mouse", + "category": "Constants/UI/Tooltip Display Auto Position Mode" + }, + "methods": [ + { + "base": "GeteUiTooltipDisplayAutoPositionMode_OffsetFromMouse", + "details": { + "name": "Offset From Mouse" + }, + "results": [ + { + "typeid": "{72039442-EB38-4D42-A1AD-CB68F7E0EEF6}", + "details": { + "name": "int" + } + } + ] + } + ] + } + ] +} \ No newline at end of file diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/eUiTooltipDisplayTriggerMode_OnClick.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/eUiTooltipDisplayTriggerMode_OnClick.names new file mode 100644 index 0000000000..deb5b1696b --- /dev/null +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/eUiTooltipDisplayTriggerMode_OnClick.names @@ -0,0 +1,29 @@ +{ + "entries": [ + { + "base": "eUiTooltipDisplayTriggerMode_OnClick", + "context": "Constant", + "variant": "", + "details": { + "name": "On Click", + "category": "Constants/UI/Tooltip Display Trigger Mode" + }, + "methods": [ + { + "base": "GeteUiTooltipDisplayTriggerMode_OnClick", + "details": { + "name": "On Click" + }, + "results": [ + { + "typeid": "{72039442-EB38-4D42-A1AD-CB68F7E0EEF6}", + "details": { + "name": "int" + } + } + ] + } + ] + } + ] +} \ No newline at end of file diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/eUiTooltipDisplayTriggerMode_OnHover.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/eUiTooltipDisplayTriggerMode_OnHover.names new file mode 100644 index 0000000000..e118eeafbc --- /dev/null +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/eUiTooltipDisplayTriggerMode_OnHover.names @@ -0,0 +1,29 @@ +{ + "entries": [ + { + "base": "eUiTooltipDisplayTriggerMode_OnHover", + "context": "Constant", + "variant": "", + "details": { + "name": "On Hover", + "category": "Constants/UI/Tooltip Display Trigger Mode" + }, + "methods": [ + { + "base": "GeteUiTooltipDisplayTriggerMode_OnHover", + "details": { + "name": "On Hover" + }, + "results": [ + { + "typeid": "{72039442-EB38-4D42-A1AD-CB68F7E0EEF6}", + "details": { + "name": "int" + } + } + ] + } + ] + } + ] +} \ No newline at end of file diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/eUiTooltipDisplayTriggerMode_OnPress.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/eUiTooltipDisplayTriggerMode_OnPress.names new file mode 100644 index 0000000000..f570902180 --- /dev/null +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/eUiTooltipDisplayTriggerMode_OnPress.names @@ -0,0 +1,29 @@ +{ + "entries": [ + { + "base": "eUiTooltipDisplayTriggerMode_OnPress", + "context": "Constant", + "variant": "", + "details": { + "name": "On Press", + "category": "Constants/UI/Tooltip Display Trigger Mode" + }, + "methods": [ + { + "base": "GeteUiTooltipDisplayTriggerMode_OnPress", + "details": { + "name": "On Press" + }, + "results": [ + { + "typeid": "{72039442-EB38-4D42-A1AD-CB68F7E0EEF6}", + "details": { + "name": "int" + } + } + ] + } + ] + } + ] +} \ No newline at end of file diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/eUiVAlign_Bottom.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/eUiVAlign_Bottom.names new file mode 100644 index 0000000000..b5c89b6b6c --- /dev/null +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/eUiVAlign_Bottom.names @@ -0,0 +1,29 @@ +{ + "entries": [ + { + "base": "eUiVAlign_Bottom", + "context": "Constant", + "variant": "", + "details": { + "name": "Vertical Align Bottom", + "category": "Constants/UI/Align" + }, + "methods": [ + { + "base": "GeteUiVAlign_Bottom", + "details": { + "name": "Vertical Align: Bottom" + }, + "results": [ + { + "typeid": "{72039442-EB38-4D42-A1AD-CB68F7E0EEF6}", + "details": { + "name": "int" + } + } + ] + } + ] + } + ] +} \ No newline at end of file diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/eUiVAlign_Center.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/eUiVAlign_Center.names new file mode 100644 index 0000000000..ecdb75bda9 --- /dev/null +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/eUiVAlign_Center.names @@ -0,0 +1,29 @@ +{ + "entries": [ + { + "base": "eUiVAlign_Center", + "context": "Constant", + "variant": "", + "details": { + "name": "Vertical Align Center", + "category": "Constants/UI/Align" + }, + "methods": [ + { + "base": "GeteUiVAlign_Center", + "details": { + "name": "Vertical Align: Center" + }, + "results": [ + { + "typeid": "{72039442-EB38-4D42-A1AD-CB68F7E0EEF6}", + "details": { + "name": "int" + } + } + ] + } + ] + } + ] +} \ No newline at end of file diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/eUiVAlign_Top.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/eUiVAlign_Top.names new file mode 100644 index 0000000000..f35d9ff698 --- /dev/null +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/eUiVAlign_Top.names @@ -0,0 +1,29 @@ +{ + "entries": [ + { + "base": "eUiVAlign_Top", + "context": "Constant", + "variant": "", + "details": { + "name": "Vertical Align Top", + "category": "Constants/UI/Align" + }, + "methods": [ + { + "base": "GeteUiVAlign_Top", + "details": { + "name": "Vertical Align: Top" + }, + "results": [ + { + "typeid": "{72039442-EB38-4D42-A1AD-CB68F7E0EEF6}", + "details": { + "name": "int" + } + } + ] + } + ] + } + ] +} \ No newline at end of file diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/eUiVerticalOrder_BottomToTop.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/eUiVerticalOrder_BottomToTop.names new file mode 100644 index 0000000000..06edfefaef --- /dev/null +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/eUiVerticalOrder_BottomToTop.names @@ -0,0 +1,29 @@ +{ + "entries": [ + { + "base": "eUiVerticalOrder_BottomToTop", + "context": "Constant", + "variant": "", + "details": { + "name": "Bottom To Top", + "category": "Constants/UI/Order/Vertical" + }, + "methods": [ + { + "base": "GeteUiVerticalOrder_BottomToTop", + "details": { + "name": "Bottom To Top" + }, + "results": [ + { + "typeid": "{72039442-EB38-4D42-A1AD-CB68F7E0EEF6}", + "details": { + "name": "int" + } + } + ] + } + ] + } + ] +} \ No newline at end of file diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/eUiVerticalOrder_TopToBottom.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/eUiVerticalOrder_TopToBottom.names new file mode 100644 index 0000000000..ff4d7ec7ec --- /dev/null +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/eUiVerticalOrder_TopToBottom.names @@ -0,0 +1,29 @@ +{ + "entries": [ + { + "base": "eUiVerticalOrder_TopToBottom", + "context": "Constant", + "variant": "", + "details": { + "name": "Top To Bottom", + "category": "Constants/UI/Order/Vertical" + }, + "methods": [ + { + "base": "GeteUiVerticalOrder_TopToBottom", + "details": { + "name": "Top To Bottom" + }, + "results": [ + { + "typeid": "{72039442-EB38-4D42-A1AD-CB68F7E0EEF6}", + "details": { + "name": "int" + } + } + ] + } + ] + } + ] +} \ No newline at end of file diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/g_ProfilerSystem.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/g_ProfilerSystem.names new file mode 100644 index 0000000000..679cd307c8 --- /dev/null +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/g_ProfilerSystem.names @@ -0,0 +1,29 @@ +{ + "entries": [ + { + "base": "g_ProfilerSystem", + "context": "Constant", + "variant": "", + "details": { + "name": "Profiler System", + "category": "Constants/Profiler" + }, + "methods": [ + { + "base": "Getg_ProfilerSystem", + "details": { + "name": "Profiler System" + }, + "results": [ + { + "typeid": "{D671FB70-8B09-4C3A-96CD-06A339F3138E}", + "details": { + "name": "Profiler System Script Proxy" + } + } + ] + } + ] + } + ] +} \ No newline at end of file diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/g_SettingsRegistry.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/g_SettingsRegistry.names new file mode 100644 index 0000000000..5d7a8dfba7 --- /dev/null +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/g_SettingsRegistry.names @@ -0,0 +1,29 @@ +{ + "entries": [ + { + "base": "g_SettingsRegistry", + "context": "Constant", + "variant": "", + "details": { + "name": "Settings Registry", + "category": "Constants/Settings" + }, + "methods": [ + { + "base": "Getg_SettingsRegistry", + "details": { + "name": "Settings Registry" + }, + "results": [ + { + "typeid": "{795C80A0-D243-473B-972A-C32CA487BAA5}", + "details": { + "name": "Settings Registry Script Proxy" + } + } + ] + } + ] + } + ] +} \ No newline at end of file diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Types/BehaviorTypes.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Types/BehaviorTypes.names new file mode 100644 index 0000000000..598d058767 --- /dev/null +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Types/BehaviorTypes.names @@ -0,0 +1,1428 @@ +{ + "entries": [ + { + "base": "{E152C105-A133-4D03-BBF8-3D4B2FBA3E2A}", + "context": "BehaviorType", + "variant": "", + "details": { + "name": "Uuid" + } + }, + { + "base": "{831C1F11-5898-4FBF-B4CF-92B757A907A8}", + "context": "BehaviorType", + "variant": "", + "details": { + "name": "FastNoiseGradientConfig" + } + }, + { + "base": "{1D00F234-8134-4A42-A357-ADAC865CF63A}", + "context": "BehaviorType", + "variant": "", + "details": { + "name": "Mesh Blocker Config" + } + }, + { + "base": "{40403A44-31FE-4D1D-941C-6593759CCCBD}", + "context": "BehaviorType", + "variant": "", + "details": { + "name": "MixedGradientConfig" + } + }, + { + "base": "{0B5D866D-C7F5-5B12-81A5-74521A8230D5}", + "context": "BehaviorType", + "variant": "", + "details": { + "name": "AZ::RHI::Handle" + } + }, + { + "base": "{4AADFD75-48A7-4F31-8F30-FE4505F09E35}", + "context": "BehaviorType", + "variant": "", + "details": { + "name": "SphereShapeConfig" + } + }, + { + "base": "{01F6E6C5-707E-42EC-91BB-F674B9F51A40}", + "context": "BehaviorType", + "variant": "", + "details": { + "name": "BlockerConfig" + } + }, + { + "base": "{5574DD27-89D8-5A40-B7C4-FA04C68B8A0D}", + "context": "BehaviorType", + "variant": "", + "details": { + "name": "AZ::RHI::Handle" + } + }, + { + "base": "{FE862126-C838-4999-9B7B-4AEEA5507A49}", + "context": "BehaviorType", + "variant": "", + "details": { + "name": "RaySplineQueryResult" + } + }, + { + "base": "{ED57731E-2821-4AA6-9BD6-9203ED0B6AB0}", + "context": "BehaviorType", + "variant": "", + "details": { + "name": "AreaBlenderConfig" + } + }, + { + "base": "{0CE9FA36-1E3A-4C06-9254-B7C73A732053}", + "context": "BehaviorType", + "variant": "", + "details": { + "name": "Vector4" + } + }, + { + "base": "{A62E9C87-093C-4534-AB48-DEF8EC80C190}", + "context": "BehaviorType", + "variant": "", + "details": { + "name": "DescriptorListCombinerConfig" + } + }, + { + "base": "{73BA7B92-1061-4DDB-AA5B-A0D87303CBC8}", + "context": "BehaviorType", + "variant": "", + "details": { + "name": "SlopeAlignmentModifierConfig" + } + }, + { + "base": "{C0E1DF8C-D1BE-4AF4-8100-5D71788399BA}", + "context": "BehaviorType", + "variant": "", + "details": { + "name": "ShaderVariantInfo" + } + }, + { + "base": "{15A4332F-7C3F-4A58-AC35-50E1CE53FB9C}", + "context": "BehaviorType", + "variant": "", + "details": { + "name": "Matrix3x3" + } + }, + { + "base": "{12A1776B-61F6-4E5F-356A-AD718A62051F}", + "context": "BehaviorType", + "variant": "", + "details": { + "name": "NetworkTestPlayerComponentNetworkInput" + } + }, + { + "base": "{157193C7-B673-4A2B-8B43-5681DCC3DEC3}", + "context": "BehaviorType", + "variant": "", + "details": { + "name": "Matrix4x4" + } + }, + { + "base": "{331A3D0E-BB1D-47BF-96A2-249FAA0D720D}", + "context": "BehaviorType", + "variant": "", + "details": { + "name": "AzFramework::SurfaceData::SurfacePoint" + } + }, + { + "base": "{6483F481-0C18-4171-8B59-A44F2F28EAE5}", + "context": "BehaviorType", + "variant": "", + "details": { + "name": "AWSMetrics_MetricsAttribute" + } + }, + { + "base": "{708A5B3C-E377-40CE-9572-BEB64C849D40}", + "context": "BehaviorType", + "variant": "", + "details": { + "name": "VertexHandle" + } + }, + { + "base": "{C81CC1CA-6841-5F6A-B1C7-E544590B481F}", + "context": "BehaviorType", + "variant": "", + "details": { + "name": "AZ::RHI::Handle" + } + }, + { + "base": "{E8C6654F-0000-5496-8A61-9DAE9CA30493}", + "context": "BehaviorType", + "variant": "", + "details": { + "name": "AZ::RHI::Handle" + } + }, + { + "base": "{C16F0F38-8F8F-45A2-A33B-F2758922A7C4}", + "context": "BehaviorType", + "variant": "", + "details": { + "name": "MeshVertexTangentData" + } + }, + { + "base": "{F56FB088-4C92-4453-AFE9-4E820F03FA90}", + "context": "BehaviorType", + "variant": "", + "details": { + "name": "MeshVertexBitangentData" + } + }, + { + "base": "{A7E568EC-5873-5C8A-A43E-A7228B613A21}", + "context": "BehaviorType", + "variant": "", + "details": { + "name": "AZ::RHI::Handle" + } + }, + { + "base": "{00931AEB-2AD8-42CE-B1DC-FA4332F51501}", + "context": "BehaviorType", + "variant": "", + "details": { + "name": "CapsuleShapeConfig" + } + }, + { + "base": "{004ABD25-CF14-4EB3-BD41-022C247C07FA}", + "context": "BehaviorType", + "variant": "", + "details": { + "name": "OBB" + } + }, + { + "base": "{4AFDFD7F-384A-41DF-900C-9B25A4AA8D1E}", + "context": "BehaviorType", + "variant": "", + "details": { + "name": "PosterizeGradientConfig" + } + }, + { + "base": "{02FB32C4-B94E-4084-9049-3DF32F87BD76}", + "context": "BehaviorType", + "variant": "", + "details": { + "name": "ClientAuthAWSCredentials" + } + }, + { + "base": "{F6B9150B-CC89-48A2-AB89-D18740CC6FA2}", + "context": "BehaviorType", + "variant": "", + "details": { + "name": "FaceVertHandles" + } + }, + { + "base": "{4BC6D515-214A-4DCE-8FCB-A6389B66A1B9}", + "context": "BehaviorType", + "variant": "", + "details": { + "name": "Entity Transform" + } + }, + { + "base": "{F681BA9D-245C-4630-B20E-05DD752FAD57}", + "context": "BehaviorType", + "variant": "", + "details": { + "name": "UiOffsets" + } + }, + { + "base": "{EBEDA5EC-29D3-4F23-ABCC-C7C4EE48FA36}", + "context": "BehaviorType", + "variant": "", + "details": { + "name": "DisplaySettingsState" + } + }, + { + "base": "{344066EB-7C3D-4E92-B53D-3C9EBD546488}", + "context": "BehaviorType", + "variant": "", + "details": { + "name": "EditorMaterialComponentSlot" + } + }, + { + "base": "{3D2B920C-9EFD-40D5-AAE0-DF131C3D4931}", + "context": "BehaviorType", + "variant": "", + "details": { + "name": "Name" + } + }, + { + "base": "{F965D1B2-9DE3-4900-B44B-E58D9F083ACB}", + "context": "BehaviorType", + "variant": "", + "details": { + "name": "AuthenticationTokens" + } + }, + { + "base": "{1BDB5DA4-A4A8-452B-BE6D-6BD451D4E7CD}", + "context": "BehaviorType", + "variant": "", + "details": { + "name": "ImageGradientConfig" + } + }, + { + "base": "{DCFE9FBF-39BF-5B3C-AD28-D61ADBAF1711}", + "context": "BehaviorType", + "variant": "", + "details": { + "name": "AZ::RHI::Handle" + } + }, + { + "base": "{8FB7C786-D8A7-41C4-A703-020020EB4A4F}", + "context": "BehaviorType", + "variant": "", + "details": { + "name": "ShapeAreaFalloffGradientConfig" + } + }, + { + "base": "{D24130B9-89C4-4EAA-9A5D-3469B05C5065}", + "context": "BehaviorType", + "variant": "", + "details": { + "name": "GraphModelSlotId" + } + }, + { + "base": "{7894072A-9050-4F0F-901B-34B1A0D29417}", + "context": "BehaviorType", + "variant": "", + "details": { + "name": "Color" + } + }, + { + "base": "{F2EE1768-183B-483E-9778-CB3D3D0DA68A}", + "context": "BehaviorType", + "variant": "", + "details": { + "name": "MaterialData" + } + }, + { + "base": "{FF8B1DED-C1A8-4322-86D2-C8432E4B0526}", + "context": "BehaviorType", + "variant": "", + "details": { + "name": "RotationModifierConfig" + } + }, + { + "base": "{902F6253-A8FA-4350-B9F1-C176F3E2D305}", + "context": "BehaviorType", + "variant": "", + "details": { + "name": "DescriptorListConfig" + } + }, + { + "base": "{34516BA4-2B13-4A84-A46B-01E1980CA778}", + "context": "BehaviorType", + "variant": "", + "details": { + "name": "GradientSurfaceDataConfig" + } + }, + { + "base": "{8AF3B382-F187-4323-9014-B380638767E3}", + "context": "BehaviorType", + "variant": "", + "details": { + "name": "Multiplayer::NetComponentId" + } + }, + { + "base": "{EBB1C475-FA03-4111-8C84-985377434B9B}", + "context": "BehaviorType", + "variant": "", + "details": { + "name": "Multiplayer::RpcIndex" + } + }, + { + "base": "{E134EAE8-52A1-4E43-847B-09E546CC5B95}", + "context": "BehaviorType", + "variant": "", + "details": { + "name": "UVCoords" + } + }, + { + "base": "{28529C97-543C-5690-9FA4-9781271E6661}", + "context": "BehaviorType", + "variant": "", + "details": { + "name": "AZ::RHI::Handle" + } + }, + { + "base": "{B94085B7-C0D4-466A-A791-188A4559EC8D}", + "context": "BehaviorType", + "variant": "", + "details": { + "name": "OutputDeviceTransformType" + } + }, + { + "base": "{3EC1CE83-483D-41FD-9909-D22B03E56F4E}", + "context": "BehaviorType", + "variant": "", + "details": { + "name": "Render::ShadowmapSize" + } + }, + { + "base": "{9E71534D-34B3-4723-B180-2552513DDA3D}", + "context": "BehaviorType", + "variant": "", + "details": { + "name": "AWSScriptBehaviorLambda" + } + }, + { + "base": "{8CD110EE-95FA-4B26-B10E-95079BE4CB11}", + "context": "BehaviorType", + "variant": "", + "details": { + "name": "DistanceBetweenFilterConfig" + } + }, + { + "base": "{A54C2B36-D5B8-46A1-A529-4EBDBD2450E7}", + "context": "BehaviorType", + "variant": "", + "details": { + "name": "AABB" + } + }, + { + "base": "{C845E5EC-5580-4E12-A9B2-9AE7E5B7826F}", + "context": "BehaviorType", + "variant": "", + "details": { + "name": "EntityComponentIdPair" + } + }, + { + "base": "{E6DA080B-7ED1-4135-A78C-A6A5E495A43E}", + "context": "BehaviorType", + "variant": "", + "details": { + "name": "CollisionGroup" + } + }, + { + "base": "{F01C8BDD-6F24-4344-8945-521A8750B30B}", + "context": "BehaviorType", + "variant": "", + "details": { + "name": "PolygonPrism" + } + }, + { + "base": "{67C8C6ED-F32A-443E-A777-1CAE48B22CD7}", + "context": "BehaviorType", + "variant": "", + "details": { + "name": "SurfaceTag" + } + }, + { + "base": "{48A94382-72BE-457B-BB43-0E6C245824D2}", + "context": "BehaviorType", + "variant": "", + "details": { + "name": "SearchFilter" + } + }, + { + "base": "{4C0F6AD4-0D4F-4354-AD4A-0C01E948245C}", + "context": "BehaviorType", + "variant": "", + "details": { + "name": "ScriptTimePoint" + } + }, + { + "base": "{05E4C08B-3A1B-4390-8144-3767D8E56A81}", + "context": "BehaviorType", + "variant": "", + "details": { + "name": "Multiplayer::NetEntityId" + } + }, + { + "base": "{65D4346C-FB16-4CB0-9BDC-1185B122C4A9}", + "context": "BehaviorType", + "variant": "", + "details": { + "name": "UiAnchors" + } + }, + { + "base": "{691E0F23-37E9-434F-A1D1-E8DE5B4A3405}", + "context": "BehaviorType", + "variant": "", + "details": { + "name": "SurfaceSlopeGradientConfig" + } + }, + { + "base": "{4E74B13E-6B4E-59D1-90E1-5E5C7EEE40D6}", + "context": "BehaviorType", + "variant": "", + "details": { + "name": "AZ::RHI::Handle" + } + }, + { + "base": "{7602AA36-792C-4BDC-BDF8-AA16792151A3}", + "context": "BehaviorType", + "variant": "", + "details": { + "name": "CollisionEvent" + } + }, + { + "base": "{02644F52-9483-47A8-9028-37671695C34E}", + "context": "BehaviorType", + "variant": "", + "details": { + "name": "LightConfig" + } + }, + { + "base": "{6383F1D3-BB27-4E6B-A49A-6409B2059EAA}", + "context": "BehaviorType", + "variant": "", + "details": { + "name": "EntityId" + } + }, + { + "base": "{1906D8A5-7DEC-4DE3-A606-9E53BB3459E7}", + "context": "BehaviorType", + "variant": "", + "details": { + "name": "Matrix3x4" + } + }, + { + "base": "{17477B86-B163-4574-8FB2-4916BC218B3D}", + "context": "BehaviorType", + "variant": "", + "details": { + "name": "MeshVertexColorData" + } + }, + { + "base": "{A504D6DA-2825-4A0E-A65E-3FC76FC8AFAC}", + "context": "BehaviorType", + "variant": "", + "details": { + "name": "AreaDebugConfig" + } + }, + { + "base": "{794F7DE4-188C-4031-8B00-C2BA0C351A1E}", + "context": "BehaviorType", + "variant": "", + "details": { + "name": "LevelSettingsConfig" + } + }, + { + "base": "{B88C9D87-8609-4EAB-82D6-92DFEF006629}", + "context": "BehaviorType", + "variant": "", + "details": { + "name": "ShapeIntersectionFilterConfig" + } + }, + { + "base": "{3D80F623-C85C-4741-90D0-E4E66164E6BF}", + "context": "BehaviorType", + "variant": "", + "details": { + "name": "Vector2" + } + }, + { + "base": "{5B085DA7-CDC9-47C7-B2DB-BA5DD5AA2FB5}", + "context": "BehaviorType", + "variant": "", + "details": { + "name": "SurfaceMaskFilterConfig" + } + }, + { + "base": "{847DD984-9DBF-4789-8E25-E0334402E8AD}", + "context": "BehaviorType", + "variant": "", + "details": { + "name": "Plane" + } + }, + { + "base": "{03AAAB3F-5C47-5A66-9EBC-D5FA4DB353C9}", + "context": "BehaviorType", + "variant": "", + "details": { + "name": "String" + } + }, + { + "base": "{63984856-F883-4F8C-9049-5A8F26477B76}", + "context": "BehaviorType", + "variant": "", + "details": { + "name": "InstanceSystemConfig" + } + }, + { + "base": "{3768D3A6-BF70-4ABC-B4EC-73C75A886916}", + "context": "BehaviorType", + "variant": "", + "details": { + "name": "GradientSampler" + } + }, + { + "base": "{B435C091-482C-4EB9-B1F4-FA5B480796DA}", + "context": "BehaviorType", + "variant": "", + "details": { + "name": "MeshVertexUVData" + } + }, + { + "base": "{EA14018E-E853-4BF5-8E13-D83BB99A54CC}", + "context": "BehaviorType", + "variant": "", + "details": { + "name": "SurfaceTagWeight" + } + }, + { + "base": "{3CB05FC9-6E0F-435E-B420-F027B6716804}", + "context": "BehaviorType", + "variant": "", + "details": { + "name": "SurfaceAltitudeGradientConfig" + } + }, + { + "base": "{C6FD75F7-58BA-46CE-8FBA-2D64CB4ECFF9}", + "context": "BehaviorType", + "variant": "", + "details": { + "name": "ExposureControlConfig" + } + }, + { + "base": "{27B1FEC2-8C8A-47D7-A034-6609FA092B34}", + "context": "BehaviorType", + "variant": "", + "details": { + "name": "ShaderVariantId" + } + }, + { + "base": "{41CC88A4-FE07-48E6-943D-998DE68AFF5C}", + "context": "BehaviorType", + "variant": "", + "details": { + "name": "Entity" + } + }, + { + "base": "{6B17F9C6-DB72-52CA-80ED-EFDFDF2DF9ED}", + "context": "BehaviorType", + "variant": "", + "details": { + "name": "AZ::RHI::Handle" + } + }, + { + "base": "{F27E64FB-A7FF-47F2-80DB-7E1371B014DD}", + "context": "BehaviorType", + "variant": "", + "details": { + "name": "PythonBuilderWorker" + } + }, + { + "base": "{41CA80B1-9E0D-41FB-A235-9638D2A905A5}", + "context": "BehaviorType", + "variant": "", + "details": { + "name": "Render::DisplayMapperOperationType" + } + }, + { + "base": "{4FA91FA7-CF3C-51BF-8159-6496DC7D526C}", + "context": "BehaviorType", + "variant": "", + "details": { + "name": "AZ::RHI::Handle" + } + }, + { + "base": "{3EE8C0D4-3792-46C0-B91C-B89A81C36B91}", + "context": "BehaviorType", + "variant": "", + "details": { + "name": "AcesParameterOverrides" + } + }, + { + "base": "{5F0CD700-EC2B-468D-B708-F6EEA7782C46}", + "context": "BehaviorType", + "variant": "", + "details": { + "name": "SurfaceMaskDepthFilterConfig" + } + }, + { + "base": "{569E74F6-1268-4199-9653-A3B603FC9F4F}", + "context": "BehaviorType", + "variant": "", + "details": { + "name": "AWSScriptBehaviorDynamoDB" + } + }, + { + "base": "{7E304208-5FDF-4384-BC28-E7CDD2A15BEC}", + "context": "BehaviorType", + "variant": "", + "details": { + "name": "DistributionFilterConfig" + } + }, + { + "base": "{7A0851A3-2CBD-4A03-85D5-1C40221E7F61}", + "context": "BehaviorType", + "variant": "", + "details": { + "name": "TriggerEvent" + } + }, + { + "base": "{C66E5214-A24B-4722-B7F0-5991E6F8F163}", + "context": "BehaviorType", + "variant": "", + "details": { + "name": "MaterialAssignment" + } + }, + { + "base": "{110C4B14-11A8-4E9D-8638-5051013A56AC}", + "context": "BehaviorType", + "variant": "", + "details": { + "name": "Number" + } + }, + { + "base": "{E35DCF28-1AC3-49E8-A0AB-2F6115348F45}", + "context": "BehaviorType", + "variant": "", + "details": { + "name": "PositionSplineQueryResult" + } + }, + { + "base": "{98A6B0CE-FAD0-4108-B019-6B01931E649F}", + "context": "BehaviorType", + "variant": "", + "details": { + "name": "VegetationSpawnerConfig" + } + }, + { + "base": "{1811456D-0C3D-58C8-ACE8-FD47F4E80E25}", + "context": "BehaviorType", + "variant": "", + "details": { + "name": "AZ::RHI::Handle" + } + }, + { + "base": "{5D9958E9-9F1E-4985-B532-FFFDE75FEDFD}", + "context": "BehaviorType", + "variant": "", + "details": { + "name": "Transform" + } + }, + { + "base": "{6CEBAF3A-2A5C-4508-A351-9613E32CF63F}", + "context": "BehaviorType", + "variant": "", + "details": { + "name": "SurfaceSlopeFilterConfig" + } + }, + { + "base": "{DA5C6354-AA81-504B-88BF-8EF5811ABA61}", + "context": "BehaviorType", + "variant": "", + "details": { + "name": "AZ::RHI::Handle" + } + }, + { + "base": "{24EC2919-F198-4871-8404-F6DE8A16275E}", + "context": "BehaviorType", + "variant": "", + "details": { + "name": "DiskShapeConfig" + } + }, + { + "base": "{B1106C14-D22B-482F-B33E-B6E154A53798}", + "context": "BehaviorType", + "variant": "", + "details": { + "name": "AWSMetrics_AttributesSubmissionList" + } + }, + { + "base": "{FF875C22-2E4F-4CE3-BA49-09BF78C70A09}", + "context": "BehaviorType", + "variant": "", + "details": { + "name": "BlendShapeData" + } + }, + { + "base": "{07B9E2F7-5408-49E9-904D-CC1A9C33230E}", + "context": "BehaviorType", + "variant": "", + "details": { + "name": "AZ::RPI::ShaderOptionDescriptor" + } + }, + { + "base": "{9274AD17-3212-4651-9F3B-7DCCB080E467}", + "context": "BehaviorType", + "variant": "", + "details": { + "name": "SceneManifest" + } + }, + { + "base": "{F392F061-BF40-43C5-89F6-7323D6EF11F4}", + "context": "BehaviorType", + "variant": "", + "details": { + "name": "SmoothStep" + } + }, + { + "base": "{F034FBA2-AC2F-4E66-8152-14DFB90D6283}", + "context": "BehaviorType", + "variant": "", + "details": { + "name": "BoxShapeConfig" + } + }, + { + "base": "{950009BC-8991-4749-9D5C-08C62AF34E7B}", + "context": "BehaviorType", + "variant": "", + "details": { + "name": "FaceHandle" + } + }, + { + "base": "{B0216514-46B5-4A57-9D9D-8D9EC94C3702}", + "context": "BehaviorType", + "variant": "", + "details": { + "name": "ConstantGradientConfig" + } + }, + { + "base": "{F4460210-024D-4B3B-A10A-04B669C34230}", + "context": "BehaviorType", + "variant": "", + "details": { + "name": "Multiplayer::PropertyIndex" + } + }, + { + "base": "{6EEACBC0-2D97-414C-8E87-088E7BA231A9}", + "context": "BehaviorType", + "variant": "", + "details": { + "name": "LightingPreset" + } + }, + { + "base": "{9E0F0801-348B-4FF9-AF9B-858D59404968}", + "context": "BehaviorType", + "variant": "", + "details": { + "name": "InputEventNotificationId" + } + }, + { + "base": "{0C899DAC-6B19-4BDD-AD8C-8A11EF2A6729}", + "context": "BehaviorType", + "variant": "", + "details": { + "name": "MotionEvent" + } + }, + { + "base": "{73103120-3DD3-4873-BAB3-9713FA2804FB}", + "context": "BehaviorType", + "variant": "", + "details": { + "name": "Quaternion" + } + }, + { + "base": "{23C40FD4-A55F-4BD3-BE5B-DC5423F217C2}", + "context": "BehaviorType", + "variant": "", + "details": { + "name": "EmptyInstanceSpawner" + } + }, + { + "base": "{3E49974D-2EE0-4AF9-92B9-229A22B515C3}", + "context": "BehaviorType", + "variant": "", + "details": { + "name": "ReferenceShapeConfig" + } + }, + { + "base": "{E59D0A4C-BA3D-4288-B409-A00B7D5566AA}", + "context": "BehaviorType", + "variant": "", + "details": { + "name": "SurfaceMaskGradientConfig" + } + }, + { + "base": "{14CCBE43-52DD-4F56-92A8-2BB011A0F7A2}", + "context": "BehaviorType", + "variant": "", + "details": { + "name": "AreaSystemConfig" + } + }, + { + "base": "{E6D8372B-8419-4287-B478-1353709A972F}", + "context": "BehaviorType", + "variant": "", + "details": { + "name": "AssetInfo" + } + }, + { + "base": "{5C8C0729-5D41-5299-80F1-395F79B02D70}", + "context": "BehaviorType", + "variant": "", + "details": { + "name": "AZ::RHI::Handle" + } + }, + { + "base": "{F8679938-6D3F-47CC-A078-3D6EC0011366}", + "context": "BehaviorType", + "variant": "", + "details": { + "name": "ShaderVariantListSourceData" + } + }, + { + "base": "{8F519317-4E83-4CF0-BEC9-C5F3F3198F20}", + "context": "BehaviorType", + "variant": "", + "details": { + "name": "DitherGradientConfig" + } + }, + { + "base": "{1106FD53-8B3A-4F97-8051-E34AD70199A5}", + "context": "BehaviorType", + "variant": "", + "details": { + "name": "GradientTransformConfig" + } + }, + { + "base": "{A23453D5-79A8-49C8-B9F0-9CC35D711DD4}", + "context": "BehaviorType", + "variant": "", + "details": { + "name": "BlastActorData" + } + }, + { + "base": "{E9E2D5B3-66F1-494D-91D2-1E83D36A1AC1}", + "context": "BehaviorType", + "variant": "", + "details": { + "name": "ThresholdGradientConfig" + } + }, + { + "base": "{64C7F381-3313-46E8-B23B-D7AA9A915F35}", + "context": "BehaviorType", + "variant": "", + "details": { + "name": "ShaderCollectionItem" + } + }, + { + "base": "{A746CFD0-7288-42F4-837D-1CDE2EAA6923}", + "context": "BehaviorType", + "variant": "", + "details": { + "name": "PerlinGradientConfig" + } + }, + { + "base": "{3F860893-1F57-5615-92CA-389B49687A9C}", + "context": "BehaviorType", + "variant": "", + "details": { + "name": "AZ::RHI::Handle" + } + }, + { + "base": "{61599E53-2B6A-40AC-B5B8-FC1C3F87275E}", + "context": "BehaviorType", + "variant": "", + "details": { + "name": "AreaConfig" + } + }, + { + "base": "{BBA5CC1E-B4CA-4792-89F7-93711E98FBD1}", + "context": "BehaviorType", + "variant": "", + "details": { + "name": "DynamicSliceInstanceSpawner" + } + }, + { + "base": "{4A70FD56-10A8-460E-B822-3EF03F1EF7A0}", + "context": "BehaviorType", + "variant": "", + "details": { + "name": "String" + } + }, + { + "base": "{B980EF45-C893-56C2-9B54-44B8B14F3436}", + "context": "BehaviorType", + "variant": "", + "details": { + "name": "AZ::RHI::Handle" + } + }, + { + "base": "{BB3C3018-66B1-4BAD-AD27-F385BA015C69}", + "context": "BehaviorType", + "variant": "", + "details": { + "name": "SurfaceAltitudeFilterConfig" + } + }, + { + "base": "{7F4E956C-7463-4236-B320-C992D36A9C6E}", + "context": "BehaviorType", + "variant": "", + "details": { + "name": "AWSScriptBehaviorS3" + } + }, + { + "base": "{957264F7-A169-4D47-B94C-659B078026D4}", + "context": "BehaviorType", + "variant": "", + "details": { + "name": "MixedGradientLayer" + } + }, + { + "base": "{35BF3504-CEC9-4406-A275-C633A17FBEFB}", + "context": "BehaviorType", + "variant": "", + "details": { + "name": "Multiplayer::ClientInputId" + } + }, + { + "base": "{5B169E40-E02B-5012-A085-BE7E6CA55CEA}", + "context": "BehaviorType", + "variant": "", + "details": { + "name": "AZ::RHI::Handle" + } + }, + { + "base": "{DE5C18B0-4214-4A37-B590-8D45CC450A96}", + "context": "BehaviorType", + "variant": "", + "details": { + "name": "UiPadding" + } + }, + { + "base": "{121A6DAB-26C1-46B7-83AE-BE750FDABC04}", + "context": "BehaviorType", + "variant": "", + "details": { + "name": "ReferenceGradientConfig" + } + }, + { + "base": "{DF17F6F3-48C6-4B4A-BBD9-37DA03162864}", + "context": "BehaviorType", + "variant": "", + "details": { + "name": "Multiplayer::HostFrameId" + } + }, + { + "base": "{B7A0A88D-4FDF-487F-A0E6-5BE04C82862A}", + "context": "BehaviorType", + "variant": "", + "details": { + "name": "PositionModifierConfig" + } + }, + { + "base": "{A7304AE2-EC26-44A4-8C00-89D9731CCB13}", + "context": "BehaviorType", + "variant": "", + "details": { + "name": "ModelPreset" + } + }, + { + "base": "{3366C279-32AE-48F6-839B-7700AE117A54}", + "context": "BehaviorType", + "variant": "", + "details": { + "name": "MaterialComponentConfig" + } + }, + { + "base": "{C10E7B12-BCB6-5872-810D-D597F123DB61}", + "context": "BehaviorType", + "variant": "", + "details": { + "name": "AZ::RHI::Handle" + } + }, + { + "base": "{744CCE6C-9F69-4E2F-B950-DAB8514F870B}", + "context": "BehaviorType", + "variant": "", + "details": { + "name": "Physics::MaterialId" + } + }, + { + "base": "{60A9A069-9C3D-465A-B7AD-0D6CC803990A}", + "context": "BehaviorType", + "variant": "", + "details": { + "name": "ComponentId" + } + }, + { + "base": "{02F01CCC-CA6F-462F-BDEC-9A7EAC730D33}", + "context": "BehaviorType", + "variant": "", + "details": { + "name": "LevelsGradientConfig" + } + }, + { + "base": "{571E9CC8-AE35-5EBA-9A82-4012B60E7581}", + "context": "BehaviorType", + "variant": "", + "details": { + "name": "AZ::RHI::Handle" + } + }, + { + "base": "{9E576D4F-A74A-4326-9135-C07284D0A3B9}", + "context": "BehaviorType", + "variant": "", + "details": { + "name": "AtomToolsDocumentSystemSettings" + } + }, + { + "base": "{D350732E-4727-41C8-95E0-FBAF5F2AC074}", + "context": "BehaviorType", + "variant": "", + "details": { + "name": "AnimationData" + } + }, + { + "base": "{A0CA880C-AFE4-43CB-926C-59AC48496112}", + "context": "BehaviorType", + "variant": "", + "details": { + "name": "Boolean" + } + }, + { + "base": "{A5A5E7F7-FC36-4BD1-8A93-21362574B9DA}", + "context": "BehaviorType", + "variant": "", + "details": { + "name": "Descriptor" + } + }, + { + "base": "{742F8581-B03E-42C2-A332-2A47C588BD1F}", + "context": "BehaviorType", + "variant": "", + "details": { + "name": "TypeExposition" + } + }, + { + "base": "{8F19B652-17A5-5646-9001-120CE0D5BF02}", + "context": "BehaviorType", + "variant": "", + "details": { + "name": "AZ::RHI::Handle" + } + }, + { + "base": "{1CD41DA9-91CA-4A57-A169-B42FC25FC4C3}", + "context": "BehaviorType", + "variant": "", + "details": { + "name": "ScaleModifierConfig" + } + }, + { + "base": "{1DD3D37D-0855-44F9-94F8-76F0128491A1}", + "context": "BehaviorType", + "variant": "", + "details": { + "name": "InstanceData" + } + }, + { + "base": "{D7439508-ED10-4395-9D48-1FC3D7815361}", + "context": "BehaviorType", + "variant": "", + "details": { + "name": "Contact" + } + }, + { + "base": "{382116B1-5843-42A3-915B-A3BFC3CFAB78}", + "context": "BehaviorType", + "variant": "", + "details": { + "name": "DescriptorWeightSelectorConfig" + } + }, + { + "base": "{D9C0BF74-6FE8-536F-9432-C964B82700BE}", + "context": "BehaviorType", + "variant": "", + "details": { + "name": "AZ::RHI::Handle" + } + }, + { + "base": "{02766CCF-BDA7-46B6-9BB1-58A90C1AD6AA}", + "context": "BehaviorType", + "variant": "", + "details": { + "name": "BlendShapeAnimationData" + } + }, + { + "base": "{2AB6096D-C7C0-4C5E-AA84-7CA804A9680C}", + "context": "BehaviorType", + "variant": "", + "details": { + "name": "SurfaceTagDistance" + } + }, + { + "base": "{EB603581-4654-4C17-B6DE-AE61E79EDA97}", + "context": "BehaviorType", + "variant": "", + "details": { + "name": "MaterialAssignmentId" + } + }, + { + "base": "{515CF4CF-4992-4139-BDE5-42A887432B45}", + "context": "BehaviorType", + "variant": "", + "details": { + "name": "CryRange" + } + }, + { + "base": "{9F4E062E-06A0-46D4-85DF-E0DA96467D3A}", + "context": "BehaviorType", + "variant": "", + "details": { + "name": "Tag" + } + }, + { + "base": "{A435F06D-A148-4B5F-897D-39996495B6F4}", + "context": "BehaviorType", + "variant": "", + "details": { + "name": "RandomGradientConfig" + } + }, + { + "base": "{B7463F12-C981-4A0B-ACEF-4B26D431D797}", + "context": "BehaviorType", + "variant": "", + "details": { + "name": "Unit Testing" + } + }, + { + "base": "{53254779-82F1-441E-9116-81E1FACFECF4}", + "context": "BehaviorType", + "variant": "", + "details": { + "name": "CylinderShapeConfig" + } + }, + { + "base": "{A53D2A38-FFE1-4828-B91E-4D5A8B712BB2}", + "context": "BehaviorType", + "variant": "", + "details": { + "name": "SmoothStepGradientConfig" + } + }, + { + "base": "{D435DDB9-C513-4A2E-B0AC-9933E9360857}", + "context": "BehaviorType", + "variant": "", + "details": { + "name": "SurfaceDataColliderConfig" + } + }, + { + "base": "{74BEEDB5-81CF-409F-B375-0D93D81EF2E3}", + "context": "BehaviorType", + "variant": "", + "details": { + "name": "PrefabInstanceSpawner" + } + }, + { + "base": "{C6FFF25F-FE52-4D08-8D96-D04C14048816}", + "context": "BehaviorType", + "variant": "", + "details": { + "name": "ShaderSemantic" + } + }, + { + "base": "{35CA7415-DB12-4630-B0D0-4A140CE1B9A7}", + "context": "BehaviorType", + "variant": "", + "details": { + "name": "LmbrCentral::QuadShapeConfig" + } + }, + { + "base": "{1A4C0EF2-BF98-4EB3-B134-A6EF7B31B62E}", + "context": "BehaviorType", + "variant": "", + "details": { + "name": "InvertGradientConfig" + } + }, + { + "base": "{A935EBBC-D167-4C59-927C-5D98C6337B9C}", + "context": "BehaviorType", + "variant": "", + "details": { + "name": "RuntimeData" + } + }, + { + "base": "{8379EB7D-01FA-4538-B64B-A6543B4BE73D}", + "context": "BehaviorType", + "variant": "", + "details": { + "name": "Vector3" + } + }, + { + "base": "{A2589BD4-42FB-40BA-A38D-CFCD6E9EA169}", + "context": "BehaviorType", + "variant": "", + "details": { + "name": "MeshData" + } + }, + { + "base": "{E6E7C0C5-07C9-44BB-A38C-930431948667}", + "context": "BehaviorType", + "variant": "", + "details": { + "name": "SliceInstantiationTicket" + } + } + ] +} \ No newline at end of file diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Types/OnDemandReflectedTypes.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Types/OnDemandReflectedTypes.names new file mode 100644 index 0000000000..fcd616b9ed --- /dev/null +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Types/OnDemandReflectedTypes.names @@ -0,0 +1,101804 @@ +{ + "entries": [ + { + "base": "{E65D74A8-908B-51B4-94CC-7226AC363DD5}", + "context": "OnDemandReflected", + "variant": "", + "details": { + "name": "Fixed Size Array", + "category": "Fixed Size Array", + "tooltip": "A fixed-sized container of elements." + }, + "methods": [ + { + "base": "Front", + "context": "{E65D74A8-908B-51B4-94CC-7226AC363DD5}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Front" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Front is invoked" + }, + "details": { + "name": "Front" + }, + "params": [ + { + "typeid": "{E65D74A8-908B-51B4-94CC-7226AC363DD5}", + "details": { + "name": "AZStd::array" + } + } + ], + "results": [ + { + "typeid": "{8379EB7D-01FA-4538-B64B-A6543B4BE73D}", + "details": { + "name": "Vector3" + } + } + ] + }, + { + "base": "Fill", + "context": "{E65D74A8-908B-51B4-94CC-7226AC363DD5}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Fill" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Fill is invoked" + }, + "details": { + "name": "Fill" + }, + "params": [ + { + "typeid": "{E65D74A8-908B-51B4-94CC-7226AC363DD5}", + "details": { + "name": "AZStd::array" + } + }, + { + "typeid": "{8379EB7D-01FA-4538-B64B-A6543B4BE73D}", + "details": { + "name": "Vector3" + } + } + ] + }, + { + "base": "Replace", + "context": "{E65D74A8-908B-51B4-94CC-7226AC363DD5}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Replace" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Replace is invoked" + }, + "details": { + "name": "Replace" + }, + "params": [ + { + "typeid": "{E65D74A8-908B-51B4-94CC-7226AC363DD5}", + "details": { + "name": "AZStd::array" + } + }, + { + "typeid": "{D6597933-47CD-4FC8-B911-63F3E2B0993A}", + "details": { + "name": "AZ::u64" + } + }, + { + "typeid": "{8379EB7D-01FA-4538-B64B-A6543B4BE73D}", + "details": { + "name": "Vector3" + } + } + ], + "results": [ + { + "typeid": "{428274AA-6C0B-5535-A5BD-E987696ED8E0}", + "details": { + "name": "Outcome" + } + } + ] + }, + { + "base": "Size", + "context": "{E65D74A8-908B-51B4-94CC-7226AC363DD5}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Size" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Size is invoked" + }, + "details": { + "name": "Size" + }, + "params": [ + { + "typeid": "{E65D74A8-908B-51B4-94CC-7226AC363DD5}", + "details": { + "name": "AZStd::array" + } + } + ], + "results": [ + { + "typeid": "{72039442-EB38-4D42-A1AD-CB68F7E0EEF6}", + "details": { + "name": "int" + } + } + ] + }, + { + "base": "size", + "context": "{E65D74A8-908B-51B4-94CC-7226AC363DD5}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke size" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after size is invoked" + }, + "details": { + "name": "size" + }, + "params": [ + { + "typeid": "{E65D74A8-908B-51B4-94CC-7226AC363DD5}", + "details": { + "name": "AZStd::array" + } + } + ], + "results": [ + { + "typeid": "{72039442-EB38-4D42-A1AD-CB68F7E0EEF6}", + "details": { + "name": "int" + } + } + ] + }, + { + "base": "At", + "context": "{E65D74A8-908B-51B4-94CC-7226AC363DD5}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke At" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after At is invoked" + }, + "details": { + "name": "At" + }, + "params": [ + { + "typeid": "{E65D74A8-908B-51B4-94CC-7226AC363DD5}", + "details": { + "name": "AZStd::array" + } + }, + { + "typeid": "{D6597933-47CD-4FC8-B911-63F3E2B0993A}", + "details": { + "name": "AZ::u64" + } + } + ], + "results": [ + { + "typeid": "{E9F4752C-BFCD-5F51-AA18-F47BDF358BFD}", + "details": { + "name": "Outcome, allocator>>" + } + } + ] + }, + { + "base": "Swap", + "context": "{E65D74A8-908B-51B4-94CC-7226AC363DD5}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Swap" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Swap is invoked" + }, + "details": { + "name": "Swap" + }, + "params": [ + { + "typeid": "{E65D74A8-908B-51B4-94CC-7226AC363DD5}", + "details": { + "name": "AZStd::array" + } + }, + { + "typeid": "{E65D74A8-908B-51B4-94CC-7226AC363DD5}", + "details": { + "name": "AZStd::array" + } + } + ] + }, + { + "base": "at", + "context": "{E65D74A8-908B-51B4-94CC-7226AC363DD5}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke at" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after at is invoked" + }, + "details": { + "name": "at" + }, + "params": [ + { + "typeid": "{E65D74A8-908B-51B4-94CC-7226AC363DD5}", + "details": { + "name": "AZStd::array" + } + }, + { + "typeid": "{D6597933-47CD-4FC8-B911-63F3E2B0993A}", + "details": { + "name": "AZ::u64" + } + } + ], + "results": [ + { + "typeid": "{8379EB7D-01FA-4538-B64B-A6543B4BE73D}", + "details": { + "name": "Vector3" + } + } + ] + }, + { + "base": "Back", + "context": "{E65D74A8-908B-51B4-94CC-7226AC363DD5}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Back" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Back is invoked" + }, + "details": { + "name": "Back" + }, + "params": [ + { + "typeid": "{E65D74A8-908B-51B4-94CC-7226AC363DD5}", + "details": { + "name": "AZStd::array" + } + } + ], + "results": [ + { + "typeid": "{8379EB7D-01FA-4538-B64B-A6543B4BE73D}", + "details": { + "name": "Vector3" + } + } + ] + } + ] + }, + { + "base": "{232F1AE7-4411-5D69-B59C-71D7036FC5E4}", + "context": "OnDemandReflected", + "variant": "", + "details": { + "name": "Map", + "category": "Map", + "tooltip": "A collection of Key/Value pairs, where each Key value must be unique." + }, + "methods": [ + { + "base": "contains", + "context": "{232F1AE7-4411-5D69-B59C-71D7036FC5E4}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke contains" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after contains is invoked" + }, + "details": { + "name": "contains" + }, + "params": [ + { + "typeid": "{232F1AE7-4411-5D69-B59C-71D7036FC5E4}", + "details": { + "name": "AZStd::unordered_map" + } + }, + { + "typeid": "{652ED536-3402-439B-AEBE-4A5DBC554085}", + "details": { + "name": "AssetId" + } + } + ], + "results": [ + { + "typeid": "{A0CA880C-AFE4-43CB-926C-59AC48496112}", + "details": { + "name": "bool" + } + } + ] + }, + { + "base": "Insert", + "context": "{232F1AE7-4411-5D69-B59C-71D7036FC5E4}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Insert" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Insert is invoked" + }, + "details": { + "name": "Insert" + }, + "params": [ + { + "typeid": "{232F1AE7-4411-5D69-B59C-71D7036FC5E4}", + "details": { + "name": "AZStd::unordered_map" + } + }, + { + "typeid": "{652ED536-3402-439B-AEBE-4A5DBC554085}", + "details": { + "name": "AssetId" + } + }, + { + "typeid": "{0CE9FA36-1E3A-4C06-9254-B7C73A732053}", + "details": { + "name": "Vector4" + } + } + ], + "results": [ + { + "typeid": "{232F1AE7-4411-5D69-B59C-71D7036FC5E4}", + "details": { + "name": "AZStd::unordered_map" + } + } + ] + }, + { + "base": "Reserve", + "context": "{232F1AE7-4411-5D69-B59C-71D7036FC5E4}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Reserve" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Reserve is invoked" + }, + "details": { + "name": "Reserve" + }, + "params": [ + { + "typeid": "{232F1AE7-4411-5D69-B59C-71D7036FC5E4}", + "details": { + "name": "AZStd::unordered_map" + } + }, + { + "typeid": "{D6597933-47CD-4FC8-B911-63F3E2B0993A}", + "details": { + "name": "AZ::u64" + } + } + ] + }, + { + "base": "GetSize", + "context": "{232F1AE7-4411-5D69-B59C-71D7036FC5E4}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke GetSize" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after GetSize is invoked" + }, + "details": { + "name": "GetSize" + }, + "params": [ + { + "typeid": "{232F1AE7-4411-5D69-B59C-71D7036FC5E4}", + "details": { + "name": "AZStd::unordered_map" + } + } + ], + "results": [ + { + "typeid": "{72039442-EB38-4D42-A1AD-CB68F7E0EEF6}", + "details": { + "name": "int" + } + } + ] + }, + { + "base": "Iterate_VM", + "context": "{232F1AE7-4411-5D69-B59C-71D7036FC5E4}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Iterate_VM" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Iterate_VM is invoked" + }, + "details": { + "name": "Iterate_VM" + }, + "params": [ + { + "typeid": "{232F1AE7-4411-5D69-B59C-71D7036FC5E4}", + "details": { + "name": "AZStd::unordered_map" + } + } + ], + "results": [ + { + "typeid": "{C71249F6-25AF-584C-B5AF-89340AD3A15D}", + "details": { + "name": "Iterator_VM, AZStd::equal_to, allocator>>" + } + } + ] + }, + { + "base": "GetKeys", + "context": "{232F1AE7-4411-5D69-B59C-71D7036FC5E4}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke GetKeys" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after GetKeys is invoked" + }, + "details": { + "name": "GetKeys" + }, + "params": [ + { + "typeid": "{232F1AE7-4411-5D69-B59C-71D7036FC5E4}", + "details": { + "name": "AZStd::unordered_map" + } + } + ], + "results": [ + { + "typeid": "{877C4A33-39B5-51D7-948D-F97DB81372A1}", + "details": { + "name": "AZStd::vector" + } + } + ] + }, + { + "base": "Size", + "context": "{232F1AE7-4411-5D69-B59C-71D7036FC5E4}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Size" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Size is invoked" + }, + "details": { + "name": "Size" + }, + "params": [ + { + "typeid": "{232F1AE7-4411-5D69-B59C-71D7036FC5E4}", + "details": { + "name": "AZStd::unordered_map" + } + } + ], + "results": [ + { + "typeid": "{72039442-EB38-4D42-A1AD-CB68F7E0EEF6}", + "details": { + "name": "int" + } + } + ] + }, + { + "base": "Erase", + "context": "{232F1AE7-4411-5D69-B59C-71D7036FC5E4}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Erase" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Erase is invoked" + }, + "details": { + "name": "Erase" + }, + "params": [ + { + "typeid": "{232F1AE7-4411-5D69-B59C-71D7036FC5E4}", + "details": { + "name": "AZStd::unordered_map" + } + }, + { + "typeid": "{652ED536-3402-439B-AEBE-4A5DBC554085}", + "details": { + "name": "AssetId" + } + } + ], + "results": [ + { + "typeid": "{232F1AE7-4411-5D69-B59C-71D7036FC5E4}", + "details": { + "name": "AZStd::unordered_map" + } + } + ] + }, + { + "base": "EraseCheck_VM", + "context": "{232F1AE7-4411-5D69-B59C-71D7036FC5E4}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke EraseCheck_VM" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after EraseCheck_VM is invoked" + }, + "details": { + "name": "EraseCheck_VM" + }, + "params": [ + { + "typeid": "{232F1AE7-4411-5D69-B59C-71D7036FC5E4}", + "details": { + "name": "AZStd::unordered_map" + } + }, + { + "typeid": "{652ED536-3402-439B-AEBE-4A5DBC554085}", + "details": { + "name": "AssetId" + } + } + ], + "results": [ + { + "typeid": "{A0CA880C-AFE4-43CB-926C-59AC48496112}", + "details": { + "name": "bool" + } + } + ] + }, + { + "base": "Clear", + "context": "{232F1AE7-4411-5D69-B59C-71D7036FC5E4}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Clear" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Clear is invoked" + }, + "details": { + "name": "Clear" + }, + "params": [ + { + "typeid": "{232F1AE7-4411-5D69-B59C-71D7036FC5E4}", + "details": { + "name": "AZStd::unordered_map" + } + } + ], + "results": [ + { + "typeid": "{232F1AE7-4411-5D69-B59C-71D7036FC5E4}", + "details": { + "name": "AZStd::unordered_map" + } + } + ] + }, + { + "base": "At", + "context": "{232F1AE7-4411-5D69-B59C-71D7036FC5E4}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke At" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after At is invoked" + }, + "details": { + "name": "At" + }, + "params": [ + { + "typeid": "{232F1AE7-4411-5D69-B59C-71D7036FC5E4}", + "details": { + "name": "AZStd::unordered_map" + } + }, + { + "typeid": "{652ED536-3402-439B-AEBE-4A5DBC554085}", + "details": { + "name": "AssetId" + } + } + ], + "results": [ + { + "typeid": "{0CE9FA36-1E3A-4C06-9254-B7C73A732053}", + "details": { + "name": "Vector4" + } + } + ] + }, + { + "base": "BucketCount", + "context": "{232F1AE7-4411-5D69-B59C-71D7036FC5E4}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke BucketCount" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after BucketCount is invoked" + }, + "details": { + "name": "BucketCount" + }, + "params": [ + { + "typeid": "{232F1AE7-4411-5D69-B59C-71D7036FC5E4}", + "details": { + "name": "AZStd::unordered_map" + } + } + ], + "results": [ + { + "typeid": "{D6597933-47CD-4FC8-B911-63F3E2B0993A}", + "details": { + "name": "AZ::u64" + } + } + ] + }, + { + "base": "Empty", + "context": "{232F1AE7-4411-5D69-B59C-71D7036FC5E4}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Empty" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Empty is invoked" + }, + "details": { + "name": "Empty" + }, + "params": [ + { + "typeid": "{232F1AE7-4411-5D69-B59C-71D7036FC5E4}", + "details": { + "name": "AZStd::unordered_map" + } + } + ], + "results": [ + { + "typeid": "{A0CA880C-AFE4-43CB-926C-59AC48496112}", + "details": { + "name": "bool" + } + } + ] + }, + { + "base": "Swap", + "context": "{232F1AE7-4411-5D69-B59C-71D7036FC5E4}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Swap" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Swap is invoked" + }, + "details": { + "name": "Swap" + }, + "params": [ + { + "typeid": "{232F1AE7-4411-5D69-B59C-71D7036FC5E4}", + "details": { + "name": "AZStd::unordered_map" + } + }, + { + "typeid": "{232F1AE7-4411-5D69-B59C-71D7036FC5E4}", + "details": { + "name": "AZStd::unordered_map" + } + } + ] + } + ] + }, + { + "base": "{53A388FF-F69B-5F31-94CC-441F9D7F3ACC}", + "context": "OnDemandReflected", + "variant": "", + "details": { + "name": "Map", + "category": "Map", + "tooltip": "A collection of Key/Value pairs, where each Key value must be unique." + }, + "methods": [ + { + "base": "contains", + "context": "{53A388FF-F69B-5F31-94CC-441F9D7F3ACC}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke contains" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after contains is invoked" + }, + "details": { + "name": "contains" + }, + "params": [ + { + "typeid": "{53A388FF-F69B-5F31-94CC-441F9D7F3ACC}", + "details": { + "name": "AZStd::unordered_map" + } + }, + { + "typeid": "{03AAAB3F-5C47-5A66-9EBC-D5FA4DB353C9}", + "details": { + "name": "AZStd::string" + } + } + ], + "results": [ + { + "typeid": "{A0CA880C-AFE4-43CB-926C-59AC48496112}", + "details": { + "name": "bool" + } + } + ] + }, + { + "base": "Insert", + "context": "{53A388FF-F69B-5F31-94CC-441F9D7F3ACC}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Insert" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Insert is invoked" + }, + "details": { + "name": "Insert" + }, + "params": [ + { + "typeid": "{53A388FF-F69B-5F31-94CC-441F9D7F3ACC}", + "details": { + "name": "AZStd::unordered_map" + } + }, + { + "typeid": "{03AAAB3F-5C47-5A66-9EBC-D5FA4DB353C9}", + "details": { + "name": "AZStd::string" + } + }, + { + "typeid": "{847DD984-9DBF-4789-8E25-E0334402E8AD}", + "details": { + "name": "Plane" + } + } + ], + "results": [ + { + "typeid": "{53A388FF-F69B-5F31-94CC-441F9D7F3ACC}", + "details": { + "name": "AZStd::unordered_map" + } + } + ] + }, + { + "base": "Reserve", + "context": "{53A388FF-F69B-5F31-94CC-441F9D7F3ACC}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Reserve" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Reserve is invoked" + }, + "details": { + "name": "Reserve" + }, + "params": [ + { + "typeid": "{53A388FF-F69B-5F31-94CC-441F9D7F3ACC}", + "details": { + "name": "AZStd::unordered_map" + } + }, + { + "typeid": "{D6597933-47CD-4FC8-B911-63F3E2B0993A}", + "details": { + "name": "AZ::u64" + } + } + ] + }, + { + "base": "GetSize", + "context": "{53A388FF-F69B-5F31-94CC-441F9D7F3ACC}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke GetSize" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after GetSize is invoked" + }, + "details": { + "name": "GetSize" + }, + "params": [ + { + "typeid": "{53A388FF-F69B-5F31-94CC-441F9D7F3ACC}", + "details": { + "name": "AZStd::unordered_map" + } + } + ], + "results": [ + { + "typeid": "{72039442-EB38-4D42-A1AD-CB68F7E0EEF6}", + "details": { + "name": "int" + } + } + ] + }, + { + "base": "Iterate_VM", + "context": "{53A388FF-F69B-5F31-94CC-441F9D7F3ACC}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Iterate_VM" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Iterate_VM is invoked" + }, + "details": { + "name": "Iterate_VM" + }, + "params": [ + { + "typeid": "{53A388FF-F69B-5F31-94CC-441F9D7F3ACC}", + "details": { + "name": "AZStd::unordered_map" + } + } + ], + "results": [ + { + "typeid": "{CF1019DC-5737-5D46-9835-889E7AC0EFE1}", + "details": { + "name": "Iterator_VM, allocator>, Plane, AZStd::hash", + "category": "Map", + "tooltip": "A collection of Key/Value pairs, where each Key value must be unique." + }, + "methods": [ + { + "base": "contains", + "context": "{7AB203ED-4DE1-5DB6-AE1F-23E8D6104EE5}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke contains" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after contains is invoked" + }, + "details": { + "name": "contains" + }, + "params": [ + { + "typeid": "{7AB203ED-4DE1-5DB6-AE1F-23E8D6104EE5}", + "details": { + "name": "AZStd::unordered_map" + } + }, + { + "typeid": "{110C4B14-11A8-4E9D-8638-5051013A56AC}", + "details": { + "name": "double" + } + } + ], + "results": [ + { + "typeid": "{A0CA880C-AFE4-43CB-926C-59AC48496112}", + "details": { + "name": "bool" + } + } + ] + }, + { + "base": "Insert", + "context": "{7AB203ED-4DE1-5DB6-AE1F-23E8D6104EE5}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Insert" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Insert is invoked" + }, + "details": { + "name": "Insert" + }, + "params": [ + { + "typeid": "{7AB203ED-4DE1-5DB6-AE1F-23E8D6104EE5}", + "details": { + "name": "AZStd::unordered_map" + } + }, + { + "typeid": "{110C4B14-11A8-4E9D-8638-5051013A56AC}", + "details": { + "name": "double" + } + }, + { + "typeid": "{5D9958E9-9F1E-4985-B532-FFFDE75FEDFD}", + "details": { + "name": "Transform" + } + } + ], + "results": [ + { + "typeid": "{7AB203ED-4DE1-5DB6-AE1F-23E8D6104EE5}", + "details": { + "name": "AZStd::unordered_map" + } + } + ] + }, + { + "base": "Reserve", + "context": "{7AB203ED-4DE1-5DB6-AE1F-23E8D6104EE5}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Reserve" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Reserve is invoked" + }, + "details": { + "name": "Reserve" + }, + "params": [ + { + "typeid": "{7AB203ED-4DE1-5DB6-AE1F-23E8D6104EE5}", + "details": { + "name": "AZStd::unordered_map" + } + }, + { + "typeid": "{D6597933-47CD-4FC8-B911-63F3E2B0993A}", + "details": { + "name": "AZ::u64" + } + } + ] + }, + { + "base": "GetSize", + "context": "{7AB203ED-4DE1-5DB6-AE1F-23E8D6104EE5}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke GetSize" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after GetSize is invoked" + }, + "details": { + "name": "GetSize" + }, + "params": [ + { + "typeid": "{7AB203ED-4DE1-5DB6-AE1F-23E8D6104EE5}", + "details": { + "name": "AZStd::unordered_map" + } + } + ], + "results": [ + { + "typeid": "{72039442-EB38-4D42-A1AD-CB68F7E0EEF6}", + "details": { + "name": "int" + } + } + ] + }, + { + "base": "Iterate_VM", + "context": "{7AB203ED-4DE1-5DB6-AE1F-23E8D6104EE5}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Iterate_VM" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Iterate_VM is invoked" + }, + "details": { + "name": "Iterate_VM" + }, + "params": [ + { + "typeid": "{7AB203ED-4DE1-5DB6-AE1F-23E8D6104EE5}", + "details": { + "name": "AZStd::unordered_map" + } + } + ], + "results": [ + { + "typeid": "{368D4266-05A6-56E2-A6B3-973070BF5207}", + "details": { + "name": "Iterator_VM, AZStd::equal_to, allocator>>" + } + } + ] + }, + { + "base": "GetKeys", + "context": "{7AB203ED-4DE1-5DB6-AE1F-23E8D6104EE5}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke GetKeys" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after GetKeys is invoked" + }, + "details": { + "name": "GetKeys" + }, + "params": [ + { + "typeid": "{7AB203ED-4DE1-5DB6-AE1F-23E8D6104EE5}", + "details": { + "name": "AZStd::unordered_map" + } + } + ], + "results": [ + { + "typeid": "{F31F64EA-E384-5536-ACD6-8F01849730FC}", + "details": { + "name": "AZStd::vector" + } + } + ] + }, + { + "base": "Size", + "context": "{7AB203ED-4DE1-5DB6-AE1F-23E8D6104EE5}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Size" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Size is invoked" + }, + "details": { + "name": "Size" + }, + "params": [ + { + "typeid": "{7AB203ED-4DE1-5DB6-AE1F-23E8D6104EE5}", + "details": { + "name": "AZStd::unordered_map" + } + } + ], + "results": [ + { + "typeid": "{72039442-EB38-4D42-A1AD-CB68F7E0EEF6}", + "details": { + "name": "int" + } + } + ] + }, + { + "base": "Erase", + "context": "{7AB203ED-4DE1-5DB6-AE1F-23E8D6104EE5}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Erase" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Erase is invoked" + }, + "details": { + "name": "Erase" + }, + "params": [ + { + "typeid": "{7AB203ED-4DE1-5DB6-AE1F-23E8D6104EE5}", + "details": { + "name": "AZStd::unordered_map" + } + }, + { + "typeid": "{110C4B14-11A8-4E9D-8638-5051013A56AC}", + "details": { + "name": "double" + } + } + ], + "results": [ + { + "typeid": "{7AB203ED-4DE1-5DB6-AE1F-23E8D6104EE5}", + "details": { + "name": "AZStd::unordered_map" + } + } + ] + }, + { + "base": "EraseCheck_VM", + "context": "{7AB203ED-4DE1-5DB6-AE1F-23E8D6104EE5}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke EraseCheck_VM" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after EraseCheck_VM is invoked" + }, + "details": { + "name": "EraseCheck_VM" + }, + "params": [ + { + "typeid": "{7AB203ED-4DE1-5DB6-AE1F-23E8D6104EE5}", + "details": { + "name": "AZStd::unordered_map" + } + }, + { + "typeid": "{110C4B14-11A8-4E9D-8638-5051013A56AC}", + "details": { + "name": "double" + } + } + ], + "results": [ + { + "typeid": "{A0CA880C-AFE4-43CB-926C-59AC48496112}", + "details": { + "name": "bool" + } + } + ] + }, + { + "base": "Clear", + "context": "{7AB203ED-4DE1-5DB6-AE1F-23E8D6104EE5}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Clear" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Clear is invoked" + }, + "details": { + "name": "Clear" + }, + "params": [ + { + "typeid": "{7AB203ED-4DE1-5DB6-AE1F-23E8D6104EE5}", + "details": { + "name": "AZStd::unordered_map" + } + } + ], + "results": [ + { + "typeid": "{7AB203ED-4DE1-5DB6-AE1F-23E8D6104EE5}", + "details": { + "name": "AZStd::unordered_map" + } + } + ] + }, + { + "base": "At", + "context": "{7AB203ED-4DE1-5DB6-AE1F-23E8D6104EE5}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke At" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after At is invoked" + }, + "details": { + "name": "At" + }, + "params": [ + { + "typeid": "{7AB203ED-4DE1-5DB6-AE1F-23E8D6104EE5}", + "details": { + "name": "AZStd::unordered_map" + } + }, + { + "typeid": "{110C4B14-11A8-4E9D-8638-5051013A56AC}", + "details": { + "name": "double" + } + } + ], + "results": [ + { + "typeid": "{5D9958E9-9F1E-4985-B532-FFFDE75FEDFD}", + "details": { + "name": "Transform" + } + } + ] + }, + { + "base": "BucketCount", + "context": "{7AB203ED-4DE1-5DB6-AE1F-23E8D6104EE5}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke BucketCount" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after BucketCount is invoked" + }, + "details": { + "name": "BucketCount" + }, + "params": [ + { + "typeid": "{7AB203ED-4DE1-5DB6-AE1F-23E8D6104EE5}", + "details": { + "name": "AZStd::unordered_map" + } + } + ], + "results": [ + { + "typeid": "{D6597933-47CD-4FC8-B911-63F3E2B0993A}", + "details": { + "name": "AZ::u64" + } + } + ] + }, + { + "base": "Empty", + "context": "{7AB203ED-4DE1-5DB6-AE1F-23E8D6104EE5}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Empty" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Empty is invoked" + }, + "details": { + "name": "Empty" + }, + "params": [ + { + "typeid": "{7AB203ED-4DE1-5DB6-AE1F-23E8D6104EE5}", + "details": { + "name": "AZStd::unordered_map" + } + } + ], + "results": [ + { + "typeid": "{A0CA880C-AFE4-43CB-926C-59AC48496112}", + "details": { + "name": "bool" + } + } + ] + }, + { + "base": "Swap", + "context": "{7AB203ED-4DE1-5DB6-AE1F-23E8D6104EE5}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Swap" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Swap is invoked" + }, + "details": { + "name": "Swap" + }, + "params": [ + { + "typeid": "{7AB203ED-4DE1-5DB6-AE1F-23E8D6104EE5}", + "details": { + "name": "AZStd::unordered_map" + } + }, + { + "typeid": "{7AB203ED-4DE1-5DB6-AE1F-23E8D6104EE5}", + "details": { + "name": "AZStd::unordered_map" + } + } + ] + } + ] + }, + { + "base": "{E3FCF041-81CA-5782-9530-CC7793B53765}", + "context": "OnDemandReflected", + "variant": "", + "details": { + "name": "Map", + "category": "Map", + "tooltip": "A collection of Key/Value pairs, where each Key value must be unique." + }, + "methods": [ + { + "base": "contains", + "context": "{E3FCF041-81CA-5782-9530-CC7793B53765}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke contains" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after contains is invoked" + }, + "details": { + "name": "contains" + }, + "params": [ + { + "typeid": "{E3FCF041-81CA-5782-9530-CC7793B53765}", + "details": { + "name": "AZStd::unordered_map" + } + }, + { + "typeid": "{03AAAB3F-5C47-5A66-9EBC-D5FA4DB353C9}", + "details": { + "name": "AZStd::string" + } + } + ], + "results": [ + { + "typeid": "{A0CA880C-AFE4-43CB-926C-59AC48496112}", + "details": { + "name": "bool" + } + } + ] + }, + { + "base": "Insert", + "context": "{E3FCF041-81CA-5782-9530-CC7793B53765}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Insert" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Insert is invoked" + }, + "details": { + "name": "Insert" + }, + "params": [ + { + "typeid": "{E3FCF041-81CA-5782-9530-CC7793B53765}", + "details": { + "name": "AZStd::unordered_map" + } + }, + { + "typeid": "{03AAAB3F-5C47-5A66-9EBC-D5FA4DB353C9}", + "details": { + "name": "AZStd::string" + } + }, + { + "typeid": "{157193C7-B673-4A2B-8B43-5681DCC3DEC3}", + "details": { + "name": "Matrix4x4" + } + } + ], + "results": [ + { + "typeid": "{E3FCF041-81CA-5782-9530-CC7793B53765}", + "details": { + "name": "AZStd::unordered_map" + } + } + ] + }, + { + "base": "Reserve", + "context": "{E3FCF041-81CA-5782-9530-CC7793B53765}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Reserve" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Reserve is invoked" + }, + "details": { + "name": "Reserve" + }, + "params": [ + { + "typeid": "{E3FCF041-81CA-5782-9530-CC7793B53765}", + "details": { + "name": "AZStd::unordered_map" + } + }, + { + "typeid": "{D6597933-47CD-4FC8-B911-63F3E2B0993A}", + "details": { + "name": "AZ::u64" + } + } + ] + }, + { + "base": "GetSize", + "context": "{E3FCF041-81CA-5782-9530-CC7793B53765}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke GetSize" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after GetSize is invoked" + }, + "details": { + "name": "GetSize" + }, + "params": [ + { + "typeid": "{E3FCF041-81CA-5782-9530-CC7793B53765}", + "details": { + "name": "AZStd::unordered_map" + } + } + ], + "results": [ + { + "typeid": "{72039442-EB38-4D42-A1AD-CB68F7E0EEF6}", + "details": { + "name": "int" + } + } + ] + }, + { + "base": "Iterate_VM", + "context": "{E3FCF041-81CA-5782-9530-CC7793B53765}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Iterate_VM" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Iterate_VM is invoked" + }, + "details": { + "name": "Iterate_VM" + }, + "params": [ + { + "typeid": "{E3FCF041-81CA-5782-9530-CC7793B53765}", + "details": { + "name": "AZStd::unordered_map" + } + } + ], + "results": [ + { + "typeid": "{7AD414B0-77AF-5238-B381-C89649D37EE7}", + "details": { + "name": "Iterator_VM, allocator>, Matrix4x4, AZStd::hash", + "category": "Map", + "tooltip": "A collection of Key/Value pairs, where each Key value must be unique." + }, + "methods": [ + { + "base": "contains", + "context": "{DA54CF57-7BE3-59DF-A5B0-F4CA6D9CC01A}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke contains" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after contains is invoked" + }, + "details": { + "name": "contains" + }, + "params": [ + { + "typeid": "{DA54CF57-7BE3-59DF-A5B0-F4CA6D9CC01A}", + "details": { + "name": "AZStd::unordered_map" + } + }, + { + "typeid": "{110C4B14-11A8-4E9D-8638-5051013A56AC}", + "details": { + "name": "double" + } + } + ], + "results": [ + { + "typeid": "{A0CA880C-AFE4-43CB-926C-59AC48496112}", + "details": { + "name": "bool" + } + } + ] + }, + { + "base": "Insert", + "context": "{DA54CF57-7BE3-59DF-A5B0-F4CA6D9CC01A}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Insert" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Insert is invoked" + }, + "details": { + "name": "Insert" + }, + "params": [ + { + "typeid": "{DA54CF57-7BE3-59DF-A5B0-F4CA6D9CC01A}", + "details": { + "name": "AZStd::unordered_map" + } + }, + { + "typeid": "{110C4B14-11A8-4E9D-8638-5051013A56AC}", + "details": { + "name": "double" + } + }, + { + "typeid": "{004ABD25-CF14-4EB3-BD41-022C247C07FA}", + "details": { + "name": "Obb" + } + } + ], + "results": [ + { + "typeid": "{DA54CF57-7BE3-59DF-A5B0-F4CA6D9CC01A}", + "details": { + "name": "AZStd::unordered_map" + } + } + ] + }, + { + "base": "Reserve", + "context": "{DA54CF57-7BE3-59DF-A5B0-F4CA6D9CC01A}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Reserve" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Reserve is invoked" + }, + "details": { + "name": "Reserve" + }, + "params": [ + { + "typeid": "{DA54CF57-7BE3-59DF-A5B0-F4CA6D9CC01A}", + "details": { + "name": "AZStd::unordered_map" + } + }, + { + "typeid": "{D6597933-47CD-4FC8-B911-63F3E2B0993A}", + "details": { + "name": "AZ::u64" + } + } + ] + }, + { + "base": "GetSize", + "context": "{DA54CF57-7BE3-59DF-A5B0-F4CA6D9CC01A}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke GetSize" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after GetSize is invoked" + }, + "details": { + "name": "GetSize" + }, + "params": [ + { + "typeid": "{DA54CF57-7BE3-59DF-A5B0-F4CA6D9CC01A}", + "details": { + "name": "AZStd::unordered_map" + } + } + ], + "results": [ + { + "typeid": "{72039442-EB38-4D42-A1AD-CB68F7E0EEF6}", + "details": { + "name": "int" + } + } + ] + }, + { + "base": "Iterate_VM", + "context": "{DA54CF57-7BE3-59DF-A5B0-F4CA6D9CC01A}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Iterate_VM" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Iterate_VM is invoked" + }, + "details": { + "name": "Iterate_VM" + }, + "params": [ + { + "typeid": "{DA54CF57-7BE3-59DF-A5B0-F4CA6D9CC01A}", + "details": { + "name": "AZStd::unordered_map" + } + } + ], + "results": [ + { + "typeid": "{DBA3F593-3864-5194-8121-A03AFD79A8D6}", + "details": { + "name": "Iterator_VM, AZStd::equal_to, allocator>>" + } + } + ] + }, + { + "base": "GetKeys", + "context": "{DA54CF57-7BE3-59DF-A5B0-F4CA6D9CC01A}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke GetKeys" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after GetKeys is invoked" + }, + "details": { + "name": "GetKeys" + }, + "params": [ + { + "typeid": "{DA54CF57-7BE3-59DF-A5B0-F4CA6D9CC01A}", + "details": { + "name": "AZStd::unordered_map" + } + } + ], + "results": [ + { + "typeid": "{F31F64EA-E384-5536-ACD6-8F01849730FC}", + "details": { + "name": "AZStd::vector" + } + } + ] + }, + { + "base": "Size", + "context": "{DA54CF57-7BE3-59DF-A5B0-F4CA6D9CC01A}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Size" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Size is invoked" + }, + "details": { + "name": "Size" + }, + "params": [ + { + "typeid": "{DA54CF57-7BE3-59DF-A5B0-F4CA6D9CC01A}", + "details": { + "name": "AZStd::unordered_map" + } + } + ], + "results": [ + { + "typeid": "{72039442-EB38-4D42-A1AD-CB68F7E0EEF6}", + "details": { + "name": "int" + } + } + ] + }, + { + "base": "Erase", + "context": "{DA54CF57-7BE3-59DF-A5B0-F4CA6D9CC01A}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Erase" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Erase is invoked" + }, + "details": { + "name": "Erase" + }, + "params": [ + { + "typeid": "{DA54CF57-7BE3-59DF-A5B0-F4CA6D9CC01A}", + "details": { + "name": "AZStd::unordered_map" + } + }, + { + "typeid": "{110C4B14-11A8-4E9D-8638-5051013A56AC}", + "details": { + "name": "double" + } + } + ], + "results": [ + { + "typeid": "{DA54CF57-7BE3-59DF-A5B0-F4CA6D9CC01A}", + "details": { + "name": "AZStd::unordered_map" + } + } + ] + }, + { + "base": "EraseCheck_VM", + "context": "{DA54CF57-7BE3-59DF-A5B0-F4CA6D9CC01A}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke EraseCheck_VM" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after EraseCheck_VM is invoked" + }, + "details": { + "name": "EraseCheck_VM" + }, + "params": [ + { + "typeid": "{DA54CF57-7BE3-59DF-A5B0-F4CA6D9CC01A}", + "details": { + "name": "AZStd::unordered_map" + } + }, + { + "typeid": "{110C4B14-11A8-4E9D-8638-5051013A56AC}", + "details": { + "name": "double" + } + } + ], + "results": [ + { + "typeid": "{A0CA880C-AFE4-43CB-926C-59AC48496112}", + "details": { + "name": "bool" + } + } + ] + }, + { + "base": "Clear", + "context": "{DA54CF57-7BE3-59DF-A5B0-F4CA6D9CC01A}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Clear" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Clear is invoked" + }, + "details": { + "name": "Clear" + }, + "params": [ + { + "typeid": "{DA54CF57-7BE3-59DF-A5B0-F4CA6D9CC01A}", + "details": { + "name": "AZStd::unordered_map" + } + } + ], + "results": [ + { + "typeid": "{DA54CF57-7BE3-59DF-A5B0-F4CA6D9CC01A}", + "details": { + "name": "AZStd::unordered_map" + } + } + ] + }, + { + "base": "At", + "context": "{DA54CF57-7BE3-59DF-A5B0-F4CA6D9CC01A}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke At" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after At is invoked" + }, + "details": { + "name": "At" + }, + "params": [ + { + "typeid": "{DA54CF57-7BE3-59DF-A5B0-F4CA6D9CC01A}", + "details": { + "name": "AZStd::unordered_map" + } + }, + { + "typeid": "{110C4B14-11A8-4E9D-8638-5051013A56AC}", + "details": { + "name": "double" + } + } + ], + "results": [ + { + "typeid": "{004ABD25-CF14-4EB3-BD41-022C247C07FA}", + "details": { + "name": "Obb" + } + } + ] + }, + { + "base": "BucketCount", + "context": "{DA54CF57-7BE3-59DF-A5B0-F4CA6D9CC01A}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke BucketCount" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after BucketCount is invoked" + }, + "details": { + "name": "BucketCount" + }, + "params": [ + { + "typeid": "{DA54CF57-7BE3-59DF-A5B0-F4CA6D9CC01A}", + "details": { + "name": "AZStd::unordered_map" + } + } + ], + "results": [ + { + "typeid": "{D6597933-47CD-4FC8-B911-63F3E2B0993A}", + "details": { + "name": "AZ::u64" + } + } + ] + }, + { + "base": "Empty", + "context": "{DA54CF57-7BE3-59DF-A5B0-F4CA6D9CC01A}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Empty" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Empty is invoked" + }, + "details": { + "name": "Empty" + }, + "params": [ + { + "typeid": "{DA54CF57-7BE3-59DF-A5B0-F4CA6D9CC01A}", + "details": { + "name": "AZStd::unordered_map" + } + } + ], + "results": [ + { + "typeid": "{A0CA880C-AFE4-43CB-926C-59AC48496112}", + "details": { + "name": "bool" + } + } + ] + }, + { + "base": "Swap", + "context": "{DA54CF57-7BE3-59DF-A5B0-F4CA6D9CC01A}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Swap" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Swap is invoked" + }, + "details": { + "name": "Swap" + }, + "params": [ + { + "typeid": "{DA54CF57-7BE3-59DF-A5B0-F4CA6D9CC01A}", + "details": { + "name": "AZStd::unordered_map" + } + }, + { + "typeid": "{DA54CF57-7BE3-59DF-A5B0-F4CA6D9CC01A}", + "details": { + "name": "AZStd::unordered_map" + } + } + ] + } + ] + }, + { + "base": "{246A60D1-4DC3-57A5-BABA-214581F3B4FE}", + "context": "OnDemandReflected", + "variant": "", + "details": { + "name": "Map", + "category": "Map", + "tooltip": "A collection of Key/Value pairs, where each Key value must be unique." + }, + "methods": [ + { + "base": "contains", + "context": "{246A60D1-4DC3-57A5-BABA-214581F3B4FE}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke contains" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after contains is invoked" + }, + "details": { + "name": "contains" + }, + "params": [ + { + "typeid": "{246A60D1-4DC3-57A5-BABA-214581F3B4FE}", + "details": { + "name": "AZStd::unordered_map" + } + }, + { + "typeid": "{110C4B14-11A8-4E9D-8638-5051013A56AC}", + "details": { + "name": "double" + } + } + ], + "results": [ + { + "typeid": "{A0CA880C-AFE4-43CB-926C-59AC48496112}", + "details": { + "name": "bool" + } + } + ] + }, + { + "base": "Insert", + "context": "{246A60D1-4DC3-57A5-BABA-214581F3B4FE}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Insert" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Insert is invoked" + }, + "details": { + "name": "Insert" + }, + "params": [ + { + "typeid": "{246A60D1-4DC3-57A5-BABA-214581F3B4FE}", + "details": { + "name": "AZStd::unordered_map" + } + }, + { + "typeid": "{110C4B14-11A8-4E9D-8638-5051013A56AC}", + "details": { + "name": "double" + } + }, + { + "typeid": "{A54C2B36-D5B8-46A1-A529-4EBDBD2450E7}", + "details": { + "name": "Aabb" + } + } + ], + "results": [ + { + "typeid": "{246A60D1-4DC3-57A5-BABA-214581F3B4FE}", + "details": { + "name": "AZStd::unordered_map" + } + } + ] + }, + { + "base": "Reserve", + "context": "{246A60D1-4DC3-57A5-BABA-214581F3B4FE}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Reserve" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Reserve is invoked" + }, + "details": { + "name": "Reserve" + }, + "params": [ + { + "typeid": "{246A60D1-4DC3-57A5-BABA-214581F3B4FE}", + "details": { + "name": "AZStd::unordered_map" + } + }, + { + "typeid": "{D6597933-47CD-4FC8-B911-63F3E2B0993A}", + "details": { + "name": "AZ::u64" + } + } + ] + }, + { + "base": "GetSize", + "context": "{246A60D1-4DC3-57A5-BABA-214581F3B4FE}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke GetSize" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after GetSize is invoked" + }, + "details": { + "name": "GetSize" + }, + "params": [ + { + "typeid": "{246A60D1-4DC3-57A5-BABA-214581F3B4FE}", + "details": { + "name": "AZStd::unordered_map" + } + } + ], + "results": [ + { + "typeid": "{72039442-EB38-4D42-A1AD-CB68F7E0EEF6}", + "details": { + "name": "int" + } + } + ] + }, + { + "base": "Iterate_VM", + "context": "{246A60D1-4DC3-57A5-BABA-214581F3B4FE}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Iterate_VM" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Iterate_VM is invoked" + }, + "details": { + "name": "Iterate_VM" + }, + "params": [ + { + "typeid": "{246A60D1-4DC3-57A5-BABA-214581F3B4FE}", + "details": { + "name": "AZStd::unordered_map" + } + } + ], + "results": [ + { + "typeid": "{3A151DD7-F7B3-5FC1-9094-B5E8C5782CFE}", + "details": { + "name": "Iterator_VM, AZStd::equal_to, allocator>>" + } + } + ] + }, + { + "base": "GetKeys", + "context": "{246A60D1-4DC3-57A5-BABA-214581F3B4FE}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke GetKeys" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after GetKeys is invoked" + }, + "details": { + "name": "GetKeys" + }, + "params": [ + { + "typeid": "{246A60D1-4DC3-57A5-BABA-214581F3B4FE}", + "details": { + "name": "AZStd::unordered_map" + } + } + ], + "results": [ + { + "typeid": "{F31F64EA-E384-5536-ACD6-8F01849730FC}", + "details": { + "name": "AZStd::vector" + } + } + ] + }, + { + "base": "Size", + "context": "{246A60D1-4DC3-57A5-BABA-214581F3B4FE}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Size" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Size is invoked" + }, + "details": { + "name": "Size" + }, + "params": [ + { + "typeid": "{246A60D1-4DC3-57A5-BABA-214581F3B4FE}", + "details": { + "name": "AZStd::unordered_map" + } + } + ], + "results": [ + { + "typeid": "{72039442-EB38-4D42-A1AD-CB68F7E0EEF6}", + "details": { + "name": "int" + } + } + ] + }, + { + "base": "Erase", + "context": "{246A60D1-4DC3-57A5-BABA-214581F3B4FE}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Erase" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Erase is invoked" + }, + "details": { + "name": "Erase" + }, + "params": [ + { + "typeid": "{246A60D1-4DC3-57A5-BABA-214581F3B4FE}", + "details": { + "name": "AZStd::unordered_map" + } + }, + { + "typeid": "{110C4B14-11A8-4E9D-8638-5051013A56AC}", + "details": { + "name": "double" + } + } + ], + "results": [ + { + "typeid": "{246A60D1-4DC3-57A5-BABA-214581F3B4FE}", + "details": { + "name": "AZStd::unordered_map" + } + } + ] + }, + { + "base": "EraseCheck_VM", + "context": "{246A60D1-4DC3-57A5-BABA-214581F3B4FE}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke EraseCheck_VM" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after EraseCheck_VM is invoked" + }, + "details": { + "name": "EraseCheck_VM" + }, + "params": [ + { + "typeid": "{246A60D1-4DC3-57A5-BABA-214581F3B4FE}", + "details": { + "name": "AZStd::unordered_map" + } + }, + { + "typeid": "{110C4B14-11A8-4E9D-8638-5051013A56AC}", + "details": { + "name": "double" + } + } + ], + "results": [ + { + "typeid": "{A0CA880C-AFE4-43CB-926C-59AC48496112}", + "details": { + "name": "bool" + } + } + ] + }, + { + "base": "Clear", + "context": "{246A60D1-4DC3-57A5-BABA-214581F3B4FE}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Clear" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Clear is invoked" + }, + "details": { + "name": "Clear" + }, + "params": [ + { + "typeid": "{246A60D1-4DC3-57A5-BABA-214581F3B4FE}", + "details": { + "name": "AZStd::unordered_map" + } + } + ], + "results": [ + { + "typeid": "{246A60D1-4DC3-57A5-BABA-214581F3B4FE}", + "details": { + "name": "AZStd::unordered_map" + } + } + ] + }, + { + "base": "At", + "context": "{246A60D1-4DC3-57A5-BABA-214581F3B4FE}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke At" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after At is invoked" + }, + "details": { + "name": "At" + }, + "params": [ + { + "typeid": "{246A60D1-4DC3-57A5-BABA-214581F3B4FE}", + "details": { + "name": "AZStd::unordered_map" + } + }, + { + "typeid": "{110C4B14-11A8-4E9D-8638-5051013A56AC}", + "details": { + "name": "double" + } + } + ], + "results": [ + { + "typeid": "{A54C2B36-D5B8-46A1-A529-4EBDBD2450E7}", + "details": { + "name": "Aabb" + } + } + ] + }, + { + "base": "BucketCount", + "context": "{246A60D1-4DC3-57A5-BABA-214581F3B4FE}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke BucketCount" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after BucketCount is invoked" + }, + "details": { + "name": "BucketCount" + }, + "params": [ + { + "typeid": "{246A60D1-4DC3-57A5-BABA-214581F3B4FE}", + "details": { + "name": "AZStd::unordered_map" + } + } + ], + "results": [ + { + "typeid": "{D6597933-47CD-4FC8-B911-63F3E2B0993A}", + "details": { + "name": "AZ::u64" + } + } + ] + }, + { + "base": "Empty", + "context": "{246A60D1-4DC3-57A5-BABA-214581F3B4FE}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Empty" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Empty is invoked" + }, + "details": { + "name": "Empty" + }, + "params": [ + { + "typeid": "{246A60D1-4DC3-57A5-BABA-214581F3B4FE}", + "details": { + "name": "AZStd::unordered_map" + } + } + ], + "results": [ + { + "typeid": "{A0CA880C-AFE4-43CB-926C-59AC48496112}", + "details": { + "name": "bool" + } + } + ] + }, + { + "base": "Swap", + "context": "{246A60D1-4DC3-57A5-BABA-214581F3B4FE}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Swap" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Swap is invoked" + }, + "details": { + "name": "Swap" + }, + "params": [ + { + "typeid": "{246A60D1-4DC3-57A5-BABA-214581F3B4FE}", + "details": { + "name": "AZStd::unordered_map" + } + }, + { + "typeid": "{246A60D1-4DC3-57A5-BABA-214581F3B4FE}", + "details": { + "name": "AZStd::unordered_map" + } + } + ] + } + ] + }, + { + "base": "{73383C40-9632-58AB-9CFE-E90C89E1C612}", + "context": "OnDemandReflected", + "variant": "", + "details": { + "name": "Map", + "category": "Map", + "tooltip": "A collection of Key/Value pairs, where each Key value must be unique." + }, + "methods": [ + { + "base": "contains", + "context": "{73383C40-9632-58AB-9CFE-E90C89E1C612}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke contains" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after contains is invoked" + }, + "details": { + "name": "contains" + }, + "params": [ + { + "typeid": "{73383C40-9632-58AB-9CFE-E90C89E1C612}", + "details": { + "name": "AZStd::unordered_map" + } + }, + { + "typeid": "{652ED536-3402-439B-AEBE-4A5DBC554085}", + "details": { + "name": "AssetId" + } + } + ], + "results": [ + { + "typeid": "{A0CA880C-AFE4-43CB-926C-59AC48496112}", + "details": { + "name": "bool" + } + } + ] + }, + { + "base": "Insert", + "context": "{73383C40-9632-58AB-9CFE-E90C89E1C612}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Insert" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Insert is invoked" + }, + "details": { + "name": "Insert" + }, + "params": [ + { + "typeid": "{73383C40-9632-58AB-9CFE-E90C89E1C612}", + "details": { + "name": "AZStd::unordered_map" + } + }, + { + "typeid": "{652ED536-3402-439B-AEBE-4A5DBC554085}", + "details": { + "name": "AssetId" + } + }, + { + "typeid": "{03AAAB3F-5C47-5A66-9EBC-D5FA4DB353C9}", + "details": { + "name": "AZStd::string" + } + } + ], + "results": [ + { + "typeid": "{73383C40-9632-58AB-9CFE-E90C89E1C612}", + "details": { + "name": "AZStd::unordered_map" + } + } + ] + }, + { + "base": "Reserve", + "context": "{73383C40-9632-58AB-9CFE-E90C89E1C612}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Reserve" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Reserve is invoked" + }, + "details": { + "name": "Reserve" + }, + "params": [ + { + "typeid": "{73383C40-9632-58AB-9CFE-E90C89E1C612}", + "details": { + "name": "AZStd::unordered_map" + } + }, + { + "typeid": "{D6597933-47CD-4FC8-B911-63F3E2B0993A}", + "details": { + "name": "AZ::u64" + } + } + ] + }, + { + "base": "GetSize", + "context": "{73383C40-9632-58AB-9CFE-E90C89E1C612}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke GetSize" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after GetSize is invoked" + }, + "details": { + "name": "GetSize" + }, + "params": [ + { + "typeid": "{73383C40-9632-58AB-9CFE-E90C89E1C612}", + "details": { + "name": "AZStd::unordered_map" + } + } + ], + "results": [ + { + "typeid": "{72039442-EB38-4D42-A1AD-CB68F7E0EEF6}", + "details": { + "name": "int" + } + } + ] + }, + { + "base": "Iterate_VM", + "context": "{73383C40-9632-58AB-9CFE-E90C89E1C612}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Iterate_VM" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Iterate_VM is invoked" + }, + "details": { + "name": "Iterate_VM" + }, + "params": [ + { + "typeid": "{73383C40-9632-58AB-9CFE-E90C89E1C612}", + "details": { + "name": "AZStd::unordered_map" + } + } + ], + "results": [ + { + "typeid": "{94456F04-E3B1-5ADC-8949-9F200A4F0DDC}", + "details": { + "name": "Iterator_VM, allocator>, AZStd::hash," + } + } + ] + }, + { + "base": "GetKeys", + "context": "{73383C40-9632-58AB-9CFE-E90C89E1C612}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke GetKeys" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after GetKeys is invoked" + }, + "details": { + "name": "GetKeys" + }, + "params": [ + { + "typeid": "{73383C40-9632-58AB-9CFE-E90C89E1C612}", + "details": { + "name": "AZStd::unordered_map" + } + } + ], + "results": [ + { + "typeid": "{877C4A33-39B5-51D7-948D-F97DB81372A1}", + "details": { + "name": "AZStd::vector" + } + } + ] + }, + { + "base": "Size", + "context": "{73383C40-9632-58AB-9CFE-E90C89E1C612}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Size" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Size is invoked" + }, + "details": { + "name": "Size" + }, + "params": [ + { + "typeid": "{73383C40-9632-58AB-9CFE-E90C89E1C612}", + "details": { + "name": "AZStd::unordered_map" + } + } + ], + "results": [ + { + "typeid": "{72039442-EB38-4D42-A1AD-CB68F7E0EEF6}", + "details": { + "name": "int" + } + } + ] + }, + { + "base": "Erase", + "context": "{73383C40-9632-58AB-9CFE-E90C89E1C612}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Erase" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Erase is invoked" + }, + "details": { + "name": "Erase" + }, + "params": [ + { + "typeid": "{73383C40-9632-58AB-9CFE-E90C89E1C612}", + "details": { + "name": "AZStd::unordered_map" + } + }, + { + "typeid": "{652ED536-3402-439B-AEBE-4A5DBC554085}", + "details": { + "name": "AssetId" + } + } + ], + "results": [ + { + "typeid": "{73383C40-9632-58AB-9CFE-E90C89E1C612}", + "details": { + "name": "AZStd::unordered_map" + } + } + ] + }, + { + "base": "EraseCheck_VM", + "context": "{73383C40-9632-58AB-9CFE-E90C89E1C612}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke EraseCheck_VM" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after EraseCheck_VM is invoked" + }, + "details": { + "name": "EraseCheck_VM" + }, + "params": [ + { + "typeid": "{73383C40-9632-58AB-9CFE-E90C89E1C612}", + "details": { + "name": "AZStd::unordered_map" + } + }, + { + "typeid": "{652ED536-3402-439B-AEBE-4A5DBC554085}", + "details": { + "name": "AssetId" + } + } + ], + "results": [ + { + "typeid": "{A0CA880C-AFE4-43CB-926C-59AC48496112}", + "details": { + "name": "bool" + } + } + ] + }, + { + "base": "Clear", + "context": "{73383C40-9632-58AB-9CFE-E90C89E1C612}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Clear" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Clear is invoked" + }, + "details": { + "name": "Clear" + }, + "params": [ + { + "typeid": "{73383C40-9632-58AB-9CFE-E90C89E1C612}", + "details": { + "name": "AZStd::unordered_map" + } + } + ], + "results": [ + { + "typeid": "{73383C40-9632-58AB-9CFE-E90C89E1C612}", + "details": { + "name": "AZStd::unordered_map" + } + } + ] + }, + { + "base": "At", + "context": "{73383C40-9632-58AB-9CFE-E90C89E1C612}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke At" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after At is invoked" + }, + "details": { + "name": "At" + }, + "params": [ + { + "typeid": "{73383C40-9632-58AB-9CFE-E90C89E1C612}", + "details": { + "name": "AZStd::unordered_map" + } + }, + { + "typeid": "{652ED536-3402-439B-AEBE-4A5DBC554085}", + "details": { + "name": "AssetId" + } + } + ], + "results": [ + { + "typeid": "{03AAAB3F-5C47-5A66-9EBC-D5FA4DB353C9}", + "details": { + "name": "AZStd::string" + } + } + ] + }, + { + "base": "BucketCount", + "context": "{73383C40-9632-58AB-9CFE-E90C89E1C612}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke BucketCount" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after BucketCount is invoked" + }, + "details": { + "name": "BucketCount" + }, + "params": [ + { + "typeid": "{73383C40-9632-58AB-9CFE-E90C89E1C612}", + "details": { + "name": "AZStd::unordered_map" + } + } + ], + "results": [ + { + "typeid": "{D6597933-47CD-4FC8-B911-63F3E2B0993A}", + "details": { + "name": "AZ::u64" + } + } + ] + }, + { + "base": "Empty", + "context": "{73383C40-9632-58AB-9CFE-E90C89E1C612}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Empty" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Empty is invoked" + }, + "details": { + "name": "Empty" + }, + "params": [ + { + "typeid": "{73383C40-9632-58AB-9CFE-E90C89E1C612}", + "details": { + "name": "AZStd::unordered_map" + } + } + ], + "results": [ + { + "typeid": "{A0CA880C-AFE4-43CB-926C-59AC48496112}", + "details": { + "name": "bool" + } + } + ] + }, + { + "base": "Swap", + "context": "{73383C40-9632-58AB-9CFE-E90C89E1C612}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Swap" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Swap is invoked" + }, + "details": { + "name": "Swap" + }, + "params": [ + { + "typeid": "{73383C40-9632-58AB-9CFE-E90C89E1C612}", + "details": { + "name": "AZStd::unordered_map" + } + }, + { + "typeid": "{73383C40-9632-58AB-9CFE-E90C89E1C612}", + "details": { + "name": "AZStd::unordered_map" + } + } + ] + } + ] + }, + { + "base": "{F9AFBC85-749B-5A76-8E09-6B734D234C90}", + "context": "OnDemandReflected", + "variant": "", + "details": { + "name": "Map", + "category": "Map", + "tooltip": "A collection of Key/Value pairs, where each Key value must be unique." + }, + "methods": [ + { + "base": "contains", + "context": "{F9AFBC85-749B-5A76-8E09-6B734D234C90}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke contains" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after contains is invoked" + }, + "details": { + "name": "contains" + }, + "params": [ + { + "typeid": "{F9AFBC85-749B-5A76-8E09-6B734D234C90}", + "details": { + "name": "AZStd::unordered_map" + } + }, + { + "typeid": "{6383F1D3-BB27-4E6B-A49A-6409B2059EAA}", + "details": { + "name": "EntityId", + "tooltip": "Entity Unique Id" + } + } + ], + "results": [ + { + "typeid": "{A0CA880C-AFE4-43CB-926C-59AC48496112}", + "details": { + "name": "bool" + } + } + ] + }, + { + "base": "Insert", + "context": "{F9AFBC85-749B-5A76-8E09-6B734D234C90}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Insert" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Insert is invoked" + }, + "details": { + "name": "Insert" + }, + "params": [ + { + "typeid": "{F9AFBC85-749B-5A76-8E09-6B734D234C90}", + "details": { + "name": "AZStd::unordered_map" + } + }, + { + "typeid": "{6383F1D3-BB27-4E6B-A49A-6409B2059EAA}", + "details": { + "name": "EntityId", + "tooltip": "Entity Unique Id" + } + }, + { + "typeid": "{8379EB7D-01FA-4538-B64B-A6543B4BE73D}", + "details": { + "name": "Vector3" + } + } + ], + "results": [ + { + "typeid": "{F9AFBC85-749B-5A76-8E09-6B734D234C90}", + "details": { + "name": "AZStd::unordered_map" + } + } + ] + }, + { + "base": "Reserve", + "context": "{F9AFBC85-749B-5A76-8E09-6B734D234C90}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Reserve" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Reserve is invoked" + }, + "details": { + "name": "Reserve" + }, + "params": [ + { + "typeid": "{F9AFBC85-749B-5A76-8E09-6B734D234C90}", + "details": { + "name": "AZStd::unordered_map" + } + }, + { + "typeid": "{D6597933-47CD-4FC8-B911-63F3E2B0993A}", + "details": { + "name": "AZ::u64" + } + } + ] + }, + { + "base": "GetSize", + "context": "{F9AFBC85-749B-5A76-8E09-6B734D234C90}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke GetSize" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after GetSize is invoked" + }, + "details": { + "name": "GetSize" + }, + "params": [ + { + "typeid": "{F9AFBC85-749B-5A76-8E09-6B734D234C90}", + "details": { + "name": "AZStd::unordered_map" + } + } + ], + "results": [ + { + "typeid": "{72039442-EB38-4D42-A1AD-CB68F7E0EEF6}", + "details": { + "name": "int" + } + } + ] + }, + { + "base": "Iterate_VM", + "context": "{F9AFBC85-749B-5A76-8E09-6B734D234C90}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Iterate_VM" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Iterate_VM is invoked" + }, + "details": { + "name": "Iterate_VM" + }, + "params": [ + { + "typeid": "{F9AFBC85-749B-5A76-8E09-6B734D234C90}", + "details": { + "name": "AZStd::unordered_map" + } + } + ], + "results": [ + { + "typeid": "{3CE1B0F4-E1D8-5E2E-AE7E-8A8DE250720F}", + "details": { + "name": "Iterator_VM, AZStd::equal_to, allocator>>" + } + } + ] + }, + { + "base": "GetKeys", + "context": "{F9AFBC85-749B-5A76-8E09-6B734D234C90}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke GetKeys" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after GetKeys is invoked" + }, + "details": { + "name": "GetKeys" + }, + "params": [ + { + "typeid": "{F9AFBC85-749B-5A76-8E09-6B734D234C90}", + "details": { + "name": "AZStd::unordered_map" + } + } + ], + "results": [ + { + "typeid": "{4841CFF0-7A5C-519C-BD16-D3625E99605E}", + "details": { + "name": "AZStd::vector" + } + } + ] + }, + { + "base": "Size", + "context": "{F9AFBC85-749B-5A76-8E09-6B734D234C90}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Size" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Size is invoked" + }, + "details": { + "name": "Size" + }, + "params": [ + { + "typeid": "{F9AFBC85-749B-5A76-8E09-6B734D234C90}", + "details": { + "name": "AZStd::unordered_map" + } + } + ], + "results": [ + { + "typeid": "{72039442-EB38-4D42-A1AD-CB68F7E0EEF6}", + "details": { + "name": "int" + } + } + ] + }, + { + "base": "Erase", + "context": "{F9AFBC85-749B-5A76-8E09-6B734D234C90}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Erase" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Erase is invoked" + }, + "details": { + "name": "Erase" + }, + "params": [ + { + "typeid": "{F9AFBC85-749B-5A76-8E09-6B734D234C90}", + "details": { + "name": "AZStd::unordered_map" + } + }, + { + "typeid": "{6383F1D3-BB27-4E6B-A49A-6409B2059EAA}", + "details": { + "name": "EntityId", + "tooltip": "Entity Unique Id" + } + } + ], + "results": [ + { + "typeid": "{F9AFBC85-749B-5A76-8E09-6B734D234C90}", + "details": { + "name": "AZStd::unordered_map" + } + } + ] + }, + { + "base": "EraseCheck_VM", + "context": "{F9AFBC85-749B-5A76-8E09-6B734D234C90}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke EraseCheck_VM" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after EraseCheck_VM is invoked" + }, + "details": { + "name": "EraseCheck_VM" + }, + "params": [ + { + "typeid": "{F9AFBC85-749B-5A76-8E09-6B734D234C90}", + "details": { + "name": "AZStd::unordered_map" + } + }, + { + "typeid": "{6383F1D3-BB27-4E6B-A49A-6409B2059EAA}", + "details": { + "name": "EntityId", + "tooltip": "Entity Unique Id" + } + } + ], + "results": [ + { + "typeid": "{A0CA880C-AFE4-43CB-926C-59AC48496112}", + "details": { + "name": "bool" + } + } + ] + }, + { + "base": "Clear", + "context": "{F9AFBC85-749B-5A76-8E09-6B734D234C90}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Clear" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Clear is invoked" + }, + "details": { + "name": "Clear" + }, + "params": [ + { + "typeid": "{F9AFBC85-749B-5A76-8E09-6B734D234C90}", + "details": { + "name": "AZStd::unordered_map" + } + } + ], + "results": [ + { + "typeid": "{F9AFBC85-749B-5A76-8E09-6B734D234C90}", + "details": { + "name": "AZStd::unordered_map" + } + } + ] + }, + { + "base": "At", + "context": "{F9AFBC85-749B-5A76-8E09-6B734D234C90}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke At" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after At is invoked" + }, + "details": { + "name": "At" + }, + "params": [ + { + "typeid": "{F9AFBC85-749B-5A76-8E09-6B734D234C90}", + "details": { + "name": "AZStd::unordered_map" + } + }, + { + "typeid": "{6383F1D3-BB27-4E6B-A49A-6409B2059EAA}", + "details": { + "name": "EntityId", + "tooltip": "Entity Unique Id" + } + } + ], + "results": [ + { + "typeid": "{8379EB7D-01FA-4538-B64B-A6543B4BE73D}", + "details": { + "name": "Vector3" + } + } + ] + }, + { + "base": "BucketCount", + "context": "{F9AFBC85-749B-5A76-8E09-6B734D234C90}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke BucketCount" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after BucketCount is invoked" + }, + "details": { + "name": "BucketCount" + }, + "params": [ + { + "typeid": "{F9AFBC85-749B-5A76-8E09-6B734D234C90}", + "details": { + "name": "AZStd::unordered_map" + } + } + ], + "results": [ + { + "typeid": "{D6597933-47CD-4FC8-B911-63F3E2B0993A}", + "details": { + "name": "AZ::u64" + } + } + ] + }, + { + "base": "Empty", + "context": "{F9AFBC85-749B-5A76-8E09-6B734D234C90}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Empty" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Empty is invoked" + }, + "details": { + "name": "Empty" + }, + "params": [ + { + "typeid": "{F9AFBC85-749B-5A76-8E09-6B734D234C90}", + "details": { + "name": "AZStd::unordered_map" + } + } + ], + "results": [ + { + "typeid": "{A0CA880C-AFE4-43CB-926C-59AC48496112}", + "details": { + "name": "bool" + } + } + ] + }, + { + "base": "Swap", + "context": "{F9AFBC85-749B-5A76-8E09-6B734D234C90}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Swap" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Swap is invoked" + }, + "details": { + "name": "Swap" + }, + "params": [ + { + "typeid": "{F9AFBC85-749B-5A76-8E09-6B734D234C90}", + "details": { + "name": "AZStd::unordered_map" + } + }, + { + "typeid": "{F9AFBC85-749B-5A76-8E09-6B734D234C90}", + "details": { + "name": "AZStd::unordered_map" + } + } + ] + } + ] + }, + { + "base": "{72FD3E42-33B1-5C20-92BE-20031CE205AC}", + "context": "OnDemandReflected", + "variant": "", + "details": { + "name": "Map", + "category": "Map", + "tooltip": "A collection of Key/Value pairs, where each Key value must be unique." + }, + "methods": [ + { + "base": "contains", + "context": "{72FD3E42-33B1-5C20-92BE-20031CE205AC}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke contains" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after contains is invoked" + }, + "details": { + "name": "contains" + }, + "params": [ + { + "typeid": "{72FD3E42-33B1-5C20-92BE-20031CE205AC}", + "details": { + "name": "AZStd::unordered_map" + } + }, + { + "typeid": "{6383F1D3-BB27-4E6B-A49A-6409B2059EAA}", + "details": { + "name": "EntityId", + "tooltip": "Entity Unique Id" + } + } + ], + "results": [ + { + "typeid": "{A0CA880C-AFE4-43CB-926C-59AC48496112}", + "details": { + "name": "bool" + } + } + ] + }, + { + "base": "Insert", + "context": "{72FD3E42-33B1-5C20-92BE-20031CE205AC}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Insert" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Insert is invoked" + }, + "details": { + "name": "Insert" + }, + "params": [ + { + "typeid": "{72FD3E42-33B1-5C20-92BE-20031CE205AC}", + "details": { + "name": "AZStd::unordered_map" + } + }, + { + "typeid": "{6383F1D3-BB27-4E6B-A49A-6409B2059EAA}", + "details": { + "name": "EntityId", + "tooltip": "Entity Unique Id" + } + }, + { + "typeid": "{847DD984-9DBF-4789-8E25-E0334402E8AD}", + "details": { + "name": "Plane" + } + } + ], + "results": [ + { + "typeid": "{72FD3E42-33B1-5C20-92BE-20031CE205AC}", + "details": { + "name": "AZStd::unordered_map" + } + } + ] + }, + { + "base": "Reserve", + "context": "{72FD3E42-33B1-5C20-92BE-20031CE205AC}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Reserve" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Reserve is invoked" + }, + "details": { + "name": "Reserve" + }, + "params": [ + { + "typeid": "{72FD3E42-33B1-5C20-92BE-20031CE205AC}", + "details": { + "name": "AZStd::unordered_map" + } + }, + { + "typeid": "{D6597933-47CD-4FC8-B911-63F3E2B0993A}", + "details": { + "name": "AZ::u64" + } + } + ] + }, + { + "base": "GetSize", + "context": "{72FD3E42-33B1-5C20-92BE-20031CE205AC}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke GetSize" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after GetSize is invoked" + }, + "details": { + "name": "GetSize" + }, + "params": [ + { + "typeid": "{72FD3E42-33B1-5C20-92BE-20031CE205AC}", + "details": { + "name": "AZStd::unordered_map" + } + } + ], + "results": [ + { + "typeid": "{72039442-EB38-4D42-A1AD-CB68F7E0EEF6}", + "details": { + "name": "int" + } + } + ] + }, + { + "base": "Iterate_VM", + "context": "{72FD3E42-33B1-5C20-92BE-20031CE205AC}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Iterate_VM" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Iterate_VM is invoked" + }, + "details": { + "name": "Iterate_VM" + }, + "params": [ + { + "typeid": "{72FD3E42-33B1-5C20-92BE-20031CE205AC}", + "details": { + "name": "AZStd::unordered_map" + } + } + ], + "results": [ + { + "typeid": "{83F99A1D-8270-553B-B9F0-68BCC3DDE901}", + "details": { + "name": "Iterator_VM, AZStd::equal_to, allocator>>" + } + } + ] + }, + { + "base": "GetKeys", + "context": "{72FD3E42-33B1-5C20-92BE-20031CE205AC}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke GetKeys" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after GetKeys is invoked" + }, + "details": { + "name": "GetKeys" + }, + "params": [ + { + "typeid": "{72FD3E42-33B1-5C20-92BE-20031CE205AC}", + "details": { + "name": "AZStd::unordered_map" + } + } + ], + "results": [ + { + "typeid": "{4841CFF0-7A5C-519C-BD16-D3625E99605E}", + "details": { + "name": "AZStd::vector" + } + } + ] + }, + { + "base": "Size", + "context": "{72FD3E42-33B1-5C20-92BE-20031CE205AC}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Size" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Size is invoked" + }, + "details": { + "name": "Size" + }, + "params": [ + { + "typeid": "{72FD3E42-33B1-5C20-92BE-20031CE205AC}", + "details": { + "name": "AZStd::unordered_map" + } + } + ], + "results": [ + { + "typeid": "{72039442-EB38-4D42-A1AD-CB68F7E0EEF6}", + "details": { + "name": "int" + } + } + ] + }, + { + "base": "Erase", + "context": "{72FD3E42-33B1-5C20-92BE-20031CE205AC}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Erase" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Erase is invoked" + }, + "details": { + "name": "Erase" + }, + "params": [ + { + "typeid": "{72FD3E42-33B1-5C20-92BE-20031CE205AC}", + "details": { + "name": "AZStd::unordered_map" + } + }, + { + "typeid": "{6383F1D3-BB27-4E6B-A49A-6409B2059EAA}", + "details": { + "name": "EntityId", + "tooltip": "Entity Unique Id" + } + } + ], + "results": [ + { + "typeid": "{72FD3E42-33B1-5C20-92BE-20031CE205AC}", + "details": { + "name": "AZStd::unordered_map" + } + } + ] + }, + { + "base": "EraseCheck_VM", + "context": "{72FD3E42-33B1-5C20-92BE-20031CE205AC}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke EraseCheck_VM" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after EraseCheck_VM is invoked" + }, + "details": { + "name": "EraseCheck_VM" + }, + "params": [ + { + "typeid": "{72FD3E42-33B1-5C20-92BE-20031CE205AC}", + "details": { + "name": "AZStd::unordered_map" + } + }, + { + "typeid": "{6383F1D3-BB27-4E6B-A49A-6409B2059EAA}", + "details": { + "name": "EntityId", + "tooltip": "Entity Unique Id" + } + } + ], + "results": [ + { + "typeid": "{A0CA880C-AFE4-43CB-926C-59AC48496112}", + "details": { + "name": "bool" + } + } + ] + }, + { + "base": "Clear", + "context": "{72FD3E42-33B1-5C20-92BE-20031CE205AC}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Clear" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Clear is invoked" + }, + "details": { + "name": "Clear" + }, + "params": [ + { + "typeid": "{72FD3E42-33B1-5C20-92BE-20031CE205AC}", + "details": { + "name": "AZStd::unordered_map" + } + } + ], + "results": [ + { + "typeid": "{72FD3E42-33B1-5C20-92BE-20031CE205AC}", + "details": { + "name": "AZStd::unordered_map" + } + } + ] + }, + { + "base": "At", + "context": "{72FD3E42-33B1-5C20-92BE-20031CE205AC}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke At" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after At is invoked" + }, + "details": { + "name": "At" + }, + "params": [ + { + "typeid": "{72FD3E42-33B1-5C20-92BE-20031CE205AC}", + "details": { + "name": "AZStd::unordered_map" + } + }, + { + "typeid": "{6383F1D3-BB27-4E6B-A49A-6409B2059EAA}", + "details": { + "name": "EntityId", + "tooltip": "Entity Unique Id" + } + } + ], + "results": [ + { + "typeid": "{847DD984-9DBF-4789-8E25-E0334402E8AD}", + "details": { + "name": "Plane" + } + } + ] + }, + { + "base": "BucketCount", + "context": "{72FD3E42-33B1-5C20-92BE-20031CE205AC}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke BucketCount" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after BucketCount is invoked" + }, + "details": { + "name": "BucketCount" + }, + "params": [ + { + "typeid": "{72FD3E42-33B1-5C20-92BE-20031CE205AC}", + "details": { + "name": "AZStd::unordered_map" + } + } + ], + "results": [ + { + "typeid": "{D6597933-47CD-4FC8-B911-63F3E2B0993A}", + "details": { + "name": "AZ::u64" + } + } + ] + }, + { + "base": "Empty", + "context": "{72FD3E42-33B1-5C20-92BE-20031CE205AC}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Empty" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Empty is invoked" + }, + "details": { + "name": "Empty" + }, + "params": [ + { + "typeid": "{72FD3E42-33B1-5C20-92BE-20031CE205AC}", + "details": { + "name": "AZStd::unordered_map" + } + } + ], + "results": [ + { + "typeid": "{A0CA880C-AFE4-43CB-926C-59AC48496112}", + "details": { + "name": "bool" + } + } + ] + }, + { + "base": "Swap", + "context": "{72FD3E42-33B1-5C20-92BE-20031CE205AC}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Swap" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Swap is invoked" + }, + "details": { + "name": "Swap" + }, + "params": [ + { + "typeid": "{72FD3E42-33B1-5C20-92BE-20031CE205AC}", + "details": { + "name": "AZStd::unordered_map" + } + }, + { + "typeid": "{72FD3E42-33B1-5C20-92BE-20031CE205AC}", + "details": { + "name": "AZStd::unordered_map" + } + } + ] + } + ] + }, + { + "base": "{20F3C1D8-E0E1-5211-BE7E-61EF5BD7F5FB}", + "context": "OnDemandReflected", + "variant": "", + "details": { + "name": "Map", + "category": "Map", + "tooltip": "A collection of Key/Value pairs, where each Key value must be unique." + }, + "methods": [ + { + "base": "contains", + "context": "{20F3C1D8-E0E1-5211-BE7E-61EF5BD7F5FB}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke contains" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after contains is invoked" + }, + "details": { + "name": "contains" + }, + "params": [ + { + "typeid": "{20F3C1D8-E0E1-5211-BE7E-61EF5BD7F5FB}", + "details": { + "name": "AZStd::unordered_map" + } + }, + { + "typeid": "{6383F1D3-BB27-4E6B-A49A-6409B2059EAA}", + "details": { + "name": "EntityId", + "tooltip": "Entity Unique Id" + } + } + ], + "results": [ + { + "typeid": "{A0CA880C-AFE4-43CB-926C-59AC48496112}", + "details": { + "name": "bool" + } + } + ] + }, + { + "base": "Insert", + "context": "{20F3C1D8-E0E1-5211-BE7E-61EF5BD7F5FB}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Insert" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Insert is invoked" + }, + "details": { + "name": "Insert" + }, + "params": [ + { + "typeid": "{20F3C1D8-E0E1-5211-BE7E-61EF5BD7F5FB}", + "details": { + "name": "AZStd::unordered_map" + } + }, + { + "typeid": "{6383F1D3-BB27-4E6B-A49A-6409B2059EAA}", + "details": { + "name": "EntityId", + "tooltip": "Entity Unique Id" + } + }, + { + "typeid": "{9F4E062E-06A0-46D4-85DF-E0DA96467D3A}", + "details": { + "name": "Crc32" + } + } + ], + "results": [ + { + "typeid": "{20F3C1D8-E0E1-5211-BE7E-61EF5BD7F5FB}", + "details": { + "name": "AZStd::unordered_map" + } + } + ] + }, + { + "base": "Reserve", + "context": "{20F3C1D8-E0E1-5211-BE7E-61EF5BD7F5FB}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Reserve" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Reserve is invoked" + }, + "details": { + "name": "Reserve" + }, + "params": [ + { + "typeid": "{20F3C1D8-E0E1-5211-BE7E-61EF5BD7F5FB}", + "details": { + "name": "AZStd::unordered_map" + } + }, + { + "typeid": "{D6597933-47CD-4FC8-B911-63F3E2B0993A}", + "details": { + "name": "AZ::u64" + } + } + ] + }, + { + "base": "GetSize", + "context": "{20F3C1D8-E0E1-5211-BE7E-61EF5BD7F5FB}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke GetSize" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after GetSize is invoked" + }, + "details": { + "name": "GetSize" + }, + "params": [ + { + "typeid": "{20F3C1D8-E0E1-5211-BE7E-61EF5BD7F5FB}", + "details": { + "name": "AZStd::unordered_map" + } + } + ], + "results": [ + { + "typeid": "{72039442-EB38-4D42-A1AD-CB68F7E0EEF6}", + "details": { + "name": "int" + } + } + ] + }, + { + "base": "Iterate_VM", + "context": "{20F3C1D8-E0E1-5211-BE7E-61EF5BD7F5FB}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Iterate_VM" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Iterate_VM is invoked" + }, + "details": { + "name": "Iterate_VM" + }, + "params": [ + { + "typeid": "{20F3C1D8-E0E1-5211-BE7E-61EF5BD7F5FB}", + "details": { + "name": "AZStd::unordered_map" + } + } + ], + "results": [ + { + "typeid": "{B48A0333-D890-5B86-B534-685285F2C0D4}", + "details": { + "name": "Iterator_VM, AZStd::equal_to, allocator>>" + } + } + ] + }, + { + "base": "GetKeys", + "context": "{20F3C1D8-E0E1-5211-BE7E-61EF5BD7F5FB}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke GetKeys" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after GetKeys is invoked" + }, + "details": { + "name": "GetKeys" + }, + "params": [ + { + "typeid": "{20F3C1D8-E0E1-5211-BE7E-61EF5BD7F5FB}", + "details": { + "name": "AZStd::unordered_map" + } + } + ], + "results": [ + { + "typeid": "{4841CFF0-7A5C-519C-BD16-D3625E99605E}", + "details": { + "name": "AZStd::vector" + } + } + ] + }, + { + "base": "Size", + "context": "{20F3C1D8-E0E1-5211-BE7E-61EF5BD7F5FB}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Size" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Size is invoked" + }, + "details": { + "name": "Size" + }, + "params": [ + { + "typeid": "{20F3C1D8-E0E1-5211-BE7E-61EF5BD7F5FB}", + "details": { + "name": "AZStd::unordered_map" + } + } + ], + "results": [ + { + "typeid": "{72039442-EB38-4D42-A1AD-CB68F7E0EEF6}", + "details": { + "name": "int" + } + } + ] + }, + { + "base": "Erase", + "context": "{20F3C1D8-E0E1-5211-BE7E-61EF5BD7F5FB}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Erase" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Erase is invoked" + }, + "details": { + "name": "Erase" + }, + "params": [ + { + "typeid": "{20F3C1D8-E0E1-5211-BE7E-61EF5BD7F5FB}", + "details": { + "name": "AZStd::unordered_map" + } + }, + { + "typeid": "{6383F1D3-BB27-4E6B-A49A-6409B2059EAA}", + "details": { + "name": "EntityId", + "tooltip": "Entity Unique Id" + } + } + ], + "results": [ + { + "typeid": "{20F3C1D8-E0E1-5211-BE7E-61EF5BD7F5FB}", + "details": { + "name": "AZStd::unordered_map" + } + } + ] + }, + { + "base": "EraseCheck_VM", + "context": "{20F3C1D8-E0E1-5211-BE7E-61EF5BD7F5FB}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke EraseCheck_VM" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after EraseCheck_VM is invoked" + }, + "details": { + "name": "EraseCheck_VM" + }, + "params": [ + { + "typeid": "{20F3C1D8-E0E1-5211-BE7E-61EF5BD7F5FB}", + "details": { + "name": "AZStd::unordered_map" + } + }, + { + "typeid": "{6383F1D3-BB27-4E6B-A49A-6409B2059EAA}", + "details": { + "name": "EntityId", + "tooltip": "Entity Unique Id" + } + } + ], + "results": [ + { + "typeid": "{A0CA880C-AFE4-43CB-926C-59AC48496112}", + "details": { + "name": "bool" + } + } + ] + }, + { + "base": "Clear", + "context": "{20F3C1D8-E0E1-5211-BE7E-61EF5BD7F5FB}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Clear" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Clear is invoked" + }, + "details": { + "name": "Clear" + }, + "params": [ + { + "typeid": "{20F3C1D8-E0E1-5211-BE7E-61EF5BD7F5FB}", + "details": { + "name": "AZStd::unordered_map" + } + } + ], + "results": [ + { + "typeid": "{20F3C1D8-E0E1-5211-BE7E-61EF5BD7F5FB}", + "details": { + "name": "AZStd::unordered_map" + } + } + ] + }, + { + "base": "At", + "context": "{20F3C1D8-E0E1-5211-BE7E-61EF5BD7F5FB}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke At" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after At is invoked" + }, + "details": { + "name": "At" + }, + "params": [ + { + "typeid": "{20F3C1D8-E0E1-5211-BE7E-61EF5BD7F5FB}", + "details": { + "name": "AZStd::unordered_map" + } + }, + { + "typeid": "{6383F1D3-BB27-4E6B-A49A-6409B2059EAA}", + "details": { + "name": "EntityId", + "tooltip": "Entity Unique Id" + } + } + ], + "results": [ + { + "typeid": "{9F4E062E-06A0-46D4-85DF-E0DA96467D3A}", + "details": { + "name": "Crc32" + } + } + ] + }, + { + "base": "BucketCount", + "context": "{20F3C1D8-E0E1-5211-BE7E-61EF5BD7F5FB}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke BucketCount" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after BucketCount is invoked" + }, + "details": { + "name": "BucketCount" + }, + "params": [ + { + "typeid": "{20F3C1D8-E0E1-5211-BE7E-61EF5BD7F5FB}", + "details": { + "name": "AZStd::unordered_map" + } + } + ], + "results": [ + { + "typeid": "{D6597933-47CD-4FC8-B911-63F3E2B0993A}", + "details": { + "name": "AZ::u64" + } + } + ] + }, + { + "base": "Empty", + "context": "{20F3C1D8-E0E1-5211-BE7E-61EF5BD7F5FB}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Empty" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Empty is invoked" + }, + "details": { + "name": "Empty" + }, + "params": [ + { + "typeid": "{20F3C1D8-E0E1-5211-BE7E-61EF5BD7F5FB}", + "details": { + "name": "AZStd::unordered_map" + } + } + ], + "results": [ + { + "typeid": "{A0CA880C-AFE4-43CB-926C-59AC48496112}", + "details": { + "name": "bool" + } + } + ] + }, + { + "base": "Swap", + "context": "{20F3C1D8-E0E1-5211-BE7E-61EF5BD7F5FB}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Swap" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Swap is invoked" + }, + "details": { + "name": "Swap" + }, + "params": [ + { + "typeid": "{20F3C1D8-E0E1-5211-BE7E-61EF5BD7F5FB}", + "details": { + "name": "AZStd::unordered_map" + } + }, + { + "typeid": "{20F3C1D8-E0E1-5211-BE7E-61EF5BD7F5FB}", + "details": { + "name": "AZStd::unordered_map" + } + } + ] + } + ] + }, + { + "base": "{70470FDA-2C2E-549A-A67A-6FA7388FB823}", + "context": "OnDemandReflected", + "variant": "", + "details": { + "name": "Map", + "category": "Map", + "tooltip": "A collection of Key/Value pairs, where each Key value must be unique." + }, + "methods": [ + { + "base": "contains", + "context": "{70470FDA-2C2E-549A-A67A-6FA7388FB823}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke contains" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after contains is invoked" + }, + "details": { + "name": "contains" + }, + "params": [ + { + "typeid": "{70470FDA-2C2E-549A-A67A-6FA7388FB823}", + "details": { + "name": "AZStd::unordered_map" + } + }, + { + "typeid": "{6383F1D3-BB27-4E6B-A49A-6409B2059EAA}", + "details": { + "name": "EntityId", + "tooltip": "Entity Unique Id" + } + } + ], + "results": [ + { + "typeid": "{A0CA880C-AFE4-43CB-926C-59AC48496112}", + "details": { + "name": "bool" + } + } + ] + }, + { + "base": "Insert", + "context": "{70470FDA-2C2E-549A-A67A-6FA7388FB823}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Insert" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Insert is invoked" + }, + "details": { + "name": "Insert" + }, + "params": [ + { + "typeid": "{70470FDA-2C2E-549A-A67A-6FA7388FB823}", + "details": { + "name": "AZStd::unordered_map" + } + }, + { + "typeid": "{6383F1D3-BB27-4E6B-A49A-6409B2059EAA}", + "details": { + "name": "EntityId", + "tooltip": "Entity Unique Id" + } + }, + { + "typeid": "{110C4B14-11A8-4E9D-8638-5051013A56AC}", + "details": { + "name": "double" + } + } + ], + "results": [ + { + "typeid": "{70470FDA-2C2E-549A-A67A-6FA7388FB823}", + "details": { + "name": "AZStd::unordered_map" + } + } + ] + }, + { + "base": "Reserve", + "context": "{70470FDA-2C2E-549A-A67A-6FA7388FB823}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Reserve" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Reserve is invoked" + }, + "details": { + "name": "Reserve" + }, + "params": [ + { + "typeid": "{70470FDA-2C2E-549A-A67A-6FA7388FB823}", + "details": { + "name": "AZStd::unordered_map" + } + }, + { + "typeid": "{D6597933-47CD-4FC8-B911-63F3E2B0993A}", + "details": { + "name": "AZ::u64" + } + } + ] + }, + { + "base": "GetSize", + "context": "{70470FDA-2C2E-549A-A67A-6FA7388FB823}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke GetSize" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after GetSize is invoked" + }, + "details": { + "name": "GetSize" + }, + "params": [ + { + "typeid": "{70470FDA-2C2E-549A-A67A-6FA7388FB823}", + "details": { + "name": "AZStd::unordered_map" + } + } + ], + "results": [ + { + "typeid": "{72039442-EB38-4D42-A1AD-CB68F7E0EEF6}", + "details": { + "name": "int" + } + } + ] + }, + { + "base": "Iterate_VM", + "context": "{70470FDA-2C2E-549A-A67A-6FA7388FB823}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Iterate_VM" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Iterate_VM is invoked" + }, + "details": { + "name": "Iterate_VM" + }, + "params": [ + { + "typeid": "{70470FDA-2C2E-549A-A67A-6FA7388FB823}", + "details": { + "name": "AZStd::unordered_map" + } + } + ], + "results": [ + { + "typeid": "{5E8F7E66-9DAE-523A-9ED0-6F90DD36AC4C}", + "details": { + "name": "Iterator_VM, AZStd::equal_to, allocator>>" + } + } + ] + }, + { + "base": "GetKeys", + "context": "{70470FDA-2C2E-549A-A67A-6FA7388FB823}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke GetKeys" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after GetKeys is invoked" + }, + "details": { + "name": "GetKeys" + }, + "params": [ + { + "typeid": "{70470FDA-2C2E-549A-A67A-6FA7388FB823}", + "details": { + "name": "AZStd::unordered_map" + } + } + ], + "results": [ + { + "typeid": "{4841CFF0-7A5C-519C-BD16-D3625E99605E}", + "details": { + "name": "AZStd::vector" + } + } + ] + }, + { + "base": "Size", + "context": "{70470FDA-2C2E-549A-A67A-6FA7388FB823}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Size" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Size is invoked" + }, + "details": { + "name": "Size" + }, + "params": [ + { + "typeid": "{70470FDA-2C2E-549A-A67A-6FA7388FB823}", + "details": { + "name": "AZStd::unordered_map" + } + } + ], + "results": [ + { + "typeid": "{72039442-EB38-4D42-A1AD-CB68F7E0EEF6}", + "details": { + "name": "int" + } + } + ] + }, + { + "base": "Erase", + "context": "{70470FDA-2C2E-549A-A67A-6FA7388FB823}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Erase" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Erase is invoked" + }, + "details": { + "name": "Erase" + }, + "params": [ + { + "typeid": "{70470FDA-2C2E-549A-A67A-6FA7388FB823}", + "details": { + "name": "AZStd::unordered_map" + } + }, + { + "typeid": "{6383F1D3-BB27-4E6B-A49A-6409B2059EAA}", + "details": { + "name": "EntityId", + "tooltip": "Entity Unique Id" + } + } + ], + "results": [ + { + "typeid": "{70470FDA-2C2E-549A-A67A-6FA7388FB823}", + "details": { + "name": "AZStd::unordered_map" + } + } + ] + }, + { + "base": "EraseCheck_VM", + "context": "{70470FDA-2C2E-549A-A67A-6FA7388FB823}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke EraseCheck_VM" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after EraseCheck_VM is invoked" + }, + "details": { + "name": "EraseCheck_VM" + }, + "params": [ + { + "typeid": "{70470FDA-2C2E-549A-A67A-6FA7388FB823}", + "details": { + "name": "AZStd::unordered_map" + } + }, + { + "typeid": "{6383F1D3-BB27-4E6B-A49A-6409B2059EAA}", + "details": { + "name": "EntityId", + "tooltip": "Entity Unique Id" + } + } + ], + "results": [ + { + "typeid": "{A0CA880C-AFE4-43CB-926C-59AC48496112}", + "details": { + "name": "bool" + } + } + ] + }, + { + "base": "Clear", + "context": "{70470FDA-2C2E-549A-A67A-6FA7388FB823}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Clear" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Clear is invoked" + }, + "details": { + "name": "Clear" + }, + "params": [ + { + "typeid": "{70470FDA-2C2E-549A-A67A-6FA7388FB823}", + "details": { + "name": "AZStd::unordered_map" + } + } + ], + "results": [ + { + "typeid": "{70470FDA-2C2E-549A-A67A-6FA7388FB823}", + "details": { + "name": "AZStd::unordered_map" + } + } + ] + }, + { + "base": "At", + "context": "{70470FDA-2C2E-549A-A67A-6FA7388FB823}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke At" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after At is invoked" + }, + "details": { + "name": "At" + }, + "params": [ + { + "typeid": "{70470FDA-2C2E-549A-A67A-6FA7388FB823}", + "details": { + "name": "AZStd::unordered_map" + } + }, + { + "typeid": "{6383F1D3-BB27-4E6B-A49A-6409B2059EAA}", + "details": { + "name": "EntityId", + "tooltip": "Entity Unique Id" + } + } + ], + "results": [ + { + "typeid": "{110C4B14-11A8-4E9D-8638-5051013A56AC}", + "details": { + "name": "double" + } + } + ] + }, + { + "base": "BucketCount", + "context": "{70470FDA-2C2E-549A-A67A-6FA7388FB823}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke BucketCount" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after BucketCount is invoked" + }, + "details": { + "name": "BucketCount" + }, + "params": [ + { + "typeid": "{70470FDA-2C2E-549A-A67A-6FA7388FB823}", + "details": { + "name": "AZStd::unordered_map" + } + } + ], + "results": [ + { + "typeid": "{D6597933-47CD-4FC8-B911-63F3E2B0993A}", + "details": { + "name": "AZ::u64" + } + } + ] + }, + { + "base": "Empty", + "context": "{70470FDA-2C2E-549A-A67A-6FA7388FB823}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Empty" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Empty is invoked" + }, + "details": { + "name": "Empty" + }, + "params": [ + { + "typeid": "{70470FDA-2C2E-549A-A67A-6FA7388FB823}", + "details": { + "name": "AZStd::unordered_map" + } + } + ], + "results": [ + { + "typeid": "{A0CA880C-AFE4-43CB-926C-59AC48496112}", + "details": { + "name": "bool" + } + } + ] + }, + { + "base": "Swap", + "context": "{70470FDA-2C2E-549A-A67A-6FA7388FB823}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Swap" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Swap is invoked" + }, + "details": { + "name": "Swap" + }, + "params": [ + { + "typeid": "{70470FDA-2C2E-549A-A67A-6FA7388FB823}", + "details": { + "name": "AZStd::unordered_map" + } + }, + { + "typeid": "{70470FDA-2C2E-549A-A67A-6FA7388FB823}", + "details": { + "name": "AZStd::unordered_map" + } + } + ] + } + ] + }, + { + "base": "{6018488A-73E5-5AE2-ACE7-62DAC3DBECB8}", + "context": "OnDemandReflected", + "variant": "", + "details": { + "name": "Map", + "category": "Map", + "tooltip": "A collection of Key/Value pairs, where each Key value must be unique." + }, + "methods": [ + { + "base": "contains", + "context": "{6018488A-73E5-5AE2-ACE7-62DAC3DBECB8}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke contains" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after contains is invoked" + }, + "details": { + "name": "contains" + }, + "params": [ + { + "typeid": "{6018488A-73E5-5AE2-ACE7-62DAC3DBECB8}", + "details": { + "name": "AZStd::unordered_map" + } + }, + { + "typeid": "{652ED536-3402-439B-AEBE-4A5DBC554085}", + "details": { + "name": "AssetId" + } + } + ], + "results": [ + { + "typeid": "{A0CA880C-AFE4-43CB-926C-59AC48496112}", + "details": { + "name": "bool" + } + } + ] + }, + { + "base": "Insert", + "context": "{6018488A-73E5-5AE2-ACE7-62DAC3DBECB8}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Insert" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Insert is invoked" + }, + "details": { + "name": "Insert" + }, + "params": [ + { + "typeid": "{6018488A-73E5-5AE2-ACE7-62DAC3DBECB8}", + "details": { + "name": "AZStd::unordered_map" + } + }, + { + "typeid": "{652ED536-3402-439B-AEBE-4A5DBC554085}", + "details": { + "name": "AssetId" + } + }, + { + "typeid": "{15A4332F-7C3F-4A58-AC35-50E1CE53FB9C}", + "details": { + "name": "Matrix3x3" + } + } + ], + "results": [ + { + "typeid": "{6018488A-73E5-5AE2-ACE7-62DAC3DBECB8}", + "details": { + "name": "AZStd::unordered_map" + } + } + ] + }, + { + "base": "Reserve", + "context": "{6018488A-73E5-5AE2-ACE7-62DAC3DBECB8}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Reserve" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Reserve is invoked" + }, + "details": { + "name": "Reserve" + }, + "params": [ + { + "typeid": "{6018488A-73E5-5AE2-ACE7-62DAC3DBECB8}", + "details": { + "name": "AZStd::unordered_map" + } + }, + { + "typeid": "{D6597933-47CD-4FC8-B911-63F3E2B0993A}", + "details": { + "name": "AZ::u64" + } + } + ] + }, + { + "base": "GetSize", + "context": "{6018488A-73E5-5AE2-ACE7-62DAC3DBECB8}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke GetSize" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after GetSize is invoked" + }, + "details": { + "name": "GetSize" + }, + "params": [ + { + "typeid": "{6018488A-73E5-5AE2-ACE7-62DAC3DBECB8}", + "details": { + "name": "AZStd::unordered_map" + } + } + ], + "results": [ + { + "typeid": "{72039442-EB38-4D42-A1AD-CB68F7E0EEF6}", + "details": { + "name": "int" + } + } + ] + }, + { + "base": "Iterate_VM", + "context": "{6018488A-73E5-5AE2-ACE7-62DAC3DBECB8}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Iterate_VM" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Iterate_VM is invoked" + }, + "details": { + "name": "Iterate_VM" + }, + "params": [ + { + "typeid": "{6018488A-73E5-5AE2-ACE7-62DAC3DBECB8}", + "details": { + "name": "AZStd::unordered_map" + } + } + ], + "results": [ + { + "typeid": "{16BF44CD-FF78-5C51-8037-1519139FA3A5}", + "details": { + "name": "Iterator_VM, AZStd::equal_to, allocator>>" + } + } + ] + }, + { + "base": "GetKeys", + "context": "{6018488A-73E5-5AE2-ACE7-62DAC3DBECB8}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke GetKeys" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after GetKeys is invoked" + }, + "details": { + "name": "GetKeys" + }, + "params": [ + { + "typeid": "{6018488A-73E5-5AE2-ACE7-62DAC3DBECB8}", + "details": { + "name": "AZStd::unordered_map" + } + } + ], + "results": [ + { + "typeid": "{877C4A33-39B5-51D7-948D-F97DB81372A1}", + "details": { + "name": "AZStd::vector" + } + } + ] + }, + { + "base": "Size", + "context": "{6018488A-73E5-5AE2-ACE7-62DAC3DBECB8}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Size" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Size is invoked" + }, + "details": { + "name": "Size" + }, + "params": [ + { + "typeid": "{6018488A-73E5-5AE2-ACE7-62DAC3DBECB8}", + "details": { + "name": "AZStd::unordered_map" + } + } + ], + "results": [ + { + "typeid": "{72039442-EB38-4D42-A1AD-CB68F7E0EEF6}", + "details": { + "name": "int" + } + } + ] + }, + { + "base": "Erase", + "context": "{6018488A-73E5-5AE2-ACE7-62DAC3DBECB8}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Erase" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Erase is invoked" + }, + "details": { + "name": "Erase" + }, + "params": [ + { + "typeid": "{6018488A-73E5-5AE2-ACE7-62DAC3DBECB8}", + "details": { + "name": "AZStd::unordered_map" + } + }, + { + "typeid": "{652ED536-3402-439B-AEBE-4A5DBC554085}", + "details": { + "name": "AssetId" + } + } + ], + "results": [ + { + "typeid": "{6018488A-73E5-5AE2-ACE7-62DAC3DBECB8}", + "details": { + "name": "AZStd::unordered_map" + } + } + ] + }, + { + "base": "EraseCheck_VM", + "context": "{6018488A-73E5-5AE2-ACE7-62DAC3DBECB8}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke EraseCheck_VM" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after EraseCheck_VM is invoked" + }, + "details": { + "name": "EraseCheck_VM" + }, + "params": [ + { + "typeid": "{6018488A-73E5-5AE2-ACE7-62DAC3DBECB8}", + "details": { + "name": "AZStd::unordered_map" + } + }, + { + "typeid": "{652ED536-3402-439B-AEBE-4A5DBC554085}", + "details": { + "name": "AssetId" + } + } + ], + "results": [ + { + "typeid": "{A0CA880C-AFE4-43CB-926C-59AC48496112}", + "details": { + "name": "bool" + } + } + ] + }, + { + "base": "Clear", + "context": "{6018488A-73E5-5AE2-ACE7-62DAC3DBECB8}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Clear" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Clear is invoked" + }, + "details": { + "name": "Clear" + }, + "params": [ + { + "typeid": "{6018488A-73E5-5AE2-ACE7-62DAC3DBECB8}", + "details": { + "name": "AZStd::unordered_map" + } + } + ], + "results": [ + { + "typeid": "{6018488A-73E5-5AE2-ACE7-62DAC3DBECB8}", + "details": { + "name": "AZStd::unordered_map" + } + } + ] + }, + { + "base": "At", + "context": "{6018488A-73E5-5AE2-ACE7-62DAC3DBECB8}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke At" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after At is invoked" + }, + "details": { + "name": "At" + }, + "params": [ + { + "typeid": "{6018488A-73E5-5AE2-ACE7-62DAC3DBECB8}", + "details": { + "name": "AZStd::unordered_map" + } + }, + { + "typeid": "{652ED536-3402-439B-AEBE-4A5DBC554085}", + "details": { + "name": "AssetId" + } + } + ], + "results": [ + { + "typeid": "{15A4332F-7C3F-4A58-AC35-50E1CE53FB9C}", + "details": { + "name": "Matrix3x3" + } + } + ] + }, + { + "base": "BucketCount", + "context": "{6018488A-73E5-5AE2-ACE7-62DAC3DBECB8}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke BucketCount" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after BucketCount is invoked" + }, + "details": { + "name": "BucketCount" + }, + "params": [ + { + "typeid": "{6018488A-73E5-5AE2-ACE7-62DAC3DBECB8}", + "details": { + "name": "AZStd::unordered_map" + } + } + ], + "results": [ + { + "typeid": "{D6597933-47CD-4FC8-B911-63F3E2B0993A}", + "details": { + "name": "AZ::u64" + } + } + ] + }, + { + "base": "Empty", + "context": "{6018488A-73E5-5AE2-ACE7-62DAC3DBECB8}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Empty" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Empty is invoked" + }, + "details": { + "name": "Empty" + }, + "params": [ + { + "typeid": "{6018488A-73E5-5AE2-ACE7-62DAC3DBECB8}", + "details": { + "name": "AZStd::unordered_map" + } + } + ], + "results": [ + { + "typeid": "{A0CA880C-AFE4-43CB-926C-59AC48496112}", + "details": { + "name": "bool" + } + } + ] + }, + { + "base": "Swap", + "context": "{6018488A-73E5-5AE2-ACE7-62DAC3DBECB8}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Swap" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Swap is invoked" + }, + "details": { + "name": "Swap" + }, + "params": [ + { + "typeid": "{6018488A-73E5-5AE2-ACE7-62DAC3DBECB8}", + "details": { + "name": "AZStd::unordered_map" + } + }, + { + "typeid": "{6018488A-73E5-5AE2-ACE7-62DAC3DBECB8}", + "details": { + "name": "AZStd::unordered_map" + } + } + ] + } + ] + }, + { + "base": "{C73A5FA9-295B-57F8-97D0-947B74603D96}", + "context": "OnDemandReflected", + "variant": "", + "details": { + "name": "Asset" + }, + "methods": [ + { + "base": "IsLoading", + "context": "{C73A5FA9-295B-57F8-97D0-947B74603D96}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke IsLoading" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after IsLoading is invoked" + }, + "details": { + "name": "IsLoading" + }, + "params": [ + { + "typeid": "{C73A5FA9-295B-57F8-97D0-947B74603D96}", + "details": { + "name": "Asset" + } + } + ], + "results": [ + { + "typeid": "{A0CA880C-AFE4-43CB-926C-59AC48496112}", + "details": { + "name": "bool" + } + } + ] + }, + { + "base": "GetType", + "context": "{C73A5FA9-295B-57F8-97D0-947B74603D96}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke GetType" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after GetType is invoked" + }, + "details": { + "name": "GetType" + }, + "params": [ + { + "typeid": "{C73A5FA9-295B-57F8-97D0-947B74603D96}", + "details": { + "name": "Asset" + } + } + ], + "results": [ + { + "typeid": "{E152C105-A133-4D03-BBF8-3D4B2FBA3E2A}", + "details": { + "name": "AZ::Uuid" + } + } + ] + }, + { + "base": "IsError", + "context": "{C73A5FA9-295B-57F8-97D0-947B74603D96}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke IsError" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after IsError is invoked" + }, + "details": { + "name": "IsError" + }, + "params": [ + { + "typeid": "{C73A5FA9-295B-57F8-97D0-947B74603D96}", + "details": { + "name": "Asset" + } + } + ], + "results": [ + { + "typeid": "{A0CA880C-AFE4-43CB-926C-59AC48496112}", + "details": { + "name": "bool" + } + } + ] + }, + { + "base": "GetHint", + "context": "{C73A5FA9-295B-57F8-97D0-947B74603D96}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke GetHint" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after GetHint is invoked" + }, + "details": { + "name": "GetHint" + }, + "params": [ + { + "typeid": "{C73A5FA9-295B-57F8-97D0-947B74603D96}", + "details": { + "name": "Asset" + } + } + ], + "results": [ + { + "typeid": "{03AAAB3F-5C47-5A66-9EBC-D5FA4DB353C9}", + "details": { + "name": "AZStd::string" + } + } + ] + }, + { + "base": "GetData", + "context": "{C73A5FA9-295B-57F8-97D0-947B74603D96}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke GetData" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after GetData is invoked" + }, + "details": { + "name": "GetData" + }, + "params": [ + { + "typeid": "{C73A5FA9-295B-57F8-97D0-947B74603D96}", + "details": { + "name": "Asset" + } + } + ], + "results": [ + { + "typeid": "{AF3F7D32-1536-422A-89F3-A11E1F5B5A9C}", + "details": { + "name": "AssetData" + } + } + ] + }, + { + "base": "IsReady", + "context": "{C73A5FA9-295B-57F8-97D0-947B74603D96}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke IsReady" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after IsReady is invoked" + }, + "details": { + "name": "IsReady" + }, + "params": [ + { + "typeid": "{C73A5FA9-295B-57F8-97D0-947B74603D96}", + "details": { + "name": "Asset" + } + } + ], + "results": [ + { + "typeid": "{A0CA880C-AFE4-43CB-926C-59AC48496112}", + "details": { + "name": "bool" + } + } + ] + }, + { + "base": "GetStatus", + "context": "{C73A5FA9-295B-57F8-97D0-947B74603D96}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke GetStatus" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after GetStatus is invoked" + }, + "details": { + "name": "GetStatus" + }, + "params": [ + { + "typeid": "{C73A5FA9-295B-57F8-97D0-947B74603D96}", + "details": { + "name": "Asset" + } + } + ], + "results": [ + { + "typeid": "{72039442-EB38-4D42-A1AD-CB68F7E0EEF6}", + "details": { + "name": "int" + } + } + ] + }, + { + "base": "GetId", + "context": "{C73A5FA9-295B-57F8-97D0-947B74603D96}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke GetId" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after GetId is invoked" + }, + "details": { + "name": "GetId" + }, + "params": [ + { + "typeid": "{C73A5FA9-295B-57F8-97D0-947B74603D96}", + "details": { + "name": "Asset" + } + } + ], + "results": [ + { + "typeid": "{652ED536-3402-439B-AEBE-4A5DBC554085}", + "details": { + "name": "AssetId" + } + } + ] + } + ] + }, + { + "base": "{EEE66112-B216-51A2-B10A-62F805C1C6F4}", + "context": "OnDemandReflected", + "variant": "", + "details": { + "name": "Map", + "category": "Map", + "tooltip": "A collection of Key/Value pairs, where each Key value must be unique." + }, + "methods": [ + { + "base": "contains", + "context": "{EEE66112-B216-51A2-B10A-62F805C1C6F4}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke contains" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after contains is invoked" + }, + "details": { + "name": "contains" + }, + "params": [ + { + "typeid": "{EEE66112-B216-51A2-B10A-62F805C1C6F4}", + "details": { + "name": "AZStd::unordered_map" + } + }, + { + "typeid": "{9F4E062E-06A0-46D4-85DF-E0DA96467D3A}", + "details": { + "name": "Crc32" + } + } + ], + "results": [ + { + "typeid": "{A0CA880C-AFE4-43CB-926C-59AC48496112}", + "details": { + "name": "bool" + } + } + ] + }, + { + "base": "Insert", + "context": "{EEE66112-B216-51A2-B10A-62F805C1C6F4}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Insert" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Insert is invoked" + }, + "details": { + "name": "Insert" + }, + "params": [ + { + "typeid": "{EEE66112-B216-51A2-B10A-62F805C1C6F4}", + "details": { + "name": "AZStd::unordered_map" + } + }, + { + "typeid": "{9F4E062E-06A0-46D4-85DF-E0DA96467D3A}", + "details": { + "name": "Crc32" + } + }, + { + "typeid": "{5D9958E9-9F1E-4985-B532-FFFDE75FEDFD}", + "details": { + "name": "Transform" + } + } + ], + "results": [ + { + "typeid": "{EEE66112-B216-51A2-B10A-62F805C1C6F4}", + "details": { + "name": "AZStd::unordered_map" + } + } + ] + }, + { + "base": "Reserve", + "context": "{EEE66112-B216-51A2-B10A-62F805C1C6F4}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Reserve" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Reserve is invoked" + }, + "details": { + "name": "Reserve" + }, + "params": [ + { + "typeid": "{EEE66112-B216-51A2-B10A-62F805C1C6F4}", + "details": { + "name": "AZStd::unordered_map" + } + }, + { + "typeid": "{D6597933-47CD-4FC8-B911-63F3E2B0993A}", + "details": { + "name": "AZ::u64" + } + } + ] + }, + { + "base": "GetSize", + "context": "{EEE66112-B216-51A2-B10A-62F805C1C6F4}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke GetSize" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after GetSize is invoked" + }, + "details": { + "name": "GetSize" + }, + "params": [ + { + "typeid": "{EEE66112-B216-51A2-B10A-62F805C1C6F4}", + "details": { + "name": "AZStd::unordered_map" + } + } + ], + "results": [ + { + "typeid": "{72039442-EB38-4D42-A1AD-CB68F7E0EEF6}", + "details": { + "name": "int" + } + } + ] + }, + { + "base": "Iterate_VM", + "context": "{EEE66112-B216-51A2-B10A-62F805C1C6F4}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Iterate_VM" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Iterate_VM is invoked" + }, + "details": { + "name": "Iterate_VM" + }, + "params": [ + { + "typeid": "{EEE66112-B216-51A2-B10A-62F805C1C6F4}", + "details": { + "name": "AZStd::unordered_map" + } + } + ], + "results": [ + { + "typeid": "{BF425AAB-9386-50E0-8DF8-7960359ED7EC}", + "details": { + "name": "Iterator_VM, AZStd::equal_to, allocator>>" + } + } + ] + }, + { + "base": "GetKeys", + "context": "{EEE66112-B216-51A2-B10A-62F805C1C6F4}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke GetKeys" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after GetKeys is invoked" + }, + "details": { + "name": "GetKeys" + }, + "params": [ + { + "typeid": "{EEE66112-B216-51A2-B10A-62F805C1C6F4}", + "details": { + "name": "AZStd::unordered_map" + } + } + ], + "results": [ + { + "typeid": "{287CEE87-6FF3-52FC-9D32-38255E2C7FE9}", + "details": { + "name": "AZStd::vector" + } + } + ] + }, + { + "base": "Size", + "context": "{EEE66112-B216-51A2-B10A-62F805C1C6F4}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Size" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Size is invoked" + }, + "details": { + "name": "Size" + }, + "params": [ + { + "typeid": "{EEE66112-B216-51A2-B10A-62F805C1C6F4}", + "details": { + "name": "AZStd::unordered_map" + } + } + ], + "results": [ + { + "typeid": "{72039442-EB38-4D42-A1AD-CB68F7E0EEF6}", + "details": { + "name": "int" + } + } + ] + }, + { + "base": "Erase", + "context": "{EEE66112-B216-51A2-B10A-62F805C1C6F4}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Erase" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Erase is invoked" + }, + "details": { + "name": "Erase" + }, + "params": [ + { + "typeid": "{EEE66112-B216-51A2-B10A-62F805C1C6F4}", + "details": { + "name": "AZStd::unordered_map" + } + }, + { + "typeid": "{9F4E062E-06A0-46D4-85DF-E0DA96467D3A}", + "details": { + "name": "Crc32" + } + } + ], + "results": [ + { + "typeid": "{EEE66112-B216-51A2-B10A-62F805C1C6F4}", + "details": { + "name": "AZStd::unordered_map" + } + } + ] + }, + { + "base": "EraseCheck_VM", + "context": "{EEE66112-B216-51A2-B10A-62F805C1C6F4}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke EraseCheck_VM" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after EraseCheck_VM is invoked" + }, + "details": { + "name": "EraseCheck_VM" + }, + "params": [ + { + "typeid": "{EEE66112-B216-51A2-B10A-62F805C1C6F4}", + "details": { + "name": "AZStd::unordered_map" + } + }, + { + "typeid": "{9F4E062E-06A0-46D4-85DF-E0DA96467D3A}", + "details": { + "name": "Crc32" + } + } + ], + "results": [ + { + "typeid": "{A0CA880C-AFE4-43CB-926C-59AC48496112}", + "details": { + "name": "bool" + } + } + ] + }, + { + "base": "Clear", + "context": "{EEE66112-B216-51A2-B10A-62F805C1C6F4}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Clear" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Clear is invoked" + }, + "details": { + "name": "Clear" + }, + "params": [ + { + "typeid": "{EEE66112-B216-51A2-B10A-62F805C1C6F4}", + "details": { + "name": "AZStd::unordered_map" + } + } + ], + "results": [ + { + "typeid": "{EEE66112-B216-51A2-B10A-62F805C1C6F4}", + "details": { + "name": "AZStd::unordered_map" + } + } + ] + }, + { + "base": "At", + "context": "{EEE66112-B216-51A2-B10A-62F805C1C6F4}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke At" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after At is invoked" + }, + "details": { + "name": "At" + }, + "params": [ + { + "typeid": "{EEE66112-B216-51A2-B10A-62F805C1C6F4}", + "details": { + "name": "AZStd::unordered_map" + } + }, + { + "typeid": "{9F4E062E-06A0-46D4-85DF-E0DA96467D3A}", + "details": { + "name": "Crc32" + } + } + ], + "results": [ + { + "typeid": "{5D9958E9-9F1E-4985-B532-FFFDE75FEDFD}", + "details": { + "name": "Transform" + } + } + ] + }, + { + "base": "BucketCount", + "context": "{EEE66112-B216-51A2-B10A-62F805C1C6F4}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke BucketCount" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after BucketCount is invoked" + }, + "details": { + "name": "BucketCount" + }, + "params": [ + { + "typeid": "{EEE66112-B216-51A2-B10A-62F805C1C6F4}", + "details": { + "name": "AZStd::unordered_map" + } + } + ], + "results": [ + { + "typeid": "{D6597933-47CD-4FC8-B911-63F3E2B0993A}", + "details": { + "name": "AZ::u64" + } + } + ] + }, + { + "base": "Empty", + "context": "{EEE66112-B216-51A2-B10A-62F805C1C6F4}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Empty" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Empty is invoked" + }, + "details": { + "name": "Empty" + }, + "params": [ + { + "typeid": "{EEE66112-B216-51A2-B10A-62F805C1C6F4}", + "details": { + "name": "AZStd::unordered_map" + } + } + ], + "results": [ + { + "typeid": "{A0CA880C-AFE4-43CB-926C-59AC48496112}", + "details": { + "name": "bool" + } + } + ] + }, + { + "base": "Swap", + "context": "{EEE66112-B216-51A2-B10A-62F805C1C6F4}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Swap" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Swap is invoked" + }, + "details": { + "name": "Swap" + }, + "params": [ + { + "typeid": "{EEE66112-B216-51A2-B10A-62F805C1C6F4}", + "details": { + "name": "AZStd::unordered_map" + } + }, + { + "typeid": "{EEE66112-B216-51A2-B10A-62F805C1C6F4}", + "details": { + "name": "AZStd::unordered_map" + } + } + ] + } + ] + }, + { + "base": "{428274AA-6C0B-5535-A5BD-E987696ED8E0}", + "context": "OnDemandReflected", + "variant": "", + "details": { + "name": "Outcome" + }, + "methods": [ + { + "base": "Failure", + "context": "{428274AA-6C0B-5535-A5BD-E987696ED8E0}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Failure" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Failure is invoked" + }, + "details": { + "name": "Failure" + }, + "results": [ + { + "typeid": "{428274AA-6C0B-5535-A5BD-E987696ED8E0}", + "details": { + "name": "Outcome" + } + } + ] + }, + { + "base": "Success", + "context": "{428274AA-6C0B-5535-A5BD-E987696ED8E0}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Success" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Success is invoked" + }, + "details": { + "name": "Success" + }, + "results": [ + { + "typeid": "{428274AA-6C0B-5535-A5BD-E987696ED8E0}", + "details": { + "name": "Outcome" + } + } + ] + }, + { + "base": "IsSuccess", + "context": "{428274AA-6C0B-5535-A5BD-E987696ED8E0}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke IsSuccess" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after IsSuccess is invoked" + }, + "details": { + "name": "IsSuccess" + }, + "params": [ + { + "typeid": "{428274AA-6C0B-5535-A5BD-E987696ED8E0}", + "details": { + "name": "Outcome*" + } + } + ], + "results": [ + { + "typeid": "{A0CA880C-AFE4-43CB-926C-59AC48496112}", + "details": { + "name": "bool" + } + } + ] + } + ] + }, + { + "base": "{BFA7A8BD-787E-56C2-96C1-115A572EB249}", + "context": "OnDemandReflected", + "variant": "", + "details": { + "name": "Tuple" + }, + "methods": [ + { + "base": "Get0", + "context": "{BFA7A8BD-787E-56C2-96C1-115A572EB249}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Get0" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Get0 is invoked" + }, + "details": { + "name": "Get0" + }, + "params": [ + { + "typeid": "{BFA7A8BD-787E-56C2-96C1-115A572EB249}", + "details": { + "name": "tuple&" + } + } + ], + "results": [ + { + "typeid": "{6383F1D3-BB27-4E6B-A49A-6409B2059EAA}", + "details": { + "name": "EntityId", + "tooltip": "Entity Unique Id" + } + } + ] + }, + { + "base": "Get1", + "context": "{BFA7A8BD-787E-56C2-96C1-115A572EB249}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Get1" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Get1 is invoked" + }, + "details": { + "name": "Get1" + }, + "params": [ + { + "typeid": "{BFA7A8BD-787E-56C2-96C1-115A572EB249}", + "details": { + "name": "tuple&" + } + } + ], + "results": [ + { + "typeid": "{A0CA880C-AFE4-43CB-926C-59AC48496112}", + "details": { + "name": "bool" + } + } + ] + }, + { + "base": "GetSize", + "context": "{BFA7A8BD-787E-56C2-96C1-115A572EB249}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke GetSize" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after GetSize is invoked" + }, + "details": { + "name": "GetSize" + }, + "results": [ + { + "typeid": "{D6597933-47CD-4FC8-B911-63F3E2B0993A}", + "details": { + "name": "AZ::u64" + } + } + ] + } + ] + }, + { + "base": "{961EE5AE-685E-5B9E-B3AC-604C5F2F4C1A}", + "context": "OnDemandReflected", + "variant": "", + "details": { + "name": "Map", + "category": "Map", + "tooltip": "A collection of Key/Value pairs, where each Key value must be unique." + }, + "methods": [ + { + "base": "contains", + "context": "{961EE5AE-685E-5B9E-B3AC-604C5F2F4C1A}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke contains" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after contains is invoked" + }, + "details": { + "name": "contains" + }, + "params": [ + { + "typeid": "{961EE5AE-685E-5B9E-B3AC-604C5F2F4C1A}", + "details": { + "name": "AZStd::unordered_map" + } + }, + { + "typeid": "{9F4E062E-06A0-46D4-85DF-E0DA96467D3A}", + "details": { + "name": "Crc32" + } + } + ], + "results": [ + { + "typeid": "{A0CA880C-AFE4-43CB-926C-59AC48496112}", + "details": { + "name": "bool" + } + } + ] + }, + { + "base": "Insert", + "context": "{961EE5AE-685E-5B9E-B3AC-604C5F2F4C1A}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Insert" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Insert is invoked" + }, + "details": { + "name": "Insert" + }, + "params": [ + { + "typeid": "{961EE5AE-685E-5B9E-B3AC-604C5F2F4C1A}", + "details": { + "name": "AZStd::unordered_map" + } + }, + { + "typeid": "{9F4E062E-06A0-46D4-85DF-E0DA96467D3A}", + "details": { + "name": "Crc32" + } + }, + { + "typeid": "{7894072A-9050-4F0F-901B-34B1A0D29417}", + "details": { + "name": "Color" + } + } + ], + "results": [ + { + "typeid": "{961EE5AE-685E-5B9E-B3AC-604C5F2F4C1A}", + "details": { + "name": "AZStd::unordered_map" + } + } + ] + }, + { + "base": "Reserve", + "context": "{961EE5AE-685E-5B9E-B3AC-604C5F2F4C1A}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Reserve" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Reserve is invoked" + }, + "details": { + "name": "Reserve" + }, + "params": [ + { + "typeid": "{961EE5AE-685E-5B9E-B3AC-604C5F2F4C1A}", + "details": { + "name": "AZStd::unordered_map" + } + }, + { + "typeid": "{D6597933-47CD-4FC8-B911-63F3E2B0993A}", + "details": { + "name": "AZ::u64" + } + } + ] + }, + { + "base": "GetSize", + "context": "{961EE5AE-685E-5B9E-B3AC-604C5F2F4C1A}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke GetSize" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after GetSize is invoked" + }, + "details": { + "name": "GetSize" + }, + "params": [ + { + "typeid": "{961EE5AE-685E-5B9E-B3AC-604C5F2F4C1A}", + "details": { + "name": "AZStd::unordered_map" + } + } + ], + "results": [ + { + "typeid": "{72039442-EB38-4D42-A1AD-CB68F7E0EEF6}", + "details": { + "name": "int" + } + } + ] + }, + { + "base": "Iterate_VM", + "context": "{961EE5AE-685E-5B9E-B3AC-604C5F2F4C1A}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Iterate_VM" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Iterate_VM is invoked" + }, + "details": { + "name": "Iterate_VM" + }, + "params": [ + { + "typeid": "{961EE5AE-685E-5B9E-B3AC-604C5F2F4C1A}", + "details": { + "name": "AZStd::unordered_map" + } + } + ], + "results": [ + { + "typeid": "{36898EE2-045F-5124-AFDB-DB5EBAA7CF7A}", + "details": { + "name": "Iterator_VM, AZStd::equal_to, allocator>>" + } + } + ] + }, + { + "base": "GetKeys", + "context": "{961EE5AE-685E-5B9E-B3AC-604C5F2F4C1A}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke GetKeys" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after GetKeys is invoked" + }, + "details": { + "name": "GetKeys" + }, + "params": [ + { + "typeid": "{961EE5AE-685E-5B9E-B3AC-604C5F2F4C1A}", + "details": { + "name": "AZStd::unordered_map" + } + } + ], + "results": [ + { + "typeid": "{287CEE87-6FF3-52FC-9D32-38255E2C7FE9}", + "details": { + "name": "AZStd::vector" + } + } + ] + }, + { + "base": "Size", + "context": "{961EE5AE-685E-5B9E-B3AC-604C5F2F4C1A}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Size" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Size is invoked" + }, + "details": { + "name": "Size" + }, + "params": [ + { + "typeid": "{961EE5AE-685E-5B9E-B3AC-604C5F2F4C1A}", + "details": { + "name": "AZStd::unordered_map" + } + } + ], + "results": [ + { + "typeid": "{72039442-EB38-4D42-A1AD-CB68F7E0EEF6}", + "details": { + "name": "int" + } + } + ] + }, + { + "base": "Erase", + "context": "{961EE5AE-685E-5B9E-B3AC-604C5F2F4C1A}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Erase" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Erase is invoked" + }, + "details": { + "name": "Erase" + }, + "params": [ + { + "typeid": "{961EE5AE-685E-5B9E-B3AC-604C5F2F4C1A}", + "details": { + "name": "AZStd::unordered_map" + } + }, + { + "typeid": "{9F4E062E-06A0-46D4-85DF-E0DA96467D3A}", + "details": { + "name": "Crc32" + } + } + ], + "results": [ + { + "typeid": "{961EE5AE-685E-5B9E-B3AC-604C5F2F4C1A}", + "details": { + "name": "AZStd::unordered_map" + } + } + ] + }, + { + "base": "EraseCheck_VM", + "context": "{961EE5AE-685E-5B9E-B3AC-604C5F2F4C1A}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke EraseCheck_VM" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after EraseCheck_VM is invoked" + }, + "details": { + "name": "EraseCheck_VM" + }, + "params": [ + { + "typeid": "{961EE5AE-685E-5B9E-B3AC-604C5F2F4C1A}", + "details": { + "name": "AZStd::unordered_map" + } + }, + { + "typeid": "{9F4E062E-06A0-46D4-85DF-E0DA96467D3A}", + "details": { + "name": "Crc32" + } + } + ], + "results": [ + { + "typeid": "{A0CA880C-AFE4-43CB-926C-59AC48496112}", + "details": { + "name": "bool" + } + } + ] + }, + { + "base": "Clear", + "context": "{961EE5AE-685E-5B9E-B3AC-604C5F2F4C1A}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Clear" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Clear is invoked" + }, + "details": { + "name": "Clear" + }, + "params": [ + { + "typeid": "{961EE5AE-685E-5B9E-B3AC-604C5F2F4C1A}", + "details": { + "name": "AZStd::unordered_map" + } + } + ], + "results": [ + { + "typeid": "{961EE5AE-685E-5B9E-B3AC-604C5F2F4C1A}", + "details": { + "name": "AZStd::unordered_map" + } + } + ] + }, + { + "base": "At", + "context": "{961EE5AE-685E-5B9E-B3AC-604C5F2F4C1A}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke At" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after At is invoked" + }, + "details": { + "name": "At" + }, + "params": [ + { + "typeid": "{961EE5AE-685E-5B9E-B3AC-604C5F2F4C1A}", + "details": { + "name": "AZStd::unordered_map" + } + }, + { + "typeid": "{9F4E062E-06A0-46D4-85DF-E0DA96467D3A}", + "details": { + "name": "Crc32" + } + } + ], + "results": [ + { + "typeid": "{7894072A-9050-4F0F-901B-34B1A0D29417}", + "details": { + "name": "Color" + } + } + ] + }, + { + "base": "BucketCount", + "context": "{961EE5AE-685E-5B9E-B3AC-604C5F2F4C1A}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke BucketCount" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after BucketCount is invoked" + }, + "details": { + "name": "BucketCount" + }, + "params": [ + { + "typeid": "{961EE5AE-685E-5B9E-B3AC-604C5F2F4C1A}", + "details": { + "name": "AZStd::unordered_map" + } + } + ], + "results": [ + { + "typeid": "{D6597933-47CD-4FC8-B911-63F3E2B0993A}", + "details": { + "name": "AZ::u64" + } + } + ] + }, + { + "base": "Empty", + "context": "{961EE5AE-685E-5B9E-B3AC-604C5F2F4C1A}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Empty" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Empty is invoked" + }, + "details": { + "name": "Empty" + }, + "params": [ + { + "typeid": "{961EE5AE-685E-5B9E-B3AC-604C5F2F4C1A}", + "details": { + "name": "AZStd::unordered_map" + } + } + ], + "results": [ + { + "typeid": "{A0CA880C-AFE4-43CB-926C-59AC48496112}", + "details": { + "name": "bool" + } + } + ] + }, + { + "base": "Swap", + "context": "{961EE5AE-685E-5B9E-B3AC-604C5F2F4C1A}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Swap" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Swap is invoked" + }, + "details": { + "name": "Swap" + }, + "params": [ + { + "typeid": "{961EE5AE-685E-5B9E-B3AC-604C5F2F4C1A}", + "details": { + "name": "AZStd::unordered_map" + } + }, + { + "typeid": "{961EE5AE-685E-5B9E-B3AC-604C5F2F4C1A}", + "details": { + "name": "AZStd::unordered_map" + } + } + ] + } + ] + }, + { + "base": "{87073E82-1470-5DBD-92EB-ED294F351AB6}", + "context": "OnDemandReflected", + "variant": "", + "details": { + "name": "Map", + "category": "Map", + "tooltip": "A collection of Key/Value pairs, where each Key value must be unique." + }, + "methods": [ + { + "base": "contains", + "context": "{87073E82-1470-5DBD-92EB-ED294F351AB6}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke contains" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after contains is invoked" + }, + "details": { + "name": "contains" + }, + "params": [ + { + "typeid": "{87073E82-1470-5DBD-92EB-ED294F351AB6}", + "details": { + "name": "AZStd::unordered_map" + } + }, + { + "typeid": "{6383F1D3-BB27-4E6B-A49A-6409B2059EAA}", + "details": { + "name": "EntityId", + "tooltip": "Entity Unique Id" + } + } + ], + "results": [ + { + "typeid": "{A0CA880C-AFE4-43CB-926C-59AC48496112}", + "details": { + "name": "bool" + } + } + ] + }, + { + "base": "Insert", + "context": "{87073E82-1470-5DBD-92EB-ED294F351AB6}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Insert" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Insert is invoked" + }, + "details": { + "name": "Insert" + }, + "params": [ + { + "typeid": "{87073E82-1470-5DBD-92EB-ED294F351AB6}", + "details": { + "name": "AZStd::unordered_map" + } + }, + { + "typeid": "{6383F1D3-BB27-4E6B-A49A-6409B2059EAA}", + "details": { + "name": "EntityId", + "tooltip": "Entity Unique Id" + } + }, + { + "typeid": "{3D80F623-C85C-4741-90D0-E4E66164E6BF}", + "details": { + "name": "Vector2" + } + } + ], + "results": [ + { + "typeid": "{87073E82-1470-5DBD-92EB-ED294F351AB6}", + "details": { + "name": "AZStd::unordered_map" + } + } + ] + }, + { + "base": "Reserve", + "context": "{87073E82-1470-5DBD-92EB-ED294F351AB6}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Reserve" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Reserve is invoked" + }, + "details": { + "name": "Reserve" + }, + "params": [ + { + "typeid": "{87073E82-1470-5DBD-92EB-ED294F351AB6}", + "details": { + "name": "AZStd::unordered_map" + } + }, + { + "typeid": "{D6597933-47CD-4FC8-B911-63F3E2B0993A}", + "details": { + "name": "AZ::u64" + } + } + ] + }, + { + "base": "GetSize", + "context": "{87073E82-1470-5DBD-92EB-ED294F351AB6}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke GetSize" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after GetSize is invoked" + }, + "details": { + "name": "GetSize" + }, + "params": [ + { + "typeid": "{87073E82-1470-5DBD-92EB-ED294F351AB6}", + "details": { + "name": "AZStd::unordered_map" + } + } + ], + "results": [ + { + "typeid": "{72039442-EB38-4D42-A1AD-CB68F7E0EEF6}", + "details": { + "name": "int" + } + } + ] + }, + { + "base": "Iterate_VM", + "context": "{87073E82-1470-5DBD-92EB-ED294F351AB6}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Iterate_VM" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Iterate_VM is invoked" + }, + "details": { + "name": "Iterate_VM" + }, + "params": [ + { + "typeid": "{87073E82-1470-5DBD-92EB-ED294F351AB6}", + "details": { + "name": "AZStd::unordered_map" + } + } + ], + "results": [ + { + "typeid": "{CAF223EA-34CD-52FE-80F1-4FB2A8D3527B}", + "details": { + "name": "Iterator_VM, AZStd::equal_to, allocator>>" + } + } + ] + }, + { + "base": "GetKeys", + "context": "{87073E82-1470-5DBD-92EB-ED294F351AB6}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke GetKeys" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after GetKeys is invoked" + }, + "details": { + "name": "GetKeys" + }, + "params": [ + { + "typeid": "{87073E82-1470-5DBD-92EB-ED294F351AB6}", + "details": { + "name": "AZStd::unordered_map" + } + } + ], + "results": [ + { + "typeid": "{4841CFF0-7A5C-519C-BD16-D3625E99605E}", + "details": { + "name": "AZStd::vector" + } + } + ] + }, + { + "base": "Size", + "context": "{87073E82-1470-5DBD-92EB-ED294F351AB6}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Size" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Size is invoked" + }, + "details": { + "name": "Size" + }, + "params": [ + { + "typeid": "{87073E82-1470-5DBD-92EB-ED294F351AB6}", + "details": { + "name": "AZStd::unordered_map" + } + } + ], + "results": [ + { + "typeid": "{72039442-EB38-4D42-A1AD-CB68F7E0EEF6}", + "details": { + "name": "int" + } + } + ] + }, + { + "base": "Erase", + "context": "{87073E82-1470-5DBD-92EB-ED294F351AB6}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Erase" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Erase is invoked" + }, + "details": { + "name": "Erase" + }, + "params": [ + { + "typeid": "{87073E82-1470-5DBD-92EB-ED294F351AB6}", + "details": { + "name": "AZStd::unordered_map" + } + }, + { + "typeid": "{6383F1D3-BB27-4E6B-A49A-6409B2059EAA}", + "details": { + "name": "EntityId", + "tooltip": "Entity Unique Id" + } + } + ], + "results": [ + { + "typeid": "{87073E82-1470-5DBD-92EB-ED294F351AB6}", + "details": { + "name": "AZStd::unordered_map" + } + } + ] + }, + { + "base": "EraseCheck_VM", + "context": "{87073E82-1470-5DBD-92EB-ED294F351AB6}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke EraseCheck_VM" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after EraseCheck_VM is invoked" + }, + "details": { + "name": "EraseCheck_VM" + }, + "params": [ + { + "typeid": "{87073E82-1470-5DBD-92EB-ED294F351AB6}", + "details": { + "name": "AZStd::unordered_map" + } + }, + { + "typeid": "{6383F1D3-BB27-4E6B-A49A-6409B2059EAA}", + "details": { + "name": "EntityId", + "tooltip": "Entity Unique Id" + } + } + ], + "results": [ + { + "typeid": "{A0CA880C-AFE4-43CB-926C-59AC48496112}", + "details": { + "name": "bool" + } + } + ] + }, + { + "base": "Clear", + "context": "{87073E82-1470-5DBD-92EB-ED294F351AB6}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Clear" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Clear is invoked" + }, + "details": { + "name": "Clear" + }, + "params": [ + { + "typeid": "{87073E82-1470-5DBD-92EB-ED294F351AB6}", + "details": { + "name": "AZStd::unordered_map" + } + } + ], + "results": [ + { + "typeid": "{87073E82-1470-5DBD-92EB-ED294F351AB6}", + "details": { + "name": "AZStd::unordered_map" + } + } + ] + }, + { + "base": "At", + "context": "{87073E82-1470-5DBD-92EB-ED294F351AB6}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke At" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after At is invoked" + }, + "details": { + "name": "At" + }, + "params": [ + { + "typeid": "{87073E82-1470-5DBD-92EB-ED294F351AB6}", + "details": { + "name": "AZStd::unordered_map" + } + }, + { + "typeid": "{6383F1D3-BB27-4E6B-A49A-6409B2059EAA}", + "details": { + "name": "EntityId", + "tooltip": "Entity Unique Id" + } + } + ], + "results": [ + { + "typeid": "{3D80F623-C85C-4741-90D0-E4E66164E6BF}", + "details": { + "name": "Vector2" + } + } + ] + }, + { + "base": "BucketCount", + "context": "{87073E82-1470-5DBD-92EB-ED294F351AB6}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke BucketCount" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after BucketCount is invoked" + }, + "details": { + "name": "BucketCount" + }, + "params": [ + { + "typeid": "{87073E82-1470-5DBD-92EB-ED294F351AB6}", + "details": { + "name": "AZStd::unordered_map" + } + } + ], + "results": [ + { + "typeid": "{D6597933-47CD-4FC8-B911-63F3E2B0993A}", + "details": { + "name": "AZ::u64" + } + } + ] + }, + { + "base": "Empty", + "context": "{87073E82-1470-5DBD-92EB-ED294F351AB6}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Empty" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Empty is invoked" + }, + "details": { + "name": "Empty" + }, + "params": [ + { + "typeid": "{87073E82-1470-5DBD-92EB-ED294F351AB6}", + "details": { + "name": "AZStd::unordered_map" + } + } + ], + "results": [ + { + "typeid": "{A0CA880C-AFE4-43CB-926C-59AC48496112}", + "details": { + "name": "bool" + } + } + ] + }, + { + "base": "Swap", + "context": "{87073E82-1470-5DBD-92EB-ED294F351AB6}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Swap" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Swap is invoked" + }, + "details": { + "name": "Swap" + }, + "params": [ + { + "typeid": "{87073E82-1470-5DBD-92EB-ED294F351AB6}", + "details": { + "name": "AZStd::unordered_map" + } + }, + { + "typeid": "{87073E82-1470-5DBD-92EB-ED294F351AB6}", + "details": { + "name": "AZStd::unordered_map" + } + } + ] + } + ] + }, + { + "base": "{C8E55ED7-2D57-586D-B8A4-BC3CF9A0883C}", + "context": "OnDemandReflected", + "variant": "", + "details": { + "name": "Map", + "category": "Map", + "tooltip": "A collection of Key/Value pairs, where each Key value must be unique." + }, + "methods": [ + { + "base": "contains", + "context": "{C8E55ED7-2D57-586D-B8A4-BC3CF9A0883C}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke contains" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after contains is invoked" + }, + "details": { + "name": "contains" + }, + "params": [ + { + "typeid": "{C8E55ED7-2D57-586D-B8A4-BC3CF9A0883C}", + "details": { + "name": "AZStd::unordered_map" + } + }, + { + "typeid": "{9F4E062E-06A0-46D4-85DF-E0DA96467D3A}", + "details": { + "name": "Crc32" + } + } + ], + "results": [ + { + "typeid": "{A0CA880C-AFE4-43CB-926C-59AC48496112}", + "details": { + "name": "bool" + } + } + ] + }, + { + "base": "Insert", + "context": "{C8E55ED7-2D57-586D-B8A4-BC3CF9A0883C}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Insert" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Insert is invoked" + }, + "details": { + "name": "Insert" + }, + "params": [ + { + "typeid": "{C8E55ED7-2D57-586D-B8A4-BC3CF9A0883C}", + "details": { + "name": "AZStd::unordered_map" + } + }, + { + "typeid": "{9F4E062E-06A0-46D4-85DF-E0DA96467D3A}", + "details": { + "name": "Crc32" + } + }, + { + "typeid": "{03AAAB3F-5C47-5A66-9EBC-D5FA4DB353C9}", + "details": { + "name": "AZStd::string" + } + } + ], + "results": [ + { + "typeid": "{C8E55ED7-2D57-586D-B8A4-BC3CF9A0883C}", + "details": { + "name": "AZStd::unordered_map" + } + } + ] + }, + { + "base": "Reserve", + "context": "{C8E55ED7-2D57-586D-B8A4-BC3CF9A0883C}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Reserve" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Reserve is invoked" + }, + "details": { + "name": "Reserve" + }, + "params": [ + { + "typeid": "{C8E55ED7-2D57-586D-B8A4-BC3CF9A0883C}", + "details": { + "name": "AZStd::unordered_map" + } + }, + { + "typeid": "{D6597933-47CD-4FC8-B911-63F3E2B0993A}", + "details": { + "name": "AZ::u64" + } + } + ] + }, + { + "base": "GetSize", + "context": "{C8E55ED7-2D57-586D-B8A4-BC3CF9A0883C}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke GetSize" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after GetSize is invoked" + }, + "details": { + "name": "GetSize" + }, + "params": [ + { + "typeid": "{C8E55ED7-2D57-586D-B8A4-BC3CF9A0883C}", + "details": { + "name": "AZStd::unordered_map" + } + } + ], + "results": [ + { + "typeid": "{72039442-EB38-4D42-A1AD-CB68F7E0EEF6}", + "details": { + "name": "int" + } + } + ] + }, + { + "base": "Iterate_VM", + "context": "{C8E55ED7-2D57-586D-B8A4-BC3CF9A0883C}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Iterate_VM" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Iterate_VM is invoked" + }, + "details": { + "name": "Iterate_VM" + }, + "params": [ + { + "typeid": "{C8E55ED7-2D57-586D-B8A4-BC3CF9A0883C}", + "details": { + "name": "AZStd::unordered_map" + } + } + ], + "results": [ + { + "typeid": "{8C7C1E8E-ADB0-50E1-9A6B-7375A3356068}", + "details": { + "name": "Iterator_VM, allocator>, AZStd::hash, AZS" + } + } + ] + }, + { + "base": "GetKeys", + "context": "{C8E55ED7-2D57-586D-B8A4-BC3CF9A0883C}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke GetKeys" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after GetKeys is invoked" + }, + "details": { + "name": "GetKeys" + }, + "params": [ + { + "typeid": "{C8E55ED7-2D57-586D-B8A4-BC3CF9A0883C}", + "details": { + "name": "AZStd::unordered_map" + } + } + ], + "results": [ + { + "typeid": "{287CEE87-6FF3-52FC-9D32-38255E2C7FE9}", + "details": { + "name": "AZStd::vector" + } + } + ] + }, + { + "base": "Size", + "context": "{C8E55ED7-2D57-586D-B8A4-BC3CF9A0883C}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Size" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Size is invoked" + }, + "details": { + "name": "Size" + }, + "params": [ + { + "typeid": "{C8E55ED7-2D57-586D-B8A4-BC3CF9A0883C}", + "details": { + "name": "AZStd::unordered_map" + } + } + ], + "results": [ + { + "typeid": "{72039442-EB38-4D42-A1AD-CB68F7E0EEF6}", + "details": { + "name": "int" + } + } + ] + }, + { + "base": "Erase", + "context": "{C8E55ED7-2D57-586D-B8A4-BC3CF9A0883C}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Erase" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Erase is invoked" + }, + "details": { + "name": "Erase" + }, + "params": [ + { + "typeid": "{C8E55ED7-2D57-586D-B8A4-BC3CF9A0883C}", + "details": { + "name": "AZStd::unordered_map" + } + }, + { + "typeid": "{9F4E062E-06A0-46D4-85DF-E0DA96467D3A}", + "details": { + "name": "Crc32" + } + } + ], + "results": [ + { + "typeid": "{C8E55ED7-2D57-586D-B8A4-BC3CF9A0883C}", + "details": { + "name": "AZStd::unordered_map" + } + } + ] + }, + { + "base": "EraseCheck_VM", + "context": "{C8E55ED7-2D57-586D-B8A4-BC3CF9A0883C}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke EraseCheck_VM" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after EraseCheck_VM is invoked" + }, + "details": { + "name": "EraseCheck_VM" + }, + "params": [ + { + "typeid": "{C8E55ED7-2D57-586D-B8A4-BC3CF9A0883C}", + "details": { + "name": "AZStd::unordered_map" + } + }, + { + "typeid": "{9F4E062E-06A0-46D4-85DF-E0DA96467D3A}", + "details": { + "name": "Crc32" + } + } + ], + "results": [ + { + "typeid": "{A0CA880C-AFE4-43CB-926C-59AC48496112}", + "details": { + "name": "bool" + } + } + ] + }, + { + "base": "Clear", + "context": "{C8E55ED7-2D57-586D-B8A4-BC3CF9A0883C}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Clear" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Clear is invoked" + }, + "details": { + "name": "Clear" + }, + "params": [ + { + "typeid": "{C8E55ED7-2D57-586D-B8A4-BC3CF9A0883C}", + "details": { + "name": "AZStd::unordered_map" + } + } + ], + "results": [ + { + "typeid": "{C8E55ED7-2D57-586D-B8A4-BC3CF9A0883C}", + "details": { + "name": "AZStd::unordered_map" + } + } + ] + }, + { + "base": "At", + "context": "{C8E55ED7-2D57-586D-B8A4-BC3CF9A0883C}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke At" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after At is invoked" + }, + "details": { + "name": "At" + }, + "params": [ + { + "typeid": "{C8E55ED7-2D57-586D-B8A4-BC3CF9A0883C}", + "details": { + "name": "AZStd::unordered_map" + } + }, + { + "typeid": "{9F4E062E-06A0-46D4-85DF-E0DA96467D3A}", + "details": { + "name": "Crc32" + } + } + ], + "results": [ + { + "typeid": "{03AAAB3F-5C47-5A66-9EBC-D5FA4DB353C9}", + "details": { + "name": "AZStd::string" + } + } + ] + }, + { + "base": "BucketCount", + "context": "{C8E55ED7-2D57-586D-B8A4-BC3CF9A0883C}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke BucketCount" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after BucketCount is invoked" + }, + "details": { + "name": "BucketCount" + }, + "params": [ + { + "typeid": "{C8E55ED7-2D57-586D-B8A4-BC3CF9A0883C}", + "details": { + "name": "AZStd::unordered_map" + } + } + ], + "results": [ + { + "typeid": "{D6597933-47CD-4FC8-B911-63F3E2B0993A}", + "details": { + "name": "AZ::u64" + } + } + ] + }, + { + "base": "Empty", + "context": "{C8E55ED7-2D57-586D-B8A4-BC3CF9A0883C}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Empty" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Empty is invoked" + }, + "details": { + "name": "Empty" + }, + "params": [ + { + "typeid": "{C8E55ED7-2D57-586D-B8A4-BC3CF9A0883C}", + "details": { + "name": "AZStd::unordered_map" + } + } + ], + "results": [ + { + "typeid": "{A0CA880C-AFE4-43CB-926C-59AC48496112}", + "details": { + "name": "bool" + } + } + ] + }, + { + "base": "Swap", + "context": "{C8E55ED7-2D57-586D-B8A4-BC3CF9A0883C}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Swap" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Swap is invoked" + }, + "details": { + "name": "Swap" + }, + "params": [ + { + "typeid": "{C8E55ED7-2D57-586D-B8A4-BC3CF9A0883C}", + "details": { + "name": "AZStd::unordered_map" + } + }, + { + "typeid": "{C8E55ED7-2D57-586D-B8A4-BC3CF9A0883C}", + "details": { + "name": "AZStd::unordered_map" + } + } + ] + } + ] + }, + { + "base": "{52BC39A3-063A-5CD4-99D4-4F018D7784D6}", + "context": "OnDemandReflected", + "variant": "", + "details": { + "name": "Map", + "category": "Map", + "tooltip": "A collection of Key/Value pairs, where each Key value must be unique." + }, + "methods": [ + { + "base": "contains", + "context": "{52BC39A3-063A-5CD4-99D4-4F018D7784D6}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke contains" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after contains is invoked" + }, + "details": { + "name": "contains" + }, + "params": [ + { + "typeid": "{52BC39A3-063A-5CD4-99D4-4F018D7784D6}", + "details": { + "name": "AZStd::unordered_map" + } + }, + { + "typeid": "{9F4E062E-06A0-46D4-85DF-E0DA96467D3A}", + "details": { + "name": "Crc32" + } + } + ], + "results": [ + { + "typeid": "{A0CA880C-AFE4-43CB-926C-59AC48496112}", + "details": { + "name": "bool" + } + } + ] + }, + { + "base": "Insert", + "context": "{52BC39A3-063A-5CD4-99D4-4F018D7784D6}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Insert" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Insert is invoked" + }, + "details": { + "name": "Insert" + }, + "params": [ + { + "typeid": "{52BC39A3-063A-5CD4-99D4-4F018D7784D6}", + "details": { + "name": "AZStd::unordered_map" + } + }, + { + "typeid": "{9F4E062E-06A0-46D4-85DF-E0DA96467D3A}", + "details": { + "name": "Crc32" + } + }, + { + "typeid": "{110C4B14-11A8-4E9D-8638-5051013A56AC}", + "details": { + "name": "double" + } + } + ], + "results": [ + { + "typeid": "{52BC39A3-063A-5CD4-99D4-4F018D7784D6}", + "details": { + "name": "AZStd::unordered_map" + } + } + ] + }, + { + "base": "Reserve", + "context": "{52BC39A3-063A-5CD4-99D4-4F018D7784D6}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Reserve" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Reserve is invoked" + }, + "details": { + "name": "Reserve" + }, + "params": [ + { + "typeid": "{52BC39A3-063A-5CD4-99D4-4F018D7784D6}", + "details": { + "name": "AZStd::unordered_map" + } + }, + { + "typeid": "{D6597933-47CD-4FC8-B911-63F3E2B0993A}", + "details": { + "name": "AZ::u64" + } + } + ] + }, + { + "base": "GetSize", + "context": "{52BC39A3-063A-5CD4-99D4-4F018D7784D6}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke GetSize" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after GetSize is invoked" + }, + "details": { + "name": "GetSize" + }, + "params": [ + { + "typeid": "{52BC39A3-063A-5CD4-99D4-4F018D7784D6}", + "details": { + "name": "AZStd::unordered_map" + } + } + ], + "results": [ + { + "typeid": "{72039442-EB38-4D42-A1AD-CB68F7E0EEF6}", + "details": { + "name": "int" + } + } + ] + }, + { + "base": "Iterate_VM", + "context": "{52BC39A3-063A-5CD4-99D4-4F018D7784D6}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Iterate_VM" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Iterate_VM is invoked" + }, + "details": { + "name": "Iterate_VM" + }, + "params": [ + { + "typeid": "{52BC39A3-063A-5CD4-99D4-4F018D7784D6}", + "details": { + "name": "AZStd::unordered_map" + } + } + ], + "results": [ + { + "typeid": "{F4D7898E-79C0-5652-B0E8-4C6C80D221DB}", + "details": { + "name": "Iterator_VM, AZStd::equal_to, allocator>>" + } + } + ] + }, + { + "base": "GetKeys", + "context": "{52BC39A3-063A-5CD4-99D4-4F018D7784D6}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke GetKeys" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after GetKeys is invoked" + }, + "details": { + "name": "GetKeys" + }, + "params": [ + { + "typeid": "{52BC39A3-063A-5CD4-99D4-4F018D7784D6}", + "details": { + "name": "AZStd::unordered_map" + } + } + ], + "results": [ + { + "typeid": "{287CEE87-6FF3-52FC-9D32-38255E2C7FE9}", + "details": { + "name": "AZStd::vector" + } + } + ] + }, + { + "base": "Size", + "context": "{52BC39A3-063A-5CD4-99D4-4F018D7784D6}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Size" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Size is invoked" + }, + "details": { + "name": "Size" + }, + "params": [ + { + "typeid": "{52BC39A3-063A-5CD4-99D4-4F018D7784D6}", + "details": { + "name": "AZStd::unordered_map" + } + } + ], + "results": [ + { + "typeid": "{72039442-EB38-4D42-A1AD-CB68F7E0EEF6}", + "details": { + "name": "int" + } + } + ] + }, + { + "base": "Erase", + "context": "{52BC39A3-063A-5CD4-99D4-4F018D7784D6}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Erase" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Erase is invoked" + }, + "details": { + "name": "Erase" + }, + "params": [ + { + "typeid": "{52BC39A3-063A-5CD4-99D4-4F018D7784D6}", + "details": { + "name": "AZStd::unordered_map" + } + }, + { + "typeid": "{9F4E062E-06A0-46D4-85DF-E0DA96467D3A}", + "details": { + "name": "Crc32" + } + } + ], + "results": [ + { + "typeid": "{52BC39A3-063A-5CD4-99D4-4F018D7784D6}", + "details": { + "name": "AZStd::unordered_map" + } + } + ] + }, + { + "base": "EraseCheck_VM", + "context": "{52BC39A3-063A-5CD4-99D4-4F018D7784D6}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke EraseCheck_VM" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after EraseCheck_VM is invoked" + }, + "details": { + "name": "EraseCheck_VM" + }, + "params": [ + { + "typeid": "{52BC39A3-063A-5CD4-99D4-4F018D7784D6}", + "details": { + "name": "AZStd::unordered_map" + } + }, + { + "typeid": "{9F4E062E-06A0-46D4-85DF-E0DA96467D3A}", + "details": { + "name": "Crc32" + } + } + ], + "results": [ + { + "typeid": "{A0CA880C-AFE4-43CB-926C-59AC48496112}", + "details": { + "name": "bool" + } + } + ] + }, + { + "base": "Clear", + "context": "{52BC39A3-063A-5CD4-99D4-4F018D7784D6}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Clear" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Clear is invoked" + }, + "details": { + "name": "Clear" + }, + "params": [ + { + "typeid": "{52BC39A3-063A-5CD4-99D4-4F018D7784D6}", + "details": { + "name": "AZStd::unordered_map" + } + } + ], + "results": [ + { + "typeid": "{52BC39A3-063A-5CD4-99D4-4F018D7784D6}", + "details": { + "name": "AZStd::unordered_map" + } + } + ] + }, + { + "base": "At", + "context": "{52BC39A3-063A-5CD4-99D4-4F018D7784D6}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke At" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after At is invoked" + }, + "details": { + "name": "At" + }, + "params": [ + { + "typeid": "{52BC39A3-063A-5CD4-99D4-4F018D7784D6}", + "details": { + "name": "AZStd::unordered_map" + } + }, + { + "typeid": "{9F4E062E-06A0-46D4-85DF-E0DA96467D3A}", + "details": { + "name": "Crc32" + } + } + ], + "results": [ + { + "typeid": "{110C4B14-11A8-4E9D-8638-5051013A56AC}", + "details": { + "name": "double" + } + } + ] + }, + { + "base": "BucketCount", + "context": "{52BC39A3-063A-5CD4-99D4-4F018D7784D6}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke BucketCount" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after BucketCount is invoked" + }, + "details": { + "name": "BucketCount" + }, + "params": [ + { + "typeid": "{52BC39A3-063A-5CD4-99D4-4F018D7784D6}", + "details": { + "name": "AZStd::unordered_map" + } + } + ], + "results": [ + { + "typeid": "{D6597933-47CD-4FC8-B911-63F3E2B0993A}", + "details": { + "name": "AZ::u64" + } + } + ] + }, + { + "base": "Empty", + "context": "{52BC39A3-063A-5CD4-99D4-4F018D7784D6}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Empty" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Empty is invoked" + }, + "details": { + "name": "Empty" + }, + "params": [ + { + "typeid": "{52BC39A3-063A-5CD4-99D4-4F018D7784D6}", + "details": { + "name": "AZStd::unordered_map" + } + } + ], + "results": [ + { + "typeid": "{A0CA880C-AFE4-43CB-926C-59AC48496112}", + "details": { + "name": "bool" + } + } + ] + }, + { + "base": "Swap", + "context": "{52BC39A3-063A-5CD4-99D4-4F018D7784D6}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Swap" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Swap is invoked" + }, + "details": { + "name": "Swap" + }, + "params": [ + { + "typeid": "{52BC39A3-063A-5CD4-99D4-4F018D7784D6}", + "details": { + "name": "AZStd::unordered_map" + } + }, + { + "typeid": "{52BC39A3-063A-5CD4-99D4-4F018D7784D6}", + "details": { + "name": "AZStd::unordered_map" + } + } + ] + } + ] + }, + { + "base": "{C5BB1B1A-9721-598B-8746-FAAA76B87464}", + "context": "OnDemandReflected", + "variant": "", + "details": { + "name": "Map", + "category": "Map", + "tooltip": "A collection of Key/Value pairs, where each Key value must be unique." + }, + "methods": [ + { + "base": "contains", + "context": "{C5BB1B1A-9721-598B-8746-FAAA76B87464}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke contains" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after contains is invoked" + }, + "details": { + "name": "contains" + }, + "params": [ + { + "typeid": "{C5BB1B1A-9721-598B-8746-FAAA76B87464}", + "details": { + "name": "AZStd::unordered_map" + } + }, + { + "typeid": "{9F4E062E-06A0-46D4-85DF-E0DA96467D3A}", + "details": { + "name": "Crc32" + } + } + ], + "results": [ + { + "typeid": "{A0CA880C-AFE4-43CB-926C-59AC48496112}", + "details": { + "name": "bool" + } + } + ] + }, + { + "base": "Insert", + "context": "{C5BB1B1A-9721-598B-8746-FAAA76B87464}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Insert" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Insert is invoked" + }, + "details": { + "name": "Insert" + }, + "params": [ + { + "typeid": "{C5BB1B1A-9721-598B-8746-FAAA76B87464}", + "details": { + "name": "AZStd::unordered_map" + } + }, + { + "typeid": "{9F4E062E-06A0-46D4-85DF-E0DA96467D3A}", + "details": { + "name": "Crc32" + } + }, + { + "typeid": "{A0CA880C-AFE4-43CB-926C-59AC48496112}", + "details": { + "name": "bool" + } + } + ], + "results": [ + { + "typeid": "{C5BB1B1A-9721-598B-8746-FAAA76B87464}", + "details": { + "name": "AZStd::unordered_map" + } + } + ] + }, + { + "base": "Reserve", + "context": "{C5BB1B1A-9721-598B-8746-FAAA76B87464}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Reserve" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Reserve is invoked" + }, + "details": { + "name": "Reserve" + }, + "params": [ + { + "typeid": "{C5BB1B1A-9721-598B-8746-FAAA76B87464}", + "details": { + "name": "AZStd::unordered_map" + } + }, + { + "typeid": "{D6597933-47CD-4FC8-B911-63F3E2B0993A}", + "details": { + "name": "AZ::u64" + } + } + ] + }, + { + "base": "GetSize", + "context": "{C5BB1B1A-9721-598B-8746-FAAA76B87464}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke GetSize" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after GetSize is invoked" + }, + "details": { + "name": "GetSize" + }, + "params": [ + { + "typeid": "{C5BB1B1A-9721-598B-8746-FAAA76B87464}", + "details": { + "name": "AZStd::unordered_map" + } + } + ], + "results": [ + { + "typeid": "{72039442-EB38-4D42-A1AD-CB68F7E0EEF6}", + "details": { + "name": "int" + } + } + ] + }, + { + "base": "Iterate_VM", + "context": "{C5BB1B1A-9721-598B-8746-FAAA76B87464}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Iterate_VM" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Iterate_VM is invoked" + }, + "details": { + "name": "Iterate_VM" + }, + "params": [ + { + "typeid": "{C5BB1B1A-9721-598B-8746-FAAA76B87464}", + "details": { + "name": "AZStd::unordered_map" + } + } + ], + "results": [ + { + "typeid": "{8AF4E192-490D-5659-9B78-F258C3B07222}", + "details": { + "name": "Iterator_VM, AZStd::equal_to, allocator>>" + } + } + ] + }, + { + "base": "GetKeys", + "context": "{C5BB1B1A-9721-598B-8746-FAAA76B87464}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke GetKeys" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after GetKeys is invoked" + }, + "details": { + "name": "GetKeys" + }, + "params": [ + { + "typeid": "{C5BB1B1A-9721-598B-8746-FAAA76B87464}", + "details": { + "name": "AZStd::unordered_map" + } + } + ], + "results": [ + { + "typeid": "{287CEE87-6FF3-52FC-9D32-38255E2C7FE9}", + "details": { + "name": "AZStd::vector" + } + } + ] + }, + { + "base": "Size", + "context": "{C5BB1B1A-9721-598B-8746-FAAA76B87464}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Size" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Size is invoked" + }, + "details": { + "name": "Size" + }, + "params": [ + { + "typeid": "{C5BB1B1A-9721-598B-8746-FAAA76B87464}", + "details": { + "name": "AZStd::unordered_map" + } + } + ], + "results": [ + { + "typeid": "{72039442-EB38-4D42-A1AD-CB68F7E0EEF6}", + "details": { + "name": "int" + } + } + ] + }, + { + "base": "Erase", + "context": "{C5BB1B1A-9721-598B-8746-FAAA76B87464}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Erase" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Erase is invoked" + }, + "details": { + "name": "Erase" + }, + "params": [ + { + "typeid": "{C5BB1B1A-9721-598B-8746-FAAA76B87464}", + "details": { + "name": "AZStd::unordered_map" + } + }, + { + "typeid": "{9F4E062E-06A0-46D4-85DF-E0DA96467D3A}", + "details": { + "name": "Crc32" + } + } + ], + "results": [ + { + "typeid": "{C5BB1B1A-9721-598B-8746-FAAA76B87464}", + "details": { + "name": "AZStd::unordered_map" + } + } + ] + }, + { + "base": "EraseCheck_VM", + "context": "{C5BB1B1A-9721-598B-8746-FAAA76B87464}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke EraseCheck_VM" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after EraseCheck_VM is invoked" + }, + "details": { + "name": "EraseCheck_VM" + }, + "params": [ + { + "typeid": "{C5BB1B1A-9721-598B-8746-FAAA76B87464}", + "details": { + "name": "AZStd::unordered_map" + } + }, + { + "typeid": "{9F4E062E-06A0-46D4-85DF-E0DA96467D3A}", + "details": { + "name": "Crc32" + } + } + ], + "results": [ + { + "typeid": "{A0CA880C-AFE4-43CB-926C-59AC48496112}", + "details": { + "name": "bool" + } + } + ] + }, + { + "base": "Clear", + "context": "{C5BB1B1A-9721-598B-8746-FAAA76B87464}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Clear" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Clear is invoked" + }, + "details": { + "name": "Clear" + }, + "params": [ + { + "typeid": "{C5BB1B1A-9721-598B-8746-FAAA76B87464}", + "details": { + "name": "AZStd::unordered_map" + } + } + ], + "results": [ + { + "typeid": "{C5BB1B1A-9721-598B-8746-FAAA76B87464}", + "details": { + "name": "AZStd::unordered_map" + } + } + ] + }, + { + "base": "At", + "context": "{C5BB1B1A-9721-598B-8746-FAAA76B87464}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke At" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after At is invoked" + }, + "details": { + "name": "At" + }, + "params": [ + { + "typeid": "{C5BB1B1A-9721-598B-8746-FAAA76B87464}", + "details": { + "name": "AZStd::unordered_map" + } + }, + { + "typeid": "{9F4E062E-06A0-46D4-85DF-E0DA96467D3A}", + "details": { + "name": "Crc32" + } + } + ], + "results": [ + { + "typeid": "{A0CA880C-AFE4-43CB-926C-59AC48496112}", + "details": { + "name": "bool" + } + } + ] + }, + { + "base": "BucketCount", + "context": "{C5BB1B1A-9721-598B-8746-FAAA76B87464}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke BucketCount" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after BucketCount is invoked" + }, + "details": { + "name": "BucketCount" + }, + "params": [ + { + "typeid": "{C5BB1B1A-9721-598B-8746-FAAA76B87464}", + "details": { + "name": "AZStd::unordered_map" + } + } + ], + "results": [ + { + "typeid": "{D6597933-47CD-4FC8-B911-63F3E2B0993A}", + "details": { + "name": "AZ::u64" + } + } + ] + }, + { + "base": "Empty", + "context": "{C5BB1B1A-9721-598B-8746-FAAA76B87464}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Empty" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Empty is invoked" + }, + "details": { + "name": "Empty" + }, + "params": [ + { + "typeid": "{C5BB1B1A-9721-598B-8746-FAAA76B87464}", + "details": { + "name": "AZStd::unordered_map" + } + } + ], + "results": [ + { + "typeid": "{A0CA880C-AFE4-43CB-926C-59AC48496112}", + "details": { + "name": "bool" + } + } + ] + }, + { + "base": "Swap", + "context": "{C5BB1B1A-9721-598B-8746-FAAA76B87464}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Swap" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Swap is invoked" + }, + "details": { + "name": "Swap" + }, + "params": [ + { + "typeid": "{C5BB1B1A-9721-598B-8746-FAAA76B87464}", + "details": { + "name": "AZStd::unordered_map" + } + }, + { + "typeid": "{C5BB1B1A-9721-598B-8746-FAAA76B87464}", + "details": { + "name": "AZStd::unordered_map" + } + } + ] + } + ] + }, + { + "base": "{E13859C4-1F24-5C44-A133-F17B4B050D7C}", + "context": "OnDemandReflected", + "variant": "", + "details": { + "name": "Shared", + "category": "Shared", + "tooltip": "A smart pointer which manages the life cycle of an object, and provides multiple points of ownership for the specified memory(The memory will remain active so long as any shared_ptr has a reference to it)." + }, + "methods": [ + { + "base": "get", + "context": "{E13859C4-1F24-5C44-A133-F17B4B050D7C}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke get" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after get is invoked" + }, + "details": { + "name": "get" + }, + "params": [ + { + "typeid": "{E13859C4-1F24-5C44-A133-F17B4B050D7C}", + "details": { + "name": "AZStd::shared_ptr" + } + } + ], + "results": [ + { + "typeid": "{6E2D31AF-5CB0-4A50-BD68-B00E2D2FD0A4}", + "details": { + "name": "Spline", + "tooltip": "Spline Data" + } + } + ] + } + ] + }, + { + "base": "{DC13DC44-BB50-5CCB-985E-C611AE891575}", + "context": "OnDemandReflected", + "variant": "", + "details": { + "name": "Map", + "category": "Map", + "tooltip": "A collection of Key/Value pairs, where each Key value must be unique." + }, + "methods": [ + { + "base": "contains", + "context": "{DC13DC44-BB50-5CCB-985E-C611AE891575}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke contains" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after contains is invoked" + }, + "details": { + "name": "contains" + }, + "params": [ + { + "typeid": "{DC13DC44-BB50-5CCB-985E-C611AE891575}", + "details": { + "name": "AZStd::unordered_map" + } + }, + { + "typeid": "{110C4B14-11A8-4E9D-8638-5051013A56AC}", + "details": { + "name": "double" + } + } + ], + "results": [ + { + "typeid": "{A0CA880C-AFE4-43CB-926C-59AC48496112}", + "details": { + "name": "bool" + } + } + ] + }, + { + "base": "Insert", + "context": "{DC13DC44-BB50-5CCB-985E-C611AE891575}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Insert" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Insert is invoked" + }, + "details": { + "name": "Insert" + }, + "params": [ + { + "typeid": "{DC13DC44-BB50-5CCB-985E-C611AE891575}", + "details": { + "name": "AZStd::unordered_map" + } + }, + { + "typeid": "{110C4B14-11A8-4E9D-8638-5051013A56AC}", + "details": { + "name": "double" + } + }, + { + "typeid": "{9F4E062E-06A0-46D4-85DF-E0DA96467D3A}", + "details": { + "name": "Crc32" + } + } + ], + "results": [ + { + "typeid": "{DC13DC44-BB50-5CCB-985E-C611AE891575}", + "details": { + "name": "AZStd::unordered_map" + } + } + ] + }, + { + "base": "Reserve", + "context": "{DC13DC44-BB50-5CCB-985E-C611AE891575}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Reserve" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Reserve is invoked" + }, + "details": { + "name": "Reserve" + }, + "params": [ + { + "typeid": "{DC13DC44-BB50-5CCB-985E-C611AE891575}", + "details": { + "name": "AZStd::unordered_map" + } + }, + { + "typeid": "{D6597933-47CD-4FC8-B911-63F3E2B0993A}", + "details": { + "name": "AZ::u64" + } + } + ] + }, + { + "base": "GetSize", + "context": "{DC13DC44-BB50-5CCB-985E-C611AE891575}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke GetSize" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after GetSize is invoked" + }, + "details": { + "name": "GetSize" + }, + "params": [ + { + "typeid": "{DC13DC44-BB50-5CCB-985E-C611AE891575}", + "details": { + "name": "AZStd::unordered_map" + } + } + ], + "results": [ + { + "typeid": "{72039442-EB38-4D42-A1AD-CB68F7E0EEF6}", + "details": { + "name": "int" + } + } + ] + }, + { + "base": "Iterate_VM", + "context": "{DC13DC44-BB50-5CCB-985E-C611AE891575}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Iterate_VM" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Iterate_VM is invoked" + }, + "details": { + "name": "Iterate_VM" + }, + "params": [ + { + "typeid": "{DC13DC44-BB50-5CCB-985E-C611AE891575}", + "details": { + "name": "AZStd::unordered_map" + } + } + ], + "results": [ + { + "typeid": "{37F3A504-2009-552E-8122-0B917B5DCD05}", + "details": { + "name": "Iterator_VM, AZStd::equal_to, allocator>>" + } + } + ] + }, + { + "base": "GetKeys", + "context": "{DC13DC44-BB50-5CCB-985E-C611AE891575}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke GetKeys" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after GetKeys is invoked" + }, + "details": { + "name": "GetKeys" + }, + "params": [ + { + "typeid": "{DC13DC44-BB50-5CCB-985E-C611AE891575}", + "details": { + "name": "AZStd::unordered_map" + } + } + ], + "results": [ + { + "typeid": "{F31F64EA-E384-5536-ACD6-8F01849730FC}", + "details": { + "name": "AZStd::vector" + } + } + ] + }, + { + "base": "Size", + "context": "{DC13DC44-BB50-5CCB-985E-C611AE891575}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Size" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Size is invoked" + }, + "details": { + "name": "Size" + }, + "params": [ + { + "typeid": "{DC13DC44-BB50-5CCB-985E-C611AE891575}", + "details": { + "name": "AZStd::unordered_map" + } + } + ], + "results": [ + { + "typeid": "{72039442-EB38-4D42-A1AD-CB68F7E0EEF6}", + "details": { + "name": "int" + } + } + ] + }, + { + "base": "Erase", + "context": "{DC13DC44-BB50-5CCB-985E-C611AE891575}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Erase" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Erase is invoked" + }, + "details": { + "name": "Erase" + }, + "params": [ + { + "typeid": "{DC13DC44-BB50-5CCB-985E-C611AE891575}", + "details": { + "name": "AZStd::unordered_map" + } + }, + { + "typeid": "{110C4B14-11A8-4E9D-8638-5051013A56AC}", + "details": { + "name": "double" + } + } + ], + "results": [ + { + "typeid": "{DC13DC44-BB50-5CCB-985E-C611AE891575}", + "details": { + "name": "AZStd::unordered_map" + } + } + ] + }, + { + "base": "EraseCheck_VM", + "context": "{DC13DC44-BB50-5CCB-985E-C611AE891575}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke EraseCheck_VM" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after EraseCheck_VM is invoked" + }, + "details": { + "name": "EraseCheck_VM" + }, + "params": [ + { + "typeid": "{DC13DC44-BB50-5CCB-985E-C611AE891575}", + "details": { + "name": "AZStd::unordered_map" + } + }, + { + "typeid": "{110C4B14-11A8-4E9D-8638-5051013A56AC}", + "details": { + "name": "double" + } + } + ], + "results": [ + { + "typeid": "{A0CA880C-AFE4-43CB-926C-59AC48496112}", + "details": { + "name": "bool" + } + } + ] + }, + { + "base": "Clear", + "context": "{DC13DC44-BB50-5CCB-985E-C611AE891575}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Clear" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Clear is invoked" + }, + "details": { + "name": "Clear" + }, + "params": [ + { + "typeid": "{DC13DC44-BB50-5CCB-985E-C611AE891575}", + "details": { + "name": "AZStd::unordered_map" + } + } + ], + "results": [ + { + "typeid": "{DC13DC44-BB50-5CCB-985E-C611AE891575}", + "details": { + "name": "AZStd::unordered_map" + } + } + ] + }, + { + "base": "At", + "context": "{DC13DC44-BB50-5CCB-985E-C611AE891575}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke At" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after At is invoked" + }, + "details": { + "name": "At" + }, + "params": [ + { + "typeid": "{DC13DC44-BB50-5CCB-985E-C611AE891575}", + "details": { + "name": "AZStd::unordered_map" + } + }, + { + "typeid": "{110C4B14-11A8-4E9D-8638-5051013A56AC}", + "details": { + "name": "double" + } + } + ], + "results": [ + { + "typeid": "{9F4E062E-06A0-46D4-85DF-E0DA96467D3A}", + "details": { + "name": "Crc32" + } + } + ] + }, + { + "base": "BucketCount", + "context": "{DC13DC44-BB50-5CCB-985E-C611AE891575}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke BucketCount" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after BucketCount is invoked" + }, + "details": { + "name": "BucketCount" + }, + "params": [ + { + "typeid": "{DC13DC44-BB50-5CCB-985E-C611AE891575}", + "details": { + "name": "AZStd::unordered_map" + } + } + ], + "results": [ + { + "typeid": "{D6597933-47CD-4FC8-B911-63F3E2B0993A}", + "details": { + "name": "AZ::u64" + } + } + ] + }, + { + "base": "Empty", + "context": "{DC13DC44-BB50-5CCB-985E-C611AE891575}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Empty" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Empty is invoked" + }, + "details": { + "name": "Empty" + }, + "params": [ + { + "typeid": "{DC13DC44-BB50-5CCB-985E-C611AE891575}", + "details": { + "name": "AZStd::unordered_map" + } + } + ], + "results": [ + { + "typeid": "{A0CA880C-AFE4-43CB-926C-59AC48496112}", + "details": { + "name": "bool" + } + } + ] + }, + { + "base": "Swap", + "context": "{DC13DC44-BB50-5CCB-985E-C611AE891575}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Swap" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Swap is invoked" + }, + "details": { + "name": "Swap" + }, + "params": [ + { + "typeid": "{DC13DC44-BB50-5CCB-985E-C611AE891575}", + "details": { + "name": "AZStd::unordered_map" + } + }, + { + "typeid": "{DC13DC44-BB50-5CCB-985E-C611AE891575}", + "details": { + "name": "AZStd::unordered_map" + } + } + ] + } + ] + }, + { + "base": "{805FA2E4-1874-5919-A853-4EF984E5A82A}", + "context": "OnDemandReflected", + "variant": "", + "details": { + "name": "Map", + "category": "Map", + "tooltip": "A collection of Key/Value pairs, where each Key value must be unique." + }, + "methods": [ + { + "base": "contains", + "context": "{805FA2E4-1874-5919-A853-4EF984E5A82A}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke contains" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after contains is invoked" + }, + "details": { + "name": "contains" + }, + "params": [ + { + "typeid": "{805FA2E4-1874-5919-A853-4EF984E5A82A}", + "details": { + "name": "AZStd::unordered_map" + } + }, + { + "typeid": "{652ED536-3402-439B-AEBE-4A5DBC554085}", + "details": { + "name": "AssetId" + } + } + ], + "results": [ + { + "typeid": "{A0CA880C-AFE4-43CB-926C-59AC48496112}", + "details": { + "name": "bool" + } + } + ] + }, + { + "base": "Insert", + "context": "{805FA2E4-1874-5919-A853-4EF984E5A82A}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Insert" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Insert is invoked" + }, + "details": { + "name": "Insert" + }, + "params": [ + { + "typeid": "{805FA2E4-1874-5919-A853-4EF984E5A82A}", + "details": { + "name": "AZStd::unordered_map" + } + }, + { + "typeid": "{652ED536-3402-439B-AEBE-4A5DBC554085}", + "details": { + "name": "AssetId" + } + }, + { + "typeid": "{6383F1D3-BB27-4E6B-A49A-6409B2059EAA}", + "details": { + "name": "EntityId", + "tooltip": "Entity Unique Id" + } + } + ], + "results": [ + { + "typeid": "{805FA2E4-1874-5919-A853-4EF984E5A82A}", + "details": { + "name": "AZStd::unordered_map" + } + } + ] + }, + { + "base": "Reserve", + "context": "{805FA2E4-1874-5919-A853-4EF984E5A82A}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Reserve" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Reserve is invoked" + }, + "details": { + "name": "Reserve" + }, + "params": [ + { + "typeid": "{805FA2E4-1874-5919-A853-4EF984E5A82A}", + "details": { + "name": "AZStd::unordered_map" + } + }, + { + "typeid": "{D6597933-47CD-4FC8-B911-63F3E2B0993A}", + "details": { + "name": "AZ::u64" + } + } + ] + }, + { + "base": "GetSize", + "context": "{805FA2E4-1874-5919-A853-4EF984E5A82A}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke GetSize" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after GetSize is invoked" + }, + "details": { + "name": "GetSize" + }, + "params": [ + { + "typeid": "{805FA2E4-1874-5919-A853-4EF984E5A82A}", + "details": { + "name": "AZStd::unordered_map" + } + } + ], + "results": [ + { + "typeid": "{72039442-EB38-4D42-A1AD-CB68F7E0EEF6}", + "details": { + "name": "int" + } + } + ] + }, + { + "base": "Iterate_VM", + "context": "{805FA2E4-1874-5919-A853-4EF984E5A82A}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Iterate_VM" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Iterate_VM is invoked" + }, + "details": { + "name": "Iterate_VM" + }, + "params": [ + { + "typeid": "{805FA2E4-1874-5919-A853-4EF984E5A82A}", + "details": { + "name": "AZStd::unordered_map" + } + } + ], + "results": [ + { + "typeid": "{D9C83DDB-FD88-5D55-97E3-50ED4A4CF5B2}", + "details": { + "name": "Iterator_VM, AZStd::equal_to, allocator>>" + } + } + ] + }, + { + "base": "GetKeys", + "context": "{805FA2E4-1874-5919-A853-4EF984E5A82A}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke GetKeys" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after GetKeys is invoked" + }, + "details": { + "name": "GetKeys" + }, + "params": [ + { + "typeid": "{805FA2E4-1874-5919-A853-4EF984E5A82A}", + "details": { + "name": "AZStd::unordered_map" + } + } + ], + "results": [ + { + "typeid": "{877C4A33-39B5-51D7-948D-F97DB81372A1}", + "details": { + "name": "AZStd::vector" + } + } + ] + }, + { + "base": "Size", + "context": "{805FA2E4-1874-5919-A853-4EF984E5A82A}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Size" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Size is invoked" + }, + "details": { + "name": "Size" + }, + "params": [ + { + "typeid": "{805FA2E4-1874-5919-A853-4EF984E5A82A}", + "details": { + "name": "AZStd::unordered_map" + } + } + ], + "results": [ + { + "typeid": "{72039442-EB38-4D42-A1AD-CB68F7E0EEF6}", + "details": { + "name": "int" + } + } + ] + }, + { + "base": "Erase", + "context": "{805FA2E4-1874-5919-A853-4EF984E5A82A}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Erase" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Erase is invoked" + }, + "details": { + "name": "Erase" + }, + "params": [ + { + "typeid": "{805FA2E4-1874-5919-A853-4EF984E5A82A}", + "details": { + "name": "AZStd::unordered_map" + } + }, + { + "typeid": "{652ED536-3402-439B-AEBE-4A5DBC554085}", + "details": { + "name": "AssetId" + } + } + ], + "results": [ + { + "typeid": "{805FA2E4-1874-5919-A853-4EF984E5A82A}", + "details": { + "name": "AZStd::unordered_map" + } + } + ] + }, + { + "base": "EraseCheck_VM", + "context": "{805FA2E4-1874-5919-A853-4EF984E5A82A}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke EraseCheck_VM" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after EraseCheck_VM is invoked" + }, + "details": { + "name": "EraseCheck_VM" + }, + "params": [ + { + "typeid": "{805FA2E4-1874-5919-A853-4EF984E5A82A}", + "details": { + "name": "AZStd::unordered_map" + } + }, + { + "typeid": "{652ED536-3402-439B-AEBE-4A5DBC554085}", + "details": { + "name": "AssetId" + } + } + ], + "results": [ + { + "typeid": "{A0CA880C-AFE4-43CB-926C-59AC48496112}", + "details": { + "name": "bool" + } + } + ] + }, + { + "base": "Clear", + "context": "{805FA2E4-1874-5919-A853-4EF984E5A82A}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Clear" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Clear is invoked" + }, + "details": { + "name": "Clear" + }, + "params": [ + { + "typeid": "{805FA2E4-1874-5919-A853-4EF984E5A82A}", + "details": { + "name": "AZStd::unordered_map" + } + } + ], + "results": [ + { + "typeid": "{805FA2E4-1874-5919-A853-4EF984E5A82A}", + "details": { + "name": "AZStd::unordered_map" + } + } + ] + }, + { + "base": "At", + "context": "{805FA2E4-1874-5919-A853-4EF984E5A82A}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke At" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after At is invoked" + }, + "details": { + "name": "At" + }, + "params": [ + { + "typeid": "{805FA2E4-1874-5919-A853-4EF984E5A82A}", + "details": { + "name": "AZStd::unordered_map" + } + }, + { + "typeid": "{652ED536-3402-439B-AEBE-4A5DBC554085}", + "details": { + "name": "AssetId" + } + } + ], + "results": [ + { + "typeid": "{6383F1D3-BB27-4E6B-A49A-6409B2059EAA}", + "details": { + "name": "EntityId", + "tooltip": "Entity Unique Id" + } + } + ] + }, + { + "base": "BucketCount", + "context": "{805FA2E4-1874-5919-A853-4EF984E5A82A}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke BucketCount" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after BucketCount is invoked" + }, + "details": { + "name": "BucketCount" + }, + "params": [ + { + "typeid": "{805FA2E4-1874-5919-A853-4EF984E5A82A}", + "details": { + "name": "AZStd::unordered_map" + } + } + ], + "results": [ + { + "typeid": "{D6597933-47CD-4FC8-B911-63F3E2B0993A}", + "details": { + "name": "AZ::u64" + } + } + ] + }, + { + "base": "Empty", + "context": "{805FA2E4-1874-5919-A853-4EF984E5A82A}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Empty" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Empty is invoked" + }, + "details": { + "name": "Empty" + }, + "params": [ + { + "typeid": "{805FA2E4-1874-5919-A853-4EF984E5A82A}", + "details": { + "name": "AZStd::unordered_map" + } + } + ], + "results": [ + { + "typeid": "{A0CA880C-AFE4-43CB-926C-59AC48496112}", + "details": { + "name": "bool" + } + } + ] + }, + { + "base": "Swap", + "context": "{805FA2E4-1874-5919-A853-4EF984E5A82A}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Swap" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Swap is invoked" + }, + "details": { + "name": "Swap" + }, + "params": [ + { + "typeid": "{805FA2E4-1874-5919-A853-4EF984E5A82A}", + "details": { + "name": "AZStd::unordered_map" + } + }, + { + "typeid": "{805FA2E4-1874-5919-A853-4EF984E5A82A}", + "details": { + "name": "AZStd::unordered_map" + } + } + ] + } + ] + }, + { + "base": "{03924488-C7F4-4D6D-948B-ABC2D1AE2FD3}", + "context": "OnDemandReflected", + "variant": "", + "details": { + "name": "any" + } + }, + { + "base": "{C7790D21-4BE7-5C18-A60D-01FCFE4E7E7A}", + "context": "OnDemandReflected", + "variant": "", + "details": { + "name": "Map", + "category": "Map", + "tooltip": "A collection of Key/Value pairs, where each Key value must be unique." + }, + "methods": [ + { + "base": "contains", + "context": "{C7790D21-4BE7-5C18-A60D-01FCFE4E7E7A}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke contains" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after contains is invoked" + }, + "details": { + "name": "contains" + }, + "params": [ + { + "typeid": "{C7790D21-4BE7-5C18-A60D-01FCFE4E7E7A}", + "details": { + "name": "AZStd::unordered_map" + } + }, + { + "typeid": "{652ED536-3402-439B-AEBE-4A5DBC554085}", + "details": { + "name": "AssetId" + } + } + ], + "results": [ + { + "typeid": "{A0CA880C-AFE4-43CB-926C-59AC48496112}", + "details": { + "name": "bool" + } + } + ] + }, + { + "base": "Insert", + "context": "{C7790D21-4BE7-5C18-A60D-01FCFE4E7E7A}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Insert" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Insert is invoked" + }, + "details": { + "name": "Insert" + }, + "params": [ + { + "typeid": "{C7790D21-4BE7-5C18-A60D-01FCFE4E7E7A}", + "details": { + "name": "AZStd::unordered_map" + } + }, + { + "typeid": "{652ED536-3402-439B-AEBE-4A5DBC554085}", + "details": { + "name": "AssetId" + } + }, + { + "typeid": "{3D80F623-C85C-4741-90D0-E4E66164E6BF}", + "details": { + "name": "Vector2" + } + } + ], + "results": [ + { + "typeid": "{C7790D21-4BE7-5C18-A60D-01FCFE4E7E7A}", + "details": { + "name": "AZStd::unordered_map" + } + } + ] + }, + { + "base": "Reserve", + "context": "{C7790D21-4BE7-5C18-A60D-01FCFE4E7E7A}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Reserve" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Reserve is invoked" + }, + "details": { + "name": "Reserve" + }, + "params": [ + { + "typeid": "{C7790D21-4BE7-5C18-A60D-01FCFE4E7E7A}", + "details": { + "name": "AZStd::unordered_map" + } + }, + { + "typeid": "{D6597933-47CD-4FC8-B911-63F3E2B0993A}", + "details": { + "name": "AZ::u64" + } + } + ] + }, + { + "base": "GetSize", + "context": "{C7790D21-4BE7-5C18-A60D-01FCFE4E7E7A}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke GetSize" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after GetSize is invoked" + }, + "details": { + "name": "GetSize" + }, + "params": [ + { + "typeid": "{C7790D21-4BE7-5C18-A60D-01FCFE4E7E7A}", + "details": { + "name": "AZStd::unordered_map" + } + } + ], + "results": [ + { + "typeid": "{72039442-EB38-4D42-A1AD-CB68F7E0EEF6}", + "details": { + "name": "int" + } + } + ] + }, + { + "base": "Iterate_VM", + "context": "{C7790D21-4BE7-5C18-A60D-01FCFE4E7E7A}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Iterate_VM" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Iterate_VM is invoked" + }, + "details": { + "name": "Iterate_VM" + }, + "params": [ + { + "typeid": "{C7790D21-4BE7-5C18-A60D-01FCFE4E7E7A}", + "details": { + "name": "AZStd::unordered_map" + } + } + ], + "results": [ + { + "typeid": "{6B584E48-782D-5E63-B3D4-0A4A6AA33D5C}", + "details": { + "name": "Iterator_VM, AZStd::equal_to, allocator>>" + } + } + ] + }, + { + "base": "GetKeys", + "context": "{C7790D21-4BE7-5C18-A60D-01FCFE4E7E7A}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke GetKeys" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after GetKeys is invoked" + }, + "details": { + "name": "GetKeys" + }, + "params": [ + { + "typeid": "{C7790D21-4BE7-5C18-A60D-01FCFE4E7E7A}", + "details": { + "name": "AZStd::unordered_map" + } + } + ], + "results": [ + { + "typeid": "{877C4A33-39B5-51D7-948D-F97DB81372A1}", + "details": { + "name": "AZStd::vector" + } + } + ] + }, + { + "base": "Size", + "context": "{C7790D21-4BE7-5C18-A60D-01FCFE4E7E7A}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Size" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Size is invoked" + }, + "details": { + "name": "Size" + }, + "params": [ + { + "typeid": "{C7790D21-4BE7-5C18-A60D-01FCFE4E7E7A}", + "details": { + "name": "AZStd::unordered_map" + } + } + ], + "results": [ + { + "typeid": "{72039442-EB38-4D42-A1AD-CB68F7E0EEF6}", + "details": { + "name": "int" + } + } + ] + }, + { + "base": "Erase", + "context": "{C7790D21-4BE7-5C18-A60D-01FCFE4E7E7A}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Erase" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Erase is invoked" + }, + "details": { + "name": "Erase" + }, + "params": [ + { + "typeid": "{C7790D21-4BE7-5C18-A60D-01FCFE4E7E7A}", + "details": { + "name": "AZStd::unordered_map" + } + }, + { + "typeid": "{652ED536-3402-439B-AEBE-4A5DBC554085}", + "details": { + "name": "AssetId" + } + } + ], + "results": [ + { + "typeid": "{C7790D21-4BE7-5C18-A60D-01FCFE4E7E7A}", + "details": { + "name": "AZStd::unordered_map" + } + } + ] + }, + { + "base": "EraseCheck_VM", + "context": "{C7790D21-4BE7-5C18-A60D-01FCFE4E7E7A}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke EraseCheck_VM" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after EraseCheck_VM is invoked" + }, + "details": { + "name": "EraseCheck_VM" + }, + "params": [ + { + "typeid": "{C7790D21-4BE7-5C18-A60D-01FCFE4E7E7A}", + "details": { + "name": "AZStd::unordered_map" + } + }, + { + "typeid": "{652ED536-3402-439B-AEBE-4A5DBC554085}", + "details": { + "name": "AssetId" + } + } + ], + "results": [ + { + "typeid": "{A0CA880C-AFE4-43CB-926C-59AC48496112}", + "details": { + "name": "bool" + } + } + ] + }, + { + "base": "Clear", + "context": "{C7790D21-4BE7-5C18-A60D-01FCFE4E7E7A}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Clear" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Clear is invoked" + }, + "details": { + "name": "Clear" + }, + "params": [ + { + "typeid": "{C7790D21-4BE7-5C18-A60D-01FCFE4E7E7A}", + "details": { + "name": "AZStd::unordered_map" + } + } + ], + "results": [ + { + "typeid": "{C7790D21-4BE7-5C18-A60D-01FCFE4E7E7A}", + "details": { + "name": "AZStd::unordered_map" + } + } + ] + }, + { + "base": "At", + "context": "{C7790D21-4BE7-5C18-A60D-01FCFE4E7E7A}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke At" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after At is invoked" + }, + "details": { + "name": "At" + }, + "params": [ + { + "typeid": "{C7790D21-4BE7-5C18-A60D-01FCFE4E7E7A}", + "details": { + "name": "AZStd::unordered_map" + } + }, + { + "typeid": "{652ED536-3402-439B-AEBE-4A5DBC554085}", + "details": { + "name": "AssetId" + } + } + ], + "results": [ + { + "typeid": "{3D80F623-C85C-4741-90D0-E4E66164E6BF}", + "details": { + "name": "Vector2" + } + } + ] + }, + { + "base": "BucketCount", + "context": "{C7790D21-4BE7-5C18-A60D-01FCFE4E7E7A}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke BucketCount" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after BucketCount is invoked" + }, + "details": { + "name": "BucketCount" + }, + "params": [ + { + "typeid": "{C7790D21-4BE7-5C18-A60D-01FCFE4E7E7A}", + "details": { + "name": "AZStd::unordered_map" + } + } + ], + "results": [ + { + "typeid": "{D6597933-47CD-4FC8-B911-63F3E2B0993A}", + "details": { + "name": "AZ::u64" + } + } + ] + }, + { + "base": "Empty", + "context": "{C7790D21-4BE7-5C18-A60D-01FCFE4E7E7A}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Empty" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Empty is invoked" + }, + "details": { + "name": "Empty" + }, + "params": [ + { + "typeid": "{C7790D21-4BE7-5C18-A60D-01FCFE4E7E7A}", + "details": { + "name": "AZStd::unordered_map" + } + } + ], + "results": [ + { + "typeid": "{A0CA880C-AFE4-43CB-926C-59AC48496112}", + "details": { + "name": "bool" + } + } + ] + }, + { + "base": "Swap", + "context": "{C7790D21-4BE7-5C18-A60D-01FCFE4E7E7A}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Swap" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Swap is invoked" + }, + "details": { + "name": "Swap" + }, + "params": [ + { + "typeid": "{C7790D21-4BE7-5C18-A60D-01FCFE4E7E7A}", + "details": { + "name": "AZStd::unordered_map" + } + }, + { + "typeid": "{C7790D21-4BE7-5C18-A60D-01FCFE4E7E7A}", + "details": { + "name": "AZStd::unordered_map" + } + } + ] + } + ] + }, + { + "base": "{1945B931-EBAA-5765-9C6C-265596AF68D5}", + "context": "OnDemandReflected", + "variant": "", + "details": { + "name": "Array", + "category": "Array", + "tooltip": "A dynamically sized container of elements." + }, + "methods": [ + { + "base": "Size", + "context": "{1945B931-EBAA-5765-9C6C-265596AF68D5}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Size" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Size is invoked" + }, + "details": { + "name": "Size" + }, + "params": [ + { + "typeid": "{1945B931-EBAA-5765-9C6C-265596AF68D5}", + "details": { + "name": "AZStd::vector&" + } + } + ], + "results": [ + { + "typeid": "{72039442-EB38-4D42-A1AD-CB68F7E0EEF6}", + "details": { + "name": "int" + } + } + ] + }, + { + "base": "Front", + "context": "{1945B931-EBAA-5765-9C6C-265596AF68D5}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Front" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Front is invoked" + }, + "details": { + "name": "Front" + }, + "params": [ + { + "typeid": "{1945B931-EBAA-5765-9C6C-265596AF68D5}", + "details": { + "name": "AZStd::vector*" + } + } + ], + "results": [ + { + "typeid": "{3AB0037F-AF8D-48CE-BCA0-A170D18B2C03}", + "details": { + "name": "char" + } + } + ] + }, + { + "base": "HasKey", + "context": "{1945B931-EBAA-5765-9C6C-265596AF68D5}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Has Key" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Has Key is invoked" + }, + "details": { + "name": "Has Key" + }, + "params": [ + { + "typeid": "{1945B931-EBAA-5765-9C6C-265596AF68D5}", + "details": { + "name": "AZStd::vector&" + } + }, + { + "typeid": "{D6597933-47CD-4FC8-B911-63F3E2B0993A}", + "details": { + "name": "AZ::u64" + } + } + ], + "results": [ + { + "typeid": "{A0CA880C-AFE4-43CB-926C-59AC48496112}", + "details": { + "name": "bool" + } + } + ] + }, + { + "base": "Resize", + "context": "{1945B931-EBAA-5765-9C6C-265596AF68D5}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Resize" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Resize is invoked" + }, + "details": { + "name": "Resize" + }, + "params": [ + { + "typeid": "{1945B931-EBAA-5765-9C6C-265596AF68D5}", + "details": { + "name": "AZStd::vector*" + } + }, + { + "typeid": "{D6597933-47CD-4FC8-B911-63F3E2B0993A}", + "details": { + "name": "AZ::u64" + } + } + ] + }, + { + "base": "at", + "context": "{1945B931-EBAA-5765-9C6C-265596AF68D5}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke at" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after at is invoked" + }, + "details": { + "name": "at" + }, + "params": [ + { + "typeid": "{1945B931-EBAA-5765-9C6C-265596AF68D5}", + "details": { + "name": "AZStd::vector*" + } + }, + { + "typeid": "{D6597933-47CD-4FC8-B911-63F3E2B0993A}", + "details": { + "name": "AZ::u64" + } + } + ], + "results": [ + { + "typeid": "{3AB0037F-AF8D-48CE-BCA0-A170D18B2C03}", + "details": { + "name": "char" + } + } + ] + }, + { + "base": "Back", + "context": "{1945B931-EBAA-5765-9C6C-265596AF68D5}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Back" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Back is invoked" + }, + "details": { + "name": "Back" + }, + "params": [ + { + "typeid": "{1945B931-EBAA-5765-9C6C-265596AF68D5}", + "details": { + "name": "AZStd::vector*" + } + } + ], + "results": [ + { + "typeid": "{3AB0037F-AF8D-48CE-BCA0-A170D18B2C03}", + "details": { + "name": "char" + } + } + ] + }, + { + "base": "pop_back", + "context": "{1945B931-EBAA-5765-9C6C-265596AF68D5}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke pop_back" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after pop_back is invoked" + }, + "details": { + "name": "pop_back" + }, + "params": [ + { + "typeid": "{1945B931-EBAA-5765-9C6C-265596AF68D5}", + "details": { + "name": "AZStd::vector*" + } + } + ] + }, + { + "base": "size", + "context": "{1945B931-EBAA-5765-9C6C-265596AF68D5}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke size" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after size is invoked" + }, + "details": { + "name": "size" + }, + "params": [ + { + "typeid": "{1945B931-EBAA-5765-9C6C-265596AF68D5}", + "details": { + "name": "AZStd::vector&" + } + } + ], + "results": [ + { + "typeid": "{72039442-EB38-4D42-A1AD-CB68F7E0EEF6}", + "details": { + "name": "int" + } + } + ] + }, + { + "base": "At", + "context": "{1945B931-EBAA-5765-9C6C-265596AF68D5}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke At" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after At is invoked" + }, + "details": { + "name": "At" + }, + "params": [ + { + "typeid": "{1945B931-EBAA-5765-9C6C-265596AF68D5}", + "details": { + "name": "AZStd::vector*" + } + }, + { + "typeid": "{D6597933-47CD-4FC8-B911-63F3E2B0993A}", + "details": { + "name": "AZ::u64" + } + } + ], + "results": [ + { + "typeid": "{3AB0037F-AF8D-48CE-BCA0-A170D18B2C03}", + "details": { + "name": "char" + } + } + ] + }, + { + "base": "Empty", + "context": "{1945B931-EBAA-5765-9C6C-265596AF68D5}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Empty" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Empty is invoked" + }, + "details": { + "name": "Empty" + }, + "params": [ + { + "typeid": "{1945B931-EBAA-5765-9C6C-265596AF68D5}", + "details": { + "name": "AZStd::vector*" + } + } + ], + "results": [ + { + "typeid": "{A0CA880C-AFE4-43CB-926C-59AC48496112}", + "details": { + "name": "bool" + } + } + ] + }, + { + "base": "Swap", + "context": "{1945B931-EBAA-5765-9C6C-265596AF68D5}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Swap" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Swap is invoked" + }, + "details": { + "name": "Swap" + }, + "params": [ + { + "typeid": "{1945B931-EBAA-5765-9C6C-265596AF68D5}", + "details": { + "name": "AZStd::vector*" + } + }, + { + "typeid": "{1945B931-EBAA-5765-9C6C-265596AF68D5}", + "details": { + "name": "AZStd::vector&" + } + } + ] + }, + { + "base": "push_back", + "context": "{1945B931-EBAA-5765-9C6C-265596AF68D5}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke push_back" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after push_back is invoked" + }, + "details": { + "name": "push_back" + }, + "params": [ + { + "typeid": "{1945B931-EBAA-5765-9C6C-265596AF68D5}", + "details": { + "name": "AZStd::vector*" + } + }, + { + "typeid": "{3AB0037F-AF8D-48CE-BCA0-A170D18B2C03}", + "details": { + "name": "char" + } + } + ] + }, + { + "base": "PushBack_VM", + "context": "{1945B931-EBAA-5765-9C6C-265596AF68D5}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke PushBack_VM" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after PushBack_VM is invoked" + }, + "details": { + "name": "PushBack_VM" + }, + "params": [ + { + "typeid": "{1945B931-EBAA-5765-9C6C-265596AF68D5}", + "details": { + "name": "AZStd::vector&" + } + }, + { + "typeid": "{3AB0037F-AF8D-48CE-BCA0-A170D18B2C03}", + "details": { + "name": "char" + } + } + ], + "results": [ + { + "typeid": "{1945B931-EBAA-5765-9C6C-265596AF68D5}", + "details": { + "name": "AZStd::vector&" + } + } + ] + }, + { + "base": "AtUnchecked", + "context": "{1945B931-EBAA-5765-9C6C-265596AF68D5}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke AtUnchecked" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after AtUnchecked is invoked" + }, + "details": { + "name": "AtUnchecked" + }, + "params": [ + { + "typeid": "{1945B931-EBAA-5765-9C6C-265596AF68D5}", + "details": { + "name": "AZStd::vector*" + } + }, + { + "typeid": "{D6597933-47CD-4FC8-B911-63F3E2B0993A}", + "details": { + "name": "AZ::u64" + } + } + ], + "results": [ + { + "typeid": "{3AB0037F-AF8D-48CE-BCA0-A170D18B2C03}", + "details": { + "name": "char" + } + } + ] + }, + { + "base": "clear", + "context": "{1945B931-EBAA-5765-9C6C-265596AF68D5}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke clear" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after clear is invoked" + }, + "details": { + "name": "clear" + }, + "params": [ + { + "typeid": "{1945B931-EBAA-5765-9C6C-265596AF68D5}", + "details": { + "name": "AZStd::vector*" + } + } + ] + }, + { + "base": "NotEmpty", + "context": "{1945B931-EBAA-5765-9C6C-265596AF68D5}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke NotEmpty" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after NotEmpty is invoked" + }, + "details": { + "name": "NotEmpty" + }, + "params": [ + { + "typeid": "{1945B931-EBAA-5765-9C6C-265596AF68D5}", + "details": { + "name": "AZStd::vector&" + } + } + ], + "results": [ + { + "typeid": "{A0CA880C-AFE4-43CB-926C-59AC48496112}", + "details": { + "name": "bool" + } + } + ] + }, + { + "base": "Erase_VM", + "context": "{1945B931-EBAA-5765-9C6C-265596AF68D5}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Erase_VM" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Erase_VM is invoked" + }, + "details": { + "name": "Erase_VM" + }, + "params": [ + { + "typeid": "{1945B931-EBAA-5765-9C6C-265596AF68D5}", + "details": { + "name": "AZStd::vector&" + } + }, + { + "typeid": "{D6597933-47CD-4FC8-B911-63F3E2B0993A}", + "details": { + "name": "AZ::u64" + } + } + ], + "results": [ + { + "typeid": "{1945B931-EBAA-5765-9C6C-265596AF68D5}", + "details": { + "name": "AZStd::vector&" + } + } + ] + }, + { + "base": "EraseCheck_VM", + "context": "{1945B931-EBAA-5765-9C6C-265596AF68D5}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke EraseCheck_VM" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after EraseCheck_VM is invoked" + }, + "details": { + "name": "EraseCheck_VM" + }, + "params": [ + { + "typeid": "{1945B931-EBAA-5765-9C6C-265596AF68D5}", + "details": { + "name": "AZStd::vector&" + } + }, + { + "typeid": "{D6597933-47CD-4FC8-B911-63F3E2B0993A}", + "details": { + "name": "AZ::u64" + } + } + ], + "results": [ + { + "typeid": "{A0CA880C-AFE4-43CB-926C-59AC48496112}", + "details": { + "name": "bool" + } + } + ] + }, + { + "base": "Capacity", + "context": "{1945B931-EBAA-5765-9C6C-265596AF68D5}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Capacity" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Capacity is invoked" + }, + "details": { + "name": "Capacity" + }, + "params": [ + { + "typeid": "{1945B931-EBAA-5765-9C6C-265596AF68D5}", + "details": { + "name": "AZStd::vector*" + } + } + ], + "results": [ + { + "typeid": "{D6597933-47CD-4FC8-B911-63F3E2B0993A}", + "details": { + "name": "AZ::u64" + } + } + ] + }, + { + "base": "Clear", + "context": "{1945B931-EBAA-5765-9C6C-265596AF68D5}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Clear" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Clear is invoked" + }, + "details": { + "name": "Clear" + }, + "params": [ + { + "typeid": "{1945B931-EBAA-5765-9C6C-265596AF68D5}", + "details": { + "name": "AZStd::vector&" + } + } + ], + "results": [ + { + "typeid": "{1945B931-EBAA-5765-9C6C-265596AF68D5}", + "details": { + "name": "AZStd::vector&" + } + } + ] + }, + { + "base": "AssignAt", + "context": "{1945B931-EBAA-5765-9C6C-265596AF68D5}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke AssignAt" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after AssignAt is invoked" + }, + "details": { + "name": "AssignAt" + }, + "params": [ + { + "typeid": "{1945B931-EBAA-5765-9C6C-265596AF68D5}", + "details": { + "name": "AZStd::vector&" + } + }, + { + "typeid": "{D6597933-47CD-4FC8-B911-63F3E2B0993A}", + "details": { + "name": "AZ::u64" + } + }, + { + "typeid": "{3AB0037F-AF8D-48CE-BCA0-A170D18B2C03}", + "details": { + "name": "char" + } + } + ] + }, + { + "base": "GetSize", + "context": "{1945B931-EBAA-5765-9C6C-265596AF68D5}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke GetSize" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after GetSize is invoked" + }, + "details": { + "name": "GetSize" + }, + "params": [ + { + "typeid": "{1945B931-EBAA-5765-9C6C-265596AF68D5}", + "details": { + "name": "AZStd::vector&" + } + } + ], + "results": [ + { + "typeid": "{72039442-EB38-4D42-A1AD-CB68F7E0EEF6}", + "details": { + "name": "int" + } + } + ] + }, + { + "base": "Insert", + "context": "{1945B931-EBAA-5765-9C6C-265596AF68D5}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Insert" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Insert is invoked" + }, + "details": { + "name": "Insert" + }, + "params": [ + { + "typeid": "{1945B931-EBAA-5765-9C6C-265596AF68D5}", + "details": { + "name": "AZStd::vector&" + } + }, + { + "typeid": "{D6597933-47CD-4FC8-B911-63F3E2B0993A}", + "details": { + "name": "AZ::u64" + } + }, + { + "typeid": "{3AB0037F-AF8D-48CE-BCA0-A170D18B2C03}", + "details": { + "name": "char" + } + } + ], + "results": [ + { + "typeid": "{1945B931-EBAA-5765-9C6C-265596AF68D5}", + "details": { + "name": "AZStd::vector&" + } + } + ] + }, + { + "base": "PushBack", + "context": "{1945B931-EBAA-5765-9C6C-265596AF68D5}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke PushBack" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after PushBack is invoked" + }, + "details": { + "name": "PushBack" + }, + "params": [ + { + "typeid": "{1945B931-EBAA-5765-9C6C-265596AF68D5}", + "details": { + "name": "AZStd::vector*" + } + }, + { + "typeid": "{3AB0037F-AF8D-48CE-BCA0-A170D18B2C03}", + "details": { + "name": "char" + } + } + ] + }, + { + "base": "Reserve", + "context": "{1945B931-EBAA-5765-9C6C-265596AF68D5}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Reserve" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Reserve is invoked" + }, + "details": { + "name": "Reserve" + }, + "params": [ + { + "typeid": "{1945B931-EBAA-5765-9C6C-265596AF68D5}", + "details": { + "name": "AZStd::vector*" + } + }, + { + "typeid": "{D6597933-47CD-4FC8-B911-63F3E2B0993A}", + "details": { + "name": "AZ::u64" + } + } + ] + }, + { + "base": "Iterate_VM", + "context": "{1945B931-EBAA-5765-9C6C-265596AF68D5}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Iterate_VM" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Iterate_VM is invoked" + }, + "details": { + "name": "Iterate_VM" + }, + "params": [ + { + "typeid": "{1945B931-EBAA-5765-9C6C-265596AF68D5}", + "details": { + "name": "AZStd::vector&" + } + } + ], + "results": [ + { + "typeid": "{93F8A96C-BDBF-5E87-ACEB-81B6DC75B1AD}", + "details": { + "name": "Iterator_VM>" + } + } + ] + } + ] + }, + { + "base": "{877C4A33-39B5-51D7-948D-F97DB81372A1}", + "context": "OnDemandReflected", + "variant": "", + "details": { + "name": "Array", + "category": "Array", + "tooltip": "A dynamically sized container of elements." + }, + "methods": [ + { + "base": "Size", + "context": "{877C4A33-39B5-51D7-948D-F97DB81372A1}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Size" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Size is invoked" + }, + "details": { + "name": "Size" + }, + "params": [ + { + "typeid": "{877C4A33-39B5-51D7-948D-F97DB81372A1}", + "details": { + "name": "AZStd::vector" + } + } + ], + "results": [ + { + "typeid": "{72039442-EB38-4D42-A1AD-CB68F7E0EEF6}", + "details": { + "name": "int" + } + } + ] + }, + { + "base": "Front", + "context": "{877C4A33-39B5-51D7-948D-F97DB81372A1}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Front" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Front is invoked" + }, + "details": { + "name": "Front" + }, + "params": [ + { + "typeid": "{877C4A33-39B5-51D7-948D-F97DB81372A1}", + "details": { + "name": "AZStd::vector" + } + } + ], + "results": [ + { + "typeid": "{652ED536-3402-439B-AEBE-4A5DBC554085}", + "details": { + "name": "AssetId" + } + } + ] + }, + { + "base": "HasKey", + "context": "{877C4A33-39B5-51D7-948D-F97DB81372A1}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Has Key" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Has Key is invoked" + }, + "details": { + "name": "Has Key" + }, + "params": [ + { + "typeid": "{877C4A33-39B5-51D7-948D-F97DB81372A1}", + "details": { + "name": "AZStd::vector" + } + }, + { + "typeid": "{D6597933-47CD-4FC8-B911-63F3E2B0993A}", + "details": { + "name": "AZ::u64" + } + } + ], + "results": [ + { + "typeid": "{A0CA880C-AFE4-43CB-926C-59AC48496112}", + "details": { + "name": "bool" + } + } + ] + }, + { + "base": "Resize", + "context": "{877C4A33-39B5-51D7-948D-F97DB81372A1}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Resize" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Resize is invoked" + }, + "details": { + "name": "Resize" + }, + "params": [ + { + "typeid": "{877C4A33-39B5-51D7-948D-F97DB81372A1}", + "details": { + "name": "AZStd::vector" + } + }, + { + "typeid": "{D6597933-47CD-4FC8-B911-63F3E2B0993A}", + "details": { + "name": "AZ::u64" + } + } + ] + }, + { + "base": "at", + "context": "{877C4A33-39B5-51D7-948D-F97DB81372A1}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke at" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after at is invoked" + }, + "details": { + "name": "at" + }, + "params": [ + { + "typeid": "{877C4A33-39B5-51D7-948D-F97DB81372A1}", + "details": { + "name": "AZStd::vector" + } + }, + { + "typeid": "{D6597933-47CD-4FC8-B911-63F3E2B0993A}", + "details": { + "name": "AZ::u64" + } + } + ], + "results": [ + { + "typeid": "{652ED536-3402-439B-AEBE-4A5DBC554085}", + "details": { + "name": "AssetId" + } + } + ] + }, + { + "base": "Back", + "context": "{877C4A33-39B5-51D7-948D-F97DB81372A1}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Back" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Back is invoked" + }, + "details": { + "name": "Back" + }, + "params": [ + { + "typeid": "{877C4A33-39B5-51D7-948D-F97DB81372A1}", + "details": { + "name": "AZStd::vector" + } + } + ], + "results": [ + { + "typeid": "{652ED536-3402-439B-AEBE-4A5DBC554085}", + "details": { + "name": "AssetId" + } + } + ] + }, + { + "base": "pop_back", + "context": "{877C4A33-39B5-51D7-948D-F97DB81372A1}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke pop_back" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after pop_back is invoked" + }, + "details": { + "name": "pop_back" + }, + "params": [ + { + "typeid": "{877C4A33-39B5-51D7-948D-F97DB81372A1}", + "details": { + "name": "AZStd::vector" + } + } + ] + }, + { + "base": "size", + "context": "{877C4A33-39B5-51D7-948D-F97DB81372A1}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke size" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after size is invoked" + }, + "details": { + "name": "size" + }, + "params": [ + { + "typeid": "{877C4A33-39B5-51D7-948D-F97DB81372A1}", + "details": { + "name": "AZStd::vector" + } + } + ], + "results": [ + { + "typeid": "{72039442-EB38-4D42-A1AD-CB68F7E0EEF6}", + "details": { + "name": "int" + } + } + ] + }, + { + "base": "At", + "context": "{877C4A33-39B5-51D7-948D-F97DB81372A1}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke At" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after At is invoked" + }, + "details": { + "name": "At" + }, + "params": [ + { + "typeid": "{877C4A33-39B5-51D7-948D-F97DB81372A1}", + "details": { + "name": "AZStd::vector" + } + }, + { + "typeid": "{D6597933-47CD-4FC8-B911-63F3E2B0993A}", + "details": { + "name": "AZ::u64" + } + } + ], + "results": [ + { + "typeid": "{652ED536-3402-439B-AEBE-4A5DBC554085}", + "details": { + "name": "AssetId" + } + } + ] + }, + { + "base": "Empty", + "context": "{877C4A33-39B5-51D7-948D-F97DB81372A1}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Empty" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Empty is invoked" + }, + "details": { + "name": "Empty" + }, + "params": [ + { + "typeid": "{877C4A33-39B5-51D7-948D-F97DB81372A1}", + "details": { + "name": "AZStd::vector" + } + } + ], + "results": [ + { + "typeid": "{A0CA880C-AFE4-43CB-926C-59AC48496112}", + "details": { + "name": "bool" + } + } + ] + }, + { + "base": "Swap", + "context": "{877C4A33-39B5-51D7-948D-F97DB81372A1}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Swap" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Swap is invoked" + }, + "details": { + "name": "Swap" + }, + "params": [ + { + "typeid": "{877C4A33-39B5-51D7-948D-F97DB81372A1}", + "details": { + "name": "AZStd::vector" + } + }, + { + "typeid": "{877C4A33-39B5-51D7-948D-F97DB81372A1}", + "details": { + "name": "AZStd::vector" + } + } + ] + }, + { + "base": "push_back", + "context": "{877C4A33-39B5-51D7-948D-F97DB81372A1}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke push_back" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after push_back is invoked" + }, + "details": { + "name": "push_back" + }, + "params": [ + { + "typeid": "{877C4A33-39B5-51D7-948D-F97DB81372A1}", + "details": { + "name": "AZStd::vector" + } + }, + { + "typeid": "{652ED536-3402-439B-AEBE-4A5DBC554085}", + "details": { + "name": "AssetId" + } + } + ] + }, + { + "base": "PushBack_VM", + "context": "{877C4A33-39B5-51D7-948D-F97DB81372A1}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke PushBack_VM" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after PushBack_VM is invoked" + }, + "details": { + "name": "PushBack_VM" + }, + "params": [ + { + "typeid": "{877C4A33-39B5-51D7-948D-F97DB81372A1}", + "details": { + "name": "AZStd::vector" + } + }, + { + "typeid": "{652ED536-3402-439B-AEBE-4A5DBC554085}", + "details": { + "name": "AssetId" + } + } + ], + "results": [ + { + "typeid": "{877C4A33-39B5-51D7-948D-F97DB81372A1}", + "details": { + "name": "AZStd::vector" + } + } + ] + }, + { + "base": "AtUnchecked", + "context": "{877C4A33-39B5-51D7-948D-F97DB81372A1}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke AtUnchecked" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after AtUnchecked is invoked" + }, + "details": { + "name": "AtUnchecked" + }, + "params": [ + { + "typeid": "{877C4A33-39B5-51D7-948D-F97DB81372A1}", + "details": { + "name": "AZStd::vector" + } + }, + { + "typeid": "{D6597933-47CD-4FC8-B911-63F3E2B0993A}", + "details": { + "name": "AZ::u64" + } + } + ], + "results": [ + { + "typeid": "{652ED536-3402-439B-AEBE-4A5DBC554085}", + "details": { + "name": "AssetId" + } + } + ] + }, + { + "base": "clear", + "context": "{877C4A33-39B5-51D7-948D-F97DB81372A1}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke clear" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after clear is invoked" + }, + "details": { + "name": "clear" + }, + "params": [ + { + "typeid": "{877C4A33-39B5-51D7-948D-F97DB81372A1}", + "details": { + "name": "AZStd::vector" + } + } + ] + }, + { + "base": "NotEmpty", + "context": "{877C4A33-39B5-51D7-948D-F97DB81372A1}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke NotEmpty" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after NotEmpty is invoked" + }, + "details": { + "name": "NotEmpty" + }, + "params": [ + { + "typeid": "{877C4A33-39B5-51D7-948D-F97DB81372A1}", + "details": { + "name": "AZStd::vector" + } + } + ], + "results": [ + { + "typeid": "{A0CA880C-AFE4-43CB-926C-59AC48496112}", + "details": { + "name": "bool" + } + } + ] + }, + { + "base": "Erase_VM", + "context": "{877C4A33-39B5-51D7-948D-F97DB81372A1}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Erase_VM" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Erase_VM is invoked" + }, + "details": { + "name": "Erase_VM" + }, + "params": [ + { + "typeid": "{877C4A33-39B5-51D7-948D-F97DB81372A1}", + "details": { + "name": "AZStd::vector" + } + }, + { + "typeid": "{D6597933-47CD-4FC8-B911-63F3E2B0993A}", + "details": { + "name": "AZ::u64" + } + } + ], + "results": [ + { + "typeid": "{877C4A33-39B5-51D7-948D-F97DB81372A1}", + "details": { + "name": "AZStd::vector" + } + } + ] + }, + { + "base": "EraseCheck_VM", + "context": "{877C4A33-39B5-51D7-948D-F97DB81372A1}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke EraseCheck_VM" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after EraseCheck_VM is invoked" + }, + "details": { + "name": "EraseCheck_VM" + }, + "params": [ + { + "typeid": "{877C4A33-39B5-51D7-948D-F97DB81372A1}", + "details": { + "name": "AZStd::vector" + } + }, + { + "typeid": "{D6597933-47CD-4FC8-B911-63F3E2B0993A}", + "details": { + "name": "AZ::u64" + } + } + ], + "results": [ + { + "typeid": "{A0CA880C-AFE4-43CB-926C-59AC48496112}", + "details": { + "name": "bool" + } + } + ] + }, + { + "base": "Capacity", + "context": "{877C4A33-39B5-51D7-948D-F97DB81372A1}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Capacity" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Capacity is invoked" + }, + "details": { + "name": "Capacity" + }, + "params": [ + { + "typeid": "{877C4A33-39B5-51D7-948D-F97DB81372A1}", + "details": { + "name": "AZStd::vector" + } + } + ], + "results": [ + { + "typeid": "{D6597933-47CD-4FC8-B911-63F3E2B0993A}", + "details": { + "name": "AZ::u64" + } + } + ] + }, + { + "base": "Clear", + "context": "{877C4A33-39B5-51D7-948D-F97DB81372A1}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Clear" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Clear is invoked" + }, + "details": { + "name": "Clear" + }, + "params": [ + { + "typeid": "{877C4A33-39B5-51D7-948D-F97DB81372A1}", + "details": { + "name": "AZStd::vector" + } + } + ], + "results": [ + { + "typeid": "{877C4A33-39B5-51D7-948D-F97DB81372A1}", + "details": { + "name": "AZStd::vector" + } + } + ] + }, + { + "base": "AssignAt", + "context": "{877C4A33-39B5-51D7-948D-F97DB81372A1}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke AssignAt" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after AssignAt is invoked" + }, + "details": { + "name": "AssignAt" + }, + "params": [ + { + "typeid": "{877C4A33-39B5-51D7-948D-F97DB81372A1}", + "details": { + "name": "AZStd::vector" + } + }, + { + "typeid": "{D6597933-47CD-4FC8-B911-63F3E2B0993A}", + "details": { + "name": "AZ::u64" + } + }, + { + "typeid": "{652ED536-3402-439B-AEBE-4A5DBC554085}", + "details": { + "name": "AssetId" + } + } + ] + }, + { + "base": "GetSize", + "context": "{877C4A33-39B5-51D7-948D-F97DB81372A1}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke GetSize" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after GetSize is invoked" + }, + "details": { + "name": "GetSize" + }, + "params": [ + { + "typeid": "{877C4A33-39B5-51D7-948D-F97DB81372A1}", + "details": { + "name": "AZStd::vector" + } + } + ], + "results": [ + { + "typeid": "{72039442-EB38-4D42-A1AD-CB68F7E0EEF6}", + "details": { + "name": "int" + } + } + ] + }, + { + "base": "Insert", + "context": "{877C4A33-39B5-51D7-948D-F97DB81372A1}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Insert" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Insert is invoked" + }, + "details": { + "name": "Insert" + }, + "params": [ + { + "typeid": "{877C4A33-39B5-51D7-948D-F97DB81372A1}", + "details": { + "name": "AZStd::vector" + } + }, + { + "typeid": "{D6597933-47CD-4FC8-B911-63F3E2B0993A}", + "details": { + "name": "AZ::u64" + } + }, + { + "typeid": "{652ED536-3402-439B-AEBE-4A5DBC554085}", + "details": { + "name": "AssetId" + } + } + ], + "results": [ + { + "typeid": "{877C4A33-39B5-51D7-948D-F97DB81372A1}", + "details": { + "name": "AZStd::vector" + } + } + ] + }, + { + "base": "PushBack", + "context": "{877C4A33-39B5-51D7-948D-F97DB81372A1}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke PushBack" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after PushBack is invoked" + }, + "details": { + "name": "PushBack" + }, + "params": [ + { + "typeid": "{877C4A33-39B5-51D7-948D-F97DB81372A1}", + "details": { + "name": "AZStd::vector" + } + }, + { + "typeid": "{652ED536-3402-439B-AEBE-4A5DBC554085}", + "details": { + "name": "AssetId" + } + } + ] + }, + { + "base": "Reserve", + "context": "{877C4A33-39B5-51D7-948D-F97DB81372A1}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Reserve" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Reserve is invoked" + }, + "details": { + "name": "Reserve" + }, + "params": [ + { + "typeid": "{877C4A33-39B5-51D7-948D-F97DB81372A1}", + "details": { + "name": "AZStd::vector" + } + }, + { + "typeid": "{D6597933-47CD-4FC8-B911-63F3E2B0993A}", + "details": { + "name": "AZ::u64" + } + } + ] + }, + { + "base": "Iterate_VM", + "context": "{877C4A33-39B5-51D7-948D-F97DB81372A1}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Iterate_VM" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Iterate_VM is invoked" + }, + "details": { + "name": "Iterate_VM" + }, + "params": [ + { + "typeid": "{877C4A33-39B5-51D7-948D-F97DB81372A1}", + "details": { + "name": "AZStd::vector" + } + } + ], + "results": [ + { + "typeid": "{1B7AE681-F277-502F-8AD7-7DF51D4F94EC}", + "details": { + "name": "Iterator_VM>" + } + } + ] + } + ] + }, + { + "base": "{E7E44B3A-15C3-5420-A930-EB9ED7F0D7D9}", + "context": "OnDemandReflected", + "variant": "", + "details": { + "name": "Array", + "category": "Array", + "tooltip": "A dynamically sized container of elements." + }, + "methods": [ + { + "base": "Size", + "context": "{E7E44B3A-15C3-5420-A930-EB9ED7F0D7D9}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Size" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Size is invoked" + }, + "details": { + "name": "Size" + }, + "params": [ + { + "typeid": "{E7E44B3A-15C3-5420-A930-EB9ED7F0D7D9}", + "details": { + "name": "AZStd::vector" + } + } + ], + "results": [ + { + "typeid": "{72039442-EB38-4D42-A1AD-CB68F7E0EEF6}", + "details": { + "name": "int" + } + } + ] + }, + { + "base": "Front", + "context": "{E7E44B3A-15C3-5420-A930-EB9ED7F0D7D9}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Front" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Front is invoked" + }, + "details": { + "name": "Front" + }, + "params": [ + { + "typeid": "{E7E44B3A-15C3-5420-A930-EB9ED7F0D7D9}", + "details": { + "name": "AZStd::vector" + } + } + ], + "results": [ + { + "typeid": "{3D2B920C-9EFD-40D5-AAE0-DF131C3D4931}", + "details": { + "name": "Name" + } + } + ] + }, + { + "base": "HasKey", + "context": "{E7E44B3A-15C3-5420-A930-EB9ED7F0D7D9}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Has Key" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Has Key is invoked" + }, + "details": { + "name": "Has Key" + }, + "params": [ + { + "typeid": "{E7E44B3A-15C3-5420-A930-EB9ED7F0D7D9}", + "details": { + "name": "AZStd::vector" + } + }, + { + "typeid": "{D6597933-47CD-4FC8-B911-63F3E2B0993A}", + "details": { + "name": "AZ::u64" + } + } + ], + "results": [ + { + "typeid": "{A0CA880C-AFE4-43CB-926C-59AC48496112}", + "details": { + "name": "bool" + } + } + ] + }, + { + "base": "Resize", + "context": "{E7E44B3A-15C3-5420-A930-EB9ED7F0D7D9}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Resize" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Resize is invoked" + }, + "details": { + "name": "Resize" + }, + "params": [ + { + "typeid": "{E7E44B3A-15C3-5420-A930-EB9ED7F0D7D9}", + "details": { + "name": "AZStd::vector" + } + }, + { + "typeid": "{D6597933-47CD-4FC8-B911-63F3E2B0993A}", + "details": { + "name": "AZ::u64" + } + } + ] + }, + { + "base": "at", + "context": "{E7E44B3A-15C3-5420-A930-EB9ED7F0D7D9}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke at" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after at is invoked" + }, + "details": { + "name": "at" + }, + "params": [ + { + "typeid": "{E7E44B3A-15C3-5420-A930-EB9ED7F0D7D9}", + "details": { + "name": "AZStd::vector" + } + }, + { + "typeid": "{D6597933-47CD-4FC8-B911-63F3E2B0993A}", + "details": { + "name": "AZ::u64" + } + } + ], + "results": [ + { + "typeid": "{3D2B920C-9EFD-40D5-AAE0-DF131C3D4931}", + "details": { + "name": "Name" + } + } + ] + }, + { + "base": "Back", + "context": "{E7E44B3A-15C3-5420-A930-EB9ED7F0D7D9}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Back" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Back is invoked" + }, + "details": { + "name": "Back" + }, + "params": [ + { + "typeid": "{E7E44B3A-15C3-5420-A930-EB9ED7F0D7D9}", + "details": { + "name": "AZStd::vector" + } + } + ], + "results": [ + { + "typeid": "{3D2B920C-9EFD-40D5-AAE0-DF131C3D4931}", + "details": { + "name": "Name" + } + } + ] + }, + { + "base": "pop_back", + "context": "{E7E44B3A-15C3-5420-A930-EB9ED7F0D7D9}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke pop_back" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after pop_back is invoked" + }, + "details": { + "name": "pop_back" + }, + "params": [ + { + "typeid": "{E7E44B3A-15C3-5420-A930-EB9ED7F0D7D9}", + "details": { + "name": "AZStd::vector" + } + } + ] + }, + { + "base": "size", + "context": "{E7E44B3A-15C3-5420-A930-EB9ED7F0D7D9}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke size" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after size is invoked" + }, + "details": { + "name": "size" + }, + "params": [ + { + "typeid": "{E7E44B3A-15C3-5420-A930-EB9ED7F0D7D9}", + "details": { + "name": "AZStd::vector" + } + } + ], + "results": [ + { + "typeid": "{72039442-EB38-4D42-A1AD-CB68F7E0EEF6}", + "details": { + "name": "int" + } + } + ] + }, + { + "base": "At", + "context": "{E7E44B3A-15C3-5420-A930-EB9ED7F0D7D9}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke At" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after At is invoked" + }, + "details": { + "name": "At" + }, + "params": [ + { + "typeid": "{E7E44B3A-15C3-5420-A930-EB9ED7F0D7D9}", + "details": { + "name": "AZStd::vector" + } + }, + { + "typeid": "{D6597933-47CD-4FC8-B911-63F3E2B0993A}", + "details": { + "name": "AZ::u64" + } + } + ], + "results": [ + { + "typeid": "{3D2B920C-9EFD-40D5-AAE0-DF131C3D4931}", + "details": { + "name": "Name" + } + } + ] + }, + { + "base": "Empty", + "context": "{E7E44B3A-15C3-5420-A930-EB9ED7F0D7D9}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Empty" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Empty is invoked" + }, + "details": { + "name": "Empty" + }, + "params": [ + { + "typeid": "{E7E44B3A-15C3-5420-A930-EB9ED7F0D7D9}", + "details": { + "name": "AZStd::vector" + } + } + ], + "results": [ + { + "typeid": "{A0CA880C-AFE4-43CB-926C-59AC48496112}", + "details": { + "name": "bool" + } + } + ] + }, + { + "base": "Swap", + "context": "{E7E44B3A-15C3-5420-A930-EB9ED7F0D7D9}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Swap" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Swap is invoked" + }, + "details": { + "name": "Swap" + }, + "params": [ + { + "typeid": "{E7E44B3A-15C3-5420-A930-EB9ED7F0D7D9}", + "details": { + "name": "AZStd::vector" + } + }, + { + "typeid": "{E7E44B3A-15C3-5420-A930-EB9ED7F0D7D9}", + "details": { + "name": "AZStd::vector" + } + } + ] + }, + { + "base": "push_back", + "context": "{E7E44B3A-15C3-5420-A930-EB9ED7F0D7D9}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke push_back" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after push_back is invoked" + }, + "details": { + "name": "push_back" + }, + "params": [ + { + "typeid": "{E7E44B3A-15C3-5420-A930-EB9ED7F0D7D9}", + "details": { + "name": "AZStd::vector" + } + }, + { + "typeid": "{3D2B920C-9EFD-40D5-AAE0-DF131C3D4931}", + "details": { + "name": "Name" + } + } + ] + }, + { + "base": "PushBack_VM", + "context": "{E7E44B3A-15C3-5420-A930-EB9ED7F0D7D9}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke PushBack_VM" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after PushBack_VM is invoked" + }, + "details": { + "name": "PushBack_VM" + }, + "params": [ + { + "typeid": "{E7E44B3A-15C3-5420-A930-EB9ED7F0D7D9}", + "details": { + "name": "AZStd::vector" + } + }, + { + "typeid": "{3D2B920C-9EFD-40D5-AAE0-DF131C3D4931}", + "details": { + "name": "Name" + } + } + ], + "results": [ + { + "typeid": "{E7E44B3A-15C3-5420-A930-EB9ED7F0D7D9}", + "details": { + "name": "AZStd::vector" + } + } + ] + }, + { + "base": "AtUnchecked", + "context": "{E7E44B3A-15C3-5420-A930-EB9ED7F0D7D9}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke AtUnchecked" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after AtUnchecked is invoked" + }, + "details": { + "name": "AtUnchecked" + }, + "params": [ + { + "typeid": "{E7E44B3A-15C3-5420-A930-EB9ED7F0D7D9}", + "details": { + "name": "AZStd::vector" + } + }, + { + "typeid": "{D6597933-47CD-4FC8-B911-63F3E2B0993A}", + "details": { + "name": "AZ::u64" + } + } + ], + "results": [ + { + "typeid": "{3D2B920C-9EFD-40D5-AAE0-DF131C3D4931}", + "details": { + "name": "Name" + } + } + ] + }, + { + "base": "clear", + "context": "{E7E44B3A-15C3-5420-A930-EB9ED7F0D7D9}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke clear" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after clear is invoked" + }, + "details": { + "name": "clear" + }, + "params": [ + { + "typeid": "{E7E44B3A-15C3-5420-A930-EB9ED7F0D7D9}", + "details": { + "name": "AZStd::vector" + } + } + ] + }, + { + "base": "NotEmpty", + "context": "{E7E44B3A-15C3-5420-A930-EB9ED7F0D7D9}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke NotEmpty" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after NotEmpty is invoked" + }, + "details": { + "name": "NotEmpty" + }, + "params": [ + { + "typeid": "{E7E44B3A-15C3-5420-A930-EB9ED7F0D7D9}", + "details": { + "name": "AZStd::vector" + } + } + ], + "results": [ + { + "typeid": "{A0CA880C-AFE4-43CB-926C-59AC48496112}", + "details": { + "name": "bool" + } + } + ] + }, + { + "base": "Erase_VM", + "context": "{E7E44B3A-15C3-5420-A930-EB9ED7F0D7D9}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Erase_VM" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Erase_VM is invoked" + }, + "details": { + "name": "Erase_VM" + }, + "params": [ + { + "typeid": "{E7E44B3A-15C3-5420-A930-EB9ED7F0D7D9}", + "details": { + "name": "AZStd::vector" + } + }, + { + "typeid": "{D6597933-47CD-4FC8-B911-63F3E2B0993A}", + "details": { + "name": "AZ::u64" + } + } + ], + "results": [ + { + "typeid": "{E7E44B3A-15C3-5420-A930-EB9ED7F0D7D9}", + "details": { + "name": "AZStd::vector" + } + } + ] + }, + { + "base": "EraseCheck_VM", + "context": "{E7E44B3A-15C3-5420-A930-EB9ED7F0D7D9}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke EraseCheck_VM" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after EraseCheck_VM is invoked" + }, + "details": { + "name": "EraseCheck_VM" + }, + "params": [ + { + "typeid": "{E7E44B3A-15C3-5420-A930-EB9ED7F0D7D9}", + "details": { + "name": "AZStd::vector" + } + }, + { + "typeid": "{D6597933-47CD-4FC8-B911-63F3E2B0993A}", + "details": { + "name": "AZ::u64" + } + } + ], + "results": [ + { + "typeid": "{A0CA880C-AFE4-43CB-926C-59AC48496112}", + "details": { + "name": "bool" + } + } + ] + }, + { + "base": "Capacity", + "context": "{E7E44B3A-15C3-5420-A930-EB9ED7F0D7D9}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Capacity" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Capacity is invoked" + }, + "details": { + "name": "Capacity" + }, + "params": [ + { + "typeid": "{E7E44B3A-15C3-5420-A930-EB9ED7F0D7D9}", + "details": { + "name": "AZStd::vector" + } + } + ], + "results": [ + { + "typeid": "{D6597933-47CD-4FC8-B911-63F3E2B0993A}", + "details": { + "name": "AZ::u64" + } + } + ] + }, + { + "base": "Clear", + "context": "{E7E44B3A-15C3-5420-A930-EB9ED7F0D7D9}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Clear" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Clear is invoked" + }, + "details": { + "name": "Clear" + }, + "params": [ + { + "typeid": "{E7E44B3A-15C3-5420-A930-EB9ED7F0D7D9}", + "details": { + "name": "AZStd::vector" + } + } + ], + "results": [ + { + "typeid": "{E7E44B3A-15C3-5420-A930-EB9ED7F0D7D9}", + "details": { + "name": "AZStd::vector" + } + } + ] + }, + { + "base": "AssignAt", + "context": "{E7E44B3A-15C3-5420-A930-EB9ED7F0D7D9}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke AssignAt" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after AssignAt is invoked" + }, + "details": { + "name": "AssignAt" + }, + "params": [ + { + "typeid": "{E7E44B3A-15C3-5420-A930-EB9ED7F0D7D9}", + "details": { + "name": "AZStd::vector" + } + }, + { + "typeid": "{D6597933-47CD-4FC8-B911-63F3E2B0993A}", + "details": { + "name": "AZ::u64" + } + }, + { + "typeid": "{3D2B920C-9EFD-40D5-AAE0-DF131C3D4931}", + "details": { + "name": "Name" + } + } + ] + }, + { + "base": "GetSize", + "context": "{E7E44B3A-15C3-5420-A930-EB9ED7F0D7D9}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke GetSize" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after GetSize is invoked" + }, + "details": { + "name": "GetSize" + }, + "params": [ + { + "typeid": "{E7E44B3A-15C3-5420-A930-EB9ED7F0D7D9}", + "details": { + "name": "AZStd::vector" + } + } + ], + "results": [ + { + "typeid": "{72039442-EB38-4D42-A1AD-CB68F7E0EEF6}", + "details": { + "name": "int" + } + } + ] + }, + { + "base": "Insert", + "context": "{E7E44B3A-15C3-5420-A930-EB9ED7F0D7D9}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Insert" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Insert is invoked" + }, + "details": { + "name": "Insert" + }, + "params": [ + { + "typeid": "{E7E44B3A-15C3-5420-A930-EB9ED7F0D7D9}", + "details": { + "name": "AZStd::vector" + } + }, + { + "typeid": "{D6597933-47CD-4FC8-B911-63F3E2B0993A}", + "details": { + "name": "AZ::u64" + } + }, + { + "typeid": "{3D2B920C-9EFD-40D5-AAE0-DF131C3D4931}", + "details": { + "name": "Name" + } + } + ], + "results": [ + { + "typeid": "{E7E44B3A-15C3-5420-A930-EB9ED7F0D7D9}", + "details": { + "name": "AZStd::vector" + } + } + ] + }, + { + "base": "PushBack", + "context": "{E7E44B3A-15C3-5420-A930-EB9ED7F0D7D9}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke PushBack" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after PushBack is invoked" + }, + "details": { + "name": "PushBack" + }, + "params": [ + { + "typeid": "{E7E44B3A-15C3-5420-A930-EB9ED7F0D7D9}", + "details": { + "name": "AZStd::vector" + } + }, + { + "typeid": "{3D2B920C-9EFD-40D5-AAE0-DF131C3D4931}", + "details": { + "name": "Name" + } + } + ] + }, + { + "base": "Reserve", + "context": "{E7E44B3A-15C3-5420-A930-EB9ED7F0D7D9}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Reserve" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Reserve is invoked" + }, + "details": { + "name": "Reserve" + }, + "params": [ + { + "typeid": "{E7E44B3A-15C3-5420-A930-EB9ED7F0D7D9}", + "details": { + "name": "AZStd::vector" + } + }, + { + "typeid": "{D6597933-47CD-4FC8-B911-63F3E2B0993A}", + "details": { + "name": "AZ::u64" + } + } + ] + }, + { + "base": "Iterate_VM", + "context": "{E7E44B3A-15C3-5420-A930-EB9ED7F0D7D9}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Iterate_VM" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Iterate_VM is invoked" + }, + "details": { + "name": "Iterate_VM" + }, + "params": [ + { + "typeid": "{E7E44B3A-15C3-5420-A930-EB9ED7F0D7D9}", + "details": { + "name": "AZStd::vector" + } + } + ], + "results": [ + { + "typeid": "{FB201A94-9D41-5E0C-B959-89A6E9C75C7D}", + "details": { + "name": "Iterator_VM>" + } + } + ] + } + ] + }, + { + "base": "{9CA976B9-C166-5C5A-B544-746A06B9F534}", + "context": "OnDemandReflected", + "variant": "", + "details": { + "name": "Map", + "category": "Map", + "tooltip": "A collection of Key/Value pairs, where each Key value must be unique." + }, + "methods": [ + { + "base": "contains", + "context": "{9CA976B9-C166-5C5A-B544-746A06B9F534}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke contains" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after contains is invoked" + }, + "details": { + "name": "contains" + }, + "params": [ + { + "typeid": "{9CA976B9-C166-5C5A-B544-746A06B9F534}", + "details": { + "name": "AZStd::unordered_map" + } + }, + { + "typeid": "{9F4E062E-06A0-46D4-85DF-E0DA96467D3A}", + "details": { + "name": "Crc32" + } + } + ], + "results": [ + { + "typeid": "{A0CA880C-AFE4-43CB-926C-59AC48496112}", + "details": { + "name": "bool" + } + } + ] + }, + { + "base": "Insert", + "context": "{9CA976B9-C166-5C5A-B544-746A06B9F534}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Insert" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Insert is invoked" + }, + "details": { + "name": "Insert" + }, + "params": [ + { + "typeid": "{9CA976B9-C166-5C5A-B544-746A06B9F534}", + "details": { + "name": "AZStd::unordered_map" + } + }, + { + "typeid": "{9F4E062E-06A0-46D4-85DF-E0DA96467D3A}", + "details": { + "name": "Crc32" + } + }, + { + "typeid": "{3D80F623-C85C-4741-90D0-E4E66164E6BF}", + "details": { + "name": "Vector2" + } + } + ], + "results": [ + { + "typeid": "{9CA976B9-C166-5C5A-B544-746A06B9F534}", + "details": { + "name": "AZStd::unordered_map" + } + } + ] + }, + { + "base": "Reserve", + "context": "{9CA976B9-C166-5C5A-B544-746A06B9F534}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Reserve" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Reserve is invoked" + }, + "details": { + "name": "Reserve" + }, + "params": [ + { + "typeid": "{9CA976B9-C166-5C5A-B544-746A06B9F534}", + "details": { + "name": "AZStd::unordered_map" + } + }, + { + "typeid": "{D6597933-47CD-4FC8-B911-63F3E2B0993A}", + "details": { + "name": "AZ::u64" + } + } + ] + }, + { + "base": "GetSize", + "context": "{9CA976B9-C166-5C5A-B544-746A06B9F534}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke GetSize" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after GetSize is invoked" + }, + "details": { + "name": "GetSize" + }, + "params": [ + { + "typeid": "{9CA976B9-C166-5C5A-B544-746A06B9F534}", + "details": { + "name": "AZStd::unordered_map" + } + } + ], + "results": [ + { + "typeid": "{72039442-EB38-4D42-A1AD-CB68F7E0EEF6}", + "details": { + "name": "int" + } + } + ] + }, + { + "base": "Iterate_VM", + "context": "{9CA976B9-C166-5C5A-B544-746A06B9F534}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Iterate_VM" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Iterate_VM is invoked" + }, + "details": { + "name": "Iterate_VM" + }, + "params": [ + { + "typeid": "{9CA976B9-C166-5C5A-B544-746A06B9F534}", + "details": { + "name": "AZStd::unordered_map" + } + } + ], + "results": [ + { + "typeid": "{0D0DE673-7BD3-5D5B-9CB5-95F69B531778}", + "details": { + "name": "Iterator_VM, AZStd::equal_to, allocator>>" + } + } + ] + }, + { + "base": "GetKeys", + "context": "{9CA976B9-C166-5C5A-B544-746A06B9F534}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke GetKeys" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after GetKeys is invoked" + }, + "details": { + "name": "GetKeys" + }, + "params": [ + { + "typeid": "{9CA976B9-C166-5C5A-B544-746A06B9F534}", + "details": { + "name": "AZStd::unordered_map" + } + } + ], + "results": [ + { + "typeid": "{287CEE87-6FF3-52FC-9D32-38255E2C7FE9}", + "details": { + "name": "AZStd::vector" + } + } + ] + }, + { + "base": "Size", + "context": "{9CA976B9-C166-5C5A-B544-746A06B9F534}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Size" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Size is invoked" + }, + "details": { + "name": "Size" + }, + "params": [ + { + "typeid": "{9CA976B9-C166-5C5A-B544-746A06B9F534}", + "details": { + "name": "AZStd::unordered_map" + } + } + ], + "results": [ + { + "typeid": "{72039442-EB38-4D42-A1AD-CB68F7E0EEF6}", + "details": { + "name": "int" + } + } + ] + }, + { + "base": "Erase", + "context": "{9CA976B9-C166-5C5A-B544-746A06B9F534}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Erase" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Erase is invoked" + }, + "details": { + "name": "Erase" + }, + "params": [ + { + "typeid": "{9CA976B9-C166-5C5A-B544-746A06B9F534}", + "details": { + "name": "AZStd::unordered_map" + } + }, + { + "typeid": "{9F4E062E-06A0-46D4-85DF-E0DA96467D3A}", + "details": { + "name": "Crc32" + } + } + ], + "results": [ + { + "typeid": "{9CA976B9-C166-5C5A-B544-746A06B9F534}", + "details": { + "name": "AZStd::unordered_map" + } + } + ] + }, + { + "base": "EraseCheck_VM", + "context": "{9CA976B9-C166-5C5A-B544-746A06B9F534}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke EraseCheck_VM" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after EraseCheck_VM is invoked" + }, + "details": { + "name": "EraseCheck_VM" + }, + "params": [ + { + "typeid": "{9CA976B9-C166-5C5A-B544-746A06B9F534}", + "details": { + "name": "AZStd::unordered_map" + } + }, + { + "typeid": "{9F4E062E-06A0-46D4-85DF-E0DA96467D3A}", + "details": { + "name": "Crc32" + } + } + ], + "results": [ + { + "typeid": "{A0CA880C-AFE4-43CB-926C-59AC48496112}", + "details": { + "name": "bool" + } + } + ] + }, + { + "base": "Clear", + "context": "{9CA976B9-C166-5C5A-B544-746A06B9F534}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Clear" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Clear is invoked" + }, + "details": { + "name": "Clear" + }, + "params": [ + { + "typeid": "{9CA976B9-C166-5C5A-B544-746A06B9F534}", + "details": { + "name": "AZStd::unordered_map" + } + } + ], + "results": [ + { + "typeid": "{9CA976B9-C166-5C5A-B544-746A06B9F534}", + "details": { + "name": "AZStd::unordered_map" + } + } + ] + }, + { + "base": "At", + "context": "{9CA976B9-C166-5C5A-B544-746A06B9F534}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke At" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after At is invoked" + }, + "details": { + "name": "At" + }, + "params": [ + { + "typeid": "{9CA976B9-C166-5C5A-B544-746A06B9F534}", + "details": { + "name": "AZStd::unordered_map" + } + }, + { + "typeid": "{9F4E062E-06A0-46D4-85DF-E0DA96467D3A}", + "details": { + "name": "Crc32" + } + } + ], + "results": [ + { + "typeid": "{3D80F623-C85C-4741-90D0-E4E66164E6BF}", + "details": { + "name": "Vector2" + } + } + ] + }, + { + "base": "BucketCount", + "context": "{9CA976B9-C166-5C5A-B544-746A06B9F534}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke BucketCount" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after BucketCount is invoked" + }, + "details": { + "name": "BucketCount" + }, + "params": [ + { + "typeid": "{9CA976B9-C166-5C5A-B544-746A06B9F534}", + "details": { + "name": "AZStd::unordered_map" + } + } + ], + "results": [ + { + "typeid": "{D6597933-47CD-4FC8-B911-63F3E2B0993A}", + "details": { + "name": "AZ::u64" + } + } + ] + }, + { + "base": "Empty", + "context": "{9CA976B9-C166-5C5A-B544-746A06B9F534}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Empty" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Empty is invoked" + }, + "details": { + "name": "Empty" + }, + "params": [ + { + "typeid": "{9CA976B9-C166-5C5A-B544-746A06B9F534}", + "details": { + "name": "AZStd::unordered_map" + } + } + ], + "results": [ + { + "typeid": "{A0CA880C-AFE4-43CB-926C-59AC48496112}", + "details": { + "name": "bool" + } + } + ] + }, + { + "base": "Swap", + "context": "{9CA976B9-C166-5C5A-B544-746A06B9F534}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Swap" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Swap is invoked" + }, + "details": { + "name": "Swap" + }, + "params": [ + { + "typeid": "{9CA976B9-C166-5C5A-B544-746A06B9F534}", + "details": { + "name": "AZStd::unordered_map" + } + }, + { + "typeid": "{9CA976B9-C166-5C5A-B544-746A06B9F534}", + "details": { + "name": "AZStd::unordered_map" + } + } + ] + } + ] + }, + { + "base": "{B7CEA1B1-C931-5566-AECA-B8AF02138CAA}", + "context": "OnDemandReflected", + "variant": "", + "details": { + "name": "Map", + "category": "Map", + "tooltip": "A collection of Key/Value pairs, where each Key value must be unique." + }, + "methods": [ + { + "base": "contains", + "context": "{B7CEA1B1-C931-5566-AECA-B8AF02138CAA}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke contains" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after contains is invoked" + }, + "details": { + "name": "contains" + }, + "params": [ + { + "typeid": "{B7CEA1B1-C931-5566-AECA-B8AF02138CAA}", + "details": { + "name": "AZStd::unordered_map" + } + }, + { + "typeid": "{03AAAB3F-5C47-5A66-9EBC-D5FA4DB353C9}", + "details": { + "name": "AZStd::string" + } + } + ], + "results": [ + { + "typeid": "{A0CA880C-AFE4-43CB-926C-59AC48496112}", + "details": { + "name": "bool" + } + } + ] + }, + { + "base": "Insert", + "context": "{B7CEA1B1-C931-5566-AECA-B8AF02138CAA}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Insert" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Insert is invoked" + }, + "details": { + "name": "Insert" + }, + "params": [ + { + "typeid": "{B7CEA1B1-C931-5566-AECA-B8AF02138CAA}", + "details": { + "name": "AZStd::unordered_map" + } + }, + { + "typeid": "{03AAAB3F-5C47-5A66-9EBC-D5FA4DB353C9}", + "details": { + "name": "AZStd::string" + } + }, + { + "typeid": "{6383F1D3-BB27-4E6B-A49A-6409B2059EAA}", + "details": { + "name": "EntityId", + "tooltip": "Entity Unique Id" + } + } + ], + "results": [ + { + "typeid": "{B7CEA1B1-C931-5566-AECA-B8AF02138CAA}", + "details": { + "name": "AZStd::unordered_map" + } + } + ] + }, + { + "base": "Reserve", + "context": "{B7CEA1B1-C931-5566-AECA-B8AF02138CAA}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Reserve" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Reserve is invoked" + }, + "details": { + "name": "Reserve" + }, + "params": [ + { + "typeid": "{B7CEA1B1-C931-5566-AECA-B8AF02138CAA}", + "details": { + "name": "AZStd::unordered_map" + } + }, + { + "typeid": "{D6597933-47CD-4FC8-B911-63F3E2B0993A}", + "details": { + "name": "AZ::u64" + } + } + ] + }, + { + "base": "GetSize", + "context": "{B7CEA1B1-C931-5566-AECA-B8AF02138CAA}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke GetSize" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after GetSize is invoked" + }, + "details": { + "name": "GetSize" + }, + "params": [ + { + "typeid": "{B7CEA1B1-C931-5566-AECA-B8AF02138CAA}", + "details": { + "name": "AZStd::unordered_map" + } + } + ], + "results": [ + { + "typeid": "{72039442-EB38-4D42-A1AD-CB68F7E0EEF6}", + "details": { + "name": "int" + } + } + ] + }, + { + "base": "Iterate_VM", + "context": "{B7CEA1B1-C931-5566-AECA-B8AF02138CAA}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Iterate_VM" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Iterate_VM is invoked" + }, + "details": { + "name": "Iterate_VM" + }, + "params": [ + { + "typeid": "{B7CEA1B1-C931-5566-AECA-B8AF02138CAA}", + "details": { + "name": "AZStd::unordered_map" + } + } + ], + "results": [ + { + "typeid": "{CACA8A44-7F2A-5917-8EAF-A735F06ED2BB}", + "details": { + "name": "Iterator_VM, allocator>, EntityId, AZStd::hash", + "category": "Array", + "tooltip": "A dynamically sized container of elements." + }, + "methods": [ + { + "base": "Size", + "context": "{D9866B79-D11A-58E6-B974-0B45783F53A4}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Size" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Size is invoked" + }, + "details": { + "name": "Size" + }, + "params": [ + { + "typeid": "{D9866B79-D11A-58E6-B974-0B45783F53A4}", + "details": { + "name": "AZStd::vector" + } + } + ], + "results": [ + { + "typeid": "{72039442-EB38-4D42-A1AD-CB68F7E0EEF6}", + "details": { + "name": "int" + } + } + ] + }, + { + "base": "Front", + "context": "{D9866B79-D11A-58E6-B974-0B45783F53A4}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Front" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Front is invoked" + }, + "details": { + "name": "Front" + }, + "params": [ + { + "typeid": "{D9866B79-D11A-58E6-B974-0B45783F53A4}", + "details": { + "name": "AZStd::vector" + } + } + ], + "results": [ + { + "typeid": "{E034EA83-C798-413D-ACE8-4923C51CF4F7}", + "details": { + "name": "Script Event", + "tooltip": "A script event's definition" + } + } + ] + }, + { + "base": "HasKey", + "context": "{D9866B79-D11A-58E6-B974-0B45783F53A4}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Has Key" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Has Key is invoked" + }, + "details": { + "name": "Has Key" + }, + "params": [ + { + "typeid": "{D9866B79-D11A-58E6-B974-0B45783F53A4}", + "details": { + "name": "AZStd::vector" + } + }, + { + "typeid": "{D6597933-47CD-4FC8-B911-63F3E2B0993A}", + "details": { + "name": "AZ::u64" + } + } + ], + "results": [ + { + "typeid": "{A0CA880C-AFE4-43CB-926C-59AC48496112}", + "details": { + "name": "bool" + } + } + ] + }, + { + "base": "Resize", + "context": "{D9866B79-D11A-58E6-B974-0B45783F53A4}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Resize" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Resize is invoked" + }, + "details": { + "name": "Resize" + }, + "params": [ + { + "typeid": "{D9866B79-D11A-58E6-B974-0B45783F53A4}", + "details": { + "name": "AZStd::vector" + } + }, + { + "typeid": "{D6597933-47CD-4FC8-B911-63F3E2B0993A}", + "details": { + "name": "AZ::u64" + } + } + ] + }, + { + "base": "at", + "context": "{D9866B79-D11A-58E6-B974-0B45783F53A4}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke at" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after at is invoked" + }, + "details": { + "name": "at" + }, + "params": [ + { + "typeid": "{D9866B79-D11A-58E6-B974-0B45783F53A4}", + "details": { + "name": "AZStd::vector" + } + }, + { + "typeid": "{D6597933-47CD-4FC8-B911-63F3E2B0993A}", + "details": { + "name": "AZ::u64" + } + } + ], + "results": [ + { + "typeid": "{E034EA83-C798-413D-ACE8-4923C51CF4F7}", + "details": { + "name": "Script Event", + "tooltip": "A script event's definition" + } + } + ] + }, + { + "base": "Back", + "context": "{D9866B79-D11A-58E6-B974-0B45783F53A4}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Back" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Back is invoked" + }, + "details": { + "name": "Back" + }, + "params": [ + { + "typeid": "{D9866B79-D11A-58E6-B974-0B45783F53A4}", + "details": { + "name": "AZStd::vector" + } + } + ], + "results": [ + { + "typeid": "{E034EA83-C798-413D-ACE8-4923C51CF4F7}", + "details": { + "name": "Script Event", + "tooltip": "A script event's definition" + } + } + ] + }, + { + "base": "pop_back", + "context": "{D9866B79-D11A-58E6-B974-0B45783F53A4}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke pop_back" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after pop_back is invoked" + }, + "details": { + "name": "pop_back" + }, + "params": [ + { + "typeid": "{D9866B79-D11A-58E6-B974-0B45783F53A4}", + "details": { + "name": "AZStd::vector" + } + } + ] + }, + { + "base": "size", + "context": "{D9866B79-D11A-58E6-B974-0B45783F53A4}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke size" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after size is invoked" + }, + "details": { + "name": "size" + }, + "params": [ + { + "typeid": "{D9866B79-D11A-58E6-B974-0B45783F53A4}", + "details": { + "name": "AZStd::vector" + } + } + ], + "results": [ + { + "typeid": "{72039442-EB38-4D42-A1AD-CB68F7E0EEF6}", + "details": { + "name": "int" + } + } + ] + }, + { + "base": "At", + "context": "{D9866B79-D11A-58E6-B974-0B45783F53A4}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke At" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after At is invoked" + }, + "details": { + "name": "At" + }, + "params": [ + { + "typeid": "{D9866B79-D11A-58E6-B974-0B45783F53A4}", + "details": { + "name": "AZStd::vector" + } + }, + { + "typeid": "{D6597933-47CD-4FC8-B911-63F3E2B0993A}", + "details": { + "name": "AZ::u64" + } + } + ], + "results": [ + { + "typeid": "{E034EA83-C798-413D-ACE8-4923C51CF4F7}", + "details": { + "name": "Script Event", + "tooltip": "A script event's definition" + } + } + ] + }, + { + "base": "Empty", + "context": "{D9866B79-D11A-58E6-B974-0B45783F53A4}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Empty" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Empty is invoked" + }, + "details": { + "name": "Empty" + }, + "params": [ + { + "typeid": "{D9866B79-D11A-58E6-B974-0B45783F53A4}", + "details": { + "name": "AZStd::vector" + } + } + ], + "results": [ + { + "typeid": "{A0CA880C-AFE4-43CB-926C-59AC48496112}", + "details": { + "name": "bool" + } + } + ] + }, + { + "base": "Swap", + "context": "{D9866B79-D11A-58E6-B974-0B45783F53A4}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Swap" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Swap is invoked" + }, + "details": { + "name": "Swap" + }, + "params": [ + { + "typeid": "{D9866B79-D11A-58E6-B974-0B45783F53A4}", + "details": { + "name": "AZStd::vector" + } + }, + { + "typeid": "{D9866B79-D11A-58E6-B974-0B45783F53A4}", + "details": { + "name": "AZStd::vector" + } + } + ] + }, + { + "base": "push_back", + "context": "{D9866B79-D11A-58E6-B974-0B45783F53A4}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke push_back" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after push_back is invoked" + }, + "details": { + "name": "push_back" + }, + "params": [ + { + "typeid": "{D9866B79-D11A-58E6-B974-0B45783F53A4}", + "details": { + "name": "AZStd::vector" + } + }, + { + "typeid": "{E034EA83-C798-413D-ACE8-4923C51CF4F7}", + "details": { + "name": "Script Event", + "tooltip": "A script event's definition" + } + } + ] + }, + { + "base": "PushBack_VM", + "context": "{D9866B79-D11A-58E6-B974-0B45783F53A4}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke PushBack_VM" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after PushBack_VM is invoked" + }, + "details": { + "name": "PushBack_VM" + }, + "params": [ + { + "typeid": "{D9866B79-D11A-58E6-B974-0B45783F53A4}", + "details": { + "name": "AZStd::vector" + } + }, + { + "typeid": "{E034EA83-C798-413D-ACE8-4923C51CF4F7}", + "details": { + "name": "Script Event", + "tooltip": "A script event's definition" + } + } + ], + "results": [ + { + "typeid": "{D9866B79-D11A-58E6-B974-0B45783F53A4}", + "details": { + "name": "AZStd::vector" + } + } + ] + }, + { + "base": "AtUnchecked", + "context": "{D9866B79-D11A-58E6-B974-0B45783F53A4}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke AtUnchecked" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after AtUnchecked is invoked" + }, + "details": { + "name": "AtUnchecked" + }, + "params": [ + { + "typeid": "{D9866B79-D11A-58E6-B974-0B45783F53A4}", + "details": { + "name": "AZStd::vector" + } + }, + { + "typeid": "{D6597933-47CD-4FC8-B911-63F3E2B0993A}", + "details": { + "name": "AZ::u64" + } + } + ], + "results": [ + { + "typeid": "{E034EA83-C798-413D-ACE8-4923C51CF4F7}", + "details": { + "name": "Script Event", + "tooltip": "A script event's definition" + } + } + ] + }, + { + "base": "clear", + "context": "{D9866B79-D11A-58E6-B974-0B45783F53A4}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke clear" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after clear is invoked" + }, + "details": { + "name": "clear" + }, + "params": [ + { + "typeid": "{D9866B79-D11A-58E6-B974-0B45783F53A4}", + "details": { + "name": "AZStd::vector" + } + } + ] + }, + { + "base": "NotEmpty", + "context": "{D9866B79-D11A-58E6-B974-0B45783F53A4}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke NotEmpty" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after NotEmpty is invoked" + }, + "details": { + "name": "NotEmpty" + }, + "params": [ + { + "typeid": "{D9866B79-D11A-58E6-B974-0B45783F53A4}", + "details": { + "name": "AZStd::vector" + } + } + ], + "results": [ + { + "typeid": "{A0CA880C-AFE4-43CB-926C-59AC48496112}", + "details": { + "name": "bool" + } + } + ] + }, + { + "base": "Erase_VM", + "context": "{D9866B79-D11A-58E6-B974-0B45783F53A4}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Erase_VM" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Erase_VM is invoked" + }, + "details": { + "name": "Erase_VM" + }, + "params": [ + { + "typeid": "{D9866B79-D11A-58E6-B974-0B45783F53A4}", + "details": { + "name": "AZStd::vector" + } + }, + { + "typeid": "{D6597933-47CD-4FC8-B911-63F3E2B0993A}", + "details": { + "name": "AZ::u64" + } + } + ], + "results": [ + { + "typeid": "{D9866B79-D11A-58E6-B974-0B45783F53A4}", + "details": { + "name": "AZStd::vector" + } + } + ] + }, + { + "base": "EraseCheck_VM", + "context": "{D9866B79-D11A-58E6-B974-0B45783F53A4}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke EraseCheck_VM" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after EraseCheck_VM is invoked" + }, + "details": { + "name": "EraseCheck_VM" + }, + "params": [ + { + "typeid": "{D9866B79-D11A-58E6-B974-0B45783F53A4}", + "details": { + "name": "AZStd::vector" + } + }, + { + "typeid": "{D6597933-47CD-4FC8-B911-63F3E2B0993A}", + "details": { + "name": "AZ::u64" + } + } + ], + "results": [ + { + "typeid": "{A0CA880C-AFE4-43CB-926C-59AC48496112}", + "details": { + "name": "bool" + } + } + ] + }, + { + "base": "Capacity", + "context": "{D9866B79-D11A-58E6-B974-0B45783F53A4}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Capacity" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Capacity is invoked" + }, + "details": { + "name": "Capacity" + }, + "params": [ + { + "typeid": "{D9866B79-D11A-58E6-B974-0B45783F53A4}", + "details": { + "name": "AZStd::vector" + } + } + ], + "results": [ + { + "typeid": "{D6597933-47CD-4FC8-B911-63F3E2B0993A}", + "details": { + "name": "AZ::u64" + } + } + ] + }, + { + "base": "Clear", + "context": "{D9866B79-D11A-58E6-B974-0B45783F53A4}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Clear" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Clear is invoked" + }, + "details": { + "name": "Clear" + }, + "params": [ + { + "typeid": "{D9866B79-D11A-58E6-B974-0B45783F53A4}", + "details": { + "name": "AZStd::vector" + } + } + ], + "results": [ + { + "typeid": "{D9866B79-D11A-58E6-B974-0B45783F53A4}", + "details": { + "name": "AZStd::vector" + } + } + ] + }, + { + "base": "AssignAt", + "context": "{D9866B79-D11A-58E6-B974-0B45783F53A4}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke AssignAt" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after AssignAt is invoked" + }, + "details": { + "name": "AssignAt" + }, + "params": [ + { + "typeid": "{D9866B79-D11A-58E6-B974-0B45783F53A4}", + "details": { + "name": "AZStd::vector" + } + }, + { + "typeid": "{D6597933-47CD-4FC8-B911-63F3E2B0993A}", + "details": { + "name": "AZ::u64" + } + }, + { + "typeid": "{E034EA83-C798-413D-ACE8-4923C51CF4F7}", + "details": { + "name": "Script Event", + "tooltip": "A script event's definition" + } + } + ] + }, + { + "base": "GetSize", + "context": "{D9866B79-D11A-58E6-B974-0B45783F53A4}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke GetSize" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after GetSize is invoked" + }, + "details": { + "name": "GetSize" + }, + "params": [ + { + "typeid": "{D9866B79-D11A-58E6-B974-0B45783F53A4}", + "details": { + "name": "AZStd::vector" + } + } + ], + "results": [ + { + "typeid": "{72039442-EB38-4D42-A1AD-CB68F7E0EEF6}", + "details": { + "name": "int" + } + } + ] + }, + { + "base": "Insert", + "context": "{D9866B79-D11A-58E6-B974-0B45783F53A4}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Insert" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Insert is invoked" + }, + "details": { + "name": "Insert" + }, + "params": [ + { + "typeid": "{D9866B79-D11A-58E6-B974-0B45783F53A4}", + "details": { + "name": "AZStd::vector" + } + }, + { + "typeid": "{D6597933-47CD-4FC8-B911-63F3E2B0993A}", + "details": { + "name": "AZ::u64" + } + }, + { + "typeid": "{E034EA83-C798-413D-ACE8-4923C51CF4F7}", + "details": { + "name": "Script Event", + "tooltip": "A script event's definition" + } + } + ], + "results": [ + { + "typeid": "{D9866B79-D11A-58E6-B974-0B45783F53A4}", + "details": { + "name": "AZStd::vector" + } + } + ] + }, + { + "base": "PushBack", + "context": "{D9866B79-D11A-58E6-B974-0B45783F53A4}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke PushBack" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after PushBack is invoked" + }, + "details": { + "name": "PushBack" + }, + "params": [ + { + "typeid": "{D9866B79-D11A-58E6-B974-0B45783F53A4}", + "details": { + "name": "AZStd::vector" + } + }, + { + "typeid": "{E034EA83-C798-413D-ACE8-4923C51CF4F7}", + "details": { + "name": "Script Event", + "tooltip": "A script event's definition" + } + } + ] + }, + { + "base": "Reserve", + "context": "{D9866B79-D11A-58E6-B974-0B45783F53A4}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Reserve" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Reserve is invoked" + }, + "details": { + "name": "Reserve" + }, + "params": [ + { + "typeid": "{D9866B79-D11A-58E6-B974-0B45783F53A4}", + "details": { + "name": "AZStd::vector" + } + }, + { + "typeid": "{D6597933-47CD-4FC8-B911-63F3E2B0993A}", + "details": { + "name": "AZ::u64" + } + } + ] + }, + { + "base": "Iterate_VM", + "context": "{D9866B79-D11A-58E6-B974-0B45783F53A4}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Iterate_VM" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Iterate_VM is invoked" + }, + "details": { + "name": "Iterate_VM" + }, + "params": [ + { + "typeid": "{D9866B79-D11A-58E6-B974-0B45783F53A4}", + "details": { + "name": "AZStd::vector" + } + } + ], + "results": [ + { + "typeid": "{9E4C781D-760F-50AA-90AF-B184D4E4BBF2}", + "details": { + "name": "Iterator_VM>" + } + } + ] + } + ] + }, + { + "base": "{6C8F8E52-AB4A-5C1F-8E56-9AC390290B94}", + "context": "OnDemandReflected", + "variant": "", + "details": { + "name": "Set", + "category": "Set", + "tooltip": "A dynamically sized container, where each element is unique." + }, + "methods": [ + { + "base": "Size", + "context": "{6C8F8E52-AB4A-5C1F-8E56-9AC390290B94}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Size" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Size is invoked" + }, + "details": { + "name": "Size" + }, + "params": [ + { + "typeid": "{6C8F8E52-AB4A-5C1F-8E56-9AC390290B94}", + "details": { + "name": "AZStd::unordered_set" + } + } + ], + "results": [ + { + "typeid": "{72039442-EB38-4D42-A1AD-CB68F7E0EEF6}", + "details": { + "name": "int" + } + } + ] + }, + { + "base": "GetKeys", + "context": "{6C8F8E52-AB4A-5C1F-8E56-9AC390290B94}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke GetKeys" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after GetKeys is invoked" + }, + "details": { + "name": "GetKeys" + }, + "params": [ + { + "typeid": "{6C8F8E52-AB4A-5C1F-8E56-9AC390290B94}", + "details": { + "name": "AZStd::unordered_set" + } + } + ], + "results": [ + { + "typeid": "{4841CFF0-7A5C-519C-BD16-D3625E99605E}", + "details": { + "name": "AZStd::vector" + } + } + ] + }, + { + "base": "contains", + "context": "{6C8F8E52-AB4A-5C1F-8E56-9AC390290B94}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke contains" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after contains is invoked" + }, + "details": { + "name": "contains" + }, + "params": [ + { + "typeid": "{6C8F8E52-AB4A-5C1F-8E56-9AC390290B94}", + "details": { + "name": "AZStd::unordered_set" + } + }, + { + "typeid": "{6383F1D3-BB27-4E6B-A49A-6409B2059EAA}", + "details": { + "name": "EntityId", + "tooltip": "Entity Unique Id" + } + } + ], + "results": [ + { + "typeid": "{A0CA880C-AFE4-43CB-926C-59AC48496112}", + "details": { + "name": "bool" + } + } + ] + }, + { + "base": "Insert", + "context": "{6C8F8E52-AB4A-5C1F-8E56-9AC390290B94}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Insert" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Insert is invoked" + }, + "details": { + "name": "Insert" + }, + "params": [ + { + "typeid": "{6C8F8E52-AB4A-5C1F-8E56-9AC390290B94}", + "details": { + "name": "AZStd::unordered_set" + } + }, + { + "typeid": "{6383F1D3-BB27-4E6B-A49A-6409B2059EAA}", + "details": { + "name": "EntityId", + "tooltip": "Entity Unique Id" + } + } + ], + "results": [ + { + "typeid": "{6C8F8E52-AB4A-5C1F-8E56-9AC390290B94}", + "details": { + "name": "AZStd::unordered_set" + } + } + ] + }, + { + "base": "GetSize", + "context": "{6C8F8E52-AB4A-5C1F-8E56-9AC390290B94}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke GetSize" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after GetSize is invoked" + }, + "details": { + "name": "GetSize" + }, + "params": [ + { + "typeid": "{6C8F8E52-AB4A-5C1F-8E56-9AC390290B94}", + "details": { + "name": "AZStd::unordered_set" + } + } + ], + "results": [ + { + "typeid": "{72039442-EB38-4D42-A1AD-CB68F7E0EEF6}", + "details": { + "name": "int" + } + } + ] + }, + { + "base": "Reserve", + "context": "{6C8F8E52-AB4A-5C1F-8E56-9AC390290B94}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Reserve" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Reserve is invoked" + }, + "details": { + "name": "Reserve" + }, + "params": [ + { + "typeid": "{6C8F8E52-AB4A-5C1F-8E56-9AC390290B94}", + "details": { + "name": "AZStd::unordered_set" + } + }, + { + "typeid": "{D6597933-47CD-4FC8-B911-63F3E2B0993A}", + "details": { + "name": "AZ::u64" + } + } + ] + }, + { + "base": "Iterate_VM", + "context": "{6C8F8E52-AB4A-5C1F-8E56-9AC390290B94}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Iterate_VM" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Iterate_VM is invoked" + }, + "details": { + "name": "Iterate_VM" + }, + "params": [ + { + "typeid": "{6C8F8E52-AB4A-5C1F-8E56-9AC390290B94}", + "details": { + "name": "AZStd::unordered_set" + } + } + ], + "results": [ + { + "typeid": "{55D4A61B-688B-5C1C-A045-BCD835F1F604}", + "details": { + "name": "Iterator_VM, AZStd::equal_to, allocator>>" + } + } + ] + }, + { + "base": "EraseCheck_VM", + "context": "{6C8F8E52-AB4A-5C1F-8E56-9AC390290B94}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke EraseCheck_VM" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after EraseCheck_VM is invoked" + }, + "details": { + "name": "EraseCheck_VM" + }, + "params": [ + { + "typeid": "{6C8F8E52-AB4A-5C1F-8E56-9AC390290B94}", + "details": { + "name": "AZStd::unordered_set" + } + }, + { + "typeid": "{6383F1D3-BB27-4E6B-A49A-6409B2059EAA}", + "details": { + "name": "EntityId", + "tooltip": "Entity Unique Id" + } + } + ], + "results": [ + { + "typeid": "{A0CA880C-AFE4-43CB-926C-59AC48496112}", + "details": { + "name": "bool" + } + } + ] + }, + { + "base": "Erase", + "context": "{6C8F8E52-AB4A-5C1F-8E56-9AC390290B94}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Erase" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Erase is invoked" + }, + "details": { + "name": "Erase" + }, + "params": [ + { + "typeid": "{6C8F8E52-AB4A-5C1F-8E56-9AC390290B94}", + "details": { + "name": "AZStd::unordered_set" + } + }, + { + "typeid": "{6383F1D3-BB27-4E6B-A49A-6409B2059EAA}", + "details": { + "name": "EntityId", + "tooltip": "Entity Unique Id" + } + } + ], + "results": [ + { + "typeid": "{6C8F8E52-AB4A-5C1F-8E56-9AC390290B94}", + "details": { + "name": "AZStd::unordered_set" + } + } + ] + }, + { + "base": "Clear", + "context": "{6C8F8E52-AB4A-5C1F-8E56-9AC390290B94}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Clear" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Clear is invoked" + }, + "details": { + "name": "Clear" + }, + "params": [ + { + "typeid": "{6C8F8E52-AB4A-5C1F-8E56-9AC390290B94}", + "details": { + "name": "AZStd::unordered_set" + } + } + ], + "results": [ + { + "typeid": "{6C8F8E52-AB4A-5C1F-8E56-9AC390290B94}", + "details": { + "name": "AZStd::unordered_set" + } + } + ] + }, + { + "base": "BucketCount", + "context": "{6C8F8E52-AB4A-5C1F-8E56-9AC390290B94}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke BucketCount" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after BucketCount is invoked" + }, + "details": { + "name": "BucketCount" + }, + "params": [ + { + "typeid": "{6C8F8E52-AB4A-5C1F-8E56-9AC390290B94}", + "details": { + "name": "AZStd::unordered_set" + } + } + ], + "results": [ + { + "typeid": "{D6597933-47CD-4FC8-B911-63F3E2B0993A}", + "details": { + "name": "AZ::u64" + } + } + ] + }, + { + "base": "Empty", + "context": "{6C8F8E52-AB4A-5C1F-8E56-9AC390290B94}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Empty" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Empty is invoked" + }, + "details": { + "name": "Empty" + }, + "params": [ + { + "typeid": "{6C8F8E52-AB4A-5C1F-8E56-9AC390290B94}", + "details": { + "name": "AZStd::unordered_set" + } + } + ], + "results": [ + { + "typeid": "{A0CA880C-AFE4-43CB-926C-59AC48496112}", + "details": { + "name": "bool" + } + } + ] + }, + { + "base": "Swap", + "context": "{6C8F8E52-AB4A-5C1F-8E56-9AC390290B94}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Swap" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Swap is invoked" + }, + "details": { + "name": "Swap" + }, + "params": [ + { + "typeid": "{6C8F8E52-AB4A-5C1F-8E56-9AC390290B94}", + "details": { + "name": "AZStd::unordered_set" + } + }, + { + "typeid": "{6C8F8E52-AB4A-5C1F-8E56-9AC390290B94}", + "details": { + "name": "AZStd::unordered_set" + } + } + ] + } + ] + }, + { + "base": "{4F67EE42-D330-55A1-85DC-E030EABC0407}", + "context": "OnDemandReflected", + "variant": "", + "details": { + "name": "Map", + "category": "Map", + "tooltip": "A collection of Key/Value pairs, where each Key value must be unique." + }, + "methods": [ + { + "base": "contains", + "context": "{4F67EE42-D330-55A1-85DC-E030EABC0407}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke contains" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after contains is invoked" + }, + "details": { + "name": "contains" + }, + "params": [ + { + "typeid": "{4F67EE42-D330-55A1-85DC-E030EABC0407}", + "details": { + "name": "AZStd::unordered_map" + } + }, + { + "typeid": "{110C4B14-11A8-4E9D-8638-5051013A56AC}", + "details": { + "name": "double" + } + } + ], + "results": [ + { + "typeid": "{A0CA880C-AFE4-43CB-926C-59AC48496112}", + "details": { + "name": "bool" + } + } + ] + }, + { + "base": "Insert", + "context": "{4F67EE42-D330-55A1-85DC-E030EABC0407}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Insert" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Insert is invoked" + }, + "details": { + "name": "Insert" + }, + "params": [ + { + "typeid": "{4F67EE42-D330-55A1-85DC-E030EABC0407}", + "details": { + "name": "AZStd::unordered_map" + } + }, + { + "typeid": "{110C4B14-11A8-4E9D-8638-5051013A56AC}", + "details": { + "name": "double" + } + }, + { + "typeid": "{8379EB7D-01FA-4538-B64B-A6543B4BE73D}", + "details": { + "name": "Vector3" + } + } + ], + "results": [ + { + "typeid": "{4F67EE42-D330-55A1-85DC-E030EABC0407}", + "details": { + "name": "AZStd::unordered_map" + } + } + ] + }, + { + "base": "Reserve", + "context": "{4F67EE42-D330-55A1-85DC-E030EABC0407}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Reserve" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Reserve is invoked" + }, + "details": { + "name": "Reserve" + }, + "params": [ + { + "typeid": "{4F67EE42-D330-55A1-85DC-E030EABC0407}", + "details": { + "name": "AZStd::unordered_map" + } + }, + { + "typeid": "{D6597933-47CD-4FC8-B911-63F3E2B0993A}", + "details": { + "name": "AZ::u64" + } + } + ] + }, + { + "base": "GetSize", + "context": "{4F67EE42-D330-55A1-85DC-E030EABC0407}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke GetSize" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after GetSize is invoked" + }, + "details": { + "name": "GetSize" + }, + "params": [ + { + "typeid": "{4F67EE42-D330-55A1-85DC-E030EABC0407}", + "details": { + "name": "AZStd::unordered_map" + } + } + ], + "results": [ + { + "typeid": "{72039442-EB38-4D42-A1AD-CB68F7E0EEF6}", + "details": { + "name": "int" + } + } + ] + }, + { + "base": "Iterate_VM", + "context": "{4F67EE42-D330-55A1-85DC-E030EABC0407}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Iterate_VM" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Iterate_VM is invoked" + }, + "details": { + "name": "Iterate_VM" + }, + "params": [ + { + "typeid": "{4F67EE42-D330-55A1-85DC-E030EABC0407}", + "details": { + "name": "AZStd::unordered_map" + } + } + ], + "results": [ + { + "typeid": "{E352A189-3CB6-5EAC-BBD0-670A9155DF0B}", + "details": { + "name": "Iterator_VM, AZStd::equal_to, allocator>>" + } + } + ] + }, + { + "base": "GetKeys", + "context": "{4F67EE42-D330-55A1-85DC-E030EABC0407}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke GetKeys" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after GetKeys is invoked" + }, + "details": { + "name": "GetKeys" + }, + "params": [ + { + "typeid": "{4F67EE42-D330-55A1-85DC-E030EABC0407}", + "details": { + "name": "AZStd::unordered_map" + } + } + ], + "results": [ + { + "typeid": "{F31F64EA-E384-5536-ACD6-8F01849730FC}", + "details": { + "name": "AZStd::vector" + } + } + ] + }, + { + "base": "Size", + "context": "{4F67EE42-D330-55A1-85DC-E030EABC0407}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Size" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Size is invoked" + }, + "details": { + "name": "Size" + }, + "params": [ + { + "typeid": "{4F67EE42-D330-55A1-85DC-E030EABC0407}", + "details": { + "name": "AZStd::unordered_map" + } + } + ], + "results": [ + { + "typeid": "{72039442-EB38-4D42-A1AD-CB68F7E0EEF6}", + "details": { + "name": "int" + } + } + ] + }, + { + "base": "Erase", + "context": "{4F67EE42-D330-55A1-85DC-E030EABC0407}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Erase" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Erase is invoked" + }, + "details": { + "name": "Erase" + }, + "params": [ + { + "typeid": "{4F67EE42-D330-55A1-85DC-E030EABC0407}", + "details": { + "name": "AZStd::unordered_map" + } + }, + { + "typeid": "{110C4B14-11A8-4E9D-8638-5051013A56AC}", + "details": { + "name": "double" + } + } + ], + "results": [ + { + "typeid": "{4F67EE42-D330-55A1-85DC-E030EABC0407}", + "details": { + "name": "AZStd::unordered_map" + } + } + ] + }, + { + "base": "EraseCheck_VM", + "context": "{4F67EE42-D330-55A1-85DC-E030EABC0407}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke EraseCheck_VM" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after EraseCheck_VM is invoked" + }, + "details": { + "name": "EraseCheck_VM" + }, + "params": [ + { + "typeid": "{4F67EE42-D330-55A1-85DC-E030EABC0407}", + "details": { + "name": "AZStd::unordered_map" + } + }, + { + "typeid": "{110C4B14-11A8-4E9D-8638-5051013A56AC}", + "details": { + "name": "double" + } + } + ], + "results": [ + { + "typeid": "{A0CA880C-AFE4-43CB-926C-59AC48496112}", + "details": { + "name": "bool" + } + } + ] + }, + { + "base": "Clear", + "context": "{4F67EE42-D330-55A1-85DC-E030EABC0407}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Clear" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Clear is invoked" + }, + "details": { + "name": "Clear" + }, + "params": [ + { + "typeid": "{4F67EE42-D330-55A1-85DC-E030EABC0407}", + "details": { + "name": "AZStd::unordered_map" + } + } + ], + "results": [ + { + "typeid": "{4F67EE42-D330-55A1-85DC-E030EABC0407}", + "details": { + "name": "AZStd::unordered_map" + } + } + ] + }, + { + "base": "At", + "context": "{4F67EE42-D330-55A1-85DC-E030EABC0407}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke At" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after At is invoked" + }, + "details": { + "name": "At" + }, + "params": [ + { + "typeid": "{4F67EE42-D330-55A1-85DC-E030EABC0407}", + "details": { + "name": "AZStd::unordered_map" + } + }, + { + "typeid": "{110C4B14-11A8-4E9D-8638-5051013A56AC}", + "details": { + "name": "double" + } + } + ], + "results": [ + { + "typeid": "{8379EB7D-01FA-4538-B64B-A6543B4BE73D}", + "details": { + "name": "Vector3" + } + } + ] + }, + { + "base": "BucketCount", + "context": "{4F67EE42-D330-55A1-85DC-E030EABC0407}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke BucketCount" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after BucketCount is invoked" + }, + "details": { + "name": "BucketCount" + }, + "params": [ + { + "typeid": "{4F67EE42-D330-55A1-85DC-E030EABC0407}", + "details": { + "name": "AZStd::unordered_map" + } + } + ], + "results": [ + { + "typeid": "{D6597933-47CD-4FC8-B911-63F3E2B0993A}", + "details": { + "name": "AZ::u64" + } + } + ] + }, + { + "base": "Empty", + "context": "{4F67EE42-D330-55A1-85DC-E030EABC0407}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Empty" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Empty is invoked" + }, + "details": { + "name": "Empty" + }, + "params": [ + { + "typeid": "{4F67EE42-D330-55A1-85DC-E030EABC0407}", + "details": { + "name": "AZStd::unordered_map" + } + } + ], + "results": [ + { + "typeid": "{A0CA880C-AFE4-43CB-926C-59AC48496112}", + "details": { + "name": "bool" + } + } + ] + }, + { + "base": "Swap", + "context": "{4F67EE42-D330-55A1-85DC-E030EABC0407}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Swap" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Swap is invoked" + }, + "details": { + "name": "Swap" + }, + "params": [ + { + "typeid": "{4F67EE42-D330-55A1-85DC-E030EABC0407}", + "details": { + "name": "AZStd::unordered_map" + } + }, + { + "typeid": "{4F67EE42-D330-55A1-85DC-E030EABC0407}", + "details": { + "name": "AZStd::unordered_map" + } + } + ] + } + ] + }, + { + "base": "{E3B6686C-306E-5C7F-9274-196CC18E1284}", + "context": "OnDemandReflected", + "variant": "", + "details": { + "name": "Array", + "category": "Array", + "tooltip": "A dynamically sized container of elements." + }, + "methods": [ + { + "base": "Size", + "context": "{E3B6686C-306E-5C7F-9274-196CC18E1284}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Size" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Size is invoked" + }, + "details": { + "name": "Size" + }, + "params": [ + { + "typeid": "{E3B6686C-306E-5C7F-9274-196CC18E1284}", + "details": { + "name": "AZStd::vector" + } + } + ], + "results": [ + { + "typeid": "{72039442-EB38-4D42-A1AD-CB68F7E0EEF6}", + "details": { + "name": "int" + } + } + ] + }, + { + "base": "Front", + "context": "{E3B6686C-306E-5C7F-9274-196CC18E1284}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Front" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Front is invoked" + }, + "details": { + "name": "Front" + }, + "params": [ + { + "typeid": "{E3B6686C-306E-5C7F-9274-196CC18E1284}", + "details": { + "name": "AZStd::vector" + } + } + ], + "results": [ + { + "typeid": "{7A7201B9-67B5-438B-B4EB-F3EEBB78C617}", + "details": { + "name": "SceneQueryHit" + } + } + ] + }, + { + "base": "HasKey", + "context": "{E3B6686C-306E-5C7F-9274-196CC18E1284}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Has Key" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Has Key is invoked" + }, + "details": { + "name": "Has Key" + }, + "params": [ + { + "typeid": "{E3B6686C-306E-5C7F-9274-196CC18E1284}", + "details": { + "name": "AZStd::vector" + } + }, + { + "typeid": "{D6597933-47CD-4FC8-B911-63F3E2B0993A}", + "details": { + "name": "AZ::u64" + } + } + ], + "results": [ + { + "typeid": "{A0CA880C-AFE4-43CB-926C-59AC48496112}", + "details": { + "name": "bool" + } + } + ] + }, + { + "base": "Resize", + "context": "{E3B6686C-306E-5C7F-9274-196CC18E1284}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Resize" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Resize is invoked" + }, + "details": { + "name": "Resize" + }, + "params": [ + { + "typeid": "{E3B6686C-306E-5C7F-9274-196CC18E1284}", + "details": { + "name": "AZStd::vector" + } + }, + { + "typeid": "{D6597933-47CD-4FC8-B911-63F3E2B0993A}", + "details": { + "name": "AZ::u64" + } + } + ] + }, + { + "base": "at", + "context": "{E3B6686C-306E-5C7F-9274-196CC18E1284}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke at" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after at is invoked" + }, + "details": { + "name": "at" + }, + "params": [ + { + "typeid": "{E3B6686C-306E-5C7F-9274-196CC18E1284}", + "details": { + "name": "AZStd::vector" + } + }, + { + "typeid": "{D6597933-47CD-4FC8-B911-63F3E2B0993A}", + "details": { + "name": "AZ::u64" + } + } + ], + "results": [ + { + "typeid": "{7A7201B9-67B5-438B-B4EB-F3EEBB78C617}", + "details": { + "name": "SceneQueryHit" + } + } + ] + }, + { + "base": "Back", + "context": "{E3B6686C-306E-5C7F-9274-196CC18E1284}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Back" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Back is invoked" + }, + "details": { + "name": "Back" + }, + "params": [ + { + "typeid": "{E3B6686C-306E-5C7F-9274-196CC18E1284}", + "details": { + "name": "AZStd::vector" + } + } + ], + "results": [ + { + "typeid": "{7A7201B9-67B5-438B-B4EB-F3EEBB78C617}", + "details": { + "name": "SceneQueryHit" + } + } + ] + }, + { + "base": "pop_back", + "context": "{E3B6686C-306E-5C7F-9274-196CC18E1284}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke pop_back" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after pop_back is invoked" + }, + "details": { + "name": "pop_back" + }, + "params": [ + { + "typeid": "{E3B6686C-306E-5C7F-9274-196CC18E1284}", + "details": { + "name": "AZStd::vector" + } + } + ] + }, + { + "base": "size", + "context": "{E3B6686C-306E-5C7F-9274-196CC18E1284}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke size" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after size is invoked" + }, + "details": { + "name": "size" + }, + "params": [ + { + "typeid": "{E3B6686C-306E-5C7F-9274-196CC18E1284}", + "details": { + "name": "AZStd::vector" + } + } + ], + "results": [ + { + "typeid": "{72039442-EB38-4D42-A1AD-CB68F7E0EEF6}", + "details": { + "name": "int" + } + } + ] + }, + { + "base": "At", + "context": "{E3B6686C-306E-5C7F-9274-196CC18E1284}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke At" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after At is invoked" + }, + "details": { + "name": "At" + }, + "params": [ + { + "typeid": "{E3B6686C-306E-5C7F-9274-196CC18E1284}", + "details": { + "name": "AZStd::vector" + } + }, + { + "typeid": "{D6597933-47CD-4FC8-B911-63F3E2B0993A}", + "details": { + "name": "AZ::u64" + } + } + ], + "results": [ + { + "typeid": "{7A7201B9-67B5-438B-B4EB-F3EEBB78C617}", + "details": { + "name": "SceneQueryHit" + } + } + ] + }, + { + "base": "Empty", + "context": "{E3B6686C-306E-5C7F-9274-196CC18E1284}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Empty" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Empty is invoked" + }, + "details": { + "name": "Empty" + }, + "params": [ + { + "typeid": "{E3B6686C-306E-5C7F-9274-196CC18E1284}", + "details": { + "name": "AZStd::vector" + } + } + ], + "results": [ + { + "typeid": "{A0CA880C-AFE4-43CB-926C-59AC48496112}", + "details": { + "name": "bool" + } + } + ] + }, + { + "base": "Swap", + "context": "{E3B6686C-306E-5C7F-9274-196CC18E1284}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Swap" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Swap is invoked" + }, + "details": { + "name": "Swap" + }, + "params": [ + { + "typeid": "{E3B6686C-306E-5C7F-9274-196CC18E1284}", + "details": { + "name": "AZStd::vector" + } + }, + { + "typeid": "{E3B6686C-306E-5C7F-9274-196CC18E1284}", + "details": { + "name": "AZStd::vector" + } + } + ] + }, + { + "base": "push_back", + "context": "{E3B6686C-306E-5C7F-9274-196CC18E1284}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke push_back" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after push_back is invoked" + }, + "details": { + "name": "push_back" + }, + "params": [ + { + "typeid": "{E3B6686C-306E-5C7F-9274-196CC18E1284}", + "details": { + "name": "AZStd::vector" + } + }, + { + "typeid": "{7A7201B9-67B5-438B-B4EB-F3EEBB78C617}", + "details": { + "name": "SceneQueryHit" + } + } + ] + }, + { + "base": "PushBack_VM", + "context": "{E3B6686C-306E-5C7F-9274-196CC18E1284}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke PushBack_VM" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after PushBack_VM is invoked" + }, + "details": { + "name": "PushBack_VM" + }, + "params": [ + { + "typeid": "{E3B6686C-306E-5C7F-9274-196CC18E1284}", + "details": { + "name": "AZStd::vector" + } + }, + { + "typeid": "{7A7201B9-67B5-438B-B4EB-F3EEBB78C617}", + "details": { + "name": "SceneQueryHit" + } + } + ], + "results": [ + { + "typeid": "{E3B6686C-306E-5C7F-9274-196CC18E1284}", + "details": { + "name": "AZStd::vector" + } + } + ] + }, + { + "base": "AtUnchecked", + "context": "{E3B6686C-306E-5C7F-9274-196CC18E1284}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke AtUnchecked" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after AtUnchecked is invoked" + }, + "details": { + "name": "AtUnchecked" + }, + "params": [ + { + "typeid": "{E3B6686C-306E-5C7F-9274-196CC18E1284}", + "details": { + "name": "AZStd::vector" + } + }, + { + "typeid": "{D6597933-47CD-4FC8-B911-63F3E2B0993A}", + "details": { + "name": "AZ::u64" + } + } + ], + "results": [ + { + "typeid": "{7A7201B9-67B5-438B-B4EB-F3EEBB78C617}", + "details": { + "name": "SceneQueryHit" + } + } + ] + }, + { + "base": "clear", + "context": "{E3B6686C-306E-5C7F-9274-196CC18E1284}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke clear" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after clear is invoked" + }, + "details": { + "name": "clear" + }, + "params": [ + { + "typeid": "{E3B6686C-306E-5C7F-9274-196CC18E1284}", + "details": { + "name": "AZStd::vector" + } + } + ] + }, + { + "base": "NotEmpty", + "context": "{E3B6686C-306E-5C7F-9274-196CC18E1284}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke NotEmpty" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after NotEmpty is invoked" + }, + "details": { + "name": "NotEmpty" + }, + "params": [ + { + "typeid": "{E3B6686C-306E-5C7F-9274-196CC18E1284}", + "details": { + "name": "AZStd::vector" + } + } + ], + "results": [ + { + "typeid": "{A0CA880C-AFE4-43CB-926C-59AC48496112}", + "details": { + "name": "bool" + } + } + ] + }, + { + "base": "Erase_VM", + "context": "{E3B6686C-306E-5C7F-9274-196CC18E1284}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Erase_VM" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Erase_VM is invoked" + }, + "details": { + "name": "Erase_VM" + }, + "params": [ + { + "typeid": "{E3B6686C-306E-5C7F-9274-196CC18E1284}", + "details": { + "name": "AZStd::vector" + } + }, + { + "typeid": "{D6597933-47CD-4FC8-B911-63F3E2B0993A}", + "details": { + "name": "AZ::u64" + } + } + ], + "results": [ + { + "typeid": "{E3B6686C-306E-5C7F-9274-196CC18E1284}", + "details": { + "name": "AZStd::vector" + } + } + ] + }, + { + "base": "EraseCheck_VM", + "context": "{E3B6686C-306E-5C7F-9274-196CC18E1284}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke EraseCheck_VM" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after EraseCheck_VM is invoked" + }, + "details": { + "name": "EraseCheck_VM" + }, + "params": [ + { + "typeid": "{E3B6686C-306E-5C7F-9274-196CC18E1284}", + "details": { + "name": "AZStd::vector" + } + }, + { + "typeid": "{D6597933-47CD-4FC8-B911-63F3E2B0993A}", + "details": { + "name": "AZ::u64" + } + } + ], + "results": [ + { + "typeid": "{A0CA880C-AFE4-43CB-926C-59AC48496112}", + "details": { + "name": "bool" + } + } + ] + }, + { + "base": "Capacity", + "context": "{E3B6686C-306E-5C7F-9274-196CC18E1284}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Capacity" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Capacity is invoked" + }, + "details": { + "name": "Capacity" + }, + "params": [ + { + "typeid": "{E3B6686C-306E-5C7F-9274-196CC18E1284}", + "details": { + "name": "AZStd::vector" + } + } + ], + "results": [ + { + "typeid": "{D6597933-47CD-4FC8-B911-63F3E2B0993A}", + "details": { + "name": "AZ::u64" + } + } + ] + }, + { + "base": "Clear", + "context": "{E3B6686C-306E-5C7F-9274-196CC18E1284}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Clear" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Clear is invoked" + }, + "details": { + "name": "Clear" + }, + "params": [ + { + "typeid": "{E3B6686C-306E-5C7F-9274-196CC18E1284}", + "details": { + "name": "AZStd::vector" + } + } + ], + "results": [ + { + "typeid": "{E3B6686C-306E-5C7F-9274-196CC18E1284}", + "details": { + "name": "AZStd::vector" + } + } + ] + }, + { + "base": "AssignAt", + "context": "{E3B6686C-306E-5C7F-9274-196CC18E1284}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke AssignAt" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after AssignAt is invoked" + }, + "details": { + "name": "AssignAt" + }, + "params": [ + { + "typeid": "{E3B6686C-306E-5C7F-9274-196CC18E1284}", + "details": { + "name": "AZStd::vector" + } + }, + { + "typeid": "{D6597933-47CD-4FC8-B911-63F3E2B0993A}", + "details": { + "name": "AZ::u64" + } + }, + { + "typeid": "{7A7201B9-67B5-438B-B4EB-F3EEBB78C617}", + "details": { + "name": "SceneQueryHit" + } + } + ] + }, + { + "base": "GetSize", + "context": "{E3B6686C-306E-5C7F-9274-196CC18E1284}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke GetSize" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after GetSize is invoked" + }, + "details": { + "name": "GetSize" + }, + "params": [ + { + "typeid": "{E3B6686C-306E-5C7F-9274-196CC18E1284}", + "details": { + "name": "AZStd::vector" + } + } + ], + "results": [ + { + "typeid": "{72039442-EB38-4D42-A1AD-CB68F7E0EEF6}", + "details": { + "name": "int" + } + } + ] + }, + { + "base": "Insert", + "context": "{E3B6686C-306E-5C7F-9274-196CC18E1284}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Insert" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Insert is invoked" + }, + "details": { + "name": "Insert" + }, + "params": [ + { + "typeid": "{E3B6686C-306E-5C7F-9274-196CC18E1284}", + "details": { + "name": "AZStd::vector" + } + }, + { + "typeid": "{D6597933-47CD-4FC8-B911-63F3E2B0993A}", + "details": { + "name": "AZ::u64" + } + }, + { + "typeid": "{7A7201B9-67B5-438B-B4EB-F3EEBB78C617}", + "details": { + "name": "SceneQueryHit" + } + } + ], + "results": [ + { + "typeid": "{E3B6686C-306E-5C7F-9274-196CC18E1284}", + "details": { + "name": "AZStd::vector" + } + } + ] + }, + { + "base": "PushBack", + "context": "{E3B6686C-306E-5C7F-9274-196CC18E1284}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke PushBack" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after PushBack is invoked" + }, + "details": { + "name": "PushBack" + }, + "params": [ + { + "typeid": "{E3B6686C-306E-5C7F-9274-196CC18E1284}", + "details": { + "name": "AZStd::vector" + } + }, + { + "typeid": "{7A7201B9-67B5-438B-B4EB-F3EEBB78C617}", + "details": { + "name": "SceneQueryHit" + } + } + ] + }, + { + "base": "Reserve", + "context": "{E3B6686C-306E-5C7F-9274-196CC18E1284}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Reserve" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Reserve is invoked" + }, + "details": { + "name": "Reserve" + }, + "params": [ + { + "typeid": "{E3B6686C-306E-5C7F-9274-196CC18E1284}", + "details": { + "name": "AZStd::vector" + } + }, + { + "typeid": "{D6597933-47CD-4FC8-B911-63F3E2B0993A}", + "details": { + "name": "AZ::u64" + } + } + ] + }, + { + "base": "Iterate_VM", + "context": "{E3B6686C-306E-5C7F-9274-196CC18E1284}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Iterate_VM" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Iterate_VM is invoked" + }, + "details": { + "name": "Iterate_VM" + }, + "params": [ + { + "typeid": "{E3B6686C-306E-5C7F-9274-196CC18E1284}", + "details": { + "name": "AZStd::vector" + } + } + ], + "results": [ + { + "typeid": "{1B258652-6803-5BAC-BFDE-073AD3662234}", + "details": { + "name": "Iterator_VM>" + } + } + ] + } + ] + }, + { + "base": "{0521985E-FC3D-5123-922A-E4011E605660}", + "context": "OnDemandReflected", + "variant": "", + "details": { + "name": "Map", + "category": "Map", + "tooltip": "A collection of Key/Value pairs, where each Key value must be unique." + }, + "methods": [ + { + "base": "contains", + "context": "{0521985E-FC3D-5123-922A-E4011E605660}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke contains" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after contains is invoked" + }, + "details": { + "name": "contains" + }, + "params": [ + { + "typeid": "{0521985E-FC3D-5123-922A-E4011E605660}", + "details": { + "name": "AZStd::unordered_map" + } + }, + { + "typeid": "{9F4E062E-06A0-46D4-85DF-E0DA96467D3A}", + "details": { + "name": "Crc32" + } + } + ], + "results": [ + { + "typeid": "{A0CA880C-AFE4-43CB-926C-59AC48496112}", + "details": { + "name": "bool" + } + } + ] + }, + { + "base": "Insert", + "context": "{0521985E-FC3D-5123-922A-E4011E605660}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Insert" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Insert is invoked" + }, + "details": { + "name": "Insert" + }, + "params": [ + { + "typeid": "{0521985E-FC3D-5123-922A-E4011E605660}", + "details": { + "name": "AZStd::unordered_map" + } + }, + { + "typeid": "{9F4E062E-06A0-46D4-85DF-E0DA96467D3A}", + "details": { + "name": "Crc32" + } + }, + { + "typeid": "{652ED536-3402-439B-AEBE-4A5DBC554085}", + "details": { + "name": "AssetId" + } + } + ], + "results": [ + { + "typeid": "{0521985E-FC3D-5123-922A-E4011E605660}", + "details": { + "name": "AZStd::unordered_map" + } + } + ] + }, + { + "base": "Reserve", + "context": "{0521985E-FC3D-5123-922A-E4011E605660}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Reserve" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Reserve is invoked" + }, + "details": { + "name": "Reserve" + }, + "params": [ + { + "typeid": "{0521985E-FC3D-5123-922A-E4011E605660}", + "details": { + "name": "AZStd::unordered_map" + } + }, + { + "typeid": "{D6597933-47CD-4FC8-B911-63F3E2B0993A}", + "details": { + "name": "AZ::u64" + } + } + ] + }, + { + "base": "GetSize", + "context": "{0521985E-FC3D-5123-922A-E4011E605660}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke GetSize" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after GetSize is invoked" + }, + "details": { + "name": "GetSize" + }, + "params": [ + { + "typeid": "{0521985E-FC3D-5123-922A-E4011E605660}", + "details": { + "name": "AZStd::unordered_map" + } + } + ], + "results": [ + { + "typeid": "{72039442-EB38-4D42-A1AD-CB68F7E0EEF6}", + "details": { + "name": "int" + } + } + ] + }, + { + "base": "Iterate_VM", + "context": "{0521985E-FC3D-5123-922A-E4011E605660}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Iterate_VM" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Iterate_VM is invoked" + }, + "details": { + "name": "Iterate_VM" + }, + "params": [ + { + "typeid": "{0521985E-FC3D-5123-922A-E4011E605660}", + "details": { + "name": "AZStd::unordered_map" + } + } + ], + "results": [ + { + "typeid": "{A0242929-1EDC-57CD-9E7A-4F739086210C}", + "details": { + "name": "Iterator_VM, AZStd::equal_to, allocator>>" + } + } + ] + }, + { + "base": "GetKeys", + "context": "{0521985E-FC3D-5123-922A-E4011E605660}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke GetKeys" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after GetKeys is invoked" + }, + "details": { + "name": "GetKeys" + }, + "params": [ + { + "typeid": "{0521985E-FC3D-5123-922A-E4011E605660}", + "details": { + "name": "AZStd::unordered_map" + } + } + ], + "results": [ + { + "typeid": "{287CEE87-6FF3-52FC-9D32-38255E2C7FE9}", + "details": { + "name": "AZStd::vector" + } + } + ] + }, + { + "base": "Size", + "context": "{0521985E-FC3D-5123-922A-E4011E605660}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Size" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Size is invoked" + }, + "details": { + "name": "Size" + }, + "params": [ + { + "typeid": "{0521985E-FC3D-5123-922A-E4011E605660}", + "details": { + "name": "AZStd::unordered_map" + } + } + ], + "results": [ + { + "typeid": "{72039442-EB38-4D42-A1AD-CB68F7E0EEF6}", + "details": { + "name": "int" + } + } + ] + }, + { + "base": "Erase", + "context": "{0521985E-FC3D-5123-922A-E4011E605660}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Erase" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Erase is invoked" + }, + "details": { + "name": "Erase" + }, + "params": [ + { + "typeid": "{0521985E-FC3D-5123-922A-E4011E605660}", + "details": { + "name": "AZStd::unordered_map" + } + }, + { + "typeid": "{9F4E062E-06A0-46D4-85DF-E0DA96467D3A}", + "details": { + "name": "Crc32" + } + } + ], + "results": [ + { + "typeid": "{0521985E-FC3D-5123-922A-E4011E605660}", + "details": { + "name": "AZStd::unordered_map" + } + } + ] + }, + { + "base": "EraseCheck_VM", + "context": "{0521985E-FC3D-5123-922A-E4011E605660}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke EraseCheck_VM" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after EraseCheck_VM is invoked" + }, + "details": { + "name": "EraseCheck_VM" + }, + "params": [ + { + "typeid": "{0521985E-FC3D-5123-922A-E4011E605660}", + "details": { + "name": "AZStd::unordered_map" + } + }, + { + "typeid": "{9F4E062E-06A0-46D4-85DF-E0DA96467D3A}", + "details": { + "name": "Crc32" + } + } + ], + "results": [ + { + "typeid": "{A0CA880C-AFE4-43CB-926C-59AC48496112}", + "details": { + "name": "bool" + } + } + ] + }, + { + "base": "Clear", + "context": "{0521985E-FC3D-5123-922A-E4011E605660}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Clear" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Clear is invoked" + }, + "details": { + "name": "Clear" + }, + "params": [ + { + "typeid": "{0521985E-FC3D-5123-922A-E4011E605660}", + "details": { + "name": "AZStd::unordered_map" + } + } + ], + "results": [ + { + "typeid": "{0521985E-FC3D-5123-922A-E4011E605660}", + "details": { + "name": "AZStd::unordered_map" + } + } + ] + }, + { + "base": "At", + "context": "{0521985E-FC3D-5123-922A-E4011E605660}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke At" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after At is invoked" + }, + "details": { + "name": "At" + }, + "params": [ + { + "typeid": "{0521985E-FC3D-5123-922A-E4011E605660}", + "details": { + "name": "AZStd::unordered_map" + } + }, + { + "typeid": "{9F4E062E-06A0-46D4-85DF-E0DA96467D3A}", + "details": { + "name": "Crc32" + } + } + ], + "results": [ + { + "typeid": "{652ED536-3402-439B-AEBE-4A5DBC554085}", + "details": { + "name": "AssetId" + } + } + ] + }, + { + "base": "BucketCount", + "context": "{0521985E-FC3D-5123-922A-E4011E605660}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke BucketCount" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after BucketCount is invoked" + }, + "details": { + "name": "BucketCount" + }, + "params": [ + { + "typeid": "{0521985E-FC3D-5123-922A-E4011E605660}", + "details": { + "name": "AZStd::unordered_map" + } + } + ], + "results": [ + { + "typeid": "{D6597933-47CD-4FC8-B911-63F3E2B0993A}", + "details": { + "name": "AZ::u64" + } + } + ] + }, + { + "base": "Empty", + "context": "{0521985E-FC3D-5123-922A-E4011E605660}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Empty" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Empty is invoked" + }, + "details": { + "name": "Empty" + }, + "params": [ + { + "typeid": "{0521985E-FC3D-5123-922A-E4011E605660}", + "details": { + "name": "AZStd::unordered_map" + } + } + ], + "results": [ + { + "typeid": "{A0CA880C-AFE4-43CB-926C-59AC48496112}", + "details": { + "name": "bool" + } + } + ] + }, + { + "base": "Swap", + "context": "{0521985E-FC3D-5123-922A-E4011E605660}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Swap" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Swap is invoked" + }, + "details": { + "name": "Swap" + }, + "params": [ + { + "typeid": "{0521985E-FC3D-5123-922A-E4011E605660}", + "details": { + "name": "AZStd::unordered_map" + } + }, + { + "typeid": "{0521985E-FC3D-5123-922A-E4011E605660}", + "details": { + "name": "AZStd::unordered_map" + } + } + ] + } + ] + }, + { + "base": "{2A1A28D5-E14E-5F25-B2EE-48722008285A}", + "context": "OnDemandReflected", + "variant": "", + "details": { + "name": "Map", + "category": "Map", + "tooltip": "A collection of Key/Value pairs, where each Key value must be unique." + }, + "methods": [ + { + "base": "contains", + "context": "{2A1A28D5-E14E-5F25-B2EE-48722008285A}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke contains" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after contains is invoked" + }, + "details": { + "name": "contains" + }, + "params": [ + { + "typeid": "{2A1A28D5-E14E-5F25-B2EE-48722008285A}", + "details": { + "name": "AZStd::unordered_map" + } + }, + { + "typeid": "{110C4B14-11A8-4E9D-8638-5051013A56AC}", + "details": { + "name": "double" + } + } + ], + "results": [ + { + "typeid": "{A0CA880C-AFE4-43CB-926C-59AC48496112}", + "details": { + "name": "bool" + } + } + ] + }, + { + "base": "Insert", + "context": "{2A1A28D5-E14E-5F25-B2EE-48722008285A}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Insert" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Insert is invoked" + }, + "details": { + "name": "Insert" + }, + "params": [ + { + "typeid": "{2A1A28D5-E14E-5F25-B2EE-48722008285A}", + "details": { + "name": "AZStd::unordered_map" + } + }, + { + "typeid": "{110C4B14-11A8-4E9D-8638-5051013A56AC}", + "details": { + "name": "double" + } + }, + { + "typeid": "{7894072A-9050-4F0F-901B-34B1A0D29417}", + "details": { + "name": "Color" + } + } + ], + "results": [ + { + "typeid": "{2A1A28D5-E14E-5F25-B2EE-48722008285A}", + "details": { + "name": "AZStd::unordered_map" + } + } + ] + }, + { + "base": "Reserve", + "context": "{2A1A28D5-E14E-5F25-B2EE-48722008285A}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Reserve" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Reserve is invoked" + }, + "details": { + "name": "Reserve" + }, + "params": [ + { + "typeid": "{2A1A28D5-E14E-5F25-B2EE-48722008285A}", + "details": { + "name": "AZStd::unordered_map" + } + }, + { + "typeid": "{D6597933-47CD-4FC8-B911-63F3E2B0993A}", + "details": { + "name": "AZ::u64" + } + } + ] + }, + { + "base": "GetSize", + "context": "{2A1A28D5-E14E-5F25-B2EE-48722008285A}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke GetSize" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after GetSize is invoked" + }, + "details": { + "name": "GetSize" + }, + "params": [ + { + "typeid": "{2A1A28D5-E14E-5F25-B2EE-48722008285A}", + "details": { + "name": "AZStd::unordered_map" + } + } + ], + "results": [ + { + "typeid": "{72039442-EB38-4D42-A1AD-CB68F7E0EEF6}", + "details": { + "name": "int" + } + } + ] + }, + { + "base": "Iterate_VM", + "context": "{2A1A28D5-E14E-5F25-B2EE-48722008285A}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Iterate_VM" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Iterate_VM is invoked" + }, + "details": { + "name": "Iterate_VM" + }, + "params": [ + { + "typeid": "{2A1A28D5-E14E-5F25-B2EE-48722008285A}", + "details": { + "name": "AZStd::unordered_map" + } + } + ], + "results": [ + { + "typeid": "{41DF6CCF-4B87-555F-B94F-D9586C804B67}", + "details": { + "name": "Iterator_VM, AZStd::equal_to, allocator>>" + } + } + ] + }, + { + "base": "GetKeys", + "context": "{2A1A28D5-E14E-5F25-B2EE-48722008285A}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke GetKeys" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after GetKeys is invoked" + }, + "details": { + "name": "GetKeys" + }, + "params": [ + { + "typeid": "{2A1A28D5-E14E-5F25-B2EE-48722008285A}", + "details": { + "name": "AZStd::unordered_map" + } + } + ], + "results": [ + { + "typeid": "{F31F64EA-E384-5536-ACD6-8F01849730FC}", + "details": { + "name": "AZStd::vector" + } + } + ] + }, + { + "base": "Size", + "context": "{2A1A28D5-E14E-5F25-B2EE-48722008285A}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Size" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Size is invoked" + }, + "details": { + "name": "Size" + }, + "params": [ + { + "typeid": "{2A1A28D5-E14E-5F25-B2EE-48722008285A}", + "details": { + "name": "AZStd::unordered_map" + } + } + ], + "results": [ + { + "typeid": "{72039442-EB38-4D42-A1AD-CB68F7E0EEF6}", + "details": { + "name": "int" + } + } + ] + }, + { + "base": "Erase", + "context": "{2A1A28D5-E14E-5F25-B2EE-48722008285A}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Erase" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Erase is invoked" + }, + "details": { + "name": "Erase" + }, + "params": [ + { + "typeid": "{2A1A28D5-E14E-5F25-B2EE-48722008285A}", + "details": { + "name": "AZStd::unordered_map" + } + }, + { + "typeid": "{110C4B14-11A8-4E9D-8638-5051013A56AC}", + "details": { + "name": "double" + } + } + ], + "results": [ + { + "typeid": "{2A1A28D5-E14E-5F25-B2EE-48722008285A}", + "details": { + "name": "AZStd::unordered_map" + } + } + ] + }, + { + "base": "EraseCheck_VM", + "context": "{2A1A28D5-E14E-5F25-B2EE-48722008285A}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke EraseCheck_VM" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after EraseCheck_VM is invoked" + }, + "details": { + "name": "EraseCheck_VM" + }, + "params": [ + { + "typeid": "{2A1A28D5-E14E-5F25-B2EE-48722008285A}", + "details": { + "name": "AZStd::unordered_map" + } + }, + { + "typeid": "{110C4B14-11A8-4E9D-8638-5051013A56AC}", + "details": { + "name": "double" + } + } + ], + "results": [ + { + "typeid": "{A0CA880C-AFE4-43CB-926C-59AC48496112}", + "details": { + "name": "bool" + } + } + ] + }, + { + "base": "Clear", + "context": "{2A1A28D5-E14E-5F25-B2EE-48722008285A}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Clear" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Clear is invoked" + }, + "details": { + "name": "Clear" + }, + "params": [ + { + "typeid": "{2A1A28D5-E14E-5F25-B2EE-48722008285A}", + "details": { + "name": "AZStd::unordered_map" + } + } + ], + "results": [ + { + "typeid": "{2A1A28D5-E14E-5F25-B2EE-48722008285A}", + "details": { + "name": "AZStd::unordered_map" + } + } + ] + }, + { + "base": "At", + "context": "{2A1A28D5-E14E-5F25-B2EE-48722008285A}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke At" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after At is invoked" + }, + "details": { + "name": "At" + }, + "params": [ + { + "typeid": "{2A1A28D5-E14E-5F25-B2EE-48722008285A}", + "details": { + "name": "AZStd::unordered_map" + } + }, + { + "typeid": "{110C4B14-11A8-4E9D-8638-5051013A56AC}", + "details": { + "name": "double" + } + } + ], + "results": [ + { + "typeid": "{7894072A-9050-4F0F-901B-34B1A0D29417}", + "details": { + "name": "Color" + } + } + ] + }, + { + "base": "BucketCount", + "context": "{2A1A28D5-E14E-5F25-B2EE-48722008285A}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke BucketCount" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after BucketCount is invoked" + }, + "details": { + "name": "BucketCount" + }, + "params": [ + { + "typeid": "{2A1A28D5-E14E-5F25-B2EE-48722008285A}", + "details": { + "name": "AZStd::unordered_map" + } + } + ], + "results": [ + { + "typeid": "{D6597933-47CD-4FC8-B911-63F3E2B0993A}", + "details": { + "name": "AZ::u64" + } + } + ] + }, + { + "base": "Empty", + "context": "{2A1A28D5-E14E-5F25-B2EE-48722008285A}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Empty" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Empty is invoked" + }, + "details": { + "name": "Empty" + }, + "params": [ + { + "typeid": "{2A1A28D5-E14E-5F25-B2EE-48722008285A}", + "details": { + "name": "AZStd::unordered_map" + } + } + ], + "results": [ + { + "typeid": "{A0CA880C-AFE4-43CB-926C-59AC48496112}", + "details": { + "name": "bool" + } + } + ] + }, + { + "base": "Swap", + "context": "{2A1A28D5-E14E-5F25-B2EE-48722008285A}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Swap" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Swap is invoked" + }, + "details": { + "name": "Swap" + }, + "params": [ + { + "typeid": "{2A1A28D5-E14E-5F25-B2EE-48722008285A}", + "details": { + "name": "AZStd::unordered_map" + } + }, + { + "typeid": "{2A1A28D5-E14E-5F25-B2EE-48722008285A}", + "details": { + "name": "AZStd::unordered_map" + } + } + ] + } + ] + }, + { + "base": "{6576DA9C-8949-513E-BA75-1DFFF648EDAF}", + "context": "OnDemandReflected", + "variant": "", + "details": { + "name": "Map", + "category": "Map", + "tooltip": "A collection of Key/Value pairs, where each Key value must be unique." + }, + "methods": [ + { + "base": "contains", + "context": "{6576DA9C-8949-513E-BA75-1DFFF648EDAF}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke contains" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after contains is invoked" + }, + "details": { + "name": "contains" + }, + "params": [ + { + "typeid": "{6576DA9C-8949-513E-BA75-1DFFF648EDAF}", + "details": { + "name": "AZStd::unordered_map" + } + }, + { + "typeid": "{110C4B14-11A8-4E9D-8638-5051013A56AC}", + "details": { + "name": "double" + } + } + ], + "results": [ + { + "typeid": "{A0CA880C-AFE4-43CB-926C-59AC48496112}", + "details": { + "name": "bool" + } + } + ] + }, + { + "base": "Insert", + "context": "{6576DA9C-8949-513E-BA75-1DFFF648EDAF}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Insert" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Insert is invoked" + }, + "details": { + "name": "Insert" + }, + "params": [ + { + "typeid": "{6576DA9C-8949-513E-BA75-1DFFF648EDAF}", + "details": { + "name": "AZStd::unordered_map" + } + }, + { + "typeid": "{110C4B14-11A8-4E9D-8638-5051013A56AC}", + "details": { + "name": "double" + } + }, + { + "typeid": "{3D80F623-C85C-4741-90D0-E4E66164E6BF}", + "details": { + "name": "Vector2" + } + } + ], + "results": [ + { + "typeid": "{6576DA9C-8949-513E-BA75-1DFFF648EDAF}", + "details": { + "name": "AZStd::unordered_map" + } + } + ] + }, + { + "base": "Reserve", + "context": "{6576DA9C-8949-513E-BA75-1DFFF648EDAF}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Reserve" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Reserve is invoked" + }, + "details": { + "name": "Reserve" + }, + "params": [ + { + "typeid": "{6576DA9C-8949-513E-BA75-1DFFF648EDAF}", + "details": { + "name": "AZStd::unordered_map" + } + }, + { + "typeid": "{D6597933-47CD-4FC8-B911-63F3E2B0993A}", + "details": { + "name": "AZ::u64" + } + } + ] + }, + { + "base": "GetSize", + "context": "{6576DA9C-8949-513E-BA75-1DFFF648EDAF}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke GetSize" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after GetSize is invoked" + }, + "details": { + "name": "GetSize" + }, + "params": [ + { + "typeid": "{6576DA9C-8949-513E-BA75-1DFFF648EDAF}", + "details": { + "name": "AZStd::unordered_map" + } + } + ], + "results": [ + { + "typeid": "{72039442-EB38-4D42-A1AD-CB68F7E0EEF6}", + "details": { + "name": "int" + } + } + ] + }, + { + "base": "Iterate_VM", + "context": "{6576DA9C-8949-513E-BA75-1DFFF648EDAF}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Iterate_VM" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Iterate_VM is invoked" + }, + "details": { + "name": "Iterate_VM" + }, + "params": [ + { + "typeid": "{6576DA9C-8949-513E-BA75-1DFFF648EDAF}", + "details": { + "name": "AZStd::unordered_map" + } + } + ], + "results": [ + { + "typeid": "{70A62BBA-CDEE-5E92-A669-A668E75BDC7E}", + "details": { + "name": "Iterator_VM, AZStd::equal_to, allocator>>" + } + } + ] + }, + { + "base": "GetKeys", + "context": "{6576DA9C-8949-513E-BA75-1DFFF648EDAF}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke GetKeys" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after GetKeys is invoked" + }, + "details": { + "name": "GetKeys" + }, + "params": [ + { + "typeid": "{6576DA9C-8949-513E-BA75-1DFFF648EDAF}", + "details": { + "name": "AZStd::unordered_map" + } + } + ], + "results": [ + { + "typeid": "{F31F64EA-E384-5536-ACD6-8F01849730FC}", + "details": { + "name": "AZStd::vector" + } + } + ] + }, + { + "base": "Size", + "context": "{6576DA9C-8949-513E-BA75-1DFFF648EDAF}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Size" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Size is invoked" + }, + "details": { + "name": "Size" + }, + "params": [ + { + "typeid": "{6576DA9C-8949-513E-BA75-1DFFF648EDAF}", + "details": { + "name": "AZStd::unordered_map" + } + } + ], + "results": [ + { + "typeid": "{72039442-EB38-4D42-A1AD-CB68F7E0EEF6}", + "details": { + "name": "int" + } + } + ] + }, + { + "base": "Erase", + "context": "{6576DA9C-8949-513E-BA75-1DFFF648EDAF}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Erase" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Erase is invoked" + }, + "details": { + "name": "Erase" + }, + "params": [ + { + "typeid": "{6576DA9C-8949-513E-BA75-1DFFF648EDAF}", + "details": { + "name": "AZStd::unordered_map" + } + }, + { + "typeid": "{110C4B14-11A8-4E9D-8638-5051013A56AC}", + "details": { + "name": "double" + } + } + ], + "results": [ + { + "typeid": "{6576DA9C-8949-513E-BA75-1DFFF648EDAF}", + "details": { + "name": "AZStd::unordered_map" + } + } + ] + }, + { + "base": "EraseCheck_VM", + "context": "{6576DA9C-8949-513E-BA75-1DFFF648EDAF}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke EraseCheck_VM" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after EraseCheck_VM is invoked" + }, + "details": { + "name": "EraseCheck_VM" + }, + "params": [ + { + "typeid": "{6576DA9C-8949-513E-BA75-1DFFF648EDAF}", + "details": { + "name": "AZStd::unordered_map" + } + }, + { + "typeid": "{110C4B14-11A8-4E9D-8638-5051013A56AC}", + "details": { + "name": "double" + } + } + ], + "results": [ + { + "typeid": "{A0CA880C-AFE4-43CB-926C-59AC48496112}", + "details": { + "name": "bool" + } + } + ] + }, + { + "base": "Clear", + "context": "{6576DA9C-8949-513E-BA75-1DFFF648EDAF}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Clear" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Clear is invoked" + }, + "details": { + "name": "Clear" + }, + "params": [ + { + "typeid": "{6576DA9C-8949-513E-BA75-1DFFF648EDAF}", + "details": { + "name": "AZStd::unordered_map" + } + } + ], + "results": [ + { + "typeid": "{6576DA9C-8949-513E-BA75-1DFFF648EDAF}", + "details": { + "name": "AZStd::unordered_map" + } + } + ] + }, + { + "base": "At", + "context": "{6576DA9C-8949-513E-BA75-1DFFF648EDAF}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke At" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after At is invoked" + }, + "details": { + "name": "At" + }, + "params": [ + { + "typeid": "{6576DA9C-8949-513E-BA75-1DFFF648EDAF}", + "details": { + "name": "AZStd::unordered_map" + } + }, + { + "typeid": "{110C4B14-11A8-4E9D-8638-5051013A56AC}", + "details": { + "name": "double" + } + } + ], + "results": [ + { + "typeid": "{3D80F623-C85C-4741-90D0-E4E66164E6BF}", + "details": { + "name": "Vector2" + } + } + ] + }, + { + "base": "BucketCount", + "context": "{6576DA9C-8949-513E-BA75-1DFFF648EDAF}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke BucketCount" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after BucketCount is invoked" + }, + "details": { + "name": "BucketCount" + }, + "params": [ + { + "typeid": "{6576DA9C-8949-513E-BA75-1DFFF648EDAF}", + "details": { + "name": "AZStd::unordered_map" + } + } + ], + "results": [ + { + "typeid": "{D6597933-47CD-4FC8-B911-63F3E2B0993A}", + "details": { + "name": "AZ::u64" + } + } + ] + }, + { + "base": "Empty", + "context": "{6576DA9C-8949-513E-BA75-1DFFF648EDAF}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Empty" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Empty is invoked" + }, + "details": { + "name": "Empty" + }, + "params": [ + { + "typeid": "{6576DA9C-8949-513E-BA75-1DFFF648EDAF}", + "details": { + "name": "AZStd::unordered_map" + } + } + ], + "results": [ + { + "typeid": "{A0CA880C-AFE4-43CB-926C-59AC48496112}", + "details": { + "name": "bool" + } + } + ] + }, + { + "base": "Swap", + "context": "{6576DA9C-8949-513E-BA75-1DFFF648EDAF}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Swap" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Swap is invoked" + }, + "details": { + "name": "Swap" + }, + "params": [ + { + "typeid": "{6576DA9C-8949-513E-BA75-1DFFF648EDAF}", + "details": { + "name": "AZStd::unordered_map" + } + }, + { + "typeid": "{6576DA9C-8949-513E-BA75-1DFFF648EDAF}", + "details": { + "name": "AZStd::unordered_map" + } + } + ] + } + ] + }, + { + "base": "{92FC6941-F5F5-5141-97A4-1965FC8B09CD}", + "context": "OnDemandReflected", + "variant": "", + "details": { + "name": "Outcome" + }, + "methods": [ + { + "base": "Failure", + "context": "{92FC6941-F5F5-5141-97A4-1965FC8B09CD}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Failure" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Failure is invoked" + }, + "details": { + "name": "Failure" + }, + "results": [ + { + "typeid": "{92FC6941-F5F5-5141-97A4-1965FC8B09CD}", + "details": { + "name": "Outcome, allocator>, void>" + } + } + ] + }, + { + "base": "Success", + "context": "{92FC6941-F5F5-5141-97A4-1965FC8B09CD}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Success" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Success is invoked" + }, + "details": { + "name": "Success" + }, + "params": [ + { + "typeid": "{03AAAB3F-5C47-5A66-9EBC-D5FA4DB353C9}", + "details": { + "name": "AZStd::string" + } + } + ], + "results": [ + { + "typeid": "{92FC6941-F5F5-5141-97A4-1965FC8B09CD}", + "details": { + "name": "Outcome, allocator>, void>" + } + } + ] + }, + { + "base": "GetValue", + "context": "{92FC6941-F5F5-5141-97A4-1965FC8B09CD}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke GetValue" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after GetValue is invoked" + }, + "details": { + "name": "GetValue" + }, + "params": [ + { + "typeid": "{92FC6941-F5F5-5141-97A4-1965FC8B09CD}", + "details": { + "name": "Outcome, all" + } + } + ], + "results": [ + { + "typeid": "{03AAAB3F-5C47-5A66-9EBC-D5FA4DB353C9}", + "details": { + "name": "AZStd::string" + } + } + ] + }, + { + "base": "IsSuccess", + "context": "{92FC6941-F5F5-5141-97A4-1965FC8B09CD}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke IsSuccess" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after IsSuccess is invoked" + }, + "details": { + "name": "IsSuccess" + }, + "params": [ + { + "typeid": "{92FC6941-F5F5-5141-97A4-1965FC8B09CD}", + "details": { + "name": "Outcome, all" + } + } + ], + "results": [ + { + "typeid": "{A0CA880C-AFE4-43CB-926C-59AC48496112}", + "details": { + "name": "bool" + } + } + ] + } + ] + }, + { + "base": "{230FE638-B7E6-5E7B-8D2F-B05D9313AC9F}", + "context": "OnDemandReflected", + "variant": "", + "details": { + "name": "Map", + "category": "Map", + "tooltip": "A collection of Key/Value pairs, where each Key value must be unique." + }, + "methods": [ + { + "base": "contains", + "context": "{230FE638-B7E6-5E7B-8D2F-B05D9313AC9F}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke contains" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after contains is invoked" + }, + "details": { + "name": "contains" + }, + "params": [ + { + "typeid": "{230FE638-B7E6-5E7B-8D2F-B05D9313AC9F}", + "details": { + "name": "AZStd::unordered_map" + } + }, + { + "typeid": "{110C4B14-11A8-4E9D-8638-5051013A56AC}", + "details": { + "name": "double" + } + } + ], + "results": [ + { + "typeid": "{A0CA880C-AFE4-43CB-926C-59AC48496112}", + "details": { + "name": "bool" + } + } + ] + }, + { + "base": "Insert", + "context": "{230FE638-B7E6-5E7B-8D2F-B05D9313AC9F}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Insert" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Insert is invoked" + }, + "details": { + "name": "Insert" + }, + "params": [ + { + "typeid": "{230FE638-B7E6-5E7B-8D2F-B05D9313AC9F}", + "details": { + "name": "AZStd::unordered_map" + } + }, + { + "typeid": "{110C4B14-11A8-4E9D-8638-5051013A56AC}", + "details": { + "name": "double" + } + }, + { + "typeid": "{0CE9FA36-1E3A-4C06-9254-B7C73A732053}", + "details": { + "name": "Vector4" + } + } + ], + "results": [ + { + "typeid": "{230FE638-B7E6-5E7B-8D2F-B05D9313AC9F}", + "details": { + "name": "AZStd::unordered_map" + } + } + ] + }, + { + "base": "Reserve", + "context": "{230FE638-B7E6-5E7B-8D2F-B05D9313AC9F}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Reserve" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Reserve is invoked" + }, + "details": { + "name": "Reserve" + }, + "params": [ + { + "typeid": "{230FE638-B7E6-5E7B-8D2F-B05D9313AC9F}", + "details": { + "name": "AZStd::unordered_map" + } + }, + { + "typeid": "{D6597933-47CD-4FC8-B911-63F3E2B0993A}", + "details": { + "name": "AZ::u64" + } + } + ] + }, + { + "base": "GetSize", + "context": "{230FE638-B7E6-5E7B-8D2F-B05D9313AC9F}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke GetSize" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after GetSize is invoked" + }, + "details": { + "name": "GetSize" + }, + "params": [ + { + "typeid": "{230FE638-B7E6-5E7B-8D2F-B05D9313AC9F}", + "details": { + "name": "AZStd::unordered_map" + } + } + ], + "results": [ + { + "typeid": "{72039442-EB38-4D42-A1AD-CB68F7E0EEF6}", + "details": { + "name": "int" + } + } + ] + }, + { + "base": "Iterate_VM", + "context": "{230FE638-B7E6-5E7B-8D2F-B05D9313AC9F}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Iterate_VM" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Iterate_VM is invoked" + }, + "details": { + "name": "Iterate_VM" + }, + "params": [ + { + "typeid": "{230FE638-B7E6-5E7B-8D2F-B05D9313AC9F}", + "details": { + "name": "AZStd::unordered_map" + } + } + ], + "results": [ + { + "typeid": "{FDFC3E51-96FA-5F29-BD18-5178D8EF5B68}", + "details": { + "name": "Iterator_VM, AZStd::equal_to, allocator>>" + } + } + ] + }, + { + "base": "GetKeys", + "context": "{230FE638-B7E6-5E7B-8D2F-B05D9313AC9F}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke GetKeys" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after GetKeys is invoked" + }, + "details": { + "name": "GetKeys" + }, + "params": [ + { + "typeid": "{230FE638-B7E6-5E7B-8D2F-B05D9313AC9F}", + "details": { + "name": "AZStd::unordered_map" + } + } + ], + "results": [ + { + "typeid": "{F31F64EA-E384-5536-ACD6-8F01849730FC}", + "details": { + "name": "AZStd::vector" + } + } + ] + }, + { + "base": "Size", + "context": "{230FE638-B7E6-5E7B-8D2F-B05D9313AC9F}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Size" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Size is invoked" + }, + "details": { + "name": "Size" + }, + "params": [ + { + "typeid": "{230FE638-B7E6-5E7B-8D2F-B05D9313AC9F}", + "details": { + "name": "AZStd::unordered_map" + } + } + ], + "results": [ + { + "typeid": "{72039442-EB38-4D42-A1AD-CB68F7E0EEF6}", + "details": { + "name": "int" + } + } + ] + }, + { + "base": "Erase", + "context": "{230FE638-B7E6-5E7B-8D2F-B05D9313AC9F}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Erase" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Erase is invoked" + }, + "details": { + "name": "Erase" + }, + "params": [ + { + "typeid": "{230FE638-B7E6-5E7B-8D2F-B05D9313AC9F}", + "details": { + "name": "AZStd::unordered_map" + } + }, + { + "typeid": "{110C4B14-11A8-4E9D-8638-5051013A56AC}", + "details": { + "name": "double" + } + } + ], + "results": [ + { + "typeid": "{230FE638-B7E6-5E7B-8D2F-B05D9313AC9F}", + "details": { + "name": "AZStd::unordered_map" + } + } + ] + }, + { + "base": "EraseCheck_VM", + "context": "{230FE638-B7E6-5E7B-8D2F-B05D9313AC9F}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke EraseCheck_VM" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after EraseCheck_VM is invoked" + }, + "details": { + "name": "EraseCheck_VM" + }, + "params": [ + { + "typeid": "{230FE638-B7E6-5E7B-8D2F-B05D9313AC9F}", + "details": { + "name": "AZStd::unordered_map" + } + }, + { + "typeid": "{110C4B14-11A8-4E9D-8638-5051013A56AC}", + "details": { + "name": "double" + } + } + ], + "results": [ + { + "typeid": "{A0CA880C-AFE4-43CB-926C-59AC48496112}", + "details": { + "name": "bool" + } + } + ] + }, + { + "base": "Clear", + "context": "{230FE638-B7E6-5E7B-8D2F-B05D9313AC9F}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Clear" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Clear is invoked" + }, + "details": { + "name": "Clear" + }, + "params": [ + { + "typeid": "{230FE638-B7E6-5E7B-8D2F-B05D9313AC9F}", + "details": { + "name": "AZStd::unordered_map" + } + } + ], + "results": [ + { + "typeid": "{230FE638-B7E6-5E7B-8D2F-B05D9313AC9F}", + "details": { + "name": "AZStd::unordered_map" + } + } + ] + }, + { + "base": "At", + "context": "{230FE638-B7E6-5E7B-8D2F-B05D9313AC9F}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke At" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after At is invoked" + }, + "details": { + "name": "At" + }, + "params": [ + { + "typeid": "{230FE638-B7E6-5E7B-8D2F-B05D9313AC9F}", + "details": { + "name": "AZStd::unordered_map" + } + }, + { + "typeid": "{110C4B14-11A8-4E9D-8638-5051013A56AC}", + "details": { + "name": "double" + } + } + ], + "results": [ + { + "typeid": "{0CE9FA36-1E3A-4C06-9254-B7C73A732053}", + "details": { + "name": "Vector4" + } + } + ] + }, + { + "base": "BucketCount", + "context": "{230FE638-B7E6-5E7B-8D2F-B05D9313AC9F}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke BucketCount" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after BucketCount is invoked" + }, + "details": { + "name": "BucketCount" + }, + "params": [ + { + "typeid": "{230FE638-B7E6-5E7B-8D2F-B05D9313AC9F}", + "details": { + "name": "AZStd::unordered_map" + } + } + ], + "results": [ + { + "typeid": "{D6597933-47CD-4FC8-B911-63F3E2B0993A}", + "details": { + "name": "AZ::u64" + } + } + ] + }, + { + "base": "Empty", + "context": "{230FE638-B7E6-5E7B-8D2F-B05D9313AC9F}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Empty" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Empty is invoked" + }, + "details": { + "name": "Empty" + }, + "params": [ + { + "typeid": "{230FE638-B7E6-5E7B-8D2F-B05D9313AC9F}", + "details": { + "name": "AZStd::unordered_map" + } + } + ], + "results": [ + { + "typeid": "{A0CA880C-AFE4-43CB-926C-59AC48496112}", + "details": { + "name": "bool" + } + } + ] + }, + { + "base": "Swap", + "context": "{230FE638-B7E6-5E7B-8D2F-B05D9313AC9F}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Swap" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Swap is invoked" + }, + "details": { + "name": "Swap" + }, + "params": [ + { + "typeid": "{230FE638-B7E6-5E7B-8D2F-B05D9313AC9F}", + "details": { + "name": "AZStd::unordered_map" + } + }, + { + "typeid": "{230FE638-B7E6-5E7B-8D2F-B05D9313AC9F}", + "details": { + "name": "AZStd::unordered_map" + } + } + ] + } + ] + }, + { + "base": "{BC52AD94-A35B-5837-A8D8-A99B2AF7D4B4}", + "context": "OnDemandReflected", + "variant": "", + "details": { + "name": "Map", + "category": "Map", + "tooltip": "A collection of Key/Value pairs, where each Key value must be unique." + }, + "methods": [ + { + "base": "contains", + "context": "{BC52AD94-A35B-5837-A8D8-A99B2AF7D4B4}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke contains" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after contains is invoked" + }, + "details": { + "name": "contains" + }, + "params": [ + { + "typeid": "{BC52AD94-A35B-5837-A8D8-A99B2AF7D4B4}", + "details": { + "name": "AZStd::unordered_map" + } + }, + { + "typeid": "{652ED536-3402-439B-AEBE-4A5DBC554085}", + "details": { + "name": "AssetId" + } + } + ], + "results": [ + { + "typeid": "{A0CA880C-AFE4-43CB-926C-59AC48496112}", + "details": { + "name": "bool" + } + } + ] + }, + { + "base": "Insert", + "context": "{BC52AD94-A35B-5837-A8D8-A99B2AF7D4B4}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Insert" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Insert is invoked" + }, + "details": { + "name": "Insert" + }, + "params": [ + { + "typeid": "{BC52AD94-A35B-5837-A8D8-A99B2AF7D4B4}", + "details": { + "name": "AZStd::unordered_map" + } + }, + { + "typeid": "{652ED536-3402-439B-AEBE-4A5DBC554085}", + "details": { + "name": "AssetId" + } + }, + { + "typeid": "{A54C2B36-D5B8-46A1-A529-4EBDBD2450E7}", + "details": { + "name": "Aabb" + } + } + ], + "results": [ + { + "typeid": "{BC52AD94-A35B-5837-A8D8-A99B2AF7D4B4}", + "details": { + "name": "AZStd::unordered_map" + } + } + ] + }, + { + "base": "Reserve", + "context": "{BC52AD94-A35B-5837-A8D8-A99B2AF7D4B4}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Reserve" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Reserve is invoked" + }, + "details": { + "name": "Reserve" + }, + "params": [ + { + "typeid": "{BC52AD94-A35B-5837-A8D8-A99B2AF7D4B4}", + "details": { + "name": "AZStd::unordered_map" + } + }, + { + "typeid": "{D6597933-47CD-4FC8-B911-63F3E2B0993A}", + "details": { + "name": "AZ::u64" + } + } + ] + }, + { + "base": "GetSize", + "context": "{BC52AD94-A35B-5837-A8D8-A99B2AF7D4B4}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke GetSize" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after GetSize is invoked" + }, + "details": { + "name": "GetSize" + }, + "params": [ + { + "typeid": "{BC52AD94-A35B-5837-A8D8-A99B2AF7D4B4}", + "details": { + "name": "AZStd::unordered_map" + } + } + ], + "results": [ + { + "typeid": "{72039442-EB38-4D42-A1AD-CB68F7E0EEF6}", + "details": { + "name": "int" + } + } + ] + }, + { + "base": "Iterate_VM", + "context": "{BC52AD94-A35B-5837-A8D8-A99B2AF7D4B4}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Iterate_VM" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Iterate_VM is invoked" + }, + "details": { + "name": "Iterate_VM" + }, + "params": [ + { + "typeid": "{BC52AD94-A35B-5837-A8D8-A99B2AF7D4B4}", + "details": { + "name": "AZStd::unordered_map" + } + } + ], + "results": [ + { + "typeid": "{3DE678E1-1E8D-5CFA-AA1A-B22B4CB88458}", + "details": { + "name": "Iterator_VM, AZStd::equal_to, allocator>>" + } + } + ] + }, + { + "base": "GetKeys", + "context": "{BC52AD94-A35B-5837-A8D8-A99B2AF7D4B4}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke GetKeys" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after GetKeys is invoked" + }, + "details": { + "name": "GetKeys" + }, + "params": [ + { + "typeid": "{BC52AD94-A35B-5837-A8D8-A99B2AF7D4B4}", + "details": { + "name": "AZStd::unordered_map" + } + } + ], + "results": [ + { + "typeid": "{877C4A33-39B5-51D7-948D-F97DB81372A1}", + "details": { + "name": "AZStd::vector" + } + } + ] + }, + { + "base": "Size", + "context": "{BC52AD94-A35B-5837-A8D8-A99B2AF7D4B4}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Size" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Size is invoked" + }, + "details": { + "name": "Size" + }, + "params": [ + { + "typeid": "{BC52AD94-A35B-5837-A8D8-A99B2AF7D4B4}", + "details": { + "name": "AZStd::unordered_map" + } + } + ], + "results": [ + { + "typeid": "{72039442-EB38-4D42-A1AD-CB68F7E0EEF6}", + "details": { + "name": "int" + } + } + ] + }, + { + "base": "Erase", + "context": "{BC52AD94-A35B-5837-A8D8-A99B2AF7D4B4}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Erase" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Erase is invoked" + }, + "details": { + "name": "Erase" + }, + "params": [ + { + "typeid": "{BC52AD94-A35B-5837-A8D8-A99B2AF7D4B4}", + "details": { + "name": "AZStd::unordered_map" + } + }, + { + "typeid": "{652ED536-3402-439B-AEBE-4A5DBC554085}", + "details": { + "name": "AssetId" + } + } + ], + "results": [ + { + "typeid": "{BC52AD94-A35B-5837-A8D8-A99B2AF7D4B4}", + "details": { + "name": "AZStd::unordered_map" + } + } + ] + }, + { + "base": "EraseCheck_VM", + "context": "{BC52AD94-A35B-5837-A8D8-A99B2AF7D4B4}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke EraseCheck_VM" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after EraseCheck_VM is invoked" + }, + "details": { + "name": "EraseCheck_VM" + }, + "params": [ + { + "typeid": "{BC52AD94-A35B-5837-A8D8-A99B2AF7D4B4}", + "details": { + "name": "AZStd::unordered_map" + } + }, + { + "typeid": "{652ED536-3402-439B-AEBE-4A5DBC554085}", + "details": { + "name": "AssetId" + } + } + ], + "results": [ + { + "typeid": "{A0CA880C-AFE4-43CB-926C-59AC48496112}", + "details": { + "name": "bool" + } + } + ] + }, + { + "base": "Clear", + "context": "{BC52AD94-A35B-5837-A8D8-A99B2AF7D4B4}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Clear" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Clear is invoked" + }, + "details": { + "name": "Clear" + }, + "params": [ + { + "typeid": "{BC52AD94-A35B-5837-A8D8-A99B2AF7D4B4}", + "details": { + "name": "AZStd::unordered_map" + } + } + ], + "results": [ + { + "typeid": "{BC52AD94-A35B-5837-A8D8-A99B2AF7D4B4}", + "details": { + "name": "AZStd::unordered_map" + } + } + ] + }, + { + "base": "At", + "context": "{BC52AD94-A35B-5837-A8D8-A99B2AF7D4B4}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke At" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after At is invoked" + }, + "details": { + "name": "At" + }, + "params": [ + { + "typeid": "{BC52AD94-A35B-5837-A8D8-A99B2AF7D4B4}", + "details": { + "name": "AZStd::unordered_map" + } + }, + { + "typeid": "{652ED536-3402-439B-AEBE-4A5DBC554085}", + "details": { + "name": "AssetId" + } + } + ], + "results": [ + { + "typeid": "{A54C2B36-D5B8-46A1-A529-4EBDBD2450E7}", + "details": { + "name": "Aabb" + } + } + ] + }, + { + "base": "BucketCount", + "context": "{BC52AD94-A35B-5837-A8D8-A99B2AF7D4B4}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke BucketCount" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after BucketCount is invoked" + }, + "details": { + "name": "BucketCount" + }, + "params": [ + { + "typeid": "{BC52AD94-A35B-5837-A8D8-A99B2AF7D4B4}", + "details": { + "name": "AZStd::unordered_map" + } + } + ], + "results": [ + { + "typeid": "{D6597933-47CD-4FC8-B911-63F3E2B0993A}", + "details": { + "name": "AZ::u64" + } + } + ] + }, + { + "base": "Empty", + "context": "{BC52AD94-A35B-5837-A8D8-A99B2AF7D4B4}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Empty" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Empty is invoked" + }, + "details": { + "name": "Empty" + }, + "params": [ + { + "typeid": "{BC52AD94-A35B-5837-A8D8-A99B2AF7D4B4}", + "details": { + "name": "AZStd::unordered_map" + } + } + ], + "results": [ + { + "typeid": "{A0CA880C-AFE4-43CB-926C-59AC48496112}", + "details": { + "name": "bool" + } + } + ] + }, + { + "base": "Swap", + "context": "{BC52AD94-A35B-5837-A8D8-A99B2AF7D4B4}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Swap" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Swap is invoked" + }, + "details": { + "name": "Swap" + }, + "params": [ + { + "typeid": "{BC52AD94-A35B-5837-A8D8-A99B2AF7D4B4}", + "details": { + "name": "AZStd::unordered_map" + } + }, + { + "typeid": "{BC52AD94-A35B-5837-A8D8-A99B2AF7D4B4}", + "details": { + "name": "AZStd::unordered_map" + } + } + ] + } + ] + }, + { + "base": "{BEB6AE51-5283-5019-A320-294202035F80}", + "context": "OnDemandReflected", + "variant": "", + "details": { + "name": "Map", + "category": "Map", + "tooltip": "A collection of Key/Value pairs, where each Key value must be unique." + }, + "methods": [ + { + "base": "contains", + "context": "{BEB6AE51-5283-5019-A320-294202035F80}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke contains" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after contains is invoked" + }, + "details": { + "name": "contains" + }, + "params": [ + { + "typeid": "{BEB6AE51-5283-5019-A320-294202035F80}", + "details": { + "name": "AZStd::unordered_map" + } + }, + { + "typeid": "{652ED536-3402-439B-AEBE-4A5DBC554085}", + "details": { + "name": "AssetId" + } + } + ], + "results": [ + { + "typeid": "{A0CA880C-AFE4-43CB-926C-59AC48496112}", + "details": { + "name": "bool" + } + } + ] + }, + { + "base": "Insert", + "context": "{BEB6AE51-5283-5019-A320-294202035F80}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Insert" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Insert is invoked" + }, + "details": { + "name": "Insert" + }, + "params": [ + { + "typeid": "{BEB6AE51-5283-5019-A320-294202035F80}", + "details": { + "name": "AZStd::unordered_map" + } + }, + { + "typeid": "{652ED536-3402-439B-AEBE-4A5DBC554085}", + "details": { + "name": "AssetId" + } + }, + { + "typeid": "{8379EB7D-01FA-4538-B64B-A6543B4BE73D}", + "details": { + "name": "Vector3" + } + } + ], + "results": [ + { + "typeid": "{BEB6AE51-5283-5019-A320-294202035F80}", + "details": { + "name": "AZStd::unordered_map" + } + } + ] + }, + { + "base": "Reserve", + "context": "{BEB6AE51-5283-5019-A320-294202035F80}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Reserve" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Reserve is invoked" + }, + "details": { + "name": "Reserve" + }, + "params": [ + { + "typeid": "{BEB6AE51-5283-5019-A320-294202035F80}", + "details": { + "name": "AZStd::unordered_map" + } + }, + { + "typeid": "{D6597933-47CD-4FC8-B911-63F3E2B0993A}", + "details": { + "name": "AZ::u64" + } + } + ] + }, + { + "base": "GetSize", + "context": "{BEB6AE51-5283-5019-A320-294202035F80}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke GetSize" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after GetSize is invoked" + }, + "details": { + "name": "GetSize" + }, + "params": [ + { + "typeid": "{BEB6AE51-5283-5019-A320-294202035F80}", + "details": { + "name": "AZStd::unordered_map" + } + } + ], + "results": [ + { + "typeid": "{72039442-EB38-4D42-A1AD-CB68F7E0EEF6}", + "details": { + "name": "int" + } + } + ] + }, + { + "base": "Iterate_VM", + "context": "{BEB6AE51-5283-5019-A320-294202035F80}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Iterate_VM" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Iterate_VM is invoked" + }, + "details": { + "name": "Iterate_VM" + }, + "params": [ + { + "typeid": "{BEB6AE51-5283-5019-A320-294202035F80}", + "details": { + "name": "AZStd::unordered_map" + } + } + ], + "results": [ + { + "typeid": "{380B6851-F428-5BDF-9DA4-BBFD4E1CA5BF}", + "details": { + "name": "Iterator_VM, AZStd::equal_to, allocator>>" + } + } + ] + }, + { + "base": "GetKeys", + "context": "{BEB6AE51-5283-5019-A320-294202035F80}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke GetKeys" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after GetKeys is invoked" + }, + "details": { + "name": "GetKeys" + }, + "params": [ + { + "typeid": "{BEB6AE51-5283-5019-A320-294202035F80}", + "details": { + "name": "AZStd::unordered_map" + } + } + ], + "results": [ + { + "typeid": "{877C4A33-39B5-51D7-948D-F97DB81372A1}", + "details": { + "name": "AZStd::vector" + } + } + ] + }, + { + "base": "Size", + "context": "{BEB6AE51-5283-5019-A320-294202035F80}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Size" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Size is invoked" + }, + "details": { + "name": "Size" + }, + "params": [ + { + "typeid": "{BEB6AE51-5283-5019-A320-294202035F80}", + "details": { + "name": "AZStd::unordered_map" + } + } + ], + "results": [ + { + "typeid": "{72039442-EB38-4D42-A1AD-CB68F7E0EEF6}", + "details": { + "name": "int" + } + } + ] + }, + { + "base": "Erase", + "context": "{BEB6AE51-5283-5019-A320-294202035F80}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Erase" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Erase is invoked" + }, + "details": { + "name": "Erase" + }, + "params": [ + { + "typeid": "{BEB6AE51-5283-5019-A320-294202035F80}", + "details": { + "name": "AZStd::unordered_map" + } + }, + { + "typeid": "{652ED536-3402-439B-AEBE-4A5DBC554085}", + "details": { + "name": "AssetId" + } + } + ], + "results": [ + { + "typeid": "{BEB6AE51-5283-5019-A320-294202035F80}", + "details": { + "name": "AZStd::unordered_map" + } + } + ] + }, + { + "base": "EraseCheck_VM", + "context": "{BEB6AE51-5283-5019-A320-294202035F80}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke EraseCheck_VM" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after EraseCheck_VM is invoked" + }, + "details": { + "name": "EraseCheck_VM" + }, + "params": [ + { + "typeid": "{BEB6AE51-5283-5019-A320-294202035F80}", + "details": { + "name": "AZStd::unordered_map" + } + }, + { + "typeid": "{652ED536-3402-439B-AEBE-4A5DBC554085}", + "details": { + "name": "AssetId" + } + } + ], + "results": [ + { + "typeid": "{A0CA880C-AFE4-43CB-926C-59AC48496112}", + "details": { + "name": "bool" + } + } + ] + }, + { + "base": "Clear", + "context": "{BEB6AE51-5283-5019-A320-294202035F80}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Clear" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Clear is invoked" + }, + "details": { + "name": "Clear" + }, + "params": [ + { + "typeid": "{BEB6AE51-5283-5019-A320-294202035F80}", + "details": { + "name": "AZStd::unordered_map" + } + } + ], + "results": [ + { + "typeid": "{BEB6AE51-5283-5019-A320-294202035F80}", + "details": { + "name": "AZStd::unordered_map" + } + } + ] + }, + { + "base": "At", + "context": "{BEB6AE51-5283-5019-A320-294202035F80}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke At" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after At is invoked" + }, + "details": { + "name": "At" + }, + "params": [ + { + "typeid": "{BEB6AE51-5283-5019-A320-294202035F80}", + "details": { + "name": "AZStd::unordered_map" + } + }, + { + "typeid": "{652ED536-3402-439B-AEBE-4A5DBC554085}", + "details": { + "name": "AssetId" + } + } + ], + "results": [ + { + "typeid": "{8379EB7D-01FA-4538-B64B-A6543B4BE73D}", + "details": { + "name": "Vector3" + } + } + ] + }, + { + "base": "BucketCount", + "context": "{BEB6AE51-5283-5019-A320-294202035F80}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke BucketCount" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after BucketCount is invoked" + }, + "details": { + "name": "BucketCount" + }, + "params": [ + { + "typeid": "{BEB6AE51-5283-5019-A320-294202035F80}", + "details": { + "name": "AZStd::unordered_map" + } + } + ], + "results": [ + { + "typeid": "{D6597933-47CD-4FC8-B911-63F3E2B0993A}", + "details": { + "name": "AZ::u64" + } + } + ] + }, + { + "base": "Empty", + "context": "{BEB6AE51-5283-5019-A320-294202035F80}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Empty" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Empty is invoked" + }, + "details": { + "name": "Empty" + }, + "params": [ + { + "typeid": "{BEB6AE51-5283-5019-A320-294202035F80}", + "details": { + "name": "AZStd::unordered_map" + } + } + ], + "results": [ + { + "typeid": "{A0CA880C-AFE4-43CB-926C-59AC48496112}", + "details": { + "name": "bool" + } + } + ] + }, + { + "base": "Swap", + "context": "{BEB6AE51-5283-5019-A320-294202035F80}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Swap" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Swap is invoked" + }, + "details": { + "name": "Swap" + }, + "params": [ + { + "typeid": "{BEB6AE51-5283-5019-A320-294202035F80}", + "details": { + "name": "AZStd::unordered_map" + } + }, + { + "typeid": "{BEB6AE51-5283-5019-A320-294202035F80}", + "details": { + "name": "AZStd::unordered_map" + } + } + ] + } + ] + }, + { + "base": "{2E879A16-9143-5862-A5B3-EDED931C60BC}", + "context": "OnDemandReflected", + "variant": "", + "details": { + "name": "Shared", + "category": "Shared", + "tooltip": "A smart pointer which manages the life cycle of an object, and provides multiple points of ownership for the specified memory(The memory will remain active so long as any shared_ptr has a reference to it)." + }, + "methods": [ + { + "base": "get", + "context": "{2E879A16-9143-5862-A5B3-EDED931C60BC}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke get" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after get is invoked" + }, + "details": { + "name": "get" + }, + "params": [ + { + "typeid": "{2E879A16-9143-5862-A5B3-EDED931C60BC}", + "details": { + "name": "AZStd::shared_ptr" + } + } + ], + "results": [ + { + "typeid": "{F01C8BDD-6F24-4344-8945-521A8750B30B}", + "details": { + "name": "PolygonPrism", + "tooltip": "Polygon prism shape" + } + } + ] + } + ] + }, + { + "base": "{6CC7B2F9-F551-4CB8-A713-4149959AE337}", + "context": "OnDemandReflected", + "variant": "", + "details": { + "name": "MathColor_VM" + }, + "methods": [ + { + "base": "One", + "context": "{6CC7B2F9-F551-4CB8-A713-4149959AE337}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke One" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after One is invoked" + }, + "details": { + "name": "One" + }, + "results": [ + { + "typeid": "{7894072A-9050-4F0F-901B-34B1A0D29417}", + "details": { + "name": "Color" + } + } + ] + }, + { + "base": "LinearToGamma", + "context": "{6CC7B2F9-F551-4CB8-A713-4149959AE337}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke LinearToGamma" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after LinearToGamma is invoked" + }, + "details": { + "name": "LinearToGamma" + }, + "params": [ + { + "typeid": "{7894072A-9050-4F0F-901B-34B1A0D29417}", + "details": { + "name": "Color" + } + } + ], + "results": [ + { + "typeid": "{7894072A-9050-4F0F-901B-34B1A0D29417}", + "details": { + "name": "Color" + } + } + ] + }, + { + "base": "FromVector3", + "context": "{6CC7B2F9-F551-4CB8-A713-4149959AE337}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke FromVector3" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after FromVector3 is invoked" + }, + "details": { + "name": "FromVector3" + }, + "params": [ + { + "typeid": "{8379EB7D-01FA-4538-B64B-A6543B4BE73D}", + "details": { + "name": "Vector3" + } + } + ], + "results": [ + { + "typeid": "{7894072A-9050-4F0F-901B-34B1A0D29417}", + "details": { + "name": "Color" + } + } + ] + }, + { + "base": "MultiplyByNumber", + "context": "{6CC7B2F9-F551-4CB8-A713-4149959AE337}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke MultiplyByNumber" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after MultiplyByNumber is invoked" + }, + "details": { + "name": "MultiplyByNumber" + }, + "params": [ + { + "typeid": "{7894072A-9050-4F0F-901B-34B1A0D29417}", + "details": { + "name": "Color" + } + }, + { + "typeid": "{110C4B14-11A8-4E9D-8638-5051013A56AC}", + "details": { + "name": "double" + } + } + ], + "results": [ + { + "typeid": "{7894072A-9050-4F0F-901B-34B1A0D29417}", + "details": { + "name": "Color" + } + } + ] + }, + { + "base": "Negate", + "context": "{6CC7B2F9-F551-4CB8-A713-4149959AE337}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Negate" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Negate is invoked" + }, + "details": { + "name": "Negate" + }, + "params": [ + { + "typeid": "{7894072A-9050-4F0F-901B-34B1A0D29417}", + "details": { + "name": "Color" + } + } + ], + "results": [ + { + "typeid": "{7894072A-9050-4F0F-901B-34B1A0D29417}", + "details": { + "name": "Color" + } + } + ] + }, + { + "base": "Dot3", + "context": "{6CC7B2F9-F551-4CB8-A713-4149959AE337}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Dot3" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Dot3 is invoked" + }, + "details": { + "name": "Dot3" + }, + "params": [ + { + "typeid": "{7894072A-9050-4F0F-901B-34B1A0D29417}", + "details": { + "name": "Color" + } + }, + { + "typeid": "{7894072A-9050-4F0F-901B-34B1A0D29417}", + "details": { + "name": "Color" + } + } + ], + "results": [ + { + "typeid": "{110C4B14-11A8-4E9D-8638-5051013A56AC}", + "details": { + "name": "double" + } + } + ] + }, + { + "base": "Dot", + "context": "{6CC7B2F9-F551-4CB8-A713-4149959AE337}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Dot" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Dot is invoked" + }, + "details": { + "name": "Dot" + }, + "params": [ + { + "typeid": "{7894072A-9050-4F0F-901B-34B1A0D29417}", + "details": { + "name": "Color" + } + }, + { + "typeid": "{7894072A-9050-4F0F-901B-34B1A0D29417}", + "details": { + "name": "Color" + } + } + ], + "results": [ + { + "typeid": "{110C4B14-11A8-4E9D-8638-5051013A56AC}", + "details": { + "name": "double" + } + } + ] + }, + { + "base": "FromValues", + "context": "{6CC7B2F9-F551-4CB8-A713-4149959AE337}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke FromValues" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after FromValues is invoked" + }, + "details": { + "name": "FromValues" + }, + "params": [ + { + "typeid": "{110C4B14-11A8-4E9D-8638-5051013A56AC}", + "details": { + "name": "double" + } + }, + { + "typeid": "{110C4B14-11A8-4E9D-8638-5051013A56AC}", + "details": { + "name": "double" + } + }, + { + "typeid": "{110C4B14-11A8-4E9D-8638-5051013A56AC}", + "details": { + "name": "double" + } + }, + { + "typeid": "{110C4B14-11A8-4E9D-8638-5051013A56AC}", + "details": { + "name": "double" + } + } + ], + "results": [ + { + "typeid": "{7894072A-9050-4F0F-901B-34B1A0D29417}", + "details": { + "name": "Color" + } + } + ] + }, + { + "base": "DivideByNumber", + "context": "{6CC7B2F9-F551-4CB8-A713-4149959AE337}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke DivideByNumber" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after DivideByNumber is invoked" + }, + "details": { + "name": "DivideByNumber" + }, + "params": [ + { + "typeid": "{7894072A-9050-4F0F-901B-34B1A0D29417}", + "details": { + "name": "Color" + } + }, + { + "typeid": "{110C4B14-11A8-4E9D-8638-5051013A56AC}", + "details": { + "name": "double" + } + } + ], + "results": [ + { + "typeid": "{7894072A-9050-4F0F-901B-34B1A0D29417}", + "details": { + "name": "Color" + } + } + ] + }, + { + "base": "FromVector3AndNumber", + "context": "{6CC7B2F9-F551-4CB8-A713-4149959AE337}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke FromVector3AndNumber" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after FromVector3AndNumber is invoked" + }, + "details": { + "name": "FromVector3AndNumber" + }, + "params": [ + { + "typeid": "{8379EB7D-01FA-4538-B64B-A6543B4BE73D}", + "details": { + "name": "Vector3" + } + }, + { + "typeid": "{110C4B14-11A8-4E9D-8638-5051013A56AC}", + "details": { + "name": "double" + } + } + ], + "results": [ + { + "typeid": "{7894072A-9050-4F0F-901B-34B1A0D29417}", + "details": { + "name": "Color" + } + } + ] + }, + { + "base": "GammaToLinear", + "context": "{6CC7B2F9-F551-4CB8-A713-4149959AE337}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke GammaToLinear" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after GammaToLinear is invoked" + }, + "details": { + "name": "GammaToLinear" + }, + "params": [ + { + "typeid": "{7894072A-9050-4F0F-901B-34B1A0D29417}", + "details": { + "name": "Color" + } + } + ], + "results": [ + { + "typeid": "{7894072A-9050-4F0F-901B-34B1A0D29417}", + "details": { + "name": "Color" + } + } + ] + }, + { + "base": "IsClose", + "context": "{6CC7B2F9-F551-4CB8-A713-4149959AE337}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke IsClose" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after IsClose is invoked" + }, + "details": { + "name": "IsClose" + }, + "params": [ + { + "typeid": "{7894072A-9050-4F0F-901B-34B1A0D29417}", + "details": { + "name": "Color" + } + }, + { + "typeid": "{7894072A-9050-4F0F-901B-34B1A0D29417}", + "details": { + "name": "Color" + } + }, + { + "typeid": "{110C4B14-11A8-4E9D-8638-5051013A56AC}", + "details": { + "name": "double" + } + } + ], + "results": [ + { + "typeid": "{A0CA880C-AFE4-43CB-926C-59AC48496112}", + "details": { + "name": "bool" + } + } + ] + }, + { + "base": "IsZero", + "context": "{6CC7B2F9-F551-4CB8-A713-4149959AE337}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke IsZero" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after IsZero is invoked" + }, + "details": { + "name": "IsZero" + }, + "params": [ + { + "typeid": "{7894072A-9050-4F0F-901B-34B1A0D29417}", + "details": { + "name": "Color" + } + }, + { + "typeid": "{110C4B14-11A8-4E9D-8638-5051013A56AC}", + "details": { + "name": "double" + } + } + ], + "results": [ + { + "typeid": "{A0CA880C-AFE4-43CB-926C-59AC48496112}", + "details": { + "name": "bool" + } + } + ] + }, + { + "base": "MultiplyByColor", + "context": "{6CC7B2F9-F551-4CB8-A713-4149959AE337}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke MultiplyByColor" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after MultiplyByColor is invoked" + }, + "details": { + "name": "MultiplyByColor" + }, + "params": [ + { + "typeid": "{7894072A-9050-4F0F-901B-34B1A0D29417}", + "details": { + "name": "Color" + } + }, + { + "typeid": "{7894072A-9050-4F0F-901B-34B1A0D29417}", + "details": { + "name": "Color" + } + } + ], + "results": [ + { + "typeid": "{7894072A-9050-4F0F-901B-34B1A0D29417}", + "details": { + "name": "Color" + } + } + ] + }, + { + "base": "Add", + "context": "{6CC7B2F9-F551-4CB8-A713-4149959AE337}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Add" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Add is invoked" + }, + "details": { + "name": "Add" + }, + "params": [ + { + "typeid": "{7894072A-9050-4F0F-901B-34B1A0D29417}", + "details": { + "name": "Color" + } + }, + { + "typeid": "{7894072A-9050-4F0F-901B-34B1A0D29417}", + "details": { + "name": "Color" + } + } + ], + "results": [ + { + "typeid": "{7894072A-9050-4F0F-901B-34B1A0D29417}", + "details": { + "name": "Color" + } + } + ] + }, + { + "base": "Subtract", + "context": "{6CC7B2F9-F551-4CB8-A713-4149959AE337}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Subtract" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Subtract is invoked" + }, + "details": { + "name": "Subtract" + }, + "params": [ + { + "typeid": "{7894072A-9050-4F0F-901B-34B1A0D29417}", + "details": { + "name": "Color" + } + }, + { + "typeid": "{7894072A-9050-4F0F-901B-34B1A0D29417}", + "details": { + "name": "Color" + } + } + ], + "results": [ + { + "typeid": "{7894072A-9050-4F0F-901B-34B1A0D29417}", + "details": { + "name": "Color" + } + } + ] + } + ] + }, + { + "base": "{50F6716F-698B-5A6C-AACD-940597FDEC24}", + "context": "OnDemandReflected", + "variant": "", + "details": { + "name": "Map", + "category": "Map", + "tooltip": "A collection of Key/Value pairs, where each Key value must be unique." + }, + "methods": [ + { + "base": "contains", + "context": "{50F6716F-698B-5A6C-AACD-940597FDEC24}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke contains" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after contains is invoked" + }, + "details": { + "name": "contains" + }, + "params": [ + { + "typeid": "{50F6716F-698B-5A6C-AACD-940597FDEC24}", + "details": { + "name": "AZStd::unordered_map" + } + }, + { + "typeid": "{EB603581-4654-4C17-B6DE-AE61E79EDA97}", + "details": { + "name": "AZ::Render::MaterialAssignmentId" + } + } + ], + "results": [ + { + "typeid": "{A0CA880C-AFE4-43CB-926C-59AC48496112}", + "details": { + "name": "bool" + } + } + ] + }, + { + "base": "Insert", + "context": "{50F6716F-698B-5A6C-AACD-940597FDEC24}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Insert" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Insert is invoked" + }, + "details": { + "name": "Insert" + }, + "params": [ + { + "typeid": "{50F6716F-698B-5A6C-AACD-940597FDEC24}", + "details": { + "name": "AZStd::unordered_map" + } + }, + { + "typeid": "{EB603581-4654-4C17-B6DE-AE61E79EDA97}", + "details": { + "name": "AZ::Render::MaterialAssignmentId" + } + }, + { + "typeid": "{C66E5214-A24B-4722-B7F0-5991E6F8F163}", + "details": { + "name": "AZ::Render::MaterialAssignment" + } + } + ], + "results": [ + { + "typeid": "{50F6716F-698B-5A6C-AACD-940597FDEC24}", + "details": { + "name": "AZStd::unordered_map" + } + } + ] + }, + { + "base": "Reserve", + "context": "{50F6716F-698B-5A6C-AACD-940597FDEC24}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Reserve" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Reserve is invoked" + }, + "details": { + "name": "Reserve" + }, + "params": [ + { + "typeid": "{50F6716F-698B-5A6C-AACD-940597FDEC24}", + "details": { + "name": "AZStd::unordered_map" + } + }, + { + "typeid": "{D6597933-47CD-4FC8-B911-63F3E2B0993A}", + "details": { + "name": "AZ::u64" + } + } + ] + }, + { + "base": "GetSize", + "context": "{50F6716F-698B-5A6C-AACD-940597FDEC24}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke GetSize" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after GetSize is invoked" + }, + "details": { + "name": "GetSize" + }, + "params": [ + { + "typeid": "{50F6716F-698B-5A6C-AACD-940597FDEC24}", + "details": { + "name": "AZStd::unordered_map" + } + } + ], + "results": [ + { + "typeid": "{72039442-EB38-4D42-A1AD-CB68F7E0EEF6}", + "details": { + "name": "int" + } + } + ] + }, + { + "base": "Iterate_VM", + "context": "{50F6716F-698B-5A6C-AACD-940597FDEC24}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Iterate_VM" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Iterate_VM is invoked" + }, + "details": { + "name": "Iterate_VM" + }, + "params": [ + { + "typeid": "{50F6716F-698B-5A6C-AACD-940597FDEC24}", + "details": { + "name": "AZStd::unordered_map" + } + } + ], + "results": [ + { + "typeid": "{94AA4B8D-48FE-5938-9D61-36CD28672B6C}", + "details": { + "name": "Iterator_VM" + } + } + ] + }, + { + "base": "Size", + "context": "{50F6716F-698B-5A6C-AACD-940597FDEC24}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Size" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Size is invoked" + }, + "details": { + "name": "Size" + }, + "params": [ + { + "typeid": "{50F6716F-698B-5A6C-AACD-940597FDEC24}", + "details": { + "name": "AZStd::unordered_map" + } + } + ], + "results": [ + { + "typeid": "{72039442-EB38-4D42-A1AD-CB68F7E0EEF6}", + "details": { + "name": "int" + } + } + ] + }, + { + "base": "Erase", + "context": "{50F6716F-698B-5A6C-AACD-940597FDEC24}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Erase" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Erase is invoked" + }, + "details": { + "name": "Erase" + }, + "params": [ + { + "typeid": "{50F6716F-698B-5A6C-AACD-940597FDEC24}", + "details": { + "name": "AZStd::unordered_map" + } + }, + { + "typeid": "{EB603581-4654-4C17-B6DE-AE61E79EDA97}", + "details": { + "name": "AZ::Render::MaterialAssignmentId" + } + } + ], + "results": [ + { + "typeid": "{50F6716F-698B-5A6C-AACD-940597FDEC24}", + "details": { + "name": "AZStd::unordered_map" + } + } + ] + }, + { + "base": "EraseCheck_VM", + "context": "{50F6716F-698B-5A6C-AACD-940597FDEC24}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke EraseCheck_VM" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after EraseCheck_VM is invoked" + }, + "details": { + "name": "EraseCheck_VM" + }, + "params": [ + { + "typeid": "{50F6716F-698B-5A6C-AACD-940597FDEC24}", + "details": { + "name": "AZStd::unordered_map" + } + }, + { + "typeid": "{EB603581-4654-4C17-B6DE-AE61E79EDA97}", + "details": { + "name": "AZ::Render::MaterialAssignmentId" + } + } + ], + "results": [ + { + "typeid": "{A0CA880C-AFE4-43CB-926C-59AC48496112}", + "details": { + "name": "bool" + } + } + ] + }, + { + "base": "Clear", + "context": "{50F6716F-698B-5A6C-AACD-940597FDEC24}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Clear" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Clear is invoked" + }, + "details": { + "name": "Clear" + }, + "params": [ + { + "typeid": "{50F6716F-698B-5A6C-AACD-940597FDEC24}", + "details": { + "name": "AZStd::unordered_map" + } + } + ], + "results": [ + { + "typeid": "{50F6716F-698B-5A6C-AACD-940597FDEC24}", + "details": { + "name": "AZStd::unordered_map" + } + } + ] + }, + { + "base": "At", + "context": "{50F6716F-698B-5A6C-AACD-940597FDEC24}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke At" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after At is invoked" + }, + "details": { + "name": "At" + }, + "params": [ + { + "typeid": "{50F6716F-698B-5A6C-AACD-940597FDEC24}", + "details": { + "name": "AZStd::unordered_map" + } + }, + { + "typeid": "{EB603581-4654-4C17-B6DE-AE61E79EDA97}", + "details": { + "name": "AZ::Render::MaterialAssignmentId" + } + } + ], + "results": [ + { + "typeid": "{C66E5214-A24B-4722-B7F0-5991E6F8F163}", + "details": { + "name": "AZ::Render::MaterialAssignment" + } + } + ] + }, + { + "base": "BucketCount", + "context": "{50F6716F-698B-5A6C-AACD-940597FDEC24}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke BucketCount" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after BucketCount is invoked" + }, + "details": { + "name": "BucketCount" + }, + "params": [ + { + "typeid": "{50F6716F-698B-5A6C-AACD-940597FDEC24}", + "details": { + "name": "AZStd::unordered_map" + } + } + ], + "results": [ + { + "typeid": "{D6597933-47CD-4FC8-B911-63F3E2B0993A}", + "details": { + "name": "AZ::u64" + } + } + ] + }, + { + "base": "Empty", + "context": "{50F6716F-698B-5A6C-AACD-940597FDEC24}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Empty" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Empty is invoked" + }, + "details": { + "name": "Empty" + }, + "params": [ + { + "typeid": "{50F6716F-698B-5A6C-AACD-940597FDEC24}", + "details": { + "name": "AZStd::unordered_map" + } + } + ], + "results": [ + { + "typeid": "{A0CA880C-AFE4-43CB-926C-59AC48496112}", + "details": { + "name": "bool" + } + } + ] + }, + { + "base": "Swap", + "context": "{50F6716F-698B-5A6C-AACD-940597FDEC24}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Swap" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Swap is invoked" + }, + "details": { + "name": "Swap" + }, + "params": [ + { + "typeid": "{50F6716F-698B-5A6C-AACD-940597FDEC24}", + "details": { + "name": "AZStd::unordered_map" + } + }, + { + "typeid": "{50F6716F-698B-5A6C-AACD-940597FDEC24}", + "details": { + "name": "AZStd::unordered_map" + } + } + ] + } + ] + }, + { + "base": "{B7B3058C-1E07-528C-A40D-F5C598CBF4EE}", + "context": "OnDemandReflected", + "variant": "", + "details": { + "name": "Map", + "category": "Map", + "tooltip": "A collection of Key/Value pairs, where each Key value must be unique." + }, + "methods": [ + { + "base": "contains", + "context": "{B7B3058C-1E07-528C-A40D-F5C598CBF4EE}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke contains" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after contains is invoked" + }, + "details": { + "name": "contains" + }, + "params": [ + { + "typeid": "{B7B3058C-1E07-528C-A40D-F5C598CBF4EE}", + "details": { + "name": "AZStd::unordered_map" + } + }, + { + "typeid": "{03AAAB3F-5C47-5A66-9EBC-D5FA4DB353C9}", + "details": { + "name": "AZStd::string" + } + } + ], + "results": [ + { + "typeid": "{A0CA880C-AFE4-43CB-926C-59AC48496112}", + "details": { + "name": "bool" + } + } + ] + }, + { + "base": "Insert", + "context": "{B7B3058C-1E07-528C-A40D-F5C598CBF4EE}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Insert" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Insert is invoked" + }, + "details": { + "name": "Insert" + }, + "params": [ + { + "typeid": "{B7B3058C-1E07-528C-A40D-F5C598CBF4EE}", + "details": { + "name": "AZStd::unordered_map" + } + }, + { + "typeid": "{03AAAB3F-5C47-5A66-9EBC-D5FA4DB353C9}", + "details": { + "name": "AZStd::string" + } + }, + { + "typeid": "{0CE9FA36-1E3A-4C06-9254-B7C73A732053}", + "details": { + "name": "Vector4" + } + } + ], + "results": [ + { + "typeid": "{B7B3058C-1E07-528C-A40D-F5C598CBF4EE}", + "details": { + "name": "AZStd::unordered_map" + } + } + ] + }, + { + "base": "Reserve", + "context": "{B7B3058C-1E07-528C-A40D-F5C598CBF4EE}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Reserve" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Reserve is invoked" + }, + "details": { + "name": "Reserve" + }, + "params": [ + { + "typeid": "{B7B3058C-1E07-528C-A40D-F5C598CBF4EE}", + "details": { + "name": "AZStd::unordered_map" + } + }, + { + "typeid": "{D6597933-47CD-4FC8-B911-63F3E2B0993A}", + "details": { + "name": "AZ::u64" + } + } + ] + }, + { + "base": "GetSize", + "context": "{B7B3058C-1E07-528C-A40D-F5C598CBF4EE}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke GetSize" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after GetSize is invoked" + }, + "details": { + "name": "GetSize" + }, + "params": [ + { + "typeid": "{B7B3058C-1E07-528C-A40D-F5C598CBF4EE}", + "details": { + "name": "AZStd::unordered_map" + } + } + ], + "results": [ + { + "typeid": "{72039442-EB38-4D42-A1AD-CB68F7E0EEF6}", + "details": { + "name": "int" + } + } + ] + }, + { + "base": "Iterate_VM", + "context": "{B7B3058C-1E07-528C-A40D-F5C598CBF4EE}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Iterate_VM" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Iterate_VM is invoked" + }, + "details": { + "name": "Iterate_VM" + }, + "params": [ + { + "typeid": "{B7B3058C-1E07-528C-A40D-F5C598CBF4EE}", + "details": { + "name": "AZStd::unordered_map" + } + } + ], + "results": [ + { + "typeid": "{6DCC25CB-9729-5D3D-BBCF-1F3B08D247CB}", + "details": { + "name": "Iterator_VM, allocator>, Vector4, AZStd::hash", + "category": "Map", + "tooltip": "A collection of Key/Value pairs, where each Key value must be unique." + }, + "methods": [ + { + "base": "contains", + "context": "{FDE6FB0D-D37B-58F4-9941-97F58D111A1B}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke contains" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after contains is invoked" + }, + "details": { + "name": "contains" + }, + "params": [ + { + "typeid": "{FDE6FB0D-D37B-58F4-9941-97F58D111A1B}", + "details": { + "name": "AZStd::unordered_map" + } + }, + { + "typeid": "{652ED536-3402-439B-AEBE-4A5DBC554085}", + "details": { + "name": "AssetId" + } + } + ], + "results": [ + { + "typeid": "{A0CA880C-AFE4-43CB-926C-59AC48496112}", + "details": { + "name": "bool" + } + } + ] + }, + { + "base": "Insert", + "context": "{FDE6FB0D-D37B-58F4-9941-97F58D111A1B}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Insert" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Insert is invoked" + }, + "details": { + "name": "Insert" + }, + "params": [ + { + "typeid": "{FDE6FB0D-D37B-58F4-9941-97F58D111A1B}", + "details": { + "name": "AZStd::unordered_map" + } + }, + { + "typeid": "{652ED536-3402-439B-AEBE-4A5DBC554085}", + "details": { + "name": "AssetId" + } + }, + { + "typeid": "{004ABD25-CF14-4EB3-BD41-022C247C07FA}", + "details": { + "name": "Obb" + } + } + ], + "results": [ + { + "typeid": "{FDE6FB0D-D37B-58F4-9941-97F58D111A1B}", + "details": { + "name": "AZStd::unordered_map" + } + } + ] + }, + { + "base": "Reserve", + "context": "{FDE6FB0D-D37B-58F4-9941-97F58D111A1B}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Reserve" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Reserve is invoked" + }, + "details": { + "name": "Reserve" + }, + "params": [ + { + "typeid": "{FDE6FB0D-D37B-58F4-9941-97F58D111A1B}", + "details": { + "name": "AZStd::unordered_map" + } + }, + { + "typeid": "{D6597933-47CD-4FC8-B911-63F3E2B0993A}", + "details": { + "name": "AZ::u64" + } + } + ] + }, + { + "base": "GetSize", + "context": "{FDE6FB0D-D37B-58F4-9941-97F58D111A1B}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke GetSize" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after GetSize is invoked" + }, + "details": { + "name": "GetSize" + }, + "params": [ + { + "typeid": "{FDE6FB0D-D37B-58F4-9941-97F58D111A1B}", + "details": { + "name": "AZStd::unordered_map" + } + } + ], + "results": [ + { + "typeid": "{72039442-EB38-4D42-A1AD-CB68F7E0EEF6}", + "details": { + "name": "int" + } + } + ] + }, + { + "base": "Iterate_VM", + "context": "{FDE6FB0D-D37B-58F4-9941-97F58D111A1B}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Iterate_VM" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Iterate_VM is invoked" + }, + "details": { + "name": "Iterate_VM" + }, + "params": [ + { + "typeid": "{FDE6FB0D-D37B-58F4-9941-97F58D111A1B}", + "details": { + "name": "AZStd::unordered_map" + } + } + ], + "results": [ + { + "typeid": "{482A449C-CC28-50B2-AC24-47E309E4BA14}", + "details": { + "name": "Iterator_VM, AZStd::equal_to, allocator>>" + } + } + ] + }, + { + "base": "GetKeys", + "context": "{FDE6FB0D-D37B-58F4-9941-97F58D111A1B}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke GetKeys" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after GetKeys is invoked" + }, + "details": { + "name": "GetKeys" + }, + "params": [ + { + "typeid": "{FDE6FB0D-D37B-58F4-9941-97F58D111A1B}", + "details": { + "name": "AZStd::unordered_map" + } + } + ], + "results": [ + { + "typeid": "{877C4A33-39B5-51D7-948D-F97DB81372A1}", + "details": { + "name": "AZStd::vector" + } + } + ] + }, + { + "base": "Size", + "context": "{FDE6FB0D-D37B-58F4-9941-97F58D111A1B}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Size" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Size is invoked" + }, + "details": { + "name": "Size" + }, + "params": [ + { + "typeid": "{FDE6FB0D-D37B-58F4-9941-97F58D111A1B}", + "details": { + "name": "AZStd::unordered_map" + } + } + ], + "results": [ + { + "typeid": "{72039442-EB38-4D42-A1AD-CB68F7E0EEF6}", + "details": { + "name": "int" + } + } + ] + }, + { + "base": "Erase", + "context": "{FDE6FB0D-D37B-58F4-9941-97F58D111A1B}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Erase" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Erase is invoked" + }, + "details": { + "name": "Erase" + }, + "params": [ + { + "typeid": "{FDE6FB0D-D37B-58F4-9941-97F58D111A1B}", + "details": { + "name": "AZStd::unordered_map" + } + }, + { + "typeid": "{652ED536-3402-439B-AEBE-4A5DBC554085}", + "details": { + "name": "AssetId" + } + } + ], + "results": [ + { + "typeid": "{FDE6FB0D-D37B-58F4-9941-97F58D111A1B}", + "details": { + "name": "AZStd::unordered_map" + } + } + ] + }, + { + "base": "EraseCheck_VM", + "context": "{FDE6FB0D-D37B-58F4-9941-97F58D111A1B}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke EraseCheck_VM" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after EraseCheck_VM is invoked" + }, + "details": { + "name": "EraseCheck_VM" + }, + "params": [ + { + "typeid": "{FDE6FB0D-D37B-58F4-9941-97F58D111A1B}", + "details": { + "name": "AZStd::unordered_map" + } + }, + { + "typeid": "{652ED536-3402-439B-AEBE-4A5DBC554085}", + "details": { + "name": "AssetId" + } + } + ], + "results": [ + { + "typeid": "{A0CA880C-AFE4-43CB-926C-59AC48496112}", + "details": { + "name": "bool" + } + } + ] + }, + { + "base": "Clear", + "context": "{FDE6FB0D-D37B-58F4-9941-97F58D111A1B}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Clear" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Clear is invoked" + }, + "details": { + "name": "Clear" + }, + "params": [ + { + "typeid": "{FDE6FB0D-D37B-58F4-9941-97F58D111A1B}", + "details": { + "name": "AZStd::unordered_map" + } + } + ], + "results": [ + { + "typeid": "{FDE6FB0D-D37B-58F4-9941-97F58D111A1B}", + "details": { + "name": "AZStd::unordered_map" + } + } + ] + }, + { + "base": "At", + "context": "{FDE6FB0D-D37B-58F4-9941-97F58D111A1B}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke At" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after At is invoked" + }, + "details": { + "name": "At" + }, + "params": [ + { + "typeid": "{FDE6FB0D-D37B-58F4-9941-97F58D111A1B}", + "details": { + "name": "AZStd::unordered_map" + } + }, + { + "typeid": "{652ED536-3402-439B-AEBE-4A5DBC554085}", + "details": { + "name": "AssetId" + } + } + ], + "results": [ + { + "typeid": "{004ABD25-CF14-4EB3-BD41-022C247C07FA}", + "details": { + "name": "Obb" + } + } + ] + }, + { + "base": "BucketCount", + "context": "{FDE6FB0D-D37B-58F4-9941-97F58D111A1B}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke BucketCount" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after BucketCount is invoked" + }, + "details": { + "name": "BucketCount" + }, + "params": [ + { + "typeid": "{FDE6FB0D-D37B-58F4-9941-97F58D111A1B}", + "details": { + "name": "AZStd::unordered_map" + } + } + ], + "results": [ + { + "typeid": "{D6597933-47CD-4FC8-B911-63F3E2B0993A}", + "details": { + "name": "AZ::u64" + } + } + ] + }, + { + "base": "Empty", + "context": "{FDE6FB0D-D37B-58F4-9941-97F58D111A1B}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Empty" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Empty is invoked" + }, + "details": { + "name": "Empty" + }, + "params": [ + { + "typeid": "{FDE6FB0D-D37B-58F4-9941-97F58D111A1B}", + "details": { + "name": "AZStd::unordered_map" + } + } + ], + "results": [ + { + "typeid": "{A0CA880C-AFE4-43CB-926C-59AC48496112}", + "details": { + "name": "bool" + } + } + ] + }, + { + "base": "Swap", + "context": "{FDE6FB0D-D37B-58F4-9941-97F58D111A1B}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Swap" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Swap is invoked" + }, + "details": { + "name": "Swap" + }, + "params": [ + { + "typeid": "{FDE6FB0D-D37B-58F4-9941-97F58D111A1B}", + "details": { + "name": "AZStd::unordered_map" + } + }, + { + "typeid": "{FDE6FB0D-D37B-58F4-9941-97F58D111A1B}", + "details": { + "name": "AZStd::unordered_map" + } + } + ] + } + ] + }, + { + "base": "{8CBDA3B7-9DCD-4A04-A12C-123C322CA63A}", + "context": "OnDemandReflected", + "variant": "", + "details": { + "name": "MathOBB_VM" + }, + "methods": [ + { + "base": "GetPosition", + "context": "{8CBDA3B7-9DCD-4A04-A12C-123C322CA63A}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke GetPosition" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after GetPosition is invoked" + }, + "details": { + "name": "GetPosition" + }, + "params": [ + { + "typeid": "{004ABD25-CF14-4EB3-BD41-022C247C07FA}", + "details": { + "name": "Obb" + } + } + ], + "results": [ + { + "typeid": "{8379EB7D-01FA-4538-B64B-A6543B4BE73D}", + "details": { + "name": "Vector3" + } + } + ] + }, + { + "base": "GetAxisY", + "context": "{8CBDA3B7-9DCD-4A04-A12C-123C322CA63A}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke GetAxisY" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after GetAxisY is invoked" + }, + "details": { + "name": "GetAxisY" + }, + "params": [ + { + "typeid": "{004ABD25-CF14-4EB3-BD41-022C247C07FA}", + "details": { + "name": "Obb" + } + } + ], + "results": [ + { + "typeid": "{8379EB7D-01FA-4538-B64B-A6543B4BE73D}", + "details": { + "name": "Vector3" + } + } + ] + }, + { + "base": "GetAxisX", + "context": "{8CBDA3B7-9DCD-4A04-A12C-123C322CA63A}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke GetAxisX" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after GetAxisX is invoked" + }, + "details": { + "name": "GetAxisX" + }, + "params": [ + { + "typeid": "{004ABD25-CF14-4EB3-BD41-022C247C07FA}", + "details": { + "name": "Obb" + } + } + ], + "results": [ + { + "typeid": "{8379EB7D-01FA-4538-B64B-A6543B4BE73D}", + "details": { + "name": "Vector3" + } + } + ] + }, + { + "base": "FromAabb", + "context": "{8CBDA3B7-9DCD-4A04-A12C-123C322CA63A}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke FromAabb" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after FromAabb is invoked" + }, + "details": { + "name": "FromAabb" + }, + "params": [ + { + "typeid": "{A54C2B36-D5B8-46A1-A529-4EBDBD2450E7}", + "details": { + "name": "Aabb" + } + } + ], + "results": [ + { + "typeid": "{004ABD25-CF14-4EB3-BD41-022C247C07FA}", + "details": { + "name": "Obb" + } + } + ] + }, + { + "base": "FromPositionRotationAndHalfLengths", + "context": "{8CBDA3B7-9DCD-4A04-A12C-123C322CA63A}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke FromPositionRotationAndHalfLengths" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after FromPositionRotationAndHalfLengths is invoked" + }, + "details": { + "name": "FromPositionRotationAndHalfLengths" + }, + "params": [ + { + "typeid": "{8379EB7D-01FA-4538-B64B-A6543B4BE73D}", + "details": { + "name": "Vector3" + } + }, + { + "typeid": "{73103120-3DD3-4873-BAB3-9713FA2804FB}", + "details": { + "name": "Quaternion" + } + }, + { + "typeid": "{8379EB7D-01FA-4538-B64B-A6543B4BE73D}", + "details": { + "name": "Vector3" + } + } + ], + "results": [ + { + "typeid": "{004ABD25-CF14-4EB3-BD41-022C247C07FA}", + "details": { + "name": "Obb" + } + } + ] + }, + { + "base": "GetAxisZ", + "context": "{8CBDA3B7-9DCD-4A04-A12C-123C322CA63A}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke GetAxisZ" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after GetAxisZ is invoked" + }, + "details": { + "name": "GetAxisZ" + }, + "params": [ + { + "typeid": "{004ABD25-CF14-4EB3-BD41-022C247C07FA}", + "details": { + "name": "Obb" + } + } + ], + "results": [ + { + "typeid": "{8379EB7D-01FA-4538-B64B-A6543B4BE73D}", + "details": { + "name": "Vector3" + } + } + ] + }, + { + "base": "IsFinite", + "context": "{8CBDA3B7-9DCD-4A04-A12C-123C322CA63A}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke IsFinite" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after IsFinite is invoked" + }, + "details": { + "name": "IsFinite" + }, + "params": [ + { + "typeid": "{004ABD25-CF14-4EB3-BD41-022C247C07FA}", + "details": { + "name": "Obb" + } + } + ], + "results": [ + { + "typeid": "{A0CA880C-AFE4-43CB-926C-59AC48496112}", + "details": { + "name": "bool" + } + } + ] + } + ] + }, + { + "base": "{781AD4B3-F61B-5C95-9447-F90AB07AB480}", + "context": "OnDemandReflected", + "variant": "", + "details": { + "name": "Intrusive", + "category": "Intrusive", + "tooltip": "A smart pointer which manages the life cycle of an object, and guarantees a single point of ownership for the specified memory." + }, + "methods": [ + { + "base": "get", + "context": "{781AD4B3-F61B-5C95-9447-F90AB07AB480}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke get" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after get is invoked" + }, + "details": { + "name": "get" + }, + "params": [ + { + "typeid": "{781AD4B3-F61B-5C95-9447-F90AB07AB480}", + "details": { + "name": "AZStd::intrusive_ptr*" + } + } + ], + "results": [ + { + "typeid": "{C99F75B2-8BD5-4CD8-8672-1E01EF0A04CF}", + "details": { + "name": "Material*" + } + } + ] + } + ] + }, + { + "base": "{33844DCE-75B0-5734-A1B7-7C44199D1D5E}", + "context": "OnDemandReflected", + "variant": "", + "details": { + "name": "Tuple" + }, + "methods": [ + { + "base": "Get0", + "context": "{33844DCE-75B0-5734-A1B7-7C44199D1D5E}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Get0" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Get0 is invoked" + }, + "details": { + "name": "Get0" + }, + "params": [ + { + "typeid": "{33844DCE-75B0-5734-A1B7-7C44199D1D5E}", + "details": { + "name": "tuple&" + } + } + ], + "results": [ + { + "typeid": "{8379EB7D-01FA-4538-B64B-A6543B4BE73D}", + "details": { + "name": "Vector3" + } + } + ] + }, + { + "base": "Get1", + "context": "{33844DCE-75B0-5734-A1B7-7C44199D1D5E}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Get1" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Get1 is invoked" + }, + "details": { + "name": "Get1" + }, + "params": [ + { + "typeid": "{33844DCE-75B0-5734-A1B7-7C44199D1D5E}", + "details": { + "name": "tuple&" + } + } + ], + "results": [ + { + "typeid": "{A0CA880C-AFE4-43CB-926C-59AC48496112}", + "details": { + "name": "bool" + } + } + ] + }, + { + "base": "GetSize", + "context": "{33844DCE-75B0-5734-A1B7-7C44199D1D5E}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke GetSize" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after GetSize is invoked" + }, + "details": { + "name": "GetSize" + }, + "results": [ + { + "typeid": "{D6597933-47CD-4FC8-B911-63F3E2B0993A}", + "details": { + "name": "AZ::u64" + } + } + ] + } + ] + }, + { + "base": "{009022A1-16A5-50B0-958F-F69C729985A3}", + "context": "OnDemandReflected", + "variant": "", + "details": { + "name": "Array", + "category": "Array", + "tooltip": "A dynamically sized container of elements." + }, + "methods": [ + { + "base": "Size", + "context": "{009022A1-16A5-50B0-958F-F69C729985A3}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Size" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Size is invoked" + }, + "details": { + "name": "Size" + }, + "params": [ + { + "typeid": "{009022A1-16A5-50B0-958F-F69C729985A3}", + "details": { + "name": "AZStd::vector" + } + } + ], + "results": [ + { + "typeid": "{72039442-EB38-4D42-A1AD-CB68F7E0EEF6}", + "details": { + "name": "int" + } + } + ] + }, + { + "base": "Front", + "context": "{009022A1-16A5-50B0-958F-F69C729985A3}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Front" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Front is invoked" + }, + "details": { + "name": "Front" + }, + "params": [ + { + "typeid": "{009022A1-16A5-50B0-958F-F69C729985A3}", + "details": { + "name": "AZStd::vector" + } + } + ], + "results": [ + { + "typeid": "{D7439508-ED10-4395-9D48-1FC3D7815361}", + "details": { + "name": "Contact" + } + } + ] + }, + { + "base": "HasKey", + "context": "{009022A1-16A5-50B0-958F-F69C729985A3}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Has Key" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Has Key is invoked" + }, + "details": { + "name": "Has Key" + }, + "params": [ + { + "typeid": "{009022A1-16A5-50B0-958F-F69C729985A3}", + "details": { + "name": "AZStd::vector" + } + }, + { + "typeid": "{D6597933-47CD-4FC8-B911-63F3E2B0993A}", + "details": { + "name": "AZ::u64" + } + } + ], + "results": [ + { + "typeid": "{A0CA880C-AFE4-43CB-926C-59AC48496112}", + "details": { + "name": "bool" + } + } + ] + }, + { + "base": "Resize", + "context": "{009022A1-16A5-50B0-958F-F69C729985A3}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Resize" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Resize is invoked" + }, + "details": { + "name": "Resize" + }, + "params": [ + { + "typeid": "{009022A1-16A5-50B0-958F-F69C729985A3}", + "details": { + "name": "AZStd::vector" + } + }, + { + "typeid": "{D6597933-47CD-4FC8-B911-63F3E2B0993A}", + "details": { + "name": "AZ::u64" + } + } + ] + }, + { + "base": "at", + "context": "{009022A1-16A5-50B0-958F-F69C729985A3}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke at" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after at is invoked" + }, + "details": { + "name": "at" + }, + "params": [ + { + "typeid": "{009022A1-16A5-50B0-958F-F69C729985A3}", + "details": { + "name": "AZStd::vector" + } + }, + { + "typeid": "{D6597933-47CD-4FC8-B911-63F3E2B0993A}", + "details": { + "name": "AZ::u64" + } + } + ], + "results": [ + { + "typeid": "{D7439508-ED10-4395-9D48-1FC3D7815361}", + "details": { + "name": "Contact" + } + } + ] + }, + { + "base": "Back", + "context": "{009022A1-16A5-50B0-958F-F69C729985A3}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Back" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Back is invoked" + }, + "details": { + "name": "Back" + }, + "params": [ + { + "typeid": "{009022A1-16A5-50B0-958F-F69C729985A3}", + "details": { + "name": "AZStd::vector" + } + } + ], + "results": [ + { + "typeid": "{D7439508-ED10-4395-9D48-1FC3D7815361}", + "details": { + "name": "Contact" + } + } + ] + }, + { + "base": "pop_back", + "context": "{009022A1-16A5-50B0-958F-F69C729985A3}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke pop_back" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after pop_back is invoked" + }, + "details": { + "name": "pop_back" + }, + "params": [ + { + "typeid": "{009022A1-16A5-50B0-958F-F69C729985A3}", + "details": { + "name": "AZStd::vector" + } + } + ] + }, + { + "base": "size", + "context": "{009022A1-16A5-50B0-958F-F69C729985A3}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke size" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after size is invoked" + }, + "details": { + "name": "size" + }, + "params": [ + { + "typeid": "{009022A1-16A5-50B0-958F-F69C729985A3}", + "details": { + "name": "AZStd::vector" + } + } + ], + "results": [ + { + "typeid": "{72039442-EB38-4D42-A1AD-CB68F7E0EEF6}", + "details": { + "name": "int" + } + } + ] + }, + { + "base": "At", + "context": "{009022A1-16A5-50B0-958F-F69C729985A3}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke At" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after At is invoked" + }, + "details": { + "name": "At" + }, + "params": [ + { + "typeid": "{009022A1-16A5-50B0-958F-F69C729985A3}", + "details": { + "name": "AZStd::vector" + } + }, + { + "typeid": "{D6597933-47CD-4FC8-B911-63F3E2B0993A}", + "details": { + "name": "AZ::u64" + } + } + ], + "results": [ + { + "typeid": "{D7439508-ED10-4395-9D48-1FC3D7815361}", + "details": { + "name": "Contact" + } + } + ] + }, + { + "base": "Empty", + "context": "{009022A1-16A5-50B0-958F-F69C729985A3}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Empty" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Empty is invoked" + }, + "details": { + "name": "Empty" + }, + "params": [ + { + "typeid": "{009022A1-16A5-50B0-958F-F69C729985A3}", + "details": { + "name": "AZStd::vector" + } + } + ], + "results": [ + { + "typeid": "{A0CA880C-AFE4-43CB-926C-59AC48496112}", + "details": { + "name": "bool" + } + } + ] + }, + { + "base": "Swap", + "context": "{009022A1-16A5-50B0-958F-F69C729985A3}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Swap" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Swap is invoked" + }, + "details": { + "name": "Swap" + }, + "params": [ + { + "typeid": "{009022A1-16A5-50B0-958F-F69C729985A3}", + "details": { + "name": "AZStd::vector" + } + }, + { + "typeid": "{009022A1-16A5-50B0-958F-F69C729985A3}", + "details": { + "name": "AZStd::vector" + } + } + ] + }, + { + "base": "push_back", + "context": "{009022A1-16A5-50B0-958F-F69C729985A3}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke push_back" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after push_back is invoked" + }, + "details": { + "name": "push_back" + }, + "params": [ + { + "typeid": "{009022A1-16A5-50B0-958F-F69C729985A3}", + "details": { + "name": "AZStd::vector" + } + }, + { + "typeid": "{D7439508-ED10-4395-9D48-1FC3D7815361}", + "details": { + "name": "Contact" + } + } + ] + }, + { + "base": "PushBack_VM", + "context": "{009022A1-16A5-50B0-958F-F69C729985A3}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke PushBack_VM" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after PushBack_VM is invoked" + }, + "details": { + "name": "PushBack_VM" + }, + "params": [ + { + "typeid": "{009022A1-16A5-50B0-958F-F69C729985A3}", + "details": { + "name": "AZStd::vector" + } + }, + { + "typeid": "{D7439508-ED10-4395-9D48-1FC3D7815361}", + "details": { + "name": "Contact" + } + } + ], + "results": [ + { + "typeid": "{009022A1-16A5-50B0-958F-F69C729985A3}", + "details": { + "name": "AZStd::vector" + } + } + ] + }, + { + "base": "AtUnchecked", + "context": "{009022A1-16A5-50B0-958F-F69C729985A3}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke AtUnchecked" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after AtUnchecked is invoked" + }, + "details": { + "name": "AtUnchecked" + }, + "params": [ + { + "typeid": "{009022A1-16A5-50B0-958F-F69C729985A3}", + "details": { + "name": "AZStd::vector" + } + }, + { + "typeid": "{D6597933-47CD-4FC8-B911-63F3E2B0993A}", + "details": { + "name": "AZ::u64" + } + } + ], + "results": [ + { + "typeid": "{D7439508-ED10-4395-9D48-1FC3D7815361}", + "details": { + "name": "Contact" + } + } + ] + }, + { + "base": "clear", + "context": "{009022A1-16A5-50B0-958F-F69C729985A3}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke clear" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after clear is invoked" + }, + "details": { + "name": "clear" + }, + "params": [ + { + "typeid": "{009022A1-16A5-50B0-958F-F69C729985A3}", + "details": { + "name": "AZStd::vector" + } + } + ] + }, + { + "base": "NotEmpty", + "context": "{009022A1-16A5-50B0-958F-F69C729985A3}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke NotEmpty" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after NotEmpty is invoked" + }, + "details": { + "name": "NotEmpty" + }, + "params": [ + { + "typeid": "{009022A1-16A5-50B0-958F-F69C729985A3}", + "details": { + "name": "AZStd::vector" + } + } + ], + "results": [ + { + "typeid": "{A0CA880C-AFE4-43CB-926C-59AC48496112}", + "details": { + "name": "bool" + } + } + ] + }, + { + "base": "Erase_VM", + "context": "{009022A1-16A5-50B0-958F-F69C729985A3}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Erase_VM" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Erase_VM is invoked" + }, + "details": { + "name": "Erase_VM" + }, + "params": [ + { + "typeid": "{009022A1-16A5-50B0-958F-F69C729985A3}", + "details": { + "name": "AZStd::vector" + } + }, + { + "typeid": "{D6597933-47CD-4FC8-B911-63F3E2B0993A}", + "details": { + "name": "AZ::u64" + } + } + ], + "results": [ + { + "typeid": "{009022A1-16A5-50B0-958F-F69C729985A3}", + "details": { + "name": "AZStd::vector" + } + } + ] + }, + { + "base": "EraseCheck_VM", + "context": "{009022A1-16A5-50B0-958F-F69C729985A3}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke EraseCheck_VM" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after EraseCheck_VM is invoked" + }, + "details": { + "name": "EraseCheck_VM" + }, + "params": [ + { + "typeid": "{009022A1-16A5-50B0-958F-F69C729985A3}", + "details": { + "name": "AZStd::vector" + } + }, + { + "typeid": "{D6597933-47CD-4FC8-B911-63F3E2B0993A}", + "details": { + "name": "AZ::u64" + } + } + ], + "results": [ + { + "typeid": "{A0CA880C-AFE4-43CB-926C-59AC48496112}", + "details": { + "name": "bool" + } + } + ] + }, + { + "base": "Capacity", + "context": "{009022A1-16A5-50B0-958F-F69C729985A3}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Capacity" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Capacity is invoked" + }, + "details": { + "name": "Capacity" + }, + "params": [ + { + "typeid": "{009022A1-16A5-50B0-958F-F69C729985A3}", + "details": { + "name": "AZStd::vector" + } + } + ], + "results": [ + { + "typeid": "{D6597933-47CD-4FC8-B911-63F3E2B0993A}", + "details": { + "name": "AZ::u64" + } + } + ] + }, + { + "base": "Clear", + "context": "{009022A1-16A5-50B0-958F-F69C729985A3}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Clear" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Clear is invoked" + }, + "details": { + "name": "Clear" + }, + "params": [ + { + "typeid": "{009022A1-16A5-50B0-958F-F69C729985A3}", + "details": { + "name": "AZStd::vector" + } + } + ], + "results": [ + { + "typeid": "{009022A1-16A5-50B0-958F-F69C729985A3}", + "details": { + "name": "AZStd::vector" + } + } + ] + }, + { + "base": "AssignAt", + "context": "{009022A1-16A5-50B0-958F-F69C729985A3}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke AssignAt" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after AssignAt is invoked" + }, + "details": { + "name": "AssignAt" + }, + "params": [ + { + "typeid": "{009022A1-16A5-50B0-958F-F69C729985A3}", + "details": { + "name": "AZStd::vector" + } + }, + { + "typeid": "{D6597933-47CD-4FC8-B911-63F3E2B0993A}", + "details": { + "name": "AZ::u64" + } + }, + { + "typeid": "{D7439508-ED10-4395-9D48-1FC3D7815361}", + "details": { + "name": "Contact" + } + } + ] + }, + { + "base": "GetSize", + "context": "{009022A1-16A5-50B0-958F-F69C729985A3}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke GetSize" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after GetSize is invoked" + }, + "details": { + "name": "GetSize" + }, + "params": [ + { + "typeid": "{009022A1-16A5-50B0-958F-F69C729985A3}", + "details": { + "name": "AZStd::vector" + } + } + ], + "results": [ + { + "typeid": "{72039442-EB38-4D42-A1AD-CB68F7E0EEF6}", + "details": { + "name": "int" + } + } + ] + }, + { + "base": "Insert", + "context": "{009022A1-16A5-50B0-958F-F69C729985A3}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Insert" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Insert is invoked" + }, + "details": { + "name": "Insert" + }, + "params": [ + { + "typeid": "{009022A1-16A5-50B0-958F-F69C729985A3}", + "details": { + "name": "AZStd::vector" + } + }, + { + "typeid": "{D6597933-47CD-4FC8-B911-63F3E2B0993A}", + "details": { + "name": "AZ::u64" + } + }, + { + "typeid": "{D7439508-ED10-4395-9D48-1FC3D7815361}", + "details": { + "name": "Contact" + } + } + ], + "results": [ + { + "typeid": "{009022A1-16A5-50B0-958F-F69C729985A3}", + "details": { + "name": "AZStd::vector" + } + } + ] + }, + { + "base": "PushBack", + "context": "{009022A1-16A5-50B0-958F-F69C729985A3}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke PushBack" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after PushBack is invoked" + }, + "details": { + "name": "PushBack" + }, + "params": [ + { + "typeid": "{009022A1-16A5-50B0-958F-F69C729985A3}", + "details": { + "name": "AZStd::vector" + } + }, + { + "typeid": "{D7439508-ED10-4395-9D48-1FC3D7815361}", + "details": { + "name": "Contact" + } + } + ] + }, + { + "base": "Reserve", + "context": "{009022A1-16A5-50B0-958F-F69C729985A3}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Reserve" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Reserve is invoked" + }, + "details": { + "name": "Reserve" + }, + "params": [ + { + "typeid": "{009022A1-16A5-50B0-958F-F69C729985A3}", + "details": { + "name": "AZStd::vector" + } + }, + { + "typeid": "{D6597933-47CD-4FC8-B911-63F3E2B0993A}", + "details": { + "name": "AZ::u64" + } + } + ] + }, + { + "base": "Iterate_VM", + "context": "{009022A1-16A5-50B0-958F-F69C729985A3}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Iterate_VM" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Iterate_VM is invoked" + }, + "details": { + "name": "Iterate_VM" + }, + "params": [ + { + "typeid": "{009022A1-16A5-50B0-958F-F69C729985A3}", + "details": { + "name": "AZStd::vector" + } + } + ], + "results": [ + { + "typeid": "{96B2283D-AEEE-567D-A0B6-749396C8509A}", + "details": { + "name": "Iterator_VM>" + } + } + ] + } + ] + }, + { + "base": "{F8A7460C-2CC2-5755-AFDA-49B1109A751E}", + "context": "OnDemandReflected", + "variant": "", + "details": { + "name": "Map", + "category": "Map", + "tooltip": "A collection of Key/Value pairs, where each Key value must be unique." + }, + "methods": [ + { + "base": "contains", + "context": "{F8A7460C-2CC2-5755-AFDA-49B1109A751E}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke contains" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after contains is invoked" + }, + "details": { + "name": "contains" + }, + "params": [ + { + "typeid": "{F8A7460C-2CC2-5755-AFDA-49B1109A751E}", + "details": { + "name": "AZStd::unordered_map" + } + }, + { + "typeid": "{03AAAB3F-5C47-5A66-9EBC-D5FA4DB353C9}", + "details": { + "name": "AZStd::string" + } + } + ], + "results": [ + { + "typeid": "{A0CA880C-AFE4-43CB-926C-59AC48496112}", + "details": { + "name": "bool" + } + } + ] + }, + { + "base": "Insert", + "context": "{F8A7460C-2CC2-5755-AFDA-49B1109A751E}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Insert" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Insert is invoked" + }, + "details": { + "name": "Insert" + }, + "params": [ + { + "typeid": "{F8A7460C-2CC2-5755-AFDA-49B1109A751E}", + "details": { + "name": "AZStd::unordered_map" + } + }, + { + "typeid": "{03AAAB3F-5C47-5A66-9EBC-D5FA4DB353C9}", + "details": { + "name": "AZStd::string" + } + }, + { + "typeid": "{03AAAB3F-5C47-5A66-9EBC-D5FA4DB353C9}", + "details": { + "name": "AZStd::string" + } + } + ], + "results": [ + { + "typeid": "{F8A7460C-2CC2-5755-AFDA-49B1109A751E}", + "details": { + "name": "AZStd::unordered_map" + } + } + ] + }, + { + "base": "Reserve", + "context": "{F8A7460C-2CC2-5755-AFDA-49B1109A751E}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Reserve" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Reserve is invoked" + }, + "details": { + "name": "Reserve" + }, + "params": [ + { + "typeid": "{F8A7460C-2CC2-5755-AFDA-49B1109A751E}", + "details": { + "name": "AZStd::unordered_map" + } + }, + { + "typeid": "{D6597933-47CD-4FC8-B911-63F3E2B0993A}", + "details": { + "name": "AZ::u64" + } + } + ] + }, + { + "base": "GetSize", + "context": "{F8A7460C-2CC2-5755-AFDA-49B1109A751E}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke GetSize" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after GetSize is invoked" + }, + "details": { + "name": "GetSize" + }, + "params": [ + { + "typeid": "{F8A7460C-2CC2-5755-AFDA-49B1109A751E}", + "details": { + "name": "AZStd::unordered_map" + } + } + ], + "results": [ + { + "typeid": "{72039442-EB38-4D42-A1AD-CB68F7E0EEF6}", + "details": { + "name": "int" + } + } + ] + }, + { + "base": "Iterate_VM", + "context": "{F8A7460C-2CC2-5755-AFDA-49B1109A751E}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Iterate_VM" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Iterate_VM is invoked" + }, + "details": { + "name": "Iterate_VM" + }, + "params": [ + { + "typeid": "{F8A7460C-2CC2-5755-AFDA-49B1109A751E}", + "details": { + "name": "AZStd::unordered_map" + } + } + ], + "results": [ + { + "typeid": "{5D4F4ECD-117C-52F8-A21D-E6B06E499ED8}", + "details": { + "name": "Iterator_VM, allocator>, AZStd::basic_string", + "category": "Map", + "tooltip": "A collection of Key/Value pairs, where each Key value must be unique." + }, + "methods": [ + { + "base": "contains", + "context": "{65F4A570-CBE4-5E03-A397-7F0BD8DE3831}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke contains" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after contains is invoked" + }, + "details": { + "name": "contains" + }, + "params": [ + { + "typeid": "{65F4A570-CBE4-5E03-A397-7F0BD8DE3831}", + "details": { + "name": "AZStd::unordered_map" + } + }, + { + "typeid": "{652ED536-3402-439B-AEBE-4A5DBC554085}", + "details": { + "name": "AssetId" + } + } + ], + "results": [ + { + "typeid": "{A0CA880C-AFE4-43CB-926C-59AC48496112}", + "details": { + "name": "bool" + } + } + ] + }, + { + "base": "Insert", + "context": "{65F4A570-CBE4-5E03-A397-7F0BD8DE3831}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Insert" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Insert is invoked" + }, + "details": { + "name": "Insert" + }, + "params": [ + { + "typeid": "{65F4A570-CBE4-5E03-A397-7F0BD8DE3831}", + "details": { + "name": "AZStd::unordered_map" + } + }, + { + "typeid": "{652ED536-3402-439B-AEBE-4A5DBC554085}", + "details": { + "name": "AssetId" + } + }, + { + "typeid": "{110C4B14-11A8-4E9D-8638-5051013A56AC}", + "details": { + "name": "double" + } + } + ], + "results": [ + { + "typeid": "{65F4A570-CBE4-5E03-A397-7F0BD8DE3831}", + "details": { + "name": "AZStd::unordered_map" + } + } + ] + }, + { + "base": "Reserve", + "context": "{65F4A570-CBE4-5E03-A397-7F0BD8DE3831}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Reserve" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Reserve is invoked" + }, + "details": { + "name": "Reserve" + }, + "params": [ + { + "typeid": "{65F4A570-CBE4-5E03-A397-7F0BD8DE3831}", + "details": { + "name": "AZStd::unordered_map" + } + }, + { + "typeid": "{D6597933-47CD-4FC8-B911-63F3E2B0993A}", + "details": { + "name": "AZ::u64" + } + } + ] + }, + { + "base": "GetSize", + "context": "{65F4A570-CBE4-5E03-A397-7F0BD8DE3831}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke GetSize" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after GetSize is invoked" + }, + "details": { + "name": "GetSize" + }, + "params": [ + { + "typeid": "{65F4A570-CBE4-5E03-A397-7F0BD8DE3831}", + "details": { + "name": "AZStd::unordered_map" + } + } + ], + "results": [ + { + "typeid": "{72039442-EB38-4D42-A1AD-CB68F7E0EEF6}", + "details": { + "name": "int" + } + } + ] + }, + { + "base": "Iterate_VM", + "context": "{65F4A570-CBE4-5E03-A397-7F0BD8DE3831}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Iterate_VM" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Iterate_VM is invoked" + }, + "details": { + "name": "Iterate_VM" + }, + "params": [ + { + "typeid": "{65F4A570-CBE4-5E03-A397-7F0BD8DE3831}", + "details": { + "name": "AZStd::unordered_map" + } + } + ], + "results": [ + { + "typeid": "{13FCDCBA-6F14-54F7-9105-34B8AA21D80C}", + "details": { + "name": "Iterator_VM, AZStd::equal_to, allocator>>" + } + } + ] + }, + { + "base": "GetKeys", + "context": "{65F4A570-CBE4-5E03-A397-7F0BD8DE3831}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke GetKeys" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after GetKeys is invoked" + }, + "details": { + "name": "GetKeys" + }, + "params": [ + { + "typeid": "{65F4A570-CBE4-5E03-A397-7F0BD8DE3831}", + "details": { + "name": "AZStd::unordered_map" + } + } + ], + "results": [ + { + "typeid": "{877C4A33-39B5-51D7-948D-F97DB81372A1}", + "details": { + "name": "AZStd::vector" + } + } + ] + }, + { + "base": "Size", + "context": "{65F4A570-CBE4-5E03-A397-7F0BD8DE3831}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Size" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Size is invoked" + }, + "details": { + "name": "Size" + }, + "params": [ + { + "typeid": "{65F4A570-CBE4-5E03-A397-7F0BD8DE3831}", + "details": { + "name": "AZStd::unordered_map" + } + } + ], + "results": [ + { + "typeid": "{72039442-EB38-4D42-A1AD-CB68F7E0EEF6}", + "details": { + "name": "int" + } + } + ] + }, + { + "base": "Erase", + "context": "{65F4A570-CBE4-5E03-A397-7F0BD8DE3831}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Erase" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Erase is invoked" + }, + "details": { + "name": "Erase" + }, + "params": [ + { + "typeid": "{65F4A570-CBE4-5E03-A397-7F0BD8DE3831}", + "details": { + "name": "AZStd::unordered_map" + } + }, + { + "typeid": "{652ED536-3402-439B-AEBE-4A5DBC554085}", + "details": { + "name": "AssetId" + } + } + ], + "results": [ + { + "typeid": "{65F4A570-CBE4-5E03-A397-7F0BD8DE3831}", + "details": { + "name": "AZStd::unordered_map" + } + } + ] + }, + { + "base": "EraseCheck_VM", + "context": "{65F4A570-CBE4-5E03-A397-7F0BD8DE3831}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke EraseCheck_VM" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after EraseCheck_VM is invoked" + }, + "details": { + "name": "EraseCheck_VM" + }, + "params": [ + { + "typeid": "{65F4A570-CBE4-5E03-A397-7F0BD8DE3831}", + "details": { + "name": "AZStd::unordered_map" + } + }, + { + "typeid": "{652ED536-3402-439B-AEBE-4A5DBC554085}", + "details": { + "name": "AssetId" + } + } + ], + "results": [ + { + "typeid": "{A0CA880C-AFE4-43CB-926C-59AC48496112}", + "details": { + "name": "bool" + } + } + ] + }, + { + "base": "Clear", + "context": "{65F4A570-CBE4-5E03-A397-7F0BD8DE3831}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Clear" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Clear is invoked" + }, + "details": { + "name": "Clear" + }, + "params": [ + { + "typeid": "{65F4A570-CBE4-5E03-A397-7F0BD8DE3831}", + "details": { + "name": "AZStd::unordered_map" + } + } + ], + "results": [ + { + "typeid": "{65F4A570-CBE4-5E03-A397-7F0BD8DE3831}", + "details": { + "name": "AZStd::unordered_map" + } + } + ] + }, + { + "base": "At", + "context": "{65F4A570-CBE4-5E03-A397-7F0BD8DE3831}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke At" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after At is invoked" + }, + "details": { + "name": "At" + }, + "params": [ + { + "typeid": "{65F4A570-CBE4-5E03-A397-7F0BD8DE3831}", + "details": { + "name": "AZStd::unordered_map" + } + }, + { + "typeid": "{652ED536-3402-439B-AEBE-4A5DBC554085}", + "details": { + "name": "AssetId" + } + } + ], + "results": [ + { + "typeid": "{110C4B14-11A8-4E9D-8638-5051013A56AC}", + "details": { + "name": "double" + } + } + ] + }, + { + "base": "BucketCount", + "context": "{65F4A570-CBE4-5E03-A397-7F0BD8DE3831}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke BucketCount" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after BucketCount is invoked" + }, + "details": { + "name": "BucketCount" + }, + "params": [ + { + "typeid": "{65F4A570-CBE4-5E03-A397-7F0BD8DE3831}", + "details": { + "name": "AZStd::unordered_map" + } + } + ], + "results": [ + { + "typeid": "{D6597933-47CD-4FC8-B911-63F3E2B0993A}", + "details": { + "name": "AZ::u64" + } + } + ] + }, + { + "base": "Empty", + "context": "{65F4A570-CBE4-5E03-A397-7F0BD8DE3831}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Empty" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Empty is invoked" + }, + "details": { + "name": "Empty" + }, + "params": [ + { + "typeid": "{65F4A570-CBE4-5E03-A397-7F0BD8DE3831}", + "details": { + "name": "AZStd::unordered_map" + } + } + ], + "results": [ + { + "typeid": "{A0CA880C-AFE4-43CB-926C-59AC48496112}", + "details": { + "name": "bool" + } + } + ] + }, + { + "base": "Swap", + "context": "{65F4A570-CBE4-5E03-A397-7F0BD8DE3831}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Swap" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Swap is invoked" + }, + "details": { + "name": "Swap" + }, + "params": [ + { + "typeid": "{65F4A570-CBE4-5E03-A397-7F0BD8DE3831}", + "details": { + "name": "AZStd::unordered_map" + } + }, + { + "typeid": "{65F4A570-CBE4-5E03-A397-7F0BD8DE3831}", + "details": { + "name": "AZStd::unordered_map" + } + } + ] + } + ] + }, + { + "base": "{B505B05D-57BF-5A45-9113-B3A2784E2CD7}", + "context": "OnDemandReflected", + "variant": "", + "details": { + "name": "Array", + "category": "Array", + "tooltip": "A dynamically sized container of elements." + }, + "methods": [ + { + "base": "Size", + "context": "{B505B05D-57BF-5A45-9113-B3A2784E2CD7}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Size" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Size is invoked" + }, + "details": { + "name": "Size" + }, + "params": [ + { + "typeid": "{B505B05D-57BF-5A45-9113-B3A2784E2CD7}", + "details": { + "name": "AZStd::vector" + } + } + ], + "results": [ + { + "typeid": "{72039442-EB38-4D42-A1AD-CB68F7E0EEF6}", + "details": { + "name": "int" + } + } + ] + }, + { + "base": "Front", + "context": "{B505B05D-57BF-5A45-9113-B3A2784E2CD7}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Front" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Front is invoked" + }, + "details": { + "name": "Front" + }, + "params": [ + { + "typeid": "{B505B05D-57BF-5A45-9113-B3A2784E2CD7}", + "details": { + "name": "AZStd::vector" + } + } + ], + "results": [ + { + "typeid": "{A0CA880C-AFE4-43CB-926C-59AC48496112}", + "details": { + "name": "bool" + } + } + ] + }, + { + "base": "HasKey", + "context": "{B505B05D-57BF-5A45-9113-B3A2784E2CD7}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Has Key" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Has Key is invoked" + }, + "details": { + "name": "Has Key" + }, + "params": [ + { + "typeid": "{B505B05D-57BF-5A45-9113-B3A2784E2CD7}", + "details": { + "name": "AZStd::vector" + } + }, + { + "typeid": "{D6597933-47CD-4FC8-B911-63F3E2B0993A}", + "details": { + "name": "AZ::u64" + } + } + ], + "results": [ + { + "typeid": "{A0CA880C-AFE4-43CB-926C-59AC48496112}", + "details": { + "name": "bool" + } + } + ] + }, + { + "base": "Resize", + "context": "{B505B05D-57BF-5A45-9113-B3A2784E2CD7}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Resize" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Resize is invoked" + }, + "details": { + "name": "Resize" + }, + "params": [ + { + "typeid": "{B505B05D-57BF-5A45-9113-B3A2784E2CD7}", + "details": { + "name": "AZStd::vector" + } + }, + { + "typeid": "{D6597933-47CD-4FC8-B911-63F3E2B0993A}", + "details": { + "name": "AZ::u64" + } + } + ] + }, + { + "base": "at", + "context": "{B505B05D-57BF-5A45-9113-B3A2784E2CD7}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke at" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after at is invoked" + }, + "details": { + "name": "at" + }, + "params": [ + { + "typeid": "{B505B05D-57BF-5A45-9113-B3A2784E2CD7}", + "details": { + "name": "AZStd::vector" + } + }, + { + "typeid": "{D6597933-47CD-4FC8-B911-63F3E2B0993A}", + "details": { + "name": "AZ::u64" + } + } + ], + "results": [ + { + "typeid": "{A0CA880C-AFE4-43CB-926C-59AC48496112}", + "details": { + "name": "bool" + } + } + ] + }, + { + "base": "Back", + "context": "{B505B05D-57BF-5A45-9113-B3A2784E2CD7}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Back" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Back is invoked" + }, + "details": { + "name": "Back" + }, + "params": [ + { + "typeid": "{B505B05D-57BF-5A45-9113-B3A2784E2CD7}", + "details": { + "name": "AZStd::vector" + } + } + ], + "results": [ + { + "typeid": "{A0CA880C-AFE4-43CB-926C-59AC48496112}", + "details": { + "name": "bool" + } + } + ] + }, + { + "base": "pop_back", + "context": "{B505B05D-57BF-5A45-9113-B3A2784E2CD7}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke pop_back" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after pop_back is invoked" + }, + "details": { + "name": "pop_back" + }, + "params": [ + { + "typeid": "{B505B05D-57BF-5A45-9113-B3A2784E2CD7}", + "details": { + "name": "AZStd::vector" + } + } + ] + }, + { + "base": "size", + "context": "{B505B05D-57BF-5A45-9113-B3A2784E2CD7}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke size" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after size is invoked" + }, + "details": { + "name": "size" + }, + "params": [ + { + "typeid": "{B505B05D-57BF-5A45-9113-B3A2784E2CD7}", + "details": { + "name": "AZStd::vector" + } + } + ], + "results": [ + { + "typeid": "{72039442-EB38-4D42-A1AD-CB68F7E0EEF6}", + "details": { + "name": "int" + } + } + ] + }, + { + "base": "At", + "context": "{B505B05D-57BF-5A45-9113-B3A2784E2CD7}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke At" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after At is invoked" + }, + "details": { + "name": "At" + }, + "params": [ + { + "typeid": "{B505B05D-57BF-5A45-9113-B3A2784E2CD7}", + "details": { + "name": "AZStd::vector" + } + }, + { + "typeid": "{D6597933-47CD-4FC8-B911-63F3E2B0993A}", + "details": { + "name": "AZ::u64" + } + } + ], + "results": [ + { + "typeid": "{A0CA880C-AFE4-43CB-926C-59AC48496112}", + "details": { + "name": "bool" + } + } + ] + }, + { + "base": "Empty", + "context": "{B505B05D-57BF-5A45-9113-B3A2784E2CD7}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Empty" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Empty is invoked" + }, + "details": { + "name": "Empty" + }, + "params": [ + { + "typeid": "{B505B05D-57BF-5A45-9113-B3A2784E2CD7}", + "details": { + "name": "AZStd::vector" + } + } + ], + "results": [ + { + "typeid": "{A0CA880C-AFE4-43CB-926C-59AC48496112}", + "details": { + "name": "bool" + } + } + ] + }, + { + "base": "Swap", + "context": "{B505B05D-57BF-5A45-9113-B3A2784E2CD7}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Swap" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Swap is invoked" + }, + "details": { + "name": "Swap" + }, + "params": [ + { + "typeid": "{B505B05D-57BF-5A45-9113-B3A2784E2CD7}", + "details": { + "name": "AZStd::vector" + } + }, + { + "typeid": "{B505B05D-57BF-5A45-9113-B3A2784E2CD7}", + "details": { + "name": "AZStd::vector" + } + } + ] + }, + { + "base": "push_back", + "context": "{B505B05D-57BF-5A45-9113-B3A2784E2CD7}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke push_back" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after push_back is invoked" + }, + "details": { + "name": "push_back" + }, + "params": [ + { + "typeid": "{B505B05D-57BF-5A45-9113-B3A2784E2CD7}", + "details": { + "name": "AZStd::vector" + } + }, + { + "typeid": "{A0CA880C-AFE4-43CB-926C-59AC48496112}", + "details": { + "name": "bool" + } + } + ] + }, + { + "base": "PushBack_VM", + "context": "{B505B05D-57BF-5A45-9113-B3A2784E2CD7}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke PushBack_VM" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after PushBack_VM is invoked" + }, + "details": { + "name": "PushBack_VM" + }, + "params": [ + { + "typeid": "{B505B05D-57BF-5A45-9113-B3A2784E2CD7}", + "details": { + "name": "AZStd::vector" + } + }, + { + "typeid": "{A0CA880C-AFE4-43CB-926C-59AC48496112}", + "details": { + "name": "bool" + } + } + ], + "results": [ + { + "typeid": "{B505B05D-57BF-5A45-9113-B3A2784E2CD7}", + "details": { + "name": "AZStd::vector" + } + } + ] + }, + { + "base": "AtUnchecked", + "context": "{B505B05D-57BF-5A45-9113-B3A2784E2CD7}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke AtUnchecked" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after AtUnchecked is invoked" + }, + "details": { + "name": "AtUnchecked" + }, + "params": [ + { + "typeid": "{B505B05D-57BF-5A45-9113-B3A2784E2CD7}", + "details": { + "name": "AZStd::vector" + } + }, + { + "typeid": "{D6597933-47CD-4FC8-B911-63F3E2B0993A}", + "details": { + "name": "AZ::u64" + } + } + ], + "results": [ + { + "typeid": "{A0CA880C-AFE4-43CB-926C-59AC48496112}", + "details": { + "name": "bool" + } + } + ] + }, + { + "base": "clear", + "context": "{B505B05D-57BF-5A45-9113-B3A2784E2CD7}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke clear" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after clear is invoked" + }, + "details": { + "name": "clear" + }, + "params": [ + { + "typeid": "{B505B05D-57BF-5A45-9113-B3A2784E2CD7}", + "details": { + "name": "AZStd::vector" + } + } + ] + }, + { + "base": "NotEmpty", + "context": "{B505B05D-57BF-5A45-9113-B3A2784E2CD7}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke NotEmpty" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after NotEmpty is invoked" + }, + "details": { + "name": "NotEmpty" + }, + "params": [ + { + "typeid": "{B505B05D-57BF-5A45-9113-B3A2784E2CD7}", + "details": { + "name": "AZStd::vector" + } + } + ], + "results": [ + { + "typeid": "{A0CA880C-AFE4-43CB-926C-59AC48496112}", + "details": { + "name": "bool" + } + } + ] + }, + { + "base": "Erase_VM", + "context": "{B505B05D-57BF-5A45-9113-B3A2784E2CD7}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Erase_VM" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Erase_VM is invoked" + }, + "details": { + "name": "Erase_VM" + }, + "params": [ + { + "typeid": "{B505B05D-57BF-5A45-9113-B3A2784E2CD7}", + "details": { + "name": "AZStd::vector" + } + }, + { + "typeid": "{D6597933-47CD-4FC8-B911-63F3E2B0993A}", + "details": { + "name": "AZ::u64" + } + } + ], + "results": [ + { + "typeid": "{B505B05D-57BF-5A45-9113-B3A2784E2CD7}", + "details": { + "name": "AZStd::vector" + } + } + ] + }, + { + "base": "EraseCheck_VM", + "context": "{B505B05D-57BF-5A45-9113-B3A2784E2CD7}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke EraseCheck_VM" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after EraseCheck_VM is invoked" + }, + "details": { + "name": "EraseCheck_VM" + }, + "params": [ + { + "typeid": "{B505B05D-57BF-5A45-9113-B3A2784E2CD7}", + "details": { + "name": "AZStd::vector" + } + }, + { + "typeid": "{D6597933-47CD-4FC8-B911-63F3E2B0993A}", + "details": { + "name": "AZ::u64" + } + } + ], + "results": [ + { + "typeid": "{A0CA880C-AFE4-43CB-926C-59AC48496112}", + "details": { + "name": "bool" + } + } + ] + }, + { + "base": "Capacity", + "context": "{B505B05D-57BF-5A45-9113-B3A2784E2CD7}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Capacity" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Capacity is invoked" + }, + "details": { + "name": "Capacity" + }, + "params": [ + { + "typeid": "{B505B05D-57BF-5A45-9113-B3A2784E2CD7}", + "details": { + "name": "AZStd::vector" + } + } + ], + "results": [ + { + "typeid": "{D6597933-47CD-4FC8-B911-63F3E2B0993A}", + "details": { + "name": "AZ::u64" + } + } + ] + }, + { + "base": "Clear", + "context": "{B505B05D-57BF-5A45-9113-B3A2784E2CD7}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Clear" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Clear is invoked" + }, + "details": { + "name": "Clear" + }, + "params": [ + { + "typeid": "{B505B05D-57BF-5A45-9113-B3A2784E2CD7}", + "details": { + "name": "AZStd::vector" + } + } + ], + "results": [ + { + "typeid": "{B505B05D-57BF-5A45-9113-B3A2784E2CD7}", + "details": { + "name": "AZStd::vector" + } + } + ] + }, + { + "base": "AssignAt", + "context": "{B505B05D-57BF-5A45-9113-B3A2784E2CD7}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke AssignAt" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after AssignAt is invoked" + }, + "details": { + "name": "AssignAt" + }, + "params": [ + { + "typeid": "{B505B05D-57BF-5A45-9113-B3A2784E2CD7}", + "details": { + "name": "AZStd::vector" + } + }, + { + "typeid": "{D6597933-47CD-4FC8-B911-63F3E2B0993A}", + "details": { + "name": "AZ::u64" + } + }, + { + "typeid": "{A0CA880C-AFE4-43CB-926C-59AC48496112}", + "details": { + "name": "bool" + } + } + ] + }, + { + "base": "GetSize", + "context": "{B505B05D-57BF-5A45-9113-B3A2784E2CD7}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke GetSize" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after GetSize is invoked" + }, + "details": { + "name": "GetSize" + }, + "params": [ + { + "typeid": "{B505B05D-57BF-5A45-9113-B3A2784E2CD7}", + "details": { + "name": "AZStd::vector" + } + } + ], + "results": [ + { + "typeid": "{72039442-EB38-4D42-A1AD-CB68F7E0EEF6}", + "details": { + "name": "int" + } + } + ] + }, + { + "base": "Insert", + "context": "{B505B05D-57BF-5A45-9113-B3A2784E2CD7}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Insert" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Insert is invoked" + }, + "details": { + "name": "Insert" + }, + "params": [ + { + "typeid": "{B505B05D-57BF-5A45-9113-B3A2784E2CD7}", + "details": { + "name": "AZStd::vector" + } + }, + { + "typeid": "{D6597933-47CD-4FC8-B911-63F3E2B0993A}", + "details": { + "name": "AZ::u64" + } + }, + { + "typeid": "{A0CA880C-AFE4-43CB-926C-59AC48496112}", + "details": { + "name": "bool" + } + } + ], + "results": [ + { + "typeid": "{B505B05D-57BF-5A45-9113-B3A2784E2CD7}", + "details": { + "name": "AZStd::vector" + } + } + ] + }, + { + "base": "PushBack", + "context": "{B505B05D-57BF-5A45-9113-B3A2784E2CD7}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke PushBack" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after PushBack is invoked" + }, + "details": { + "name": "PushBack" + }, + "params": [ + { + "typeid": "{B505B05D-57BF-5A45-9113-B3A2784E2CD7}", + "details": { + "name": "AZStd::vector" + } + }, + { + "typeid": "{A0CA880C-AFE4-43CB-926C-59AC48496112}", + "details": { + "name": "bool" + } + } + ] + }, + { + "base": "Reserve", + "context": "{B505B05D-57BF-5A45-9113-B3A2784E2CD7}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Reserve" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Reserve is invoked" + }, + "details": { + "name": "Reserve" + }, + "params": [ + { + "typeid": "{B505B05D-57BF-5A45-9113-B3A2784E2CD7}", + "details": { + "name": "AZStd::vector" + } + }, + { + "typeid": "{D6597933-47CD-4FC8-B911-63F3E2B0993A}", + "details": { + "name": "AZ::u64" + } + } + ] + }, + { + "base": "Iterate_VM", + "context": "{B505B05D-57BF-5A45-9113-B3A2784E2CD7}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Iterate_VM" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Iterate_VM is invoked" + }, + "details": { + "name": "Iterate_VM" + }, + "params": [ + { + "typeid": "{B505B05D-57BF-5A45-9113-B3A2784E2CD7}", + "details": { + "name": "AZStd::vector" + } + } + ], + "results": [ + { + "typeid": "{309BAC28-3844-53C7-A952-EC55DFC7C3BB}", + "details": { + "name": "Iterator_VM>" + } + } + ] + } + ] + }, + { + "base": "{5600E444-1E66-5CB4-81A9-053AD1F4453E}", + "context": "OnDemandReflected", + "variant": "", + "details": { + "name": "Array", + "category": "Array", + "tooltip": "A dynamically sized container of elements." + }, + "methods": [ + { + "base": "Size", + "context": "{5600E444-1E66-5CB4-81A9-053AD1F4453E}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Size" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Size is invoked" + }, + "details": { + "name": "Size" + }, + "params": [ + { + "typeid": "{5600E444-1E66-5CB4-81A9-053AD1F4453E}", + "details": { + "name": "AZStd::vector" + } + } + ], + "results": [ + { + "typeid": "{72039442-EB38-4D42-A1AD-CB68F7E0EEF6}", + "details": { + "name": "int" + } + } + ] + }, + { + "base": "Front", + "context": "{5600E444-1E66-5CB4-81A9-053AD1F4453E}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Front" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Front is invoked" + }, + "details": { + "name": "Front" + }, + "params": [ + { + "typeid": "{5600E444-1E66-5CB4-81A9-053AD1F4453E}", + "details": { + "name": "AZStd::vector" + } + } + ], + "results": [ + { + "typeid": "{C73A5FA9-295B-57F8-97D0-947B74603D96}", + "details": { + "name": "Asset" + } + } + ] + }, + { + "base": "HasKey", + "context": "{5600E444-1E66-5CB4-81A9-053AD1F4453E}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Has Key" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Has Key is invoked" + }, + "details": { + "name": "Has Key" + }, + "params": [ + { + "typeid": "{5600E444-1E66-5CB4-81A9-053AD1F4453E}", + "details": { + "name": "AZStd::vector" + } + }, + { + "typeid": "{D6597933-47CD-4FC8-B911-63F3E2B0993A}", + "details": { + "name": "AZ::u64" + } + } + ], + "results": [ + { + "typeid": "{A0CA880C-AFE4-43CB-926C-59AC48496112}", + "details": { + "name": "bool" + } + } + ] + }, + { + "base": "Resize", + "context": "{5600E444-1E66-5CB4-81A9-053AD1F4453E}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Resize" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Resize is invoked" + }, + "details": { + "name": "Resize" + }, + "params": [ + { + "typeid": "{5600E444-1E66-5CB4-81A9-053AD1F4453E}", + "details": { + "name": "AZStd::vector" + } + }, + { + "typeid": "{D6597933-47CD-4FC8-B911-63F3E2B0993A}", + "details": { + "name": "AZ::u64" + } + } + ] + }, + { + "base": "at", + "context": "{5600E444-1E66-5CB4-81A9-053AD1F4453E}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke at" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after at is invoked" + }, + "details": { + "name": "at" + }, + "params": [ + { + "typeid": "{5600E444-1E66-5CB4-81A9-053AD1F4453E}", + "details": { + "name": "AZStd::vector" + } + }, + { + "typeid": "{D6597933-47CD-4FC8-B911-63F3E2B0993A}", + "details": { + "name": "AZ::u64" + } + } + ], + "results": [ + { + "typeid": "{C73A5FA9-295B-57F8-97D0-947B74603D96}", + "details": { + "name": "Asset" + } + } + ] + }, + { + "base": "Back", + "context": "{5600E444-1E66-5CB4-81A9-053AD1F4453E}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Back" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Back is invoked" + }, + "details": { + "name": "Back" + }, + "params": [ + { + "typeid": "{5600E444-1E66-5CB4-81A9-053AD1F4453E}", + "details": { + "name": "AZStd::vector" + } + } + ], + "results": [ + { + "typeid": "{C73A5FA9-295B-57F8-97D0-947B74603D96}", + "details": { + "name": "Asset" + } + } + ] + }, + { + "base": "pop_back", + "context": "{5600E444-1E66-5CB4-81A9-053AD1F4453E}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke pop_back" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after pop_back is invoked" + }, + "details": { + "name": "pop_back" + }, + "params": [ + { + "typeid": "{5600E444-1E66-5CB4-81A9-053AD1F4453E}", + "details": { + "name": "AZStd::vector" + } + } + ] + }, + { + "base": "size", + "context": "{5600E444-1E66-5CB4-81A9-053AD1F4453E}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke size" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after size is invoked" + }, + "details": { + "name": "size" + }, + "params": [ + { + "typeid": "{5600E444-1E66-5CB4-81A9-053AD1F4453E}", + "details": { + "name": "AZStd::vector" + } + } + ], + "results": [ + { + "typeid": "{72039442-EB38-4D42-A1AD-CB68F7E0EEF6}", + "details": { + "name": "int" + } + } + ] + }, + { + "base": "At", + "context": "{5600E444-1E66-5CB4-81A9-053AD1F4453E}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke At" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after At is invoked" + }, + "details": { + "name": "At" + }, + "params": [ + { + "typeid": "{5600E444-1E66-5CB4-81A9-053AD1F4453E}", + "details": { + "name": "AZStd::vector" + } + }, + { + "typeid": "{D6597933-47CD-4FC8-B911-63F3E2B0993A}", + "details": { + "name": "AZ::u64" + } + } + ], + "results": [ + { + "typeid": "{C73A5FA9-295B-57F8-97D0-947B74603D96}", + "details": { + "name": "Asset" + } + } + ] + }, + { + "base": "Empty", + "context": "{5600E444-1E66-5CB4-81A9-053AD1F4453E}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Empty" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Empty is invoked" + }, + "details": { + "name": "Empty" + }, + "params": [ + { + "typeid": "{5600E444-1E66-5CB4-81A9-053AD1F4453E}", + "details": { + "name": "AZStd::vector" + } + } + ], + "results": [ + { + "typeid": "{A0CA880C-AFE4-43CB-926C-59AC48496112}", + "details": { + "name": "bool" + } + } + ] + }, + { + "base": "Swap", + "context": "{5600E444-1E66-5CB4-81A9-053AD1F4453E}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Swap" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Swap is invoked" + }, + "details": { + "name": "Swap" + }, + "params": [ + { + "typeid": "{5600E444-1E66-5CB4-81A9-053AD1F4453E}", + "details": { + "name": "AZStd::vector" + } + }, + { + "typeid": "{5600E444-1E66-5CB4-81A9-053AD1F4453E}", + "details": { + "name": "AZStd::vector" + } + } + ] + }, + { + "base": "push_back", + "context": "{5600E444-1E66-5CB4-81A9-053AD1F4453E}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke push_back" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after push_back is invoked" + }, + "details": { + "name": "push_back" + }, + "params": [ + { + "typeid": "{5600E444-1E66-5CB4-81A9-053AD1F4453E}", + "details": { + "name": "AZStd::vector" + } + }, + { + "typeid": "{C73A5FA9-295B-57F8-97D0-947B74603D96}", + "details": { + "name": "Asset" + } + } + ] + }, + { + "base": "PushBack_VM", + "context": "{5600E444-1E66-5CB4-81A9-053AD1F4453E}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke PushBack_VM" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after PushBack_VM is invoked" + }, + "details": { + "name": "PushBack_VM" + }, + "params": [ + { + "typeid": "{5600E444-1E66-5CB4-81A9-053AD1F4453E}", + "details": { + "name": "AZStd::vector" + } + }, + { + "typeid": "{C73A5FA9-295B-57F8-97D0-947B74603D96}", + "details": { + "name": "Asset" + } + } + ], + "results": [ + { + "typeid": "{5600E444-1E66-5CB4-81A9-053AD1F4453E}", + "details": { + "name": "AZStd::vector" + } + } + ] + }, + { + "base": "AtUnchecked", + "context": "{5600E444-1E66-5CB4-81A9-053AD1F4453E}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke AtUnchecked" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after AtUnchecked is invoked" + }, + "details": { + "name": "AtUnchecked" + }, + "params": [ + { + "typeid": "{5600E444-1E66-5CB4-81A9-053AD1F4453E}", + "details": { + "name": "AZStd::vector" + } + }, + { + "typeid": "{D6597933-47CD-4FC8-B911-63F3E2B0993A}", + "details": { + "name": "AZ::u64" + } + } + ], + "results": [ + { + "typeid": "{C73A5FA9-295B-57F8-97D0-947B74603D96}", + "details": { + "name": "Asset" + } + } + ] + }, + { + "base": "clear", + "context": "{5600E444-1E66-5CB4-81A9-053AD1F4453E}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke clear" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after clear is invoked" + }, + "details": { + "name": "clear" + }, + "params": [ + { + "typeid": "{5600E444-1E66-5CB4-81A9-053AD1F4453E}", + "details": { + "name": "AZStd::vector" + } + } + ] + }, + { + "base": "NotEmpty", + "context": "{5600E444-1E66-5CB4-81A9-053AD1F4453E}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke NotEmpty" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after NotEmpty is invoked" + }, + "details": { + "name": "NotEmpty" + }, + "params": [ + { + "typeid": "{5600E444-1E66-5CB4-81A9-053AD1F4453E}", + "details": { + "name": "AZStd::vector" + } + } + ], + "results": [ + { + "typeid": "{A0CA880C-AFE4-43CB-926C-59AC48496112}", + "details": { + "name": "bool" + } + } + ] + }, + { + "base": "Erase_VM", + "context": "{5600E444-1E66-5CB4-81A9-053AD1F4453E}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Erase_VM" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Erase_VM is invoked" + }, + "details": { + "name": "Erase_VM" + }, + "params": [ + { + "typeid": "{5600E444-1E66-5CB4-81A9-053AD1F4453E}", + "details": { + "name": "AZStd::vector" + } + }, + { + "typeid": "{D6597933-47CD-4FC8-B911-63F3E2B0993A}", + "details": { + "name": "AZ::u64" + } + } + ], + "results": [ + { + "typeid": "{5600E444-1E66-5CB4-81A9-053AD1F4453E}", + "details": { + "name": "AZStd::vector" + } + } + ] + }, + { + "base": "EraseCheck_VM", + "context": "{5600E444-1E66-5CB4-81A9-053AD1F4453E}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke EraseCheck_VM" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after EraseCheck_VM is invoked" + }, + "details": { + "name": "EraseCheck_VM" + }, + "params": [ + { + "typeid": "{5600E444-1E66-5CB4-81A9-053AD1F4453E}", + "details": { + "name": "AZStd::vector" + } + }, + { + "typeid": "{D6597933-47CD-4FC8-B911-63F3E2B0993A}", + "details": { + "name": "AZ::u64" + } + } + ], + "results": [ + { + "typeid": "{A0CA880C-AFE4-43CB-926C-59AC48496112}", + "details": { + "name": "bool" + } + } + ] + }, + { + "base": "Capacity", + "context": "{5600E444-1E66-5CB4-81A9-053AD1F4453E}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Capacity" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Capacity is invoked" + }, + "details": { + "name": "Capacity" + }, + "params": [ + { + "typeid": "{5600E444-1E66-5CB4-81A9-053AD1F4453E}", + "details": { + "name": "AZStd::vector" + } + } + ], + "results": [ + { + "typeid": "{D6597933-47CD-4FC8-B911-63F3E2B0993A}", + "details": { + "name": "AZ::u64" + } + } + ] + }, + { + "base": "Clear", + "context": "{5600E444-1E66-5CB4-81A9-053AD1F4453E}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Clear" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Clear is invoked" + }, + "details": { + "name": "Clear" + }, + "params": [ + { + "typeid": "{5600E444-1E66-5CB4-81A9-053AD1F4453E}", + "details": { + "name": "AZStd::vector" + } + } + ], + "results": [ + { + "typeid": "{5600E444-1E66-5CB4-81A9-053AD1F4453E}", + "details": { + "name": "AZStd::vector" + } + } + ] + }, + { + "base": "AssignAt", + "context": "{5600E444-1E66-5CB4-81A9-053AD1F4453E}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke AssignAt" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after AssignAt is invoked" + }, + "details": { + "name": "AssignAt" + }, + "params": [ + { + "typeid": "{5600E444-1E66-5CB4-81A9-053AD1F4453E}", + "details": { + "name": "AZStd::vector" + } + }, + { + "typeid": "{D6597933-47CD-4FC8-B911-63F3E2B0993A}", + "details": { + "name": "AZ::u64" + } + }, + { + "typeid": "{C73A5FA9-295B-57F8-97D0-947B74603D96}", + "details": { + "name": "Asset" + } + } + ] + }, + { + "base": "GetSize", + "context": "{5600E444-1E66-5CB4-81A9-053AD1F4453E}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke GetSize" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after GetSize is invoked" + }, + "details": { + "name": "GetSize" + }, + "params": [ + { + "typeid": "{5600E444-1E66-5CB4-81A9-053AD1F4453E}", + "details": { + "name": "AZStd::vector" + } + } + ], + "results": [ + { + "typeid": "{72039442-EB38-4D42-A1AD-CB68F7E0EEF6}", + "details": { + "name": "int" + } + } + ] + }, + { + "base": "Insert", + "context": "{5600E444-1E66-5CB4-81A9-053AD1F4453E}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Insert" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Insert is invoked" + }, + "details": { + "name": "Insert" + }, + "params": [ + { + "typeid": "{5600E444-1E66-5CB4-81A9-053AD1F4453E}", + "details": { + "name": "AZStd::vector" + } + }, + { + "typeid": "{D6597933-47CD-4FC8-B911-63F3E2B0993A}", + "details": { + "name": "AZ::u64" + } + }, + { + "typeid": "{C73A5FA9-295B-57F8-97D0-947B74603D96}", + "details": { + "name": "Asset" + } + } + ], + "results": [ + { + "typeid": "{5600E444-1E66-5CB4-81A9-053AD1F4453E}", + "details": { + "name": "AZStd::vector" + } + } + ] + }, + { + "base": "PushBack", + "context": "{5600E444-1E66-5CB4-81A9-053AD1F4453E}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke PushBack" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after PushBack is invoked" + }, + "details": { + "name": "PushBack" + }, + "params": [ + { + "typeid": "{5600E444-1E66-5CB4-81A9-053AD1F4453E}", + "details": { + "name": "AZStd::vector" + } + }, + { + "typeid": "{C73A5FA9-295B-57F8-97D0-947B74603D96}", + "details": { + "name": "Asset" + } + } + ] + }, + { + "base": "Reserve", + "context": "{5600E444-1E66-5CB4-81A9-053AD1F4453E}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Reserve" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Reserve is invoked" + }, + "details": { + "name": "Reserve" + }, + "params": [ + { + "typeid": "{5600E444-1E66-5CB4-81A9-053AD1F4453E}", + "details": { + "name": "AZStd::vector" + } + }, + { + "typeid": "{D6597933-47CD-4FC8-B911-63F3E2B0993A}", + "details": { + "name": "AZ::u64" + } + } + ] + }, + { + "base": "Iterate_VM", + "context": "{5600E444-1E66-5CB4-81A9-053AD1F4453E}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Iterate_VM" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Iterate_VM is invoked" + }, + "details": { + "name": "Iterate_VM" + }, + "params": [ + { + "typeid": "{5600E444-1E66-5CB4-81A9-053AD1F4453E}", + "details": { + "name": "AZStd::vector" + } + } + ], + "results": [ + { + "typeid": "{92764AA6-ABDB-51CC-8318-0BDE24A094CE}", + "details": { + "name": "Iterator_VM, allocator>>" + } + } + ] + } + ] + }, + { + "base": "{8B173592-95EA-56B6-AE88-33A58FDAF93E}", + "context": "OnDemandReflected", + "variant": "", + "details": { + "name": "Map", + "category": "Map", + "tooltip": "A collection of Key/Value pairs, where each Key value must be unique." + }, + "methods": [ + { + "base": "contains", + "context": "{8B173592-95EA-56B6-AE88-33A58FDAF93E}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke contains" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after contains is invoked" + }, + "details": { + "name": "contains" + }, + "params": [ + { + "typeid": "{8B173592-95EA-56B6-AE88-33A58FDAF93E}", + "details": { + "name": "AZStd::unordered_map" + } + }, + { + "typeid": "{03AAAB3F-5C47-5A66-9EBC-D5FA4DB353C9}", + "details": { + "name": "AZStd::string" + } + } + ], + "results": [ + { + "typeid": "{A0CA880C-AFE4-43CB-926C-59AC48496112}", + "details": { + "name": "bool" + } + } + ] + }, + { + "base": "Insert", + "context": "{8B173592-95EA-56B6-AE88-33A58FDAF93E}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Insert" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Insert is invoked" + }, + "details": { + "name": "Insert" + }, + "params": [ + { + "typeid": "{8B173592-95EA-56B6-AE88-33A58FDAF93E}", + "details": { + "name": "AZStd::unordered_map" + } + }, + { + "typeid": "{03AAAB3F-5C47-5A66-9EBC-D5FA4DB353C9}", + "details": { + "name": "AZStd::string" + } + }, + { + "typeid": "{8379EB7D-01FA-4538-B64B-A6543B4BE73D}", + "details": { + "name": "Vector3" + } + } + ], + "results": [ + { + "typeid": "{8B173592-95EA-56B6-AE88-33A58FDAF93E}", + "details": { + "name": "AZStd::unordered_map" + } + } + ] + }, + { + "base": "Reserve", + "context": "{8B173592-95EA-56B6-AE88-33A58FDAF93E}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Reserve" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Reserve is invoked" + }, + "details": { + "name": "Reserve" + }, + "params": [ + { + "typeid": "{8B173592-95EA-56B6-AE88-33A58FDAF93E}", + "details": { + "name": "AZStd::unordered_map" + } + }, + { + "typeid": "{D6597933-47CD-4FC8-B911-63F3E2B0993A}", + "details": { + "name": "AZ::u64" + } + } + ] + }, + { + "base": "GetSize", + "context": "{8B173592-95EA-56B6-AE88-33A58FDAF93E}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke GetSize" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after GetSize is invoked" + }, + "details": { + "name": "GetSize" + }, + "params": [ + { + "typeid": "{8B173592-95EA-56B6-AE88-33A58FDAF93E}", + "details": { + "name": "AZStd::unordered_map" + } + } + ], + "results": [ + { + "typeid": "{72039442-EB38-4D42-A1AD-CB68F7E0EEF6}", + "details": { + "name": "int" + } + } + ] + }, + { + "base": "Iterate_VM", + "context": "{8B173592-95EA-56B6-AE88-33A58FDAF93E}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Iterate_VM" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Iterate_VM is invoked" + }, + "details": { + "name": "Iterate_VM" + }, + "params": [ + { + "typeid": "{8B173592-95EA-56B6-AE88-33A58FDAF93E}", + "details": { + "name": "AZStd::unordered_map" + } + } + ], + "results": [ + { + "typeid": "{A43908D5-50DB-5D62-A519-AC5224EB1C78}", + "details": { + "name": "Iterator_VM, allocator>, Vector3, AZStd::hash", + "category": "Array", + "tooltip": "A dynamically sized container of elements." + }, + "methods": [ + { + "base": "Size", + "context": "{E8EDFF6E-951E-584D-9D47-33F43F77D859}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Size" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Size is invoked" + }, + "details": { + "name": "Size" + }, + "params": [ + { + "typeid": "{E8EDFF6E-951E-584D-9D47-33F43F77D859}", + "details": { + "name": "AZStd::vector" + } + } + ], + "results": [ + { + "typeid": "{72039442-EB38-4D42-A1AD-CB68F7E0EEF6}", + "details": { + "name": "int" + } + } + ] + }, + { + "base": "Front", + "context": "{E8EDFF6E-951E-584D-9D47-33F43F77D859}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Front" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Front is invoked" + }, + "details": { + "name": "Front" + }, + "params": [ + { + "typeid": "{E8EDFF6E-951E-584D-9D47-33F43F77D859}", + "details": { + "name": "AZStd::vector" + } + } + ], + "results": [ + { + "typeid": "{847DD984-9DBF-4789-8E25-E0334402E8AD}", + "details": { + "name": "Plane" + } + } + ] + }, + { + "base": "HasKey", + "context": "{E8EDFF6E-951E-584D-9D47-33F43F77D859}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Has Key" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Has Key is invoked" + }, + "details": { + "name": "Has Key" + }, + "params": [ + { + "typeid": "{E8EDFF6E-951E-584D-9D47-33F43F77D859}", + "details": { + "name": "AZStd::vector" + } + }, + { + "typeid": "{D6597933-47CD-4FC8-B911-63F3E2B0993A}", + "details": { + "name": "AZ::u64" + } + } + ], + "results": [ + { + "typeid": "{A0CA880C-AFE4-43CB-926C-59AC48496112}", + "details": { + "name": "bool" + } + } + ] + }, + { + "base": "Resize", + "context": "{E8EDFF6E-951E-584D-9D47-33F43F77D859}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Resize" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Resize is invoked" + }, + "details": { + "name": "Resize" + }, + "params": [ + { + "typeid": "{E8EDFF6E-951E-584D-9D47-33F43F77D859}", + "details": { + "name": "AZStd::vector" + } + }, + { + "typeid": "{D6597933-47CD-4FC8-B911-63F3E2B0993A}", + "details": { + "name": "AZ::u64" + } + } + ] + }, + { + "base": "at", + "context": "{E8EDFF6E-951E-584D-9D47-33F43F77D859}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke at" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after at is invoked" + }, + "details": { + "name": "at" + }, + "params": [ + { + "typeid": "{E8EDFF6E-951E-584D-9D47-33F43F77D859}", + "details": { + "name": "AZStd::vector" + } + }, + { + "typeid": "{D6597933-47CD-4FC8-B911-63F3E2B0993A}", + "details": { + "name": "AZ::u64" + } + } + ], + "results": [ + { + "typeid": "{847DD984-9DBF-4789-8E25-E0334402E8AD}", + "details": { + "name": "Plane" + } + } + ] + }, + { + "base": "Back", + "context": "{E8EDFF6E-951E-584D-9D47-33F43F77D859}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Back" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Back is invoked" + }, + "details": { + "name": "Back" + }, + "params": [ + { + "typeid": "{E8EDFF6E-951E-584D-9D47-33F43F77D859}", + "details": { + "name": "AZStd::vector" + } + } + ], + "results": [ + { + "typeid": "{847DD984-9DBF-4789-8E25-E0334402E8AD}", + "details": { + "name": "Plane" + } + } + ] + }, + { + "base": "pop_back", + "context": "{E8EDFF6E-951E-584D-9D47-33F43F77D859}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke pop_back" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after pop_back is invoked" + }, + "details": { + "name": "pop_back" + }, + "params": [ + { + "typeid": "{E8EDFF6E-951E-584D-9D47-33F43F77D859}", + "details": { + "name": "AZStd::vector" + } + } + ] + }, + { + "base": "size", + "context": "{E8EDFF6E-951E-584D-9D47-33F43F77D859}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke size" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after size is invoked" + }, + "details": { + "name": "size" + }, + "params": [ + { + "typeid": "{E8EDFF6E-951E-584D-9D47-33F43F77D859}", + "details": { + "name": "AZStd::vector" + } + } + ], + "results": [ + { + "typeid": "{72039442-EB38-4D42-A1AD-CB68F7E0EEF6}", + "details": { + "name": "int" + } + } + ] + }, + { + "base": "At", + "context": "{E8EDFF6E-951E-584D-9D47-33F43F77D859}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke At" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after At is invoked" + }, + "details": { + "name": "At" + }, + "params": [ + { + "typeid": "{E8EDFF6E-951E-584D-9D47-33F43F77D859}", + "details": { + "name": "AZStd::vector" + } + }, + { + "typeid": "{D6597933-47CD-4FC8-B911-63F3E2B0993A}", + "details": { + "name": "AZ::u64" + } + } + ], + "results": [ + { + "typeid": "{847DD984-9DBF-4789-8E25-E0334402E8AD}", + "details": { + "name": "Plane" + } + } + ] + }, + { + "base": "Empty", + "context": "{E8EDFF6E-951E-584D-9D47-33F43F77D859}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Empty" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Empty is invoked" + }, + "details": { + "name": "Empty" + }, + "params": [ + { + "typeid": "{E8EDFF6E-951E-584D-9D47-33F43F77D859}", + "details": { + "name": "AZStd::vector" + } + } + ], + "results": [ + { + "typeid": "{A0CA880C-AFE4-43CB-926C-59AC48496112}", + "details": { + "name": "bool" + } + } + ] + }, + { + "base": "Swap", + "context": "{E8EDFF6E-951E-584D-9D47-33F43F77D859}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Swap" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Swap is invoked" + }, + "details": { + "name": "Swap" + }, + "params": [ + { + "typeid": "{E8EDFF6E-951E-584D-9D47-33F43F77D859}", + "details": { + "name": "AZStd::vector" + } + }, + { + "typeid": "{E8EDFF6E-951E-584D-9D47-33F43F77D859}", + "details": { + "name": "AZStd::vector" + } + } + ] + }, + { + "base": "push_back", + "context": "{E8EDFF6E-951E-584D-9D47-33F43F77D859}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke push_back" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after push_back is invoked" + }, + "details": { + "name": "push_back" + }, + "params": [ + { + "typeid": "{E8EDFF6E-951E-584D-9D47-33F43F77D859}", + "details": { + "name": "AZStd::vector" + } + }, + { + "typeid": "{847DD984-9DBF-4789-8E25-E0334402E8AD}", + "details": { + "name": "Plane" + } + } + ] + }, + { + "base": "PushBack_VM", + "context": "{E8EDFF6E-951E-584D-9D47-33F43F77D859}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke PushBack_VM" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after PushBack_VM is invoked" + }, + "details": { + "name": "PushBack_VM" + }, + "params": [ + { + "typeid": "{E8EDFF6E-951E-584D-9D47-33F43F77D859}", + "details": { + "name": "AZStd::vector" + } + }, + { + "typeid": "{847DD984-9DBF-4789-8E25-E0334402E8AD}", + "details": { + "name": "Plane" + } + } + ], + "results": [ + { + "typeid": "{E8EDFF6E-951E-584D-9D47-33F43F77D859}", + "details": { + "name": "AZStd::vector" + } + } + ] + }, + { + "base": "AtUnchecked", + "context": "{E8EDFF6E-951E-584D-9D47-33F43F77D859}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke AtUnchecked" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after AtUnchecked is invoked" + }, + "details": { + "name": "AtUnchecked" + }, + "params": [ + { + "typeid": "{E8EDFF6E-951E-584D-9D47-33F43F77D859}", + "details": { + "name": "AZStd::vector" + } + }, + { + "typeid": "{D6597933-47CD-4FC8-B911-63F3E2B0993A}", + "details": { + "name": "AZ::u64" + } + } + ], + "results": [ + { + "typeid": "{847DD984-9DBF-4789-8E25-E0334402E8AD}", + "details": { + "name": "Plane" + } + } + ] + }, + { + "base": "clear", + "context": "{E8EDFF6E-951E-584D-9D47-33F43F77D859}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke clear" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after clear is invoked" + }, + "details": { + "name": "clear" + }, + "params": [ + { + "typeid": "{E8EDFF6E-951E-584D-9D47-33F43F77D859}", + "details": { + "name": "AZStd::vector" + } + } + ] + }, + { + "base": "NotEmpty", + "context": "{E8EDFF6E-951E-584D-9D47-33F43F77D859}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke NotEmpty" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after NotEmpty is invoked" + }, + "details": { + "name": "NotEmpty" + }, + "params": [ + { + "typeid": "{E8EDFF6E-951E-584D-9D47-33F43F77D859}", + "details": { + "name": "AZStd::vector" + } + } + ], + "results": [ + { + "typeid": "{A0CA880C-AFE4-43CB-926C-59AC48496112}", + "details": { + "name": "bool" + } + } + ] + }, + { + "base": "Erase_VM", + "context": "{E8EDFF6E-951E-584D-9D47-33F43F77D859}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Erase_VM" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Erase_VM is invoked" + }, + "details": { + "name": "Erase_VM" + }, + "params": [ + { + "typeid": "{E8EDFF6E-951E-584D-9D47-33F43F77D859}", + "details": { + "name": "AZStd::vector" + } + }, + { + "typeid": "{D6597933-47CD-4FC8-B911-63F3E2B0993A}", + "details": { + "name": "AZ::u64" + } + } + ], + "results": [ + { + "typeid": "{E8EDFF6E-951E-584D-9D47-33F43F77D859}", + "details": { + "name": "AZStd::vector" + } + } + ] + }, + { + "base": "EraseCheck_VM", + "context": "{E8EDFF6E-951E-584D-9D47-33F43F77D859}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke EraseCheck_VM" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after EraseCheck_VM is invoked" + }, + "details": { + "name": "EraseCheck_VM" + }, + "params": [ + { + "typeid": "{E8EDFF6E-951E-584D-9D47-33F43F77D859}", + "details": { + "name": "AZStd::vector" + } + }, + { + "typeid": "{D6597933-47CD-4FC8-B911-63F3E2B0993A}", + "details": { + "name": "AZ::u64" + } + } + ], + "results": [ + { + "typeid": "{A0CA880C-AFE4-43CB-926C-59AC48496112}", + "details": { + "name": "bool" + } + } + ] + }, + { + "base": "Capacity", + "context": "{E8EDFF6E-951E-584D-9D47-33F43F77D859}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Capacity" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Capacity is invoked" + }, + "details": { + "name": "Capacity" + }, + "params": [ + { + "typeid": "{E8EDFF6E-951E-584D-9D47-33F43F77D859}", + "details": { + "name": "AZStd::vector" + } + } + ], + "results": [ + { + "typeid": "{D6597933-47CD-4FC8-B911-63F3E2B0993A}", + "details": { + "name": "AZ::u64" + } + } + ] + }, + { + "base": "Clear", + "context": "{E8EDFF6E-951E-584D-9D47-33F43F77D859}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Clear" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Clear is invoked" + }, + "details": { + "name": "Clear" + }, + "params": [ + { + "typeid": "{E8EDFF6E-951E-584D-9D47-33F43F77D859}", + "details": { + "name": "AZStd::vector" + } + } + ], + "results": [ + { + "typeid": "{E8EDFF6E-951E-584D-9D47-33F43F77D859}", + "details": { + "name": "AZStd::vector" + } + } + ] + }, + { + "base": "AssignAt", + "context": "{E8EDFF6E-951E-584D-9D47-33F43F77D859}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke AssignAt" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after AssignAt is invoked" + }, + "details": { + "name": "AssignAt" + }, + "params": [ + { + "typeid": "{E8EDFF6E-951E-584D-9D47-33F43F77D859}", + "details": { + "name": "AZStd::vector" + } + }, + { + "typeid": "{D6597933-47CD-4FC8-B911-63F3E2B0993A}", + "details": { + "name": "AZ::u64" + } + }, + { + "typeid": "{847DD984-9DBF-4789-8E25-E0334402E8AD}", + "details": { + "name": "Plane" + } + } + ] + }, + { + "base": "GetSize", + "context": "{E8EDFF6E-951E-584D-9D47-33F43F77D859}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke GetSize" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after GetSize is invoked" + }, + "details": { + "name": "GetSize" + }, + "params": [ + { + "typeid": "{E8EDFF6E-951E-584D-9D47-33F43F77D859}", + "details": { + "name": "AZStd::vector" + } + } + ], + "results": [ + { + "typeid": "{72039442-EB38-4D42-A1AD-CB68F7E0EEF6}", + "details": { + "name": "int" + } + } + ] + }, + { + "base": "Insert", + "context": "{E8EDFF6E-951E-584D-9D47-33F43F77D859}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Insert" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Insert is invoked" + }, + "details": { + "name": "Insert" + }, + "params": [ + { + "typeid": "{E8EDFF6E-951E-584D-9D47-33F43F77D859}", + "details": { + "name": "AZStd::vector" + } + }, + { + "typeid": "{D6597933-47CD-4FC8-B911-63F3E2B0993A}", + "details": { + "name": "AZ::u64" + } + }, + { + "typeid": "{847DD984-9DBF-4789-8E25-E0334402E8AD}", + "details": { + "name": "Plane" + } + } + ], + "results": [ + { + "typeid": "{E8EDFF6E-951E-584D-9D47-33F43F77D859}", + "details": { + "name": "AZStd::vector" + } + } + ] + }, + { + "base": "PushBack", + "context": "{E8EDFF6E-951E-584D-9D47-33F43F77D859}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke PushBack" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after PushBack is invoked" + }, + "details": { + "name": "PushBack" + }, + "params": [ + { + "typeid": "{E8EDFF6E-951E-584D-9D47-33F43F77D859}", + "details": { + "name": "AZStd::vector" + } + }, + { + "typeid": "{847DD984-9DBF-4789-8E25-E0334402E8AD}", + "details": { + "name": "Plane" + } + } + ] + }, + { + "base": "Reserve", + "context": "{E8EDFF6E-951E-584D-9D47-33F43F77D859}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Reserve" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Reserve is invoked" + }, + "details": { + "name": "Reserve" + }, + "params": [ + { + "typeid": "{E8EDFF6E-951E-584D-9D47-33F43F77D859}", + "details": { + "name": "AZStd::vector" + } + }, + { + "typeid": "{D6597933-47CD-4FC8-B911-63F3E2B0993A}", + "details": { + "name": "AZ::u64" + } + } + ] + }, + { + "base": "Iterate_VM", + "context": "{E8EDFF6E-951E-584D-9D47-33F43F77D859}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Iterate_VM" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Iterate_VM is invoked" + }, + "details": { + "name": "Iterate_VM" + }, + "params": [ + { + "typeid": "{E8EDFF6E-951E-584D-9D47-33F43F77D859}", + "details": { + "name": "AZStd::vector" + } + } + ], + "results": [ + { + "typeid": "{C172722C-0AA5-5611-A243-F610997BE645}", + "details": { + "name": "Iterator_VM>" + } + } + ] + } + ] + }, + { + "base": "{82AC1A71-2EA7-5FBC-9B3B-72B1CCFDD292}", + "context": "OnDemandReflected", + "variant": "", + "details": { + "name": "Array", + "category": "Array", + "tooltip": "A dynamically sized container of elements." + }, + "methods": [ + { + "base": "Size", + "context": "{82AC1A71-2EA7-5FBC-9B3B-72B1CCFDD292}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Size" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Size is invoked" + }, + "details": { + "name": "Size" + }, + "params": [ + { + "typeid": "{82AC1A71-2EA7-5FBC-9B3B-72B1CCFDD292}", + "details": { + "name": "AZStd::vector" + } + } + ], + "results": [ + { + "typeid": "{72039442-EB38-4D42-A1AD-CB68F7E0EEF6}", + "details": { + "name": "int" + } + } + ] + }, + { + "base": "Front", + "context": "{82AC1A71-2EA7-5FBC-9B3B-72B1CCFDD292}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Front" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Front is invoked" + }, + "details": { + "name": "Front" + }, + "params": [ + { + "typeid": "{82AC1A71-2EA7-5FBC-9B3B-72B1CCFDD292}", + "details": { + "name": "AZStd::vector" + } + } + ], + "results": [ + { + "typeid": "{3D80F623-C85C-4741-90D0-E4E66164E6BF}", + "details": { + "name": "Vector2" + } + } + ] + }, + { + "base": "HasKey", + "context": "{82AC1A71-2EA7-5FBC-9B3B-72B1CCFDD292}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Has Key" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Has Key is invoked" + }, + "details": { + "name": "Has Key" + }, + "params": [ + { + "typeid": "{82AC1A71-2EA7-5FBC-9B3B-72B1CCFDD292}", + "details": { + "name": "AZStd::vector" + } + }, + { + "typeid": "{D6597933-47CD-4FC8-B911-63F3E2B0993A}", + "details": { + "name": "AZ::u64" + } + } + ], + "results": [ + { + "typeid": "{A0CA880C-AFE4-43CB-926C-59AC48496112}", + "details": { + "name": "bool" + } + } + ] + }, + { + "base": "Resize", + "context": "{82AC1A71-2EA7-5FBC-9B3B-72B1CCFDD292}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Resize" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Resize is invoked" + }, + "details": { + "name": "Resize" + }, + "params": [ + { + "typeid": "{82AC1A71-2EA7-5FBC-9B3B-72B1CCFDD292}", + "details": { + "name": "AZStd::vector" + } + }, + { + "typeid": "{D6597933-47CD-4FC8-B911-63F3E2B0993A}", + "details": { + "name": "AZ::u64" + } + } + ] + }, + { + "base": "at", + "context": "{82AC1A71-2EA7-5FBC-9B3B-72B1CCFDD292}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke at" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after at is invoked" + }, + "details": { + "name": "at" + }, + "params": [ + { + "typeid": "{82AC1A71-2EA7-5FBC-9B3B-72B1CCFDD292}", + "details": { + "name": "AZStd::vector" + } + }, + { + "typeid": "{D6597933-47CD-4FC8-B911-63F3E2B0993A}", + "details": { + "name": "AZ::u64" + } + } + ], + "results": [ + { + "typeid": "{3D80F623-C85C-4741-90D0-E4E66164E6BF}", + "details": { + "name": "Vector2" + } + } + ] + }, + { + "base": "Back", + "context": "{82AC1A71-2EA7-5FBC-9B3B-72B1CCFDD292}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Back" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Back is invoked" + }, + "details": { + "name": "Back" + }, + "params": [ + { + "typeid": "{82AC1A71-2EA7-5FBC-9B3B-72B1CCFDD292}", + "details": { + "name": "AZStd::vector" + } + } + ], + "results": [ + { + "typeid": "{3D80F623-C85C-4741-90D0-E4E66164E6BF}", + "details": { + "name": "Vector2" + } + } + ] + }, + { + "base": "pop_back", + "context": "{82AC1A71-2EA7-5FBC-9B3B-72B1CCFDD292}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke pop_back" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after pop_back is invoked" + }, + "details": { + "name": "pop_back" + }, + "params": [ + { + "typeid": "{82AC1A71-2EA7-5FBC-9B3B-72B1CCFDD292}", + "details": { + "name": "AZStd::vector" + } + } + ] + }, + { + "base": "size", + "context": "{82AC1A71-2EA7-5FBC-9B3B-72B1CCFDD292}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke size" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after size is invoked" + }, + "details": { + "name": "size" + }, + "params": [ + { + "typeid": "{82AC1A71-2EA7-5FBC-9B3B-72B1CCFDD292}", + "details": { + "name": "AZStd::vector" + } + } + ], + "results": [ + { + "typeid": "{72039442-EB38-4D42-A1AD-CB68F7E0EEF6}", + "details": { + "name": "int" + } + } + ] + }, + { + "base": "At", + "context": "{82AC1A71-2EA7-5FBC-9B3B-72B1CCFDD292}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke At" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after At is invoked" + }, + "details": { + "name": "At" + }, + "params": [ + { + "typeid": "{82AC1A71-2EA7-5FBC-9B3B-72B1CCFDD292}", + "details": { + "name": "AZStd::vector" + } + }, + { + "typeid": "{D6597933-47CD-4FC8-B911-63F3E2B0993A}", + "details": { + "name": "AZ::u64" + } + } + ], + "results": [ + { + "typeid": "{3D80F623-C85C-4741-90D0-E4E66164E6BF}", + "details": { + "name": "Vector2" + } + } + ] + }, + { + "base": "Empty", + "context": "{82AC1A71-2EA7-5FBC-9B3B-72B1CCFDD292}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Empty" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Empty is invoked" + }, + "details": { + "name": "Empty" + }, + "params": [ + { + "typeid": "{82AC1A71-2EA7-5FBC-9B3B-72B1CCFDD292}", + "details": { + "name": "AZStd::vector" + } + } + ], + "results": [ + { + "typeid": "{A0CA880C-AFE4-43CB-926C-59AC48496112}", + "details": { + "name": "bool" + } + } + ] + }, + { + "base": "Swap", + "context": "{82AC1A71-2EA7-5FBC-9B3B-72B1CCFDD292}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Swap" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Swap is invoked" + }, + "details": { + "name": "Swap" + }, + "params": [ + { + "typeid": "{82AC1A71-2EA7-5FBC-9B3B-72B1CCFDD292}", + "details": { + "name": "AZStd::vector" + } + }, + { + "typeid": "{82AC1A71-2EA7-5FBC-9B3B-72B1CCFDD292}", + "details": { + "name": "AZStd::vector" + } + } + ] + }, + { + "base": "push_back", + "context": "{82AC1A71-2EA7-5FBC-9B3B-72B1CCFDD292}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke push_back" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after push_back is invoked" + }, + "details": { + "name": "push_back" + }, + "params": [ + { + "typeid": "{82AC1A71-2EA7-5FBC-9B3B-72B1CCFDD292}", + "details": { + "name": "AZStd::vector" + } + }, + { + "typeid": "{3D80F623-C85C-4741-90D0-E4E66164E6BF}", + "details": { + "name": "Vector2" + } + } + ] + }, + { + "base": "PushBack_VM", + "context": "{82AC1A71-2EA7-5FBC-9B3B-72B1CCFDD292}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke PushBack_VM" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after PushBack_VM is invoked" + }, + "details": { + "name": "PushBack_VM" + }, + "params": [ + { + "typeid": "{82AC1A71-2EA7-5FBC-9B3B-72B1CCFDD292}", + "details": { + "name": "AZStd::vector" + } + }, + { + "typeid": "{3D80F623-C85C-4741-90D0-E4E66164E6BF}", + "details": { + "name": "Vector2" + } + } + ], + "results": [ + { + "typeid": "{82AC1A71-2EA7-5FBC-9B3B-72B1CCFDD292}", + "details": { + "name": "AZStd::vector" + } + } + ] + }, + { + "base": "AtUnchecked", + "context": "{82AC1A71-2EA7-5FBC-9B3B-72B1CCFDD292}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke AtUnchecked" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after AtUnchecked is invoked" + }, + "details": { + "name": "AtUnchecked" + }, + "params": [ + { + "typeid": "{82AC1A71-2EA7-5FBC-9B3B-72B1CCFDD292}", + "details": { + "name": "AZStd::vector" + } + }, + { + "typeid": "{D6597933-47CD-4FC8-B911-63F3E2B0993A}", + "details": { + "name": "AZ::u64" + } + } + ], + "results": [ + { + "typeid": "{3D80F623-C85C-4741-90D0-E4E66164E6BF}", + "details": { + "name": "Vector2" + } + } + ] + }, + { + "base": "clear", + "context": "{82AC1A71-2EA7-5FBC-9B3B-72B1CCFDD292}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke clear" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after clear is invoked" + }, + "details": { + "name": "clear" + }, + "params": [ + { + "typeid": "{82AC1A71-2EA7-5FBC-9B3B-72B1CCFDD292}", + "details": { + "name": "AZStd::vector" + } + } + ] + }, + { + "base": "NotEmpty", + "context": "{82AC1A71-2EA7-5FBC-9B3B-72B1CCFDD292}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke NotEmpty" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after NotEmpty is invoked" + }, + "details": { + "name": "NotEmpty" + }, + "params": [ + { + "typeid": "{82AC1A71-2EA7-5FBC-9B3B-72B1CCFDD292}", + "details": { + "name": "AZStd::vector" + } + } + ], + "results": [ + { + "typeid": "{A0CA880C-AFE4-43CB-926C-59AC48496112}", + "details": { + "name": "bool" + } + } + ] + }, + { + "base": "Erase_VM", + "context": "{82AC1A71-2EA7-5FBC-9B3B-72B1CCFDD292}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Erase_VM" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Erase_VM is invoked" + }, + "details": { + "name": "Erase_VM" + }, + "params": [ + { + "typeid": "{82AC1A71-2EA7-5FBC-9B3B-72B1CCFDD292}", + "details": { + "name": "AZStd::vector" + } + }, + { + "typeid": "{D6597933-47CD-4FC8-B911-63F3E2B0993A}", + "details": { + "name": "AZ::u64" + } + } + ], + "results": [ + { + "typeid": "{82AC1A71-2EA7-5FBC-9B3B-72B1CCFDD292}", + "details": { + "name": "AZStd::vector" + } + } + ] + }, + { + "base": "EraseCheck_VM", + "context": "{82AC1A71-2EA7-5FBC-9B3B-72B1CCFDD292}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke EraseCheck_VM" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after EraseCheck_VM is invoked" + }, + "details": { + "name": "EraseCheck_VM" + }, + "params": [ + { + "typeid": "{82AC1A71-2EA7-5FBC-9B3B-72B1CCFDD292}", + "details": { + "name": "AZStd::vector" + } + }, + { + "typeid": "{D6597933-47CD-4FC8-B911-63F3E2B0993A}", + "details": { + "name": "AZ::u64" + } + } + ], + "results": [ + { + "typeid": "{A0CA880C-AFE4-43CB-926C-59AC48496112}", + "details": { + "name": "bool" + } + } + ] + }, + { + "base": "Capacity", + "context": "{82AC1A71-2EA7-5FBC-9B3B-72B1CCFDD292}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Capacity" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Capacity is invoked" + }, + "details": { + "name": "Capacity" + }, + "params": [ + { + "typeid": "{82AC1A71-2EA7-5FBC-9B3B-72B1CCFDD292}", + "details": { + "name": "AZStd::vector" + } + } + ], + "results": [ + { + "typeid": "{D6597933-47CD-4FC8-B911-63F3E2B0993A}", + "details": { + "name": "AZ::u64" + } + } + ] + }, + { + "base": "Clear", + "context": "{82AC1A71-2EA7-5FBC-9B3B-72B1CCFDD292}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Clear" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Clear is invoked" + }, + "details": { + "name": "Clear" + }, + "params": [ + { + "typeid": "{82AC1A71-2EA7-5FBC-9B3B-72B1CCFDD292}", + "details": { + "name": "AZStd::vector" + } + } + ], + "results": [ + { + "typeid": "{82AC1A71-2EA7-5FBC-9B3B-72B1CCFDD292}", + "details": { + "name": "AZStd::vector" + } + } + ] + }, + { + "base": "AssignAt", + "context": "{82AC1A71-2EA7-5FBC-9B3B-72B1CCFDD292}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke AssignAt" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after AssignAt is invoked" + }, + "details": { + "name": "AssignAt" + }, + "params": [ + { + "typeid": "{82AC1A71-2EA7-5FBC-9B3B-72B1CCFDD292}", + "details": { + "name": "AZStd::vector" + } + }, + { + "typeid": "{D6597933-47CD-4FC8-B911-63F3E2B0993A}", + "details": { + "name": "AZ::u64" + } + }, + { + "typeid": "{3D80F623-C85C-4741-90D0-E4E66164E6BF}", + "details": { + "name": "Vector2" + } + } + ] + }, + { + "base": "GetSize", + "context": "{82AC1A71-2EA7-5FBC-9B3B-72B1CCFDD292}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke GetSize" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after GetSize is invoked" + }, + "details": { + "name": "GetSize" + }, + "params": [ + { + "typeid": "{82AC1A71-2EA7-5FBC-9B3B-72B1CCFDD292}", + "details": { + "name": "AZStd::vector" + } + } + ], + "results": [ + { + "typeid": "{72039442-EB38-4D42-A1AD-CB68F7E0EEF6}", + "details": { + "name": "int" + } + } + ] + }, + { + "base": "Insert", + "context": "{82AC1A71-2EA7-5FBC-9B3B-72B1CCFDD292}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Insert" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Insert is invoked" + }, + "details": { + "name": "Insert" + }, + "params": [ + { + "typeid": "{82AC1A71-2EA7-5FBC-9B3B-72B1CCFDD292}", + "details": { + "name": "AZStd::vector" + } + }, + { + "typeid": "{D6597933-47CD-4FC8-B911-63F3E2B0993A}", + "details": { + "name": "AZ::u64" + } + }, + { + "typeid": "{3D80F623-C85C-4741-90D0-E4E66164E6BF}", + "details": { + "name": "Vector2" + } + } + ], + "results": [ + { + "typeid": "{82AC1A71-2EA7-5FBC-9B3B-72B1CCFDD292}", + "details": { + "name": "AZStd::vector" + } + } + ] + }, + { + "base": "PushBack", + "context": "{82AC1A71-2EA7-5FBC-9B3B-72B1CCFDD292}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke PushBack" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after PushBack is invoked" + }, + "details": { + "name": "PushBack" + }, + "params": [ + { + "typeid": "{82AC1A71-2EA7-5FBC-9B3B-72B1CCFDD292}", + "details": { + "name": "AZStd::vector" + } + }, + { + "typeid": "{3D80F623-C85C-4741-90D0-E4E66164E6BF}", + "details": { + "name": "Vector2" + } + } + ] + }, + { + "base": "Reserve", + "context": "{82AC1A71-2EA7-5FBC-9B3B-72B1CCFDD292}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Reserve" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Reserve is invoked" + }, + "details": { + "name": "Reserve" + }, + "params": [ + { + "typeid": "{82AC1A71-2EA7-5FBC-9B3B-72B1CCFDD292}", + "details": { + "name": "AZStd::vector" + } + }, + { + "typeid": "{D6597933-47CD-4FC8-B911-63F3E2B0993A}", + "details": { + "name": "AZ::u64" + } + } + ] + }, + { + "base": "Iterate_VM", + "context": "{82AC1A71-2EA7-5FBC-9B3B-72B1CCFDD292}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Iterate_VM" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Iterate_VM is invoked" + }, + "details": { + "name": "Iterate_VM" + }, + "params": [ + { + "typeid": "{82AC1A71-2EA7-5FBC-9B3B-72B1CCFDD292}", + "details": { + "name": "AZStd::vector" + } + } + ], + "results": [ + { + "typeid": "{9C9B85F9-B5F7-5FC9-BA83-B357A225AF71}", + "details": { + "name": "Iterator_VM>" + } + } + ] + } + ] + }, + { + "base": "{0D5A4347-BCEC-58D6-A2D5-259F78FA0BF0}", + "context": "OnDemandReflected", + "variant": "", + "details": { + "name": "Outcome" + }, + "methods": [ + { + "base": "Failure", + "context": "{0D5A4347-BCEC-58D6-A2D5-259F78FA0BF0}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Failure" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Failure is invoked" + }, + "details": { + "name": "Failure" + }, + "params": [ + { + "typeid": "{03AAAB3F-5C47-5A66-9EBC-D5FA4DB353C9}", + "details": { + "name": "AZStd::string" + } + } + ], + "results": [ + { + "typeid": "{0D5A4347-BCEC-58D6-A2D5-259F78FA0BF0}", + "details": { + "name": "Outcome, allocator>>" + } + } + ] + }, + { + "base": "Success", + "context": "{0D5A4347-BCEC-58D6-A2D5-259F78FA0BF0}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Success" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Success is invoked" + }, + "details": { + "name": "Success" + }, + "results": [ + { + "typeid": "{0D5A4347-BCEC-58D6-A2D5-259F78FA0BF0}", + "details": { + "name": "Outcome, allocator>>" + } + } + ] + }, + { + "base": "GetError", + "context": "{0D5A4347-BCEC-58D6-A2D5-259F78FA0BF0}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke GetError" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after GetError is invoked" + }, + "details": { + "name": "GetError" + }, + "params": [ + { + "typeid": "{0D5A4347-BCEC-58D6-A2D5-259F78FA0BF0}", + "details": { + "name": "Outcome", + "category": "Map", + "tooltip": "A collection of Key/Value pairs, where each Key value must be unique." + }, + "methods": [ + { + "base": "contains", + "context": "{E77BCFE0-1C44-57B3-9651-CA647A4F4980}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke contains" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after contains is invoked" + }, + "details": { + "name": "contains" + }, + "params": [ + { + "typeid": "{E77BCFE0-1C44-57B3-9651-CA647A4F4980}", + "details": { + "name": "AZStd::unordered_map" + } + }, + { + "typeid": "{6383F1D3-BB27-4E6B-A49A-6409B2059EAA}", + "details": { + "name": "EntityId", + "tooltip": "Entity Unique Id" + } + } + ], + "results": [ + { + "typeid": "{A0CA880C-AFE4-43CB-926C-59AC48496112}", + "details": { + "name": "bool" + } + } + ] + }, + { + "base": "Insert", + "context": "{E77BCFE0-1C44-57B3-9651-CA647A4F4980}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Insert" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Insert is invoked" + }, + "details": { + "name": "Insert" + }, + "params": [ + { + "typeid": "{E77BCFE0-1C44-57B3-9651-CA647A4F4980}", + "details": { + "name": "AZStd::unordered_map" + } + }, + { + "typeid": "{6383F1D3-BB27-4E6B-A49A-6409B2059EAA}", + "details": { + "name": "EntityId", + "tooltip": "Entity Unique Id" + } + }, + { + "typeid": "{7894072A-9050-4F0F-901B-34B1A0D29417}", + "details": { + "name": "Color" + } + } + ], + "results": [ + { + "typeid": "{E77BCFE0-1C44-57B3-9651-CA647A4F4980}", + "details": { + "name": "AZStd::unordered_map" + } + } + ] + }, + { + "base": "Reserve", + "context": "{E77BCFE0-1C44-57B3-9651-CA647A4F4980}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Reserve" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Reserve is invoked" + }, + "details": { + "name": "Reserve" + }, + "params": [ + { + "typeid": "{E77BCFE0-1C44-57B3-9651-CA647A4F4980}", + "details": { + "name": "AZStd::unordered_map" + } + }, + { + "typeid": "{D6597933-47CD-4FC8-B911-63F3E2B0993A}", + "details": { + "name": "AZ::u64" + } + } + ] + }, + { + "base": "GetSize", + "context": "{E77BCFE0-1C44-57B3-9651-CA647A4F4980}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke GetSize" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after GetSize is invoked" + }, + "details": { + "name": "GetSize" + }, + "params": [ + { + "typeid": "{E77BCFE0-1C44-57B3-9651-CA647A4F4980}", + "details": { + "name": "AZStd::unordered_map" + } + } + ], + "results": [ + { + "typeid": "{72039442-EB38-4D42-A1AD-CB68F7E0EEF6}", + "details": { + "name": "int" + } + } + ] + }, + { + "base": "Iterate_VM", + "context": "{E77BCFE0-1C44-57B3-9651-CA647A4F4980}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Iterate_VM" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Iterate_VM is invoked" + }, + "details": { + "name": "Iterate_VM" + }, + "params": [ + { + "typeid": "{E77BCFE0-1C44-57B3-9651-CA647A4F4980}", + "details": { + "name": "AZStd::unordered_map" + } + } + ], + "results": [ + { + "typeid": "{CD60CE94-4843-57D1-B373-FCF94C6918A8}", + "details": { + "name": "Iterator_VM, AZStd::equal_to, allocator>>" + } + } + ] + }, + { + "base": "GetKeys", + "context": "{E77BCFE0-1C44-57B3-9651-CA647A4F4980}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke GetKeys" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after GetKeys is invoked" + }, + "details": { + "name": "GetKeys" + }, + "params": [ + { + "typeid": "{E77BCFE0-1C44-57B3-9651-CA647A4F4980}", + "details": { + "name": "AZStd::unordered_map" + } + } + ], + "results": [ + { + "typeid": "{4841CFF0-7A5C-519C-BD16-D3625E99605E}", + "details": { + "name": "AZStd::vector" + } + } + ] + }, + { + "base": "Size", + "context": "{E77BCFE0-1C44-57B3-9651-CA647A4F4980}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Size" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Size is invoked" + }, + "details": { + "name": "Size" + }, + "params": [ + { + "typeid": "{E77BCFE0-1C44-57B3-9651-CA647A4F4980}", + "details": { + "name": "AZStd::unordered_map" + } + } + ], + "results": [ + { + "typeid": "{72039442-EB38-4D42-A1AD-CB68F7E0EEF6}", + "details": { + "name": "int" + } + } + ] + }, + { + "base": "Erase", + "context": "{E77BCFE0-1C44-57B3-9651-CA647A4F4980}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Erase" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Erase is invoked" + }, + "details": { + "name": "Erase" + }, + "params": [ + { + "typeid": "{E77BCFE0-1C44-57B3-9651-CA647A4F4980}", + "details": { + "name": "AZStd::unordered_map" + } + }, + { + "typeid": "{6383F1D3-BB27-4E6B-A49A-6409B2059EAA}", + "details": { + "name": "EntityId", + "tooltip": "Entity Unique Id" + } + } + ], + "results": [ + { + "typeid": "{E77BCFE0-1C44-57B3-9651-CA647A4F4980}", + "details": { + "name": "AZStd::unordered_map" + } + } + ] + }, + { + "base": "EraseCheck_VM", + "context": "{E77BCFE0-1C44-57B3-9651-CA647A4F4980}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke EraseCheck_VM" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after EraseCheck_VM is invoked" + }, + "details": { + "name": "EraseCheck_VM" + }, + "params": [ + { + "typeid": "{E77BCFE0-1C44-57B3-9651-CA647A4F4980}", + "details": { + "name": "AZStd::unordered_map" + } + }, + { + "typeid": "{6383F1D3-BB27-4E6B-A49A-6409B2059EAA}", + "details": { + "name": "EntityId", + "tooltip": "Entity Unique Id" + } + } + ], + "results": [ + { + "typeid": "{A0CA880C-AFE4-43CB-926C-59AC48496112}", + "details": { + "name": "bool" + } + } + ] + }, + { + "base": "Clear", + "context": "{E77BCFE0-1C44-57B3-9651-CA647A4F4980}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Clear" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Clear is invoked" + }, + "details": { + "name": "Clear" + }, + "params": [ + { + "typeid": "{E77BCFE0-1C44-57B3-9651-CA647A4F4980}", + "details": { + "name": "AZStd::unordered_map" + } + } + ], + "results": [ + { + "typeid": "{E77BCFE0-1C44-57B3-9651-CA647A4F4980}", + "details": { + "name": "AZStd::unordered_map" + } + } + ] + }, + { + "base": "At", + "context": "{E77BCFE0-1C44-57B3-9651-CA647A4F4980}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke At" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after At is invoked" + }, + "details": { + "name": "At" + }, + "params": [ + { + "typeid": "{E77BCFE0-1C44-57B3-9651-CA647A4F4980}", + "details": { + "name": "AZStd::unordered_map" + } + }, + { + "typeid": "{6383F1D3-BB27-4E6B-A49A-6409B2059EAA}", + "details": { + "name": "EntityId", + "tooltip": "Entity Unique Id" + } + } + ], + "results": [ + { + "typeid": "{7894072A-9050-4F0F-901B-34B1A0D29417}", + "details": { + "name": "Color" + } + } + ] + }, + { + "base": "BucketCount", + "context": "{E77BCFE0-1C44-57B3-9651-CA647A4F4980}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke BucketCount" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after BucketCount is invoked" + }, + "details": { + "name": "BucketCount" + }, + "params": [ + { + "typeid": "{E77BCFE0-1C44-57B3-9651-CA647A4F4980}", + "details": { + "name": "AZStd::unordered_map" + } + } + ], + "results": [ + { + "typeid": "{D6597933-47CD-4FC8-B911-63F3E2B0993A}", + "details": { + "name": "AZ::u64" + } + } + ] + }, + { + "base": "Empty", + "context": "{E77BCFE0-1C44-57B3-9651-CA647A4F4980}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Empty" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Empty is invoked" + }, + "details": { + "name": "Empty" + }, + "params": [ + { + "typeid": "{E77BCFE0-1C44-57B3-9651-CA647A4F4980}", + "details": { + "name": "AZStd::unordered_map" + } + } + ], + "results": [ + { + "typeid": "{A0CA880C-AFE4-43CB-926C-59AC48496112}", + "details": { + "name": "bool" + } + } + ] + }, + { + "base": "Swap", + "context": "{E77BCFE0-1C44-57B3-9651-CA647A4F4980}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Swap" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Swap is invoked" + }, + "details": { + "name": "Swap" + }, + "params": [ + { + "typeid": "{E77BCFE0-1C44-57B3-9651-CA647A4F4980}", + "details": { + "name": "AZStd::unordered_map" + } + }, + { + "typeid": "{E77BCFE0-1C44-57B3-9651-CA647A4F4980}", + "details": { + "name": "AZStd::unordered_map" + } + } + ] + } + ] + }, + { + "base": "{36AD4D04-5A5D-52DC-A864-7027D563EFA2}", + "context": "OnDemandReflected", + "variant": "", + "details": { + "name": "Event" + }, + "methods": [ + { + "base": "HasHandlerConnected", + "context": "{36AD4D04-5A5D-52DC-A864-7027D563EFA2}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke HasHandlerConnected" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after HasHandlerConnected is invoked" + }, + "details": { + "name": "HasHandlerConnected" + }, + "params": [ + { + "typeid": "{36AD4D04-5A5D-52DC-A864-7027D563EFA2}", + "details": { + "name": "Event" + }, + "methods": [ + { + "base": "Failure", + "context": "{D1FEE25B-F252-5625-863C-1312E1F822A0}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Failure" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Failure is invoked" + }, + "details": { + "name": "Failure" + }, + "results": [ + { + "typeid": "{D1FEE25B-F252-5625-863C-1312E1F822A0}", + "details": { + "name": "AZ::Outcome" + } + } + ] + }, + { + "base": "Success", + "context": "{D1FEE25B-F252-5625-863C-1312E1F822A0}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Success" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Success is invoked" + }, + "details": { + "name": "Success" + }, + "params": [ + { + "typeid": "{8379EB7D-01FA-4538-B64B-A6543B4BE73D}", + "details": { + "name": "Vector3" + } + } + ], + "results": [ + { + "typeid": "{D1FEE25B-F252-5625-863C-1312E1F822A0}", + "details": { + "name": "AZ::Outcome" + } + } + ] + }, + { + "base": "GetValue", + "context": "{D1FEE25B-F252-5625-863C-1312E1F822A0}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke GetValue" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after GetValue is invoked" + }, + "details": { + "name": "GetValue" + }, + "params": [ + { + "typeid": "{D1FEE25B-F252-5625-863C-1312E1F822A0}", + "details": { + "name": "AZ::Outcome" + } + } + ], + "results": [ + { + "typeid": "{8379EB7D-01FA-4538-B64B-A6543B4BE73D}", + "details": { + "name": "Vector3" + } + } + ] + }, + { + "base": "IsSuccess", + "context": "{D1FEE25B-F252-5625-863C-1312E1F822A0}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke IsSuccess" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after IsSuccess is invoked" + }, + "details": { + "name": "IsSuccess" + }, + "params": [ + { + "typeid": "{D1FEE25B-F252-5625-863C-1312E1F822A0}", + "details": { + "name": "AZ::Outcome" + } + } + ], + "results": [ + { + "typeid": "{A0CA880C-AFE4-43CB-926C-59AC48496112}", + "details": { + "name": "bool" + } + } + ] + } + ] + }, + { + "base": "{33492660-D9A8-5E84-9CFB-03CBCD87919F}", + "context": "OnDemandReflected", + "variant": "", + "details": { + "name": "Array", + "category": "Array", + "tooltip": "A dynamically sized container of elements." + }, + "methods": [ + { + "base": "Size", + "context": "{33492660-D9A8-5E84-9CFB-03CBCD87919F}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Size" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Size is invoked" + }, + "details": { + "name": "Size" + }, + "params": [ + { + "typeid": "{33492660-D9A8-5E84-9CFB-03CBCD87919F}", + "details": { + "name": "AZStd::vector" + } + } + ], + "results": [ + { + "typeid": "{72039442-EB38-4D42-A1AD-CB68F7E0EEF6}", + "details": { + "name": "int" + } + } + ] + }, + { + "base": "Front", + "context": "{33492660-D9A8-5E84-9CFB-03CBCD87919F}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Front" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Front is invoked" + }, + "details": { + "name": "Front" + }, + "params": [ + { + "typeid": "{33492660-D9A8-5E84-9CFB-03CBCD87919F}", + "details": { + "name": "AZStd::vector" + } + } + ], + "results": [ + { + "typeid": "{02644F52-9483-47A8-9028-37671695C34E}", + "details": { + "name": "LightConfig" + } + } + ] + }, + { + "base": "HasKey", + "context": "{33492660-D9A8-5E84-9CFB-03CBCD87919F}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Has Key" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Has Key is invoked" + }, + "details": { + "name": "Has Key" + }, + "params": [ + { + "typeid": "{33492660-D9A8-5E84-9CFB-03CBCD87919F}", + "details": { + "name": "AZStd::vector" + } + }, + { + "typeid": "{D6597933-47CD-4FC8-B911-63F3E2B0993A}", + "details": { + "name": "AZ::u64" + } + } + ], + "results": [ + { + "typeid": "{A0CA880C-AFE4-43CB-926C-59AC48496112}", + "details": { + "name": "bool" + } + } + ] + }, + { + "base": "Resize", + "context": "{33492660-D9A8-5E84-9CFB-03CBCD87919F}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Resize" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Resize is invoked" + }, + "details": { + "name": "Resize" + }, + "params": [ + { + "typeid": "{33492660-D9A8-5E84-9CFB-03CBCD87919F}", + "details": { + "name": "AZStd::vector" + } + }, + { + "typeid": "{D6597933-47CD-4FC8-B911-63F3E2B0993A}", + "details": { + "name": "AZ::u64" + } + } + ] + }, + { + "base": "at", + "context": "{33492660-D9A8-5E84-9CFB-03CBCD87919F}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke at" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after at is invoked" + }, + "details": { + "name": "at" + }, + "params": [ + { + "typeid": "{33492660-D9A8-5E84-9CFB-03CBCD87919F}", + "details": { + "name": "AZStd::vector" + } + }, + { + "typeid": "{D6597933-47CD-4FC8-B911-63F3E2B0993A}", + "details": { + "name": "AZ::u64" + } + } + ], + "results": [ + { + "typeid": "{02644F52-9483-47A8-9028-37671695C34E}", + "details": { + "name": "LightConfig" + } + } + ] + }, + { + "base": "Back", + "context": "{33492660-D9A8-5E84-9CFB-03CBCD87919F}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Back" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Back is invoked" + }, + "details": { + "name": "Back" + }, + "params": [ + { + "typeid": "{33492660-D9A8-5E84-9CFB-03CBCD87919F}", + "details": { + "name": "AZStd::vector" + } + } + ], + "results": [ + { + "typeid": "{02644F52-9483-47A8-9028-37671695C34E}", + "details": { + "name": "LightConfig" + } + } + ] + }, + { + "base": "pop_back", + "context": "{33492660-D9A8-5E84-9CFB-03CBCD87919F}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke pop_back" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after pop_back is invoked" + }, + "details": { + "name": "pop_back" + }, + "params": [ + { + "typeid": "{33492660-D9A8-5E84-9CFB-03CBCD87919F}", + "details": { + "name": "AZStd::vector" + } + } + ] + }, + { + "base": "size", + "context": "{33492660-D9A8-5E84-9CFB-03CBCD87919F}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke size" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after size is invoked" + }, + "details": { + "name": "size" + }, + "params": [ + { + "typeid": "{33492660-D9A8-5E84-9CFB-03CBCD87919F}", + "details": { + "name": "AZStd::vector" + } + } + ], + "results": [ + { + "typeid": "{72039442-EB38-4D42-A1AD-CB68F7E0EEF6}", + "details": { + "name": "int" + } + } + ] + }, + { + "base": "At", + "context": "{33492660-D9A8-5E84-9CFB-03CBCD87919F}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke At" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after At is invoked" + }, + "details": { + "name": "At" + }, + "params": [ + { + "typeid": "{33492660-D9A8-5E84-9CFB-03CBCD87919F}", + "details": { + "name": "AZStd::vector" + } + }, + { + "typeid": "{D6597933-47CD-4FC8-B911-63F3E2B0993A}", + "details": { + "name": "AZ::u64" + } + } + ], + "results": [ + { + "typeid": "{02644F52-9483-47A8-9028-37671695C34E}", + "details": { + "name": "LightConfig" + } + } + ] + }, + { + "base": "Empty", + "context": "{33492660-D9A8-5E84-9CFB-03CBCD87919F}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Empty" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Empty is invoked" + }, + "details": { + "name": "Empty" + }, + "params": [ + { + "typeid": "{33492660-D9A8-5E84-9CFB-03CBCD87919F}", + "details": { + "name": "AZStd::vector" + } + } + ], + "results": [ + { + "typeid": "{A0CA880C-AFE4-43CB-926C-59AC48496112}", + "details": { + "name": "bool" + } + } + ] + }, + { + "base": "Swap", + "context": "{33492660-D9A8-5E84-9CFB-03CBCD87919F}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Swap" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Swap is invoked" + }, + "details": { + "name": "Swap" + }, + "params": [ + { + "typeid": "{33492660-D9A8-5E84-9CFB-03CBCD87919F}", + "details": { + "name": "AZStd::vector" + } + }, + { + "typeid": "{33492660-D9A8-5E84-9CFB-03CBCD87919F}", + "details": { + "name": "AZStd::vector" + } + } + ] + }, + { + "base": "push_back", + "context": "{33492660-D9A8-5E84-9CFB-03CBCD87919F}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke push_back" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after push_back is invoked" + }, + "details": { + "name": "push_back" + }, + "params": [ + { + "typeid": "{33492660-D9A8-5E84-9CFB-03CBCD87919F}", + "details": { + "name": "AZStd::vector" + } + }, + { + "typeid": "{02644F52-9483-47A8-9028-37671695C34E}", + "details": { + "name": "LightConfig" + } + } + ] + }, + { + "base": "PushBack_VM", + "context": "{33492660-D9A8-5E84-9CFB-03CBCD87919F}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke PushBack_VM" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after PushBack_VM is invoked" + }, + "details": { + "name": "PushBack_VM" + }, + "params": [ + { + "typeid": "{33492660-D9A8-5E84-9CFB-03CBCD87919F}", + "details": { + "name": "AZStd::vector" + } + }, + { + "typeid": "{02644F52-9483-47A8-9028-37671695C34E}", + "details": { + "name": "LightConfig" + } + } + ], + "results": [ + { + "typeid": "{33492660-D9A8-5E84-9CFB-03CBCD87919F}", + "details": { + "name": "AZStd::vector" + } + } + ] + }, + { + "base": "AtUnchecked", + "context": "{33492660-D9A8-5E84-9CFB-03CBCD87919F}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke AtUnchecked" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after AtUnchecked is invoked" + }, + "details": { + "name": "AtUnchecked" + }, + "params": [ + { + "typeid": "{33492660-D9A8-5E84-9CFB-03CBCD87919F}", + "details": { + "name": "AZStd::vector" + } + }, + { + "typeid": "{D6597933-47CD-4FC8-B911-63F3E2B0993A}", + "details": { + "name": "AZ::u64" + } + } + ], + "results": [ + { + "typeid": "{02644F52-9483-47A8-9028-37671695C34E}", + "details": { + "name": "LightConfig" + } + } + ] + }, + { + "base": "clear", + "context": "{33492660-D9A8-5E84-9CFB-03CBCD87919F}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke clear" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after clear is invoked" + }, + "details": { + "name": "clear" + }, + "params": [ + { + "typeid": "{33492660-D9A8-5E84-9CFB-03CBCD87919F}", + "details": { + "name": "AZStd::vector" + } + } + ] + }, + { + "base": "NotEmpty", + "context": "{33492660-D9A8-5E84-9CFB-03CBCD87919F}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke NotEmpty" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after NotEmpty is invoked" + }, + "details": { + "name": "NotEmpty" + }, + "params": [ + { + "typeid": "{33492660-D9A8-5E84-9CFB-03CBCD87919F}", + "details": { + "name": "AZStd::vector" + } + } + ], + "results": [ + { + "typeid": "{A0CA880C-AFE4-43CB-926C-59AC48496112}", + "details": { + "name": "bool" + } + } + ] + }, + { + "base": "Erase_VM", + "context": "{33492660-D9A8-5E84-9CFB-03CBCD87919F}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Erase_VM" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Erase_VM is invoked" + }, + "details": { + "name": "Erase_VM" + }, + "params": [ + { + "typeid": "{33492660-D9A8-5E84-9CFB-03CBCD87919F}", + "details": { + "name": "AZStd::vector" + } + }, + { + "typeid": "{D6597933-47CD-4FC8-B911-63F3E2B0993A}", + "details": { + "name": "AZ::u64" + } + } + ], + "results": [ + { + "typeid": "{33492660-D9A8-5E84-9CFB-03CBCD87919F}", + "details": { + "name": "AZStd::vector" + } + } + ] + }, + { + "base": "EraseCheck_VM", + "context": "{33492660-D9A8-5E84-9CFB-03CBCD87919F}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke EraseCheck_VM" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after EraseCheck_VM is invoked" + }, + "details": { + "name": "EraseCheck_VM" + }, + "params": [ + { + "typeid": "{33492660-D9A8-5E84-9CFB-03CBCD87919F}", + "details": { + "name": "AZStd::vector" + } + }, + { + "typeid": "{D6597933-47CD-4FC8-B911-63F3E2B0993A}", + "details": { + "name": "AZ::u64" + } + } + ], + "results": [ + { + "typeid": "{A0CA880C-AFE4-43CB-926C-59AC48496112}", + "details": { + "name": "bool" + } + } + ] + }, + { + "base": "Capacity", + "context": "{33492660-D9A8-5E84-9CFB-03CBCD87919F}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Capacity" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Capacity is invoked" + }, + "details": { + "name": "Capacity" + }, + "params": [ + { + "typeid": "{33492660-D9A8-5E84-9CFB-03CBCD87919F}", + "details": { + "name": "AZStd::vector" + } + } + ], + "results": [ + { + "typeid": "{D6597933-47CD-4FC8-B911-63F3E2B0993A}", + "details": { + "name": "AZ::u64" + } + } + ] + }, + { + "base": "Clear", + "context": "{33492660-D9A8-5E84-9CFB-03CBCD87919F}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Clear" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Clear is invoked" + }, + "details": { + "name": "Clear" + }, + "params": [ + { + "typeid": "{33492660-D9A8-5E84-9CFB-03CBCD87919F}", + "details": { + "name": "AZStd::vector" + } + } + ], + "results": [ + { + "typeid": "{33492660-D9A8-5E84-9CFB-03CBCD87919F}", + "details": { + "name": "AZStd::vector" + } + } + ] + }, + { + "base": "AssignAt", + "context": "{33492660-D9A8-5E84-9CFB-03CBCD87919F}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke AssignAt" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after AssignAt is invoked" + }, + "details": { + "name": "AssignAt" + }, + "params": [ + { + "typeid": "{33492660-D9A8-5E84-9CFB-03CBCD87919F}", + "details": { + "name": "AZStd::vector" + } + }, + { + "typeid": "{D6597933-47CD-4FC8-B911-63F3E2B0993A}", + "details": { + "name": "AZ::u64" + } + }, + { + "typeid": "{02644F52-9483-47A8-9028-37671695C34E}", + "details": { + "name": "LightConfig" + } + } + ] + }, + { + "base": "GetSize", + "context": "{33492660-D9A8-5E84-9CFB-03CBCD87919F}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke GetSize" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after GetSize is invoked" + }, + "details": { + "name": "GetSize" + }, + "params": [ + { + "typeid": "{33492660-D9A8-5E84-9CFB-03CBCD87919F}", + "details": { + "name": "AZStd::vector" + } + } + ], + "results": [ + { + "typeid": "{72039442-EB38-4D42-A1AD-CB68F7E0EEF6}", + "details": { + "name": "int" + } + } + ] + }, + { + "base": "Insert", + "context": "{33492660-D9A8-5E84-9CFB-03CBCD87919F}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Insert" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Insert is invoked" + }, + "details": { + "name": "Insert" + }, + "params": [ + { + "typeid": "{33492660-D9A8-5E84-9CFB-03CBCD87919F}", + "details": { + "name": "AZStd::vector" + } + }, + { + "typeid": "{D6597933-47CD-4FC8-B911-63F3E2B0993A}", + "details": { + "name": "AZ::u64" + } + }, + { + "typeid": "{02644F52-9483-47A8-9028-37671695C34E}", + "details": { + "name": "LightConfig" + } + } + ], + "results": [ + { + "typeid": "{33492660-D9A8-5E84-9CFB-03CBCD87919F}", + "details": { + "name": "AZStd::vector" + } + } + ] + }, + { + "base": "PushBack", + "context": "{33492660-D9A8-5E84-9CFB-03CBCD87919F}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke PushBack" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after PushBack is invoked" + }, + "details": { + "name": "PushBack" + }, + "params": [ + { + "typeid": "{33492660-D9A8-5E84-9CFB-03CBCD87919F}", + "details": { + "name": "AZStd::vector" + } + }, + { + "typeid": "{02644F52-9483-47A8-9028-37671695C34E}", + "details": { + "name": "LightConfig" + } + } + ] + }, + { + "base": "Reserve", + "context": "{33492660-D9A8-5E84-9CFB-03CBCD87919F}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Reserve" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Reserve is invoked" + }, + "details": { + "name": "Reserve" + }, + "params": [ + { + "typeid": "{33492660-D9A8-5E84-9CFB-03CBCD87919F}", + "details": { + "name": "AZStd::vector" + } + }, + { + "typeid": "{D6597933-47CD-4FC8-B911-63F3E2B0993A}", + "details": { + "name": "AZ::u64" + } + } + ] + }, + { + "base": "Iterate_VM", + "context": "{33492660-D9A8-5E84-9CFB-03CBCD87919F}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Iterate_VM" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Iterate_VM is invoked" + }, + "details": { + "name": "Iterate_VM" + }, + "params": [ + { + "typeid": "{33492660-D9A8-5E84-9CFB-03CBCD87919F}", + "details": { + "name": "AZStd::vector" + } + } + ], + "results": [ + { + "typeid": "{25A6BFD4-18AE-53F0-A8E5-0BC534A956DF}", + "details": { + "name": "Iterator_VM>" + } + } + ] + } + ] + }, + { + "base": "{6E6962E1-04C9-56F9-89C4-361031CC1384}", + "context": "OnDemandReflected", + "variant": "", + "details": { + "name": "Map", + "category": "Map", + "tooltip": "A collection of Key/Value pairs, where each Key value must be unique." + }, + "methods": [ + { + "base": "contains", + "context": "{6E6962E1-04C9-56F9-89C4-361031CC1384}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke contains" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after contains is invoked" + }, + "details": { + "name": "contains" + }, + "params": [ + { + "typeid": "{6E6962E1-04C9-56F9-89C4-361031CC1384}", + "details": { + "name": "AZStd::unordered_map" + } + }, + { + "typeid": "{3D2B920C-9EFD-40D5-AAE0-DF131C3D4931}", + "details": { + "name": "Name" + } + } + ], + "results": [ + { + "typeid": "{A0CA880C-AFE4-43CB-926C-59AC48496112}", + "details": { + "name": "bool" + } + } + ] + }, + { + "base": "Insert", + "context": "{6E6962E1-04C9-56F9-89C4-361031CC1384}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Insert" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Insert is invoked" + }, + "details": { + "name": "Insert" + }, + "params": [ + { + "typeid": "{6E6962E1-04C9-56F9-89C4-361031CC1384}", + "details": { + "name": "AZStd::unordered_map" + } + }, + { + "typeid": "{3D2B920C-9EFD-40D5-AAE0-DF131C3D4931}", + "details": { + "name": "Name" + } + }, + { + "typeid": "{03924488-C7F4-4D6D-948B-ABC2D1AE2FD3}", + "details": { + "name": "any" + } + } + ], + "results": [ + { + "typeid": "{6E6962E1-04C9-56F9-89C4-361031CC1384}", + "details": { + "name": "AZStd::unordered_map" + } + } + ] + }, + { + "base": "Reserve", + "context": "{6E6962E1-04C9-56F9-89C4-361031CC1384}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Reserve" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Reserve is invoked" + }, + "details": { + "name": "Reserve" + }, + "params": [ + { + "typeid": "{6E6962E1-04C9-56F9-89C4-361031CC1384}", + "details": { + "name": "AZStd::unordered_map" + } + }, + { + "typeid": "{D6597933-47CD-4FC8-B911-63F3E2B0993A}", + "details": { + "name": "AZ::u64" + } + } + ] + }, + { + "base": "GetSize", + "context": "{6E6962E1-04C9-56F9-89C4-361031CC1384}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke GetSize" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after GetSize is invoked" + }, + "details": { + "name": "GetSize" + }, + "params": [ + { + "typeid": "{6E6962E1-04C9-56F9-89C4-361031CC1384}", + "details": { + "name": "AZStd::unordered_map" + } + } + ], + "results": [ + { + "typeid": "{72039442-EB38-4D42-A1AD-CB68F7E0EEF6}", + "details": { + "name": "int" + } + } + ] + }, + { + "base": "Iterate_VM", + "context": "{6E6962E1-04C9-56F9-89C4-361031CC1384}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Iterate_VM" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Iterate_VM is invoked" + }, + "details": { + "name": "Iterate_VM" + }, + "params": [ + { + "typeid": "{6E6962E1-04C9-56F9-89C4-361031CC1384}", + "details": { + "name": "AZStd::unordered_map" + } + } + ], + "results": [ + { + "typeid": "{D4C51D6C-76EE-5396-AA8F-297470208C1B}", + "details": { + "name": "Iterator_VM, AZStd::equal_to, allocator>>" + } + } + ] + }, + { + "base": "GetKeys", + "context": "{6E6962E1-04C9-56F9-89C4-361031CC1384}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke GetKeys" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after GetKeys is invoked" + }, + "details": { + "name": "GetKeys" + }, + "params": [ + { + "typeid": "{6E6962E1-04C9-56F9-89C4-361031CC1384}", + "details": { + "name": "AZStd::unordered_map" + } + } + ], + "results": [ + { + "typeid": "{E7E44B3A-15C3-5420-A930-EB9ED7F0D7D9}", + "details": { + "name": "AZStd::vector" + } + } + ] + }, + { + "base": "Size", + "context": "{6E6962E1-04C9-56F9-89C4-361031CC1384}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Size" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Size is invoked" + }, + "details": { + "name": "Size" + }, + "params": [ + { + "typeid": "{6E6962E1-04C9-56F9-89C4-361031CC1384}", + "details": { + "name": "AZStd::unordered_map" + } + } + ], + "results": [ + { + "typeid": "{72039442-EB38-4D42-A1AD-CB68F7E0EEF6}", + "details": { + "name": "int" + } + } + ] + }, + { + "base": "Erase", + "context": "{6E6962E1-04C9-56F9-89C4-361031CC1384}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Erase" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Erase is invoked" + }, + "details": { + "name": "Erase" + }, + "params": [ + { + "typeid": "{6E6962E1-04C9-56F9-89C4-361031CC1384}", + "details": { + "name": "AZStd::unordered_map" + } + }, + { + "typeid": "{3D2B920C-9EFD-40D5-AAE0-DF131C3D4931}", + "details": { + "name": "Name" + } + } + ], + "results": [ + { + "typeid": "{6E6962E1-04C9-56F9-89C4-361031CC1384}", + "details": { + "name": "AZStd::unordered_map" + } + } + ] + }, + { + "base": "EraseCheck_VM", + "context": "{6E6962E1-04C9-56F9-89C4-361031CC1384}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke EraseCheck_VM" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after EraseCheck_VM is invoked" + }, + "details": { + "name": "EraseCheck_VM" + }, + "params": [ + { + "typeid": "{6E6962E1-04C9-56F9-89C4-361031CC1384}", + "details": { + "name": "AZStd::unordered_map" + } + }, + { + "typeid": "{3D2B920C-9EFD-40D5-AAE0-DF131C3D4931}", + "details": { + "name": "Name" + } + } + ], + "results": [ + { + "typeid": "{A0CA880C-AFE4-43CB-926C-59AC48496112}", + "details": { + "name": "bool" + } + } + ] + }, + { + "base": "Clear", + "context": "{6E6962E1-04C9-56F9-89C4-361031CC1384}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Clear" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Clear is invoked" + }, + "details": { + "name": "Clear" + }, + "params": [ + { + "typeid": "{6E6962E1-04C9-56F9-89C4-361031CC1384}", + "details": { + "name": "AZStd::unordered_map" + } + } + ], + "results": [ + { + "typeid": "{6E6962E1-04C9-56F9-89C4-361031CC1384}", + "details": { + "name": "AZStd::unordered_map" + } + } + ] + }, + { + "base": "At", + "context": "{6E6962E1-04C9-56F9-89C4-361031CC1384}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke At" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after At is invoked" + }, + "details": { + "name": "At" + }, + "params": [ + { + "typeid": "{6E6962E1-04C9-56F9-89C4-361031CC1384}", + "details": { + "name": "AZStd::unordered_map" + } + }, + { + "typeid": "{3D2B920C-9EFD-40D5-AAE0-DF131C3D4931}", + "details": { + "name": "Name" + } + } + ], + "results": [ + { + "typeid": "{03924488-C7F4-4D6D-948B-ABC2D1AE2FD3}", + "details": { + "name": "any" + } + } + ] + }, + { + "base": "BucketCount", + "context": "{6E6962E1-04C9-56F9-89C4-361031CC1384}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke BucketCount" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after BucketCount is invoked" + }, + "details": { + "name": "BucketCount" + }, + "params": [ + { + "typeid": "{6E6962E1-04C9-56F9-89C4-361031CC1384}", + "details": { + "name": "AZStd::unordered_map" + } + } + ], + "results": [ + { + "typeid": "{D6597933-47CD-4FC8-B911-63F3E2B0993A}", + "details": { + "name": "AZ::u64" + } + } + ] + }, + { + "base": "Empty", + "context": "{6E6962E1-04C9-56F9-89C4-361031CC1384}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Empty" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Empty is invoked" + }, + "details": { + "name": "Empty" + }, + "params": [ + { + "typeid": "{6E6962E1-04C9-56F9-89C4-361031CC1384}", + "details": { + "name": "AZStd::unordered_map" + } + } + ], + "results": [ + { + "typeid": "{A0CA880C-AFE4-43CB-926C-59AC48496112}", + "details": { + "name": "bool" + } + } + ] + }, + { + "base": "Swap", + "context": "{6E6962E1-04C9-56F9-89C4-361031CC1384}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Swap" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Swap is invoked" + }, + "details": { + "name": "Swap" + }, + "params": [ + { + "typeid": "{6E6962E1-04C9-56F9-89C4-361031CC1384}", + "details": { + "name": "AZStd::unordered_map" + } + }, + { + "typeid": "{6E6962E1-04C9-56F9-89C4-361031CC1384}", + "details": { + "name": "AZStd::unordered_map" + } + } + ] + } + ] + }, + { + "base": "{8A408689-0904-5A87-B6C4-FAB519089D8B}", + "context": "OnDemandReflected", + "variant": "", + "details": { + "name": "Set", + "category": "Set", + "tooltip": "A dynamically sized container, where each element is unique." + }, + "methods": [ + { + "base": "Size", + "context": "{8A408689-0904-5A87-B6C4-FAB519089D8B}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Size" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Size is invoked" + }, + "details": { + "name": "Size" + }, + "params": [ + { + "typeid": "{8A408689-0904-5A87-B6C4-FAB519089D8B}", + "details": { + "name": "AZStd::unordered_set" + } + } + ], + "results": [ + { + "typeid": "{72039442-EB38-4D42-A1AD-CB68F7E0EEF6}", + "details": { + "name": "int" + } + } + ] + }, + { + "base": "GetKeys", + "context": "{8A408689-0904-5A87-B6C4-FAB519089D8B}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke GetKeys" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after GetKeys is invoked" + }, + "details": { + "name": "GetKeys" + }, + "params": [ + { + "typeid": "{8A408689-0904-5A87-B6C4-FAB519089D8B}", + "details": { + "name": "AZStd::unordered_set" + } + } + ], + "results": [ + { + "typeid": "{F31F64EA-E384-5536-ACD6-8F01849730FC}", + "details": { + "name": "AZStd::vector" + } + } + ] + }, + { + "base": "contains", + "context": "{8A408689-0904-5A87-B6C4-FAB519089D8B}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke contains" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after contains is invoked" + }, + "details": { + "name": "contains" + }, + "params": [ + { + "typeid": "{8A408689-0904-5A87-B6C4-FAB519089D8B}", + "details": { + "name": "AZStd::unordered_set" + } + }, + { + "typeid": "{110C4B14-11A8-4E9D-8638-5051013A56AC}", + "details": { + "name": "double" + } + } + ], + "results": [ + { + "typeid": "{A0CA880C-AFE4-43CB-926C-59AC48496112}", + "details": { + "name": "bool" + } + } + ] + }, + { + "base": "Insert", + "context": "{8A408689-0904-5A87-B6C4-FAB519089D8B}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Insert" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Insert is invoked" + }, + "details": { + "name": "Insert" + }, + "params": [ + { + "typeid": "{8A408689-0904-5A87-B6C4-FAB519089D8B}", + "details": { + "name": "AZStd::unordered_set" + } + }, + { + "typeid": "{110C4B14-11A8-4E9D-8638-5051013A56AC}", + "details": { + "name": "double" + } + } + ], + "results": [ + { + "typeid": "{8A408689-0904-5A87-B6C4-FAB519089D8B}", + "details": { + "name": "AZStd::unordered_set" + } + } + ] + }, + { + "base": "GetSize", + "context": "{8A408689-0904-5A87-B6C4-FAB519089D8B}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke GetSize" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after GetSize is invoked" + }, + "details": { + "name": "GetSize" + }, + "params": [ + { + "typeid": "{8A408689-0904-5A87-B6C4-FAB519089D8B}", + "details": { + "name": "AZStd::unordered_set" + } + } + ], + "results": [ + { + "typeid": "{72039442-EB38-4D42-A1AD-CB68F7E0EEF6}", + "details": { + "name": "int" + } + } + ] + }, + { + "base": "Reserve", + "context": "{8A408689-0904-5A87-B6C4-FAB519089D8B}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Reserve" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Reserve is invoked" + }, + "details": { + "name": "Reserve" + }, + "params": [ + { + "typeid": "{8A408689-0904-5A87-B6C4-FAB519089D8B}", + "details": { + "name": "AZStd::unordered_set" + } + }, + { + "typeid": "{D6597933-47CD-4FC8-B911-63F3E2B0993A}", + "details": { + "name": "AZ::u64" + } + } + ] + }, + { + "base": "Iterate_VM", + "context": "{8A408689-0904-5A87-B6C4-FAB519089D8B}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Iterate_VM" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Iterate_VM is invoked" + }, + "details": { + "name": "Iterate_VM" + }, + "params": [ + { + "typeid": "{8A408689-0904-5A87-B6C4-FAB519089D8B}", + "details": { + "name": "AZStd::unordered_set" + } + } + ], + "results": [ + { + "typeid": "{C8C77E71-5B11-559E-BAC5-06C297CD422B}", + "details": { + "name": "Iterator_VM, AZStd::equal_to, allocator>>" + } + } + ] + }, + { + "base": "EraseCheck_VM", + "context": "{8A408689-0904-5A87-B6C4-FAB519089D8B}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke EraseCheck_VM" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after EraseCheck_VM is invoked" + }, + "details": { + "name": "EraseCheck_VM" + }, + "params": [ + { + "typeid": "{8A408689-0904-5A87-B6C4-FAB519089D8B}", + "details": { + "name": "AZStd::unordered_set" + } + }, + { + "typeid": "{110C4B14-11A8-4E9D-8638-5051013A56AC}", + "details": { + "name": "double" + } + } + ], + "results": [ + { + "typeid": "{A0CA880C-AFE4-43CB-926C-59AC48496112}", + "details": { + "name": "bool" + } + } + ] + }, + { + "base": "Erase", + "context": "{8A408689-0904-5A87-B6C4-FAB519089D8B}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Erase" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Erase is invoked" + }, + "details": { + "name": "Erase" + }, + "params": [ + { + "typeid": "{8A408689-0904-5A87-B6C4-FAB519089D8B}", + "details": { + "name": "AZStd::unordered_set" + } + }, + { + "typeid": "{110C4B14-11A8-4E9D-8638-5051013A56AC}", + "details": { + "name": "double" + } + } + ], + "results": [ + { + "typeid": "{8A408689-0904-5A87-B6C4-FAB519089D8B}", + "details": { + "name": "AZStd::unordered_set" + } + } + ] + }, + { + "base": "Clear", + "context": "{8A408689-0904-5A87-B6C4-FAB519089D8B}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Clear" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Clear is invoked" + }, + "details": { + "name": "Clear" + }, + "params": [ + { + "typeid": "{8A408689-0904-5A87-B6C4-FAB519089D8B}", + "details": { + "name": "AZStd::unordered_set" + } + } + ], + "results": [ + { + "typeid": "{8A408689-0904-5A87-B6C4-FAB519089D8B}", + "details": { + "name": "AZStd::unordered_set" + } + } + ] + }, + { + "base": "BucketCount", + "context": "{8A408689-0904-5A87-B6C4-FAB519089D8B}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke BucketCount" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after BucketCount is invoked" + }, + "details": { + "name": "BucketCount" + }, + "params": [ + { + "typeid": "{8A408689-0904-5A87-B6C4-FAB519089D8B}", + "details": { + "name": "AZStd::unordered_set" + } + } + ], + "results": [ + { + "typeid": "{D6597933-47CD-4FC8-B911-63F3E2B0993A}", + "details": { + "name": "AZ::u64" + } + } + ] + }, + { + "base": "Empty", + "context": "{8A408689-0904-5A87-B6C4-FAB519089D8B}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Empty" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Empty is invoked" + }, + "details": { + "name": "Empty" + }, + "params": [ + { + "typeid": "{8A408689-0904-5A87-B6C4-FAB519089D8B}", + "details": { + "name": "AZStd::unordered_set" + } + } + ], + "results": [ + { + "typeid": "{A0CA880C-AFE4-43CB-926C-59AC48496112}", + "details": { + "name": "bool" + } + } + ] + }, + { + "base": "Swap", + "context": "{8A408689-0904-5A87-B6C4-FAB519089D8B}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Swap" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Swap is invoked" + }, + "details": { + "name": "Swap" + }, + "params": [ + { + "typeid": "{8A408689-0904-5A87-B6C4-FAB519089D8B}", + "details": { + "name": "AZStd::unordered_set" + } + }, + { + "typeid": "{8A408689-0904-5A87-B6C4-FAB519089D8B}", + "details": { + "name": "AZStd::unordered_set" + } + } + ] + } + ] + }, + { + "base": "{C0311D23-97F1-556C-B6A4-ECD726543686}", + "context": "OnDemandReflected", + "variant": "", + "details": { + "name": "Intrusive", + "category": "Intrusive", + "tooltip": "A smart pointer which manages the life cycle of an object, and guarantees a single point of ownership for the specified memory." + }, + "methods": [ + { + "base": "get", + "context": "{C0311D23-97F1-556C-B6A4-ECD726543686}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke get" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after get is invoked" + }, + "details": { + "name": "get" + }, + "params": [ + { + "typeid": "{C0311D23-97F1-556C-B6A4-ECD726543686}", + "details": { + "name": "AZStd::intrusive_ptr" + } + } + ], + "results": [ + { + "typeid": "{4E4B1092-1BEE-4DC4-BE4B-8FBC83B0F48C}", + "details": { + "name": "Image*" + } + } + ] + } + ] + }, + { + "base": "{41599134-C1BF-51A5-B66A-7351FFD5EF42}", + "context": "OnDemandReflected", + "variant": "", + "details": { + "name": "Map", + "category": "Map", + "tooltip": "A collection of Key/Value pairs, where each Key value must be unique." + }, + "methods": [ + { + "base": "contains", + "context": "{41599134-C1BF-51A5-B66A-7351FFD5EF42}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke contains" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after contains is invoked" + }, + "details": { + "name": "contains" + }, + "params": [ + { + "typeid": "{41599134-C1BF-51A5-B66A-7351FFD5EF42}", + "details": { + "name": "AZStd::unordered_map" + } + }, + { + "typeid": "{9F4E062E-06A0-46D4-85DF-E0DA96467D3A}", + "details": { + "name": "Crc32" + } + } + ], + "results": [ + { + "typeid": "{A0CA880C-AFE4-43CB-926C-59AC48496112}", + "details": { + "name": "bool" + } + } + ] + }, + { + "base": "Insert", + "context": "{41599134-C1BF-51A5-B66A-7351FFD5EF42}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Insert" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Insert is invoked" + }, + "details": { + "name": "Insert" + }, + "params": [ + { + "typeid": "{41599134-C1BF-51A5-B66A-7351FFD5EF42}", + "details": { + "name": "AZStd::unordered_map" + } + }, + { + "typeid": "{9F4E062E-06A0-46D4-85DF-E0DA96467D3A}", + "details": { + "name": "Crc32" + } + }, + { + "typeid": "{8379EB7D-01FA-4538-B64B-A6543B4BE73D}", + "details": { + "name": "Vector3" + } + } + ], + "results": [ + { + "typeid": "{41599134-C1BF-51A5-B66A-7351FFD5EF42}", + "details": { + "name": "AZStd::unordered_map" + } + } + ] + }, + { + "base": "Reserve", + "context": "{41599134-C1BF-51A5-B66A-7351FFD5EF42}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Reserve" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Reserve is invoked" + }, + "details": { + "name": "Reserve" + }, + "params": [ + { + "typeid": "{41599134-C1BF-51A5-B66A-7351FFD5EF42}", + "details": { + "name": "AZStd::unordered_map" + } + }, + { + "typeid": "{D6597933-47CD-4FC8-B911-63F3E2B0993A}", + "details": { + "name": "AZ::u64" + } + } + ] + }, + { + "base": "GetSize", + "context": "{41599134-C1BF-51A5-B66A-7351FFD5EF42}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke GetSize" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after GetSize is invoked" + }, + "details": { + "name": "GetSize" + }, + "params": [ + { + "typeid": "{41599134-C1BF-51A5-B66A-7351FFD5EF42}", + "details": { + "name": "AZStd::unordered_map" + } + } + ], + "results": [ + { + "typeid": "{72039442-EB38-4D42-A1AD-CB68F7E0EEF6}", + "details": { + "name": "int" + } + } + ] + }, + { + "base": "Iterate_VM", + "context": "{41599134-C1BF-51A5-B66A-7351FFD5EF42}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Iterate_VM" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Iterate_VM is invoked" + }, + "details": { + "name": "Iterate_VM" + }, + "params": [ + { + "typeid": "{41599134-C1BF-51A5-B66A-7351FFD5EF42}", + "details": { + "name": "AZStd::unordered_map" + } + } + ], + "results": [ + { + "typeid": "{A1A2345A-733D-5980-8523-612DF7C6A45A}", + "details": { + "name": "Iterator_VM, AZStd::equal_to, allocator>>" + } + } + ] + }, + { + "base": "GetKeys", + "context": "{41599134-C1BF-51A5-B66A-7351FFD5EF42}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke GetKeys" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after GetKeys is invoked" + }, + "details": { + "name": "GetKeys" + }, + "params": [ + { + "typeid": "{41599134-C1BF-51A5-B66A-7351FFD5EF42}", + "details": { + "name": "AZStd::unordered_map" + } + } + ], + "results": [ + { + "typeid": "{287CEE87-6FF3-52FC-9D32-38255E2C7FE9}", + "details": { + "name": "AZStd::vector" + } + } + ] + }, + { + "base": "Size", + "context": "{41599134-C1BF-51A5-B66A-7351FFD5EF42}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Size" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Size is invoked" + }, + "details": { + "name": "Size" + }, + "params": [ + { + "typeid": "{41599134-C1BF-51A5-B66A-7351FFD5EF42}", + "details": { + "name": "AZStd::unordered_map" + } + } + ], + "results": [ + { + "typeid": "{72039442-EB38-4D42-A1AD-CB68F7E0EEF6}", + "details": { + "name": "int" + } + } + ] + }, + { + "base": "Erase", + "context": "{41599134-C1BF-51A5-B66A-7351FFD5EF42}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Erase" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Erase is invoked" + }, + "details": { + "name": "Erase" + }, + "params": [ + { + "typeid": "{41599134-C1BF-51A5-B66A-7351FFD5EF42}", + "details": { + "name": "AZStd::unordered_map" + } + }, + { + "typeid": "{9F4E062E-06A0-46D4-85DF-E0DA96467D3A}", + "details": { + "name": "Crc32" + } + } + ], + "results": [ + { + "typeid": "{41599134-C1BF-51A5-B66A-7351FFD5EF42}", + "details": { + "name": "AZStd::unordered_map" + } + } + ] + }, + { + "base": "EraseCheck_VM", + "context": "{41599134-C1BF-51A5-B66A-7351FFD5EF42}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke EraseCheck_VM" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after EraseCheck_VM is invoked" + }, + "details": { + "name": "EraseCheck_VM" + }, + "params": [ + { + "typeid": "{41599134-C1BF-51A5-B66A-7351FFD5EF42}", + "details": { + "name": "AZStd::unordered_map" + } + }, + { + "typeid": "{9F4E062E-06A0-46D4-85DF-E0DA96467D3A}", + "details": { + "name": "Crc32" + } + } + ], + "results": [ + { + "typeid": "{A0CA880C-AFE4-43CB-926C-59AC48496112}", + "details": { + "name": "bool" + } + } + ] + }, + { + "base": "Clear", + "context": "{41599134-C1BF-51A5-B66A-7351FFD5EF42}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Clear" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Clear is invoked" + }, + "details": { + "name": "Clear" + }, + "params": [ + { + "typeid": "{41599134-C1BF-51A5-B66A-7351FFD5EF42}", + "details": { + "name": "AZStd::unordered_map" + } + } + ], + "results": [ + { + "typeid": "{41599134-C1BF-51A5-B66A-7351FFD5EF42}", + "details": { + "name": "AZStd::unordered_map" + } + } + ] + }, + { + "base": "At", + "context": "{41599134-C1BF-51A5-B66A-7351FFD5EF42}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke At" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after At is invoked" + }, + "details": { + "name": "At" + }, + "params": [ + { + "typeid": "{41599134-C1BF-51A5-B66A-7351FFD5EF42}", + "details": { + "name": "AZStd::unordered_map" + } + }, + { + "typeid": "{9F4E062E-06A0-46D4-85DF-E0DA96467D3A}", + "details": { + "name": "Crc32" + } + } + ], + "results": [ + { + "typeid": "{8379EB7D-01FA-4538-B64B-A6543B4BE73D}", + "details": { + "name": "Vector3" + } + } + ] + }, + { + "base": "BucketCount", + "context": "{41599134-C1BF-51A5-B66A-7351FFD5EF42}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke BucketCount" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after BucketCount is invoked" + }, + "details": { + "name": "BucketCount" + }, + "params": [ + { + "typeid": "{41599134-C1BF-51A5-B66A-7351FFD5EF42}", + "details": { + "name": "AZStd::unordered_map" + } + } + ], + "results": [ + { + "typeid": "{D6597933-47CD-4FC8-B911-63F3E2B0993A}", + "details": { + "name": "AZ::u64" + } + } + ] + }, + { + "base": "Empty", + "context": "{41599134-C1BF-51A5-B66A-7351FFD5EF42}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Empty" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Empty is invoked" + }, + "details": { + "name": "Empty" + }, + "params": [ + { + "typeid": "{41599134-C1BF-51A5-B66A-7351FFD5EF42}", + "details": { + "name": "AZStd::unordered_map" + } + } + ], + "results": [ + { + "typeid": "{A0CA880C-AFE4-43CB-926C-59AC48496112}", + "details": { + "name": "bool" + } + } + ] + }, + { + "base": "Swap", + "context": "{41599134-C1BF-51A5-B66A-7351FFD5EF42}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Swap" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Swap is invoked" + }, + "details": { + "name": "Swap" + }, + "params": [ + { + "typeid": "{41599134-C1BF-51A5-B66A-7351FFD5EF42}", + "details": { + "name": "AZStd::unordered_map" + } + }, + { + "typeid": "{41599134-C1BF-51A5-B66A-7351FFD5EF42}", + "details": { + "name": "AZStd::unordered_map" + } + } + ] + } + ] + }, + { + "base": "{EEB1809B-78BA-5073-AEF8-8CC85F43DB4A}", + "context": "OnDemandReflected", + "variant": "", + "details": { + "name": "Map", + "category": "Map", + "tooltip": "A collection of Key/Value pairs, where each Key value must be unique." + }, + "methods": [ + { + "base": "contains", + "context": "{EEB1809B-78BA-5073-AEF8-8CC85F43DB4A}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke contains" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after contains is invoked" + }, + "details": { + "name": "contains" + }, + "params": [ + { + "typeid": "{EEB1809B-78BA-5073-AEF8-8CC85F43DB4A}", + "details": { + "name": "AZStd::unordered_map" + } + }, + { + "typeid": "{03AAAB3F-5C47-5A66-9EBC-D5FA4DB353C9}", + "details": { + "name": "AZStd::string" + } + } + ], + "results": [ + { + "typeid": "{A0CA880C-AFE4-43CB-926C-59AC48496112}", + "details": { + "name": "bool" + } + } + ] + }, + { + "base": "Insert", + "context": "{EEB1809B-78BA-5073-AEF8-8CC85F43DB4A}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Insert" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Insert is invoked" + }, + "details": { + "name": "Insert" + }, + "params": [ + { + "typeid": "{EEB1809B-78BA-5073-AEF8-8CC85F43DB4A}", + "details": { + "name": "AZStd::unordered_map" + } + }, + { + "typeid": "{03AAAB3F-5C47-5A66-9EBC-D5FA4DB353C9}", + "details": { + "name": "AZStd::string" + } + }, + { + "typeid": "{A0CA880C-AFE4-43CB-926C-59AC48496112}", + "details": { + "name": "bool" + } + } + ], + "results": [ + { + "typeid": "{EEB1809B-78BA-5073-AEF8-8CC85F43DB4A}", + "details": { + "name": "AZStd::unordered_map" + } + } + ] + }, + { + "base": "Reserve", + "context": "{EEB1809B-78BA-5073-AEF8-8CC85F43DB4A}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Reserve" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Reserve is invoked" + }, + "details": { + "name": "Reserve" + }, + "params": [ + { + "typeid": "{EEB1809B-78BA-5073-AEF8-8CC85F43DB4A}", + "details": { + "name": "AZStd::unordered_map" + } + }, + { + "typeid": "{D6597933-47CD-4FC8-B911-63F3E2B0993A}", + "details": { + "name": "AZ::u64" + } + } + ] + }, + { + "base": "GetSize", + "context": "{EEB1809B-78BA-5073-AEF8-8CC85F43DB4A}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke GetSize" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after GetSize is invoked" + }, + "details": { + "name": "GetSize" + }, + "params": [ + { + "typeid": "{EEB1809B-78BA-5073-AEF8-8CC85F43DB4A}", + "details": { + "name": "AZStd::unordered_map" + } + } + ], + "results": [ + { + "typeid": "{72039442-EB38-4D42-A1AD-CB68F7E0EEF6}", + "details": { + "name": "int" + } + } + ] + }, + { + "base": "Iterate_VM", + "context": "{EEB1809B-78BA-5073-AEF8-8CC85F43DB4A}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Iterate_VM" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Iterate_VM is invoked" + }, + "details": { + "name": "Iterate_VM" + }, + "params": [ + { + "typeid": "{EEB1809B-78BA-5073-AEF8-8CC85F43DB4A}", + "details": { + "name": "AZStd::unordered_map" + } + } + ], + "results": [ + { + "typeid": "{D93B89FE-719A-5E7D-8B2F-21CCF7964AD9}", + "details": { + "name": "Iterator_VM, allocator>, bool, AZStd::hash>" + }, + "methods": [ + { + "base": "remove_prefix", + "context": "{7114E998-A8B4-519B-9342-A86D1587B4F7}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke remove_prefix" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after remove_prefix is invoked" + }, + "details": { + "name": "remove_prefix" + }, + "params": [ + { + "typeid": "{7114E998-A8B4-519B-9342-A86D1587B4F7}", + "details": { + "name": "AZStd::basic_string_view>*" + } + }, + { + "typeid": "{72039442-EB38-4D42-A1AD-CB68F7E0EEF6}", + "details": { + "name": "int" + } + } + ] + }, + { + "base": "substr", + "context": "{7114E998-A8B4-519B-9342-A86D1587B4F7}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke substr" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after substr is invoked" + }, + "details": { + "name": "substr" + }, + "params": [ + { + "typeid": "{7114E998-A8B4-519B-9342-A86D1587B4F7}", + "details": { + "name": "AZStd::basic_string_view>*" + } + }, + { + "typeid": "{72039442-EB38-4D42-A1AD-CB68F7E0EEF6}", + "details": { + "name": "int" + } + }, + { + "typeid": "{72039442-EB38-4D42-A1AD-CB68F7E0EEF6}", + "details": { + "name": "int" + } + } + ], + "results": [ + { + "typeid": "{7114E998-A8B4-519B-9342-A86D1587B4F7}", + "details": { + "name": "AZStd::basic_string_view>" + } + } + ] + }, + { + "base": "find", + "context": "{7114E998-A8B4-519B-9342-A86D1587B4F7}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke find" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after find is invoked" + }, + "details": { + "name": "find" + }, + "params": [ + { + "typeid": "{7114E998-A8B4-519B-9342-A86D1587B4F7}", + "details": { + "name": "AZStd::basic_string_view>*" + } + }, + { + "typeid": "{7114E998-A8B4-519B-9342-A86D1587B4F7}", + "details": { + "name": "AZStd::basic_string_view>" + } + }, + { + "typeid": "{72039442-EB38-4D42-A1AD-CB68F7E0EEF6}", + "details": { + "name": "int" + } + } + ], + "results": [ + { + "typeid": "{72039442-EB38-4D42-A1AD-CB68F7E0EEF6}", + "details": { + "name": "int" + } + } + ] + }, + { + "base": "length", + "context": "{7114E998-A8B4-519B-9342-A86D1587B4F7}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke length" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after length is invoked" + }, + "details": { + "name": "length" + }, + "params": [ + { + "typeid": "{7114E998-A8B4-519B-9342-A86D1587B4F7}", + "details": { + "name": "AZStd::basic_string_view>*" + } + } + ], + "results": [ + { + "typeid": "{72039442-EB38-4D42-A1AD-CB68F7E0EEF6}", + "details": { + "name": "int" + } + } + ] + }, + { + "base": "data", + "context": "{7114E998-A8B4-519B-9342-A86D1587B4F7}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke data" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after data is invoked" + }, + "details": { + "name": "data" + }, + "params": [ + { + "typeid": "{7114E998-A8B4-519B-9342-A86D1587B4F7}", + "details": { + "name": "AZStd::basic_string_view>*" + } + } + ], + "results": [ + { + "typeid": "{3AB0037F-AF8D-48CE-BCA0-A170D18B2C03}", + "details": { + "name": "char" + } + } + ] + }, + { + "base": "ToString", + "context": "{7114E998-A8B4-519B-9342-A86D1587B4F7}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke ToString" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after ToString is invoked" + }, + "details": { + "name": "ToString" + }, + "params": [ + { + "typeid": "{7114E998-A8B4-519B-9342-A86D1587B4F7}", + "details": { + "name": "const AZStd::basic_string_view>&" + } + } + ], + "results": [ + { + "typeid": "{3AB0037F-AF8D-48CE-BCA0-A170D18B2C03}", + "details": { + "name": "char" + } + } + ] + }, + { + "base": "size", + "context": "{7114E998-A8B4-519B-9342-A86D1587B4F7}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke size" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after size is invoked" + }, + "details": { + "name": "size" + }, + "params": [ + { + "typeid": "{7114E998-A8B4-519B-9342-A86D1587B4F7}", + "details": { + "name": "AZStd::basic_string_view>*" + } + } + ], + "results": [ + { + "typeid": "{72039442-EB38-4D42-A1AD-CB68F7E0EEF6}", + "details": { + "name": "int" + } + } + ] + }, + { + "base": "remove_suffix", + "context": "{7114E998-A8B4-519B-9342-A86D1587B4F7}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke remove_suffix" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after remove_suffix is invoked" + }, + "details": { + "name": "remove_suffix" + }, + "params": [ + { + "typeid": "{7114E998-A8B4-519B-9342-A86D1587B4F7}", + "details": { + "name": "AZStd::basic_string_view>*" + } + }, + { + "typeid": "{72039442-EB38-4D42-A1AD-CB68F7E0EEF6}", + "details": { + "name": "int" + } + } + ] + } + ] + }, + { + "base": "{F17D3A96-7E22-5A6A-87D1-B0FB6E3A6C32}", + "context": "OnDemandReflected", + "variant": "", + "details": { + "name": "Map", + "category": "Map", + "tooltip": "A collection of Key/Value pairs, where each Key value must be unique." + }, + "methods": [ + { + "base": "contains", + "context": "{F17D3A96-7E22-5A6A-87D1-B0FB6E3A6C32}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke contains" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after contains is invoked" + }, + "details": { + "name": "contains" + }, + "params": [ + { + "typeid": "{F17D3A96-7E22-5A6A-87D1-B0FB6E3A6C32}", + "details": { + "name": "AZStd::unordered_map" + } + }, + { + "typeid": "{A0CA880C-AFE4-43CB-926C-59AC48496112}", + "details": { + "name": "bool" + } + } + ], + "results": [ + { + "typeid": "{A0CA880C-AFE4-43CB-926C-59AC48496112}", + "details": { + "name": "bool" + } + } + ] + }, + { + "base": "Insert", + "context": "{F17D3A96-7E22-5A6A-87D1-B0FB6E3A6C32}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Insert" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Insert is invoked" + }, + "details": { + "name": "Insert" + }, + "params": [ + { + "typeid": "{F17D3A96-7E22-5A6A-87D1-B0FB6E3A6C32}", + "details": { + "name": "AZStd::unordered_map" + } + }, + { + "typeid": "{A0CA880C-AFE4-43CB-926C-59AC48496112}", + "details": { + "name": "bool" + } + }, + { + "typeid": "{73103120-3DD3-4873-BAB3-9713FA2804FB}", + "details": { + "name": "Quaternion" + } + } + ], + "results": [ + { + "typeid": "{F17D3A96-7E22-5A6A-87D1-B0FB6E3A6C32}", + "details": { + "name": "AZStd::unordered_map" + } + } + ] + }, + { + "base": "Reserve", + "context": "{F17D3A96-7E22-5A6A-87D1-B0FB6E3A6C32}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Reserve" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Reserve is invoked" + }, + "details": { + "name": "Reserve" + }, + "params": [ + { + "typeid": "{F17D3A96-7E22-5A6A-87D1-B0FB6E3A6C32}", + "details": { + "name": "AZStd::unordered_map" + } + }, + { + "typeid": "{D6597933-47CD-4FC8-B911-63F3E2B0993A}", + "details": { + "name": "AZ::u64" + } + } + ] + }, + { + "base": "GetSize", + "context": "{F17D3A96-7E22-5A6A-87D1-B0FB6E3A6C32}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke GetSize" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after GetSize is invoked" + }, + "details": { + "name": "GetSize" + }, + "params": [ + { + "typeid": "{F17D3A96-7E22-5A6A-87D1-B0FB6E3A6C32}", + "details": { + "name": "AZStd::unordered_map" + } + } + ], + "results": [ + { + "typeid": "{72039442-EB38-4D42-A1AD-CB68F7E0EEF6}", + "details": { + "name": "int" + } + } + ] + }, + { + "base": "Iterate_VM", + "context": "{F17D3A96-7E22-5A6A-87D1-B0FB6E3A6C32}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Iterate_VM" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Iterate_VM is invoked" + }, + "details": { + "name": "Iterate_VM" + }, + "params": [ + { + "typeid": "{F17D3A96-7E22-5A6A-87D1-B0FB6E3A6C32}", + "details": { + "name": "AZStd::unordered_map" + } + } + ], + "results": [ + { + "typeid": "{B5A81D33-AD24-5FD1-A0F9-96E16EE04D2E}", + "details": { + "name": "Iterator_VM, AZStd::equal_to, allocator>>" + } + } + ] + }, + { + "base": "GetKeys", + "context": "{F17D3A96-7E22-5A6A-87D1-B0FB6E3A6C32}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke GetKeys" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after GetKeys is invoked" + }, + "details": { + "name": "GetKeys" + }, + "params": [ + { + "typeid": "{F17D3A96-7E22-5A6A-87D1-B0FB6E3A6C32}", + "details": { + "name": "AZStd::unordered_map" + } + } + ], + "results": [ + { + "typeid": "{B505B05D-57BF-5A45-9113-B3A2784E2CD7}", + "details": { + "name": "AZStd::vector" + } + } + ] + }, + { + "base": "Size", + "context": "{F17D3A96-7E22-5A6A-87D1-B0FB6E3A6C32}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Size" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Size is invoked" + }, + "details": { + "name": "Size" + }, + "params": [ + { + "typeid": "{F17D3A96-7E22-5A6A-87D1-B0FB6E3A6C32}", + "details": { + "name": "AZStd::unordered_map" + } + } + ], + "results": [ + { + "typeid": "{72039442-EB38-4D42-A1AD-CB68F7E0EEF6}", + "details": { + "name": "int" + } + } + ] + }, + { + "base": "Erase", + "context": "{F17D3A96-7E22-5A6A-87D1-B0FB6E3A6C32}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Erase" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Erase is invoked" + }, + "details": { + "name": "Erase" + }, + "params": [ + { + "typeid": "{F17D3A96-7E22-5A6A-87D1-B0FB6E3A6C32}", + "details": { + "name": "AZStd::unordered_map" + } + }, + { + "typeid": "{A0CA880C-AFE4-43CB-926C-59AC48496112}", + "details": { + "name": "bool" + } + } + ], + "results": [ + { + "typeid": "{F17D3A96-7E22-5A6A-87D1-B0FB6E3A6C32}", + "details": { + "name": "AZStd::unordered_map" + } + } + ] + }, + { + "base": "EraseCheck_VM", + "context": "{F17D3A96-7E22-5A6A-87D1-B0FB6E3A6C32}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke EraseCheck_VM" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after EraseCheck_VM is invoked" + }, + "details": { + "name": "EraseCheck_VM" + }, + "params": [ + { + "typeid": "{F17D3A96-7E22-5A6A-87D1-B0FB6E3A6C32}", + "details": { + "name": "AZStd::unordered_map" + } + }, + { + "typeid": "{A0CA880C-AFE4-43CB-926C-59AC48496112}", + "details": { + "name": "bool" + } + } + ], + "results": [ + { + "typeid": "{A0CA880C-AFE4-43CB-926C-59AC48496112}", + "details": { + "name": "bool" + } + } + ] + }, + { + "base": "Clear", + "context": "{F17D3A96-7E22-5A6A-87D1-B0FB6E3A6C32}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Clear" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Clear is invoked" + }, + "details": { + "name": "Clear" + }, + "params": [ + { + "typeid": "{F17D3A96-7E22-5A6A-87D1-B0FB6E3A6C32}", + "details": { + "name": "AZStd::unordered_map" + } + } + ], + "results": [ + { + "typeid": "{F17D3A96-7E22-5A6A-87D1-B0FB6E3A6C32}", + "details": { + "name": "AZStd::unordered_map" + } + } + ] + }, + { + "base": "At", + "context": "{F17D3A96-7E22-5A6A-87D1-B0FB6E3A6C32}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke At" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after At is invoked" + }, + "details": { + "name": "At" + }, + "params": [ + { + "typeid": "{F17D3A96-7E22-5A6A-87D1-B0FB6E3A6C32}", + "details": { + "name": "AZStd::unordered_map" + } + }, + { + "typeid": "{A0CA880C-AFE4-43CB-926C-59AC48496112}", + "details": { + "name": "bool" + } + } + ], + "results": [ + { + "typeid": "{73103120-3DD3-4873-BAB3-9713FA2804FB}", + "details": { + "name": "Quaternion" + } + } + ] + }, + { + "base": "BucketCount", + "context": "{F17D3A96-7E22-5A6A-87D1-B0FB6E3A6C32}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke BucketCount" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after BucketCount is invoked" + }, + "details": { + "name": "BucketCount" + }, + "params": [ + { + "typeid": "{F17D3A96-7E22-5A6A-87D1-B0FB6E3A6C32}", + "details": { + "name": "AZStd::unordered_map" + } + } + ], + "results": [ + { + "typeid": "{D6597933-47CD-4FC8-B911-63F3E2B0993A}", + "details": { + "name": "AZ::u64" + } + } + ] + }, + { + "base": "Empty", + "context": "{F17D3A96-7E22-5A6A-87D1-B0FB6E3A6C32}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Empty" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Empty is invoked" + }, + "details": { + "name": "Empty" + }, + "params": [ + { + "typeid": "{F17D3A96-7E22-5A6A-87D1-B0FB6E3A6C32}", + "details": { + "name": "AZStd::unordered_map" + } + } + ], + "results": [ + { + "typeid": "{A0CA880C-AFE4-43CB-926C-59AC48496112}", + "details": { + "name": "bool" + } + } + ] + }, + { + "base": "Swap", + "context": "{F17D3A96-7E22-5A6A-87D1-B0FB6E3A6C32}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Swap" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Swap is invoked" + }, + "details": { + "name": "Swap" + }, + "params": [ + { + "typeid": "{F17D3A96-7E22-5A6A-87D1-B0FB6E3A6C32}", + "details": { + "name": "AZStd::unordered_map" + } + }, + { + "typeid": "{F17D3A96-7E22-5A6A-87D1-B0FB6E3A6C32}", + "details": { + "name": "AZStd::unordered_map" + } + } + ] + } + ] + }, + { + "base": "{4BA06517-EDEC-59DC-B5FE-2FDE64BBEF6E}", + "context": "OnDemandReflected", + "variant": "", + "details": { + "name": "Asset" + }, + "methods": [ + { + "base": "IsLoading", + "context": "{4BA06517-EDEC-59DC-B5FE-2FDE64BBEF6E}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke IsLoading" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after IsLoading is invoked" + }, + "details": { + "name": "IsLoading" + }, + "params": [ + { + "typeid": "{4BA06517-EDEC-59DC-B5FE-2FDE64BBEF6E}", + "details": { + "name": "Asset" + } + } + ], + "results": [ + { + "typeid": "{A0CA880C-AFE4-43CB-926C-59AC48496112}", + "details": { + "name": "bool" + } + } + ] + }, + { + "base": "GetType", + "context": "{4BA06517-EDEC-59DC-B5FE-2FDE64BBEF6E}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke GetType" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after GetType is invoked" + }, + "details": { + "name": "GetType" + }, + "params": [ + { + "typeid": "{4BA06517-EDEC-59DC-B5FE-2FDE64BBEF6E}", + "details": { + "name": "Asset" + } + } + ], + "results": [ + { + "typeid": "{E152C105-A133-4D03-BBF8-3D4B2FBA3E2A}", + "details": { + "name": "AZ::Uuid" + } + } + ] + }, + { + "base": "IsError", + "context": "{4BA06517-EDEC-59DC-B5FE-2FDE64BBEF6E}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke IsError" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after IsError is invoked" + }, + "details": { + "name": "IsError" + }, + "params": [ + { + "typeid": "{4BA06517-EDEC-59DC-B5FE-2FDE64BBEF6E}", + "details": { + "name": "Asset" + } + } + ], + "results": [ + { + "typeid": "{A0CA880C-AFE4-43CB-926C-59AC48496112}", + "details": { + "name": "bool" + } + } + ] + }, + { + "base": "GetHint", + "context": "{4BA06517-EDEC-59DC-B5FE-2FDE64BBEF6E}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke GetHint" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after GetHint is invoked" + }, + "details": { + "name": "GetHint" + }, + "params": [ + { + "typeid": "{4BA06517-EDEC-59DC-B5FE-2FDE64BBEF6E}", + "details": { + "name": "Asset" + } + } + ], + "results": [ + { + "typeid": "{03AAAB3F-5C47-5A66-9EBC-D5FA4DB353C9}", + "details": { + "name": "AZStd::string" + } + } + ] + }, + { + "base": "GetData", + "context": "{4BA06517-EDEC-59DC-B5FE-2FDE64BBEF6E}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke GetData" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after GetData is invoked" + }, + "details": { + "name": "GetData" + }, + "params": [ + { + "typeid": "{4BA06517-EDEC-59DC-B5FE-2FDE64BBEF6E}", + "details": { + "name": "Asset" + } + } + ], + "results": [ + { + "typeid": "{AF3F7D32-1536-422A-89F3-A11E1F5B5A9C}", + "details": { + "name": "AssetData" + } + } + ] + }, + { + "base": "IsReady", + "context": "{4BA06517-EDEC-59DC-B5FE-2FDE64BBEF6E}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke IsReady" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after IsReady is invoked" + }, + "details": { + "name": "IsReady" + }, + "params": [ + { + "typeid": "{4BA06517-EDEC-59DC-B5FE-2FDE64BBEF6E}", + "details": { + "name": "Asset" + } + } + ], + "results": [ + { + "typeid": "{A0CA880C-AFE4-43CB-926C-59AC48496112}", + "details": { + "name": "bool" + } + } + ] + }, + { + "base": "GetStatus", + "context": "{4BA06517-EDEC-59DC-B5FE-2FDE64BBEF6E}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke GetStatus" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after GetStatus is invoked" + }, + "details": { + "name": "GetStatus" + }, + "params": [ + { + "typeid": "{4BA06517-EDEC-59DC-B5FE-2FDE64BBEF6E}", + "details": { + "name": "Asset" + } + } + ], + "results": [ + { + "typeid": "{72039442-EB38-4D42-A1AD-CB68F7E0EEF6}", + "details": { + "name": "int" + } + } + ] + }, + { + "base": "GetId", + "context": "{4BA06517-EDEC-59DC-B5FE-2FDE64BBEF6E}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke GetId" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after GetId is invoked" + }, + "details": { + "name": "GetId" + }, + "params": [ + { + "typeid": "{4BA06517-EDEC-59DC-B5FE-2FDE64BBEF6E}", + "details": { + "name": "Asset" + } + } + ], + "results": [ + { + "typeid": "{652ED536-3402-439B-AEBE-4A5DBC554085}", + "details": { + "name": "AssetId" + } + } + ] + } + ] + }, + { + "base": "{549C99B0-35FE-515D-9066-DFA9A1131500}", + "context": "OnDemandReflected", + "variant": "", + "details": { + "name": "Map>", + "category": "Map", + "tooltip": "A collection of Key/Value pairs, where each Key value must be unique." + }, + "methods": [ + { + "base": "contains", + "context": "{549C99B0-35FE-515D-9066-DFA9A1131500}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke contains" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after contains is invoked" + }, + "details": { + "name": "contains" + }, + "params": [ + { + "typeid": "{549C99B0-35FE-515D-9066-DFA9A1131500}", + "details": { + "name": "AZStd::unordered_map" + } + }, + { + "typeid": "{E152C105-A133-4D03-BBF8-3D4B2FBA3E2A}", + "details": { + "name": "AZ::Uuid" + } + } + ], + "results": [ + { + "typeid": "{A0CA880C-AFE4-43CB-926C-59AC48496112}", + "details": { + "name": "bool" + } + } + ] + }, + { + "base": "Insert", + "context": "{549C99B0-35FE-515D-9066-DFA9A1131500}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Insert" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Insert is invoked" + }, + "details": { + "name": "Insert" + }, + "params": [ + { + "typeid": "{549C99B0-35FE-515D-9066-DFA9A1131500}", + "details": { + "name": "AZStd::unordered_map" + } + }, + { + "typeid": "{E152C105-A133-4D03-BBF8-3D4B2FBA3E2A}", + "details": { + "name": "AZ::Uuid" + } + }, + { + "typeid": "{9F4210F0-9A8E-5536-A6FD-F3F55D854C0A}", + "details": { + "name": "AZStd::unordered_map" + } + } + ], + "results": [ + { + "typeid": "{549C99B0-35FE-515D-9066-DFA9A1131500}", + "details": { + "name": "AZStd::unordered_map" + } + } + ] + }, + { + "base": "Reserve", + "context": "{549C99B0-35FE-515D-9066-DFA9A1131500}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Reserve" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Reserve is invoked" + }, + "details": { + "name": "Reserve" + }, + "params": [ + { + "typeid": "{549C99B0-35FE-515D-9066-DFA9A1131500}", + "details": { + "name": "AZStd::unordered_map" + } + }, + { + "typeid": "{D6597933-47CD-4FC8-B911-63F3E2B0993A}", + "details": { + "name": "AZ::u64" + } + } + ] + }, + { + "base": "GetSize", + "context": "{549C99B0-35FE-515D-9066-DFA9A1131500}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke GetSize" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after GetSize is invoked" + }, + "details": { + "name": "GetSize" + }, + "params": [ + { + "typeid": "{549C99B0-35FE-515D-9066-DFA9A1131500}", + "details": { + "name": "AZStd::unordered_map" + } + } + ], + "results": [ + { + "typeid": "{72039442-EB38-4D42-A1AD-CB68F7E0EEF6}", + "details": { + "name": "int" + } + } + ] + }, + { + "base": "Iterate_VM", + "context": "{549C99B0-35FE-515D-9066-DFA9A1131500}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Iterate_VM" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Iterate_VM is invoked" + }, + "details": { + "name": "Iterate_VM" + }, + "params": [ + { + "typeid": "{549C99B0-35FE-515D-9066-DFA9A1131500}", + "details": { + "name": "AZStd::unordered_map" + } + } + ], + "results": [ + { + "typeid": "{041189DC-081D-5773-A986-A315539C058F}", + "details": { + "name": "Iterator_VM, allocator>," + } + } + ] + }, + { + "base": "GetKeys", + "context": "{549C99B0-35FE-515D-9066-DFA9A1131500}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke GetKeys" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after GetKeys is invoked" + }, + "details": { + "name": "GetKeys" + }, + "params": [ + { + "typeid": "{549C99B0-35FE-515D-9066-DFA9A1131500}", + "details": { + "name": "AZStd::unordered_map" + } + } + ], + "results": [ + { + "typeid": "{3A9E52F9-1A46-5FC6-822A-249BBFB50C90}", + "details": { + "name": "AZStd::vector" + } + } + ] + }, + { + "base": "Size", + "context": "{549C99B0-35FE-515D-9066-DFA9A1131500}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Size" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Size is invoked" + }, + "details": { + "name": "Size" + }, + "params": [ + { + "typeid": "{549C99B0-35FE-515D-9066-DFA9A1131500}", + "details": { + "name": "AZStd::unordered_map" + } + } + ], + "results": [ + { + "typeid": "{72039442-EB38-4D42-A1AD-CB68F7E0EEF6}", + "details": { + "name": "int" + } + } + ] + }, + { + "base": "Erase", + "context": "{549C99B0-35FE-515D-9066-DFA9A1131500}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Erase" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Erase is invoked" + }, + "details": { + "name": "Erase" + }, + "params": [ + { + "typeid": "{549C99B0-35FE-515D-9066-DFA9A1131500}", + "details": { + "name": "AZStd::unordered_map" + } + }, + { + "typeid": "{E152C105-A133-4D03-BBF8-3D4B2FBA3E2A}", + "details": { + "name": "AZ::Uuid" + } + } + ], + "results": [ + { + "typeid": "{549C99B0-35FE-515D-9066-DFA9A1131500}", + "details": { + "name": "AZStd::unordered_map" + } + } + ] + }, + { + "base": "EraseCheck_VM", + "context": "{549C99B0-35FE-515D-9066-DFA9A1131500}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke EraseCheck_VM" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after EraseCheck_VM is invoked" + }, + "details": { + "name": "EraseCheck_VM" + }, + "params": [ + { + "typeid": "{549C99B0-35FE-515D-9066-DFA9A1131500}", + "details": { + "name": "AZStd::unordered_map" + } + }, + { + "typeid": "{E152C105-A133-4D03-BBF8-3D4B2FBA3E2A}", + "details": { + "name": "AZ::Uuid" + } + } + ], + "results": [ + { + "typeid": "{A0CA880C-AFE4-43CB-926C-59AC48496112}", + "details": { + "name": "bool" + } + } + ] + }, + { + "base": "Clear", + "context": "{549C99B0-35FE-515D-9066-DFA9A1131500}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Clear" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Clear is invoked" + }, + "details": { + "name": "Clear" + }, + "params": [ + { + "typeid": "{549C99B0-35FE-515D-9066-DFA9A1131500}", + "details": { + "name": "AZStd::unordered_map" + } + } + ], + "results": [ + { + "typeid": "{549C99B0-35FE-515D-9066-DFA9A1131500}", + "details": { + "name": "AZStd::unordered_map" + } + } + ] + }, + { + "base": "At", + "context": "{549C99B0-35FE-515D-9066-DFA9A1131500}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke At" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after At is invoked" + }, + "details": { + "name": "At" + }, + "params": [ + { + "typeid": "{549C99B0-35FE-515D-9066-DFA9A1131500}", + "details": { + "name": "AZStd::unordered_map" + } + }, + { + "typeid": "{E152C105-A133-4D03-BBF8-3D4B2FBA3E2A}", + "details": { + "name": "AZ::Uuid" + } + } + ], + "results": [ + { + "typeid": "{9F4210F0-9A8E-5536-A6FD-F3F55D854C0A}", + "details": { + "name": "AZStd::unordered_map" + } + } + ] + }, + { + "base": "BucketCount", + "context": "{549C99B0-35FE-515D-9066-DFA9A1131500}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke BucketCount" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after BucketCount is invoked" + }, + "details": { + "name": "BucketCount" + }, + "params": [ + { + "typeid": "{549C99B0-35FE-515D-9066-DFA9A1131500}", + "details": { + "name": "AZStd::unordered_map" + } + } + ], + "results": [ + { + "typeid": "{D6597933-47CD-4FC8-B911-63F3E2B0993A}", + "details": { + "name": "AZ::u64" + } + } + ] + }, + { + "base": "Empty", + "context": "{549C99B0-35FE-515D-9066-DFA9A1131500}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Empty" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Empty is invoked" + }, + "details": { + "name": "Empty" + }, + "params": [ + { + "typeid": "{549C99B0-35FE-515D-9066-DFA9A1131500}", + "details": { + "name": "AZStd::unordered_map" + } + } + ], + "results": [ + { + "typeid": "{A0CA880C-AFE4-43CB-926C-59AC48496112}", + "details": { + "name": "bool" + } + } + ] + }, + { + "base": "Swap", + "context": "{549C99B0-35FE-515D-9066-DFA9A1131500}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Swap" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Swap is invoked" + }, + "details": { + "name": "Swap" + }, + "params": [ + { + "typeid": "{549C99B0-35FE-515D-9066-DFA9A1131500}", + "details": { + "name": "AZStd::unordered_map" + } + }, + { + "typeid": "{549C99B0-35FE-515D-9066-DFA9A1131500}", + "details": { + "name": "AZStd::unordered_map" + } + } + ] + } + ] + }, + { + "base": "{D8B65A5B-38FF-4B41-9FA4-FCA080D75625}", + "context": "OnDemandReflected", + "variant": "", + "details": { + "name": "MathCrc32_VM" + }, + "methods": [ + { + "base": "FromString", + "context": "{D8B65A5B-38FF-4B41-9FA4-FCA080D75625}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke FromString" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after FromString is invoked" + }, + "details": { + "name": "FromString" + }, + "params": [ + { + "typeid": "{03AAAB3F-5C47-5A66-9EBC-D5FA4DB353C9}", + "details": { + "name": "AZStd::string" + } + } + ], + "results": [ + { + "typeid": "{9F4E062E-06A0-46D4-85DF-E0DA96467D3A}", + "details": { + "name": "Crc32" + } + } + ] + } + ] + }, + { + "base": "{66027D7A-FCD1-4592-93E5-EB4B7F4BD671}", + "context": "OnDemandReflected", + "variant": "", + "details": { + "name": "MathVector4_VM" + }, + "methods": [ + { + "base": "SetW", + "context": "{66027D7A-FCD1-4592-93E5-EB4B7F4BD671}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke SetW" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after SetW is invoked" + }, + "details": { + "name": "SetW" + }, + "params": [ + { + "typeid": "{0CE9FA36-1E3A-4C06-9254-B7C73A732053}", + "details": { + "name": "Vector4" + } + }, + { + "typeid": "{110C4B14-11A8-4E9D-8638-5051013A56AC}", + "details": { + "name": "double" + } + } + ], + "results": [ + { + "typeid": "{0CE9FA36-1E3A-4C06-9254-B7C73A732053}", + "details": { + "name": "Vector4" + } + } + ] + }, + { + "base": "SetX", + "context": "{66027D7A-FCD1-4592-93E5-EB4B7F4BD671}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke SetX" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after SetX is invoked" + }, + "details": { + "name": "SetX" + }, + "params": [ + { + "typeid": "{0CE9FA36-1E3A-4C06-9254-B7C73A732053}", + "details": { + "name": "Vector4" + } + }, + { + "typeid": "{110C4B14-11A8-4E9D-8638-5051013A56AC}", + "details": { + "name": "double" + } + } + ], + "results": [ + { + "typeid": "{0CE9FA36-1E3A-4C06-9254-B7C73A732053}", + "details": { + "name": "Vector4" + } + } + ] + }, + { + "base": "IsNormalized", + "context": "{66027D7A-FCD1-4592-93E5-EB4B7F4BD671}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke IsNormalized" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after IsNormalized is invoked" + }, + "details": { + "name": "IsNormalized" + }, + "params": [ + { + "typeid": "{0CE9FA36-1E3A-4C06-9254-B7C73A732053}", + "details": { + "name": "Vector4" + } + }, + { + "typeid": "{110C4B14-11A8-4E9D-8638-5051013A56AC}", + "details": { + "name": "double" + } + } + ], + "results": [ + { + "typeid": "{A0CA880C-AFE4-43CB-926C-59AC48496112}", + "details": { + "name": "bool" + } + } + ] + }, + { + "base": "LengthSquared", + "context": "{66027D7A-FCD1-4592-93E5-EB4B7F4BD671}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke LengthSquared" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after LengthSquared is invoked" + }, + "details": { + "name": "LengthSquared" + }, + "params": [ + { + "typeid": "{0CE9FA36-1E3A-4C06-9254-B7C73A732053}", + "details": { + "name": "Vector4" + } + } + ], + "results": [ + { + "typeid": "{110C4B14-11A8-4E9D-8638-5051013A56AC}", + "details": { + "name": "double" + } + } + ] + }, + { + "base": "MultiplyByNumber", + "context": "{66027D7A-FCD1-4592-93E5-EB4B7F4BD671}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke MultiplyByNumber" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after MultiplyByNumber is invoked" + }, + "details": { + "name": "MultiplyByNumber" + }, + "params": [ + { + "typeid": "{0CE9FA36-1E3A-4C06-9254-B7C73A732053}", + "details": { + "name": "Vector4" + } + }, + { + "typeid": "{110C4B14-11A8-4E9D-8638-5051013A56AC}", + "details": { + "name": "double" + } + } + ], + "results": [ + { + "typeid": "{0CE9FA36-1E3A-4C06-9254-B7C73A732053}", + "details": { + "name": "Vector4" + } + } + ] + }, + { + "base": "Negate", + "context": "{66027D7A-FCD1-4592-93E5-EB4B7F4BD671}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Negate" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Negate is invoked" + }, + "details": { + "name": "Negate" + }, + "params": [ + { + "typeid": "{0CE9FA36-1E3A-4C06-9254-B7C73A732053}", + "details": { + "name": "Vector4" + } + } + ], + "results": [ + { + "typeid": "{0CE9FA36-1E3A-4C06-9254-B7C73A732053}", + "details": { + "name": "Vector4" + } + } + ] + }, + { + "base": "Dot", + "context": "{66027D7A-FCD1-4592-93E5-EB4B7F4BD671}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Dot" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Dot is invoked" + }, + "details": { + "name": "Dot" + }, + "params": [ + { + "typeid": "{0CE9FA36-1E3A-4C06-9254-B7C73A732053}", + "details": { + "name": "Vector4" + } + }, + { + "typeid": "{0CE9FA36-1E3A-4C06-9254-B7C73A732053}", + "details": { + "name": "Vector4" + } + } + ], + "results": [ + { + "typeid": "{110C4B14-11A8-4E9D-8638-5051013A56AC}", + "details": { + "name": "double" + } + } + ] + }, + { + "base": "FromValues", + "context": "{66027D7A-FCD1-4592-93E5-EB4B7F4BD671}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke FromValues" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after FromValues is invoked" + }, + "details": { + "name": "FromValues" + }, + "params": [ + { + "typeid": "{110C4B14-11A8-4E9D-8638-5051013A56AC}", + "details": { + "name": "double" + } + }, + { + "typeid": "{110C4B14-11A8-4E9D-8638-5051013A56AC}", + "details": { + "name": "double" + } + }, + { + "typeid": "{110C4B14-11A8-4E9D-8638-5051013A56AC}", + "details": { + "name": "double" + } + }, + { + "typeid": "{110C4B14-11A8-4E9D-8638-5051013A56AC}", + "details": { + "name": "double" + } + } + ], + "results": [ + { + "typeid": "{0CE9FA36-1E3A-4C06-9254-B7C73A732053}", + "details": { + "name": "Vector4" + } + } + ] + }, + { + "base": "IsFinite", + "context": "{66027D7A-FCD1-4592-93E5-EB4B7F4BD671}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke IsFinite" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after IsFinite is invoked" + }, + "details": { + "name": "IsFinite" + }, + "params": [ + { + "typeid": "{0CE9FA36-1E3A-4C06-9254-B7C73A732053}", + "details": { + "name": "Vector4" + } + } + ], + "results": [ + { + "typeid": "{A0CA880C-AFE4-43CB-926C-59AC48496112}", + "details": { + "name": "bool" + } + } + ] + }, + { + "base": "Length", + "context": "{66027D7A-FCD1-4592-93E5-EB4B7F4BD671}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Length" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Length is invoked" + }, + "details": { + "name": "Length" + }, + "params": [ + { + "typeid": "{0CE9FA36-1E3A-4C06-9254-B7C73A732053}", + "details": { + "name": "Vector4" + } + } + ], + "results": [ + { + "typeid": "{110C4B14-11A8-4E9D-8638-5051013A56AC}", + "details": { + "name": "double" + } + } + ] + }, + { + "base": "MultiplyByVector", + "context": "{66027D7A-FCD1-4592-93E5-EB4B7F4BD671}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke MultiplyByVector" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after MultiplyByVector is invoked" + }, + "details": { + "name": "MultiplyByVector" + }, + "params": [ + { + "typeid": "{0CE9FA36-1E3A-4C06-9254-B7C73A732053}", + "details": { + "name": "Vector4" + } + }, + { + "typeid": "{0CE9FA36-1E3A-4C06-9254-B7C73A732053}", + "details": { + "name": "Vector4" + } + } + ], + "results": [ + { + "typeid": "{0CE9FA36-1E3A-4C06-9254-B7C73A732053}", + "details": { + "name": "Vector4" + } + } + ] + }, + { + "base": "DirectionTo", + "context": "{66027D7A-FCD1-4592-93E5-EB4B7F4BD671}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke DirectionTo" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after DirectionTo is invoked" + }, + "details": { + "name": "DirectionTo" + }, + "params": [ + { + "typeid": "{0CE9FA36-1E3A-4C06-9254-B7C73A732053}", + "details": { + "name": "Vector4" + } + }, + { + "typeid": "{0CE9FA36-1E3A-4C06-9254-B7C73A732053}", + "details": { + "name": "Vector4" + } + }, + { + "typeid": "{110C4B14-11A8-4E9D-8638-5051013A56AC}", + "details": { + "name": "double" + } + } + ], + "results": [ + { + "typeid": "{F31AA4C4-5A73-510B-BFD3-20ACE0D9CE67}", + "details": { + "name": "tuple" + } + } + ] + }, + { + "base": "DivideByVector", + "context": "{66027D7A-FCD1-4592-93E5-EB4B7F4BD671}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke DivideByVector" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after DivideByVector is invoked" + }, + "details": { + "name": "DivideByVector" + }, + "params": [ + { + "typeid": "{0CE9FA36-1E3A-4C06-9254-B7C73A732053}", + "details": { + "name": "Vector4" + } + }, + { + "typeid": "{0CE9FA36-1E3A-4C06-9254-B7C73A732053}", + "details": { + "name": "Vector4" + } + } + ], + "results": [ + { + "typeid": "{0CE9FA36-1E3A-4C06-9254-B7C73A732053}", + "details": { + "name": "Vector4" + } + } + ] + }, + { + "base": "LengthReciprocal", + "context": "{66027D7A-FCD1-4592-93E5-EB4B7F4BD671}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke LengthReciprocal" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after LengthReciprocal is invoked" + }, + "details": { + "name": "LengthReciprocal" + }, + "params": [ + { + "typeid": "{0CE9FA36-1E3A-4C06-9254-B7C73A732053}", + "details": { + "name": "Vector4" + } + } + ], + "results": [ + { + "typeid": "{110C4B14-11A8-4E9D-8638-5051013A56AC}", + "details": { + "name": "double" + } + } + ] + }, + { + "base": "SetZ", + "context": "{66027D7A-FCD1-4592-93E5-EB4B7F4BD671}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke SetZ" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after SetZ is invoked" + }, + "details": { + "name": "SetZ" + }, + "params": [ + { + "typeid": "{0CE9FA36-1E3A-4C06-9254-B7C73A732053}", + "details": { + "name": "Vector4" + } + }, + { + "typeid": "{110C4B14-11A8-4E9D-8638-5051013A56AC}", + "details": { + "name": "double" + } + } + ], + "results": [ + { + "typeid": "{0CE9FA36-1E3A-4C06-9254-B7C73A732053}", + "details": { + "name": "Vector4" + } + } + ] + }, + { + "base": "Normalize", + "context": "{66027D7A-FCD1-4592-93E5-EB4B7F4BD671}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Normalize" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Normalize is invoked" + }, + "details": { + "name": "Normalize" + }, + "params": [ + { + "typeid": "{0CE9FA36-1E3A-4C06-9254-B7C73A732053}", + "details": { + "name": "Vector4" + } + } + ], + "results": [ + { + "typeid": "{0CE9FA36-1E3A-4C06-9254-B7C73A732053}", + "details": { + "name": "Vector4" + } + } + ] + }, + { + "base": "DivideByNumber", + "context": "{66027D7A-FCD1-4592-93E5-EB4B7F4BD671}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke DivideByNumber" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after DivideByNumber is invoked" + }, + "details": { + "name": "DivideByNumber" + }, + "params": [ + { + "typeid": "{0CE9FA36-1E3A-4C06-9254-B7C73A732053}", + "details": { + "name": "Vector4" + } + }, + { + "typeid": "{110C4B14-11A8-4E9D-8638-5051013A56AC}", + "details": { + "name": "double" + } + } + ], + "results": [ + { + "typeid": "{0CE9FA36-1E3A-4C06-9254-B7C73A732053}", + "details": { + "name": "Vector4" + } + } + ] + }, + { + "base": "IsClose", + "context": "{66027D7A-FCD1-4592-93E5-EB4B7F4BD671}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke IsClose" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after IsClose is invoked" + }, + "details": { + "name": "IsClose" + }, + "params": [ + { + "typeid": "{0CE9FA36-1E3A-4C06-9254-B7C73A732053}", + "details": { + "name": "Vector4" + } + }, + { + "typeid": "{0CE9FA36-1E3A-4C06-9254-B7C73A732053}", + "details": { + "name": "Vector4" + } + }, + { + "typeid": "{110C4B14-11A8-4E9D-8638-5051013A56AC}", + "details": { + "name": "double" + } + } + ], + "results": [ + { + "typeid": "{A0CA880C-AFE4-43CB-926C-59AC48496112}", + "details": { + "name": "bool" + } + } + ] + }, + { + "base": "IsZero", + "context": "{66027D7A-FCD1-4592-93E5-EB4B7F4BD671}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke IsZero" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after IsZero is invoked" + }, + "details": { + "name": "IsZero" + }, + "params": [ + { + "typeid": "{0CE9FA36-1E3A-4C06-9254-B7C73A732053}", + "details": { + "name": "Vector4" + } + }, + { + "typeid": "{110C4B14-11A8-4E9D-8638-5051013A56AC}", + "details": { + "name": "double" + } + } + ], + "results": [ + { + "typeid": "{A0CA880C-AFE4-43CB-926C-59AC48496112}", + "details": { + "name": "bool" + } + } + ] + }, + { + "base": "Add", + "context": "{66027D7A-FCD1-4592-93E5-EB4B7F4BD671}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Add" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Add is invoked" + }, + "details": { + "name": "Add" + }, + "params": [ + { + "typeid": "{0CE9FA36-1E3A-4C06-9254-B7C73A732053}", + "details": { + "name": "Vector4" + } + }, + { + "typeid": "{0CE9FA36-1E3A-4C06-9254-B7C73A732053}", + "details": { + "name": "Vector4" + } + } + ], + "results": [ + { + "typeid": "{0CE9FA36-1E3A-4C06-9254-B7C73A732053}", + "details": { + "name": "Vector4" + } + } + ] + }, + { + "base": "GetElement", + "context": "{66027D7A-FCD1-4592-93E5-EB4B7F4BD671}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke GetElement" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after GetElement is invoked" + }, + "details": { + "name": "GetElement" + }, + "params": [ + { + "typeid": "{0CE9FA36-1E3A-4C06-9254-B7C73A732053}", + "details": { + "name": "Vector4" + } + }, + { + "typeid": "{110C4B14-11A8-4E9D-8638-5051013A56AC}", + "details": { + "name": "double" + } + } + ], + "results": [ + { + "typeid": "{110C4B14-11A8-4E9D-8638-5051013A56AC}", + "details": { + "name": "double" + } + } + ] + }, + { + "base": "Reciprocal", + "context": "{66027D7A-FCD1-4592-93E5-EB4B7F4BD671}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Reciprocal" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Reciprocal is invoked" + }, + "details": { + "name": "Reciprocal" + }, + "params": [ + { + "typeid": "{0CE9FA36-1E3A-4C06-9254-B7C73A732053}", + "details": { + "name": "Vector4" + } + } + ], + "results": [ + { + "typeid": "{0CE9FA36-1E3A-4C06-9254-B7C73A732053}", + "details": { + "name": "Vector4" + } + } + ] + }, + { + "base": "Subtract", + "context": "{66027D7A-FCD1-4592-93E5-EB4B7F4BD671}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Subtract" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Subtract is invoked" + }, + "details": { + "name": "Subtract" + }, + "params": [ + { + "typeid": "{0CE9FA36-1E3A-4C06-9254-B7C73A732053}", + "details": { + "name": "Vector4" + } + }, + { + "typeid": "{0CE9FA36-1E3A-4C06-9254-B7C73A732053}", + "details": { + "name": "Vector4" + } + } + ], + "results": [ + { + "typeid": "{0CE9FA36-1E3A-4C06-9254-B7C73A732053}", + "details": { + "name": "Vector4" + } + } + ] + }, + { + "base": "Absolute", + "context": "{66027D7A-FCD1-4592-93E5-EB4B7F4BD671}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Absolute" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Absolute is invoked" + }, + "details": { + "name": "Absolute" + }, + "params": [ + { + "typeid": "{0CE9FA36-1E3A-4C06-9254-B7C73A732053}", + "details": { + "name": "Vector4" + } + } + ], + "results": [ + { + "typeid": "{0CE9FA36-1E3A-4C06-9254-B7C73A732053}", + "details": { + "name": "Vector4" + } + } + ] + }, + { + "base": "SetY", + "context": "{66027D7A-FCD1-4592-93E5-EB4B7F4BD671}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke SetY" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after SetY is invoked" + }, + "details": { + "name": "SetY" + }, + "params": [ + { + "typeid": "{0CE9FA36-1E3A-4C06-9254-B7C73A732053}", + "details": { + "name": "Vector4" + } + }, + { + "typeid": "{110C4B14-11A8-4E9D-8638-5051013A56AC}", + "details": { + "name": "double" + } + } + ], + "results": [ + { + "typeid": "{0CE9FA36-1E3A-4C06-9254-B7C73A732053}", + "details": { + "name": "Vector4" + } + } + ] + } + ] + }, + { + "base": "{36669095-4036-5479-B116-41A32E4E16EA}", + "context": "OnDemandReflected", + "variant": "", + "details": { + "name": "Tuple" + }, + "methods": [ + { + "base": "Get0", + "context": "{36669095-4036-5479-B116-41A32E4E16EA}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Get0" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Get0 is invoked" + }, + "details": { + "name": "Get0" + }, + "params": [ + { + "typeid": "{36669095-4036-5479-B116-41A32E4E16EA}", + "details": { + "name": "AZStd::tuple" + } + } + ], + "results": [ + { + "typeid": "{9F4E062E-06A0-46D4-85DF-E0DA96467D3A}", + "details": { + "name": "Crc32" + } + } + ] + }, + { + "base": "Get1", + "context": "{36669095-4036-5479-B116-41A32E4E16EA}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Get1" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Get1 is invoked" + }, + "details": { + "name": "Get1" + }, + "params": [ + { + "typeid": "{36669095-4036-5479-B116-41A32E4E16EA}", + "details": { + "name": "AZStd::tuple" + } + } + ], + "results": [ + { + "typeid": "{58422C0E-1E47-4854-98E6-34098F6FE12D}", + "details": { + "name": "AZ::s8" + } + } + ] + }, + { + "base": "GetSize", + "context": "{36669095-4036-5479-B116-41A32E4E16EA}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke GetSize" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after GetSize is invoked" + }, + "details": { + "name": "GetSize" + }, + "results": [ + { + "typeid": "{D6597933-47CD-4FC8-B911-63F3E2B0993A}", + "details": { + "name": "AZ::u64" + } + } + ] + } + ] + }, + { + "base": "{87C2A8D1-7954-5AF0-8E1A-B0BB94A6A291}", + "context": "OnDemandReflected", + "variant": "", + "details": { + "name": "Map", + "category": "Map", + "tooltip": "A collection of Key/Value pairs, where each Key value must be unique." + }, + "methods": [ + { + "base": "contains", + "context": "{87C2A8D1-7954-5AF0-8E1A-B0BB94A6A291}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke contains" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after contains is invoked" + }, + "details": { + "name": "contains" + }, + "params": [ + { + "typeid": "{87C2A8D1-7954-5AF0-8E1A-B0BB94A6A291}", + "details": { + "name": "AZStd::unordered_map" + } + }, + { + "typeid": "{A0CA880C-AFE4-43CB-926C-59AC48496112}", + "details": { + "name": "bool" + } + } + ], + "results": [ + { + "typeid": "{A0CA880C-AFE4-43CB-926C-59AC48496112}", + "details": { + "name": "bool" + } + } + ] + }, + { + "base": "Insert", + "context": "{87C2A8D1-7954-5AF0-8E1A-B0BB94A6A291}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Insert" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Insert is invoked" + }, + "details": { + "name": "Insert" + }, + "params": [ + { + "typeid": "{87C2A8D1-7954-5AF0-8E1A-B0BB94A6A291}", + "details": { + "name": "AZStd::unordered_map" + } + }, + { + "typeid": "{A0CA880C-AFE4-43CB-926C-59AC48496112}", + "details": { + "name": "bool" + } + }, + { + "typeid": "{004ABD25-CF14-4EB3-BD41-022C247C07FA}", + "details": { + "name": "Obb" + } + } + ], + "results": [ + { + "typeid": "{87C2A8D1-7954-5AF0-8E1A-B0BB94A6A291}", + "details": { + "name": "AZStd::unordered_map" + } + } + ] + }, + { + "base": "Reserve", + "context": "{87C2A8D1-7954-5AF0-8E1A-B0BB94A6A291}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Reserve" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Reserve is invoked" + }, + "details": { + "name": "Reserve" + }, + "params": [ + { + "typeid": "{87C2A8D1-7954-5AF0-8E1A-B0BB94A6A291}", + "details": { + "name": "AZStd::unordered_map" + } + }, + { + "typeid": "{D6597933-47CD-4FC8-B911-63F3E2B0993A}", + "details": { + "name": "AZ::u64" + } + } + ] + }, + { + "base": "GetSize", + "context": "{87C2A8D1-7954-5AF0-8E1A-B0BB94A6A291}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke GetSize" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after GetSize is invoked" + }, + "details": { + "name": "GetSize" + }, + "params": [ + { + "typeid": "{87C2A8D1-7954-5AF0-8E1A-B0BB94A6A291}", + "details": { + "name": "AZStd::unordered_map" + } + } + ], + "results": [ + { + "typeid": "{72039442-EB38-4D42-A1AD-CB68F7E0EEF6}", + "details": { + "name": "int" + } + } + ] + }, + { + "base": "Iterate_VM", + "context": "{87C2A8D1-7954-5AF0-8E1A-B0BB94A6A291}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Iterate_VM" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Iterate_VM is invoked" + }, + "details": { + "name": "Iterate_VM" + }, + "params": [ + { + "typeid": "{87C2A8D1-7954-5AF0-8E1A-B0BB94A6A291}", + "details": { + "name": "AZStd::unordered_map" + } + } + ], + "results": [ + { + "typeid": "{BBBB6E86-5131-507E-810A-CE14E722DB6A}", + "details": { + "name": "Iterator_VM, AZStd::equal_to, allocator>>" + } + } + ] + }, + { + "base": "GetKeys", + "context": "{87C2A8D1-7954-5AF0-8E1A-B0BB94A6A291}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke GetKeys" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after GetKeys is invoked" + }, + "details": { + "name": "GetKeys" + }, + "params": [ + { + "typeid": "{87C2A8D1-7954-5AF0-8E1A-B0BB94A6A291}", + "details": { + "name": "AZStd::unordered_map" + } + } + ], + "results": [ + { + "typeid": "{B505B05D-57BF-5A45-9113-B3A2784E2CD7}", + "details": { + "name": "AZStd::vector" + } + } + ] + }, + { + "base": "Size", + "context": "{87C2A8D1-7954-5AF0-8E1A-B0BB94A6A291}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Size" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Size is invoked" + }, + "details": { + "name": "Size" + }, + "params": [ + { + "typeid": "{87C2A8D1-7954-5AF0-8E1A-B0BB94A6A291}", + "details": { + "name": "AZStd::unordered_map" + } + } + ], + "results": [ + { + "typeid": "{72039442-EB38-4D42-A1AD-CB68F7E0EEF6}", + "details": { + "name": "int" + } + } + ] + }, + { + "base": "Erase", + "context": "{87C2A8D1-7954-5AF0-8E1A-B0BB94A6A291}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Erase" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Erase is invoked" + }, + "details": { + "name": "Erase" + }, + "params": [ + { + "typeid": "{87C2A8D1-7954-5AF0-8E1A-B0BB94A6A291}", + "details": { + "name": "AZStd::unordered_map" + } + }, + { + "typeid": "{A0CA880C-AFE4-43CB-926C-59AC48496112}", + "details": { + "name": "bool" + } + } + ], + "results": [ + { + "typeid": "{87C2A8D1-7954-5AF0-8E1A-B0BB94A6A291}", + "details": { + "name": "AZStd::unordered_map" + } + } + ] + }, + { + "base": "EraseCheck_VM", + "context": "{87C2A8D1-7954-5AF0-8E1A-B0BB94A6A291}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke EraseCheck_VM" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after EraseCheck_VM is invoked" + }, + "details": { + "name": "EraseCheck_VM" + }, + "params": [ + { + "typeid": "{87C2A8D1-7954-5AF0-8E1A-B0BB94A6A291}", + "details": { + "name": "AZStd::unordered_map" + } + }, + { + "typeid": "{A0CA880C-AFE4-43CB-926C-59AC48496112}", + "details": { + "name": "bool" + } + } + ], + "results": [ + { + "typeid": "{A0CA880C-AFE4-43CB-926C-59AC48496112}", + "details": { + "name": "bool" + } + } + ] + }, + { + "base": "Clear", + "context": "{87C2A8D1-7954-5AF0-8E1A-B0BB94A6A291}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Clear" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Clear is invoked" + }, + "details": { + "name": "Clear" + }, + "params": [ + { + "typeid": "{87C2A8D1-7954-5AF0-8E1A-B0BB94A6A291}", + "details": { + "name": "AZStd::unordered_map" + } + } + ], + "results": [ + { + "typeid": "{87C2A8D1-7954-5AF0-8E1A-B0BB94A6A291}", + "details": { + "name": "AZStd::unordered_map" + } + } + ] + }, + { + "base": "At", + "context": "{87C2A8D1-7954-5AF0-8E1A-B0BB94A6A291}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke At" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after At is invoked" + }, + "details": { + "name": "At" + }, + "params": [ + { + "typeid": "{87C2A8D1-7954-5AF0-8E1A-B0BB94A6A291}", + "details": { + "name": "AZStd::unordered_map" + } + }, + { + "typeid": "{A0CA880C-AFE4-43CB-926C-59AC48496112}", + "details": { + "name": "bool" + } + } + ], + "results": [ + { + "typeid": "{004ABD25-CF14-4EB3-BD41-022C247C07FA}", + "details": { + "name": "Obb" + } + } + ] + }, + { + "base": "BucketCount", + "context": "{87C2A8D1-7954-5AF0-8E1A-B0BB94A6A291}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke BucketCount" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after BucketCount is invoked" + }, + "details": { + "name": "BucketCount" + }, + "params": [ + { + "typeid": "{87C2A8D1-7954-5AF0-8E1A-B0BB94A6A291}", + "details": { + "name": "AZStd::unordered_map" + } + } + ], + "results": [ + { + "typeid": "{D6597933-47CD-4FC8-B911-63F3E2B0993A}", + "details": { + "name": "AZ::u64" + } + } + ] + }, + { + "base": "Empty", + "context": "{87C2A8D1-7954-5AF0-8E1A-B0BB94A6A291}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Empty" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Empty is invoked" + }, + "details": { + "name": "Empty" + }, + "params": [ + { + "typeid": "{87C2A8D1-7954-5AF0-8E1A-B0BB94A6A291}", + "details": { + "name": "AZStd::unordered_map" + } + } + ], + "results": [ + { + "typeid": "{A0CA880C-AFE4-43CB-926C-59AC48496112}", + "details": { + "name": "bool" + } + } + ] + }, + { + "base": "Swap", + "context": "{87C2A8D1-7954-5AF0-8E1A-B0BB94A6A291}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Swap" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Swap is invoked" + }, + "details": { + "name": "Swap" + }, + "params": [ + { + "typeid": "{87C2A8D1-7954-5AF0-8E1A-B0BB94A6A291}", + "details": { + "name": "AZStd::unordered_map" + } + }, + { + "typeid": "{87C2A8D1-7954-5AF0-8E1A-B0BB94A6A291}", + "details": { + "name": "AZStd::unordered_map" + } + } + ] + } + ] + }, + { + "base": "{F31F64EA-E384-5536-ACD6-8F01849730FC}", + "context": "OnDemandReflected", + "variant": "", + "details": { + "name": "Array", + "category": "Array", + "tooltip": "A dynamically sized container of elements." + }, + "methods": [ + { + "base": "Size", + "context": "{F31F64EA-E384-5536-ACD6-8F01849730FC}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Size" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Size is invoked" + }, + "details": { + "name": "Size" + }, + "params": [ + { + "typeid": "{F31F64EA-E384-5536-ACD6-8F01849730FC}", + "details": { + "name": "AZStd::vector" + } + } + ], + "results": [ + { + "typeid": "{72039442-EB38-4D42-A1AD-CB68F7E0EEF6}", + "details": { + "name": "int" + } + } + ] + }, + { + "base": "Front", + "context": "{F31F64EA-E384-5536-ACD6-8F01849730FC}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Front" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Front is invoked" + }, + "details": { + "name": "Front" + }, + "params": [ + { + "typeid": "{F31F64EA-E384-5536-ACD6-8F01849730FC}", + "details": { + "name": "AZStd::vector" + } + } + ], + "results": [ + { + "typeid": "{110C4B14-11A8-4E9D-8638-5051013A56AC}", + "details": { + "name": "double" + } + } + ] + }, + { + "base": "HasKey", + "context": "{F31F64EA-E384-5536-ACD6-8F01849730FC}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Has Key" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Has Key is invoked" + }, + "details": { + "name": "Has Key" + }, + "params": [ + { + "typeid": "{F31F64EA-E384-5536-ACD6-8F01849730FC}", + "details": { + "name": "AZStd::vector" + } + }, + { + "typeid": "{D6597933-47CD-4FC8-B911-63F3E2B0993A}", + "details": { + "name": "AZ::u64" + } + } + ], + "results": [ + { + "typeid": "{A0CA880C-AFE4-43CB-926C-59AC48496112}", + "details": { + "name": "bool" + } + } + ] + }, + { + "base": "Resize", + "context": "{F31F64EA-E384-5536-ACD6-8F01849730FC}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Resize" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Resize is invoked" + }, + "details": { + "name": "Resize" + }, + "params": [ + { + "typeid": "{F31F64EA-E384-5536-ACD6-8F01849730FC}", + "details": { + "name": "AZStd::vector" + } + }, + { + "typeid": "{D6597933-47CD-4FC8-B911-63F3E2B0993A}", + "details": { + "name": "AZ::u64" + } + } + ] + }, + { + "base": "at", + "context": "{F31F64EA-E384-5536-ACD6-8F01849730FC}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke at" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after at is invoked" + }, + "details": { + "name": "at" + }, + "params": [ + { + "typeid": "{F31F64EA-E384-5536-ACD6-8F01849730FC}", + "details": { + "name": "AZStd::vector" + } + }, + { + "typeid": "{D6597933-47CD-4FC8-B911-63F3E2B0993A}", + "details": { + "name": "AZ::u64" + } + } + ], + "results": [ + { + "typeid": "{110C4B14-11A8-4E9D-8638-5051013A56AC}", + "details": { + "name": "double" + } + } + ] + }, + { + "base": "Back", + "context": "{F31F64EA-E384-5536-ACD6-8F01849730FC}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Back" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Back is invoked" + }, + "details": { + "name": "Back" + }, + "params": [ + { + "typeid": "{F31F64EA-E384-5536-ACD6-8F01849730FC}", + "details": { + "name": "AZStd::vector" + } + } + ], + "results": [ + { + "typeid": "{110C4B14-11A8-4E9D-8638-5051013A56AC}", + "details": { + "name": "double" + } + } + ] + }, + { + "base": "pop_back", + "context": "{F31F64EA-E384-5536-ACD6-8F01849730FC}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke pop_back" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after pop_back is invoked" + }, + "details": { + "name": "pop_back" + }, + "params": [ + { + "typeid": "{F31F64EA-E384-5536-ACD6-8F01849730FC}", + "details": { + "name": "AZStd::vector" + } + } + ] + }, + { + "base": "size", + "context": "{F31F64EA-E384-5536-ACD6-8F01849730FC}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke size" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after size is invoked" + }, + "details": { + "name": "size" + }, + "params": [ + { + "typeid": "{F31F64EA-E384-5536-ACD6-8F01849730FC}", + "details": { + "name": "AZStd::vector" + } + } + ], + "results": [ + { + "typeid": "{72039442-EB38-4D42-A1AD-CB68F7E0EEF6}", + "details": { + "name": "int" + } + } + ] + }, + { + "base": "At", + "context": "{F31F64EA-E384-5536-ACD6-8F01849730FC}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke At" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after At is invoked" + }, + "details": { + "name": "At" + }, + "params": [ + { + "typeid": "{F31F64EA-E384-5536-ACD6-8F01849730FC}", + "details": { + "name": "AZStd::vector" + } + }, + { + "typeid": "{D6597933-47CD-4FC8-B911-63F3E2B0993A}", + "details": { + "name": "AZ::u64" + } + } + ], + "results": [ + { + "typeid": "{110C4B14-11A8-4E9D-8638-5051013A56AC}", + "details": { + "name": "double" + } + } + ] + }, + { + "base": "Empty", + "context": "{F31F64EA-E384-5536-ACD6-8F01849730FC}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Empty" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Empty is invoked" + }, + "details": { + "name": "Empty" + }, + "params": [ + { + "typeid": "{F31F64EA-E384-5536-ACD6-8F01849730FC}", + "details": { + "name": "AZStd::vector" + } + } + ], + "results": [ + { + "typeid": "{A0CA880C-AFE4-43CB-926C-59AC48496112}", + "details": { + "name": "bool" + } + } + ] + }, + { + "base": "Swap", + "context": "{F31F64EA-E384-5536-ACD6-8F01849730FC}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Swap" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Swap is invoked" + }, + "details": { + "name": "Swap" + }, + "params": [ + { + "typeid": "{F31F64EA-E384-5536-ACD6-8F01849730FC}", + "details": { + "name": "AZStd::vector" + } + }, + { + "typeid": "{F31F64EA-E384-5536-ACD6-8F01849730FC}", + "details": { + "name": "AZStd::vector" + } + } + ] + }, + { + "base": "push_back", + "context": "{F31F64EA-E384-5536-ACD6-8F01849730FC}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke push_back" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after push_back is invoked" + }, + "details": { + "name": "push_back" + }, + "params": [ + { + "typeid": "{F31F64EA-E384-5536-ACD6-8F01849730FC}", + "details": { + "name": "AZStd::vector" + } + }, + { + "typeid": "{110C4B14-11A8-4E9D-8638-5051013A56AC}", + "details": { + "name": "double" + } + } + ] + }, + { + "base": "PushBack_VM", + "context": "{F31F64EA-E384-5536-ACD6-8F01849730FC}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke PushBack_VM" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after PushBack_VM is invoked" + }, + "details": { + "name": "PushBack_VM" + }, + "params": [ + { + "typeid": "{F31F64EA-E384-5536-ACD6-8F01849730FC}", + "details": { + "name": "AZStd::vector" + } + }, + { + "typeid": "{110C4B14-11A8-4E9D-8638-5051013A56AC}", + "details": { + "name": "double" + } + } + ], + "results": [ + { + "typeid": "{F31F64EA-E384-5536-ACD6-8F01849730FC}", + "details": { + "name": "AZStd::vector" + } + } + ] + }, + { + "base": "AtUnchecked", + "context": "{F31F64EA-E384-5536-ACD6-8F01849730FC}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke AtUnchecked" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after AtUnchecked is invoked" + }, + "details": { + "name": "AtUnchecked" + }, + "params": [ + { + "typeid": "{F31F64EA-E384-5536-ACD6-8F01849730FC}", + "details": { + "name": "AZStd::vector" + } + }, + { + "typeid": "{D6597933-47CD-4FC8-B911-63F3E2B0993A}", + "details": { + "name": "AZ::u64" + } + } + ], + "results": [ + { + "typeid": "{110C4B14-11A8-4E9D-8638-5051013A56AC}", + "details": { + "name": "double" + } + } + ] + }, + { + "base": "clear", + "context": "{F31F64EA-E384-5536-ACD6-8F01849730FC}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke clear" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after clear is invoked" + }, + "details": { + "name": "clear" + }, + "params": [ + { + "typeid": "{F31F64EA-E384-5536-ACD6-8F01849730FC}", + "details": { + "name": "AZStd::vector" + } + } + ] + }, + { + "base": "NotEmpty", + "context": "{F31F64EA-E384-5536-ACD6-8F01849730FC}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke NotEmpty" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after NotEmpty is invoked" + }, + "details": { + "name": "NotEmpty" + }, + "params": [ + { + "typeid": "{F31F64EA-E384-5536-ACD6-8F01849730FC}", + "details": { + "name": "AZStd::vector" + } + } + ], + "results": [ + { + "typeid": "{A0CA880C-AFE4-43CB-926C-59AC48496112}", + "details": { + "name": "bool" + } + } + ] + }, + { + "base": "Erase_VM", + "context": "{F31F64EA-E384-5536-ACD6-8F01849730FC}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Erase_VM" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Erase_VM is invoked" + }, + "details": { + "name": "Erase_VM" + }, + "params": [ + { + "typeid": "{F31F64EA-E384-5536-ACD6-8F01849730FC}", + "details": { + "name": "AZStd::vector" + } + }, + { + "typeid": "{D6597933-47CD-4FC8-B911-63F3E2B0993A}", + "details": { + "name": "AZ::u64" + } + } + ], + "results": [ + { + "typeid": "{F31F64EA-E384-5536-ACD6-8F01849730FC}", + "details": { + "name": "AZStd::vector" + } + } + ] + }, + { + "base": "EraseCheck_VM", + "context": "{F31F64EA-E384-5536-ACD6-8F01849730FC}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke EraseCheck_VM" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after EraseCheck_VM is invoked" + }, + "details": { + "name": "EraseCheck_VM" + }, + "params": [ + { + "typeid": "{F31F64EA-E384-5536-ACD6-8F01849730FC}", + "details": { + "name": "AZStd::vector" + } + }, + { + "typeid": "{D6597933-47CD-4FC8-B911-63F3E2B0993A}", + "details": { + "name": "AZ::u64" + } + } + ], + "results": [ + { + "typeid": "{A0CA880C-AFE4-43CB-926C-59AC48496112}", + "details": { + "name": "bool" + } + } + ] + }, + { + "base": "Capacity", + "context": "{F31F64EA-E384-5536-ACD6-8F01849730FC}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Capacity" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Capacity is invoked" + }, + "details": { + "name": "Capacity" + }, + "params": [ + { + "typeid": "{F31F64EA-E384-5536-ACD6-8F01849730FC}", + "details": { + "name": "AZStd::vector" + } + } + ], + "results": [ + { + "typeid": "{D6597933-47CD-4FC8-B911-63F3E2B0993A}", + "details": { + "name": "AZ::u64" + } + } + ] + }, + { + "base": "Clear", + "context": "{F31F64EA-E384-5536-ACD6-8F01849730FC}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Clear" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Clear is invoked" + }, + "details": { + "name": "Clear" + }, + "params": [ + { + "typeid": "{F31F64EA-E384-5536-ACD6-8F01849730FC}", + "details": { + "name": "AZStd::vector" + } + } + ], + "results": [ + { + "typeid": "{F31F64EA-E384-5536-ACD6-8F01849730FC}", + "details": { + "name": "AZStd::vector" + } + } + ] + }, + { + "base": "AssignAt", + "context": "{F31F64EA-E384-5536-ACD6-8F01849730FC}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke AssignAt" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after AssignAt is invoked" + }, + "details": { + "name": "AssignAt" + }, + "params": [ + { + "typeid": "{F31F64EA-E384-5536-ACD6-8F01849730FC}", + "details": { + "name": "AZStd::vector" + } + }, + { + "typeid": "{D6597933-47CD-4FC8-B911-63F3E2B0993A}", + "details": { + "name": "AZ::u64" + } + }, + { + "typeid": "{110C4B14-11A8-4E9D-8638-5051013A56AC}", + "details": { + "name": "double" + } + } + ] + }, + { + "base": "GetSize", + "context": "{F31F64EA-E384-5536-ACD6-8F01849730FC}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke GetSize" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after GetSize is invoked" + }, + "details": { + "name": "GetSize" + }, + "params": [ + { + "typeid": "{F31F64EA-E384-5536-ACD6-8F01849730FC}", + "details": { + "name": "AZStd::vector" + } + } + ], + "results": [ + { + "typeid": "{72039442-EB38-4D42-A1AD-CB68F7E0EEF6}", + "details": { + "name": "int" + } + } + ] + }, + { + "base": "Insert", + "context": "{F31F64EA-E384-5536-ACD6-8F01849730FC}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Insert" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Insert is invoked" + }, + "details": { + "name": "Insert" + }, + "params": [ + { + "typeid": "{F31F64EA-E384-5536-ACD6-8F01849730FC}", + "details": { + "name": "AZStd::vector" + } + }, + { + "typeid": "{D6597933-47CD-4FC8-B911-63F3E2B0993A}", + "details": { + "name": "AZ::u64" + } + }, + { + "typeid": "{110C4B14-11A8-4E9D-8638-5051013A56AC}", + "details": { + "name": "double" + } + } + ], + "results": [ + { + "typeid": "{F31F64EA-E384-5536-ACD6-8F01849730FC}", + "details": { + "name": "AZStd::vector" + } + } + ] + }, + { + "base": "PushBack", + "context": "{F31F64EA-E384-5536-ACD6-8F01849730FC}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke PushBack" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after PushBack is invoked" + }, + "details": { + "name": "PushBack" + }, + "params": [ + { + "typeid": "{F31F64EA-E384-5536-ACD6-8F01849730FC}", + "details": { + "name": "AZStd::vector" + } + }, + { + "typeid": "{110C4B14-11A8-4E9D-8638-5051013A56AC}", + "details": { + "name": "double" + } + } + ] + }, + { + "base": "Reserve", + "context": "{F31F64EA-E384-5536-ACD6-8F01849730FC}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Reserve" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Reserve is invoked" + }, + "details": { + "name": "Reserve" + }, + "params": [ + { + "typeid": "{F31F64EA-E384-5536-ACD6-8F01849730FC}", + "details": { + "name": "AZStd::vector" + } + }, + { + "typeid": "{D6597933-47CD-4FC8-B911-63F3E2B0993A}", + "details": { + "name": "AZ::u64" + } + } + ] + }, + { + "base": "Iterate_VM", + "context": "{F31F64EA-E384-5536-ACD6-8F01849730FC}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Iterate_VM" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Iterate_VM is invoked" + }, + "details": { + "name": "Iterate_VM" + }, + "params": [ + { + "typeid": "{F31F64EA-E384-5536-ACD6-8F01849730FC}", + "details": { + "name": "AZStd::vector" + } + } + ], + "results": [ + { + "typeid": "{30E6B65F-7B30-5B32-903C-BBE8E5DED781}", + "details": { + "name": "Iterator_VM>" + } + } + ] + } + ] + }, + { + "base": "{99DAD0BC-740E-5E82-826B-8FC7968CC02C}", + "context": "OnDemandReflected", + "variant": "", + "details": { + "name": "Array", + "category": "Array", + "tooltip": "A dynamically sized container of elements." + }, + "methods": [ + { + "base": "Size", + "context": "{99DAD0BC-740E-5E82-826B-8FC7968CC02C}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Size" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Size is invoked" + }, + "details": { + "name": "Size" + }, + "params": [ + { + "typeid": "{99DAD0BC-740E-5E82-826B-8FC7968CC02C}", + "details": { + "name": "AZStd::vector" + } + } + ], + "results": [ + { + "typeid": "{72039442-EB38-4D42-A1AD-CB68F7E0EEF6}", + "details": { + "name": "int" + } + } + ] + }, + { + "base": "Front", + "context": "{99DAD0BC-740E-5E82-826B-8FC7968CC02C}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Front" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Front is invoked" + }, + "details": { + "name": "Front" + }, + "params": [ + { + "typeid": "{99DAD0BC-740E-5E82-826B-8FC7968CC02C}", + "details": { + "name": "AZStd::vector" + } + } + ], + "results": [ + { + "typeid": "{03AAAB3F-5C47-5A66-9EBC-D5FA4DB353C9}", + "details": { + "name": "AZStd::string" + } + } + ] + }, + { + "base": "HasKey", + "context": "{99DAD0BC-740E-5E82-826B-8FC7968CC02C}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Has Key" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Has Key is invoked" + }, + "details": { + "name": "Has Key" + }, + "params": [ + { + "typeid": "{99DAD0BC-740E-5E82-826B-8FC7968CC02C}", + "details": { + "name": "AZStd::vector" + } + }, + { + "typeid": "{D6597933-47CD-4FC8-B911-63F3E2B0993A}", + "details": { + "name": "AZ::u64" + } + } + ], + "results": [ + { + "typeid": "{A0CA880C-AFE4-43CB-926C-59AC48496112}", + "details": { + "name": "bool" + } + } + ] + }, + { + "base": "Resize", + "context": "{99DAD0BC-740E-5E82-826B-8FC7968CC02C}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Resize" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Resize is invoked" + }, + "details": { + "name": "Resize" + }, + "params": [ + { + "typeid": "{99DAD0BC-740E-5E82-826B-8FC7968CC02C}", + "details": { + "name": "AZStd::vector" + } + }, + { + "typeid": "{D6597933-47CD-4FC8-B911-63F3E2B0993A}", + "details": { + "name": "AZ::u64" + } + } + ] + }, + { + "base": "at", + "context": "{99DAD0BC-740E-5E82-826B-8FC7968CC02C}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke at" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after at is invoked" + }, + "details": { + "name": "at" + }, + "params": [ + { + "typeid": "{99DAD0BC-740E-5E82-826B-8FC7968CC02C}", + "details": { + "name": "AZStd::vector" + } + }, + { + "typeid": "{D6597933-47CD-4FC8-B911-63F3E2B0993A}", + "details": { + "name": "AZ::u64" + } + } + ], + "results": [ + { + "typeid": "{03AAAB3F-5C47-5A66-9EBC-D5FA4DB353C9}", + "details": { + "name": "AZStd::string" + } + } + ] + }, + { + "base": "Back", + "context": "{99DAD0BC-740E-5E82-826B-8FC7968CC02C}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Back" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Back is invoked" + }, + "details": { + "name": "Back" + }, + "params": [ + { + "typeid": "{99DAD0BC-740E-5E82-826B-8FC7968CC02C}", + "details": { + "name": "AZStd::vector" + } + } + ], + "results": [ + { + "typeid": "{03AAAB3F-5C47-5A66-9EBC-D5FA4DB353C9}", + "details": { + "name": "AZStd::string" + } + } + ] + }, + { + "base": "pop_back", + "context": "{99DAD0BC-740E-5E82-826B-8FC7968CC02C}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke pop_back" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after pop_back is invoked" + }, + "details": { + "name": "pop_back" + }, + "params": [ + { + "typeid": "{99DAD0BC-740E-5E82-826B-8FC7968CC02C}", + "details": { + "name": "AZStd::vector" + } + } + ] + }, + { + "base": "size", + "context": "{99DAD0BC-740E-5E82-826B-8FC7968CC02C}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke size" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after size is invoked" + }, + "details": { + "name": "size" + }, + "params": [ + { + "typeid": "{99DAD0BC-740E-5E82-826B-8FC7968CC02C}", + "details": { + "name": "AZStd::vector" + } + } + ], + "results": [ + { + "typeid": "{72039442-EB38-4D42-A1AD-CB68F7E0EEF6}", + "details": { + "name": "int" + } + } + ] + }, + { + "base": "At", + "context": "{99DAD0BC-740E-5E82-826B-8FC7968CC02C}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke At" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after At is invoked" + }, + "details": { + "name": "At" + }, + "params": [ + { + "typeid": "{99DAD0BC-740E-5E82-826B-8FC7968CC02C}", + "details": { + "name": "AZStd::vector" + } + }, + { + "typeid": "{D6597933-47CD-4FC8-B911-63F3E2B0993A}", + "details": { + "name": "AZ::u64" + } + } + ], + "results": [ + { + "typeid": "{03AAAB3F-5C47-5A66-9EBC-D5FA4DB353C9}", + "details": { + "name": "AZStd::string" + } + } + ] + }, + { + "base": "Empty", + "context": "{99DAD0BC-740E-5E82-826B-8FC7968CC02C}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Empty" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Empty is invoked" + }, + "details": { + "name": "Empty" + }, + "params": [ + { + "typeid": "{99DAD0BC-740E-5E82-826B-8FC7968CC02C}", + "details": { + "name": "AZStd::vector" + } + } + ], + "results": [ + { + "typeid": "{A0CA880C-AFE4-43CB-926C-59AC48496112}", + "details": { + "name": "bool" + } + } + ] + }, + { + "base": "Swap", + "context": "{99DAD0BC-740E-5E82-826B-8FC7968CC02C}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Swap" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Swap is invoked" + }, + "details": { + "name": "Swap" + }, + "params": [ + { + "typeid": "{99DAD0BC-740E-5E82-826B-8FC7968CC02C}", + "details": { + "name": "AZStd::vector" + } + }, + { + "typeid": "{99DAD0BC-740E-5E82-826B-8FC7968CC02C}", + "details": { + "name": "AZStd::vector" + } + } + ] + }, + { + "base": "push_back", + "context": "{99DAD0BC-740E-5E82-826B-8FC7968CC02C}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke push_back" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after push_back is invoked" + }, + "details": { + "name": "push_back" + }, + "params": [ + { + "typeid": "{99DAD0BC-740E-5E82-826B-8FC7968CC02C}", + "details": { + "name": "AZStd::vector" + } + }, + { + "typeid": "{03AAAB3F-5C47-5A66-9EBC-D5FA4DB353C9}", + "details": { + "name": "AZStd::string" + } + } + ] + }, + { + "base": "PushBack_VM", + "context": "{99DAD0BC-740E-5E82-826B-8FC7968CC02C}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke PushBack_VM" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after PushBack_VM is invoked" + }, + "details": { + "name": "PushBack_VM" + }, + "params": [ + { + "typeid": "{99DAD0BC-740E-5E82-826B-8FC7968CC02C}", + "details": { + "name": "AZStd::vector" + } + }, + { + "typeid": "{03AAAB3F-5C47-5A66-9EBC-D5FA4DB353C9}", + "details": { + "name": "AZStd::string" + } + } + ], + "results": [ + { + "typeid": "{99DAD0BC-740E-5E82-826B-8FC7968CC02C}", + "details": { + "name": "AZStd::vector" + } + } + ] + }, + { + "base": "AtUnchecked", + "context": "{99DAD0BC-740E-5E82-826B-8FC7968CC02C}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke AtUnchecked" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after AtUnchecked is invoked" + }, + "details": { + "name": "AtUnchecked" + }, + "params": [ + { + "typeid": "{99DAD0BC-740E-5E82-826B-8FC7968CC02C}", + "details": { + "name": "AZStd::vector" + } + }, + { + "typeid": "{D6597933-47CD-4FC8-B911-63F3E2B0993A}", + "details": { + "name": "AZ::u64" + } + } + ], + "results": [ + { + "typeid": "{03AAAB3F-5C47-5A66-9EBC-D5FA4DB353C9}", + "details": { + "name": "AZStd::string" + } + } + ] + }, + { + "base": "clear", + "context": "{99DAD0BC-740E-5E82-826B-8FC7968CC02C}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke clear" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after clear is invoked" + }, + "details": { + "name": "clear" + }, + "params": [ + { + "typeid": "{99DAD0BC-740E-5E82-826B-8FC7968CC02C}", + "details": { + "name": "AZStd::vector" + } + } + ] + }, + { + "base": "NotEmpty", + "context": "{99DAD0BC-740E-5E82-826B-8FC7968CC02C}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke NotEmpty" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after NotEmpty is invoked" + }, + "details": { + "name": "NotEmpty" + }, + "params": [ + { + "typeid": "{99DAD0BC-740E-5E82-826B-8FC7968CC02C}", + "details": { + "name": "AZStd::vector" + } + } + ], + "results": [ + { + "typeid": "{A0CA880C-AFE4-43CB-926C-59AC48496112}", + "details": { + "name": "bool" + } + } + ] + }, + { + "base": "Erase_VM", + "context": "{99DAD0BC-740E-5E82-826B-8FC7968CC02C}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Erase_VM" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Erase_VM is invoked" + }, + "details": { + "name": "Erase_VM" + }, + "params": [ + { + "typeid": "{99DAD0BC-740E-5E82-826B-8FC7968CC02C}", + "details": { + "name": "AZStd::vector" + } + }, + { + "typeid": "{D6597933-47CD-4FC8-B911-63F3E2B0993A}", + "details": { + "name": "AZ::u64" + } + } + ], + "results": [ + { + "typeid": "{99DAD0BC-740E-5E82-826B-8FC7968CC02C}", + "details": { + "name": "AZStd::vector" + } + } + ] + }, + { + "base": "EraseCheck_VM", + "context": "{99DAD0BC-740E-5E82-826B-8FC7968CC02C}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke EraseCheck_VM" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after EraseCheck_VM is invoked" + }, + "details": { + "name": "EraseCheck_VM" + }, + "params": [ + { + "typeid": "{99DAD0BC-740E-5E82-826B-8FC7968CC02C}", + "details": { + "name": "AZStd::vector" + } + }, + { + "typeid": "{D6597933-47CD-4FC8-B911-63F3E2B0993A}", + "details": { + "name": "AZ::u64" + } + } + ], + "results": [ + { + "typeid": "{A0CA880C-AFE4-43CB-926C-59AC48496112}", + "details": { + "name": "bool" + } + } + ] + }, + { + "base": "Capacity", + "context": "{99DAD0BC-740E-5E82-826B-8FC7968CC02C}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Capacity" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Capacity is invoked" + }, + "details": { + "name": "Capacity" + }, + "params": [ + { + "typeid": "{99DAD0BC-740E-5E82-826B-8FC7968CC02C}", + "details": { + "name": "AZStd::vector" + } + } + ], + "results": [ + { + "typeid": "{D6597933-47CD-4FC8-B911-63F3E2B0993A}", + "details": { + "name": "AZ::u64" + } + } + ] + }, + { + "base": "Clear", + "context": "{99DAD0BC-740E-5E82-826B-8FC7968CC02C}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Clear" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Clear is invoked" + }, + "details": { + "name": "Clear" + }, + "params": [ + { + "typeid": "{99DAD0BC-740E-5E82-826B-8FC7968CC02C}", + "details": { + "name": "AZStd::vector" + } + } + ], + "results": [ + { + "typeid": "{99DAD0BC-740E-5E82-826B-8FC7968CC02C}", + "details": { + "name": "AZStd::vector" + } + } + ] + }, + { + "base": "AssignAt", + "context": "{99DAD0BC-740E-5E82-826B-8FC7968CC02C}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke AssignAt" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after AssignAt is invoked" + }, + "details": { + "name": "AssignAt" + }, + "params": [ + { + "typeid": "{99DAD0BC-740E-5E82-826B-8FC7968CC02C}", + "details": { + "name": "AZStd::vector" + } + }, + { + "typeid": "{D6597933-47CD-4FC8-B911-63F3E2B0993A}", + "details": { + "name": "AZ::u64" + } + }, + { + "typeid": "{03AAAB3F-5C47-5A66-9EBC-D5FA4DB353C9}", + "details": { + "name": "AZStd::string" + } + } + ] + }, + { + "base": "GetSize", + "context": "{99DAD0BC-740E-5E82-826B-8FC7968CC02C}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke GetSize" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after GetSize is invoked" + }, + "details": { + "name": "GetSize" + }, + "params": [ + { + "typeid": "{99DAD0BC-740E-5E82-826B-8FC7968CC02C}", + "details": { + "name": "AZStd::vector" + } + } + ], + "results": [ + { + "typeid": "{72039442-EB38-4D42-A1AD-CB68F7E0EEF6}", + "details": { + "name": "int" + } + } + ] + }, + { + "base": "Insert", + "context": "{99DAD0BC-740E-5E82-826B-8FC7968CC02C}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Insert" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Insert is invoked" + }, + "details": { + "name": "Insert" + }, + "params": [ + { + "typeid": "{99DAD0BC-740E-5E82-826B-8FC7968CC02C}", + "details": { + "name": "AZStd::vector" + } + }, + { + "typeid": "{D6597933-47CD-4FC8-B911-63F3E2B0993A}", + "details": { + "name": "AZ::u64" + } + }, + { + "typeid": "{03AAAB3F-5C47-5A66-9EBC-D5FA4DB353C9}", + "details": { + "name": "AZStd::string" + } + } + ], + "results": [ + { + "typeid": "{99DAD0BC-740E-5E82-826B-8FC7968CC02C}", + "details": { + "name": "AZStd::vector" + } + } + ] + }, + { + "base": "PushBack", + "context": "{99DAD0BC-740E-5E82-826B-8FC7968CC02C}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke PushBack" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after PushBack is invoked" + }, + "details": { + "name": "PushBack" + }, + "params": [ + { + "typeid": "{99DAD0BC-740E-5E82-826B-8FC7968CC02C}", + "details": { + "name": "AZStd::vector" + } + }, + { + "typeid": "{03AAAB3F-5C47-5A66-9EBC-D5FA4DB353C9}", + "details": { + "name": "AZStd::string" + } + } + ] + }, + { + "base": "Reserve", + "context": "{99DAD0BC-740E-5E82-826B-8FC7968CC02C}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Reserve" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Reserve is invoked" + }, + "details": { + "name": "Reserve" + }, + "params": [ + { + "typeid": "{99DAD0BC-740E-5E82-826B-8FC7968CC02C}", + "details": { + "name": "AZStd::vector" + } + }, + { + "typeid": "{D6597933-47CD-4FC8-B911-63F3E2B0993A}", + "details": { + "name": "AZ::u64" + } + } + ] + }, + { + "base": "Iterate_VM", + "context": "{99DAD0BC-740E-5E82-826B-8FC7968CC02C}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Iterate_VM" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Iterate_VM is invoked" + }, + "details": { + "name": "Iterate_VM" + }, + "params": [ + { + "typeid": "{99DAD0BC-740E-5E82-826B-8FC7968CC02C}", + "details": { + "name": "AZStd::vector" + } + } + ], + "results": [ + { + "typeid": "{16FED0F7-1100-589D-BBDF-AC414DA04E52}", + "details": { + "name": "Iterator_VM, allocator>, allocator>>" + } + } + ] + } + ] + }, + { + "base": "{537AB179-E23C-492D-8EF7-53845A2DB163}", + "context": "OnDemandReflected", + "variant": "", + "details": { + "name": "MathMatrix4x4_VM" + }, + "methods": [ + { + "base": "GetRow", + "context": "{537AB179-E23C-492D-8EF7-53845A2DB163}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke GetRow" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after GetRow is invoked" + }, + "details": { + "name": "GetRow" + }, + "params": [ + { + "typeid": "{157193C7-B673-4A2B-8B43-5681DCC3DEC3}", + "details": { + "name": "Matrix4x4" + } + }, + { + "typeid": "{110C4B14-11A8-4E9D-8638-5051013A56AC}", + "details": { + "name": "double" + } + } + ], + "results": [ + { + "typeid": "{0CE9FA36-1E3A-4C06-9254-B7C73A732053}", + "details": { + "name": "Vector4" + } + } + ] + }, + { + "base": "FromRotationXDegrees", + "context": "{537AB179-E23C-492D-8EF7-53845A2DB163}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke FromRotationXDegrees" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after FromRotationXDegrees is invoked" + }, + "details": { + "name": "FromRotationXDegrees" + }, + "params": [ + { + "typeid": "{110C4B14-11A8-4E9D-8638-5051013A56AC}", + "details": { + "name": "double" + } + } + ], + "results": [ + { + "typeid": "{157193C7-B673-4A2B-8B43-5681DCC3DEC3}", + "details": { + "name": "Matrix4x4" + } + } + ] + }, + { + "base": "FromRotationZDegrees", + "context": "{537AB179-E23C-492D-8EF7-53845A2DB163}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke FromRotationZDegrees" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after FromRotationZDegrees is invoked" + }, + "details": { + "name": "FromRotationZDegrees" + }, + "params": [ + { + "typeid": "{110C4B14-11A8-4E9D-8638-5051013A56AC}", + "details": { + "name": "double" + } + } + ], + "results": [ + { + "typeid": "{157193C7-B673-4A2B-8B43-5681DCC3DEC3}", + "details": { + "name": "Matrix4x4" + } + } + ] + }, + { + "base": "FromRows", + "context": "{537AB179-E23C-492D-8EF7-53845A2DB163}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke FromRows" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after FromRows is invoked" + }, + "details": { + "name": "FromRows" + }, + "params": [ + { + "typeid": "{0CE9FA36-1E3A-4C06-9254-B7C73A732053}", + "details": { + "name": "Vector4" + } + }, + { + "typeid": "{0CE9FA36-1E3A-4C06-9254-B7C73A732053}", + "details": { + "name": "Vector4" + } + }, + { + "typeid": "{0CE9FA36-1E3A-4C06-9254-B7C73A732053}", + "details": { + "name": "Vector4" + } + }, + { + "typeid": "{0CE9FA36-1E3A-4C06-9254-B7C73A732053}", + "details": { + "name": "Vector4" + } + } + ], + "results": [ + { + "typeid": "{157193C7-B673-4A2B-8B43-5681DCC3DEC3}", + "details": { + "name": "Matrix4x4" + } + } + ] + }, + { + "base": "ToScale", + "context": "{537AB179-E23C-492D-8EF7-53845A2DB163}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke ToScale" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after ToScale is invoked" + }, + "details": { + "name": "ToScale" + }, + "params": [ + { + "typeid": "{157193C7-B673-4A2B-8B43-5681DCC3DEC3}", + "details": { + "name": "Matrix4x4" + } + } + ], + "results": [ + { + "typeid": "{8379EB7D-01FA-4538-B64B-A6543B4BE73D}", + "details": { + "name": "Vector3" + } + } + ] + }, + { + "base": "FromQuaternion", + "context": "{537AB179-E23C-492D-8EF7-53845A2DB163}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke FromQuaternion" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after FromQuaternion is invoked" + }, + "details": { + "name": "FromQuaternion" + }, + "params": [ + { + "typeid": "{73103120-3DD3-4873-BAB3-9713FA2804FB}", + "details": { + "name": "Quaternion" + } + } + ], + "results": [ + { + "typeid": "{157193C7-B673-4A2B-8B43-5681DCC3DEC3}", + "details": { + "name": "Matrix4x4" + } + } + ] + }, + { + "base": "FromScale", + "context": "{537AB179-E23C-492D-8EF7-53845A2DB163}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke FromScale" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after FromScale is invoked" + }, + "details": { + "name": "FromScale" + }, + "params": [ + { + "typeid": "{8379EB7D-01FA-4538-B64B-A6543B4BE73D}", + "details": { + "name": "Vector3" + } + } + ], + "results": [ + { + "typeid": "{157193C7-B673-4A2B-8B43-5681DCC3DEC3}", + "details": { + "name": "Matrix4x4" + } + } + ] + }, + { + "base": "FromTransform", + "context": "{537AB179-E23C-492D-8EF7-53845A2DB163}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke FromTransform" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after FromTransform is invoked" + }, + "details": { + "name": "FromTransform" + }, + "params": [ + { + "typeid": "{5D9958E9-9F1E-4985-B532-FFFDE75FEDFD}", + "details": { + "name": "Transform" + } + } + ], + "results": [ + { + "typeid": "{157193C7-B673-4A2B-8B43-5681DCC3DEC3}", + "details": { + "name": "Matrix4x4" + } + } + ] + }, + { + "base": "GetTranslation", + "context": "{537AB179-E23C-492D-8EF7-53845A2DB163}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke GetTranslation" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after GetTranslation is invoked" + }, + "details": { + "name": "GetTranslation" + }, + "params": [ + { + "typeid": "{157193C7-B673-4A2B-8B43-5681DCC3DEC3}", + "details": { + "name": "Matrix4x4" + } + } + ], + "results": [ + { + "typeid": "{8379EB7D-01FA-4538-B64B-A6543B4BE73D}", + "details": { + "name": "Vector3" + } + } + ] + }, + { + "base": "FromQuaternionAndTranslation", + "context": "{537AB179-E23C-492D-8EF7-53845A2DB163}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke FromQuaternionAndTranslation" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after FromQuaternionAndTranslation is invoked" + }, + "details": { + "name": "FromQuaternionAndTranslation" + }, + "params": [ + { + "typeid": "{73103120-3DD3-4873-BAB3-9713FA2804FB}", + "details": { + "name": "Quaternion" + } + }, + { + "typeid": "{8379EB7D-01FA-4538-B64B-A6543B4BE73D}", + "details": { + "name": "Vector3" + } + } + ], + "results": [ + { + "typeid": "{157193C7-B673-4A2B-8B43-5681DCC3DEC3}", + "details": { + "name": "Matrix4x4" + } + } + ] + }, + { + "base": "GetColumn", + "context": "{537AB179-E23C-492D-8EF7-53845A2DB163}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke GetColumn" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after GetColumn is invoked" + }, + "details": { + "name": "GetColumn" + }, + "params": [ + { + "typeid": "{157193C7-B673-4A2B-8B43-5681DCC3DEC3}", + "details": { + "name": "Matrix4x4" + } + }, + { + "typeid": "{110C4B14-11A8-4E9D-8638-5051013A56AC}", + "details": { + "name": "double" + } + } + ], + "results": [ + { + "typeid": "{0CE9FA36-1E3A-4C06-9254-B7C73A732053}", + "details": { + "name": "Vector4" + } + } + ] + }, + { + "base": "GetDiagonal", + "context": "{537AB179-E23C-492D-8EF7-53845A2DB163}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke GetDiagonal" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after GetDiagonal is invoked" + }, + "details": { + "name": "GetDiagonal" + }, + "params": [ + { + "typeid": "{157193C7-B673-4A2B-8B43-5681DCC3DEC3}", + "details": { + "name": "Matrix4x4" + } + } + ], + "results": [ + { + "typeid": "{0CE9FA36-1E3A-4C06-9254-B7C73A732053}", + "details": { + "name": "Vector4" + } + } + ] + }, + { + "base": "Invert", + "context": "{537AB179-E23C-492D-8EF7-53845A2DB163}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Invert" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Invert is invoked" + }, + "details": { + "name": "Invert" + }, + "params": [ + { + "typeid": "{157193C7-B673-4A2B-8B43-5681DCC3DEC3}", + "details": { + "name": "Matrix4x4" + } + } + ], + "results": [ + { + "typeid": "{157193C7-B673-4A2B-8B43-5681DCC3DEC3}", + "details": { + "name": "Matrix4x4" + } + } + ] + }, + { + "base": "IsClose", + "context": "{537AB179-E23C-492D-8EF7-53845A2DB163}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke IsClose" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after IsClose is invoked" + }, + "details": { + "name": "IsClose" + }, + "params": [ + { + "typeid": "{157193C7-B673-4A2B-8B43-5681DCC3DEC3}", + "details": { + "name": "Matrix4x4" + } + }, + { + "typeid": "{157193C7-B673-4A2B-8B43-5681DCC3DEC3}", + "details": { + "name": "Matrix4x4" + } + }, + { + "typeid": "{110C4B14-11A8-4E9D-8638-5051013A56AC}", + "details": { + "name": "double" + } + } + ], + "results": [ + { + "typeid": "{A0CA880C-AFE4-43CB-926C-59AC48496112}", + "details": { + "name": "bool" + } + } + ] + }, + { + "base": "FromMatrix3x3", + "context": "{537AB179-E23C-492D-8EF7-53845A2DB163}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke FromMatrix3x3" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after FromMatrix3x3 is invoked" + }, + "details": { + "name": "FromMatrix3x3" + }, + "params": [ + { + "typeid": "{15A4332F-7C3F-4A58-AC35-50E1CE53FB9C}", + "details": { + "name": "Matrix3x3" + } + } + ], + "results": [ + { + "typeid": "{157193C7-B673-4A2B-8B43-5681DCC3DEC3}", + "details": { + "name": "Matrix4x4" + } + } + ] + }, + { + "base": "GetColumns", + "context": "{537AB179-E23C-492D-8EF7-53845A2DB163}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke GetColumns" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after GetColumns is invoked" + }, + "details": { + "name": "GetColumns" + }, + "params": [ + { + "typeid": "{157193C7-B673-4A2B-8B43-5681DCC3DEC3}", + "details": { + "name": "Matrix4x4" + } + } + ], + "results": [ + { + "typeid": "{3750867E-BD2D-52A2-B93B-51032E86C4D4}", + "details": { + "name": "tuple" + } + } + ] + }, + { + "base": "GetRows", + "context": "{537AB179-E23C-492D-8EF7-53845A2DB163}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke GetRows" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after GetRows is invoked" + }, + "details": { + "name": "GetRows" + }, + "params": [ + { + "typeid": "{157193C7-B673-4A2B-8B43-5681DCC3DEC3}", + "details": { + "name": "Matrix4x4" + } + } + ], + "results": [ + { + "typeid": "{3750867E-BD2D-52A2-B93B-51032E86C4D4}", + "details": { + "name": "tuple" + } + } + ] + }, + { + "base": "MultiplyByMatrix", + "context": "{537AB179-E23C-492D-8EF7-53845A2DB163}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke MultiplyByMatrix" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after MultiplyByMatrix is invoked" + }, + "details": { + "name": "MultiplyByMatrix" + }, + "params": [ + { + "typeid": "{157193C7-B673-4A2B-8B43-5681DCC3DEC3}", + "details": { + "name": "Matrix4x4" + } + }, + { + "typeid": "{157193C7-B673-4A2B-8B43-5681DCC3DEC3}", + "details": { + "name": "Matrix4x4" + } + } + ], + "results": [ + { + "typeid": "{157193C7-B673-4A2B-8B43-5681DCC3DEC3}", + "details": { + "name": "Matrix4x4" + } + } + ] + }, + { + "base": "FromDiagonal", + "context": "{537AB179-E23C-492D-8EF7-53845A2DB163}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke FromDiagonal" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after FromDiagonal is invoked" + }, + "details": { + "name": "FromDiagonal" + }, + "params": [ + { + "typeid": "{0CE9FA36-1E3A-4C06-9254-B7C73A732053}", + "details": { + "name": "Vector4" + } + } + ], + "results": [ + { + "typeid": "{157193C7-B673-4A2B-8B43-5681DCC3DEC3}", + "details": { + "name": "Matrix4x4" + } + } + ] + }, + { + "base": "FromRotationYDegrees", + "context": "{537AB179-E23C-492D-8EF7-53845A2DB163}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke FromRotationYDegrees" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after FromRotationYDegrees is invoked" + }, + "details": { + "name": "FromRotationYDegrees" + }, + "params": [ + { + "typeid": "{110C4B14-11A8-4E9D-8638-5051013A56AC}", + "details": { + "name": "double" + } + } + ], + "results": [ + { + "typeid": "{157193C7-B673-4A2B-8B43-5681DCC3DEC3}", + "details": { + "name": "Matrix4x4" + } + } + ] + }, + { + "base": "GetElement", + "context": "{537AB179-E23C-492D-8EF7-53845A2DB163}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke GetElement" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after GetElement is invoked" + }, + "details": { + "name": "GetElement" + }, + "params": [ + { + "typeid": "{157193C7-B673-4A2B-8B43-5681DCC3DEC3}", + "details": { + "name": "Matrix4x4" + } + }, + { + "typeid": "{110C4B14-11A8-4E9D-8638-5051013A56AC}", + "details": { + "name": "double" + } + }, + { + "typeid": "{110C4B14-11A8-4E9D-8638-5051013A56AC}", + "details": { + "name": "double" + } + } + ], + "results": [ + { + "typeid": "{110C4B14-11A8-4E9D-8638-5051013A56AC}", + "details": { + "name": "double" + } + } + ] + }, + { + "base": "Transpose", + "context": "{537AB179-E23C-492D-8EF7-53845A2DB163}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Transpose" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Transpose is invoked" + }, + "details": { + "name": "Transpose" + }, + "params": [ + { + "typeid": "{157193C7-B673-4A2B-8B43-5681DCC3DEC3}", + "details": { + "name": "Matrix4x4" + } + } + ], + "results": [ + { + "typeid": "{157193C7-B673-4A2B-8B43-5681DCC3DEC3}", + "details": { + "name": "Matrix4x4" + } + } + ] + }, + { + "base": "FromColumns", + "context": "{537AB179-E23C-492D-8EF7-53845A2DB163}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke FromColumns" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after FromColumns is invoked" + }, + "details": { + "name": "FromColumns" + }, + "params": [ + { + "typeid": "{0CE9FA36-1E3A-4C06-9254-B7C73A732053}", + "details": { + "name": "Vector4" + } + }, + { + "typeid": "{0CE9FA36-1E3A-4C06-9254-B7C73A732053}", + "details": { + "name": "Vector4" + } + }, + { + "typeid": "{0CE9FA36-1E3A-4C06-9254-B7C73A732053}", + "details": { + "name": "Vector4" + } + }, + { + "typeid": "{0CE9FA36-1E3A-4C06-9254-B7C73A732053}", + "details": { + "name": "Vector4" + } + } + ], + "results": [ + { + "typeid": "{157193C7-B673-4A2B-8B43-5681DCC3DEC3}", + "details": { + "name": "Matrix4x4" + } + } + ] + }, + { + "base": "FromTranslation", + "context": "{537AB179-E23C-492D-8EF7-53845A2DB163}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke FromTranslation" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after FromTranslation is invoked" + }, + "details": { + "name": "FromTranslation" + }, + "params": [ + { + "typeid": "{8379EB7D-01FA-4538-B64B-A6543B4BE73D}", + "details": { + "name": "Vector3" + } + } + ], + "results": [ + { + "typeid": "{157193C7-B673-4A2B-8B43-5681DCC3DEC3}", + "details": { + "name": "Matrix4x4" + } + } + ] + }, + { + "base": "IsFinite", + "context": "{537AB179-E23C-492D-8EF7-53845A2DB163}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke IsFinite" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after IsFinite is invoked" + }, + "details": { + "name": "IsFinite" + }, + "params": [ + { + "typeid": "{157193C7-B673-4A2B-8B43-5681DCC3DEC3}", + "details": { + "name": "Matrix4x4" + } + } + ], + "results": [ + { + "typeid": "{A0CA880C-AFE4-43CB-926C-59AC48496112}", + "details": { + "name": "bool" + } + } + ] + }, + { + "base": "MultiplyByVector", + "context": "{537AB179-E23C-492D-8EF7-53845A2DB163}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke MultiplyByVector" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after MultiplyByVector is invoked" + }, + "details": { + "name": "MultiplyByVector" + }, + "params": [ + { + "typeid": "{157193C7-B673-4A2B-8B43-5681DCC3DEC3}", + "details": { + "name": "Matrix4x4" + } + }, + { + "typeid": "{0CE9FA36-1E3A-4C06-9254-B7C73A732053}", + "details": { + "name": "Vector4" + } + } + ], + "results": [ + { + "typeid": "{0CE9FA36-1E3A-4C06-9254-B7C73A732053}", + "details": { + "name": "Vector4" + } + } + ] + }, + { + "base": "Zero", + "context": "{537AB179-E23C-492D-8EF7-53845A2DB163}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Zero" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Zero is invoked" + }, + "details": { + "name": "Zero" + }, + "results": [ + { + "typeid": "{157193C7-B673-4A2B-8B43-5681DCC3DEC3}", + "details": { + "name": "Matrix4x4" + } + } + ] + } + ] + }, + { + "base": "{C338C806-EBD9-5471-AB22-66F7584A5890}", + "context": "OnDemandReflected", + "variant": "", + "details": { + "name": "Map", + "category": "Map", + "tooltip": "A collection of Key/Value pairs, where each Key value must be unique." + }, + "methods": [ + { + "base": "contains", + "context": "{C338C806-EBD9-5471-AB22-66F7584A5890}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke contains" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after contains is invoked" + }, + "details": { + "name": "contains" + }, + "params": [ + { + "typeid": "{C338C806-EBD9-5471-AB22-66F7584A5890}", + "details": { + "name": "AZStd::unordered_map" + } + }, + { + "typeid": "{03AAAB3F-5C47-5A66-9EBC-D5FA4DB353C9}", + "details": { + "name": "AZStd::string" + } + } + ], + "results": [ + { + "typeid": "{A0CA880C-AFE4-43CB-926C-59AC48496112}", + "details": { + "name": "bool" + } + } + ] + }, + { + "base": "Insert", + "context": "{C338C806-EBD9-5471-AB22-66F7584A5890}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Insert" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Insert is invoked" + }, + "details": { + "name": "Insert" + }, + "params": [ + { + "typeid": "{C338C806-EBD9-5471-AB22-66F7584A5890}", + "details": { + "name": "AZStd::unordered_map" + } + }, + { + "typeid": "{03AAAB3F-5C47-5A66-9EBC-D5FA4DB353C9}", + "details": { + "name": "AZStd::string" + } + }, + { + "typeid": "{A54C2B36-D5B8-46A1-A529-4EBDBD2450E7}", + "details": { + "name": "Aabb" + } + } + ], + "results": [ + { + "typeid": "{C338C806-EBD9-5471-AB22-66F7584A5890}", + "details": { + "name": "AZStd::unordered_map" + } + } + ] + }, + { + "base": "Reserve", + "context": "{C338C806-EBD9-5471-AB22-66F7584A5890}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Reserve" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Reserve is invoked" + }, + "details": { + "name": "Reserve" + }, + "params": [ + { + "typeid": "{C338C806-EBD9-5471-AB22-66F7584A5890}", + "details": { + "name": "AZStd::unordered_map" + } + }, + { + "typeid": "{D6597933-47CD-4FC8-B911-63F3E2B0993A}", + "details": { + "name": "AZ::u64" + } + } + ] + }, + { + "base": "GetSize", + "context": "{C338C806-EBD9-5471-AB22-66F7584A5890}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke GetSize" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after GetSize is invoked" + }, + "details": { + "name": "GetSize" + }, + "params": [ + { + "typeid": "{C338C806-EBD9-5471-AB22-66F7584A5890}", + "details": { + "name": "AZStd::unordered_map" + } + } + ], + "results": [ + { + "typeid": "{72039442-EB38-4D42-A1AD-CB68F7E0EEF6}", + "details": { + "name": "int" + } + } + ] + }, + { + "base": "Iterate_VM", + "context": "{C338C806-EBD9-5471-AB22-66F7584A5890}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Iterate_VM" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Iterate_VM is invoked" + }, + "details": { + "name": "Iterate_VM" + }, + "params": [ + { + "typeid": "{C338C806-EBD9-5471-AB22-66F7584A5890}", + "details": { + "name": "AZStd::unordered_map" + } + } + ], + "results": [ + { + "typeid": "{5C709DCE-E6E1-5536-A42E-6BE21C0A3BD8}", + "details": { + "name": "Iterator_VM, allocator>, Aabb, AZStd::hash", + "category": "Map", + "tooltip": "A collection of Key/Value pairs, where each Key value must be unique." + }, + "methods": [ + { + "base": "contains", + "context": "{097C0043-AC31-5230-B07E-330022B002DB}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke contains" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after contains is invoked" + }, + "details": { + "name": "contains" + }, + "params": [ + { + "typeid": "{097C0043-AC31-5230-B07E-330022B002DB}", + "details": { + "name": "AZStd::unordered_map" + } + }, + { + "typeid": "{03AAAB3F-5C47-5A66-9EBC-D5FA4DB353C9}", + "details": { + "name": "AZStd::string" + } + } + ], + "results": [ + { + "typeid": "{A0CA880C-AFE4-43CB-926C-59AC48496112}", + "details": { + "name": "bool" + } + } + ] + }, + { + "base": "Insert", + "context": "{097C0043-AC31-5230-B07E-330022B002DB}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Insert" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Insert is invoked" + }, + "details": { + "name": "Insert" + }, + "params": [ + { + "typeid": "{097C0043-AC31-5230-B07E-330022B002DB}", + "details": { + "name": "AZStd::unordered_map" + } + }, + { + "typeid": "{03AAAB3F-5C47-5A66-9EBC-D5FA4DB353C9}", + "details": { + "name": "AZStd::string" + } + }, + { + "typeid": "{7894072A-9050-4F0F-901B-34B1A0D29417}", + "details": { + "name": "Color" + } + } + ], + "results": [ + { + "typeid": "{097C0043-AC31-5230-B07E-330022B002DB}", + "details": { + "name": "AZStd::unordered_map" + } + } + ] + }, + { + "base": "Reserve", + "context": "{097C0043-AC31-5230-B07E-330022B002DB}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Reserve" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Reserve is invoked" + }, + "details": { + "name": "Reserve" + }, + "params": [ + { + "typeid": "{097C0043-AC31-5230-B07E-330022B002DB}", + "details": { + "name": "AZStd::unordered_map" + } + }, + { + "typeid": "{D6597933-47CD-4FC8-B911-63F3E2B0993A}", + "details": { + "name": "AZ::u64" + } + } + ] + }, + { + "base": "GetSize", + "context": "{097C0043-AC31-5230-B07E-330022B002DB}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke GetSize" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after GetSize is invoked" + }, + "details": { + "name": "GetSize" + }, + "params": [ + { + "typeid": "{097C0043-AC31-5230-B07E-330022B002DB}", + "details": { + "name": "AZStd::unordered_map" + } + } + ], + "results": [ + { + "typeid": "{72039442-EB38-4D42-A1AD-CB68F7E0EEF6}", + "details": { + "name": "int" + } + } + ] + }, + { + "base": "Iterate_VM", + "context": "{097C0043-AC31-5230-B07E-330022B002DB}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Iterate_VM" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Iterate_VM is invoked" + }, + "details": { + "name": "Iterate_VM" + }, + "params": [ + { + "typeid": "{097C0043-AC31-5230-B07E-330022B002DB}", + "details": { + "name": "AZStd::unordered_map" + } + } + ], + "results": [ + { + "typeid": "{9B77797B-541C-5BA4-A6A8-CA3CBDC6AD8A}", + "details": { + "name": "Iterator_VM, allocator>, Color, AZStd::hash", + "category": "Array", + "tooltip": "A dynamically sized container of elements." + }, + "methods": [ + { + "base": "Size", + "context": "{240FCAC2-0B29-5CD9-9AFE-9E7A135428BB}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Size" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Size is invoked" + }, + "details": { + "name": "Size" + }, + "params": [ + { + "typeid": "{240FCAC2-0B29-5CD9-9AFE-9E7A135428BB}", + "details": { + "name": "AZStd::vector" + } + } + ], + "results": [ + { + "typeid": "{72039442-EB38-4D42-A1AD-CB68F7E0EEF6}", + "details": { + "name": "int" + } + } + ] + }, + { + "base": "Front", + "context": "{240FCAC2-0B29-5CD9-9AFE-9E7A135428BB}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Front" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Front is invoked" + }, + "details": { + "name": "Front" + }, + "params": [ + { + "typeid": "{240FCAC2-0B29-5CD9-9AFE-9E7A135428BB}", + "details": { + "name": "AZStd::vector" + } + } + ], + "results": [ + { + "typeid": "{157193C7-B673-4A2B-8B43-5681DCC3DEC3}", + "details": { + "name": "Matrix4x4" + } + } + ] + }, + { + "base": "HasKey", + "context": "{240FCAC2-0B29-5CD9-9AFE-9E7A135428BB}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Has Key" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Has Key is invoked" + }, + "details": { + "name": "Has Key" + }, + "params": [ + { + "typeid": "{240FCAC2-0B29-5CD9-9AFE-9E7A135428BB}", + "details": { + "name": "AZStd::vector" + } + }, + { + "typeid": "{D6597933-47CD-4FC8-B911-63F3E2B0993A}", + "details": { + "name": "AZ::u64" + } + } + ], + "results": [ + { + "typeid": "{A0CA880C-AFE4-43CB-926C-59AC48496112}", + "details": { + "name": "bool" + } + } + ] + }, + { + "base": "Resize", + "context": "{240FCAC2-0B29-5CD9-9AFE-9E7A135428BB}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Resize" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Resize is invoked" + }, + "details": { + "name": "Resize" + }, + "params": [ + { + "typeid": "{240FCAC2-0B29-5CD9-9AFE-9E7A135428BB}", + "details": { + "name": "AZStd::vector" + } + }, + { + "typeid": "{D6597933-47CD-4FC8-B911-63F3E2B0993A}", + "details": { + "name": "AZ::u64" + } + } + ] + }, + { + "base": "at", + "context": "{240FCAC2-0B29-5CD9-9AFE-9E7A135428BB}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke at" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after at is invoked" + }, + "details": { + "name": "at" + }, + "params": [ + { + "typeid": "{240FCAC2-0B29-5CD9-9AFE-9E7A135428BB}", + "details": { + "name": "AZStd::vector" + } + }, + { + "typeid": "{D6597933-47CD-4FC8-B911-63F3E2B0993A}", + "details": { + "name": "AZ::u64" + } + } + ], + "results": [ + { + "typeid": "{157193C7-B673-4A2B-8B43-5681DCC3DEC3}", + "details": { + "name": "Matrix4x4" + } + } + ] + }, + { + "base": "Back", + "context": "{240FCAC2-0B29-5CD9-9AFE-9E7A135428BB}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Back" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Back is invoked" + }, + "details": { + "name": "Back" + }, + "params": [ + { + "typeid": "{240FCAC2-0B29-5CD9-9AFE-9E7A135428BB}", + "details": { + "name": "AZStd::vector" + } + } + ], + "results": [ + { + "typeid": "{157193C7-B673-4A2B-8B43-5681DCC3DEC3}", + "details": { + "name": "Matrix4x4" + } + } + ] + }, + { + "base": "pop_back", + "context": "{240FCAC2-0B29-5CD9-9AFE-9E7A135428BB}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke pop_back" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after pop_back is invoked" + }, + "details": { + "name": "pop_back" + }, + "params": [ + { + "typeid": "{240FCAC2-0B29-5CD9-9AFE-9E7A135428BB}", + "details": { + "name": "AZStd::vector" + } + } + ] + }, + { + "base": "size", + "context": "{240FCAC2-0B29-5CD9-9AFE-9E7A135428BB}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke size" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after size is invoked" + }, + "details": { + "name": "size" + }, + "params": [ + { + "typeid": "{240FCAC2-0B29-5CD9-9AFE-9E7A135428BB}", + "details": { + "name": "AZStd::vector" + } + } + ], + "results": [ + { + "typeid": "{72039442-EB38-4D42-A1AD-CB68F7E0EEF6}", + "details": { + "name": "int" + } + } + ] + }, + { + "base": "At", + "context": "{240FCAC2-0B29-5CD9-9AFE-9E7A135428BB}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke At" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after At is invoked" + }, + "details": { + "name": "At" + }, + "params": [ + { + "typeid": "{240FCAC2-0B29-5CD9-9AFE-9E7A135428BB}", + "details": { + "name": "AZStd::vector" + } + }, + { + "typeid": "{D6597933-47CD-4FC8-B911-63F3E2B0993A}", + "details": { + "name": "AZ::u64" + } + } + ], + "results": [ + { + "typeid": "{157193C7-B673-4A2B-8B43-5681DCC3DEC3}", + "details": { + "name": "Matrix4x4" + } + } + ] + }, + { + "base": "Empty", + "context": "{240FCAC2-0B29-5CD9-9AFE-9E7A135428BB}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Empty" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Empty is invoked" + }, + "details": { + "name": "Empty" + }, + "params": [ + { + "typeid": "{240FCAC2-0B29-5CD9-9AFE-9E7A135428BB}", + "details": { + "name": "AZStd::vector" + } + } + ], + "results": [ + { + "typeid": "{A0CA880C-AFE4-43CB-926C-59AC48496112}", + "details": { + "name": "bool" + } + } + ] + }, + { + "base": "Swap", + "context": "{240FCAC2-0B29-5CD9-9AFE-9E7A135428BB}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Swap" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Swap is invoked" + }, + "details": { + "name": "Swap" + }, + "params": [ + { + "typeid": "{240FCAC2-0B29-5CD9-9AFE-9E7A135428BB}", + "details": { + "name": "AZStd::vector" + } + }, + { + "typeid": "{240FCAC2-0B29-5CD9-9AFE-9E7A135428BB}", + "details": { + "name": "AZStd::vector" + } + } + ] + }, + { + "base": "push_back", + "context": "{240FCAC2-0B29-5CD9-9AFE-9E7A135428BB}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke push_back" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after push_back is invoked" + }, + "details": { + "name": "push_back" + }, + "params": [ + { + "typeid": "{240FCAC2-0B29-5CD9-9AFE-9E7A135428BB}", + "details": { + "name": "AZStd::vector" + } + }, + { + "typeid": "{157193C7-B673-4A2B-8B43-5681DCC3DEC3}", + "details": { + "name": "Matrix4x4" + } + } + ] + }, + { + "base": "PushBack_VM", + "context": "{240FCAC2-0B29-5CD9-9AFE-9E7A135428BB}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke PushBack_VM" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after PushBack_VM is invoked" + }, + "details": { + "name": "PushBack_VM" + }, + "params": [ + { + "typeid": "{240FCAC2-0B29-5CD9-9AFE-9E7A135428BB}", + "details": { + "name": "AZStd::vector" + } + }, + { + "typeid": "{157193C7-B673-4A2B-8B43-5681DCC3DEC3}", + "details": { + "name": "Matrix4x4" + } + } + ], + "results": [ + { + "typeid": "{240FCAC2-0B29-5CD9-9AFE-9E7A135428BB}", + "details": { + "name": "AZStd::vector" + } + } + ] + }, + { + "base": "AtUnchecked", + "context": "{240FCAC2-0B29-5CD9-9AFE-9E7A135428BB}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke AtUnchecked" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after AtUnchecked is invoked" + }, + "details": { + "name": "AtUnchecked" + }, + "params": [ + { + "typeid": "{240FCAC2-0B29-5CD9-9AFE-9E7A135428BB}", + "details": { + "name": "AZStd::vector" + } + }, + { + "typeid": "{D6597933-47CD-4FC8-B911-63F3E2B0993A}", + "details": { + "name": "AZ::u64" + } + } + ], + "results": [ + { + "typeid": "{157193C7-B673-4A2B-8B43-5681DCC3DEC3}", + "details": { + "name": "Matrix4x4" + } + } + ] + }, + { + "base": "clear", + "context": "{240FCAC2-0B29-5CD9-9AFE-9E7A135428BB}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke clear" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after clear is invoked" + }, + "details": { + "name": "clear" + }, + "params": [ + { + "typeid": "{240FCAC2-0B29-5CD9-9AFE-9E7A135428BB}", + "details": { + "name": "AZStd::vector" + } + } + ] + }, + { + "base": "NotEmpty", + "context": "{240FCAC2-0B29-5CD9-9AFE-9E7A135428BB}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke NotEmpty" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after NotEmpty is invoked" + }, + "details": { + "name": "NotEmpty" + }, + "params": [ + { + "typeid": "{240FCAC2-0B29-5CD9-9AFE-9E7A135428BB}", + "details": { + "name": "AZStd::vector" + } + } + ], + "results": [ + { + "typeid": "{A0CA880C-AFE4-43CB-926C-59AC48496112}", + "details": { + "name": "bool" + } + } + ] + }, + { + "base": "Erase_VM", + "context": "{240FCAC2-0B29-5CD9-9AFE-9E7A135428BB}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Erase_VM" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Erase_VM is invoked" + }, + "details": { + "name": "Erase_VM" + }, + "params": [ + { + "typeid": "{240FCAC2-0B29-5CD9-9AFE-9E7A135428BB}", + "details": { + "name": "AZStd::vector" + } + }, + { + "typeid": "{D6597933-47CD-4FC8-B911-63F3E2B0993A}", + "details": { + "name": "AZ::u64" + } + } + ], + "results": [ + { + "typeid": "{240FCAC2-0B29-5CD9-9AFE-9E7A135428BB}", + "details": { + "name": "AZStd::vector" + } + } + ] + }, + { + "base": "EraseCheck_VM", + "context": "{240FCAC2-0B29-5CD9-9AFE-9E7A135428BB}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke EraseCheck_VM" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after EraseCheck_VM is invoked" + }, + "details": { + "name": "EraseCheck_VM" + }, + "params": [ + { + "typeid": "{240FCAC2-0B29-5CD9-9AFE-9E7A135428BB}", + "details": { + "name": "AZStd::vector" + } + }, + { + "typeid": "{D6597933-47CD-4FC8-B911-63F3E2B0993A}", + "details": { + "name": "AZ::u64" + } + } + ], + "results": [ + { + "typeid": "{A0CA880C-AFE4-43CB-926C-59AC48496112}", + "details": { + "name": "bool" + } + } + ] + }, + { + "base": "Capacity", + "context": "{240FCAC2-0B29-5CD9-9AFE-9E7A135428BB}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Capacity" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Capacity is invoked" + }, + "details": { + "name": "Capacity" + }, + "params": [ + { + "typeid": "{240FCAC2-0B29-5CD9-9AFE-9E7A135428BB}", + "details": { + "name": "AZStd::vector" + } + } + ], + "results": [ + { + "typeid": "{D6597933-47CD-4FC8-B911-63F3E2B0993A}", + "details": { + "name": "AZ::u64" + } + } + ] + }, + { + "base": "Clear", + "context": "{240FCAC2-0B29-5CD9-9AFE-9E7A135428BB}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Clear" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Clear is invoked" + }, + "details": { + "name": "Clear" + }, + "params": [ + { + "typeid": "{240FCAC2-0B29-5CD9-9AFE-9E7A135428BB}", + "details": { + "name": "AZStd::vector" + } + } + ], + "results": [ + { + "typeid": "{240FCAC2-0B29-5CD9-9AFE-9E7A135428BB}", + "details": { + "name": "AZStd::vector" + } + } + ] + }, + { + "base": "AssignAt", + "context": "{240FCAC2-0B29-5CD9-9AFE-9E7A135428BB}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke AssignAt" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after AssignAt is invoked" + }, + "details": { + "name": "AssignAt" + }, + "params": [ + { + "typeid": "{240FCAC2-0B29-5CD9-9AFE-9E7A135428BB}", + "details": { + "name": "AZStd::vector" + } + }, + { + "typeid": "{D6597933-47CD-4FC8-B911-63F3E2B0993A}", + "details": { + "name": "AZ::u64" + } + }, + { + "typeid": "{157193C7-B673-4A2B-8B43-5681DCC3DEC3}", + "details": { + "name": "Matrix4x4" + } + } + ] + }, + { + "base": "GetSize", + "context": "{240FCAC2-0B29-5CD9-9AFE-9E7A135428BB}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke GetSize" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after GetSize is invoked" + }, + "details": { + "name": "GetSize" + }, + "params": [ + { + "typeid": "{240FCAC2-0B29-5CD9-9AFE-9E7A135428BB}", + "details": { + "name": "AZStd::vector" + } + } + ], + "results": [ + { + "typeid": "{72039442-EB38-4D42-A1AD-CB68F7E0EEF6}", + "details": { + "name": "int" + } + } + ] + }, + { + "base": "Insert", + "context": "{240FCAC2-0B29-5CD9-9AFE-9E7A135428BB}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Insert" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Insert is invoked" + }, + "details": { + "name": "Insert" + }, + "params": [ + { + "typeid": "{240FCAC2-0B29-5CD9-9AFE-9E7A135428BB}", + "details": { + "name": "AZStd::vector" + } + }, + { + "typeid": "{D6597933-47CD-4FC8-B911-63F3E2B0993A}", + "details": { + "name": "AZ::u64" + } + }, + { + "typeid": "{157193C7-B673-4A2B-8B43-5681DCC3DEC3}", + "details": { + "name": "Matrix4x4" + } + } + ], + "results": [ + { + "typeid": "{240FCAC2-0B29-5CD9-9AFE-9E7A135428BB}", + "details": { + "name": "AZStd::vector" + } + } + ] + }, + { + "base": "PushBack", + "context": "{240FCAC2-0B29-5CD9-9AFE-9E7A135428BB}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke PushBack" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after PushBack is invoked" + }, + "details": { + "name": "PushBack" + }, + "params": [ + { + "typeid": "{240FCAC2-0B29-5CD9-9AFE-9E7A135428BB}", + "details": { + "name": "AZStd::vector" + } + }, + { + "typeid": "{157193C7-B673-4A2B-8B43-5681DCC3DEC3}", + "details": { + "name": "Matrix4x4" + } + } + ] + }, + { + "base": "Reserve", + "context": "{240FCAC2-0B29-5CD9-9AFE-9E7A135428BB}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Reserve" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Reserve is invoked" + }, + "details": { + "name": "Reserve" + }, + "params": [ + { + "typeid": "{240FCAC2-0B29-5CD9-9AFE-9E7A135428BB}", + "details": { + "name": "AZStd::vector" + } + }, + { + "typeid": "{D6597933-47CD-4FC8-B911-63F3E2B0993A}", + "details": { + "name": "AZ::u64" + } + } + ] + }, + { + "base": "Iterate_VM", + "context": "{240FCAC2-0B29-5CD9-9AFE-9E7A135428BB}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Iterate_VM" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Iterate_VM is invoked" + }, + "details": { + "name": "Iterate_VM" + }, + "params": [ + { + "typeid": "{240FCAC2-0B29-5CD9-9AFE-9E7A135428BB}", + "details": { + "name": "AZStd::vector" + } + } + ], + "results": [ + { + "typeid": "{24CAF71B-660D-5D37-ACBD-B05906EA3D30}", + "details": { + "name": "Iterator_VM>" + } + } + ] + } + ] + }, + { + "base": "{D9DF1385-6C5C-4E41-94CA-8B10E9D8FAAF}", + "context": "OnDemandReflected", + "variant": "", + "details": { + "name": "MathRandom_VM" + }, + "methods": [ + { + "base": "RandomPointOnSphere", + "context": "{D9DF1385-6C5C-4E41-94CA-8B10E9D8FAAF}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke RandomPointOnSphere" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after RandomPointOnSphere is invoked" + }, + "details": { + "name": "RandomPointOnSphere" + }, + "params": [ + { + "typeid": "{110C4B14-11A8-4E9D-8638-5051013A56AC}", + "details": { + "name": "double" + } + } + ], + "results": [ + { + "typeid": "{8379EB7D-01FA-4538-B64B-A6543B4BE73D}", + "details": { + "name": "Vector3" + } + } + ] + }, + { + "base": "RandomPointInCircle", + "context": "{D9DF1385-6C5C-4E41-94CA-8B10E9D8FAAF}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke RandomPointInCircle" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after RandomPointInCircle is invoked" + }, + "details": { + "name": "RandomPointInCircle" + }, + "params": [ + { + "typeid": "{110C4B14-11A8-4E9D-8638-5051013A56AC}", + "details": { + "name": "double" + } + } + ], + "results": [ + { + "typeid": "{8379EB7D-01FA-4538-B64B-A6543B4BE73D}", + "details": { + "name": "Vector3" + } + } + ] + }, + { + "base": "RandomPointInSquare", + "context": "{D9DF1385-6C5C-4E41-94CA-8B10E9D8FAAF}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke RandomPointInSquare" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after RandomPointInSquare is invoked" + }, + "details": { + "name": "RandomPointInSquare" + }, + "params": [ + { + "typeid": "{3D80F623-C85C-4741-90D0-E4E66164E6BF}", + "details": { + "name": "Vector2" + } + } + ], + "results": [ + { + "typeid": "{8379EB7D-01FA-4538-B64B-A6543B4BE73D}", + "details": { + "name": "Vector3" + } + } + ] + }, + { + "base": "RandomUnitVector2", + "context": "{D9DF1385-6C5C-4E41-94CA-8B10E9D8FAAF}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke RandomUnitVector2" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after RandomUnitVector2 is invoked" + }, + "details": { + "name": "RandomUnitVector2" + }, + "results": [ + { + "typeid": "{3D80F623-C85C-4741-90D0-E4E66164E6BF}", + "details": { + "name": "Vector2" + } + } + ] + }, + { + "base": "RandomVector2", + "context": "{D9DF1385-6C5C-4E41-94CA-8B10E9D8FAAF}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke RandomVector2" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after RandomVector2 is invoked" + }, + "details": { + "name": "RandomVector2" + }, + "params": [ + { + "typeid": "{3D80F623-C85C-4741-90D0-E4E66164E6BF}", + "details": { + "name": "Vector2" + } + }, + { + "typeid": "{3D80F623-C85C-4741-90D0-E4E66164E6BF}", + "details": { + "name": "Vector2" + } + } + ], + "results": [ + { + "typeid": "{3D80F623-C85C-4741-90D0-E4E66164E6BF}", + "details": { + "name": "Vector2" + } + } + ] + }, + { + "base": "RandomPointInCylinder", + "context": "{D9DF1385-6C5C-4E41-94CA-8B10E9D8FAAF}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke RandomPointInCylinder" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after RandomPointInCylinder is invoked" + }, + "details": { + "name": "RandomPointInCylinder" + }, + "params": [ + { + "typeid": "{110C4B14-11A8-4E9D-8638-5051013A56AC}", + "details": { + "name": "double" + } + }, + { + "typeid": "{110C4B14-11A8-4E9D-8638-5051013A56AC}", + "details": { + "name": "double" + } + } + ], + "results": [ + { + "typeid": "{8379EB7D-01FA-4538-B64B-A6543B4BE73D}", + "details": { + "name": "Vector3" + } + } + ] + }, + { + "base": "RandomQuaternion", + "context": "{D9DF1385-6C5C-4E41-94CA-8B10E9D8FAAF}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke RandomQuaternion" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after RandomQuaternion is invoked" + }, + "details": { + "name": "RandomQuaternion" + }, + "params": [ + { + "typeid": "{110C4B14-11A8-4E9D-8638-5051013A56AC}", + "details": { + "name": "double" + } + }, + { + "typeid": "{110C4B14-11A8-4E9D-8638-5051013A56AC}", + "details": { + "name": "double" + } + } + ], + "results": [ + { + "typeid": "{73103120-3DD3-4873-BAB3-9713FA2804FB}", + "details": { + "name": "Quaternion" + } + } + ] + }, + { + "base": "RandomVector4", + "context": "{D9DF1385-6C5C-4E41-94CA-8B10E9D8FAAF}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke RandomVector4" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after RandomVector4 is invoked" + }, + "details": { + "name": "RandomVector4" + }, + "params": [ + { + "typeid": "{0CE9FA36-1E3A-4C06-9254-B7C73A732053}", + "details": { + "name": "Vector4" + } + }, + { + "typeid": "{0CE9FA36-1E3A-4C06-9254-B7C73A732053}", + "details": { + "name": "Vector4" + } + } + ], + "results": [ + { + "typeid": "{0CE9FA36-1E3A-4C06-9254-B7C73A732053}", + "details": { + "name": "Vector4" + } + } + ] + }, + { + "base": "RandomPointInBox", + "context": "{D9DF1385-6C5C-4E41-94CA-8B10E9D8FAAF}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke RandomPointInBox" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after RandomPointInBox is invoked" + }, + "details": { + "name": "RandomPointInBox" + }, + "params": [ + { + "typeid": "{8379EB7D-01FA-4538-B64B-A6543B4BE73D}", + "details": { + "name": "Vector3" + } + } + ], + "results": [ + { + "typeid": "{8379EB7D-01FA-4538-B64B-A6543B4BE73D}", + "details": { + "name": "Vector3" + } + } + ] + }, + { + "base": "RandomPointOnCircle", + "context": "{D9DF1385-6C5C-4E41-94CA-8B10E9D8FAAF}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke RandomPointOnCircle" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after RandomPointOnCircle is invoked" + }, + "details": { + "name": "RandomPointOnCircle" + }, + "params": [ + { + "typeid": "{110C4B14-11A8-4E9D-8638-5051013A56AC}", + "details": { + "name": "double" + } + } + ], + "results": [ + { + "typeid": "{8379EB7D-01FA-4538-B64B-A6543B4BE73D}", + "details": { + "name": "Vector3" + } + } + ] + }, + { + "base": "RandomPointInEllipsoid", + "context": "{D9DF1385-6C5C-4E41-94CA-8B10E9D8FAAF}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke RandomPointInEllipsoid" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after RandomPointInEllipsoid is invoked" + }, + "details": { + "name": "RandomPointInEllipsoid" + }, + "params": [ + { + "typeid": "{8379EB7D-01FA-4538-B64B-A6543B4BE73D}", + "details": { + "name": "Vector3" + } + } + ], + "results": [ + { + "typeid": "{8379EB7D-01FA-4538-B64B-A6543B4BE73D}", + "details": { + "name": "Vector3" + } + } + ] + }, + { + "base": "RandomInteger", + "context": "{D9DF1385-6C5C-4E41-94CA-8B10E9D8FAAF}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke RandomInteger" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after RandomInteger is invoked" + }, + "details": { + "name": "RandomInteger" + }, + "params": [ + { + "typeid": "{110C4B14-11A8-4E9D-8638-5051013A56AC}", + "details": { + "name": "double" + } + }, + { + "typeid": "{110C4B14-11A8-4E9D-8638-5051013A56AC}", + "details": { + "name": "double" + } + } + ], + "results": [ + { + "typeid": "{110C4B14-11A8-4E9D-8638-5051013A56AC}", + "details": { + "name": "double" + } + } + ] + }, + { + "base": "RandomPointInWedge", + "context": "{D9DF1385-6C5C-4E41-94CA-8B10E9D8FAAF}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke RandomPointInWedge" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after RandomPointInWedge is invoked" + }, + "details": { + "name": "RandomPointInWedge" + }, + "params": [ + { + "typeid": "{8379EB7D-01FA-4538-B64B-A6543B4BE73D}", + "details": { + "name": "Vector3" + } + }, + { + "typeid": "{8379EB7D-01FA-4538-B64B-A6543B4BE73D}", + "details": { + "name": "Vector3" + } + }, + { + "typeid": "{8379EB7D-01FA-4538-B64B-A6543B4BE73D}", + "details": { + "name": "Vector3" + } + }, + { + "typeid": "{110C4B14-11A8-4E9D-8638-5051013A56AC}", + "details": { + "name": "double" + } + }, + { + "typeid": "{110C4B14-11A8-4E9D-8638-5051013A56AC}", + "details": { + "name": "double" + } + }, + { + "typeid": "{110C4B14-11A8-4E9D-8638-5051013A56AC}", + "details": { + "name": "double" + } + } + ], + "results": [ + { + "typeid": "{8379EB7D-01FA-4538-B64B-A6543B4BE73D}", + "details": { + "name": "Vector3" + } + } + ] + }, + { + "base": "RandomGrayscale", + "context": "{D9DF1385-6C5C-4E41-94CA-8B10E9D8FAAF}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke RandomGrayscale" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after RandomGrayscale is invoked" + }, + "details": { + "name": "RandomGrayscale" + }, + "params": [ + { + "typeid": "{110C4B14-11A8-4E9D-8638-5051013A56AC}", + "details": { + "name": "double" + } + }, + { + "typeid": "{110C4B14-11A8-4E9D-8638-5051013A56AC}", + "details": { + "name": "double" + } + } + ], + "results": [ + { + "typeid": "{7894072A-9050-4F0F-901B-34B1A0D29417}", + "details": { + "name": "Color" + } + } + ] + }, + { + "base": "RandomPointInCone", + "context": "{D9DF1385-6C5C-4E41-94CA-8B10E9D8FAAF}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke RandomPointInCone" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after RandomPointInCone is invoked" + }, + "details": { + "name": "RandomPointInCone" + }, + "params": [ + { + "typeid": "{110C4B14-11A8-4E9D-8638-5051013A56AC}", + "details": { + "name": "double" + } + }, + { + "typeid": "{110C4B14-11A8-4E9D-8638-5051013A56AC}", + "details": { + "name": "double" + } + } + ], + "results": [ + { + "typeid": "{8379EB7D-01FA-4538-B64B-A6543B4BE73D}", + "details": { + "name": "Vector3" + } + } + ] + }, + { + "base": "RandomColor", + "context": "{D9DF1385-6C5C-4E41-94CA-8B10E9D8FAAF}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke RandomColor" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after RandomColor is invoked" + }, + "details": { + "name": "RandomColor" + }, + "params": [ + { + "typeid": "{7894072A-9050-4F0F-901B-34B1A0D29417}", + "details": { + "name": "Color" + } + }, + { + "typeid": "{7894072A-9050-4F0F-901B-34B1A0D29417}", + "details": { + "name": "Color" + } + } + ], + "results": [ + { + "typeid": "{7894072A-9050-4F0F-901B-34B1A0D29417}", + "details": { + "name": "Color" + } + } + ] + }, + { + "base": "RandomNumber", + "context": "{D9DF1385-6C5C-4E41-94CA-8B10E9D8FAAF}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke RandomNumber" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after RandomNumber is invoked" + }, + "details": { + "name": "RandomNumber" + }, + "params": [ + { + "typeid": "{110C4B14-11A8-4E9D-8638-5051013A56AC}", + "details": { + "name": "double" + } + }, + { + "typeid": "{110C4B14-11A8-4E9D-8638-5051013A56AC}", + "details": { + "name": "double" + } + } + ], + "results": [ + { + "typeid": "{110C4B14-11A8-4E9D-8638-5051013A56AC}", + "details": { + "name": "double" + } + } + ] + }, + { + "base": "RandomPointInSphere", + "context": "{D9DF1385-6C5C-4E41-94CA-8B10E9D8FAAF}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke RandomPointInSphere" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after RandomPointInSphere is invoked" + }, + "details": { + "name": "RandomPointInSphere" + }, + "params": [ + { + "typeid": "{110C4B14-11A8-4E9D-8638-5051013A56AC}", + "details": { + "name": "double" + } + } + ], + "results": [ + { + "typeid": "{8379EB7D-01FA-4538-B64B-A6543B4BE73D}", + "details": { + "name": "Vector3" + } + } + ] + }, + { + "base": "RandomUnitVector3", + "context": "{D9DF1385-6C5C-4E41-94CA-8B10E9D8FAAF}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke RandomUnitVector3" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after RandomUnitVector3 is invoked" + }, + "details": { + "name": "RandomUnitVector3" + }, + "results": [ + { + "typeid": "{8379EB7D-01FA-4538-B64B-A6543B4BE73D}", + "details": { + "name": "Vector3" + } + } + ] + }, + { + "base": "RandomVector3", + "context": "{D9DF1385-6C5C-4E41-94CA-8B10E9D8FAAF}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke RandomVector3" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after RandomVector3 is invoked" + }, + "details": { + "name": "RandomVector3" + }, + "params": [ + { + "typeid": "{8379EB7D-01FA-4538-B64B-A6543B4BE73D}", + "details": { + "name": "Vector3" + } + }, + { + "typeid": "{8379EB7D-01FA-4538-B64B-A6543B4BE73D}", + "details": { + "name": "Vector3" + } + } + ], + "results": [ + { + "typeid": "{8379EB7D-01FA-4538-B64B-A6543B4BE73D}", + "details": { + "name": "Vector3" + } + } + ] + }, + { + "base": "RandomPointInArc", + "context": "{D9DF1385-6C5C-4E41-94CA-8B10E9D8FAAF}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke RandomPointInArc" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after RandomPointInArc is invoked" + }, + "details": { + "name": "RandomPointInArc" + }, + "params": [ + { + "typeid": "{8379EB7D-01FA-4538-B64B-A6543B4BE73D}", + "details": { + "name": "Vector3" + } + }, + { + "typeid": "{8379EB7D-01FA-4538-B64B-A6543B4BE73D}", + "details": { + "name": "Vector3" + } + }, + { + "typeid": "{8379EB7D-01FA-4538-B64B-A6543B4BE73D}", + "details": { + "name": "Vector3" + } + }, + { + "typeid": "{110C4B14-11A8-4E9D-8638-5051013A56AC}", + "details": { + "name": "double" + } + }, + { + "typeid": "{110C4B14-11A8-4E9D-8638-5051013A56AC}", + "details": { + "name": "double" + } + } + ], + "results": [ + { + "typeid": "{8379EB7D-01FA-4538-B64B-A6543B4BE73D}", + "details": { + "name": "Vector3" + } + } + ] + } + ] + }, + { + "base": "{7352CD6D-91DA-536F-BFCC-BC513FB48B2D}", + "context": "OnDemandReflected", + "variant": "", + "details": { + "name": "Tuple" + }, + "methods": [ + { + "base": "GetSize", + "context": "{7352CD6D-91DA-536F-BFCC-BC513FB48B2D}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke GetSize" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after GetSize is invoked" + }, + "details": { + "name": "GetSize" + }, + "results": [ + { + "typeid": "{D6597933-47CD-4FC8-B911-63F3E2B0993A}", + "details": { + "name": "AZ::u64" + } + } + ] + }, + { + "base": "Get3", + "context": "{7352CD6D-91DA-536F-BFCC-BC513FB48B2D}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Get3" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Get3 is invoked" + }, + "details": { + "name": "Get3" + }, + "params": [ + { + "typeid": "{7352CD6D-91DA-536F-BFCC-BC513FB48B2D}", + "details": { + "name": "tuple&" + } + } + ], + "results": [ + { + "typeid": "{110C4B14-11A8-4E9D-8638-5051013A56AC}", + "details": { + "name": "double" + } + } + ] + }, + { + "base": "Get2", + "context": "{7352CD6D-91DA-536F-BFCC-BC513FB48B2D}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Get2" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Get2 is invoked" + }, + "details": { + "name": "Get2" + }, + "params": [ + { + "typeid": "{7352CD6D-91DA-536F-BFCC-BC513FB48B2D}", + "details": { + "name": "tuple&" + } + } + ], + "results": [ + { + "typeid": "{110C4B14-11A8-4E9D-8638-5051013A56AC}", + "details": { + "name": "double" + } + } + ] + }, + { + "base": "Get1", + "context": "{7352CD6D-91DA-536F-BFCC-BC513FB48B2D}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Get1" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Get1 is invoked" + }, + "details": { + "name": "Get1" + }, + "params": [ + { + "typeid": "{7352CD6D-91DA-536F-BFCC-BC513FB48B2D}", + "details": { + "name": "tuple&" + } + } + ], + "results": [ + { + "typeid": "{110C4B14-11A8-4E9D-8638-5051013A56AC}", + "details": { + "name": "double" + } + } + ] + }, + { + "base": "Get0", + "context": "{7352CD6D-91DA-536F-BFCC-BC513FB48B2D}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Get0" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Get0 is invoked" + }, + "details": { + "name": "Get0" + }, + "params": [ + { + "typeid": "{7352CD6D-91DA-536F-BFCC-BC513FB48B2D}", + "details": { + "name": "tuple&" + } + } + ], + "results": [ + { + "typeid": "{110C4B14-11A8-4E9D-8638-5051013A56AC}", + "details": { + "name": "double" + } + } + ] + } + ] + }, + { + "base": "{34333904-F6D2-5090-9D5D-B52D135144EA}", + "context": "OnDemandReflected", + "variant": "", + "details": { + "name": "Map", + "category": "Map", + "tooltip": "A collection of Key/Value pairs, where each Key value must be unique." + }, + "methods": [ + { + "base": "contains", + "context": "{34333904-F6D2-5090-9D5D-B52D135144EA}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke contains" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after contains is invoked" + }, + "details": { + "name": "contains" + }, + "params": [ + { + "typeid": "{34333904-F6D2-5090-9D5D-B52D135144EA}", + "details": { + "name": "AZStd::unordered_map" + } + }, + { + "typeid": "{A0CA880C-AFE4-43CB-926C-59AC48496112}", + "details": { + "name": "bool" + } + } + ], + "results": [ + { + "typeid": "{A0CA880C-AFE4-43CB-926C-59AC48496112}", + "details": { + "name": "bool" + } + } + ] + }, + { + "base": "Insert", + "context": "{34333904-F6D2-5090-9D5D-B52D135144EA}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Insert" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Insert is invoked" + }, + "details": { + "name": "Insert" + }, + "params": [ + { + "typeid": "{34333904-F6D2-5090-9D5D-B52D135144EA}", + "details": { + "name": "AZStd::unordered_map" + } + }, + { + "typeid": "{A0CA880C-AFE4-43CB-926C-59AC48496112}", + "details": { + "name": "bool" + } + }, + { + "typeid": "{8379EB7D-01FA-4538-B64B-A6543B4BE73D}", + "details": { + "name": "Vector3" + } + } + ], + "results": [ + { + "typeid": "{34333904-F6D2-5090-9D5D-B52D135144EA}", + "details": { + "name": "AZStd::unordered_map" + } + } + ] + }, + { + "base": "Reserve", + "context": "{34333904-F6D2-5090-9D5D-B52D135144EA}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Reserve" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Reserve is invoked" + }, + "details": { + "name": "Reserve" + }, + "params": [ + { + "typeid": "{34333904-F6D2-5090-9D5D-B52D135144EA}", + "details": { + "name": "AZStd::unordered_map" + } + }, + { + "typeid": "{D6597933-47CD-4FC8-B911-63F3E2B0993A}", + "details": { + "name": "AZ::u64" + } + } + ] + }, + { + "base": "GetSize", + "context": "{34333904-F6D2-5090-9D5D-B52D135144EA}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke GetSize" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after GetSize is invoked" + }, + "details": { + "name": "GetSize" + }, + "params": [ + { + "typeid": "{34333904-F6D2-5090-9D5D-B52D135144EA}", + "details": { + "name": "AZStd::unordered_map" + } + } + ], + "results": [ + { + "typeid": "{72039442-EB38-4D42-A1AD-CB68F7E0EEF6}", + "details": { + "name": "int" + } + } + ] + }, + { + "base": "Iterate_VM", + "context": "{34333904-F6D2-5090-9D5D-B52D135144EA}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Iterate_VM" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Iterate_VM is invoked" + }, + "details": { + "name": "Iterate_VM" + }, + "params": [ + { + "typeid": "{34333904-F6D2-5090-9D5D-B52D135144EA}", + "details": { + "name": "AZStd::unordered_map" + } + } + ], + "results": [ + { + "typeid": "{392AC7EE-72B6-50C2-8AD3-900E685DFBAF}", + "details": { + "name": "Iterator_VM, AZStd::equal_to, allocator>>" + } + } + ] + }, + { + "base": "GetKeys", + "context": "{34333904-F6D2-5090-9D5D-B52D135144EA}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke GetKeys" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after GetKeys is invoked" + }, + "details": { + "name": "GetKeys" + }, + "params": [ + { + "typeid": "{34333904-F6D2-5090-9D5D-B52D135144EA}", + "details": { + "name": "AZStd::unordered_map" + } + } + ], + "results": [ + { + "typeid": "{B505B05D-57BF-5A45-9113-B3A2784E2CD7}", + "details": { + "name": "AZStd::vector" + } + } + ] + }, + { + "base": "Size", + "context": "{34333904-F6D2-5090-9D5D-B52D135144EA}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Size" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Size is invoked" + }, + "details": { + "name": "Size" + }, + "params": [ + { + "typeid": "{34333904-F6D2-5090-9D5D-B52D135144EA}", + "details": { + "name": "AZStd::unordered_map" + } + } + ], + "results": [ + { + "typeid": "{72039442-EB38-4D42-A1AD-CB68F7E0EEF6}", + "details": { + "name": "int" + } + } + ] + }, + { + "base": "Erase", + "context": "{34333904-F6D2-5090-9D5D-B52D135144EA}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Erase" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Erase is invoked" + }, + "details": { + "name": "Erase" + }, + "params": [ + { + "typeid": "{34333904-F6D2-5090-9D5D-B52D135144EA}", + "details": { + "name": "AZStd::unordered_map" + } + }, + { + "typeid": "{A0CA880C-AFE4-43CB-926C-59AC48496112}", + "details": { + "name": "bool" + } + } + ], + "results": [ + { + "typeid": "{34333904-F6D2-5090-9D5D-B52D135144EA}", + "details": { + "name": "AZStd::unordered_map" + } + } + ] + }, + { + "base": "EraseCheck_VM", + "context": "{34333904-F6D2-5090-9D5D-B52D135144EA}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke EraseCheck_VM" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after EraseCheck_VM is invoked" + }, + "details": { + "name": "EraseCheck_VM" + }, + "params": [ + { + "typeid": "{34333904-F6D2-5090-9D5D-B52D135144EA}", + "details": { + "name": "AZStd::unordered_map" + } + }, + { + "typeid": "{A0CA880C-AFE4-43CB-926C-59AC48496112}", + "details": { + "name": "bool" + } + } + ], + "results": [ + { + "typeid": "{A0CA880C-AFE4-43CB-926C-59AC48496112}", + "details": { + "name": "bool" + } + } + ] + }, + { + "base": "Clear", + "context": "{34333904-F6D2-5090-9D5D-B52D135144EA}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Clear" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Clear is invoked" + }, + "details": { + "name": "Clear" + }, + "params": [ + { + "typeid": "{34333904-F6D2-5090-9D5D-B52D135144EA}", + "details": { + "name": "AZStd::unordered_map" + } + } + ], + "results": [ + { + "typeid": "{34333904-F6D2-5090-9D5D-B52D135144EA}", + "details": { + "name": "AZStd::unordered_map" + } + } + ] + }, + { + "base": "At", + "context": "{34333904-F6D2-5090-9D5D-B52D135144EA}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke At" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after At is invoked" + }, + "details": { + "name": "At" + }, + "params": [ + { + "typeid": "{34333904-F6D2-5090-9D5D-B52D135144EA}", + "details": { + "name": "AZStd::unordered_map" + } + }, + { + "typeid": "{A0CA880C-AFE4-43CB-926C-59AC48496112}", + "details": { + "name": "bool" + } + } + ], + "results": [ + { + "typeid": "{8379EB7D-01FA-4538-B64B-A6543B4BE73D}", + "details": { + "name": "Vector3" + } + } + ] + }, + { + "base": "BucketCount", + "context": "{34333904-F6D2-5090-9D5D-B52D135144EA}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke BucketCount" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after BucketCount is invoked" + }, + "details": { + "name": "BucketCount" + }, + "params": [ + { + "typeid": "{34333904-F6D2-5090-9D5D-B52D135144EA}", + "details": { + "name": "AZStd::unordered_map" + } + } + ], + "results": [ + { + "typeid": "{D6597933-47CD-4FC8-B911-63F3E2B0993A}", + "details": { + "name": "AZ::u64" + } + } + ] + }, + { + "base": "Empty", + "context": "{34333904-F6D2-5090-9D5D-B52D135144EA}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Empty" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Empty is invoked" + }, + "details": { + "name": "Empty" + }, + "params": [ + { + "typeid": "{34333904-F6D2-5090-9D5D-B52D135144EA}", + "details": { + "name": "AZStd::unordered_map" + } + } + ], + "results": [ + { + "typeid": "{A0CA880C-AFE4-43CB-926C-59AC48496112}", + "details": { + "name": "bool" + } + } + ] + }, + { + "base": "Swap", + "context": "{34333904-F6D2-5090-9D5D-B52D135144EA}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Swap" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Swap is invoked" + }, + "details": { + "name": "Swap" + }, + "params": [ + { + "typeid": "{34333904-F6D2-5090-9D5D-B52D135144EA}", + "details": { + "name": "AZStd::unordered_map" + } + }, + { + "typeid": "{34333904-F6D2-5090-9D5D-B52D135144EA}", + "details": { + "name": "AZStd::unordered_map" + } + } + ] + } + ] + }, + { + "base": "{E51F56F8-D4E9-5C9F-AE6F-3F9C5D28F4C6}", + "context": "OnDemandReflected", + "variant": "", + "details": { + "name": "Shared", + "category": "Shared", + "tooltip": "A smart pointer which manages the life cycle of an object, and provides multiple points of ownership for the specified memory(The memory will remain active so long as any shared_ptr has a reference to it)." + }, + "methods": [ + { + "base": "get", + "context": "{E51F56F8-D4E9-5C9F-AE6F-3F9C5D28F4C6}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke get" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after get is invoked" + }, + "details": { + "name": "get" + }, + "params": [ + { + "typeid": "{E51F56F8-D4E9-5C9F-AE6F-3F9C5D28F4C6}", + "details": { + "name": "AZStd::shared_ptr*" + } + } + ], + "results": [ + { + "typeid": "{CBF5DC3C-A0A7-45F5-A207-06433A9A10C5}", + "details": { + "name": "Graph" + } + } + ] + } + ] + }, + { + "base": "{CD6328B1-6CC4-54CE-97F4-9D91F5A242F4}", + "context": "OnDemandReflected", + "variant": "", + "details": { + "name": "Tuple" + }, + "methods": [ + { + "base": "Get0", + "context": "{CD6328B1-6CC4-54CE-97F4-9D91F5A242F4}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Get0" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Get0 is invoked" + }, + "details": { + "name": "Get0" + }, + "params": [ + { + "typeid": "{CD6328B1-6CC4-54CE-97F4-9D91F5A242F4}", + "details": { + "name": "tuple&" + } + } + ], + "results": [ + { + "typeid": "{8379EB7D-01FA-4538-B64B-A6543B4BE73D}", + "details": { + "name": "Vector3" + } + } + ] + }, + { + "base": "Get1", + "context": "{CD6328B1-6CC4-54CE-97F4-9D91F5A242F4}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Get1" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Get1 is invoked" + }, + "details": { + "name": "Get1" + }, + "params": [ + { + "typeid": "{CD6328B1-6CC4-54CE-97F4-9D91F5A242F4}", + "details": { + "name": "tuple&" + } + } + ], + "results": [ + { + "typeid": "{110C4B14-11A8-4E9D-8638-5051013A56AC}", + "details": { + "name": "double" + } + } + ] + }, + { + "base": "GetSize", + "context": "{CD6328B1-6CC4-54CE-97F4-9D91F5A242F4}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke GetSize" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after GetSize is invoked" + }, + "details": { + "name": "GetSize" + }, + "results": [ + { + "typeid": "{D6597933-47CD-4FC8-B911-63F3E2B0993A}", + "details": { + "name": "AZ::u64" + } + } + ] + } + ] + }, + { + "base": "{4A885DC2-5C26-52F0-BA83-61EEC0FB5E4E}", + "context": "OnDemandReflected", + "variant": "", + "details": { + "name": "Map", + "category": "Map", + "tooltip": "A collection of Key/Value pairs, where each Key value must be unique." + }, + "methods": [ + { + "base": "contains", + "context": "{4A885DC2-5C26-52F0-BA83-61EEC0FB5E4E}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke contains" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after contains is invoked" + }, + "details": { + "name": "contains" + }, + "params": [ + { + "typeid": "{4A885DC2-5C26-52F0-BA83-61EEC0FB5E4E}", + "details": { + "name": "AZStd::unordered_map" + } + }, + { + "typeid": "{6383F1D3-BB27-4E6B-A49A-6409B2059EAA}", + "details": { + "name": "EntityId", + "tooltip": "Entity Unique Id" + } + } + ], + "results": [ + { + "typeid": "{A0CA880C-AFE4-43CB-926C-59AC48496112}", + "details": { + "name": "bool" + } + } + ] + }, + { + "base": "Insert", + "context": "{4A885DC2-5C26-52F0-BA83-61EEC0FB5E4E}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Insert" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Insert is invoked" + }, + "details": { + "name": "Insert" + }, + "params": [ + { + "typeid": "{4A885DC2-5C26-52F0-BA83-61EEC0FB5E4E}", + "details": { + "name": "AZStd::unordered_map" + } + }, + { + "typeid": "{6383F1D3-BB27-4E6B-A49A-6409B2059EAA}", + "details": { + "name": "EntityId", + "tooltip": "Entity Unique Id" + } + }, + { + "typeid": "{15A4332F-7C3F-4A58-AC35-50E1CE53FB9C}", + "details": { + "name": "Matrix3x3" + } + } + ], + "results": [ + { + "typeid": "{4A885DC2-5C26-52F0-BA83-61EEC0FB5E4E}", + "details": { + "name": "AZStd::unordered_map" + } + } + ] + }, + { + "base": "Reserve", + "context": "{4A885DC2-5C26-52F0-BA83-61EEC0FB5E4E}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Reserve" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Reserve is invoked" + }, + "details": { + "name": "Reserve" + }, + "params": [ + { + "typeid": "{4A885DC2-5C26-52F0-BA83-61EEC0FB5E4E}", + "details": { + "name": "AZStd::unordered_map" + } + }, + { + "typeid": "{D6597933-47CD-4FC8-B911-63F3E2B0993A}", + "details": { + "name": "AZ::u64" + } + } + ] + }, + { + "base": "GetSize", + "context": "{4A885DC2-5C26-52F0-BA83-61EEC0FB5E4E}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke GetSize" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after GetSize is invoked" + }, + "details": { + "name": "GetSize" + }, + "params": [ + { + "typeid": "{4A885DC2-5C26-52F0-BA83-61EEC0FB5E4E}", + "details": { + "name": "AZStd::unordered_map" + } + } + ], + "results": [ + { + "typeid": "{72039442-EB38-4D42-A1AD-CB68F7E0EEF6}", + "details": { + "name": "int" + } + } + ] + }, + { + "base": "Iterate_VM", + "context": "{4A885DC2-5C26-52F0-BA83-61EEC0FB5E4E}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Iterate_VM" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Iterate_VM is invoked" + }, + "details": { + "name": "Iterate_VM" + }, + "params": [ + { + "typeid": "{4A885DC2-5C26-52F0-BA83-61EEC0FB5E4E}", + "details": { + "name": "AZStd::unordered_map" + } + } + ], + "results": [ + { + "typeid": "{B536054C-80E9-5EA7-972E-267BA65B4A4E}", + "details": { + "name": "Iterator_VM, AZStd::equal_to, allocator>>" + } + } + ] + }, + { + "base": "GetKeys", + "context": "{4A885DC2-5C26-52F0-BA83-61EEC0FB5E4E}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke GetKeys" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after GetKeys is invoked" + }, + "details": { + "name": "GetKeys" + }, + "params": [ + { + "typeid": "{4A885DC2-5C26-52F0-BA83-61EEC0FB5E4E}", + "details": { + "name": "AZStd::unordered_map" + } + } + ], + "results": [ + { + "typeid": "{4841CFF0-7A5C-519C-BD16-D3625E99605E}", + "details": { + "name": "AZStd::vector" + } + } + ] + }, + { + "base": "Size", + "context": "{4A885DC2-5C26-52F0-BA83-61EEC0FB5E4E}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Size" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Size is invoked" + }, + "details": { + "name": "Size" + }, + "params": [ + { + "typeid": "{4A885DC2-5C26-52F0-BA83-61EEC0FB5E4E}", + "details": { + "name": "AZStd::unordered_map" + } + } + ], + "results": [ + { + "typeid": "{72039442-EB38-4D42-A1AD-CB68F7E0EEF6}", + "details": { + "name": "int" + } + } + ] + }, + { + "base": "Erase", + "context": "{4A885DC2-5C26-52F0-BA83-61EEC0FB5E4E}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Erase" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Erase is invoked" + }, + "details": { + "name": "Erase" + }, + "params": [ + { + "typeid": "{4A885DC2-5C26-52F0-BA83-61EEC0FB5E4E}", + "details": { + "name": "AZStd::unordered_map" + } + }, + { + "typeid": "{6383F1D3-BB27-4E6B-A49A-6409B2059EAA}", + "details": { + "name": "EntityId", + "tooltip": "Entity Unique Id" + } + } + ], + "results": [ + { + "typeid": "{4A885DC2-5C26-52F0-BA83-61EEC0FB5E4E}", + "details": { + "name": "AZStd::unordered_map" + } + } + ] + }, + { + "base": "EraseCheck_VM", + "context": "{4A885DC2-5C26-52F0-BA83-61EEC0FB5E4E}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke EraseCheck_VM" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after EraseCheck_VM is invoked" + }, + "details": { + "name": "EraseCheck_VM" + }, + "params": [ + { + "typeid": "{4A885DC2-5C26-52F0-BA83-61EEC0FB5E4E}", + "details": { + "name": "AZStd::unordered_map" + } + }, + { + "typeid": "{6383F1D3-BB27-4E6B-A49A-6409B2059EAA}", + "details": { + "name": "EntityId", + "tooltip": "Entity Unique Id" + } + } + ], + "results": [ + { + "typeid": "{A0CA880C-AFE4-43CB-926C-59AC48496112}", + "details": { + "name": "bool" + } + } + ] + }, + { + "base": "Clear", + "context": "{4A885DC2-5C26-52F0-BA83-61EEC0FB5E4E}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Clear" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Clear is invoked" + }, + "details": { + "name": "Clear" + }, + "params": [ + { + "typeid": "{4A885DC2-5C26-52F0-BA83-61EEC0FB5E4E}", + "details": { + "name": "AZStd::unordered_map" + } + } + ], + "results": [ + { + "typeid": "{4A885DC2-5C26-52F0-BA83-61EEC0FB5E4E}", + "details": { + "name": "AZStd::unordered_map" + } + } + ] + }, + { + "base": "At", + "context": "{4A885DC2-5C26-52F0-BA83-61EEC0FB5E4E}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke At" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after At is invoked" + }, + "details": { + "name": "At" + }, + "params": [ + { + "typeid": "{4A885DC2-5C26-52F0-BA83-61EEC0FB5E4E}", + "details": { + "name": "AZStd::unordered_map" + } + }, + { + "typeid": "{6383F1D3-BB27-4E6B-A49A-6409B2059EAA}", + "details": { + "name": "EntityId", + "tooltip": "Entity Unique Id" + } + } + ], + "results": [ + { + "typeid": "{15A4332F-7C3F-4A58-AC35-50E1CE53FB9C}", + "details": { + "name": "Matrix3x3" + } + } + ] + }, + { + "base": "BucketCount", + "context": "{4A885DC2-5C26-52F0-BA83-61EEC0FB5E4E}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke BucketCount" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after BucketCount is invoked" + }, + "details": { + "name": "BucketCount" + }, + "params": [ + { + "typeid": "{4A885DC2-5C26-52F0-BA83-61EEC0FB5E4E}", + "details": { + "name": "AZStd::unordered_map" + } + } + ], + "results": [ + { + "typeid": "{D6597933-47CD-4FC8-B911-63F3E2B0993A}", + "details": { + "name": "AZ::u64" + } + } + ] + }, + { + "base": "Empty", + "context": "{4A885DC2-5C26-52F0-BA83-61EEC0FB5E4E}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Empty" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Empty is invoked" + }, + "details": { + "name": "Empty" + }, + "params": [ + { + "typeid": "{4A885DC2-5C26-52F0-BA83-61EEC0FB5E4E}", + "details": { + "name": "AZStd::unordered_map" + } + } + ], + "results": [ + { + "typeid": "{A0CA880C-AFE4-43CB-926C-59AC48496112}", + "details": { + "name": "bool" + } + } + ] + }, + { + "base": "Swap", + "context": "{4A885DC2-5C26-52F0-BA83-61EEC0FB5E4E}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Swap" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Swap is invoked" + }, + "details": { + "name": "Swap" + }, + "params": [ + { + "typeid": "{4A885DC2-5C26-52F0-BA83-61EEC0FB5E4E}", + "details": { + "name": "AZStd::unordered_map" + } + }, + { + "typeid": "{4A885DC2-5C26-52F0-BA83-61EEC0FB5E4E}", + "details": { + "name": "AZStd::unordered_map" + } + } + ] + } + ] + }, + { + "base": "{D0A15826-BEFB-5FBD-BEB4-609E7F2B67AD}", + "context": "OnDemandReflected", + "variant": "", + "details": { + "name": "Map", + "category": "Map", + "tooltip": "A collection of Key/Value pairs, where each Key value must be unique." + }, + "methods": [ + { + "base": "contains", + "context": "{D0A15826-BEFB-5FBD-BEB4-609E7F2B67AD}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke contains" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after contains is invoked" + }, + "details": { + "name": "contains" + }, + "params": [ + { + "typeid": "{D0A15826-BEFB-5FBD-BEB4-609E7F2B67AD}", + "details": { + "name": "AZStd::unordered_map" + } + }, + { + "typeid": "{03AAAB3F-5C47-5A66-9EBC-D5FA4DB353C9}", + "details": { + "name": "AZStd::string" + } + } + ], + "results": [ + { + "typeid": "{A0CA880C-AFE4-43CB-926C-59AC48496112}", + "details": { + "name": "bool" + } + } + ] + }, + { + "base": "Insert", + "context": "{D0A15826-BEFB-5FBD-BEB4-609E7F2B67AD}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Insert" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Insert is invoked" + }, + "details": { + "name": "Insert" + }, + "params": [ + { + "typeid": "{D0A15826-BEFB-5FBD-BEB4-609E7F2B67AD}", + "details": { + "name": "AZStd::unordered_map" + } + }, + { + "typeid": "{03AAAB3F-5C47-5A66-9EBC-D5FA4DB353C9}", + "details": { + "name": "AZStd::string" + } + }, + { + "typeid": "{110C4B14-11A8-4E9D-8638-5051013A56AC}", + "details": { + "name": "double" + } + } + ], + "results": [ + { + "typeid": "{D0A15826-BEFB-5FBD-BEB4-609E7F2B67AD}", + "details": { + "name": "AZStd::unordered_map" + } + } + ] + }, + { + "base": "Reserve", + "context": "{D0A15826-BEFB-5FBD-BEB4-609E7F2B67AD}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Reserve" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Reserve is invoked" + }, + "details": { + "name": "Reserve" + }, + "params": [ + { + "typeid": "{D0A15826-BEFB-5FBD-BEB4-609E7F2B67AD}", + "details": { + "name": "AZStd::unordered_map" + } + }, + { + "typeid": "{D6597933-47CD-4FC8-B911-63F3E2B0993A}", + "details": { + "name": "AZ::u64" + } + } + ] + }, + { + "base": "GetSize", + "context": "{D0A15826-BEFB-5FBD-BEB4-609E7F2B67AD}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke GetSize" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after GetSize is invoked" + }, + "details": { + "name": "GetSize" + }, + "params": [ + { + "typeid": "{D0A15826-BEFB-5FBD-BEB4-609E7F2B67AD}", + "details": { + "name": "AZStd::unordered_map" + } + } + ], + "results": [ + { + "typeid": "{72039442-EB38-4D42-A1AD-CB68F7E0EEF6}", + "details": { + "name": "int" + } + } + ] + }, + { + "base": "Iterate_VM", + "context": "{D0A15826-BEFB-5FBD-BEB4-609E7F2B67AD}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Iterate_VM" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Iterate_VM is invoked" + }, + "details": { + "name": "Iterate_VM" + }, + "params": [ + { + "typeid": "{D0A15826-BEFB-5FBD-BEB4-609E7F2B67AD}", + "details": { + "name": "AZStd::unordered_map" + } + } + ], + "results": [ + { + "typeid": "{65F2D63C-4E98-5EA5-8C8C-3C174C291388}", + "details": { + "name": "Iterator_VM, allocator>, double, AZStd::hash" + }, + "methods": [ + { + "base": "GetError", + "context": "{BC094BE5-5849-5E61-82B9-FB3B434F6BAD}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke GetError" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after GetError is invoked" + }, + "details": { + "name": "GetError" + }, + "params": [ + { + "typeid": "{BC094BE5-5849-5E61-82B9-FB3B434F6BAD}", + "details": { + "name": "Outcome, allocator>>" + } + } + ] + }, + { + "base": "GetValue", + "context": "{BC094BE5-5849-5E61-82B9-FB3B434F6BAD}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke GetValue" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after GetValue is invoked" + }, + "details": { + "name": "GetValue" + }, + "params": [ + { + "typeid": "{BC094BE5-5849-5E61-82B9-FB3B434F6BAD}", + "details": { + "name": "Outcome, allocator>>" + } + } + ] + } + ] + }, + { + "base": "{D33569A9-EFFC-566C-8CCC-74D6E086A1B0}", + "context": "OnDemandReflected", + "variant": "", + "details": { + "name": "Map", + "category": "Map", + "tooltip": "A collection of Key/Value pairs, where each Key value must be unique." + }, + "methods": [ + { + "base": "contains", + "context": "{D33569A9-EFFC-566C-8CCC-74D6E086A1B0}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke contains" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after contains is invoked" + }, + "details": { + "name": "contains" + }, + "params": [ + { + "typeid": "{D33569A9-EFFC-566C-8CCC-74D6E086A1B0}", + "details": { + "name": "AZStd::unordered_map" + } + }, + { + "typeid": "{6383F1D3-BB27-4E6B-A49A-6409B2059EAA}", + "details": { + "name": "EntityId", + "tooltip": "Entity Unique Id" + } + } + ], + "results": [ + { + "typeid": "{A0CA880C-AFE4-43CB-926C-59AC48496112}", + "details": { + "name": "bool" + } + } + ] + }, + { + "base": "Insert", + "context": "{D33569A9-EFFC-566C-8CCC-74D6E086A1B0}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Insert" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Insert is invoked" + }, + "details": { + "name": "Insert" + }, + "params": [ + { + "typeid": "{D33569A9-EFFC-566C-8CCC-74D6E086A1B0}", + "details": { + "name": "AZStd::unordered_map" + } + }, + { + "typeid": "{6383F1D3-BB27-4E6B-A49A-6409B2059EAA}", + "details": { + "name": "EntityId", + "tooltip": "Entity Unique Id" + } + }, + { + "typeid": "{6383F1D3-BB27-4E6B-A49A-6409B2059EAA}", + "details": { + "name": "EntityId", + "tooltip": "Entity Unique Id" + } + } + ], + "results": [ + { + "typeid": "{D33569A9-EFFC-566C-8CCC-74D6E086A1B0}", + "details": { + "name": "AZStd::unordered_map" + } + } + ] + }, + { + "base": "Reserve", + "context": "{D33569A9-EFFC-566C-8CCC-74D6E086A1B0}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Reserve" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Reserve is invoked" + }, + "details": { + "name": "Reserve" + }, + "params": [ + { + "typeid": "{D33569A9-EFFC-566C-8CCC-74D6E086A1B0}", + "details": { + "name": "AZStd::unordered_map" + } + }, + { + "typeid": "{D6597933-47CD-4FC8-B911-63F3E2B0993A}", + "details": { + "name": "AZ::u64" + } + } + ] + }, + { + "base": "GetSize", + "context": "{D33569A9-EFFC-566C-8CCC-74D6E086A1B0}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke GetSize" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after GetSize is invoked" + }, + "details": { + "name": "GetSize" + }, + "params": [ + { + "typeid": "{D33569A9-EFFC-566C-8CCC-74D6E086A1B0}", + "details": { + "name": "AZStd::unordered_map" + } + } + ], + "results": [ + { + "typeid": "{72039442-EB38-4D42-A1AD-CB68F7E0EEF6}", + "details": { + "name": "int" + } + } + ] + }, + { + "base": "Iterate_VM", + "context": "{D33569A9-EFFC-566C-8CCC-74D6E086A1B0}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Iterate_VM" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Iterate_VM is invoked" + }, + "details": { + "name": "Iterate_VM" + }, + "params": [ + { + "typeid": "{D33569A9-EFFC-566C-8CCC-74D6E086A1B0}", + "details": { + "name": "AZStd::unordered_map" + } + } + ], + "results": [ + { + "typeid": "{4A495587-E9C4-53F9-934B-87EA4AA35446}", + "details": { + "name": "Iterator_VM, AZStd::equal_to, allocator>>" + } + } + ] + }, + { + "base": "GetKeys", + "context": "{D33569A9-EFFC-566C-8CCC-74D6E086A1B0}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke GetKeys" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after GetKeys is invoked" + }, + "details": { + "name": "GetKeys" + }, + "params": [ + { + "typeid": "{D33569A9-EFFC-566C-8CCC-74D6E086A1B0}", + "details": { + "name": "AZStd::unordered_map" + } + } + ], + "results": [ + { + "typeid": "{4841CFF0-7A5C-519C-BD16-D3625E99605E}", + "details": { + "name": "AZStd::vector" + } + } + ] + }, + { + "base": "Size", + "context": "{D33569A9-EFFC-566C-8CCC-74D6E086A1B0}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Size" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Size is invoked" + }, + "details": { + "name": "Size" + }, + "params": [ + { + "typeid": "{D33569A9-EFFC-566C-8CCC-74D6E086A1B0}", + "details": { + "name": "AZStd::unordered_map" + } + } + ], + "results": [ + { + "typeid": "{72039442-EB38-4D42-A1AD-CB68F7E0EEF6}", + "details": { + "name": "int" + } + } + ] + }, + { + "base": "Erase", + "context": "{D33569A9-EFFC-566C-8CCC-74D6E086A1B0}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Erase" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Erase is invoked" + }, + "details": { + "name": "Erase" + }, + "params": [ + { + "typeid": "{D33569A9-EFFC-566C-8CCC-74D6E086A1B0}", + "details": { + "name": "AZStd::unordered_map" + } + }, + { + "typeid": "{6383F1D3-BB27-4E6B-A49A-6409B2059EAA}", + "details": { + "name": "EntityId", + "tooltip": "Entity Unique Id" + } + } + ], + "results": [ + { + "typeid": "{D33569A9-EFFC-566C-8CCC-74D6E086A1B0}", + "details": { + "name": "AZStd::unordered_map" + } + } + ] + }, + { + "base": "EraseCheck_VM", + "context": "{D33569A9-EFFC-566C-8CCC-74D6E086A1B0}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke EraseCheck_VM" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after EraseCheck_VM is invoked" + }, + "details": { + "name": "EraseCheck_VM" + }, + "params": [ + { + "typeid": "{D33569A9-EFFC-566C-8CCC-74D6E086A1B0}", + "details": { + "name": "AZStd::unordered_map" + } + }, + { + "typeid": "{6383F1D3-BB27-4E6B-A49A-6409B2059EAA}", + "details": { + "name": "EntityId", + "tooltip": "Entity Unique Id" + } + } + ], + "results": [ + { + "typeid": "{A0CA880C-AFE4-43CB-926C-59AC48496112}", + "details": { + "name": "bool" + } + } + ] + }, + { + "base": "Clear", + "context": "{D33569A9-EFFC-566C-8CCC-74D6E086A1B0}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Clear" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Clear is invoked" + }, + "details": { + "name": "Clear" + }, + "params": [ + { + "typeid": "{D33569A9-EFFC-566C-8CCC-74D6E086A1B0}", + "details": { + "name": "AZStd::unordered_map" + } + } + ], + "results": [ + { + "typeid": "{D33569A9-EFFC-566C-8CCC-74D6E086A1B0}", + "details": { + "name": "AZStd::unordered_map" + } + } + ] + }, + { + "base": "At", + "context": "{D33569A9-EFFC-566C-8CCC-74D6E086A1B0}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke At" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after At is invoked" + }, + "details": { + "name": "At" + }, + "params": [ + { + "typeid": "{D33569A9-EFFC-566C-8CCC-74D6E086A1B0}", + "details": { + "name": "AZStd::unordered_map" + } + }, + { + "typeid": "{6383F1D3-BB27-4E6B-A49A-6409B2059EAA}", + "details": { + "name": "EntityId", + "tooltip": "Entity Unique Id" + } + } + ], + "results": [ + { + "typeid": "{6383F1D3-BB27-4E6B-A49A-6409B2059EAA}", + "details": { + "name": "EntityId", + "tooltip": "Entity Unique Id" + } + } + ] + }, + { + "base": "BucketCount", + "context": "{D33569A9-EFFC-566C-8CCC-74D6E086A1B0}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke BucketCount" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after BucketCount is invoked" + }, + "details": { + "name": "BucketCount" + }, + "params": [ + { + "typeid": "{D33569A9-EFFC-566C-8CCC-74D6E086A1B0}", + "details": { + "name": "AZStd::unordered_map" + } + } + ], + "results": [ + { + "typeid": "{D6597933-47CD-4FC8-B911-63F3E2B0993A}", + "details": { + "name": "AZ::u64" + } + } + ] + }, + { + "base": "Empty", + "context": "{D33569A9-EFFC-566C-8CCC-74D6E086A1B0}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Empty" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Empty is invoked" + }, + "details": { + "name": "Empty" + }, + "params": [ + { + "typeid": "{D33569A9-EFFC-566C-8CCC-74D6E086A1B0}", + "details": { + "name": "AZStd::unordered_map" + } + } + ], + "results": [ + { + "typeid": "{A0CA880C-AFE4-43CB-926C-59AC48496112}", + "details": { + "name": "bool" + } + } + ] + }, + { + "base": "Swap", + "context": "{D33569A9-EFFC-566C-8CCC-74D6E086A1B0}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Swap" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Swap is invoked" + }, + "details": { + "name": "Swap" + }, + "params": [ + { + "typeid": "{D33569A9-EFFC-566C-8CCC-74D6E086A1B0}", + "details": { + "name": "AZStd::unordered_map" + } + }, + { + "typeid": "{D33569A9-EFFC-566C-8CCC-74D6E086A1B0}", + "details": { + "name": "AZStd::unordered_map" + } + } + ] + } + ] + }, + { + "base": "{E32B8C9D-F84C-54FF-91DA-84C99FBBB0B6}", + "context": "OnDemandReflected", + "variant": "", + "details": { + "name": "Map", + "category": "Map", + "tooltip": "A collection of Key/Value pairs, where each Key value must be unique." + }, + "methods": [ + { + "base": "contains", + "context": "{E32B8C9D-F84C-54FF-91DA-84C99FBBB0B6}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke contains" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after contains is invoked" + }, + "details": { + "name": "contains" + }, + "params": [ + { + "typeid": "{E32B8C9D-F84C-54FF-91DA-84C99FBBB0B6}", + "details": { + "name": "AZStd::unordered_map" + } + }, + { + "typeid": "{652ED536-3402-439B-AEBE-4A5DBC554085}", + "details": { + "name": "AssetId" + } + } + ], + "results": [ + { + "typeid": "{A0CA880C-AFE4-43CB-926C-59AC48496112}", + "details": { + "name": "bool" + } + } + ] + }, + { + "base": "Insert", + "context": "{E32B8C9D-F84C-54FF-91DA-84C99FBBB0B6}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Insert" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Insert is invoked" + }, + "details": { + "name": "Insert" + }, + "params": [ + { + "typeid": "{E32B8C9D-F84C-54FF-91DA-84C99FBBB0B6}", + "details": { + "name": "AZStd::unordered_map" + } + }, + { + "typeid": "{652ED536-3402-439B-AEBE-4A5DBC554085}", + "details": { + "name": "AssetId" + } + }, + { + "typeid": "{5D9958E9-9F1E-4985-B532-FFFDE75FEDFD}", + "details": { + "name": "Transform" + } + } + ], + "results": [ + { + "typeid": "{E32B8C9D-F84C-54FF-91DA-84C99FBBB0B6}", + "details": { + "name": "AZStd::unordered_map" + } + } + ] + }, + { + "base": "Reserve", + "context": "{E32B8C9D-F84C-54FF-91DA-84C99FBBB0B6}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Reserve" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Reserve is invoked" + }, + "details": { + "name": "Reserve" + }, + "params": [ + { + "typeid": "{E32B8C9D-F84C-54FF-91DA-84C99FBBB0B6}", + "details": { + "name": "AZStd::unordered_map" + } + }, + { + "typeid": "{D6597933-47CD-4FC8-B911-63F3E2B0993A}", + "details": { + "name": "AZ::u64" + } + } + ] + }, + { + "base": "GetSize", + "context": "{E32B8C9D-F84C-54FF-91DA-84C99FBBB0B6}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke GetSize" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after GetSize is invoked" + }, + "details": { + "name": "GetSize" + }, + "params": [ + { + "typeid": "{E32B8C9D-F84C-54FF-91DA-84C99FBBB0B6}", + "details": { + "name": "AZStd::unordered_map" + } + } + ], + "results": [ + { + "typeid": "{72039442-EB38-4D42-A1AD-CB68F7E0EEF6}", + "details": { + "name": "int" + } + } + ] + }, + { + "base": "Iterate_VM", + "context": "{E32B8C9D-F84C-54FF-91DA-84C99FBBB0B6}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Iterate_VM" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Iterate_VM is invoked" + }, + "details": { + "name": "Iterate_VM" + }, + "params": [ + { + "typeid": "{E32B8C9D-F84C-54FF-91DA-84C99FBBB0B6}", + "details": { + "name": "AZStd::unordered_map" + } + } + ], + "results": [ + { + "typeid": "{73622B74-D33C-5B95-9931-09D2DCE531B6}", + "details": { + "name": "Iterator_VM, AZStd::equal_to, allocator>>" + } + } + ] + }, + { + "base": "GetKeys", + "context": "{E32B8C9D-F84C-54FF-91DA-84C99FBBB0B6}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke GetKeys" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after GetKeys is invoked" + }, + "details": { + "name": "GetKeys" + }, + "params": [ + { + "typeid": "{E32B8C9D-F84C-54FF-91DA-84C99FBBB0B6}", + "details": { + "name": "AZStd::unordered_map" + } + } + ], + "results": [ + { + "typeid": "{877C4A33-39B5-51D7-948D-F97DB81372A1}", + "details": { + "name": "AZStd::vector" + } + } + ] + }, + { + "base": "Size", + "context": "{E32B8C9D-F84C-54FF-91DA-84C99FBBB0B6}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Size" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Size is invoked" + }, + "details": { + "name": "Size" + }, + "params": [ + { + "typeid": "{E32B8C9D-F84C-54FF-91DA-84C99FBBB0B6}", + "details": { + "name": "AZStd::unordered_map" + } + } + ], + "results": [ + { + "typeid": "{72039442-EB38-4D42-A1AD-CB68F7E0EEF6}", + "details": { + "name": "int" + } + } + ] + }, + { + "base": "Erase", + "context": "{E32B8C9D-F84C-54FF-91DA-84C99FBBB0B6}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Erase" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Erase is invoked" + }, + "details": { + "name": "Erase" + }, + "params": [ + { + "typeid": "{E32B8C9D-F84C-54FF-91DA-84C99FBBB0B6}", + "details": { + "name": "AZStd::unordered_map" + } + }, + { + "typeid": "{652ED536-3402-439B-AEBE-4A5DBC554085}", + "details": { + "name": "AssetId" + } + } + ], + "results": [ + { + "typeid": "{E32B8C9D-F84C-54FF-91DA-84C99FBBB0B6}", + "details": { + "name": "AZStd::unordered_map" + } + } + ] + }, + { + "base": "EraseCheck_VM", + "context": "{E32B8C9D-F84C-54FF-91DA-84C99FBBB0B6}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke EraseCheck_VM" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after EraseCheck_VM is invoked" + }, + "details": { + "name": "EraseCheck_VM" + }, + "params": [ + { + "typeid": "{E32B8C9D-F84C-54FF-91DA-84C99FBBB0B6}", + "details": { + "name": "AZStd::unordered_map" + } + }, + { + "typeid": "{652ED536-3402-439B-AEBE-4A5DBC554085}", + "details": { + "name": "AssetId" + } + } + ], + "results": [ + { + "typeid": "{A0CA880C-AFE4-43CB-926C-59AC48496112}", + "details": { + "name": "bool" + } + } + ] + }, + { + "base": "Clear", + "context": "{E32B8C9D-F84C-54FF-91DA-84C99FBBB0B6}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Clear" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Clear is invoked" + }, + "details": { + "name": "Clear" + }, + "params": [ + { + "typeid": "{E32B8C9D-F84C-54FF-91DA-84C99FBBB0B6}", + "details": { + "name": "AZStd::unordered_map" + } + } + ], + "results": [ + { + "typeid": "{E32B8C9D-F84C-54FF-91DA-84C99FBBB0B6}", + "details": { + "name": "AZStd::unordered_map" + } + } + ] + }, + { + "base": "At", + "context": "{E32B8C9D-F84C-54FF-91DA-84C99FBBB0B6}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke At" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after At is invoked" + }, + "details": { + "name": "At" + }, + "params": [ + { + "typeid": "{E32B8C9D-F84C-54FF-91DA-84C99FBBB0B6}", + "details": { + "name": "AZStd::unordered_map" + } + }, + { + "typeid": "{652ED536-3402-439B-AEBE-4A5DBC554085}", + "details": { + "name": "AssetId" + } + } + ], + "results": [ + { + "typeid": "{5D9958E9-9F1E-4985-B532-FFFDE75FEDFD}", + "details": { + "name": "Transform" + } + } + ] + }, + { + "base": "BucketCount", + "context": "{E32B8C9D-F84C-54FF-91DA-84C99FBBB0B6}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke BucketCount" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after BucketCount is invoked" + }, + "details": { + "name": "BucketCount" + }, + "params": [ + { + "typeid": "{E32B8C9D-F84C-54FF-91DA-84C99FBBB0B6}", + "details": { + "name": "AZStd::unordered_map" + } + } + ], + "results": [ + { + "typeid": "{D6597933-47CD-4FC8-B911-63F3E2B0993A}", + "details": { + "name": "AZ::u64" + } + } + ] + }, + { + "base": "Empty", + "context": "{E32B8C9D-F84C-54FF-91DA-84C99FBBB0B6}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Empty" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Empty is invoked" + }, + "details": { + "name": "Empty" + }, + "params": [ + { + "typeid": "{E32B8C9D-F84C-54FF-91DA-84C99FBBB0B6}", + "details": { + "name": "AZStd::unordered_map" + } + } + ], + "results": [ + { + "typeid": "{A0CA880C-AFE4-43CB-926C-59AC48496112}", + "details": { + "name": "bool" + } + } + ] + }, + { + "base": "Swap", + "context": "{E32B8C9D-F84C-54FF-91DA-84C99FBBB0B6}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Swap" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Swap is invoked" + }, + "details": { + "name": "Swap" + }, + "params": [ + { + "typeid": "{E32B8C9D-F84C-54FF-91DA-84C99FBBB0B6}", + "details": { + "name": "AZStd::unordered_map" + } + }, + { + "typeid": "{E32B8C9D-F84C-54FF-91DA-84C99FBBB0B6}", + "details": { + "name": "AZStd::unordered_map" + } + } + ] + } + ] + }, + { + "base": "{1F24C807-BE2F-54C7-8F2B-498727236DF5}", + "context": "OnDemandReflected", + "variant": "", + "details": { + "name": "Tuple" + }, + "methods": [ + { + "base": "Get0", + "context": "{1F24C807-BE2F-54C7-8F2B-498727236DF5}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Get0" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Get0 is invoked" + }, + "details": { + "name": "Get0" + }, + "params": [ + { + "typeid": "{1F24C807-BE2F-54C7-8F2B-498727236DF5}", + "details": { + "name": "tuple&" + } + } + ], + "results": [ + { + "typeid": "{8379EB7D-01FA-4538-B64B-A6543B4BE73D}", + "details": { + "name": "Vector3" + } + } + ] + }, + { + "base": "Get1", + "context": "{1F24C807-BE2F-54C7-8F2B-498727236DF5}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Get1" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Get1 is invoked" + }, + "details": { + "name": "Get1" + }, + "params": [ + { + "typeid": "{1F24C807-BE2F-54C7-8F2B-498727236DF5}", + "details": { + "name": "tuple&" + } + } + ], + "results": [ + { + "typeid": "{8379EB7D-01FA-4538-B64B-A6543B4BE73D}", + "details": { + "name": "Vector3" + } + } + ] + }, + { + "base": "GetSize", + "context": "{1F24C807-BE2F-54C7-8F2B-498727236DF5}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke GetSize" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after GetSize is invoked" + }, + "details": { + "name": "GetSize" + }, + "results": [ + { + "typeid": "{D6597933-47CD-4FC8-B911-63F3E2B0993A}", + "details": { + "name": "AZ::u64" + } + } + ] + } + ] + }, + { + "base": "{5B700838-21A2-4579-9303-F4A4822AFEF4}", + "context": "OnDemandReflected", + "variant": "", + "details": { + "name": "String_VM" + }, + "methods": [ + { + "base": "ToLower", + "context": "{5B700838-21A2-4579-9303-F4A4822AFEF4}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke ToLower" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after ToLower is invoked" + }, + "details": { + "name": "ToLower" + }, + "params": [ + { + "typeid": "{03AAAB3F-5C47-5A66-9EBC-D5FA4DB353C9}", + "details": { + "name": "AZStd::string" + } + } + ], + "results": [ + { + "typeid": "{03AAAB3F-5C47-5A66-9EBC-D5FA4DB353C9}", + "details": { + "name": "AZStd::string" + } + } + ] + }, + { + "base": "ToUpper", + "context": "{5B700838-21A2-4579-9303-F4A4822AFEF4}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke ToUpper" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after ToUpper is invoked" + }, + "details": { + "name": "ToUpper" + }, + "params": [ + { + "typeid": "{03AAAB3F-5C47-5A66-9EBC-D5FA4DB353C9}", + "details": { + "name": "AZStd::string" + } + } + ], + "results": [ + { + "typeid": "{03AAAB3F-5C47-5A66-9EBC-D5FA4DB353C9}", + "details": { + "name": "AZStd::string" + } + } + ] + }, + { + "base": "Substring", + "context": "{5B700838-21A2-4579-9303-F4A4822AFEF4}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Substring" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Substring is invoked" + }, + "details": { + "name": "Substring" + }, + "params": [ + { + "typeid": "{03AAAB3F-5C47-5A66-9EBC-D5FA4DB353C9}", + "details": { + "name": "AZStd::string" + } + }, + { + "typeid": "{43DA906B-7DEF-4CA8-9790-854106D3F983}", + "details": { + "name": "unsigned int" + } + }, + { + "typeid": "{43DA906B-7DEF-4CA8-9790-854106D3F983}", + "details": { + "name": "unsigned int" + } + } + ], + "results": [ + { + "typeid": "{03AAAB3F-5C47-5A66-9EBC-D5FA4DB353C9}", + "details": { + "name": "AZStd::string" + } + } + ] + } + ] + }, + { + "base": "{79F6FAE7-FB1D-5030-91D5-766E5861D7D5}", + "context": "OnDemandReflected", + "variant": "", + "details": { + "name": "Map", + "category": "Map", + "tooltip": "A collection of Key/Value pairs, where each Key value must be unique." + }, + "methods": [ + { + "base": "contains", + "context": "{79F6FAE7-FB1D-5030-91D5-766E5861D7D5}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke contains" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after contains is invoked" + }, + "details": { + "name": "contains" + }, + "params": [ + { + "typeid": "{79F6FAE7-FB1D-5030-91D5-766E5861D7D5}", + "details": { + "name": "AZStd::unordered_map" + } + }, + { + "typeid": "{03AAAB3F-5C47-5A66-9EBC-D5FA4DB353C9}", + "details": { + "name": "AZStd::string" + } + } + ], + "results": [ + { + "typeid": "{A0CA880C-AFE4-43CB-926C-59AC48496112}", + "details": { + "name": "bool" + } + } + ] + }, + { + "base": "Insert", + "context": "{79F6FAE7-FB1D-5030-91D5-766E5861D7D5}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Insert" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Insert is invoked" + }, + "details": { + "name": "Insert" + }, + "params": [ + { + "typeid": "{79F6FAE7-FB1D-5030-91D5-766E5861D7D5}", + "details": { + "name": "AZStd::unordered_map" + } + }, + { + "typeid": "{03AAAB3F-5C47-5A66-9EBC-D5FA4DB353C9}", + "details": { + "name": "AZStd::string" + } + }, + { + "typeid": "{652ED536-3402-439B-AEBE-4A5DBC554085}", + "details": { + "name": "AssetId" + } + } + ], + "results": [ + { + "typeid": "{79F6FAE7-FB1D-5030-91D5-766E5861D7D5}", + "details": { + "name": "AZStd::unordered_map" + } + } + ] + }, + { + "base": "Reserve", + "context": "{79F6FAE7-FB1D-5030-91D5-766E5861D7D5}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Reserve" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Reserve is invoked" + }, + "details": { + "name": "Reserve" + }, + "params": [ + { + "typeid": "{79F6FAE7-FB1D-5030-91D5-766E5861D7D5}", + "details": { + "name": "AZStd::unordered_map" + } + }, + { + "typeid": "{D6597933-47CD-4FC8-B911-63F3E2B0993A}", + "details": { + "name": "AZ::u64" + } + } + ] + }, + { + "base": "GetSize", + "context": "{79F6FAE7-FB1D-5030-91D5-766E5861D7D5}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke GetSize" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after GetSize is invoked" + }, + "details": { + "name": "GetSize" + }, + "params": [ + { + "typeid": "{79F6FAE7-FB1D-5030-91D5-766E5861D7D5}", + "details": { + "name": "AZStd::unordered_map" + } + } + ], + "results": [ + { + "typeid": "{72039442-EB38-4D42-A1AD-CB68F7E0EEF6}", + "details": { + "name": "int" + } + } + ] + }, + { + "base": "Iterate_VM", + "context": "{79F6FAE7-FB1D-5030-91D5-766E5861D7D5}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Iterate_VM" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Iterate_VM is invoked" + }, + "details": { + "name": "Iterate_VM" + }, + "params": [ + { + "typeid": "{79F6FAE7-FB1D-5030-91D5-766E5861D7D5}", + "details": { + "name": "AZStd::unordered_map" + } + } + ], + "results": [ + { + "typeid": "{FB9701BF-C92C-54AE-82C8-8B3BD620066F}", + "details": { + "name": "Iterator_VM, allocator>, AssetId, AZStd::hash" + } + } + ] + }, + { + "base": "FromOBB", + "context": "{AB0C2753-680E-47AD-8277-66B3AC01C659}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke FromOBB" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after FromOBB is invoked" + }, + "details": { + "name": "FromOBB" + }, + "params": [ + { + "typeid": "{004ABD25-CF14-4EB3-BD41-022C247C07FA}", + "details": { + "name": "Obb" + } + } + ], + "results": [ + { + "typeid": "{A54C2B36-D5B8-46A1-A529-4EBDBD2450E7}", + "details": { + "name": "Aabb" + } + } + ] + }, + { + "base": "Translate", + "context": "{AB0C2753-680E-47AD-8277-66B3AC01C659}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Translate" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Translate is invoked" + }, + "details": { + "name": "Translate" + }, + "params": [ + { + "typeid": "{A54C2B36-D5B8-46A1-A529-4EBDBD2450E7}", + "details": { + "name": "Aabb" + } + }, + { + "typeid": "{8379EB7D-01FA-4538-B64B-A6543B4BE73D}", + "details": { + "name": "Vector3" + } + } + ], + "results": [ + { + "typeid": "{A54C2B36-D5B8-46A1-A529-4EBDBD2450E7}", + "details": { + "name": "Aabb" + } + } + ] + }, + { + "base": "ContainsVector3", + "context": "{AB0C2753-680E-47AD-8277-66B3AC01C659}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke ContainsVector3" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after ContainsVector3 is invoked" + }, + "details": { + "name": "ContainsVector3" + }, + "params": [ + { + "typeid": "{A54C2B36-D5B8-46A1-A529-4EBDBD2450E7}", + "details": { + "name": "Aabb" + } + }, + { + "typeid": "{8379EB7D-01FA-4538-B64B-A6543B4BE73D}", + "details": { + "name": "Vector3" + } + } + ], + "results": [ + { + "typeid": "{A0CA880C-AFE4-43CB-926C-59AC48496112}", + "details": { + "name": "bool" + } + } + ] + }, + { + "base": "Distance", + "context": "{AB0C2753-680E-47AD-8277-66B3AC01C659}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Distance" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Distance is invoked" + }, + "details": { + "name": "Distance" + }, + "params": [ + { + "typeid": "{A54C2B36-D5B8-46A1-A529-4EBDBD2450E7}", + "details": { + "name": "Aabb" + } + }, + { + "typeid": "{8379EB7D-01FA-4538-B64B-A6543B4BE73D}", + "details": { + "name": "Vector3" + } + } + ], + "results": [ + { + "typeid": "{110C4B14-11A8-4E9D-8638-5051013A56AC}", + "details": { + "name": "double" + } + } + ] + }, + { + "base": "FromPoint", + "context": "{AB0C2753-680E-47AD-8277-66B3AC01C659}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke FromPoint" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after FromPoint is invoked" + }, + "details": { + "name": "FromPoint" + }, + "params": [ + { + "typeid": "{8379EB7D-01FA-4538-B64B-A6543B4BE73D}", + "details": { + "name": "Vector3" + } + } + ], + "results": [ + { + "typeid": "{A54C2B36-D5B8-46A1-A529-4EBDBD2450E7}", + "details": { + "name": "Aabb" + } + } + ] + }, + { + "base": "Null", + "context": "{AB0C2753-680E-47AD-8277-66B3AC01C659}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Null" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Null is invoked" + }, + "details": { + "name": "Null" + }, + "results": [ + { + "typeid": "{A54C2B36-D5B8-46A1-A529-4EBDBD2450E7}", + "details": { + "name": "Aabb" + } + } + ] + }, + { + "base": "YExtent", + "context": "{AB0C2753-680E-47AD-8277-66B3AC01C659}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke YExtent" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after YExtent is invoked" + }, + "details": { + "name": "YExtent" + }, + "params": [ + { + "typeid": "{A54C2B36-D5B8-46A1-A529-4EBDBD2450E7}", + "details": { + "name": "Aabb" + } + } + ], + "results": [ + { + "typeid": "{110C4B14-11A8-4E9D-8638-5051013A56AC}", + "details": { + "name": "double" + } + } + ] + }, + { + "base": "Clamp", + "context": "{AB0C2753-680E-47AD-8277-66B3AC01C659}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Clamp" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Clamp is invoked" + }, + "details": { + "name": "Clamp" + }, + "params": [ + { + "typeid": "{A54C2B36-D5B8-46A1-A529-4EBDBD2450E7}", + "details": { + "name": "Aabb" + } + }, + { + "typeid": "{A54C2B36-D5B8-46A1-A529-4EBDBD2450E7}", + "details": { + "name": "Aabb" + } + } + ], + "results": [ + { + "typeid": "{A54C2B36-D5B8-46A1-A529-4EBDBD2450E7}", + "details": { + "name": "Aabb" + } + } + ] + }, + { + "base": "ContainsAABB", + "context": "{AB0C2753-680E-47AD-8277-66B3AC01C659}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke ContainsAABB" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after ContainsAABB is invoked" + }, + "details": { + "name": "ContainsAABB" + }, + "params": [ + { + "typeid": "{A54C2B36-D5B8-46A1-A529-4EBDBD2450E7}", + "details": { + "name": "Aabb" + } + }, + { + "typeid": "{A54C2B36-D5B8-46A1-A529-4EBDBD2450E7}", + "details": { + "name": "Aabb" + } + } + ], + "results": [ + { + "typeid": "{A0CA880C-AFE4-43CB-926C-59AC48496112}", + "details": { + "name": "bool" + } + } + ] + }, + { + "base": "Expand", + "context": "{AB0C2753-680E-47AD-8277-66B3AC01C659}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Expand" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Expand is invoked" + }, + "details": { + "name": "Expand" + }, + "params": [ + { + "typeid": "{A54C2B36-D5B8-46A1-A529-4EBDBD2450E7}", + "details": { + "name": "Aabb" + } + }, + { + "typeid": "{8379EB7D-01FA-4538-B64B-A6543B4BE73D}", + "details": { + "name": "Vector3" + } + } + ], + "results": [ + { + "typeid": "{A54C2B36-D5B8-46A1-A529-4EBDBD2450E7}", + "details": { + "name": "Aabb" + } + } + ] + }, + { + "base": "Extents", + "context": "{AB0C2753-680E-47AD-8277-66B3AC01C659}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Extents" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Extents is invoked" + }, + "details": { + "name": "Extents" + }, + "params": [ + { + "typeid": "{A54C2B36-D5B8-46A1-A529-4EBDBD2450E7}", + "details": { + "name": "Aabb" + } + } + ], + "results": [ + { + "typeid": "{8379EB7D-01FA-4538-B64B-A6543B4BE73D}", + "details": { + "name": "Vector3" + } + } + ] + }, + { + "base": "FromCenterHalfExtents", + "context": "{AB0C2753-680E-47AD-8277-66B3AC01C659}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke FromCenterHalfExtents" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after FromCenterHalfExtents is invoked" + }, + "details": { + "name": "FromCenterHalfExtents" + }, + "params": [ + { + "typeid": "{8379EB7D-01FA-4538-B64B-A6543B4BE73D}", + "details": { + "name": "Vector3" + } + }, + { + "typeid": "{8379EB7D-01FA-4538-B64B-A6543B4BE73D}", + "details": { + "name": "Vector3" + } + } + ], + "results": [ + { + "typeid": "{A54C2B36-D5B8-46A1-A529-4EBDBD2450E7}", + "details": { + "name": "Aabb" + } + } + ] + }, + { + "base": "GetMin", + "context": "{AB0C2753-680E-47AD-8277-66B3AC01C659}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke GetMin" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after GetMin is invoked" + }, + "details": { + "name": "GetMin" + }, + "params": [ + { + "typeid": "{A54C2B36-D5B8-46A1-A529-4EBDBD2450E7}", + "details": { + "name": "Aabb" + } + } + ], + "results": [ + { + "typeid": "{8379EB7D-01FA-4538-B64B-A6543B4BE73D}", + "details": { + "name": "Vector3" + } + } + ] + }, + { + "base": "ApplyTransform", + "context": "{AB0C2753-680E-47AD-8277-66B3AC01C659}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke ApplyTransform" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after ApplyTransform is invoked" + }, + "details": { + "name": "ApplyTransform" + }, + "params": [ + { + "typeid": "{A54C2B36-D5B8-46A1-A529-4EBDBD2450E7}", + "details": { + "name": "Aabb" + } + }, + { + "typeid": "{5D9958E9-9F1E-4985-B532-FFFDE75FEDFD}", + "details": { + "name": "Transform" + } + } + ], + "results": [ + { + "typeid": "{A54C2B36-D5B8-46A1-A529-4EBDBD2450E7}", + "details": { + "name": "Aabb" + } + } + ] + }, + { + "base": "Center", + "context": "{AB0C2753-680E-47AD-8277-66B3AC01C659}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Center" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Center is invoked" + }, + "details": { + "name": "Center" + }, + "params": [ + { + "typeid": "{A54C2B36-D5B8-46A1-A529-4EBDBD2450E7}", + "details": { + "name": "Aabb" + } + } + ], + "results": [ + { + "typeid": "{8379EB7D-01FA-4538-B64B-A6543B4BE73D}", + "details": { + "name": "Vector3" + } + } + ] + }, + { + "base": "FromMinMax", + "context": "{AB0C2753-680E-47AD-8277-66B3AC01C659}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke FromMinMax" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after FromMinMax is invoked" + }, + "details": { + "name": "FromMinMax" + }, + "params": [ + { + "typeid": "{8379EB7D-01FA-4538-B64B-A6543B4BE73D}", + "details": { + "name": "Vector3" + } + }, + { + "typeid": "{8379EB7D-01FA-4538-B64B-A6543B4BE73D}", + "details": { + "name": "Vector3" + } + } + ], + "results": [ + { + "typeid": "{A54C2B36-D5B8-46A1-A529-4EBDBD2450E7}", + "details": { + "name": "Aabb" + } + } + ] + }, + { + "base": "IsFinite", + "context": "{AB0C2753-680E-47AD-8277-66B3AC01C659}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke IsFinite" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after IsFinite is invoked" + }, + "details": { + "name": "IsFinite" + }, + "params": [ + { + "typeid": "{A54C2B36-D5B8-46A1-A529-4EBDBD2450E7}", + "details": { + "name": "Aabb" + } + } + ], + "results": [ + { + "typeid": "{A0CA880C-AFE4-43CB-926C-59AC48496112}", + "details": { + "name": "bool" + } + } + ] + }, + { + "base": "IsValid", + "context": "{AB0C2753-680E-47AD-8277-66B3AC01C659}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke IsValid" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after IsValid is invoked" + }, + "details": { + "name": "IsValid" + }, + "params": [ + { + "typeid": "{A54C2B36-D5B8-46A1-A529-4EBDBD2450E7}", + "details": { + "name": "Aabb" + } + } + ], + "results": [ + { + "typeid": "{A0CA880C-AFE4-43CB-926C-59AC48496112}", + "details": { + "name": "bool" + } + } + ] + }, + { + "base": "GetMax", + "context": "{AB0C2753-680E-47AD-8277-66B3AC01C659}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke GetMax" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after GetMax is invoked" + }, + "details": { + "name": "GetMax" + }, + "params": [ + { + "typeid": "{A54C2B36-D5B8-46A1-A529-4EBDBD2450E7}", + "details": { + "name": "Aabb" + } + } + ], + "results": [ + { + "typeid": "{8379EB7D-01FA-4538-B64B-A6543B4BE73D}", + "details": { + "name": "Vector3" + } + } + ] + }, + { + "base": "XExtent", + "context": "{AB0C2753-680E-47AD-8277-66B3AC01C659}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke XExtent" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after XExtent is invoked" + }, + "details": { + "name": "XExtent" + }, + "params": [ + { + "typeid": "{A54C2B36-D5B8-46A1-A529-4EBDBD2450E7}", + "details": { + "name": "Aabb" + } + } + ], + "results": [ + { + "typeid": "{110C4B14-11A8-4E9D-8638-5051013A56AC}", + "details": { + "name": "double" + } + } + ] + }, + { + "base": "AddPoint", + "context": "{AB0C2753-680E-47AD-8277-66B3AC01C659}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke AddPoint" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after AddPoint is invoked" + }, + "details": { + "name": "AddPoint" + }, + "params": [ + { + "typeid": "{A54C2B36-D5B8-46A1-A529-4EBDBD2450E7}", + "details": { + "name": "Aabb" + } + }, + { + "typeid": "{8379EB7D-01FA-4538-B64B-A6543B4BE73D}", + "details": { + "name": "Vector3" + } + } + ], + "results": [ + { + "typeid": "{A54C2B36-D5B8-46A1-A529-4EBDBD2450E7}", + "details": { + "name": "Aabb" + } + } + ] + }, + { + "base": "AddAABB", + "context": "{AB0C2753-680E-47AD-8277-66B3AC01C659}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke AddAABB" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after AddAABB is invoked" + }, + "details": { + "name": "AddAABB" + }, + "params": [ + { + "typeid": "{A54C2B36-D5B8-46A1-A529-4EBDBD2450E7}", + "details": { + "name": "Aabb" + } + }, + { + "typeid": "{A54C2B36-D5B8-46A1-A529-4EBDBD2450E7}", + "details": { + "name": "Aabb" + } + } + ], + "results": [ + { + "typeid": "{A54C2B36-D5B8-46A1-A529-4EBDBD2450E7}", + "details": { + "name": "Aabb" + } + } + ] + }, + { + "base": "FromCenterRadius", + "context": "{AB0C2753-680E-47AD-8277-66B3AC01C659}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke FromCenterRadius" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after FromCenterRadius is invoked" + }, + "details": { + "name": "FromCenterRadius" + }, + "params": [ + { + "typeid": "{8379EB7D-01FA-4538-B64B-A6543B4BE73D}", + "details": { + "name": "Vector3" + } + }, + { + "typeid": "{110C4B14-11A8-4E9D-8638-5051013A56AC}", + "details": { + "name": "double" + } + } + ], + "results": [ + { + "typeid": "{A54C2B36-D5B8-46A1-A529-4EBDBD2450E7}", + "details": { + "name": "Aabb" + } + } + ] + }, + { + "base": "ZExtent", + "context": "{AB0C2753-680E-47AD-8277-66B3AC01C659}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke ZExtent" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after ZExtent is invoked" + }, + "details": { + "name": "ZExtent" + }, + "params": [ + { + "typeid": "{A54C2B36-D5B8-46A1-A529-4EBDBD2450E7}", + "details": { + "name": "Aabb" + } + } + ], + "results": [ + { + "typeid": "{110C4B14-11A8-4E9D-8638-5051013A56AC}", + "details": { + "name": "double" + } + } + ] + } + ] + }, + { + "base": "{9BE75E2E-AA07-4767-9BF3-905C289EB38A}", + "context": "OnDemandReflected", + "variant": "", + "details": { + "name": "MathQuaternion_VM" + }, + "methods": [ + { + "base": "Subtract", + "context": "{9BE75E2E-AA07-4767-9BF3-905C289EB38A}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Subtract" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Subtract is invoked" + }, + "details": { + "name": "Subtract" + }, + "params": [ + { + "typeid": "{73103120-3DD3-4873-BAB3-9713FA2804FB}", + "details": { + "name": "Quaternion" + } + }, + { + "typeid": "{73103120-3DD3-4873-BAB3-9713FA2804FB}", + "details": { + "name": "Quaternion" + } + } + ], + "results": [ + { + "typeid": "{73103120-3DD3-4873-BAB3-9713FA2804FB}", + "details": { + "name": "Quaternion" + } + } + ] + }, + { + "base": "RotationYDegrees", + "context": "{9BE75E2E-AA07-4767-9BF3-905C289EB38A}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke RotationYDegrees" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after RotationYDegrees is invoked" + }, + "details": { + "name": "RotationYDegrees" + }, + "params": [ + { + "typeid": "{110C4B14-11A8-4E9D-8638-5051013A56AC}", + "details": { + "name": "double" + } + } + ], + "results": [ + { + "typeid": "{73103120-3DD3-4873-BAB3-9713FA2804FB}", + "details": { + "name": "Quaternion" + } + } + ] + }, + { + "base": "Normalize", + "context": "{9BE75E2E-AA07-4767-9BF3-905C289EB38A}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Normalize" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Normalize is invoked" + }, + "details": { + "name": "Normalize" + }, + "params": [ + { + "typeid": "{73103120-3DD3-4873-BAB3-9713FA2804FB}", + "details": { + "name": "Quaternion" + } + } + ], + "results": [ + { + "typeid": "{73103120-3DD3-4873-BAB3-9713FA2804FB}", + "details": { + "name": "Quaternion" + } + } + ] + }, + { + "base": "LengthReciprocal", + "context": "{9BE75E2E-AA07-4767-9BF3-905C289EB38A}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke LengthReciprocal" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after LengthReciprocal is invoked" + }, + "details": { + "name": "LengthReciprocal" + }, + "params": [ + { + "typeid": "{73103120-3DD3-4873-BAB3-9713FA2804FB}", + "details": { + "name": "Quaternion" + } + } + ], + "results": [ + { + "typeid": "{110C4B14-11A8-4E9D-8638-5051013A56AC}", + "details": { + "name": "double" + } + } + ] + }, + { + "base": "CreateFromEulerAngles", + "context": "{9BE75E2E-AA07-4767-9BF3-905C289EB38A}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke CreateFromEulerAngles" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after CreateFromEulerAngles is invoked" + }, + "details": { + "name": "CreateFromEulerAngles" + }, + "params": [ + { + "typeid": "{110C4B14-11A8-4E9D-8638-5051013A56AC}", + "details": { + "name": "double" + } + }, + { + "typeid": "{110C4B14-11A8-4E9D-8638-5051013A56AC}", + "details": { + "name": "double" + } + }, + { + "typeid": "{110C4B14-11A8-4E9D-8638-5051013A56AC}", + "details": { + "name": "double" + } + } + ], + "results": [ + { + "typeid": "{73103120-3DD3-4873-BAB3-9713FA2804FB}", + "details": { + "name": "Quaternion" + } + } + ] + }, + { + "base": "IsIdentity", + "context": "{9BE75E2E-AA07-4767-9BF3-905C289EB38A}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke IsIdentity" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after IsIdentity is invoked" + }, + "details": { + "name": "IsIdentity" + }, + "params": [ + { + "typeid": "{73103120-3DD3-4873-BAB3-9713FA2804FB}", + "details": { + "name": "Quaternion" + } + }, + { + "typeid": "{110C4B14-11A8-4E9D-8638-5051013A56AC}", + "details": { + "name": "double" + } + } + ], + "results": [ + { + "typeid": "{A0CA880C-AFE4-43CB-926C-59AC48496112}", + "details": { + "name": "bool" + } + } + ] + }, + { + "base": "FromTransform", + "context": "{9BE75E2E-AA07-4767-9BF3-905C289EB38A}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke FromTransform" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after FromTransform is invoked" + }, + "details": { + "name": "FromTransform" + }, + "params": [ + { + "typeid": "{5D9958E9-9F1E-4985-B532-FFFDE75FEDFD}", + "details": { + "name": "Transform" + } + } + ], + "results": [ + { + "typeid": "{73103120-3DD3-4873-BAB3-9713FA2804FB}", + "details": { + "name": "Quaternion" + } + } + ] + }, + { + "base": "Lerp", + "context": "{9BE75E2E-AA07-4767-9BF3-905C289EB38A}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Lerp" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Lerp is invoked" + }, + "details": { + "name": "Lerp" + }, + "params": [ + { + "typeid": "{73103120-3DD3-4873-BAB3-9713FA2804FB}", + "details": { + "name": "Quaternion" + } + }, + { + "typeid": "{73103120-3DD3-4873-BAB3-9713FA2804FB}", + "details": { + "name": "Quaternion" + } + }, + { + "typeid": "{110C4B14-11A8-4E9D-8638-5051013A56AC}", + "details": { + "name": "double" + } + } + ], + "results": [ + { + "typeid": "{73103120-3DD3-4873-BAB3-9713FA2804FB}", + "details": { + "name": "Quaternion" + } + } + ] + }, + { + "base": "RotationZDegrees", + "context": "{9BE75E2E-AA07-4767-9BF3-905C289EB38A}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke RotationZDegrees" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after RotationZDegrees is invoked" + }, + "details": { + "name": "RotationZDegrees" + }, + "params": [ + { + "typeid": "{110C4B14-11A8-4E9D-8638-5051013A56AC}", + "details": { + "name": "double" + } + } + ], + "results": [ + { + "typeid": "{73103120-3DD3-4873-BAB3-9713FA2804FB}", + "details": { + "name": "Quaternion" + } + } + ] + }, + { + "base": "ConvertTransformToRotation", + "context": "{9BE75E2E-AA07-4767-9BF3-905C289EB38A}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke ConvertTransformToRotation" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after ConvertTransformToRotation is invoked" + }, + "details": { + "name": "ConvertTransformToRotation" + }, + "params": [ + { + "typeid": "{5D9958E9-9F1E-4985-B532-FFFDE75FEDFD}", + "details": { + "name": "Transform" + } + } + ], + "results": [ + { + "typeid": "{73103120-3DD3-4873-BAB3-9713FA2804FB}", + "details": { + "name": "Quaternion" + } + } + ] + }, + { + "base": "ShortestArc", + "context": "{9BE75E2E-AA07-4767-9BF3-905C289EB38A}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke ShortestArc" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after ShortestArc is invoked" + }, + "details": { + "name": "ShortestArc" + }, + "params": [ + { + "typeid": "{8379EB7D-01FA-4538-B64B-A6543B4BE73D}", + "details": { + "name": "Vector3" + } + }, + { + "typeid": "{8379EB7D-01FA-4538-B64B-A6543B4BE73D}", + "details": { + "name": "Vector3" + } + } + ], + "results": [ + { + "typeid": "{73103120-3DD3-4873-BAB3-9713FA2804FB}", + "details": { + "name": "Quaternion" + } + } + ] + }, + { + "base": "RotationXDegrees", + "context": "{9BE75E2E-AA07-4767-9BF3-905C289EB38A}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke RotationXDegrees" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after RotationXDegrees is invoked" + }, + "details": { + "name": "RotationXDegrees" + }, + "params": [ + { + "typeid": "{110C4B14-11A8-4E9D-8638-5051013A56AC}", + "details": { + "name": "double" + } + } + ], + "results": [ + { + "typeid": "{73103120-3DD3-4873-BAB3-9713FA2804FB}", + "details": { + "name": "Quaternion" + } + } + ] + }, + { + "base": "IsZero", + "context": "{9BE75E2E-AA07-4767-9BF3-905C289EB38A}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke IsZero" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after IsZero is invoked" + }, + "details": { + "name": "IsZero" + }, + "params": [ + { + "typeid": "{73103120-3DD3-4873-BAB3-9713FA2804FB}", + "details": { + "name": "Quaternion" + } + }, + { + "typeid": "{110C4B14-11A8-4E9D-8638-5051013A56AC}", + "details": { + "name": "double" + } + } + ], + "results": [ + { + "typeid": "{A0CA880C-AFE4-43CB-926C-59AC48496112}", + "details": { + "name": "bool" + } + } + ] + }, + { + "base": "IsClose", + "context": "{9BE75E2E-AA07-4767-9BF3-905C289EB38A}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke IsClose" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after IsClose is invoked" + }, + "details": { + "name": "IsClose" + }, + "params": [ + { + "typeid": "{73103120-3DD3-4873-BAB3-9713FA2804FB}", + "details": { + "name": "Quaternion" + } + }, + { + "typeid": "{73103120-3DD3-4873-BAB3-9713FA2804FB}", + "details": { + "name": "Quaternion" + } + }, + { + "typeid": "{110C4B14-11A8-4E9D-8638-5051013A56AC}", + "details": { + "name": "double" + } + } + ], + "results": [ + { + "typeid": "{A0CA880C-AFE4-43CB-926C-59AC48496112}", + "details": { + "name": "bool" + } + } + ] + }, + { + "base": "Length", + "context": "{9BE75E2E-AA07-4767-9BF3-905C289EB38A}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Length" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Length is invoked" + }, + "details": { + "name": "Length" + }, + "params": [ + { + "typeid": "{73103120-3DD3-4873-BAB3-9713FA2804FB}", + "details": { + "name": "Quaternion" + } + } + ], + "results": [ + { + "typeid": "{110C4B14-11A8-4E9D-8638-5051013A56AC}", + "details": { + "name": "double" + } + } + ] + }, + { + "base": "Conjugate", + "context": "{9BE75E2E-AA07-4767-9BF3-905C289EB38A}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Conjugate" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Conjugate is invoked" + }, + "details": { + "name": "Conjugate" + }, + "params": [ + { + "typeid": "{73103120-3DD3-4873-BAB3-9713FA2804FB}", + "details": { + "name": "Quaternion" + } + } + ], + "results": [ + { + "typeid": "{73103120-3DD3-4873-BAB3-9713FA2804FB}", + "details": { + "name": "Quaternion" + } + } + ] + }, + { + "base": "ToAngleDegrees", + "context": "{9BE75E2E-AA07-4767-9BF3-905C289EB38A}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke ToAngleDegrees" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after ToAngleDegrees is invoked" + }, + "details": { + "name": "ToAngleDegrees" + }, + "params": [ + { + "typeid": "{73103120-3DD3-4873-BAB3-9713FA2804FB}", + "details": { + "name": "Quaternion" + } + } + ], + "results": [ + { + "typeid": "{110C4B14-11A8-4E9D-8638-5051013A56AC}", + "details": { + "name": "double" + } + } + ] + }, + { + "base": "Dot", + "context": "{9BE75E2E-AA07-4767-9BF3-905C289EB38A}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Dot" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Dot is invoked" + }, + "details": { + "name": "Dot" + }, + "params": [ + { + "typeid": "{73103120-3DD3-4873-BAB3-9713FA2804FB}", + "details": { + "name": "Quaternion" + } + }, + { + "typeid": "{73103120-3DD3-4873-BAB3-9713FA2804FB}", + "details": { + "name": "Quaternion" + } + } + ], + "results": [ + { + "typeid": "{110C4B14-11A8-4E9D-8638-5051013A56AC}", + "details": { + "name": "double" + } + } + ] + }, + { + "base": "Negate", + "context": "{9BE75E2E-AA07-4767-9BF3-905C289EB38A}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Negate" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Negate is invoked" + }, + "details": { + "name": "Negate" + }, + "params": [ + { + "typeid": "{73103120-3DD3-4873-BAB3-9713FA2804FB}", + "details": { + "name": "Quaternion" + } + } + ], + "results": [ + { + "typeid": "{73103120-3DD3-4873-BAB3-9713FA2804FB}", + "details": { + "name": "Quaternion" + } + } + ] + }, + { + "base": "Add", + "context": "{9BE75E2E-AA07-4767-9BF3-905C289EB38A}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Add" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Add is invoked" + }, + "details": { + "name": "Add" + }, + "params": [ + { + "typeid": "{73103120-3DD3-4873-BAB3-9713FA2804FB}", + "details": { + "name": "Quaternion" + } + }, + { + "typeid": "{73103120-3DD3-4873-BAB3-9713FA2804FB}", + "details": { + "name": "Quaternion" + } + } + ], + "results": [ + { + "typeid": "{73103120-3DD3-4873-BAB3-9713FA2804FB}", + "details": { + "name": "Quaternion" + } + } + ] + }, + { + "base": "MultiplyByNumber", + "context": "{9BE75E2E-AA07-4767-9BF3-905C289EB38A}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke MultiplyByNumber" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after MultiplyByNumber is invoked" + }, + "details": { + "name": "MultiplyByNumber" + }, + "params": [ + { + "typeid": "{73103120-3DD3-4873-BAB3-9713FA2804FB}", + "details": { + "name": "Quaternion" + } + }, + { + "typeid": "{110C4B14-11A8-4E9D-8638-5051013A56AC}", + "details": { + "name": "double" + } + } + ], + "results": [ + { + "typeid": "{73103120-3DD3-4873-BAB3-9713FA2804FB}", + "details": { + "name": "Quaternion" + } + } + ] + }, + { + "base": "Slerp", + "context": "{9BE75E2E-AA07-4767-9BF3-905C289EB38A}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Slerp" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Slerp is invoked" + }, + "details": { + "name": "Slerp" + }, + "params": [ + { + "typeid": "{73103120-3DD3-4873-BAB3-9713FA2804FB}", + "details": { + "name": "Quaternion" + } + }, + { + "typeid": "{73103120-3DD3-4873-BAB3-9713FA2804FB}", + "details": { + "name": "Quaternion" + } + }, + { + "typeid": "{110C4B14-11A8-4E9D-8638-5051013A56AC}", + "details": { + "name": "double" + } + } + ], + "results": [ + { + "typeid": "{73103120-3DD3-4873-BAB3-9713FA2804FB}", + "details": { + "name": "Quaternion" + } + } + ] + }, + { + "base": "InvertFull", + "context": "{9BE75E2E-AA07-4767-9BF3-905C289EB38A}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke InvertFull" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after InvertFull is invoked" + }, + "details": { + "name": "InvertFull" + }, + "params": [ + { + "typeid": "{73103120-3DD3-4873-BAB3-9713FA2804FB}", + "details": { + "name": "Quaternion" + } + } + ], + "results": [ + { + "typeid": "{73103120-3DD3-4873-BAB3-9713FA2804FB}", + "details": { + "name": "Quaternion" + } + } + ] + }, + { + "base": "FromMatrix4x4", + "context": "{9BE75E2E-AA07-4767-9BF3-905C289EB38A}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke FromMatrix4x4" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after FromMatrix4x4 is invoked" + }, + "details": { + "name": "FromMatrix4x4" + }, + "params": [ + { + "typeid": "{157193C7-B673-4A2B-8B43-5681DCC3DEC3}", + "details": { + "name": "Matrix4x4" + } + } + ], + "results": [ + { + "typeid": "{73103120-3DD3-4873-BAB3-9713FA2804FB}", + "details": { + "name": "Quaternion" + } + } + ] + }, + { + "base": "RotateVector3", + "context": "{9BE75E2E-AA07-4767-9BF3-905C289EB38A}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke RotateVector3" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after RotateVector3 is invoked" + }, + "details": { + "name": "RotateVector3" + }, + "params": [ + { + "typeid": "{73103120-3DD3-4873-BAB3-9713FA2804FB}", + "details": { + "name": "Quaternion" + } + }, + { + "typeid": "{8379EB7D-01FA-4538-B64B-A6543B4BE73D}", + "details": { + "name": "Vector3" + } + } + ], + "results": [ + { + "typeid": "{8379EB7D-01FA-4538-B64B-A6543B4BE73D}", + "details": { + "name": "Vector3" + } + } + ] + }, + { + "base": "FromMatrix3x3", + "context": "{9BE75E2E-AA07-4767-9BF3-905C289EB38A}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke FromMatrix3x3" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after FromMatrix3x3 is invoked" + }, + "details": { + "name": "FromMatrix3x3" + }, + "params": [ + { + "typeid": "{15A4332F-7C3F-4A58-AC35-50E1CE53FB9C}", + "details": { + "name": "Matrix3x3" + } + } + ], + "results": [ + { + "typeid": "{73103120-3DD3-4873-BAB3-9713FA2804FB}", + "details": { + "name": "Quaternion" + } + } + ] + }, + { + "base": "Squad", + "context": "{9BE75E2E-AA07-4767-9BF3-905C289EB38A}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Squad" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Squad is invoked" + }, + "details": { + "name": "Squad" + }, + "params": [ + { + "typeid": "{73103120-3DD3-4873-BAB3-9713FA2804FB}", + "details": { + "name": "Quaternion" + } + }, + { + "typeid": "{73103120-3DD3-4873-BAB3-9713FA2804FB}", + "details": { + "name": "Quaternion" + } + }, + { + "typeid": "{73103120-3DD3-4873-BAB3-9713FA2804FB}", + "details": { + "name": "Quaternion" + } + }, + { + "typeid": "{73103120-3DD3-4873-BAB3-9713FA2804FB}", + "details": { + "name": "Quaternion" + } + }, + { + "typeid": "{110C4B14-11A8-4E9D-8638-5051013A56AC}", + "details": { + "name": "double" + } + } + ], + "results": [ + { + "typeid": "{73103120-3DD3-4873-BAB3-9713FA2804FB}", + "details": { + "name": "Quaternion" + } + } + ] + }, + { + "base": "FromAxisAngleDegrees", + "context": "{9BE75E2E-AA07-4767-9BF3-905C289EB38A}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke FromAxisAngleDegrees" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after FromAxisAngleDegrees is invoked" + }, + "details": { + "name": "FromAxisAngleDegrees" + }, + "params": [ + { + "typeid": "{8379EB7D-01FA-4538-B64B-A6543B4BE73D}", + "details": { + "name": "Vector3" + } + }, + { + "typeid": "{110C4B14-11A8-4E9D-8638-5051013A56AC}", + "details": { + "name": "double" + } + } + ], + "results": [ + { + "typeid": "{73103120-3DD3-4873-BAB3-9713FA2804FB}", + "details": { + "name": "Quaternion" + } + } + ] + }, + { + "base": "LengthSquared", + "context": "{9BE75E2E-AA07-4767-9BF3-905C289EB38A}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke LengthSquared" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after LengthSquared is invoked" + }, + "details": { + "name": "LengthSquared" + }, + "params": [ + { + "typeid": "{73103120-3DD3-4873-BAB3-9713FA2804FB}", + "details": { + "name": "Quaternion" + } + } + ], + "results": [ + { + "typeid": "{110C4B14-11A8-4E9D-8638-5051013A56AC}", + "details": { + "name": "double" + } + } + ] + }, + { + "base": "IsFinite", + "context": "{9BE75E2E-AA07-4767-9BF3-905C289EB38A}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke IsFinite" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after IsFinite is invoked" + }, + "details": { + "name": "IsFinite" + }, + "params": [ + { + "typeid": "{73103120-3DD3-4873-BAB3-9713FA2804FB}", + "details": { + "name": "Quaternion" + } + } + ], + "results": [ + { + "typeid": "{A0CA880C-AFE4-43CB-926C-59AC48496112}", + "details": { + "name": "bool" + } + } + ] + }, + { + "base": "DivideByNumber", + "context": "{9BE75E2E-AA07-4767-9BF3-905C289EB38A}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke DivideByNumber" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after DivideByNumber is invoked" + }, + "details": { + "name": "DivideByNumber" + }, + "params": [ + { + "typeid": "{73103120-3DD3-4873-BAB3-9713FA2804FB}", + "details": { + "name": "Quaternion" + } + }, + { + "typeid": "{110C4B14-11A8-4E9D-8638-5051013A56AC}", + "details": { + "name": "double" + } + } + ], + "results": [ + { + "typeid": "{73103120-3DD3-4873-BAB3-9713FA2804FB}", + "details": { + "name": "Quaternion" + } + } + ] + }, + { + "base": "MultiplyByRotation", + "context": "{9BE75E2E-AA07-4767-9BF3-905C289EB38A}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke MultiplyByRotation" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after MultiplyByRotation is invoked" + }, + "details": { + "name": "MultiplyByRotation" + }, + "params": [ + { + "typeid": "{73103120-3DD3-4873-BAB3-9713FA2804FB}", + "details": { + "name": "Quaternion" + } + }, + { + "typeid": "{73103120-3DD3-4873-BAB3-9713FA2804FB}", + "details": { + "name": "Quaternion" + } + } + ], + "results": [ + { + "typeid": "{73103120-3DD3-4873-BAB3-9713FA2804FB}", + "details": { + "name": "Quaternion" + } + } + ] + } + ] + }, + { + "base": "{287CEE87-6FF3-52FC-9D32-38255E2C7FE9}", + "context": "OnDemandReflected", + "variant": "", + "details": { + "name": "Array", + "category": "Array", + "tooltip": "A dynamically sized container of elements." + }, + "methods": [ + { + "base": "Size", + "context": "{287CEE87-6FF3-52FC-9D32-38255E2C7FE9}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Size" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Size is invoked" + }, + "details": { + "name": "Size" + }, + "params": [ + { + "typeid": "{287CEE87-6FF3-52FC-9D32-38255E2C7FE9}", + "details": { + "name": "AZStd::vector" + } + } + ], + "results": [ + { + "typeid": "{72039442-EB38-4D42-A1AD-CB68F7E0EEF6}", + "details": { + "name": "int" + } + } + ] + }, + { + "base": "Front", + "context": "{287CEE87-6FF3-52FC-9D32-38255E2C7FE9}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Front" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Front is invoked" + }, + "details": { + "name": "Front" + }, + "params": [ + { + "typeid": "{287CEE87-6FF3-52FC-9D32-38255E2C7FE9}", + "details": { + "name": "AZStd::vector" + } + } + ], + "results": [ + { + "typeid": "{9F4E062E-06A0-46D4-85DF-E0DA96467D3A}", + "details": { + "name": "Crc32" + } + } + ] + }, + { + "base": "HasKey", + "context": "{287CEE87-6FF3-52FC-9D32-38255E2C7FE9}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Has Key" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Has Key is invoked" + }, + "details": { + "name": "Has Key" + }, + "params": [ + { + "typeid": "{287CEE87-6FF3-52FC-9D32-38255E2C7FE9}", + "details": { + "name": "AZStd::vector" + } + }, + { + "typeid": "{D6597933-47CD-4FC8-B911-63F3E2B0993A}", + "details": { + "name": "AZ::u64" + } + } + ], + "results": [ + { + "typeid": "{A0CA880C-AFE4-43CB-926C-59AC48496112}", + "details": { + "name": "bool" + } + } + ] + }, + { + "base": "Resize", + "context": "{287CEE87-6FF3-52FC-9D32-38255E2C7FE9}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Resize" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Resize is invoked" + }, + "details": { + "name": "Resize" + }, + "params": [ + { + "typeid": "{287CEE87-6FF3-52FC-9D32-38255E2C7FE9}", + "details": { + "name": "AZStd::vector" + } + }, + { + "typeid": "{D6597933-47CD-4FC8-B911-63F3E2B0993A}", + "details": { + "name": "AZ::u64" + } + } + ] + }, + { + "base": "at", + "context": "{287CEE87-6FF3-52FC-9D32-38255E2C7FE9}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke at" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after at is invoked" + }, + "details": { + "name": "at" + }, + "params": [ + { + "typeid": "{287CEE87-6FF3-52FC-9D32-38255E2C7FE9}", + "details": { + "name": "AZStd::vector" + } + }, + { + "typeid": "{D6597933-47CD-4FC8-B911-63F3E2B0993A}", + "details": { + "name": "AZ::u64" + } + } + ], + "results": [ + { + "typeid": "{9F4E062E-06A0-46D4-85DF-E0DA96467D3A}", + "details": { + "name": "Crc32" + } + } + ] + }, + { + "base": "Back", + "context": "{287CEE87-6FF3-52FC-9D32-38255E2C7FE9}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Back" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Back is invoked" + }, + "details": { + "name": "Back" + }, + "params": [ + { + "typeid": "{287CEE87-6FF3-52FC-9D32-38255E2C7FE9}", + "details": { + "name": "AZStd::vector" + } + } + ], + "results": [ + { + "typeid": "{9F4E062E-06A0-46D4-85DF-E0DA96467D3A}", + "details": { + "name": "Crc32" + } + } + ] + }, + { + "base": "pop_back", + "context": "{287CEE87-6FF3-52FC-9D32-38255E2C7FE9}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke pop_back" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after pop_back is invoked" + }, + "details": { + "name": "pop_back" + }, + "params": [ + { + "typeid": "{287CEE87-6FF3-52FC-9D32-38255E2C7FE9}", + "details": { + "name": "AZStd::vector" + } + } + ] + }, + { + "base": "size", + "context": "{287CEE87-6FF3-52FC-9D32-38255E2C7FE9}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke size" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after size is invoked" + }, + "details": { + "name": "size" + }, + "params": [ + { + "typeid": "{287CEE87-6FF3-52FC-9D32-38255E2C7FE9}", + "details": { + "name": "AZStd::vector" + } + } + ], + "results": [ + { + "typeid": "{72039442-EB38-4D42-A1AD-CB68F7E0EEF6}", + "details": { + "name": "int" + } + } + ] + }, + { + "base": "At", + "context": "{287CEE87-6FF3-52FC-9D32-38255E2C7FE9}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke At" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after At is invoked" + }, + "details": { + "name": "At" + }, + "params": [ + { + "typeid": "{287CEE87-6FF3-52FC-9D32-38255E2C7FE9}", + "details": { + "name": "AZStd::vector" + } + }, + { + "typeid": "{D6597933-47CD-4FC8-B911-63F3E2B0993A}", + "details": { + "name": "AZ::u64" + } + } + ], + "results": [ + { + "typeid": "{9F4E062E-06A0-46D4-85DF-E0DA96467D3A}", + "details": { + "name": "Crc32" + } + } + ] + }, + { + "base": "Empty", + "context": "{287CEE87-6FF3-52FC-9D32-38255E2C7FE9}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Empty" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Empty is invoked" + }, + "details": { + "name": "Empty" + }, + "params": [ + { + "typeid": "{287CEE87-6FF3-52FC-9D32-38255E2C7FE9}", + "details": { + "name": "AZStd::vector" + } + } + ], + "results": [ + { + "typeid": "{A0CA880C-AFE4-43CB-926C-59AC48496112}", + "details": { + "name": "bool" + } + } + ] + }, + { + "base": "Swap", + "context": "{287CEE87-6FF3-52FC-9D32-38255E2C7FE9}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Swap" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Swap is invoked" + }, + "details": { + "name": "Swap" + }, + "params": [ + { + "typeid": "{287CEE87-6FF3-52FC-9D32-38255E2C7FE9}", + "details": { + "name": "AZStd::vector" + } + }, + { + "typeid": "{287CEE87-6FF3-52FC-9D32-38255E2C7FE9}", + "details": { + "name": "AZStd::vector" + } + } + ] + }, + { + "base": "push_back", + "context": "{287CEE87-6FF3-52FC-9D32-38255E2C7FE9}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke push_back" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after push_back is invoked" + }, + "details": { + "name": "push_back" + }, + "params": [ + { + "typeid": "{287CEE87-6FF3-52FC-9D32-38255E2C7FE9}", + "details": { + "name": "AZStd::vector" + } + }, + { + "typeid": "{9F4E062E-06A0-46D4-85DF-E0DA96467D3A}", + "details": { + "name": "Crc32" + } + } + ] + }, + { + "base": "PushBack_VM", + "context": "{287CEE87-6FF3-52FC-9D32-38255E2C7FE9}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke PushBack_VM" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after PushBack_VM is invoked" + }, + "details": { + "name": "PushBack_VM" + }, + "params": [ + { + "typeid": "{287CEE87-6FF3-52FC-9D32-38255E2C7FE9}", + "details": { + "name": "AZStd::vector" + } + }, + { + "typeid": "{9F4E062E-06A0-46D4-85DF-E0DA96467D3A}", + "details": { + "name": "Crc32" + } + } + ], + "results": [ + { + "typeid": "{287CEE87-6FF3-52FC-9D32-38255E2C7FE9}", + "details": { + "name": "AZStd::vector" + } + } + ] + }, + { + "base": "AtUnchecked", + "context": "{287CEE87-6FF3-52FC-9D32-38255E2C7FE9}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke AtUnchecked" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after AtUnchecked is invoked" + }, + "details": { + "name": "AtUnchecked" + }, + "params": [ + { + "typeid": "{287CEE87-6FF3-52FC-9D32-38255E2C7FE9}", + "details": { + "name": "AZStd::vector" + } + }, + { + "typeid": "{D6597933-47CD-4FC8-B911-63F3E2B0993A}", + "details": { + "name": "AZ::u64" + } + } + ], + "results": [ + { + "typeid": "{9F4E062E-06A0-46D4-85DF-E0DA96467D3A}", + "details": { + "name": "Crc32" + } + } + ] + }, + { + "base": "clear", + "context": "{287CEE87-6FF3-52FC-9D32-38255E2C7FE9}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke clear" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after clear is invoked" + }, + "details": { + "name": "clear" + }, + "params": [ + { + "typeid": "{287CEE87-6FF3-52FC-9D32-38255E2C7FE9}", + "details": { + "name": "AZStd::vector" + } + } + ] + }, + { + "base": "NotEmpty", + "context": "{287CEE87-6FF3-52FC-9D32-38255E2C7FE9}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke NotEmpty" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after NotEmpty is invoked" + }, + "details": { + "name": "NotEmpty" + }, + "params": [ + { + "typeid": "{287CEE87-6FF3-52FC-9D32-38255E2C7FE9}", + "details": { + "name": "AZStd::vector" + } + } + ], + "results": [ + { + "typeid": "{A0CA880C-AFE4-43CB-926C-59AC48496112}", + "details": { + "name": "bool" + } + } + ] + }, + { + "base": "Erase_VM", + "context": "{287CEE87-6FF3-52FC-9D32-38255E2C7FE9}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Erase_VM" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Erase_VM is invoked" + }, + "details": { + "name": "Erase_VM" + }, + "params": [ + { + "typeid": "{287CEE87-6FF3-52FC-9D32-38255E2C7FE9}", + "details": { + "name": "AZStd::vector" + } + }, + { + "typeid": "{D6597933-47CD-4FC8-B911-63F3E2B0993A}", + "details": { + "name": "AZ::u64" + } + } + ], + "results": [ + { + "typeid": "{287CEE87-6FF3-52FC-9D32-38255E2C7FE9}", + "details": { + "name": "AZStd::vector" + } + } + ] + }, + { + "base": "EraseCheck_VM", + "context": "{287CEE87-6FF3-52FC-9D32-38255E2C7FE9}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke EraseCheck_VM" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after EraseCheck_VM is invoked" + }, + "details": { + "name": "EraseCheck_VM" + }, + "params": [ + { + "typeid": "{287CEE87-6FF3-52FC-9D32-38255E2C7FE9}", + "details": { + "name": "AZStd::vector" + } + }, + { + "typeid": "{D6597933-47CD-4FC8-B911-63F3E2B0993A}", + "details": { + "name": "AZ::u64" + } + } + ], + "results": [ + { + "typeid": "{A0CA880C-AFE4-43CB-926C-59AC48496112}", + "details": { + "name": "bool" + } + } + ] + }, + { + "base": "Capacity", + "context": "{287CEE87-6FF3-52FC-9D32-38255E2C7FE9}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Capacity" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Capacity is invoked" + }, + "details": { + "name": "Capacity" + }, + "params": [ + { + "typeid": "{287CEE87-6FF3-52FC-9D32-38255E2C7FE9}", + "details": { + "name": "AZStd::vector" + } + } + ], + "results": [ + { + "typeid": "{D6597933-47CD-4FC8-B911-63F3E2B0993A}", + "details": { + "name": "AZ::u64" + } + } + ] + }, + { + "base": "Clear", + "context": "{287CEE87-6FF3-52FC-9D32-38255E2C7FE9}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Clear" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Clear is invoked" + }, + "details": { + "name": "Clear" + }, + "params": [ + { + "typeid": "{287CEE87-6FF3-52FC-9D32-38255E2C7FE9}", + "details": { + "name": "AZStd::vector" + } + } + ], + "results": [ + { + "typeid": "{287CEE87-6FF3-52FC-9D32-38255E2C7FE9}", + "details": { + "name": "AZStd::vector" + } + } + ] + }, + { + "base": "AssignAt", + "context": "{287CEE87-6FF3-52FC-9D32-38255E2C7FE9}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke AssignAt" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after AssignAt is invoked" + }, + "details": { + "name": "AssignAt" + }, + "params": [ + { + "typeid": "{287CEE87-6FF3-52FC-9D32-38255E2C7FE9}", + "details": { + "name": "AZStd::vector" + } + }, + { + "typeid": "{D6597933-47CD-4FC8-B911-63F3E2B0993A}", + "details": { + "name": "AZ::u64" + } + }, + { + "typeid": "{9F4E062E-06A0-46D4-85DF-E0DA96467D3A}", + "details": { + "name": "Crc32" + } + } + ] + }, + { + "base": "GetSize", + "context": "{287CEE87-6FF3-52FC-9D32-38255E2C7FE9}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke GetSize" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after GetSize is invoked" + }, + "details": { + "name": "GetSize" + }, + "params": [ + { + "typeid": "{287CEE87-6FF3-52FC-9D32-38255E2C7FE9}", + "details": { + "name": "AZStd::vector" + } + } + ], + "results": [ + { + "typeid": "{72039442-EB38-4D42-A1AD-CB68F7E0EEF6}", + "details": { + "name": "int" + } + } + ] + }, + { + "base": "Insert", + "context": "{287CEE87-6FF3-52FC-9D32-38255E2C7FE9}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Insert" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Insert is invoked" + }, + "details": { + "name": "Insert" + }, + "params": [ + { + "typeid": "{287CEE87-6FF3-52FC-9D32-38255E2C7FE9}", + "details": { + "name": "AZStd::vector" + } + }, + { + "typeid": "{D6597933-47CD-4FC8-B911-63F3E2B0993A}", + "details": { + "name": "AZ::u64" + } + }, + { + "typeid": "{9F4E062E-06A0-46D4-85DF-E0DA96467D3A}", + "details": { + "name": "Crc32" + } + } + ], + "results": [ + { + "typeid": "{287CEE87-6FF3-52FC-9D32-38255E2C7FE9}", + "details": { + "name": "AZStd::vector" + } + } + ] + }, + { + "base": "PushBack", + "context": "{287CEE87-6FF3-52FC-9D32-38255E2C7FE9}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke PushBack" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after PushBack is invoked" + }, + "details": { + "name": "PushBack" + }, + "params": [ + { + "typeid": "{287CEE87-6FF3-52FC-9D32-38255E2C7FE9}", + "details": { + "name": "AZStd::vector" + } + }, + { + "typeid": "{9F4E062E-06A0-46D4-85DF-E0DA96467D3A}", + "details": { + "name": "Crc32" + } + } + ] + }, + { + "base": "Reserve", + "context": "{287CEE87-6FF3-52FC-9D32-38255E2C7FE9}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Reserve" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Reserve is invoked" + }, + "details": { + "name": "Reserve" + }, + "params": [ + { + "typeid": "{287CEE87-6FF3-52FC-9D32-38255E2C7FE9}", + "details": { + "name": "AZStd::vector" + } + }, + { + "typeid": "{D6597933-47CD-4FC8-B911-63F3E2B0993A}", + "details": { + "name": "AZ::u64" + } + } + ] + }, + { + "base": "Iterate_VM", + "context": "{287CEE87-6FF3-52FC-9D32-38255E2C7FE9}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Iterate_VM" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Iterate_VM is invoked" + }, + "details": { + "name": "Iterate_VM" + }, + "params": [ + { + "typeid": "{287CEE87-6FF3-52FC-9D32-38255E2C7FE9}", + "details": { + "name": "AZStd::vector" + } + } + ], + "results": [ + { + "typeid": "{5A369E7B-631B-510E-A11F-566A7A2C6CD1}", + "details": { + "name": "Iterator_VM>" + } + } + ] + } + ] + }, + { + "base": "{33D5748B-90F1-569F-8C3F-EF32C9747919}", + "context": "OnDemandReflected", + "variant": "", + "details": { + "name": "Array", + "category": "Array", + "tooltip": "A dynamically sized container of elements." + }, + "methods": [ + { + "base": "Size", + "context": "{33D5748B-90F1-569F-8C3F-EF32C9747919}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Size" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Size is invoked" + }, + "details": { + "name": "Size" + }, + "params": [ + { + "typeid": "{33D5748B-90F1-569F-8C3F-EF32C9747919}", + "details": { + "name": "AZStd::vector" + } + } + ], + "results": [ + { + "typeid": "{72039442-EB38-4D42-A1AD-CB68F7E0EEF6}", + "details": { + "name": "int" + } + } + ] + }, + { + "base": "Front", + "context": "{33D5748B-90F1-569F-8C3F-EF32C9747919}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Front" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Front is invoked" + }, + "details": { + "name": "Front" + }, + "params": [ + { + "typeid": "{33D5748B-90F1-569F-8C3F-EF32C9747919}", + "details": { + "name": "AZStd::vector" + } + } + ], + "results": [ + { + "typeid": "{C0E1DF8C-D1BE-4AF4-8100-5D71788399BA}", + "details": { + "name": "AZ::RPI::ShaderVariantListSourceData::VariantInfo" + } + } + ] + }, + { + "base": "HasKey", + "context": "{33D5748B-90F1-569F-8C3F-EF32C9747919}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Has Key" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Has Key is invoked" + }, + "details": { + "name": "Has Key" + }, + "params": [ + { + "typeid": "{33D5748B-90F1-569F-8C3F-EF32C9747919}", + "details": { + "name": "AZStd::vector" + } + }, + { + "typeid": "{D6597933-47CD-4FC8-B911-63F3E2B0993A}", + "details": { + "name": "AZ::u64" + } + } + ], + "results": [ + { + "typeid": "{A0CA880C-AFE4-43CB-926C-59AC48496112}", + "details": { + "name": "bool" + } + } + ] + }, + { + "base": "Resize", + "context": "{33D5748B-90F1-569F-8C3F-EF32C9747919}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Resize" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Resize is invoked" + }, + "details": { + "name": "Resize" + }, + "params": [ + { + "typeid": "{33D5748B-90F1-569F-8C3F-EF32C9747919}", + "details": { + "name": "AZStd::vector" + } + }, + { + "typeid": "{D6597933-47CD-4FC8-B911-63F3E2B0993A}", + "details": { + "name": "AZ::u64" + } + } + ] + }, + { + "base": "at", + "context": "{33D5748B-90F1-569F-8C3F-EF32C9747919}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke at" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after at is invoked" + }, + "details": { + "name": "at" + }, + "params": [ + { + "typeid": "{33D5748B-90F1-569F-8C3F-EF32C9747919}", + "details": { + "name": "AZStd::vector" + } + }, + { + "typeid": "{D6597933-47CD-4FC8-B911-63F3E2B0993A}", + "details": { + "name": "AZ::u64" + } + } + ], + "results": [ + { + "typeid": "{C0E1DF8C-D1BE-4AF4-8100-5D71788399BA}", + "details": { + "name": "AZ::RPI::ShaderVariantListSourceData::VariantInfo" + } + } + ] + }, + { + "base": "Back", + "context": "{33D5748B-90F1-569F-8C3F-EF32C9747919}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Back" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Back is invoked" + }, + "details": { + "name": "Back" + }, + "params": [ + { + "typeid": "{33D5748B-90F1-569F-8C3F-EF32C9747919}", + "details": { + "name": "AZStd::vector" + } + } + ], + "results": [ + { + "typeid": "{C0E1DF8C-D1BE-4AF4-8100-5D71788399BA}", + "details": { + "name": "AZ::RPI::ShaderVariantListSourceData::VariantInfo" + } + } + ] + }, + { + "base": "pop_back", + "context": "{33D5748B-90F1-569F-8C3F-EF32C9747919}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke pop_back" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after pop_back is invoked" + }, + "details": { + "name": "pop_back" + }, + "params": [ + { + "typeid": "{33D5748B-90F1-569F-8C3F-EF32C9747919}", + "details": { + "name": "AZStd::vector" + } + } + ] + }, + { + "base": "size", + "context": "{33D5748B-90F1-569F-8C3F-EF32C9747919}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke size" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after size is invoked" + }, + "details": { + "name": "size" + }, + "params": [ + { + "typeid": "{33D5748B-90F1-569F-8C3F-EF32C9747919}", + "details": { + "name": "AZStd::vector" + } + } + ], + "results": [ + { + "typeid": "{72039442-EB38-4D42-A1AD-CB68F7E0EEF6}", + "details": { + "name": "int" + } + } + ] + }, + { + "base": "At", + "context": "{33D5748B-90F1-569F-8C3F-EF32C9747919}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke At" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after At is invoked" + }, + "details": { + "name": "At" + }, + "params": [ + { + "typeid": "{33D5748B-90F1-569F-8C3F-EF32C9747919}", + "details": { + "name": "AZStd::vector" + } + }, + { + "typeid": "{D6597933-47CD-4FC8-B911-63F3E2B0993A}", + "details": { + "name": "AZ::u64" + } + } + ], + "results": [ + { + "typeid": "{C0E1DF8C-D1BE-4AF4-8100-5D71788399BA}", + "details": { + "name": "AZ::RPI::ShaderVariantListSourceData::VariantInfo" + } + } + ] + }, + { + "base": "Empty", + "context": "{33D5748B-90F1-569F-8C3F-EF32C9747919}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Empty" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Empty is invoked" + }, + "details": { + "name": "Empty" + }, + "params": [ + { + "typeid": "{33D5748B-90F1-569F-8C3F-EF32C9747919}", + "details": { + "name": "AZStd::vector" + } + } + ], + "results": [ + { + "typeid": "{A0CA880C-AFE4-43CB-926C-59AC48496112}", + "details": { + "name": "bool" + } + } + ] + }, + { + "base": "Swap", + "context": "{33D5748B-90F1-569F-8C3F-EF32C9747919}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Swap" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Swap is invoked" + }, + "details": { + "name": "Swap" + }, + "params": [ + { + "typeid": "{33D5748B-90F1-569F-8C3F-EF32C9747919}", + "details": { + "name": "AZStd::vector" + } + }, + { + "typeid": "{33D5748B-90F1-569F-8C3F-EF32C9747919}", + "details": { + "name": "AZStd::vector" + } + } + ] + }, + { + "base": "push_back", + "context": "{33D5748B-90F1-569F-8C3F-EF32C9747919}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke push_back" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after push_back is invoked" + }, + "details": { + "name": "push_back" + }, + "params": [ + { + "typeid": "{33D5748B-90F1-569F-8C3F-EF32C9747919}", + "details": { + "name": "AZStd::vector" + } + }, + { + "typeid": "{C0E1DF8C-D1BE-4AF4-8100-5D71788399BA}", + "details": { + "name": "AZ::RPI::ShaderVariantListSourceData::VariantInfo" + } + } + ] + }, + { + "base": "PushBack_VM", + "context": "{33D5748B-90F1-569F-8C3F-EF32C9747919}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke PushBack_VM" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after PushBack_VM is invoked" + }, + "details": { + "name": "PushBack_VM" + }, + "params": [ + { + "typeid": "{33D5748B-90F1-569F-8C3F-EF32C9747919}", + "details": { + "name": "AZStd::vector" + } + }, + { + "typeid": "{C0E1DF8C-D1BE-4AF4-8100-5D71788399BA}", + "details": { + "name": "AZ::RPI::ShaderVariantListSourceData::VariantInfo" + } + } + ], + "results": [ + { + "typeid": "{33D5748B-90F1-569F-8C3F-EF32C9747919}", + "details": { + "name": "AZStd::vector" + } + } + ] + }, + { + "base": "AtUnchecked", + "context": "{33D5748B-90F1-569F-8C3F-EF32C9747919}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke AtUnchecked" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after AtUnchecked is invoked" + }, + "details": { + "name": "AtUnchecked" + }, + "params": [ + { + "typeid": "{33D5748B-90F1-569F-8C3F-EF32C9747919}", + "details": { + "name": "AZStd::vector" + } + }, + { + "typeid": "{D6597933-47CD-4FC8-B911-63F3E2B0993A}", + "details": { + "name": "AZ::u64" + } + } + ], + "results": [ + { + "typeid": "{C0E1DF8C-D1BE-4AF4-8100-5D71788399BA}", + "details": { + "name": "AZ::RPI::ShaderVariantListSourceData::VariantInfo" + } + } + ] + }, + { + "base": "clear", + "context": "{33D5748B-90F1-569F-8C3F-EF32C9747919}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke clear" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after clear is invoked" + }, + "details": { + "name": "clear" + }, + "params": [ + { + "typeid": "{33D5748B-90F1-569F-8C3F-EF32C9747919}", + "details": { + "name": "AZStd::vector" + } + } + ] + }, + { + "base": "NotEmpty", + "context": "{33D5748B-90F1-569F-8C3F-EF32C9747919}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke NotEmpty" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after NotEmpty is invoked" + }, + "details": { + "name": "NotEmpty" + }, + "params": [ + { + "typeid": "{33D5748B-90F1-569F-8C3F-EF32C9747919}", + "details": { + "name": "AZStd::vector" + } + } + ], + "results": [ + { + "typeid": "{A0CA880C-AFE4-43CB-926C-59AC48496112}", + "details": { + "name": "bool" + } + } + ] + }, + { + "base": "Erase_VM", + "context": "{33D5748B-90F1-569F-8C3F-EF32C9747919}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Erase_VM" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Erase_VM is invoked" + }, + "details": { + "name": "Erase_VM" + }, + "params": [ + { + "typeid": "{33D5748B-90F1-569F-8C3F-EF32C9747919}", + "details": { + "name": "AZStd::vector" + } + }, + { + "typeid": "{D6597933-47CD-4FC8-B911-63F3E2B0993A}", + "details": { + "name": "AZ::u64" + } + } + ], + "results": [ + { + "typeid": "{33D5748B-90F1-569F-8C3F-EF32C9747919}", + "details": { + "name": "AZStd::vector" + } + } + ] + }, + { + "base": "EraseCheck_VM", + "context": "{33D5748B-90F1-569F-8C3F-EF32C9747919}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke EraseCheck_VM" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after EraseCheck_VM is invoked" + }, + "details": { + "name": "EraseCheck_VM" + }, + "params": [ + { + "typeid": "{33D5748B-90F1-569F-8C3F-EF32C9747919}", + "details": { + "name": "AZStd::vector" + } + }, + { + "typeid": "{D6597933-47CD-4FC8-B911-63F3E2B0993A}", + "details": { + "name": "AZ::u64" + } + } + ], + "results": [ + { + "typeid": "{A0CA880C-AFE4-43CB-926C-59AC48496112}", + "details": { + "name": "bool" + } + } + ] + }, + { + "base": "Capacity", + "context": "{33D5748B-90F1-569F-8C3F-EF32C9747919}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Capacity" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Capacity is invoked" + }, + "details": { + "name": "Capacity" + }, + "params": [ + { + "typeid": "{33D5748B-90F1-569F-8C3F-EF32C9747919}", + "details": { + "name": "AZStd::vector" + } + } + ], + "results": [ + { + "typeid": "{D6597933-47CD-4FC8-B911-63F3E2B0993A}", + "details": { + "name": "AZ::u64" + } + } + ] + }, + { + "base": "Clear", + "context": "{33D5748B-90F1-569F-8C3F-EF32C9747919}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Clear" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Clear is invoked" + }, + "details": { + "name": "Clear" + }, + "params": [ + { + "typeid": "{33D5748B-90F1-569F-8C3F-EF32C9747919}", + "details": { + "name": "AZStd::vector" + } + } + ], + "results": [ + { + "typeid": "{33D5748B-90F1-569F-8C3F-EF32C9747919}", + "details": { + "name": "AZStd::vector" + } + } + ] + }, + { + "base": "AssignAt", + "context": "{33D5748B-90F1-569F-8C3F-EF32C9747919}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke AssignAt" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after AssignAt is invoked" + }, + "details": { + "name": "AssignAt" + }, + "params": [ + { + "typeid": "{33D5748B-90F1-569F-8C3F-EF32C9747919}", + "details": { + "name": "AZStd::vector" + } + }, + { + "typeid": "{D6597933-47CD-4FC8-B911-63F3E2B0993A}", + "details": { + "name": "AZ::u64" + } + }, + { + "typeid": "{C0E1DF8C-D1BE-4AF4-8100-5D71788399BA}", + "details": { + "name": "AZ::RPI::ShaderVariantListSourceData::VariantInfo" + } + } + ] + }, + { + "base": "GetSize", + "context": "{33D5748B-90F1-569F-8C3F-EF32C9747919}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke GetSize" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after GetSize is invoked" + }, + "details": { + "name": "GetSize" + }, + "params": [ + { + "typeid": "{33D5748B-90F1-569F-8C3F-EF32C9747919}", + "details": { + "name": "AZStd::vector" + } + } + ], + "results": [ + { + "typeid": "{72039442-EB38-4D42-A1AD-CB68F7E0EEF6}", + "details": { + "name": "int" + } + } + ] + }, + { + "base": "Insert", + "context": "{33D5748B-90F1-569F-8C3F-EF32C9747919}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Insert" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Insert is invoked" + }, + "details": { + "name": "Insert" + }, + "params": [ + { + "typeid": "{33D5748B-90F1-569F-8C3F-EF32C9747919}", + "details": { + "name": "AZStd::vector" + } + }, + { + "typeid": "{D6597933-47CD-4FC8-B911-63F3E2B0993A}", + "details": { + "name": "AZ::u64" + } + }, + { + "typeid": "{C0E1DF8C-D1BE-4AF4-8100-5D71788399BA}", + "details": { + "name": "AZ::RPI::ShaderVariantListSourceData::VariantInfo" + } + } + ], + "results": [ + { + "typeid": "{33D5748B-90F1-569F-8C3F-EF32C9747919}", + "details": { + "name": "AZStd::vector" + } + } + ] + }, + { + "base": "PushBack", + "context": "{33D5748B-90F1-569F-8C3F-EF32C9747919}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke PushBack" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after PushBack is invoked" + }, + "details": { + "name": "PushBack" + }, + "params": [ + { + "typeid": "{33D5748B-90F1-569F-8C3F-EF32C9747919}", + "details": { + "name": "AZStd::vector" + } + }, + { + "typeid": "{C0E1DF8C-D1BE-4AF4-8100-5D71788399BA}", + "details": { + "name": "AZ::RPI::ShaderVariantListSourceData::VariantInfo" + } + } + ] + }, + { + "base": "Reserve", + "context": "{33D5748B-90F1-569F-8C3F-EF32C9747919}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Reserve" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Reserve is invoked" + }, + "details": { + "name": "Reserve" + }, + "params": [ + { + "typeid": "{33D5748B-90F1-569F-8C3F-EF32C9747919}", + "details": { + "name": "AZStd::vector" + } + }, + { + "typeid": "{D6597933-47CD-4FC8-B911-63F3E2B0993A}", + "details": { + "name": "AZ::u64" + } + } + ] + }, + { + "base": "Iterate_VM", + "context": "{33D5748B-90F1-569F-8C3F-EF32C9747919}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Iterate_VM" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Iterate_VM is invoked" + }, + "details": { + "name": "Iterate_VM" + }, + "params": [ + { + "typeid": "{33D5748B-90F1-569F-8C3F-EF32C9747919}", + "details": { + "name": "AZStd::vector" + } + } + ], + "results": [ + { + "typeid": "{C6C60A04-2C5B-5576-A0D0-0DB6206D0C9F}", + "details": { + "name": "Iterator_VM>" + } + } + ] + } + ] + }, + { + "base": "{03AAAB3F-5C47-5A66-9EBC-D5FA4DB353C9}", + "context": "OnDemandReflected", + "variant": "", + "details": { + "name": "AZStd::basic_string, allocator>" + }, + "methods": [ + { + "base": "Split", + "context": "{03AAAB3F-5C47-5A66-9EBC-D5FA4DB353C9}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Split" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Split is invoked" + }, + "details": { + "name": "Split" + }, + "params": [ + { + "typeid": "{03AAAB3F-5C47-5A66-9EBC-D5FA4DB353C9}", + "details": { + "name": "AZStd::string" + } + }, + { + "typeid": "{03AAAB3F-5C47-5A66-9EBC-D5FA4DB353C9}", + "details": { + "name": "AZStd::string" + } + } + ], + "results": [ + { + "typeid": "{99DAD0BC-740E-5E82-826B-8FC7968CC02C}", + "details": { + "name": "AZStd::vector" + } + } + ] + }, + { + "base": "Join", + "context": "{03AAAB3F-5C47-5A66-9EBC-D5FA4DB353C9}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Join" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Join is invoked" + }, + "details": { + "name": "Join" + }, + "params": [ + { + "typeid": "{99DAD0BC-740E-5E82-826B-8FC7968CC02C}", + "details": { + "name": "AZStd::vector" + } + }, + { + "typeid": "{03AAAB3F-5C47-5A66-9EBC-D5FA4DB353C9}", + "details": { + "name": "AZStd::string" + } + } + ], + "results": [ + { + "typeid": "{03AAAB3F-5C47-5A66-9EBC-D5FA4DB353C9}", + "details": { + "name": "AZStd::string" + } + } + ] + }, + { + "base": "Add", + "context": "{03AAAB3F-5C47-5A66-9EBC-D5FA4DB353C9}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Add" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Add is invoked" + }, + "details": { + "name": "Add" + }, + "params": [ + { + "typeid": "{03AAAB3F-5C47-5A66-9EBC-D5FA4DB353C9}", + "details": { + "name": "AZStd::string" + } + }, + { + "typeid": "{03AAAB3F-5C47-5A66-9EBC-D5FA4DB353C9}", + "details": { + "name": "AZStd::string" + } + } + ], + "results": [ + { + "typeid": "{03AAAB3F-5C47-5A66-9EBC-D5FA4DB353C9}", + "details": { + "name": "AZStd::string" + } + } + ] + }, + { + "base": "ToLower", + "context": "{03AAAB3F-5C47-5A66-9EBC-D5FA4DB353C9}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke ToLower" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after ToLower is invoked" + }, + "details": { + "name": "ToLower" + }, + "params": [ + { + "typeid": "{03AAAB3F-5C47-5A66-9EBC-D5FA4DB353C9}", + "details": { + "name": "AZStd::string" + } + } + ], + "results": [ + { + "typeid": "{03AAAB3F-5C47-5A66-9EBC-D5FA4DB353C9}", + "details": { + "name": "AZStd::string" + } + } + ] + }, + { + "base": "Replace", + "context": "{03AAAB3F-5C47-5A66-9EBC-D5FA4DB353C9}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Replace" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Replace is invoked" + }, + "details": { + "name": "Replace" + }, + "params": [ + { + "typeid": "{03AAAB3F-5C47-5A66-9EBC-D5FA4DB353C9}", + "details": { + "name": "AZStd::string" + } + }, + { + "typeid": "{03AAAB3F-5C47-5A66-9EBC-D5FA4DB353C9}", + "details": { + "name": "AZStd::string" + } + }, + { + "typeid": "{03AAAB3F-5C47-5A66-9EBC-D5FA4DB353C9}", + "details": { + "name": "AZStd::string" + } + } + ], + "results": [ + { + "typeid": "{03AAAB3F-5C47-5A66-9EBC-D5FA4DB353C9}", + "details": { + "name": "AZStd::string" + } + } + ] + }, + { + "base": "TrimRight", + "context": "{03AAAB3F-5C47-5A66-9EBC-D5FA4DB353C9}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke TrimRight" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after TrimRight is invoked" + }, + "details": { + "name": "TrimRight" + }, + "params": [ + { + "typeid": "{03AAAB3F-5C47-5A66-9EBC-D5FA4DB353C9}", + "details": { + "name": "AZStd::string" + } + } + ], + "results": [ + { + "typeid": "{03AAAB3F-5C47-5A66-9EBC-D5FA4DB353C9}", + "details": { + "name": "AZStd::string" + } + } + ] + }, + { + "base": "Equal", + "context": "{03AAAB3F-5C47-5A66-9EBC-D5FA4DB353C9}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Equal" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Equal is invoked" + }, + "details": { + "name": "Equal" + }, + "params": [ + { + "typeid": "{03AAAB3F-5C47-5A66-9EBC-D5FA4DB353C9}", + "details": { + "name": "AZStd::string" + } + }, + { + "typeid": "{03AAAB3F-5C47-5A66-9EBC-D5FA4DB353C9}", + "details": { + "name": "AZStd::string" + } + } + ], + "results": [ + { + "typeid": "{A0CA880C-AFE4-43CB-926C-59AC48496112}", + "details": { + "name": "bool" + } + } + ] + }, + { + "base": "Find", + "context": "{03AAAB3F-5C47-5A66-9EBC-D5FA4DB353C9}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Find" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Find is invoked" + }, + "details": { + "name": "Find" + }, + "params": [ + { + "typeid": "{03AAAB3F-5C47-5A66-9EBC-D5FA4DB353C9}", + "details": { + "name": "AZStd::string" + } + }, + { + "typeid": "{03AAAB3F-5C47-5A66-9EBC-D5FA4DB353C9}", + "details": { + "name": "AZStd::string" + } + }, + { + "typeid": "{72039442-EB38-4D42-A1AD-CB68F7E0EEF6}", + "details": { + "name": "int" + } + } + ], + "results": [ + { + "typeid": "{72039442-EB38-4D42-A1AD-CB68F7E0EEF6}", + "details": { + "name": "int" + } + } + ] + }, + { + "base": "Substring", + "context": "{03AAAB3F-5C47-5A66-9EBC-D5FA4DB353C9}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Substring" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Substring is invoked" + }, + "details": { + "name": "Substring" + }, + "params": [ + { + "typeid": "{03AAAB3F-5C47-5A66-9EBC-D5FA4DB353C9}", + "details": { + "name": "AZStd::string" + } + }, + { + "typeid": "{72039442-EB38-4D42-A1AD-CB68F7E0EEF6}", + "details": { + "name": "int" + } + }, + { + "typeid": "{72039442-EB38-4D42-A1AD-CB68F7E0EEF6}", + "details": { + "name": "int" + } + } + ], + "results": [ + { + "typeid": "{03AAAB3F-5C47-5A66-9EBC-D5FA4DB353C9}", + "details": { + "name": "AZStd::string" + } + } + ] + }, + { + "base": "Length", + "context": "{03AAAB3F-5C47-5A66-9EBC-D5FA4DB353C9}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Length" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Length is invoked" + }, + "details": { + "name": "Length" + }, + "params": [ + { + "typeid": "{03AAAB3F-5C47-5A66-9EBC-D5FA4DB353C9}", + "details": { + "name": "AZStd::string" + } + } + ], + "results": [ + { + "typeid": "{72039442-EB38-4D42-A1AD-CB68F7E0EEF6}", + "details": { + "name": "int" + } + } + ] + }, + { + "base": "ReplaceByIndex", + "context": "{03AAAB3F-5C47-5A66-9EBC-D5FA4DB353C9}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke ReplaceByIndex" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after ReplaceByIndex is invoked" + }, + "details": { + "name": "ReplaceByIndex" + }, + "params": [ + { + "typeid": "{03AAAB3F-5C47-5A66-9EBC-D5FA4DB353C9}", + "details": { + "name": "AZStd::string" + } + }, + { + "typeid": "{72039442-EB38-4D42-A1AD-CB68F7E0EEF6}", + "details": { + "name": "int" + } + }, + { + "typeid": "{72039442-EB38-4D42-A1AD-CB68F7E0EEF6}", + "details": { + "name": "int" + } + }, + { + "typeid": "{03AAAB3F-5C47-5A66-9EBC-D5FA4DB353C9}", + "details": { + "name": "AZStd::string" + } + } + ], + "results": [ + { + "typeid": "{03AAAB3F-5C47-5A66-9EBC-D5FA4DB353C9}", + "details": { + "name": "AZStd::string" + } + } + ] + }, + { + "base": "c_str", + "context": "{03AAAB3F-5C47-5A66-9EBC-D5FA4DB353C9}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke c_str" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after c_str is invoked" + }, + "details": { + "name": "c_str" + }, + "params": [ + { + "typeid": "{03AAAB3F-5C47-5A66-9EBC-D5FA4DB353C9}", + "details": { + "name": "AZStd::string" + } + } + ], + "results": [ + { + "typeid": "{3AB0037F-AF8D-48CE-BCA0-A170D18B2C03}", + "details": { + "name": "char" + } + } + ] + }, + { + "base": "TrimLeft", + "context": "{03AAAB3F-5C47-5A66-9EBC-D5FA4DB353C9}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke TrimLeft" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after TrimLeft is invoked" + }, + "details": { + "name": "TrimLeft" + }, + "params": [ + { + "typeid": "{03AAAB3F-5C47-5A66-9EBC-D5FA4DB353C9}", + "details": { + "name": "AZStd::string" + } + } + ], + "results": [ + { + "typeid": "{03AAAB3F-5C47-5A66-9EBC-D5FA4DB353C9}", + "details": { + "name": "AZStd::string" + } + } + ] + }, + { + "base": "ToUpper", + "context": "{03AAAB3F-5C47-5A66-9EBC-D5FA4DB353C9}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke ToUpper" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after ToUpper is invoked" + }, + "details": { + "name": "ToUpper" + }, + "params": [ + { + "typeid": "{03AAAB3F-5C47-5A66-9EBC-D5FA4DB353C9}", + "details": { + "name": "AZStd::string" + } + } + ], + "results": [ + { + "typeid": "{03AAAB3F-5C47-5A66-9EBC-D5FA4DB353C9}", + "details": { + "name": "AZStd::string" + } + } + ] + } + ] + }, + { + "base": "{F0A3166F-115C-5C3E-8D65-28FBA4420028}", + "context": "OnDemandReflected", + "variant": "", + "details": { + "name": "Event" + }, + "methods": [ + { + "base": "HasHandlerConnected", + "context": "{F0A3166F-115C-5C3E-8D65-28FBA4420028}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke HasHandlerConnected" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after HasHandlerConnected is invoked" + }, + "details": { + "name": "HasHandlerConnected" + }, + "params": [ + { + "typeid": "{F0A3166F-115C-5C3E-8D65-28FBA4420028}", + "details": { + "name": "Event*" + } + } + ], + "results": [ + { + "typeid": "{A0CA880C-AFE4-43CB-926C-59AC48496112}", + "details": { + "name": "bool" + } + } + ] + } + ] + }, + { + "base": "{93BBB90E-EBB4-507D-89B6-E4921FE44AFF}", + "context": "OnDemandReflected", + "variant": "", + "details": { + "name": "Set", + "category": "Set", + "tooltip": "A dynamically sized container, where each element is unique." + }, + "methods": [ + { + "base": "Size", + "context": "{93BBB90E-EBB4-507D-89B6-E4921FE44AFF}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Size" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Size is invoked" + }, + "details": { + "name": "Size" + }, + "params": [ + { + "typeid": "{93BBB90E-EBB4-507D-89B6-E4921FE44AFF}", + "details": { + "name": "AZStd::unordered_set" + } + } + ], + "results": [ + { + "typeid": "{72039442-EB38-4D42-A1AD-CB68F7E0EEF6}", + "details": { + "name": "int" + } + } + ] + }, + { + "base": "GetKeys", + "context": "{93BBB90E-EBB4-507D-89B6-E4921FE44AFF}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke GetKeys" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after GetKeys is invoked" + }, + "details": { + "name": "GetKeys" + }, + "params": [ + { + "typeid": "{93BBB90E-EBB4-507D-89B6-E4921FE44AFF}", + "details": { + "name": "AZStd::unordered_set" + } + } + ], + "results": [ + { + "typeid": "{287CEE87-6FF3-52FC-9D32-38255E2C7FE9}", + "details": { + "name": "AZStd::vector" + } + } + ] + }, + { + "base": "contains", + "context": "{93BBB90E-EBB4-507D-89B6-E4921FE44AFF}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke contains" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after contains is invoked" + }, + "details": { + "name": "contains" + }, + "params": [ + { + "typeid": "{93BBB90E-EBB4-507D-89B6-E4921FE44AFF}", + "details": { + "name": "AZStd::unordered_set" + } + }, + { + "typeid": "{9F4E062E-06A0-46D4-85DF-E0DA96467D3A}", + "details": { + "name": "Crc32" + } + } + ], + "results": [ + { + "typeid": "{A0CA880C-AFE4-43CB-926C-59AC48496112}", + "details": { + "name": "bool" + } + } + ] + }, + { + "base": "Insert", + "context": "{93BBB90E-EBB4-507D-89B6-E4921FE44AFF}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Insert" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Insert is invoked" + }, + "details": { + "name": "Insert" + }, + "params": [ + { + "typeid": "{93BBB90E-EBB4-507D-89B6-E4921FE44AFF}", + "details": { + "name": "AZStd::unordered_set" + } + }, + { + "typeid": "{9F4E062E-06A0-46D4-85DF-E0DA96467D3A}", + "details": { + "name": "Crc32" + } + } + ], + "results": [ + { + "typeid": "{93BBB90E-EBB4-507D-89B6-E4921FE44AFF}", + "details": { + "name": "AZStd::unordered_set" + } + } + ] + }, + { + "base": "GetSize", + "context": "{93BBB90E-EBB4-507D-89B6-E4921FE44AFF}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke GetSize" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after GetSize is invoked" + }, + "details": { + "name": "GetSize" + }, + "params": [ + { + "typeid": "{93BBB90E-EBB4-507D-89B6-E4921FE44AFF}", + "details": { + "name": "AZStd::unordered_set" + } + } + ], + "results": [ + { + "typeid": "{72039442-EB38-4D42-A1AD-CB68F7E0EEF6}", + "details": { + "name": "int" + } + } + ] + }, + { + "base": "Reserve", + "context": "{93BBB90E-EBB4-507D-89B6-E4921FE44AFF}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Reserve" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Reserve is invoked" + }, + "details": { + "name": "Reserve" + }, + "params": [ + { + "typeid": "{93BBB90E-EBB4-507D-89B6-E4921FE44AFF}", + "details": { + "name": "AZStd::unordered_set" + } + }, + { + "typeid": "{D6597933-47CD-4FC8-B911-63F3E2B0993A}", + "details": { + "name": "AZ::u64" + } + } + ] + }, + { + "base": "Iterate_VM", + "context": "{93BBB90E-EBB4-507D-89B6-E4921FE44AFF}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Iterate_VM" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Iterate_VM is invoked" + }, + "details": { + "name": "Iterate_VM" + }, + "params": [ + { + "typeid": "{93BBB90E-EBB4-507D-89B6-E4921FE44AFF}", + "details": { + "name": "AZStd::unordered_set" + } + } + ], + "results": [ + { + "typeid": "{CCDD5049-D70F-57EB-9E4E-F0F063ECCBBC}", + "details": { + "name": "Iterator_VM, AZStd::equal_to, allocator>>" + } + } + ] + }, + { + "base": "EraseCheck_VM", + "context": "{93BBB90E-EBB4-507D-89B6-E4921FE44AFF}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke EraseCheck_VM" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after EraseCheck_VM is invoked" + }, + "details": { + "name": "EraseCheck_VM" + }, + "params": [ + { + "typeid": "{93BBB90E-EBB4-507D-89B6-E4921FE44AFF}", + "details": { + "name": "AZStd::unordered_set" + } + }, + { + "typeid": "{9F4E062E-06A0-46D4-85DF-E0DA96467D3A}", + "details": { + "name": "Crc32" + } + } + ], + "results": [ + { + "typeid": "{A0CA880C-AFE4-43CB-926C-59AC48496112}", + "details": { + "name": "bool" + } + } + ] + }, + { + "base": "Erase", + "context": "{93BBB90E-EBB4-507D-89B6-E4921FE44AFF}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Erase" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Erase is invoked" + }, + "details": { + "name": "Erase" + }, + "params": [ + { + "typeid": "{93BBB90E-EBB4-507D-89B6-E4921FE44AFF}", + "details": { + "name": "AZStd::unordered_set" + } + }, + { + "typeid": "{9F4E062E-06A0-46D4-85DF-E0DA96467D3A}", + "details": { + "name": "Crc32" + } + } + ], + "results": [ + { + "typeid": "{93BBB90E-EBB4-507D-89B6-E4921FE44AFF}", + "details": { + "name": "AZStd::unordered_set" + } + } + ] + }, + { + "base": "Clear", + "context": "{93BBB90E-EBB4-507D-89B6-E4921FE44AFF}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Clear" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Clear is invoked" + }, + "details": { + "name": "Clear" + }, + "params": [ + { + "typeid": "{93BBB90E-EBB4-507D-89B6-E4921FE44AFF}", + "details": { + "name": "AZStd::unordered_set" + } + } + ], + "results": [ + { + "typeid": "{93BBB90E-EBB4-507D-89B6-E4921FE44AFF}", + "details": { + "name": "AZStd::unordered_set" + } + } + ] + }, + { + "base": "BucketCount", + "context": "{93BBB90E-EBB4-507D-89B6-E4921FE44AFF}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke BucketCount" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after BucketCount is invoked" + }, + "details": { + "name": "BucketCount" + }, + "params": [ + { + "typeid": "{93BBB90E-EBB4-507D-89B6-E4921FE44AFF}", + "details": { + "name": "AZStd::unordered_set" + } + } + ], + "results": [ + { + "typeid": "{D6597933-47CD-4FC8-B911-63F3E2B0993A}", + "details": { + "name": "AZ::u64" + } + } + ] + }, + { + "base": "Empty", + "context": "{93BBB90E-EBB4-507D-89B6-E4921FE44AFF}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Empty" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Empty is invoked" + }, + "details": { + "name": "Empty" + }, + "params": [ + { + "typeid": "{93BBB90E-EBB4-507D-89B6-E4921FE44AFF}", + "details": { + "name": "AZStd::unordered_set" + } + } + ], + "results": [ + { + "typeid": "{A0CA880C-AFE4-43CB-926C-59AC48496112}", + "details": { + "name": "bool" + } + } + ] + }, + { + "base": "Swap", + "context": "{93BBB90E-EBB4-507D-89B6-E4921FE44AFF}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Swap" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Swap is invoked" + }, + "details": { + "name": "Swap" + }, + "params": [ + { + "typeid": "{93BBB90E-EBB4-507D-89B6-E4921FE44AFF}", + "details": { + "name": "AZStd::unordered_set" + } + }, + { + "typeid": "{93BBB90E-EBB4-507D-89B6-E4921FE44AFF}", + "details": { + "name": "AZStd::unordered_set" + } + } + ] + } + ] + }, + { + "base": "{60CBD665-AE12-50ED-A0CF-D94E77C6292C}", + "context": "OnDemandReflected", + "variant": "", + "details": { + "name": "Map", + "category": "Map", + "tooltip": "A collection of Key/Value pairs, where each Key value must be unique." + }, + "methods": [ + { + "base": "contains", + "context": "{60CBD665-AE12-50ED-A0CF-D94E77C6292C}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke contains" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after contains is invoked" + }, + "details": { + "name": "contains" + }, + "params": [ + { + "typeid": "{60CBD665-AE12-50ED-A0CF-D94E77C6292C}", + "details": { + "name": "AZStd::unordered_map" + } + }, + { + "typeid": "{652ED536-3402-439B-AEBE-4A5DBC554085}", + "details": { + "name": "AssetId" + } + } + ], + "results": [ + { + "typeid": "{A0CA880C-AFE4-43CB-926C-59AC48496112}", + "details": { + "name": "bool" + } + } + ] + }, + { + "base": "Insert", + "context": "{60CBD665-AE12-50ED-A0CF-D94E77C6292C}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Insert" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Insert is invoked" + }, + "details": { + "name": "Insert" + }, + "params": [ + { + "typeid": "{60CBD665-AE12-50ED-A0CF-D94E77C6292C}", + "details": { + "name": "AZStd::unordered_map" + } + }, + { + "typeid": "{652ED536-3402-439B-AEBE-4A5DBC554085}", + "details": { + "name": "AssetId" + } + }, + { + "typeid": "{A0CA880C-AFE4-43CB-926C-59AC48496112}", + "details": { + "name": "bool" + } + } + ], + "results": [ + { + "typeid": "{60CBD665-AE12-50ED-A0CF-D94E77C6292C}", + "details": { + "name": "AZStd::unordered_map" + } + } + ] + }, + { + "base": "Reserve", + "context": "{60CBD665-AE12-50ED-A0CF-D94E77C6292C}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Reserve" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Reserve is invoked" + }, + "details": { + "name": "Reserve" + }, + "params": [ + { + "typeid": "{60CBD665-AE12-50ED-A0CF-D94E77C6292C}", + "details": { + "name": "AZStd::unordered_map" + } + }, + { + "typeid": "{D6597933-47CD-4FC8-B911-63F3E2B0993A}", + "details": { + "name": "AZ::u64" + } + } + ] + }, + { + "base": "GetSize", + "context": "{60CBD665-AE12-50ED-A0CF-D94E77C6292C}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke GetSize" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after GetSize is invoked" + }, + "details": { + "name": "GetSize" + }, + "params": [ + { + "typeid": "{60CBD665-AE12-50ED-A0CF-D94E77C6292C}", + "details": { + "name": "AZStd::unordered_map" + } + } + ], + "results": [ + { + "typeid": "{72039442-EB38-4D42-A1AD-CB68F7E0EEF6}", + "details": { + "name": "int" + } + } + ] + }, + { + "base": "Iterate_VM", + "context": "{60CBD665-AE12-50ED-A0CF-D94E77C6292C}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Iterate_VM" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Iterate_VM is invoked" + }, + "details": { + "name": "Iterate_VM" + }, + "params": [ + { + "typeid": "{60CBD665-AE12-50ED-A0CF-D94E77C6292C}", + "details": { + "name": "AZStd::unordered_map" + } + } + ], + "results": [ + { + "typeid": "{8EDF80B5-A118-5323-B142-E567B1D31BCB}", + "details": { + "name": "Iterator_VM, AZStd::equal_to, allocator>>" + } + } + ] + }, + { + "base": "GetKeys", + "context": "{60CBD665-AE12-50ED-A0CF-D94E77C6292C}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke GetKeys" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after GetKeys is invoked" + }, + "details": { + "name": "GetKeys" + }, + "params": [ + { + "typeid": "{60CBD665-AE12-50ED-A0CF-D94E77C6292C}", + "details": { + "name": "AZStd::unordered_map" + } + } + ], + "results": [ + { + "typeid": "{877C4A33-39B5-51D7-948D-F97DB81372A1}", + "details": { + "name": "AZStd::vector" + } + } + ] + }, + { + "base": "Size", + "context": "{60CBD665-AE12-50ED-A0CF-D94E77C6292C}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Size" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Size is invoked" + }, + "details": { + "name": "Size" + }, + "params": [ + { + "typeid": "{60CBD665-AE12-50ED-A0CF-D94E77C6292C}", + "details": { + "name": "AZStd::unordered_map" + } + } + ], + "results": [ + { + "typeid": "{72039442-EB38-4D42-A1AD-CB68F7E0EEF6}", + "details": { + "name": "int" + } + } + ] + }, + { + "base": "Erase", + "context": "{60CBD665-AE12-50ED-A0CF-D94E77C6292C}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Erase" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Erase is invoked" + }, + "details": { + "name": "Erase" + }, + "params": [ + { + "typeid": "{60CBD665-AE12-50ED-A0CF-D94E77C6292C}", + "details": { + "name": "AZStd::unordered_map" + } + }, + { + "typeid": "{652ED536-3402-439B-AEBE-4A5DBC554085}", + "details": { + "name": "AssetId" + } + } + ], + "results": [ + { + "typeid": "{60CBD665-AE12-50ED-A0CF-D94E77C6292C}", + "details": { + "name": "AZStd::unordered_map" + } + } + ] + }, + { + "base": "EraseCheck_VM", + "context": "{60CBD665-AE12-50ED-A0CF-D94E77C6292C}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke EraseCheck_VM" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after EraseCheck_VM is invoked" + }, + "details": { + "name": "EraseCheck_VM" + }, + "params": [ + { + "typeid": "{60CBD665-AE12-50ED-A0CF-D94E77C6292C}", + "details": { + "name": "AZStd::unordered_map" + } + }, + { + "typeid": "{652ED536-3402-439B-AEBE-4A5DBC554085}", + "details": { + "name": "AssetId" + } + } + ], + "results": [ + { + "typeid": "{A0CA880C-AFE4-43CB-926C-59AC48496112}", + "details": { + "name": "bool" + } + } + ] + }, + { + "base": "Clear", + "context": "{60CBD665-AE12-50ED-A0CF-D94E77C6292C}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Clear" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Clear is invoked" + }, + "details": { + "name": "Clear" + }, + "params": [ + { + "typeid": "{60CBD665-AE12-50ED-A0CF-D94E77C6292C}", + "details": { + "name": "AZStd::unordered_map" + } + } + ], + "results": [ + { + "typeid": "{60CBD665-AE12-50ED-A0CF-D94E77C6292C}", + "details": { + "name": "AZStd::unordered_map" + } + } + ] + }, + { + "base": "At", + "context": "{60CBD665-AE12-50ED-A0CF-D94E77C6292C}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke At" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after At is invoked" + }, + "details": { + "name": "At" + }, + "params": [ + { + "typeid": "{60CBD665-AE12-50ED-A0CF-D94E77C6292C}", + "details": { + "name": "AZStd::unordered_map" + } + }, + { + "typeid": "{652ED536-3402-439B-AEBE-4A5DBC554085}", + "details": { + "name": "AssetId" + } + } + ], + "results": [ + { + "typeid": "{A0CA880C-AFE4-43CB-926C-59AC48496112}", + "details": { + "name": "bool" + } + } + ] + }, + { + "base": "BucketCount", + "context": "{60CBD665-AE12-50ED-A0CF-D94E77C6292C}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke BucketCount" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after BucketCount is invoked" + }, + "details": { + "name": "BucketCount" + }, + "params": [ + { + "typeid": "{60CBD665-AE12-50ED-A0CF-D94E77C6292C}", + "details": { + "name": "AZStd::unordered_map" + } + } + ], + "results": [ + { + "typeid": "{D6597933-47CD-4FC8-B911-63F3E2B0993A}", + "details": { + "name": "AZ::u64" + } + } + ] + }, + { + "base": "Empty", + "context": "{60CBD665-AE12-50ED-A0CF-D94E77C6292C}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Empty" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Empty is invoked" + }, + "details": { + "name": "Empty" + }, + "params": [ + { + "typeid": "{60CBD665-AE12-50ED-A0CF-D94E77C6292C}", + "details": { + "name": "AZStd::unordered_map" + } + } + ], + "results": [ + { + "typeid": "{A0CA880C-AFE4-43CB-926C-59AC48496112}", + "details": { + "name": "bool" + } + } + ] + }, + { + "base": "Swap", + "context": "{60CBD665-AE12-50ED-A0CF-D94E77C6292C}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Swap" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Swap is invoked" + }, + "details": { + "name": "Swap" + }, + "params": [ + { + "typeid": "{60CBD665-AE12-50ED-A0CF-D94E77C6292C}", + "details": { + "name": "AZStd::unordered_map" + } + }, + { + "typeid": "{60CBD665-AE12-50ED-A0CF-D94E77C6292C}", + "details": { + "name": "AZStd::unordered_map" + } + } + ] + } + ] + }, + { + "base": "{403A7CFE-B218-5D57-8540-BD58E734BCFE}", + "context": "OnDemandReflected", + "variant": "", + "details": { + "name": "Asset" + }, + "methods": [ + { + "base": "IsLoading", + "context": "{403A7CFE-B218-5D57-8540-BD58E734BCFE}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke IsLoading" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after IsLoading is invoked" + }, + "details": { + "name": "IsLoading" + }, + "params": [ + { + "typeid": "{403A7CFE-B218-5D57-8540-BD58E734BCFE}", + "details": { + "name": "Asset" + } + } + ], + "results": [ + { + "typeid": "{A0CA880C-AFE4-43CB-926C-59AC48496112}", + "details": { + "name": "bool" + } + } + ] + }, + { + "base": "GetType", + "context": "{403A7CFE-B218-5D57-8540-BD58E734BCFE}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke GetType" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after GetType is invoked" + }, + "details": { + "name": "GetType" + }, + "params": [ + { + "typeid": "{403A7CFE-B218-5D57-8540-BD58E734BCFE}", + "details": { + "name": "Asset" + } + } + ], + "results": [ + { + "typeid": "{E152C105-A133-4D03-BBF8-3D4B2FBA3E2A}", + "details": { + "name": "AZ::Uuid" + } + } + ] + }, + { + "base": "IsError", + "context": "{403A7CFE-B218-5D57-8540-BD58E734BCFE}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke IsError" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after IsError is invoked" + }, + "details": { + "name": "IsError" + }, + "params": [ + { + "typeid": "{403A7CFE-B218-5D57-8540-BD58E734BCFE}", + "details": { + "name": "Asset" + } + } + ], + "results": [ + { + "typeid": "{A0CA880C-AFE4-43CB-926C-59AC48496112}", + "details": { + "name": "bool" + } + } + ] + }, + { + "base": "GetHint", + "context": "{403A7CFE-B218-5D57-8540-BD58E734BCFE}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke GetHint" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after GetHint is invoked" + }, + "details": { + "name": "GetHint" + }, + "params": [ + { + "typeid": "{403A7CFE-B218-5D57-8540-BD58E734BCFE}", + "details": { + "name": "Asset" + } + } + ], + "results": [ + { + "typeid": "{03AAAB3F-5C47-5A66-9EBC-D5FA4DB353C9}", + "details": { + "name": "AZStd::string" + } + } + ] + }, + { + "base": "GetData", + "context": "{403A7CFE-B218-5D57-8540-BD58E734BCFE}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke GetData" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after GetData is invoked" + }, + "details": { + "name": "GetData" + }, + "params": [ + { + "typeid": "{403A7CFE-B218-5D57-8540-BD58E734BCFE}", + "details": { + "name": "Asset" + } + } + ], + "results": [ + { + "typeid": "{AF3F7D32-1536-422A-89F3-A11E1F5B5A9C}", + "details": { + "name": "AssetData" + } + } + ] + }, + { + "base": "IsReady", + "context": "{403A7CFE-B218-5D57-8540-BD58E734BCFE}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke IsReady" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after IsReady is invoked" + }, + "details": { + "name": "IsReady" + }, + "params": [ + { + "typeid": "{403A7CFE-B218-5D57-8540-BD58E734BCFE}", + "details": { + "name": "Asset" + } + } + ], + "results": [ + { + "typeid": "{A0CA880C-AFE4-43CB-926C-59AC48496112}", + "details": { + "name": "bool" + } + } + ] + }, + { + "base": "GetStatus", + "context": "{403A7CFE-B218-5D57-8540-BD58E734BCFE}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke GetStatus" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after GetStatus is invoked" + }, + "details": { + "name": "GetStatus" + }, + "params": [ + { + "typeid": "{403A7CFE-B218-5D57-8540-BD58E734BCFE}", + "details": { + "name": "Asset" + } + } + ], + "results": [ + { + "typeid": "{72039442-EB38-4D42-A1AD-CB68F7E0EEF6}", + "details": { + "name": "int" + } + } + ] + }, + { + "base": "GetId", + "context": "{403A7CFE-B218-5D57-8540-BD58E734BCFE}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke GetId" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after GetId is invoked" + }, + "details": { + "name": "GetId" + }, + "params": [ + { + "typeid": "{403A7CFE-B218-5D57-8540-BD58E734BCFE}", + "details": { + "name": "Asset" + } + } + ], + "results": [ + { + "typeid": "{652ED536-3402-439B-AEBE-4A5DBC554085}", + "details": { + "name": "AssetId" + } + } + ] + } + ] + }, + { + "base": "{2D49E44A-E561-5108-B585-5392D40F9949}", + "context": "OnDemandReflected", + "variant": "", + "details": { + "name": "Map", + "category": "Map", + "tooltip": "A collection of Key/Value pairs, where each Key value must be unique." + }, + "methods": [ + { + "base": "contains", + "context": "{2D49E44A-E561-5108-B585-5392D40F9949}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke contains" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after contains is invoked" + }, + "details": { + "name": "contains" + }, + "params": [ + { + "typeid": "{2D49E44A-E561-5108-B585-5392D40F9949}", + "details": { + "name": "AZStd::unordered_map" + } + }, + { + "typeid": "{6383F1D3-BB27-4E6B-A49A-6409B2059EAA}", + "details": { + "name": "EntityId", + "tooltip": "Entity Unique Id" + } + } + ], + "results": [ + { + "typeid": "{A0CA880C-AFE4-43CB-926C-59AC48496112}", + "details": { + "name": "bool" + } + } + ] + }, + { + "base": "Insert", + "context": "{2D49E44A-E561-5108-B585-5392D40F9949}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Insert" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Insert is invoked" + }, + "details": { + "name": "Insert" + }, + "params": [ + { + "typeid": "{2D49E44A-E561-5108-B585-5392D40F9949}", + "details": { + "name": "AZStd::unordered_map" + } + }, + { + "typeid": "{6383F1D3-BB27-4E6B-A49A-6409B2059EAA}", + "details": { + "name": "EntityId", + "tooltip": "Entity Unique Id" + } + }, + { + "typeid": "{5D9958E9-9F1E-4985-B532-FFFDE75FEDFD}", + "details": { + "name": "Transform" + } + } + ], + "results": [ + { + "typeid": "{2D49E44A-E561-5108-B585-5392D40F9949}", + "details": { + "name": "AZStd::unordered_map" + } + } + ] + }, + { + "base": "Reserve", + "context": "{2D49E44A-E561-5108-B585-5392D40F9949}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Reserve" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Reserve is invoked" + }, + "details": { + "name": "Reserve" + }, + "params": [ + { + "typeid": "{2D49E44A-E561-5108-B585-5392D40F9949}", + "details": { + "name": "AZStd::unordered_map" + } + }, + { + "typeid": "{D6597933-47CD-4FC8-B911-63F3E2B0993A}", + "details": { + "name": "AZ::u64" + } + } + ] + }, + { + "base": "GetSize", + "context": "{2D49E44A-E561-5108-B585-5392D40F9949}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke GetSize" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after GetSize is invoked" + }, + "details": { + "name": "GetSize" + }, + "params": [ + { + "typeid": "{2D49E44A-E561-5108-B585-5392D40F9949}", + "details": { + "name": "AZStd::unordered_map" + } + } + ], + "results": [ + { + "typeid": "{72039442-EB38-4D42-A1AD-CB68F7E0EEF6}", + "details": { + "name": "int" + } + } + ] + }, + { + "base": "Iterate_VM", + "context": "{2D49E44A-E561-5108-B585-5392D40F9949}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Iterate_VM" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Iterate_VM is invoked" + }, + "details": { + "name": "Iterate_VM" + }, + "params": [ + { + "typeid": "{2D49E44A-E561-5108-B585-5392D40F9949}", + "details": { + "name": "AZStd::unordered_map" + } + } + ], + "results": [ + { + "typeid": "{3966F85B-7AF7-5622-98D6-BBEFA97E39BF}", + "details": { + "name": "Iterator_VM, AZStd::equal_to, allocator>>" + } + } + ] + }, + { + "base": "GetKeys", + "context": "{2D49E44A-E561-5108-B585-5392D40F9949}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke GetKeys" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after GetKeys is invoked" + }, + "details": { + "name": "GetKeys" + }, + "params": [ + { + "typeid": "{2D49E44A-E561-5108-B585-5392D40F9949}", + "details": { + "name": "AZStd::unordered_map" + } + } + ], + "results": [ + { + "typeid": "{4841CFF0-7A5C-519C-BD16-D3625E99605E}", + "details": { + "name": "AZStd::vector" + } + } + ] + }, + { + "base": "Size", + "context": "{2D49E44A-E561-5108-B585-5392D40F9949}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Size" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Size is invoked" + }, + "details": { + "name": "Size" + }, + "params": [ + { + "typeid": "{2D49E44A-E561-5108-B585-5392D40F9949}", + "details": { + "name": "AZStd::unordered_map" + } + } + ], + "results": [ + { + "typeid": "{72039442-EB38-4D42-A1AD-CB68F7E0EEF6}", + "details": { + "name": "int" + } + } + ] + }, + { + "base": "Erase", + "context": "{2D49E44A-E561-5108-B585-5392D40F9949}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Erase" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Erase is invoked" + }, + "details": { + "name": "Erase" + }, + "params": [ + { + "typeid": "{2D49E44A-E561-5108-B585-5392D40F9949}", + "details": { + "name": "AZStd::unordered_map" + } + }, + { + "typeid": "{6383F1D3-BB27-4E6B-A49A-6409B2059EAA}", + "details": { + "name": "EntityId", + "tooltip": "Entity Unique Id" + } + } + ], + "results": [ + { + "typeid": "{2D49E44A-E561-5108-B585-5392D40F9949}", + "details": { + "name": "AZStd::unordered_map" + } + } + ] + }, + { + "base": "EraseCheck_VM", + "context": "{2D49E44A-E561-5108-B585-5392D40F9949}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke EraseCheck_VM" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after EraseCheck_VM is invoked" + }, + "details": { + "name": "EraseCheck_VM" + }, + "params": [ + { + "typeid": "{2D49E44A-E561-5108-B585-5392D40F9949}", + "details": { + "name": "AZStd::unordered_map" + } + }, + { + "typeid": "{6383F1D3-BB27-4E6B-A49A-6409B2059EAA}", + "details": { + "name": "EntityId", + "tooltip": "Entity Unique Id" + } + } + ], + "results": [ + { + "typeid": "{A0CA880C-AFE4-43CB-926C-59AC48496112}", + "details": { + "name": "bool" + } + } + ] + }, + { + "base": "Clear", + "context": "{2D49E44A-E561-5108-B585-5392D40F9949}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Clear" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Clear is invoked" + }, + "details": { + "name": "Clear" + }, + "params": [ + { + "typeid": "{2D49E44A-E561-5108-B585-5392D40F9949}", + "details": { + "name": "AZStd::unordered_map" + } + } + ], + "results": [ + { + "typeid": "{2D49E44A-E561-5108-B585-5392D40F9949}", + "details": { + "name": "AZStd::unordered_map" + } + } + ] + }, + { + "base": "At", + "context": "{2D49E44A-E561-5108-B585-5392D40F9949}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke At" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after At is invoked" + }, + "details": { + "name": "At" + }, + "params": [ + { + "typeid": "{2D49E44A-E561-5108-B585-5392D40F9949}", + "details": { + "name": "AZStd::unordered_map" + } + }, + { + "typeid": "{6383F1D3-BB27-4E6B-A49A-6409B2059EAA}", + "details": { + "name": "EntityId", + "tooltip": "Entity Unique Id" + } + } + ], + "results": [ + { + "typeid": "{5D9958E9-9F1E-4985-B532-FFFDE75FEDFD}", + "details": { + "name": "Transform" + } + } + ] + }, + { + "base": "BucketCount", + "context": "{2D49E44A-E561-5108-B585-5392D40F9949}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke BucketCount" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after BucketCount is invoked" + }, + "details": { + "name": "BucketCount" + }, + "params": [ + { + "typeid": "{2D49E44A-E561-5108-B585-5392D40F9949}", + "details": { + "name": "AZStd::unordered_map" + } + } + ], + "results": [ + { + "typeid": "{D6597933-47CD-4FC8-B911-63F3E2B0993A}", + "details": { + "name": "AZ::u64" + } + } + ] + }, + { + "base": "Empty", + "context": "{2D49E44A-E561-5108-B585-5392D40F9949}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Empty" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Empty is invoked" + }, + "details": { + "name": "Empty" + }, + "params": [ + { + "typeid": "{2D49E44A-E561-5108-B585-5392D40F9949}", + "details": { + "name": "AZStd::unordered_map" + } + } + ], + "results": [ + { + "typeid": "{A0CA880C-AFE4-43CB-926C-59AC48496112}", + "details": { + "name": "bool" + } + } + ] + }, + { + "base": "Swap", + "context": "{2D49E44A-E561-5108-B585-5392D40F9949}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Swap" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Swap is invoked" + }, + "details": { + "name": "Swap" + }, + "params": [ + { + "typeid": "{2D49E44A-E561-5108-B585-5392D40F9949}", + "details": { + "name": "AZStd::unordered_map" + } + }, + { + "typeid": "{2D49E44A-E561-5108-B585-5392D40F9949}", + "details": { + "name": "AZStd::unordered_map" + } + } + ] + } + ] + }, + { + "base": "{32EC831B-8AE7-5715-998B-C0C723CB61DA}", + "context": "OnDemandReflected", + "variant": "", + "details": { + "name": "Set", + "category": "Set", + "tooltip": "A dynamically sized container, where each element is unique." + }, + "methods": [ + { + "base": "Size", + "context": "{32EC831B-8AE7-5715-998B-C0C723CB61DA}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Size" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Size is invoked" + }, + "details": { + "name": "Size" + }, + "params": [ + { + "typeid": "{32EC831B-8AE7-5715-998B-C0C723CB61DA}", + "details": { + "name": "AZStd::unordered_set" + } + } + ], + "results": [ + { + "typeid": "{72039442-EB38-4D42-A1AD-CB68F7E0EEF6}", + "details": { + "name": "int" + } + } + ] + }, + { + "base": "GetKeys", + "context": "{32EC831B-8AE7-5715-998B-C0C723CB61DA}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke GetKeys" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after GetKeys is invoked" + }, + "details": { + "name": "GetKeys" + }, + "params": [ + { + "typeid": "{32EC831B-8AE7-5715-998B-C0C723CB61DA}", + "details": { + "name": "AZStd::unordered_set" + } + } + ], + "results": [ + { + "typeid": "{99DAD0BC-740E-5E82-826B-8FC7968CC02C}", + "details": { + "name": "AZStd::vector" + } + } + ] + }, + { + "base": "contains", + "context": "{32EC831B-8AE7-5715-998B-C0C723CB61DA}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke contains" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after contains is invoked" + }, + "details": { + "name": "contains" + }, + "params": [ + { + "typeid": "{32EC831B-8AE7-5715-998B-C0C723CB61DA}", + "details": { + "name": "AZStd::unordered_set" + } + }, + { + "typeid": "{03AAAB3F-5C47-5A66-9EBC-D5FA4DB353C9}", + "details": { + "name": "AZStd::string" + } + } + ], + "results": [ + { + "typeid": "{A0CA880C-AFE4-43CB-926C-59AC48496112}", + "details": { + "name": "bool" + } + } + ] + }, + { + "base": "Insert", + "context": "{32EC831B-8AE7-5715-998B-C0C723CB61DA}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Insert" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Insert is invoked" + }, + "details": { + "name": "Insert" + }, + "params": [ + { + "typeid": "{32EC831B-8AE7-5715-998B-C0C723CB61DA}", + "details": { + "name": "AZStd::unordered_set" + } + }, + { + "typeid": "{03AAAB3F-5C47-5A66-9EBC-D5FA4DB353C9}", + "details": { + "name": "AZStd::string" + } + } + ], + "results": [ + { + "typeid": "{32EC831B-8AE7-5715-998B-C0C723CB61DA}", + "details": { + "name": "AZStd::unordered_set" + } + } + ] + }, + { + "base": "GetSize", + "context": "{32EC831B-8AE7-5715-998B-C0C723CB61DA}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke GetSize" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after GetSize is invoked" + }, + "details": { + "name": "GetSize" + }, + "params": [ + { + "typeid": "{32EC831B-8AE7-5715-998B-C0C723CB61DA}", + "details": { + "name": "AZStd::unordered_set" + } + } + ], + "results": [ + { + "typeid": "{72039442-EB38-4D42-A1AD-CB68F7E0EEF6}", + "details": { + "name": "int" + } + } + ] + }, + { + "base": "Reserve", + "context": "{32EC831B-8AE7-5715-998B-C0C723CB61DA}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Reserve" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Reserve is invoked" + }, + "details": { + "name": "Reserve" + }, + "params": [ + { + "typeid": "{32EC831B-8AE7-5715-998B-C0C723CB61DA}", + "details": { + "name": "AZStd::unordered_set" + } + }, + { + "typeid": "{D6597933-47CD-4FC8-B911-63F3E2B0993A}", + "details": { + "name": "AZ::u64" + } + } + ] + }, + { + "base": "Iterate_VM", + "context": "{32EC831B-8AE7-5715-998B-C0C723CB61DA}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Iterate_VM" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Iterate_VM is invoked" + }, + "details": { + "name": "Iterate_VM" + }, + "params": [ + { + "typeid": "{32EC831B-8AE7-5715-998B-C0C723CB61DA}", + "details": { + "name": "AZStd::unordered_set" + } + } + ], + "results": [ + { + "typeid": "{931B4926-886E-5BB7-A09A-B7D532F9DAAA}", + "details": { + "name": "Iterator_VM, allocator>, AZStd::hash", + "category": "Map", + "tooltip": "A collection of Key/Value pairs, where each Key value must be unique." + }, + "methods": [ + { + "base": "contains", + "context": "{AD341397-E3C6-5C5F-92D6-EEAAA134FF68}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke contains" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after contains is invoked" + }, + "details": { + "name": "contains" + }, + "params": [ + { + "typeid": "{AD341397-E3C6-5C5F-92D6-EEAAA134FF68}", + "details": { + "name": "AZStd::unordered_map" + } + }, + { + "typeid": "{A0CA880C-AFE4-43CB-926C-59AC48496112}", + "details": { + "name": "bool" + } + } + ], + "results": [ + { + "typeid": "{A0CA880C-AFE4-43CB-926C-59AC48496112}", + "details": { + "name": "bool" + } + } + ] + }, + { + "base": "Insert", + "context": "{AD341397-E3C6-5C5F-92D6-EEAAA134FF68}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Insert" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Insert is invoked" + }, + "details": { + "name": "Insert" + }, + "params": [ + { + "typeid": "{AD341397-E3C6-5C5F-92D6-EEAAA134FF68}", + "details": { + "name": "AZStd::unordered_map" + } + }, + { + "typeid": "{A0CA880C-AFE4-43CB-926C-59AC48496112}", + "details": { + "name": "bool" + } + }, + { + "typeid": "{A54C2B36-D5B8-46A1-A529-4EBDBD2450E7}", + "details": { + "name": "Aabb" + } + } + ], + "results": [ + { + "typeid": "{AD341397-E3C6-5C5F-92D6-EEAAA134FF68}", + "details": { + "name": "AZStd::unordered_map" + } + } + ] + }, + { + "base": "Reserve", + "context": "{AD341397-E3C6-5C5F-92D6-EEAAA134FF68}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Reserve" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Reserve is invoked" + }, + "details": { + "name": "Reserve" + }, + "params": [ + { + "typeid": "{AD341397-E3C6-5C5F-92D6-EEAAA134FF68}", + "details": { + "name": "AZStd::unordered_map" + } + }, + { + "typeid": "{D6597933-47CD-4FC8-B911-63F3E2B0993A}", + "details": { + "name": "AZ::u64" + } + } + ] + }, + { + "base": "GetSize", + "context": "{AD341397-E3C6-5C5F-92D6-EEAAA134FF68}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke GetSize" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after GetSize is invoked" + }, + "details": { + "name": "GetSize" + }, + "params": [ + { + "typeid": "{AD341397-E3C6-5C5F-92D6-EEAAA134FF68}", + "details": { + "name": "AZStd::unordered_map" + } + } + ], + "results": [ + { + "typeid": "{72039442-EB38-4D42-A1AD-CB68F7E0EEF6}", + "details": { + "name": "int" + } + } + ] + }, + { + "base": "Iterate_VM", + "context": "{AD341397-E3C6-5C5F-92D6-EEAAA134FF68}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Iterate_VM" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Iterate_VM is invoked" + }, + "details": { + "name": "Iterate_VM" + }, + "params": [ + { + "typeid": "{AD341397-E3C6-5C5F-92D6-EEAAA134FF68}", + "details": { + "name": "AZStd::unordered_map" + } + } + ], + "results": [ + { + "typeid": "{03427020-0827-58FD-B9E7-1F885F682E45}", + "details": { + "name": "Iterator_VM, AZStd::equal_to, allocator>>" + } + } + ] + }, + { + "base": "GetKeys", + "context": "{AD341397-E3C6-5C5F-92D6-EEAAA134FF68}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke GetKeys" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after GetKeys is invoked" + }, + "details": { + "name": "GetKeys" + }, + "params": [ + { + "typeid": "{AD341397-E3C6-5C5F-92D6-EEAAA134FF68}", + "details": { + "name": "AZStd::unordered_map" + } + } + ], + "results": [ + { + "typeid": "{B505B05D-57BF-5A45-9113-B3A2784E2CD7}", + "details": { + "name": "AZStd::vector" + } + } + ] + }, + { + "base": "Size", + "context": "{AD341397-E3C6-5C5F-92D6-EEAAA134FF68}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Size" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Size is invoked" + }, + "details": { + "name": "Size" + }, + "params": [ + { + "typeid": "{AD341397-E3C6-5C5F-92D6-EEAAA134FF68}", + "details": { + "name": "AZStd::unordered_map" + } + } + ], + "results": [ + { + "typeid": "{72039442-EB38-4D42-A1AD-CB68F7E0EEF6}", + "details": { + "name": "int" + } + } + ] + }, + { + "base": "Erase", + "context": "{AD341397-E3C6-5C5F-92D6-EEAAA134FF68}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Erase" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Erase is invoked" + }, + "details": { + "name": "Erase" + }, + "params": [ + { + "typeid": "{AD341397-E3C6-5C5F-92D6-EEAAA134FF68}", + "details": { + "name": "AZStd::unordered_map" + } + }, + { + "typeid": "{A0CA880C-AFE4-43CB-926C-59AC48496112}", + "details": { + "name": "bool" + } + } + ], + "results": [ + { + "typeid": "{AD341397-E3C6-5C5F-92D6-EEAAA134FF68}", + "details": { + "name": "AZStd::unordered_map" + } + } + ] + }, + { + "base": "EraseCheck_VM", + "context": "{AD341397-E3C6-5C5F-92D6-EEAAA134FF68}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke EraseCheck_VM" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after EraseCheck_VM is invoked" + }, + "details": { + "name": "EraseCheck_VM" + }, + "params": [ + { + "typeid": "{AD341397-E3C6-5C5F-92D6-EEAAA134FF68}", + "details": { + "name": "AZStd::unordered_map" + } + }, + { + "typeid": "{A0CA880C-AFE4-43CB-926C-59AC48496112}", + "details": { + "name": "bool" + } + } + ], + "results": [ + { + "typeid": "{A0CA880C-AFE4-43CB-926C-59AC48496112}", + "details": { + "name": "bool" + } + } + ] + }, + { + "base": "Clear", + "context": "{AD341397-E3C6-5C5F-92D6-EEAAA134FF68}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Clear" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Clear is invoked" + }, + "details": { + "name": "Clear" + }, + "params": [ + { + "typeid": "{AD341397-E3C6-5C5F-92D6-EEAAA134FF68}", + "details": { + "name": "AZStd::unordered_map" + } + } + ], + "results": [ + { + "typeid": "{AD341397-E3C6-5C5F-92D6-EEAAA134FF68}", + "details": { + "name": "AZStd::unordered_map" + } + } + ] + }, + { + "base": "At", + "context": "{AD341397-E3C6-5C5F-92D6-EEAAA134FF68}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke At" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after At is invoked" + }, + "details": { + "name": "At" + }, + "params": [ + { + "typeid": "{AD341397-E3C6-5C5F-92D6-EEAAA134FF68}", + "details": { + "name": "AZStd::unordered_map" + } + }, + { + "typeid": "{A0CA880C-AFE4-43CB-926C-59AC48496112}", + "details": { + "name": "bool" + } + } + ], + "results": [ + { + "typeid": "{A54C2B36-D5B8-46A1-A529-4EBDBD2450E7}", + "details": { + "name": "Aabb" + } + } + ] + }, + { + "base": "BucketCount", + "context": "{AD341397-E3C6-5C5F-92D6-EEAAA134FF68}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke BucketCount" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after BucketCount is invoked" + }, + "details": { + "name": "BucketCount" + }, + "params": [ + { + "typeid": "{AD341397-E3C6-5C5F-92D6-EEAAA134FF68}", + "details": { + "name": "AZStd::unordered_map" + } + } + ], + "results": [ + { + "typeid": "{D6597933-47CD-4FC8-B911-63F3E2B0993A}", + "details": { + "name": "AZ::u64" + } + } + ] + }, + { + "base": "Empty", + "context": "{AD341397-E3C6-5C5F-92D6-EEAAA134FF68}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Empty" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Empty is invoked" + }, + "details": { + "name": "Empty" + }, + "params": [ + { + "typeid": "{AD341397-E3C6-5C5F-92D6-EEAAA134FF68}", + "details": { + "name": "AZStd::unordered_map" + } + } + ], + "results": [ + { + "typeid": "{A0CA880C-AFE4-43CB-926C-59AC48496112}", + "details": { + "name": "bool" + } + } + ] + }, + { + "base": "Swap", + "context": "{AD341397-E3C6-5C5F-92D6-EEAAA134FF68}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Swap" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Swap is invoked" + }, + "details": { + "name": "Swap" + }, + "params": [ + { + "typeid": "{AD341397-E3C6-5C5F-92D6-EEAAA134FF68}", + "details": { + "name": "AZStd::unordered_map" + } + }, + { + "typeid": "{AD341397-E3C6-5C5F-92D6-EEAAA134FF68}", + "details": { + "name": "AZStd::unordered_map" + } + } + ] + } + ] + }, + { + "base": "{43147344-44F8-597D-9F8C-B97DFC20C337}", + "context": "OnDemandReflected", + "variant": "", + "details": { + "name": "Array", + "category": "Array", + "tooltip": "A dynamically sized container of elements." + }, + "methods": [ + { + "base": "Size", + "context": "{43147344-44F8-597D-9F8C-B97DFC20C337}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Size" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Size is invoked" + }, + "details": { + "name": "Size" + }, + "params": [ + { + "typeid": "{43147344-44F8-597D-9F8C-B97DFC20C337}", + "details": { + "name": "AZStd::vector" + } + } + ], + "results": [ + { + "typeid": "{72039442-EB38-4D42-A1AD-CB68F7E0EEF6}", + "details": { + "name": "int" + } + } + ] + }, + { + "base": "Front", + "context": "{43147344-44F8-597D-9F8C-B97DFC20C337}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Front" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Front is invoked" + }, + "details": { + "name": "Front" + }, + "params": [ + { + "typeid": "{43147344-44F8-597D-9F8C-B97DFC20C337}", + "details": { + "name": "AZStd::vector" + } + } + ], + "results": [ + { + "typeid": "{C845E5EC-5580-4E12-A9B2-9AE7E5B7826F}", + "details": { + "name": "EntityComponentIdPair" + } + } + ] + }, + { + "base": "HasKey", + "context": "{43147344-44F8-597D-9F8C-B97DFC20C337}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Has Key" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Has Key is invoked" + }, + "details": { + "name": "Has Key" + }, + "params": [ + { + "typeid": "{43147344-44F8-597D-9F8C-B97DFC20C337}", + "details": { + "name": "AZStd::vector" + } + }, + { + "typeid": "{D6597933-47CD-4FC8-B911-63F3E2B0993A}", + "details": { + "name": "AZ::u64" + } + } + ], + "results": [ + { + "typeid": "{A0CA880C-AFE4-43CB-926C-59AC48496112}", + "details": { + "name": "bool" + } + } + ] + }, + { + "base": "Resize", + "context": "{43147344-44F8-597D-9F8C-B97DFC20C337}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Resize" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Resize is invoked" + }, + "details": { + "name": "Resize" + }, + "params": [ + { + "typeid": "{43147344-44F8-597D-9F8C-B97DFC20C337}", + "details": { + "name": "AZStd::vector" + } + }, + { + "typeid": "{D6597933-47CD-4FC8-B911-63F3E2B0993A}", + "details": { + "name": "AZ::u64" + } + } + ] + }, + { + "base": "at", + "context": "{43147344-44F8-597D-9F8C-B97DFC20C337}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke at" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after at is invoked" + }, + "details": { + "name": "at" + }, + "params": [ + { + "typeid": "{43147344-44F8-597D-9F8C-B97DFC20C337}", + "details": { + "name": "AZStd::vector" + } + }, + { + "typeid": "{D6597933-47CD-4FC8-B911-63F3E2B0993A}", + "details": { + "name": "AZ::u64" + } + } + ], + "results": [ + { + "typeid": "{C845E5EC-5580-4E12-A9B2-9AE7E5B7826F}", + "details": { + "name": "EntityComponentIdPair" + } + } + ] + }, + { + "base": "Back", + "context": "{43147344-44F8-597D-9F8C-B97DFC20C337}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Back" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Back is invoked" + }, + "details": { + "name": "Back" + }, + "params": [ + { + "typeid": "{43147344-44F8-597D-9F8C-B97DFC20C337}", + "details": { + "name": "AZStd::vector" + } + } + ], + "results": [ + { + "typeid": "{C845E5EC-5580-4E12-A9B2-9AE7E5B7826F}", + "details": { + "name": "EntityComponentIdPair" + } + } + ] + }, + { + "base": "pop_back", + "context": "{43147344-44F8-597D-9F8C-B97DFC20C337}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke pop_back" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after pop_back is invoked" + }, + "details": { + "name": "pop_back" + }, + "params": [ + { + "typeid": "{43147344-44F8-597D-9F8C-B97DFC20C337}", + "details": { + "name": "AZStd::vector" + } + } + ] + }, + { + "base": "size", + "context": "{43147344-44F8-597D-9F8C-B97DFC20C337}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke size" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after size is invoked" + }, + "details": { + "name": "size" + }, + "params": [ + { + "typeid": "{43147344-44F8-597D-9F8C-B97DFC20C337}", + "details": { + "name": "AZStd::vector" + } + } + ], + "results": [ + { + "typeid": "{72039442-EB38-4D42-A1AD-CB68F7E0EEF6}", + "details": { + "name": "int" + } + } + ] + }, + { + "base": "At", + "context": "{43147344-44F8-597D-9F8C-B97DFC20C337}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke At" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after At is invoked" + }, + "details": { + "name": "At" + }, + "params": [ + { + "typeid": "{43147344-44F8-597D-9F8C-B97DFC20C337}", + "details": { + "name": "AZStd::vector" + } + }, + { + "typeid": "{D6597933-47CD-4FC8-B911-63F3E2B0993A}", + "details": { + "name": "AZ::u64" + } + } + ], + "results": [ + { + "typeid": "{C845E5EC-5580-4E12-A9B2-9AE7E5B7826F}", + "details": { + "name": "EntityComponentIdPair" + } + } + ] + }, + { + "base": "Empty", + "context": "{43147344-44F8-597D-9F8C-B97DFC20C337}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Empty" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Empty is invoked" + }, + "details": { + "name": "Empty" + }, + "params": [ + { + "typeid": "{43147344-44F8-597D-9F8C-B97DFC20C337}", + "details": { + "name": "AZStd::vector" + } + } + ], + "results": [ + { + "typeid": "{A0CA880C-AFE4-43CB-926C-59AC48496112}", + "details": { + "name": "bool" + } + } + ] + }, + { + "base": "Swap", + "context": "{43147344-44F8-597D-9F8C-B97DFC20C337}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Swap" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Swap is invoked" + }, + "details": { + "name": "Swap" + }, + "params": [ + { + "typeid": "{43147344-44F8-597D-9F8C-B97DFC20C337}", + "details": { + "name": "AZStd::vector" + } + }, + { + "typeid": "{43147344-44F8-597D-9F8C-B97DFC20C337}", + "details": { + "name": "AZStd::vector" + } + } + ] + }, + { + "base": "push_back", + "context": "{43147344-44F8-597D-9F8C-B97DFC20C337}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke push_back" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after push_back is invoked" + }, + "details": { + "name": "push_back" + }, + "params": [ + { + "typeid": "{43147344-44F8-597D-9F8C-B97DFC20C337}", + "details": { + "name": "AZStd::vector" + } + }, + { + "typeid": "{C845E5EC-5580-4E12-A9B2-9AE7E5B7826F}", + "details": { + "name": "EntityComponentIdPair" + } + } + ] + }, + { + "base": "PushBack_VM", + "context": "{43147344-44F8-597D-9F8C-B97DFC20C337}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke PushBack_VM" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after PushBack_VM is invoked" + }, + "details": { + "name": "PushBack_VM" + }, + "params": [ + { + "typeid": "{43147344-44F8-597D-9F8C-B97DFC20C337}", + "details": { + "name": "AZStd::vector" + } + }, + { + "typeid": "{C845E5EC-5580-4E12-A9B2-9AE7E5B7826F}", + "details": { + "name": "EntityComponentIdPair" + } + } + ], + "results": [ + { + "typeid": "{43147344-44F8-597D-9F8C-B97DFC20C337}", + "details": { + "name": "AZStd::vector" + } + } + ] + }, + { + "base": "AtUnchecked", + "context": "{43147344-44F8-597D-9F8C-B97DFC20C337}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke AtUnchecked" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after AtUnchecked is invoked" + }, + "details": { + "name": "AtUnchecked" + }, + "params": [ + { + "typeid": "{43147344-44F8-597D-9F8C-B97DFC20C337}", + "details": { + "name": "AZStd::vector" + } + }, + { + "typeid": "{D6597933-47CD-4FC8-B911-63F3E2B0993A}", + "details": { + "name": "AZ::u64" + } + } + ], + "results": [ + { + "typeid": "{C845E5EC-5580-4E12-A9B2-9AE7E5B7826F}", + "details": { + "name": "EntityComponentIdPair" + } + } + ] + }, + { + "base": "clear", + "context": "{43147344-44F8-597D-9F8C-B97DFC20C337}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke clear" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after clear is invoked" + }, + "details": { + "name": "clear" + }, + "params": [ + { + "typeid": "{43147344-44F8-597D-9F8C-B97DFC20C337}", + "details": { + "name": "AZStd::vector" + } + } + ] + }, + { + "base": "NotEmpty", + "context": "{43147344-44F8-597D-9F8C-B97DFC20C337}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke NotEmpty" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after NotEmpty is invoked" + }, + "details": { + "name": "NotEmpty" + }, + "params": [ + { + "typeid": "{43147344-44F8-597D-9F8C-B97DFC20C337}", + "details": { + "name": "AZStd::vector" + } + } + ], + "results": [ + { + "typeid": "{A0CA880C-AFE4-43CB-926C-59AC48496112}", + "details": { + "name": "bool" + } + } + ] + }, + { + "base": "Erase_VM", + "context": "{43147344-44F8-597D-9F8C-B97DFC20C337}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Erase_VM" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Erase_VM is invoked" + }, + "details": { + "name": "Erase_VM" + }, + "params": [ + { + "typeid": "{43147344-44F8-597D-9F8C-B97DFC20C337}", + "details": { + "name": "AZStd::vector" + } + }, + { + "typeid": "{D6597933-47CD-4FC8-B911-63F3E2B0993A}", + "details": { + "name": "AZ::u64" + } + } + ], + "results": [ + { + "typeid": "{43147344-44F8-597D-9F8C-B97DFC20C337}", + "details": { + "name": "AZStd::vector" + } + } + ] + }, + { + "base": "EraseCheck_VM", + "context": "{43147344-44F8-597D-9F8C-B97DFC20C337}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke EraseCheck_VM" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after EraseCheck_VM is invoked" + }, + "details": { + "name": "EraseCheck_VM" + }, + "params": [ + { + "typeid": "{43147344-44F8-597D-9F8C-B97DFC20C337}", + "details": { + "name": "AZStd::vector" + } + }, + { + "typeid": "{D6597933-47CD-4FC8-B911-63F3E2B0993A}", + "details": { + "name": "AZ::u64" + } + } + ], + "results": [ + { + "typeid": "{A0CA880C-AFE4-43CB-926C-59AC48496112}", + "details": { + "name": "bool" + } + } + ] + }, + { + "base": "Capacity", + "context": "{43147344-44F8-597D-9F8C-B97DFC20C337}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Capacity" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Capacity is invoked" + }, + "details": { + "name": "Capacity" + }, + "params": [ + { + "typeid": "{43147344-44F8-597D-9F8C-B97DFC20C337}", + "details": { + "name": "AZStd::vector" + } + } + ], + "results": [ + { + "typeid": "{D6597933-47CD-4FC8-B911-63F3E2B0993A}", + "details": { + "name": "AZ::u64" + } + } + ] + }, + { + "base": "Clear", + "context": "{43147344-44F8-597D-9F8C-B97DFC20C337}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Clear" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Clear is invoked" + }, + "details": { + "name": "Clear" + }, + "params": [ + { + "typeid": "{43147344-44F8-597D-9F8C-B97DFC20C337}", + "details": { + "name": "AZStd::vector" + } + } + ], + "results": [ + { + "typeid": "{43147344-44F8-597D-9F8C-B97DFC20C337}", + "details": { + "name": "AZStd::vector" + } + } + ] + }, + { + "base": "AssignAt", + "context": "{43147344-44F8-597D-9F8C-B97DFC20C337}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke AssignAt" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after AssignAt is invoked" + }, + "details": { + "name": "AssignAt" + }, + "params": [ + { + "typeid": "{43147344-44F8-597D-9F8C-B97DFC20C337}", + "details": { + "name": "AZStd::vector" + } + }, + { + "typeid": "{D6597933-47CD-4FC8-B911-63F3E2B0993A}", + "details": { + "name": "AZ::u64" + } + }, + { + "typeid": "{C845E5EC-5580-4E12-A9B2-9AE7E5B7826F}", + "details": { + "name": "EntityComponentIdPair" + } + } + ] + }, + { + "base": "GetSize", + "context": "{43147344-44F8-597D-9F8C-B97DFC20C337}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke GetSize" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after GetSize is invoked" + }, + "details": { + "name": "GetSize" + }, + "params": [ + { + "typeid": "{43147344-44F8-597D-9F8C-B97DFC20C337}", + "details": { + "name": "AZStd::vector" + } + } + ], + "results": [ + { + "typeid": "{72039442-EB38-4D42-A1AD-CB68F7E0EEF6}", + "details": { + "name": "int" + } + } + ] + }, + { + "base": "Insert", + "context": "{43147344-44F8-597D-9F8C-B97DFC20C337}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Insert" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Insert is invoked" + }, + "details": { + "name": "Insert" + }, + "params": [ + { + "typeid": "{43147344-44F8-597D-9F8C-B97DFC20C337}", + "details": { + "name": "AZStd::vector" + } + }, + { + "typeid": "{D6597933-47CD-4FC8-B911-63F3E2B0993A}", + "details": { + "name": "AZ::u64" + } + }, + { + "typeid": "{C845E5EC-5580-4E12-A9B2-9AE7E5B7826F}", + "details": { + "name": "EntityComponentIdPair" + } + } + ], + "results": [ + { + "typeid": "{43147344-44F8-597D-9F8C-B97DFC20C337}", + "details": { + "name": "AZStd::vector" + } + } + ] + }, + { + "base": "PushBack", + "context": "{43147344-44F8-597D-9F8C-B97DFC20C337}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke PushBack" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after PushBack is invoked" + }, + "details": { + "name": "PushBack" + }, + "params": [ + { + "typeid": "{43147344-44F8-597D-9F8C-B97DFC20C337}", + "details": { + "name": "AZStd::vector" + } + }, + { + "typeid": "{C845E5EC-5580-4E12-A9B2-9AE7E5B7826F}", + "details": { + "name": "EntityComponentIdPair" + } + } + ] + }, + { + "base": "Reserve", + "context": "{43147344-44F8-597D-9F8C-B97DFC20C337}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Reserve" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Reserve is invoked" + }, + "details": { + "name": "Reserve" + }, + "params": [ + { + "typeid": "{43147344-44F8-597D-9F8C-B97DFC20C337}", + "details": { + "name": "AZStd::vector" + } + }, + { + "typeid": "{D6597933-47CD-4FC8-B911-63F3E2B0993A}", + "details": { + "name": "AZ::u64" + } + } + ] + }, + { + "base": "Iterate_VM", + "context": "{43147344-44F8-597D-9F8C-B97DFC20C337}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Iterate_VM" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Iterate_VM is invoked" + }, + "details": { + "name": "Iterate_VM" + }, + "params": [ + { + "typeid": "{43147344-44F8-597D-9F8C-B97DFC20C337}", + "details": { + "name": "AZStd::vector" + } + } + ], + "results": [ + { + "typeid": "{1378A8E9-E2C4-5831-8373-B384FEF5962F}", + "details": { + "name": "Iterator_VM>" + } + } + ] + } + ] + }, + { + "base": "{5BAFAD11-D6AF-5946-B09B-6E0B72E1209C}", + "context": "OnDemandReflected", + "variant": "", + "details": { + "name": "Tuple" + }, + "methods": [ + { + "base": "Get0", + "context": "{5BAFAD11-D6AF-5946-B09B-6E0B72E1209C}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Get0" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Get0 is invoked" + }, + "details": { + "name": "Get0" + }, + "params": [ + { + "typeid": "{5BAFAD11-D6AF-5946-B09B-6E0B72E1209C}", + "details": { + "name": "tuple" + } + } + ] + }, + { + "base": "Subtract", + "context": "{FD1BFADF-BA1F-4AFC-819B-ABA1F22AE6E6}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Subtract" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Subtract is invoked" + }, + "details": { + "name": "Subtract" + }, + "params": [ + { + "typeid": "{3D80F623-C85C-4741-90D0-E4E66164E6BF}", + "details": { + "name": "Vector2" + } + }, + { + "typeid": "{3D80F623-C85C-4741-90D0-E4E66164E6BF}", + "details": { + "name": "Vector2" + } + } + ], + "results": [ + { + "typeid": "{3D80F623-C85C-4741-90D0-E4E66164E6BF}", + "details": { + "name": "Vector2" + } + } + ] + }, + { + "base": "Project", + "context": "{FD1BFADF-BA1F-4AFC-819B-ABA1F22AE6E6}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Project" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Project is invoked" + }, + "details": { + "name": "Project" + }, + "params": [ + { + "typeid": "{3D80F623-C85C-4741-90D0-E4E66164E6BF}", + "details": { + "name": "Vector2" + } + }, + { + "typeid": "{3D80F623-C85C-4741-90D0-E4E66164E6BF}", + "details": { + "name": "Vector2" + } + } + ], + "results": [ + { + "typeid": "{3D80F623-C85C-4741-90D0-E4E66164E6BF}", + "details": { + "name": "Vector2" + } + } + ] + }, + { + "base": "Distance", + "context": "{FD1BFADF-BA1F-4AFC-819B-ABA1F22AE6E6}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Distance" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Distance is invoked" + }, + "details": { + "name": "Distance" + }, + "params": [ + { + "typeid": "{3D80F623-C85C-4741-90D0-E4E66164E6BF}", + "details": { + "name": "Vector2" + } + }, + { + "typeid": "{3D80F623-C85C-4741-90D0-E4E66164E6BF}", + "details": { + "name": "Vector2" + } + } + ], + "results": [ + { + "typeid": "{110C4B14-11A8-4E9D-8638-5051013A56AC}", + "details": { + "name": "double" + } + } + ] + }, + { + "base": "FromValues", + "context": "{FD1BFADF-BA1F-4AFC-819B-ABA1F22AE6E6}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke FromValues" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after FromValues is invoked" + }, + "details": { + "name": "FromValues" + }, + "params": [ + { + "typeid": "{110C4B14-11A8-4E9D-8638-5051013A56AC}", + "details": { + "name": "double" + } + }, + { + "typeid": "{110C4B14-11A8-4E9D-8638-5051013A56AC}", + "details": { + "name": "double" + } + } + ], + "results": [ + { + "typeid": "{3D80F623-C85C-4741-90D0-E4E66164E6BF}", + "details": { + "name": "Vector2" + } + } + ] + }, + { + "base": "Dot", + "context": "{FD1BFADF-BA1F-4AFC-819B-ABA1F22AE6E6}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Dot" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Dot is invoked" + }, + "details": { + "name": "Dot" + }, + "params": [ + { + "typeid": "{3D80F623-C85C-4741-90D0-E4E66164E6BF}", + "details": { + "name": "Vector2" + } + }, + { + "typeid": "{3D80F623-C85C-4741-90D0-E4E66164E6BF}", + "details": { + "name": "Vector2" + } + } + ], + "results": [ + { + "typeid": "{110C4B14-11A8-4E9D-8638-5051013A56AC}", + "details": { + "name": "double" + } + } + ] + }, + { + "base": "Angle", + "context": "{FD1BFADF-BA1F-4AFC-819B-ABA1F22AE6E6}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Angle" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Angle is invoked" + }, + "details": { + "name": "Angle" + }, + "params": [ + { + "typeid": "{110C4B14-11A8-4E9D-8638-5051013A56AC}", + "details": { + "name": "double" + } + } + ], + "results": [ + { + "typeid": "{3D80F623-C85C-4741-90D0-E4E66164E6BF}", + "details": { + "name": "Vector2" + } + } + ] + }, + { + "base": "Negate", + "context": "{FD1BFADF-BA1F-4AFC-819B-ABA1F22AE6E6}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Negate" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Negate is invoked" + }, + "details": { + "name": "Negate" + }, + "params": [ + { + "typeid": "{3D80F623-C85C-4741-90D0-E4E66164E6BF}", + "details": { + "name": "Vector2" + } + } + ], + "results": [ + { + "typeid": "{3D80F623-C85C-4741-90D0-E4E66164E6BF}", + "details": { + "name": "Vector2" + } + } + ] + }, + { + "base": "MultiplyByVector", + "context": "{FD1BFADF-BA1F-4AFC-819B-ABA1F22AE6E6}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke MultiplyByVector" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after MultiplyByVector is invoked" + }, + "details": { + "name": "MultiplyByVector" + }, + "params": [ + { + "typeid": "{3D80F623-C85C-4741-90D0-E4E66164E6BF}", + "details": { + "name": "Vector2" + } + }, + { + "typeid": "{3D80F623-C85C-4741-90D0-E4E66164E6BF}", + "details": { + "name": "Vector2" + } + } + ], + "results": [ + { + "typeid": "{3D80F623-C85C-4741-90D0-E4E66164E6BF}", + "details": { + "name": "Vector2" + } + } + ] + }, + { + "base": "Add", + "context": "{FD1BFADF-BA1F-4AFC-819B-ABA1F22AE6E6}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Add" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Add is invoked" + }, + "details": { + "name": "Add" + }, + "params": [ + { + "typeid": "{3D80F623-C85C-4741-90D0-E4E66164E6BF}", + "details": { + "name": "Vector2" + } + }, + { + "typeid": "{3D80F623-C85C-4741-90D0-E4E66164E6BF}", + "details": { + "name": "Vector2" + } + } + ], + "results": [ + { + "typeid": "{3D80F623-C85C-4741-90D0-E4E66164E6BF}", + "details": { + "name": "Vector2" + } + } + ] + }, + { + "base": "Clamp", + "context": "{FD1BFADF-BA1F-4AFC-819B-ABA1F22AE6E6}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Clamp" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Clamp is invoked" + }, + "details": { + "name": "Clamp" + }, + "params": [ + { + "typeid": "{3D80F623-C85C-4741-90D0-E4E66164E6BF}", + "details": { + "name": "Vector2" + } + }, + { + "typeid": "{3D80F623-C85C-4741-90D0-E4E66164E6BF}", + "details": { + "name": "Vector2" + } + }, + { + "typeid": "{3D80F623-C85C-4741-90D0-E4E66164E6BF}", + "details": { + "name": "Vector2" + } + } + ], + "results": [ + { + "typeid": "{3D80F623-C85C-4741-90D0-E4E66164E6BF}", + "details": { + "name": "Vector2" + } + } + ] + }, + { + "base": "MultiplyByNumber", + "context": "{FD1BFADF-BA1F-4AFC-819B-ABA1F22AE6E6}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke MultiplyByNumber" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after MultiplyByNumber is invoked" + }, + "details": { + "name": "MultiplyByNumber" + }, + "params": [ + { + "typeid": "{3D80F623-C85C-4741-90D0-E4E66164E6BF}", + "details": { + "name": "Vector2" + } + }, + { + "typeid": "{110C4B14-11A8-4E9D-8638-5051013A56AC}", + "details": { + "name": "double" + } + } + ], + "results": [ + { + "typeid": "{3D80F623-C85C-4741-90D0-E4E66164E6BF}", + "details": { + "name": "Vector2" + } + } + ] + }, + { + "base": "Slerp", + "context": "{FD1BFADF-BA1F-4AFC-819B-ABA1F22AE6E6}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Slerp" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Slerp is invoked" + }, + "details": { + "name": "Slerp" + }, + "params": [ + { + "typeid": "{3D80F623-C85C-4741-90D0-E4E66164E6BF}", + "details": { + "name": "Vector2" + } + }, + { + "typeid": "{3D80F623-C85C-4741-90D0-E4E66164E6BF}", + "details": { + "name": "Vector2" + } + }, + { + "typeid": "{110C4B14-11A8-4E9D-8638-5051013A56AC}", + "details": { + "name": "double" + } + } + ], + "results": [ + { + "typeid": "{3D80F623-C85C-4741-90D0-E4E66164E6BF}", + "details": { + "name": "Vector2" + } + } + ] + }, + { + "base": "IsZero", + "context": "{FD1BFADF-BA1F-4AFC-819B-ABA1F22AE6E6}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke IsZero" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after IsZero is invoked" + }, + "details": { + "name": "IsZero" + }, + "params": [ + { + "typeid": "{3D80F623-C85C-4741-90D0-E4E66164E6BF}", + "details": { + "name": "Vector2" + } + }, + { + "typeid": "{110C4B14-11A8-4E9D-8638-5051013A56AC}", + "details": { + "name": "double" + } + } + ], + "results": [ + { + "typeid": "{A0CA880C-AFE4-43CB-926C-59AC48496112}", + "details": { + "name": "bool" + } + } + ] + }, + { + "base": "SetY", + "context": "{FD1BFADF-BA1F-4AFC-819B-ABA1F22AE6E6}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke SetY" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after SetY is invoked" + }, + "details": { + "name": "SetY" + }, + "params": [ + { + "typeid": "{3D80F623-C85C-4741-90D0-E4E66164E6BF}", + "details": { + "name": "Vector2" + } + }, + { + "typeid": "{110C4B14-11A8-4E9D-8638-5051013A56AC}", + "details": { + "name": "double" + } + } + ], + "results": [ + { + "typeid": "{3D80F623-C85C-4741-90D0-E4E66164E6BF}", + "details": { + "name": "Vector2" + } + } + ] + }, + { + "base": "IsClose", + "context": "{FD1BFADF-BA1F-4AFC-819B-ABA1F22AE6E6}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke IsClose" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after IsClose is invoked" + }, + "details": { + "name": "IsClose" + }, + "params": [ + { + "typeid": "{3D80F623-C85C-4741-90D0-E4E66164E6BF}", + "details": { + "name": "Vector2" + } + }, + { + "typeid": "{3D80F623-C85C-4741-90D0-E4E66164E6BF}", + "details": { + "name": "Vector2" + } + }, + { + "typeid": "{110C4B14-11A8-4E9D-8638-5051013A56AC}", + "details": { + "name": "double" + } + } + ], + "results": [ + { + "typeid": "{A0CA880C-AFE4-43CB-926C-59AC48496112}", + "details": { + "name": "bool" + } + } + ] + }, + { + "base": "DivideByNumber", + "context": "{FD1BFADF-BA1F-4AFC-819B-ABA1F22AE6E6}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke DivideByNumber" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after DivideByNumber is invoked" + }, + "details": { + "name": "DivideByNumber" + }, + "params": [ + { + "typeid": "{3D80F623-C85C-4741-90D0-E4E66164E6BF}", + "details": { + "name": "Vector2" + } + }, + { + "typeid": "{110C4B14-11A8-4E9D-8638-5051013A56AC}", + "details": { + "name": "double" + } + } + ], + "results": [ + { + "typeid": "{3D80F623-C85C-4741-90D0-E4E66164E6BF}", + "details": { + "name": "Vector2" + } + } + ] + }, + { + "base": "IsNormalized", + "context": "{FD1BFADF-BA1F-4AFC-819B-ABA1F22AE6E6}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke IsNormalized" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after IsNormalized is invoked" + }, + "details": { + "name": "IsNormalized" + }, + "params": [ + { + "typeid": "{3D80F623-C85C-4741-90D0-E4E66164E6BF}", + "details": { + "name": "Vector2" + } + }, + { + "typeid": "{110C4B14-11A8-4E9D-8638-5051013A56AC}", + "details": { + "name": "double" + } + } + ], + "results": [ + { + "typeid": "{A0CA880C-AFE4-43CB-926C-59AC48496112}", + "details": { + "name": "bool" + } + } + ] + }, + { + "base": "LengthSquared", + "context": "{FD1BFADF-BA1F-4AFC-819B-ABA1F22AE6E6}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke LengthSquared" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after LengthSquared is invoked" + }, + "details": { + "name": "LengthSquared" + }, + "params": [ + { + "typeid": "{3D80F623-C85C-4741-90D0-E4E66164E6BF}", + "details": { + "name": "Vector2" + } + } + ], + "results": [ + { + "typeid": "{110C4B14-11A8-4E9D-8638-5051013A56AC}", + "details": { + "name": "double" + } + } + ] + }, + { + "base": "IsFinite", + "context": "{FD1BFADF-BA1F-4AFC-819B-ABA1F22AE6E6}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke IsFinite" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after IsFinite is invoked" + }, + "details": { + "name": "IsFinite" + }, + "params": [ + { + "typeid": "{3D80F623-C85C-4741-90D0-E4E66164E6BF}", + "details": { + "name": "Vector2" + } + } + ], + "results": [ + { + "typeid": "{A0CA880C-AFE4-43CB-926C-59AC48496112}", + "details": { + "name": "bool" + } + } + ] + }, + { + "base": "ToPerpendicular", + "context": "{FD1BFADF-BA1F-4AFC-819B-ABA1F22AE6E6}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke ToPerpendicular" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after ToPerpendicular is invoked" + }, + "details": { + "name": "ToPerpendicular" + }, + "params": [ + { + "typeid": "{3D80F623-C85C-4741-90D0-E4E66164E6BF}", + "details": { + "name": "Vector2" + } + } + ], + "results": [ + { + "typeid": "{3D80F623-C85C-4741-90D0-E4E66164E6BF}", + "details": { + "name": "Vector2" + } + } + ] + }, + { + "base": "Normalize", + "context": "{FD1BFADF-BA1F-4AFC-819B-ABA1F22AE6E6}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Normalize" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Normalize is invoked" + }, + "details": { + "name": "Normalize" + }, + "params": [ + { + "typeid": "{3D80F623-C85C-4741-90D0-E4E66164E6BF}", + "details": { + "name": "Vector2" + } + } + ], + "results": [ + { + "typeid": "{3D80F623-C85C-4741-90D0-E4E66164E6BF}", + "details": { + "name": "Vector2" + } + } + ] + }, + { + "base": "Max", + "context": "{FD1BFADF-BA1F-4AFC-819B-ABA1F22AE6E6}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Max" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Max is invoked" + }, + "details": { + "name": "Max" + }, + "params": [ + { + "typeid": "{3D80F623-C85C-4741-90D0-E4E66164E6BF}", + "details": { + "name": "Vector2" + } + }, + { + "typeid": "{3D80F623-C85C-4741-90D0-E4E66164E6BF}", + "details": { + "name": "Vector2" + } + } + ], + "results": [ + { + "typeid": "{3D80F623-C85C-4741-90D0-E4E66164E6BF}", + "details": { + "name": "Vector2" + } + } + ] + }, + { + "base": "GetElement", + "context": "{FD1BFADF-BA1F-4AFC-819B-ABA1F22AE6E6}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke GetElement" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after GetElement is invoked" + }, + "details": { + "name": "GetElement" + }, + "params": [ + { + "typeid": "{3D80F623-C85C-4741-90D0-E4E66164E6BF}", + "details": { + "name": "Vector2" + } + }, + { + "typeid": "{110C4B14-11A8-4E9D-8638-5051013A56AC}", + "details": { + "name": "double" + } + } + ], + "results": [ + { + "typeid": "{110C4B14-11A8-4E9D-8638-5051013A56AC}", + "details": { + "name": "double" + } + } + ] + }, + { + "base": "Absolute", + "context": "{FD1BFADF-BA1F-4AFC-819B-ABA1F22AE6E6}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Absolute" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Absolute is invoked" + }, + "details": { + "name": "Absolute" + }, + "params": [ + { + "typeid": "{3D80F623-C85C-4741-90D0-E4E66164E6BF}", + "details": { + "name": "Vector2" + } + } + ], + "results": [ + { + "typeid": "{3D80F623-C85C-4741-90D0-E4E66164E6BF}", + "details": { + "name": "Vector2" + } + } + ] + }, + { + "base": "SetX", + "context": "{FD1BFADF-BA1F-4AFC-819B-ABA1F22AE6E6}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke SetX" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after SetX is invoked" + }, + "details": { + "name": "SetX" + }, + "params": [ + { + "typeid": "{3D80F623-C85C-4741-90D0-E4E66164E6BF}", + "details": { + "name": "Vector2" + } + }, + { + "typeid": "{110C4B14-11A8-4E9D-8638-5051013A56AC}", + "details": { + "name": "double" + } + } + ], + "results": [ + { + "typeid": "{3D80F623-C85C-4741-90D0-E4E66164E6BF}", + "details": { + "name": "Vector2" + } + } + ] + }, + { + "base": "Min", + "context": "{FD1BFADF-BA1F-4AFC-819B-ABA1F22AE6E6}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Min" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Min is invoked" + }, + "details": { + "name": "Min" + }, + "params": [ + { + "typeid": "{3D80F623-C85C-4741-90D0-E4E66164E6BF}", + "details": { + "name": "Vector2" + } + }, + { + "typeid": "{3D80F623-C85C-4741-90D0-E4E66164E6BF}", + "details": { + "name": "Vector2" + } + } + ], + "results": [ + { + "typeid": "{3D80F623-C85C-4741-90D0-E4E66164E6BF}", + "details": { + "name": "Vector2" + } + } + ] + }, + { + "base": "DivideByVector", + "context": "{FD1BFADF-BA1F-4AFC-819B-ABA1F22AE6E6}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke DivideByVector" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after DivideByVector is invoked" + }, + "details": { + "name": "DivideByVector" + }, + "params": [ + { + "typeid": "{3D80F623-C85C-4741-90D0-E4E66164E6BF}", + "details": { + "name": "Vector2" + } + }, + { + "typeid": "{3D80F623-C85C-4741-90D0-E4E66164E6BF}", + "details": { + "name": "Vector2" + } + } + ], + "results": [ + { + "typeid": "{3D80F623-C85C-4741-90D0-E4E66164E6BF}", + "details": { + "name": "Vector2" + } + } + ] + }, + { + "base": "DistanceSquared", + "context": "{FD1BFADF-BA1F-4AFC-819B-ABA1F22AE6E6}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke DistanceSquared" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after DistanceSquared is invoked" + }, + "details": { + "name": "DistanceSquared" + }, + "params": [ + { + "typeid": "{3D80F623-C85C-4741-90D0-E4E66164E6BF}", + "details": { + "name": "Vector2" + } + }, + { + "typeid": "{3D80F623-C85C-4741-90D0-E4E66164E6BF}", + "details": { + "name": "Vector2" + } + } + ], + "results": [ + { + "typeid": "{110C4B14-11A8-4E9D-8638-5051013A56AC}", + "details": { + "name": "double" + } + } + ] + }, + { + "base": "Length", + "context": "{FD1BFADF-BA1F-4AFC-819B-ABA1F22AE6E6}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Length" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Length is invoked" + }, + "details": { + "name": "Length" + }, + "params": [ + { + "typeid": "{3D80F623-C85C-4741-90D0-E4E66164E6BF}", + "details": { + "name": "Vector2" + } + } + ], + "results": [ + { + "typeid": "{110C4B14-11A8-4E9D-8638-5051013A56AC}", + "details": { + "name": "double" + } + } + ] + }, + { + "base": "Lerp", + "context": "{FD1BFADF-BA1F-4AFC-819B-ABA1F22AE6E6}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Lerp" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Lerp is invoked" + }, + "details": { + "name": "Lerp" + }, + "params": [ + { + "typeid": "{3D80F623-C85C-4741-90D0-E4E66164E6BF}", + "details": { + "name": "Vector2" + } + }, + { + "typeid": "{3D80F623-C85C-4741-90D0-E4E66164E6BF}", + "details": { + "name": "Vector2" + } + }, + { + "typeid": "{110C4B14-11A8-4E9D-8638-5051013A56AC}", + "details": { + "name": "double" + } + } + ], + "results": [ + { + "typeid": "{3D80F623-C85C-4741-90D0-E4E66164E6BF}", + "details": { + "name": "Vector2" + } + } + ] + } + ] + }, + { + "base": "{544C0867-6EF4-593D-97BD-A51F6EB8164E}", + "context": "OnDemandReflected", + "variant": "", + "details": { + "name": "Map", + "category": "Map", + "tooltip": "A collection of Key/Value pairs, where each Key value must be unique." + }, + "methods": [ + { + "base": "contains", + "context": "{544C0867-6EF4-593D-97BD-A51F6EB8164E}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke contains" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after contains is invoked" + }, + "details": { + "name": "contains" + }, + "params": [ + { + "typeid": "{544C0867-6EF4-593D-97BD-A51F6EB8164E}", + "details": { + "name": "AZStd::unordered_map" + } + }, + { + "typeid": "{6383F1D3-BB27-4E6B-A49A-6409B2059EAA}", + "details": { + "name": "EntityId", + "tooltip": "Entity Unique Id" + } + } + ], + "results": [ + { + "typeid": "{A0CA880C-AFE4-43CB-926C-59AC48496112}", + "details": { + "name": "bool" + } + } + ] + }, + { + "base": "Insert", + "context": "{544C0867-6EF4-593D-97BD-A51F6EB8164E}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Insert" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Insert is invoked" + }, + "details": { + "name": "Insert" + }, + "params": [ + { + "typeid": "{544C0867-6EF4-593D-97BD-A51F6EB8164E}", + "details": { + "name": "AZStd::unordered_map" + } + }, + { + "typeid": "{6383F1D3-BB27-4E6B-A49A-6409B2059EAA}", + "details": { + "name": "EntityId", + "tooltip": "Entity Unique Id" + } + }, + { + "typeid": "{157193C7-B673-4A2B-8B43-5681DCC3DEC3}", + "details": { + "name": "Matrix4x4" + } + } + ], + "results": [ + { + "typeid": "{544C0867-6EF4-593D-97BD-A51F6EB8164E}", + "details": { + "name": "AZStd::unordered_map" + } + } + ] + }, + { + "base": "Reserve", + "context": "{544C0867-6EF4-593D-97BD-A51F6EB8164E}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Reserve" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Reserve is invoked" + }, + "details": { + "name": "Reserve" + }, + "params": [ + { + "typeid": "{544C0867-6EF4-593D-97BD-A51F6EB8164E}", + "details": { + "name": "AZStd::unordered_map" + } + }, + { + "typeid": "{D6597933-47CD-4FC8-B911-63F3E2B0993A}", + "details": { + "name": "AZ::u64" + } + } + ] + }, + { + "base": "GetSize", + "context": "{544C0867-6EF4-593D-97BD-A51F6EB8164E}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke GetSize" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after GetSize is invoked" + }, + "details": { + "name": "GetSize" + }, + "params": [ + { + "typeid": "{544C0867-6EF4-593D-97BD-A51F6EB8164E}", + "details": { + "name": "AZStd::unordered_map" + } + } + ], + "results": [ + { + "typeid": "{72039442-EB38-4D42-A1AD-CB68F7E0EEF6}", + "details": { + "name": "int" + } + } + ] + }, + { + "base": "Iterate_VM", + "context": "{544C0867-6EF4-593D-97BD-A51F6EB8164E}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Iterate_VM" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Iterate_VM is invoked" + }, + "details": { + "name": "Iterate_VM" + }, + "params": [ + { + "typeid": "{544C0867-6EF4-593D-97BD-A51F6EB8164E}", + "details": { + "name": "AZStd::unordered_map" + } + } + ], + "results": [ + { + "typeid": "{42AD6C02-30C0-59A1-81CB-AF236B419CA6}", + "details": { + "name": "Iterator_VM, AZStd::equal_to, allocator>>" + } + } + ] + }, + { + "base": "GetKeys", + "context": "{544C0867-6EF4-593D-97BD-A51F6EB8164E}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke GetKeys" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after GetKeys is invoked" + }, + "details": { + "name": "GetKeys" + }, + "params": [ + { + "typeid": "{544C0867-6EF4-593D-97BD-A51F6EB8164E}", + "details": { + "name": "AZStd::unordered_map" + } + } + ], + "results": [ + { + "typeid": "{4841CFF0-7A5C-519C-BD16-D3625E99605E}", + "details": { + "name": "AZStd::vector" + } + } + ] + }, + { + "base": "Size", + "context": "{544C0867-6EF4-593D-97BD-A51F6EB8164E}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Size" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Size is invoked" + }, + "details": { + "name": "Size" + }, + "params": [ + { + "typeid": "{544C0867-6EF4-593D-97BD-A51F6EB8164E}", + "details": { + "name": "AZStd::unordered_map" + } + } + ], + "results": [ + { + "typeid": "{72039442-EB38-4D42-A1AD-CB68F7E0EEF6}", + "details": { + "name": "int" + } + } + ] + }, + { + "base": "Erase", + "context": "{544C0867-6EF4-593D-97BD-A51F6EB8164E}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Erase" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Erase is invoked" + }, + "details": { + "name": "Erase" + }, + "params": [ + { + "typeid": "{544C0867-6EF4-593D-97BD-A51F6EB8164E}", + "details": { + "name": "AZStd::unordered_map" + } + }, + { + "typeid": "{6383F1D3-BB27-4E6B-A49A-6409B2059EAA}", + "details": { + "name": "EntityId", + "tooltip": "Entity Unique Id" + } + } + ], + "results": [ + { + "typeid": "{544C0867-6EF4-593D-97BD-A51F6EB8164E}", + "details": { + "name": "AZStd::unordered_map" + } + } + ] + }, + { + "base": "EraseCheck_VM", + "context": "{544C0867-6EF4-593D-97BD-A51F6EB8164E}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke EraseCheck_VM" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after EraseCheck_VM is invoked" + }, + "details": { + "name": "EraseCheck_VM" + }, + "params": [ + { + "typeid": "{544C0867-6EF4-593D-97BD-A51F6EB8164E}", + "details": { + "name": "AZStd::unordered_map" + } + }, + { + "typeid": "{6383F1D3-BB27-4E6B-A49A-6409B2059EAA}", + "details": { + "name": "EntityId", + "tooltip": "Entity Unique Id" + } + } + ], + "results": [ + { + "typeid": "{A0CA880C-AFE4-43CB-926C-59AC48496112}", + "details": { + "name": "bool" + } + } + ] + }, + { + "base": "Clear", + "context": "{544C0867-6EF4-593D-97BD-A51F6EB8164E}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Clear" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Clear is invoked" + }, + "details": { + "name": "Clear" + }, + "params": [ + { + "typeid": "{544C0867-6EF4-593D-97BD-A51F6EB8164E}", + "details": { + "name": "AZStd::unordered_map" + } + } + ], + "results": [ + { + "typeid": "{544C0867-6EF4-593D-97BD-A51F6EB8164E}", + "details": { + "name": "AZStd::unordered_map" + } + } + ] + }, + { + "base": "At", + "context": "{544C0867-6EF4-593D-97BD-A51F6EB8164E}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke At" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after At is invoked" + }, + "details": { + "name": "At" + }, + "params": [ + { + "typeid": "{544C0867-6EF4-593D-97BD-A51F6EB8164E}", + "details": { + "name": "AZStd::unordered_map" + } + }, + { + "typeid": "{6383F1D3-BB27-4E6B-A49A-6409B2059EAA}", + "details": { + "name": "EntityId", + "tooltip": "Entity Unique Id" + } + } + ], + "results": [ + { + "typeid": "{157193C7-B673-4A2B-8B43-5681DCC3DEC3}", + "details": { + "name": "Matrix4x4" + } + } + ] + }, + { + "base": "BucketCount", + "context": "{544C0867-6EF4-593D-97BD-A51F6EB8164E}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke BucketCount" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after BucketCount is invoked" + }, + "details": { + "name": "BucketCount" + }, + "params": [ + { + "typeid": "{544C0867-6EF4-593D-97BD-A51F6EB8164E}", + "details": { + "name": "AZStd::unordered_map" + } + } + ], + "results": [ + { + "typeid": "{D6597933-47CD-4FC8-B911-63F3E2B0993A}", + "details": { + "name": "AZ::u64" + } + } + ] + }, + { + "base": "Empty", + "context": "{544C0867-6EF4-593D-97BD-A51F6EB8164E}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Empty" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Empty is invoked" + }, + "details": { + "name": "Empty" + }, + "params": [ + { + "typeid": "{544C0867-6EF4-593D-97BD-A51F6EB8164E}", + "details": { + "name": "AZStd::unordered_map" + } + } + ], + "results": [ + { + "typeid": "{A0CA880C-AFE4-43CB-926C-59AC48496112}", + "details": { + "name": "bool" + } + } + ] + }, + { + "base": "Swap", + "context": "{544C0867-6EF4-593D-97BD-A51F6EB8164E}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Swap" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Swap is invoked" + }, + "details": { + "name": "Swap" + }, + "params": [ + { + "typeid": "{544C0867-6EF4-593D-97BD-A51F6EB8164E}", + "details": { + "name": "AZStd::unordered_map" + } + }, + { + "typeid": "{544C0867-6EF4-593D-97BD-A51F6EB8164E}", + "details": { + "name": "AZStd::unordered_map" + } + } + ] + } + ] + }, + { + "base": "{873120A5-6F9A-543A-BE16-6ED846A8655C}", + "context": "OnDemandReflected", + "variant": "", + "details": { + "name": "Map", + "category": "Map", + "tooltip": "A collection of Key/Value pairs, where each Key value must be unique." + }, + "methods": [ + { + "base": "contains", + "context": "{873120A5-6F9A-543A-BE16-6ED846A8655C}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke contains" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after contains is invoked" + }, + "details": { + "name": "contains" + }, + "params": [ + { + "typeid": "{873120A5-6F9A-543A-BE16-6ED846A8655C}", + "details": { + "name": "AZStd::unordered_map" + } + }, + { + "typeid": "{9F4E062E-06A0-46D4-85DF-E0DA96467D3A}", + "details": { + "name": "Crc32" + } + } + ], + "results": [ + { + "typeid": "{A0CA880C-AFE4-43CB-926C-59AC48496112}", + "details": { + "name": "bool" + } + } + ] + }, + { + "base": "Insert", + "context": "{873120A5-6F9A-543A-BE16-6ED846A8655C}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Insert" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Insert is invoked" + }, + "details": { + "name": "Insert" + }, + "params": [ + { + "typeid": "{873120A5-6F9A-543A-BE16-6ED846A8655C}", + "details": { + "name": "AZStd::unordered_map" + } + }, + { + "typeid": "{9F4E062E-06A0-46D4-85DF-E0DA96467D3A}", + "details": { + "name": "Crc32" + } + }, + { + "typeid": "{004ABD25-CF14-4EB3-BD41-022C247C07FA}", + "details": { + "name": "Obb" + } + } + ], + "results": [ + { + "typeid": "{873120A5-6F9A-543A-BE16-6ED846A8655C}", + "details": { + "name": "AZStd::unordered_map" + } + } + ] + }, + { + "base": "Reserve", + "context": "{873120A5-6F9A-543A-BE16-6ED846A8655C}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Reserve" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Reserve is invoked" + }, + "details": { + "name": "Reserve" + }, + "params": [ + { + "typeid": "{873120A5-6F9A-543A-BE16-6ED846A8655C}", + "details": { + "name": "AZStd::unordered_map" + } + }, + { + "typeid": "{D6597933-47CD-4FC8-B911-63F3E2B0993A}", + "details": { + "name": "AZ::u64" + } + } + ] + }, + { + "base": "GetSize", + "context": "{873120A5-6F9A-543A-BE16-6ED846A8655C}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke GetSize" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after GetSize is invoked" + }, + "details": { + "name": "GetSize" + }, + "params": [ + { + "typeid": "{873120A5-6F9A-543A-BE16-6ED846A8655C}", + "details": { + "name": "AZStd::unordered_map" + } + } + ], + "results": [ + { + "typeid": "{72039442-EB38-4D42-A1AD-CB68F7E0EEF6}", + "details": { + "name": "int" + } + } + ] + }, + { + "base": "Iterate_VM", + "context": "{873120A5-6F9A-543A-BE16-6ED846A8655C}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Iterate_VM" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Iterate_VM is invoked" + }, + "details": { + "name": "Iterate_VM" + }, + "params": [ + { + "typeid": "{873120A5-6F9A-543A-BE16-6ED846A8655C}", + "details": { + "name": "AZStd::unordered_map" + } + } + ], + "results": [ + { + "typeid": "{43538A58-E138-51B1-BF5A-425CF0A542D8}", + "details": { + "name": "Iterator_VM, AZStd::equal_to, allocator>>" + } + } + ] + }, + { + "base": "GetKeys", + "context": "{873120A5-6F9A-543A-BE16-6ED846A8655C}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke GetKeys" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after GetKeys is invoked" + }, + "details": { + "name": "GetKeys" + }, + "params": [ + { + "typeid": "{873120A5-6F9A-543A-BE16-6ED846A8655C}", + "details": { + "name": "AZStd::unordered_map" + } + } + ], + "results": [ + { + "typeid": "{287CEE87-6FF3-52FC-9D32-38255E2C7FE9}", + "details": { + "name": "AZStd::vector" + } + } + ] + }, + { + "base": "Size", + "context": "{873120A5-6F9A-543A-BE16-6ED846A8655C}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Size" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Size is invoked" + }, + "details": { + "name": "Size" + }, + "params": [ + { + "typeid": "{873120A5-6F9A-543A-BE16-6ED846A8655C}", + "details": { + "name": "AZStd::unordered_map" + } + } + ], + "results": [ + { + "typeid": "{72039442-EB38-4D42-A1AD-CB68F7E0EEF6}", + "details": { + "name": "int" + } + } + ] + }, + { + "base": "Erase", + "context": "{873120A5-6F9A-543A-BE16-6ED846A8655C}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Erase" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Erase is invoked" + }, + "details": { + "name": "Erase" + }, + "params": [ + { + "typeid": "{873120A5-6F9A-543A-BE16-6ED846A8655C}", + "details": { + "name": "AZStd::unordered_map" + } + }, + { + "typeid": "{9F4E062E-06A0-46D4-85DF-E0DA96467D3A}", + "details": { + "name": "Crc32" + } + } + ], + "results": [ + { + "typeid": "{873120A5-6F9A-543A-BE16-6ED846A8655C}", + "details": { + "name": "AZStd::unordered_map" + } + } + ] + }, + { + "base": "EraseCheck_VM", + "context": "{873120A5-6F9A-543A-BE16-6ED846A8655C}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke EraseCheck_VM" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after EraseCheck_VM is invoked" + }, + "details": { + "name": "EraseCheck_VM" + }, + "params": [ + { + "typeid": "{873120A5-6F9A-543A-BE16-6ED846A8655C}", + "details": { + "name": "AZStd::unordered_map" + } + }, + { + "typeid": "{9F4E062E-06A0-46D4-85DF-E0DA96467D3A}", + "details": { + "name": "Crc32" + } + } + ], + "results": [ + { + "typeid": "{A0CA880C-AFE4-43CB-926C-59AC48496112}", + "details": { + "name": "bool" + } + } + ] + }, + { + "base": "Clear", + "context": "{873120A5-6F9A-543A-BE16-6ED846A8655C}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Clear" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Clear is invoked" + }, + "details": { + "name": "Clear" + }, + "params": [ + { + "typeid": "{873120A5-6F9A-543A-BE16-6ED846A8655C}", + "details": { + "name": "AZStd::unordered_map" + } + } + ], + "results": [ + { + "typeid": "{873120A5-6F9A-543A-BE16-6ED846A8655C}", + "details": { + "name": "AZStd::unordered_map" + } + } + ] + }, + { + "base": "At", + "context": "{873120A5-6F9A-543A-BE16-6ED846A8655C}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke At" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after At is invoked" + }, + "details": { + "name": "At" + }, + "params": [ + { + "typeid": "{873120A5-6F9A-543A-BE16-6ED846A8655C}", + "details": { + "name": "AZStd::unordered_map" + } + }, + { + "typeid": "{9F4E062E-06A0-46D4-85DF-E0DA96467D3A}", + "details": { + "name": "Crc32" + } + } + ], + "results": [ + { + "typeid": "{004ABD25-CF14-4EB3-BD41-022C247C07FA}", + "details": { + "name": "Obb" + } + } + ] + }, + { + "base": "BucketCount", + "context": "{873120A5-6F9A-543A-BE16-6ED846A8655C}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke BucketCount" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after BucketCount is invoked" + }, + "details": { + "name": "BucketCount" + }, + "params": [ + { + "typeid": "{873120A5-6F9A-543A-BE16-6ED846A8655C}", + "details": { + "name": "AZStd::unordered_map" + } + } + ], + "results": [ + { + "typeid": "{D6597933-47CD-4FC8-B911-63F3E2B0993A}", + "details": { + "name": "AZ::u64" + } + } + ] + }, + { + "base": "Empty", + "context": "{873120A5-6F9A-543A-BE16-6ED846A8655C}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Empty" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Empty is invoked" + }, + "details": { + "name": "Empty" + }, + "params": [ + { + "typeid": "{873120A5-6F9A-543A-BE16-6ED846A8655C}", + "details": { + "name": "AZStd::unordered_map" + } + } + ], + "results": [ + { + "typeid": "{A0CA880C-AFE4-43CB-926C-59AC48496112}", + "details": { + "name": "bool" + } + } + ] + }, + { + "base": "Swap", + "context": "{873120A5-6F9A-543A-BE16-6ED846A8655C}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Swap" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Swap is invoked" + }, + "details": { + "name": "Swap" + }, + "params": [ + { + "typeid": "{873120A5-6F9A-543A-BE16-6ED846A8655C}", + "details": { + "name": "AZStd::unordered_map" + } + }, + { + "typeid": "{873120A5-6F9A-543A-BE16-6ED846A8655C}", + "details": { + "name": "AZStd::unordered_map" + } + } + ] + } + ] + }, + { + "base": "{D653CC1C-3625-5EE4-9F96-A1D20E576E8D}", + "context": "OnDemandReflected", + "variant": "", + "details": { + "name": "Map", + "category": "Map", + "tooltip": "A collection of Key/Value pairs, where each Key value must be unique." + }, + "methods": [ + { + "base": "contains", + "context": "{D653CC1C-3625-5EE4-9F96-A1D20E576E8D}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke contains" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after contains is invoked" + }, + "details": { + "name": "contains" + }, + "params": [ + { + "typeid": "{D653CC1C-3625-5EE4-9F96-A1D20E576E8D}", + "details": { + "name": "AZStd::unordered_map" + } + }, + { + "typeid": "{9F4E062E-06A0-46D4-85DF-E0DA96467D3A}", + "details": { + "name": "Crc32" + } + } + ], + "results": [ + { + "typeid": "{A0CA880C-AFE4-43CB-926C-59AC48496112}", + "details": { + "name": "bool" + } + } + ] + }, + { + "base": "Insert", + "context": "{D653CC1C-3625-5EE4-9F96-A1D20E576E8D}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Insert" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Insert is invoked" + }, + "details": { + "name": "Insert" + }, + "params": [ + { + "typeid": "{D653CC1C-3625-5EE4-9F96-A1D20E576E8D}", + "details": { + "name": "AZStd::unordered_map" + } + }, + { + "typeid": "{9F4E062E-06A0-46D4-85DF-E0DA96467D3A}", + "details": { + "name": "Crc32" + } + }, + { + "typeid": "{0CE9FA36-1E3A-4C06-9254-B7C73A732053}", + "details": { + "name": "Vector4" + } + } + ], + "results": [ + { + "typeid": "{D653CC1C-3625-5EE4-9F96-A1D20E576E8D}", + "details": { + "name": "AZStd::unordered_map" + } + } + ] + }, + { + "base": "Reserve", + "context": "{D653CC1C-3625-5EE4-9F96-A1D20E576E8D}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Reserve" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Reserve is invoked" + }, + "details": { + "name": "Reserve" + }, + "params": [ + { + "typeid": "{D653CC1C-3625-5EE4-9F96-A1D20E576E8D}", + "details": { + "name": "AZStd::unordered_map" + } + }, + { + "typeid": "{D6597933-47CD-4FC8-B911-63F3E2B0993A}", + "details": { + "name": "AZ::u64" + } + } + ] + }, + { + "base": "GetSize", + "context": "{D653CC1C-3625-5EE4-9F96-A1D20E576E8D}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke GetSize" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after GetSize is invoked" + }, + "details": { + "name": "GetSize" + }, + "params": [ + { + "typeid": "{D653CC1C-3625-5EE4-9F96-A1D20E576E8D}", + "details": { + "name": "AZStd::unordered_map" + } + } + ], + "results": [ + { + "typeid": "{72039442-EB38-4D42-A1AD-CB68F7E0EEF6}", + "details": { + "name": "int" + } + } + ] + }, + { + "base": "Iterate_VM", + "context": "{D653CC1C-3625-5EE4-9F96-A1D20E576E8D}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Iterate_VM" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Iterate_VM is invoked" + }, + "details": { + "name": "Iterate_VM" + }, + "params": [ + { + "typeid": "{D653CC1C-3625-5EE4-9F96-A1D20E576E8D}", + "details": { + "name": "AZStd::unordered_map" + } + } + ], + "results": [ + { + "typeid": "{C188C7D1-8386-5310-8390-F5BE27CEFF57}", + "details": { + "name": "Iterator_VM, AZStd::equal_to, allocator>>" + } + } + ] + }, + { + "base": "GetKeys", + "context": "{D653CC1C-3625-5EE4-9F96-A1D20E576E8D}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke GetKeys" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after GetKeys is invoked" + }, + "details": { + "name": "GetKeys" + }, + "params": [ + { + "typeid": "{D653CC1C-3625-5EE4-9F96-A1D20E576E8D}", + "details": { + "name": "AZStd::unordered_map" + } + } + ], + "results": [ + { + "typeid": "{287CEE87-6FF3-52FC-9D32-38255E2C7FE9}", + "details": { + "name": "AZStd::vector" + } + } + ] + }, + { + "base": "Size", + "context": "{D653CC1C-3625-5EE4-9F96-A1D20E576E8D}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Size" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Size is invoked" + }, + "details": { + "name": "Size" + }, + "params": [ + { + "typeid": "{D653CC1C-3625-5EE4-9F96-A1D20E576E8D}", + "details": { + "name": "AZStd::unordered_map" + } + } + ], + "results": [ + { + "typeid": "{72039442-EB38-4D42-A1AD-CB68F7E0EEF6}", + "details": { + "name": "int" + } + } + ] + }, + { + "base": "Erase", + "context": "{D653CC1C-3625-5EE4-9F96-A1D20E576E8D}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Erase" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Erase is invoked" + }, + "details": { + "name": "Erase" + }, + "params": [ + { + "typeid": "{D653CC1C-3625-5EE4-9F96-A1D20E576E8D}", + "details": { + "name": "AZStd::unordered_map" + } + }, + { + "typeid": "{9F4E062E-06A0-46D4-85DF-E0DA96467D3A}", + "details": { + "name": "Crc32" + } + } + ], + "results": [ + { + "typeid": "{D653CC1C-3625-5EE4-9F96-A1D20E576E8D}", + "details": { + "name": "AZStd::unordered_map" + } + } + ] + }, + { + "base": "EraseCheck_VM", + "context": "{D653CC1C-3625-5EE4-9F96-A1D20E576E8D}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke EraseCheck_VM" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after EraseCheck_VM is invoked" + }, + "details": { + "name": "EraseCheck_VM" + }, + "params": [ + { + "typeid": "{D653CC1C-3625-5EE4-9F96-A1D20E576E8D}", + "details": { + "name": "AZStd::unordered_map" + } + }, + { + "typeid": "{9F4E062E-06A0-46D4-85DF-E0DA96467D3A}", + "details": { + "name": "Crc32" + } + } + ], + "results": [ + { + "typeid": "{A0CA880C-AFE4-43CB-926C-59AC48496112}", + "details": { + "name": "bool" + } + } + ] + }, + { + "base": "Clear", + "context": "{D653CC1C-3625-5EE4-9F96-A1D20E576E8D}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Clear" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Clear is invoked" + }, + "details": { + "name": "Clear" + }, + "params": [ + { + "typeid": "{D653CC1C-3625-5EE4-9F96-A1D20E576E8D}", + "details": { + "name": "AZStd::unordered_map" + } + } + ], + "results": [ + { + "typeid": "{D653CC1C-3625-5EE4-9F96-A1D20E576E8D}", + "details": { + "name": "AZStd::unordered_map" + } + } + ] + }, + { + "base": "At", + "context": "{D653CC1C-3625-5EE4-9F96-A1D20E576E8D}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke At" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after At is invoked" + }, + "details": { + "name": "At" + }, + "params": [ + { + "typeid": "{D653CC1C-3625-5EE4-9F96-A1D20E576E8D}", + "details": { + "name": "AZStd::unordered_map" + } + }, + { + "typeid": "{9F4E062E-06A0-46D4-85DF-E0DA96467D3A}", + "details": { + "name": "Crc32" + } + } + ], + "results": [ + { + "typeid": "{0CE9FA36-1E3A-4C06-9254-B7C73A732053}", + "details": { + "name": "Vector4" + } + } + ] + }, + { + "base": "BucketCount", + "context": "{D653CC1C-3625-5EE4-9F96-A1D20E576E8D}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke BucketCount" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after BucketCount is invoked" + }, + "details": { + "name": "BucketCount" + }, + "params": [ + { + "typeid": "{D653CC1C-3625-5EE4-9F96-A1D20E576E8D}", + "details": { + "name": "AZStd::unordered_map" + } + } + ], + "results": [ + { + "typeid": "{D6597933-47CD-4FC8-B911-63F3E2B0993A}", + "details": { + "name": "AZ::u64" + } + } + ] + }, + { + "base": "Empty", + "context": "{D653CC1C-3625-5EE4-9F96-A1D20E576E8D}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Empty" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Empty is invoked" + }, + "details": { + "name": "Empty" + }, + "params": [ + { + "typeid": "{D653CC1C-3625-5EE4-9F96-A1D20E576E8D}", + "details": { + "name": "AZStd::unordered_map" + } + } + ], + "results": [ + { + "typeid": "{A0CA880C-AFE4-43CB-926C-59AC48496112}", + "details": { + "name": "bool" + } + } + ] + }, + { + "base": "Swap", + "context": "{D653CC1C-3625-5EE4-9F96-A1D20E576E8D}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Swap" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Swap is invoked" + }, + "details": { + "name": "Swap" + }, + "params": [ + { + "typeid": "{D653CC1C-3625-5EE4-9F96-A1D20E576E8D}", + "details": { + "name": "AZStd::unordered_map" + } + }, + { + "typeid": "{D653CC1C-3625-5EE4-9F96-A1D20E576E8D}", + "details": { + "name": "AZStd::unordered_map" + } + } + ] + } + ] + }, + { + "base": "{F429F985-AF00-529B-8449-16E56694E5F9}", + "context": "OnDemandReflected", + "variant": "", + "details": { + "name": "Event<>" + }, + "methods": [ + { + "base": "HasHandlerConnected", + "context": "{F429F985-AF00-529B-8449-16E56694E5F9}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke HasHandlerConnected" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after HasHandlerConnected is invoked" + }, + "details": { + "name": "HasHandlerConnected" + }, + "params": [ + { + "typeid": "{F429F985-AF00-529B-8449-16E56694E5F9}", + "details": { + "name": "Event<>*" + } + } + ], + "results": [ + { + "typeid": "{A0CA880C-AFE4-43CB-926C-59AC48496112}", + "details": { + "name": "bool" + } + } + ] + } + ] + }, + { + "base": "{C408B3CC-9C42-5306-93BC-FAB670B2F860}", + "context": "OnDemandReflected", + "variant": "", + "details": { + "name": "Map", + "category": "Map", + "tooltip": "A collection of Key/Value pairs, where each Key value must be unique." + }, + "methods": [ + { + "base": "contains", + "context": "{C408B3CC-9C42-5306-93BC-FAB670B2F860}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke contains" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after contains is invoked" + }, + "details": { + "name": "contains" + }, + "params": [ + { + "typeid": "{C408B3CC-9C42-5306-93BC-FAB670B2F860}", + "details": { + "name": "AZStd::unordered_map" + } + }, + { + "typeid": "{A0CA880C-AFE4-43CB-926C-59AC48496112}", + "details": { + "name": "bool" + } + } + ], + "results": [ + { + "typeid": "{A0CA880C-AFE4-43CB-926C-59AC48496112}", + "details": { + "name": "bool" + } + } + ] + }, + { + "base": "Insert", + "context": "{C408B3CC-9C42-5306-93BC-FAB670B2F860}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Insert" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Insert is invoked" + }, + "details": { + "name": "Insert" + }, + "params": [ + { + "typeid": "{C408B3CC-9C42-5306-93BC-FAB670B2F860}", + "details": { + "name": "AZStd::unordered_map" + } + }, + { + "typeid": "{A0CA880C-AFE4-43CB-926C-59AC48496112}", + "details": { + "name": "bool" + } + }, + { + "typeid": "{110C4B14-11A8-4E9D-8638-5051013A56AC}", + "details": { + "name": "double" + } + } + ], + "results": [ + { + "typeid": "{C408B3CC-9C42-5306-93BC-FAB670B2F860}", + "details": { + "name": "AZStd::unordered_map" + } + } + ] + }, + { + "base": "Reserve", + "context": "{C408B3CC-9C42-5306-93BC-FAB670B2F860}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Reserve" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Reserve is invoked" + }, + "details": { + "name": "Reserve" + }, + "params": [ + { + "typeid": "{C408B3CC-9C42-5306-93BC-FAB670B2F860}", + "details": { + "name": "AZStd::unordered_map" + } + }, + { + "typeid": "{D6597933-47CD-4FC8-B911-63F3E2B0993A}", + "details": { + "name": "AZ::u64" + } + } + ] + }, + { + "base": "GetSize", + "context": "{C408B3CC-9C42-5306-93BC-FAB670B2F860}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke GetSize" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after GetSize is invoked" + }, + "details": { + "name": "GetSize" + }, + "params": [ + { + "typeid": "{C408B3CC-9C42-5306-93BC-FAB670B2F860}", + "details": { + "name": "AZStd::unordered_map" + } + } + ], + "results": [ + { + "typeid": "{72039442-EB38-4D42-A1AD-CB68F7E0EEF6}", + "details": { + "name": "int" + } + } + ] + }, + { + "base": "Iterate_VM", + "context": "{C408B3CC-9C42-5306-93BC-FAB670B2F860}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Iterate_VM" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Iterate_VM is invoked" + }, + "details": { + "name": "Iterate_VM" + }, + "params": [ + { + "typeid": "{C408B3CC-9C42-5306-93BC-FAB670B2F860}", + "details": { + "name": "AZStd::unordered_map" + } + } + ], + "results": [ + { + "typeid": "{EDA7E035-BF0F-5778-B5F6-38E1C917EE71}", + "details": { + "name": "Iterator_VM, AZStd::equal_to, allocator>>" + } + } + ] + }, + { + "base": "GetKeys", + "context": "{C408B3CC-9C42-5306-93BC-FAB670B2F860}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke GetKeys" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after GetKeys is invoked" + }, + "details": { + "name": "GetKeys" + }, + "params": [ + { + "typeid": "{C408B3CC-9C42-5306-93BC-FAB670B2F860}", + "details": { + "name": "AZStd::unordered_map" + } + } + ], + "results": [ + { + "typeid": "{B505B05D-57BF-5A45-9113-B3A2784E2CD7}", + "details": { + "name": "AZStd::vector" + } + } + ] + }, + { + "base": "Size", + "context": "{C408B3CC-9C42-5306-93BC-FAB670B2F860}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Size" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Size is invoked" + }, + "details": { + "name": "Size" + }, + "params": [ + { + "typeid": "{C408B3CC-9C42-5306-93BC-FAB670B2F860}", + "details": { + "name": "AZStd::unordered_map" + } + } + ], + "results": [ + { + "typeid": "{72039442-EB38-4D42-A1AD-CB68F7E0EEF6}", + "details": { + "name": "int" + } + } + ] + }, + { + "base": "Erase", + "context": "{C408B3CC-9C42-5306-93BC-FAB670B2F860}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Erase" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Erase is invoked" + }, + "details": { + "name": "Erase" + }, + "params": [ + { + "typeid": "{C408B3CC-9C42-5306-93BC-FAB670B2F860}", + "details": { + "name": "AZStd::unordered_map" + } + }, + { + "typeid": "{A0CA880C-AFE4-43CB-926C-59AC48496112}", + "details": { + "name": "bool" + } + } + ], + "results": [ + { + "typeid": "{C408B3CC-9C42-5306-93BC-FAB670B2F860}", + "details": { + "name": "AZStd::unordered_map" + } + } + ] + }, + { + "base": "EraseCheck_VM", + "context": "{C408B3CC-9C42-5306-93BC-FAB670B2F860}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke EraseCheck_VM" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after EraseCheck_VM is invoked" + }, + "details": { + "name": "EraseCheck_VM" + }, + "params": [ + { + "typeid": "{C408B3CC-9C42-5306-93BC-FAB670B2F860}", + "details": { + "name": "AZStd::unordered_map" + } + }, + { + "typeid": "{A0CA880C-AFE4-43CB-926C-59AC48496112}", + "details": { + "name": "bool" + } + } + ], + "results": [ + { + "typeid": "{A0CA880C-AFE4-43CB-926C-59AC48496112}", + "details": { + "name": "bool" + } + } + ] + }, + { + "base": "Clear", + "context": "{C408B3CC-9C42-5306-93BC-FAB670B2F860}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Clear" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Clear is invoked" + }, + "details": { + "name": "Clear" + }, + "params": [ + { + "typeid": "{C408B3CC-9C42-5306-93BC-FAB670B2F860}", + "details": { + "name": "AZStd::unordered_map" + } + } + ], + "results": [ + { + "typeid": "{C408B3CC-9C42-5306-93BC-FAB670B2F860}", + "details": { + "name": "AZStd::unordered_map" + } + } + ] + }, + { + "base": "At", + "context": "{C408B3CC-9C42-5306-93BC-FAB670B2F860}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke At" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after At is invoked" + }, + "details": { + "name": "At" + }, + "params": [ + { + "typeid": "{C408B3CC-9C42-5306-93BC-FAB670B2F860}", + "details": { + "name": "AZStd::unordered_map" + } + }, + { + "typeid": "{A0CA880C-AFE4-43CB-926C-59AC48496112}", + "details": { + "name": "bool" + } + } + ], + "results": [ + { + "typeid": "{110C4B14-11A8-4E9D-8638-5051013A56AC}", + "details": { + "name": "double" + } + } + ] + }, + { + "base": "BucketCount", + "context": "{C408B3CC-9C42-5306-93BC-FAB670B2F860}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke BucketCount" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after BucketCount is invoked" + }, + "details": { + "name": "BucketCount" + }, + "params": [ + { + "typeid": "{C408B3CC-9C42-5306-93BC-FAB670B2F860}", + "details": { + "name": "AZStd::unordered_map" + } + } + ], + "results": [ + { + "typeid": "{D6597933-47CD-4FC8-B911-63F3E2B0993A}", + "details": { + "name": "AZ::u64" + } + } + ] + }, + { + "base": "Empty", + "context": "{C408B3CC-9C42-5306-93BC-FAB670B2F860}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Empty" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Empty is invoked" + }, + "details": { + "name": "Empty" + }, + "params": [ + { + "typeid": "{C408B3CC-9C42-5306-93BC-FAB670B2F860}", + "details": { + "name": "AZStd::unordered_map" + } + } + ], + "results": [ + { + "typeid": "{A0CA880C-AFE4-43CB-926C-59AC48496112}", + "details": { + "name": "bool" + } + } + ] + }, + { + "base": "Swap", + "context": "{C408B3CC-9C42-5306-93BC-FAB670B2F860}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Swap" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Swap is invoked" + }, + "details": { + "name": "Swap" + }, + "params": [ + { + "typeid": "{C408B3CC-9C42-5306-93BC-FAB670B2F860}", + "details": { + "name": "AZStd::unordered_map" + } + }, + { + "typeid": "{C408B3CC-9C42-5306-93BC-FAB670B2F860}", + "details": { + "name": "AZStd::unordered_map" + } + } + ] + } + ] + }, + { + "base": "{C00D2478-E0F3-57A3-AB60-A04DFC515016}", + "context": "OnDemandReflected", + "variant": "", + "details": { + "name": "Event const TriggerEvent& >" + }, + "methods": [ + { + "base": "HasHandlerConnected", + "context": "{C00D2478-E0F3-57A3-AB60-A04DFC515016}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke HasHandlerConnected" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after HasHandlerConnected is invoked" + }, + "details": { + "name": "HasHandlerConnected" + }, + "params": [ + { + "typeid": "{C00D2478-E0F3-57A3-AB60-A04DFC515016}", + "details": { + "name": "Event const TriggerEvent& >*" + } + } + ], + "results": [ + { + "typeid": "{A0CA880C-AFE4-43CB-926C-59AC48496112}", + "details": { + "name": "bool" + } + } + ] + } + ] + }, + { + "base": "{9A6CD726-97FC-54C4-A34B-5996F6948697}", + "context": "OnDemandReflected", + "variant": "", + "details": { + "name": "Shared", + "category": "Shared", + "tooltip": "A smart pointer which manages the life cycle of an object, and provides multiple points of ownership for the specified memory(The memory will remain active so long as any shared_ptr has a reference to it)." + }, + "methods": [ + { + "base": "get", + "context": "{9A6CD726-97FC-54C4-A34B-5996F6948697}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke get" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after get is invoked" + }, + "details": { + "name": "get" + }, + "params": [ + { + "typeid": "{9A6CD726-97FC-54C4-A34B-5996F6948697}", + "details": { + "name": "AZStd::shared_ptr" + } + } + ], + "results": [ + { + "typeid": "{274B4495-FDBF-45A9-9BAD-9E90269F2B73}", + "details": { + "name": "Node" + } + } + ] + } + ] + }, + { + "base": "{DCAD95EA-9447-5B13-AACC-6C7223E1C04D}", + "context": "OnDemandReflected", + "variant": "", + "details": { + "name": "Array", + "category": "Array", + "tooltip": "A dynamically sized container of elements." + }, + "methods": [ + { + "base": "Size", + "context": "{DCAD95EA-9447-5B13-AACC-6C7223E1C04D}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Size" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Size is invoked" + }, + "details": { + "name": "Size" + }, + "params": [ + { + "typeid": "{DCAD95EA-9447-5B13-AACC-6C7223E1C04D}", + "details": { + "name": "AZStd::vector&" + } + } + ], + "results": [ + { + "typeid": "{72039442-EB38-4D42-A1AD-CB68F7E0EEF6}", + "details": { + "name": "int" + } + } + ] + }, + { + "base": "Front", + "context": "{DCAD95EA-9447-5B13-AACC-6C7223E1C04D}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Front" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Front is invoked" + }, + "details": { + "name": "Front" + }, + "params": [ + { + "typeid": "{DCAD95EA-9447-5B13-AACC-6C7223E1C04D}", + "details": { + "name": "AZStd::vector*" + } + } + ], + "results": [ + { + "typeid": "{E6E7C0C5-07C9-44BB-A38C-930431948667}", + "details": { + "name": "SliceInstantiationTicket" + } + } + ] + }, + { + "base": "HasKey", + "context": "{DCAD95EA-9447-5B13-AACC-6C7223E1C04D}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Has Key" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Has Key is invoked" + }, + "details": { + "name": "Has Key" + }, + "params": [ + { + "typeid": "{DCAD95EA-9447-5B13-AACC-6C7223E1C04D}", + "details": { + "name": "AZStd::vector&" + } + }, + { + "typeid": "{D6597933-47CD-4FC8-B911-63F3E2B0993A}", + "details": { + "name": "AZ::u64" + } + } + ], + "results": [ + { + "typeid": "{A0CA880C-AFE4-43CB-926C-59AC48496112}", + "details": { + "name": "bool" + } + } + ] + }, + { + "base": "Resize", + "context": "{DCAD95EA-9447-5B13-AACC-6C7223E1C04D}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Resize" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Resize is invoked" + }, + "details": { + "name": "Resize" + }, + "params": [ + { + "typeid": "{DCAD95EA-9447-5B13-AACC-6C7223E1C04D}", + "details": { + "name": "AZStd::vector*" + } + }, + { + "typeid": "{D6597933-47CD-4FC8-B911-63F3E2B0993A}", + "details": { + "name": "AZ::u64" + } + } + ] + }, + { + "base": "at", + "context": "{DCAD95EA-9447-5B13-AACC-6C7223E1C04D}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke at" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after at is invoked" + }, + "details": { + "name": "at" + }, + "params": [ + { + "typeid": "{DCAD95EA-9447-5B13-AACC-6C7223E1C04D}", + "details": { + "name": "AZStd::vector*" + } + }, + { + "typeid": "{D6597933-47CD-4FC8-B911-63F3E2B0993A}", + "details": { + "name": "AZ::u64" + } + } + ], + "results": [ + { + "typeid": "{E6E7C0C5-07C9-44BB-A38C-930431948667}", + "details": { + "name": "SliceInstantiationTicket" + } + } + ] + }, + { + "base": "Back", + "context": "{DCAD95EA-9447-5B13-AACC-6C7223E1C04D}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Back" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Back is invoked" + }, + "details": { + "name": "Back" + }, + "params": [ + { + "typeid": "{DCAD95EA-9447-5B13-AACC-6C7223E1C04D}", + "details": { + "name": "AZStd::vector*" + } + } + ], + "results": [ + { + "typeid": "{E6E7C0C5-07C9-44BB-A38C-930431948667}", + "details": { + "name": "SliceInstantiationTicket" + } + } + ] + }, + { + "base": "pop_back", + "context": "{DCAD95EA-9447-5B13-AACC-6C7223E1C04D}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke pop_back" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after pop_back is invoked" + }, + "details": { + "name": "pop_back" + }, + "params": [ + { + "typeid": "{DCAD95EA-9447-5B13-AACC-6C7223E1C04D}", + "details": { + "name": "AZStd::vector*" + } + } + ] + }, + { + "base": "size", + "context": "{DCAD95EA-9447-5B13-AACC-6C7223E1C04D}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke size" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after size is invoked" + }, + "details": { + "name": "size" + }, + "params": [ + { + "typeid": "{DCAD95EA-9447-5B13-AACC-6C7223E1C04D}", + "details": { + "name": "AZStd::vector&" + } + } + ], + "results": [ + { + "typeid": "{72039442-EB38-4D42-A1AD-CB68F7E0EEF6}", + "details": { + "name": "int" + } + } + ] + }, + { + "base": "At", + "context": "{DCAD95EA-9447-5B13-AACC-6C7223E1C04D}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke At" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after At is invoked" + }, + "details": { + "name": "At" + }, + "params": [ + { + "typeid": "{DCAD95EA-9447-5B13-AACC-6C7223E1C04D}", + "details": { + "name": "AZStd::vector*" + } + }, + { + "typeid": "{D6597933-47CD-4FC8-B911-63F3E2B0993A}", + "details": { + "name": "AZ::u64" + } + } + ], + "results": [ + { + "typeid": "{E6E7C0C5-07C9-44BB-A38C-930431948667}", + "details": { + "name": "SliceInstantiationTicket" + } + } + ] + }, + { + "base": "Empty", + "context": "{DCAD95EA-9447-5B13-AACC-6C7223E1C04D}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Empty" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Empty is invoked" + }, + "details": { + "name": "Empty" + }, + "params": [ + { + "typeid": "{DCAD95EA-9447-5B13-AACC-6C7223E1C04D}", + "details": { + "name": "AZStd::vector*" + } + } + ], + "results": [ + { + "typeid": "{A0CA880C-AFE4-43CB-926C-59AC48496112}", + "details": { + "name": "bool" + } + } + ] + }, + { + "base": "Swap", + "context": "{DCAD95EA-9447-5B13-AACC-6C7223E1C04D}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Swap" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Swap is invoked" + }, + "details": { + "name": "Swap" + }, + "params": [ + { + "typeid": "{DCAD95EA-9447-5B13-AACC-6C7223E1C04D}", + "details": { + "name": "AZStd::vector*" + } + }, + { + "typeid": "{DCAD95EA-9447-5B13-AACC-6C7223E1C04D}", + "details": { + "name": "AZStd::vector&" + } + } + ] + }, + { + "base": "push_back", + "context": "{DCAD95EA-9447-5B13-AACC-6C7223E1C04D}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke push_back" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after push_back is invoked" + }, + "details": { + "name": "push_back" + }, + "params": [ + { + "typeid": "{DCAD95EA-9447-5B13-AACC-6C7223E1C04D}", + "details": { + "name": "AZStd::vector*" + } + }, + { + "typeid": "{E6E7C0C5-07C9-44BB-A38C-930431948667}", + "details": { + "name": "SliceInstantiationTicket" + } + } + ] + }, + { + "base": "PushBack_VM", + "context": "{DCAD95EA-9447-5B13-AACC-6C7223E1C04D}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke PushBack_VM" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after PushBack_VM is invoked" + }, + "details": { + "name": "PushBack_VM" + }, + "params": [ + { + "typeid": "{DCAD95EA-9447-5B13-AACC-6C7223E1C04D}", + "details": { + "name": "AZStd::vector&" + } + }, + { + "typeid": "{E6E7C0C5-07C9-44BB-A38C-930431948667}", + "details": { + "name": "SliceInstantiationTicket" + } + } + ], + "results": [ + { + "typeid": "{DCAD95EA-9447-5B13-AACC-6C7223E1C04D}", + "details": { + "name": "AZStd::vector&" + } + } + ] + }, + { + "base": "AtUnchecked", + "context": "{DCAD95EA-9447-5B13-AACC-6C7223E1C04D}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke AtUnchecked" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after AtUnchecked is invoked" + }, + "details": { + "name": "AtUnchecked" + }, + "params": [ + { + "typeid": "{DCAD95EA-9447-5B13-AACC-6C7223E1C04D}", + "details": { + "name": "AZStd::vector*" + } + }, + { + "typeid": "{D6597933-47CD-4FC8-B911-63F3E2B0993A}", + "details": { + "name": "AZ::u64" + } + } + ], + "results": [ + { + "typeid": "{E6E7C0C5-07C9-44BB-A38C-930431948667}", + "details": { + "name": "SliceInstantiationTicket" + } + } + ] + }, + { + "base": "clear", + "context": "{DCAD95EA-9447-5B13-AACC-6C7223E1C04D}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke clear" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after clear is invoked" + }, + "details": { + "name": "clear" + }, + "params": [ + { + "typeid": "{DCAD95EA-9447-5B13-AACC-6C7223E1C04D}", + "details": { + "name": "AZStd::vector*" + } + } + ] + }, + { + "base": "NotEmpty", + "context": "{DCAD95EA-9447-5B13-AACC-6C7223E1C04D}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke NotEmpty" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after NotEmpty is invoked" + }, + "details": { + "name": "NotEmpty" + }, + "params": [ + { + "typeid": "{DCAD95EA-9447-5B13-AACC-6C7223E1C04D}", + "details": { + "name": "AZStd::vector&" + } + } + ], + "results": [ + { + "typeid": "{A0CA880C-AFE4-43CB-926C-59AC48496112}", + "details": { + "name": "bool" + } + } + ] + }, + { + "base": "Erase_VM", + "context": "{DCAD95EA-9447-5B13-AACC-6C7223E1C04D}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Erase_VM" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Erase_VM is invoked" + }, + "details": { + "name": "Erase_VM" + }, + "params": [ + { + "typeid": "{DCAD95EA-9447-5B13-AACC-6C7223E1C04D}", + "details": { + "name": "AZStd::vector&" + } + }, + { + "typeid": "{D6597933-47CD-4FC8-B911-63F3E2B0993A}", + "details": { + "name": "AZ::u64" + } + } + ], + "results": [ + { + "typeid": "{DCAD95EA-9447-5B13-AACC-6C7223E1C04D}", + "details": { + "name": "AZStd::vector&" + } + } + ] + }, + { + "base": "EraseCheck_VM", + "context": "{DCAD95EA-9447-5B13-AACC-6C7223E1C04D}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke EraseCheck_VM" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after EraseCheck_VM is invoked" + }, + "details": { + "name": "EraseCheck_VM" + }, + "params": [ + { + "typeid": "{DCAD95EA-9447-5B13-AACC-6C7223E1C04D}", + "details": { + "name": "AZStd::vector&" + } + }, + { + "typeid": "{D6597933-47CD-4FC8-B911-63F3E2B0993A}", + "details": { + "name": "AZ::u64" + } + } + ], + "results": [ + { + "typeid": "{A0CA880C-AFE4-43CB-926C-59AC48496112}", + "details": { + "name": "bool" + } + } + ] + }, + { + "base": "Capacity", + "context": "{DCAD95EA-9447-5B13-AACC-6C7223E1C04D}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Capacity" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Capacity is invoked" + }, + "details": { + "name": "Capacity" + }, + "params": [ + { + "typeid": "{DCAD95EA-9447-5B13-AACC-6C7223E1C04D}", + "details": { + "name": "AZStd::vector*" + } + } + ], + "results": [ + { + "typeid": "{D6597933-47CD-4FC8-B911-63F3E2B0993A}", + "details": { + "name": "AZ::u64" + } + } + ] + }, + { + "base": "Clear", + "context": "{DCAD95EA-9447-5B13-AACC-6C7223E1C04D}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Clear" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Clear is invoked" + }, + "details": { + "name": "Clear" + }, + "params": [ + { + "typeid": "{DCAD95EA-9447-5B13-AACC-6C7223E1C04D}", + "details": { + "name": "AZStd::vector&" + } + } + ], + "results": [ + { + "typeid": "{DCAD95EA-9447-5B13-AACC-6C7223E1C04D}", + "details": { + "name": "AZStd::vector&" + } + } + ] + }, + { + "base": "AssignAt", + "context": "{DCAD95EA-9447-5B13-AACC-6C7223E1C04D}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke AssignAt" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after AssignAt is invoked" + }, + "details": { + "name": "AssignAt" + }, + "params": [ + { + "typeid": "{DCAD95EA-9447-5B13-AACC-6C7223E1C04D}", + "details": { + "name": "AZStd::vector&" + } + }, + { + "typeid": "{D6597933-47CD-4FC8-B911-63F3E2B0993A}", + "details": { + "name": "AZ::u64" + } + }, + { + "typeid": "{E6E7C0C5-07C9-44BB-A38C-930431948667}", + "details": { + "name": "SliceInstantiationTicket" + } + } + ] + }, + { + "base": "GetSize", + "context": "{DCAD95EA-9447-5B13-AACC-6C7223E1C04D}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke GetSize" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after GetSize is invoked" + }, + "details": { + "name": "GetSize" + }, + "params": [ + { + "typeid": "{DCAD95EA-9447-5B13-AACC-6C7223E1C04D}", + "details": { + "name": "AZStd::vector&" + } + } + ], + "results": [ + { + "typeid": "{72039442-EB38-4D42-A1AD-CB68F7E0EEF6}", + "details": { + "name": "int" + } + } + ] + }, + { + "base": "Insert", + "context": "{DCAD95EA-9447-5B13-AACC-6C7223E1C04D}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Insert" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Insert is invoked" + }, + "details": { + "name": "Insert" + }, + "params": [ + { + "typeid": "{DCAD95EA-9447-5B13-AACC-6C7223E1C04D}", + "details": { + "name": "AZStd::vector&" + } + }, + { + "typeid": "{D6597933-47CD-4FC8-B911-63F3E2B0993A}", + "details": { + "name": "AZ::u64" + } + }, + { + "typeid": "{E6E7C0C5-07C9-44BB-A38C-930431948667}", + "details": { + "name": "SliceInstantiationTicket" + } + } + ], + "results": [ + { + "typeid": "{DCAD95EA-9447-5B13-AACC-6C7223E1C04D}", + "details": { + "name": "AZStd::vector&" + } + } + ] + }, + { + "base": "PushBack", + "context": "{DCAD95EA-9447-5B13-AACC-6C7223E1C04D}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke PushBack" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after PushBack is invoked" + }, + "details": { + "name": "PushBack" + }, + "params": [ + { + "typeid": "{DCAD95EA-9447-5B13-AACC-6C7223E1C04D}", + "details": { + "name": "AZStd::vector*" + } + }, + { + "typeid": "{E6E7C0C5-07C9-44BB-A38C-930431948667}", + "details": { + "name": "SliceInstantiationTicket" + } + } + ] + }, + { + "base": "Reserve", + "context": "{DCAD95EA-9447-5B13-AACC-6C7223E1C04D}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Reserve" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Reserve is invoked" + }, + "details": { + "name": "Reserve" + }, + "params": [ + { + "typeid": "{DCAD95EA-9447-5B13-AACC-6C7223E1C04D}", + "details": { + "name": "AZStd::vector*" + } + }, + { + "typeid": "{D6597933-47CD-4FC8-B911-63F3E2B0993A}", + "details": { + "name": "AZ::u64" + } + } + ] + }, + { + "base": "Iterate_VM", + "context": "{DCAD95EA-9447-5B13-AACC-6C7223E1C04D}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Iterate_VM" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Iterate_VM is invoked" + }, + "details": { + "name": "Iterate_VM" + }, + "params": [ + { + "typeid": "{DCAD95EA-9447-5B13-AACC-6C7223E1C04D}", + "details": { + "name": "AZStd::vector&" + } + } + ], + "results": [ + { + "typeid": "{26E7C4EA-AEE5-57E0-8F90-3E4E01D9CB95}", + "details": { + "name": "Iterator_VM>" + } + } + ] + } + ] + }, + { + "base": "{0D5E2C44-B2DE-57D6-B4B9-3F37C5D9B245}", + "context": "OnDemandReflected", + "variant": "", + "details": { + "name": "Set", + "category": "Set", + "tooltip": "A dynamically sized container, where each element is unique." + }, + "methods": [ + { + "base": "Size", + "context": "{0D5E2C44-B2DE-57D6-B4B9-3F37C5D9B245}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Size" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Size is invoked" + }, + "details": { + "name": "Size" + }, + "params": [ + { + "typeid": "{0D5E2C44-B2DE-57D6-B4B9-3F37C5D9B245}", + "details": { + "name": "AZStd::unordered_set" + } + } + ], + "results": [ + { + "typeid": "{72039442-EB38-4D42-A1AD-CB68F7E0EEF6}", + "details": { + "name": "int" + } + } + ] + }, + { + "base": "GetKeys", + "context": "{0D5E2C44-B2DE-57D6-B4B9-3F37C5D9B245}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke GetKeys" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after GetKeys is invoked" + }, + "details": { + "name": "GetKeys" + }, + "params": [ + { + "typeid": "{0D5E2C44-B2DE-57D6-B4B9-3F37C5D9B245}", + "details": { + "name": "AZStd::unordered_set" + } + } + ], + "results": [ + { + "typeid": "{B505B05D-57BF-5A45-9113-B3A2784E2CD7}", + "details": { + "name": "AZStd::vector" + } + } + ] + }, + { + "base": "contains", + "context": "{0D5E2C44-B2DE-57D6-B4B9-3F37C5D9B245}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke contains" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after contains is invoked" + }, + "details": { + "name": "contains" + }, + "params": [ + { + "typeid": "{0D5E2C44-B2DE-57D6-B4B9-3F37C5D9B245}", + "details": { + "name": "AZStd::unordered_set" + } + }, + { + "typeid": "{A0CA880C-AFE4-43CB-926C-59AC48496112}", + "details": { + "name": "bool" + } + } + ], + "results": [ + { + "typeid": "{A0CA880C-AFE4-43CB-926C-59AC48496112}", + "details": { + "name": "bool" + } + } + ] + }, + { + "base": "Insert", + "context": "{0D5E2C44-B2DE-57D6-B4B9-3F37C5D9B245}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Insert" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Insert is invoked" + }, + "details": { + "name": "Insert" + }, + "params": [ + { + "typeid": "{0D5E2C44-B2DE-57D6-B4B9-3F37C5D9B245}", + "details": { + "name": "AZStd::unordered_set" + } + }, + { + "typeid": "{A0CA880C-AFE4-43CB-926C-59AC48496112}", + "details": { + "name": "bool" + } + } + ], + "results": [ + { + "typeid": "{0D5E2C44-B2DE-57D6-B4B9-3F37C5D9B245}", + "details": { + "name": "AZStd::unordered_set" + } + } + ] + }, + { + "base": "GetSize", + "context": "{0D5E2C44-B2DE-57D6-B4B9-3F37C5D9B245}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke GetSize" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after GetSize is invoked" + }, + "details": { + "name": "GetSize" + }, + "params": [ + { + "typeid": "{0D5E2C44-B2DE-57D6-B4B9-3F37C5D9B245}", + "details": { + "name": "AZStd::unordered_set" + } + } + ], + "results": [ + { + "typeid": "{72039442-EB38-4D42-A1AD-CB68F7E0EEF6}", + "details": { + "name": "int" + } + } + ] + }, + { + "base": "Reserve", + "context": "{0D5E2C44-B2DE-57D6-B4B9-3F37C5D9B245}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Reserve" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Reserve is invoked" + }, + "details": { + "name": "Reserve" + }, + "params": [ + { + "typeid": "{0D5E2C44-B2DE-57D6-B4B9-3F37C5D9B245}", + "details": { + "name": "AZStd::unordered_set" + } + }, + { + "typeid": "{D6597933-47CD-4FC8-B911-63F3E2B0993A}", + "details": { + "name": "AZ::u64" + } + } + ] + }, + { + "base": "Iterate_VM", + "context": "{0D5E2C44-B2DE-57D6-B4B9-3F37C5D9B245}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Iterate_VM" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Iterate_VM is invoked" + }, + "details": { + "name": "Iterate_VM" + }, + "params": [ + { + "typeid": "{0D5E2C44-B2DE-57D6-B4B9-3F37C5D9B245}", + "details": { + "name": "AZStd::unordered_set" + } + } + ], + "results": [ + { + "typeid": "{FB7FD37D-C9BD-5EA1-99CF-EE3BB84E1043}", + "details": { + "name": "Iterator_VM, AZStd::equal_to, allocator>>" + } + } + ] + }, + { + "base": "EraseCheck_VM", + "context": "{0D5E2C44-B2DE-57D6-B4B9-3F37C5D9B245}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke EraseCheck_VM" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after EraseCheck_VM is invoked" + }, + "details": { + "name": "EraseCheck_VM" + }, + "params": [ + { + "typeid": "{0D5E2C44-B2DE-57D6-B4B9-3F37C5D9B245}", + "details": { + "name": "AZStd::unordered_set" + } + }, + { + "typeid": "{A0CA880C-AFE4-43CB-926C-59AC48496112}", + "details": { + "name": "bool" + } + } + ], + "results": [ + { + "typeid": "{A0CA880C-AFE4-43CB-926C-59AC48496112}", + "details": { + "name": "bool" + } + } + ] + }, + { + "base": "Erase", + "context": "{0D5E2C44-B2DE-57D6-B4B9-3F37C5D9B245}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Erase" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Erase is invoked" + }, + "details": { + "name": "Erase" + }, + "params": [ + { + "typeid": "{0D5E2C44-B2DE-57D6-B4B9-3F37C5D9B245}", + "details": { + "name": "AZStd::unordered_set" + } + }, + { + "typeid": "{A0CA880C-AFE4-43CB-926C-59AC48496112}", + "details": { + "name": "bool" + } + } + ], + "results": [ + { + "typeid": "{0D5E2C44-B2DE-57D6-B4B9-3F37C5D9B245}", + "details": { + "name": "AZStd::unordered_set" + } + } + ] + }, + { + "base": "Clear", + "context": "{0D5E2C44-B2DE-57D6-B4B9-3F37C5D9B245}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Clear" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Clear is invoked" + }, + "details": { + "name": "Clear" + }, + "params": [ + { + "typeid": "{0D5E2C44-B2DE-57D6-B4B9-3F37C5D9B245}", + "details": { + "name": "AZStd::unordered_set" + } + } + ], + "results": [ + { + "typeid": "{0D5E2C44-B2DE-57D6-B4B9-3F37C5D9B245}", + "details": { + "name": "AZStd::unordered_set" + } + } + ] + }, + { + "base": "BucketCount", + "context": "{0D5E2C44-B2DE-57D6-B4B9-3F37C5D9B245}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke BucketCount" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after BucketCount is invoked" + }, + "details": { + "name": "BucketCount" + }, + "params": [ + { + "typeid": "{0D5E2C44-B2DE-57D6-B4B9-3F37C5D9B245}", + "details": { + "name": "AZStd::unordered_set" + } + } + ], + "results": [ + { + "typeid": "{D6597933-47CD-4FC8-B911-63F3E2B0993A}", + "details": { + "name": "AZ::u64" + } + } + ] + }, + { + "base": "Empty", + "context": "{0D5E2C44-B2DE-57D6-B4B9-3F37C5D9B245}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Empty" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Empty is invoked" + }, + "details": { + "name": "Empty" + }, + "params": [ + { + "typeid": "{0D5E2C44-B2DE-57D6-B4B9-3F37C5D9B245}", + "details": { + "name": "AZStd::unordered_set" + } + } + ], + "results": [ + { + "typeid": "{A0CA880C-AFE4-43CB-926C-59AC48496112}", + "details": { + "name": "bool" + } + } + ] + }, + { + "base": "Swap", + "context": "{0D5E2C44-B2DE-57D6-B4B9-3F37C5D9B245}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Swap" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Swap is invoked" + }, + "details": { + "name": "Swap" + }, + "params": [ + { + "typeid": "{0D5E2C44-B2DE-57D6-B4B9-3F37C5D9B245}", + "details": { + "name": "AZStd::unordered_set" + } + }, + { + "typeid": "{0D5E2C44-B2DE-57D6-B4B9-3F37C5D9B245}", + "details": { + "name": "AZStd::unordered_set" + } + } + ] + } + ] + }, + { + "base": "{F0D71473-2358-53A0-A1B3-16A564B9A0BD}", + "context": "OnDemandReflected", + "variant": "", + "details": { + "name": "Map", + "category": "Map", + "tooltip": "A collection of Key/Value pairs, where each Key value must be unique." + }, + "methods": [ + { + "base": "contains", + "context": "{F0D71473-2358-53A0-A1B3-16A564B9A0BD}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke contains" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after contains is invoked" + }, + "details": { + "name": "contains" + }, + "params": [ + { + "typeid": "{F0D71473-2358-53A0-A1B3-16A564B9A0BD}", + "details": { + "name": "AZStd::unordered_map" + } + }, + { + "typeid": "{110C4B14-11A8-4E9D-8638-5051013A56AC}", + "details": { + "name": "double" + } + } + ], + "results": [ + { + "typeid": "{A0CA880C-AFE4-43CB-926C-59AC48496112}", + "details": { + "name": "bool" + } + } + ] + }, + { + "base": "Insert", + "context": "{F0D71473-2358-53A0-A1B3-16A564B9A0BD}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Insert" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Insert is invoked" + }, + "details": { + "name": "Insert" + }, + "params": [ + { + "typeid": "{F0D71473-2358-53A0-A1B3-16A564B9A0BD}", + "details": { + "name": "AZStd::unordered_map" + } + }, + { + "typeid": "{110C4B14-11A8-4E9D-8638-5051013A56AC}", + "details": { + "name": "double" + } + }, + { + "typeid": "{847DD984-9DBF-4789-8E25-E0334402E8AD}", + "details": { + "name": "Plane" + } + } + ], + "results": [ + { + "typeid": "{F0D71473-2358-53A0-A1B3-16A564B9A0BD}", + "details": { + "name": "AZStd::unordered_map" + } + } + ] + }, + { + "base": "Reserve", + "context": "{F0D71473-2358-53A0-A1B3-16A564B9A0BD}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Reserve" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Reserve is invoked" + }, + "details": { + "name": "Reserve" + }, + "params": [ + { + "typeid": "{F0D71473-2358-53A0-A1B3-16A564B9A0BD}", + "details": { + "name": "AZStd::unordered_map" + } + }, + { + "typeid": "{D6597933-47CD-4FC8-B911-63F3E2B0993A}", + "details": { + "name": "AZ::u64" + } + } + ] + }, + { + "base": "GetSize", + "context": "{F0D71473-2358-53A0-A1B3-16A564B9A0BD}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke GetSize" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after GetSize is invoked" + }, + "details": { + "name": "GetSize" + }, + "params": [ + { + "typeid": "{F0D71473-2358-53A0-A1B3-16A564B9A0BD}", + "details": { + "name": "AZStd::unordered_map" + } + } + ], + "results": [ + { + "typeid": "{72039442-EB38-4D42-A1AD-CB68F7E0EEF6}", + "details": { + "name": "int" + } + } + ] + }, + { + "base": "Iterate_VM", + "context": "{F0D71473-2358-53A0-A1B3-16A564B9A0BD}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Iterate_VM" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Iterate_VM is invoked" + }, + "details": { + "name": "Iterate_VM" + }, + "params": [ + { + "typeid": "{F0D71473-2358-53A0-A1B3-16A564B9A0BD}", + "details": { + "name": "AZStd::unordered_map" + } + } + ], + "results": [ + { + "typeid": "{C0AF6CF6-19D7-5896-9BE6-FF48D31FFAB0}", + "details": { + "name": "Iterator_VM, AZStd::equal_to, allocator>>" + } + } + ] + }, + { + "base": "GetKeys", + "context": "{F0D71473-2358-53A0-A1B3-16A564B9A0BD}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke GetKeys" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after GetKeys is invoked" + }, + "details": { + "name": "GetKeys" + }, + "params": [ + { + "typeid": "{F0D71473-2358-53A0-A1B3-16A564B9A0BD}", + "details": { + "name": "AZStd::unordered_map" + } + } + ], + "results": [ + { + "typeid": "{F31F64EA-E384-5536-ACD6-8F01849730FC}", + "details": { + "name": "AZStd::vector" + } + } + ] + }, + { + "base": "Size", + "context": "{F0D71473-2358-53A0-A1B3-16A564B9A0BD}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Size" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Size is invoked" + }, + "details": { + "name": "Size" + }, + "params": [ + { + "typeid": "{F0D71473-2358-53A0-A1B3-16A564B9A0BD}", + "details": { + "name": "AZStd::unordered_map" + } + } + ], + "results": [ + { + "typeid": "{72039442-EB38-4D42-A1AD-CB68F7E0EEF6}", + "details": { + "name": "int" + } + } + ] + }, + { + "base": "Erase", + "context": "{F0D71473-2358-53A0-A1B3-16A564B9A0BD}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Erase" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Erase is invoked" + }, + "details": { + "name": "Erase" + }, + "params": [ + { + "typeid": "{F0D71473-2358-53A0-A1B3-16A564B9A0BD}", + "details": { + "name": "AZStd::unordered_map" + } + }, + { + "typeid": "{110C4B14-11A8-4E9D-8638-5051013A56AC}", + "details": { + "name": "double" + } + } + ], + "results": [ + { + "typeid": "{F0D71473-2358-53A0-A1B3-16A564B9A0BD}", + "details": { + "name": "AZStd::unordered_map" + } + } + ] + }, + { + "base": "EraseCheck_VM", + "context": "{F0D71473-2358-53A0-A1B3-16A564B9A0BD}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke EraseCheck_VM" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after EraseCheck_VM is invoked" + }, + "details": { + "name": "EraseCheck_VM" + }, + "params": [ + { + "typeid": "{F0D71473-2358-53A0-A1B3-16A564B9A0BD}", + "details": { + "name": "AZStd::unordered_map" + } + }, + { + "typeid": "{110C4B14-11A8-4E9D-8638-5051013A56AC}", + "details": { + "name": "double" + } + } + ], + "results": [ + { + "typeid": "{A0CA880C-AFE4-43CB-926C-59AC48496112}", + "details": { + "name": "bool" + } + } + ] + }, + { + "base": "Clear", + "context": "{F0D71473-2358-53A0-A1B3-16A564B9A0BD}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Clear" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Clear is invoked" + }, + "details": { + "name": "Clear" + }, + "params": [ + { + "typeid": "{F0D71473-2358-53A0-A1B3-16A564B9A0BD}", + "details": { + "name": "AZStd::unordered_map" + } + } + ], + "results": [ + { + "typeid": "{F0D71473-2358-53A0-A1B3-16A564B9A0BD}", + "details": { + "name": "AZStd::unordered_map" + } + } + ] + }, + { + "base": "At", + "context": "{F0D71473-2358-53A0-A1B3-16A564B9A0BD}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke At" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after At is invoked" + }, + "details": { + "name": "At" + }, + "params": [ + { + "typeid": "{F0D71473-2358-53A0-A1B3-16A564B9A0BD}", + "details": { + "name": "AZStd::unordered_map" + } + }, + { + "typeid": "{110C4B14-11A8-4E9D-8638-5051013A56AC}", + "details": { + "name": "double" + } + } + ], + "results": [ + { + "typeid": "{847DD984-9DBF-4789-8E25-E0334402E8AD}", + "details": { + "name": "Plane" + } + } + ] + }, + { + "base": "BucketCount", + "context": "{F0D71473-2358-53A0-A1B3-16A564B9A0BD}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke BucketCount" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after BucketCount is invoked" + }, + "details": { + "name": "BucketCount" + }, + "params": [ + { + "typeid": "{F0D71473-2358-53A0-A1B3-16A564B9A0BD}", + "details": { + "name": "AZStd::unordered_map" + } + } + ], + "results": [ + { + "typeid": "{D6597933-47CD-4FC8-B911-63F3E2B0993A}", + "details": { + "name": "AZ::u64" + } + } + ] + }, + { + "base": "Empty", + "context": "{F0D71473-2358-53A0-A1B3-16A564B9A0BD}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Empty" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Empty is invoked" + }, + "details": { + "name": "Empty" + }, + "params": [ + { + "typeid": "{F0D71473-2358-53A0-A1B3-16A564B9A0BD}", + "details": { + "name": "AZStd::unordered_map" + } + } + ], + "results": [ + { + "typeid": "{A0CA880C-AFE4-43CB-926C-59AC48496112}", + "details": { + "name": "bool" + } + } + ] + }, + { + "base": "Swap", + "context": "{F0D71473-2358-53A0-A1B3-16A564B9A0BD}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Swap" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Swap is invoked" + }, + "details": { + "name": "Swap" + }, + "params": [ + { + "typeid": "{F0D71473-2358-53A0-A1B3-16A564B9A0BD}", + "details": { + "name": "AZStd::unordered_map" + } + }, + { + "typeid": "{F0D71473-2358-53A0-A1B3-16A564B9A0BD}", + "details": { + "name": "AZStd::unordered_map" + } + } + ] + } + ] + }, + { + "base": "{84290CFC-1335-5341-AD8B-0A3FE9FE46D0}", + "context": "OnDemandReflected", + "variant": "", + "details": { + "name": "Event> >" + }, + "methods": [ + { + "base": "HasHandlerConnected", + "context": "{84290CFC-1335-5341-AD8B-0A3FE9FE46D0}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke HasHandlerConnected" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after HasHandlerConnected is invoked" + }, + "details": { + "name": "HasHandlerConnected" + }, + "params": [ + { + "typeid": "{84290CFC-1335-5341-AD8B-0A3FE9FE46D0}", + "details": { + "name": "Event> " + } + } + ], + "results": [ + { + "typeid": "{A0CA880C-AFE4-43CB-926C-59AC48496112}", + "details": { + "name": "bool" + } + } + ] + } + ] + }, + { + "base": "{444B2C18-8D7E-5B43-9524-0C9F6C351542}", + "context": "OnDemandReflected", + "variant": "", + "details": { + "name": "Shared", + "category": "Shared", + "tooltip": "A smart pointer which manages the life cycle of an object, and provides multiple points of ownership for the specified memory(The memory will remain active so long as any shared_ptr has a reference to it)." + }, + "methods": [ + { + "base": "get", + "context": "{444B2C18-8D7E-5B43-9524-0C9F6C351542}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke get" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after get is invoked" + }, + "details": { + "name": "get" + }, + "params": [ + { + "typeid": "{444B2C18-8D7E-5B43-9524-0C9F6C351542}", + "details": { + "name": "AZStd::shared_ptr" + } + } + ], + "results": [ + { + "typeid": "{50494867-04F1-4785-BB9C-9D6C96DCBFC9}", + "details": { + "name": "Slot" + } + } + ] + } + ] + }, + { + "base": "{56026B1A-B142-5C80-B6F4-A0827B393370}", + "context": "OnDemandReflected", + "variant": "", + "details": { + "name": "Map", + "category": "Map", + "tooltip": "A collection of Key/Value pairs, where each Key value must be unique." + }, + "methods": [ + { + "base": "contains", + "context": "{56026B1A-B142-5C80-B6F4-A0827B393370}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke contains" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after contains is invoked" + }, + "details": { + "name": "contains" + }, + "params": [ + { + "typeid": "{56026B1A-B142-5C80-B6F4-A0827B393370}", + "details": { + "name": "AZStd::unordered_map" + } + }, + { + "typeid": "{652ED536-3402-439B-AEBE-4A5DBC554085}", + "details": { + "name": "AssetId" + } + } + ], + "results": [ + { + "typeid": "{A0CA880C-AFE4-43CB-926C-59AC48496112}", + "details": { + "name": "bool" + } + } + ] + }, + { + "base": "Insert", + "context": "{56026B1A-B142-5C80-B6F4-A0827B393370}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Insert" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Insert is invoked" + }, + "details": { + "name": "Insert" + }, + "params": [ + { + "typeid": "{56026B1A-B142-5C80-B6F4-A0827B393370}", + "details": { + "name": "AZStd::unordered_map" + } + }, + { + "typeid": "{652ED536-3402-439B-AEBE-4A5DBC554085}", + "details": { + "name": "AssetId" + } + }, + { + "typeid": "{157193C7-B673-4A2B-8B43-5681DCC3DEC3}", + "details": { + "name": "Matrix4x4" + } + } + ], + "results": [ + { + "typeid": "{56026B1A-B142-5C80-B6F4-A0827B393370}", + "details": { + "name": "AZStd::unordered_map" + } + } + ] + }, + { + "base": "Reserve", + "context": "{56026B1A-B142-5C80-B6F4-A0827B393370}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Reserve" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Reserve is invoked" + }, + "details": { + "name": "Reserve" + }, + "params": [ + { + "typeid": "{56026B1A-B142-5C80-B6F4-A0827B393370}", + "details": { + "name": "AZStd::unordered_map" + } + }, + { + "typeid": "{D6597933-47CD-4FC8-B911-63F3E2B0993A}", + "details": { + "name": "AZ::u64" + } + } + ] + }, + { + "base": "GetSize", + "context": "{56026B1A-B142-5C80-B6F4-A0827B393370}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke GetSize" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after GetSize is invoked" + }, + "details": { + "name": "GetSize" + }, + "params": [ + { + "typeid": "{56026B1A-B142-5C80-B6F4-A0827B393370}", + "details": { + "name": "AZStd::unordered_map" + } + } + ], + "results": [ + { + "typeid": "{72039442-EB38-4D42-A1AD-CB68F7E0EEF6}", + "details": { + "name": "int" + } + } + ] + }, + { + "base": "Iterate_VM", + "context": "{56026B1A-B142-5C80-B6F4-A0827B393370}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Iterate_VM" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Iterate_VM is invoked" + }, + "details": { + "name": "Iterate_VM" + }, + "params": [ + { + "typeid": "{56026B1A-B142-5C80-B6F4-A0827B393370}", + "details": { + "name": "AZStd::unordered_map" + } + } + ], + "results": [ + { + "typeid": "{DBE62AE7-476A-58FE-BEEB-946F971797FE}", + "details": { + "name": "Iterator_VM, AZStd::equal_to, allocator>>" + } + } + ] + }, + { + "base": "GetKeys", + "context": "{56026B1A-B142-5C80-B6F4-A0827B393370}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke GetKeys" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after GetKeys is invoked" + }, + "details": { + "name": "GetKeys" + }, + "params": [ + { + "typeid": "{56026B1A-B142-5C80-B6F4-A0827B393370}", + "details": { + "name": "AZStd::unordered_map" + } + } + ], + "results": [ + { + "typeid": "{877C4A33-39B5-51D7-948D-F97DB81372A1}", + "details": { + "name": "AZStd::vector" + } + } + ] + }, + { + "base": "Size", + "context": "{56026B1A-B142-5C80-B6F4-A0827B393370}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Size" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Size is invoked" + }, + "details": { + "name": "Size" + }, + "params": [ + { + "typeid": "{56026B1A-B142-5C80-B6F4-A0827B393370}", + "details": { + "name": "AZStd::unordered_map" + } + } + ], + "results": [ + { + "typeid": "{72039442-EB38-4D42-A1AD-CB68F7E0EEF6}", + "details": { + "name": "int" + } + } + ] + }, + { + "base": "Erase", + "context": "{56026B1A-B142-5C80-B6F4-A0827B393370}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Erase" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Erase is invoked" + }, + "details": { + "name": "Erase" + }, + "params": [ + { + "typeid": "{56026B1A-B142-5C80-B6F4-A0827B393370}", + "details": { + "name": "AZStd::unordered_map" + } + }, + { + "typeid": "{652ED536-3402-439B-AEBE-4A5DBC554085}", + "details": { + "name": "AssetId" + } + } + ], + "results": [ + { + "typeid": "{56026B1A-B142-5C80-B6F4-A0827B393370}", + "details": { + "name": "AZStd::unordered_map" + } + } + ] + }, + { + "base": "EraseCheck_VM", + "context": "{56026B1A-B142-5C80-B6F4-A0827B393370}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke EraseCheck_VM" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after EraseCheck_VM is invoked" + }, + "details": { + "name": "EraseCheck_VM" + }, + "params": [ + { + "typeid": "{56026B1A-B142-5C80-B6F4-A0827B393370}", + "details": { + "name": "AZStd::unordered_map" + } + }, + { + "typeid": "{652ED536-3402-439B-AEBE-4A5DBC554085}", + "details": { + "name": "AssetId" + } + } + ], + "results": [ + { + "typeid": "{A0CA880C-AFE4-43CB-926C-59AC48496112}", + "details": { + "name": "bool" + } + } + ] + }, + { + "base": "Clear", + "context": "{56026B1A-B142-5C80-B6F4-A0827B393370}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Clear" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Clear is invoked" + }, + "details": { + "name": "Clear" + }, + "params": [ + { + "typeid": "{56026B1A-B142-5C80-B6F4-A0827B393370}", + "details": { + "name": "AZStd::unordered_map" + } + } + ], + "results": [ + { + "typeid": "{56026B1A-B142-5C80-B6F4-A0827B393370}", + "details": { + "name": "AZStd::unordered_map" + } + } + ] + }, + { + "base": "At", + "context": "{56026B1A-B142-5C80-B6F4-A0827B393370}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke At" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after At is invoked" + }, + "details": { + "name": "At" + }, + "params": [ + { + "typeid": "{56026B1A-B142-5C80-B6F4-A0827B393370}", + "details": { + "name": "AZStd::unordered_map" + } + }, + { + "typeid": "{652ED536-3402-439B-AEBE-4A5DBC554085}", + "details": { + "name": "AssetId" + } + } + ], + "results": [ + { + "typeid": "{157193C7-B673-4A2B-8B43-5681DCC3DEC3}", + "details": { + "name": "Matrix4x4" + } + } + ] + }, + { + "base": "BucketCount", + "context": "{56026B1A-B142-5C80-B6F4-A0827B393370}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke BucketCount" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after BucketCount is invoked" + }, + "details": { + "name": "BucketCount" + }, + "params": [ + { + "typeid": "{56026B1A-B142-5C80-B6F4-A0827B393370}", + "details": { + "name": "AZStd::unordered_map" + } + } + ], + "results": [ + { + "typeid": "{D6597933-47CD-4FC8-B911-63F3E2B0993A}", + "details": { + "name": "AZ::u64" + } + } + ] + }, + { + "base": "Empty", + "context": "{56026B1A-B142-5C80-B6F4-A0827B393370}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Empty" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Empty is invoked" + }, + "details": { + "name": "Empty" + }, + "params": [ + { + "typeid": "{56026B1A-B142-5C80-B6F4-A0827B393370}", + "details": { + "name": "AZStd::unordered_map" + } + } + ], + "results": [ + { + "typeid": "{A0CA880C-AFE4-43CB-926C-59AC48496112}", + "details": { + "name": "bool" + } + } + ] + }, + { + "base": "Swap", + "context": "{56026B1A-B142-5C80-B6F4-A0827B393370}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Swap" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Swap is invoked" + }, + "details": { + "name": "Swap" + }, + "params": [ + { + "typeid": "{56026B1A-B142-5C80-B6F4-A0827B393370}", + "details": { + "name": "AZStd::unordered_map" + } + }, + { + "typeid": "{56026B1A-B142-5C80-B6F4-A0827B393370}", + "details": { + "name": "AZStd::unordered_map" + } + } + ] + } + ] + }, + { + "base": "{B51CFD94-318D-5E30-BE18-6ACC6CFCC2EC}", + "context": "OnDemandReflected", + "variant": "", + "details": { + "name": "Shared", + "category": "Shared", + "tooltip": "A smart pointer which manages the life cycle of an object, and provides multiple points of ownership for the specified memory(The memory will remain active so long as any shared_ptr has a reference to it)." + }, + "methods": [ + { + "base": "get", + "context": "{B51CFD94-318D-5E30-BE18-6ACC6CFCC2EC}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke get" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after get is invoked" + }, + "details": { + "name": "get" + }, + "params": [ + { + "typeid": "{B51CFD94-318D-5E30-BE18-6ACC6CFCC2EC}", + "details": { + "name": "AZStd::shared_ptr" + } + } + ], + "results": [ + { + "typeid": "{B4301AE1-98F4-474E-B0A1-18F27EEDB059}", + "details": { + "name": "Connection" + } + } + ] + } + ] + }, + { + "base": "{D2AE76E7-D7AC-58C9-82C3-EE5F0BDCFACD}", + "context": "OnDemandReflected", + "variant": "", + "details": { + "name": "Array", + "category": "Array", + "tooltip": "A dynamically sized container of elements." + }, + "methods": [ + { + "base": "Size", + "context": "{D2AE76E7-D7AC-58C9-82C3-EE5F0BDCFACD}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Size" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Size is invoked" + }, + "details": { + "name": "Size" + }, + "params": [ + { + "typeid": "{D2AE76E7-D7AC-58C9-82C3-EE5F0BDCFACD}", + "details": { + "name": "AZStd::vector" + } + } + ], + "results": [ + { + "typeid": "{72039442-EB38-4D42-A1AD-CB68F7E0EEF6}", + "details": { + "name": "int" + } + } + ] + }, + { + "base": "Front", + "context": "{D2AE76E7-D7AC-58C9-82C3-EE5F0BDCFACD}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Front" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Front is invoked" + }, + "details": { + "name": "Front" + }, + "params": [ + { + "typeid": "{D2AE76E7-D7AC-58C9-82C3-EE5F0BDCFACD}", + "details": { + "name": "AZStd::vector" + } + } + ], + "results": [ + { + "typeid": "{107D8379-4AD4-4547-BEE1-184B120F23E9}", + "details": { + "name": "AzToolsFramework::ComponentDetails" + } + } + ] + }, + { + "base": "HasKey", + "context": "{D2AE76E7-D7AC-58C9-82C3-EE5F0BDCFACD}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Has Key" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Has Key is invoked" + }, + "details": { + "name": "Has Key" + }, + "params": [ + { + "typeid": "{D2AE76E7-D7AC-58C9-82C3-EE5F0BDCFACD}", + "details": { + "name": "AZStd::vector" + } + }, + { + "typeid": "{D6597933-47CD-4FC8-B911-63F3E2B0993A}", + "details": { + "name": "AZ::u64" + } + } + ], + "results": [ + { + "typeid": "{A0CA880C-AFE4-43CB-926C-59AC48496112}", + "details": { + "name": "bool" + } + } + ] + }, + { + "base": "Resize", + "context": "{D2AE76E7-D7AC-58C9-82C3-EE5F0BDCFACD}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Resize" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Resize is invoked" + }, + "details": { + "name": "Resize" + }, + "params": [ + { + "typeid": "{D2AE76E7-D7AC-58C9-82C3-EE5F0BDCFACD}", + "details": { + "name": "AZStd::vector" + } + }, + { + "typeid": "{D6597933-47CD-4FC8-B911-63F3E2B0993A}", + "details": { + "name": "AZ::u64" + } + } + ] + }, + { + "base": "at", + "context": "{D2AE76E7-D7AC-58C9-82C3-EE5F0BDCFACD}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke at" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after at is invoked" + }, + "details": { + "name": "at" + }, + "params": [ + { + "typeid": "{D2AE76E7-D7AC-58C9-82C3-EE5F0BDCFACD}", + "details": { + "name": "AZStd::vector" + } + }, + { + "typeid": "{D6597933-47CD-4FC8-B911-63F3E2B0993A}", + "details": { + "name": "AZ::u64" + } + } + ], + "results": [ + { + "typeid": "{107D8379-4AD4-4547-BEE1-184B120F23E9}", + "details": { + "name": "AzToolsFramework::ComponentDetails" + } + } + ] + }, + { + "base": "Back", + "context": "{D2AE76E7-D7AC-58C9-82C3-EE5F0BDCFACD}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Back" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Back is invoked" + }, + "details": { + "name": "Back" + }, + "params": [ + { + "typeid": "{D2AE76E7-D7AC-58C9-82C3-EE5F0BDCFACD}", + "details": { + "name": "AZStd::vector" + } + } + ], + "results": [ + { + "typeid": "{107D8379-4AD4-4547-BEE1-184B120F23E9}", + "details": { + "name": "AzToolsFramework::ComponentDetails" + } + } + ] + }, + { + "base": "pop_back", + "context": "{D2AE76E7-D7AC-58C9-82C3-EE5F0BDCFACD}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke pop_back" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after pop_back is invoked" + }, + "details": { + "name": "pop_back" + }, + "params": [ + { + "typeid": "{D2AE76E7-D7AC-58C9-82C3-EE5F0BDCFACD}", + "details": { + "name": "AZStd::vector" + } + } + ] + }, + { + "base": "size", + "context": "{D2AE76E7-D7AC-58C9-82C3-EE5F0BDCFACD}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke size" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after size is invoked" + }, + "details": { + "name": "size" + }, + "params": [ + { + "typeid": "{D2AE76E7-D7AC-58C9-82C3-EE5F0BDCFACD}", + "details": { + "name": "AZStd::vector" + } + } + ], + "results": [ + { + "typeid": "{72039442-EB38-4D42-A1AD-CB68F7E0EEF6}", + "details": { + "name": "int" + } + } + ] + }, + { + "base": "At", + "context": "{D2AE76E7-D7AC-58C9-82C3-EE5F0BDCFACD}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke At" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after At is invoked" + }, + "details": { + "name": "At" + }, + "params": [ + { + "typeid": "{D2AE76E7-D7AC-58C9-82C3-EE5F0BDCFACD}", + "details": { + "name": "AZStd::vector" + } + }, + { + "typeid": "{D6597933-47CD-4FC8-B911-63F3E2B0993A}", + "details": { + "name": "AZ::u64" + } + } + ], + "results": [ + { + "typeid": "{107D8379-4AD4-4547-BEE1-184B120F23E9}", + "details": { + "name": "AzToolsFramework::ComponentDetails" + } + } + ] + }, + { + "base": "Empty", + "context": "{D2AE76E7-D7AC-58C9-82C3-EE5F0BDCFACD}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Empty" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Empty is invoked" + }, + "details": { + "name": "Empty" + }, + "params": [ + { + "typeid": "{D2AE76E7-D7AC-58C9-82C3-EE5F0BDCFACD}", + "details": { + "name": "AZStd::vector" + } + } + ], + "results": [ + { + "typeid": "{A0CA880C-AFE4-43CB-926C-59AC48496112}", + "details": { + "name": "bool" + } + } + ] + }, + { + "base": "Swap", + "context": "{D2AE76E7-D7AC-58C9-82C3-EE5F0BDCFACD}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Swap" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Swap is invoked" + }, + "details": { + "name": "Swap" + }, + "params": [ + { + "typeid": "{D2AE76E7-D7AC-58C9-82C3-EE5F0BDCFACD}", + "details": { + "name": "AZStd::vector" + } + }, + { + "typeid": "{D2AE76E7-D7AC-58C9-82C3-EE5F0BDCFACD}", + "details": { + "name": "AZStd::vector" + } + } + ] + }, + { + "base": "push_back", + "context": "{D2AE76E7-D7AC-58C9-82C3-EE5F0BDCFACD}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke push_back" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after push_back is invoked" + }, + "details": { + "name": "push_back" + }, + "params": [ + { + "typeid": "{D2AE76E7-D7AC-58C9-82C3-EE5F0BDCFACD}", + "details": { + "name": "AZStd::vector" + } + }, + { + "typeid": "{107D8379-4AD4-4547-BEE1-184B120F23E9}", + "details": { + "name": "AzToolsFramework::ComponentDetails" + } + } + ] + }, + { + "base": "PushBack_VM", + "context": "{D2AE76E7-D7AC-58C9-82C3-EE5F0BDCFACD}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke PushBack_VM" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after PushBack_VM is invoked" + }, + "details": { + "name": "PushBack_VM" + }, + "params": [ + { + "typeid": "{D2AE76E7-D7AC-58C9-82C3-EE5F0BDCFACD}", + "details": { + "name": "AZStd::vector" + } + }, + { + "typeid": "{107D8379-4AD4-4547-BEE1-184B120F23E9}", + "details": { + "name": "AzToolsFramework::ComponentDetails" + } + } + ], + "results": [ + { + "typeid": "{D2AE76E7-D7AC-58C9-82C3-EE5F0BDCFACD}", + "details": { + "name": "AZStd::vector" + } + } + ] + }, + { + "base": "AtUnchecked", + "context": "{D2AE76E7-D7AC-58C9-82C3-EE5F0BDCFACD}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke AtUnchecked" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after AtUnchecked is invoked" + }, + "details": { + "name": "AtUnchecked" + }, + "params": [ + { + "typeid": "{D2AE76E7-D7AC-58C9-82C3-EE5F0BDCFACD}", + "details": { + "name": "AZStd::vector" + } + }, + { + "typeid": "{D6597933-47CD-4FC8-B911-63F3E2B0993A}", + "details": { + "name": "AZ::u64" + } + } + ], + "results": [ + { + "typeid": "{107D8379-4AD4-4547-BEE1-184B120F23E9}", + "details": { + "name": "AzToolsFramework::ComponentDetails" + } + } + ] + }, + { + "base": "clear", + "context": "{D2AE76E7-D7AC-58C9-82C3-EE5F0BDCFACD}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke clear" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after clear is invoked" + }, + "details": { + "name": "clear" + }, + "params": [ + { + "typeid": "{D2AE76E7-D7AC-58C9-82C3-EE5F0BDCFACD}", + "details": { + "name": "AZStd::vector" + } + } + ] + }, + { + "base": "NotEmpty", + "context": "{D2AE76E7-D7AC-58C9-82C3-EE5F0BDCFACD}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke NotEmpty" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after NotEmpty is invoked" + }, + "details": { + "name": "NotEmpty" + }, + "params": [ + { + "typeid": "{D2AE76E7-D7AC-58C9-82C3-EE5F0BDCFACD}", + "details": { + "name": "AZStd::vector" + } + } + ], + "results": [ + { + "typeid": "{A0CA880C-AFE4-43CB-926C-59AC48496112}", + "details": { + "name": "bool" + } + } + ] + }, + { + "base": "Erase_VM", + "context": "{D2AE76E7-D7AC-58C9-82C3-EE5F0BDCFACD}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Erase_VM" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Erase_VM is invoked" + }, + "details": { + "name": "Erase_VM" + }, + "params": [ + { + "typeid": "{D2AE76E7-D7AC-58C9-82C3-EE5F0BDCFACD}", + "details": { + "name": "AZStd::vector" + } + }, + { + "typeid": "{D6597933-47CD-4FC8-B911-63F3E2B0993A}", + "details": { + "name": "AZ::u64" + } + } + ], + "results": [ + { + "typeid": "{D2AE76E7-D7AC-58C9-82C3-EE5F0BDCFACD}", + "details": { + "name": "AZStd::vector" + } + } + ] + }, + { + "base": "EraseCheck_VM", + "context": "{D2AE76E7-D7AC-58C9-82C3-EE5F0BDCFACD}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke EraseCheck_VM" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after EraseCheck_VM is invoked" + }, + "details": { + "name": "EraseCheck_VM" + }, + "params": [ + { + "typeid": "{D2AE76E7-D7AC-58C9-82C3-EE5F0BDCFACD}", + "details": { + "name": "AZStd::vector" + } + }, + { + "typeid": "{D6597933-47CD-4FC8-B911-63F3E2B0993A}", + "details": { + "name": "AZ::u64" + } + } + ], + "results": [ + { + "typeid": "{A0CA880C-AFE4-43CB-926C-59AC48496112}", + "details": { + "name": "bool" + } + } + ] + }, + { + "base": "Capacity", + "context": "{D2AE76E7-D7AC-58C9-82C3-EE5F0BDCFACD}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Capacity" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Capacity is invoked" + }, + "details": { + "name": "Capacity" + }, + "params": [ + { + "typeid": "{D2AE76E7-D7AC-58C9-82C3-EE5F0BDCFACD}", + "details": { + "name": "AZStd::vector" + } + } + ], + "results": [ + { + "typeid": "{D6597933-47CD-4FC8-B911-63F3E2B0993A}", + "details": { + "name": "AZ::u64" + } + } + ] + }, + { + "base": "Clear", + "context": "{D2AE76E7-D7AC-58C9-82C3-EE5F0BDCFACD}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Clear" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Clear is invoked" + }, + "details": { + "name": "Clear" + }, + "params": [ + { + "typeid": "{D2AE76E7-D7AC-58C9-82C3-EE5F0BDCFACD}", + "details": { + "name": "AZStd::vector" + } + } + ], + "results": [ + { + "typeid": "{D2AE76E7-D7AC-58C9-82C3-EE5F0BDCFACD}", + "details": { + "name": "AZStd::vector" + } + } + ] + }, + { + "base": "AssignAt", + "context": "{D2AE76E7-D7AC-58C9-82C3-EE5F0BDCFACD}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke AssignAt" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after AssignAt is invoked" + }, + "details": { + "name": "AssignAt" + }, + "params": [ + { + "typeid": "{D2AE76E7-D7AC-58C9-82C3-EE5F0BDCFACD}", + "details": { + "name": "AZStd::vector" + } + }, + { + "typeid": "{D6597933-47CD-4FC8-B911-63F3E2B0993A}", + "details": { + "name": "AZ::u64" + } + }, + { + "typeid": "{107D8379-4AD4-4547-BEE1-184B120F23E9}", + "details": { + "name": "AzToolsFramework::ComponentDetails" + } + } + ] + }, + { + "base": "GetSize", + "context": "{D2AE76E7-D7AC-58C9-82C3-EE5F0BDCFACD}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke GetSize" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after GetSize is invoked" + }, + "details": { + "name": "GetSize" + }, + "params": [ + { + "typeid": "{D2AE76E7-D7AC-58C9-82C3-EE5F0BDCFACD}", + "details": { + "name": "AZStd::vector" + } + } + ], + "results": [ + { + "typeid": "{72039442-EB38-4D42-A1AD-CB68F7E0EEF6}", + "details": { + "name": "int" + } + } + ] + }, + { + "base": "Insert", + "context": "{D2AE76E7-D7AC-58C9-82C3-EE5F0BDCFACD}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Insert" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Insert is invoked" + }, + "details": { + "name": "Insert" + }, + "params": [ + { + "typeid": "{D2AE76E7-D7AC-58C9-82C3-EE5F0BDCFACD}", + "details": { + "name": "AZStd::vector" + } + }, + { + "typeid": "{D6597933-47CD-4FC8-B911-63F3E2B0993A}", + "details": { + "name": "AZ::u64" + } + }, + { + "typeid": "{107D8379-4AD4-4547-BEE1-184B120F23E9}", + "details": { + "name": "AzToolsFramework::ComponentDetails" + } + } + ], + "results": [ + { + "typeid": "{D2AE76E7-D7AC-58C9-82C3-EE5F0BDCFACD}", + "details": { + "name": "AZStd::vector" + } + } + ] + }, + { + "base": "PushBack", + "context": "{D2AE76E7-D7AC-58C9-82C3-EE5F0BDCFACD}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke PushBack" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after PushBack is invoked" + }, + "details": { + "name": "PushBack" + }, + "params": [ + { + "typeid": "{D2AE76E7-D7AC-58C9-82C3-EE5F0BDCFACD}", + "details": { + "name": "AZStd::vector" + } + }, + { + "typeid": "{107D8379-4AD4-4547-BEE1-184B120F23E9}", + "details": { + "name": "AzToolsFramework::ComponentDetails" + } + } + ] + }, + { + "base": "Reserve", + "context": "{D2AE76E7-D7AC-58C9-82C3-EE5F0BDCFACD}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Reserve" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Reserve is invoked" + }, + "details": { + "name": "Reserve" + }, + "params": [ + { + "typeid": "{D2AE76E7-D7AC-58C9-82C3-EE5F0BDCFACD}", + "details": { + "name": "AZStd::vector" + } + }, + { + "typeid": "{D6597933-47CD-4FC8-B911-63F3E2B0993A}", + "details": { + "name": "AZ::u64" + } + } + ] + }, + { + "base": "Iterate_VM", + "context": "{D2AE76E7-D7AC-58C9-82C3-EE5F0BDCFACD}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Iterate_VM" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Iterate_VM is invoked" + }, + "details": { + "name": "Iterate_VM" + }, + "params": [ + { + "typeid": "{D2AE76E7-D7AC-58C9-82C3-EE5F0BDCFACD}", + "details": { + "name": "AZStd::vector" + } + } + ], + "results": [ + { + "typeid": "{C7B41471-EB0D-5307-82E3-EAD8C1973B1F}", + "details": { + "name": "Iterator_VM>" + } + } + ] + } + ] + }, + { + "base": "{9F35DB06-62AD-55E0-9CDD-DF452612430C}", + "context": "OnDemandReflected", + "variant": "", + "details": { + "name": "Map", + "category": "Map", + "tooltip": "A collection of Key/Value pairs, where each Key value must be unique." + }, + "methods": [ + { + "base": "contains", + "context": "{9F35DB06-62AD-55E0-9CDD-DF452612430C}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke contains" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after contains is invoked" + }, + "details": { + "name": "contains" + }, + "params": [ + { + "typeid": "{9F35DB06-62AD-55E0-9CDD-DF452612430C}", + "details": { + "name": "AZStd::unordered_map" + } + }, + { + "typeid": "{110C4B14-11A8-4E9D-8638-5051013A56AC}", + "details": { + "name": "double" + } + } + ], + "results": [ + { + "typeid": "{A0CA880C-AFE4-43CB-926C-59AC48496112}", + "details": { + "name": "bool" + } + } + ] + }, + { + "base": "Insert", + "context": "{9F35DB06-62AD-55E0-9CDD-DF452612430C}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Insert" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Insert is invoked" + }, + "details": { + "name": "Insert" + }, + "params": [ + { + "typeid": "{9F35DB06-62AD-55E0-9CDD-DF452612430C}", + "details": { + "name": "AZStd::unordered_map" + } + }, + { + "typeid": "{110C4B14-11A8-4E9D-8638-5051013A56AC}", + "details": { + "name": "double" + } + }, + { + "typeid": "{03AAAB3F-5C47-5A66-9EBC-D5FA4DB353C9}", + "details": { + "name": "AZStd::string" + } + } + ], + "results": [ + { + "typeid": "{9F35DB06-62AD-55E0-9CDD-DF452612430C}", + "details": { + "name": "AZStd::unordered_map" + } + } + ] + }, + { + "base": "Reserve", + "context": "{9F35DB06-62AD-55E0-9CDD-DF452612430C}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Reserve" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Reserve is invoked" + }, + "details": { + "name": "Reserve" + }, + "params": [ + { + "typeid": "{9F35DB06-62AD-55E0-9CDD-DF452612430C}", + "details": { + "name": "AZStd::unordered_map" + } + }, + { + "typeid": "{D6597933-47CD-4FC8-B911-63F3E2B0993A}", + "details": { + "name": "AZ::u64" + } + } + ] + }, + { + "base": "GetSize", + "context": "{9F35DB06-62AD-55E0-9CDD-DF452612430C}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke GetSize" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after GetSize is invoked" + }, + "details": { + "name": "GetSize" + }, + "params": [ + { + "typeid": "{9F35DB06-62AD-55E0-9CDD-DF452612430C}", + "details": { + "name": "AZStd::unordered_map" + } + } + ], + "results": [ + { + "typeid": "{72039442-EB38-4D42-A1AD-CB68F7E0EEF6}", + "details": { + "name": "int" + } + } + ] + }, + { + "base": "Iterate_VM", + "context": "{9F35DB06-62AD-55E0-9CDD-DF452612430C}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Iterate_VM" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Iterate_VM is invoked" + }, + "details": { + "name": "Iterate_VM" + }, + "params": [ + { + "typeid": "{9F35DB06-62AD-55E0-9CDD-DF452612430C}", + "details": { + "name": "AZStd::unordered_map" + } + } + ], + "results": [ + { + "typeid": "{7611972F-379B-5219-A082-2D4743B0F750}", + "details": { + "name": "Iterator_VM, allocator>, AZStd::hash, A" + } + } + ] + }, + { + "base": "GetKeys", + "context": "{9F35DB06-62AD-55E0-9CDD-DF452612430C}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke GetKeys" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after GetKeys is invoked" + }, + "details": { + "name": "GetKeys" + }, + "params": [ + { + "typeid": "{9F35DB06-62AD-55E0-9CDD-DF452612430C}", + "details": { + "name": "AZStd::unordered_map" + } + } + ], + "results": [ + { + "typeid": "{F31F64EA-E384-5536-ACD6-8F01849730FC}", + "details": { + "name": "AZStd::vector" + } + } + ] + }, + { + "base": "Size", + "context": "{9F35DB06-62AD-55E0-9CDD-DF452612430C}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Size" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Size is invoked" + }, + "details": { + "name": "Size" + }, + "params": [ + { + "typeid": "{9F35DB06-62AD-55E0-9CDD-DF452612430C}", + "details": { + "name": "AZStd::unordered_map" + } + } + ], + "results": [ + { + "typeid": "{72039442-EB38-4D42-A1AD-CB68F7E0EEF6}", + "details": { + "name": "int" + } + } + ] + }, + { + "base": "Erase", + "context": "{9F35DB06-62AD-55E0-9CDD-DF452612430C}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Erase" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Erase is invoked" + }, + "details": { + "name": "Erase" + }, + "params": [ + { + "typeid": "{9F35DB06-62AD-55E0-9CDD-DF452612430C}", + "details": { + "name": "AZStd::unordered_map" + } + }, + { + "typeid": "{110C4B14-11A8-4E9D-8638-5051013A56AC}", + "details": { + "name": "double" + } + } + ], + "results": [ + { + "typeid": "{9F35DB06-62AD-55E0-9CDD-DF452612430C}", + "details": { + "name": "AZStd::unordered_map" + } + } + ] + }, + { + "base": "EraseCheck_VM", + "context": "{9F35DB06-62AD-55E0-9CDD-DF452612430C}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke EraseCheck_VM" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after EraseCheck_VM is invoked" + }, + "details": { + "name": "EraseCheck_VM" + }, + "params": [ + { + "typeid": "{9F35DB06-62AD-55E0-9CDD-DF452612430C}", + "details": { + "name": "AZStd::unordered_map" + } + }, + { + "typeid": "{110C4B14-11A8-4E9D-8638-5051013A56AC}", + "details": { + "name": "double" + } + } + ], + "results": [ + { + "typeid": "{A0CA880C-AFE4-43CB-926C-59AC48496112}", + "details": { + "name": "bool" + } + } + ] + }, + { + "base": "Clear", + "context": "{9F35DB06-62AD-55E0-9CDD-DF452612430C}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Clear" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Clear is invoked" + }, + "details": { + "name": "Clear" + }, + "params": [ + { + "typeid": "{9F35DB06-62AD-55E0-9CDD-DF452612430C}", + "details": { + "name": "AZStd::unordered_map" + } + } + ], + "results": [ + { + "typeid": "{9F35DB06-62AD-55E0-9CDD-DF452612430C}", + "details": { + "name": "AZStd::unordered_map" + } + } + ] + }, + { + "base": "At", + "context": "{9F35DB06-62AD-55E0-9CDD-DF452612430C}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke At" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after At is invoked" + }, + "details": { + "name": "At" + }, + "params": [ + { + "typeid": "{9F35DB06-62AD-55E0-9CDD-DF452612430C}", + "details": { + "name": "AZStd::unordered_map" + } + }, + { + "typeid": "{110C4B14-11A8-4E9D-8638-5051013A56AC}", + "details": { + "name": "double" + } + } + ], + "results": [ + { + "typeid": "{03AAAB3F-5C47-5A66-9EBC-D5FA4DB353C9}", + "details": { + "name": "AZStd::string" + } + } + ] + }, + { + "base": "BucketCount", + "context": "{9F35DB06-62AD-55E0-9CDD-DF452612430C}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke BucketCount" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after BucketCount is invoked" + }, + "details": { + "name": "BucketCount" + }, + "params": [ + { + "typeid": "{9F35DB06-62AD-55E0-9CDD-DF452612430C}", + "details": { + "name": "AZStd::unordered_map" + } + } + ], + "results": [ + { + "typeid": "{D6597933-47CD-4FC8-B911-63F3E2B0993A}", + "details": { + "name": "AZ::u64" + } + } + ] + }, + { + "base": "Empty", + "context": "{9F35DB06-62AD-55E0-9CDD-DF452612430C}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Empty" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Empty is invoked" + }, + "details": { + "name": "Empty" + }, + "params": [ + { + "typeid": "{9F35DB06-62AD-55E0-9CDD-DF452612430C}", + "details": { + "name": "AZStd::unordered_map" + } + } + ], + "results": [ + { + "typeid": "{A0CA880C-AFE4-43CB-926C-59AC48496112}", + "details": { + "name": "bool" + } + } + ] + }, + { + "base": "Swap", + "context": "{9F35DB06-62AD-55E0-9CDD-DF452612430C}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Swap" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Swap is invoked" + }, + "details": { + "name": "Swap" + }, + "params": [ + { + "typeid": "{9F35DB06-62AD-55E0-9CDD-DF452612430C}", + "details": { + "name": "AZStd::unordered_map" + } + }, + { + "typeid": "{9F35DB06-62AD-55E0-9CDD-DF452612430C}", + "details": { + "name": "AZStd::unordered_map" + } + } + ] + } + ] + }, + { + "base": "{E9F4752C-BFCD-5F51-AA18-F47BDF358BFD}", + "context": "OnDemandReflected", + "variant": "", + "details": { + "name": "Outcome" + }, + "methods": [ + { + "base": "GetError", + "context": "{E9F4752C-BFCD-5F51-AA18-F47BDF358BFD}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke GetError" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after GetError is invoked" + }, + "details": { + "name": "GetError" + }, + "params": [ + { + "typeid": "{E9F4752C-BFCD-5F51-AA18-F47BDF358BFD}", + "details": { + "name": "Outcome, allocator>>" + } + } + ] + }, + { + "base": "GetValue", + "context": "{E9F4752C-BFCD-5F51-AA18-F47BDF358BFD}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke GetValue" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after GetValue is invoked" + }, + "details": { + "name": "GetValue" + }, + "params": [ + { + "typeid": "{E9F4752C-BFCD-5F51-AA18-F47BDF358BFD}", + "details": { + "name": "Outcome, allocator>>" + } + } + ] + } + ] + }, + { + "base": "{4599647A-45DD-585B-AFC0-4BAD29EB49A7}", + "context": "OnDemandReflected", + "variant": "", + "details": { + "name": "Array", + "category": "Array", + "tooltip": "A dynamically sized container of elements." + }, + "methods": [ + { + "base": "Size", + "context": "{4599647A-45DD-585B-AFC0-4BAD29EB49A7}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Size" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Size is invoked" + }, + "details": { + "name": "Size" + }, + "params": [ + { + "typeid": "{4599647A-45DD-585B-AFC0-4BAD29EB49A7}", + "details": { + "name": "AZStd::vector" + } + } + ], + "results": [ + { + "typeid": "{72039442-EB38-4D42-A1AD-CB68F7E0EEF6}", + "details": { + "name": "int" + } + } + ] + }, + { + "base": "Front", + "context": "{4599647A-45DD-585B-AFC0-4BAD29EB49A7}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Front" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Front is invoked" + }, + "details": { + "name": "Front" + }, + "params": [ + { + "typeid": "{4599647A-45DD-585B-AFC0-4BAD29EB49A7}", + "details": { + "name": "AZStd::vector" + } + } + ], + "results": [ + { + "typeid": "{8379EB7D-01FA-4538-B64B-A6543B4BE73D}", + "details": { + "name": "Vector3" + } + } + ] + }, + { + "base": "HasKey", + "context": "{4599647A-45DD-585B-AFC0-4BAD29EB49A7}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Has Key" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Has Key is invoked" + }, + "details": { + "name": "Has Key" + }, + "params": [ + { + "typeid": "{4599647A-45DD-585B-AFC0-4BAD29EB49A7}", + "details": { + "name": "AZStd::vector" + } + }, + { + "typeid": "{D6597933-47CD-4FC8-B911-63F3E2B0993A}", + "details": { + "name": "AZ::u64" + } + } + ], + "results": [ + { + "typeid": "{A0CA880C-AFE4-43CB-926C-59AC48496112}", + "details": { + "name": "bool" + } + } + ] + }, + { + "base": "Resize", + "context": "{4599647A-45DD-585B-AFC0-4BAD29EB49A7}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Resize" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Resize is invoked" + }, + "details": { + "name": "Resize" + }, + "params": [ + { + "typeid": "{4599647A-45DD-585B-AFC0-4BAD29EB49A7}", + "details": { + "name": "AZStd::vector" + } + }, + { + "typeid": "{D6597933-47CD-4FC8-B911-63F3E2B0993A}", + "details": { + "name": "AZ::u64" + } + } + ] + }, + { + "base": "at", + "context": "{4599647A-45DD-585B-AFC0-4BAD29EB49A7}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke at" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after at is invoked" + }, + "details": { + "name": "at" + }, + "params": [ + { + "typeid": "{4599647A-45DD-585B-AFC0-4BAD29EB49A7}", + "details": { + "name": "AZStd::vector" + } + }, + { + "typeid": "{D6597933-47CD-4FC8-B911-63F3E2B0993A}", + "details": { + "name": "AZ::u64" + } + } + ], + "results": [ + { + "typeid": "{8379EB7D-01FA-4538-B64B-A6543B4BE73D}", + "details": { + "name": "Vector3" + } + } + ] + }, + { + "base": "Back", + "context": "{4599647A-45DD-585B-AFC0-4BAD29EB49A7}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Back" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Back is invoked" + }, + "details": { + "name": "Back" + }, + "params": [ + { + "typeid": "{4599647A-45DD-585B-AFC0-4BAD29EB49A7}", + "details": { + "name": "AZStd::vector" + } + } + ], + "results": [ + { + "typeid": "{8379EB7D-01FA-4538-B64B-A6543B4BE73D}", + "details": { + "name": "Vector3" + } + } + ] + }, + { + "base": "pop_back", + "context": "{4599647A-45DD-585B-AFC0-4BAD29EB49A7}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke pop_back" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after pop_back is invoked" + }, + "details": { + "name": "pop_back" + }, + "params": [ + { + "typeid": "{4599647A-45DD-585B-AFC0-4BAD29EB49A7}", + "details": { + "name": "AZStd::vector" + } + } + ] + }, + { + "base": "size", + "context": "{4599647A-45DD-585B-AFC0-4BAD29EB49A7}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke size" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after size is invoked" + }, + "details": { + "name": "size" + }, + "params": [ + { + "typeid": "{4599647A-45DD-585B-AFC0-4BAD29EB49A7}", + "details": { + "name": "AZStd::vector" + } + } + ], + "results": [ + { + "typeid": "{72039442-EB38-4D42-A1AD-CB68F7E0EEF6}", + "details": { + "name": "int" + } + } + ] + }, + { + "base": "At", + "context": "{4599647A-45DD-585B-AFC0-4BAD29EB49A7}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke At" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after At is invoked" + }, + "details": { + "name": "At" + }, + "params": [ + { + "typeid": "{4599647A-45DD-585B-AFC0-4BAD29EB49A7}", + "details": { + "name": "AZStd::vector" + } + }, + { + "typeid": "{D6597933-47CD-4FC8-B911-63F3E2B0993A}", + "details": { + "name": "AZ::u64" + } + } + ], + "results": [ + { + "typeid": "{8379EB7D-01FA-4538-B64B-A6543B4BE73D}", + "details": { + "name": "Vector3" + } + } + ] + }, + { + "base": "Empty", + "context": "{4599647A-45DD-585B-AFC0-4BAD29EB49A7}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Empty" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Empty is invoked" + }, + "details": { + "name": "Empty" + }, + "params": [ + { + "typeid": "{4599647A-45DD-585B-AFC0-4BAD29EB49A7}", + "details": { + "name": "AZStd::vector" + } + } + ], + "results": [ + { + "typeid": "{A0CA880C-AFE4-43CB-926C-59AC48496112}", + "details": { + "name": "bool" + } + } + ] + }, + { + "base": "Swap", + "context": "{4599647A-45DD-585B-AFC0-4BAD29EB49A7}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Swap" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Swap is invoked" + }, + "details": { + "name": "Swap" + }, + "params": [ + { + "typeid": "{4599647A-45DD-585B-AFC0-4BAD29EB49A7}", + "details": { + "name": "AZStd::vector" + } + }, + { + "typeid": "{4599647A-45DD-585B-AFC0-4BAD29EB49A7}", + "details": { + "name": "AZStd::vector" + } + } + ] + }, + { + "base": "push_back", + "context": "{4599647A-45DD-585B-AFC0-4BAD29EB49A7}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke push_back" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after push_back is invoked" + }, + "details": { + "name": "push_back" + }, + "params": [ + { + "typeid": "{4599647A-45DD-585B-AFC0-4BAD29EB49A7}", + "details": { + "name": "AZStd::vector" + } + }, + { + "typeid": "{8379EB7D-01FA-4538-B64B-A6543B4BE73D}", + "details": { + "name": "Vector3" + } + } + ] + }, + { + "base": "PushBack_VM", + "context": "{4599647A-45DD-585B-AFC0-4BAD29EB49A7}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke PushBack_VM" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after PushBack_VM is invoked" + }, + "details": { + "name": "PushBack_VM" + }, + "params": [ + { + "typeid": "{4599647A-45DD-585B-AFC0-4BAD29EB49A7}", + "details": { + "name": "AZStd::vector" + } + }, + { + "typeid": "{8379EB7D-01FA-4538-B64B-A6543B4BE73D}", + "details": { + "name": "Vector3" + } + } + ], + "results": [ + { + "typeid": "{4599647A-45DD-585B-AFC0-4BAD29EB49A7}", + "details": { + "name": "AZStd::vector" + } + } + ] + }, + { + "base": "AtUnchecked", + "context": "{4599647A-45DD-585B-AFC0-4BAD29EB49A7}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke AtUnchecked" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after AtUnchecked is invoked" + }, + "details": { + "name": "AtUnchecked" + }, + "params": [ + { + "typeid": "{4599647A-45DD-585B-AFC0-4BAD29EB49A7}", + "details": { + "name": "AZStd::vector" + } + }, + { + "typeid": "{D6597933-47CD-4FC8-B911-63F3E2B0993A}", + "details": { + "name": "AZ::u64" + } + } + ], + "results": [ + { + "typeid": "{8379EB7D-01FA-4538-B64B-A6543B4BE73D}", + "details": { + "name": "Vector3" + } + } + ] + }, + { + "base": "clear", + "context": "{4599647A-45DD-585B-AFC0-4BAD29EB49A7}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke clear" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after clear is invoked" + }, + "details": { + "name": "clear" + }, + "params": [ + { + "typeid": "{4599647A-45DD-585B-AFC0-4BAD29EB49A7}", + "details": { + "name": "AZStd::vector" + } + } + ] + }, + { + "base": "NotEmpty", + "context": "{4599647A-45DD-585B-AFC0-4BAD29EB49A7}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke NotEmpty" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after NotEmpty is invoked" + }, + "details": { + "name": "NotEmpty" + }, + "params": [ + { + "typeid": "{4599647A-45DD-585B-AFC0-4BAD29EB49A7}", + "details": { + "name": "AZStd::vector" + } + } + ], + "results": [ + { + "typeid": "{A0CA880C-AFE4-43CB-926C-59AC48496112}", + "details": { + "name": "bool" + } + } + ] + }, + { + "base": "Erase_VM", + "context": "{4599647A-45DD-585B-AFC0-4BAD29EB49A7}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Erase_VM" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Erase_VM is invoked" + }, + "details": { + "name": "Erase_VM" + }, + "params": [ + { + "typeid": "{4599647A-45DD-585B-AFC0-4BAD29EB49A7}", + "details": { + "name": "AZStd::vector" + } + }, + { + "typeid": "{D6597933-47CD-4FC8-B911-63F3E2B0993A}", + "details": { + "name": "AZ::u64" + } + } + ], + "results": [ + { + "typeid": "{4599647A-45DD-585B-AFC0-4BAD29EB49A7}", + "details": { + "name": "AZStd::vector" + } + } + ] + }, + { + "base": "EraseCheck_VM", + "context": "{4599647A-45DD-585B-AFC0-4BAD29EB49A7}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke EraseCheck_VM" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after EraseCheck_VM is invoked" + }, + "details": { + "name": "EraseCheck_VM" + }, + "params": [ + { + "typeid": "{4599647A-45DD-585B-AFC0-4BAD29EB49A7}", + "details": { + "name": "AZStd::vector" + } + }, + { + "typeid": "{D6597933-47CD-4FC8-B911-63F3E2B0993A}", + "details": { + "name": "AZ::u64" + } + } + ], + "results": [ + { + "typeid": "{A0CA880C-AFE4-43CB-926C-59AC48496112}", + "details": { + "name": "bool" + } + } + ] + }, + { + "base": "Capacity", + "context": "{4599647A-45DD-585B-AFC0-4BAD29EB49A7}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Capacity" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Capacity is invoked" + }, + "details": { + "name": "Capacity" + }, + "params": [ + { + "typeid": "{4599647A-45DD-585B-AFC0-4BAD29EB49A7}", + "details": { + "name": "AZStd::vector" + } + } + ], + "results": [ + { + "typeid": "{D6597933-47CD-4FC8-B911-63F3E2B0993A}", + "details": { + "name": "AZ::u64" + } + } + ] + }, + { + "base": "Clear", + "context": "{4599647A-45DD-585B-AFC0-4BAD29EB49A7}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Clear" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Clear is invoked" + }, + "details": { + "name": "Clear" + }, + "params": [ + { + "typeid": "{4599647A-45DD-585B-AFC0-4BAD29EB49A7}", + "details": { + "name": "AZStd::vector" + } + } + ], + "results": [ + { + "typeid": "{4599647A-45DD-585B-AFC0-4BAD29EB49A7}", + "details": { + "name": "AZStd::vector" + } + } + ] + }, + { + "base": "AssignAt", + "context": "{4599647A-45DD-585B-AFC0-4BAD29EB49A7}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke AssignAt" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after AssignAt is invoked" + }, + "details": { + "name": "AssignAt" + }, + "params": [ + { + "typeid": "{4599647A-45DD-585B-AFC0-4BAD29EB49A7}", + "details": { + "name": "AZStd::vector" + } + }, + { + "typeid": "{D6597933-47CD-4FC8-B911-63F3E2B0993A}", + "details": { + "name": "AZ::u64" + } + }, + { + "typeid": "{8379EB7D-01FA-4538-B64B-A6543B4BE73D}", + "details": { + "name": "Vector3" + } + } + ] + }, + { + "base": "GetSize", + "context": "{4599647A-45DD-585B-AFC0-4BAD29EB49A7}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke GetSize" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after GetSize is invoked" + }, + "details": { + "name": "GetSize" + }, + "params": [ + { + "typeid": "{4599647A-45DD-585B-AFC0-4BAD29EB49A7}", + "details": { + "name": "AZStd::vector" + } + } + ], + "results": [ + { + "typeid": "{72039442-EB38-4D42-A1AD-CB68F7E0EEF6}", + "details": { + "name": "int" + } + } + ] + }, + { + "base": "Insert", + "context": "{4599647A-45DD-585B-AFC0-4BAD29EB49A7}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Insert" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Insert is invoked" + }, + "details": { + "name": "Insert" + }, + "params": [ + { + "typeid": "{4599647A-45DD-585B-AFC0-4BAD29EB49A7}", + "details": { + "name": "AZStd::vector" + } + }, + { + "typeid": "{D6597933-47CD-4FC8-B911-63F3E2B0993A}", + "details": { + "name": "AZ::u64" + } + }, + { + "typeid": "{8379EB7D-01FA-4538-B64B-A6543B4BE73D}", + "details": { + "name": "Vector3" + } + } + ], + "results": [ + { + "typeid": "{4599647A-45DD-585B-AFC0-4BAD29EB49A7}", + "details": { + "name": "AZStd::vector" + } + } + ] + }, + { + "base": "PushBack", + "context": "{4599647A-45DD-585B-AFC0-4BAD29EB49A7}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke PushBack" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after PushBack is invoked" + }, + "details": { + "name": "PushBack" + }, + "params": [ + { + "typeid": "{4599647A-45DD-585B-AFC0-4BAD29EB49A7}", + "details": { + "name": "AZStd::vector" + } + }, + { + "typeid": "{8379EB7D-01FA-4538-B64B-A6543B4BE73D}", + "details": { + "name": "Vector3" + } + } + ] + }, + { + "base": "Reserve", + "context": "{4599647A-45DD-585B-AFC0-4BAD29EB49A7}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Reserve" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Reserve is invoked" + }, + "details": { + "name": "Reserve" + }, + "params": [ + { + "typeid": "{4599647A-45DD-585B-AFC0-4BAD29EB49A7}", + "details": { + "name": "AZStd::vector" + } + }, + { + "typeid": "{D6597933-47CD-4FC8-B911-63F3E2B0993A}", + "details": { + "name": "AZ::u64" + } + } + ] + }, + { + "base": "Iterate_VM", + "context": "{4599647A-45DD-585B-AFC0-4BAD29EB49A7}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Iterate_VM" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Iterate_VM is invoked" + }, + "details": { + "name": "Iterate_VM" + }, + "params": [ + { + "typeid": "{4599647A-45DD-585B-AFC0-4BAD29EB49A7}", + "details": { + "name": "AZStd::vector" + } + } + ], + "results": [ + { + "typeid": "{65B7F9BE-6626-5683-A229-1548661F21D5}", + "details": { + "name": "Iterator_VM>" + } + } + ] + } + ] + }, + { + "base": "{4039D1BB-DA00-5C6B-AC80-6B892003D35F}", + "context": "OnDemandReflected", + "variant": "", + "details": { + "name": "Map", + "category": "Map", + "tooltip": "A collection of Key/Value pairs, where each Key value must be unique." + }, + "methods": [ + { + "base": "contains", + "context": "{4039D1BB-DA00-5C6B-AC80-6B892003D35F}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke contains" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after contains is invoked" + }, + "details": { + "name": "contains" + }, + "params": [ + { + "typeid": "{4039D1BB-DA00-5C6B-AC80-6B892003D35F}", + "details": { + "name": "AZStd::unordered_map" + } + }, + { + "typeid": "{A0CA880C-AFE4-43CB-926C-59AC48496112}", + "details": { + "name": "bool" + } + } + ], + "results": [ + { + "typeid": "{A0CA880C-AFE4-43CB-926C-59AC48496112}", + "details": { + "name": "bool" + } + } + ] + }, + { + "base": "Insert", + "context": "{4039D1BB-DA00-5C6B-AC80-6B892003D35F}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Insert" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Insert is invoked" + }, + "details": { + "name": "Insert" + }, + "params": [ + { + "typeid": "{4039D1BB-DA00-5C6B-AC80-6B892003D35F}", + "details": { + "name": "AZStd::unordered_map" + } + }, + { + "typeid": "{A0CA880C-AFE4-43CB-926C-59AC48496112}", + "details": { + "name": "bool" + } + }, + { + "typeid": "{652ED536-3402-439B-AEBE-4A5DBC554085}", + "details": { + "name": "AssetId" + } + } + ], + "results": [ + { + "typeid": "{4039D1BB-DA00-5C6B-AC80-6B892003D35F}", + "details": { + "name": "AZStd::unordered_map" + } + } + ] + }, + { + "base": "Reserve", + "context": "{4039D1BB-DA00-5C6B-AC80-6B892003D35F}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Reserve" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Reserve is invoked" + }, + "details": { + "name": "Reserve" + }, + "params": [ + { + "typeid": "{4039D1BB-DA00-5C6B-AC80-6B892003D35F}", + "details": { + "name": "AZStd::unordered_map" + } + }, + { + "typeid": "{D6597933-47CD-4FC8-B911-63F3E2B0993A}", + "details": { + "name": "AZ::u64" + } + } + ] + }, + { + "base": "GetSize", + "context": "{4039D1BB-DA00-5C6B-AC80-6B892003D35F}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke GetSize" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after GetSize is invoked" + }, + "details": { + "name": "GetSize" + }, + "params": [ + { + "typeid": "{4039D1BB-DA00-5C6B-AC80-6B892003D35F}", + "details": { + "name": "AZStd::unordered_map" + } + } + ], + "results": [ + { + "typeid": "{72039442-EB38-4D42-A1AD-CB68F7E0EEF6}", + "details": { + "name": "int" + } + } + ] + }, + { + "base": "Iterate_VM", + "context": "{4039D1BB-DA00-5C6B-AC80-6B892003D35F}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Iterate_VM" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Iterate_VM is invoked" + }, + "details": { + "name": "Iterate_VM" + }, + "params": [ + { + "typeid": "{4039D1BB-DA00-5C6B-AC80-6B892003D35F}", + "details": { + "name": "AZStd::unordered_map" + } + } + ], + "results": [ + { + "typeid": "{CAC409E1-5D4D-52F3-8D93-2E1B97C930EC}", + "details": { + "name": "Iterator_VM, AZStd::equal_to, allocator>>" + } + } + ] + }, + { + "base": "GetKeys", + "context": "{4039D1BB-DA00-5C6B-AC80-6B892003D35F}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke GetKeys" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after GetKeys is invoked" + }, + "details": { + "name": "GetKeys" + }, + "params": [ + { + "typeid": "{4039D1BB-DA00-5C6B-AC80-6B892003D35F}", + "details": { + "name": "AZStd::unordered_map" + } + } + ], + "results": [ + { + "typeid": "{B505B05D-57BF-5A45-9113-B3A2784E2CD7}", + "details": { + "name": "AZStd::vector" + } + } + ] + }, + { + "base": "Size", + "context": "{4039D1BB-DA00-5C6B-AC80-6B892003D35F}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Size" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Size is invoked" + }, + "details": { + "name": "Size" + }, + "params": [ + { + "typeid": "{4039D1BB-DA00-5C6B-AC80-6B892003D35F}", + "details": { + "name": "AZStd::unordered_map" + } + } + ], + "results": [ + { + "typeid": "{72039442-EB38-4D42-A1AD-CB68F7E0EEF6}", + "details": { + "name": "int" + } + } + ] + }, + { + "base": "Erase", + "context": "{4039D1BB-DA00-5C6B-AC80-6B892003D35F}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Erase" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Erase is invoked" + }, + "details": { + "name": "Erase" + }, + "params": [ + { + "typeid": "{4039D1BB-DA00-5C6B-AC80-6B892003D35F}", + "details": { + "name": "AZStd::unordered_map" + } + }, + { + "typeid": "{A0CA880C-AFE4-43CB-926C-59AC48496112}", + "details": { + "name": "bool" + } + } + ], + "results": [ + { + "typeid": "{4039D1BB-DA00-5C6B-AC80-6B892003D35F}", + "details": { + "name": "AZStd::unordered_map" + } + } + ] + }, + { + "base": "EraseCheck_VM", + "context": "{4039D1BB-DA00-5C6B-AC80-6B892003D35F}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke EraseCheck_VM" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after EraseCheck_VM is invoked" + }, + "details": { + "name": "EraseCheck_VM" + }, + "params": [ + { + "typeid": "{4039D1BB-DA00-5C6B-AC80-6B892003D35F}", + "details": { + "name": "AZStd::unordered_map" + } + }, + { + "typeid": "{A0CA880C-AFE4-43CB-926C-59AC48496112}", + "details": { + "name": "bool" + } + } + ], + "results": [ + { + "typeid": "{A0CA880C-AFE4-43CB-926C-59AC48496112}", + "details": { + "name": "bool" + } + } + ] + }, + { + "base": "Clear", + "context": "{4039D1BB-DA00-5C6B-AC80-6B892003D35F}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Clear" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Clear is invoked" + }, + "details": { + "name": "Clear" + }, + "params": [ + { + "typeid": "{4039D1BB-DA00-5C6B-AC80-6B892003D35F}", + "details": { + "name": "AZStd::unordered_map" + } + } + ], + "results": [ + { + "typeid": "{4039D1BB-DA00-5C6B-AC80-6B892003D35F}", + "details": { + "name": "AZStd::unordered_map" + } + } + ] + }, + { + "base": "At", + "context": "{4039D1BB-DA00-5C6B-AC80-6B892003D35F}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke At" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after At is invoked" + }, + "details": { + "name": "At" + }, + "params": [ + { + "typeid": "{4039D1BB-DA00-5C6B-AC80-6B892003D35F}", + "details": { + "name": "AZStd::unordered_map" + } + }, + { + "typeid": "{A0CA880C-AFE4-43CB-926C-59AC48496112}", + "details": { + "name": "bool" + } + } + ], + "results": [ + { + "typeid": "{652ED536-3402-439B-AEBE-4A5DBC554085}", + "details": { + "name": "AssetId" + } + } + ] + }, + { + "base": "BucketCount", + "context": "{4039D1BB-DA00-5C6B-AC80-6B892003D35F}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke BucketCount" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after BucketCount is invoked" + }, + "details": { + "name": "BucketCount" + }, + "params": [ + { + "typeid": "{4039D1BB-DA00-5C6B-AC80-6B892003D35F}", + "details": { + "name": "AZStd::unordered_map" + } + } + ], + "results": [ + { + "typeid": "{D6597933-47CD-4FC8-B911-63F3E2B0993A}", + "details": { + "name": "AZ::u64" + } + } + ] + }, + { + "base": "Empty", + "context": "{4039D1BB-DA00-5C6B-AC80-6B892003D35F}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Empty" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Empty is invoked" + }, + "details": { + "name": "Empty" + }, + "params": [ + { + "typeid": "{4039D1BB-DA00-5C6B-AC80-6B892003D35F}", + "details": { + "name": "AZStd::unordered_map" + } + } + ], + "results": [ + { + "typeid": "{A0CA880C-AFE4-43CB-926C-59AC48496112}", + "details": { + "name": "bool" + } + } + ] + }, + { + "base": "Swap", + "context": "{4039D1BB-DA00-5C6B-AC80-6B892003D35F}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Swap" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Swap is invoked" + }, + "details": { + "name": "Swap" + }, + "params": [ + { + "typeid": "{4039D1BB-DA00-5C6B-AC80-6B892003D35F}", + "details": { + "name": "AZStd::unordered_map" + } + }, + { + "typeid": "{4039D1BB-DA00-5C6B-AC80-6B892003D35F}", + "details": { + "name": "AZStd::unordered_map" + } + } + ] + } + ] + }, + { + "base": "{033C4408-7E4A-5382-81D8-102FC8336005}", + "context": "OnDemandReflected", + "variant": "", + "details": { + "name": "Map", + "category": "Map", + "tooltip": "A collection of Key/Value pairs, where each Key value must be unique." + }, + "methods": [ + { + "base": "contains", + "context": "{033C4408-7E4A-5382-81D8-102FC8336005}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke contains" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after contains is invoked" + }, + "details": { + "name": "contains" + }, + "params": [ + { + "typeid": "{033C4408-7E4A-5382-81D8-102FC8336005}", + "details": { + "name": "AZStd::unordered_map" + } + }, + { + "typeid": "{6383F1D3-BB27-4E6B-A49A-6409B2059EAA}", + "details": { + "name": "EntityId", + "tooltip": "Entity Unique Id" + } + } + ], + "results": [ + { + "typeid": "{A0CA880C-AFE4-43CB-926C-59AC48496112}", + "details": { + "name": "bool" + } + } + ] + }, + { + "base": "Insert", + "context": "{033C4408-7E4A-5382-81D8-102FC8336005}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Insert" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Insert is invoked" + }, + "details": { + "name": "Insert" + }, + "params": [ + { + "typeid": "{033C4408-7E4A-5382-81D8-102FC8336005}", + "details": { + "name": "AZStd::unordered_map" + } + }, + { + "typeid": "{6383F1D3-BB27-4E6B-A49A-6409B2059EAA}", + "details": { + "name": "EntityId", + "tooltip": "Entity Unique Id" + } + }, + { + "typeid": "{0CE9FA36-1E3A-4C06-9254-B7C73A732053}", + "details": { + "name": "Vector4" + } + } + ], + "results": [ + { + "typeid": "{033C4408-7E4A-5382-81D8-102FC8336005}", + "details": { + "name": "AZStd::unordered_map" + } + } + ] + }, + { + "base": "Reserve", + "context": "{033C4408-7E4A-5382-81D8-102FC8336005}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Reserve" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Reserve is invoked" + }, + "details": { + "name": "Reserve" + }, + "params": [ + { + "typeid": "{033C4408-7E4A-5382-81D8-102FC8336005}", + "details": { + "name": "AZStd::unordered_map" + } + }, + { + "typeid": "{D6597933-47CD-4FC8-B911-63F3E2B0993A}", + "details": { + "name": "AZ::u64" + } + } + ] + }, + { + "base": "GetSize", + "context": "{033C4408-7E4A-5382-81D8-102FC8336005}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke GetSize" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after GetSize is invoked" + }, + "details": { + "name": "GetSize" + }, + "params": [ + { + "typeid": "{033C4408-7E4A-5382-81D8-102FC8336005}", + "details": { + "name": "AZStd::unordered_map" + } + } + ], + "results": [ + { + "typeid": "{72039442-EB38-4D42-A1AD-CB68F7E0EEF6}", + "details": { + "name": "int" + } + } + ] + }, + { + "base": "Iterate_VM", + "context": "{033C4408-7E4A-5382-81D8-102FC8336005}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Iterate_VM" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Iterate_VM is invoked" + }, + "details": { + "name": "Iterate_VM" + }, + "params": [ + { + "typeid": "{033C4408-7E4A-5382-81D8-102FC8336005}", + "details": { + "name": "AZStd::unordered_map" + } + } + ], + "results": [ + { + "typeid": "{BFB0DE1D-7E54-5AF9-8FCB-AFCD69B4A2CF}", + "details": { + "name": "Iterator_VM, AZStd::equal_to, allocator>>" + } + } + ] + }, + { + "base": "GetKeys", + "context": "{033C4408-7E4A-5382-81D8-102FC8336005}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke GetKeys" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after GetKeys is invoked" + }, + "details": { + "name": "GetKeys" + }, + "params": [ + { + "typeid": "{033C4408-7E4A-5382-81D8-102FC8336005}", + "details": { + "name": "AZStd::unordered_map" + } + } + ], + "results": [ + { + "typeid": "{4841CFF0-7A5C-519C-BD16-D3625E99605E}", + "details": { + "name": "AZStd::vector" + } + } + ] + }, + { + "base": "Size", + "context": "{033C4408-7E4A-5382-81D8-102FC8336005}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Size" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Size is invoked" + }, + "details": { + "name": "Size" + }, + "params": [ + { + "typeid": "{033C4408-7E4A-5382-81D8-102FC8336005}", + "details": { + "name": "AZStd::unordered_map" + } + } + ], + "results": [ + { + "typeid": "{72039442-EB38-4D42-A1AD-CB68F7E0EEF6}", + "details": { + "name": "int" + } + } + ] + }, + { + "base": "Erase", + "context": "{033C4408-7E4A-5382-81D8-102FC8336005}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Erase" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Erase is invoked" + }, + "details": { + "name": "Erase" + }, + "params": [ + { + "typeid": "{033C4408-7E4A-5382-81D8-102FC8336005}", + "details": { + "name": "AZStd::unordered_map" + } + }, + { + "typeid": "{6383F1D3-BB27-4E6B-A49A-6409B2059EAA}", + "details": { + "name": "EntityId", + "tooltip": "Entity Unique Id" + } + } + ], + "results": [ + { + "typeid": "{033C4408-7E4A-5382-81D8-102FC8336005}", + "details": { + "name": "AZStd::unordered_map" + } + } + ] + }, + { + "base": "EraseCheck_VM", + "context": "{033C4408-7E4A-5382-81D8-102FC8336005}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke EraseCheck_VM" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after EraseCheck_VM is invoked" + }, + "details": { + "name": "EraseCheck_VM" + }, + "params": [ + { + "typeid": "{033C4408-7E4A-5382-81D8-102FC8336005}", + "details": { + "name": "AZStd::unordered_map" + } + }, + { + "typeid": "{6383F1D3-BB27-4E6B-A49A-6409B2059EAA}", + "details": { + "name": "EntityId", + "tooltip": "Entity Unique Id" + } + } + ], + "results": [ + { + "typeid": "{A0CA880C-AFE4-43CB-926C-59AC48496112}", + "details": { + "name": "bool" + } + } + ] + }, + { + "base": "Clear", + "context": "{033C4408-7E4A-5382-81D8-102FC8336005}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Clear" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Clear is invoked" + }, + "details": { + "name": "Clear" + }, + "params": [ + { + "typeid": "{033C4408-7E4A-5382-81D8-102FC8336005}", + "details": { + "name": "AZStd::unordered_map" + } + } + ], + "results": [ + { + "typeid": "{033C4408-7E4A-5382-81D8-102FC8336005}", + "details": { + "name": "AZStd::unordered_map" + } + } + ] + }, + { + "base": "At", + "context": "{033C4408-7E4A-5382-81D8-102FC8336005}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke At" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after At is invoked" + }, + "details": { + "name": "At" + }, + "params": [ + { + "typeid": "{033C4408-7E4A-5382-81D8-102FC8336005}", + "details": { + "name": "AZStd::unordered_map" + } + }, + { + "typeid": "{6383F1D3-BB27-4E6B-A49A-6409B2059EAA}", + "details": { + "name": "EntityId", + "tooltip": "Entity Unique Id" + } + } + ], + "results": [ + { + "typeid": "{0CE9FA36-1E3A-4C06-9254-B7C73A732053}", + "details": { + "name": "Vector4" + } + } + ] + }, + { + "base": "BucketCount", + "context": "{033C4408-7E4A-5382-81D8-102FC8336005}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke BucketCount" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after BucketCount is invoked" + }, + "details": { + "name": "BucketCount" + }, + "params": [ + { + "typeid": "{033C4408-7E4A-5382-81D8-102FC8336005}", + "details": { + "name": "AZStd::unordered_map" + } + } + ], + "results": [ + { + "typeid": "{D6597933-47CD-4FC8-B911-63F3E2B0993A}", + "details": { + "name": "AZ::u64" + } + } + ] + }, + { + "base": "Empty", + "context": "{033C4408-7E4A-5382-81D8-102FC8336005}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Empty" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Empty is invoked" + }, + "details": { + "name": "Empty" + }, + "params": [ + { + "typeid": "{033C4408-7E4A-5382-81D8-102FC8336005}", + "details": { + "name": "AZStd::unordered_map" + } + } + ], + "results": [ + { + "typeid": "{A0CA880C-AFE4-43CB-926C-59AC48496112}", + "details": { + "name": "bool" + } + } + ] + }, + { + "base": "Swap", + "context": "{033C4408-7E4A-5382-81D8-102FC8336005}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Swap" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Swap is invoked" + }, + "details": { + "name": "Swap" + }, + "params": [ + { + "typeid": "{033C4408-7E4A-5382-81D8-102FC8336005}", + "details": { + "name": "AZStd::unordered_map" + } + }, + { + "typeid": "{033C4408-7E4A-5382-81D8-102FC8336005}", + "details": { + "name": "AZStd::unordered_map" + } + } + ] + } + ] + }, + { + "base": "{3750867E-BD2D-52A2-B93B-51032E86C4D4}", + "context": "OnDemandReflected", + "variant": "", + "details": { + "name": "Tuple" + }, + "methods": [ + { + "base": "GetSize", + "context": "{3750867E-BD2D-52A2-B93B-51032E86C4D4}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke GetSize" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after GetSize is invoked" + }, + "details": { + "name": "GetSize" + }, + "results": [ + { + "typeid": "{D6597933-47CD-4FC8-B911-63F3E2B0993A}", + "details": { + "name": "AZ::u64" + } + } + ] + }, + { + "base": "Get3", + "context": "{3750867E-BD2D-52A2-B93B-51032E86C4D4}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Get3" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Get3 is invoked" + }, + "details": { + "name": "Get3" + }, + "params": [ + { + "typeid": "{3750867E-BD2D-52A2-B93B-51032E86C4D4}", + "details": { + "name": "tuple&" + } + } + ], + "results": [ + { + "typeid": "{0CE9FA36-1E3A-4C06-9254-B7C73A732053}", + "details": { + "name": "Vector4" + } + } + ] + }, + { + "base": "Get2", + "context": "{3750867E-BD2D-52A2-B93B-51032E86C4D4}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Get2" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Get2 is invoked" + }, + "details": { + "name": "Get2" + }, + "params": [ + { + "typeid": "{3750867E-BD2D-52A2-B93B-51032E86C4D4}", + "details": { + "name": "tuple&" + } + } + ], + "results": [ + { + "typeid": "{0CE9FA36-1E3A-4C06-9254-B7C73A732053}", + "details": { + "name": "Vector4" + } + } + ] + }, + { + "base": "Get1", + "context": "{3750867E-BD2D-52A2-B93B-51032E86C4D4}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Get1" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Get1 is invoked" + }, + "details": { + "name": "Get1" + }, + "params": [ + { + "typeid": "{3750867E-BD2D-52A2-B93B-51032E86C4D4}", + "details": { + "name": "tuple&" + } + } + ], + "results": [ + { + "typeid": "{0CE9FA36-1E3A-4C06-9254-B7C73A732053}", + "details": { + "name": "Vector4" + } + } + ] + }, + { + "base": "Get0", + "context": "{3750867E-BD2D-52A2-B93B-51032E86C4D4}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Get0" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Get0 is invoked" + }, + "details": { + "name": "Get0" + }, + "params": [ + { + "typeid": "{3750867E-BD2D-52A2-B93B-51032E86C4D4}", + "details": { + "name": "tuple&" + } + } + ], + "results": [ + { + "typeid": "{0CE9FA36-1E3A-4C06-9254-B7C73A732053}", + "details": { + "name": "Vector4" + } + } + ] + } + ] + }, + { + "base": "{C9789111-6A18-4C6E-81A7-87D057D59D2C}", + "context": "OnDemandReflected", + "variant": "", + "details": { + "name": "EntityEntity_VM" + }, + "methods": [ + { + "base": "ToString", + "context": "{C9789111-6A18-4C6E-81A7-87D057D59D2C}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke ToString" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after ToString is invoked" + }, + "details": { + "name": "ToString" + }, + "params": [ + { + "typeid": "{6383F1D3-BB27-4E6B-A49A-6409B2059EAA}", + "details": { + "name": "EntityId", + "tooltip": "Entity Unique Id" + } + } + ], + "results": [ + { + "typeid": "{03AAAB3F-5C47-5A66-9EBC-D5FA4DB353C9}", + "details": { + "name": "AZStd::string" + } + } + ] + }, + { + "base": "IsValid", + "context": "{C9789111-6A18-4C6E-81A7-87D057D59D2C}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke IsValid" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after IsValid is invoked" + }, + "details": { + "name": "IsValid" + }, + "params": [ + { + "typeid": "{6383F1D3-BB27-4E6B-A49A-6409B2059EAA}", + "details": { + "name": "EntityId", + "tooltip": "Entity Unique Id" + } + } + ], + "results": [ + { + "typeid": "{A0CA880C-AFE4-43CB-926C-59AC48496112}", + "details": { + "name": "bool" + } + } + ] + }, + { + "base": "GetEntityForward", + "context": "{C9789111-6A18-4C6E-81A7-87D057D59D2C}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke GetEntityForward" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after GetEntityForward is invoked" + }, + "details": { + "name": "GetEntityForward" + }, + "params": [ + { + "typeid": "{6383F1D3-BB27-4E6B-A49A-6409B2059EAA}", + "details": { + "name": "EntityId", + "tooltip": "Entity Unique Id" + } + }, + { + "typeid": "{110C4B14-11A8-4E9D-8638-5051013A56AC}", + "details": { + "name": "double" + } + } + ], + "results": [ + { + "typeid": "{8379EB7D-01FA-4538-B64B-A6543B4BE73D}", + "details": { + "name": "Vector3" + } + } + ] + }, + { + "base": "IsActive", + "context": "{C9789111-6A18-4C6E-81A7-87D057D59D2C}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke IsActive" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after IsActive is invoked" + }, + "details": { + "name": "IsActive" + }, + "params": [ + { + "typeid": "{6383F1D3-BB27-4E6B-A49A-6409B2059EAA}", + "details": { + "name": "EntityId", + "tooltip": "Entity Unique Id" + } + } + ], + "results": [ + { + "typeid": "{A0CA880C-AFE4-43CB-926C-59AC48496112}", + "details": { + "name": "bool" + } + } + ] + }, + { + "base": "GetEntityRight", + "context": "{C9789111-6A18-4C6E-81A7-87D057D59D2C}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke GetEntityRight" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after GetEntityRight is invoked" + }, + "details": { + "name": "GetEntityRight" + }, + "params": [ + { + "typeid": "{6383F1D3-BB27-4E6B-A49A-6409B2059EAA}", + "details": { + "name": "EntityId", + "tooltip": "Entity Unique Id" + } + }, + { + "typeid": "{110C4B14-11A8-4E9D-8638-5051013A56AC}", + "details": { + "name": "double" + } + } + ], + "results": [ + { + "typeid": "{8379EB7D-01FA-4538-B64B-A6543B4BE73D}", + "details": { + "name": "Vector3" + } + } + ] + }, + { + "base": "GetEntityUp", + "context": "{C9789111-6A18-4C6E-81A7-87D057D59D2C}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke GetEntityUp" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after GetEntityUp is invoked" + }, + "details": { + "name": "GetEntityUp" + }, + "params": [ + { + "typeid": "{6383F1D3-BB27-4E6B-A49A-6409B2059EAA}", + "details": { + "name": "EntityId", + "tooltip": "Entity Unique Id" + } + }, + { + "typeid": "{110C4B14-11A8-4E9D-8638-5051013A56AC}", + "details": { + "name": "double" + } + } + ], + "results": [ + { + "typeid": "{8379EB7D-01FA-4538-B64B-A6543B4BE73D}", + "details": { + "name": "Vector3" + } + } + ] + } + ] + }, + { + "base": "{CC6E9A58-8CB0-540D-A06D-4337A8C4FE91}", + "context": "OnDemandReflected", + "variant": "", + "details": { + "name": "Map", + "category": "Map", + "tooltip": "A collection of Key/Value pairs, where each Key value must be unique." + }, + "methods": [ + { + "base": "contains", + "context": "{CC6E9A58-8CB0-540D-A06D-4337A8C4FE91}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke contains" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after contains is invoked" + }, + "details": { + "name": "contains" + }, + "params": [ + { + "typeid": "{CC6E9A58-8CB0-540D-A06D-4337A8C4FE91}", + "details": { + "name": "AZStd::unordered_map" + } + }, + { + "typeid": "{03AAAB3F-5C47-5A66-9EBC-D5FA4DB353C9}", + "details": { + "name": "AZStd::string" + } + } + ], + "results": [ + { + "typeid": "{A0CA880C-AFE4-43CB-926C-59AC48496112}", + "details": { + "name": "bool" + } + } + ] + }, + { + "base": "Insert", + "context": "{CC6E9A58-8CB0-540D-A06D-4337A8C4FE91}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Insert" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Insert is invoked" + }, + "details": { + "name": "Insert" + }, + "params": [ + { + "typeid": "{CC6E9A58-8CB0-540D-A06D-4337A8C4FE91}", + "details": { + "name": "AZStd::unordered_map" + } + }, + { + "typeid": "{03AAAB3F-5C47-5A66-9EBC-D5FA4DB353C9}", + "details": { + "name": "AZStd::string" + } + }, + { + "typeid": "{73103120-3DD3-4873-BAB3-9713FA2804FB}", + "details": { + "name": "Quaternion" + } + } + ], + "results": [ + { + "typeid": "{CC6E9A58-8CB0-540D-A06D-4337A8C4FE91}", + "details": { + "name": "AZStd::unordered_map" + } + } + ] + }, + { + "base": "Reserve", + "context": "{CC6E9A58-8CB0-540D-A06D-4337A8C4FE91}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Reserve" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Reserve is invoked" + }, + "details": { + "name": "Reserve" + }, + "params": [ + { + "typeid": "{CC6E9A58-8CB0-540D-A06D-4337A8C4FE91}", + "details": { + "name": "AZStd::unordered_map" + } + }, + { + "typeid": "{D6597933-47CD-4FC8-B911-63F3E2B0993A}", + "details": { + "name": "AZ::u64" + } + } + ] + }, + { + "base": "GetSize", + "context": "{CC6E9A58-8CB0-540D-A06D-4337A8C4FE91}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke GetSize" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after GetSize is invoked" + }, + "details": { + "name": "GetSize" + }, + "params": [ + { + "typeid": "{CC6E9A58-8CB0-540D-A06D-4337A8C4FE91}", + "details": { + "name": "AZStd::unordered_map" + } + } + ], + "results": [ + { + "typeid": "{72039442-EB38-4D42-A1AD-CB68F7E0EEF6}", + "details": { + "name": "int" + } + } + ] + }, + { + "base": "Iterate_VM", + "context": "{CC6E9A58-8CB0-540D-A06D-4337A8C4FE91}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Iterate_VM" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Iterate_VM is invoked" + }, + "details": { + "name": "Iterate_VM" + }, + "params": [ + { + "typeid": "{CC6E9A58-8CB0-540D-A06D-4337A8C4FE91}", + "details": { + "name": "AZStd::unordered_map" + } + } + ], + "results": [ + { + "typeid": "{2F861214-1C7E-50A0-9CDF-0E6DFCE9C00C}", + "details": { + "name": "Iterator_VM, allocator>, Quaternion, AZStd::hash", + "category": "Map", + "tooltip": "A collection of Key/Value pairs, where each Key value must be unique." + }, + "methods": [ + { + "base": "contains", + "context": "{3E047B85-9AA0-5540-9744-373DBD4AD4CA}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke contains" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after contains is invoked" + }, + "details": { + "name": "contains" + }, + "params": [ + { + "typeid": "{3E047B85-9AA0-5540-9744-373DBD4AD4CA}", + "details": { + "name": "AZStd::unordered_map" + } + }, + { + "typeid": "{A0CA880C-AFE4-43CB-926C-59AC48496112}", + "details": { + "name": "bool" + } + } + ], + "results": [ + { + "typeid": "{A0CA880C-AFE4-43CB-926C-59AC48496112}", + "details": { + "name": "bool" + } + } + ] + }, + { + "base": "Insert", + "context": "{3E047B85-9AA0-5540-9744-373DBD4AD4CA}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Insert" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Insert is invoked" + }, + "details": { + "name": "Insert" + }, + "params": [ + { + "typeid": "{3E047B85-9AA0-5540-9744-373DBD4AD4CA}", + "details": { + "name": "AZStd::unordered_map" + } + }, + { + "typeid": "{A0CA880C-AFE4-43CB-926C-59AC48496112}", + "details": { + "name": "bool" + } + }, + { + "typeid": "{847DD984-9DBF-4789-8E25-E0334402E8AD}", + "details": { + "name": "Plane" + } + } + ], + "results": [ + { + "typeid": "{3E047B85-9AA0-5540-9744-373DBD4AD4CA}", + "details": { + "name": "AZStd::unordered_map" + } + } + ] + }, + { + "base": "Reserve", + "context": "{3E047B85-9AA0-5540-9744-373DBD4AD4CA}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Reserve" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Reserve is invoked" + }, + "details": { + "name": "Reserve" + }, + "params": [ + { + "typeid": "{3E047B85-9AA0-5540-9744-373DBD4AD4CA}", + "details": { + "name": "AZStd::unordered_map" + } + }, + { + "typeid": "{D6597933-47CD-4FC8-B911-63F3E2B0993A}", + "details": { + "name": "AZ::u64" + } + } + ] + }, + { + "base": "GetSize", + "context": "{3E047B85-9AA0-5540-9744-373DBD4AD4CA}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke GetSize" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after GetSize is invoked" + }, + "details": { + "name": "GetSize" + }, + "params": [ + { + "typeid": "{3E047B85-9AA0-5540-9744-373DBD4AD4CA}", + "details": { + "name": "AZStd::unordered_map" + } + } + ], + "results": [ + { + "typeid": "{72039442-EB38-4D42-A1AD-CB68F7E0EEF6}", + "details": { + "name": "int" + } + } + ] + }, + { + "base": "Iterate_VM", + "context": "{3E047B85-9AA0-5540-9744-373DBD4AD4CA}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Iterate_VM" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Iterate_VM is invoked" + }, + "details": { + "name": "Iterate_VM" + }, + "params": [ + { + "typeid": "{3E047B85-9AA0-5540-9744-373DBD4AD4CA}", + "details": { + "name": "AZStd::unordered_map" + } + } + ], + "results": [ + { + "typeid": "{F395BF38-F0A1-5058-95D1-7F73871EFE4B}", + "details": { + "name": "Iterator_VM, AZStd::equal_to, allocator>>" + } + } + ] + }, + { + "base": "GetKeys", + "context": "{3E047B85-9AA0-5540-9744-373DBD4AD4CA}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke GetKeys" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after GetKeys is invoked" + }, + "details": { + "name": "GetKeys" + }, + "params": [ + { + "typeid": "{3E047B85-9AA0-5540-9744-373DBD4AD4CA}", + "details": { + "name": "AZStd::unordered_map" + } + } + ], + "results": [ + { + "typeid": "{B505B05D-57BF-5A45-9113-B3A2784E2CD7}", + "details": { + "name": "AZStd::vector" + } + } + ] + }, + { + "base": "Size", + "context": "{3E047B85-9AA0-5540-9744-373DBD4AD4CA}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Size" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Size is invoked" + }, + "details": { + "name": "Size" + }, + "params": [ + { + "typeid": "{3E047B85-9AA0-5540-9744-373DBD4AD4CA}", + "details": { + "name": "AZStd::unordered_map" + } + } + ], + "results": [ + { + "typeid": "{72039442-EB38-4D42-A1AD-CB68F7E0EEF6}", + "details": { + "name": "int" + } + } + ] + }, + { + "base": "Erase", + "context": "{3E047B85-9AA0-5540-9744-373DBD4AD4CA}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Erase" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Erase is invoked" + }, + "details": { + "name": "Erase" + }, + "params": [ + { + "typeid": "{3E047B85-9AA0-5540-9744-373DBD4AD4CA}", + "details": { + "name": "AZStd::unordered_map" + } + }, + { + "typeid": "{A0CA880C-AFE4-43CB-926C-59AC48496112}", + "details": { + "name": "bool" + } + } + ], + "results": [ + { + "typeid": "{3E047B85-9AA0-5540-9744-373DBD4AD4CA}", + "details": { + "name": "AZStd::unordered_map" + } + } + ] + }, + { + "base": "EraseCheck_VM", + "context": "{3E047B85-9AA0-5540-9744-373DBD4AD4CA}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke EraseCheck_VM" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after EraseCheck_VM is invoked" + }, + "details": { + "name": "EraseCheck_VM" + }, + "params": [ + { + "typeid": "{3E047B85-9AA0-5540-9744-373DBD4AD4CA}", + "details": { + "name": "AZStd::unordered_map" + } + }, + { + "typeid": "{A0CA880C-AFE4-43CB-926C-59AC48496112}", + "details": { + "name": "bool" + } + } + ], + "results": [ + { + "typeid": "{A0CA880C-AFE4-43CB-926C-59AC48496112}", + "details": { + "name": "bool" + } + } + ] + }, + { + "base": "Clear", + "context": "{3E047B85-9AA0-5540-9744-373DBD4AD4CA}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Clear" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Clear is invoked" + }, + "details": { + "name": "Clear" + }, + "params": [ + { + "typeid": "{3E047B85-9AA0-5540-9744-373DBD4AD4CA}", + "details": { + "name": "AZStd::unordered_map" + } + } + ], + "results": [ + { + "typeid": "{3E047B85-9AA0-5540-9744-373DBD4AD4CA}", + "details": { + "name": "AZStd::unordered_map" + } + } + ] + }, + { + "base": "At", + "context": "{3E047B85-9AA0-5540-9744-373DBD4AD4CA}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke At" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after At is invoked" + }, + "details": { + "name": "At" + }, + "params": [ + { + "typeid": "{3E047B85-9AA0-5540-9744-373DBD4AD4CA}", + "details": { + "name": "AZStd::unordered_map" + } + }, + { + "typeid": "{A0CA880C-AFE4-43CB-926C-59AC48496112}", + "details": { + "name": "bool" + } + } + ], + "results": [ + { + "typeid": "{847DD984-9DBF-4789-8E25-E0334402E8AD}", + "details": { + "name": "Plane" + } + } + ] + }, + { + "base": "BucketCount", + "context": "{3E047B85-9AA0-5540-9744-373DBD4AD4CA}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke BucketCount" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after BucketCount is invoked" + }, + "details": { + "name": "BucketCount" + }, + "params": [ + { + "typeid": "{3E047B85-9AA0-5540-9744-373DBD4AD4CA}", + "details": { + "name": "AZStd::unordered_map" + } + } + ], + "results": [ + { + "typeid": "{D6597933-47CD-4FC8-B911-63F3E2B0993A}", + "details": { + "name": "AZ::u64" + } + } + ] + }, + { + "base": "Empty", + "context": "{3E047B85-9AA0-5540-9744-373DBD4AD4CA}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Empty" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Empty is invoked" + }, + "details": { + "name": "Empty" + }, + "params": [ + { + "typeid": "{3E047B85-9AA0-5540-9744-373DBD4AD4CA}", + "details": { + "name": "AZStd::unordered_map" + } + } + ], + "results": [ + { + "typeid": "{A0CA880C-AFE4-43CB-926C-59AC48496112}", + "details": { + "name": "bool" + } + } + ] + }, + { + "base": "Swap", + "context": "{3E047B85-9AA0-5540-9744-373DBD4AD4CA}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Swap" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Swap is invoked" + }, + "details": { + "name": "Swap" + }, + "params": [ + { + "typeid": "{3E047B85-9AA0-5540-9744-373DBD4AD4CA}", + "details": { + "name": "AZStd::unordered_map" + } + }, + { + "typeid": "{3E047B85-9AA0-5540-9744-373DBD4AD4CA}", + "details": { + "name": "AZStd::unordered_map" + } + } + ] + } + ] + }, + { + "base": "{A2ED5341-A86D-5564-99AF-8BCDED62C751}", + "context": "OnDemandReflected", + "variant": "", + "details": { + "name": "Map", + "category": "Map", + "tooltip": "A collection of Key/Value pairs, where each Key value must be unique." + }, + "methods": [ + { + "base": "contains", + "context": "{A2ED5341-A86D-5564-99AF-8BCDED62C751}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke contains" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after contains is invoked" + }, + "details": { + "name": "contains" + }, + "params": [ + { + "typeid": "{A2ED5341-A86D-5564-99AF-8BCDED62C751}", + "details": { + "name": "AZStd::unordered_map" + } + }, + { + "typeid": "{652ED536-3402-439B-AEBE-4A5DBC554085}", + "details": { + "name": "AssetId" + } + } + ], + "results": [ + { + "typeid": "{A0CA880C-AFE4-43CB-926C-59AC48496112}", + "details": { + "name": "bool" + } + } + ] + }, + { + "base": "Insert", + "context": "{A2ED5341-A86D-5564-99AF-8BCDED62C751}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Insert" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Insert is invoked" + }, + "details": { + "name": "Insert" + }, + "params": [ + { + "typeid": "{A2ED5341-A86D-5564-99AF-8BCDED62C751}", + "details": { + "name": "AZStd::unordered_map" + } + }, + { + "typeid": "{652ED536-3402-439B-AEBE-4A5DBC554085}", + "details": { + "name": "AssetId" + } + }, + { + "typeid": "{73103120-3DD3-4873-BAB3-9713FA2804FB}", + "details": { + "name": "Quaternion" + } + } + ], + "results": [ + { + "typeid": "{A2ED5341-A86D-5564-99AF-8BCDED62C751}", + "details": { + "name": "AZStd::unordered_map" + } + } + ] + }, + { + "base": "Reserve", + "context": "{A2ED5341-A86D-5564-99AF-8BCDED62C751}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Reserve" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Reserve is invoked" + }, + "details": { + "name": "Reserve" + }, + "params": [ + { + "typeid": "{A2ED5341-A86D-5564-99AF-8BCDED62C751}", + "details": { + "name": "AZStd::unordered_map" + } + }, + { + "typeid": "{D6597933-47CD-4FC8-B911-63F3E2B0993A}", + "details": { + "name": "AZ::u64" + } + } + ] + }, + { + "base": "GetSize", + "context": "{A2ED5341-A86D-5564-99AF-8BCDED62C751}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke GetSize" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after GetSize is invoked" + }, + "details": { + "name": "GetSize" + }, + "params": [ + { + "typeid": "{A2ED5341-A86D-5564-99AF-8BCDED62C751}", + "details": { + "name": "AZStd::unordered_map" + } + } + ], + "results": [ + { + "typeid": "{72039442-EB38-4D42-A1AD-CB68F7E0EEF6}", + "details": { + "name": "int" + } + } + ] + }, + { + "base": "Iterate_VM", + "context": "{A2ED5341-A86D-5564-99AF-8BCDED62C751}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Iterate_VM" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Iterate_VM is invoked" + }, + "details": { + "name": "Iterate_VM" + }, + "params": [ + { + "typeid": "{A2ED5341-A86D-5564-99AF-8BCDED62C751}", + "details": { + "name": "AZStd::unordered_map" + } + } + ], + "results": [ + { + "typeid": "{AE6BDE8F-93C9-51F8-9219-CF8C135AD729}", + "details": { + "name": "Iterator_VM, AZStd::equal_to, allocator>>" + } + } + ] + }, + { + "base": "GetKeys", + "context": "{A2ED5341-A86D-5564-99AF-8BCDED62C751}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke GetKeys" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after GetKeys is invoked" + }, + "details": { + "name": "GetKeys" + }, + "params": [ + { + "typeid": "{A2ED5341-A86D-5564-99AF-8BCDED62C751}", + "details": { + "name": "AZStd::unordered_map" + } + } + ], + "results": [ + { + "typeid": "{877C4A33-39B5-51D7-948D-F97DB81372A1}", + "details": { + "name": "AZStd::vector" + } + } + ] + }, + { + "base": "Size", + "context": "{A2ED5341-A86D-5564-99AF-8BCDED62C751}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Size" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Size is invoked" + }, + "details": { + "name": "Size" + }, + "params": [ + { + "typeid": "{A2ED5341-A86D-5564-99AF-8BCDED62C751}", + "details": { + "name": "AZStd::unordered_map" + } + } + ], + "results": [ + { + "typeid": "{72039442-EB38-4D42-A1AD-CB68F7E0EEF6}", + "details": { + "name": "int" + } + } + ] + }, + { + "base": "Erase", + "context": "{A2ED5341-A86D-5564-99AF-8BCDED62C751}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Erase" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Erase is invoked" + }, + "details": { + "name": "Erase" + }, + "params": [ + { + "typeid": "{A2ED5341-A86D-5564-99AF-8BCDED62C751}", + "details": { + "name": "AZStd::unordered_map" + } + }, + { + "typeid": "{652ED536-3402-439B-AEBE-4A5DBC554085}", + "details": { + "name": "AssetId" + } + } + ], + "results": [ + { + "typeid": "{A2ED5341-A86D-5564-99AF-8BCDED62C751}", + "details": { + "name": "AZStd::unordered_map" + } + } + ] + }, + { + "base": "EraseCheck_VM", + "context": "{A2ED5341-A86D-5564-99AF-8BCDED62C751}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke EraseCheck_VM" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after EraseCheck_VM is invoked" + }, + "details": { + "name": "EraseCheck_VM" + }, + "params": [ + { + "typeid": "{A2ED5341-A86D-5564-99AF-8BCDED62C751}", + "details": { + "name": "AZStd::unordered_map" + } + }, + { + "typeid": "{652ED536-3402-439B-AEBE-4A5DBC554085}", + "details": { + "name": "AssetId" + } + } + ], + "results": [ + { + "typeid": "{A0CA880C-AFE4-43CB-926C-59AC48496112}", + "details": { + "name": "bool" + } + } + ] + }, + { + "base": "Clear", + "context": "{A2ED5341-A86D-5564-99AF-8BCDED62C751}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Clear" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Clear is invoked" + }, + "details": { + "name": "Clear" + }, + "params": [ + { + "typeid": "{A2ED5341-A86D-5564-99AF-8BCDED62C751}", + "details": { + "name": "AZStd::unordered_map" + } + } + ], + "results": [ + { + "typeid": "{A2ED5341-A86D-5564-99AF-8BCDED62C751}", + "details": { + "name": "AZStd::unordered_map" + } + } + ] + }, + { + "base": "At", + "context": "{A2ED5341-A86D-5564-99AF-8BCDED62C751}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke At" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after At is invoked" + }, + "details": { + "name": "At" + }, + "params": [ + { + "typeid": "{A2ED5341-A86D-5564-99AF-8BCDED62C751}", + "details": { + "name": "AZStd::unordered_map" + } + }, + { + "typeid": "{652ED536-3402-439B-AEBE-4A5DBC554085}", + "details": { + "name": "AssetId" + } + } + ], + "results": [ + { + "typeid": "{73103120-3DD3-4873-BAB3-9713FA2804FB}", + "details": { + "name": "Quaternion" + } + } + ] + }, + { + "base": "BucketCount", + "context": "{A2ED5341-A86D-5564-99AF-8BCDED62C751}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke BucketCount" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after BucketCount is invoked" + }, + "details": { + "name": "BucketCount" + }, + "params": [ + { + "typeid": "{A2ED5341-A86D-5564-99AF-8BCDED62C751}", + "details": { + "name": "AZStd::unordered_map" + } + } + ], + "results": [ + { + "typeid": "{D6597933-47CD-4FC8-B911-63F3E2B0993A}", + "details": { + "name": "AZ::u64" + } + } + ] + }, + { + "base": "Empty", + "context": "{A2ED5341-A86D-5564-99AF-8BCDED62C751}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Empty" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Empty is invoked" + }, + "details": { + "name": "Empty" + }, + "params": [ + { + "typeid": "{A2ED5341-A86D-5564-99AF-8BCDED62C751}", + "details": { + "name": "AZStd::unordered_map" + } + } + ], + "results": [ + { + "typeid": "{A0CA880C-AFE4-43CB-926C-59AC48496112}", + "details": { + "name": "bool" + } + } + ] + }, + { + "base": "Swap", + "context": "{A2ED5341-A86D-5564-99AF-8BCDED62C751}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Swap" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Swap is invoked" + }, + "details": { + "name": "Swap" + }, + "params": [ + { + "typeid": "{A2ED5341-A86D-5564-99AF-8BCDED62C751}", + "details": { + "name": "AZStd::unordered_map" + } + }, + { + "typeid": "{A2ED5341-A86D-5564-99AF-8BCDED62C751}", + "details": { + "name": "AZStd::unordered_map" + } + } + ] + } + ] + }, + { + "base": "{EB781DCB-CD92-51EF-B490-3628FE48E880}", + "context": "OnDemandReflected", + "variant": "", + "details": { + "name": "Map", + "category": "Map", + "tooltip": "A collection of Key/Value pairs, where each Key value must be unique." + }, + "methods": [ + { + "base": "contains", + "context": "{EB781DCB-CD92-51EF-B490-3628FE48E880}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke contains" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after contains is invoked" + }, + "details": { + "name": "contains" + }, + "params": [ + { + "typeid": "{EB781DCB-CD92-51EF-B490-3628FE48E880}", + "details": { + "name": "AZStd::unordered_map" + } + }, + { + "typeid": "{110C4B14-11A8-4E9D-8638-5051013A56AC}", + "details": { + "name": "double" + } + } + ], + "results": [ + { + "typeid": "{A0CA880C-AFE4-43CB-926C-59AC48496112}", + "details": { + "name": "bool" + } + } + ] + }, + { + "base": "Insert", + "context": "{EB781DCB-CD92-51EF-B490-3628FE48E880}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Insert" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Insert is invoked" + }, + "details": { + "name": "Insert" + }, + "params": [ + { + "typeid": "{EB781DCB-CD92-51EF-B490-3628FE48E880}", + "details": { + "name": "AZStd::unordered_map" + } + }, + { + "typeid": "{110C4B14-11A8-4E9D-8638-5051013A56AC}", + "details": { + "name": "double" + } + }, + { + "typeid": "{73103120-3DD3-4873-BAB3-9713FA2804FB}", + "details": { + "name": "Quaternion" + } + } + ], + "results": [ + { + "typeid": "{EB781DCB-CD92-51EF-B490-3628FE48E880}", + "details": { + "name": "AZStd::unordered_map" + } + } + ] + }, + { + "base": "Reserve", + "context": "{EB781DCB-CD92-51EF-B490-3628FE48E880}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Reserve" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Reserve is invoked" + }, + "details": { + "name": "Reserve" + }, + "params": [ + { + "typeid": "{EB781DCB-CD92-51EF-B490-3628FE48E880}", + "details": { + "name": "AZStd::unordered_map" + } + }, + { + "typeid": "{D6597933-47CD-4FC8-B911-63F3E2B0993A}", + "details": { + "name": "AZ::u64" + } + } + ] + }, + { + "base": "GetSize", + "context": "{EB781DCB-CD92-51EF-B490-3628FE48E880}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke GetSize" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after GetSize is invoked" + }, + "details": { + "name": "GetSize" + }, + "params": [ + { + "typeid": "{EB781DCB-CD92-51EF-B490-3628FE48E880}", + "details": { + "name": "AZStd::unordered_map" + } + } + ], + "results": [ + { + "typeid": "{72039442-EB38-4D42-A1AD-CB68F7E0EEF6}", + "details": { + "name": "int" + } + } + ] + }, + { + "base": "Iterate_VM", + "context": "{EB781DCB-CD92-51EF-B490-3628FE48E880}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Iterate_VM" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Iterate_VM is invoked" + }, + "details": { + "name": "Iterate_VM" + }, + "params": [ + { + "typeid": "{EB781DCB-CD92-51EF-B490-3628FE48E880}", + "details": { + "name": "AZStd::unordered_map" + } + } + ], + "results": [ + { + "typeid": "{B83ACCD0-46E7-50E2-951D-9654B8606BA4}", + "details": { + "name": "Iterator_VM, AZStd::equal_to, allocator>>" + } + } + ] + }, + { + "base": "GetKeys", + "context": "{EB781DCB-CD92-51EF-B490-3628FE48E880}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke GetKeys" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after GetKeys is invoked" + }, + "details": { + "name": "GetKeys" + }, + "params": [ + { + "typeid": "{EB781DCB-CD92-51EF-B490-3628FE48E880}", + "details": { + "name": "AZStd::unordered_map" + } + } + ], + "results": [ + { + "typeid": "{F31F64EA-E384-5536-ACD6-8F01849730FC}", + "details": { + "name": "AZStd::vector" + } + } + ] + }, + { + "base": "Size", + "context": "{EB781DCB-CD92-51EF-B490-3628FE48E880}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Size" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Size is invoked" + }, + "details": { + "name": "Size" + }, + "params": [ + { + "typeid": "{EB781DCB-CD92-51EF-B490-3628FE48E880}", + "details": { + "name": "AZStd::unordered_map" + } + } + ], + "results": [ + { + "typeid": "{72039442-EB38-4D42-A1AD-CB68F7E0EEF6}", + "details": { + "name": "int" + } + } + ] + }, + { + "base": "Erase", + "context": "{EB781DCB-CD92-51EF-B490-3628FE48E880}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Erase" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Erase is invoked" + }, + "details": { + "name": "Erase" + }, + "params": [ + { + "typeid": "{EB781DCB-CD92-51EF-B490-3628FE48E880}", + "details": { + "name": "AZStd::unordered_map" + } + }, + { + "typeid": "{110C4B14-11A8-4E9D-8638-5051013A56AC}", + "details": { + "name": "double" + } + } + ], + "results": [ + { + "typeid": "{EB781DCB-CD92-51EF-B490-3628FE48E880}", + "details": { + "name": "AZStd::unordered_map" + } + } + ] + }, + { + "base": "EraseCheck_VM", + "context": "{EB781DCB-CD92-51EF-B490-3628FE48E880}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke EraseCheck_VM" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after EraseCheck_VM is invoked" + }, + "details": { + "name": "EraseCheck_VM" + }, + "params": [ + { + "typeid": "{EB781DCB-CD92-51EF-B490-3628FE48E880}", + "details": { + "name": "AZStd::unordered_map" + } + }, + { + "typeid": "{110C4B14-11A8-4E9D-8638-5051013A56AC}", + "details": { + "name": "double" + } + } + ], + "results": [ + { + "typeid": "{A0CA880C-AFE4-43CB-926C-59AC48496112}", + "details": { + "name": "bool" + } + } + ] + }, + { + "base": "Clear", + "context": "{EB781DCB-CD92-51EF-B490-3628FE48E880}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Clear" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Clear is invoked" + }, + "details": { + "name": "Clear" + }, + "params": [ + { + "typeid": "{EB781DCB-CD92-51EF-B490-3628FE48E880}", + "details": { + "name": "AZStd::unordered_map" + } + } + ], + "results": [ + { + "typeid": "{EB781DCB-CD92-51EF-B490-3628FE48E880}", + "details": { + "name": "AZStd::unordered_map" + } + } + ] + }, + { + "base": "At", + "context": "{EB781DCB-CD92-51EF-B490-3628FE48E880}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke At" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after At is invoked" + }, + "details": { + "name": "At" + }, + "params": [ + { + "typeid": "{EB781DCB-CD92-51EF-B490-3628FE48E880}", + "details": { + "name": "AZStd::unordered_map" + } + }, + { + "typeid": "{110C4B14-11A8-4E9D-8638-5051013A56AC}", + "details": { + "name": "double" + } + } + ], + "results": [ + { + "typeid": "{73103120-3DD3-4873-BAB3-9713FA2804FB}", + "details": { + "name": "Quaternion" + } + } + ] + }, + { + "base": "BucketCount", + "context": "{EB781DCB-CD92-51EF-B490-3628FE48E880}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke BucketCount" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after BucketCount is invoked" + }, + "details": { + "name": "BucketCount" + }, + "params": [ + { + "typeid": "{EB781DCB-CD92-51EF-B490-3628FE48E880}", + "details": { + "name": "AZStd::unordered_map" + } + } + ], + "results": [ + { + "typeid": "{D6597933-47CD-4FC8-B911-63F3E2B0993A}", + "details": { + "name": "AZ::u64" + } + } + ] + }, + { + "base": "Empty", + "context": "{EB781DCB-CD92-51EF-B490-3628FE48E880}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Empty" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Empty is invoked" + }, + "details": { + "name": "Empty" + }, + "params": [ + { + "typeid": "{EB781DCB-CD92-51EF-B490-3628FE48E880}", + "details": { + "name": "AZStd::unordered_map" + } + } + ], + "results": [ + { + "typeid": "{A0CA880C-AFE4-43CB-926C-59AC48496112}", + "details": { + "name": "bool" + } + } + ] + }, + { + "base": "Swap", + "context": "{EB781DCB-CD92-51EF-B490-3628FE48E880}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Swap" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Swap is invoked" + }, + "details": { + "name": "Swap" + }, + "params": [ + { + "typeid": "{EB781DCB-CD92-51EF-B490-3628FE48E880}", + "details": { + "name": "AZStd::unordered_map" + } + }, + { + "typeid": "{EB781DCB-CD92-51EF-B490-3628FE48E880}", + "details": { + "name": "AZStd::unordered_map" + } + } + ] + } + ] + }, + { + "base": "{6ACECB77-D489-52CF-8473-9116466ABC59}", + "context": "OnDemandReflected", + "variant": "", + "details": { + "name": "Event, allocator> >" + }, + "methods": [ + { + "base": "HasHandlerConnected", + "context": "{6ACECB77-D489-52CF-8473-9116466ABC59}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke HasHandlerConnected" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after HasHandlerConnected is invoked" + }, + "details": { + "name": "HasHandlerConnected" + }, + "params": [ + { + "typeid": "{6ACECB77-D489-52CF-8473-9116466ABC59}", + "details": { + "name": "Event" + }, + "methods": [ + { + "base": "has_value", + "context": "{858A22B8-1B5E-5016-BF33-B2469DD9CAD3}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke has_value" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after has_value is invoked" + }, + "details": { + "name": "has_value" + }, + "params": [ + { + "typeid": "{858A22B8-1B5E-5016-BF33-B2469DD9CAD3}", + "details": { + "name": "AZStd::optional" + } + } + ], + "results": [ + { + "typeid": "{A0CA880C-AFE4-43CB-926C-59AC48496112}", + "details": { + "name": "bool" + } + } + ] + }, + { + "base": "__bool__", + "context": "{858A22B8-1B5E-5016-BF33-B2469DD9CAD3}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke __bool__" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after __bool__ is invoked" + }, + "details": { + "name": "__bool__" + }, + "params": [ + { + "typeid": "{858A22B8-1B5E-5016-BF33-B2469DD9CAD3}", + "details": { + "name": "AZStd::optional" + } + } + ], + "results": [ + { + "typeid": "{A0CA880C-AFE4-43CB-926C-59AC48496112}", + "details": { + "name": "bool" + } + } + ] + }, + { + "base": "value", + "context": "{858A22B8-1B5E-5016-BF33-B2469DD9CAD3}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke value" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after value is invoked" + }, + "details": { + "name": "value" + }, + "params": [ + { + "typeid": "{858A22B8-1B5E-5016-BF33-B2469DD9CAD3}", + "details": { + "name": "AZStd::optional" + } + } + ], + "results": [ + { + "typeid": "{D6597933-47CD-4FC8-B911-63F3E2B0993A}", + "details": { + "name": "AZ::u64" + } + } + ] + }, + { + "base": "value_or", + "context": "{858A22B8-1B5E-5016-BF33-B2469DD9CAD3}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke value_or" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after value_or is invoked" + }, + "details": { + "name": "value_or" + }, + "params": [ + { + "typeid": "{858A22B8-1B5E-5016-BF33-B2469DD9CAD3}", + "details": { + "name": "AZStd::optional" + } + }, + { + "typeid": "{D6597933-47CD-4FC8-B911-63F3E2B0993A}", + "details": { + "name": "AZ::u64" + } + } + ], + "results": [ + { + "typeid": "{D6597933-47CD-4FC8-B911-63F3E2B0993A}", + "details": { + "name": "AZ::u64" + } + } + ] + } + ] + }, + { + "base": "{C985C516-C64B-5821-9A82-06DBAE6734CA}", + "context": "OnDemandReflected", + "variant": "", + "details": { + "name": "Map", + "category": "Map", + "tooltip": "A collection of Key/Value pairs, where each Key value must be unique." + }, + "methods": [ + { + "base": "contains", + "context": "{C985C516-C64B-5821-9A82-06DBAE6734CA}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke contains" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after contains is invoked" + }, + "details": { + "name": "contains" + }, + "params": [ + { + "typeid": "{C985C516-C64B-5821-9A82-06DBAE6734CA}", + "details": { + "name": "AZStd::unordered_map" + } + }, + { + "typeid": "{A0CA880C-AFE4-43CB-926C-59AC48496112}", + "details": { + "name": "bool" + } + } + ], + "results": [ + { + "typeid": "{A0CA880C-AFE4-43CB-926C-59AC48496112}", + "details": { + "name": "bool" + } + } + ] + }, + { + "base": "Insert", + "context": "{C985C516-C64B-5821-9A82-06DBAE6734CA}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Insert" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Insert is invoked" + }, + "details": { + "name": "Insert" + }, + "params": [ + { + "typeid": "{C985C516-C64B-5821-9A82-06DBAE6734CA}", + "details": { + "name": "AZStd::unordered_map" + } + }, + { + "typeid": "{A0CA880C-AFE4-43CB-926C-59AC48496112}", + "details": { + "name": "bool" + } + }, + { + "typeid": "{03AAAB3F-5C47-5A66-9EBC-D5FA4DB353C9}", + "details": { + "name": "AZStd::string" + } + } + ], + "results": [ + { + "typeid": "{C985C516-C64B-5821-9A82-06DBAE6734CA}", + "details": { + "name": "AZStd::unordered_map" + } + } + ] + }, + { + "base": "Reserve", + "context": "{C985C516-C64B-5821-9A82-06DBAE6734CA}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Reserve" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Reserve is invoked" + }, + "details": { + "name": "Reserve" + }, + "params": [ + { + "typeid": "{C985C516-C64B-5821-9A82-06DBAE6734CA}", + "details": { + "name": "AZStd::unordered_map" + } + }, + { + "typeid": "{D6597933-47CD-4FC8-B911-63F3E2B0993A}", + "details": { + "name": "AZ::u64" + } + } + ] + }, + { + "base": "GetSize", + "context": "{C985C516-C64B-5821-9A82-06DBAE6734CA}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke GetSize" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after GetSize is invoked" + }, + "details": { + "name": "GetSize" + }, + "params": [ + { + "typeid": "{C985C516-C64B-5821-9A82-06DBAE6734CA}", + "details": { + "name": "AZStd::unordered_map" + } + } + ], + "results": [ + { + "typeid": "{72039442-EB38-4D42-A1AD-CB68F7E0EEF6}", + "details": { + "name": "int" + } + } + ] + }, + { + "base": "Iterate_VM", + "context": "{C985C516-C64B-5821-9A82-06DBAE6734CA}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Iterate_VM" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Iterate_VM is invoked" + }, + "details": { + "name": "Iterate_VM" + }, + "params": [ + { + "typeid": "{C985C516-C64B-5821-9A82-06DBAE6734CA}", + "details": { + "name": "AZStd::unordered_map" + } + } + ], + "results": [ + { + "typeid": "{BC94A0EC-1BB3-53FD-B546-BF5626FF225A}", + "details": { + "name": "Iterator_VM, allocator>, AZStd::hash, AZStd" + } + } + ] + }, + { + "base": "GetKeys", + "context": "{C985C516-C64B-5821-9A82-06DBAE6734CA}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke GetKeys" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after GetKeys is invoked" + }, + "details": { + "name": "GetKeys" + }, + "params": [ + { + "typeid": "{C985C516-C64B-5821-9A82-06DBAE6734CA}", + "details": { + "name": "AZStd::unordered_map" + } + } + ], + "results": [ + { + "typeid": "{B505B05D-57BF-5A45-9113-B3A2784E2CD7}", + "details": { + "name": "AZStd::vector" + } + } + ] + }, + { + "base": "Size", + "context": "{C985C516-C64B-5821-9A82-06DBAE6734CA}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Size" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Size is invoked" + }, + "details": { + "name": "Size" + }, + "params": [ + { + "typeid": "{C985C516-C64B-5821-9A82-06DBAE6734CA}", + "details": { + "name": "AZStd::unordered_map" + } + } + ], + "results": [ + { + "typeid": "{72039442-EB38-4D42-A1AD-CB68F7E0EEF6}", + "details": { + "name": "int" + } + } + ] + }, + { + "base": "Erase", + "context": "{C985C516-C64B-5821-9A82-06DBAE6734CA}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Erase" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Erase is invoked" + }, + "details": { + "name": "Erase" + }, + "params": [ + { + "typeid": "{C985C516-C64B-5821-9A82-06DBAE6734CA}", + "details": { + "name": "AZStd::unordered_map" + } + }, + { + "typeid": "{A0CA880C-AFE4-43CB-926C-59AC48496112}", + "details": { + "name": "bool" + } + } + ], + "results": [ + { + "typeid": "{C985C516-C64B-5821-9A82-06DBAE6734CA}", + "details": { + "name": "AZStd::unordered_map" + } + } + ] + }, + { + "base": "EraseCheck_VM", + "context": "{C985C516-C64B-5821-9A82-06DBAE6734CA}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke EraseCheck_VM" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after EraseCheck_VM is invoked" + }, + "details": { + "name": "EraseCheck_VM" + }, + "params": [ + { + "typeid": "{C985C516-C64B-5821-9A82-06DBAE6734CA}", + "details": { + "name": "AZStd::unordered_map" + } + }, + { + "typeid": "{A0CA880C-AFE4-43CB-926C-59AC48496112}", + "details": { + "name": "bool" + } + } + ], + "results": [ + { + "typeid": "{A0CA880C-AFE4-43CB-926C-59AC48496112}", + "details": { + "name": "bool" + } + } + ] + }, + { + "base": "Clear", + "context": "{C985C516-C64B-5821-9A82-06DBAE6734CA}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Clear" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Clear is invoked" + }, + "details": { + "name": "Clear" + }, + "params": [ + { + "typeid": "{C985C516-C64B-5821-9A82-06DBAE6734CA}", + "details": { + "name": "AZStd::unordered_map" + } + } + ], + "results": [ + { + "typeid": "{C985C516-C64B-5821-9A82-06DBAE6734CA}", + "details": { + "name": "AZStd::unordered_map" + } + } + ] + }, + { + "base": "At", + "context": "{C985C516-C64B-5821-9A82-06DBAE6734CA}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke At" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after At is invoked" + }, + "details": { + "name": "At" + }, + "params": [ + { + "typeid": "{C985C516-C64B-5821-9A82-06DBAE6734CA}", + "details": { + "name": "AZStd::unordered_map" + } + }, + { + "typeid": "{A0CA880C-AFE4-43CB-926C-59AC48496112}", + "details": { + "name": "bool" + } + } + ], + "results": [ + { + "typeid": "{03AAAB3F-5C47-5A66-9EBC-D5FA4DB353C9}", + "details": { + "name": "AZStd::string" + } + } + ] + }, + { + "base": "BucketCount", + "context": "{C985C516-C64B-5821-9A82-06DBAE6734CA}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke BucketCount" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after BucketCount is invoked" + }, + "details": { + "name": "BucketCount" + }, + "params": [ + { + "typeid": "{C985C516-C64B-5821-9A82-06DBAE6734CA}", + "details": { + "name": "AZStd::unordered_map" + } + } + ], + "results": [ + { + "typeid": "{D6597933-47CD-4FC8-B911-63F3E2B0993A}", + "details": { + "name": "AZ::u64" + } + } + ] + }, + { + "base": "Empty", + "context": "{C985C516-C64B-5821-9A82-06DBAE6734CA}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Empty" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Empty is invoked" + }, + "details": { + "name": "Empty" + }, + "params": [ + { + "typeid": "{C985C516-C64B-5821-9A82-06DBAE6734CA}", + "details": { + "name": "AZStd::unordered_map" + } + } + ], + "results": [ + { + "typeid": "{A0CA880C-AFE4-43CB-926C-59AC48496112}", + "details": { + "name": "bool" + } + } + ] + }, + { + "base": "Swap", + "context": "{C985C516-C64B-5821-9A82-06DBAE6734CA}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Swap" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Swap is invoked" + }, + "details": { + "name": "Swap" + }, + "params": [ + { + "typeid": "{C985C516-C64B-5821-9A82-06DBAE6734CA}", + "details": { + "name": "AZStd::unordered_map" + } + }, + { + "typeid": "{C985C516-C64B-5821-9A82-06DBAE6734CA}", + "details": { + "name": "AZStd::unordered_map" + } + } + ] + } + ] + }, + { + "base": "{6BBF646F-D689-5D24-9596-05ED6A785D2F}", + "context": "OnDemandReflected", + "variant": "", + "details": { + "name": "Map", + "category": "Map", + "tooltip": "A collection of Key/Value pairs, where each Key value must be unique." + }, + "methods": [ + { + "base": "contains", + "context": "{6BBF646F-D689-5D24-9596-05ED6A785D2F}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke contains" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after contains is invoked" + }, + "details": { + "name": "contains" + }, + "params": [ + { + "typeid": "{6BBF646F-D689-5D24-9596-05ED6A785D2F}", + "details": { + "name": "AZStd::unordered_map" + } + }, + { + "typeid": "{110C4B14-11A8-4E9D-8638-5051013A56AC}", + "details": { + "name": "double" + } + } + ], + "results": [ + { + "typeid": "{A0CA880C-AFE4-43CB-926C-59AC48496112}", + "details": { + "name": "bool" + } + } + ] + }, + { + "base": "Insert", + "context": "{6BBF646F-D689-5D24-9596-05ED6A785D2F}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Insert" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Insert is invoked" + }, + "details": { + "name": "Insert" + }, + "params": [ + { + "typeid": "{6BBF646F-D689-5D24-9596-05ED6A785D2F}", + "details": { + "name": "AZStd::unordered_map" + } + }, + { + "typeid": "{110C4B14-11A8-4E9D-8638-5051013A56AC}", + "details": { + "name": "double" + } + }, + { + "typeid": "{157193C7-B673-4A2B-8B43-5681DCC3DEC3}", + "details": { + "name": "Matrix4x4" + } + } + ], + "results": [ + { + "typeid": "{6BBF646F-D689-5D24-9596-05ED6A785D2F}", + "details": { + "name": "AZStd::unordered_map" + } + } + ] + }, + { + "base": "Reserve", + "context": "{6BBF646F-D689-5D24-9596-05ED6A785D2F}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Reserve" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Reserve is invoked" + }, + "details": { + "name": "Reserve" + }, + "params": [ + { + "typeid": "{6BBF646F-D689-5D24-9596-05ED6A785D2F}", + "details": { + "name": "AZStd::unordered_map" + } + }, + { + "typeid": "{D6597933-47CD-4FC8-B911-63F3E2B0993A}", + "details": { + "name": "AZ::u64" + } + } + ] + }, + { + "base": "GetSize", + "context": "{6BBF646F-D689-5D24-9596-05ED6A785D2F}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke GetSize" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after GetSize is invoked" + }, + "details": { + "name": "GetSize" + }, + "params": [ + { + "typeid": "{6BBF646F-D689-5D24-9596-05ED6A785D2F}", + "details": { + "name": "AZStd::unordered_map" + } + } + ], + "results": [ + { + "typeid": "{72039442-EB38-4D42-A1AD-CB68F7E0EEF6}", + "details": { + "name": "int" + } + } + ] + }, + { + "base": "Iterate_VM", + "context": "{6BBF646F-D689-5D24-9596-05ED6A785D2F}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Iterate_VM" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Iterate_VM is invoked" + }, + "details": { + "name": "Iterate_VM" + }, + "params": [ + { + "typeid": "{6BBF646F-D689-5D24-9596-05ED6A785D2F}", + "details": { + "name": "AZStd::unordered_map" + } + } + ], + "results": [ + { + "typeid": "{5DA33F96-B4DD-56CC-9D0C-8A71119ECED5}", + "details": { + "name": "Iterator_VM, AZStd::equal_to, allocator>>" + } + } + ] + }, + { + "base": "GetKeys", + "context": "{6BBF646F-D689-5D24-9596-05ED6A785D2F}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke GetKeys" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after GetKeys is invoked" + }, + "details": { + "name": "GetKeys" + }, + "params": [ + { + "typeid": "{6BBF646F-D689-5D24-9596-05ED6A785D2F}", + "details": { + "name": "AZStd::unordered_map" + } + } + ], + "results": [ + { + "typeid": "{F31F64EA-E384-5536-ACD6-8F01849730FC}", + "details": { + "name": "AZStd::vector" + } + } + ] + }, + { + "base": "Size", + "context": "{6BBF646F-D689-5D24-9596-05ED6A785D2F}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Size" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Size is invoked" + }, + "details": { + "name": "Size" + }, + "params": [ + { + "typeid": "{6BBF646F-D689-5D24-9596-05ED6A785D2F}", + "details": { + "name": "AZStd::unordered_map" + } + } + ], + "results": [ + { + "typeid": "{72039442-EB38-4D42-A1AD-CB68F7E0EEF6}", + "details": { + "name": "int" + } + } + ] + }, + { + "base": "Erase", + "context": "{6BBF646F-D689-5D24-9596-05ED6A785D2F}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Erase" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Erase is invoked" + }, + "details": { + "name": "Erase" + }, + "params": [ + { + "typeid": "{6BBF646F-D689-5D24-9596-05ED6A785D2F}", + "details": { + "name": "AZStd::unordered_map" + } + }, + { + "typeid": "{110C4B14-11A8-4E9D-8638-5051013A56AC}", + "details": { + "name": "double" + } + } + ], + "results": [ + { + "typeid": "{6BBF646F-D689-5D24-9596-05ED6A785D2F}", + "details": { + "name": "AZStd::unordered_map" + } + } + ] + }, + { + "base": "EraseCheck_VM", + "context": "{6BBF646F-D689-5D24-9596-05ED6A785D2F}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke EraseCheck_VM" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after EraseCheck_VM is invoked" + }, + "details": { + "name": "EraseCheck_VM" + }, + "params": [ + { + "typeid": "{6BBF646F-D689-5D24-9596-05ED6A785D2F}", + "details": { + "name": "AZStd::unordered_map" + } + }, + { + "typeid": "{110C4B14-11A8-4E9D-8638-5051013A56AC}", + "details": { + "name": "double" + } + } + ], + "results": [ + { + "typeid": "{A0CA880C-AFE4-43CB-926C-59AC48496112}", + "details": { + "name": "bool" + } + } + ] + }, + { + "base": "Clear", + "context": "{6BBF646F-D689-5D24-9596-05ED6A785D2F}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Clear" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Clear is invoked" + }, + "details": { + "name": "Clear" + }, + "params": [ + { + "typeid": "{6BBF646F-D689-5D24-9596-05ED6A785D2F}", + "details": { + "name": "AZStd::unordered_map" + } + } + ], + "results": [ + { + "typeid": "{6BBF646F-D689-5D24-9596-05ED6A785D2F}", + "details": { + "name": "AZStd::unordered_map" + } + } + ] + }, + { + "base": "At", + "context": "{6BBF646F-D689-5D24-9596-05ED6A785D2F}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke At" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after At is invoked" + }, + "details": { + "name": "At" + }, + "params": [ + { + "typeid": "{6BBF646F-D689-5D24-9596-05ED6A785D2F}", + "details": { + "name": "AZStd::unordered_map" + } + }, + { + "typeid": "{110C4B14-11A8-4E9D-8638-5051013A56AC}", + "details": { + "name": "double" + } + } + ], + "results": [ + { + "typeid": "{157193C7-B673-4A2B-8B43-5681DCC3DEC3}", + "details": { + "name": "Matrix4x4" + } + } + ] + }, + { + "base": "BucketCount", + "context": "{6BBF646F-D689-5D24-9596-05ED6A785D2F}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke BucketCount" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after BucketCount is invoked" + }, + "details": { + "name": "BucketCount" + }, + "params": [ + { + "typeid": "{6BBF646F-D689-5D24-9596-05ED6A785D2F}", + "details": { + "name": "AZStd::unordered_map" + } + } + ], + "results": [ + { + "typeid": "{D6597933-47CD-4FC8-B911-63F3E2B0993A}", + "details": { + "name": "AZ::u64" + } + } + ] + }, + { + "base": "Empty", + "context": "{6BBF646F-D689-5D24-9596-05ED6A785D2F}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Empty" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Empty is invoked" + }, + "details": { + "name": "Empty" + }, + "params": [ + { + "typeid": "{6BBF646F-D689-5D24-9596-05ED6A785D2F}", + "details": { + "name": "AZStd::unordered_map" + } + } + ], + "results": [ + { + "typeid": "{A0CA880C-AFE4-43CB-926C-59AC48496112}", + "details": { + "name": "bool" + } + } + ] + }, + { + "base": "Swap", + "context": "{6BBF646F-D689-5D24-9596-05ED6A785D2F}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Swap" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Swap is invoked" + }, + "details": { + "name": "Swap" + }, + "params": [ + { + "typeid": "{6BBF646F-D689-5D24-9596-05ED6A785D2F}", + "details": { + "name": "AZStd::unordered_map" + } + }, + { + "typeid": "{6BBF646F-D689-5D24-9596-05ED6A785D2F}", + "details": { + "name": "AZStd::unordered_map" + } + } + ] + } + ] + }, + { + "base": "{A16BD88A-8457-5717-B84E-977B1D176AE2}", + "context": "OnDemandReflected", + "variant": "", + "details": { + "name": "Array", + "category": "Array", + "tooltip": "A dynamically sized container of elements." + }, + "methods": [ + { + "base": "Size", + "context": "{A16BD88A-8457-5717-B84E-977B1D176AE2}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Size" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Size is invoked" + }, + "details": { + "name": "Size" + }, + "params": [ + { + "typeid": "{A16BD88A-8457-5717-B84E-977B1D176AE2}", + "details": { + "name": "AZStd::vector" + } + } + ], + "results": [ + { + "typeid": "{72039442-EB38-4D42-A1AD-CB68F7E0EEF6}", + "details": { + "name": "int" + } + } + ] + }, + { + "base": "Front", + "context": "{A16BD88A-8457-5717-B84E-977B1D176AE2}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Front" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Front is invoked" + }, + "details": { + "name": "Front" + }, + "params": [ + { + "typeid": "{A16BD88A-8457-5717-B84E-977B1D176AE2}", + "details": { + "name": "AZStd::vector" + } + } + ], + "results": [ + { + "typeid": "{A54C2B36-D5B8-46A1-A529-4EBDBD2450E7}", + "details": { + "name": "Aabb" + } + } + ] + }, + { + "base": "HasKey", + "context": "{A16BD88A-8457-5717-B84E-977B1D176AE2}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Has Key" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Has Key is invoked" + }, + "details": { + "name": "Has Key" + }, + "params": [ + { + "typeid": "{A16BD88A-8457-5717-B84E-977B1D176AE2}", + "details": { + "name": "AZStd::vector" + } + }, + { + "typeid": "{D6597933-47CD-4FC8-B911-63F3E2B0993A}", + "details": { + "name": "AZ::u64" + } + } + ], + "results": [ + { + "typeid": "{A0CA880C-AFE4-43CB-926C-59AC48496112}", + "details": { + "name": "bool" + } + } + ] + }, + { + "base": "Resize", + "context": "{A16BD88A-8457-5717-B84E-977B1D176AE2}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Resize" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Resize is invoked" + }, + "details": { + "name": "Resize" + }, + "params": [ + { + "typeid": "{A16BD88A-8457-5717-B84E-977B1D176AE2}", + "details": { + "name": "AZStd::vector" + } + }, + { + "typeid": "{D6597933-47CD-4FC8-B911-63F3E2B0993A}", + "details": { + "name": "AZ::u64" + } + } + ] + }, + { + "base": "at", + "context": "{A16BD88A-8457-5717-B84E-977B1D176AE2}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke at" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after at is invoked" + }, + "details": { + "name": "at" + }, + "params": [ + { + "typeid": "{A16BD88A-8457-5717-B84E-977B1D176AE2}", + "details": { + "name": "AZStd::vector" + } + }, + { + "typeid": "{D6597933-47CD-4FC8-B911-63F3E2B0993A}", + "details": { + "name": "AZ::u64" + } + } + ], + "results": [ + { + "typeid": "{A54C2B36-D5B8-46A1-A529-4EBDBD2450E7}", + "details": { + "name": "Aabb" + } + } + ] + }, + { + "base": "Back", + "context": "{A16BD88A-8457-5717-B84E-977B1D176AE2}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Back" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Back is invoked" + }, + "details": { + "name": "Back" + }, + "params": [ + { + "typeid": "{A16BD88A-8457-5717-B84E-977B1D176AE2}", + "details": { + "name": "AZStd::vector" + } + } + ], + "results": [ + { + "typeid": "{A54C2B36-D5B8-46A1-A529-4EBDBD2450E7}", + "details": { + "name": "Aabb" + } + } + ] + }, + { + "base": "pop_back", + "context": "{A16BD88A-8457-5717-B84E-977B1D176AE2}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke pop_back" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after pop_back is invoked" + }, + "details": { + "name": "pop_back" + }, + "params": [ + { + "typeid": "{A16BD88A-8457-5717-B84E-977B1D176AE2}", + "details": { + "name": "AZStd::vector" + } + } + ] + }, + { + "base": "size", + "context": "{A16BD88A-8457-5717-B84E-977B1D176AE2}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke size" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after size is invoked" + }, + "details": { + "name": "size" + }, + "params": [ + { + "typeid": "{A16BD88A-8457-5717-B84E-977B1D176AE2}", + "details": { + "name": "AZStd::vector" + } + } + ], + "results": [ + { + "typeid": "{72039442-EB38-4D42-A1AD-CB68F7E0EEF6}", + "details": { + "name": "int" + } + } + ] + }, + { + "base": "At", + "context": "{A16BD88A-8457-5717-B84E-977B1D176AE2}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke At" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after At is invoked" + }, + "details": { + "name": "At" + }, + "params": [ + { + "typeid": "{A16BD88A-8457-5717-B84E-977B1D176AE2}", + "details": { + "name": "AZStd::vector" + } + }, + { + "typeid": "{D6597933-47CD-4FC8-B911-63F3E2B0993A}", + "details": { + "name": "AZ::u64" + } + } + ], + "results": [ + { + "typeid": "{A54C2B36-D5B8-46A1-A529-4EBDBD2450E7}", + "details": { + "name": "Aabb" + } + } + ] + }, + { + "base": "Empty", + "context": "{A16BD88A-8457-5717-B84E-977B1D176AE2}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Empty" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Empty is invoked" + }, + "details": { + "name": "Empty" + }, + "params": [ + { + "typeid": "{A16BD88A-8457-5717-B84E-977B1D176AE2}", + "details": { + "name": "AZStd::vector" + } + } + ], + "results": [ + { + "typeid": "{A0CA880C-AFE4-43CB-926C-59AC48496112}", + "details": { + "name": "bool" + } + } + ] + }, + { + "base": "Swap", + "context": "{A16BD88A-8457-5717-B84E-977B1D176AE2}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Swap" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Swap is invoked" + }, + "details": { + "name": "Swap" + }, + "params": [ + { + "typeid": "{A16BD88A-8457-5717-B84E-977B1D176AE2}", + "details": { + "name": "AZStd::vector" + } + }, + { + "typeid": "{A16BD88A-8457-5717-B84E-977B1D176AE2}", + "details": { + "name": "AZStd::vector" + } + } + ] + }, + { + "base": "push_back", + "context": "{A16BD88A-8457-5717-B84E-977B1D176AE2}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke push_back" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after push_back is invoked" + }, + "details": { + "name": "push_back" + }, + "params": [ + { + "typeid": "{A16BD88A-8457-5717-B84E-977B1D176AE2}", + "details": { + "name": "AZStd::vector" + } + }, + { + "typeid": "{A54C2B36-D5B8-46A1-A529-4EBDBD2450E7}", + "details": { + "name": "Aabb" + } + } + ] + }, + { + "base": "PushBack_VM", + "context": "{A16BD88A-8457-5717-B84E-977B1D176AE2}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke PushBack_VM" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after PushBack_VM is invoked" + }, + "details": { + "name": "PushBack_VM" + }, + "params": [ + { + "typeid": "{A16BD88A-8457-5717-B84E-977B1D176AE2}", + "details": { + "name": "AZStd::vector" + } + }, + { + "typeid": "{A54C2B36-D5B8-46A1-A529-4EBDBD2450E7}", + "details": { + "name": "Aabb" + } + } + ], + "results": [ + { + "typeid": "{A16BD88A-8457-5717-B84E-977B1D176AE2}", + "details": { + "name": "AZStd::vector" + } + } + ] + }, + { + "base": "AtUnchecked", + "context": "{A16BD88A-8457-5717-B84E-977B1D176AE2}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke AtUnchecked" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after AtUnchecked is invoked" + }, + "details": { + "name": "AtUnchecked" + }, + "params": [ + { + "typeid": "{A16BD88A-8457-5717-B84E-977B1D176AE2}", + "details": { + "name": "AZStd::vector" + } + }, + { + "typeid": "{D6597933-47CD-4FC8-B911-63F3E2B0993A}", + "details": { + "name": "AZ::u64" + } + } + ], + "results": [ + { + "typeid": "{A54C2B36-D5B8-46A1-A529-4EBDBD2450E7}", + "details": { + "name": "Aabb" + } + } + ] + }, + { + "base": "clear", + "context": "{A16BD88A-8457-5717-B84E-977B1D176AE2}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke clear" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after clear is invoked" + }, + "details": { + "name": "clear" + }, + "params": [ + { + "typeid": "{A16BD88A-8457-5717-B84E-977B1D176AE2}", + "details": { + "name": "AZStd::vector" + } + } + ] + }, + { + "base": "NotEmpty", + "context": "{A16BD88A-8457-5717-B84E-977B1D176AE2}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke NotEmpty" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after NotEmpty is invoked" + }, + "details": { + "name": "NotEmpty" + }, + "params": [ + { + "typeid": "{A16BD88A-8457-5717-B84E-977B1D176AE2}", + "details": { + "name": "AZStd::vector" + } + } + ], + "results": [ + { + "typeid": "{A0CA880C-AFE4-43CB-926C-59AC48496112}", + "details": { + "name": "bool" + } + } + ] + }, + { + "base": "Erase_VM", + "context": "{A16BD88A-8457-5717-B84E-977B1D176AE2}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Erase_VM" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Erase_VM is invoked" + }, + "details": { + "name": "Erase_VM" + }, + "params": [ + { + "typeid": "{A16BD88A-8457-5717-B84E-977B1D176AE2}", + "details": { + "name": "AZStd::vector" + } + }, + { + "typeid": "{D6597933-47CD-4FC8-B911-63F3E2B0993A}", + "details": { + "name": "AZ::u64" + } + } + ], + "results": [ + { + "typeid": "{A16BD88A-8457-5717-B84E-977B1D176AE2}", + "details": { + "name": "AZStd::vector" + } + } + ] + }, + { + "base": "EraseCheck_VM", + "context": "{A16BD88A-8457-5717-B84E-977B1D176AE2}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke EraseCheck_VM" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after EraseCheck_VM is invoked" + }, + "details": { + "name": "EraseCheck_VM" + }, + "params": [ + { + "typeid": "{A16BD88A-8457-5717-B84E-977B1D176AE2}", + "details": { + "name": "AZStd::vector" + } + }, + { + "typeid": "{D6597933-47CD-4FC8-B911-63F3E2B0993A}", + "details": { + "name": "AZ::u64" + } + } + ], + "results": [ + { + "typeid": "{A0CA880C-AFE4-43CB-926C-59AC48496112}", + "details": { + "name": "bool" + } + } + ] + }, + { + "base": "Capacity", + "context": "{A16BD88A-8457-5717-B84E-977B1D176AE2}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Capacity" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Capacity is invoked" + }, + "details": { + "name": "Capacity" + }, + "params": [ + { + "typeid": "{A16BD88A-8457-5717-B84E-977B1D176AE2}", + "details": { + "name": "AZStd::vector" + } + } + ], + "results": [ + { + "typeid": "{D6597933-47CD-4FC8-B911-63F3E2B0993A}", + "details": { + "name": "AZ::u64" + } + } + ] + }, + { + "base": "Clear", + "context": "{A16BD88A-8457-5717-B84E-977B1D176AE2}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Clear" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Clear is invoked" + }, + "details": { + "name": "Clear" + }, + "params": [ + { + "typeid": "{A16BD88A-8457-5717-B84E-977B1D176AE2}", + "details": { + "name": "AZStd::vector" + } + } + ], + "results": [ + { + "typeid": "{A16BD88A-8457-5717-B84E-977B1D176AE2}", + "details": { + "name": "AZStd::vector" + } + } + ] + }, + { + "base": "AssignAt", + "context": "{A16BD88A-8457-5717-B84E-977B1D176AE2}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke AssignAt" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after AssignAt is invoked" + }, + "details": { + "name": "AssignAt" + }, + "params": [ + { + "typeid": "{A16BD88A-8457-5717-B84E-977B1D176AE2}", + "details": { + "name": "AZStd::vector" + } + }, + { + "typeid": "{D6597933-47CD-4FC8-B911-63F3E2B0993A}", + "details": { + "name": "AZ::u64" + } + }, + { + "typeid": "{A54C2B36-D5B8-46A1-A529-4EBDBD2450E7}", + "details": { + "name": "Aabb" + } + } + ] + }, + { + "base": "GetSize", + "context": "{A16BD88A-8457-5717-B84E-977B1D176AE2}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke GetSize" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after GetSize is invoked" + }, + "details": { + "name": "GetSize" + }, + "params": [ + { + "typeid": "{A16BD88A-8457-5717-B84E-977B1D176AE2}", + "details": { + "name": "AZStd::vector" + } + } + ], + "results": [ + { + "typeid": "{72039442-EB38-4D42-A1AD-CB68F7E0EEF6}", + "details": { + "name": "int" + } + } + ] + }, + { + "base": "Insert", + "context": "{A16BD88A-8457-5717-B84E-977B1D176AE2}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Insert" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Insert is invoked" + }, + "details": { + "name": "Insert" + }, + "params": [ + { + "typeid": "{A16BD88A-8457-5717-B84E-977B1D176AE2}", + "details": { + "name": "AZStd::vector" + } + }, + { + "typeid": "{D6597933-47CD-4FC8-B911-63F3E2B0993A}", + "details": { + "name": "AZ::u64" + } + }, + { + "typeid": "{A54C2B36-D5B8-46A1-A529-4EBDBD2450E7}", + "details": { + "name": "Aabb" + } + } + ], + "results": [ + { + "typeid": "{A16BD88A-8457-5717-B84E-977B1D176AE2}", + "details": { + "name": "AZStd::vector" + } + } + ] + }, + { + "base": "PushBack", + "context": "{A16BD88A-8457-5717-B84E-977B1D176AE2}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke PushBack" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after PushBack is invoked" + }, + "details": { + "name": "PushBack" + }, + "params": [ + { + "typeid": "{A16BD88A-8457-5717-B84E-977B1D176AE2}", + "details": { + "name": "AZStd::vector" + } + }, + { + "typeid": "{A54C2B36-D5B8-46A1-A529-4EBDBD2450E7}", + "details": { + "name": "Aabb" + } + } + ] + }, + { + "base": "Reserve", + "context": "{A16BD88A-8457-5717-B84E-977B1D176AE2}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Reserve" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Reserve is invoked" + }, + "details": { + "name": "Reserve" + }, + "params": [ + { + "typeid": "{A16BD88A-8457-5717-B84E-977B1D176AE2}", + "details": { + "name": "AZStd::vector" + } + }, + { + "typeid": "{D6597933-47CD-4FC8-B911-63F3E2B0993A}", + "details": { + "name": "AZ::u64" + } + } + ] + }, + { + "base": "Iterate_VM", + "context": "{A16BD88A-8457-5717-B84E-977B1D176AE2}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Iterate_VM" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Iterate_VM is invoked" + }, + "details": { + "name": "Iterate_VM" + }, + "params": [ + { + "typeid": "{A16BD88A-8457-5717-B84E-977B1D176AE2}", + "details": { + "name": "AZStd::vector" + } + } + ], + "results": [ + { + "typeid": "{64C7527E-8367-5463-BD24-E790BEF88A78}", + "details": { + "name": "Iterator_VM>" + } + } + ] + } + ] + }, + { + "base": "{834DC049-5EC3-5C29-B621-5F0046864DC4}", + "context": "OnDemandReflected", + "variant": "", + "details": { + "name": "Asset" + }, + "methods": [ + { + "base": "IsLoading", + "context": "{834DC049-5EC3-5C29-B621-5F0046864DC4}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke IsLoading" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after IsLoading is invoked" + }, + "details": { + "name": "IsLoading" + }, + "params": [ + { + "typeid": "{834DC049-5EC3-5C29-B621-5F0046864DC4}", + "details": { + "name": "Asset" + } + } + ], + "results": [ + { + "typeid": "{A0CA880C-AFE4-43CB-926C-59AC48496112}", + "details": { + "name": "bool" + } + } + ] + }, + { + "base": "GetType", + "context": "{834DC049-5EC3-5C29-B621-5F0046864DC4}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke GetType" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after GetType is invoked" + }, + "details": { + "name": "GetType" + }, + "params": [ + { + "typeid": "{834DC049-5EC3-5C29-B621-5F0046864DC4}", + "details": { + "name": "Asset" + } + } + ], + "results": [ + { + "typeid": "{E152C105-A133-4D03-BBF8-3D4B2FBA3E2A}", + "details": { + "name": "AZ::Uuid" + } + } + ] + }, + { + "base": "IsError", + "context": "{834DC049-5EC3-5C29-B621-5F0046864DC4}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke IsError" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after IsError is invoked" + }, + "details": { + "name": "IsError" + }, + "params": [ + { + "typeid": "{834DC049-5EC3-5C29-B621-5F0046864DC4}", + "details": { + "name": "Asset" + } + } + ], + "results": [ + { + "typeid": "{A0CA880C-AFE4-43CB-926C-59AC48496112}", + "details": { + "name": "bool" + } + } + ] + }, + { + "base": "GetHint", + "context": "{834DC049-5EC3-5C29-B621-5F0046864DC4}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke GetHint" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after GetHint is invoked" + }, + "details": { + "name": "GetHint" + }, + "params": [ + { + "typeid": "{834DC049-5EC3-5C29-B621-5F0046864DC4}", + "details": { + "name": "Asset" + } + } + ], + "results": [ + { + "typeid": "{03AAAB3F-5C47-5A66-9EBC-D5FA4DB353C9}", + "details": { + "name": "AZStd::string" + } + } + ] + }, + { + "base": "GetData", + "context": "{834DC049-5EC3-5C29-B621-5F0046864DC4}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke GetData" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after GetData is invoked" + }, + "details": { + "name": "GetData" + }, + "params": [ + { + "typeid": "{834DC049-5EC3-5C29-B621-5F0046864DC4}", + "details": { + "name": "Asset" + } + } + ], + "results": [ + { + "typeid": "{AF3F7D32-1536-422A-89F3-A11E1F5B5A9C}", + "details": { + "name": "AssetData" + } + } + ] + }, + { + "base": "IsReady", + "context": "{834DC049-5EC3-5C29-B621-5F0046864DC4}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke IsReady" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after IsReady is invoked" + }, + "details": { + "name": "IsReady" + }, + "params": [ + { + "typeid": "{834DC049-5EC3-5C29-B621-5F0046864DC4}", + "details": { + "name": "Asset" + } + } + ], + "results": [ + { + "typeid": "{A0CA880C-AFE4-43CB-926C-59AC48496112}", + "details": { + "name": "bool" + } + } + ] + }, + { + "base": "GetStatus", + "context": "{834DC049-5EC3-5C29-B621-5F0046864DC4}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke GetStatus" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after GetStatus is invoked" + }, + "details": { + "name": "GetStatus" + }, + "params": [ + { + "typeid": "{834DC049-5EC3-5C29-B621-5F0046864DC4}", + "details": { + "name": "Asset" + } + } + ], + "results": [ + { + "typeid": "{72039442-EB38-4D42-A1AD-CB68F7E0EEF6}", + "details": { + "name": "int" + } + } + ] + }, + { + "base": "GetId", + "context": "{834DC049-5EC3-5C29-B621-5F0046864DC4}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke GetId" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after GetId is invoked" + }, + "details": { + "name": "GetId" + }, + "params": [ + { + "typeid": "{834DC049-5EC3-5C29-B621-5F0046864DC4}", + "details": { + "name": "Asset" + } + } + ], + "results": [ + { + "typeid": "{652ED536-3402-439B-AEBE-4A5DBC554085}", + "details": { + "name": "AssetId" + } + } + ] + } + ] + }, + { + "base": "{B57176AF-63A1-5531-B77E-BD7337E66127}", + "context": "OnDemandReflected", + "variant": "", + "details": { + "name": "Outcome" + }, + "methods": [ + { + "base": "GetError", + "context": "{B57176AF-63A1-5531-B77E-BD7337E66127}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke GetError" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after GetError is invoked" + }, + "details": { + "name": "GetError" + }, + "params": [ + { + "typeid": "{B57176AF-63A1-5531-B77E-BD7337E66127}", + "details": { + "name": "Outcome" + } + } + ], + "results": [ + { + "typeid": "{03AAAB3F-5C47-5A66-9EBC-D5FA4DB353C9}", + "details": { + "name": "AZStd::string" + } + } + ] + }, + { + "base": "IsSuccess", + "context": "{B57176AF-63A1-5531-B77E-BD7337E66127}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke IsSuccess" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after IsSuccess is invoked" + }, + "details": { + "name": "IsSuccess" + }, + "params": [ + { + "typeid": "{B57176AF-63A1-5531-B77E-BD7337E66127}", + "details": { + "name": "Outcome" + } + } + ], + "results": [ + { + "typeid": "{A0CA880C-AFE4-43CB-926C-59AC48496112}", + "details": { + "name": "bool" + } + } + ] + }, + { + "base": "Success", + "context": "{B57176AF-63A1-5531-B77E-BD7337E66127}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Success" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Success is invoked" + }, + "details": { + "name": "Success" + }, + "params": [ + { + "typeid": "{03924488-C7F4-4D6D-948B-ABC2D1AE2FD3}", + "details": { + "name": "any" + } + } + ], + "results": [ + { + "typeid": "{B57176AF-63A1-5531-B77E-BD7337E66127}", + "details": { + "name": "Outcome, allocator>>" + } + } + ] + }, + { + "base": "GetValue", + "context": "{B57176AF-63A1-5531-B77E-BD7337E66127}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke GetValue" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after GetValue is invoked" + }, + "details": { + "name": "GetValue" + }, + "params": [ + { + "typeid": "{B57176AF-63A1-5531-B77E-BD7337E66127}", + "details": { + "name": "Outcome" + } + } + ], + "results": [ + { + "typeid": "{03924488-C7F4-4D6D-948B-ABC2D1AE2FD3}", + "details": { + "name": "any" + } + } + ] + }, + { + "base": "Failure", + "context": "{B57176AF-63A1-5531-B77E-BD7337E66127}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Failure" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Failure is invoked" + }, + "details": { + "name": "Failure" + }, + "params": [ + { + "typeid": "{03AAAB3F-5C47-5A66-9EBC-D5FA4DB353C9}", + "details": { + "name": "AZStd::string" + } + } + ], + "results": [ + { + "typeid": "{B57176AF-63A1-5531-B77E-BD7337E66127}", + "details": { + "name": "Outcome, allocator>>" + } + } + ] + } + ] + }, + { + "base": "{4C19E257-F929-524E-80E3-C910C5F3E2D9}", + "context": "OnDemandReflected", + "variant": "", + "details": { + "name": "Event const CollisionEvent& >" + }, + "methods": [ + { + "base": "HasHandlerConnected", + "context": "{4C19E257-F929-524E-80E3-C910C5F3E2D9}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke HasHandlerConnected" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after HasHandlerConnected is invoked" + }, + "details": { + "name": "HasHandlerConnected" + }, + "params": [ + { + "typeid": "{4C19E257-F929-524E-80E3-C910C5F3E2D9}", + "details": { + "name": "Event const CollisionEvent& >*" + } + } + ], + "results": [ + { + "typeid": "{A0CA880C-AFE4-43CB-926C-59AC48496112}", + "details": { + "name": "bool" + } + } + ] + } + ] + }, + { + "base": "{BE75E564-1859-566D-821F-3343675C4977}", + "context": "OnDemandReflected", + "variant": "", + "details": { + "name": "Map", + "category": "Map", + "tooltip": "A collection of Key/Value pairs, where each Key value must be unique." + }, + "methods": [ + { + "base": "contains", + "context": "{BE75E564-1859-566D-821F-3343675C4977}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke contains" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after contains is invoked" + }, + "details": { + "name": "contains" + }, + "params": [ + { + "typeid": "{BE75E564-1859-566D-821F-3343675C4977}", + "details": { + "name": "AZStd::unordered_map" + } + }, + { + "typeid": "{652ED536-3402-439B-AEBE-4A5DBC554085}", + "details": { + "name": "AssetId" + } + } + ], + "results": [ + { + "typeid": "{A0CA880C-AFE4-43CB-926C-59AC48496112}", + "details": { + "name": "bool" + } + } + ] + }, + { + "base": "Insert", + "context": "{BE75E564-1859-566D-821F-3343675C4977}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Insert" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Insert is invoked" + }, + "details": { + "name": "Insert" + }, + "params": [ + { + "typeid": "{BE75E564-1859-566D-821F-3343675C4977}", + "details": { + "name": "AZStd::unordered_map" + } + }, + { + "typeid": "{652ED536-3402-439B-AEBE-4A5DBC554085}", + "details": { + "name": "AssetId" + } + }, + { + "typeid": "{7894072A-9050-4F0F-901B-34B1A0D29417}", + "details": { + "name": "Color" + } + } + ], + "results": [ + { + "typeid": "{BE75E564-1859-566D-821F-3343675C4977}", + "details": { + "name": "AZStd::unordered_map" + } + } + ] + }, + { + "base": "Reserve", + "context": "{BE75E564-1859-566D-821F-3343675C4977}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Reserve" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Reserve is invoked" + }, + "details": { + "name": "Reserve" + }, + "params": [ + { + "typeid": "{BE75E564-1859-566D-821F-3343675C4977}", + "details": { + "name": "AZStd::unordered_map" + } + }, + { + "typeid": "{D6597933-47CD-4FC8-B911-63F3E2B0993A}", + "details": { + "name": "AZ::u64" + } + } + ] + }, + { + "base": "GetSize", + "context": "{BE75E564-1859-566D-821F-3343675C4977}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke GetSize" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after GetSize is invoked" + }, + "details": { + "name": "GetSize" + }, + "params": [ + { + "typeid": "{BE75E564-1859-566D-821F-3343675C4977}", + "details": { + "name": "AZStd::unordered_map" + } + } + ], + "results": [ + { + "typeid": "{72039442-EB38-4D42-A1AD-CB68F7E0EEF6}", + "details": { + "name": "int" + } + } + ] + }, + { + "base": "Iterate_VM", + "context": "{BE75E564-1859-566D-821F-3343675C4977}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Iterate_VM" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Iterate_VM is invoked" + }, + "details": { + "name": "Iterate_VM" + }, + "params": [ + { + "typeid": "{BE75E564-1859-566D-821F-3343675C4977}", + "details": { + "name": "AZStd::unordered_map" + } + } + ], + "results": [ + { + "typeid": "{2BBAF48D-E9B1-55D8-B3AE-395EDAAAE7FD}", + "details": { + "name": "Iterator_VM, AZStd::equal_to, allocator>>" + } + } + ] + }, + { + "base": "GetKeys", + "context": "{BE75E564-1859-566D-821F-3343675C4977}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke GetKeys" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after GetKeys is invoked" + }, + "details": { + "name": "GetKeys" + }, + "params": [ + { + "typeid": "{BE75E564-1859-566D-821F-3343675C4977}", + "details": { + "name": "AZStd::unordered_map" + } + } + ], + "results": [ + { + "typeid": "{877C4A33-39B5-51D7-948D-F97DB81372A1}", + "details": { + "name": "AZStd::vector" + } + } + ] + }, + { + "base": "Size", + "context": "{BE75E564-1859-566D-821F-3343675C4977}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Size" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Size is invoked" + }, + "details": { + "name": "Size" + }, + "params": [ + { + "typeid": "{BE75E564-1859-566D-821F-3343675C4977}", + "details": { + "name": "AZStd::unordered_map" + } + } + ], + "results": [ + { + "typeid": "{72039442-EB38-4D42-A1AD-CB68F7E0EEF6}", + "details": { + "name": "int" + } + } + ] + }, + { + "base": "Erase", + "context": "{BE75E564-1859-566D-821F-3343675C4977}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Erase" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Erase is invoked" + }, + "details": { + "name": "Erase" + }, + "params": [ + { + "typeid": "{BE75E564-1859-566D-821F-3343675C4977}", + "details": { + "name": "AZStd::unordered_map" + } + }, + { + "typeid": "{652ED536-3402-439B-AEBE-4A5DBC554085}", + "details": { + "name": "AssetId" + } + } + ], + "results": [ + { + "typeid": "{BE75E564-1859-566D-821F-3343675C4977}", + "details": { + "name": "AZStd::unordered_map" + } + } + ] + }, + { + "base": "EraseCheck_VM", + "context": "{BE75E564-1859-566D-821F-3343675C4977}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke EraseCheck_VM" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after EraseCheck_VM is invoked" + }, + "details": { + "name": "EraseCheck_VM" + }, + "params": [ + { + "typeid": "{BE75E564-1859-566D-821F-3343675C4977}", + "details": { + "name": "AZStd::unordered_map" + } + }, + { + "typeid": "{652ED536-3402-439B-AEBE-4A5DBC554085}", + "details": { + "name": "AssetId" + } + } + ], + "results": [ + { + "typeid": "{A0CA880C-AFE4-43CB-926C-59AC48496112}", + "details": { + "name": "bool" + } + } + ] + }, + { + "base": "Clear", + "context": "{BE75E564-1859-566D-821F-3343675C4977}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Clear" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Clear is invoked" + }, + "details": { + "name": "Clear" + }, + "params": [ + { + "typeid": "{BE75E564-1859-566D-821F-3343675C4977}", + "details": { + "name": "AZStd::unordered_map" + } + } + ], + "results": [ + { + "typeid": "{BE75E564-1859-566D-821F-3343675C4977}", + "details": { + "name": "AZStd::unordered_map" + } + } + ] + }, + { + "base": "At", + "context": "{BE75E564-1859-566D-821F-3343675C4977}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke At" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after At is invoked" + }, + "details": { + "name": "At" + }, + "params": [ + { + "typeid": "{BE75E564-1859-566D-821F-3343675C4977}", + "details": { + "name": "AZStd::unordered_map" + } + }, + { + "typeid": "{652ED536-3402-439B-AEBE-4A5DBC554085}", + "details": { + "name": "AssetId" + } + } + ], + "results": [ + { + "typeid": "{7894072A-9050-4F0F-901B-34B1A0D29417}", + "details": { + "name": "Color" + } + } + ] + }, + { + "base": "BucketCount", + "context": "{BE75E564-1859-566D-821F-3343675C4977}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke BucketCount" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after BucketCount is invoked" + }, + "details": { + "name": "BucketCount" + }, + "params": [ + { + "typeid": "{BE75E564-1859-566D-821F-3343675C4977}", + "details": { + "name": "AZStd::unordered_map" + } + } + ], + "results": [ + { + "typeid": "{D6597933-47CD-4FC8-B911-63F3E2B0993A}", + "details": { + "name": "AZ::u64" + } + } + ] + }, + { + "base": "Empty", + "context": "{BE75E564-1859-566D-821F-3343675C4977}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Empty" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Empty is invoked" + }, + "details": { + "name": "Empty" + }, + "params": [ + { + "typeid": "{BE75E564-1859-566D-821F-3343675C4977}", + "details": { + "name": "AZStd::unordered_map" + } + } + ], + "results": [ + { + "typeid": "{A0CA880C-AFE4-43CB-926C-59AC48496112}", + "details": { + "name": "bool" + } + } + ] + }, + { + "base": "Swap", + "context": "{BE75E564-1859-566D-821F-3343675C4977}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Swap" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Swap is invoked" + }, + "details": { + "name": "Swap" + }, + "params": [ + { + "typeid": "{BE75E564-1859-566D-821F-3343675C4977}", + "details": { + "name": "AZStd::unordered_map" + } + }, + { + "typeid": "{BE75E564-1859-566D-821F-3343675C4977}", + "details": { + "name": "AZStd::unordered_map" + } + } + ] + } + ] + }, + { + "base": "{93942742-473F-5EE3-8420-D8F22C612221}", + "context": "OnDemandReflected", + "variant": "", + "details": { + "name": "Tuple" + }, + "methods": [ + { + "base": "Get0", + "context": "{93942742-473F-5EE3-8420-D8F22C612221}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Get0" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Get0 is invoked" + }, + "details": { + "name": "Get0" + }, + "params": [ + { + "typeid": "{93942742-473F-5EE3-8420-D8F22C612221}", + "details": { + "name": "tuple&" + } + } + ], + "results": [ + { + "typeid": "{8379EB7D-01FA-4538-B64B-A6543B4BE73D}", + "details": { + "name": "Vector3" + } + } + ] + }, + { + "base": "Get1", + "context": "{93942742-473F-5EE3-8420-D8F22C612221}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Get1" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Get1 is invoked" + }, + "details": { + "name": "Get1" + }, + "params": [ + { + "typeid": "{93942742-473F-5EE3-8420-D8F22C612221}", + "details": { + "name": "tuple&" + } + } + ], + "results": [ + { + "typeid": "{8379EB7D-01FA-4538-B64B-A6543B4BE73D}", + "details": { + "name": "Vector3" + } + } + ] + }, + { + "base": "Get2", + "context": "{93942742-473F-5EE3-8420-D8F22C612221}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Get2" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Get2 is invoked" + }, + "details": { + "name": "Get2" + }, + "params": [ + { + "typeid": "{93942742-473F-5EE3-8420-D8F22C612221}", + "details": { + "name": "tuple&" + } + } + ], + "results": [ + { + "typeid": "{8379EB7D-01FA-4538-B64B-A6543B4BE73D}", + "details": { + "name": "Vector3" + } + } + ] + }, + { + "base": "GetSize", + "context": "{93942742-473F-5EE3-8420-D8F22C612221}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke GetSize" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after GetSize is invoked" + }, + "details": { + "name": "GetSize" + }, + "results": [ + { + "typeid": "{D6597933-47CD-4FC8-B911-63F3E2B0993A}", + "details": { + "name": "AZ::u64" + } + } + ] + } + ] + }, + { + "base": "{4A5210BF-A837-53B7-BB8C-1E74AF26D98B}", + "context": "OnDemandReflected", + "variant": "", + "details": { + "name": "Map", + "category": "Map", + "tooltip": "A collection of Key/Value pairs, where each Key value must be unique." + }, + "methods": [ + { + "base": "contains", + "context": "{4A5210BF-A837-53B7-BB8C-1E74AF26D98B}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke contains" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after contains is invoked" + }, + "details": { + "name": "contains" + }, + "params": [ + { + "typeid": "{4A5210BF-A837-53B7-BB8C-1E74AF26D98B}", + "details": { + "name": "AZStd::unordered_map" + } + }, + { + "typeid": "{A0CA880C-AFE4-43CB-926C-59AC48496112}", + "details": { + "name": "bool" + } + } + ], + "results": [ + { + "typeid": "{A0CA880C-AFE4-43CB-926C-59AC48496112}", + "details": { + "name": "bool" + } + } + ] + }, + { + "base": "Insert", + "context": "{4A5210BF-A837-53B7-BB8C-1E74AF26D98B}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Insert" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Insert is invoked" + }, + "details": { + "name": "Insert" + }, + "params": [ + { + "typeid": "{4A5210BF-A837-53B7-BB8C-1E74AF26D98B}", + "details": { + "name": "AZStd::unordered_map" + } + }, + { + "typeid": "{A0CA880C-AFE4-43CB-926C-59AC48496112}", + "details": { + "name": "bool" + } + }, + { + "typeid": "{6383F1D3-BB27-4E6B-A49A-6409B2059EAA}", + "details": { + "name": "EntityId", + "tooltip": "Entity Unique Id" + } + } + ], + "results": [ + { + "typeid": "{4A5210BF-A837-53B7-BB8C-1E74AF26D98B}", + "details": { + "name": "AZStd::unordered_map" + } + } + ] + }, + { + "base": "Reserve", + "context": "{4A5210BF-A837-53B7-BB8C-1E74AF26D98B}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Reserve" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Reserve is invoked" + }, + "details": { + "name": "Reserve" + }, + "params": [ + { + "typeid": "{4A5210BF-A837-53B7-BB8C-1E74AF26D98B}", + "details": { + "name": "AZStd::unordered_map" + } + }, + { + "typeid": "{D6597933-47CD-4FC8-B911-63F3E2B0993A}", + "details": { + "name": "AZ::u64" + } + } + ] + }, + { + "base": "GetSize", + "context": "{4A5210BF-A837-53B7-BB8C-1E74AF26D98B}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke GetSize" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after GetSize is invoked" + }, + "details": { + "name": "GetSize" + }, + "params": [ + { + "typeid": "{4A5210BF-A837-53B7-BB8C-1E74AF26D98B}", + "details": { + "name": "AZStd::unordered_map" + } + } + ], + "results": [ + { + "typeid": "{72039442-EB38-4D42-A1AD-CB68F7E0EEF6}", + "details": { + "name": "int" + } + } + ] + }, + { + "base": "Iterate_VM", + "context": "{4A5210BF-A837-53B7-BB8C-1E74AF26D98B}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Iterate_VM" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Iterate_VM is invoked" + }, + "details": { + "name": "Iterate_VM" + }, + "params": [ + { + "typeid": "{4A5210BF-A837-53B7-BB8C-1E74AF26D98B}", + "details": { + "name": "AZStd::unordered_map" + } + } + ], + "results": [ + { + "typeid": "{65F91C50-EE8C-51E5-9F3D-D01F083861E8}", + "details": { + "name": "Iterator_VM, AZStd::equal_to, allocator>>" + } + } + ] + }, + { + "base": "GetKeys", + "context": "{4A5210BF-A837-53B7-BB8C-1E74AF26D98B}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke GetKeys" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after GetKeys is invoked" + }, + "details": { + "name": "GetKeys" + }, + "params": [ + { + "typeid": "{4A5210BF-A837-53B7-BB8C-1E74AF26D98B}", + "details": { + "name": "AZStd::unordered_map" + } + } + ], + "results": [ + { + "typeid": "{B505B05D-57BF-5A45-9113-B3A2784E2CD7}", + "details": { + "name": "AZStd::vector" + } + } + ] + }, + { + "base": "Size", + "context": "{4A5210BF-A837-53B7-BB8C-1E74AF26D98B}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Size" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Size is invoked" + }, + "details": { + "name": "Size" + }, + "params": [ + { + "typeid": "{4A5210BF-A837-53B7-BB8C-1E74AF26D98B}", + "details": { + "name": "AZStd::unordered_map" + } + } + ], + "results": [ + { + "typeid": "{72039442-EB38-4D42-A1AD-CB68F7E0EEF6}", + "details": { + "name": "int" + } + } + ] + }, + { + "base": "Erase", + "context": "{4A5210BF-A837-53B7-BB8C-1E74AF26D98B}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Erase" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Erase is invoked" + }, + "details": { + "name": "Erase" + }, + "params": [ + { + "typeid": "{4A5210BF-A837-53B7-BB8C-1E74AF26D98B}", + "details": { + "name": "AZStd::unordered_map" + } + }, + { + "typeid": "{A0CA880C-AFE4-43CB-926C-59AC48496112}", + "details": { + "name": "bool" + } + } + ], + "results": [ + { + "typeid": "{4A5210BF-A837-53B7-BB8C-1E74AF26D98B}", + "details": { + "name": "AZStd::unordered_map" + } + } + ] + }, + { + "base": "EraseCheck_VM", + "context": "{4A5210BF-A837-53B7-BB8C-1E74AF26D98B}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke EraseCheck_VM" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after EraseCheck_VM is invoked" + }, + "details": { + "name": "EraseCheck_VM" + }, + "params": [ + { + "typeid": "{4A5210BF-A837-53B7-BB8C-1E74AF26D98B}", + "details": { + "name": "AZStd::unordered_map" + } + }, + { + "typeid": "{A0CA880C-AFE4-43CB-926C-59AC48496112}", + "details": { + "name": "bool" + } + } + ], + "results": [ + { + "typeid": "{A0CA880C-AFE4-43CB-926C-59AC48496112}", + "details": { + "name": "bool" + } + } + ] + }, + { + "base": "Clear", + "context": "{4A5210BF-A837-53B7-BB8C-1E74AF26D98B}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Clear" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Clear is invoked" + }, + "details": { + "name": "Clear" + }, + "params": [ + { + "typeid": "{4A5210BF-A837-53B7-BB8C-1E74AF26D98B}", + "details": { + "name": "AZStd::unordered_map" + } + } + ], + "results": [ + { + "typeid": "{4A5210BF-A837-53B7-BB8C-1E74AF26D98B}", + "details": { + "name": "AZStd::unordered_map" + } + } + ] + }, + { + "base": "At", + "context": "{4A5210BF-A837-53B7-BB8C-1E74AF26D98B}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke At" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after At is invoked" + }, + "details": { + "name": "At" + }, + "params": [ + { + "typeid": "{4A5210BF-A837-53B7-BB8C-1E74AF26D98B}", + "details": { + "name": "AZStd::unordered_map" + } + }, + { + "typeid": "{A0CA880C-AFE4-43CB-926C-59AC48496112}", + "details": { + "name": "bool" + } + } + ], + "results": [ + { + "typeid": "{6383F1D3-BB27-4E6B-A49A-6409B2059EAA}", + "details": { + "name": "EntityId", + "tooltip": "Entity Unique Id" + } + } + ] + }, + { + "base": "BucketCount", + "context": "{4A5210BF-A837-53B7-BB8C-1E74AF26D98B}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke BucketCount" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after BucketCount is invoked" + }, + "details": { + "name": "BucketCount" + }, + "params": [ + { + "typeid": "{4A5210BF-A837-53B7-BB8C-1E74AF26D98B}", + "details": { + "name": "AZStd::unordered_map" + } + } + ], + "results": [ + { + "typeid": "{D6597933-47CD-4FC8-B911-63F3E2B0993A}", + "details": { + "name": "AZ::u64" + } + } + ] + }, + { + "base": "Empty", + "context": "{4A5210BF-A837-53B7-BB8C-1E74AF26D98B}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Empty" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Empty is invoked" + }, + "details": { + "name": "Empty" + }, + "params": [ + { + "typeid": "{4A5210BF-A837-53B7-BB8C-1E74AF26D98B}", + "details": { + "name": "AZStd::unordered_map" + } + } + ], + "results": [ + { + "typeid": "{A0CA880C-AFE4-43CB-926C-59AC48496112}", + "details": { + "name": "bool" + } + } + ] + }, + { + "base": "Swap", + "context": "{4A5210BF-A837-53B7-BB8C-1E74AF26D98B}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Swap" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Swap is invoked" + }, + "details": { + "name": "Swap" + }, + "params": [ + { + "typeid": "{4A5210BF-A837-53B7-BB8C-1E74AF26D98B}", + "details": { + "name": "AZStd::unordered_map" + } + }, + { + "typeid": "{4A5210BF-A837-53B7-BB8C-1E74AF26D98B}", + "details": { + "name": "AZStd::unordered_map" + } + } + ] + } + ] + }, + { + "base": "{895CEA57-551B-5B79-A32B-B2DA0A912C87}", + "context": "OnDemandReflected", + "variant": "", + "details": { + "name": "Asset" + }, + "methods": [ + { + "base": "IsLoading", + "context": "{895CEA57-551B-5B79-A32B-B2DA0A912C87}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke IsLoading" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after IsLoading is invoked" + }, + "details": { + "name": "IsLoading" + }, + "params": [ + { + "typeid": "{895CEA57-551B-5B79-A32B-B2DA0A912C87}", + "details": { + "name": "Asset" + } + } + ], + "results": [ + { + "typeid": "{A0CA880C-AFE4-43CB-926C-59AC48496112}", + "details": { + "name": "bool" + } + } + ] + }, + { + "base": "GetType", + "context": "{895CEA57-551B-5B79-A32B-B2DA0A912C87}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke GetType" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after GetType is invoked" + }, + "details": { + "name": "GetType" + }, + "params": [ + { + "typeid": "{895CEA57-551B-5B79-A32B-B2DA0A912C87}", + "details": { + "name": "Asset" + } + } + ], + "results": [ + { + "typeid": "{E152C105-A133-4D03-BBF8-3D4B2FBA3E2A}", + "details": { + "name": "AZ::Uuid" + } + } + ] + }, + { + "base": "IsError", + "context": "{895CEA57-551B-5B79-A32B-B2DA0A912C87}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke IsError" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after IsError is invoked" + }, + "details": { + "name": "IsError" + }, + "params": [ + { + "typeid": "{895CEA57-551B-5B79-A32B-B2DA0A912C87}", + "details": { + "name": "Asset" + } + } + ], + "results": [ + { + "typeid": "{A0CA880C-AFE4-43CB-926C-59AC48496112}", + "details": { + "name": "bool" + } + } + ] + }, + { + "base": "GetHint", + "context": "{895CEA57-551B-5B79-A32B-B2DA0A912C87}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke GetHint" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after GetHint is invoked" + }, + "details": { + "name": "GetHint" + }, + "params": [ + { + "typeid": "{895CEA57-551B-5B79-A32B-B2DA0A912C87}", + "details": { + "name": "Asset" + } + } + ], + "results": [ + { + "typeid": "{03AAAB3F-5C47-5A66-9EBC-D5FA4DB353C9}", + "details": { + "name": "AZStd::string" + } + } + ] + }, + { + "base": "GetData", + "context": "{895CEA57-551B-5B79-A32B-B2DA0A912C87}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke GetData" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after GetData is invoked" + }, + "details": { + "name": "GetData" + }, + "params": [ + { + "typeid": "{895CEA57-551B-5B79-A32B-B2DA0A912C87}", + "details": { + "name": "Asset" + } + } + ], + "results": [ + { + "typeid": "{AF3F7D32-1536-422A-89F3-A11E1F5B5A9C}", + "details": { + "name": "AssetData" + } + } + ] + }, + { + "base": "IsReady", + "context": "{895CEA57-551B-5B79-A32B-B2DA0A912C87}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke IsReady" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after IsReady is invoked" + }, + "details": { + "name": "IsReady" + }, + "params": [ + { + "typeid": "{895CEA57-551B-5B79-A32B-B2DA0A912C87}", + "details": { + "name": "Asset" + } + } + ], + "results": [ + { + "typeid": "{A0CA880C-AFE4-43CB-926C-59AC48496112}", + "details": { + "name": "bool" + } + } + ] + }, + { + "base": "GetStatus", + "context": "{895CEA57-551B-5B79-A32B-B2DA0A912C87}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke GetStatus" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after GetStatus is invoked" + }, + "details": { + "name": "GetStatus" + }, + "params": [ + { + "typeid": "{895CEA57-551B-5B79-A32B-B2DA0A912C87}", + "details": { + "name": "Asset" + } + } + ], + "results": [ + { + "typeid": "{72039442-EB38-4D42-A1AD-CB68F7E0EEF6}", + "details": { + "name": "int" + } + } + ] + }, + { + "base": "GetId", + "context": "{895CEA57-551B-5B79-A32B-B2DA0A912C87}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke GetId" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after GetId is invoked" + }, + "details": { + "name": "GetId" + }, + "params": [ + { + "typeid": "{895CEA57-551B-5B79-A32B-B2DA0A912C87}", + "details": { + "name": "Asset" + } + } + ], + "results": [ + { + "typeid": "{652ED536-3402-439B-AEBE-4A5DBC554085}", + "details": { + "name": "AssetId" + } + } + ] + } + ] + }, + { + "base": "{9D83FE2E-68F4-5FDC-92AE-52C395FB5BFB}", + "context": "OnDemandReflected", + "variant": "", + "details": { + "name": "Map", + "category": "Map", + "tooltip": "A collection of Key/Value pairs, where each Key value must be unique." + }, + "methods": [ + { + "base": "contains", + "context": "{9D83FE2E-68F4-5FDC-92AE-52C395FB5BFB}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke contains" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after contains is invoked" + }, + "details": { + "name": "contains" + }, + "params": [ + { + "typeid": "{9D83FE2E-68F4-5FDC-92AE-52C395FB5BFB}", + "details": { + "name": "AZStd::unordered_map" + } + }, + { + "typeid": "{110C4B14-11A8-4E9D-8638-5051013A56AC}", + "details": { + "name": "double" + } + } + ], + "results": [ + { + "typeid": "{A0CA880C-AFE4-43CB-926C-59AC48496112}", + "details": { + "name": "bool" + } + } + ] + }, + { + "base": "Insert", + "context": "{9D83FE2E-68F4-5FDC-92AE-52C395FB5BFB}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Insert" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Insert is invoked" + }, + "details": { + "name": "Insert" + }, + "params": [ + { + "typeid": "{9D83FE2E-68F4-5FDC-92AE-52C395FB5BFB}", + "details": { + "name": "AZStd::unordered_map" + } + }, + { + "typeid": "{110C4B14-11A8-4E9D-8638-5051013A56AC}", + "details": { + "name": "double" + } + }, + { + "typeid": "{110C4B14-11A8-4E9D-8638-5051013A56AC}", + "details": { + "name": "double" + } + } + ], + "results": [ + { + "typeid": "{9D83FE2E-68F4-5FDC-92AE-52C395FB5BFB}", + "details": { + "name": "AZStd::unordered_map" + } + } + ] + }, + { + "base": "Reserve", + "context": "{9D83FE2E-68F4-5FDC-92AE-52C395FB5BFB}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Reserve" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Reserve is invoked" + }, + "details": { + "name": "Reserve" + }, + "params": [ + { + "typeid": "{9D83FE2E-68F4-5FDC-92AE-52C395FB5BFB}", + "details": { + "name": "AZStd::unordered_map" + } + }, + { + "typeid": "{D6597933-47CD-4FC8-B911-63F3E2B0993A}", + "details": { + "name": "AZ::u64" + } + } + ] + }, + { + "base": "GetSize", + "context": "{9D83FE2E-68F4-5FDC-92AE-52C395FB5BFB}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke GetSize" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after GetSize is invoked" + }, + "details": { + "name": "GetSize" + }, + "params": [ + { + "typeid": "{9D83FE2E-68F4-5FDC-92AE-52C395FB5BFB}", + "details": { + "name": "AZStd::unordered_map" + } + } + ], + "results": [ + { + "typeid": "{72039442-EB38-4D42-A1AD-CB68F7E0EEF6}", + "details": { + "name": "int" + } + } + ] + }, + { + "base": "Iterate_VM", + "context": "{9D83FE2E-68F4-5FDC-92AE-52C395FB5BFB}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Iterate_VM" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Iterate_VM is invoked" + }, + "details": { + "name": "Iterate_VM" + }, + "params": [ + { + "typeid": "{9D83FE2E-68F4-5FDC-92AE-52C395FB5BFB}", + "details": { + "name": "AZStd::unordered_map" + } + } + ], + "results": [ + { + "typeid": "{73BC66AE-1DA0-5428-8294-F269A545005F}", + "details": { + "name": "Iterator_VM, AZStd::equal_to, allocator>>" + } + } + ] + }, + { + "base": "GetKeys", + "context": "{9D83FE2E-68F4-5FDC-92AE-52C395FB5BFB}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke GetKeys" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after GetKeys is invoked" + }, + "details": { + "name": "GetKeys" + }, + "params": [ + { + "typeid": "{9D83FE2E-68F4-5FDC-92AE-52C395FB5BFB}", + "details": { + "name": "AZStd::unordered_map" + } + } + ], + "results": [ + { + "typeid": "{F31F64EA-E384-5536-ACD6-8F01849730FC}", + "details": { + "name": "AZStd::vector" + } + } + ] + }, + { + "base": "Size", + "context": "{9D83FE2E-68F4-5FDC-92AE-52C395FB5BFB}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Size" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Size is invoked" + }, + "details": { + "name": "Size" + }, + "params": [ + { + "typeid": "{9D83FE2E-68F4-5FDC-92AE-52C395FB5BFB}", + "details": { + "name": "AZStd::unordered_map" + } + } + ], + "results": [ + { + "typeid": "{72039442-EB38-4D42-A1AD-CB68F7E0EEF6}", + "details": { + "name": "int" + } + } + ] + }, + { + "base": "Erase", + "context": "{9D83FE2E-68F4-5FDC-92AE-52C395FB5BFB}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Erase" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Erase is invoked" + }, + "details": { + "name": "Erase" + }, + "params": [ + { + "typeid": "{9D83FE2E-68F4-5FDC-92AE-52C395FB5BFB}", + "details": { + "name": "AZStd::unordered_map" + } + }, + { + "typeid": "{110C4B14-11A8-4E9D-8638-5051013A56AC}", + "details": { + "name": "double" + } + } + ], + "results": [ + { + "typeid": "{9D83FE2E-68F4-5FDC-92AE-52C395FB5BFB}", + "details": { + "name": "AZStd::unordered_map" + } + } + ] + }, + { + "base": "EraseCheck_VM", + "context": "{9D83FE2E-68F4-5FDC-92AE-52C395FB5BFB}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke EraseCheck_VM" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after EraseCheck_VM is invoked" + }, + "details": { + "name": "EraseCheck_VM" + }, + "params": [ + { + "typeid": "{9D83FE2E-68F4-5FDC-92AE-52C395FB5BFB}", + "details": { + "name": "AZStd::unordered_map" + } + }, + { + "typeid": "{110C4B14-11A8-4E9D-8638-5051013A56AC}", + "details": { + "name": "double" + } + } + ], + "results": [ + { + "typeid": "{A0CA880C-AFE4-43CB-926C-59AC48496112}", + "details": { + "name": "bool" + } + } + ] + }, + { + "base": "Clear", + "context": "{9D83FE2E-68F4-5FDC-92AE-52C395FB5BFB}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Clear" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Clear is invoked" + }, + "details": { + "name": "Clear" + }, + "params": [ + { + "typeid": "{9D83FE2E-68F4-5FDC-92AE-52C395FB5BFB}", + "details": { + "name": "AZStd::unordered_map" + } + } + ], + "results": [ + { + "typeid": "{9D83FE2E-68F4-5FDC-92AE-52C395FB5BFB}", + "details": { + "name": "AZStd::unordered_map" + } + } + ] + }, + { + "base": "At", + "context": "{9D83FE2E-68F4-5FDC-92AE-52C395FB5BFB}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke At" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after At is invoked" + }, + "details": { + "name": "At" + }, + "params": [ + { + "typeid": "{9D83FE2E-68F4-5FDC-92AE-52C395FB5BFB}", + "details": { + "name": "AZStd::unordered_map" + } + }, + { + "typeid": "{110C4B14-11A8-4E9D-8638-5051013A56AC}", + "details": { + "name": "double" + } + } + ], + "results": [ + { + "typeid": "{110C4B14-11A8-4E9D-8638-5051013A56AC}", + "details": { + "name": "double" + } + } + ] + }, + { + "base": "BucketCount", + "context": "{9D83FE2E-68F4-5FDC-92AE-52C395FB5BFB}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke BucketCount" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after BucketCount is invoked" + }, + "details": { + "name": "BucketCount" + }, + "params": [ + { + "typeid": "{9D83FE2E-68F4-5FDC-92AE-52C395FB5BFB}", + "details": { + "name": "AZStd::unordered_map" + } + } + ], + "results": [ + { + "typeid": "{D6597933-47CD-4FC8-B911-63F3E2B0993A}", + "details": { + "name": "AZ::u64" + } + } + ] + }, + { + "base": "Empty", + "context": "{9D83FE2E-68F4-5FDC-92AE-52C395FB5BFB}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Empty" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Empty is invoked" + }, + "details": { + "name": "Empty" + }, + "params": [ + { + "typeid": "{9D83FE2E-68F4-5FDC-92AE-52C395FB5BFB}", + "details": { + "name": "AZStd::unordered_map" + } + } + ], + "results": [ + { + "typeid": "{A0CA880C-AFE4-43CB-926C-59AC48496112}", + "details": { + "name": "bool" + } + } + ] + }, + { + "base": "Swap", + "context": "{9D83FE2E-68F4-5FDC-92AE-52C395FB5BFB}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Swap" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Swap is invoked" + }, + "details": { + "name": "Swap" + }, + "params": [ + { + "typeid": "{9D83FE2E-68F4-5FDC-92AE-52C395FB5BFB}", + "details": { + "name": "AZStd::unordered_map" + } + }, + { + "typeid": "{9D83FE2E-68F4-5FDC-92AE-52C395FB5BFB}", + "details": { + "name": "AZStd::unordered_map" + } + } + ] + } + ] + }, + { + "base": "{FA8DBA11-EE9F-503E-99EA-C12757E5DCF4}", + "context": "OnDemandReflected", + "variant": "", + "details": { + "name": "Map", + "category": "Map", + "tooltip": "A collection of Key/Value pairs, where each Key value must be unique." + }, + "methods": [ + { + "base": "contains", + "context": "{FA8DBA11-EE9F-503E-99EA-C12757E5DCF4}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke contains" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after contains is invoked" + }, + "details": { + "name": "contains" + }, + "params": [ + { + "typeid": "{FA8DBA11-EE9F-503E-99EA-C12757E5DCF4}", + "details": { + "name": "AZStd::unordered_map" + } + }, + { + "typeid": "{6383F1D3-BB27-4E6B-A49A-6409B2059EAA}", + "details": { + "name": "EntityId", + "tooltip": "Entity Unique Id" + } + } + ], + "results": [ + { + "typeid": "{A0CA880C-AFE4-43CB-926C-59AC48496112}", + "details": { + "name": "bool" + } + } + ] + }, + { + "base": "Insert", + "context": "{FA8DBA11-EE9F-503E-99EA-C12757E5DCF4}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Insert" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Insert is invoked" + }, + "details": { + "name": "Insert" + }, + "params": [ + { + "typeid": "{FA8DBA11-EE9F-503E-99EA-C12757E5DCF4}", + "details": { + "name": "AZStd::unordered_map" + } + }, + { + "typeid": "{6383F1D3-BB27-4E6B-A49A-6409B2059EAA}", + "details": { + "name": "EntityId", + "tooltip": "Entity Unique Id" + } + }, + { + "typeid": "{A54C2B36-D5B8-46A1-A529-4EBDBD2450E7}", + "details": { + "name": "Aabb" + } + } + ], + "results": [ + { + "typeid": "{FA8DBA11-EE9F-503E-99EA-C12757E5DCF4}", + "details": { + "name": "AZStd::unordered_map" + } + } + ] + }, + { + "base": "Reserve", + "context": "{FA8DBA11-EE9F-503E-99EA-C12757E5DCF4}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Reserve" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Reserve is invoked" + }, + "details": { + "name": "Reserve" + }, + "params": [ + { + "typeid": "{FA8DBA11-EE9F-503E-99EA-C12757E5DCF4}", + "details": { + "name": "AZStd::unordered_map" + } + }, + { + "typeid": "{D6597933-47CD-4FC8-B911-63F3E2B0993A}", + "details": { + "name": "AZ::u64" + } + } + ] + }, + { + "base": "GetSize", + "context": "{FA8DBA11-EE9F-503E-99EA-C12757E5DCF4}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke GetSize" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after GetSize is invoked" + }, + "details": { + "name": "GetSize" + }, + "params": [ + { + "typeid": "{FA8DBA11-EE9F-503E-99EA-C12757E5DCF4}", + "details": { + "name": "AZStd::unordered_map" + } + } + ], + "results": [ + { + "typeid": "{72039442-EB38-4D42-A1AD-CB68F7E0EEF6}", + "details": { + "name": "int" + } + } + ] + }, + { + "base": "Iterate_VM", + "context": "{FA8DBA11-EE9F-503E-99EA-C12757E5DCF4}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Iterate_VM" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Iterate_VM is invoked" + }, + "details": { + "name": "Iterate_VM" + }, + "params": [ + { + "typeid": "{FA8DBA11-EE9F-503E-99EA-C12757E5DCF4}", + "details": { + "name": "AZStd::unordered_map" + } + } + ], + "results": [ + { + "typeid": "{A1DA2065-BCC0-5064-9695-C0A84818606E}", + "details": { + "name": "Iterator_VM, AZStd::equal_to, allocator>>" + } + } + ] + }, + { + "base": "GetKeys", + "context": "{FA8DBA11-EE9F-503E-99EA-C12757E5DCF4}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke GetKeys" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after GetKeys is invoked" + }, + "details": { + "name": "GetKeys" + }, + "params": [ + { + "typeid": "{FA8DBA11-EE9F-503E-99EA-C12757E5DCF4}", + "details": { + "name": "AZStd::unordered_map" + } + } + ], + "results": [ + { + "typeid": "{4841CFF0-7A5C-519C-BD16-D3625E99605E}", + "details": { + "name": "AZStd::vector" + } + } + ] + }, + { + "base": "Size", + "context": "{FA8DBA11-EE9F-503E-99EA-C12757E5DCF4}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Size" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Size is invoked" + }, + "details": { + "name": "Size" + }, + "params": [ + { + "typeid": "{FA8DBA11-EE9F-503E-99EA-C12757E5DCF4}", + "details": { + "name": "AZStd::unordered_map" + } + } + ], + "results": [ + { + "typeid": "{72039442-EB38-4D42-A1AD-CB68F7E0EEF6}", + "details": { + "name": "int" + } + } + ] + }, + { + "base": "Erase", + "context": "{FA8DBA11-EE9F-503E-99EA-C12757E5DCF4}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Erase" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Erase is invoked" + }, + "details": { + "name": "Erase" + }, + "params": [ + { + "typeid": "{FA8DBA11-EE9F-503E-99EA-C12757E5DCF4}", + "details": { + "name": "AZStd::unordered_map" + } + }, + { + "typeid": "{6383F1D3-BB27-4E6B-A49A-6409B2059EAA}", + "details": { + "name": "EntityId", + "tooltip": "Entity Unique Id" + } + } + ], + "results": [ + { + "typeid": "{FA8DBA11-EE9F-503E-99EA-C12757E5DCF4}", + "details": { + "name": "AZStd::unordered_map" + } + } + ] + }, + { + "base": "EraseCheck_VM", + "context": "{FA8DBA11-EE9F-503E-99EA-C12757E5DCF4}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke EraseCheck_VM" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after EraseCheck_VM is invoked" + }, + "details": { + "name": "EraseCheck_VM" + }, + "params": [ + { + "typeid": "{FA8DBA11-EE9F-503E-99EA-C12757E5DCF4}", + "details": { + "name": "AZStd::unordered_map" + } + }, + { + "typeid": "{6383F1D3-BB27-4E6B-A49A-6409B2059EAA}", + "details": { + "name": "EntityId", + "tooltip": "Entity Unique Id" + } + } + ], + "results": [ + { + "typeid": "{A0CA880C-AFE4-43CB-926C-59AC48496112}", + "details": { + "name": "bool" + } + } + ] + }, + { + "base": "Clear", + "context": "{FA8DBA11-EE9F-503E-99EA-C12757E5DCF4}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Clear" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Clear is invoked" + }, + "details": { + "name": "Clear" + }, + "params": [ + { + "typeid": "{FA8DBA11-EE9F-503E-99EA-C12757E5DCF4}", + "details": { + "name": "AZStd::unordered_map" + } + } + ], + "results": [ + { + "typeid": "{FA8DBA11-EE9F-503E-99EA-C12757E5DCF4}", + "details": { + "name": "AZStd::unordered_map" + } + } + ] + }, + { + "base": "At", + "context": "{FA8DBA11-EE9F-503E-99EA-C12757E5DCF4}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke At" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after At is invoked" + }, + "details": { + "name": "At" + }, + "params": [ + { + "typeid": "{FA8DBA11-EE9F-503E-99EA-C12757E5DCF4}", + "details": { + "name": "AZStd::unordered_map" + } + }, + { + "typeid": "{6383F1D3-BB27-4E6B-A49A-6409B2059EAA}", + "details": { + "name": "EntityId", + "tooltip": "Entity Unique Id" + } + } + ], + "results": [ + { + "typeid": "{A54C2B36-D5B8-46A1-A529-4EBDBD2450E7}", + "details": { + "name": "Aabb" + } + } + ] + }, + { + "base": "BucketCount", + "context": "{FA8DBA11-EE9F-503E-99EA-C12757E5DCF4}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke BucketCount" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after BucketCount is invoked" + }, + "details": { + "name": "BucketCount" + }, + "params": [ + { + "typeid": "{FA8DBA11-EE9F-503E-99EA-C12757E5DCF4}", + "details": { + "name": "AZStd::unordered_map" + } + } + ], + "results": [ + { + "typeid": "{D6597933-47CD-4FC8-B911-63F3E2B0993A}", + "details": { + "name": "AZ::u64" + } + } + ] + }, + { + "base": "Empty", + "context": "{FA8DBA11-EE9F-503E-99EA-C12757E5DCF4}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Empty" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Empty is invoked" + }, + "details": { + "name": "Empty" + }, + "params": [ + { + "typeid": "{FA8DBA11-EE9F-503E-99EA-C12757E5DCF4}", + "details": { + "name": "AZStd::unordered_map" + } + } + ], + "results": [ + { + "typeid": "{A0CA880C-AFE4-43CB-926C-59AC48496112}", + "details": { + "name": "bool" + } + } + ] + }, + { + "base": "Swap", + "context": "{FA8DBA11-EE9F-503E-99EA-C12757E5DCF4}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Swap" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Swap is invoked" + }, + "details": { + "name": "Swap" + }, + "params": [ + { + "typeid": "{FA8DBA11-EE9F-503E-99EA-C12757E5DCF4}", + "details": { + "name": "AZStd::unordered_map" + } + }, + { + "typeid": "{FA8DBA11-EE9F-503E-99EA-C12757E5DCF4}", + "details": { + "name": "AZStd::unordered_map" + } + } + ] + } + ] + }, + { + "base": "{E9D62A8D-0092-5956-9DF4-22A087322834}", + "context": "OnDemandReflected", + "variant": "", + "details": { + "name": "Map", + "category": "Map", + "tooltip": "A collection of Key/Value pairs, where each Key value must be unique." + }, + "methods": [ + { + "base": "contains", + "context": "{E9D62A8D-0092-5956-9DF4-22A087322834}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke contains" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after contains is invoked" + }, + "details": { + "name": "contains" + }, + "params": [ + { + "typeid": "{E9D62A8D-0092-5956-9DF4-22A087322834}", + "details": { + "name": "AZStd::unordered_map" + } + }, + { + "typeid": "{A0CA880C-AFE4-43CB-926C-59AC48496112}", + "details": { + "name": "bool" + } + } + ], + "results": [ + { + "typeid": "{A0CA880C-AFE4-43CB-926C-59AC48496112}", + "details": { + "name": "bool" + } + } + ] + }, + { + "base": "Insert", + "context": "{E9D62A8D-0092-5956-9DF4-22A087322834}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Insert" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Insert is invoked" + }, + "details": { + "name": "Insert" + }, + "params": [ + { + "typeid": "{E9D62A8D-0092-5956-9DF4-22A087322834}", + "details": { + "name": "AZStd::unordered_map" + } + }, + { + "typeid": "{A0CA880C-AFE4-43CB-926C-59AC48496112}", + "details": { + "name": "bool" + } + }, + { + "typeid": "{3D80F623-C85C-4741-90D0-E4E66164E6BF}", + "details": { + "name": "Vector2" + } + } + ], + "results": [ + { + "typeid": "{E9D62A8D-0092-5956-9DF4-22A087322834}", + "details": { + "name": "AZStd::unordered_map" + } + } + ] + }, + { + "base": "Reserve", + "context": "{E9D62A8D-0092-5956-9DF4-22A087322834}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Reserve" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Reserve is invoked" + }, + "details": { + "name": "Reserve" + }, + "params": [ + { + "typeid": "{E9D62A8D-0092-5956-9DF4-22A087322834}", + "details": { + "name": "AZStd::unordered_map" + } + }, + { + "typeid": "{D6597933-47CD-4FC8-B911-63F3E2B0993A}", + "details": { + "name": "AZ::u64" + } + } + ] + }, + { + "base": "GetSize", + "context": "{E9D62A8D-0092-5956-9DF4-22A087322834}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke GetSize" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after GetSize is invoked" + }, + "details": { + "name": "GetSize" + }, + "params": [ + { + "typeid": "{E9D62A8D-0092-5956-9DF4-22A087322834}", + "details": { + "name": "AZStd::unordered_map" + } + } + ], + "results": [ + { + "typeid": "{72039442-EB38-4D42-A1AD-CB68F7E0EEF6}", + "details": { + "name": "int" + } + } + ] + }, + { + "base": "Iterate_VM", + "context": "{E9D62A8D-0092-5956-9DF4-22A087322834}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Iterate_VM" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Iterate_VM is invoked" + }, + "details": { + "name": "Iterate_VM" + }, + "params": [ + { + "typeid": "{E9D62A8D-0092-5956-9DF4-22A087322834}", + "details": { + "name": "AZStd::unordered_map" + } + } + ], + "results": [ + { + "typeid": "{48C8234B-CE23-5CC4-9F37-00DB41BAB370}", + "details": { + "name": "Iterator_VM, AZStd::equal_to, allocator>>" + } + } + ] + }, + { + "base": "GetKeys", + "context": "{E9D62A8D-0092-5956-9DF4-22A087322834}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke GetKeys" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after GetKeys is invoked" + }, + "details": { + "name": "GetKeys" + }, + "params": [ + { + "typeid": "{E9D62A8D-0092-5956-9DF4-22A087322834}", + "details": { + "name": "AZStd::unordered_map" + } + } + ], + "results": [ + { + "typeid": "{B505B05D-57BF-5A45-9113-B3A2784E2CD7}", + "details": { + "name": "AZStd::vector" + } + } + ] + }, + { + "base": "Size", + "context": "{E9D62A8D-0092-5956-9DF4-22A087322834}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Size" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Size is invoked" + }, + "details": { + "name": "Size" + }, + "params": [ + { + "typeid": "{E9D62A8D-0092-5956-9DF4-22A087322834}", + "details": { + "name": "AZStd::unordered_map" + } + } + ], + "results": [ + { + "typeid": "{72039442-EB38-4D42-A1AD-CB68F7E0EEF6}", + "details": { + "name": "int" + } + } + ] + }, + { + "base": "Erase", + "context": "{E9D62A8D-0092-5956-9DF4-22A087322834}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Erase" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Erase is invoked" + }, + "details": { + "name": "Erase" + }, + "params": [ + { + "typeid": "{E9D62A8D-0092-5956-9DF4-22A087322834}", + "details": { + "name": "AZStd::unordered_map" + } + }, + { + "typeid": "{A0CA880C-AFE4-43CB-926C-59AC48496112}", + "details": { + "name": "bool" + } + } + ], + "results": [ + { + "typeid": "{E9D62A8D-0092-5956-9DF4-22A087322834}", + "details": { + "name": "AZStd::unordered_map" + } + } + ] + }, + { + "base": "EraseCheck_VM", + "context": "{E9D62A8D-0092-5956-9DF4-22A087322834}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke EraseCheck_VM" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after EraseCheck_VM is invoked" + }, + "details": { + "name": "EraseCheck_VM" + }, + "params": [ + { + "typeid": "{E9D62A8D-0092-5956-9DF4-22A087322834}", + "details": { + "name": "AZStd::unordered_map" + } + }, + { + "typeid": "{A0CA880C-AFE4-43CB-926C-59AC48496112}", + "details": { + "name": "bool" + } + } + ], + "results": [ + { + "typeid": "{A0CA880C-AFE4-43CB-926C-59AC48496112}", + "details": { + "name": "bool" + } + } + ] + }, + { + "base": "Clear", + "context": "{E9D62A8D-0092-5956-9DF4-22A087322834}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Clear" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Clear is invoked" + }, + "details": { + "name": "Clear" + }, + "params": [ + { + "typeid": "{E9D62A8D-0092-5956-9DF4-22A087322834}", + "details": { + "name": "AZStd::unordered_map" + } + } + ], + "results": [ + { + "typeid": "{E9D62A8D-0092-5956-9DF4-22A087322834}", + "details": { + "name": "AZStd::unordered_map" + } + } + ] + }, + { + "base": "At", + "context": "{E9D62A8D-0092-5956-9DF4-22A087322834}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke At" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after At is invoked" + }, + "details": { + "name": "At" + }, + "params": [ + { + "typeid": "{E9D62A8D-0092-5956-9DF4-22A087322834}", + "details": { + "name": "AZStd::unordered_map" + } + }, + { + "typeid": "{A0CA880C-AFE4-43CB-926C-59AC48496112}", + "details": { + "name": "bool" + } + } + ], + "results": [ + { + "typeid": "{3D80F623-C85C-4741-90D0-E4E66164E6BF}", + "details": { + "name": "Vector2" + } + } + ] + }, + { + "base": "BucketCount", + "context": "{E9D62A8D-0092-5956-9DF4-22A087322834}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke BucketCount" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after BucketCount is invoked" + }, + "details": { + "name": "BucketCount" + }, + "params": [ + { + "typeid": "{E9D62A8D-0092-5956-9DF4-22A087322834}", + "details": { + "name": "AZStd::unordered_map" + } + } + ], + "results": [ + { + "typeid": "{D6597933-47CD-4FC8-B911-63F3E2B0993A}", + "details": { + "name": "AZ::u64" + } + } + ] + }, + { + "base": "Empty", + "context": "{E9D62A8D-0092-5956-9DF4-22A087322834}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Empty" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Empty is invoked" + }, + "details": { + "name": "Empty" + }, + "params": [ + { + "typeid": "{E9D62A8D-0092-5956-9DF4-22A087322834}", + "details": { + "name": "AZStd::unordered_map" + } + } + ], + "results": [ + { + "typeid": "{A0CA880C-AFE4-43CB-926C-59AC48496112}", + "details": { + "name": "bool" + } + } + ] + }, + { + "base": "Swap", + "context": "{E9D62A8D-0092-5956-9DF4-22A087322834}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Swap" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Swap is invoked" + }, + "details": { + "name": "Swap" + }, + "params": [ + { + "typeid": "{E9D62A8D-0092-5956-9DF4-22A087322834}", + "details": { + "name": "AZStd::unordered_map" + } + }, + { + "typeid": "{E9D62A8D-0092-5956-9DF4-22A087322834}", + "details": { + "name": "AZStd::unordered_map" + } + } + ] + } + ] + }, + { + "base": "{A1F6761B-B5CA-59E6-89FF-EB0ABDF6BD68}", + "context": "OnDemandReflected", + "variant": "", + "details": { + "name": "Asset" + }, + "methods": [ + { + "base": "IsLoading", + "context": "{A1F6761B-B5CA-59E6-89FF-EB0ABDF6BD68}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke IsLoading" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after IsLoading is invoked" + }, + "details": { + "name": "IsLoading" + }, + "params": [ + { + "typeid": "{A1F6761B-B5CA-59E6-89FF-EB0ABDF6BD68}", + "details": { + "name": "Asset" + } + } + ], + "results": [ + { + "typeid": "{A0CA880C-AFE4-43CB-926C-59AC48496112}", + "details": { + "name": "bool" + } + } + ] + }, + { + "base": "GetType", + "context": "{A1F6761B-B5CA-59E6-89FF-EB0ABDF6BD68}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke GetType" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after GetType is invoked" + }, + "details": { + "name": "GetType" + }, + "params": [ + { + "typeid": "{A1F6761B-B5CA-59E6-89FF-EB0ABDF6BD68}", + "details": { + "name": "Asset" + } + } + ], + "results": [ + { + "typeid": "{E152C105-A133-4D03-BBF8-3D4B2FBA3E2A}", + "details": { + "name": "AZ::Uuid" + } + } + ] + }, + { + "base": "IsError", + "context": "{A1F6761B-B5CA-59E6-89FF-EB0ABDF6BD68}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke IsError" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after IsError is invoked" + }, + "details": { + "name": "IsError" + }, + "params": [ + { + "typeid": "{A1F6761B-B5CA-59E6-89FF-EB0ABDF6BD68}", + "details": { + "name": "Asset" + } + } + ], + "results": [ + { + "typeid": "{A0CA880C-AFE4-43CB-926C-59AC48496112}", + "details": { + "name": "bool" + } + } + ] + }, + { + "base": "GetHint", + "context": "{A1F6761B-B5CA-59E6-89FF-EB0ABDF6BD68}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke GetHint" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after GetHint is invoked" + }, + "details": { + "name": "GetHint" + }, + "params": [ + { + "typeid": "{A1F6761B-B5CA-59E6-89FF-EB0ABDF6BD68}", + "details": { + "name": "Asset" + } + } + ], + "results": [ + { + "typeid": "{03AAAB3F-5C47-5A66-9EBC-D5FA4DB353C9}", + "details": { + "name": "AZStd::string" + } + } + ] + }, + { + "base": "GetData", + "context": "{A1F6761B-B5CA-59E6-89FF-EB0ABDF6BD68}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke GetData" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after GetData is invoked" + }, + "details": { + "name": "GetData" + }, + "params": [ + { + "typeid": "{A1F6761B-B5CA-59E6-89FF-EB0ABDF6BD68}", + "details": { + "name": "Asset" + } + } + ], + "results": [ + { + "typeid": "{AF3F7D32-1536-422A-89F3-A11E1F5B5A9C}", + "details": { + "name": "AssetData" + } + } + ] + }, + { + "base": "IsReady", + "context": "{A1F6761B-B5CA-59E6-89FF-EB0ABDF6BD68}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke IsReady" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after IsReady is invoked" + }, + "details": { + "name": "IsReady" + }, + "params": [ + { + "typeid": "{A1F6761B-B5CA-59E6-89FF-EB0ABDF6BD68}", + "details": { + "name": "Asset" + } + } + ], + "results": [ + { + "typeid": "{A0CA880C-AFE4-43CB-926C-59AC48496112}", + "details": { + "name": "bool" + } + } + ] + }, + { + "base": "GetStatus", + "context": "{A1F6761B-B5CA-59E6-89FF-EB0ABDF6BD68}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke GetStatus" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after GetStatus is invoked" + }, + "details": { + "name": "GetStatus" + }, + "params": [ + { + "typeid": "{A1F6761B-B5CA-59E6-89FF-EB0ABDF6BD68}", + "details": { + "name": "Asset" + } + } + ], + "results": [ + { + "typeid": "{72039442-EB38-4D42-A1AD-CB68F7E0EEF6}", + "details": { + "name": "int" + } + } + ] + }, + { + "base": "GetId", + "context": "{A1F6761B-B5CA-59E6-89FF-EB0ABDF6BD68}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke GetId" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after GetId is invoked" + }, + "details": { + "name": "GetId" + }, + "params": [ + { + "typeid": "{A1F6761B-B5CA-59E6-89FF-EB0ABDF6BD68}", + "details": { + "name": "Asset" + } + } + ], + "results": [ + { + "typeid": "{652ED536-3402-439B-AEBE-4A5DBC554085}", + "details": { + "name": "AssetId" + } + } + ] + } + ] + }, + { + "base": "{7DCCB2BE-9664-504E-8585-ED46CD3FE97F}", + "context": "OnDemandReflected", + "variant": "", + "details": { + "name": "Map", + "category": "Map", + "tooltip": "A collection of Key/Value pairs, where each Key value must be unique." + }, + "methods": [ + { + "base": "contains", + "context": "{7DCCB2BE-9664-504E-8585-ED46CD3FE97F}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke contains" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after contains is invoked" + }, + "details": { + "name": "contains" + }, + "params": [ + { + "typeid": "{7DCCB2BE-9664-504E-8585-ED46CD3FE97F}", + "details": { + "name": "AZStd::unordered_map" + } + }, + { + "typeid": "{6383F1D3-BB27-4E6B-A49A-6409B2059EAA}", + "details": { + "name": "EntityId", + "tooltip": "Entity Unique Id" + } + } + ], + "results": [ + { + "typeid": "{A0CA880C-AFE4-43CB-926C-59AC48496112}", + "details": { + "name": "bool" + } + } + ] + }, + { + "base": "Insert", + "context": "{7DCCB2BE-9664-504E-8585-ED46CD3FE97F}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Insert" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Insert is invoked" + }, + "details": { + "name": "Insert" + }, + "params": [ + { + "typeid": "{7DCCB2BE-9664-504E-8585-ED46CD3FE97F}", + "details": { + "name": "AZStd::unordered_map" + } + }, + { + "typeid": "{6383F1D3-BB27-4E6B-A49A-6409B2059EAA}", + "details": { + "name": "EntityId", + "tooltip": "Entity Unique Id" + } + }, + { + "typeid": "{03AAAB3F-5C47-5A66-9EBC-D5FA4DB353C9}", + "details": { + "name": "AZStd::string" + } + } + ], + "results": [ + { + "typeid": "{7DCCB2BE-9664-504E-8585-ED46CD3FE97F}", + "details": { + "name": "AZStd::unordered_map" + } + } + ] + }, + { + "base": "Reserve", + "context": "{7DCCB2BE-9664-504E-8585-ED46CD3FE97F}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Reserve" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Reserve is invoked" + }, + "details": { + "name": "Reserve" + }, + "params": [ + { + "typeid": "{7DCCB2BE-9664-504E-8585-ED46CD3FE97F}", + "details": { + "name": "AZStd::unordered_map" + } + }, + { + "typeid": "{D6597933-47CD-4FC8-B911-63F3E2B0993A}", + "details": { + "name": "AZ::u64" + } + } + ] + }, + { + "base": "GetSize", + "context": "{7DCCB2BE-9664-504E-8585-ED46CD3FE97F}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke GetSize" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after GetSize is invoked" + }, + "details": { + "name": "GetSize" + }, + "params": [ + { + "typeid": "{7DCCB2BE-9664-504E-8585-ED46CD3FE97F}", + "details": { + "name": "AZStd::unordered_map" + } + } + ], + "results": [ + { + "typeid": "{72039442-EB38-4D42-A1AD-CB68F7E0EEF6}", + "details": { + "name": "int" + } + } + ] + }, + { + "base": "Iterate_VM", + "context": "{7DCCB2BE-9664-504E-8585-ED46CD3FE97F}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Iterate_VM" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Iterate_VM is invoked" + }, + "details": { + "name": "Iterate_VM" + }, + "params": [ + { + "typeid": "{7DCCB2BE-9664-504E-8585-ED46CD3FE97F}", + "details": { + "name": "AZStd::unordered_map" + } + } + ], + "results": [ + { + "typeid": "{C920C1C1-DFC1-56A4-833A-CD1B260B17F8}", + "details": { + "name": "Iterator_VM, allocator>, AZStd::hash", + "category": "Map", + "tooltip": "A collection of Key/Value pairs, where each Key value must be unique." + }, + "methods": [ + { + "base": "contains", + "context": "{681B589F-DB42-5D86-B6FC-C4B62EBC5F19}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke contains" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after contains is invoked" + }, + "details": { + "name": "contains" + }, + "params": [ + { + "typeid": "{681B589F-DB42-5D86-B6FC-C4B62EBC5F19}", + "details": { + "name": "AZStd::unordered_map" + } + }, + { + "typeid": "{9F4E062E-06A0-46D4-85DF-E0DA96467D3A}", + "details": { + "name": "Crc32" + } + } + ], + "results": [ + { + "typeid": "{A0CA880C-AFE4-43CB-926C-59AC48496112}", + "details": { + "name": "bool" + } + } + ] + }, + { + "base": "Insert", + "context": "{681B589F-DB42-5D86-B6FC-C4B62EBC5F19}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Insert" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Insert is invoked" + }, + "details": { + "name": "Insert" + }, + "params": [ + { + "typeid": "{681B589F-DB42-5D86-B6FC-C4B62EBC5F19}", + "details": { + "name": "AZStd::unordered_map" + } + }, + { + "typeid": "{9F4E062E-06A0-46D4-85DF-E0DA96467D3A}", + "details": { + "name": "Crc32" + } + }, + { + "typeid": "{9F4E062E-06A0-46D4-85DF-E0DA96467D3A}", + "details": { + "name": "Crc32" + } + } + ], + "results": [ + { + "typeid": "{681B589F-DB42-5D86-B6FC-C4B62EBC5F19}", + "details": { + "name": "AZStd::unordered_map" + } + } + ] + }, + { + "base": "Reserve", + "context": "{681B589F-DB42-5D86-B6FC-C4B62EBC5F19}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Reserve" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Reserve is invoked" + }, + "details": { + "name": "Reserve" + }, + "params": [ + { + "typeid": "{681B589F-DB42-5D86-B6FC-C4B62EBC5F19}", + "details": { + "name": "AZStd::unordered_map" + } + }, + { + "typeid": "{D6597933-47CD-4FC8-B911-63F3E2B0993A}", + "details": { + "name": "AZ::u64" + } + } + ] + }, + { + "base": "GetSize", + "context": "{681B589F-DB42-5D86-B6FC-C4B62EBC5F19}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke GetSize" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after GetSize is invoked" + }, + "details": { + "name": "GetSize" + }, + "params": [ + { + "typeid": "{681B589F-DB42-5D86-B6FC-C4B62EBC5F19}", + "details": { + "name": "AZStd::unordered_map" + } + } + ], + "results": [ + { + "typeid": "{72039442-EB38-4D42-A1AD-CB68F7E0EEF6}", + "details": { + "name": "int" + } + } + ] + }, + { + "base": "Iterate_VM", + "context": "{681B589F-DB42-5D86-B6FC-C4B62EBC5F19}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Iterate_VM" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Iterate_VM is invoked" + }, + "details": { + "name": "Iterate_VM" + }, + "params": [ + { + "typeid": "{681B589F-DB42-5D86-B6FC-C4B62EBC5F19}", + "details": { + "name": "AZStd::unordered_map" + } + } + ], + "results": [ + { + "typeid": "{12D220B0-B129-5D35-8C0A-CA014FB793C1}", + "details": { + "name": "Iterator_VM, AZStd::equal_to, allocator>>" + } + } + ] + }, + { + "base": "GetKeys", + "context": "{681B589F-DB42-5D86-B6FC-C4B62EBC5F19}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke GetKeys" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after GetKeys is invoked" + }, + "details": { + "name": "GetKeys" + }, + "params": [ + { + "typeid": "{681B589F-DB42-5D86-B6FC-C4B62EBC5F19}", + "details": { + "name": "AZStd::unordered_map" + } + } + ], + "results": [ + { + "typeid": "{287CEE87-6FF3-52FC-9D32-38255E2C7FE9}", + "details": { + "name": "AZStd::vector" + } + } + ] + }, + { + "base": "Size", + "context": "{681B589F-DB42-5D86-B6FC-C4B62EBC5F19}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Size" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Size is invoked" + }, + "details": { + "name": "Size" + }, + "params": [ + { + "typeid": "{681B589F-DB42-5D86-B6FC-C4B62EBC5F19}", + "details": { + "name": "AZStd::unordered_map" + } + } + ], + "results": [ + { + "typeid": "{72039442-EB38-4D42-A1AD-CB68F7E0EEF6}", + "details": { + "name": "int" + } + } + ] + }, + { + "base": "Erase", + "context": "{681B589F-DB42-5D86-B6FC-C4B62EBC5F19}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Erase" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Erase is invoked" + }, + "details": { + "name": "Erase" + }, + "params": [ + { + "typeid": "{681B589F-DB42-5D86-B6FC-C4B62EBC5F19}", + "details": { + "name": "AZStd::unordered_map" + } + }, + { + "typeid": "{9F4E062E-06A0-46D4-85DF-E0DA96467D3A}", + "details": { + "name": "Crc32" + } + } + ], + "results": [ + { + "typeid": "{681B589F-DB42-5D86-B6FC-C4B62EBC5F19}", + "details": { + "name": "AZStd::unordered_map" + } + } + ] + }, + { + "base": "EraseCheck_VM", + "context": "{681B589F-DB42-5D86-B6FC-C4B62EBC5F19}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke EraseCheck_VM" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after EraseCheck_VM is invoked" + }, + "details": { + "name": "EraseCheck_VM" + }, + "params": [ + { + "typeid": "{681B589F-DB42-5D86-B6FC-C4B62EBC5F19}", + "details": { + "name": "AZStd::unordered_map" + } + }, + { + "typeid": "{9F4E062E-06A0-46D4-85DF-E0DA96467D3A}", + "details": { + "name": "Crc32" + } + } + ], + "results": [ + { + "typeid": "{A0CA880C-AFE4-43CB-926C-59AC48496112}", + "details": { + "name": "bool" + } + } + ] + }, + { + "base": "Clear", + "context": "{681B589F-DB42-5D86-B6FC-C4B62EBC5F19}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Clear" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Clear is invoked" + }, + "details": { + "name": "Clear" + }, + "params": [ + { + "typeid": "{681B589F-DB42-5D86-B6FC-C4B62EBC5F19}", + "details": { + "name": "AZStd::unordered_map" + } + } + ], + "results": [ + { + "typeid": "{681B589F-DB42-5D86-B6FC-C4B62EBC5F19}", + "details": { + "name": "AZStd::unordered_map" + } + } + ] + }, + { + "base": "At", + "context": "{681B589F-DB42-5D86-B6FC-C4B62EBC5F19}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke At" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after At is invoked" + }, + "details": { + "name": "At" + }, + "params": [ + { + "typeid": "{681B589F-DB42-5D86-B6FC-C4B62EBC5F19}", + "details": { + "name": "AZStd::unordered_map" + } + }, + { + "typeid": "{9F4E062E-06A0-46D4-85DF-E0DA96467D3A}", + "details": { + "name": "Crc32" + } + } + ], + "results": [ + { + "typeid": "{9F4E062E-06A0-46D4-85DF-E0DA96467D3A}", + "details": { + "name": "Crc32" + } + } + ] + }, + { + "base": "BucketCount", + "context": "{681B589F-DB42-5D86-B6FC-C4B62EBC5F19}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke BucketCount" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after BucketCount is invoked" + }, + "details": { + "name": "BucketCount" + }, + "params": [ + { + "typeid": "{681B589F-DB42-5D86-B6FC-C4B62EBC5F19}", + "details": { + "name": "AZStd::unordered_map" + } + } + ], + "results": [ + { + "typeid": "{D6597933-47CD-4FC8-B911-63F3E2B0993A}", + "details": { + "name": "AZ::u64" + } + } + ] + }, + { + "base": "Empty", + "context": "{681B589F-DB42-5D86-B6FC-C4B62EBC5F19}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Empty" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Empty is invoked" + }, + "details": { + "name": "Empty" + }, + "params": [ + { + "typeid": "{681B589F-DB42-5D86-B6FC-C4B62EBC5F19}", + "details": { + "name": "AZStd::unordered_map" + } + } + ], + "results": [ + { + "typeid": "{A0CA880C-AFE4-43CB-926C-59AC48496112}", + "details": { + "name": "bool" + } + } + ] + }, + { + "base": "Swap", + "context": "{681B589F-DB42-5D86-B6FC-C4B62EBC5F19}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Swap" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Swap is invoked" + }, + "details": { + "name": "Swap" + }, + "params": [ + { + "typeid": "{681B589F-DB42-5D86-B6FC-C4B62EBC5F19}", + "details": { + "name": "AZStd::unordered_map" + } + }, + { + "typeid": "{681B589F-DB42-5D86-B6FC-C4B62EBC5F19}", + "details": { + "name": "AZStd::unordered_map" + } + } + ] + } + ] + }, + { + "base": "{1F0C2998-C47A-546C-A9A5-23155075A403}", + "context": "OnDemandReflected", + "variant": "", + "details": { + "name": "Map", + "category": "Map", + "tooltip": "A collection of Key/Value pairs, where each Key value must be unique." + }, + "methods": [ + { + "base": "contains", + "context": "{1F0C2998-C47A-546C-A9A5-23155075A403}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke contains" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after contains is invoked" + }, + "details": { + "name": "contains" + }, + "params": [ + { + "typeid": "{1F0C2998-C47A-546C-A9A5-23155075A403}", + "details": { + "name": "AZStd::unordered_map" + } + }, + { + "typeid": "{03AAAB3F-5C47-5A66-9EBC-D5FA4DB353C9}", + "details": { + "name": "AZStd::string" + } + } + ], + "results": [ + { + "typeid": "{A0CA880C-AFE4-43CB-926C-59AC48496112}", + "details": { + "name": "bool" + } + } + ] + }, + { + "base": "Insert", + "context": "{1F0C2998-C47A-546C-A9A5-23155075A403}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Insert" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Insert is invoked" + }, + "details": { + "name": "Insert" + }, + "params": [ + { + "typeid": "{1F0C2998-C47A-546C-A9A5-23155075A403}", + "details": { + "name": "AZStd::unordered_map" + } + }, + { + "typeid": "{03AAAB3F-5C47-5A66-9EBC-D5FA4DB353C9}", + "details": { + "name": "AZStd::string" + } + }, + { + "typeid": "{5D9958E9-9F1E-4985-B532-FFFDE75FEDFD}", + "details": { + "name": "Transform" + } + } + ], + "results": [ + { + "typeid": "{1F0C2998-C47A-546C-A9A5-23155075A403}", + "details": { + "name": "AZStd::unordered_map" + } + } + ] + }, + { + "base": "Reserve", + "context": "{1F0C2998-C47A-546C-A9A5-23155075A403}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Reserve" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Reserve is invoked" + }, + "details": { + "name": "Reserve" + }, + "params": [ + { + "typeid": "{1F0C2998-C47A-546C-A9A5-23155075A403}", + "details": { + "name": "AZStd::unordered_map" + } + }, + { + "typeid": "{D6597933-47CD-4FC8-B911-63F3E2B0993A}", + "details": { + "name": "AZ::u64" + } + } + ] + }, + { + "base": "GetSize", + "context": "{1F0C2998-C47A-546C-A9A5-23155075A403}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke GetSize" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after GetSize is invoked" + }, + "details": { + "name": "GetSize" + }, + "params": [ + { + "typeid": "{1F0C2998-C47A-546C-A9A5-23155075A403}", + "details": { + "name": "AZStd::unordered_map" + } + } + ], + "results": [ + { + "typeid": "{72039442-EB38-4D42-A1AD-CB68F7E0EEF6}", + "details": { + "name": "int" + } + } + ] + }, + { + "base": "Iterate_VM", + "context": "{1F0C2998-C47A-546C-A9A5-23155075A403}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Iterate_VM" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Iterate_VM is invoked" + }, + "details": { + "name": "Iterate_VM" + }, + "params": [ + { + "typeid": "{1F0C2998-C47A-546C-A9A5-23155075A403}", + "details": { + "name": "AZStd::unordered_map" + } + } + ], + "results": [ + { + "typeid": "{EA22509E-30D9-506B-BCE7-B832CF7DE5C0}", + "details": { + "name": "Iterator_VM, allocator>, Transform, AZStd::hash, allocator> bool >" + } + } + ] + }, + { + "base": "MultiplyAndAdd", + "context": "{76898795-2B30-4645-B6D4-67568ECC889F}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke MultiplyAndAdd" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after MultiplyAndAdd is invoked" + }, + "details": { + "name": "MultiplyAndAdd" + }, + "params": [ + { + "typeid": "{110C4B14-11A8-4E9D-8638-5051013A56AC}", + "details": { + "name": "double" + } + }, + { + "typeid": "{110C4B14-11A8-4E9D-8638-5051013A56AC}", + "details": { + "name": "double" + } + }, + { + "typeid": "{110C4B14-11A8-4E9D-8638-5051013A56AC}", + "details": { + "name": "double" + } + } + ], + "results": [ + { + "typeid": "{110C4B14-11A8-4E9D-8638-5051013A56AC}", + "details": { + "name": "double" + } + } + ] + }, + { + "base": "StringToNumber", + "context": "{76898795-2B30-4645-B6D4-67568ECC889F}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke StringToNumber" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after StringToNumber is invoked" + }, + "details": { + "name": "StringToNumber" + }, + "params": [ + { + "typeid": "{03AAAB3F-5C47-5A66-9EBC-D5FA4DB353C9}", + "details": { + "name": "AZStd::string" + } + } + ], + "results": [ + { + "typeid": "{110C4B14-11A8-4E9D-8638-5051013A56AC}", + "details": { + "name": "double" + } + } + ] + } + ] + }, + { + "base": "{59E0EF87-352C-4CFB-A810-5B8752BDD1EF}", + "context": "OnDemandReflected", + "variant": "", + "details": { + "name": "MathTransform_VM" + }, + "methods": [ + { + "base": "RotationZDegrees", + "context": "{59E0EF87-352C-4CFB-A810-5B8752BDD1EF}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke RotationZDegrees" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after RotationZDegrees is invoked" + }, + "details": { + "name": "RotationZDegrees" + }, + "params": [ + { + "typeid": "{110C4B14-11A8-4E9D-8638-5051013A56AC}", + "details": { + "name": "double" + } + } + ], + "results": [ + { + "typeid": "{5D9958E9-9F1E-4985-B532-FFFDE75FEDFD}", + "details": { + "name": "Transform" + } + } + ] + }, + { + "base": "GetUp", + "context": "{59E0EF87-352C-4CFB-A810-5B8752BDD1EF}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke GetUp" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after GetUp is invoked" + }, + "details": { + "name": "GetUp" + }, + "params": [ + { + "typeid": "{5D9958E9-9F1E-4985-B532-FFFDE75FEDFD}", + "details": { + "name": "Transform" + } + }, + { + "typeid": "{110C4B14-11A8-4E9D-8638-5051013A56AC}", + "details": { + "name": "double" + } + } + ], + "results": [ + { + "typeid": "{8379EB7D-01FA-4538-B64B-A6543B4BE73D}", + "details": { + "name": "Vector3" + } + } + ] + }, + { + "base": "GetForward", + "context": "{59E0EF87-352C-4CFB-A810-5B8752BDD1EF}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke GetForward" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after GetForward is invoked" + }, + "details": { + "name": "GetForward" + }, + "params": [ + { + "typeid": "{5D9958E9-9F1E-4985-B532-FFFDE75FEDFD}", + "details": { + "name": "Transform" + } + }, + { + "typeid": "{110C4B14-11A8-4E9D-8638-5051013A56AC}", + "details": { + "name": "double" + } + } + ], + "results": [ + { + "typeid": "{8379EB7D-01FA-4538-B64B-A6543B4BE73D}", + "details": { + "name": "Vector3" + } + } + ] + }, + { + "base": "IsClose", + "context": "{59E0EF87-352C-4CFB-A810-5B8752BDD1EF}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke IsClose" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after IsClose is invoked" + }, + "details": { + "name": "IsClose" + }, + "params": [ + { + "typeid": "{5D9958E9-9F1E-4985-B532-FFFDE75FEDFD}", + "details": { + "name": "Transform" + } + }, + { + "typeid": "{5D9958E9-9F1E-4985-B532-FFFDE75FEDFD}", + "details": { + "name": "Transform" + } + }, + { + "typeid": "{110C4B14-11A8-4E9D-8638-5051013A56AC}", + "details": { + "name": "double" + } + } + ], + "results": [ + { + "typeid": "{A0CA880C-AFE4-43CB-926C-59AC48496112}", + "details": { + "name": "bool" + } + } + ] + }, + { + "base": "RotationXDegrees", + "context": "{59E0EF87-352C-4CFB-A810-5B8752BDD1EF}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke RotationXDegrees" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after RotationXDegrees is invoked" + }, + "details": { + "name": "RotationXDegrees" + }, + "params": [ + { + "typeid": "{110C4B14-11A8-4E9D-8638-5051013A56AC}", + "details": { + "name": "double" + } + } + ], + "results": [ + { + "typeid": "{5D9958E9-9F1E-4985-B532-FFFDE75FEDFD}", + "details": { + "name": "Transform" + } + } + ] + }, + { + "base": "FromTranslation", + "context": "{59E0EF87-352C-4CFB-A810-5B8752BDD1EF}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke FromTranslation" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after FromTranslation is invoked" + }, + "details": { + "name": "FromTranslation" + }, + "params": [ + { + "typeid": "{8379EB7D-01FA-4538-B64B-A6543B4BE73D}", + "details": { + "name": "Vector3" + } + } + ], + "results": [ + { + "typeid": "{5D9958E9-9F1E-4985-B532-FFFDE75FEDFD}", + "details": { + "name": "Transform" + } + } + ] + }, + { + "base": "IsFinite", + "context": "{59E0EF87-352C-4CFB-A810-5B8752BDD1EF}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke IsFinite" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after IsFinite is invoked" + }, + "details": { + "name": "IsFinite" + }, + "params": [ + { + "typeid": "{5D9958E9-9F1E-4985-B532-FFFDE75FEDFD}", + "details": { + "name": "Transform" + } + } + ], + "results": [ + { + "typeid": "{A0CA880C-AFE4-43CB-926C-59AC48496112}", + "details": { + "name": "bool" + } + } + ] + }, + { + "base": "MultiplyByUniformScale", + "context": "{59E0EF87-352C-4CFB-A810-5B8752BDD1EF}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke MultiplyByUniformScale" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after MultiplyByUniformScale is invoked" + }, + "details": { + "name": "MultiplyByUniformScale" + }, + "params": [ + { + "typeid": "{5D9958E9-9F1E-4985-B532-FFFDE75FEDFD}", + "details": { + "name": "Transform" + } + }, + { + "typeid": "{110C4B14-11A8-4E9D-8638-5051013A56AC}", + "details": { + "name": "double" + } + } + ], + "results": [ + { + "typeid": "{5D9958E9-9F1E-4985-B532-FFFDE75FEDFD}", + "details": { + "name": "Transform" + } + } + ] + }, + { + "base": "MultiplyByTransform", + "context": "{59E0EF87-352C-4CFB-A810-5B8752BDD1EF}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke MultiplyByTransform" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after MultiplyByTransform is invoked" + }, + "details": { + "name": "MultiplyByTransform" + }, + "params": [ + { + "typeid": "{5D9958E9-9F1E-4985-B532-FFFDE75FEDFD}", + "details": { + "name": "Transform" + } + }, + { + "typeid": "{5D9958E9-9F1E-4985-B532-FFFDE75FEDFD}", + "details": { + "name": "Transform" + } + } + ], + "results": [ + { + "typeid": "{5D9958E9-9F1E-4985-B532-FFFDE75FEDFD}", + "details": { + "name": "Transform" + } + } + ] + }, + { + "base": "FromRotation", + "context": "{59E0EF87-352C-4CFB-A810-5B8752BDD1EF}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke FromRotation" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after FromRotation is invoked" + }, + "details": { + "name": "FromRotation" + }, + "params": [ + { + "typeid": "{73103120-3DD3-4873-BAB3-9713FA2804FB}", + "details": { + "name": "Quaternion" + } + } + ], + "results": [ + { + "typeid": "{5D9958E9-9F1E-4985-B532-FFFDE75FEDFD}", + "details": { + "name": "Transform" + } + } + ] + }, + { + "base": "RotationYDegrees", + "context": "{59E0EF87-352C-4CFB-A810-5B8752BDD1EF}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke RotationYDegrees" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after RotationYDegrees is invoked" + }, + "details": { + "name": "RotationYDegrees" + }, + "params": [ + { + "typeid": "{110C4B14-11A8-4E9D-8638-5051013A56AC}", + "details": { + "name": "double" + } + } + ], + "results": [ + { + "typeid": "{5D9958E9-9F1E-4985-B532-FFFDE75FEDFD}", + "details": { + "name": "Transform" + } + } + ] + }, + { + "base": "FromRotationAndTranslation", + "context": "{59E0EF87-352C-4CFB-A810-5B8752BDD1EF}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke FromRotationAndTranslation" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after FromRotationAndTranslation is invoked" + }, + "details": { + "name": "FromRotationAndTranslation" + }, + "params": [ + { + "typeid": "{73103120-3DD3-4873-BAB3-9713FA2804FB}", + "details": { + "name": "Quaternion" + } + }, + { + "typeid": "{8379EB7D-01FA-4538-B64B-A6543B4BE73D}", + "details": { + "name": "Vector3" + } + } + ], + "results": [ + { + "typeid": "{5D9958E9-9F1E-4985-B532-FFFDE75FEDFD}", + "details": { + "name": "Transform" + } + } + ] + }, + { + "base": "MultiplyByVector3", + "context": "{59E0EF87-352C-4CFB-A810-5B8752BDD1EF}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke MultiplyByVector3" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after MultiplyByVector3 is invoked" + }, + "details": { + "name": "MultiplyByVector3" + }, + "params": [ + { + "typeid": "{5D9958E9-9F1E-4985-B532-FFFDE75FEDFD}", + "details": { + "name": "Transform" + } + }, + { + "typeid": "{8379EB7D-01FA-4538-B64B-A6543B4BE73D}", + "details": { + "name": "Vector3" + } + } + ], + "results": [ + { + "typeid": "{8379EB7D-01FA-4538-B64B-A6543B4BE73D}", + "details": { + "name": "Vector3" + } + } + ] + }, + { + "base": "MultiplyByVector4", + "context": "{59E0EF87-352C-4CFB-A810-5B8752BDD1EF}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke MultiplyByVector4" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after MultiplyByVector4 is invoked" + }, + "details": { + "name": "MultiplyByVector4" + }, + "params": [ + { + "typeid": "{5D9958E9-9F1E-4985-B532-FFFDE75FEDFD}", + "details": { + "name": "Transform" + } + }, + { + "typeid": "{0CE9FA36-1E3A-4C06-9254-B7C73A732053}", + "details": { + "name": "Vector4" + } + } + ], + "results": [ + { + "typeid": "{0CE9FA36-1E3A-4C06-9254-B7C73A732053}", + "details": { + "name": "Vector4" + } + } + ] + }, + { + "base": "ToScale", + "context": "{59E0EF87-352C-4CFB-A810-5B8752BDD1EF}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke ToScale" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after ToScale is invoked" + }, + "details": { + "name": "ToScale" + }, + "params": [ + { + "typeid": "{5D9958E9-9F1E-4985-B532-FFFDE75FEDFD}", + "details": { + "name": "Transform" + } + } + ], + "results": [ + { + "typeid": "{110C4B14-11A8-4E9D-8638-5051013A56AC}", + "details": { + "name": "double" + } + } + ] + }, + { + "base": "FromMatrix3x3", + "context": "{59E0EF87-352C-4CFB-A810-5B8752BDD1EF}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke FromMatrix3x3" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after FromMatrix3x3 is invoked" + }, + "details": { + "name": "FromMatrix3x3" + }, + "params": [ + { + "typeid": "{15A4332F-7C3F-4A58-AC35-50E1CE53FB9C}", + "details": { + "name": "Matrix3x3" + } + } + ], + "results": [ + { + "typeid": "{5D9958E9-9F1E-4985-B532-FFFDE75FEDFD}", + "details": { + "name": "Transform" + } + } + ] + }, + { + "base": "GetRight", + "context": "{59E0EF87-352C-4CFB-A810-5B8752BDD1EF}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke GetRight" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after GetRight is invoked" + }, + "details": { + "name": "GetRight" + }, + "params": [ + { + "typeid": "{5D9958E9-9F1E-4985-B532-FFFDE75FEDFD}", + "details": { + "name": "Transform" + } + }, + { + "typeid": "{110C4B14-11A8-4E9D-8638-5051013A56AC}", + "details": { + "name": "double" + } + } + ], + "results": [ + { + "typeid": "{8379EB7D-01FA-4538-B64B-A6543B4BE73D}", + "details": { + "name": "Vector3" + } + } + ] + }, + { + "base": "IsOrthogonal", + "context": "{59E0EF87-352C-4CFB-A810-5B8752BDD1EF}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke IsOrthogonal" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after IsOrthogonal is invoked" + }, + "details": { + "name": "IsOrthogonal" + }, + "params": [ + { + "typeid": "{5D9958E9-9F1E-4985-B532-FFFDE75FEDFD}", + "details": { + "name": "Transform" + } + }, + { + "typeid": "{110C4B14-11A8-4E9D-8638-5051013A56AC}", + "details": { + "name": "double" + } + } + ], + "results": [ + { + "typeid": "{A0CA880C-AFE4-43CB-926C-59AC48496112}", + "details": { + "name": "bool" + } + } + ] + }, + { + "base": "Orthogonalize", + "context": "{59E0EF87-352C-4CFB-A810-5B8752BDD1EF}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Orthogonalize" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Orthogonalize is invoked" + }, + "details": { + "name": "Orthogonalize" + }, + "params": [ + { + "typeid": "{5D9958E9-9F1E-4985-B532-FFFDE75FEDFD}", + "details": { + "name": "Transform" + } + } + ], + "results": [ + { + "typeid": "{5D9958E9-9F1E-4985-B532-FFFDE75FEDFD}", + "details": { + "name": "Transform" + } + } + ] + }, + { + "base": "FromMatrix3x3AndTranslation", + "context": "{59E0EF87-352C-4CFB-A810-5B8752BDD1EF}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke FromMatrix3x3AndTranslation" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after FromMatrix3x3AndTranslation is invoked" + }, + "details": { + "name": "FromMatrix3x3AndTranslation" + }, + "params": [ + { + "typeid": "{15A4332F-7C3F-4A58-AC35-50E1CE53FB9C}", + "details": { + "name": "Matrix3x3" + } + }, + { + "typeid": "{8379EB7D-01FA-4538-B64B-A6543B4BE73D}", + "details": { + "name": "Vector3" + } + } + ], + "results": [ + { + "typeid": "{5D9958E9-9F1E-4985-B532-FFFDE75FEDFD}", + "details": { + "name": "Transform" + } + } + ] + }, + { + "base": "FromScale", + "context": "{59E0EF87-352C-4CFB-A810-5B8752BDD1EF}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke FromScale" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after FromScale is invoked" + }, + "details": { + "name": "FromScale" + }, + "params": [ + { + "typeid": "{110C4B14-11A8-4E9D-8638-5051013A56AC}", + "details": { + "name": "double" + } + } + ], + "results": [ + { + "typeid": "{5D9958E9-9F1E-4985-B532-FFFDE75FEDFD}", + "details": { + "name": "Transform" + } + } + ] + }, + { + "base": "GetTranslation", + "context": "{59E0EF87-352C-4CFB-A810-5B8752BDD1EF}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke GetTranslation" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after GetTranslation is invoked" + }, + "details": { + "name": "GetTranslation" + }, + "params": [ + { + "typeid": "{5D9958E9-9F1E-4985-B532-FFFDE75FEDFD}", + "details": { + "name": "Transform" + } + } + ], + "results": [ + { + "typeid": "{8379EB7D-01FA-4538-B64B-A6543B4BE73D}", + "details": { + "name": "Vector3" + } + } + ] + } + ] + }, + { + "base": "{F48E1596-F805-51F0-8BC4-E093F8517935}", + "context": "OnDemandReflected", + "variant": "", + "details": { + "name": "Map", + "category": "Map", + "tooltip": "A collection of Key/Value pairs, where each Key value must be unique." + }, + "methods": [ + { + "base": "contains", + "context": "{F48E1596-F805-51F0-8BC4-E093F8517935}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke contains" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after contains is invoked" + }, + "details": { + "name": "contains" + }, + "params": [ + { + "typeid": "{F48E1596-F805-51F0-8BC4-E093F8517935}", + "details": { + "name": "AZStd::unordered_map" + } + }, + { + "typeid": "{9F4E062E-06A0-46D4-85DF-E0DA96467D3A}", + "details": { + "name": "Crc32" + } + } + ], + "results": [ + { + "typeid": "{A0CA880C-AFE4-43CB-926C-59AC48496112}", + "details": { + "name": "bool" + } + } + ] + }, + { + "base": "Insert", + "context": "{F48E1596-F805-51F0-8BC4-E093F8517935}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Insert" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Insert is invoked" + }, + "details": { + "name": "Insert" + }, + "params": [ + { + "typeid": "{F48E1596-F805-51F0-8BC4-E093F8517935}", + "details": { + "name": "AZStd::unordered_map" + } + }, + { + "typeid": "{9F4E062E-06A0-46D4-85DF-E0DA96467D3A}", + "details": { + "name": "Crc32" + } + }, + { + "typeid": "{15A4332F-7C3F-4A58-AC35-50E1CE53FB9C}", + "details": { + "name": "Matrix3x3" + } + } + ], + "results": [ + { + "typeid": "{F48E1596-F805-51F0-8BC4-E093F8517935}", + "details": { + "name": "AZStd::unordered_map" + } + } + ] + }, + { + "base": "Reserve", + "context": "{F48E1596-F805-51F0-8BC4-E093F8517935}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Reserve" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Reserve is invoked" + }, + "details": { + "name": "Reserve" + }, + "params": [ + { + "typeid": "{F48E1596-F805-51F0-8BC4-E093F8517935}", + "details": { + "name": "AZStd::unordered_map" + } + }, + { + "typeid": "{D6597933-47CD-4FC8-B911-63F3E2B0993A}", + "details": { + "name": "AZ::u64" + } + } + ] + }, + { + "base": "GetSize", + "context": "{F48E1596-F805-51F0-8BC4-E093F8517935}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke GetSize" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after GetSize is invoked" + }, + "details": { + "name": "GetSize" + }, + "params": [ + { + "typeid": "{F48E1596-F805-51F0-8BC4-E093F8517935}", + "details": { + "name": "AZStd::unordered_map" + } + } + ], + "results": [ + { + "typeid": "{72039442-EB38-4D42-A1AD-CB68F7E0EEF6}", + "details": { + "name": "int" + } + } + ] + }, + { + "base": "Iterate_VM", + "context": "{F48E1596-F805-51F0-8BC4-E093F8517935}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Iterate_VM" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Iterate_VM is invoked" + }, + "details": { + "name": "Iterate_VM" + }, + "params": [ + { + "typeid": "{F48E1596-F805-51F0-8BC4-E093F8517935}", + "details": { + "name": "AZStd::unordered_map" + } + } + ], + "results": [ + { + "typeid": "{CEE83D10-F7FF-53FB-93DD-017345D02DA1}", + "details": { + "name": "Iterator_VM, AZStd::equal_to, allocator>>" + } + } + ] + }, + { + "base": "GetKeys", + "context": "{F48E1596-F805-51F0-8BC4-E093F8517935}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke GetKeys" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after GetKeys is invoked" + }, + "details": { + "name": "GetKeys" + }, + "params": [ + { + "typeid": "{F48E1596-F805-51F0-8BC4-E093F8517935}", + "details": { + "name": "AZStd::unordered_map" + } + } + ], + "results": [ + { + "typeid": "{287CEE87-6FF3-52FC-9D32-38255E2C7FE9}", + "details": { + "name": "AZStd::vector" + } + } + ] + }, + { + "base": "Size", + "context": "{F48E1596-F805-51F0-8BC4-E093F8517935}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Size" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Size is invoked" + }, + "details": { + "name": "Size" + }, + "params": [ + { + "typeid": "{F48E1596-F805-51F0-8BC4-E093F8517935}", + "details": { + "name": "AZStd::unordered_map" + } + } + ], + "results": [ + { + "typeid": "{72039442-EB38-4D42-A1AD-CB68F7E0EEF6}", + "details": { + "name": "int" + } + } + ] + }, + { + "base": "Erase", + "context": "{F48E1596-F805-51F0-8BC4-E093F8517935}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Erase" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Erase is invoked" + }, + "details": { + "name": "Erase" + }, + "params": [ + { + "typeid": "{F48E1596-F805-51F0-8BC4-E093F8517935}", + "details": { + "name": "AZStd::unordered_map" + } + }, + { + "typeid": "{9F4E062E-06A0-46D4-85DF-E0DA96467D3A}", + "details": { + "name": "Crc32" + } + } + ], + "results": [ + { + "typeid": "{F48E1596-F805-51F0-8BC4-E093F8517935}", + "details": { + "name": "AZStd::unordered_map" + } + } + ] + }, + { + "base": "EraseCheck_VM", + "context": "{F48E1596-F805-51F0-8BC4-E093F8517935}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke EraseCheck_VM" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after EraseCheck_VM is invoked" + }, + "details": { + "name": "EraseCheck_VM" + }, + "params": [ + { + "typeid": "{F48E1596-F805-51F0-8BC4-E093F8517935}", + "details": { + "name": "AZStd::unordered_map" + } + }, + { + "typeid": "{9F4E062E-06A0-46D4-85DF-E0DA96467D3A}", + "details": { + "name": "Crc32" + } + } + ], + "results": [ + { + "typeid": "{A0CA880C-AFE4-43CB-926C-59AC48496112}", + "details": { + "name": "bool" + } + } + ] + }, + { + "base": "Clear", + "context": "{F48E1596-F805-51F0-8BC4-E093F8517935}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Clear" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Clear is invoked" + }, + "details": { + "name": "Clear" + }, + "params": [ + { + "typeid": "{F48E1596-F805-51F0-8BC4-E093F8517935}", + "details": { + "name": "AZStd::unordered_map" + } + } + ], + "results": [ + { + "typeid": "{F48E1596-F805-51F0-8BC4-E093F8517935}", + "details": { + "name": "AZStd::unordered_map" + } + } + ] + }, + { + "base": "At", + "context": "{F48E1596-F805-51F0-8BC4-E093F8517935}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke At" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after At is invoked" + }, + "details": { + "name": "At" + }, + "params": [ + { + "typeid": "{F48E1596-F805-51F0-8BC4-E093F8517935}", + "details": { + "name": "AZStd::unordered_map" + } + }, + { + "typeid": "{9F4E062E-06A0-46D4-85DF-E0DA96467D3A}", + "details": { + "name": "Crc32" + } + } + ], + "results": [ + { + "typeid": "{15A4332F-7C3F-4A58-AC35-50E1CE53FB9C}", + "details": { + "name": "Matrix3x3" + } + } + ] + }, + { + "base": "BucketCount", + "context": "{F48E1596-F805-51F0-8BC4-E093F8517935}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke BucketCount" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after BucketCount is invoked" + }, + "details": { + "name": "BucketCount" + }, + "params": [ + { + "typeid": "{F48E1596-F805-51F0-8BC4-E093F8517935}", + "details": { + "name": "AZStd::unordered_map" + } + } + ], + "results": [ + { + "typeid": "{D6597933-47CD-4FC8-B911-63F3E2B0993A}", + "details": { + "name": "AZ::u64" + } + } + ] + }, + { + "base": "Empty", + "context": "{F48E1596-F805-51F0-8BC4-E093F8517935}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Empty" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Empty is invoked" + }, + "details": { + "name": "Empty" + }, + "params": [ + { + "typeid": "{F48E1596-F805-51F0-8BC4-E093F8517935}", + "details": { + "name": "AZStd::unordered_map" + } + } + ], + "results": [ + { + "typeid": "{A0CA880C-AFE4-43CB-926C-59AC48496112}", + "details": { + "name": "bool" + } + } + ] + }, + { + "base": "Swap", + "context": "{F48E1596-F805-51F0-8BC4-E093F8517935}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Swap" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Swap is invoked" + }, + "details": { + "name": "Swap" + }, + "params": [ + { + "typeid": "{F48E1596-F805-51F0-8BC4-E093F8517935}", + "details": { + "name": "AZStd::unordered_map" + } + }, + { + "typeid": "{F48E1596-F805-51F0-8BC4-E093F8517935}", + "details": { + "name": "AZStd::unordered_map" + } + } + ] + } + ] + }, + { + "base": "{8C5F6959-C2C4-46D9-9FCD-4DC234E7732D}", + "context": "OnDemandReflected", + "variant": "", + "details": { + "name": "MathMatrix3x3_VM" + }, + "methods": [ + { + "base": "Transpose", + "context": "{8C5F6959-C2C4-46D9-9FCD-4DC234E7732D}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Transpose" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Transpose is invoked" + }, + "details": { + "name": "Transpose" + }, + "params": [ + { + "typeid": "{15A4332F-7C3F-4A58-AC35-50E1CE53FB9C}", + "details": { + "name": "Matrix3x3" + } + } + ], + "results": [ + { + "typeid": "{15A4332F-7C3F-4A58-AC35-50E1CE53FB9C}", + "details": { + "name": "Matrix3x3" + } + } + ] + }, + { + "base": "Zero", + "context": "{8C5F6959-C2C4-46D9-9FCD-4DC234E7732D}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Zero" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Zero is invoked" + }, + "details": { + "name": "Zero" + }, + "results": [ + { + "typeid": "{15A4332F-7C3F-4A58-AC35-50E1CE53FB9C}", + "details": { + "name": "Matrix3x3" + } + } + ] + }, + { + "base": "Subtract", + "context": "{8C5F6959-C2C4-46D9-9FCD-4DC234E7732D}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Subtract" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Subtract is invoked" + }, + "details": { + "name": "Subtract" + }, + "params": [ + { + "typeid": "{15A4332F-7C3F-4A58-AC35-50E1CE53FB9C}", + "details": { + "name": "Matrix3x3" + } + }, + { + "typeid": "{15A4332F-7C3F-4A58-AC35-50E1CE53FB9C}", + "details": { + "name": "Matrix3x3" + } + } + ], + "results": [ + { + "typeid": "{15A4332F-7C3F-4A58-AC35-50E1CE53FB9C}", + "details": { + "name": "Matrix3x3" + } + } + ] + }, + { + "base": "GetElement", + "context": "{8C5F6959-C2C4-46D9-9FCD-4DC234E7732D}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke GetElement" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after GetElement is invoked" + }, + "details": { + "name": "GetElement" + }, + "params": [ + { + "typeid": "{15A4332F-7C3F-4A58-AC35-50E1CE53FB9C}", + "details": { + "name": "Matrix3x3" + } + }, + { + "typeid": "{110C4B14-11A8-4E9D-8638-5051013A56AC}", + "details": { + "name": "double" + } + }, + { + "typeid": "{110C4B14-11A8-4E9D-8638-5051013A56AC}", + "details": { + "name": "double" + } + } + ], + "results": [ + { + "typeid": "{110C4B14-11A8-4E9D-8638-5051013A56AC}", + "details": { + "name": "double" + } + } + ] + }, + { + "base": "Invert", + "context": "{8C5F6959-C2C4-46D9-9FCD-4DC234E7732D}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Invert" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Invert is invoked" + }, + "details": { + "name": "Invert" + }, + "params": [ + { + "typeid": "{15A4332F-7C3F-4A58-AC35-50E1CE53FB9C}", + "details": { + "name": "Matrix3x3" + } + } + ], + "results": [ + { + "typeid": "{15A4332F-7C3F-4A58-AC35-50E1CE53FB9C}", + "details": { + "name": "Matrix3x3" + } + } + ] + }, + { + "base": "GetDiagonal", + "context": "{8C5F6959-C2C4-46D9-9FCD-4DC234E7732D}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke GetDiagonal" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after GetDiagonal is invoked" + }, + "details": { + "name": "GetDiagonal" + }, + "params": [ + { + "typeid": "{15A4332F-7C3F-4A58-AC35-50E1CE53FB9C}", + "details": { + "name": "Matrix3x3" + } + } + ], + "results": [ + { + "typeid": "{8379EB7D-01FA-4538-B64B-A6543B4BE73D}", + "details": { + "name": "Vector3" + } + } + ] + }, + { + "base": "GetColumn", + "context": "{8C5F6959-C2C4-46D9-9FCD-4DC234E7732D}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke GetColumn" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after GetColumn is invoked" + }, + "details": { + "name": "GetColumn" + }, + "params": [ + { + "typeid": "{15A4332F-7C3F-4A58-AC35-50E1CE53FB9C}", + "details": { + "name": "Matrix3x3" + } + }, + { + "typeid": "{110C4B14-11A8-4E9D-8638-5051013A56AC}", + "details": { + "name": "double" + } + } + ], + "results": [ + { + "typeid": "{8379EB7D-01FA-4538-B64B-A6543B4BE73D}", + "details": { + "name": "Vector3" + } + } + ] + }, + { + "base": "MultiplyByVector", + "context": "{8C5F6959-C2C4-46D9-9FCD-4DC234E7732D}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke MultiplyByVector" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after MultiplyByVector is invoked" + }, + "details": { + "name": "MultiplyByVector" + }, + "params": [ + { + "typeid": "{15A4332F-7C3F-4A58-AC35-50E1CE53FB9C}", + "details": { + "name": "Matrix3x3" + } + }, + { + "typeid": "{8379EB7D-01FA-4538-B64B-A6543B4BE73D}", + "details": { + "name": "Vector3" + } + } + ], + "results": [ + { + "typeid": "{8379EB7D-01FA-4538-B64B-A6543B4BE73D}", + "details": { + "name": "Vector3" + } + } + ] + }, + { + "base": "Add", + "context": "{8C5F6959-C2C4-46D9-9FCD-4DC234E7732D}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Add" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Add is invoked" + }, + "details": { + "name": "Add" + }, + "params": [ + { + "typeid": "{15A4332F-7C3F-4A58-AC35-50E1CE53FB9C}", + "details": { + "name": "Matrix3x3" + } + }, + { + "typeid": "{15A4332F-7C3F-4A58-AC35-50E1CE53FB9C}", + "details": { + "name": "Matrix3x3" + } + } + ], + "results": [ + { + "typeid": "{15A4332F-7C3F-4A58-AC35-50E1CE53FB9C}", + "details": { + "name": "Matrix3x3" + } + } + ] + }, + { + "base": "IsFinite", + "context": "{8C5F6959-C2C4-46D9-9FCD-4DC234E7732D}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke IsFinite" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after IsFinite is invoked" + }, + "details": { + "name": "IsFinite" + }, + "params": [ + { + "typeid": "{15A4332F-7C3F-4A58-AC35-50E1CE53FB9C}", + "details": { + "name": "Matrix3x3" + } + } + ], + "results": [ + { + "typeid": "{A0CA880C-AFE4-43CB-926C-59AC48496112}", + "details": { + "name": "bool" + } + } + ] + }, + { + "base": "DivideByNumber", + "context": "{8C5F6959-C2C4-46D9-9FCD-4DC234E7732D}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke DivideByNumber" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after DivideByNumber is invoked" + }, + "details": { + "name": "DivideByNumber" + }, + "params": [ + { + "typeid": "{15A4332F-7C3F-4A58-AC35-50E1CE53FB9C}", + "details": { + "name": "Matrix3x3" + } + }, + { + "typeid": "{110C4B14-11A8-4E9D-8638-5051013A56AC}", + "details": { + "name": "double" + } + } + ], + "results": [ + { + "typeid": "{15A4332F-7C3F-4A58-AC35-50E1CE53FB9C}", + "details": { + "name": "Matrix3x3" + } + } + ] + }, + { + "base": "ToAdjugate", + "context": "{8C5F6959-C2C4-46D9-9FCD-4DC234E7732D}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke ToAdjugate" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after ToAdjugate is invoked" + }, + "details": { + "name": "ToAdjugate" + }, + "params": [ + { + "typeid": "{15A4332F-7C3F-4A58-AC35-50E1CE53FB9C}", + "details": { + "name": "Matrix3x3" + } + } + ], + "results": [ + { + "typeid": "{15A4332F-7C3F-4A58-AC35-50E1CE53FB9C}", + "details": { + "name": "Matrix3x3" + } + } + ] + }, + { + "base": "IsClose", + "context": "{8C5F6959-C2C4-46D9-9FCD-4DC234E7732D}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke IsClose" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after IsClose is invoked" + }, + "details": { + "name": "IsClose" + }, + "params": [ + { + "typeid": "{15A4332F-7C3F-4A58-AC35-50E1CE53FB9C}", + "details": { + "name": "Matrix3x3" + } + }, + { + "typeid": "{15A4332F-7C3F-4A58-AC35-50E1CE53FB9C}", + "details": { + "name": "Matrix3x3" + } + }, + { + "typeid": "{110C4B14-11A8-4E9D-8638-5051013A56AC}", + "details": { + "name": "double" + } + } + ], + "results": [ + { + "typeid": "{A0CA880C-AFE4-43CB-926C-59AC48496112}", + "details": { + "name": "bool" + } + } + ] + }, + { + "base": "MultiplyByMatrix", + "context": "{8C5F6959-C2C4-46D9-9FCD-4DC234E7732D}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke MultiplyByMatrix" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after MultiplyByMatrix is invoked" + }, + "details": { + "name": "MultiplyByMatrix" + }, + "params": [ + { + "typeid": "{15A4332F-7C3F-4A58-AC35-50E1CE53FB9C}", + "details": { + "name": "Matrix3x3" + } + }, + { + "typeid": "{15A4332F-7C3F-4A58-AC35-50E1CE53FB9C}", + "details": { + "name": "Matrix3x3" + } + } + ], + "results": [ + { + "typeid": "{15A4332F-7C3F-4A58-AC35-50E1CE53FB9C}", + "details": { + "name": "Matrix3x3" + } + } + ] + }, + { + "base": "IsOrthogonal", + "context": "{8C5F6959-C2C4-46D9-9FCD-4DC234E7732D}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke IsOrthogonal" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after IsOrthogonal is invoked" + }, + "details": { + "name": "IsOrthogonal" + }, + "params": [ + { + "typeid": "{15A4332F-7C3F-4A58-AC35-50E1CE53FB9C}", + "details": { + "name": "Matrix3x3" + } + } + ], + "results": [ + { + "typeid": "{A0CA880C-AFE4-43CB-926C-59AC48496112}", + "details": { + "name": "bool" + } + } + ] + }, + { + "base": "Orthogonalize", + "context": "{8C5F6959-C2C4-46D9-9FCD-4DC234E7732D}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Orthogonalize" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Orthogonalize is invoked" + }, + "details": { + "name": "Orthogonalize" + }, + "params": [ + { + "typeid": "{15A4332F-7C3F-4A58-AC35-50E1CE53FB9C}", + "details": { + "name": "Matrix3x3" + } + } + ], + "results": [ + { + "typeid": "{15A4332F-7C3F-4A58-AC35-50E1CE53FB9C}", + "details": { + "name": "Matrix3x3" + } + } + ] + }, + { + "base": "GetRows", + "context": "{8C5F6959-C2C4-46D9-9FCD-4DC234E7732D}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke GetRows" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after GetRows is invoked" + }, + "details": { + "name": "GetRows" + }, + "params": [ + { + "typeid": "{15A4332F-7C3F-4A58-AC35-50E1CE53FB9C}", + "details": { + "name": "Matrix3x3" + } + } + ], + "results": [ + { + "typeid": "{93942742-473F-5EE3-8420-D8F22C612221}", + "details": { + "name": "tuple" + } + } + ] + }, + { + "base": "FromCrossProduct", + "context": "{8C5F6959-C2C4-46D9-9FCD-4DC234E7732D}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke FromCrossProduct" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after FromCrossProduct is invoked" + }, + "details": { + "name": "FromCrossProduct" + }, + "params": [ + { + "typeid": "{8379EB7D-01FA-4538-B64B-A6543B4BE73D}", + "details": { + "name": "Vector3" + } + } + ], + "results": [ + { + "typeid": "{15A4332F-7C3F-4A58-AC35-50E1CE53FB9C}", + "details": { + "name": "Matrix3x3" + } + } + ] + }, + { + "base": "GetColumns", + "context": "{8C5F6959-C2C4-46D9-9FCD-4DC234E7732D}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke GetColumns" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after GetColumns is invoked" + }, + "details": { + "name": "GetColumns" + }, + "params": [ + { + "typeid": "{15A4332F-7C3F-4A58-AC35-50E1CE53FB9C}", + "details": { + "name": "Matrix3x3" + } + } + ], + "results": [ + { + "typeid": "{93942742-473F-5EE3-8420-D8F22C612221}", + "details": { + "name": "tuple" + } + } + ] + }, + { + "base": "FromTransform", + "context": "{8C5F6959-C2C4-46D9-9FCD-4DC234E7732D}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke FromTransform" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after FromTransform is invoked" + }, + "details": { + "name": "FromTransform" + }, + "params": [ + { + "typeid": "{5D9958E9-9F1E-4985-B532-FFFDE75FEDFD}", + "details": { + "name": "Transform" + } + } + ], + "results": [ + { + "typeid": "{15A4332F-7C3F-4A58-AC35-50E1CE53FB9C}", + "details": { + "name": "Matrix3x3" + } + } + ] + }, + { + "base": "FromScale", + "context": "{8C5F6959-C2C4-46D9-9FCD-4DC234E7732D}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke FromScale" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after FromScale is invoked" + }, + "details": { + "name": "FromScale" + }, + "params": [ + { + "typeid": "{8379EB7D-01FA-4538-B64B-A6543B4BE73D}", + "details": { + "name": "Vector3" + } + } + ], + "results": [ + { + "typeid": "{15A4332F-7C3F-4A58-AC35-50E1CE53FB9C}", + "details": { + "name": "Matrix3x3" + } + } + ] + }, + { + "base": "ToScale", + "context": "{8C5F6959-C2C4-46D9-9FCD-4DC234E7732D}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke ToScale" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after ToScale is invoked" + }, + "details": { + "name": "ToScale" + }, + "params": [ + { + "typeid": "{15A4332F-7C3F-4A58-AC35-50E1CE53FB9C}", + "details": { + "name": "Matrix3x3" + } + } + ], + "results": [ + { + "typeid": "{8379EB7D-01FA-4538-B64B-A6543B4BE73D}", + "details": { + "name": "Vector3" + } + } + ] + }, + { + "base": "FromQuaternion", + "context": "{8C5F6959-C2C4-46D9-9FCD-4DC234E7732D}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke FromQuaternion" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after FromQuaternion is invoked" + }, + "details": { + "name": "FromQuaternion" + }, + "params": [ + { + "typeid": "{73103120-3DD3-4873-BAB3-9713FA2804FB}", + "details": { + "name": "Quaternion" + } + } + ], + "results": [ + { + "typeid": "{15A4332F-7C3F-4A58-AC35-50E1CE53FB9C}", + "details": { + "name": "Matrix3x3" + } + } + ] + }, + { + "base": "MultiplyByNumber", + "context": "{8C5F6959-C2C4-46D9-9FCD-4DC234E7732D}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke MultiplyByNumber" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after MultiplyByNumber is invoked" + }, + "details": { + "name": "MultiplyByNumber" + }, + "params": [ + { + "typeid": "{15A4332F-7C3F-4A58-AC35-50E1CE53FB9C}", + "details": { + "name": "Matrix3x3" + } + }, + { + "typeid": "{110C4B14-11A8-4E9D-8638-5051013A56AC}", + "details": { + "name": "double" + } + } + ], + "results": [ + { + "typeid": "{15A4332F-7C3F-4A58-AC35-50E1CE53FB9C}", + "details": { + "name": "Matrix3x3" + } + } + ] + }, + { + "base": "GetRow", + "context": "{8C5F6959-C2C4-46D9-9FCD-4DC234E7732D}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke GetRow" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after GetRow is invoked" + }, + "details": { + "name": "GetRow" + }, + "params": [ + { + "typeid": "{15A4332F-7C3F-4A58-AC35-50E1CE53FB9C}", + "details": { + "name": "Matrix3x3" + } + }, + { + "typeid": "{110C4B14-11A8-4E9D-8638-5051013A56AC}", + "details": { + "name": "double" + } + } + ], + "results": [ + { + "typeid": "{8379EB7D-01FA-4538-B64B-A6543B4BE73D}", + "details": { + "name": "Vector3" + } + } + ] + }, + { + "base": "FromRotationYDegrees", + "context": "{8C5F6959-C2C4-46D9-9FCD-4DC234E7732D}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke FromRotationYDegrees" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after FromRotationYDegrees is invoked" + }, + "details": { + "name": "FromRotationYDegrees" + }, + "params": [ + { + "typeid": "{110C4B14-11A8-4E9D-8638-5051013A56AC}", + "details": { + "name": "double" + } + } + ], + "results": [ + { + "typeid": "{15A4332F-7C3F-4A58-AC35-50E1CE53FB9C}", + "details": { + "name": "Matrix3x3" + } + } + ] + }, + { + "base": "FromRows", + "context": "{8C5F6959-C2C4-46D9-9FCD-4DC234E7732D}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke FromRows" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after FromRows is invoked" + }, + "details": { + "name": "FromRows" + }, + "params": [ + { + "typeid": "{8379EB7D-01FA-4538-B64B-A6543B4BE73D}", + "details": { + "name": "Vector3" + } + }, + { + "typeid": "{8379EB7D-01FA-4538-B64B-A6543B4BE73D}", + "details": { + "name": "Vector3" + } + }, + { + "typeid": "{8379EB7D-01FA-4538-B64B-A6543B4BE73D}", + "details": { + "name": "Vector3" + } + } + ], + "results": [ + { + "typeid": "{15A4332F-7C3F-4A58-AC35-50E1CE53FB9C}", + "details": { + "name": "Matrix3x3" + } + } + ] + }, + { + "base": "FromDiagonal", + "context": "{8C5F6959-C2C4-46D9-9FCD-4DC234E7732D}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke FromDiagonal" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after FromDiagonal is invoked" + }, + "details": { + "name": "FromDiagonal" + }, + "params": [ + { + "typeid": "{8379EB7D-01FA-4538-B64B-A6543B4BE73D}", + "details": { + "name": "Vector3" + } + } + ], + "results": [ + { + "typeid": "{15A4332F-7C3F-4A58-AC35-50E1CE53FB9C}", + "details": { + "name": "Matrix3x3" + } + } + ] + }, + { + "base": "FromRotationZDegrees", + "context": "{8C5F6959-C2C4-46D9-9FCD-4DC234E7732D}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke FromRotationZDegrees" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after FromRotationZDegrees is invoked" + }, + "details": { + "name": "FromRotationZDegrees" + }, + "params": [ + { + "typeid": "{110C4B14-11A8-4E9D-8638-5051013A56AC}", + "details": { + "name": "double" + } + } + ], + "results": [ + { + "typeid": "{15A4332F-7C3F-4A58-AC35-50E1CE53FB9C}", + "details": { + "name": "Matrix3x3" + } + } + ] + }, + { + "base": "FromMatrix4x4", + "context": "{8C5F6959-C2C4-46D9-9FCD-4DC234E7732D}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke FromMatrix4x4" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after FromMatrix4x4 is invoked" + }, + "details": { + "name": "FromMatrix4x4" + }, + "params": [ + { + "typeid": "{157193C7-B673-4A2B-8B43-5681DCC3DEC3}", + "details": { + "name": "Matrix4x4" + } + } + ], + "results": [ + { + "typeid": "{15A4332F-7C3F-4A58-AC35-50E1CE53FB9C}", + "details": { + "name": "Matrix3x3" + } + } + ] + }, + { + "base": "FromColumns", + "context": "{8C5F6959-C2C4-46D9-9FCD-4DC234E7732D}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke FromColumns" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after FromColumns is invoked" + }, + "details": { + "name": "FromColumns" + }, + "params": [ + { + "typeid": "{8379EB7D-01FA-4538-B64B-A6543B4BE73D}", + "details": { + "name": "Vector3" + } + }, + { + "typeid": "{8379EB7D-01FA-4538-B64B-A6543B4BE73D}", + "details": { + "name": "Vector3" + } + }, + { + "typeid": "{8379EB7D-01FA-4538-B64B-A6543B4BE73D}", + "details": { + "name": "Vector3" + } + } + ], + "results": [ + { + "typeid": "{15A4332F-7C3F-4A58-AC35-50E1CE53FB9C}", + "details": { + "name": "Matrix3x3" + } + } + ] + }, + { + "base": "FromRotationXDegrees", + "context": "{8C5F6959-C2C4-46D9-9FCD-4DC234E7732D}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke FromRotationXDegrees" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after FromRotationXDegrees is invoked" + }, + "details": { + "name": "FromRotationXDegrees" + }, + "params": [ + { + "typeid": "{110C4B14-11A8-4E9D-8638-5051013A56AC}", + "details": { + "name": "double" + } + } + ], + "results": [ + { + "typeid": "{15A4332F-7C3F-4A58-AC35-50E1CE53FB9C}", + "details": { + "name": "Matrix3x3" + } + } + ] + }, + { + "base": "ToDeterminant", + "context": "{8C5F6959-C2C4-46D9-9FCD-4DC234E7732D}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke ToDeterminant" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after ToDeterminant is invoked" + }, + "details": { + "name": "ToDeterminant" + }, + "params": [ + { + "typeid": "{15A4332F-7C3F-4A58-AC35-50E1CE53FB9C}", + "details": { + "name": "Matrix3x3" + } + } + ], + "results": [ + { + "typeid": "{110C4B14-11A8-4E9D-8638-5051013A56AC}", + "details": { + "name": "double" + } + } + ] + } + ] + }, + { + "base": "{B7141BE7-3946-56D1-8B31-CAD10C7C7D9C}", + "context": "OnDemandReflected", + "variant": "", + "details": { + "name": "Map", + "category": "Map", + "tooltip": "A collection of Key/Value pairs, where each Key value must be unique." + }, + "methods": [ + { + "base": "contains", + "context": "{B7141BE7-3946-56D1-8B31-CAD10C7C7D9C}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke contains" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after contains is invoked" + }, + "details": { + "name": "contains" + }, + "params": [ + { + "typeid": "{B7141BE7-3946-56D1-8B31-CAD10C7C7D9C}", + "details": { + "name": "AZStd::unordered_map" + } + }, + { + "typeid": "{A0CA880C-AFE4-43CB-926C-59AC48496112}", + "details": { + "name": "bool" + } + } + ], + "results": [ + { + "typeid": "{A0CA880C-AFE4-43CB-926C-59AC48496112}", + "details": { + "name": "bool" + } + } + ] + }, + { + "base": "Insert", + "context": "{B7141BE7-3946-56D1-8B31-CAD10C7C7D9C}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Insert" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Insert is invoked" + }, + "details": { + "name": "Insert" + }, + "params": [ + { + "typeid": "{B7141BE7-3946-56D1-8B31-CAD10C7C7D9C}", + "details": { + "name": "AZStd::unordered_map" + } + }, + { + "typeid": "{A0CA880C-AFE4-43CB-926C-59AC48496112}", + "details": { + "name": "bool" + } + }, + { + "typeid": "{5D9958E9-9F1E-4985-B532-FFFDE75FEDFD}", + "details": { + "name": "Transform" + } + } + ], + "results": [ + { + "typeid": "{B7141BE7-3946-56D1-8B31-CAD10C7C7D9C}", + "details": { + "name": "AZStd::unordered_map" + } + } + ] + }, + { + "base": "Reserve", + "context": "{B7141BE7-3946-56D1-8B31-CAD10C7C7D9C}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Reserve" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Reserve is invoked" + }, + "details": { + "name": "Reserve" + }, + "params": [ + { + "typeid": "{B7141BE7-3946-56D1-8B31-CAD10C7C7D9C}", + "details": { + "name": "AZStd::unordered_map" + } + }, + { + "typeid": "{D6597933-47CD-4FC8-B911-63F3E2B0993A}", + "details": { + "name": "AZ::u64" + } + } + ] + }, + { + "base": "GetSize", + "context": "{B7141BE7-3946-56D1-8B31-CAD10C7C7D9C}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke GetSize" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after GetSize is invoked" + }, + "details": { + "name": "GetSize" + }, + "params": [ + { + "typeid": "{B7141BE7-3946-56D1-8B31-CAD10C7C7D9C}", + "details": { + "name": "AZStd::unordered_map" + } + } + ], + "results": [ + { + "typeid": "{72039442-EB38-4D42-A1AD-CB68F7E0EEF6}", + "details": { + "name": "int" + } + } + ] + }, + { + "base": "Iterate_VM", + "context": "{B7141BE7-3946-56D1-8B31-CAD10C7C7D9C}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Iterate_VM" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Iterate_VM is invoked" + }, + "details": { + "name": "Iterate_VM" + }, + "params": [ + { + "typeid": "{B7141BE7-3946-56D1-8B31-CAD10C7C7D9C}", + "details": { + "name": "AZStd::unordered_map" + } + } + ], + "results": [ + { + "typeid": "{A583387A-F7F2-5C4B-87F1-1745876FDE24}", + "details": { + "name": "Iterator_VM, AZStd::equal_to, allocator>>" + } + } + ] + }, + { + "base": "GetKeys", + "context": "{B7141BE7-3946-56D1-8B31-CAD10C7C7D9C}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke GetKeys" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after GetKeys is invoked" + }, + "details": { + "name": "GetKeys" + }, + "params": [ + { + "typeid": "{B7141BE7-3946-56D1-8B31-CAD10C7C7D9C}", + "details": { + "name": "AZStd::unordered_map" + } + } + ], + "results": [ + { + "typeid": "{B505B05D-57BF-5A45-9113-B3A2784E2CD7}", + "details": { + "name": "AZStd::vector" + } + } + ] + }, + { + "base": "Size", + "context": "{B7141BE7-3946-56D1-8B31-CAD10C7C7D9C}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Size" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Size is invoked" + }, + "details": { + "name": "Size" + }, + "params": [ + { + "typeid": "{B7141BE7-3946-56D1-8B31-CAD10C7C7D9C}", + "details": { + "name": "AZStd::unordered_map" + } + } + ], + "results": [ + { + "typeid": "{72039442-EB38-4D42-A1AD-CB68F7E0EEF6}", + "details": { + "name": "int" + } + } + ] + }, + { + "base": "Erase", + "context": "{B7141BE7-3946-56D1-8B31-CAD10C7C7D9C}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Erase" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Erase is invoked" + }, + "details": { + "name": "Erase" + }, + "params": [ + { + "typeid": "{B7141BE7-3946-56D1-8B31-CAD10C7C7D9C}", + "details": { + "name": "AZStd::unordered_map" + } + }, + { + "typeid": "{A0CA880C-AFE4-43CB-926C-59AC48496112}", + "details": { + "name": "bool" + } + } + ], + "results": [ + { + "typeid": "{B7141BE7-3946-56D1-8B31-CAD10C7C7D9C}", + "details": { + "name": "AZStd::unordered_map" + } + } + ] + }, + { + "base": "EraseCheck_VM", + "context": "{B7141BE7-3946-56D1-8B31-CAD10C7C7D9C}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke EraseCheck_VM" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after EraseCheck_VM is invoked" + }, + "details": { + "name": "EraseCheck_VM" + }, + "params": [ + { + "typeid": "{B7141BE7-3946-56D1-8B31-CAD10C7C7D9C}", + "details": { + "name": "AZStd::unordered_map" + } + }, + { + "typeid": "{A0CA880C-AFE4-43CB-926C-59AC48496112}", + "details": { + "name": "bool" + } + } + ], + "results": [ + { + "typeid": "{A0CA880C-AFE4-43CB-926C-59AC48496112}", + "details": { + "name": "bool" + } + } + ] + }, + { + "base": "Clear", + "context": "{B7141BE7-3946-56D1-8B31-CAD10C7C7D9C}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Clear" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Clear is invoked" + }, + "details": { + "name": "Clear" + }, + "params": [ + { + "typeid": "{B7141BE7-3946-56D1-8B31-CAD10C7C7D9C}", + "details": { + "name": "AZStd::unordered_map" + } + } + ], + "results": [ + { + "typeid": "{B7141BE7-3946-56D1-8B31-CAD10C7C7D9C}", + "details": { + "name": "AZStd::unordered_map" + } + } + ] + }, + { + "base": "At", + "context": "{B7141BE7-3946-56D1-8B31-CAD10C7C7D9C}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke At" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after At is invoked" + }, + "details": { + "name": "At" + }, + "params": [ + { + "typeid": "{B7141BE7-3946-56D1-8B31-CAD10C7C7D9C}", + "details": { + "name": "AZStd::unordered_map" + } + }, + { + "typeid": "{A0CA880C-AFE4-43CB-926C-59AC48496112}", + "details": { + "name": "bool" + } + } + ], + "results": [ + { + "typeid": "{5D9958E9-9F1E-4985-B532-FFFDE75FEDFD}", + "details": { + "name": "Transform" + } + } + ] + }, + { + "base": "BucketCount", + "context": "{B7141BE7-3946-56D1-8B31-CAD10C7C7D9C}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke BucketCount" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after BucketCount is invoked" + }, + "details": { + "name": "BucketCount" + }, + "params": [ + { + "typeid": "{B7141BE7-3946-56D1-8B31-CAD10C7C7D9C}", + "details": { + "name": "AZStd::unordered_map" + } + } + ], + "results": [ + { + "typeid": "{D6597933-47CD-4FC8-B911-63F3E2B0993A}", + "details": { + "name": "AZ::u64" + } + } + ] + }, + { + "base": "Empty", + "context": "{B7141BE7-3946-56D1-8B31-CAD10C7C7D9C}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Empty" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Empty is invoked" + }, + "details": { + "name": "Empty" + }, + "params": [ + { + "typeid": "{B7141BE7-3946-56D1-8B31-CAD10C7C7D9C}", + "details": { + "name": "AZStd::unordered_map" + } + } + ], + "results": [ + { + "typeid": "{A0CA880C-AFE4-43CB-926C-59AC48496112}", + "details": { + "name": "bool" + } + } + ] + }, + { + "base": "Swap", + "context": "{B7141BE7-3946-56D1-8B31-CAD10C7C7D9C}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Swap" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Swap is invoked" + }, + "details": { + "name": "Swap" + }, + "params": [ + { + "typeid": "{B7141BE7-3946-56D1-8B31-CAD10C7C7D9C}", + "details": { + "name": "AZStd::unordered_map" + } + }, + { + "typeid": "{B7141BE7-3946-56D1-8B31-CAD10C7C7D9C}", + "details": { + "name": "AZStd::unordered_map" + } + } + ] + } + ] + }, + { + "base": "{8EA123A3-72BE-5B00-A22E-BEF0AFB0B68B}", + "context": "OnDemandReflected", + "variant": "", + "details": { + "name": "Map", + "category": "Map", + "tooltip": "A collection of Key/Value pairs, where each Key value must be unique." + }, + "methods": [ + { + "base": "contains", + "context": "{8EA123A3-72BE-5B00-A22E-BEF0AFB0B68B}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke contains" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after contains is invoked" + }, + "details": { + "name": "contains" + }, + "params": [ + { + "typeid": "{8EA123A3-72BE-5B00-A22E-BEF0AFB0B68B}", + "details": { + "name": "AZStd::unordered_map" + } + }, + { + "typeid": "{A0CA880C-AFE4-43CB-926C-59AC48496112}", + "details": { + "name": "bool" + } + } + ], + "results": [ + { + "typeid": "{A0CA880C-AFE4-43CB-926C-59AC48496112}", + "details": { + "name": "bool" + } + } + ] + }, + { + "base": "Insert", + "context": "{8EA123A3-72BE-5B00-A22E-BEF0AFB0B68B}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Insert" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Insert is invoked" + }, + "details": { + "name": "Insert" + }, + "params": [ + { + "typeid": "{8EA123A3-72BE-5B00-A22E-BEF0AFB0B68B}", + "details": { + "name": "AZStd::unordered_map" + } + }, + { + "typeid": "{A0CA880C-AFE4-43CB-926C-59AC48496112}", + "details": { + "name": "bool" + } + }, + { + "typeid": "{15A4332F-7C3F-4A58-AC35-50E1CE53FB9C}", + "details": { + "name": "Matrix3x3" + } + } + ], + "results": [ + { + "typeid": "{8EA123A3-72BE-5B00-A22E-BEF0AFB0B68B}", + "details": { + "name": "AZStd::unordered_map" + } + } + ] + }, + { + "base": "Reserve", + "context": "{8EA123A3-72BE-5B00-A22E-BEF0AFB0B68B}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Reserve" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Reserve is invoked" + }, + "details": { + "name": "Reserve" + }, + "params": [ + { + "typeid": "{8EA123A3-72BE-5B00-A22E-BEF0AFB0B68B}", + "details": { + "name": "AZStd::unordered_map" + } + }, + { + "typeid": "{D6597933-47CD-4FC8-B911-63F3E2B0993A}", + "details": { + "name": "AZ::u64" + } + } + ] + }, + { + "base": "GetSize", + "context": "{8EA123A3-72BE-5B00-A22E-BEF0AFB0B68B}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke GetSize" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after GetSize is invoked" + }, + "details": { + "name": "GetSize" + }, + "params": [ + { + "typeid": "{8EA123A3-72BE-5B00-A22E-BEF0AFB0B68B}", + "details": { + "name": "AZStd::unordered_map" + } + } + ], + "results": [ + { + "typeid": "{72039442-EB38-4D42-A1AD-CB68F7E0EEF6}", + "details": { + "name": "int" + } + } + ] + }, + { + "base": "Iterate_VM", + "context": "{8EA123A3-72BE-5B00-A22E-BEF0AFB0B68B}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Iterate_VM" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Iterate_VM is invoked" + }, + "details": { + "name": "Iterate_VM" + }, + "params": [ + { + "typeid": "{8EA123A3-72BE-5B00-A22E-BEF0AFB0B68B}", + "details": { + "name": "AZStd::unordered_map" + } + } + ], + "results": [ + { + "typeid": "{CF39F312-074C-5E55-8E3A-07998971A8D2}", + "details": { + "name": "Iterator_VM, AZStd::equal_to, allocator>>" + } + } + ] + }, + { + "base": "GetKeys", + "context": "{8EA123A3-72BE-5B00-A22E-BEF0AFB0B68B}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke GetKeys" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after GetKeys is invoked" + }, + "details": { + "name": "GetKeys" + }, + "params": [ + { + "typeid": "{8EA123A3-72BE-5B00-A22E-BEF0AFB0B68B}", + "details": { + "name": "AZStd::unordered_map" + } + } + ], + "results": [ + { + "typeid": "{B505B05D-57BF-5A45-9113-B3A2784E2CD7}", + "details": { + "name": "AZStd::vector" + } + } + ] + }, + { + "base": "Size", + "context": "{8EA123A3-72BE-5B00-A22E-BEF0AFB0B68B}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Size" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Size is invoked" + }, + "details": { + "name": "Size" + }, + "params": [ + { + "typeid": "{8EA123A3-72BE-5B00-A22E-BEF0AFB0B68B}", + "details": { + "name": "AZStd::unordered_map" + } + } + ], + "results": [ + { + "typeid": "{72039442-EB38-4D42-A1AD-CB68F7E0EEF6}", + "details": { + "name": "int" + } + } + ] + }, + { + "base": "Erase", + "context": "{8EA123A3-72BE-5B00-A22E-BEF0AFB0B68B}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Erase" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Erase is invoked" + }, + "details": { + "name": "Erase" + }, + "params": [ + { + "typeid": "{8EA123A3-72BE-5B00-A22E-BEF0AFB0B68B}", + "details": { + "name": "AZStd::unordered_map" + } + }, + { + "typeid": "{A0CA880C-AFE4-43CB-926C-59AC48496112}", + "details": { + "name": "bool" + } + } + ], + "results": [ + { + "typeid": "{8EA123A3-72BE-5B00-A22E-BEF0AFB0B68B}", + "details": { + "name": "AZStd::unordered_map" + } + } + ] + }, + { + "base": "EraseCheck_VM", + "context": "{8EA123A3-72BE-5B00-A22E-BEF0AFB0B68B}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke EraseCheck_VM" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after EraseCheck_VM is invoked" + }, + "details": { + "name": "EraseCheck_VM" + }, + "params": [ + { + "typeid": "{8EA123A3-72BE-5B00-A22E-BEF0AFB0B68B}", + "details": { + "name": "AZStd::unordered_map" + } + }, + { + "typeid": "{A0CA880C-AFE4-43CB-926C-59AC48496112}", + "details": { + "name": "bool" + } + } + ], + "results": [ + { + "typeid": "{A0CA880C-AFE4-43CB-926C-59AC48496112}", + "details": { + "name": "bool" + } + } + ] + }, + { + "base": "Clear", + "context": "{8EA123A3-72BE-5B00-A22E-BEF0AFB0B68B}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Clear" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Clear is invoked" + }, + "details": { + "name": "Clear" + }, + "params": [ + { + "typeid": "{8EA123A3-72BE-5B00-A22E-BEF0AFB0B68B}", + "details": { + "name": "AZStd::unordered_map" + } + } + ], + "results": [ + { + "typeid": "{8EA123A3-72BE-5B00-A22E-BEF0AFB0B68B}", + "details": { + "name": "AZStd::unordered_map" + } + } + ] + }, + { + "base": "At", + "context": "{8EA123A3-72BE-5B00-A22E-BEF0AFB0B68B}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke At" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after At is invoked" + }, + "details": { + "name": "At" + }, + "params": [ + { + "typeid": "{8EA123A3-72BE-5B00-A22E-BEF0AFB0B68B}", + "details": { + "name": "AZStd::unordered_map" + } + }, + { + "typeid": "{A0CA880C-AFE4-43CB-926C-59AC48496112}", + "details": { + "name": "bool" + } + } + ], + "results": [ + { + "typeid": "{15A4332F-7C3F-4A58-AC35-50E1CE53FB9C}", + "details": { + "name": "Matrix3x3" + } + } + ] + }, + { + "base": "BucketCount", + "context": "{8EA123A3-72BE-5B00-A22E-BEF0AFB0B68B}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke BucketCount" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after BucketCount is invoked" + }, + "details": { + "name": "BucketCount" + }, + "params": [ + { + "typeid": "{8EA123A3-72BE-5B00-A22E-BEF0AFB0B68B}", + "details": { + "name": "AZStd::unordered_map" + } + } + ], + "results": [ + { + "typeid": "{D6597933-47CD-4FC8-B911-63F3E2B0993A}", + "details": { + "name": "AZ::u64" + } + } + ] + }, + { + "base": "Empty", + "context": "{8EA123A3-72BE-5B00-A22E-BEF0AFB0B68B}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Empty" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Empty is invoked" + }, + "details": { + "name": "Empty" + }, + "params": [ + { + "typeid": "{8EA123A3-72BE-5B00-A22E-BEF0AFB0B68B}", + "details": { + "name": "AZStd::unordered_map" + } + } + ], + "results": [ + { + "typeid": "{A0CA880C-AFE4-43CB-926C-59AC48496112}", + "details": { + "name": "bool" + } + } + ] + }, + { + "base": "Swap", + "context": "{8EA123A3-72BE-5B00-A22E-BEF0AFB0B68B}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Swap" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Swap is invoked" + }, + "details": { + "name": "Swap" + }, + "params": [ + { + "typeid": "{8EA123A3-72BE-5B00-A22E-BEF0AFB0B68B}", + "details": { + "name": "AZStd::unordered_map" + } + }, + { + "typeid": "{8EA123A3-72BE-5B00-A22E-BEF0AFB0B68B}", + "details": { + "name": "AZStd::unordered_map" + } + } + ] + } + ] + }, + { + "base": "{0E9C062F-96E1-58E9-BCE0-AB93C4C425A1}", + "context": "OnDemandReflected", + "variant": "", + "details": { + "name": "Outcome" + }, + "methods": [ + { + "base": "GetError", + "context": "{0E9C062F-96E1-58E9-BCE0-AB93C4C425A1}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke GetError" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after GetError is invoked" + }, + "details": { + "name": "GetError" + }, + "params": [ + { + "typeid": "{0E9C062F-96E1-58E9-BCE0-AB93C4C425A1}", + "details": { + "name": "Outcome, allocator>>" + } + } + ] + }, + { + "base": "GetValue", + "context": "{0E9C062F-96E1-58E9-BCE0-AB93C4C425A1}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke GetValue" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after GetValue is invoked" + }, + "details": { + "name": "GetValue" + }, + "params": [ + { + "typeid": "{0E9C062F-96E1-58E9-BCE0-AB93C4C425A1}", + "details": { + "name": "Outcome, allocator>>" + } + } + ] + } + ] + }, + { + "base": "{7FF36F26-644E-5051-84BB-AE54534C84D4}", + "context": "OnDemandReflected", + "variant": "", + "details": { + "name": "Array", + "category": "Array", + "tooltip": "A dynamically sized container of elements." + }, + "methods": [ + { + "base": "Size", + "context": "{7FF36F26-644E-5051-84BB-AE54534C84D4}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Size" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Size is invoked" + }, + "details": { + "name": "Size" + }, + "params": [ + { + "typeid": "{7FF36F26-644E-5051-84BB-AE54534C84D4}", + "details": { + "name": "AZStd::vector" + } + } + ], + "results": [ + { + "typeid": "{72039442-EB38-4D42-A1AD-CB68F7E0EEF6}", + "details": { + "name": "int" + } + } + ] + }, + { + "base": "Front", + "context": "{7FF36F26-644E-5051-84BB-AE54534C84D4}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Front" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Front is invoked" + }, + "details": { + "name": "Front" + }, + "params": [ + { + "typeid": "{7FF36F26-644E-5051-84BB-AE54534C84D4}", + "details": { + "name": "AZStd::vector" + } + } + ], + "results": [ + { + "typeid": "{5D9958E9-9F1E-4985-B532-FFFDE75FEDFD}", + "details": { + "name": "Transform" + } + } + ] + }, + { + "base": "HasKey", + "context": "{7FF36F26-644E-5051-84BB-AE54534C84D4}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Has Key" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Has Key is invoked" + }, + "details": { + "name": "Has Key" + }, + "params": [ + { + "typeid": "{7FF36F26-644E-5051-84BB-AE54534C84D4}", + "details": { + "name": "AZStd::vector" + } + }, + { + "typeid": "{D6597933-47CD-4FC8-B911-63F3E2B0993A}", + "details": { + "name": "AZ::u64" + } + } + ], + "results": [ + { + "typeid": "{A0CA880C-AFE4-43CB-926C-59AC48496112}", + "details": { + "name": "bool" + } + } + ] + }, + { + "base": "Resize", + "context": "{7FF36F26-644E-5051-84BB-AE54534C84D4}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Resize" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Resize is invoked" + }, + "details": { + "name": "Resize" + }, + "params": [ + { + "typeid": "{7FF36F26-644E-5051-84BB-AE54534C84D4}", + "details": { + "name": "AZStd::vector" + } + }, + { + "typeid": "{D6597933-47CD-4FC8-B911-63F3E2B0993A}", + "details": { + "name": "AZ::u64" + } + } + ] + }, + { + "base": "at", + "context": "{7FF36F26-644E-5051-84BB-AE54534C84D4}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke at" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after at is invoked" + }, + "details": { + "name": "at" + }, + "params": [ + { + "typeid": "{7FF36F26-644E-5051-84BB-AE54534C84D4}", + "details": { + "name": "AZStd::vector" + } + }, + { + "typeid": "{D6597933-47CD-4FC8-B911-63F3E2B0993A}", + "details": { + "name": "AZ::u64" + } + } + ], + "results": [ + { + "typeid": "{5D9958E9-9F1E-4985-B532-FFFDE75FEDFD}", + "details": { + "name": "Transform" + } + } + ] + }, + { + "base": "Back", + "context": "{7FF36F26-644E-5051-84BB-AE54534C84D4}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Back" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Back is invoked" + }, + "details": { + "name": "Back" + }, + "params": [ + { + "typeid": "{7FF36F26-644E-5051-84BB-AE54534C84D4}", + "details": { + "name": "AZStd::vector" + } + } + ], + "results": [ + { + "typeid": "{5D9958E9-9F1E-4985-B532-FFFDE75FEDFD}", + "details": { + "name": "Transform" + } + } + ] + }, + { + "base": "pop_back", + "context": "{7FF36F26-644E-5051-84BB-AE54534C84D4}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke pop_back" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after pop_back is invoked" + }, + "details": { + "name": "pop_back" + }, + "params": [ + { + "typeid": "{7FF36F26-644E-5051-84BB-AE54534C84D4}", + "details": { + "name": "AZStd::vector" + } + } + ] + }, + { + "base": "size", + "context": "{7FF36F26-644E-5051-84BB-AE54534C84D4}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke size" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after size is invoked" + }, + "details": { + "name": "size" + }, + "params": [ + { + "typeid": "{7FF36F26-644E-5051-84BB-AE54534C84D4}", + "details": { + "name": "AZStd::vector" + } + } + ], + "results": [ + { + "typeid": "{72039442-EB38-4D42-A1AD-CB68F7E0EEF6}", + "details": { + "name": "int" + } + } + ] + }, + { + "base": "At", + "context": "{7FF36F26-644E-5051-84BB-AE54534C84D4}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke At" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after At is invoked" + }, + "details": { + "name": "At" + }, + "params": [ + { + "typeid": "{7FF36F26-644E-5051-84BB-AE54534C84D4}", + "details": { + "name": "AZStd::vector" + } + }, + { + "typeid": "{D6597933-47CD-4FC8-B911-63F3E2B0993A}", + "details": { + "name": "AZ::u64" + } + } + ], + "results": [ + { + "typeid": "{5D9958E9-9F1E-4985-B532-FFFDE75FEDFD}", + "details": { + "name": "Transform" + } + } + ] + }, + { + "base": "Empty", + "context": "{7FF36F26-644E-5051-84BB-AE54534C84D4}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Empty" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Empty is invoked" + }, + "details": { + "name": "Empty" + }, + "params": [ + { + "typeid": "{7FF36F26-644E-5051-84BB-AE54534C84D4}", + "details": { + "name": "AZStd::vector" + } + } + ], + "results": [ + { + "typeid": "{A0CA880C-AFE4-43CB-926C-59AC48496112}", + "details": { + "name": "bool" + } + } + ] + }, + { + "base": "Swap", + "context": "{7FF36F26-644E-5051-84BB-AE54534C84D4}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Swap" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Swap is invoked" + }, + "details": { + "name": "Swap" + }, + "params": [ + { + "typeid": "{7FF36F26-644E-5051-84BB-AE54534C84D4}", + "details": { + "name": "AZStd::vector" + } + }, + { + "typeid": "{7FF36F26-644E-5051-84BB-AE54534C84D4}", + "details": { + "name": "AZStd::vector" + } + } + ] + }, + { + "base": "push_back", + "context": "{7FF36F26-644E-5051-84BB-AE54534C84D4}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke push_back" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after push_back is invoked" + }, + "details": { + "name": "push_back" + }, + "params": [ + { + "typeid": "{7FF36F26-644E-5051-84BB-AE54534C84D4}", + "details": { + "name": "AZStd::vector" + } + }, + { + "typeid": "{5D9958E9-9F1E-4985-B532-FFFDE75FEDFD}", + "details": { + "name": "Transform" + } + } + ] + }, + { + "base": "PushBack_VM", + "context": "{7FF36F26-644E-5051-84BB-AE54534C84D4}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke PushBack_VM" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after PushBack_VM is invoked" + }, + "details": { + "name": "PushBack_VM" + }, + "params": [ + { + "typeid": "{7FF36F26-644E-5051-84BB-AE54534C84D4}", + "details": { + "name": "AZStd::vector" + } + }, + { + "typeid": "{5D9958E9-9F1E-4985-B532-FFFDE75FEDFD}", + "details": { + "name": "Transform" + } + } + ], + "results": [ + { + "typeid": "{7FF36F26-644E-5051-84BB-AE54534C84D4}", + "details": { + "name": "AZStd::vector" + } + } + ] + }, + { + "base": "AtUnchecked", + "context": "{7FF36F26-644E-5051-84BB-AE54534C84D4}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke AtUnchecked" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after AtUnchecked is invoked" + }, + "details": { + "name": "AtUnchecked" + }, + "params": [ + { + "typeid": "{7FF36F26-644E-5051-84BB-AE54534C84D4}", + "details": { + "name": "AZStd::vector" + } + }, + { + "typeid": "{D6597933-47CD-4FC8-B911-63F3E2B0993A}", + "details": { + "name": "AZ::u64" + } + } + ], + "results": [ + { + "typeid": "{5D9958E9-9F1E-4985-B532-FFFDE75FEDFD}", + "details": { + "name": "Transform" + } + } + ] + }, + { + "base": "clear", + "context": "{7FF36F26-644E-5051-84BB-AE54534C84D4}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke clear" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after clear is invoked" + }, + "details": { + "name": "clear" + }, + "params": [ + { + "typeid": "{7FF36F26-644E-5051-84BB-AE54534C84D4}", + "details": { + "name": "AZStd::vector" + } + } + ] + }, + { + "base": "NotEmpty", + "context": "{7FF36F26-644E-5051-84BB-AE54534C84D4}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke NotEmpty" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after NotEmpty is invoked" + }, + "details": { + "name": "NotEmpty" + }, + "params": [ + { + "typeid": "{7FF36F26-644E-5051-84BB-AE54534C84D4}", + "details": { + "name": "AZStd::vector" + } + } + ], + "results": [ + { + "typeid": "{A0CA880C-AFE4-43CB-926C-59AC48496112}", + "details": { + "name": "bool" + } + } + ] + }, + { + "base": "Erase_VM", + "context": "{7FF36F26-644E-5051-84BB-AE54534C84D4}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Erase_VM" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Erase_VM is invoked" + }, + "details": { + "name": "Erase_VM" + }, + "params": [ + { + "typeid": "{7FF36F26-644E-5051-84BB-AE54534C84D4}", + "details": { + "name": "AZStd::vector" + } + }, + { + "typeid": "{D6597933-47CD-4FC8-B911-63F3E2B0993A}", + "details": { + "name": "AZ::u64" + } + } + ], + "results": [ + { + "typeid": "{7FF36F26-644E-5051-84BB-AE54534C84D4}", + "details": { + "name": "AZStd::vector" + } + } + ] + }, + { + "base": "EraseCheck_VM", + "context": "{7FF36F26-644E-5051-84BB-AE54534C84D4}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke EraseCheck_VM" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after EraseCheck_VM is invoked" + }, + "details": { + "name": "EraseCheck_VM" + }, + "params": [ + { + "typeid": "{7FF36F26-644E-5051-84BB-AE54534C84D4}", + "details": { + "name": "AZStd::vector" + } + }, + { + "typeid": "{D6597933-47CD-4FC8-B911-63F3E2B0993A}", + "details": { + "name": "AZ::u64" + } + } + ], + "results": [ + { + "typeid": "{A0CA880C-AFE4-43CB-926C-59AC48496112}", + "details": { + "name": "bool" + } + } + ] + }, + { + "base": "Capacity", + "context": "{7FF36F26-644E-5051-84BB-AE54534C84D4}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Capacity" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Capacity is invoked" + }, + "details": { + "name": "Capacity" + }, + "params": [ + { + "typeid": "{7FF36F26-644E-5051-84BB-AE54534C84D4}", + "details": { + "name": "AZStd::vector" + } + } + ], + "results": [ + { + "typeid": "{D6597933-47CD-4FC8-B911-63F3E2B0993A}", + "details": { + "name": "AZ::u64" + } + } + ] + }, + { + "base": "Clear", + "context": "{7FF36F26-644E-5051-84BB-AE54534C84D4}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Clear" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Clear is invoked" + }, + "details": { + "name": "Clear" + }, + "params": [ + { + "typeid": "{7FF36F26-644E-5051-84BB-AE54534C84D4}", + "details": { + "name": "AZStd::vector" + } + } + ], + "results": [ + { + "typeid": "{7FF36F26-644E-5051-84BB-AE54534C84D4}", + "details": { + "name": "AZStd::vector" + } + } + ] + }, + { + "base": "AssignAt", + "context": "{7FF36F26-644E-5051-84BB-AE54534C84D4}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke AssignAt" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after AssignAt is invoked" + }, + "details": { + "name": "AssignAt" + }, + "params": [ + { + "typeid": "{7FF36F26-644E-5051-84BB-AE54534C84D4}", + "details": { + "name": "AZStd::vector" + } + }, + { + "typeid": "{D6597933-47CD-4FC8-B911-63F3E2B0993A}", + "details": { + "name": "AZ::u64" + } + }, + { + "typeid": "{5D9958E9-9F1E-4985-B532-FFFDE75FEDFD}", + "details": { + "name": "Transform" + } + } + ] + }, + { + "base": "GetSize", + "context": "{7FF36F26-644E-5051-84BB-AE54534C84D4}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke GetSize" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after GetSize is invoked" + }, + "details": { + "name": "GetSize" + }, + "params": [ + { + "typeid": "{7FF36F26-644E-5051-84BB-AE54534C84D4}", + "details": { + "name": "AZStd::vector" + } + } + ], + "results": [ + { + "typeid": "{72039442-EB38-4D42-A1AD-CB68F7E0EEF6}", + "details": { + "name": "int" + } + } + ] + }, + { + "base": "Insert", + "context": "{7FF36F26-644E-5051-84BB-AE54534C84D4}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Insert" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Insert is invoked" + }, + "details": { + "name": "Insert" + }, + "params": [ + { + "typeid": "{7FF36F26-644E-5051-84BB-AE54534C84D4}", + "details": { + "name": "AZStd::vector" + } + }, + { + "typeid": "{D6597933-47CD-4FC8-B911-63F3E2B0993A}", + "details": { + "name": "AZ::u64" + } + }, + { + "typeid": "{5D9958E9-9F1E-4985-B532-FFFDE75FEDFD}", + "details": { + "name": "Transform" + } + } + ], + "results": [ + { + "typeid": "{7FF36F26-644E-5051-84BB-AE54534C84D4}", + "details": { + "name": "AZStd::vector" + } + } + ] + }, + { + "base": "PushBack", + "context": "{7FF36F26-644E-5051-84BB-AE54534C84D4}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke PushBack" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after PushBack is invoked" + }, + "details": { + "name": "PushBack" + }, + "params": [ + { + "typeid": "{7FF36F26-644E-5051-84BB-AE54534C84D4}", + "details": { + "name": "AZStd::vector" + } + }, + { + "typeid": "{5D9958E9-9F1E-4985-B532-FFFDE75FEDFD}", + "details": { + "name": "Transform" + } + } + ] + }, + { + "base": "Reserve", + "context": "{7FF36F26-644E-5051-84BB-AE54534C84D4}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Reserve" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Reserve is invoked" + }, + "details": { + "name": "Reserve" + }, + "params": [ + { + "typeid": "{7FF36F26-644E-5051-84BB-AE54534C84D4}", + "details": { + "name": "AZStd::vector" + } + }, + { + "typeid": "{D6597933-47CD-4FC8-B911-63F3E2B0993A}", + "details": { + "name": "AZ::u64" + } + } + ] + }, + { + "base": "Iterate_VM", + "context": "{7FF36F26-644E-5051-84BB-AE54534C84D4}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Iterate_VM" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Iterate_VM is invoked" + }, + "details": { + "name": "Iterate_VM" + }, + "params": [ + { + "typeid": "{7FF36F26-644E-5051-84BB-AE54534C84D4}", + "details": { + "name": "AZStd::vector" + } + } + ], + "results": [ + { + "typeid": "{5B12BB74-5E3F-5449-A4F3-6DA4F43354E6}", + "details": { + "name": "Iterator_VM>" + } + } + ] + } + ] + }, + { + "base": "{BFBA17B6-CDE2-5239-AEE0-58DF7FA14E3C}", + "context": "OnDemandReflected", + "variant": "", + "details": { + "name": "Array", + "category": "Array", + "tooltip": "A dynamically sized container of elements." + }, + "methods": [ + { + "base": "Size", + "context": "{BFBA17B6-CDE2-5239-AEE0-58DF7FA14E3C}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Size" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Size is invoked" + }, + "details": { + "name": "Size" + }, + "params": [ + { + "typeid": "{BFBA17B6-CDE2-5239-AEE0-58DF7FA14E3C}", + "details": { + "name": "AZStd::vector&" + } + } + ], + "results": [ + { + "typeid": "{72039442-EB38-4D42-A1AD-CB68F7E0EEF6}", + "details": { + "name": "int" + } + } + ] + }, + { + "base": "Front", + "context": "{BFBA17B6-CDE2-5239-AEE0-58DF7FA14E3C}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Front" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Front is invoked" + }, + "details": { + "name": "Front" + }, + "params": [ + { + "typeid": "{BFBA17B6-CDE2-5239-AEE0-58DF7FA14E3C}", + "details": { + "name": "AZStd::vector*" + } + } + ], + "results": [ + { + "typeid": "{6054EDCB-4C04-4D96-BF26-704999FFB725}", + "details": { + "name": "SceneAPI::Events::ExportProduct&" + } + } + ] + }, + { + "base": "HasKey", + "context": "{BFBA17B6-CDE2-5239-AEE0-58DF7FA14E3C}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Has Key" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Has Key is invoked" + }, + "details": { + "name": "Has Key" + }, + "params": [ + { + "typeid": "{BFBA17B6-CDE2-5239-AEE0-58DF7FA14E3C}", + "details": { + "name": "AZStd::vector&" + } + }, + { + "typeid": "{D6597933-47CD-4FC8-B911-63F3E2B0993A}", + "details": { + "name": "AZ::u64" + } + } + ], + "results": [ + { + "typeid": "{A0CA880C-AFE4-43CB-926C-59AC48496112}", + "details": { + "name": "bool" + } + } + ] + }, + { + "base": "Resize", + "context": "{BFBA17B6-CDE2-5239-AEE0-58DF7FA14E3C}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Resize" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Resize is invoked" + }, + "details": { + "name": "Resize" + }, + "params": [ + { + "typeid": "{BFBA17B6-CDE2-5239-AEE0-58DF7FA14E3C}", + "details": { + "name": "AZStd::vector*" + } + }, + { + "typeid": "{D6597933-47CD-4FC8-B911-63F3E2B0993A}", + "details": { + "name": "AZ::u64" + } + } + ] + }, + { + "base": "at", + "context": "{BFBA17B6-CDE2-5239-AEE0-58DF7FA14E3C}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke at" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after at is invoked" + }, + "details": { + "name": "at" + }, + "params": [ + { + "typeid": "{BFBA17B6-CDE2-5239-AEE0-58DF7FA14E3C}", + "details": { + "name": "AZStd::vector*" + } + }, + { + "typeid": "{D6597933-47CD-4FC8-B911-63F3E2B0993A}", + "details": { + "name": "AZ::u64" + } + } + ], + "results": [ + { + "typeid": "{6054EDCB-4C04-4D96-BF26-704999FFB725}", + "details": { + "name": "SceneAPI::Events::ExportProduct&" + } + } + ] + }, + { + "base": "Back", + "context": "{BFBA17B6-CDE2-5239-AEE0-58DF7FA14E3C}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Back" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Back is invoked" + }, + "details": { + "name": "Back" + }, + "params": [ + { + "typeid": "{BFBA17B6-CDE2-5239-AEE0-58DF7FA14E3C}", + "details": { + "name": "AZStd::vector*" + } + } + ], + "results": [ + { + "typeid": "{6054EDCB-4C04-4D96-BF26-704999FFB725}", + "details": { + "name": "SceneAPI::Events::ExportProduct&" + } + } + ] + }, + { + "base": "pop_back", + "context": "{BFBA17B6-CDE2-5239-AEE0-58DF7FA14E3C}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke pop_back" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after pop_back is invoked" + }, + "details": { + "name": "pop_back" + }, + "params": [ + { + "typeid": "{BFBA17B6-CDE2-5239-AEE0-58DF7FA14E3C}", + "details": { + "name": "AZStd::vector*" + } + } + ] + }, + { + "base": "size", + "context": "{BFBA17B6-CDE2-5239-AEE0-58DF7FA14E3C}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke size" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after size is invoked" + }, + "details": { + "name": "size" + }, + "params": [ + { + "typeid": "{BFBA17B6-CDE2-5239-AEE0-58DF7FA14E3C}", + "details": { + "name": "AZStd::vector&" + } + } + ], + "results": [ + { + "typeid": "{72039442-EB38-4D42-A1AD-CB68F7E0EEF6}", + "details": { + "name": "int" + } + } + ] + }, + { + "base": "At", + "context": "{BFBA17B6-CDE2-5239-AEE0-58DF7FA14E3C}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke At" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after At is invoked" + }, + "details": { + "name": "At" + }, + "params": [ + { + "typeid": "{BFBA17B6-CDE2-5239-AEE0-58DF7FA14E3C}", + "details": { + "name": "AZStd::vector*" + } + }, + { + "typeid": "{D6597933-47CD-4FC8-B911-63F3E2B0993A}", + "details": { + "name": "AZ::u64" + } + } + ], + "results": [ + { + "typeid": "{6054EDCB-4C04-4D96-BF26-704999FFB725}", + "details": { + "name": "SceneAPI::Events::ExportProduct&" + } + } + ] + }, + { + "base": "Empty", + "context": "{BFBA17B6-CDE2-5239-AEE0-58DF7FA14E3C}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Empty" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Empty is invoked" + }, + "details": { + "name": "Empty" + }, + "params": [ + { + "typeid": "{BFBA17B6-CDE2-5239-AEE0-58DF7FA14E3C}", + "details": { + "name": "AZStd::vector*" + } + } + ], + "results": [ + { + "typeid": "{A0CA880C-AFE4-43CB-926C-59AC48496112}", + "details": { + "name": "bool" + } + } + ] + }, + { + "base": "Swap", + "context": "{BFBA17B6-CDE2-5239-AEE0-58DF7FA14E3C}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Swap" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Swap is invoked" + }, + "details": { + "name": "Swap" + }, + "params": [ + { + "typeid": "{BFBA17B6-CDE2-5239-AEE0-58DF7FA14E3C}", + "details": { + "name": "AZStd::vector*" + } + }, + { + "typeid": "{BFBA17B6-CDE2-5239-AEE0-58DF7FA14E3C}", + "details": { + "name": "AZStd::vector&" + } + } + ] + }, + { + "base": "push_back", + "context": "{BFBA17B6-CDE2-5239-AEE0-58DF7FA14E3C}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke push_back" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after push_back is invoked" + }, + "details": { + "name": "push_back" + }, + "params": [ + { + "typeid": "{BFBA17B6-CDE2-5239-AEE0-58DF7FA14E3C}", + "details": { + "name": "AZStd::vector*" + } + }, + { + "typeid": "{6054EDCB-4C04-4D96-BF26-704999FFB725}", + "details": { + "name": "const SceneAPI::Events::ExportProduct&" + } + } + ] + }, + { + "base": "PushBack_VM", + "context": "{BFBA17B6-CDE2-5239-AEE0-58DF7FA14E3C}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke PushBack_VM" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after PushBack_VM is invoked" + }, + "details": { + "name": "PushBack_VM" + }, + "params": [ + { + "typeid": "{BFBA17B6-CDE2-5239-AEE0-58DF7FA14E3C}", + "details": { + "name": "AZStd::vector&" + } + }, + { + "typeid": "{6054EDCB-4C04-4D96-BF26-704999FFB725}", + "details": { + "name": "const SceneAPI::Events::ExportProduct&" + } + } + ], + "results": [ + { + "typeid": "{BFBA17B6-CDE2-5239-AEE0-58DF7FA14E3C}", + "details": { + "name": "AZStd::vector&" + } + } + ] + }, + { + "base": "AtUnchecked", + "context": "{BFBA17B6-CDE2-5239-AEE0-58DF7FA14E3C}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke AtUnchecked" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after AtUnchecked is invoked" + }, + "details": { + "name": "AtUnchecked" + }, + "params": [ + { + "typeid": "{BFBA17B6-CDE2-5239-AEE0-58DF7FA14E3C}", + "details": { + "name": "AZStd::vector*" + } + }, + { + "typeid": "{D6597933-47CD-4FC8-B911-63F3E2B0993A}", + "details": { + "name": "AZ::u64" + } + } + ], + "results": [ + { + "typeid": "{6054EDCB-4C04-4D96-BF26-704999FFB725}", + "details": { + "name": "SceneAPI::Events::ExportProduct&" + } + } + ] + }, + { + "base": "clear", + "context": "{BFBA17B6-CDE2-5239-AEE0-58DF7FA14E3C}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke clear" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after clear is invoked" + }, + "details": { + "name": "clear" + }, + "params": [ + { + "typeid": "{BFBA17B6-CDE2-5239-AEE0-58DF7FA14E3C}", + "details": { + "name": "AZStd::vector*" + } + } + ] + }, + { + "base": "NotEmpty", + "context": "{BFBA17B6-CDE2-5239-AEE0-58DF7FA14E3C}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke NotEmpty" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after NotEmpty is invoked" + }, + "details": { + "name": "NotEmpty" + }, + "params": [ + { + "typeid": "{BFBA17B6-CDE2-5239-AEE0-58DF7FA14E3C}", + "details": { + "name": "AZStd::vector&" + } + } + ], + "results": [ + { + "typeid": "{A0CA880C-AFE4-43CB-926C-59AC48496112}", + "details": { + "name": "bool" + } + } + ] + }, + { + "base": "Erase_VM", + "context": "{BFBA17B6-CDE2-5239-AEE0-58DF7FA14E3C}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Erase_VM" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Erase_VM is invoked" + }, + "details": { + "name": "Erase_VM" + }, + "params": [ + { + "typeid": "{BFBA17B6-CDE2-5239-AEE0-58DF7FA14E3C}", + "details": { + "name": "AZStd::vector&" + } + }, + { + "typeid": "{D6597933-47CD-4FC8-B911-63F3E2B0993A}", + "details": { + "name": "AZ::u64" + } + } + ], + "results": [ + { + "typeid": "{BFBA17B6-CDE2-5239-AEE0-58DF7FA14E3C}", + "details": { + "name": "AZStd::vector&" + } + } + ] + }, + { + "base": "EraseCheck_VM", + "context": "{BFBA17B6-CDE2-5239-AEE0-58DF7FA14E3C}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke EraseCheck_VM" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after EraseCheck_VM is invoked" + }, + "details": { + "name": "EraseCheck_VM" + }, + "params": [ + { + "typeid": "{BFBA17B6-CDE2-5239-AEE0-58DF7FA14E3C}", + "details": { + "name": "AZStd::vector&" + } + }, + { + "typeid": "{D6597933-47CD-4FC8-B911-63F3E2B0993A}", + "details": { + "name": "AZ::u64" + } + } + ], + "results": [ + { + "typeid": "{A0CA880C-AFE4-43CB-926C-59AC48496112}", + "details": { + "name": "bool" + } + } + ] + }, + { + "base": "Capacity", + "context": "{BFBA17B6-CDE2-5239-AEE0-58DF7FA14E3C}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Capacity" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Capacity is invoked" + }, + "details": { + "name": "Capacity" + }, + "params": [ + { + "typeid": "{BFBA17B6-CDE2-5239-AEE0-58DF7FA14E3C}", + "details": { + "name": "AZStd::vector*" + } + } + ], + "results": [ + { + "typeid": "{D6597933-47CD-4FC8-B911-63F3E2B0993A}", + "details": { + "name": "AZ::u64" + } + } + ] + }, + { + "base": "Clear", + "context": "{BFBA17B6-CDE2-5239-AEE0-58DF7FA14E3C}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Clear" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Clear is invoked" + }, + "details": { + "name": "Clear" + }, + "params": [ + { + "typeid": "{BFBA17B6-CDE2-5239-AEE0-58DF7FA14E3C}", + "details": { + "name": "AZStd::vector&" + } + } + ], + "results": [ + { + "typeid": "{BFBA17B6-CDE2-5239-AEE0-58DF7FA14E3C}", + "details": { + "name": "AZStd::vector&" + } + } + ] + }, + { + "base": "AssignAt", + "context": "{BFBA17B6-CDE2-5239-AEE0-58DF7FA14E3C}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke AssignAt" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after AssignAt is invoked" + }, + "details": { + "name": "AssignAt" + }, + "params": [ + { + "typeid": "{BFBA17B6-CDE2-5239-AEE0-58DF7FA14E3C}", + "details": { + "name": "AZStd::vector&" + } + }, + { + "typeid": "{D6597933-47CD-4FC8-B911-63F3E2B0993A}", + "details": { + "name": "AZ::u64" + } + }, + { + "typeid": "{6054EDCB-4C04-4D96-BF26-704999FFB725}", + "details": { + "name": "SceneAPI::Events::ExportProduct&" + } + } + ] + }, + { + "base": "GetSize", + "context": "{BFBA17B6-CDE2-5239-AEE0-58DF7FA14E3C}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke GetSize" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after GetSize is invoked" + }, + "details": { + "name": "GetSize" + }, + "params": [ + { + "typeid": "{BFBA17B6-CDE2-5239-AEE0-58DF7FA14E3C}", + "details": { + "name": "AZStd::vector&" + } + } + ], + "results": [ + { + "typeid": "{72039442-EB38-4D42-A1AD-CB68F7E0EEF6}", + "details": { + "name": "int" + } + } + ] + }, + { + "base": "Insert", + "context": "{BFBA17B6-CDE2-5239-AEE0-58DF7FA14E3C}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Insert" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Insert is invoked" + }, + "details": { + "name": "Insert" + }, + "params": [ + { + "typeid": "{BFBA17B6-CDE2-5239-AEE0-58DF7FA14E3C}", + "details": { + "name": "AZStd::vector&" + } + }, + { + "typeid": "{D6597933-47CD-4FC8-B911-63F3E2B0993A}", + "details": { + "name": "AZ::u64" + } + }, + { + "typeid": "{6054EDCB-4C04-4D96-BF26-704999FFB725}", + "details": { + "name": "const SceneAPI::Events::ExportProduct&" + } + } + ], + "results": [ + { + "typeid": "{BFBA17B6-CDE2-5239-AEE0-58DF7FA14E3C}", + "details": { + "name": "AZStd::vector&" + } + } + ] + }, + { + "base": "PushBack", + "context": "{BFBA17B6-CDE2-5239-AEE0-58DF7FA14E3C}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke PushBack" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after PushBack is invoked" + }, + "details": { + "name": "PushBack" + }, + "params": [ + { + "typeid": "{BFBA17B6-CDE2-5239-AEE0-58DF7FA14E3C}", + "details": { + "name": "AZStd::vector*" + } + }, + { + "typeid": "{6054EDCB-4C04-4D96-BF26-704999FFB725}", + "details": { + "name": "const SceneAPI::Events::ExportProduct&" + } + } + ] + }, + { + "base": "Reserve", + "context": "{BFBA17B6-CDE2-5239-AEE0-58DF7FA14E3C}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Reserve" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Reserve is invoked" + }, + "details": { + "name": "Reserve" + }, + "params": [ + { + "typeid": "{BFBA17B6-CDE2-5239-AEE0-58DF7FA14E3C}", + "details": { + "name": "AZStd::vector*" + } + }, + { + "typeid": "{D6597933-47CD-4FC8-B911-63F3E2B0993A}", + "details": { + "name": "AZ::u64" + } + } + ] + }, + { + "base": "Iterate_VM", + "context": "{BFBA17B6-CDE2-5239-AEE0-58DF7FA14E3C}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Iterate_VM" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Iterate_VM is invoked" + }, + "details": { + "name": "Iterate_VM" + }, + "params": [ + { + "typeid": "{BFBA17B6-CDE2-5239-AEE0-58DF7FA14E3C}", + "details": { + "name": "AZStd::vector&" + } + } + ], + "results": [ + { + "typeid": "{CD91071F-DA6D-5F76-9507-CAE09DD9C338}", + "details": { + "name": "Iterator_VM>" + } + } + ] + } + ] + }, + { + "base": "{5AEF7C62-0529-57B0-859D-97C69E910729}", + "context": "OnDemandReflected", + "variant": "", + "details": { + "name": "Map", + "category": "Map", + "tooltip": "A collection of Key/Value pairs, where each Key value must be unique." + }, + "methods": [ + { + "base": "contains", + "context": "{5AEF7C62-0529-57B0-859D-97C69E910729}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke contains" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after contains is invoked" + }, + "details": { + "name": "contains" + }, + "params": [ + { + "typeid": "{5AEF7C62-0529-57B0-859D-97C69E910729}", + "details": { + "name": "AZStd::unordered_map" + } + }, + { + "typeid": "{9F4E062E-06A0-46D4-85DF-E0DA96467D3A}", + "details": { + "name": "Crc32" + } + } + ], + "results": [ + { + "typeid": "{A0CA880C-AFE4-43CB-926C-59AC48496112}", + "details": { + "name": "bool" + } + } + ] + }, + { + "base": "Insert", + "context": "{5AEF7C62-0529-57B0-859D-97C69E910729}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Insert" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Insert is invoked" + }, + "details": { + "name": "Insert" + }, + "params": [ + { + "typeid": "{5AEF7C62-0529-57B0-859D-97C69E910729}", + "details": { + "name": "AZStd::unordered_map" + } + }, + { + "typeid": "{9F4E062E-06A0-46D4-85DF-E0DA96467D3A}", + "details": { + "name": "Crc32" + } + }, + { + "typeid": "{73103120-3DD3-4873-BAB3-9713FA2804FB}", + "details": { + "name": "Quaternion" + } + } + ], + "results": [ + { + "typeid": "{5AEF7C62-0529-57B0-859D-97C69E910729}", + "details": { + "name": "AZStd::unordered_map" + } + } + ] + }, + { + "base": "Reserve", + "context": "{5AEF7C62-0529-57B0-859D-97C69E910729}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Reserve" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Reserve is invoked" + }, + "details": { + "name": "Reserve" + }, + "params": [ + { + "typeid": "{5AEF7C62-0529-57B0-859D-97C69E910729}", + "details": { + "name": "AZStd::unordered_map" + } + }, + { + "typeid": "{D6597933-47CD-4FC8-B911-63F3E2B0993A}", + "details": { + "name": "AZ::u64" + } + } + ] + }, + { + "base": "GetSize", + "context": "{5AEF7C62-0529-57B0-859D-97C69E910729}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke GetSize" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after GetSize is invoked" + }, + "details": { + "name": "GetSize" + }, + "params": [ + { + "typeid": "{5AEF7C62-0529-57B0-859D-97C69E910729}", + "details": { + "name": "AZStd::unordered_map" + } + } + ], + "results": [ + { + "typeid": "{72039442-EB38-4D42-A1AD-CB68F7E0EEF6}", + "details": { + "name": "int" + } + } + ] + }, + { + "base": "Iterate_VM", + "context": "{5AEF7C62-0529-57B0-859D-97C69E910729}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Iterate_VM" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Iterate_VM is invoked" + }, + "details": { + "name": "Iterate_VM" + }, + "params": [ + { + "typeid": "{5AEF7C62-0529-57B0-859D-97C69E910729}", + "details": { + "name": "AZStd::unordered_map" + } + } + ], + "results": [ + { + "typeid": "{EAFB8DE5-772D-50B0-ADB1-7E384E09108C}", + "details": { + "name": "Iterator_VM, AZStd::equal_to, allocator>>" + } + } + ] + }, + { + "base": "GetKeys", + "context": "{5AEF7C62-0529-57B0-859D-97C69E910729}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke GetKeys" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after GetKeys is invoked" + }, + "details": { + "name": "GetKeys" + }, + "params": [ + { + "typeid": "{5AEF7C62-0529-57B0-859D-97C69E910729}", + "details": { + "name": "AZStd::unordered_map" + } + } + ], + "results": [ + { + "typeid": "{287CEE87-6FF3-52FC-9D32-38255E2C7FE9}", + "details": { + "name": "AZStd::vector" + } + } + ] + }, + { + "base": "Size", + "context": "{5AEF7C62-0529-57B0-859D-97C69E910729}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Size" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Size is invoked" + }, + "details": { + "name": "Size" + }, + "params": [ + { + "typeid": "{5AEF7C62-0529-57B0-859D-97C69E910729}", + "details": { + "name": "AZStd::unordered_map" + } + } + ], + "results": [ + { + "typeid": "{72039442-EB38-4D42-A1AD-CB68F7E0EEF6}", + "details": { + "name": "int" + } + } + ] + }, + { + "base": "Erase", + "context": "{5AEF7C62-0529-57B0-859D-97C69E910729}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Erase" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Erase is invoked" + }, + "details": { + "name": "Erase" + }, + "params": [ + { + "typeid": "{5AEF7C62-0529-57B0-859D-97C69E910729}", + "details": { + "name": "AZStd::unordered_map" + } + }, + { + "typeid": "{9F4E062E-06A0-46D4-85DF-E0DA96467D3A}", + "details": { + "name": "Crc32" + } + } + ], + "results": [ + { + "typeid": "{5AEF7C62-0529-57B0-859D-97C69E910729}", + "details": { + "name": "AZStd::unordered_map" + } + } + ] + }, + { + "base": "EraseCheck_VM", + "context": "{5AEF7C62-0529-57B0-859D-97C69E910729}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke EraseCheck_VM" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after EraseCheck_VM is invoked" + }, + "details": { + "name": "EraseCheck_VM" + }, + "params": [ + { + "typeid": "{5AEF7C62-0529-57B0-859D-97C69E910729}", + "details": { + "name": "AZStd::unordered_map" + } + }, + { + "typeid": "{9F4E062E-06A0-46D4-85DF-E0DA96467D3A}", + "details": { + "name": "Crc32" + } + } + ], + "results": [ + { + "typeid": "{A0CA880C-AFE4-43CB-926C-59AC48496112}", + "details": { + "name": "bool" + } + } + ] + }, + { + "base": "Clear", + "context": "{5AEF7C62-0529-57B0-859D-97C69E910729}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Clear" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Clear is invoked" + }, + "details": { + "name": "Clear" + }, + "params": [ + { + "typeid": "{5AEF7C62-0529-57B0-859D-97C69E910729}", + "details": { + "name": "AZStd::unordered_map" + } + } + ], + "results": [ + { + "typeid": "{5AEF7C62-0529-57B0-859D-97C69E910729}", + "details": { + "name": "AZStd::unordered_map" + } + } + ] + }, + { + "base": "At", + "context": "{5AEF7C62-0529-57B0-859D-97C69E910729}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke At" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after At is invoked" + }, + "details": { + "name": "At" + }, + "params": [ + { + "typeid": "{5AEF7C62-0529-57B0-859D-97C69E910729}", + "details": { + "name": "AZStd::unordered_map" + } + }, + { + "typeid": "{9F4E062E-06A0-46D4-85DF-E0DA96467D3A}", + "details": { + "name": "Crc32" + } + } + ], + "results": [ + { + "typeid": "{73103120-3DD3-4873-BAB3-9713FA2804FB}", + "details": { + "name": "Quaternion" + } + } + ] + }, + { + "base": "BucketCount", + "context": "{5AEF7C62-0529-57B0-859D-97C69E910729}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke BucketCount" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after BucketCount is invoked" + }, + "details": { + "name": "BucketCount" + }, + "params": [ + { + "typeid": "{5AEF7C62-0529-57B0-859D-97C69E910729}", + "details": { + "name": "AZStd::unordered_map" + } + } + ], + "results": [ + { + "typeid": "{D6597933-47CD-4FC8-B911-63F3E2B0993A}", + "details": { + "name": "AZ::u64" + } + } + ] + }, + { + "base": "Empty", + "context": "{5AEF7C62-0529-57B0-859D-97C69E910729}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Empty" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Empty is invoked" + }, + "details": { + "name": "Empty" + }, + "params": [ + { + "typeid": "{5AEF7C62-0529-57B0-859D-97C69E910729}", + "details": { + "name": "AZStd::unordered_map" + } + } + ], + "results": [ + { + "typeid": "{A0CA880C-AFE4-43CB-926C-59AC48496112}", + "details": { + "name": "bool" + } + } + ] + }, + { + "base": "Swap", + "context": "{5AEF7C62-0529-57B0-859D-97C69E910729}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Swap" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Swap is invoked" + }, + "details": { + "name": "Swap" + }, + "params": [ + { + "typeid": "{5AEF7C62-0529-57B0-859D-97C69E910729}", + "details": { + "name": "AZStd::unordered_map" + } + }, + { + "typeid": "{5AEF7C62-0529-57B0-859D-97C69E910729}", + "details": { + "name": "AZStd::unordered_map" + } + } + ] + } + ] + }, + { + "base": "{7770AD3E-BABE-5F1C-B322-DE5DEAE94974}", + "context": "OnDemandReflected", + "variant": "", + "details": { + "name": "Array", + "category": "Array", + "tooltip": "A dynamically sized container of elements." + }, + "methods": [ + { + "base": "Size", + "context": "{7770AD3E-BABE-5F1C-B322-DE5DEAE94974}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Size" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Size is invoked" + }, + "details": { + "name": "Size" + }, + "params": [ + { + "typeid": "{7770AD3E-BABE-5F1C-B322-DE5DEAE94974}", + "details": { + "name": "AZStd::vector&" + } + } + ], + "results": [ + { + "typeid": "{72039442-EB38-4D42-A1AD-CB68F7E0EEF6}", + "details": { + "name": "int" + } + } + ] + }, + { + "base": "Front", + "context": "{7770AD3E-BABE-5F1C-B322-DE5DEAE94974}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Front" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Front is invoked" + }, + "details": { + "name": "Front" + }, + "params": [ + { + "typeid": "{7770AD3E-BABE-5F1C-B322-DE5DEAE94974}", + "details": { + "name": "AZStd::vector*" + } + } + ], + "results": [ + { + "typeid": "{EB603581-4654-4C17-B6DE-AE61E79EDA97}", + "details": { + "name": "AZ::Render::MaterialAssignmentId" + } + } + ] + }, + { + "base": "HasKey", + "context": "{7770AD3E-BABE-5F1C-B322-DE5DEAE94974}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Has Key" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Has Key is invoked" + }, + "details": { + "name": "Has Key" + }, + "params": [ + { + "typeid": "{7770AD3E-BABE-5F1C-B322-DE5DEAE94974}", + "details": { + "name": "AZStd::vector&" + } + }, + { + "typeid": "{D6597933-47CD-4FC8-B911-63F3E2B0993A}", + "details": { + "name": "AZ::u64" + } + } + ], + "results": [ + { + "typeid": "{A0CA880C-AFE4-43CB-926C-59AC48496112}", + "details": { + "name": "bool" + } + } + ] + }, + { + "base": "Resize", + "context": "{7770AD3E-BABE-5F1C-B322-DE5DEAE94974}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Resize" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Resize is invoked" + }, + "details": { + "name": "Resize" + }, + "params": [ + { + "typeid": "{7770AD3E-BABE-5F1C-B322-DE5DEAE94974}", + "details": { + "name": "AZStd::vector*" + } + }, + { + "typeid": "{D6597933-47CD-4FC8-B911-63F3E2B0993A}", + "details": { + "name": "AZ::u64" + } + } + ] + }, + { + "base": "at", + "context": "{7770AD3E-BABE-5F1C-B322-DE5DEAE94974}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke at" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after at is invoked" + }, + "details": { + "name": "at" + }, + "params": [ + { + "typeid": "{7770AD3E-BABE-5F1C-B322-DE5DEAE94974}", + "details": { + "name": "AZStd::vector*" + } + }, + { + "typeid": "{D6597933-47CD-4FC8-B911-63F3E2B0993A}", + "details": { + "name": "AZ::u64" + } + } + ], + "results": [ + { + "typeid": "{EB603581-4654-4C17-B6DE-AE61E79EDA97}", + "details": { + "name": "AZ::Render::MaterialAssignmentId" + } + } + ] + }, + { + "base": "Back", + "context": "{7770AD3E-BABE-5F1C-B322-DE5DEAE94974}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Back" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Back is invoked" + }, + "details": { + "name": "Back" + }, + "params": [ + { + "typeid": "{7770AD3E-BABE-5F1C-B322-DE5DEAE94974}", + "details": { + "name": "AZStd::vector*" + } + } + ], + "results": [ + { + "typeid": "{EB603581-4654-4C17-B6DE-AE61E79EDA97}", + "details": { + "name": "AZ::Render::MaterialAssignmentId" + } + } + ] + }, + { + "base": "pop_back", + "context": "{7770AD3E-BABE-5F1C-B322-DE5DEAE94974}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke pop_back" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after pop_back is invoked" + }, + "details": { + "name": "pop_back" + }, + "params": [ + { + "typeid": "{7770AD3E-BABE-5F1C-B322-DE5DEAE94974}", + "details": { + "name": "AZStd::vector*" + } + } + ] + }, + { + "base": "size", + "context": "{7770AD3E-BABE-5F1C-B322-DE5DEAE94974}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke size" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after size is invoked" + }, + "details": { + "name": "size" + }, + "params": [ + { + "typeid": "{7770AD3E-BABE-5F1C-B322-DE5DEAE94974}", + "details": { + "name": "AZStd::vector&" + } + } + ], + "results": [ + { + "typeid": "{72039442-EB38-4D42-A1AD-CB68F7E0EEF6}", + "details": { + "name": "int" + } + } + ] + }, + { + "base": "At", + "context": "{7770AD3E-BABE-5F1C-B322-DE5DEAE94974}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke At" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after At is invoked" + }, + "details": { + "name": "At" + }, + "params": [ + { + "typeid": "{7770AD3E-BABE-5F1C-B322-DE5DEAE94974}", + "details": { + "name": "AZStd::vector*" + } + }, + { + "typeid": "{D6597933-47CD-4FC8-B911-63F3E2B0993A}", + "details": { + "name": "AZ::u64" + } + } + ], + "results": [ + { + "typeid": "{EB603581-4654-4C17-B6DE-AE61E79EDA97}", + "details": { + "name": "AZ::Render::MaterialAssignmentId" + } + } + ] + }, + { + "base": "Empty", + "context": "{7770AD3E-BABE-5F1C-B322-DE5DEAE94974}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Empty" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Empty is invoked" + }, + "details": { + "name": "Empty" + }, + "params": [ + { + "typeid": "{7770AD3E-BABE-5F1C-B322-DE5DEAE94974}", + "details": { + "name": "AZStd::vector*" + } + } + ], + "results": [ + { + "typeid": "{A0CA880C-AFE4-43CB-926C-59AC48496112}", + "details": { + "name": "bool" + } + } + ] + }, + { + "base": "Swap", + "context": "{7770AD3E-BABE-5F1C-B322-DE5DEAE94974}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Swap" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Swap is invoked" + }, + "details": { + "name": "Swap" + }, + "params": [ + { + "typeid": "{7770AD3E-BABE-5F1C-B322-DE5DEAE94974}", + "details": { + "name": "AZStd::vector*" + } + }, + { + "typeid": "{7770AD3E-BABE-5F1C-B322-DE5DEAE94974}", + "details": { + "name": "AZStd::vector&" + } + } + ] + }, + { + "base": "push_back", + "context": "{7770AD3E-BABE-5F1C-B322-DE5DEAE94974}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke push_back" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after push_back is invoked" + }, + "details": { + "name": "push_back" + }, + "params": [ + { + "typeid": "{7770AD3E-BABE-5F1C-B322-DE5DEAE94974}", + "details": { + "name": "AZStd::vector*" + } + }, + { + "typeid": "{EB603581-4654-4C17-B6DE-AE61E79EDA97}", + "details": { + "name": "AZ::Render::MaterialAssignmentId" + } + } + ] + }, + { + "base": "PushBack_VM", + "context": "{7770AD3E-BABE-5F1C-B322-DE5DEAE94974}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke PushBack_VM" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after PushBack_VM is invoked" + }, + "details": { + "name": "PushBack_VM" + }, + "params": [ + { + "typeid": "{7770AD3E-BABE-5F1C-B322-DE5DEAE94974}", + "details": { + "name": "AZStd::vector&" + } + }, + { + "typeid": "{EB603581-4654-4C17-B6DE-AE61E79EDA97}", + "details": { + "name": "AZ::Render::MaterialAssignmentId" + } + } + ], + "results": [ + { + "typeid": "{7770AD3E-BABE-5F1C-B322-DE5DEAE94974}", + "details": { + "name": "AZStd::vector&" + } + } + ] + }, + { + "base": "AtUnchecked", + "context": "{7770AD3E-BABE-5F1C-B322-DE5DEAE94974}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke AtUnchecked" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after AtUnchecked is invoked" + }, + "details": { + "name": "AtUnchecked" + }, + "params": [ + { + "typeid": "{7770AD3E-BABE-5F1C-B322-DE5DEAE94974}", + "details": { + "name": "AZStd::vector*" + } + }, + { + "typeid": "{D6597933-47CD-4FC8-B911-63F3E2B0993A}", + "details": { + "name": "AZ::u64" + } + } + ], + "results": [ + { + "typeid": "{EB603581-4654-4C17-B6DE-AE61E79EDA97}", + "details": { + "name": "AZ::Render::MaterialAssignmentId" + } + } + ] + }, + { + "base": "clear", + "context": "{7770AD3E-BABE-5F1C-B322-DE5DEAE94974}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke clear" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after clear is invoked" + }, + "details": { + "name": "clear" + }, + "params": [ + { + "typeid": "{7770AD3E-BABE-5F1C-B322-DE5DEAE94974}", + "details": { + "name": "AZStd::vector*" + } + } + ] + }, + { + "base": "NotEmpty", + "context": "{7770AD3E-BABE-5F1C-B322-DE5DEAE94974}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke NotEmpty" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after NotEmpty is invoked" + }, + "details": { + "name": "NotEmpty" + }, + "params": [ + { + "typeid": "{7770AD3E-BABE-5F1C-B322-DE5DEAE94974}", + "details": { + "name": "AZStd::vector&" + } + } + ], + "results": [ + { + "typeid": "{A0CA880C-AFE4-43CB-926C-59AC48496112}", + "details": { + "name": "bool" + } + } + ] + }, + { + "base": "Erase_VM", + "context": "{7770AD3E-BABE-5F1C-B322-DE5DEAE94974}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Erase_VM" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Erase_VM is invoked" + }, + "details": { + "name": "Erase_VM" + }, + "params": [ + { + "typeid": "{7770AD3E-BABE-5F1C-B322-DE5DEAE94974}", + "details": { + "name": "AZStd::vector&" + } + }, + { + "typeid": "{D6597933-47CD-4FC8-B911-63F3E2B0993A}", + "details": { + "name": "AZ::u64" + } + } + ], + "results": [ + { + "typeid": "{7770AD3E-BABE-5F1C-B322-DE5DEAE94974}", + "details": { + "name": "AZStd::vector&" + } + } + ] + }, + { + "base": "EraseCheck_VM", + "context": "{7770AD3E-BABE-5F1C-B322-DE5DEAE94974}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke EraseCheck_VM" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after EraseCheck_VM is invoked" + }, + "details": { + "name": "EraseCheck_VM" + }, + "params": [ + { + "typeid": "{7770AD3E-BABE-5F1C-B322-DE5DEAE94974}", + "details": { + "name": "AZStd::vector&" + } + }, + { + "typeid": "{D6597933-47CD-4FC8-B911-63F3E2B0993A}", + "details": { + "name": "AZ::u64" + } + } + ], + "results": [ + { + "typeid": "{A0CA880C-AFE4-43CB-926C-59AC48496112}", + "details": { + "name": "bool" + } + } + ] + }, + { + "base": "Capacity", + "context": "{7770AD3E-BABE-5F1C-B322-DE5DEAE94974}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Capacity" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Capacity is invoked" + }, + "details": { + "name": "Capacity" + }, + "params": [ + { + "typeid": "{7770AD3E-BABE-5F1C-B322-DE5DEAE94974}", + "details": { + "name": "AZStd::vector*" + } + } + ], + "results": [ + { + "typeid": "{D6597933-47CD-4FC8-B911-63F3E2B0993A}", + "details": { + "name": "AZ::u64" + } + } + ] + }, + { + "base": "Clear", + "context": "{7770AD3E-BABE-5F1C-B322-DE5DEAE94974}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Clear" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Clear is invoked" + }, + "details": { + "name": "Clear" + }, + "params": [ + { + "typeid": "{7770AD3E-BABE-5F1C-B322-DE5DEAE94974}", + "details": { + "name": "AZStd::vector&" + } + } + ], + "results": [ + { + "typeid": "{7770AD3E-BABE-5F1C-B322-DE5DEAE94974}", + "details": { + "name": "AZStd::vector&" + } + } + ] + }, + { + "base": "AssignAt", + "context": "{7770AD3E-BABE-5F1C-B322-DE5DEAE94974}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke AssignAt" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after AssignAt is invoked" + }, + "details": { + "name": "AssignAt" + }, + "params": [ + { + "typeid": "{7770AD3E-BABE-5F1C-B322-DE5DEAE94974}", + "details": { + "name": "AZStd::vector&" + } + }, + { + "typeid": "{D6597933-47CD-4FC8-B911-63F3E2B0993A}", + "details": { + "name": "AZ::u64" + } + }, + { + "typeid": "{EB603581-4654-4C17-B6DE-AE61E79EDA97}", + "details": { + "name": "AZ::Render::MaterialAssignmentId" + } + } + ] + }, + { + "base": "GetSize", + "context": "{7770AD3E-BABE-5F1C-B322-DE5DEAE94974}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke GetSize" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after GetSize is invoked" + }, + "details": { + "name": "GetSize" + }, + "params": [ + { + "typeid": "{7770AD3E-BABE-5F1C-B322-DE5DEAE94974}", + "details": { + "name": "AZStd::vector&" + } + } + ], + "results": [ + { + "typeid": "{72039442-EB38-4D42-A1AD-CB68F7E0EEF6}", + "details": { + "name": "int" + } + } + ] + }, + { + "base": "Insert", + "context": "{7770AD3E-BABE-5F1C-B322-DE5DEAE94974}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Insert" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Insert is invoked" + }, + "details": { + "name": "Insert" + }, + "params": [ + { + "typeid": "{7770AD3E-BABE-5F1C-B322-DE5DEAE94974}", + "details": { + "name": "AZStd::vector&" + } + }, + { + "typeid": "{D6597933-47CD-4FC8-B911-63F3E2B0993A}", + "details": { + "name": "AZ::u64" + } + }, + { + "typeid": "{EB603581-4654-4C17-B6DE-AE61E79EDA97}", + "details": { + "name": "AZ::Render::MaterialAssignmentId" + } + } + ], + "results": [ + { + "typeid": "{7770AD3E-BABE-5F1C-B322-DE5DEAE94974}", + "details": { + "name": "AZStd::vector&" + } + } + ] + }, + { + "base": "PushBack", + "context": "{7770AD3E-BABE-5F1C-B322-DE5DEAE94974}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke PushBack" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after PushBack is invoked" + }, + "details": { + "name": "PushBack" + }, + "params": [ + { + "typeid": "{7770AD3E-BABE-5F1C-B322-DE5DEAE94974}", + "details": { + "name": "AZStd::vector*" + } + }, + { + "typeid": "{EB603581-4654-4C17-B6DE-AE61E79EDA97}", + "details": { + "name": "AZ::Render::MaterialAssignmentId" + } + } + ] + }, + { + "base": "Reserve", + "context": "{7770AD3E-BABE-5F1C-B322-DE5DEAE94974}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Reserve" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Reserve is invoked" + }, + "details": { + "name": "Reserve" + }, + "params": [ + { + "typeid": "{7770AD3E-BABE-5F1C-B322-DE5DEAE94974}", + "details": { + "name": "AZStd::vector*" + } + }, + { + "typeid": "{D6597933-47CD-4FC8-B911-63F3E2B0993A}", + "details": { + "name": "AZ::u64" + } + } + ] + }, + { + "base": "Iterate_VM", + "context": "{7770AD3E-BABE-5F1C-B322-DE5DEAE94974}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Iterate_VM" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Iterate_VM is invoked" + }, + "details": { + "name": "Iterate_VM" + }, + "params": [ + { + "typeid": "{7770AD3E-BABE-5F1C-B322-DE5DEAE94974}", + "details": { + "name": "AZStd::vector&" + } + } + ], + "results": [ + { + "typeid": "{F13815CB-DBCA-5DF2-B424-B99865E0B78D}", + "details": { + "name": "Iterator_VM>" + } + } + ] + } + ] + }, + { + "base": "{B0D91084-263A-54B9-A4F3-7C5F4240E248}", + "context": "OnDemandReflected", + "variant": "", + "details": { + "name": "optional" + }, + "methods": [ + { + "base": "has_value", + "context": "{B0D91084-263A-54B9-A4F3-7C5F4240E248}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke has_value" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after has_value is invoked" + }, + "details": { + "name": "has_value" + }, + "params": [ + { + "typeid": "{B0D91084-263A-54B9-A4F3-7C5F4240E248}", + "details": { + "name": "AZStd::optional" + } + } + ], + "results": [ + { + "typeid": "{A0CA880C-AFE4-43CB-926C-59AC48496112}", + "details": { + "name": "bool" + } + } + ] + }, + { + "base": "__bool__", + "context": "{B0D91084-263A-54B9-A4F3-7C5F4240E248}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke __bool__" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after __bool__ is invoked" + }, + "details": { + "name": "__bool__" + }, + "params": [ + { + "typeid": "{B0D91084-263A-54B9-A4F3-7C5F4240E248}", + "details": { + "name": "AZStd::optional" + } + } + ], + "results": [ + { + "typeid": "{A0CA880C-AFE4-43CB-926C-59AC48496112}", + "details": { + "name": "bool" + } + } + ] + }, + { + "base": "value", + "context": "{B0D91084-263A-54B9-A4F3-7C5F4240E248}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke value" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after value is invoked" + }, + "details": { + "name": "value" + }, + "params": [ + { + "typeid": "{B0D91084-263A-54B9-A4F3-7C5F4240E248}", + "details": { + "name": "AZStd::optional" + } + } + ], + "results": [ + { + "typeid": "{03AAAB3F-5C47-5A66-9EBC-D5FA4DB353C9}", + "details": { + "name": "AZStd::string" + } + } + ] + }, + { + "base": "value_or", + "context": "{B0D91084-263A-54B9-A4F3-7C5F4240E248}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke value_or" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after value_or is invoked" + }, + "details": { + "name": "value_or" + }, + "params": [ + { + "typeid": "{B0D91084-263A-54B9-A4F3-7C5F4240E248}", + "details": { + "name": "AZStd::optional" + } + }, + { + "typeid": "{03AAAB3F-5C47-5A66-9EBC-D5FA4DB353C9}", + "details": { + "name": "AZStd::string" + } + } + ], + "results": [ + { + "typeid": "{03AAAB3F-5C47-5A66-9EBC-D5FA4DB353C9}", + "details": { + "name": "AZStd::string" + } + } + ] + } + ] + }, + { + "base": "{3A98C3C6-91C4-5B49-8559-1C4C9EA9BCB8}", + "context": "OnDemandReflected", + "variant": "", + "details": { + "name": "Tuple" + }, + "methods": [ + { + "base": "Get0", + "context": "{3A98C3C6-91C4-5B49-8559-1C4C9EA9BCB8}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Get0" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Get0 is invoked" + }, + "details": { + "name": "Get0" + }, + "params": [ + { + "typeid": "{3A98C3C6-91C4-5B49-8559-1C4C9EA9BCB8}", + "details": { + "name": "tuple&" + } + } + ], + "results": [ + { + "typeid": "{3D80F623-C85C-4741-90D0-E4E66164E6BF}", + "details": { + "name": "Vector2" + } + } + ] + }, + { + "base": "Get1", + "context": "{3A98C3C6-91C4-5B49-8559-1C4C9EA9BCB8}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Get1" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Get1 is invoked" + }, + "details": { + "name": "Get1" + }, + "params": [ + { + "typeid": "{3A98C3C6-91C4-5B49-8559-1C4C9EA9BCB8}", + "details": { + "name": "tuple&" + } + } + ], + "results": [ + { + "typeid": "{110C4B14-11A8-4E9D-8638-5051013A56AC}", + "details": { + "name": "double" + } + } + ] + }, + { + "base": "GetSize", + "context": "{3A98C3C6-91C4-5B49-8559-1C4C9EA9BCB8}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke GetSize" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after GetSize is invoked" + }, + "details": { + "name": "GetSize" + }, + "results": [ + { + "typeid": "{D6597933-47CD-4FC8-B911-63F3E2B0993A}", + "details": { + "name": "AZ::u64" + } + } + ] + } + ] + }, + { + "base": "{AE62FC16-F824-5FD2-90BE-1ECF60E08A7F}", + "context": "OnDemandReflected", + "variant": "", + "details": { + "name": "Outcome" + }, + "methods": [ + { + "base": "GetError", + "context": "{AE62FC16-F824-5FD2-90BE-1ECF60E08A7F}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke GetError" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after GetError is invoked" + }, + "details": { + "name": "GetError" + }, + "params": [ + { + "typeid": "{AE62FC16-F824-5FD2-90BE-1ECF60E08A7F}", + "details": { + "name": "Outcome, allocator>>" + } + } + ] + }, + { + "base": "GetValue", + "context": "{AE62FC16-F824-5FD2-90BE-1ECF60E08A7F}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke GetValue" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after GetValue is invoked" + }, + "details": { + "name": "GetValue" + }, + "params": [ + { + "typeid": "{AE62FC16-F824-5FD2-90BE-1ECF60E08A7F}", + "details": { + "name": "Outcome, allocator>>" + } + } + ] + } + ] + }, + { + "base": "{4B687295-2381-5741-AA96-F7441F09267B}", + "context": "OnDemandReflected", + "variant": "", + "details": { + "name": "Outcome, String>" + }, + "methods": [ + { + "base": "GetError", + "context": "{4B687295-2381-5741-AA96-F7441F09267B}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke GetError" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after GetError is invoked" + }, + "details": { + "name": "GetError" + }, + "params": [ + { + "typeid": "{4B687295-2381-5741-AA96-F7441F09267B}", + "details": { + "name": "Outcome, AZStd:" + } + } + ], + "results": [ + { + "typeid": "{03AAAB3F-5C47-5A66-9EBC-D5FA4DB353C9}", + "details": { + "name": "AZStd::string" + } + } + ] + }, + { + "base": "IsSuccess", + "context": "{4B687295-2381-5741-AA96-F7441F09267B}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke IsSuccess" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after IsSuccess is invoked" + }, + "details": { + "name": "IsSuccess" + }, + "params": [ + { + "typeid": "{4B687295-2381-5741-AA96-F7441F09267B}", + "details": { + "name": "Outcome, AZStd:" + } + } + ], + "results": [ + { + "typeid": "{A0CA880C-AFE4-43CB-926C-59AC48496112}", + "details": { + "name": "bool" + } + } + ] + }, + { + "base": "Success", + "context": "{4B687295-2381-5741-AA96-F7441F09267B}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Success" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Success is invoked" + }, + "details": { + "name": "Success" + }, + "params": [ + { + "typeid": "{43147344-44F8-597D-9F8C-B97DFC20C337}", + "details": { + "name": "AZStd::vector" + } + } + ], + "results": [ + { + "typeid": "{4B687295-2381-5741-AA96-F7441F09267B}", + "details": { + "name": "Outcome, AZStd::basic_string, allocator>>" + } + } + ] + }, + { + "base": "GetValue", + "context": "{4B687295-2381-5741-AA96-F7441F09267B}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke GetValue" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after GetValue is invoked" + }, + "details": { + "name": "GetValue" + }, + "params": [ + { + "typeid": "{4B687295-2381-5741-AA96-F7441F09267B}", + "details": { + "name": "Outcome, AZStd:" + } + } + ], + "results": [ + { + "typeid": "{43147344-44F8-597D-9F8C-B97DFC20C337}", + "details": { + "name": "AZStd::vector" + } + } + ] + }, + { + "base": "Failure", + "context": "{4B687295-2381-5741-AA96-F7441F09267B}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Failure" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Failure is invoked" + }, + "details": { + "name": "Failure" + }, + "params": [ + { + "typeid": "{03AAAB3F-5C47-5A66-9EBC-D5FA4DB353C9}", + "details": { + "name": "AZStd::string" + } + } + ], + "results": [ + { + "typeid": "{4B687295-2381-5741-AA96-F7441F09267B}", + "details": { + "name": "Outcome, AZStd::basic_string, allocator>>" + } + } + ] + } + ] + }, + { + "base": "{BCE9535C-B250-56FE-97DF-36D4E06C6172}", + "context": "OnDemandReflected", + "variant": "", + "details": { + "name": "Map", + "category": "Map", + "tooltip": "A collection of Key/Value pairs, where each Key value must be unique." + }, + "methods": [ + { + "base": "contains", + "context": "{BCE9535C-B250-56FE-97DF-36D4E06C6172}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke contains" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after contains is invoked" + }, + "details": { + "name": "contains" + }, + "params": [ + { + "typeid": "{BCE9535C-B250-56FE-97DF-36D4E06C6172}", + "details": { + "name": "AZStd::unordered_map" + } + }, + { + "typeid": "{110C4B14-11A8-4E9D-8638-5051013A56AC}", + "details": { + "name": "double" + } + } + ], + "results": [ + { + "typeid": "{A0CA880C-AFE4-43CB-926C-59AC48496112}", + "details": { + "name": "bool" + } + } + ] + }, + { + "base": "Insert", + "context": "{BCE9535C-B250-56FE-97DF-36D4E06C6172}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Insert" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Insert is invoked" + }, + "details": { + "name": "Insert" + }, + "params": [ + { + "typeid": "{BCE9535C-B250-56FE-97DF-36D4E06C6172}", + "details": { + "name": "AZStd::unordered_map" + } + }, + { + "typeid": "{110C4B14-11A8-4E9D-8638-5051013A56AC}", + "details": { + "name": "double" + } + }, + { + "typeid": "{15A4332F-7C3F-4A58-AC35-50E1CE53FB9C}", + "details": { + "name": "Matrix3x3" + } + } + ], + "results": [ + { + "typeid": "{BCE9535C-B250-56FE-97DF-36D4E06C6172}", + "details": { + "name": "AZStd::unordered_map" + } + } + ] + }, + { + "base": "Reserve", + "context": "{BCE9535C-B250-56FE-97DF-36D4E06C6172}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Reserve" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Reserve is invoked" + }, + "details": { + "name": "Reserve" + }, + "params": [ + { + "typeid": "{BCE9535C-B250-56FE-97DF-36D4E06C6172}", + "details": { + "name": "AZStd::unordered_map" + } + }, + { + "typeid": "{D6597933-47CD-4FC8-B911-63F3E2B0993A}", + "details": { + "name": "AZ::u64" + } + } + ] + }, + { + "base": "GetSize", + "context": "{BCE9535C-B250-56FE-97DF-36D4E06C6172}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke GetSize" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after GetSize is invoked" + }, + "details": { + "name": "GetSize" + }, + "params": [ + { + "typeid": "{BCE9535C-B250-56FE-97DF-36D4E06C6172}", + "details": { + "name": "AZStd::unordered_map" + } + } + ], + "results": [ + { + "typeid": "{72039442-EB38-4D42-A1AD-CB68F7E0EEF6}", + "details": { + "name": "int" + } + } + ] + }, + { + "base": "Iterate_VM", + "context": "{BCE9535C-B250-56FE-97DF-36D4E06C6172}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Iterate_VM" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Iterate_VM is invoked" + }, + "details": { + "name": "Iterate_VM" + }, + "params": [ + { + "typeid": "{BCE9535C-B250-56FE-97DF-36D4E06C6172}", + "details": { + "name": "AZStd::unordered_map" + } + } + ], + "results": [ + { + "typeid": "{EBF35E25-DA5E-5E26-81D3-69A0F2D57C44}", + "details": { + "name": "Iterator_VM, AZStd::equal_to, allocator>>" + } + } + ] + }, + { + "base": "GetKeys", + "context": "{BCE9535C-B250-56FE-97DF-36D4E06C6172}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke GetKeys" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after GetKeys is invoked" + }, + "details": { + "name": "GetKeys" + }, + "params": [ + { + "typeid": "{BCE9535C-B250-56FE-97DF-36D4E06C6172}", + "details": { + "name": "AZStd::unordered_map" + } + } + ], + "results": [ + { + "typeid": "{F31F64EA-E384-5536-ACD6-8F01849730FC}", + "details": { + "name": "AZStd::vector" + } + } + ] + }, + { + "base": "Size", + "context": "{BCE9535C-B250-56FE-97DF-36D4E06C6172}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Size" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Size is invoked" + }, + "details": { + "name": "Size" + }, + "params": [ + { + "typeid": "{BCE9535C-B250-56FE-97DF-36D4E06C6172}", + "details": { + "name": "AZStd::unordered_map" + } + } + ], + "results": [ + { + "typeid": "{72039442-EB38-4D42-A1AD-CB68F7E0EEF6}", + "details": { + "name": "int" + } + } + ] + }, + { + "base": "Erase", + "context": "{BCE9535C-B250-56FE-97DF-36D4E06C6172}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Erase" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Erase is invoked" + }, + "details": { + "name": "Erase" + }, + "params": [ + { + "typeid": "{BCE9535C-B250-56FE-97DF-36D4E06C6172}", + "details": { + "name": "AZStd::unordered_map" + } + }, + { + "typeid": "{110C4B14-11A8-4E9D-8638-5051013A56AC}", + "details": { + "name": "double" + } + } + ], + "results": [ + { + "typeid": "{BCE9535C-B250-56FE-97DF-36D4E06C6172}", + "details": { + "name": "AZStd::unordered_map" + } + } + ] + }, + { + "base": "EraseCheck_VM", + "context": "{BCE9535C-B250-56FE-97DF-36D4E06C6172}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke EraseCheck_VM" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after EraseCheck_VM is invoked" + }, + "details": { + "name": "EraseCheck_VM" + }, + "params": [ + { + "typeid": "{BCE9535C-B250-56FE-97DF-36D4E06C6172}", + "details": { + "name": "AZStd::unordered_map" + } + }, + { + "typeid": "{110C4B14-11A8-4E9D-8638-5051013A56AC}", + "details": { + "name": "double" + } + } + ], + "results": [ + { + "typeid": "{A0CA880C-AFE4-43CB-926C-59AC48496112}", + "details": { + "name": "bool" + } + } + ] + }, + { + "base": "Clear", + "context": "{BCE9535C-B250-56FE-97DF-36D4E06C6172}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Clear" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Clear is invoked" + }, + "details": { + "name": "Clear" + }, + "params": [ + { + "typeid": "{BCE9535C-B250-56FE-97DF-36D4E06C6172}", + "details": { + "name": "AZStd::unordered_map" + } + } + ], + "results": [ + { + "typeid": "{BCE9535C-B250-56FE-97DF-36D4E06C6172}", + "details": { + "name": "AZStd::unordered_map" + } + } + ] + }, + { + "base": "At", + "context": "{BCE9535C-B250-56FE-97DF-36D4E06C6172}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke At" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after At is invoked" + }, + "details": { + "name": "At" + }, + "params": [ + { + "typeid": "{BCE9535C-B250-56FE-97DF-36D4E06C6172}", + "details": { + "name": "AZStd::unordered_map" + } + }, + { + "typeid": "{110C4B14-11A8-4E9D-8638-5051013A56AC}", + "details": { + "name": "double" + } + } + ], + "results": [ + { + "typeid": "{15A4332F-7C3F-4A58-AC35-50E1CE53FB9C}", + "details": { + "name": "Matrix3x3" + } + } + ] + }, + { + "base": "BucketCount", + "context": "{BCE9535C-B250-56FE-97DF-36D4E06C6172}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke BucketCount" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after BucketCount is invoked" + }, + "details": { + "name": "BucketCount" + }, + "params": [ + { + "typeid": "{BCE9535C-B250-56FE-97DF-36D4E06C6172}", + "details": { + "name": "AZStd::unordered_map" + } + } + ], + "results": [ + { + "typeid": "{D6597933-47CD-4FC8-B911-63F3E2B0993A}", + "details": { + "name": "AZ::u64" + } + } + ] + }, + { + "base": "Empty", + "context": "{BCE9535C-B250-56FE-97DF-36D4E06C6172}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Empty" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Empty is invoked" + }, + "details": { + "name": "Empty" + }, + "params": [ + { + "typeid": "{BCE9535C-B250-56FE-97DF-36D4E06C6172}", + "details": { + "name": "AZStd::unordered_map" + } + } + ], + "results": [ + { + "typeid": "{A0CA880C-AFE4-43CB-926C-59AC48496112}", + "details": { + "name": "bool" + } + } + ] + }, + { + "base": "Swap", + "context": "{BCE9535C-B250-56FE-97DF-36D4E06C6172}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Swap" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Swap is invoked" + }, + "details": { + "name": "Swap" + }, + "params": [ + { + "typeid": "{BCE9535C-B250-56FE-97DF-36D4E06C6172}", + "details": { + "name": "AZStd::unordered_map" + } + }, + { + "typeid": "{BCE9535C-B250-56FE-97DF-36D4E06C6172}", + "details": { + "name": "AZStd::unordered_map" + } + } + ] + } + ] + }, + { + "base": "{401CAC93-74F8-5025-81EF-63F124BC87AF}", + "context": "OnDemandReflected", + "variant": "", + "details": { + "name": "Map", + "category": "Map", + "tooltip": "A collection of Key/Value pairs, where each Key value must be unique." + }, + "methods": [ + { + "base": "contains", + "context": "{401CAC93-74F8-5025-81EF-63F124BC87AF}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke contains" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after contains is invoked" + }, + "details": { + "name": "contains" + }, + "params": [ + { + "typeid": "{401CAC93-74F8-5025-81EF-63F124BC87AF}", + "details": { + "name": "AZStd::unordered_map" + } + }, + { + "typeid": "{9F4E062E-06A0-46D4-85DF-E0DA96467D3A}", + "details": { + "name": "Crc32" + } + } + ], + "results": [ + { + "typeid": "{A0CA880C-AFE4-43CB-926C-59AC48496112}", + "details": { + "name": "bool" + } + } + ] + }, + { + "base": "Insert", + "context": "{401CAC93-74F8-5025-81EF-63F124BC87AF}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Insert" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Insert is invoked" + }, + "details": { + "name": "Insert" + }, + "params": [ + { + "typeid": "{401CAC93-74F8-5025-81EF-63F124BC87AF}", + "details": { + "name": "AZStd::unordered_map" + } + }, + { + "typeid": "{9F4E062E-06A0-46D4-85DF-E0DA96467D3A}", + "details": { + "name": "Crc32" + } + }, + { + "typeid": "{A54C2B36-D5B8-46A1-A529-4EBDBD2450E7}", + "details": { + "name": "Aabb" + } + } + ], + "results": [ + { + "typeid": "{401CAC93-74F8-5025-81EF-63F124BC87AF}", + "details": { + "name": "AZStd::unordered_map" + } + } + ] + }, + { + "base": "Reserve", + "context": "{401CAC93-74F8-5025-81EF-63F124BC87AF}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Reserve" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Reserve is invoked" + }, + "details": { + "name": "Reserve" + }, + "params": [ + { + "typeid": "{401CAC93-74F8-5025-81EF-63F124BC87AF}", + "details": { + "name": "AZStd::unordered_map" + } + }, + { + "typeid": "{D6597933-47CD-4FC8-B911-63F3E2B0993A}", + "details": { + "name": "AZ::u64" + } + } + ] + }, + { + "base": "GetSize", + "context": "{401CAC93-74F8-5025-81EF-63F124BC87AF}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke GetSize" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after GetSize is invoked" + }, + "details": { + "name": "GetSize" + }, + "params": [ + { + "typeid": "{401CAC93-74F8-5025-81EF-63F124BC87AF}", + "details": { + "name": "AZStd::unordered_map" + } + } + ], + "results": [ + { + "typeid": "{72039442-EB38-4D42-A1AD-CB68F7E0EEF6}", + "details": { + "name": "int" + } + } + ] + }, + { + "base": "Iterate_VM", + "context": "{401CAC93-74F8-5025-81EF-63F124BC87AF}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Iterate_VM" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Iterate_VM is invoked" + }, + "details": { + "name": "Iterate_VM" + }, + "params": [ + { + "typeid": "{401CAC93-74F8-5025-81EF-63F124BC87AF}", + "details": { + "name": "AZStd::unordered_map" + } + } + ], + "results": [ + { + "typeid": "{EFDC4015-9AB5-5E3E-8976-D75019A8E385}", + "details": { + "name": "Iterator_VM, AZStd::equal_to, allocator>>" + } + } + ] + }, + { + "base": "GetKeys", + "context": "{401CAC93-74F8-5025-81EF-63F124BC87AF}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke GetKeys" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after GetKeys is invoked" + }, + "details": { + "name": "GetKeys" + }, + "params": [ + { + "typeid": "{401CAC93-74F8-5025-81EF-63F124BC87AF}", + "details": { + "name": "AZStd::unordered_map" + } + } + ], + "results": [ + { + "typeid": "{287CEE87-6FF3-52FC-9D32-38255E2C7FE9}", + "details": { + "name": "AZStd::vector" + } + } + ] + }, + { + "base": "Size", + "context": "{401CAC93-74F8-5025-81EF-63F124BC87AF}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Size" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Size is invoked" + }, + "details": { + "name": "Size" + }, + "params": [ + { + "typeid": "{401CAC93-74F8-5025-81EF-63F124BC87AF}", + "details": { + "name": "AZStd::unordered_map" + } + } + ], + "results": [ + { + "typeid": "{72039442-EB38-4D42-A1AD-CB68F7E0EEF6}", + "details": { + "name": "int" + } + } + ] + }, + { + "base": "Erase", + "context": "{401CAC93-74F8-5025-81EF-63F124BC87AF}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Erase" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Erase is invoked" + }, + "details": { + "name": "Erase" + }, + "params": [ + { + "typeid": "{401CAC93-74F8-5025-81EF-63F124BC87AF}", + "details": { + "name": "AZStd::unordered_map" + } + }, + { + "typeid": "{9F4E062E-06A0-46D4-85DF-E0DA96467D3A}", + "details": { + "name": "Crc32" + } + } + ], + "results": [ + { + "typeid": "{401CAC93-74F8-5025-81EF-63F124BC87AF}", + "details": { + "name": "AZStd::unordered_map" + } + } + ] + }, + { + "base": "EraseCheck_VM", + "context": "{401CAC93-74F8-5025-81EF-63F124BC87AF}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke EraseCheck_VM" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after EraseCheck_VM is invoked" + }, + "details": { + "name": "EraseCheck_VM" + }, + "params": [ + { + "typeid": "{401CAC93-74F8-5025-81EF-63F124BC87AF}", + "details": { + "name": "AZStd::unordered_map" + } + }, + { + "typeid": "{9F4E062E-06A0-46D4-85DF-E0DA96467D3A}", + "details": { + "name": "Crc32" + } + } + ], + "results": [ + { + "typeid": "{A0CA880C-AFE4-43CB-926C-59AC48496112}", + "details": { + "name": "bool" + } + } + ] + }, + { + "base": "Clear", + "context": "{401CAC93-74F8-5025-81EF-63F124BC87AF}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Clear" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Clear is invoked" + }, + "details": { + "name": "Clear" + }, + "params": [ + { + "typeid": "{401CAC93-74F8-5025-81EF-63F124BC87AF}", + "details": { + "name": "AZStd::unordered_map" + } + } + ], + "results": [ + { + "typeid": "{401CAC93-74F8-5025-81EF-63F124BC87AF}", + "details": { + "name": "AZStd::unordered_map" + } + } + ] + }, + { + "base": "At", + "context": "{401CAC93-74F8-5025-81EF-63F124BC87AF}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke At" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after At is invoked" + }, + "details": { + "name": "At" + }, + "params": [ + { + "typeid": "{401CAC93-74F8-5025-81EF-63F124BC87AF}", + "details": { + "name": "AZStd::unordered_map" + } + }, + { + "typeid": "{9F4E062E-06A0-46D4-85DF-E0DA96467D3A}", + "details": { + "name": "Crc32" + } + } + ], + "results": [ + { + "typeid": "{A54C2B36-D5B8-46A1-A529-4EBDBD2450E7}", + "details": { + "name": "Aabb" + } + } + ] + }, + { + "base": "BucketCount", + "context": "{401CAC93-74F8-5025-81EF-63F124BC87AF}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke BucketCount" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after BucketCount is invoked" + }, + "details": { + "name": "BucketCount" + }, + "params": [ + { + "typeid": "{401CAC93-74F8-5025-81EF-63F124BC87AF}", + "details": { + "name": "AZStd::unordered_map" + } + } + ], + "results": [ + { + "typeid": "{D6597933-47CD-4FC8-B911-63F3E2B0993A}", + "details": { + "name": "AZ::u64" + } + } + ] + }, + { + "base": "Empty", + "context": "{401CAC93-74F8-5025-81EF-63F124BC87AF}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Empty" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Empty is invoked" + }, + "details": { + "name": "Empty" + }, + "params": [ + { + "typeid": "{401CAC93-74F8-5025-81EF-63F124BC87AF}", + "details": { + "name": "AZStd::unordered_map" + } + } + ], + "results": [ + { + "typeid": "{A0CA880C-AFE4-43CB-926C-59AC48496112}", + "details": { + "name": "bool" + } + } + ] + }, + { + "base": "Swap", + "context": "{401CAC93-74F8-5025-81EF-63F124BC87AF}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Swap" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Swap is invoked" + }, + "details": { + "name": "Swap" + }, + "params": [ + { + "typeid": "{401CAC93-74F8-5025-81EF-63F124BC87AF}", + "details": { + "name": "AZStd::unordered_map" + } + }, + { + "typeid": "{401CAC93-74F8-5025-81EF-63F124BC87AF}", + "details": { + "name": "AZStd::unordered_map" + } + } + ] + } + ] + }, + { + "base": "{16DCF0FE-97AD-54FE-8796-74CE2156240B}", + "context": "OnDemandReflected", + "variant": "", + "details": { + "name": "Array", + "category": "Array", + "tooltip": "A dynamically sized container of elements." + }, + "methods": [ + { + "base": "Size", + "context": "{16DCF0FE-97AD-54FE-8796-74CE2156240B}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Size" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Size is invoked" + }, + "details": { + "name": "Size" + }, + "params": [ + { + "typeid": "{16DCF0FE-97AD-54FE-8796-74CE2156240B}", + "details": { + "name": "AZStd::vector" + } + } + ], + "results": [ + { + "typeid": "{72039442-EB38-4D42-A1AD-CB68F7E0EEF6}", + "details": { + "name": "int" + } + } + ] + }, + { + "base": "Front", + "context": "{16DCF0FE-97AD-54FE-8796-74CE2156240B}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Front" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Front is invoked" + }, + "details": { + "name": "Front" + }, + "params": [ + { + "typeid": "{16DCF0FE-97AD-54FE-8796-74CE2156240B}", + "details": { + "name": "AZStd::vector" + } + } + ], + "results": [ + { + "typeid": "{0CE9FA36-1E3A-4C06-9254-B7C73A732053}", + "details": { + "name": "Vector4" + } + } + ] + }, + { + "base": "HasKey", + "context": "{16DCF0FE-97AD-54FE-8796-74CE2156240B}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Has Key" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Has Key is invoked" + }, + "details": { + "name": "Has Key" + }, + "params": [ + { + "typeid": "{16DCF0FE-97AD-54FE-8796-74CE2156240B}", + "details": { + "name": "AZStd::vector" + } + }, + { + "typeid": "{D6597933-47CD-4FC8-B911-63F3E2B0993A}", + "details": { + "name": "AZ::u64" + } + } + ], + "results": [ + { + "typeid": "{A0CA880C-AFE4-43CB-926C-59AC48496112}", + "details": { + "name": "bool" + } + } + ] + }, + { + "base": "Resize", + "context": "{16DCF0FE-97AD-54FE-8796-74CE2156240B}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Resize" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Resize is invoked" + }, + "details": { + "name": "Resize" + }, + "params": [ + { + "typeid": "{16DCF0FE-97AD-54FE-8796-74CE2156240B}", + "details": { + "name": "AZStd::vector" + } + }, + { + "typeid": "{D6597933-47CD-4FC8-B911-63F3E2B0993A}", + "details": { + "name": "AZ::u64" + } + } + ] + }, + { + "base": "at", + "context": "{16DCF0FE-97AD-54FE-8796-74CE2156240B}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke at" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after at is invoked" + }, + "details": { + "name": "at" + }, + "params": [ + { + "typeid": "{16DCF0FE-97AD-54FE-8796-74CE2156240B}", + "details": { + "name": "AZStd::vector" + } + }, + { + "typeid": "{D6597933-47CD-4FC8-B911-63F3E2B0993A}", + "details": { + "name": "AZ::u64" + } + } + ], + "results": [ + { + "typeid": "{0CE9FA36-1E3A-4C06-9254-B7C73A732053}", + "details": { + "name": "Vector4" + } + } + ] + }, + { + "base": "Back", + "context": "{16DCF0FE-97AD-54FE-8796-74CE2156240B}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Back" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Back is invoked" + }, + "details": { + "name": "Back" + }, + "params": [ + { + "typeid": "{16DCF0FE-97AD-54FE-8796-74CE2156240B}", + "details": { + "name": "AZStd::vector" + } + } + ], + "results": [ + { + "typeid": "{0CE9FA36-1E3A-4C06-9254-B7C73A732053}", + "details": { + "name": "Vector4" + } + } + ] + }, + { + "base": "pop_back", + "context": "{16DCF0FE-97AD-54FE-8796-74CE2156240B}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke pop_back" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after pop_back is invoked" + }, + "details": { + "name": "pop_back" + }, + "params": [ + { + "typeid": "{16DCF0FE-97AD-54FE-8796-74CE2156240B}", + "details": { + "name": "AZStd::vector" + } + } + ] + }, + { + "base": "size", + "context": "{16DCF0FE-97AD-54FE-8796-74CE2156240B}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke size" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after size is invoked" + }, + "details": { + "name": "size" + }, + "params": [ + { + "typeid": "{16DCF0FE-97AD-54FE-8796-74CE2156240B}", + "details": { + "name": "AZStd::vector" + } + } + ], + "results": [ + { + "typeid": "{72039442-EB38-4D42-A1AD-CB68F7E0EEF6}", + "details": { + "name": "int" + } + } + ] + }, + { + "base": "At", + "context": "{16DCF0FE-97AD-54FE-8796-74CE2156240B}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke At" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after At is invoked" + }, + "details": { + "name": "At" + }, + "params": [ + { + "typeid": "{16DCF0FE-97AD-54FE-8796-74CE2156240B}", + "details": { + "name": "AZStd::vector" + } + }, + { + "typeid": "{D6597933-47CD-4FC8-B911-63F3E2B0993A}", + "details": { + "name": "AZ::u64" + } + } + ], + "results": [ + { + "typeid": "{0CE9FA36-1E3A-4C06-9254-B7C73A732053}", + "details": { + "name": "Vector4" + } + } + ] + }, + { + "base": "Empty", + "context": "{16DCF0FE-97AD-54FE-8796-74CE2156240B}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Empty" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Empty is invoked" + }, + "details": { + "name": "Empty" + }, + "params": [ + { + "typeid": "{16DCF0FE-97AD-54FE-8796-74CE2156240B}", + "details": { + "name": "AZStd::vector" + } + } + ], + "results": [ + { + "typeid": "{A0CA880C-AFE4-43CB-926C-59AC48496112}", + "details": { + "name": "bool" + } + } + ] + }, + { + "base": "Swap", + "context": "{16DCF0FE-97AD-54FE-8796-74CE2156240B}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Swap" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Swap is invoked" + }, + "details": { + "name": "Swap" + }, + "params": [ + { + "typeid": "{16DCF0FE-97AD-54FE-8796-74CE2156240B}", + "details": { + "name": "AZStd::vector" + } + }, + { + "typeid": "{16DCF0FE-97AD-54FE-8796-74CE2156240B}", + "details": { + "name": "AZStd::vector" + } + } + ] + }, + { + "base": "push_back", + "context": "{16DCF0FE-97AD-54FE-8796-74CE2156240B}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke push_back" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after push_back is invoked" + }, + "details": { + "name": "push_back" + }, + "params": [ + { + "typeid": "{16DCF0FE-97AD-54FE-8796-74CE2156240B}", + "details": { + "name": "AZStd::vector" + } + }, + { + "typeid": "{0CE9FA36-1E3A-4C06-9254-B7C73A732053}", + "details": { + "name": "Vector4" + } + } + ] + }, + { + "base": "PushBack_VM", + "context": "{16DCF0FE-97AD-54FE-8796-74CE2156240B}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke PushBack_VM" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after PushBack_VM is invoked" + }, + "details": { + "name": "PushBack_VM" + }, + "params": [ + { + "typeid": "{16DCF0FE-97AD-54FE-8796-74CE2156240B}", + "details": { + "name": "AZStd::vector" + } + }, + { + "typeid": "{0CE9FA36-1E3A-4C06-9254-B7C73A732053}", + "details": { + "name": "Vector4" + } + } + ], + "results": [ + { + "typeid": "{16DCF0FE-97AD-54FE-8796-74CE2156240B}", + "details": { + "name": "AZStd::vector" + } + } + ] + }, + { + "base": "AtUnchecked", + "context": "{16DCF0FE-97AD-54FE-8796-74CE2156240B}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke AtUnchecked" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after AtUnchecked is invoked" + }, + "details": { + "name": "AtUnchecked" + }, + "params": [ + { + "typeid": "{16DCF0FE-97AD-54FE-8796-74CE2156240B}", + "details": { + "name": "AZStd::vector" + } + }, + { + "typeid": "{D6597933-47CD-4FC8-B911-63F3E2B0993A}", + "details": { + "name": "AZ::u64" + } + } + ], + "results": [ + { + "typeid": "{0CE9FA36-1E3A-4C06-9254-B7C73A732053}", + "details": { + "name": "Vector4" + } + } + ] + }, + { + "base": "clear", + "context": "{16DCF0FE-97AD-54FE-8796-74CE2156240B}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke clear" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after clear is invoked" + }, + "details": { + "name": "clear" + }, + "params": [ + { + "typeid": "{16DCF0FE-97AD-54FE-8796-74CE2156240B}", + "details": { + "name": "AZStd::vector" + } + } + ] + }, + { + "base": "NotEmpty", + "context": "{16DCF0FE-97AD-54FE-8796-74CE2156240B}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke NotEmpty" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after NotEmpty is invoked" + }, + "details": { + "name": "NotEmpty" + }, + "params": [ + { + "typeid": "{16DCF0FE-97AD-54FE-8796-74CE2156240B}", + "details": { + "name": "AZStd::vector" + } + } + ], + "results": [ + { + "typeid": "{A0CA880C-AFE4-43CB-926C-59AC48496112}", + "details": { + "name": "bool" + } + } + ] + }, + { + "base": "Erase_VM", + "context": "{16DCF0FE-97AD-54FE-8796-74CE2156240B}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Erase_VM" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Erase_VM is invoked" + }, + "details": { + "name": "Erase_VM" + }, + "params": [ + { + "typeid": "{16DCF0FE-97AD-54FE-8796-74CE2156240B}", + "details": { + "name": "AZStd::vector" + } + }, + { + "typeid": "{D6597933-47CD-4FC8-B911-63F3E2B0993A}", + "details": { + "name": "AZ::u64" + } + } + ], + "results": [ + { + "typeid": "{16DCF0FE-97AD-54FE-8796-74CE2156240B}", + "details": { + "name": "AZStd::vector" + } + } + ] + }, + { + "base": "EraseCheck_VM", + "context": "{16DCF0FE-97AD-54FE-8796-74CE2156240B}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke EraseCheck_VM" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after EraseCheck_VM is invoked" + }, + "details": { + "name": "EraseCheck_VM" + }, + "params": [ + { + "typeid": "{16DCF0FE-97AD-54FE-8796-74CE2156240B}", + "details": { + "name": "AZStd::vector" + } + }, + { + "typeid": "{D6597933-47CD-4FC8-B911-63F3E2B0993A}", + "details": { + "name": "AZ::u64" + } + } + ], + "results": [ + { + "typeid": "{A0CA880C-AFE4-43CB-926C-59AC48496112}", + "details": { + "name": "bool" + } + } + ] + }, + { + "base": "Capacity", + "context": "{16DCF0FE-97AD-54FE-8796-74CE2156240B}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Capacity" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Capacity is invoked" + }, + "details": { + "name": "Capacity" + }, + "params": [ + { + "typeid": "{16DCF0FE-97AD-54FE-8796-74CE2156240B}", + "details": { + "name": "AZStd::vector" + } + } + ], + "results": [ + { + "typeid": "{D6597933-47CD-4FC8-B911-63F3E2B0993A}", + "details": { + "name": "AZ::u64" + } + } + ] + }, + { + "base": "Clear", + "context": "{16DCF0FE-97AD-54FE-8796-74CE2156240B}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Clear" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Clear is invoked" + }, + "details": { + "name": "Clear" + }, + "params": [ + { + "typeid": "{16DCF0FE-97AD-54FE-8796-74CE2156240B}", + "details": { + "name": "AZStd::vector" + } + } + ], + "results": [ + { + "typeid": "{16DCF0FE-97AD-54FE-8796-74CE2156240B}", + "details": { + "name": "AZStd::vector" + } + } + ] + }, + { + "base": "AssignAt", + "context": "{16DCF0FE-97AD-54FE-8796-74CE2156240B}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke AssignAt" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after AssignAt is invoked" + }, + "details": { + "name": "AssignAt" + }, + "params": [ + { + "typeid": "{16DCF0FE-97AD-54FE-8796-74CE2156240B}", + "details": { + "name": "AZStd::vector" + } + }, + { + "typeid": "{D6597933-47CD-4FC8-B911-63F3E2B0993A}", + "details": { + "name": "AZ::u64" + } + }, + { + "typeid": "{0CE9FA36-1E3A-4C06-9254-B7C73A732053}", + "details": { + "name": "Vector4" + } + } + ] + }, + { + "base": "GetSize", + "context": "{16DCF0FE-97AD-54FE-8796-74CE2156240B}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke GetSize" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after GetSize is invoked" + }, + "details": { + "name": "GetSize" + }, + "params": [ + { + "typeid": "{16DCF0FE-97AD-54FE-8796-74CE2156240B}", + "details": { + "name": "AZStd::vector" + } + } + ], + "results": [ + { + "typeid": "{72039442-EB38-4D42-A1AD-CB68F7E0EEF6}", + "details": { + "name": "int" + } + } + ] + }, + { + "base": "Insert", + "context": "{16DCF0FE-97AD-54FE-8796-74CE2156240B}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Insert" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Insert is invoked" + }, + "details": { + "name": "Insert" + }, + "params": [ + { + "typeid": "{16DCF0FE-97AD-54FE-8796-74CE2156240B}", + "details": { + "name": "AZStd::vector" + } + }, + { + "typeid": "{D6597933-47CD-4FC8-B911-63F3E2B0993A}", + "details": { + "name": "AZ::u64" + } + }, + { + "typeid": "{0CE9FA36-1E3A-4C06-9254-B7C73A732053}", + "details": { + "name": "Vector4" + } + } + ], + "results": [ + { + "typeid": "{16DCF0FE-97AD-54FE-8796-74CE2156240B}", + "details": { + "name": "AZStd::vector" + } + } + ] + }, + { + "base": "PushBack", + "context": "{16DCF0FE-97AD-54FE-8796-74CE2156240B}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke PushBack" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after PushBack is invoked" + }, + "details": { + "name": "PushBack" + }, + "params": [ + { + "typeid": "{16DCF0FE-97AD-54FE-8796-74CE2156240B}", + "details": { + "name": "AZStd::vector" + } + }, + { + "typeid": "{0CE9FA36-1E3A-4C06-9254-B7C73A732053}", + "details": { + "name": "Vector4" + } + } + ] + }, + { + "base": "Reserve", + "context": "{16DCF0FE-97AD-54FE-8796-74CE2156240B}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Reserve" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Reserve is invoked" + }, + "details": { + "name": "Reserve" + }, + "params": [ + { + "typeid": "{16DCF0FE-97AD-54FE-8796-74CE2156240B}", + "details": { + "name": "AZStd::vector" + } + }, + { + "typeid": "{D6597933-47CD-4FC8-B911-63F3E2B0993A}", + "details": { + "name": "AZ::u64" + } + } + ] + }, + { + "base": "Iterate_VM", + "context": "{16DCF0FE-97AD-54FE-8796-74CE2156240B}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Iterate_VM" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Iterate_VM is invoked" + }, + "details": { + "name": "Iterate_VM" + }, + "params": [ + { + "typeid": "{16DCF0FE-97AD-54FE-8796-74CE2156240B}", + "details": { + "name": "AZStd::vector" + } + } + ], + "results": [ + { + "typeid": "{8F6B8AB1-3007-5606-A92E-7B22B2A25F55}", + "details": { + "name": "Iterator_VM>" + } + } + ] + } + ] + }, + { + "base": "{4841CFF0-7A5C-519C-BD16-D3625E99605E}", + "context": "OnDemandReflected", + "variant": "", + "details": { + "name": "Array", + "category": "Array", + "tooltip": "A dynamically sized container of elements." + }, + "methods": [ + { + "base": "Size", + "context": "{4841CFF0-7A5C-519C-BD16-D3625E99605E}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Size" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Size is invoked" + }, + "details": { + "name": "Size" + }, + "params": [ + { + "typeid": "{4841CFF0-7A5C-519C-BD16-D3625E99605E}", + "details": { + "name": "AZStd::vector" + } + } + ], + "results": [ + { + "typeid": "{72039442-EB38-4D42-A1AD-CB68F7E0EEF6}", + "details": { + "name": "int" + } + } + ] + }, + { + "base": "Front", + "context": "{4841CFF0-7A5C-519C-BD16-D3625E99605E}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Front" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Front is invoked" + }, + "details": { + "name": "Front" + }, + "params": [ + { + "typeid": "{4841CFF0-7A5C-519C-BD16-D3625E99605E}", + "details": { + "name": "AZStd::vector" + } + } + ], + "results": [ + { + "typeid": "{6383F1D3-BB27-4E6B-A49A-6409B2059EAA}", + "details": { + "name": "EntityId", + "tooltip": "Entity Unique Id" + } + } + ] + }, + { + "base": "HasKey", + "context": "{4841CFF0-7A5C-519C-BD16-D3625E99605E}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Has Key" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Has Key is invoked" + }, + "details": { + "name": "Has Key" + }, + "params": [ + { + "typeid": "{4841CFF0-7A5C-519C-BD16-D3625E99605E}", + "details": { + "name": "AZStd::vector" + } + }, + { + "typeid": "{D6597933-47CD-4FC8-B911-63F3E2B0993A}", + "details": { + "name": "AZ::u64" + } + } + ], + "results": [ + { + "typeid": "{A0CA880C-AFE4-43CB-926C-59AC48496112}", + "details": { + "name": "bool" + } + } + ] + }, + { + "base": "Resize", + "context": "{4841CFF0-7A5C-519C-BD16-D3625E99605E}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Resize" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Resize is invoked" + }, + "details": { + "name": "Resize" + }, + "params": [ + { + "typeid": "{4841CFF0-7A5C-519C-BD16-D3625E99605E}", + "details": { + "name": "AZStd::vector" + } + }, + { + "typeid": "{D6597933-47CD-4FC8-B911-63F3E2B0993A}", + "details": { + "name": "AZ::u64" + } + } + ] + }, + { + "base": "at", + "context": "{4841CFF0-7A5C-519C-BD16-D3625E99605E}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke at" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after at is invoked" + }, + "details": { + "name": "at" + }, + "params": [ + { + "typeid": "{4841CFF0-7A5C-519C-BD16-D3625E99605E}", + "details": { + "name": "AZStd::vector" + } + }, + { + "typeid": "{D6597933-47CD-4FC8-B911-63F3E2B0993A}", + "details": { + "name": "AZ::u64" + } + } + ], + "results": [ + { + "typeid": "{6383F1D3-BB27-4E6B-A49A-6409B2059EAA}", + "details": { + "name": "EntityId", + "tooltip": "Entity Unique Id" + } + } + ] + }, + { + "base": "Back", + "context": "{4841CFF0-7A5C-519C-BD16-D3625E99605E}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Back" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Back is invoked" + }, + "details": { + "name": "Back" + }, + "params": [ + { + "typeid": "{4841CFF0-7A5C-519C-BD16-D3625E99605E}", + "details": { + "name": "AZStd::vector" + } + } + ], + "results": [ + { + "typeid": "{6383F1D3-BB27-4E6B-A49A-6409B2059EAA}", + "details": { + "name": "EntityId", + "tooltip": "Entity Unique Id" + } + } + ] + }, + { + "base": "pop_back", + "context": "{4841CFF0-7A5C-519C-BD16-D3625E99605E}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke pop_back" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after pop_back is invoked" + }, + "details": { + "name": "pop_back" + }, + "params": [ + { + "typeid": "{4841CFF0-7A5C-519C-BD16-D3625E99605E}", + "details": { + "name": "AZStd::vector" + } + } + ] + }, + { + "base": "size", + "context": "{4841CFF0-7A5C-519C-BD16-D3625E99605E}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke size" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after size is invoked" + }, + "details": { + "name": "size" + }, + "params": [ + { + "typeid": "{4841CFF0-7A5C-519C-BD16-D3625E99605E}", + "details": { + "name": "AZStd::vector" + } + } + ], + "results": [ + { + "typeid": "{72039442-EB38-4D42-A1AD-CB68F7E0EEF6}", + "details": { + "name": "int" + } + } + ] + }, + { + "base": "At", + "context": "{4841CFF0-7A5C-519C-BD16-D3625E99605E}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke At" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after At is invoked" + }, + "details": { + "name": "At" + }, + "params": [ + { + "typeid": "{4841CFF0-7A5C-519C-BD16-D3625E99605E}", + "details": { + "name": "AZStd::vector" + } + }, + { + "typeid": "{D6597933-47CD-4FC8-B911-63F3E2B0993A}", + "details": { + "name": "AZ::u64" + } + } + ], + "results": [ + { + "typeid": "{6383F1D3-BB27-4E6B-A49A-6409B2059EAA}", + "details": { + "name": "EntityId", + "tooltip": "Entity Unique Id" + } + } + ] + }, + { + "base": "Empty", + "context": "{4841CFF0-7A5C-519C-BD16-D3625E99605E}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Empty" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Empty is invoked" + }, + "details": { + "name": "Empty" + }, + "params": [ + { + "typeid": "{4841CFF0-7A5C-519C-BD16-D3625E99605E}", + "details": { + "name": "AZStd::vector" + } + } + ], + "results": [ + { + "typeid": "{A0CA880C-AFE4-43CB-926C-59AC48496112}", + "details": { + "name": "bool" + } + } + ] + }, + { + "base": "Swap", + "context": "{4841CFF0-7A5C-519C-BD16-D3625E99605E}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Swap" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Swap is invoked" + }, + "details": { + "name": "Swap" + }, + "params": [ + { + "typeid": "{4841CFF0-7A5C-519C-BD16-D3625E99605E}", + "details": { + "name": "AZStd::vector" + } + }, + { + "typeid": "{4841CFF0-7A5C-519C-BD16-D3625E99605E}", + "details": { + "name": "AZStd::vector" + } + } + ] + }, + { + "base": "push_back", + "context": "{4841CFF0-7A5C-519C-BD16-D3625E99605E}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke push_back" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after push_back is invoked" + }, + "details": { + "name": "push_back" + }, + "params": [ + { + "typeid": "{4841CFF0-7A5C-519C-BD16-D3625E99605E}", + "details": { + "name": "AZStd::vector" + } + }, + { + "typeid": "{6383F1D3-BB27-4E6B-A49A-6409B2059EAA}", + "details": { + "name": "EntityId", + "tooltip": "Entity Unique Id" + } + } + ] + }, + { + "base": "PushBack_VM", + "context": "{4841CFF0-7A5C-519C-BD16-D3625E99605E}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke PushBack_VM" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after PushBack_VM is invoked" + }, + "details": { + "name": "PushBack_VM" + }, + "params": [ + { + "typeid": "{4841CFF0-7A5C-519C-BD16-D3625E99605E}", + "details": { + "name": "AZStd::vector" + } + }, + { + "typeid": "{6383F1D3-BB27-4E6B-A49A-6409B2059EAA}", + "details": { + "name": "EntityId", + "tooltip": "Entity Unique Id" + } + } + ], + "results": [ + { + "typeid": "{4841CFF0-7A5C-519C-BD16-D3625E99605E}", + "details": { + "name": "AZStd::vector" + } + } + ] + }, + { + "base": "AtUnchecked", + "context": "{4841CFF0-7A5C-519C-BD16-D3625E99605E}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke AtUnchecked" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after AtUnchecked is invoked" + }, + "details": { + "name": "AtUnchecked" + }, + "params": [ + { + "typeid": "{4841CFF0-7A5C-519C-BD16-D3625E99605E}", + "details": { + "name": "AZStd::vector" + } + }, + { + "typeid": "{D6597933-47CD-4FC8-B911-63F3E2B0993A}", + "details": { + "name": "AZ::u64" + } + } + ], + "results": [ + { + "typeid": "{6383F1D3-BB27-4E6B-A49A-6409B2059EAA}", + "details": { + "name": "EntityId", + "tooltip": "Entity Unique Id" + } + } + ] + }, + { + "base": "clear", + "context": "{4841CFF0-7A5C-519C-BD16-D3625E99605E}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke clear" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after clear is invoked" + }, + "details": { + "name": "clear" + }, + "params": [ + { + "typeid": "{4841CFF0-7A5C-519C-BD16-D3625E99605E}", + "details": { + "name": "AZStd::vector" + } + } + ] + }, + { + "base": "NotEmpty", + "context": "{4841CFF0-7A5C-519C-BD16-D3625E99605E}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke NotEmpty" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after NotEmpty is invoked" + }, + "details": { + "name": "NotEmpty" + }, + "params": [ + { + "typeid": "{4841CFF0-7A5C-519C-BD16-D3625E99605E}", + "details": { + "name": "AZStd::vector" + } + } + ], + "results": [ + { + "typeid": "{A0CA880C-AFE4-43CB-926C-59AC48496112}", + "details": { + "name": "bool" + } + } + ] + }, + { + "base": "Erase_VM", + "context": "{4841CFF0-7A5C-519C-BD16-D3625E99605E}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Erase_VM" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Erase_VM is invoked" + }, + "details": { + "name": "Erase_VM" + }, + "params": [ + { + "typeid": "{4841CFF0-7A5C-519C-BD16-D3625E99605E}", + "details": { + "name": "AZStd::vector" + } + }, + { + "typeid": "{D6597933-47CD-4FC8-B911-63F3E2B0993A}", + "details": { + "name": "AZ::u64" + } + } + ], + "results": [ + { + "typeid": "{4841CFF0-7A5C-519C-BD16-D3625E99605E}", + "details": { + "name": "AZStd::vector" + } + } + ] + }, + { + "base": "EraseCheck_VM", + "context": "{4841CFF0-7A5C-519C-BD16-D3625E99605E}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke EraseCheck_VM" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after EraseCheck_VM is invoked" + }, + "details": { + "name": "EraseCheck_VM" + }, + "params": [ + { + "typeid": "{4841CFF0-7A5C-519C-BD16-D3625E99605E}", + "details": { + "name": "AZStd::vector" + } + }, + { + "typeid": "{D6597933-47CD-4FC8-B911-63F3E2B0993A}", + "details": { + "name": "AZ::u64" + } + } + ], + "results": [ + { + "typeid": "{A0CA880C-AFE4-43CB-926C-59AC48496112}", + "details": { + "name": "bool" + } + } + ] + }, + { + "base": "Capacity", + "context": "{4841CFF0-7A5C-519C-BD16-D3625E99605E}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Capacity" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Capacity is invoked" + }, + "details": { + "name": "Capacity" + }, + "params": [ + { + "typeid": "{4841CFF0-7A5C-519C-BD16-D3625E99605E}", + "details": { + "name": "AZStd::vector" + } + } + ], + "results": [ + { + "typeid": "{D6597933-47CD-4FC8-B911-63F3E2B0993A}", + "details": { + "name": "AZ::u64" + } + } + ] + }, + { + "base": "Clear", + "context": "{4841CFF0-7A5C-519C-BD16-D3625E99605E}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Clear" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Clear is invoked" + }, + "details": { + "name": "Clear" + }, + "params": [ + { + "typeid": "{4841CFF0-7A5C-519C-BD16-D3625E99605E}", + "details": { + "name": "AZStd::vector" + } + } + ], + "results": [ + { + "typeid": "{4841CFF0-7A5C-519C-BD16-D3625E99605E}", + "details": { + "name": "AZStd::vector" + } + } + ] + }, + { + "base": "AssignAt", + "context": "{4841CFF0-7A5C-519C-BD16-D3625E99605E}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke AssignAt" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after AssignAt is invoked" + }, + "details": { + "name": "AssignAt" + }, + "params": [ + { + "typeid": "{4841CFF0-7A5C-519C-BD16-D3625E99605E}", + "details": { + "name": "AZStd::vector" + } + }, + { + "typeid": "{D6597933-47CD-4FC8-B911-63F3E2B0993A}", + "details": { + "name": "AZ::u64" + } + }, + { + "typeid": "{6383F1D3-BB27-4E6B-A49A-6409B2059EAA}", + "details": { + "name": "EntityId", + "tooltip": "Entity Unique Id" + } + } + ] + }, + { + "base": "GetSize", + "context": "{4841CFF0-7A5C-519C-BD16-D3625E99605E}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke GetSize" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after GetSize is invoked" + }, + "details": { + "name": "GetSize" + }, + "params": [ + { + "typeid": "{4841CFF0-7A5C-519C-BD16-D3625E99605E}", + "details": { + "name": "AZStd::vector" + } + } + ], + "results": [ + { + "typeid": "{72039442-EB38-4D42-A1AD-CB68F7E0EEF6}", + "details": { + "name": "int" + } + } + ] + }, + { + "base": "Insert", + "context": "{4841CFF0-7A5C-519C-BD16-D3625E99605E}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Insert" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Insert is invoked" + }, + "details": { + "name": "Insert" + }, + "params": [ + { + "typeid": "{4841CFF0-7A5C-519C-BD16-D3625E99605E}", + "details": { + "name": "AZStd::vector" + } + }, + { + "typeid": "{D6597933-47CD-4FC8-B911-63F3E2B0993A}", + "details": { + "name": "AZ::u64" + } + }, + { + "typeid": "{6383F1D3-BB27-4E6B-A49A-6409B2059EAA}", + "details": { + "name": "EntityId", + "tooltip": "Entity Unique Id" + } + } + ], + "results": [ + { + "typeid": "{4841CFF0-7A5C-519C-BD16-D3625E99605E}", + "details": { + "name": "AZStd::vector" + } + } + ] + }, + { + "base": "PushBack", + "context": "{4841CFF0-7A5C-519C-BD16-D3625E99605E}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke PushBack" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after PushBack is invoked" + }, + "details": { + "name": "PushBack" + }, + "params": [ + { + "typeid": "{4841CFF0-7A5C-519C-BD16-D3625E99605E}", + "details": { + "name": "AZStd::vector" + } + }, + { + "typeid": "{6383F1D3-BB27-4E6B-A49A-6409B2059EAA}", + "details": { + "name": "EntityId", + "tooltip": "Entity Unique Id" + } + } + ] + }, + { + "base": "Reserve", + "context": "{4841CFF0-7A5C-519C-BD16-D3625E99605E}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Reserve" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Reserve is invoked" + }, + "details": { + "name": "Reserve" + }, + "params": [ + { + "typeid": "{4841CFF0-7A5C-519C-BD16-D3625E99605E}", + "details": { + "name": "AZStd::vector" + } + }, + { + "typeid": "{D6597933-47CD-4FC8-B911-63F3E2B0993A}", + "details": { + "name": "AZ::u64" + } + } + ] + }, + { + "base": "Iterate_VM", + "context": "{4841CFF0-7A5C-519C-BD16-D3625E99605E}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Iterate_VM" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Iterate_VM is invoked" + }, + "details": { + "name": "Iterate_VM" + }, + "params": [ + { + "typeid": "{4841CFF0-7A5C-519C-BD16-D3625E99605E}", + "details": { + "name": "AZStd::vector" + } + } + ], + "results": [ + { + "typeid": "{046E08E1-D526-50F6-8EB8-5119B62F083F}", + "details": { + "name": "Iterator_VM>" + } + } + ] + } + ] + }, + { + "base": "{5CBE5640-DF5C-5A49-9195-D790881A0747}", + "context": "OnDemandReflected", + "variant": "", + "details": { + "name": "Array", + "category": "Array", + "tooltip": "A dynamically sized container of elements." + }, + "methods": [ + { + "base": "Size", + "context": "{5CBE5640-DF5C-5A49-9195-D790881A0747}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Size" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Size is invoked" + }, + "details": { + "name": "Size" + }, + "params": [ + { + "typeid": "{5CBE5640-DF5C-5A49-9195-D790881A0747}", + "details": { + "name": "AZStd::vector" + } + } + ], + "results": [ + { + "typeid": "{72039442-EB38-4D42-A1AD-CB68F7E0EEF6}", + "details": { + "name": "int" + } + } + ] + }, + { + "base": "Front", + "context": "{5CBE5640-DF5C-5A49-9195-D790881A0747}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Front" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Front is invoked" + }, + "details": { + "name": "Front" + }, + "params": [ + { + "typeid": "{5CBE5640-DF5C-5A49-9195-D790881A0747}", + "details": { + "name": "AZStd::vector" + } + } + ], + "results": [ + { + "typeid": "{73103120-3DD3-4873-BAB3-9713FA2804FB}", + "details": { + "name": "Quaternion" + } + } + ] + }, + { + "base": "HasKey", + "context": "{5CBE5640-DF5C-5A49-9195-D790881A0747}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Has Key" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Has Key is invoked" + }, + "details": { + "name": "Has Key" + }, + "params": [ + { + "typeid": "{5CBE5640-DF5C-5A49-9195-D790881A0747}", + "details": { + "name": "AZStd::vector" + } + }, + { + "typeid": "{D6597933-47CD-4FC8-B911-63F3E2B0993A}", + "details": { + "name": "AZ::u64" + } + } + ], + "results": [ + { + "typeid": "{A0CA880C-AFE4-43CB-926C-59AC48496112}", + "details": { + "name": "bool" + } + } + ] + }, + { + "base": "Resize", + "context": "{5CBE5640-DF5C-5A49-9195-D790881A0747}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Resize" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Resize is invoked" + }, + "details": { + "name": "Resize" + }, + "params": [ + { + "typeid": "{5CBE5640-DF5C-5A49-9195-D790881A0747}", + "details": { + "name": "AZStd::vector" + } + }, + { + "typeid": "{D6597933-47CD-4FC8-B911-63F3E2B0993A}", + "details": { + "name": "AZ::u64" + } + } + ] + }, + { + "base": "at", + "context": "{5CBE5640-DF5C-5A49-9195-D790881A0747}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke at" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after at is invoked" + }, + "details": { + "name": "at" + }, + "params": [ + { + "typeid": "{5CBE5640-DF5C-5A49-9195-D790881A0747}", + "details": { + "name": "AZStd::vector" + } + }, + { + "typeid": "{D6597933-47CD-4FC8-B911-63F3E2B0993A}", + "details": { + "name": "AZ::u64" + } + } + ], + "results": [ + { + "typeid": "{73103120-3DD3-4873-BAB3-9713FA2804FB}", + "details": { + "name": "Quaternion" + } + } + ] + }, + { + "base": "Back", + "context": "{5CBE5640-DF5C-5A49-9195-D790881A0747}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Back" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Back is invoked" + }, + "details": { + "name": "Back" + }, + "params": [ + { + "typeid": "{5CBE5640-DF5C-5A49-9195-D790881A0747}", + "details": { + "name": "AZStd::vector" + } + } + ], + "results": [ + { + "typeid": "{73103120-3DD3-4873-BAB3-9713FA2804FB}", + "details": { + "name": "Quaternion" + } + } + ] + }, + { + "base": "pop_back", + "context": "{5CBE5640-DF5C-5A49-9195-D790881A0747}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke pop_back" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after pop_back is invoked" + }, + "details": { + "name": "pop_back" + }, + "params": [ + { + "typeid": "{5CBE5640-DF5C-5A49-9195-D790881A0747}", + "details": { + "name": "AZStd::vector" + } + } + ] + }, + { + "base": "size", + "context": "{5CBE5640-DF5C-5A49-9195-D790881A0747}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke size" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after size is invoked" + }, + "details": { + "name": "size" + }, + "params": [ + { + "typeid": "{5CBE5640-DF5C-5A49-9195-D790881A0747}", + "details": { + "name": "AZStd::vector" + } + } + ], + "results": [ + { + "typeid": "{72039442-EB38-4D42-A1AD-CB68F7E0EEF6}", + "details": { + "name": "int" + } + } + ] + }, + { + "base": "At", + "context": "{5CBE5640-DF5C-5A49-9195-D790881A0747}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke At" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after At is invoked" + }, + "details": { + "name": "At" + }, + "params": [ + { + "typeid": "{5CBE5640-DF5C-5A49-9195-D790881A0747}", + "details": { + "name": "AZStd::vector" + } + }, + { + "typeid": "{D6597933-47CD-4FC8-B911-63F3E2B0993A}", + "details": { + "name": "AZ::u64" + } + } + ], + "results": [ + { + "typeid": "{73103120-3DD3-4873-BAB3-9713FA2804FB}", + "details": { + "name": "Quaternion" + } + } + ] + }, + { + "base": "Empty", + "context": "{5CBE5640-DF5C-5A49-9195-D790881A0747}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Empty" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Empty is invoked" + }, + "details": { + "name": "Empty" + }, + "params": [ + { + "typeid": "{5CBE5640-DF5C-5A49-9195-D790881A0747}", + "details": { + "name": "AZStd::vector" + } + } + ], + "results": [ + { + "typeid": "{A0CA880C-AFE4-43CB-926C-59AC48496112}", + "details": { + "name": "bool" + } + } + ] + }, + { + "base": "Swap", + "context": "{5CBE5640-DF5C-5A49-9195-D790881A0747}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Swap" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Swap is invoked" + }, + "details": { + "name": "Swap" + }, + "params": [ + { + "typeid": "{5CBE5640-DF5C-5A49-9195-D790881A0747}", + "details": { + "name": "AZStd::vector" + } + }, + { + "typeid": "{5CBE5640-DF5C-5A49-9195-D790881A0747}", + "details": { + "name": "AZStd::vector" + } + } + ] + }, + { + "base": "push_back", + "context": "{5CBE5640-DF5C-5A49-9195-D790881A0747}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke push_back" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after push_back is invoked" + }, + "details": { + "name": "push_back" + }, + "params": [ + { + "typeid": "{5CBE5640-DF5C-5A49-9195-D790881A0747}", + "details": { + "name": "AZStd::vector" + } + }, + { + "typeid": "{73103120-3DD3-4873-BAB3-9713FA2804FB}", + "details": { + "name": "Quaternion" + } + } + ] + }, + { + "base": "PushBack_VM", + "context": "{5CBE5640-DF5C-5A49-9195-D790881A0747}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke PushBack_VM" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after PushBack_VM is invoked" + }, + "details": { + "name": "PushBack_VM" + }, + "params": [ + { + "typeid": "{5CBE5640-DF5C-5A49-9195-D790881A0747}", + "details": { + "name": "AZStd::vector" + } + }, + { + "typeid": "{73103120-3DD3-4873-BAB3-9713FA2804FB}", + "details": { + "name": "Quaternion" + } + } + ], + "results": [ + { + "typeid": "{5CBE5640-DF5C-5A49-9195-D790881A0747}", + "details": { + "name": "AZStd::vector" + } + } + ] + }, + { + "base": "AtUnchecked", + "context": "{5CBE5640-DF5C-5A49-9195-D790881A0747}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke AtUnchecked" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after AtUnchecked is invoked" + }, + "details": { + "name": "AtUnchecked" + }, + "params": [ + { + "typeid": "{5CBE5640-DF5C-5A49-9195-D790881A0747}", + "details": { + "name": "AZStd::vector" + } + }, + { + "typeid": "{D6597933-47CD-4FC8-B911-63F3E2B0993A}", + "details": { + "name": "AZ::u64" + } + } + ], + "results": [ + { + "typeid": "{73103120-3DD3-4873-BAB3-9713FA2804FB}", + "details": { + "name": "Quaternion" + } + } + ] + }, + { + "base": "clear", + "context": "{5CBE5640-DF5C-5A49-9195-D790881A0747}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke clear" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after clear is invoked" + }, + "details": { + "name": "clear" + }, + "params": [ + { + "typeid": "{5CBE5640-DF5C-5A49-9195-D790881A0747}", + "details": { + "name": "AZStd::vector" + } + } + ] + }, + { + "base": "NotEmpty", + "context": "{5CBE5640-DF5C-5A49-9195-D790881A0747}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke NotEmpty" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after NotEmpty is invoked" + }, + "details": { + "name": "NotEmpty" + }, + "params": [ + { + "typeid": "{5CBE5640-DF5C-5A49-9195-D790881A0747}", + "details": { + "name": "AZStd::vector" + } + } + ], + "results": [ + { + "typeid": "{A0CA880C-AFE4-43CB-926C-59AC48496112}", + "details": { + "name": "bool" + } + } + ] + }, + { + "base": "Erase_VM", + "context": "{5CBE5640-DF5C-5A49-9195-D790881A0747}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Erase_VM" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Erase_VM is invoked" + }, + "details": { + "name": "Erase_VM" + }, + "params": [ + { + "typeid": "{5CBE5640-DF5C-5A49-9195-D790881A0747}", + "details": { + "name": "AZStd::vector" + } + }, + { + "typeid": "{D6597933-47CD-4FC8-B911-63F3E2B0993A}", + "details": { + "name": "AZ::u64" + } + } + ], + "results": [ + { + "typeid": "{5CBE5640-DF5C-5A49-9195-D790881A0747}", + "details": { + "name": "AZStd::vector" + } + } + ] + }, + { + "base": "EraseCheck_VM", + "context": "{5CBE5640-DF5C-5A49-9195-D790881A0747}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke EraseCheck_VM" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after EraseCheck_VM is invoked" + }, + "details": { + "name": "EraseCheck_VM" + }, + "params": [ + { + "typeid": "{5CBE5640-DF5C-5A49-9195-D790881A0747}", + "details": { + "name": "AZStd::vector" + } + }, + { + "typeid": "{D6597933-47CD-4FC8-B911-63F3E2B0993A}", + "details": { + "name": "AZ::u64" + } + } + ], + "results": [ + { + "typeid": "{A0CA880C-AFE4-43CB-926C-59AC48496112}", + "details": { + "name": "bool" + } + } + ] + }, + { + "base": "Capacity", + "context": "{5CBE5640-DF5C-5A49-9195-D790881A0747}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Capacity" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Capacity is invoked" + }, + "details": { + "name": "Capacity" + }, + "params": [ + { + "typeid": "{5CBE5640-DF5C-5A49-9195-D790881A0747}", + "details": { + "name": "AZStd::vector" + } + } + ], + "results": [ + { + "typeid": "{D6597933-47CD-4FC8-B911-63F3E2B0993A}", + "details": { + "name": "AZ::u64" + } + } + ] + }, + { + "base": "Clear", + "context": "{5CBE5640-DF5C-5A49-9195-D790881A0747}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Clear" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Clear is invoked" + }, + "details": { + "name": "Clear" + }, + "params": [ + { + "typeid": "{5CBE5640-DF5C-5A49-9195-D790881A0747}", + "details": { + "name": "AZStd::vector" + } + } + ], + "results": [ + { + "typeid": "{5CBE5640-DF5C-5A49-9195-D790881A0747}", + "details": { + "name": "AZStd::vector" + } + } + ] + }, + { + "base": "AssignAt", + "context": "{5CBE5640-DF5C-5A49-9195-D790881A0747}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke AssignAt" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after AssignAt is invoked" + }, + "details": { + "name": "AssignAt" + }, + "params": [ + { + "typeid": "{5CBE5640-DF5C-5A49-9195-D790881A0747}", + "details": { + "name": "AZStd::vector" + } + }, + { + "typeid": "{D6597933-47CD-4FC8-B911-63F3E2B0993A}", + "details": { + "name": "AZ::u64" + } + }, + { + "typeid": "{73103120-3DD3-4873-BAB3-9713FA2804FB}", + "details": { + "name": "Quaternion" + } + } + ] + }, + { + "base": "GetSize", + "context": "{5CBE5640-DF5C-5A49-9195-D790881A0747}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke GetSize" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after GetSize is invoked" + }, + "details": { + "name": "GetSize" + }, + "params": [ + { + "typeid": "{5CBE5640-DF5C-5A49-9195-D790881A0747}", + "details": { + "name": "AZStd::vector" + } + } + ], + "results": [ + { + "typeid": "{72039442-EB38-4D42-A1AD-CB68F7E0EEF6}", + "details": { + "name": "int" + } + } + ] + }, + { + "base": "Insert", + "context": "{5CBE5640-DF5C-5A49-9195-D790881A0747}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Insert" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Insert is invoked" + }, + "details": { + "name": "Insert" + }, + "params": [ + { + "typeid": "{5CBE5640-DF5C-5A49-9195-D790881A0747}", + "details": { + "name": "AZStd::vector" + } + }, + { + "typeid": "{D6597933-47CD-4FC8-B911-63F3E2B0993A}", + "details": { + "name": "AZ::u64" + } + }, + { + "typeid": "{73103120-3DD3-4873-BAB3-9713FA2804FB}", + "details": { + "name": "Quaternion" + } + } + ], + "results": [ + { + "typeid": "{5CBE5640-DF5C-5A49-9195-D790881A0747}", + "details": { + "name": "AZStd::vector" + } + } + ] + }, + { + "base": "PushBack", + "context": "{5CBE5640-DF5C-5A49-9195-D790881A0747}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke PushBack" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after PushBack is invoked" + }, + "details": { + "name": "PushBack" + }, + "params": [ + { + "typeid": "{5CBE5640-DF5C-5A49-9195-D790881A0747}", + "details": { + "name": "AZStd::vector" + } + }, + { + "typeid": "{73103120-3DD3-4873-BAB3-9713FA2804FB}", + "details": { + "name": "Quaternion" + } + } + ] + }, + { + "base": "Reserve", + "context": "{5CBE5640-DF5C-5A49-9195-D790881A0747}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Reserve" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Reserve is invoked" + }, + "details": { + "name": "Reserve" + }, + "params": [ + { + "typeid": "{5CBE5640-DF5C-5A49-9195-D790881A0747}", + "details": { + "name": "AZStd::vector" + } + }, + { + "typeid": "{D6597933-47CD-4FC8-B911-63F3E2B0993A}", + "details": { + "name": "AZ::u64" + } + } + ] + }, + { + "base": "Iterate_VM", + "context": "{5CBE5640-DF5C-5A49-9195-D790881A0747}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Iterate_VM" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Iterate_VM is invoked" + }, + "details": { + "name": "Iterate_VM" + }, + "params": [ + { + "typeid": "{5CBE5640-DF5C-5A49-9195-D790881A0747}", + "details": { + "name": "AZStd::vector" + } + } + ], + "results": [ + { + "typeid": "{9848C445-2C04-5750-8E19-8C973EB50980}", + "details": { + "name": "Iterator_VM>" + } + } + ] + } + ] + }, + { + "base": "{8293031B-ABC3-5CD2-A1CB-1DB6792ADD5C}", + "context": "OnDemandReflected", + "variant": "", + "details": { + "name": "Array", + "category": "Array", + "tooltip": "A dynamically sized container of elements." + }, + "methods": [ + { + "base": "Size", + "context": "{8293031B-ABC3-5CD2-A1CB-1DB6792ADD5C}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Size" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Size is invoked" + }, + "details": { + "name": "Size" + }, + "params": [ + { + "typeid": "{8293031B-ABC3-5CD2-A1CB-1DB6792ADD5C}", + "details": { + "name": "AZStd::vector" + } + } + ], + "results": [ + { + "typeid": "{72039442-EB38-4D42-A1AD-CB68F7E0EEF6}", + "details": { + "name": "int" + } + } + ] + }, + { + "base": "Front", + "context": "{8293031B-ABC3-5CD2-A1CB-1DB6792ADD5C}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Front" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Front is invoked" + }, + "details": { + "name": "Front" + }, + "params": [ + { + "typeid": "{8293031B-ABC3-5CD2-A1CB-1DB6792ADD5C}", + "details": { + "name": "AZStd::vector" + } + } + ], + "results": [ + { + "typeid": "{60A9A069-9C3D-465A-B7AD-0D6CC803990A}", + "details": { + "name": "BehaviorComponentId" + } + } + ] + }, + { + "base": "HasKey", + "context": "{8293031B-ABC3-5CD2-A1CB-1DB6792ADD5C}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Has Key" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Has Key is invoked" + }, + "details": { + "name": "Has Key" + }, + "params": [ + { + "typeid": "{8293031B-ABC3-5CD2-A1CB-1DB6792ADD5C}", + "details": { + "name": "AZStd::vector" + } + }, + { + "typeid": "{D6597933-47CD-4FC8-B911-63F3E2B0993A}", + "details": { + "name": "AZ::u64" + } + } + ], + "results": [ + { + "typeid": "{A0CA880C-AFE4-43CB-926C-59AC48496112}", + "details": { + "name": "bool" + } + } + ] + }, + { + "base": "Resize", + "context": "{8293031B-ABC3-5CD2-A1CB-1DB6792ADD5C}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Resize" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Resize is invoked" + }, + "details": { + "name": "Resize" + }, + "params": [ + { + "typeid": "{8293031B-ABC3-5CD2-A1CB-1DB6792ADD5C}", + "details": { + "name": "AZStd::vector" + } + }, + { + "typeid": "{D6597933-47CD-4FC8-B911-63F3E2B0993A}", + "details": { + "name": "AZ::u64" + } + } + ] + }, + { + "base": "at", + "context": "{8293031B-ABC3-5CD2-A1CB-1DB6792ADD5C}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke at" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after at is invoked" + }, + "details": { + "name": "at" + }, + "params": [ + { + "typeid": "{8293031B-ABC3-5CD2-A1CB-1DB6792ADD5C}", + "details": { + "name": "AZStd::vector" + } + }, + { + "typeid": "{D6597933-47CD-4FC8-B911-63F3E2B0993A}", + "details": { + "name": "AZ::u64" + } + } + ], + "results": [ + { + "typeid": "{60A9A069-9C3D-465A-B7AD-0D6CC803990A}", + "details": { + "name": "BehaviorComponentId" + } + } + ] + }, + { + "base": "Back", + "context": "{8293031B-ABC3-5CD2-A1CB-1DB6792ADD5C}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Back" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Back is invoked" + }, + "details": { + "name": "Back" + }, + "params": [ + { + "typeid": "{8293031B-ABC3-5CD2-A1CB-1DB6792ADD5C}", + "details": { + "name": "AZStd::vector" + } + } + ], + "results": [ + { + "typeid": "{60A9A069-9C3D-465A-B7AD-0D6CC803990A}", + "details": { + "name": "BehaviorComponentId" + } + } + ] + }, + { + "base": "pop_back", + "context": "{8293031B-ABC3-5CD2-A1CB-1DB6792ADD5C}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke pop_back" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after pop_back is invoked" + }, + "details": { + "name": "pop_back" + }, + "params": [ + { + "typeid": "{8293031B-ABC3-5CD2-A1CB-1DB6792ADD5C}", + "details": { + "name": "AZStd::vector" + } + } + ] + }, + { + "base": "size", + "context": "{8293031B-ABC3-5CD2-A1CB-1DB6792ADD5C}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke size" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after size is invoked" + }, + "details": { + "name": "size" + }, + "params": [ + { + "typeid": "{8293031B-ABC3-5CD2-A1CB-1DB6792ADD5C}", + "details": { + "name": "AZStd::vector" + } + } + ], + "results": [ + { + "typeid": "{72039442-EB38-4D42-A1AD-CB68F7E0EEF6}", + "details": { + "name": "int" + } + } + ] + }, + { + "base": "At", + "context": "{8293031B-ABC3-5CD2-A1CB-1DB6792ADD5C}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke At" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after At is invoked" + }, + "details": { + "name": "At" + }, + "params": [ + { + "typeid": "{8293031B-ABC3-5CD2-A1CB-1DB6792ADD5C}", + "details": { + "name": "AZStd::vector" + } + }, + { + "typeid": "{D6597933-47CD-4FC8-B911-63F3E2B0993A}", + "details": { + "name": "AZ::u64" + } + } + ], + "results": [ + { + "typeid": "{60A9A069-9C3D-465A-B7AD-0D6CC803990A}", + "details": { + "name": "BehaviorComponentId" + } + } + ] + }, + { + "base": "Empty", + "context": "{8293031B-ABC3-5CD2-A1CB-1DB6792ADD5C}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Empty" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Empty is invoked" + }, + "details": { + "name": "Empty" + }, + "params": [ + { + "typeid": "{8293031B-ABC3-5CD2-A1CB-1DB6792ADD5C}", + "details": { + "name": "AZStd::vector" + } + } + ], + "results": [ + { + "typeid": "{A0CA880C-AFE4-43CB-926C-59AC48496112}", + "details": { + "name": "bool" + } + } + ] + }, + { + "base": "Swap", + "context": "{8293031B-ABC3-5CD2-A1CB-1DB6792ADD5C}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Swap" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Swap is invoked" + }, + "details": { + "name": "Swap" + }, + "params": [ + { + "typeid": "{8293031B-ABC3-5CD2-A1CB-1DB6792ADD5C}", + "details": { + "name": "AZStd::vector" + } + }, + { + "typeid": "{8293031B-ABC3-5CD2-A1CB-1DB6792ADD5C}", + "details": { + "name": "AZStd::vector" + } + } + ] + }, + { + "base": "push_back", + "context": "{8293031B-ABC3-5CD2-A1CB-1DB6792ADD5C}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke push_back" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after push_back is invoked" + }, + "details": { + "name": "push_back" + }, + "params": [ + { + "typeid": "{8293031B-ABC3-5CD2-A1CB-1DB6792ADD5C}", + "details": { + "name": "AZStd::vector" + } + }, + { + "typeid": "{60A9A069-9C3D-465A-B7AD-0D6CC803990A}", + "details": { + "name": "BehaviorComponentId" + } + } + ] + }, + { + "base": "PushBack_VM", + "context": "{8293031B-ABC3-5CD2-A1CB-1DB6792ADD5C}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke PushBack_VM" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after PushBack_VM is invoked" + }, + "details": { + "name": "PushBack_VM" + }, + "params": [ + { + "typeid": "{8293031B-ABC3-5CD2-A1CB-1DB6792ADD5C}", + "details": { + "name": "AZStd::vector" + } + }, + { + "typeid": "{60A9A069-9C3D-465A-B7AD-0D6CC803990A}", + "details": { + "name": "BehaviorComponentId" + } + } + ], + "results": [ + { + "typeid": "{8293031B-ABC3-5CD2-A1CB-1DB6792ADD5C}", + "details": { + "name": "AZStd::vector" + } + } + ] + }, + { + "base": "AtUnchecked", + "context": "{8293031B-ABC3-5CD2-A1CB-1DB6792ADD5C}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke AtUnchecked" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after AtUnchecked is invoked" + }, + "details": { + "name": "AtUnchecked" + }, + "params": [ + { + "typeid": "{8293031B-ABC3-5CD2-A1CB-1DB6792ADD5C}", + "details": { + "name": "AZStd::vector" + } + }, + { + "typeid": "{D6597933-47CD-4FC8-B911-63F3E2B0993A}", + "details": { + "name": "AZ::u64" + } + } + ], + "results": [ + { + "typeid": "{60A9A069-9C3D-465A-B7AD-0D6CC803990A}", + "details": { + "name": "BehaviorComponentId" + } + } + ] + }, + { + "base": "clear", + "context": "{8293031B-ABC3-5CD2-A1CB-1DB6792ADD5C}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke clear" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after clear is invoked" + }, + "details": { + "name": "clear" + }, + "params": [ + { + "typeid": "{8293031B-ABC3-5CD2-A1CB-1DB6792ADD5C}", + "details": { + "name": "AZStd::vector" + } + } + ] + }, + { + "base": "NotEmpty", + "context": "{8293031B-ABC3-5CD2-A1CB-1DB6792ADD5C}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke NotEmpty" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after NotEmpty is invoked" + }, + "details": { + "name": "NotEmpty" + }, + "params": [ + { + "typeid": "{8293031B-ABC3-5CD2-A1CB-1DB6792ADD5C}", + "details": { + "name": "AZStd::vector" + } + } + ], + "results": [ + { + "typeid": "{A0CA880C-AFE4-43CB-926C-59AC48496112}", + "details": { + "name": "bool" + } + } + ] + }, + { + "base": "Erase_VM", + "context": "{8293031B-ABC3-5CD2-A1CB-1DB6792ADD5C}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Erase_VM" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Erase_VM is invoked" + }, + "details": { + "name": "Erase_VM" + }, + "params": [ + { + "typeid": "{8293031B-ABC3-5CD2-A1CB-1DB6792ADD5C}", + "details": { + "name": "AZStd::vector" + } + }, + { + "typeid": "{D6597933-47CD-4FC8-B911-63F3E2B0993A}", + "details": { + "name": "AZ::u64" + } + } + ], + "results": [ + { + "typeid": "{8293031B-ABC3-5CD2-A1CB-1DB6792ADD5C}", + "details": { + "name": "AZStd::vector" + } + } + ] + }, + { + "base": "EraseCheck_VM", + "context": "{8293031B-ABC3-5CD2-A1CB-1DB6792ADD5C}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke EraseCheck_VM" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after EraseCheck_VM is invoked" + }, + "details": { + "name": "EraseCheck_VM" + }, + "params": [ + { + "typeid": "{8293031B-ABC3-5CD2-A1CB-1DB6792ADD5C}", + "details": { + "name": "AZStd::vector" + } + }, + { + "typeid": "{D6597933-47CD-4FC8-B911-63F3E2B0993A}", + "details": { + "name": "AZ::u64" + } + } + ], + "results": [ + { + "typeid": "{A0CA880C-AFE4-43CB-926C-59AC48496112}", + "details": { + "name": "bool" + } + } + ] + }, + { + "base": "Capacity", + "context": "{8293031B-ABC3-5CD2-A1CB-1DB6792ADD5C}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Capacity" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Capacity is invoked" + }, + "details": { + "name": "Capacity" + }, + "params": [ + { + "typeid": "{8293031B-ABC3-5CD2-A1CB-1DB6792ADD5C}", + "details": { + "name": "AZStd::vector" + } + } + ], + "results": [ + { + "typeid": "{D6597933-47CD-4FC8-B911-63F3E2B0993A}", + "details": { + "name": "AZ::u64" + } + } + ] + }, + { + "base": "Clear", + "context": "{8293031B-ABC3-5CD2-A1CB-1DB6792ADD5C}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Clear" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Clear is invoked" + }, + "details": { + "name": "Clear" + }, + "params": [ + { + "typeid": "{8293031B-ABC3-5CD2-A1CB-1DB6792ADD5C}", + "details": { + "name": "AZStd::vector" + } + } + ], + "results": [ + { + "typeid": "{8293031B-ABC3-5CD2-A1CB-1DB6792ADD5C}", + "details": { + "name": "AZStd::vector" + } + } + ] + }, + { + "base": "AssignAt", + "context": "{8293031B-ABC3-5CD2-A1CB-1DB6792ADD5C}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke AssignAt" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after AssignAt is invoked" + }, + "details": { + "name": "AssignAt" + }, + "params": [ + { + "typeid": "{8293031B-ABC3-5CD2-A1CB-1DB6792ADD5C}", + "details": { + "name": "AZStd::vector" + } + }, + { + "typeid": "{D6597933-47CD-4FC8-B911-63F3E2B0993A}", + "details": { + "name": "AZ::u64" + } + }, + { + "typeid": "{60A9A069-9C3D-465A-B7AD-0D6CC803990A}", + "details": { + "name": "BehaviorComponentId" + } + } + ] + }, + { + "base": "GetSize", + "context": "{8293031B-ABC3-5CD2-A1CB-1DB6792ADD5C}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke GetSize" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after GetSize is invoked" + }, + "details": { + "name": "GetSize" + }, + "params": [ + { + "typeid": "{8293031B-ABC3-5CD2-A1CB-1DB6792ADD5C}", + "details": { + "name": "AZStd::vector" + } + } + ], + "results": [ + { + "typeid": "{72039442-EB38-4D42-A1AD-CB68F7E0EEF6}", + "details": { + "name": "int" + } + } + ] + }, + { + "base": "Insert", + "context": "{8293031B-ABC3-5CD2-A1CB-1DB6792ADD5C}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Insert" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Insert is invoked" + }, + "details": { + "name": "Insert" + }, + "params": [ + { + "typeid": "{8293031B-ABC3-5CD2-A1CB-1DB6792ADD5C}", + "details": { + "name": "AZStd::vector" + } + }, + { + "typeid": "{D6597933-47CD-4FC8-B911-63F3E2B0993A}", + "details": { + "name": "AZ::u64" + } + }, + { + "typeid": "{60A9A069-9C3D-465A-B7AD-0D6CC803990A}", + "details": { + "name": "BehaviorComponentId" + } + } + ], + "results": [ + { + "typeid": "{8293031B-ABC3-5CD2-A1CB-1DB6792ADD5C}", + "details": { + "name": "AZStd::vector" + } + } + ] + }, + { + "base": "PushBack", + "context": "{8293031B-ABC3-5CD2-A1CB-1DB6792ADD5C}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke PushBack" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after PushBack is invoked" + }, + "details": { + "name": "PushBack" + }, + "params": [ + { + "typeid": "{8293031B-ABC3-5CD2-A1CB-1DB6792ADD5C}", + "details": { + "name": "AZStd::vector" + } + }, + { + "typeid": "{60A9A069-9C3D-465A-B7AD-0D6CC803990A}", + "details": { + "name": "BehaviorComponentId" + } + } + ] + }, + { + "base": "Reserve", + "context": "{8293031B-ABC3-5CD2-A1CB-1DB6792ADD5C}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Reserve" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Reserve is invoked" + }, + "details": { + "name": "Reserve" + }, + "params": [ + { + "typeid": "{8293031B-ABC3-5CD2-A1CB-1DB6792ADD5C}", + "details": { + "name": "AZStd::vector" + } + }, + { + "typeid": "{D6597933-47CD-4FC8-B911-63F3E2B0993A}", + "details": { + "name": "AZ::u64" + } + } + ] + }, + { + "base": "Iterate_VM", + "context": "{8293031B-ABC3-5CD2-A1CB-1DB6792ADD5C}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Iterate_VM" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Iterate_VM is invoked" + }, + "details": { + "name": "Iterate_VM" + }, + "params": [ + { + "typeid": "{8293031B-ABC3-5CD2-A1CB-1DB6792ADD5C}", + "details": { + "name": "AZStd::vector" + } + } + ], + "results": [ + { + "typeid": "{B1D4472E-8121-5F97-A8E2-7B5C8826D4AB}", + "details": { + "name": "Iterator_VM>" + } + } + ] + } + ] + }, + { + "base": "{A9AF6811-A281-5484-9A1B-4D036F173054}", + "context": "OnDemandReflected", + "variant": "", + "details": { + "name": "Map", + "category": "Map", + "tooltip": "A collection of Key/Value pairs, where each Key value must be unique." + }, + "methods": [ + { + "base": "contains", + "context": "{A9AF6811-A281-5484-9A1B-4D036F173054}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke contains" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after contains is invoked" + }, + "details": { + "name": "contains" + }, + "params": [ + { + "typeid": "{A9AF6811-A281-5484-9A1B-4D036F173054}", + "details": { + "name": "AZStd::unordered_map" + } + }, + { + "typeid": "{6383F1D3-BB27-4E6B-A49A-6409B2059EAA}", + "details": { + "name": "EntityId", + "tooltip": "Entity Unique Id" + } + } + ], + "results": [ + { + "typeid": "{A0CA880C-AFE4-43CB-926C-59AC48496112}", + "details": { + "name": "bool" + } + } + ] + }, + { + "base": "Insert", + "context": "{A9AF6811-A281-5484-9A1B-4D036F173054}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Insert" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Insert is invoked" + }, + "details": { + "name": "Insert" + }, + "params": [ + { + "typeid": "{A9AF6811-A281-5484-9A1B-4D036F173054}", + "details": { + "name": "AZStd::unordered_map" + } + }, + { + "typeid": "{6383F1D3-BB27-4E6B-A49A-6409B2059EAA}", + "details": { + "name": "EntityId", + "tooltip": "Entity Unique Id" + } + }, + { + "typeid": "{652ED536-3402-439B-AEBE-4A5DBC554085}", + "details": { + "name": "AssetId" + } + } + ], + "results": [ + { + "typeid": "{A9AF6811-A281-5484-9A1B-4D036F173054}", + "details": { + "name": "AZStd::unordered_map" + } + } + ] + }, + { + "base": "Reserve", + "context": "{A9AF6811-A281-5484-9A1B-4D036F173054}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Reserve" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Reserve is invoked" + }, + "details": { + "name": "Reserve" + }, + "params": [ + { + "typeid": "{A9AF6811-A281-5484-9A1B-4D036F173054}", + "details": { + "name": "AZStd::unordered_map" + } + }, + { + "typeid": "{D6597933-47CD-4FC8-B911-63F3E2B0993A}", + "details": { + "name": "AZ::u64" + } + } + ] + }, + { + "base": "GetSize", + "context": "{A9AF6811-A281-5484-9A1B-4D036F173054}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke GetSize" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after GetSize is invoked" + }, + "details": { + "name": "GetSize" + }, + "params": [ + { + "typeid": "{A9AF6811-A281-5484-9A1B-4D036F173054}", + "details": { + "name": "AZStd::unordered_map" + } + } + ], + "results": [ + { + "typeid": "{72039442-EB38-4D42-A1AD-CB68F7E0EEF6}", + "details": { + "name": "int" + } + } + ] + }, + { + "base": "Iterate_VM", + "context": "{A9AF6811-A281-5484-9A1B-4D036F173054}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Iterate_VM" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Iterate_VM is invoked" + }, + "details": { + "name": "Iterate_VM" + }, + "params": [ + { + "typeid": "{A9AF6811-A281-5484-9A1B-4D036F173054}", + "details": { + "name": "AZStd::unordered_map" + } + } + ], + "results": [ + { + "typeid": "{EC800112-2225-5C10-8540-B7CD6E5BB276}", + "details": { + "name": "Iterator_VM, AZStd::equal_to, allocator>>" + } + } + ] + }, + { + "base": "GetKeys", + "context": "{A9AF6811-A281-5484-9A1B-4D036F173054}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke GetKeys" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after GetKeys is invoked" + }, + "details": { + "name": "GetKeys" + }, + "params": [ + { + "typeid": "{A9AF6811-A281-5484-9A1B-4D036F173054}", + "details": { + "name": "AZStd::unordered_map" + } + } + ], + "results": [ + { + "typeid": "{4841CFF0-7A5C-519C-BD16-D3625E99605E}", + "details": { + "name": "AZStd::vector" + } + } + ] + }, + { + "base": "Size", + "context": "{A9AF6811-A281-5484-9A1B-4D036F173054}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Size" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Size is invoked" + }, + "details": { + "name": "Size" + }, + "params": [ + { + "typeid": "{A9AF6811-A281-5484-9A1B-4D036F173054}", + "details": { + "name": "AZStd::unordered_map" + } + } + ], + "results": [ + { + "typeid": "{72039442-EB38-4D42-A1AD-CB68F7E0EEF6}", + "details": { + "name": "int" + } + } + ] + }, + { + "base": "Erase", + "context": "{A9AF6811-A281-5484-9A1B-4D036F173054}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Erase" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Erase is invoked" + }, + "details": { + "name": "Erase" + }, + "params": [ + { + "typeid": "{A9AF6811-A281-5484-9A1B-4D036F173054}", + "details": { + "name": "AZStd::unordered_map" + } + }, + { + "typeid": "{6383F1D3-BB27-4E6B-A49A-6409B2059EAA}", + "details": { + "name": "EntityId", + "tooltip": "Entity Unique Id" + } + } + ], + "results": [ + { + "typeid": "{A9AF6811-A281-5484-9A1B-4D036F173054}", + "details": { + "name": "AZStd::unordered_map" + } + } + ] + }, + { + "base": "EraseCheck_VM", + "context": "{A9AF6811-A281-5484-9A1B-4D036F173054}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke EraseCheck_VM" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after EraseCheck_VM is invoked" + }, + "details": { + "name": "EraseCheck_VM" + }, + "params": [ + { + "typeid": "{A9AF6811-A281-5484-9A1B-4D036F173054}", + "details": { + "name": "AZStd::unordered_map" + } + }, + { + "typeid": "{6383F1D3-BB27-4E6B-A49A-6409B2059EAA}", + "details": { + "name": "EntityId", + "tooltip": "Entity Unique Id" + } + } + ], + "results": [ + { + "typeid": "{A0CA880C-AFE4-43CB-926C-59AC48496112}", + "details": { + "name": "bool" + } + } + ] + }, + { + "base": "Clear", + "context": "{A9AF6811-A281-5484-9A1B-4D036F173054}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Clear" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Clear is invoked" + }, + "details": { + "name": "Clear" + }, + "params": [ + { + "typeid": "{A9AF6811-A281-5484-9A1B-4D036F173054}", + "details": { + "name": "AZStd::unordered_map" + } + } + ], + "results": [ + { + "typeid": "{A9AF6811-A281-5484-9A1B-4D036F173054}", + "details": { + "name": "AZStd::unordered_map" + } + } + ] + }, + { + "base": "At", + "context": "{A9AF6811-A281-5484-9A1B-4D036F173054}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke At" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after At is invoked" + }, + "details": { + "name": "At" + }, + "params": [ + { + "typeid": "{A9AF6811-A281-5484-9A1B-4D036F173054}", + "details": { + "name": "AZStd::unordered_map" + } + }, + { + "typeid": "{6383F1D3-BB27-4E6B-A49A-6409B2059EAA}", + "details": { + "name": "EntityId", + "tooltip": "Entity Unique Id" + } + } + ], + "results": [ + { + "typeid": "{652ED536-3402-439B-AEBE-4A5DBC554085}", + "details": { + "name": "AssetId" + } + } + ] + }, + { + "base": "BucketCount", + "context": "{A9AF6811-A281-5484-9A1B-4D036F173054}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke BucketCount" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after BucketCount is invoked" + }, + "details": { + "name": "BucketCount" + }, + "params": [ + { + "typeid": "{A9AF6811-A281-5484-9A1B-4D036F173054}", + "details": { + "name": "AZStd::unordered_map" + } + } + ], + "results": [ + { + "typeid": "{D6597933-47CD-4FC8-B911-63F3E2B0993A}", + "details": { + "name": "AZ::u64" + } + } + ] + }, + { + "base": "Empty", + "context": "{A9AF6811-A281-5484-9A1B-4D036F173054}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Empty" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Empty is invoked" + }, + "details": { + "name": "Empty" + }, + "params": [ + { + "typeid": "{A9AF6811-A281-5484-9A1B-4D036F173054}", + "details": { + "name": "AZStd::unordered_map" + } + } + ], + "results": [ + { + "typeid": "{A0CA880C-AFE4-43CB-926C-59AC48496112}", + "details": { + "name": "bool" + } + } + ] + }, + { + "base": "Swap", + "context": "{A9AF6811-A281-5484-9A1B-4D036F173054}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Swap" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Swap is invoked" + }, + "details": { + "name": "Swap" + }, + "params": [ + { + "typeid": "{A9AF6811-A281-5484-9A1B-4D036F173054}", + "details": { + "name": "AZStd::unordered_map" + } + }, + { + "typeid": "{A9AF6811-A281-5484-9A1B-4D036F173054}", + "details": { + "name": "AZStd::unordered_map" + } + } + ] + } + ] + }, + { + "base": "{3349AACD-BE04-50BC-9478-528BF2ACFD55}", + "context": "OnDemandReflected", + "variant": "", + "details": { + "name": "Array", + "category": "Array", + "tooltip": "A dynamically sized container of elements." + }, + "methods": [ + { + "base": "Size", + "context": "{3349AACD-BE04-50BC-9478-528BF2ACFD55}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Size" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Size is invoked" + }, + "details": { + "name": "Size" + }, + "params": [ + { + "typeid": "{3349AACD-BE04-50BC-9478-528BF2ACFD55}", + "details": { + "name": "AZStd::vector" + } + } + ], + "results": [ + { + "typeid": "{72039442-EB38-4D42-A1AD-CB68F7E0EEF6}", + "details": { + "name": "int" + } + } + ] + }, + { + "base": "Front", + "context": "{3349AACD-BE04-50BC-9478-528BF2ACFD55}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Front" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Front is invoked" + }, + "details": { + "name": "Front" + }, + "params": [ + { + "typeid": "{3349AACD-BE04-50BC-9478-528BF2ACFD55}", + "details": { + "name": "AZStd::vector" + } + } + ], + "results": [ + { + "typeid": "{43DA906B-7DEF-4CA8-9790-854106D3F983}", + "details": { + "name": "unsigned int" + } + } + ] + }, + { + "base": "HasKey", + "context": "{3349AACD-BE04-50BC-9478-528BF2ACFD55}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Has Key" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Has Key is invoked" + }, + "details": { + "name": "Has Key" + }, + "params": [ + { + "typeid": "{3349AACD-BE04-50BC-9478-528BF2ACFD55}", + "details": { + "name": "AZStd::vector" + } + }, + { + "typeid": "{D6597933-47CD-4FC8-B911-63F3E2B0993A}", + "details": { + "name": "AZ::u64" + } + } + ], + "results": [ + { + "typeid": "{A0CA880C-AFE4-43CB-926C-59AC48496112}", + "details": { + "name": "bool" + } + } + ] + }, + { + "base": "Resize", + "context": "{3349AACD-BE04-50BC-9478-528BF2ACFD55}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Resize" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Resize is invoked" + }, + "details": { + "name": "Resize" + }, + "params": [ + { + "typeid": "{3349AACD-BE04-50BC-9478-528BF2ACFD55}", + "details": { + "name": "AZStd::vector" + } + }, + { + "typeid": "{D6597933-47CD-4FC8-B911-63F3E2B0993A}", + "details": { + "name": "AZ::u64" + } + } + ] + }, + { + "base": "at", + "context": "{3349AACD-BE04-50BC-9478-528BF2ACFD55}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke at" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after at is invoked" + }, + "details": { + "name": "at" + }, + "params": [ + { + "typeid": "{3349AACD-BE04-50BC-9478-528BF2ACFD55}", + "details": { + "name": "AZStd::vector" + } + }, + { + "typeid": "{D6597933-47CD-4FC8-B911-63F3E2B0993A}", + "details": { + "name": "AZ::u64" + } + } + ], + "results": [ + { + "typeid": "{43DA906B-7DEF-4CA8-9790-854106D3F983}", + "details": { + "name": "unsigned int" + } + } + ] + }, + { + "base": "Back", + "context": "{3349AACD-BE04-50BC-9478-528BF2ACFD55}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Back" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Back is invoked" + }, + "details": { + "name": "Back" + }, + "params": [ + { + "typeid": "{3349AACD-BE04-50BC-9478-528BF2ACFD55}", + "details": { + "name": "AZStd::vector" + } + } + ], + "results": [ + { + "typeid": "{43DA906B-7DEF-4CA8-9790-854106D3F983}", + "details": { + "name": "unsigned int" + } + } + ] + }, + { + "base": "pop_back", + "context": "{3349AACD-BE04-50BC-9478-528BF2ACFD55}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke pop_back" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after pop_back is invoked" + }, + "details": { + "name": "pop_back" + }, + "params": [ + { + "typeid": "{3349AACD-BE04-50BC-9478-528BF2ACFD55}", + "details": { + "name": "AZStd::vector" + } + } + ] + }, + { + "base": "size", + "context": "{3349AACD-BE04-50BC-9478-528BF2ACFD55}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke size" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after size is invoked" + }, + "details": { + "name": "size" + }, + "params": [ + { + "typeid": "{3349AACD-BE04-50BC-9478-528BF2ACFD55}", + "details": { + "name": "AZStd::vector" + } + } + ], + "results": [ + { + "typeid": "{72039442-EB38-4D42-A1AD-CB68F7E0EEF6}", + "details": { + "name": "int" + } + } + ] + }, + { + "base": "At", + "context": "{3349AACD-BE04-50BC-9478-528BF2ACFD55}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke At" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after At is invoked" + }, + "details": { + "name": "At" + }, + "params": [ + { + "typeid": "{3349AACD-BE04-50BC-9478-528BF2ACFD55}", + "details": { + "name": "AZStd::vector" + } + }, + { + "typeid": "{D6597933-47CD-4FC8-B911-63F3E2B0993A}", + "details": { + "name": "AZ::u64" + } + } + ], + "results": [ + { + "typeid": "{43DA906B-7DEF-4CA8-9790-854106D3F983}", + "details": { + "name": "unsigned int" + } + } + ] + }, + { + "base": "Empty", + "context": "{3349AACD-BE04-50BC-9478-528BF2ACFD55}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Empty" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Empty is invoked" + }, + "details": { + "name": "Empty" + }, + "params": [ + { + "typeid": "{3349AACD-BE04-50BC-9478-528BF2ACFD55}", + "details": { + "name": "AZStd::vector" + } + } + ], + "results": [ + { + "typeid": "{A0CA880C-AFE4-43CB-926C-59AC48496112}", + "details": { + "name": "bool" + } + } + ] + }, + { + "base": "Swap", + "context": "{3349AACD-BE04-50BC-9478-528BF2ACFD55}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Swap" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Swap is invoked" + }, + "details": { + "name": "Swap" + }, + "params": [ + { + "typeid": "{3349AACD-BE04-50BC-9478-528BF2ACFD55}", + "details": { + "name": "AZStd::vector" + } + }, + { + "typeid": "{3349AACD-BE04-50BC-9478-528BF2ACFD55}", + "details": { + "name": "AZStd::vector" + } + } + ] + }, + { + "base": "push_back", + "context": "{3349AACD-BE04-50BC-9478-528BF2ACFD55}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke push_back" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after push_back is invoked" + }, + "details": { + "name": "push_back" + }, + "params": [ + { + "typeid": "{3349AACD-BE04-50BC-9478-528BF2ACFD55}", + "details": { + "name": "AZStd::vector" + } + }, + { + "typeid": "{43DA906B-7DEF-4CA8-9790-854106D3F983}", + "details": { + "name": "unsigned int" + } + } + ] + }, + { + "base": "PushBack_VM", + "context": "{3349AACD-BE04-50BC-9478-528BF2ACFD55}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke PushBack_VM" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after PushBack_VM is invoked" + }, + "details": { + "name": "PushBack_VM" + }, + "params": [ + { + "typeid": "{3349AACD-BE04-50BC-9478-528BF2ACFD55}", + "details": { + "name": "AZStd::vector" + } + }, + { + "typeid": "{43DA906B-7DEF-4CA8-9790-854106D3F983}", + "details": { + "name": "unsigned int" + } + } + ], + "results": [ + { + "typeid": "{3349AACD-BE04-50BC-9478-528BF2ACFD55}", + "details": { + "name": "AZStd::vector" + } + } + ] + }, + { + "base": "AtUnchecked", + "context": "{3349AACD-BE04-50BC-9478-528BF2ACFD55}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke AtUnchecked" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after AtUnchecked is invoked" + }, + "details": { + "name": "AtUnchecked" + }, + "params": [ + { + "typeid": "{3349AACD-BE04-50BC-9478-528BF2ACFD55}", + "details": { + "name": "AZStd::vector" + } + }, + { + "typeid": "{D6597933-47CD-4FC8-B911-63F3E2B0993A}", + "details": { + "name": "AZ::u64" + } + } + ], + "results": [ + { + "typeid": "{43DA906B-7DEF-4CA8-9790-854106D3F983}", + "details": { + "name": "unsigned int" + } + } + ] + }, + { + "base": "clear", + "context": "{3349AACD-BE04-50BC-9478-528BF2ACFD55}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke clear" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after clear is invoked" + }, + "details": { + "name": "clear" + }, + "params": [ + { + "typeid": "{3349AACD-BE04-50BC-9478-528BF2ACFD55}", + "details": { + "name": "AZStd::vector" + } + } + ] + }, + { + "base": "NotEmpty", + "context": "{3349AACD-BE04-50BC-9478-528BF2ACFD55}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke NotEmpty" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after NotEmpty is invoked" + }, + "details": { + "name": "NotEmpty" + }, + "params": [ + { + "typeid": "{3349AACD-BE04-50BC-9478-528BF2ACFD55}", + "details": { + "name": "AZStd::vector" + } + } + ], + "results": [ + { + "typeid": "{A0CA880C-AFE4-43CB-926C-59AC48496112}", + "details": { + "name": "bool" + } + } + ] + }, + { + "base": "Erase_VM", + "context": "{3349AACD-BE04-50BC-9478-528BF2ACFD55}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Erase_VM" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Erase_VM is invoked" + }, + "details": { + "name": "Erase_VM" + }, + "params": [ + { + "typeid": "{3349AACD-BE04-50BC-9478-528BF2ACFD55}", + "details": { + "name": "AZStd::vector" + } + }, + { + "typeid": "{D6597933-47CD-4FC8-B911-63F3E2B0993A}", + "details": { + "name": "AZ::u64" + } + } + ], + "results": [ + { + "typeid": "{3349AACD-BE04-50BC-9478-528BF2ACFD55}", + "details": { + "name": "AZStd::vector" + } + } + ] + }, + { + "base": "EraseCheck_VM", + "context": "{3349AACD-BE04-50BC-9478-528BF2ACFD55}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke EraseCheck_VM" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after EraseCheck_VM is invoked" + }, + "details": { + "name": "EraseCheck_VM" + }, + "params": [ + { + "typeid": "{3349AACD-BE04-50BC-9478-528BF2ACFD55}", + "details": { + "name": "AZStd::vector" + } + }, + { + "typeid": "{D6597933-47CD-4FC8-B911-63F3E2B0993A}", + "details": { + "name": "AZ::u64" + } + } + ], + "results": [ + { + "typeid": "{A0CA880C-AFE4-43CB-926C-59AC48496112}", + "details": { + "name": "bool" + } + } + ] + }, + { + "base": "Capacity", + "context": "{3349AACD-BE04-50BC-9478-528BF2ACFD55}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Capacity" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Capacity is invoked" + }, + "details": { + "name": "Capacity" + }, + "params": [ + { + "typeid": "{3349AACD-BE04-50BC-9478-528BF2ACFD55}", + "details": { + "name": "AZStd::vector" + } + } + ], + "results": [ + { + "typeid": "{D6597933-47CD-4FC8-B911-63F3E2B0993A}", + "details": { + "name": "AZ::u64" + } + } + ] + }, + { + "base": "Clear", + "context": "{3349AACD-BE04-50BC-9478-528BF2ACFD55}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Clear" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Clear is invoked" + }, + "details": { + "name": "Clear" + }, + "params": [ + { + "typeid": "{3349AACD-BE04-50BC-9478-528BF2ACFD55}", + "details": { + "name": "AZStd::vector" + } + } + ], + "results": [ + { + "typeid": "{3349AACD-BE04-50BC-9478-528BF2ACFD55}", + "details": { + "name": "AZStd::vector" + } + } + ] + }, + { + "base": "AssignAt", + "context": "{3349AACD-BE04-50BC-9478-528BF2ACFD55}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke AssignAt" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after AssignAt is invoked" + }, + "details": { + "name": "AssignAt" + }, + "params": [ + { + "typeid": "{3349AACD-BE04-50BC-9478-528BF2ACFD55}", + "details": { + "name": "AZStd::vector" + } + }, + { + "typeid": "{D6597933-47CD-4FC8-B911-63F3E2B0993A}", + "details": { + "name": "AZ::u64" + } + }, + { + "typeid": "{43DA906B-7DEF-4CA8-9790-854106D3F983}", + "details": { + "name": "unsigned int" + } + } + ] + }, + { + "base": "GetSize", + "context": "{3349AACD-BE04-50BC-9478-528BF2ACFD55}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke GetSize" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after GetSize is invoked" + }, + "details": { + "name": "GetSize" + }, + "params": [ + { + "typeid": "{3349AACD-BE04-50BC-9478-528BF2ACFD55}", + "details": { + "name": "AZStd::vector" + } + } + ], + "results": [ + { + "typeid": "{72039442-EB38-4D42-A1AD-CB68F7E0EEF6}", + "details": { + "name": "int" + } + } + ] + }, + { + "base": "Insert", + "context": "{3349AACD-BE04-50BC-9478-528BF2ACFD55}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Insert" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Insert is invoked" + }, + "details": { + "name": "Insert" + }, + "params": [ + { + "typeid": "{3349AACD-BE04-50BC-9478-528BF2ACFD55}", + "details": { + "name": "AZStd::vector" + } + }, + { + "typeid": "{D6597933-47CD-4FC8-B911-63F3E2B0993A}", + "details": { + "name": "AZ::u64" + } + }, + { + "typeid": "{43DA906B-7DEF-4CA8-9790-854106D3F983}", + "details": { + "name": "unsigned int" + } + } + ], + "results": [ + { + "typeid": "{3349AACD-BE04-50BC-9478-528BF2ACFD55}", + "details": { + "name": "AZStd::vector" + } + } + ] + }, + { + "base": "PushBack", + "context": "{3349AACD-BE04-50BC-9478-528BF2ACFD55}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke PushBack" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after PushBack is invoked" + }, + "details": { + "name": "PushBack" + }, + "params": [ + { + "typeid": "{3349AACD-BE04-50BC-9478-528BF2ACFD55}", + "details": { + "name": "AZStd::vector" + } + }, + { + "typeid": "{43DA906B-7DEF-4CA8-9790-854106D3F983}", + "details": { + "name": "unsigned int" + } + } + ] + }, + { + "base": "Reserve", + "context": "{3349AACD-BE04-50BC-9478-528BF2ACFD55}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Reserve" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Reserve is invoked" + }, + "details": { + "name": "Reserve" + }, + "params": [ + { + "typeid": "{3349AACD-BE04-50BC-9478-528BF2ACFD55}", + "details": { + "name": "AZStd::vector" + } + }, + { + "typeid": "{D6597933-47CD-4FC8-B911-63F3E2B0993A}", + "details": { + "name": "AZ::u64" + } + } + ] + }, + { + "base": "Iterate_VM", + "context": "{3349AACD-BE04-50BC-9478-528BF2ACFD55}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Iterate_VM" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Iterate_VM is invoked" + }, + "details": { + "name": "Iterate_VM" + }, + "params": [ + { + "typeid": "{3349AACD-BE04-50BC-9478-528BF2ACFD55}", + "details": { + "name": "AZStd::vector" + } + } + ], + "results": [ + { + "typeid": "{2C13CD4A-D167-5D3F-AA1B-83C0B745C0C5}", + "details": { + "name": "Iterator_VM>" + } + } + ] + } + ] + }, + { + "base": "{C6B5A66B-6C0C-5D91-9CEE-88A5AEE507DC}", + "context": "OnDemandReflected", + "variant": "", + "details": { + "name": "Map", + "category": "Map", + "tooltip": "A collection of Key/Value pairs, where each Key value must be unique." + }, + "methods": [ + { + "base": "contains", + "context": "{C6B5A66B-6C0C-5D91-9CEE-88A5AEE507DC}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke contains" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after contains is invoked" + }, + "details": { + "name": "contains" + }, + "params": [ + { + "typeid": "{C6B5A66B-6C0C-5D91-9CEE-88A5AEE507DC}", + "details": { + "name": "AZStd::unordered_map" + } + }, + { + "typeid": "{A0CA880C-AFE4-43CB-926C-59AC48496112}", + "details": { + "name": "bool" + } + } + ], + "results": [ + { + "typeid": "{A0CA880C-AFE4-43CB-926C-59AC48496112}", + "details": { + "name": "bool" + } + } + ] + }, + { + "base": "Insert", + "context": "{C6B5A66B-6C0C-5D91-9CEE-88A5AEE507DC}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Insert" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Insert is invoked" + }, + "details": { + "name": "Insert" + }, + "params": [ + { + "typeid": "{C6B5A66B-6C0C-5D91-9CEE-88A5AEE507DC}", + "details": { + "name": "AZStd::unordered_map" + } + }, + { + "typeid": "{A0CA880C-AFE4-43CB-926C-59AC48496112}", + "details": { + "name": "bool" + } + }, + { + "typeid": "{7894072A-9050-4F0F-901B-34B1A0D29417}", + "details": { + "name": "Color" + } + } + ], + "results": [ + { + "typeid": "{C6B5A66B-6C0C-5D91-9CEE-88A5AEE507DC}", + "details": { + "name": "AZStd::unordered_map" + } + } + ] + }, + { + "base": "Reserve", + "context": "{C6B5A66B-6C0C-5D91-9CEE-88A5AEE507DC}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Reserve" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Reserve is invoked" + }, + "details": { + "name": "Reserve" + }, + "params": [ + { + "typeid": "{C6B5A66B-6C0C-5D91-9CEE-88A5AEE507DC}", + "details": { + "name": "AZStd::unordered_map" + } + }, + { + "typeid": "{D6597933-47CD-4FC8-B911-63F3E2B0993A}", + "details": { + "name": "AZ::u64" + } + } + ] + }, + { + "base": "GetSize", + "context": "{C6B5A66B-6C0C-5D91-9CEE-88A5AEE507DC}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke GetSize" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after GetSize is invoked" + }, + "details": { + "name": "GetSize" + }, + "params": [ + { + "typeid": "{C6B5A66B-6C0C-5D91-9CEE-88A5AEE507DC}", + "details": { + "name": "AZStd::unordered_map" + } + } + ], + "results": [ + { + "typeid": "{72039442-EB38-4D42-A1AD-CB68F7E0EEF6}", + "details": { + "name": "int" + } + } + ] + }, + { + "base": "Iterate_VM", + "context": "{C6B5A66B-6C0C-5D91-9CEE-88A5AEE507DC}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Iterate_VM" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Iterate_VM is invoked" + }, + "details": { + "name": "Iterate_VM" + }, + "params": [ + { + "typeid": "{C6B5A66B-6C0C-5D91-9CEE-88A5AEE507DC}", + "details": { + "name": "AZStd::unordered_map" + } + } + ], + "results": [ + { + "typeid": "{910FF3A3-EF9F-5E05-B979-B99C671D2D64}", + "details": { + "name": "Iterator_VM, AZStd::equal_to, allocator>>" + } + } + ] + }, + { + "base": "GetKeys", + "context": "{C6B5A66B-6C0C-5D91-9CEE-88A5AEE507DC}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke GetKeys" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after GetKeys is invoked" + }, + "details": { + "name": "GetKeys" + }, + "params": [ + { + "typeid": "{C6B5A66B-6C0C-5D91-9CEE-88A5AEE507DC}", + "details": { + "name": "AZStd::unordered_map" + } + } + ], + "results": [ + { + "typeid": "{B505B05D-57BF-5A45-9113-B3A2784E2CD7}", + "details": { + "name": "AZStd::vector" + } + } + ] + }, + { + "base": "Size", + "context": "{C6B5A66B-6C0C-5D91-9CEE-88A5AEE507DC}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Size" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Size is invoked" + }, + "details": { + "name": "Size" + }, + "params": [ + { + "typeid": "{C6B5A66B-6C0C-5D91-9CEE-88A5AEE507DC}", + "details": { + "name": "AZStd::unordered_map" + } + } + ], + "results": [ + { + "typeid": "{72039442-EB38-4D42-A1AD-CB68F7E0EEF6}", + "details": { + "name": "int" + } + } + ] + }, + { + "base": "Erase", + "context": "{C6B5A66B-6C0C-5D91-9CEE-88A5AEE507DC}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Erase" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Erase is invoked" + }, + "details": { + "name": "Erase" + }, + "params": [ + { + "typeid": "{C6B5A66B-6C0C-5D91-9CEE-88A5AEE507DC}", + "details": { + "name": "AZStd::unordered_map" + } + }, + { + "typeid": "{A0CA880C-AFE4-43CB-926C-59AC48496112}", + "details": { + "name": "bool" + } + } + ], + "results": [ + { + "typeid": "{C6B5A66B-6C0C-5D91-9CEE-88A5AEE507DC}", + "details": { + "name": "AZStd::unordered_map" + } + } + ] + }, + { + "base": "EraseCheck_VM", + "context": "{C6B5A66B-6C0C-5D91-9CEE-88A5AEE507DC}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke EraseCheck_VM" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after EraseCheck_VM is invoked" + }, + "details": { + "name": "EraseCheck_VM" + }, + "params": [ + { + "typeid": "{C6B5A66B-6C0C-5D91-9CEE-88A5AEE507DC}", + "details": { + "name": "AZStd::unordered_map" + } + }, + { + "typeid": "{A0CA880C-AFE4-43CB-926C-59AC48496112}", + "details": { + "name": "bool" + } + } + ], + "results": [ + { + "typeid": "{A0CA880C-AFE4-43CB-926C-59AC48496112}", + "details": { + "name": "bool" + } + } + ] + }, + { + "base": "Clear", + "context": "{C6B5A66B-6C0C-5D91-9CEE-88A5AEE507DC}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Clear" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Clear is invoked" + }, + "details": { + "name": "Clear" + }, + "params": [ + { + "typeid": "{C6B5A66B-6C0C-5D91-9CEE-88A5AEE507DC}", + "details": { + "name": "AZStd::unordered_map" + } + } + ], + "results": [ + { + "typeid": "{C6B5A66B-6C0C-5D91-9CEE-88A5AEE507DC}", + "details": { + "name": "AZStd::unordered_map" + } + } + ] + }, + { + "base": "At", + "context": "{C6B5A66B-6C0C-5D91-9CEE-88A5AEE507DC}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke At" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after At is invoked" + }, + "details": { + "name": "At" + }, + "params": [ + { + "typeid": "{C6B5A66B-6C0C-5D91-9CEE-88A5AEE507DC}", + "details": { + "name": "AZStd::unordered_map" + } + }, + { + "typeid": "{A0CA880C-AFE4-43CB-926C-59AC48496112}", + "details": { + "name": "bool" + } + } + ], + "results": [ + { + "typeid": "{7894072A-9050-4F0F-901B-34B1A0D29417}", + "details": { + "name": "Color" + } + } + ] + }, + { + "base": "BucketCount", + "context": "{C6B5A66B-6C0C-5D91-9CEE-88A5AEE507DC}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke BucketCount" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after BucketCount is invoked" + }, + "details": { + "name": "BucketCount" + }, + "params": [ + { + "typeid": "{C6B5A66B-6C0C-5D91-9CEE-88A5AEE507DC}", + "details": { + "name": "AZStd::unordered_map" + } + } + ], + "results": [ + { + "typeid": "{D6597933-47CD-4FC8-B911-63F3E2B0993A}", + "details": { + "name": "AZ::u64" + } + } + ] + }, + { + "base": "Empty", + "context": "{C6B5A66B-6C0C-5D91-9CEE-88A5AEE507DC}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Empty" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Empty is invoked" + }, + "details": { + "name": "Empty" + }, + "params": [ + { + "typeid": "{C6B5A66B-6C0C-5D91-9CEE-88A5AEE507DC}", + "details": { + "name": "AZStd::unordered_map" + } + } + ], + "results": [ + { + "typeid": "{A0CA880C-AFE4-43CB-926C-59AC48496112}", + "details": { + "name": "bool" + } + } + ] + }, + { + "base": "Swap", + "context": "{C6B5A66B-6C0C-5D91-9CEE-88A5AEE507DC}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Swap" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Swap is invoked" + }, + "details": { + "name": "Swap" + }, + "params": [ + { + "typeid": "{C6B5A66B-6C0C-5D91-9CEE-88A5AEE507DC}", + "details": { + "name": "AZStd::unordered_map" + } + }, + { + "typeid": "{C6B5A66B-6C0C-5D91-9CEE-88A5AEE507DC}", + "details": { + "name": "AZStd::unordered_map" + } + } + ] + } + ] + }, + { + "base": "{2B02AB33-C406-5E1C-9416-740FD3BD03A1}", + "context": "OnDemandReflected", + "variant": "", + "details": { + "name": "Map", + "category": "Map", + "tooltip": "A collection of Key/Value pairs, where each Key value must be unique." + }, + "methods": [ + { + "base": "contains", + "context": "{2B02AB33-C406-5E1C-9416-740FD3BD03A1}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke contains" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after contains is invoked" + }, + "details": { + "name": "contains" + }, + "params": [ + { + "typeid": "{2B02AB33-C406-5E1C-9416-740FD3BD03A1}", + "details": { + "name": "AZStd::unordered_map" + } + }, + { + "typeid": "{110C4B14-11A8-4E9D-8638-5051013A56AC}", + "details": { + "name": "double" + } + } + ], + "results": [ + { + "typeid": "{A0CA880C-AFE4-43CB-926C-59AC48496112}", + "details": { + "name": "bool" + } + } + ] + }, + { + "base": "Insert", + "context": "{2B02AB33-C406-5E1C-9416-740FD3BD03A1}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Insert" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Insert is invoked" + }, + "details": { + "name": "Insert" + }, + "params": [ + { + "typeid": "{2B02AB33-C406-5E1C-9416-740FD3BD03A1}", + "details": { + "name": "AZStd::unordered_map" + } + }, + { + "typeid": "{110C4B14-11A8-4E9D-8638-5051013A56AC}", + "details": { + "name": "double" + } + }, + { + "typeid": "{6383F1D3-BB27-4E6B-A49A-6409B2059EAA}", + "details": { + "name": "EntityId", + "tooltip": "Entity Unique Id" + } + } + ], + "results": [ + { + "typeid": "{2B02AB33-C406-5E1C-9416-740FD3BD03A1}", + "details": { + "name": "AZStd::unordered_map" + } + } + ] + }, + { + "base": "Reserve", + "context": "{2B02AB33-C406-5E1C-9416-740FD3BD03A1}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Reserve" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Reserve is invoked" + }, + "details": { + "name": "Reserve" + }, + "params": [ + { + "typeid": "{2B02AB33-C406-5E1C-9416-740FD3BD03A1}", + "details": { + "name": "AZStd::unordered_map" + } + }, + { + "typeid": "{D6597933-47CD-4FC8-B911-63F3E2B0993A}", + "details": { + "name": "AZ::u64" + } + } + ] + }, + { + "base": "GetSize", + "context": "{2B02AB33-C406-5E1C-9416-740FD3BD03A1}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke GetSize" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after GetSize is invoked" + }, + "details": { + "name": "GetSize" + }, + "params": [ + { + "typeid": "{2B02AB33-C406-5E1C-9416-740FD3BD03A1}", + "details": { + "name": "AZStd::unordered_map" + } + } + ], + "results": [ + { + "typeid": "{72039442-EB38-4D42-A1AD-CB68F7E0EEF6}", + "details": { + "name": "int" + } + } + ] + }, + { + "base": "Iterate_VM", + "context": "{2B02AB33-C406-5E1C-9416-740FD3BD03A1}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Iterate_VM" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Iterate_VM is invoked" + }, + "details": { + "name": "Iterate_VM" + }, + "params": [ + { + "typeid": "{2B02AB33-C406-5E1C-9416-740FD3BD03A1}", + "details": { + "name": "AZStd::unordered_map" + } + } + ], + "results": [ + { + "typeid": "{B042898F-3652-5A4A-9C49-518470A7E8EF}", + "details": { + "name": "Iterator_VM, AZStd::equal_to, allocator>>" + } + } + ] + }, + { + "base": "GetKeys", + "context": "{2B02AB33-C406-5E1C-9416-740FD3BD03A1}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke GetKeys" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after GetKeys is invoked" + }, + "details": { + "name": "GetKeys" + }, + "params": [ + { + "typeid": "{2B02AB33-C406-5E1C-9416-740FD3BD03A1}", + "details": { + "name": "AZStd::unordered_map" + } + } + ], + "results": [ + { + "typeid": "{F31F64EA-E384-5536-ACD6-8F01849730FC}", + "details": { + "name": "AZStd::vector" + } + } + ] + }, + { + "base": "Size", + "context": "{2B02AB33-C406-5E1C-9416-740FD3BD03A1}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Size" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Size is invoked" + }, + "details": { + "name": "Size" + }, + "params": [ + { + "typeid": "{2B02AB33-C406-5E1C-9416-740FD3BD03A1}", + "details": { + "name": "AZStd::unordered_map" + } + } + ], + "results": [ + { + "typeid": "{72039442-EB38-4D42-A1AD-CB68F7E0EEF6}", + "details": { + "name": "int" + } + } + ] + }, + { + "base": "Erase", + "context": "{2B02AB33-C406-5E1C-9416-740FD3BD03A1}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Erase" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Erase is invoked" + }, + "details": { + "name": "Erase" + }, + "params": [ + { + "typeid": "{2B02AB33-C406-5E1C-9416-740FD3BD03A1}", + "details": { + "name": "AZStd::unordered_map" + } + }, + { + "typeid": "{110C4B14-11A8-4E9D-8638-5051013A56AC}", + "details": { + "name": "double" + } + } + ], + "results": [ + { + "typeid": "{2B02AB33-C406-5E1C-9416-740FD3BD03A1}", + "details": { + "name": "AZStd::unordered_map" + } + } + ] + }, + { + "base": "EraseCheck_VM", + "context": "{2B02AB33-C406-5E1C-9416-740FD3BD03A1}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke EraseCheck_VM" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after EraseCheck_VM is invoked" + }, + "details": { + "name": "EraseCheck_VM" + }, + "params": [ + { + "typeid": "{2B02AB33-C406-5E1C-9416-740FD3BD03A1}", + "details": { + "name": "AZStd::unordered_map" + } + }, + { + "typeid": "{110C4B14-11A8-4E9D-8638-5051013A56AC}", + "details": { + "name": "double" + } + } + ], + "results": [ + { + "typeid": "{A0CA880C-AFE4-43CB-926C-59AC48496112}", + "details": { + "name": "bool" + } + } + ] + }, + { + "base": "Clear", + "context": "{2B02AB33-C406-5E1C-9416-740FD3BD03A1}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Clear" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Clear is invoked" + }, + "details": { + "name": "Clear" + }, + "params": [ + { + "typeid": "{2B02AB33-C406-5E1C-9416-740FD3BD03A1}", + "details": { + "name": "AZStd::unordered_map" + } + } + ], + "results": [ + { + "typeid": "{2B02AB33-C406-5E1C-9416-740FD3BD03A1}", + "details": { + "name": "AZStd::unordered_map" + } + } + ] + }, + { + "base": "At", + "context": "{2B02AB33-C406-5E1C-9416-740FD3BD03A1}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke At" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after At is invoked" + }, + "details": { + "name": "At" + }, + "params": [ + { + "typeid": "{2B02AB33-C406-5E1C-9416-740FD3BD03A1}", + "details": { + "name": "AZStd::unordered_map" + } + }, + { + "typeid": "{110C4B14-11A8-4E9D-8638-5051013A56AC}", + "details": { + "name": "double" + } + } + ], + "results": [ + { + "typeid": "{6383F1D3-BB27-4E6B-A49A-6409B2059EAA}", + "details": { + "name": "EntityId", + "tooltip": "Entity Unique Id" + } + } + ] + }, + { + "base": "BucketCount", + "context": "{2B02AB33-C406-5E1C-9416-740FD3BD03A1}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke BucketCount" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after BucketCount is invoked" + }, + "details": { + "name": "BucketCount" + }, + "params": [ + { + "typeid": "{2B02AB33-C406-5E1C-9416-740FD3BD03A1}", + "details": { + "name": "AZStd::unordered_map" + } + } + ], + "results": [ + { + "typeid": "{D6597933-47CD-4FC8-B911-63F3E2B0993A}", + "details": { + "name": "AZ::u64" + } + } + ] + }, + { + "base": "Empty", + "context": "{2B02AB33-C406-5E1C-9416-740FD3BD03A1}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Empty" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Empty is invoked" + }, + "details": { + "name": "Empty" + }, + "params": [ + { + "typeid": "{2B02AB33-C406-5E1C-9416-740FD3BD03A1}", + "details": { + "name": "AZStd::unordered_map" + } + } + ], + "results": [ + { + "typeid": "{A0CA880C-AFE4-43CB-926C-59AC48496112}", + "details": { + "name": "bool" + } + } + ] + }, + { + "base": "Swap", + "context": "{2B02AB33-C406-5E1C-9416-740FD3BD03A1}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Swap" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Swap is invoked" + }, + "details": { + "name": "Swap" + }, + "params": [ + { + "typeid": "{2B02AB33-C406-5E1C-9416-740FD3BD03A1}", + "details": { + "name": "AZStd::unordered_map" + } + }, + { + "typeid": "{2B02AB33-C406-5E1C-9416-740FD3BD03A1}", + "details": { + "name": "AZStd::unordered_map" + } + } + ] + } + ] + }, + { + "base": "{53C0CD3E-D0FC-5D90-9E9B-EF364D430B08}", + "context": "OnDemandReflected", + "variant": "", + "details": { + "name": "Tuple" + }, + "methods": [ + { + "base": "Get0", + "context": "{53C0CD3E-D0FC-5D90-9E9B-EF364D430B08}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Get0" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Get0 is invoked" + }, + "details": { + "name": "Get0" + }, + "params": [ + { + "typeid": "{53C0CD3E-D0FC-5D90-9E9B-EF364D430B08}", + "details": { + "name": "AZStd::tuple" + } + } + ], + "results": [ + { + "typeid": "{9F4E062E-06A0-46D4-85DF-E0DA96467D3A}", + "details": { + "name": "Crc32" + } + } + ] + }, + { + "base": "Get1", + "context": "{53C0CD3E-D0FC-5D90-9E9B-EF364D430B08}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Get1" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Get1 is invoked" + }, + "details": { + "name": "Get1" + }, + "params": [ + { + "typeid": "{53C0CD3E-D0FC-5D90-9E9B-EF364D430B08}", + "details": { + "name": "AZStd::tuple" + } + } + ], + "results": [ + { + "typeid": "{72039442-EB38-4D42-A1AD-CB68F7E0EEF6}", + "details": { + "name": "int" + } + } + ] + }, + { + "base": "GetSize", + "context": "{53C0CD3E-D0FC-5D90-9E9B-EF364D430B08}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke GetSize" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after GetSize is invoked" + }, + "details": { + "name": "GetSize" + }, + "results": [ + { + "typeid": "{D6597933-47CD-4FC8-B911-63F3E2B0993A}", + "details": { + "name": "AZ::u64" + } + } + ] + } + ] + }, + { + "base": "{F2C799DF-2CC1-4DD8-91DC-18C2D517BAB0}", + "context": "OnDemandReflected", + "variant": "", + "details": { + "name": "MathPlane_VM" + }, + "methods": [ + { + "base": "GetPlaneEquationCoefficients", + "context": "{F2C799DF-2CC1-4DD8-91DC-18C2D517BAB0}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke GetPlaneEquationCoefficients" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after GetPlaneEquationCoefficients is invoked" + }, + "details": { + "name": "GetPlaneEquationCoefficients" + }, + "params": [ + { + "typeid": "{847DD984-9DBF-4789-8E25-E0334402E8AD}", + "details": { + "name": "Plane" + } + } + ], + "results": [ + { + "typeid": "{7352CD6D-91DA-536F-BFCC-BC513FB48B2D}", + "details": { + "name": "tuple" + } + } + ] + }, + { + "base": "GetDistance", + "context": "{F2C799DF-2CC1-4DD8-91DC-18C2D517BAB0}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke GetDistance" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after GetDistance is invoked" + }, + "details": { + "name": "GetDistance" + }, + "params": [ + { + "typeid": "{847DD984-9DBF-4789-8E25-E0334402E8AD}", + "details": { + "name": "Plane" + } + } + ], + "results": [ + { + "typeid": "{110C4B14-11A8-4E9D-8638-5051013A56AC}", + "details": { + "name": "double" + } + } + ] + }, + { + "base": "Project", + "context": "{F2C799DF-2CC1-4DD8-91DC-18C2D517BAB0}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Project" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Project is invoked" + }, + "details": { + "name": "Project" + }, + "params": [ + { + "typeid": "{847DD984-9DBF-4789-8E25-E0334402E8AD}", + "details": { + "name": "Plane" + } + }, + { + "typeid": "{8379EB7D-01FA-4538-B64B-A6543B4BE73D}", + "details": { + "name": "Vector3" + } + } + ], + "results": [ + { + "typeid": "{8379EB7D-01FA-4538-B64B-A6543B4BE73D}", + "details": { + "name": "Vector3" + } + } + ] + }, + { + "base": "FromNormalAndPoint", + "context": "{F2C799DF-2CC1-4DD8-91DC-18C2D517BAB0}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke FromNormalAndPoint" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after FromNormalAndPoint is invoked" + }, + "details": { + "name": "FromNormalAndPoint" + }, + "params": [ + { + "typeid": "{8379EB7D-01FA-4538-B64B-A6543B4BE73D}", + "details": { + "name": "Vector3" + } + }, + { + "typeid": "{8379EB7D-01FA-4538-B64B-A6543B4BE73D}", + "details": { + "name": "Vector3" + } + } + ], + "results": [ + { + "typeid": "{847DD984-9DBF-4789-8E25-E0334402E8AD}", + "details": { + "name": "Plane" + } + } + ] + }, + { + "base": "IsFinite", + "context": "{F2C799DF-2CC1-4DD8-91DC-18C2D517BAB0}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke IsFinite" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after IsFinite is invoked" + }, + "details": { + "name": "IsFinite" + }, + "params": [ + { + "typeid": "{847DD984-9DBF-4789-8E25-E0334402E8AD}", + "details": { + "name": "Plane" + } + } + ], + "results": [ + { + "typeid": "{A0CA880C-AFE4-43CB-926C-59AC48496112}", + "details": { + "name": "bool" + } + } + ] + }, + { + "base": "Transform", + "context": "{F2C799DF-2CC1-4DD8-91DC-18C2D517BAB0}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Transform" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Transform is invoked" + }, + "details": { + "name": "Transform" + }, + "params": [ + { + "typeid": "{847DD984-9DBF-4789-8E25-E0334402E8AD}", + "details": { + "name": "Plane" + } + }, + { + "typeid": "{5D9958E9-9F1E-4985-B532-FFFDE75FEDFD}", + "details": { + "name": "Transform" + } + } + ], + "results": [ + { + "typeid": "{847DD984-9DBF-4789-8E25-E0334402E8AD}", + "details": { + "name": "Plane" + } + } + ] + }, + { + "base": "DistanceToPoint", + "context": "{F2C799DF-2CC1-4DD8-91DC-18C2D517BAB0}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke DistanceToPoint" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after DistanceToPoint is invoked" + }, + "details": { + "name": "DistanceToPoint" + }, + "params": [ + { + "typeid": "{847DD984-9DBF-4789-8E25-E0334402E8AD}", + "details": { + "name": "Plane" + } + }, + { + "typeid": "{8379EB7D-01FA-4538-B64B-A6543B4BE73D}", + "details": { + "name": "Vector3" + } + } + ], + "results": [ + { + "typeid": "{110C4B14-11A8-4E9D-8638-5051013A56AC}", + "details": { + "name": "double" + } + } + ] + }, + { + "base": "FromCoefficients", + "context": "{F2C799DF-2CC1-4DD8-91DC-18C2D517BAB0}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke FromCoefficients" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after FromCoefficients is invoked" + }, + "details": { + "name": "FromCoefficients" + }, + "params": [ + { + "typeid": "{110C4B14-11A8-4E9D-8638-5051013A56AC}", + "details": { + "name": "double" + } + }, + { + "typeid": "{110C4B14-11A8-4E9D-8638-5051013A56AC}", + "details": { + "name": "double" + } + }, + { + "typeid": "{110C4B14-11A8-4E9D-8638-5051013A56AC}", + "details": { + "name": "double" + } + }, + { + "typeid": "{110C4B14-11A8-4E9D-8638-5051013A56AC}", + "details": { + "name": "double" + } + } + ], + "results": [ + { + "typeid": "{847DD984-9DBF-4789-8E25-E0334402E8AD}", + "details": { + "name": "Plane" + } + } + ] + }, + { + "base": "FromNormalAndDistance", + "context": "{F2C799DF-2CC1-4DD8-91DC-18C2D517BAB0}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke FromNormalAndDistance" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after FromNormalAndDistance is invoked" + }, + "details": { + "name": "FromNormalAndDistance" + }, + "params": [ + { + "typeid": "{8379EB7D-01FA-4538-B64B-A6543B4BE73D}", + "details": { + "name": "Vector3" + } + }, + { + "typeid": "{110C4B14-11A8-4E9D-8638-5051013A56AC}", + "details": { + "name": "double" + } + } + ], + "results": [ + { + "typeid": "{847DD984-9DBF-4789-8E25-E0334402E8AD}", + "details": { + "name": "Plane" + } + } + ] + }, + { + "base": "GetNormal", + "context": "{F2C799DF-2CC1-4DD8-91DC-18C2D517BAB0}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke GetNormal" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after GetNormal is invoked" + }, + "details": { + "name": "GetNormal" + }, + "params": [ + { + "typeid": "{847DD984-9DBF-4789-8E25-E0334402E8AD}", + "details": { + "name": "Plane" + } + } + ], + "results": [ + { + "typeid": "{8379EB7D-01FA-4538-B64B-A6543B4BE73D}", + "details": { + "name": "Vector3" + } + } + ] + } + ] + }, + { + "base": "{24BA43F8-220C-589A-AA28-EAF5949C48F3}", + "context": "OnDemandReflected", + "variant": "", + "details": { + "name": "Map", + "category": "Map", + "tooltip": "A collection of Key/Value pairs, where each Key value must be unique." + }, + "methods": [ + { + "base": "contains", + "context": "{24BA43F8-220C-589A-AA28-EAF5949C48F3}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke contains" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after contains is invoked" + }, + "details": { + "name": "contains" + }, + "params": [ + { + "typeid": "{24BA43F8-220C-589A-AA28-EAF5949C48F3}", + "details": { + "name": "AZStd::unordered_map" + } + }, + { + "typeid": "{A0CA880C-AFE4-43CB-926C-59AC48496112}", + "details": { + "name": "bool" + } + } + ], + "results": [ + { + "typeid": "{A0CA880C-AFE4-43CB-926C-59AC48496112}", + "details": { + "name": "bool" + } + } + ] + }, + { + "base": "Insert", + "context": "{24BA43F8-220C-589A-AA28-EAF5949C48F3}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Insert" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Insert is invoked" + }, + "details": { + "name": "Insert" + }, + "params": [ + { + "typeid": "{24BA43F8-220C-589A-AA28-EAF5949C48F3}", + "details": { + "name": "AZStd::unordered_map" + } + }, + { + "typeid": "{A0CA880C-AFE4-43CB-926C-59AC48496112}", + "details": { + "name": "bool" + } + }, + { + "typeid": "{A0CA880C-AFE4-43CB-926C-59AC48496112}", + "details": { + "name": "bool" + } + } + ], + "results": [ + { + "typeid": "{24BA43F8-220C-589A-AA28-EAF5949C48F3}", + "details": { + "name": "AZStd::unordered_map" + } + } + ] + }, + { + "base": "Reserve", + "context": "{24BA43F8-220C-589A-AA28-EAF5949C48F3}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Reserve" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Reserve is invoked" + }, + "details": { + "name": "Reserve" + }, + "params": [ + { + "typeid": "{24BA43F8-220C-589A-AA28-EAF5949C48F3}", + "details": { + "name": "AZStd::unordered_map" + } + }, + { + "typeid": "{D6597933-47CD-4FC8-B911-63F3E2B0993A}", + "details": { + "name": "AZ::u64" + } + } + ] + }, + { + "base": "GetSize", + "context": "{24BA43F8-220C-589A-AA28-EAF5949C48F3}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke GetSize" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after GetSize is invoked" + }, + "details": { + "name": "GetSize" + }, + "params": [ + { + "typeid": "{24BA43F8-220C-589A-AA28-EAF5949C48F3}", + "details": { + "name": "AZStd::unordered_map" + } + } + ], + "results": [ + { + "typeid": "{72039442-EB38-4D42-A1AD-CB68F7E0EEF6}", + "details": { + "name": "int" + } + } + ] + }, + { + "base": "Iterate_VM", + "context": "{24BA43F8-220C-589A-AA28-EAF5949C48F3}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Iterate_VM" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Iterate_VM is invoked" + }, + "details": { + "name": "Iterate_VM" + }, + "params": [ + { + "typeid": "{24BA43F8-220C-589A-AA28-EAF5949C48F3}", + "details": { + "name": "AZStd::unordered_map" + } + } + ], + "results": [ + { + "typeid": "{E554EA1E-4896-5819-B5A0-970CC10B3660}", + "details": { + "name": "Iterator_VM, AZStd::equal_to, allocator>>" + } + } + ] + }, + { + "base": "GetKeys", + "context": "{24BA43F8-220C-589A-AA28-EAF5949C48F3}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke GetKeys" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after GetKeys is invoked" + }, + "details": { + "name": "GetKeys" + }, + "params": [ + { + "typeid": "{24BA43F8-220C-589A-AA28-EAF5949C48F3}", + "details": { + "name": "AZStd::unordered_map" + } + } + ], + "results": [ + { + "typeid": "{B505B05D-57BF-5A45-9113-B3A2784E2CD7}", + "details": { + "name": "AZStd::vector" + } + } + ] + }, + { + "base": "Size", + "context": "{24BA43F8-220C-589A-AA28-EAF5949C48F3}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Size" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Size is invoked" + }, + "details": { + "name": "Size" + }, + "params": [ + { + "typeid": "{24BA43F8-220C-589A-AA28-EAF5949C48F3}", + "details": { + "name": "AZStd::unordered_map" + } + } + ], + "results": [ + { + "typeid": "{72039442-EB38-4D42-A1AD-CB68F7E0EEF6}", + "details": { + "name": "int" + } + } + ] + }, + { + "base": "Erase", + "context": "{24BA43F8-220C-589A-AA28-EAF5949C48F3}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Erase" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Erase is invoked" + }, + "details": { + "name": "Erase" + }, + "params": [ + { + "typeid": "{24BA43F8-220C-589A-AA28-EAF5949C48F3}", + "details": { + "name": "AZStd::unordered_map" + } + }, + { + "typeid": "{A0CA880C-AFE4-43CB-926C-59AC48496112}", + "details": { + "name": "bool" + } + } + ], + "results": [ + { + "typeid": "{24BA43F8-220C-589A-AA28-EAF5949C48F3}", + "details": { + "name": "AZStd::unordered_map" + } + } + ] + }, + { + "base": "EraseCheck_VM", + "context": "{24BA43F8-220C-589A-AA28-EAF5949C48F3}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke EraseCheck_VM" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after EraseCheck_VM is invoked" + }, + "details": { + "name": "EraseCheck_VM" + }, + "params": [ + { + "typeid": "{24BA43F8-220C-589A-AA28-EAF5949C48F3}", + "details": { + "name": "AZStd::unordered_map" + } + }, + { + "typeid": "{A0CA880C-AFE4-43CB-926C-59AC48496112}", + "details": { + "name": "bool" + } + } + ], + "results": [ + { + "typeid": "{A0CA880C-AFE4-43CB-926C-59AC48496112}", + "details": { + "name": "bool" + } + } + ] + }, + { + "base": "Clear", + "context": "{24BA43F8-220C-589A-AA28-EAF5949C48F3}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Clear" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Clear is invoked" + }, + "details": { + "name": "Clear" + }, + "params": [ + { + "typeid": "{24BA43F8-220C-589A-AA28-EAF5949C48F3}", + "details": { + "name": "AZStd::unordered_map" + } + } + ], + "results": [ + { + "typeid": "{24BA43F8-220C-589A-AA28-EAF5949C48F3}", + "details": { + "name": "AZStd::unordered_map" + } + } + ] + }, + { + "base": "At", + "context": "{24BA43F8-220C-589A-AA28-EAF5949C48F3}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke At" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after At is invoked" + }, + "details": { + "name": "At" + }, + "params": [ + { + "typeid": "{24BA43F8-220C-589A-AA28-EAF5949C48F3}", + "details": { + "name": "AZStd::unordered_map" + } + }, + { + "typeid": "{A0CA880C-AFE4-43CB-926C-59AC48496112}", + "details": { + "name": "bool" + } + } + ], + "results": [ + { + "typeid": "{A0CA880C-AFE4-43CB-926C-59AC48496112}", + "details": { + "name": "bool" + } + } + ] + }, + { + "base": "BucketCount", + "context": "{24BA43F8-220C-589A-AA28-EAF5949C48F3}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke BucketCount" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after BucketCount is invoked" + }, + "details": { + "name": "BucketCount" + }, + "params": [ + { + "typeid": "{24BA43F8-220C-589A-AA28-EAF5949C48F3}", + "details": { + "name": "AZStd::unordered_map" + } + } + ], + "results": [ + { + "typeid": "{D6597933-47CD-4FC8-B911-63F3E2B0993A}", + "details": { + "name": "AZ::u64" + } + } + ] + }, + { + "base": "Empty", + "context": "{24BA43F8-220C-589A-AA28-EAF5949C48F3}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Empty" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Empty is invoked" + }, + "details": { + "name": "Empty" + }, + "params": [ + { + "typeid": "{24BA43F8-220C-589A-AA28-EAF5949C48F3}", + "details": { + "name": "AZStd::unordered_map" + } + } + ], + "results": [ + { + "typeid": "{A0CA880C-AFE4-43CB-926C-59AC48496112}", + "details": { + "name": "bool" + } + } + ] + }, + { + "base": "Swap", + "context": "{24BA43F8-220C-589A-AA28-EAF5949C48F3}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Swap" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Swap is invoked" + }, + "details": { + "name": "Swap" + }, + "params": [ + { + "typeid": "{24BA43F8-220C-589A-AA28-EAF5949C48F3}", + "details": { + "name": "AZStd::unordered_map" + } + }, + { + "typeid": "{24BA43F8-220C-589A-AA28-EAF5949C48F3}", + "details": { + "name": "AZStd::unordered_map" + } + } + ] + } + ] + }, + { + "base": "{13D041F6-75FA-5093-AD85-827A2CEA1646}", + "context": "OnDemandReflected", + "variant": "", + "details": { + "name": "Array", + "category": "Array", + "tooltip": "A dynamically sized container of elements." + }, + "methods": [ + { + "base": "Size", + "context": "{13D041F6-75FA-5093-AD85-827A2CEA1646}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Size" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Size is invoked" + }, + "details": { + "name": "Size" + }, + "params": [ + { + "typeid": "{13D041F6-75FA-5093-AD85-827A2CEA1646}", + "details": { + "name": "AZStd::vector" + } + } + ], + "results": [ + { + "typeid": "{72039442-EB38-4D42-A1AD-CB68F7E0EEF6}", + "details": { + "name": "int" + } + } + ] + }, + { + "base": "Front", + "context": "{13D041F6-75FA-5093-AD85-827A2CEA1646}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Front" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Front is invoked" + }, + "details": { + "name": "Front" + }, + "params": [ + { + "typeid": "{13D041F6-75FA-5093-AD85-827A2CEA1646}", + "details": { + "name": "AZStd::vector" + } + } + ], + "results": [ + { + "typeid": "{07B9E2F7-5408-49E9-904D-CC1A9C33230E}", + "details": { + "name": "AZ::RPI::ShaderOptionDescriptor" + } + } + ] + }, + { + "base": "HasKey", + "context": "{13D041F6-75FA-5093-AD85-827A2CEA1646}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Has Key" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Has Key is invoked" + }, + "details": { + "name": "Has Key" + }, + "params": [ + { + "typeid": "{13D041F6-75FA-5093-AD85-827A2CEA1646}", + "details": { + "name": "AZStd::vector" + } + }, + { + "typeid": "{D6597933-47CD-4FC8-B911-63F3E2B0993A}", + "details": { + "name": "AZ::u64" + } + } + ], + "results": [ + { + "typeid": "{A0CA880C-AFE4-43CB-926C-59AC48496112}", + "details": { + "name": "bool" + } + } + ] + }, + { + "base": "Resize", + "context": "{13D041F6-75FA-5093-AD85-827A2CEA1646}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Resize" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Resize is invoked" + }, + "details": { + "name": "Resize" + }, + "params": [ + { + "typeid": "{13D041F6-75FA-5093-AD85-827A2CEA1646}", + "details": { + "name": "AZStd::vector" + } + }, + { + "typeid": "{D6597933-47CD-4FC8-B911-63F3E2B0993A}", + "details": { + "name": "AZ::u64" + } + } + ] + }, + { + "base": "at", + "context": "{13D041F6-75FA-5093-AD85-827A2CEA1646}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke at" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after at is invoked" + }, + "details": { + "name": "at" + }, + "params": [ + { + "typeid": "{13D041F6-75FA-5093-AD85-827A2CEA1646}", + "details": { + "name": "AZStd::vector" + } + }, + { + "typeid": "{D6597933-47CD-4FC8-B911-63F3E2B0993A}", + "details": { + "name": "AZ::u64" + } + } + ], + "results": [ + { + "typeid": "{07B9E2F7-5408-49E9-904D-CC1A9C33230E}", + "details": { + "name": "AZ::RPI::ShaderOptionDescriptor" + } + } + ] + }, + { + "base": "Back", + "context": "{13D041F6-75FA-5093-AD85-827A2CEA1646}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Back" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Back is invoked" + }, + "details": { + "name": "Back" + }, + "params": [ + { + "typeid": "{13D041F6-75FA-5093-AD85-827A2CEA1646}", + "details": { + "name": "AZStd::vector" + } + } + ], + "results": [ + { + "typeid": "{07B9E2F7-5408-49E9-904D-CC1A9C33230E}", + "details": { + "name": "AZ::RPI::ShaderOptionDescriptor" + } + } + ] + }, + { + "base": "pop_back", + "context": "{13D041F6-75FA-5093-AD85-827A2CEA1646}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke pop_back" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after pop_back is invoked" + }, + "details": { + "name": "pop_back" + }, + "params": [ + { + "typeid": "{13D041F6-75FA-5093-AD85-827A2CEA1646}", + "details": { + "name": "AZStd::vector" + } + } + ] + }, + { + "base": "size", + "context": "{13D041F6-75FA-5093-AD85-827A2CEA1646}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke size" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after size is invoked" + }, + "details": { + "name": "size" + }, + "params": [ + { + "typeid": "{13D041F6-75FA-5093-AD85-827A2CEA1646}", + "details": { + "name": "AZStd::vector" + } + } + ], + "results": [ + { + "typeid": "{72039442-EB38-4D42-A1AD-CB68F7E0EEF6}", + "details": { + "name": "int" + } + } + ] + }, + { + "base": "At", + "context": "{13D041F6-75FA-5093-AD85-827A2CEA1646}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke At" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after At is invoked" + }, + "details": { + "name": "At" + }, + "params": [ + { + "typeid": "{13D041F6-75FA-5093-AD85-827A2CEA1646}", + "details": { + "name": "AZStd::vector" + } + }, + { + "typeid": "{D6597933-47CD-4FC8-B911-63F3E2B0993A}", + "details": { + "name": "AZ::u64" + } + } + ], + "results": [ + { + "typeid": "{07B9E2F7-5408-49E9-904D-CC1A9C33230E}", + "details": { + "name": "AZ::RPI::ShaderOptionDescriptor" + } + } + ] + }, + { + "base": "Empty", + "context": "{13D041F6-75FA-5093-AD85-827A2CEA1646}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Empty" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Empty is invoked" + }, + "details": { + "name": "Empty" + }, + "params": [ + { + "typeid": "{13D041F6-75FA-5093-AD85-827A2CEA1646}", + "details": { + "name": "AZStd::vector" + } + } + ], + "results": [ + { + "typeid": "{A0CA880C-AFE4-43CB-926C-59AC48496112}", + "details": { + "name": "bool" + } + } + ] + }, + { + "base": "Swap", + "context": "{13D041F6-75FA-5093-AD85-827A2CEA1646}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Swap" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Swap is invoked" + }, + "details": { + "name": "Swap" + }, + "params": [ + { + "typeid": "{13D041F6-75FA-5093-AD85-827A2CEA1646}", + "details": { + "name": "AZStd::vector" + } + }, + { + "typeid": "{13D041F6-75FA-5093-AD85-827A2CEA1646}", + "details": { + "name": "AZStd::vector" + } + } + ] + }, + { + "base": "push_back", + "context": "{13D041F6-75FA-5093-AD85-827A2CEA1646}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke push_back" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after push_back is invoked" + }, + "details": { + "name": "push_back" + }, + "params": [ + { + "typeid": "{13D041F6-75FA-5093-AD85-827A2CEA1646}", + "details": { + "name": "AZStd::vector" + } + }, + { + "typeid": "{07B9E2F7-5408-49E9-904D-CC1A9C33230E}", + "details": { + "name": "AZ::RPI::ShaderOptionDescriptor" + } + } + ] + }, + { + "base": "PushBack_VM", + "context": "{13D041F6-75FA-5093-AD85-827A2CEA1646}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke PushBack_VM" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after PushBack_VM is invoked" + }, + "details": { + "name": "PushBack_VM" + }, + "params": [ + { + "typeid": "{13D041F6-75FA-5093-AD85-827A2CEA1646}", + "details": { + "name": "AZStd::vector" + } + }, + { + "typeid": "{07B9E2F7-5408-49E9-904D-CC1A9C33230E}", + "details": { + "name": "AZ::RPI::ShaderOptionDescriptor" + } + } + ], + "results": [ + { + "typeid": "{13D041F6-75FA-5093-AD85-827A2CEA1646}", + "details": { + "name": "AZStd::vector" + } + } + ] + }, + { + "base": "AtUnchecked", + "context": "{13D041F6-75FA-5093-AD85-827A2CEA1646}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke AtUnchecked" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after AtUnchecked is invoked" + }, + "details": { + "name": "AtUnchecked" + }, + "params": [ + { + "typeid": "{13D041F6-75FA-5093-AD85-827A2CEA1646}", + "details": { + "name": "AZStd::vector" + } + }, + { + "typeid": "{D6597933-47CD-4FC8-B911-63F3E2B0993A}", + "details": { + "name": "AZ::u64" + } + } + ], + "results": [ + { + "typeid": "{07B9E2F7-5408-49E9-904D-CC1A9C33230E}", + "details": { + "name": "AZ::RPI::ShaderOptionDescriptor" + } + } + ] + }, + { + "base": "clear", + "context": "{13D041F6-75FA-5093-AD85-827A2CEA1646}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke clear" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after clear is invoked" + }, + "details": { + "name": "clear" + }, + "params": [ + { + "typeid": "{13D041F6-75FA-5093-AD85-827A2CEA1646}", + "details": { + "name": "AZStd::vector" + } + } + ] + }, + { + "base": "NotEmpty", + "context": "{13D041F6-75FA-5093-AD85-827A2CEA1646}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke NotEmpty" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after NotEmpty is invoked" + }, + "details": { + "name": "NotEmpty" + }, + "params": [ + { + "typeid": "{13D041F6-75FA-5093-AD85-827A2CEA1646}", + "details": { + "name": "AZStd::vector" + } + } + ], + "results": [ + { + "typeid": "{A0CA880C-AFE4-43CB-926C-59AC48496112}", + "details": { + "name": "bool" + } + } + ] + }, + { + "base": "Erase_VM", + "context": "{13D041F6-75FA-5093-AD85-827A2CEA1646}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Erase_VM" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Erase_VM is invoked" + }, + "details": { + "name": "Erase_VM" + }, + "params": [ + { + "typeid": "{13D041F6-75FA-5093-AD85-827A2CEA1646}", + "details": { + "name": "AZStd::vector" + } + }, + { + "typeid": "{D6597933-47CD-4FC8-B911-63F3E2B0993A}", + "details": { + "name": "AZ::u64" + } + } + ], + "results": [ + { + "typeid": "{13D041F6-75FA-5093-AD85-827A2CEA1646}", + "details": { + "name": "AZStd::vector" + } + } + ] + }, + { + "base": "EraseCheck_VM", + "context": "{13D041F6-75FA-5093-AD85-827A2CEA1646}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke EraseCheck_VM" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after EraseCheck_VM is invoked" + }, + "details": { + "name": "EraseCheck_VM" + }, + "params": [ + { + "typeid": "{13D041F6-75FA-5093-AD85-827A2CEA1646}", + "details": { + "name": "AZStd::vector" + } + }, + { + "typeid": "{D6597933-47CD-4FC8-B911-63F3E2B0993A}", + "details": { + "name": "AZ::u64" + } + } + ], + "results": [ + { + "typeid": "{A0CA880C-AFE4-43CB-926C-59AC48496112}", + "details": { + "name": "bool" + } + } + ] + }, + { + "base": "Capacity", + "context": "{13D041F6-75FA-5093-AD85-827A2CEA1646}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Capacity" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Capacity is invoked" + }, + "details": { + "name": "Capacity" + }, + "params": [ + { + "typeid": "{13D041F6-75FA-5093-AD85-827A2CEA1646}", + "details": { + "name": "AZStd::vector" + } + } + ], + "results": [ + { + "typeid": "{D6597933-47CD-4FC8-B911-63F3E2B0993A}", + "details": { + "name": "AZ::u64" + } + } + ] + }, + { + "base": "Clear", + "context": "{13D041F6-75FA-5093-AD85-827A2CEA1646}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Clear" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Clear is invoked" + }, + "details": { + "name": "Clear" + }, + "params": [ + { + "typeid": "{13D041F6-75FA-5093-AD85-827A2CEA1646}", + "details": { + "name": "AZStd::vector" + } + } + ], + "results": [ + { + "typeid": "{13D041F6-75FA-5093-AD85-827A2CEA1646}", + "details": { + "name": "AZStd::vector" + } + } + ] + }, + { + "base": "AssignAt", + "context": "{13D041F6-75FA-5093-AD85-827A2CEA1646}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke AssignAt" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after AssignAt is invoked" + }, + "details": { + "name": "AssignAt" + }, + "params": [ + { + "typeid": "{13D041F6-75FA-5093-AD85-827A2CEA1646}", + "details": { + "name": "AZStd::vector" + } + }, + { + "typeid": "{D6597933-47CD-4FC8-B911-63F3E2B0993A}", + "details": { + "name": "AZ::u64" + } + }, + { + "typeid": "{07B9E2F7-5408-49E9-904D-CC1A9C33230E}", + "details": { + "name": "AZ::RPI::ShaderOptionDescriptor" + } + } + ] + }, + { + "base": "GetSize", + "context": "{13D041F6-75FA-5093-AD85-827A2CEA1646}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke GetSize" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after GetSize is invoked" + }, + "details": { + "name": "GetSize" + }, + "params": [ + { + "typeid": "{13D041F6-75FA-5093-AD85-827A2CEA1646}", + "details": { + "name": "AZStd::vector" + } + } + ], + "results": [ + { + "typeid": "{72039442-EB38-4D42-A1AD-CB68F7E0EEF6}", + "details": { + "name": "int" + } + } + ] + }, + { + "base": "Insert", + "context": "{13D041F6-75FA-5093-AD85-827A2CEA1646}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Insert" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Insert is invoked" + }, + "details": { + "name": "Insert" + }, + "params": [ + { + "typeid": "{13D041F6-75FA-5093-AD85-827A2CEA1646}", + "details": { + "name": "AZStd::vector" + } + }, + { + "typeid": "{D6597933-47CD-4FC8-B911-63F3E2B0993A}", + "details": { + "name": "AZ::u64" + } + }, + { + "typeid": "{07B9E2F7-5408-49E9-904D-CC1A9C33230E}", + "details": { + "name": "AZ::RPI::ShaderOptionDescriptor" + } + } + ], + "results": [ + { + "typeid": "{13D041F6-75FA-5093-AD85-827A2CEA1646}", + "details": { + "name": "AZStd::vector" + } + } + ] + }, + { + "base": "PushBack", + "context": "{13D041F6-75FA-5093-AD85-827A2CEA1646}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke PushBack" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after PushBack is invoked" + }, + "details": { + "name": "PushBack" + }, + "params": [ + { + "typeid": "{13D041F6-75FA-5093-AD85-827A2CEA1646}", + "details": { + "name": "AZStd::vector" + } + }, + { + "typeid": "{07B9E2F7-5408-49E9-904D-CC1A9C33230E}", + "details": { + "name": "AZ::RPI::ShaderOptionDescriptor" + } + } + ] + }, + { + "base": "Reserve", + "context": "{13D041F6-75FA-5093-AD85-827A2CEA1646}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Reserve" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Reserve is invoked" + }, + "details": { + "name": "Reserve" + }, + "params": [ + { + "typeid": "{13D041F6-75FA-5093-AD85-827A2CEA1646}", + "details": { + "name": "AZStd::vector" + } + }, + { + "typeid": "{D6597933-47CD-4FC8-B911-63F3E2B0993A}", + "details": { + "name": "AZ::u64" + } + } + ] + }, + { + "base": "Iterate_VM", + "context": "{13D041F6-75FA-5093-AD85-827A2CEA1646}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Iterate_VM" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Iterate_VM is invoked" + }, + "details": { + "name": "Iterate_VM" + }, + "params": [ + { + "typeid": "{13D041F6-75FA-5093-AD85-827A2CEA1646}", + "details": { + "name": "AZStd::vector" + } + } + ], + "results": [ + { + "typeid": "{FF1BF722-91DF-5420-9819-DD2DC7036625}", + "details": { + "name": "Iterator_VM>" + } + } + ] + } + ] + }, + { + "base": "{3127F618-4C25-512D-97E2-888640B6303D}", + "context": "OnDemandReflected", + "variant": "", + "details": { + "name": "Map", + "category": "Map", + "tooltip": "A collection of Key/Value pairs, where each Key value must be unique." + }, + "methods": [ + { + "base": "contains", + "context": "{3127F618-4C25-512D-97E2-888640B6303D}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke contains" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after contains is invoked" + }, + "details": { + "name": "contains" + }, + "params": [ + { + "typeid": "{3127F618-4C25-512D-97E2-888640B6303D}", + "details": { + "name": "AZStd::unordered_map" + } + }, + { + "typeid": "{9F4E062E-06A0-46D4-85DF-E0DA96467D3A}", + "details": { + "name": "Crc32" + } + } + ], + "results": [ + { + "typeid": "{A0CA880C-AFE4-43CB-926C-59AC48496112}", + "details": { + "name": "bool" + } + } + ] + }, + { + "base": "Insert", + "context": "{3127F618-4C25-512D-97E2-888640B6303D}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Insert" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Insert is invoked" + }, + "details": { + "name": "Insert" + }, + "params": [ + { + "typeid": "{3127F618-4C25-512D-97E2-888640B6303D}", + "details": { + "name": "AZStd::unordered_map" + } + }, + { + "typeid": "{9F4E062E-06A0-46D4-85DF-E0DA96467D3A}", + "details": { + "name": "Crc32" + } + }, + { + "typeid": "{6383F1D3-BB27-4E6B-A49A-6409B2059EAA}", + "details": { + "name": "EntityId", + "tooltip": "Entity Unique Id" + } + } + ], + "results": [ + { + "typeid": "{3127F618-4C25-512D-97E2-888640B6303D}", + "details": { + "name": "AZStd::unordered_map" + } + } + ] + }, + { + "base": "Reserve", + "context": "{3127F618-4C25-512D-97E2-888640B6303D}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Reserve" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Reserve is invoked" + }, + "details": { + "name": "Reserve" + }, + "params": [ + { + "typeid": "{3127F618-4C25-512D-97E2-888640B6303D}", + "details": { + "name": "AZStd::unordered_map" + } + }, + { + "typeid": "{D6597933-47CD-4FC8-B911-63F3E2B0993A}", + "details": { + "name": "AZ::u64" + } + } + ] + }, + { + "base": "GetSize", + "context": "{3127F618-4C25-512D-97E2-888640B6303D}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke GetSize" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after GetSize is invoked" + }, + "details": { + "name": "GetSize" + }, + "params": [ + { + "typeid": "{3127F618-4C25-512D-97E2-888640B6303D}", + "details": { + "name": "AZStd::unordered_map" + } + } + ], + "results": [ + { + "typeid": "{72039442-EB38-4D42-A1AD-CB68F7E0EEF6}", + "details": { + "name": "int" + } + } + ] + }, + { + "base": "Iterate_VM", + "context": "{3127F618-4C25-512D-97E2-888640B6303D}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Iterate_VM" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Iterate_VM is invoked" + }, + "details": { + "name": "Iterate_VM" + }, + "params": [ + { + "typeid": "{3127F618-4C25-512D-97E2-888640B6303D}", + "details": { + "name": "AZStd::unordered_map" + } + } + ], + "results": [ + { + "typeid": "{7781AFC8-827E-56AA-B4F1-16CAF308CADC}", + "details": { + "name": "Iterator_VM, AZStd::equal_to, allocator>>" + } + } + ] + }, + { + "base": "GetKeys", + "context": "{3127F618-4C25-512D-97E2-888640B6303D}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke GetKeys" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after GetKeys is invoked" + }, + "details": { + "name": "GetKeys" + }, + "params": [ + { + "typeid": "{3127F618-4C25-512D-97E2-888640B6303D}", + "details": { + "name": "AZStd::unordered_map" + } + } + ], + "results": [ + { + "typeid": "{287CEE87-6FF3-52FC-9D32-38255E2C7FE9}", + "details": { + "name": "AZStd::vector" + } + } + ] + }, + { + "base": "Size", + "context": "{3127F618-4C25-512D-97E2-888640B6303D}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Size" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Size is invoked" + }, + "details": { + "name": "Size" + }, + "params": [ + { + "typeid": "{3127F618-4C25-512D-97E2-888640B6303D}", + "details": { + "name": "AZStd::unordered_map" + } + } + ], + "results": [ + { + "typeid": "{72039442-EB38-4D42-A1AD-CB68F7E0EEF6}", + "details": { + "name": "int" + } + } + ] + }, + { + "base": "Erase", + "context": "{3127F618-4C25-512D-97E2-888640B6303D}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Erase" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Erase is invoked" + }, + "details": { + "name": "Erase" + }, + "params": [ + { + "typeid": "{3127F618-4C25-512D-97E2-888640B6303D}", + "details": { + "name": "AZStd::unordered_map" + } + }, + { + "typeid": "{9F4E062E-06A0-46D4-85DF-E0DA96467D3A}", + "details": { + "name": "Crc32" + } + } + ], + "results": [ + { + "typeid": "{3127F618-4C25-512D-97E2-888640B6303D}", + "details": { + "name": "AZStd::unordered_map" + } + } + ] + }, + { + "base": "EraseCheck_VM", + "context": "{3127F618-4C25-512D-97E2-888640B6303D}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke EraseCheck_VM" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after EraseCheck_VM is invoked" + }, + "details": { + "name": "EraseCheck_VM" + }, + "params": [ + { + "typeid": "{3127F618-4C25-512D-97E2-888640B6303D}", + "details": { + "name": "AZStd::unordered_map" + } + }, + { + "typeid": "{9F4E062E-06A0-46D4-85DF-E0DA96467D3A}", + "details": { + "name": "Crc32" + } + } + ], + "results": [ + { + "typeid": "{A0CA880C-AFE4-43CB-926C-59AC48496112}", + "details": { + "name": "bool" + } + } + ] + }, + { + "base": "Clear", + "context": "{3127F618-4C25-512D-97E2-888640B6303D}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Clear" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Clear is invoked" + }, + "details": { + "name": "Clear" + }, + "params": [ + { + "typeid": "{3127F618-4C25-512D-97E2-888640B6303D}", + "details": { + "name": "AZStd::unordered_map" + } + } + ], + "results": [ + { + "typeid": "{3127F618-4C25-512D-97E2-888640B6303D}", + "details": { + "name": "AZStd::unordered_map" + } + } + ] + }, + { + "base": "At", + "context": "{3127F618-4C25-512D-97E2-888640B6303D}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke At" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after At is invoked" + }, + "details": { + "name": "At" + }, + "params": [ + { + "typeid": "{3127F618-4C25-512D-97E2-888640B6303D}", + "details": { + "name": "AZStd::unordered_map" + } + }, + { + "typeid": "{9F4E062E-06A0-46D4-85DF-E0DA96467D3A}", + "details": { + "name": "Crc32" + } + } + ], + "results": [ + { + "typeid": "{6383F1D3-BB27-4E6B-A49A-6409B2059EAA}", + "details": { + "name": "EntityId", + "tooltip": "Entity Unique Id" + } + } + ] + }, + { + "base": "BucketCount", + "context": "{3127F618-4C25-512D-97E2-888640B6303D}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke BucketCount" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after BucketCount is invoked" + }, + "details": { + "name": "BucketCount" + }, + "params": [ + { + "typeid": "{3127F618-4C25-512D-97E2-888640B6303D}", + "details": { + "name": "AZStd::unordered_map" + } + } + ], + "results": [ + { + "typeid": "{D6597933-47CD-4FC8-B911-63F3E2B0993A}", + "details": { + "name": "AZ::u64" + } + } + ] + }, + { + "base": "Empty", + "context": "{3127F618-4C25-512D-97E2-888640B6303D}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Empty" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Empty is invoked" + }, + "details": { + "name": "Empty" + }, + "params": [ + { + "typeid": "{3127F618-4C25-512D-97E2-888640B6303D}", + "details": { + "name": "AZStd::unordered_map" + } + } + ], + "results": [ + { + "typeid": "{A0CA880C-AFE4-43CB-926C-59AC48496112}", + "details": { + "name": "bool" + } + } + ] + }, + { + "base": "Swap", + "context": "{3127F618-4C25-512D-97E2-888640B6303D}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Swap" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Swap is invoked" + }, + "details": { + "name": "Swap" + }, + "params": [ + { + "typeid": "{3127F618-4C25-512D-97E2-888640B6303D}", + "details": { + "name": "AZStd::unordered_map" + } + }, + { + "typeid": "{3127F618-4C25-512D-97E2-888640B6303D}", + "details": { + "name": "AZStd::unordered_map" + } + } + ] + } + ] + }, + { + "base": "{EC31903C-334D-5991-99E1-6B9A94A31423}", + "context": "OnDemandReflected", + "variant": "", + "details": { + "name": "Map", + "category": "Map", + "tooltip": "A collection of Key/Value pairs, where each Key value must be unique." + }, + "methods": [ + { + "base": "contains", + "context": "{EC31903C-334D-5991-99E1-6B9A94A31423}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke contains" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after contains is invoked" + }, + "details": { + "name": "contains" + }, + "params": [ + { + "typeid": "{EC31903C-334D-5991-99E1-6B9A94A31423}", + "details": { + "name": "AZStd::unordered_map" + } + }, + { + "typeid": "{03AAAB3F-5C47-5A66-9EBC-D5FA4DB353C9}", + "details": { + "name": "AZStd::string" + } + } + ], + "results": [ + { + "typeid": "{A0CA880C-AFE4-43CB-926C-59AC48496112}", + "details": { + "name": "bool" + } + } + ] + }, + { + "base": "Insert", + "context": "{EC31903C-334D-5991-99E1-6B9A94A31423}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Insert" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Insert is invoked" + }, + "details": { + "name": "Insert" + }, + "params": [ + { + "typeid": "{EC31903C-334D-5991-99E1-6B9A94A31423}", + "details": { + "name": "AZStd::unordered_map" + } + }, + { + "typeid": "{03AAAB3F-5C47-5A66-9EBC-D5FA4DB353C9}", + "details": { + "name": "AZStd::string" + } + }, + { + "typeid": "{004ABD25-CF14-4EB3-BD41-022C247C07FA}", + "details": { + "name": "Obb" + } + } + ], + "results": [ + { + "typeid": "{EC31903C-334D-5991-99E1-6B9A94A31423}", + "details": { + "name": "AZStd::unordered_map" + } + } + ] + }, + { + "base": "Reserve", + "context": "{EC31903C-334D-5991-99E1-6B9A94A31423}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Reserve" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Reserve is invoked" + }, + "details": { + "name": "Reserve" + }, + "params": [ + { + "typeid": "{EC31903C-334D-5991-99E1-6B9A94A31423}", + "details": { + "name": "AZStd::unordered_map" + } + }, + { + "typeid": "{D6597933-47CD-4FC8-B911-63F3E2B0993A}", + "details": { + "name": "AZ::u64" + } + } + ] + }, + { + "base": "GetSize", + "context": "{EC31903C-334D-5991-99E1-6B9A94A31423}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke GetSize" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after GetSize is invoked" + }, + "details": { + "name": "GetSize" + }, + "params": [ + { + "typeid": "{EC31903C-334D-5991-99E1-6B9A94A31423}", + "details": { + "name": "AZStd::unordered_map" + } + } + ], + "results": [ + { + "typeid": "{72039442-EB38-4D42-A1AD-CB68F7E0EEF6}", + "details": { + "name": "int" + } + } + ] + }, + { + "base": "Iterate_VM", + "context": "{EC31903C-334D-5991-99E1-6B9A94A31423}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Iterate_VM" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Iterate_VM is invoked" + }, + "details": { + "name": "Iterate_VM" + }, + "params": [ + { + "typeid": "{EC31903C-334D-5991-99E1-6B9A94A31423}", + "details": { + "name": "AZStd::unordered_map" + } + } + ], + "results": [ + { + "typeid": "{4D1248C7-A5C7-566F-8874-8649FB1A4379}", + "details": { + "name": "Iterator_VM, allocator>, Obb, AZStd::hash" + }, + "methods": [ + { + "base": "Get0", + "context": "{F31AA4C4-5A73-510B-BFD3-20ACE0D9CE67}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Get0" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Get0 is invoked" + }, + "details": { + "name": "Get0" + }, + "params": [ + { + "typeid": "{F31AA4C4-5A73-510B-BFD3-20ACE0D9CE67}", + "details": { + "name": "tuple&" + } + } + ], + "results": [ + { + "typeid": "{0CE9FA36-1E3A-4C06-9254-B7C73A732053}", + "details": { + "name": "Vector4" + } + } + ] + }, + { + "base": "Get1", + "context": "{F31AA4C4-5A73-510B-BFD3-20ACE0D9CE67}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Get1" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Get1 is invoked" + }, + "details": { + "name": "Get1" + }, + "params": [ + { + "typeid": "{F31AA4C4-5A73-510B-BFD3-20ACE0D9CE67}", + "details": { + "name": "tuple&" + } + } + ], + "results": [ + { + "typeid": "{110C4B14-11A8-4E9D-8638-5051013A56AC}", + "details": { + "name": "double" + } + } + ] + }, + { + "base": "GetSize", + "context": "{F31AA4C4-5A73-510B-BFD3-20ACE0D9CE67}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke GetSize" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after GetSize is invoked" + }, + "details": { + "name": "GetSize" + }, + "results": [ + { + "typeid": "{D6597933-47CD-4FC8-B911-63F3E2B0993A}", + "details": { + "name": "AZ::u64" + } + } + ] + } + ] + }, + { + "base": "{5FF88453-CF6E-5859-BF56-4F29CCBD73D4}", + "context": "OnDemandReflected", + "variant": "", + "details": { + "name": "Map", + "category": "Map", + "tooltip": "A collection of Key/Value pairs, where each Key value must be unique." + }, + "methods": [ + { + "base": "contains", + "context": "{5FF88453-CF6E-5859-BF56-4F29CCBD73D4}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke contains" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after contains is invoked" + }, + "details": { + "name": "contains" + }, + "params": [ + { + "typeid": "{5FF88453-CF6E-5859-BF56-4F29CCBD73D4}", + "details": { + "name": "AZStd::unordered_map" + } + }, + { + "typeid": "{9F4E062E-06A0-46D4-85DF-E0DA96467D3A}", + "details": { + "name": "Crc32" + } + } + ], + "results": [ + { + "typeid": "{A0CA880C-AFE4-43CB-926C-59AC48496112}", + "details": { + "name": "bool" + } + } + ] + }, + { + "base": "Insert", + "context": "{5FF88453-CF6E-5859-BF56-4F29CCBD73D4}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Insert" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Insert is invoked" + }, + "details": { + "name": "Insert" + }, + "params": [ + { + "typeid": "{5FF88453-CF6E-5859-BF56-4F29CCBD73D4}", + "details": { + "name": "AZStd::unordered_map" + } + }, + { + "typeid": "{9F4E062E-06A0-46D4-85DF-E0DA96467D3A}", + "details": { + "name": "Crc32" + } + }, + { + "typeid": "{157193C7-B673-4A2B-8B43-5681DCC3DEC3}", + "details": { + "name": "Matrix4x4" + } + } + ], + "results": [ + { + "typeid": "{5FF88453-CF6E-5859-BF56-4F29CCBD73D4}", + "details": { + "name": "AZStd::unordered_map" + } + } + ] + }, + { + "base": "Reserve", + "context": "{5FF88453-CF6E-5859-BF56-4F29CCBD73D4}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Reserve" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Reserve is invoked" + }, + "details": { + "name": "Reserve" + }, + "params": [ + { + "typeid": "{5FF88453-CF6E-5859-BF56-4F29CCBD73D4}", + "details": { + "name": "AZStd::unordered_map" + } + }, + { + "typeid": "{D6597933-47CD-4FC8-B911-63F3E2B0993A}", + "details": { + "name": "AZ::u64" + } + } + ] + }, + { + "base": "GetSize", + "context": "{5FF88453-CF6E-5859-BF56-4F29CCBD73D4}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke GetSize" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after GetSize is invoked" + }, + "details": { + "name": "GetSize" + }, + "params": [ + { + "typeid": "{5FF88453-CF6E-5859-BF56-4F29CCBD73D4}", + "details": { + "name": "AZStd::unordered_map" + } + } + ], + "results": [ + { + "typeid": "{72039442-EB38-4D42-A1AD-CB68F7E0EEF6}", + "details": { + "name": "int" + } + } + ] + }, + { + "base": "Iterate_VM", + "context": "{5FF88453-CF6E-5859-BF56-4F29CCBD73D4}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Iterate_VM" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Iterate_VM is invoked" + }, + "details": { + "name": "Iterate_VM" + }, + "params": [ + { + "typeid": "{5FF88453-CF6E-5859-BF56-4F29CCBD73D4}", + "details": { + "name": "AZStd::unordered_map" + } + } + ], + "results": [ + { + "typeid": "{A87248F2-3B54-57C4-B054-A53C43A7DDEE}", + "details": { + "name": "Iterator_VM, AZStd::equal_to, allocator>>" + } + } + ] + }, + { + "base": "GetKeys", + "context": "{5FF88453-CF6E-5859-BF56-4F29CCBD73D4}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke GetKeys" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after GetKeys is invoked" + }, + "details": { + "name": "GetKeys" + }, + "params": [ + { + "typeid": "{5FF88453-CF6E-5859-BF56-4F29CCBD73D4}", + "details": { + "name": "AZStd::unordered_map" + } + } + ], + "results": [ + { + "typeid": "{287CEE87-6FF3-52FC-9D32-38255E2C7FE9}", + "details": { + "name": "AZStd::vector" + } + } + ] + }, + { + "base": "Size", + "context": "{5FF88453-CF6E-5859-BF56-4F29CCBD73D4}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Size" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Size is invoked" + }, + "details": { + "name": "Size" + }, + "params": [ + { + "typeid": "{5FF88453-CF6E-5859-BF56-4F29CCBD73D4}", + "details": { + "name": "AZStd::unordered_map" + } + } + ], + "results": [ + { + "typeid": "{72039442-EB38-4D42-A1AD-CB68F7E0EEF6}", + "details": { + "name": "int" + } + } + ] + }, + { + "base": "Erase", + "context": "{5FF88453-CF6E-5859-BF56-4F29CCBD73D4}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Erase" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Erase is invoked" + }, + "details": { + "name": "Erase" + }, + "params": [ + { + "typeid": "{5FF88453-CF6E-5859-BF56-4F29CCBD73D4}", + "details": { + "name": "AZStd::unordered_map" + } + }, + { + "typeid": "{9F4E062E-06A0-46D4-85DF-E0DA96467D3A}", + "details": { + "name": "Crc32" + } + } + ], + "results": [ + { + "typeid": "{5FF88453-CF6E-5859-BF56-4F29CCBD73D4}", + "details": { + "name": "AZStd::unordered_map" + } + } + ] + }, + { + "base": "EraseCheck_VM", + "context": "{5FF88453-CF6E-5859-BF56-4F29CCBD73D4}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke EraseCheck_VM" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after EraseCheck_VM is invoked" + }, + "details": { + "name": "EraseCheck_VM" + }, + "params": [ + { + "typeid": "{5FF88453-CF6E-5859-BF56-4F29CCBD73D4}", + "details": { + "name": "AZStd::unordered_map" + } + }, + { + "typeid": "{9F4E062E-06A0-46D4-85DF-E0DA96467D3A}", + "details": { + "name": "Crc32" + } + } + ], + "results": [ + { + "typeid": "{A0CA880C-AFE4-43CB-926C-59AC48496112}", + "details": { + "name": "bool" + } + } + ] + }, + { + "base": "Clear", + "context": "{5FF88453-CF6E-5859-BF56-4F29CCBD73D4}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Clear" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Clear is invoked" + }, + "details": { + "name": "Clear" + }, + "params": [ + { + "typeid": "{5FF88453-CF6E-5859-BF56-4F29CCBD73D4}", + "details": { + "name": "AZStd::unordered_map" + } + } + ], + "results": [ + { + "typeid": "{5FF88453-CF6E-5859-BF56-4F29CCBD73D4}", + "details": { + "name": "AZStd::unordered_map" + } + } + ] + }, + { + "base": "At", + "context": "{5FF88453-CF6E-5859-BF56-4F29CCBD73D4}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke At" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after At is invoked" + }, + "details": { + "name": "At" + }, + "params": [ + { + "typeid": "{5FF88453-CF6E-5859-BF56-4F29CCBD73D4}", + "details": { + "name": "AZStd::unordered_map" + } + }, + { + "typeid": "{9F4E062E-06A0-46D4-85DF-E0DA96467D3A}", + "details": { + "name": "Crc32" + } + } + ], + "results": [ + { + "typeid": "{157193C7-B673-4A2B-8B43-5681DCC3DEC3}", + "details": { + "name": "Matrix4x4" + } + } + ] + }, + { + "base": "BucketCount", + "context": "{5FF88453-CF6E-5859-BF56-4F29CCBD73D4}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke BucketCount" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after BucketCount is invoked" + }, + "details": { + "name": "BucketCount" + }, + "params": [ + { + "typeid": "{5FF88453-CF6E-5859-BF56-4F29CCBD73D4}", + "details": { + "name": "AZStd::unordered_map" + } + } + ], + "results": [ + { + "typeid": "{D6597933-47CD-4FC8-B911-63F3E2B0993A}", + "details": { + "name": "AZ::u64" + } + } + ] + }, + { + "base": "Empty", + "context": "{5FF88453-CF6E-5859-BF56-4F29CCBD73D4}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Empty" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Empty is invoked" + }, + "details": { + "name": "Empty" + }, + "params": [ + { + "typeid": "{5FF88453-CF6E-5859-BF56-4F29CCBD73D4}", + "details": { + "name": "AZStd::unordered_map" + } + } + ], + "results": [ + { + "typeid": "{A0CA880C-AFE4-43CB-926C-59AC48496112}", + "details": { + "name": "bool" + } + } + ] + }, + { + "base": "Swap", + "context": "{5FF88453-CF6E-5859-BF56-4F29CCBD73D4}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Swap" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Swap is invoked" + }, + "details": { + "name": "Swap" + }, + "params": [ + { + "typeid": "{5FF88453-CF6E-5859-BF56-4F29CCBD73D4}", + "details": { + "name": "AZStd::unordered_map" + } + }, + { + "typeid": "{5FF88453-CF6E-5859-BF56-4F29CCBD73D4}", + "details": { + "name": "AZStd::unordered_map" + } + } + ] + } + ] + }, + { + "base": "{E1CD6BDA-AB0E-5B5A-8DDA-AFEF7A94FD06}", + "context": "OnDemandReflected", + "variant": "", + "details": { + "name": "Map", + "category": "Map", + "tooltip": "A collection of Key/Value pairs, where each Key value must be unique." + }, + "methods": [ + { + "base": "contains", + "context": "{E1CD6BDA-AB0E-5B5A-8DDA-AFEF7A94FD06}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke contains" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after contains is invoked" + }, + "details": { + "name": "contains" + }, + "params": [ + { + "typeid": "{E1CD6BDA-AB0E-5B5A-8DDA-AFEF7A94FD06}", + "details": { + "name": "AZStd::unordered_map" + } + }, + { + "typeid": "{03AAAB3F-5C47-5A66-9EBC-D5FA4DB353C9}", + "details": { + "name": "AZStd::string" + } + } + ], + "results": [ + { + "typeid": "{A0CA880C-AFE4-43CB-926C-59AC48496112}", + "details": { + "name": "bool" + } + } + ] + }, + { + "base": "Insert", + "context": "{E1CD6BDA-AB0E-5B5A-8DDA-AFEF7A94FD06}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Insert" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Insert is invoked" + }, + "details": { + "name": "Insert" + }, + "params": [ + { + "typeid": "{E1CD6BDA-AB0E-5B5A-8DDA-AFEF7A94FD06}", + "details": { + "name": "AZStd::unordered_map" + } + }, + { + "typeid": "{03AAAB3F-5C47-5A66-9EBC-D5FA4DB353C9}", + "details": { + "name": "AZStd::string" + } + }, + { + "typeid": "{9F4E062E-06A0-46D4-85DF-E0DA96467D3A}", + "details": { + "name": "Crc32" + } + } + ], + "results": [ + { + "typeid": "{E1CD6BDA-AB0E-5B5A-8DDA-AFEF7A94FD06}", + "details": { + "name": "AZStd::unordered_map" + } + } + ] + }, + { + "base": "Reserve", + "context": "{E1CD6BDA-AB0E-5B5A-8DDA-AFEF7A94FD06}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Reserve" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Reserve is invoked" + }, + "details": { + "name": "Reserve" + }, + "params": [ + { + "typeid": "{E1CD6BDA-AB0E-5B5A-8DDA-AFEF7A94FD06}", + "details": { + "name": "AZStd::unordered_map" + } + }, + { + "typeid": "{D6597933-47CD-4FC8-B911-63F3E2B0993A}", + "details": { + "name": "AZ::u64" + } + } + ] + }, + { + "base": "GetSize", + "context": "{E1CD6BDA-AB0E-5B5A-8DDA-AFEF7A94FD06}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke GetSize" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after GetSize is invoked" + }, + "details": { + "name": "GetSize" + }, + "params": [ + { + "typeid": "{E1CD6BDA-AB0E-5B5A-8DDA-AFEF7A94FD06}", + "details": { + "name": "AZStd::unordered_map" + } + } + ], + "results": [ + { + "typeid": "{72039442-EB38-4D42-A1AD-CB68F7E0EEF6}", + "details": { + "name": "int" + } + } + ] + }, + { + "base": "Iterate_VM", + "context": "{E1CD6BDA-AB0E-5B5A-8DDA-AFEF7A94FD06}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Iterate_VM" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Iterate_VM is invoked" + }, + "details": { + "name": "Iterate_VM" + }, + "params": [ + { + "typeid": "{E1CD6BDA-AB0E-5B5A-8DDA-AFEF7A94FD06}", + "details": { + "name": "AZStd::unordered_map" + } + } + ], + "results": [ + { + "typeid": "{9F3F2E3C-39C3-58E7-AFA1-D6D4782D1D65}", + "details": { + "name": "Iterator_VM, allocator>, Crc32, AZStd::hash" + }, + "methods": [ + { + "base": "IsLoading", + "context": "{C3B16018-28FB-5CFE-B871-25B6E2F0B110}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke IsLoading" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after IsLoading is invoked" + }, + "details": { + "name": "IsLoading" + }, + "params": [ + { + "typeid": "{C3B16018-28FB-5CFE-B871-25B6E2F0B110}", + "details": { + "name": "Asset" + } + } + ], + "results": [ + { + "typeid": "{A0CA880C-AFE4-43CB-926C-59AC48496112}", + "details": { + "name": "bool" + } + } + ] + }, + { + "base": "GetType", + "context": "{C3B16018-28FB-5CFE-B871-25B6E2F0B110}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke GetType" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after GetType is invoked" + }, + "details": { + "name": "GetType" + }, + "params": [ + { + "typeid": "{C3B16018-28FB-5CFE-B871-25B6E2F0B110}", + "details": { + "name": "Asset" + } + } + ], + "results": [ + { + "typeid": "{E152C105-A133-4D03-BBF8-3D4B2FBA3E2A}", + "details": { + "name": "AZ::Uuid" + } + } + ] + }, + { + "base": "IsError", + "context": "{C3B16018-28FB-5CFE-B871-25B6E2F0B110}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke IsError" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after IsError is invoked" + }, + "details": { + "name": "IsError" + }, + "params": [ + { + "typeid": "{C3B16018-28FB-5CFE-B871-25B6E2F0B110}", + "details": { + "name": "Asset" + } + } + ], + "results": [ + { + "typeid": "{A0CA880C-AFE4-43CB-926C-59AC48496112}", + "details": { + "name": "bool" + } + } + ] + }, + { + "base": "GetHint", + "context": "{C3B16018-28FB-5CFE-B871-25B6E2F0B110}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke GetHint" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after GetHint is invoked" + }, + "details": { + "name": "GetHint" + }, + "params": [ + { + "typeid": "{C3B16018-28FB-5CFE-B871-25B6E2F0B110}", + "details": { + "name": "Asset" + } + } + ], + "results": [ + { + "typeid": "{03AAAB3F-5C47-5A66-9EBC-D5FA4DB353C9}", + "details": { + "name": "AZStd::string" + } + } + ] + }, + { + "base": "GetData", + "context": "{C3B16018-28FB-5CFE-B871-25B6E2F0B110}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke GetData" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after GetData is invoked" + }, + "details": { + "name": "GetData" + }, + "params": [ + { + "typeid": "{C3B16018-28FB-5CFE-B871-25B6E2F0B110}", + "details": { + "name": "Asset" + } + } + ], + "results": [ + { + "typeid": "{AF3F7D32-1536-422A-89F3-A11E1F5B5A9C}", + "details": { + "name": "AssetData" + } + } + ] + }, + { + "base": "IsReady", + "context": "{C3B16018-28FB-5CFE-B871-25B6E2F0B110}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke IsReady" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after IsReady is invoked" + }, + "details": { + "name": "IsReady" + }, + "params": [ + { + "typeid": "{C3B16018-28FB-5CFE-B871-25B6E2F0B110}", + "details": { + "name": "Asset" + } + } + ], + "results": [ + { + "typeid": "{A0CA880C-AFE4-43CB-926C-59AC48496112}", + "details": { + "name": "bool" + } + } + ] + }, + { + "base": "GetStatus", + "context": "{C3B16018-28FB-5CFE-B871-25B6E2F0B110}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke GetStatus" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after GetStatus is invoked" + }, + "details": { + "name": "GetStatus" + }, + "params": [ + { + "typeid": "{C3B16018-28FB-5CFE-B871-25B6E2F0B110}", + "details": { + "name": "Asset" + } + } + ], + "results": [ + { + "typeid": "{72039442-EB38-4D42-A1AD-CB68F7E0EEF6}", + "details": { + "name": "int" + } + } + ] + }, + { + "base": "GetId", + "context": "{C3B16018-28FB-5CFE-B871-25B6E2F0B110}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke GetId" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after GetId is invoked" + }, + "details": { + "name": "GetId" + }, + "params": [ + { + "typeid": "{C3B16018-28FB-5CFE-B871-25B6E2F0B110}", + "details": { + "name": "Asset" + } + } + ], + "results": [ + { + "typeid": "{652ED536-3402-439B-AEBE-4A5DBC554085}", + "details": { + "name": "AssetId" + } + } + ] + } + ] + }, + { + "base": "{D96F5CA8-E7CE-5786-8C89-9D779A263909}", + "context": "OnDemandReflected", + "variant": "", + "details": { + "name": "Map", + "category": "Map", + "tooltip": "A collection of Key/Value pairs, where each Key value must be unique." + }, + "methods": [ + { + "base": "contains", + "context": "{D96F5CA8-E7CE-5786-8C89-9D779A263909}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke contains" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after contains is invoked" + }, + "details": { + "name": "contains" + }, + "params": [ + { + "typeid": "{D96F5CA8-E7CE-5786-8C89-9D779A263909}", + "details": { + "name": "AZStd::unordered_map" + } + }, + { + "typeid": "{03AAAB3F-5C47-5A66-9EBC-D5FA4DB353C9}", + "details": { + "name": "AZStd::string" + } + } + ], + "results": [ + { + "typeid": "{A0CA880C-AFE4-43CB-926C-59AC48496112}", + "details": { + "name": "bool" + } + } + ] + }, + { + "base": "Insert", + "context": "{D96F5CA8-E7CE-5786-8C89-9D779A263909}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Insert" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Insert is invoked" + }, + "details": { + "name": "Insert" + }, + "params": [ + { + "typeid": "{D96F5CA8-E7CE-5786-8C89-9D779A263909}", + "details": { + "name": "AZStd::unordered_map" + } + }, + { + "typeid": "{03AAAB3F-5C47-5A66-9EBC-D5FA4DB353C9}", + "details": { + "name": "AZStd::string" + } + }, + { + "typeid": "{15A4332F-7C3F-4A58-AC35-50E1CE53FB9C}", + "details": { + "name": "Matrix3x3" + } + } + ], + "results": [ + { + "typeid": "{D96F5CA8-E7CE-5786-8C89-9D779A263909}", + "details": { + "name": "AZStd::unordered_map" + } + } + ] + }, + { + "base": "Reserve", + "context": "{D96F5CA8-E7CE-5786-8C89-9D779A263909}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Reserve" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Reserve is invoked" + }, + "details": { + "name": "Reserve" + }, + "params": [ + { + "typeid": "{D96F5CA8-E7CE-5786-8C89-9D779A263909}", + "details": { + "name": "AZStd::unordered_map" + } + }, + { + "typeid": "{D6597933-47CD-4FC8-B911-63F3E2B0993A}", + "details": { + "name": "AZ::u64" + } + } + ] + }, + { + "base": "GetSize", + "context": "{D96F5CA8-E7CE-5786-8C89-9D779A263909}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke GetSize" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after GetSize is invoked" + }, + "details": { + "name": "GetSize" + }, + "params": [ + { + "typeid": "{D96F5CA8-E7CE-5786-8C89-9D779A263909}", + "details": { + "name": "AZStd::unordered_map" + } + } + ], + "results": [ + { + "typeid": "{72039442-EB38-4D42-A1AD-CB68F7E0EEF6}", + "details": { + "name": "int" + } + } + ] + }, + { + "base": "Iterate_VM", + "context": "{D96F5CA8-E7CE-5786-8C89-9D779A263909}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Iterate_VM" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Iterate_VM is invoked" + }, + "details": { + "name": "Iterate_VM" + }, + "params": [ + { + "typeid": "{D96F5CA8-E7CE-5786-8C89-9D779A263909}", + "details": { + "name": "AZStd::unordered_map" + } + } + ], + "results": [ + { + "typeid": "{455B89A5-92FE-56C9-A9EF-E282F4481DAA}", + "details": { + "name": "Iterator_VM, allocator>, Matrix3x3, AZStd::hash", + "category": "Map", + "tooltip": "A collection of Key/Value pairs, where each Key value must be unique." + }, + "methods": [ + { + "base": "contains", + "context": "{9EB5F5B2-ED76-5142-A631-4FF058C1B1F9}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke contains" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after contains is invoked" + }, + "details": { + "name": "contains" + }, + "params": [ + { + "typeid": "{9EB5F5B2-ED76-5142-A631-4FF058C1B1F9}", + "details": { + "name": "AZStd::unordered_map" + } + }, + { + "typeid": "{652ED536-3402-439B-AEBE-4A5DBC554085}", + "details": { + "name": "AssetId" + } + } + ], + "results": [ + { + "typeid": "{A0CA880C-AFE4-43CB-926C-59AC48496112}", + "details": { + "name": "bool" + } + } + ] + }, + { + "base": "Insert", + "context": "{9EB5F5B2-ED76-5142-A631-4FF058C1B1F9}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Insert" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Insert is invoked" + }, + "details": { + "name": "Insert" + }, + "params": [ + { + "typeid": "{9EB5F5B2-ED76-5142-A631-4FF058C1B1F9}", + "details": { + "name": "AZStd::unordered_map" + } + }, + { + "typeid": "{652ED536-3402-439B-AEBE-4A5DBC554085}", + "details": { + "name": "AssetId" + } + }, + { + "typeid": "{652ED536-3402-439B-AEBE-4A5DBC554085}", + "details": { + "name": "AssetId" + } + } + ], + "results": [ + { + "typeid": "{9EB5F5B2-ED76-5142-A631-4FF058C1B1F9}", + "details": { + "name": "AZStd::unordered_map" + } + } + ] + }, + { + "base": "Reserve", + "context": "{9EB5F5B2-ED76-5142-A631-4FF058C1B1F9}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Reserve" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Reserve is invoked" + }, + "details": { + "name": "Reserve" + }, + "params": [ + { + "typeid": "{9EB5F5B2-ED76-5142-A631-4FF058C1B1F9}", + "details": { + "name": "AZStd::unordered_map" + } + }, + { + "typeid": "{D6597933-47CD-4FC8-B911-63F3E2B0993A}", + "details": { + "name": "AZ::u64" + } + } + ] + }, + { + "base": "GetSize", + "context": "{9EB5F5B2-ED76-5142-A631-4FF058C1B1F9}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke GetSize" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after GetSize is invoked" + }, + "details": { + "name": "GetSize" + }, + "params": [ + { + "typeid": "{9EB5F5B2-ED76-5142-A631-4FF058C1B1F9}", + "details": { + "name": "AZStd::unordered_map" + } + } + ], + "results": [ + { + "typeid": "{72039442-EB38-4D42-A1AD-CB68F7E0EEF6}", + "details": { + "name": "int" + } + } + ] + }, + { + "base": "Iterate_VM", + "context": "{9EB5F5B2-ED76-5142-A631-4FF058C1B1F9}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Iterate_VM" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Iterate_VM is invoked" + }, + "details": { + "name": "Iterate_VM" + }, + "params": [ + { + "typeid": "{9EB5F5B2-ED76-5142-A631-4FF058C1B1F9}", + "details": { + "name": "AZStd::unordered_map" + } + } + ], + "results": [ + { + "typeid": "{05740A20-4CB4-59B1-A6D1-65785C0E8758}", + "details": { + "name": "Iterator_VM, AZStd::equal_to, allocator>>" + } + } + ] + }, + { + "base": "GetKeys", + "context": "{9EB5F5B2-ED76-5142-A631-4FF058C1B1F9}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke GetKeys" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after GetKeys is invoked" + }, + "details": { + "name": "GetKeys" + }, + "params": [ + { + "typeid": "{9EB5F5B2-ED76-5142-A631-4FF058C1B1F9}", + "details": { + "name": "AZStd::unordered_map" + } + } + ], + "results": [ + { + "typeid": "{877C4A33-39B5-51D7-948D-F97DB81372A1}", + "details": { + "name": "AZStd::vector" + } + } + ] + }, + { + "base": "Size", + "context": "{9EB5F5B2-ED76-5142-A631-4FF058C1B1F9}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Size" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Size is invoked" + }, + "details": { + "name": "Size" + }, + "params": [ + { + "typeid": "{9EB5F5B2-ED76-5142-A631-4FF058C1B1F9}", + "details": { + "name": "AZStd::unordered_map" + } + } + ], + "results": [ + { + "typeid": "{72039442-EB38-4D42-A1AD-CB68F7E0EEF6}", + "details": { + "name": "int" + } + } + ] + }, + { + "base": "Erase", + "context": "{9EB5F5B2-ED76-5142-A631-4FF058C1B1F9}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Erase" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Erase is invoked" + }, + "details": { + "name": "Erase" + }, + "params": [ + { + "typeid": "{9EB5F5B2-ED76-5142-A631-4FF058C1B1F9}", + "details": { + "name": "AZStd::unordered_map" + } + }, + { + "typeid": "{652ED536-3402-439B-AEBE-4A5DBC554085}", + "details": { + "name": "AssetId" + } + } + ], + "results": [ + { + "typeid": "{9EB5F5B2-ED76-5142-A631-4FF058C1B1F9}", + "details": { + "name": "AZStd::unordered_map" + } + } + ] + }, + { + "base": "EraseCheck_VM", + "context": "{9EB5F5B2-ED76-5142-A631-4FF058C1B1F9}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke EraseCheck_VM" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after EraseCheck_VM is invoked" + }, + "details": { + "name": "EraseCheck_VM" + }, + "params": [ + { + "typeid": "{9EB5F5B2-ED76-5142-A631-4FF058C1B1F9}", + "details": { + "name": "AZStd::unordered_map" + } + }, + { + "typeid": "{652ED536-3402-439B-AEBE-4A5DBC554085}", + "details": { + "name": "AssetId" + } + } + ], + "results": [ + { + "typeid": "{A0CA880C-AFE4-43CB-926C-59AC48496112}", + "details": { + "name": "bool" + } + } + ] + }, + { + "base": "Clear", + "context": "{9EB5F5B2-ED76-5142-A631-4FF058C1B1F9}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Clear" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Clear is invoked" + }, + "details": { + "name": "Clear" + }, + "params": [ + { + "typeid": "{9EB5F5B2-ED76-5142-A631-4FF058C1B1F9}", + "details": { + "name": "AZStd::unordered_map" + } + } + ], + "results": [ + { + "typeid": "{9EB5F5B2-ED76-5142-A631-4FF058C1B1F9}", + "details": { + "name": "AZStd::unordered_map" + } + } + ] + }, + { + "base": "At", + "context": "{9EB5F5B2-ED76-5142-A631-4FF058C1B1F9}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke At" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after At is invoked" + }, + "details": { + "name": "At" + }, + "params": [ + { + "typeid": "{9EB5F5B2-ED76-5142-A631-4FF058C1B1F9}", + "details": { + "name": "AZStd::unordered_map" + } + }, + { + "typeid": "{652ED536-3402-439B-AEBE-4A5DBC554085}", + "details": { + "name": "AssetId" + } + } + ], + "results": [ + { + "typeid": "{652ED536-3402-439B-AEBE-4A5DBC554085}", + "details": { + "name": "AssetId" + } + } + ] + }, + { + "base": "BucketCount", + "context": "{9EB5F5B2-ED76-5142-A631-4FF058C1B1F9}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke BucketCount" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after BucketCount is invoked" + }, + "details": { + "name": "BucketCount" + }, + "params": [ + { + "typeid": "{9EB5F5B2-ED76-5142-A631-4FF058C1B1F9}", + "details": { + "name": "AZStd::unordered_map" + } + } + ], + "results": [ + { + "typeid": "{D6597933-47CD-4FC8-B911-63F3E2B0993A}", + "details": { + "name": "AZ::u64" + } + } + ] + }, + { + "base": "Empty", + "context": "{9EB5F5B2-ED76-5142-A631-4FF058C1B1F9}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Empty" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Empty is invoked" + }, + "details": { + "name": "Empty" + }, + "params": [ + { + "typeid": "{9EB5F5B2-ED76-5142-A631-4FF058C1B1F9}", + "details": { + "name": "AZStd::unordered_map" + } + } + ], + "results": [ + { + "typeid": "{A0CA880C-AFE4-43CB-926C-59AC48496112}", + "details": { + "name": "bool" + } + } + ] + }, + { + "base": "Swap", + "context": "{9EB5F5B2-ED76-5142-A631-4FF058C1B1F9}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Swap" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Swap is invoked" + }, + "details": { + "name": "Swap" + }, + "params": [ + { + "typeid": "{9EB5F5B2-ED76-5142-A631-4FF058C1B1F9}", + "details": { + "name": "AZStd::unordered_map" + } + }, + { + "typeid": "{9EB5F5B2-ED76-5142-A631-4FF058C1B1F9}", + "details": { + "name": "AZStd::unordered_map" + } + } + ] + } + ] + }, + { + "base": "{53EA7604-E3AE-4E88-BE0E-66CBC488A7DB}", + "context": "OnDemandReflected", + "variant": "", + "details": { + "name": "MathVector3_VM" + }, + "methods": [ + { + "base": "Reciprocal", + "context": "{53EA7604-E3AE-4E88-BE0E-66CBC488A7DB}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Reciprocal" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Reciprocal is invoked" + }, + "details": { + "name": "Reciprocal" + }, + "params": [ + { + "typeid": "{8379EB7D-01FA-4538-B64B-A6543B4BE73D}", + "details": { + "name": "Vector3" + } + } + ], + "results": [ + { + "typeid": "{8379EB7D-01FA-4538-B64B-A6543B4BE73D}", + "details": { + "name": "Vector3" + } + } + ] + }, + { + "base": "Subtract", + "context": "{53EA7604-E3AE-4E88-BE0E-66CBC488A7DB}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Subtract" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Subtract is invoked" + }, + "details": { + "name": "Subtract" + }, + "params": [ + { + "typeid": "{8379EB7D-01FA-4538-B64B-A6543B4BE73D}", + "details": { + "name": "Vector3" + } + }, + { + "typeid": "{8379EB7D-01FA-4538-B64B-A6543B4BE73D}", + "details": { + "name": "Vector3" + } + } + ], + "results": [ + { + "typeid": "{8379EB7D-01FA-4538-B64B-A6543B4BE73D}", + "details": { + "name": "Vector3" + } + } + ] + }, + { + "base": "Project", + "context": "{53EA7604-E3AE-4E88-BE0E-66CBC488A7DB}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Project" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Project is invoked" + }, + "details": { + "name": "Project" + }, + "params": [ + { + "typeid": "{8379EB7D-01FA-4538-B64B-A6543B4BE73D}", + "details": { + "name": "Vector3" + } + }, + { + "typeid": "{8379EB7D-01FA-4538-B64B-A6543B4BE73D}", + "details": { + "name": "Vector3" + } + } + ], + "results": [ + { + "typeid": "{8379EB7D-01FA-4538-B64B-A6543B4BE73D}", + "details": { + "name": "Vector3" + } + } + ] + }, + { + "base": "Normalize", + "context": "{53EA7604-E3AE-4E88-BE0E-66CBC488A7DB}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Normalize" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Normalize is invoked" + }, + "details": { + "name": "Normalize" + }, + "params": [ + { + "typeid": "{8379EB7D-01FA-4538-B64B-A6543B4BE73D}", + "details": { + "name": "Vector3" + } + } + ], + "results": [ + { + "typeid": "{8379EB7D-01FA-4538-B64B-A6543B4BE73D}", + "details": { + "name": "Vector3" + } + } + ] + }, + { + "base": "Distance", + "context": "{53EA7604-E3AE-4E88-BE0E-66CBC488A7DB}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Distance" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Distance is invoked" + }, + "details": { + "name": "Distance" + }, + "params": [ + { + "typeid": "{8379EB7D-01FA-4538-B64B-A6543B4BE73D}", + "details": { + "name": "Vector3" + } + }, + { + "typeid": "{8379EB7D-01FA-4538-B64B-A6543B4BE73D}", + "details": { + "name": "Vector3" + } + } + ], + "results": [ + { + "typeid": "{110C4B14-11A8-4E9D-8638-5051013A56AC}", + "details": { + "name": "double" + } + } + ] + }, + { + "base": "SetZ", + "context": "{53EA7604-E3AE-4E88-BE0E-66CBC488A7DB}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke SetZ" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after SetZ is invoked" + }, + "details": { + "name": "SetZ" + }, + "params": [ + { + "typeid": "{8379EB7D-01FA-4538-B64B-A6543B4BE73D}", + "details": { + "name": "Vector3" + } + }, + { + "typeid": "{110C4B14-11A8-4E9D-8638-5051013A56AC}", + "details": { + "name": "double" + } + } + ], + "results": [ + { + "typeid": "{8379EB7D-01FA-4538-B64B-A6543B4BE73D}", + "details": { + "name": "Vector3" + } + } + ] + }, + { + "base": "Max", + "context": "{53EA7604-E3AE-4E88-BE0E-66CBC488A7DB}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Max" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Max is invoked" + }, + "details": { + "name": "Max" + }, + "params": [ + { + "typeid": "{8379EB7D-01FA-4538-B64B-A6543B4BE73D}", + "details": { + "name": "Vector3" + } + }, + { + "typeid": "{8379EB7D-01FA-4538-B64B-A6543B4BE73D}", + "details": { + "name": "Vector3" + } + } + ], + "results": [ + { + "typeid": "{8379EB7D-01FA-4538-B64B-A6543B4BE73D}", + "details": { + "name": "Vector3" + } + } + ] + }, + { + "base": "GetElement", + "context": "{53EA7604-E3AE-4E88-BE0E-66CBC488A7DB}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke GetElement" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after GetElement is invoked" + }, + "details": { + "name": "GetElement" + }, + "params": [ + { + "typeid": "{8379EB7D-01FA-4538-B64B-A6543B4BE73D}", + "details": { + "name": "Vector3" + } + }, + { + "typeid": "{110C4B14-11A8-4E9D-8638-5051013A56AC}", + "details": { + "name": "double" + } + } + ], + "results": [ + { + "typeid": "{110C4B14-11A8-4E9D-8638-5051013A56AC}", + "details": { + "name": "double" + } + } + ] + }, + { + "base": "Absolute", + "context": "{53EA7604-E3AE-4E88-BE0E-66CBC488A7DB}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Absolute" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Absolute is invoked" + }, + "details": { + "name": "Absolute" + }, + "params": [ + { + "typeid": "{8379EB7D-01FA-4538-B64B-A6543B4BE73D}", + "details": { + "name": "Vector3" + } + } + ], + "results": [ + { + "typeid": "{8379EB7D-01FA-4538-B64B-A6543B4BE73D}", + "details": { + "name": "Vector3" + } + } + ] + }, + { + "base": "BuildTangentBasis", + "context": "{53EA7604-E3AE-4E88-BE0E-66CBC488A7DB}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke BuildTangentBasis" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after BuildTangentBasis is invoked" + }, + "details": { + "name": "BuildTangentBasis" + }, + "params": [ + { + "typeid": "{8379EB7D-01FA-4538-B64B-A6543B4BE73D}", + "details": { + "name": "Vector3" + } + } + ], + "results": [ + { + "typeid": "{1F24C807-BE2F-54C7-8F2B-498727236DF5}", + "details": { + "name": "tuple" + } + } + ] + }, + { + "base": "Clamp", + "context": "{53EA7604-E3AE-4E88-BE0E-66CBC488A7DB}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Clamp" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Clamp is invoked" + }, + "details": { + "name": "Clamp" + }, + "params": [ + { + "typeid": "{8379EB7D-01FA-4538-B64B-A6543B4BE73D}", + "details": { + "name": "Vector3" + } + }, + { + "typeid": "{8379EB7D-01FA-4538-B64B-A6543B4BE73D}", + "details": { + "name": "Vector3" + } + }, + { + "typeid": "{8379EB7D-01FA-4538-B64B-A6543B4BE73D}", + "details": { + "name": "Vector3" + } + } + ], + "results": [ + { + "typeid": "{8379EB7D-01FA-4538-B64B-A6543B4BE73D}", + "details": { + "name": "Vector3" + } + } + ] + }, + { + "base": "MultiplyByNumber", + "context": "{53EA7604-E3AE-4E88-BE0E-66CBC488A7DB}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke MultiplyByNumber" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after MultiplyByNumber is invoked" + }, + "details": { + "name": "MultiplyByNumber" + }, + "params": [ + { + "typeid": "{8379EB7D-01FA-4538-B64B-A6543B4BE73D}", + "details": { + "name": "Vector3" + } + }, + { + "typeid": "{110C4B14-11A8-4E9D-8638-5051013A56AC}", + "details": { + "name": "double" + } + } + ], + "results": [ + { + "typeid": "{8379EB7D-01FA-4538-B64B-A6543B4BE73D}", + "details": { + "name": "Vector3" + } + } + ] + }, + { + "base": "Slerp", + "context": "{53EA7604-E3AE-4E88-BE0E-66CBC488A7DB}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Slerp" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Slerp is invoked" + }, + "details": { + "name": "Slerp" + }, + "params": [ + { + "typeid": "{8379EB7D-01FA-4538-B64B-A6543B4BE73D}", + "details": { + "name": "Vector3" + } + }, + { + "typeid": "{8379EB7D-01FA-4538-B64B-A6543B4BE73D}", + "details": { + "name": "Vector3" + } + }, + { + "typeid": "{110C4B14-11A8-4E9D-8638-5051013A56AC}", + "details": { + "name": "double" + } + } + ], + "results": [ + { + "typeid": "{8379EB7D-01FA-4538-B64B-A6543B4BE73D}", + "details": { + "name": "Vector3" + } + } + ] + }, + { + "base": "IsZero", + "context": "{53EA7604-E3AE-4E88-BE0E-66CBC488A7DB}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke IsZero" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after IsZero is invoked" + }, + "details": { + "name": "IsZero" + }, + "params": [ + { + "typeid": "{8379EB7D-01FA-4538-B64B-A6543B4BE73D}", + "details": { + "name": "Vector3" + } + }, + { + "typeid": "{110C4B14-11A8-4E9D-8638-5051013A56AC}", + "details": { + "name": "double" + } + } + ], + "results": [ + { + "typeid": "{A0CA880C-AFE4-43CB-926C-59AC48496112}", + "details": { + "name": "bool" + } + } + ] + }, + { + "base": "SetY", + "context": "{53EA7604-E3AE-4E88-BE0E-66CBC488A7DB}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke SetY" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after SetY is invoked" + }, + "details": { + "name": "SetY" + }, + "params": [ + { + "typeid": "{8379EB7D-01FA-4538-B64B-A6543B4BE73D}", + "details": { + "name": "Vector3" + } + }, + { + "typeid": "{110C4B14-11A8-4E9D-8638-5051013A56AC}", + "details": { + "name": "double" + } + } + ], + "results": [ + { + "typeid": "{8379EB7D-01FA-4538-B64B-A6543B4BE73D}", + "details": { + "name": "Vector3" + } + } + ] + }, + { + "base": "IsClose", + "context": "{53EA7604-E3AE-4E88-BE0E-66CBC488A7DB}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke IsClose" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after IsClose is invoked" + }, + "details": { + "name": "IsClose" + }, + "params": [ + { + "typeid": "{8379EB7D-01FA-4538-B64B-A6543B4BE73D}", + "details": { + "name": "Vector3" + } + }, + { + "typeid": "{8379EB7D-01FA-4538-B64B-A6543B4BE73D}", + "details": { + "name": "Vector3" + } + }, + { + "typeid": "{110C4B14-11A8-4E9D-8638-5051013A56AC}", + "details": { + "name": "double" + } + } + ], + "results": [ + { + "typeid": "{A0CA880C-AFE4-43CB-926C-59AC48496112}", + "details": { + "name": "bool" + } + } + ] + }, + { + "base": "Cross", + "context": "{53EA7604-E3AE-4E88-BE0E-66CBC488A7DB}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Cross" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Cross is invoked" + }, + "details": { + "name": "Cross" + }, + "params": [ + { + "typeid": "{8379EB7D-01FA-4538-B64B-A6543B4BE73D}", + "details": { + "name": "Vector3" + } + }, + { + "typeid": "{8379EB7D-01FA-4538-B64B-A6543B4BE73D}", + "details": { + "name": "Vector3" + } + } + ], + "results": [ + { + "typeid": "{8379EB7D-01FA-4538-B64B-A6543B4BE73D}", + "details": { + "name": "Vector3" + } + } + ] + }, + { + "base": "DirectionTo", + "context": "{53EA7604-E3AE-4E88-BE0E-66CBC488A7DB}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke DirectionTo" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after DirectionTo is invoked" + }, + "details": { + "name": "DirectionTo" + }, + "params": [ + { + "typeid": "{8379EB7D-01FA-4538-B64B-A6543B4BE73D}", + "details": { + "name": "Vector3" + } + }, + { + "typeid": "{8379EB7D-01FA-4538-B64B-A6543B4BE73D}", + "details": { + "name": "Vector3" + } + }, + { + "typeid": "{110C4B14-11A8-4E9D-8638-5051013A56AC}", + "details": { + "name": "double" + } + } + ], + "results": [ + { + "typeid": "{CD6328B1-6CC4-54CE-97F4-9D91F5A242F4}", + "details": { + "name": "tuple" + } + } + ] + }, + { + "base": "MultiplyByVector", + "context": "{53EA7604-E3AE-4E88-BE0E-66CBC488A7DB}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke MultiplyByVector" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after MultiplyByVector is invoked" + }, + "details": { + "name": "MultiplyByVector" + }, + "params": [ + { + "typeid": "{8379EB7D-01FA-4538-B64B-A6543B4BE73D}", + "details": { + "name": "Vector3" + } + }, + { + "typeid": "{8379EB7D-01FA-4538-B64B-A6543B4BE73D}", + "details": { + "name": "Vector3" + } + } + ], + "results": [ + { + "typeid": "{8379EB7D-01FA-4538-B64B-A6543B4BE73D}", + "details": { + "name": "Vector3" + } + } + ] + }, + { + "base": "Negate", + "context": "{53EA7604-E3AE-4E88-BE0E-66CBC488A7DB}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Negate" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Negate is invoked" + }, + "details": { + "name": "Negate" + }, + "params": [ + { + "typeid": "{8379EB7D-01FA-4538-B64B-A6543B4BE73D}", + "details": { + "name": "Vector3" + } + } + ], + "results": [ + { + "typeid": "{8379EB7D-01FA-4538-B64B-A6543B4BE73D}", + "details": { + "name": "Vector3" + } + } + ] + }, + { + "base": "Add", + "context": "{53EA7604-E3AE-4E88-BE0E-66CBC488A7DB}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Add" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Add is invoked" + }, + "details": { + "name": "Add" + }, + "params": [ + { + "typeid": "{8379EB7D-01FA-4538-B64B-A6543B4BE73D}", + "details": { + "name": "Vector3" + } + }, + { + "typeid": "{8379EB7D-01FA-4538-B64B-A6543B4BE73D}", + "details": { + "name": "Vector3" + } + } + ], + "results": [ + { + "typeid": "{8379EB7D-01FA-4538-B64B-A6543B4BE73D}", + "details": { + "name": "Vector3" + } + } + ] + }, + { + "base": "IsPerpendicular", + "context": "{53EA7604-E3AE-4E88-BE0E-66CBC488A7DB}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke IsPerpendicular" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after IsPerpendicular is invoked" + }, + "details": { + "name": "IsPerpendicular" + }, + "params": [ + { + "typeid": "{8379EB7D-01FA-4538-B64B-A6543B4BE73D}", + "details": { + "name": "Vector3" + } + }, + { + "typeid": "{8379EB7D-01FA-4538-B64B-A6543B4BE73D}", + "details": { + "name": "Vector3" + } + }, + { + "typeid": "{110C4B14-11A8-4E9D-8638-5051013A56AC}", + "details": { + "name": "double" + } + } + ], + "results": [ + { + "typeid": "{A0CA880C-AFE4-43CB-926C-59AC48496112}", + "details": { + "name": "bool" + } + } + ] + }, + { + "base": "IsFinite", + "context": "{53EA7604-E3AE-4E88-BE0E-66CBC488A7DB}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke IsFinite" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after IsFinite is invoked" + }, + "details": { + "name": "IsFinite" + }, + "params": [ + { + "typeid": "{8379EB7D-01FA-4538-B64B-A6543B4BE73D}", + "details": { + "name": "Vector3" + } + } + ], + "results": [ + { + "typeid": "{A0CA880C-AFE4-43CB-926C-59AC48496112}", + "details": { + "name": "bool" + } + } + ] + }, + { + "base": "DivideByNumber", + "context": "{53EA7604-E3AE-4E88-BE0E-66CBC488A7DB}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke DivideByNumber" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after DivideByNumber is invoked" + }, + "details": { + "name": "DivideByNumber" + }, + "params": [ + { + "typeid": "{8379EB7D-01FA-4538-B64B-A6543B4BE73D}", + "details": { + "name": "Vector3" + } + }, + { + "typeid": "{110C4B14-11A8-4E9D-8638-5051013A56AC}", + "details": { + "name": "double" + } + } + ], + "results": [ + { + "typeid": "{8379EB7D-01FA-4538-B64B-A6543B4BE73D}", + "details": { + "name": "Vector3" + } + } + ] + }, + { + "base": "IsNormalized", + "context": "{53EA7604-E3AE-4E88-BE0E-66CBC488A7DB}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke IsNormalized" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after IsNormalized is invoked" + }, + "details": { + "name": "IsNormalized" + }, + "params": [ + { + "typeid": "{8379EB7D-01FA-4538-B64B-A6543B4BE73D}", + "details": { + "name": "Vector3" + } + }, + { + "typeid": "{110C4B14-11A8-4E9D-8638-5051013A56AC}", + "details": { + "name": "double" + } + } + ], + "results": [ + { + "typeid": "{A0CA880C-AFE4-43CB-926C-59AC48496112}", + "details": { + "name": "bool" + } + } + ] + }, + { + "base": "LengthSquared", + "context": "{53EA7604-E3AE-4E88-BE0E-66CBC488A7DB}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke LengthSquared" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after LengthSquared is invoked" + }, + "details": { + "name": "LengthSquared" + }, + "params": [ + { + "typeid": "{8379EB7D-01FA-4538-B64B-A6543B4BE73D}", + "details": { + "name": "Vector3" + } + } + ], + "results": [ + { + "typeid": "{110C4B14-11A8-4E9D-8638-5051013A56AC}", + "details": { + "name": "double" + } + } + ] + }, + { + "base": "FromValues", + "context": "{53EA7604-E3AE-4E88-BE0E-66CBC488A7DB}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke FromValues" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after FromValues is invoked" + }, + "details": { + "name": "FromValues" + }, + "params": [ + { + "typeid": "{110C4B14-11A8-4E9D-8638-5051013A56AC}", + "details": { + "name": "double" + } + }, + { + "typeid": "{110C4B14-11A8-4E9D-8638-5051013A56AC}", + "details": { + "name": "double" + } + }, + { + "typeid": "{110C4B14-11A8-4E9D-8638-5051013A56AC}", + "details": { + "name": "double" + } + } + ], + "results": [ + { + "typeid": "{8379EB7D-01FA-4538-B64B-A6543B4BE73D}", + "details": { + "name": "Vector3" + } + } + ] + }, + { + "base": "Dot", + "context": "{53EA7604-E3AE-4E88-BE0E-66CBC488A7DB}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Dot" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Dot is invoked" + }, + "details": { + "name": "Dot" + }, + "params": [ + { + "typeid": "{8379EB7D-01FA-4538-B64B-A6543B4BE73D}", + "details": { + "name": "Vector3" + } + }, + { + "typeid": "{8379EB7D-01FA-4538-B64B-A6543B4BE73D}", + "details": { + "name": "Vector3" + } + } + ], + "results": [ + { + "typeid": "{110C4B14-11A8-4E9D-8638-5051013A56AC}", + "details": { + "name": "double" + } + } + ] + }, + { + "base": "SetX", + "context": "{53EA7604-E3AE-4E88-BE0E-66CBC488A7DB}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke SetX" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after SetX is invoked" + }, + "details": { + "name": "SetX" + }, + "params": [ + { + "typeid": "{8379EB7D-01FA-4538-B64B-A6543B4BE73D}", + "details": { + "name": "Vector3" + } + }, + { + "typeid": "{110C4B14-11A8-4E9D-8638-5051013A56AC}", + "details": { + "name": "double" + } + } + ], + "results": [ + { + "typeid": "{8379EB7D-01FA-4538-B64B-A6543B4BE73D}", + "details": { + "name": "Vector3" + } + } + ] + }, + { + "base": "LengthReciprocal", + "context": "{53EA7604-E3AE-4E88-BE0E-66CBC488A7DB}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke LengthReciprocal" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after LengthReciprocal is invoked" + }, + "details": { + "name": "LengthReciprocal" + }, + "params": [ + { + "typeid": "{8379EB7D-01FA-4538-B64B-A6543B4BE73D}", + "details": { + "name": "Vector3" + } + } + ], + "results": [ + { + "typeid": "{110C4B14-11A8-4E9D-8638-5051013A56AC}", + "details": { + "name": "double" + } + } + ] + }, + { + "base": "Min", + "context": "{53EA7604-E3AE-4E88-BE0E-66CBC488A7DB}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Min" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Min is invoked" + }, + "details": { + "name": "Min" + }, + "params": [ + { + "typeid": "{8379EB7D-01FA-4538-B64B-A6543B4BE73D}", + "details": { + "name": "Vector3" + } + }, + { + "typeid": "{8379EB7D-01FA-4538-B64B-A6543B4BE73D}", + "details": { + "name": "Vector3" + } + } + ], + "results": [ + { + "typeid": "{8379EB7D-01FA-4538-B64B-A6543B4BE73D}", + "details": { + "name": "Vector3" + } + } + ] + }, + { + "base": "DistanceSquared", + "context": "{53EA7604-E3AE-4E88-BE0E-66CBC488A7DB}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke DistanceSquared" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after DistanceSquared is invoked" + }, + "details": { + "name": "DistanceSquared" + }, + "params": [ + { + "typeid": "{8379EB7D-01FA-4538-B64B-A6543B4BE73D}", + "details": { + "name": "Vector3" + } + }, + { + "typeid": "{8379EB7D-01FA-4538-B64B-A6543B4BE73D}", + "details": { + "name": "Vector3" + } + } + ], + "results": [ + { + "typeid": "{110C4B14-11A8-4E9D-8638-5051013A56AC}", + "details": { + "name": "double" + } + } + ] + }, + { + "base": "Length", + "context": "{53EA7604-E3AE-4E88-BE0E-66CBC488A7DB}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Length" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Length is invoked" + }, + "details": { + "name": "Length" + }, + "params": [ + { + "typeid": "{8379EB7D-01FA-4538-B64B-A6543B4BE73D}", + "details": { + "name": "Vector3" + } + } + ], + "results": [ + { + "typeid": "{110C4B14-11A8-4E9D-8638-5051013A56AC}", + "details": { + "name": "double" + } + } + ] + }, + { + "base": "DivideByVector", + "context": "{53EA7604-E3AE-4E88-BE0E-66CBC488A7DB}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke DivideByVector" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after DivideByVector is invoked" + }, + "details": { + "name": "DivideByVector" + }, + "params": [ + { + "typeid": "{8379EB7D-01FA-4538-B64B-A6543B4BE73D}", + "details": { + "name": "Vector3" + } + }, + { + "typeid": "{8379EB7D-01FA-4538-B64B-A6543B4BE73D}", + "details": { + "name": "Vector3" + } + } + ], + "results": [ + { + "typeid": "{8379EB7D-01FA-4538-B64B-A6543B4BE73D}", + "details": { + "name": "Vector3" + } + } + ] + }, + { + "base": "Lerp", + "context": "{53EA7604-E3AE-4E88-BE0E-66CBC488A7DB}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Lerp" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Lerp is invoked" + }, + "details": { + "name": "Lerp" + }, + "params": [ + { + "typeid": "{8379EB7D-01FA-4538-B64B-A6543B4BE73D}", + "details": { + "name": "Vector3" + } + }, + { + "typeid": "{8379EB7D-01FA-4538-B64B-A6543B4BE73D}", + "details": { + "name": "Vector3" + } + }, + { + "typeid": "{110C4B14-11A8-4E9D-8638-5051013A56AC}", + "details": { + "name": "double" + } + } + ], + "results": [ + { + "typeid": "{8379EB7D-01FA-4538-B64B-A6543B4BE73D}", + "details": { + "name": "Vector3" + } + } + ] + } + ] + }, + { + "base": "{4985DFB0-7CD9-5B28-980B-BA2C701BE3D6}", + "context": "OnDemandReflected", + "variant": "", + "details": { + "name": "Event const Vector3& >" + }, + "methods": [ + { + "base": "HasHandlerConnected", + "context": "{4985DFB0-7CD9-5B28-980B-BA2C701BE3D6}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke HasHandlerConnected" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after HasHandlerConnected is invoked" + }, + "details": { + "name": "HasHandlerConnected" + }, + "params": [ + { + "typeid": "{4985DFB0-7CD9-5B28-980B-BA2C701BE3D6}", + "details": { + "name": "Event const Vector3& >*" + } + } + ], + "results": [ + { + "typeid": "{A0CA880C-AFE4-43CB-926C-59AC48496112}", + "details": { + "name": "bool" + } + } + ] + } + ] + }, + { + "base": "{2F556390-49B3-5F20-8206-21D323D977E6}", + "context": "OnDemandReflected", + "variant": "", + "details": { + "name": "Map", + "category": "Map", + "tooltip": "A collection of Key/Value pairs, where each Key value must be unique." + }, + "methods": [ + { + "base": "contains", + "context": "{2F556390-49B3-5F20-8206-21D323D977E6}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke contains" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after contains is invoked" + }, + "details": { + "name": "contains" + }, + "params": [ + { + "typeid": "{2F556390-49B3-5F20-8206-21D323D977E6}", + "details": { + "name": "AZStd::unordered_map" + } + }, + { + "typeid": "{03AAAB3F-5C47-5A66-9EBC-D5FA4DB353C9}", + "details": { + "name": "AZStd::string" + } + } + ], + "results": [ + { + "typeid": "{A0CA880C-AFE4-43CB-926C-59AC48496112}", + "details": { + "name": "bool" + } + } + ] + }, + { + "base": "Insert", + "context": "{2F556390-49B3-5F20-8206-21D323D977E6}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Insert" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Insert is invoked" + }, + "details": { + "name": "Insert" + }, + "params": [ + { + "typeid": "{2F556390-49B3-5F20-8206-21D323D977E6}", + "details": { + "name": "AZStd::unordered_map" + } + }, + { + "typeid": "{03AAAB3F-5C47-5A66-9EBC-D5FA4DB353C9}", + "details": { + "name": "AZStd::string" + } + }, + { + "typeid": "{3D80F623-C85C-4741-90D0-E4E66164E6BF}", + "details": { + "name": "Vector2" + } + } + ], + "results": [ + { + "typeid": "{2F556390-49B3-5F20-8206-21D323D977E6}", + "details": { + "name": "AZStd::unordered_map" + } + } + ] + }, + { + "base": "Reserve", + "context": "{2F556390-49B3-5F20-8206-21D323D977E6}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Reserve" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Reserve is invoked" + }, + "details": { + "name": "Reserve" + }, + "params": [ + { + "typeid": "{2F556390-49B3-5F20-8206-21D323D977E6}", + "details": { + "name": "AZStd::unordered_map" + } + }, + { + "typeid": "{D6597933-47CD-4FC8-B911-63F3E2B0993A}", + "details": { + "name": "AZ::u64" + } + } + ] + }, + { + "base": "GetSize", + "context": "{2F556390-49B3-5F20-8206-21D323D977E6}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke GetSize" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after GetSize is invoked" + }, + "details": { + "name": "GetSize" + }, + "params": [ + { + "typeid": "{2F556390-49B3-5F20-8206-21D323D977E6}", + "details": { + "name": "AZStd::unordered_map" + } + } + ], + "results": [ + { + "typeid": "{72039442-EB38-4D42-A1AD-CB68F7E0EEF6}", + "details": { + "name": "int" + } + } + ] + }, + { + "base": "Iterate_VM", + "context": "{2F556390-49B3-5F20-8206-21D323D977E6}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Iterate_VM" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Iterate_VM is invoked" + }, + "details": { + "name": "Iterate_VM" + }, + "params": [ + { + "typeid": "{2F556390-49B3-5F20-8206-21D323D977E6}", + "details": { + "name": "AZStd::unordered_map" + } + } + ], + "results": [ + { + "typeid": "{4D2F842F-38F6-5488-8DA1-6E57C9BF9611}", + "details": { + "name": "Iterator_VM, allocator>, Vector2, AZStd::hash", + "category": "Map", + "tooltip": "A collection of Key/Value pairs, where each Key value must be unique." + }, + "methods": [ + { + "base": "contains", + "context": "{180562CD-DF5B-5AC3-B867-9FBFB3A2539A}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke contains" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after contains is invoked" + }, + "details": { + "name": "contains" + }, + "params": [ + { + "typeid": "{180562CD-DF5B-5AC3-B867-9FBFB3A2539A}", + "details": { + "name": "AZStd::unordered_map" + } + }, + { + "typeid": "{A0CA880C-AFE4-43CB-926C-59AC48496112}", + "details": { + "name": "bool" + } + } + ], + "results": [ + { + "typeid": "{A0CA880C-AFE4-43CB-926C-59AC48496112}", + "details": { + "name": "bool" + } + } + ] + }, + { + "base": "Insert", + "context": "{180562CD-DF5B-5AC3-B867-9FBFB3A2539A}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Insert" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Insert is invoked" + }, + "details": { + "name": "Insert" + }, + "params": [ + { + "typeid": "{180562CD-DF5B-5AC3-B867-9FBFB3A2539A}", + "details": { + "name": "AZStd::unordered_map" + } + }, + { + "typeid": "{A0CA880C-AFE4-43CB-926C-59AC48496112}", + "details": { + "name": "bool" + } + }, + { + "typeid": "{0CE9FA36-1E3A-4C06-9254-B7C73A732053}", + "details": { + "name": "Vector4" + } + } + ], + "results": [ + { + "typeid": "{180562CD-DF5B-5AC3-B867-9FBFB3A2539A}", + "details": { + "name": "AZStd::unordered_map" + } + } + ] + }, + { + "base": "Reserve", + "context": "{180562CD-DF5B-5AC3-B867-9FBFB3A2539A}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Reserve" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Reserve is invoked" + }, + "details": { + "name": "Reserve" + }, + "params": [ + { + "typeid": "{180562CD-DF5B-5AC3-B867-9FBFB3A2539A}", + "details": { + "name": "AZStd::unordered_map" + } + }, + { + "typeid": "{D6597933-47CD-4FC8-B911-63F3E2B0993A}", + "details": { + "name": "AZ::u64" + } + } + ] + }, + { + "base": "GetSize", + "context": "{180562CD-DF5B-5AC3-B867-9FBFB3A2539A}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke GetSize" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after GetSize is invoked" + }, + "details": { + "name": "GetSize" + }, + "params": [ + { + "typeid": "{180562CD-DF5B-5AC3-B867-9FBFB3A2539A}", + "details": { + "name": "AZStd::unordered_map" + } + } + ], + "results": [ + { + "typeid": "{72039442-EB38-4D42-A1AD-CB68F7E0EEF6}", + "details": { + "name": "int" + } + } + ] + }, + { + "base": "Iterate_VM", + "context": "{180562CD-DF5B-5AC3-B867-9FBFB3A2539A}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Iterate_VM" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Iterate_VM is invoked" + }, + "details": { + "name": "Iterate_VM" + }, + "params": [ + { + "typeid": "{180562CD-DF5B-5AC3-B867-9FBFB3A2539A}", + "details": { + "name": "AZStd::unordered_map" + } + } + ], + "results": [ + { + "typeid": "{9E546749-74A3-545B-80D8-33EF72AD7AE2}", + "details": { + "name": "Iterator_VM, AZStd::equal_to, allocator>>" + } + } + ] + }, + { + "base": "GetKeys", + "context": "{180562CD-DF5B-5AC3-B867-9FBFB3A2539A}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke GetKeys" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after GetKeys is invoked" + }, + "details": { + "name": "GetKeys" + }, + "params": [ + { + "typeid": "{180562CD-DF5B-5AC3-B867-9FBFB3A2539A}", + "details": { + "name": "AZStd::unordered_map" + } + } + ], + "results": [ + { + "typeid": "{B505B05D-57BF-5A45-9113-B3A2784E2CD7}", + "details": { + "name": "AZStd::vector" + } + } + ] + }, + { + "base": "Size", + "context": "{180562CD-DF5B-5AC3-B867-9FBFB3A2539A}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Size" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Size is invoked" + }, + "details": { + "name": "Size" + }, + "params": [ + { + "typeid": "{180562CD-DF5B-5AC3-B867-9FBFB3A2539A}", + "details": { + "name": "AZStd::unordered_map" + } + } + ], + "results": [ + { + "typeid": "{72039442-EB38-4D42-A1AD-CB68F7E0EEF6}", + "details": { + "name": "int" + } + } + ] + }, + { + "base": "Erase", + "context": "{180562CD-DF5B-5AC3-B867-9FBFB3A2539A}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Erase" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Erase is invoked" + }, + "details": { + "name": "Erase" + }, + "params": [ + { + "typeid": "{180562CD-DF5B-5AC3-B867-9FBFB3A2539A}", + "details": { + "name": "AZStd::unordered_map" + } + }, + { + "typeid": "{A0CA880C-AFE4-43CB-926C-59AC48496112}", + "details": { + "name": "bool" + } + } + ], + "results": [ + { + "typeid": "{180562CD-DF5B-5AC3-B867-9FBFB3A2539A}", + "details": { + "name": "AZStd::unordered_map" + } + } + ] + }, + { + "base": "EraseCheck_VM", + "context": "{180562CD-DF5B-5AC3-B867-9FBFB3A2539A}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke EraseCheck_VM" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after EraseCheck_VM is invoked" + }, + "details": { + "name": "EraseCheck_VM" + }, + "params": [ + { + "typeid": "{180562CD-DF5B-5AC3-B867-9FBFB3A2539A}", + "details": { + "name": "AZStd::unordered_map" + } + }, + { + "typeid": "{A0CA880C-AFE4-43CB-926C-59AC48496112}", + "details": { + "name": "bool" + } + } + ], + "results": [ + { + "typeid": "{A0CA880C-AFE4-43CB-926C-59AC48496112}", + "details": { + "name": "bool" + } + } + ] + }, + { + "base": "Clear", + "context": "{180562CD-DF5B-5AC3-B867-9FBFB3A2539A}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Clear" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Clear is invoked" + }, + "details": { + "name": "Clear" + }, + "params": [ + { + "typeid": "{180562CD-DF5B-5AC3-B867-9FBFB3A2539A}", + "details": { + "name": "AZStd::unordered_map" + } + } + ], + "results": [ + { + "typeid": "{180562CD-DF5B-5AC3-B867-9FBFB3A2539A}", + "details": { + "name": "AZStd::unordered_map" + } + } + ] + }, + { + "base": "At", + "context": "{180562CD-DF5B-5AC3-B867-9FBFB3A2539A}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke At" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after At is invoked" + }, + "details": { + "name": "At" + }, + "params": [ + { + "typeid": "{180562CD-DF5B-5AC3-B867-9FBFB3A2539A}", + "details": { + "name": "AZStd::unordered_map" + } + }, + { + "typeid": "{A0CA880C-AFE4-43CB-926C-59AC48496112}", + "details": { + "name": "bool" + } + } + ], + "results": [ + { + "typeid": "{0CE9FA36-1E3A-4C06-9254-B7C73A732053}", + "details": { + "name": "Vector4" + } + } + ] + }, + { + "base": "BucketCount", + "context": "{180562CD-DF5B-5AC3-B867-9FBFB3A2539A}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke BucketCount" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after BucketCount is invoked" + }, + "details": { + "name": "BucketCount" + }, + "params": [ + { + "typeid": "{180562CD-DF5B-5AC3-B867-9FBFB3A2539A}", + "details": { + "name": "AZStd::unordered_map" + } + } + ], + "results": [ + { + "typeid": "{D6597933-47CD-4FC8-B911-63F3E2B0993A}", + "details": { + "name": "AZ::u64" + } + } + ] + }, + { + "base": "Empty", + "context": "{180562CD-DF5B-5AC3-B867-9FBFB3A2539A}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Empty" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Empty is invoked" + }, + "details": { + "name": "Empty" + }, + "params": [ + { + "typeid": "{180562CD-DF5B-5AC3-B867-9FBFB3A2539A}", + "details": { + "name": "AZStd::unordered_map" + } + } + ], + "results": [ + { + "typeid": "{A0CA880C-AFE4-43CB-926C-59AC48496112}", + "details": { + "name": "bool" + } + } + ] + }, + { + "base": "Swap", + "context": "{180562CD-DF5B-5AC3-B867-9FBFB3A2539A}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Swap" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Swap is invoked" + }, + "details": { + "name": "Swap" + }, + "params": [ + { + "typeid": "{180562CD-DF5B-5AC3-B867-9FBFB3A2539A}", + "details": { + "name": "AZStd::unordered_map" + } + }, + { + "typeid": "{180562CD-DF5B-5AC3-B867-9FBFB3A2539A}", + "details": { + "name": "AZStd::unordered_map" + } + } + ] + } + ] + }, + { + "base": "{9F4210F0-9A8E-5536-A6FD-F3F55D854C0A}", + "context": "OnDemandReflected", + "variant": "", + "details": { + "name": "Map", + "category": "Map", + "tooltip": "A collection of Key/Value pairs, where each Key value must be unique." + }, + "methods": [ + { + "base": "contains", + "context": "{9F4210F0-9A8E-5536-A6FD-F3F55D854C0A}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke contains" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after contains is invoked" + }, + "details": { + "name": "contains" + }, + "params": [ + { + "typeid": "{9F4210F0-9A8E-5536-A6FD-F3F55D854C0A}", + "details": { + "name": "AZStd::unordered_map" + } + }, + { + "typeid": "{03AAAB3F-5C47-5A66-9EBC-D5FA4DB353C9}", + "details": { + "name": "AZStd::string" + } + } + ], + "results": [ + { + "typeid": "{A0CA880C-AFE4-43CB-926C-59AC48496112}", + "details": { + "name": "bool" + } + } + ] + }, + { + "base": "Insert", + "context": "{9F4210F0-9A8E-5536-A6FD-F3F55D854C0A}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Insert" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Insert is invoked" + }, + "details": { + "name": "Insert" + }, + "params": [ + { + "typeid": "{9F4210F0-9A8E-5536-A6FD-F3F55D854C0A}", + "details": { + "name": "AZStd::unordered_map" + } + }, + { + "typeid": "{03AAAB3F-5C47-5A66-9EBC-D5FA4DB353C9}", + "details": { + "name": "AZStd::string" + } + }, + { + "typeid": "{03924488-C7F4-4D6D-948B-ABC2D1AE2FD3}", + "details": { + "name": "any" + } + } + ], + "results": [ + { + "typeid": "{9F4210F0-9A8E-5536-A6FD-F3F55D854C0A}", + "details": { + "name": "AZStd::unordered_map" + } + } + ] + }, + { + "base": "Reserve", + "context": "{9F4210F0-9A8E-5536-A6FD-F3F55D854C0A}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Reserve" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Reserve is invoked" + }, + "details": { + "name": "Reserve" + }, + "params": [ + { + "typeid": "{9F4210F0-9A8E-5536-A6FD-F3F55D854C0A}", + "details": { + "name": "AZStd::unordered_map" + } + }, + { + "typeid": "{D6597933-47CD-4FC8-B911-63F3E2B0993A}", + "details": { + "name": "AZ::u64" + } + } + ] + }, + { + "base": "GetSize", + "context": "{9F4210F0-9A8E-5536-A6FD-F3F55D854C0A}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke GetSize" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after GetSize is invoked" + }, + "details": { + "name": "GetSize" + }, + "params": [ + { + "typeid": "{9F4210F0-9A8E-5536-A6FD-F3F55D854C0A}", + "details": { + "name": "AZStd::unordered_map" + } + } + ], + "results": [ + { + "typeid": "{72039442-EB38-4D42-A1AD-CB68F7E0EEF6}", + "details": { + "name": "int" + } + } + ] + }, + { + "base": "Iterate_VM", + "context": "{9F4210F0-9A8E-5536-A6FD-F3F55D854C0A}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Iterate_VM" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Iterate_VM is invoked" + }, + "details": { + "name": "Iterate_VM" + }, + "params": [ + { + "typeid": "{9F4210F0-9A8E-5536-A6FD-F3F55D854C0A}", + "details": { + "name": "AZStd::unordered_map" + } + } + ], + "results": [ + { + "typeid": "{1BE6A4D0-2299-539B-A07E-538C6D2749DB}", + "details": { + "name": "Iterator_VM, allocator>, any, AZStd::hash", + "category": "Map", + "tooltip": "A collection of Key/Value pairs, where each Key value must be unique." + }, + "methods": [ + { + "base": "contains", + "context": "{0764BFDD-6E1D-5F12-B746-219C67028B25}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke contains" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after contains is invoked" + }, + "details": { + "name": "contains" + }, + "params": [ + { + "typeid": "{0764BFDD-6E1D-5F12-B746-219C67028B25}", + "details": { + "name": "AZStd::unordered_map" + } + }, + { + "typeid": "{A0CA880C-AFE4-43CB-926C-59AC48496112}", + "details": { + "name": "bool" + } + } + ], + "results": [ + { + "typeid": "{A0CA880C-AFE4-43CB-926C-59AC48496112}", + "details": { + "name": "bool" + } + } + ] + }, + { + "base": "Insert", + "context": "{0764BFDD-6E1D-5F12-B746-219C67028B25}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Insert" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Insert is invoked" + }, + "details": { + "name": "Insert" + }, + "params": [ + { + "typeid": "{0764BFDD-6E1D-5F12-B746-219C67028B25}", + "details": { + "name": "AZStd::unordered_map" + } + }, + { + "typeid": "{A0CA880C-AFE4-43CB-926C-59AC48496112}", + "details": { + "name": "bool" + } + }, + { + "typeid": "{9F4E062E-06A0-46D4-85DF-E0DA96467D3A}", + "details": { + "name": "Crc32" + } + } + ], + "results": [ + { + "typeid": "{0764BFDD-6E1D-5F12-B746-219C67028B25}", + "details": { + "name": "AZStd::unordered_map" + } + } + ] + }, + { + "base": "Reserve", + "context": "{0764BFDD-6E1D-5F12-B746-219C67028B25}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Reserve" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Reserve is invoked" + }, + "details": { + "name": "Reserve" + }, + "params": [ + { + "typeid": "{0764BFDD-6E1D-5F12-B746-219C67028B25}", + "details": { + "name": "AZStd::unordered_map" + } + }, + { + "typeid": "{D6597933-47CD-4FC8-B911-63F3E2B0993A}", + "details": { + "name": "AZ::u64" + } + } + ] + }, + { + "base": "GetSize", + "context": "{0764BFDD-6E1D-5F12-B746-219C67028B25}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke GetSize" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after GetSize is invoked" + }, + "details": { + "name": "GetSize" + }, + "params": [ + { + "typeid": "{0764BFDD-6E1D-5F12-B746-219C67028B25}", + "details": { + "name": "AZStd::unordered_map" + } + } + ], + "results": [ + { + "typeid": "{72039442-EB38-4D42-A1AD-CB68F7E0EEF6}", + "details": { + "name": "int" + } + } + ] + }, + { + "base": "Iterate_VM", + "context": "{0764BFDD-6E1D-5F12-B746-219C67028B25}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Iterate_VM" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Iterate_VM is invoked" + }, + "details": { + "name": "Iterate_VM" + }, + "params": [ + { + "typeid": "{0764BFDD-6E1D-5F12-B746-219C67028B25}", + "details": { + "name": "AZStd::unordered_map" + } + } + ], + "results": [ + { + "typeid": "{37CCB023-4B5E-5C6E-AC3C-4BB5E5EEDFDD}", + "details": { + "name": "Iterator_VM, AZStd::equal_to, allocator>>" + } + } + ] + }, + { + "base": "GetKeys", + "context": "{0764BFDD-6E1D-5F12-B746-219C67028B25}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke GetKeys" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after GetKeys is invoked" + }, + "details": { + "name": "GetKeys" + }, + "params": [ + { + "typeid": "{0764BFDD-6E1D-5F12-B746-219C67028B25}", + "details": { + "name": "AZStd::unordered_map" + } + } + ], + "results": [ + { + "typeid": "{B505B05D-57BF-5A45-9113-B3A2784E2CD7}", + "details": { + "name": "AZStd::vector" + } + } + ] + }, + { + "base": "Size", + "context": "{0764BFDD-6E1D-5F12-B746-219C67028B25}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Size" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Size is invoked" + }, + "details": { + "name": "Size" + }, + "params": [ + { + "typeid": "{0764BFDD-6E1D-5F12-B746-219C67028B25}", + "details": { + "name": "AZStd::unordered_map" + } + } + ], + "results": [ + { + "typeid": "{72039442-EB38-4D42-A1AD-CB68F7E0EEF6}", + "details": { + "name": "int" + } + } + ] + }, + { + "base": "Erase", + "context": "{0764BFDD-6E1D-5F12-B746-219C67028B25}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Erase" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Erase is invoked" + }, + "details": { + "name": "Erase" + }, + "params": [ + { + "typeid": "{0764BFDD-6E1D-5F12-B746-219C67028B25}", + "details": { + "name": "AZStd::unordered_map" + } + }, + { + "typeid": "{A0CA880C-AFE4-43CB-926C-59AC48496112}", + "details": { + "name": "bool" + } + } + ], + "results": [ + { + "typeid": "{0764BFDD-6E1D-5F12-B746-219C67028B25}", + "details": { + "name": "AZStd::unordered_map" + } + } + ] + }, + { + "base": "EraseCheck_VM", + "context": "{0764BFDD-6E1D-5F12-B746-219C67028B25}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke EraseCheck_VM" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after EraseCheck_VM is invoked" + }, + "details": { + "name": "EraseCheck_VM" + }, + "params": [ + { + "typeid": "{0764BFDD-6E1D-5F12-B746-219C67028B25}", + "details": { + "name": "AZStd::unordered_map" + } + }, + { + "typeid": "{A0CA880C-AFE4-43CB-926C-59AC48496112}", + "details": { + "name": "bool" + } + } + ], + "results": [ + { + "typeid": "{A0CA880C-AFE4-43CB-926C-59AC48496112}", + "details": { + "name": "bool" + } + } + ] + }, + { + "base": "Clear", + "context": "{0764BFDD-6E1D-5F12-B746-219C67028B25}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Clear" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Clear is invoked" + }, + "details": { + "name": "Clear" + }, + "params": [ + { + "typeid": "{0764BFDD-6E1D-5F12-B746-219C67028B25}", + "details": { + "name": "AZStd::unordered_map" + } + } + ], + "results": [ + { + "typeid": "{0764BFDD-6E1D-5F12-B746-219C67028B25}", + "details": { + "name": "AZStd::unordered_map" + } + } + ] + }, + { + "base": "At", + "context": "{0764BFDD-6E1D-5F12-B746-219C67028B25}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke At" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after At is invoked" + }, + "details": { + "name": "At" + }, + "params": [ + { + "typeid": "{0764BFDD-6E1D-5F12-B746-219C67028B25}", + "details": { + "name": "AZStd::unordered_map" + } + }, + { + "typeid": "{A0CA880C-AFE4-43CB-926C-59AC48496112}", + "details": { + "name": "bool" + } + } + ], + "results": [ + { + "typeid": "{9F4E062E-06A0-46D4-85DF-E0DA96467D3A}", + "details": { + "name": "Crc32" + } + } + ] + }, + { + "base": "BucketCount", + "context": "{0764BFDD-6E1D-5F12-B746-219C67028B25}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke BucketCount" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after BucketCount is invoked" + }, + "details": { + "name": "BucketCount" + }, + "params": [ + { + "typeid": "{0764BFDD-6E1D-5F12-B746-219C67028B25}", + "details": { + "name": "AZStd::unordered_map" + } + } + ], + "results": [ + { + "typeid": "{D6597933-47CD-4FC8-B911-63F3E2B0993A}", + "details": { + "name": "AZ::u64" + } + } + ] + }, + { + "base": "Empty", + "context": "{0764BFDD-6E1D-5F12-B746-219C67028B25}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Empty" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Empty is invoked" + }, + "details": { + "name": "Empty" + }, + "params": [ + { + "typeid": "{0764BFDD-6E1D-5F12-B746-219C67028B25}", + "details": { + "name": "AZStd::unordered_map" + } + } + ], + "results": [ + { + "typeid": "{A0CA880C-AFE4-43CB-926C-59AC48496112}", + "details": { + "name": "bool" + } + } + ] + }, + { + "base": "Swap", + "context": "{0764BFDD-6E1D-5F12-B746-219C67028B25}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Swap" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Swap is invoked" + }, + "details": { + "name": "Swap" + }, + "params": [ + { + "typeid": "{0764BFDD-6E1D-5F12-B746-219C67028B25}", + "details": { + "name": "AZStd::unordered_map" + } + }, + { + "typeid": "{0764BFDD-6E1D-5F12-B746-219C67028B25}", + "details": { + "name": "AZStd::unordered_map" + } + } + ] + } + ] + }, + { + "base": "{0D825FF8-6E54-5ADD-93B0-93496090CEFA}", + "context": "OnDemandReflected", + "variant": "", + "details": { + "name": "Map", + "category": "Map", + "tooltip": "A collection of Key/Value pairs, where each Key value must be unique." + }, + "methods": [ + { + "base": "contains", + "context": "{0D825FF8-6E54-5ADD-93B0-93496090CEFA}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke contains" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after contains is invoked" + }, + "details": { + "name": "contains" + }, + "params": [ + { + "typeid": "{0D825FF8-6E54-5ADD-93B0-93496090CEFA}", + "details": { + "name": "AZStd::unordered_map" + } + }, + { + "typeid": "{6383F1D3-BB27-4E6B-A49A-6409B2059EAA}", + "details": { + "name": "EntityId", + "tooltip": "Entity Unique Id" + } + } + ], + "results": [ + { + "typeid": "{A0CA880C-AFE4-43CB-926C-59AC48496112}", + "details": { + "name": "bool" + } + } + ] + }, + { + "base": "Insert", + "context": "{0D825FF8-6E54-5ADD-93B0-93496090CEFA}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Insert" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Insert is invoked" + }, + "details": { + "name": "Insert" + }, + "params": [ + { + "typeid": "{0D825FF8-6E54-5ADD-93B0-93496090CEFA}", + "details": { + "name": "AZStd::unordered_map" + } + }, + { + "typeid": "{6383F1D3-BB27-4E6B-A49A-6409B2059EAA}", + "details": { + "name": "EntityId", + "tooltip": "Entity Unique Id" + } + }, + { + "typeid": "{004ABD25-CF14-4EB3-BD41-022C247C07FA}", + "details": { + "name": "Obb" + } + } + ], + "results": [ + { + "typeid": "{0D825FF8-6E54-5ADD-93B0-93496090CEFA}", + "details": { + "name": "AZStd::unordered_map" + } + } + ] + }, + { + "base": "Reserve", + "context": "{0D825FF8-6E54-5ADD-93B0-93496090CEFA}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Reserve" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Reserve is invoked" + }, + "details": { + "name": "Reserve" + }, + "params": [ + { + "typeid": "{0D825FF8-6E54-5ADD-93B0-93496090CEFA}", + "details": { + "name": "AZStd::unordered_map" + } + }, + { + "typeid": "{D6597933-47CD-4FC8-B911-63F3E2B0993A}", + "details": { + "name": "AZ::u64" + } + } + ] + }, + { + "base": "GetSize", + "context": "{0D825FF8-6E54-5ADD-93B0-93496090CEFA}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke GetSize" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after GetSize is invoked" + }, + "details": { + "name": "GetSize" + }, + "params": [ + { + "typeid": "{0D825FF8-6E54-5ADD-93B0-93496090CEFA}", + "details": { + "name": "AZStd::unordered_map" + } + } + ], + "results": [ + { + "typeid": "{72039442-EB38-4D42-A1AD-CB68F7E0EEF6}", + "details": { + "name": "int" + } + } + ] + }, + { + "base": "Iterate_VM", + "context": "{0D825FF8-6E54-5ADD-93B0-93496090CEFA}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Iterate_VM" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Iterate_VM is invoked" + }, + "details": { + "name": "Iterate_VM" + }, + "params": [ + { + "typeid": "{0D825FF8-6E54-5ADD-93B0-93496090CEFA}", + "details": { + "name": "AZStd::unordered_map" + } + } + ], + "results": [ + { + "typeid": "{4E0F9C19-E98E-5009-A180-F54F78564C87}", + "details": { + "name": "Iterator_VM, AZStd::equal_to, allocator>>" + } + } + ] + }, + { + "base": "GetKeys", + "context": "{0D825FF8-6E54-5ADD-93B0-93496090CEFA}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke GetKeys" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after GetKeys is invoked" + }, + "details": { + "name": "GetKeys" + }, + "params": [ + { + "typeid": "{0D825FF8-6E54-5ADD-93B0-93496090CEFA}", + "details": { + "name": "AZStd::unordered_map" + } + } + ], + "results": [ + { + "typeid": "{4841CFF0-7A5C-519C-BD16-D3625E99605E}", + "details": { + "name": "AZStd::vector" + } + } + ] + }, + { + "base": "Size", + "context": "{0D825FF8-6E54-5ADD-93B0-93496090CEFA}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Size" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Size is invoked" + }, + "details": { + "name": "Size" + }, + "params": [ + { + "typeid": "{0D825FF8-6E54-5ADD-93B0-93496090CEFA}", + "details": { + "name": "AZStd::unordered_map" + } + } + ], + "results": [ + { + "typeid": "{72039442-EB38-4D42-A1AD-CB68F7E0EEF6}", + "details": { + "name": "int" + } + } + ] + }, + { + "base": "Erase", + "context": "{0D825FF8-6E54-5ADD-93B0-93496090CEFA}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Erase" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Erase is invoked" + }, + "details": { + "name": "Erase" + }, + "params": [ + { + "typeid": "{0D825FF8-6E54-5ADD-93B0-93496090CEFA}", + "details": { + "name": "AZStd::unordered_map" + } + }, + { + "typeid": "{6383F1D3-BB27-4E6B-A49A-6409B2059EAA}", + "details": { + "name": "EntityId", + "tooltip": "Entity Unique Id" + } + } + ], + "results": [ + { + "typeid": "{0D825FF8-6E54-5ADD-93B0-93496090CEFA}", + "details": { + "name": "AZStd::unordered_map" + } + } + ] + }, + { + "base": "EraseCheck_VM", + "context": "{0D825FF8-6E54-5ADD-93B0-93496090CEFA}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke EraseCheck_VM" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after EraseCheck_VM is invoked" + }, + "details": { + "name": "EraseCheck_VM" + }, + "params": [ + { + "typeid": "{0D825FF8-6E54-5ADD-93B0-93496090CEFA}", + "details": { + "name": "AZStd::unordered_map" + } + }, + { + "typeid": "{6383F1D3-BB27-4E6B-A49A-6409B2059EAA}", + "details": { + "name": "EntityId", + "tooltip": "Entity Unique Id" + } + } + ], + "results": [ + { + "typeid": "{A0CA880C-AFE4-43CB-926C-59AC48496112}", + "details": { + "name": "bool" + } + } + ] + }, + { + "base": "Clear", + "context": "{0D825FF8-6E54-5ADD-93B0-93496090CEFA}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Clear" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Clear is invoked" + }, + "details": { + "name": "Clear" + }, + "params": [ + { + "typeid": "{0D825FF8-6E54-5ADD-93B0-93496090CEFA}", + "details": { + "name": "AZStd::unordered_map" + } + } + ], + "results": [ + { + "typeid": "{0D825FF8-6E54-5ADD-93B0-93496090CEFA}", + "details": { + "name": "AZStd::unordered_map" + } + } + ] + }, + { + "base": "At", + "context": "{0D825FF8-6E54-5ADD-93B0-93496090CEFA}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke At" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after At is invoked" + }, + "details": { + "name": "At" + }, + "params": [ + { + "typeid": "{0D825FF8-6E54-5ADD-93B0-93496090CEFA}", + "details": { + "name": "AZStd::unordered_map" + } + }, + { + "typeid": "{6383F1D3-BB27-4E6B-A49A-6409B2059EAA}", + "details": { + "name": "EntityId", + "tooltip": "Entity Unique Id" + } + } + ], + "results": [ + { + "typeid": "{004ABD25-CF14-4EB3-BD41-022C247C07FA}", + "details": { + "name": "Obb" + } + } + ] + }, + { + "base": "BucketCount", + "context": "{0D825FF8-6E54-5ADD-93B0-93496090CEFA}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke BucketCount" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after BucketCount is invoked" + }, + "details": { + "name": "BucketCount" + }, + "params": [ + { + "typeid": "{0D825FF8-6E54-5ADD-93B0-93496090CEFA}", + "details": { + "name": "AZStd::unordered_map" + } + } + ], + "results": [ + { + "typeid": "{D6597933-47CD-4FC8-B911-63F3E2B0993A}", + "details": { + "name": "AZ::u64" + } + } + ] + }, + { + "base": "Empty", + "context": "{0D825FF8-6E54-5ADD-93B0-93496090CEFA}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Empty" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Empty is invoked" + }, + "details": { + "name": "Empty" + }, + "params": [ + { + "typeid": "{0D825FF8-6E54-5ADD-93B0-93496090CEFA}", + "details": { + "name": "AZStd::unordered_map" + } + } + ], + "results": [ + { + "typeid": "{A0CA880C-AFE4-43CB-926C-59AC48496112}", + "details": { + "name": "bool" + } + } + ] + }, + { + "base": "Swap", + "context": "{0D825FF8-6E54-5ADD-93B0-93496090CEFA}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Swap" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Swap is invoked" + }, + "details": { + "name": "Swap" + }, + "params": [ + { + "typeid": "{0D825FF8-6E54-5ADD-93B0-93496090CEFA}", + "details": { + "name": "AZStd::unordered_map" + } + }, + { + "typeid": "{0D825FF8-6E54-5ADD-93B0-93496090CEFA}", + "details": { + "name": "AZStd::unordered_map" + } + } + ] + } + ] + }, + { + "base": "{FA815A11-0F6B-5BB9-8C9F-71669EB6D4B0}", + "context": "OnDemandReflected", + "variant": "", + "details": { + "name": "Array", + "category": "Array", + "tooltip": "A dynamically sized container of elements." + }, + "methods": [ + { + "base": "Size", + "context": "{FA815A11-0F6B-5BB9-8C9F-71669EB6D4B0}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Size" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Size is invoked" + }, + "details": { + "name": "Size" + }, + "params": [ + { + "typeid": "{FA815A11-0F6B-5BB9-8C9F-71669EB6D4B0}", + "details": { + "name": "AZStd::vector" + } + } + ], + "results": [ + { + "typeid": "{72039442-EB38-4D42-A1AD-CB68F7E0EEF6}", + "details": { + "name": "int" + } + } + ] + }, + { + "base": "Front", + "context": "{FA815A11-0F6B-5BB9-8C9F-71669EB6D4B0}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Front" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Front is invoked" + }, + "details": { + "name": "Front" + }, + "params": [ + { + "typeid": "{FA815A11-0F6B-5BB9-8C9F-71669EB6D4B0}", + "details": { + "name": "AZStd::vector" + } + } + ], + "results": [ + { + "typeid": "{03924488-C7F4-4D6D-948B-ABC2D1AE2FD3}", + "details": { + "name": "any" + } + } + ] + }, + { + "base": "HasKey", + "context": "{FA815A11-0F6B-5BB9-8C9F-71669EB6D4B0}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Has Key" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Has Key is invoked" + }, + "details": { + "name": "Has Key" + }, + "params": [ + { + "typeid": "{FA815A11-0F6B-5BB9-8C9F-71669EB6D4B0}", + "details": { + "name": "AZStd::vector" + } + }, + { + "typeid": "{D6597933-47CD-4FC8-B911-63F3E2B0993A}", + "details": { + "name": "AZ::u64" + } + } + ], + "results": [ + { + "typeid": "{A0CA880C-AFE4-43CB-926C-59AC48496112}", + "details": { + "name": "bool" + } + } + ] + }, + { + "base": "Resize", + "context": "{FA815A11-0F6B-5BB9-8C9F-71669EB6D4B0}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Resize" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Resize is invoked" + }, + "details": { + "name": "Resize" + }, + "params": [ + { + "typeid": "{FA815A11-0F6B-5BB9-8C9F-71669EB6D4B0}", + "details": { + "name": "AZStd::vector" + } + }, + { + "typeid": "{D6597933-47CD-4FC8-B911-63F3E2B0993A}", + "details": { + "name": "AZ::u64" + } + } + ] + }, + { + "base": "at", + "context": "{FA815A11-0F6B-5BB9-8C9F-71669EB6D4B0}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke at" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after at is invoked" + }, + "details": { + "name": "at" + }, + "params": [ + { + "typeid": "{FA815A11-0F6B-5BB9-8C9F-71669EB6D4B0}", + "details": { + "name": "AZStd::vector" + } + }, + { + "typeid": "{D6597933-47CD-4FC8-B911-63F3E2B0993A}", + "details": { + "name": "AZ::u64" + } + } + ], + "results": [ + { + "typeid": "{03924488-C7F4-4D6D-948B-ABC2D1AE2FD3}", + "details": { + "name": "any" + } + } + ] + }, + { + "base": "Back", + "context": "{FA815A11-0F6B-5BB9-8C9F-71669EB6D4B0}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Back" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Back is invoked" + }, + "details": { + "name": "Back" + }, + "params": [ + { + "typeid": "{FA815A11-0F6B-5BB9-8C9F-71669EB6D4B0}", + "details": { + "name": "AZStd::vector" + } + } + ], + "results": [ + { + "typeid": "{03924488-C7F4-4D6D-948B-ABC2D1AE2FD3}", + "details": { + "name": "any" + } + } + ] + }, + { + "base": "pop_back", + "context": "{FA815A11-0F6B-5BB9-8C9F-71669EB6D4B0}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke pop_back" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after pop_back is invoked" + }, + "details": { + "name": "pop_back" + }, + "params": [ + { + "typeid": "{FA815A11-0F6B-5BB9-8C9F-71669EB6D4B0}", + "details": { + "name": "AZStd::vector" + } + } + ] + }, + { + "base": "size", + "context": "{FA815A11-0F6B-5BB9-8C9F-71669EB6D4B0}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke size" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after size is invoked" + }, + "details": { + "name": "size" + }, + "params": [ + { + "typeid": "{FA815A11-0F6B-5BB9-8C9F-71669EB6D4B0}", + "details": { + "name": "AZStd::vector" + } + } + ], + "results": [ + { + "typeid": "{72039442-EB38-4D42-A1AD-CB68F7E0EEF6}", + "details": { + "name": "int" + } + } + ] + }, + { + "base": "At", + "context": "{FA815A11-0F6B-5BB9-8C9F-71669EB6D4B0}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke At" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after At is invoked" + }, + "details": { + "name": "At" + }, + "params": [ + { + "typeid": "{FA815A11-0F6B-5BB9-8C9F-71669EB6D4B0}", + "details": { + "name": "AZStd::vector" + } + }, + { + "typeid": "{D6597933-47CD-4FC8-B911-63F3E2B0993A}", + "details": { + "name": "AZ::u64" + } + } + ], + "results": [ + { + "typeid": "{03924488-C7F4-4D6D-948B-ABC2D1AE2FD3}", + "details": { + "name": "any" + } + } + ] + }, + { + "base": "Empty", + "context": "{FA815A11-0F6B-5BB9-8C9F-71669EB6D4B0}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Empty" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Empty is invoked" + }, + "details": { + "name": "Empty" + }, + "params": [ + { + "typeid": "{FA815A11-0F6B-5BB9-8C9F-71669EB6D4B0}", + "details": { + "name": "AZStd::vector" + } + } + ], + "results": [ + { + "typeid": "{A0CA880C-AFE4-43CB-926C-59AC48496112}", + "details": { + "name": "bool" + } + } + ] + }, + { + "base": "Swap", + "context": "{FA815A11-0F6B-5BB9-8C9F-71669EB6D4B0}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Swap" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Swap is invoked" + }, + "details": { + "name": "Swap" + }, + "params": [ + { + "typeid": "{FA815A11-0F6B-5BB9-8C9F-71669EB6D4B0}", + "details": { + "name": "AZStd::vector" + } + }, + { + "typeid": "{FA815A11-0F6B-5BB9-8C9F-71669EB6D4B0}", + "details": { + "name": "AZStd::vector" + } + } + ] + }, + { + "base": "push_back", + "context": "{FA815A11-0F6B-5BB9-8C9F-71669EB6D4B0}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke push_back" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after push_back is invoked" + }, + "details": { + "name": "push_back" + }, + "params": [ + { + "typeid": "{FA815A11-0F6B-5BB9-8C9F-71669EB6D4B0}", + "details": { + "name": "AZStd::vector" + } + }, + { + "typeid": "{03924488-C7F4-4D6D-948B-ABC2D1AE2FD3}", + "details": { + "name": "any" + } + } + ] + }, + { + "base": "PushBack_VM", + "context": "{FA815A11-0F6B-5BB9-8C9F-71669EB6D4B0}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke PushBack_VM" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after PushBack_VM is invoked" + }, + "details": { + "name": "PushBack_VM" + }, + "params": [ + { + "typeid": "{FA815A11-0F6B-5BB9-8C9F-71669EB6D4B0}", + "details": { + "name": "AZStd::vector" + } + }, + { + "typeid": "{03924488-C7F4-4D6D-948B-ABC2D1AE2FD3}", + "details": { + "name": "any" + } + } + ], + "results": [ + { + "typeid": "{FA815A11-0F6B-5BB9-8C9F-71669EB6D4B0}", + "details": { + "name": "AZStd::vector" + } + } + ] + }, + { + "base": "AtUnchecked", + "context": "{FA815A11-0F6B-5BB9-8C9F-71669EB6D4B0}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke AtUnchecked" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after AtUnchecked is invoked" + }, + "details": { + "name": "AtUnchecked" + }, + "params": [ + { + "typeid": "{FA815A11-0F6B-5BB9-8C9F-71669EB6D4B0}", + "details": { + "name": "AZStd::vector" + } + }, + { + "typeid": "{D6597933-47CD-4FC8-B911-63F3E2B0993A}", + "details": { + "name": "AZ::u64" + } + } + ], + "results": [ + { + "typeid": "{03924488-C7F4-4D6D-948B-ABC2D1AE2FD3}", + "details": { + "name": "any" + } + } + ] + }, + { + "base": "clear", + "context": "{FA815A11-0F6B-5BB9-8C9F-71669EB6D4B0}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke clear" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after clear is invoked" + }, + "details": { + "name": "clear" + }, + "params": [ + { + "typeid": "{FA815A11-0F6B-5BB9-8C9F-71669EB6D4B0}", + "details": { + "name": "AZStd::vector" + } + } + ] + }, + { + "base": "NotEmpty", + "context": "{FA815A11-0F6B-5BB9-8C9F-71669EB6D4B0}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke NotEmpty" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after NotEmpty is invoked" + }, + "details": { + "name": "NotEmpty" + }, + "params": [ + { + "typeid": "{FA815A11-0F6B-5BB9-8C9F-71669EB6D4B0}", + "details": { + "name": "AZStd::vector" + } + } + ], + "results": [ + { + "typeid": "{A0CA880C-AFE4-43CB-926C-59AC48496112}", + "details": { + "name": "bool" + } + } + ] + }, + { + "base": "Erase_VM", + "context": "{FA815A11-0F6B-5BB9-8C9F-71669EB6D4B0}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Erase_VM" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Erase_VM is invoked" + }, + "details": { + "name": "Erase_VM" + }, + "params": [ + { + "typeid": "{FA815A11-0F6B-5BB9-8C9F-71669EB6D4B0}", + "details": { + "name": "AZStd::vector" + } + }, + { + "typeid": "{D6597933-47CD-4FC8-B911-63F3E2B0993A}", + "details": { + "name": "AZ::u64" + } + } + ], + "results": [ + { + "typeid": "{FA815A11-0F6B-5BB9-8C9F-71669EB6D4B0}", + "details": { + "name": "AZStd::vector" + } + } + ] + }, + { + "base": "EraseCheck_VM", + "context": "{FA815A11-0F6B-5BB9-8C9F-71669EB6D4B0}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke EraseCheck_VM" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after EraseCheck_VM is invoked" + }, + "details": { + "name": "EraseCheck_VM" + }, + "params": [ + { + "typeid": "{FA815A11-0F6B-5BB9-8C9F-71669EB6D4B0}", + "details": { + "name": "AZStd::vector" + } + }, + { + "typeid": "{D6597933-47CD-4FC8-B911-63F3E2B0993A}", + "details": { + "name": "AZ::u64" + } + } + ], + "results": [ + { + "typeid": "{A0CA880C-AFE4-43CB-926C-59AC48496112}", + "details": { + "name": "bool" + } + } + ] + }, + { + "base": "Capacity", + "context": "{FA815A11-0F6B-5BB9-8C9F-71669EB6D4B0}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Capacity" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Capacity is invoked" + }, + "details": { + "name": "Capacity" + }, + "params": [ + { + "typeid": "{FA815A11-0F6B-5BB9-8C9F-71669EB6D4B0}", + "details": { + "name": "AZStd::vector" + } + } + ], + "results": [ + { + "typeid": "{D6597933-47CD-4FC8-B911-63F3E2B0993A}", + "details": { + "name": "AZ::u64" + } + } + ] + }, + { + "base": "Clear", + "context": "{FA815A11-0F6B-5BB9-8C9F-71669EB6D4B0}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Clear" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Clear is invoked" + }, + "details": { + "name": "Clear" + }, + "params": [ + { + "typeid": "{FA815A11-0F6B-5BB9-8C9F-71669EB6D4B0}", + "details": { + "name": "AZStd::vector" + } + } + ], + "results": [ + { + "typeid": "{FA815A11-0F6B-5BB9-8C9F-71669EB6D4B0}", + "details": { + "name": "AZStd::vector" + } + } + ] + }, + { + "base": "AssignAt", + "context": "{FA815A11-0F6B-5BB9-8C9F-71669EB6D4B0}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke AssignAt" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after AssignAt is invoked" + }, + "details": { + "name": "AssignAt" + }, + "params": [ + { + "typeid": "{FA815A11-0F6B-5BB9-8C9F-71669EB6D4B0}", + "details": { + "name": "AZStd::vector" + } + }, + { + "typeid": "{D6597933-47CD-4FC8-B911-63F3E2B0993A}", + "details": { + "name": "AZ::u64" + } + }, + { + "typeid": "{03924488-C7F4-4D6D-948B-ABC2D1AE2FD3}", + "details": { + "name": "any" + } + } + ] + }, + { + "base": "GetSize", + "context": "{FA815A11-0F6B-5BB9-8C9F-71669EB6D4B0}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke GetSize" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after GetSize is invoked" + }, + "details": { + "name": "GetSize" + }, + "params": [ + { + "typeid": "{FA815A11-0F6B-5BB9-8C9F-71669EB6D4B0}", + "details": { + "name": "AZStd::vector" + } + } + ], + "results": [ + { + "typeid": "{72039442-EB38-4D42-A1AD-CB68F7E0EEF6}", + "details": { + "name": "int" + } + } + ] + }, + { + "base": "Insert", + "context": "{FA815A11-0F6B-5BB9-8C9F-71669EB6D4B0}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Insert" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Insert is invoked" + }, + "details": { + "name": "Insert" + }, + "params": [ + { + "typeid": "{FA815A11-0F6B-5BB9-8C9F-71669EB6D4B0}", + "details": { + "name": "AZStd::vector" + } + }, + { + "typeid": "{D6597933-47CD-4FC8-B911-63F3E2B0993A}", + "details": { + "name": "AZ::u64" + } + }, + { + "typeid": "{03924488-C7F4-4D6D-948B-ABC2D1AE2FD3}", + "details": { + "name": "any" + } + } + ], + "results": [ + { + "typeid": "{FA815A11-0F6B-5BB9-8C9F-71669EB6D4B0}", + "details": { + "name": "AZStd::vector" + } + } + ] + }, + { + "base": "PushBack", + "context": "{FA815A11-0F6B-5BB9-8C9F-71669EB6D4B0}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke PushBack" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after PushBack is invoked" + }, + "details": { + "name": "PushBack" + }, + "params": [ + { + "typeid": "{FA815A11-0F6B-5BB9-8C9F-71669EB6D4B0}", + "details": { + "name": "AZStd::vector" + } + }, + { + "typeid": "{03924488-C7F4-4D6D-948B-ABC2D1AE2FD3}", + "details": { + "name": "any" + } + } + ] + }, + { + "base": "Reserve", + "context": "{FA815A11-0F6B-5BB9-8C9F-71669EB6D4B0}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Reserve" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Reserve is invoked" + }, + "details": { + "name": "Reserve" + }, + "params": [ + { + "typeid": "{FA815A11-0F6B-5BB9-8C9F-71669EB6D4B0}", + "details": { + "name": "AZStd::vector" + } + }, + { + "typeid": "{D6597933-47CD-4FC8-B911-63F3E2B0993A}", + "details": { + "name": "AZ::u64" + } + } + ] + }, + { + "base": "Iterate_VM", + "context": "{FA815A11-0F6B-5BB9-8C9F-71669EB6D4B0}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Iterate_VM" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Iterate_VM is invoked" + }, + "details": { + "name": "Iterate_VM" + }, + "params": [ + { + "typeid": "{FA815A11-0F6B-5BB9-8C9F-71669EB6D4B0}", + "details": { + "name": "AZStd::vector" + } + } + ], + "results": [ + { + "typeid": "{B9B5B5B4-6801-533A-90D7-B747D42FFE50}", + "details": { + "name": "Iterator_VM>" + } + } + ] + } + ] + }, + { + "base": "{2B7F6107-B177-5C17-9408-823396E6D8B8}", + "context": "OnDemandReflected", + "variant": "", + "details": { + "name": "Intrusive", + "category": "Intrusive", + "tooltip": "A smart pointer which manages the life cycle of an object, and guarantees a single point of ownership for the specified memory." + }, + "methods": [ + { + "base": "get", + "context": "{2B7F6107-B177-5C17-9408-823396E6D8B8}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke get" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after get is invoked" + }, + "details": { + "name": "get" + }, + "params": [ + { + "typeid": "{2B7F6107-B177-5C17-9408-823396E6D8B8}", + "details": { + "name": "AZStd::intrusive_ptr*" + } + } + ], + "results": [ + { + "typeid": "{C30F5522-B381-4B38-BBAF-6E0B1885C8B9}", + "details": { + "name": "Model*" + } + } + ] + } + ] + }, + { + "base": "{6ED13EA7-791B-57A8-A4F1-560B5F35B472}", + "context": "OnDemandReflected", + "variant": "", + "details": { + "name": "Array", + "category": "Array", + "tooltip": "A dynamically sized container of elements." + }, + "methods": [ + { + "base": "Size", + "context": "{6ED13EA7-791B-57A8-A4F1-560B5F35B472}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Size" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Size is invoked" + }, + "details": { + "name": "Size" + }, + "params": [ + { + "typeid": "{6ED13EA7-791B-57A8-A4F1-560B5F35B472}", + "details": { + "name": "AZStd::vector" + } + } + ], + "results": [ + { + "typeid": "{72039442-EB38-4D42-A1AD-CB68F7E0EEF6}", + "details": { + "name": "int" + } + } + ] + }, + { + "base": "Front", + "context": "{6ED13EA7-791B-57A8-A4F1-560B5F35B472}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Front" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Front is invoked" + }, + "details": { + "name": "Front" + }, + "params": [ + { + "typeid": "{6ED13EA7-791B-57A8-A4F1-560B5F35B472}", + "details": { + "name": "AZStd::vector" + } + } + ], + "results": [ + { + "typeid": "{0DA4809B-08A6-49DC-9024-F81645D97FAC}", + "details": { + "name": "A Script Event's method parameter", + "tooltip": "A parameter to a Script Event's event definition" + } + } + ] + }, + { + "base": "HasKey", + "context": "{6ED13EA7-791B-57A8-A4F1-560B5F35B472}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Has Key" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Has Key is invoked" + }, + "details": { + "name": "Has Key" + }, + "params": [ + { + "typeid": "{6ED13EA7-791B-57A8-A4F1-560B5F35B472}", + "details": { + "name": "AZStd::vector" + } + }, + { + "typeid": "{D6597933-47CD-4FC8-B911-63F3E2B0993A}", + "details": { + "name": "AZ::u64" + } + } + ], + "results": [ + { + "typeid": "{A0CA880C-AFE4-43CB-926C-59AC48496112}", + "details": { + "name": "bool" + } + } + ] + }, + { + "base": "Resize", + "context": "{6ED13EA7-791B-57A8-A4F1-560B5F35B472}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Resize" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Resize is invoked" + }, + "details": { + "name": "Resize" + }, + "params": [ + { + "typeid": "{6ED13EA7-791B-57A8-A4F1-560B5F35B472}", + "details": { + "name": "AZStd::vector" + } + }, + { + "typeid": "{D6597933-47CD-4FC8-B911-63F3E2B0993A}", + "details": { + "name": "AZ::u64" + } + } + ] + }, + { + "base": "at", + "context": "{6ED13EA7-791B-57A8-A4F1-560B5F35B472}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke at" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after at is invoked" + }, + "details": { + "name": "at" + }, + "params": [ + { + "typeid": "{6ED13EA7-791B-57A8-A4F1-560B5F35B472}", + "details": { + "name": "AZStd::vector" + } + }, + { + "typeid": "{D6597933-47CD-4FC8-B911-63F3E2B0993A}", + "details": { + "name": "AZ::u64" + } + } + ], + "results": [ + { + "typeid": "{0DA4809B-08A6-49DC-9024-F81645D97FAC}", + "details": { + "name": "A Script Event's method parameter", + "tooltip": "A parameter to a Script Event's event definition" + } + } + ] + }, + { + "base": "Back", + "context": "{6ED13EA7-791B-57A8-A4F1-560B5F35B472}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Back" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Back is invoked" + }, + "details": { + "name": "Back" + }, + "params": [ + { + "typeid": "{6ED13EA7-791B-57A8-A4F1-560B5F35B472}", + "details": { + "name": "AZStd::vector" + } + } + ], + "results": [ + { + "typeid": "{0DA4809B-08A6-49DC-9024-F81645D97FAC}", + "details": { + "name": "A Script Event's method parameter", + "tooltip": "A parameter to a Script Event's event definition" + } + } + ] + }, + { + "base": "pop_back", + "context": "{6ED13EA7-791B-57A8-A4F1-560B5F35B472}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke pop_back" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after pop_back is invoked" + }, + "details": { + "name": "pop_back" + }, + "params": [ + { + "typeid": "{6ED13EA7-791B-57A8-A4F1-560B5F35B472}", + "details": { + "name": "AZStd::vector" + } + } + ] + }, + { + "base": "size", + "context": "{6ED13EA7-791B-57A8-A4F1-560B5F35B472}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke size" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after size is invoked" + }, + "details": { + "name": "size" + }, + "params": [ + { + "typeid": "{6ED13EA7-791B-57A8-A4F1-560B5F35B472}", + "details": { + "name": "AZStd::vector" + } + } + ], + "results": [ + { + "typeid": "{72039442-EB38-4D42-A1AD-CB68F7E0EEF6}", + "details": { + "name": "int" + } + } + ] + }, + { + "base": "At", + "context": "{6ED13EA7-791B-57A8-A4F1-560B5F35B472}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke At" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after At is invoked" + }, + "details": { + "name": "At" + }, + "params": [ + { + "typeid": "{6ED13EA7-791B-57A8-A4F1-560B5F35B472}", + "details": { + "name": "AZStd::vector" + } + }, + { + "typeid": "{D6597933-47CD-4FC8-B911-63F3E2B0993A}", + "details": { + "name": "AZ::u64" + } + } + ], + "results": [ + { + "typeid": "{0DA4809B-08A6-49DC-9024-F81645D97FAC}", + "details": { + "name": "A Script Event's method parameter", + "tooltip": "A parameter to a Script Event's event definition" + } + } + ] + }, + { + "base": "Empty", + "context": "{6ED13EA7-791B-57A8-A4F1-560B5F35B472}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Empty" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Empty is invoked" + }, + "details": { + "name": "Empty" + }, + "params": [ + { + "typeid": "{6ED13EA7-791B-57A8-A4F1-560B5F35B472}", + "details": { + "name": "AZStd::vector" + } + } + ], + "results": [ + { + "typeid": "{A0CA880C-AFE4-43CB-926C-59AC48496112}", + "details": { + "name": "bool" + } + } + ] + }, + { + "base": "Swap", + "context": "{6ED13EA7-791B-57A8-A4F1-560B5F35B472}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Swap" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Swap is invoked" + }, + "details": { + "name": "Swap" + }, + "params": [ + { + "typeid": "{6ED13EA7-791B-57A8-A4F1-560B5F35B472}", + "details": { + "name": "AZStd::vector" + } + }, + { + "typeid": "{6ED13EA7-791B-57A8-A4F1-560B5F35B472}", + "details": { + "name": "AZStd::vector" + } + } + ] + }, + { + "base": "push_back", + "context": "{6ED13EA7-791B-57A8-A4F1-560B5F35B472}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke push_back" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after push_back is invoked" + }, + "details": { + "name": "push_back" + }, + "params": [ + { + "typeid": "{6ED13EA7-791B-57A8-A4F1-560B5F35B472}", + "details": { + "name": "AZStd::vector" + } + }, + { + "typeid": "{0DA4809B-08A6-49DC-9024-F81645D97FAC}", + "details": { + "name": "A Script Event's method parameter", + "tooltip": "A parameter to a Script Event's event definition" + } + } + ] + }, + { + "base": "PushBack_VM", + "context": "{6ED13EA7-791B-57A8-A4F1-560B5F35B472}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke PushBack_VM" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after PushBack_VM is invoked" + }, + "details": { + "name": "PushBack_VM" + }, + "params": [ + { + "typeid": "{6ED13EA7-791B-57A8-A4F1-560B5F35B472}", + "details": { + "name": "AZStd::vector" + } + }, + { + "typeid": "{0DA4809B-08A6-49DC-9024-F81645D97FAC}", + "details": { + "name": "A Script Event's method parameter", + "tooltip": "A parameter to a Script Event's event definition" + } + } + ], + "results": [ + { + "typeid": "{6ED13EA7-791B-57A8-A4F1-560B5F35B472}", + "details": { + "name": "AZStd::vector" + } + } + ] + }, + { + "base": "AtUnchecked", + "context": "{6ED13EA7-791B-57A8-A4F1-560B5F35B472}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke AtUnchecked" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after AtUnchecked is invoked" + }, + "details": { + "name": "AtUnchecked" + }, + "params": [ + { + "typeid": "{6ED13EA7-791B-57A8-A4F1-560B5F35B472}", + "details": { + "name": "AZStd::vector" + } + }, + { + "typeid": "{D6597933-47CD-4FC8-B911-63F3E2B0993A}", + "details": { + "name": "AZ::u64" + } + } + ], + "results": [ + { + "typeid": "{0DA4809B-08A6-49DC-9024-F81645D97FAC}", + "details": { + "name": "A Script Event's method parameter", + "tooltip": "A parameter to a Script Event's event definition" + } + } + ] + }, + { + "base": "clear", + "context": "{6ED13EA7-791B-57A8-A4F1-560B5F35B472}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke clear" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after clear is invoked" + }, + "details": { + "name": "clear" + }, + "params": [ + { + "typeid": "{6ED13EA7-791B-57A8-A4F1-560B5F35B472}", + "details": { + "name": "AZStd::vector" + } + } + ] + }, + { + "base": "NotEmpty", + "context": "{6ED13EA7-791B-57A8-A4F1-560B5F35B472}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke NotEmpty" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after NotEmpty is invoked" + }, + "details": { + "name": "NotEmpty" + }, + "params": [ + { + "typeid": "{6ED13EA7-791B-57A8-A4F1-560B5F35B472}", + "details": { + "name": "AZStd::vector" + } + } + ], + "results": [ + { + "typeid": "{A0CA880C-AFE4-43CB-926C-59AC48496112}", + "details": { + "name": "bool" + } + } + ] + }, + { + "base": "Erase_VM", + "context": "{6ED13EA7-791B-57A8-A4F1-560B5F35B472}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Erase_VM" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Erase_VM is invoked" + }, + "details": { + "name": "Erase_VM" + }, + "params": [ + { + "typeid": "{6ED13EA7-791B-57A8-A4F1-560B5F35B472}", + "details": { + "name": "AZStd::vector" + } + }, + { + "typeid": "{D6597933-47CD-4FC8-B911-63F3E2B0993A}", + "details": { + "name": "AZ::u64" + } + } + ], + "results": [ + { + "typeid": "{6ED13EA7-791B-57A8-A4F1-560B5F35B472}", + "details": { + "name": "AZStd::vector" + } + } + ] + }, + { + "base": "EraseCheck_VM", + "context": "{6ED13EA7-791B-57A8-A4F1-560B5F35B472}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke EraseCheck_VM" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after EraseCheck_VM is invoked" + }, + "details": { + "name": "EraseCheck_VM" + }, + "params": [ + { + "typeid": "{6ED13EA7-791B-57A8-A4F1-560B5F35B472}", + "details": { + "name": "AZStd::vector" + } + }, + { + "typeid": "{D6597933-47CD-4FC8-B911-63F3E2B0993A}", + "details": { + "name": "AZ::u64" + } + } + ], + "results": [ + { + "typeid": "{A0CA880C-AFE4-43CB-926C-59AC48496112}", + "details": { + "name": "bool" + } + } + ] + }, + { + "base": "Capacity", + "context": "{6ED13EA7-791B-57A8-A4F1-560B5F35B472}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Capacity" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Capacity is invoked" + }, + "details": { + "name": "Capacity" + }, + "params": [ + { + "typeid": "{6ED13EA7-791B-57A8-A4F1-560B5F35B472}", + "details": { + "name": "AZStd::vector" + } + } + ], + "results": [ + { + "typeid": "{D6597933-47CD-4FC8-B911-63F3E2B0993A}", + "details": { + "name": "AZ::u64" + } + } + ] + }, + { + "base": "Clear", + "context": "{6ED13EA7-791B-57A8-A4F1-560B5F35B472}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Clear" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Clear is invoked" + }, + "details": { + "name": "Clear" + }, + "params": [ + { + "typeid": "{6ED13EA7-791B-57A8-A4F1-560B5F35B472}", + "details": { + "name": "AZStd::vector" + } + } + ], + "results": [ + { + "typeid": "{6ED13EA7-791B-57A8-A4F1-560B5F35B472}", + "details": { + "name": "AZStd::vector" + } + } + ] + }, + { + "base": "AssignAt", + "context": "{6ED13EA7-791B-57A8-A4F1-560B5F35B472}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke AssignAt" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after AssignAt is invoked" + }, + "details": { + "name": "AssignAt" + }, + "params": [ + { + "typeid": "{6ED13EA7-791B-57A8-A4F1-560B5F35B472}", + "details": { + "name": "AZStd::vector" + } + }, + { + "typeid": "{D6597933-47CD-4FC8-B911-63F3E2B0993A}", + "details": { + "name": "AZ::u64" + } + }, + { + "typeid": "{0DA4809B-08A6-49DC-9024-F81645D97FAC}", + "details": { + "name": "A Script Event's method parameter", + "tooltip": "A parameter to a Script Event's event definition" + } + } + ] + }, + { + "base": "GetSize", + "context": "{6ED13EA7-791B-57A8-A4F1-560B5F35B472}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke GetSize" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after GetSize is invoked" + }, + "details": { + "name": "GetSize" + }, + "params": [ + { + "typeid": "{6ED13EA7-791B-57A8-A4F1-560B5F35B472}", + "details": { + "name": "AZStd::vector" + } + } + ], + "results": [ + { + "typeid": "{72039442-EB38-4D42-A1AD-CB68F7E0EEF6}", + "details": { + "name": "int" + } + } + ] + }, + { + "base": "Insert", + "context": "{6ED13EA7-791B-57A8-A4F1-560B5F35B472}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Insert" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Insert is invoked" + }, + "details": { + "name": "Insert" + }, + "params": [ + { + "typeid": "{6ED13EA7-791B-57A8-A4F1-560B5F35B472}", + "details": { + "name": "AZStd::vector" + } + }, + { + "typeid": "{D6597933-47CD-4FC8-B911-63F3E2B0993A}", + "details": { + "name": "AZ::u64" + } + }, + { + "typeid": "{0DA4809B-08A6-49DC-9024-F81645D97FAC}", + "details": { + "name": "A Script Event's method parameter", + "tooltip": "A parameter to a Script Event's event definition" + } + } + ], + "results": [ + { + "typeid": "{6ED13EA7-791B-57A8-A4F1-560B5F35B472}", + "details": { + "name": "AZStd::vector" + } + } + ] + }, + { + "base": "PushBack", + "context": "{6ED13EA7-791B-57A8-A4F1-560B5F35B472}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke PushBack" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after PushBack is invoked" + }, + "details": { + "name": "PushBack" + }, + "params": [ + { + "typeid": "{6ED13EA7-791B-57A8-A4F1-560B5F35B472}", + "details": { + "name": "AZStd::vector" + } + }, + { + "typeid": "{0DA4809B-08A6-49DC-9024-F81645D97FAC}", + "details": { + "name": "A Script Event's method parameter", + "tooltip": "A parameter to a Script Event's event definition" + } + } + ] + }, + { + "base": "Reserve", + "context": "{6ED13EA7-791B-57A8-A4F1-560B5F35B472}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Reserve" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Reserve is invoked" + }, + "details": { + "name": "Reserve" + }, + "params": [ + { + "typeid": "{6ED13EA7-791B-57A8-A4F1-560B5F35B472}", + "details": { + "name": "AZStd::vector" + } + }, + { + "typeid": "{D6597933-47CD-4FC8-B911-63F3E2B0993A}", + "details": { + "name": "AZ::u64" + } + } + ] + }, + { + "base": "Iterate_VM", + "context": "{6ED13EA7-791B-57A8-A4F1-560B5F35B472}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Iterate_VM" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Iterate_VM is invoked" + }, + "details": { + "name": "Iterate_VM" + }, + "params": [ + { + "typeid": "{6ED13EA7-791B-57A8-A4F1-560B5F35B472}", + "details": { + "name": "AZStd::vector" + } + } + ], + "results": [ + { + "typeid": "{44F6AC46-CCBE-5FC0-BEEC-1401AD7B4502}", + "details": { + "name": "Iterator_VM>" + } + } + ] + } + ] + }, + { + "base": "{9ABF5933-C8FC-53CD-A518-B6AF433CF496}", + "context": "OnDemandReflected", + "variant": "", + "details": { + "name": "Map", + "category": "Map", + "tooltip": "A collection of Key/Value pairs, where each Key value must be unique." + }, + "methods": [ + { + "base": "contains", + "context": "{9ABF5933-C8FC-53CD-A518-B6AF433CF496}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke contains" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after contains is invoked" + }, + "details": { + "name": "contains" + }, + "params": [ + { + "typeid": "{9ABF5933-C8FC-53CD-A518-B6AF433CF496}", + "details": { + "name": "AZStd::unordered_map" + } + }, + { + "typeid": "{A0CA880C-AFE4-43CB-926C-59AC48496112}", + "details": { + "name": "bool" + } + } + ], + "results": [ + { + "typeid": "{A0CA880C-AFE4-43CB-926C-59AC48496112}", + "details": { + "name": "bool" + } + } + ] + }, + { + "base": "Insert", + "context": "{9ABF5933-C8FC-53CD-A518-B6AF433CF496}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Insert" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Insert is invoked" + }, + "details": { + "name": "Insert" + }, + "params": [ + { + "typeid": "{9ABF5933-C8FC-53CD-A518-B6AF433CF496}", + "details": { + "name": "AZStd::unordered_map" + } + }, + { + "typeid": "{A0CA880C-AFE4-43CB-926C-59AC48496112}", + "details": { + "name": "bool" + } + }, + { + "typeid": "{157193C7-B673-4A2B-8B43-5681DCC3DEC3}", + "details": { + "name": "Matrix4x4" + } + } + ], + "results": [ + { + "typeid": "{9ABF5933-C8FC-53CD-A518-B6AF433CF496}", + "details": { + "name": "AZStd::unordered_map" + } + } + ] + }, + { + "base": "Reserve", + "context": "{9ABF5933-C8FC-53CD-A518-B6AF433CF496}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Reserve" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Reserve is invoked" + }, + "details": { + "name": "Reserve" + }, + "params": [ + { + "typeid": "{9ABF5933-C8FC-53CD-A518-B6AF433CF496}", + "details": { + "name": "AZStd::unordered_map" + } + }, + { + "typeid": "{D6597933-47CD-4FC8-B911-63F3E2B0993A}", + "details": { + "name": "AZ::u64" + } + } + ] + }, + { + "base": "GetSize", + "context": "{9ABF5933-C8FC-53CD-A518-B6AF433CF496}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke GetSize" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after GetSize is invoked" + }, + "details": { + "name": "GetSize" + }, + "params": [ + { + "typeid": "{9ABF5933-C8FC-53CD-A518-B6AF433CF496}", + "details": { + "name": "AZStd::unordered_map" + } + } + ], + "results": [ + { + "typeid": "{72039442-EB38-4D42-A1AD-CB68F7E0EEF6}", + "details": { + "name": "int" + } + } + ] + }, + { + "base": "Iterate_VM", + "context": "{9ABF5933-C8FC-53CD-A518-B6AF433CF496}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Iterate_VM" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Iterate_VM is invoked" + }, + "details": { + "name": "Iterate_VM" + }, + "params": [ + { + "typeid": "{9ABF5933-C8FC-53CD-A518-B6AF433CF496}", + "details": { + "name": "AZStd::unordered_map" + } + } + ], + "results": [ + { + "typeid": "{379F2288-1C1D-55DE-99E5-4453234FDA64}", + "details": { + "name": "Iterator_VM, AZStd::equal_to, allocator>>" + } + } + ] + }, + { + "base": "GetKeys", + "context": "{9ABF5933-C8FC-53CD-A518-B6AF433CF496}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke GetKeys" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after GetKeys is invoked" + }, + "details": { + "name": "GetKeys" + }, + "params": [ + { + "typeid": "{9ABF5933-C8FC-53CD-A518-B6AF433CF496}", + "details": { + "name": "AZStd::unordered_map" + } + } + ], + "results": [ + { + "typeid": "{B505B05D-57BF-5A45-9113-B3A2784E2CD7}", + "details": { + "name": "AZStd::vector" + } + } + ] + }, + { + "base": "Size", + "context": "{9ABF5933-C8FC-53CD-A518-B6AF433CF496}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Size" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Size is invoked" + }, + "details": { + "name": "Size" + }, + "params": [ + { + "typeid": "{9ABF5933-C8FC-53CD-A518-B6AF433CF496}", + "details": { + "name": "AZStd::unordered_map" + } + } + ], + "results": [ + { + "typeid": "{72039442-EB38-4D42-A1AD-CB68F7E0EEF6}", + "details": { + "name": "int" + } + } + ] + }, + { + "base": "Erase", + "context": "{9ABF5933-C8FC-53CD-A518-B6AF433CF496}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Erase" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Erase is invoked" + }, + "details": { + "name": "Erase" + }, + "params": [ + { + "typeid": "{9ABF5933-C8FC-53CD-A518-B6AF433CF496}", + "details": { + "name": "AZStd::unordered_map" + } + }, + { + "typeid": "{A0CA880C-AFE4-43CB-926C-59AC48496112}", + "details": { + "name": "bool" + } + } + ], + "results": [ + { + "typeid": "{9ABF5933-C8FC-53CD-A518-B6AF433CF496}", + "details": { + "name": "AZStd::unordered_map" + } + } + ] + }, + { + "base": "EraseCheck_VM", + "context": "{9ABF5933-C8FC-53CD-A518-B6AF433CF496}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke EraseCheck_VM" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after EraseCheck_VM is invoked" + }, + "details": { + "name": "EraseCheck_VM" + }, + "params": [ + { + "typeid": "{9ABF5933-C8FC-53CD-A518-B6AF433CF496}", + "details": { + "name": "AZStd::unordered_map" + } + }, + { + "typeid": "{A0CA880C-AFE4-43CB-926C-59AC48496112}", + "details": { + "name": "bool" + } + } + ], + "results": [ + { + "typeid": "{A0CA880C-AFE4-43CB-926C-59AC48496112}", + "details": { + "name": "bool" + } + } + ] + }, + { + "base": "Clear", + "context": "{9ABF5933-C8FC-53CD-A518-B6AF433CF496}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Clear" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Clear is invoked" + }, + "details": { + "name": "Clear" + }, + "params": [ + { + "typeid": "{9ABF5933-C8FC-53CD-A518-B6AF433CF496}", + "details": { + "name": "AZStd::unordered_map" + } + } + ], + "results": [ + { + "typeid": "{9ABF5933-C8FC-53CD-A518-B6AF433CF496}", + "details": { + "name": "AZStd::unordered_map" + } + } + ] + }, + { + "base": "At", + "context": "{9ABF5933-C8FC-53CD-A518-B6AF433CF496}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke At" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after At is invoked" + }, + "details": { + "name": "At" + }, + "params": [ + { + "typeid": "{9ABF5933-C8FC-53CD-A518-B6AF433CF496}", + "details": { + "name": "AZStd::unordered_map" + } + }, + { + "typeid": "{A0CA880C-AFE4-43CB-926C-59AC48496112}", + "details": { + "name": "bool" + } + } + ], + "results": [ + { + "typeid": "{157193C7-B673-4A2B-8B43-5681DCC3DEC3}", + "details": { + "name": "Matrix4x4" + } + } + ] + }, + { + "base": "BucketCount", + "context": "{9ABF5933-C8FC-53CD-A518-B6AF433CF496}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke BucketCount" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after BucketCount is invoked" + }, + "details": { + "name": "BucketCount" + }, + "params": [ + { + "typeid": "{9ABF5933-C8FC-53CD-A518-B6AF433CF496}", + "details": { + "name": "AZStd::unordered_map" + } + } + ], + "results": [ + { + "typeid": "{D6597933-47CD-4FC8-B911-63F3E2B0993A}", + "details": { + "name": "AZ::u64" + } + } + ] + }, + { + "base": "Empty", + "context": "{9ABF5933-C8FC-53CD-A518-B6AF433CF496}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Empty" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Empty is invoked" + }, + "details": { + "name": "Empty" + }, + "params": [ + { + "typeid": "{9ABF5933-C8FC-53CD-A518-B6AF433CF496}", + "details": { + "name": "AZStd::unordered_map" + } + } + ], + "results": [ + { + "typeid": "{A0CA880C-AFE4-43CB-926C-59AC48496112}", + "details": { + "name": "bool" + } + } + ] + }, + { + "base": "Swap", + "context": "{9ABF5933-C8FC-53CD-A518-B6AF433CF496}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Swap" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Swap is invoked" + }, + "details": { + "name": "Swap" + }, + "params": [ + { + "typeid": "{9ABF5933-C8FC-53CD-A518-B6AF433CF496}", + "details": { + "name": "AZStd::unordered_map" + } + }, + { + "typeid": "{9ABF5933-C8FC-53CD-A518-B6AF433CF496}", + "details": { + "name": "AZStd::unordered_map" + } + } + ] + } + ] + }, + { + "base": "{D9EF6EA6-B182-5A36-A7FF-E376FD0C05C7}", + "context": "OnDemandReflected", + "variant": "", + "details": { + "name": "Map", + "category": "Map", + "tooltip": "A collection of Key/Value pairs, where each Key value must be unique." + }, + "methods": [ + { + "base": "contains", + "context": "{D9EF6EA6-B182-5A36-A7FF-E376FD0C05C7}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke contains" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after contains is invoked" + }, + "details": { + "name": "contains" + }, + "params": [ + { + "typeid": "{D9EF6EA6-B182-5A36-A7FF-E376FD0C05C7}", + "details": { + "name": "AZStd::unordered_map" + } + }, + { + "typeid": "{652ED536-3402-439B-AEBE-4A5DBC554085}", + "details": { + "name": "AssetId" + } + } + ], + "results": [ + { + "typeid": "{A0CA880C-AFE4-43CB-926C-59AC48496112}", + "details": { + "name": "bool" + } + } + ] + }, + { + "base": "Insert", + "context": "{D9EF6EA6-B182-5A36-A7FF-E376FD0C05C7}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Insert" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Insert is invoked" + }, + "details": { + "name": "Insert" + }, + "params": [ + { + "typeid": "{D9EF6EA6-B182-5A36-A7FF-E376FD0C05C7}", + "details": { + "name": "AZStd::unordered_map" + } + }, + { + "typeid": "{652ED536-3402-439B-AEBE-4A5DBC554085}", + "details": { + "name": "AssetId" + } + }, + { + "typeid": "{9F4E062E-06A0-46D4-85DF-E0DA96467D3A}", + "details": { + "name": "Crc32" + } + } + ], + "results": [ + { + "typeid": "{D9EF6EA6-B182-5A36-A7FF-E376FD0C05C7}", + "details": { + "name": "AZStd::unordered_map" + } + } + ] + }, + { + "base": "Reserve", + "context": "{D9EF6EA6-B182-5A36-A7FF-E376FD0C05C7}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Reserve" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Reserve is invoked" + }, + "details": { + "name": "Reserve" + }, + "params": [ + { + "typeid": "{D9EF6EA6-B182-5A36-A7FF-E376FD0C05C7}", + "details": { + "name": "AZStd::unordered_map" + } + }, + { + "typeid": "{D6597933-47CD-4FC8-B911-63F3E2B0993A}", + "details": { + "name": "AZ::u64" + } + } + ] + }, + { + "base": "GetSize", + "context": "{D9EF6EA6-B182-5A36-A7FF-E376FD0C05C7}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke GetSize" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after GetSize is invoked" + }, + "details": { + "name": "GetSize" + }, + "params": [ + { + "typeid": "{D9EF6EA6-B182-5A36-A7FF-E376FD0C05C7}", + "details": { + "name": "AZStd::unordered_map" + } + } + ], + "results": [ + { + "typeid": "{72039442-EB38-4D42-A1AD-CB68F7E0EEF6}", + "details": { + "name": "int" + } + } + ] + }, + { + "base": "Iterate_VM", + "context": "{D9EF6EA6-B182-5A36-A7FF-E376FD0C05C7}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Iterate_VM" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Iterate_VM is invoked" + }, + "details": { + "name": "Iterate_VM" + }, + "params": [ + { + "typeid": "{D9EF6EA6-B182-5A36-A7FF-E376FD0C05C7}", + "details": { + "name": "AZStd::unordered_map" + } + } + ], + "results": [ + { + "typeid": "{D35AE682-D78E-5D7C-9729-DE8A932A745E}", + "details": { + "name": "Iterator_VM, AZStd::equal_to, allocator>>" + } + } + ] + }, + { + "base": "GetKeys", + "context": "{D9EF6EA6-B182-5A36-A7FF-E376FD0C05C7}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke GetKeys" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after GetKeys is invoked" + }, + "details": { + "name": "GetKeys" + }, + "params": [ + { + "typeid": "{D9EF6EA6-B182-5A36-A7FF-E376FD0C05C7}", + "details": { + "name": "AZStd::unordered_map" + } + } + ], + "results": [ + { + "typeid": "{877C4A33-39B5-51D7-948D-F97DB81372A1}", + "details": { + "name": "AZStd::vector" + } + } + ] + }, + { + "base": "Size", + "context": "{D9EF6EA6-B182-5A36-A7FF-E376FD0C05C7}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Size" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Size is invoked" + }, + "details": { + "name": "Size" + }, + "params": [ + { + "typeid": "{D9EF6EA6-B182-5A36-A7FF-E376FD0C05C7}", + "details": { + "name": "AZStd::unordered_map" + } + } + ], + "results": [ + { + "typeid": "{72039442-EB38-4D42-A1AD-CB68F7E0EEF6}", + "details": { + "name": "int" + } + } + ] + }, + { + "base": "Erase", + "context": "{D9EF6EA6-B182-5A36-A7FF-E376FD0C05C7}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Erase" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Erase is invoked" + }, + "details": { + "name": "Erase" + }, + "params": [ + { + "typeid": "{D9EF6EA6-B182-5A36-A7FF-E376FD0C05C7}", + "details": { + "name": "AZStd::unordered_map" + } + }, + { + "typeid": "{652ED536-3402-439B-AEBE-4A5DBC554085}", + "details": { + "name": "AssetId" + } + } + ], + "results": [ + { + "typeid": "{D9EF6EA6-B182-5A36-A7FF-E376FD0C05C7}", + "details": { + "name": "AZStd::unordered_map" + } + } + ] + }, + { + "base": "EraseCheck_VM", + "context": "{D9EF6EA6-B182-5A36-A7FF-E376FD0C05C7}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke EraseCheck_VM" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after EraseCheck_VM is invoked" + }, + "details": { + "name": "EraseCheck_VM" + }, + "params": [ + { + "typeid": "{D9EF6EA6-B182-5A36-A7FF-E376FD0C05C7}", + "details": { + "name": "AZStd::unordered_map" + } + }, + { + "typeid": "{652ED536-3402-439B-AEBE-4A5DBC554085}", + "details": { + "name": "AssetId" + } + } + ], + "results": [ + { + "typeid": "{A0CA880C-AFE4-43CB-926C-59AC48496112}", + "details": { + "name": "bool" + } + } + ] + }, + { + "base": "Clear", + "context": "{D9EF6EA6-B182-5A36-A7FF-E376FD0C05C7}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Clear" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Clear is invoked" + }, + "details": { + "name": "Clear" + }, + "params": [ + { + "typeid": "{D9EF6EA6-B182-5A36-A7FF-E376FD0C05C7}", + "details": { + "name": "AZStd::unordered_map" + } + } + ], + "results": [ + { + "typeid": "{D9EF6EA6-B182-5A36-A7FF-E376FD0C05C7}", + "details": { + "name": "AZStd::unordered_map" + } + } + ] + }, + { + "base": "At", + "context": "{D9EF6EA6-B182-5A36-A7FF-E376FD0C05C7}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke At" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after At is invoked" + }, + "details": { + "name": "At" + }, + "params": [ + { + "typeid": "{D9EF6EA6-B182-5A36-A7FF-E376FD0C05C7}", + "details": { + "name": "AZStd::unordered_map" + } + }, + { + "typeid": "{652ED536-3402-439B-AEBE-4A5DBC554085}", + "details": { + "name": "AssetId" + } + } + ], + "results": [ + { + "typeid": "{9F4E062E-06A0-46D4-85DF-E0DA96467D3A}", + "details": { + "name": "Crc32" + } + } + ] + }, + { + "base": "BucketCount", + "context": "{D9EF6EA6-B182-5A36-A7FF-E376FD0C05C7}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke BucketCount" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after BucketCount is invoked" + }, + "details": { + "name": "BucketCount" + }, + "params": [ + { + "typeid": "{D9EF6EA6-B182-5A36-A7FF-E376FD0C05C7}", + "details": { + "name": "AZStd::unordered_map" + } + } + ], + "results": [ + { + "typeid": "{D6597933-47CD-4FC8-B911-63F3E2B0993A}", + "details": { + "name": "AZ::u64" + } + } + ] + }, + { + "base": "Empty", + "context": "{D9EF6EA6-B182-5A36-A7FF-E376FD0C05C7}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Empty" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Empty is invoked" + }, + "details": { + "name": "Empty" + }, + "params": [ + { + "typeid": "{D9EF6EA6-B182-5A36-A7FF-E376FD0C05C7}", + "details": { + "name": "AZStd::unordered_map" + } + } + ], + "results": [ + { + "typeid": "{A0CA880C-AFE4-43CB-926C-59AC48496112}", + "details": { + "name": "bool" + } + } + ] + }, + { + "base": "Swap", + "context": "{D9EF6EA6-B182-5A36-A7FF-E376FD0C05C7}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Swap" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Swap is invoked" + }, + "details": { + "name": "Swap" + }, + "params": [ + { + "typeid": "{D9EF6EA6-B182-5A36-A7FF-E376FD0C05C7}", + "details": { + "name": "AZStd::unordered_map" + } + }, + { + "typeid": "{D9EF6EA6-B182-5A36-A7FF-E376FD0C05C7}", + "details": { + "name": "AZStd::unordered_map" + } + } + ] + } + ] + }, + { + "base": "{AF6D8DD5-0386-5E48-86B0-86131BC0D2D6}", + "context": "OnDemandReflected", + "variant": "", + "details": { + "name": "Map", + "category": "Map", + "tooltip": "A collection of Key/Value pairs, where each Key value must be unique." + }, + "methods": [ + { + "base": "contains", + "context": "{AF6D8DD5-0386-5E48-86B0-86131BC0D2D6}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke contains" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after contains is invoked" + }, + "details": { + "name": "contains" + }, + "params": [ + { + "typeid": "{AF6D8DD5-0386-5E48-86B0-86131BC0D2D6}", + "details": { + "name": "AZStd::unordered_map" + } + }, + { + "typeid": "{652ED536-3402-439B-AEBE-4A5DBC554085}", + "details": { + "name": "AssetId" + } + } + ], + "results": [ + { + "typeid": "{A0CA880C-AFE4-43CB-926C-59AC48496112}", + "details": { + "name": "bool" + } + } + ] + }, + { + "base": "Insert", + "context": "{AF6D8DD5-0386-5E48-86B0-86131BC0D2D6}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Insert" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Insert is invoked" + }, + "details": { + "name": "Insert" + }, + "params": [ + { + "typeid": "{AF6D8DD5-0386-5E48-86B0-86131BC0D2D6}", + "details": { + "name": "AZStd::unordered_map" + } + }, + { + "typeid": "{652ED536-3402-439B-AEBE-4A5DBC554085}", + "details": { + "name": "AssetId" + } + }, + { + "typeid": "{847DD984-9DBF-4789-8E25-E0334402E8AD}", + "details": { + "name": "Plane" + } + } + ], + "results": [ + { + "typeid": "{AF6D8DD5-0386-5E48-86B0-86131BC0D2D6}", + "details": { + "name": "AZStd::unordered_map" + } + } + ] + }, + { + "base": "Reserve", + "context": "{AF6D8DD5-0386-5E48-86B0-86131BC0D2D6}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Reserve" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Reserve is invoked" + }, + "details": { + "name": "Reserve" + }, + "params": [ + { + "typeid": "{AF6D8DD5-0386-5E48-86B0-86131BC0D2D6}", + "details": { + "name": "AZStd::unordered_map" + } + }, + { + "typeid": "{D6597933-47CD-4FC8-B911-63F3E2B0993A}", + "details": { + "name": "AZ::u64" + } + } + ] + }, + { + "base": "GetSize", + "context": "{AF6D8DD5-0386-5E48-86B0-86131BC0D2D6}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke GetSize" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after GetSize is invoked" + }, + "details": { + "name": "GetSize" + }, + "params": [ + { + "typeid": "{AF6D8DD5-0386-5E48-86B0-86131BC0D2D6}", + "details": { + "name": "AZStd::unordered_map" + } + } + ], + "results": [ + { + "typeid": "{72039442-EB38-4D42-A1AD-CB68F7E0EEF6}", + "details": { + "name": "int" + } + } + ] + }, + { + "base": "Iterate_VM", + "context": "{AF6D8DD5-0386-5E48-86B0-86131BC0D2D6}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Iterate_VM" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Iterate_VM is invoked" + }, + "details": { + "name": "Iterate_VM" + }, + "params": [ + { + "typeid": "{AF6D8DD5-0386-5E48-86B0-86131BC0D2D6}", + "details": { + "name": "AZStd::unordered_map" + } + } + ], + "results": [ + { + "typeid": "{4E4F7D81-68EA-5DCB-82F6-3314742F9B14}", + "details": { + "name": "Iterator_VM, AZStd::equal_to, allocator>>" + } + } + ] + }, + { + "base": "GetKeys", + "context": "{AF6D8DD5-0386-5E48-86B0-86131BC0D2D6}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke GetKeys" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after GetKeys is invoked" + }, + "details": { + "name": "GetKeys" + }, + "params": [ + { + "typeid": "{AF6D8DD5-0386-5E48-86B0-86131BC0D2D6}", + "details": { + "name": "AZStd::unordered_map" + } + } + ], + "results": [ + { + "typeid": "{877C4A33-39B5-51D7-948D-F97DB81372A1}", + "details": { + "name": "AZStd::vector" + } + } + ] + }, + { + "base": "Size", + "context": "{AF6D8DD5-0386-5E48-86B0-86131BC0D2D6}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Size" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Size is invoked" + }, + "details": { + "name": "Size" + }, + "params": [ + { + "typeid": "{AF6D8DD5-0386-5E48-86B0-86131BC0D2D6}", + "details": { + "name": "AZStd::unordered_map" + } + } + ], + "results": [ + { + "typeid": "{72039442-EB38-4D42-A1AD-CB68F7E0EEF6}", + "details": { + "name": "int" + } + } + ] + }, + { + "base": "Erase", + "context": "{AF6D8DD5-0386-5E48-86B0-86131BC0D2D6}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Erase" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Erase is invoked" + }, + "details": { + "name": "Erase" + }, + "params": [ + { + "typeid": "{AF6D8DD5-0386-5E48-86B0-86131BC0D2D6}", + "details": { + "name": "AZStd::unordered_map" + } + }, + { + "typeid": "{652ED536-3402-439B-AEBE-4A5DBC554085}", + "details": { + "name": "AssetId" + } + } + ], + "results": [ + { + "typeid": "{AF6D8DD5-0386-5E48-86B0-86131BC0D2D6}", + "details": { + "name": "AZStd::unordered_map" + } + } + ] + }, + { + "base": "EraseCheck_VM", + "context": "{AF6D8DD5-0386-5E48-86B0-86131BC0D2D6}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke EraseCheck_VM" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after EraseCheck_VM is invoked" + }, + "details": { + "name": "EraseCheck_VM" + }, + "params": [ + { + "typeid": "{AF6D8DD5-0386-5E48-86B0-86131BC0D2D6}", + "details": { + "name": "AZStd::unordered_map" + } + }, + { + "typeid": "{652ED536-3402-439B-AEBE-4A5DBC554085}", + "details": { + "name": "AssetId" + } + } + ], + "results": [ + { + "typeid": "{A0CA880C-AFE4-43CB-926C-59AC48496112}", + "details": { + "name": "bool" + } + } + ] + }, + { + "base": "Clear", + "context": "{AF6D8DD5-0386-5E48-86B0-86131BC0D2D6}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Clear" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Clear is invoked" + }, + "details": { + "name": "Clear" + }, + "params": [ + { + "typeid": "{AF6D8DD5-0386-5E48-86B0-86131BC0D2D6}", + "details": { + "name": "AZStd::unordered_map" + } + } + ], + "results": [ + { + "typeid": "{AF6D8DD5-0386-5E48-86B0-86131BC0D2D6}", + "details": { + "name": "AZStd::unordered_map" + } + } + ] + }, + { + "base": "At", + "context": "{AF6D8DD5-0386-5E48-86B0-86131BC0D2D6}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke At" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after At is invoked" + }, + "details": { + "name": "At" + }, + "params": [ + { + "typeid": "{AF6D8DD5-0386-5E48-86B0-86131BC0D2D6}", + "details": { + "name": "AZStd::unordered_map" + } + }, + { + "typeid": "{652ED536-3402-439B-AEBE-4A5DBC554085}", + "details": { + "name": "AssetId" + } + } + ], + "results": [ + { + "typeid": "{847DD984-9DBF-4789-8E25-E0334402E8AD}", + "details": { + "name": "Plane" + } + } + ] + }, + { + "base": "BucketCount", + "context": "{AF6D8DD5-0386-5E48-86B0-86131BC0D2D6}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke BucketCount" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after BucketCount is invoked" + }, + "details": { + "name": "BucketCount" + }, + "params": [ + { + "typeid": "{AF6D8DD5-0386-5E48-86B0-86131BC0D2D6}", + "details": { + "name": "AZStd::unordered_map" + } + } + ], + "results": [ + { + "typeid": "{D6597933-47CD-4FC8-B911-63F3E2B0993A}", + "details": { + "name": "AZ::u64" + } + } + ] + }, + { + "base": "Empty", + "context": "{AF6D8DD5-0386-5E48-86B0-86131BC0D2D6}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Empty" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Empty is invoked" + }, + "details": { + "name": "Empty" + }, + "params": [ + { + "typeid": "{AF6D8DD5-0386-5E48-86B0-86131BC0D2D6}", + "details": { + "name": "AZStd::unordered_map" + } + } + ], + "results": [ + { + "typeid": "{A0CA880C-AFE4-43CB-926C-59AC48496112}", + "details": { + "name": "bool" + } + } + ] + }, + { + "base": "Swap", + "context": "{AF6D8DD5-0386-5E48-86B0-86131BC0D2D6}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Swap" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Swap is invoked" + }, + "details": { + "name": "Swap" + }, + "params": [ + { + "typeid": "{AF6D8DD5-0386-5E48-86B0-86131BC0D2D6}", + "details": { + "name": "AZStd::unordered_map" + } + }, + { + "typeid": "{AF6D8DD5-0386-5E48-86B0-86131BC0D2D6}", + "details": { + "name": "AZStd::unordered_map" + } + } + ] + } + ] + }, + { + "base": "{24A1B3FF-51E3-5699-9ED7-49D835DE1DED}", + "context": "OnDemandReflected", + "variant": "", + "details": { + "name": "Array", + "category": "Array", + "tooltip": "A dynamically sized container of elements." + }, + "methods": [ + { + "base": "Size", + "context": "{24A1B3FF-51E3-5699-9ED7-49D835DE1DED}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Size" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Size is invoked" + }, + "details": { + "name": "Size" + }, + "params": [ + { + "typeid": "{24A1B3FF-51E3-5699-9ED7-49D835DE1DED}", + "details": { + "name": "AZStd::vector" + } + } + ], + "results": [ + { + "typeid": "{72039442-EB38-4D42-A1AD-CB68F7E0EEF6}", + "details": { + "name": "int" + } + } + ] + }, + { + "base": "Front", + "context": "{24A1B3FF-51E3-5699-9ED7-49D835DE1DED}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Front" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Front is invoked" + }, + "details": { + "name": "Front" + }, + "params": [ + { + "typeid": "{24A1B3FF-51E3-5699-9ED7-49D835DE1DED}", + "details": { + "name": "AZStd::vector" + } + } + ], + "results": [ + { + "typeid": "{7894072A-9050-4F0F-901B-34B1A0D29417}", + "details": { + "name": "Color" + } + } + ] + }, + { + "base": "HasKey", + "context": "{24A1B3FF-51E3-5699-9ED7-49D835DE1DED}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Has Key" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Has Key is invoked" + }, + "details": { + "name": "Has Key" + }, + "params": [ + { + "typeid": "{24A1B3FF-51E3-5699-9ED7-49D835DE1DED}", + "details": { + "name": "AZStd::vector" + } + }, + { + "typeid": "{D6597933-47CD-4FC8-B911-63F3E2B0993A}", + "details": { + "name": "AZ::u64" + } + } + ], + "results": [ + { + "typeid": "{A0CA880C-AFE4-43CB-926C-59AC48496112}", + "details": { + "name": "bool" + } + } + ] + }, + { + "base": "Resize", + "context": "{24A1B3FF-51E3-5699-9ED7-49D835DE1DED}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Resize" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Resize is invoked" + }, + "details": { + "name": "Resize" + }, + "params": [ + { + "typeid": "{24A1B3FF-51E3-5699-9ED7-49D835DE1DED}", + "details": { + "name": "AZStd::vector" + } + }, + { + "typeid": "{D6597933-47CD-4FC8-B911-63F3E2B0993A}", + "details": { + "name": "AZ::u64" + } + } + ] + }, + { + "base": "at", + "context": "{24A1B3FF-51E3-5699-9ED7-49D835DE1DED}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke at" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after at is invoked" + }, + "details": { + "name": "at" + }, + "params": [ + { + "typeid": "{24A1B3FF-51E3-5699-9ED7-49D835DE1DED}", + "details": { + "name": "AZStd::vector" + } + }, + { + "typeid": "{D6597933-47CD-4FC8-B911-63F3E2B0993A}", + "details": { + "name": "AZ::u64" + } + } + ], + "results": [ + { + "typeid": "{7894072A-9050-4F0F-901B-34B1A0D29417}", + "details": { + "name": "Color" + } + } + ] + }, + { + "base": "Back", + "context": "{24A1B3FF-51E3-5699-9ED7-49D835DE1DED}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Back" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Back is invoked" + }, + "details": { + "name": "Back" + }, + "params": [ + { + "typeid": "{24A1B3FF-51E3-5699-9ED7-49D835DE1DED}", + "details": { + "name": "AZStd::vector" + } + } + ], + "results": [ + { + "typeid": "{7894072A-9050-4F0F-901B-34B1A0D29417}", + "details": { + "name": "Color" + } + } + ] + }, + { + "base": "pop_back", + "context": "{24A1B3FF-51E3-5699-9ED7-49D835DE1DED}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke pop_back" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after pop_back is invoked" + }, + "details": { + "name": "pop_back" + }, + "params": [ + { + "typeid": "{24A1B3FF-51E3-5699-9ED7-49D835DE1DED}", + "details": { + "name": "AZStd::vector" + } + } + ] + }, + { + "base": "size", + "context": "{24A1B3FF-51E3-5699-9ED7-49D835DE1DED}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke size" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after size is invoked" + }, + "details": { + "name": "size" + }, + "params": [ + { + "typeid": "{24A1B3FF-51E3-5699-9ED7-49D835DE1DED}", + "details": { + "name": "AZStd::vector" + } + } + ], + "results": [ + { + "typeid": "{72039442-EB38-4D42-A1AD-CB68F7E0EEF6}", + "details": { + "name": "int" + } + } + ] + }, + { + "base": "At", + "context": "{24A1B3FF-51E3-5699-9ED7-49D835DE1DED}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke At" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after At is invoked" + }, + "details": { + "name": "At" + }, + "params": [ + { + "typeid": "{24A1B3FF-51E3-5699-9ED7-49D835DE1DED}", + "details": { + "name": "AZStd::vector" + } + }, + { + "typeid": "{D6597933-47CD-4FC8-B911-63F3E2B0993A}", + "details": { + "name": "AZ::u64" + } + } + ], + "results": [ + { + "typeid": "{7894072A-9050-4F0F-901B-34B1A0D29417}", + "details": { + "name": "Color" + } + } + ] + }, + { + "base": "Empty", + "context": "{24A1B3FF-51E3-5699-9ED7-49D835DE1DED}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Empty" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Empty is invoked" + }, + "details": { + "name": "Empty" + }, + "params": [ + { + "typeid": "{24A1B3FF-51E3-5699-9ED7-49D835DE1DED}", + "details": { + "name": "AZStd::vector" + } + } + ], + "results": [ + { + "typeid": "{A0CA880C-AFE4-43CB-926C-59AC48496112}", + "details": { + "name": "bool" + } + } + ] + }, + { + "base": "Swap", + "context": "{24A1B3FF-51E3-5699-9ED7-49D835DE1DED}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Swap" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Swap is invoked" + }, + "details": { + "name": "Swap" + }, + "params": [ + { + "typeid": "{24A1B3FF-51E3-5699-9ED7-49D835DE1DED}", + "details": { + "name": "AZStd::vector" + } + }, + { + "typeid": "{24A1B3FF-51E3-5699-9ED7-49D835DE1DED}", + "details": { + "name": "AZStd::vector" + } + } + ] + }, + { + "base": "push_back", + "context": "{24A1B3FF-51E3-5699-9ED7-49D835DE1DED}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke push_back" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after push_back is invoked" + }, + "details": { + "name": "push_back" + }, + "params": [ + { + "typeid": "{24A1B3FF-51E3-5699-9ED7-49D835DE1DED}", + "details": { + "name": "AZStd::vector" + } + }, + { + "typeid": "{7894072A-9050-4F0F-901B-34B1A0D29417}", + "details": { + "name": "Color" + } + } + ] + }, + { + "base": "PushBack_VM", + "context": "{24A1B3FF-51E3-5699-9ED7-49D835DE1DED}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke PushBack_VM" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after PushBack_VM is invoked" + }, + "details": { + "name": "PushBack_VM" + }, + "params": [ + { + "typeid": "{24A1B3FF-51E3-5699-9ED7-49D835DE1DED}", + "details": { + "name": "AZStd::vector" + } + }, + { + "typeid": "{7894072A-9050-4F0F-901B-34B1A0D29417}", + "details": { + "name": "Color" + } + } + ], + "results": [ + { + "typeid": "{24A1B3FF-51E3-5699-9ED7-49D835DE1DED}", + "details": { + "name": "AZStd::vector" + } + } + ] + }, + { + "base": "AtUnchecked", + "context": "{24A1B3FF-51E3-5699-9ED7-49D835DE1DED}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke AtUnchecked" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after AtUnchecked is invoked" + }, + "details": { + "name": "AtUnchecked" + }, + "params": [ + { + "typeid": "{24A1B3FF-51E3-5699-9ED7-49D835DE1DED}", + "details": { + "name": "AZStd::vector" + } + }, + { + "typeid": "{D6597933-47CD-4FC8-B911-63F3E2B0993A}", + "details": { + "name": "AZ::u64" + } + } + ], + "results": [ + { + "typeid": "{7894072A-9050-4F0F-901B-34B1A0D29417}", + "details": { + "name": "Color" + } + } + ] + }, + { + "base": "clear", + "context": "{24A1B3FF-51E3-5699-9ED7-49D835DE1DED}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke clear" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after clear is invoked" + }, + "details": { + "name": "clear" + }, + "params": [ + { + "typeid": "{24A1B3FF-51E3-5699-9ED7-49D835DE1DED}", + "details": { + "name": "AZStd::vector" + } + } + ] + }, + { + "base": "NotEmpty", + "context": "{24A1B3FF-51E3-5699-9ED7-49D835DE1DED}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke NotEmpty" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after NotEmpty is invoked" + }, + "details": { + "name": "NotEmpty" + }, + "params": [ + { + "typeid": "{24A1B3FF-51E3-5699-9ED7-49D835DE1DED}", + "details": { + "name": "AZStd::vector" + } + } + ], + "results": [ + { + "typeid": "{A0CA880C-AFE4-43CB-926C-59AC48496112}", + "details": { + "name": "bool" + } + } + ] + }, + { + "base": "Erase_VM", + "context": "{24A1B3FF-51E3-5699-9ED7-49D835DE1DED}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Erase_VM" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Erase_VM is invoked" + }, + "details": { + "name": "Erase_VM" + }, + "params": [ + { + "typeid": "{24A1B3FF-51E3-5699-9ED7-49D835DE1DED}", + "details": { + "name": "AZStd::vector" + } + }, + { + "typeid": "{D6597933-47CD-4FC8-B911-63F3E2B0993A}", + "details": { + "name": "AZ::u64" + } + } + ], + "results": [ + { + "typeid": "{24A1B3FF-51E3-5699-9ED7-49D835DE1DED}", + "details": { + "name": "AZStd::vector" + } + } + ] + }, + { + "base": "EraseCheck_VM", + "context": "{24A1B3FF-51E3-5699-9ED7-49D835DE1DED}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke EraseCheck_VM" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after EraseCheck_VM is invoked" + }, + "details": { + "name": "EraseCheck_VM" + }, + "params": [ + { + "typeid": "{24A1B3FF-51E3-5699-9ED7-49D835DE1DED}", + "details": { + "name": "AZStd::vector" + } + }, + { + "typeid": "{D6597933-47CD-4FC8-B911-63F3E2B0993A}", + "details": { + "name": "AZ::u64" + } + } + ], + "results": [ + { + "typeid": "{A0CA880C-AFE4-43CB-926C-59AC48496112}", + "details": { + "name": "bool" + } + } + ] + }, + { + "base": "Capacity", + "context": "{24A1B3FF-51E3-5699-9ED7-49D835DE1DED}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Capacity" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Capacity is invoked" + }, + "details": { + "name": "Capacity" + }, + "params": [ + { + "typeid": "{24A1B3FF-51E3-5699-9ED7-49D835DE1DED}", + "details": { + "name": "AZStd::vector" + } + } + ], + "results": [ + { + "typeid": "{D6597933-47CD-4FC8-B911-63F3E2B0993A}", + "details": { + "name": "AZ::u64" + } + } + ] + }, + { + "base": "Clear", + "context": "{24A1B3FF-51E3-5699-9ED7-49D835DE1DED}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Clear" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Clear is invoked" + }, + "details": { + "name": "Clear" + }, + "params": [ + { + "typeid": "{24A1B3FF-51E3-5699-9ED7-49D835DE1DED}", + "details": { + "name": "AZStd::vector" + } + } + ], + "results": [ + { + "typeid": "{24A1B3FF-51E3-5699-9ED7-49D835DE1DED}", + "details": { + "name": "AZStd::vector" + } + } + ] + }, + { + "base": "AssignAt", + "context": "{24A1B3FF-51E3-5699-9ED7-49D835DE1DED}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke AssignAt" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after AssignAt is invoked" + }, + "details": { + "name": "AssignAt" + }, + "params": [ + { + "typeid": "{24A1B3FF-51E3-5699-9ED7-49D835DE1DED}", + "details": { + "name": "AZStd::vector" + } + }, + { + "typeid": "{D6597933-47CD-4FC8-B911-63F3E2B0993A}", + "details": { + "name": "AZ::u64" + } + }, + { + "typeid": "{7894072A-9050-4F0F-901B-34B1A0D29417}", + "details": { + "name": "Color" + } + } + ] + }, + { + "base": "GetSize", + "context": "{24A1B3FF-51E3-5699-9ED7-49D835DE1DED}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke GetSize" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after GetSize is invoked" + }, + "details": { + "name": "GetSize" + }, + "params": [ + { + "typeid": "{24A1B3FF-51E3-5699-9ED7-49D835DE1DED}", + "details": { + "name": "AZStd::vector" + } + } + ], + "results": [ + { + "typeid": "{72039442-EB38-4D42-A1AD-CB68F7E0EEF6}", + "details": { + "name": "int" + } + } + ] + }, + { + "base": "Insert", + "context": "{24A1B3FF-51E3-5699-9ED7-49D835DE1DED}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Insert" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Insert is invoked" + }, + "details": { + "name": "Insert" + }, + "params": [ + { + "typeid": "{24A1B3FF-51E3-5699-9ED7-49D835DE1DED}", + "details": { + "name": "AZStd::vector" + } + }, + { + "typeid": "{D6597933-47CD-4FC8-B911-63F3E2B0993A}", + "details": { + "name": "AZ::u64" + } + }, + { + "typeid": "{7894072A-9050-4F0F-901B-34B1A0D29417}", + "details": { + "name": "Color" + } + } + ], + "results": [ + { + "typeid": "{24A1B3FF-51E3-5699-9ED7-49D835DE1DED}", + "details": { + "name": "AZStd::vector" + } + } + ] + }, + { + "base": "PushBack", + "context": "{24A1B3FF-51E3-5699-9ED7-49D835DE1DED}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke PushBack" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after PushBack is invoked" + }, + "details": { + "name": "PushBack" + }, + "params": [ + { + "typeid": "{24A1B3FF-51E3-5699-9ED7-49D835DE1DED}", + "details": { + "name": "AZStd::vector" + } + }, + { + "typeid": "{7894072A-9050-4F0F-901B-34B1A0D29417}", + "details": { + "name": "Color" + } + } + ] + }, + { + "base": "Reserve", + "context": "{24A1B3FF-51E3-5699-9ED7-49D835DE1DED}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Reserve" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Reserve is invoked" + }, + "details": { + "name": "Reserve" + }, + "params": [ + { + "typeid": "{24A1B3FF-51E3-5699-9ED7-49D835DE1DED}", + "details": { + "name": "AZStd::vector" + } + }, + { + "typeid": "{D6597933-47CD-4FC8-B911-63F3E2B0993A}", + "details": { + "name": "AZ::u64" + } + } + ] + }, + { + "base": "Iterate_VM", + "context": "{24A1B3FF-51E3-5699-9ED7-49D835DE1DED}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Iterate_VM" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Iterate_VM is invoked" + }, + "details": { + "name": "Iterate_VM" + }, + "params": [ + { + "typeid": "{24A1B3FF-51E3-5699-9ED7-49D835DE1DED}", + "details": { + "name": "AZStd::vector" + } + } + ], + "results": [ + { + "typeid": "{F0896DD2-703F-5888-ADAB-45C5AB03726F}", + "details": { + "name": "Iterator_VM>" + } + } + ] + } + ] + }, + { + "base": "{6965E71B-A623-5D36-98D9-3758EF2E8045}", + "context": "OnDemandReflected", + "variant": "", + "details": { + "name": "Map", + "category": "Map", + "tooltip": "A collection of Key/Value pairs, where each Key value must be unique." + }, + "methods": [ + { + "base": "contains", + "context": "{6965E71B-A623-5D36-98D9-3758EF2E8045}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke contains" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after contains is invoked" + }, + "details": { + "name": "contains" + }, + "params": [ + { + "typeid": "{6965E71B-A623-5D36-98D9-3758EF2E8045}", + "details": { + "name": "AZStd::unordered_map" + } + }, + { + "typeid": "{6383F1D3-BB27-4E6B-A49A-6409B2059EAA}", + "details": { + "name": "EntityId", + "tooltip": "Entity Unique Id" + } + } + ], + "results": [ + { + "typeid": "{A0CA880C-AFE4-43CB-926C-59AC48496112}", + "details": { + "name": "bool" + } + } + ] + }, + { + "base": "Insert", + "context": "{6965E71B-A623-5D36-98D9-3758EF2E8045}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Insert" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Insert is invoked" + }, + "details": { + "name": "Insert" + }, + "params": [ + { + "typeid": "{6965E71B-A623-5D36-98D9-3758EF2E8045}", + "details": { + "name": "AZStd::unordered_map" + } + }, + { + "typeid": "{6383F1D3-BB27-4E6B-A49A-6409B2059EAA}", + "details": { + "name": "EntityId", + "tooltip": "Entity Unique Id" + } + }, + { + "typeid": "{A0CA880C-AFE4-43CB-926C-59AC48496112}", + "details": { + "name": "bool" + } + } + ], + "results": [ + { + "typeid": "{6965E71B-A623-5D36-98D9-3758EF2E8045}", + "details": { + "name": "AZStd::unordered_map" + } + } + ] + }, + { + "base": "Reserve", + "context": "{6965E71B-A623-5D36-98D9-3758EF2E8045}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Reserve" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Reserve is invoked" + }, + "details": { + "name": "Reserve" + }, + "params": [ + { + "typeid": "{6965E71B-A623-5D36-98D9-3758EF2E8045}", + "details": { + "name": "AZStd::unordered_map" + } + }, + { + "typeid": "{D6597933-47CD-4FC8-B911-63F3E2B0993A}", + "details": { + "name": "AZ::u64" + } + } + ] + }, + { + "base": "GetSize", + "context": "{6965E71B-A623-5D36-98D9-3758EF2E8045}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke GetSize" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after GetSize is invoked" + }, + "details": { + "name": "GetSize" + }, + "params": [ + { + "typeid": "{6965E71B-A623-5D36-98D9-3758EF2E8045}", + "details": { + "name": "AZStd::unordered_map" + } + } + ], + "results": [ + { + "typeid": "{72039442-EB38-4D42-A1AD-CB68F7E0EEF6}", + "details": { + "name": "int" + } + } + ] + }, + { + "base": "Iterate_VM", + "context": "{6965E71B-A623-5D36-98D9-3758EF2E8045}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Iterate_VM" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Iterate_VM is invoked" + }, + "details": { + "name": "Iterate_VM" + }, + "params": [ + { + "typeid": "{6965E71B-A623-5D36-98D9-3758EF2E8045}", + "details": { + "name": "AZStd::unordered_map" + } + } + ], + "results": [ + { + "typeid": "{20B7ADCD-9320-5889-B380-1D471F8E96F8}", + "details": { + "name": "Iterator_VM, AZStd::equal_to, allocator>>" + } + } + ] + }, + { + "base": "GetKeys", + "context": "{6965E71B-A623-5D36-98D9-3758EF2E8045}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke GetKeys" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after GetKeys is invoked" + }, + "details": { + "name": "GetKeys" + }, + "params": [ + { + "typeid": "{6965E71B-A623-5D36-98D9-3758EF2E8045}", + "details": { + "name": "AZStd::unordered_map" + } + } + ], + "results": [ + { + "typeid": "{4841CFF0-7A5C-519C-BD16-D3625E99605E}", + "details": { + "name": "AZStd::vector" + } + } + ] + }, + { + "base": "Size", + "context": "{6965E71B-A623-5D36-98D9-3758EF2E8045}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Size" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Size is invoked" + }, + "details": { + "name": "Size" + }, + "params": [ + { + "typeid": "{6965E71B-A623-5D36-98D9-3758EF2E8045}", + "details": { + "name": "AZStd::unordered_map" + } + } + ], + "results": [ + { + "typeid": "{72039442-EB38-4D42-A1AD-CB68F7E0EEF6}", + "details": { + "name": "int" + } + } + ] + }, + { + "base": "Erase", + "context": "{6965E71B-A623-5D36-98D9-3758EF2E8045}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Erase" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Erase is invoked" + }, + "details": { + "name": "Erase" + }, + "params": [ + { + "typeid": "{6965E71B-A623-5D36-98D9-3758EF2E8045}", + "details": { + "name": "AZStd::unordered_map" + } + }, + { + "typeid": "{6383F1D3-BB27-4E6B-A49A-6409B2059EAA}", + "details": { + "name": "EntityId", + "tooltip": "Entity Unique Id" + } + } + ], + "results": [ + { + "typeid": "{6965E71B-A623-5D36-98D9-3758EF2E8045}", + "details": { + "name": "AZStd::unordered_map" + } + } + ] + }, + { + "base": "EraseCheck_VM", + "context": "{6965E71B-A623-5D36-98D9-3758EF2E8045}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke EraseCheck_VM" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after EraseCheck_VM is invoked" + }, + "details": { + "name": "EraseCheck_VM" + }, + "params": [ + { + "typeid": "{6965E71B-A623-5D36-98D9-3758EF2E8045}", + "details": { + "name": "AZStd::unordered_map" + } + }, + { + "typeid": "{6383F1D3-BB27-4E6B-A49A-6409B2059EAA}", + "details": { + "name": "EntityId", + "tooltip": "Entity Unique Id" + } + } + ], + "results": [ + { + "typeid": "{A0CA880C-AFE4-43CB-926C-59AC48496112}", + "details": { + "name": "bool" + } + } + ] + }, + { + "base": "Clear", + "context": "{6965E71B-A623-5D36-98D9-3758EF2E8045}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Clear" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Clear is invoked" + }, + "details": { + "name": "Clear" + }, + "params": [ + { + "typeid": "{6965E71B-A623-5D36-98D9-3758EF2E8045}", + "details": { + "name": "AZStd::unordered_map" + } + } + ], + "results": [ + { + "typeid": "{6965E71B-A623-5D36-98D9-3758EF2E8045}", + "details": { + "name": "AZStd::unordered_map" + } + } + ] + }, + { + "base": "At", + "context": "{6965E71B-A623-5D36-98D9-3758EF2E8045}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke At" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after At is invoked" + }, + "details": { + "name": "At" + }, + "params": [ + { + "typeid": "{6965E71B-A623-5D36-98D9-3758EF2E8045}", + "details": { + "name": "AZStd::unordered_map" + } + }, + { + "typeid": "{6383F1D3-BB27-4E6B-A49A-6409B2059EAA}", + "details": { + "name": "EntityId", + "tooltip": "Entity Unique Id" + } + } + ], + "results": [ + { + "typeid": "{A0CA880C-AFE4-43CB-926C-59AC48496112}", + "details": { + "name": "bool" + } + } + ] + }, + { + "base": "BucketCount", + "context": "{6965E71B-A623-5D36-98D9-3758EF2E8045}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke BucketCount" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after BucketCount is invoked" + }, + "details": { + "name": "BucketCount" + }, + "params": [ + { + "typeid": "{6965E71B-A623-5D36-98D9-3758EF2E8045}", + "details": { + "name": "AZStd::unordered_map" + } + } + ], + "results": [ + { + "typeid": "{D6597933-47CD-4FC8-B911-63F3E2B0993A}", + "details": { + "name": "AZ::u64" + } + } + ] + }, + { + "base": "Empty", + "context": "{6965E71B-A623-5D36-98D9-3758EF2E8045}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Empty" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Empty is invoked" + }, + "details": { + "name": "Empty" + }, + "params": [ + { + "typeid": "{6965E71B-A623-5D36-98D9-3758EF2E8045}", + "details": { + "name": "AZStd::unordered_map" + } + } + ], + "results": [ + { + "typeid": "{A0CA880C-AFE4-43CB-926C-59AC48496112}", + "details": { + "name": "bool" + } + } + ] + }, + { + "base": "Swap", + "context": "{6965E71B-A623-5D36-98D9-3758EF2E8045}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Swap" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Swap is invoked" + }, + "details": { + "name": "Swap" + }, + "params": [ + { + "typeid": "{6965E71B-A623-5D36-98D9-3758EF2E8045}", + "details": { + "name": "AZStd::unordered_map" + } + }, + { + "typeid": "{6965E71B-A623-5D36-98D9-3758EF2E8045}", + "details": { + "name": "AZStd::unordered_map" + } + } + ] + } + ] + }, + { + "base": "{641B736D-7467-5446-9083-EC81DC8E6E5B}", + "context": "OnDemandReflected", + "variant": "", + "details": { + "name": "Map", + "category": "Map", + "tooltip": "A collection of Key/Value pairs, where each Key value must be unique." + }, + "methods": [ + { + "base": "contains", + "context": "{641B736D-7467-5446-9083-EC81DC8E6E5B}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke contains" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after contains is invoked" + }, + "details": { + "name": "contains" + }, + "params": [ + { + "typeid": "{641B736D-7467-5446-9083-EC81DC8E6E5B}", + "details": { + "name": "AZStd::unordered_map" + } + }, + { + "typeid": "{6383F1D3-BB27-4E6B-A49A-6409B2059EAA}", + "details": { + "name": "EntityId", + "tooltip": "Entity Unique Id" + } + } + ], + "results": [ + { + "typeid": "{A0CA880C-AFE4-43CB-926C-59AC48496112}", + "details": { + "name": "bool" + } + } + ] + }, + { + "base": "Insert", + "context": "{641B736D-7467-5446-9083-EC81DC8E6E5B}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Insert" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Insert is invoked" + }, + "details": { + "name": "Insert" + }, + "params": [ + { + "typeid": "{641B736D-7467-5446-9083-EC81DC8E6E5B}", + "details": { + "name": "AZStd::unordered_map" + } + }, + { + "typeid": "{6383F1D3-BB27-4E6B-A49A-6409B2059EAA}", + "details": { + "name": "EntityId", + "tooltip": "Entity Unique Id" + } + }, + { + "typeid": "{73103120-3DD3-4873-BAB3-9713FA2804FB}", + "details": { + "name": "Quaternion" + } + } + ], + "results": [ + { + "typeid": "{641B736D-7467-5446-9083-EC81DC8E6E5B}", + "details": { + "name": "AZStd::unordered_map" + } + } + ] + }, + { + "base": "Reserve", + "context": "{641B736D-7467-5446-9083-EC81DC8E6E5B}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Reserve" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Reserve is invoked" + }, + "details": { + "name": "Reserve" + }, + "params": [ + { + "typeid": "{641B736D-7467-5446-9083-EC81DC8E6E5B}", + "details": { + "name": "AZStd::unordered_map" + } + }, + { + "typeid": "{D6597933-47CD-4FC8-B911-63F3E2B0993A}", + "details": { + "name": "AZ::u64" + } + } + ] + }, + { + "base": "GetSize", + "context": "{641B736D-7467-5446-9083-EC81DC8E6E5B}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke GetSize" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after GetSize is invoked" + }, + "details": { + "name": "GetSize" + }, + "params": [ + { + "typeid": "{641B736D-7467-5446-9083-EC81DC8E6E5B}", + "details": { + "name": "AZStd::unordered_map" + } + } + ], + "results": [ + { + "typeid": "{72039442-EB38-4D42-A1AD-CB68F7E0EEF6}", + "details": { + "name": "int" + } + } + ] + }, + { + "base": "Iterate_VM", + "context": "{641B736D-7467-5446-9083-EC81DC8E6E5B}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Iterate_VM" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Iterate_VM is invoked" + }, + "details": { + "name": "Iterate_VM" + }, + "params": [ + { + "typeid": "{641B736D-7467-5446-9083-EC81DC8E6E5B}", + "details": { + "name": "AZStd::unordered_map" + } + } + ], + "results": [ + { + "typeid": "{E756CE52-B602-5073-8842-0C9C1B1FC299}", + "details": { + "name": "Iterator_VM, AZStd::equal_to, allocator>>" + } + } + ] + }, + { + "base": "GetKeys", + "context": "{641B736D-7467-5446-9083-EC81DC8E6E5B}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke GetKeys" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after GetKeys is invoked" + }, + "details": { + "name": "GetKeys" + }, + "params": [ + { + "typeid": "{641B736D-7467-5446-9083-EC81DC8E6E5B}", + "details": { + "name": "AZStd::unordered_map" + } + } + ], + "results": [ + { + "typeid": "{4841CFF0-7A5C-519C-BD16-D3625E99605E}", + "details": { + "name": "AZStd::vector" + } + } + ] + }, + { + "base": "Size", + "context": "{641B736D-7467-5446-9083-EC81DC8E6E5B}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Size" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Size is invoked" + }, + "details": { + "name": "Size" + }, + "params": [ + { + "typeid": "{641B736D-7467-5446-9083-EC81DC8E6E5B}", + "details": { + "name": "AZStd::unordered_map" + } + } + ], + "results": [ + { + "typeid": "{72039442-EB38-4D42-A1AD-CB68F7E0EEF6}", + "details": { + "name": "int" + } + } + ] + }, + { + "base": "Erase", + "context": "{641B736D-7467-5446-9083-EC81DC8E6E5B}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Erase" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Erase is invoked" + }, + "details": { + "name": "Erase" + }, + "params": [ + { + "typeid": "{641B736D-7467-5446-9083-EC81DC8E6E5B}", + "details": { + "name": "AZStd::unordered_map" + } + }, + { + "typeid": "{6383F1D3-BB27-4E6B-A49A-6409B2059EAA}", + "details": { + "name": "EntityId", + "tooltip": "Entity Unique Id" + } + } + ], + "results": [ + { + "typeid": "{641B736D-7467-5446-9083-EC81DC8E6E5B}", + "details": { + "name": "AZStd::unordered_map" + } + } + ] + }, + { + "base": "EraseCheck_VM", + "context": "{641B736D-7467-5446-9083-EC81DC8E6E5B}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke EraseCheck_VM" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after EraseCheck_VM is invoked" + }, + "details": { + "name": "EraseCheck_VM" + }, + "params": [ + { + "typeid": "{641B736D-7467-5446-9083-EC81DC8E6E5B}", + "details": { + "name": "AZStd::unordered_map" + } + }, + { + "typeid": "{6383F1D3-BB27-4E6B-A49A-6409B2059EAA}", + "details": { + "name": "EntityId", + "tooltip": "Entity Unique Id" + } + } + ], + "results": [ + { + "typeid": "{A0CA880C-AFE4-43CB-926C-59AC48496112}", + "details": { + "name": "bool" + } + } + ] + }, + { + "base": "Clear", + "context": "{641B736D-7467-5446-9083-EC81DC8E6E5B}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Clear" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Clear is invoked" + }, + "details": { + "name": "Clear" + }, + "params": [ + { + "typeid": "{641B736D-7467-5446-9083-EC81DC8E6E5B}", + "details": { + "name": "AZStd::unordered_map" + } + } + ], + "results": [ + { + "typeid": "{641B736D-7467-5446-9083-EC81DC8E6E5B}", + "details": { + "name": "AZStd::unordered_map" + } + } + ] + }, + { + "base": "At", + "context": "{641B736D-7467-5446-9083-EC81DC8E6E5B}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke At" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after At is invoked" + }, + "details": { + "name": "At" + }, + "params": [ + { + "typeid": "{641B736D-7467-5446-9083-EC81DC8E6E5B}", + "details": { + "name": "AZStd::unordered_map" + } + }, + { + "typeid": "{6383F1D3-BB27-4E6B-A49A-6409B2059EAA}", + "details": { + "name": "EntityId", + "tooltip": "Entity Unique Id" + } + } + ], + "results": [ + { + "typeid": "{73103120-3DD3-4873-BAB3-9713FA2804FB}", + "details": { + "name": "Quaternion" + } + } + ] + }, + { + "base": "BucketCount", + "context": "{641B736D-7467-5446-9083-EC81DC8E6E5B}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke BucketCount" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after BucketCount is invoked" + }, + "details": { + "name": "BucketCount" + }, + "params": [ + { + "typeid": "{641B736D-7467-5446-9083-EC81DC8E6E5B}", + "details": { + "name": "AZStd::unordered_map" + } + } + ], + "results": [ + { + "typeid": "{D6597933-47CD-4FC8-B911-63F3E2B0993A}", + "details": { + "name": "AZ::u64" + } + } + ] + }, + { + "base": "Empty", + "context": "{641B736D-7467-5446-9083-EC81DC8E6E5B}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Empty" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Empty is invoked" + }, + "details": { + "name": "Empty" + }, + "params": [ + { + "typeid": "{641B736D-7467-5446-9083-EC81DC8E6E5B}", + "details": { + "name": "AZStd::unordered_map" + } + } + ], + "results": [ + { + "typeid": "{A0CA880C-AFE4-43CB-926C-59AC48496112}", + "details": { + "name": "bool" + } + } + ] + }, + { + "base": "Swap", + "context": "{641B736D-7467-5446-9083-EC81DC8E6E5B}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Swap" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Swap is invoked" + }, + "details": { + "name": "Swap" + }, + "params": [ + { + "typeid": "{641B736D-7467-5446-9083-EC81DC8E6E5B}", + "details": { + "name": "AZStd::unordered_map" + } + }, + { + "typeid": "{641B736D-7467-5446-9083-EC81DC8E6E5B}", + "details": { + "name": "AZStd::unordered_map" + } + } + ] + } + ] + }, + { + "base": "{12AE825D-565E-5717-A7A2-6C8AADABE08F}", + "context": "OnDemandReflected", + "variant": "", + "details": { + "name": "Map", + "category": "Map", + "tooltip": "A collection of Key/Value pairs, where each Key value must be unique." + }, + "methods": [ + { + "base": "contains", + "context": "{12AE825D-565E-5717-A7A2-6C8AADABE08F}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke contains" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after contains is invoked" + }, + "details": { + "name": "contains" + }, + "params": [ + { + "typeid": "{12AE825D-565E-5717-A7A2-6C8AADABE08F}", + "details": { + "name": "AZStd::unordered_map" + } + }, + { + "typeid": "{110C4B14-11A8-4E9D-8638-5051013A56AC}", + "details": { + "name": "double" + } + } + ], + "results": [ + { + "typeid": "{A0CA880C-AFE4-43CB-926C-59AC48496112}", + "details": { + "name": "bool" + } + } + ] + }, + { + "base": "Insert", + "context": "{12AE825D-565E-5717-A7A2-6C8AADABE08F}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Insert" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Insert is invoked" + }, + "details": { + "name": "Insert" + }, + "params": [ + { + "typeid": "{12AE825D-565E-5717-A7A2-6C8AADABE08F}", + "details": { + "name": "AZStd::unordered_map" + } + }, + { + "typeid": "{110C4B14-11A8-4E9D-8638-5051013A56AC}", + "details": { + "name": "double" + } + }, + { + "typeid": "{652ED536-3402-439B-AEBE-4A5DBC554085}", + "details": { + "name": "AssetId" + } + } + ], + "results": [ + { + "typeid": "{12AE825D-565E-5717-A7A2-6C8AADABE08F}", + "details": { + "name": "AZStd::unordered_map" + } + } + ] + }, + { + "base": "Reserve", + "context": "{12AE825D-565E-5717-A7A2-6C8AADABE08F}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Reserve" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Reserve is invoked" + }, + "details": { + "name": "Reserve" + }, + "params": [ + { + "typeid": "{12AE825D-565E-5717-A7A2-6C8AADABE08F}", + "details": { + "name": "AZStd::unordered_map" + } + }, + { + "typeid": "{D6597933-47CD-4FC8-B911-63F3E2B0993A}", + "details": { + "name": "AZ::u64" + } + } + ] + }, + { + "base": "GetSize", + "context": "{12AE825D-565E-5717-A7A2-6C8AADABE08F}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke GetSize" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after GetSize is invoked" + }, + "details": { + "name": "GetSize" + }, + "params": [ + { + "typeid": "{12AE825D-565E-5717-A7A2-6C8AADABE08F}", + "details": { + "name": "AZStd::unordered_map" + } + } + ], + "results": [ + { + "typeid": "{72039442-EB38-4D42-A1AD-CB68F7E0EEF6}", + "details": { + "name": "int" + } + } + ] + }, + { + "base": "Iterate_VM", + "context": "{12AE825D-565E-5717-A7A2-6C8AADABE08F}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Iterate_VM" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Iterate_VM is invoked" + }, + "details": { + "name": "Iterate_VM" + }, + "params": [ + { + "typeid": "{12AE825D-565E-5717-A7A2-6C8AADABE08F}", + "details": { + "name": "AZStd::unordered_map" + } + } + ], + "results": [ + { + "typeid": "{945E2425-9BFA-5DC4-915D-8822B4D2BD4C}", + "details": { + "name": "Iterator_VM, AZStd::equal_to, allocator>>" + } + } + ] + }, + { + "base": "GetKeys", + "context": "{12AE825D-565E-5717-A7A2-6C8AADABE08F}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke GetKeys" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after GetKeys is invoked" + }, + "details": { + "name": "GetKeys" + }, + "params": [ + { + "typeid": "{12AE825D-565E-5717-A7A2-6C8AADABE08F}", + "details": { + "name": "AZStd::unordered_map" + } + } + ], + "results": [ + { + "typeid": "{F31F64EA-E384-5536-ACD6-8F01849730FC}", + "details": { + "name": "AZStd::vector" + } + } + ] + }, + { + "base": "Size", + "context": "{12AE825D-565E-5717-A7A2-6C8AADABE08F}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Size" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Size is invoked" + }, + "details": { + "name": "Size" + }, + "params": [ + { + "typeid": "{12AE825D-565E-5717-A7A2-6C8AADABE08F}", + "details": { + "name": "AZStd::unordered_map" + } + } + ], + "results": [ + { + "typeid": "{72039442-EB38-4D42-A1AD-CB68F7E0EEF6}", + "details": { + "name": "int" + } + } + ] + }, + { + "base": "Erase", + "context": "{12AE825D-565E-5717-A7A2-6C8AADABE08F}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Erase" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Erase is invoked" + }, + "details": { + "name": "Erase" + }, + "params": [ + { + "typeid": "{12AE825D-565E-5717-A7A2-6C8AADABE08F}", + "details": { + "name": "AZStd::unordered_map" + } + }, + { + "typeid": "{110C4B14-11A8-4E9D-8638-5051013A56AC}", + "details": { + "name": "double" + } + } + ], + "results": [ + { + "typeid": "{12AE825D-565E-5717-A7A2-6C8AADABE08F}", + "details": { + "name": "AZStd::unordered_map" + } + } + ] + }, + { + "base": "EraseCheck_VM", + "context": "{12AE825D-565E-5717-A7A2-6C8AADABE08F}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke EraseCheck_VM" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after EraseCheck_VM is invoked" + }, + "details": { + "name": "EraseCheck_VM" + }, + "params": [ + { + "typeid": "{12AE825D-565E-5717-A7A2-6C8AADABE08F}", + "details": { + "name": "AZStd::unordered_map" + } + }, + { + "typeid": "{110C4B14-11A8-4E9D-8638-5051013A56AC}", + "details": { + "name": "double" + } + } + ], + "results": [ + { + "typeid": "{A0CA880C-AFE4-43CB-926C-59AC48496112}", + "details": { + "name": "bool" + } + } + ] + }, + { + "base": "Clear", + "context": "{12AE825D-565E-5717-A7A2-6C8AADABE08F}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Clear" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Clear is invoked" + }, + "details": { + "name": "Clear" + }, + "params": [ + { + "typeid": "{12AE825D-565E-5717-A7A2-6C8AADABE08F}", + "details": { + "name": "AZStd::unordered_map" + } + } + ], + "results": [ + { + "typeid": "{12AE825D-565E-5717-A7A2-6C8AADABE08F}", + "details": { + "name": "AZStd::unordered_map" + } + } + ] + }, + { + "base": "At", + "context": "{12AE825D-565E-5717-A7A2-6C8AADABE08F}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke At" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after At is invoked" + }, + "details": { + "name": "At" + }, + "params": [ + { + "typeid": "{12AE825D-565E-5717-A7A2-6C8AADABE08F}", + "details": { + "name": "AZStd::unordered_map" + } + }, + { + "typeid": "{110C4B14-11A8-4E9D-8638-5051013A56AC}", + "details": { + "name": "double" + } + } + ], + "results": [ + { + "typeid": "{652ED536-3402-439B-AEBE-4A5DBC554085}", + "details": { + "name": "AssetId" + } + } + ] + }, + { + "base": "BucketCount", + "context": "{12AE825D-565E-5717-A7A2-6C8AADABE08F}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke BucketCount" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after BucketCount is invoked" + }, + "details": { + "name": "BucketCount" + }, + "params": [ + { + "typeid": "{12AE825D-565E-5717-A7A2-6C8AADABE08F}", + "details": { + "name": "AZStd::unordered_map" + } + } + ], + "results": [ + { + "typeid": "{D6597933-47CD-4FC8-B911-63F3E2B0993A}", + "details": { + "name": "AZ::u64" + } + } + ] + }, + { + "base": "Empty", + "context": "{12AE825D-565E-5717-A7A2-6C8AADABE08F}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Empty" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Empty is invoked" + }, + "details": { + "name": "Empty" + }, + "params": [ + { + "typeid": "{12AE825D-565E-5717-A7A2-6C8AADABE08F}", + "details": { + "name": "AZStd::unordered_map" + } + } + ], + "results": [ + { + "typeid": "{A0CA880C-AFE4-43CB-926C-59AC48496112}", + "details": { + "name": "bool" + } + } + ] + }, + { + "base": "Swap", + "context": "{12AE825D-565E-5717-A7A2-6C8AADABE08F}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Swap" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Swap is invoked" + }, + "details": { + "name": "Swap" + }, + "params": [ + { + "typeid": "{12AE825D-565E-5717-A7A2-6C8AADABE08F}", + "details": { + "name": "AZStd::unordered_map" + } + }, + { + "typeid": "{12AE825D-565E-5717-A7A2-6C8AADABE08F}", + "details": { + "name": "AZStd::unordered_map" + } + } + ] + } + ] + }, + { + "base": "{8FE8A00F-5FE8-54A1-A314-346843AD21B6}", + "context": "OnDemandReflected", + "variant": "", + "details": { + "name": "optional" + }, + "methods": [ + { + "base": "has_value", + "context": "{8FE8A00F-5FE8-54A1-A314-346843AD21B6}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke has_value" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after has_value is invoked" + }, + "details": { + "name": "has_value" + }, + "params": [ + { + "typeid": "{8FE8A00F-5FE8-54A1-A314-346843AD21B6}", + "details": { + "name": "AZStd::optional*" + } + } + ], + "results": [ + { + "typeid": "{A0CA880C-AFE4-43CB-926C-59AC48496112}", + "details": { + "name": "bool" + } + } + ] + }, + { + "base": "__bool__", + "context": "{8FE8A00F-5FE8-54A1-A314-346843AD21B6}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke __bool__" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after __bool__ is invoked" + }, + "details": { + "name": "__bool__" + }, + "params": [ + { + "typeid": "{8FE8A00F-5FE8-54A1-A314-346843AD21B6}", + "details": { + "name": "AZStd::optional*" + } + } + ], + "results": [ + { + "typeid": "{A0CA880C-AFE4-43CB-926C-59AC48496112}", + "details": { + "name": "bool" + } + } + ] + }, + { + "base": "value", + "context": "{8FE8A00F-5FE8-54A1-A314-346843AD21B6}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke value" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after value is invoked" + }, + "details": { + "name": "value" + }, + "params": [ + { + "typeid": "{8FE8A00F-5FE8-54A1-A314-346843AD21B6}", + "details": { + "name": "AZStd::optional*" + } + } + ], + "results": [ + { + "typeid": "{110C4B14-11A8-4E9D-8638-5051013A56AC}", + "details": { + "name": "double" + } + } + ] + }, + { + "base": "value_or", + "context": "{8FE8A00F-5FE8-54A1-A314-346843AD21B6}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke value_or" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after value_or is invoked" + }, + "details": { + "name": "value_or" + }, + "params": [ + { + "typeid": "{8FE8A00F-5FE8-54A1-A314-346843AD21B6}", + "details": { + "name": "AZStd::optional*" + } + }, + { + "typeid": "{110C4B14-11A8-4E9D-8638-5051013A56AC}", + "details": { + "name": "double" + } + } + ], + "results": [ + { + "typeid": "{110C4B14-11A8-4E9D-8638-5051013A56AC}", + "details": { + "name": "double" + } + } + ] + } + ] + }, + { + "base": "{D03054C0-295C-5B7A-9997-5B2EE7B1B2B9}", + "context": "OnDemandReflected", + "variant": "", + "details": { + "name": "Map", + "category": "Map", + "tooltip": "A collection of Key/Value pairs, where each Key value must be unique." + }, + "methods": [ + { + "base": "contains", + "context": "{D03054C0-295C-5B7A-9997-5B2EE7B1B2B9}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke contains" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after contains is invoked" + }, + "details": { + "name": "contains" + }, + "params": [ + { + "typeid": "{D03054C0-295C-5B7A-9997-5B2EE7B1B2B9}", + "details": { + "name": "AZStd::unordered_map" + } + }, + { + "typeid": "{110C4B14-11A8-4E9D-8638-5051013A56AC}", + "details": { + "name": "double" + } + } + ], + "results": [ + { + "typeid": "{A0CA880C-AFE4-43CB-926C-59AC48496112}", + "details": { + "name": "bool" + } + } + ] + }, + { + "base": "Insert", + "context": "{D03054C0-295C-5B7A-9997-5B2EE7B1B2B9}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Insert" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Insert is invoked" + }, + "details": { + "name": "Insert" + }, + "params": [ + { + "typeid": "{D03054C0-295C-5B7A-9997-5B2EE7B1B2B9}", + "details": { + "name": "AZStd::unordered_map" + } + }, + { + "typeid": "{110C4B14-11A8-4E9D-8638-5051013A56AC}", + "details": { + "name": "double" + } + }, + { + "typeid": "{A0CA880C-AFE4-43CB-926C-59AC48496112}", + "details": { + "name": "bool" + } + } + ], + "results": [ + { + "typeid": "{D03054C0-295C-5B7A-9997-5B2EE7B1B2B9}", + "details": { + "name": "AZStd::unordered_map" + } + } + ] + }, + { + "base": "Reserve", + "context": "{D03054C0-295C-5B7A-9997-5B2EE7B1B2B9}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Reserve" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Reserve is invoked" + }, + "details": { + "name": "Reserve" + }, + "params": [ + { + "typeid": "{D03054C0-295C-5B7A-9997-5B2EE7B1B2B9}", + "details": { + "name": "AZStd::unordered_map" + } + }, + { + "typeid": "{D6597933-47CD-4FC8-B911-63F3E2B0993A}", + "details": { + "name": "AZ::u64" + } + } + ] + }, + { + "base": "GetSize", + "context": "{D03054C0-295C-5B7A-9997-5B2EE7B1B2B9}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke GetSize" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after GetSize is invoked" + }, + "details": { + "name": "GetSize" + }, + "params": [ + { + "typeid": "{D03054C0-295C-5B7A-9997-5B2EE7B1B2B9}", + "details": { + "name": "AZStd::unordered_map" + } + } + ], + "results": [ + { + "typeid": "{72039442-EB38-4D42-A1AD-CB68F7E0EEF6}", + "details": { + "name": "int" + } + } + ] + }, + { + "base": "Iterate_VM", + "context": "{D03054C0-295C-5B7A-9997-5B2EE7B1B2B9}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Iterate_VM" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Iterate_VM is invoked" + }, + "details": { + "name": "Iterate_VM" + }, + "params": [ + { + "typeid": "{D03054C0-295C-5B7A-9997-5B2EE7B1B2B9}", + "details": { + "name": "AZStd::unordered_map" + } + } + ], + "results": [ + { + "typeid": "{581E4D22-2800-5F5C-BC36-00916AD8FA17}", + "details": { + "name": "Iterator_VM, AZStd::equal_to, allocator>>" + } + } + ] + }, + { + "base": "GetKeys", + "context": "{D03054C0-295C-5B7A-9997-5B2EE7B1B2B9}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke GetKeys" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after GetKeys is invoked" + }, + "details": { + "name": "GetKeys" + }, + "params": [ + { + "typeid": "{D03054C0-295C-5B7A-9997-5B2EE7B1B2B9}", + "details": { + "name": "AZStd::unordered_map" + } + } + ], + "results": [ + { + "typeid": "{F31F64EA-E384-5536-ACD6-8F01849730FC}", + "details": { + "name": "AZStd::vector" + } + } + ] + }, + { + "base": "Size", + "context": "{D03054C0-295C-5B7A-9997-5B2EE7B1B2B9}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Size" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Size is invoked" + }, + "details": { + "name": "Size" + }, + "params": [ + { + "typeid": "{D03054C0-295C-5B7A-9997-5B2EE7B1B2B9}", + "details": { + "name": "AZStd::unordered_map" + } + } + ], + "results": [ + { + "typeid": "{72039442-EB38-4D42-A1AD-CB68F7E0EEF6}", + "details": { + "name": "int" + } + } + ] + }, + { + "base": "Erase", + "context": "{D03054C0-295C-5B7A-9997-5B2EE7B1B2B9}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Erase" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Erase is invoked" + }, + "details": { + "name": "Erase" + }, + "params": [ + { + "typeid": "{D03054C0-295C-5B7A-9997-5B2EE7B1B2B9}", + "details": { + "name": "AZStd::unordered_map" + } + }, + { + "typeid": "{110C4B14-11A8-4E9D-8638-5051013A56AC}", + "details": { + "name": "double" + } + } + ], + "results": [ + { + "typeid": "{D03054C0-295C-5B7A-9997-5B2EE7B1B2B9}", + "details": { + "name": "AZStd::unordered_map" + } + } + ] + }, + { + "base": "EraseCheck_VM", + "context": "{D03054C0-295C-5B7A-9997-5B2EE7B1B2B9}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke EraseCheck_VM" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after EraseCheck_VM is invoked" + }, + "details": { + "name": "EraseCheck_VM" + }, + "params": [ + { + "typeid": "{D03054C0-295C-5B7A-9997-5B2EE7B1B2B9}", + "details": { + "name": "AZStd::unordered_map" + } + }, + { + "typeid": "{110C4B14-11A8-4E9D-8638-5051013A56AC}", + "details": { + "name": "double" + } + } + ], + "results": [ + { + "typeid": "{A0CA880C-AFE4-43CB-926C-59AC48496112}", + "details": { + "name": "bool" + } + } + ] + }, + { + "base": "Clear", + "context": "{D03054C0-295C-5B7A-9997-5B2EE7B1B2B9}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Clear" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Clear is invoked" + }, + "details": { + "name": "Clear" + }, + "params": [ + { + "typeid": "{D03054C0-295C-5B7A-9997-5B2EE7B1B2B9}", + "details": { + "name": "AZStd::unordered_map" + } + } + ], + "results": [ + { + "typeid": "{D03054C0-295C-5B7A-9997-5B2EE7B1B2B9}", + "details": { + "name": "AZStd::unordered_map" + } + } + ] + }, + { + "base": "At", + "context": "{D03054C0-295C-5B7A-9997-5B2EE7B1B2B9}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke At" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after At is invoked" + }, + "details": { + "name": "At" + }, + "params": [ + { + "typeid": "{D03054C0-295C-5B7A-9997-5B2EE7B1B2B9}", + "details": { + "name": "AZStd::unordered_map" + } + }, + { + "typeid": "{110C4B14-11A8-4E9D-8638-5051013A56AC}", + "details": { + "name": "double" + } + } + ], + "results": [ + { + "typeid": "{A0CA880C-AFE4-43CB-926C-59AC48496112}", + "details": { + "name": "bool" + } + } + ] + }, + { + "base": "BucketCount", + "context": "{D03054C0-295C-5B7A-9997-5B2EE7B1B2B9}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke BucketCount" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after BucketCount is invoked" + }, + "details": { + "name": "BucketCount" + }, + "params": [ + { + "typeid": "{D03054C0-295C-5B7A-9997-5B2EE7B1B2B9}", + "details": { + "name": "AZStd::unordered_map" + } + } + ], + "results": [ + { + "typeid": "{D6597933-47CD-4FC8-B911-63F3E2B0993A}", + "details": { + "name": "AZ::u64" + } + } + ] + }, + { + "base": "Empty", + "context": "{D03054C0-295C-5B7A-9997-5B2EE7B1B2B9}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Empty" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Empty is invoked" + }, + "details": { + "name": "Empty" + }, + "params": [ + { + "typeid": "{D03054C0-295C-5B7A-9997-5B2EE7B1B2B9}", + "details": { + "name": "AZStd::unordered_map" + } + } + ], + "results": [ + { + "typeid": "{A0CA880C-AFE4-43CB-926C-59AC48496112}", + "details": { + "name": "bool" + } + } + ] + }, + { + "base": "Swap", + "context": "{D03054C0-295C-5B7A-9997-5B2EE7B1B2B9}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Swap" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Swap is invoked" + }, + "details": { + "name": "Swap" + }, + "params": [ + { + "typeid": "{D03054C0-295C-5B7A-9997-5B2EE7B1B2B9}", + "details": { + "name": "AZStd::unordered_map" + } + }, + { + "typeid": "{D03054C0-295C-5B7A-9997-5B2EE7B1B2B9}", + "details": { + "name": "AZStd::unordered_map" + } + } + ] + } + ] + }, + { + "base": "{8E0A7AC1-C649-56B4-99CF-8BE08EEFC47B}", + "context": "OnDemandReflected", + "variant": "", + "details": { + "name": "optional" + }, + "methods": [ + { + "base": "has_value", + "context": "{8E0A7AC1-C649-56B4-99CF-8BE08EEFC47B}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke has_value" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after has_value is invoked" + }, + "details": { + "name": "has_value" + }, + "params": [ + { + "typeid": "{8E0A7AC1-C649-56B4-99CF-8BE08EEFC47B}", + "details": { + "name": "AZStd::optional*" + } + } + ], + "results": [ + { + "typeid": "{A0CA880C-AFE4-43CB-926C-59AC48496112}", + "details": { + "name": "bool" + } + } + ] + }, + { + "base": "__bool__", + "context": "{8E0A7AC1-C649-56B4-99CF-8BE08EEFC47B}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke __bool__" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after __bool__ is invoked" + }, + "details": { + "name": "__bool__" + }, + "params": [ + { + "typeid": "{8E0A7AC1-C649-56B4-99CF-8BE08EEFC47B}", + "details": { + "name": "AZStd::optional*" + } + } + ], + "results": [ + { + "typeid": "{A0CA880C-AFE4-43CB-926C-59AC48496112}", + "details": { + "name": "bool" + } + } + ] + }, + { + "base": "value", + "context": "{8E0A7AC1-C649-56B4-99CF-8BE08EEFC47B}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke value" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after value is invoked" + }, + "details": { + "name": "value" + }, + "params": [ + { + "typeid": "{8E0A7AC1-C649-56B4-99CF-8BE08EEFC47B}", + "details": { + "name": "AZStd::optional*" + } + } + ], + "results": [ + { + "typeid": "{70D8A282-A1EA-462D-9D04-51EDE81FAC2F}", + "details": { + "name": "AZ::s64" + } + } + ] + }, + { + "base": "value_or", + "context": "{8E0A7AC1-C649-56B4-99CF-8BE08EEFC47B}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke value_or" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after value_or is invoked" + }, + "details": { + "name": "value_or" + }, + "params": [ + { + "typeid": "{8E0A7AC1-C649-56B4-99CF-8BE08EEFC47B}", + "details": { + "name": "AZStd::optional*" + } + }, + { + "typeid": "{70D8A282-A1EA-462D-9D04-51EDE81FAC2F}", + "details": { + "name": "AZ::s64" + } + } + ], + "results": [ + { + "typeid": "{70D8A282-A1EA-462D-9D04-51EDE81FAC2F}", + "details": { + "name": "AZ::s64" + } + } + ] + } + ] + }, + { + "base": "{0170062C-2E7E-5CEB-BAB8-F7663BEF7B3E}", + "context": "OnDemandReflected", + "variant": "", + "details": { + "name": "optional" + }, + "methods": [ + { + "base": "has_value", + "context": "{0170062C-2E7E-5CEB-BAB8-F7663BEF7B3E}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke has_value" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after has_value is invoked" + }, + "details": { + "name": "has_value" + }, + "params": [ + { + "typeid": "{0170062C-2E7E-5CEB-BAB8-F7663BEF7B3E}", + "details": { + "name": "AZStd::optional" + } + } + ], + "results": [ + { + "typeid": "{A0CA880C-AFE4-43CB-926C-59AC48496112}", + "details": { + "name": "bool" + } + } + ] + }, + { + "base": "__bool__", + "context": "{0170062C-2E7E-5CEB-BAB8-F7663BEF7B3E}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke __bool__" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after __bool__ is invoked" + }, + "details": { + "name": "__bool__" + }, + "params": [ + { + "typeid": "{0170062C-2E7E-5CEB-BAB8-F7663BEF7B3E}", + "details": { + "name": "AZStd::optional" + } + } + ], + "results": [ + { + "typeid": "{A0CA880C-AFE4-43CB-926C-59AC48496112}", + "details": { + "name": "bool" + } + } + ] + }, + { + "base": "value", + "context": "{0170062C-2E7E-5CEB-BAB8-F7663BEF7B3E}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke value" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after value is invoked" + }, + "details": { + "name": "value" + }, + "params": [ + { + "typeid": "{0170062C-2E7E-5CEB-BAB8-F7663BEF7B3E}", + "details": { + "name": "AZStd::optional" + } + } + ], + "results": [ + { + "typeid": "{A0CA880C-AFE4-43CB-926C-59AC48496112}", + "details": { + "name": "bool" + } + } + ] + }, + { + "base": "value_or", + "context": "{0170062C-2E7E-5CEB-BAB8-F7663BEF7B3E}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke value_or" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after value_or is invoked" + }, + "details": { + "name": "value_or" + }, + "params": [ + { + "typeid": "{0170062C-2E7E-5CEB-BAB8-F7663BEF7B3E}", + "details": { + "name": "AZStd::optional" + } + }, + { + "typeid": "{A0CA880C-AFE4-43CB-926C-59AC48496112}", + "details": { + "name": "bool" + } + } + ], + "results": [ + { + "typeid": "{A0CA880C-AFE4-43CB-926C-59AC48496112}", + "details": { + "name": "bool" + } + } + ] + } + ] + }, + { + "base": "{9E069E13-E1B2-5178-9219-52C9F0BFC0AB}", + "context": "OnDemandReflected", + "variant": "", + "details": { + "name": "Map", + "category": "Map", + "tooltip": "A collection of Key/Value pairs, where each Key value must be unique." + }, + "methods": [ + { + "base": "contains", + "context": "{9E069E13-E1B2-5178-9219-52C9F0BFC0AB}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke contains" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after contains is invoked" + }, + "details": { + "name": "contains" + }, + "params": [ + { + "typeid": "{9E069E13-E1B2-5178-9219-52C9F0BFC0AB}", + "details": { + "name": "AZStd::unordered_map" + } + }, + { + "typeid": "{9F4E062E-06A0-46D4-85DF-E0DA96467D3A}", + "details": { + "name": "Crc32" + } + } + ], + "results": [ + { + "typeid": "{A0CA880C-AFE4-43CB-926C-59AC48496112}", + "details": { + "name": "bool" + } + } + ] + }, + { + "base": "Insert", + "context": "{9E069E13-E1B2-5178-9219-52C9F0BFC0AB}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Insert" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Insert is invoked" + }, + "details": { + "name": "Insert" + }, + "params": [ + { + "typeid": "{9E069E13-E1B2-5178-9219-52C9F0BFC0AB}", + "details": { + "name": "AZStd::unordered_map" + } + }, + { + "typeid": "{9F4E062E-06A0-46D4-85DF-E0DA96467D3A}", + "details": { + "name": "Crc32" + } + }, + { + "typeid": "{847DD984-9DBF-4789-8E25-E0334402E8AD}", + "details": { + "name": "Plane" + } + } + ], + "results": [ + { + "typeid": "{9E069E13-E1B2-5178-9219-52C9F0BFC0AB}", + "details": { + "name": "AZStd::unordered_map" + } + } + ] + }, + { + "base": "Reserve", + "context": "{9E069E13-E1B2-5178-9219-52C9F0BFC0AB}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Reserve" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Reserve is invoked" + }, + "details": { + "name": "Reserve" + }, + "params": [ + { + "typeid": "{9E069E13-E1B2-5178-9219-52C9F0BFC0AB}", + "details": { + "name": "AZStd::unordered_map" + } + }, + { + "typeid": "{D6597933-47CD-4FC8-B911-63F3E2B0993A}", + "details": { + "name": "AZ::u64" + } + } + ] + }, + { + "base": "GetSize", + "context": "{9E069E13-E1B2-5178-9219-52C9F0BFC0AB}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke GetSize" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after GetSize is invoked" + }, + "details": { + "name": "GetSize" + }, + "params": [ + { + "typeid": "{9E069E13-E1B2-5178-9219-52C9F0BFC0AB}", + "details": { + "name": "AZStd::unordered_map" + } + } + ], + "results": [ + { + "typeid": "{72039442-EB38-4D42-A1AD-CB68F7E0EEF6}", + "details": { + "name": "int" + } + } + ] + }, + { + "base": "Iterate_VM", + "context": "{9E069E13-E1B2-5178-9219-52C9F0BFC0AB}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Iterate_VM" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Iterate_VM is invoked" + }, + "details": { + "name": "Iterate_VM" + }, + "params": [ + { + "typeid": "{9E069E13-E1B2-5178-9219-52C9F0BFC0AB}", + "details": { + "name": "AZStd::unordered_map" + } + } + ], + "results": [ + { + "typeid": "{12668852-2E13-5B48-9C0D-6BF6E8674D78}", + "details": { + "name": "Iterator_VM, AZStd::equal_to, allocator>>" + } + } + ] + }, + { + "base": "GetKeys", + "context": "{9E069E13-E1B2-5178-9219-52C9F0BFC0AB}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke GetKeys" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after GetKeys is invoked" + }, + "details": { + "name": "GetKeys" + }, + "params": [ + { + "typeid": "{9E069E13-E1B2-5178-9219-52C9F0BFC0AB}", + "details": { + "name": "AZStd::unordered_map" + } + } + ], + "results": [ + { + "typeid": "{287CEE87-6FF3-52FC-9D32-38255E2C7FE9}", + "details": { + "name": "AZStd::vector" + } + } + ] + }, + { + "base": "Size", + "context": "{9E069E13-E1B2-5178-9219-52C9F0BFC0AB}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Size" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Size is invoked" + }, + "details": { + "name": "Size" + }, + "params": [ + { + "typeid": "{9E069E13-E1B2-5178-9219-52C9F0BFC0AB}", + "details": { + "name": "AZStd::unordered_map" + } + } + ], + "results": [ + { + "typeid": "{72039442-EB38-4D42-A1AD-CB68F7E0EEF6}", + "details": { + "name": "int" + } + } + ] + }, + { + "base": "Erase", + "context": "{9E069E13-E1B2-5178-9219-52C9F0BFC0AB}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Erase" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Erase is invoked" + }, + "details": { + "name": "Erase" + }, + "params": [ + { + "typeid": "{9E069E13-E1B2-5178-9219-52C9F0BFC0AB}", + "details": { + "name": "AZStd::unordered_map" + } + }, + { + "typeid": "{9F4E062E-06A0-46D4-85DF-E0DA96467D3A}", + "details": { + "name": "Crc32" + } + } + ], + "results": [ + { + "typeid": "{9E069E13-E1B2-5178-9219-52C9F0BFC0AB}", + "details": { + "name": "AZStd::unordered_map" + } + } + ] + }, + { + "base": "EraseCheck_VM", + "context": "{9E069E13-E1B2-5178-9219-52C9F0BFC0AB}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke EraseCheck_VM" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after EraseCheck_VM is invoked" + }, + "details": { + "name": "EraseCheck_VM" + }, + "params": [ + { + "typeid": "{9E069E13-E1B2-5178-9219-52C9F0BFC0AB}", + "details": { + "name": "AZStd::unordered_map" + } + }, + { + "typeid": "{9F4E062E-06A0-46D4-85DF-E0DA96467D3A}", + "details": { + "name": "Crc32" + } + } + ], + "results": [ + { + "typeid": "{A0CA880C-AFE4-43CB-926C-59AC48496112}", + "details": { + "name": "bool" + } + } + ] + }, + { + "base": "Clear", + "context": "{9E069E13-E1B2-5178-9219-52C9F0BFC0AB}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Clear" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Clear is invoked" + }, + "details": { + "name": "Clear" + }, + "params": [ + { + "typeid": "{9E069E13-E1B2-5178-9219-52C9F0BFC0AB}", + "details": { + "name": "AZStd::unordered_map" + } + } + ], + "results": [ + { + "typeid": "{9E069E13-E1B2-5178-9219-52C9F0BFC0AB}", + "details": { + "name": "AZStd::unordered_map" + } + } + ] + }, + { + "base": "At", + "context": "{9E069E13-E1B2-5178-9219-52C9F0BFC0AB}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke At" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after At is invoked" + }, + "details": { + "name": "At" + }, + "params": [ + { + "typeid": "{9E069E13-E1B2-5178-9219-52C9F0BFC0AB}", + "details": { + "name": "AZStd::unordered_map" + } + }, + { + "typeid": "{9F4E062E-06A0-46D4-85DF-E0DA96467D3A}", + "details": { + "name": "Crc32" + } + } + ], + "results": [ + { + "typeid": "{847DD984-9DBF-4789-8E25-E0334402E8AD}", + "details": { + "name": "Plane" + } + } + ] + }, + { + "base": "BucketCount", + "context": "{9E069E13-E1B2-5178-9219-52C9F0BFC0AB}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke BucketCount" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after BucketCount is invoked" + }, + "details": { + "name": "BucketCount" + }, + "params": [ + { + "typeid": "{9E069E13-E1B2-5178-9219-52C9F0BFC0AB}", + "details": { + "name": "AZStd::unordered_map" + } + } + ], + "results": [ + { + "typeid": "{D6597933-47CD-4FC8-B911-63F3E2B0993A}", + "details": { + "name": "AZ::u64" + } + } + ] + }, + { + "base": "Empty", + "context": "{9E069E13-E1B2-5178-9219-52C9F0BFC0AB}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Empty" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Empty is invoked" + }, + "details": { + "name": "Empty" + }, + "params": [ + { + "typeid": "{9E069E13-E1B2-5178-9219-52C9F0BFC0AB}", + "details": { + "name": "AZStd::unordered_map" + } + } + ], + "results": [ + { + "typeid": "{A0CA880C-AFE4-43CB-926C-59AC48496112}", + "details": { + "name": "bool" + } + } + ] + }, + { + "base": "Swap", + "context": "{9E069E13-E1B2-5178-9219-52C9F0BFC0AB}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Swap" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Swap is invoked" + }, + "details": { + "name": "Swap" + }, + "params": [ + { + "typeid": "{9E069E13-E1B2-5178-9219-52C9F0BFC0AB}", + "details": { + "name": "AZStd::unordered_map" + } + }, + { + "typeid": "{9E069E13-E1B2-5178-9219-52C9F0BFC0AB}", + "details": { + "name": "AZStd::unordered_map" + } + } + ] + } + ] + }, + { + "base": "{14E8FE40-1072-5691-9F23-E3600A9C4614}", + "context": "OnDemandReflected", + "variant": "", + "details": { + "name": "Array", + "category": "Array", + "tooltip": "A dynamically sized container of elements." + }, + "methods": [ + { + "base": "Size", + "context": "{14E8FE40-1072-5691-9F23-E3600A9C4614}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Size" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Size is invoked" + }, + "details": { + "name": "Size" + }, + "params": [ + { + "typeid": "{14E8FE40-1072-5691-9F23-E3600A9C4614}", + "details": { + "name": "AZStd::vector" + } + } + ], + "results": [ + { + "typeid": "{72039442-EB38-4D42-A1AD-CB68F7E0EEF6}", + "details": { + "name": "int" + } + } + ] + }, + { + "base": "Front", + "context": "{14E8FE40-1072-5691-9F23-E3600A9C4614}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Front" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Front is invoked" + }, + "details": { + "name": "Front" + }, + "params": [ + { + "typeid": "{14E8FE40-1072-5691-9F23-E3600A9C4614}", + "details": { + "name": "AZStd::vector" + } + } + ], + "results": [ + { + "typeid": "{15A4332F-7C3F-4A58-AC35-50E1CE53FB9C}", + "details": { + "name": "Matrix3x3" + } + } + ] + }, + { + "base": "HasKey", + "context": "{14E8FE40-1072-5691-9F23-E3600A9C4614}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Has Key" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Has Key is invoked" + }, + "details": { + "name": "Has Key" + }, + "params": [ + { + "typeid": "{14E8FE40-1072-5691-9F23-E3600A9C4614}", + "details": { + "name": "AZStd::vector" + } + }, + { + "typeid": "{D6597933-47CD-4FC8-B911-63F3E2B0993A}", + "details": { + "name": "AZ::u64" + } + } + ], + "results": [ + { + "typeid": "{A0CA880C-AFE4-43CB-926C-59AC48496112}", + "details": { + "name": "bool" + } + } + ] + }, + { + "base": "Resize", + "context": "{14E8FE40-1072-5691-9F23-E3600A9C4614}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Resize" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Resize is invoked" + }, + "details": { + "name": "Resize" + }, + "params": [ + { + "typeid": "{14E8FE40-1072-5691-9F23-E3600A9C4614}", + "details": { + "name": "AZStd::vector" + } + }, + { + "typeid": "{D6597933-47CD-4FC8-B911-63F3E2B0993A}", + "details": { + "name": "AZ::u64" + } + } + ] + }, + { + "base": "at", + "context": "{14E8FE40-1072-5691-9F23-E3600A9C4614}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke at" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after at is invoked" + }, + "details": { + "name": "at" + }, + "params": [ + { + "typeid": "{14E8FE40-1072-5691-9F23-E3600A9C4614}", + "details": { + "name": "AZStd::vector" + } + }, + { + "typeid": "{D6597933-47CD-4FC8-B911-63F3E2B0993A}", + "details": { + "name": "AZ::u64" + } + } + ], + "results": [ + { + "typeid": "{15A4332F-7C3F-4A58-AC35-50E1CE53FB9C}", + "details": { + "name": "Matrix3x3" + } + } + ] + }, + { + "base": "Back", + "context": "{14E8FE40-1072-5691-9F23-E3600A9C4614}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Back" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Back is invoked" + }, + "details": { + "name": "Back" + }, + "params": [ + { + "typeid": "{14E8FE40-1072-5691-9F23-E3600A9C4614}", + "details": { + "name": "AZStd::vector" + } + } + ], + "results": [ + { + "typeid": "{15A4332F-7C3F-4A58-AC35-50E1CE53FB9C}", + "details": { + "name": "Matrix3x3" + } + } + ] + }, + { + "base": "pop_back", + "context": "{14E8FE40-1072-5691-9F23-E3600A9C4614}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke pop_back" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after pop_back is invoked" + }, + "details": { + "name": "pop_back" + }, + "params": [ + { + "typeid": "{14E8FE40-1072-5691-9F23-E3600A9C4614}", + "details": { + "name": "AZStd::vector" + } + } + ] + }, + { + "base": "size", + "context": "{14E8FE40-1072-5691-9F23-E3600A9C4614}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke size" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after size is invoked" + }, + "details": { + "name": "size" + }, + "params": [ + { + "typeid": "{14E8FE40-1072-5691-9F23-E3600A9C4614}", + "details": { + "name": "AZStd::vector" + } + } + ], + "results": [ + { + "typeid": "{72039442-EB38-4D42-A1AD-CB68F7E0EEF6}", + "details": { + "name": "int" + } + } + ] + }, + { + "base": "At", + "context": "{14E8FE40-1072-5691-9F23-E3600A9C4614}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke At" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after At is invoked" + }, + "details": { + "name": "At" + }, + "params": [ + { + "typeid": "{14E8FE40-1072-5691-9F23-E3600A9C4614}", + "details": { + "name": "AZStd::vector" + } + }, + { + "typeid": "{D6597933-47CD-4FC8-B911-63F3E2B0993A}", + "details": { + "name": "AZ::u64" + } + } + ], + "results": [ + { + "typeid": "{15A4332F-7C3F-4A58-AC35-50E1CE53FB9C}", + "details": { + "name": "Matrix3x3" + } + } + ] + }, + { + "base": "Empty", + "context": "{14E8FE40-1072-5691-9F23-E3600A9C4614}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Empty" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Empty is invoked" + }, + "details": { + "name": "Empty" + }, + "params": [ + { + "typeid": "{14E8FE40-1072-5691-9F23-E3600A9C4614}", + "details": { + "name": "AZStd::vector" + } + } + ], + "results": [ + { + "typeid": "{A0CA880C-AFE4-43CB-926C-59AC48496112}", + "details": { + "name": "bool" + } + } + ] + }, + { + "base": "Swap", + "context": "{14E8FE40-1072-5691-9F23-E3600A9C4614}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Swap" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Swap is invoked" + }, + "details": { + "name": "Swap" + }, + "params": [ + { + "typeid": "{14E8FE40-1072-5691-9F23-E3600A9C4614}", + "details": { + "name": "AZStd::vector" + } + }, + { + "typeid": "{14E8FE40-1072-5691-9F23-E3600A9C4614}", + "details": { + "name": "AZStd::vector" + } + } + ] + }, + { + "base": "push_back", + "context": "{14E8FE40-1072-5691-9F23-E3600A9C4614}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke push_back" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after push_back is invoked" + }, + "details": { + "name": "push_back" + }, + "params": [ + { + "typeid": "{14E8FE40-1072-5691-9F23-E3600A9C4614}", + "details": { + "name": "AZStd::vector" + } + }, + { + "typeid": "{15A4332F-7C3F-4A58-AC35-50E1CE53FB9C}", + "details": { + "name": "Matrix3x3" + } + } + ] + }, + { + "base": "PushBack_VM", + "context": "{14E8FE40-1072-5691-9F23-E3600A9C4614}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke PushBack_VM" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after PushBack_VM is invoked" + }, + "details": { + "name": "PushBack_VM" + }, + "params": [ + { + "typeid": "{14E8FE40-1072-5691-9F23-E3600A9C4614}", + "details": { + "name": "AZStd::vector" + } + }, + { + "typeid": "{15A4332F-7C3F-4A58-AC35-50E1CE53FB9C}", + "details": { + "name": "Matrix3x3" + } + } + ], + "results": [ + { + "typeid": "{14E8FE40-1072-5691-9F23-E3600A9C4614}", + "details": { + "name": "AZStd::vector" + } + } + ] + }, + { + "base": "AtUnchecked", + "context": "{14E8FE40-1072-5691-9F23-E3600A9C4614}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke AtUnchecked" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after AtUnchecked is invoked" + }, + "details": { + "name": "AtUnchecked" + }, + "params": [ + { + "typeid": "{14E8FE40-1072-5691-9F23-E3600A9C4614}", + "details": { + "name": "AZStd::vector" + } + }, + { + "typeid": "{D6597933-47CD-4FC8-B911-63F3E2B0993A}", + "details": { + "name": "AZ::u64" + } + } + ], + "results": [ + { + "typeid": "{15A4332F-7C3F-4A58-AC35-50E1CE53FB9C}", + "details": { + "name": "Matrix3x3" + } + } + ] + }, + { + "base": "clear", + "context": "{14E8FE40-1072-5691-9F23-E3600A9C4614}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke clear" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after clear is invoked" + }, + "details": { + "name": "clear" + }, + "params": [ + { + "typeid": "{14E8FE40-1072-5691-9F23-E3600A9C4614}", + "details": { + "name": "AZStd::vector" + } + } + ] + }, + { + "base": "NotEmpty", + "context": "{14E8FE40-1072-5691-9F23-E3600A9C4614}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke NotEmpty" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after NotEmpty is invoked" + }, + "details": { + "name": "NotEmpty" + }, + "params": [ + { + "typeid": "{14E8FE40-1072-5691-9F23-E3600A9C4614}", + "details": { + "name": "AZStd::vector" + } + } + ], + "results": [ + { + "typeid": "{A0CA880C-AFE4-43CB-926C-59AC48496112}", + "details": { + "name": "bool" + } + } + ] + }, + { + "base": "Erase_VM", + "context": "{14E8FE40-1072-5691-9F23-E3600A9C4614}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Erase_VM" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Erase_VM is invoked" + }, + "details": { + "name": "Erase_VM" + }, + "params": [ + { + "typeid": "{14E8FE40-1072-5691-9F23-E3600A9C4614}", + "details": { + "name": "AZStd::vector" + } + }, + { + "typeid": "{D6597933-47CD-4FC8-B911-63F3E2B0993A}", + "details": { + "name": "AZ::u64" + } + } + ], + "results": [ + { + "typeid": "{14E8FE40-1072-5691-9F23-E3600A9C4614}", + "details": { + "name": "AZStd::vector" + } + } + ] + }, + { + "base": "EraseCheck_VM", + "context": "{14E8FE40-1072-5691-9F23-E3600A9C4614}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke EraseCheck_VM" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after EraseCheck_VM is invoked" + }, + "details": { + "name": "EraseCheck_VM" + }, + "params": [ + { + "typeid": "{14E8FE40-1072-5691-9F23-E3600A9C4614}", + "details": { + "name": "AZStd::vector" + } + }, + { + "typeid": "{D6597933-47CD-4FC8-B911-63F3E2B0993A}", + "details": { + "name": "AZ::u64" + } + } + ], + "results": [ + { + "typeid": "{A0CA880C-AFE4-43CB-926C-59AC48496112}", + "details": { + "name": "bool" + } + } + ] + }, + { + "base": "Capacity", + "context": "{14E8FE40-1072-5691-9F23-E3600A9C4614}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Capacity" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Capacity is invoked" + }, + "details": { + "name": "Capacity" + }, + "params": [ + { + "typeid": "{14E8FE40-1072-5691-9F23-E3600A9C4614}", + "details": { + "name": "AZStd::vector" + } + } + ], + "results": [ + { + "typeid": "{D6597933-47CD-4FC8-B911-63F3E2B0993A}", + "details": { + "name": "AZ::u64" + } + } + ] + }, + { + "base": "Clear", + "context": "{14E8FE40-1072-5691-9F23-E3600A9C4614}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Clear" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Clear is invoked" + }, + "details": { + "name": "Clear" + }, + "params": [ + { + "typeid": "{14E8FE40-1072-5691-9F23-E3600A9C4614}", + "details": { + "name": "AZStd::vector" + } + } + ], + "results": [ + { + "typeid": "{14E8FE40-1072-5691-9F23-E3600A9C4614}", + "details": { + "name": "AZStd::vector" + } + } + ] + }, + { + "base": "AssignAt", + "context": "{14E8FE40-1072-5691-9F23-E3600A9C4614}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke AssignAt" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after AssignAt is invoked" + }, + "details": { + "name": "AssignAt" + }, + "params": [ + { + "typeid": "{14E8FE40-1072-5691-9F23-E3600A9C4614}", + "details": { + "name": "AZStd::vector" + } + }, + { + "typeid": "{D6597933-47CD-4FC8-B911-63F3E2B0993A}", + "details": { + "name": "AZ::u64" + } + }, + { + "typeid": "{15A4332F-7C3F-4A58-AC35-50E1CE53FB9C}", + "details": { + "name": "Matrix3x3" + } + } + ] + }, + { + "base": "GetSize", + "context": "{14E8FE40-1072-5691-9F23-E3600A9C4614}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke GetSize" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after GetSize is invoked" + }, + "details": { + "name": "GetSize" + }, + "params": [ + { + "typeid": "{14E8FE40-1072-5691-9F23-E3600A9C4614}", + "details": { + "name": "AZStd::vector" + } + } + ], + "results": [ + { + "typeid": "{72039442-EB38-4D42-A1AD-CB68F7E0EEF6}", + "details": { + "name": "int" + } + } + ] + }, + { + "base": "Insert", + "context": "{14E8FE40-1072-5691-9F23-E3600A9C4614}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Insert" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Insert is invoked" + }, + "details": { + "name": "Insert" + }, + "params": [ + { + "typeid": "{14E8FE40-1072-5691-9F23-E3600A9C4614}", + "details": { + "name": "AZStd::vector" + } + }, + { + "typeid": "{D6597933-47CD-4FC8-B911-63F3E2B0993A}", + "details": { + "name": "AZ::u64" + } + }, + { + "typeid": "{15A4332F-7C3F-4A58-AC35-50E1CE53FB9C}", + "details": { + "name": "Matrix3x3" + } + } + ], + "results": [ + { + "typeid": "{14E8FE40-1072-5691-9F23-E3600A9C4614}", + "details": { + "name": "AZStd::vector" + } + } + ] + }, + { + "base": "PushBack", + "context": "{14E8FE40-1072-5691-9F23-E3600A9C4614}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke PushBack" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after PushBack is invoked" + }, + "details": { + "name": "PushBack" + }, + "params": [ + { + "typeid": "{14E8FE40-1072-5691-9F23-E3600A9C4614}", + "details": { + "name": "AZStd::vector" + } + }, + { + "typeid": "{15A4332F-7C3F-4A58-AC35-50E1CE53FB9C}", + "details": { + "name": "Matrix3x3" + } + } + ] + }, + { + "base": "Reserve", + "context": "{14E8FE40-1072-5691-9F23-E3600A9C4614}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Reserve" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Reserve is invoked" + }, + "details": { + "name": "Reserve" + }, + "params": [ + { + "typeid": "{14E8FE40-1072-5691-9F23-E3600A9C4614}", + "details": { + "name": "AZStd::vector" + } + }, + { + "typeid": "{D6597933-47CD-4FC8-B911-63F3E2B0993A}", + "details": { + "name": "AZ::u64" + } + } + ] + }, + { + "base": "Iterate_VM", + "context": "{14E8FE40-1072-5691-9F23-E3600A9C4614}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Iterate_VM" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Iterate_VM is invoked" + }, + "details": { + "name": "Iterate_VM" + }, + "params": [ + { + "typeid": "{14E8FE40-1072-5691-9F23-E3600A9C4614}", + "details": { + "name": "AZStd::vector" + } + } + ], + "results": [ + { + "typeid": "{80735D54-8EFE-5E2C-88DF-6E67CF677132}", + "details": { + "name": "Iterator_VM>" + } + } + ] + } + ] + }, + { + "base": "{DB1EB3E5-F953-53A7-B8F9-9121E6A77F85}", + "context": "OnDemandReflected", + "variant": "", + "details": { + "name": "Set", + "category": "Set", + "tooltip": "A dynamically sized container, where each element is unique." + }, + "methods": [ + { + "base": "Size", + "context": "{DB1EB3E5-F953-53A7-B8F9-9121E6A77F85}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Size" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Size is invoked" + }, + "details": { + "name": "Size" + }, + "params": [ + { + "typeid": "{DB1EB3E5-F953-53A7-B8F9-9121E6A77F85}", + "details": { + "name": "AZStd::unordered_set" + } + } + ], + "results": [ + { + "typeid": "{72039442-EB38-4D42-A1AD-CB68F7E0EEF6}", + "details": { + "name": "int" + } + } + ] + }, + { + "base": "GetKeys", + "context": "{DB1EB3E5-F953-53A7-B8F9-9121E6A77F85}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke GetKeys" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after GetKeys is invoked" + }, + "details": { + "name": "GetKeys" + }, + "params": [ + { + "typeid": "{DB1EB3E5-F953-53A7-B8F9-9121E6A77F85}", + "details": { + "name": "AZStd::unordered_set" + } + } + ], + "results": [ + { + "typeid": "{877C4A33-39B5-51D7-948D-F97DB81372A1}", + "details": { + "name": "AZStd::vector" + } + } + ] + }, + { + "base": "contains", + "context": "{DB1EB3E5-F953-53A7-B8F9-9121E6A77F85}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke contains" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after contains is invoked" + }, + "details": { + "name": "contains" + }, + "params": [ + { + "typeid": "{DB1EB3E5-F953-53A7-B8F9-9121E6A77F85}", + "details": { + "name": "AZStd::unordered_set" + } + }, + { + "typeid": "{652ED536-3402-439B-AEBE-4A5DBC554085}", + "details": { + "name": "AssetId" + } + } + ], + "results": [ + { + "typeid": "{A0CA880C-AFE4-43CB-926C-59AC48496112}", + "details": { + "name": "bool" + } + } + ] + }, + { + "base": "Insert", + "context": "{DB1EB3E5-F953-53A7-B8F9-9121E6A77F85}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Insert" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Insert is invoked" + }, + "details": { + "name": "Insert" + }, + "params": [ + { + "typeid": "{DB1EB3E5-F953-53A7-B8F9-9121E6A77F85}", + "details": { + "name": "AZStd::unordered_set" + } + }, + { + "typeid": "{652ED536-3402-439B-AEBE-4A5DBC554085}", + "details": { + "name": "AssetId" + } + } + ], + "results": [ + { + "typeid": "{DB1EB3E5-F953-53A7-B8F9-9121E6A77F85}", + "details": { + "name": "AZStd::unordered_set" + } + } + ] + }, + { + "base": "GetSize", + "context": "{DB1EB3E5-F953-53A7-B8F9-9121E6A77F85}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke GetSize" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after GetSize is invoked" + }, + "details": { + "name": "GetSize" + }, + "params": [ + { + "typeid": "{DB1EB3E5-F953-53A7-B8F9-9121E6A77F85}", + "details": { + "name": "AZStd::unordered_set" + } + } + ], + "results": [ + { + "typeid": "{72039442-EB38-4D42-A1AD-CB68F7E0EEF6}", + "details": { + "name": "int" + } + } + ] + }, + { + "base": "Reserve", + "context": "{DB1EB3E5-F953-53A7-B8F9-9121E6A77F85}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Reserve" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Reserve is invoked" + }, + "details": { + "name": "Reserve" + }, + "params": [ + { + "typeid": "{DB1EB3E5-F953-53A7-B8F9-9121E6A77F85}", + "details": { + "name": "AZStd::unordered_set" + } + }, + { + "typeid": "{D6597933-47CD-4FC8-B911-63F3E2B0993A}", + "details": { + "name": "AZ::u64" + } + } + ] + }, + { + "base": "Iterate_VM", + "context": "{DB1EB3E5-F953-53A7-B8F9-9121E6A77F85}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Iterate_VM" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Iterate_VM is invoked" + }, + "details": { + "name": "Iterate_VM" + }, + "params": [ + { + "typeid": "{DB1EB3E5-F953-53A7-B8F9-9121E6A77F85}", + "details": { + "name": "AZStd::unordered_set" + } + } + ], + "results": [ + { + "typeid": "{E7C36C85-6DDA-5F7B-83D6-C8501974DF13}", + "details": { + "name": "Iterator_VM, AZStd::equal_to, allocator>>" + } + } + ] + }, + { + "base": "EraseCheck_VM", + "context": "{DB1EB3E5-F953-53A7-B8F9-9121E6A77F85}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke EraseCheck_VM" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after EraseCheck_VM is invoked" + }, + "details": { + "name": "EraseCheck_VM" + }, + "params": [ + { + "typeid": "{DB1EB3E5-F953-53A7-B8F9-9121E6A77F85}", + "details": { + "name": "AZStd::unordered_set" + } + }, + { + "typeid": "{652ED536-3402-439B-AEBE-4A5DBC554085}", + "details": { + "name": "AssetId" + } + } + ], + "results": [ + { + "typeid": "{A0CA880C-AFE4-43CB-926C-59AC48496112}", + "details": { + "name": "bool" + } + } + ] + }, + { + "base": "Erase", + "context": "{DB1EB3E5-F953-53A7-B8F9-9121E6A77F85}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Erase" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Erase is invoked" + }, + "details": { + "name": "Erase" + }, + "params": [ + { + "typeid": "{DB1EB3E5-F953-53A7-B8F9-9121E6A77F85}", + "details": { + "name": "AZStd::unordered_set" + } + }, + { + "typeid": "{652ED536-3402-439B-AEBE-4A5DBC554085}", + "details": { + "name": "AssetId" + } + } + ], + "results": [ + { + "typeid": "{DB1EB3E5-F953-53A7-B8F9-9121E6A77F85}", + "details": { + "name": "AZStd::unordered_set" + } + } + ] + }, + { + "base": "Clear", + "context": "{DB1EB3E5-F953-53A7-B8F9-9121E6A77F85}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Clear" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Clear is invoked" + }, + "details": { + "name": "Clear" + }, + "params": [ + { + "typeid": "{DB1EB3E5-F953-53A7-B8F9-9121E6A77F85}", + "details": { + "name": "AZStd::unordered_set" + } + } + ], + "results": [ + { + "typeid": "{DB1EB3E5-F953-53A7-B8F9-9121E6A77F85}", + "details": { + "name": "AZStd::unordered_set" + } + } + ] + }, + { + "base": "BucketCount", + "context": "{DB1EB3E5-F953-53A7-B8F9-9121E6A77F85}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke BucketCount" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after BucketCount is invoked" + }, + "details": { + "name": "BucketCount" + }, + "params": [ + { + "typeid": "{DB1EB3E5-F953-53A7-B8F9-9121E6A77F85}", + "details": { + "name": "AZStd::unordered_set" + } + } + ], + "results": [ + { + "typeid": "{D6597933-47CD-4FC8-B911-63F3E2B0993A}", + "details": { + "name": "AZ::u64" + } + } + ] + }, + { + "base": "Empty", + "context": "{DB1EB3E5-F953-53A7-B8F9-9121E6A77F85}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Empty" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Empty is invoked" + }, + "details": { + "name": "Empty" + }, + "params": [ + { + "typeid": "{DB1EB3E5-F953-53A7-B8F9-9121E6A77F85}", + "details": { + "name": "AZStd::unordered_set" + } + } + ], + "results": [ + { + "typeid": "{A0CA880C-AFE4-43CB-926C-59AC48496112}", + "details": { + "name": "bool" + } + } + ] + }, + { + "base": "Swap", + "context": "{DB1EB3E5-F953-53A7-B8F9-9121E6A77F85}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Swap" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Swap is invoked" + }, + "details": { + "name": "Swap" + }, + "params": [ + { + "typeid": "{DB1EB3E5-F953-53A7-B8F9-9121E6A77F85}", + "details": { + "name": "AZStd::unordered_set" + } + }, + { + "typeid": "{DB1EB3E5-F953-53A7-B8F9-9121E6A77F85}", + "details": { + "name": "AZStd::unordered_set" + } + } + ] + } + ] + }, + { + "base": "{8E8D109E-EB62-5F13-8C2C-1D857EEE4FB4}", + "context": "OnDemandReflected", + "variant": "", + "details": { + "name": "Array", + "category": "Array", + "tooltip": "A dynamically sized container of elements." + }, + "methods": [ + { + "base": "Size", + "context": "{8E8D109E-EB62-5F13-8C2C-1D857EEE4FB4}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Size" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Size is invoked" + }, + "details": { + "name": "Size" + }, + "params": [ + { + "typeid": "{8E8D109E-EB62-5F13-8C2C-1D857EEE4FB4}", + "details": { + "name": "AZStd::vector" + } + } + ], + "results": [ + { + "typeid": "{72039442-EB38-4D42-A1AD-CB68F7E0EEF6}", + "details": { + "name": "int" + } + } + ] + }, + { + "base": "Front", + "context": "{8E8D109E-EB62-5F13-8C2C-1D857EEE4FB4}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Front" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Front is invoked" + }, + "details": { + "name": "Front" + }, + "params": [ + { + "typeid": "{8E8D109E-EB62-5F13-8C2C-1D857EEE4FB4}", + "details": { + "name": "AZStd::vector" + } + } + ], + "results": [ + { + "typeid": "{004ABD25-CF14-4EB3-BD41-022C247C07FA}", + "details": { + "name": "Obb" + } + } + ] + }, + { + "base": "HasKey", + "context": "{8E8D109E-EB62-5F13-8C2C-1D857EEE4FB4}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Has Key" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Has Key is invoked" + }, + "details": { + "name": "Has Key" + }, + "params": [ + { + "typeid": "{8E8D109E-EB62-5F13-8C2C-1D857EEE4FB4}", + "details": { + "name": "AZStd::vector" + } + }, + { + "typeid": "{D6597933-47CD-4FC8-B911-63F3E2B0993A}", + "details": { + "name": "AZ::u64" + } + } + ], + "results": [ + { + "typeid": "{A0CA880C-AFE4-43CB-926C-59AC48496112}", + "details": { + "name": "bool" + } + } + ] + }, + { + "base": "Resize", + "context": "{8E8D109E-EB62-5F13-8C2C-1D857EEE4FB4}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Resize" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Resize is invoked" + }, + "details": { + "name": "Resize" + }, + "params": [ + { + "typeid": "{8E8D109E-EB62-5F13-8C2C-1D857EEE4FB4}", + "details": { + "name": "AZStd::vector" + } + }, + { + "typeid": "{D6597933-47CD-4FC8-B911-63F3E2B0993A}", + "details": { + "name": "AZ::u64" + } + } + ] + }, + { + "base": "at", + "context": "{8E8D109E-EB62-5F13-8C2C-1D857EEE4FB4}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke at" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after at is invoked" + }, + "details": { + "name": "at" + }, + "params": [ + { + "typeid": "{8E8D109E-EB62-5F13-8C2C-1D857EEE4FB4}", + "details": { + "name": "AZStd::vector" + } + }, + { + "typeid": "{D6597933-47CD-4FC8-B911-63F3E2B0993A}", + "details": { + "name": "AZ::u64" + } + } + ], + "results": [ + { + "typeid": "{004ABD25-CF14-4EB3-BD41-022C247C07FA}", + "details": { + "name": "Obb" + } + } + ] + }, + { + "base": "Back", + "context": "{8E8D109E-EB62-5F13-8C2C-1D857EEE4FB4}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Back" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Back is invoked" + }, + "details": { + "name": "Back" + }, + "params": [ + { + "typeid": "{8E8D109E-EB62-5F13-8C2C-1D857EEE4FB4}", + "details": { + "name": "AZStd::vector" + } + } + ], + "results": [ + { + "typeid": "{004ABD25-CF14-4EB3-BD41-022C247C07FA}", + "details": { + "name": "Obb" + } + } + ] + }, + { + "base": "pop_back", + "context": "{8E8D109E-EB62-5F13-8C2C-1D857EEE4FB4}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke pop_back" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after pop_back is invoked" + }, + "details": { + "name": "pop_back" + }, + "params": [ + { + "typeid": "{8E8D109E-EB62-5F13-8C2C-1D857EEE4FB4}", + "details": { + "name": "AZStd::vector" + } + } + ] + }, + { + "base": "size", + "context": "{8E8D109E-EB62-5F13-8C2C-1D857EEE4FB4}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke size" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after size is invoked" + }, + "details": { + "name": "size" + }, + "params": [ + { + "typeid": "{8E8D109E-EB62-5F13-8C2C-1D857EEE4FB4}", + "details": { + "name": "AZStd::vector" + } + } + ], + "results": [ + { + "typeid": "{72039442-EB38-4D42-A1AD-CB68F7E0EEF6}", + "details": { + "name": "int" + } + } + ] + }, + { + "base": "At", + "context": "{8E8D109E-EB62-5F13-8C2C-1D857EEE4FB4}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke At" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after At is invoked" + }, + "details": { + "name": "At" + }, + "params": [ + { + "typeid": "{8E8D109E-EB62-5F13-8C2C-1D857EEE4FB4}", + "details": { + "name": "AZStd::vector" + } + }, + { + "typeid": "{D6597933-47CD-4FC8-B911-63F3E2B0993A}", + "details": { + "name": "AZ::u64" + } + } + ], + "results": [ + { + "typeid": "{004ABD25-CF14-4EB3-BD41-022C247C07FA}", + "details": { + "name": "Obb" + } + } + ] + }, + { + "base": "Empty", + "context": "{8E8D109E-EB62-5F13-8C2C-1D857EEE4FB4}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Empty" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Empty is invoked" + }, + "details": { + "name": "Empty" + }, + "params": [ + { + "typeid": "{8E8D109E-EB62-5F13-8C2C-1D857EEE4FB4}", + "details": { + "name": "AZStd::vector" + } + } + ], + "results": [ + { + "typeid": "{A0CA880C-AFE4-43CB-926C-59AC48496112}", + "details": { + "name": "bool" + } + } + ] + }, + { + "base": "Swap", + "context": "{8E8D109E-EB62-5F13-8C2C-1D857EEE4FB4}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Swap" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Swap is invoked" + }, + "details": { + "name": "Swap" + }, + "params": [ + { + "typeid": "{8E8D109E-EB62-5F13-8C2C-1D857EEE4FB4}", + "details": { + "name": "AZStd::vector" + } + }, + { + "typeid": "{8E8D109E-EB62-5F13-8C2C-1D857EEE4FB4}", + "details": { + "name": "AZStd::vector" + } + } + ] + }, + { + "base": "push_back", + "context": "{8E8D109E-EB62-5F13-8C2C-1D857EEE4FB4}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke push_back" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after push_back is invoked" + }, + "details": { + "name": "push_back" + }, + "params": [ + { + "typeid": "{8E8D109E-EB62-5F13-8C2C-1D857EEE4FB4}", + "details": { + "name": "AZStd::vector" + } + }, + { + "typeid": "{004ABD25-CF14-4EB3-BD41-022C247C07FA}", + "details": { + "name": "Obb" + } + } + ] + }, + { + "base": "PushBack_VM", + "context": "{8E8D109E-EB62-5F13-8C2C-1D857EEE4FB4}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke PushBack_VM" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after PushBack_VM is invoked" + }, + "details": { + "name": "PushBack_VM" + }, + "params": [ + { + "typeid": "{8E8D109E-EB62-5F13-8C2C-1D857EEE4FB4}", + "details": { + "name": "AZStd::vector" + } + }, + { + "typeid": "{004ABD25-CF14-4EB3-BD41-022C247C07FA}", + "details": { + "name": "Obb" + } + } + ], + "results": [ + { + "typeid": "{8E8D109E-EB62-5F13-8C2C-1D857EEE4FB4}", + "details": { + "name": "AZStd::vector" + } + } + ] + }, + { + "base": "AtUnchecked", + "context": "{8E8D109E-EB62-5F13-8C2C-1D857EEE4FB4}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke AtUnchecked" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after AtUnchecked is invoked" + }, + "details": { + "name": "AtUnchecked" + }, + "params": [ + { + "typeid": "{8E8D109E-EB62-5F13-8C2C-1D857EEE4FB4}", + "details": { + "name": "AZStd::vector" + } + }, + { + "typeid": "{D6597933-47CD-4FC8-B911-63F3E2B0993A}", + "details": { + "name": "AZ::u64" + } + } + ], + "results": [ + { + "typeid": "{004ABD25-CF14-4EB3-BD41-022C247C07FA}", + "details": { + "name": "Obb" + } + } + ] + }, + { + "base": "clear", + "context": "{8E8D109E-EB62-5F13-8C2C-1D857EEE4FB4}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke clear" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after clear is invoked" + }, + "details": { + "name": "clear" + }, + "params": [ + { + "typeid": "{8E8D109E-EB62-5F13-8C2C-1D857EEE4FB4}", + "details": { + "name": "AZStd::vector" + } + } + ] + }, + { + "base": "NotEmpty", + "context": "{8E8D109E-EB62-5F13-8C2C-1D857EEE4FB4}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke NotEmpty" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after NotEmpty is invoked" + }, + "details": { + "name": "NotEmpty" + }, + "params": [ + { + "typeid": "{8E8D109E-EB62-5F13-8C2C-1D857EEE4FB4}", + "details": { + "name": "AZStd::vector" + } + } + ], + "results": [ + { + "typeid": "{A0CA880C-AFE4-43CB-926C-59AC48496112}", + "details": { + "name": "bool" + } + } + ] + }, + { + "base": "Erase_VM", + "context": "{8E8D109E-EB62-5F13-8C2C-1D857EEE4FB4}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Erase_VM" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Erase_VM is invoked" + }, + "details": { + "name": "Erase_VM" + }, + "params": [ + { + "typeid": "{8E8D109E-EB62-5F13-8C2C-1D857EEE4FB4}", + "details": { + "name": "AZStd::vector" + } + }, + { + "typeid": "{D6597933-47CD-4FC8-B911-63F3E2B0993A}", + "details": { + "name": "AZ::u64" + } + } + ], + "results": [ + { + "typeid": "{8E8D109E-EB62-5F13-8C2C-1D857EEE4FB4}", + "details": { + "name": "AZStd::vector" + } + } + ] + }, + { + "base": "EraseCheck_VM", + "context": "{8E8D109E-EB62-5F13-8C2C-1D857EEE4FB4}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke EraseCheck_VM" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after EraseCheck_VM is invoked" + }, + "details": { + "name": "EraseCheck_VM" + }, + "params": [ + { + "typeid": "{8E8D109E-EB62-5F13-8C2C-1D857EEE4FB4}", + "details": { + "name": "AZStd::vector" + } + }, + { + "typeid": "{D6597933-47CD-4FC8-B911-63F3E2B0993A}", + "details": { + "name": "AZ::u64" + } + } + ], + "results": [ + { + "typeid": "{A0CA880C-AFE4-43CB-926C-59AC48496112}", + "details": { + "name": "bool" + } + } + ] + }, + { + "base": "Capacity", + "context": "{8E8D109E-EB62-5F13-8C2C-1D857EEE4FB4}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Capacity" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Capacity is invoked" + }, + "details": { + "name": "Capacity" + }, + "params": [ + { + "typeid": "{8E8D109E-EB62-5F13-8C2C-1D857EEE4FB4}", + "details": { + "name": "AZStd::vector" + } + } + ], + "results": [ + { + "typeid": "{D6597933-47CD-4FC8-B911-63F3E2B0993A}", + "details": { + "name": "AZ::u64" + } + } + ] + }, + { + "base": "Clear", + "context": "{8E8D109E-EB62-5F13-8C2C-1D857EEE4FB4}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Clear" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Clear is invoked" + }, + "details": { + "name": "Clear" + }, + "params": [ + { + "typeid": "{8E8D109E-EB62-5F13-8C2C-1D857EEE4FB4}", + "details": { + "name": "AZStd::vector" + } + } + ], + "results": [ + { + "typeid": "{8E8D109E-EB62-5F13-8C2C-1D857EEE4FB4}", + "details": { + "name": "AZStd::vector" + } + } + ] + }, + { + "base": "AssignAt", + "context": "{8E8D109E-EB62-5F13-8C2C-1D857EEE4FB4}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke AssignAt" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after AssignAt is invoked" + }, + "details": { + "name": "AssignAt" + }, + "params": [ + { + "typeid": "{8E8D109E-EB62-5F13-8C2C-1D857EEE4FB4}", + "details": { + "name": "AZStd::vector" + } + }, + { + "typeid": "{D6597933-47CD-4FC8-B911-63F3E2B0993A}", + "details": { + "name": "AZ::u64" + } + }, + { + "typeid": "{004ABD25-CF14-4EB3-BD41-022C247C07FA}", + "details": { + "name": "Obb" + } + } + ] + }, + { + "base": "GetSize", + "context": "{8E8D109E-EB62-5F13-8C2C-1D857EEE4FB4}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke GetSize" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after GetSize is invoked" + }, + "details": { + "name": "GetSize" + }, + "params": [ + { + "typeid": "{8E8D109E-EB62-5F13-8C2C-1D857EEE4FB4}", + "details": { + "name": "AZStd::vector" + } + } + ], + "results": [ + { + "typeid": "{72039442-EB38-4D42-A1AD-CB68F7E0EEF6}", + "details": { + "name": "int" + } + } + ] + }, + { + "base": "Insert", + "context": "{8E8D109E-EB62-5F13-8C2C-1D857EEE4FB4}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Insert" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Insert is invoked" + }, + "details": { + "name": "Insert" + }, + "params": [ + { + "typeid": "{8E8D109E-EB62-5F13-8C2C-1D857EEE4FB4}", + "details": { + "name": "AZStd::vector" + } + }, + { + "typeid": "{D6597933-47CD-4FC8-B911-63F3E2B0993A}", + "details": { + "name": "AZ::u64" + } + }, + { + "typeid": "{004ABD25-CF14-4EB3-BD41-022C247C07FA}", + "details": { + "name": "Obb" + } + } + ], + "results": [ + { + "typeid": "{8E8D109E-EB62-5F13-8C2C-1D857EEE4FB4}", + "details": { + "name": "AZStd::vector" + } + } + ] + }, + { + "base": "PushBack", + "context": "{8E8D109E-EB62-5F13-8C2C-1D857EEE4FB4}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke PushBack" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after PushBack is invoked" + }, + "details": { + "name": "PushBack" + }, + "params": [ + { + "typeid": "{8E8D109E-EB62-5F13-8C2C-1D857EEE4FB4}", + "details": { + "name": "AZStd::vector" + } + }, + { + "typeid": "{004ABD25-CF14-4EB3-BD41-022C247C07FA}", + "details": { + "name": "Obb" + } + } + ] + }, + { + "base": "Reserve", + "context": "{8E8D109E-EB62-5F13-8C2C-1D857EEE4FB4}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Reserve" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Reserve is invoked" + }, + "details": { + "name": "Reserve" + }, + "params": [ + { + "typeid": "{8E8D109E-EB62-5F13-8C2C-1D857EEE4FB4}", + "details": { + "name": "AZStd::vector" + } + }, + { + "typeid": "{D6597933-47CD-4FC8-B911-63F3E2B0993A}", + "details": { + "name": "AZ::u64" + } + } + ] + }, + { + "base": "Iterate_VM", + "context": "{8E8D109E-EB62-5F13-8C2C-1D857EEE4FB4}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Iterate_VM" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Iterate_VM is invoked" + }, + "details": { + "name": "Iterate_VM" + }, + "params": [ + { + "typeid": "{8E8D109E-EB62-5F13-8C2C-1D857EEE4FB4}", + "details": { + "name": "AZStd::vector" + } + } + ], + "results": [ + { + "typeid": "{750C38DE-C1FA-5536-8447-1BF6F946DDDD}", + "details": { + "name": "Iterator_VM>" + } + } + ] + } + ] + }, + { + "base": "{3A9E52F9-1A46-5FC6-822A-249BBFB50C90}", + "context": "OnDemandReflected", + "variant": "", + "details": { + "name": "Array", + "category": "Array", + "tooltip": "A dynamically sized container of elements." + }, + "methods": [ + { + "base": "Size", + "context": "{3A9E52F9-1A46-5FC6-822A-249BBFB50C90}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Size" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Size is invoked" + }, + "details": { + "name": "Size" + }, + "params": [ + { + "typeid": "{3A9E52F9-1A46-5FC6-822A-249BBFB50C90}", + "details": { + "name": "AZStd::vector" + } + } + ], + "results": [ + { + "typeid": "{72039442-EB38-4D42-A1AD-CB68F7E0EEF6}", + "details": { + "name": "int" + } + } + ] + }, + { + "base": "Front", + "context": "{3A9E52F9-1A46-5FC6-822A-249BBFB50C90}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Front" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Front is invoked" + }, + "details": { + "name": "Front" + }, + "params": [ + { + "typeid": "{3A9E52F9-1A46-5FC6-822A-249BBFB50C90}", + "details": { + "name": "AZStd::vector" + } + } + ], + "results": [ + { + "typeid": "{E152C105-A133-4D03-BBF8-3D4B2FBA3E2A}", + "details": { + "name": "AZ::Uuid" + } + } + ] + }, + { + "base": "HasKey", + "context": "{3A9E52F9-1A46-5FC6-822A-249BBFB50C90}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Has Key" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Has Key is invoked" + }, + "details": { + "name": "Has Key" + }, + "params": [ + { + "typeid": "{3A9E52F9-1A46-5FC6-822A-249BBFB50C90}", + "details": { + "name": "AZStd::vector" + } + }, + { + "typeid": "{D6597933-47CD-4FC8-B911-63F3E2B0993A}", + "details": { + "name": "AZ::u64" + } + } + ], + "results": [ + { + "typeid": "{A0CA880C-AFE4-43CB-926C-59AC48496112}", + "details": { + "name": "bool" + } + } + ] + }, + { + "base": "Resize", + "context": "{3A9E52F9-1A46-5FC6-822A-249BBFB50C90}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Resize" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Resize is invoked" + }, + "details": { + "name": "Resize" + }, + "params": [ + { + "typeid": "{3A9E52F9-1A46-5FC6-822A-249BBFB50C90}", + "details": { + "name": "AZStd::vector" + } + }, + { + "typeid": "{D6597933-47CD-4FC8-B911-63F3E2B0993A}", + "details": { + "name": "AZ::u64" + } + } + ] + }, + { + "base": "at", + "context": "{3A9E52F9-1A46-5FC6-822A-249BBFB50C90}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke at" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after at is invoked" + }, + "details": { + "name": "at" + }, + "params": [ + { + "typeid": "{3A9E52F9-1A46-5FC6-822A-249BBFB50C90}", + "details": { + "name": "AZStd::vector" + } + }, + { + "typeid": "{D6597933-47CD-4FC8-B911-63F3E2B0993A}", + "details": { + "name": "AZ::u64" + } + } + ], + "results": [ + { + "typeid": "{E152C105-A133-4D03-BBF8-3D4B2FBA3E2A}", + "details": { + "name": "AZ::Uuid" + } + } + ] + }, + { + "base": "Back", + "context": "{3A9E52F9-1A46-5FC6-822A-249BBFB50C90}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Back" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Back is invoked" + }, + "details": { + "name": "Back" + }, + "params": [ + { + "typeid": "{3A9E52F9-1A46-5FC6-822A-249BBFB50C90}", + "details": { + "name": "AZStd::vector" + } + } + ], + "results": [ + { + "typeid": "{E152C105-A133-4D03-BBF8-3D4B2FBA3E2A}", + "details": { + "name": "AZ::Uuid" + } + } + ] + }, + { + "base": "pop_back", + "context": "{3A9E52F9-1A46-5FC6-822A-249BBFB50C90}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke pop_back" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after pop_back is invoked" + }, + "details": { + "name": "pop_back" + }, + "params": [ + { + "typeid": "{3A9E52F9-1A46-5FC6-822A-249BBFB50C90}", + "details": { + "name": "AZStd::vector" + } + } + ] + }, + { + "base": "size", + "context": "{3A9E52F9-1A46-5FC6-822A-249BBFB50C90}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke size" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after size is invoked" + }, + "details": { + "name": "size" + }, + "params": [ + { + "typeid": "{3A9E52F9-1A46-5FC6-822A-249BBFB50C90}", + "details": { + "name": "AZStd::vector" + } + } + ], + "results": [ + { + "typeid": "{72039442-EB38-4D42-A1AD-CB68F7E0EEF6}", + "details": { + "name": "int" + } + } + ] + }, + { + "base": "At", + "context": "{3A9E52F9-1A46-5FC6-822A-249BBFB50C90}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke At" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after At is invoked" + }, + "details": { + "name": "At" + }, + "params": [ + { + "typeid": "{3A9E52F9-1A46-5FC6-822A-249BBFB50C90}", + "details": { + "name": "AZStd::vector" + } + }, + { + "typeid": "{D6597933-47CD-4FC8-B911-63F3E2B0993A}", + "details": { + "name": "AZ::u64" + } + } + ], + "results": [ + { + "typeid": "{E152C105-A133-4D03-BBF8-3D4B2FBA3E2A}", + "details": { + "name": "AZ::Uuid" + } + } + ] + }, + { + "base": "Empty", + "context": "{3A9E52F9-1A46-5FC6-822A-249BBFB50C90}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Empty" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Empty is invoked" + }, + "details": { + "name": "Empty" + }, + "params": [ + { + "typeid": "{3A9E52F9-1A46-5FC6-822A-249BBFB50C90}", + "details": { + "name": "AZStd::vector" + } + } + ], + "results": [ + { + "typeid": "{A0CA880C-AFE4-43CB-926C-59AC48496112}", + "details": { + "name": "bool" + } + } + ] + }, + { + "base": "Swap", + "context": "{3A9E52F9-1A46-5FC6-822A-249BBFB50C90}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Swap" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Swap is invoked" + }, + "details": { + "name": "Swap" + }, + "params": [ + { + "typeid": "{3A9E52F9-1A46-5FC6-822A-249BBFB50C90}", + "details": { + "name": "AZStd::vector" + } + }, + { + "typeid": "{3A9E52F9-1A46-5FC6-822A-249BBFB50C90}", + "details": { + "name": "AZStd::vector" + } + } + ] + }, + { + "base": "push_back", + "context": "{3A9E52F9-1A46-5FC6-822A-249BBFB50C90}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke push_back" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after push_back is invoked" + }, + "details": { + "name": "push_back" + }, + "params": [ + { + "typeid": "{3A9E52F9-1A46-5FC6-822A-249BBFB50C90}", + "details": { + "name": "AZStd::vector" + } + }, + { + "typeid": "{E152C105-A133-4D03-BBF8-3D4B2FBA3E2A}", + "details": { + "name": "AZ::Uuid" + } + } + ] + }, + { + "base": "PushBack_VM", + "context": "{3A9E52F9-1A46-5FC6-822A-249BBFB50C90}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke PushBack_VM" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after PushBack_VM is invoked" + }, + "details": { + "name": "PushBack_VM" + }, + "params": [ + { + "typeid": "{3A9E52F9-1A46-5FC6-822A-249BBFB50C90}", + "details": { + "name": "AZStd::vector" + } + }, + { + "typeid": "{E152C105-A133-4D03-BBF8-3D4B2FBA3E2A}", + "details": { + "name": "AZ::Uuid" + } + } + ], + "results": [ + { + "typeid": "{3A9E52F9-1A46-5FC6-822A-249BBFB50C90}", + "details": { + "name": "AZStd::vector" + } + } + ] + }, + { + "base": "AtUnchecked", + "context": "{3A9E52F9-1A46-5FC6-822A-249BBFB50C90}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke AtUnchecked" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after AtUnchecked is invoked" + }, + "details": { + "name": "AtUnchecked" + }, + "params": [ + { + "typeid": "{3A9E52F9-1A46-5FC6-822A-249BBFB50C90}", + "details": { + "name": "AZStd::vector" + } + }, + { + "typeid": "{D6597933-47CD-4FC8-B911-63F3E2B0993A}", + "details": { + "name": "AZ::u64" + } + } + ], + "results": [ + { + "typeid": "{E152C105-A133-4D03-BBF8-3D4B2FBA3E2A}", + "details": { + "name": "AZ::Uuid" + } + } + ] + }, + { + "base": "clear", + "context": "{3A9E52F9-1A46-5FC6-822A-249BBFB50C90}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke clear" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after clear is invoked" + }, + "details": { + "name": "clear" + }, + "params": [ + { + "typeid": "{3A9E52F9-1A46-5FC6-822A-249BBFB50C90}", + "details": { + "name": "AZStd::vector" + } + } + ] + }, + { + "base": "NotEmpty", + "context": "{3A9E52F9-1A46-5FC6-822A-249BBFB50C90}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke NotEmpty" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after NotEmpty is invoked" + }, + "details": { + "name": "NotEmpty" + }, + "params": [ + { + "typeid": "{3A9E52F9-1A46-5FC6-822A-249BBFB50C90}", + "details": { + "name": "AZStd::vector" + } + } + ], + "results": [ + { + "typeid": "{A0CA880C-AFE4-43CB-926C-59AC48496112}", + "details": { + "name": "bool" + } + } + ] + }, + { + "base": "Erase_VM", + "context": "{3A9E52F9-1A46-5FC6-822A-249BBFB50C90}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Erase_VM" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Erase_VM is invoked" + }, + "details": { + "name": "Erase_VM" + }, + "params": [ + { + "typeid": "{3A9E52F9-1A46-5FC6-822A-249BBFB50C90}", + "details": { + "name": "AZStd::vector" + } + }, + { + "typeid": "{D6597933-47CD-4FC8-B911-63F3E2B0993A}", + "details": { + "name": "AZ::u64" + } + } + ], + "results": [ + { + "typeid": "{3A9E52F9-1A46-5FC6-822A-249BBFB50C90}", + "details": { + "name": "AZStd::vector" + } + } + ] + }, + { + "base": "EraseCheck_VM", + "context": "{3A9E52F9-1A46-5FC6-822A-249BBFB50C90}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke EraseCheck_VM" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after EraseCheck_VM is invoked" + }, + "details": { + "name": "EraseCheck_VM" + }, + "params": [ + { + "typeid": "{3A9E52F9-1A46-5FC6-822A-249BBFB50C90}", + "details": { + "name": "AZStd::vector" + } + }, + { + "typeid": "{D6597933-47CD-4FC8-B911-63F3E2B0993A}", + "details": { + "name": "AZ::u64" + } + } + ], + "results": [ + { + "typeid": "{A0CA880C-AFE4-43CB-926C-59AC48496112}", + "details": { + "name": "bool" + } + } + ] + }, + { + "base": "Capacity", + "context": "{3A9E52F9-1A46-5FC6-822A-249BBFB50C90}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Capacity" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Capacity is invoked" + }, + "details": { + "name": "Capacity" + }, + "params": [ + { + "typeid": "{3A9E52F9-1A46-5FC6-822A-249BBFB50C90}", + "details": { + "name": "AZStd::vector" + } + } + ], + "results": [ + { + "typeid": "{D6597933-47CD-4FC8-B911-63F3E2B0993A}", + "details": { + "name": "AZ::u64" + } + } + ] + }, + { + "base": "Clear", + "context": "{3A9E52F9-1A46-5FC6-822A-249BBFB50C90}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Clear" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Clear is invoked" + }, + "details": { + "name": "Clear" + }, + "params": [ + { + "typeid": "{3A9E52F9-1A46-5FC6-822A-249BBFB50C90}", + "details": { + "name": "AZStd::vector" + } + } + ], + "results": [ + { + "typeid": "{3A9E52F9-1A46-5FC6-822A-249BBFB50C90}", + "details": { + "name": "AZStd::vector" + } + } + ] + }, + { + "base": "AssignAt", + "context": "{3A9E52F9-1A46-5FC6-822A-249BBFB50C90}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke AssignAt" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after AssignAt is invoked" + }, + "details": { + "name": "AssignAt" + }, + "params": [ + { + "typeid": "{3A9E52F9-1A46-5FC6-822A-249BBFB50C90}", + "details": { + "name": "AZStd::vector" + } + }, + { + "typeid": "{D6597933-47CD-4FC8-B911-63F3E2B0993A}", + "details": { + "name": "AZ::u64" + } + }, + { + "typeid": "{E152C105-A133-4D03-BBF8-3D4B2FBA3E2A}", + "details": { + "name": "AZ::Uuid" + } + } + ] + }, + { + "base": "GetSize", + "context": "{3A9E52F9-1A46-5FC6-822A-249BBFB50C90}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke GetSize" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after GetSize is invoked" + }, + "details": { + "name": "GetSize" + }, + "params": [ + { + "typeid": "{3A9E52F9-1A46-5FC6-822A-249BBFB50C90}", + "details": { + "name": "AZStd::vector" + } + } + ], + "results": [ + { + "typeid": "{72039442-EB38-4D42-A1AD-CB68F7E0EEF6}", + "details": { + "name": "int" + } + } + ] + }, + { + "base": "Insert", + "context": "{3A9E52F9-1A46-5FC6-822A-249BBFB50C90}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Insert" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Insert is invoked" + }, + "details": { + "name": "Insert" + }, + "params": [ + { + "typeid": "{3A9E52F9-1A46-5FC6-822A-249BBFB50C90}", + "details": { + "name": "AZStd::vector" + } + }, + { + "typeid": "{D6597933-47CD-4FC8-B911-63F3E2B0993A}", + "details": { + "name": "AZ::u64" + } + }, + { + "typeid": "{E152C105-A133-4D03-BBF8-3D4B2FBA3E2A}", + "details": { + "name": "AZ::Uuid" + } + } + ], + "results": [ + { + "typeid": "{3A9E52F9-1A46-5FC6-822A-249BBFB50C90}", + "details": { + "name": "AZStd::vector" + } + } + ] + }, + { + "base": "PushBack", + "context": "{3A9E52F9-1A46-5FC6-822A-249BBFB50C90}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke PushBack" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after PushBack is invoked" + }, + "details": { + "name": "PushBack" + }, + "params": [ + { + "typeid": "{3A9E52F9-1A46-5FC6-822A-249BBFB50C90}", + "details": { + "name": "AZStd::vector" + } + }, + { + "typeid": "{E152C105-A133-4D03-BBF8-3D4B2FBA3E2A}", + "details": { + "name": "AZ::Uuid" + } + } + ] + }, + { + "base": "Reserve", + "context": "{3A9E52F9-1A46-5FC6-822A-249BBFB50C90}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Reserve" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Reserve is invoked" + }, + "details": { + "name": "Reserve" + }, + "params": [ + { + "typeid": "{3A9E52F9-1A46-5FC6-822A-249BBFB50C90}", + "details": { + "name": "AZStd::vector" + } + }, + { + "typeid": "{D6597933-47CD-4FC8-B911-63F3E2B0993A}", + "details": { + "name": "AZ::u64" + } + } + ] + }, + { + "base": "Iterate_VM", + "context": "{3A9E52F9-1A46-5FC6-822A-249BBFB50C90}", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Iterate_VM" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Iterate_VM is invoked" + }, + "details": { + "name": "Iterate_VM" + }, + "params": [ + { + "typeid": "{3A9E52F9-1A46-5FC6-822A-249BBFB50C90}", + "details": { + "name": "AZStd::vector" + } + } + ], + "results": [ + { + "typeid": "{C796F74B-8496-5018-9303-F525A8B22E4F}", + "details": { + "name": "Iterator_VM>" + } + } + ] + } + ] + } + ] +} \ No newline at end of file diff --git a/Gems/ScriptCanvas/Code/Asset/EditorAssetConversionBus.h b/Gems/ScriptCanvas/Code/Asset/EditorAssetConversionBus.h index 12313021f7..3b120af5da 100644 --- a/Gems/ScriptCanvas/Code/Asset/EditorAssetConversionBus.h +++ b/Gems/ScriptCanvas/Code/Asset/EditorAssetConversionBus.h @@ -26,17 +26,14 @@ namespace ScriptCanvas namespace ScriptCanvasEditor { - class ScriptCanvasAsset; - class EditorAssetConversionBusTraits : public AZ::EBusTraits { public: static const AZ::EBusAddressPolicy AddressPolicy = AZ::EBusAddressPolicy::Single; - virtual AZ::Data::Asset LoadAsset(AZStd::string_view graphPath) = 0; - virtual AZ::Outcome CreateLuaAsset(const AZ::Data::Asset& editAsset, AZStd::string_view graphPathForRawLuaFile) = 0; - virtual AZ::Outcome, AZStd::string> CreateRuntimeAsset(const AZ::Data::Asset& editAsset) = 0; + virtual AZ::Outcome CreateLuaAsset(const SourceHandle& editAsset, AZStd::string_view graphPathForRawLuaFile) = 0; + virtual AZ::Outcome, AZStd::string> CreateRuntimeAsset(const SourceHandle& editAsset) = 0; }; using EditorAssetConversionBus = AZ::EBus; diff --git a/Gems/ScriptCanvas/Code/Asset/EditorAssetSystemComponent.cpp b/Gems/ScriptCanvas/Code/Asset/EditorAssetSystemComponent.cpp index 4df2a57c36..3491cb5360 100644 --- a/Gems/ScriptCanvas/Code/Asset/EditorAssetSystemComponent.cpp +++ b/Gems/ScriptCanvas/Code/Asset/EditorAssetSystemComponent.cpp @@ -22,8 +22,7 @@ // Undo this AZ_PUSH_DISABLE_WARNING(4251 4800 4244, "-Wunknown-warning-option") #include -#include -#include + #include #include AZ_POP_DISABLE_WARNING @@ -64,7 +63,6 @@ namespace ScriptCanvasEditor void EditorAssetSystemComponent::Activate() { - m_editorAssetRegistry.Register(); m_editorAssetRegistry.Register(); AzToolsFramework::AssetBrowser::AssetBrowserInteractionNotificationBus::Handler::BusConnect(); @@ -86,10 +84,7 @@ namespace ScriptCanvasEditor static bool HandlesSource(const AzToolsFramework::AssetBrowser::SourceAssetBrowserEntry* entry) { AZStd::string_view targetExtension = entry->GetExtension(); - - ScriptCanvasAsset::Description description; - AZStd::string_view scriptCanvasFileFilter = description.GetFileFilterImpl(); - + AZStd::string_view scriptCanvasFileFilter = SourceDescription::GetFileFilter(); if (AZStd::wildcard_match(scriptCanvasFileFilter.data(), targetExtension.data())) { return true; @@ -98,35 +93,25 @@ namespace ScriptCanvasEditor return false; } - AZ::Data::Asset EditorAssetSystemComponent::LoadAsset(AZStd::string_view graphPath) - { - auto outcome = ScriptCanvasBuilder::LoadEditorAsset(graphPath, AZ::Data::AssetId(AZ::Uuid::CreateRandom())); - - if (outcome.IsSuccess()) - { - return outcome.GetValue(); - } - else - { - return {}; - } - } - - AZ::Outcome, AZStd::string> EditorAssetSystemComponent::CreateRuntimeAsset(const AZ::Data::Asset& editAsset) + AZ::Outcome, AZStd::string> EditorAssetSystemComponent::CreateRuntimeAsset(const SourceHandle& editAsset) { return ScriptCanvasBuilder::CreateRuntimeAsset(editAsset); } - AZ::Outcome EditorAssetSystemComponent::CreateLuaAsset(const AZ::Data::Asset& editAsset, AZStd::string_view graphPathForRawLuaFile) + AZ::Outcome EditorAssetSystemComponent::CreateLuaAsset(const SourceHandle& editAsset, AZStd::string_view graphPathForRawLuaFile) { - return ScriptCanvasBuilder::CreateLuaAsset(editAsset->GetScriptCanvasEntity(), editAsset->GetId(), graphPathForRawLuaFile); + return ScriptCanvasBuilder::CreateLuaAsset(editAsset, graphPathForRawLuaFile); } - void EditorAssetSystemComponent::AddSourceFileOpeners([[maybe_unused]] const char* fullSourceFileName, const AZ::Uuid& sourceUuid, AzToolsFramework::AssetBrowser::SourceFileOpenerList& openers) + void EditorAssetSystemComponent::AddSourceFileOpeners + ( [[maybe_unused]] const char* fullSourceFileName + , const AZ::Uuid& sourceUuid + , AzToolsFramework::AssetBrowser::SourceFileOpenerList& openers) { using namespace AzToolsFramework; using namespace AzToolsFramework::AssetBrowser; - if (const SourceAssetBrowserEntry* source = SourceAssetBrowserEntry::GetSourceByUuid(sourceUuid)) // get the full details of the source file based on its UUID. + // get the full details of the source file based on its UUID. + if (const SourceAssetBrowserEntry* source = SourceAssetBrowserEntry::GetSourceByUuid(sourceUuid)) { if (!HandlesSource(source)) { @@ -138,22 +123,31 @@ namespace ScriptCanvasEditor // has no UUID / Not a source file. return; } - // You can push back any number of "Openers" - choose a unique identifier, and icon, and then a lambda which will be activated if the user chooses to open it with your opener: - openers.push_back({ "ScriptCanvas_Editor_Asset_Edit", "Script Canvas Editor...", QIcon(), + + // You can push back any number of "Openers" - choose a unique identifier, and icon, + // and then a lambda which will be activated if the user chooses to open it with your opener: + + openers.push_back({ "ScriptCanvas_Editor_Asset_Edit", "Script Canvas Editor..." + , QIcon(ScriptCanvasEditor::SourceDescription::GetIconPath()), [](const char*, const AZ::Uuid& scSourceUuid) - { - AzToolsFramework::OpenViewPane(LyViewPane::ScriptCanvas); - AZ::Data::AssetId sourceAssetId(scSourceUuid, 0); - - auto& assetManager = AZ::Data::AssetManager::Instance(); - AZ::Data::Asset scriptCanvasAsset = assetManager.GetAsset(sourceAssetId, azrtti_typeid(), AZ::Data::AssetLoadBehavior::Default); - AZ::Outcome openOutcome = AZ::Failure(AZStd::string()); - GeneralRequestBus::BroadcastResult(openOutcome, &GeneralRequests::OpenScriptCanvasAsset, scriptCanvasAsset.GetId(), -1); - if (!openOutcome) { - AZ_Warning("Script Canvas", openOutcome, "%s", openOutcome.GetError().data()); - } - } }); + AzToolsFramework::OpenViewPane(LyViewPane::ScriptCanvas); + if (auto sourceHandle = CompleteDescription(SourceHandle(nullptr, scSourceUuid, {}))) + { + AZ::Outcome openOutcome = AZ::Failure(AZStd::string()); + GeneralRequestBus::BroadcastResult(openOutcome, &GeneralRequests::OpenScriptCanvasAsset + , *sourceHandle, Tracker::ScriptCanvasFileState::UNMODIFIED, -1); + if (!openOutcome) + { + AZ_Warning("ScriptCanvas", openOutcome, "%s", openOutcome.GetError().data()); + } + } + else + { + AZ_Warning("ScriptCanvas", false + , "Unabled to find full path for Source UUid %s", scSourceUuid.ToString().c_str()); + } + }}); } } diff --git a/Gems/ScriptCanvas/Code/Asset/EditorAssetSystemComponent.h b/Gems/ScriptCanvas/Code/Asset/EditorAssetSystemComponent.h index 96e1280cbc..ba4fdf56fc 100644 --- a/Gems/ScriptCanvas/Code/Asset/EditorAssetSystemComponent.h +++ b/Gems/ScriptCanvas/Code/Asset/EditorAssetSystemComponent.h @@ -17,8 +17,6 @@ namespace ScriptCanvasEditor { - class ScriptCanvasAsset; - class EditorAssetSystemComponent : public AZ::Component , public EditorAssetConversionBus::Handler @@ -49,9 +47,8 @@ namespace ScriptCanvasEditor ////////////////////////////////////////////////////////////////////////// // EditorAssetConversionBus::Handler... - AZ::Data::Asset LoadAsset(AZStd::string_view graphPath) override; - AZ::Outcome, AZStd::string> CreateRuntimeAsset(const AZ::Data::Asset& editAsset) override; - AZ::Outcome CreateLuaAsset(const AZ::Data::Asset& editAsset, AZStd::string_view graphPathForRawLuaFile) override; + AZ::Outcome, AZStd::string> CreateRuntimeAsset(const SourceHandle& editAsset) override; + AZ::Outcome CreateLuaAsset(const SourceHandle& editAsset, AZStd::string_view graphPathForRawLuaFile) override; ////////////////////////////////////////////////////////////////////////// ScriptCanvas::AssetRegistry& GetAssetRegistry(); diff --git a/Gems/ScriptCanvas/Code/Builder/ScriptCanvasBuilder.cpp b/Gems/ScriptCanvas/Code/Builder/ScriptCanvasBuilder.cpp index 0eb748b2f1..fbacfd8c32 100644 --- a/Gems/ScriptCanvas/Code/Builder/ScriptCanvasBuilder.cpp +++ b/Gems/ScriptCanvas/Code/Builder/ScriptCanvasBuilder.cpp @@ -6,22 +6,57 @@ * */ +#include #include #include #include -#include +#include +#include +#include #include #include -#include -namespace ScriptCanvasBuilderCpp +namespace BuildVariableOverridesCpp { - void AppendTabs(AZStd::string& result, size_t depth) + enum Version { - for (size_t i = 0; i < depth; ++i) + Original = 1, + EditorAssetRedux, + + // add description above + Current + }; + + bool VersionConverter + ( AZ::SerializeContext& serializeContext + , AZ::SerializeContext::DataElementNode& rootElement) + { + if (rootElement.GetVersion() < BuildVariableOverridesCpp::Version::EditorAssetRedux) { - result += "\t"; + auto sourceIndex = rootElement.FindElement(AZ_CRC_CE("source")); + if (sourceIndex == -1) + { + AZ_Error("ScriptCanvas", false, "BuildVariableOverrides coversion failed: 'source' was missing"); + return false; + } + + auto& sourceElement = rootElement.GetSubElement(sourceIndex); + AZ::Data::Asset asset; + if (!sourceElement.GetData(asset)) + { + AZ_Error("ScriptCanvas", false, "BuildVariableOverrides coversion failed: could not retrieve 'source' data"); + return false; + } + + ScriptCanvasEditor::SourceHandle sourceHandle(nullptr, asset.GetId().m_guid, {}); + if (!rootElement.AddElementWithData(serializeContext, "source", sourceHandle)) + { + AZ_Error("ScriptCanvas", false, "BuildVariableOverrides coversion failed: could not add updated 'source' data"); + return false; + } } + + return true; } } @@ -29,7 +64,7 @@ namespace ScriptCanvasBuilder { void BuildVariableOverrides::Clear() { - m_source.Reset(); + m_source = {}; m_variables.clear(); m_overrides.clear(); m_overridesUnused.clear(); @@ -39,12 +74,20 @@ namespace ScriptCanvasBuilder void BuildVariableOverrides::CopyPreviousOverriddenValues(const BuildVariableOverrides& source) { - auto copyPreviousIfFound = [](ScriptCanvas::GraphVariable& overriddenValue, const AZStd::vector& source) + auto isEqual = [](const ScriptCanvas::GraphVariable& lhs, const ScriptCanvas::GraphVariable& rhs) { - if (auto iter = AZStd::find_if(source.begin(), source.end(), [&overriddenValue](const auto& candidate) { return candidate.GetVariableId() == overriddenValue.GetVariableId(); }); - iter != source.end()) + return (lhs.GetVariableId() == rhs.GetVariableId() && lhs.GetDataType() == rhs.GetDataType()) + || (lhs.GetVariableName() == rhs.GetVariableName() && lhs.GetDataType() == rhs.GetDataType()); + }; + + auto copyPreviousIfFound = [isEqual](ScriptCanvas::GraphVariable& overriddenValue, const AZStd::vector& source) + { + auto iter = AZStd::find_if(source.begin(), source.end() + , [&overriddenValue, isEqual](const auto& candidate) { return isEqual(candidate, overriddenValue); }); + + if (iter != source.end()) { - overriddenValue.DeepCopy(*iter); + overriddenValue.ModDatum().DeepCopyDatum(*iter->GetDatum()); overriddenValue.SetScriptInputControlVisibility(AZ::Edit::PropertyVisibility::Hide); overriddenValue.SetAllowSignalOnChange(false); return true; @@ -64,6 +107,15 @@ namespace ScriptCanvasBuilder } } + for (auto& overriddenValue : m_overridesUnused) + { + if (!copyPreviousIfFound(overriddenValue, source.m_overridesUnused)) + { + // the variable in question may have been previously used, and is now unused, so copy the previous value over + copyPreviousIfFound(overriddenValue, source.m_overrides); + } + } + ////////////////////////////////////////////////////////////////////////// // #functions2 provide an identifier for the node/variable in the source that caused the dependency. the root will not have one. // the above will provide the data to handle the cases where only certain dependency nodes were removed @@ -100,7 +152,7 @@ namespace ScriptCanvasBuilder if (auto serializeContext = azrtti_cast(reflectContext)) { serializeContext->Class() - ->Version(1) + ->Version(BuildVariableOverridesCpp::Version::Current, &BuildVariableOverridesCpp::VersionConverter) ->Field("source", &BuildVariableOverrides::m_source) ->Field("variables", &BuildVariableOverrides::m_variables) ->Field("entityId", &BuildVariableOverrides::m_entityIds) @@ -194,37 +246,14 @@ namespace ScriptCanvasBuilder } } - EditorAssetTree* EditorAssetTree::ModRoot() + void BuildVariableOverrides::SetHandlesToDescription() { - if (!m_parent) + m_source = m_source.Describe(); + + for (auto& dependency : m_dependencies) { - return this; + dependency.SetHandlesToDescription(); } - - return m_parent->ModRoot(); - } - - void EditorAssetTree::SetParent(EditorAssetTree& parent) - { - m_parent = &parent; - } - - AZStd::string EditorAssetTree::ToString(size_t depth) const - { - AZStd::string result; - ScriptCanvasBuilderCpp::AppendTabs(result, depth); - result += m_asset.GetId().ToString(); - result += m_asset.GetHint(); - depth += m_dependencies.empty() ? 0 : 1; - - for (const auto& dependency : m_dependencies) - { - result += "\n"; - ScriptCanvasBuilderCpp::AppendTabs(result, depth); - result += dependency.ToString(depth); - } - - return result; } ScriptCanvas::RuntimeDataOverrides ConvertToRuntime(const BuildVariableOverrides& buildOverrides) @@ -232,7 +261,7 @@ namespace ScriptCanvasBuilder ScriptCanvas::RuntimeDataOverrides runtimeOverrides; runtimeOverrides.m_runtimeAsset = AZ::Data::Asset - (AZ::Data::AssetId(buildOverrides.m_source.GetId().m_guid, AZ_CRC("RuntimeData", 0x163310ae)), azrtti_typeid(), {}); + (AZ::Data::AssetId(buildOverrides.m_source.Id(), AZ_CRC("RuntimeData", 0x163310ae)), azrtti_typeid(), {}); runtimeOverrides.m_runtimeAsset.SetAutoLoadBehavior(AZ::Data::AssetLoadBehavior::PreLoad); runtimeOverrides.m_variableIndices.resize(buildOverrides.m_variables.size()); @@ -295,76 +324,9 @@ namespace ScriptCanvasBuilder return runtimeOverrides; } - AZ::Outcome LoadEditorAssetTree(AZ::Data::AssetId editorAssetId, AZStd::string_view assetHint, EditorAssetTree* parent) + AZ::Outcome ParseEditorAssetTree(const ScriptCanvasEditor::EditorAssetTree& editorAssetTree) { - EditorAssetTree result; - AZ::Data::AssetInfo assetInfo; - AZStd::string watchFolder; - bool resultFound = false; - - if (!AzToolsFramework::AssetSystemRequestBus::FindFirstHandler()) - { - return AZ::Failure(AZStd::string("LoadEditorAssetTree found no handler for AzToolsFramework::AssetSystemRequestBus.")); - } - - AzToolsFramework::AssetSystemRequestBus::BroadcastResult - ( resultFound - , &AzToolsFramework::AssetSystem::AssetSystemRequest::GetSourceInfoBySourceUUID - , editorAssetId.m_guid - , assetInfo - , watchFolder); - - if (!resultFound) - { - return AZ::Failure(AZStd::string::format("LoadEditorAssetTree failed to get engine relative path from %s-%.*s.", editorAssetId.ToString().c_str(), aznumeric_cast(assetHint.size()), assetHint.data())); - } - - AZStd::vector dependentAssets; - - auto filterCB = [&dependentAssets](const AZ::Data::AssetFilterInfo& filterInfo)->bool - { - if (filterInfo.m_assetType == azrtti_typeid()) - { - dependentAssets.push_back(AZ::Data::AssetId(filterInfo.m_assetId.m_guid, 0)); - } - else if (filterInfo.m_assetType == azrtti_typeid()) - { - dependentAssets.push_back(filterInfo.m_assetId); - } - - return true; - }; - - auto loadAssetOutcome = ScriptCanvasBuilder::LoadEditorAsset(assetInfo.m_relativePath, editorAssetId, filterCB); - if (!loadAssetOutcome.IsSuccess()) - { - return AZ::Failure(AZStd::string::format("LoadEditorAssetTree failed to load graph from %s-%s: %s", editorAssetId.ToString().c_str(), assetHint.data(), loadAssetOutcome.GetError().c_str())); - } - - for (auto& dependentAsset : dependentAssets) - { - auto loadDependentOutcome = LoadEditorAssetTree(dependentAsset, "", &result); - if (!loadDependentOutcome.IsSuccess()) - { - return AZ::Failure(AZStd::string::format("LoadEditorAssetTree failed to load dependent graph from %s-%s: %s", editorAssetId.ToString().c_str(), assetHint.data(), loadDependentOutcome.GetError().c_str())); - } - - result.m_dependencies.push_back(loadDependentOutcome.TakeValue()); - } - - if (parent) - { - result.SetParent(*parent); - } - - result.m_asset = loadAssetOutcome.TakeValue(); - - return AZ::Success(result); - } - - AZ::Outcome ParseEditorAssetTree(const EditorAssetTree& editorAssetTree) - { - auto buildEntity = editorAssetTree.m_asset->GetScriptCanvasEntity(); + auto buildEntity = editorAssetTree.m_asset.Get()->GetEntity(); if (!buildEntity) { return AZ::Failure(AZStd::string("No entity from source asset")); @@ -400,9 +362,8 @@ namespace ScriptCanvasBuilder if (!parseDependentOutcome.IsSuccess()) { return AZ::Failure(AZStd::string::format - ( "ParseEditorAssetTree failed to parse dependent graph from %s-%s: %s" - , dependentAsset.m_asset.GetId().ToString().c_str() - , dependentAsset.m_asset.GetHint().c_str() + ( "ParseEditorAssetTree failed to parse dependent graph from %s: %s" + , dependentAsset.m_asset.ToString().c_str() , parseDependentOutcome.GetError().c_str())); } diff --git a/Gems/ScriptCanvas/Code/Builder/ScriptCanvasBuilder.h b/Gems/ScriptCanvas/Code/Builder/ScriptCanvasBuilder.h index f03e78bc3e..1770e48dfa 100644 --- a/Gems/ScriptCanvas/Code/Builder/ScriptCanvasBuilder.h +++ b/Gems/ScriptCanvas/Code/Builder/ScriptCanvasBuilder.h @@ -15,7 +15,7 @@ namespace ScriptCanvasEditor { - class ScriptCanvasAsset; + class EditorAssetTree; } namespace ScriptCanvasBuilder @@ -38,9 +38,11 @@ namespace ScriptCanvasBuilder // use this to initialize the new data, and make sure they have a editor graph variable for proper editor display void PopulateFromParsedResults(ScriptCanvas::Grammar::AbstractCodeModelConstPtr abstractCodeModel, const ScriptCanvas::VariableData& variables); - // #functions2 provide an identifier for the node/variable in the source that caused the dependency. the root will not have one. - AZ::Data::Asset m_source; + void SetHandlesToDescription(); + // #functions2 provide an identifier for the node/variable in the source that caused the dependency. the root will not have one. + ScriptCanvasEditor::SourceHandle m_source; + // all of the variables here are overrides AZStd::vector m_variables; // the values here may or may not be overrides @@ -48,30 +50,11 @@ namespace ScriptCanvasBuilder // these two variable lists are all that gets exposed to the edit context AZStd::vector m_overrides; AZStd::vector m_overridesUnused; - // AZStd::vector m_entityIdRuntimeInputIndices; since all of the entity ids need to go in, they may not need indices AZStd::vector m_dependencies; }; - class EditorAssetTree - { - public: - AZ_CLASS_ALLOCATOR(EditorAssetTree, AZ::SystemAllocator, 0); - - EditorAssetTree* m_parent = nullptr; - AZStd::vector m_dependencies; - AZ::Data::Asset m_asset; - - EditorAssetTree* ModRoot(); - - void SetParent(EditorAssetTree& parent); - - AZStd::string ToString(size_t depth = 0) const; - }; - // copy the variables overridden during editor / prefab build time back to runtime data ScriptCanvas::RuntimeDataOverrides ConvertToRuntime(const BuildVariableOverrides& overrides); - AZ::Outcome LoadEditorAssetTree(AZ::Data::AssetId editorAssetId, AZStd::string_view assetHint, EditorAssetTree* parent = nullptr); - - AZ::Outcome ParseEditorAssetTree(const EditorAssetTree& editorAssetTree); + AZ::Outcome ParseEditorAssetTree(const ScriptCanvasEditor::EditorAssetTree& editorAssetTree); } diff --git a/Gems/ScriptCanvas/Code/Builder/ScriptCanvasBuilderComponent.cpp b/Gems/ScriptCanvas/Code/Builder/ScriptCanvasBuilderComponent.cpp index a37fa47b62..4c80b7ed83 100644 --- a/Gems/ScriptCanvas/Code/Builder/ScriptCanvasBuilderComponent.cpp +++ b/Gems/ScriptCanvas/Code/Builder/ScriptCanvasBuilderComponent.cpp @@ -14,8 +14,7 @@ #include #include #include -#include -#include + #include namespace ScriptCanvasBuilder @@ -48,7 +47,6 @@ namespace ScriptCanvasBuilder SharedHandlers HandleAssetTypes() { SharedHandlers handlers; - handlers.m_editorAssetHandler = RegisterHandler("scriptcanvas", false); handlers.m_subgraphInterfaceHandler = RegisterHandler("scriptcanvas_fn_compiled", true); handlers.m_runtimeAssetHandler = RegisterHandler("scriptcanvas_compiled", true); @@ -98,8 +96,6 @@ namespace ScriptCanvasBuilder builderDescriptor.m_productsToKeepOnFailure[s_scriptCanvasProcessJobKey] = { AZ_CRC("SubgraphInterface", 0xdfe6dc72) }; m_scriptCanvasBuilder.BusConnect(builderDescriptor.m_busId); AssetBuilderSDK::AssetBuilderBus::Broadcast(&AssetBuilderSDK::AssetBuilderBus::Handler::RegisterBuilderInformation, builderDescriptor); - - AzToolsFramework::ToolsAssetSystemBus::Broadcast(&AzToolsFramework::ToolsAssetSystemRequests::RegisterSourceAssetType, azrtti_typeid(), ScriptCanvasEditor::ScriptCanvasAsset::Description::GetFileFilter()); } m_sharedHandlers = HandleAssetTypes(); @@ -111,7 +107,6 @@ namespace ScriptCanvasBuilder { // Finish all queued work AZ::Data::AssetBus::ExecuteQueuedEvents(); - AzToolsFramework::ToolsAssetSystemBus::Broadcast(&AzToolsFramework::ToolsAssetSystemRequests::UnregisterSourceAssetType, azrtti_typeid()); m_scriptCanvasBuilder.BusDisconnect(); m_sharedHandlers.DeleteOwnedHandlers(); } diff --git a/Gems/ScriptCanvas/Code/Builder/ScriptCanvasBuilderWorker.cpp b/Gems/ScriptCanvas/Code/Builder/ScriptCanvasBuilderWorker.cpp index f474c10532..a1a2d1d20f 100644 --- a/Gems/ScriptCanvas/Code/Builder/ScriptCanvasBuilderWorker.cpp +++ b/Gems/ScriptCanvas/Code/Builder/ScriptCanvasBuilderWorker.cpp @@ -18,7 +18,7 @@ #include #include #include -#include +#include #include #include #include @@ -27,12 +27,12 @@ #include #include #include +#include namespace ScriptCanvasBuilder { void Worker::Activate(const AssetHandlers& handlers) { - m_editorAssetHandler = handlers.m_editorAssetHandler; m_runtimeAssetHandler = handlers.m_runtimeAssetHandler; m_subgraphInterfaceHandler = handlers.m_subgraphInterfaceHandler; } @@ -44,54 +44,26 @@ namespace ScriptCanvasBuilder AzFramework::StringFunc::Path::ConstructFull(request.m_watchFolder.data(), request.m_sourceFile.data(), fullPath, false); AzFramework::StringFunc::Path::Normalize(fullPath); - if (!m_editorAssetHandler) + const ScriptCanvasEditor::Graph* sourceGraph = nullptr; + const ScriptCanvas::GraphData* graphData = nullptr; + ScriptCanvasEditor::SourceHandle sourceHandle; + + auto sourceOutcome = ScriptCanvasEditor::LoadFromFile(fullPath); + if (sourceOutcome.IsSuccess()) { - AZ_Error(s_scriptCanvasBuilder, false, R"(CreateJobs for %s failed because the ScriptCanvas Editor Asset handler is missing.)", fullPath.data()); + sourceHandle = sourceOutcome.TakeValue(); + sourceGraph = sourceHandle.Get(); + graphData = sourceGraph->GetGraphDataConst(); + } + else + { + AZ_TracePrintf(s_scriptCanvasBuilder, "Failed to load the file: %s", fullPath.c_str()); + response.m_result = AssetBuilderSDK::CreateJobsResultCode::Failed; } - AZStd::shared_ptr assetDataStream = AZStd::make_shared(); - - AZ::IO::FileIOStream stream(fullPath.c_str(), AZ::IO::OpenMode::ModeRead); - if (!AZ::IO::RetryOpenStream(stream)) - { - AZ_Warning(s_scriptCanvasBuilder, false, "CreateJobs for \"%s\" failed because the source file could not be opened.", fullPath.data()); - return; - } - - // Read the asset into a memory buffer, then hand ownership of the buffer to assetDataStream - { - AZ::IO::FileIOStream ioStream; - if (!ioStream.Open(fullPath.data(), AZ::IO::OpenMode::ModeRead)) - { - AZ_Warning(s_scriptCanvasBuilder, false, "CreateJobs for \"%s\" failed because the source file could not be opened.", fullPath.data()); - return; - } - - AZStd::vector fileBuffer(ioStream.GetLength()); - size_t bytesRead = ioStream.Read(fileBuffer.size(), fileBuffer.data()); - if (bytesRead != ioStream.GetLength()) - { - AZ_Warning(s_scriptCanvasBuilder, false, AZStd::string::format("File failed to read completely: %s", fullPath.data()).c_str()); - return; - } - - assetDataStream->Open(AZStd::move(fileBuffer)); - } - - m_processEditorAssetDependencies.clear(); - - AZ::Data::Asset asset; - asset.Create(AZ::Data::AssetId(AZ::Uuid::CreateRandom())); - if (m_editorAssetHandler->LoadAssetDataFromStream(asset, assetDataStream, {}) != AZ::Data::AssetHandler::LoadResult::LoadComplete) - { - AZ_Warning(s_scriptCanvasBuilder, false, "CreateJobs for \"%s\" failed because the asset data could not be loaded from the file", fullPath.data()); - return; - } - - auto* scriptCanvasEntity = asset.Get()->GetScriptCanvasEntity(); - auto* sourceGraph = AZ::EntityUtils::FindFirstDerivedComponent(scriptCanvasEntity); + // in terms of job creation, assert on anything but smooth sailing from this point AZ_Assert(sourceGraph, "Graph component is missing from entity."); - AZ_Assert(sourceGraph->GetGraphData(), "GraphData is missing from entity"); + AZ_Assert(graphData, "GraphData is missing from entity"); struct EntityIdComparer { @@ -102,7 +74,7 @@ namespace ScriptCanvasBuilder return lhsEntityId < rhsEntityId; } }; - const AZStd::set sortedEntities(sourceGraph->GetGraphData()->m_nodes.begin(), sourceGraph->GetGraphData()->m_nodes.end()); + const AZStd::set sortedEntities(graphData->m_nodes.begin(), graphData->m_nodes.end()); size_t fingerprint = 0; for (const auto& nodeEntity : sortedEntities) @@ -155,7 +127,7 @@ namespace ScriptCanvasBuilder }; AZ_Verify(serializeContext->EnumerateInstanceConst - ( sourceGraph->GetGraphData() + ( graphData , azrtti_typeid() , assetFilter , {} @@ -168,17 +140,6 @@ namespace ScriptCanvasBuilder for (const AssetBuilderSDK::PlatformInfo& info : request.m_enabledPlatforms) { - if (info.HasTag("tools")) - { - AssetBuilderSDK::JobDescriptor copyDescriptor; - copyDescriptor.m_priority = 2; - copyDescriptor.m_critical = true; - copyDescriptor.m_jobKey = s_scriptCanvasCopyJobKey; - copyDescriptor.SetPlatformIdentifier(info.m_identifier.c_str()); - copyDescriptor.m_additionalFingerprintInfo = AZStd::string(GetFingerprintString()).append("|").append(AZStd::to_string(static_cast(fingerprint))); - response.m_createJobOutputs.push_back(copyDescriptor); - } - AssetBuilderSDK::JobDescriptor jobDescriptor; jobDescriptor.m_priority = 2; jobDescriptor.m_critical = true; @@ -244,49 +205,14 @@ namespace ScriptCanvasBuilder return; } - if (!m_editorAssetHandler) - { - AZ_Error(s_scriptCanvasBuilder, false, R"(Exporting of .scriptcanvas for "%s" file failed as no editor asset handler was registered for script canvas. The ScriptCanvas Gem might not be enabled.)", fullPath.data()); - return; - } - if (!m_runtimeAssetHandler) { AZ_Error(s_scriptCanvasBuilder, false, R"(Exporting of .scriptcanvas for "%s" file failed as no runtime asset handler was registered for script canvas.)", fullPath.data()); return; } - AZStd::shared_ptr assetDataStream = AZStd::make_shared(); - - AZ::IO::FileIOStream stream(fullPath.c_str(), AZ::IO::OpenMode::ModeRead); - if (!AZ::IO::RetryOpenStream(stream)) - { - AZ_Warning(s_scriptCanvasBuilder, false, "CreateJobs for \"%s\" failed because the source file could not be opened.", fullPath.data()); - return; - } - - // Read the asset into a memory buffer, then hand ownership of the buffer to assetDataStream - { - AZ::IO::FileIOStream ioStream; - if (!ioStream.Open(fullPath.data(), AZ::IO::OpenMode::ModeRead)) - { - AZ_Warning(s_scriptCanvasBuilder, false, "CreateJobs for \"%s\" failed because the source file could not be opened.", fullPath.data()); - return; - } - AZStd::vector fileBuffer(ioStream.GetLength()); - size_t bytesRead = ioStream.Read(fileBuffer.size(), fileBuffer.data()); - if (bytesRead != ioStream.GetLength()) - { - AZ_Warning(s_scriptCanvasBuilder, false, AZStd::string::format("File failed to read completely: %s", fullPath.data()).c_str()); - return; - } - - assetDataStream->Open(AZStd::move(fileBuffer)); - } - - AZ::Data::Asset asset; - asset.Create(request.m_sourceFileUUID); - if (m_editorAssetHandler->LoadAssetDataFromStream(asset, assetDataStream, nullptr) != AZ::Data::AssetHandler::LoadResult::LoadComplete) + auto loadOutcome = ScriptCanvasEditor::LoadFromFile(request.m_fullPath); + if (!loadOutcome.IsSuccess()) { AZ_Error(s_scriptCanvasBuilder, false, R"(Loading of ScriptCanvas asset for source file "%s" has failed)", fullPath.data()); return; @@ -299,23 +225,11 @@ namespace ScriptCanvasBuilder AzFramework::StringFunc::Path::Join(request.m_tempDirPath.c_str(), fileNameOnly.c_str(), runtimeScriptCanvasOutputPath, true, true); AzFramework::StringFunc::Path::ReplaceExtension(runtimeScriptCanvasOutputPath, ScriptCanvas::RuntimeAsset::GetFileExtension()); - if (request.m_jobDescription.m_jobKey == s_scriptCanvasCopyJobKey) - { - // ScriptCanvas Editor Asset Copy job - // The SubID is zero as this represents the main asset - AssetBuilderSDK::JobProduct jobProduct; - jobProduct.m_productFileName = fullPath; - jobProduct.m_productAssetType = azrtti_typeid(); - jobProduct.m_productSubID = 0; - jobProduct.m_dependenciesHandled = true; - jobProduct.m_dependencies.clear(); - response.m_outputProducts.push_back(AZStd::move(jobProduct)); - response.m_resultCode = AssetBuilderSDK::ProcessJobResult_Success; - } - else - { - AZ::Entity* buildEntity = asset.Get()->GetScriptCanvasEntity(); + auto sourceHandle = loadOutcome.TakeValue(); + if (request.m_jobDescription.m_jobKey == s_scriptCanvasProcessJobKey) + { + AZ::Entity* buildEntity = sourceHandle.Get()->GetEntity(); ProcessTranslationJobInput input; input.assetID = AZ::Data::AssetId(request.m_sourceFileUUID, AZ_CRC("RuntimeData", 0x163310ae)); input.request = &request; @@ -370,7 +284,8 @@ namespace ScriptCanvasBuilder } else { - if (AzFramework::StringFunc::Find(fileNameOnly, s_unitTestParseErrorPrefix) != AZStd::string::npos) + if (!ScriptCanvas::Grammar::g_processingErrorsForUnitTestsEnabled + && AzFramework::StringFunc::Find(fileNameOnly, s_unitTestParseErrorPrefix) != AZStd::string::npos) { response.m_resultCode = AssetBuilderSDK::ProcessJobResult_Success; } diff --git a/Gems/ScriptCanvas/Code/Builder/ScriptCanvasBuilderWorker.h b/Gems/ScriptCanvas/Code/Builder/ScriptCanvasBuilderWorker.h index 668e1a0bcd..142886f98c 100644 --- a/Gems/ScriptCanvas/Code/Builder/ScriptCanvasBuilderWorker.h +++ b/Gems/ScriptCanvas/Code/Builder/ScriptCanvasBuilderWorker.h @@ -36,13 +36,12 @@ namespace ScriptCanvas namespace ScriptCanvasEditor { class Graph; - class ScriptCanvasAsset; + class SourceHandle; } namespace ScriptCanvasBuilder { constexpr const char* s_scriptCanvasBuilder = "ScriptCanvasBuilder"; - constexpr const char* s_scriptCanvasCopyJobKey = "Script Canvas Copy Job"; constexpr const char* s_scriptCanvasProcessJobKey = "Script Canvas Process Job"; constexpr const char* s_unitTestParseErrorPrefix = "LY_SC_UnitTest"; @@ -59,6 +58,8 @@ namespace ScriptCanvasBuilder PrefabIntegration, CorrectGraphVariableVersion, ReflectEntityIdNodes, + FixExecutionStateNodeableConstruction, + SwitchAssetsToBinary, // add new entries above Current, }; @@ -69,7 +70,6 @@ namespace ScriptCanvasBuilder struct AssetHandlers { - AZ::Data::AssetHandler* m_editorAssetHandler = nullptr; AZ::Data::AssetHandler* m_editorFunctionAssetHandler = nullptr; AZ::Data::AssetHandler* m_runtimeAssetHandler = nullptr; AZ::Data::AssetHandler* m_subgraphInterfaceHandler = nullptr; @@ -80,7 +80,6 @@ namespace ScriptCanvasBuilder struct SharedHandlers { - HandlerOwnership m_editorAssetHandler{}; HandlerOwnership m_editorFunctionAssetHandler{}; HandlerOwnership m_runtimeAssetHandler{}; HandlerOwnership m_subgraphInterfaceHandler{}; @@ -122,18 +121,16 @@ namespace ScriptCanvasBuilder } }; - AZ::Outcome, AZStd::string> CreateRuntimeAsset(const AZ::Data::Asset& asset); + AZ::Outcome, AZStd::string> CreateRuntimeAsset(const ScriptCanvasEditor::SourceHandle& asset); AZ::Outcome CompileGraphData(AZ::Entity* scriptCanvasEntity); AZ::Outcome CompileVariableData(AZ::Entity* scriptCanvasEntity); - AZ::Outcome CreateLuaAsset(AZ::Entity* buildEntity, AZ::Data::AssetId scriptAssetId, AZStd::string_view rawLuaFilePath); + AZ::Outcome CreateLuaAsset(const ScriptCanvasEditor::SourceHandle& editAsset, AZStd::string_view rawLuaFilePath); int GetBuilderVersion(); - AZ::Outcome, AZStd::string> LoadEditorAsset(AZStd::string_view graphPath, AZ::Data::AssetId assetId, AZ::Data::AssetFilterCB assetFilterCB = {}); - AZ::Outcome ParseGraph(AZ::Entity& buildEntity, AZStd::string_view graphPath); AZ::Outcome ProcessTranslationJob(ProcessTranslationJobInput& input); @@ -169,7 +166,6 @@ namespace ScriptCanvasBuilder void ShutDown() override {}; private: - AZ::Data::AssetHandler* m_editorAssetHandler = nullptr; AZ::Data::AssetHandler* m_runtimeAssetHandler = nullptr; AZ::Data::AssetHandler* m_subgraphInterfaceHandler = nullptr; diff --git a/Gems/ScriptCanvas/Code/Builder/ScriptCanvasBuilderWorkerUtility.cpp b/Gems/ScriptCanvas/Code/Builder/ScriptCanvasBuilderWorkerUtility.cpp index 7d4cfec909..64e73de9b9 100644 --- a/Gems/ScriptCanvas/Code/Builder/ScriptCanvasBuilderWorkerUtility.cpp +++ b/Gems/ScriptCanvas/Code/Builder/ScriptCanvasBuilderWorkerUtility.cpp @@ -20,7 +20,6 @@ #include #include #include -#include #include #include #include @@ -29,19 +28,20 @@ #include #include #include +#include +#include + namespace ScriptCanvasBuilder { AssetHandlers::AssetHandlers(SharedHandlers& source) - : m_editorAssetHandler(source.m_editorAssetHandler.first) - , m_editorFunctionAssetHandler(source.m_editorFunctionAssetHandler.first) + : m_editorFunctionAssetHandler(source.m_editorFunctionAssetHandler.first) , m_runtimeAssetHandler(source.m_runtimeAssetHandler.first) , m_subgraphInterfaceHandler(source.m_subgraphInterfaceHandler.first) {} void SharedHandlers::DeleteOwnedHandlers() { - DeleteIfOwned(m_editorAssetHandler); DeleteIfOwned(m_editorFunctionAssetHandler); DeleteIfOwned(m_runtimeAssetHandler); DeleteIfOwned(m_subgraphInterfaceHandler); @@ -77,36 +77,23 @@ namespace ScriptCanvasBuilder return ScriptCanvas::Translation::ParseGraph(request); } - AZ::Outcome CreateLuaAsset(AZ::Entity* buildEntity, AZ::Data::AssetId scriptAssetId, AZStd::string_view rawLuaFilePath) + AZ::Outcome CreateLuaAsset(const ScriptCanvasEditor::SourceHandle& editAsset, AZStd::string_view rawLuaFilePath) { AZStd::string fullPath(rawLuaFilePath); AZStd::string fileNameOnly; AzFramework::StringFunc::Path::GetFullFileName(rawLuaFilePath.data(), fileNameOnly); AzFramework::StringFunc::Path::Normalize(fullPath); - auto sourceGraph = PrepareSourceGraph(buildEntity); + auto sourceGraph = PrepareSourceGraph(editAsset.Mod()->GetEntity()); ScriptCanvas::Grammar::Request request; - request.scriptAssetId = scriptAssetId; + request.scriptAssetId = editAsset.Id(); request.graph = sourceGraph; request.name = fileNameOnly; request.rawSaveDebugOutput = ScriptCanvas::Grammar::g_saveRawTranslationOuputToFile; request.printModelToConsole = ScriptCanvas::Grammar::g_printAbstractCodeModel; request.path = fullPath; - bool pathFound = false; - AZStd::string relativePath; - AzToolsFramework::AssetSystemRequestBus::BroadcastResult - ( pathFound - , &AzToolsFramework::AssetSystem::AssetSystemRequest::GetRelativeProductPathFromFullSourceOrProductPath - , fullPath.c_str(), relativePath); - - if (!pathFound) - { - AZ::Failure(AZStd::string::format("Failed to get engine relative path from %s", fullPath.c_str())); - } - - request.namespacePath = relativePath; const ScriptCanvas::Translation::Result translationResult = TranslateToLua(request); auto isSuccessOutcome = translationResult.IsSuccess(ScriptCanvas::Translation::TargetFlags::Lua); @@ -117,7 +104,7 @@ namespace ScriptCanvasBuilder auto& translation = translationResult.m_translations.find(ScriptCanvas::Translation::TargetFlags::Lua)->second; AZ::Data::Asset asset; - scriptAssetId.m_subId = AZ::ScriptAsset::CompiledAssetSubId; + AZ::Data::AssetId scriptAssetId(editAsset.Id(), AZ::ScriptAsset::CompiledAssetSubId); asset.Create(scriptAssetId); auto writeStream = asset.Get()->CreateWriteStream(); @@ -144,12 +131,12 @@ namespace ScriptCanvasBuilder return AZ::Success(result); } - AZ::Outcome, AZStd::string> CreateRuntimeAsset(const AZ::Data::Asset& editAsset) + AZ::Outcome, AZStd::string> CreateRuntimeAsset(const ScriptCanvasEditor::SourceHandle& editAsset) { // Flush asset manager events to ensure no asset references are held by closures queued on Ebuses. AZ::Data::AssetManager::Instance().DispatchEvents(); - auto runtimeAssetId = editAsset.GetId(); + AZ::Data::AssetId runtimeAssetId = editAsset.Id(); runtimeAssetId.m_subId = AZ_CRC("RuntimeData", 0x163310ae); AZ::Data::Asset runtimeAsset; runtimeAsset.Create(runtimeAssetId); @@ -398,45 +385,6 @@ namespace ScriptCanvasBuilder ; } - AZ::Outcome < AZ::Data::Asset, AZStd::string> LoadEditorAsset(AZStd::string_view filePath, AZ::Data::AssetId assetId, AZ::Data::AssetFilterCB assetFilterCB) - { - AZStd::shared_ptr assetDataStream = AZStd::make_shared(); - - // Read the asset into a memory buffer, then hand ownership of the buffer to assetDataStream - { - AZ::IO::FileIOStream stream(filePath.data(), AZ::IO::OpenMode::ModeRead); - if (!AZ::IO::RetryOpenStream(stream)) - { - AZ_Warning(s_scriptCanvasBuilder, false, "CreateJobs for \"%s\" failed because the source file could not be opened.", filePath.data()); - AZ::Failure(AZStd::string::format("Failed to load ScriptCavas asset: %s", filePath.data())); - } - AZStd::vector fileBuffer(stream.GetLength()); - size_t bytesRead = stream.Read(fileBuffer.size(), fileBuffer.data()); - if (bytesRead != stream.GetLength()) - { - AZ_Warning(s_scriptCanvasBuilder, false, "CreateJobs for \"%s\" failed because the source file could not be read.", filePath.data()); - AZ::Failure(AZStd::string::format("Failed to load ScriptCavas asset: %s", filePath.data())); - } - - assetDataStream->Open(AZStd::move(fileBuffer)); - } - - ScriptCanvasEditor::ScriptCanvasAssetHandler editorAssetHandler; - - AZ::SerializeContext* context{}; - AZ::ComponentApplicationBus::BroadcastResult(context, &AZ::ComponentApplicationBus::Events::GetSerializeContext); - - AZ::Data::Asset asset; - asset.Create(assetId); - - if (editorAssetHandler.LoadAssetData(asset, assetDataStream, assetFilterCB) != AZ::Data::AssetHandler::LoadResult::LoadComplete) - { - return AZ::Failure(AZStd::string::format("Failed to load ScriptCavas asset: %s", filePath.data())); - } - - return AZ::Success(asset); - } - ScriptCanvasEditor::Graph* PrepareSourceGraph(AZ::Entity* const buildEntity) { auto sourceGraph = AZ::EntityUtils::FindFirstDerivedComponent(buildEntity); @@ -573,7 +521,7 @@ namespace ScriptCanvasBuilder { AZ::Data::Asset runtimeAsset; runtimeAsset.Create(AZ::Data::AssetId(input.assetID.m_guid, AZ_CRC("SubgraphInterface", 0xdfe6dc72))); - runtimeAsset.Get()->SetData(subgraphInterface); + runtimeAsset.Get()->m_interfaceData = subgraphInterface; AZStd::vector byteBuffer; AZ::IO::ByteContainerStream byteStream(&byteBuffer); @@ -609,7 +557,7 @@ namespace ScriptCanvasBuilder { AZ::Data::Asset runtimeAsset; runtimeAsset.Create(AZ::Data::AssetId(input.assetID.m_guid, AZ_CRC("RuntimeData", 0x163310ae))); - runtimeAsset.Get()->SetData(runtimeData); + runtimeAsset.Get()->m_runtimeData = runtimeData; AZStd::vector byteBuffer; AZ::IO::ByteContainerStream byteStream(&byteBuffer); diff --git a/Gems/ScriptCanvas/Code/CMakeLists.txt b/Gems/ScriptCanvas/Code/CMakeLists.txt index c126d343ed..7be5ec962e 100644 --- a/Gems/ScriptCanvas/Code/CMakeLists.txt +++ b/Gems/ScriptCanvas/Code/CMakeLists.txt @@ -57,6 +57,7 @@ ly_add_target( NAME ScriptCanvas.Static STATIC NAMESPACE Gem FILES_CMAKE + scriptcanvasgem_headers.cmake scriptcanvasgem_common_files.cmake scriptcanvasgem_runtime_asset_files.cmake INCLUDE_DIRECTORIES @@ -89,6 +90,22 @@ ly_add_target( Gem::ScriptCanvasDebugger ) +ly_add_target( + NAME ScriptCanvas.API HEADERONLY + NAMESPACE Gem + FILES_CMAKE + scriptcanvasgem_headers.cmake + COMPILE_DEFINITIONS + INTERFACE + SCRIPTCANVAS_ERRORS_ENABLED + ${SCRIPT_CANVAS_COMMON_DEFINES} + INCLUDE_DIRECTORIES + INTERFACE + . + Include + ${SCRIPT_CANVAS_AUTOGEN_BUILD_DIR} +) + ly_add_target( NAME ScriptCanvas ${PAL_TRAIT_MONOLITHIC_DRIVEN_MODULE_TYPE} NAMESPACE Gem @@ -137,6 +154,7 @@ if(PAL_TRAIT_BUILD_HOST_TOOLS) . Editor/Include Editor/Static/Include + Editor/Assets BUILD_DEPENDENCIES PRIVATE AZ::AzCore @@ -155,6 +173,7 @@ if(PAL_TRAIT_BUILD_HOST_TOOLS) scriptcanvasgem_editor_files.cmake scriptcanvasgem_editor_asset_files.cmake scriptcanvasgem_editor_builder_files.cmake + scriptcanvasgem_editor_tools_files.cmake COMPILE_DEFINITIONS PUBLIC SCRIPTCANVAS_ERRORS_ENABLED @@ -165,6 +184,7 @@ if(PAL_TRAIT_BUILD_HOST_TOOLS) PRIVATE . Editor + Tools Editor/Include ${SCRIPT_CANVAS_AUTOGEN_BUILD_DIR} BUILD_DEPENDENCIES diff --git a/Gems/ScriptCanvas/Code/Editor/Assets/ScriptCanvasAsset.cpp b/Gems/ScriptCanvas/Code/Editor/Assets/ScriptCanvasAsset.cpp deleted file mode 100644 index 18736db12c..0000000000 --- a/Gems/ScriptCanvas/Code/Editor/Assets/ScriptCanvasAsset.cpp +++ /dev/null @@ -1,126 +0,0 @@ -/* - * Copyright (c) Contributors to the Open 3D Engine Project. - * For complete copyright and license terms please see the LICENSE at the root of this distribution. - * - * SPDX-License-Identifier: Apache-2.0 OR MIT - * - */ - - -#include -#include - -#include - -#include -#include -#include -#include - -namespace ScriptCanvas -{ - ScriptCanvasData::ScriptCanvasData(ScriptCanvasData&& other) - : m_scriptCanvasEntity(AZStd::move(other.m_scriptCanvasEntity)) - { - } - - ScriptCanvasData& ScriptCanvasData::operator=(ScriptCanvasData&& other) - { - m_scriptCanvasEntity = AZStd::move(other.m_scriptCanvasEntity); - return *this; - } - - static bool ScriptCanvasDataVersionConverter(AZ::SerializeContext& context, AZ::SerializeContext::DataElementNode& rootDataElementNode) - { - if (rootDataElementNode.GetVersion() == 0) - { - int scriptCanvasEntityIndex = rootDataElementNode.FindElement(AZ_CRC("m_scriptCanvas", 0xfcd20d85)); - if (scriptCanvasEntityIndex == -1) - { - AZ_Error("Script Canvas", false, "Version Converter failed, The Script Canvas Entity is missing"); - return false; - } - - auto scComponentElements = AZ::Utils::FindDescendantElements(context, rootDataElementNode, AZStd::vector{AZ_CRC("m_scriptCanvas", 0xfcd20d85), - AZ_CRC("element", 0x41405e39), AZ_CRC("Components", 0xee48f5fd)}); - if (!scComponentElements.empty()) - { - scComponentElements.front()->AddElementWithData(context, "element", ScriptCanvasEditor::EditorGraphVariableManagerComponent()); - } - } - - if (rootDataElementNode.GetVersion() < 4) - { - auto scEntityElements = AZ::Utils::FindDescendantElements(context, rootDataElementNode, - AZStd::vector{AZ_CRC("m_scriptCanvas", 0xfcd20d85), AZ_CRC("element", 0x41405e39)}); - if (scEntityElements.empty()) - { - AZ_Error("Script Canvas", false, "Version Converter failed, The Script Canvas Entity is missing"); - return false; - } - auto& scEntityDataElement = *scEntityElements.front(); - - AZ::Entity scEntity; - if (!scEntityDataElement.GetData(scEntity)) - { - AZ_Error("Script Canvas", false, "Unable to retrieve entity data from the Data Element"); - return false; - } - - auto graph = AZ::EntityUtils::FindFirstDerivedComponent(&scEntity); - if (!graph) - { - AZ_Error("Script Canvas", false, "Script Canvas graph component could not be found on Script Canvas Entity for ScriptCanvasData version %u", rootDataElementNode.GetVersion()); - return false; - } - auto variableManager = AZ::EntityUtils::FindFirstDerivedComponent(&scEntity); - if (!variableManager) - { - AZ_Error("Script Canvas", false, "Script Canvas variable manager component could not be found on Script Canvas Entity for ScriptCanvasData version %u", rootDataElementNode.GetVersion()); - return false; - } - - variableManager->ConfigureScriptCanvasId(graph->GetScriptCanvasId()); - if (!scEntityDataElement.SetData(context, scEntity)) - { - AZ_Error("Script Canvas", false, "Failed to set converted Script Canvas Entity back on data element node when transitioning from version %u to version 4", rootDataElementNode.GetVersion()); - return false; - } - } - - return true; - } - - - void ScriptCanvasData::Reflect(AZ::ReflectContext* reflectContext) - { - if (auto serializeContext = azrtti_cast(reflectContext)) - { - serializeContext->Class() - ->Version(4, &ScriptCanvasDataVersionConverter) - ->Field("m_scriptCanvas", &ScriptCanvasData::m_scriptCanvasEntity) - ; - } - } - -} - -namespace ScriptCanvasEditor -{ - ScriptCanvas::Graph* ScriptCanvasAsset::GetScriptCanvasGraph() const - { - return AZ::EntityUtils::FindFirstDerivedComponent(m_data->m_scriptCanvasEntity.get()); - } - - ScriptCanvas::ScriptCanvasData& ScriptCanvasAsset::GetScriptCanvasData() - { - AZ_Assert(m_data != nullptr, "ScriptCanvasData not initialized, it must be created on construction"); - return *m_data; - } - - const ScriptCanvas::ScriptCanvasData& ScriptCanvasAsset::GetScriptCanvasData() const - { - AZ_Assert(m_data != nullptr, "ScriptCanvasData not initialized, it must be created on construction"); - return *m_data; - } -} diff --git a/Gems/ScriptCanvas/Code/Editor/Assets/ScriptCanvasAssetHandler.cpp b/Gems/ScriptCanvas/Code/Editor/Assets/ScriptCanvasAssetHandler.cpp deleted file mode 100644 index dea63ab852..0000000000 --- a/Gems/ScriptCanvas/Code/Editor/Assets/ScriptCanvasAssetHandler.cpp +++ /dev/null @@ -1,330 +0,0 @@ -/* - * Copyright (c) Contributors to the Open 3D Engine Project. - * For complete copyright and license terms please see the LICENSE at the root of this distribution. - * - * SPDX-License-Identifier: Apache-2.0 OR MIT - * - */ - -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - -namespace ScriptCanvasAssetHandlerCpp -{ - using namespace ScriptCanvas; - - void CollectNodes(const GraphData::NodeContainer& container, SerializationListeners& listeners) - { - for (auto& nodeEntity : container) - { - if (nodeEntity) - { - if (auto listener = azrtti_cast(AZ::EntityUtils::FindFirstDerivedComponent(nodeEntity))) - { - listeners.push_back(listener); - } - } - } - } -} - -namespace ScriptCanvasEditor -{ - ScriptCanvasAssetHandler::ScriptCanvasAssetHandler(AZ::SerializeContext* context) - { - SetSerializeContext(context); - - AZ::AssetTypeInfoBus::MultiHandler::BusConnect(GetAssetType()); - } - - ScriptCanvasAssetHandler::~ScriptCanvasAssetHandler() - { - AZ::AssetTypeInfoBus::MultiHandler::BusDisconnect(); - } - - AZ::Data::AssetPtr ScriptCanvasAssetHandler::CreateAsset(const AZ::Data::AssetId& id, const AZ::Data::AssetType& type) - { - (void)type; - auto assetData = aznew ScriptCanvasAsset(id); - - AZ::Entity* scriptCanvasEntity = aznew AZ::Entity("Script Canvas Graph"); - SystemRequestBus::Broadcast(&SystemRequests::CreateEditorComponentsOnEntity, scriptCanvasEntity, azrtti_typeid()); - - assetData->SetScriptCanvasEntity(scriptCanvasEntity); - - return assetData; - } - - // Override the stream info to force source assets to load into the Editor instead of cached, processed assets. - void ScriptCanvasAssetHandler::GetCustomAssetStreamInfoForLoad(AZ::Data::AssetStreamInfo& streamInfo) - { - //ScriptCanvas files are source assets and should be placed in a source asset directory - const char* assetPath = streamInfo.m_streamName.c_str(); - if (AzFramework::StringFunc::Path::IsRelative(assetPath)) - { - AZStd::string watchFolder; - bool sourceInfoFound{}; - AZ::Data::AssetInfo assetInfo; - AzToolsFramework::AssetSystemRequestBus::BroadcastResult(sourceInfoFound, &AzToolsFramework::AssetSystemRequestBus::Events::GetSourceInfoBySourcePath, assetPath, assetInfo, watchFolder); - if (sourceInfoFound) - { - AzFramework::StringFunc::Path::Join(watchFolder.data(), assetInfo.m_relativePath.data(), streamInfo.m_streamName); - } - } - } - - AZ::Outcome LoadScriptCanvasDataFromJson - ( ScriptCanvas::ScriptCanvasData& dataTarget - , AZStd::string_view source - , AZ::SerializeContext& serializeContext) - { - namespace JSRU = AZ::JsonSerializationUtils; - using namespace ScriptCanvas; - - AZ::JsonDeserializerSettings settings; - settings.m_serializeContext = &serializeContext; - settings.m_metadata.Create(); - - auto loadResult = JSRU::LoadObjectFromStringByType - ( &dataTarget - , azrtti_typeid() - , source - , &settings); - - if (!loadResult.IsSuccess()) - { - return loadResult; - } - - if (auto graphData = dataTarget.ModGraph()) - { - auto listeners = settings.m_metadata.Find(); - AZ_Assert(listeners, "Failed to find SerializationListeners"); - - ScriptCanvasAssetHandlerCpp::CollectNodes(graphData->GetGraphData()->m_nodes, *listeners); - - for (auto listener : *listeners) - { - listener->OnDeserialize(); - } - } - else - { - return AZ::Failure(AZStd::string("Failed to find graph data after loading source")); - } - - return AZ::Success(); - } - - AZ::Data::AssetHandler::LoadResult ScriptCanvasAssetHandler::LoadAssetData - ( const AZ::Data::Asset& assetTarget - , AZStd::shared_ptr streamSource - , [[maybe_unused]] const AZ::Data::AssetFilterCB& assetLoadFilterCB) - { - namespace JSRU = AZ::JsonSerializationUtils; - using namespace ScriptCanvas; - - auto* scriptCanvasAssetTarget = assetTarget.GetAs(); - AZ_Assert(scriptCanvasAssetTarget, "This should be a ScriptCanvasAsset, as this is the only type we process!"); - - if (m_serializeContext - && streamSource - && scriptCanvasAssetTarget) - { - streamSource->Seek(0U, AZ::IO::GenericStream::ST_SEEK_BEGIN); - auto& scriptCanvasDataTarget = scriptCanvasAssetTarget->GetScriptCanvasData(); - AZStd::vector byteBuffer; - byteBuffer.resize_no_construct(streamSource->GetLength()); - // this duplicate stream is to allow for trying again if the JSON read fails - AZ::IO::ByteContainerStream byteStreamSource(&byteBuffer); - const size_t bytesRead = streamSource->Read(byteBuffer.size(), byteBuffer.data()); - scriptCanvasDataTarget.m_scriptCanvasEntity.reset(nullptr); - - if (bytesRead == streamSource->GetLength()) - { - byteStreamSource.Seek(0U, AZ::IO::GenericStream::ST_SEEK_BEGIN); - AZ::JsonDeserializerSettings settings; - settings.m_serializeContext = m_serializeContext; - settings.m_metadata.Create(); - // attempt JSON deserialization... - auto jsonResult = LoadScriptCanvasDataFromJson - ( scriptCanvasDataTarget - , AZStd::string_view{ byteBuffer.begin(), byteBuffer.size() } - , *m_serializeContext); - - if (jsonResult.IsSuccess()) - { - return AZ::Data::AssetHandler::LoadResult::LoadComplete; - } -#if defined(OBJECT_STREAM_EDITOR_ASSET_LOADING_SUPPORT_ENABLED)//// - else - { - // ...if there is a failure, check if it is saved in the old format - byteStreamSource.Seek(0U, AZ::IO::GenericStream::ST_SEEK_BEGIN); - // tolerate unknown classes in the editor. Let the asset processor warn about bad nodes... - if (AZ::Utils::LoadObjectFromStreamInPlace - ( byteStreamSource - , scriptCanvasDataTarget - , m_serializeContext - , AZ::ObjectStream::FilterDescriptor(assetLoadFilterCB, AZ::ObjectStream::FILTERFLAG_IGNORE_UNKNOWN_CLASSES))) - { - AZ_Warning - ( "ScriptCanvas" - , false - , "ScriptCanvasAssetHandler::LoadAssetData failed to load graph data from JSON, %s, consider converting to JSON" - " by opening it and saving it, or running the graph update tool from the editor0" - , jsonResult.GetError().c_str()); - return AZ::Data::AssetHandler::LoadResult::LoadComplete; - } - } -#else - else - { - AZ_Warning - ( "ScriptCanvas" - , false - , "ScriptCanvasAssetHandler::LoadAssetData failed to load graph data from JSON %s" - , jsonResult.GetError().c_str()"); - } -#endif//defined(OBJECT_STREAM_EDITOR_ASSET_LOADING_SUPPORT_ENABLED) - } - } - - return AZ::Data::AssetHandler::LoadResult::Error; - } - - bool ScriptCanvasAssetHandler::SaveAssetData(const AZ::Data::Asset& asset, AZ::IO::GenericStream* stream) - { - return SaveAssetData(asset.GetAs(), stream); - } - - bool ScriptCanvasAssetHandler::SaveAssetData(const ScriptCanvasAsset* assetData, AZ::IO::GenericStream* stream) - { - return SaveAssetData(assetData, stream, AZ::DataStream::ST_XML); - } - - bool ScriptCanvasAssetHandler::SaveAssetData - ( const ScriptCanvasAsset* assetData - , AZ::IO::GenericStream* stream - , [[maybe_unused]] AZ::DataStream::StreamType streamType) - { - namespace JSRU = AZ::JsonSerializationUtils; - using namespace ScriptCanvas; - - if (m_serializeContext - && stream - && assetData - && assetData->GetScriptCanvasGraph() - && assetData->GetScriptCanvasGraph()->GetGraphData()) - { - auto graphData = assetData->GetScriptCanvasGraph()->GetGraphData(); - AZ::JsonSerializerSettings settings; - settings.m_metadata.Create(); - auto listeners = settings.m_metadata.Find(); - AZ_Assert(listeners, "Failed to create SerializationListeners"); - ScriptCanvasAssetHandlerCpp::CollectNodes(graphData->m_nodes, *listeners); - settings.m_keepDefaults = false; - settings.m_serializeContext = m_serializeContext; - - for (auto listener : *listeners) - { - listener->OnSerialize(); - } - - return JSRU::SaveObjectToStream(&assetData->GetScriptCanvasData(), *stream, nullptr, &settings).IsSuccess(); - } - else - { - AZ_Error("ScriptCanvas", false, "Saving ScriptCavas assets in the handler requires a valid IO stream, " - "asset pointer, and serialize context"); - return false; - } - } - - void ScriptCanvasAssetHandler::DestroyAsset(AZ::Data::AssetPtr ptr) - { - delete ptr; - } - - AZ::SerializeContext* ScriptCanvasAssetHandler::GetSerializeContext() const - { - return m_serializeContext; - } - - void ScriptCanvasAssetHandler::SetSerializeContext(AZ::SerializeContext* context) - { - m_serializeContext = context; - - if (m_serializeContext == nullptr) - { - // use the default app serialize context - EBUS_EVENT_RESULT(m_serializeContext, AZ::ComponentApplicationBus, GetSerializeContext); - if (!m_serializeContext) - { - AZ_Error("Script Canvas", false, "ScriptCanvasAssetHandler: No serialize context provided! " - "We will not be able to process Graph Asset type"); - } - } - } - - void ScriptCanvasAssetHandler::GetHandledAssetTypes(AZStd::vector& assetTypes) - { - assetTypes.push_back(GetAssetType()); - } - - AZ::Data::AssetType ScriptCanvasAssetHandler::GetAssetType() const - { - return ScriptCanvasAssetHandler::GetAssetTypeStatic(); - } - - const char* ScriptCanvasAssetHandler::GetAssetTypeDisplayName() const - { - return "Script Canvas"; - } - - AZ::Data::AssetType ScriptCanvasAssetHandler::GetAssetTypeStatic() - { - return azrtti_typeid(); - } - - void ScriptCanvasAssetHandler::GetAssetTypeExtensions(AZStd::vector& extensions) - { - ScriptCanvasAsset::Description description; - extensions.push_back(description.GetExtensionImpl()); - } - - AZ::Uuid ScriptCanvasAssetHandler::GetComponentTypeId() const - { - return azrtti_typeid(); - } - - const char* ScriptCanvasAssetHandler::GetGroup() const - { - return ScriptCanvas::AssetDescription::GetGroup(); - } - - const char* ScriptCanvasAssetHandler::GetBrowserIcon() const - { - return ScriptCanvas::AssetDescription::GetIconPath(); - } -} diff --git a/Gems/ScriptCanvas/Code/Editor/Assets/ScriptCanvasAssetHelpers.cpp b/Gems/ScriptCanvas/Code/Editor/Assets/ScriptCanvasAssetHelpers.cpp index 884fa2d5c9..44e529249c 100644 --- a/Gems/ScriptCanvas/Code/Editor/Assets/ScriptCanvasAssetHelpers.cpp +++ b/Gems/ScriptCanvas/Code/Editor/Assets/ScriptCanvasAssetHelpers.cpp @@ -8,7 +8,7 @@ #include -#include + #include namespace ScriptCanvasEditor @@ -150,11 +150,7 @@ namespace ScriptCanvasEditor bool IsValidSourceFile(const AZStd::string& filePath, [[maybe_unused]] ScriptCanvas::ScriptCanvasId scriptCanvasId) { - ScriptCanvasAssetDescription assetDescription; - return AZ::StringFunc::EndsWith(filePath, assetDescription.GetExtensionImpl(), false); - { - return true; - } + return AZ::StringFunc::EndsWith(filePath, ScriptCanvasEditor::SourceDescription::GetFileExtension(), false); } } } diff --git a/Gems/ScriptCanvas/Code/Editor/Assets/ScriptCanvasAssetHolder.cpp b/Gems/ScriptCanvas/Code/Editor/Assets/ScriptCanvasAssetHolder.cpp deleted file mode 100644 index a42a9bad48..0000000000 --- a/Gems/ScriptCanvas/Code/Editor/Assets/ScriptCanvasAssetHolder.cpp +++ /dev/null @@ -1,231 +0,0 @@ -/* - * Copyright (c) Contributors to the Open 3D Engine Project. - * For complete copyright and license terms please see the LICENSE at the root of this distribution. - * - * SPDX-License-Identifier: Apache-2.0 OR MIT - * - */ - -#include - -#include - -#include -#include -#include -#include -#include -#include - -#include -#include -#include -#include - -#include -#include -#include -#include - -namespace ScriptCanvasEditor -{ - //========================================================================= - void ScriptCanvasAssetHolder::Reflect(AZ::ReflectContext* context) - { - if (auto serializeContext = azrtti_cast(context)) - { - serializeContext->Class() - ->Version(1) - ->Field("m_asset", &ScriptCanvasAssetHolder::m_scriptCanvasAsset) - ; - - if (AZ::EditContext* editContext = serializeContext->GetEditContext()) - { - editContext->Class("Script Canvas", "Script Canvas Asset Holder") - ->ClassElement(AZ::Edit::ClassElements::EditorData, "") - ->DataElement(AZ::Edit::UIHandlers::Default, &ScriptCanvasAssetHolder::m_scriptCanvasAsset, "Script Canvas Asset", "Script Canvas asset associated with this component") - ->Attribute(AZ::Edit::Attributes::ChangeNotify, &ScriptCanvasAssetHolder::OnScriptChanged) - ->Attribute("BrowseIcon", ":/stylesheet/img/UI20/browse-edit-select-files.svg") - ->Attribute("EditButton", "") - ->Attribute("EditDescription", "Open in Script Canvas Editor") - ->Attribute("EditCallback", &ScriptCanvasAssetHolder::LaunchScriptCanvasEditor) - ->Attribute(AZ::Edit::Attributes::ShowProductAssetFileName, false) - ; - } - } - } - - ScriptCanvasAssetHolder::~ScriptCanvasAssetHolder() - { - } - - void ScriptCanvasAssetHolder::Init(AZ::EntityId ownerId, AZ::ComponentId componentId) - { - m_ownerId = AZStd::make_pair(ownerId, componentId); - - if (!m_scriptCanvasAsset || !m_scriptCanvasAsset.IsReady()) - { - AssetTrackerNotificationBus::Handler::BusConnect(m_scriptCanvasAsset.GetId()); - - Callbacks::OnAssetReadyCallback onAssetReady = [](ScriptCanvasMemoryAsset& asset) - { - AssetHelpers::DumpAssetInfo(asset.GetFileAssetId(), "ScriptCanvasAssetHolder::Init"); - }; - AssetTrackerRequestBus::Broadcast(&AssetTrackerRequests::Load, m_scriptCanvasAsset.GetId(), azrtti_typeid(), onAssetReady); - } - } - - void ScriptCanvasAssetHolder::LaunchScriptCanvasEditor(const AZ::Data::AssetId&, const AZ::Data::AssetType&) const - { - OpenEditor(); - } - - void ScriptCanvasAssetHolder::OpenEditor() const - { - AzToolsFramework::OpenViewPane(LyViewPane::ScriptCanvas); - - AZ::Outcome openOutcome = AZ::Failure(AZStd::string()); - - if (m_scriptCanvasAsset.IsReady()) - { - GeneralRequestBus::BroadcastResult(openOutcome, &GeneralRequests::OpenScriptCanvasAsset, m_scriptCanvasAsset.GetId(), -1); - - if (!openOutcome) - { - AZ_Warning("Script Canvas", openOutcome, "%s", openOutcome.GetError().data()); - } - } - else if (m_ownerId.first.IsValid()) - { - AzToolsFramework::EntityIdList selectedEntityIds; - AzToolsFramework::ToolsApplicationRequestBus::BroadcastResult(selectedEntityIds, &AzToolsFramework::ToolsApplicationRequests::GetSelectedEntities); - - // Going to bypass the multiple selected entities flow for right now. - if (selectedEntityIds.size() == 1) - { - GeneralRequestBus::Broadcast(&GeneralRequests::CreateScriptCanvasAssetFor, m_ownerId); - } - } - } - - ScriptCanvas::ScriptCanvasId ScriptCanvasAssetHolder::GetScriptCanvasId() const - { - ScriptCanvas::ScriptCanvasId graphId; - if (m_scriptCanvasAsset.IsReady()) - { - ScriptCanvas::SystemRequestBus::BroadcastResult(graphId, &ScriptCanvas::SystemRequests::FindScriptCanvasId, m_scriptCanvasAsset.Get()->GetScriptCanvasEntity()); - } - - return graphId; - } - - void ScriptCanvasAssetHolder::SetScriptChangedCB(const ScriptChangedCB& scriptChangedCB) - { - m_scriptNotifyCallback = scriptChangedCB; - } - - void ScriptCanvasAssetHolder::Load(AZ::Data::AssetId fileAssetId) - { - m_scriptCanvasAsset = AZ::Data::AssetManager::Instance().FindAsset(fileAssetId, AZ::Data::AssetLoadBehavior::Default); - - if (!m_scriptCanvasAsset || !m_scriptCanvasAsset.IsReady()) - { - m_scriptCanvasAsset = AZ::Data::AssetManager::Instance().GetAsset(fileAssetId, azrtti_typeid(), AZ::Data::AssetLoadBehavior::Default); - m_triggeredLoad = true; - - AZ::Data::AssetBus::Handler::BusDisconnect(); - AZ::Data::AssetBus::Handler::BusConnect(fileAssetId); - } - else if (m_memoryScriptCanvasAsset.Get() == nullptr) - { - m_triggeredLoad = false; - LoadMemoryAsset(fileAssetId); - } - } - - void ScriptCanvasAssetHolder::LoadMemoryAsset(AZ::Data::AssetId fileAssetId) - { - Callbacks::OnAssetReadyCallback onAssetReady = [this](ScriptCanvasMemoryAsset& asset) - { - m_memoryScriptCanvasAsset = asset.GetAsset(); - AssetHelpers::DumpAssetInfo(asset.GetFileAssetId(), "ScriptCanvasAssetHolder::Load onAssetReady"); - }; - - AssetTrackerRequestBus::Broadcast(&AssetTrackerRequests::Load, fileAssetId, azrtti_typeid(), onAssetReady); - } - - void ScriptCanvasAssetHolder::OnAssetReady(AZ::Data::Asset asset) - { - AZ::Data::AssetBus::Handler::BusDisconnect(); - LoadMemoryAsset(asset.GetId()); - } - - AZ::u32 ScriptCanvasAssetHolder::OnScriptChanged() - { - AssetTrackerNotificationBus::Handler::BusDisconnect(); - - if (m_scriptCanvasAsset.GetId().IsValid()) - { - AssetTrackerNotificationBus::Handler::BusConnect(m_scriptCanvasAsset.GetId()); - Load(m_scriptCanvasAsset.GetId()); - } - else - { - m_scriptCanvasAsset = {}; - m_memoryScriptCanvasAsset = {}; - } - - if (m_scriptNotifyCallback) - { - m_scriptNotifyCallback(m_scriptCanvasAsset.GetId()); - } - - return AZ::Edit::PropertyRefreshLevels::EntireTree; - } - - void ScriptCanvasAssetHolder::OnAssetReady(const ScriptCanvasMemoryAsset::pointer asset) - { - if (asset->GetFileAssetId() == m_scriptCanvasAsset.GetId()) - { - AssetTrackerNotificationBus::Handler::BusDisconnect(m_scriptCanvasAsset.GetId()); - - m_scriptCanvasAsset = AZ::Data::AssetManager::Instance().FindAsset(asset->GetFileAssetId(), AZ::Data::AssetLoadBehavior::Default); - m_memoryScriptCanvasAsset = asset->GetAsset(); - - if (m_triggeredLoad && m_scriptNotifyCallback) - { - m_triggeredLoad = false; - m_scriptNotifyCallback(m_scriptCanvasAsset.GetId()); - } - } - } - - void ScriptCanvasAssetHolder::SetAsset(AZ::Data::AssetId fileAssetId) - { - AZ::Data::AssetBus::Handler::BusDisconnect(); - AssetTrackerNotificationBus::Handler::BusDisconnect(); - - Load(fileAssetId); - - if (m_scriptCanvasAsset) - { - AssetTrackerNotificationBus::Handler::BusConnect(m_scriptCanvasAsset.GetId()); - } - } - - const AZ::Data::AssetType& ScriptCanvasAssetHolder::GetAssetType() const - { - return m_scriptCanvasAsset.GetType(); - } - - void ScriptCanvasAssetHolder::ClearAsset() - { - m_scriptCanvasAsset = {}; - m_memoryScriptCanvasAsset = {}; - } - - AZ::Data::AssetId ScriptCanvasAssetHolder::GetAssetId() const - { - return m_scriptCanvasAsset.GetId(); - } -} diff --git a/Gems/ScriptCanvas/Code/Editor/Assets/ScriptCanvasAssetHolder.h b/Gems/ScriptCanvas/Code/Editor/Assets/ScriptCanvasAssetHolder.h deleted file mode 100644 index bc2f50144a..0000000000 --- a/Gems/ScriptCanvas/Code/Editor/Assets/ScriptCanvasAssetHolder.h +++ /dev/null @@ -1,99 +0,0 @@ -/* - * Copyright (c) Contributors to the Open 3D Engine Project. - * For complete copyright and license terms please see the LICENSE at the root of this distribution. - * - * SPDX-License-Identifier: Apache-2.0 OR MIT - * - */ - -#pragma once - -#include -#include -#include - -#include -#include - -namespace ScriptCanvasEditor -{ - class ScriptCanvasAsset; - - /*! ScriptCanvasAssetHolder - Wraps a ScriptCanvasAsset reference and registers for the individual AssetBus events - for saving, loading and unloading the asset. - The ScriptCanvasAsset Holder contains functionality for activating the ScriptCanvasEntity stored on the reference asset - as well as attempting to open the ScriptCanvasAsset within the ScriptCanvas Editor. - It also provides the EditContext reflection for opening the asset in the ScriptCanvas Editor via a button - */ - class ScriptCanvasAssetHolder - : AssetTrackerNotificationBus::Handler - , AZ::Data::AssetBus::Handler - { - public: - AZ_RTTI(ScriptCanvasAssetHolder, "{3E80CEE3-2932-4DC1-AADF-398FDDC6DEFE}"); - AZ_CLASS_ALLOCATOR(ScriptCanvasAssetHolder, AZ::SystemAllocator, 0); - - using ScriptChangedCB = AZStd::function; - - ScriptCanvasAssetHolder() = default; - ~ScriptCanvasAssetHolder() override; - - static void Reflect(AZ::ReflectContext* context); - - void Init(AZ::EntityId ownerId = AZ::EntityId(), AZ::ComponentId componentId = AZ::ComponentId()); - - const AZ::Data::AssetType& GetAssetType() const; - void ClearAsset(); - - void SetAsset(AZ::Data::AssetId fileAssetId); - AZ::Data::AssetId GetAssetId() const; - - ScriptCanvas::ScriptCanvasId GetScriptCanvasId() const; - - void LaunchScriptCanvasEditor(const AZ::Data::AssetId&, const AZ::Data::AssetType&) const; - void OpenEditor() const; - - void SetScriptChangedCB(const ScriptChangedCB&); - void Load(AZ::Data::AssetId fileAssetId); - void LoadMemoryAsset(AZ::Data::AssetId fileAssetId); - - //! AZ::Data::AssetBus - void OnAssetReady(AZ::Data::Asset asset) override; - //// - - const AZStd::string_view GetAssetHint() const - { - if (m_scriptCanvasAsset) - { - return m_scriptCanvasAsset.GetHint().c_str(); - } - - if (m_memoryScriptCanvasAsset) - { - return m_memoryScriptCanvasAsset.GetHint().c_str(); - } - - return ""; - } - - protected: - - //===================================================================== - // AssetTrackerNotificationBus - void OnAssetReady(const ScriptCanvasMemoryAsset::pointer asset) override; - //===================================================================== - - //! Reloads the Script From the AssetData if it has changed - AZ::u32 OnScriptChanged(); - - AZ::Data::Asset m_scriptCanvasAsset; - AZ::Data::Asset m_memoryScriptCanvasAsset; - - TypeDefs::EntityComponentId m_ownerId; // Id of Entity which stores this AssetHolder object - ScriptChangedCB m_scriptNotifyCallback; - - bool m_triggeredLoad = false; - }; - -} diff --git a/Gems/ScriptCanvas/Code/Editor/Assets/ScriptCanvasAssetTracker.cpp b/Gems/ScriptCanvas/Code/Editor/Assets/ScriptCanvasAssetTracker.cpp deleted file mode 100644 index 6d9799ee7f..0000000000 --- a/Gems/ScriptCanvas/Code/Editor/Assets/ScriptCanvasAssetTracker.cpp +++ /dev/null @@ -1,577 +0,0 @@ -/* - * Copyright (c) Contributors to the Open 3D Engine Project. - * For complete copyright and license terms please see the LICENSE at the root of this distribution. - * - * SPDX-License-Identifier: Apache-2.0 OR MIT - * - */ - -#include "ScriptCanvasAssetTracker.h" - -#include -#include -#include -#include - -#include -#include -#include -#include - -#include -#include - -#include - -#include -#include - -#include - -namespace ScriptCanvasEditor -{ - ///////////////// - // AssetTracker - ///////////////// - - AZ::Data::AssetId AssetTracker::Create(AZStd::string_view assetAbsolutePath, AZ::Data::AssetType assetType, Callbacks::OnAssetCreatedCallback onAssetCreatedCallback) - { - AZ::Data::AssetId newAssetId = AZ::Uuid::CreateRandom(); - - MemoryAssetMapIterator iterator = m_assetsInUse.emplace(newAssetId, AZStd::make_shared()); - - ScriptCanvasMemoryAsset::pointer memoryAsset = iterator.first->second; - - memoryAsset->Create(newAssetId, assetAbsolutePath, assetType, onAssetCreatedCallback); - - return newAssetId; - } - - bool AssetTracker::IsSaving(AZ::Data::AssetId assetId) const - { - assetId = CheckAssetId(assetId); - return m_savingAssets.find(assetId) != m_savingAssets.end(); - } - - void AssetTracker::Save(AZ::Data::AssetId assetId, Callbacks::OnSave onSaveCallback) - { - SaveAs(assetId, {}, onSaveCallback); - } - - void AssetTracker::SaveAs(AZ::Data::AssetId assetId, const AZStd::string& path, Callbacks::OnSave onSaveCallback) - { - auto assetIter = m_assetsInUse.find(assetId); - - if (assetIter != m_assetsInUse.end()) - { - auto onSave = [this, assetId, onSaveCallback](bool saveSuccess, AZ::Data::AssetPtr asset, AZ::Data::AssetId previousFileAssetId) - { - AZ::Data::AssetId signalId = assetId; - AZ::Data::AssetId fileAssetId = asset->GetId(); - - // If there is a previous file Id is valid, it means this is a save-as operation and we need to remap the tracking. - if (previousFileAssetId.IsValid()) - { - if (saveSuccess) - { - fileAssetId = m_assetsInUse[assetId]->GetFileAssetId(); - m_remappedAsset[asset->GetId()] = fileAssetId; - - // Erase the asset first so the smart pointer can deal with it's things. - m_assetsInUse.erase(fileAssetId); - - // Then perform the insert once we know nothing will attempt to delete this while we are operating on it. - m_assetsInUse[fileAssetId] = m_assetsInUse[assetId]; - m_assetsInUse.erase(assetId); - } - - m_savingAssets.erase(assetId); - m_savingAssets.insert(fileAssetId); - - signalId = fileAssetId; - - if (m_queuedCloses.erase(assetId)) - { - m_queuedCloses.insert(fileAssetId); - } - - auto assetIter = m_assetsInUse.find(fileAssetId); - - if (assetIter != m_assetsInUse.end()) - { - AZStd::invoke(onSaveCallback, saveSuccess, m_assetsInUse[fileAssetId]->GetAsset().Get(), previousFileAssetId); - } - else - { - AZ_Error("ScriptCanvas", !saveSuccess, "Unable to find Memory Asset for Asset(%s)", fileAssetId.ToString().c_str()); - AZStd::invoke(onSaveCallback, saveSuccess, asset, previousFileAssetId); - } - } - else - { - if (saveSuccess) - { - // This should be the case when we get a save as from a newly created file. - // - // If we find the 'memory' asset id in the assets in use. This means this was a new file that was saved. - // To maintain all of the look-up stuff, we need to treat this like a remapping stage. - auto assetInUseIter = m_assetsInUse.find(assetId); - if (assetInUseIter != m_assetsInUse.end()) - { - fileAssetId = assetInUseIter->second->GetFileAssetId(); - - if (assetId != fileAssetId) - { - m_remappedAsset[assetId] = fileAssetId; - - m_assetsInUse.erase(fileAssetId); - m_assetsInUse[fileAssetId] = AZStd::move(assetInUseIter->second); - m_assetsInUse.erase(assetId); - - m_savingAssets.erase(assetId); - m_savingAssets.insert(fileAssetId); - - if (m_queuedCloses.erase(assetId)) - { - m_queuedCloses.insert(fileAssetId); - } - } - } - else - { - fileAssetId = CheckAssetId(fileAssetId); - } - - signalId = fileAssetId; - } - - if (onSaveCallback) - { - AZStd::invoke(onSaveCallback, saveSuccess, m_assetsInUse[signalId]->GetAsset().Get(), previousFileAssetId); - } - - AssetTrackerNotificationBus::Broadcast(&AssetTrackerNotifications::OnAssetSaved, m_assetsInUse[signalId], saveSuccess); - } - - SignalSaveComplete(signalId); - }; - - m_savingAssets.insert(assetId); - assetIter->second->SaveAs(path, onSave); - } - else - { - AZ_Assert(false, "Cannot SaveAs into an existing AssetId"); - } - } - - bool AssetTracker::Load(AZ::Data::AssetId fileAssetId, AZ::Data::AssetType assetType, Callbacks::OnAssetReadyCallback onAssetReadyCallback) - { - if (!fileAssetId.IsValid()) - { - return false; - } - - auto assetIter = m_assetsInUse.find(fileAssetId); - - if (assetIter != m_assetsInUse.end()) - { - if (!assetIter->second->IsSourceInError()) - { - if (onAssetReadyCallback) - { - // The asset is already loaded and tracked - AZStd::invoke(onAssetReadyCallback, *m_assetsInUse[fileAssetId]); - AssetTrackerNotificationBus::Event(fileAssetId, &AssetTrackerNotifications::OnAssetReady, m_assetsInUse[fileAssetId]); - } - - return true; - } - else - { - m_assetsInUse.erase(assetIter); - } - } - - m_assetsInUse[fileAssetId] = AZStd::make_shared(); - - m_onAssetReadyCallback = onAssetReadyCallback; - - auto onReady = [this, fileAssetId](ScriptCanvasMemoryAsset& asset) - { - m_remappedAsset[asset.GetId()] = fileAssetId; - - if (m_onAssetReadyCallback) - { - AZStd::invoke(m_onAssetReadyCallback, *m_assetsInUse[fileAssetId]); - } - }; - - // If we failed to load the asset, signal back as much - if (!m_assetsInUse[fileAssetId]->Load(fileAssetId, assetType, onReady)) - { - m_assetsInUse.erase(fileAssetId); - return false; - } - - return true; - } - - void AssetTracker::Close(AZ::Data::AssetId assetId) - { - assetId = CheckAssetId(assetId); - - if (m_assetsInUse.find(assetId) == m_assetsInUse.end()) - { - return; - } - - if (m_savingAssets.find(assetId) == m_savingAssets.end()) - { - m_assetsInUse.erase(assetId); - } - else - { - m_queuedCloses.insert(assetId); - } - } - - void AssetTracker::ClearView(AZ::Data::AssetId assetId) - { - assetId = CheckAssetId(assetId); - - if (m_assetsInUse.find(assetId) != m_assetsInUse.end()) - { - m_assetsInUse[assetId]->ClearView(); - } - } - - void AssetTracker::UntrackAsset(AZ::Data::AssetId assetId) - { - assetId = CheckAssetId(assetId); - m_assetsInUse.erase(assetId); - } - - void AssetTracker::CreateView(AZ::Data::AssetId assetId, QWidget* parent) - { - assetId = CheckAssetId(assetId); - - if (m_assetsInUse.find(assetId) != m_assetsInUse.end()) - { - m_assetsInUse[assetId]->CreateView(parent); - } - } - - ScriptCanvasMemoryAsset::pointer AssetTracker::GetAsset(AZ::Data::AssetId assetId) - { - if (!assetId.IsValid()) - { - return nullptr; - } - - assetId = CheckAssetId(assetId); - - if (m_assetsInUse.find(assetId) == m_assetsInUse.end()) - { - auto asset = AZ::Data::AssetManager::Instance().FindAsset(assetId, AZ::Data::AssetLoadBehavior::Default); - if (asset) - { - auto insertResult = m_assetsInUse.emplace(AZStd::make_pair(assetId, AZStd::make_shared())); - - auto onReady = [this, assetId](ScriptCanvasMemoryAsset& asset) - { - m_remappedAsset[asset.GetId()] = assetId; - }; - - insertResult.first->second->Load(assetId, AZ::Data::AssetType::CreateNull(), onReady); - insertResult.first->second->ActivateAsset(); - - return insertResult.first->second; - } - - // Handle the weird case of saving out a file you can't load because of pathing issues. - for (auto assetPair : m_assetsInUse) - { - if (assetPair.second->GetFileAssetId() == assetId) - { - return assetPair.second; - } - } - - return nullptr; - } - - if (m_assetsInUse.find(assetId) != m_assetsInUse.end()) - { - return m_assetsInUse[assetId]; - } - - return nullptr; - } - - AZ::Data::AssetId AssetTracker::GetAssetId(ScriptCanvas::ScriptCanvasId scriptCanvasSceneId) - { - for (const auto& asset : m_assetsInUse) - { - if (asset.second && asset.second->GetScriptCanvasId() == scriptCanvasSceneId) - { - AZ::Data::AssetId assetId = asset.second->GetAsset().GetId(); - return assetId; - } - } - return {}; - } - - AZ::Data::AssetType AssetTracker::GetAssetType(ScriptCanvas::ScriptCanvasId scriptCanvasSceneId) - { - for (const auto& asset : m_assetsInUse) - { - if (asset.second && asset.second->GetScriptCanvasId() == scriptCanvasSceneId) - { - return asset.second->GetAssetType(); - } - } - return AZ::Data::AssetType::CreateNull(); - } - - - ScriptCanvas::ScriptCanvasId AssetTracker::GetScriptCanvasId(AZ::Data::AssetId assetId) - { - assetId = CheckAssetId(assetId); - - if (m_assetsInUse.find(assetId) != m_assetsInUse.end()) - { - return m_assetsInUse[assetId]->GetScriptCanvasId(); - } - return ScriptCanvas::ScriptCanvasId(); - } - - AZ::EntityId AssetTracker::GetGraphCanvasId(AZ::EntityId scriptCanvasEntityId) - { - if (scriptCanvasEntityId.IsValid()) - { - for (auto& asset : m_assetsInUse) - { - if (asset.second && asset.second->GetScriptCanvasId() == scriptCanvasEntityId) - { - return asset.second->GetGraphId(); - } - } - } - - return AZ::EntityId(); - } - - ScriptCanvas::ScriptCanvasId AssetTracker::GetScriptCanvasIdFromGraphId(AZ::EntityId graphId) - { - if (graphId.IsValid()) - { - for (auto& asset : m_assetsInUse) - { - if (asset.second && asset.second->GetGraphId() == graphId) - { - return asset.second->GetScriptCanvasId(); - } - } - } - return AZ::EntityId(); - } - - ScriptCanvas::ScriptCanvasId AssetTracker::GetGraphId(AZ::Data::AssetId assetId) - { - if (assetId.IsValid()) - { - assetId = CheckAssetId(assetId); - - auto assetIter = m_assetsInUse.find(assetId); - if (assetIter != m_assetsInUse.end()) - { - return assetIter->second->GetGraphId(); - } - } - - return ScriptCanvas::ScriptCanvasId(); - } - - AZStd::string AssetTracker::GetTabName(AZ::Data::AssetId assetId) - { - assetId = CheckAssetId(assetId); - - if (m_assetsInUse.find(assetId) != m_assetsInUse.end()) - { - return m_assetsInUse[assetId]->GetTabName(); - } - - return {}; - } - - ScriptCanvasEditor::Tracker::ScriptCanvasFileState AssetTracker::GetFileState(AZ::Data::AssetId assetId) - { - assetId = CheckAssetId(assetId); - - if (m_assetsInUse.find(assetId) != m_assetsInUse.end()) - { - return m_assetsInUse[assetId]->GetFileState(); - } - - return Tracker::ScriptCanvasFileState::INVALID; - } - - void AssetTracker::SignalSaveComplete(const AZ::Data::AssetId& fileAssetId) - { - size_t eraseCount = m_savingAssets.erase(fileAssetId); - - if (eraseCount > 0) - { - if (m_queuedCloses.erase(fileAssetId) > 0) - { - Close(fileAssetId); - } - } - } - - AZ::Data::AssetId AssetTracker::CheckAssetId(AZ::Data::AssetId assetId) const - { - auto remappedIter = m_remappedAsset.find(assetId); - if (remappedIter != m_remappedAsset.end()) - { - assetId = remappedIter->second; - } - return assetId; - } - - ScriptCanvasEditor::ScriptCanvasAssetHandler* AssetTracker::GetAssetHandlerForType(AZ::Data::AssetType assetType) - { - ScriptCanvasAssetHandler* assetHandler = nullptr; - - AZ::EBusAggregateResults foundAssetHandlers; - ScriptCanvas::AssetRegistryRequestBus::BroadcastResult(foundAssetHandlers, &ScriptCanvas::AssetRegistryRequests::GetAssetHandler); - - for (auto handler : foundAssetHandlers.values) - { - if (handler != nullptr) - { - ScriptCanvasAssetHandler* theHandler = azrtti_cast(handler); - if (theHandler != nullptr && theHandler->GetAssetType() == assetType) - { - assetHandler = theHandler; - break; - } - } - } - - AZ_Assert(assetHandler, "The specified asset type does not have a registered asset handler."); - return assetHandler; - } - - void AssetTracker::UpdateFileState(AZ::Data::AssetId assetId, Tracker::ScriptCanvasFileState state) - { - assetId = CheckAssetId(assetId); - - if (m_assetsInUse.find(assetId) != m_assetsInUse.end()) - { - m_assetsInUse[assetId]->SetFileState(state); - } - } - - AssetTrackerRequests::AssetList AssetTracker::GetUnsavedAssets() - { - auto pred = [](ScriptCanvasMemoryAsset::pointer asset) - { - auto fileState = asset->GetFileState(); - if (fileState == Tracker::ScriptCanvasFileState::NEW || fileState == Tracker::ScriptCanvasFileState::MODIFIED) - { - return true; - } - return false; - }; - - return GetAssetsIf(pred); - } - - AssetTrackerRequests::AssetList AssetTracker::GetAssets() - { - return GetAssetsIf([](ScriptCanvasMemoryAsset::pointer) { return true; }); - } - - AssetTrackerRequests::AssetList AssetTracker::GetAssetsIf(AZStd::function pred) - { - AZStd::vector unsavedAssets; - for (auto& assetIterator : m_assetsInUse) - { - auto testAsset = assetIterator.second; - if (AZStd::invoke(pred, testAsset) == true) - { - unsavedAssets.push_back(testAsset); - } - } - return unsavedAssets; - } - - AZ::EntityId AssetTracker::GetSceneEntityIdFromEditorEntityId(AZ::Data::AssetId assetId, AZ::EntityId editorEntityId) - { - assetId = CheckAssetId(assetId); - if (m_assetsInUse.find(assetId) != m_assetsInUse.end()) - { - return m_assetsInUse[assetId]->GetSceneEntityIdFromEditorEntityId(editorEntityId); - } - - return AZ::EntityId(); - } - - AZ::EntityId AssetTracker::GetEditorEntityIdFromSceneEntityId(AZ::Data::AssetId assetId, AZ::EntityId sceneEntityId) - { - assetId = CheckAssetId(assetId); - if (m_assetsInUse.find(assetId) != m_assetsInUse.end()) - { - return m_assetsInUse[assetId]->GetEditorEntityIdFromSceneEntityId(sceneEntityId); - } - - return AZ::EntityId(); - } - - void AssetTracker::OnAssetReady(const ScriptCanvasMemoryAsset* asset) - { - AZ::Data::AssetId assetId = CheckAssetId(asset->GetId()); - - auto assetInUseIter = m_assetsInUse.find(assetId); - if (assetInUseIter != m_assetsInUse.end()) - { - AssetTrackerNotificationBus::Broadcast(&AssetTrackerNotifications::OnAssetReady, assetInUseIter->second); - } - } - - void AssetTracker::OnAssetReloaded(const ScriptCanvasMemoryAsset* asset) - { - AZ::Data::AssetId assetId = CheckAssetId(asset->GetId()); - - auto assetInUseIter = m_assetsInUse.find(assetId); - if (assetInUseIter != m_assetsInUse.end()) - { - AssetTrackerNotificationBus::Broadcast(&AssetTrackerNotifications::OnAssetReloaded, assetInUseIter->second); - } - } - - void AssetTracker::OnAssetSaved(const ScriptCanvasMemoryAsset* asset, bool isSuccessful) - { - AZ::Data::AssetId assetId = CheckAssetId(asset->GetId()); - - auto assetInUseIter = m_assetsInUse.find(assetId); - if (assetInUseIter != m_assetsInUse.end()) - { - AssetTrackerNotificationBus::Broadcast(&AssetTrackerNotifications::OnAssetSaved, assetInUseIter->second, isSuccessful); - } - } - - void AssetTracker::OnAssetError(const ScriptCanvasMemoryAsset* asset) - { - AZ::Data::AssetId assetId = CheckAssetId(asset->GetId()); - - auto assetInUseIter = m_assetsInUse.find(assetId); - if (assetInUseIter != m_assetsInUse.end()) - { - AssetTrackerNotificationBus::Broadcast(&AssetTrackerNotifications::OnAssetError, assetInUseIter->second); - } - } - -} diff --git a/Gems/ScriptCanvas/Code/Editor/Assets/ScriptCanvasAssetTracker.h b/Gems/ScriptCanvas/Code/Editor/Assets/ScriptCanvasAssetTracker.h deleted file mode 100644 index 4850e669ff..0000000000 --- a/Gems/ScriptCanvas/Code/Editor/Assets/ScriptCanvasAssetTracker.h +++ /dev/null @@ -1,127 +0,0 @@ -/* - * Copyright (c) Contributors to the Open 3D Engine Project. - * For complete copyright and license terms please see the LICENSE at the root of this distribution. - * - * SPDX-License-Identifier: Apache-2.0 OR MIT - * - */ - -#pragma once - -#include -#include -#include -#include - -#include - -#include - - -namespace ScriptCanvasEditor -{ - class ScriptCanvasMemoryAsset; - - // This class tracks all things related to the assets that the Script Canvas editor - // has in play. It also provides helper functionality to quickly getting asset information - // from GraphCanvas - // - // The AssetTracker will be the ONLY allowed place to connect Script Canvas to the Asset System and any of its buses. - // - // The goal is to centralize all of the asset operations to a single place in order to simplify Script Canvas' - // interactions with the asset system as well as keeping any transient cache of information that is - // only important while Script Canvas graphs are open. - - class AssetTracker - : AssetTrackerRequestBus::Handler - , Internal::MemoryAssetSystemNotificationBus::Handler - { - public: - AssetTracker() = default; - ~AssetTracker() = default; - void Activate() - { - AssetTrackerRequestBus::Handler::BusConnect(); - Internal::MemoryAssetSystemNotificationBus::Handler::BusConnect(); - } - - void Deactivate() - { - Internal::MemoryAssetSystemNotificationBus::Handler::BusDisconnect(); - AssetTrackerRequestBus::Handler::BusDisconnect(); - } - - // AssetTrackerRequestBus - AZ::Data::AssetId Create(AZStd::string_view assetAbsolutePath, AZ::Data::AssetType assetType, Callbacks::OnAssetCreatedCallback onAssetCreatedCallback) override; - bool IsSaving(AZ::Data::AssetId assetId) const override; - void Save(AZ::Data::AssetId assetId, Callbacks::OnSave onSaveCallback) override; - void SaveAs(AZ::Data::AssetId assetId, const AZStd::string& path, Callbacks::OnSave onSaveCallback) override; - bool Load(AZ::Data::AssetId assetId, AZ::Data::AssetType assetType, Callbacks::OnAssetReadyCallback onAssetReadyCallback) override; - void Close(AZ::Data::AssetId assetId) override; - void CreateView(AZ::Data::AssetId assetId, QWidget* parent) override; - void ClearView(AZ::Data::AssetId assetId) override; - void UntrackAsset(AZ::Data::AssetId assetId) override; - - // Getters - - // Given the assetId it returns a reference to the in-memory asset, returns false if the asset is not tracked - ScriptCanvasMemoryAsset::pointer GetAsset(AZ::Data::AssetId assetId) override; - - // Given a ScriptCanvas EntityId it will lookup the AssetId - AZ::Data::AssetId GetAssetId(ScriptCanvas::ScriptCanvasId scriptCanvasSceneId) override; - - // Given a ScriptCanvas EntityId it will lookup the asset's type - AZ::Data::AssetType GetAssetType(ScriptCanvas::ScriptCanvasId scriptCanvasSceneId) override; - - // Retrieves the ScriptCanvasEntity for a given asset - ScriptCanvas::ScriptCanvasId GetScriptCanvasId(AZ::Data::AssetId assetId) override; - - // Retrieves the Graph Canvas scene Id for a given asset - AZ::EntityId GetGraphCanvasId(AZ::EntityId scriptCanvasEntityId) override; - ScriptCanvas::ScriptCanvasId GetScriptCanvasIdFromGraphId(AZ::EntityId graphId) override; - ScriptCanvas::ScriptCanvasId GetGraphId(AZ::Data::AssetId assetId) override; - Tracker::ScriptCanvasFileState GetFileState(AZ::Data::AssetId assetId) override; - AZStd::string GetTabName(AZ::Data::AssetId assetId) override; - ScriptCanvasEditor::ScriptCanvasAssetHandler* GetAssetHandlerForType(AZ::Data::AssetType assetType) override; - void UpdateFileState(AZ::Data::AssetId assetId, Tracker::ScriptCanvasFileState state) override; - - AssetTrackerRequests::AssetList GetUnsavedAssets() override; - AssetTrackerRequests::AssetList GetAssets() override; - AssetTrackerRequests::AssetList GetAssetsIf(AZStd::function pred = []() { return true; }) override; - - AZ::EntityId GetSceneEntityIdFromEditorEntityId(AZ::Data::AssetId assetId, AZ::EntityId editorEntityId) override; - AZ::EntityId GetEditorEntityIdFromSceneEntityId(AZ::Data::AssetId assetId, AZ::EntityId sceneEntityId) override; - // - - private: - - void SignalSaveComplete(const AZ::Data::AssetId& fileAssetId); - - // Verifies if an asset Id has been remapped, this happens when we save a new graph because the AssetId will - // change on save, but there may be some UX elements still referring to the initial asset Id, this ensures - // we are getting the right key into m_assetsInUse - AZ::Data::AssetId CheckAssetId(AZ::Data::AssetId assetId) const; - - // Map of all the currently tracked in-memory assets - using MemoryAssetMap = AZStd::unordered_map; - using MemoryAssetMapIterator = AZStd::pair>, bool>; - - AZStd::unordered_set m_savingAssets; - AZStd::unordered_set m_queuedCloses; - - // Map of all assets being tracked - MemoryAssetMap m_assetsInUse; - - // When a graph has been saved to file, its Id will change but it may still have external references with the old Id, this maps the file Id to the in-memory Id - AZStd::unordered_map m_remappedAsset; - - // Invoked when an asset is loaded from file and becomes ready - Callbacks::OnAssetReadyCallback m_onAssetReadyCallback; - - // Internal::MemoryAssetNotificationBus - void OnAssetReady(const ScriptCanvasMemoryAsset* asset) override; - void OnAssetReloaded(const ScriptCanvasMemoryAsset* asset) override; - void OnAssetSaved(const ScriptCanvasMemoryAsset* asset, bool isSuccessful) override; - void OnAssetError(const ScriptCanvasMemoryAsset* asset) override; - }; -} diff --git a/Gems/ScriptCanvas/Code/Editor/Assets/ScriptCanvasAssetTrackerBus.h b/Gems/ScriptCanvas/Code/Editor/Assets/ScriptCanvasAssetTrackerBus.h deleted file mode 100644 index 990eeecac5..0000000000 --- a/Gems/ScriptCanvas/Code/Editor/Assets/ScriptCanvasAssetTrackerBus.h +++ /dev/null @@ -1,167 +0,0 @@ -/* - * Copyright (c) Contributors to the Open 3D Engine Project. - * For complete copyright and license terms please see the LICENSE at the root of this distribution. - * - * SPDX-License-Identifier: Apache-2.0 OR MIT - * - */ - -#pragma once - -#include -#include -#include -#include - -#include - -#include -#include - -class QWidget; - -namespace AZ -{ - class EntityId; -} - -namespace ScriptCanvas -{ - class ScriptCanvasAssetBase; -} - -namespace ScriptCanvasEditor -{ - class ScriptCanvasAssetHandler; - - class AssetTrackerRequests - : public AZ::EBusTraits - { - public: - - static const AZ::EBusAddressPolicy AddressPolicy = AZ::EBusAddressPolicy::Single; - - //! Callback used to know when a save operation failed or succeeded - using OnSave = AZStd::function)>; - - //! Callback used when the asset has been loaded and is ready for use - using OnAssetReadyCallback = AZStd::function; - - //! Callback used when the asset is newly created - using OnAssetCreatedCallback = OnAssetReadyCallback; - - // Operations - - //! Creates a new Script Canvas asset and tracks it - virtual AZ::Data::AssetId Create([[maybe_unused]] AZStd::string_view assetAbsolutePath, [[maybe_unused]] AZ::Data::AssetType assetType, Callbacks::OnAssetCreatedCallback onAssetCreatedCallback) { return AZ::Data::AssetId(); } - - //! Saves a Script Canvas asset to a new file, once the save is complete it will use the source Id (not the Id of the in-memory asset) - virtual void SaveAs([[maybe_unused]] AZ::Data::AssetId assetId, [[maybe_unused]] const AZStd::string& path, Callbacks::OnSave onSaveCallback) {} - - //! Saves a previously loaded Script Canvas asset to file - virtual void Save([[maybe_unused]] AZ::Data::AssetId assetId, Callbacks::OnSave onSaveCallback) {} - - //! Returns whether or not the specified asset is currently saving - virtual bool IsSaving([[maybe_unused]] AZ::Data::AssetId assetId) const { return false; } - - //! Loads a Script Canvas graph - virtual bool Load([[maybe_unused]] AZ::Data::AssetId assetId, [[maybe_unused]] AZ::Data::AssetType assetType, Callbacks::OnAssetReadyCallback onAssetReadyCallback) { return false; } - - //! Closes and unloads a Script Canvas graph from the tracker - virtual void Close([[maybe_unused]] AZ::Data::AssetId assetId) {} - - //! Creates the asset's view - virtual void CreateView([[maybe_unused]] AZ::Data::AssetId assetId, [[maybe_unused]] QWidget* parent) {} - - //! Releases the asset's view - virtual void ClearView([[maybe_unused]] AZ::Data::AssetId assetId) {} - - //! Used to make sure assets that are unloaded also get removed from tracking - virtual void UntrackAsset([[maybe_unused]] AZ::Data::AssetId assetId) {} - - using AssetList = AZStd::vector; - - // Accessors - virtual ScriptCanvasMemoryAsset::pointer GetAsset([[maybe_unused]] AZ::Data::AssetId assetId) { return nullptr; } - virtual ScriptCanvas::ScriptCanvasId GetScriptCanvasId([[maybe_unused]] AZ::Data::AssetId assetId) { return AZ::EntityId(); } - virtual ScriptCanvas::ScriptCanvasId GetScriptCanvasIdFromGraphId([[maybe_unused]] AZ::EntityId graphId) { return AZ::EntityId(); } - virtual ScriptCanvas::ScriptCanvasId GetGraphCanvasId(AZ::EntityId) { return AZ::EntityId(); } - virtual ScriptCanvas::ScriptCanvasId GetGraphId([[maybe_unused]] AZ::Data::AssetId assetId) { return ScriptCanvas::ScriptCanvasId(); } - virtual Tracker::ScriptCanvasFileState GetFileState([[maybe_unused]] AZ::Data::AssetId assetId) { return Tracker::ScriptCanvasFileState::INVALID; } - virtual AZ::Data::AssetId GetAssetId([[maybe_unused]] ScriptCanvas::ScriptCanvasId scriptCanvasSceneId) { return {}; } - virtual AZ::Data::AssetType GetAssetType([[maybe_unused]] ScriptCanvas::ScriptCanvasId scriptCanvasSceneId) { return {}; } - virtual AZStd::string GetTabName([[maybe_unused]] AZ::Data::AssetId assetId) { return {}; } - virtual AssetList GetUnsavedAssets() { return {}; } - virtual AssetList GetAssets() { return {}; } - virtual AssetList GetAssetsIf(AZStd::function) { return {}; } - - virtual AZ::EntityId GetSceneEntityIdFromEditorEntityId([[maybe_unused]] AZ::Data::AssetId assetId, [[maybe_unused]] AZ::EntityId editorEntityId) { return AZ::EntityId(); } - virtual AZ::EntityId GetEditorEntityIdFromSceneEntityId([[maybe_unused]] AZ::Data::AssetId assetId, [[maybe_unused]] AZ::EntityId sceneEntityId) { return AZ::EntityId(); } - - // Setters / Updates - virtual void UpdateFileState([[maybe_unused]] AZ::Data::AssetId assetId, [[maybe_unused]] Tracker::ScriptCanvasFileState state) {} - - // Helpers - virtual ScriptCanvasAssetHandler* GetAssetHandlerForType([[maybe_unused]] AZ::Data::AssetType assetType) { return nullptr; } - }; - - using AssetTrackerRequestBus = AZ::EBus; - - //! These are the notifications sent by the AssetTracker only. - //! We use these to communicate the asset status, do not use the AssetBus directly, all Script Canvas - //! assets are managed by the AssetTracker - class AssetTrackerNotifications - : public AZ::EBusTraits - { - public: - - static const AZ::EBusHandlerPolicy HandlerPolicy = AZ::EBusHandlerPolicy::Multiple; - static const AZ::EBusAddressPolicy AddressPolicy = AZ::EBusAddressPolicy::ById; - using BusIdType = AZ::Data::AssetId; - - // These will be forwarded as a result of the Asset System's events - // this is deliberate in order to keep the AssetTracker as the only - // place that interacts directly with the asset bus, but allowing - // other systems to know the status of tracked assets - virtual void OnAssetReady(const ScriptCanvasMemoryAsset::pointer asset) {} - virtual void OnAssetReloaded(const ScriptCanvasMemoryAsset::pointer asset) {} - virtual void OnAssetUnloaded([[maybe_unused]] const AZ::Data::AssetId assetId, [[maybe_unused]] const AZ::Data::AssetType assetType) {} - virtual void OnAssetSaved(const ScriptCanvasMemoryAsset::pointer asset, [[maybe_unused]] bool isSuccessful) {} - virtual void OnAssetError(const ScriptCanvasMemoryAsset::pointer asset) {} - - }; - using AssetTrackerNotificationBus = AZ::EBus; - - namespace Internal - { - class MemoryAssetSystemNotifications - : public AZ::EBusTraits - { - public: - - static const AZ::EBusHandlerPolicy HandlerPolicy = AZ::EBusHandlerPolicy::Single; - static const AZ::EBusAddressPolicy AddressPolicy = AZ::EBusAddressPolicy::Single; - - virtual void OnAssetReady([[maybe_unused]] const ScriptCanvasMemoryAsset* asset) {} - virtual void OnAssetReloaded([[maybe_unused]] const ScriptCanvasMemoryAsset* asset) {} - virtual void OnAssetSaved([[maybe_unused]] const ScriptCanvasMemoryAsset* asset, [[maybe_unused]] bool isSuccessful) {} - virtual void OnAssetError([[maybe_unused]] const ScriptCanvasMemoryAsset* asset) {} - - }; - using MemoryAssetSystemNotificationBus = AZ::EBus; - } - - class MemoryAssetNotifications - : public AZ::EBusTraits - { - public: - static const AZ::EBusHandlerPolicy HandlerPolicy = AZ::EBusHandlerPolicy::Multiple; - static const AZ::EBusAddressPolicy AddressPolicy = AZ::EBusAddressPolicy::ById; - using BusIdType = AZ::Data::AssetId; - - virtual void OnFileStateChanged(Tracker::ScriptCanvasFileState) {} - }; - - using MemoryAssetNotificationBus = AZ::EBus; - ////////////////////////////////////////////////////////////////////////////////////////////////////////// -} diff --git a/Gems/ScriptCanvas/Code/Editor/Assets/ScriptCanvasAssetTrackerDefinitions.h b/Gems/ScriptCanvas/Code/Editor/Assets/ScriptCanvasAssetTrackerDefinitions.h deleted file mode 100644 index e08ce8b74b..0000000000 --- a/Gems/ScriptCanvas/Code/Editor/Assets/ScriptCanvasAssetTrackerDefinitions.h +++ /dev/null @@ -1,39 +0,0 @@ -/* - * Copyright (c) Contributors to the Open 3D Engine Project. - * For complete copyright and license terms please see the LICENSE at the root of this distribution. - * - * SPDX-License-Identifier: Apache-2.0 OR MIT - * - */ - -#pragma once - -#include -#include - -namespace ScriptCanvasEditor -{ - class ScriptCanvasMemoryAsset; - - namespace Callbacks - { - //! Callback used to know when a save operation failed or succeeded - using OnSave = AZStd::function; - - using OnAssetReadyCallback = AZStd::function; - using OnAssetCreatedCallback = OnAssetReadyCallback; - } - - namespace Tracker - { - enum class ScriptCanvasFileState : AZ::s32 - { - NEW, - MODIFIED, - UNMODIFIED, - SOURCE_REMOVED, - INVALID = -1 - }; - } - -} diff --git a/Gems/ScriptCanvas/Code/Editor/Assets/ScriptCanvasFileHandling.cpp b/Gems/ScriptCanvas/Code/Editor/Assets/ScriptCanvasFileHandling.cpp new file mode 100644 index 0000000000..c4579c9042 --- /dev/null +++ b/Gems/ScriptCanvas/Code/Editor/Assets/ScriptCanvasFileHandling.cpp @@ -0,0 +1,329 @@ +/* + * Copyright (c) Contributors to the Open 3D Engine Project. + * For complete copyright and license terms please see the LICENSE at the root of this distribution. + * + * SPDX-License-Identifier: Apache-2.0 OR MIT + * + */ + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +namespace ScriptCanvasFileHandlingCpp +{ + void AppendTabs(AZStd::string& result, size_t depth) + { + for (size_t i = 0; i < depth; ++i) + { + result += "\t"; + } + } + + void CollectNodes(const ScriptCanvas::GraphData::NodeContainer& container, ScriptCanvas::SerializationListeners& listeners) + { + for (auto& nodeEntity : container) + { + if (nodeEntity) + { + if (auto listener = azrtti_cast + ( AZ::EntityUtils::FindFirstDerivedComponent(nodeEntity))) + { + listeners.push_back(listener); + } + } + } + } +} + +namespace ScriptCanvasEditor +{ + EditorAssetTree* EditorAssetTree::ModRoot() + { + if (!m_parent) + { + return this; + } + + return m_parent->ModRoot(); + } + + void EditorAssetTree::SetParent(EditorAssetTree& parent) + { + m_parent = &parent; + } + + AZStd::string EditorAssetTree::ToString(size_t depth) const + { + AZStd::string result; + ScriptCanvasFileHandlingCpp::AppendTabs(result, depth); + result += m_asset.ToString(); + depth += m_dependencies.empty() ? 0 : 1; + + for (const auto& dependency : m_dependencies) + { + result += "\n"; + ScriptCanvasFileHandlingCpp::AppendTabs(result, depth); + result += dependency.ToString(depth); + } + + return result; + } + + AZ::Outcome LoadDataFromJson + ( ScriptCanvas::ScriptCanvasData& dataTarget + , AZStd::string_view source + , AZ::SerializeContext& serializeContext) + { + namespace JSRU = AZ::JsonSerializationUtils; + using namespace ScriptCanvas; + + AZ::JsonDeserializerSettings settings; + settings.m_serializeContext = &serializeContext; + settings.m_metadata.Create(); + + auto loadResult = JSRU::LoadObjectFromStringByType + ( &dataTarget + , azrtti_typeid() + , source + , &settings); + + if (!loadResult.IsSuccess()) + { + return loadResult; + } + + if (auto graphData = dataTarget.ModGraph()) + { + auto listeners = settings.m_metadata.Find(); + AZ_Assert(listeners, "Failed to find SerializationListeners"); + + ScriptCanvasFileHandlingCpp::CollectNodes(graphData->GetGraphData()->m_nodes, *listeners); + + for (auto listener : *listeners) + { + listener->OnDeserialize(); + } + } + else + { + return AZ::Failure(AZStd::string("Failed to find graph data after loading source")); + } + + return AZ::Success(); + } + + + AZ::Outcome LoadEditorAssetTree(SourceHandle handle, EditorAssetTree* parent) + { + if (!CompleteDescriptionInPlace(handle)) + { + return AZ::Failure(AZStd::string::format("LoadEditorAssetTree failed to describe graph from %s", handle.ToString().c_str())); + } + + if (!handle.Get()) + { + auto loadAssetOutcome = LoadFromFile(handle.Path().c_str()); + if (!loadAssetOutcome.IsSuccess()) + { + return AZ::Failure(AZStd::string::format("LoadEditorAssetTree failed to load graph from %s: %s" + , handle.ToString().c_str(), loadAssetOutcome.GetError().c_str())); + } + + handle = SourceHandle(loadAssetOutcome.GetValue(), handle.Id(), handle.Path().c_str()); + } + + AZStd::vector dependentAssets; + const auto subgraphInterfaceAssetTypeID = azrtti_typeid>(); + + auto beginElementCB = [&subgraphInterfaceAssetTypeID, &dependentAssets] + ( void* instance + , const AZ::SerializeContext::ClassData* classData + , const AZ::SerializeContext::ClassElement* classElement) -> bool + { + if (classElement) + { + // if we are a pointer, then we may be pointing to a derived type. + if (classElement->m_flags & AZ::SerializeContext::ClassElement::FLG_POINTER) + { + // if ptr is a pointer-to-pointer, cast its value to a void* (or const void*) and dereference to get to the actual object pointer. + instance = *(void**)(instance); + } + } + + if (classData->m_typeId == subgraphInterfaceAssetTypeID) + { + auto asset = reinterpret_cast*>(instance); + auto id = asset->GetId(); + dependentAssets.push_back(SourceHandle(nullptr, id.m_guid, {})); + } + + return true; + }; + + AZ::SerializeContext* serializeContext = nullptr; + AZ::ComponentApplicationBus::BroadcastResult(serializeContext, &AZ::ComponentApplicationRequests::GetSerializeContext); + AZ_Assert(serializeContext, "LoadEditorAssetTree() ailed to retrieve serialize context!"); + + const ScriptCanvasEditor::Graph* graph = handle.Get(); + serializeContext->EnumerateObject(graph, beginElementCB, nullptr, AZ::SerializeContext::ENUM_ACCESS_FOR_READ); + + EditorAssetTree result; + + for (auto& dependentAsset : dependentAssets) + { + auto loadDependentOutcome = LoadEditorAssetTree(dependentAsset, &result); + if (!loadDependentOutcome.IsSuccess()) + { + return AZ::Failure(AZStd::string::format("LoadEditorAssetTree failed to load graph from %s: %s" + , dependentAsset.ToString().c_str(), loadDependentOutcome.GetError().c_str())); + } + + result.m_dependencies.push_back(loadDependentOutcome.TakeValue()); + } + + if (parent) + { + result.SetParent(*parent); + } + + result.m_asset = AZStd::move(handle); + return AZ::Success(result); + } + + AZ::Outcome LoadFromFile(AZStd::string_view path) + { + namespace JSRU = AZ::JsonSerializationUtils; + + auto fileStringOutcome = AZ::Utils::ReadFile(path); + if (!fileStringOutcome) + { + return AZ::Failure(fileStringOutcome.TakeError()); + } + + const auto& asString = fileStringOutcome.GetValue(); + ScriptCanvas::DataPtr scriptCanvasData = aznew ScriptCanvas::ScriptCanvasData(); + if (!scriptCanvasData) + { + return AZ::Failure(AZStd::string("failed to allocate ScriptCanvas::ScriptCanvasData after loading source file")); + } + + AZ::SerializeContext* serializeContext = nullptr; + AZ::ComponentApplicationBus::BroadcastResult(serializeContext, &AZ::ComponentApplicationRequests::GetSerializeContext); + if (!serializeContext) + { + return AZ::Failure(AZStd::string("no serialize context available to properly parse source file")); + } + + // attempt JSON deserialization... + auto jsonResult = LoadDataFromJson(*scriptCanvasData, AZStd::string_view{ asString.begin(), asString.size() }, *serializeContext); + if (!jsonResult.IsSuccess()) + { + // ...try legacy xml as a failsafe + AZ::IO::ByteContainerStream byteStream(&asString); + if (!AZ::Utils::LoadObjectFromStreamInPlace + ( byteStream + , *scriptCanvasData + , serializeContext + , AZ::ObjectStream::FilterDescriptor(nullptr, AZ::ObjectStream::FILTERFLAG_IGNORE_UNKNOWN_CLASSES))) + { + return AZ::Failure(AZStd::string::format("XML and JSON load attempts failed: %s", jsonResult.GetError().c_str())); + } + } + + if (auto entity = scriptCanvasData->GetScriptCanvasEntity()) + { + AZ_Assert(entity->GetState() == AZ::Entity::State::Constructed, "Entity loaded in bad state"); + AZ::u64 entityId = + aznumeric_caster(ScriptCanvas::MathNodeUtilities::GetRandomIntegral(1, std::numeric_limits::max())); + entity->SetId(AZ::EntityId(entityId)); + + auto graph = entity->FindComponent(); + graph->MarkOwnership(*scriptCanvasData); + + entity->Init(); + entity->Activate(); + } + else + { + return AZ::Failure(AZStd::string("Loaded script canvas file was missing a necessary Entity.")); + } + + return AZ::Success(ScriptCanvasEditor::SourceHandle(scriptCanvasData, path)); + } + + AZ::Outcome SaveToStream(const SourceHandle& source, AZ::IO::GenericStream& stream) + { + namespace JSRU = AZ::JsonSerializationUtils; + + if (!source.IsGraphValid()) + { + return AZ::Failure(AZStd::string("no source graph to save")); + } + + if (source.Path().empty()) + { + return AZ::Failure(AZStd::string("no destination path specified")); + } + + AZ::SerializeContext* serializeContext = nullptr; + AZ::ComponentApplicationBus::BroadcastResult(serializeContext, &AZ::ComponentApplicationRequests::GetSerializeContext); + if (!serializeContext) + { + return AZ::Failure(AZStd::string("no serialize context available to properly save source file")); + } + + auto graphData = source.Get()->GetOwnership(); + if (!graphData) + { + return AZ::Failure(AZStd::string("source is missing save container")); + } + + if (graphData->GetEditorGraph() != source.Get()) + { + return AZ::Failure(AZStd::string("source save container refers to incorrect graph")); + } + + auto saveTarget = graphData->ModGraph(); + if (!saveTarget || !saveTarget->GetGraphData()) + { + return AZ::Failure(AZStd::string("source save container failed to return serializable graph data")); + } + + AZ::JsonSerializerSettings settings; + settings.m_metadata.Create(); + auto listeners = settings.m_metadata.Find(); + AZ_Assert(listeners, "Failed to create SerializationListeners"); + ScriptCanvasFileHandlingCpp::CollectNodes(saveTarget->GetGraphData()->m_nodes, *listeners); + settings.m_keepDefaults = false; + settings.m_serializeContext = serializeContext; + + for (auto listener : *listeners) + { + listener->OnSerialize(); + } + + auto saveOutcome = JSRU::SaveObjectToStream(graphData.get(), stream, nullptr, &settings); + if (!saveOutcome.IsSuccess()) + { + return AZ::Failure(AZStd::string::format("JSON serialization failed to save source: %s", saveOutcome.GetError().c_str())); + } + + return AZ::Success(); + } +} diff --git a/Gems/ScriptCanvas/Code/Editor/Assets/ScriptCanvasMemoryAsset.cpp b/Gems/ScriptCanvas/Code/Editor/Assets/ScriptCanvasMemoryAsset.cpp deleted file mode 100644 index 165007b79b..0000000000 --- a/Gems/ScriptCanvas/Code/Editor/Assets/ScriptCanvasMemoryAsset.cpp +++ /dev/null @@ -1,768 +0,0 @@ -/* - * Copyright (c) Contributors to the Open 3D Engine Project. - * For complete copyright and license terms please see the LICENSE at the root of this distribution. - * - * SPDX-License-Identifier: Apache-2.0 OR MIT - * - */ - - -#include "ScriptCanvasMemoryAsset.h" -#include "ScriptCanvasUndoHelper.h" - -#include -#include -#include -#include -#include - -namespace ScriptCanvasEditor -{ - ScriptCanvasMemoryAsset::ScriptCanvasMemoryAsset() - : m_isSaving(false) - , m_sourceInError(false) - { - m_undoState = AZStd::make_unique(this); - } - - ScriptCanvasMemoryAsset::~ScriptCanvasMemoryAsset() - { - AssetTrackerRequestBus::Broadcast(&AssetTrackerRequests::UntrackAsset, m_inMemoryAssetId); - AssetHelpers::PrintInfo(AZStd::string::format("ScriptCanvasMemoryAsset went out of scope and has been released and untracked: %s", m_absolutePath.c_str()).c_str()); - - if (m_inMemoryAsset.IsReady() && !m_inMemoryAsset.Release()) - { - // Something else is holding on to it - AZ_Assert(false, "Unable to release in memory asset"); - } - } - - const AZStd::string ScriptCanvasMemoryAsset::GetTabName() const - { - AZStd::string tabName; - AzFramework::StringFunc::Path::GetFileName(m_absolutePath.c_str(), tabName); - return tabName; - } - - AZ::EntityId ScriptCanvasMemoryAsset::GetGraphId() - { - if (!m_graphId.IsValid()) - { - EditorGraphRequestBus::EventResult(m_graphId, m_scriptCanvasId, &EditorGraphRequests::GetGraphCanvasGraphId); - } - - return m_graphId; - } - - Tracker::ScriptCanvasFileState ScriptCanvasMemoryAsset::GetFileState() const - { - if (m_sourceRemoved) - { - return Tracker::ScriptCanvasFileState::SOURCE_REMOVED; - } - else - { - return m_fileState; - } - } - - void ScriptCanvasMemoryAsset::SetFileState(Tracker::ScriptCanvasFileState fileState) - { - m_fileState = fileState; - - SignalFileStateChanged(); - } - - void ScriptCanvasMemoryAsset::CloneTo(ScriptCanvasMemoryAsset& memoryAsset) - { - if (m_assetType == azrtti_typeid()) - { - AZ::Data::Asset newAsset = Clone(); - memoryAsset.m_inMemoryAsset = newAsset; - } - else - { - AZ_Assert(false, "Unsupported Script Canvas Asset Type"); - } - - memoryAsset.m_sourceAsset = m_sourceAsset; - } - - void ScriptCanvasMemoryAsset::Create(AZ::Data::AssetId assetId, AZStd::string_view assetAbsolutePath, AZ::Data::AssetType assetType, Callbacks::OnAssetCreatedCallback onAssetCreatedCallback) - { - m_inMemoryAssetId = assetId; - m_absolutePath = assetAbsolutePath; - m_assetType = assetType; - m_fileState = Tracker::ScriptCanvasFileState::NEW; - - ScriptCanvasAssetHandler* assetHandler = GetAssetHandlerForType(assetType); - - AZ::Data::AssetPtr asset = nullptr; - if (assetType == azrtti_typeid()) - { - asset = assetHandler->CreateAsset(assetId, azrtti_typeid()); - } - - m_inMemoryAsset = AZ::Data::Asset(asset, AZ::Data::AssetLoadBehavior::PreLoad); - - ActivateAsset(); - - // For new assets, we directly set its status as "Ready" in order to make it usable. - ScriptCanvas::ScriptCanvasAssetBusRequestBus::Event(assetId, &ScriptCanvas::ScriptCanvasAssetBusRequests::SetAsNewAsset); - - Internal::MemoryAssetSystemNotificationBus::Broadcast(&Internal::MemoryAssetSystemNotifications::OnAssetReady, this); - - AssetHelpers::PrintInfo("Newly created Script Canvas asset is now tracked: %s", AssetHelpers::AssetIdToString(assetId).c_str()); - - if (onAssetCreatedCallback) - { - AZStd::invoke(onAssetCreatedCallback, *this); - } - } - - void ScriptCanvasMemoryAsset::Save(Callbacks::OnSave onSaveCallback) - { - if (m_fileState == Tracker::ScriptCanvasFileState::UNMODIFIED) - { - // The file hasn't changed, don't save it - return; - } - - SaveAs({}, onSaveCallback); - } - - void ScriptCanvasMemoryAsset::SaveAs(const AZStd::string& path, Callbacks::OnSave onSaveCallback) - { - if (!path.empty()) - { - m_saveAsPath = path; - } - else - { - m_saveAsPath = m_absolutePath; - } - - AZ::Data::AssetStreamInfo streamInfo; - streamInfo.m_streamFlags = AZ::IO::OpenMode::ModeWrite; - streamInfo.m_streamName = m_saveAsPath; - - if (!streamInfo.IsValid()) - { - return; - } - - bool sourceControlActive = false; - AzToolsFramework::SourceControlConnectionRequestBus::BroadcastResult(sourceControlActive, &AzToolsFramework::SourceControlConnectionRequests::IsActive); - // If Source Control is active then use it to check out the file before saving otherwise query the file info and save only if the file is not read-only - if (sourceControlActive) - { - AzToolsFramework::SourceControlCommandBus::Broadcast(&AzToolsFramework::SourceControlCommandBus::Events::RequestEdit, - streamInfo.m_streamName.c_str(), - true, - [this, streamInfo, onSaveCallback](bool success, AzToolsFramework::SourceControlFileInfo info) { FinalizeAssetSave(success, info, streamInfo, onSaveCallback); } - ); - } - else - { - AzToolsFramework::SourceControlCommandBus::Broadcast(&AzToolsFramework::SourceControlCommandBus::Events::GetFileInfo, - streamInfo.m_streamName.c_str(), - [this, streamInfo, onSaveCallback](bool success, AzToolsFramework::SourceControlFileInfo info) { FinalizeAssetSave(success, info, streamInfo, onSaveCallback); } - ); - } - } - - void ScriptCanvasMemoryAsset::Set(AZ::Data::AssetId fileAssetId) - { - Callbacks::OnAssetReadyCallback onAssetReady = [](ScriptCanvasMemoryAsset&) {}; - Load(fileAssetId, AZ::Data::AssetType::CreateNull(), onAssetReady); - - ActivateAsset(); - } - - bool ScriptCanvasMemoryAsset::Load(AZ::Data::AssetId assetId, AZ::Data::AssetType assetType, Callbacks::OnAssetReadyCallback onAssetReadyCallback) - { - AZStd::string rootPath; - AZ::Data::AssetInfo assetInfo = AssetHelpers::GetAssetInfo(assetId, rootPath); - AzFramework::StringFunc::Path::Join(rootPath.c_str(), assetInfo.m_relativePath.c_str(), m_absolutePath); - - if (assetInfo.m_assetType.IsNull()) - { - // Try to find the asset type from the source file asset - assetInfo.m_assetType = AssetHelpers::GetAssetType(AZStd::string::format("%s/%s", rootPath.c_str(), assetInfo.m_relativePath.c_str()).c_str()); - } - - if (!assetType.IsNull() && assetInfo.m_assetType.IsNull()) - { - assetInfo.m_assetType = assetType; - } - else - { - AZ_Assert(assetInfo.m_assetId.IsValid(), "Failed to get the asset info properly from the asset system"); - } - - SetFileAssetId(assetId); - - auto asset = AZ::Data::AssetManager::Instance().FindAsset(assetId, AZ::Data::AssetLoadBehavior::PreLoad); - if (!asset || !asset.IsReady()) - { - AZ::Data::AssetBus::MultiHandler::BusConnect(assetId); - } - - if (assetInfo.m_assetType == azrtti_typeid()) - { - m_inMemoryAsset = AZ::Data::AssetManager::Instance().GetAsset(assetId, AZ::Data::AssetLoadBehavior::Default); - } - - if (m_inMemoryAsset) - { - m_inMemoryAsset.BlockUntilLoadComplete(); - - m_sourceAsset = m_inMemoryAsset; - - m_assetType = m_inMemoryAsset->GetType(); - - AZ_Assert(m_inMemoryAsset.GetId() == assetId, "The asset IDs must match"); - - m_onAssetReadyCallback = onAssetReadyCallback; - - if (m_inMemoryAsset.IsReady()) - { - OnAssetReady(m_inMemoryAsset); - } - } - - return !m_inMemoryAsset.IsError(); - } - - void ScriptCanvasMemoryAsset::ActivateAsset() - { - ScriptCanvas::ScriptCanvasAssetBase* assetData = m_inMemoryAsset.Get(); - AZ_Assert(assetData, "ActivateAsset should have a valid asset of type %s", AssetHelpers::AssetIdToString(azrtti_typeid()).c_str()); - - if (assetData == nullptr) - { - return; - } - - AZ::Entity* scriptCanvasEntity = assetData->GetScriptCanvasEntity(); - AZ_Assert(scriptCanvasEntity, "ActivateAsset should have a valid ScriptCanvas Entity"); - - // Only activate the entity for assets that have been saved - if (scriptCanvasEntity->GetState() == AZ::Entity::State::Constructed) - { - scriptCanvasEntity->Init(); - } - - if (scriptCanvasEntity->GetState() == AZ::Entity::State::Init) - { - scriptCanvasEntity->Activate(); - } - - const AZStd::string& assetPath = m_absolutePath; - AZStd::string graphName; - AzFramework::StringFunc::Path::GetFileName(assetPath.c_str(), graphName); - - if (!graphName.empty()) - { - scriptCanvasEntity->SetName(graphName); - } - - Graph* editorGraph = AZ::EntityUtils::FindFirstDerivedComponent(scriptCanvasEntity); - AZ_Assert(editorGraph, "Script Canvas entity must have a Graph component"); - - if (editorGraph == nullptr) - { - return; - } - - m_scriptCanvasId = editorGraph->GetScriptCanvasId(); - - EditorGraphNotificationBus::Handler::BusDisconnect(); - EditorGraphNotificationBus::Handler::BusConnect(m_scriptCanvasId); - - m_undoHelper = AZStd::make_unique(*this); - } - - ScriptCanvasEditor::Widget::CanvasWidget* ScriptCanvasMemoryAsset::CreateView(QWidget* parent) - { - m_canvasWidget = new Widget::CanvasWidget(m_fileAssetId, parent); - return m_canvasWidget; - } - - void ScriptCanvasMemoryAsset::ClearView() - { - delete m_canvasWidget; - m_canvasWidget = nullptr; - } - - void ScriptCanvasMemoryAsset::UndoStackChange() - { - OnUndoStackChanged(); - } - - bool ScriptCanvasMemoryAsset::IsSourceInError() const - { - return m_sourceInError; - } - - void ScriptCanvasMemoryAsset::OnGraphCanvasSceneDisplayed() - { - // We need to wait until this event in order the get the m_graphId which represents the GraphCanvas scene Id - EditorGraphRequestBus::EventResult(m_graphId, m_scriptCanvasId, &EditorGraphRequests::GetGraphCanvasGraphId); - EditorGraphNotificationBus::Handler::BusDisconnect(); - } - - void ScriptCanvasMemoryAsset::OnAssetReady(AZ::Data::Asset asset) - { - // If we've already cloned the memory asset, we don't want to do the start-up things again. - if (m_inMemoryAsset->GetId() == m_sourceAsset.GetId()) - { - AZStd::string rootPath; - AZ::Data::AssetInfo assetInfo = AssetHelpers::GetAssetInfo(m_fileAssetId, rootPath); - - AZStd::string absolutePath; - AzFramework::StringFunc::Path::Join(rootPath.c_str(), assetInfo.m_relativePath.c_str(), absolutePath); - - m_absolutePath = absolutePath; - m_fileState = Tracker::ScriptCanvasFileState::UNMODIFIED; - m_assetType = asset.GetType(); - - // Keep the canonical asset's Id, we will need it when we want to save the asset back to file - SetFileAssetId(asset.GetId()); - - // The source file is ready, we need to make the an in-memory version of it. - AZ::Data::AssetId inMemoryAssetId = AZ::Uuid::CreateRandom(); - - m_sourceAsset = AZ::Data::AssetManager::Instance().FindAsset(m_fileAssetId, AZ::Data::AssetLoadBehavior::PreLoad); - m_inMemoryAsset = AZStd::move(CloneAssetData(inMemoryAssetId)); - - AZ_Assert(m_inMemoryAsset, "Asset should have been successfully cloned."); - AZ_Assert(m_inMemoryAsset.GetId() == inMemoryAssetId, "Asset Id should match to the newly created one"); - - m_inMemoryAssetId = m_inMemoryAsset.GetId(); - - ActivateAsset(); - - if (m_onAssetReadyCallback) - { - AZStd::invoke(m_onAssetReadyCallback, *this); - } - } - // Instead just update the source asset to the get the new asset to keep it in memory. - else - { - m_sourceAsset = AZ::Data::AssetManager::Instance().FindAsset(m_fileAssetId, AZ::Data::AssetLoadBehavior::PreLoad); - } - - if (m_fileAssetId == asset.GetId()) - { - Internal::MemoryAssetSystemNotificationBus::Broadcast(&Internal::MemoryAssetSystemNotifications::OnAssetReady, this); - } - } - - void ScriptCanvasMemoryAsset::OnAssetReloaded(AZ::Data::Asset asset) - { - if (m_fileAssetId == asset.GetId()) - { - m_sourceInError = false; - - // Update our source asset information so we keep references alive. - m_sourceAsset = AZ::Data::AssetManager::Instance().FindAsset(m_fileAssetId, AZ::Data::AssetLoadBehavior::PreLoad); - - // The source file was reloaded, but we have an in-memory version of it. - // We need to handle this. - } - else - { - Internal::MemoryAssetSystemNotificationBus::Broadcast(&Internal::MemoryAssetSystemNotifications::OnAssetReloaded, this); - } - } - - void ScriptCanvasMemoryAsset::OnAssetError(AZ::Data::Asset asset) - { - if (m_fileAssetId == asset.GetId()) - { - m_sourceInError = true; - - if (m_onAssetReadyCallback) - { - AZStd::invoke(m_onAssetReadyCallback, *this); - } - } - else - { - Internal::MemoryAssetSystemNotificationBus::Broadcast(&Internal::MemoryAssetSystemNotifications::OnAssetError, this); - } - } - - void ScriptCanvasMemoryAsset::OnAssetUnloaded(const AZ::Data::AssetId assetId, const AZ::Data::AssetType assetType) - { - if (m_fileAssetId == assetId) - { - AssetTrackerNotificationBus::Event(assetId, &AssetTrackerNotifications::OnAssetUnloaded, assetId, assetType); - } - } - - void ScriptCanvasMemoryAsset::SourceFileChanged(AZStd::string relativePath, AZStd::string scanFolder, AZ::Uuid sourceAssetId) - { - // This updates the asset Id with the canonical assetId on SourceFileChanged - - // This occurs for new ScriptCanvas assets because before the SC asset is saved to disk, the asset database - // has no asset Id associated with it, so this uses the supplied source path to find the asset Id registered - AZStd::string fullPath; - AzFramework::StringFunc::Path::Join(scanFolder.data(), relativePath.data(), fullPath); - AzFramework::ApplicationRequests::Bus::Broadcast(&AzFramework::ApplicationRequests::NormalizePath, fullPath); - - SavingComplete(fullPath, sourceAssetId); - } - - - - void ScriptCanvasMemoryAsset::SourceFileRemoved(AZStd::string relativePath, AZStd::string scanFolder, AZ::Uuid fileAssetId) - { - AZ_UNUSED(relativePath); - AZ_UNUSED(scanFolder); - - if (m_fileAssetId == fileAssetId) - { - m_sourceRemoved = true; - SignalFileStateChanged(); - } - } - - void ScriptCanvasMemoryAsset::SourceFileFailed(AZStd::string relativePath, AZStd::string scanFolder, AZ::Uuid) - { - AZStd::string fullPath; - AzFramework::StringFunc::Path::Join(scanFolder.data(), relativePath.data(), fullPath); - AzFramework::ApplicationRequests::Bus::Broadcast(&AzFramework::ApplicationRequests::NormalizePath, fullPath); - - auto assetPathIdIt = AZStd::find(m_pendingSave.begin(), m_pendingSave.end(), fullPath); - - if (assetPathIdIt != m_pendingSave.end()) - { - if (m_onSaveCallback) - { - m_onSaveCallback(false, m_inMemoryAsset.Get(), AZ::Data::AssetId()); - m_onSaveCallback = nullptr; - } - - m_pendingSave.erase(assetPathIdIt); - } - } - - void ScriptCanvasMemoryAsset::SavingComplete(const AZStd::string& streamName, AZ::Uuid sourceAssetId) - { - AZStd::string normPath = streamName; - AzFramework::ApplicationRequests::Bus::Broadcast(&AzFramework::ApplicationRequests::NormalizePath, normPath); - - auto assetPathIdIt = AZStd::find(m_pendingSave.begin(), m_pendingSave.end(), normPath); - if (assetPathIdIt != m_pendingSave.end()) - { - AZ::Data::AssetId previousFileAssetId; - - if (sourceAssetId != m_fileAssetId.m_guid) - { - previousFileAssetId = m_fileAssetId; - - // The source file has changed, store the AssetId to the canonical asset on file - SetFileAssetId(sourceAssetId); - - } - else if (!m_fileAssetId.IsValid()) - { - SetFileAssetId(sourceAssetId); - } - - m_formerGraphIdPair = AZStd::make_pair(m_scriptCanvasId, m_graphId); - - m_fileState = Tracker::ScriptCanvasFileState::UNMODIFIED; - - m_pendingSave.erase(assetPathIdIt); - - m_absolutePath = m_saveAsPath; - m_saveAsPath.clear(); - - // Connect to the source asset's bus to monitor for situations we may need to handle - AZ::Data::AssetBus::MultiHandler::BusConnect(m_inMemoryAsset.GetId()); - AZ::Data::AssetBus::MultiHandler::BusConnect(m_fileAssetId); - - if (m_onSaveCallback) - { - m_onSaveCallback(true, m_inMemoryAsset.Get(), previousFileAssetId); - m_onSaveCallback = nullptr; - } - } - } - - void ScriptCanvasMemoryAsset::FinalizeAssetSave(bool, const AzToolsFramework::SourceControlFileInfo& fileInfo, const AZ::Data::AssetStreamInfo& saveInfo, Callbacks::OnSave onSaveCallback) - { - m_onSaveCallback = onSaveCallback; - - AZStd::string normPath = saveInfo.m_streamName; - AzFramework::ApplicationRequests::Bus::Broadcast(&AzFramework::ApplicationRequests::NormalizePath, normPath); - m_pendingSave.emplace_back(normPath); - - m_assetSaveFinalizer.Reset(); - m_assetSaveFinalizer.Start(this, fileInfo, saveInfo, onSaveCallback, AssetSaveFinalizer::OnCompleteHandler([](AZ::Data::AssetId /*assetId*/) - { - })); - } - - AZ::Data::Asset ScriptCanvasMemoryAsset::CloneAssetData(AZ::Data::AssetId newAssetId) - { - if (m_assetType == azrtti_typeid()) - { - return CloneAssetData(newAssetId); - } - - AZ_Assert(false, "The provides asset type is not supported as a valid Script Canvas memory asset"); - return AZ::Data::Asset(); - } - - void ScriptCanvasMemoryAsset::OnUndoStackChanged() - { - UndoNotificationBus::Broadcast(&UndoNotifications::OnCanUndoChanged, m_undoState->m_undoStack->CanUndo()); - UndoNotificationBus::Broadcast(&UndoNotifications::OnCanRedoChanged, m_undoState->m_undoStack->CanRedo()); - } - - void ScriptCanvasMemoryAsset::SetFileAssetId(const AZ::Data::AssetId& fileAssetId) - { - m_fileAssetId = fileAssetId; - - if (m_canvasWidget) - { - m_canvasWidget->SetAssetId(fileAssetId); - } - } - - void ScriptCanvasMemoryAsset::SignalFileStateChanged() - { - MemoryAssetNotificationBus::Event(m_fileAssetId, &MemoryAssetNotifications::OnFileStateChanged, GetFileState()); - } - - AZStd::string ScriptCanvasMemoryAsset::MakeTemporaryFilePathForSave(AZStd::string_view targetFilename) - { - AZ::IO::FileIOBase* fileIO = AZ::IO::FileIOBase::GetInstance(); - AZ_Assert(fileIO, "File IO is not initialized."); - - AZStd::string tempFilename; - AzFramework::StringFunc::Path::GetFullFileName(targetFilename.data(), tempFilename); - AZStd::string tempPath = AZStd::string::format("@usercache@/scriptcanvas/%s.temp", tempFilename.data()); - - AZStd::array resolvedPath{}; - fileIO->ResolvePath(tempPath.data(), resolvedPath.data(), resolvedPath.size()); - return resolvedPath.data(); - } - - ScriptCanvasAssetHandler* ScriptCanvasMemoryAsset::GetAssetHandlerForType(AZ::Data::AssetType assetType) - { - ScriptCanvasAssetHandler* assetHandler = nullptr; - - AZ::EBusAggregateResults foundAssetHandlers; - ScriptCanvas::AssetRegistryRequestBus::BroadcastResult(foundAssetHandlers, &ScriptCanvas::AssetRegistryRequests::GetAssetHandler); - - for (auto handler : foundAssetHandlers.values) - { - if (handler != nullptr) - { - ScriptCanvasAssetHandler* theHandler = azrtti_cast(handler); - if (theHandler != nullptr && theHandler->GetAssetType() == assetType) - { - assetHandler = theHandler; - break; - } - } - } - - AZ_Assert(assetHandler, "The specified asset type does not have a registered asset handler."); - return assetHandler; - } - - AZ::EntityId ScriptCanvasMemoryAsset::GetEditorEntityIdFromSceneEntityId(AZ::EntityId sceneEntityId) - { - if (m_editorEntityIdMap.find(sceneEntityId) != m_editorEntityIdMap.end()) - { - return m_editorEntityIdMap[sceneEntityId]; - } - - return AZ::EntityId(); - } - - AZ::EntityId ScriptCanvasMemoryAsset::GetSceneEntityIdFromEditorEntityId(AZ::EntityId editorEntityId) - { - for (auto mapEntry : m_editorEntityIdMap) - { - if (mapEntry.second == editorEntityId) - { - return mapEntry.first; - } - } - - return AZ::EntityId(); - } - - // AssetSaveFinalizer - ////////////////////////////////////// - - bool AssetSaveFinalizer::ValidateStatus(const AzToolsFramework::SourceControlFileInfo& fileInfo) - { - auto fileIO = AZ::IO::FileIOBase::GetInstance(); - if (fileInfo.IsLockedByOther()) - { - AZ_Error("Script Canvas", !fileInfo.IsLockedByOther(), "The file is already exclusively opened by another user: %s", fileInfo.m_filePath.data()); - AZStd::invoke(m_onSave, false, m_inMemoryAsset, m_fileAssetId); - return false; - } - else if (fileInfo.IsReadOnly() && fileIO->Exists(fileInfo.m_filePath.c_str())) - { - AZ_Error("Script Canvas", !fileInfo.IsReadOnly(), "File %s is read-only. It cannot be saved." - " If this file is in Perforce it may not have been checked out by the Source Control API.", fileInfo.m_filePath.data()); - AZStd::invoke(m_onSave, false, m_inMemoryAsset, m_fileAssetId); - return false; - } - else if (m_saving) - { - AZ_Warning("Script Canvas", false, "Trying to save the same file twice. Will result in one save callback being ignored."); - return false; - } - return true; - } - - AssetSaveFinalizer::AssetSaveFinalizer() - : m_inMemoryAsset(nullptr) - , m_sourceAsset(nullptr) - , m_saving(false) - , m_fileAvailableForSave(false) - { - - } - - AssetSaveFinalizer::~AssetSaveFinalizer() - { - AZ::SystemTickBus::Handler::BusDisconnect(); - } - - void AssetSaveFinalizer::Start(ScriptCanvasMemoryAsset* sourceAsset, const AzToolsFramework::SourceControlFileInfo& fileInfo, const AZ::Data::AssetStreamInfo& saveInfo, Callbacks::OnSave onSaveCallback, OnCompleteHandler onComplete) - { - m_onCompleteHandler = onComplete; - m_onCompleteHandler.Connect(m_onComplete); - - m_saveInfo = saveInfo; - m_onSave = onSaveCallback; - m_sourceAsset = sourceAsset; - m_inMemoryAsset = sourceAsset->GetAsset().Get(); - m_assetType = sourceAsset->GetAssetType(); - - if (!ValidateStatus(fileInfo)) - { - return; - } - - auto streamer = AZ::Interface::Get(); - AZ::IO::FileRequestPtr flushRequest = streamer->FlushCache(saveInfo.m_streamName.data()); - streamer->SetRequestCompleteCallback(flushRequest, [this]([[maybe_unused]] AZ::IO::FileRequestHandle request) - { - m_fileAvailableForSave = true; - }); - streamer->QueueRequest(flushRequest); - - AZ::SystemTickBus::Handler::BusConnect(); - - m_saving = true; - } - - AZStd::string AssetSaveFinalizer::MakeTemporaryFilePathForSave(AZStd::string_view targetFilename) - { - AZ::IO::FileIOBase* fileIO = AZ::IO::FileIOBase::GetInstance(); - AZ_Assert(fileIO, "File IO is not initialized."); - - AZStd::string tempFilename; - AzFramework::StringFunc::Path::GetFullFileName(targetFilename.data(), tempFilename); - AZStd::string tempPath = AZStd::string::format("@usercache@/scriptcanvas/%s.temp", tempFilename.data()); - - AZStd::array resolvedPath{}; - fileIO->ResolvePath(tempPath.data(), resolvedPath.data(), resolvedPath.size()); - return resolvedPath.data(); - } - - void AssetSaveFinalizer::OnSystemTick() - { - if (m_fileAvailableForSave) - { - - AZ::SystemTickBus::Handler::BusDisconnect(); - - m_fileAvailableForSave = false; - - const AZStd::string tempPath = MakeTemporaryFilePathForSave(m_saveInfo.m_streamName); - AZ::IO::FileIOStream stream(tempPath.data(), m_saveInfo.m_streamFlags); - if (stream.IsOpen()) - { - ScriptCanvasAssetHandler* assetHandler = nullptr; - AssetTrackerRequestBus::BroadcastResult(assetHandler, &AssetTrackerRequests::GetAssetHandlerForType, m_assetType); - AZ_Assert(assetHandler, "An asset handler must be found"); - - bool savedSuccess; - { - AZ_PROFILE_SCOPE(ScriptCanvas, "ScriptCanvasAssetHandler::SaveAssetData"); - - ScriptCanvasMemoryAsset cloneAsset; - m_sourceAsset->CloneTo(cloneAsset); - - savedSuccess = assetHandler->SaveAssetData(cloneAsset.GetAsset(), &stream); - } - stream.Close(); - if (savedSuccess) - { - AZ_PROFILE_SCOPE(ScriptCanvas, "AssetTracker::SaveAssetPostSourceControl : TempToTargetFileReplacement"); - - AZ::IO::FileIOBase* fileIO = AZ::IO::FileIOBase::GetInstance(); - const bool targetFileExists = fileIO->Exists(m_saveInfo.m_streamName.data()); - - bool removedTargetFile; - { - AZ_PROFILE_SCOPE(ScriptCanvas, "AssetTracker::SaveAssetPostSourceControl : TempToTargetFileReplacement : RemoveTarget"); - removedTargetFile = fileIO->Remove(m_saveInfo.m_streamName.data()); - } - - if (targetFileExists && !removedTargetFile) - { - savedSuccess = false; - } - else - { - AZ_PROFILE_SCOPE(ScriptCanvas, "AssetTracker::SaveAssetPostSourceControl : TempToTargetFileReplacement : RenameTempFile"); - AZ::IO::Result renameResult = fileIO->Rename(tempPath.data(), m_saveInfo.m_streamName.data()); - if (!renameResult) - { - savedSuccess = false; - } - } - } - - if (savedSuccess) - { - AZ_TracePrintf("Script Canvas", "Script Canvas successfully saved as Asset \"%s\"", m_saveInfo.m_streamName.data()); - } - - m_onComplete.Signal(m_sourceAsset->GetId()); - - } - - Reset(); - - } - - } - - void AssetSaveFinalizer::Reset() - { - m_sourceAsset = nullptr; - m_fileAssetId = {}; - m_onSave = nullptr; - m_saving = false; - m_inMemoryAsset = nullptr; - m_saveInfo = {}; - } - -} diff --git a/Gems/ScriptCanvas/Code/Editor/Assets/ScriptCanvasMemoryAsset.h b/Gems/ScriptCanvas/Code/Editor/Assets/ScriptCanvasMemoryAsset.h deleted file mode 100644 index 9665e8ec64..0000000000 --- a/Gems/ScriptCanvas/Code/Editor/Assets/ScriptCanvasMemoryAsset.h +++ /dev/null @@ -1,344 +0,0 @@ -/* - * Copyright (c) Contributors to the Open 3D Engine Project. - * For complete copyright and license terms please see the LICENSE at the root of this distribution. - * - * SPDX-License-Identifier: Apache-2.0 OR MIT - * - */ - -#pragma once - -#include -#include - -#include - -#include -#include - -#include - -#include -#include - -#include -#include - -#include -#include - -#include -#include - -namespace ScriptCanvasEditor -{ - - class ScriptCanvasAssetHandler; - - template - class MemoryAsset - : protected AZ::Data::AssetBus::MultiHandler - , protected AzToolsFramework::AssetSystemBus::Handler - , public AzToolsFramework::UndoSystem::IUndoNotify - { - public: - - MemoryAsset() - { - AzToolsFramework::AssetSystemBus::Handler::BusConnect(); - } - - ~MemoryAsset() - { - AZ::Data::AssetBus::MultiHandler::BusDisconnect(); - AzToolsFramework::AssetSystemBus::Handler::BusDisconnect(); - } - - using AssetType = BaseAssetType; - - virtual void Create(AZ::Data::AssetId assetId, AZStd::string_view assetAbsolutePath, AZ::Data::AssetType assetType, Callbacks::OnAssetCreatedCallback onAssetCreatedCallback) = 0; - - virtual void SaveAs(const AZStd::string& path, Callbacks::OnSave onSaveCallback) = 0; - virtual void Save(Callbacks::OnSave onSaveCallback) = 0; - - virtual bool Load(AZ::Data::AssetId assetId, AZ::Data::AssetType assetType, Callbacks::OnAssetReadyCallback onAssetReadyCallback) = 0; - }; - - class UndoHelper; - - // Saving an asset is an asynchronous process that requires several steps, this helper - // class ensures asset saving takes place correctly and reduces the complexity of - // ScriptCanvasMemoryAsset's saving requirements - class AssetSaveFinalizer - : AZ::SystemTickBus::Handler - { - public: - - using OnCompleteEvent = AZ::Event; - using OnCompleteHandler = AZ::Event::Handler; - - AssetSaveFinalizer(); - ~AssetSaveFinalizer(); - - void Start(ScriptCanvasMemoryAsset* sourceAsset, const AzToolsFramework::SourceControlFileInfo& fileInfo, const AZ::Data::AssetStreamInfo& saveInfo, Callbacks::OnSave onSaveCallback, OnCompleteHandler onComplete); - void Reset(); - - private: - - // AZ::SystemTickBus::Handler ... - void OnSystemTick() override; - /// - - bool ValidateStatus(const AzToolsFramework::SourceControlFileInfo& fileInfo); - AZStd::string MakeTemporaryFilePathForSave(AZStd::string_view targetFilename); - - OnCompleteHandler m_onCompleteHandler; - OnCompleteEvent m_onComplete; - Callbacks::OnSave m_onSave; - - bool m_saving = false; - bool m_fileAvailableForSave = false; - - AZ::Data::AssetPtr m_inMemoryAsset; - AZ::Data::AssetId m_fileAssetId; - AZ::Data::AssetStreamInfo m_saveInfo; - - ScriptCanvasMemoryAsset* m_sourceAsset; - - AZ::Data::AssetType m_assetType; - - }; - - // Script Canvas primarily works with an in-memory copy of an asset. - // There are two situations, the first is, when a new asset is created and not yet saved. - // Once saved, we will create a new asset on file, however, and this is important - // once the file is saved to file, its asset ID will be changed, if the file is to remain - // open, we need to update the source AssetId to correspond to the file asset. - // - // The other is when an asset is loaded, we clone the asset from file and use an in-memory - // version of the asset until it is time to save, at that moment we need to save to the - // source file - class ScriptCanvasMemoryAsset - : public MemoryAsset - , public AZStd::enable_shared_from_this - , EditorGraphNotificationBus::Handler - { - public: - - ScriptCanvasMemoryAsset(); - ~ScriptCanvasMemoryAsset() override; - - ScriptCanvasMemoryAsset(const ScriptCanvasMemoryAsset& rhs) = delete; - ScriptCanvasMemoryAsset& operator = (const ScriptCanvasMemoryAsset& rhs) = delete; - - using pointer = AZStd::shared_ptr; - - void Create(AZ::Data::AssetId assetId, AZStd::string_view assetAbsolutePath, AZ::Data::AssetType assetType, Callbacks::OnAssetCreatedCallback onAssetCreatedCallback) override; - void SaveAs(const AZStd::string& path, Callbacks::OnSave onSaveCallback) override; - void Save(Callbacks::OnSave onSaveCallback) override; - bool Load(AZ::Data::AssetId assetId, AZ::Data::AssetType assetType, Callbacks::OnAssetReadyCallback onAssetReadyCallback) override; - void Set(AZ::Data::AssetId assetId); - - const AZ::Data::AssetId& GetId() const { return m_inMemoryAssetId; } - const AZ::Data::AssetId& GetFileAssetId() const { return m_fileAssetId; } - - const AZ::Data::AssetType GetAssetType() const { return m_assetType; } - - AZ::Data::Asset GetAsset() { return m_inMemoryAsset; } - const AZ::Data::Asset& GetAsset() const { return m_inMemoryAsset; } - - const AZStd::string GetTabName() const; - - const AZStd::string& GetAbsolutePath() const { return m_absolutePath; } - AZ::EntityId GetScriptCanvasId() const { return m_scriptCanvasId; } - - AZ::EntityId GetGraphId(); - Tracker::ScriptCanvasFileState GetFileState() const; - - void SetFileState(Tracker::ScriptCanvasFileState fileState); - - void CloneTo(ScriptCanvasMemoryAsset& memoryAsset); - - void ActivateAsset(); - - Widget::CanvasWidget* GetView() { return m_canvasWidget; } - - Widget::CanvasWidget* CreateView(QWidget* parent); - void ClearView(); - - void UndoStackChange(); - - SceneUndoState* GetUndoState() { return m_undoState.get(); } - - bool IsSourceInError() const; - - void OnSourceAssetFinalized(const AZStd::string& fullPath, AZ::Uuid sourceAssetId); - void SavingComplete(const AZStd::string& fullPath, AZ::Uuid sourceAssetId); - - AZ::Data::AssetId GetSourceUuid() const { return m_sourceUuid; } - - private: - - template - auto Clone() - { - AZ::Data::AssetId assetId = AZ::Uuid::CreateRandom(); - - AZ::Data::Asset newAsset = m_inMemoryAsset; - newAsset = { aznew T(assetId, AZ::Data::AssetData::AssetStatus::Ready), AZ::Data::AssetLoadBehavior::Default }; - - auto serializeContext = AZ::EntityUtils::GetApplicationSerializeContext(); - serializeContext->CloneObjectInplace(newAsset.Get()->GetScriptCanvasData(), &m_inMemoryAsset.Get()->GetScriptCanvasData()); - - m_editorEntityIdMap.clear(); - - AZ::IdUtils::Remapper::GenerateNewIdsAndFixRefs(&newAsset.Get()->GetScriptCanvasData(), m_editorEntityIdMap, serializeContext); - - return newAsset; - } - - // EditorGraphNotificationBus - void OnGraphCanvasSceneDisplayed() override; - /// - - //! AZ::Data::AssetBus - void OnAssetReady(AZ::Data::Asset asset) override; - void OnAssetReloaded(AZ::Data::Asset asset) override; - void OnAssetError(AZ::Data::Asset asset) override; - void OnAssetUnloaded(const AZ::Data::AssetId assetId, const AZ::Data::AssetType assetType) override; - /////////////////////// - - // AzToolsFramework::AssetSystemBus::Handler - void SourceFileChanged(AZStd::string relativePath, AZStd::string scanFolder, AZ::Uuid fileAssetId) override; - void SourceFileRemoved(AZStd::string relativePath, AZStd::string scanFolder, AZ::Uuid fileAssetId) override; - void SourceFileFailed(AZStd::string relativePath, AZStd::string scanFolder, AZ::Uuid fileAssetId) override; - /// - - - void FinalizeAssetSave(bool, const AzToolsFramework::SourceControlFileInfo& fileInfo, const AZ::Data::AssetStreamInfo& saveInfo, Callbacks::OnSave onSaveCallback); - - template - void StartAssetLoad(AZ::Data::AssetId assetId, AZ::Data::Asset& asset) - { - asset = AZ::Data::AssetManager::Instance().GetAsset(assetId, asset.GetAutoLoadBehavior()); - } - - template - AZ::Data::Asset CloneAssetData(AZ::Data::AssetId newAssetId) - { - AssetType* assetData = aznew AssetType(newAssetId, AZ::Data::AssetData::AssetStatus::Ready); - - auto& scriptCanvasData = assetData->GetScriptCanvasData(); - - // Clone asset data into SC Editor asset - auto serializeContext = AZ::EntityUtils::GetApplicationSerializeContext(); - serializeContext->CloneObjectInplace(scriptCanvasData, &m_inMemoryAsset.Get()->GetScriptCanvasData()); - - m_editorEntityIdMap.clear(); - - AZ::IdUtils::Remapper::GenerateNewIdsAndFixRefs(&scriptCanvasData, m_editorEntityIdMap, serializeContext); - - // Upon doing this move, the canonical asset will be unloaded - m_inMemoryAsset = { AZStd::move(assetData), AZ::Data::AssetLoadBehavior::Default }; - - return m_inMemoryAsset; - } - - // Upon loading a graph, we clone the source data and we replace the loaded asset with - // a clone, this is to prevent modifications to the source data and it gives us some - // flexibility if we need to load the source asset again - AZ::Data::Asset CloneAssetData(AZ::Data::AssetId newAssetId); - - // IUndoNotify - void OnUndoStackChanged() override; - // - - private: - - void SetFileAssetId(const AZ::Data::AssetId& fileAssetId); - - void SignalFileStateChanged(); - - AZStd::string MakeTemporaryFilePathForSave(AZStd::string_view targetFilename); - - //! Finds the appropriate asset handler for the type of Script Canvas asset given - ScriptCanvasAssetHandler* GetAssetHandlerForType(AZ::Data::AssetType assetType); - - //! The asset type, we need it to make sure we call the correct factory methods - AZ::Data::AssetType m_assetType; - - //! The in-memory asset - AZ::Data::Asset m_inMemoryAsset; - - AZ::Data::Asset m_sourceAsset; - - //! Whether we are making a new asset or loading one, we should always have its absolute path - AZStd::string m_absolutePath; - - AZStd::string m_saveAsPath; - - //! The AssetId of the canonical asset on file, if the asset has never been saved to file, it is Invalid - AZ::Data::AssetId m_fileAssetId; - - //! The AssetId that represents this asset, it will always be the in-memory asset Id and never the file asset Id - AZ::Data::AssetId m_inMemoryAssetId; - - //! When a new asset is saved, we need to keep it's previous internal Ids in order for the front end to remap to the new Ids - using FormerGraphIdPair = AZStd::pair; - FormerGraphIdPair m_formerGraphIdPair; - - //! The EntityId of the ScriptCanvasEntity owned by the ScriptCanvasAsset - ScriptCanvas::ScriptCanvasId m_scriptCanvasId; - - //! The EntityId that represents the ScriptCanvas graph - AZ::EntityId m_graphId; - - //! Gives the ability to provide a lambda invoked when the asset is ready - Callbacks::OnAssetReadyCallback m_onAssetReadyCallback; - - //! The Save is officially complete after SourceFileChange is handled. - Callbacks::OnSave m_onSaveCallback; - - bool m_sourceRemoved = false; - Tracker::ScriptCanvasFileState m_fileState = Tracker::ScriptCanvasFileState::INVALID; - - //! We need to track the filename of the file being saved because we need to match it when we handle SourceFileChange (see SourceFileChange for details) - AZStd::vector m_pendingSave; - - //! Each memory asset owns its view widget - Widget::CanvasWidget* m_canvasWidget = nullptr; - - //! Utility cache of remapped entityIds - using EditorEntityIdMap = AZStd::unordered_map; - - //! Cached mapping of Scene Entity ID to Asset Id, used by the debugger - EditorEntityIdMap m_editorEntityIdMap; - - //! Each asset keeps track of its undo state - AZStd::unique_ptr m_undoState; - - //! The undo helper is an object that implements the Undo behaviors - AZStd::unique_ptr m_undoHelper; - - bool m_isSaving; - bool m_sourceInError; - - AZ::Data::AssetId m_sourceUuid; - - AssetSaveFinalizer m_assetSaveFinalizer; - - public: - - //! Given a scene EntityId, find the respective editor EntityId - AZ::EntityId GetEditorEntityIdFromSceneEntityId(AZ::EntityId sceneEntityId); - - //! Given an editor EntityId, find the respective scene EntityId - AZ::EntityId GetSceneEntityIdFromEditorEntityId(AZ::EntityId editorEntityId); - - //! When a new asset is saved, we need to keep it's previous internal Ids in order for the front end to remap to the new Ids - const FormerGraphIdPair& GetFormerGraphIds() const { return m_formerGraphIdPair; } - - }; - - -} diff --git a/Gems/ScriptCanvas/Code/Editor/Assets/ScriptCanvasUndoHelper.cpp b/Gems/ScriptCanvas/Code/Editor/Assets/ScriptCanvasUndoHelper.cpp index 388da67987..a067bf411e 100644 --- a/Gems/ScriptCanvas/Code/Editor/Assets/ScriptCanvasUndoHelper.cpp +++ b/Gems/ScriptCanvas/Code/Editor/Assets/ScriptCanvasUndoHelper.cpp @@ -7,15 +7,20 @@ */ #include "ScriptCanvasUndoHelper.h" -#include "ScriptCanvasMemoryAsset.h" #include +#include namespace ScriptCanvasEditor { - UndoHelper::UndoHelper(ScriptCanvasMemoryAsset& memoryAsset) - : m_memoryAsset(memoryAsset) + UndoHelper::UndoHelper() + : m_undoState(this) { - UndoRequestBus::Handler::BusConnect(memoryAsset.GetScriptCanvasId()); + } + + UndoHelper::UndoHelper(Graph* graph) + : m_undoState(this) + { + SetSource(graph); } UndoHelper::~UndoHelper() @@ -23,15 +28,21 @@ namespace ScriptCanvasEditor UndoRequestBus::Handler::BusDisconnect(); } + void UndoHelper::SetSource(Graph* graph) + { + m_graph = graph; + UndoRequestBus::Handler::BusConnect(graph->GetScriptCanvasId()); + } + ScriptCanvasEditor::UndoCache* UndoHelper::GetSceneUndoCache() { - return m_memoryAsset.GetUndoState()->m_undoCache.get(); + return m_undoState.m_undoCache.get(); } ScriptCanvasEditor::UndoData UndoHelper::CreateUndoData() { - AZ::EntityId graphCanvasGraphId = m_memoryAsset.GetGraphId(); - ScriptCanvas::ScriptCanvasId scriptCanvasId = m_memoryAsset.GetScriptCanvasId(); + AZ::EntityId graphCanvasGraphId = m_graph->GetGraphCanvasGraphId(); + ScriptCanvas::ScriptCanvasId scriptCanvasId = m_graph->GetScriptCanvasId(); GraphCanvas::GraphModelRequestBus::Event(graphCanvasGraphId, &GraphCanvas::GraphModelRequests::OnSaveDataDirtied, graphCanvasGraphId); @@ -56,17 +67,17 @@ namespace ScriptCanvasEditor void UndoHelper::BeginUndoBatch(AZStd::string_view label) { - m_memoryAsset.GetUndoState()->BeginUndoBatch(label); + m_undoState.BeginUndoBatch(label); } void UndoHelper::EndUndoBatch() { - m_memoryAsset.GetUndoState()->EndUndoBatch(); + m_undoState.EndUndoBatch(); } void UndoHelper::AddUndo(AzToolsFramework::UndoSystem::URSequencePoint* sequencePoint) { - if (SceneUndoState* sceneUndoState = m_memoryAsset.GetUndoState()) + if (SceneUndoState* sceneUndoState = &m_undoState) { if (!sceneUndoState->m_currentUndoBatch) { @@ -82,22 +93,22 @@ namespace ScriptCanvasEditor void UndoHelper::AddGraphItemChangeUndo(AZStd::string_view undoLabel) { GraphItemChangeCommand* command = aznew GraphItemChangeCommand(undoLabel); - command->Capture(m_memoryAsset, true); - command->Capture(m_memoryAsset, false); + command->Capture(m_graph, true); + command->Capture(m_graph, false); AddUndo(command); } void UndoHelper::AddGraphItemAdditionUndo(AZStd::string_view undoLabel) { GraphItemAddCommand* command = aznew GraphItemAddCommand(undoLabel); - command->Capture(m_memoryAsset, false); + command->Capture(m_graph, false); AddUndo(command); } void UndoHelper::AddGraphItemRemovalUndo(AZStd::string_view undoLabel) { GraphItemRemovalCommand* command = aznew GraphItemRemovalCommand(undoLabel); - command->Capture(m_memoryAsset, true); + command->Capture(m_graph, true); AddUndo(command); } @@ -105,7 +116,7 @@ namespace ScriptCanvasEditor { AZ_PROFILE_FUNCTION(ScriptCanvas); - SceneUndoState* sceneUndoState = m_memoryAsset.GetUndoState(); + SceneUndoState* sceneUndoState = &m_undoState; if (sceneUndoState) { AZ_Warning("Script Canvas", !sceneUndoState->m_currentUndoBatch, "Script Canvas Editor has an open undo batch when performing a redo operation"); @@ -125,7 +136,7 @@ namespace ScriptCanvasEditor { AZ_PROFILE_FUNCTION(ScriptCanvas); - SceneUndoState* sceneUndoState = m_memoryAsset.GetUndoState(); + SceneUndoState* sceneUndoState = &m_undoState; if (sceneUndoState) { AZ_Warning("Script Canvas", !sceneUndoState->m_currentUndoBatch, "Script Canvas Editor has an open undo batch when performing a redo operation"); @@ -143,7 +154,7 @@ namespace ScriptCanvasEditor void UndoHelper::Reset() { - if (SceneUndoState* sceneUndoState = m_memoryAsset.GetUndoState()) + if (SceneUndoState* sceneUndoState = &m_undoState) { AZ_Warning("Script Canvas", !sceneUndoState->m_currentUndoBatch, "Script Canvas Editor has an open undo batch when resetting the undo stack"); sceneUndoState->m_undoStack->Reset(); @@ -162,17 +173,23 @@ namespace ScriptCanvasEditor bool UndoHelper::CanUndo() const { - return m_memoryAsset.GetUndoState()->m_undoStack->CanUndo(); + return m_undoState.m_undoStack->CanUndo(); } bool UndoHelper::CanRedo() const { - return m_memoryAsset.GetUndoState()->m_undoStack->CanRedo(); + return m_undoState.m_undoStack->CanRedo(); + } + + void UndoHelper::OnUndoStackChanged() + { + UndoNotificationBus::Broadcast(&UndoNotifications::OnCanUndoChanged, m_undoState.m_undoStack->CanUndo()); + UndoNotificationBus::Broadcast(&UndoNotifications::OnCanRedoChanged, m_undoState.m_undoStack->CanRedo()); } void UndoHelper::UpdateCache() { - ScriptCanvas::ScriptCanvasId scriptCanvasId = m_memoryAsset.GetScriptCanvasId(); + ScriptCanvas::ScriptCanvasId scriptCanvasId = m_graph->GetScriptCanvasId(); UndoCache* undoCache = nullptr; UndoRequestBus::EventResult(undoCache, scriptCanvasId, &UndoRequests::GetSceneUndoCache); diff --git a/Gems/ScriptCanvas/Code/Editor/Assets/ScriptCanvasUndoHelper.h b/Gems/ScriptCanvas/Code/Editor/Assets/ScriptCanvasUndoHelper.h index 7bf5c8b630..e2d4f008fa 100644 --- a/Gems/ScriptCanvas/Code/Editor/Assets/ScriptCanvasUndoHelper.h +++ b/Gems/ScriptCanvas/Code/Editor/Assets/ScriptCanvasUndoHelper.h @@ -8,22 +8,27 @@ #pragma once #include +#include namespace ScriptCanvasEditor { - class ScriptCanvasMemoryAsset; // Helper class that provides the implementation for UndoRequestBus - class UndoHelper : UndoRequestBus::Handler + class UndoHelper + : public UndoRequestBus::Handler + , public AzToolsFramework::UndoSystem::IUndoNotify { public: - UndoHelper(ScriptCanvasMemoryAsset& memoryAsset); + UndoHelper(); + UndoHelper(Graph* source); ~UndoHelper(); UndoCache* GetSceneUndoCache() override; UndoData CreateUndoData() override; + void SetSource(Graph* source); + void BeginUndoBatch(AZStd::string_view label) override; void EndUndoBatch() override; void AddUndo(AzToolsFramework::UndoSystem::URSequencePoint* seqPoint) override; @@ -41,6 +46,7 @@ namespace ScriptCanvasEditor bool CanRedo() const override; private: + void OnUndoStackChanged() override; void UpdateCache(); @@ -51,7 +57,7 @@ namespace ScriptCanvasEditor }; Status m_status = Status::Idle; - - ScriptCanvasMemoryAsset& m_memoryAsset; + SceneUndoState m_undoState; + Graph* m_graph = nullptr; }; } diff --git a/Gems/ScriptCanvas/Code/Editor/Components/EditorGraph.cpp b/Gems/ScriptCanvas/Code/Editor/Components/EditorGraph.cpp index 78325e9a90..d713bc09a6 100644 --- a/Gems/ScriptCanvas/Code/Editor/Components/EditorGraph.cpp +++ b/Gems/ScriptCanvas/Code/Editor/Components/EditorGraph.cpp @@ -480,6 +480,7 @@ namespace ScriptCanvasEditor ScriptCanvas::Graph::Activate(); PostActivate(); + m_undoHelper.SetSource(this); } void Graph::Deactivate() @@ -489,7 +490,7 @@ namespace ScriptCanvasEditor EditorGraphRequestBus::Handler::BusDisconnect(); SceneCounterRequestBus::Handler::BusDisconnect(); NodeCreationNotificationBus::Handler::BusDisconnect(); - + AZ::SystemTickBus::Handler::BusDisconnect(); GraphCanvas::SceneNotificationBus::Handler::BusDisconnect(); GraphCanvas::GraphModelRequestBus::Handler::BusDisconnect(); @@ -1029,18 +1030,50 @@ namespace ScriptCanvasEditor { AZStd::any* connectionUserData = nullptr; GraphCanvas::ConnectionRequestBus::EventResult(connectionUserData, connectionId, &GraphCanvas::ConnectionRequests::GetUserData); - auto scConnectionId = connectionUserData && connectionUserData->is() ? *AZStd::any_cast(connectionUserData) : AZ::EntityId(); + auto scConnectionId = connectionUserData && connectionUserData->is() + ? *AZStd::any_cast(connectionUserData) + : AZ::EntityId(); - ScriptCanvas::Connection* connection = AZ::EntityUtils::FindFirstDerivedComponent(scConnectionId); - - if (connection) + if (ScriptCanvas::Connection* connection = AZ::EntityUtils::FindFirstDerivedComponent(scConnectionId)) { - ScriptCanvas::GraphNotificationBus::Event(GetScriptCanvasId(), &ScriptCanvas::GraphNotifications::OnDisonnectionComplete, connectionId); - + ScriptCanvas::GraphNotificationBus::Event + ( GetScriptCanvasId() + , &ScriptCanvas::GraphNotifications::OnDisonnectionComplete + , connectionId); DisconnectById(scConnectionId); } } + ScriptCanvas::DataPtr Graph::Create() + { + if (AZ::Entity* entity = aznew AZ::Entity("Script Canvas Graph")) + { + auto graph = entity->CreateComponent(); + entity->CreateComponent(graph->GetScriptCanvasId()); + + if (ScriptCanvas::DataPtr data = aznew ScriptCanvas::ScriptCanvasData()) + { + data->m_scriptCanvasEntity.reset(entity); + graph->MarkOwnership(*data); + entity->Init(); + entity->Activate(); + return data; + } + } + + return nullptr; + } + + void Graph::MarkOwnership(ScriptCanvas::ScriptCanvasData& owner) + { + m_owner = &owner; + } + + ScriptCanvas::DataPtr Graph::GetOwnership() const + { + return const_cast(this)->m_owner; + } + bool Graph::CreateConnection(const GraphCanvas::ConnectionId& connectionId, const GraphCanvas::Endpoint& sourcePoint, const GraphCanvas::Endpoint& targetPoint) { if (!sourcePoint.IsValid() || !targetPoint.IsValid()) @@ -1078,9 +1111,11 @@ namespace ScriptCanvasEditor return CanCreateConnectionBetween(scSourceEndpoint, scTargetEndpoint).IsSuccess(); } - AZStd::string Graph::GetDataTypeString(const AZ::Uuid& typeId) + AZStd::string Graph::GetDataTypeString(const AZ::Uuid&) { - return TranslationHelper::GetSafeTypeName(ScriptCanvas::Data::FromAZType(typeId)); + // This is used by the default tooltip setting in GraphCanvas, returning an empty string + // in order for tooltips to be fully controlled by ScriptCanvas + return {}; } void Graph::OnRemoveUnusedNodes() @@ -1321,7 +1356,8 @@ namespace ScriptCanvasEditor void Graph::SignalDirty() { - GeneralRequestBus::Broadcast(&GeneralRequests::SignalSceneDirty, GetAssetId()); + SourceHandle handle(m_owner, {}, {}); + GeneralRequestBus::Broadcast(&GeneralRequests::SignalSceneDirty, handle); } void Graph::HighlightNodesByType(const ScriptCanvas::NodeTypeIdentifier& nodeTypeIdentifier) @@ -1932,7 +1968,7 @@ namespace ScriptCanvasEditor } OnSaveDataDirtied(graphCanvasNodeId); - Nodes::CopySlotTranslationKeyedNamesToDatums(graphCanvasNodeId); + Nodes::UpdateSlotDatumLabels(graphCanvasNodeId); } m_wrappedNodeGroupings.clear(); @@ -1950,7 +1986,7 @@ namespace ScriptCanvasEditor for (AZ::EntityId graphCanvasNodeId : graphCanvasNodeIds) { - Nodes::CopySlotTranslationKeyedNamesToDatums(graphCanvasNodeId); + Nodes::UpdateSlotDatumLabels(graphCanvasNodeId); } GraphCanvas::ViewId viewId; @@ -3352,11 +3388,6 @@ namespace ScriptCanvasEditor } } - void Graph::SetAssetType(AZ::Data::AssetType assetType) - { - m_assetType = assetType; - } - void Graph::ReportError(const ScriptCanvas::Node& node, const AZStd::string& errorSource, const AZStd::string& errorMessage) { AzQtComponents::ToastConfiguration toastConfiguration(AzQtComponents::ToastType::Error, errorSource.c_str(), errorMessage.c_str()); @@ -3461,7 +3492,7 @@ namespace ScriptCanvasEditor m_focusHelper.SetActiveGraph(GetGraphCanvasGraphId()); } - bool Graph::UpgradeGraph(const AZ::Data::Asset& asset, UpgradeRequest request, bool isVerbose) + bool Graph::UpgradeGraph(SourceHandle& asset, UpgradeRequest request, bool isVerbose) { m_upgradeSM.SetAsset(asset); m_upgradeSM.SetVerbose(isVerbose); diff --git a/Gems/ScriptCanvas/Code/Editor/Components/EditorScriptCanvasComponent.cpp b/Gems/ScriptCanvas/Code/Editor/Components/EditorScriptCanvasComponent.cpp index 043e034062..f8f867d7e3 100644 --- a/Gems/ScriptCanvas/Code/Editor/Components/EditorScriptCanvasComponent.cpp +++ b/Gems/ScriptCanvas/Code/Editor/Components/EditorScriptCanvasComponent.cpp @@ -6,7 +6,6 @@ * */ - #include #include #include @@ -14,30 +13,35 @@ #include #include #include +#include #include #include #include #include #include #include -#include +#include #include #include -#include + +#include #include +#include #include #include #include +#include #include #include - namespace EditorScriptCanvasComponentCpp { enum Version { PrefabIntegration = 10, - + InternalDev, + AddSourceHandle, + RefactorAssets, // add description above Current }; @@ -56,15 +60,15 @@ namespace ScriptCanvasEditor } auto assetElement = rootElement.GetSubElement(assetElementIndex); - AZ::Data::Asset scriptCanvasAsset; + AZ::Data::Asset scriptCanvasAsset; if (!assetElement.GetData(scriptCanvasAsset)) { AZ_Error("Script Canvas", false, "Unable to find Script Canvas Asset on a Version %u Editor ScriptCanvas Component", rootElement.GetVersion()); return false; } - ScriptCanvasAssetHolder assetHolder; - assetHolder.SetAsset(scriptCanvasAsset.GetId()); + Deprecated::ScriptCanvasAssetHolder assetHolder; + assetHolder.m_scriptCanvasAsset = scriptCanvasAsset; if (!rootElement.AddElementWithData(serializeContext, "m_assetHolder", assetHolder)) { @@ -112,7 +116,7 @@ namespace ScriptCanvasEditor auto& scriptCanvasAssetHolderElement = rootElement.GetSubElement(scriptCanvasAssetHolderElementIndex); - ScriptCanvasAssetHolder assetHolder; + Deprecated::ScriptCanvasAssetHolder assetHolder; if (!scriptCanvasAssetHolderElement.GetData(assetHolder)) { AZ_Error("ScriptCanvas", false, "EditorScriptCanvasComponent conversion failed: could not retrieve old 'm_assetHolder'"); @@ -128,7 +132,7 @@ namespace ScriptCanvasEditor } ScriptCanvasBuilder::BuildVariableOverrides overrides; - overrides.m_source = AZ::Data::Asset(assetHolder.GetAssetId(), assetHolder.GetAssetType(), assetHolder.GetAssetHint());; + overrides.m_source = SourceHandle(nullptr, assetHolder.m_scriptCanvasAsset.GetId().m_guid, {}); for (auto& variable : editableData.GetVariables()) { @@ -142,6 +146,28 @@ namespace ScriptCanvasEditor } } + auto scriptCanvasAssetHolderElementIndex = rootElement.FindElement(AZ_CRC_CE("m_assetHolder")); + if (scriptCanvasAssetHolderElementIndex != -1) + { + auto& scriptCanvasAssetHolderElement = rootElement.GetSubElement(scriptCanvasAssetHolderElementIndex); + Deprecated::ScriptCanvasAssetHolder assetHolder; + + if (!scriptCanvasAssetHolderElement.GetData(assetHolder)) + { + AZ_Error("ScriptCanvas", false, "EditorScriptCanvasComponent conversion failed: could not retrieve old 'm_assetHolder'"); + return false; + } + + auto assetId = assetHolder.m_scriptCanvasAsset.GetId(); + auto path = assetHolder.m_scriptCanvasAsset.GetHint(); + + if (!rootElement.AddElementWithData(serializeContext, "sourceHandle", SourceHandle(nullptr, assetId.m_guid, path))) + { + AZ_Error("ScriptCanvas", false, "EditorScriptCanvasComponent conversion failed: failed to add 'sourceHandle'"); + return false; + } + } + return true; } @@ -153,9 +179,9 @@ namespace ScriptCanvasEditor serializeContext->Class() ->Version(EditorScriptCanvasComponentCpp::Version::Current, &EditorScriptCanvasComponentVersionConverter) ->Field("m_name", &EditorScriptCanvasComponent::m_name) - ->Field("m_assetHolder", &EditorScriptCanvasComponent::m_scriptCanvasAssetHolder) ->Field("runtimeDataIsValid", &EditorScriptCanvasComponent::m_runtimeDataIsValid) ->Field("runtimeDataOverrides", &EditorScriptCanvasComponent::m_variableOverrides) + ->Field("sourceHandle", &EditorScriptCanvasComponent::m_sourceHandle) ; if (AZ::EditContext* editContext = serializeContext->GetEditContext()) @@ -166,34 +192,38 @@ namespace ScriptCanvasEditor ->Attribute(AZ::Edit::Attributes::Icon, "Icons/ScriptCanvas/ScriptCanvas.svg") ->Attribute(AZ::Edit::Attributes::ViewportIcon, "Icons/ScriptCanvas/Viewport/ScriptCanvas.svg") ->Attribute(AZ::Edit::Attributes::AutoExpand, true) - ->Attribute(AZ::Edit::Attributes::PrimaryAssetType, ScriptCanvasAssetHandler::GetAssetTypeStatic()) ->Attribute(AZ::Edit::Attributes::AppearsInAddComponentMenu, AZ_CRC("Game", 0x232b318c)) ->Attribute(AZ::Edit::Attributes::AppearsInAddComponentMenu, AZ_CRC("UI", 0x27ff46b0)) ->Attribute(AZ::Edit::Attributes::AppearsInAddComponentMenu, AZ_CRC("Level", 0x9aeacc13)) ->Attribute(AZ::Edit::Attributes::HelpPageURL, "https://o3de.org/docs/user-guide/components/reference/scripting/script-canvas/") - ->DataElement(AZ::Edit::UIHandlers::Default, &EditorScriptCanvasComponent::m_scriptCanvasAssetHolder, "Script Canvas Asset", "Script Canvas asset associated with this component") - ->Attribute(AZ::Edit::Attributes::Visibility, AZ::Edit::PropertyVisibility::ShowChildrenOnly) + ->DataElement(AZ::Edit::UIHandlers::Default, &EditorScriptCanvasComponent::m_sourceHandle, "Script Canvas Source File", "Script Canvas source file associated with this component") + ->Attribute("BrowseIcon", ":/stylesheet/img/UI20/browse-edit-select-files.svg") + ->Attribute("EditButton", "") + ->Attribute("EditDescription", "Open in Script Canvas Editor") + ->Attribute("EditCallback", &EditorScriptCanvasComponent::OpenEditor) + ->Attribute(AZ::Edit::Attributes::AssetPickerTitle, "Script Canvas") + ->Attribute(AZ::Edit::Attributes::SourceAssetFilterPattern, "*.scriptcanvas") + ->Attribute(AZ::Edit::Attributes::ChangeNotify, &EditorScriptCanvasComponent::OnFileSelectionChanged) ->DataElement(AZ::Edit::UIHandlers::Default, &EditorScriptCanvasComponent::m_variableOverrides, "Properties", "Script Canvas Graph Properties") - ->Attribute(AZ::Edit::Attributes::Visibility, AZ::Edit::PropertyVisibility::ShowChildrenOnly) + ->Attribute(AZ::Edit::Attributes::Visibility, AZ::Edit::PropertyVisibility::ShowChildrenOnly) ; } } + + if (AZ::JsonRegistrationContext* jsonContext = azrtti_cast(context)) + { + jsonContext->Serializer()->HandlesType(); + } } EditorScriptCanvasComponent::EditorScriptCanvasComponent() - : EditorScriptCanvasComponent(AZ::Data::Asset()) + : EditorScriptCanvasComponent(SourceHandle()) { } - EditorScriptCanvasComponent::EditorScriptCanvasComponent(AZ::Data::Asset asset) - : m_scriptCanvasAssetHolder() + EditorScriptCanvasComponent::EditorScriptCanvasComponent(const SourceHandle& sourceHandle) + : m_sourceHandle(sourceHandle) { - if (asset.GetId().IsValid()) - { - m_scriptCanvasAssetHolder.SetAsset(asset.GetId()); - } - - m_scriptCanvasAssetHolder.SetScriptChangedCB([this](AZ::Data::AssetId assetId) { OnScriptCanvasAssetChanged(assetId); }); } EditorScriptCanvasComponent::~EditorScriptCanvasComponent() @@ -209,50 +239,34 @@ namespace ScriptCanvasEditor void EditorScriptCanvasComponent::UpdateName() { - AZ::Data::AssetId assetId = m_scriptCanvasAssetHolder.GetAssetId(); - if (assetId.IsValid()) + SetName(m_sourceHandle.Path().Filename().Native()); + } + + void EditorScriptCanvasComponent::OpenEditor([[maybe_unused]] const AZ::Data::AssetId& assetId, const AZ::Data::AssetType&) + { + AzToolsFramework::OpenViewPane(LyViewPane::ScriptCanvas); + + AZ::Outcome openOutcome = AZ::Failure(AZStd::string()); + + if (m_sourceHandle.IsDescriptionValid()) { - // Pathname from the asset doesn't seem to return a value unless the asset has been loaded up once(which isn't done until we try to show it). - // Using the Job system to determine the asset name instead. - AZ::Outcome jobOutcome = AZ::Failure(); - AzToolsFramework::AssetSystemJobRequestBus::BroadcastResult(jobOutcome, &AzToolsFramework::AssetSystemJobRequestBus::Events::GetAssetJobsInfoByAssetID, assetId, false, false); + GeneralRequestBus::BroadcastResult(openOutcome, &GeneralRequests::OpenScriptCanvasAsset, m_sourceHandle, Tracker::ScriptCanvasFileState::UNMODIFIED, -1); - AZStd::string assetPath; - AZStd::string assetName; - - if (jobOutcome.IsSuccess()) + if (!openOutcome) { - AzToolsFramework::AssetSystem::JobInfoContainer& jobs = jobOutcome.GetValue(); - - // Get the asset relative path - if (!jobs.empty()) - { - assetPath = jobs[0].m_sourceFile; - } - - // Get the asset file name - assetName = assetPath; - - if (!assetPath.empty()) - { - AzFramework::StringFunc::Path::GetFileName(assetPath.c_str(), assetName); - SetName(assetName); - } + AZ_Warning("Script Canvas", openOutcome, "%s", openOutcome.GetError().data()); } } - } - - void EditorScriptCanvasComponent::OpenEditor() - { - m_scriptCanvasAssetHolder.OpenEditor(); - } - - void EditorScriptCanvasComponent::CloseGraph() - { - AZ::Data::AssetId assetId = m_scriptCanvasAssetHolder.GetAssetId(); - if (assetId.IsValid()) + else if (GetEntityId().IsValid()) { - GeneralRequestBus::Broadcast(&GeneralRequests::CloseScriptCanvasAsset, assetId); + AzToolsFramework::EntityIdList selectedEntityIds; + AzToolsFramework::ToolsApplicationRequestBus::BroadcastResult(selectedEntityIds, &AzToolsFramework::ToolsApplicationRequests::GetSelectedEntities); + + // Going to bypass the multiple selected entities flow for right now. + if (selectedEntityIds.size() == 1) + { + GeneralRequestBus::Broadcast(&GeneralRequests::CreateScriptCanvasAssetFor, AZStd::make_pair(GetEntityId(), GetId())); + } } } @@ -261,7 +275,11 @@ namespace ScriptCanvasEditor EditorComponentBase::Init(); AzFramework::AssetCatalogEventBus::Handler::BusConnect(); AzToolsFramework::EditorEntityContextNotificationBus::Handler::BusConnect(); - m_scriptCanvasAssetHolder.Init(GetEntityId(), GetId()); + } + + void EditorScriptCanvasComponent::InitializeSource(const SourceHandle& sourceHandle) + { + m_sourceHandle = sourceHandle.Describe(); } //========================================================================= @@ -269,6 +287,8 @@ namespace ScriptCanvasEditor { EditorComponentBase::Activate(); + AzToolsFramework::AssetSystemBus::Handler::BusConnect(); + AZ::EntityId entityId = GetEntityId(); EditorContextMenuRequestBus::Handler::BusConnect(entityId); @@ -277,19 +297,15 @@ namespace ScriptCanvasEditor EditorScriptCanvasComponentLoggingBus::Handler::BusConnect(entityId); EditorLoggingComponentNotificationBus::Broadcast(&EditorLoggingComponentNotifications::OnEditorScriptCanvasComponentActivated, GetNamedEntityId(), GetGraphIdentifier()); - AZ::Data::AssetId fileAssetId = m_scriptCanvasAssetHolder.GetAssetId(); + CompleteDescriptionInPlace(m_sourceHandle); - if (fileAssetId.IsValid()) - { - AssetTrackerNotificationBus::Handler::BusConnect(fileAssetId); - AzToolsFramework::ToolsApplicationNotificationBus::Broadcast(&AzToolsFramework::ToolsApplicationEvents::InvalidatePropertyDisplay, AzToolsFramework::Refresh_EntireTree_NewContent); - } + AzToolsFramework::ToolsApplicationNotificationBus::Broadcast(&AzToolsFramework::ToolsApplicationEvents::InvalidatePropertyDisplay, AzToolsFramework::Refresh_EntireTree_NewContent); } //========================================================================= void EditorScriptCanvasComponent::Deactivate() { - AssetTrackerNotificationBus::Handler::BusDisconnect(); + AzToolsFramework::AssetSystemBus::Handler::BusDisconnect(); EditorScriptCanvasComponentLoggingBus::Handler::BusDisconnect(); EditorLoggingComponentNotificationBus::Broadcast(&EditorLoggingComponentNotifications::OnEditorScriptCanvasComponentDeactivated, GetNamedEntityId(), GetGraphIdentifier()); @@ -303,10 +319,11 @@ namespace ScriptCanvasEditor void EditorScriptCanvasComponent::BuildGameEntityData() { using namespace ScriptCanvasBuilder; + CompleteDescriptionInPlace(m_sourceHandle); m_runtimeDataIsValid = false; - auto assetTreeOutcome = LoadEditorAssetTree(m_scriptCanvasAssetHolder.GetAssetId(), m_scriptCanvasAssetHolder.GetAssetHint()); + auto assetTreeOutcome = LoadEditorAssetTree(m_sourceHandle); if (!assetTreeOutcome.IsSuccess()) { AZ_Warning("ScriptCanvas", false, "EditorScriptCanvasComponent::BuildGameEntityData failed: %s", assetTreeOutcome.GetError().c_str()); @@ -328,6 +345,7 @@ namespace ScriptCanvasEditor } m_variableOverrides = parseOutcome.TakeValue(); + m_variableOverrides.SetHandlesToDescription(); m_runtimeDataIsValid = true; } @@ -344,7 +362,8 @@ namespace ScriptCanvasEditor if (!m_runtimeDataIsValid) { - AZ_Error("ScriptCanvasBuilder", false, "Runtime information did not build for ScriptCanvas Component using asset: %s", m_scriptCanvasAssetHolder.GetAssetId().ToString().c_str()); + AZ_Error("ScriptCanvasBuilder", false, "Runtime information did not build for ScriptCanvas Component using asset: %s" + , m_sourceHandle.ToString().c_str()); return; } @@ -352,172 +371,118 @@ namespace ScriptCanvasEditor runtimeComponent->TakeRuntimeDataOverrides(ConvertToRuntime(m_variableOverrides)); } - void EditorScriptCanvasComponent::OnCatalogAssetAdded(const AZ::Data::AssetId& assetId) - { - if (m_removedCatalogId == assetId) - { - if (!m_scriptCanvasAssetHolder.GetAssetId().IsValid()) - { - SetPrimaryAsset(assetId); - m_removedCatalogId.SetInvalid(); - } - } - } - void EditorScriptCanvasComponent::OnCatalogAssetRemoved(const AZ::Data::AssetId& removedAssetId, const AZ::Data::AssetInfo& /*assetInfo*/) - { - AZ::Data::AssetId assetId = m_scriptCanvasAssetHolder.GetAssetId(); - if (assetId == removedAssetId) - { - m_removedCatalogId = assetId; - SetPrimaryAsset({}); - } - } - void EditorScriptCanvasComponent::SetPrimaryAsset(const AZ::Data::AssetId& assetId) { - m_scriptCanvasAssetHolder.ClearAsset(); - - if (assetId.IsValid()) - { - ScriptCanvasMemoryAsset::pointer memoryAsset; - AssetTrackerRequestBus::BroadcastResult(memoryAsset, &AssetTrackerRequests::GetAsset, assetId); - - if (memoryAsset) - { - m_scriptCanvasAssetHolder.SetAsset(memoryAsset->GetFileAssetId()); - OnScriptCanvasAssetChanged(memoryAsset->GetFileAssetId()); - SetName(memoryAsset->GetTabName()); - } - else - { - auto scriptCanvasAsset = AZ::Data::AssetManager::Instance().FindAsset(assetId, AZ::Data::AssetLoadBehavior::Default); - if (scriptCanvasAsset) - { - m_scriptCanvasAssetHolder.SetAsset(assetId); - } - } - } - + m_sourceHandle = SourceHandle(nullptr, assetId.m_guid, {}); + CompleteDescriptionInPlace(m_sourceHandle); + OnScriptCanvasAssetChanged(SourceChangeDescription::SelectionChanged); + SetName(m_sourceHandle.Path().Filename().Native()); AzToolsFramework::ToolsApplicationEvents::Bus::Broadcast(&AzToolsFramework::ToolsApplicationEvents::InvalidatePropertyDisplay, AzToolsFramework::Refresh_AttributesAndValues); } AZ::Data::AssetId EditorScriptCanvasComponent::GetAssetId() const { - return m_scriptCanvasAssetHolder.GetAssetId(); + return m_sourceHandle.Id(); } - AZ::EntityId EditorScriptCanvasComponent::GetGraphEntityId() const + AZ::u32 EditorScriptCanvasComponent::OnFileSelectionChanged() { - AZ::EntityId scriptCanvasEntityId; - AZ::Data::AssetId assetId = m_scriptCanvasAssetHolder.GetAssetId(); - - if (assetId.IsValid()) - { - AssetTrackerRequestBus::BroadcastResult(scriptCanvasEntityId, &AssetTrackerRequests::GetScriptCanvasId, assetId); - } - - return scriptCanvasEntityId; + m_sourceHandle = SourceHandle(nullptr, m_sourceHandle.Path()); + CompleteDescriptionInPlace(m_sourceHandle); + m_previousHandle = {}; + m_removedHandle = {}; + OnScriptCanvasAssetChanged(SourceChangeDescription::SelectionChanged); + return AZ::Edit::PropertyRefreshLevels::EntireTree; } - void EditorScriptCanvasComponent::OnAssetReady(const ScriptCanvasMemoryAsset::pointer asset) + void EditorScriptCanvasComponent::OnScriptCanvasAssetChanged(SourceChangeDescription changeDescription) { - OnScriptCanvasAssetReady(asset); - } - - void EditorScriptCanvasComponent::OnAssetSaved(const ScriptCanvasMemoryAsset::pointer asset, bool isSuccessful) - { - if (isSuccessful) - { - OnScriptCanvasAssetReady(asset); - } - } - - void EditorScriptCanvasComponent::OnAssetReloaded(const ScriptCanvasMemoryAsset::pointer asset) - { - OnScriptCanvasAssetReady(asset); - } - - void EditorScriptCanvasComponent::OnScriptCanvasAssetChanged(AZ::Data::AssetId assetId) - { - AssetTrackerNotificationBus::Handler::BusDisconnect(); ScriptCanvas::GraphIdentifier newIdentifier = GetGraphIdentifier(); - newIdentifier.m_assetId = assetId; + newIdentifier.m_assetId = m_sourceHandle.Id(); ScriptCanvas::GraphIdentifier oldIdentifier = GetGraphIdentifier(); - oldIdentifier.m_assetId = m_previousAssetId; + oldIdentifier.m_assetId = m_previousHandle.Id(); EditorLoggingComponentNotificationBus::Broadcast(&EditorLoggingComponentNotifications::OnAssetSwitched, GetNamedEntityId(), newIdentifier, oldIdentifier); - m_previousAssetId = m_scriptCanvasAssetHolder.GetAssetId(); + m_previousHandle = m_sourceHandle.Describe(); - // Only clear our variables when we are given a new asset id - // or when the asset was explicitly set to empty. - // - // i.e. do not clear variables when we lose the catalog asset. - if ((assetId.IsValid() && assetId != m_removedCatalogId) - || (!assetId.IsValid() && !m_removedCatalogId.IsValid())) + if (changeDescription == SourceChangeDescription::SelectionChanged) { ClearVariables(); } - if (assetId.IsValid()) - { - AssetTrackerNotificationBus::Handler::BusConnect(assetId); + m_sourceHandle = m_previousHandle; - ScriptCanvasMemoryAsset::pointer memoryAsset; - AssetTrackerRequestBus::BroadcastResult(memoryAsset, &AssetTrackerRequests::GetAsset, assetId); - if (memoryAsset && memoryAsset->GetAsset().GetStatus() == AZ::Data::AssetData::AssetStatus::Ready) - { - OnScriptCanvasAssetReady(memoryAsset); - } + if (m_sourceHandle.IsDescriptionValid()) + { + UpdatePropertyDisplay(); } AzToolsFramework::ToolsApplicationNotificationBus::Broadcast(&AzToolsFramework::ToolsApplicationEvents::InvalidatePropertyDisplay, AzToolsFramework::Refresh_EntireTree_NewContent); } - void EditorScriptCanvasComponent::OnStartPlayInEditor() + void EditorScriptCanvasComponent::SetAssetId(const SourceHandle& assetId) { - ScriptCanvas::Execution::PerformanceStatisticsEBus::Broadcast(&ScriptCanvas::Execution::PerformanceStatisticsBus::ClearSnaphotStatistics); - } - - void EditorScriptCanvasComponent::OnStopPlayInEditor() - { - AZ::ScriptSystemRequestBus::Broadcast(&AZ::ScriptSystemRequests::GarbageCollect); - } - - void EditorScriptCanvasComponent::SetAssetId(const AZ::Data::AssetId& assetId) - { - if (m_scriptCanvasAssetHolder.GetAssetId() != assetId) + if (m_sourceHandle.Describe() != assetId.Describe()) { // Invalidate the previously removed catalog id if we are setting a new asset id - m_removedCatalogId.SetInvalid(); - SetPrimaryAsset(assetId); + m_removedHandle = {}; + SetPrimaryAsset(assetId.Id()); + } + } + + void EditorScriptCanvasComponent::SourceFileChanged([[maybe_unused]] AZStd::string relativePath + , [[maybe_unused]] AZStd::string scanFolder, [[maybe_unused]] AZ::Uuid fileAssetId) + { + if (fileAssetId == m_sourceHandle.Id()) + { + if (auto handle = CompleteDescription(SourceHandle(nullptr, fileAssetId, {}))) + { + m_sourceHandle = *handle; + // consider queueing on tick bus + OnScriptCanvasAssetChanged(SourceChangeDescription::Modified); + } + } + } + + void EditorScriptCanvasComponent::SourceFileRemoved([[maybe_unused]] AZStd::string relativePath + , [[maybe_unused]] AZStd::string scanFolder, [[maybe_unused]] AZ::Uuid fileAssetId) + { + if (fileAssetId == m_sourceHandle.Id()) + { + m_removedHandle = m_sourceHandle; + OnScriptCanvasAssetChanged(SourceChangeDescription::Removed); + } + } + + void EditorScriptCanvasComponent::SourceFileFailed([[maybe_unused]] AZStd::string relativePath + , [[maybe_unused]] AZStd::string scanFolder, [[maybe_unused]] AZ::Uuid fileAssetId) + { + if (fileAssetId == m_sourceHandle.Id()) + { + m_removedHandle = m_sourceHandle; + OnScriptCanvasAssetChanged(SourceChangeDescription::Error); } } bool EditorScriptCanvasComponent::HasAssetId() const { - return m_scriptCanvasAssetHolder.GetAssetId().IsValid(); + return !m_sourceHandle.Id().IsNull(); } ScriptCanvas::GraphIdentifier EditorScriptCanvasComponent::GetGraphIdentifier() const { // For now we don't want to deal with disambiguating duplicates of the same script running on one entity. // Should that change we need to add the component id back into this. - return ScriptCanvas::GraphIdentifier(m_scriptCanvasAssetHolder.GetAssetId(), 0); + return ScriptCanvas::GraphIdentifier(m_sourceHandle.Id(), 0); } - void EditorScriptCanvasComponent::OnScriptCanvasAssetReady(const ScriptCanvasMemoryAsset::pointer memoryAsset) + void EditorScriptCanvasComponent::UpdatePropertyDisplay() { - if (memoryAsset->GetFileAssetId() == m_scriptCanvasAssetHolder.GetAssetId()) - { - auto assetData = memoryAsset->GetAsset(); - [[maybe_unused]] AZ::Entity* scriptCanvasEntity = assetData->GetScriptCanvasEntity(); - AZ_Assert(scriptCanvasEntity, "This graph must have a valid entity"); - BuildGameEntityData(); - UpdateName(); - AzToolsFramework::ToolsApplicationNotificationBus::Broadcast(&AzToolsFramework::ToolsApplicationEvents::InvalidatePropertyDisplay, AzToolsFramework::Refresh_EntireTree_NewContent); - } + BuildGameEntityData(); + UpdateName(); + AzToolsFramework::ToolsApplicationNotificationBus::Broadcast(&AzToolsFramework::ToolsApplicationEvents::InvalidatePropertyDisplay, AzToolsFramework::Refresh_EntireTree_NewContent); } void EditorScriptCanvasComponent::ClearVariables() diff --git a/Gems/ScriptCanvas/Code/Editor/Components/EditorUtils.cpp b/Gems/ScriptCanvas/Code/Editor/Components/EditorUtils.cpp index 650be01387..363f477fbf 100644 --- a/Gems/ScriptCanvas/Code/Editor/Components/EditorUtils.cpp +++ b/Gems/ScriptCanvas/Code/Editor/Components/EditorUtils.cpp @@ -17,6 +17,7 @@ AZ_POP_DISABLE_WARNING #include #include #include +#include #include #include @@ -30,6 +31,57 @@ AZ_POP_DISABLE_WARNING namespace ScriptCanvasEditor { + AZStd::optional CompleteDescription(const SourceHandle& source) + { + AzToolsFramework::AssetSystemRequestBus::Events* assetSystem = AzToolsFramework::AssetSystemRequestBus::FindFirstHandler(); + if (assetSystem) + { + AZStd::string watchFolder; + AZ::Data::AssetInfo assetInfo; + + if (!source.Id().IsNull()) + { + if (assetSystem->GetSourceInfoBySourceUUID(source.Id(), assetInfo, watchFolder)) + { + AZ::IO::Path watchPath(watchFolder); + AZ::IO::Path assetInfoPath(assetInfo.m_relativePath); + SourceHandle fullPathHandle(nullptr, assetInfo.m_assetId.m_guid, watchPath / assetInfoPath); + + if (assetSystem->GetSourceInfoBySourcePath(fullPathHandle.Path().c_str(), assetInfo, watchFolder) && assetInfo.m_assetId.IsValid()) + { + AZ_Warning("ScriptCanvas", assetInfo.m_assetId.m_guid == source.Id(), "SourceHandle completion produced conflicting AssetId."); + auto path = fullPathHandle.Path(); + return SourceHandle(source, assetInfo.m_assetId.m_guid, path.MakePreferred()); + } + } + } + + if (!source.Path().empty()) + { + if (assetSystem->GetSourceInfoBySourcePath(source.Path().c_str(), assetInfo, watchFolder) && assetInfo.m_assetId.IsValid()) + { + return SourceHandle(source, assetInfo.m_assetId.m_guid, source.Path()); + } + } + } + + + return AZStd::nullopt; + } + + bool CompleteDescriptionInPlace(SourceHandle& source) + { + if (auto completed = CompleteDescription(source)) + { + source = *completed; + return true; + } + else + { + return false; + } + } + ////////////////////////// // NodeIdentifierFactory ////////////////////////// diff --git a/Gems/ScriptCanvas/Code/Editor/Components/GraphUpgrade.cpp b/Gems/ScriptCanvas/Code/Editor/Components/GraphUpgrade.cpp index 0e5f11fa40..fec813b0c1 100644 --- a/Gems/ScriptCanvas/Code/Editor/Components/GraphUpgrade.cpp +++ b/Gems/ScriptCanvas/Code/Editor/Components/GraphUpgrade.cpp @@ -438,10 +438,11 @@ namespace ScriptCanvasEditor if (nodeConfig.IsValid()) { ScriptCanvas::NodeUpdateSlotReport nodeUpdateSlotReport; + auto nodeEntity = node->GetEntityId(); auto nodeOutcome = graph->ReplaceNodeByConfig(node, nodeConfig, nodeUpdateSlotReport); if (nodeOutcome.IsSuccess()) { - ScriptCanvas::MergeUpdateSlotReport(node->GetEntityId(), sm->m_updateReport, nodeUpdateSlotReport); + ScriptCanvas::MergeUpdateSlotReport(nodeEntity, sm->m_updateReport, nodeUpdateSlotReport); sm->m_allNodes.erase(node); sm->m_outOfDateNodes.erase(node); @@ -675,20 +676,20 @@ namespace ScriptCanvasEditor RegisterState(ParseGraph); } - void EditorGraphUpgradeMachine::SetAsset(const AZ::Data::Asset& asset) + void EditorGraphUpgradeMachine::SetAsset(SourceHandle& asset) { if (m_asset != asset) { m_asset = asset; - SetDebugPrefix(asset.GetHint()); + SetDebugPrefix(asset.Path().c_str()); } } void EditorGraphUpgradeMachine::OnComplete(IState::ExitStatus exitStatus) { UpgradeNotificationsBus::Broadcast(&UpgradeNotifications::OnGraphUpgradeComplete, m_asset, exitStatus == IState::ExitStatus::Skipped); - - m_asset = {}; + // releasing the asset at this stage of the system tick causes a memory crash + // m_asset = {}; } ////////////////////////////////////////////////////////////////////// diff --git a/Gems/ScriptCanvas/Code/Editor/Framework/ScriptCanvasGraphUtilities.h b/Gems/ScriptCanvas/Code/Editor/Framework/ScriptCanvasGraphUtilities.h index 4d1be42d35..8593429b92 100644 --- a/Gems/ScriptCanvas/Code/Editor/Framework/ScriptCanvasGraphUtilities.h +++ b/Gems/ScriptCanvas/Code/Editor/Framework/ScriptCanvasGraphUtilities.h @@ -11,6 +11,7 @@ #include #include #include +#include namespace ScriptCanvas { diff --git a/Gems/ScriptCanvas/Code/Editor/Framework/ScriptCanvasGraphUtilities.inl b/Gems/ScriptCanvas/Code/Editor/Framework/ScriptCanvasGraphUtilities.inl index 05541196f7..f4e97600bc 100644 --- a/Gems/ScriptCanvas/Code/Editor/Framework/ScriptCanvasGraphUtilities.inl +++ b/Gems/ScriptCanvas/Code/Editor/Framework/ScriptCanvasGraphUtilities.inl @@ -10,14 +10,13 @@ #include #include #include -#include #include #include #include #include #include #include -#include + #include #include #include @@ -31,8 +30,8 @@ namespace ScriptCanvasEditor // over to the override data to simulate build step that does this when building prefabs AZ_INLINE void CopyAssetEntityIdsToOverrides(RuntimeDataOverrides& runtimeDataOverrides) { - runtimeDataOverrides.m_entityIds.reserve(runtimeDataOverrides.m_runtimeAsset->GetData().m_input.m_entityIds.size()); - for (auto& varEntityPar : runtimeDataOverrides.m_runtimeAsset->GetData().m_input.m_entityIds) + runtimeDataOverrides.m_entityIds.reserve(runtimeDataOverrides.m_runtimeAsset->m_runtimeData.m_input.m_entityIds.size()); + for (auto& varEntityPar : runtimeDataOverrides.m_runtimeAsset->m_runtimeData.m_input.m_entityIds) { runtimeDataOverrides.m_entityIds.push_back(varEntityPar.second); } @@ -75,7 +74,7 @@ namespace ScriptCanvasEditor AZ_Assert(loadResult.m_runtimeAsset, "failed to load dependent asset"); AZ::Outcome luaAssetOutcome = AZ::Failure(AZStd::string("lua asset creation for function failed")); - ScriptCanvasEditor::EditorAssetConversionBus::BroadcastResult(luaAssetOutcome, &ScriptCanvasEditor::EditorAssetConversionBusTraits::CreateLuaAsset, loadResult.m_editorAsset, loadResult.m_graphPath); + ScriptCanvasEditor::EditorAssetConversionBus::BroadcastResult(luaAssetOutcome, &ScriptCanvasEditor::EditorAssetConversionBusTraits::CreateLuaAsset, loadResult.m_editorAsset, loadResult.m_editorAsset.Path().c_str()); AZ_Assert(luaAssetOutcome.IsSuccess(), "failed to create Lua asset"); AZStd::string modulePath = namespacePath[0].data(); @@ -112,18 +111,19 @@ namespace ScriptCanvasEditor AZ_INLINE LoadTestGraphResult LoadTestGraph(AZStd::string_view graphPath) { - AZ::Data::Asset editorAsset; - ScriptCanvasEditor::EditorAssetConversionBus::BroadcastResult(editorAsset, &ScriptCanvasEditor::EditorAssetConversionBusTraits::LoadAsset, graphPath); - - if (editorAsset.GetData()) + if (auto loadFileOutcome = LoadFromFile(graphPath); loadFileOutcome.IsSuccess()) { - AZ::Outcome< AZ::Data::Asset, AZStd::string> assetOutcome = AZ::Failure(AZStd::string("asset creation failed")); - ScriptCanvasEditor::EditorAssetConversionBus::BroadcastResult(assetOutcome, &ScriptCanvasEditor::EditorAssetConversionBusTraits::CreateRuntimeAsset, editorAsset); + auto& source = loadFileOutcome.GetValue(); + auto testableSource = SourceHandle(source, AZ::Uuid::CreateRandom(), source.Path().c_str()); + + AZ::Outcome, AZStd::string> assetOutcome(AZ::Failure(AZStd::string("asset create failed"))); + ScriptCanvasEditor::EditorAssetConversionBus::BroadcastResult(assetOutcome + , &ScriptCanvasEditor::EditorAssetConversionBusTraits::CreateRuntimeAsset, testableSource); + if (assetOutcome.IsSuccess()) { LoadTestGraphResult result; - result.m_graphPath = graphPath; - result.m_editorAsset = editorAsset; + result.m_editorAsset = AZStd::move(testableSource); result.m_runtimeAsset = assetOutcome.GetValue(); result.m_entity = AZStd::make_unique("Loaded Graph"); return result; @@ -149,37 +149,33 @@ namespace ScriptCanvasEditor } } - AZ_INLINE void RunEditorAsset(AZ::Data::Asset asset, Reporter& reporter, ScriptCanvas::ExecutionMode mode) + AZ_INLINE void RunEditorAsset(SourceHandle asset, Reporter& reporter, ScriptCanvas::ExecutionMode mode) { - if (asset.IsReady()) + AZ::Data::AssetId assetId = asset.Id(); + AZ::Data::AssetId runtimeAssetId(assetId.m_guid, AZ_CRC("RuntimeData", 0x163310ae)); + AZ::Data::Asset runtimeAsset; + if (!runtimeAsset.Create(runtimeAssetId, true)) { - AZ::Data::AssetId assetId = asset.GetId(); - AZ::Data::AssetId runtimeAssetId(assetId.m_guid, AZ_CRC("RuntimeData", 0x163310ae)); - AZ::Data::Asset runtimeAsset; - if (!runtimeAsset.Create(runtimeAssetId, true)) - { - return; - } - - reporter.SetExecutionMode(mode); - - LoadTestGraphResult loadResult; - loadResult.m_graphPath = asset.GetHint().c_str(); - loadResult.m_editorAsset = asset; - AZ::EntityId scriptCanvasId; - loadResult.m_entity = AZStd::make_unique("Loaded test graph"); - loadResult.m_runtimeAsset = runtimeAsset; - - RunGraphSpec runGraphSpec; - runGraphSpec.dirPath = ""; - runGraphSpec.graphPath = asset.GetHint().c_str(); - runGraphSpec.runSpec.duration.m_spec = eDuration::Ticks; - runGraphSpec.runSpec.duration.m_ticks = 10; - runGraphSpec.runSpec.execution = mode; - runGraphSpec.runSpec.release = true; - runGraphSpec.runSpec.debug = runGraphSpec.runSpec.traced = false; - RunGraphImplementation(runGraphSpec, loadResult, reporter); + return; } + + reporter.SetExecutionMode(mode); + + LoadTestGraphResult loadResult; + loadResult.m_editorAsset = SourceHandle(nullptr, assetId.m_guid, asset.Path()); + AZ::EntityId scriptCanvasId; + loadResult.m_entity = AZStd::make_unique("Loaded test graph"); + loadResult.m_runtimeAsset = runtimeAsset; + + RunGraphSpec runGraphSpec; + runGraphSpec.dirPath = ""; + runGraphSpec.graphPath = asset.Path().c_str(); + runGraphSpec.runSpec.duration.m_spec = eDuration::Ticks; + runGraphSpec.runSpec.duration.m_ticks = 10; + runGraphSpec.runSpec.execution = mode; + runGraphSpec.runSpec.release = true; + runGraphSpec.runSpec.debug = runGraphSpec.runSpec.traced = false; + RunGraphImplementation(runGraphSpec, loadResult, reporter); } AZ_INLINE void RunGraphImplementation(const RunGraphSpec& runGraphSpec, Reporter& reporter) @@ -206,7 +202,8 @@ namespace ScriptCanvasEditor { ScopedOutputSuppression outputSuppressor; AZ::Outcome luaAssetOutcome = AZ::Failure(AZStd::string("lua asset creation failed")); - ScriptCanvasEditor::EditorAssetConversionBus::BroadcastResult(luaAssetOutcome, &ScriptCanvasEditor::EditorAssetConversionBusTraits::CreateLuaAsset, loadResult.m_editorAsset, loadResult.m_graphPath); + ScriptCanvasEditor::EditorAssetConversionBus::BroadcastResult(luaAssetOutcome + , &ScriptCanvasEditor::EditorAssetConversionBusTraits::CreateLuaAsset, loadResult.m_editorAsset, loadResult.m_editorAsset.Path().c_str()); reporter.MarkParseAttemptMade(); if (luaAssetOutcome.IsSuccess()) @@ -220,6 +217,8 @@ namespace ScriptCanvasEditor { RuntimeDataOverrides runtimeDataOverrides; runtimeDataOverrides.m_runtimeAsset = loadResult.m_runtimeAsset; + runtimeDataOverrides.m_runtimeAsset.SetHint("original"); + runtimeDataOverrides.m_runtimeAsset.Get()->m_runtimeData.m_script.SetHint("original"); #if defined(LINUX) ////////////////////////////////////////////////////////////////////////// // Temporarily disable testing on the Linux build until the file name casing discrepancy @@ -265,6 +264,10 @@ namespace ScriptCanvasEditor RuntimeDataOverrides dependencyRuntimeDataOverrides; dependencyRuntimeDataOverrides.m_runtimeAsset = dependency.runtimeAsset; + AZStd::string dependencyHint = AZStd::string::format("dependency_%zu", index); + dependencyRuntimeDataOverrides.m_runtimeAsset.SetHint(dependencyHint); + dependencyRuntimeDataOverrides.m_runtimeAsset.Get()->m_runtimeData.m_script.SetHint(dependencyHint); + runtimeDataOverrides.m_dependencies.push_back(dependencyRuntimeDataOverrides); RuntimeData& dependencyData = dependencyDataBuffer[index]; @@ -278,14 +281,14 @@ namespace ScriptCanvasEditor #endif ////////////////////////////////////////////////////////////////////////////////////// loadResult.m_scriptAsset = luaAssetResult.m_scriptAsset; - loadResult.m_runtimeAsset.Get()->GetData().m_script = loadResult.m_scriptAsset; - loadResult.m_runtimeAsset.Get()->GetData().m_input = luaAssetResult.m_runtimeInputs; - loadResult.m_runtimeAsset.Get()->GetData().m_debugMap = luaAssetResult.m_debugMap; + loadResult.m_runtimeAsset.Get()->m_runtimeData.m_script = loadResult.m_scriptAsset; + loadResult.m_runtimeAsset.Get()->m_runtimeData.m_input = luaAssetResult.m_runtimeInputs; + loadResult.m_runtimeAsset.Get()->m_runtimeData.m_debugMap = luaAssetResult.m_debugMap; loadResult.m_runtimeComponent = loadResult.m_entity->CreateComponent(); CopyAssetEntityIdsToOverrides(runtimeDataOverrides); loadResult.m_runtimeComponent->TakeRuntimeDataOverrides(AZStd::move(runtimeDataOverrides)); - Execution::Context::InitializeActivationData(loadResult.m_runtimeAsset->GetData()); - Execution::InitializeInterpretedStatics(loadResult.m_runtimeAsset->GetData()); + Execution::Context::InitializeActivationData(loadResult.m_runtimeAsset->m_runtimeData); + Execution::InitializeInterpretedStatics(loadResult.m_runtimeAsset->m_runtimeData); } else { diff --git a/Gems/ScriptCanvas/Code/Editor/Framework/ScriptCanvasTraceUtilities.h b/Gems/ScriptCanvas/Code/Editor/Framework/ScriptCanvasTraceUtilities.h index a87f4450c2..4b10c71ba3 100644 --- a/Gems/ScriptCanvas/Code/Editor/Framework/ScriptCanvasTraceUtilities.h +++ b/Gems/ScriptCanvas/Code/Editor/Framework/ScriptCanvasTraceUtilities.h @@ -27,6 +27,7 @@ #include #include #include +#include namespace AZ { @@ -41,15 +42,12 @@ namespace ScriptCanvas namespace ScriptCanvasEditor { - class ScriptCanvasAsset; - struct LoadTestGraphResult { - AZStd::string_view m_graphPath; AZStd::unique_ptr m_entity; ScriptCanvas::RuntimeComponent* m_runtimeComponent = nullptr; bool m_nativeFunctionFound = false; - AZ::Data::Asset m_editorAsset; + SourceHandle m_editorAsset; AZ::Data::Asset m_runtimeAsset; AZ::Data::Asset m_scriptAsset; }; @@ -161,7 +159,7 @@ namespace ScriptCanvasEditor struct ScopedOutputSuppression { - ScopedOutputSuppression(bool suppressState = true) + ScopedOutputSuppression([[maybe_unused]] bool suppressState = true) { AZ::Debug::TraceMessageBus::BroadcastResult(m_oldSuppression, &AZ::Debug::TraceMessageEvents::OnOutput, "", ""); TraceSuppressionBus::Broadcast(&TraceSuppressionRequests::SuppressAllOutput, suppressState); diff --git a/Gems/ScriptCanvas/Code/Editor/GraphCanvas/Components/DynamicSlotComponent.cpp b/Gems/ScriptCanvas/Code/Editor/GraphCanvas/Components/DynamicSlotComponent.cpp index bdd0ddf2ac..715489280d 100644 --- a/Gems/ScriptCanvas/Code/Editor/GraphCanvas/Components/DynamicSlotComponent.cpp +++ b/Gems/ScriptCanvas/Code/Editor/GraphCanvas/Components/DynamicSlotComponent.cpp @@ -11,6 +11,7 @@ #include +#include #include #include diff --git a/Gems/ScriptCanvas/Code/Editor/GraphCanvas/Components/NodeDescriptors/EBusHandlerEventNodeDescriptorComponent.cpp b/Gems/ScriptCanvas/Code/Editor/GraphCanvas/Components/NodeDescriptors/EBusHandlerEventNodeDescriptorComponent.cpp index 82c764e2ef..dd7986a212 100644 --- a/Gems/ScriptCanvas/Code/Editor/GraphCanvas/Components/NodeDescriptors/EBusHandlerEventNodeDescriptorComponent.cpp +++ b/Gems/ScriptCanvas/Code/Editor/GraphCanvas/Components/NodeDescriptors/EBusHandlerEventNodeDescriptorComponent.cpp @@ -148,8 +148,6 @@ namespace ScriptCanvasEditor AZ::Entity* entity = nullptr; AZ::ComponentApplicationBus::BroadcastResult(entity, &AZ::ComponentApplicationBus::Events::FindEntity, scriptCanvasId); - AZStd::string ebusContextName = TranslationHelper::GetEbusHandlerContext(m_busName); - if (entity) { ScriptCanvas::Nodes::Core::EBusEventHandler* eventHandler = AZ::EntityUtils::FindFirstDerivedComponent(entity); @@ -190,52 +188,64 @@ namespace ScriptCanvasEditor if (scriptCanvasSlot && scriptCanvasSlot->IsVisible()) { - AZ::EntityId slotId = Nodes::DisplayScriptCanvasSlot(GetEntityId(), (*scriptCanvasSlot)); + auto graphCanvasSlotId = Nodes::DisplayScriptCanvasSlot(GetEntityId(), (*scriptCanvasSlot), 0); - GraphCanvas::SlotRequestBus::Event(slotId, &GraphCanvas::SlotRequests::SetTranslationKeyedName, TranslationHelper::GetEBusHandlerOnEventTriggeredNameKey()); - GraphCanvas::SlotRequestBus::Event(slotId, &GraphCanvas::SlotRequests::SetTranslationKeyedTooltip, TranslationHelper::GetEBusHandlerOnEventTriggeredTooltipKey()); + GraphCanvas::TranslationKey key; + key << "EBusHandler" << eventHandler->GetEBusName() << "methods" << m_eventName; + if (scriptCanvasSlot->IsExecution() && scriptCanvasSlot->IsOutput()) + { + key << "exit"; + } + else + { + key << "details"; + } + + GraphCanvas::TranslationRequests::Details details; + GraphCanvas::TranslationRequestBus::BroadcastResult(details, &GraphCanvas::TranslationRequests::GetDetails, key, details); + GraphCanvas::SlotRequestBus::Event(graphCanvasSlotId, &GraphCanvas::SlotRequests::SetName, details.m_name); + GraphCanvas::SlotRequestBus::Event(graphCanvasSlotId, &GraphCanvas::SlotRequests::SetTooltip, details.m_tooltip); } // // inputCount and outputCount work because the order of the slots is maintained from the BehaviorContext, if this changes // in the future then we should consider storing the actual offset or key name at that time. // - int inputCount = 0; - int outputCount = 0; + int paramIndex = 0; + int outputIndex = 0; for (const auto& slotId : myEvent.m_parameterSlotIds) { scriptCanvasSlot = eventHandler->GetSlot(slotId); if (scriptCanvasSlot && scriptCanvasSlot->IsVisible()) { - AZ::EntityId graphCanvasSlotId = Nodes::DisplayScriptCanvasSlot(GetEntityId(), (*scriptCanvasSlot)); + int& index = (scriptCanvasSlot->IsData() && scriptCanvasSlot->IsOutput()) ? outputIndex : paramIndex; - TranslationItemType itemType = TranslationHelper::GetItemType(scriptCanvasSlot->GetDescriptor()); + auto graphCanvasSlotId = Nodes::DisplayScriptCanvasSlot(GetEntityId(), (*scriptCanvasSlot), index); - GraphCanvas::TranslationKeyedString slotNameKeyedString(scriptCanvasSlot->GetName()); - slotNameKeyedString.m_context = ebusContextName; + GraphCanvas::TranslationRequests::Details details; - GraphCanvas::TranslationKeyedString slotTooltipKeyedString(scriptCanvasSlot->GetToolTip()); - slotTooltipKeyedString.m_context = ebusContextName; + if (scriptCanvasSlot->IsData()) + { + GraphCanvas::TranslationKey key; + key = "EBusHandler"; + key << eventHandler->GetEBusName() << "methods" << m_eventName << "params" << index << "details"; - slotNameKeyedString.SetFallback(scriptCanvasSlot->GetName()); - slotTooltipKeyedString.SetFallback(scriptCanvasSlot->GetToolTip()); + details.m_name = scriptCanvasSlot->GetName(); + + GraphCanvas::TranslationRequestBus::BroadcastResult(details, &GraphCanvas::TranslationRequests::GetDetails, key, details); + GraphCanvas::SlotRequestBus::Event(graphCanvasSlotId, &GraphCanvas::SlotRequests::SetName, details.m_name); + GraphCanvas::SlotRequestBus::Event(graphCanvasSlotId, &GraphCanvas::SlotRequests::SetTooltip, details.m_tooltip); + } if (scriptCanvasSlot->GetDescriptor() == ScriptCanvas::SlotDescriptors::DataOut()) { - slotNameKeyedString.m_key = TranslationHelper::GetEBusHandlerSlotKey(m_busName, m_eventName, itemType, TranslationKeyId::Name, outputCount); - slotTooltipKeyedString.m_key = TranslationHelper::GetEBusHandlerSlotKey(m_busName, m_eventName, itemType, TranslationKeyId::Tooltip, outputCount); - ++outputCount; + ++outputIndex; } else { - slotNameKeyedString.m_key = TranslationHelper::GetEBusHandlerSlotKey(m_busName, m_eventName, itemType, TranslationKeyId::Name, inputCount); - slotTooltipKeyedString.m_key = TranslationHelper::GetEBusHandlerSlotKey(m_busName, m_eventName, itemType, TranslationKeyId::Tooltip, inputCount); - ++inputCount; + ++paramIndex; } - - GraphCanvas::SlotRequestBus::Event(graphCanvasSlotId, &GraphCanvas::SlotRequests::SetTranslationKeyedName, slotNameKeyedString); - GraphCanvas::SlotRequestBus::Event(graphCanvasSlotId, &GraphCanvas::SlotRequests::SetTranslationKeyedTooltip, slotTooltipKeyedString); } } @@ -245,18 +255,7 @@ namespace ScriptCanvasEditor if (scriptCanvasSlot && scriptCanvasSlot->IsVisible()) { - AZ::EntityId graphCanvasSlotId = Nodes::DisplayScriptCanvasSlot(GetEntityId(), (*scriptCanvasSlot)); - - TranslationItemType itemType = TranslationHelper::GetItemType(scriptCanvasSlot->GetDescriptor()); - - GraphCanvas::TranslationKeyedString slotNameKeyedString(scriptCanvasSlot->GetName(), ebusContextName); - slotNameKeyedString.m_key = slotNameKeyedString.m_key = TranslationHelper::GetKey(TranslationContextGroup::EbusHandler, m_busName, m_eventName, itemType, TranslationKeyId::Name); - - GraphCanvas::TranslationKeyedString slotTooltipKeyedString(TranslationHelper::GetSafeTypeName(scriptCanvasSlot->GetDataType()), ebusContextName); - slotTooltipKeyedString.m_key = TranslationHelper::GetKey(TranslationContextGroup::EbusHandler, m_busName, m_eventName, itemType, TranslationKeyId::Tooltip); - - GraphCanvas::SlotRequestBus::Event(graphCanvasSlotId, &GraphCanvas::SlotRequests::SetTranslationKeyedName, slotNameKeyedString); - GraphCanvas::SlotRequestBus::Event(graphCanvasSlotId, &GraphCanvas::SlotRequests::SetTranslationKeyedTooltip, slotTooltipKeyedString); + Nodes::DisplayScriptCanvasSlot(GetEntityId(), (*scriptCanvasSlot), 0); } } @@ -345,9 +344,6 @@ namespace ScriptCanvasEditor if (connectionType == GraphCanvas::ConnectionType::CT_Output) { - GraphCanvas::SlotRequestBus::Event(slotId, &GraphCanvas::SlotRequests::SetTranslationKeyedName, TranslationHelper::GetEBusHandlerOnEventTriggeredNameKey()); - GraphCanvas::SlotRequestBus::Event(slotId, &GraphCanvas::SlotRequests::SetTranslationKeyedTooltip, TranslationHelper::GetEBusHandlerOnEventTriggeredTooltipKey()); - break; } } diff --git a/Gems/ScriptCanvas/Code/Editor/GraphCanvas/Components/NodeDescriptors/EBusHandlerNodeDescriptorComponent.cpp b/Gems/ScriptCanvas/Code/Editor/GraphCanvas/Components/NodeDescriptors/EBusHandlerNodeDescriptorComponent.cpp index 20ee9272d4..9e3e5d2b8e 100644 --- a/Gems/ScriptCanvas/Code/Editor/GraphCanvas/Components/NodeDescriptors/EBusHandlerNodeDescriptorComponent.cpp +++ b/Gems/ScriptCanvas/Code/Editor/GraphCanvas/Components/NodeDescriptors/EBusHandlerNodeDescriptorComponent.cpp @@ -210,10 +210,10 @@ namespace ScriptCanvasEditor { if (m_eventTypeToId.find(eventId) == m_eventTypeToId.end()) { - AZStd::string eventName; + AZStd::string eventName; for (const HandlerEventConfiguration& testEventConfiguration : eventConfigurations) - { + { if (testEventConfiguration.m_eventId == eventId) { eventName = testEventConfiguration.m_eventName; @@ -540,8 +540,11 @@ namespace ScriptCanvasEditor if (slotType == GraphCanvas::SlotTypes::DataSlot) { - GraphCanvas::SlotRequestBus::Event(testSlotId, &GraphCanvas::SlotRequests::SetTranslationKeyedName, TranslationHelper::GetEBusHandlerBusIdNameKey()); - GraphCanvas::SlotRequestBus::Event(testSlotId, &GraphCanvas::SlotRequests::SetTranslationKeyedTooltip, TranslationHelper::GetEBusHandlerBusIdTooltipKey()); + GraphCanvas::TranslationKey key; + key << Translation::GlobalKeys::EBusHandlerIDKey << ".details"; + GraphCanvas::TranslationRequests::Details details; + GraphCanvas::TranslationRequestBus::BroadcastResult(details, &GraphCanvas::TranslationRequests::GetDetails, key, details); + GraphCanvas::SlotRequestBus::Event(testSlotId, &GraphCanvas::SlotRequests::SetDetails, details.m_name, details.m_tooltip); break; } } diff --git a/Gems/ScriptCanvas/Code/Editor/GraphCanvas/Components/NodeDescriptors/EBusSenderNodeDescriptorComponent.cpp b/Gems/ScriptCanvas/Code/Editor/GraphCanvas/Components/NodeDescriptors/EBusSenderNodeDescriptorComponent.cpp index 5872925b39..7876e44140 100644 --- a/Gems/ScriptCanvas/Code/Editor/GraphCanvas/Components/NodeDescriptors/EBusSenderNodeDescriptorComponent.cpp +++ b/Gems/ScriptCanvas/Code/Editor/GraphCanvas/Components/NodeDescriptors/EBusSenderNodeDescriptorComponent.cpp @@ -68,9 +68,6 @@ namespace ScriptCanvasEditor if (currentSlotId == slotId) { - GraphCanvas::SlotRequestBus::Event(graphCanvasId, &GraphCanvas::SlotRequests::SetTranslationKeyedName, TranslationHelper::GetEBusSenderBusIdNameKey()); - GraphCanvas::SlotRequestBus::Event(graphCanvasId, &GraphCanvas::SlotRequests::SetTranslationKeyedTooltip, TranslationHelper::GetEBusSenderBusIdTooltipKey()); - break; } } diff --git a/Gems/ScriptCanvas/Code/Editor/GraphCanvas/Components/NodeDescriptors/FunctionNodeDescriptorComponent.cpp b/Gems/ScriptCanvas/Code/Editor/GraphCanvas/Components/NodeDescriptors/FunctionNodeDescriptorComponent.cpp index db41fa70ca..c8de1e892a 100644 --- a/Gems/ScriptCanvas/Code/Editor/GraphCanvas/Components/NodeDescriptors/FunctionNodeDescriptorComponent.cpp +++ b/Gems/ScriptCanvas/Code/Editor/GraphCanvas/Components/NodeDescriptors/FunctionNodeDescriptorComponent.cpp @@ -14,7 +14,6 @@ #include #include -#include #include #include @@ -89,15 +88,9 @@ namespace ScriptCanvasEditor bool FunctionNodeDescriptorComponent::OnMouseDoubleClick(const QGraphicsSceneMouseEvent*) { - AZ::Data::AssetInfo assetInfo = AssetHelpers::GetSourceInfoByProductId(m_assetId, azrtti_typeid< ScriptCanvas::SubgraphInterfaceAsset>()); - - if (!assetInfo.m_assetId.IsValid()) - { - return false; - } - AZ::Outcome openOutcome = AZ::Failure(AZStd::string()); - GeneralRequestBus::BroadcastResult(openOutcome, &GeneralRequests::OpenScriptCanvasAsset, assetInfo.m_assetId, -1); + GeneralRequestBus::BroadcastResult(openOutcome, &GeneralRequests::OpenScriptCanvasAsset + , SourceHandle( nullptr, m_assetId.m_guid, {} ), Tracker::ScriptCanvasFileState::UNMODIFIED, -1); return openOutcome.IsSuccess(); } diff --git a/Gems/ScriptCanvas/Code/Editor/GraphCanvas/Components/NodeDescriptors/ScriptEventReceiverEventNodeDescriptorComponent.cpp b/Gems/ScriptCanvas/Code/Editor/GraphCanvas/Components/NodeDescriptors/ScriptEventReceiverEventNodeDescriptorComponent.cpp index 3e0a97254f..43bfc4b221 100644 --- a/Gems/ScriptCanvas/Code/Editor/GraphCanvas/Components/NodeDescriptors/ScriptEventReceiverEventNodeDescriptorComponent.cpp +++ b/Gems/ScriptCanvas/Code/Editor/GraphCanvas/Components/NodeDescriptors/ScriptEventReceiverEventNodeDescriptorComponent.cpp @@ -142,8 +142,6 @@ namespace ScriptCanvasEditor m_ebusWrapper.m_graphCanvasId = wrappingNode; m_ebusWrapper.m_scriptCanvasId = scriptCanvasId; - AZStd::string ebusContextName = TranslationHelper::GetEbusHandlerContext(m_busName); - ScriptCanvas::Nodes::Core::ReceiveScriptEvent* eventHandler = AZ::EntityUtils::FindFirstDerivedComponent(scriptCanvasId); if (eventHandler) { @@ -179,50 +177,27 @@ namespace ScriptCanvasEditor if (scriptCanvasSlot && scriptCanvasSlot->IsVisible()) { - AZ::EntityId slotId = Nodes::DisplayScriptCanvasSlot(GetEntityId(), (*scriptCanvasSlot)); - - GraphCanvas::SlotRequestBus::Event(slotId, &GraphCanvas::SlotRequests::SetTranslationKeyedName, TranslationHelper::GetEBusHandlerOnEventTriggeredNameKey()); - GraphCanvas::SlotRequestBus::Event(slotId, &GraphCanvas::SlotRequests::SetTranslationKeyedTooltip, TranslationHelper::GetEBusHandlerOnEventTriggeredTooltipKey()); + Nodes::DisplayScriptCanvasSlot(GetEntityId(), (*scriptCanvasSlot), 0); } + int paramIndex = 0; + int outputIndex = 0; // // inputCount and outputCount work because the order of the slots is maintained from the BehaviorContext, if this changes // in the future then we should consider storing the actual offset or key name at that time. // - int inputCount = 0; - int outputCount = 0; for (const auto& slotId : myEvent.m_parameterSlotIds) { scriptCanvasSlot = eventHandler->GetSlot(slotId); + int& index = (scriptCanvasSlot && scriptCanvasSlot->IsData() && scriptCanvasSlot->IsInput()) ? paramIndex : outputIndex; + if (scriptCanvasSlot && scriptCanvasSlot->IsVisible()) { - AZ::EntityId graphCanvasSlotId = Nodes::DisplayScriptCanvasSlot(GetEntityId(), (*scriptCanvasSlot)); - - TranslationItemType itemType = TranslationHelper::GetItemType(scriptCanvasSlot->GetDescriptor()); - - GraphCanvas::TranslationKeyedString slotNameKeyedString(scriptCanvasSlot->GetName()); - slotNameKeyedString.m_context = ebusContextName; - - GraphCanvas::TranslationKeyedString slotTooltipKeyedString(scriptCanvasSlot->GetToolTip()); - slotTooltipKeyedString.m_context = ebusContextName; - - if (scriptCanvasSlot->GetDescriptor() == ScriptCanvas::SlotDescriptors::DataOut()) - { - slotNameKeyedString.m_key = TranslationHelper::GetEBusHandlerSlotKey(m_busName, m_eventName, itemType, TranslationKeyId::Name, outputCount); - slotTooltipKeyedString.m_key = TranslationHelper::GetEBusHandlerSlotKey(m_busName, m_eventName, itemType, TranslationKeyId::Tooltip, outputCount); - ++outputCount; - } - else - { - slotNameKeyedString.m_key = TranslationHelper::GetEBusHandlerSlotKey(m_busName, m_eventName, itemType, TranslationKeyId::Name, inputCount); - slotTooltipKeyedString.m_key = TranslationHelper::GetEBusHandlerSlotKey(m_busName, m_eventName, itemType, TranslationKeyId::Tooltip, inputCount); - ++inputCount; - } - - GraphCanvas::SlotRequestBus::Event(graphCanvasSlotId, &GraphCanvas::SlotRequests::SetTranslationKeyedName, slotNameKeyedString); - GraphCanvas::SlotRequestBus::Event(graphCanvasSlotId, &GraphCanvas::SlotRequests::SetTranslationKeyedTooltip, slotTooltipKeyedString); + Nodes::DisplayScriptCanvasSlot(GetEntityId(), (*scriptCanvasSlot), index); } + + ++index; } if (myEvent.m_resultSlotId.IsValid()) @@ -231,18 +206,7 @@ namespace ScriptCanvasEditor if (scriptCanvasSlot && scriptCanvasSlot->IsVisible()) { - AZ::EntityId graphCanvasSlotId = Nodes::DisplayScriptCanvasSlot(GetEntityId(), (*scriptCanvasSlot)); - - TranslationItemType itemType = TranslationHelper::GetItemType(scriptCanvasSlot->GetDescriptor()); - - GraphCanvas::TranslationKeyedString slotNameKeyedString(scriptCanvasSlot->GetName(), ebusContextName); - slotNameKeyedString.m_key = slotNameKeyedString.m_key = TranslationHelper::GetKey(TranslationContextGroup::EbusHandler, m_busName, m_eventName, itemType, TranslationKeyId::Name); - - GraphCanvas::TranslationKeyedString slotTooltipKeyedString(TranslationHelper::GetSafeTypeName(scriptCanvasSlot->GetDataType()), ebusContextName); - slotTooltipKeyedString.m_key = TranslationHelper::GetKey(TranslationContextGroup::EbusHandler, m_busName, m_eventName, itemType, TranslationKeyId::Tooltip); - - GraphCanvas::SlotRequestBus::Event(graphCanvasSlotId, &GraphCanvas::SlotRequests::SetTranslationKeyedName, slotNameKeyedString); - GraphCanvas::SlotRequestBus::Event(graphCanvasSlotId, &GraphCanvas::SlotRequests::SetTranslationKeyedTooltip, slotTooltipKeyedString); + Nodes::DisplayScriptCanvasSlot(GetEntityId(), (*scriptCanvasSlot), 0); } } @@ -367,9 +331,6 @@ namespace ScriptCanvasEditor if (connectionType == GraphCanvas::ConnectionType::CT_Output) { - GraphCanvas::SlotRequestBus::Event(slotId, &GraphCanvas::SlotRequests::SetTranslationKeyedName, TranslationHelper::GetEBusHandlerOnEventTriggeredNameKey()); - GraphCanvas::SlotRequestBus::Event(slotId, &GraphCanvas::SlotRequests::SetTranslationKeyedTooltip, TranslationHelper::GetEBusHandlerOnEventTriggeredTooltipKey()); - break; } } diff --git a/Gems/ScriptCanvas/Code/Editor/GraphCanvas/Components/NodeDescriptors/ScriptEventReceiverNodeDescriptorComponent.cpp b/Gems/ScriptCanvas/Code/Editor/GraphCanvas/Components/NodeDescriptors/ScriptEventReceiverNodeDescriptorComponent.cpp index dea7612b05..d8c31e3745 100644 --- a/Gems/ScriptCanvas/Code/Editor/GraphCanvas/Components/NodeDescriptors/ScriptEventReceiverNodeDescriptorComponent.cpp +++ b/Gems/ScriptCanvas/Code/Editor/GraphCanvas/Components/NodeDescriptors/ScriptEventReceiverNodeDescriptorComponent.cpp @@ -560,8 +560,11 @@ namespace ScriptCanvasEditor if (slotType == GraphCanvas::SlotTypes::DataSlot) { - GraphCanvas::SlotRequestBus::Event(testSlotId, &GraphCanvas::SlotRequests::SetTranslationKeyedName, TranslationHelper::GetEBusHandlerBusIdNameKey()); - GraphCanvas::SlotRequestBus::Event(testSlotId, &GraphCanvas::SlotRequests::SetTranslationKeyedTooltip, TranslationHelper::GetEBusHandlerBusIdTooltipKey()); + GraphCanvas::TranslationKey key; + key << Translation::GlobalKeys::EBusHandlerIDKey << "details"; + GraphCanvas::TranslationRequests::Details details; + GraphCanvas::TranslationRequestBus::BroadcastResult(details, &GraphCanvas::TranslationRequests::GetDetails, key, details); + GraphCanvas::SlotRequestBus::Event(testSlotId, &GraphCanvas::SlotRequests::SetDetails, details.m_name, details.m_tooltip); break; } } diff --git a/Gems/ScriptCanvas/Code/Editor/GraphCanvas/Components/NodeDescriptors/ScriptEventSenderNodeDescriptorComponent.cpp b/Gems/ScriptCanvas/Code/Editor/GraphCanvas/Components/NodeDescriptors/ScriptEventSenderNodeDescriptorComponent.cpp index 9bf18ec9ac..a213de4a9d 100644 --- a/Gems/ScriptCanvas/Code/Editor/GraphCanvas/Components/NodeDescriptors/ScriptEventSenderNodeDescriptorComponent.cpp +++ b/Gems/ScriptCanvas/Code/Editor/GraphCanvas/Components/NodeDescriptors/ScriptEventSenderNodeDescriptorComponent.cpp @@ -118,9 +118,6 @@ namespace ScriptCanvasEditor if (currentSlotId == slotId) { - GraphCanvas::SlotRequestBus::Event(graphCanvasId, &GraphCanvas::SlotRequests::SetTranslationKeyedName, TranslationHelper::GetEBusSenderBusIdNameKey()); - GraphCanvas::SlotRequestBus::Event(graphCanvasId, &GraphCanvas::SlotRequests::SetTranslationKeyedTooltip, TranslationHelper::GetEBusSenderBusIdTooltipKey()); - break; } } diff --git a/Gems/ScriptCanvas/Code/Editor/Include/ScriptCanvas/Assets/ScriptCanvasAsset.h b/Gems/ScriptCanvas/Code/Editor/Include/ScriptCanvas/Assets/ScriptCanvasAsset.h deleted file mode 100644 index 0fb0f567e8..0000000000 --- a/Gems/ScriptCanvas/Code/Editor/Include/ScriptCanvas/Assets/ScriptCanvasAsset.h +++ /dev/null @@ -1,88 +0,0 @@ -/* - * Copyright (c) Contributors to the Open 3D Engine Project. - * For complete copyright and license terms please see the LICENSE at the root of this distribution. - * - * SPDX-License-Identifier: Apache-2.0 OR MIT - * - */ - -#pragma once - -#include -#include -#include -#include - -#include - -namespace AZ -{ - class Entity; -} - -namespace ScriptCanvas -{ - class Graph; -} - -namespace ScriptCanvasEditor -{ - class Graph; - class ScriptCanvasAsset; - - class ScriptCanvasAssetDescription : public ScriptCanvas::AssetDescription - { - public: - - AZ_TYPE_INFO(ScriptCanvasAssetDescription, "{3678E33E-521B-4CAC-9DC1-42566AC71249}"); - - ScriptCanvasAssetDescription() - : ScriptCanvas::AssetDescription( - azrtti_typeid(), - "Script Canvas", - "Script Canvas Graph Asset", - "@projectroot@/scriptcanvas", - ".scriptcanvas", - "Script Canvas", - "Untitled-%i", - "Script Canvas Files (*.scriptcanvas)", - "Script Canvas", - "Script Canvas", - "Icons/ScriptCanvas/Viewport/ScriptCanvas.png", - AZ::Color(0.321f, 0.302f, 0.164f, 1.0f), - true - ) - {} - }; - - class ScriptCanvasAsset - : public ScriptCanvas::ScriptCanvasAssetBase - { - - public: - AZ_RTTI(ScriptCanvasAsset, "{FA10C3DA-0717-4B72-8944-CD67D13DFA2B}", ScriptCanvas::ScriptCanvasAssetBase); - AZ_CLASS_ALLOCATOR(ScriptCanvasAsset, AZ::SystemAllocator, 0); - - ScriptCanvasAsset(const AZ::Data::AssetId& assetId = AZ::Data::AssetId(AZ::Uuid::CreateRandom()), - AZ::Data::AssetData::AssetStatus status = AZ::Data::AssetData::AssetStatus::NotLoaded) - : ScriptCanvas::ScriptCanvasAssetBase(assetId, status) - { - m_data = aznew ScriptCanvas::ScriptCanvasData(); - } - ~ScriptCanvasAsset() override - { - } - - ScriptCanvas::AssetDescription GetAssetDescription() const override - { - return ScriptCanvasAssetDescription(); - } - - ScriptCanvas::Graph* GetScriptCanvasGraph() const; - using Description = ScriptCanvasAssetDescription; - - ScriptCanvas::ScriptCanvasData& GetScriptCanvasData() override; - const ScriptCanvas::ScriptCanvasData& GetScriptCanvasData() const override; - - }; -} diff --git a/Gems/ScriptCanvas/Code/Editor/Include/ScriptCanvas/Assets/ScriptCanvasAssetBus.h b/Gems/ScriptCanvas/Code/Editor/Include/ScriptCanvas/Assets/ScriptCanvasAssetBus.h deleted file mode 100644 index 4c9f714b61..0000000000 --- a/Gems/ScriptCanvas/Code/Editor/Include/ScriptCanvas/Assets/ScriptCanvasAssetBus.h +++ /dev/null @@ -1,31 +0,0 @@ -/* - * Copyright (c) Contributors to the Open 3D Engine Project. - * For complete copyright and license terms please see the LICENSE at the root of this distribution. - * - * SPDX-License-Identifier: Apache-2.0 OR MIT - * - */ - -#pragma once - -namespace ScriptCanvas -{ - - class ScriptCanvasAssetBusRequests : public AZ::EBusTraits - { - public: - - using BusIdType = AZ::Data::AssetId; - using MutexType = AZStd::recursive_mutex; - - static const AZ::EBusHandlerPolicy HandlerPolicy = AZ::EBusHandlerPolicy::Single; - static const AZ::EBusAddressPolicy AddressPolicy = AZ::EBusAddressPolicy::ById; - - virtual void SetAsNewAsset() = 0; - - }; - - using ScriptCanvasAssetBusRequestBus = AZ::EBus; - - -} diff --git a/Gems/ScriptCanvas/Code/Editor/Include/ScriptCanvas/Assets/ScriptCanvasAssetHandler.h b/Gems/ScriptCanvas/Code/Editor/Include/ScriptCanvas/Assets/ScriptCanvasAssetHandler.h deleted file mode 100644 index f29d5aa9cb..0000000000 --- a/Gems/ScriptCanvas/Code/Editor/Include/ScriptCanvas/Assets/ScriptCanvasAssetHandler.h +++ /dev/null @@ -1,86 +0,0 @@ -/* - * Copyright (c) Contributors to the Open 3D Engine Project. - * For complete copyright and license terms please see the LICENSE at the root of this distribution. - * - * SPDX-License-Identifier: Apache-2.0 OR MIT - * - */ - -#pragma once - -#include -#include -#include -#include - -namespace AZ -{ - class SerializeContext; -} - -namespace ScriptCanvasEditor -{ - AZ::Outcome LoadScriptCanvasDataFromJson - ( ScriptCanvas::ScriptCanvasData& dataTarget - , AZStd::string_view source - , AZ::SerializeContext& serializeContext); - - /** - * Manages editor Script Canvas graph assets. - */ - class ScriptCanvasAssetHandler - : public AZ::Data::AssetHandler - , protected AZ::AssetTypeInfoBus::MultiHandler - { - public: - AZ_CLASS_ALLOCATOR(ScriptCanvasAssetHandler, AZ::SystemAllocator, 0); - AZ_RTTI(ScriptCanvasAssetHandler, "{098B86B2-2527-4155-84C9-A698A0D20068}", AZ::Data::AssetHandler); - - ScriptCanvasAssetHandler(AZ::SerializeContext* context = nullptr); - ~ScriptCanvasAssetHandler(); - - // Called by the asset database to create a new asset. - AZ::Data::AssetPtr CreateAsset(const AZ::Data::AssetId& id, const AZ::Data::AssetType& type) override; - - // Override the stream info to force source assets to load into the Editor instead of cached, processed assets. - void GetCustomAssetStreamInfoForLoad(AZ::Data::AssetStreamInfo& streamInfo) override; - - // Called by the asset database to perform actual asset load. - AZ::Data::AssetHandler::LoadResult LoadAssetData( - const AZ::Data::Asset& asset, - AZStd::shared_ptr stream, - const AZ::Data::AssetFilterCB& assetLoadFilterCB) override; - - // Called by the asset database to perform actual asset save. Returns true if successful otherwise false (default - as we don't require support save). - bool SaveAssetData(const AZ::Data::Asset& asset, AZ::IO::GenericStream* stream) override; - bool SaveAssetData(const ScriptCanvasAsset* assetData, AZ::IO::GenericStream* stream); - bool SaveAssetData(const ScriptCanvasAsset* assetData, AZ::IO::GenericStream* stream, AZ::DataStream::StreamType streamType); - - // Called by the asset database when an asset should be deleted. - void DestroyAsset(AZ::Data::AssetPtr ptr) override; - - // Called by asset database on registration. - void GetHandledAssetTypes(AZStd::vector& assetTypes) override; - - // Provides editor with information about script canvas graph assets. - AZ::Data::AssetType GetAssetType() const override; - const char* GetAssetTypeDisplayName() const override; - void GetAssetTypeExtensions(AZStd::vector& extensions) override; - - AZ::Uuid GetComponentTypeId() const override; - - AZ::SerializeContext* GetSerializeContext() const; - - void SetSerializeContext(AZ::SerializeContext* context); - - static AZ::Data::AssetType GetAssetTypeStatic(); - - // protected AZ::AssetTypeInfoBus::MultiHandler... - const char* GetGroup() const override; - const char* GetBrowserIcon() const override; - - - protected: - AZ::SerializeContext* m_serializeContext; - }; -} diff --git a/Gems/ScriptCanvas/Code/Editor/Include/ScriptCanvas/Assets/ScriptCanvasAssetTypes.h b/Gems/ScriptCanvas/Code/Editor/Include/ScriptCanvas/Assets/ScriptCanvasAssetTypes.h deleted file mode 100644 index 75cf42a894..0000000000 --- a/Gems/ScriptCanvas/Code/Editor/Include/ScriptCanvas/Assets/ScriptCanvasAssetTypes.h +++ /dev/null @@ -1,14 +0,0 @@ -/* - * Copyright (c) Contributors to the Open 3D Engine Project. - * For complete copyright and license terms please see the LICENSE at the root of this distribution. - * - * SPDX-License-Identifier: Apache-2.0 OR MIT - * - */ - -#pragma once - -namespace ScriptCanvasEditor -{ - -} diff --git a/Gems/ScriptCanvas/Code/Editor/Include/ScriptCanvas/Assets/ScriptCanvasBaseAssetData.cpp b/Gems/ScriptCanvas/Code/Editor/Include/ScriptCanvas/Assets/ScriptCanvasBaseAssetData.cpp deleted file mode 100644 index 6da134ed6a..0000000000 --- a/Gems/ScriptCanvas/Code/Editor/Include/ScriptCanvas/Assets/ScriptCanvasBaseAssetData.cpp +++ /dev/null @@ -1,23 +0,0 @@ -/* - * Copyright (c) Contributors to the Open 3D Engine Project. - * For complete copyright and license terms please see the LICENSE at the root of this distribution. - * - * SPDX-License-Identifier: Apache-2.0 OR MIT - * - */ - -#include -#include - -namespace ScriptCanvas -{ - Graph* ScriptCanvasData::ModGraph() - { - return AZ::EntityUtils::FindFirstDerivedComponent(m_scriptCanvasEntity.get()); - } - - const Graph* ScriptCanvasData::GetGraph() const - { - return AZ::EntityUtils::FindFirstDerivedComponent(m_scriptCanvasEntity.get()); - } -} diff --git a/Gems/ScriptCanvas/Code/Editor/Include/ScriptCanvas/Assets/ScriptCanvasBaseAssetData.h b/Gems/ScriptCanvas/Code/Editor/Include/ScriptCanvas/Assets/ScriptCanvasBaseAssetData.h deleted file mode 100644 index f4b02b56b6..0000000000 --- a/Gems/ScriptCanvas/Code/Editor/Include/ScriptCanvas/Assets/ScriptCanvasBaseAssetData.h +++ /dev/null @@ -1,39 +0,0 @@ -/* - * Copyright (c) Contributors to the Open 3D Engine Project. - * For complete copyright and license terms please see the LICENSE at the root of this distribution. - * - * SPDX-License-Identifier: Apache-2.0 OR MIT - * - */ - -#pragma once - -#include -#include - -namespace ScriptCanvas -{ - class ScriptCanvasData - { - public: - - AZ_RTTI(ScriptCanvasData, "{1072E894-0C67-4091-8B64-F7DB324AD13C}"); - AZ_CLASS_ALLOCATOR(ScriptCanvasData, AZ::SystemAllocator, 0); - ScriptCanvasData() {} - virtual ~ScriptCanvasData() {} - ScriptCanvasData(ScriptCanvasData&& other); - ScriptCanvasData& operator=(ScriptCanvasData&& other); - - static void Reflect(AZ::ReflectContext* reflectContext); - - AZ::Entity* GetScriptCanvasEntity() const { return m_scriptCanvasEntity.get(); } - - Graph* ModGraph(); - - const Graph* GetGraph() const; - - AZStd::unique_ptr m_scriptCanvasEntity; - private: - ScriptCanvasData(const ScriptCanvasData&) = delete; - }; -} diff --git a/Gems/ScriptCanvas/Code/Editor/Include/ScriptCanvas/Assets/ScriptCanvasFileHandling.h b/Gems/ScriptCanvas/Code/Editor/Include/ScriptCanvas/Assets/ScriptCanvasFileHandling.h new file mode 100644 index 0000000000..93d1558223 --- /dev/null +++ b/Gems/ScriptCanvas/Code/Editor/Include/ScriptCanvas/Assets/ScriptCanvasFileHandling.h @@ -0,0 +1,54 @@ +/* + * Copyright (c) Contributors to the Open 3D Engine Project. + * For complete copyright and license terms please see the LICENSE at the root of this distribution. + * + * SPDX-License-Identifier: Apache-2.0 OR MIT + * + */ + +#pragma once + +#include +#include +#include +#include + +namespace AZ +{ + class SerializeContext; +} + +namespace ScriptCanvas +{ + class ScriptCanvasData; +} + +namespace ScriptCanvasEditor +{ + class EditorAssetTree + { + public: + AZ_CLASS_ALLOCATOR(EditorAssetTree, AZ::SystemAllocator, 0); + + EditorAssetTree* m_parent = nullptr; + AZStd::vector m_dependencies; + SourceHandle m_asset; + + EditorAssetTree* ModRoot(); + + void SetParent(EditorAssetTree& parent); + + AZStd::string ToString(size_t depth = 0) const; + }; + + AZ::Outcome LoadFromFile(AZStd::string_view path); + + AZ::Outcome LoadDataFromJson + ( ScriptCanvas::ScriptCanvasData& dataTarget + , AZStd::string_view source + , AZ::SerializeContext& serializeContext); + + AZ::Outcome LoadEditorAssetTree(SourceHandle handle, EditorAssetTree* parent = nullptr); + + AZ::Outcome SaveToStream(const SourceHandle& source, AZ::IO::GenericStream& stream); +} diff --git a/Gems/ScriptCanvas/Code/Editor/Include/ScriptCanvas/Bus/EditorScriptCanvasBus.h b/Gems/ScriptCanvas/Code/Editor/Include/ScriptCanvas/Bus/EditorScriptCanvasBus.h index 7e7b600081..7f2d3ac162 100644 --- a/Gems/ScriptCanvas/Code/Editor/Include/ScriptCanvas/Bus/EditorScriptCanvasBus.h +++ b/Gems/ScriptCanvas/Code/Editor/Include/ScriptCanvas/Bus/EditorScriptCanvasBus.h @@ -20,12 +20,13 @@ #include #include -#include #include #include #include #include +#include + namespace GraphCanvas { class GraphCanvasTreeItem; @@ -70,7 +71,7 @@ namespace ScriptCanvasEditor static const AZ::EBusAddressPolicy AddressPolicy = AZ::EBusAddressPolicy::ById; using BusIdType = AZ::EntityId; - virtual void SetAssetId(const AZ::Data::AssetId& assetId) = 0; + virtual void SetAssetId(const SourceHandle& assetId) = 0; virtual bool HasAssetId() const = 0; }; @@ -89,40 +90,13 @@ namespace ScriptCanvasEditor }; using EditorContextMenuRequestBus = AZ::EBus; - - class EditorScriptCanvasAssetNotifications : public AZ::EBusTraits - { - public: - static const AZ::EBusAddressPolicy AddressPolicy = AZ::EBusAddressPolicy::ById; - using BusIdType = AZ::Data::AssetId; - - //! Notification which fires after an EditorGraph has received it's on AssetReady callback - //! \param scriptCanvasAsset Script Canvas asset which is now ready for use in the Editor - virtual void OnScriptCanvasAssetReady(const AZ::Data::Asset& /*scriptCanvasAsset*/) {}; - - //! Notification which fires after an EditorGraph has received it's on AssetReloaded callback - //! \param scriptCanvasAsset Script Canvas asset which is now ready for use in the Editor - virtual void OnScriptCanvasAssetReloaded(const AZ::Data::Asset& /*scriptCanvaAsset */) {}; - - //! Notification which fires after an EditorGraph has received it's on AssetReady callback - //! \param AssetId AssetId of unloaded ScriptCanvas - virtual void OnScriptCanvasAssetUnloaded(const AZ::Data::AssetId& /*assetId*/) {}; - - //! Notification which fires after an EditorGraph has received an onAssetSaved callback - //! \param scriptCanvasAsset Script Canvas asset which was attempted to be saved - //! \param isSuccessful specified where the Script Canvas asset was successfully saved - virtual void OnScriptCanvasAssetSaved(const AZ::Data::AssetId) {}; - }; - using EditorScriptCanvasAssetNotificationBus = AZ::EBus; - + class EditorGraphRequests : public AZ::EBusTraits { public: static const AZ::EBusAddressPolicy AddressPolicy = AZ::EBusAddressPolicy::ById; using BusIdType = ScriptCanvas::ScriptCanvasId; - virtual void SetAssetId(const AZ::Data::AssetId& assetId) = 0; - virtual void CreateGraphCanvasScene() = 0; virtual void ClearGraphCanvasScene() = 0; virtual GraphCanvas::GraphId GetGraphCanvasGraphId() const = 0; @@ -225,7 +199,7 @@ namespace ScriptCanvasEditor virtual void OnUpgradeStart() {} virtual void OnUpgradeCancelled() {} - virtual void OnGraphUpgradeComplete(AZ::Data::Asset&, bool skipped = false) { (void)skipped; } + virtual void OnGraphUpgradeComplete(SourceHandle&, bool skipped = false) { (void)skipped; } }; using UpgradeNotificationsBus = AZ::EBus; diff --git a/Gems/ScriptCanvas/Code/Editor/Include/ScriptCanvas/Bus/RequestBus.h b/Gems/ScriptCanvas/Code/Editor/Include/ScriptCanvas/Bus/RequestBus.h index 8fa7beab2b..fa4d5bbaa1 100644 --- a/Gems/ScriptCanvas/Code/Editor/Include/ScriptCanvas/Bus/RequestBus.h +++ b/Gems/ScriptCanvas/Code/Editor/Include/ScriptCanvas/Bus/RequestBus.h @@ -8,18 +8,16 @@ #pragma once -#include -#include -#include #include -#include +#include +#include +#include #include - +#include #include - -#include #include - +#include +#include #include class QLineEdit; @@ -39,16 +37,22 @@ namespace GraphCanvas class NodePaletteDockWidget; } -namespace ScriptCanvas -{ - class ScriptCanvasAssetBase; -} - namespace ScriptCanvasEditor { struct CategoryInformation; struct NodePaletteModelInformation; + namespace Tracker + { + enum class ScriptCanvasFileState : AZ::s32 + { + NEW, + MODIFIED, + UNMODIFIED, + SOURCE_REMOVED, + INVALID = -1 + }; + } namespace Widget { @@ -70,16 +74,16 @@ namespace ScriptCanvasEditor //! Opens an existing graph and returns the tab index in which it was open in. //! \param File AssetId //! \return index of open tab if the asset was able to be open successfully or error message of why the open failed - virtual AZ::Outcome OpenScriptCanvasAsset(AZ::Data::AssetId scriptCanvasAssetId, int tabIndex = -1) = 0; - virtual AZ::Outcome OpenScriptCanvasAssetId(const AZ::Data::AssetId& scriptCanvasAsset) = 0; + virtual AZ::Outcome OpenScriptCanvasAsset(SourceHandle scriptCanvasAssetId, Tracker::ScriptCanvasFileState fileState, int tabIndex = -1) = 0; + virtual AZ::Outcome OpenScriptCanvasAssetId(const SourceHandle& scriptCanvasAsset, Tracker::ScriptCanvasFileState fileState) = 0; - virtual int CloseScriptCanvasAsset(const AZ::Data::AssetId&) = 0; + virtual int CloseScriptCanvasAsset(const SourceHandle&) = 0; virtual bool CreateScriptCanvasAssetFor(const TypeDefs::EntityComponentId& requestingComponent) = 0; - virtual bool IsScriptCanvasAssetOpen(const AZ::Data::AssetId& assetId) const = 0; + virtual bool IsScriptCanvasAssetOpen(const SourceHandle& assetId) const = 0; - virtual void OnChangeActiveGraphTab(AZ::Data::AssetId) {} + virtual void OnChangeActiveGraphTab(SourceHandle) {} virtual void CreateNewRuntimeAsset() = 0; @@ -103,12 +107,12 @@ namespace ScriptCanvasEditor return ScriptCanvas::ScriptCanvasId(); } - virtual GraphCanvas::GraphId FindGraphCanvasGraphIdByAssetId([[maybe_unused]] const AZ::Data::AssetId& assetId) const + virtual GraphCanvas::GraphId FindGraphCanvasGraphIdByAssetId([[maybe_unused]] const SourceHandle& assetId) const { return GraphCanvas::GraphId(); } - virtual ScriptCanvas::ScriptCanvasId FindScriptCanvasIdByAssetId([[maybe_unused]] const AZ::Data::AssetId& assetId) const + virtual ScriptCanvas::ScriptCanvasId FindScriptCanvasIdByAssetId([[maybe_unused]] const SourceHandle& assetId) const { return ScriptCanvas::ScriptCanvasId(); } @@ -126,7 +130,7 @@ namespace ScriptCanvasEditor virtual void DisconnectEndpoints(const AZ::EntityId& /*sceneId*/, const AZStd::vector& /*endpoints*/) {} virtual void PostUndoPoint(ScriptCanvas::ScriptCanvasId) = 0; - virtual void SignalSceneDirty(AZ::Data::AssetId) = 0; + virtual void SignalSceneDirty(SourceHandle) = 0; // Increment the value of the ignore undo point tracker virtual void PushPreventUndoStateUpdate() = 0; @@ -165,7 +169,7 @@ namespace ScriptCanvasEditor public: static const AZ::EBusHandlerPolicy HandlerPolicy = AZ::EBusHandlerPolicy::Multiple; static const AZ::EBusAddressPolicy AddressPolicy = AZ::EBusAddressPolicy::ById; - using BusIdType = AZ::Data::AssetId; + using BusIdType = SourceHandle; virtual void OnAssetVisualized() {}; virtual void OnAssetUnloaded() {}; diff --git a/Gems/ScriptCanvas/Code/Editor/Include/ScriptCanvas/Bus/ScriptCanvasExecutionBus.h b/Gems/ScriptCanvas/Code/Editor/Include/ScriptCanvas/Bus/ScriptCanvasExecutionBus.h index 54cc55a993..51d348e285 100644 --- a/Gems/ScriptCanvas/Code/Editor/Include/ScriptCanvas/Bus/ScriptCanvasExecutionBus.h +++ b/Gems/ScriptCanvas/Code/Editor/Include/ScriptCanvas/Bus/ScriptCanvasExecutionBus.h @@ -23,7 +23,7 @@ namespace ScriptCanvasEditor static const AZ::EBusHandlerPolicy HandlerPolicy = AZ::EBusHandlerPolicy::Single; virtual Reporter RunGraph(AZStd::string_view path, ScriptCanvas::ExecutionMode mode) = 0; - virtual Reporter RunAssetGraph(AZ::Data::Asset, ScriptCanvas::ExecutionMode mode) = 0; + virtual Reporter RunAssetGraph(SourceHandle source, ScriptCanvas::ExecutionMode mode) = 0; }; using ScriptCanvasExecutionBus = AZ::EBus; diff --git a/Gems/ScriptCanvas/Code/Editor/Include/ScriptCanvas/Components/EditorDeprecationData.cpp b/Gems/ScriptCanvas/Code/Editor/Include/ScriptCanvas/Components/EditorDeprecationData.cpp new file mode 100644 index 0000000000..a1afc8eeae --- /dev/null +++ b/Gems/ScriptCanvas/Code/Editor/Include/ScriptCanvas/Components/EditorDeprecationData.cpp @@ -0,0 +1,30 @@ +/* + * Copyright (c) Contributors to the Open 3D Engine Project. + * For complete copyright and license terms please see the LICENSE at the root of this distribution. + * + * SPDX-License-Identifier: Apache-2.0 OR MIT + * + */ + +#include + +#include +#include +#include + +namespace ScriptCanvasEditor +{ + namespace Deprecated + { + void ScriptCanvasAssetHolder::Reflect(AZ::ReflectContext* context) + { + if (auto serializeContext = azrtti_cast(context)) + { + serializeContext->Class() + ->Version(1) + ->Field("m_asset", &ScriptCanvasAssetHolder::m_scriptCanvasAsset) + ; + } + } + } +} diff --git a/Gems/ScriptCanvas/Code/Editor/Include/ScriptCanvas/Components/EditorDeprecationData.h b/Gems/ScriptCanvas/Code/Editor/Include/ScriptCanvas/Components/EditorDeprecationData.h new file mode 100644 index 0000000000..4c60441363 --- /dev/null +++ b/Gems/ScriptCanvas/Code/Editor/Include/ScriptCanvas/Components/EditorDeprecationData.h @@ -0,0 +1,46 @@ +/* + * Copyright (c) Contributors to the Open 3D Engine Project. + * For complete copyright and license terms please see the LICENSE at the root of this distribution. + * + * SPDX-License-Identifier: Apache-2.0 OR MIT + * + */ + +#pragma once + +#include +#include +#include +#include + +namespace ScriptCanvasEditor +{ + namespace Deprecated + { + // only used as a pass-through to loading a guid / hint during version conversion + class ScriptCanvasAsset + : public AZ::Data::AssetData + { + public: + AZ_TYPE_INFO(ScriptCanvasAsset, "{FA10C3DA-0717-4B72-8944-CD67D13DFA2B}"); + AZ_CLASS_ALLOCATOR(ScriptCanvasAsset, AZ::SystemAllocator, 0); + + ScriptCanvasAsset() = default; + }; + + // only used as a pass-through to loading a guid / hint during version conversion + class ScriptCanvasAssetHolder + { + public: + AZ_TYPE_INFO(ScriptCanvasAssetHolder, "{3E80CEE3-2932-4DC1-AADF-398FDDC6DEFE}"); + AZ_CLASS_ALLOCATOR(ScriptCanvasAssetHolder, AZ::SystemAllocator, 0); + + static void Reflect(AZ::ReflectContext* context); + + AZ::Data::Asset m_scriptCanvasAsset; + + ScriptCanvasAssetHolder() = default; + }; + + } +} diff --git a/Gems/ScriptCanvas/Code/Editor/Include/ScriptCanvas/Components/EditorGraph.h b/Gems/ScriptCanvas/Code/Editor/Include/ScriptCanvas/Components/EditorGraph.h index 9913fa838b..9157aaeac9 100644 --- a/Gems/ScriptCanvas/Code/Editor/Include/ScriptCanvas/Components/EditorGraph.h +++ b/Gems/ScriptCanvas/Code/Editor/Include/ScriptCanvas/Components/EditorGraph.h @@ -34,6 +34,7 @@ #include #include +#include namespace ScriptCanvas { @@ -101,6 +102,8 @@ namespace ScriptCanvasEditor public: AZ_COMPONENT(Graph, "{4D755CA9-AB92-462C-B24F-0B3376F19967}", ScriptCanvas::Graph); + static ScriptCanvas::DataPtr Create(); + static void Reflect(AZ::ReflectContext* context); Graph(const ScriptCanvas::ScriptCanvasId& scriptCanvasId = AZ::Entity::MakeId()) @@ -138,10 +141,6 @@ namespace ScriptCanvasEditor void ReleaseVariableCounter(AZ::u32 variableCounter) override; //// - // RuntimeBus - AZ::Data::AssetId GetAssetId() const override { return m_assetId; } - //// - // GraphCanvas::GraphModelRequestBus void RequestUndoPoint() override; @@ -221,9 +220,6 @@ namespace ScriptCanvasEditor void OnGraphCanvasNodeCreated(const AZ::EntityId& nodeId) override; /////////////////////////// - // EditorGraphRequestBus - void SetAssetId(const AZ::Data::AssetId& assetId) override { m_assetId = assetId; } - void CreateGraphCanvasScene() override; void ClearGraphCanvasScene() override; void DisplayGraphCanvasScene() override; @@ -235,7 +231,7 @@ namespace ScriptCanvasEditor IfOutOfDate, Forced }; - bool UpgradeGraph(const AZ::Data::Asset& asset, UpgradeRequest request, bool isVerbose = true); + bool UpgradeGraph(SourceHandle& asset, UpgradeRequest request, bool isVerbose = true); void ConnectGraphCanvasBuses(); void DisconnectGraphCanvasBuses(); /////// @@ -302,12 +298,13 @@ namespace ScriptCanvasEditor void OnUndoRedoEnd() override; //// - void SetAssetType(AZ::Data::AssetType); - void ReportError(const ScriptCanvas::Node& node, const AZStd::string& errorSource, const AZStd::string& errorMessage) override; const GraphStatisticsHelper& GetNodeUsageStatistics() const; + void MarkOwnership(ScriptCanvas::ScriptCanvasData& owner); + ScriptCanvas::DataPtr GetOwnership() const; + // Finds and returns all nodes within the graph that are of the specified type template AZStd::vector GetNodesOfType() const @@ -384,12 +381,15 @@ namespace ScriptCanvasEditor GraphCanvas::NodeFocusCyclingHelper m_focusHelper; GraphStatisticsHelper m_statisticsHelper; + UndoHelper m_undoHelper; bool m_ignoreSaveRequests; //! Defaults to true to signal that this graph does not have the GraphCanvas stuff intermingled bool m_saveFormatConverted = true; - AZ::Data::AssetId m_assetId; + ScriptCanvasEditor::SourceHandle m_assetId; + // temporary step in cleaning up the graph / asset class structure. This reference is deliberately weak. + ScriptCanvas::ScriptCanvasData* m_owner; }; } diff --git a/Gems/ScriptCanvas/Code/Editor/Include/ScriptCanvas/Components/EditorScriptCanvasComponent.h b/Gems/ScriptCanvas/Code/Editor/Include/ScriptCanvas/Components/EditorScriptCanvasComponent.h index 5dbe718eca..b86df2d9c2 100644 --- a/Gems/ScriptCanvas/Code/Editor/Include/ScriptCanvas/Components/EditorScriptCanvasComponent.h +++ b/Gems/ScriptCanvas/Code/Editor/Include/ScriptCanvas/Components/EditorScriptCanvasComponent.h @@ -9,44 +9,42 @@ #pragma once #include +#include #include #include #include -#include -#include #include +#include #include #include namespace ScriptCanvasEditor { /*! EditorScriptCanvasComponent - The user facing Editor Component for interfacing with ScriptCanvas - It connects to the AssetCatalogEventBus in order to remove the ScriptCanvasAssetHolder asset reference - when the asset is removed from the file system. The reason the ScriptCanvasAssetHolder holder does not - remove the asset reference itself is because the ScriptCanvasEditor MainWindow has a ScriptCanvasAssetHolder - which it uses to maintain the asset data in memory. Therefore removing an open ScriptCanvasAsset from the file system - will remove the reference from the EditorScriptCanvasComponent, but not the reference from the MainWindow allowing the - ScriptCanvas graph to still be modified while open - Finally per graph instance variables values are stored on the EditorScriptCanvasComponent and injected into the runtime ScriptCanvas component in BuildGameEntity + The user facing Editor Component for interfacing with ScriptCanvas. + Per graph instance variables values are stored here and injected into the runtime ScriptCanvas component in BuildGameEntity. */ class EditorScriptCanvasComponent : public AzToolsFramework::Components::EditorComponentBase , private EditorContextMenuRequestBus::Handler , private AzFramework::AssetCatalogEventBus::Handler + , private AzToolsFramework::AssetSystemBus::Handler , private EditorScriptCanvasComponentLoggingBus::Handler , private EditorScriptCanvasComponentRequestBus::Handler - , private AssetTrackerNotificationBus::Handler , private AzToolsFramework::EditorEntityContextNotificationBus::Handler - { public: AZ_COMPONENT(EditorScriptCanvasComponent, "{C28E2D29-0746-451D-A639-7F113ECF5D72}", AzToolsFramework::Components::EditorComponentBase); + friend class AZ::EditorScriptCanvasComponentSerializer; + EditorScriptCanvasComponent(); - EditorScriptCanvasComponent(AZ::Data::Asset asset); + EditorScriptCanvasComponent(const SourceHandle& sourceHandle); ~EditorScriptCanvasComponent() override; + // sets the soure but does not attempt to load anything; + void InitializeSource(const SourceHandle& sourceHandle); + //===================================================================== // AZ::Component void Init() override; @@ -66,17 +64,16 @@ namespace ScriptCanvasEditor ScriptCanvas::GraphIdentifier GetGraphIdentifier() const override; //===================================================================== - void OpenEditor(); - void CloseGraph(); - - void SetName(const AZStd::string& name) { m_name = name; } + void OpenEditor(const AZ::Data::AssetId&, const AZ::Data::AssetType&); + + void SetName(AZStd::string_view name) { m_name = name; } const AZStd::string& GetName() const; AZ::EntityId GetEditorEntityId() const { return GetEntity() ? GetEntityId() : AZ::EntityId(); } AZ::NamedEntityId GetNamedEditorEntityId() const { return GetEntity() ? GetNamedEntityId() : AZ::NamedEntityId(); } //===================================================================== // EditorScriptCanvasComponentRequestBus - void SetAssetId(const AZ::Data::AssetId& assetId) override; + void SetAssetId(const SourceHandle& assetId) override; bool HasAssetId() const override; //===================================================================== @@ -84,23 +81,16 @@ namespace ScriptCanvasEditor // EditorContextMenuRequestBus AZ::Data::AssetId GetAssetId() const override; //===================================================================== - AZ::EntityId GetGraphEntityId() const; - - //===================================================================== - // AssetTrackerNotificationBus - void OnAssetReady(const ScriptCanvasMemoryAsset::pointer asset) override; - void OnAssetSaved(const ScriptCanvasMemoryAsset::pointer asset, bool isSuccessful) override; - void OnAssetReloaded(const ScriptCanvasMemoryAsset::pointer asset) override; - //===================================================================== - - - //===================================================================== - // EditorEntityContextNotificationBus - void OnStartPlayInEditor() override; - - void OnStopPlayInEditor() override; - + protected: + enum class SourceChangeDescription : AZ::u8 + { + Error, + Modified, + Removed, + SelectionChanged, + }; + static void Reflect(AZ::ReflectContext* context); static void GetProvidedServices(AZ::ComponentDescriptor::DependencyArrayType& provided) @@ -118,25 +108,31 @@ namespace ScriptCanvasEditor (void)incompatible; } - void OnCatalogAssetAdded(const AZ::Data::AssetId& assetId) override; - void OnCatalogAssetRemoved(const AZ::Data::AssetId& assetId, const AZ::Data::AssetInfo& assetInfo) override; - void OnScriptCanvasAssetChanged(AZ::Data::AssetId assetId); + // complete the id, load call OnScriptCanvasAssetChanged + void SourceFileChanged(AZStd::string relativePath, AZStd::string scanFolder, AZ::Uuid fileAssetId) override; + // update the display icon for failure, save the values in the graph + void SourceFileRemoved(AZStd::string relativePath, AZStd::string scanFolder, AZ::Uuid fileAssetId) override; + void SourceFileFailed(AZStd::string relativePath, AZStd::string scanFolder, AZ::Uuid fileAssetId) override; + + AZ::u32 OnFileSelectionChanged(); + + void OnScriptCanvasAssetChanged(SourceChangeDescription changeDescription); void UpdateName(); //===================================================================== - void OnScriptCanvasAssetReady(const ScriptCanvasMemoryAsset::pointer asset); + void UpdatePropertyDisplay(); //===================================================================== void BuildGameEntityData(); void ClearVariables(); private: - AZ::Data::AssetId m_removedCatalogId; - AZ::Data::AssetId m_previousAssetId; AZStd::string m_name; - ScriptCanvasAssetHolder m_scriptCanvasAssetHolder; bool m_runtimeDataIsValid = false; ScriptCanvasBuilder::BuildVariableOverrides m_variableOverrides; + SourceHandle m_sourceHandle; + SourceHandle m_previousHandle; + SourceHandle m_removedHandle; }; } diff --git a/Gems/ScriptCanvas/Code/Editor/Include/ScriptCanvas/Components/EditorScriptCanvasComponentSerializer.cpp b/Gems/ScriptCanvas/Code/Editor/Include/ScriptCanvas/Components/EditorScriptCanvasComponentSerializer.cpp new file mode 100644 index 0000000000..596c2d9dbf --- /dev/null +++ b/Gems/ScriptCanvas/Code/Editor/Include/ScriptCanvas/Components/EditorScriptCanvasComponentSerializer.cpp @@ -0,0 +1,104 @@ +/* + * Copyright (c) Contributors to the Open 3D Engine Project. + * For complete copyright and license terms please see the LICENSE at the root of this distribution. + * + * SPDX-License-Identifier: Apache-2.0 OR MIT + * + */ + +#include +#include +#include +#include + +namespace AZ +{ + AZ_CLASS_ALLOCATOR_IMPL(EditorScriptCanvasComponentSerializer, SystemAllocator, 0); + + JsonSerializationResult::Result EditorScriptCanvasComponentSerializer::Load + ( void* outputValue + , const Uuid& outputValueTypeId + , const rapidjson::Value& inputValue + , JsonDeserializerContext& context) + { + namespace JSR = JsonSerializationResult; + + AZ_Assert(outputValueTypeId == azrtti_typeid() + , "EditorScriptCanvasComponentSerializer Load against output typeID that was not EditorScriptCanvasComponent"); + AZ_Assert(outputValue, "EditorScriptCanvasComponentSerializer Load against null output"); + + // load as parent class + auto outputComponent = reinterpret_cast(outputValue); + JsonSerializationResult::ResultCode result = BaseJsonSerializer::Load(outputValue + , azrtti_typeid(), inputValue, context); + + // load child data one by one... + result.Combine(BaseJsonSerializer::Load(outputValue, outputValueTypeId, inputValue, context)); + + if (result.GetProcessing() != JSR::Processing::Halted) + { + result.Combine(ContinueLoadingFromJsonObjectField + ( &outputComponent->m_name + , azrtti_typeid(outputComponent->m_name) + , inputValue + , "m_name" + , context)); + + result.Combine(ContinueLoadingFromJsonObjectField + ( &outputComponent->m_runtimeDataIsValid + , azrtti_typeid(outputComponent->m_runtimeDataIsValid) + , inputValue + , "runtimeDataIsValid" + , context)); + + result.Combine(ContinueLoadingFromJsonObjectField + ( &outputComponent->m_variableOverrides + , azrtti_typeid(outputComponent->m_variableOverrides) + , inputValue + , "runtimeDataOverrides" + , context)); + + auto assetHolderMember = inputValue.FindMember("m_assetHolder"); + if (assetHolderMember == inputValue.MemberEnd()) + { + // file was saved with SourceHandle data + result.Combine(ContinueLoadingFromJsonObjectField + ( &outputComponent->m_sourceHandle + , azrtti_typeid(outputComponent->m_sourceHandle) + , inputValue + , "sourceHandle" + , context)); + } + else + { + // manually load the old asset info data + const rapidjson::Value& assetHolderValue = assetHolderMember->value; + if (auto assetMember = assetHolderValue.FindMember("m_asset"); assetMember != assetHolderValue.MemberEnd()) + { + const rapidjson::Value& assetValue = assetMember->value; + + AZ::Data::AssetId assetId{}; + if (auto assetIdMember = assetValue.FindMember("assetId"); assetIdMember != assetValue.MemberEnd()) + { + result.Combine(ContinueLoading(&assetId, azrtti_typeid(assetId), assetIdMember->value, context)); + } + + AZStd::string path{}; + if (auto pathMember = assetValue.FindMember("assetHint"); pathMember != assetValue.MemberEnd()) + { + result.Combine(ContinueLoading(&path, azrtti_typeid(path), pathMember->value, context)); + } + + if (result.GetProcessing() != JSR::Processing::Halted) + { + outputComponent->InitializeSource(ScriptCanvasEditor::SourceHandle(nullptr, assetId.m_guid, path)); + } + } + } + } + + return context.Report(result, result.GetProcessing() != JSR::Processing::Halted + ? "EditorScriptCanvasComponentSerializer Load finished loading EditorScriptCanvasComponent" + : "EditorScriptCanvasComponentSerializer Load failed to load EditorScriptCanvasComponent"); + } +} diff --git a/Gems/ScriptCanvas/Code/Editor/Include/ScriptCanvas/Components/EditorScriptCanvasComponentSerializer.h b/Gems/ScriptCanvas/Code/Editor/Include/ScriptCanvas/Components/EditorScriptCanvasComponentSerializer.h new file mode 100644 index 0000000000..68ad370997 --- /dev/null +++ b/Gems/ScriptCanvas/Code/Editor/Include/ScriptCanvas/Components/EditorScriptCanvasComponentSerializer.h @@ -0,0 +1,31 @@ +/* + * Copyright (c) Contributors to the Open 3D Engine Project. + * For complete copyright and license terms please see the LICENSE at the root of this distribution. + * + * SPDX-License-Identifier: Apache-2.0 OR MIT + * + */ + +#pragma once + +#include +#include +#include + +namespace AZ +{ + class EditorScriptCanvasComponentSerializer + : public BaseJsonSerializer + { + public: + AZ_RTTI(EditorScriptCanvasComponentSerializer, "{80B497B3-ABC1-4991-A3C4-047A8CB2C26C}", BaseJsonSerializer); + AZ_CLASS_ALLOCATOR_DECL; + + private: + JsonSerializationResult::Result Load + ( void* outputValue + , const Uuid& outputValueTypeId + , const rapidjson::Value& inputValue + , JsonDeserializerContext& context) override; + }; +} diff --git a/Gems/ScriptCanvas/Code/Editor/Include/ScriptCanvas/Components/EditorUtils.h b/Gems/ScriptCanvas/Code/Editor/Include/ScriptCanvas/Components/EditorUtils.h index 15100cbf4e..a4522198b7 100644 --- a/Gems/ScriptCanvas/Code/Editor/Include/ScriptCanvas/Components/EditorUtils.h +++ b/Gems/ScriptCanvas/Code/Editor/Include/ScriptCanvas/Components/EditorUtils.h @@ -21,6 +21,13 @@ namespace GraphCanvas namespace ScriptCanvasEditor { + // If only the Path or the Id is valid, attempts to fill in the missing piece. + // If both Path and Id is valid, including after correction, returns the handle including source Data, + // otherwise, returns null + AZStd::optional CompleteDescription(const SourceHandle& source); + // if CompleteDescription() succeeds, sets the handle to the result, else does nothing + bool CompleteDescriptionInPlace(SourceHandle& source); + class Graph; class NodePaletteModel; diff --git a/Gems/ScriptCanvas/Code/Editor/Include/ScriptCanvas/Components/GraphUpgrade.h b/Gems/ScriptCanvas/Code/Editor/Include/ScriptCanvas/Components/GraphUpgrade.h index 817b883695..9fedc2d1f3 100644 --- a/Gems/ScriptCanvas/Code/Editor/Include/ScriptCanvas/Components/GraphUpgrade.h +++ b/Gems/ScriptCanvas/Code/Editor/Include/ScriptCanvas/Components/GraphUpgrade.h @@ -102,9 +102,6 @@ namespace ScriptCanvasEditor void Log(const char* format, ...); private: - - bool m_verbose = true; - StateMachine* m_stateMachine; }; @@ -184,9 +181,9 @@ namespace ScriptCanvasEditor bool m_graphNeedsDirtying = false; Graph* m_graph = nullptr; - AZ::Data::Asset m_asset; + SourceHandle m_asset; - void SetAsset(const AZ::Data::Asset& asset); + void SetAsset(SourceHandle& assetasset); void OnComplete(IState::ExitStatus exitStatus) override; @@ -363,7 +360,7 @@ namespace ScriptCanvasEditor template void ScriptCanvasEditor::State::Log(const char* format, ...) { - if (m_verbose) + if (m_stateMachine->GetVerbose()) { char sBuffer[2048]; va_list ArgList; diff --git a/Gems/ScriptCanvas/Code/Editor/Nodes/NodeDisplayUtils.cpp b/Gems/ScriptCanvas/Code/Editor/Nodes/NodeDisplayUtils.cpp index 8d616f0a68..60eaba24f8 100644 --- a/Gems/ScriptCanvas/Code/Editor/Nodes/NodeDisplayUtils.cpp +++ b/Gems/ScriptCanvas/Code/Editor/Nodes/NodeDisplayUtils.cpp @@ -28,6 +28,7 @@ #include #include #include +#include #include #include @@ -45,6 +46,8 @@ #include #include +#include + namespace ScriptCanvasEditor::Nodes::SlotDisplayHelper { AZ::EntityId DisplayPropertySlot(AZ::EntityId graphCanvasNodeId, const ScriptCanvas::VisualExtensionSlotConfiguration& propertyConfiguration); @@ -101,10 +104,11 @@ namespace ScriptCanvasEditor::Nodes *graphCanvasUserData = node->GetEntityId(); } - GraphCanvas::TranslationKeyedString nodeKeyedString(nodeConfiguration.m_titleFallback, nodeConfiguration.m_translationContext); - nodeKeyedString.m_key = TranslationHelper::GetKey(nodeConfiguration.m_translationGroup, nodeConfiguration.m_translationKeyContext, nodeConfiguration.m_translationKeyName, TranslationItemType::Node, TranslationKeyId::Name); + GraphCanvas::TranslationKey key; + key << "ScriptCanvas::Node" << azrtti_typeid(node).ToString() << "details"; - AZStd::string nodeName = nodeKeyedString.GetDisplayString(); + GraphCanvas::TranslationRequests::Details details; + GraphCanvas::TranslationRequestBus::BroadcastResult(details, &GraphCanvas::TranslationRequests::GetDetails, key, details); int paramIndex = 0; int outputIndex = 0; @@ -112,27 +116,52 @@ namespace ScriptCanvasEditor::Nodes // Create the GraphCanvas slots for (const auto& slot : node->GetSlots()) { + GraphCanvas::TranslationKey slotKey; + slotKey << "ScriptCanvas::Node" << azrtti_typeid(node).ToString() << "slots"; + + int& index = (slot.IsData() && slot.IsInput()) ? paramIndex : outputIndex; + if (slot.IsVisible()) { - AZ::EntityId graphCanvasSlotId = DisplayScriptCanvasSlot(graphCanvasEntity->GetId(), slot); - - GraphCanvas::TranslationKeyedString slotNameKeyedString(slot.GetName(), nodeKeyedString.m_context); - GraphCanvas::TranslationKeyedString slotTooltipKeyedString(slot.GetToolTip(), nodeKeyedString.m_context); - - TranslationItemType itemType = TranslationHelper::GetItemType(slot.GetDescriptor()); - - if (itemType == TranslationItemType::ParamDataSlot || itemType == TranslationItemType::ReturnDataSlot) + AZStd::string slotKeyStr; + if (slot.IsData()) { - int& index = (itemType == TranslationItemType::ParamDataSlot) ? paramIndex : outputIndex; - - slotNameKeyedString.m_key = TranslationHelper::GetKey(nodeConfiguration.m_translationGroup, nodeConfiguration.m_translationKeyContext, nodeConfiguration.m_translationKeyName, itemType, TranslationKeyId::Name, index); - slotTooltipKeyedString.m_key = TranslationHelper::GetKey(nodeConfiguration.m_translationGroup, nodeConfiguration.m_translationKeyContext, nodeConfiguration.m_translationKeyName, itemType, TranslationKeyId::Tooltip, index); - index++; + slotKeyStr.append("Data"); } - GraphCanvas::SlotRequestBus::Event(graphCanvasSlotId, &GraphCanvas::SlotRequests::SetTranslationKeyedName, slotNameKeyedString); - GraphCanvas::SlotRequestBus::Event(graphCanvasSlotId, &GraphCanvas::SlotRequests::SetTranslationKeyedTooltip, slotTooltipKeyedString); + if (slot.GetConnectionType() == ScriptCanvas::ConnectionType::Input) + { + slotKeyStr.append("Input_"); + } + else + { + slotKeyStr.append("Output_"); + } + + slotKeyStr.append(slot.GetName()); + + slotKey << slotKeyStr << "details"; + + GraphCanvas::TranslationRequests::Details slotDetails; + GraphCanvas::TranslationRequestBus::BroadcastResult(slotDetails, &GraphCanvas::TranslationRequests::GetDetails, slotKey, slotDetails); + + if (slotDetails.m_name.empty()) + { + slotDetails.m_name = slot.GetName(); + } + + if (slotDetails.m_tooltip.empty()) + { + slotDetails.m_tooltip = slot.GetToolTip(); + } + + AZ::EntityId graphCanvasSlotId = DisplayScriptCanvasSlot(graphCanvasEntity->GetId(), slot, index); + + GraphCanvas::SlotRequestBus::Event(graphCanvasSlotId, &GraphCanvas::SlotRequests::SetName, slotDetails.m_name); + GraphCanvas::SlotRequestBus::Event(graphCanvasSlotId, &GraphCanvas::SlotRequests::SetTooltip, slotDetails.m_tooltip); } + + ++index; } const auto& visualExtensions = node->GetVisualExtensions(); @@ -142,25 +171,25 @@ namespace ScriptCanvasEditor::Nodes SlotDisplayHelper::DisplayVisualExtensionSlot(graphCanvasEntity->GetId(), extensionConfiguration); } - GraphCanvas::TranslationKeyedString subtitleKeyedString(nodeConfiguration.m_subtitleFallback, nodeConfiguration.m_translationContext); - subtitleKeyedString.m_key = TranslationHelper::GetKey(nodeConfiguration.m_translationGroup, nodeConfiguration.m_translationKeyContext, nodeConfiguration.m_translationKeyName, TranslationItemType::Node, TranslationKeyId::Category); + graphCanvasEntity->SetName(AZStd::string::format("GC-Node(%s)", details.m_name.c_str())); - graphCanvasEntity->SetName(AZStd::string::format("GC-Node(%s)", nodeKeyedString.GetDisplayString().c_str())); + GraphCanvas::NodeTitleRequestBus::Event(graphCanvasEntity->GetId(), &GraphCanvas::NodeTitleRequests::SetTitle, details.m_name); + GraphCanvas::NodeTitleRequestBus::Event(graphCanvasEntity->GetId(), &GraphCanvas::NodeTitleRequests::SetSubTitle, details.m_category); - GraphCanvas::NodeTitleRequestBus::Event(graphCanvasEntity->GetId(), &GraphCanvas::NodeTitleRequests::SetTranslationKeyedTitle, nodeKeyedString); - GraphCanvas::NodeTitleRequestBus::Event(graphCanvasEntity->GetId(), &GraphCanvas::NodeTitleRequests::SetTranslationKeyedSubTitle, subtitleKeyedString); + // Add to the tooltip the C++ class for reference + if (!details.m_tooltip.empty()) + { + details.m_tooltip.append("\n"); + } + details.m_tooltip.append(AZStd::string::format("[C++] %s", node->GetNodeTypeName().c_str())); + + GraphCanvas::NodeRequestBus::Event(graphCanvasEntity->GetId(), &GraphCanvas::NodeRequests::SetTooltip, details.m_tooltip); if (!nodeConfiguration.m_titlePalette.empty()) { GraphCanvas::NodeTitleRequestBus::Event(graphCanvasEntity->GetId(), &GraphCanvas::NodeTitleRequests::SetPaletteOverride, nodeConfiguration.m_titlePalette); } - // Set the name - GraphCanvas::TranslationKeyedString tooltipKeyedString(nodeConfiguration.m_tooltipFallback, nodeConfiguration.m_translationContext); - tooltipKeyedString.m_key = TranslationHelper::GetKey(TranslationContextGroup::ClassMethod, nodeConfiguration.m_translationKeyContext, nodeConfiguration.m_translationKeyName, TranslationItemType::Node, TranslationKeyId::Tooltip); - - GraphCanvas::NodeRequestBus::Event(graphCanvasEntity->GetId(), &GraphCanvas::NodeRequests::SetTranslationKeyedTooltip, tooltipKeyedString); - EditorNodeNotificationBus::Event(node->GetEntityId(), &EditorNodeNotifications::OnGraphCanvasNodeDisplayed, graphCanvasEntity->GetId()); return graphCanvasEntity->GetId(); @@ -193,22 +222,6 @@ namespace ScriptCanvasEditor::Nodes if (classData) { - AZStd::string nodeContext = GetContextName(*classData); - nodeConfiguration.m_translationContext = TranslationHelper::GetUserDefinedContext(nodeContext); - - nodeConfiguration.m_titleFallback = (classData->m_editData && classData->m_editData->m_name) ? classData->m_editData->m_name : classData->m_name; - nodeConfiguration.m_tooltipFallback = (classData->m_editData && classData->m_editData->m_description) ? classData->m_editData->m_description : ""; - - GraphCanvas::TranslationKeyedString subtitleKeyedString(nodeContext, nodeConfiguration.m_translationContext); - subtitleKeyedString.m_key = TranslationHelper::GetUserDefinedNodeKey(nodeContext, nodeConfiguration.m_titleFallback, ScriptCanvasEditor::TranslationKeyId::Category); - - nodeConfiguration.m_subtitleFallback = subtitleKeyedString.GetDisplayString(); - - nodeConfiguration.m_translationKeyName = nodeConfiguration.m_titleFallback; - nodeConfiguration.m_translationKeyContext = nodeContext; - - nodeConfiguration.m_translationGroup = TranslationContextGroup::ClassMethod; - if (classData->m_editData) { const AZ::Edit::ElementData* elementData = classData->m_editData->FindElementData(AZ::Edit::ClassElements::EditorData); @@ -260,20 +273,19 @@ namespace ScriptCanvasEditor::Nodes graphCanvasEntity->CreateComponent(methodNode->GetEntityId()); graphCanvasEntity->CreateComponent(methodNode->GetEntityId()); - TranslationContextGroup contextGroup = TranslationContextGroup::Invalid; - + bool isAccessor = false; switch (methodNode->GetMethodType()) { case ScriptCanvas::MethodType::Event: graphCanvasEntity->CreateComponent(); - contextGroup = TranslationContextGroup::EbusSender; break; - case ScriptCanvas::MethodType::Member: case ScriptCanvas::MethodType::Getter: case ScriptCanvas::MethodType::Setter: case ScriptCanvas::MethodType::Free: + isAccessor = true; + case ScriptCanvas::MethodType::Member: graphCanvasEntity->CreateComponent(); - contextGroup = TranslationContextGroup::ClassMethod; + break; break; default: AZ_Error("ScriptCanvas", false, "Invalid method node type, node creation failed. This node needs to be deleted."); @@ -292,57 +304,131 @@ namespace ScriptCanvasEditor::Nodes *graphCanvasUserData = methodNode->GetEntityId(); } + const bool isEBusSender = (methodNode->GetMethodType() == ScriptCanvas::MethodType::Event); const AZStd::string& className = methodNode->GetMethodClassName(); - const AZStd::string& methodName = methodNode->GetName(); + AZStd::string methodName = methodNode->GetName(); - AZStd::string translationContext = TranslationHelper::GetContextName(contextGroup, className); + GraphCanvas::TranslationKey key; - GraphCanvas::TranslationKeyedString nodeKeyedString(methodName, translationContext); - nodeKeyedString.m_key = TranslationHelper::GetKey(contextGroup, className, methodName, TranslationItemType::Node, TranslationKeyId::Name); + if (isAccessor) + { + AZ::StringFunc::Replace(methodName, "::Getter", ""); + AZ::StringFunc::Replace(methodName, "::Setter", ""); + } - GraphCanvas::TranslationKeyedString classKeyedString(className, translationContext); - classKeyedString.m_key = TranslationHelper::GetClassKey(contextGroup, className, TranslationKeyId::Name); + GraphCanvas::TranslationRequests::Details details; + details.m_name = methodName; - GraphCanvas::TranslationKeyedString tooltipKeyedString(AZStd::string(), translationContext); - tooltipKeyedString.m_key = TranslationHelper::GetKey(contextGroup, className, methodName, TranslationItemType::Node, TranslationKeyId::Tooltip); + AZStd::string context; + if (methodNode->GetMethodType() == ScriptCanvas::MethodType::Free) + { + context = "Constant"; + } + else + { + context = isEBusSender ? "EBusSender" : "BehaviorClass"; + } + key << context << className; + + GraphCanvas::TranslationRequestBus::BroadcastResult(details, &GraphCanvas::TranslationRequests::GetDetails, key + ".details", details); + + // Set the class' name as the subtitle fallback + details.m_subtitle = details.m_name; + + AZStd::string methodContext; + // Get the method's text data + GraphCanvas::TranslationRequests::Details methodDetails; + methodDetails.m_name = details.m_name; // fallback + key << "methods"; + AZStd::string updatedMethodName = methodName; + if (isAccessor) + { + if (methodNode->GetMethodType() == ScriptCanvas::MethodType::Getter || methodNode->GetMethodType() == ScriptCanvas::MethodType::Free) + { + updatedMethodName = "Get"; + methodContext = "Getter"; + } + else + { + updatedMethodName = "Set"; + methodContext = "Setter"; + } + updatedMethodName.append(methodName); + } + key << methodContext << updatedMethodName; + GraphCanvas::TranslationRequestBus::BroadcastResult(methodDetails, &GraphCanvas::TranslationRequests::GetDetails, key + ".details", methodDetails); + + + if (methodDetails.m_subtitle.empty()) + { + methodDetails.m_subtitle = details.m_category; + } + + // Add to the tooltip the C++ class for reference + if (!methodDetails.m_tooltip.empty()) + { + methodDetails.m_tooltip.append("\n"); + } + methodDetails.m_tooltip.append(AZStd::string::format("[C++] %s", className.c_str())); + + GraphCanvas::NodeTitleRequestBus::Event(graphCanvasNodeId, &GraphCanvas::NodeTitleRequests::SetDetails, methodDetails.m_name, methodDetails.m_subtitle); + GraphCanvas::NodeRequestBus::Event(graphCanvasNodeId, &GraphCanvas::NodeRequests::SetTooltip, methodDetails.m_tooltip); int paramIndex = 0; int outputIndex = 0; + int slotIndex = 0; auto busId = methodNode->GetBusSlotId(); for (const auto& slot : methodNode->GetSlots()) { + GraphCanvas::TranslationKey slotKey = key; + + int& inputOutputIndex = slot.IsInput() ? paramIndex : outputIndex; + + const bool isBusIdSlot = + methodNode->HasBusID() && busId == slot.GetId() && slot.GetDescriptor() == ScriptCanvas::SlotDescriptors::DataIn(); if (slot.IsVisible()) { - AZ::EntityId graphCanvasSlotId = DisplayScriptCanvasSlot(graphCanvasNodeId, slot); + AZ::EntityId graphCanvasSlotId = DisplayScriptCanvasSlot(graphCanvasNodeId, slot, slotIndex); - GraphCanvas::TranslationKeyedString slotNameKeyedString(slot.GetName(), translationContext); - GraphCanvas::TranslationKeyedString slotTooltipKeyedString(slot.GetToolTip(), translationContext); + details.m_name = slot.GetName(); + details.m_tooltip = slot.GetToolTip(); - if (methodNode->HasBusID() && busId == slot.GetId() && slot.GetDescriptor() == ScriptCanvas::SlotDescriptors::DataIn()) + if (isBusIdSlot) { - slotNameKeyedString = TranslationHelper::GetEBusSenderBusIdNameKey(); - slotTooltipKeyedString = TranslationHelper::GetEBusSenderBusIdTooltipKey(); + key = ::Translation::GlobalKeys::EBusSenderIDKey; + GraphCanvas::TranslationRequestBus::BroadcastResult( + details, &GraphCanvas::TranslationRequests::GetDetails, key + ".details", details); } - else + else if (slot.IsData()) { - TranslationItemType itemType = TranslationHelper::GetItemType(slot.GetDescriptor()); - - int& index = (itemType == TranslationItemType::ParamDataSlot) ? paramIndex : outputIndex; - - slotNameKeyedString.m_key = TranslationHelper::GetKey(contextGroup, className, methodName, itemType, TranslationKeyId::Name, index); - slotTooltipKeyedString.m_key = TranslationHelper::GetKey(contextGroup, className, methodName, itemType, TranslationKeyId::Tooltip, index); - - if ((itemType == TranslationItemType::ParamDataSlot) || (itemType == TranslationItemType::ReturnDataSlot)) + key.clear(); + key << context << className << "methods" << updatedMethodName; + if (slot.IsInput()) { - index++; + key << "params"; } + else + { + key << "results"; + } + key << inputOutputIndex; + + GraphCanvas::TranslationRequestBus::BroadcastResult( + details, &GraphCanvas::TranslationRequests::GetDetails, key + ".details", details); } - GraphCanvas::SlotRequestBus::Event(graphCanvasSlotId, &GraphCanvas::SlotRequests::SetTranslationKeyedName, slotNameKeyedString); - GraphCanvas::SlotRequestBus::Event(graphCanvasSlotId, &GraphCanvas::SlotRequests::SetTranslationKeyedTooltip, slotTooltipKeyedString); + GraphCanvas::SlotRequestBus::Event( + graphCanvasSlotId, &GraphCanvas::SlotRequests::SetDetails, details.m_name, details.m_tooltip); - CopyTranslationKeyedNameToDatumLabel(graphCanvasNodeId, slot.GetId(), graphCanvasSlotId); + UpdateSlotDatumLabel(graphCanvasNodeId, slot.GetId(), details.m_name); + } + + ++slotIndex; + + if (!isBusIdSlot && slot.IsData()) + { + ++inputOutputIndex; } } @@ -350,10 +436,6 @@ namespace ScriptCanvasEditor::Nodes AZStd::string displayName = methodNode->GetName(); graphCanvasEntity->SetName(AZStd::string::format("GC-Node(%s)", displayName.c_str())); - GraphCanvas::NodeRequestBus::Event(graphCanvasNodeId, &GraphCanvas::NodeRequests::SetTranslationKeyedTooltip, tooltipKeyedString); - - GraphCanvas::NodeTitleRequestBus::Event(graphCanvasNodeId, &GraphCanvas::NodeTitleRequests::SetTranslationKeyedTitle, nodeKeyedString); - GraphCanvas::NodeTitleRequestBus::Event(graphCanvasNodeId, &GraphCanvas::NodeTitleRequests::SetTranslationKeyedSubTitle, classKeyedString); GraphCanvas::NodeTitleRequestBus::Event(graphCanvasNodeId, &GraphCanvas::NodeTitleRequests::SetPaletteOverride, "MethodNodeTitlePalette"); // Override the title if it has the Setter or Getter suffixes @@ -420,24 +502,37 @@ namespace ScriptCanvasEditor::Nodes if (busNode->IsIDRequired() && slot->GetDescriptor() == ScriptCanvas::SlotDescriptors::DataIn()) { - GraphCanvas::SlotRequestBus::Event(gcSlotId, &GraphCanvas::SlotRequests::SetTranslationKeyedName, TranslationHelper::GetEBusHandlerBusIdNameKey()); - GraphCanvas::SlotRequestBus::Event(gcSlotId, &GraphCanvas::SlotRequests::SetTranslationKeyedTooltip, TranslationHelper::GetEBusHandlerBusIdTooltipKey()); + GraphCanvas::TranslationKey key; + key << ::Translation::GlobalKeys::EBusHandlerIDKey << "details"; + GraphCanvas::TranslationRequests::Details details; + details.m_name = slot->GetName(); + details.m_tooltip = slot->GetToolTip(); + GraphCanvas::TranslationRequestBus::BroadcastResult(details, &GraphCanvas::TranslationRequests::GetDetails, key, details); + + GraphCanvas::SlotRequestBus::Event(gcSlotId, &GraphCanvas::SlotRequests::SetDetails, details.m_name, details.m_tooltip); } } } - GraphCanvas::TranslationKeyedString nodeKeyedString(busName); - nodeKeyedString.m_context = TranslationHelper::GetEbusHandlerContext(busName); - nodeKeyedString.m_key = TranslationHelper::GetEbusHandlerKey(busName, TranslationKeyId::Name); - - GraphCanvas::TranslationKeyedString tooltipKeyedString(AZStd::string(), nodeKeyedString.m_context); - tooltipKeyedString.m_key = TranslationHelper::GetEbusHandlerKey(busName, TranslationKeyId::Tooltip); - // Set the name graphCanvasEntity->SetName(AZStd::string::format("GC-BusNode: %s", busName.data())); - GraphCanvas::NodeRequestBus::Event(graphCanvasNodeId, &GraphCanvas::NodeRequests::SetTranslationKeyedTooltip, tooltipKeyedString); - GraphCanvas::NodeTitleRequestBus::Event(graphCanvasNodeId, &GraphCanvas::NodeTitleRequests::SetTranslationKeyedTitle, nodeKeyedString); + GraphCanvas::TranslationKey key; + key << "EBusHandler" << busName << "details"; + + GraphCanvas::TranslationRequests::Details details; + details.m_name = busName; + GraphCanvas::TranslationRequestBus::BroadcastResult(details, &GraphCanvas::TranslationRequests::GetDetails, key, details); + + // Add to the tooltip the C++ class for reference + if (!details.m_tooltip.empty()) + { + details.m_tooltip.append("\n"); + } + details.m_tooltip.append(AZStd::string::format("[C++] %s", busName.c_str())); + + GraphCanvas::NodeRequestBus::Event(graphCanvasNodeId, &GraphCanvas::NodeRequests::SetTooltip, details.m_tooltip); + GraphCanvas::NodeTitleRequestBus::Event(graphCanvasNodeId, &GraphCanvas::NodeTitleRequests::SetTitle, details.m_name); GraphCanvas::NodeTitleRequestBus::Event(graphCanvasNodeId, &GraphCanvas::NodeTitleRequests::SetDefaultPalette, "HandlerWrapperNodeTitlePalette"); return graphCanvasNodeId; @@ -462,19 +557,27 @@ namespace ScriptCanvasEditor::Nodes AZStd::string decoratedName = AZStd::string::format("%s::%s", busName.c_str(), eventName.c_str()); - GraphCanvas::TranslationKeyedString nodeKeyedString(eventName); - nodeKeyedString.m_context = TranslationHelper::GetEbusHandlerContext(busName); - nodeKeyedString.m_key = TranslationHelper::GetEbusHandlerEventKey(busName, eventName, TranslationKeyId::Name); + GraphCanvas::TranslationKey key; + key << "EBusHandler" << busName << "methods" << eventName << "details"; - GraphCanvas::TranslationKeyedString tooltipKeyedString(AZStd::string(), nodeKeyedString.m_context); - tooltipKeyedString.m_key = TranslationHelper::GetEbusHandlerEventKey(busName, eventName, TranslationKeyId::Tooltip); + GraphCanvas::TranslationRequests::Details details; + details.m_name = eventName; + details.m_subtitle = busName; + GraphCanvas::TranslationRequestBus::BroadcastResult(details, &GraphCanvas::TranslationRequests::GetDetails, key, details); // Set the name graphCanvasEntity->SetName(AZStd::string::format("GC-Node(%s)", decoratedName.c_str())); - GraphCanvas::NodeRequestBus::Event(graphCanvasNodeId, &GraphCanvas::NodeRequests::SetTranslationKeyedTooltip, tooltipKeyedString); + // Add to the tooltip the C++ class for reference + if (!details.m_tooltip.empty()) + { + details.m_tooltip.append("\n"); + } + details.m_tooltip.append(AZStd::string::format("[C++] %s", busName.c_str())); - GraphCanvas::NodeTitleRequestBus::Event(graphCanvasNodeId, &GraphCanvas::NodeTitleRequests::SetTranslationKeyedTitle, nodeKeyedString); + GraphCanvas::NodeRequestBus::Event(graphCanvasNodeId, &GraphCanvas::NodeRequests::SetTooltip, details.m_tooltip); + + GraphCanvas::NodeTitleRequestBus::Event(graphCanvasNodeId, &GraphCanvas::NodeTitleRequests::SetTitle, details.m_name); GraphCanvas::NodeTitleRequestBus::Event(graphCanvasNodeId, &GraphCanvas::NodeTitleRequests::SetPaletteOverride, "HandlerNodeTitlePalette"); return graphCanvasNodeId; @@ -512,76 +615,27 @@ namespace ScriptCanvasEditor::Nodes if (slot.IsVisible()) { AZ::EntityId gcSlotId = DisplayScriptCanvasSlot(graphCanvasNodeId, slot, group); - if (slot.GetId() == azEventEntry.m_azEventInputSlotId) - { - GraphCanvas::TranslationKeyedString slotTranslationEntry(azEventEntry.m_eventName); - slotTranslationEntry.m_context = TranslationHelper::GetAzEventHandlerContextKey(); - // The translation key in this case acts like a json pointer referencing a particular - // json string within a hypothetical json document - AZ::StackedString azEventHandlerNodeKey = TranslationHelper::GetAzEventHandlerRootPointer(azEventEntry.m_eventName); - azEventHandlerNodeKey.Push("Name"); - slotTranslationEntry.m_key = AZStd::string_view{ azEventHandlerNodeKey }; - GraphCanvas::SlotRequestBus::Event(gcSlotId, &GraphCanvas::SlotRequests::SetTranslationKeyedName, slotTranslationEntry); - azEventHandlerNodeKey.Pop(); - azEventHandlerNodeKey.Push("Tooltip"); - slotTranslationEntry.m_key = AZStd::string_view{ azEventHandlerNodeKey }; - GraphCanvas::SlotRequestBus::Event(gcSlotId, &GraphCanvas::SlotRequests::SetTranslationKeyedTooltip, slotTranslationEntry); - } - else - { - GraphCanvas::TranslationKeyedString slotTranslationEntry(slot.GetName()); - slotTranslationEntry.m_context = TranslationHelper::GetAzEventHandlerContextKey(); - // The translation key in this case acts like a json pointer referencing a particular - // json string within a hypothetical json document - // translation key is rooted at /AzEventHandler/${EventName}/Slots/${SlotName}/{In,Out,Param,Return} - AZ::StackedString azEventHandlerNodeKey = TranslationHelper::GetAzEventHandlerRootPointer(azEventEntry.m_eventName); - azEventHandlerNodeKey.Push("Slots"); - azEventHandlerNodeKey.Push(slot.GetName()); - switch(TranslationHelper::GetItemType(slot.GetDescriptor())) - { - case TranslationItemType::ExecutionInSlot: - azEventHandlerNodeKey.Push("In"); - break; - case TranslationItemType::ExecutionOutSlot: - azEventHandlerNodeKey.Push("Out"); - break; - case TranslationItemType::ParamDataSlot: - azEventHandlerNodeKey.Push("Param"); - break; - case TranslationItemType::ReturnDataSlot: - azEventHandlerNodeKey.Push("Return"); - break; - default: - // Slot is not an execution or data slot, do nothing - break; - } + GraphCanvas::TranslationKey key; + key << "AZEventHandler" << azEventNode->GetNodeName() << "slots" << slot.GetName() << "details"; - azEventHandlerNodeKey.Push("Name"); - slotTranslationEntry.m_key = AZStd::string_view{ azEventHandlerNodeKey }; - GraphCanvas::SlotRequestBus::Event(gcSlotId, &GraphCanvas::SlotRequests::SetTranslationKeyedName, slotTranslationEntry); - azEventHandlerNodeKey.Pop(); - azEventHandlerNodeKey.Push("Tooltip"); - slotTranslationEntry.m_key = AZStd::string_view{ azEventHandlerNodeKey }; - GraphCanvas::SlotRequestBus::Event(gcSlotId, &GraphCanvas::SlotRequests::SetTranslationKeyedTooltip, slotTranslationEntry); - } + GraphCanvas::TranslationRequests::Details details; + GraphCanvas::TranslationRequestBus::BroadcastResult(details, &GraphCanvas::TranslationRequests::GetDetails, key, details); + + GraphCanvas::SlotRequestBus::Event(gcSlotId, &GraphCanvas::SlotRequests::SetName, details.m_name); + GraphCanvas::SlotRequestBus::Event(gcSlotId, &GraphCanvas::SlotRequests::SetTooltip, details.m_tooltip);; } } - GraphCanvas::TranslationKeyedString nodeTranslationEntry(azEventEntry.m_eventName); - nodeTranslationEntry.m_context = TranslationHelper::GetAzEventHandlerContextKey(); - // The translation key in this case acts like a json pointer referencing a particular - // json string within a hypothetical json document - AZ::StackedString azEventHandlerNodeKey = TranslationHelper::GetAzEventHandlerRootPointer(azEventEntry.m_eventName); - azEventHandlerNodeKey.Push("Name"); - nodeTranslationEntry.m_key = AZStd::string_view{ azEventHandlerNodeKey }; - GraphCanvas::NodeTitleRequestBus::Event(graphCanvasNodeId, &GraphCanvas::NodeTitleRequests::SetTranslationKeyedTitle, nodeTranslationEntry); - azEventHandlerNodeKey.Pop(); - azEventHandlerNodeKey.Push("Tooltip"); - nodeTranslationEntry.m_key = AZStd::string_view{ azEventHandlerNodeKey }; - GraphCanvas::NodeRequestBus::Event(graphCanvasNodeId, &GraphCanvas::NodeRequests::SetTranslationKeyedTooltip, nodeTranslationEntry); + GraphCanvas::TranslationKey key; + key << "AZEventHandler" << azEventEntry.m_eventName << "details"; + + GraphCanvas::TranslationRequests::Details details; + GraphCanvas::TranslationRequestBus::BroadcastResult(details, &GraphCanvas::TranslationRequests::GetDetails, key, details); + + GraphCanvas::NodeTitleRequestBus::Event(graphCanvasNodeId, &GraphCanvas::NodeTitleRequests::SetTitle, details.m_name); + GraphCanvas::NodeRequestBus::Event(graphCanvasNodeId, &GraphCanvas::NodeRequests::SetTooltip, details.m_tooltip); - // Set the name graphCanvasEntity->SetName(AZStd::string::format("GC-EventNode: %s", azEventEntry.m_eventName.c_str())); GraphCanvas::NodeTitleRequestBus::Event(graphCanvasNodeId, &GraphCanvas::NodeTitleRequests::SetPaletteOverride, "HandlerNodeTitlePalette"); @@ -652,8 +706,11 @@ namespace ScriptCanvasEditor::Nodes if (busNode->IsIDRequired() && slot->GetDescriptor() == ScriptCanvas::SlotDescriptors::DataIn()) { - GraphCanvas::SlotRequestBus::Event(gcSlotId, &GraphCanvas::SlotRequests::SetTranslationKeyedName, TranslationHelper::GetEBusHandlerBusIdNameKey()); - GraphCanvas::SlotRequestBus::Event(gcSlotId, &GraphCanvas::SlotRequests::SetTranslationKeyedTooltip, TranslationHelper::GetEBusHandlerBusIdTooltipKey()); + GraphCanvas::TranslationKey key; + key << ::Translation::GlobalKeys::EBusHandlerIDKey << "details"; + GraphCanvas::TranslationRequests::Details details; + GraphCanvas::TranslationRequestBus::BroadcastResult(details, &GraphCanvas::TranslationRequests::GetDetails, key, details); + GraphCanvas::SlotRequestBus::Event(gcSlotId, &GraphCanvas::SlotRequests::SetDetails, details.m_name, details.m_tooltip); } } } @@ -718,11 +775,7 @@ namespace ScriptCanvasEditor::Nodes graphCanvasEntity->CreateComponent(ScriptCanvas::Nodes::Core::Method::RTTI_Type()); graphCanvasEntity->CreateComponent(senderNode->GetEntityId()); graphCanvasEntity->CreateComponent(senderNode->GetEntityId()); - - TranslationContextGroup contextGroup = TranslationContextGroup::Invalid; - graphCanvasEntity->CreateComponent(senderNode->GetAssetId(), senderNode->GetEventId()); - contextGroup = TranslationContextGroup::EbusSender; graphCanvasEntity->Init(); graphCanvasEntity->Activate(); @@ -744,17 +797,24 @@ namespace ScriptCanvasEditor::Nodes return graphCanvasNodeId; } + int paramIndex = 0; + int outputIndex = 0; + for (const auto& slot : senderNode->GetSlots()) { + int& index = (slot.IsData() && slot.IsInput()) ? paramIndex : outputIndex; + if (slot.IsVisible()) { - AZ::EntityId graphCanvasSlotId = DisplayScriptCanvasSlot(graphCanvasNodeId, slot); + AZ::EntityId graphCanvasSlotId = DisplayScriptCanvasSlot(graphCanvasNodeId, slot, index); GraphCanvas::SlotRequestBus::Event(graphCanvasSlotId, &GraphCanvas::SlotRequests::SetName, slot.GetName()); GraphCanvas::SlotRequestBus::Event(graphCanvasSlotId, &GraphCanvas::SlotRequests::SetTooltip, slot.GetToolTip()); - CopyTranslationKeyedNameToDatumLabel(graphCanvasNodeId, slot.GetId(), graphCanvasSlotId); + UpdateSlotDatumLabel(graphCanvasNodeId, slot.GetId(), slot.GetName()); } + + ++index; } // Set the name @@ -766,7 +826,7 @@ namespace ScriptCanvasEditor::Nodes return graphCanvasNodeId; } -// Function Nodes + // Function Nodes AZ::EntityId DisplayFunctionNode(AZ::EntityId graphCanvasGraphId, const ScriptCanvas::Nodes::Core::FunctionCallNode* functionNode) { return DisplayFunctionNode(graphCanvasGraphId, const_cast(functionNode)); @@ -811,28 +871,47 @@ namespace ScriptCanvasEditor::Nodes { AZ_Error("Script Canvas", false, "Script Canvas Function asset (%s) is not loaded, unable to display the node.", functionNode->GetAssetId().ToString().c_str()); - GraphCanvas::TranslationKeyedString errorTitle("ERROR!"); - GraphCanvas::TranslationKeyedString errorSubstring("Missing Script Canvas Function Asset!"); + GraphCanvas::TranslationKey key; + key = "Globals.MissingFunctionAsset.Title.details.m_name"; - GraphCanvas::NodeTitleRequestBus::Event(graphCanvasNodeId, &GraphCanvas::NodeTitleRequests::SetTranslationKeyedTitle, errorTitle); - GraphCanvas::NodeTitleRequestBus::Event(graphCanvasNodeId, &GraphCanvas::NodeTitleRequests::SetTranslationKeyedSubTitle, errorSubstring); + bool success = false; + AZStd::string result = "Error!"; + GraphCanvas::TranslationRequestBus::BroadcastResult(success, &GraphCanvas::TranslationRequests::Get, key = "Globals.MissingFunctionAsset.Title.details.m_name", result); + if (success) + { + GraphCanvas::NodeTitleRequestBus::Event(graphCanvasNodeId, &GraphCanvas::NodeTitleRequests::SetTitle, result); + } + + result = "Missing Script Canvas Function Asset"; + GraphCanvas::TranslationRequestBus::BroadcastResult(success, &GraphCanvas::TranslationRequests::Get, key = "Globals.MissingFunctionAsset.Title.details.tooltip", result); + if (success) + { + GraphCanvas::NodeTitleRequestBus::Event(graphCanvasNodeId, &GraphCanvas::NodeTitleRequests::SetSubTitle, result); + } return graphCanvasNodeId; } + int paramIndex = 0; + int outputIndex = 0; + for (const auto& slot : functionNode->GetSlots()) { - AZ::EntityId graphCanvasSlotId = DisplayScriptCanvasSlot(graphCanvasNodeId, slot); + int& index = (slot.IsData() && slot.IsInput()) ? paramIndex : outputIndex; + + AZ::EntityId graphCanvasSlotId = DisplayScriptCanvasSlot(graphCanvasNodeId, slot, index); GraphCanvas::SlotRequestBus::Event(graphCanvasSlotId, &GraphCanvas::SlotRequests::SetName, slot.GetName()); GraphCanvas::SlotRequestBus::Event(graphCanvasSlotId, &GraphCanvas::SlotRequests::SetTooltip, slot.GetToolTip()); - CopyTranslationKeyedNameToDatumLabel(graphCanvasNodeId, slot.GetId(), graphCanvasSlotId); + UpdateSlotDatumLabel(graphCanvasNodeId, slot.GetId(), slot.GetName()); + + ++index; } if (asset) { - GraphCanvas::NodeTitleRequestBus::Event(graphCanvasNodeId, &GraphCanvas::NodeTitleRequests::SetTitle, asset->GetData().m_name); + GraphCanvas::NodeTitleRequestBus::Event(graphCanvasNodeId, &GraphCanvas::NodeTitleRequests::SetTitle, asset->m_interfaceData.m_name); } GraphCanvas::NodeTitleRequestBus::Event(graphCanvasNodeId, &GraphCanvas::NodeTitleRequests::SetPaletteOverride, "MethodNodeTitlePalette"); @@ -866,31 +945,11 @@ namespace ScriptCanvasEditor::Nodes if (const AZ::SerializeContext::ClassData* classData = serializeContext->FindClassData(azrtti_typeid(functionDefinitionNode))) { - AZStd::string nodeContext = GetContextName(*classData); - nodeConfiguration.m_translationContext = TranslationHelper::GetUserDefinedContext(nodeContext); - - nodeConfiguration.m_titleFallback = (classData->m_editData && classData->m_editData->m_name) ? classData->m_editData->m_name : classData->m_name; - nodeConfiguration.m_tooltipFallback = (classData->m_editData && classData->m_editData->m_description) ? classData->m_editData->m_description : ""; - - GraphCanvas::TranslationKeyedString subtitleKeyedString(nodeContext, nodeConfiguration.m_translationContext); - subtitleKeyedString.m_key = TranslationHelper::GetUserDefinedNodeKey(nodeContext, nodeConfiguration.m_titleFallback, ScriptCanvasEditor::TranslationKeyId::Category); - - nodeConfiguration.m_subtitleFallback = subtitleKeyedString.GetDisplayString(); - - nodeConfiguration.m_translationKeyName = nodeConfiguration.m_titleFallback; - nodeConfiguration.m_translationKeyContext = nodeContext; - - nodeConfiguration.m_translationGroup = TranslationContextGroup::ClassMethod; - - ScriptCanvas::GraphScopedNodeId nodelingId; nodelingId.m_identifier = nodeConfiguration.m_scriptCanvasId; nodelingId.m_scriptCanvasId = functionDefinitionNode->GetOwningScriptCanvasId(); - AZStd::string nodelingName; - ScriptCanvas::NodelingRequestBus::EventResult(nodelingName, nodelingId, &ScriptCanvas::NodelingRequests::GetDisplayName); - if (classData->m_editData) { const AZ::Edit::ElementData* elementData = classData->m_editData->FindElementData(AZ::Edit::ClassElements::EditorData); @@ -908,15 +967,12 @@ namespace ScriptCanvasEditor::Nodes } } - nodeConfiguration.m_subtitleFallback = ""; - // Because of how the extender slots are registered, there isn't an easy way to only create one or the other based on // the type of nodeling, so instead they both get created and we need to remove the inapplicable one GraphCanvas::ConnectionType typeToRemove = (functionDefinitionNode->IsExecutionEntry()) ? GraphCanvas::CT_Input : GraphCanvas::CT_Output; AZ::EntityId graphCanvasNodeId = DisplayGeneralScriptCanvasNode(graphCanvasGraphId, functionDefinitionNode, nodeConfiguration); - AZStd::vector extenderSlotIds, executionSlotIds; GraphCanvas::NodeRequestBus::EventResult(extenderSlotIds, graphCanvasNodeId, &GraphCanvas::NodeRequests::FindVisibleSlotIdsByType, typeToRemove, GraphCanvas::SlotTypes::ExtenderSlot); if (!extenderSlotIds.empty()) @@ -960,22 +1016,6 @@ namespace ScriptCanvasEditor::Nodes if (classData) { - AZStd::string nodeContext = GetContextName(*classData); - nodeConfiguration.m_translationContext = TranslationHelper::GetUserDefinedContext(nodeContext); - - nodeConfiguration.m_titleFallback = (classData->m_editData && classData->m_editData->m_name) ? classData->m_editData->m_name : classData->m_name; - nodeConfiguration.m_tooltipFallback = (classData->m_editData && classData->m_editData->m_description) ? classData->m_editData->m_description : ""; - - GraphCanvas::TranslationKeyedString subtitleKeyedString(nodeContext, nodeConfiguration.m_translationContext); - subtitleKeyedString.m_key = TranslationHelper::GetUserDefinedNodeKey(nodeContext, nodeConfiguration.m_titleFallback, ScriptCanvasEditor::TranslationKeyId::Category); - - nodeConfiguration.m_subtitleFallback = subtitleKeyedString.GetDisplayString(); - - nodeConfiguration.m_translationKeyName = nodeConfiguration.m_titleFallback; - nodeConfiguration.m_translationKeyContext = nodeContext; - - nodeConfiguration.m_translationGroup = TranslationContextGroup::ClassMethod; - if (classData->m_editData) { const AZ::Edit::ElementData* elementData = classData->m_editData->FindElementData(AZ::Edit::ClassElements::EditorData); @@ -993,8 +1033,6 @@ namespace ScriptCanvasEditor::Nodes } } - nodeConfiguration.m_subtitleFallback = ""; - return DisplayGeneralScriptCanvasNode(graphCanvasGraphId, nodeling, nodeConfiguration); } @@ -1008,19 +1046,6 @@ namespace ScriptCanvasEditor::Nodes nodeConfiguration.m_titlePalette = "GetVariableNodeTitlePalette"; nodeConfiguration.m_scriptCanvasId = variableNode->GetEntityId(); - // - nodeConfiguration.m_translationContext = TranslationHelper::GetContextName(TranslationContextGroup::ClassMethod, "CORE"); - - nodeConfiguration.m_translationKeyContext = "CORE"; - nodeConfiguration.m_translationKeyName = "GETVARIABLE"; - - nodeConfiguration.m_titleFallback = "Get Variable"; - nodeConfiguration.m_subtitleFallback = ""; - nodeConfiguration.m_tooltipFallback = "Gets the specified Variable or one of it's properties."; - - nodeConfiguration.m_translationGroup = TranslationContextGroup::ClassMethod; - // - AZ::EntityId graphCanvasNodeId = DisplayGeneralScriptCanvasNode(graphCanvasGraphId, variableNode, nodeConfiguration); GraphCanvas::SlotLayoutRequestBus::Event(graphCanvasNodeId, &GraphCanvas::SlotLayoutRequests::ConfigureSlotGroup, GraphCanvas::SlotGroups::ExecutionGroup, GraphCanvas::SlotGroupConfiguration(0)); @@ -1040,20 +1065,6 @@ namespace ScriptCanvasEditor::Nodes nodeConfiguration.m_titlePalette = "SetVariableNodeTitlePalette"; nodeConfiguration.m_scriptCanvasId = variableNode->GetEntityId(); - // - - nodeConfiguration.m_translationContext = TranslationHelper::GetContextName(TranslationContextGroup::ClassMethod, "CORE"); - - nodeConfiguration.m_translationKeyContext = "CORE"; - nodeConfiguration.m_translationKeyName = "SETVARIABLE"; - - nodeConfiguration.m_titleFallback = "Set Variable"; - nodeConfiguration.m_subtitleFallback = ""; - nodeConfiguration.m_tooltipFallback = "Sets the specified Variable."; - - nodeConfiguration.m_translationGroup = TranslationContextGroup::ClassMethod; - // - AZ::EntityId graphCanvasId = DisplayGeneralScriptCanvasNode(graphCanvasGraphId, variableNode, nodeConfiguration); GraphCanvas::SlotLayoutRequestBus::Event(graphCanvasId, &GraphCanvas::SlotLayoutRequests::ConfigureSlotGroup, GraphCanvas::SlotGroups::ExecutionGroup, GraphCanvas::SlotGroupConfiguration(0)); @@ -1158,7 +1169,7 @@ namespace ScriptCanvasEditor::Nodes return graphCanvasConnectionType; } - AZ::EntityId DisplayScriptCanvasSlot(AZ::EntityId graphCanvasNodeId, const ScriptCanvas::Slot& slot, GraphCanvas::SlotGroup slotGroup) + AZ::EntityId DisplayScriptCanvasSlot(AZ::EntityId graphCanvasNodeId, const ScriptCanvas::Slot& slot, int slotIndex, GraphCanvas::SlotGroup slotGroup) { if (!slot.IsVisible()) { @@ -1242,8 +1253,46 @@ namespace ScriptCanvasEditor::Nodes if (slotEntity) { + GraphCanvas::TranslationKey slotKey; + slotKey << "ScriptCanvas::Node" << azrtti_typeid(slot.GetNode()).ToString() << "slots"; + + AZStd::string slotKeyStr; + if (slot.IsData()) + { + slotKeyStr.append("Data"); + } + + if (slot.GetConnectionType() == ScriptCanvas::ConnectionType::Input) + { + slotKeyStr.append("Input_"); + } + else + { + slotKeyStr.append("Output_"); + } + + slotKeyStr.append(slot.GetName()); + slotKeyStr.append(AZStd::string::format("_%d", slotIndex)); + slotKey << slotKeyStr << "details"; + + GraphCanvas::TranslationRequests::Details slotDetails; + GraphCanvas::TranslationRequestBus::BroadcastResult(slotDetails, &GraphCanvas::TranslationRequests::GetDetails, slotKey, slotDetails); + + if (slotDetails.m_name.empty()) + { + slotDetails.m_name = slot.GetName(); + } + + if (slotDetails.m_tooltip.empty()) + { + slotDetails.m_tooltip = slot.GetToolTip(); + } + + GraphCanvas::SlotRequestBus::Event(slotEntity->GetId(), &GraphCanvas::SlotRequests::SetName, slotDetails.m_name); + GraphCanvas::SlotRequestBus::Event(slotEntity->GetId(), &GraphCanvas::SlotRequests::SetTooltip, slotDetails.m_tooltip); + RegisterAndActivateGraphCanvasSlot(graphCanvasNodeId, slot.GetId(), slotEntity); - CopyTranslationKeyedNameToDatumLabel(graphCanvasNodeId, slot.GetId(), slotEntity->GetId()); + UpdateSlotDatumLabel(graphCanvasNodeId, slot.GetId(), slot.GetName()); return slotEntity->GetId(); } else diff --git a/Gems/ScriptCanvas/Code/Editor/Nodes/NodeDisplayUtils.h b/Gems/ScriptCanvas/Code/Editor/Nodes/NodeDisplayUtils.h index 6d0b125b7a..8dbc5cd2c7 100644 --- a/Gems/ScriptCanvas/Code/Editor/Nodes/NodeDisplayUtils.h +++ b/Gems/ScriptCanvas/Code/Editor/Nodes/NodeDisplayUtils.h @@ -63,5 +63,5 @@ namespace ScriptCanvasEditor::Nodes // SlotGroup will control how elements are grouped. // Invalid will cause the slots to put themselves into whatever category they belong to by default. - AZ::EntityId DisplayScriptCanvasSlot(AZ::EntityId graphCanvasNodeId, const ScriptCanvas::Slot& slot, GraphCanvas::SlotGroup group = GraphCanvas::SlotGroups::Invalid); + AZ::EntityId DisplayScriptCanvasSlot(AZ::EntityId graphCanvasNodeId, const ScriptCanvas::Slot& slot, int slotIndex, GraphCanvas::SlotGroup group = GraphCanvas::SlotGroups::Invalid); } diff --git a/Gems/ScriptCanvas/Code/Editor/Nodes/NodeUtils.cpp b/Gems/ScriptCanvas/Code/Editor/Nodes/NodeUtils.cpp index 3c5e74cbeb..7ebbd4bc6d 100644 --- a/Gems/ScriptCanvas/Code/Editor/Nodes/NodeUtils.cpp +++ b/Gems/ScriptCanvas/Code/Editor/Nodes/NodeUtils.cpp @@ -12,22 +12,13 @@ #include #include +#include #include namespace ScriptCanvasEditor::Nodes { - void CopyTranslationKeyedNameToDatumLabel(const AZ::EntityId& graphCanvasNodeId, - ScriptCanvas::SlotId scSlotId, - const AZ::EntityId& graphCanvasSlotId) + void UpdateSlotDatumLabel(const AZ::EntityId& graphCanvasNodeId, ScriptCanvas::SlotId scSlotId, const AZStd::string& name) { - GraphCanvas::TranslationKeyedString name; - GraphCanvas::SlotRequestBus::EventResult(name, graphCanvasSlotId, &GraphCanvas::SlotRequests::GetTranslationKeyedName); - if (name.GetDisplayString().empty()) - { - return; - } - - // GC node -> SC node. AZStd::any* userData = nullptr; GraphCanvas::NodeRequestBus::EventResult(userData, graphCanvasNodeId, &GraphCanvas::NodeRequests::GetUserData); AZ::EntityId scNodeEntityId = userData && userData->is() ? *AZStd::any_cast(userData) : AZ::EntityId(); @@ -36,11 +27,11 @@ namespace ScriptCanvasEditor::Nodes ScriptCanvas::ModifiableDatumView datumView; ScriptCanvas::NodeRequestBus::Event(scNodeEntityId, &ScriptCanvas::NodeRequests::FindModifiableDatumView, scSlotId, datumView); - datumView.RelabelDatum(name.GetDisplayString()); + datumView.RelabelDatum(name); } } - void CopySlotTranslationKeyedNamesToDatums(AZ::EntityId graphCanvasNodeId) + void UpdateSlotDatumLabels(AZ::EntityId graphCanvasNodeId) { AZStd::vector graphCanvasSlotIds; GraphCanvas::NodeRequestBus::EventResult(graphCanvasSlotIds, graphCanvasNodeId, &GraphCanvas::NodeRequests::GetSlotIds); @@ -51,47 +42,10 @@ namespace ScriptCanvasEditor::Nodes if (auto scriptCanvasSlotId = AZStd::any_cast(slotUserData)) { - CopyTranslationKeyedNameToDatumLabel(graphCanvasNodeId, *scriptCanvasSlotId, graphCanvasSlotId); + AZStd::string slotName; + GraphCanvas::SlotRequestBus::EventResult(slotName, graphCanvasSlotId, &GraphCanvas::SlotRequests::GetName); + UpdateSlotDatumLabel(graphCanvasNodeId, *scriptCanvasSlotId, slotName); } } } - - ////////////////////// - // NodeConfiguration - ////////////////////// - AZStd::string GetCategoryName(const AZ::SerializeContext::ClassData& classData) - { - if (auto editorDataElement = classData.m_editData->FindElementData(AZ::Edit::ClassElements::EditorData)) - { - if (auto attribute = editorDataElement->FindAttribute(AZ::Edit::Attributes::Category)) - { - if (auto data = azrtti_cast*>(attribute)) - { - return data->Get(nullptr); - } - } - } - - return {}; - } - - AZStd::string GetContextName(const AZ::SerializeContext::ClassData& classData) - { - if (auto editorDataElement = classData.m_editData ? classData.m_editData->FindElementData(AZ::Edit::ClassElements::EditorData) : nullptr) - { - if (auto attribute = editorDataElement->FindAttribute(AZ::Edit::Attributes::Category)) - { - if (auto data = azrtti_cast*>(attribute)) - { - AZStd::string fullCategoryName = data->Get(nullptr); - AZStd::string delimiter = "/"; - AZStd::vector results; - AZStd::tokenize(fullCategoryName, delimiter, results); - return results.back(); - } - } - } - - return {}; - } } diff --git a/Gems/ScriptCanvas/Code/Editor/Nodes/NodeUtils.h b/Gems/ScriptCanvas/Code/Editor/Nodes/NodeUtils.h index f99ae745b5..0f1ae151a6 100644 --- a/Gems/ScriptCanvas/Code/Editor/Nodes/NodeUtils.h +++ b/Gems/ScriptCanvas/Code/Editor/Nodes/NodeUtils.h @@ -71,18 +71,6 @@ namespace ScriptCanvasEditor AZStd::string m_titlePalette; AZStd::vector< AZ::Uuid > m_customComponents; - // Translation Information for the Node - AZStd::string m_translationContext; - - AZStd::string m_translationKeyName; - AZStd::string m_translationKeyContext; - - TranslationContextGroup m_translationGroup; - - AZStd::string m_titleFallback; - AZStd::string m_subtitleFallback; - AZStd::string m_tooltipFallback; - AZ::EntityId m_scriptCanvasId; }; @@ -92,16 +80,9 @@ namespace ScriptCanvasEditor AZStd::string m_titlePalette; }; - AZStd::string GetContextName(const AZ::SerializeContext::ClassData& classData); - AZStd::string GetCategoryName(const AZ::SerializeContext::ClassData& classData); - - void CopySlotTranslationKeyedNamesToDatums(AZ::EntityId graphCanvasNodeId); - - // Copies the the translated key name to the ScriptCanvas Data Slot which matches - // the scSlotId - void CopyTranslationKeyedNameToDatumLabel(const AZ::EntityId& graphCanvasNodeId, - ScriptCanvas::SlotId scSlotId, - const AZ::EntityId& graphCanvasSlotId); + // Copies the slot name to the underlying ScriptCanvas Data Slot which matches the slot Id + void UpdateSlotDatumLabels(AZ::EntityId graphCanvasNodeId); + void UpdateSlotDatumLabel(const AZ::EntityId& graphCanvasNodeId, ScriptCanvas::SlotId scSlotId, const AZStd::string& name); template NodeType* GetNode(AZ::EntityId scriptCanvasGraphId, NodeIdPair nodeIdPair) diff --git a/Gems/ScriptCanvas/Code/Editor/QtMetaTypes.h b/Gems/ScriptCanvas/Code/Editor/QtMetaTypes.h index 9058e27b03..5e413f0266 100644 --- a/Gems/ScriptCanvas/Code/Editor/QtMetaTypes.h +++ b/Gems/ScriptCanvas/Code/Editor/QtMetaTypes.h @@ -11,11 +11,13 @@ AZ_PUSH_DISABLE_WARNING(4251 4800 4244, "-Wunknown-warning-option") #include AZ_POP_DISABLE_WARNING +#include #include #include - // VariableId is a UUID typedef for now. So we don't want to double reflect the UUID. Q_DECLARE_METATYPE(AZ::Uuid); Q_DECLARE_METATYPE(AZ::Data::AssetId); Q_DECLARE_METATYPE(ScriptCanvas::Data::Type); Q_DECLARE_METATYPE(ScriptCanvas::VariableId); +Q_DECLARE_METATYPE(ScriptCanvasEditor::SourceHandle); + diff --git a/Gems/ScriptCanvas/Code/Editor/ReflectComponent.cpp b/Gems/ScriptCanvas/Code/Editor/ReflectComponent.cpp index a75671d0f8..45257150c6 100644 --- a/Gems/ScriptCanvas/Code/Editor/ReflectComponent.cpp +++ b/Gems/ScriptCanvas/Code/Editor/ReflectComponent.cpp @@ -6,33 +6,110 @@ * */ -#include - #include -#include #include - -#include - +#include +#include +#include #include #include - #include -#include #include +#include #include +#include #include #include -#include - #include +#include +#include +#include + +namespace CoreCpp +{ + static bool ScriptCanvasDataVersionConverter(AZ::SerializeContext& context, AZ::SerializeContext::DataElementNode& rootDataElementNode) + { + if (rootDataElementNode.GetVersion() == 0) + { + int scriptCanvasEntityIndex = rootDataElementNode.FindElement(AZ_CRC("m_scriptCanvas", 0xfcd20d85)); + if (scriptCanvasEntityIndex == -1) + { + AZ_Error("Script Canvas", false, "Version Converter failed, The Script Canvas Entity is missing"); + return false; + } + + auto scComponentElements = AZ::Utils::FindDescendantElements(context, rootDataElementNode, AZStd::vector{AZ_CRC("m_scriptCanvas", 0xfcd20d85), + AZ_CRC("element", 0x41405e39), AZ_CRC("Components", 0xee48f5fd)}); + if (!scComponentElements.empty()) + { + scComponentElements.front()->AddElementWithData(context, "element", ScriptCanvasEditor::EditorGraphVariableManagerComponent()); + } + } + + if (rootDataElementNode.GetVersion() < 4) + { + auto scEntityElements = AZ::Utils::FindDescendantElements(context, rootDataElementNode, + AZStd::vector{AZ_CRC("m_scriptCanvas", 0xfcd20d85), AZ_CRC("element", 0x41405e39)}); + if (scEntityElements.empty()) + { + AZ_Error("Script Canvas", false, "Version Converter failed, The Script Canvas Entity is missing"); + return false; + } + auto& scEntityDataElement = *scEntityElements.front(); + + AZ::Entity scEntity; + if (!scEntityDataElement.GetData(scEntity)) + { + AZ_Error("Script Canvas", false, "Unable to retrieve entity data from the Data Element"); + return false; + } + + auto graph = AZ::EntityUtils::FindFirstDerivedComponent(&scEntity); + if (!graph) + { + AZ_Error("Script Canvas", false, "Script Canvas graph component could not be found on Script Canvas Entity for ScriptCanvasData version %u", rootDataElementNode.GetVersion()); + return false; + } + auto variableManager = AZ::EntityUtils::FindFirstDerivedComponent(&scEntity); + if (!variableManager) + { + AZ_Error("Script Canvas", false, "Script Canvas variable manager component could not be found on Script Canvas Entity for ScriptCanvasData version %u", rootDataElementNode.GetVersion()); + return false; + } + + variableManager->ConfigureScriptCanvasId(graph->GetScriptCanvasId()); + if (!scEntityDataElement.SetData(context, scEntity)) + { + AZ_Error("Script Canvas", false, "Failed to set converted Script Canvas Entity back on data element node when transitioning from version %u to version 4", rootDataElementNode.GetVersion()); + return false; + } + } + + return true; + } +} + +namespace ScriptCanvas +{ + void ScriptCanvasData::Reflect(AZ::ReflectContext* reflectContext) + { + if (auto serializeContext = azrtti_cast(reflectContext)) + { + serializeContext->Class() + ->Version(4, &CoreCpp::ScriptCanvasDataVersionConverter) + ->Field("m_scriptCanvas", &ScriptCanvasData::m_scriptCanvasEntity) + ; + } + } +} namespace ScriptCanvasEditor { void ReflectComponent::Reflect(AZ::ReflectContext* context) { + SourceHandle::Reflect(context); ScriptCanvas::ScriptCanvasData::Reflect(context); - ScriptCanvasAssetHolder::Reflect(context); + Deprecated::ScriptCanvasAssetHolder::Reflect(context); EditorSettings::EditorWorkspace::Reflect(context); EditorSettings::ScriptCanvasEditorSettings::Reflect(context); LiveLoggingUserSettings::Reflect(context); diff --git a/Gems/ScriptCanvas/Code/Editor/Settings.cpp b/Gems/ScriptCanvas/Code/Editor/Settings.cpp index fd745fa257..ac40324dff 100644 --- a/Gems/ScriptCanvas/Code/Editor/Settings.cpp +++ b/Gems/ScriptCanvas/Code/Editor/Settings.cpp @@ -13,7 +13,7 @@ #include "Settings.h" -#include + #include #include @@ -92,13 +92,11 @@ namespace ScriptCanvasEditor // WorkspaceAssetSaveData EditorWorkspace::WorkspaceAssetSaveData::WorkspaceAssetSaveData() - : m_assetType(azrtti_typeid()) { } - EditorWorkspace::WorkspaceAssetSaveData::WorkspaceAssetSaveData(const AZ::Data::AssetId& assetId) + EditorWorkspace::WorkspaceAssetSaveData::WorkspaceAssetSaveData(SourceHandle assetId) : m_assetId(assetId) - , m_assetType(azrtti_typeid()) { } @@ -108,7 +106,7 @@ namespace ScriptCanvasEditor { AZStd::vector assetSaveData; AZStd::vector assetIds; - auto subElement = rootDataElementNode.FindSubElement(AZ_CRC("ActiveAssetIds", 0xe445268a)); + auto subElement = rootDataElementNode.FindSubElement(AZ_CRC_CE("ActiveAssetIds")); if (subElement) { @@ -117,15 +115,21 @@ namespace ScriptCanvasEditor assetSaveData.reserve(assetIds.size()); for (const AZ::Data::AssetId& assetId : assetIds) { - assetSaveData.emplace_back(assetId); + assetSaveData.emplace_back(SourceHandle( nullptr, assetId.m_guid, "" )); } } } - rootDataElementNode.RemoveElementByName(AZ_CRC("ActiveAssetIds", 0xe445268a)); + rootDataElementNode.RemoveElementByName(AZ_CRC_CE("ActiveAssetIds")); rootDataElementNode.AddElementWithData(context, "ActiveAssetData", assetSaveData); } + if (rootDataElementNode.GetVersion() < 4) + { + rootDataElementNode.RemoveElementByName(AZ_CRC_CE("ActiveAssetIds")); + rootDataElementNode.RemoveElementByName(AZ_CRC_CE("FocusedAssetId")); + } + return true; } @@ -135,13 +139,12 @@ namespace ScriptCanvasEditor if (serialize) { serialize->Class() - ->Version(1) + ->Version(2) ->Field("AssetId", &WorkspaceAssetSaveData::m_assetId) - ->Field("AssetType", &WorkspaceAssetSaveData::m_assetType) ; serialize->Class() - ->Version(3, &EditorWorkspace::VersionConverter) + ->Version(4, &EditorWorkspace::VersionConverter) ->Field("m_storedWindowState", &EditorWorkspace::m_storedWindowState) ->Field("m_windowGeometry", &EditorWorkspace::m_windowGeometry) ->Field("FocusedAssetId", &EditorWorkspace::m_focusedAssetId) @@ -150,13 +153,13 @@ namespace ScriptCanvasEditor } } - void EditorWorkspace::ConfigureActiveAssets(AZ::Data::AssetId focussedAssetId, const AZStd::vector< WorkspaceAssetSaveData >& activeAssetData) + void EditorWorkspace::ConfigureActiveAssets(SourceHandle focussedAssetId, const AZStd::vector< WorkspaceAssetSaveData >& activeAssetData) { m_focusedAssetId = focussedAssetId; m_activeAssetData = activeAssetData; } - AZ::Data::AssetId EditorWorkspace::GetFocusedAssetId() const + SourceHandle EditorWorkspace::GetFocusedAssetId() const { return m_focusedAssetId; } @@ -395,6 +398,7 @@ namespace ScriptCanvasEditor ->Field("ShowUpgradeDialog", &ScriptCanvasEditorSettings::m_showUpgradeDialog) ->Field("ZoomSettings", &ScriptCanvasEditorSettings::m_zoomSettings) ->Field("ExperimentalSettings", &ScriptCanvasEditorSettings::m_experimentalSettings) + ->Field("SceneContextMenuNodePaletteWidth", &ScriptCanvasEditorSettings::m_sceneContextMenuNodePaletteWidth) ; AZ::EditContext* editContext = serialize->GetEditContext(); @@ -467,13 +471,13 @@ namespace ScriptCanvasEditor ->Attribute(AZ::Edit::Attributes::Visibility, AZ_CRC("PropertyVisibility_ShowChildrenOnly", 0xef428f20)) ->DataElement(AZ::Edit::UIHandlers::Default, &ScriptCanvasEditorSettings::m_snapDistance, "Connection Snap Distance", "The distance from a slot under which connections will snap to it.") ->Attribute(AZ::Edit::Attributes::Min, 10.0) - ->DataElement(AZ::Edit::UIHandlers::Default, &ScriptCanvasEditorSettings::m_enableGroupDoubleClickCollapse, "Double Click to Collapse/Uncollapse Group", "Enables the user to decide whether you can double click on a group to collapse/uncollapse a group.") + ->DataElement(AZ::Edit::UIHandlers::Default, &ScriptCanvasEditorSettings::m_enableGroupDoubleClickCollapse, "Double Click to Collapse/Expand Group", "Enables the user to decide whether you can double click on a group to collapse/expand a group.") ->DataElement(AZ::Edit::UIHandlers::Default, &ScriptCanvasEditorSettings::m_allowBookmarkViewpointControl, "Bookmark Zooming", "Will cause the bookmarks to force the viewport into the state determined by the bookmark type\nBookmark Anchors - The viewport that exists when the bookmark is created.\nNode Groups - The area the Node Group covers") ->DataElement(AZ::Edit::UIHandlers::Default, &ScriptCanvasEditorSettings::m_dragNodeCouplingConfig, "Node Coupling Configuration", "Controls for managing Node Coupling.\nNode Coupling is when you are dragging a node and leave it hovered over another Node, we will try to connect the sides you overlapped with each other.") ->DataElement(AZ::Edit::UIHandlers::Default, &ScriptCanvasEditorSettings::m_dragNodeSplicingConfig, "Drag Node Splicing Configuration", "Controls for managing Node Splicing on a Drag.\nNode Splicing on a Drag will let you drag a node onto a connection, and splice that node onto the specified connection.") ->DataElement(AZ::Edit::UIHandlers::Default, &ScriptCanvasEditorSettings::m_dropNodeSplicingConfig, "Drop Node Splicing Configuration", "Controls for managing Node Splicing on a Drag.\nNode Splicing on a drop will let you drop a node onto a connection from the Node Palette, and splice that node onto the specified connection.") ->DataElement(AZ::Edit::UIHandlers::Default, &ScriptCanvasEditorSettings::m_autoSaveConfig, "AutoSave Configuration", "Controls for managing Auto Saving.\nAuto Saving will occur after the specified time of inactivity on a graph.") - ->DataElement(AZ::Edit::UIHandlers::Default, &ScriptCanvasEditorSettings::m_shakeDespliceConfig, "Shake To Desplice", "Settings that controls various parameters of the Shake to Desplice feature") + ->DataElement(AZ::Edit::UIHandlers::Default, &ScriptCanvasEditorSettings::m_shakeDespliceConfig, "Shake To De-splice", "Settings that controls various parameters of the Shake to De-splice feature") ->DataElement(AZ::Edit::UIHandlers::Default, &ScriptCanvasEditorSettings::m_allowNodeNudging, "Allow Node Nudging", "Controls whether or not nodes will attempt to nudge each other out of the way under various interactions.") ->DataElement(AZ::Edit::UIHandlers::Default, &ScriptCanvasEditorSettings::m_alignmentTimeMS, "Alignment Time", "Controls the amount of time nodes will take to slide into place when performing alignment commands") ->Attribute(AZ::Edit::Attributes::Min, 0) @@ -485,8 +489,10 @@ namespace ScriptCanvasEditor ->DataElement(AZ::Edit::UIHandlers::Default, &ScriptCanvasEditorSettings::m_experimentalSettings, "Experimental Settings", "Settings that will control elements that are under development and may not work as expected") ->DataElement(AZ::Edit::UIHandlers::Default, &ScriptCanvasEditorSettings::m_saveRawTranslationOuputToFile, "Save Translation File", "Save out the raw result of translation for debug purposes") ->Attribute(AZ::Edit::Attributes::ChangeNotify, &SettingsCpp::UpdateProcessingSettings) - ->DataElement(AZ::Edit::UIHandlers::Default, &ScriptCanvasEditorSettings::m_printAbstractCodeModel, "Print Abstract Modeld", "Print out the Abstract Code Model to the console at the end of parsing for debug purposes") + ->DataElement(AZ::Edit::UIHandlers::Default, &ScriptCanvasEditorSettings::m_printAbstractCodeModel, "Print Abstract Model", "Print out the Abstract Code Model to the console at the end of parsing for debug purposes") ->Attribute(AZ::Edit::Attributes::ChangeNotify, &SettingsCpp::UpdateProcessingSettings) + ->DataElement(AZ::Edit::UIHandlers::Default, &ScriptCanvasEditorSettings::m_sceneContextMenuNodePaletteWidth, "Context Menu Width", "Allows you to configure the width of the context menu that opens on a Script Canvas graph") + ->Attribute(AZ::Edit::Attributes::Min, 120) ; editContext->Class("Experimental", "Settings for features under development that may not behave as expected yet.") diff --git a/Gems/ScriptCanvas/Code/Editor/Settings.h b/Gems/ScriptCanvas/Code/Editor/Settings.h index eefb7454c3..27039d8a70 100644 --- a/Gems/ScriptCanvas/Code/Editor/Settings.h +++ b/Gems/ScriptCanvas/Code/Editor/Settings.h @@ -11,6 +11,7 @@ #include #include #include +#include // qdatastream.h(173): warning C4251: 'QDataStream::d': class 'QScopedPointer>' needs to have dll-interface to be used by clients of class 'QDataStream' // qwidget.h(858): warning C4800: 'uint': forcing value to bool 'true' or 'false' (performance warning) @@ -53,11 +54,10 @@ namespace ScriptCanvasEditor AZ_RTTI(WorkspaceAssetSaveData, "{927368CA-096F-4CF1-B2E0-1B9E4A93EA57}"); WorkspaceAssetSaveData(); - WorkspaceAssetSaveData(const AZ::Data::AssetId& assetId); + WorkspaceAssetSaveData(SourceHandle assetId); virtual ~WorkspaceAssetSaveData() = default; - AZ::Data::AssetId m_assetId; - AZ::Data::AssetType m_assetType; + SourceHandle m_assetId; }; @@ -69,9 +69,9 @@ namespace ScriptCanvasEditor EditorWorkspace() = default; - void ConfigureActiveAssets(AZ::Data::AssetId focusedAssetId, const AZStd::vector< WorkspaceAssetSaveData >& activeAssetIds); + void ConfigureActiveAssets(SourceHandle focusedAsset, const AZStd::vector< WorkspaceAssetSaveData >& activeAssetIds); - AZ::Data::AssetId GetFocusedAssetId() const; + SourceHandle GetFocusedAssetId() const; AZStd::vector< WorkspaceAssetSaveData > GetActiveAssetData() const; void Init(const QByteArray& windowState, const QByteArray& windowGeometry); @@ -79,7 +79,7 @@ namespace ScriptCanvasEditor void Clear() { - m_focusedAssetId.SetInvalid(); + m_focusedAssetId.Clear(); m_activeAssetData.clear(); } @@ -91,7 +91,7 @@ namespace ScriptCanvasEditor AZStd::vector m_windowGeometry; AZStd::vector m_windowState; - AZ::Data::AssetId m_focusedAssetId; + SourceHandle m_focusedAssetId; AZStd::vector< WorkspaceAssetSaveData > m_activeAssetData; }; @@ -357,6 +357,8 @@ namespace ScriptCanvasEditor AZ::u32 m_alignmentTimeMS; StylingSettings m_stylingSettings; + + AZ::u32 m_sceneContextMenuNodePaletteWidth = 300; }; } } diff --git a/Gems/ScriptCanvas/Code/Editor/SystemComponent.cpp b/Gems/ScriptCanvas/Code/Editor/SystemComponent.cpp index f901915fdb..1b5e97ba36 100644 --- a/Gems/ScriptCanvas/Code/Editor/SystemComponent.cpp +++ b/Gems/ScriptCanvas/Code/Editor/SystemComponent.cpp @@ -22,6 +22,7 @@ #include #include #include +#include #include #include #include @@ -33,8 +34,11 @@ #include #include #include +#include #include #include +#include + namespace ScriptCanvasEditor { @@ -107,7 +111,6 @@ namespace ScriptCanvasEditor void SystemComponent::Activate() { - m_assetTracker.Activate(); AZ::JobManagerDesc jobDesc; for (size_t i = 0; i < cs_jobThreads; ++i) { @@ -119,6 +122,10 @@ namespace ScriptCanvasEditor PopulateEditorCreatableTypes(); AzToolsFramework::RegisterGenericComboBoxHandler(); + if (AzToolsFramework::PropertyTypeRegistrationMessages::Bus::FindFirstHandler()) + { + AzToolsFramework::PropertyTypeRegistrationMessages::Bus::Broadcast(&AzToolsFramework::PropertyTypeRegistrationMessages::RegisterPropertyType, aznew SourceHandlePropertyHandler()); + } SystemRequestBus::Handler::BusConnect(); ScriptCanvasExecutionBus::Handler::BusConnect(); @@ -159,7 +166,6 @@ namespace ScriptCanvasEditor m_jobContext.reset(); m_jobManager.reset(); - m_assetTracker.Deactivate(); } void SystemComponent::AddAsyncJob(AZStd::function&& jobFunc) @@ -173,13 +179,11 @@ namespace ScriptCanvasEditor outCreatableTypes.insert(m_creatableTypes.begin(), m_creatableTypes.end()); } - void SystemComponent::CreateEditorComponentsOnEntity(AZ::Entity* entity, const AZ::Data::AssetType& assetType) + void SystemComponent::CreateEditorComponentsOnEntity(AZ::Entity* entity, [[maybe_unused]] const AZ::Data::AssetType& assetType) { if (entity) { auto graph = entity->CreateComponent(); - graph->SetAssetType(assetType); - entity->CreateComponent(graph->GetScriptCanvasId()); } } @@ -248,23 +252,27 @@ namespace ScriptCanvasEditor { continue; } - + entityMenu->setEnabled(true); - + usedIds.insert(assetId); - + AZStd::string rootPath; AZ::Data::AssetInfo assetInfo = AssetHelpers::GetAssetInfo(assetId, rootPath); - + AZStd::string displayName; AZ::StringFunc::Path::GetFileName(assetInfo.m_relativePath.c_str(), displayName); - + action = entityMenu->addAction(QString("%1").arg(QString(displayName.c_str()))); - - QObject::connect(action, &QAction::triggered, [assetId] + + QObject::connect(action, &QAction::triggered, [assetInfo] { AzToolsFramework::OpenViewPane(LyViewPane::ScriptCanvas); - GeneralRequestBus::Broadcast(&GeneralRequests::OpenScriptCanvasAsset, assetId, -1); + SourceHandle sourceHandle(nullptr, assetInfo.m_assetId.m_guid, ""); + CompleteDescriptionInPlace(sourceHandle); + GeneralRequestBus::Broadcast(&GeneralRequests::OpenScriptCanvasAsset + , sourceHandle + , Tracker::ScriptCanvasFileState::UNMODIFIED, -1); }); } } @@ -301,14 +309,17 @@ namespace ScriptCanvasEditor return AzToolsFramework::AssetBrowser::SourceFileDetails(); } - void SystemComponent::AddSourceFileOpeners(const char* fullSourceFileName, [[maybe_unused]] const AZ::Uuid& sourceUUID, AzToolsFramework::AssetBrowser::SourceFileOpenerList& openers) + void SystemComponent::AddSourceFileOpeners + ( [[maybe_unused]] const char* fullSourceFileName + , [[maybe_unused]] const AZ::Uuid& sourceUUID + , [[maybe_unused]] AzToolsFramework::AssetBrowser::SourceFileOpenerList& openers) { using namespace AzToolsFramework; using namespace AzToolsFramework::AssetBrowser; bool isScriptCanvasAsset = false; - ScriptCanvasAssetDescription scriptCanvasAssetDescription; - if (AZStd::wildcard_match(AZStd::string::format("*%s", scriptCanvasAssetDescription.GetExtensionImpl()).c_str(), fullSourceFileName)) + + if (AZStd::wildcard_match(ScriptCanvasEditor::SourceDescription::GetFileExtension(), fullSourceFileName)) { isScriptCanvasAsset = true; } @@ -322,14 +333,26 @@ namespace ScriptCanvasEditor if (fullDetails) { AzToolsFramework::OpenViewPane(LyViewPane::ScriptCanvas); - + AzToolsFramework::EditorRequests::Bus::Broadcast(&AzToolsFramework::EditorRequests::OpenViewPane, "Script Canvas"); - GeneralRequestBus::BroadcastResult(openOutcome, &GeneralRequests::OpenScriptCanvasAsset, sourceUUIDInCall, -1); + GeneralRequestBus::BroadcastResult(openOutcome + , &GeneralRequests::OpenScriptCanvasAsset + , SourceHandle(nullptr, sourceUUIDInCall, ""), Tracker::ScriptCanvasFileState::UNMODIFIED, -1); } }; + + openers.push_back({ "O3DE_ScriptCanvasEditor", "Open In Script Canvas Editor...", QIcon(ScriptCanvasEditor::SourceDescription::GetIconPath()), scriptCanvasEditorCallback }); + } + } - openers.push_back({ "O3DE_ScriptCanvasEditor", "Open In Script Canvas Editor...", QIcon(), scriptCanvasEditorCallback }); - } + void SystemComponent::OnStartPlayInEditor() + { + ScriptCanvas::Execution::PerformanceStatisticsEBus::Broadcast(&ScriptCanvas::Execution::PerformanceStatisticsBus::ClearSnaphotStatistics); + } + + void SystemComponent::OnStopPlayInEditor() + { + AZ::ScriptSystemRequestBus::Broadcast(&AZ::ScriptSystemRequests::GarbageCollect); } void SystemComponent::OnUserSettingsActivated() @@ -373,7 +396,7 @@ namespace ScriptCanvasEditor return ScriptCanvasEditor::RunGraph(runGraphSpec).front(); } - Reporter SystemComponent::RunAssetGraph(AZ::Data::Asset asset, ScriptCanvas::ExecutionMode mode) + Reporter SystemComponent::RunAssetGraph(SourceHandle asset, ScriptCanvas::ExecutionMode mode) { Reporter reporter; RunEditorAsset(asset, reporter, mode); diff --git a/Gems/ScriptCanvas/Code/Editor/SystemComponent.h b/Gems/ScriptCanvas/Code/Editor/SystemComponent.h index 6f85b3c5a6..9aecd00320 100644 --- a/Gems/ScriptCanvas/Code/Editor/SystemComponent.h +++ b/Gems/ScriptCanvas/Code/Editor/SystemComponent.h @@ -19,10 +19,10 @@ #include #include #include -#include #include #include #include +#include namespace ScriptCanvasEditor { @@ -36,6 +36,8 @@ namespace ScriptCanvasEditor , private AZ::Data::AssetBus::MultiHandler , private AzToolsFramework::AssetSeedManagerRequests::Bus::Handler , private AzToolsFramework::EditorContextMenuBus::Handler + , private AzToolsFramework::EditorEntityContextNotificationBus::Handler + { public: AZ_COMPONENT(SystemComponent, "{1DE7A120-4371-4009-82B5-8140CB1D7B31}"); @@ -76,7 +78,7 @@ namespace ScriptCanvasEditor //////////////////////////////////////////////////////////////////////// // ScriptCanvasExecutionBus::Handler... - Reporter RunAssetGraph(AZ::Data::Asset, ScriptCanvas::ExecutionMode mode) override; + Reporter RunAssetGraph(SourceHandle source, ScriptCanvas::ExecutionMode mode) override; Reporter RunGraph(AZStd::string_view path, ScriptCanvas::ExecutionMode mode) override; //////////////////////////////////////////////////////////////////////// @@ -97,7 +99,12 @@ namespace ScriptCanvasEditor //////////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////////// - + + protected: + void OnStartPlayInEditor() override; + + void OnStopPlayInEditor() override; + private: SystemComponent(const SystemComponent&) = delete; @@ -110,8 +117,6 @@ namespace ScriptCanvasEditor AZStd::unordered_set m_creatableTypes; - AssetTracker m_assetTracker; - AZStd::vector m_assetsThatNeedManualUpgrade; bool m_isUpgrading = false; diff --git a/Gems/ScriptCanvas/Code/Editor/Translation/TranslationHelper.h b/Gems/ScriptCanvas/Code/Editor/Translation/TranslationHelper.h index bd6f097485..4d7eed7075 100644 --- a/Gems/ScriptCanvas/Code/Editor/Translation/TranslationHelper.h +++ b/Gems/ScriptCanvas/Code/Editor/Translation/TranslationHelper.h @@ -8,507 +8,44 @@ #pragma once -#include +#include +#include -#include -#include - -#include -#include +namespace Translation +{ + namespace GlobalKeys + { + static constexpr const char* EBusSenderIDKey = "Globals.EBusSenderBusId"; + static constexpr const char* EBusHandlerIDKey = "Globals.EBusHandlerBusId"; + static constexpr const char* MissingFunctionKey = "Globals.MissingFunction"; + static constexpr const char* EBusHandlerOutSlot = "Globals.EBusHandler.OutSlot"; + } +} namespace ScriptCanvasEditor { - enum class TranslationContextGroup : AZ::u32 + namespace TranslationHelper { - EbusSender, - EbusHandler, - ClassMethod, - GlobalMethod, - Invalid - }; - - enum class TranslationItemType : AZ::u32 - { - Node, - Wrapper, - ExecutionInSlot, - ExecutionOutSlot, - ParamDataSlot, - ReturnDataSlot, - BusIdSlot, - Invalid - }; - - enum class TranslationKeyId : AZ::u32 - { - Name, - Tooltip, - Category, - Invalid - }; - - namespace TranslationContextGroupParts - { - const char* const ebusSender = "EBus"; - const char* const ebusHandler = "Handler"; - const char* const classMethod = "Method"; - constexpr const char* const globalMethod = "GlobalMethod"; - }; - - namespace TranslationKeyParts - { - const char* const handler = "HANDLER_"; - const char* const name = "NAME"; - const char* const tooltip = "TOOLTIP"; - const char* const category = "CATEGORY"; - const char* const in = "IN"; - const char* const out = "OUT"; - const char* const param = "PARAM"; - const char* const output = "OUTPUT"; - const char* const busid = "BUSID"; - } - - // The context name and keys generated by TranslationHelper should match the keys - // being exported by the TSGenerateAction.cpp in the ScriptCanvasDeveloper Gem. - class TranslationHelper - { - public: - static AZStd::string GetContextName(TranslationContextGroup group, AZStd::string_view keyBase) - { - if (group == TranslationContextGroup::Invalid || keyBase.empty()) - { - // Missing information - return AZStd::string(); - } - - const char* groupPart; - - switch (group) - { - case TranslationContextGroup::EbusSender: - groupPart = TranslationContextGroupParts::ebusSender; - break; - case TranslationContextGroup::EbusHandler: - groupPart = TranslationContextGroupParts::ebusHandler; - break; - case TranslationContextGroup::ClassMethod: - groupPart = TranslationContextGroupParts::classMethod; - break; - case TranslationContextGroup::GlobalMethod: - groupPart = TranslationContextGroupParts::globalMethod; - break; - default: - AZ_Warning("TranslationComponent", false, "Invalid translation group ID."); - groupPart = ""; - } - - AZStd::string fullKey = AZStd::string::format("%s: %.*s", groupPart, - aznumeric_cast(keyBase.size()), keyBase.data()); - - return fullKey; - } - - // UserDefined - static AZStd::string GetUserDefinedContext(AZStd::string_view contextName) - { - return GetContextName(TranslationContextGroup::ClassMethod, contextName); - } - - static AZStd::string GetUserDefinedKey(AZStd::string_view contextName, TranslationKeyId keyId) - { - return GetClassKey(TranslationContextGroup::ClassMethod, contextName, keyId); - } - - static AZStd::string GetUserDefinedNodeKey(AZStd::string_view contextName, AZStd::string_view nodeName, TranslationKeyId keyId) - { - return GetKey(TranslationContextGroup::ClassMethod, contextName, nodeName, TranslationItemType::Node, keyId); - } - - static AZStd::string GetUserDefinedNodeSlotKey(AZStd::string_view contextName, AZStd::string_view nodeName, TranslationItemType itemType, TranslationKeyId keyId, int slotIndex) - { - return GetKey(TranslationContextGroup::ClassMethod, contextName, nodeName, itemType, keyId, slotIndex); - } - //// - - // EBusEvent - static AZStd::string GetEbusHandlerContext(AZStd::string_view busName) - { - return GetContextName(TranslationContextGroup::EbusHandler, busName); - } - - static AZStd::string GetEbusHandlerKey(AZStd::string_view busName, TranslationKeyId keyId) - { - return GetClassKey(TranslationContextGroup::EbusHandler, busName, keyId); - } - - static AZStd::string GetEbusHandlerEventKey(AZStd::string_view busName, AZStd::string_view eventName, TranslationKeyId keyId) - { - return GetKey(TranslationContextGroup::EbusHandler, busName, eventName, TranslationItemType::Node, keyId); - } - - static AZStd::string GetEBusHandlerSlotKey(AZStd::string_view busName, AZStd::string_view eventName, TranslationItemType type, TranslationKeyId keyId, int paramIndex) - { - return GetKey(TranslationContextGroup::EbusHandler, busName, eventName, type, keyId, paramIndex); - } - //// - - static AZStd::string GetKey(TranslationContextGroup group, AZStd::string_view keyBase, AZStd::string_view keyName, TranslationItemType type, TranslationKeyId keyId, int paramIndex = 0) - { - if (group == TranslationContextGroup::Invalid || keyBase.empty() - || type == TranslationItemType::Invalid || keyId == TranslationKeyId::Invalid) - { - // Missing information - return AZStd::string(); - } - - if (type != TranslationItemType::Wrapper && keyName.empty()) - { - // Missing information - return AZStd::string(); - } - - AZStd::string fullKey; - - const char* prefix = ""; - if (group == TranslationContextGroup::EbusHandler) - { - prefix = TranslationKeyParts::handler; - } - - const char* keyPart = GetKeyPart(keyId); - - switch (type) - { - case TranslationItemType::Node: - fullKey = AZStd::string::format("%s%.*s_%.*s_%s", - prefix, - aznumeric_cast(keyBase.size()), - keyBase.data(), - aznumeric_cast(keyName.size()), - keyName.data(), - keyPart - ); - break; - case TranslationItemType::Wrapper: - fullKey = GetClassKey(group, keyBase, keyId); - break; - case TranslationItemType::ExecutionInSlot: - fullKey = AZStd::string::format("%s%.*s_%.*s_%s_%s", - prefix, - aznumeric_cast(keyBase.size()), - keyBase.data(), - aznumeric_cast(keyName.size()), - keyName.data(), - TranslationKeyParts::in, - keyPart - ); - break; - case TranslationItemType::ExecutionOutSlot: - fullKey = AZStd::string::format("%s%.*s_%.*s_%s_%s", - prefix, - aznumeric_cast(keyBase.size()), - keyBase.data(), - aznumeric_cast(keyName.size()), - keyName.data(), - TranslationKeyParts::out, - keyPart - ); - break; - case TranslationItemType::ParamDataSlot: - fullKey = AZStd::string::format("%s%.*s_%.*s_%s%d_%s", - prefix, - aznumeric_cast(keyBase.size()), - keyBase.data(), - aznumeric_cast(keyName.size()), - keyName.data(), - TranslationKeyParts::param, - paramIndex, - keyPart - ); - break; - case TranslationItemType::ReturnDataSlot: - fullKey = AZStd::string::format("%s%.*s_%.*s_%s%d_%s", - prefix, - aznumeric_cast(keyBase.size()), - keyBase.data(), - aznumeric_cast(keyName.size()), - keyName.data(), - TranslationKeyParts::output, - paramIndex, - keyPart - ); - break; - case TranslationItemType::BusIdSlot: - fullKey = AZStd::string::format("%s%.*s_%.*s_%s_%s", - prefix, - aznumeric_cast(keyBase.size()), - keyBase.data(), - aznumeric_cast(keyName.size()), - keyName.data(), - TranslationKeyParts::busid, - keyPart - ); - break; - default: - AZ_Warning("ScriptCanvas TranslationHelper", false, "Invalid translation item type."); - } - - AZStd::to_upper(fullKey.begin(), fullKey.end()); - - return fullKey; - } - - static AZStd::string GetClassKey(TranslationContextGroup group, AZStd::string_view keyBase, TranslationKeyId keyId) - { - const char* prefix = ""; - if (group == TranslationContextGroup::EbusHandler) - { - prefix = TranslationKeyParts::handler; - } - - const char* keyPart = GetKeyPart(keyId); - - AZStd::string fullKey = AZStd::string::format("%s%.*s_%s", - prefix, - aznumeric_cast(keyBase.size()), - keyBase.data(), - keyPart - ); - - AZStd::to_upper(fullKey.begin(), fullKey.end()); - - return fullKey; - } - - static AZStd::string GetGlobalMethodKey(AZStd::string_view keyName, TranslationItemType keyType, - TranslationKeyId keyId, int paramIndex = 0) - { - const char* keyPart = GetKeyPart(keyId); - - AZStd::string fullKey; - switch (keyType) - { - case TranslationItemType::Node: - fullKey = AZStd::string::format("%.*s_%s", - aznumeric_cast(keyName.size()), - keyName.data(), - keyPart - ); - break; - case TranslationItemType::ExecutionInSlot: - fullKey = AZStd::string::format("%.*s_%s_%s", - aznumeric_cast(keyName.size()), - keyName.data(), - TranslationKeyParts::in, - keyPart - ); - break; - case TranslationItemType::ExecutionOutSlot: - fullKey = AZStd::string::format("%.*s_%s_%s", - aznumeric_cast(keyName.size()), - keyName.data(), - TranslationKeyParts::out, - keyPart - ); - break; - case TranslationItemType::ParamDataSlot: - fullKey = AZStd::string::format("%.*s_%s%d_%s", - aznumeric_cast(keyName.size()), - keyName.data(), - TranslationKeyParts::param, - paramIndex, - keyPart - ); - break; - case TranslationItemType::ReturnDataSlot: - fullKey = AZStd::string::format("%.*s_%s%d_%s", - aznumeric_cast(keyName.size()), - keyName.data(), - TranslationKeyParts::output, - paramIndex, - keyPart - ); - break; - default: - AZ_Warning("ScriptCanvas TranslationHelper", false, "Invalid translation item type."); - } - - AZStd::to_upper(fullKey.begin(), fullKey.end()); - - return fullKey; - } - - static const char* GetKeyPart(TranslationKeyId keyId) - { - const char* keyPart = ""; - - switch (keyId) - { - case TranslationKeyId::Name: - keyPart = TranslationKeyParts::name; - break; - case TranslationKeyId::Tooltip: - keyPart = TranslationKeyParts::tooltip; - break; - case TranslationKeyId::Category: - keyPart = TranslationKeyParts::category; - break; - - - default: - AZ_Warning("ScriptCanvas TranslationHelper", false, "Invalid translation key ID."); - } - - return keyPart; - } - - static TranslationItemType GetItemType(ScriptCanvas::SlotDescriptor slotDescriptor) - { - if (slotDescriptor == ScriptCanvas::SlotDescriptors::ExecutionIn()) - { - return TranslationItemType::ExecutionInSlot; - } - else if (slotDescriptor == ScriptCanvas::SlotDescriptors::ExecutionOut()) - { - return TranslationItemType::ExecutionOutSlot; - } - else if (slotDescriptor == ScriptCanvas::SlotDescriptors::DataIn()) - { - return TranslationItemType::ParamDataSlot; - } - else if (slotDescriptor == ScriptCanvas::SlotDescriptors::DataOut()) - { - return TranslationItemType::ReturnDataSlot; - } - - return TranslationItemType::Invalid; - } - - static AZStd::string GetSafeTypeName(ScriptCanvas::Data::Type dataType) + inline AZStd::string GetSafeTypeName(ScriptCanvas::Data::Type dataType) { if (!dataType.IsValid()) { return ""; } - return ScriptCanvas::Data::GetName(dataType); + AZStd::string azType = dataType.GetAZType().ToString(); + + GraphCanvas::TranslationKey key; + key << "BehaviorType" << azType << "details"; + + GraphCanvas::TranslationRequests::Details details; + + details.m_name = ScriptCanvas::Data::GetName(dataType); + + GraphCanvas::TranslationRequestBus::BroadcastResult(details, &GraphCanvas::TranslationRequests::GetDetails, key, details); + + return details.m_name; } - - static AZStd::string GetKeyTranslation(TranslationContextGroup group, AZStd::string_view keyBase, AZStd::string_view keyName, TranslationItemType type, TranslationKeyId keyId, int paramIndex = 0) - { - AZStd::string translationContext = TranslationHelper::GetContextName(group, keyBase); - AZStd::string translationKey = TranslationHelper::GetKey(group, keyBase, keyName, type, keyId, paramIndex); - AZStd::string translated = QCoreApplication::translate(translationContext.c_str(), translationKey.c_str()).toUtf8().data(); - - if (translated == translationKey) - { - return AZStd::string(); - } - - return translated; - } - - static AZStd::string GetClassKeyTranslation(TranslationContextGroup group, AZStd::string_view keyBase, TranslationKeyId keyId) - { - AZStd::string translationContext = TranslationHelper::GetContextName(group, keyBase); - AZStd::string translationKey = TranslationHelper::GetClassKey(group, keyBase, keyId); - AZStd::string translated = QCoreApplication::translate(translationContext.c_str(), translationKey.c_str()).toUtf8().data(); - - if (translated == translationKey) - { - return AZStd::string(); - } - - return translated; - } - - static AZStd::string GetGlobalMethodKeyTranslation(AZStd::string_view keyName, - TranslationItemType keyType, TranslationKeyId keyId, int paramIndex = 0) - { - AZStd::string translationKey = TranslationHelper::GetGlobalMethodKey(keyName, keyType, keyId, paramIndex); - AZStd::string translated = QCoreApplication::translate(TranslationContextGroupParts::globalMethod, translationKey.c_str()).toUtf8().data(); - - if (translated == translationKey) - { - return AZStd::string(); - } - - return translated; - } - - static GraphCanvas::TranslationKeyedString GetEBusHandlerBusIdNameKey() - { - GraphCanvas::TranslationKeyedString keyedString; - keyedString.m_context = "Globals"; - keyedString.m_key = "DEFAULTS_EBUSHANDLER_BUSID_NAME"; - keyedString.SetFallback("BusId"); - - return keyedString; - } - - static GraphCanvas::TranslationKeyedString GetEBusHandlerBusIdTooltipKey() - { - GraphCanvas::TranslationKeyedString keyedString; - keyedString.m_context = "Globals"; - keyedString.m_key = "DEFAULTS_EBUSHANDLER_BUSID_TOOLTIP"; - keyedString.SetFallback("BusId"); - - return keyedString; - } - - static GraphCanvas::TranslationKeyedString GetEBusHandlerOnEventTriggeredNameKey() - { - GraphCanvas::TranslationKeyedString keyedString; - keyedString.m_context = "Globals"; - keyedString.m_key = "DEFAULTS_EBUSHANDLER_ONTRIGGERED_NAME"; - keyedString.SetFallback("Out"); - - return keyedString; - } - - static GraphCanvas::TranslationKeyedString GetEBusHandlerOnEventTriggeredTooltipKey() - { - GraphCanvas::TranslationKeyedString keyedString; - keyedString.m_context = "Globals"; - keyedString.m_key = "DEFAULTS_EBUSHANDLER_ONTRIGGERED_TOOLTIP"; - keyedString.SetFallback("Out"); - - return keyedString; - } - - static GraphCanvas::TranslationKeyedString GetEBusSenderBusIdNameKey() - { - GraphCanvas::TranslationKeyedString keyedString; - keyedString.m_context = "Globals"; - keyedString.m_key = "DEFAULTS_EBUSSENDER_BUSID_NAME"; - keyedString.SetFallback("BusId"); - - return keyedString; - } - - static GraphCanvas::TranslationKeyedString GetEBusSenderBusIdTooltipKey() - { - GraphCanvas::TranslationKeyedString keyedString; - keyedString.m_context = "Globals"; - keyedString.m_key = "DEFAULTS_EBUSSENDER_BUSID_TOOLTIP"; - keyedString.SetFallback("BusId"); - - return keyedString; - } - - // Use the StackedString to index the translation keys as a Json Pointer - static constexpr AZStd::string_view GetAzEventHandlerContextKey() - { - return { "AzEventHandler" }; - } - - // Use the StackedString to index the translation keys as a Json Pointer - static AZ::StackedString GetAzEventHandlerRootPointer(AZStd::string_view eventName) - { - AZ::StackedString path(AZ::StackedString::Format::JsonPointer); - path.Push(eventName); - - return path; - } - }; + } } + diff --git a/Gems/ScriptCanvas/Code/Editor/Undo/ScriptCanvasGraphCommand.cpp b/Gems/ScriptCanvas/Code/Editor/Undo/ScriptCanvasGraphCommand.cpp index 4e3e0c85ad..f497b83b08 100644 --- a/Gems/ScriptCanvas/Code/Editor/Undo/ScriptCanvasGraphCommand.cpp +++ b/Gems/ScriptCanvas/Code/Editor/Undo/ScriptCanvasGraphCommand.cpp @@ -11,6 +11,7 @@ #include #include +#include #include #include @@ -18,8 +19,6 @@ #include #include -#include -#include namespace ScriptCanvasEditor { @@ -36,7 +35,7 @@ namespace ScriptCanvasEditor { } - void GraphItemCommand::Capture(ScriptCanvasMemoryAsset&, bool) + void GraphItemCommand::Capture(Graph*, bool) { } @@ -105,10 +104,10 @@ namespace ScriptCanvasEditor RestoreItem(m_redoState); } - void GraphItemChangeCommand::Capture(ScriptCanvasMemoryAsset& memoryAsset, bool captureUndo) + void GraphItemChangeCommand::Capture(Graph* graph, bool captureUndo) { - m_scriptCanvasId = memoryAsset.GetScriptCanvasId(); - m_graphCanvasGraphId = memoryAsset.GetGraphId(); + m_scriptCanvasId = graph->GetScriptCanvasId(); + m_graphCanvasGraphId = graph->GetGraphCanvasGraphId(); UndoCache* undoCache = nullptr; UndoRequestBus::EventResult(undoCache, m_scriptCanvasId, &UndoRequests::GetSceneUndoCache); @@ -204,9 +203,9 @@ namespace ScriptCanvasEditor RestoreItem(m_redoState); } - void GraphItemAddCommand::Capture(ScriptCanvasMemoryAsset& memoryAsset, bool) + void GraphItemAddCommand::Capture(Graph* graph, bool) { - GraphItemChangeCommand::Capture(memoryAsset, false); + GraphItemChangeCommand::Capture(graph, false); } //// Graph Item Removal Command @@ -225,8 +224,8 @@ namespace ScriptCanvasEditor RestoreItem(m_redoState); } - void GraphItemRemovalCommand::Capture(ScriptCanvasMemoryAsset& memoryAsset, bool) + void GraphItemRemovalCommand::Capture(Graph* graph, bool) { - GraphItemChangeCommand::Capture(memoryAsset, true); + GraphItemChangeCommand::Capture(graph, true); } } diff --git a/Gems/ScriptCanvas/Code/Editor/Undo/ScriptCanvasGraphCommand.h b/Gems/ScriptCanvas/Code/Editor/Undo/ScriptCanvasGraphCommand.h index e0f5adde7e..9b36a7beb0 100644 --- a/Gems/ScriptCanvas/Code/Editor/Undo/ScriptCanvasGraphCommand.h +++ b/Gems/ScriptCanvas/Code/Editor/Undo/ScriptCanvasGraphCommand.h @@ -30,8 +30,6 @@ namespace ScriptCanvasEditor using GraphItemCommandNotificationBus = AZ::EBus; - class ScriptCanvasMemoryAsset; - // This command is the base URSequencePoint command from which all Script Canvas undo/redo commands derive class GraphItemCommand : public AzToolsFramework::UndoSystem::URSequencePoint @@ -46,7 +44,7 @@ namespace ScriptCanvasEditor void Undo() override; void Redo() override; - virtual void Capture(ScriptCanvasMemoryAsset& memoryAsset, bool captureUndo); + virtual void Capture(Graph* graph, bool captureUndo); bool Changed() const override; @@ -76,7 +74,7 @@ namespace ScriptCanvasEditor void Undo() override; void Redo() override; - void Capture(ScriptCanvasMemoryAsset& memoryAsset, bool captureUndo) override; + void Capture(Graph* graph, bool captureUndo) override; void RestoreItem(const AZStd::vector& restoreBuffer) override; @@ -103,7 +101,7 @@ namespace ScriptCanvasEditor void Undo() override; void Redo() override; - void Capture(ScriptCanvasMemoryAsset& memoryAsset, bool captureUndo) override; + void Capture(Graph* graph, bool captureUndo) override; protected: GraphItemAddCommand(const GraphItemAddCommand&) = delete; @@ -124,7 +122,7 @@ namespace ScriptCanvasEditor void Undo() override; void Redo() override; - void Capture(ScriptCanvasMemoryAsset& memoryAsset, bool captureUndo) override; + void Capture(Graph* graph, bool captureUndo) override; protected: GraphItemRemovalCommand(const GraphItemRemovalCommand&) = delete; diff --git a/Gems/ScriptCanvas/Code/Editor/Undo/ScriptCanvasUndoManager.cpp b/Gems/ScriptCanvas/Code/Editor/Undo/ScriptCanvasUndoManager.cpp index 4d24720227..5a01507352 100644 --- a/Gems/ScriptCanvas/Code/Editor/Undo/ScriptCanvasUndoManager.cpp +++ b/Gems/ScriptCanvas/Code/Editor/Undo/ScriptCanvasUndoManager.cpp @@ -28,9 +28,9 @@ namespace ScriptCanvasEditor // SceneUndoState SceneUndoState::SceneUndoState(AzToolsFramework::UndoSystem::IUndoNotify* undoNotify) - : m_undoStack(AZStd::make_unique(c_undoLimit, undoNotify)) - , m_undoCache(AZStd::make_unique()) { + m_undoStack = AZStd::make_unique(c_undoLimit, undoNotify); + m_undoCache = AZStd::make_unique(); } void SceneUndoState::BeginUndoBatch(AZStd::string_view label) diff --git a/Gems/ScriptCanvas/Code/Editor/Undo/ScriptCanvasUndoManager.h b/Gems/ScriptCanvas/Code/Editor/Undo/ScriptCanvasUndoManager.h index 52d7b1de3e..1d207e9408 100644 --- a/Gems/ScriptCanvas/Code/Editor/Undo/ScriptCanvasUndoManager.h +++ b/Gems/ScriptCanvas/Code/Editor/Undo/ScriptCanvasUndoManager.h @@ -61,6 +61,7 @@ namespace ScriptCanvasEditor public: AZ_CLASS_ALLOCATOR(SceneUndoState, AZ::SystemAllocator, 0); + SceneUndoState() = default; SceneUndoState(AzToolsFramework::UndoSystem::IUndoNotify* undoNotify); ~SceneUndoState(); diff --git a/Gems/ScriptCanvas/Code/Editor/Utilities/RecentAssetPath.cpp b/Gems/ScriptCanvas/Code/Editor/Utilities/RecentAssetPath.cpp index 06bbd29250..5d415f5fd9 100644 --- a/Gems/ScriptCanvas/Code/Editor/Utilities/RecentAssetPath.cpp +++ b/Gems/ScriptCanvas/Code/Editor/Utilities/RecentAssetPath.cpp @@ -15,7 +15,7 @@ namespace ScriptCanvasEditor { - AZ::Data::AssetId ReadRecentAssetId() + SourceHandle ReadRecentAssetId() { QSettings settings(QSettings::IniFormat, QSettings::UserScope, SCRIPTCANVASEDITOR_AZ_QCOREAPPLICATION_SETTINGS_ORGANIZATION_NAME); @@ -26,20 +26,15 @@ namespace ScriptCanvasEditor recentOpenFileLocation = settings.value(SCRIPTCANVASEDITOR_SETTINGS_RECENT_OPEN_FILE_LOCATION_KEY).toString(); settings.endGroup(); - if (recentOpenFileLocation.isEmpty()) - { - return {}; - } - AZ::Data::AssetId assetId(recentOpenFileLocation.toUtf8().constData()); - return assetId; + return { nullptr, {}, recentOpenFileLocation.toUtf8().constData() }; } - void SetRecentAssetId(const AZ::Data::AssetId& assetId) + void SetRecentAssetId(SourceHandle assetId) { QSettings settings(QSettings::IniFormat, QSettings::UserScope, SCRIPTCANVASEDITOR_AZ_QCOREAPPLICATION_SETTINGS_ORGANIZATION_NAME); - AZStd::string guidStr = assetId.m_guid.ToString(); + AZStd::string guidStr = assetId.Id().ToString(); settings.beginGroup(SCRIPTCANVASEDITOR_NAME_SHORT); settings.setValue(SCRIPTCANVASEDITOR_SETTINGS_RECENT_OPEN_FILE_LOCATION_KEY, diff --git a/Gems/ScriptCanvas/Code/Editor/Utilities/RecentAssetPath.h b/Gems/ScriptCanvas/Code/Editor/Utilities/RecentAssetPath.h index 0aa4332ca4..aaef02ca58 100644 --- a/Gems/ScriptCanvas/Code/Editor/Utilities/RecentAssetPath.h +++ b/Gems/ScriptCanvas/Code/Editor/Utilities/RecentAssetPath.h @@ -8,10 +8,11 @@ #pragma once #include +#include namespace ScriptCanvasEditor { - AZ::Data::AssetId ReadRecentAssetId(); - void SetRecentAssetId(const AZ::Data::AssetId& assetId); + SourceHandle ReadRecentAssetId(); + void SetRecentAssetId(SourceHandle assetId); void ClearRecentAssetId(); } diff --git a/Gems/ScriptCanvas/Code/Editor/View/Widgets/AssetGraphSceneDataBus.h b/Gems/ScriptCanvas/Code/Editor/View/Widgets/AssetGraphSceneDataBus.h index cbb8ef12d6..6d2c3280ac 100644 --- a/Gems/ScriptCanvas/Code/Editor/View/Widgets/AssetGraphSceneDataBus.h +++ b/Gems/ScriptCanvas/Code/Editor/View/Widgets/AssetGraphSceneDataBus.h @@ -11,14 +11,16 @@ #include #include #include +#include namespace ScriptCanvasEditor { + // #sc-editor-asset remove this class AssetGraphScene : public AZ::EBusTraits { public: - virtual AZ::EntityId FindEditorNodeIdByAssetNodeId(const AZ::Data::AssetId& assetId, AZ::EntityId assetNodeId) const = 0; - virtual AZ::EntityId FindAssetNodeIdByEditorNodeId(const AZ::Data::AssetId& assetId, AZ::EntityId editorNodeId) const = 0; + virtual AZ::EntityId FindEditorNodeIdByAssetNodeId(const SourceHandle& assetId, AZ::EntityId assetNodeId) const = 0; + virtual AZ::EntityId FindAssetNodeIdByEditorNodeId(const SourceHandle& assetId, AZ::EntityId editorNodeId) const = 0; }; using AssetGraphSceneBus = AZ::EBus; diff --git a/Gems/ScriptCanvas/Code/Editor/View/Widgets/CanvasWidget.cpp b/Gems/ScriptCanvas/Code/Editor/View/Widgets/CanvasWidget.cpp index e448f3ea40..69fe4053fe 100644 --- a/Gems/ScriptCanvas/Code/Editor/View/Widgets/CanvasWidget.cpp +++ b/Gems/ScriptCanvas/Code/Editor/View/Widgets/CanvasWidget.cpp @@ -36,7 +36,7 @@ namespace ScriptCanvasEditor { namespace Widget { - CanvasWidget::CanvasWidget(const AZ::Data::AssetId& assetId, QWidget* parent) + CanvasWidget::CanvasWidget(const ScriptCanvasEditor::SourceHandle& assetId, QWidget* parent) : QWidget(parent) , ui(new Ui::CanvasWidget()) , m_attached(false) @@ -69,24 +69,15 @@ namespace ScriptCanvasEditor void CanvasWidget::ShowScene(const ScriptCanvas::ScriptCanvasId& scriptCanvasId) { EditorGraphRequests* editorGraphRequests = EditorGraphRequestBus::FindFirstHandler(scriptCanvasId); - - editorGraphRequests->SetAssetId(m_assetId); editorGraphRequests->CreateGraphCanvasScene(); - AZ::EntityId graphCanvasSceneId = editorGraphRequests->GetGraphCanvasGraphId(); - m_graphicsView->SetScene(graphCanvasSceneId); - m_scriptCanvasId = scriptCanvasId; } - void CanvasWidget::SetAssetId(const AZ::Data::AssetId& assetId) + void CanvasWidget::SetAssetId(const ScriptCanvasEditor::SourceHandle& assetId) { m_assetId = assetId; - - EditorGraphRequests* editorGraphRequests = EditorGraphRequestBus::FindFirstHandler(m_scriptCanvasId); - - editorGraphRequests->SetAssetId(m_assetId); } const GraphCanvas::ViewId& CanvasWidget::GetViewId() const diff --git a/Gems/ScriptCanvas/Code/Editor/View/Widgets/CanvasWidget.h b/Gems/ScriptCanvas/Code/Editor/View/Widgets/CanvasWidget.h index 9abb41aacc..fc04486c36 100644 --- a/Gems/ScriptCanvas/Code/Editor/View/Widgets/CanvasWidget.h +++ b/Gems/ScriptCanvas/Code/Editor/View/Widgets/CanvasWidget.h @@ -21,6 +21,7 @@ AZ_POP_DISABLE_WARNING #include #include +#include #endif class QVBoxLayout; @@ -46,13 +47,13 @@ namespace ScriptCanvasEditor Q_OBJECT public: AZ_CLASS_ALLOCATOR(CanvasWidget, AZ::SystemAllocator, 0); - CanvasWidget(const AZ::Data::AssetId& assetId, QWidget* parent = nullptr); + CanvasWidget(const ScriptCanvasEditor::SourceHandle& assetId, QWidget* parent = nullptr); ~CanvasWidget() override; void SetDefaultBorderColor(AZ::Color defaultBorderColor); void ShowScene(const ScriptCanvas::ScriptCanvasId& scriptCanvasId); - void SetAssetId(const AZ::Data::AssetId& assetId); + void SetAssetId(const ScriptCanvasEditor::SourceHandle& assetId); const GraphCanvas::ViewId& GetViewId() const; @@ -69,7 +70,7 @@ namespace ScriptCanvasEditor void SetupGraphicsView(); - AZ::Data::AssetId m_assetId; + ScriptCanvasEditor::SourceHandle m_assetId; AZStd::unique_ptr ui; diff --git a/Gems/ScriptCanvas/Code/Editor/View/Widgets/DataTypePalette/DataTypePaletteModel.cpp b/Gems/ScriptCanvas/Code/Editor/View/Widgets/DataTypePalette/DataTypePaletteModel.cpp index 0b2b4f3bcc..6e8550b1f8 100644 --- a/Gems/ScriptCanvas/Code/Editor/View/Widgets/DataTypePalette/DataTypePaletteModel.cpp +++ b/Gems/ScriptCanvas/Code/Editor/View/Widgets/DataTypePalette/DataTypePaletteModel.cpp @@ -16,7 +16,6 @@ #include #include -#include #include #include @@ -200,7 +199,7 @@ namespace ScriptCanvasEditor AZ::TypeId DataTypePaletteModel::FindTypeIdForIndex(const QModelIndex& index) const { - AZ::TypeId retVal; + AZ::TypeId retVal = AZ::TypeId::CreateNull(); if (index.row() >= 0 && index.row() < m_variableTypes.size()) { @@ -244,7 +243,16 @@ namespace ScriptCanvasEditor AZStd::string DataTypePaletteModel::FindTypeNameForTypeId(const AZ::TypeId& typeId) const { - return TranslationHelper::GetSafeTypeName(ScriptCanvas::Data::FromAZType(typeId)); + GraphCanvas::TranslationKey key; + key << "BehaviorType" << typeId.ToString() << "details"; + + GraphCanvas::TranslationRequests::Details details; + + details.m_name = TranslationHelper::GetSafeTypeName(ScriptCanvas::Data::FromAZType(typeId)); + + GraphCanvas::TranslationRequestBus::BroadcastResult(details, &GraphCanvas::TranslationRequests::GetDetails, key, details); + + return details.m_name; } void DataTypePaletteModel::TogglePendingPinChange(const AZ::Uuid& azVarType) diff --git a/Gems/ScriptCanvas/Code/Editor/View/Widgets/GraphTabBar.cpp b/Gems/ScriptCanvas/Code/Editor/View/Widgets/GraphTabBar.cpp index f2963287c6..0213765737 100644 --- a/Gems/ScriptCanvas/Code/Editor/View/Widgets/GraphTabBar.cpp +++ b/Gems/ScriptCanvas/Code/Editor/View/Widgets/GraphTabBar.cpp @@ -23,6 +23,8 @@ #include +#include + namespace ScriptCanvasEditor { namespace Widget @@ -31,7 +33,7 @@ namespace ScriptCanvasEditor // GraphTabBar //////////////// - GraphTabBar::GraphTabBar(QWidget* parent /*= nullptr*/) + GraphTabBar::GraphTabBar(QWidget* parent) : AzQtComponents::TabBar(parent) { setTabsClosable(true); @@ -44,49 +46,128 @@ namespace ScriptCanvasEditor connect(this, &QTabBar::customContextMenuRequested, this, &GraphTabBar::OnContextMenu); } - void GraphTabBar::AddGraphTab(const AZ::Data::AssetId& assetId) + void GraphTabBar::AddGraphTab(ScriptCanvasEditor::SourceHandle assetId, Tracker::ScriptCanvasFileState fileState) { - InsertGraphTab(count(), assetId); + InsertGraphTab(count(), assetId, fileState); } - int GraphTabBar::InsertGraphTab(int tabIndex, const AZ::Data::AssetId& assetId) + void GraphTabBar::ClearTabView(int tabIndex) + { + if (tabIndex < count()) + { + if (QVariant tabDataVariant = tabData(tabIndex); tabDataVariant.isValid()) + { + GraphTabMetadata replacement = tabDataVariant.value(); + if (replacement.m_canvasWidget) + { + delete replacement.m_canvasWidget; + replacement.m_canvasWidget = nullptr; + tabDataVariant.setValue(replacement); + setTabData(tabIndex, tabDataVariant); + } + } + } + } + + CanvasWidget* GraphTabBar::ModOrCreateTabView(int tabIndex) + { + if (tabIndex < count()) + { + if (QVariant tabDataVariant = tabData(tabIndex); tabDataVariant.isValid()) + { + if (!tabDataVariant.value().m_canvasWidget) + { + CanvasWidget* canvasWidget = new CanvasWidget(tabDataVariant.value().m_assetId, this); + canvasWidget->SetDefaultBorderColor(ScriptCanvasEditor::SourceDescription::GetDisplayColor()); + GraphTabMetadata replacement = tabDataVariant.value(); + replacement.m_canvasWidget = canvasWidget; + tabDataVariant.setValue(replacement); + setTabData(tabIndex, tabDataVariant); + } + + return tabDataVariant.value().m_canvasWidget; + } + } + + return nullptr; + } + + CanvasWidget* GraphTabBar::ModTabView(int tabIndex) + { + if (tabIndex < count()) + { + if (QVariant tabDataVariant = tabData(tabIndex); tabDataVariant.isValid()) + { + return tabDataVariant.value().m_canvasWidget; + } + } + + return nullptr; + } + + AZStd::optional GraphTabBar::GetTabData(int tabIndex) const + { + if (tabIndex < count()) + { + if (QVariant tabDataVariant = tabData(tabIndex); tabDataVariant.isValid()) + { + return tabDataVariant.value(); + } + } + + return AZStd::nullopt; + } + + AZStd::optional GraphTabBar::GetTabData(ScriptCanvasEditor::SourceHandle assetId) const + { + return GetTabData(FindTab(assetId)); + } + + void GraphTabBar::SetTabData(const GraphTabMetadata& metadata, int tabIndex) + { + if (tabIndex < count()) + { + setTabData(tabIndex, QVariant::fromValue(metadata)); + } + } + + void GraphTabBar::SetTabData(const GraphTabMetadata& metadata, ScriptCanvasEditor::SourceHandle assetId) + { + auto index = FindTab(assetId); + auto replacement = GetTabData(assetId); + + if (index >= 0 && replacement) + { + replacement->m_assetId = assetId; + SetTabData(metadata, index); + } + } + + int GraphTabBar::InsertGraphTab(int tabIndex, ScriptCanvasEditor::SourceHandle assetId, Tracker::ScriptCanvasFileState fileState) { if (!SelectTab(assetId)) { - AZStd::shared_ptr memoryAsset; - AssetTrackerRequestBus::BroadcastResult(memoryAsset, &AssetTrackerRequests::GetAsset, assetId); + QIcon tabIcon = QIcon(ScriptCanvasEditor::SourceDescription::GetIconPath()); + tabIndex = qobject_cast(parent())->insertTab(tabIndex, new QWidget(), tabIcon, ""); + GraphTabMetadata metaData; + CanvasWidget* canvasWidget = new CanvasWidget(assetId, this); + canvasWidget->SetDefaultBorderColor(SourceDescription::GetDisplayColor()); + metaData.m_canvasWidget = canvasWidget; + metaData.m_assetId = assetId; + metaData.m_fileState = fileState; + + AZStd::string tabName; + AzFramework::StringFunc::Path::GetFileName(assetId.Path().c_str(), tabName); - if (memoryAsset) - { - ScriptCanvas::AssetDescription assetDescription = memoryAsset->GetAsset().Get()->GetAssetDescription(); - - QIcon tabIcon = QIcon(assetDescription.GetIconPathImpl()); - int newTabIndex = qobject_cast(parent())->insertTab(tabIndex, new QWidget(), tabIcon, ""); - - CanvasWidget* canvasWidget = memoryAsset->CreateView(this); - - canvasWidget->SetDefaultBorderColor(assetDescription.GetDisplayColorImpl()); - - AZStd::string tabName; - AzFramework::StringFunc::Path::GetFileName(memoryAsset->GetAbsolutePath().c_str(), tabName); - - ConfigureTab(newTabIndex, assetId, tabName); - - // new graphs will need to use their in-memory assetid which we'll need to update - // upon saving the asset - if (!memoryAsset->GetFileAssetId().IsValid()) - { - setTabData(newTabIndex, QVariant::fromValue(memoryAsset->GetId())); - } - - return newTabIndex; - } + SetTabText(tabIndex, tabName.c_str(), fileState); + setTabData(tabIndex, QVariant::fromValue(metaData)); + return tabIndex; } return -1; } - bool GraphTabBar::SelectTab(const AZ::Data::AssetId& assetId) + bool GraphTabBar::SelectTab(ScriptCanvasEditor::SourceHandle assetId) { int tabIndex = FindTab(assetId); if (-1 != tabIndex) @@ -94,74 +175,119 @@ namespace ScriptCanvasEditor setCurrentIndex(tabIndex); return true; } + return false; } - void GraphTabBar::ConfigureTab(int tabIndex, AZ::Data::AssetId fileAssetId, const AZStd::string& tabName) - { - if (fileAssetId.IsValid()) - { - QVariant tabDataVariant = tabData(tabIndex); - - if (tabDataVariant.isValid()) - { - auto tabAssetId = tabDataVariant.value(); - MemoryAssetNotificationBus::MultiHandler::BusDisconnect(tabAssetId); - } - - setTabData(tabIndex, QVariant::fromValue(fileAssetId)); - - MemoryAssetNotificationBus::MultiHandler::BusConnect(fileAssetId); - } - - Tracker::ScriptCanvasFileState fileState = Tracker::ScriptCanvasFileState::INVALID; - AssetTrackerRequestBus::BroadcastResult(fileState, &AssetTrackerRequests::GetFileState, fileAssetId); - - SetTabText(tabIndex, tabName.c_str(), fileState); - } - - int GraphTabBar::FindTab(const AZ::Data::AssetId& assetId) const + int GraphTabBar::FindTab(ScriptCanvasEditor::SourceHandle assetId) const { for (int tabIndex = 0; tabIndex < count(); ++tabIndex) { QVariant tabDataVariant = tabData(tabIndex); if (tabDataVariant.isValid()) { - auto tabAssetId = tabDataVariant.value(); - if (tabAssetId == assetId) + auto tabAssetId = tabDataVariant.value(); + if (tabAssetId.m_assetId.AnyEquals(assetId)) { return tabIndex; } } } + return -1; } - AZ::Data::AssetId GraphTabBar::FindAssetId(int tabIndex) + int GraphTabBar::FindTab(ScriptCanvasEditor::GraphPtrConst graph) const + { + for (int tabIndex = 0; tabIndex < count(); ++tabIndex) + { + QVariant tabDataVariant = tabData(tabIndex); + if (tabDataVariant.isValid()) + { + auto tabAssetId = tabDataVariant.value(); + if (tabAssetId.m_assetId.Get() == graph) + { + return tabIndex; + } + } + } + + return -1; + } + + int GraphTabBar::FindSaveOverMatch(ScriptCanvasEditor::SourceHandle assetId) const + { + for (int tabIndex = 0; tabIndex < count(); ++tabIndex) + { + QVariant tabDataVariant = tabData(tabIndex); + if (tabDataVariant.isValid()) + { + auto tabAssetId = tabDataVariant.value(); + if (tabAssetId.m_assetId.Get() != assetId.Get() && tabAssetId.m_assetId.PathEquals(assetId)) + { + return tabIndex; + } + } + } + + return -1; + } + + ScriptCanvasEditor::SourceHandle GraphTabBar::FindTabByPath(AZStd::string_view path) const + { + ScriptCanvasEditor::SourceHandle candidate(nullptr, {}, path); + + for (int index = 0; index < count(); ++index) + { + QVariant tabdata = tabData(index); + if (tabdata.isValid()) + { + auto tabAssetId = tabdata.value(); + if (tabAssetId.m_assetId.AnyEquals(candidate)) + { + return tabAssetId.m_assetId; + } + } + } + + return {}; + } + + ScriptCanvasEditor::SourceHandle GraphTabBar::FindAssetId(int tabIndex) { QVariant dataVariant = tabData(tabIndex); if (dataVariant.isValid()) { - auto tabAssetId = dataVariant.value(); - return tabAssetId; + auto tabAssetId = dataVariant.value(); + return tabAssetId.m_assetId; } - return AZ::Data::AssetId(); + return ScriptCanvasEditor::SourceHandle(); + } + + ScriptCanvas::ScriptCanvasId GraphTabBar::FindScriptCanvasIdFromGraphCanvasId(const GraphCanvas::GraphId& graphCanvasGraphId) const + { + for (int index = 0; index < count(); ++index) + { + QVariant tabdata = tabData(index); + if (tabdata.isValid()) + { + auto tabAssetId = tabdata.value(); + if (tabAssetId.m_assetId.IsGraphValid() + && tabAssetId.m_assetId.Get()->GetGraphCanvasGraphId() == graphCanvasGraphId) + { + return tabAssetId.m_assetId.Get()->GetScriptCanvasId(); + } + } + } + + return ScriptCanvas::ScriptCanvasId{}; } void GraphTabBar::CloseTab(int index) { if (index >= 0 && index < count()) { - QVariant tabdata = tabData(index); - if (tabdata.isValid()) - { - auto tabAssetId = tabdata.value(); - - MemoryAssetNotificationBus::MultiHandler::BusDisconnect(tabAssetId); - AssetTrackerRequestBus::Broadcast(&AssetTrackerRequests::ClearView, tabAssetId); - } - qobject_cast(parent())->removeTab(index); } } @@ -172,8 +298,6 @@ namespace ScriptCanvasEditor { Q_EMIT TabCloseNoButton(i); } - - MemoryAssetNotificationBus::MultiHandler::BusDisconnect(); } void GraphTabBar::OnContextMenu(const QPoint& point) @@ -187,11 +311,9 @@ namespace ScriptCanvasEditor QVariant tabdata = tabData(tabIndex); if (tabdata.isValid()) { - auto tabAssetId = tabdata.value(); - - Tracker::ScriptCanvasFileState fileState; - AssetTrackerRequestBus::BroadcastResult(fileState , &AssetTrackerRequests::GetFileState, tabAssetId); + auto tabAssetId = tabdata.value(); + Tracker::ScriptCanvasFileState fileState = Tracker::ScriptCanvasFileState::INVALID; isModified = fileState == Tracker::ScriptCanvasFileState::NEW || fileState == Tracker::ScriptCanvasFileState::MODIFIED; } @@ -263,23 +385,14 @@ namespace ScriptCanvasEditor AzQtComponents::TabBar::mouseReleaseEvent(event); } - void GraphTabBar::OnFileStateChanged(Tracker::ScriptCanvasFileState fileState) - { - const AZ::Data::AssetId* fileAssetId = MemoryAssetNotificationBus::GetCurrentBusId(); - - if (fileAssetId) - { - SetFileState((*fileAssetId), fileState); - - if (FindTab((*fileAssetId)) == currentIndex()) - { - Q_EMIT OnActiveFileStateChanged(); - } - } - } - void GraphTabBar::SetTabText(int tabIndex, const QString& path, Tracker::ScriptCanvasFileState fileState) { + QString safePath = path; + if (path.endsWith("^") || path.endsWith("*")) + { + safePath.chop(1); + } + if (tabIndex >= 0 && tabIndex < count()) { const char* fileStateTag = ""; @@ -296,7 +409,7 @@ namespace ScriptCanvasEditor break; } - setTabText(tabIndex, QString("%1%2").arg(path).arg(fileStateTag)); + setTabText(tabIndex, QString("%1%2").arg(safePath).arg(fileStateTag)); } } @@ -314,6 +427,23 @@ namespace ScriptCanvasEditor Q_EMIT TabRemoved(index); } + void GraphTabBar::UpdateFileState(const ScriptCanvasEditor::SourceHandle& assetId, Tracker::ScriptCanvasFileState fileState) + { + auto tabData = GetTabData(assetId); + if (tabData && tabData->m_fileState != Tracker::ScriptCanvasFileState::NEW && tabData->m_fileState != fileState) + { + int index = FindTab(assetId); + tabData->m_fileState = fileState; + SetTabData(*tabData, assetId); + SetTabText(index, tabText(index), fileState); + + if (index == currentIndex()) + { + Q_EMIT OnActiveFileStateChanged(); + } + } + } + void GraphTabBar::currentChangedTab(int index) { if (index < 0) @@ -327,7 +457,7 @@ namespace ScriptCanvasEditor return; } - auto assetId = tabdata.value(); + auto assetId = tabdata.value().m_assetId; ScriptCanvasEditor::GeneralRequestBus::Broadcast(&ScriptCanvasEditor::GeneralRequests::OnChangeActiveGraphTab, assetId); @@ -338,24 +468,6 @@ namespace ScriptCanvasEditor } } - void GraphTabBar::SetFileState(AZ::Data::AssetId assetId, Tracker::ScriptCanvasFileState fileState) - { - int index = FindTab(assetId); - - if (index >= 0 && index < count()) - { - QVariant tabdata = tabData(index); - if (tabdata.isValid()) - { - auto tabAssetId = tabdata.value(); - - AZStd::string tabName; - AssetTrackerRequestBus::BroadcastResult(tabName, &AssetTrackerRequests::GetTabName, tabAssetId); - SetTabText(index, tabName.c_str(), fileState); - } - } - } - #include } } diff --git a/Gems/ScriptCanvas/Code/Editor/View/Widgets/GraphTabBar.h b/Gems/ScriptCanvas/Code/Editor/View/Widgets/GraphTabBar.h index 47a5cb8651..39500eb29c 100644 --- a/Gems/ScriptCanvas/Code/Editor/View/Widgets/GraphTabBar.h +++ b/Gems/ScriptCanvas/Code/Editor/View/Widgets/GraphTabBar.h @@ -16,7 +16,9 @@ #include #include -#include +#include +#include + #endif class QGraphicsView; @@ -26,17 +28,18 @@ namespace ScriptCanvasEditor { namespace Widget { + class CanvasWidget; + struct GraphTabMetadata { - AZ::Data::AssetId m_assetId; + SourceHandle m_assetId; QWidget* m_hostWidget = nullptr; - QString m_tabName; + CanvasWidget* m_canvasWidget = nullptr; Tracker::ScriptCanvasFileState m_fileState = Tracker::ScriptCanvasFileState::INVALID; }; class GraphTabBar : public AzQtComponents::TabBar - , public MemoryAssetNotificationBus::MultiHandler { Q_OBJECT @@ -45,30 +48,39 @@ namespace ScriptCanvasEditor GraphTabBar(QWidget* parent = nullptr); ~GraphTabBar() override = default; - void AddGraphTab(const AZ::Data::AssetId& assetId); - int InsertGraphTab(int tabIndex, const AZ::Data::AssetId& assetId); - bool SelectTab(const AZ::Data::AssetId& assetId); - - void ConfigureTab(int tabIndex, AZ::Data::AssetId fileAssetId, const AZStd::string& tabName); - - int FindTab(const AZ::Data::AssetId& assetId) const; - AZ::Data::AssetId FindAssetId(int tabIndex); + AZStd::optional GetTabData(int index) const; + AZStd::optional GetTabData(ScriptCanvasEditor::SourceHandle assetId) const; + void SetTabData(const GraphTabMetadata& data, int index); + void SetTabData(const GraphTabMetadata& data, ScriptCanvasEditor::SourceHandle assetId); + void AddGraphTab(ScriptCanvasEditor::SourceHandle assetId, Tracker::ScriptCanvasFileState fileState); void CloseTab(int index); void CloseAllTabs(); + int InsertGraphTab(int tabIndex, ScriptCanvasEditor::SourceHandle assetId, Tracker::ScriptCanvasFileState fileState); + bool SelectTab(ScriptCanvasEditor::SourceHandle assetId); + + int FindTab(ScriptCanvasEditor::SourceHandle assetId) const; + int FindTab(ScriptCanvasEditor::GraphPtrConst graph) const; + int FindSaveOverMatch(ScriptCanvasEditor::SourceHandle assetId) const; + ScriptCanvasEditor::SourceHandle FindTabByPath(AZStd::string_view path) const; + ScriptCanvasEditor::SourceHandle FindAssetId(int tabIndex); + ScriptCanvas::ScriptCanvasId FindScriptCanvasIdFromGraphCanvasId(const GraphCanvas::GraphId& graphCanvasGraphId) const; + + void ClearTabView(int tabIndex); + CanvasWidget* ModOrCreateTabView(int tabIndex); + CanvasWidget* ModTabView(int tabIndex); + void OnContextMenu(const QPoint& point); void mouseReleaseEvent(QMouseEvent* event) override; - // MemoryAssetNotifications - void OnFileStateChanged(Tracker::ScriptCanvasFileState fileState) override; - //// - // Updates the tab at the supplied index with the GraphTabMetadata // The host widget field of the tabMetadata is not used and will not overwrite the tab data void SetTabText(int tabIndex, const QString& path, Tracker::ScriptCanvasFileState fileState = Tracker::ScriptCanvasFileState::INVALID); + void UpdateFileState(const ScriptCanvasEditor::SourceHandle& assetId, Tracker::ScriptCanvasFileState fileState); + Q_SIGNALS: void TabInserted(int index); void TabRemoved(int index); @@ -92,8 +104,6 @@ namespace ScriptCanvasEditor // Called when the selected tab changes void currentChangedTab(int index); - void SetFileState(AZ::Data::AssetId assetId, Tracker::ScriptCanvasFileState fileState); - int m_signalSaveOnChangeTo = -1; }; } diff --git a/Gems/ScriptCanvas/Code/Editor/View/Widgets/LoggingPanel/LoggingWindowSession.cpp b/Gems/ScriptCanvas/Code/Editor/View/Widgets/LoggingPanel/LoggingWindowSession.cpp index 5fadb0a81e..963be52edc 100644 --- a/Gems/ScriptCanvas/Code/Editor/View/Widgets/LoggingPanel/LoggingWindowSession.cpp +++ b/Gems/ScriptCanvas/Code/Editor/View/Widgets/LoggingPanel/LoggingWindowSession.cpp @@ -256,7 +256,8 @@ namespace ScriptCanvasEditor const AZ::Data::AssetId& assetId = executionItem->GetAssetId(); - GeneralRequestBus::Broadcast(&GeneralRequests::OpenScriptCanvasAssetId, assetId); + GeneralRequestBus::Broadcast(&GeneralRequests::OpenScriptCanvasAssetId + , SourceHandle(nullptr, assetId.m_guid, {}), Tracker::ScriptCanvasFileState::UNMODIFIED); } } } @@ -270,12 +271,14 @@ namespace ScriptCanvasEditor const AZ::Data::AssetId& assetId = executionItem->GetAssetId(); bool isAssetOpen = false; - GeneralRequestBus::BroadcastResult(isAssetOpen, &GeneralRequests::IsScriptCanvasAssetOpen, assetId); + GeneralRequestBus::BroadcastResult(isAssetOpen, &GeneralRequests::IsScriptCanvasAssetOpen, SourceHandle(nullptr, assetId.m_guid, {})); - GeneralRequestBus::Broadcast(&GeneralRequests::OpenScriptCanvasAssetId, assetId); + GeneralRequestBus::Broadcast(&GeneralRequests::OpenScriptCanvasAssetId + , SourceHandle(nullptr, assetId.m_guid, {}), Tracker::ScriptCanvasFileState::UNMODIFIED); AZ::EntityId graphCanvasGraphId; - GeneralRequestBus::BroadcastResult(graphCanvasGraphId, &GeneralRequests::FindGraphCanvasGraphIdByAssetId, assetId); + GeneralRequestBus::BroadcastResult(graphCanvasGraphId, &GeneralRequests::FindGraphCanvasGraphIdByAssetId + , SourceHandle(nullptr, assetId.m_guid, {})); if (isAssetOpen) { @@ -348,7 +351,7 @@ namespace ScriptCanvasEditor GeneralRequestBus::BroadcastResult(activeGraphCanvasGraphId, &GeneralRequests::GetActiveGraphCanvasGraphId); AZ::EntityId graphCanvasGraphId; - GeneralRequestBus::BroadcastResult(graphCanvasGraphId, &GeneralRequests::FindGraphCanvasGraphIdByAssetId, m_assetId); + GeneralRequestBus::BroadcastResult(graphCanvasGraphId, &GeneralRequests::FindGraphCanvasGraphIdByAssetId, SourceHandle(nullptr, m_assetId.m_guid, {})); if (activeGraphCanvasGraphId == graphCanvasGraphId) { @@ -366,7 +369,7 @@ namespace ScriptCanvasEditor GraphCanvas::FocusConfig focusConfig; AZ::EntityId scriptCanvasNodeId; - AssetGraphSceneBus::BroadcastResult(scriptCanvasNodeId, &AssetGraphScene::FindEditorNodeIdByAssetNodeId, assetId, assetNodeId); + AssetGraphSceneBus::BroadcastResult(scriptCanvasNodeId, &AssetGraphScene::FindEditorNodeIdByAssetNodeId, SourceHandle(nullptr, assetId.m_guid, {}), assetNodeId); GraphCanvas::NodeId graphCanvasNodeId; SceneMemberMappingRequestBus::EventResult(graphCanvasNodeId, scriptCanvasNodeId, &SceneMemberMappingRequests::GetGraphCanvasEntityId); @@ -403,12 +406,12 @@ namespace ScriptCanvasEditor void LoggingWindowSession::HighlightElement(const AZ::Data::AssetId& assetId, const AZ::EntityId& assetNodeId) { AZ::EntityId graphCanvasGraphId; - GeneralRequestBus::BroadcastResult(graphCanvasGraphId, &GeneralRequests::FindGraphCanvasGraphIdByAssetId, assetId); + GeneralRequestBus::BroadcastResult(graphCanvasGraphId, &GeneralRequests::FindGraphCanvasGraphIdByAssetId, SourceHandle(nullptr, assetId.m_guid, {})); if (graphCanvasGraphId.IsValid()) { AZ::EntityId scriptCanvasNodeId; - AssetGraphSceneBus::BroadcastResult(scriptCanvasNodeId, &AssetGraphScene::FindEditorNodeIdByAssetNodeId, assetId, assetNodeId); + AssetGraphSceneBus::BroadcastResult(scriptCanvasNodeId, &AssetGraphScene::FindEditorNodeIdByAssetNodeId, SourceHandle(nullptr, assetId.m_guid, {}), assetNodeId); GraphCanvas::NodeId graphCanvasNodeId; SceneMemberMappingRequestBus::EventResult(graphCanvasNodeId, scriptCanvasNodeId, &SceneMemberMappingRequests::GetGraphCanvasEntityId); @@ -447,7 +450,7 @@ namespace ScriptCanvasEditor if (effectIter != m_highlightEffects.end()) { AZ::EntityId graphCanvasGraphId; - GeneralRequestBus::BroadcastResult(graphCanvasGraphId, &GeneralRequests::FindGraphCanvasGraphIdByAssetId, assetId); + GeneralRequestBus::BroadcastResult(graphCanvasGraphId, &GeneralRequests::FindGraphCanvasGraphIdByAssetId, SourceHandle(nullptr, assetId.m_guid, {})); if (graphCanvasGraphId.IsValid()) { diff --git a/Gems/ScriptCanvas/Code/Editor/View/Widgets/LoggingPanel/LoggingWindowTreeItems.cpp b/Gems/ScriptCanvas/Code/Editor/View/Widgets/LoggingPanel/LoggingWindowTreeItems.cpp index b992d3a289..6936a0c368 100644 --- a/Gems/ScriptCanvas/Code/Editor/View/Widgets/LoggingPanel/LoggingWindowTreeItems.cpp +++ b/Gems/ScriptCanvas/Code/Editor/View/Widgets/LoggingPanel/LoggingWindowTreeItems.cpp @@ -122,7 +122,11 @@ namespace ScriptCanvasEditor { } - ExecutionLogTreeItem* DebugLogRootItem::CreateExecutionItem(const LoggingDataId& loggingDataId, const ScriptCanvas::NodeTypeIdentifier& nodeType, const ScriptCanvas::GraphInfo& graphInfo, const ScriptCanvas::NamedNodeId& nodeId) + ExecutionLogTreeItem* DebugLogRootItem::CreateExecutionItem + ( [[maybe_unused]] const LoggingDataId& loggingDataId + , [[maybe_unused]] const ScriptCanvas::NodeTypeIdentifier& nodeType + , [[maybe_unused]] const ScriptCanvas::GraphInfo& graphInfo + , [[maybe_unused]] const ScriptCanvas::NamedNodeId& nodeId) { ExecutionLogTreeItem* treeItem = nullptr; @@ -133,15 +137,6 @@ namespace ScriptCanvasEditor m_additionTimer.start(); } } - - if (m_updatePolicy == UpdatePolicy::SingleTime) - { - treeItem = CreateChildNodeWithoutAddSignal(loggingDataId, nodeType, graphInfo, nodeId); - } - else - { - treeItem = CreateChildNode(loggingDataId, nodeType, graphInfo, nodeId); - } return treeItem; } @@ -185,7 +180,11 @@ namespace ScriptCanvasEditor // ExecutionLogTreeItem ///////////////////////// - ExecutionLogTreeItem::ExecutionLogTreeItem(const LoggingDataId& loggingDataId, const ScriptCanvas::NodeTypeIdentifier& nodeType, const ScriptCanvas::GraphInfo& graphInfo, const ScriptCanvas::NamedNodeId& nodeId) + ExecutionLogTreeItem::ExecutionLogTreeItem + ( const LoggingDataId& loggingDataId + , const ScriptCanvas::NodeTypeIdentifier& nodeType + , const SourceHandle& graphInfo + , const ScriptCanvas::NamedNodeId& nodeId) : m_loggingDataId(loggingDataId) , m_nodeType(nodeType) , m_graphInfo(graphInfo) @@ -196,7 +195,6 @@ namespace ScriptCanvasEditor m_paletteConfiguration.SetColorPalette("MethodNodeTitlePalette"); AZ::NamedEntityId entityName; - LoggingDataRequestBus::EventResult(entityName, m_loggingDataId, &LoggingDataRequests::FindNamedEntityId, m_graphInfo.m_runtimeEntity); m_sourceEntityName = entityName.ToString().c_str(); m_displayName = nodeId.m_name.c_str(); @@ -207,7 +205,7 @@ namespace ScriptCanvasEditor m_inputName = "---"; m_outputName = "---"; - GeneralAssetNotificationBus::Handler::BusConnect(GetAssetId()); + GeneralAssetNotificationBus::Handler::BusConnect(graphInfo); } QVariant ExecutionLogTreeItem::Data(const QModelIndex& index, int role) const @@ -502,12 +500,12 @@ namespace ScriptCanvasEditor const ScriptCanvas::GraphIdentifier& ExecutionLogTreeItem::GetGraphIdentifier() const { - return m_graphInfo.m_graphIdentifier; + return m_graphIdentifier; } - const AZ::Data::AssetId& ExecutionLogTreeItem::GetAssetId() const + AZ::Data::AssetId ExecutionLogTreeItem::GetAssetId() const { - return m_graphInfo.m_graphIdentifier.m_assetId; + return m_graphInfo.Id(); } AZ::EntityId ExecutionLogTreeItem::GetScriptCanvasAssetNodeId() const @@ -623,12 +621,14 @@ namespace ScriptCanvasEditor { if (!m_graphCanvasGraphId.IsValid()) { - GeneralRequestBus::BroadcastResult(m_graphCanvasGraphId, &GeneralRequests::FindGraphCanvasGraphIdByAssetId, GetAssetId()); + GeneralRequestBus::BroadcastResult(m_graphCanvasGraphId + , &GeneralRequests::FindGraphCanvasGraphIdByAssetId, SourceHandle(nullptr, GetAssetId().m_guid, "")); if (!EditorGraphNotificationBus::Handler::BusIsConnected()) { ScriptCanvas::ScriptCanvasId scriptCanvasId; - GeneralRequestBus::BroadcastResult(scriptCanvasId, &GeneralRequests::FindScriptCanvasIdByAssetId, GetAssetId()); + GeneralRequestBus::BroadcastResult(scriptCanvasId + , &GeneralRequests::FindScriptCanvasIdByAssetId, SourceHandle(nullptr, GetAssetId().m_guid, "")); EditorGraphNotificationBus::Handler::BusConnect(scriptCanvasId); } @@ -638,7 +638,9 @@ namespace ScriptCanvasEditor { if (!m_graphCanvasNodeId.IsValid()) { - AssetGraphSceneBus::BroadcastResult(m_scriptCanvasNodeId, &AssetGraphScene::FindEditorNodeIdByAssetNodeId, GetAssetId(), m_scriptCanvasAssetNodeId); + AssetGraphSceneBus::BroadcastResult(m_scriptCanvasNodeId + , &AssetGraphScene::FindEditorNodeIdByAssetNodeId + , SourceHandle(nullptr, GetAssetId().m_guid, ""), m_scriptCanvasAssetNodeId); SceneMemberMappingRequestBus::EventResult(m_graphCanvasNodeId, m_scriptCanvasNodeId, &SceneMemberMappingRequests::GetGraphCanvasEntityId); } @@ -806,7 +808,8 @@ namespace ScriptCanvasEditor { if (!m_graphCanvasGraphId.IsValid()) { - GeneralRequestBus::BroadcastResult(m_graphCanvasGraphId, &GeneralRequests::FindGraphCanvasGraphIdByAssetId, m_graphIdentifier.m_assetId); + GeneralRequestBus::BroadcastResult(m_graphCanvasGraphId + , &GeneralRequests::FindGraphCanvasGraphIdByAssetId, SourceHandle(nullptr, m_graphIdentifier.m_assetId.m_guid, "")); } ScrapeInputName(); @@ -828,7 +831,7 @@ namespace ScriptCanvasEditor if (m_graphCanvasGraphId.IsValid() && m_assetInputEndpoint.IsValid()) { AZ::EntityId scriptCanvasNodeId; - AssetGraphSceneBus::BroadcastResult(scriptCanvasNodeId, &AssetGraphScene::FindEditorNodeIdByAssetNodeId, GetAssetId(), m_assetInputEndpoint.GetNodeId()); + AssetGraphSceneBus::BroadcastResult(scriptCanvasNodeId, &AssetGraphScene::FindEditorNodeIdByAssetNodeId, SourceHandle(nullptr, GetAssetId().m_guid, ""), m_assetInputEndpoint.GetNodeId()); GraphCanvas::NodeId graphCanvasNodeId; SceneMemberMappingRequestBus::EventResult(graphCanvasNodeId, scriptCanvasNodeId, &SceneMemberMappingRequests::GetGraphCanvasEntityId); @@ -851,8 +854,9 @@ namespace ScriptCanvasEditor if (m_graphCanvasGraphId.IsValid() && m_assetOutputEndpoint.IsValid()) { AZ::EntityId scriptCanvasNodeId; - AssetGraphSceneBus::BroadcastResult(scriptCanvasNodeId, &AssetGraphScene::FindEditorNodeIdByAssetNodeId, GetAssetId(), m_assetOutputEndpoint.GetNodeId()); - + AssetGraphSceneBus::BroadcastResult(scriptCanvasNodeId, &AssetGraphScene::FindEditorNodeIdByAssetNodeId + , SourceHandle(nullptr, GetAssetId().m_guid, ""), m_assetOutputEndpoint.GetNodeId()); + GraphCanvas::NodeId graphCanvasNodeId; SceneMemberMappingRequestBus::EventResult(graphCanvasNodeId, scriptCanvasNodeId, &SceneMemberMappingRequests::GetGraphCanvasEntityId); diff --git a/Gems/ScriptCanvas/Code/Editor/View/Widgets/LoggingPanel/LoggingWindowTreeItems.h b/Gems/ScriptCanvas/Code/Editor/View/Widgets/LoggingPanel/LoggingWindowTreeItems.h index 862b231f3a..5b6d23590b 100644 --- a/Gems/ScriptCanvas/Code/Editor/View/Widgets/LoggingPanel/LoggingWindowTreeItems.h +++ b/Gems/ScriptCanvas/Code/Editor/View/Widgets/LoggingPanel/LoggingWindowTreeItems.h @@ -131,7 +131,12 @@ namespace ScriptCanvasEditor AZ_CLASS_ALLOCATOR(ExecutionLogTreeItem, AZ::SystemAllocator, 0); AZ_RTTI(ExecutionLogTreeItem, "{71139142-A30C-4A16-81CC-D51314AEAF7D}", DebugLogTreeItem); - ExecutionLogTreeItem(const LoggingDataId& loggingDataId, const ScriptCanvas::NodeTypeIdentifier& nodeType, const ScriptCanvas::GraphInfo& graphInfo, const ScriptCanvas::NamedNodeId& nodeId); + ExecutionLogTreeItem + ( const LoggingDataId& loggingDataId + , const ScriptCanvas::NodeTypeIdentifier& nodeType + , const SourceHandle& graphInfo + , const ScriptCanvas::NamedNodeId& nodeId); + ~ExecutionLogTreeItem() override = default; QVariant Data(const QModelIndex& index, int role) const override final; @@ -163,7 +168,7 @@ namespace ScriptCanvasEditor //// const ScriptCanvas::GraphIdentifier& GetGraphIdentifier() const; - const AZ::Data::AssetId& GetAssetId() const; + AZ::Data::AssetId GetAssetId() const; AZ::EntityId GetScriptCanvasAssetNodeId() const; GraphCanvas::NodeId GetGraphCanvasNodeId() const; @@ -184,7 +189,8 @@ namespace ScriptCanvasEditor LoggingDataId m_loggingDataId; ScriptCanvas::NodeTypeIdentifier m_nodeType; - ScriptCanvas::GraphInfo m_graphInfo; + SourceHandle m_graphInfo; + ScriptCanvas::GraphIdentifier m_graphIdentifier; QString m_sourceEntityName; QString m_graphName; QString m_relativeGraphPath; diff --git a/Gems/ScriptCanvas/Code/Editor/View/Widgets/LoggingPanel/PivotTree/GraphPivotTree/GraphPivotTree.cpp b/Gems/ScriptCanvas/Code/Editor/View/Widgets/LoggingPanel/PivotTree/GraphPivotTree/GraphPivotTree.cpp index a6f0a3743e..9b591466da 100644 --- a/Gems/ScriptCanvas/Code/Editor/View/Widgets/LoggingPanel/PivotTree/GraphPivotTree/GraphPivotTree.cpp +++ b/Gems/ScriptCanvas/Code/Editor/View/Widgets/LoggingPanel/PivotTree/GraphPivotTree/GraphPivotTree.cpp @@ -9,11 +9,9 @@ #include #include #include - -#include - -#include #include +#include +#include namespace ScriptCanvasEditor { @@ -355,7 +353,7 @@ namespace ScriptCanvasEditor m_assetModel = new AzToolsFramework::AssetBrowser::AssetBrowserFilterModel(); AzToolsFramework::AssetBrowser::AssetGroupFilter* assetFilter = new AzToolsFramework::AssetBrowser::AssetGroupFilter(); - assetFilter->SetAssetGroup(ScriptCanvasEditor::ScriptCanvasAsset::Description::GetGroup(azrtti_typeid())); + assetFilter->SetAssetGroup(ScriptCanvasEditor::SourceDescription::GetGroup()); assetFilter->SetFilterPropagation(AzToolsFramework::AssetBrowser::AssetBrowserEntryFilter::PropagateDirection::Down); @@ -530,7 +528,7 @@ namespace ScriptCanvasEditor { const AzToolsFramework::AssetBrowser::ProductAssetBrowserEntry* productEntry = azrtti_cast(entry); - if (productEntry->GetAssetType() == azrtti_typeid()) + if (productEntry->GetAssetType() == azrtti_typeid()) { auto mapIter = m_graphTreeItemMapping.find(productEntry->GetAssetId()); @@ -556,7 +554,7 @@ namespace ScriptCanvasEditor { const AzToolsFramework::AssetBrowser::ProductAssetBrowserEntry* productEntry = static_cast(entry); - if (productEntry->GetAssetType() == azrtti_typeid()) + if (productEntry->GetAssetType() == azrtti_typeid()) { OnEntityGraphRegistered(AZ::NamedEntityId(), ScriptCanvas::GraphIdentifier(productEntry->GetAssetId(), k_dynamicallySpawnedControllerId)); } diff --git a/Gems/ScriptCanvas/Code/Editor/View/Widgets/LoggingPanel/PivotTree/PivotTreeWidget.cpp b/Gems/ScriptCanvas/Code/Editor/View/Widgets/LoggingPanel/PivotTree/PivotTreeWidget.cpp index a34b42bed8..b1827d7099 100644 --- a/Gems/ScriptCanvas/Code/Editor/View/Widgets/LoggingPanel/PivotTree/PivotTreeWidget.cpp +++ b/Gems/ScriptCanvas/Code/Editor/View/Widgets/LoggingPanel/PivotTree/PivotTreeWidget.cpp @@ -406,15 +406,14 @@ namespace ScriptCanvasEditor sourceIndex = proxyModel->mapToSource(modelIndex); } - PivotTreeItem* pivotTreeItem = static_cast(sourceIndex.internalPointer()); - - if (pivotTreeItem) + if (PivotTreeItem* pivotTreeItem = static_cast(sourceIndex.internalPointer())) { - PivotTreeGraphItem* graphItem = azrtti_cast(pivotTreeItem); - - if (graphItem) + if (PivotTreeGraphItem* graphItem = azrtti_cast(pivotTreeItem)) { - GeneralRequestBus::Broadcast(&GeneralRequests::OpenScriptCanvasAssetId, graphItem->GetAssetId()); + GeneralRequestBus::Broadcast + ( &GeneralRequests::OpenScriptCanvasAssetId + , SourceHandle(nullptr, graphItem->GetAssetId().m_guid, "") + , Tracker::ScriptCanvasFileState::UNMODIFIED); } } } diff --git a/Gems/ScriptCanvas/Code/Editor/View/Widgets/NodePalette/EBusNodePaletteTreeItemTypes.cpp b/Gems/ScriptCanvas/Code/Editor/View/Widgets/NodePalette/EBusNodePaletteTreeItemTypes.cpp index 1af3401f1e..1298911ed5 100644 --- a/Gems/ScriptCanvas/Code/Editor/View/Widgets/NodePalette/EBusNodePaletteTreeItemTypes.cpp +++ b/Gems/ScriptCanvas/Code/Editor/View/Widgets/NodePalette/EBusNodePaletteTreeItemTypes.cpp @@ -97,23 +97,17 @@ namespace ScriptCanvasEditor , m_isOverload(isOverload) , m_propertyStatus(propertyStatus) { - AZStd::string displayEventName = TranslationHelper::GetKeyTranslation(TranslationContextGroup::EbusSender, m_busName.toUtf8().data(), m_eventName.toUtf8().data(), TranslationItemType::Node, TranslationKeyId::Name); + GraphCanvas::TranslationKey key; + key << "EBusSender" << busName << "methods" << eventName << "details"; - if (displayEventName.empty()) - { - SetName(m_eventName); - } - else - { - SetName(displayEventName.c_str()); - } + GraphCanvas::TranslationRequests::Details details; + details.m_name = eventName; + details.m_subtitle = busName; - AZStd::string displayEventTooltip = TranslationHelper::GetKeyTranslation(TranslationContextGroup::EbusSender, m_busName.toUtf8().data(), m_eventName.toUtf8().data(), TranslationItemType::Node, TranslationKeyId::Tooltip); + GraphCanvas::TranslationRequestBus::BroadcastResult(details, &GraphCanvas::TranslationRequests::GetDetails, key, details); - if (!displayEventTooltip.empty()) - { - SetToolTip(displayEventTooltip.c_str()); - } + SetName(details.m_name.c_str()); + SetToolTip(details.m_tooltip.c_str()); SetTitlePalette("MethodNodeTitlePalette"); } @@ -302,23 +296,19 @@ namespace ScriptCanvasEditor , m_busId(busId) , m_eventId(eventId) { - AZStd::string displayEventName = TranslationHelper::GetKeyTranslation(TranslationContextGroup::EbusHandler, m_busName.c_str(), m_eventName.c_str(), TranslationItemType::Node, TranslationKeyId::Name); + GraphCanvas::TranslationKey key; + key << "EBusHandler" << busName << "methods" << eventName << "details"; - if (displayEventName.empty()) + GraphCanvas::TranslationRequests::Details details; + details.m_name = m_eventName; + GraphCanvas::TranslationRequestBus::BroadcastResult(details, &GraphCanvas::TranslationRequests::GetDetails, key, details); + if (details.m_name.empty()) { - SetName(m_eventName.c_str()); - } - else - { - SetName(displayEventName.c_str()); + details.m_name = m_eventName; } - AZStd::string displayEventTooltip = TranslationHelper::GetKeyTranslation(TranslationContextGroup::EbusHandler, m_busName.c_str(), m_eventName.c_str(), TranslationItemType::Node, TranslationKeyId::Tooltip); - - if (!displayEventTooltip.empty()) - { - SetToolTip(displayEventTooltip.c_str()); - } + SetName(details.m_name.c_str()); + SetToolTip(details.m_tooltip.c_str()); SetTitlePalette("HandlerNodeTitlePalette"); } diff --git a/Gems/ScriptCanvas/Code/Editor/View/Widgets/NodePalette/EBusNodePaletteTreeItemTypes.h b/Gems/ScriptCanvas/Code/Editor/View/Widgets/NodePalette/EBusNodePaletteTreeItemTypes.h index a02b53f5eb..41b2dfdd79 100644 --- a/Gems/ScriptCanvas/Code/Editor/View/Widgets/NodePalette/EBusNodePaletteTreeItemTypes.h +++ b/Gems/ScriptCanvas/Code/Editor/View/Widgets/NodePalette/EBusNodePaletteTreeItemTypes.h @@ -11,6 +11,7 @@ #include "CreateNodeMimeEvent.h" #include +#include "TranslationGeneration.h" namespace ScriptCanvasEditor { @@ -62,6 +63,24 @@ namespace ScriptCanvasEditor ScriptCanvas::PropertyStatus GetPropertyStatus() const; + AZ::IO::Path GetTranslationDataPath() const override + { + return AZ::IO::Path("EBus\\Senders") / GetBusName(); + } + + void GenerateTranslationData() override + { + AZ::BehaviorContext* behaviorContext{}; + AZ::ComponentApplicationBus::BroadcastResult(behaviorContext, &AZ::ComponentApplicationRequests::GetBehaviorContext); + + const char* ebusName = m_busName.toUtf8().data(); + auto behaviorEbus = behaviorContext->m_ebuses.find(ebusName); + + ScriptCanvasEditorTools::TranslationGeneration translation; + translation.TranslateEBus(behaviorEbus->second); + } + + private: bool m_isOverload; QString m_busName; @@ -154,6 +173,22 @@ namespace ScriptCanvasEditor ScriptCanvas::EBusBusId GetBusId() const; ScriptCanvas::EBusEventId GetEventId() const; + AZ::IO::Path GetTranslationDataPath() const override + { + return AZ::IO::Path("EBus\\Handlers") / GetBusName(); + } + + void GenerateTranslationData() override + { + AZ::BehaviorContext* behaviorContext{}; + AZ::ComponentApplicationBus::BroadcastResult(behaviorContext, &AZ::ComponentApplicationRequests::GetBehaviorContext); + + auto behaviorEbus = behaviorContext->m_ebuses.find(m_busName.c_str()); + + ScriptCanvasEditorTools::TranslationGeneration translation; + translation.TranslateEBus(behaviorEbus->second); + } + private: AZStd::string m_busName; AZStd::string m_eventName; diff --git a/Gems/ScriptCanvas/Code/Editor/View/Widgets/NodePalette/FunctionNodePaletteTreeItemTypes.cpp b/Gems/ScriptCanvas/Code/Editor/View/Widgets/NodePalette/FunctionNodePaletteTreeItemTypes.cpp index 50a5e8ac1a..b2db9508b1 100644 --- a/Gems/ScriptCanvas/Code/Editor/View/Widgets/NodePalette/FunctionNodePaletteTreeItemTypes.cpp +++ b/Gems/ScriptCanvas/Code/Editor/View/Widgets/NodePalette/FunctionNodePaletteTreeItemTypes.cpp @@ -129,7 +129,10 @@ namespace ScriptCanvasEditor { if (row == NodePaletteTreeItem::Column::Customization) { - GeneralRequestBus::Broadcast(&GeneralRequests::OpenScriptCanvasAsset, GetSourceAssetId(), -1); + GeneralRequestBus::Broadcast + ( &GeneralRequests::OpenScriptCanvasAssetId + , SourceHandle(nullptr, GetSourceAssetId().m_guid, "") + , Tracker::ScriptCanvasFileState::UNMODIFIED); } } @@ -137,7 +140,10 @@ namespace ScriptCanvasEditor { if (row != NodePaletteTreeItem::Column::Customization) { - GeneralRequestBus::Broadcast(&GeneralRequests::OpenScriptCanvasAsset, GetSourceAssetId(), -1); + GeneralRequestBus::Broadcast + ( &GeneralRequests::OpenScriptCanvasAssetId + , SourceHandle(nullptr, GetSourceAssetId().m_guid, "") + , Tracker::ScriptCanvasFileState::UNMODIFIED); return true; } diff --git a/Gems/ScriptCanvas/Code/Editor/View/Widgets/NodePalette/FunctionNodePaletteTreeItemTypes.h b/Gems/ScriptCanvas/Code/Editor/View/Widgets/NodePalette/FunctionNodePaletteTreeItemTypes.h index 479fed1097..459c786edd 100644 --- a/Gems/ScriptCanvas/Code/Editor/View/Widgets/NodePalette/FunctionNodePaletteTreeItemTypes.h +++ b/Gems/ScriptCanvas/Code/Editor/View/Widgets/NodePalette/FunctionNodePaletteTreeItemTypes.h @@ -17,7 +17,7 @@ #include #include #include - +#include #include namespace AZ diff --git a/Gems/ScriptCanvas/Code/Editor/View/Widgets/NodePalette/GeneralNodePaletteTreeItemTypes.cpp b/Gems/ScriptCanvas/Code/Editor/View/Widgets/NodePalette/GeneralNodePaletteTreeItemTypes.cpp index b22264523e..b6bd26fa6c 100644 --- a/Gems/ScriptCanvas/Code/Editor/View/Widgets/NodePalette/GeneralNodePaletteTreeItemTypes.cpp +++ b/Gems/ScriptCanvas/Code/Editor/View/Widgets/NodePalette/GeneralNodePaletteTreeItemTypes.cpp @@ -82,32 +82,26 @@ namespace ScriptCanvasEditor , m_isOverload(isOverload) , m_propertyStatus(propertyStatus) { - AZStd::string displayMethodName = TranslationHelper::GetKeyTranslation(TranslationContextGroup::ClassMethod, m_className.toUtf8().data(), m_methodName.toUtf8().data(), TranslationItemType::Node, TranslationKeyId::Name); + GraphCanvas::TranslationKey key; - if (displayMethodName.empty()) - { - SetName(m_methodName); - } - else - { - SetName(displayMethodName.c_str()); - } - if (propertyStatus == ScriptCanvas::PropertyStatus::Getter) + AZStd::string updatedMethodName; + if (propertyStatus != ScriptCanvas::PropertyStatus::None) { - SetName(AZStd::string::format("Get %s", GetName().toUtf8().data()).data()); - } - else if (propertyStatus == ScriptCanvas::PropertyStatus::Setter) - { - SetName(AZStd::string::format("Set %s", GetName().toUtf8().data()).data()); + updatedMethodName = (propertyStatus == ScriptCanvas::PropertyStatus::Getter) ? "Get" : "Set"; } + updatedMethodName.append(methodName); - AZStd::string displayEventTooltip = TranslationHelper::GetKeyTranslation(TranslationContextGroup::ClassMethod, m_className.toUtf8().data(), m_methodName.toUtf8().data(), TranslationItemType::Node, TranslationKeyId::Tooltip); + key << "BehaviorClass" << className << "methods" << updatedMethodName << "details"; - if (!displayEventTooltip.empty()) - { - SetToolTip(displayEventTooltip.c_str()); - } + GraphCanvas::TranslationRequests::Details details; + details.m_name = methodName; + details.m_subtitle = className; + + GraphCanvas::TranslationRequestBus::BroadcastResult(details, &GraphCanvas::TranslationRequests::GetDetails, key, details); + + SetName(details.m_name.c_str()); + SetToolTip(details.m_tooltip.c_str()); SetTitlePalette("MethodNodeTitlePalette"); } @@ -166,13 +160,14 @@ namespace ScriptCanvasEditor : DraggableNodePaletteTreeItem(nodeModelInformation.m_methodName, ScriptCanvasEditor::AssetEditorId) , m_methodName{ nodeModelInformation.m_methodName } { - SetToolTip(QString::fromUtf8(nodeModelInformation.m_displayName.data(), - aznumeric_cast(nodeModelInformation.m_displayName.size()))); - SetToolTip(QString::fromUtf8(nodeModelInformation.m_toolTip.data(), aznumeric_cast(nodeModelInformation.m_toolTip.size()))); SetTitlePalette("MethodNodeTitlePalette"); + if (!nodeModelInformation.m_displayName.empty()) + { + SetName(nodeModelInformation.m_displayName.c_str()); + } } GraphCanvas::GraphCanvasMimeEvent* GlobalMethodEventPaletteTreeItem::CreateMimeEvent() const @@ -186,6 +181,27 @@ namespace ScriptCanvasEditor return m_methodName; } + AZ::IO::Path GlobalMethodEventPaletteTreeItem::GetTranslationDataPath() const + { + AZStd::string propertyName = m_methodName; + AZ::StringFunc::Replace(propertyName, "::Getter", ""); + AZ::StringFunc::Replace(propertyName, "::Setter", ""); + + AZStd::string filename = GraphCanvas::TranslationKey::Sanitize(propertyName); + + return AZ::IO::Path("Properties") / filename; + } + + void GlobalMethodEventPaletteTreeItem::GenerateTranslationData() + { + AZStd::string propertyName = m_methodName; + AZ::StringFunc::Replace(propertyName, "::Getter", ""); + AZ::StringFunc::Replace(propertyName, "::Setter", ""); + + ScriptCanvasEditorTools::TranslationGeneration translation; + translation.TranslateBehaviorProperty(propertyName); + } + ////////////////////////////// // CreateCustomNodeMimeEvent ////////////////////////////// @@ -230,9 +246,10 @@ namespace ScriptCanvasEditor // CustomNodePaletteTreeItem ////////////////////////////// - CustomNodePaletteTreeItem::CustomNodePaletteTreeItem(const AZ::Uuid& typeId, AZStd::string_view nodeName) - : DraggableNodePaletteTreeItem(nodeName, ScriptCanvasEditor::AssetEditorId) - , m_typeId(typeId) + CustomNodePaletteTreeItem::CustomNodePaletteTreeItem(const ScriptCanvasEditor::CustomNodeModelInformation& info) + : DraggableNodePaletteTreeItem(info.m_displayName, ScriptCanvasEditor::AssetEditorId) + , m_info(info) + , m_typeId(info.m_typeId) { } diff --git a/Gems/ScriptCanvas/Code/Editor/View/Widgets/NodePalette/GeneralNodePaletteTreeItemTypes.h b/Gems/ScriptCanvas/Code/Editor/View/Widgets/NodePalette/GeneralNodePaletteTreeItemTypes.h index 38eef7980b..c14d6c62ae 100644 --- a/Gems/ScriptCanvas/Code/Editor/View/Widgets/NodePalette/GeneralNodePaletteTreeItemTypes.h +++ b/Gems/ScriptCanvas/Code/Editor/View/Widgets/NodePalette/GeneralNodePaletteTreeItemTypes.h @@ -10,6 +10,9 @@ #include #include "CreateNodeMimeEvent.h" +#include "NodePaletteModel.h" +#include +#include "TranslationGeneration.h" namespace ScriptCanvasEditor { @@ -56,6 +59,26 @@ namespace ScriptCanvasEditor bool IsOverload() const; ScriptCanvas::PropertyStatus GetPropertyStatus() const; + AZ::IO::Path GetTranslationDataPath() const override + { + return AZ::IO::Path("Classes") / GetClassMethodName(); + } + + void GenerateTranslationData() override + { + AZ::BehaviorContext* behaviorContext{}; + AZ::ComponentApplicationBus::BroadcastResult(behaviorContext, &AZ::ComponentApplicationRequests::GetBehaviorContext); + + const char* className = m_className.toUtf8().data(); + if (behaviorContext->m_classes.contains(className)) + { + auto behaviorClass = behaviorContext->m_classes.find(className); + + ScriptCanvasEditorTools::TranslationGeneration translation; + translation.TranslateBehaviorClass(behaviorClass->second); + } + } + private: bool m_isOverload = false; QString m_className; @@ -101,6 +124,10 @@ namespace ScriptCanvasEditor const AZStd::string& GetMethodName() const; + AZ::IO::Path GetTranslationDataPath() const override; + void GenerateTranslationData() override; + + private: AZStd::string m_methodName; }; @@ -137,15 +164,31 @@ namespace ScriptCanvasEditor AZ_CLASS_ALLOCATOR(CustomNodePaletteTreeItem, AZ::SystemAllocator, 0); AZ_RTTI(CustomNodePaletteTreeItem, "{50E75C4D-F59C-4AF6-A6A3-5BAD557E335C}", GraphCanvas::DraggableNodePaletteTreeItem); - CustomNodePaletteTreeItem(const AZ::Uuid& typeId, AZStd::string_view nodeName); + explicit CustomNodePaletteTreeItem(const ScriptCanvasEditor::CustomNodeModelInformation&); ~CustomNodePaletteTreeItem() = default; GraphCanvas::GraphCanvasMimeEvent* CreateMimeEvent() const override; AZ::Uuid GetTypeId() const; + const ScriptCanvasEditor::CustomNodeModelInformation& GetInfo() const { return m_info; } + + AZ::IO::Path GetTranslationDataPath() const override + { + AZStd::string filename = AZStd::string::format("%s_%s", GetInfo().m_categoryPath.c_str(), GetName().toUtf8().data()); + filename = GraphCanvas::TranslationKey::Sanitize(filename); + + return AZ::IO::Path("Nodes") / filename; + } + + void GenerateTranslationData() override + { + ScriptCanvasEditorTools::TranslationGeneration translation; + translation.TranslateNode(m_typeId); + } private: AZ::Uuid m_typeId; + ScriptCanvasEditor::CustomNodeModelInformation m_info; }; // diff --git a/Gems/ScriptCanvas/Code/Editor/View/Widgets/NodePalette/NodePaletteModel.cpp b/Gems/ScriptCanvas/Code/Editor/View/Widgets/NodePalette/NodePaletteModel.cpp index 047a07cd0b..113c43682f 100644 --- a/Gems/ScriptCanvas/Code/Editor/View/Widgets/NodePalette/NodePaletteModel.cpp +++ b/Gems/ScriptCanvas/Code/Editor/View/Widgets/NodePalette/NodePaletteModel.cpp @@ -16,7 +16,6 @@ #include -#include #include #include #include @@ -32,6 +31,8 @@ #include +AZ_DEFINE_BUDGET(NodePaletteModel); + namespace { // Various Helper Methods @@ -82,11 +83,6 @@ namespace return false; } - bool MethodHasAttribute(const AZ::BehaviorMethod* method, AZ::Crc32 attribute) - { - return AZ::FindAttribute(attribute, method->m_attributes) != nullptr; // warning C4800: 'AZ::Attribute *': forcing value to bool 'true' or 'false' (performance warning) - } - // Checks for and returns the Category attribute from an AZ::AttributeArray AZStd::string GetCategoryPath(const AZ::AttributeArray& attributes, const AZ::BehaviorContext& behaviorContext) { @@ -116,6 +112,9 @@ namespace , ScriptCanvas::PropertyStatus propertyStatus , bool isOverloaded) { + + AZ_PROFILE_SCOPE(NodePaletteModel, "RegisterMethod"); + if (IsDeprecated(method.m_attributes)) { return; @@ -150,6 +149,9 @@ namespace void RegisterGlobalMethod(ScriptCanvasEditor::NodePaletteModel& nodePaletteModel, const AZ::BehaviorContext& behaviorContext, const AZ::BehaviorMethod& behaviorMethod) { + + AZ_PROFILE_SCOPE(NodePaletteModel, "RegisterGlobalMethod"); + const auto isExposableOutcome = ScriptCanvas::IsExposable(behaviorMethod); if (!isExposableOutcome.IsSuccess()) { @@ -176,6 +178,8 @@ namespace //! Retrieve the list of EBuses t hat should not be exposed in the ScriptCanvasEditor Node Palette AZStd::unordered_set GetEBusExcludeSet(const AZ::BehaviorContext& behaviorContext) { + AZ_PROFILE_SCOPE(NodePaletteModel, "GetEBusExcludeSet"); + // We will skip buses that are ONLY registered on classes that derive from EditorComponentBase, // because they don't have a runtime implementation. Buses such as the TransformComponent which // is implemented by both an EditorComponentBase derived class and a Component derived class @@ -252,6 +256,8 @@ namespace void PopulateScriptCanvasDerivedNodes(ScriptCanvasEditor::NodePaletteModel& nodePaletteModel, const AZ::SerializeContext& serializeContext) { + AZ_PROFILE_SCOPE(NodePaletteModel, "PopulateScriptCanvasDerivedNodes"); + // Get all the types. auto EnumerateLibraryDefintionNodes = [&nodePaletteModel, &serializeContext]( const AZ::SerializeContext::ClassData* classData, const AZ::Uuid&) -> bool @@ -333,6 +339,8 @@ namespace void PopulateVariablePalette() { + AZ_PROFILE_SCOPE(NodePaletteModel, "PopulateVariablePalette"); + auto dataRegistry = ScriptCanvas::GetDataRegistry(); for (auto& type : dataRegistry->m_creatableTypes) @@ -347,6 +355,8 @@ namespace void PopulateBehaviorContextGlobalMethods(ScriptCanvasEditor::NodePaletteModel& nodePaletteModel, const AZ::BehaviorContext& behaviorContext) { + AZ_PROFILE_SCOPE(NodePaletteModel, "PopulateBehaviorContextGlobalMethods"); + // BehaviorMethods are not associated with a class // therefore the Uuid is set to Null const AZ::Uuid behaviorMethodUuid = AZ::Uuid::CreateNull(); @@ -377,6 +387,8 @@ namespace void PopulateBehaviorContextGlobalProperties(ScriptCanvasEditor::NodePaletteModel& nodePaletteModel, const AZ::BehaviorContext& behaviorContext) { + AZ_PROFILE_SCOPE(NodePaletteModel, "PopulateBehaviorContextGlobalProperties"); + const AZ::Uuid behaviorMethodUuid = AZ::Uuid::CreateNull(); for (const auto& [propertyName, behaviorProperty] : behaviorContext.m_properties) { @@ -398,7 +410,7 @@ namespace if (behaviorProperty->m_getter && !behaviorProperty->m_setter) { - nodePaletteModel.RegisterGlobalConstant(behaviorContext, *behaviorProperty->m_getter); + nodePaletteModel.RegisterGlobalConstant(behaviorContext, behaviorProperty , *behaviorProperty->m_getter); } else { @@ -419,6 +431,8 @@ namespace void PopulateBehaviorContextClassMethods(ScriptCanvasEditor::NodePaletteModel& nodePaletteModel, const AZ::BehaviorContext& behaviorContext) { + AZ_PROFILE_SCOPE(NodePaletteModel, "PopulateBehaviorContextClassMethods"); + AZ::SerializeContext* serializeContext{}; AZ::ComponentApplicationBus::BroadcastResult(serializeContext, &AZ::ComponentApplicationRequests::GetSerializeContext); @@ -456,21 +470,17 @@ namespace { AZStd::string categoryPath; - AZStd::string translationContext = ScriptCanvasEditor::TranslationHelper::GetContextName(ScriptCanvasEditor::TranslationContextGroup::ClassMethod, behaviorClass->m_name); - AZStd::string translationKey = ScriptCanvasEditor::TranslationHelper::GetClassKey(ScriptCanvasEditor::TranslationContextGroup::ClassMethod, behaviorClass->m_name, ScriptCanvasEditor::TranslationKeyId::Category); - AZStd::string translatedCategory = QCoreApplication::translate(translationContext.c_str(), translationKey.c_str()).toUtf8().data(); + GraphCanvas::TranslationKey key; + key << "BehaviorClass" << behaviorClass->m_name.c_str() << "details"; - if (translatedCategory != translationKey) + GraphCanvas::TranslationRequests::Details details; + GraphCanvas::TranslationRequestBus::BroadcastResult(details, &GraphCanvas::TranslationRequests::GetDetails, key, details); + + categoryPath = details.m_category; + + if (categoryPath.empty()) { - categoryPath = translatedCategory; - } - else - { - AZStd::string behaviorContextCategory = GetCategoryPath(behaviorClass->m_attributes, behaviorContext); - if (!behaviorContextCategory.empty()) - { - categoryPath = behaviorContextCategory; - } + categoryPath = GetCategoryPath(behaviorClass->m_attributes, behaviorContext); } auto dataRegistry = ScriptCanvas::GetDataRegistry(); @@ -507,15 +517,13 @@ namespace categoryPath.append("/"); - AZStd::string displayName = ScriptCanvasEditor::TranslationHelper::GetClassKeyTranslation(ScriptCanvasEditor::TranslationContextGroup::ClassMethod, classIter.first, ScriptCanvasEditor::TranslationKeyId::Name); - - if (displayName.empty()) + if (details.m_name.empty()) { categoryPath.append(classNamePretty.c_str()); } else { - categoryPath.append(displayName.c_str()); + categoryPath.append(details.m_name.c_str()); } for (auto property : behaviorClass->m_properties) @@ -552,6 +560,9 @@ namespace void PopulateBehaviorContextOverloadedMethods(ScriptCanvasEditor::NodePaletteModel& nodePaletteModel, const AZ::BehaviorContext& behaviorContext) { + AZ_PROFILE_SCOPE(NodePaletteModel, "PopulateBehaviorContextOverloadedMethods"); + + for (const AZ::ExplicitOverloadInfo& explicitOverload : behaviorContext.m_explicitOverloads) { RegisterMethod(nodePaletteModel, behaviorContext, explicitOverload.m_categoryPath, nullptr, explicitOverload.m_name, *explicitOverload.m_overloads.begin()->first, ScriptCanvas::PropertyStatus::None, true); @@ -561,6 +572,8 @@ namespace void PopulateBehaviorContextEBusHandler(ScriptCanvasEditor::NodePaletteModel& nodePaletteModel, const AZ::BehaviorContext& behaviorContext, const AZ::BehaviorEBus& behaviorEbus) { + AZ_PROFILE_SCOPE(NodePaletteModel, "PopulateBehaviorContextEBusHandler"); + if (AZ::ScopedBehaviorEBusHandler handler{ behaviorEbus }; handler) { auto excludeEbusAttributeData = azdynamic_cast*>( @@ -573,32 +586,17 @@ namespace const AZ::BehaviorEBusHandler::EventArray& events(handler->GetEvents()); if (!events.empty()) { - AZStd::string translationContext = ScriptCanvasEditor::TranslationHelper::GetContextName(ScriptCanvasEditor::TranslationContextGroup::EbusHandler, behaviorEbus.m_name); - AZStd::string categoryPath; + GraphCanvas::TranslationKey key; + key << "EBusHandler" << behaviorEbus.m_name.c_str() << "details"; + + GraphCanvas::TranslationRequests::Details details; + GraphCanvas::TranslationRequestBus::BroadcastResult(details, &GraphCanvas::TranslationRequests::GetDetails, key, details); + + AZStd::string categoryPath = details.m_category.empty() ? GetCategoryPath(behaviorEbus.m_attributes, behaviorContext) : details.m_category; + + // Treat the EBusHandler name as a Category key in order to allow multiple buses to be merged into a single Category. { - AZStd::string translationKey = ScriptCanvasEditor::TranslationHelper::GetClassKey(ScriptCanvasEditor::TranslationContextGroup::EbusHandler, behaviorEbus.m_name, ScriptCanvasEditor::TranslationKeyId::Category); - AZStd::string translatedCategory = QCoreApplication::translate(translationContext.c_str(), translationKey.c_str()).toUtf8().data(); - - if (translatedCategory != translationKey) - { - categoryPath = translatedCategory; - } - else - { - AZStd::string behaviourContextCategory = GetCategoryPath(behaviorEbus.m_attributes, behaviorContext); - if (!behaviourContextCategory.empty()) - { - categoryPath = behaviourContextCategory; - } - } - } - - // Treat the EBusHandler name as a Category key in order to allow multiple busses to be merged into a single Category. - { - AZStd::string translationKey = ScriptCanvasEditor::TranslationHelper::GetClassKey(ScriptCanvasEditor::TranslationContextGroup::EbusHandler, behaviorEbus.m_name, ScriptCanvasEditor::TranslationKeyId::Name); - AZStd::string translatedName = QCoreApplication::translate(translationContext.c_str(), translationKey.c_str()).toUtf8().data(); - if (!categoryPath.empty()) { categoryPath.append("/"); @@ -608,12 +606,13 @@ namespace categoryPath = "Other/"; } - if (translatedName != translationKey) + if (!details.m_name.empty()) { - categoryPath.append(translatedName.c_str()); + categoryPath.append(details.m_name.c_str()); } - else + else if (categoryPath.contains("Other")) { + // Use the BehaviorEBus name to categorize within the 'Other' category categoryPath.append(behaviorEbus.m_name.c_str()); } } @@ -629,31 +628,22 @@ namespace void PopulateBehaviorContextEBusEventMethods(ScriptCanvasEditor::NodePaletteModel& nodePaletteModel, const AZ::BehaviorContext& behaviorContext, const AZ::BehaviorEBus& behaviorEbus) { + AZ_PROFILE_SCOPE(NodePaletteModel, "PopulateBehaviorContextEBusEventMethods"); + if (!behaviorEbus.m_events.empty()) { - AZStd::string categoryPath; + GraphCanvas::TranslationKey key; + key << "EBusSender" << behaviorEbus.m_name.c_str() << "details"; - AZStd::string translationContext = ScriptCanvasEditor::TranslationHelper::GetContextName(ScriptCanvasEditor::TranslationContextGroup::EbusSender, behaviorEbus.m_name); - AZStd::string translationKey = ScriptCanvasEditor::TranslationHelper::GetClassKey(ScriptCanvasEditor::TranslationContextGroup::EbusSender, behaviorEbus.m_name, ScriptCanvasEditor::TranslationKeyId::Category); - AZStd::string translatedCategory = QCoreApplication::translate(translationContext.c_str(), translationKey.c_str()).toUtf8().data(); + GraphCanvas::TranslationRequests::Details details; + GraphCanvas::TranslationRequestBus::BroadcastResult(details, &GraphCanvas::TranslationRequests::GetDetails, key, details); - if (translatedCategory != translationKey) - { - categoryPath = translatedCategory; - } - else - { - AZStd::string behaviourContextCategory = GetCategoryPath(behaviorEbus.m_attributes, behaviorContext); - if (!behaviourContextCategory.empty()) - { - categoryPath = behaviourContextCategory; - } - } + AZStd::string categoryPath = details.m_category.empty() ? GetCategoryPath(behaviorEbus.m_attributes, behaviorContext) : details.m_category; // Parent - AZStd::string displayName = ScriptCanvasEditor::TranslationHelper::GetClassKeyTranslation(ScriptCanvasEditor::TranslationContextGroup::EbusSender, behaviorEbus.m_name, ScriptCanvasEditor::TranslationKeyId::Name); + AZStd::string displayName = details.m_name; - // Treat the EBus name as a Category key in order to allow multiple busses to be merged into a single Category. + // Treat the EBus name as a Category key in order to allow multiple buses to be merged into a single Category. if (!categoryPath.empty()) { categoryPath.append("/"); @@ -663,18 +653,19 @@ namespace categoryPath = "Other/"; } - if (displayName.empty()) + if (!details.m_name.empty()) { - categoryPath.append(behaviorEbus.m_name.c_str()); + categoryPath.append(details.m_name.c_str()); } - else + else if (categoryPath.contains("Other")) { - categoryPath.append(displayName.c_str()); + // Use the behavior EBus name to categorize within the 'Other' category + categoryPath.append(behaviorEbus.m_name.c_str()); } ScriptCanvasEditor::CategoryInformation ebusCategoryInformation; - ebusCategoryInformation.m_tooltip = ScriptCanvasEditor::TranslationHelper::GetClassKeyTranslation(ScriptCanvasEditor::TranslationContextGroup::EbusSender, behaviorEbus.m_name, ScriptCanvasEditor::TranslationKeyId::Tooltip); + ebusCategoryInformation.m_tooltip = details.m_tooltip; nodePaletteModel.RegisterCategoryInformation(categoryPath, ebusCategoryInformation); @@ -700,6 +691,7 @@ namespace void PopulateBehaviorContextEBuses(ScriptCanvasEditor::NodePaletteModel& nodePaletteModel, const AZ::BehaviorContext& behaviorContext) { + AZ_PROFILE_SCOPE(NodePaletteModel, "PopulateBehaviorContextEBuses"); AZStd::unordered_set skipBuses = GetEBusExcludeSet(behaviorContext); for (const auto& [ebusName, behaviorEbus] : behaviorContext.m_ebuses) @@ -758,10 +750,13 @@ namespace } } + // Helper function for populating the node palette model. // Pulled out just to make the tabbing a bit nicer, since it's a huge method. void PopulateNodePaletteModel(ScriptCanvasEditor::NodePaletteModel& nodePaletteModel) { + AZ_PROFILE_SCOPE(NodePaletteModel, "PopulateNodePaletteModel"); + AZ::SerializeContext* serializeContext = nullptr; AZ::ComponentApplicationBus::BroadcastResult(serializeContext, &AZ::ComponentApplicationRequests::GetSerializeContext); @@ -791,8 +786,10 @@ namespace // Populates the NodePalette with EBus Event method nodes and EBus Event handler nodes PopulateBehaviorContextEBuses(nodePaletteModel, *behaviorContext); + // Populates the NodePalette with Methods reflected directly on the BehaviorContext PopulateBehaviorContextGlobalMethods(nodePaletteModel, *behaviorContext); + // Populates the NodePalette with Properties reflected directly on the BehaviorContext PopulateBehaviorContextGlobalProperties(nodePaletteModel, *behaviorContext); } @@ -881,6 +878,7 @@ namespace ScriptCanvasEditor void NodePaletteModel::RepopulateModel() { + AZ_PROFILE_FUNCTION(ScriptCanvas); ClearRegistry(); PopulateNodePaletteModel((*this)); @@ -895,6 +893,8 @@ namespace ScriptCanvasEditor void NodePaletteModel::RegisterCustomNode(AZStd::string_view categoryPath, const AZ::Uuid& uuid, AZStd::string_view name, const AZ::SerializeContext::ClassData* classData) { + + AZ_PROFILE_SCOPE(NodePaletteModel, "NodePaletteModel::RegisterCustomNode"); ScriptCanvas::NodeTypeIdentifier nodeIdentifier = ScriptCanvas::NodeUtils::ConstructCustomNodeIdentifier(uuid); auto mapIter = m_registeredNodes.find(nodeIdentifier); @@ -905,47 +905,38 @@ namespace ScriptCanvasEditor customNodeInformation->m_nodeIdentifier = nodeIdentifier; customNodeInformation->m_typeId = uuid; - customNodeInformation->m_displayName = name; + customNodeInformation->m_categoryPath = categoryPath; bool isDeprecated(false); if (classData && classData->m_editData && classData->m_editData->m_name) { - auto nodeContextName = ScriptCanvasEditor::Nodes::GetContextName(*classData); - auto contextName = ScriptCanvasEditor::TranslationHelper::GetContextName(ScriptCanvasEditor::TranslationContextGroup::ClassMethod, nodeContextName); + GraphCanvas::TranslationKey key; + key << "ScriptCanvas::Node" << classData->m_typeId.ToString().c_str() << "details"; - GraphCanvas::TranslationKeyedString nodeKeyedString({}, contextName); - nodeKeyedString.m_key = ScriptCanvasEditor::TranslationHelper::GetKey(ScriptCanvasEditor::TranslationContextGroup::ClassMethod, nodeContextName, classData->m_editData->m_name, ScriptCanvasEditor::TranslationItemType::Node, ScriptCanvasEditor::TranslationKeyId::Name); - customNodeInformation->m_displayName = nodeKeyedString.GetDisplayString(); + GraphCanvas::TranslationRequests::Details details; + GraphCanvas::TranslationRequestBus::BroadcastResult(details, &GraphCanvas::TranslationRequests::GetDetails, key, details); - GraphCanvas::TranslationKeyedString tooltipKeyedString(AZStd::string(), nodeKeyedString.m_context); - tooltipKeyedString.m_key = ScriptCanvasEditor::TranslationHelper::GetKey(ScriptCanvasEditor::TranslationContextGroup::ClassMethod, nodeContextName, classData->m_editData->m_name, ScriptCanvasEditor::TranslationItemType::Node, ScriptCanvasEditor::TranslationKeyId::Tooltip); + if (details.m_name.empty()) + { + details.m_name = classData->m_editData->m_name; + details.m_tooltip = classData->m_editData->m_description; + } - customNodeInformation->m_toolTip = tooltipKeyedString.GetDisplayString(); + customNodeInformation->m_displayName = details.m_name; + customNodeInformation->m_toolTip = details.m_tooltip; + + if (!details.m_category.empty()) + { + customNodeInformation->m_categoryPath = details.m_category; + } if (customNodeInformation->m_displayName.empty()) { customNodeInformation->m_displayName = classData->m_editData->m_name; } - GraphCanvas::TranslationKeyedString categoryKeyedString(ScriptCanvasEditor::Nodes::GetCategoryName(*classData), nodeKeyedString.m_context); - categoryKeyedString.m_key = ScriptCanvasEditor::TranslationHelper::GetKey(ScriptCanvasEditor::TranslationContextGroup::ClassMethod, nodeContextName, classData->m_editData->m_name, ScriptCanvasEditor::TranslationItemType::Node, ScriptCanvasEditor::TranslationKeyId::Category); - - customNodeInformation->m_categoryPath = categoryKeyedString.GetDisplayString(); - - if (customNodeInformation->m_categoryPath.empty()) - { - if (contextName.empty()) - { - customNodeInformation->m_categoryPath = categoryPath; - } - else - { - customNodeInformation->m_categoryPath = contextName; - } - } - auto editorDataElement = classData->m_editData->FindElementData(AZ::Edit::ClassElements::EditorData); if (editorDataElement) @@ -1003,11 +994,13 @@ namespace ScriptCanvasEditor ( const AZStd::string& categoryPath , const AZStd::string& methodClass , const AZStd::string& methodName - , const AZ::BehaviorMethod* behaviorMethod - , const AZ::BehaviorContext* behaviorContext + , const AZ::BehaviorMethod* + , const AZ::BehaviorContext* , ScriptCanvas::PropertyStatus propertyStatus , bool isOverload) { + AZ_PROFILE_SCOPE(NodePaletteModel, "NodePaletteModel::RegisterClassNode"); + ScriptCanvas::NodeTypeIdentifier nodeIdentifier = isOverload ? ScriptCanvas::NodeUtils::ConstructMethodOverloadedNodeIdentifier(methodName) : ScriptCanvas::NodeUtils::ConstructMethodNodeIdentifier(methodClass, methodName, propertyStatus); auto registerIter = m_registeredNodes.find(nodeIdentifier); @@ -1022,44 +1015,43 @@ namespace ScriptCanvasEditor methodModelInformation->m_propertyStatus = propertyStatus; methodModelInformation->m_titlePaletteOverride = "MethodNodeTitlePalette"; - methodModelInformation->m_displayName = TranslationHelper::GetKeyTranslation(TranslationContextGroup::ClassMethod, methodClass.c_str(), methodName.c_str(), TranslationItemType::Node, TranslationKeyId::Name); + GraphCanvas::TranslationKey catkey; + catkey << "BehaviorClass" << methodClass.c_str() << "details"; + GraphCanvas::TranslationRequests::Details catdetails; + GraphCanvas::TranslationRequestBus::BroadcastResult(catdetails, &GraphCanvas::TranslationRequests::GetDetails, catkey, catdetails); - if (methodModelInformation->m_displayName.empty()) + GraphCanvas::TranslationKey key; + + AZStd::string context; + AZStd::string updatedMethodName; + if (propertyStatus != ScriptCanvas::PropertyStatus::None) { - methodModelInformation->m_displayName = methodName; + updatedMethodName = (propertyStatus == ScriptCanvas::PropertyStatus::Getter) ? "Get" : "Set"; + context = (propertyStatus == ScriptCanvas::PropertyStatus::Getter) ? "Getter" : "Setter"; } + updatedMethodName += methodName; + key << "BehaviorClass" << context << methodClass << "methods" << updatedMethodName << "details"; - methodModelInformation->m_toolTip = TranslationHelper::GetKeyTranslation(TranslationContextGroup::ClassMethod, methodClass.c_str(), methodName.c_str(), TranslationItemType::Node, TranslationKeyId::Tooltip); + GraphCanvas::TranslationRequests::Details details; + GraphCanvas::TranslationRequestBus::BroadcastResult(details, &GraphCanvas::TranslationRequests::GetDetails, key, details); - GraphCanvas::TranslationKeyedString methodCategoryString; - methodCategoryString.m_context = ScriptCanvasEditor::TranslationHelper::GetContextName(ScriptCanvasEditor::TranslationContextGroup::ClassMethod, methodClass.c_str()); - methodCategoryString.m_key = ScriptCanvasEditor::TranslationHelper::GetKey(ScriptCanvasEditor::TranslationContextGroup::ClassMethod, methodClass.c_str(), methodName.c_str(), ScriptCanvasEditor::TranslationItemType::Node, ScriptCanvasEditor::TranslationKeyId::Category); - - methodModelInformation->m_categoryPath = methodCategoryString.GetDisplayString(); + methodModelInformation->m_displayName = details.m_name.empty() ? updatedMethodName : details.m_name; + methodModelInformation->m_toolTip = details.m_tooltip; + methodModelInformation->m_categoryPath = categoryPath; if (methodModelInformation->m_categoryPath.empty()) { - if (!MethodHasAttribute(behaviorMethod, AZ::ScriptCanvasAttributes::FloatingFunction)) - { - methodModelInformation->m_categoryPath = categoryPath; - } - else if (MethodHasAttribute(behaviorMethod, AZ::Script::Attributes::Category)) - { - methodModelInformation->m_categoryPath = GetCategoryPath(behaviorMethod->m_attributes, (*behaviorContext)); - } - - if (methodModelInformation->m_categoryPath.empty()) - { - methodModelInformation->m_categoryPath = "Other"; - } + methodModelInformation->m_categoryPath = "Other"; } m_registeredNodes.emplace(AZStd::make_pair(nodeIdentifier, methodModelInformation)); } } - void NodePaletteModel::RegisterGlobalConstant(const AZ::BehaviorContext& behaviorContext, const AZ::BehaviorMethod& behaviorMethod) + void NodePaletteModel::RegisterGlobalConstant(const AZ::BehaviorContext&, const AZ::BehaviorProperty* behaviorProperty, const AZ::BehaviorMethod& behaviorMethod) { + AZ_PROFILE_SCOPE(NodePaletteModel, "NodePaletteModel::RegisterGlobalConstant"); + // Construct Node Identifier using the BehaviorMethod name and the ScriptCanvas Method typeid ScriptCanvas::NodeTypeIdentifier nodeIdentifier = ScriptCanvas::NodeUtils::ConstructGlobalMethodNodeIdentifier(behaviorMethod.m_name); @@ -1068,40 +1060,39 @@ namespace ScriptCanvasEditor if (auto registerIter = m_registeredNodes.find(nodeIdentifier); registerIter == m_registeredNodes.end()) { auto methodModelInformation = AZStd::make_unique(); - methodModelInformation->m_methodName = behaviorMethod.m_name; methodModelInformation->m_nodeIdentifier = nodeIdentifier; + methodModelInformation->m_methodName = behaviorMethod.m_name; methodModelInformation->m_titlePaletteOverride = "MethodNodeTitlePalette"; - methodModelInformation->m_displayName = TranslationHelper::GetGlobalMethodKeyTranslation(methodModelInformation->m_methodName, - TranslationItemType::Node, TranslationKeyId::Name); - methodModelInformation->m_toolTip = TranslationHelper::GetGlobalMethodKeyTranslation(methodModelInformation->m_methodName, - TranslationItemType::Node, TranslationKeyId::Tooltip); - methodModelInformation->m_categoryPath = TranslationHelper::GetGlobalMethodKeyTranslation(methodModelInformation->m_methodName, - TranslationItemType::Node, TranslationKeyId::Category); + AZStd::string name = behaviorProperty->m_name; + AZ::StringFunc::Replace(name, "::Getter", ""); + AZ::StringFunc::Replace(name, "::Setter", ""); - if (methodModelInformation->m_displayName.empty()) - { - methodModelInformation->m_displayName = methodModelInformation->m_methodName; - } + GraphCanvas::TranslationKey key; + key << "Constant" << name << "details"; + + GraphCanvas::TranslationRequests::Details details; + GraphCanvas::TranslationRequestBus::BroadcastResult(details, &GraphCanvas::TranslationRequests::GetDetails, key, details); + + + methodModelInformation->m_displayName = details.m_name; + methodModelInformation->m_toolTip = details.m_tooltip; + methodModelInformation->m_categoryPath = details.m_category; if (methodModelInformation->m_categoryPath.empty()) { - methodModelInformation->m_categoryPath = GetCategoryPath(behaviorMethod.m_attributes, behaviorContext); - // Default to making the Category for Global Methods to be informative that the method - // is registered with the Behavior Context - if (methodModelInformation->m_categoryPath.empty()) - { - methodModelInformation->m_categoryPath = "Constants"; - } + methodModelInformation->m_categoryPath = "Constants"; } m_registeredNodes.emplace(nodeIdentifier, methodModelInformation.release()); } } - void NodePaletteModel::RegisterMethodNode(const AZ::BehaviorContext& behaviorContext, const AZ::BehaviorMethod& behaviorMethod) + void NodePaletteModel::RegisterMethodNode(const AZ::BehaviorContext&, const AZ::BehaviorMethod& behaviorMethod) { + AZ_PROFILE_SCOPE(NodePaletteModel, "NodePaletteModel::RegisterMethodNode"); + // Construct Node Identifier using the BehaviorMethod name and the ScriptCanvas Method typeid ScriptCanvas::NodeTypeIdentifier nodeIdentifier = ScriptCanvas::NodeUtils::ConstructGlobalMethodNodeIdentifier(behaviorMethod.m_name); @@ -1112,31 +1103,17 @@ namespace ScriptCanvasEditor auto methodModelInformation = AZStd::make_unique(); methodModelInformation->m_methodName = behaviorMethod.m_name; methodModelInformation->m_nodeIdentifier = nodeIdentifier; - methodModelInformation->m_titlePaletteOverride = "MethodNodeTitlePalette"; - methodModelInformation->m_displayName = TranslationHelper::GetGlobalMethodKeyTranslation(methodModelInformation->m_methodName, - TranslationItemType::Node, TranslationKeyId::Name); - methodModelInformation->m_toolTip = TranslationHelper::GetGlobalMethodKeyTranslation(methodModelInformation->m_methodName, - TranslationItemType::Node, TranslationKeyId::Tooltip); - methodModelInformation->m_categoryPath = TranslationHelper::GetGlobalMethodKeyTranslation(methodModelInformation->m_methodName, - TranslationItemType::Node, TranslationKeyId::Category); + GraphCanvas::TranslationKey key; + key << "BehaviorMethod" << behaviorMethod.m_name.c_str() << "details"; - if (methodModelInformation->m_displayName.empty()) - { - methodModelInformation->m_displayName = methodModelInformation->m_methodName; - } + GraphCanvas::TranslationRequests::Details details; + GraphCanvas::TranslationRequestBus::BroadcastResult(details, &GraphCanvas::TranslationRequests::GetDetails, key, details); - if (methodModelInformation->m_categoryPath.empty()) - { - methodModelInformation->m_categoryPath = GetCategoryPath(behaviorMethod.m_attributes, behaviorContext); - // Default to making the Category for Global Methods to be informative that the method - // is registered with the Behavior Context - if (methodModelInformation->m_categoryPath.empty()) - { - methodModelInformation->m_categoryPath = "Behavior Context: Global Methods"; - } - } + methodModelInformation->m_displayName = details.m_name.empty() ? behaviorMethod.m_name : details.m_name; + methodModelInformation->m_toolTip = details.m_tooltip.empty() ? "" : details.m_tooltip; + methodModelInformation->m_categoryPath = details.m_category.empty() ? "Behavior Context: Global Methods" : details.m_category; m_registeredNodes.emplace(nodeIdentifier, methodModelInformation.release()); } @@ -1144,6 +1121,8 @@ namespace ScriptCanvasEditor void NodePaletteModel::RegisterEBusHandlerNodeModelInformation(AZStd::string_view categoryPath, AZStd::string_view busName, AZStd::string_view eventName, const ScriptCanvas::EBusBusId& busId, const AZ::BehaviorEBusHandler::BusForwarderEvent& forwardEvent) { + + AZ_PROFILE_SCOPE(NodePaletteModel, "NodePaletteModel::RegisterEBusHandlerNodeModelInformation"); ScriptCanvas::NodeTypeIdentifier nodeIdentifier = ScriptCanvas::NodeUtils::ConstructEBusEventReceiverIdentifier(busId, forwardEvent.m_eventId); auto nodeIter = m_registeredNodes.find(nodeIdentifier); @@ -1161,18 +1140,14 @@ namespace ScriptCanvasEditor handlerInformation->m_busId = busId; handlerInformation->m_eventId = forwardEvent.m_eventId; - AZStd::string displayEventName = TranslationHelper::GetKeyTranslation(TranslationContextGroup::EbusHandler, busName.data(), eventName.data(), TranslationItemType::Node, TranslationKeyId::Name); + GraphCanvas::TranslationKey key; + key << "EBusHandler" << busName << "methods" << eventName << "details"; - if (displayEventName.empty()) - { - handlerInformation->m_displayName = eventName; - } - else - { - handlerInformation->m_displayName = displayEventName; - } + GraphCanvas::TranslationRequests::Details details; + GraphCanvas::TranslationRequestBus::BroadcastResult(details, &GraphCanvas::TranslationRequests::GetDetails, key, details); - handlerInformation->m_toolTip = TranslationHelper::GetKeyTranslation(TranslationContextGroup::EbusHandler, busName.data(), eventName.data(), TranslationItemType::Node, TranslationKeyId::Tooltip); + handlerInformation->m_displayName = details.m_name.empty() ? eventName : details.m_name.c_str(); + handlerInformation->m_toolTip = details.m_tooltip.empty() ? "" : details.m_tooltip; m_registeredNodes.emplace(AZStd::make_pair(nodeIdentifier, handlerInformation)); } @@ -1184,10 +1159,12 @@ namespace ScriptCanvasEditor , AZStd::string_view eventName , const ScriptCanvas::EBusBusId& busId , const ScriptCanvas::EBusEventId& eventId - , const AZ::BehaviorEBusEventSender& + , const AZ::BehaviorEBusEventSender& sender , ScriptCanvas::PropertyStatus propertyStatus , bool isOverload) { + AZ_PROFILE_SCOPE(NodePaletteModel, "NodePaletteModel::RegisterEBusSenderNodeModelInformation"); + ScriptCanvas::NodeTypeIdentifier nodeIdentifier = isOverload ? ScriptCanvas::NodeUtils::ConstructEBusEventSenderOverloadedIdentifier(busId, eventId) : ScriptCanvas::NodeUtils::ConstructEBusEventSenderIdentifier(busId, eventId); auto nodeIter = m_registeredNodes.find(nodeIdentifier); @@ -1207,25 +1184,34 @@ namespace ScriptCanvasEditor senderInformation->m_busId = busId; senderInformation->m_eventId = eventId; - AZStd::string displayEventName = TranslationHelper::GetKeyTranslation(TranslationContextGroup::EbusSender, busName.data(), eventName.data(), TranslationItemType::Node, TranslationKeyId::Name); + GraphCanvas::TranslationKey key; + key << "EBusSender" << busName << "methods" << eventName << "details"; - if (displayEventName.empty()) + GraphCanvas::TranslationRequests::Details details; + GraphCanvas::TranslationRequestBus::BroadcastResult(details, &GraphCanvas::TranslationRequests::GetDetails, key, details); + + senderInformation->m_displayName = details.m_name.empty() ? eventName : details.m_name.c_str(); + senderInformation->m_toolTip = details.m_tooltip.empty() ? "" : details.m_tooltip; + + auto safeRegister = [](AZ::BehaviorMethod* method) { - senderInformation->m_displayName = eventName; - } - else - { - senderInformation->m_displayName = displayEventName; - } - - senderInformation->m_toolTip = TranslationHelper::GetKeyTranslation(TranslationContextGroup::EbusSender, busName.data(), eventName.data(), TranslationItemType::Node, TranslationKeyId::Tooltip); + if (method && AZ::MethodReturnsAzEventByReferenceOrPointer(*method)) + { + const AZ::BehaviorParameter* resultParameter = method->GetResult(); + ScriptCanvas::ReflectEventTypeOnDemand(resultParameter->m_typeId, resultParameter->m_name, resultParameter->m_azRtti); + } + }; + safeRegister(sender.m_event); + safeRegister(sender.m_broadcast); m_registeredNodes.emplace(AZStd::make_pair(nodeIdentifier, senderInformation)); } } AZStd::vector NodePaletteModel::RegisterScriptEvent(ScriptEvents::ScriptEventsAsset* scriptEventAsset) { + + AZ_PROFILE_SCOPE(NodePaletteModel, "NodePaletteModel::RegisterScriptEvent"); const ScriptEvents::ScriptEvent& scriptEvent = scriptEventAsset->m_definition; ScriptCanvas::EBusBusId busId = scriptEventAsset->GetBusId(); @@ -1236,7 +1222,7 @@ namespace ScriptCanvasEditor AZStd::vector identifiers; - // Each event has a handler and a reciever + // Each event has a handler and a receiver identifiers.reserve(methods.size() * 2); for (const auto& method : methods) @@ -1444,6 +1430,8 @@ namespace ScriptCanvasEditor AZStd::vector NodePaletteModel::ProcessAsset(AzToolsFramework::AssetBrowser::AssetBrowserEntry* entry) { + AZ_PROFILE_SCOPE(NodePaletteModel, "NodePaletteModel::RegisterScriptEvent"); + AZStd::lock_guard myLocker(m_mutex); if (entry) diff --git a/Gems/ScriptCanvas/Code/Editor/View/Widgets/NodePalette/NodePaletteModel.h b/Gems/ScriptCanvas/Code/Editor/View/Widgets/NodePalette/NodePaletteModel.h index 28d627af01..b228650d58 100644 --- a/Gems/ScriptCanvas/Code/Editor/View/Widgets/NodePalette/NodePaletteModel.h +++ b/Gems/ScriptCanvas/Code/Editor/View/Widgets/NodePalette/NodePaletteModel.h @@ -80,7 +80,8 @@ namespace ScriptCanvasEditor void RegisterCustomNode(AZStd::string_view categoryPath, const AZ::Uuid& uuid, AZStd::string_view name, const AZ::SerializeContext::ClassData* classData); void RegisterClassNode(const AZStd::string& categoryPath, const AZStd::string& methodClass, const AZStd::string& methodName, const AZ::BehaviorMethod* behaviorMethod, const AZ::BehaviorContext* behaviorContext, ScriptCanvas::PropertyStatus propertyStatus, bool isOverload); void RegisterMethodNode(const AZ::BehaviorContext& behaviorContext, const AZ::BehaviorMethod& behaviorMethod); - void RegisterGlobalConstant(const AZ::BehaviorContext& behaviorContext, const AZ::BehaviorMethod& behaviorMethod); + void RegisterGlobalConstant(const AZ::BehaviorContext& behaviorContext, const AZ::BehaviorProperty* behaviorProperty, const AZ::BehaviorMethod& behaviorMethod); + void RegisterEBusHandlerNodeModelInformation(AZStd::string_view categoryPath, AZStd::string_view busName, AZStd::string_view eventName, const ScriptCanvas::EBusBusId& busId, const AZ::BehaviorEBusHandler::BusForwarderEvent& forwardEvent); void RegisterEBusSenderNodeModelInformation(AZStd::string_view categoryPath, AZStd::string_view busName, AZStd::string_view eventName, const ScriptCanvas::EBusBusId& busId, const ScriptCanvas::EBusEventId& eventId, const AZ::BehaviorEBusEventSender& eventSender, ScriptCanvas::PropertyStatus propertyStatus, bool isOverload); diff --git a/Gems/ScriptCanvas/Code/Editor/View/Widgets/ScriptCanvasNodePaletteDockWidget.cpp b/Gems/ScriptCanvas/Code/Editor/View/Widgets/ScriptCanvasNodePaletteDockWidget.cpp index 9e51c1896f..60d903d748 100644 --- a/Gems/ScriptCanvas/Code/Editor/View/Widgets/ScriptCanvasNodePaletteDockWidget.cpp +++ b/Gems/ScriptCanvas/Code/Editor/View/Widgets/ScriptCanvasNodePaletteDockWidget.cpp @@ -26,12 +26,18 @@ #include #include #include + +#include #include + #include #include #include #include #include + +#include + #include #include #include @@ -50,9 +56,11 @@ #include #include #include + #include #include #include + #include #include #include @@ -99,7 +107,7 @@ namespace ScriptCanvasEditor if (auto customModelInformation = azrtti_cast(modelInformation)) { - createdItem = parentItem->CreateChildNode(customModelInformation->m_typeId, customModelInformation->m_displayName); + createdItem = parentItem->CreateChildNode(*customModelInformation); createdItem->SetToolTip(QString(customModelInformation->m_toolTip.c_str())); } else if (auto methodNodeModelInformation = azrtti_cast(modelInformation)) @@ -448,37 +456,38 @@ namespace ScriptCanvasEditor return; } - if (!data->m_runtimeData.m_interface.HasAnyFunctionality()) + if (!data->m_interfaceData.m_interface.HasAnyFunctionality()) { // check for deleting the old entry return; } + AZStd::string rootPath, absolutePath; AZ::Data::AssetInfo assetInfo = AssetHelpers::GetAssetInfo(assetId, rootPath); AzFramework::StringFunc::Path::Join(rootPath.c_str(), assetInfo.m_relativePath.c_str(), absolutePath); - + AZStd::string normPath = absolutePath; AzFramework::StringFunc::Path::Normalize(normPath); - + AZStd::string watchFolder; bool sourceInfoFound{}; AzToolsFramework::AssetSystemRequestBus::BroadcastResult(sourceInfoFound, &AzToolsFramework::AssetSystemRequestBus::Events::GetSourceInfoBySourcePath, normPath.c_str(), assetInfo, watchFolder); - + if (!sourceInfoFound) { return; } - + CreateFunctionPaletteItem(asset, assetInfo); - + treePaletteIter = m_globalFunctionTreeItems.find(asset->GetId()); - + if (treePaletteIter != m_globalFunctionTreeItems.end()) { treePaletteIter->second->ClearError(); } - + m_monitoredAssets.emplace(asset->GetId(), asset); } else @@ -508,7 +517,7 @@ namespace ScriptCanvasEditor return; } - const ScriptCanvas::Grammar::SubgraphInterface& graphInterface = data->m_runtimeData.m_interface; + const ScriptCanvas::Grammar::SubgraphInterface& graphInterface = data->m_interfaceData.m_interface; if (!graphInterface.HasAnyFunctionality()) { return; @@ -557,7 +566,7 @@ namespace ScriptCanvasEditor return; } - const ScriptCanvas::Grammar::SubgraphInterface& graphInterface = data->m_runtimeData.m_interface; + const ScriptCanvas::Grammar::SubgraphInterface& graphInterface = data->m_interfaceData.m_interface; if (!graphInterface.HasAnyFunctionality()) { return; @@ -638,7 +647,7 @@ namespace ScriptCanvasEditor m_mimeType = NodePaletteDockWidget::GetMimeType(); m_isInContextMenu = isInContextMenu; m_allowArrowKeyNavigation = isInContextMenu; - m_saveIdentifier = m_isInContextMenu ? "ScriptCanvas" : "ScriptCnavas_ContextMenu"; + m_saveIdentifier = m_isInContextMenu ? "ScriptCanvas" : "ScriptCanvas_ContextMenu"; m_rootTreeItem = Widget::NodePaletteWidget::ExternalCreateNodePaletteRoot(nodePaletteModel, assetModel); } @@ -660,6 +669,11 @@ namespace ScriptCanvasEditor , m_previousCycleAction(nullptr) , m_ignoreSelectionChanged(false) { + + GraphCanvas::NodePaletteTreeView* treeView = GetTreeView(); + + treeView->setContextMenuPolicy(Qt::ContextMenuPolicy::ActionsContextMenu); + if (!paletteConfig.m_isInContextMenu) { QMenu* creationMenu = new QMenu(); @@ -677,10 +691,11 @@ namespace ScriptCanvasEditor AddSearchCustomizationWidget(m_newCustomEvent); - GraphCanvas::NodePaletteTreeView* treeView = GetTreeView(); + { m_nextCycleAction = new QAction(treeView); + m_nextCycleAction->setText(tr("Next Instance in Graph")); m_nextCycleAction->setShortcut(QKeySequence(Qt::Key_F8)); treeView->addAction(m_nextCycleAction); @@ -690,6 +705,7 @@ namespace ScriptCanvasEditor { m_previousCycleAction = new QAction(treeView); + m_previousCycleAction->setText(tr("Previous Instance in Graph")); m_previousCycleAction->setShortcut(QKeySequence(Qt::Key_F7)); treeView->addAction(m_previousCycleAction); @@ -699,6 +715,23 @@ namespace ScriptCanvasEditor QObject::connect(treeView->selectionModel(), &QItemSelectionModel::selectionChanged, this, &NodePaletteDockWidget::OnTreeSelectionChanged); QObject::connect(treeView, &GraphCanvas::NodePaletteTreeView::OnTreeItemDoubleClicked, this, &NodePaletteDockWidget::HandleTreeItemDoubleClicked); + + { + m_openTranslationData = new QAction(treeView); + m_openTranslationData->setText("Explore Translation Data"); + treeView->addAction(m_openTranslationData); + + QObject::connect(m_openTranslationData, &QAction::triggered, this, &NodePaletteDockWidget::OpenTranslationData); + } + + { + m_generateTranslation = new QAction(treeView); + m_generateTranslation->setText("Generate Translation"); + treeView->addAction(m_generateTranslation); + + QObject::connect(m_generateTranslation, &QAction::triggered, this, &NodePaletteDockWidget::GenerateTranslation); + } + } ConfigureSearchCustomizationMargins(QMargins(0, 0, 0, 0), 0); @@ -781,6 +814,7 @@ namespace ScriptCanvasEditor { m_nextCycleAction->setEnabled(true); m_previousCycleAction->setEnabled(true); + m_openTranslationData->setEnabled(true); } } @@ -793,6 +827,7 @@ namespace ScriptCanvasEditor { m_nextCycleAction->setEnabled(false); m_previousCycleAction->setEnabled(false); + m_openTranslationData->setEnabled(false); } } @@ -816,6 +851,81 @@ namespace ScriptCanvasEditor CycleToNextNode(); } + static AZStd::string GetGemPath(const AZStd::string& gemName) + { + if (auto settingsRegistry = AZ::Interface::Get(); settingsRegistry != nullptr) + { + AZ::IO::Path gemSourceAssetDirectories; + AZStd::vector gemInfos; + if (AzFramework::GetGemsInfo(gemInfos, *settingsRegistry)) + { + auto FindGemByName = [gemName](const AzFramework::GemInfo& gemInfo) + { + return gemInfo.m_gemName == gemName; + }; + // Gather unique list of Gem Paths from the Settings Registry + + auto foundIt = AZStd::find_if(gemInfos.begin(), gemInfos.end(), FindGemByName); + if (foundIt != gemInfos.end()) + { + const AzFramework::GemInfo& gemInfo = *foundIt; + for (const AZ::IO::Path& absoluteSourcePath : gemInfo.m_absoluteSourcePaths) + { + gemSourceAssetDirectories = (absoluteSourcePath / gemInfo.GetGemAssetFolder()); + } + + return gemSourceAssetDirectories.c_str(); + } + } + } + return ""; + } + + void NodePaletteDockWidget::GenerateTranslation() + { + QModelIndexList indexList = GetTreeView()->selectionModel()->selectedRows(); + + QSortFilterProxyModel* filterModel = static_cast(GetTreeView()->model()); + + for (const QModelIndex& index : indexList) + { + QModelIndex sourceIndex = filterModel->mapToSource(index); + + GraphCanvas::NodePaletteTreeItem* nodePaletteItem = static_cast(sourceIndex.internalPointer()); + nodePaletteItem->GenerateTranslationData(); + } + } + + void NodePaletteDockWidget::OpenTranslationData() + { + QModelIndexList indexList = GetTreeView()->selectionModel()->selectedRows(); + + if (indexList.size() == 1) + { + QSortFilterProxyModel* filterModel = static_cast(GetTreeView()->model()); + + for (const QModelIndex& index : indexList) + { + QModelIndex sourceIndex = filterModel->mapToSource(index); + + GraphCanvas::NodePaletteTreeItem* nodePaletteItem = static_cast(sourceIndex.internalPointer()); + if (nodePaletteItem) + { + AZ::IO::Path gemPath = GetGemPath("ScriptCanvas.Editor"); + gemPath = gemPath / AZ::IO::Path("TranslationAssets"); + gemPath = gemPath / nodePaletteItem->GetTranslationDataPath(); + gemPath.ReplaceExtension(".names"); + + AZ::IO::FileIOBase* fileIO = AZ::IO::FileIOBase::GetInstance(); + if (fileIO->Exists(gemPath.c_str())) + { + AzQtComponents::ShowFileOnDesktop(gemPath.c_str()); + } + } + } + } + } + void NodePaletteDockWidget::ConfigureHelper() { if (!m_cyclingHelper.IsConfigured() && !m_cyclingIdentifiers.empty()) diff --git a/Gems/ScriptCanvas/Code/Editor/View/Widgets/ScriptCanvasNodePaletteDockWidget.h b/Gems/ScriptCanvas/Code/Editor/View/Widgets/ScriptCanvasNodePaletteDockWidget.h index 45645ceb33..9f5fa0511f 100644 --- a/Gems/ScriptCanvas/Code/Editor/View/Widgets/ScriptCanvasNodePaletteDockWidget.h +++ b/Gems/ScriptCanvas/Code/Editor/View/Widgets/ScriptCanvasNodePaletteDockWidget.h @@ -193,8 +193,6 @@ namespace ScriptCanvasEditor void OnSelectionChanged() override; //// - - protected: GraphCanvas::GraphCanvasTreeItem* CreatePaletteRoot() const override; @@ -209,6 +207,8 @@ namespace ScriptCanvasEditor private: void HandleTreeItemDoubleClicked(GraphCanvas::GraphCanvasTreeItem* treeItem); + void OpenTranslationData(); + void GenerateTranslation(); void ConfigureHelper(); void ParseCycleTargets(GraphCanvas::GraphCanvasTreeItem* treeItem); @@ -225,6 +225,10 @@ namespace ScriptCanvasEditor QAction* m_previousCycleAction; bool m_ignoreSelectionChanged; + + QMenu* m_contextMenu; + QAction* m_openTranslationData; + QAction* m_generateTranslation; }; } } diff --git a/Gems/ScriptCanvas/Code/Editor/View/Widgets/SourceHandlePropertyAssetCtrl.cpp b/Gems/ScriptCanvas/Code/Editor/View/Widgets/SourceHandlePropertyAssetCtrl.cpp new file mode 100644 index 0000000000..3e4cb7cd49 --- /dev/null +++ b/Gems/ScriptCanvas/Code/Editor/View/Widgets/SourceHandlePropertyAssetCtrl.cpp @@ -0,0 +1,166 @@ +/* + * Copyright (c) Contributors to the Open 3D Engine Project. + * For complete copyright and license terms please see the LICENSE at the root of this distribution. + * + * SPDX-License-Identifier: Apache-2.0 OR MIT + * + */ + +#include +#include + +#include + +#include +#include +#include +#include + +namespace ScriptCanvasEditor +{ + SourceHandlePropertyAssetCtrl::SourceHandlePropertyAssetCtrl(QWidget* parent) + : AzToolsFramework::PropertyAssetCtrl(parent) + { + } + + AzToolsFramework::AssetBrowser::AssetSelectionModel SourceHandlePropertyAssetCtrl::GetAssetSelectionModel() + { + auto selectionModel = AssetSelectionModel::SourceAssetTypeSelection(m_sourceAssetFilterPattern); + selectionModel.SetTitle(m_title); + return selectionModel; + } + + void SourceHandlePropertyAssetCtrl::PopupAssetPicker() + { + // Request the AssetBrowser Dialog and set a type filter + AssetSelectionModel selection = GetAssetSelectionModel(); + selection.SetSelectedFilePath(m_selectedSourcePath.c_str()); + + AZStd::string defaultDirectory; + if (m_defaultDirectoryCallback) + { + m_defaultDirectoryCallback->Invoke(m_editNotifyTarget, defaultDirectory); + selection.SetDefaultDirectory(defaultDirectory); + } + + AssetBrowserComponentRequestBus::Broadcast(&AssetBrowserComponentRequests::PickAssets, selection, parentWidget()); + if (selection.IsValid()) + { + const auto source = azrtti_cast(selection.GetResult()); + AZ_Assert(source, "Incorrect entry type selected. Expected source."); + if (source) + { + SetSelectedSourcePath(source->GetFullPath()); + } + } + } + + void SourceHandlePropertyAssetCtrl::ClearAssetInternal() + { + SetSelectedSourcePath(""); + + PropertyAssetCtrl::ClearAssetInternal(); + } + + void SourceHandlePropertyAssetCtrl::ConfigureAutocompleter() + { + if (m_completerIsConfigured) + { + return; + } + + AzToolsFramework::PropertyAssetCtrl::ConfigureAutocompleter(); + + AssetSelectionModel selection = GetAssetSelectionModel(); + m_model->SetFetchEntryType(AssetBrowserEntry::AssetEntryType::Source); + m_model->SetFilter(selection.GetDisplayFilter()); + } + + void SourceHandlePropertyAssetCtrl::SetSourceAssetFilterPattern(const QString& filterPattern) + { + m_sourceAssetFilterPattern = filterPattern; + } + + AZ::IO::Path SourceHandlePropertyAssetCtrl::GetSelectedSourcePath() const + { + return m_selectedSourcePath; + } + + void SourceHandlePropertyAssetCtrl::SetSelectedSourcePath(const AZ::IO::Path& sourcePath) + { + m_selectedSourcePath = sourcePath; + + AZStd::string displayText; + if (!sourcePath.empty()) + { + AzFramework::StringFunc::Path::GetFileName(sourcePath.c_str(), displayText); + } + m_browseEdit->setText(displayText.c_str()); + + // The AssetID gets ignored, the only important bit is triggering the change for the RequestWrite + emit OnAssetIDChanged(AZ::Data::AssetId()); + } + + void SourceHandlePropertyAssetCtrl::OnAutocomplete(const QModelIndex& index) + { + SetSelectedSourcePath(m_model->GetPathFromIndex(GetSourceIndex(index))); + } + + QWidget* SourceHandlePropertyHandler::CreateGUI(QWidget* pParent) + { + SourceHandlePropertyAssetCtrl* newCtrl = aznew SourceHandlePropertyAssetCtrl(pParent); + connect(newCtrl, &SourceHandlePropertyAssetCtrl::OnAssetIDChanged, this, [newCtrl](AZ::Data::AssetId newAssetID) + { + (void)newAssetID; + AzToolsFramework::PropertyEditorGUIMessages::Bus::Broadcast(&AzToolsFramework::PropertyEditorGUIMessages::RequestWrite, newCtrl); + AzToolsFramework::PropertyEditorGUIMessages::Bus::Broadcast(&AzToolsFramework::PropertyEditorGUIMessages::OnEditingFinished, newCtrl); + }); + return newCtrl; + } + + void SourceHandlePropertyHandler::ConsumeAttribute(SourceHandlePropertyAssetCtrl* GUI, AZ::u32 attrib, AzToolsFramework::PropertyAttributeReader* attrValue, const char* debugName) + { + // Let the AssetPropertyHandlerDefault handle all of the common attributes + AzToolsFramework::AssetPropertyHandlerDefault::ConsumeAttributeInternal(GUI, attrib, attrValue, debugName); + + if (attrib == AZ::Edit::Attributes::SourceAssetFilterPattern) + { + AZStd::string filterPattern; + if (attrValue->Read(filterPattern)) + { + GUI->SetSourceAssetFilterPattern(filterPattern.c_str()); + } + } + } + + void SourceHandlePropertyHandler::WriteGUIValuesIntoProperty(size_t index, SourceHandlePropertyAssetCtrl* GUI, property_t& instance, AzToolsFramework::InstanceDataNode* node) + { + (void)index; + (void)node; + + auto sourceHandle = SourceHandle(nullptr, GUI->GetSelectedSourcePath()); + auto completeSourceHandle = CompleteDescription(sourceHandle); + if (completeSourceHandle) + { + instance = property_t(*CompleteDescription(sourceHandle)); + } + else + { + instance = property_t(); + } + } + + bool SourceHandlePropertyHandler::ReadValuesIntoGUI(size_t index, SourceHandlePropertyAssetCtrl* GUI, const property_t& instance, AzToolsFramework::InstanceDataNode* node) + { + (void)index; + (void)node; + + GUI->blockSignals(true); + + GUI->SetSelectedSourcePath(instance.Path()); + GUI->SetEditNotifyTarget(node->GetParent()->GetInstance(0)); + + GUI->blockSignals(false); + return false; + } +} diff --git a/Gems/ScriptCanvas/Code/Editor/View/Widgets/SourceHandlePropertyAssetCtrl.h b/Gems/ScriptCanvas/Code/Editor/View/Widgets/SourceHandlePropertyAssetCtrl.h new file mode 100644 index 0000000000..f54279e59c --- /dev/null +++ b/Gems/ScriptCanvas/Code/Editor/View/Widgets/SourceHandlePropertyAssetCtrl.h @@ -0,0 +1,71 @@ +/* + * Copyright (c) Contributors to the Open 3D Engine Project. + * For complete copyright and license terms please see the LICENSE at the root of this distribution. + * + * SPDX-License-Identifier: Apache-2.0 OR MIT + * + */ + +#pragma once + +#if !defined(Q_MOC_RUN) +#include + +#include +#endif + +namespace ScriptCanvasEditor +{ + class SourceHandlePropertyAssetCtrl + : public AzToolsFramework::PropertyAssetCtrl + { + Q_OBJECT + + public: + AZ_CLASS_ALLOCATOR(SourceHandlePropertyAssetCtrl, AZ::SystemAllocator, 0); + + SourceHandlePropertyAssetCtrl(QWidget* parent = nullptr); + + AzToolsFramework::AssetBrowser::AssetSelectionModel GetAssetSelectionModel() override; + void PopupAssetPicker() override; + void ClearAssetInternal() override; + void ConfigureAutocompleter() override; + + void SetSourceAssetFilterPattern(const QString& filterPattern); + + AZ::IO::Path GetSelectedSourcePath() const; + void SetSelectedSourcePath(const AZ::IO::Path& sourcePath); + + public Q_SLOTS: + void OnAutocomplete(const QModelIndex& index) override; + + private: + //! A regular expression pattern for filtering by source assets + //! If this is set, the PropertyAssetCtrl will be dealing with source assets + //! instead of a specific asset type + QString m_sourceAssetFilterPattern; + + AZ::IO::Path m_selectedSourcePath; + }; + + class SourceHandlePropertyHandler + : QObject + , public AzToolsFramework::PropertyHandler + { + Q_OBJECT + + public: + AZ_CLASS_ALLOCATOR(SourceHandlePropertyHandler, AZ::SystemAllocator, 0); + + AZ::u32 GetHandlerName(void) const override { return AZ_CRC_CE("SourceHandle"); } + bool IsDefaultHandler() const override { return true; } + QWidget* GetFirstInTabOrder(SourceHandlePropertyAssetCtrl* widget) override { return widget->GetFirstInTabOrder(); } + QWidget* GetLastInTabOrder(SourceHandlePropertyAssetCtrl* widget) override { return widget->GetLastInTabOrder(); } + void UpdateWidgetInternalTabbing(SourceHandlePropertyAssetCtrl* widget) override { widget->UpdateTabOrder(); } + + QWidget* CreateGUI(QWidget* pParent) override; + void ConsumeAttribute(SourceHandlePropertyAssetCtrl* GUI, AZ::u32 attrib, AzToolsFramework::PropertyAttributeReader* attrValue, const char* debugName) override; + void WriteGUIValuesIntoProperty(size_t index, SourceHandlePropertyAssetCtrl* GUI, property_t& instance, AzToolsFramework::InstanceDataNode* node) override; + bool ReadValuesIntoGUI(size_t index, SourceHandlePropertyAssetCtrl* GUI, const property_t& instance, AzToolsFramework::InstanceDataNode* node) override; + }; +} diff --git a/Gems/ScriptCanvas/Code/Editor/View/Widgets/StatisticsDialog/NodeUsageTreeItem.cpp b/Gems/ScriptCanvas/Code/Editor/View/Widgets/StatisticsDialog/NodeUsageTreeItem.cpp index 4dce7ce384..64dfa30cff 100644 --- a/Gems/ScriptCanvas/Code/Editor/View/Widgets/StatisticsDialog/NodeUsageTreeItem.cpp +++ b/Gems/ScriptCanvas/Code/Editor/View/Widgets/StatisticsDialog/NodeUsageTreeItem.cpp @@ -10,11 +10,10 @@ #include -#include #include #include -#include + #include namespace ScriptCanvasEditor @@ -136,8 +135,6 @@ namespace ScriptCanvasEditor void ScriptCanvasAssetNodeUsageTreeItem::SetAssetId(const AZ::Data::AssetId& assetId, AZ::Data::AssetType assetType) { - // If we are setting up a new assetId, we wantt o register for the bus. - // Otherwise we just want to reload the asset to scrape some data from it. if (m_assetId != assetId) { if (AZ::Data::AssetBus::Handler::BusIsConnected()) @@ -151,9 +148,6 @@ namespace ScriptCanvasEditor } m_assetType = assetType; - - auto onAssetReady = [](ScriptCanvasMemoryAsset&) {}; - AssetTrackerRequestBus::Broadcast(&AssetTrackerRequests::Load, m_assetId, m_assetType, onAssetReady); } const AZ::Data::AssetId& ScriptCanvasAssetNodeUsageTreeItem::GetAssetId() const @@ -188,6 +182,7 @@ namespace ScriptCanvasEditor return nodeIter->second; } + /* void ScriptCanvasAssetNodeUsageTreeItem::OnAssetReady(AZ::Data::Asset asset) { ProcessAsset(asset); @@ -206,7 +201,8 @@ namespace ScriptCanvasEditor ProcessAsset(asset); } - void ScriptCanvasAssetNodeUsageTreeItem::ProcessAsset(const AZ::Data::Asset& scriptCanvasAsset) + // #sc_editor_asset_redux fix graph use statistics + void ScriptCanvasAssetNodeUsageTreeItem::ProcessAsset(const AZ::Data::Asset& scriptCanvasAsset) { if (scriptCanvasAsset.IsReady()) { @@ -228,6 +224,7 @@ namespace ScriptCanvasEditor } } } + */ /////////////////////////////////////////// // ScriptCanvasAssetNodeUsageTreeItemRoot diff --git a/Gems/ScriptCanvas/Code/Editor/View/Widgets/StatisticsDialog/NodeUsageTreeItem.h b/Gems/ScriptCanvas/Code/Editor/View/Widgets/StatisticsDialog/NodeUsageTreeItem.h index 69eb46d423..7fbe3e173a 100644 --- a/Gems/ScriptCanvas/Code/Editor/View/Widgets/StatisticsDialog/NodeUsageTreeItem.h +++ b/Gems/ScriptCanvas/Code/Editor/View/Widgets/StatisticsDialog/NodeUsageTreeItem.h @@ -15,7 +15,7 @@ #include #include -#include + #include namespace ScriptCanvasEditor @@ -94,15 +94,16 @@ namespace ScriptCanvasEditor void SetActiveNodeType(const ScriptCanvas::NodeTypeIdentifier& nodeTypeIdentifier); int GetNodeCount() const; + private: + // AZ::Data::AssetBus::Handler + /* void OnAssetReady(AZ::Data::Asset asset) override; void OnAssetSaved(AZ::Data::Asset asset, bool isSuccessful) override; void OnAssetReloaded(AZ::Data::Asset asset) override; + */ //// - - private: - - void ProcessAsset(const AZ::Data::Asset& scriptCanvasAsset); + // void ProcessAsset(const AZ::Data::Asset& scriptCanvasAsset); QString m_name; QIcon m_icon; diff --git a/Gems/ScriptCanvas/Code/Editor/View/Widgets/StatisticsDialog/ScriptCanvasStatisticsDialog.cpp b/Gems/ScriptCanvas/Code/Editor/View/Widgets/StatisticsDialog/ScriptCanvasStatisticsDialog.cpp index ece93955bb..980e3a1e92 100644 --- a/Gems/ScriptCanvas/Code/Editor/View/Widgets/StatisticsDialog/ScriptCanvasStatisticsDialog.cpp +++ b/Gems/ScriptCanvas/Code/Editor/View/Widgets/StatisticsDialog/ScriptCanvasStatisticsDialog.cpp @@ -15,7 +15,7 @@ #include -#include + #include namespace @@ -176,14 +176,15 @@ namespace ScriptCanvasEditor { } - void StatisticsDialog::OnCatalogAssetChanged(const AZ::Data::AssetId& assetId) + void StatisticsDialog::OnCatalogAssetChanged(const AZ::Data::AssetId& /*assetId*/) { - AZ::Data::AssetInfo assetInfo; - AZ::Data::AssetCatalogRequestBus::BroadcastResult(assetInfo, &AZ::Data::AssetCatalogRequestBus::Events::GetAssetInfoById, assetId); - if (assetInfo.m_assetType == azrtti_typeid()) - { - m_scriptCanvasAssetTreeRoot->RegisterAsset(assetId, assetInfo.m_assetType); - } + // #sc_editor_asset_redux cut or update +// AZ::Data::AssetInfo assetInfo; +// AZ::Data::AssetCatalogRequestBus::BroadcastResult(assetInfo, &AZ::Data::AssetCatalogRequestBus::Events::GetAssetInfoById, assetId); +// if (assetInfo.m_assetType == azrtti_typeidRegisterAsset(assetId, assetInfo.m_assetType); +// } } void StatisticsDialog::OnCatalogAssetAdded(const AZ::Data::AssetId& assetId) @@ -191,14 +192,16 @@ namespace ScriptCanvasEditor OnCatalogAssetChanged(assetId); } - void StatisticsDialog::OnCatalogAssetRemoved(const AZ::Data::AssetId& assetId, const AZ::Data::AssetInfo& /*assetInfo*/) + void StatisticsDialog::OnCatalogAssetRemoved(const AZ::Data::AssetId& /*assetId*/, const AZ::Data::AssetInfo& /*assetInfo*/) { - AZ::Data::AssetInfo assetInfo; - AZ::Data::AssetCatalogRequestBus::BroadcastResult(assetInfo, &AZ::Data::AssetCatalogRequestBus::Events::GetAssetInfoById, assetId); - if (assetInfo.m_assetType == azrtti_typeid()) - { - m_scriptCanvasAssetTreeRoot->RemoveAsset(assetId); - } + // #sc_editor_asset_redux cut or update + +// AZ::Data::AssetInfo assetInfo; +// AZ::Data::AssetCatalogRequestBus::BroadcastResult(assetInfo, &AZ::Data::AssetCatalogRequestBus::Events::GetAssetInfoById, assetId); +// if (assetInfo.m_assetType == azrtti_typeid()) +// { +// m_scriptCanvasAssetTreeRoot->RemoveAsset(assetId); +// } } void StatisticsDialog::OnAssetModelRepopulated() @@ -257,7 +260,10 @@ namespace ScriptCanvasEditor if (treeItem->GetAssetId().IsValid()) { - GeneralRequestBus::Broadcast(&GeneralRequests::OpenScriptCanvasAssetId, treeItem->GetAssetId()); + GeneralRequestBus::Broadcast + ( &GeneralRequests::OpenScriptCanvasAssetId + , SourceHandle(nullptr, treeItem->GetAssetId().m_guid, "") + , Tracker::ScriptCanvasFileState::UNMODIFIED); } } } @@ -429,22 +435,23 @@ namespace ScriptCanvasEditor } } - void StatisticsDialog::ProcessAsset(const AzToolsFramework::AssetBrowser::AssetBrowserEntry* entry) + void StatisticsDialog::ProcessAsset([[maybe_unused]] const AzToolsFramework::AssetBrowser::AssetBrowserEntry* entry) { - if (entry) - { - if (entry->GetEntryType() == AzToolsFramework::AssetBrowser::AssetBrowserEntry::AssetEntryType::Product) - { - const AzToolsFramework::AssetBrowser::ProductAssetBrowserEntry* productEntry = static_cast(entry); - - if (productEntry->GetAssetType() == azrtti_typeid()) - { - const AZ::Data::AssetId& assetId = productEntry->GetAssetId(); - - m_scriptCanvasAssetTreeRoot->RegisterAsset(assetId, productEntry->GetAssetType()); - } - } - } + // #sc_editor_asset_redux cut or update +// if (entry) +// { +// if (entry->GetEntryType() == AzToolsFramework::AssetBrowser::AssetBrowserEntry::AssetEntryType::Product) +// { +// const AzToolsFramework::AssetBrowser::ProductAssetBrowserEntry* productEntry = static_cast(entry); +// +// if (productEntry->GetAssetType() == azrtti_typeid()) +// { +// const AZ::Data::AssetId& assetId = productEntry->GetAssetId(); +// +// m_scriptCanvasAssetTreeRoot->RegisterAsset(assetId, productEntry->GetAssetType()); +// } +// } +// } } #include diff --git a/Gems/ScriptCanvas/Code/Editor/View/Widgets/UnitTestPanel/UnitTestDockWidget.cpp b/Gems/ScriptCanvas/Code/Editor/View/Widgets/UnitTestPanel/UnitTestDockWidget.cpp index 6142729bfe..d3a948a6c4 100644 --- a/Gems/ScriptCanvas/Code/Editor/View/Widgets/UnitTestPanel/UnitTestDockWidget.cpp +++ b/Gems/ScriptCanvas/Code/Editor/View/Widgets/UnitTestPanel/UnitTestDockWidget.cpp @@ -26,7 +26,7 @@ #include #include #include - +#include #include #include @@ -35,7 +35,6 @@ #include #include -#include #include #include #include @@ -47,13 +46,12 @@ #include -#include -#include + #include #include #include #include - +#include #include namespace ScriptCanvasEditor @@ -433,7 +431,10 @@ namespace ScriptCanvasEditor AZ::Data::AssetId sourceAssetId(sourceUuid, 0); AZ::Outcome openOutcome = AZ::Failure(AZStd::string()); - GeneralRequestBus::BroadcastResult(openOutcome, &GeneralRequests::OpenScriptCanvasAssetId, sourceAssetId); + GeneralRequestBus::BroadcastResult(openOutcome, &GeneralRequests::OpenScriptCanvasAssetId + , ScriptCanvasEditor::SourceHandle(nullptr, sourceUuid, {}) + , Tracker::ScriptCanvasFileState::UNMODIFIED); + if (!openOutcome) { AZ_Warning("Script Canvas", openOutcome, "%s", openOutcome.GetError().data()); @@ -519,16 +520,9 @@ namespace ScriptCanvasEditor continue; } - AZ::Data::AssetInfo assetInfo; - if (AssetHelpers::GetAssetInfo(sourceBrowserEntry->GetFullPath(), assetInfo)) - { - auto asset = AZ::Data::AssetManager::Instance().GetAsset(assetInfo.m_assetId, azrtti_typeid(), AZ::Data::AssetLoadBehavior::PreLoad); - asset.BlockUntilLoadComplete(); - if (asset.IsReady()) - { - RunTestGraph(asset, mode); - } - } + ScriptCanvasEditor::SourceHandle source(nullptr, scriptUuid, ""); + ScriptCanvasEditor::CompleteDescriptionInPlace(source); + RunTestGraph(source, mode); } } } @@ -577,19 +571,19 @@ namespace ScriptCanvasEditor m_testMetrics[interpretedMode].Clear(); } - void UnitTestDockWidget::RunTestGraph(AZ::Data::Asset asset, ScriptCanvas::ExecutionMode mode) + void UnitTestDockWidget::RunTestGraph(SourceHandle asset, ScriptCanvas::ExecutionMode mode) { Reporter reporter; - UnitTestWidgetNotificationBus::Broadcast(&UnitTestWidgetNotifications::OnTestStart, asset.GetId().m_guid); + UnitTestWidgetNotificationBus::Broadcast(&UnitTestWidgetNotifications::OnTestStart, asset.Id()); ScriptCanvasExecutionBus::BroadcastResult(reporter, &ScriptCanvasExecutionRequests::RunAssetGraph, asset, mode); UnitTestResult testResult; UnitTestVerificationBus::BroadcastResult(testResult, &UnitTestVerificationRequests::Verify, reporter); - UnitTestWidgetNotificationBus::Broadcast(&UnitTestWidgetNotifications::OnTestResult, asset.GetId().m_guid, testResult); + UnitTestWidgetNotificationBus::Broadcast(&UnitTestWidgetNotifications::OnTestResult, asset.Id(), testResult); - m_pendingTests.Add(asset.GetId(), mode); + m_pendingTests.Add(asset, mode); ++m_testMetrics[static_cast(mode)].m_graphsTested; @@ -609,7 +603,7 @@ namespace ScriptCanvasEditor ++m_testMetrics[static_cast(mode)].m_compilationFailures; } - m_pendingTests.Complete(asset.GetId(), mode); + m_pendingTests.Complete(asset, mode); } void UnitTestDockWidget::OnSystemTick() @@ -620,14 +614,14 @@ namespace ScriptCanvasEditor } } - void UnitTestDockWidget::PendingTests::Add(AZ::Data::AssetId assetId, ExecutionMode mode) + void UnitTestDockWidget::PendingTests::Add(ScriptCanvasEditor::SourceHandle assetId, ExecutionMode mode) { m_pendingTests.push_back(AZStd::make_pair(assetId, mode)); } - void UnitTestDockWidget::PendingTests::Complete(AZ::Data::AssetId assetId, ExecutionMode mode) + void UnitTestDockWidget::PendingTests::Complete(ScriptCanvasEditor::SourceHandle assetId, ExecutionMode mode) { - AZStd::erase_if(m_pendingTests, [assetId, mode](const AZStd::pair& pending) + AZStd::erase_if(m_pendingTests, [assetId, mode](const AZStd::pair& pending) { return (assetId == pending.first && mode == pending.second); }); diff --git a/Gems/ScriptCanvas/Code/Editor/View/Widgets/UnitTestPanel/UnitTestDockWidget.h b/Gems/ScriptCanvas/Code/Editor/View/Widgets/UnitTestPanel/UnitTestDockWidget.h index 93bb093c49..fce520a6f2 100644 --- a/Gems/ScriptCanvas/Code/Editor/View/Widgets/UnitTestPanel/UnitTestDockWidget.h +++ b/Gems/ScriptCanvas/Code/Editor/View/Widgets/UnitTestPanel/UnitTestDockWidget.h @@ -162,7 +162,7 @@ namespace ScriptCanvasEditor void OpenTestResults(AZ::Uuid sourceUuid, AZStd::string_view sourceDisplayName); void RunTests(const AZStd::vector& scriptUuids); - void RunTestGraph(AZ::Data::Asset, ScriptCanvas::ExecutionMode); + void RunTestGraph(SourceHandle sourceHandle, ScriptCanvas::ExecutionMode); void OnTestsComplete(); @@ -184,15 +184,15 @@ namespace ScriptCanvasEditor { public: - void Add(AZ::Data::AssetId assetId, ExecutionMode mode); + void Add(ScriptCanvasEditor::SourceHandle assetId, ExecutionMode mode); - void Complete(AZ::Data::AssetId assetId, ExecutionMode mode); + void Complete(ScriptCanvasEditor::SourceHandle assetId, ExecutionMode mode); bool IsFinished() const; private: - AZStd::vector> m_pendingTests; + AZStd::vector> m_pendingTests; }; PendingTests m_pendingTests; diff --git a/Gems/ScriptCanvas/Code/Editor/View/Widgets/UnitTestPanel/UnitTestTreeView.cpp b/Gems/ScriptCanvas/Code/Editor/View/Widgets/UnitTestPanel/UnitTestTreeView.cpp index 00ce022cb5..9dbab22bb3 100644 --- a/Gems/ScriptCanvas/Code/Editor/View/Widgets/UnitTestPanel/UnitTestTreeView.cpp +++ b/Gems/ScriptCanvas/Code/Editor/View/Widgets/UnitTestPanel/UnitTestTreeView.cpp @@ -19,7 +19,6 @@ #include -#include #include #include @@ -34,7 +33,7 @@ #include #include -#include + #include #include diff --git a/Gems/ScriptCanvas/Code/Editor/View/Widgets/VariablePanel/GraphVariablesTableView.cpp b/Gems/ScriptCanvas/Code/Editor/View/Widgets/VariablePanel/GraphVariablesTableView.cpp index 5b78c62bac..806f43aba1 100644 --- a/Gems/ScriptCanvas/Code/Editor/View/Widgets/VariablePanel/GraphVariablesTableView.cpp +++ b/Gems/ScriptCanvas/Code/Editor/View/Widgets/VariablePanel/GraphVariablesTableView.cpp @@ -716,10 +716,6 @@ namespace ScriptCanvasEditor void GraphVariablesModel::SetActiveScene(const ScriptCanvas::ScriptCanvasId& scriptCanvasId) { ScriptCanvas::GraphVariableManagerNotificationBus::Handler::BusDisconnect(); - - m_assetType = AZ::Data::AssetType::CreateNull(); - ScriptCanvas::GraphRequestBus::EventResult(m_assetType, scriptCanvasId, &ScriptCanvas::GraphRequests::GetAssetType); - m_scriptCanvasId = scriptCanvasId; if (m_scriptCanvasId.IsValid()) @@ -922,11 +918,6 @@ namespace ScriptCanvasEditor return -1; } - bool GraphVariablesModel::IsFunction()const - { - return m_assetType == azrtti_typeid(); - } - //////////////////////////////////////////// // GraphVariablesModelSortFilterProxyModel //////////////////////////////////////////// diff --git a/Gems/ScriptCanvas/Code/Editor/View/Widgets/VariablePanel/GraphVariablesTableView.h b/Gems/ScriptCanvas/Code/Editor/View/Widgets/VariablePanel/GraphVariablesTableView.h index 962aadb8c8..f0e45978a0 100644 --- a/Gems/ScriptCanvas/Code/Editor/View/Widgets/VariablePanel/GraphVariablesTableView.h +++ b/Gems/ScriptCanvas/Code/Editor/View/Widgets/VariablePanel/GraphVariablesTableView.h @@ -106,8 +106,6 @@ namespace ScriptCanvasEditor void PopulateSceneVariables(); - AZ::Data::AssetType m_assetType; - AZStd::vector m_variableIds; ScriptCanvas::ScriptCanvasId m_scriptCanvasId; }; diff --git a/Gems/ScriptCanvas/Code/Editor/View/Widgets/VariablePanel/SlotTypeSelectorWidget.cpp b/Gems/ScriptCanvas/Code/Editor/View/Widgets/VariablePanel/SlotTypeSelectorWidget.cpp index fe3a59d28a..a632b7719e 100644 --- a/Gems/ScriptCanvas/Code/Editor/View/Widgets/VariablePanel/SlotTypeSelectorWidget.cpp +++ b/Gems/ScriptCanvas/Code/Editor/View/Widgets/VariablePanel/SlotTypeSelectorWidget.cpp @@ -37,7 +37,6 @@ #include -#include #include #include #include diff --git a/Gems/ScriptCanvas/Code/Editor/View/Widgets/VariablePanel/VariableDockWidget.cpp b/Gems/ScriptCanvas/Code/Editor/View/Widgets/VariablePanel/VariableDockWidget.cpp index eb2f92f42c..2222f4d2aa 100644 --- a/Gems/ScriptCanvas/Code/Editor/View/Widgets/VariablePanel/VariableDockWidget.cpp +++ b/Gems/ScriptCanvas/Code/Editor/View/Widgets/VariablePanel/VariableDockWidget.cpp @@ -37,7 +37,6 @@ #include -#include #include #include #include @@ -52,6 +51,7 @@ #include #include #include +#include "GraphCanvas/Components/Slots/Data/DataSlotBus.h" namespace ScriptCanvasEditor { @@ -886,6 +886,7 @@ namespace ScriptCanvasEditor ScriptCanvas::NodeRequestBus::EventResult(removedReferences, memberPair.m_scriptCanvasId, &ScriptCanvas::NodeRequests::RemoveVariableReferences, variableIds); + // If we didn't remove the references. Just delete the node. if (!removedReferences) { diff --git a/Gems/ScriptCanvas/Code/Editor/View/Widgets/VariablePanel/VariablePaletteTableView.cpp b/Gems/ScriptCanvas/Code/Editor/View/Widgets/VariablePanel/VariablePaletteTableView.cpp index 56b0cb3e55..6fdf154d69 100644 --- a/Gems/ScriptCanvas/Code/Editor/View/Widgets/VariablePanel/VariablePaletteTableView.cpp +++ b/Gems/ScriptCanvas/Code/Editor/View/Widgets/VariablePanel/VariablePaletteTableView.cpp @@ -18,7 +18,6 @@ #include -#include #include #include diff --git a/Gems/ScriptCanvas/Code/Editor/View/Windows/EBusHandlerActionMenu.cpp b/Gems/ScriptCanvas/Code/Editor/View/Windows/EBusHandlerActionMenu.cpp index b2cffdb7fe..58f2ad7cee 100644 --- a/Gems/ScriptCanvas/Code/Editor/View/Windows/EBusHandlerActionMenu.cpp +++ b/Gems/ScriptCanvas/Code/Editor/View/Windows/EBusHandlerActionMenu.cpp @@ -113,16 +113,14 @@ namespace ScriptCanvasEditor actionItem.m_name = QString(eventConfigurations[i].m_eventName.c_str()); actionItem.m_eventId = eventConfigurations[i].m_eventId; - AZStd::string translatedName = TranslationHelper::GetKeyTranslation(TranslationContextGroup::EbusHandler, m_busName, eventConfigurations[i].m_eventName, TranslationItemType::Node, TranslationKeyId::Name); + GraphCanvas::TranslationKey key; + key << "EBusHandler" << m_busName.c_str() << "methods" << eventConfigurations[i].m_eventName << "details"; - if (translatedName.empty()) - { - actionItem.m_displayName = actionItem.m_name; - } - else - { - actionItem.m_displayName = QString(translatedName.c_str()); - } + GraphCanvas::TranslationRequests::Details details; + details.m_name = actionItem.m_name.toUtf8().data(); + GraphCanvas::TranslationRequestBus::BroadcastResult(details, &GraphCanvas::TranslationRequests::GetDetails, key, details); + + actionItem.m_displayName = QString(details.m_name.c_str()); actionItem.m_index = i; diff --git a/Gems/ScriptCanvas/Code/Editor/View/Windows/MainWindow.cpp b/Gems/ScriptCanvas/Code/Editor/View/Windows/MainWindow.cpp index 1ad8b58317..1176df61dc 100644 --- a/Gems/ScriptCanvas/Code/Editor/View/Windows/MainWindow.cpp +++ b/Gems/ScriptCanvas/Code/Editor/View/Windows/MainWindow.cpp @@ -96,8 +96,7 @@ #include #include -#include -#include + #include #include @@ -135,6 +134,7 @@ #include #include #include +#include #include @@ -144,16 +144,14 @@ //// #include -#include -#include - #include #include -#include + #include #include +#include namespace ScriptCanvasEditor { @@ -235,7 +233,7 @@ namespace ScriptCanvasEditor Widget::GraphTabBar* tabBar = m_mainWindow->m_tabBar; AZStd::vector activeAssets; - AZ::Data::AssetId focusedAssetId = tabBar->FindAssetId(tabBar->currentIndex()); + ScriptCanvasEditor::SourceHandle focusedAssetId = tabBar->FindAssetId(tabBar->currentIndex()); if (m_rememberOpenCanvases) { @@ -243,44 +241,35 @@ namespace ScriptCanvasEditor for (int i = 0; i < tabBar->count(); ++i) { - AZ::Data::AssetId assetId = tabBar->FindAssetId(i); + ScriptCanvasEditor::SourceHandle assetId = tabBar->FindAssetId(i); const Tracker::ScriptCanvasFileState& fileState = m_mainWindow->GetAssetFileState(assetId); if (fileState == Tracker::ScriptCanvasFileState::MODIFIED || fileState == Tracker::ScriptCanvasFileState::UNMODIFIED) { - AZ::Data::AssetId sourceId = GetSourceAssetId(assetId); - if (sourceId.IsValid()) + ScriptCanvasEditor::SourceHandle sourceId = GetSourceAssetId(assetId); + if (sourceId.IsGraphValid()) { EditorSettings::EditorWorkspace::WorkspaceAssetSaveData assetSaveData; assetSaveData.m_assetId = sourceId; - ScriptCanvas::ScriptCanvasId scriptCanvasId = m_mainWindow->FindScriptCanvasIdByAssetId(assetId); - - EditorGraphRequests* editorRequests = EditorGraphRequestBus::FindFirstHandler(scriptCanvasId); - - if (editorRequests) - { - assetSaveData.m_assetType = azrtti_typeid(); - } - activeAssets.push_back(assetSaveData); } } - else if (assetId == focusedAssetId) + else if (assetId.AnyEquals(focusedAssetId)) { - focusedAssetId.SetInvalid(); + focusedAssetId.Clear(); } } // The assetId needs to be the file AssetId to restore the workspace - if (focusedAssetId.IsValid()) + if (focusedAssetId.IsGraphValid()) { focusedAssetId = GetSourceAssetId(focusedAssetId); } // If our currently focused asset won't be restored, just show the first element. - if (!focusedAssetId.IsValid()) + if (!focusedAssetId.IsGraphValid()) { if (!activeAssets.empty()) { @@ -316,7 +305,7 @@ namespace ScriptCanvasEditor if (m_loadingAssets.empty()) { - m_mainWindow->OnWorkspaceRestoreEnd(AZ::Data::AssetId()); + m_mainWindow->OnWorkspaceRestoreEnd(ScriptCanvasEditor::SourceHandle()); } else { @@ -325,86 +314,66 @@ namespace ScriptCanvasEditor m_queuedAssetFocus = workspace->GetFocusedAssetId(); - for (const auto& assetSaveData : workspace->GetActiveAssetData()) + // #sc-asset-editor + //for (const auto& assetSaveData : workspace->GetActiveAssetData()) { - AssetTrackerNotificationBus::MultiHandler::BusConnect(assetSaveData.m_assetId); - - Callbacks::OnAssetReadyCallback onAssetReady = [this, assetSaveData](ScriptCanvasMemoryAsset& asset) - { - // If we get an error callback. Just remove it from out active lists. - if (asset.IsSourceInError()) - { - if (assetSaveData.m_assetId == m_queuedAssetFocus) - { - m_queuedAssetFocus = AZ::Data::AssetId(); - } - - SignalAssetComplete(asset.GetFileAssetId()); - } - }; - - bool loadedFile = true; - AssetTrackerRequestBus::BroadcastResult(loadedFile, &AssetTrackerRequests::Load, assetSaveData.m_assetId, assetSaveData.m_assetType, onAssetReady); - - if (!loadedFile) - { - if (assetSaveData.m_assetId == m_queuedAssetFocus) - { - m_queuedAssetFocus = AZ::Data::AssetId(); - } - - SignalAssetComplete(assetSaveData.m_assetId); - } + // load all the files +// AssetTrackerNotificationBus::MultiHandler::BusConnect(assetSaveData.m_assetId); +// +// Callbacks::OnAssetReadyCallback onAssetReady = [this, assetSaveData](ScriptCanvasMemoryAsset& asset) +// { +// // If we get an error callback. Just remove it from out active lists. +// if (asset.IsSourceInError()) +// { +// if (assetSaveData.m_assetId == m_queuedAssetFocus) +// { +// m_queuedAssetFocus = ScriptCanvasEditor::SourceHandle(); +// } +// +// SignalAssetComplete(asset.GetFileAssetId()); +// } +// }; +// +// bool loadedFile = true; +// AssetTrackerRequestBus::BroadcastResult(loadedFile, &AssetTrackerRequests::Load, assetSaveData.m_assetId, assetSaveData.m_assetType, onAssetReady); +// +// if (!loadedFile) +// { +// if (assetSaveData.m_assetId == m_queuedAssetFocus) +// { +// m_queuedAssetFocus = ScriptCanvasEditor::SourceHandle(); +// } +// +// SignalAssetComplete(assetSaveData.m_assetId); +// } } } else { - m_mainWindow->OnWorkspaceRestoreEnd(AZ::Data::AssetId()); + m_mainWindow->OnWorkspaceRestoreEnd(ScriptCanvasEditor::SourceHandle()); } } } - void Workspace::OnAssetReady(const ScriptCanvasMemoryAsset::pointer memoryAsset) + void Workspace::SignalAssetComplete(const ScriptCanvasEditor::SourceHandle& /*fileAssetId*/) { - const AZ::Data::AssetId& fileAssetId = memoryAsset->GetFileAssetId(); - - if (AssetTrackerNotificationBus::MultiHandler::BusIsConnectedId(fileAssetId)) - { - AssetTrackerNotificationBus::MultiHandler::BusDisconnect(fileAssetId); - - m_mainWindow->OpenScriptCanvasAsset(*memoryAsset); - - SignalAssetComplete(fileAssetId); - } + // When we are done loading all assets we can safely set the focus to the recorded asset +// auto it = AZStd::find(m_loadingAssets.begin(), m_loadingAssets.end(), fileAssetId); +// if (it != m_loadingAssets.end()) +// { +// m_loadingAssets.erase(it); +// } +// +// if (m_loadingAssets.empty()) +// { +// m_mainWindow->OnWorkspaceRestoreEnd(m_queuedAssetFocus); +// m_queuedAssetFocus.SetInvalid(); +// } } - void Workspace::SignalAssetComplete(const AZ::Data::AssetId& fileAssetId) + ScriptCanvasEditor::SourceHandle Workspace::GetSourceAssetId(const ScriptCanvasEditor::SourceHandle& memoryAssetId) const { - auto it = AZStd::find(m_loadingAssets.begin(), m_loadingAssets.end(), fileAssetId); - if (it != m_loadingAssets.end()) - { - m_loadingAssets.erase(it); - } - - //! When we are done loading all assets we can safely set the focus to the recorded asset - if (m_loadingAssets.empty()) - { - m_mainWindow->OnWorkspaceRestoreEnd(m_queuedAssetFocus); - m_queuedAssetFocus.SetInvalid(); - } - } - - AZ::Data::AssetId Workspace::GetSourceAssetId(const AZ::Data::AssetId& memoryAssetId) const - { - ScriptCanvasMemoryAsset::pointer memoryAsset; - AssetTrackerRequestBus::BroadcastResult(memoryAsset, &AssetTrackerRequests::GetAsset, memoryAssetId); - - if (memoryAsset) - { - return memoryAsset->GetFileAssetId(); - } - - return AZ::Data::AssetId(); + return memoryAssetId; } //////////////// @@ -428,6 +397,8 @@ namespace ScriptCanvasEditor , m_closeCurrentGraphAfterSave(false) , m_styleManager(ScriptCanvasEditor::AssetEditorId, "ScriptCanvas/StyleSheet/graphcanvas_style.json") { + AZ_PROFILE_FUNCTION(ScriptCanvas); + VariablePaletteRequestBus::Handler::BusConnect(); GraphCanvas::AssetEditorAutomationRequestBus::Handler::BusConnect(ScriptCanvasEditor::AssetEditorId); @@ -464,7 +435,7 @@ namespace ScriptCanvasEditor m_scriptCanvasAssetModel = new ScriptCanvasAssetBrowserModel(this); AzToolsFramework::AssetBrowser::AssetGroupFilter* scriptCanvasAssetFilter = new AzToolsFramework::AssetBrowser::AssetGroupFilter(); - scriptCanvasAssetFilter->SetAssetGroup(ScriptCanvasAsset::Description::GetGroup(azrtti_typeid())); + scriptCanvasAssetFilter->SetAssetGroup(ScriptCanvas::SubgraphInterfaceAssetDescription().GetGroupImpl()); scriptCanvasAssetFilter->SetFilterPropagation(AzToolsFramework::AssetBrowser::AssetBrowserEntryFilter::PropagateDirection::Down); m_scriptCanvasAssetModel->setSourceModel(assetBrowserModel); @@ -653,9 +624,9 @@ namespace ScriptCanvasEditor QTimer::singleShot(0, [this]() { SetDefaultLayout(); - if (m_activeAssetId.IsValid()) + if (m_activeGraph.IsGraphValid()) { - m_queuedFocusOverride = m_activeAssetId; + m_queuedFocusOverride = m_activeGraph; } m_workspace->Restore(); @@ -674,8 +645,9 @@ namespace ScriptCanvasEditor ScriptCanvas::BatchOperationNotificationBus::Handler::BusConnect(); AssetGraphSceneBus::Handler::BusConnect(); AzToolsFramework::ToolsApplicationNotificationBus::Handler::BusConnect(); - + AzToolsFramework::AssetSystemBus::Handler::BusConnect(); ScriptCanvas::ScriptCanvasSettingsRequestBus::Handler::BusConnect(); + AZ::SystemTickBus::Handler::BusConnect(); UINotificationBus::Broadcast(&UINotifications::MainWindowCreationEvent, this); @@ -718,6 +690,7 @@ namespace ScriptCanvasEditor ScriptCanvasEditor::GeneralRequestBus::Handler::BusDisconnect(); GraphCanvas::AssetEditorAutomationRequestBus::Handler::BusDisconnect(); ScriptCanvas::ScriptCanvasSettingsRequestBus::Handler::BusDisconnect(); + AzToolsFramework::AssetSystemBus::Handler::BusDisconnect(); Clear(); @@ -800,11 +773,7 @@ namespace ScriptCanvasEditor // View menu connect(ui->action_ViewNodePalette, &QAction::triggered, this, &MainWindow::OnViewNodePalette); - - // Disabling the Minimap since it does not play nicely with the Qt caching solution - // And causing some weird visual issues. connect(ui->action_ViewMiniMap, &QAction::triggered, this, &MainWindow::OnViewMiniMap); - ui->action_ViewMiniMap->setVisible(false); connect(ui->action_ViewProperties, &QAction::triggered, this, &MainWindow::OnViewProperties); connect(ui->action_ViewBookmarks, &QAction::triggered, this, &MainWindow::OnBookmarks); @@ -829,16 +798,12 @@ namespace ScriptCanvasEditor connect(ui->action_ViewRestoreDefaultLayout, &QAction::triggered, this, &MainWindow::OnRestoreDefaultLayout); } - void MainWindow::SignalActiveSceneChanged(AZ::Data::AssetId assetId) + void MainWindow::SignalActiveSceneChanged(ScriptCanvasEditor::SourceHandle assetId) { - ScriptCanvasMemoryAsset::pointer memoryAsset; - AssetTrackerRequestBus::BroadcastResult(memoryAsset, &AssetTrackerRequests::GetAsset, assetId); - AZ::EntityId graphId; - - if (memoryAsset) + if (assetId.IsGraphValid()) { - graphId = memoryAsset->GetGraphId(); + EditorGraphRequestBus::EventResult(graphId, assetId.Get()->GetScriptCanvasId(), &EditorGraphRequests::GetGraphCanvasGraphId); } m_autoSaveTimer.stop(); @@ -857,18 +822,20 @@ namespace ScriptCanvasEditor GraphCanvas::ViewId viewId; GraphCanvas::SceneRequestBus::EventResult(viewId, graphId, &GraphCanvas::SceneRequests::GetViewId); - AZ_Assert(viewId.IsValid(), "SceneRequest must return a valid ViewId"); if (viewId.IsValid()) { GraphCanvas::ViewNotificationBus::Handler::BusDisconnect(); GraphCanvas::ViewNotificationBus::Handler::BusConnect(viewId); - enabled = memoryAsset->GetScriptCanvasId().IsValid(); + enabled = true; + } + else + { + AZ_Error("ScriptCanvasEditor", viewId.IsValid(), "SceneRequest must return a valid ViewId"); } } UpdateMenuState(enabled); - } void MainWindow::UpdateRecentMenu() @@ -920,18 +887,9 @@ namespace ScriptCanvasEditor return; } - AssetTrackerRequests::AssetList unsavedAssets; - AssetTrackerRequestBus::BroadcastResult(unsavedAssets, &AssetTrackerRequests::GetUnsavedAssets); - for (int tabCounter = 0; tabCounter < m_tabBar->count(); ++tabCounter) { - AZ::Data::AssetId assetId = m_tabBar->FindAssetId(tabCounter); - - auto resultIterator = m_processedClosedAssetIds.insert(assetId); - if (!resultIterator.second) - { - continue; - } + ScriptCanvasEditor::SourceHandle assetId = m_tabBar->FindAssetId(tabCounter); const Tracker::ScriptCanvasFileState& fileState = GetAssetFileState(assetId); @@ -948,29 +906,13 @@ namespace ScriptCanvasEditor if (shouldSaveResults == UnsavedChangesOptions::SAVE) { - Callbacks::OnSave saveCB = [this](bool isSuccessful, AZ::Data::AssetPtr, AZ::Data::AssetId) - { - if (isSuccessful) - { - // Continue closing. - qobject_cast(parent())->close(); - } - else - { - // Abort closing. - QMessageBox::critical(this, QString(), QObject::tr("Failed to save.")); - m_processedClosedAssetIds.clear(); - } - }; - ActivateAndSaveAsset(assetId, saveCB); + SaveAssetImpl(assetId, Save::InPlace); event->ignore(); return; } else if (shouldSaveResults == UnsavedChangesOptions::CANCEL_WITHOUT_SAVING) { - m_processedClosedAssetIds.clear(); event->ignore(); - return; } else if (shouldSaveResults == UnsavedChangesOptions::CONTINUE_WITHOUT_SAVING && @@ -982,20 +924,6 @@ namespace ScriptCanvasEditor } m_workspace->Save(); - - // Close all files. - - AssetTrackerRequests::AssetList allAssets; - AssetTrackerRequestBus::BroadcastResult(allAssets, &AssetTrackerRequests::GetAssets); - - for (auto trackedAsset : allAssets) - { - const AZ::Data::AssetId& assetId = trackedAsset->GetAsset().GetId(); - CloseScriptCanvasAsset(assetId); - } - - m_processedClosedAssetIds.clear(); - event->accept(); } @@ -1030,7 +958,7 @@ namespace ScriptCanvasEditor DequeuePropertyGridUpdate(); UndoRequestBus::Event(GetActiveScriptCanvasId(), &UndoRequests::Undo); - SignalSceneDirty(m_activeAssetId); + SignalSceneDirty(m_activeGraph); m_propertyGrid->ClearSelection(); GeneralEditorNotificationBus::Event(GetActiveScriptCanvasId(), &GeneralEditorNotifications::OnUndoRedoEnd); @@ -1042,7 +970,7 @@ namespace ScriptCanvasEditor DequeuePropertyGridUpdate(); UndoRequestBus::Event(GetActiveScriptCanvasId(), &UndoRequests::Redo); - SignalSceneDirty(m_activeAssetId); + SignalSceneDirty(m_activeGraph); m_propertyGrid->ClearSelection(); GeneralEditorNotificationBus::Event(GetActiveScriptCanvasId(), &GeneralEditorNotifications::OnUndoRedoEnd); @@ -1115,16 +1043,59 @@ namespace ScriptCanvasEditor { ScopedUndoBatch scopedUndoBatch("Modify Graph Canvas Scene"); UndoRequestBus::Event(scriptCanvasId, &UndoRequests::AddGraphItemChangeUndo, "Graph Change"); - MarkAssetModified(m_activeAssetId); + UpdateFileState(m_activeGraph, Tracker::ScriptCanvasFileState::MODIFIED); } const bool forceTimer = true; RestartAutoTimerSave(forceTimer); } - void MainWindow::SignalSceneDirty(AZ::Data::AssetId assetId) + void MainWindow::SourceFileChanged + ( [[maybe_unused]] AZStd::string relativePath + , AZStd::string scanFolder + , [[maybe_unused]] AZ::Uuid fileAssetId) { - MarkAssetModified(assetId); + auto handle = CompleteDescription(SourceHandle(nullptr, fileAssetId, {})); + if (handle) + { + if (!IsRecentSave(*handle)) + { + UpdateFileState(*handle, Tracker::ScriptCanvasFileState::MODIFIED); + } + else + { + AZ_TracePrintf + ( "ScriptCanvas" + , "Ignoring source file modification notification (possibly external), as a it was recently saved by the editor: %s" + , relativePath.c_str()); + } + } + } + + void MainWindow::SourceFileRemoved + ( AZStd::string relativePath + , [[maybe_unused]] AZStd::string scanFolder + , AZ::Uuid fileAssetId) + { + SourceHandle handle(nullptr, fileAssetId, relativePath); + { + if (!IsRecentSave(handle)) + { + UpdateFileState(handle, Tracker::ScriptCanvasFileState::SOURCE_REMOVED); + } + else + { + AZ_TracePrintf + ( "ScriptCanvas" + , "Ignoring source file removed notification (possibly external), as a it was recently saved by the editor: %s" + , relativePath.c_str()); + } + } + } + + void MainWindow::SignalSceneDirty(ScriptCanvasEditor::SourceHandle assetId) + { + UpdateFileState(assetId, Tracker::ScriptCanvasFileState::MODIFIED); } void MainWindow::PushPreventUndoStateUpdate() @@ -1145,62 +1116,14 @@ namespace ScriptCanvasEditor m_preventUndoStateUpdateCount = 0; } - void MainWindow::MarkAssetModified(const AZ::Data::AssetId& assetId) + void MainWindow::UpdateFileState(const ScriptCanvasEditor::SourceHandle& assetId, Tracker::ScriptCanvasFileState fileState) { - if (!assetId.IsValid()) - { - return; - } - - ScriptCanvasMemoryAsset::pointer memoryAsset; - AssetTrackerRequestBus::BroadcastResult(memoryAsset, &AssetTrackerRequests::GetAsset, assetId); - - if (memoryAsset) - { - const auto& memoryAssetId = memoryAsset->GetId(); - const Tracker::ScriptCanvasFileState& fileState = GetAssetFileState(memoryAssetId); - if (fileState != Tracker::ScriptCanvasFileState::NEW) - { - AssetTrackerRequestBus::Broadcast(&AssetTrackerRequests::UpdateFileState, memoryAssetId, Tracker::ScriptCanvasFileState::MODIFIED); - } - } + m_tabBar->UpdateFileState(assetId, fileState); } - void MainWindow::RefreshScriptCanvasAsset(const AZ::Data::Asset& asset) + AZ::Outcome MainWindow::OpenScriptCanvasAssetId(const ScriptCanvasEditor::SourceHandle& fileAssetId, Tracker::ScriptCanvasFileState fileState) { - ScriptCanvasMemoryAsset::pointer memoryAsset; - AssetTrackerRequestBus::BroadcastResult(memoryAsset, &AssetTrackerRequests::GetAsset, asset.GetId()); - - if (memoryAsset && asset.IsReady()) - { - AZ::EntityId scGraphId = memoryAsset->GetScriptCanvasId(); - GraphCanvas::SceneNotificationBus::MultiHandler::BusDisconnect(scGraphId); - AZ::EntityId graphCanvasId = GetGraphCanvasGraphId(scGraphId); - - GraphCanvas::AssetEditorNotificationBus::Event(ScriptCanvasEditor::AssetEditorId, &GraphCanvas::AssetEditorNotifications::OnGraphRefreshed, graphCanvasId, graphCanvasId); - - int tabIndex = -1; - if (IsTabOpen(asset.GetId(), tabIndex)) - { - const AZStd::string& assetPath = memoryAsset->GetAbsolutePath(); - m_tabBar->setTabToolTip(tabIndex, assetPath.c_str()); - m_tabBar->SetTabText(tabIndex, memoryAsset->GetTabName().c_str(), memoryAsset->GetFileState()); - } - - if (graphCanvasId.IsValid()) - { - GraphCanvas::SceneNotificationBus::MultiHandler::BusConnect(graphCanvasId); - GraphCanvas::SceneMimeDelegateRequestBus::Event(graphCanvasId, &GraphCanvas::SceneMimeDelegateRequests::AddDelegate, m_entityMimeDelegateId); - - GraphCanvas::SceneRequestBus::Event(graphCanvasId, &GraphCanvas::SceneRequests::SetMimeType, Widget::NodePaletteDockWidget::GetMimeType()); - GraphCanvas::SceneMemberNotificationBus::Event(graphCanvasId, &GraphCanvas::SceneMemberNotifications::OnSceneReady); - } - } - } - - AZ::Outcome MainWindow::OpenScriptCanvasAssetId(const AZ::Data::AssetId& fileAssetId) - { - if (!fileAssetId.IsValid()) + if (fileAssetId.Id().IsNull()) { return AZ::Failure(AZStd::string("Unable to open asset with invalid asset id")); } @@ -1213,45 +1136,20 @@ namespace ScriptCanvasEditor return AZ::Success(outTabIndex); } - AZ::Data::AssetInfo assetInfo; - AZ::Data::AssetCatalogRequestBus::BroadcastResult(assetInfo, &AZ::Data::AssetCatalogRequests::GetAssetInfoById, fileAssetId); - - if (assetInfo.m_relativePath.empty()) + auto loadedGraphOutcome = LoadFromFile(fileAssetId.Path().c_str()); + if (!loadedGraphOutcome.IsSuccess()) { - return AZ::Failure(AZStd::string("Unknown AssetId")); + return AZ::Failure(AZStd::string::format("Failed to load graph at %s", fileAssetId.Path().c_str())); } - if (assetInfo.m_assetType != azrtti_typeid()) - { - return AZ::Failure(AZStd::string("Invalid AssetId provided, it's not a Script Canvas supported type")); - } - - AssetTrackerRequests::OnAssetReadyCallback onAssetReady = [this, fileAssetId, &outTabIndex](ScriptCanvasMemoryAsset& asset) - { - if (!asset.IsSourceInError()) - { - outTabIndex = CreateAssetTab(asset.GetFileAssetId()); - - if (!m_isRestoringWorkspace) - { - SetActiveAsset(fileAssetId); - } - - UpdateWorkspaceStatus(asset); - } - else - { - outTabIndex = -1; - m_loadingAssets.erase(fileAssetId); - } - }; - - m_loadingAssets.insert(fileAssetId); - - AssetTrackerRequestBus::Broadcast(&AssetTrackerRequests::Load, fileAssetId, assetInfo.m_assetType, onAssetReady); + auto loadedGraph = loadedGraphOutcome.TakeValue(); + CompleteDescriptionInPlace(loadedGraph); + outTabIndex = CreateAssetTab(loadedGraph, fileState); if (outTabIndex >= 0) { + AddRecentFile(loadedGraph.Path().c_str()); + OpenScriptCanvasAssetImplementation(loadedGraph, fileState); return AZ::Success(outTabIndex); } else @@ -1260,28 +1158,33 @@ namespace ScriptCanvasEditor } } - AZ::Outcome MainWindow::OpenScriptCanvasAsset(const ScriptCanvasMemoryAsset& scriptCanvasAsset, int tabIndex /*= -1*/) + AZ::Outcome MainWindow::OpenScriptCanvasAssetImplementation(const SourceHandle& scriptCanvasAsset, Tracker::ScriptCanvasFileState fileState, int tabIndex) { - const AZ::Data::AssetId& fileAssetId = scriptCanvasAsset.GetFileAssetId(); - if (!fileAssetId.IsValid()) + const ScriptCanvasEditor::SourceHandle& fileAssetId = scriptCanvasAsset; + if (!fileAssetId.IsDescriptionValid()) { return AZ::Failure(AZStd::string("Unable to open asset with invalid asset id")); } - if (scriptCanvasAsset.IsSourceInError()) + if (!m_isRestoringWorkspace) + { + SetActiveAsset(scriptCanvasAsset); + } + + if (!scriptCanvasAsset.IsDescriptionValid()) { if (!m_isRestoringWorkspace) { - AZStd::string errorPath = scriptCanvasAsset.GetAbsolutePath(); + AZStd::string errorPath = scriptCanvasAsset.Path().c_str(); if (errorPath.empty()) { errorPath = m_errorFilePath; } - if (m_queuedFocusOverride == fileAssetId) + if (m_queuedFocusOverride.AnyEquals(fileAssetId)) { - m_queuedFocusOverride.SetInvalid(); + m_queuedFocusOverride = fileAssetId; } QMessageBox::warning(this, "Unable to open source file", QString("Source File(%1) is in error and cannot be opened").arg(errorPath.c_str()), QMessageBox::StandardButton::Ok); @@ -1302,113 +1205,67 @@ namespace ScriptCanvasEditor return AZ::Success(outTabIndex); } - outTabIndex = CreateAssetTab(fileAssetId, tabIndex); + outTabIndex = CreateAssetTab(fileAssetId, fileState, tabIndex); if (outTabIndex == -1) { - return AZ::Failure(AZStd::string::format("Unable to open existing Script Canvas Asset with id %s in the Script Canvas Editor", AssetHelpers::AssetIdToString(fileAssetId).c_str())); + return AZ::Failure(AZStd::string::format("Unable to open existing Script Canvas Asset with id %s in the Script Canvas Editor" + , fileAssetId.ToString().c_str())); } - AZStd::string assetPath = scriptCanvasAsset.GetAbsolutePath(); + AZStd::string assetPath = scriptCanvasAsset.Path().c_str(); if (!assetPath.empty() && !m_loadingNewlySavedFile) { - const size_t eraseCount = m_loadingWorkspaceAssets.erase(fileAssetId); - - if (eraseCount == 0) - { - AddRecentFile(assetPath.c_str()); - } + AddRecentFile(assetPath.c_str()); } - if (!m_isRestoringWorkspace) - { - SetActiveAsset(fileAssetId); - } - - GraphCanvas::GraphId graphCanvasGraphId = GetGraphCanvasGraphId(scriptCanvasAsset.GetScriptCanvasId()); + GraphCanvas::GraphId graphCanvasGraphId = GetGraphCanvasGraphId(scriptCanvasAsset.Get()->GetScriptCanvasId()); GraphCanvas::AssetEditorNotificationBus::Event(ScriptCanvasEditor::AssetEditorId, &GraphCanvas::AssetEditorNotifications::OnGraphLoaded, graphCanvasGraphId); - GeneralAssetNotificationBus::Event(fileAssetId, &GeneralAssetNotifications::OnAssetVisualized); - - AssetTrackerNotificationBus::MultiHandler::BusConnect(fileAssetId); - return AZ::Success(outTabIndex); } - AZ::Outcome MainWindow::OpenScriptCanvasAsset(AZ::Data::AssetId scriptCanvasAssetId, int tabIndex /*= -1*/) + AZ::Outcome MainWindow::OpenScriptCanvasAsset(ScriptCanvasEditor::SourceHandle scriptCanvasAssetId, Tracker::ScriptCanvasFileState fileState, int tabIndex) { - ScriptCanvasMemoryAsset::pointer memoryAsset; - AssetTrackerRequestBus::BroadcastResult(memoryAsset, &AssetTrackerRequests::GetAsset, scriptCanvasAssetId); - - // If the asset is already tracked we can go directly to opening it. - if (memoryAsset) + if (scriptCanvasAssetId.IsGraphValid()) { - return OpenScriptCanvasAsset(*memoryAsset, tabIndex); + return OpenScriptCanvasAssetImplementation(scriptCanvasAssetId, fileState, tabIndex); } else { - return OpenScriptCanvasAssetId(scriptCanvasAssetId); + return OpenScriptCanvasAssetId(scriptCanvasAssetId, fileState); } } - int MainWindow::CreateAssetTab(const AZ::Data::AssetId& assetId, int tabIndex) + int MainWindow::CreateAssetTab(const ScriptCanvasEditor::SourceHandle& assetId, Tracker::ScriptCanvasFileState fileState, int tabIndex) { - return m_tabBar->InsertGraphTab(tabIndex, assetId); + return m_tabBar->InsertGraphTab(tabIndex, assetId, fileState); } - AZ::Outcome MainWindow::UpdateScriptCanvasAsset(const AZ::Data::Asset& scriptCanvasAsset) + void MainWindow::RemoveScriptCanvasAsset(const ScriptCanvasEditor::SourceHandle& assetId) { - int outTabIndex = -1; - - PushPreventUndoStateUpdate(); - RefreshScriptCanvasAsset(scriptCanvasAsset); - if (IsTabOpen(scriptCanvasAsset.GetId(), outTabIndex)) - { - RefreshActiveAsset(); - } - PopPreventUndoStateUpdate(); - - if (outTabIndex == -1) - { - return AZ::Failure(AZStd::string::format("Script Canvas Asset %s is not open in a tab", scriptCanvasAsset.ToString().c_str())); - } - - return AZ::Success(outTabIndex); - } - - void MainWindow::RemoveScriptCanvasAsset(const AZ::Data::AssetId& assetId) - { - AssetHelpers::PrintInfo("RemoveScriptCanvasAsset : %s", AssetHelpers::AssetIdToString(assetId).c_str()); - + AssetHelpers::PrintInfo("RemoveScriptCanvasAsset : %s", assetId.ToString().c_str()); m_assetCreationRequests.erase(assetId); - GeneralAssetNotificationBus::Event(assetId, &GeneralAssetNotifications::OnAssetUnloaded); - AssetTrackerNotificationBus::MultiHandler::BusDisconnect(assetId); - - ScriptCanvasMemoryAsset::pointer memoryAsset; - AssetTrackerRequestBus::BroadcastResult(memoryAsset, &AssetTrackerRequests::GetAsset, assetId); - - if (memoryAsset) + if (assetId.IsGraphValid()) { // Disconnect scene and asset editor buses - GraphCanvas::SceneNotificationBus::MultiHandler::BusDisconnect(memoryAsset->GetScriptCanvasId()); - GraphCanvas::AssetEditorNotificationBus::Event(ScriptCanvasEditor::AssetEditorId, &GraphCanvas::AssetEditorNotifications::OnGraphUnloaded, memoryAsset->GetGraphId()); + GraphCanvas::SceneNotificationBus::MultiHandler::BusDisconnect(assetId.Get()->GetScriptCanvasId()); + GraphCanvas::AssetEditorNotificationBus::Event(ScriptCanvasEditor::AssetEditorId + , &GraphCanvas::AssetEditorNotifications::OnGraphUnloaded, assetId.Get()->GetGraphCanvasGraphId()); } - AssetTrackerRequestBus::Broadcast(&AssetTrackerRequests::Close, assetId); - int tabIndex = m_tabBar->FindTab(assetId); QVariant tabdata = m_tabBar->tabData(tabIndex); if (tabdata.isValid()) { - auto tabAssetId = tabdata.value(); - SetActiveAsset(tabAssetId); + auto tabAssetId = tabdata.value(); + SetActiveAsset(tabAssetId.m_assetId); } - } - int MainWindow::CloseScriptCanvasAsset(const AZ::Data::AssetId& assetId) + int MainWindow::CloseScriptCanvasAsset(const ScriptCanvasEditor::SourceHandle& assetId) { int tabIndex = -1; if (IsTabOpen(assetId, tabIndex)) @@ -1425,35 +1282,32 @@ namespace ScriptCanvasEditor { if (createdAssetPair.second == requestingEntityId) { - return OpenScriptCanvasAssetId(createdAssetPair.first).IsSuccess(); + return OpenScriptCanvasAssetId(createdAssetPair.first, Tracker::ScriptCanvasFileState::NEW).IsSuccess(); } } - AZ::Data::AssetId previousAssetId = m_activeAssetId; + ScriptCanvasEditor::SourceHandle previousAssetId = m_activeGraph; OnFileNew(); - bool createdNewAsset = m_activeAssetId != previousAssetId; + bool createdNewAsset = !(m_activeGraph.AnyEquals(previousAssetId)); if (createdNewAsset) { - m_assetCreationRequests[m_activeAssetId] = requestingEntityId; + m_assetCreationRequests[m_activeGraph] = requestingEntityId; } if (m_isRestoringWorkspace) { - m_queuedFocusOverride = m_activeAssetId; + m_queuedFocusOverride = m_activeGraph; } return createdNewAsset; } - bool MainWindow::IsScriptCanvasAssetOpen(const AZ::Data::AssetId& assetId) const + bool MainWindow::IsScriptCanvasAssetOpen(const ScriptCanvasEditor::SourceHandle& assetId) const { - ScriptCanvasMemoryAsset::pointer memoryAsset; - AssetTrackerRequestBus::BroadcastResult(memoryAsset, &AssetTrackerRequests::GetAsset, assetId); - - return memoryAsset != nullptr; + return m_tabBar->FindTab(assetId) >= 0; } const CategoryInformation* MainWindow::FindNodePaletteCategoryInformation(AZStd::string_view categoryPath) const @@ -1466,107 +1320,59 @@ namespace ScriptCanvasEditor return m_nodePaletteModel.FindNodePaletteInformation(nodeType); } - void MainWindow::GetSuggestedFullFilenameToSaveAs(const AZ::Data::AssetId& assetId, AZStd::string& filePath, AZStd::string& fileFilter) - { - ScriptCanvasMemoryAsset::pointer memoryAsset; - AssetTrackerRequestBus::BroadcastResult(memoryAsset, &AssetTrackerRequests::GetAsset, assetId); - - AZStd::string assetPath; - if (memoryAsset) - { - assetPath = memoryAsset->GetAbsolutePath(); - - AZ::Data::AssetType assetType = memoryAsset->GetAsset().GetType(); - - ScriptCanvasAssetHandler* assetHandler; - AssetTrackerRequestBus::BroadcastResult(assetHandler, &AssetTrackerRequests::GetAssetHandlerForType, assetType); - AZ_Assert(assetHandler, "Asset type must have a valid asset handler"); - - AZ::EBusAggregateResults results; - AssetRegistryRequestBus::BroadcastResult(results, &AssetRegistryRequests::GetAssetDescription, assetType); - - ScriptCanvas::AssetDescription* description = nullptr; - for (auto item : results.values) - { - if (item->GetAssetType() == assetType) - { - description = item; - break; - } - } - - AZ_Assert(description, "Asset type must have a valid description"); - - fileFilter = description->GetFileFilterImpl(); - - AZStd::string tabName; - AssetTrackerRequestBus::BroadcastResult(tabName, &AssetTrackerRequests::GetTabName, assetId); - - assetPath = AZStd::string::format("%s/%s%s", description->GetSuggestedSavePathImpl(), tabName.c_str(), description->GetExtensionImpl()); - } - - AZStd::array resolvedPath; - AZ::IO::FileIOBase::GetInstance()->ResolvePath(assetPath.data(), resolvedPath.data(), resolvedPath.size()); - filePath = resolvedPath.data(); - } - void MainWindow::OpenFile(const char* fullPath) { - m_errorFilePath = fullPath; + auto tabIndex = m_tabBar->FindTabByPath(fullPath); + if (tabIndex.IsGraphValid()) + { + SetActiveAsset(tabIndex); + return; + } - // Let's find the source file on disk AZStd::string watchFolder; AZ::Data::AssetInfo assetInfo; bool sourceInfoFound{}; - AzToolsFramework::AssetSystemRequestBus::BroadcastResult(sourceInfoFound, &AzToolsFramework::AssetSystemRequestBus::Events::GetSourceInfoBySourcePath, fullPath, assetInfo, watchFolder); + AzToolsFramework::AssetSystemRequestBus::BroadcastResult + ( sourceInfoFound + , &AzToolsFramework::AssetSystemRequestBus::Events::GetSourceInfoBySourcePath, fullPath, assetInfo, watchFolder); - if (sourceInfoFound) + if (!sourceInfoFound) { - const Tracker::ScriptCanvasFileState& fileState = GetAssetFileState(assetInfo.m_assetId); - if (fileState != Tracker::ScriptCanvasFileState::NEW && fileState != Tracker::ScriptCanvasFileState::INVALID) - { - ScriptCanvasMemoryAsset::pointer memoryAsset; - AssetTrackerRequestBus::BroadcastResult(memoryAsset, &AssetTrackerRequests::GetAsset, assetInfo.m_assetId); + QMessageBox::warning(this, "Invalid Source Asset", QString("'%1' is not a valid asset path.").arg(fullPath), QMessageBox::Ok); + m_errorFilePath = fullPath; + AZ_Warning("ScriptCanvas", false, "Unable to open file as a ScriptCanvas graph: %s", fullPath); + return; + } - if (m_tabBar->FindTab(assetInfo.m_assetId) < 0) - { - CreateAssetTab(assetInfo.m_assetId); - } + AZ::Outcome outcome = LoadFromFile(fullPath); + if (!outcome.IsSuccess()) + { + QMessageBox::warning(this, "Invalid Source File" + , QString("'%1' failed to load properly.\nFailure: %2").arg(fullPath).arg(outcome.GetError().c_str()), QMessageBox::Ok); + m_errorFilePath = fullPath; + AZ_Warning("ScriptCanvas", false, "Unable to open file as a ScriptCanvas graph: %s. Failure: %s" + , fullPath, outcome.GetError().c_str()); + return; + } - SetActiveAsset(memoryAsset->GetFileAssetId()); - OpenNextFile(); - return; - } - - Callbacks::OnAssetReadyCallback onAssetReady = [this, assetInfo](ScriptCanvasMemoryAsset&) - { - ScriptCanvasMemoryAsset::pointer memoryAsset; - AssetTrackerRequestBus::BroadcastResult(memoryAsset, &AssetTrackerRequests::GetAsset, assetInfo.m_assetId); - - auto openOutcome = OpenScriptCanvasAsset(*memoryAsset); - if (openOutcome) - { - RunGraphValidation(false); - SetRecentAssetId(assetInfo.m_assetId); - } - else - { - AZ_Warning("Script Canvas", openOutcome, "%s", openOutcome.GetError().data()); - } - - OpenNextFile(); - }; - - // TODO-LS the assetInfo.m_assetType is always null for some reason, I know in this case we want default assets so it's ok to hardcode it - AssetTrackerRequestBus::Broadcast(&AssetTrackerRequests::Load, assetInfo.m_assetId, /*assetInfo.m_assetType*/azrtti_typeid(), onAssetReady); + m_errorFilePath.clear(); + auto activeGraph = ScriptCanvasEditor::SourceHandle(outcome.TakeValue(), assetInfo.m_assetId.m_guid, fullPath); + + auto openOutcome = OpenScriptCanvasAsset(activeGraph, Tracker::ScriptCanvasFileState::UNMODIFIED); + if (openOutcome) + { + RunGraphValidation(false); + SetActiveAsset(activeGraph); + SetRecentAssetId(activeGraph); } else { - QMessageBox::warning(this, "Invalid Source Asset", QString("'%1' is not a valid asset path.").arg(fullPath), QMessageBox::Ok); + AZ_Warning("Script Canvas", openOutcome, "%s", openOutcome.GetError().data()); } } - GraphCanvas::Endpoint MainWindow::HandleProposedConnection(const GraphCanvas::GraphId&, const GraphCanvas::ConnectionId&, const GraphCanvas::Endpoint& endpoint, const GraphCanvas::NodeId& nodeId, const QPoint& screenPoint) + GraphCanvas::Endpoint MainWindow::HandleProposedConnection(const GraphCanvas::GraphId&, const GraphCanvas::ConnectionId& + , const GraphCanvas::Endpoint& endpoint, const GraphCanvas::NodeId& nodeId, const QPoint& screenPoint) { GraphCanvas::Endpoint retVal; @@ -1671,10 +1477,39 @@ namespace ScriptCanvasEditor void MainWindow::OnFileNew() { - MakeNewFile(); + static int scriptCanvasEditorDefaultNewNameCount = 0; + + AZStd::string assetPath; + + for (;;) + { + AZStd::string newAssetName = AZStd::string::format(SourceDescription::GetAssetNamePattern() + , ++scriptCanvasEditorDefaultNewNameCount); + + AZStd::array assetRootArray; + if (!AZ::IO::FileIOBase::GetInstance()->ResolvePath(SourceDescription::GetSuggestedSavePath() + , assetRootArray.data(), assetRootArray.size())) + { + AZ_ErrorOnce("Script Canvas", false, "Unable to resolve @projectroot@ path"); + } + + AzFramework::StringFunc::Path::Join(assetRootArray.data(), (newAssetName + SourceDescription::GetFileExtension()).data(), assetPath); + AZ::Data::AssetInfo assetInfo; + + if (!AssetHelpers::GetAssetInfo(assetPath, assetInfo)) + { + break; + } + } + + auto createOutcome = CreateScriptCanvasAsset(assetPath); + if (!createOutcome.IsSuccess()) + { + AZ_Warning("Script Canvas", createOutcome, "%s", createOutcome.GetError().data()); + } } - int MainWindow::InsertTabForAsset(AZStd::string_view assetPath, AZ::Data::AssetId assetId, int tabIndex) + int MainWindow::InsertTabForAsset(AZStd::string_view assetPath, ScriptCanvasEditor::SourceHandle assetId, int tabIndex) { int outTabIndex = -1; @@ -1682,11 +1517,11 @@ namespace ScriptCanvasEditor // Insert tab block AZStd::string tabName; AzFramework::StringFunc::Path::GetFileName(assetPath.data(), tabName); - m_tabBar->InsertGraphTab(tabIndex, assetId); + m_tabBar->InsertGraphTab(tabIndex, assetId, Tracker::ScriptCanvasFileState::NEW); if (!IsTabOpen(assetId, outTabIndex)) { - AZ_Assert(false, AZStd::string::format("Unable to open new Script Canvas Asset with id %s in the Script Canvas Editor", AssetHelpers::AssetIdToString(assetId).c_str()).c_str()); + AZ_Assert(false, AZStd::string::format("Unable to open new Script Canvas Asset with id %s in the Script Canvas Editor", assetId.ToString().c_str()).c_str()); return -1; } @@ -1696,7 +1531,7 @@ namespace ScriptCanvasEditor return outTabIndex; } - void MainWindow::UpdateUndoCache(AZ::Data::AssetId) + void MainWindow::UpdateUndoCache(ScriptCanvasEditor::SourceHandle) { UndoCache* undoCache = nullptr; UndoRequestBus::EventResult(undoCache, GetActiveScriptCanvasId(), &UndoRequests::GetSceneUndoCache); @@ -1706,78 +1541,88 @@ namespace ScriptCanvasEditor } } - AZ::Outcome MainWindow::CreateScriptCanvasAsset(AZStd::string_view assetPath, AZ::Data::AssetType assetType, int tabIndex) + AZ::Outcome MainWindow::CreateScriptCanvasAsset(AZStd::string_view assetPath, int tabIndex) { int outTabIndex = -1; - AZ::Data::AssetId newAssetId; - auto onAssetCreated = [this, assetPath, tabIndex, &outTabIndex](ScriptCanvasMemoryAsset& asset) + ScriptCanvas::DataPtr graph = Graph::Create(); + AZ::Uuid assetId = AZ::Uuid::CreateRandom(); + ScriptCanvasEditor::SourceHandle handle = ScriptCanvasEditor::SourceHandle(graph, assetId, assetPath); + + outTabIndex = InsertTabForAsset(assetPath, handle, tabIndex); + + if (outTabIndex == -1) { - const AZ::Data::AssetId& assetId = asset.GetId(); + return AZ::Failure(AZStd::string::format("Script Canvas Asset %.*s is not open in a tab" + , static_cast(assetPath.size()), assetPath.data())); + } - outTabIndex = InsertTabForAsset(assetPath, assetId, tabIndex); + SetActiveAsset(handle); + PushPreventUndoStateUpdate(); - SetActiveAsset(assetId); + AZ::EntityId scriptCanvasEntityId = graph->GetGraph()->GetScriptCanvasId(); + GraphCanvas::SceneNotificationBus::MultiHandler::BusDisconnect(scriptCanvasEntityId); + AZ::EntityId graphCanvasGraphId = GetGraphCanvasGraphId(scriptCanvasEntityId); - UpdateScriptCanvasAsset(asset.GetAsset()); + GraphCanvas::AssetEditorNotificationBus::Event(ScriptCanvasEditor::AssetEditorId + , &GraphCanvas::AssetEditorNotifications::OnGraphRefreshed, graphCanvasGraphId, graphCanvasGraphId); - AZ::EntityId scriptCanvasEntityId; - AssetTrackerRequestBus::BroadcastResult(scriptCanvasEntityId, &AssetTrackerRequests::GetScriptCanvasId, assetId); + if (IsTabOpen(handle, tabIndex)) + { + AZStd::string tabName; + AzFramework::StringFunc::Path::GetFileName(assetPath.data(), tabName); + m_tabBar->setTabToolTip(tabIndex, assetPath.data()); + m_tabBar->SetTabText(tabIndex, tabName.c_str(), Tracker::ScriptCanvasFileState::NEW); + } - GraphCanvas::GraphId graphCanvasGraphId = GetGraphCanvasGraphId(scriptCanvasEntityId); - GraphCanvas::AssetEditorNotificationBus::Event(ScriptCanvasEditor::AssetEditorId, &GraphCanvas::AssetEditorNotifications::OnGraphLoaded, graphCanvasGraphId); + if (graphCanvasGraphId.IsValid()) + { + GraphCanvas::SceneNotificationBus::MultiHandler::BusConnect(graphCanvasGraphId); + GraphCanvas::SceneMimeDelegateRequestBus::Event(graphCanvasGraphId, &GraphCanvas::SceneMimeDelegateRequests::AddDelegate, m_entityMimeDelegateId); - }; - AssetTrackerRequestBus::BroadcastResult(newAssetId, &AssetTrackerRequests::Create, assetPath, assetType, onAssetCreated); + GraphCanvas::SceneRequestBus::Event(graphCanvasGraphId, &GraphCanvas::SceneRequests::SetMimeType, Widget::NodePaletteDockWidget::GetMimeType()); + GraphCanvas::SceneMemberNotificationBus::Event(graphCanvasGraphId, &GraphCanvas::SceneMemberNotifications::OnSceneReady); + } + + if (IsTabOpen(handle, outTabIndex)) + { + RefreshActiveAsset(); + } + + PopPreventUndoStateUpdate(); + + + GraphCanvas::AssetEditorNotificationBus::Event(ScriptCanvasEditor::AssetEditorId + , &GraphCanvas::AssetEditorNotifications::OnGraphLoaded, graphCanvasGraphId); return AZ::Success(outTabIndex); } - bool MainWindow::OnFileSave(const Callbacks::OnSave& saveCB) + bool MainWindow::OnFileSave() { - return SaveAssetImpl(m_activeAssetId, saveCB); + if (auto metaData = m_tabBar->GetTabData(m_activeGraph); metaData && metaData->m_fileState == Tracker::ScriptCanvasFileState::NEW) + { + return SaveAssetImpl(m_activeGraph, Save::As); + } + else + { + return SaveAssetImpl(m_activeGraph, Save::InPlace); + } } - bool MainWindow::OnFileSaveAs(const Callbacks::OnSave& saveCB) + bool MainWindow::OnFileSaveAs() { - return SaveAssetAsImpl(m_activeAssetId, saveCB); + return SaveAssetImpl(m_activeGraph, Save::As); } - bool MainWindow::SaveAssetImpl(const AZ::Data::AssetId& assetId, const Callbacks::OnSave& saveCB) + bool MainWindow::SaveAssetImpl(const ScriptCanvasEditor::SourceHandle& inMemoryAssetId, Save save) { - if (!assetId.IsValid()) + if (!inMemoryAssetId.IsGraphValid()) { return false; } - // TODO: Set graph read-only to prevent edits during save - - bool saveSuccessful = false; - - Tracker::ScriptCanvasFileState fileState = GetAssetFileState(assetId); - - if (fileState == Tracker::ScriptCanvasFileState::NEW) - { - saveSuccessful = SaveAssetAsImpl(assetId, saveCB); - } - else if (fileState == Tracker::ScriptCanvasFileState::MODIFIED - || fileState == Tracker::ScriptCanvasFileState::SOURCE_REMOVED) - { - SaveAsset(assetId, saveCB); - saveSuccessful = true; - } - - return saveSuccessful; - } - - bool MainWindow::SaveAssetAsImpl(const AZ::Data::AssetId& inMemoryAssetId, const Callbacks::OnSave& saveCB) - { - if (!inMemoryAssetId.IsValid()) - { - return false; - } - - if (m_activeAssetId != inMemoryAssetId) + if (!m_activeGraph.AnyEquals(inMemoryAssetId)) { OnChangeActiveGraphTab(inMemoryAssetId); } @@ -1786,14 +1631,31 @@ namespace ScriptCanvasEditor AZStd::string suggestedFilename; AZStd::string suggestedFileFilter; - GetSuggestedFullFilenameToSaveAs(inMemoryAssetId, suggestedFilename, suggestedFileFilter); - - EnsureSaveDestinationDirectory(suggestedFilename); - - QString filter = suggestedFileFilter.c_str(); - QString selectedFile; - bool isValidFileName = false; + + if (save == Save::InPlace) + { + isValidFileName = true; + suggestedFileFilter = SourceDescription::GetFileExtension(); + suggestedFilename = inMemoryAssetId.Path().c_str(); + } + else + { + suggestedFileFilter = SourceDescription::GetFileExtension(); + + if (inMemoryAssetId.Path().empty()) + { + suggestedFilename = SourceDescription::GetSuggestedSavePath(); + } + else + { + suggestedFilename = inMemoryAssetId.Path().c_str(); + } + } + + EnsureSaveDestinationDirectory(suggestedFilename); + QString filter = suggestedFileFilter.c_str(); + QString selectedFile = suggestedFilename.c_str(); while (!isValidFileName) { @@ -1804,6 +1666,12 @@ namespace ScriptCanvasEditor if (!selectedFile.isEmpty()) { AZStd::string filePath = selectedFile.toUtf8().data(); + + if (!AZ::StringFunc::EndsWith(filePath, SourceDescription::GetFileExtension(), false)) + { + filePath += SourceDescription::GetFileExtension(); + } + AZStd::string fileName; // Verify that the path is within the project @@ -1813,11 +1681,7 @@ namespace ScriptCanvasEditor AZ::IO::FileIOBase::GetInstance()->ResolvePath("@engroot@", assetRootChar.data(), assetRootChar.size()); assetRoot = assetRootChar.data(); - /* if (!AZ::StringFunc::StartsWith(filePath, assetRoot)) - { - QMessageBox::information(this, "Unable to Save", AZStd::string::format("You must select a path within the current project\n\n%s", assetRoot.c_str()).c_str()); - } - else*/ if (AzFramework::StringFunc::Path::GetFileName(filePath.c_str(), fileName)) + if (AzFramework::StringFunc::Path::GetFileName(filePath.c_str(), fileName)) { isValidFileName = !(fileName.empty()); } @@ -1825,7 +1689,6 @@ namespace ScriptCanvasEditor { QMessageBox::information(this, "Unable to Save", "File name cannot be empty"); } - } else { @@ -1837,128 +1700,134 @@ namespace ScriptCanvasEditor { AZStd::string internalStringFile = selectedFile.toUtf8().data(); + + if (!AZ::StringFunc::EndsWith(internalStringFile, SourceDescription::GetFileExtension(), false)) + { + internalStringFile += SourceDescription::GetFileExtension(); + } + if (!AssetHelpers::IsValidSourceFile(internalStringFile, GetActiveScriptCanvasId())) { QMessageBox::warning(this, "Unable to Save", QString("File\n'%1'\n\nDoes not match the asset type of the current Graph.").arg(selectedFile)); return false; } - SaveNewAsset(internalStringFile, inMemoryAssetId, saveCB); - + SaveAs(internalStringFile, inMemoryAssetId); m_newlySavedFile = internalStringFile; - // Forcing the file add here, since we are creating a new file AddRecentFile(m_newlySavedFile.c_str()); - return true; } return false; } - - void MainWindow::OnSaveCallback(bool saveSuccess, AZ::Data::AssetPtr fileAsset, AZ::Data::AssetId previousFileAssetId) + + void MainWindow::OnSaveCallBack(const VersionExplorer::FileSaveResult& result) { - ScriptCanvasMemoryAsset::pointer memoryAsset; - AZStd::string tabName = m_tabBar->tabText(m_tabBar->currentIndex()).toUtf8().data(); - - int saveTabIndex = m_tabBar->currentIndex(); + const bool saveSuccess = result.fileSaveError.empty(); + auto completeDescription = CompleteDescription(m_fileSaver->GetSource()); + auto memoryAsset = completeDescription ? *completeDescription : m_fileSaver->GetSource(); + int saveTabIndex = m_tabBar->FindTab(memoryAsset); + AZStd::string tabName = saveTabIndex >= 0 ? m_tabBar->tabText(saveTabIndex).toUtf8().data() : ""; if (saveSuccess) { - AssetTrackerRequestBus::BroadcastResult(memoryAsset, &AssetTrackerRequests::GetAsset, fileAsset->GetId()); - AZ_Assert(memoryAsset, "At this point we must have a MemoryAsset"); + ScriptCanvasEditor::SourceHandle& fileAssetId = memoryAsset; + int currentTabIndex = m_tabBar->currentIndex(); - // Update the editor with the new information about this asset. - const AZ::Data::AssetId& fileAssetId = memoryAsset->GetFileAssetId(); + AZ::Data::AssetId oldId = fileAssetId.Id(); + AZ::Data::AssetInfo assetInfo; + assetInfo.m_assetId = fileAssetId.Id(); + AZ_VerifyWarning("ScriptCanvas", AssetHelpers::GetAssetInfo(fileAssetId.Path().c_str(), assetInfo) + , "Failed to find asset info for source file just saved: %s", fileAssetId.Path().c_str()); - saveTabIndex = m_tabBar->FindTab(fileAssetId); + const bool assetIdHasChanged = assetInfo.m_assetId.m_guid != fileAssetId.Id(); + fileAssetId = SourceHandle(fileAssetId, assetInfo.m_assetId.m_guid, fileAssetId.Path()); + // check for saving a graph over another graph with an open tab + for (;;) + { + auto graph = fileAssetId.Get(); + int tabIndexByGraph = m_tabBar->FindTab(graph); + if (tabIndexByGraph == -1) + { + AZ_Warning("ScriptCanvas", false, "unable to find graph just saved"); + break; + } + + int saveOverMatch = m_tabBar->FindSaveOverMatch(fileAssetId); + if (saveOverMatch < 0) + { + saveTabIndex = tabIndexByGraph; + currentTabIndex = m_tabBar->currentIndex(); + break; + } + + m_tabBar->CloseTab(saveOverMatch); + } + + // this path is questionable, this is a save request that is not the current graph // We've saved as over a new graph, so we need to close the old one. - if (saveTabIndex != m_tabBar->currentIndex()) + if (saveTabIndex != currentTabIndex) { // Invalidate the file asset id so we don't delete trigger the asset flow. - m_tabBar->setTabData(saveTabIndex, QVariant::fromValue(AZ::Data::AssetId())); - + m_tabBar->setTabData(saveTabIndex, QVariant::fromValue(Widget::GraphTabMetadata())); m_tabBar->CloseTab(saveTabIndex); saveTabIndex = -1; } - if (saveTabIndex < 0) + AzFramework::StringFunc::Path::GetFileName(memoryAsset.Path().c_str(), tabName); + + if (assetIdHasChanged) { - // This asset had not been saved yet, we will need to use the in memory asset Id to get the index. - saveTabIndex = m_tabBar->FindTab(memoryAsset->GetId()); + auto entity = memoryAsset.Get()->GetEntity(); - if (saveTabIndex < 0) - { - // Finally, we may have Saved-As and we need the previous file asset Id to find the tab - saveTabIndex = m_tabBar->FindTab(previousFileAssetId); - } - } - - AzFramework::StringFunc::Path::GetFileName(memoryAsset->GetAbsolutePath().c_str(), tabName); - - // Update the tab's assetId to the file asset Id (necessary when saving a new asset) - m_tabBar->ConfigureTab(saveTabIndex, fileAssetId, tabName); - - GeneralAssetNotificationBus::Event(memoryAsset->GetId(), &GeneralAssetNotifications::OnAssetVisualized); - - auto requestorIter = m_assetCreationRequests.find(fileAsset->GetId()); - - if (requestorIter != m_assetCreationRequests.end()) - { - auto editorComponents = AZ::EntityUtils::FindDerivedComponents(requestorIter->second.first); + auto editorComponents = AZ::EntityUtils::FindDerivedComponents(entity); if (editorComponents.empty()) { - auto firstRequestBus = EditorScriptCanvasComponentRequestBus::FindFirstHandler(requestorIter->second.first); - - if (firstRequestBus) + if (auto firstRequestBus = EditorScriptCanvasComponentRequestBus::FindFirstHandler(entity->GetId())) { - firstRequestBus->SetAssetId(fileAsset->GetId()); + firstRequestBus->SetAssetId(memoryAsset.Describe()); } } else { for (auto editorComponent : editorComponents) { - if (editorComponent->GetId() == requestorIter->second.second) + if (editorComponent->GetAssetId() == oldId) { - editorComponent->SetAssetId(fileAsset->GetId()); + editorComponent->SetAssetId(memoryAsset.Describe()); break; } } } - - m_assetCreationRequests.erase(requestorIter); - } + } // Soft switch the asset id here. We'll do a double scene switch down below to actually switch the active assetid - m_activeAssetId = fileAssetId; - } - else - { - // Use the previous memory asset to find what we had setup as our display - AssetTrackerRequestBus::BroadcastResult(memoryAsset, &AssetTrackerRequests::GetAsset, m_activeAssetId); + m_activeGraph = fileAssetId; - // Drop off our file modifier status for our display name when we fail to save. - if (tabName.at(tabName.size() -1) == '*') + if (tabName.at(tabName.size() - 1) == '*' || tabName.at(tabName.size() - 1) == '^') { tabName = tabName.substr(0, tabName.size() - 2); } + + auto tabData = m_tabBar->GetTabData(saveTabIndex); + tabData->m_fileState = Tracker::ScriptCanvasFileState::UNMODIFIED; + tabData->m_assetId = fileAssetId; + m_tabBar->SetTabData(*tabData, saveTabIndex); + m_tabBar->SetTabText(saveTabIndex, tabName.c_str()); + } + else + { + const auto failureMessage = AZStd::string::format("Failed to save %s: %s", tabName.c_str(), result.fileSaveError.c_str()); + QMessageBox::critical(this, QString(), QObject::tr(failureMessage.data())); } if (m_tabBar->currentIndex() != saveTabIndex) { m_tabBar->setCurrentIndex(saveTabIndex); } - else - { - // Something weird happens with our saving. Where we are relying on these scene changes being called. - AZ::Data::AssetId previousAssetId = m_activeAssetId; - - OnChangeActiveGraphTab(AZ::Data::AssetId()); - OnChangeActiveGraphTab(previousAssetId); - } UpdateAssignToSelectionState(); @@ -1967,91 +1836,38 @@ namespace ScriptCanvasEditor const bool displayAsNotification = true; RunGraphValidation(displayAsNotification); - // This is called during saving, so the is scaving flag is always true Need to update the state after this callback is complete. So schedule for next system tick. - AddSystemTickAction(SystemTickActionFlag::UpdateSaveMenuState); - - if (m_closeCurrentGraphAfterSave) - { - AddSystemTickAction(SystemTickActionFlag::CloseCurrentGraph); - } - m_closeCurrentGraphAfterSave = false; EnableAssetView(memoryAsset); + UpdateSaveState(true); UnblockCloseRequests(); + m_fileSaver.reset(); } - bool MainWindow::ActivateAndSaveAsset(const AZ::Data::AssetId& unsavedAssetId, const Callbacks::OnSave& saveCB) + bool MainWindow::ActivateAndSaveAsset(const ScriptCanvasEditor::SourceHandle& unsavedAssetId) { SetActiveAsset(unsavedAssetId); - return OnFileSave(saveCB); + return OnFileSave(); } - void MainWindow::SaveAsset(AZ::Data::AssetId assetId, const Callbacks::OnSave& onSave) + void MainWindow::SaveAs(AZStd::string_view path, ScriptCanvasEditor::SourceHandle inMemoryAssetId) { - PrepareAssetForSave(assetId); + DisableAssetView(inMemoryAssetId); + UpdateSaveState(false); + m_fileSaver = AZStd::make_unique + ( nullptr + , [this](const VersionExplorer::FileSaveResult& fileSaveResult) { OnSaveCallBack(fileSaveResult); }); - auto onSaveCallback = [this, onSave](bool saveSuccess, AZ::Data::AssetPtr asset, AZ::Data::AssetId previousAssetId) - { - OnSaveCallback(saveSuccess, asset, previousAssetId); - if (onSave) - { - AZStd::invoke(onSave, saveSuccess, asset, previousAssetId); - } - }; + ScriptCanvasEditor::SourceHandle newLocation(inMemoryAssetId, AZ::Uuid::CreateNull(), path); + MarkRecentSave(newLocation); + m_fileSaver->Save(newLocation); - AssetTrackerRequestBus::Broadcast(&AssetTrackerRequests::Save, assetId, onSaveCallback); - UpdateSaveState(); - - ScriptCanvasMemoryAsset::pointer memoryAsset; - AssetTrackerRequestBus::BroadcastResult(memoryAsset, &AssetTrackerRequests::GetAsset, m_activeAssetId); - - // Disable the current view if we are saving. - if (memoryAsset) - { - DisableAssetView(memoryAsset); - } - - BlockCloseRequests(); - } - - void MainWindow::SaveNewAsset(AZStd::string_view path, AZ::Data::AssetId inMemoryAssetId, const Callbacks::OnSave& onSave) - { - PrepareAssetForSave(inMemoryAssetId); - - auto onSaveCallback = [this, onSave](bool saveSuccess, AZ::Data::AssetPtr asset, AZ::Data::AssetId previousAssetId) - { - OnSaveCallback(saveSuccess, asset, previousAssetId); - if (onSave) - { - AZStd::invoke(onSave, saveSuccess, asset, previousAssetId); - } - }; - AssetTrackerRequestBus::Broadcast(&AssetTrackerRequests::SaveAs, inMemoryAssetId, path, onSaveCallback); - - UpdateSaveState(); - - ScriptCanvasMemoryAsset::pointer memoryAsset; - AssetTrackerRequestBus::BroadcastResult(memoryAsset, &AssetTrackerRequests::GetAsset, inMemoryAssetId); - - // Disable the current view if we are saving. - if (memoryAsset) - { - DisableAssetView(memoryAsset); - } - - BlockCloseRequests(); + BlockCloseRequests(); } void MainWindow::OnFileOpen() { - AZ::SerializeContext* serializeContext = nullptr; - EBUS_EVENT_RESULT(serializeContext, AZ::ComponentApplicationBus, GetSerializeContext); - AZ_Assert(serializeContext, "Failed to acquire application serialize context."); - - AZ::Data::AssetId openId = ReadRecentAssetId(); - AZStd::string assetRoot; { AZStd::array assetRootChar; @@ -2059,33 +1875,10 @@ namespace ScriptCanvasEditor assetRoot = assetRootChar.data(); } - AZStd::string assetPath; - AZ::Data::AssetCatalogRequestBus::BroadcastResult(assetPath, &AZ::Data::AssetCatalogRequests::GetAssetPathById, openId); - if (!assetPath.empty()) - { - assetPath = AZStd::string::format("%s/%s", assetRoot.c_str(), assetPath.c_str()); - } - - if (!openId.IsValid() || !QFile::exists(assetPath.c_str())) - { - assetPath = AZStd::string::format("%s/scriptcanvas", assetRoot.c_str()); - } - assetPath = AZStd::string::format("%s/scriptcanvas", assetRoot.c_str()); - - AZ::EBusAggregateResults> fileFilters; - AssetRegistryRequestBus::BroadcastResult(fileFilters, &AssetRegistryRequests::GetAssetHandlerFileFilters); - + AZStd::string assetPath = AZStd::string::format("%s/scriptcanvas", assetRoot.c_str()); QString filter; - AZStd::set filterSet; - auto aggregateFilters = fileFilters.values; - for (auto aggregateFilters2 : fileFilters.values) - { - for (const AZStd::string& fileFilter : aggregateFilters2) - { - filterSet.insert(fileFilter); - } - } + AZStd::set filterSet { ".scriptcanvas" }; QStringList nameFilters; @@ -2452,31 +2245,6 @@ namespace ScriptCanvasEditor GraphCanvas::ViewRequestBus::Event(viewId, &GraphCanvas::ViewRequests::CenterOnEndOfChain); } - void MainWindow::UpdateWorkspaceStatus(const ScriptCanvasMemoryAsset& memoryAsset) - { - AZ::Data::AssetId fileAssetId = memoryAsset.GetFileAssetId(); - - size_t eraseCount = m_loadingAssets.erase(fileAssetId); - - if (eraseCount > 0) - { - AZStd::string rootFilePath; - AZ::Data::AssetInfo assetInfo = AssetHelpers::GetAssetInfo(fileAssetId, rootFilePath); - - // Don't want to use the join since I don't want the normalized path - if (!rootFilePath.empty() && !assetInfo.m_relativePath.empty()) - { - eraseCount = m_loadingWorkspaceAssets.erase(fileAssetId); - - if (eraseCount == 0) - { - AZStd::string fullPath = AZStd::string::format("%s/%s", rootFilePath.c_str(), assetInfo.m_relativePath.c_str()); - AddRecentFile(fullPath.c_str()); - } - } - } - } - void MainWindow::OnCanUndoChanged(bool canUndo) { ui->action_Undo->setEnabled(canUndo); @@ -2517,7 +2285,7 @@ namespace ScriptCanvasEditor { if (m_allowAutoSave) { - const Tracker::ScriptCanvasFileState& fileState = GetAssetFileState(m_activeAssetId); + const Tracker::ScriptCanvasFileState& fileState = GetAssetFileState(m_activeGraph); if (fileState != Tracker::ScriptCanvasFileState::INVALID && fileState != Tracker::ScriptCanvasFileState::NEW) { OnFileSaveCaller(); @@ -2526,52 +2294,57 @@ namespace ScriptCanvasEditor } //! GeneralRequestBus - void MainWindow::OnChangeActiveGraphTab(AZ::Data::AssetId assetId) + void MainWindow::OnChangeActiveGraphTab(ScriptCanvasEditor::SourceHandle assetId) { SetActiveAsset(assetId); } AZ::EntityId MainWindow::GetActiveGraphCanvasGraphId() const { - AZ::EntityId graphId; - AssetTrackerRequestBus::BroadcastResult(graphId, &AssetTrackerRequests::GetGraphId, m_activeAssetId); + AZ::EntityId graphId{}; + + if (m_activeGraph.IsGraphValid()) + { + EditorGraphRequestBus::EventResult + ( graphId, m_activeGraph.Get()->GetScriptCanvasId(), &EditorGraphRequests::GetGraphCanvasGraphId); + } + return graphId; } ScriptCanvas::ScriptCanvasId MainWindow::GetActiveScriptCanvasId() const { - ScriptCanvas::ScriptCanvasId sceneId; - AssetTrackerRequestBus::BroadcastResult(sceneId, &AssetTrackerRequests::GetScriptCanvasId, m_activeAssetId); - return sceneId; + return FindScriptCanvasIdByAssetId(m_activeGraph); } GraphCanvas::GraphId MainWindow::GetGraphCanvasGraphId(const ScriptCanvas::ScriptCanvasId& scriptCanvasId) const { - AZ::EntityId graphCanvasId; - AssetTrackerRequestBus::BroadcastResult(graphCanvasId, &AssetTrackerRequests::GetGraphCanvasId, scriptCanvasId); - - return graphCanvasId; - } - - GraphCanvas::GraphId MainWindow::FindGraphCanvasGraphIdByAssetId(const AZ::Data::AssetId& assetId) const - { - AZ::EntityId graphId; - AssetTrackerRequestBus::BroadcastResult(graphId, &AssetTrackerRequests::GetGraphId, assetId); + AZ::EntityId graphId{}; + EditorGraphRequestBus::EventResult(graphId, scriptCanvasId, &EditorGraphRequests::GetGraphCanvasGraphId); return graphId; } - ScriptCanvas::ScriptCanvasId MainWindow::FindScriptCanvasIdByAssetId(const AZ::Data::AssetId& assetId) const + GraphCanvas::GraphId MainWindow::FindGraphCanvasGraphIdByAssetId(const ScriptCanvasEditor::SourceHandle& assetId) const { - ScriptCanvas::ScriptCanvasId scriptCanvasId; - AssetTrackerRequestBus::BroadcastResult(scriptCanvasId, &AssetTrackerRequests::GetScriptCanvasId, assetId); - return scriptCanvasId; + AZ::EntityId graphId{}; + + if (assetId.IsGraphValid()) + { + EditorGraphRequestBus::EventResult + ( graphId, assetId.Get()->GetScriptCanvasId(), &EditorGraphRequests::GetGraphCanvasGraphId); + } + + return graphId; + } + + ScriptCanvas::ScriptCanvasId MainWindow::FindScriptCanvasIdByAssetId(const ScriptCanvasEditor::SourceHandle& assetId) const + { + return assetId.IsGraphValid() ? assetId.Get()->GetScriptCanvasId() : ScriptCanvas::ScriptCanvasId{}; } ScriptCanvas::ScriptCanvasId MainWindow::GetScriptCanvasId(const GraphCanvas::GraphId& graphCanvasGraphId) const { - ScriptCanvas::ScriptCanvasId scriptCanvasId; - AssetTrackerRequestBus::BroadcastResult(scriptCanvasId, &AssetTrackerRequests::GetScriptCanvasIdFromGraphId, graphCanvasGraphId); - return scriptCanvasId; + return m_tabBar->FindScriptCanvasIdFromGraphCanvasId(graphCanvasGraphId); } bool MainWindow::IsInUndoRedo(const AZ::EntityId& graphCanvasGraphId) const @@ -2600,15 +2373,15 @@ namespace ScriptCanvasEditor return isActive; } - QVariant MainWindow::GetTabData(const AZ::Data::AssetId& assetId) + QVariant MainWindow::GetTabData(const ScriptCanvasEditor::SourceHandle& assetId) { for (int tabIndex = 0; tabIndex < m_tabBar->count(); ++tabIndex) { QVariant tabdata = m_tabBar->tabData(tabIndex); if (tabdata.isValid()) { - auto tabAssetId = tabdata.value(); - if (tabAssetId == assetId) + auto tabAssetId = tabdata.value(); + if (tabAssetId.m_assetId.AnyEquals(assetId)) { return tabdata; } @@ -2617,7 +2390,7 @@ namespace ScriptCanvasEditor return QVariant(); } - bool MainWindow::IsTabOpen(const AZ::Data::AssetId& fileAssetId, int& outTabIndex) const + bool MainWindow::IsTabOpen(const ScriptCanvasEditor::SourceHandle& fileAssetId, int& outTabIndex) const { int tabIndex = m_tabBar->FindTab(fileAssetId); if (-1 != tabIndex) @@ -2628,27 +2401,22 @@ namespace ScriptCanvasEditor return false; } - void MainWindow::ReconnectSceneBuses(AZ::Data::AssetId previousAssetId, AZ::Data::AssetId nextAssetId) + void MainWindow::ReconnectSceneBuses(ScriptCanvasEditor::SourceHandle previousAsset, ScriptCanvasEditor::SourceHandle nextAsset) { - ScriptCanvasMemoryAsset::pointer previousAsset; - AssetTrackerRequestBus::BroadcastResult(previousAsset, &AssetTrackerRequests::GetAsset, previousAssetId); - - ScriptCanvasMemoryAsset::pointer nextAsset; - AssetTrackerRequestBus::BroadcastResult(nextAsset, &AssetTrackerRequests::GetAsset, nextAssetId); - // Disconnect previous asset AZ::EntityId previousScriptCanvasSceneId; - if (previousAsset) - { - previousScriptCanvasSceneId = previousAsset->GetScriptCanvasId(); + if (previousAsset.IsGraphValid()) + { + previousScriptCanvasSceneId = previousAsset.Get()->GetScriptCanvasId(); GraphCanvas::SceneNotificationBus::MultiHandler::BusDisconnect(previousScriptCanvasSceneId); } AZ::EntityId nextAssetGraphCanvasId; - if (nextAsset) + if (nextAsset.IsGraphValid()) { // Connect the next asset - nextAssetGraphCanvasId = nextAsset->GetGraphId(); + EditorGraphRequestBus::EventResult(nextAssetGraphCanvasId, nextAsset.Get()->GetScriptCanvasId(), &EditorGraphRequests::GetGraphCanvasGraphId); + if (nextAssetGraphCanvasId.IsValid()) { GraphCanvas::SceneNotificationBus::MultiHandler::BusConnect(nextAssetGraphCanvasId); @@ -2661,19 +2429,18 @@ namespace ScriptCanvasEditor // Notify about the graph refresh GraphCanvas::AssetEditorNotificationBus::Event(ScriptCanvasEditor::AssetEditorId, &GraphCanvas::AssetEditorNotifications::OnGraphRefreshed, previousScriptCanvasSceneId, nextAssetGraphCanvasId); - } - void MainWindow::SetActiveAsset(const AZ::Data::AssetId& fileAssetId) + void MainWindow::SetActiveAsset(const ScriptCanvasEditor::SourceHandle& fileAssetId) { - if (m_activeAssetId == fileAssetId) + if (m_activeGraph.AnyEquals(fileAssetId)) { return; } - AssetHelpers::PrintInfo("SetActiveAsset : from: %s to %s", AssetHelpers::AssetIdToString(m_activeAssetId).c_str(), AssetHelpers::AssetIdToString(fileAssetId).c_str()); + AssetHelpers::PrintInfo("SetActiveAsset : from: %s to %s", m_activeGraph.ToString().c_str(), fileAssetId.ToString().c_str()); - if (fileAssetId.IsValid()) + if (fileAssetId.IsGraphValid()) { if (m_tabBar->FindTab(fileAssetId) >= 0) { @@ -2686,87 +2453,54 @@ namespace ScriptCanvasEditor } } - if (m_activeAssetId.IsValid()) + if (m_activeGraph.IsGraphValid()) { - ScriptCanvasMemoryAsset::pointer memoryAsset; - AssetTrackerRequestBus::BroadcastResult(memoryAsset, &AssetTrackerRequests::GetAsset, m_activeAssetId); - // If we are saving the asset, the Id may have changed from the in-memory to the file asset Id, in that case, // there's no need to hide the view or remove the widget - if (memoryAsset && memoryAsset->GetView()) + auto oldTab = m_tabBar->FindTab(m_activeGraph); + if (auto view = m_tabBar->ModTabView(oldTab)) { - memoryAsset->GetView()->hide(); - m_layout->removeWidget(memoryAsset->GetView()); + view->hide(); + m_layout->removeWidget(view); + m_tabBar->ClearTabView(oldTab); } } - if (fileAssetId.IsValid()) + if (fileAssetId.IsGraphValid()) { - AZ::Data::AssetId previousAssetId = m_activeAssetId; - - m_activeAssetId = fileAssetId; + ScriptCanvasEditor::SourceHandle previousAssetId = m_activeGraph; + m_activeGraph = fileAssetId; RefreshActiveAsset(); - - ReconnectSceneBuses(previousAssetId, m_activeAssetId); + ReconnectSceneBuses(previousAssetId, m_activeGraph); } else { - AZ::Data::AssetId previousAssetId = m_activeAssetId; - - m_activeAssetId.SetInvalid(); + ScriptCanvasEditor::SourceHandle previousAssetId = m_activeGraph; + m_activeGraph.Clear(); m_emptyCanvas->show(); - - ReconnectSceneBuses(previousAssetId, m_activeAssetId); - - SignalActiveSceneChanged(AZ::Data::AssetId()); + ReconnectSceneBuses(previousAssetId, m_activeGraph); + SignalActiveSceneChanged(ScriptCanvasEditor::SourceHandle()); } UpdateUndoCache(fileAssetId); - - RefreshSelection(); + RefreshSelection(); } void MainWindow::RefreshActiveAsset() { - if (m_activeAssetId.IsValid()) + if (m_activeGraph.IsGraphValid()) { - AssetHelpers::PrintInfo("RefreshActiveAsset : m_activeAssetId (%s)", AssetHelpers::AssetIdToString(m_activeAssetId).c_str()); - - ScriptCanvasMemoryAsset::pointer memoryAsset; - AssetTrackerRequestBus::BroadcastResult(memoryAsset, &AssetTrackerRequests::GetAsset, m_activeAssetId); - - if (memoryAsset) + AssetHelpers::PrintInfo("RefreshActiveAsset : m_activeGraph (%s)", m_activeGraph.ToString().c_str()); + if (auto view = m_tabBar->ModOrCreateTabView(m_tabBar->FindTab(m_activeGraph))) { - AZ::EntityId sceneEntityId = memoryAsset->GetScriptCanvasId(); - - const auto& scriptCanvasAsset = memoryAsset->GetAsset(); - - if (scriptCanvasAsset.IsReady() && scriptCanvasAsset.Get()->GetScriptCanvasEntity()->GetState() == AZ::Entity::State::Active) - { - if (!memoryAsset->GetView()) - { - memoryAsset->CreateView(m_tabBar); - } - - auto view = memoryAsset->GetView(); - AZ_Assert(view, "Asset should have a view"); - if (view) - { - AssetHelpers::PrintInfo("RefreshActiveAsset : m_activeAssetId (%s)", AssetHelpers::AssetIdToString(m_activeAssetId).c_str()); - - view->ShowScene(sceneEntityId); - m_layout->addWidget(view); - view->show(); - - m_emptyCanvas->hide(); - } - - SignalActiveSceneChanged(m_activeAssetId); - } + view->ShowScene(m_activeGraph.Get()->GetScriptCanvasId()); + m_layout->addWidget(view); + view->show(); + m_emptyCanvas->hide(); + SignalActiveSceneChanged(m_activeGraph); } else { - // If we couldn't load a memory asset for our active asset. Just set ourselves to invalid. SetActiveAsset({}); } } @@ -2775,15 +2509,6 @@ namespace ScriptCanvasEditor void MainWindow::Clear() { m_tabBar->CloseAllTabs(); - - AssetTrackerRequests::AssetList assets; - AssetTrackerRequestBus::BroadcastResult(assets, &AssetTrackerRequests::GetAssets); - - for (auto asset : assets) - { - RemoveScriptCanvasAsset(asset->GetAsset().GetId()); - } - SetActiveAsset({}); } @@ -2792,61 +2517,22 @@ namespace ScriptCanvasEditor QVariant tabdata = m_tabBar->tabData(index); if (tabdata.isValid()) { - auto fileAssetId = tabdata.value(); - - Tracker::ScriptCanvasFileState fileState; - AssetTrackerRequestBus::BroadcastResult(fileState, &AssetTrackerRequests::GetFileState, fileAssetId); - - bool isSaving = false; - AssetTrackerRequestBus::BroadcastResult(isSaving, &AssetTrackerRequests::IsSaving, fileAssetId); - - if (isSaving) - { - m_closeCurrentGraphAfterSave = true; - return; - } - + Widget::GraphTabMetadata tabMetadata = tabdata.value(); + Tracker::ScriptCanvasFileState fileState = tabMetadata.m_fileState; UnsavedChangesOptions saveDialogResults = UnsavedChangesOptions::CONTINUE_WITHOUT_SAVING; - if (!isSaving && (fileState == Tracker::ScriptCanvasFileState::NEW || fileState == Tracker::ScriptCanvasFileState::MODIFIED || fileState == Tracker::ScriptCanvasFileState::SOURCE_REMOVED)) + + if (fileState == Tracker::ScriptCanvasFileState::NEW + || fileState == Tracker::ScriptCanvasFileState::MODIFIED + || fileState == Tracker::ScriptCanvasFileState::SOURCE_REMOVED) { - SetActiveAsset(fileAssetId); - - AZStd::string tabName; - AssetTrackerRequestBus::BroadcastResult(tabName, &AssetTrackerRequests::GetTabName, fileAssetId); - - saveDialogResults = ShowSaveDialog(tabName.c_str()); + SetActiveAsset(tabMetadata.m_assetId); + saveDialogResults = ShowSaveDialog(m_tabBar->tabText(index).toUtf8().constData()); } if (saveDialogResults == UnsavedChangesOptions::SAVE) { - auto saveCB = [this](bool isSuccessful, AZ::Data::AssetPtr asset, AZ::Data::AssetId) - { - if (isSuccessful) - { - ScriptCanvasMemoryAsset::pointer memoryAsset; - AssetTrackerRequestBus::BroadcastResult(memoryAsset, &AssetTrackerRequests::GetAsset, asset->GetId()); - AZ_Assert(memoryAsset, "At this point we must have a MemoryAsset"); - - int tabIndex = -1; - if (IsTabOpen(memoryAsset->GetFileAssetId(), tabIndex)) - { - OnTabCloseRequest(tabIndex); - } - } - else - { - QMessageBox::critical(this, QString(), QObject::tr("Failed to save.")); - } - }; - - if (fileState == Tracker::ScriptCanvasFileState::NEW) - { - SaveAssetAsImpl(fileAssetId, saveCB); - } - else - { - SaveAsset(fileAssetId, saveCB); - } + m_closeCurrentGraphAfterSave = true; + SaveAssetImpl(tabMetadata.m_assetId, fileState == Tracker::ScriptCanvasFileState::NEW ? Save::As : Save::InPlace); } else if (saveDialogResults == UnsavedChangesOptions::CONTINUE_WITHOUT_SAVING) { @@ -2860,16 +2546,15 @@ namespace ScriptCanvasEditor QVariant tabdata = m_tabBar->tabData(index); if (tabdata.isValid()) { - auto assetId = tabdata.value(); - SaveAssetImpl(assetId, nullptr); + auto assetId = tabdata.value(); + SaveAssetImpl(assetId.m_assetId, Save::InPlace); } - } void MainWindow::CloseAllTabs() { m_isClosingTabs = true; - m_skipTabOnClose.SetInvalid(); + m_skipTabOnClose.Clear(); CloseNextTab(); } @@ -2879,7 +2564,7 @@ namespace ScriptCanvasEditor QVariant tabdata = m_tabBar->tabData(index); if (tabdata.isValid()) { - auto assetId = tabdata.value(); + auto assetId = tabdata.value().m_assetId; m_isClosingTabs = true; m_skipTabOnClose = assetId; @@ -2895,14 +2580,10 @@ namespace ScriptCanvasEditor { QClipboard* clipBoard = QGuiApplication::clipboard(); - auto assetId = tabdata.value(); - - ScriptCanvasMemoryAsset::pointer memoryAsset; - AssetTrackerRequestBus::BroadcastResult(memoryAsset, &AssetTrackerRequests::GetAsset, assetId); - - if (memoryAsset) + auto assetId = tabdata.value(); + if (!assetId.m_assetId.Path().empty()) { - clipBoard->setText(memoryAsset->GetAbsolutePath().c_str()); + clipBoard->setText(assetId.m_assetId.Path().c_str()); } else { @@ -2913,7 +2594,6 @@ namespace ScriptCanvasEditor void MainWindow::OnActiveFileStateChanged() { - UpdateSaveState(); UpdateAssignToSelectionState(); } @@ -2922,10 +2602,10 @@ namespace ScriptCanvasEditor if (m_isClosingTabs) { if (m_tabBar->count() == 0 - || (m_tabBar->count() == 1 && m_skipTabOnClose.IsValid())) + || (m_tabBar->count() == 1 && m_skipTabOnClose.IsGraphValid())) { m_isClosingTabs = false; - m_skipTabOnClose.SetInvalid(); + m_skipTabOnClose.Clear(); return; } @@ -2936,9 +2616,9 @@ namespace ScriptCanvasEditor QVariant tabdata = m_tabBar->tabData(tab); if (tabdata.isValid()) { - auto assetId = tabdata.value(); + auto assetId = tabdata.value(); - if (assetId != m_skipTabOnClose) + if (!assetId.m_assetId.AnyEquals(m_skipTabOnClose)) { break; } @@ -2956,26 +2636,27 @@ namespace ScriptCanvasEditor QVariant tabdata = m_tabBar->tabData(index); if (tabdata.isValid()) { - auto tabAssetId = tabdata.value(); + auto tabAssetId = tabdata.value(); - if (tabAssetId == m_activeAssetId) + + if (tabAssetId.m_canvasWidget) { - SetActiveAsset({}); + tabAssetId.m_canvasWidget->hide(); } - ScriptCanvasMemoryAsset::pointer memoryAsset; - AssetTrackerRequestBus::BroadcastResult(memoryAsset, &AssetTrackerRequests::GetAsset, tabAssetId); + bool activeSet = false; - if (memoryAsset && memoryAsset->GetView()) + if (tabAssetId.m_assetId.AnyEquals(m_activeGraph)) { - memoryAsset->GetView()->hide(); + SetActiveAsset({}); + activeSet = true; } m_tabBar->CloseTab(index); m_tabBar->update(); - RemoveScriptCanvasAsset(tabAssetId); + RemoveScriptCanvasAsset(tabAssetId.m_assetId); - if (m_tabBar->count() == 0) + if (!activeSet && m_tabBar->count() == 0) { // The last tab has been removed. SetActiveAsset({}); @@ -3065,14 +2746,12 @@ namespace ScriptCanvasEditor m_logPanel->hide(); } - /* Disable Mini-map until we fix rendering performance if (m_minimap) { addDockWidget(Qt::LeftDockWidgetArea, m_minimap); m_minimap->setFloating(false); - m_minimap->hide(); + m_minimap->show(); } - */ if (m_nodePalette) { @@ -3116,14 +2795,12 @@ namespace ScriptCanvasEditor m_bookmarkDockWidget->hide(); } - /* Disable mini-map until we fix rendering performance if (m_minimap) { addDockWidget(Qt::RightDockWidgetArea, m_minimap); m_minimap->setFloating(false); - m_minimap->hide(); + m_minimap->show(); } - */ resizeDocks( { m_nodePalette, m_propertyGrid }, @@ -3162,7 +2839,7 @@ namespace ScriptCanvasEditor bool hasCopiableSelection = false; bool hasSelection = false; - if (m_activeAssetId.IsValid()) + if (m_activeGraph.IsGraphValid()) { if (graphCanvasGraphId.IsValid()) { @@ -3542,7 +3219,6 @@ namespace ScriptCanvasEditor UpdateAssignToSelectionState(); UpdateUndoRedoState(); - UpdateSaveState(); } void MainWindow::OnWorkspaceRestoreStart() @@ -3550,23 +3226,23 @@ namespace ScriptCanvasEditor m_isRestoringWorkspace = true; } - void MainWindow::OnWorkspaceRestoreEnd(AZ::Data::AssetId lastFocusAsset) + void MainWindow::OnWorkspaceRestoreEnd(ScriptCanvasEditor::SourceHandle lastFocusAsset) { if (m_isRestoringWorkspace) { m_isRestoringWorkspace = false; - if (m_queuedFocusOverride.IsValid()) + if (m_queuedFocusOverride.IsGraphValid()) { SetActiveAsset(m_queuedFocusOverride); - m_queuedFocusOverride.SetInvalid(); + m_queuedFocusOverride.Clear(); } - else if (lastFocusAsset.IsValid()) + else if (lastFocusAsset.IsGraphValid()) { SetActiveAsset(lastFocusAsset); } - if (!m_activeAssetId.IsValid()) + if (!m_activeGraph.IsGraphValid()) { if (m_tabBar->count() > 0) { @@ -3589,11 +3265,11 @@ namespace ScriptCanvasEditor void MainWindow::UpdateAssignToSelectionState() { - bool buttonEnabled = m_activeAssetId.IsValid(); + bool buttonEnabled = m_activeGraph.IsGraphValid(); if (buttonEnabled) { - const Tracker::ScriptCanvasFileState& fileState = GetAssetFileState(m_activeAssetId); + const Tracker::ScriptCanvasFileState& fileState = GetAssetFileState(m_activeGraph); if (fileState == Tracker::ScriptCanvasFileState::INVALID || fileState == Tracker::ScriptCanvasFileState::NEW || fileState == Tracker::ScriptCanvasFileState::SOURCE_REMOVED) { buttonEnabled = false; @@ -3620,24 +3296,10 @@ namespace ScriptCanvasEditor ui->action_Redo->setEnabled(isEnabled); } - void MainWindow::UpdateSaveState() + void MainWindow::UpdateSaveState(bool enabled) { - bool enabled = m_activeAssetId.IsValid(); - bool isSaving = false; - bool hasModifications = false; - - if (enabled) - { - Tracker::ScriptCanvasFileState fileState = GetAssetFileState(m_activeAssetId); - hasModifications = ( fileState == Tracker::ScriptCanvasFileState::MODIFIED - || fileState == Tracker::ScriptCanvasFileState::NEW - || fileState == Tracker::ScriptCanvasFileState::SOURCE_REMOVED); - - AssetTrackerRequestBus::BroadcastResult(isSaving, &AssetTrackerRequests::IsSaving, m_activeAssetId); - } - - ui->action_Save->setEnabled(enabled && !isSaving && hasModifications); - ui->action_Save_As->setEnabled(enabled && !isSaving); + ui->action_Save->setEnabled(enabled); + ui->action_Save_As->setEnabled(enabled); } void MainWindow::CreateFunctionInput() @@ -3835,21 +3497,28 @@ namespace ScriptCanvasEditor return findChild(elementName); } - AZ::EntityId MainWindow::FindEditorNodeIdByAssetNodeId(const AZ::Data::AssetId& assetId, AZ::EntityId assetNodeId) const + AZ::EntityId MainWindow::FindEditorNodeIdByAssetNodeId([[maybe_unused]] const ScriptCanvasEditor::SourceHandle& assetId + , [[maybe_unused]] AZ::EntityId assetNodeId) const { - AZ::EntityId editorEntityId; - AssetTrackerRequestBus::BroadcastResult(editorEntityId, &AssetTrackerRequests::GetEditorEntityIdFromSceneEntityId, assetId, assetNodeId); + AZ::EntityId editorEntityId{}; +// AssetTrackerRequestBus::BroadcastResult +// ( editorEntityId, &AssetTrackerRequests::GetEditorEntityIdFromSceneEntityId, assetId.Id(), assetNodeId); + // #sc_editor_asset_redux fix logger return editorEntityId; } - AZ::EntityId MainWindow::FindAssetNodeIdByEditorNodeId(const AZ::Data::AssetId& assetId, AZ::EntityId editorNodeId) const + AZ::EntityId MainWindow::FindAssetNodeIdByEditorNodeId([[maybe_unused]] const ScriptCanvasEditor::SourceHandle& assetId + , [[maybe_unused]] AZ::EntityId editorNodeId) const { - AZ::EntityId sceneEntityId; - AssetTrackerRequestBus::BroadcastResult(sceneEntityId, &AssetTrackerRequests::GetSceneEntityIdFromEditorEntityId, assetId, editorNodeId); + AZ::EntityId sceneEntityId{}; + // AssetTrackerRequestBus::BroadcastResult + // ( sceneEntityId, &AssetTrackerRequests::GetSceneEntityIdFromEditorEntityId, assetId.Id(), editorNodeId); + // #sc_editor_asset_redux fix logger return sceneEntityId; } - GraphCanvas::Endpoint MainWindow::CreateNodeForProposalWithGroup(const AZ::EntityId& connectionId, const GraphCanvas::Endpoint& endpoint, const QPointF& scenePoint, const QPoint& screenPoint, AZ::EntityId groupTarget) + GraphCanvas::Endpoint MainWindow::CreateNodeForProposalWithGroup(const AZ::EntityId& connectionId + , const GraphCanvas::Endpoint& endpoint, const QPointF& scenePoint, const QPoint& screenPoint, AZ::EntityId groupTarget) { PushPreventUndoStateUpdate(); @@ -3959,7 +3628,7 @@ namespace ScriptCanvasEditor OnFileNew(); - if (m_activeAssetId.IsValid()) + if (m_activeGraph.IsGraphValid()) { graphId = GetActiveGraphCanvasGraphId(); } @@ -4223,12 +3892,6 @@ namespace ScriptCanvasEditor qobject_cast(parent())->close(); } - if (HasSystemTickAction(SystemTickActionFlag::UpdateSaveMenuState)) - { - RemoveSystemTickAction(SystemTickActionFlag::UpdateSaveMenuState); - UpdateSaveState(); - } - if (HasSystemTickAction(SystemTickActionFlag::CloseCurrentGraph)) { RemoveSystemTickAction(SystemTickActionFlag::CloseCurrentGraph); @@ -4245,10 +3908,7 @@ namespace ScriptCanvasEditor CloseNextTab(); } - if (m_systemTickActions == 0) - { - AZ::SystemTickBus::Handler::BusDisconnect(); - } + ClearStaleSaves(); } void MainWindow::OnCommandStarted(AZ::Crc32) @@ -4263,35 +3923,11 @@ namespace ScriptCanvasEditor void MainWindow::PrepareActiveAssetForSave() { - PrepareAssetForSave(m_activeAssetId); + PrepareAssetForSave(m_activeGraph); } - void MainWindow::PrepareAssetForSave(const AZ::Data::AssetId& assetId) + void MainWindow::PrepareAssetForSave(const ScriptCanvasEditor::SourceHandle& /*assetId*/) { - ScriptCanvasMemoryAsset::pointer memoryAsset; - AssetTrackerRequestBus::BroadcastResult(memoryAsset, &AssetTrackerRequests::GetAsset, assetId); - - if (memoryAsset) - { - AZ::EntityId graphId = memoryAsset->GetGraphId(); - AZ::EntityId scriptCanvasId = memoryAsset->GetScriptCanvasId(); - - AZ::Entity* entity = nullptr; - GraphRequestBus::EventResult(entity, scriptCanvasId, &GraphRequests::GetGraphEntity); - - if (entity) - { - GraphCanvas::GraphModelRequestBus::Event(graphId, &GraphCanvas::GraphModelRequests::OnSaveDataDirtied, entity->GetId()); - } - - GraphCanvas::GraphModelRequestBus::Event(graphId, &GraphCanvas::GraphModelRequests::OnSaveDataDirtied, graphId); - - ScriptCanvasEditor::Graph* graph = AZ::EntityUtils::FindFirstDerivedComponent(entity); - if (graph) - { - graph->MarkVersion(); - } - } } void MainWindow::RestartAutoTimerSave(bool forceTimer) @@ -4334,39 +3970,38 @@ namespace ScriptCanvasEditor void MainWindow::OnAssignToSelectedEntities() { - Tracker::ScriptCanvasFileState fileState; - AssetTrackerRequestBus::BroadcastResult(fileState, &AssetTrackerRequests::GetFileState, m_activeAssetId); - + Tracker::ScriptCanvasFileState fileState = GetAssetFileState(m_activeGraph);; + bool isDocumentOpen = false; AzToolsFramework::EditorRequests::Bus::BroadcastResult(isDocumentOpen, &AzToolsFramework::EditorRequests::IsLevelDocumentOpen); - + if (fileState == Tracker::ScriptCanvasFileState::NEW || fileState == Tracker::ScriptCanvasFileState::SOURCE_REMOVED || !isDocumentOpen) { return; } - + AzToolsFramework::EntityIdList selectedEntityIds; AzToolsFramework::ToolsApplicationRequestBus::BroadcastResult(selectedEntityIds, &AzToolsFramework::ToolsApplicationRequests::GetSelectedEntities); - + auto selectedEntityIdIter = selectedEntityIds.begin(); - + bool isLayerAmbiguous = false; AZ::EntityId targetLayer; - + while (selectedEntityIdIter != selectedEntityIds.end()) { bool isLayerEntity = false; AzToolsFramework::Layers::EditorLayerComponentRequestBus::EventResult(isLayerEntity, (*selectedEntityIdIter), &AzToolsFramework::Layers::EditorLayerComponentRequestBus::Events::HasLayer); - + if (isLayerEntity) { if (targetLayer.IsValid()) { isLayerAmbiguous = true; } - + targetLayer = (*selectedEntityIdIter); - + selectedEntityIdIter = selectedEntityIds.erase(selectedEntityIdIter); } else @@ -4374,20 +4009,20 @@ namespace ScriptCanvasEditor ++selectedEntityIdIter; } } - + if (selectedEntityIds.empty()) { AZ::EntityId createdId; AzToolsFramework::EditorRequests::Bus::BroadcastResult(createdId, &AzToolsFramework::EditorRequests::CreateNewEntity, AZ::EntityId()); - + selectedEntityIds.emplace_back(createdId); - + if (targetLayer.IsValid() && !isLayerAmbiguous) { AZ::TransformBus::Event(createdId, &AZ::TransformBus::Events::SetParent, targetLayer); } } - + for (const AZ::EntityId& entityId : selectedEntityIds) { AssignGraphToEntityImpl(entityId); @@ -4396,7 +4031,7 @@ namespace ScriptCanvasEditor void MainWindow::OnAssignToEntity(const AZ::EntityId& entityId) { - Tracker::ScriptCanvasFileState fileState = GetAssetFileState(m_activeAssetId); + Tracker::ScriptCanvasFileState fileState = GetAssetFileState(m_activeGraph); if (fileState == Tracker::ScriptCanvasFileState::MODIFIED || fileState == Tracker::ScriptCanvasFileState::UNMODIFIED) @@ -4405,11 +4040,10 @@ namespace ScriptCanvasEditor } } - ScriptCanvasEditor::Tracker::ScriptCanvasFileState MainWindow::GetAssetFileState(AZ::Data::AssetId assetId) const + ScriptCanvasEditor::Tracker::ScriptCanvasFileState MainWindow::GetAssetFileState(ScriptCanvasEditor::SourceHandle assetId) const { - Tracker::ScriptCanvasFileState fileState = Tracker::ScriptCanvasFileState::INVALID; - AssetTrackerRequestBus::BroadcastResult(fileState, &AssetTrackerRequests::GetFileState, assetId); - return fileState; + auto dataOptional = m_tabBar->GetTabData(assetId); + return dataOptional ? dataOptional->m_fileState : Tracker::ScriptCanvasFileState::INVALID; } void MainWindow::AssignGraphToEntityImpl(const AZ::EntityId& entityId) @@ -4457,14 +4091,7 @@ namespace ScriptCanvasEditor if (usableRequestBus) { - ScriptCanvasMemoryAsset::pointer memoryAsset; - AssetTrackerRequestBus::BroadcastResult(memoryAsset, &AssetTrackerRequests::GetAsset, m_activeAssetId); - - if (memoryAsset) - { - // We need to assign the AssetId for the file asset, not the in-memory asset - usableRequestBus->SetAssetId(memoryAsset->GetFileAssetId()); - } + usableRequestBus->SetAssetId(m_activeGraph.Describe()); } } @@ -4480,11 +4107,6 @@ namespace ScriptCanvasEditor void MainWindow::AddSystemTickAction(SystemTickActionFlag action) { - if (!AZ::SystemTickBus::Handler::BusIsConnected()) - { - AZ::SystemTickBus::Handler::BusConnect(); - } - m_systemTickActions |= action; } @@ -4514,6 +4136,7 @@ namespace ScriptCanvasEditor m_filesToOpen.pop_front(); OpenFile(nextFile.toUtf8().data()); + OpenNextFile(); } else { @@ -4787,11 +4410,11 @@ namespace ScriptCanvasEditor //connect(m_unitTestDockWidget, &QDockWidget::visibilityChanged, this, &MainWindow::OnViewVisibilityChanged); } - void MainWindow::DisableAssetView(ScriptCanvasMemoryAsset::pointer memoryAsset) + void MainWindow::DisableAssetView(const ScriptCanvasEditor::SourceHandle& memoryAssetId) { - if (memoryAsset->GetView()) + if (auto view = m_tabBar->ModTabView(m_tabBar->FindTab(memoryAssetId))) { - memoryAsset->GetView()->DisableView(); + view->DisableView(); } m_tabBar->setEnabled(false); @@ -4811,11 +4434,11 @@ namespace ScriptCanvasEditor m_autoSaveTimer.stop(); } - void MainWindow::EnableAssetView(ScriptCanvasMemoryAsset::pointer memoryAsset) + void MainWindow::EnableAssetView(const ScriptCanvasEditor::SourceHandle& memoryAssetId) { - if (memoryAsset->GetView()) + if (auto view = m_tabBar->ModTabView(m_tabBar->FindTab(memoryAssetId))) { - memoryAsset->GetView()->EnableView(); + view->EnableView(); } m_tabBar->setEnabled(true); @@ -4833,5 +4456,34 @@ namespace ScriptCanvasEditor UpdateUndoRedoState(); } + + void MainWindow::ClearStaleSaves() + { + AZStd::lock_guard lock(m_mutex); + auto timeNow = AZStd::chrono::system_clock::now(); + AZStd::erase_if(m_saves, [&timeNow](const auto& item) + { + AZStd::sys_time_t delta = AZStd::chrono::seconds(timeNow - item.second).count(); + return delta > 2.0f; + }); + } + + bool MainWindow::IsRecentSave(const SourceHandle& handle) const + { + AZStd::lock_guard lock(const_cast(this)->m_mutex); + AZStd::string key = handle.Path().Native(); + AZStd::to_lower(key.begin(), key.end()); + auto iter = m_saves.find(key); + return iter != m_saves.end(); + } + + void MainWindow::MarkRecentSave(const SourceHandle& handle) + { + AZStd::lock_guard lock(m_mutex); + AZStd::string key = handle.Path().Native(); + AZStd::to_lower(key.begin(), key.end()); + m_saves[key] = AZStd::chrono::system_clock::now(); + } + #include } diff --git a/Gems/ScriptCanvas/Code/Editor/View/Windows/MainWindow.h b/Gems/ScriptCanvas/Code/Editor/View/Windows/MainWindow.h index 7672f0a199..75c798a0d3 100644 --- a/Gems/ScriptCanvas/Code/Editor/View/Windows/MainWindow.h +++ b/Gems/ScriptCanvas/Code/Editor/View/Windows/MainWindow.h @@ -43,26 +43,21 @@ #include #include #include - -#include #include #include #include #include +#include #include - #include +#include #if SCRIPTCANVAS_EDITOR #include -#endif +#endif//#if SCRIPTCANVAS_EDITOR -#include -#include - -#include -#endif +#endif//#if !defined(Q_MOC_RUN) namespace GraphCanvas { @@ -90,7 +85,6 @@ namespace AzQtComponents class QDir; class QFile; class QProgressDialog; -namespace ScriptCanvas { class ScriptCanvasAssetBase; } namespace ScriptCanvasEditor { @@ -153,9 +147,8 @@ namespace ScriptCanvasEditor } }; - //! Manages the Save/Restore operations of the user's las topened and focused graphs + //! Manages the Save/Restore operations of the user's last opened and focused graphs class Workspace - : AssetTrackerNotificationBus::MultiHandler { public: @@ -174,10 +167,9 @@ namespace ScriptCanvasEditor private: - void OnAssetReady(const ScriptCanvasMemoryAsset::pointer asset) override; - void SignalAssetComplete(const AZ::Data::AssetId& fileAssetId); + void SignalAssetComplete(const ScriptCanvasEditor::SourceHandle& fileAssetId); - AZ::Data::AssetId GetSourceAssetId(const AZ::Data::AssetId& memoryAssetId) const; + ScriptCanvasEditor::SourceHandle GetSourceAssetId(const ScriptCanvasEditor::SourceHandle& memoryAssetId) const; bool m_rememberOpenCanvases; MainWindow* m_mainWindow; @@ -185,10 +177,10 @@ namespace ScriptCanvasEditor //! Setting focus is problematic unless it is done until after all currently loading graphs have finished loading //! This vector is used to track the list of graphs being opened to restore the workspace and as assets are fully //! ready and activated they are removed from this list. - AZStd::vector m_loadingAssets; + AZStd::vector m_loadingAssets; //! During restore we queue the asset Id to focus in order to do it last - AZ::Data::AssetId m_queuedAssetFocus; + ScriptCanvasEditor::SourceHandle m_queuedAssetFocus; }; enum class UnsavedChangesOptions; @@ -230,7 +222,6 @@ namespace ScriptCanvasEditor , private VariablePaletteRequestBus::Handler , private ScriptCanvas::BatchOperationNotificationBus::Handler , private AssetGraphSceneBus::Handler - , private AssetTrackerNotificationBus::MultiHandler #if SCRIPTCANVAS_EDITOR //, public IEditorNotifyListener #endif @@ -239,6 +230,7 @@ namespace ScriptCanvasEditor , private GraphCanvas::ViewNotificationBus::Handler , public AZ::SystemTickBus::Handler , private AzToolsFramework::ToolsApplicationNotificationBus::Handler + , private AzToolsFramework::AssetSystemBus::Handler , private ScriptCanvas::ScriptCanvasSettingsRequestBus::Handler { Q_OBJECT @@ -269,7 +261,7 @@ namespace ScriptCanvasEditor // Undo Handlers void PostUndoPoint(ScriptCanvas::ScriptCanvasId scriptCanvasId) override; - void SignalSceneDirty(AZ::Data::AssetId assetId) override; + void SignalSceneDirty(ScriptCanvasEditor::SourceHandle assetId) override; void PushPreventUndoStateUpdate() override; void PopPreventUndoStateUpdate() override; @@ -325,12 +317,16 @@ namespace ScriptCanvasEditor // File menu void OnFileNew(); - bool OnFileSave(const Callbacks::OnSave& saveCB); - bool OnFileSaveAs(const Callbacks::OnSave& saveCB); - bool OnFileSaveCaller(){return OnFileSave(nullptr);}; - bool OnFileSaveAsCaller(){return OnFileSaveAs(nullptr);}; - bool SaveAssetImpl(const AZ::Data::AssetId& assetId, const Callbacks::OnSave& saveCB); - bool SaveAssetAsImpl(const AZ::Data::AssetId& assetId, const Callbacks::OnSave& saveCB); + bool OnFileSave(); + bool OnFileSaveAs(); + bool OnFileSaveCaller(){return OnFileSave();}; + bool OnFileSaveAsCaller(){return OnFileSaveAs();}; + enum class Save + { + InPlace, + As + }; + bool SaveAssetImpl(const ScriptCanvasEditor::SourceHandle& assetId, Save save); void OnFileOpen(); // Edit menu @@ -415,30 +411,26 @@ namespace ScriptCanvasEditor void CloseNextTab(); - bool IsTabOpen(const AZ::Data::AssetId& assetId, int& outTabIndex) const; - QVariant GetTabData(const AZ::Data::AssetId& assetId); + bool IsTabOpen(const SourceHandle& assetId, int& outTabIndex) const; + QVariant GetTabData(const SourceHandle& assetId); //! GeneralRequestBus - AZ::Outcome OpenScriptCanvasAssetId(const AZ::Data::AssetId& assetId) override; - AZ::Outcome OpenScriptCanvasAsset(AZ::Data::AssetId scriptCanvasAssetId, int tabIndex = -1) override; - AZ::Outcome OpenScriptCanvasAsset(const ScriptCanvasMemoryAsset& scriptCanvasAsset, int tabIndex = -1); - int CloseScriptCanvasAsset(const AZ::Data::AssetId& assetId) override; + AZ::Outcome OpenScriptCanvasAssetId(const SourceHandle& assetId, Tracker::ScriptCanvasFileState fileState) override; + AZ::Outcome OpenScriptCanvasAsset(SourceHandle scriptCanvasAssetId, Tracker::ScriptCanvasFileState fileState, int tabIndex = -1) override; + AZ::Outcome OpenScriptCanvasAssetImplementation(const SourceHandle& sourceHandle, Tracker::ScriptCanvasFileState fileState, int tabIndex = -1); + int CloseScriptCanvasAsset(const SourceHandle& assetId) override; bool CreateScriptCanvasAssetFor(const TypeDefs::EntityComponentId& requestingEntityId) override; - bool IsScriptCanvasAssetOpen(const AZ::Data::AssetId& assetId) const override; + bool IsScriptCanvasAssetOpen(const SourceHandle& assetId) const override; const CategoryInformation* FindNodePaletteCategoryInformation(AZStd::string_view categoryPath) const override; const NodePaletteModelInformation* FindNodePaletteModelInformation(const ScriptCanvas::NodeTypeIdentifier& nodeType) const override; //// - AZ::Outcome CreateScriptCanvasAsset(AZStd::string_view assetPath, AZ::Data::AssetType assetType, int tabIndex = -1); - AZ::Outcome UpdateScriptCanvasAsset(const AZ::Data::Asset& scriptCanvasAsset); + AZ::Outcome CreateScriptCanvasAsset(AZStd::string_view assetPath, int tabIndex = -1); - void RefreshScriptCanvasAsset(const AZ::Data::Asset& scriptCanvasAsset); - - //! Removes the assetId -> ScriptCanvasAsset mapping and disconnects from the asset tracker - void RemoveScriptCanvasAsset(const AZ::Data::AssetId& assetId); - void OnChangeActiveGraphTab(AZ::Data::AssetId) override; + void RemoveScriptCanvasAsset(const ScriptCanvasEditor::SourceHandle& assetId); + void OnChangeActiveGraphTab(ScriptCanvasEditor::SourceHandle) override; void CreateNewRuntimeAsset() override { OnFileNew(); } @@ -448,8 +440,8 @@ namespace ScriptCanvasEditor GraphCanvas::GraphId GetGraphCanvasGraphId(const ScriptCanvas::ScriptCanvasId& scriptCanvasId) const override; - GraphCanvas::GraphId FindGraphCanvasGraphIdByAssetId(const AZ::Data::AssetId& assetId) const override; - ScriptCanvas::ScriptCanvasId FindScriptCanvasIdByAssetId(const AZ::Data::AssetId& assetId) const override; + GraphCanvas::GraphId FindGraphCanvasGraphIdByAssetId(const ScriptCanvasEditor::SourceHandle& assetId) const override; + ScriptCanvas::ScriptCanvasId FindScriptCanvasIdByAssetId(const ScriptCanvasEditor::SourceHandle& assetId) const override; bool IsInUndoRedo(const AZ::EntityId& graphCanvasGraphId) const override; bool IsScriptCanvasInUndoRedo(const ScriptCanvas::ScriptCanvasId& scriptCanvasId) const override; @@ -517,17 +509,18 @@ namespace ScriptCanvasEditor QObject* FindElementByName(QString elementName) override; //// - AZ::EntityId FindEditorNodeIdByAssetNodeId(const AZ::Data::AssetId& assetId, AZ::EntityId assetNodeId) const override; - AZ::EntityId FindAssetNodeIdByEditorNodeId(const AZ::Data::AssetId& assetId, AZ::EntityId editorNodeId) const override; + AZ::EntityId FindEditorNodeIdByAssetNodeId(const ScriptCanvasEditor::SourceHandle& assetId, AZ::EntityId assetNodeId) const override; + AZ::EntityId FindAssetNodeIdByEditorNodeId(const ScriptCanvasEditor::SourceHandle& assetId, AZ::EntityId editorNodeId) const override; private: + void SourceFileChanged(AZStd::string relativePath, AZStd::string scanFolder, AZ::Uuid fileAssetId) override; + void SourceFileRemoved(AZStd::string relativePath, AZStd::string scanFolder, AZ::Uuid fileAssetId) override; + void DeleteNodes(const AZ::EntityId& sceneId, const AZStd::vector& nodes) override; void DeleteConnections(const AZ::EntityId& sceneId, const AZStd::vector& connections) override; void DisconnectEndpoints(const AZ::EntityId& sceneId, const AZStd::vector& endpoints) override; ///////////////////////////////////////////////////////////////////////////////////////////// - void UpdateWorkspaceStatus(const ScriptCanvasMemoryAsset& scriptCanvasAsset); - GraphCanvas::Endpoint HandleProposedConnection(const GraphCanvas::GraphId& graphId, const GraphCanvas::ConnectionId& connectionId, const GraphCanvas::Endpoint& endpoint, const GraphCanvas::NodeId& proposedNode, const QPoint& screenPoint); //! UndoNotificationBus @@ -543,29 +536,20 @@ namespace ScriptCanvasEditor void OnAutoSave(); - //! Helper function which serializes a file to disk - //! \param filename name of file to serialize the Entity - //! \param asset asset to save - void GetSuggestedFullFilenameToSaveAs(const AZ::Data::AssetId& assetId, AZStd::string& filePath, AZStd::string& fileFilter); - - void MarkAssetModified(const AZ::Data::AssetId& assetId); + void UpdateFileState(const ScriptCanvasEditor::SourceHandle& assetId, Tracker::ScriptCanvasFileState fileState); // QMainWindow void closeEvent(QCloseEvent *event) override; UnsavedChangesOptions ShowSaveDialog(const QString& filename); - bool ActivateAndSaveAsset(const AZ::Data::AssetId& unsavedAssetId, const Callbacks::OnSave& onSave); + bool ActivateAndSaveAsset(const ScriptCanvasEditor::SourceHandle& unsavedAssetId); - void SaveNewAsset(AZStd::string_view path, AZ::Data::AssetId assetId, const Callbacks::OnSave& onSave); - void SaveAsset(AZ::Data::AssetId assetId, const Callbacks::OnSave& onSave); + void SaveAs(AZStd::string_view path, ScriptCanvasEditor::SourceHandle assetId); void OpenFile(const char* fullPath); void CreateMenus(); - void SignalActiveSceneChanged(const AZ::Data::AssetId assetId); - - void SaveWorkspace(bool updateAssetList = true); - void RestoreWorkspace(); + void SignalActiveSceneChanged(const ScriptCanvasEditor::SourceHandle assetId); void RunUpgradeTool(); @@ -593,29 +577,27 @@ namespace ScriptCanvasEditor void UpdateMenuState(bool enabledState); void OnWorkspaceRestoreStart(); - void OnWorkspaceRestoreEnd(AZ::Data::AssetId lastFocusAsset); + void OnWorkspaceRestoreEnd(ScriptCanvasEditor::SourceHandle lastFocusAsset); void UpdateAssignToSelectionState(); void UpdateUndoRedoState(); - void UpdateSaveState(); + void UpdateSaveState(bool enabled); void CreateFunctionInput(); void CreateFunctionOutput(); void CreateFunctionDefinitionNode(int positionOffset); - int CreateAssetTab(const AZ::Data::AssetId& assetId, int tabIndex = -1); + int CreateAssetTab(const ScriptCanvasEditor::SourceHandle& assetId, Tracker::ScriptCanvasFileState fileState, int tabIndex = -1); //! \param asset The AssetId of the ScriptCanvas Asset. - void SetActiveAsset(const AZ::Data::AssetId& assetId); + void SetActiveAsset(const ScriptCanvasEditor::SourceHandle& assetId); void RefreshActiveAsset(); - void ReconnectSceneBuses(AZ::Data::AssetId previousAssetId, AZ::Data::AssetId nextAssetId); - - void SignalBatchOperationComplete(BatchOperatorTool* batchTool); + void ReconnectSceneBuses(ScriptCanvasEditor::SourceHandle previousAssetId, ScriptCanvasEditor::SourceHandle nextAssetId); void PrepareActiveAssetForSave(); - void PrepareAssetForSave(const AZ::Data::AssetId& asssetId); + void PrepareAssetForSave(const ScriptCanvasEditor::SourceHandle& asssetId); void RestartAutoTimerSave(bool forceTimer = false); @@ -626,24 +608,16 @@ namespace ScriptCanvasEditor void AssignGraphToEntityImpl(const AZ::EntityId& entityId); //// - Tracker::ScriptCanvasFileState GetAssetFileState(AZ::Data::AssetId assetId) const; + Tracker::ScriptCanvasFileState GetAssetFileState(ScriptCanvasEditor::SourceHandle assetId) const; - AZ::Data::AssetId GetSourceAssetId(const AZ::Data::AssetId& memoryAssetId) const + ScriptCanvasEditor::SourceHandle GetSourceAssetId(const ScriptCanvasEditor::SourceHandle& memoryAssetId) const { - ScriptCanvasMemoryAsset::pointer memoryAsset; - AssetTrackerRequestBus::BroadcastResult(memoryAsset, &AssetTrackerRequests::GetAsset, memoryAssetId); - - if (memoryAsset) - { - return memoryAsset->GetFileAssetId(); - } - - return AZ::Data::AssetId(); + return memoryAssetId; } - int InsertTabForAsset(AZStd::string_view assetPath, AZ::Data::AssetId assetId, int tabIndex = -1); + int InsertTabForAsset(AZStd::string_view assetPath, ScriptCanvasEditor::SourceHandle assetId, int tabIndex = -1); - void UpdateUndoCache(AZ::Data::AssetId assetId); + void UpdateUndoCache(ScriptCanvasEditor::SourceHandle assetId); bool HasSystemTickAction(SystemTickActionFlag action); @@ -655,34 +629,9 @@ namespace ScriptCanvasEditor void OpenNextFile(); - template - void MakeNewFile() - { - static int scriptCanvasEditorDefaultNewNameCount = 0; - AZStd::string newAssetName = AZStd::string::format(ScriptCanvas::AssetDescription::GetAssetNamePattern(), ++scriptCanvasEditorDefaultNewNameCount); - - AZStd::array assetRootArray; - if (!AZ::IO::FileIOBase::GetInstance()->ResolvePath(ScriptCanvas::AssetDescription::GetSuggestedSavePath(), assetRootArray.data(), assetRootArray.size())) - { - AZ_ErrorOnce("Script Canvas", false, "Unable to resolve @projectroot@ path"); - } - - AZStd::string assetPath; - AzFramework::StringFunc::Path::Join(assetRootArray.data(), (newAssetName + ScriptCanvas::AssetDescription::GetExtension()).data(), assetPath); - - auto createOutcome = CreateScriptCanvasAsset(assetPath, azrtti_typeid()); - if (createOutcome) - { - } - else - { - AZ_Warning("Script Canvas", createOutcome, "%s", createOutcome.GetError().data()); - } - } - - void DisableAssetView(ScriptCanvasMemoryAsset::pointer memoryAsset); - void EnableAssetView(ScriptCanvasMemoryAsset::pointer memoryAsset); + void DisableAssetView(const ScriptCanvasEditor::SourceHandle& memoryAssetId); + void EnableAssetView(const ScriptCanvasEditor::SourceHandle& memoryAssetId); QWidget* m_host = nullptr; @@ -741,22 +690,22 @@ namespace ScriptCanvasEditor GraphCanvas::GraphCanvasEditorEmptyDockWidget* m_emptyCanvas; // Displayed when there is no open graph QVBoxLayout* m_layout; - AZ::Data::AssetId m_activeAssetId; - + ScriptCanvasEditor::SourceHandle m_activeGraph; + bool m_loadingNewlySavedFile; AZStd::string m_newlySavedFile; AZStd::string m_errorFilePath; bool m_isClosingTabs; - AZ::Data::AssetId m_skipTabOnClose; + ScriptCanvasEditor::SourceHandle m_skipTabOnClose; bool m_enterState; bool m_ignoreSelection; AZ::s32 m_preventUndoStateUpdateCount; bool m_isRestoringWorkspace; - AZ::Data::AssetId m_queuedFocusOverride; + ScriptCanvasEditor::SourceHandle m_queuedFocusOverride; Ui::MainWindow* ui; AZStd::array, c_scriptCanvasEditorSettingsRecentFilesCountMax> m_recentActions; @@ -778,17 +727,17 @@ namespace ScriptCanvasEditor AZStd::vector m_selectedVariableIds; AZ::u32 m_systemTickActions; - AZStd::unordered_set< AZ::Data::AssetId > m_processedClosedAssetIds; + AZStd::unordered_set< ScriptCanvasEditor::SourceHandle > m_processedClosedAssetIds; - AZStd::unordered_set< AZ::Data::AssetId > m_loadingWorkspaceAssets; - AZStd::unordered_set< AZ::Data::AssetId > m_loadingAssets; + AZStd::unordered_set< ScriptCanvasEditor::SourceHandle > m_loadingWorkspaceAssets; + AZStd::unordered_set< ScriptCanvasEditor::SourceHandle > m_loadingAssets; AZStd::unordered_set< AZ::Uuid > m_variablePaletteTypes; AZStd::unordered_map< AZ::Crc32, QObject* > m_automationLookUpMap; bool m_closeCurrentGraphAfterSave; - AZStd::unordered_map< AZ::Data::AssetId, TypeDefs::EntityComponentId > m_assetCreationRequests; + AZStd::unordered_map< ScriptCanvasEditor::SourceHandle, TypeDefs::EntityComponentId > m_assetCreationRequests; ScriptCanvas::Debugger::ClientTransceiver m_clientTRX; GraphCanvas::StyleManager m_styleManager; @@ -797,6 +746,14 @@ namespace ScriptCanvasEditor //! this object manages the Save/Restore operations Workspace* m_workspace; - void OnSaveCallback(bool saveSuccess, AZ::Data::AssetPtr, AZ::Data::AssetId previousFileAssetId); + AZStd::unique_ptr m_fileSaver; + VersionExplorer::FileSaveResult m_fileSaveResult; + void OnSaveCallBack(const VersionExplorer::FileSaveResult& result); + + void ClearStaleSaves(); + bool IsRecentSave(const SourceHandle& handle) const; + void MarkRecentSave(const SourceHandle& handle); + AZStd::recursive_mutex m_mutex; + AZStd::unordered_map m_saves; }; } diff --git a/Gems/ScriptCanvas/Code/Editor/View/Windows/ScriptCanvasContextMenus.cpp b/Gems/ScriptCanvas/Code/Editor/View/Windows/ScriptCanvasContextMenus.cpp index e4a95d7d19..6402a24b3a 100644 --- a/Gems/ScriptCanvas/Code/Editor/View/Windows/ScriptCanvasContextMenus.cpp +++ b/Gems/ScriptCanvas/Code/Editor/View/Windows/ScriptCanvasContextMenus.cpp @@ -12,6 +12,8 @@ #include #include +#include + #include #include @@ -41,6 +43,8 @@ #include #include "ScriptCanvasContextMenus.h" +#include "Settings.h" + #include #include #include @@ -53,6 +57,7 @@ #include #include + namespace ScriptCanvasEditor { //////////////////////////// @@ -805,6 +810,13 @@ namespace ScriptCanvasEditor SceneContextMenu::SceneContextMenu(const NodePaletteModel& paletteModel, AzToolsFramework::AssetBrowser::AssetBrowserFilterModel* assetModel) : GraphCanvas::SceneContextMenu(ScriptCanvasEditor::AssetEditorId) { + + auto userSettings = AZ::UserSettings::CreateFind(AZ_CRC("ScriptCanvasPreviewSettings", 0x1c5a2965), AZ::UserSettings::CT_LOCAL); + if (userSettings) + { + m_userNodePaletteWidth = userSettings->m_sceneContextMenuNodePaletteWidth; + } + const bool inContextMenu = true; Widget::ScriptCanvasNodePaletteConfig paletteConfig(paletteModel, assetModel, inContextMenu); AddNodePaletteMenuAction(paletteConfig); diff --git a/Gems/ScriptCanvas/Code/Editor/View/Windows/Tools/UpgradeTool/Controller.cpp b/Gems/ScriptCanvas/Code/Editor/View/Windows/Tools/UpgradeTool/Controller.cpp index dbcd176ee5..39cd6f565e 100644 --- a/Gems/ScriptCanvas/Code/Editor/View/Windows/Tools/UpgradeTool/Controller.cpp +++ b/Gems/ScriptCanvas/Code/Editor/View/Windows/Tools/UpgradeTool/Controller.cpp @@ -17,7 +17,6 @@ #include #include #include -#include #include #include #include @@ -30,7 +29,6 @@ #include #include #include -#include #include #include @@ -53,7 +51,6 @@ namespace ScriptCanvasEditor m_view->textEdit->setVerticalScrollBarPolicy(Qt::ScrollBarPolicy::ScrollBarAlwaysOn); connect(m_view->scanButton, &QPushButton::pressed, this, &Controller::OnButtonPressScan); connect(m_view->closeButton, &QPushButton::pressed, this, &Controller::OnButtonPressClose); - m_view->upgradeAllButton->setVisible(false); connect(m_view->upgradeAllButton, &QPushButton::pressed, this, &Controller::OnButtonPressUpgrade); m_view->progressBar->setValue(0); m_view->progressBar->setVisible(false); @@ -104,9 +101,9 @@ namespace ScriptCanvasEditor } } - QList Controller::FindTableItems(const AZ::Data::AssetInfo& info) + QList Controller::FindTableItems(const SourceHandle& info) { - return m_view->tableWidget->findItems(info.m_relativePath.c_str(), Qt::MatchFlag::MatchExactly); + return m_view->tableWidget->findItems(info.Path().c_str(), Qt::MatchFlag::MatchExactly); } void Controller::OnButtonPressClose() @@ -117,30 +114,20 @@ namespace ScriptCanvasEditor void Controller::OnButtonPressScan() { // \todo move to another file - auto isUpToDate = [this](AZ::Data::Asset asset) + auto isUpToDate = [this](const SourceHandle& asset) { - AZ::Entity* scriptCanvasEntity = nullptr; + auto graphComponent = asset.Get(); - if (asset.GetType() == azrtti_typeid()) - { - ScriptCanvasAsset* scriptCanvasAsset = asset.GetAs(); - if (!scriptCanvasAsset) - { - AZ_Warning - (ScriptCanvas::k_VersionExplorerWindow.data() - , false - , "InspectAsset: %s, AsestData failed to return ScriptCanvasAsset" - , asset.GetHint().c_str()); - return true; - } + AZ_Warning + ( ScriptCanvas::k_VersionExplorerWindow.data() + , asset.Get() != nullptr + , "InspectAsset: %s, failed to load valid graph" + , asset.Path().c_str()); - scriptCanvasEntity = scriptCanvasAsset->GetScriptCanvasEntity(); - AZ_Assert(scriptCanvasEntity, "The Script Canvas asset must have a valid entity"); - } - - auto graphComponent = scriptCanvasEntity->FindComponent(); - AZ_Assert(graphComponent, "The Script Canvas entity must have a Graph component"); - return !m_view->forceUpgrade->isChecked() && graphComponent->GetVersion().IsLatest(); + return graphComponent + && (!graphComponent->GetVersion().IsLatest() || m_view->forceUpgrade->isChecked()) + ? ScanConfiguration::Filter::Include + : ScanConfiguration::Filter::Exclude; }; ScanConfiguration config; @@ -156,59 +143,19 @@ namespace ScriptCanvasEditor OnButtonPressUpgradeImplementation({}); } - void Controller::OnButtonPressUpgradeImplementation(const AZ::Data::AssetInfo& assetInfo) + void Controller::OnButtonPressUpgradeImplementation(const SourceHandle& assetInfo) { - auto simpleUpdate = [this](AZ::Data::Asset asset) + auto simpleUpdate = [this](SourceHandle& asset) { - if (asset.GetType() == azrtti_typeid()) + AZ_Warning(ScriptCanvas::k_VersionExplorerWindow.data(), asset.Get() != nullptr + , "The Script Canvas asset must have a Graph component"); + + if (asset.Get()) { - ScriptCanvasAsset* scriptCanvasAsset = asset.GetAs(); - AZ_Assert(scriptCanvasAsset, "Unable to get the asset of ScriptCanvasAsset, but received type: %s" - , azrtti_typeid().template ToString().c_str()); - if (!scriptCanvasAsset) - { - return; - } - - AZ::Entity* scriptCanvasEntity = scriptCanvasAsset->GetScriptCanvasEntity(); - AZ_Assert(scriptCanvasEntity, "View::UpgradeGraph The Script Canvas asset must have a valid entity"); - if (!scriptCanvasEntity) - { - return; - } - - AZ::Entity* queryEntity = nullptr; - AZ::ComponentApplicationBus::BroadcastResult(queryEntity, &AZ::ComponentApplicationRequests::FindEntity, scriptCanvasEntity->GetId()); - if (queryEntity) - { - if (queryEntity->GetState() == AZ::Entity::State::Active) - { - queryEntity->Deactivate(); - } - - scriptCanvasEntity = queryEntity; - } - - if (scriptCanvasEntity->GetState() == AZ::Entity::State::Constructed) - { - scriptCanvasEntity->Init(); - } - - if (scriptCanvasEntity->GetState() == AZ::Entity::State::Init) - { - scriptCanvasEntity->Activate(); - } - - AZ_Assert(scriptCanvasEntity->GetState() == AZ::Entity::State::Active, "Graph entity is not active"); - auto graphComponent = scriptCanvasEntity->FindComponent(); - AZ_Assert(graphComponent, "The Script Canvas entity must have a Graph component"); - if (graphComponent) - { - graphComponent->UpgradeGraph - (asset - , m_view->forceUpgrade->isChecked() ? Graph::UpgradeRequest::Forced : Graph::UpgradeRequest::IfOutOfDate - , m_view->verbose->isChecked()); - } + asset.Mod()->UpgradeGraph + ( asset + , m_view->forceUpgrade->isChecked() ? Graph::UpgradeRequest::Forced : Graph::UpgradeRequest::IfOutOfDate + , m_view->verbose->isChecked()); } }; @@ -216,7 +163,7 @@ namespace ScriptCanvasEditor { int result = QMessageBox::No; QMessageBox mb - (QMessageBox::Warning + ( QMessageBox::Warning , QObject::tr("Failed to Save Upgraded File") , QObject::tr("The upgraded file could not be saved because the file is read only.\n" "Do you want to make it writeable and overwrite it?") @@ -235,12 +182,17 @@ namespace ScriptCanvasEditor ModelRequestsBus::Broadcast(&ModelRequestsTraits::Modify, config); } - void Controller::OnButtonPressUpgradeSingle(const AZ::Data::AssetInfo& assetInfo) + void Controller::OnButtonPressUpgradeSingle(const SourceHandle& info) { - OnButtonPressUpgradeImplementation(assetInfo); + OnButtonPressUpgradeImplementation(info); } - void Controller::OnUpgradeModificationBegin([[maybe_unused]] const ModifyConfiguration& config, const AZ::Data::AssetInfo& info) + void Controller::OnUpgradeDependencyWaitInterval([[maybe_unused]] const SourceHandle& info) + { + AddLogEntries(); + } + + void Controller::OnUpgradeModificationBegin([[maybe_unused]] const ModifyConfiguration& config, const SourceHandle& info) { for (auto* item : FindTableItems(info)) { @@ -252,16 +204,18 @@ namespace ScriptCanvasEditor void Controller::OnUpgradeModificationEnd ( [[maybe_unused]] const ModifyConfiguration& config - , const AZ::Data::AssetInfo& info + , const SourceHandle& info , ModificationResult result) { if (result.errorMessage.empty()) { - VE_LOG("Successfully modified %s", result.assetInfo.m_relativePath.c_str()); + VE_LOG("Successfully modified %s", result.asset.Path().c_str()); } else { - VE_LOG("Failed to modify %s: %s", result.assetInfo.m_relativePath.c_str(), result.errorMessage.data()); + VE_LOG("Failed to modify %s: %s", result.asset.Path().c_str(), result.errorMessage.data()); + AZ_Warning(ScriptCanvas::k_VersionExplorerWindow.data() + , false, "Failed to modify %s: %s", result.asset.Path().c_str(), result.errorMessage.data()); } for (auto* item : FindTableItems(info)) @@ -289,12 +243,10 @@ namespace ScriptCanvasEditor AddLogEntries(); } - void Controller::OnGraphUpgradeComplete(AZ::Data::Asset& asset, bool skipped) + void Controller::OnGraphUpgradeComplete(ScriptCanvasEditor::SourceHandle& asset, bool skipped) { ModificationResult result; result.asset = asset; - AZ::Data::AssetCatalogRequestBus::BroadcastResult - ( result.assetInfo, &AZ::Data::AssetCatalogRequests::GetAssetInfoById, asset.GetId()); if (skipped) { @@ -342,19 +294,19 @@ namespace ScriptCanvasEditor } } - void Controller::OnScanFilteredGraph(const AZ::Data::AssetInfo& info) + void Controller::OnScanFilteredGraph(const SourceHandle& info) { OnScannedGraph(info, Filtered::Yes); } - void Controller::OnScannedGraph(const AZ::Data::AssetInfo& assetInfo, [[maybe_unused]] Filtered filtered) + void Controller::OnScannedGraph(const SourceHandle& assetInfo, [[maybe_unused]] Filtered filtered) { const int rowIndex = m_view->tableWidget->rowCount(); if (filtered == Filtered::No || !m_view->onlyShowOutdated->isChecked()) { m_view->tableWidget->insertRow(rowIndex); - QTableWidgetItem* rowName = new QTableWidgetItem(tr(assetInfo.m_relativePath.c_str())); + QTableWidgetItem* rowName = new QTableWidgetItem(tr(assetInfo.Path().c_str())); m_view->tableWidget->setItem(rowIndex, static_cast(ColumnAsset), rowName); SetRowSucceeded(rowIndex); @@ -376,17 +328,11 @@ namespace ScriptCanvasEditor m_view->tableWidget->setCellWidget(rowIndex, static_cast(ColumnAction), upgradeButton); } - - char resolvedBuffer[AZ_MAX_PATH_LEN] = { 0 }; - AZStd::string path = AZStd::string::format("@devroot@/%s", assetInfo.m_relativePath.c_str()); - AZ::IO::FileIOBase::GetInstance()->ResolvePath(path.c_str(), resolvedBuffer, AZ_MAX_PATH_LEN); - AZ::StringFunc::Path::GetFullPath(resolvedBuffer, path); - AZ::StringFunc::Path::Normalize(path); - + bool result = false; AZ::Data::AssetInfo info; AZStd::string watchFolder; - QByteArray assetNameUtf8 = assetInfo.m_relativePath.c_str(); + QByteArray assetNameUtf8 = assetInfo.Path().c_str(); AzToolsFramework::AssetSystemRequestBus::BroadcastResult ( result , &AzToolsFramework::AssetSystemRequestBus::Events::GetSourceInfoBySourcePath @@ -413,41 +359,41 @@ namespace ScriptCanvasEditor OnScannedGraphResult(assetInfo); } - void Controller::OnScannedGraphResult([[maybe_unused]] const AZ::Data::AssetInfo& info) + void Controller::OnScannedGraphResult([[maybe_unused]] const SourceHandle& info) { m_view->progressBar->setValue(aznumeric_cast(m_handledAssetCount)); ++m_handledAssetCount; AddLogEntries(); } - void Controller::OnScanLoadFailure(const AZ::Data::AssetInfo& info) + void Controller::OnScanLoadFailure(const SourceHandle& info) { const int rowIndex = m_view->tableWidget->rowCount(); m_view->tableWidget->insertRow(rowIndex); QTableWidgetItem* rowName = new QTableWidgetItem - ( tr(AZStd::string::format("Load Error: %s", info.m_relativePath.c_str()).c_str())); + ( tr(AZStd::string::format("Load Error: %s", info.Path().c_str()).c_str())); m_view->tableWidget->setItem(rowIndex, static_cast(ColumnAsset), rowName); SetRowFailed(rowIndex, "Load failed"); OnScannedGraphResult(info); } - void Controller::OnScanUnFilteredGraph(const AZ::Data::AssetInfo& info) + void Controller::OnScanUnFilteredGraph(const SourceHandle& info) { OnScannedGraph(info, Filtered::No); } void Controller::OnUpgradeBegin ( const ModifyConfiguration& config - , [[maybe_unused]] const WorkingAssets& assets) + , [[maybe_unused]] const AZStd::vector& assets) { QString spinnerText = QStringLiteral("Upgrade in progress - "); - if (config.modifySingleAsset.m_assetId.IsValid()) + if (!config.modifySingleAsset.Path().empty()) { spinnerText.append(" single graph"); if (assets.size() == 1) { - for (auto* item : FindTableItems(assets.front().info)) + for (auto* item : FindTableItems(assets.front())) { int row = item->row(); SetRowBusy(row); @@ -498,7 +444,7 @@ namespace ScriptCanvasEditor m_view->scanButton->setEnabled(true); } - void Controller::OnUpgradeDependenciesGathered(const AZ::Data::AssetInfo& info, Result result) + void Controller::OnUpgradeDependenciesGathered(const SourceHandle& info, Result result) { for (auto* item : FindTableItems(info)) { @@ -527,7 +473,7 @@ namespace ScriptCanvasEditor void Controller::OnUpgradeDependencySortBegin ( [[maybe_unused]] const ModifyConfiguration& config - , const WorkingAssets& assets) + , const AZStd::vector& assets) { m_handledAssetCount = 0; m_view->progressBar->setVisible(true); @@ -553,7 +499,7 @@ namespace ScriptCanvasEditor void Controller::OnUpgradeDependencySortEnd ( [[maybe_unused]] const ModifyConfiguration& config - , const WorkingAssets& assets + , const AZStd::vector& assets , [[maybe_unused]] const AZStd::vector& sortedOrder) { m_handledAssetCount = 0; diff --git a/Gems/ScriptCanvas/Code/Editor/View/Windows/Tools/UpgradeTool/Controller.h b/Gems/ScriptCanvas/Code/Editor/View/Windows/Tools/UpgradeTool/Controller.h index 9842ea3da4..ab428c0ba3 100644 --- a/Gems/ScriptCanvas/Code/Editor/View/Windows/Tools/UpgradeTool/Controller.h +++ b/Gems/ScriptCanvas/Code/Editor/View/Windows/Tools/UpgradeTool/Controller.h @@ -65,37 +65,38 @@ namespace ScriptCanvasEditor void AddLogEntries(); void EnableAllUpgradeButtons(); - QList FindTableItems(const AZ::Data::AssetInfo& assetInfo); + QList FindTableItems(const SourceHandle& assetInfo); void OnButtonPressClose(); void OnButtonPressScan(); void OnButtonPressUpgrade(); - void OnButtonPressUpgradeImplementation(const AZ::Data::AssetInfo& assetInfo); - void OnButtonPressUpgradeSingle(const AZ::Data::AssetInfo& assetInfo); + void OnButtonPressUpgradeImplementation(const SourceHandle& assetInfo); + void OnButtonPressUpgradeSingle(const SourceHandle& assetInfo); - void OnGraphUpgradeComplete(AZ::Data::Asset&, bool skipped) override; + void OnGraphUpgradeComplete(SourceHandle&, bool skipped) override; void OnScanBegin(size_t assetCount) override; void OnScanComplete(const ScanResult& result) override; - void OnScanFilteredGraph(const AZ::Data::AssetInfo& info) override; - void OnScanLoadFailure(const AZ::Data::AssetInfo& info) override; - void OnScanUnFilteredGraph(const AZ::Data::AssetInfo& info) override; + void OnScanFilteredGraph(const SourceHandle& info) override; + void OnScanLoadFailure(const SourceHandle& info) override; + void OnScanUnFilteredGraph(const SourceHandle& info) override; enum class Filtered { No, Yes }; - void OnScannedGraph(const AZ::Data::AssetInfo& info, Filtered filtered); - void OnScannedGraphResult(const AZ::Data::AssetInfo& info); + void OnScannedGraph(const SourceHandle& info, Filtered filtered); + void OnScannedGraphResult(const SourceHandle& info); // for single operation UI updates, just check the assets size, or note it on the request - void OnUpgradeBegin(const ModifyConfiguration& config, const WorkingAssets& assets) override; + void OnUpgradeBegin(const ModifyConfiguration& config, const AZStd::vector& assets) override; void OnUpgradeComplete(const ModificationResults& results) override; - void OnUpgradeDependenciesGathered(const AZ::Data::AssetInfo& info, Result result) override; - void OnUpgradeDependencySortBegin(const ModifyConfiguration& config, const WorkingAssets& assets) override; + void OnUpgradeDependenciesGathered(const SourceHandle& info, Result result) override; + void OnUpgradeDependencySortBegin(const ModifyConfiguration& config, const AZStd::vector& assets) override; void OnUpgradeDependencySortEnd ( const ModifyConfiguration& config - , const WorkingAssets& assets + , const AZStd::vector& assets , const AZStd::vector& sortedOrder) override; - void OnUpgradeModificationBegin(const ModifyConfiguration& config, const AZ::Data::AssetInfo& info) override; - void OnUpgradeModificationEnd(const ModifyConfiguration& config, const AZ::Data::AssetInfo& info, ModificationResult result) override; - + void OnUpgradeDependencyWaitInterval(const SourceHandle& info) override; + void OnUpgradeModificationBegin(const ModifyConfiguration& config, const SourceHandle& info) override; + void OnUpgradeModificationEnd(const ModifyConfiguration& config, const SourceHandle& info, ModificationResult result) override; + void SetLoggingPreferences(); void SetSpinnerIsBusy(bool isBusy); void SetRowBusy(int index); diff --git a/Gems/ScriptCanvas/Code/Editor/View/Windows/Tools/UpgradeTool/FileSaver.cpp b/Gems/ScriptCanvas/Code/Editor/View/Windows/Tools/UpgradeTool/FileSaver.cpp index f067feeca4..f703bb17b1 100644 --- a/Gems/ScriptCanvas/Code/Editor/View/Windows/Tools/UpgradeTool/FileSaver.cpp +++ b/Gems/ScriptCanvas/Code/Editor/View/Windows/Tools/UpgradeTool/FileSaver.cpp @@ -8,44 +8,13 @@ #include #include -#include +#include #include #include #include #include #include -#include - -namespace FileSaverCpp -{ - class FileEventHandler - : public AZ::IO::FileIOEventBus::Handler - { - public: - int m_errorCode = 0; - AZStd::string m_fileName; - - FileEventHandler() - { - BusConnect(); - } - - ~FileEventHandler() - { - BusDisconnect(); - } - - void OnError(const AZ::IO::SystemFile* /*file*/, const char* fileName, int errorCode) override - { - m_errorCode = errorCode; - - if (fileName) - { - m_fileName = fileName; - } - } - }; -} +#include namespace ScriptCanvasEditor { @@ -58,19 +27,22 @@ namespace ScriptCanvasEditor , m_onComplete(onComplete) {} + const SourceHandle& FileSaver::GetSource() const + { + return m_source; + } + void FileSaver::PerformMove ( AZStd::string tmpFileName , AZStd::string target , size_t remainingAttempts) { - FileSaverCpp::FileEventHandler fileEventHandler; - if (remainingAttempts == 0) { AZ::SystemTickBus::QueueFunction([this, tmpFileName]() { FileSaveResult result; - result.fileSaveError = "Failed to move updated file from temporary location to tmpFileName destination"; + result.fileSaveError = "Failed to move updated file from temporary location to original destination."; result.tempFileRemovalError = RemoveTempFile(tmpFileName); m_onComplete(result); }); @@ -98,7 +70,9 @@ namespace ScriptCanvasEditor auto streamer = AZ::Interface::Get(); AZ::IO::FileRequestPtr flushRequest = streamer->FlushCache(target.c_str()); // Bump the slice asset up in the asset processor's queue. - AzFramework::AssetSystemRequestBus::Broadcast(&AzFramework::AssetSystem::AssetSystemRequests::EscalateAssetBySearchTerm, target.c_str()); + AzFramework::AssetSystemRequestBus::Broadcast + (&AzFramework::AssetSystem::AssetSystemRequests::EscalateAssetBySearchTerm, target.c_str()); + AZ::SystemTickBus::QueueFunction([this, tmpFileName]() { FileSaveResult result; @@ -108,28 +82,29 @@ namespace ScriptCanvasEditor } else { - AZ_Warning(ScriptCanvas::k_VersionExplorerWindow.data(), false, "moving converted file to tmpFileName destination failed: %s, trying again", target.c_str()); + AZ_Warning(ScriptCanvas::k_VersionExplorerWindow.data(), false + , "moving converted file to tmpFileName destination failed: %s, trying again", target.c_str()); auto streamer = AZ::Interface::Get(); AZ::IO::FileRequestPtr flushRequest = streamer->FlushCache(target.c_str()); - streamer->SetRequestCompleteCallback(flushRequest, [this, tmpFileName, target, remainingAttempts]([[maybe_unused]] AZ::IO::FileRequestHandle request) + streamer->SetRequestCompleteCallback(flushRequest + , [this, tmpFileName, target, remainingAttempts]([[maybe_unused]] AZ::IO::FileRequestHandle request) { // Continue saving. - AZ::SystemTickBus::QueueFunction([this, tmpFileName, target, remainingAttempts]() { PerformMove(tmpFileName, target, remainingAttempts - 1); }); + AZ::SystemTickBus::QueueFunction( + [this, tmpFileName, target, remainingAttempts]() { PerformMove(tmpFileName, target, remainingAttempts - 1); }); }); streamer->QueueRequest(flushRequest); } } } - void FileSaver::OnSourceFileReleased(AZ::Data::Asset asset) + void FileSaver::OnSourceFileReleased(const SourceHandle& source) { - AZStd::string relativePath, fullPath; - AZ::Data::AssetCatalogRequestBus::BroadcastResult(relativePath, &AZ::Data::AssetCatalogRequests::GetAssetPathById, asset.GetId()); - bool fullPathFound = false; - AzToolsFramework::AssetSystemRequestBus::BroadcastResult(fullPathFound, &AzToolsFramework::AssetSystemRequestBus::Events::GetFullSourcePathFromRelativeProductPath, relativePath, fullPath); + AZStd::string fullPath = source.Path().c_str(); AZStd::string tmpFileName; // here we are saving the graph to a temp file instead of the original file and then copying the temp file to the original file. - // This ensures that AP will not a get a file change notification on an incomplete graph file causing it to fail processing. Temp files are ignored by AP. + // This ensures that AP will not a get a file change notification on an incomplete graph file causing it to fail processing. + // Temp files are ignored by AP. if (!AZ::IO::CreateTempFileName(fullPath.c_str(), tmpFileName)) { FileSaveResult result; @@ -138,23 +113,24 @@ namespace ScriptCanvasEditor return; } - bool tempSavedSucceeded = false; + AZStd::string saveError; + AZ::IO::FileIOStream fileStream(tmpFileName.c_str(), AZ::IO::OpenMode::ModeWrite | AZ::IO::OpenMode::ModeText); if (fileStream.IsOpen()) { - if (asset.GetType() == azrtti_typeid()) + auto saveOutcome = ScriptCanvasEditor::SaveToStream(source, fileStream); + if (!saveOutcome.IsSuccess()) { - ScriptCanvasEditor::ScriptCanvasAssetHandler handler; - tempSavedSucceeded = handler.SaveAssetData(asset, &fileStream); + saveError = saveOutcome.TakeError(); } fileStream.Close(); } - if (!tempSavedSucceeded) + if (!saveError.empty()) { FileSaveResult result; - result.fileSaveError = "Save asset data to temporary file failed"; + result.fileSaveError = AZStd::string::format("Save asset data to temporary file failed: %s", saveError.c_str()); m_onComplete(result); return; } @@ -164,26 +140,26 @@ namespace ScriptCanvasEditor , fullPath.c_str() , true , [this, fullPath, tmpFileName]([[maybe_unused]] bool success, const AzToolsFramework::SourceControlFileInfo& info) - { - constexpr const size_t k_maxAttemps = 10; + { + constexpr const size_t k_maxAttemps = 10; - if (!info.IsReadOnly()) - { - PerformMove(tmpFileName, fullPath, k_maxAttemps); - } - else if (m_onReadOnlyFile && m_onReadOnlyFile()) - { - AZ::IO::SystemFile::SetWritable(info.m_filePath.c_str(), true); - PerformMove(tmpFileName, fullPath, k_maxAttemps); - } - else - { - FileSaveResult result; - result.fileSaveError = "Source file was and remained read-only"; - result.tempFileRemovalError = RemoveTempFile(tmpFileName); - m_onComplete(result); - } - }); + if (!info.IsReadOnly()) + { + PerformMove(tmpFileName, fullPath, k_maxAttemps); + } + else if (m_onReadOnlyFile && m_onReadOnlyFile()) + { + AZ::IO::SystemFile::SetWritable(info.m_filePath.c_str(), true); + PerformMove(tmpFileName, fullPath, k_maxAttemps); + } + else + { + FileSaveResult result; + result.fileSaveError = "Source file was and remained read-only"; + result.tempFileRemovalError = RemoveTempFile(tmpFileName); + m_onComplete(result); + } + }); } AZStd::string FileSaver::RemoveTempFile(AZStd::string_view tempFile) @@ -191,7 +167,7 @@ namespace ScriptCanvasEditor AZ::IO::FileIOBase* fileIO = AZ::IO::FileIOBase::GetInstance(); if (!fileIO) { - return "GraphUpgradeComplete: No FileIO instance"; + return "No FileIO instance"; } if (fileIO->Exists(tempFile.data()) && !fileIO->Remove(tempFile.data())) @@ -202,30 +178,30 @@ namespace ScriptCanvasEditor return ""; } - void FileSaver::Save(AZ::Data::Asset asset) + void FileSaver::Save(const SourceHandle& source) { - AZStd::string relativePath, fullPath; - AZ::Data::AssetCatalogRequestBus::BroadcastResult(relativePath, &AZ::Data::AssetCatalogRequests::GetAssetPathById, asset.GetId()); - bool fullPathFound = false; - AzToolsFramework::AssetSystemRequestBus::BroadcastResult - (fullPathFound - , &AzToolsFramework::AssetSystemRequestBus::Events::GetFullSourcePathFromRelativeProductPath - , relativePath, fullPath); + m_source = source; - if (!fullPathFound) + if (source.Path().empty()) { FileSaveResult result; - result.fileSaveError = "Full source path not found"; + result.fileSaveError = "No save location specified"; m_onComplete(result); } else { auto streamer = AZ::Interface::Get(); - AZ::IO::FileRequestPtr flushRequest = streamer->FlushCache(fullPath); - streamer->SetRequestCompleteCallback(flushRequest, [this, asset]([[maybe_unused]] AZ::IO::FileRequestHandle request) + AZ::IO::FileRequestPtr flushRequest = streamer->FlushCache(source.Path().c_str()); + streamer->SetRequestCompleteCallback(flushRequest, [this]([[maybe_unused]] AZ::IO::FileRequestHandle request) { - this->OnSourceFileReleased(asset); + AZStd::lock_guard lock(m_mutex); + if (!m_sourceFileReleased) + { + m_sourceFileReleased = true; + AZ::SystemTickBus::QueueFunction([this]() { this->OnSourceFileReleased(m_source); }); + } }); + streamer->QueueRequest(flushRequest); } } diff --git a/Gems/ScriptCanvas/Code/Editor/View/Windows/Tools/UpgradeTool/FileSaver.h b/Gems/ScriptCanvas/Code/Editor/View/Windows/Tools/UpgradeTool/FileSaver.h index dd333927ed..e87ee060f7 100644 --- a/Gems/ScriptCanvas/Code/Editor/View/Windows/Tools/UpgradeTool/FileSaver.h +++ b/Gems/ScriptCanvas/Code/Editor/View/Windows/Tools/UpgradeTool/FileSaver.h @@ -29,14 +29,19 @@ namespace ScriptCanvasEditor ( AZStd::function onReadOnlyFile , AZStd::function onComplete); - void Save(AZ::Data::Asset asset); + const SourceHandle& GetSource() const; + void Save(const SourceHandle& source); private: + AZStd::mutex m_mutex; + + bool m_sourceFileReleased = false; + SourceHandle m_source; AZStd::function m_onComplete; AZStd::function m_onReadOnlyFile; - void OnSourceFileReleased(AZ::Data::Asset asset); - + void OnSourceFileReleased(const SourceHandle& source); + void PerformMove ( AZStd::string source , AZStd::string target diff --git a/Gems/ScriptCanvas/Code/Editor/View/Windows/Tools/UpgradeTool/Model.cpp b/Gems/ScriptCanvas/Code/Editor/View/Windows/Tools/UpgradeTool/Model.cpp index d8d242adbb..9714390022 100644 --- a/Gems/ScriptCanvas/Code/Editor/View/Windows/Tools/UpgradeTool/Model.cpp +++ b/Gems/ScriptCanvas/Code/Editor/View/Windows/Tools/UpgradeTool/Model.cpp @@ -8,11 +8,10 @@ #include #include -#include #include #include #include -#include + namespace ModifierCpp { @@ -101,7 +100,7 @@ namespace ScriptCanvasEditor return; } - if (modification.modifySingleAsset.m_assetId.IsValid()) + if (!modification.modifySingleAsset.Path().empty()) { const auto& results = m_scanner->GetResult(); auto iter = AZStd::find_if @@ -109,7 +108,7 @@ namespace ScriptCanvasEditor , results.m_unfiltered.end() , [&modification](const auto& candidate) { - return candidate.info.m_assetId == modification.modifySingleAsset.m_assetId; + return candidate.AnyEquals(modification.modifySingleAsset); }); if (iter == results.m_unfiltered.end()) @@ -120,7 +119,7 @@ namespace ScriptCanvasEditor m_state = State::ModifySingle; - m_modifier = AZStd::make_unique(modification, WorkingAssets{ *iter }, [this]() { OnModificationComplete(); }); + m_modifier = AZStd::make_unique(modification, AZStd::vector{ *iter }, [this]() { OnModificationComplete(); }); } else { @@ -145,6 +144,7 @@ namespace ScriptCanvasEditor } Idle(); + RestoreSettings(); } void Model::OnScanComplete() @@ -161,6 +161,7 @@ namespace ScriptCanvasEditor return; } + CacheSettings(); m_state = State::Scanning; m_log.Activate(); m_keepEditorAlive = AZStd::make_unique(); diff --git a/Gems/ScriptCanvas/Code/Editor/View/Windows/Tools/UpgradeTool/ModelTraits.h b/Gems/ScriptCanvas/Code/Editor/View/Windows/Tools/UpgradeTool/ModelTraits.h index 01eb200542..9351d8c26c 100644 --- a/Gems/ScriptCanvas/Code/Editor/View/Windows/Tools/UpgradeTool/ModelTraits.h +++ b/Gems/ScriptCanvas/Code/Editor/View/Windows/Tools/UpgradeTool/ModelTraits.h @@ -9,53 +9,52 @@ #include #include +#include namespace ScriptCanvasEditor { namespace VersionExplorer { - struct WorkingAsset - { - AZ::Data::Asset asset; - AZ::Data::AssetInfo info; - }; - - using WorkingAssets = AZStd::vector; - struct ModifyConfiguration { - AZStd::function)> modification; + AZStd::function modification; AZStd::function onReadOnlyFile; - AZ::Data::AssetInfo modifySingleAsset; + SourceHandle modifySingleAsset; bool backupGraphBeforeModification = false; bool successfulDependencyUpgradeRequired = true; + AZ::s32 perDependencyWaitSecondsMax = 20; }; struct ModificationResult { - AZ::Data::Asset asset; - AZ::Data::AssetInfo assetInfo; + SourceHandle asset; AZStd::string errorMessage; }; struct ModificationResults { - AZStd::vector m_successes; + AZStd::vector m_successes; AZStd::vector m_failures; }; struct ScanConfiguration { - AZStd::function)> filter; + enum class Filter + { + Include, + Exclude + }; + + AZStd::function filter; bool reportFilteredGraphs = false; }; struct ScanResult { - AZStd::vector m_catalogAssets; - WorkingAssets m_unfiltered; - AZStd::vector m_filteredAssets; - AZStd::vector m_loadErrors; + AZStd::vector m_catalogAssets; + AZStd::vector m_unfiltered; + AZStd::vector m_filteredAssets; + AZStd::vector m_loadErrors; }; enum Result @@ -88,20 +87,21 @@ namespace ScriptCanvasEditor public: virtual void OnScanBegin(size_t assetCount) = 0; virtual void OnScanComplete(const ScanResult& result) = 0; - virtual void OnScanFilteredGraph(const AZ::Data::AssetInfo& info) = 0; - virtual void OnScanLoadFailure(const AZ::Data::AssetInfo& info) = 0; - virtual void OnScanUnFilteredGraph(const AZ::Data::AssetInfo& info) = 0; + virtual void OnScanFilteredGraph(const SourceHandle& info) = 0; + virtual void OnScanLoadFailure(const SourceHandle& info) = 0; + virtual void OnScanUnFilteredGraph(const SourceHandle& info) = 0; - virtual void OnUpgradeBegin(const ModifyConfiguration& config, const WorkingAssets& assets) = 0; + virtual void OnUpgradeBegin(const ModifyConfiguration& config, const AZStd::vector& assets) = 0; virtual void OnUpgradeComplete(const ModificationResults& results) = 0; - virtual void OnUpgradeDependenciesGathered(const AZ::Data::AssetInfo& info, Result result) = 0; - virtual void OnUpgradeDependencySortBegin(const ModifyConfiguration& config, const WorkingAssets& assets) = 0; + virtual void OnUpgradeDependenciesGathered(const SourceHandle& info, Result result) = 0; + virtual void OnUpgradeDependencySortBegin(const ModifyConfiguration& config, const AZStd::vector& assets) = 0; virtual void OnUpgradeDependencySortEnd ( const ModifyConfiguration& config - , const WorkingAssets& assets + , const AZStd::vector& assets , const AZStd::vector& sortedOrder) = 0; - virtual void OnUpgradeModificationBegin(const ModifyConfiguration& config, const AZ::Data::AssetInfo& info) = 0; - virtual void OnUpgradeModificationEnd(const ModifyConfiguration& config, const AZ::Data::AssetInfo& info, ModificationResult result) = 0; + virtual void OnUpgradeDependencyWaitInterval(const SourceHandle& info) = 0; + virtual void OnUpgradeModificationBegin(const ModifyConfiguration& config, const SourceHandle& info) = 0; + virtual void OnUpgradeModificationEnd(const ModifyConfiguration& config, const SourceHandle& info, ModificationResult result) = 0; }; using ModelNotificationsBus = AZ::EBus; } diff --git a/Gems/ScriptCanvas/Code/Editor/View/Windows/Tools/UpgradeTool/Modifier.cpp b/Gems/ScriptCanvas/Code/Editor/View/Windows/Tools/UpgradeTool/Modifier.cpp index f3da1ba309..37439c5703 100644 --- a/Gems/ScriptCanvas/Code/Editor/View/Windows/Tools/UpgradeTool/Modifier.cpp +++ b/Gems/ScriptCanvas/Code/Editor/View/Windows/Tools/UpgradeTool/Modifier.cpp @@ -6,24 +6,21 @@ * */ +#include #include #include #include -#include + +#include #include -namespace ModifierCpp -{ - -} - namespace ScriptCanvasEditor { namespace VersionExplorer { Modifier::Modifier ( const ModifyConfiguration& modification - , WorkingAssets&& assets + , AZStd::vector&& assets , AZStd::function onComplete) : m_state(State::GatheringDependencies) , m_config(modification) @@ -33,46 +30,98 @@ namespace ScriptCanvasEditor AZ_Assert(m_config.modification, "No modification function provided"); ModelNotificationsBus::Broadcast(&ModelNotificationsTraits::OnUpgradeBegin, modification, m_assets); AZ::SystemTickBus::Handler::BusConnect(); + AzFramework::AssetSystemInfoBus::Handler::BusConnect(); + m_result.asset = m_assets[GetCurrentIndex()]; } - const AZ::Data::AssetInfo& Modifier::GetCurrentAsset() const + Modifier::~Modifier() { - return m_state == State::GatheringDependencies - ? m_assets[m_assetIndex].info - : m_assets[m_dependencyOrderedAssetIndicies[m_assetIndex]].info; + AzFramework::AssetSystemInfoBus::Handler::BusDisconnect(); } - AZStd::unordered_set& Modifier::GetOrCreateDependencyIndexSet() + bool Modifier::AllDependenciesCleared(const AZStd::unordered_set& dependencies) const { - auto iter = m_dependencies.find(m_assetIndex); - if (iter == m_dependencies.end()) + for (auto index : dependencies) { - iter = m_dependencies.insert_or_assign(m_assetIndex, AZStd::unordered_set()).first; + SourceHandle dependency = m_assets[index]; + CompleteDescriptionInPlace(dependency); + + if (dependency.Id().IsNull() || !m_assetsCompletedByAP.contains(dependency.Id())) + { + return false; + } } - return iter->second; + return true; } - const ModificationResults& Modifier::GetResult() const + bool Modifier::AnyDependenciesFailed(const AZStd::unordered_set& dependencies) const { - return m_results; + for (auto index : dependencies) + { + SourceHandle dependency = m_assets[index]; + CompleteDescriptionInPlace(dependency); + + if (dependency.Id().IsNull() || m_assetsFailedByAP.contains(dependency.Id())) + { + return true; + } + } + + return false; } - + + void Modifier::AssetCompilationSuccess([[maybe_unused]] const AZStd::string& assetPath) + { + AZStd::lock_guard lock(m_mutex); + m_successNotifications.insert(assetPath); + } + + void Modifier::AssetCompilationFailed(const AZStd::string& assetPath) + { + AZStd::lock_guard lock(m_mutex); + m_failureNotifications.insert(assetPath); + } + + AZStd::sys_time_t Modifier::CalculateRemainingWaitTime(const AZStd::unordered_set& dependencies) const + { + auto maxSeconds = AZStd::chrono::seconds(dependencies.size() * m_config.perDependencyWaitSecondsMax); + auto waitedSeconds = AZStd::chrono::seconds(AZStd::chrono::system_clock::now() - m_waitTimeStamp); + return (maxSeconds - waitedSeconds).count(); + } + + void Modifier::CheckDependencies() + { + ModelNotificationsBus::Broadcast(&ModelNotificationsTraits::OnUpgradeModificationBegin, m_config, m_result.asset); + + if (auto dependencies = GetDependencies(GetCurrentIndex()); dependencies != nullptr && !dependencies->empty()) + { + VE_LOG + ( "dependencies found for %s, update will wait for the AP to finish processing them" + , m_result.asset.Path().c_str()); + + m_waitTimeStamp = AZStd::chrono::system_clock::now(); + m_waitLogTimeStamp = AZStd::chrono::system_clock::time_point{}; + m_modifyState = ModifyState::WaitingForDependencyProcessing; + } + else + { + m_modifyState = ModifyState::StartModification; + } + } + void Modifier::GatherDependencies() { AZ::SerializeContext* serializeContext{}; AZ::ComponentApplicationBus::BroadcastResult(serializeContext, &AZ::ComponentApplicationBus::Events::GetSerializeContext); AZ_Assert(serializeContext, "SerializeContext is required to enumerate dependent assets in the ScriptCanvas file"); + LoadAsset(); bool anyFailures = false; - auto asset = LoadAsset(); - if (asset - && asset.GetAs() - && asset.GetAs()->GetScriptCanvasGraph() - && asset.GetAs()->GetScriptCanvasGraph()->GetGraphData()) + if (m_result.asset.Get() && m_result.asset.Mod()->GetGraphData()) { - auto graphData = asset.GetAs()->GetScriptCanvasGraph()->GetGraphData(); + auto graphData = m_result.asset.Mod()->GetGraphData(); auto dependencyGrabber = [this] ( void* instancePointer @@ -108,70 +157,101 @@ namespace ScriptCanvasEditor { anyFailures = true; VE_LOG("Modifier: ERROR - Failed to gather dependencies from graph data: %s" - , GetCurrentAsset().m_relativePath.c_str()) + , m_result.asset.Path().c_str()) } } else { anyFailures = true; VE_LOG("Modifier: ERROR - Failed to load asset %s for modification, even though it scanned properly" - , GetCurrentAsset().m_relativePath.c_str()); + , m_result.asset.Path().c_str()); } - + ModelNotificationsBus::Broadcast ( &ModelNotificationsTraits::OnUpgradeDependenciesGathered - , GetCurrentAsset() + , m_result.asset , anyFailures ? Result::Failure : Result::Success); - - // Flush asset database events to ensure no asset references are held by closures queued on Ebuses. - AZ::Data::AssetManager::Instance().DispatchEvents(); } - AZ::Data::Asset Modifier::LoadAsset() + size_t Modifier::GetCurrentIndex() const { - AZ::Data::Asset asset = AZ::Data::AssetManager::Instance().GetAsset - ( GetCurrentAsset().m_assetId - , azrtti_typeid() - , AZ::Data::AssetLoadBehavior::PreLoad); + return m_state == State::GatheringDependencies + ? m_assetIndex + : m_dependencyOrderedAssetIndicies[m_assetIndex]; + } - asset.BlockUntilLoadComplete(); + const AZStd::unordered_set* Modifier::GetDependencies(size_t index) const + { + auto iter = m_dependencies.find(index); + return iter != m_dependencies.end() ? &iter->second : nullptr; + } - if (asset.IsReady()) + AZStd::unordered_set& Modifier::GetOrCreateDependencyIndexSet() + { + auto iter = m_dependencies.find(m_assetIndex); + if (iter == m_dependencies.end()) { - return asset; + iter = m_dependencies.insert_or_assign(m_assetIndex, AZStd::unordered_set()).first; } - else + + return iter->second; + } + + const ModificationResults& Modifier::GetResult() const + { + return m_results; + } + + void Modifier::InitializeResult() + { + m_result = {}; + + if (m_assetIndex != m_assets.size()) { - return {}; + m_result.asset = m_assets[GetCurrentIndex()]; + CompleteDescriptionInPlace(m_result.asset); + m_attemptedAssets.insert(m_result.asset.Id()); + } + } + + void Modifier::LoadAsset() + { + auto& handle = m_result.asset; + if (!handle.IsGraphValid()) + { + auto outcome = LoadFromFile(handle.Path().c_str()); + if (outcome.IsSuccess()) + { + handle = outcome.TakeValue(); + } } } void Modifier::ModificationComplete(const ModificationResult& result) { - m_result = result; - - if (result.errorMessage.empty()) + if (!result.errorMessage.empty()) { - SaveModifiedGraph(result); + ReportModificationError(result.errorMessage); + } + else if (m_result.asset.Describe() != result.asset.Describe()) + { + ReportModificationError("Received modification complete notification for different result"); } else { - ReportModificationError(result.errorMessage); + SaveModifiedGraph(result); } } void Modifier::ModifyCurrentAsset() { - m_result = {}; - m_result.assetInfo = GetCurrentAsset(); + LoadAsset(); - ModelNotificationsBus::Broadcast(&ModelNotificationsTraits::OnUpgradeModificationBegin, m_config, GetCurrentAsset()); - - if (auto asset = LoadAsset()) + if (m_result.asset.IsGraphValid()) { ModificationNotificationsBus::Handler::BusConnect(); m_modifyState = ModifyState::InProgress; - m_config.modification(asset); + m_config.modification(m_result.asset); } else { @@ -179,44 +259,17 @@ namespace ScriptCanvasEditor } } - void Modifier::ModifyNextAsset() + void Modifier::NextAsset() { - ModelNotificationsBus::Broadcast - ( &ModelNotificationsTraits::OnUpgradeModificationEnd, m_config, GetCurrentAsset(), m_result); - ModificationNotificationsBus::Handler::BusDisconnect(); - m_modifyState = ModifyState::Idle; ++m_assetIndex; - m_result = {}; + InitializeResult(); } - void Modifier::ReportModificationError(AZStd::string_view report) + void Modifier::NextModification() { - m_result.asset = {}; - m_result.errorMessage = report; - m_results.m_failures.push_back(m_result); - ModifyNextAsset(); - } - - void Modifier::ReportModificationSuccess() - { - m_results.m_successes.push_back(m_result.assetInfo); - ModifyNextAsset(); - } - - void Modifier::ReportSaveResult() - { - AZStd::lock_guard lock(m_mutex); - m_fileSaver.reset(); - - if (m_fileSaveResult.fileSaveError.empty()) - { - ReportModificationSuccess(); - } - else - { - ReportModificationError(m_fileSaveResult.fileSaveError); - } - + ModelNotificationsBus::Broadcast( &ModelNotificationsTraits::OnUpgradeModificationEnd, m_config, m_result.asset, m_result); + ModificationNotificationsBus::Handler::BusDisconnect(); + NextAsset(); m_fileSaveResult = {}; m_modifyState = ModifyState::Idle; } @@ -226,8 +279,8 @@ namespace ScriptCanvasEditor if (!result.tempFileRemovalError.empty()) { VE_LOG - ( "Temporary file not removed for %s: %s" - , m_result.assetInfo.m_relativePath.c_str() + ("Temporary file not removed for %s: %s" + , m_result.asset.Path().c_str() , result.tempFileRemovalError.c_str()); } @@ -254,12 +307,84 @@ namespace ScriptCanvasEditor AZ::SystemTickBus::ExecuteQueuedEvents(); } + void Modifier::ProcessNotifications() + { + AZStd::lock_guard lock(m_mutex); + + for (const auto& assetPath : m_successNotifications) + { + VE_LOG("received AssetCompilationSuccess: %s", assetPath.c_str()); + SourceHandle sourceHandle(nullptr, {}, assetPath.c_str()); + CompleteDescriptionInPlace(sourceHandle); + + if (m_attemptedAssets.contains(sourceHandle.Id())) + { + m_assetsCompletedByAP.insert(sourceHandle.Id()); + } + } + + m_successNotifications.clear(); + + for (const auto& assetPath : m_failureNotifications) + { + VE_LOG("received AssetCompilationFailed: %s", assetPath.c_str()); + SourceHandle sourceHandle(nullptr, {}, assetPath.c_str()); + CompleteDescriptionInPlace(sourceHandle); + + if (m_attemptedAssets.contains(sourceHandle.Id())) + { + m_assetsFailedByAP.insert(sourceHandle.Id()); + } + } + + m_failureNotifications.clear(); + } + + void Modifier::ReleaseCurrentAsset() + { + m_result.asset = m_result.asset.Describe(); + // Flush asset database events to ensure no asset references are held by closures queued on Ebuses. + AZ::Data::AssetManager::Instance().DispatchEvents(); + } + + void Modifier::ReportModificationError(AZStd::string_view report) + { + m_result.errorMessage = report; + m_results.m_failures.push_back({ m_result.asset.Describe(), report }); + m_assetsFailedByAP.insert(m_result.asset.Id()); + NextModification(); + } + + void Modifier::ReportModificationSuccess() + { + // \note DO NOT put asset into the m_assetsCompletedByAP here. That can only be done when the message is received by the AP + m_results.m_successes.push_back({ m_result.asset.Describe(), {} }); + AzFramework::AssetSystemRequestBus::Broadcast( + &AzFramework::AssetSystem::AssetSystemRequests::EscalateAssetByUuid, m_result.asset.Id()); + NextModification(); + } + + void Modifier::ReportSaveResult() + { + AZStd::lock_guard lock(m_mutex); + m_fileSaver.reset(); + + if (m_fileSaveResult.fileSaveError.empty()) + { + ReportModificationSuccess(); + } + else + { + ReportModificationError(m_fileSaveResult.fileSaveError); + } + } + void Modifier::SaveModifiedGraph(const ModificationResult& result) { m_modifyState = ModifyState::Saving; m_fileSaver = AZStd::make_unique ( m_config.onReadOnlyFile - , [this](const FileSaveResult& result) { OnFileSaveComplete(result); }); + , [this](const FileSaveResult& fileSaveResult) { OnFileSaveComplete(fileSaveResult); }); m_fileSaver->Save(result.asset); } @@ -287,7 +412,7 @@ namespace ScriptCanvasEditor for (size_t index = 0; index != m_assets.size(); ++index) { - m_assetInfoIndexById.insert({ m_assets[index].info.m_assetId.m_guid, index }); + m_assetInfoIndexById.insert({ m_assets[index].Id(), index }); } } else @@ -299,7 +424,7 @@ namespace ScriptCanvasEditor m_dependencyOrderedAssetIndicies.push_back(index); } - // go straight into ModifyinGraphs + // go straight into ModifyingGraphs m_assetIndex = m_assets.size(); } } @@ -318,48 +443,87 @@ namespace ScriptCanvasEditor m_assetIndex = 0; m_state = State::ModifyingGraphs; + InitializeResult(); } else { GatherDependencies(); - ++m_assetIndex; + NextAsset(); } } void Modifier::TickUpdateGraph() { - if (m_assetIndex == m_assets.size()) - { - VE_LOG("Modifier: Complete."); - AZ::SystemTickBus::Handler::BusDisconnect(); + AZStd::lock_guard lock(m_mutex); - if (m_onComplete) + switch (m_modifyState) + { + case ScriptCanvasEditor::VersionExplorer::Modifier::ModifyState::Idle: + if (m_assetIndex == m_assets.size()) { - m_onComplete(); + VE_LOG("Modifier: Complete."); + AZ::SystemTickBus::Handler::BusDisconnect(); + + if (m_onComplete) + { + m_onComplete(); + } } + else + { + CheckDependencies(); + } + break; + case ScriptCanvasEditor::VersionExplorer::Modifier::ModifyState::WaitingForDependencyProcessing: + WaitForDependencies(); + break; + case ScriptCanvasEditor::VersionExplorer::Modifier::ModifyState::StartModification: + ModifyCurrentAsset(); + break; + case ScriptCanvasEditor::VersionExplorer::Modifier::ModifyState::ReportResult: + ReportSaveResult(); + break; + default: + break; } - else - { - AZStd::lock_guard lock(m_mutex); + } - switch (m_modifyState) - { - case ScriptCanvasEditor::VersionExplorer::Modifier::ModifyState::Idle: - ModifyCurrentAsset(); - break; - case ScriptCanvasEditor::VersionExplorer::Modifier::ModifyState::ReportResult: - ReportSaveResult(); - break; - default: - break; - } + void Modifier::WaitForDependencies() + { + const AZ::s32 LogPeriodSeconds = 5; + + ProcessNotifications(); + + auto dependencies = GetDependencies(GetCurrentIndex()); + if (dependencies == nullptr || dependencies->empty() || AllDependenciesCleared(*dependencies)) + { + m_modifyState = ModifyState::StartModification; + } + else if (AnyDependenciesFailed(*dependencies)) + { + ReportModificationError("A required dependency failed to update, graph cannot update."); + } + else if (AZStd::chrono::seconds(CalculateRemainingWaitTime(*dependencies)).count() < 0) + { + ReportModificationError("Dependency update time has taken too long, aborting modification."); + } + else if (AZStd::chrono::seconds(AZStd::chrono::system_clock::now() - m_waitLogTimeStamp).count() > LogPeriodSeconds) + { + m_waitLogTimeStamp = AZStd::chrono::system_clock::now(); + + AZ_TracePrintf + ( ScriptCanvas::k_VersionExplorerWindow.data() + , "Waiting for dependencies for %d more seconds: %s" + , AZStd::chrono::seconds(CalculateRemainingWaitTime(*dependencies)).count() + , m_result.asset.Path().c_str()); + + ModelNotificationsBus::Broadcast(&ModelNotificationsTraits::OnUpgradeDependencyWaitInterval, m_result.asset); } } const AZStd::unordered_set* Modifier::Sorter::GetDependencies(size_t index) const { - auto iter = modifier->m_dependencies.find(index); - return iter != modifier->m_dependencies.end() ? &iter->second : nullptr; + return modifier->GetDependencies(index); } void Modifier::Sorter::Sort() @@ -380,10 +544,10 @@ namespace ScriptCanvasEditor if (markedTemporary.contains(index)) { AZ_Error - (ScriptCanvas::k_VersionExplorerWindow.data() + ( ScriptCanvas::k_VersionExplorerWindow.data() , false , "Modifier: Dependency sort has failed during, circular dependency detected for Asset: %s" - , modifier->GetCurrentAsset().m_relativePath.c_str()); + , modifier->m_result.asset.Path().c_str()); return; } diff --git a/Gems/ScriptCanvas/Code/Editor/View/Windows/Tools/UpgradeTool/Modifier.h b/Gems/ScriptCanvas/Code/Editor/View/Windows/Tools/UpgradeTool/Modifier.h index 981a1eb746..d5147cab61 100644 --- a/Gems/ScriptCanvas/Code/Editor/View/Windows/Tools/UpgradeTool/Modifier.h +++ b/Gems/ScriptCanvas/Code/Editor/View/Windows/Tools/UpgradeTool/Modifier.h @@ -9,6 +9,7 @@ #pragma once #include +#include #include #include #include @@ -17,18 +18,21 @@ namespace ScriptCanvasEditor { namespace VersionExplorer { - class Modifier - : private AZ::SystemTickBus::Handler - , private ModificationNotificationsBus::Handler + class Modifier final + : public AZ::SystemTickBus::Handler + , public ModificationNotificationsBus::Handler + , public AzFramework::AssetSystemInfoBus::Handler { public: AZ_CLASS_ALLOCATOR(Modifier, AZ::SystemAllocator, 0); Modifier ( const ModifyConfiguration& modification - , WorkingAssets&& assets + , AZStd::vector&& assets , AZStd::function onComplete); + ~Modifier(); + const ModificationResults& GetResult() const; ModificationResults&& TakeResult(); @@ -56,6 +60,8 @@ namespace ScriptCanvasEditor enum class ModifyState { Idle, + WaitingForDependencyProcessing, + StartModification, InProgress, Saving, ReportResult @@ -67,37 +73,58 @@ namespace ScriptCanvasEditor State m_state = State::GatheringDependencies; ModifyState m_modifyState = ModifyState::Idle; size_t m_assetIndex = 0; + AZStd::function m_onComplete; // asset infos in scanned order - WorkingAssets m_assets; + AZStd::vector m_assets; // dependency sorted order indices into the asset vector AZStd::vector m_dependencyOrderedAssetIndicies; // dependency indices by asset info index (only exist if graphs have them) AZStd::unordered_map> m_dependencies; AZStd::unordered_map m_assetInfoIndexById; - AZStd::vector m_failures; ModifyConfiguration m_config; ModificationResult m_result; ModificationResults m_results; AZStd::unique_ptr m_fileSaver; FileSaveResult m_fileSaveResult; + // m_attemptedAssets is assets attempted to be processed by modification, as opposed to + // those processed by the AP as a result of one of their dependencies being processed. + AZStd::unordered_set m_attemptedAssets; + AZStd::unordered_set m_assetsCompletedByAP; + AZStd::unordered_set m_assetsFailedByAP; + AZStd::chrono::system_clock::time_point m_waitLogTimeStamp; + AZStd::chrono::system_clock::time_point m_waitTimeStamp; + AZStd::unordered_set m_successNotifications; + AZStd::unordered_set m_failureNotifications; + bool AllDependenciesCleared(const AZStd::unordered_set& dependencies) const; + bool AnyDependenciesFailed(const AZStd::unordered_set& dependencies) const; + void AssetCompilationSuccess(const AZStd::string& assetPath) override; + void AssetCompilationFailed(const AZStd::string& assetPath) override; + AZStd::sys_time_t CalculateRemainingWaitTime(const AZStd::unordered_set& dependencies) const; + void CheckDependencies(); void GatherDependencies(); - const AZ::Data::AssetInfo& GetCurrentAsset() const; + size_t GetCurrentIndex() const; + const AZStd::unordered_set* GetDependencies(size_t index) const; AZStd::unordered_set& GetOrCreateDependencyIndexSet(); - AZ::Data::Asset LoadAsset(); - void ModifyCurrentAsset(); - void ModifyNextAsset(); + void InitializeResult(); + void LoadAsset(); void ModificationComplete(const ModificationResult& result) override; + void ModifyCurrentAsset(); + void NextAsset(); + void NextModification(); + void OnFileSaveComplete(const FileSaveResult& result); + void OnSystemTick() override; + void ProcessNotifications(); + void ReleaseCurrentAsset(); void ReportModificationError(AZStd::string_view report); void ReportModificationSuccess(); void ReportSaveResult(); void SaveModifiedGraph(const ModificationResult& result); void SortGraphsByDependencies(); - void OnFileSaveComplete(const FileSaveResult& result); - void OnSystemTick() override; void TickGatherDependencies(); void TickUpdateGraph(); + void WaitForDependencies(); }; } } diff --git a/Gems/ScriptCanvas/Code/Editor/View/Windows/Tools/UpgradeTool/Scanner.cpp b/Gems/ScriptCanvas/Code/Editor/View/Windows/Tools/UpgradeTool/Scanner.cpp index bc69f6e634..29fa3c62e5 100644 --- a/Gems/ScriptCanvas/Code/Editor/View/Windows/Tools/UpgradeTool/Scanner.cpp +++ b/Gems/ScriptCanvas/Code/Editor/View/Windows/Tools/UpgradeTool/Scanner.cpp @@ -6,9 +6,49 @@ * */ -#include -#include +#include +#include +#include +#include +#include #include +#include +#include + +namespace ScannerCpp +{ + void TraverseTree + ( QModelIndex index + , AzToolsFramework::AssetBrowser::AssetBrowserFilterModel& model + , ScriptCanvasEditor::VersionExplorer::ScanResult& result) + { + QModelIndex sourceIndex = model.mapToSource(index); + AzToolsFramework::AssetBrowser::AssetBrowserEntry* entry = + reinterpret_cast(sourceIndex.internalPointer()); + + if (entry + && entry->GetEntryType() == AzToolsFramework::AssetBrowser::AssetBrowserEntry::AssetEntryType::Source + && azrtti_istypeof(entry) + && entry->GetFullPath().ends_with(".scriptcanvas")) + { + auto sourceEntry = azrtti_cast(entry); + + AZStd::string fullPath = sourceEntry->GetFullPath(); + AzFramework::StringFunc::Path::Normalize(fullPath); + + result.m_catalogAssets.push_back( + ScriptCanvasEditor::SourceHandle(nullptr, sourceEntry->GetSourceUuid(), fullPath)); + } + + const int rowCount = model.rowCount(index); + + for (int i = 0; i < rowCount; ++i) + { + TraverseTree(model.index(i, 0, index), model, result); + } + } +} + namespace ScriptCanvasEditor { @@ -18,60 +58,54 @@ namespace ScriptCanvasEditor : m_config(config) , m_onComplete(onComplete) { - AZ::Data::AssetCatalogRequestBus::Broadcast - ( &AZ::Data::AssetCatalogRequestBus::Events::EnumerateAssets - , nullptr - , [this](const AZ::Data::AssetId, const AZ::Data::AssetInfo& assetInfo) - { - if (assetInfo.m_assetType == azrtti_typeid()) - { - m_result.m_catalogAssets.push_back(assetInfo); - } - } - , nullptr); + AzToolsFramework::AssetBrowser::AssetBrowserModel* assetBrowserModel = nullptr; + AzToolsFramework::AssetBrowser::AssetBrowserComponentRequestBus::BroadcastResult + ( assetBrowserModel, &AzToolsFramework::AssetBrowser::AssetBrowserComponentRequests::GetAssetBrowserModel); + + if (assetBrowserModel) + { + auto stringFilter = new AzToolsFramework::AssetBrowser::StringFilter(); + stringFilter->SetName("ScriptCanvas"); + stringFilter->SetFilterString(".scriptcanvas"); + stringFilter->SetFilterPropagation(AzToolsFramework::AssetBrowser::AssetBrowserEntryFilter::PropagateDirection::Down); + + AzToolsFramework::AssetBrowser::AssetBrowserFilterModel assetFilterModel; + assetFilterModel.SetFilter(AzToolsFramework::AssetBrowser::FilterConstType(stringFilter)); + assetFilterModel.setSourceModel(assetBrowserModel); + + ScannerCpp::TraverseTree(QModelIndex(), assetFilterModel, m_result); + } - ModelNotificationsBus::Broadcast(&ModelNotificationsTraits::OnScanBegin, m_result.m_catalogAssets.size()); AZ::SystemTickBus::Handler::BusConnect(); } - void Scanner::FilterAsset(AZ::Data::Asset asset) + void Scanner::FilterAsset(SourceHandle asset) { - if (m_config.filter && m_config.filter(asset)) + if (m_config.filter && m_config.filter(asset) == ScanConfiguration::Filter::Exclude) { - VE_LOG("Scanner: Excluded: %s ", GetCurrentAsset().m_relativePath.c_str()); - m_result.m_filteredAssets.push_back(GetCurrentAsset()); - ModelNotificationsBus::Broadcast(&ModelNotificationsTraits::OnScanFilteredGraph, GetCurrentAsset()); + VE_LOG("Scanner: Excluded: %s ", ModCurrentAsset().Path().c_str()); + m_result.m_filteredAssets.push_back(ModCurrentAsset().Describe()); + ModelNotificationsBus::Broadcast(&ModelNotificationsTraits::OnScanFilteredGraph, ModCurrentAsset()); } else { - VE_LOG("Scanner: Included: %s ", GetCurrentAsset().m_relativePath.c_str()); - m_result.m_unfiltered.push_back({ asset, GetCurrentAsset() }); - ModelNotificationsBus::Broadcast(&ModelNotificationsTraits::OnScanUnFilteredGraph, GetCurrentAsset()); + VE_LOG("Scanner: Included: %s ", ModCurrentAsset().Path().c_str()); + m_result.m_unfiltered.push_back(ModCurrentAsset().Describe()); + ModelNotificationsBus::Broadcast(&ModelNotificationsTraits::OnScanUnFilteredGraph, ModCurrentAsset()); } } - const AZ::Data::AssetInfo& Scanner::GetCurrentAsset() const - { - return m_result.m_catalogAssets[m_catalogAssetIndex]; - } - const ScanResult& Scanner::GetResult() const { return m_result; } - AZ::Data::Asset Scanner::LoadAsset() + SourceHandle Scanner::LoadAsset() { - AZ::Data::Asset asset = AZ::Data::AssetManager::Instance().GetAsset - ( GetCurrentAsset().m_assetId - , azrtti_typeid() - , AZ::Data::AssetLoadBehavior::PreLoad); - - asset.BlockUntilLoadComplete(); - - if (asset.IsReady()) + auto fileOutcome = LoadFromFile(ModCurrentAsset().Path().c_str()); + if (fileOutcome.IsSuccess()) { - return asset; + return fileOutcome.GetValue(); } else { @@ -79,6 +113,11 @@ namespace ScriptCanvasEditor } } + SourceHandle& Scanner::ModCurrentAsset() + { + return m_result.m_catalogAssets[m_catalogAssetIndex]; + } + void Scanner::OnSystemTick() { if (m_catalogAssetIndex == m_result.m_catalogAssets.size()) @@ -93,19 +132,19 @@ namespace ScriptCanvasEditor } else { - if (auto asset = LoadAsset()) + if (auto asset = LoadAsset(); asset.IsGraphValid()) { - VE_LOG("Scanner: Loaded: %s ", GetCurrentAsset().m_relativePath.c_str()); + VE_LOG("Scanner: Loaded: %s ", ModCurrentAsset().Path().c_str()); FilterAsset(asset); } else { - VE_LOG("Scanner: Failed to load: %s ", GetCurrentAsset().m_relativePath.c_str()); - m_result.m_loadErrors.push_back(GetCurrentAsset()); - ModelNotificationsBus::Broadcast(&ModelNotificationsTraits::OnScanLoadFailure, GetCurrentAsset()); + VE_LOG("Scanner: Failed to load: %s ", ModCurrentAsset().Path().c_str()); + m_result.m_loadErrors.push_back(ModCurrentAsset().Describe()); + ModelNotificationsBus::Broadcast(&ModelNotificationsTraits::OnScanLoadFailure, ModCurrentAsset()); } - VE_LOG("Scanner: scan of %s complete", GetCurrentAsset().m_relativePath.c_str()); + VE_LOG("Scanner: scan of %s complete", ModCurrentAsset().Path().c_str()); ++m_catalogAssetIndex; } } diff --git a/Gems/ScriptCanvas/Code/Editor/View/Windows/Tools/UpgradeTool/Scanner.h b/Gems/ScriptCanvas/Code/Editor/View/Windows/Tools/UpgradeTool/Scanner.h index fb030845c7..8e086a10b0 100644 --- a/Gems/ScriptCanvas/Code/Editor/View/Windows/Tools/UpgradeTool/Scanner.h +++ b/Gems/ScriptCanvas/Code/Editor/View/Windows/Tools/UpgradeTool/Scanner.h @@ -33,9 +33,9 @@ namespace ScriptCanvasEditor ScanConfiguration m_config; ScanResult m_result; - void FilterAsset(AZ::Data::Asset); - const AZ::Data::AssetInfo& GetCurrentAsset() const; - AZ::Data::Asset LoadAsset(); + void FilterAsset(SourceHandle); + SourceHandle LoadAsset(); + SourceHandle& ModCurrentAsset(); void OnSystemTick() override; }; } diff --git a/Gems/ScriptCanvas/Code/Editor/View/Windows/Tools/UpgradeTool/UpgradeHelper.cpp b/Gems/ScriptCanvas/Code/Editor/View/Windows/Tools/UpgradeTool/UpgradeHelper.cpp index 14bc1c4dc8..0678aee013 100644 --- a/Gems/ScriptCanvas/Code/Editor/View/Windows/Tools/UpgradeTool/UpgradeHelper.cpp +++ b/Gems/ScriptCanvas/Code/Editor/View/Windows/Tools/UpgradeTool/UpgradeHelper.cpp @@ -24,7 +24,6 @@ #include #include #include -#include #include #include #include @@ -55,26 +54,25 @@ namespace ScriptCanvasEditor for (auto& failedUpdate : result->m_failures) { - auto& assetInfo = failedUpdate.assetInfo; - auto assetId = assetInfo.m_assetId; - + auto asset = failedUpdate.asset; + m_ui->tableWidget->insertRow(rows); connect(m_ui->closeButton, &QPushButton::pressed, this, &QDialog::accept); - connect(m_ui->tableWidget, &QTableWidget::itemDoubleClicked, this, [this, rows, assetId](QTableWidgetItem* item) + connect(m_ui->tableWidget, &QTableWidget::itemDoubleClicked, this, [this, rows, asset](QTableWidgetItem* item) { if (item && item->data(Qt::UserRole).toInt() == rows) { - OpenGraph(assetId); + OpenGraph(asset); } } ); - auto openGraph = [this, assetId] { - OpenGraph(assetId); + auto openGraph = [this, asset] { + OpenGraph(asset); }; - QTableWidgetItem* rowName = new QTableWidgetItem(tr(assetInfo.m_relativePath.c_str())); + QTableWidgetItem* rowName = new QTableWidgetItem(tr(asset.Path().c_str())); rowName->setData(Qt::UserRole, rows); m_ui->tableWidget->setItem(rows, 0, rowName); @@ -91,15 +89,15 @@ namespace ScriptCanvasEditor } } - void UpgradeHelper::OpenGraph(AZ::Data::AssetId assetId) + void UpgradeHelper::OpenGraph(const SourceHandle& asset) { // Open the graph in SC editor AzToolsFramework::OpenViewPane(/*LyViewPane::ScriptCanvas*/"Script Canvas"); AZ::Outcome openOutcome = AZ::Failure(AZStd::string()); - if (assetId.IsValid()) + if (!asset.Path().empty()) { - GeneralRequestBus::BroadcastResult(openOutcome, &GeneralRequests::OpenScriptCanvasAsset, assetId, -1); + GeneralRequestBus::BroadcastResult(openOutcome, &GeneralRequests::OpenScriptCanvasAsset, asset, Tracker::ScriptCanvasFileState::UNMODIFIED, -1); } if (!openOutcome) diff --git a/Gems/ScriptCanvas/Code/Editor/View/Windows/Tools/UpgradeTool/UpgradeHelper.h b/Gems/ScriptCanvas/Code/Editor/View/Windows/Tools/UpgradeTool/UpgradeHelper.h index 36949c1828..4c0c073d70 100644 --- a/Gems/ScriptCanvas/Code/Editor/View/Windows/Tools/UpgradeTool/UpgradeHelper.h +++ b/Gems/ScriptCanvas/Code/Editor/View/Windows/Tools/UpgradeTool/UpgradeHelper.h @@ -35,6 +35,8 @@ namespace Ui namespace ScriptCanvasEditor { + // class SourceHandle; + //! A tool that collects and upgrades all Script Canvas graphs in the asset catalog class UpgradeHelper : public AzQtComponents::StyledDialog @@ -51,6 +53,6 @@ namespace ScriptCanvasEditor AZStd::unique_ptr m_ui; - void OpenGraph(AZ::Data::AssetId assetId); + void OpenGraph(const SourceHandle& assetId); }; } diff --git a/Gems/ScriptCanvas/Code/Editor/View/Windows/mainwindow.ui b/Gems/ScriptCanvas/Code/Editor/View/Windows/mainwindow.ui index 1208a55a64..6276f7e2b4 100644 --- a/Gems/ScriptCanvas/Code/Editor/View/Windows/mainwindow.ui +++ b/Gems/ScriptCanvas/Code/Editor/View/Windows/mainwindow.ui @@ -529,7 +529,10 @@ Test Manager - + + false + + Ctrl+Shift+T diff --git a/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Asset/RuntimeAsset.cpp b/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Asset/RuntimeAsset.cpp index 0dcd8ebbbd..faa1d06b63 100644 --- a/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Asset/RuntimeAsset.cpp +++ b/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Asset/RuntimeAsset.cpp @@ -11,7 +11,7 @@ #include #include -namespace ScriptCanvasRuntimeAssetCpp +namespace DoNotVersionRuntimeAssetsBumpTheBuilderVersionInstead { enum class RuntimeDataVersion { @@ -59,6 +59,7 @@ namespace ScriptCanvas m_script = AZStd::move(other.m_script); m_requiredAssets = AZStd::move(other.m_requiredAssets); m_requiredScriptEvents = AZStd::move(other.m_requiredScriptEvents); + m_areStaticsInitialized = AZStd::move(other.m_areStaticsInitialized); } return *this; @@ -71,7 +72,7 @@ namespace ScriptCanvas if (auto serializeContext = azrtti_cast(reflectContext)) { serializeContext->Class() - ->Version(static_cast(ScriptCanvasRuntimeAssetCpp::RuntimeDataVersion::Current)) + ->Version(static_cast(DoNotVersionRuntimeAssetsBumpTheBuilderVersionInstead::RuntimeDataVersion::Current)) ->Field("input", &RuntimeData::m_input) ->Field("debugMap", &RuntimeData::m_debugMap) ->Field("script", &RuntimeData::m_script) @@ -145,7 +146,7 @@ namespace ScriptCanvas if (auto serializeContext = azrtti_cast(context)) { serializeContext->Class() - ->Version(static_cast(ScriptCanvasRuntimeAssetCpp::RuntimeDataOverridesVersion::Current)) + ->Version(static_cast(DoNotVersionRuntimeAssetsBumpTheBuilderVersionInstead::RuntimeDataOverridesVersion::Current)) ->Field("runtimeAsset", &RuntimeDataOverrides::m_runtimeAsset) ->Field("variables", &RuntimeDataOverrides::m_variables) ->Field("variableIndices", &RuntimeDataOverrides::m_variableIndices) @@ -194,7 +195,7 @@ namespace ScriptCanvas if (auto serializeContext = azrtti_cast(reflectContext)) { serializeContext->Class() - ->Version(static_cast(ScriptCanvasRuntimeAssetCpp::FunctionRuntimeDataVersion::Current)) + ->Version(static_cast(DoNotVersionRuntimeAssetsBumpTheBuilderVersionInstead::FunctionRuntimeDataVersion::Current)) ->Field("name", &SubgraphInterfaceData::m_name) ->Field("interface", &SubgraphInterfaceData::m_interface) ; diff --git a/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Asset/RuntimeAsset.h b/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Asset/RuntimeAsset.h index 24c83b20a1..ad6f7c07b4 100644 --- a/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Asset/RuntimeAsset.h +++ b/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Asset/RuntimeAsset.h @@ -76,6 +76,9 @@ namespace ScriptCanvas AZStd::vector m_activationInputStorage; Execution::ActivationInputRange m_activationInputRange; + // used to initialize statics only once, and not necessarily on the loading thread + bool m_areStaticsInitialized = false; + bool RequiresStaticInitialization() const; bool RequiresDependencyConstructionParameters() const; @@ -103,65 +106,20 @@ namespace ScriptCanvas void EnforcePreloadBehavior(); }; - class RuntimeAssetBase + class RuntimeAsset : public AZ::Data::AssetData { public: - - AZ_RTTI(RuntimeAssetBase, "{19BAD220-E505-4443-AA95-743106748F37}", AZ::Data::AssetData); - AZ_CLASS_ALLOCATOR(RuntimeAssetBase, AZ::SystemAllocator, 0); - RuntimeAssetBase(const AZ::Data::AssetId& assetId = AZ::Data::AssetId(), AZ::Data::AssetData::AssetStatus status = AZ::Data::AssetData::AssetStatus::NotLoaded) - : AZ::Data::AssetData(assetId, status) - { - - } - }; - template - class RuntimeAssetTyped - : public RuntimeAssetBase - { - public: - AZ_RTTI(RuntimeAssetBase, "{C925213E-A1FA-4487-831F-9551A984700E}", RuntimeAssetBase); - AZ_CLASS_ALLOCATOR(RuntimeAssetBase, AZ::SystemAllocator, 0); - - RuntimeAssetTyped(const AZ::Data::AssetId& assetId = AZ::Data::AssetId(), AZ::Data::AssetData::AssetStatus status = AZ::Data::AssetData::AssetStatus::NotLoaded) - : RuntimeAssetBase(assetId, status) - { - - } + AZ_RTTI(RuntimeAsset, "{3E2AC8CD-713F-453E-967F-29517F331784}", AZ::Data::AssetData); static const char* GetFileExtension() { return "scriptcanvas_compiled"; } static const char* GetFileFilter() { return "*.scriptcanvas_compiled"; } - const DataType& GetData() const { return m_runtimeData; } - DataType& GetData() { return m_runtimeData; } - void SetData(const DataType& runtimeData) - { - m_runtimeData = runtimeData; - // When setting data instead of serializing, immediately mark the asset as ready. - m_status = AZ::Data::AssetData::AssetStatus::Ready; - } - - DataType m_runtimeData; - - protected: - friend class RuntimeAssetHandler; - RuntimeAssetTyped(const RuntimeAssetTyped&) = delete; - - }; - - class RuntimeAsset : public RuntimeAssetTyped - { - public: - - AZ_RTTI(RuntimeAsset, "{3E2AC8CD-713F-453E-967F-29517F331784}", RuntimeAssetTyped); + RuntimeData m_runtimeData; RuntimeAsset(const AZ::Data::AssetId& assetId = AZ::Data::AssetId(), AZ::Data::AssetData::AssetStatus status = AZ::Data::AssetData::AssetStatus::NotLoaded) - : RuntimeAssetTyped(assetId, status) - { - - } - + : AZ::Data::AssetData(assetId, status) + {} }; class SubgraphInterfaceAsset; @@ -209,24 +167,19 @@ namespace ScriptCanvas }; class SubgraphInterfaceAsset - : public RuntimeAssetTyped + : public AZ::Data::AssetData { public: - AZ_RTTI(SubgraphInterfaceAsset, "{E22967AC-7673-4778-9125-AF49D82CAF9F}", RuntimeAssetTyped); + AZ_RTTI(SubgraphInterfaceAsset, "{E22967AC-7673-4778-9125-AF49D82CAF9F}", AZ::Data::AssetData); AZ_CLASS_ALLOCATOR(SubgraphInterfaceAsset, AZ::SystemAllocator, 0); - SubgraphInterfaceAsset(const AZ::Data::AssetId& assetId = AZ::Data::AssetId(), AZ::Data::AssetData::AssetStatus status = AZ::Data::AssetData::AssetStatus::NotLoaded) - : RuntimeAssetTyped(assetId, status) - {} - - void SetData(const SubgraphInterfaceData& runtimeData) - { - m_runtimeData = runtimeData; - } - static const char* GetFileExtension() { return "scriptcanvas_fn_compiled"; } static const char* GetFileFilter() { return "*.scriptcanvas_fn_compiled"; } - friend class SubgraphInterfaceAssetHandler; + SubgraphInterfaceData m_interfaceData; + + SubgraphInterfaceAsset(const AZ::Data::AssetId& assetId = AZ::Data::AssetId(), AZ::Data::AssetData::AssetStatus status = AZ::Data::AssetData::AssetStatus::NotLoaded) + : AZ::Data::AssetData(assetId, status) + {} }; } diff --git a/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Asset/RuntimeAssetHandler.cpp b/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Asset/RuntimeAssetHandler.cpp index df7b07d37b..0b94fb370a 100644 --- a/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Asset/RuntimeAssetHandler.cpp +++ b/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Asset/RuntimeAssetHandler.cpp @@ -81,7 +81,6 @@ namespace ScriptCanvas { (void)type; AZ_Assert(type == AZ::AzTypeInfo::Uuid(), "This handler deals only with the Script Canvas Runtime Asset type!"); - return aznew RuntimeAsset(id); } @@ -93,8 +92,7 @@ namespace ScriptCanvas { RuntimeAsset* runtimeAsset = asset.GetAs(); AZ_Assert(runtimeAsset, "RuntimeAssetHandler::InitAsset This should be a Script Canvas runtime asset, as this is the only type this handler processes!"); - Execution::Context::InitializeActivationData(runtimeAsset->GetData()); - Execution::InitializeInterpretedStatics(runtimeAsset->GetData()); + Execution::Context::InitializeActivationData(runtimeAsset->m_runtimeData); } } @@ -117,7 +115,10 @@ namespace ScriptCanvas AZ_Assert(runtimeAsset, "This should be a Script Canvas runtime asset, as this is the only type we process!"); if (runtimeAsset && m_serializeContext) { - AZ::ObjectStream* binaryObjStream = AZ::ObjectStream::Create(stream, *m_serializeContext, AZ::ObjectStream::ST_XML); + AZ::ObjectStream* binaryObjStream = AZ::ObjectStream::Create(stream, *m_serializeContext + , g_saveRuntimeAssetsAsPlainTextForDebug + ? AZ::ObjectStream::ST_XML + : AZ::ObjectStream::ST_BINARY); bool graphSaved = binaryObjStream->WriteClass(&runtimeAsset->m_runtimeData); binaryObjStream->Finalize(); return graphSaved; @@ -129,7 +130,7 @@ namespace ScriptCanvas void RuntimeAssetHandler::DestroyAsset(AZ::Data::AssetPtr ptr) { RuntimeAsset* runtimeAsset = azrtti_cast(ptr); - Execution::Context::UnloadData(runtimeAsset->GetData()); + Execution::Context::UnloadData(runtimeAsset->m_runtimeData); delete ptr; } @@ -157,4 +158,5 @@ namespace ScriptCanvas } } } + } diff --git a/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Asset/ScriptCanvasAssetBase.h b/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Asset/ScriptCanvasAssetBase.h deleted file mode 100644 index 265c35d310..0000000000 --- a/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Asset/ScriptCanvasAssetBase.h +++ /dev/null @@ -1,88 +0,0 @@ -/* - * Copyright (c) Contributors to the Open 3D Engine Project. - * For complete copyright and license terms please see the LICENSE at the root of this distribution. - * - * SPDX-License-Identifier: Apache-2.0 OR MIT - * - */ - -#pragma once - -#include -#include -#include - -#include - -namespace ScriptCanvas -{ - class ScriptCanvasAssetBase - : public AZ::Data::AssetData - , ScriptCanvas::ScriptCanvasAssetBusRequestBus::Handler - { - - public: - AZ_RTTI(ScriptCanvasAssetBase, "{D07DBDE4-A169-4650-871B-FC75AFEEB03E}", AZ::Data::AssetData); - AZ_CLASS_ALLOCATOR(ScriptCanvasAssetBase, AZ::SystemAllocator, 0); - - ScriptCanvasAssetBase(const AZ::Data::AssetId& assetId = AZ::Data::AssetId(AZ::Uuid::CreateRandom()), - AZ::Data::AssetData::AssetStatus status = AZ::Data::AssetData::AssetStatus::NotLoaded) - : AZ::Data::AssetData(assetId, status) - { - ScriptCanvas::ScriptCanvasAssetBusRequestBus::Handler::BusConnect(GetId()); - } - - virtual ~ScriptCanvasAssetBase() - { - delete m_data; - ScriptCanvas::ScriptCanvasAssetBusRequestBus::Handler::BusDisconnect(); - } - - template - DataType* GetScriptCanvasDataAs() - { - return azrtti_cast(m_data); - } - - template - const DataType* GetScriptCanvasDataAs() const - { - return azrtti_cast(m_data); - } - - virtual ScriptCanvasData& GetScriptCanvasData() - { - return *m_data; - } - - virtual const ScriptCanvasData& GetScriptCanvasData() const - { - return *m_data; - } - - AZ::Entity* GetScriptCanvasEntity() const - { - return m_data->m_scriptCanvasEntity.get(); - } - - virtual void SetScriptCanvasEntity(AZ::Entity* scriptCanvasEntity) - { - if (m_data->m_scriptCanvasEntity.get() != scriptCanvasEntity) - { - m_data->m_scriptCanvasEntity.reset(scriptCanvasEntity); - } - } - - virtual ScriptCanvas::AssetDescription GetAssetDescription() const = 0; - - protected: - - ScriptCanvasData* m_data; - - void SetAsNewAsset() override - { - m_status = AZ::Data::AssetData::AssetStatus::Ready; - } - - }; -} diff --git a/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Asset/SubgraphInterfaceAssetHandler.cpp b/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Asset/SubgraphInterfaceAssetHandler.cpp index 451e0dfc47..d0371bb88f 100644 --- a/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Asset/SubgraphInterfaceAssetHandler.cpp +++ b/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Asset/SubgraphInterfaceAssetHandler.cpp @@ -93,7 +93,7 @@ namespace ScriptCanvas if (runtimeFunctionAsset && m_serializeContext) { stream->Seek(0U, AZ::IO::GenericStream::ST_SEEK_BEGIN); - bool loadSuccess = AZ::Utils::LoadObjectFromStreamInPlace(*stream, runtimeFunctionAsset->m_runtimeData, m_serializeContext, AZ::ObjectStream::FilterDescriptor(assetLoadFilterCB)); + bool loadSuccess = AZ::Utils::LoadObjectFromStreamInPlace(*stream, runtimeFunctionAsset->m_interfaceData, m_serializeContext, AZ::ObjectStream::FilterDescriptor(assetLoadFilterCB)); return loadSuccess ? AZ::Data::AssetHandler::LoadResult::LoadComplete : AZ::Data::AssetHandler::LoadResult::Error; } return AZ::Data::AssetHandler::LoadResult::Error; @@ -105,8 +105,11 @@ namespace ScriptCanvas AZ_Assert(runtimeFunctionAsset, "This should be a Script Canvas runtime asset, as this is the only type we process!"); if (runtimeFunctionAsset && m_serializeContext) { - AZ::ObjectStream* binaryObjStream = AZ::ObjectStream::Create(stream, *m_serializeContext, AZ::ObjectStream::ST_XML); - bool graphSaved = binaryObjStream->WriteClass(&runtimeFunctionAsset->m_runtimeData); + AZ::ObjectStream* binaryObjStream = AZ::ObjectStream::Create(stream, *m_serializeContext + , ScriptCanvas::g_saveEditorAssetsAsPlainTextForDebug + ? AZ::ObjectStream::ST_XML + : AZ::ObjectStream::ST_BINARY); + bool graphSaved = binaryObjStream->WriteClass(&runtimeFunctionAsset->m_interfaceData); binaryObjStream->Finalize(); return graphSaved; } diff --git a/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Core/Core.cpp b/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Core/Core.cpp index 9b2d0e4982..1e00e70075 100644 --- a/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Core/Core.cpp +++ b/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Core/Core.cpp @@ -6,6 +6,7 @@ * */ + #include #include #include @@ -13,11 +14,18 @@ #include #include -#include "Core.h" #include "Attributes.h" +#include "Core.h" +#include namespace ScriptCanvas { + AZ_CVAR(bool, g_saveRuntimeAssetsAsPlainTextForDebug, false, {}, AZ::ConsoleFunctorFlags::Null + , "Save runtime assets as plain text rather than binary for debug purposes."); + + AZ_CVAR(bool, g_saveEditorAssetsAsPlainTextForDebug, false, {}, AZ::ConsoleFunctorFlags::Null + , "Save editor assets as plain text rather than binary for debug purposes."); + ScopedAuxiliaryEntityHandler::ScopedAuxiliaryEntityHandler(AZ::Entity* buildEntity) : m_buildEntity(buildEntity) , m_wasAdded(false) @@ -182,5 +190,156 @@ namespace ScriptCanvas serializeContext->RegisterType(typeId, AZStd::move(classData), EventPlaceholderAnyCreator); } - +} + +namespace ScriptCanvasEditor +{ + SourceHandle::SourceHandle() + : m_id(AZ::Uuid::CreateNull()) + {} + + SourceHandle::SourceHandle(const SourceHandle& data, const AZ::Uuid& id, const AZ::IO::Path& path) + : m_data(data.m_data) + , m_id(id) + , m_path(path) + { + m_path.MakePreferred(); + m_id = id; + } + + SourceHandle::SourceHandle(ScriptCanvas::DataPtr graph, const AZ::Uuid& id, const AZ::IO::Path& path) + : m_data(graph) + , m_id(id) + , m_path(path) + { + m_path.MakePreferred(); + m_id = id; + } + + SourceHandle::SourceHandle(const SourceHandle& data, const AZ::IO::Path& path) + : m_data(data.m_data) + , m_id(AZ::Uuid::CreateNull()) + , m_path(path) + { + m_path.MakePreferred(); + } + + SourceHandle::SourceHandle(ScriptCanvas::DataPtr graph, const AZ::IO::Path& path) + : m_data(graph) + , m_id(AZ::Uuid::CreateNull()) + , m_path(path) + { + m_path.MakePreferred(); + } + + bool SourceHandle::AnyEquals(const SourceHandle& other) const + { + return m_data && m_data == other.m_data + || !m_id.IsNull() && m_id == other.m_id + || !m_path.empty() && m_path == other.m_path; + } + + void SourceHandle::Clear() + { + m_data = nullptr; + m_id = AZ::Uuid::CreateNull(); + m_path.clear(); + } + + // return a SourceHandle with only the Id and Path, but without a pointer to the data + SourceHandle SourceHandle::Describe() const + { + return SourceHandle(nullptr, m_id, m_path); + } + + GraphPtrConst SourceHandle::Get() const + { + return m_data ? m_data->GetEditorGraph() : nullptr; + } + + const AZ::Uuid& SourceHandle::Id() const + { + return m_id; + } + + bool SourceHandle::IsDescriptionValid() const + { + return !m_id.IsNull() && !m_path.empty(); + } + + bool SourceHandle::IsGraphValid() const + { + return m_data != nullptr; + } + + GraphPtr SourceHandle::Mod() const + { + return m_data ? m_data->ModEditorGraph() : nullptr; + } + + bool SourceHandle::operator==(const SourceHandle& other) const + { + return m_data.get() == other.m_data.get() + && m_id == other.m_id + && m_path == other.m_path; + } + + bool SourceHandle::operator!=(const SourceHandle& other) const + { + return !(*this == other); + } + + const AZ::IO::Path& SourceHandle::Path() const + { + return m_path; + } + + bool SourceHandle::PathEquals(const SourceHandle& other) const + { + return m_path == other.m_path; + } + + void SourceHandle::Reflect(AZ::ReflectContext* context) + { + if (auto serializeContext = azrtti_cast(context)) + { + serializeContext->Class() + ->Version(0) + ->Field("id", &SourceHandle::m_id) + ->Field("path", &SourceHandle::m_path) + ; + } + } + + AZStd::string SourceHandle::ToString() const + { + return AZStd::string::format + ( "%s, %s, %s" + , IsGraphValid() ? "O" : "X" + , m_path.empty() ? m_path.c_str() : "" + , m_id.IsNull() ? "" : m_id.ToString().c_str()); + } +} + +namespace ScriptCanvas +{ + const Graph* ScriptCanvasData::GetGraph() const + { + return AZ::EntityUtils::FindFirstDerivedComponent(m_scriptCanvasEntity.get()); + } + + const ScriptCanvasEditor::Graph* ScriptCanvasData::GetEditorGraph() const + { + return reinterpret_cast(GetGraph()); + } + + Graph* ScriptCanvasData::ModGraph() + { + return AZ::EntityUtils::FindFirstDerivedComponent(m_scriptCanvasEntity.get()); + } + + ScriptCanvasEditor::Graph* ScriptCanvasData::ModEditorGraph() + { + return reinterpret_cast(ModGraph()); + } } diff --git a/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Core/Core.h b/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Core/Core.h index 0e64c19dcb..c29a648eca 100644 --- a/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Core/Core.h +++ b/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Core/Core.h @@ -9,20 +9,22 @@ #pragma once #include +#include +#include +#include #include +#include #include #include -#include #include +#include #include #include #include #include -#include -#include - #include #include +#include #define OBJECT_STREAM_EDITOR_ASSET_LOADING_SUPPORT_ENABLED @@ -41,6 +43,9 @@ namespace AZ namespace ScriptCanvas { + AZ_CVAR_EXTERNED(bool, g_saveRuntimeAssetsAsPlainTextForDebug); + AZ_CVAR_EXTERNED(bool, g_saveEditorAssetsAsPlainTextForDebug); + // A place holder identifier for the AZ::Entity that owns the graph. // The actual value in each location initialized to GraphOwnerId is populated with the owning entity at editor-time, Asset Processor-time, or runtime, as soon as the owning entity is known. using GraphOwnerIdType = AZ::EntityId; @@ -61,6 +66,10 @@ namespace ScriptCanvas class Node; class Edge; + class Graph; + + using GraphPtr = Graph*; + using GraphPtrConst = const Graph*; using ID = AZ::EntityId; @@ -297,6 +306,123 @@ namespace ScriptCanvas void ReflectEventTypeOnDemand(const AZ::TypeId& typeId, AZStd::string_view name, AZ::IRttiHelper* rttiHelper = nullptr); } +namespace ScriptCanvas +{ + class ScriptCanvasData; + + using DataPtr = AZStd::intrusive_ptr; + using DataPtrConst = AZStd::intrusive_ptr; +} + +namespace ScriptCanvasEditor +{ + class Graph; + + using GraphPtr = Graph*; + using GraphPtrConst = const Graph*; + + class SourceDescription + { + public: + inline static constexpr const char* GetAssetGroup() { return "ScriptCanvas"; } + inline static constexpr const char* GetType() { return "{FA10C3DA-0717-4B72-8944-CD67D13DFA2B}"; } + inline static constexpr const char* GetName() { return "Script Canvas"; } + inline static constexpr const char* GetDescription() { return "Script Canvas Graph File"; } + inline static constexpr const char* GetSuggestedSavePath() { return "@projectroot@/scriptcanvas"; } + inline static constexpr const char* GetFileExtension() { return ".scriptcanvas"; } + inline static constexpr const char* GetGroup() { return "Script Canvas"; } + inline static constexpr const char* GetAssetNamePattern() { return "Untitled-%i"; } + inline static constexpr const char* GetFileFilter() { return "Script Canvas Files (*.scriptcanvas)"; } + inline static constexpr const char* GetAssetTypeDisplayName() { return "Script Canvas"; } + inline static constexpr const char* GetEntityName() { return "Script Canvas"; } + inline static constexpr const char* GetIconPath() { return "Icons/ScriptCanvas/Viewport/ScriptCanvas.png"; } + inline static AZ::Color GetDisplayColor() { return AZ::Color(0.5f, 0.5f, 0.5f, 0.5f); }; + }; + + class SourceHandle + { + public: + AZ_TYPE_INFO(SourceHandle, "{65855A98-AE2F-427F-BFC8-69D45265E312}"); + AZ_CLASS_ALLOCATOR(SourceHandle, AZ::SystemAllocator, 0); + + static void Reflect(AZ::ReflectContext* context); + + SourceHandle(); + + SourceHandle(const SourceHandle& data, const AZ::Uuid& id, const AZ::IO::Path& path); + + SourceHandle(ScriptCanvas::DataPtr graph, const AZ::Uuid& id, const AZ::IO::Path& path); + + SourceHandle(const SourceHandle& data, const AZ::IO::Path& path); + + SourceHandle(ScriptCanvas::DataPtr graph, const AZ::IO::Path& path); + + bool AnyEquals(const SourceHandle& other) const; + + void Clear(); + + // return a SourceHandle with only the Id and Path, but without a pointer to the data + SourceHandle Describe() const; + + GraphPtrConst Get() const; + + const AZ::Uuid& Id() const; + + bool IsDescriptionValid() const; + + bool IsGraphValid() const; + + GraphPtr Mod() const; + + bool operator==(const SourceHandle& other) const; + + bool operator!=(const SourceHandle& other) const; + + const AZ::IO::Path& Path() const; + + bool PathEquals(const SourceHandle& other) const; + + AZStd::string ToString() const; + + private: + ScriptCanvas::DataPtr m_data; + AZ::Uuid m_id = AZ::Uuid::CreateNull(); + AZ::IO::Path m_path; + }; +} + +namespace ScriptCanvas +{ + class ScriptCanvasData + : public AZStd::intrusive_refcount + { + public: + + AZ_RTTI(ScriptCanvasData, "{1072E894-0C67-4091-8B64-F7DB324AD13C}"); + AZ_CLASS_ALLOCATOR(ScriptCanvasData, AZ::SystemAllocator, 0); + ScriptCanvasData() = default; + virtual ~ScriptCanvasData() = default; + ScriptCanvasData(ScriptCanvasData&& other); + ScriptCanvasData& operator=(ScriptCanvasData&& other); + + static void Reflect(AZ::ReflectContext* reflectContext); + + AZ::Entity* GetScriptCanvasEntity() const { return m_scriptCanvasEntity.get(); } + + const Graph* GetGraph() const; + + const ScriptCanvasEditor::Graph* GetEditorGraph() const; + + Graph* ModGraph(); + + ScriptCanvasEditor::Graph* ModEditorGraph(); + + AZStd::unique_ptr m_scriptCanvasEntity; + private: + ScriptCanvasData(const ScriptCanvasData&) = delete; + }; +} + namespace AZStd { template<> @@ -304,11 +430,28 @@ namespace AZStd { using argument_type = ScriptCanvas::SlotId; using result_type = AZStd::size_t; - AZ_FORCE_INLINE size_t operator()(const argument_type& ref) const + + inline size_t operator()(const argument_type& ref) const { return AZStd::hash()(ref.m_id); } }; + + template<> + struct hash + { + using argument_type = ScriptCanvasEditor::SourceHandle; + using result_type = AZStd::size_t; + + inline size_t operator()(const argument_type& handle) const + { + size_t h = 0; + hash_combine(h, handle.Id()); + hash_combine(h, handle.Path()); + hash_combine(h, handle.Get()); + return h; + } + }; } #define SCRIPT_CANVAS_INFINITE_LOOP_DETECTION_COUNT (2000000) diff --git a/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Core/Graph.cpp b/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Core/Graph.cpp index 9d848ff998..13f13e1448 100644 --- a/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Core/Graph.cpp +++ b/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Core/Graph.cpp @@ -37,7 +37,6 @@ #include #include #include -#include #include #include #include @@ -52,6 +51,7 @@ namespace GraphCpp VariablePanelSymantics, AddVersionData, RemoveFunctionGraphMarker, + FixupVersionDataTypeId, // label your version above Current }; @@ -71,11 +71,20 @@ namespace ScriptCanvas componentElementNode.AddElementWithData(context, "m_assetType", azrtti_typeid()); } - if (componentElementNode.GetVersion() < GraphCpp::GraphVersion::RemoveFunctionGraphMarker) + if (auto subElement = componentElementNode.FindElement(AZ_CRC_CE("isFunctionGraph")); subElement > 0) { - componentElementNode.RemoveElementByName(AZ_CRC_CE("isFunctionGraph")); + componentElementNode.RemoveElement(subElement); } + if (auto subElement = componentElementNode.FindSubElement(AZ_CRC_CE("versionData"))) + { + if (subElement->GetId() == azrtti_typeid()) + { + componentElementNode.RemoveElementByName(AZ_CRC_CE("versionData")); + } + } + + return true; } @@ -1190,11 +1199,6 @@ namespace ScriptCanvas m_isObserved = isObserved; } - AZ::Data::AssetType Graph::GetAssetType() const - { - return m_assetType; - } - void Graph::VersioningRemoveSlot(ScriptCanvas::Node& scriptCanvasNode, const SlotId& slotId) { bool deletedSlot = true; diff --git a/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Core/Graph.h b/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Core/Graph.h index 46e8a103bb..76fc3a6c7b 100644 --- a/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Core/Graph.h +++ b/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Core/Graph.h @@ -14,14 +14,12 @@ #include #include #include - #include #include #include #include #include #include - #include namespace ScriptCanvas @@ -189,8 +187,6 @@ namespace ScriptCanvas bool IsGraphObserved() const override; void SetIsGraphObserved(bool isObserved) override; - - AZ::Data::AssetType GetAssetType() const override; //// const AZStd::unordered_map& GetNodeMapping() const { return m_nodeMapping; } @@ -200,7 +196,7 @@ namespace ScriptCanvas GraphData m_graphData; AZ::Data::AssetType m_assetType; - + private: ScriptCanvasId m_scriptCanvasId; ExecutionMode m_executionMode = ExecutionMode::Interpreted; @@ -209,7 +205,7 @@ namespace ScriptCanvas GraphVariableManagerRequests* m_variableRequests = nullptr; // Keeps a mapping of the Node EntityId -> NodeComponent. - // Saves looking up the NodeComponent everytime we need the Node. + // Saves looking up the NodeComponent every time we need the Node. AZStd::unordered_map m_nodeMapping; bool m_isObserved; diff --git a/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Core/GraphBus.h b/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Core/GraphBus.h index 6b7133d47e..53d1a95964 100644 --- a/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Core/GraphBus.h +++ b/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Core/GraphBus.h @@ -147,9 +147,6 @@ namespace ScriptCanvas //! returns a pair of with the supplied id //! The variable datum pointer is non-null if the variable has been found virtual GraphVariable* FindVariableById(const VariableId& variableId) = 0; - - virtual AZ::Data::AssetType GetAssetType() const = 0; - }; using GraphRequestBus = AZ::EBus; diff --git a/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Core/MethodConfiguration.cpp b/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Core/MethodConfiguration.cpp index 24609ee81d..67f947004b 100644 --- a/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Core/MethodConfiguration.cpp +++ b/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Core/MethodConfiguration.cpp @@ -13,6 +13,7 @@ #include #include +#include "../../GraphCanvas/Code/Source/Translation/TranslationBus.h" namespace ScriptCanvas { @@ -55,13 +56,30 @@ namespace ScriptCanvas { const Data::Type outputType = (unpackedTypes.size() == 1 && AZ::BehaviorContextHelper::IsStringParameter(*result)) ? Data::Type::String() : Data::FromAZType(unpackedTypes[resultIndex]); - const AZStd::string resultSlotName(AZStd::string::format("Result: %s", Data::GetName(outputType).data())); + AZStd::string resultSlotName(Data::GetName(outputType)); + + AZStd::string className = outputConfig.config.m_className ? *outputConfig.config.m_className : ""; + if (className.empty()) + { + className = outputConfig.config.m_prettyClassName; + } + + GraphCanvas::TranslationKey key; + key << "BehaviorClass" << className << "methods" << *outputConfig.config.m_lookupName << "results" << resultIndex << "details"; + + GraphCanvas::TranslationRequests::Details details; + GraphCanvas::TranslationRequestBus::BroadcastResult(details, &GraphCanvas::TranslationRequests::GetDetails, key, details); + + if (!details.m_name.empty()) + { + resultSlotName = details.m_name; + } + SlotId addedSlotId; if (outputConfig.isReturnValueOverloaded) { DynamicDataSlotConfiguration slotConfiguration; - //slotConfiguration.m_name = outputConfig.outputNamePrefix + resultSlotName; slotConfiguration.m_dynamicDataType = outputConfig.methodNode->GetOverloadedOutputType(resultIndex); diff --git a/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Core/Node.cpp b/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Core/Node.cpp index 2ae37b1253..c4143e7295 100644 --- a/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Core/Node.cpp +++ b/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Core/Node.cpp @@ -1160,8 +1160,8 @@ namespace ScriptCanvas if (!slot->IsDynamicSlot() || slot->HasDisplayType()) { InitializeVariableReference((*slot), {}); - } - } + } + } else { ModifiableDatumView datumView; @@ -2391,7 +2391,8 @@ namespace ScriptCanvas if (variableIds.count(variableId) > 0) { - InitializeVariableReference(slot, variableIds); + slot.ClearVariableReference(); + NodeNotificationsBus::Event(GetEntityId(), &NodeNotifications::OnSlotInputChanged, slot.GetId()); } } @@ -2962,6 +2963,11 @@ namespace ScriptCanvas } } + AZStd::string Node::GetNodeTypeName() const + { + return RTTI_GetTypeName(); + } + AZStd::string Node::GetDebugName() const { if (GetEntityId().IsValid()) diff --git a/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Core/Node.h b/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Core/Node.h index a54f330e18..97916c8af6 100644 --- a/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Core/Node.h +++ b/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Core/Node.h @@ -525,6 +525,7 @@ namespace ScriptCanvas void SignalDeserialized(); + virtual AZStd::string GetNodeTypeName() const; virtual AZStd::string GetDebugName() const; virtual AZStd::string GetNodeName() const; @@ -886,6 +887,8 @@ protected: // The SlotIterator& parameter is populated with an iterator to the inserted or found slot within the slot list AZ::Outcome FindOrInsertSlot(AZ::s64 index, const SlotConfiguration& slotConfig, SlotIterator& iterOut); + public: + // This function is only called once, when the node is added to a graph, as opposed to Init(), which will be called // soon after construction, or after deserialization. So the functionality in configure does not need to be idempotent. void Configure(); @@ -1091,7 +1094,7 @@ protected: { DataSlotConfiguration slotConfiguration; - slotConfiguration.m_name = AZStd::string::format("%s: %s", t_Traits::GetResultName(0), Data::GetName(Data::FromAZType>()).data()); + slotConfiguration.m_name = t_Traits::GetResultName(0); slotConfiguration.SetType(Data::FromAZType>()); slotConfiguration.SetConnectionType(ConnectionType::Output); @@ -1113,7 +1116,7 @@ protected: { DataSlotConfiguration slotConfiguration; - slotConfiguration.m_name = AZStd::string::format("%s: %s", t_Traits::GetResultName(Index), Data::GetName(Data::FromAZType>>()).data()); + slotConfiguration.m_name = t_Traits::GetResultName(Index); slotConfiguration.SetType(Data::FromAZType>>()); slotConfiguration.SetConnectionType(connectionType); diff --git a/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Core/NodeFunctionGeneric.h b/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Core/NodeFunctionGeneric.h index cb6c4bf942..549c56d07d 100644 --- a/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Core/NodeFunctionGeneric.h +++ b/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Core/NodeFunctionGeneric.h @@ -94,7 +94,7 @@ namespace ScriptCanvas }\ \ static const char* GetDependency() { return CATEGORY; }\ - static const char* GetCategory() { if (ISDEPRECATED) return AZ_STRINGIZE(CATEGORY /Deprecated); else return CATEGORY; };\ + static const char* GetCategory() { if (IsDeprecated()) return "Deprecated"; else return CATEGORY; };\ static const char* GetDescription() { return DESCRIPTION; };\ static const char* GetNodeName() { return #NODE_NAME; };\ static bool IsDeprecated() { return ISDEPRECATED; };\ @@ -256,7 +256,7 @@ namespace ScriptCanvas { DataSlotConfiguration slotConfiguration; - slotConfiguration.m_name = AZStd::string::format("%s: %s", Data::Traits::GetName().data(), t_Traits::GetArgName(Index)); + slotConfiguration.m_name = t_Traits::GetArgName(Index); slotConfiguration.ConfigureDatum(AZStd::move(Datum(Data::FromAZType(Data::Traits::GetAZType()), Datum::eOriginality::Copy))); slotConfiguration.SetConnectionType(connectionType); diff --git a/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Core/Nodeable.cpp b/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Core/Nodeable.cpp index 093f87e1f7..7bb37a87dc 100644 --- a/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Core/Nodeable.cpp +++ b/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Core/Nodeable.cpp @@ -80,6 +80,7 @@ namespace ScriptCanvas ->Attribute(AZ::ScriptCanvasAttributes::VariableCreationForbidden, AZ::AttributeIsValid::IfPresent) ->Attribute(AZ::Script::Attributes::UseClassIndexAllowNil, AZ::AttributeIsValid::IfPresent) ->Constructor() + ->Attribute(AZ::Script::Attributes::DefaultConstructorOverrideIndex, 0) ->Method("Deactivate", &Nodeable::Deactivate) ->Method("InitializeExecutionState", &Nodeable::InitializeExecutionState) ->Method("InitializeExecutionOuts", &Nodeable::InitializeExecutionOuts) diff --git a/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Data/DataTrait.h b/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Data/DataTrait.h index 6a3c95d1e1..ca25013d35 100644 --- a/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Data/DataTrait.h +++ b/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Data/DataTrait.h @@ -182,7 +182,7 @@ namespace ScriptCanvas static AZ::Uuid GetAZType(const Data::Type& = {}) { return azrtti_typeid(); } static Data::Type GetSCType(const AZ::TypeId& = AZ::TypeId::CreateNull()) { return Data::Type::CRC(); } - static AZStd::string GetName(const Data::Type& = {}) { return "CRC"; } + static AZStd::string GetName(const Data::Type& = {}) { return "Tag"; } static Type GetDefault(const Data::Type& = {}) { return CRCType(); } static bool IsDefault(const Type& value, const Data::Type& = {}) { return value == GetDefault(); } }; @@ -198,7 +198,7 @@ namespace ScriptCanvas static AZ::Uuid GetAZType(const Data::Type& = {}) { return azrtti_typeid(); } static Data::Type GetSCType(const AZ::TypeId& = AZ::TypeId::CreateNull()) { return Data::Type::EntityID(); } - static AZStd::string GetName(const Data::Type& = {}) { return "EntityID"; } + static AZStd::string GetName(const Data::Type& = {}) { return "EntityId"; } static Type GetDefault(const Data::Type& = {}) { return GraphOwnerId; } static bool IsDefault(const Type& value, const Data::Type& = {}) { return value == GetDefault(); } }; diff --git a/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Data/PropertyTraits.h b/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Data/PropertyTraits.h index ad49f7bb86..aadecb57e9 100644 --- a/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Data/PropertyTraits.h +++ b/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Data/PropertyTraits.h @@ -25,6 +25,7 @@ namespace ScriptCanvas GetterFunction m_getterFunction; Data::Type m_propertyType; AZStd::string m_propertyName; + AZStd::string m_displayName; }; using GetterContainer = AZStd::unordered_map; @@ -35,6 +36,7 @@ namespace ScriptCanvas SetterFunction m_setterFunction; Data::Type m_propertyType; AZStd::string m_propertyName; + AZStd::string m_displayName; }; using SetterContainer = AZStd::unordered_map; @@ -84,7 +86,7 @@ namespace ScriptCanvas using PropertyType = AZStd::decay_t>; static_assert(!AZStd::is_void::value, "Getter function must return a non-void type"); - static GetterWrapper Callback(AZStd::string_view propertyName, const FunctionType& propertyGetter) + static GetterWrapper Callback(AZStd::string_view propertyName, const FunctionType& propertyGetter, AZStd::string_view displayName) { GetterFunction getterWrapper = [propertyGetter](const Datum& thisDatum) -> AZ::Outcome { @@ -97,7 +99,7 @@ namespace ScriptCanvas return AZ::Success(Datum(AZStd::invoke(propertyGetter, thisObject))); }; - return { getterWrapper, Data::FromAZType(), propertyName }; + return { getterWrapper, Data::FromAZType(), propertyName, displayName }; } }; @@ -107,7 +109,7 @@ namespace ScriptCanvas static_assert(!AZStd::is_void::value, "Setter function must be either a member function pointer that accepts 1 arguments or an invokable object that accepts 2 argument"); static_assert(!AZStd::is_void::value, "Property being set must be a non-void type"); - static SetterWrapper Callback(AZStd::string_view propertyName, const FunctionType& propertySetter) + static SetterWrapper Callback(AZStd::string_view propertyName, const FunctionType& propertySetter, AZStd::string_view displayName) { SetterFunction setterWrapper = [propertySetter](Datum& thisDatum, const Datum& propertyDatum) -> AZ::Outcome { @@ -128,7 +130,7 @@ namespace ScriptCanvas return AZ::Success(); }; - return { setterWrapper, Data::FromAZType(), propertyName }; + return { setterWrapper, Data::FromAZType(), propertyName, displayName }; } }; } @@ -178,20 +180,20 @@ namespace ScriptCanvas static GetterContainer GetGetterWrappers(const Data::Type&) { GetterContainer getterFunctions; - getterFunctions.emplace("x", WrapGetter::Callback("x", &Data::QuaternionType::GetX)); - getterFunctions.emplace("y", WrapGetter::Callback("y", &Data::QuaternionType::GetY)); - getterFunctions.emplace("z", WrapGetter::Callback("z", &Data::QuaternionType::GetZ)); - getterFunctions.emplace("w", WrapGetter::Callback("w", &Data::QuaternionType::GetW)); + getterFunctions.emplace("x", WrapGetter::Callback("x", &Data::QuaternionType::GetX, "X")); + getterFunctions.emplace("y", WrapGetter::Callback("y", &Data::QuaternionType::GetY, "Y")); + getterFunctions.emplace("z", WrapGetter::Callback("z", &Data::QuaternionType::GetZ, "Z")); + getterFunctions.emplace("w", WrapGetter::Callback("w", &Data::QuaternionType::GetW, "W")); return getterFunctions; } static SetterContainer GetSetterWrappers(const Data::Type&) { SetterContainer setterFunctions; - setterFunctions.emplace("x", WrapSetter::Callback("x", &Data::QuaternionType::SetX)); - setterFunctions.emplace("y", WrapSetter::Callback("y", &Data::QuaternionType::SetY)); - setterFunctions.emplace("z", WrapSetter::Callback("z", &Data::QuaternionType::SetZ)); - setterFunctions.emplace("w", WrapSetter::Callback("w", &Data::QuaternionType::SetW)); + setterFunctions.emplace("x", WrapSetter::Callback("x", &Data::QuaternionType::SetX, "X")); + setterFunctions.emplace("y", WrapSetter::Callback("y", &Data::QuaternionType::SetY, "Y")); + setterFunctions.emplace("z", WrapSetter::Callback("z", &Data::QuaternionType::SetZ, "Z")); + setterFunctions.emplace("w", WrapSetter::Callback("w", &Data::QuaternionType::SetW, "W")); return setterFunctions; } }; @@ -202,16 +204,16 @@ namespace ScriptCanvas static GetterContainer GetGetterWrappers(const Data::Type&) { GetterContainer getterFunctions; - getterFunctions.emplace("x", WrapGetter::Callback("x", &Data::Vector2Type::GetX)); - getterFunctions.emplace("y", WrapGetter::Callback("y", &Data::Vector2Type::GetY)); + getterFunctions.emplace("x", WrapGetter::Callback("x", &Data::Vector2Type::GetX, "X")); + getterFunctions.emplace("y", WrapGetter::Callback("y", &Data::Vector2Type::GetY, "Y")); return getterFunctions; } static SetterContainer GetSetterWrappers(const Data::Type&) { SetterContainer setterFunctions; - setterFunctions.emplace("x", WrapSetter::Callback("x", &Data::Vector2Type::SetX)); - setterFunctions.emplace("y", WrapSetter::Callback("y", &Data::Vector2Type::SetY)); + setterFunctions.emplace("x", WrapSetter::Callback("x", &Data::Vector2Type::SetX, "X")); + setterFunctions.emplace("y", WrapSetter::Callback("y", &Data::Vector2Type::SetY, "Y")); return setterFunctions; } }; @@ -222,18 +224,18 @@ namespace ScriptCanvas static GetterContainer GetGetterWrappers(const Data::Type&) { GetterContainer getterFunctions; - getterFunctions.emplace("x", WrapGetter::Callback("x", &Data::Vector3Type::GetX)); - getterFunctions.emplace("y", WrapGetter::Callback("y", &Data::Vector3Type::GetY)); - getterFunctions.emplace("z", WrapGetter::Callback("z", &Data::Vector3Type::GetZ)); + getterFunctions.emplace("x", WrapGetter::Callback("x", &Data::Vector3Type::GetX, "X")); + getterFunctions.emplace("y", WrapGetter::Callback("y", &Data::Vector3Type::GetY, "Y")); + getterFunctions.emplace("z", WrapGetter::Callback("z", &Data::Vector3Type::GetZ, "Z")); return getterFunctions; } static SetterContainer GetSetterWrappers(const Data::Type&) { SetterContainer setterFunctions; - setterFunctions.emplace("x", WrapSetter::Callback("x", &Data::Vector3Type::SetX)); - setterFunctions.emplace("y", WrapSetter::Callback("y", &Data::Vector3Type::SetY)); - setterFunctions.emplace("z", WrapSetter::Callback("z", &Data::Vector3Type::SetZ)); + setterFunctions.emplace("x", WrapSetter::Callback("x", &Data::Vector3Type::SetX, "X")); + setterFunctions.emplace("y", WrapSetter::Callback("y", &Data::Vector3Type::SetY, "Y")); + setterFunctions.emplace("z", WrapSetter::Callback("z", &Data::Vector3Type::SetZ, "Z")); return setterFunctions; } }; @@ -244,20 +246,20 @@ namespace ScriptCanvas static GetterContainer GetGetterWrappers(const Data::Type&) { GetterContainer getterFunctions; - getterFunctions.emplace("x", WrapGetter::Callback("x", &Data::Vector4Type::GetX)); - getterFunctions.emplace("y", WrapGetter::Callback("y", &Data::Vector4Type::GetY)); - getterFunctions.emplace("z", WrapGetter::Callback("z", &Data::Vector4Type::GetZ)); - getterFunctions.emplace("w", WrapGetter::Callback("w", &Data::Vector4Type::GetW)); + getterFunctions.emplace("x", WrapGetter::Callback("x", &Data::Vector4Type::GetX, "X")); + getterFunctions.emplace("y", WrapGetter::Callback("y", &Data::Vector4Type::GetY, "Y")); + getterFunctions.emplace("z", WrapGetter::Callback("z", &Data::Vector4Type::GetZ, "Z")); + getterFunctions.emplace("w", WrapGetter::Callback("w", &Data::Vector4Type::GetW, "W")); return getterFunctions; } static SetterContainer GetSetterWrappers(const Data::Type&) { SetterContainer setterFunctions; - setterFunctions.emplace("x", WrapSetter::Callback("x", &Data::Vector4Type::SetX)); - setterFunctions.emplace("y", WrapSetter::Callback("y", &Data::Vector4Type::SetY)); - setterFunctions.emplace("z", WrapSetter::Callback("z", &Data::Vector4Type::SetZ)); - setterFunctions.emplace("w", WrapSetter::Callback("w", &Data::Vector4Type::SetW)); + setterFunctions.emplace("x", WrapSetter::Callback("x", &Data::Vector4Type::SetX, "X")); + setterFunctions.emplace("y", WrapSetter::Callback("y", &Data::Vector4Type::SetY, "Y")); + setterFunctions.emplace("z", WrapSetter::Callback("z", &Data::Vector4Type::SetZ, "Z")); + setterFunctions.emplace("w", WrapSetter::Callback("w", &Data::Vector4Type::SetW, "W")); return setterFunctions; } }; @@ -268,20 +270,20 @@ namespace ScriptCanvas static GetterContainer GetGetterWrappers(const Data::Type&) { GetterContainer getterFunctions; - getterFunctions.emplace("r", WrapGetter::Callback("r", &Data::ColorType::GetR)); - getterFunctions.emplace("g", WrapGetter::Callback("g", &Data::ColorType::GetG)); - getterFunctions.emplace("b", WrapGetter::Callback("b", &Data::ColorType::GetB)); - getterFunctions.emplace("a", WrapGetter::Callback("a", &Data::ColorType::GetA)); + getterFunctions.emplace("r", WrapGetter::Callback("r", &Data::ColorType::GetR, "Red")); + getterFunctions.emplace("g", WrapGetter::Callback("g", &Data::ColorType::GetG, "Green")); + getterFunctions.emplace("b", WrapGetter::Callback("b", &Data::ColorType::GetB, "Blue")); + getterFunctions.emplace("a", WrapGetter::Callback("a", &Data::ColorType::GetA, "Alpha")); return getterFunctions; } static SetterContainer GetSetterWrappers(const Data::Type&) { SetterContainer setterFunctions; - setterFunctions.emplace("r", WrapSetter::Callback("r", &Data::ColorType::SetR)); - setterFunctions.emplace("g", WrapSetter::Callback("g", &Data::ColorType::SetG)); - setterFunctions.emplace("b", WrapSetter::Callback("b", &Data::ColorType::SetB)); - setterFunctions.emplace("a", WrapSetter::Callback("a", &Data::ColorType::SetA)); + setterFunctions.emplace("r", WrapSetter::Callback("r", &Data::ColorType::SetR, "Red")); + setterFunctions.emplace("g", WrapSetter::Callback("g", &Data::ColorType::SetG, "Green")); + setterFunctions.emplace("b", WrapSetter::Callback("b", &Data::ColorType::SetB, "Blue")); + setterFunctions.emplace("a", WrapSetter::Callback("a", &Data::ColorType::SetA, "Alpha")); return setterFunctions; } }; @@ -292,16 +294,16 @@ namespace ScriptCanvas static GetterContainer GetGetterWrappers(const Data::Type&) { GetterContainer getterFunctions; - getterFunctions.emplace("normal", WrapGetter::Callback("normal", &Data::PlaneType::GetNormal)); - getterFunctions.emplace("distance", WrapGetter::Callback("distance", &Data::PlaneType::GetDistance)); + getterFunctions.emplace("mormal", WrapGetter::Callback("normal", &Data::PlaneType::GetNormal, "Normal")); + getterFunctions.emplace("distance", WrapGetter::Callback("distance", &Data::PlaneType::GetDistance, "Distance")); return getterFunctions; } static SetterContainer GetSetterWrappers(const Data::Type&) { SetterContainer setterFunctions; - setterFunctions.emplace("normal", WrapSetter::Callback("normal", &Data::PlaneType::SetNormal)); - setterFunctions.emplace("distance", WrapSetter::Callback("distance", &Data::PlaneType::SetDistance)); + setterFunctions.emplace("normal", WrapSetter::Callback("normal", &Data::PlaneType::SetNormal, "Normal")); + setterFunctions.emplace("distance", WrapSetter::Callback("distance", &Data::PlaneType::SetDistance, "Distance")); return setterFunctions; } }; @@ -312,17 +314,17 @@ namespace ScriptCanvas static GetterContainer GetGetterWrappers(const Data::Type&) { GetterContainer getterFunctions; - getterFunctions.emplace("basisX", WrapGetter::Callback("basisX", &Data::TransformType::GetBasisX)); - getterFunctions.emplace("basisY", WrapGetter::Callback("basisY", &Data::TransformType::GetBasisY)); - getterFunctions.emplace("basisZ", WrapGetter::Callback("basisZ", &Data::TransformType::GetBasisZ)); - getterFunctions.emplace("translation", WrapGetter::Callback("translation", &Data::TransformType::GetTranslation)); + getterFunctions.emplace("basisX", WrapGetter::Callback("basisX", &Data::TransformType::GetBasisX, "X Axis")); + getterFunctions.emplace("basisY", WrapGetter::Callback("basisY", &Data::TransformType::GetBasisY, "Y Axis")); + getterFunctions.emplace("basisZ", WrapGetter::Callback("basisZ", &Data::TransformType::GetBasisZ, "Z Axis")); + getterFunctions.emplace("translation", WrapGetter::Callback("translation", &Data::TransformType::GetTranslation, "Translation")); return getterFunctions; } static SetterContainer GetSetterWrappers(const Data::Type&) { SetterContainer setterFunctions; - setterFunctions.emplace("translation", WrapSetter::Callback("translation", &Data::TransformType::SetTranslation)); + setterFunctions.emplace("translation", WrapSetter::Callback("translation", &Data::TransformType::SetTranslation, "Translation")); return setterFunctions; } }; @@ -333,16 +335,16 @@ namespace ScriptCanvas static GetterContainer GetGetterWrappers(const Data::Type&) { GetterContainer getterFunctions; - getterFunctions.emplace("min", WrapGetter::Callback("min", &Data::AABBType::GetMin)); - getterFunctions.emplace("max", WrapGetter::Callback("max", &Data::AABBType::GetMax)); + getterFunctions.emplace("min", WrapGetter::Callback("min", &Data::AABBType::GetMin, "Minimum")); + getterFunctions.emplace("max", WrapGetter::Callback("max", &Data::AABBType::GetMax, "Maximum")); return getterFunctions; } static SetterContainer GetSetterWrappers(const Data::Type&) { SetterContainer setterFunctions; - setterFunctions.emplace("min", WrapSetter::Callback("min", &Data::AABBType::SetMin)); - setterFunctions.emplace("max", WrapSetter::Callback("max", &Data::AABBType::SetMax)); + setterFunctions.emplace("min", WrapSetter::Callback("min", &Data::AABBType::SetMin, "Minimum")); + setterFunctions.emplace("max", WrapSetter::Callback("max", &Data::AABBType::SetMax, "Maximum")); return setterFunctions; } }; @@ -353,23 +355,23 @@ namespace ScriptCanvas static GetterContainer GetGetterWrappers(const Data::Type&) { GetterContainer getterFunctions; - getterFunctions.emplace("axisX", WrapGetter::Callback("axisX", &Data::OBBType::GetAxisX)); - getterFunctions.emplace("axisY", WrapGetter::Callback("axisY", &Data::OBBType::GetAxisY)); - getterFunctions.emplace("axisZ", WrapGetter::Callback("axisZ", &Data::OBBType::GetAxisZ)); - getterFunctions.emplace("halfLengthX", WrapGetter::Callback("halfLengthX", &Data::OBBType::GetHalfLengthX)); - getterFunctions.emplace("halfLengthY", WrapGetter::Callback("halfLengthY", &Data::OBBType::GetHalfLengthY)); - getterFunctions.emplace("halfLengthZ", WrapGetter::Callback("halfLengthZ", &Data::OBBType::GetHalfLengthZ)); - getterFunctions.emplace("position", WrapGetter::Callback("position", &Data::OBBType::GetPosition)); + getterFunctions.emplace("axisX", WrapGetter::Callback("axisX", &Data::OBBType::GetAxisX, "X Axis")); + getterFunctions.emplace("axisY", WrapGetter::Callback("axisY", &Data::OBBType::GetAxisY, "Y Axis")); + getterFunctions.emplace("Z Axis", WrapGetter::Callback("axisZ", &Data::OBBType::GetAxisZ, "Z Axis")); + getterFunctions.emplace("halfLengthX", WrapGetter::Callback("halfLengthX", &Data::OBBType::GetHalfLengthX, "Half Length X")); + getterFunctions.emplace("halfLengthY", WrapGetter::Callback("halfLengthY", &Data::OBBType::GetHalfLengthY, "Half Length Y")); + getterFunctions.emplace("halfLengthZ", WrapGetter::Callback("halfLengthZ", &Data::OBBType::GetHalfLengthZ, "Half Length Z")); + getterFunctions.emplace("position", WrapGetter::Callback("position", &Data::OBBType::GetPosition, "Position")); return getterFunctions; } static SetterContainer GetSetterWrappers(const Data::Type&) { SetterContainer setterFunctions; - setterFunctions.emplace("halfLengthX", WrapSetter::Callback("halfLengthX", &Data::OBBType::SetHalfLengthX)); - setterFunctions.emplace("halfLengthY", WrapSetter::Callback("halfLengthY", &Data::OBBType::SetHalfLengthY)); - setterFunctions.emplace("halfLengthZ", WrapSetter::Callback("halfLengthZ", &Data::OBBType::SetHalfLengthZ)); - setterFunctions.emplace("position", WrapSetter::Callback("position", &Data::OBBType::SetPosition)); + setterFunctions.emplace("halfLengthX", WrapSetter::Callback("halfLengthX", &Data::OBBType::SetHalfLengthX, "Half Length X")); + setterFunctions.emplace("halfLengthY", WrapSetter::Callback("halfLengthY", &Data::OBBType::SetHalfLengthY, "Half Length Y")); + setterFunctions.emplace("halfLengthZ", WrapSetter::Callback("halfLengthZ", &Data::OBBType::SetHalfLengthZ, "Half Length Z")); + setterFunctions.emplace("position", WrapSetter::Callback("position", &Data::OBBType::SetPosition, "Position")); return setterFunctions; } }; @@ -380,18 +382,18 @@ namespace ScriptCanvas static GetterContainer GetGetterWrappers(const Data::Type&) { GetterContainer getterFunctions; - getterFunctions.emplace("basisX", WrapGetter::Callback("basisX", &Data::Matrix3x3Type::GetBasisX)); - getterFunctions.emplace("basisY", WrapGetter::Callback("basisY", &Data::Matrix3x3Type::GetBasisY)); - getterFunctions.emplace("basisZ", WrapGetter::Callback("basisZ", &Data::Matrix3x3Type::GetBasisZ)); + getterFunctions.emplace("basisX", WrapGetter::Callback("basisX", &Data::Matrix3x3Type::GetBasisX, "Position")); + getterFunctions.emplace("basisY", WrapGetter::Callback("basisY", &Data::Matrix3x3Type::GetBasisY, "Position")); + getterFunctions.emplace("basisZ", WrapGetter::Callback("basisZ", &Data::Matrix3x3Type::GetBasisZ, "Position")); return getterFunctions; } static SetterContainer GetSetterWrappers(const Data::Type&) { SetterContainer setterFunctions; - setterFunctions.emplace("basisX", WrapSetter::Callback("basisX", &Data::Matrix3x3Type::SetBasisX)); - setterFunctions.emplace("basisY", WrapSetter::Callback("basisY", &Data::Matrix3x3Type::SetBasisY)); - setterFunctions.emplace("basisZ", WrapSetter::Callback("basisZ", &Data::Matrix3x3Type::SetBasisZ)); + setterFunctions.emplace("basisX", WrapSetter::Callback("basisX", &Data::Matrix3x3Type::SetBasisX, "X Axis")); + setterFunctions.emplace("basisY", WrapSetter::Callback("basisY", &Data::Matrix3x3Type::SetBasisY, "Y Axis")); + setterFunctions.emplace("basisZ", WrapSetter::Callback("basisZ", &Data::Matrix3x3Type::SetBasisZ, "Z Axis")); return setterFunctions; } }; @@ -402,20 +404,20 @@ namespace ScriptCanvas static GetterContainer GetGetterWrappers(const Data::Type&) { GetterContainer getterFunctions; - getterFunctions.emplace("basisX", WrapGetter::Callback("basisX", &Data::Matrix4x4Type::GetBasisX)); - getterFunctions.emplace("basisY", WrapGetter::Callback("basisY", &Data::Matrix4x4Type::GetBasisY)); - getterFunctions.emplace("basisZ", WrapGetter::Callback("basisZ", &Data::Matrix4x4Type::GetBasisZ)); - getterFunctions.emplace("translation", WrapGetter::Callback("translation", &Data::Matrix4x4Type::GetTranslation)); + getterFunctions.emplace("basisX", WrapGetter::Callback("basisX", &Data::Matrix4x4Type::GetBasisX, "X Axis")); + getterFunctions.emplace("basisY", WrapGetter::Callback("basisY", &Data::Matrix4x4Type::GetBasisY, "Y Axis")); + getterFunctions.emplace("basisZ", WrapGetter::Callback("basisZ", &Data::Matrix4x4Type::GetBasisZ, "Z Axis")); + getterFunctions.emplace("Translation", WrapGetter::Callback("translation", &Data::Matrix4x4Type::GetTranslation, "Translation")); return getterFunctions; } static SetterContainer GetSetterWrappers(const Data::Type&) { SetterContainer setterFunctions; - setterFunctions.emplace("basisX", WrapSetter::Callback("basisX", &Data::Matrix4x4Type::SetBasisX)); - setterFunctions.emplace("basisY", WrapSetter::Callback("basisY", &Data::Matrix4x4Type::SetBasisY)); - setterFunctions.emplace("basisZ", WrapSetter::Callback("basisZ", &Data::Matrix4x4Type::SetBasisZ)); - setterFunctions.emplace("translation", WrapSetter::Callback("translation", &Data::Matrix4x4Type::SetTranslation)); + setterFunctions.emplace("basisX", WrapSetter::Callback("basisX", &Data::Matrix4x4Type::SetBasisX, "X Axis")); + setterFunctions.emplace("basisY", WrapSetter::Callback("basisY", &Data::Matrix4x4Type::SetBasisY, "Y Axis")); + setterFunctions.emplace("basisZ", WrapSetter::Callback("basisZ", &Data::Matrix4x4Type::SetBasisZ, "Z Axis")); + setterFunctions.emplace("translation", WrapSetter::Callback("translation", &Data::Matrix4x4Type::SetTranslation, "Translation")); return setterFunctions; } }; diff --git a/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Execution/ExecutionContext.cpp b/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Execution/ExecutionContext.cpp index f7ae4a931e..8c3c3d6da2 100644 --- a/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Execution/ExecutionContext.cpp +++ b/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Execution/ExecutionContext.cpp @@ -41,7 +41,7 @@ namespace ScriptCanvas { ActivationData::ActivationData(const RuntimeDataOverrides& variableOverrides, ActivationInputArray& storage) : variableOverrides(variableOverrides) - , runtimeData(variableOverrides.m_runtimeAsset->GetData()) + , runtimeData(variableOverrides.m_runtimeAsset->m_runtimeData) , storage(storage) {} diff --git a/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Execution/ExecutionState.cpp b/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Execution/ExecutionState.cpp index 81f0528b45..882003e7a4 100644 --- a/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Execution/ExecutionState.cpp +++ b/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Execution/ExecutionState.cpp @@ -22,7 +22,7 @@ namespace ScriptCanvas ExecutionStateConfig::ExecutionStateConfig(AZ::Data::Asset runtimeAsset, RuntimeComponent& component) : asset(runtimeAsset) , component(component) - , runtimeData(runtimeAsset.Get()->GetData()) + , runtimeData(runtimeAsset.Get()->m_runtimeData) {} ExecutionState::ExecutionState(const ExecutionStateConfig& config) diff --git a/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Execution/ExecutionState.h b/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Execution/ExecutionState.h index 8c2f0a67c4..89ddf178f3 100644 --- a/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Execution/ExecutionState.h +++ b/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Execution/ExecutionState.h @@ -19,6 +19,10 @@ #include #include +#if !defined(_RELEASE) +#define SCRIPT_CANVAS_RUNTIME_ASSET_CHECK +#endif + namespace AZ { class ReflectContext; diff --git a/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Execution/Interpreted/ExecutionInterpretedAPI.cpp b/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Execution/Interpreted/ExecutionInterpretedAPI.cpp index 4d7c8a2cda..eb856963f7 100644 --- a/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Execution/Interpreted/ExecutionInterpretedAPI.cpp +++ b/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Execution/Interpreted/ExecutionInterpretedAPI.cpp @@ -68,7 +68,7 @@ namespace ExecutionInterpretedAPICpp { if (lua_isstring(lua, -1)) { - AZ::ScriptContext::FromNativeContext(lua)->Error(AZ::ScriptContext::ErrorType::Error, true, "%s", lua_tostring(lua, -1)); + AZ::ScriptContext::FromNativeContext(lua)->Error(AZ::ScriptContext::ErrorType::Error, true, lua_tostring(lua, -1)); } else { @@ -401,7 +401,7 @@ namespace ScriptCanvas // \note: the the object is being constructed, and is assumed to never leave or re-enter Lua again AZ_Assert(lua_isuserdata(lua, -2) && !lua_islightuserdata(lua, -2), "Error in compiled lua file, 1st argument to OverrideNodeableMetatable is not userdata (Nodeable)"); AZ_Assert(lua_istable(lua, -1), "Error in compiled lua file, 2nd argument to OverrideNodeableMetatable is not a Lua table"); - + [[maybe_unused]] auto userData = reinterpret_cast(lua_touserdata(lua, -2)); AZ_Assert(userData && userData->magicData == AZ_CRC_CE("AZLuaUserData"), "this isn't user data"); // Lua: LuaUserData::nodeable, class_mt @@ -501,41 +501,54 @@ namespace ScriptCanvas return lua_gettop(lua); } - void InitializeInterpretedStatics(const RuntimeData& runtimeData) + void InitializeInterpretedStatics(RuntimeData& runtimeData) { -#if defined(AZ_PROFILE_BUILD) || defined(AZ_DEBUG_BUILD) - Execution::InitializeFromLuaStackFunctions(const_cast(runtimeData.m_debugMap)); -#endif - if (runtimeData.RequiresStaticInitialization()) + AZ_Error("ScriptCanvas", !runtimeData.m_areStaticsInitialized, "ScriptCanvas runtime data already initalized"); { - AZ::ScriptLoadResult result{}; - AZ::ScriptSystemRequestBus::BroadcastResult(result, &AZ::ScriptSystemRequests::LoadAndGetNativeContext, runtimeData.m_script, AZ::k_scriptLoadBinary, AZ::ScriptContextIds::DefaultScriptContextId); - AZ_Assert(result.status == AZ::ScriptLoadResult::Status::Initial, "ExecutionStateInterpreted script asset was valid but failed to load."); - AZ_Assert(result.lua, "Must have a default script context and a lua_State"); - AZ_Assert(lua_istable(result.lua, -1), "No run-time execution was available for this script"); + runtimeData.m_areStaticsInitialized = true; - auto lua = result.lua; - // Lua: table - lua_getfield(lua, -1, Grammar::k_InitializeStaticsName); - // Lua: table, ? - if (lua_isfunction(lua, -1)) + for (auto& dependency : runtimeData.m_requiredAssets) { - // Lua: table, function - lua_pushvalue(lua, -2); - // Lua: table, function, table - for (auto& clonerSource : runtimeData.m_cloneSources) + if (!dependency.Get()->m_runtimeData.m_areStaticsInitialized) { - lua_pushlightuserdata(lua, const_cast(reinterpret_cast(&clonerSource))); + InitializeInterpretedStatics(dependency.Get()->m_runtimeData); } - // Lua: table, function, table, cloners... - AZ::Internal::LuaSafeCall(lua, aznumeric_caster(runtimeData.m_cloneSources.size() + 1), 0); - // Lua: table - lua_pop(lua, 1); } - else + +#if defined(AZ_PROFILE_BUILD) || defined(AZ_DEBUG_BUILD) + Execution::InitializeFromLuaStackFunctions(const_cast(runtimeData.m_debugMap)); +#endif + if (runtimeData.RequiresStaticInitialization()) { + AZ::ScriptLoadResult result{}; + AZ::ScriptSystemRequestBus::BroadcastResult(result, &AZ::ScriptSystemRequests::LoadAndGetNativeContext, runtimeData.m_script, AZ::k_scriptLoadBinary, AZ::ScriptContextIds::DefaultScriptContextId); + AZ_Assert(result.status == AZ::ScriptLoadResult::Status::Initial, "ExecutionStateInterpreted script asset was valid but failed to load."); + AZ_Assert(result.lua, "Must have a default script context and a lua_State"); + AZ_Assert(lua_istable(result.lua, -1), "No run-time execution was available for this script"); + + auto lua = result.lua; + // Lua: table + lua_getfield(lua, -1, Grammar::k_InitializeStaticsName); // Lua: table, ? - lua_pop(lua, 2); + if (lua_isfunction(lua, -1)) + { + // Lua: table, function + lua_pushvalue(lua, -2); + // Lua: table, function, table + for (auto& clonerSource : runtimeData.m_cloneSources) + { + lua_pushlightuserdata(lua, const_cast(reinterpret_cast(&clonerSource))); + } + // Lua: table, function, table, cloners... + AZ::Internal::LuaSafeCall(lua, aznumeric_caster(runtimeData.m_cloneSources.size() + 1), 0); + // Lua: table + lua_pop(lua, 1); + } + else + { + // Lua: table, ? + lua_pop(lua, 2); + } } } } diff --git a/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Execution/Interpreted/ExecutionInterpretedAPI.h b/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Execution/Interpreted/ExecutionInterpretedAPI.h index c86327bc8d..db8473a468 100644 --- a/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Execution/Interpreted/ExecutionInterpretedAPI.h +++ b/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Execution/Interpreted/ExecutionInterpretedAPI.h @@ -43,7 +43,7 @@ namespace ScriptCanvas void InterpretedUnloadData(RuntimeData& runtimeData); - void InitializeInterpretedStatics(const RuntimeData& runtimeData); + void InitializeInterpretedStatics(RuntimeData& runtimeData); int InitializeNodeableOutKeys(lua_State* lua); diff --git a/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Execution/Interpreted/ExecutionStateInterpreted.cpp b/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Execution/Interpreted/ExecutionStateInterpreted.cpp index 9224d4f9a4..f0288fb279 100644 --- a/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Execution/Interpreted/ExecutionStateInterpreted.cpp +++ b/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Execution/Interpreted/ExecutionStateInterpreted.cpp @@ -6,14 +6,13 @@ * */ -#include "ExecutionStateInterpreted.h" - #include #include #include - -#include "Execution/Interpreted/ExecutionStateInterpretedUtility.h" -#include "Execution/RuntimeComponent.h" +#include +#include +#include +#include namespace ExecutionStateInterpretedCpp { @@ -33,7 +32,28 @@ namespace ScriptCanvas ExecutionStateInterpreted::ExecutionStateInterpreted(const ExecutionStateConfig& config) : ExecutionState(config) , m_interpretedAsset(config.runtimeData.m_script) - {} + { + RuntimeAsset* runtimeAsset = config.asset.Get(); + +#if defined(SCRIPT_CANVAS_RUNTIME_ASSET_CHECK) + if (!runtimeAsset) + { + AZ_Error("ScriptCanvas", false + , "ExecutionStateInterpreted created with ExecutionStateConfig that contained bad runtime asset data. %s" + , config.asset.GetId().ToString().data()); + return; + } +#else + AZ_Assert(false + , "ExecutionStateInterpreted created with ExecutionStateConfig that contained bad runtime asset data. %s" + , config.asset.GetId().ToString().data()); +#endif + + if (!runtimeAsset->m_runtimeData.m_areStaticsInitialized) + { + Execution::InitializeInterpretedStatics(runtimeAsset->m_runtimeData); + } + } void ExecutionStateInterpreted::ClearLuaRegistryIndex() { @@ -50,8 +70,8 @@ namespace ScriptCanvas const Grammar::DebugExecution* ExecutionStateInterpreted::GetDebugSymbolIn(size_t index, const AZ::Data::AssetId& id) const { auto asset = ExecutionStateInterpretedCpp::GetSubgraphAssetForDebug(id); - return asset && asset.Get() && index < asset.Get()->GetData().m_debugMap.m_ins.size() - ? &(asset.Get()->GetData().m_debugMap.m_ins[index]) + return asset && asset.Get() && index < asset.Get()->m_runtimeData.m_debugMap.m_ins.size() + ? &(asset.Get()->m_runtimeData.m_debugMap.m_ins[index]) : nullptr; } @@ -65,8 +85,8 @@ namespace ScriptCanvas const Grammar::DebugExecution* ExecutionStateInterpreted::GetDebugSymbolOut(size_t index, const AZ::Data::AssetId& id) const { auto asset = ExecutionStateInterpretedCpp::GetSubgraphAssetForDebug(id); - return asset && asset.Get() && index < asset.Get()->GetData().m_debugMap.m_outs.size() - ? &(asset.Get()->GetData().m_debugMap.m_outs[index]) + return asset && asset.Get() && index < asset.Get()->m_runtimeData.m_debugMap.m_outs.size() + ? &(asset.Get()->m_runtimeData.m_debugMap.m_outs[index]) : nullptr; } @@ -80,8 +100,8 @@ namespace ScriptCanvas const Grammar::DebugExecution* ExecutionStateInterpreted::GetDebugSymbolReturn(size_t index, const AZ::Data::AssetId& id) const { auto asset = ExecutionStateInterpretedCpp::GetSubgraphAssetForDebug(id); - return asset && asset.Get() && index < asset.Get()->GetData().m_debugMap.m_returns.size() - ? &(asset.Get()->GetData().m_debugMap.m_returns[index]) + return asset && asset.Get() && index < asset.Get()->m_runtimeData.m_debugMap.m_returns.size() + ? &(asset.Get()->m_runtimeData.m_debugMap.m_returns[index]) : nullptr; } @@ -95,8 +115,8 @@ namespace ScriptCanvas const Grammar::DebugDataSource* ExecutionStateInterpreted::GetDebugSymbolVariableChange(size_t index, const AZ::Data::AssetId& id) const { auto asset = ExecutionStateInterpretedCpp::GetSubgraphAssetForDebug(id); - return asset && asset.Get() && index < asset.Get()->GetData().m_debugMap.m_variables.size() - ? &(asset.Get()->GetData().m_debugMap.m_variables[index]) + return asset && asset.Get() && index < asset.Get()->m_runtimeData.m_debugMap.m_variables.size() + ? &(asset.Get()->m_runtimeData.m_debugMap.m_variables[index]) : nullptr; } @@ -126,6 +146,8 @@ namespace ScriptCanvas AZ_Assert(m_luaRegistryIndex == LUA_NOREF, "ExecutionStateInterpreted already in the Lua registry and risks double deletion"); // Lua: instance m_luaRegistryIndex = luaL_ref(m_luaState, LUA_REGISTRYINDEX); + AZ_Assert(m_luaRegistryIndex != LUA_REFNIL, "ExecutionStateInterpreted was nil when trying to gain a reference"); + AZ_Assert(m_luaRegistryIndex != LUA_NOREF, "ExecutionStateInterpreted failed to gain a reference"); } void ExecutionStateInterpreted::Reflect(AZ::ReflectContext* reflectContext) diff --git a/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Execution/Interpreted/ExecutionStateInterpretedPerActivation.cpp b/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Execution/Interpreted/ExecutionStateInterpretedPerActivation.cpp index 44b1364682..425af171c5 100644 --- a/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Execution/Interpreted/ExecutionStateInterpretedPerActivation.cpp +++ b/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Execution/Interpreted/ExecutionStateInterpretedPerActivation.cpp @@ -117,7 +117,7 @@ namespace ScriptCanvas lua_pushvalue(lua, -2); // Lua: instance, graph_VM.k_OnGraphStartFunctionName, instance const int result = Execution::InterpretedSafeCall(lua, 1, 0); - // Lua: instance ? + // Lua: instance, ? if (result == LUA_OK) { // Lua: instance diff --git a/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Execution/RuntimeComponent.cpp b/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Execution/RuntimeComponent.cpp index 5fe5c32a48..23eba22524 100644 --- a/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Execution/RuntimeComponent.cpp +++ b/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Execution/RuntimeComponent.cpp @@ -19,9 +19,8 @@ #include #include -#if !defined(_RELEASE) -#define SCRIPT_CANVAS_RUNTIME_ASSET_CHECK -#endif +#include +#include AZ_DECLARE_BUDGET(ScriptCanvas); @@ -72,7 +71,7 @@ namespace ScriptCanvas const RuntimeData& RuntimeComponent::GetRuntimeAssetData() const { - return m_runtimeOverrides.m_runtimeAsset->GetData(); + return m_runtimeOverrides.m_runtimeAsset->m_runtimeData; } ExecutionMode RuntimeComponent::GetExecutionMode() const @@ -112,11 +111,13 @@ namespace ScriptCanvas #if defined(SCRIPT_CANVAS_RUNTIME_ASSET_CHECK) if (!m_runtimeOverrides.m_runtimeAsset.Get()) { - AZ_Error("ScriptCanvas", false, "RuntimeComponent::m_runtimeAsset AssetId: %s was valid, but the data was not pre-loaded, so this script will not run", m_runtimeOverrides.m_runtimeAsset.GetId().ToString().data()); + AZ_Error("ScriptCanvas", false, "RuntimeComponent::m_runtimeAsset AssetId: %s was valid, but the data was not pre-loaded, so this script will not run" + , m_runtimeOverrides.m_runtimeAsset.GetId().ToString().data()); return; } #else - AZ_Assert(m_runtimeOverrides.m_runtimeAsset.Get(), "RuntimeComponent::m_runtimeAsset AssetId: %s was valid, but the data was not pre-loaded, so this script will not run", m_runtimeOverrides.m_runtimeAsset.GetId().ToString().data()); + AZ_Assert(m_runtimeOverrides.m_runtimeAsset.Get(), "RuntimeComponent::m_runtimeAsset AssetId: %s was valid, but the data was not pre-loaded, so this script will not run" + , m_runtimeOverrides.m_runtimeAsset.GetId().ToString().data()); #endif AZ_PROFILE_SCOPE(ScriptCanvas, "RuntimeComponent::InitializeExecution (%s)", m_runtimeOverrides.m_runtimeAsset.GetId().ToString().c_str()); @@ -126,11 +127,13 @@ namespace ScriptCanvas #if defined(SCRIPT_CANVAS_RUNTIME_ASSET_CHECK) if (!m_executionState) { - AZ_Error("ScriptCanvas", false, "RuntimeComponent::m_runtimeAsset AssetId: %s failed to create an execution state, possibly due to missing dependent asset, script will not run", m_runtimeOverrides.m_runtimeAsset.GetId().ToString().data()); + AZ_Error("ScriptCanvas", false, "RuntimeComponent::m_runtimeAsset AssetId: %s failed to create an execution state, possibly due to missing dependent asset, script will not run" + , m_runtimeOverrides.m_runtimeAsset.GetId().ToString().data()); return; } #else - AZ_Assert(m_executionState, "RuntimeComponent::m_runtimeAsset AssetId: %s failed to create an execution state, possibly due to missing dependent asset, script will not run", m_runtimeOverrides.m_runtimeAsset.GetId().ToString().data()); + AZ_Assert(m_executionState, "RuntimeComponent::m_runtimeAsset AssetId: %s failed to create an execution state, possibly due to missing dependent asset, script will not run" + , m_runtimeOverrides.m_runtimeAsset.GetId().ToString().data()); #endif AZ::EntityBus::Handler::BusConnect(GetEntityId()); @@ -179,4 +182,3 @@ namespace ScriptCanvas } } -#undef SCRIPT_CANVAS_RUNTIME_ASSET_CHECK diff --git a/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Grammar/AbstractCodeModel.cpp b/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Grammar/AbstractCodeModel.cpp index 7d76dbc27d..829a1098dc 100644 --- a/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Grammar/AbstractCodeModel.cpp +++ b/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Grammar/AbstractCodeModel.cpp @@ -2384,9 +2384,8 @@ namespace ScriptCanvas AZ_TracePrintf("ScriptCanvas", "%s", pretty.data()); AZ_TracePrintf("ScriptCanvas", "SubgraphInterface:"); AZ_TracePrintf("ScriptCanvas", ToString(m_subgraphInterface).data()); + AZ_TracePrintf("Script Canvas", "Parse Duration: %8.4f ms\n", m_parseDuration / 1000.0); } - - AZ_TracePrintf("Script Canvas", "Parse Duration: %8.4f ms\n", m_parseDuration / 1000.0); } } } diff --git a/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Grammar/ParsingMetaData.cpp b/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Grammar/ParsingMetaData.cpp index 476b21d0d6..681bd3b0e4 100644 --- a/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Grammar/ParsingMetaData.cpp +++ b/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Grammar/ParsingMetaData.cpp @@ -152,19 +152,19 @@ namespace ScriptCanvas { if (azrtti_istypeof(execution->GetId().m_node)) { - return MetaDataPtr(aznew FormatStringMetaData()); + return AZStd::make_shared(); } else if (azrtti_istypeof(execution->GetId().m_node)) { - return MetaDataPtr(aznew PrintMetaData()); + return AZStd::make_shared(); } else if (azrtti_istypeof(execution->GetId().m_node)) { - return MetaDataPtr(aznew MathExpressionMetaData()); + return AZStd::make_shared(); } else if (execution->GetSymbol() == Symbol::FunctionCall) { - return MetaDataPtr(aznew FunctionCallDefaultMetaData()); + return AZStd::make_shared(); } } diff --git a/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Grammar/PrimitivesDeclarations.cpp b/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Grammar/PrimitivesDeclarations.cpp index 14f7a926b1..52f00af6c2 100644 --- a/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Grammar/PrimitivesDeclarations.cpp +++ b/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Grammar/PrimitivesDeclarations.cpp @@ -15,6 +15,7 @@ namespace ScriptCanvas AZ_CVAR(bool, g_disableParseOnGraphValidation, false, {}, AZ::ConsoleFunctorFlags::Null, "In case parsing the graph is interfering with opening a graph, disable parsing on validation"); AZ_CVAR(bool, g_printAbstractCodeModel, true, {}, AZ::ConsoleFunctorFlags::Null, "Print out the Abstract Code Model at the end of parsing for debug purposes."); AZ_CVAR(bool, g_printAbstractCodeModelAtPrefabTime, false, {}, AZ::ConsoleFunctorFlags::Null, "Print out the Abstract Code Model at the end of parsing (at prefab time) for debug purposes."); + AZ_CVAR(bool, g_processingErrorsForUnitTestsEnabled, false, {}, AZ::ConsoleFunctorFlags::Null, "Enable AP processing errors on parse failure for unit tests."); AZ_CVAR(bool, g_saveRawTranslationOuputToFile, true, {}, AZ::ConsoleFunctorFlags::Null, "Save out the raw result of translation for debug purposes."); AZ_CVAR(bool, g_saveRawTranslationOuputToFileAtPrefabTime, false, {}, AZ::ConsoleFunctorFlags::Null, "Save out the raw result of translation (at prefab time) for debug purposes."); diff --git a/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Grammar/PrimitivesDeclarations.h b/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Grammar/PrimitivesDeclarations.h index a6ce31d6e7..3caec6ddb5 100644 --- a/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Grammar/PrimitivesDeclarations.h +++ b/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Grammar/PrimitivesDeclarations.h @@ -245,6 +245,7 @@ namespace ScriptCanvas AZ_CVAR_EXTERNED(bool, g_disableParseOnGraphValidation); AZ_CVAR_EXTERNED(bool, g_printAbstractCodeModel); AZ_CVAR_EXTERNED(bool, g_printAbstractCodeModelAtPrefabTime); + AZ_CVAR_EXTERNED(bool, g_processingErrorsForUnitTestsEnabled); AZ_CVAR_EXTERNED(bool, g_saveRawTranslationOuputToFile); AZ_CVAR_EXTERNED(bool, g_saveRawTranslationOuputToFileAtPrefabTime); diff --git a/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/Core/BinaryOperator.cpp b/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/Core/BinaryOperator.cpp index 02755af49b..1b512ee0cf 100644 --- a/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/Core/BinaryOperator.cpp +++ b/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/Core/BinaryOperator.cpp @@ -132,7 +132,7 @@ namespace ScriptCanvas void BooleanExpression::InitializeBooleanExpression() { - AZ_Assert(false, "InitializeBooleanExpression must be overridden"); + AZ_Error("Script Canvas", false, "InitializeBooleanExpression implementation should be provided"); } void BooleanExpression::OnInit() diff --git a/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/Core/EBusEventHandler.cpp b/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/Core/EBusEventHandler.cpp index a2ccfd46f2..65d1f21518 100644 --- a/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/Core/EBusEventHandler.cpp +++ b/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/Core/EBusEventHandler.cpp @@ -518,7 +518,7 @@ namespace ScriptCanvas { const AZ::BehaviorParameter& argument(event.m_parameters[AZ::eBehaviorBusForwarderEventIndices::Result]); Data::Type inputType(AZ::BehaviorContextHelper::IsStringParameter(argument) ? Data::Type::String() : Data::FromAZType(argument.m_typeId)); - const AZStd::string argName(AZStd::string::format("Result: %s", Data::GetName(inputType).data()).data()); + const AZStd::string argName(Data::GetName(inputType)); DataSlotConfiguration resultConfiguration; diff --git a/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/Core/ExtractProperty.cpp b/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/Core/ExtractProperty.cpp index 25a5733ffc..71e2d338d6 100644 --- a/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/Core/ExtractProperty.cpp +++ b/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/Core/ExtractProperty.cpp @@ -5,6 +5,7 @@ * SPDX-License-Identifier: Apache-2.0 OR MIT * */ + #include #include @@ -183,6 +184,10 @@ namespace ScriptCanvas DataSlotConfiguration config; AZStd::string slotName = AZStd::string::format("%s: %s", propertyName.data(), Data::GetName(getterWrapper.m_propertyType).data()); + if (!getterWrapper.m_displayName.empty()) + { + slotName = getterWrapper.m_displayName; + } if (existingSlots.find(slotName) == existingSlots.end()) { diff --git a/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/Core/FunctionCallNode.cpp b/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/Core/FunctionCallNode.cpp index 225949d833..551b9b4002 100644 --- a/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/Core/FunctionCallNode.cpp +++ b/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/Core/FunctionCallNode.cpp @@ -261,11 +261,11 @@ namespace ScriptCanvas , const ScriptCanvas::Grammar::FunctionSourceId& sourceId , const SlotExecution::Map& previousMap) { - const Grammar::SubgraphInterface& subgraphInterface = runtimeAsset.Get()->m_runtimeData.m_interface; + const Grammar::SubgraphInterface& subgraphInterface = runtimeAsset.Get()->m_interfaceData.m_interface; if (subgraphInterface.IsUserNodeable() && Grammar::IsFunctionSourceIdNodeable(sourceId) && subgraphInterface.HasIn(sourceId)) { - m_prettyName = runtimeAsset.Get()->m_runtimeData.m_name; + m_prettyName = runtimeAsset.Get()->m_interfaceData.m_name; BuildUserNodeableNode(subgraphInterface, previousMap); } else if ((!Grammar::IsFunctionSourceIdNodeable(sourceId)) && subgraphInterface.HasIn(sourceId)) @@ -477,7 +477,7 @@ namespace ScriptCanvas return true; } - const Grammar::SubgraphInterface* latestAssetInterface = asset ? &asset.Get()->GetData().m_interface : nullptr; + const Grammar::SubgraphInterface* latestAssetInterface = asset ? &asset.Get()->m_interfaceData.m_interface : nullptr; if (!latestAssetInterface) { AZ_Warning("ScriptCanvas", false, "FunctionCallNode %s failed to load latest interface from the source asset.", m_prettyName.data()); @@ -517,7 +517,7 @@ namespace ScriptCanvas DataSlotMap dataSlotMap; if (m_slotExecutionMap.IsEmpty()) { - const Grammar::SubgraphInterface& subgraphInterface = assetData.Get()->m_runtimeData.m_interface; + const Grammar::SubgraphInterface& subgraphInterface = assetData.Get()->m_interfaceData.m_interface; RemoveInsFromInterface(subgraphInterface.GetIns(), executionSlotMap, dataSlotMap, k_DoNotRemoveConnections, k_DoNotWarnOnMissingDataSlots); RemoveOutsFromInterface(subgraphInterface.GetLatentOuts(), executionSlotMap, dataSlotMap, k_DoNotRemoveConnections, k_DoNotWarnOnMissingDataSlots); } @@ -806,7 +806,7 @@ namespace ScriptCanvas return; } - m_prettyName = assetData.Get()->m_runtimeData.m_name; + m_prettyName = assetData.Get()->m_interfaceData.m_name; } } } diff --git a/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/Core/GetVariable.cpp b/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/Core/GetVariable.cpp index 566b9dc992..c907c47c78 100644 --- a/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/Core/GetVariable.cpp +++ b/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/Core/GetVariable.cpp @@ -193,7 +193,7 @@ namespace ScriptCanvas { DataSlotConfiguration slotConfiguration; - slotConfiguration.m_name = AZStd::string::format("%s: %s", propertyName.data(), Data::GetName(getterWrapper.m_propertyType).data()); + slotConfiguration.m_name = (getterWrapper.m_displayName.empty()) ? propertyName.data() : getterWrapper.m_displayName; slotConfiguration.SetType(getterWrapper.m_propertyType); slotConfiguration.SetConnectionType(ConnectionType::Output); diff --git a/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/Core/Method.cpp b/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/Core/Method.cpp index ca57824b78..ccdf15a111 100644 --- a/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/Core/Method.cpp +++ b/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/Core/Method.cpp @@ -14,6 +14,7 @@ #include #include #include +#include namespace MethodCPP { @@ -389,6 +390,9 @@ namespace ScriptCanvas MethodConfiguration config(*method, MethodType::Free); config.m_namespaces = &m_namespaces; config.m_lookupName = &methodName; + config.m_prettyClassName = methodName; + AZ::StringFunc::Replace(config.m_prettyClassName, "::Getter", ""); + AZ::StringFunc::Replace(config.m_prettyClassName, "::Setter", ""); InitializeMethod(config); } } diff --git a/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/Core/ReceiveScriptEvent.cpp b/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/Core/ReceiveScriptEvent.cpp index c548176af5..14397d2be9 100644 --- a/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/Core/ReceiveScriptEvent.cpp +++ b/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/Core/ReceiveScriptEvent.cpp @@ -204,7 +204,7 @@ namespace ScriptCanvas DataSlotConfiguration slotConfiguration; - slotConfiguration.m_name = AZStd::string::format("Result: %s", argumentTypeName.c_str()); + slotConfiguration.m_name = argumentTypeName; slotConfiguration.SetConnectionType(ConnectionType::Input); slotConfiguration.ConfigureDatum(AZStd::move(Datum(inputType, Datum::eOriginality::Copy, nullptr, AZ::Uuid::CreateNull()))); diff --git a/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/Core/SendScriptEvent.cpp b/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/Core/SendScriptEvent.cpp index 8569380d99..26a9b4fc96 100644 --- a/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/Core/SendScriptEvent.cpp +++ b/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/Core/SendScriptEvent.cpp @@ -272,7 +272,7 @@ namespace ScriptCanvas Data::Type outputType(AZ::BehaviorContextHelper::IsStringParameter(*result) ? Data::Type::String() : Data::FromAZType(result->m_typeId)); // multiple outs will need out value names - const AZStd::string resultSlotName(AZStd::string::format("Result: %s", Data::GetName(outputType).c_str())); + const AZStd::string resultSlotName(Data::GetName(outputType)); DataSlotConfiguration slotConfiguration; @@ -343,7 +343,7 @@ namespace ScriptCanvas { Data::Type outputType(AZ::BehaviorContextHelper::IsStringParameter(*result) ? Data::Type::String() : Data::FromAZType(result->m_typeId)); // multiple outs will need out value names - const AZStd::string resultSlotName(AZStd::string::format("Result: %s", Data::GetName(outputType).c_str())); + const AZStd::string resultSlotName(Data::GetName(outputType)); Slot* slot = GetSlotByName(resultSlotName); diff --git a/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/Core/SetVariable.cpp b/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/Core/SetVariable.cpp index 40eb550b1f..8c53b0d1b4 100644 --- a/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/Core/SetVariable.cpp +++ b/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/Core/SetVariable.cpp @@ -294,7 +294,7 @@ namespace ScriptCanvas { DataSlotConfiguration slotConfiguration; - slotConfiguration.m_name = AZStd::string::format("%s: %s", propertyName.data(), Data::GetName(getterWrapper.m_propertyType).data()); + slotConfiguration.m_name = (getterWrapper.m_displayName.empty()) ? propertyName.data() : getterWrapper.m_displayName; slotConfiguration.SetType(getterWrapper.m_propertyType); slotConfiguration.SetConnectionType(ConnectionType::Output); diff --git a/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/Entity/EntityNodes.h b/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/Entity/EntityNodes.h index 191635757c..ccbe5b12dc 100644 --- a/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/Entity/EntityNodes.h +++ b/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/Entity/EntityNodes.h @@ -21,7 +21,7 @@ namespace ScriptCanvas namespace EntityNodes { using namespace Data; - static const char* k_categoryName = "Entity/Entity"; + static constexpr const char* k_categoryName = "Entity/Entity"; template AZ_INLINE void DefaultScale(Node& node) { SetDefaultValuesByIndex::_(node, Data::One()); } diff --git a/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/Math/AABBNodes.h b/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/Math/AABBNodes.h index 198ff0c421..5ffd919a87 100644 --- a/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/Math/AABBNodes.h +++ b/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/Math/AABBNodes.h @@ -19,7 +19,7 @@ namespace ScriptCanvas { using namespace Data; using namespace MathNodeUtilities; - static const char* k_categoryName = "Math/AABB"; + static constexpr const char* k_categoryName = "Math/AABB"; AZ_INLINE AABBType AddAABB(AABBType a, const AABBType& b) { diff --git a/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/Math/CRCNodes.h b/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/Math/CRCNodes.h index 933fb9dc1b..93f3a6fdcc 100644 --- a/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/Math/CRCNodes.h +++ b/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/Math/CRCNodes.h @@ -15,7 +15,7 @@ namespace ScriptCanvas { namespace CRCNodes { - static const char* k_categoryName = "Math/Crc32"; + static constexpr const char* k_categoryName = "Math/Crc32"; AZ_INLINE Data::CRCType FromString(Data::StringType value) { diff --git a/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/Math/ColorNodes.h b/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/Math/ColorNodes.h index ad1b729ea4..625531b0d7 100644 --- a/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/Math/ColorNodes.h +++ b/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/Math/ColorNodes.h @@ -19,7 +19,7 @@ namespace ScriptCanvas { using namespace Data; using namespace MathNodeUtilities; - static const char* k_categoryName = "Math/Color"; + static constexpr const char* k_categoryName = "Math/Color"; AZ_INLINE ColorType Add(ColorType a, ColorType b) { diff --git a/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/Math/MathGenerics.h b/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/Math/MathGenerics.h index 8f613867b2..cb625019ee 100644 --- a/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/Math/MathGenerics.h +++ b/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/Math/MathGenerics.h @@ -14,7 +14,7 @@ namespace ScriptCanvas { namespace MathNodes { - static const char* k_categoryName = "Math"; + static constexpr const char* k_categoryName = "Math"; AZ_INLINE Data::NumberType MultiplyAndAdd(Data::NumberType multiplicand, Data::NumberType multiplier, Data::NumberType addend) { diff --git a/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/Math/MathRandom.h b/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/Math/MathRandom.h index 25a61b956f..01a666b730 100644 --- a/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/Math/MathRandom.h +++ b/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/Math/MathRandom.h @@ -15,7 +15,7 @@ namespace ScriptCanvas { namespace RandomNodes { - static const char* k_categoryName = "Math/Random"; + static constexpr const char* k_categoryName = "Math/Random"; // RandomColor AZ_INLINE void SetRandomColorDefaults(Node& node) diff --git a/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/Math/Matrix3x3Nodes.h b/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/Math/Matrix3x3Nodes.h index 28eb91519c..b5f1f75dfb 100644 --- a/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/Math/Matrix3x3Nodes.h +++ b/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/Math/Matrix3x3Nodes.h @@ -15,7 +15,7 @@ namespace ScriptCanvas { namespace Matrix3x3Nodes { - static const char* k_categoryName = "Math/Matrix3x3"; + static constexpr const char* k_categoryName = "Math/Matrix3x3"; AZ_INLINE Data::Matrix3x3Type Add(const Data::Matrix3x3Type& lhs, const Data::Matrix3x3Type& rhs) { diff --git a/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/Math/Matrix4x4Nodes.h b/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/Math/Matrix4x4Nodes.h index 8a2bf4393c..4c8c9275b4 100644 --- a/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/Math/Matrix4x4Nodes.h +++ b/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/Math/Matrix4x4Nodes.h @@ -14,7 +14,7 @@ namespace ScriptCanvas { namespace Matrix4x4Nodes { - static const char* k_categoryName = "Math/Matrix4x4"; + static constexpr const char* k_categoryName = "Math/Matrix4x4"; AZ_INLINE Data::Matrix4x4Type FromColumns(const Data::Vector4Type& col0, const Data::Vector4Type& col1, const Data::Vector4Type& col2, const Data::Vector4Type& col3) { diff --git a/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/Math/OBBNodes.h b/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/Math/OBBNodes.h index 5b1bcc3493..1a4d769627 100644 --- a/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/Math/OBBNodes.h +++ b/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/Math/OBBNodes.h @@ -19,7 +19,7 @@ namespace ScriptCanvas { using namespace Data; using namespace MathNodeUtilities; - static const char* k_categoryName = "Math/OBB"; + static constexpr const char* k_categoryName = "Math/OBB"; AZ_INLINE OBBType FromAabb(const AABBType& source) { diff --git a/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/Math/PlaneNodes.h b/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/Math/PlaneNodes.h index 0829004512..103aa90491 100644 --- a/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/Math/PlaneNodes.h +++ b/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/Math/PlaneNodes.h @@ -19,7 +19,7 @@ namespace ScriptCanvas { using namespace Data; using namespace MathNodeUtilities; - static const char* k_categoryName = "Math/Plane"; + static constexpr const char* k_categoryName = "Math/Plane"; AZ_INLINE NumberType DistanceToPoint(PlaneType source, Vector3Type point) { diff --git a/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/Math/RotationNodes.h b/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/Math/RotationNodes.h index c7d1883e75..58c649fa3f 100644 --- a/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/Math/RotationNodes.h +++ b/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/Math/RotationNodes.h @@ -20,7 +20,7 @@ namespace ScriptCanvas { using namespace Data; using namespace MathNodeUtilities; - static const char* k_categoryName = "Math/Quaternion"; + static constexpr const char* k_categoryName = "Math/Quaternion"; AZ_INLINE QuaternionType Add(QuaternionType a, QuaternionType b) { diff --git a/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/Math/TransformNodes.h b/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/Math/TransformNodes.h index 8af9ee8ca2..18d04c8e92 100644 --- a/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/Math/TransformNodes.h +++ b/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/Math/TransformNodes.h @@ -20,7 +20,7 @@ namespace ScriptCanvas { using namespace Data; using namespace MathNodeUtilities; - static const char* k_categoryName = "Math/Transform"; + static constexpr const char* k_categoryName = "Math/Transform"; AZ_INLINE std::tuple ExtractUniformScale(TransformType source) { diff --git a/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/Math/Vector2Nodes.h b/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/Math/Vector2Nodes.h index c815470540..9a389404a2 100644 --- a/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/Math/Vector2Nodes.h +++ b/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/Math/Vector2Nodes.h @@ -19,7 +19,7 @@ namespace ScriptCanvas { using namespace MathNodeUtilities; using namespace Data; - static const char* k_categoryName = "Math/Vector2"; + static constexpr const char* k_categoryName = "Math/Vector2"; AZ_INLINE Vector2Type Absolute(const Vector2Type source) { diff --git a/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/Math/Vector3Nodes.h b/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/Math/Vector3Nodes.h index 3e70d1fed7..f5e09ef78f 100644 --- a/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/Math/Vector3Nodes.h +++ b/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/Math/Vector3Nodes.h @@ -21,7 +21,7 @@ namespace ScriptCanvas { using namespace MathNodeUtilities; using namespace Data; - static const char* k_categoryName = "Math/Vector3"; + static constexpr const char* k_categoryName = "Math/Vector3"; AZ_INLINE Vector3Type Absolute(const Vector3Type source) { diff --git a/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/Math/Vector4Nodes.h b/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/Math/Vector4Nodes.h index d7bee1f940..30e1b691bf 100644 --- a/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/Math/Vector4Nodes.h +++ b/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/Math/Vector4Nodes.h @@ -19,7 +19,7 @@ namespace ScriptCanvas { using namespace MathNodeUtilities; using namespace Data; - static const char* k_categoryName = "Math/Vector4"; + static constexpr const char* k_categoryName = "Math/Vector4"; AZ_INLINE Vector4Type Absolute(const Vector4Type source) { diff --git a/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/String/StringGenerics.h b/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/String/StringGenerics.h index d5ee52cdb1..67f1e7f0c4 100644 --- a/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/String/StringGenerics.h +++ b/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/String/StringGenerics.h @@ -14,7 +14,7 @@ namespace ScriptCanvas { namespace StringNodes { - static const char* k_categoryName = "String"; + static constexpr const char* k_categoryName = "String"; AZ_INLINE Data::StringType ToLower(Data::StringType sourceString) { diff --git a/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Profiler/Aggregator.cpp b/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Profiler/Aggregator.cpp deleted file mode 100644 index 73fe7300ac..0000000000 --- a/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Profiler/Aggregator.cpp +++ /dev/null @@ -1,15 +0,0 @@ -/* - * Copyright (c) Contributors to the Open 3D Engine Project. - * For complete copyright and license terms please see the LICENSE at the root of this distribution. - * - * SPDX-License-Identifier: Apache-2.0 OR MIT - * - */ - -namespace ScriptCanvas -{ - namespace Profiler - { - - } -} diff --git a/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Profiler/Aggregator.h b/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Profiler/Aggregator.h deleted file mode 100644 index 679a770bcc..0000000000 --- a/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Profiler/Aggregator.h +++ /dev/null @@ -1,15 +0,0 @@ -/* - * Copyright (c) Contributors to the Open 3D Engine Project. - * For complete copyright and license terms please see the LICENSE at the root of this distribution. - * - * SPDX-License-Identifier: Apache-2.0 OR MIT - * - */ -#pragma once -namespace ScriptCanvas -{ - namespace Profiler - { - - } -} diff --git a/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Profiler/Driller.cpp b/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Profiler/Driller.cpp deleted file mode 100644 index 3865f60b77..0000000000 --- a/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Profiler/Driller.cpp +++ /dev/null @@ -1,31 +0,0 @@ -/* - * Copyright (c) Contributors to the Open 3D Engine Project. - * For complete copyright and license terms please see the LICENSE at the root of this distribution. - * - * SPDX-License-Identifier: Apache-2.0 OR MIT - * - */ - - -#include -#include - -namespace ScriptCanvas -{ - namespace Profiler - { - void Driller::OnNodeExecute(Node* node) - { - m_output->BeginTag(AZ_CRC("ScriptCanvasGraphDriller", 0xb161ccb2)); - { - m_output->BeginTag(AZ_CRC("OnNodeExecute", 0x3e51a5eb)); - { - m_output->Write(AZ_CRC("NodeName", 0x606d4587), node->GetEntity()->GetName()); - m_output->Write(AZ_CRC("NodeType", 0xb2906ca8), node->RTTI_GetTypeName()); - } - m_output->EndTag(AZ_CRC("StringEvent", 0xd1e005df)); - } - m_output->EndTag(AZ_CRC("ScriptCanvasGraphDriller", 0xb161ccb2)); - } - } -} diff --git a/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Profiler/Driller.h b/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Profiler/Driller.h deleted file mode 100644 index dffed6fffd..0000000000 --- a/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Profiler/Driller.h +++ /dev/null @@ -1,116 +0,0 @@ -/* - * Copyright (c) Contributors to the Open 3D Engine Project. - * For complete copyright and license terms please see the LICENSE at the root of this distribution. - * - * SPDX-License-Identifier: Apache-2.0 OR MIT - * - */ -#pragma once -#include -#include - -namespace ScriptCanvas -{ - class Graph; - class Node; - - namespace Profiler - { - class DrillerInterface - : public AZ::Debug::DrillerEBusTraits - { - public: - - // On Entry - // On Execute/Upate - // On Exit - virtual void OnNodeExecute(Node*) = 0; - - }; - - using DrillerBus = AZ::EBus; - - class DrillerCommandInterface - : public AZ::Debug::DrillerEBusTraits - { - public: - - virtual Graph* RequestDrilledGraph() = 0; - }; - - using DrillerCommandBus = AZ::EBus; - - class Driller - : public AZ::Debug::Driller - , public DrillerBus::Handler - { - bool m_isDetailedCapture; - - Graph* m_drilledGraph; - - using ParamArrayType = AZStd::vector; - ParamArrayType m_params; - - public: - - AZ_CLASS_ALLOCATOR(Driller, AZ::SystemAllocator, 0); - - const char* GroupName() const override { return "ScriptCanvasDrillers"; } - const char* GetName() const override { return "ScriptCanvasGraphDriller"; } - const char* GetDescription() const override { return "Drilling the Script Canvas execution engine"; } - int GetNumParams() const override { return static_cast(m_params.size()); } - const Param* GetParam(int index) const override { return &m_params[index]; } - - Driller() - : m_isDetailedCapture(false) - , m_drilledGraph(nullptr) - { - Param isDetailed; - isDetailed.desc = "IsDetailedDrill"; - isDetailed.name = AZ_CRC("IsDetailedDrill", 0x2155cef2); - isDetailed.type = Param::PT_BOOL; - isDetailed.value = 0; - m_params.push_back(isDetailed); - } - - void Start(const Param* params = nullptr, int numParams = 0) override - { - m_isDetailedCapture = m_params[0].value != 0; - if (params) - { - for (int i = 0; i < numParams; i++) - { - if (params[i].name == m_params[0].name) - { - m_isDetailedCapture = params[i].value != 0; - } - } - } - - DrillerCommandBus::BroadcastResult(m_drilledGraph, &DrillerCommandInterface::RequestDrilledGraph); -// AZ_TEST_ASSERT(m_drilledGraph != nullptr); /// Make sure we have our object by the time we started the driller - - m_output->BeginTag(AZ_CRC("ScriptCanvasGraphDriller", 0xb161ccb2)); - m_output->Write(AZ_CRC("OnStart", 0x8b372fca), m_isDetailedCapture); - // write drilled object initial state - m_output->EndTag(AZ_CRC("ScriptCanvasGraphDriller", 0xb161ccb2)); - - BusConnect(); - } - - void Stop() override - { - //m_drilledGraph = nullptr; - //m_output->BeginTag(AZ_CRC("ScriptCanvasGraphDriller")); - //m_output->Write(AZ_CRC("OnStop"), m_isDetailedCapture); - //m_output->EndTag(AZ_CRC("ScriptCanvasGraphDriller")); - //BusDisconnect(); - } - - void OnNodeExecute(Node* node) override; - }; - - - } -} - diff --git a/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Profiler/DrillerEvents.cpp b/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Profiler/DrillerEvents.cpp deleted file mode 100644 index 73fe7300ac..0000000000 --- a/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Profiler/DrillerEvents.cpp +++ /dev/null @@ -1,15 +0,0 @@ -/* - * Copyright (c) Contributors to the Open 3D Engine Project. - * For complete copyright and license terms please see the LICENSE at the root of this distribution. - * - * SPDX-License-Identifier: Apache-2.0 OR MIT - * - */ - -namespace ScriptCanvas -{ - namespace Profiler - { - - } -} diff --git a/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Profiler/DrillerEvents.h b/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Profiler/DrillerEvents.h deleted file mode 100644 index 1aa522367d..0000000000 --- a/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Profiler/DrillerEvents.h +++ /dev/null @@ -1,30 +0,0 @@ -/* - * Copyright (c) Contributors to the Open 3D Engine Project. - * For complete copyright and license terms please see the LICENSE at the root of this distribution. - * - * SPDX-License-Identifier: Apache-2.0 OR MIT - * - */ -#pragma once -#include -#include - -namespace ScriptCanvas -{ - namespace Profiler - { - namespace Event - { - class GraphExecutionStart - { - public: - AZ_CLASS_ALLOCATOR(GraphExecutionStart, AZ::SystemAllocator, 0) - AZ_RTTI(GraphExecutionStart, "{AAB7E2E1-9096-4F51-90CA-259A057F2D88}"); - - GraphExecutionStart() - {} - }; - } - - } -} diff --git a/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Translation/TranslationUtilities.cpp b/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Translation/TranslationUtilities.cpp index a9ca526373..bbf3a77c55 100644 --- a/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Translation/TranslationUtilities.cpp +++ b/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Translation/TranslationUtilities.cpp @@ -9,7 +9,6 @@ #include "TranslationUtilities.h" #include -#include #include #include #include @@ -71,34 +70,6 @@ namespace TranslationUtilitiesCPP return AZStd::string::format("%s%s_VM.%s", TranslationUtilitiesCPP::k_fileDirectoryPathLua, source.m_name.data(), extension.data()); } - class FileEventHandler - : public AZ::IO::FileIOEventBus::Handler - { - public: - int m_errorCode = 0; - AZStd::string m_fileName; - - FileEventHandler() - { - BusConnect(); - } - - ~FileEventHandler() - { - BusDisconnect(); - } - - void OnError(const AZ::IO::SystemFile* /*file*/, const char* fileName, int errorCode) override - { - m_errorCode = errorCode; - - if (fileName) - { - m_fileName = fileName; - } - } - }; - AZ::Outcome SaveFile(const Grammar::Source& source, AZStd::string_view text, AZStd::string_view extension) { AZ::IO::FileIOBase* fileIO = AZ::IO::FileIOBase::GetInstance(); @@ -111,25 +82,23 @@ namespace TranslationUtilitiesCPP // \todo get a (debug) file path based on the extension const AZStd::string filePath = TranslationUtilitiesCPP::GetDebugLuaFilePath(source, extension); - FileEventHandler eventHandler; - AZ::IO::HandleType fileHandle = AZ::IO::InvalidHandle; const AZ::IO::Result fileOpenResult = fileIO->Open(filePath.c_str(), AZ::IO::OpenMode::ModeWrite | AZ::IO::OpenMode::ModeText, fileHandle); if (fileOpenResult != AZ::IO::ResultCode::Success) { - return AZ::Failure(AZStd::string::format("Failed to open file: %s, error code: %d", filePath.c_str(), eventHandler.m_errorCode)); + return AZ::Failure(AZStd::string::format("Failed to open file: %sd", filePath.c_str())); } const AZ::IO::Result fileWriteResult = fileIO->Write(fileHandle, text.begin(), text.size()); if (fileWriteResult != AZ::IO::ResultCode::Success) { - return AZ::Failure(AZStd::string::format("Failed to write file: %s, error code: %d", filePath.c_str(), eventHandler.m_errorCode)); + return AZ::Failure(AZStd::string::format("Failed to write file: %s", filePath.c_str())); } const AZ::IO::Result fileCloseResult = fileIO->Close(fileHandle); if (fileCloseResult != AZ::IO::ResultCode::Success) { - return AZ::Failure(AZStd::string::format("Failed to close file: %s, error code: %d", filePath.c_str(), eventHandler.m_errorCode)); + return AZ::Failure(AZStd::string::format("Failed to close file: %s", filePath.c_str())); } return AZ::Success(); diff --git a/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Variable/GraphVariable.cpp b/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Variable/GraphVariable.cpp index 3d76883adc..59b924196b 100644 --- a/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Variable/GraphVariable.cpp +++ b/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Variable/GraphVariable.cpp @@ -335,6 +335,11 @@ namespace ScriptCanvas return &m_datum; } + Datum& GraphVariable::ModDatum() + { + return m_datum; + } + void GraphVariable::ConfigureDatumView(ModifiableDatumView& datumView) { datumView.ConfigureView((*this)); @@ -493,14 +498,6 @@ namespace ScriptCanvas return m_sortPriority; } - bool GraphVariable::IsInFunction() const - { - AZ::Data::AssetType assetType = AZ::Data::AssetType::CreateNull(); - ScriptCanvas::GraphRequestBus::EventResult(assetType, m_scriptCanvasId, &ScriptCanvas::GraphRequests::GetAssetType); - - return assetType == azrtti_typeid(); - } - AZ::u32 GraphVariable::OnInitialValueSourceChanged() { VariableNotificationBus::Event(GetGraphScopedId(), &VariableNotifications::OnVariableInitialValueSourceChanged); diff --git a/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Variable/GraphVariable.h b/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Variable/GraphVariable.h index dbc0a814c6..db83076f67 100644 --- a/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Variable/GraphVariable.h +++ b/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Variable/GraphVariable.h @@ -127,6 +127,8 @@ namespace ScriptCanvas const Datum* GetDatum() const; + Datum& ModDatum(); + bool IsComponentProperty() const; void ConfigureDatumView(ModifiableDatumView& accessController); @@ -194,9 +196,7 @@ namespace ScriptCanvas choices.emplace_back(AZStd::make_pair(static_cast(VariableFlags::Scope::Function), s_ScopeNames[1])); return choices; } - - bool IsInFunction() const; - + void OnScopeTypedChanged(); AZ::u32 OnInitialValueSourceChanged(); void OnSortPriorityChanged(); diff --git a/Gems/ScriptCanvas/Code/Tests/ScriptCanvasBuilderTests.cpp b/Gems/ScriptCanvas/Code/Tests/ScriptCanvasBuilderTests.cpp index cba14feac6..cac26eff95 100644 --- a/Gems/ScriptCanvas/Code/Tests/ScriptCanvasBuilderTests.cpp +++ b/Gems/ScriptCanvas/Code/Tests/ScriptCanvasBuilderTests.cpp @@ -89,7 +89,6 @@ protected: AZ::SerializeContext* GetSerializeContext() override { return m_serializeContext; } AZ::BehaviorContext* GetBehaviorContext() override { return nullptr; } AZ::JsonRegistrationContext* GetJsonRegistrationContext() override { return nullptr; } - const char* GetAppRoot() const override { return nullptr; } const char* GetEngineRoot() const override { return nullptr; } const char* GetExecutableFolder() const override { return nullptr; } void EnumerateEntities(const AZ::ComponentApplicationRequests::EntityCallback& /*callback*/) override {} @@ -154,11 +153,10 @@ TEST_F(ScriptCanvasBuilderTests, ScriptCanvasWithAssetReference_GatherProductDep graphEntity->AddComponent(assetComponent); ScriptCanvas::RuntimeData runtimeData; - //runtimeData.m_graphData.m_nodes.emplace(graphEntity); - + AZ::Data::Asset runtimeAsset; runtimeAsset.Create(AZ::Uuid::CreateRandom()); - runtimeAsset.Get()->SetData(runtimeData); + runtimeAsset.Get()->m_runtimeData = runtimeData; AZStd::vector productDependencies; AssetBuilderSDK::ProductPathDependencySet productPathDependencySet; diff --git a/Gems/ScriptCanvas/Code/Tests/ScriptCanvasUnitTest_BehaviorContextUtils.cpp b/Gems/ScriptCanvas/Code/Tests/ScriptCanvasUnitTest_BehaviorContextUtils.cpp index 472da7dfeb..c06b30253f 100644 --- a/Gems/ScriptCanvas/Code/Tests/ScriptCanvasUnitTest_BehaviorContextUtils.cpp +++ b/Gems/ScriptCanvas/Code/Tests/ScriptCanvasUnitTest_BehaviorContextUtils.cpp @@ -37,7 +37,6 @@ namespace ScriptCanvasUnitTest const char* GetExecutableFolder() const override { return nullptr; } const char* GetBinFolder() const { return nullptr; } const char* GetAppRoot() override { return nullptr; } - AZ::Debug::DrillerManager* GetDrillerManager() override { return nullptr; } void EnumerateEntities(const EntityCallback& /*callback*/) override {} void Init(AZ::BehaviorContext* behaviorContext) diff --git a/Gems/ScriptCanvas/Code/Tests/ScriptCanvasUnitTest_ScriptCanvasBuilderComponent.cpp b/Gems/ScriptCanvas/Code/Tests/ScriptCanvasUnitTest_ScriptCanvasBuilderComponent.cpp index 470bdc18fe..a469899d4a 100644 --- a/Gems/ScriptCanvas/Code/Tests/ScriptCanvasUnitTest_ScriptCanvasBuilderComponent.cpp +++ b/Gems/ScriptCanvas/Code/Tests/ScriptCanvasUnitTest_ScriptCanvasBuilderComponent.cpp @@ -41,7 +41,6 @@ namespace ScriptCanvasUnitTest const char* GetExecutableFolder() const override { return nullptr; } const char* GetBinFolder() const { return nullptr; } const char* GetAppRoot() override { return nullptr; } - AZ::Debug::DrillerManager* GetDrillerManager() override { return nullptr; } void EnumerateEntities(const EntityCallback& /*callback*/) override {} // AssetBuilderBus diff --git a/Gems/ScriptCanvas/Code/Tools/TranslationGeneration.cpp b/Gems/ScriptCanvas/Code/Tools/TranslationGeneration.cpp new file mode 100644 index 0000000000..25a4b58a74 --- /dev/null +++ b/Gems/ScriptCanvas/Code/Tools/TranslationGeneration.cpp @@ -0,0 +1,1556 @@ +/* + * Copyright (c) Contributors to the Open 3D Engine Project. + * For complete copyright and license terms please see the LICENSE at the root of this distribution. + * + * SPDX-License-Identifier: Apache-2.0 OR MIT + * + */ + +#include "TranslationGeneration.h" + +#include + +#include +#include +#include +#include + +#include +#include +#include +#include +#include +#include +#include +#include + +#include + +#include +#include +#include +#include + +#include +#include +#include +#include "Data/DataRegistry.h" + +namespace ScriptCanvasEditorTools +{ + namespace Helpers + { + //! Convenience function that writes a key/value string pair into a given JSON value + void WriteString(rapidjson::Value& owner, const AZStd::string& key, const AZStd::string& value, rapidjson::Document& document); + } + + TranslationGeneration::TranslationGeneration() + { + AZ::ComponentApplicationBus::BroadcastResult(m_serializeContext, &AZ::ComponentApplicationRequests::GetSerializeContext); + AZ::ComponentApplicationBus::BroadcastResult(m_behaviorContext, &AZ::ComponentApplicationRequests::GetBehaviorContext); + } + + void TranslationGeneration::TranslateBehaviorClasses() + { + for (const auto& behaviorClassPair : m_behaviorContext->m_classes) + { + TranslateBehaviorClass(behaviorClassPair.second); + } + } + + void TranslationGeneration::TranslateEBus(const AZ::BehaviorEBus* behaviorEBus) + { + if (ShouldSkip(behaviorEBus)) + { + return; + } + + TranslationFormat translationRoot; + + // Get the handlers + if (!TranslateEBusHandler(behaviorEBus, translationRoot)) + { + if (behaviorEBus->m_events.empty()) + { + return; + } + + Entry entry; + + // Generate the translation file + entry.m_key = behaviorEBus->m_name; + entry.m_details.m_category = Helpers::GetStringAttribute(behaviorEBus, AZ::Script::Attributes::Category);; + entry.m_details.m_tooltip = behaviorEBus->m_toolTip; + entry.m_details.m_name = behaviorEBus->m_name; + entry.m_context = "EBusSender"; + + AZStd::string prettyName = Helpers::GetStringAttribute(behaviorEBus, AZ::ScriptCanvasAttributes::PrettyName); + if (!prettyName.empty()) + { + entry.m_details.m_name = prettyName; + } + + SplitCamelCase(entry.m_details.m_name); + + for (auto event : behaviorEBus->m_events) + { + const AZ::BehaviorEBusEventSender& ebusSender = event.second; + + AZ::BehaviorMethod* method = ebusSender.m_event; + if (!method) + { + method = ebusSender.m_broadcast; + } + + if (!method) + { + AZ_Warning("Script Canvas", false, "Failed to find method: %s", event.first.c_str()); + continue; + } + + Method eventEntry; + const char* eventName = event.first.c_str(); + + eventEntry.m_key = eventName; + + prettyName = Helpers::GetStringAttribute(behaviorEBus, AZ::ScriptCanvasAttributes::PrettyName); + eventEntry.m_details.m_name = prettyName.empty() ? eventName : prettyName; + eventEntry.m_details.m_tooltip = Helpers::ReadStringAttribute(event.second.m_attributes, AZ::Script::Attributes::ToolTip); + + SplitCamelCase(eventEntry.m_details.m_name); + + eventEntry.m_entry.m_name = "In"; + eventEntry.m_entry.m_tooltip = AZStd::string::format("When signaled, this will invoke %s", eventEntry.m_details.m_name.c_str()); + eventEntry.m_exit.m_name = "Out"; + eventEntry.m_exit.m_tooltip = AZStd::string::format("Signaled after %s is invoked", eventEntry.m_details.m_name.c_str()); + + size_t start = method->HasBusId() ? 1 : 0; + for (size_t i = start; i < method->GetNumArguments(); ++i) + { + Argument argument; + auto argumentType = method->GetArgument(i)->m_typeId; + + // Check the BC for metadata + + Helpers::GetTypeNameAndDescription(argumentType, argument.m_details.m_name, argument.m_details.m_tooltip); + + auto name = method->GetArgumentName(i); + if (name && !name->empty()) + { + argument.m_details.m_name = *name; + } + + auto tooltip = method->GetArgumentToolTip(i); + if (tooltip && !tooltip->empty()) + { + argument.m_details.m_tooltip = *tooltip; + } + + argument.m_typeId = argumentType.ToString(); + + SplitCamelCase(argument.m_details.m_name); + + eventEntry.m_arguments.push_back(argument); + } + + if (method->HasResult()) + { + Argument result; + + auto resultType = method->GetResult()->m_typeId; + + Helpers::GetTypeNameAndDescription(resultType, result.m_details.m_name, result.m_details.m_tooltip); + + auto tooltip = method->GetArgumentToolTip(0); + if (tooltip && !tooltip->empty()) + { + result.m_details.m_tooltip = *tooltip; + } + + result.m_typeId = resultType.ToString(); + + SplitCamelCase(result.m_details.m_name); + + eventEntry.m_results.push_back(result); + } + + entry.m_methods.push_back(eventEntry); + + } + + translationRoot.m_entries.push_back(entry); + + SaveJSONData(AZStd::string::format("EBus/Senders/%s", behaviorEBus->m_name.c_str()), translationRoot); + } + else + { + SaveJSONData(AZStd::string::format("EBus/Handlers/%s", behaviorEBus->m_name.c_str()), translationRoot); + } + } + + AZ::Entity* TranslationGeneration::GetAZEventNode(const AZ::BehaviorMethod& method) + { + // Make sure the method returns an AZ::Event by reference or pointer + if (AZ::MethodReturnsAzEventByReferenceOrPointer(method)) + { + // Read in AZ Event Description data to retrieve the event name and parameter names + AZ::Attribute* azEventDescAttribute = AZ::FindAttribute(AZ::Script::Attributes::AzEventDescription, method.m_attributes); + AZ::BehaviorAzEventDescription behaviorAzEventDesc; + AZ::AttributeReader azEventDescAttributeReader(nullptr, azEventDescAttribute); + azEventDescAttributeReader.Read(behaviorAzEventDesc); + if (behaviorAzEventDesc.m_eventName.empty()) + { + AZ_Error("NodeUtils", false, "Cannot create an AzEvent node with empty event name") + } + + auto scriptCanvasEntity = aznew AZ::Entity{ AZStd::string::format("SC-EventNode(%s)", behaviorAzEventDesc.m_eventName.c_str()) }; + scriptCanvasEntity->Init(); + auto azEventHandler = scriptCanvasEntity->CreateComponent(); + + azEventHandler->InitEventFromMethod(method); + + return scriptCanvasEntity; + } + + return nullptr; + } + + bool TranslationGeneration::TranslateBehaviorClass(const AZ::BehaviorClass* behaviorClass) + { + if (ShouldSkip(behaviorClass)) + { + return false; + } + + AZStd::string className = behaviorClass->m_name; + AZStd::string prettyName = Helpers::GetStringAttribute(behaviorClass, AZ::ScriptCanvasAttributes::PrettyName); + if (!prettyName.empty()) + { + className = prettyName; + } + + TranslationFormat translationRoot; + + Entry entry; + entry.m_context = "BehaviorClass"; + entry.m_key = behaviorClass->m_name; + + EntryDetails& details = entry.m_details; + details.m_name = className; + details.m_category = Helpers::GetStringAttribute(behaviorClass, AZ::Script::Attributes::Category); + details.m_tooltip = Helpers::GetStringAttribute(behaviorClass, AZ::Script::Attributes::ToolTip); + + SplitCamelCase(details.m_name); + + if (!behaviorClass->m_methods.empty()) + { + for (const auto& methodPair : behaviorClass->m_methods) + { + const AZ::BehaviorMethod* behaviorMethod = methodPair.second; + + if (TranslateSingleAZEvent(behaviorMethod)) + { + continue; + } + + Method methodEntry; + + AZStd::string cleanName = GraphCanvas::TranslationKey::Sanitize(methodPair.first); + + methodEntry.m_key = cleanName; + methodEntry.m_context = className; + + methodEntry.m_details.m_category = ""; + methodEntry.m_details.m_tooltip = ""; + methodEntry.m_details.m_name = methodPair.second->m_name; + + AZStd::string prefix = className + "::"; + AZ::StringFunc::Replace(methodEntry.m_details.m_name, prefix.c_str(), ""); + SplitCamelCase(methodEntry.m_details.m_name); + + methodEntry.m_entry.m_name = "In"; + methodEntry.m_entry.m_tooltip = AZStd::string::format("When signaled, this will invoke %s", methodEntry.m_details.m_name.c_str()); + methodEntry.m_exit.m_name = "Out"; + methodEntry.m_exit.m_tooltip = AZStd::string::format("Signaled after %s is invoked", methodEntry.m_details.m_name.c_str()); + + if (!Helpers::MethodHasAttribute(behaviorMethod, AZ::ScriptCanvasAttributes::FloatingFunction)) + { + methodEntry.m_details.m_category = details.m_category; + } + else if (Helpers::MethodHasAttribute(behaviorMethod, AZ::Script::Attributes::Category)) + { + methodEntry.m_details.m_category = Helpers::ReadStringAttribute(behaviorMethod->m_attributes, AZ::Script::Attributes::Category); + } + + // Arguments (Input Slots) + if (behaviorMethod->GetNumArguments() > 0) + { + size_t startIndex = behaviorMethod->HasResult() ? 1 : 0; + for (size_t argIndex = startIndex; argIndex < behaviorMethod->GetNumArguments(); ++argIndex) + { + const AZ::BehaviorParameter* parameter = behaviorMethod->GetArgument(argIndex); + + Argument argument; + + AZStd::string argumentKey = parameter->m_typeId.ToString(); + AZStd::string argumentName; + AZStd::string argumentDescription; + + Helpers::GetTypeNameAndDescription(parameter->m_typeId, argumentName, argumentDescription); + + const AZStd::string* argName = behaviorMethod->GetArgumentName(argIndex); + if (argName && !(*argName).empty()) + { + argumentName = *argName; + } + + const AZStd::string* argDesc = behaviorMethod->GetArgumentToolTip(argIndex); + if (argDesc && !(*argDesc).empty()) + { + argumentDescription = *argDesc; + } + + argument.m_typeId = argumentKey; + argument.m_details.m_name = argumentName; + argument.m_details.m_tooltip = argumentDescription; + + SplitCamelCase(argument.m_details.m_name); + + methodEntry.m_arguments.push_back(argument); + } + } + + // Results (Output Slots) + const AZ::BehaviorParameter* resultParameter = behaviorMethod->HasResult() ? behaviorMethod->GetResult() : nullptr; + if (resultParameter) + { + Argument result; + + AZStd::string resultKey = resultParameter->m_typeId.ToString(); + AZStd::string resultName = resultParameter->m_name; + AZStd::string resultDescription = ""; + + Helpers::GetTypeNameAndDescription(resultParameter->m_typeId, resultName, resultDescription); + + result.m_typeId = resultKey; + result.m_details.m_name = resultParameter->m_name; + result.m_details.m_tooltip = resultDescription; + + SplitCamelCase(result.m_details.m_name); + + methodEntry.m_results.push_back(result); + } + + entry.m_methods.push_back(methodEntry); + } + } + + // Behavior Class properties + if (!behaviorClass->m_properties.empty()) + { + for (const auto& propertyEntry : behaviorClass->m_properties) + { + AZ::BehaviorProperty* behaviorProperty = propertyEntry.second; + if (behaviorProperty) + { + TranslateBehaviorProperty(behaviorProperty, behaviorClass->m_name, "BehaviorClass", &entry); + } + } + } + + translationRoot.m_entries.push_back(entry); + + AZStd::string sanitizedFilename = GraphCanvas::TranslationKey::Sanitize(className); + AZStd::string fileName = AZStd::string::format("Classes/%s", sanitizedFilename.c_str()); + + SaveJSONData(fileName, translationRoot); + + return true; + } + + //! Generate the translation data for a specific AZ::Event + bool TranslationGeneration::TranslateSingleAZEvent(const AZ::BehaviorMethod* method) + { + AZ::Entity* node = GetAZEventNode(*method); + if (!node) + { + return false; + } + + TranslationFormat translationRoot; + + ScriptCanvas::Nodes::Core::AzEventHandler* nodeComponent = node->FindComponent(); + nodeComponent->Init(); + nodeComponent->Configure(); + + const ScriptCanvas::Nodes::Core::AzEventEntry& azEventEntry{ nodeComponent->GetEventEntry() }; + + Entry entry; + entry.m_key = azEventEntry.m_eventName; + entry.m_context = "AZEventHandler"; + entry.m_details.m_name = azEventEntry.m_eventName; + + SplitCamelCase(entry.m_details.m_name); + + for (const ScriptCanvas::Slot& slot : nodeComponent->GetSlots()) + { + Slot slotEntry; + + if (slot.IsVisible()) + { + slotEntry.m_key = slot.GetName(); + + if (slot.GetId() == azEventEntry.m_azEventInputSlotId) + { + slotEntry.m_details.m_name = azEventEntry.m_eventName; + } + else + { + slotEntry.m_details.m_name = slot.GetName(); + } + + entry.m_slots.push_back(slotEntry); + } + } + + translationRoot.m_entries.push_back(entry); + + // delete the node, don't need to keep it beyond this point + delete node; + + + AZStd::string filename = GraphCanvas::TranslationKey::Sanitize(entry.m_key); + + AZStd::string targetFile = AZStd::string::format("AZEvents/%s", filename.c_str()); + + SaveJSONData(targetFile, translationRoot); + + translationRoot.m_entries.clear(); + + return true; + } + + + void TranslationGeneration::TranslateAZEvents() + { + GraphCanvas::TranslationKey translationKey; + AZStd::vector methods; + + // Methods + for (const auto& behaviorMethod : m_behaviorContext->m_methods) + { + const auto method = behaviorMethod.second; + methods.push_back(method); + } + + // Methods in classes + for (auto behaviorClass : m_behaviorContext->m_classes) + { + for (auto behaviorMethod : behaviorClass.second->m_methods) + { + const auto method = behaviorMethod.second; + methods.push_back(method); + } + } + + for (auto& method : methods) + { + TranslateSingleAZEvent(method); + } + } + + void TranslationGeneration::TranslateNodes() + { + GraphCanvas::TranslationKey translationKey; + AZStd::vector nodes; + + auto getNodeClasses = [this, &nodes](const AZ::SerializeContext::ClassData*, const AZ::Uuid& type) + { + bool foundBaseClass = false; + auto baseClassVisitorFn = [&nodes, &type, &foundBaseClass](const AZ::SerializeContext::ClassData* reflectedBase, const AZ::TypeId& /*rttiBase*/) + { + if (!reflectedBase) + { + foundBaseClass = false; + return false; // stop iterating + } + + foundBaseClass = (reflectedBase->m_typeId == azrtti_typeid()); + if (foundBaseClass) + { + nodes.push_back(type); + return false; // we have a base, stop iterating + } + + return true; // keep iterating + }; + + AZ::EntityUtils::EnumerateBaseRecursive(m_serializeContext, baseClassVisitorFn, type); + + return true; + }; + + m_serializeContext->EnumerateAll(getNodeClasses); + + for (auto& node : nodes) + { + TranslateNode(node); + } + + } + + void TranslationGeneration::TranslateNode(const AZ::TypeId& nodeTypeId) + { + TranslationFormat translationRoot; + + if (const AZ::SerializeContext::ClassData* classData = m_serializeContext->FindClassData(nodeTypeId)) + { + Entry entry; + entry.m_key = classData->m_typeId.ToString(); + entry.m_context = "ScriptCanvas::Node"; + + EntryDetails& details = entry.m_details; + + AZStd::string cleanName = GraphCanvas::TranslationKey::Sanitize(classData->m_name); + + if (classData->m_editData) + { + details.m_name = classData->m_editData->m_name; + } + else + { + details.m_name = cleanName; + } + + SplitCamelCase(details.m_name); + + // Tooltip attribute takes priority over the edit data description + AZStd::string tooltip = Helpers::GetStringAttribute(classData, AZ::Script::Attributes::ToolTip); + if (!tooltip.empty()) + { + details.m_tooltip = tooltip; + } + else + { + details.m_tooltip = classData->m_editData ? classData->m_editData->m_description : ""; + } + + details.m_category = Helpers::GetStringAttribute(classData, AZ::Script::Attributes::Category); + if (details.m_subtitle.empty()) + { + details.m_subtitle = details.m_category; + } + + if (details.m_category.empty()) + { + details.m_category = Helpers::GetStringAttribute(classData, AZ::Script::Attributes::Category); + if (details.m_category.empty() && classData->m_editData) + { + details.m_category = Helpers::GetCategory(classData); + + if (details.m_category.empty()) + { + auto elementData = classData->m_editData->FindElementData(AZ::Edit::ClassElements::EditorData); + const AZStd::string categoryAttribute = Helpers::ReadStringAttribute(elementData->m_attributes, AZ::Script::Attributes::Category); + if (!categoryAttribute.empty()) + { + details.m_category = categoryAttribute; + } + } + } + } + + if (details.m_category.empty()) + { + // Get the library's name as the category + details.m_category = Helpers::GetLibraryCategory(*m_serializeContext, classData->m_name); + } + + if (ScriptCanvas::Node* nodeComponent = reinterpret_cast(classData->m_factory->Create(classData->m_name))) + { + nodeComponent->Init(); + nodeComponent->Configure(); + + int exeInputIndex = 0; + int exeOutputIndex = 0; + + int dataInputIndex = 0; + int dataOutputIndex = 0; + + const auto& allSlots = nodeComponent->GetAllSlots(); + for (const auto& slot : allSlots) + { + Slot slotEntry; + + if (slot->GetDescriptor().IsExecution()) + { + if (slot->GetDescriptor().IsInput()) + { + slotEntry.m_key = AZStd::string::format("Input_%s_%d", slot->GetName().c_str(), exeInputIndex); + exeInputIndex++; + + slotEntry.m_details.m_name = slot->GetName(); + slotEntry.m_details.m_tooltip = slot->GetToolTip(); + } + else if (slot->GetDescriptor().IsOutput()) + { + slotEntry.m_key = AZStd::string::format("Output_%s_%d", slot->GetName().c_str(), exeOutputIndex); + exeOutputIndex++; + + slotEntry.m_details.m_name = slot->GetName(); + slotEntry.m_details.m_tooltip = slot->GetToolTip(); + } + + entry.m_slots.push_back(slotEntry); + } + else + { + AZStd::string slotTypeKey = slot->GetDataType().IsValid() ? ScriptCanvas::Data::GetName(slot->GetDataType()) : ""; + if (slotTypeKey.empty()) + { + if (!slot->GetDataType().GetAZType().IsNull()) + { + slotTypeKey = slot->GetDataType().GetAZType().ToString(); + } + } + + if (slotTypeKey.empty()) + { + if (slot->GetDynamicDataType() == ScriptCanvas::DynamicDataType::Container) + { + slotTypeKey = "Container"; + } + else if (slot->GetDynamicDataType() == ScriptCanvas::DynamicDataType::Value) + { + slotTypeKey = "Value"; + } + else if (slot->GetDynamicDataType() == ScriptCanvas::DynamicDataType::Any) + { + slotTypeKey = "Any"; + } + } + + Argument& argument = slotEntry.m_data; + + if (slot->GetDescriptor().IsInput()) + { + slotEntry.m_key = AZStd::string::format("DataInput_%s_%d", slot->GetName().c_str(), dataInputIndex); + dataInputIndex++; + + AZStd::string argumentKey = slotTypeKey; + AZStd::string argumentName = slot->GetName(); + AZStd::string argumentDescription = slot->GetToolTip(); + + argument.m_typeId = argumentKey; + argument.m_details.m_name = argumentName; + argument.m_details.m_tooltip = argumentDescription; + + } + else if (slot->GetDescriptor().IsOutput()) + { + slotEntry.m_key = AZStd::string::format("DataOutput_%s_%d", slot->GetName().c_str(), dataOutputIndex); + dataOutputIndex++; + + AZStd::string resultKey = slotTypeKey; + AZStd::string resultName = slot->GetName(); + AZStd::string resultDescription = slot->GetToolTip(); + + argument.m_typeId = resultKey; + argument.m_details.m_name = resultName; + argument.m_details.m_tooltip = resultDescription; + } + + entry.m_slots.push_back(slotEntry); + } + } + + delete nodeComponent; + } + + translationRoot.m_entries.push_back(entry); + + if (details.m_category.empty()) + { + details.m_category = "Uncategorized"; + } + + AZStd::string prefix = GraphCanvas::TranslationKey::Sanitize(details.m_category); + AZStd::string filename = GraphCanvas::TranslationKey::Sanitize(details.m_name); + + AZStd::string targetFile = AZStd::string::format("Nodes/%s_%s", prefix.c_str(), filename.c_str()); + + SaveJSONData(targetFile, translationRoot); + + translationRoot.m_entries.clear(); + + } + } + + void TranslationGeneration::TranslateOnDemandReflectedTypes(TranslationFormat& translationRoot) + { + AZStd::vector onDemandReflectedTypes; + + for (auto& typePair : m_behaviorContext->m_typeToClassMap) + { + if (m_behaviorContext->IsOnDemandTypeReflected(typePair.first)) + { + onDemandReflectedTypes.push_back(typePair.first); + } + + // Check for methods that come from node generics + if (typePair.second->HasAttribute(AZ::ScriptCanvasAttributes::Internal::ImplementedAsNodeGeneric)) + { + onDemandReflectedTypes.push_back(typePair.first); + } + } + + // Now that I know all the on demand reflected, I'll dump it out + for (auto& onDemandReflectedType : onDemandReflectedTypes) + { + AZ::BehaviorClass* behaviorClass = m_behaviorContext->m_typeToClassMap[onDemandReflectedType]; + if (behaviorClass) + { + Entry entry; + + EntryDetails& details = entry.m_details; + details.m_name = behaviorClass->m_name; + SplitCamelCase(details.m_name); + + // Get the pretty name + AZStd::string prettyName; + if (AZ::Attribute* prettyNameAttribute = AZ::FindAttribute(AZ::ScriptCanvasAttributes::PrettyName, behaviorClass->m_attributes)) + { + AZ::AttributeReader(nullptr, prettyNameAttribute).Read(prettyName, *m_behaviorContext); + } + + entry.m_context = "OnDemandReflected"; + entry.m_key = behaviorClass->m_typeId.ToString().c_str(); + + if (!prettyName.empty()) + { + details.m_name = prettyName; + } + + details.m_category = Helpers::GetStringAttribute(behaviorClass, AZ::Script::Attributes::Category); + details.m_tooltip = Helpers::GetStringAttribute(behaviorClass, AZ::Script::Attributes::ToolTip); + + for (auto& methodPair : behaviorClass->m_methods) + { + AZ::BehaviorMethod* behaviorMethod = methodPair.second; + if (behaviorMethod) + { + Method methodEntry; + + AZStd::string cleanName = GraphCanvas::TranslationKey::Sanitize(methodPair.first); + + methodEntry.m_key = cleanName; + methodEntry.m_context = entry.m_key; + + methodEntry.m_details.m_tooltip = Helpers::GetStringAttribute(behaviorMethod, AZ::Script::Attributes::ToolTip); + methodEntry.m_details.m_name = methodPair.second->m_name; + SplitCamelCase(methodEntry.m_details.m_name); + + // Strip the className from the methodName + AZStd::string qualifiedName = behaviorClass->m_name + "::"; + AzFramework::StringFunc::Replace(methodEntry.m_details.m_name, qualifiedName.c_str(), ""); + + AZStd::string cleanMethodName = methodEntry.m_details.m_name; + + methodEntry.m_entry.m_name = "In"; + methodEntry.m_entry.m_tooltip = AZStd::string::format("When signaled, this will invoke %s", methodEntry.m_details.m_name.c_str()); + methodEntry.m_exit.m_name = "Out"; + methodEntry.m_exit.m_tooltip = AZStd::string::format("Signaled after %s is invoked", methodEntry.m_details.m_name.c_str()); + + // Arguments (Input Slots) + if (behaviorMethod->GetNumArguments() > 0) + { + for (size_t argIndex = 0; argIndex < behaviorMethod->GetNumArguments(); ++argIndex) + { + const AZ::BehaviorParameter* parameter = behaviorMethod->GetArgument(argIndex); + + Argument argument; + + AZStd::string argumentKey = parameter->m_typeId.ToString(); + AZStd::string argumentName = parameter->m_name; + AZStd::string argumentDescription = ""; + + Helpers::GetTypeNameAndDescription(parameter->m_typeId, argumentName, argumentDescription); + + argument.m_typeId = argumentKey; + argument.m_details.m_name = argumentName; + argument.m_details.m_category = ""; + argument.m_details.m_tooltip = argumentDescription; + + SplitCamelCase(argument.m_details.m_name); + + methodEntry.m_arguments.push_back(argument); + } + } + + const AZ::BehaviorParameter* resultParameter = behaviorMethod->HasResult() ? behaviorMethod->GetResult() : nullptr; + if (resultParameter) + { + Argument result; + + AZStd::string resultKey = resultParameter->m_typeId.ToString(); + + AZStd::string resultName = resultParameter->m_name; + AZStd::string resultDescription = ""; + + Helpers::GetTypeNameAndDescription(resultParameter->m_typeId, resultName, resultDescription); + + result.m_typeId = resultKey; + result.m_details.m_name = resultName; + result.m_details.m_tooltip = resultDescription; + + SplitCamelCase(result.m_details.m_name); + + methodEntry.m_results.push_back(result); + } + + entry.m_methods.push_back(methodEntry); + } + } + + translationRoot.m_entries.push_back(entry); + } + } + + SaveJSONData("Types/OnDemandReflectedTypes", translationRoot); + } + + void TranslationGeneration::TranslateBehaviorGlobals() + { + for (const auto& [propertyName, behaviorProperty] : m_behaviorContext->m_properties) + { + TranslateBehaviorProperty(propertyName); + } + } + + void TranslationGeneration::TranslateBehaviorProperty(const AZStd::string& propertyName) + { + const auto behaviorPropertyEntry = m_behaviorContext->m_properties.find(propertyName); + if (behaviorPropertyEntry == m_behaviorContext->m_properties.end()) + { + return; + } + + const AZ::BehaviorProperty* behaviorProperty = behaviorPropertyEntry->second; + + Entry entry; + + TranslateBehaviorProperty(behaviorProperty, propertyName, "Constant", &entry); + + TranslationFormat translationRoot; + translationRoot.m_entries.push_back(entry); + + AZStd::string cleanName = GraphCanvas::TranslationKey::Sanitize(behaviorProperty->m_name); + AZStd::string fileName = AZStd::string::format("Properties/%s", cleanName.c_str()); + SaveJSONData(fileName, translationRoot); + } + + void TranslationGeneration::TranslateDataTypes() + { + TranslationFormat translationRoot; + + auto dataRegistry = ScriptCanvas::GetDataRegistry(); + + for (auto& typePair : dataRegistry->m_creatableTypes) + { + if (ScriptCanvas::Data::IsContainerType(typePair.first)) + { + continue; + } + + const AZStd::string typeIDStr = typePair.first.GetAZType().ToString(); + AZStd::string typeName = ScriptCanvas::Data::GetName(typePair.first); + + Entry entry; + entry.m_key = typeIDStr; + entry.m_context = "BehaviorType"; + entry.m_details.m_name = typeName; + + translationRoot.m_entries.emplace_back(entry); + } + + SaveJSONData("Types/BehaviorTypes", translationRoot); + } + + void TranslationGeneration::TranslateMethod(AZ::BehaviorMethod* behaviorMethod, Method& methodEntry) + { + // Arguments (Input Slots) + if (behaviorMethod->GetNumArguments() > 0) + { + for (size_t argIndex = 0; argIndex < behaviorMethod->GetNumArguments(); ++argIndex) + { + const AZ::BehaviorParameter* parameter = behaviorMethod->GetArgument(argIndex); + + Argument argument; + + AZStd::string argumentKey = parameter->m_typeId.ToString(); + AZStd::string argumentName = parameter->m_name; + AZStd::string argumentDescription; + + Helpers::GetTypeNameAndDescription(parameter->m_typeId, argumentName, argumentDescription); + + const AZStd::string* argName = behaviorMethod->GetArgumentName(argIndex); + argument.m_typeId = argumentKey; + argument.m_details.m_name = (argName && !argName->empty()) ? *argName : argumentName; + argument.m_details.m_category = ""; + argument.m_details.m_tooltip = argumentDescription; + + SplitCamelCase(argument.m_details.m_name); + + methodEntry.m_arguments.push_back(argument); + } + } + + // Results (Output Slots) + const AZ::BehaviorParameter* resultParameter = behaviorMethod->HasResult() ? behaviorMethod->GetResult() : nullptr; + if (resultParameter) + { + Argument result; + + AZStd::string resultKey = resultParameter->m_typeId.ToString(); + AZStd::string resultName = resultParameter->m_name; + AZStd::string resultDescription; + + Helpers::GetTypeNameAndDescription(resultParameter->m_typeId, resultName, resultDescription); + + const AZStd::string* resName = behaviorMethod->GetArgumentName(0); + result.m_typeId = resultKey; + result.m_details.m_name = (resName && !resName->empty()) ? *resName : resultName; + result.m_details.m_tooltip = resultDescription; + + SplitCamelCase(result.m_details.m_name); + + methodEntry.m_results.push_back(result); + } + } + + void TranslationGeneration::TranslateBehaviorProperty(const AZ::BehaviorProperty* behaviorProperty, const AZStd::string& className, const AZStd::string& context, Entry* entry) + { + if (!behaviorProperty->m_getter && !behaviorProperty->m_setter) + { + return; + } + + Entry localEntry; + if (!entry) + { + entry = &localEntry; + } + else if (entry->m_key.empty()) + { + entry->m_key = className; + entry->m_context = context; + + entry->m_details.m_name = className; + SplitCamelCase(entry->m_details.m_name); + } + + if (behaviorProperty->m_getter) + { + AZStd::string cleanName = behaviorProperty->m_name; + AZ::StringFunc::Replace(cleanName, "::Getter", ""); + + Method method; + + AZStd::string methodName = "Get"; + methodName.append(cleanName); + method.m_key = methodName; + method.m_context = "Getter"; + method.m_details.m_name = methodName; + method.m_details.m_tooltip = behaviorProperty->m_getter->m_debugDescription ? behaviorProperty->m_getter->m_debugDescription : ""; + + SplitCamelCase(method.m_details.m_name); + + TranslateMethod(behaviorProperty->m_getter, method); + + // We know this is a getter, so there will only be one parameter, we will use the method name as a best + // guess for the argument name + SplitCamelCase(cleanName); + method.m_results[0].m_details.m_name = cleanName; + + entry->m_methods.push_back(method); + + } + + if (behaviorProperty->m_setter) + { + AZStd::string cleanName = behaviorProperty->m_name; + AZ::StringFunc::Replace(cleanName, "::Setter", ""); + + Method method; + + AZStd::string methodName = "Set"; + methodName.append(cleanName); + + method.m_key = methodName; + method.m_context = "Setter"; + method.m_details.m_name = methodName; + method.m_details.m_tooltip = behaviorProperty->m_setter->m_debugDescription ? behaviorProperty->m_getter->m_debugDescription : ""; + + SplitCamelCase(method.m_details.m_name); + + TranslateMethod(behaviorProperty->m_setter, method); + + // We know this is a setter, so there will only be one parameter, we will use the method name as a best + // guess for the argument name + SplitCamelCase(cleanName); + method.m_arguments[1].m_details.m_name = cleanName; + + entry->m_methods.push_back(method); + } + + } + + bool TranslationGeneration::TranslateEBusHandler(const AZ::BehaviorEBus* behaviorEbus, TranslationFormat& translationRoot) + { + // Must be a valid ebus handler + if (!behaviorEbus || !behaviorEbus->m_createHandler || !behaviorEbus->m_destroyHandler) + { + return false; + } + + // Create the handler in order to get information out of it + AZ::BehaviorEBusHandler* handler(nullptr); + if (behaviorEbus->m_createHandler->InvokeResult(handler)) + { + Entry entry; + + // Generate the translation file + entry.m_key = behaviorEbus->m_name; + entry.m_context = "EBusHandler"; + + entry.m_details.m_name = behaviorEbus->m_name; + entry.m_details.m_tooltip = behaviorEbus->m_toolTip; + entry.m_details.m_category = "EBus Handlers"; + + SplitCamelCase(entry.m_details.m_name); + + for (const AZ::BehaviorEBusHandler::BusForwarderEvent& event : handler->GetEvents()) + { + Method methodEntry; + + AZStd::string cleanName = GraphCanvas::TranslationKey::Sanitize(event.m_name); + methodEntry.m_key = cleanName; + methodEntry.m_details.m_category = ""; + methodEntry.m_details.m_tooltip = ""; + methodEntry.m_details.m_name = event.m_name; + + SplitCamelCase(methodEntry.m_details.m_name); + + // Arguments (Input Slots) + if (!event.m_parameters.empty()) + { + for (size_t argIndex = AZ::eBehaviorBusForwarderEventIndices::ParameterFirst; argIndex < event.m_parameters.size(); ++argIndex) + { + const AZ::BehaviorParameter& parameter = event.m_parameters[argIndex]; + + Argument argument; + + AZStd::string argumentKey = parameter.m_typeId.ToString(); + AZStd::string argumentName = event.m_name; + AZStd::string argumentDescription = ""; + + if (!event.m_metadataParameters.empty() && event.m_metadataParameters.size() > argIndex) + { + argumentName = event.m_metadataParameters[argIndex].m_name; + argumentDescription = event.m_metadataParameters[argIndex].m_toolTip; + } + + if (argumentName.empty()) + { + Helpers::GetTypeNameAndDescription(parameter.m_typeId, argumentName, argumentDescription); + } + + if (!event.m_metadataParameters.empty() && event.m_metadataParameters.size() > argIndex) + { + auto name = event.m_metadataParameters[argIndex].m_name; + auto tooltip = event.m_metadataParameters[argIndex].m_toolTip; + + if (!name.empty()) + { + argumentName = name; + } + + if (!tooltip.empty()) + { + argumentDescription = tooltip; + } + } + + argument.m_typeId = argumentKey; + argument.m_details.m_name = argumentName; + argument.m_details.m_tooltip = argumentDescription; + + SplitCamelCase(argument.m_details.m_name); + + methodEntry.m_arguments.push_back(argument); + } + } + + auto resultIndex = AZ::eBehaviorBusForwarderEventIndices::Result; + const AZ::BehaviorParameter* resultParameter = event.HasResult() ? &event.m_parameters[resultIndex] : nullptr; + if (resultParameter) + { + Argument result; + + AZStd::string resultKey = resultParameter->m_typeId.ToString(); + + AZStd::string resultName = event.m_name; + AZStd::string resultDescription = ""; + + if (!event.m_metadataParameters.empty() && event.m_metadataParameters.size() > resultIndex) + { + resultName = event.m_metadataParameters[resultIndex].m_name; + resultDescription = event.m_metadataParameters[resultIndex].m_toolTip; + } + + if (resultName.empty()) + { + Helpers::GetTypeNameAndDescription(resultParameter->m_typeId, resultName, resultDescription); + } + + result.m_typeId = resultKey; + result.m_details.m_name = resultName; + result.m_details.m_tooltip = resultDescription; + + SplitCamelCase(result.m_details.m_name); + + methodEntry.m_results.push_back(result); + } + + entry.m_methods.push_back(methodEntry); + + } + + behaviorEbus->m_destroyHandler->Invoke(handler); // Destroys the Created EbusHandler + + translationRoot.m_entries.push_back(entry); + } + + if (!translationRoot.m_entries.empty()) + { + return true; + } + + return false; + } + + void TranslationGeneration::SaveJSONData(const AZStd::string& filename, TranslationFormat& translationRoot) + { + rapidjson_ly::Document document; + document.SetObject(); + rapidjson_ly::Value entries(rapidjson_ly::kArrayType); + + // Here I'll need to parse translationRoot myself and produce the JSON + for (const auto& entrySource : translationRoot.m_entries) + { + rapidjson_ly::Value entry(rapidjson_ly::kObjectType); + rapidjson_ly::Value value(rapidjson_ly::kStringType); + + value.SetString(entrySource.m_key.c_str(), document.GetAllocator()); + entry.AddMember(GraphCanvas::Schema::Field::key, value, document.GetAllocator()); + + value.SetString(entrySource.m_context.c_str(), document.GetAllocator()); + entry.AddMember(GraphCanvas::Schema::Field::context, value, document.GetAllocator()); + + value.SetString(entrySource.m_variant.c_str(), document.GetAllocator()); + entry.AddMember(GraphCanvas::Schema::Field::variant, value, document.GetAllocator()); + + rapidjson_ly::Value details(rapidjson_ly::kObjectType); + value.SetString(entrySource.m_details.m_name.c_str(), document.GetAllocator()); + details.AddMember("name", value, document.GetAllocator()); + + Helpers::WriteString(details, "category", entrySource.m_details.m_category, document); + Helpers::WriteString(details, "tooltip", entrySource.m_details.m_tooltip, document); + Helpers::WriteString(details, "subtitle", entrySource.m_details.m_subtitle, document); + + entry.AddMember("details", details, document.GetAllocator()); + + if (!entrySource.m_methods.empty()) + { + rapidjson_ly::Value methods(rapidjson_ly::kArrayType); + + for (const auto& methodSource : entrySource.m_methods) + { + rapidjson_ly::Value theMethod(rapidjson_ly::kObjectType); + + value.SetString(methodSource.m_key.c_str(), document.GetAllocator()); + theMethod.AddMember(GraphCanvas::Schema::Field::key, value, document.GetAllocator()); + + if (!methodSource.m_context.empty()) + { + value.SetString(methodSource.m_context.c_str(), document.GetAllocator()); + theMethod.AddMember(GraphCanvas::Schema::Field::context, value, document.GetAllocator()); + } + + if (!methodSource.m_entry.m_name.empty()) + { + rapidjson_ly::Value entrySlot(rapidjson_ly::kObjectType); + value.SetString(methodSource.m_entry.m_name.c_str(), document.GetAllocator()); + entrySlot.AddMember("name", value, document.GetAllocator()); + + Helpers::WriteString(entrySlot, "tooltip", methodSource.m_entry.m_tooltip, document); + + theMethod.AddMember("entry", entrySlot, document.GetAllocator()); + } + + if (!methodSource.m_exit.m_name.empty()) + { + rapidjson_ly::Value exitSlot(rapidjson_ly::kObjectType); + value.SetString(methodSource.m_exit.m_name.c_str(), document.GetAllocator()); + exitSlot.AddMember("name", value, document.GetAllocator()); + + Helpers::WriteString(exitSlot, "tooltip", methodSource.m_exit.m_tooltip, document); + + theMethod.AddMember("exit", exitSlot, document.GetAllocator()); + } + + rapidjson_ly::Value methodDetails(rapidjson_ly::kObjectType); + + value.SetString(methodSource.m_details.m_name.c_str(), document.GetAllocator()); + methodDetails.AddMember("name", value, document.GetAllocator()); + + Helpers::WriteString(methodDetails, "category", methodSource.m_details.m_category, document); + Helpers::WriteString(methodDetails, "tooltip", methodSource.m_details.m_tooltip, document); + + theMethod.AddMember("details", methodDetails, document.GetAllocator()); + + if (!methodSource.m_arguments.empty()) + { + rapidjson_ly::Value methodArguments(rapidjson_ly::kArrayType); + + [[maybe_unused]] size_t index = 0; + for (const auto& argSource : methodSource.m_arguments) + { + rapidjson_ly::Value argument(rapidjson_ly::kObjectType); + rapidjson_ly::Value argumentDetails(rapidjson_ly::kObjectType); + + value.SetString(argSource.m_typeId.c_str(), document.GetAllocator()); + argument.AddMember("typeid", value, document.GetAllocator()); + + value.SetString(argSource.m_details.m_name.c_str(), document.GetAllocator()); + argumentDetails.AddMember("name", value, document.GetAllocator()); + + Helpers::WriteString(argumentDetails, "category", argSource.m_details.m_category, document); + Helpers::WriteString(argumentDetails, "tooltip", argSource.m_details.m_tooltip, document); + + + argument.AddMember("details", argumentDetails, document.GetAllocator()); + + methodArguments.PushBack(argument, document.GetAllocator()); + + } + + theMethod.AddMember("params", methodArguments, document.GetAllocator()); + + } + + if (!methodSource.m_results.empty()) + { + rapidjson_ly::Value methodArguments(rapidjson_ly::kArrayType); + + for (const auto& argSource : methodSource.m_results) + { + rapidjson_ly::Value argument(rapidjson_ly::kObjectType); + rapidjson_ly::Value argumentDetails(rapidjson_ly::kObjectType); + + value.SetString(argSource.m_typeId.c_str(), document.GetAllocator()); + argument.AddMember("typeid", value, document.GetAllocator()); + + value.SetString(argSource.m_details.m_name.c_str(), document.GetAllocator()); + argumentDetails.AddMember("name", value, document.GetAllocator()); + + Helpers::WriteString(argumentDetails, "category", argSource.m_details.m_category, document); + Helpers::WriteString(argumentDetails, "tooltip", argSource.m_details.m_tooltip, document); + + argument.AddMember("details", argumentDetails, document.GetAllocator()); + + methodArguments.PushBack(argument, document.GetAllocator()); + } + + + theMethod.AddMember("results", methodArguments, document.GetAllocator()); + + } + + methods.PushBack(theMethod, document.GetAllocator()); + } + + entry.AddMember("methods", methods, document.GetAllocator()); + } + + if (!entrySource.m_slots.empty()) + { + rapidjson_ly::Value slotsArray(rapidjson_ly::kArrayType); + + for (const auto& slotSource : entrySource.m_slots) + { + rapidjson_ly::Value theSlot(rapidjson_ly::kObjectType); + + value.SetString(slotSource.m_key.c_str(), document.GetAllocator()); + theSlot.AddMember(GraphCanvas::Schema::Field::key, value, document.GetAllocator()); + + rapidjson_ly::Value sloDetails(rapidjson_ly::kObjectType); + if (!slotSource.m_details.m_name.empty()) + { + Helpers::WriteString(sloDetails, "name", slotSource.m_details.m_name, document); + Helpers::WriteString(sloDetails, "tooltip", slotSource.m_details.m_tooltip, document); + theSlot.AddMember("details", sloDetails, document.GetAllocator()); + } + + if (!slotSource.m_data.m_details.m_name.empty()) + { + rapidjson_ly::Value slotDataDetails(rapidjson_ly::kObjectType); + Helpers::WriteString(slotDataDetails, "name", slotSource.m_data.m_details.m_name, document); + theSlot.AddMember("details", slotDataDetails, document.GetAllocator()); + } + + slotsArray.PushBack(theSlot, document.GetAllocator()); + } + + entry.AddMember("slots", slotsArray, document.GetAllocator()); + } + + entries.PushBack(entry, document.GetAllocator()); + } + + document.AddMember("entries", entries, document.GetAllocator()); + + AZ::IO::Path gemPath = Helpers::GetGemPath("ScriptCanvas.Editor"); + gemPath = gemPath / AZ::IO::Path("TranslationAssets"); + gemPath = gemPath / filename; + gemPath.ReplaceExtension(".names"); + + AZStd::string folderPath; + + AZ::StringFunc::Path::GetFolderPath(gemPath.c_str(), folderPath); + + if (!AZ::IO::FileIOBase::GetInstance()->Exists(folderPath.c_str())) + { + if (AZ::IO::FileIOBase::GetInstance()->CreatePath(folderPath.c_str()) != AZ::IO::ResultCode::Success) + { + AZ_Error("Translation", false, "Failed to create output folder"); + return; + } + } + + char resolvedBuffer[AZ_MAX_PATH_LEN] = { 0 }; + AZ::IO::FileIOBase::GetInstance()->ResolvePath(gemPath.c_str(), resolvedBuffer, AZ_MAX_PATH_LEN); + AZStd::string endPath = resolvedBuffer; + AZ::StringFunc::Path::Normalize(endPath); + + AZ::IO::SystemFile outputFile; + if (!outputFile.Open(endPath.c_str(), + AZ::IO::SystemFile::OpenMode::SF_OPEN_CREATE | + AZ::IO::SystemFile::OpenMode::SF_OPEN_CREATE_PATH | + AZ::IO::SystemFile::OpenMode::SF_OPEN_WRITE_ONLY)) + { + AZ_Error("Translation", false, "Failed to open file for writing: %s", filename.c_str()); + return; + } + + rapidjson_ly::StringBuffer scratchBuffer; + + rapidjson_ly::PrettyWriter writer(scratchBuffer); + document.Accept(writer); + + outputFile.Write(scratchBuffer.GetString(), scratchBuffer.GetSize()); + outputFile.Close(); + + scratchBuffer.Clear(); + + // AzQtComponents::ShowFileOnDesktop(endPath.c_str()); + + } + + void TranslationGeneration::SplitCamelCase(AZStd::string& text) + { + AZStd::regex splitRegex(R"(/[a-z]+|[0-9]+|(?:[A-Z][a-z]+)|(?:[A-Z]+(?=(?:[A-Z][a-z])|[^AZa-z]|[$\d\n]))/g)"); + text = AZStd::regex_replace(text, splitRegex, " $&"); + text = AZ::StringFunc::LStrip(text); + AZ::StringFunc::Replace(text, " ", " "); + } + + namespace Helpers + { + AZStd::string ReadStringAttribute(const AZ::AttributeArray& attributes, const AZ::Crc32& attribute) + { + AZStd::string attributeValue = ""; + if (auto attributeItem = azrtti_cast*>(AZ::FindAttribute(attribute, attributes))) + { + attributeValue = attributeItem->Get(nullptr); + return attributeValue; + } + + if (auto attributeItem = azrtti_cast*>(AZ::FindAttribute(attribute, attributes))) + { + attributeValue = attributeItem->Get(nullptr); + return attributeValue; + } + + return {}; + } + + bool MethodHasAttribute(const AZ::BehaviorMethod* method, AZ::Crc32 attribute) + { + return AZ::FindAttribute(attribute, method->m_attributes) != nullptr; // warning C4800: 'AZ::Attribute *': forcing value to bool 'true' or 'false' (performance warning) + } + + void GetTypeNameAndDescription(AZ::TypeId typeId, AZStd::string& outName, AZStd::string& outDescription) + { + AZ::SerializeContext* serializeContext{}; + AZ::ComponentApplicationBus::BroadcastResult(serializeContext, &AZ::ComponentApplicationRequests::GetSerializeContext); + AZ_Assert(serializeContext, "Serialize Context is required"); + + if (const AZ::SerializeContext::ClassData* classData = serializeContext->FindClassData(typeId)) + { + if (classData->m_editData) + { + outName = classData->m_editData->m_name ? classData->m_editData->m_name : classData->m_name; + outDescription = classData->m_editData->m_description ? classData->m_editData->m_description : ""; + } + else + { + outName = classData->m_name; + } + } + } + + AZStd::string GetGemPath(const AZStd::string& gemName) + { + if (auto settingsRegistry = AZ::Interface::Get(); settingsRegistry != nullptr) + { + AZ::IO::Path gemSourceAssetDirectories; + AZStd::vector gemInfos; + if (AzFramework::GetGemsInfo(gemInfos, *settingsRegistry)) + { + auto FindGemByName = [gemName](const AzFramework::GemInfo& gemInfo) + { + return gemInfo.m_gemName == gemName; + }; + + // Gather unique list of Gem Paths from the Settings Registry + auto foundIt = AZStd::find_if(gemInfos.begin(), gemInfos.end(), FindGemByName); + if (foundIt != gemInfos.end()) + { + const AzFramework::GemInfo& gemInfo = *foundIt; + for (const AZ::IO::Path& absoluteSourcePath : gemInfo.m_absoluteSourcePaths) + { + gemSourceAssetDirectories = (absoluteSourcePath / gemInfo.GetGemAssetFolder()); + } + + return gemSourceAssetDirectories.c_str(); + } + } + } + return ""; + } + + AZStd::string GetCategory(const AZ::SerializeContext::ClassData* classData) + { + AZStd::string categoryPath; + + if (classData->m_editData) + { + auto editorElementData = classData->m_editData->FindElementData(AZ::Edit::ClassElements::EditorData); + if (editorElementData) + { + if (auto categoryAttribute = editorElementData->FindAttribute(AZ::Edit::Attributes::Category)) + { + if (auto categoryAttributeData = azdynamic_cast*>(categoryAttribute)) + { + categoryPath = categoryAttributeData->Get(nullptr); + } + } + } + } + + return categoryPath; + } + + AZStd::string GetLibraryCategory(const AZ::SerializeContext& serializeContext, const AZStd::string& nodeName) + { + AZStd::string category; + + // Get all the types. + auto EnumerateLibraryDefintionNodes = [&nodeName, &category, &serializeContext]( + const AZ::SerializeContext::ClassData* classData, const AZ::Uuid&) -> bool + { + AZStd::string categoryPath = classData->m_editData ? classData->m_editData->m_name : classData->m_name; + + if (classData->m_editData) + { + auto editorElementData = classData->m_editData->FindElementData(AZ::Edit::ClassElements::EditorData); + if (editorElementData) + { + if (auto categoryAttribute = editorElementData->FindAttribute(AZ::Edit::Attributes::Category)) + { + if (auto categoryAttributeData = azdynamic_cast*>(categoryAttribute)) + { + categoryPath = categoryAttributeData->Get(nullptr); + } + } + } + } + + // Children + for (auto& node : ScriptCanvas::Library::LibraryDefinition::GetNodes(classData->m_typeId)) + { + // Pass in the associated class data so we can do more intensive lookups? + const AZ::SerializeContext::ClassData* nodeClassData = serializeContext.FindClassData(node.first); + + if (nodeClassData == nullptr) + { + continue; + } + + // Skip over some of our more dynamic nodes that we want to populate using different means + else if (nodeClassData->m_azRtti && nodeClassData->m_azRtti->IsTypeOf()) + { + continue; + } + else if (nodeClassData->m_azRtti && nodeClassData->m_azRtti->IsTypeOf()) + { + continue; + } + else + { + if (node.second == nodeName) + { + category = categoryPath; + return false; + } + } + } + + return true; + }; + + const AZ::TypeId& libraryDefTypeId = azrtti_typeid(); + serializeContext.EnumerateDerived(EnumerateLibraryDefintionNodes, libraryDefTypeId, libraryDefTypeId); + + return category; + } + + void WriteString(rapidjson_ly::Value& owner, const AZStd::string& key, const AZStd::string& value, rapidjson_ly::Document& document) + { + if (key.empty() || value.empty()) + { + return; + } + + rapidjson_ly::Value item(rapidjson_ly::kStringType); + item.SetString(value.c_str(), document.GetAllocator()); + + rapidjson_ly::Value keyVal(rapidjson_ly::kStringType); + keyVal.SetString(key.c_str(), document.GetAllocator()); + + owner.AddMember(keyVal, item, document.GetAllocator()); + } + + } +} diff --git a/Gems/ScriptCanvas/Code/Tools/TranslationGeneration.h b/Gems/ScriptCanvas/Code/Tools/TranslationGeneration.h new file mode 100644 index 0000000000..a5fec82361 --- /dev/null +++ b/Gems/ScriptCanvas/Code/Tools/TranslationGeneration.h @@ -0,0 +1,209 @@ +/* + * Copyright (c) Contributors to the Open 3D Engine Project. + * For complete copyright and license terms please see the LICENSE at the root of this distribution. + * + * SPDX-License-Identifier: Apache-2.0 OR MIT + * + */ + +#pragma once + +#include +#include + +#include +#include +#include +#include + +namespace AZ +{ + class BehaviorClass; + class BehaviorContext; + class BehaviorEBus; + class BehaviorMethod; + class BehaviorProperty; + class Entity; + class SerializeContext; +} + +namespace ScriptCanvasEditorTools +{ + //! Utility structures for generating the JSON files used for names of elements in Script Canvas + struct EntryDetails + { + AZStd::string m_name; + AZStd::string m_tooltip; + AZStd::string m_category; + AZStd::string m_subtitle; + }; + using EntryDetailsList = AZStd::vector; + + //! Utility structure that represents a method's argument + struct Argument + { + AZStd::string m_typeId; + EntryDetails m_details; + }; + + //! Utility structure that represents a method + struct Method + { + AZStd::string m_key; + AZStd::string m_context; + + EntryDetails m_details; + + EntryDetails m_entry; + EntryDetails m_exit; + + AZStd::vector m_arguments; + AZStd::vector m_results; + }; + + //! Utility structure that represents a Script Canvas slot + struct Slot + { + AZStd::string m_key; + + EntryDetails m_details; + + Argument m_data; + }; + + //! Utility structure that represents an reflected element + struct Entry + { + AZStd::string m_key; + AZStd::string m_context; + AZStd::string m_variant; + + EntryDetails m_details; + + AZStd::vector m_methods; + AZStd::vector m_slots; + }; + + // The root level JSON object + struct TranslationFormat + { + AZStd::vector m_entries; + }; + + + //! Class the wraps all the generation of translation data for all scripting types. + class TranslationGeneration + { + public: + + TranslationGeneration(); + + //! Generate the translation data for a given BehaviorClass + bool TranslateBehaviorClass(const AZ::BehaviorClass* behaviorClass); + + //! Generate the translation data for all Behavior Context classes + void TranslateBehaviorClasses(); + + //! Generate the translation data for Behavior Ebus, handles both Handlers and Senders + void TranslateEBus(const AZ::BehaviorEBus* behaviorEBus); + + //! Generate the translation data for a specific AZ::Event + bool TranslateSingleAZEvent(const AZ::BehaviorMethod* method); + + //! Generate the translation data for AZ::Events + void TranslateAZEvents(); + + //! Generate the translation data for all ScriptCanvas::Node types + void TranslateNodes(); + + //! Generate the translation data for the specified TypeId (must inherit from ScriptCanvas::Node) + void TranslateNode(const AZ::TypeId& nodeTypeId); + + //! Generate the translation data for on-demand reflected types + void TranslateOnDemandReflectedTypes(TranslationFormat& translationRoot); + + //! Generates the translation data for all global properties and methods in the BehaviorContext + void TranslateBehaviorGlobals(); + + //! Generates the translation data for the specified property in the BehaviorContext (global, by name) + void TranslateBehaviorProperty(const AZStd::string& propertyName); + + //! Generates the translation data for the specified property in the BehaviorContext + void TranslateBehaviorProperty(const AZ::BehaviorProperty* behaviorProperty, const AZStd::string& className, const AZStd::string& context, Entry* entry = nullptr); + + //! Generates a type map from reflected types that are suitable for BehaviorContext objects used by ScriptCanvas + void TranslateDataTypes(); + + private: + + //! Returns the entity for a valid AZ::Event + AZ::Entity* GetAZEventNode(const AZ::BehaviorMethod& method); + + //! Utility to populate a BehaviorMethod's translation data + void TranslateMethod(AZ::BehaviorMethod* behaviorMethod, Method& methodEntry); + + //! Generates the translation data for a BehaviorEBus that has an BehaviorEBusHandler + bool TranslateEBusHandler(const AZ::BehaviorEBus* behaviorEbus, TranslationFormat& translationRoot); + + //! Utility function that saves a TranslationFormat object in the desired JSON format + void SaveJSONData(const AZStd::string& filename, TranslationFormat& translationRoot); + + //! Utility function that splits camel-case syntax string into separate words + void SplitCamelCase(AZStd::string&); + + //! Evaluates if the specified object has exclusion flags and should be skipped from generation + template + bool ShouldSkip(const T* object) const + { + using namespace AZ::Script::Attributes; + + // Check for "ignore" attribute for ScriptCanvas + const auto& excludeClassAttributeData = azdynamic_cast*>(AZ::FindAttribute(ExcludeFrom, object->m_attributes)); + const bool excludeClass = excludeClassAttributeData && (static_cast(excludeClassAttributeData->Get(nullptr)) & static_cast(ExcludeFlags::List | ExcludeFlags::Documentation)); + + if (excludeClass) + { + return true; // skip this class + } + + return false; + } + + AZ::SerializeContext* m_serializeContext; + AZ::BehaviorContext* m_behaviorContext; + }; + + namespace Helpers + { + //! Generic function that fetches from a valid type that has attributes a string attribute + template + AZStd::string GetStringAttribute(const T* source, const AZ::Crc32& attribute) + { + AZStd::string attributeValue = ""; + if (auto attributeItem = azrtti_cast*>(AZ::FindAttribute(attribute, source->m_attributes))) + { + attributeValue = attributeItem->Get(nullptr); + } + return attributeValue; + } + + //! Utility function that fetches from an AttributeArray a string attribute whether it's an AZStd::string or a const char* + AZStd::string ReadStringAttribute(const AZ::AttributeArray& attributes, const AZ::Crc32& attribute); + + //! Utility function to verify if a BehaviorMethod has the specified attribute + bool MethodHasAttribute(const AZ::BehaviorMethod* method, AZ::Crc32 attribute); + + //! Utility function to find a valid name from the ClassData/EditContext + void GetTypeNameAndDescription(AZ::TypeId typeId, AZStd::string& outName, AZStd::string& outDescription); + + //! Utility function to get the path to the specified gem + AZStd::string GetGemPath(const AZStd::string& gemName); + + //! Get the category attribute for a given ClassData + AZStd::string GetCategory(const AZ::SerializeContext::ClassData* classData); + + //! Get the category for a ScriptCanvas node library + AZStd::string GetLibraryCategory(const AZ::SerializeContext& serializeContext, const AZStd::string& nodeName); + } + +} diff --git a/Gems/ScriptCanvas/Code/scriptcanvasgem_common_files.cmake b/Gems/ScriptCanvas/Code/scriptcanvasgem_common_files.cmake index 7984340b7a..c0dcc04838 100644 --- a/Gems/ScriptCanvas/Code/scriptcanvasgem_common_files.cmake +++ b/Gems/ScriptCanvas/Code/scriptcanvasgem_common_files.cmake @@ -7,575 +7,203 @@ # set(FILES - Include/ScriptCanvas/SystemComponent.h Source/SystemComponent.cpp Source/ScriptCanvasCommonGem.cpp Source/PerformanceStatistician.cpp Source/PerformanceTracker.cpp - Include/ScriptCanvas/ScriptCanvasGem.h - Include/ScriptCanvas/Asset/AssetDescription.h Include/ScriptCanvas/Asset/AssetRegistry.cpp - Include/ScriptCanvas/Asset/AssetRegistry.h - Include/ScriptCanvas/Asset/AssetRegistryBus.h Include/ScriptCanvas/Asset/ExecutionLogAsset.cpp - Include/ScriptCanvas/Asset/ExecutionLogAsset.h - Include/ScriptCanvas/Asset/ExecutionLogAssetBus.h Include/ScriptCanvas/Asset/RuntimeAsset.cpp - Include/ScriptCanvas/Asset/RuntimeAsset.h Include/ScriptCanvas/Asset/RuntimeAssetHandler.cpp - Include/ScriptCanvas/Asset/RuntimeAssetHandler.h - Include/ScriptCanvas/Asset/ScriptCanvasAssetBase.h - Include/ScriptCanvas/Asset/ScriptCanvasAssetData.h Include/ScriptCanvas/Asset/SubgraphInterfaceAssetHandler.cpp - Include/ScriptCanvas/Asset/SubgraphInterfaceAssetHandler.h - Include/ScriptCanvas/Core/ScriptCanvasBus.h Include/ScriptCanvas/Core/ExecutionNotificationsBus.cpp - Include/ScriptCanvas/Core/ExecutionNotificationsBus.h - Include/ScriptCanvas/Core/GraphBus.h - Include/ScriptCanvas/Core/NodeBus.h - Include/ScriptCanvas/Core/EBusNodeBus.h - Include/ScriptCanvas/Core/NodelingBus.h - Include/ScriptCanvas/Core/ContractBus.h - Include/ScriptCanvas/Core/Attributes.h Include/ScriptCanvas/Core/Connection.cpp - Include/ScriptCanvas/Core/Connection.h - Include/ScriptCanvas/Core/ConnectionBus.h Include/ScriptCanvas/Core/Contract.cpp - Include/ScriptCanvas/Core/Contract.h - Include/ScriptCanvas/Core/Contracts.h - Include/ScriptCanvas/Core/Contracts/MethodOverloadContract.h Include/ScriptCanvas/Core/Contracts/MethodOverloadContract.cpp - Include/ScriptCanvas/Core/Contracts/RestrictedNodeContract.h Include/ScriptCanvas/Core/Contracts/RestrictedNodeContract.cpp Include/ScriptCanvas/Core/Core.cpp - Include/ScriptCanvas/Core/Core.h Include/ScriptCanvas/Core/Datum.cpp - Include/ScriptCanvas/Core/Datum.h - Include/ScriptCanvas/Core/DatumBus.h - Include/ScriptCanvas/Core/EBusHandler.h Include/ScriptCanvas/Core/EBusHandler.cpp Include/ScriptCanvas/Core/Endpoint.cpp - Include/ScriptCanvas/Core/Endpoint.h Include/ScriptCanvas/Core/Graph.cpp - Include/ScriptCanvas/Core/Graph.h - Include/ScriptCanvas/Core/GraphData.h Include/ScriptCanvas/Core/GraphData.cpp - Include/ScriptCanvas/Core/GraphScopedTypes.h - Include/ScriptCanvas/Core/MethodConfiguration.h Include/ScriptCanvas/Core/MethodConfiguration.cpp Include/ScriptCanvas/Core/ModifiableDatumView.cpp - Include/ScriptCanvas/Core/ModifiableDatumView.h Include/ScriptCanvas/Core/Node.cpp - Include/ScriptCanvas/Core/Node.h Include/ScriptCanvas/Core/Nodeable.cpp - Include/ScriptCanvas/Core/Nodeable.h Include/ScriptCanvas/Core/NodeableNode.cpp - Include/ScriptCanvas/Core/NodeableNode.h Include/ScriptCanvas/Core/NodeableNodeOverloaded.cpp - Include/ScriptCanvas/Core/NodeableNodeOverloaded.h - Include/ScriptCanvas/Core/NodeFunctionGeneric.h - Include/ScriptCanvas/Core/SerializationListener.h Include/ScriptCanvas/Core/Slot.cpp - Include/ScriptCanvas/Core/Slot.h - Include/ScriptCanvas/Core/SlotConfigurationDefaults.h Include/ScriptCanvas/Core/SlotConfigurations.cpp - Include/ScriptCanvas/Core/SlotConfigurations.h Include/ScriptCanvas/Core/SlotExecutionMap.cpp - Include/ScriptCanvas/Core/SlotExecutionMap.h Include/ScriptCanvas/Core/SlotMetadata.cpp - Include/ScriptCanvas/Core/SlotMetadata.h - Include/ScriptCanvas/Core/SlotNames.h - Include/ScriptCanvas/Core/SubgraphInterface.h Include/ScriptCanvas/Core/SubgraphInterface.cpp - Include/ScriptCanvas/Core/SubgraphInterfaceUtility.h Include/ScriptCanvas/Core/SubgraphInterfaceUtility.cpp - Include/ScriptCanvas/Translation/AbstractModelTranslator.h - Include/ScriptCanvas/Translation/Configuration.h Include/ScriptCanvas/Translation/GraphToCPlusPlus.cpp - Include/ScriptCanvas/Translation/GraphToCPlusPlus.h - Include/ScriptCanvas/Translation/GraphToLua.h Include/ScriptCanvas/Translation/GraphToLua.cpp - Include/ScriptCanvas/Translation/GraphToLuaUtility.h Include/ScriptCanvas/Translation/GraphToLuaUtility.cpp - Include/ScriptCanvas/Translation/GraphToX.h Include/ScriptCanvas/Translation/GraphToX.cpp - Include/ScriptCanvas/Translation/Translation.h Include/ScriptCanvas/Translation/Translation.cpp - Include/ScriptCanvas/Translation/TranslationContext.h Include/ScriptCanvas/Translation/TranslationContext.cpp - Include/ScriptCanvas/Translation/TranslationResult.h Include/ScriptCanvas/Translation/TranslationResult.cpp - Include/ScriptCanvas/Translation/TranslationUtilities.h Include/ScriptCanvas/Translation/TranslationUtilities.cpp - Include/ScriptCanvas/PerformanceStatistician.h - Include/ScriptCanvas/PerformanceStatisticsBus.h - Include/ScriptCanvas/PerformanceTracker.h - Include/ScriptCanvas/AutoGen/ScriptCanvas_Macros.jinja - Include/ScriptCanvas/AutoGen/ScriptCanvas_Nodeable_Macros.jinja - Include/ScriptCanvas/AutoGen/ScriptCanvasGrammar_Header.jinja - Include/ScriptCanvas/AutoGen/ScriptCanvasGrammar_Source.jinja - Include/ScriptCanvas/AutoGen/ScriptCanvasNodeable_Header.jinja - Include/ScriptCanvas/AutoGen/ScriptCanvasNodeable_Source.jinja - Include/ScriptCanvas/CodeGen/NodeableCodegen.h Include/ScriptCanvas/Core/Contracts/ConnectionLimitContract.cpp - Include/ScriptCanvas/Core/Contracts/ConnectionLimitContract.h Include/ScriptCanvas/Core/Contracts/ContractRTTI.cpp - Include/ScriptCanvas/Core/Contracts/ContractRTTI.h Include/ScriptCanvas/Core/Contracts/DisallowReentrantExecutionContract.cpp - Include/ScriptCanvas/Core/Contracts/DisallowReentrantExecutionContract.h Include/ScriptCanvas/Core/Contracts/DisplayGroupConnectedSlotLimitContract.cpp - Include/ScriptCanvas/Core/Contracts/DisplayGroupConnectedSlotLimitContract.h Include/ScriptCanvas/Core/Contracts/DynamicTypeContract.cpp - Include/ScriptCanvas/Core/Contracts/DynamicTypeContract.h Include/ScriptCanvas/Core/Contracts/IsReferenceTypeContract.cpp - Include/ScriptCanvas/Core/Contracts/IsReferenceTypeContract.h Include/ScriptCanvas/Core/Contracts/MathOperatorContract.cpp - Include/ScriptCanvas/Core/Contracts/MathOperatorContract.h Include/ScriptCanvas/Core/Contracts/SlotTypeContract.cpp - Include/ScriptCanvas/Core/Contracts/SlotTypeContract.h Include/ScriptCanvas/Core/Contracts/SupportsMethodContract.cpp - Include/ScriptCanvas/Core/Contracts/SupportsMethodContract.h Include/ScriptCanvas/Core/Contracts/TypeContract.cpp - Include/ScriptCanvas/Core/Contracts/TypeContract.h Include/ScriptCanvas/Data/BehaviorContextObject.cpp - Include/ScriptCanvas/Data/BehaviorContextObject.h Include/ScriptCanvas/Data/BehaviorContextObjectPtr.cpp - Include/ScriptCanvas/Data/BehaviorContextObjectPtr.h Include/ScriptCanvas/Data/Data.cpp - Include/ScriptCanvas/Data/Data.h - Include/ScriptCanvas/Data/DataMacros.h Include/ScriptCanvas/Data/DataRegistry.cpp - Include/ScriptCanvas/Data/DataRegistry.h - Include/ScriptCanvas/Data/NumericData.h - Include/ScriptCanvas/Deprecated/VariableDatumBase.h Include/ScriptCanvas/Deprecated/VariableDatumBase.cpp - Include/ScriptCanvas/Deprecated/VariableDatum.h Include/ScriptCanvas/Deprecated/VariableDatum.cpp - Include/ScriptCanvas/Deprecated/VariableHelpers.h Include/ScriptCanvas/Deprecated/VariableHelpers.cpp - Include/ScriptCanvas/Execution/ErrorBus.h - Include/ScriptCanvas/Execution/ExecutionBus.h - Include/ScriptCanvas/Execution/ExecutionContext.h Include/ScriptCanvas/Execution/ExecutionContext.cpp - Include/ScriptCanvas/Execution/ExecutionObjectCloning.h Include/ScriptCanvas/Execution/ExecutionObjectCloning.cpp - Include/ScriptCanvas/Execution/ExecutionPerformanceTimer.h Include/ScriptCanvas/Execution/ExecutionPerformanceTimer.cpp - Include/ScriptCanvas/Execution/ExecutionState.h Include/ScriptCanvas/Execution/ExecutionState.cpp - Include/ScriptCanvas/Execution/ExecutionStateDeclarations.h - Include/ScriptCanvas/Execution/NativeHostDeclarations.h Include/ScriptCanvas/Execution/NativeHostDeclarations.cpp - Include/ScriptCanvas/Execution/NativeHostDefinitions.h Include/ScriptCanvas/Execution/NativeHostDefinitions.cpp - Include/ScriptCanvas/Execution/RuntimeComponent.h Include/ScriptCanvas/Execution/RuntimeComponent.cpp - Include/ScriptCanvas/Execution/Interpreted/ExecutionInterpretedAPI.h Include/ScriptCanvas/Execution/Interpreted/ExecutionInterpretedAPI.cpp - Include/ScriptCanvas/Execution/Interpreted/ExecutionInterpretedCloningAPI.h Include/ScriptCanvas/Execution/Interpreted/ExecutionInterpretedCloningAPI.cpp - Include/ScriptCanvas/Execution/Interpreted/ExecutionInterpretedDebugAPI.h Include/ScriptCanvas/Execution/Interpreted/ExecutionInterpretedDebugAPI.cpp - Include/ScriptCanvas/Execution/Interpreted/ExecutionInterpretedEBusAPI.h Include/ScriptCanvas/Execution/Interpreted/ExecutionInterpretedEBusAPI.cpp - Include/ScriptCanvas/Execution/Interpreted/ExecutionInterpretedOut.h Include/ScriptCanvas/Execution/Interpreted/ExecutionInterpretedOut.cpp - Include/ScriptCanvas/Execution/Interpreted/ExecutionStateInterpreted.h Include/ScriptCanvas/Execution/Interpreted/ExecutionStateInterpreted.cpp - Include/ScriptCanvas/Execution/Interpreted/ExecutionStateInterpretedPerActivation.h Include/ScriptCanvas/Execution/Interpreted/ExecutionStateInterpretedPerActivation.cpp - Include/ScriptCanvas/Execution/Interpreted/ExecutionStateInterpretedPure.h Include/ScriptCanvas/Execution/Interpreted/ExecutionStateInterpretedPure.cpp - Include/ScriptCanvas/Execution/Interpreted/ExecutionStateInterpretedSingleton.h Include/ScriptCanvas/Execution/Interpreted/ExecutionStateInterpretedSingleton.cpp - Include/ScriptCanvas/Execution/Interpreted/ExecutionStateInterpretedUtility.h Include/ScriptCanvas/Execution/Interpreted/ExecutionStateInterpretedUtility.cpp - Include/ScriptCanvas/Execution/NodeableOut/NodeableOutNative.h - Include/ScriptCanvas/Grammar/AbstractCodeModel.h Include/ScriptCanvas/Grammar/AbstractCodeModel.cpp - Include/ScriptCanvas/Grammar/DebugMap.h Include/ScriptCanvas/Grammar/DebugMap.cpp - Include/ScriptCanvas/Grammar/ExecutionTraversalListeners.h Include/ScriptCanvas/Grammar/ExecutionTraversalListeners.cpp - Include/ScriptCanvas/Grammar/ParsingMetaData.h Include/ScriptCanvas/Grammar/ParsingMetaData.cpp - Include/ScriptCanvas/Grammar/ParsingUtilities.h Include/ScriptCanvas/Grammar/ParsingUtilities.cpp - Include/ScriptCanvas/Grammar/Primitives.h Include/ScriptCanvas/Grammar/Primitives.cpp - Include/ScriptCanvas/Grammar/PrimitivesDeclarations.h Include/ScriptCanvas/Grammar/PrimitivesDeclarations.cpp Include/ScriptCanvas/Grammar/PrimitivesExecution.cpp - Include/ScriptCanvas/Grammar/PrimitivesExecution.h - Include/ScriptCanvas/Grammar/SymbolNames.h - Include/ScriptCanvas/Execution/ErrorBus.h Include/ScriptCanvas/Execution/ExecutionContext.cpp - Include/ScriptCanvas/Execution/ExecutionContext.h - Include/ScriptCanvas/Execution/ExecutionBus.h Include/ScriptCanvas/Execution/NativeHostDeclarations.cpp - Include/ScriptCanvas/Execution/NativeHostDeclarations.h Include/ScriptCanvas/Execution/NativeHostDefinitions.cpp - Include/ScriptCanvas/Execution/NativeHostDefinitions.h Include/ScriptCanvas/Execution/RuntimeComponent.cpp - Include/ScriptCanvas/Execution/RuntimeComponent.h Include/ScriptCanvas/Internal/Nodeables/BaseTimer.cpp - Include/ScriptCanvas/Internal/Nodeables/BaseTimer.h - Include/ScriptCanvas/Internal/Nodeables/BaseTimer.ScriptCanvasNodeable.xml Include/ScriptCanvas/Internal/Nodes/BaseTimerNode.cpp - Include/ScriptCanvas/Internal/Nodes/BaseTimerNode.h - Include/ScriptCanvas/Internal/Nodes/BaseTimerNode.ScriptCanvasGrammar.xml Include/ScriptCanvas/Internal/Nodes/ExpressionNodeBase.cpp - Include/ScriptCanvas/Internal/Nodes/ExpressionNodeBase.h - Include/ScriptCanvas/Internal/Nodes/ExpressionNodeBase.ScriptCanvasGrammar.xml Include/ScriptCanvas/Internal/Nodes/StringFormatted.cpp - Include/ScriptCanvas/Internal/Nodes/StringFormatted.h - Include/ScriptCanvas/Internal/Nodes/StringFormatted.ScriptCanvasGrammar.xml Include/ScriptCanvas/Grammar/AbstractCodeModel.cpp - Include/ScriptCanvas/Grammar/AbstractCodeModel.h - Include/ScriptCanvas/Libraries/Libraries.h Include/ScriptCanvas/Libraries/Libraries.cpp Include/ScriptCanvas/Libraries/Core/AzEventHandler.cpp - Include/ScriptCanvas/Libraries/Core/AzEventHandler.h - Include/ScriptCanvas/Libraries/Core/AzEventHandler.ScriptCanvasGrammar.xml Include/ScriptCanvas/Libraries/Core/BinaryOperator.cpp - Include/ScriptCanvas/Libraries/Core/BinaryOperator.h Include/ScriptCanvas/Libraries/Core/CoreNodes.cpp - Include/ScriptCanvas/Libraries/Core/CoreNodes.h - Include/ScriptCanvas/Libraries/Core/ContainerTypeReflection.h Include/ScriptCanvas/Libraries/Core/EBusEventHandler.cpp - Include/ScriptCanvas/Libraries/Core/EBusEventHandler.h - Include/ScriptCanvas/Libraries/Core/EBusEventHandler.ScriptCanvasGrammar.xml Include/ScriptCanvas/Libraries/Core/ExtractProperty.cpp - Include/ScriptCanvas/Libraries/Core/ExtractProperty.h - Include/ScriptCanvas/Libraries/Core/ExtractProperty.ScriptCanvasGrammar.xml - Include/ScriptCanvas/Libraries/Core/EventHandlerTranslationUtility.h Include/ScriptCanvas/Libraries/Core/EventHandlerTranslationUtility.cpp Include/ScriptCanvas/Libraries/Core/ForEach.cpp - Include/ScriptCanvas/Libraries/Core/ForEach.h - Include/ScriptCanvas/Libraries/Core/ForEach.ScriptCanvasGrammar.xml - Include/ScriptCanvas/Libraries/Core/FunctionBus.h Include/ScriptCanvas/Libraries/Core/FunctionCallNode.cpp - Include/ScriptCanvas/Libraries/Core/FunctionCallNode.h - Include/ScriptCanvas/Libraries/Core/FunctionCallNode.ScriptCanvasGrammar.xml - Include/ScriptCanvas/Libraries/Core/FunctionCallNodeIsOutOfDate.h Include/ScriptCanvas/Libraries/Core/FunctionCallNodeIsOutOfDate.cpp Include/ScriptCanvas/Libraries/Core/FunctionDefinitionNode.cpp - Include/ScriptCanvas/Libraries/Core/FunctionDefinitionNode.h - Include/ScriptCanvas/Libraries/Core/FunctionDefinitionNode.ScriptCanvasGrammar.xml Include/ScriptCanvas/Libraries/Core/GetVariable.cpp - Include/ScriptCanvas/Libraries/Core/GetVariable.h - Include/ScriptCanvas/Libraries/Core/GetVariable.ScriptCanvasGrammar.xml Include/ScriptCanvas/Libraries/Core/Method.cpp - Include/ScriptCanvas/Libraries/Core/Method.h Include/ScriptCanvas/Libraries/Core/MethodOverloaded.cpp - Include/ScriptCanvas/Libraries/Core/MethodOverloaded.h Include/ScriptCanvas/Libraries/Core/MethodUtility.cpp - Include/ScriptCanvas/Libraries/Core/MethodUtility.h Include/ScriptCanvas/Libraries/Core/Nodeling.cpp - Include/ScriptCanvas/Libraries/Core/Nodeling.h - Include/ScriptCanvas/Libraries/Core/Nodeling.ScriptCanvasGrammar.xml Include/ScriptCanvas/Libraries/Core/ReceiveScriptEvent.cpp - Include/ScriptCanvas/Libraries/Core/ReceiveScriptEvent.h - Include/ScriptCanvas/Libraries/Core/ReceiveScriptEvent.ScriptCanvasGrammar.xml Include/ScriptCanvas/Libraries/Core/Repeater.cpp - Include/ScriptCanvas/Libraries/Core/Repeater.h - Include/ScriptCanvas/Libraries/Core/Repeater.ScriptCanvasGrammar.xml - Include/ScriptCanvas/Libraries/Core/RepeaterNodeable.h Include/ScriptCanvas/Libraries/Core/RepeaterNodeable.cpp - Include/ScriptCanvas/Libraries/Core/RepeaterNodeable.ScriptCanvasNodeable.xml Include/ScriptCanvas/Libraries/Core/ScriptEventBase.cpp - Include/ScriptCanvas/Libraries/Core/ScriptEventBase.h - Include/ScriptCanvas/Libraries/Core/ScriptEventBase.ScriptCanvasGrammar.xml Include/ScriptCanvas/Libraries/Core/SendScriptEvent.cpp - Include/ScriptCanvas/Libraries/Core/SendScriptEvent.h - Include/ScriptCanvas/Libraries/Core/SendScriptEvent.ScriptCanvasGrammar.xml Include/ScriptCanvas/Libraries/Core/SetVariable.cpp - Include/ScriptCanvas/Libraries/Core/SetVariable.h - Include/ScriptCanvas/Libraries/Core/SetVariable.ScriptCanvasGrammar.xml - Include/ScriptCanvas/Libraries/Core/Start.h - Include/ScriptCanvas/Libraries/Core/Start.ScriptCanvasGrammar.xml Include/ScriptCanvas/Libraries/Core/UnaryOperator.cpp - Include/ScriptCanvas/Libraries/Core/UnaryOperator.h Include/ScriptCanvas/Libraries/Entity/Entity.cpp - Include/ScriptCanvas/Libraries/Entity/Entity.h - Include/ScriptCanvas/Libraries/Entity/EntityNodes.h Include/ScriptCanvas/Libraries/Entity/RotateMethod.cpp - Include/ScriptCanvas/Libraries/Entity/RotateMethod.h - Include/ScriptCanvas/Libraries/Logic/And.h Include/ScriptCanvas/Libraries/Logic/Any.cpp - Include/ScriptCanvas/Libraries/Logic/Any.h - Include/ScriptCanvas/Libraries/Logic/Any.ScriptCanvasGrammar.xml - Include/ScriptCanvas/Libraries/Logic/Break.h Include/ScriptCanvas/Libraries/Logic/Break.cpp - Include/ScriptCanvas/Libraries/Logic/Break.ScriptCanvasGrammar.xml Include/ScriptCanvas/Libraries/Logic/Cycle.cpp - Include/ScriptCanvas/Libraries/Logic/Cycle.h - Include/ScriptCanvas/Libraries/Logic/Cycle.ScriptCanvasGrammar.xml Include/ScriptCanvas/Libraries/Logic/Gate.cpp - Include/ScriptCanvas/Libraries/Logic/Gate.h - Include/ScriptCanvas/Libraries/Logic/Gate.ScriptCanvasGrammar.xml - Include/ScriptCanvas/Libraries/Logic/Indexer.h - Include/ScriptCanvas/Libraries/Logic/Indexer.ScriptCanvasGrammar.xml Include/ScriptCanvas/Libraries/Logic/IsNull.cpp - Include/ScriptCanvas/Libraries/Logic/IsNull.h - Include/ScriptCanvas/Libraries/Logic/IsNull.ScriptCanvasGrammar.xml Include/ScriptCanvas/Libraries/Logic/Logic.cpp - Include/ScriptCanvas/Libraries/Logic/Logic.h - Include/ScriptCanvas/Libraries/Logic/Multiplexer.h - Include/ScriptCanvas/Libraries/Logic/Multiplexer.ScriptCanvasGrammar.xml - Include/ScriptCanvas/Libraries/Logic/Not.h Include/ScriptCanvas/Libraries/Logic/Once.cpp - Include/ScriptCanvas/Libraries/Logic/Once.h - Include/ScriptCanvas/Libraries/Logic/Once.ScriptCanvasGrammar.xml - Include/ScriptCanvas/Libraries/Logic/Or.h Include/ScriptCanvas/Libraries/Logic/OrderedSequencer.cpp - Include/ScriptCanvas/Libraries/Logic/OrderedSequencer.h - Include/ScriptCanvas/Libraries/Logic/OrderedSequencer.ScriptCanvasGrammar.xml Include/ScriptCanvas/Libraries/Logic/Sequencer.cpp - Include/ScriptCanvas/Libraries/Logic/Sequencer.h - Include/ScriptCanvas/Libraries/Logic/Sequencer.ScriptCanvasGrammar.xml Include/ScriptCanvas/Libraries/Logic/TargetedSequencer.cpp - Include/ScriptCanvas/Libraries/Logic/TargetedSequencer.h - Include/ScriptCanvas/Libraries/Logic/TargetedSequencer.ScriptCanvasGrammar.xml Include/ScriptCanvas/Libraries/Logic/WeightedRandomSequencer.cpp - Include/ScriptCanvas/Libraries/Logic/WeightedRandomSequencer.h - Include/ScriptCanvas/Libraries/Logic/WeightedRandomSequencer.ScriptCanvasGrammar.xml Include/ScriptCanvas/Libraries/Logic/While.cpp - Include/ScriptCanvas/Libraries/Logic/While.h - Include/ScriptCanvas/Libraries/Logic/While.ScriptCanvasGrammar.xml - Include/ScriptCanvas/Libraries/Math/AABBNodes.h - Include/ScriptCanvas/Libraries/Math/ColorNodes.h - Include/ScriptCanvas/Libraries/Math/CRCNodes.h - Include/ScriptCanvas/Libraries/Math/Divide.h Include/ScriptCanvas/Libraries/Math/Math.cpp - Include/ScriptCanvas/Libraries/Math/Math.h Include/ScriptCanvas/Libraries/Math/MathExpression.cpp - Include/ScriptCanvas/Libraries/Math/MathExpression.h - Include/ScriptCanvas/Libraries/Math/MathExpression.ScriptCanvasGrammar.xml Include/ScriptCanvas/Libraries/Math/MathNodeUtilities.cpp - Include/ScriptCanvas/Libraries/Math/MathNodeUtilities.h - Include/ScriptCanvas/Libraries/Math/MathGenerics.h - Include/ScriptCanvas/Libraries/Math/MathRandom.h - Include/ScriptCanvas/Libraries/Math/Matrix3x3Nodes.h - Include/ScriptCanvas/Libraries/Math/Matrix4x4Nodes.h - Include/ScriptCanvas/Libraries/Math/Multiply.h - Include/ScriptCanvas/Libraries/Math/OBBNodes.h - Include/ScriptCanvas/Libraries/Math/PlaneNodes.h - Include/ScriptCanvas/Libraries/Math/RotationNodes.h - Include/ScriptCanvas/Libraries/Math/Subtract.h - Include/ScriptCanvas/Libraries/Math/Sum.h - Include/ScriptCanvas/Libraries/Math/TransformNodes.h - Include/ScriptCanvas/Libraries/Math/Vector2Nodes.h - Include/ScriptCanvas/Libraries/Math/Vector3Nodes.h - Include/ScriptCanvas/Libraries/Math/Vector4Nodes.h - Include/ScriptCanvas/Libraries/Comparison/Comparison.h Include/ScriptCanvas/Libraries/Comparison/Comparison.cpp - Include/ScriptCanvas/Libraries/Comparison/ComparisonFunctions.h - Include/ScriptCanvas/Libraries/Comparison/EqualTo.h - Include/ScriptCanvas/Libraries/Comparison/NotEqualTo.h - Include/ScriptCanvas/Libraries/Comparison/Less.h - Include/ScriptCanvas/Libraries/Comparison/Greater.h - Include/ScriptCanvas/Libraries/Comparison/LessEqual.h - Include/ScriptCanvas/Libraries/Comparison/GreaterEqual.h - Include/ScriptCanvas/Libraries/Time/Time.h Include/ScriptCanvas/Libraries/Time/Time.cpp Include/ScriptCanvas/Libraries/Time/Countdown.cpp - Include/ScriptCanvas/Libraries/Time/Countdown.h - Include/ScriptCanvas/Libraries/Time/Countdown.ScriptCanvasGrammar.xml - Include/ScriptCanvas/Libraries/Time/DelayNodeable.h Include/ScriptCanvas/Libraries/Time/DelayNodeable.cpp - Include/ScriptCanvas/Libraries/Time/DelayNodeable.ScriptCanvasNodeable.xml Include/ScriptCanvas/Libraries/Time/Duration.cpp - Include/ScriptCanvas/Libraries/Time/Duration.h - Include/ScriptCanvas/Libraries/Time/Duration.ScriptCanvasGrammar.xml Include/ScriptCanvas/Libraries/Time/HeartBeat.cpp - Include/ScriptCanvas/Libraries/Time/HeartBeat.h - Include/ScriptCanvas/Libraries/Time/HeartBeat.ScriptCanvasGrammar.xml Include/ScriptCanvas/Libraries/Time/Timer.cpp - Include/ScriptCanvas/Libraries/Time/Timer.h - Include/ScriptCanvas/Libraries/Time/Timer.ScriptCanvasGrammar.xml - Include/ScriptCanvas/Libraries/Time/TimeDelayNodeable.h Include/ScriptCanvas/Libraries/Time/TimeDelayNodeable.cpp - Include/ScriptCanvas/Libraries/Time/TimeDelayNodeable.ScriptCanvasNodeable.xml - Include/ScriptCanvas/Libraries/Time/DurationNodeable.h Include/ScriptCanvas/Libraries/Time/DurationNodeable.cpp - Include/ScriptCanvas/Libraries/Time/DurationNodeable.ScriptCanvasNodeable.xml - Include/ScriptCanvas/Libraries/Time/HeartBeatNodeable.h Include/ScriptCanvas/Libraries/Time/HeartBeatNodeable.cpp - Include/ScriptCanvas/Libraries/Time/HeartBeatNodeable.ScriptCanvasNodeable.xml - Include/ScriptCanvas/Libraries/Time/TimerNodeable.h Include/ScriptCanvas/Libraries/Time/TimerNodeable.cpp - Include/ScriptCanvas/Libraries/Time/TimerNodeable.ScriptCanvasNodeable.xml Include/ScriptCanvas/Libraries/Spawning/Spawning.cpp - Include/ScriptCanvas/Libraries/Spawning/Spawning.h Include/ScriptCanvas/Libraries/Spawning/SpawnNodeable.cpp - Include/ScriptCanvas/Libraries/Spawning/SpawnNodeable.h - Include/ScriptCanvas/Libraries/Spawning/SpawnNodeable.ScriptCanvasNodeable.xml Include/ScriptCanvas/Libraries/String/Contains.cpp - Include/ScriptCanvas/Libraries/String/Contains.h - Include/ScriptCanvas/Libraries/String/Contains.ScriptCanvasGrammar.xml Include/ScriptCanvas/Libraries/String/Format.cpp - Include/ScriptCanvas/Libraries/String/Format.h - Include/ScriptCanvas/Libraries/String/Format.ScriptCanvasGrammar.xml - Include/ScriptCanvas/Libraries/String/Print.h - Include/ScriptCanvas/Libraries/String/Print.ScriptCanvasGrammar.xml Include/ScriptCanvas/Libraries/String/Replace.cpp - Include/ScriptCanvas/Libraries/String/Replace.h - Include/ScriptCanvas/Libraries/String/Replace.ScriptCanvasGrammar.xml - Include/ScriptCanvas/Libraries/String/String.h Include/ScriptCanvas/Libraries/String/String.cpp - Include/ScriptCanvas/Libraries/String/StringMethods.h Include/ScriptCanvas/Libraries/String/StringMethods.cpp - Include/ScriptCanvas/Libraries/String/StringGenerics.h Include/ScriptCanvas/Libraries/String/Utilities.cpp - Include/ScriptCanvas/Libraries/String/Utilities.h - Include/ScriptCanvas/Libraries/String/Utilities.ScriptCanvasGrammar.xml Include/ScriptCanvas/Libraries/UnitTesting/AddFailure.cpp - Include/ScriptCanvas/Libraries/UnitTesting/AddFailure.h - Include/ScriptCanvas/Libraries/UnitTesting/AddFailure.ScriptCanvasGrammar.xml - Include/ScriptCanvas/Libraries/UnitTesting/AddSuccess.h - Include/ScriptCanvas/Libraries/UnitTesting/AddSuccess.ScriptCanvasGrammar.xml - Include/ScriptCanvas/Libraries/UnitTesting/Checkpoint.h - Include/ScriptCanvas/Libraries/UnitTesting/Checkpoint.ScriptCanvasGrammar.xml Include/ScriptCanvas/Libraries/UnitTesting/ExpectEqual.cpp - Include/ScriptCanvas/Libraries/UnitTesting/ExpectEqual.h - Include/ScriptCanvas/Libraries/UnitTesting/ExpectEqual.ScriptCanvasGrammar.xml Include/ScriptCanvas/Libraries/UnitTesting/ExpectFalse.cpp - Include/ScriptCanvas/Libraries/UnitTesting/ExpectFalse.h - Include/ScriptCanvas/Libraries/UnitTesting/ExpectFalse.ScriptCanvasGrammar.xml Include/ScriptCanvas/Libraries/UnitTesting/ExpectGreaterThan.cpp - Include/ScriptCanvas/Libraries/UnitTesting/ExpectGreaterThan.h - Include/ScriptCanvas/Libraries/UnitTesting/ExpectGreaterThan.ScriptCanvasGrammar.xml Include/ScriptCanvas/Libraries/UnitTesting/ExpectGreaterThanEqual.cpp - Include/ScriptCanvas/Libraries/UnitTesting/ExpectGreaterThanEqual.h - Include/ScriptCanvas/Libraries/UnitTesting/ExpectGreaterThanEqual.ScriptCanvasGrammar.xml Include/ScriptCanvas/Libraries/UnitTesting/ExpectLessThan.cpp - Include/ScriptCanvas/Libraries/UnitTesting/ExpectLessThan.h - Include/ScriptCanvas/Libraries/UnitTesting/ExpectLessThan.ScriptCanvasGrammar.xml Include/ScriptCanvas/Libraries/UnitTesting/ExpectLessThanEqual.cpp - Include/ScriptCanvas/Libraries/UnitTesting/ExpectLessThanEqual.h - Include/ScriptCanvas/Libraries/UnitTesting/ExpectLessThanEqual.ScriptCanvasGrammar.xml Include/ScriptCanvas/Libraries/UnitTesting/ExpectNotEqual.cpp - Include/ScriptCanvas/Libraries/UnitTesting/ExpectNotEqual.h - Include/ScriptCanvas/Libraries/UnitTesting/ExpectNotEqual.ScriptCanvasGrammar.xml Include/ScriptCanvas/Libraries/UnitTesting/ExpectTrue.cpp - Include/ScriptCanvas/Libraries/UnitTesting/ExpectTrue.h - Include/ScriptCanvas/Libraries/UnitTesting/ExpectTrue.ScriptCanvasGrammar.xml - Include/ScriptCanvas/Libraries/UnitTesting/MarkComplete.h - Include/ScriptCanvas/Libraries/UnitTesting/MarkComplete.ScriptCanvasGrammar.xml - Include/ScriptCanvas/Libraries/UnitTesting/UnitTestBus.h - Include/ScriptCanvas/Libraries/UnitTesting/UnitTestBusMacros.h Include/ScriptCanvas/Libraries/UnitTesting/UnitTesting.cpp - Include/ScriptCanvas/Libraries/UnitTesting/UnitTesting.h Include/ScriptCanvas/Libraries/UnitTesting/UnitTestingLibrary.cpp - Include/ScriptCanvas/Libraries/UnitTesting/UnitTestingLibrary.h Include/ScriptCanvas/Libraries/UnitTesting/Auxiliary/Auxiliary.cpp - Include/ScriptCanvas/Libraries/UnitTesting/Auxiliary/Auxiliary.h - Include/ScriptCanvas/Libraries/UnitTesting/Auxiliary/AuxiliaryGenerics.h - Include/ScriptCanvas/Libraries/UnitTesting/UnitTestBusSender.h Include/ScriptCanvas/Libraries/UnitTesting/UnitTestBusSender.cpp - Include/ScriptCanvas/Libraries/UnitTesting/UnitTestBusSenderMacros.h Include/ScriptCanvas/Libraries/Operators/Operators.cpp - Include/ScriptCanvas/Libraries/Operators/Operators.h Include/ScriptCanvas/Libraries/Operators/Operator.cpp - Include/ScriptCanvas/Libraries/Operators/Operator.h - Include/ScriptCanvas/Libraries/Operators/Operator.ScriptCanvasGrammar.xml Include/ScriptCanvas/Libraries/Operators/Containers/OperatorAt.cpp - Include/ScriptCanvas/Libraries/Operators/Containers/OperatorAt.h - Include/ScriptCanvas/Libraries/Operators/Containers/OperatorAt.ScriptCanvasGrammar.xml Include/ScriptCanvas/Libraries/Operators/Containers/OperatorBack.cpp - Include/ScriptCanvas/Libraries/Operators/Containers/OperatorBack.h - Include/ScriptCanvas/Libraries/Operators/Containers/OperatorBack.ScriptCanvasGrammar.xml Include/ScriptCanvas/Libraries/Operators/Containers/OperatorClear.cpp - Include/ScriptCanvas/Libraries/Operators/Containers/OperatorClear.h - Include/ScriptCanvas/Libraries/Operators/Containers/OperatorClear.ScriptCanvasGrammar.xml Include/ScriptCanvas/Libraries/Operators/Containers/OperatorEmpty.cpp - Include/ScriptCanvas/Libraries/Operators/Containers/OperatorEmpty.h - Include/ScriptCanvas/Libraries/Operators/Containers/OperatorEmpty.ScriptCanvasGrammar.xml Include/ScriptCanvas/Libraries/Operators/Containers/OperatorErase.cpp - Include/ScriptCanvas/Libraries/Operators/Containers/OperatorErase.h - Include/ScriptCanvas/Libraries/Operators/Containers/OperatorErase.ScriptCanvasGrammar.xml Include/ScriptCanvas/Libraries/Operators/Containers/OperatorFront.cpp - Include/ScriptCanvas/Libraries/Operators/Containers/OperatorFront.h - Include/ScriptCanvas/Libraries/Operators/Containers/OperatorFront.ScriptCanvasGrammar.xml Include/ScriptCanvas/Libraries/Operators/Containers/OperatorInsert.cpp - Include/ScriptCanvas/Libraries/Operators/Containers/OperatorInsert.h - Include/ScriptCanvas/Libraries/Operators/Containers/OperatorInsert.ScriptCanvasGrammar.xml Include/ScriptCanvas/Libraries/Operators/Containers/OperatorPushBack.cpp - Include/ScriptCanvas/Libraries/Operators/Containers/OperatorPushBack.h - Include/ScriptCanvas/Libraries/Operators/Containers/OperatorPushBack.ScriptCanvasGrammar.xml Include/ScriptCanvas/Libraries/Operators/Containers/OperatorSize.cpp - Include/ScriptCanvas/Libraries/Operators/Containers/OperatorSize.h - Include/ScriptCanvas/Libraries/Operators/Containers/OperatorSize.ScriptCanvasGrammar.xml Include/ScriptCanvas/Libraries/Operators/Math/OperatorAdd.cpp - Include/ScriptCanvas/Libraries/Operators/Math/OperatorAdd.h - Include/ScriptCanvas/Libraries/Operators/Math/OperatorAdd.ScriptCanvasGrammar.xml Include/ScriptCanvas/Libraries/Operators/Math/OperatorArithmetic.cpp - Include/ScriptCanvas/Libraries/Operators/Math/OperatorArithmetic.h - Include/ScriptCanvas/Libraries/Operators/Math/OperatorArithmetic.ScriptCanvasGrammar.xml Include/ScriptCanvas/Libraries/Operators/Math/OperatorDiv.cpp - Include/ScriptCanvas/Libraries/Operators/Math/OperatorDiv.h - Include/ScriptCanvas/Libraries/Operators/Math/OperatorDiv.ScriptCanvasGrammar.xml Include/ScriptCanvas/Libraries/Operators/Math/OperatorDivideByNumber.cpp - Include/ScriptCanvas/Libraries/Operators/Math/OperatorDivideByNumber.h - Include/ScriptCanvas/Libraries/Operators/Math/OperatorDivideByNumber.ScriptCanvasGrammar.xml Include/ScriptCanvas/Libraries/Operators/Math/OperatorLength.cpp - Include/ScriptCanvas/Libraries/Operators/Math/OperatorLength.h - Include/ScriptCanvas/Libraries/Operators/Math/OperatorLength.ScriptCanvasGrammar.xml Include/ScriptCanvas/Libraries/Operators/Math/OperatorLerp.cpp - Include/ScriptCanvas/Libraries/Operators/Math/OperatorLerp.h - Include/ScriptCanvas/Libraries/Operators/Math/OperatorLerp.ScriptCanvasGrammar.xml Include/ScriptCanvas/Libraries/Operators/Math/OperatorMul.cpp - Include/ScriptCanvas/Libraries/Operators/Math/OperatorMul.h - Include/ScriptCanvas/Libraries/Operators/Math/OperatorMul.ScriptCanvasGrammar.xml Include/ScriptCanvas/Libraries/Operators/Math/OperatorSub.cpp - Include/ScriptCanvas/Libraries/Operators/Math/OperatorSub.h - Include/ScriptCanvas/Libraries/Operators/Math/OperatorSub.ScriptCanvasGrammar.xml - Include/ScriptCanvas/Libraries/Operators/Math/OperatorLerpNodeable.h Include/ScriptCanvas/Libraries/Operators/Math/OperatorLerpNodeable.cpp - Include/ScriptCanvas/Libraries/Operators/Math/OperatorLerpNodeableNode.h Include/ScriptCanvas/Libraries/Operators/Math/OperatorLerpNodeableNode.cpp - Include/ScriptCanvas/Profiler/Driller.h - Include/ScriptCanvas/Profiler/Aggregator.h - Include/ScriptCanvas/Profiler/Aggregator.cpp - Include/ScriptCanvas/Profiler/DrillerEvents.h - Include/ScriptCanvas/Profiler/DrillerEvents.cpp - Include/ScriptCanvas/Serialization/BehaviorContextObjectSerializer.h Include/ScriptCanvas/Serialization/BehaviorContextObjectSerializer.cpp - Include/ScriptCanvas/Serialization/DatumSerializer.h Include/ScriptCanvas/Serialization/DatumSerializer.cpp - Include/ScriptCanvas/Serialization/RuntimeVariableSerializer.h Include/ScriptCanvas/Serialization/RuntimeVariableSerializer.cpp Include/ScriptCanvas/Data/DataTrait.cpp - Include/ScriptCanvas/Data/DataTrait.h Include/ScriptCanvas/Data/PropertyTraits.cpp - Include/ScriptCanvas/Data/PropertyTraits.h - Include/ScriptCanvas/Data/Traits.h - Include/ScriptCanvas/Variable/VariableBus.h - Include/ScriptCanvas/Variable/GraphVariable.h Include/ScriptCanvas/Variable/GraphVariable.cpp - Include/ScriptCanvas/Variable/GraphVariableManagerComponent.h Include/ScriptCanvas/Variable/GraphVariableManagerComponent.cpp - Include/ScriptCanvas/Variable/VariableCore.h Include/ScriptCanvas/Variable/VariableCore.cpp - Include/ScriptCanvas/Variable/VariableData.h Include/ScriptCanvas/Variable/VariableData.cpp - Include/ScriptCanvas/Utils/DataUtils.h Include/ScriptCanvas/Utils/DataUtils.cpp - Include/ScriptCanvas/Utils/NodeUtils.h Include/ScriptCanvas/Utils/NodeUtils.cpp - Include/ScriptCanvas/Utils/SerializationUtils.h - Include/ScriptCanvas/Utils/VersionConverters.h Include/ScriptCanvas/Utils/VersionConverters.cpp Include/ScriptCanvas/Utils/VersioningUtils.cpp Include/ScriptCanvas/Utils/VersioningUtils.cpp - Include/ScriptCanvas/Utils/BehaviorContextUtils.h Include/ScriptCanvas/Utils/BehaviorContextUtils.cpp -) - -set(SKIP_UNITY_BUILD_INCLUSION_FILES - Include/ScriptCanvas/Libraries/Core/FunctionCallNode.cpp - Include/ScriptCanvas/Libraries/Core/FunctionCallNode.h - Include/ScriptCanvas/Libraries/Core/FunctionCallNodeIsOutOfDate.h - Include/ScriptCanvas/Libraries/Core/FunctionCallNodeIsOutOfDate.cpp -) +) \ No newline at end of file diff --git a/Gems/ScriptCanvas/Code/scriptcanvasgem_editor_files.cmake b/Gems/ScriptCanvas/Code/scriptcanvasgem_editor_files.cmake index 609f7cd454..b2f98226b4 100644 --- a/Gems/ScriptCanvas/Code/scriptcanvasgem_editor_files.cmake +++ b/Gems/ScriptCanvas/Code/scriptcanvasgem_editor_files.cmake @@ -15,24 +15,10 @@ set(FILES Editor/SystemComponent.h Editor/SystemComponent.cpp Editor/QtMetaTypes.h - Editor/Assets/ScriptCanvasAssetTracker.cpp - Editor/Assets/ScriptCanvasAssetTracker.h - Editor/Assets/ScriptCanvasAssetTrackerBus.h Editor/Assets/ScriptCanvasAssetHelpers.h Editor/Assets/ScriptCanvasAssetHelpers.cpp - Editor/Assets/ScriptCanvasAssetTrackerDefinitions.h - Editor/Include/ScriptCanvas/Assets/ScriptCanvasBaseAssetData.h - Editor/Include/ScriptCanvas/Assets/ScriptCanvasBaseAssetData.cpp - Editor/Include/ScriptCanvas/Assets/ScriptCanvasAsset.h - Editor/Assets/ScriptCanvasAsset.cpp - Editor/Include/ScriptCanvas/Assets/ScriptCanvasAssetBus.h - Editor/Include/ScriptCanvas/Assets/ScriptCanvasAssetTypes.h - Editor/Include/ScriptCanvas/Assets/ScriptCanvasAssetHandler.h - Editor/Assets/ScriptCanvasAssetHandler.cpp - Editor/Assets/ScriptCanvasAssetHolder.h - Editor/Assets/ScriptCanvasAssetHolder.cpp - Editor/Assets/ScriptCanvasMemoryAsset.h - Editor/Assets/ScriptCanvasMemoryAsset.cpp + Editor/Include/ScriptCanvas/Assets/ScriptCanvasFileHandling.h + Editor/Assets/ScriptCanvasFileHandling.cpp Editor/Assets/ScriptCanvasUndoHelper.h Editor/Assets/ScriptCanvasUndoHelper.cpp Editor/Include/ScriptCanvas/Bus/RequestBus.h @@ -54,7 +40,11 @@ set(FILES Editor/Include/ScriptCanvas/Components/EditorGraphVariableManagerComponent.h Editor/Components/EditorGraphVariableManagerComponent.cpp Editor/Include/ScriptCanvas/Components/EditorScriptCanvasComponent.h + Editor/Include/ScriptCanvas/Components/EditorDeprecationData.h + Editor/Include/ScriptCanvas/Components/EditorDeprecationData.cpp Editor/Components/EditorScriptCanvasComponent.cpp + Editor/Include/ScriptCanvas/Components/EditorScriptCanvasComponentSerializer.h + Editor/Include/ScriptCanvas/Components/EditorScriptCanvasComponentSerializer.cpp Editor/Components/IconComponent.h Editor/Components/IconComponent.cpp Editor/Include/ScriptCanvas/GraphCanvas/DynamicSlotBus.h @@ -178,6 +168,8 @@ set(FILES Editor/View/Widgets/ScriptCanvasNodePaletteDockWidget.h Editor/View/Widgets/ScriptCanvasNodePaletteDockWidget.cpp Editor/View/Widgets/ScriptCanvasNodePaletteToolbar.ui + Editor/View/Widgets/SourceHandlePropertyAssetCtrl.h + Editor/View/Widgets/SourceHandlePropertyAssetCtrl.cpp Editor/View/Widgets/WidgetBus.h Editor/View/Widgets/DataTypePalette/DataTypePaletteModel.cpp Editor/View/Widgets/DataTypePalette/DataTypePaletteModel.h diff --git a/Gems/ScriptCanvas/Code/scriptcanvasgem_editor_tools_files.cmake b/Gems/ScriptCanvas/Code/scriptcanvasgem_editor_tools_files.cmake new file mode 100644 index 0000000000..d665a2c645 --- /dev/null +++ b/Gems/ScriptCanvas/Code/scriptcanvasgem_editor_tools_files.cmake @@ -0,0 +1,12 @@ +# +# Copyright (c) Contributors to the Open 3D Engine Project. +# For complete copyright and license terms please see the LICENSE at the root of this distribution. +# +# SPDX-License-Identifier: Apache-2.0 OR MIT +# +# + +set(FILES + Tools/TranslationGeneration.h + Tools/TranslationGeneration.cpp +) diff --git a/Gems/ScriptCanvas/Code/scriptcanvasgem_headers.cmake b/Gems/ScriptCanvas/Code/scriptcanvasgem_headers.cmake new file mode 100644 index 0000000000..9830535ad8 --- /dev/null +++ b/Gems/ScriptCanvas/Code/scriptcanvasgem_headers.cmake @@ -0,0 +1,373 @@ +# +# Copyright (c) Contributors to the Open 3D Engine Project. +# For complete copyright and license terms please see the LICENSE at the root of this distribution. +# +# SPDX-License-Identifier: Apache-2.0 OR MIT +# +# + +set(FILES + Include/ScriptCanvas/SystemComponent.h + Include/ScriptCanvas/ScriptCanvasGem.h + Include/ScriptCanvas/Asset/AssetDescription.h + Include/ScriptCanvas/Asset/AssetRegistry.h + Include/ScriptCanvas/Asset/AssetRegistryBus.h + Include/ScriptCanvas/Asset/ExecutionLogAsset.h + Include/ScriptCanvas/Asset/ExecutionLogAssetBus.h + Include/ScriptCanvas/Asset/RuntimeAsset.h + Include/ScriptCanvas/Asset/RuntimeAssetHandler.h + Include/ScriptCanvas/Asset/SubgraphInterfaceAssetHandler.h + Include/ScriptCanvas/Core/ScriptCanvasBus.h + Include/ScriptCanvas/Core/ExecutionNotificationsBus.h + Include/ScriptCanvas/Core/GraphBus.h + Include/ScriptCanvas/Core/NodeBus.h + Include/ScriptCanvas/Core/EBusNodeBus.h + Include/ScriptCanvas/Core/NodelingBus.h + Include/ScriptCanvas/Core/ContractBus.h + Include/ScriptCanvas/Core/Attributes.h + Include/ScriptCanvas/Core/Connection.h + Include/ScriptCanvas/Core/ConnectionBus.h + Include/ScriptCanvas/Core/Contract.h + Include/ScriptCanvas/Core/Contracts.h + Include/ScriptCanvas/Core/Contracts/MethodOverloadContract.h + Include/ScriptCanvas/Core/Contracts/RestrictedNodeContract.h + Include/ScriptCanvas/Core/Core.h + Include/ScriptCanvas/Core/Datum.h + Include/ScriptCanvas/Core/DatumBus.h + Include/ScriptCanvas/Core/EBusHandler.h + Include/ScriptCanvas/Core/Endpoint.h + Include/ScriptCanvas/Core/Graph.h + Include/ScriptCanvas/Core/GraphData.h + Include/ScriptCanvas/Core/GraphScopedTypes.h + Include/ScriptCanvas/Core/MethodConfiguration.h + Include/ScriptCanvas/Core/ModifiableDatumView.h + Include/ScriptCanvas/Core/Node.h + Include/ScriptCanvas/Core/Nodeable.h + Include/ScriptCanvas/Core/NodeableNode.h + Include/ScriptCanvas/Core/NodeableNodeOverloaded.h + Include/ScriptCanvas/Core/NodeFunctionGeneric.h + Include/ScriptCanvas/Core/SerializationListener.h + Include/ScriptCanvas/Core/Slot.h + Include/ScriptCanvas/Core/SlotConfigurationDefaults.h + Include/ScriptCanvas/Core/SlotConfigurations.h + Include/ScriptCanvas/Core/SlotExecutionMap.h + Include/ScriptCanvas/Core/SlotMetadata.h + Include/ScriptCanvas/Core/SlotNames.h + Include/ScriptCanvas/Core/SubgraphInterface.h + Include/ScriptCanvas/Core/SubgraphInterfaceUtility.h + Include/ScriptCanvas/Translation/AbstractModelTranslator.h + Include/ScriptCanvas/Translation/Configuration.h + Include/ScriptCanvas/Translation/GraphToCPlusPlus.h + Include/ScriptCanvas/Translation/GraphToLua.h + Include/ScriptCanvas/Translation/GraphToLuaUtility.h + Include/ScriptCanvas/Translation/GraphToX.h + Include/ScriptCanvas/Translation/Translation.h + Include/ScriptCanvas/Translation/TranslationContext.h + Include/ScriptCanvas/Translation/TranslationResult.h + Include/ScriptCanvas/Translation/TranslationUtilities.h + Include/ScriptCanvas/PerformanceStatistician.h + Include/ScriptCanvas/PerformanceStatisticsBus.h + Include/ScriptCanvas/PerformanceTracker.h + Include/ScriptCanvas/AutoGen/ScriptCanvas_Macros.jinja + Include/ScriptCanvas/AutoGen/ScriptCanvas_Nodeable_Macros.jinja + Include/ScriptCanvas/AutoGen/ScriptCanvasGrammar_Header.jinja + Include/ScriptCanvas/AutoGen/ScriptCanvasGrammar_Source.jinja + Include/ScriptCanvas/AutoGen/ScriptCanvasNodeable_Header.jinja + Include/ScriptCanvas/AutoGen/ScriptCanvasNodeable_Source.jinja + Include/ScriptCanvas/CodeGen/NodeableCodegen.h + Include/ScriptCanvas/Core/Contracts/ConnectionLimitContract.h + Include/ScriptCanvas/Core/Contracts/ContractRTTI.h + Include/ScriptCanvas/Core/Contracts/DisallowReentrantExecutionContract.h + Include/ScriptCanvas/Core/Contracts/DisplayGroupConnectedSlotLimitContract.h + Include/ScriptCanvas/Core/Contracts/DynamicTypeContract.h + Include/ScriptCanvas/Core/Contracts/IsReferenceTypeContract.h + Include/ScriptCanvas/Core/Contracts/MathOperatorContract.h + Include/ScriptCanvas/Core/Contracts/SlotTypeContract.h + Include/ScriptCanvas/Core/Contracts/SupportsMethodContract.h + Include/ScriptCanvas/Core/Contracts/TypeContract.h + Include/ScriptCanvas/Data/BehaviorContextObject.h + Include/ScriptCanvas/Data/BehaviorContextObjectPtr.h + Include/ScriptCanvas/Data/Data.h + Include/ScriptCanvas/Data/DataMacros.h + Include/ScriptCanvas/Data/DataRegistry.h + Include/ScriptCanvas/Data/NumericData.h + Include/ScriptCanvas/Deprecated/VariableDatumBase.h + Include/ScriptCanvas/Deprecated/VariableDatum.h + Include/ScriptCanvas/Deprecated/VariableHelpers.h + Include/ScriptCanvas/Execution/ErrorBus.h + Include/ScriptCanvas/Execution/ExecutionBus.h + Include/ScriptCanvas/Execution/ExecutionContext.h + Include/ScriptCanvas/Execution/ExecutionObjectCloning.h + Include/ScriptCanvas/Execution/ExecutionPerformanceTimer.h + Include/ScriptCanvas/Execution/ExecutionState.h + Include/ScriptCanvas/Execution/ExecutionStateDeclarations.h + Include/ScriptCanvas/Execution/NativeHostDeclarations.h + Include/ScriptCanvas/Execution/NativeHostDefinitions.h + Include/ScriptCanvas/Execution/RuntimeComponent.h + Include/ScriptCanvas/Execution/Interpreted/ExecutionInterpretedAPI.h + Include/ScriptCanvas/Execution/Interpreted/ExecutionInterpretedCloningAPI.h + Include/ScriptCanvas/Execution/Interpreted/ExecutionInterpretedDebugAPI.h + Include/ScriptCanvas/Execution/Interpreted/ExecutionInterpretedEBusAPI.h + Include/ScriptCanvas/Execution/Interpreted/ExecutionInterpretedOut.h + Include/ScriptCanvas/Execution/Interpreted/ExecutionStateInterpreted.h + Include/ScriptCanvas/Execution/Interpreted/ExecutionStateInterpretedPerActivation.h + Include/ScriptCanvas/Execution/Interpreted/ExecutionStateInterpretedPure.h + Include/ScriptCanvas/Execution/Interpreted/ExecutionStateInterpretedSingleton.h + Include/ScriptCanvas/Execution/Interpreted/ExecutionStateInterpretedUtility.h + Include/ScriptCanvas/Execution/NodeableOut/NodeableOutNative.h + Include/ScriptCanvas/Grammar/AbstractCodeModel.h + Include/ScriptCanvas/Grammar/DebugMap.h + Include/ScriptCanvas/Grammar/ExecutionTraversalListeners.h + Include/ScriptCanvas/Grammar/ParsingMetaData.h + Include/ScriptCanvas/Grammar/ParsingUtilities.h + Include/ScriptCanvas/Grammar/Primitives.h + Include/ScriptCanvas/Grammar/PrimitivesDeclarations.h + Include/ScriptCanvas/Grammar/PrimitivesExecution.h + Include/ScriptCanvas/Grammar/SymbolNames.h + Include/ScriptCanvas/Execution/ErrorBus.h + Include/ScriptCanvas/Execution/ExecutionContext.h + Include/ScriptCanvas/Execution/ExecutionBus.h + Include/ScriptCanvas/Execution/NativeHostDeclarations.h + Include/ScriptCanvas/Execution/NativeHostDefinitions.h + Include/ScriptCanvas/Execution/RuntimeComponent.h + Include/ScriptCanvas/Internal/Nodeables/BaseTimer.h + Include/ScriptCanvas/Internal/Nodeables/BaseTimer.ScriptCanvasNodeable.xml + Include/ScriptCanvas/Internal/Nodes/BaseTimerNode.h + Include/ScriptCanvas/Internal/Nodes/BaseTimerNode.ScriptCanvasGrammar.xml + Include/ScriptCanvas/Internal/Nodes/ExpressionNodeBase.h + Include/ScriptCanvas/Internal/Nodes/ExpressionNodeBase.ScriptCanvasGrammar.xml + Include/ScriptCanvas/Internal/Nodes/StringFormatted.h + Include/ScriptCanvas/Internal/Nodes/StringFormatted.ScriptCanvasGrammar.xml + Include/ScriptCanvas/Grammar/AbstractCodeModel.h + Include/ScriptCanvas/Libraries/Libraries.h + Include/ScriptCanvas/Libraries/Core/AzEventHandler.h + Include/ScriptCanvas/Libraries/Core/AzEventHandler.ScriptCanvasGrammar.xml + Include/ScriptCanvas/Libraries/Core/BinaryOperator.h + Include/ScriptCanvas/Libraries/Core/CoreNodes.h + Include/ScriptCanvas/Libraries/Core/ContainerTypeReflection.h + Include/ScriptCanvas/Libraries/Core/EBusEventHandler.h + Include/ScriptCanvas/Libraries/Core/EBusEventHandler.ScriptCanvasGrammar.xml + Include/ScriptCanvas/Libraries/Core/ExtractProperty.h + Include/ScriptCanvas/Libraries/Core/ExtractProperty.ScriptCanvasGrammar.xml + Include/ScriptCanvas/Libraries/Core/EventHandlerTranslationUtility.h + Include/ScriptCanvas/Libraries/Core/ForEach.h + Include/ScriptCanvas/Libraries/Core/ForEach.ScriptCanvasGrammar.xml + Include/ScriptCanvas/Libraries/Core/FunctionBus.h + Include/ScriptCanvas/Libraries/Core/FunctionCallNode.h + Include/ScriptCanvas/Libraries/Core/FunctionCallNode.ScriptCanvasGrammar.xml + Include/ScriptCanvas/Libraries/Core/FunctionCallNodeIsOutOfDate.h + Include/ScriptCanvas/Libraries/Core/FunctionDefinitionNode.h + Include/ScriptCanvas/Libraries/Core/FunctionDefinitionNode.ScriptCanvasGrammar.xml + Include/ScriptCanvas/Libraries/Core/GetVariable.h + Include/ScriptCanvas/Libraries/Core/GetVariable.ScriptCanvasGrammar.xml + Include/ScriptCanvas/Libraries/Core/Method.h + Include/ScriptCanvas/Libraries/Core/MethodOverloaded.h + Include/ScriptCanvas/Libraries/Core/MethodUtility.h + Include/ScriptCanvas/Libraries/Core/Nodeling.h + Include/ScriptCanvas/Libraries/Core/Nodeling.ScriptCanvasGrammar.xml + Include/ScriptCanvas/Libraries/Core/ReceiveScriptEvent.h + Include/ScriptCanvas/Libraries/Core/ReceiveScriptEvent.ScriptCanvasGrammar.xml + Include/ScriptCanvas/Libraries/Core/Repeater.h + Include/ScriptCanvas/Libraries/Core/Repeater.ScriptCanvasGrammar.xml + Include/ScriptCanvas/Libraries/Core/RepeaterNodeable.h + Include/ScriptCanvas/Libraries/Core/RepeaterNodeable.ScriptCanvasNodeable.xml + Include/ScriptCanvas/Libraries/Core/ScriptEventBase.h + Include/ScriptCanvas/Libraries/Core/ScriptEventBase.ScriptCanvasGrammar.xml + Include/ScriptCanvas/Libraries/Core/SendScriptEvent.h + Include/ScriptCanvas/Libraries/Core/SendScriptEvent.ScriptCanvasGrammar.xml + Include/ScriptCanvas/Libraries/Core/SetVariable.h + Include/ScriptCanvas/Libraries/Core/SetVariable.ScriptCanvasGrammar.xml + Include/ScriptCanvas/Libraries/Core/Start.h + Include/ScriptCanvas/Libraries/Core/Start.ScriptCanvasGrammar.xml + Include/ScriptCanvas/Libraries/Core/UnaryOperator.h + Include/ScriptCanvas/Libraries/Entity/Entity.h + Include/ScriptCanvas/Libraries/Entity/EntityNodes.h + Include/ScriptCanvas/Libraries/Entity/RotateMethod.h + Include/ScriptCanvas/Libraries/Logic/And.h + Include/ScriptCanvas/Libraries/Logic/Any.h + Include/ScriptCanvas/Libraries/Logic/Any.ScriptCanvasGrammar.xml + Include/ScriptCanvas/Libraries/Logic/Break.h + Include/ScriptCanvas/Libraries/Logic/Break.ScriptCanvasGrammar.xml + Include/ScriptCanvas/Libraries/Logic/Cycle.h + Include/ScriptCanvas/Libraries/Logic/Cycle.ScriptCanvasGrammar.xml + Include/ScriptCanvas/Libraries/Logic/Gate.h + Include/ScriptCanvas/Libraries/Logic/Gate.ScriptCanvasGrammar.xml + Include/ScriptCanvas/Libraries/Logic/Indexer.h + Include/ScriptCanvas/Libraries/Logic/Indexer.ScriptCanvasGrammar.xml + Include/ScriptCanvas/Libraries/Logic/IsNull.h + Include/ScriptCanvas/Libraries/Logic/IsNull.ScriptCanvasGrammar.xml + Include/ScriptCanvas/Libraries/Logic/Logic.h + Include/ScriptCanvas/Libraries/Logic/Multiplexer.h + Include/ScriptCanvas/Libraries/Logic/Multiplexer.ScriptCanvasGrammar.xml + Include/ScriptCanvas/Libraries/Logic/Not.h + Include/ScriptCanvas/Libraries/Logic/Once.h + Include/ScriptCanvas/Libraries/Logic/Once.ScriptCanvasGrammar.xml + Include/ScriptCanvas/Libraries/Logic/Or.h + Include/ScriptCanvas/Libraries/Logic/OrderedSequencer.h + Include/ScriptCanvas/Libraries/Logic/OrderedSequencer.ScriptCanvasGrammar.xml + Include/ScriptCanvas/Libraries/Logic/Sequencer.h + Include/ScriptCanvas/Libraries/Logic/Sequencer.ScriptCanvasGrammar.xml + Include/ScriptCanvas/Libraries/Logic/TargetedSequencer.h + Include/ScriptCanvas/Libraries/Logic/TargetedSequencer.ScriptCanvasGrammar.xml + Include/ScriptCanvas/Libraries/Logic/WeightedRandomSequencer.h + Include/ScriptCanvas/Libraries/Logic/WeightedRandomSequencer.ScriptCanvasGrammar.xml + Include/ScriptCanvas/Libraries/Logic/While.h + Include/ScriptCanvas/Libraries/Logic/While.ScriptCanvasGrammar.xml + Include/ScriptCanvas/Libraries/Math/AABBNodes.h + Include/ScriptCanvas/Libraries/Math/ColorNodes.h + Include/ScriptCanvas/Libraries/Math/CRCNodes.h + Include/ScriptCanvas/Libraries/Math/Divide.h + Include/ScriptCanvas/Libraries/Math/Math.h + Include/ScriptCanvas/Libraries/Math/MathExpression.h + Include/ScriptCanvas/Libraries/Math/MathExpression.ScriptCanvasGrammar.xml + Include/ScriptCanvas/Libraries/Math/MathNodeUtilities.h + Include/ScriptCanvas/Libraries/Math/MathGenerics.h + Include/ScriptCanvas/Libraries/Math/MathRandom.h + Include/ScriptCanvas/Libraries/Math/Matrix3x3Nodes.h + Include/ScriptCanvas/Libraries/Math/Matrix4x4Nodes.h + Include/ScriptCanvas/Libraries/Math/Multiply.h + Include/ScriptCanvas/Libraries/Math/OBBNodes.h + Include/ScriptCanvas/Libraries/Math/PlaneNodes.h + Include/ScriptCanvas/Libraries/Math/RotationNodes.h + Include/ScriptCanvas/Libraries/Math/Subtract.h + Include/ScriptCanvas/Libraries/Math/Sum.h + Include/ScriptCanvas/Libraries/Math/TransformNodes.h + Include/ScriptCanvas/Libraries/Math/Vector2Nodes.h + Include/ScriptCanvas/Libraries/Math/Vector3Nodes.h + Include/ScriptCanvas/Libraries/Math/Vector4Nodes.h + Include/ScriptCanvas/Libraries/Comparison/Comparison.h + Include/ScriptCanvas/Libraries/Comparison/ComparisonFunctions.h + Include/ScriptCanvas/Libraries/Comparison/EqualTo.h + Include/ScriptCanvas/Libraries/Comparison/NotEqualTo.h + Include/ScriptCanvas/Libraries/Comparison/Less.h + Include/ScriptCanvas/Libraries/Comparison/Greater.h + Include/ScriptCanvas/Libraries/Comparison/LessEqual.h + Include/ScriptCanvas/Libraries/Comparison/GreaterEqual.h + Include/ScriptCanvas/Libraries/Time/Time.h + Include/ScriptCanvas/Libraries/Time/Countdown.h + Include/ScriptCanvas/Libraries/Time/Countdown.ScriptCanvasGrammar.xml + Include/ScriptCanvas/Libraries/Time/DelayNodeable.h + Include/ScriptCanvas/Libraries/Time/DelayNodeable.ScriptCanvasNodeable.xml + Include/ScriptCanvas/Libraries/Time/Duration.h + Include/ScriptCanvas/Libraries/Time/Duration.ScriptCanvasGrammar.xml + Include/ScriptCanvas/Libraries/Time/HeartBeat.h + Include/ScriptCanvas/Libraries/Time/HeartBeat.ScriptCanvasGrammar.xml + Include/ScriptCanvas/Libraries/Time/Timer.h + Include/ScriptCanvas/Libraries/Time/Timer.ScriptCanvasGrammar.xml + Include/ScriptCanvas/Libraries/Time/TimeDelayNodeable.h + Include/ScriptCanvas/Libraries/Time/TimeDelayNodeable.ScriptCanvasNodeable.xml + Include/ScriptCanvas/Libraries/Time/DurationNodeable.h + Include/ScriptCanvas/Libraries/Time/DurationNodeable.ScriptCanvasNodeable.xml + Include/ScriptCanvas/Libraries/Time/HeartBeatNodeable.h + Include/ScriptCanvas/Libraries/Time/HeartBeatNodeable.ScriptCanvasNodeable.xml + Include/ScriptCanvas/Libraries/Time/TimerNodeable.h + Include/ScriptCanvas/Libraries/Time/TimerNodeable.ScriptCanvasNodeable.xml + Include/ScriptCanvas/Libraries/Spawning/Spawning.h + Include/ScriptCanvas/Libraries/Spawning/SpawnNodeable.h + Include/ScriptCanvas/Libraries/Spawning/SpawnNodeable.ScriptCanvasNodeable.xml + Include/ScriptCanvas/Libraries/String/Contains.h + Include/ScriptCanvas/Libraries/String/Contains.ScriptCanvasGrammar.xml + Include/ScriptCanvas/Libraries/String/Format.h + Include/ScriptCanvas/Libraries/String/Format.ScriptCanvasGrammar.xml + Include/ScriptCanvas/Libraries/String/Print.h + Include/ScriptCanvas/Libraries/String/Print.ScriptCanvasGrammar.xml + Include/ScriptCanvas/Libraries/String/Replace.h + Include/ScriptCanvas/Libraries/String/Replace.ScriptCanvasGrammar.xml + Include/ScriptCanvas/Libraries/String/String.h + Include/ScriptCanvas/Libraries/String/StringMethods.h + Include/ScriptCanvas/Libraries/String/StringGenerics.h + Include/ScriptCanvas/Libraries/String/Utilities.h + Include/ScriptCanvas/Libraries/String/Utilities.ScriptCanvasGrammar.xml + Include/ScriptCanvas/Libraries/UnitTesting/AddFailure.h + Include/ScriptCanvas/Libraries/UnitTesting/AddFailure.ScriptCanvasGrammar.xml + Include/ScriptCanvas/Libraries/UnitTesting/AddSuccess.h + Include/ScriptCanvas/Libraries/UnitTesting/AddSuccess.ScriptCanvasGrammar.xml + Include/ScriptCanvas/Libraries/UnitTesting/Checkpoint.h + Include/ScriptCanvas/Libraries/UnitTesting/Checkpoint.ScriptCanvasGrammar.xml + Include/ScriptCanvas/Libraries/UnitTesting/ExpectEqual.h + Include/ScriptCanvas/Libraries/UnitTesting/ExpectEqual.ScriptCanvasGrammar.xml + Include/ScriptCanvas/Libraries/UnitTesting/ExpectFalse.h + Include/ScriptCanvas/Libraries/UnitTesting/ExpectFalse.ScriptCanvasGrammar.xml + Include/ScriptCanvas/Libraries/UnitTesting/ExpectGreaterThan.h + Include/ScriptCanvas/Libraries/UnitTesting/ExpectGreaterThan.ScriptCanvasGrammar.xml + Include/ScriptCanvas/Libraries/UnitTesting/ExpectGreaterThanEqual.h + Include/ScriptCanvas/Libraries/UnitTesting/ExpectGreaterThanEqual.ScriptCanvasGrammar.xml + Include/ScriptCanvas/Libraries/UnitTesting/ExpectLessThan.h + Include/ScriptCanvas/Libraries/UnitTesting/ExpectLessThan.ScriptCanvasGrammar.xml + Include/ScriptCanvas/Libraries/UnitTesting/ExpectLessThanEqual.h + Include/ScriptCanvas/Libraries/UnitTesting/ExpectLessThanEqual.ScriptCanvasGrammar.xml + Include/ScriptCanvas/Libraries/UnitTesting/ExpectNotEqual.h + Include/ScriptCanvas/Libraries/UnitTesting/ExpectNotEqual.ScriptCanvasGrammar.xml + Include/ScriptCanvas/Libraries/UnitTesting/ExpectTrue.h + Include/ScriptCanvas/Libraries/UnitTesting/ExpectTrue.ScriptCanvasGrammar.xml + Include/ScriptCanvas/Libraries/UnitTesting/MarkComplete.h + Include/ScriptCanvas/Libraries/UnitTesting/MarkComplete.ScriptCanvasGrammar.xml + Include/ScriptCanvas/Libraries/UnitTesting/UnitTestBus.h + Include/ScriptCanvas/Libraries/UnitTesting/UnitTestBusMacros.h + Include/ScriptCanvas/Libraries/UnitTesting/UnitTesting.h + Include/ScriptCanvas/Libraries/UnitTesting/UnitTestingLibrary.h + Include/ScriptCanvas/Libraries/UnitTesting/Auxiliary/Auxiliary.h + Include/ScriptCanvas/Libraries/UnitTesting/Auxiliary/AuxiliaryGenerics.h + Include/ScriptCanvas/Libraries/UnitTesting/UnitTestBusSender.h + Include/ScriptCanvas/Libraries/UnitTesting/UnitTestBusSenderMacros.h + Include/ScriptCanvas/Libraries/Operators/Operators.h + Include/ScriptCanvas/Libraries/Operators/Operator.h + Include/ScriptCanvas/Libraries/Operators/Operator.ScriptCanvasGrammar.xml + Include/ScriptCanvas/Libraries/Operators/Containers/OperatorAt.h + Include/ScriptCanvas/Libraries/Operators/Containers/OperatorAt.ScriptCanvasGrammar.xml + Include/ScriptCanvas/Libraries/Operators/Containers/OperatorBack.h + Include/ScriptCanvas/Libraries/Operators/Containers/OperatorBack.ScriptCanvasGrammar.xml + Include/ScriptCanvas/Libraries/Operators/Containers/OperatorClear.h + Include/ScriptCanvas/Libraries/Operators/Containers/OperatorClear.ScriptCanvasGrammar.xml + Include/ScriptCanvas/Libraries/Operators/Containers/OperatorEmpty.h + Include/ScriptCanvas/Libraries/Operators/Containers/OperatorEmpty.ScriptCanvasGrammar.xml + Include/ScriptCanvas/Libraries/Operators/Containers/OperatorErase.h + Include/ScriptCanvas/Libraries/Operators/Containers/OperatorErase.ScriptCanvasGrammar.xml + Include/ScriptCanvas/Libraries/Operators/Containers/OperatorFront.h + Include/ScriptCanvas/Libraries/Operators/Containers/OperatorFront.ScriptCanvasGrammar.xml + Include/ScriptCanvas/Libraries/Operators/Containers/OperatorInsert.h + Include/ScriptCanvas/Libraries/Operators/Containers/OperatorInsert.ScriptCanvasGrammar.xml + Include/ScriptCanvas/Libraries/Operators/Containers/OperatorPushBack.h + Include/ScriptCanvas/Libraries/Operators/Containers/OperatorPushBack.ScriptCanvasGrammar.xml + Include/ScriptCanvas/Libraries/Operators/Containers/OperatorSize.h + Include/ScriptCanvas/Libraries/Operators/Containers/OperatorSize.ScriptCanvasGrammar.xml + Include/ScriptCanvas/Libraries/Operators/Math/OperatorAdd.h + Include/ScriptCanvas/Libraries/Operators/Math/OperatorAdd.ScriptCanvasGrammar.xml + Include/ScriptCanvas/Libraries/Operators/Math/OperatorArithmetic.h + Include/ScriptCanvas/Libraries/Operators/Math/OperatorArithmetic.ScriptCanvasGrammar.xml + Include/ScriptCanvas/Libraries/Operators/Math/OperatorDiv.h + Include/ScriptCanvas/Libraries/Operators/Math/OperatorDiv.ScriptCanvasGrammar.xml + Include/ScriptCanvas/Libraries/Operators/Math/OperatorDivideByNumber.h + Include/ScriptCanvas/Libraries/Operators/Math/OperatorDivideByNumber.ScriptCanvasGrammar.xml + Include/ScriptCanvas/Libraries/Operators/Math/OperatorLength.h + Include/ScriptCanvas/Libraries/Operators/Math/OperatorLength.ScriptCanvasGrammar.xml + Include/ScriptCanvas/Libraries/Operators/Math/OperatorLerp.h + Include/ScriptCanvas/Libraries/Operators/Math/OperatorLerp.ScriptCanvasGrammar.xml + Include/ScriptCanvas/Libraries/Operators/Math/OperatorMul.h + Include/ScriptCanvas/Libraries/Operators/Math/OperatorMul.ScriptCanvasGrammar.xml + Include/ScriptCanvas/Libraries/Operators/Math/OperatorSub.h + Include/ScriptCanvas/Libraries/Operators/Math/OperatorSub.ScriptCanvasGrammar.xml + Include/ScriptCanvas/Libraries/Operators/Math/OperatorLerpNodeable.h + Include/ScriptCanvas/Libraries/Operators/Math/OperatorLerpNodeableNode.h + Include/ScriptCanvas/Serialization/BehaviorContextObjectSerializer.h + Include/ScriptCanvas/Serialization/DatumSerializer.h + Include/ScriptCanvas/Serialization/RuntimeVariableSerializer.h + Include/ScriptCanvas/Data/DataTrait.h + Include/ScriptCanvas/Data/PropertyTraits.h + Include/ScriptCanvas/Data/Traits.h + Include/ScriptCanvas/Variable/VariableBus.h + Include/ScriptCanvas/Variable/GraphVariable.h + Include/ScriptCanvas/Variable/GraphVariableManagerComponent.h + Include/ScriptCanvas/Variable/VariableCore.h + Include/ScriptCanvas/Variable/VariableData.h + Include/ScriptCanvas/Utils/DataUtils.h + Include/ScriptCanvas/Utils/NodeUtils.h + Include/ScriptCanvas/Utils/SerializationUtils.h + Include/ScriptCanvas/Utils/VersionConverters.h + Include/ScriptCanvas/Utils/BehaviorContextUtils.h +) + +set(SKIP_UNITY_BUILD_INCLUSION_FILES + Include/ScriptCanvas/Libraries/Core/FunctionCallNode.h + Include/ScriptCanvas/Libraries/Core/FunctionCallNodeIsOutOfDate.h +) diff --git a/Gems/ScriptCanvas/Registry/AssetProcessorPlatformConfig.setreg b/Gems/ScriptCanvas/Registry/AssetProcessorPlatformConfig.setreg new file mode 100644 index 0000000000..be8841986a --- /dev/null +++ b/Gems/ScriptCanvas/Registry/AssetProcessorPlatformConfig.setreg @@ -0,0 +1,13 @@ +{ + "Amazon": { + "AssetProcessor": { + "Settings": { + "RC names": { + "glob": "*.names", + "params": "copy", + "productAssetType": "{6A1A3B00-3DF2-4297-96BB-3BA067A978E6}" + } + } + } + } +} diff --git a/Gems/ScriptCanvas/gem.json b/Gems/ScriptCanvas/gem.json index 621ea42961..fc8a504917 100644 --- a/Gems/ScriptCanvas/gem.json +++ b/Gems/ScriptCanvas/gem.json @@ -2,6 +2,7 @@ "gem_name": "ScriptCanvas", "display_name": "Script Canvas", "license": "Apache-2.0 Or MIT", + "license_url": "https://github.com/o3de/o3de/blob/development/LICENSE.txt", "origin": "Open 3D Engine - o3de.org", "type": "Tool", "summary": "The Script Canvas Gem provides Open 3D Engine's visual scripting environment, Script Canvas.", diff --git a/Gems/ScriptCanvasDeveloper/Code/CMakeLists.txt b/Gems/ScriptCanvasDeveloper/Code/CMakeLists.txt index dd785306a5..6271531e97 100644 --- a/Gems/ScriptCanvasDeveloper/Code/CMakeLists.txt +++ b/Gems/ScriptCanvasDeveloper/Code/CMakeLists.txt @@ -8,7 +8,6 @@ set(SCRIPT_CANVAS_DEV_COMMON_DEFINES SCRIPTCANVASDEVELOPER - NOT_USE_CRY_MEMORY_MANAGER AZCORE_ENABLE_MEMORY_TRACKING ) diff --git a/Gems/ScriptCanvasDeveloper/Code/Editor/Include/ScriptCanvasDeveloperEditor/TSGenerateAction.h b/Gems/ScriptCanvasDeveloper/Code/Editor/Include/ScriptCanvasDeveloperEditor/TSGenerateAction.h index 64d3aeab5c..87847d71b0 100644 --- a/Gems/ScriptCanvasDeveloper/Code/Editor/Include/ScriptCanvasDeveloperEditor/TSGenerateAction.h +++ b/Gems/ScriptCanvasDeveloper/Code/Editor/Include/ScriptCanvasDeveloperEditor/TSGenerateAction.h @@ -8,13 +8,12 @@ #pragma once -class QAction; +class QWidget; class QMenu; +class QAction; namespace ScriptCanvasDeveloperEditor { - namespace TSGenerateAction - { - QAction* SetupTSFileAction(QMenu* mainWindow); - }; + //! The Qt action for translation database options + QAction* TranslationDatabaseFileAction(QMenu* mainMenu, QWidget* mainWindow); } diff --git a/Gems/ScriptCanvasDeveloper/Code/Editor/Source/ScriptCanvasDeveloperEditorComponent.cpp b/Gems/ScriptCanvasDeveloper/Code/Editor/Source/ScriptCanvasDeveloperEditorComponent.cpp index 6e8e8a7c6d..9193556624 100644 --- a/Gems/ScriptCanvasDeveloper/Code/Editor/Source/ScriptCanvasDeveloperEditorComponent.cpp +++ b/Gems/ScriptCanvasDeveloper/Code/Editor/Source/ScriptCanvasDeveloperEditorComponent.cpp @@ -99,10 +99,11 @@ namespace ScriptCanvasDeveloperEditor developerMenu->addSeparator(); NodeListDumpAction::CreateNodeListDumpAction(developerMenu); - TSGenerateAction::SetupTSFileAction(developerMenu); developerMenu->addSeparator(); + TranslationDatabaseFileAction(developerMenu, mainWindow); + QAction* action = developerMenu->addAction("Open Menu Test"); QObject::connect(action, &QAction::triggered, [mainWindow]() diff --git a/Gems/ScriptCanvasDeveloper/Code/Editor/Source/TSGenerateAction.cpp b/Gems/ScriptCanvasDeveloper/Code/Editor/Source/TSGenerateAction.cpp index 191d987555..75cf7e5392 100644 --- a/Gems/ScriptCanvasDeveloper/Code/Editor/Source/TSGenerateAction.cpp +++ b/Gems/ScriptCanvasDeveloper/Code/Editor/Source/TSGenerateAction.cpp @@ -6,434 +6,60 @@ * */ - -#include -#include -#include -#include -#include - -#include -#include -#include -#include -#include - +#if !defined(Q_MOC_RUN) +#include #include -#include -#include -#include +#include #include +#include +#include +#include +#endif + +#include namespace ScriptCanvasDeveloperEditor { - namespace TSGenerateAction + void ReloadText(QWidget*) { - void GenerateTSFile(); - void DumpBehaviorContextMethods(const XMLDocPtr& doc); - void DumpBehaviorContextEbuses(const XMLDocPtr& doc); - void DumpBehaviorContextEBusHandlers(const XMLDocPtr& doc, AZ::BehaviorEBus* ebus, const AZStd::string& categoryName); - bool StartContext(const XMLDocPtr& doc, const AZStd::string& contextType, const AZStd::string& contextName, const AZStd::string& toolTip, const AZStd::string& categoryName, bool addContextTypeToKey= false); - void AddMessageNode(const XMLDocPtr& doc, const AZStd::string& classorbusName, const AZStd::string& eventormethodName, const AZStd::string& toolTip, const AZStd::string& categoryName, const AZ::BehaviorEBusHandler::BusForwarderEvent& event); - void AddMessageNode(const XMLDocPtr& doc, const AZStd::string& classorbusName, const AZStd::string& eventormethodName, const AZStd::string& toolTip, const AZStd::string& categoryName, const AZ::BehaviorMethod* method); - - QAction* SetupTSFileAction(QMenu* mainMenu) - { - QAction* qAction = nullptr; - - if (mainMenu) - { - qAction = mainMenu->addAction(QAction::tr("Create EBus Localization File")); - qAction->setAutoRepeat(false); - qAction->setToolTip("Creates a QT .TS file of all EBus nodes(their inputs and outputs) to a file in the current folder."); - qAction->setShortcut(QKeySequence(QAction::tr("Ctrl+Alt+X", "Debug|Build EBus .TS file"))); - - QObject::connect(qAction, &QAction::triggered, &GenerateTSFile); - } - - return qAction; - } - - void GenerateTSFile() - { - auto translationScriptPath = AZ::IO::FixedMaxPath(AZ::Utils::GetEnginePath()) / - "Assets" / "Editor" / "Translation" / "scriptcanvas_en_us.ts"; - - XMLDocPtr tsDoc(XMLDoc::LoadFromDisk(translationScriptPath.c_str())); - - if (tsDoc == nullptr) - { - tsDoc = XMLDoc::Alloc("ScriptCanvas"); - } - - DumpBehaviorContextMethods(tsDoc); - DumpBehaviorContextEbuses(tsDoc); - - tsDoc->WriteToDisk(translationScriptPath.c_str()); - } - - void DumpBehaviorContextMethods(const XMLDocPtr& doc) - { - AZ::SerializeContext* serializeContext{}; - AZ::ComponentApplicationBus::BroadcastResult(serializeContext, &AZ::ComponentApplicationRequests::GetSerializeContext); - - AZ::BehaviorContext* behaviorContext{}; - AZ::ComponentApplicationBus::BroadcastResult(behaviorContext, &AZ::ComponentApplicationRequests::GetBehaviorContext); - - if (serializeContext == nullptr || behaviorContext == nullptr) - { - return; - } - - for (const auto& classIter : behaviorContext->m_classes) - { - const AZ::BehaviorClass* behaviorClass = classIter.second; - - // Check for "ignore" attribute for ScriptCanvas - auto excludeClassAttributeData = azdynamic_cast*>(AZ::FindAttribute(AZ::Script::Attributes::ExcludeFrom, behaviorClass->m_attributes)); - const bool excludeClass = excludeClassAttributeData && static_cast(excludeClassAttributeData->Get(nullptr)) & static_cast(AZ::Script::Attributes::ExcludeFlags::Documentation); - if (excludeClass) - { - continue; // skip this class - } - - AZStd::string categoryName; - if (auto categoryAttribute = azrtti_cast*>(AZ::FindAttribute(AZ::Script::Attributes::Category, behaviorClass->m_attributes))) - { - categoryName = categoryAttribute->Get(nullptr); - } - - AZStd::string methodToolTip; - if (auto methodToolTipAttribute = azrtti_cast*>(AZ::FindAttribute(AZ::Script::Attributes::ToolTip, behaviorClass->m_attributes))) - { - methodToolTip = methodToolTipAttribute->Get(nullptr); - } - - bool addContext = false; - - for (auto methodPair : behaviorClass->m_methods) - { - // Check for "ignore" attribute for ScriptCanvas - auto excludeMethodAttributeData = azdynamic_cast*>(AZ::FindAttribute(AZ::Script::Attributes::ExcludeFrom, methodPair.second->m_attributes)); - const bool excludeMethod = excludeMethodAttributeData && static_cast(excludeMethodAttributeData->Get(nullptr)) & static_cast(AZ::Script::Attributes::ExcludeFlags::Documentation); - if (excludeMethod) - { - continue; // skip this method - } - - if( !addContext ) - { - StartContext(doc, "Method", classIter.first, methodToolTip, categoryName); - addContext = true; - } - - AZStd::string toolTip; - if (auto toolTipAttribute = azrtti_cast*>(AZ::FindAttribute(AZ::Script::Attributes::ToolTip, methodPair.second->m_attributes))) - { - toolTip = toolTipAttribute->Get(nullptr); - } - - AZStd::string nodeCategoryName; - if (auto attribute = azrtti_cast*>(AZ::FindAttribute(AZ::Script::Attributes::Category, methodPair.second->m_attributes))) - { - nodeCategoryName = attribute->Get(nullptr); - } - - AddMessageNode(doc, classIter.first, methodPair.first, toolTip, nodeCategoryName, methodPair.second); - } - } - } - - void DumpBehaviorContextEbuses(const XMLDocPtr& doc) - { - AZ::SerializeContext* serializeContext{}; - AZ::ComponentApplicationBus::BroadcastResult(serializeContext, &AZ::ComponentApplicationRequests::GetSerializeContext); - - AZ::BehaviorContext* behaviorContext{}; - AZ::ComponentApplicationBus::BroadcastResult(behaviorContext, &AZ::ComponentApplicationRequests::GetBehaviorContext); - - if (serializeContext == nullptr || behaviorContext == nullptr) - { - return; - } - - // We will skip buses that are ONLY registered on classes that derive from EditorComponentBase, - // because they don't have a runtime implementation. Buses such as the TransformComponent which - // is implemented by both an EditorComponentBase derived class and a Component derived class - // will still appear - AZStd::unordered_set skipBuses; - AZStd::unordered_set potentialSkipBuses; - AZStd::unordered_set nonSkipBuses; - - for (const auto& classIter : behaviorContext->m_classes) - { - const AZ::BehaviorClass* behaviorClass = classIter.second; - - // Check for "ignore" attribute for ScriptCanvas - auto excludeClassAttributeData = azdynamic_cast*>(AZ::FindAttribute(AZ::Script::Attributes::ExcludeFrom, behaviorClass->m_attributes)); - const bool excludeClass = excludeClassAttributeData && static_cast(excludeClassAttributeData->Get(nullptr)) & static_cast(AZ::Script::Attributes::ExcludeFlags::Documentation); - if (excludeClass) - { - for (const auto& requestBus : behaviorClass->m_requestBuses) - { - skipBuses.insert(AZ::Crc32(requestBus.c_str())); - } - continue; // skip this class - } - - auto baseClass = AZStd::find(behaviorClass->m_baseClasses.begin(), - behaviorClass->m_baseClasses.end(), - AzToolsFramework::Components::EditorComponentBase::TYPEINFO_Uuid()); - - if (baseClass != behaviorClass->m_baseClasses.end()) - { - for (const auto& requestBus : behaviorClass->m_requestBuses) - { - potentialSkipBuses.insert(AZ::Crc32(requestBus.c_str())); - } - } - // If the Ebus does not inherit from EditorComponentBase then do not skip it - else - { - for (const auto& requestBus : behaviorClass->m_requestBuses) - { - nonSkipBuses.insert(AZ::Crc32(requestBus.c_str())); - } - } - } - - // Add buses which are not on the non-skip list to the skipBuses set - for (auto potentialSkipBus : potentialSkipBuses) - { - if (nonSkipBuses.find(potentialSkipBus) == nonSkipBuses.end()) - { - skipBuses.insert(potentialSkipBus); - } - } - - for (const auto& ebusIter : behaviorContext->m_ebuses) - { - bool addContext = false; - AZ::BehaviorEBus* ebus = ebusIter.second; - - if (ebus == nullptr) - { - continue; - } - - auto excludeEbusAttributeData = azdynamic_cast*>(AZ::FindAttribute(AZ::Script::Attributes::ExcludeFrom, ebusIter.second->m_attributes)); - const bool excludeBus = excludeEbusAttributeData && static_cast(excludeEbusAttributeData->Get(nullptr)) & static_cast(AZ::Script::Attributes::ExcludeFlags::Documentation); - - auto skipBusIterator = skipBuses.find(AZ::Crc32(ebusIter.first.c_str())); - if (!ebus || skipBusIterator != skipBuses.end() || excludeBus) - { - continue; - } - - AZStd::string categoryName; - if (auto categoryAttribute = azrtti_cast*>(AZ::FindAttribute(AZ::Script::Attributes::Category, ebus->m_attributes))) - { - auto categoryAttribName = categoryAttribute->Get(nullptr); - - if (categoryAttribName != nullptr) - { - categoryName = categoryAttribName; - } - } - - DumpBehaviorContextEBusHandlers(doc, ebus, categoryName); - - for (const auto& eventIter : ebus->m_events) - { - const AZ::BehaviorMethod* const method = (eventIter.second.m_event != nullptr) ? eventIter.second.m_event : eventIter.second.m_broadcast; - if (!method || AZ::FindAttribute(AZ::Script::Attributes::ExcludeFrom, eventIter.second.m_attributes)) - { - continue; - } - - if( !addContext ) - { - StartContext(doc, "EBus", ebusIter.first, ebusIter.second->m_toolTip, categoryName); - addContext = true; - } - - AZStd::string toolTip; - if (auto toolTipAttribute = azrtti_cast*>(AZ::FindAttribute(AZ::Script::Attributes::ToolTip, eventIter.second.m_attributes))) - { - toolTip = toolTipAttribute->Get(nullptr); - } - - AZStd::string nodeCategoryName; - if (auto attribute = azrtti_cast*>(AZ::FindAttribute(AZ::Script::Attributes::Category, eventIter.second.m_attributes))) - { - nodeCategoryName = attribute->Get(nullptr); - } - - AddMessageNode(doc, ebusIter.first, eventIter.first, toolTip, nodeCategoryName, method); - } - } - } - - void DumpBehaviorContextEBusHandlers(const XMLDocPtr& doc, AZ::BehaviorEBus* ebus, const AZStd::string& categoryName) - { - if (!ebus) - { - return; - } - - if (!ebus->m_createHandler || !ebus->m_destroyHandler) - { - return; - } - - AZ::BehaviorContext* behaviorContext{}; - AZ::ComponentApplicationBus::BroadcastResult(behaviorContext, &AZ::ComponentApplicationRequests::GetBehaviorContext); - - bool addContext = false; - - AZ::BehaviorEBusHandler* handler(nullptr); - if (ebus->m_createHandler->InvokeResult(handler)) - { - for (const AZ::BehaviorEBusHandler::BusForwarderEvent& event : handler->GetEvents()) - { - if (!addContext) - { - StartContext(doc, "Handler", ebus->m_name, ebus->m_toolTip, categoryName, true); - addContext = true; - } - - AddMessageNode(doc, ebus->m_name, event.m_name, "", categoryName, event); - } - - ebus->m_destroyHandler->Invoke(handler); // Destroys the Created EbusHandler - } - } - - AZStd::string GetBaseID(const AZStd::string& classorbusName, const AZStd::string& eventormethodName) - { - AZStd::string p1(classorbusName); - AZStd::string p2(eventormethodName); - - AZStd::to_upper(p1.begin(), p1.end()); - AZStd::to_upper(p2.begin(), p2.end()); - - return p1 + "_" + p2; - } - - void AddCommonNodeElements(const XMLDocPtr& doc, const AZStd::string& baseID, const AZStd::string& classorbusName, const AZStd::string& eventormethodName, const AZStd::string& toolTip, const AZStd::string& categoryName) - { - doc->AddToContext(baseID + "_NAME", eventormethodName, AZStd::string::format("Class/Bus: %s Event/Method: %s", classorbusName.c_str(), eventormethodName.c_str())); - doc->AddToContext(baseID + "_TOOLTIP", toolTip); - doc->AddToContext(baseID + "_CATEGORY", categoryName); - doc->AddToContext(baseID + "_OUT_NAME"); - doc->AddToContext(baseID + "_OUT_TOOLTIP"); - doc->AddToContext(baseID + "_IN_NAME"); - doc->AddToContext(baseID + "_IN_TOOLTIP"); - } - - void AddResultElements(const XMLDocPtr& doc, const AZStd::string& baseID, const AZ::Uuid& typeId, const AZStd::string& name, const AZStd::string& toolTip) - { - ScriptCanvas::Data::Type outputType(ScriptCanvas::Data::FromAZType(typeId)); - - doc->AddToContext(baseID + "_OUTPUT0_NAME", ScriptCanvas::Data::GetName(outputType), "C++ Type: " + name); - doc->AddToContext(baseID + "_OUTPUT0_TOOLTIP", toolTip); - } - - void AddParameterElements(const XMLDocPtr& doc, const AZStd::string& baseID, size_t index, const AZ::Uuid& typeId, const AZStd::string& argName, const AZStd::string& argToolTip, const AZStd::string& cppType) - { - AZStd::string paramID(AZStd::string::format("%s_PARAM%zu_", baseID.c_str(), index)); - - ScriptCanvas::Data::Type outputType(ScriptCanvas::Data::FromAZType(typeId)); - - doc->AddToContext(paramID + "NAME", argName, AZStd::string::format("Simple Type: %s C++ Type: %s", ScriptCanvas::Data::GetName(outputType).c_str(), cppType.c_str())); - doc->AddToContext(paramID + "TOOLTIP", argToolTip); - } - - void AddOutputElements(const XMLDocPtr& doc, const AZStd::string& baseID, size_t index, const AZ::Uuid& typeId, const AZStd::string& argName, const AZStd::string& argToolTip, const AZStd::string& cppType) - { - AZStd::string paramID(AZStd::string::format("%s_OUTPUT%zu_", baseID.c_str(), index)); - - ScriptCanvas::Data::Type outputType(ScriptCanvas::Data::FromAZType(typeId)); - - doc->AddToContext(paramID + "NAME", argName, AZStd::string::format("Simple Type: %s C++ Type: %s", ScriptCanvas::Data::GetName(outputType).c_str(), cppType.c_str())); - doc->AddToContext(paramID + "TOOLTIP", argToolTip); - } - - bool StartContext(const XMLDocPtr& doc, const AZStd::string& contextType, const AZStd::string& contextName, const AZStd::string& toolTip, const AZStd::string& categoryName, bool addContextTypeToKey/* = false*/) - { - bool isNewContext = doc->StartContext(contextType + ": " + contextName); - - if( isNewContext ) - { - AZStd::string p1(contextName); - - if(addContextTypeToKey) - { - p1 = contextType + "_" + p1; - } - - p1 += "_"; - - AZStd::to_upper(p1.begin(), p1.end()); - - doc->AddToContext(p1 + "NAME", contextName); - doc->AddToContext(p1 + "TOOLTIP", toolTip); - doc->AddToContext(p1 + "CATEGORY", categoryName); - } - - return isNewContext; - } - - void AddMessageNode(const XMLDocPtr& doc, const AZStd::string& classorbusName, const AZStd::string& eventormethodName, const AZStd::string& toolTip, const AZStd::string& categoryName, const AZ::BehaviorEBusHandler::BusForwarderEvent& event) - { - AZStd::string baseID( "HANDLER_" + GetBaseID(classorbusName, eventormethodName)); - - if( !doc->MethodFamilyExists(baseID) ) - { - AddCommonNodeElements(doc, baseID, classorbusName, eventormethodName, toolTip, categoryName); - - if ( event.HasResult() ) - { - const AZStd::string name = event.m_metadataParameters[AZ::eBehaviorBusForwarderEventIndices::Result].m_name.empty() ? event.m_parameters[AZ::eBehaviorBusForwarderEventIndices::Result].m_name : event.m_parameters[AZ::eBehaviorBusForwarderEventIndices::Result].m_name; - - AddParameterElements(doc, baseID, 0, event.m_parameters[AZ::eBehaviorBusForwarderEventIndices::Result].m_typeId, name, event.m_metadataParameters[AZ::eBehaviorBusForwarderEventIndices::Result].m_toolTip, ""); - - AZ_TracePrintf("ScriptCanvas", "EBusHandler Index: 0 CategoryName: %s Ebus: %s Event: %s Name: %s", categoryName.c_str(), classorbusName.c_str(), eventormethodName.c_str(), name.c_str()); - } - - size_t outputIndex = 0; - for (size_t i = AZ::eBehaviorBusForwarderEventIndices::ParameterFirst; i < event.m_parameters.size(); ++i) - { - const AZ::BehaviorParameter& argParam = event.m_parameters[i]; - - AddOutputElements(doc, baseID, outputIndex++, argParam.m_typeId, event.m_metadataParameters[i].m_name, event.m_metadataParameters[i].m_toolTip, argParam.m_name); - } - } - } - - void AddMessageNode(const XMLDocPtr& doc, const AZStd::string& classorbusName, const AZStd::string& eventormethodName, const AZStd::string& toolTip, const AZStd::string& categoryName, const AZ::BehaviorMethod* method) - { - AZStd::string baseID( GetBaseID(classorbusName, eventormethodName) ); - - if (!doc->MethodFamilyExists(baseID)) - { - AddCommonNodeElements(doc, baseID, classorbusName, eventormethodName, toolTip, categoryName); - - const auto result = method->HasResult() ? method->GetResult() : nullptr; - if (result) - { - AddResultElements(doc, baseID, result->m_typeId, result->m_name, ""); - } - - size_t start = method->HasBusId() ? 1 : 0; - for (size_t i = start; i < method->GetNumArguments(); ++i) - { - if (const AZ::BehaviorParameter* argument = method->GetArgument(i)) - { - AddParameterElements(doc, baseID, i-start, argument->m_typeId, *method->GetArgumentName(i), *method->GetArgumentToolTip(i), argument->m_name); - } - } - } - } + GraphCanvas::TranslationRequestBus::Broadcast(&GraphCanvas::TranslationRequests::Restore); } -} + + QAction* TranslationDatabaseFileAction(QMenu* mainMenu, QWidget* mainWindow) + { + QAction* qAction = nullptr; + + if (mainWindow) + { + qAction = mainMenu->addAction(QAction::tr("Reload Text")); + qAction->setAutoRepeat(false); + qAction->setToolTip("Reloads all the text data used by Script Canvas for titles, tooltips, etc."); + qAction->setShortcut(QAction::tr("Ctrl+Alt+R", "Developer|Reload Text")); + QObject::connect(qAction, &QAction::triggered, [mainWindow]() { ReloadText(mainWindow); }); + + qAction = mainMenu->addAction(QAction::tr("Dump Translation Database")); + qAction->setAutoRepeat(false); + qAction->setShortcut(QAction::tr("Ctrl+Alt+L", "Developer|Dump Translation Database")); + QObject::connect( + qAction, &QAction::triggered, + [mainWindow]() + { + QString defaultPath = QStandardPaths::writableLocation(QStandardPaths::DocumentsLocation); + QString directory = QFileDialog::getExistingDirectory(mainWindow, + QObject::tr("Select output folder for sc_translation.log file"), defaultPath); + if (!directory.isEmpty()) + { + const QString path = QDir::toNativeSeparators(directory + "/sc_translation.log"); + GraphCanvas::TranslationRequestBus::Broadcast(&GraphCanvas::TranslationRequests::DumpDatabase, path.toUtf8().constData()); + QMessageBox::information( + mainWindow, QObject::tr("Finished writing translation database"), + QObject::tr("Translation database written to:
%1").arg(path)); + } + }); + + } + + return qAction; + } + +} // ScriptCanvasDeveloperEditor diff --git a/Gems/ScriptCanvasDeveloper/Code/scriptcanvasdeveloper_gem_editor_files.cmake b/Gems/ScriptCanvasDeveloper/Code/scriptcanvasdeveloper_gem_editor_files.cmake index 4ba5ea2714..1d34b5484a 100644 --- a/Gems/ScriptCanvasDeveloper/Code/scriptcanvasdeveloper_gem_editor_files.cmake +++ b/Gems/ScriptCanvasDeveloper/Code/scriptcanvasdeveloper_gem_editor_files.cmake @@ -7,6 +7,8 @@ # set(FILES + +# EditorAutomation Editor/Include/ScriptCanvasDeveloperEditor/EditorAutomation/EditorAutomationAction.h Editor/Include/ScriptCanvasDeveloperEditor/EditorAutomation/EditorAutomationModelIds.h Editor/Include/ScriptCanvasDeveloperEditor/EditorAutomation/EditorAutomationTest.h @@ -27,6 +29,8 @@ set(FILES Editor/Include/ScriptCanvasDeveloperEditor/EditorAutomation/EditorAutomationStates/GraphStates.h Editor/Include/ScriptCanvasDeveloperEditor/EditorAutomation/EditorAutomationStates/UtilityStates.h Editor/Include/ScriptCanvasDeveloperEditor/EditorAutomation/EditorAutomationStates/VariableStates.h + +# Includes Editor/Include/ScriptCanvasDeveloperEditor/Developer.h Editor/Include/ScriptCanvasDeveloperEditor/DeveloperUtils.h Editor/Include/ScriptCanvasDeveloperEditor/ScriptCanvasDeveloperEditorComponent.h @@ -37,6 +41,8 @@ set(FILES Editor/Include/ScriptCanvasDeveloperEditor/WrapperMock.h Editor/Include/ScriptCanvasDeveloperEditor/AutomationActions/DynamicSlotFullCreation.h Editor/Include/ScriptCanvasDeveloperEditor/AutomationActions/VariableListFullCreation.h + +# Source Editor/Source/Developer.cpp Editor/Source/DeveloperUtils.cpp Editor/Source/EditorAutomationTestDialog.h @@ -49,9 +55,13 @@ set(FILES Editor/Source/WrapperMock.cpp Editor/Source/XMLDoc.cpp Editor/Source/XMLDoc.h + +# AutomationActions Editor/Source/AutomationActions/DynamicSlotFullCreation.cpp Editor/Source/AutomationActions/NodePaletteFullCreation.cpp Editor/Source/AutomationActions/VariableListFullCreation.cpp + +# EditorAutomation Editor/Source/EditorAutomation/EditorAutomationTest.cpp Editor/Source/EditorAutomation/EditorAutomationActions/ScriptCanvasActions/ConnectionActions.cpp Editor/Source/EditorAutomation/EditorAutomationActions/ScriptCanvasActions/CreateElementsActions.cpp @@ -70,6 +80,8 @@ set(FILES Editor/Source/EditorAutomation/EditorAutomationStates/GraphStates.cpp Editor/Source/EditorAutomation/EditorAutomationStates/UtilityStates.cpp Editor/Source/EditorAutomation/EditorAutomationStates/VariableStates.cpp + +# EditorAutomationTests Editor/Source/EditorAutomationTests/EditorAutomationTests.h Editor/Source/EditorAutomationTests/GraphCreationTests.h Editor/Source/EditorAutomationTests/GraphCreationTests.cpp diff --git a/Gems/ScriptCanvasDeveloper/gem.json b/Gems/ScriptCanvasDeveloper/gem.json index ee1bfcec84..fe1fdea0fc 100644 --- a/Gems/ScriptCanvasDeveloper/gem.json +++ b/Gems/ScriptCanvasDeveloper/gem.json @@ -1,7 +1,8 @@ { - "gem_name": "ScriptCanvasDeveloperGem", + "gem_name": "ScriptCanvasDeveloper", "display_name": "Script Canvas Developer", "license": "Apache-2.0 Or MIT", + "license_url": "https://github.com/o3de/o3de/blob/development/LICENSE.txt", "origin": "Open 3D Engine - o3de.org", "type": "Tool", "summary": "The Script Canvas Developer Gem provides a suite of utility features for the development and debugging of Script Canvas systems.", diff --git a/Gems/ScriptCanvasPhysics/Code/CMakeLists.txt b/Gems/ScriptCanvasPhysics/Code/CMakeLists.txt index ac25c7275b..0d25959066 100644 --- a/Gems/ScriptCanvasPhysics/Code/CMakeLists.txt +++ b/Gems/ScriptCanvasPhysics/Code/CMakeLists.txt @@ -32,7 +32,7 @@ ly_add_target( PRIVATE Legacy::CryCommon Gem::ScriptCanvasPhysics.Static - Gem::ScriptCanvas + Gem::ScriptCanvas.API ) # By default, the above module is used by all application types, however, the module depends at runtime to ScriptCanvas diff --git a/Gems/ScriptCanvasPhysics/Code/Source/WorldNodes.h b/Gems/ScriptCanvasPhysics/Code/Source/WorldNodes.h index c84435e505..96a15a9d29 100644 --- a/Gems/ScriptCanvasPhysics/Code/Source/WorldNodes.h +++ b/Gems/ScriptCanvasPhysics/Code/Source/WorldNodes.h @@ -60,7 +60,7 @@ namespace ScriptCanvasPhysics AZStd::vector /*list of entityIds*/ >; - static const char* k_categoryName = "PhysX/World"; + static constexpr const char* k_categoryName = "PhysX/World"; AZ_INLINE Result RayCastWorldSpaceWithGroup(const AZ::Vector3& start, const AZ::Vector3& direction, diff --git a/Gems/ScriptCanvasPhysics/gem.json b/Gems/ScriptCanvasPhysics/gem.json index 417fa6893a..2e35e85c46 100644 --- a/Gems/ScriptCanvasPhysics/gem.json +++ b/Gems/ScriptCanvasPhysics/gem.json @@ -2,6 +2,7 @@ "gem_name": "ScriptCanvasPhysics", "display_name": "Script Canvas Physics", "license": "Apache-2.0 Or MIT", + "license_url": "https://github.com/o3de/o3de/blob/development/LICENSE.txt", "origin": "Open 3D Engine - o3de.org", "type": "Code", "summary": "The Script Canvas Physics Gem provides Script Canvas nodes for physics scene queries such as raycasts.", diff --git a/Gems/ScriptCanvasTesting/Assets/ScriptCanvas/UnitTests/LY_SC_UnitTest_NodeableDelay.scriptcanvas b/Gems/ScriptCanvasTesting/Assets/ScriptCanvas/UnitTests/LY_SC_UnitTest_NodeableDelay.scriptcanvas index a5d22135c7..b9ccf8d42b 100644 --- a/Gems/ScriptCanvasTesting/Assets/ScriptCanvas/UnitTests/LY_SC_UnitTest_NodeableDelay.scriptcanvas +++ b/Gems/ScriptCanvasTesting/Assets/ScriptCanvas/UnitTests/LY_SC_UnitTest_NodeableDelay.scriptcanvas @@ -1,3436 +1,2173 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +{ + "Type": "JsonSerialization", + "Version": 1, + "ClassName": "ScriptCanvasData", + "ClassData": { + "m_scriptCanvas": { + "Id": { + "id": 7992795709152 + }, + "Name": "LY_SC_UnitTest_NodeableDelay", + "Components": { + "Component_[13769957497174641973]": { + "$type": "EditorGraphVariableManagerComponent", + "Id": 13769957497174641973, + "m_variableData": { + "m_nameVariableMap": [ + { + "Key": { + "m_id": "{13A4B0B3-756F-403C-A9E0-CC40DA27EE2C}" + }, + "Value": { + "Datum": { + "isOverloadedStorage": false, + "scriptCanvasType": { + "m_type": 3 + }, + "isNullPointer": false, + "$type": "double", + "value": 2.0, + "label": "Number" + }, + "VariableId": { + "m_id": "{13A4B0B3-756F-403C-A9E0-CC40DA27EE2C}" + }, + "VariableName": "Two" + } + }, + { + "Key": { + "m_id": "{A3A19E5B-D7BE-46D4-B876-9832C1D26D0B}" + }, + "Value": { + "Datum": { + "isOverloadedStorage": false, + "scriptCanvasType": { + "m_type": 3 + }, + "isNullPointer": false, + "$type": "double", + "value": 1.0, + "label": "Number" + }, + "VariableId": { + "m_id": "{A3A19E5B-D7BE-46D4-B876-9832C1D26D0B}" + }, + "VariableName": "One" + } + }, + { + "Key": { + "m_id": "{AD81163D-DA91-4E66-AE45-ADEDC64CAAF0}" + }, + "Value": { + "Datum": { + "isOverloadedStorage": false, + "scriptCanvasType": { + "m_type": 0 + }, + "isNullPointer": false, + "$type": "bool", + "value": true, + "label": "Boolean" + }, + "VariableId": { + "m_id": "{AD81163D-DA91-4E66-AE45-ADEDC64CAAF0}" + }, + "VariableName": "Switch" + } + } + ] + }, + "CopiedVariableRemapping": [ + { + "Key": { + "m_id": "{53E25781-037F-4D34-905C-0151A205EC74}" + }, + "Value": { + "m_id": "{AD81163D-DA91-4E66-AE45-ADEDC64CAAF0}" + } + }, + { + "Key": { + "m_id": "{6ACE5B7C-104E-4B49-8386-8718283621A5}" + }, + "Value": { + "m_id": "{A3A19E5B-D7BE-46D4-B876-9832C1D26D0B}" + } + }, + { + "Key": { + "m_id": "{DA754EF7-9F41-46E5-A603-751C5AECABC1}" + }, + "Value": { + "m_id": "{13A4B0B3-756F-403C-A9E0-CC40DA27EE2C}" + } + } + ] + }, + "Component_[6702463496795695700]": { + "$type": "{4D755CA9-AB92-462C-B24F-0B3376F19967} Graph", + "Id": 6702463496795695700, + "m_graphData": { + "m_nodes": [ + { + "Id": { + "id": 8022860480224 + }, + "Name": "SC Node(GetVariable)", + "Components": { + "Component_[10003864966711545946]": { + "$type": "GetVariableNode", + "Id": 10003864966711545946, + "Slots": [ + { + "id": { + "m_id": "{8650478F-4E17-40B5-B13C-E8C02A524201}" + }, + "contracts": [ + { + "$type": "SlotTypeContract" + } + ], + "slotName": "In", + "toolTip": "When signaled sends the property referenced by this node to a Data Output slot", + "Descriptor": { + "ConnectionType": 1, + "SlotType": 1 + } + }, + { + "id": { + "m_id": "{273B6C2E-CBE7-479A-B6C6-4CC6E51636B6}" + }, + "contracts": [ + { + "$type": "SlotTypeContract" + } + ], + "slotName": "Out", + "toolTip": "Signaled after the referenced property has been pushed to the Data Output slot", + "Descriptor": { + "ConnectionType": 2, + "SlotType": 1 + } + }, + { + "id": { + "m_id": "{12714A1C-FDCF-4A0C-8127-1B6B17A804CC}" + }, + "contracts": [ + { + "$type": "SlotTypeContract" + } + ], + "slotName": "Number", + "DisplayDataType": { + "m_type": 3 + }, + "Descriptor": { + "ConnectionType": 2, + "SlotType": 2 + }, + "DataType": 1 + } + ], + "m_variableId": { + "m_id": "{A3A19E5B-D7BE-46D4-B876-9832C1D26D0B}" + }, + "m_variableDataOutSlotId": { + "m_id": "{12714A1C-FDCF-4A0C-8127-1B6B17A804CC}" + } + } + } + }, + { + "Id": { + "id": 8005680611040 + }, + "Name": "SC-Node(Mark Complete)", + "Components": { + "Component_[1561479662366255748]": { + "$type": "{E42861BD-1956-45AE-8DD7-CCFC1E3E5ACF} Method", + "Id": 1561479662366255748, + "Slots": [ + { + "isVisibile": false, + "id": { + "m_id": "{C1E634E4-B55F-46D0-95EB-B3947D5E99ED}" + }, + "contracts": [ + { + "$type": "SlotTypeContract" + }, + null + ], + "slotName": "EntityID: 0", + "Descriptor": { + "ConnectionType": 1, + "SlotType": 2 + }, + "DataType": 1 + }, + { + "id": { + "m_id": "{A585F499-C8AE-4B8A-9EB2-46C95DA2BFC8}" + }, + "contracts": [ + { + "$type": "SlotTypeContract" + }, + null + ], + "slotName": "Report", + "toolTip": "additional notes for the test report", + "Descriptor": { + "ConnectionType": 1, + "SlotType": 2 + }, + "DataType": 1 + }, + { + "id": { + "m_id": "{1A41311D-2629-4A55-8469-AB6EA8F8E00F}" + }, + "contracts": [ + { + "$type": "SlotTypeContract" + } + ], + "slotName": "In", + "Descriptor": { + "ConnectionType": 1, + "SlotType": 1 + } + }, + { + "id": { + "m_id": "{B0C71D36-F38C-48FC-80B7-58641E38A45F}" + }, + "contracts": [ + { + "$type": "SlotTypeContract" + } + ], + "slotName": "Out", + "Descriptor": { + "ConnectionType": 2, + "SlotType": 1 + } + } + ], + "Datums": [ + { + "isOverloadedStorage": false, + "scriptCanvasType": { + "m_type": 1 + }, + "isNullPointer": false, + "$type": "EntityId", + "value": { + "id": 4276206253 + } + }, + { + "isOverloadedStorage": false, + "scriptCanvasType": { + "m_type": 5 + }, + "isNullPointer": false, + "$type": "{03AAAB3F-5C47-5A66-9EBC-D5FA4DB353C9} AZStd::string", + "value": "Delay test complete", + "label": "Report" + } + ], + "methodType": 2, + "methodName": "Mark Complete", + "className": "Unit Testing", + "resultSlotIDs": [ + {} + ], + "prettyClassName": "Unit Testing" + } + } + }, + { + "Id": { + "id": 8018565512928 + }, + "Name": "SC-Node(DelayNodeableNode)", + "Components": { + "Component_[18208529655338450188]": { + "$type": "DelayNodeableNode", + "Id": 18208529655338450188, + "Slots": [ + { + "id": { + "m_id": "{F8445BAB-538D-411E-B386-51DA322E636F}" + }, + "contracts": [ + { + "$type": "SlotTypeContract" + }, + { + "$type": "DisallowReentrantExecutionContract" + } + ], + "slotName": "Start", + "toolTip": "When signaled, execution is delayed at this node according to the specified properties.", + "DisplayGroup": { + "Value": 2675529103 + }, + "Descriptor": { + "ConnectionType": 1, + "SlotType": 1 + } + }, + { + "id": { + "m_id": "{FCE9085E-1FBB-4C65-BF21-A4886EE2B83B}" + }, + "contracts": [ + { + "$type": "SlotTypeContract" + }, + null + ], + "slotName": "Start: Time", + "toolTip": "Amount of time to delay, in seconds.", + "DisplayGroup": { + "Value": 2675529103 + }, + "Descriptor": { + "ConnectionType": 1, + "SlotType": 2 + }, + "DataType": 1 + }, + { + "id": { + "m_id": "{AB0955E5-BC42-4C62-BB8D-C14ECE24AA28}" + }, + "contracts": [ + { + "$type": "SlotTypeContract" + }, + null + ], + "slotName": "Start: Loop", + "toolTip": "If true, the delay will restart after triggering the Out slot.", + "DisplayGroup": { + "Value": 2675529103 + }, + "Descriptor": { + "ConnectionType": 1, + "SlotType": 2 + }, + "DataType": 1 + }, + { + "id": { + "m_id": "{00BF555A-CCC7-45F0-BDA1-7FCA587F5DF6}" + }, + "contracts": [ + { + "$type": "SlotTypeContract" + }, + null + ], + "slotName": "Start: Hold", + "toolTip": "Amount of time to wait before restarting, in seconds.", + "DisplayGroup": { + "Value": 2675529103 + }, + "Descriptor": { + "ConnectionType": 1, + "SlotType": 2 + }, + "DataType": 1 + }, + { + "id": { + "m_id": "{6C92F041-AD12-4EDB-BD7D-2A1B126A0AE1}" + }, + "contracts": [ + { + "$type": "SlotTypeContract" + } + ], + "slotName": "On Start", + "toolTip": "When signaled, execution is delayed at this node according to the specified properties.", + "DisplayGroup": { + "Value": 2675529103 + }, + "Descriptor": { + "ConnectionType": 2, + "SlotType": 1 + } + }, + { + "id": { + "m_id": "{C84ED69D-1250-441D-99EC-1FA09EBD4A33}" + }, + "contracts": [ + { + "$type": "SlotTypeContract" + }, + { + "$type": "DisallowReentrantExecutionContract" + } + ], + "slotName": "Reset", + "toolTip": "When signaled, execution is delayed at this node according to the specified properties.", + "DisplayGroup": { + "Value": 1352515405 + }, + "Descriptor": { + "ConnectionType": 1, + "SlotType": 1 + } + }, + { + "id": { + "m_id": "{24A2AD52-B382-4875-B3F7-45072F3D95DC}" + }, + "contracts": [ + { + "$type": "SlotTypeContract" + }, + null + ], + "slotName": "Reset: Time", + "toolTip": "Amount of time to delay, in seconds.", + "DisplayGroup": { + "Value": 1352515405 + }, + "Descriptor": { + "ConnectionType": 1, + "SlotType": 2 + }, + "DataType": 1 + }, + { + "id": { + "m_id": "{6CCC46D4-1ACA-4ED3-8F41-CE21DBB074BE}" + }, + "contracts": [ + { + "$type": "SlotTypeContract" + }, + null + ], + "slotName": "Reset: Loop", + "toolTip": "If true, the delay will restart after triggering the Out slot.", + "DisplayGroup": { + "Value": 1352515405 + }, + "Descriptor": { + "ConnectionType": 1, + "SlotType": 2 + }, + "DataType": 1 + }, + { + "id": { + "m_id": "{3BA65C96-1800-44A7-9132-E8618EC309CE}" + }, + "contracts": [ + { + "$type": "SlotTypeContract" + }, + null + ], + "slotName": "Reset: Hold", + "toolTip": "Amount of time to wait before restarting, in seconds.", + "DisplayGroup": { + "Value": 1352515405 + }, + "Descriptor": { + "ConnectionType": 1, + "SlotType": 2 + }, + "DataType": 1 + }, + { + "id": { + "m_id": "{7B52E7FE-906E-4E96-9025-DFD220C9A532}" + }, + "contracts": [ + { + "$type": "SlotTypeContract" + } + ], + "slotName": "On Reset", + "toolTip": "When signaled, execution is delayed at this node according to the specified properties.", + "DisplayGroup": { + "Value": 1352515405 + }, + "Descriptor": { + "ConnectionType": 2, + "SlotType": 1 + } + }, + { + "id": { + "m_id": "{7311AE3A-E23F-476D-BCC5-2D6A7B39AD53}" + }, + "contracts": [ + { + "$type": "SlotTypeContract" + }, + { + "$type": "DisallowReentrantExecutionContract" + } + ], + "slotName": "Cancel", + "toolTip": "Cancels the current delay.", + "DisplayGroup": { + "Value": 1444332914 + }, + "Descriptor": { + "ConnectionType": 1, + "SlotType": 1 + } + }, + { + "id": { + "m_id": "{017884F2-6FB0-4E88-BBE8-FE9277108BD3}" + }, + "contracts": [ + { + "$type": "SlotTypeContract" + } + ], + "slotName": "On Cancel", + "toolTip": "Cancels the current delay.", + "DisplayGroup": { + "Value": 1444332914 + }, + "Descriptor": { + "ConnectionType": 2, + "SlotType": 1 + } + }, + { + "id": { + "m_id": "{6249B81E-1341-41B1-B843-F4658C1EAE31}" + }, + "contracts": [ + { + "$type": "SlotTypeContract" + } + ], + "slotName": "Done", + "toolTip": "Signaled when the delay reaches zero.", + "DisplayGroup": { + "Value": 271442091 + }, + "Descriptor": { + "ConnectionType": 2, + "SlotType": 1 + }, + "IsLatent": true + }, + { + "id": { + "m_id": "{1A0F9D41-14F3-4CF0-8C00-7E2374129768}" + }, + "contracts": [ + { + "$type": "SlotTypeContract" + } + ], + "slotName": "Elapsed", + "toolTip": "The amount of time that has elapsed since the delay began.", + "DisplayDataType": { + "m_type": 3 + }, + "DisplayGroup": { + "Value": 271442091 + }, + "Descriptor": { + "ConnectionType": 2, + "SlotType": 2 + }, + "DataType": 1 + } + ], + "Datums": [ + { + "isOverloadedStorage": false, + "scriptCanvasType": { + "m_type": 3 + }, + "isNullPointer": false, + "$type": "double", + "value": 0.0, + "label": "Start: Time" + }, + { + "isOverloadedStorage": false, + "scriptCanvasType": { + "m_type": 0 + }, + "isNullPointer": false, + "$type": "bool", + "value": false, + "label": "Start: Loop" + }, + { + "isOverloadedStorage": false, + "scriptCanvasType": { + "m_type": 3 + }, + "isNullPointer": false, + "$type": "double", + "value": 0.0, + "label": "Start: Hold" + }, + { + "isOverloadedStorage": false, + "scriptCanvasType": { + "m_type": 3 + }, + "isNullPointer": false, + "$type": "double", + "value": 0.0, + "label": "Reset: Time" + }, + { + "isOverloadedStorage": false, + "scriptCanvasType": { + "m_type": 0 + }, + "isNullPointer": false, + "$type": "bool", + "value": false, + "label": "Reset: Loop" + }, + { + "isOverloadedStorage": false, + "scriptCanvasType": { + "m_type": 3 + }, + "isNullPointer": false, + "$type": "double", + "value": 0.0, + "label": "Reset: Hold" + } + ], + "slotExecutionMap": { + "ins": [ + { + "_slotId": { + "m_id": "{F8445BAB-538D-411E-B386-51DA322E636F}" + }, + "_inputs": [ + { + "_slotId": { + "m_id": "{FCE9085E-1FBB-4C65-BF21-A4886EE2B83B}" + } + }, + { + "_slotId": { + "m_id": "{AB0955E5-BC42-4C62-BB8D-C14ECE24AA28}" + } + }, + { + "_slotId": { + "m_id": "{00BF555A-CCC7-45F0-BDA1-7FCA587F5DF6}" + } + } + ], + "_outs": [ + { + "_slotId": { + "m_id": "{6C92F041-AD12-4EDB-BD7D-2A1B126A0AE1}" + }, + "_name": "On Start", + "_interfaceSourceId": "{33362E36-3930-0000-0000-D138AF020000}" + } + ], + "_interfaceSourceId": "{B86FAF85-CA00-0000-296D-0737FD7F0000}" + }, + { + "_slotId": { + "m_id": "{C84ED69D-1250-441D-99EC-1FA09EBD4A33}" + }, + "_inputs": [ + { + "_slotId": { + "m_id": "{24A2AD52-B382-4875-B3F7-45072F3D95DC}" + } + }, + { + "_slotId": { + "m_id": "{6CCC46D4-1ACA-4ED3-8F41-CE21DBB074BE}" + } + }, + { + "_slotId": { + "m_id": "{3BA65C96-1800-44A7-9132-E8618EC309CE}" + } + } + ], + "_outs": [ + { + "_slotId": { + "m_id": "{7B52E7FE-906E-4E96-9025-DFD220C9A532}" + }, + "_name": "On Reset", + "_interfaceSourceId": "{33362E36-3930-0000-0000-D138AF020000}" + } + ], + "_interfaceSourceId": "{B86FAF85-CA00-0000-296D-0737FD7F0000}" + }, + { + "_slotId": { + "m_id": "{7311AE3A-E23F-476D-BCC5-2D6A7B39AD53}" + }, + "_outs": [ + { + "_slotId": { + "m_id": "{017884F2-6FB0-4E88-BBE8-FE9277108BD3}" + }, + "_name": "On Cancel", + "_interfaceSourceId": "{33362E36-3930-0000-0000-D138AF020000}" + } + ], + "_interfaceSourceId": "{B86FAF85-CA00-0000-296D-0737FD7F0000}" + } + ], + "latents": [ + { + "_slotId": { + "m_id": "{6249B81E-1341-41B1-B843-F4658C1EAE31}" + }, + "_name": "Done", + "_outputs": [ + { + "_slotId": { + "m_id": "{1A0F9D41-14F3-4CF0-8C00-7E2374129768}" + } + } + ], + "_interfaceSourceId": "{B86FAF85-CA00-0000-296D-0737FD7F0000}" + } + ] + } + } + } + }, + { + "Id": { + "id": 8031450414816 + }, + "Name": "SC-Node(Expect Greater Than Equal)", + "Components": { + "Component_[408430974986181037]": { + "$type": "MethodOverloaded", + "Id": 408430974986181037, + "Slots": [ + { + "isVisibile": false, + "id": { + "m_id": "{2EABD0D3-B2DE-4AED-9069-ACC8A92B54DE}" + }, + "contracts": [ + { + "$type": "SlotTypeContract" + }, + null + ], + "slotName": "EntityID: 0", + "DisplayDataType": { + "m_type": 1 + }, + "Descriptor": { + "ConnectionType": 1, + "SlotType": 2 + }, + "DataType": 1 + }, + { + "IsOverload": true, + "id": { + "m_id": "{B9873274-15A8-4642-BCB8-423D302618FD}" + }, + "DynamicTypeOverride": 3, + "contracts": [ + { + "$type": "SlotTypeContract" + }, + null + ], + "slotName": "Candidate", + "toolTip": "left of >=", + "DisplayDataType": { + "m_type": 3 + }, + "Descriptor": { + "ConnectionType": 1, + "SlotType": 2 + }, + "DataType": 1 + }, + { + "IsOverload": true, + "id": { + "m_id": "{DCB3BEE9-00E3-4421-BC84-5B1380607AA5}" + }, + "DynamicTypeOverride": 3, + "contracts": [ + { + "$type": "SlotTypeContract" + }, + null + ], + "slotName": "Reference", + "toolTip": "right of >=", + "DisplayDataType": { + "m_type": 3 + }, + "Descriptor": { + "ConnectionType": 1, + "SlotType": 2 + }, + "DataType": 1, + "IsReference": true, + "VariableReference": { + "m_id": "{A3A19E5B-D7BE-46D4-B876-9832C1D26D0B}" + } + }, + { + "id": { + "m_id": "{01E90D0B-05A6-4C3F-9E86-FEC7139E4322}" + }, + "contracts": [ + { + "$type": "SlotTypeContract" + }, + null + ], + "slotName": "Report", + "toolTip": "additional notes for the test report", + "DisplayDataType": { + "m_type": 5 + }, + "Descriptor": { + "ConnectionType": 1, + "SlotType": 2 + }, + "DataType": 1 + }, + { + "id": { + "m_id": "{5BB85516-23AA-4860-8D8E-4E25F83AAF27}" + }, + "contracts": [ + { + "$type": "SlotTypeContract" + } + ], + "slotName": "In", + "Descriptor": { + "ConnectionType": 1, + "SlotType": 1 + } + }, + { + "id": { + "m_id": "{21EA60AA-6B22-4623-997C-22363E687A4B}" + }, + "contracts": [ + { + "$type": "SlotTypeContract" + } + ], + "slotName": "Out", + "Descriptor": { + "ConnectionType": 2, + "SlotType": 1 + } + } + ], + "Datums": [ + { + "isOverloadedStorage": false, + "scriptCanvasType": { + "m_type": 1 + }, + "isNullPointer": false, + "$type": "EntityId", + "value": { + "id": 4276206253 + }, + "label": "EntityID: 0" + }, + { + "isOverloadedStorage": false, + "scriptCanvasType": { + "m_type": 3 + }, + "isNullPointer": false, + "$type": "double", + "value": 0.0, + "label": "Candidate" + }, + { + "isOverloadedStorage": false, + "scriptCanvasType": { + "m_type": 3 + }, + "isNullPointer": false, + "$type": "double", + "value": 0.0, + "label": "Reference" + }, + { + "isOverloadedStorage": false, + "scriptCanvasType": { + "m_type": 5 + }, + "isNullPointer": false, + "$type": "{03AAAB3F-5C47-5A66-9EBC-D5FA4DB353C9} AZStd::string", + "value": "Elapsed should be more than 1 after start", + "label": "Report" + } + ], + "methodType": 2, + "methodName": "Expect Greater Than Equal", + "className": "Unit Testing", + "resultSlotIDs": [ + {} + ], + "prettyClassName": "Unit Testing", + "orderedInputSlotIds": [ + { + "m_id": "{2EABD0D3-B2DE-4AED-9069-ACC8A92B54DE}" + }, + { + "m_id": "{B9873274-15A8-4642-BCB8-423D302618FD}" + }, + { + "m_id": "{DCB3BEE9-00E3-4421-BC84-5B1380607AA5}" + }, + { + "m_id": "{01E90D0B-05A6-4C3F-9E86-FEC7139E4322}" + } + ] + } + } + }, + { + "Id": { + "id": 8009975578336 + }, + "Name": "SC-Node(Gate)", + "Components": { + "Component_[5398707513550245442]": { + "$type": "Gate", + "Id": 5398707513550245442, + "Slots": [ + { + "id": { + "m_id": "{BF03B031-321A-4DD1-A00A-ECFF9E03518F}" + }, + "contracts": [ + { + "$type": "SlotTypeContract" + } + ], + "slotName": "In", + "toolTip": "Input signal", + "Descriptor": { + "ConnectionType": 1, + "SlotType": 1 + } + }, + { + "id": { + "m_id": "{B1583C42-4290-4016-B123-A8F3CBFDE3D1}" + }, + "contracts": [ + { + "$type": "SlotTypeContract" + } + ], + "slotName": "True", + "toolTip": "Signaled if the condition provided evaluates to true.", + "Descriptor": { + "ConnectionType": 2, + "SlotType": 1 + } + }, + { + "id": { + "m_id": "{BD9FC7E9-30C7-4155-AB5A-A09819A44FD5}" + }, + "contracts": [ + { + "$type": "SlotTypeContract" + } + ], + "slotName": "False", + "toolTip": "Signaled if the condition provided evaluates to false.", + "Descriptor": { + "ConnectionType": 2, + "SlotType": 1 + } + }, + { + "id": { + "m_id": "{4B14B289-18EA-4BFA-B35C-D307A6F64B37}" + }, + "contracts": [ + { + "$type": "SlotTypeContract" + }, + null + ], + "slotName": "Condition", + "toolTip": "If true the node will signal the Output and proceed execution", + "Descriptor": { + "ConnectionType": 1, + "SlotType": 2 + }, + "DataType": 1, + "IsReference": true, + "VariableReference": { + "m_id": "{AD81163D-DA91-4E66-AE45-ADEDC64CAAF0}" + } + } + ], + "Datums": [ + { + "isOverloadedStorage": false, + "scriptCanvasType": { + "m_type": 0 + }, + "isNullPointer": false, + "$type": "bool", + "value": false, + "label": "Condition" + } + ] + } + } + }, + { + "Id": { + "id": 8001385643744 + }, + "Name": "SC-Node(Expect Greater Than Equal)", + "Components": { + "Component_[7351797194887752307]": { + "$type": "MethodOverloaded", + "Id": 7351797194887752307, + "Slots": [ + { + "isVisibile": false, + "id": { + "m_id": "{34C9C07C-C858-4F59-A249-AAC3C29B587E}" + }, + "contracts": [ + { + "$type": "SlotTypeContract" + }, + null + ], + "slotName": "EntityID: 0", + "DisplayDataType": { + "m_type": 1 + }, + "Descriptor": { + "ConnectionType": 1, + "SlotType": 2 + }, + "DataType": 1 + }, + { + "IsOverload": true, + "id": { + "m_id": "{38A5CD98-69C7-4DA5-BF7D-C562F7458B07}" + }, + "DynamicTypeOverride": 3, + "contracts": [ + { + "$type": "SlotTypeContract" + }, + null + ], + "slotName": "Candidate", + "toolTip": "left of >=", + "DisplayDataType": { + "m_type": 3 + }, + "Descriptor": { + "ConnectionType": 1, + "SlotType": 2 + }, + "DataType": 1 + }, + { + "IsOverload": true, + "id": { + "m_id": "{3B50E608-A44A-4DBC-A34C-C2ECA322DAD6}" + }, + "DynamicTypeOverride": 3, + "contracts": [ + { + "$type": "SlotTypeContract" + }, + null + ], + "slotName": "Reference", + "toolTip": "right of >=", + "DisplayDataType": { + "m_type": 3 + }, + "Descriptor": { + "ConnectionType": 1, + "SlotType": 2 + }, + "DataType": 1, + "IsReference": true, + "VariableReference": { + "m_id": "{13A4B0B3-756F-403C-A9E0-CC40DA27EE2C}" + } + }, + { + "id": { + "m_id": "{628B2C9B-841D-4E63-ABBB-2AA8601B5C7A}" + }, + "contracts": [ + { + "$type": "SlotTypeContract" + }, + null + ], + "slotName": "Report", + "toolTip": "additional notes for the test report", + "DisplayDataType": { + "m_type": 5 + }, + "Descriptor": { + "ConnectionType": 1, + "SlotType": 2 + }, + "DataType": 1 + }, + { + "id": { + "m_id": "{95EA03BD-BE8E-4DC1-8291-D8127AD75A37}" + }, + "contracts": [ + { + "$type": "SlotTypeContract" + } + ], + "slotName": "In", + "Descriptor": { + "ConnectionType": 1, + "SlotType": 1 + } + }, + { + "id": { + "m_id": "{9617463C-E5F5-4292-99C3-C7C92891246F}" + }, + "contracts": [ + { + "$type": "SlotTypeContract" + } + ], + "slotName": "Out", + "Descriptor": { + "ConnectionType": 2, + "SlotType": 1 + } + } + ], + "Datums": [ + { + "isOverloadedStorage": false, + "scriptCanvasType": { + "m_type": 1 + }, + "isNullPointer": false, + "$type": "EntityId", + "value": { + "id": 4276206253 + }, + "label": "EntityID: 0" + }, + { + "isOverloadedStorage": false, + "scriptCanvasType": { + "m_type": 3 + }, + "isNullPointer": false, + "$type": "double", + "value": 0.0, + "label": "Candidate" + }, + { + "isOverloadedStorage": false, + "scriptCanvasType": { + "m_type": 3 + }, + "isNullPointer": false, + "$type": "double", + "value": 0.0, + "label": "Reference" + }, + { + "isOverloadedStorage": false, + "scriptCanvasType": { + "m_type": 5 + }, + "isNullPointer": false, + "$type": "{03AAAB3F-5C47-5A66-9EBC-D5FA4DB353C9} AZStd::string", + "value": "Elapsed should be more than 2 after reset", + "label": "Report" + } + ], + "methodType": 2, + "methodName": "Expect Greater Than Equal", + "className": "Unit Testing", + "resultSlotIDs": [ + {} + ], + "prettyClassName": "Unit Testing", + "orderedInputSlotIds": [ + { + "m_id": "{34C9C07C-C858-4F59-A249-AAC3C29B587E}" + }, + { + "m_id": "{38A5CD98-69C7-4DA5-BF7D-C562F7458B07}" + }, + { + "m_id": "{3B50E608-A44A-4DBC-A34C-C2ECA322DAD6}" + }, + { + "m_id": "{628B2C9B-841D-4E63-ABBB-2AA8601B5C7A}" + } + ] + } + } + }, + { + "Id": { + "id": 7997090676448 + }, + "Name": "SC Node(SetVariable)", + "Components": { + "Component_[8054056332975461684]": { + "$type": "SetVariableNode", + "Id": 8054056332975461684, + "Slots": [ + { + "id": { + "m_id": "{D29241A9-9B27-42C0-9A30-A75AA4AA3F0F}" + }, + "contracts": [ + { + "$type": "SlotTypeContract" + } + ], + "slotName": "In", + "toolTip": "When signaled sends the variable referenced by this node to a Data Output slot", + "Descriptor": { + "ConnectionType": 1, + "SlotType": 1 + } + }, + { + "id": { + "m_id": "{49682E58-579D-474A-A3E0-52E7DDDA4A7C}" + }, + "contracts": [ + { + "$type": "SlotTypeContract" + } + ], + "slotName": "Out", + "toolTip": "Signaled after the referenced variable has been pushed to the Data Output slot", + "Descriptor": { + "ConnectionType": 2, + "SlotType": 1 + } + }, + { + "id": { + "m_id": "{CCE01CC2-4E14-4F15-AC5A-219A4509CE94}" + }, + "contracts": [ + { + "$type": "SlotTypeContract" + }, + null + ], + "slotName": "Boolean", + "Descriptor": { + "ConnectionType": 1, + "SlotType": 2 + }, + "DataType": 1 + }, + { + "id": { + "m_id": "{CC6D2BF3-87BC-4B14-A27B-82D5C0E3DF2D}" + }, + "contracts": [ + { + "$type": "SlotTypeContract" + } + ], + "slotName": "Boolean", + "DisplayDataType": { + "m_type": 0 + }, + "Descriptor": { + "ConnectionType": 2, + "SlotType": 2 + }, + "DataType": 1 + } + ], + "Datums": [ + { + "isOverloadedStorage": false, + "scriptCanvasType": { + "m_type": 0 + }, + "isNullPointer": false, + "$type": "bool", + "value": false, + "label": "Boolean" + } + ], + "m_variableId": { + "m_id": "{AD81163D-DA91-4E66-AE45-ADEDC64CAAF0}" + }, + "m_variableDataInSlotId": { + "m_id": "{CCE01CC2-4E14-4F15-AC5A-219A4509CE94}" + }, + "m_variableDataOutSlotId": { + "m_id": "{CC6D2BF3-87BC-4B14-A27B-82D5C0E3DF2D}" + } + } + } + }, + { + "Id": { + "id": 8027155447520 + }, + "Name": "SC Node(GetVariable)", + "Components": { + "Component_[8637439810651459247]": { + "$type": "GetVariableNode", + "Id": 8637439810651459247, + "Slots": [ + { + "id": { + "m_id": "{C8560B11-DD0D-4A18-98A1-228FB7911DD1}" + }, + "contracts": [ + { + "$type": "SlotTypeContract" + } + ], + "slotName": "In", + "toolTip": "When signaled sends the property referenced by this node to a Data Output slot", + "Descriptor": { + "ConnectionType": 1, + "SlotType": 1 + } + }, + { + "id": { + "m_id": "{AB6805D8-5CAA-446B-8C36-CB8A2C30347D}" + }, + "contracts": [ + { + "$type": "SlotTypeContract" + } + ], + "slotName": "Out", + "toolTip": "Signaled after the referenced property has been pushed to the Data Output slot", + "Descriptor": { + "ConnectionType": 2, + "SlotType": 1 + } + }, + { + "id": { + "m_id": "{D9BC724B-4BDF-4F62-AF73-238559A85E94}" + }, + "contracts": [ + { + "$type": "SlotTypeContract" + } + ], + "slotName": "Number", + "DisplayDataType": { + "m_type": 3 + }, + "Descriptor": { + "ConnectionType": 2, + "SlotType": 2 + }, + "DataType": 1 + } + ], + "m_variableId": { + "m_id": "{13A4B0B3-756F-403C-A9E0-CC40DA27EE2C}" + }, + "m_variableDataOutSlotId": { + "m_id": "{D9BC724B-4BDF-4F62-AF73-238559A85E94}" + } + } + } + }, + { + "Id": { + "id": 8014270545632 + }, + "Name": "SC-Node(Start)", + "Components": { + "Component_[9134219784961524494]": { + "$type": "Start", + "Id": 9134219784961524494, + "Slots": [ + { + "id": { + "m_id": "{11EB8AA6-BB4E-480D-93DA-85D5969F4ECB}" + }, + "contracts": [ + { + "$type": "SlotTypeContract" + } + ], + "slotName": "Out", + "toolTip": "Signaled when the entity that owns this graph is fully activated.", + "Descriptor": { + "ConnectionType": 2, + "SlotType": 1 + } + } + ] + } + } + } + ], + "m_connections": [ + { + "Id": { + "id": 8035745382112 + }, + "Name": "srcEndpoint=(If: True), destEndpoint=(Expect Greater Than Equal: In)", + "Components": { + "Component_[5647411303754655744]": { + "$type": "{64CA5016-E803-4AC4-9A36-BDA2C890C6EB} Connection", + "Id": 5647411303754655744, + "sourceEndpoint": { + "nodeId": { + "id": 8009975578336 + }, + "slotId": { + "m_id": "{B1583C42-4290-4016-B123-A8F3CBFDE3D1}" + } + }, + "targetEndpoint": { + "nodeId": { + "id": 8031450414816 + }, + "slotId": { + "m_id": "{5BB85516-23AA-4860-8D8E-4E25F83AAF27}" + } + } + } + } + }, + { + "Id": { + "id": 8040040349408 + }, + "Name": "srcEndpoint=(Expect Greater Than Equal: Out), destEndpoint=(Set Variable: In)", + "Components": { + "Component_[15155445988139558066]": { + "$type": "{64CA5016-E803-4AC4-9A36-BDA2C890C6EB} Connection", + "Id": 15155445988139558066, + "sourceEndpoint": { + "nodeId": { + "id": 8031450414816 + }, + "slotId": { + "m_id": "{21EA60AA-6B22-4623-997C-22363E687A4B}" + } + }, + "targetEndpoint": { + "nodeId": { + "id": 7997090676448 + }, + "slotId": { + "m_id": "{D29241A9-9B27-42C0-9A30-A75AA4AA3F0F}" + } + } + } + } + }, + { + "Id": { + "id": 8044335316704 + }, + "Name": "srcEndpoint=(On Graph Start: Out), destEndpoint=(Get Variable: In)", + "Components": { + "Component_[2459001120525165713]": { + "$type": "{64CA5016-E803-4AC4-9A36-BDA2C890C6EB} Connection", + "Id": 2459001120525165713, + "sourceEndpoint": { + "nodeId": { + "id": 8014270545632 + }, + "slotId": { + "m_id": "{11EB8AA6-BB4E-480D-93DA-85D5969F4ECB}" + } + }, + "targetEndpoint": { + "nodeId": { + "id": 8022860480224 + }, + "slotId": { + "m_id": "{8650478F-4E17-40B5-B13C-E8C02A524201}" + } + } + } + } + }, + { + "Id": { + "id": 8048630284000 + }, + "Name": "srcEndpoint=(If: False), destEndpoint=(Expect Greater Than Equal: In)", + "Components": { + "Component_[10745739214458161764]": { + "$type": "{64CA5016-E803-4AC4-9A36-BDA2C890C6EB} Connection", + "Id": 10745739214458161764, + "sourceEndpoint": { + "nodeId": { + "id": 8009975578336 + }, + "slotId": { + "m_id": "{BD9FC7E9-30C7-4155-AB5A-A09819A44FD5}" + } + }, + "targetEndpoint": { + "nodeId": { + "id": 8001385643744 + }, + "slotId": { + "m_id": "{95EA03BD-BE8E-4DC1-8291-D8127AD75A37}" + } + } + } + } + }, + { + "Id": { + "id": 8052925251296 + }, + "Name": "srcEndpoint=(Set Variable: Out), destEndpoint=(Get Variable: In)", + "Components": { + "Component_[7371956956721983493]": { + "$type": "{64CA5016-E803-4AC4-9A36-BDA2C890C6EB} Connection", + "Id": 7371956956721983493, + "sourceEndpoint": { + "nodeId": { + "id": 7997090676448 + }, + "slotId": { + "m_id": "{49682E58-579D-474A-A3E0-52E7DDDA4A7C}" + } + }, + "targetEndpoint": { + "nodeId": { + "id": 8027155447520 + }, + "slotId": { + "m_id": "{C8560B11-DD0D-4A18-98A1-228FB7911DD1}" + } + } + } + } + }, + { + "Id": { + "id": 8057220218592 + }, + "Name": "srcEndpoint=(Expect Greater Than Equal: Out), destEndpoint=(Mark Complete: In)", + "Components": { + "Component_[14854123337262345427]": { + "$type": "{64CA5016-E803-4AC4-9A36-BDA2C890C6EB} Connection", + "Id": 14854123337262345427, + "sourceEndpoint": { + "nodeId": { + "id": 8001385643744 + }, + "slotId": { + "m_id": "{9617463C-E5F5-4292-99C3-C7C92891246F}" + } + }, + "targetEndpoint": { + "nodeId": { + "id": 8005680611040 + }, + "slotId": { + "m_id": "{1A41311D-2629-4A55-8469-AB6EA8F8E00F}" + } + } + } + } + }, + { + "Id": { + "id": 8061515185888 + }, + "Name": "srcEndpoint=(Get Variable: Out), destEndpoint=(Delay: Start)", + "Components": { + "Component_[18301940095446866928]": { + "$type": "{64CA5016-E803-4AC4-9A36-BDA2C890C6EB} Connection", + "Id": 18301940095446866928, + "sourceEndpoint": { + "nodeId": { + "id": 8022860480224 + }, + "slotId": { + "m_id": "{273B6C2E-CBE7-479A-B6C6-4CC6E51636B6}" + } + }, + "targetEndpoint": { + "nodeId": { + "id": 8018565512928 + }, + "slotId": { + "m_id": "{F8445BAB-538D-411E-B386-51DA322E636F}" + } + } + } + } + }, + { + "Id": { + "id": 8065810153184 + }, + "Name": "srcEndpoint=(Get Variable: Out), destEndpoint=(Delay: Reset)", + "Components": { + "Component_[14359507626343113257]": { + "$type": "{64CA5016-E803-4AC4-9A36-BDA2C890C6EB} Connection", + "Id": 14359507626343113257, + "sourceEndpoint": { + "nodeId": { + "id": 8027155447520 + }, + "slotId": { + "m_id": "{AB6805D8-5CAA-446B-8C36-CB8A2C30347D}" + } + }, + "targetEndpoint": { + "nodeId": { + "id": 8018565512928 + }, + "slotId": { + "m_id": "{C84ED69D-1250-441D-99EC-1FA09EBD4A33}" + } + } + } + } + }, + { + "Id": { + "id": 8070105120480 + }, + "Name": "srcEndpoint=(Get Variable: Number), destEndpoint=(Delay: Start: Time)", + "Components": { + "Component_[6761547457125237874]": { + "$type": "{64CA5016-E803-4AC4-9A36-BDA2C890C6EB} Connection", + "Id": 6761547457125237874, + "sourceEndpoint": { + "nodeId": { + "id": 8022860480224 + }, + "slotId": { + "m_id": "{12714A1C-FDCF-4A0C-8127-1B6B17A804CC}" + } + }, + "targetEndpoint": { + "nodeId": { + "id": 8018565512928 + }, + "slotId": { + "m_id": "{FCE9085E-1FBB-4C65-BF21-A4886EE2B83B}" + } + } + } + } + }, + { + "Id": { + "id": 8074400087776 + }, + "Name": "srcEndpoint=(Get Variable: Number), destEndpoint=(Delay: Reset: Time)", + "Components": { + "Component_[8979388687790412978]": { + "$type": "{64CA5016-E803-4AC4-9A36-BDA2C890C6EB} Connection", + "Id": 8979388687790412978, + "sourceEndpoint": { + "nodeId": { + "id": 8027155447520 + }, + "slotId": { + "m_id": "{D9BC724B-4BDF-4F62-AF73-238559A85E94}" + } + }, + "targetEndpoint": { + "nodeId": { + "id": 8018565512928 + }, + "slotId": { + "m_id": "{24A2AD52-B382-4875-B3F7-45072F3D95DC}" + } + } + } + } + }, + { + "Id": { + "id": 8078695055072 + }, + "Name": "srcEndpoint=(Delay: Done), destEndpoint=(If: In)", + "Components": { + "Component_[14625041809622283132]": { + "$type": "{64CA5016-E803-4AC4-9A36-BDA2C890C6EB} Connection", + "Id": 14625041809622283132, + "sourceEndpoint": { + "nodeId": { + "id": 8018565512928 + }, + "slotId": { + "m_id": "{6249B81E-1341-41B1-B843-F4658C1EAE31}" + } + }, + "targetEndpoint": { + "nodeId": { + "id": 8009975578336 + }, + "slotId": { + "m_id": "{BF03B031-321A-4DD1-A00A-ECFF9E03518F}" + } + } + } + } + }, + { + "Id": { + "id": 8082990022368 + }, + "Name": "srcEndpoint=(Delay: Elapsed), destEndpoint=(Expect Greater Than Equal: Candidate)", + "Components": { + "Component_[12771954348451341510]": { + "$type": "{64CA5016-E803-4AC4-9A36-BDA2C890C6EB} Connection", + "Id": 12771954348451341510, + "sourceEndpoint": { + "nodeId": { + "id": 8018565512928 + }, + "slotId": { + "m_id": "{1A0F9D41-14F3-4CF0-8C00-7E2374129768}" + } + }, + "targetEndpoint": { + "nodeId": { + "id": 8001385643744 + }, + "slotId": { + "m_id": "{38A5CD98-69C7-4DA5-BF7D-C562F7458B07}" + } + } + } + } + }, + { + "Id": { + "id": 8087284989664 + }, + "Name": "srcEndpoint=(Delay: Elapsed), destEndpoint=(Expect Greater Than Equal: Candidate)", + "Components": { + "Component_[1854855865676689941]": { + "$type": "{64CA5016-E803-4AC4-9A36-BDA2C890C6EB} Connection", + "Id": 1854855865676689941, + "sourceEndpoint": { + "nodeId": { + "id": 8018565512928 + }, + "slotId": { + "m_id": "{1A0F9D41-14F3-4CF0-8C00-7E2374129768}" + } + }, + "targetEndpoint": { + "nodeId": { + "id": 8031450414816 + }, + "slotId": { + "m_id": "{B9873274-15A8-4642-BCB8-423D302618FD}" + } + } + } + } + } + ] + }, + "m_assetType": "{3E2AC8CD-713F-453E-967F-29517F331784}", + "versionData": { + "_grammarVersion": 1, + "_runtimeVersion": 1, + "_fileVersion": 1 + }, + "GraphCanvasData": [ + { + "Key": { + "id": 7992795709152 + }, + "Value": { + "ComponentData": { + "{5F84B500-8C45-40D1-8EFC-A5306B241444}": { + "$type": "SceneComponentSaveData", + "ViewParams": { + "Scale": 0.8886388, + "AnchorX": -310.5873718261719, + "AnchorY": 346.5975036621094 + } + } + } + } + }, + { + "Key": { + "id": 7997090676448 + }, + "Value": { + "ComponentData": { + "{24CB38BB-1705-4EC5-8F63-B574571B4DCD}": { + "$type": "NodeSaveData" + }, + "{328FF15C-C302-458F-A43D-E1794DE0904E}": { + "$type": "GeneralNodeTitleComponentSaveData", + "PaletteOverride": "SetVariableNodeTitlePalette" + }, + "{7CC444B1-F9B3-41B5-841B-0C4F2179F111}": { + "$type": "GeometrySaveData", + "Position": [ + 1280.0, + 380.0 + ] + }, + "{B0B99C8A-03AF-4CF6-A926-F65C874C3D97}": { + "$type": "StylingComponentSaveData", + "SubStyle": ".setVariable" + }, + "{B1F49A35-8408-40DA-B79E-F1E3B64322CE}": { + "$type": "PersistentIdComponentSaveData", + "PersistentId": "{404AE5EA-7F73-4B52-9B4C-DA5712B7E2E2}" + } + } + } + }, + { + "Key": { + "id": 8001385643744 + }, + "Value": { + "ComponentData": { + "{24CB38BB-1705-4EC5-8F63-B574571B4DCD}": { + "$type": "NodeSaveData" + }, + "{328FF15C-C302-458F-A43D-E1794DE0904E}": { + "$type": "GeneralNodeTitleComponentSaveData", + "PaletteOverride": "MethodNodeTitlePalette" + }, + "{7CC444B1-F9B3-41B5-841B-0C4F2179F111}": { + "$type": "GeometrySaveData", + "Position": [ + 840.0, + 880.0 + ] + }, + "{B0B99C8A-03AF-4CF6-A926-F65C874C3D97}": { + "$type": "StylingComponentSaveData", + "SubStyle": ".method" + }, + "{B1F49A35-8408-40DA-B79E-F1E3B64322CE}": { + "$type": "PersistentIdComponentSaveData", + "PersistentId": "{153AFB90-173C-4090-B709-DA73D04A8F62}" + } + } + } + }, + { + "Key": { + "id": 8005680611040 + }, + "Value": { + "ComponentData": { + "{24CB38BB-1705-4EC5-8F63-B574571B4DCD}": { + "$type": "NodeSaveData" + }, + "{328FF15C-C302-458F-A43D-E1794DE0904E}": { + "$type": "GeneralNodeTitleComponentSaveData", + "PaletteOverride": "MethodNodeTitlePalette" + }, + "{7CC444B1-F9B3-41B5-841B-0C4F2179F111}": { + "$type": "GeometrySaveData", + "Position": [ + 1280.0, + 880.0 + ] + }, + "{B0B99C8A-03AF-4CF6-A926-F65C874C3D97}": { + "$type": "StylingComponentSaveData", + "SubStyle": ".method" + }, + "{B1F49A35-8408-40DA-B79E-F1E3B64322CE}": { + "$type": "PersistentIdComponentSaveData", + "PersistentId": "{9ED03175-1B9D-4E72-A6A5-C089ABF0FF81}" + } + } + } + }, + { + "Key": { + "id": 8009975578336 + }, + "Value": { + "ComponentData": { + "{24CB38BB-1705-4EC5-8F63-B574571B4DCD}": { + "$type": "NodeSaveData" + }, + "{328FF15C-C302-458F-A43D-E1794DE0904E}": { + "$type": "GeneralNodeTitleComponentSaveData", + "PaletteOverride": "LogicNodeTitlePalette" + }, + "{7CC444B1-F9B3-41B5-841B-0C4F2179F111}": { + "$type": "GeometrySaveData", + "Position": [ + 460.0, + 640.0 + ] + }, + "{B0B99C8A-03AF-4CF6-A926-F65C874C3D97}": { + "$type": "StylingComponentSaveData" + }, + "{B1F49A35-8408-40DA-B79E-F1E3B64322CE}": { + "$type": "PersistentIdComponentSaveData", + "PersistentId": "{BCF7E6DA-F30B-4AB8-96A3-B7948455532C}" + } + } + } + }, + { + "Key": { + "id": 8014270545632 + }, + "Value": { + "ComponentData": { + "{24CB38BB-1705-4EC5-8F63-B574571B4DCD}": { + "$type": "NodeSaveData" + }, + "{328FF15C-C302-458F-A43D-E1794DE0904E}": { + "$type": "GeneralNodeTitleComponentSaveData", + "PaletteOverride": "TimeNodeTitlePalette" + }, + "{7CC444B1-F9B3-41B5-841B-0C4F2179F111}": { + "$type": "GeometrySaveData", + "Position": [ + -280.0, + 480.0 + ] + }, + "{B0B99C8A-03AF-4CF6-A926-F65C874C3D97}": { + "$type": "StylingComponentSaveData" + }, + "{B1F49A35-8408-40DA-B79E-F1E3B64322CE}": { + "$type": "PersistentIdComponentSaveData", + "PersistentId": "{6F87177E-AF30-42E2-BD5F-1DCF623B7235}" + } + } + } + }, + { + "Key": { + "id": 8018565512928 + }, + "Value": { + "ComponentData": { + "{24CB38BB-1705-4EC5-8F63-B574571B4DCD}": { + "$type": "NodeSaveData" + }, + "{328FF15C-C302-458F-A43D-E1794DE0904E}": { + "$type": "GeneralNodeTitleComponentSaveData", + "PaletteOverride": "TimeNodeTitlePalette" + }, + "{7CC444B1-F9B3-41B5-841B-0C4F2179F111}": { + "$type": "GeometrySaveData", + "Position": [ + 100.0, + 500.0 + ] + }, + "{B0B99C8A-03AF-4CF6-A926-F65C874C3D97}": { + "$type": "StylingComponentSaveData" + }, + "{B1F49A35-8408-40DA-B79E-F1E3B64322CE}": { + "$type": "PersistentIdComponentSaveData", + "PersistentId": "{C812E74B-E34B-40D5-B0AE-5A1D21FEB7D4}" + } + } + } + }, + { + "Key": { + "id": 8022860480224 + }, + "Value": { + "ComponentData": { + "{24CB38BB-1705-4EC5-8F63-B574571B4DCD}": { + "$type": "NodeSaveData" + }, + "{328FF15C-C302-458F-A43D-E1794DE0904E}": { + "$type": "GeneralNodeTitleComponentSaveData", + "PaletteOverride": "GetVariableNodeTitlePalette" + }, + "{7CC444B1-F9B3-41B5-841B-0C4F2179F111}": { + "$type": "GeometrySaveData", + "Position": [ + -80.0, + 480.0 + ] + }, + "{B0B99C8A-03AF-4CF6-A926-F65C874C3D97}": { + "$type": "StylingComponentSaveData", + "SubStyle": ".getVariable" + }, + "{B1F49A35-8408-40DA-B79E-F1E3B64322CE}": { + "$type": "PersistentIdComponentSaveData", + "PersistentId": "{3BCB878A-9CB7-4370-9903-52FC5505138C}" + } + } + } + }, + { + "Key": { + "id": 8027155447520 + }, + "Value": { + "ComponentData": { + "{24CB38BB-1705-4EC5-8F63-B574571B4DCD}": { + "$type": "NodeSaveData" + }, + "{328FF15C-C302-458F-A43D-E1794DE0904E}": { + "$type": "GeneralNodeTitleComponentSaveData", + "PaletteOverride": "GetVariableNodeTitlePalette" + }, + "{7CC444B1-F9B3-41B5-841B-0C4F2179F111}": { + "$type": "GeometrySaveData", + "Position": [ + -100.0, + 640.0 + ] + }, + "{B0B99C8A-03AF-4CF6-A926-F65C874C3D97}": { + "$type": "StylingComponentSaveData", + "SubStyle": ".getVariable" + }, + "{B1F49A35-8408-40DA-B79E-F1E3B64322CE}": { + "$type": "PersistentIdComponentSaveData", + "PersistentId": "{6FC2D332-3653-4AD6-BB34-098CC4BD9F32}" + } + } + } + }, + { + "Key": { + "id": 8031450414816 + }, + "Value": { + "ComponentData": { + "{24CB38BB-1705-4EC5-8F63-B574571B4DCD}": { + "$type": "NodeSaveData" + }, + "{328FF15C-C302-458F-A43D-E1794DE0904E}": { + "$type": "GeneralNodeTitleComponentSaveData", + "PaletteOverride": "MethodNodeTitlePalette" + }, + "{7CC444B1-F9B3-41B5-841B-0C4F2179F111}": { + "$type": "GeometrySaveData", + "Position": [ + 820.0, + 380.0 + ] + }, + "{B0B99C8A-03AF-4CF6-A926-F65C874C3D97}": { + "$type": "StylingComponentSaveData", + "SubStyle": ".method" + }, + "{B1F49A35-8408-40DA-B79E-F1E3B64322CE}": { + "$type": "PersistentIdComponentSaveData", + "PersistentId": "{6898E2CC-0226-4598-A801-BE4527FA0010}" + } + } + } + } + ], + "StatisticsHelper": { + "InstanceCounter": [ + { + "Key": 4199610336680704683, + "Value": 1 + }, + { + "Key": 4693003892664749777, + "Value": 1 + }, + { + "Key": 5235960430898951644, + "Value": 1 + }, + { + "Key": 5789802440471445818, + "Value": 2 + }, + { + "Key": 8348694667250199036, + "Value": 1 + }, + { + "Key": 8452971738487658154, + "Value": 1 + }, + { + "Key": 10204019744198319120, + "Value": 1 + }, + { + "Key": 16802392214997617505, + "Value": 1 + } + ] + } + } + } + } + } +} \ No newline at end of file diff --git a/Gems/ScriptCanvasTesting/Code/Source/Framework/ScriptCanvasTestFixture.h b/Gems/ScriptCanvasTesting/Code/Source/Framework/ScriptCanvasTestFixture.h index f45b74d4f1..7239d1e747 100644 --- a/Gems/ScriptCanvasTesting/Code/Source/Framework/ScriptCanvasTestFixture.h +++ b/Gems/ScriptCanvasTesting/Code/Source/Framework/ScriptCanvasTestFixture.h @@ -10,10 +10,8 @@ #include #include -#include #include #include -#include #include #include #include @@ -67,7 +65,6 @@ namespace ScriptCanvasTests { ScriptCanvasEditor::TraceSuppressionBus::Broadcast(&ScriptCanvasEditor::TraceSuppressionRequests::SuppressPrintf, true); AZ::ComponentApplication::Descriptor descriptor; - descriptor.m_enableDrilling = false; descriptor.m_useExistingAllocator = true; AZ::DynamicModuleDescriptor dynamicModuleDescriptor; @@ -91,14 +88,6 @@ namespace ScriptCanvasTests AZ::IO::FileIOBase* fileIO = AZ::IO::FileIOBase::GetInstance(); AZ_Assert(fileIO, "SC unit tests require filehandling"); - if (!fileIO->GetAlias("@engroot@")) - { - const char* engineRoot = nullptr; - AzFramework::ApplicationRequests::Bus::BroadcastResult(engineRoot, &AzFramework::ApplicationRequests::GetEngineRoot); - AZ_Assert(engineRoot, "null engine root"); - fileIO->SetAlias("@engroot@", engineRoot); - } - s_setupSucceeded = fileIO->GetAlias("@engroot@") != nullptr; AZ::TickBus::AllowFunctionQueuing(true); diff --git a/Gems/ScriptCanvasTesting/Code/Source/Framework/ScriptCanvasTestUtilities.cpp b/Gems/ScriptCanvasTesting/Code/Source/Framework/ScriptCanvasTestUtilities.cpp index f69412358f..d7f6ac7e88 100644 --- a/Gems/ScriptCanvasTesting/Code/Source/Framework/ScriptCanvasTestUtilities.cpp +++ b/Gems/ScriptCanvasTesting/Code/Source/Framework/ScriptCanvasTestUtilities.cpp @@ -6,13 +6,11 @@ * */ -#include #include #include #include #include #include -#include #include #include #include diff --git a/Gems/ScriptCanvasTesting/Code/Source/Nodes/BehaviorContextObjectTestNode.h b/Gems/ScriptCanvasTesting/Code/Source/Nodes/BehaviorContextObjectTestNode.h index cc7bda1c95..da07ac64a2 100644 --- a/Gems/ScriptCanvasTesting/Code/Source/Nodes/BehaviorContextObjectTestNode.h +++ b/Gems/ScriptCanvasTesting/Code/Source/Nodes/BehaviorContextObjectTestNode.h @@ -48,6 +48,7 @@ namespace ScriptCanvasTestingNodes if (AZ::BehaviorContext* behaviorContext = azrtti_cast(context)) { behaviorContext->Class() + ->Attribute(AZ::Script::Attributes::ExcludeFrom, AZ::Script::Attributes::ExcludeFlags::All) ->Attribute(AZ::Script::Attributes::Category, "Tests/Behavior Context") ->Method("SetString", &BehaviorContextObjectTest::SetString) ->Method("GetString", &BehaviorContextObjectTest::GetString) diff --git a/Gems/ScriptCanvasTesting/Code/Source/Nodes/Nodeables/ValuePointerReferenceExample.ScriptCanvasNodeable.xml b/Gems/ScriptCanvasTesting/Code/Source/Nodes/Nodeables/ValuePointerReferenceExample.ScriptCanvasNodeable.xml index 0be3c8c81a..a2a89509e6 100644 --- a/Gems/ScriptCanvasTesting/Code/Source/Nodes/Nodeables/ValuePointerReferenceExample.ScriptCanvasNodeable.xml +++ b/Gems/ScriptCanvasTesting/Code/Source/Nodes/Nodeables/ValuePointerReferenceExample.ScriptCanvasNodeable.xml @@ -1,13 +1,22 @@ + + + @@ -24,9 +33,10 @@ PreferredClassName="Branch Input Type Example" Base="ScriptCanvas::Nodeable" Icon="Icons/ScriptCanvas/Placeholder.png" - Category="Tests" + Category="Examples" GeneratePropertyFriend="True" Namespace="None" + EditAttributes="AZ::Script::Attributes::ExcludeFrom@AZ::Script::Attributes::ExcludeFlags::All" Description="Example of branch passing as input by value, pointer and reference."> @@ -46,9 +56,10 @@ PreferredClassName="Input Type Example" Base="ScriptCanvas::Nodeable" Icon="Icons/ScriptCanvas/Placeholder.png" - Category="Tests" + Category="Examples" GeneratePropertyFriend="True" Namespace="None" + EditAttributes="AZ::Script::Attributes::ExcludeFrom@AZ::Script::Attributes::ExcludeFlags::All" Description="Example of passing as input by value, pointer and reference."> @@ -65,9 +76,10 @@ PreferredClassName="Property Example" Base="ScriptCanvas::Nodeable" Icon="Icons/ScriptCanvas/Placeholder.png" - Category="Tests" + Category="Examples" GeneratePropertyFriend="True" Namespace="None" + EditAttributes="AZ::Script::Attributes::ExcludeFrom@AZ::Script::Attributes::ExcludeFlags::All" Description="Example of using properties."> diff --git a/Gems/ScriptCanvasTesting/Code/Source/ScriptCanvasTestBus.cpp b/Gems/ScriptCanvasTesting/Code/Source/ScriptCanvasTestBus.cpp index c8db1169ed..c983717a0d 100644 --- a/Gems/ScriptCanvasTesting/Code/Source/ScriptCanvasTestBus.cpp +++ b/Gems/ScriptCanvasTesting/Code/Source/ScriptCanvasTestBus.cpp @@ -26,9 +26,12 @@ namespace ScriptCanvasTesting if (AZ::BehaviorContext* behaviorContext = azrtti_cast(context)) { - behaviorContext->EnumProperty<(AZ::u32)TestEnum::Alpha>("ALPHA"); - behaviorContext->EnumProperty<(AZ::u32)TestEnum::Bravo>("BRAVO"); - behaviorContext->EnumProperty<(AZ::u32)TestEnum::Charlie>("CHARLIE"); + behaviorContext->EnumProperty<(AZ::u32)TestEnum::Alpha>("ALPHA") + ->Attribute(AZ::Script::Attributes::ExcludeFrom, AZ::Script::Attributes::ExcludeFlags::All); + behaviorContext->EnumProperty<(AZ::u32)TestEnum::Bravo>("BRAVO") + ->Attribute(AZ::Script::Attributes::ExcludeFrom, AZ::Script::Attributes::ExcludeFlags::All); + behaviorContext->EnumProperty<(AZ::u32)TestEnum::Charlie>("CHARLIE") + ->Attribute(AZ::Script::Attributes::ExcludeFrom, AZ::Script::Attributes::ExcludeFlags::All); } } @@ -111,6 +114,7 @@ namespace ScriptCanvasTesting modVoidDesc.m_eventName = "OnEvent-ZeroParam"; behaviorContext->EBus("GlobalEBus") + ->Attribute(AZ::Script::Attributes::ExcludeFrom, AZ::Script::Attributes::ExcludeFlags::All) ->Attribute(AZ::Script::Attributes::Scope, AZ::Script::Attributes::ScopeFlags::Common) ->Handler() ->Event("AppendSweet", &GlobalEBus::Events::AppendSweet) @@ -193,6 +197,7 @@ namespace ScriptCanvasTesting if (AZ::BehaviorContext* behaviorContext = azrtti_cast(context)) { behaviorContext->EBus("PerformanceStressEBus") + ->Attribute(AZ::Script::Attributes::ExcludeFrom, AZ::Script::Attributes::ExcludeFlags::All) ->Handler() ->Event("ForceStringCompare0", &PerformanceStressEBus::Events::ForceStringCompare0) ->Event("ForceStringCompare1", &PerformanceStressEBus::Events::ForceStringCompare1) @@ -248,6 +253,7 @@ namespace ScriptCanvasTesting if (AZ::BehaviorContext* behaviorContext = azrtti_cast(context)) { behaviorContext->EBus("LocalEBus") + ->Attribute(AZ::Script::Attributes::ExcludeFrom, AZ::Script::Attributes::ExcludeFlags::All) ->Attribute(AZ::Script::Attributes::Scope, AZ::Script::Attributes::ScopeFlags::Common) ->Handler() ->Event("AppendSweet", &LocalEBus::Events::AppendSweet) @@ -262,6 +268,7 @@ namespace ScriptCanvasTesting if (AZ::BehaviorContext* behaviorContext = azrtti_cast(context)) { behaviorContext->EBus("NativeHandlingOnlyEBus") + ->Attribute(AZ::Script::Attributes::ExcludeFrom, AZ::Script::Attributes::ExcludeFlags::All) ->Attribute(AZ::Script::Attributes::Scope, AZ::Script::Attributes::ScopeFlags::Common) ->Event("AppendSweet", &NativeHandlingOnlyEBus::Events::AppendSweet) ->Event("Increment", &NativeHandlingOnlyEBus::Events::Increment) diff --git a/Gems/ScriptCanvasTesting/Code/Tests/ScriptCanvas_VM.cpp b/Gems/ScriptCanvasTesting/Code/Tests/ScriptCanvas_VM.cpp index 2a20ca84df..2c455d80f5 100644 --- a/Gems/ScriptCanvasTesting/Code/Tests/ScriptCanvas_VM.cpp +++ b/Gems/ScriptCanvasTesting/Code/Tests/ScriptCanvas_VM.cpp @@ -25,126 +25,6 @@ using namespace ScriptCanvasTests; using namespace TestNodes; using namespace ScriptCanvas::Execution; -// TODO: This fails to compile on Linux only -//ScriptCanvas::Grammar::SubgraphInterface* CreateExecutionMap(AZ::BehaviorContext& behaviorContext) -//{ -// using namespace ScriptCanvas; -// using namespace ScriptCanvas::Grammar; -// -// auto ins = CreateInsFromBehaviorContextMethods("TestNodeableObject", behaviorContext, { "Branch" } ); -// auto branchOutVoidTrue = CreateOut("BranchTrue", { "condition", "message" }); -// auto branchOutVoidFalse = CreateOut("BranchFalse", { "condition", "message", "vector" }); -// -// auto branchOut = FindInByName("Branch", ins); -// -// EXPECT_NE(branchOut, nullptr); -// if (branchOut) -// { -// branchOut->outs.emplace_back(AZStd::move(branchOutVoidTrue)); -// branchOut->outs.emplace_back(AZStd::move(branchOutVoidFalse)); -// } -// -// return aznew SubgraphInterface(AZStd::move(ins)); -//} - - -TEST_F(ScriptCanvasTestFixture, TestLuaObjectOrientation) -{ - using namespace ScriptCanvas; - using namespace ScriptCanvas::Grammar; - - AZ::ScriptContext sc; - sc.BindTo(m_behaviorContext); - RegisterAPI(sc.NativeContext()); - EXPECT_TRUE(sc.Execute( - R"LUA( - -assert(Nodeable ~= nil, 'Nodeable was nill') -assert(Nodeable.__call ~= nil, 'Nodeable.__call was nil') -assert(type(Nodeable.__call) == 'function', 'Nodeable.__call was not a function') - -local nodeable = Nodeable() -assert(nodeable ~= nil, 'nodeable was nil') -assert(type(nodeable) == "userdata", 'nodeable not userdata') - -local SubGraph = {} -SubGraph.s_name = "SubGraphery" -SubGraph.s_createdCount = 0 -function SubGraph:IncrementCreated() - SubGraph.s_createdCount = 1 + SubGraph.s_createdCount -end - -setmetatable(SubGraph, { __index = Nodeable }) -- exposed through BehaviorContext -local SubGraphInstanceMetatable = { __index = SubGraph } - -assert(getmetatable(SubGraph).__index == Nodeable, 'getmetatable(SubGraph).__index = Nodeable') -assert(type(getmetatable(SubGraph).__index) == 'table', "type(getmetatable(SubGraph).__index) ~= 'table'") - -function SubGraph.new() -- Add executionState input here and to Nodeable() - -- now individual instance values can be initialized - local instance = OverrideNodeableMetatable(Nodeable(), SubGraphInstanceMetatable) - assert(type(instance.s_createdCount) == 'number', 'subgraph.s_createdCount was not a number') - instance:IncrementCreated() - instance.name = 'SubGraph '..tostring(instance.s_createdCount) - return instance -end - -function SubGraph.newTable() -- Add executionState input here and to Nodeable() - -- now individual instance values can be initialized - local instance = setmetatable({}, SubGraphInstanceMetatable) - -- assert(getmetatable(instance) == SubGraphInstanceMetatable, "subgraphT") - assert(type(instance.s_createdCount) == 'number', 'subgraphT.s_createdCount was not a number') - instance:IncrementCreated() - instance.name = 'SubGraph '..tostring(instance.s_createdCount) - return instance -end - -function SubGraph:Foo() - return "I, " .. tostring(self.name) .. ", am a user function" -end - -local subgraphT = SubGraph.newTable() -assert(subgraphT ~= nil, "subgraphT was nil") -assert(type(subgraphT) == 'table', 'subgraphT was not a table') -assert(type(subgraphT.IsActive)== 'function', "subgraphT IsActive was not a function") -assert(type(subgraphT.Foo) == 'function', 'subgraphT was not a function') -local subgraphTResult = subgraphT:Foo() -assert(subgraphTResult == "I, SubGraph 1, am a user function", 'subgraphT did not return the right results:' .. tostring(subgraphTResult)) -assert(subgraphT.s_createdCount == 1, "subgraphT created count was not one: ".. tostring(subgraphT.s_createdCount)) -subgraphT = SubGraph.newTable() -assert(subgraphT.s_createdCount == 2, "subgraphT created count was not two: ".. tostring(subgraphT.s_createdCount)) - -local subgraph = SubGraph.new() -assert(subgraph ~= nil, "subgraph was nil") -assert(type(subgraph) == 'userdata', 'was not userdata') -assert(type(subgraph.IsActive)== 'function', "IsActive was not a function") -assert(not subgraph.IsActive(subgraph), "did not inherit properly") -assert(not subgraph:IsActive(), "did not inherit properly") -assert(type(subgraph.Foo) == 'function', 'was not a function') -local subgraphResult = subgraph:Foo() -assert(subgraphResult == "I, SubGraph 3, am a user function", 'subgraph:Foo() did not return the right results: ' .. tostring(subgraphResult)) -assert(subgraph.s_createdCount == 3, "created count was not three: "..tostring(subgraph.s_createdCount)) - -local subgraph2 = SubGraph.new() -assert(subgraph2 ~= nil, "subgraph2 was nil") -assert(type(subgraph2) == 'userdata', 'subgraph2 was not userdata') -assert(type(subgraph2.IsActive)== 'function', "subgraph2 IsActive was not a function") -assert(not subgraph2.IsActive(subgraph2), "subgraph2 did not inherit properly") -assert(not subgraph2:IsActive(), "subgraph2 did not inherit properly") -assert(type(subgraph2.Foo) == 'function', 'subgraph2 was not a function') -local subgraph2Result = subgraph2:Foo() -assert(subgraph2Result == "I, SubGraph 4, am a user function", 'subgraph2:Foo() did not return the right results: ' .. tostring(subgraph2Result)) -assert(subgraph2.s_createdCount == 4, "created count was not three: "..tostring(subgraph2.s_createdCount)) - -return SubGraph - -)LUA" -)); - -} - - -// // TEST_F(ScriptCanvasTestFixture, NativeNodeableStack) // { // TestNodeableObject nodeable; diff --git a/Gems/ScriptCanvasTesting/gem.json b/Gems/ScriptCanvasTesting/gem.json index c45d2ac165..5cb718e674 100644 --- a/Gems/ScriptCanvasTesting/gem.json +++ b/Gems/ScriptCanvasTesting/gem.json @@ -2,6 +2,7 @@ "gem_name": "ScriptCanvasTesting", "display_name": "Script Canvas Testing", "license": "Apache-2.0 Or MIT", + "license_url": "https://github.com/o3de/o3de/blob/development/LICENSE.txt", "origin": "Open 3D Engine - o3de.org", "type": "Tool", "summary": "The Script Canvas Testing Gem provides a framework for testing for and with Script Canvas.", diff --git a/Gems/ScriptEvents/Code/Include/ScriptEvents/Components/ScriptEventReferencesComponent.cpp b/Gems/ScriptEvents/Code/Include/ScriptEvents/Components/ScriptEventReferencesComponent.cpp deleted file mode 100644 index 696d2af4d2..0000000000 --- a/Gems/ScriptEvents/Code/Include/ScriptEvents/Components/ScriptEventReferencesComponent.cpp +++ /dev/null @@ -1,92 +0,0 @@ -/* - * Copyright (c) Contributors to the Open 3D Engine Project. - * For complete copyright and license terms please see the LICENSE at the root of this distribution. - * - * SPDX-License-Identifier: Apache-2.0 OR MIT - * - */ - -#include "ScriptEventReferencesComponent.h" - -namespace ScriptEvents -{ - namespace Components - { - void ScriptEventReferencesComponent::Reflect(AZ::ReflectContext* context) - { - if (AZ::SerializeContext* serializeContext = azrtti_cast(context)) - { - // The Script Event References component is no longer necessary, as all Script Event assets - // will be properly loaded as needed. - serializeContext->ClassDeprecate("ScriptEventReferencesComponent", "{D0F440AC-32D4-49EC-8B93-860B188266A6}"); - } - } - - void ScriptEventReferencesComponent::Activate() - { - for (auto& scriptEventReferences : m_scriptEventAssets) - { - const auto& asset = scriptEventReferences.GetAsset(); - if (asset) - { - if (!AZ::Data::AssetBus::MultiHandler::BusIsConnectedId(asset.GetId())) - { - AZ::Data::AssetBus::MultiHandler::BusConnect(asset.GetId()); - } - - // Load the asset if it's not ready - if (!asset.IsReady()) - { - AZ::Data::AssetInfo assetInfo; - AZ::Data::AssetCatalogRequestBus::BroadcastResult(assetInfo, &AZ::Data::AssetCatalogRequests::GetAssetInfoById, asset.GetId()); - if (assetInfo.m_assetId.IsValid()) - { - AZ::Data::AssetManager::Instance().GetAsset(asset.GetId(), azrtti_typeid(), AZ::Data::AssetLoadBehavior::Default) - .BlockUntilLoadComplete(); - } - } - } - else - { - AZ_Warning("Script Events", false, "ScriptEventReferencesComponent could not find Script Event asset: %s", scriptEventReferences.GetDefinition() ? scriptEventReferences.GetDefinition()->GetName().c_str() : scriptEventReferences.GetAsset().GetId().ToString().c_str()); - } - } - } - - void ScriptEventReferencesComponent::Deactivate() - { - for (auto& scriptEventReferences : m_scriptEventAssets) - { - const auto& asset = scriptEventReferences.GetAsset(); - if (asset) - { - AZ::Data::AssetBus::MultiHandler::BusDisconnect(asset.GetId()); - } - } - } - - void ScriptEventReferencesComponent::GetProvidedServices(AZ::ComponentDescriptor::DependencyArrayType& provided) - { - provided.push_back(AZ_CRC("ScriptEventReference", 0x3df92d40)); - } - - void ScriptEventReferencesComponent::GetIncompatibleServices(AZ::ComponentDescriptor::DependencyArrayType& incompatible) - { - incompatible.push_back(AZ_CRC("ScriptEventReference", 0x3df92d40)); - } - - void ScriptEventReferencesComponent::GetDependentServices(AZ::ComponentDescriptor::DependencyArrayType& dependent) - { - dependent.push_back(AZ_CRC("LuaScriptService", 0x21d76c4b)); - } - - void ScriptEventReferencesComponent::OnAssetReady(AZ::Data::Asset asset) - { - if (ScriptEventsAsset* scriptEventAsset = asset.GetAs()) - { - scriptEventAsset->m_definition.RegisterInternal(); - } - } - - } -} diff --git a/Gems/ScriptEvents/Code/Include/ScriptEvents/Components/ScriptEventReferencesComponent.h b/Gems/ScriptEvents/Code/Include/ScriptEvents/Components/ScriptEventReferencesComponent.h deleted file mode 100644 index 562cab9b52..0000000000 --- a/Gems/ScriptEvents/Code/Include/ScriptEvents/Components/ScriptEventReferencesComponent.h +++ /dev/null @@ -1,44 +0,0 @@ -/* - * Copyright (c) Contributors to the Open 3D Engine Project. - * For complete copyright and license terms please see the LICENSE at the root of this distribution. - * - * SPDX-License-Identifier: Apache-2.0 OR MIT - * - */ - -#pragma once - -#include -#include - -namespace ScriptEvents -{ - namespace Components - { - class ScriptEventReferencesComponent - : public AZ::Component - , private AZ::Data::AssetBus::MultiHandler - - { - public: - - AZ_COMPONENT(ScriptEventReferencesComponent, "{D0F440AC-32D4-49EC-8B93-860B188266A6}", AZ::Component); - - ////////////////////////////////////////////////////////////////////////// - // AZ::Component - void Init() override {} - void Activate() override; - void Deactivate() override; - ////////////////////////////////////////////////////////////////////////// - - static void GetProvidedServices(AZ::ComponentDescriptor::DependencyArrayType& provided); - static void GetIncompatibleServices(AZ::ComponentDescriptor::DependencyArrayType& incompatible); - static void GetDependentServices(AZ::ComponentDescriptor::DependencyArrayType& dependent); - - void OnAssetReady(AZ::Data::Asset asset) override; - static void Reflect(AZ::ReflectContext* reflection); - - AZStd::vector m_scriptEventAssets; - }; - } -} diff --git a/Gems/ScriptEvents/Code/Source/Editor/ScriptEventsEditorGem.cpp b/Gems/ScriptEvents/Code/Source/Editor/ScriptEventsEditorGem.cpp index 8ab014ec15..3dec167f73 100644 --- a/Gems/ScriptEvents/Code/Source/Editor/ScriptEventsEditorGem.cpp +++ b/Gems/ScriptEvents/Code/Source/Editor/ScriptEventsEditorGem.cpp @@ -9,7 +9,6 @@ #include #include -#include #include #include @@ -74,7 +73,6 @@ namespace ScriptEvents m_descriptors.insert(m_descriptors.end(), { ScriptEventsEditor::ScriptEventEditorSystemComponent::CreateDescriptor(), - ScriptEvents::Components::ScriptEventReferencesComponent::CreateDescriptor(), ScriptEventsBuilder::ScriptEventsBuilderComponent::CreateDescriptor(), }); } diff --git a/Gems/ScriptEvents/Code/Source/ScriptEventsGem.cpp b/Gems/ScriptEvents/Code/Source/ScriptEventsGem.cpp index e4fb44f548..bc46993649 100644 --- a/Gems/ScriptEvents/Code/Source/ScriptEventsGem.cpp +++ b/Gems/ScriptEvents/Code/Source/ScriptEventsGem.cpp @@ -12,8 +12,6 @@ #include -#include - namespace ScriptEvents { ScriptEventsModule::ScriptEventsModule() @@ -23,8 +21,7 @@ namespace ScriptEvents ScriptEventModuleConfigurationRequestBus::Handler::BusConnect(); m_descriptors.insert(m_descriptors.end(), { - ScriptEvents::ScriptEventsSystemComponent::CreateDescriptor(), - ScriptEvents::Components::ScriptEventReferencesComponent::CreateDescriptor(), + ScriptEvents::ScriptEventsSystemComponent::CreateDescriptor() }); } diff --git a/Gems/ScriptEvents/Code/Tests/ScriptEventsTestFixture.h b/Gems/ScriptEvents/Code/Tests/ScriptEventsTestFixture.h index 53d4fd58b9..0db1f1143d 100644 --- a/Gems/ScriptEvents/Code/Tests/ScriptEventsTestFixture.h +++ b/Gems/ScriptEvents/Code/Tests/ScriptEventsTestFixture.h @@ -58,7 +58,6 @@ namespace ScriptEventsTests { AZ::ComponentApplication::Descriptor descriptor; - descriptor.m_enableDrilling = false; // We'll manage our own driller in these tests descriptor.m_useExistingAllocator = true; // Use the SystemAllocator we own in this test. appStartup.m_createStaticModulesCallback = diff --git a/Gems/ScriptEvents/Code/scriptevents_common_files.cmake b/Gems/ScriptEvents/Code/scriptevents_common_files.cmake index a7ecd9e049..a038bb2c90 100644 --- a/Gems/ScriptEvents/Code/scriptevents_common_files.cmake +++ b/Gems/ScriptEvents/Code/scriptevents_common_files.cmake @@ -42,6 +42,4 @@ set(FILES Include/ScriptEvents/Internal/BehaviorContextBinding/ScriptEventsBindingBus.h Include/ScriptEvents/Internal/BehaviorContextBinding/ScriptEventBinding.h Include/ScriptEvents/Internal/BehaviorContextBinding/ScriptEventBinding.cpp - Include/ScriptEvents/Components/ScriptEventReferencesComponent.h - Include/ScriptEvents/Components/ScriptEventReferencesComponent.cpp ) diff --git a/Gems/ScriptEvents/gem.json b/Gems/ScriptEvents/gem.json index 386d9b5614..5640e08489 100644 --- a/Gems/ScriptEvents/gem.json +++ b/Gems/ScriptEvents/gem.json @@ -2,6 +2,7 @@ "gem_name": "ScriptEvents", "display_name": "Script Events", "license": "Apache-2.0 Or MIT", + "license_url": "https://github.com/o3de/o3de/blob/development/LICENSE.txt", "origin": "Open 3D Engine - o3de.org", "type": "Code", "summary": "The Script Events Gem provides a framework for creating event assets usable from any scripting solution in Open 3D Engine.", diff --git a/Gems/ScriptedEntityTweener/gem.json b/Gems/ScriptedEntityTweener/gem.json index c51f05df9a..477345093c 100644 --- a/Gems/ScriptedEntityTweener/gem.json +++ b/Gems/ScriptedEntityTweener/gem.json @@ -2,6 +2,7 @@ "gem_name": "ScriptedEntityTweener", "display_name": "Scripted Entity Tweener", "license": "Apache-2.0 Or MIT", + "license_url": "https://github.com/o3de/o3de/blob/development/LICENSE.txt", "origin": "Open 3D Engine - o3de.org", "type": "Tool", "summary": "The Scripted Entity Tweener Gem provides a script driven animation system for Open 3D Engine projects.", diff --git a/Gems/SliceFavorites/gem.json b/Gems/SliceFavorites/gem.json index 84f42fc1a2..c4536dc042 100644 --- a/Gems/SliceFavorites/gem.json +++ b/Gems/SliceFavorites/gem.json @@ -2,6 +2,7 @@ "gem_name": "SliceFavorites", "display_name": "SliceFavorites", "license": "Apache-2.0 Or MIT", + "license_url": "https://github.com/o3de/o3de/blob/development/LICENSE.txt", "origin": "Open 3D Engine - o3de.org", "type": "Code", "summary": "Add the ability to favorite a slice to allow easy access and instantiation", diff --git a/Gems/StartingPointCamera/Code/Include/StartingPointCamera/StartingPointCameraConstants.h b/Gems/StartingPointCamera/Code/Include/StartingPointCamera/StartingPointCameraConstants.h index 849a462ab2..9a36cf5222 100644 --- a/Gems/StartingPointCamera/Code/Include/StartingPointCamera/StartingPointCameraConstants.h +++ b/Gems/StartingPointCamera/Code/Include/StartingPointCamera/StartingPointCameraConstants.h @@ -24,17 +24,6 @@ namespace Camera Z_Axis = 2 }; - ////////////////////////////////////////////////////////////////////////// - /// These are intended to be used as an index and needs to be implicitly - /// convertible to int. See StartingPointCameraUtilities.h for examples - enum VectorComponentType : int - { - X_Component = 0, - Y_Component = 1, - Z_Component = 2, - None = 3, - }; - ////////////////////////////////////////////////////////////////////////// /// These are intended to be used as an index and needs to be implicitly /// convertible to int. See StartingPointCameraUtilities.h for examples diff --git a/Gems/StartingPointCamera/Code/Include/StartingPointCamera/StartingPointCameraUtilities.h b/Gems/StartingPointCamera/Code/Include/StartingPointCamera/StartingPointCameraUtilities.h index eec86059c5..c565bf9379 100644 --- a/Gems/StartingPointCamera/Code/Include/StartingPointCamera/StartingPointCameraUtilities.h +++ b/Gems/StartingPointCamera/Code/Include/StartingPointCamera/StartingPointCameraUtilities.h @@ -16,24 +16,16 @@ namespace Camera { const char* GetNameFromUuid(const AZ::Uuid& uuid); - ////////////////////////////////////////////////////////////////////////// - /// This methods will 0 out a vector component and re-normalize it - ////////////////////////////////////////////////////////////////////////// - void MaskComponentFromNormalizedVector(AZ::Vector3& v, VectorComponentType vectorComponentType); + //! This methods will 0 out specified vector components and re-normalize it + void MaskComponentFromNormalizedVector(AZ::Vector3& v, bool ignoreX, bool ignoreY, bool ignoreZ); - ////////////////////////////////////////////////////////////////////////// - /// This will calculate the requested Euler angle from a given AZ::Quaternion - ////////////////////////////////////////////////////////////////////////// + //! This will calculate the requested Euler angle from a given AZ::Quaternion float GetEulerAngleFromTransform(const AZ::Transform& rotation, EulerAngleType eulerAngleType); - ////////////////////////////////////////////////////////////////////////// - /// This will calculate an AZ::Transform based on an Euler angle - ////////////////////////////////////////////////////////////////////////// + //! This will calculate an AZ::Transform based on an Euler angle AZ::Transform CreateRotationFromEulerAngle(EulerAngleType rotationType, float radians); - ////////////////////////////////////////////////////////////////////////// - /// Creates the Quaternion representing the rotation looking down the vector - ////////////////////////////////////////////////////////////////////////// + //! Creates the Quaternion representing the rotation looking down the vector AZ::Quaternion CreateQuaternionFromViewVector(const AZ::Vector3 lookVector); } //namespace Camera diff --git a/Gems/StartingPointCamera/Code/Source/CameraLookAtBehaviors/SlideAlongAxisBasedOnAngle.cpp b/Gems/StartingPointCamera/Code/Source/CameraLookAtBehaviors/SlideAlongAxisBasedOnAngle.cpp index d7fcc771f4..1d8d6adf6c 100644 --- a/Gems/StartingPointCamera/Code/Source/CameraLookAtBehaviors/SlideAlongAxisBasedOnAngle.cpp +++ b/Gems/StartingPointCamera/Code/Source/CameraLookAtBehaviors/SlideAlongAxisBasedOnAngle.cpp @@ -9,8 +9,8 @@ #include "SlideAlongAxisBasedOnAngle.h" #include "StartingPointCamera/StartingPointCameraUtilities.h" #include -#include #include +#include namespace Camera { @@ -20,48 +20,79 @@ namespace Camera if (serializeContext) { serializeContext->Class() - ->Version(1) + ->Version(2) ->Field("Axis to slide along", &SlideAlongAxisBasedOnAngle::m_axisToSlideAlong) ->Field("Angle Type", &SlideAlongAxisBasedOnAngle::m_angleTypeToChangeFor) - ->Field("Vector Component To Ignore", &SlideAlongAxisBasedOnAngle::m_vectorComponentToIgnore) + ->Field("Ignore X Component", &SlideAlongAxisBasedOnAngle::m_ignoreX) + ->Field("Ignore Y Component", &SlideAlongAxisBasedOnAngle::m_ignoreY) + ->Field("Ignore Z Component", &SlideAlongAxisBasedOnAngle::m_ignoreZ) ->Field("Max Positive Slide Distance", &SlideAlongAxisBasedOnAngle::m_maximumPositiveSlideDistance) ->Field("Max Negative Slide Distance", &SlideAlongAxisBasedOnAngle::m_maximumNegativeSlideDistance); AZ::EditContext* editContext = serializeContext->GetEditContext(); if (editContext) { - editContext->Class("SlideAlongAxisBasedOnAngle", "Slide 0..SlideDistance along Axis based on Angle Type. Maps from 90..-90 degrees") - ->ClassElement(AZ::Edit::ClassElements::EditorData, "") - ->DataElement(AZ::Edit::UIHandlers::ComboBox, &SlideAlongAxisBasedOnAngle::m_axisToSlideAlong, "Axis to slide along", "The Axis to slide along") - ->EnumAttribute(RelativeAxisType::ForwardBackward, "Forwards and Backwards") - ->EnumAttribute(RelativeAxisType::LeftRight, "Right and Left") - ->EnumAttribute(RelativeAxisType::UpDown, "Up and Down") - ->DataElement(AZ::Edit::UIHandlers::ComboBox, &SlideAlongAxisBasedOnAngle::m_angleTypeToChangeFor, "Angle Type", "The angle type to base the slide off of") - ->EnumAttribute(EulerAngleType::Pitch, "Pitch") - ->EnumAttribute(EulerAngleType::Roll, "Roll") - ->EnumAttribute(EulerAngleType::Yaw, "Yaw") - ->DataElement(AZ::Edit::UIHandlers::ComboBox, &SlideAlongAxisBasedOnAngle::m_vectorComponentToIgnore, "Vector Component To Ignore", "The Vector Component To Ignore") - ->EnumAttribute(VectorComponentType::None, "None") - ->EnumAttribute(VectorComponentType::X_Component, "X") - ->EnumAttribute(VectorComponentType::Y_Component, "Y") - ->EnumAttribute(VectorComponentType::Z_Component, "Z") - ->DataElement(0, &SlideAlongAxisBasedOnAngle::m_maximumPositiveSlideDistance, "Max Positive Slide Distance", "The maximum distance to slide in the positive") - ->Attribute(AZ::Edit::Attributes::Suffix, "m") - ->DataElement(0, &SlideAlongAxisBasedOnAngle::m_maximumNegativeSlideDistance, "Max Negative Slide Distance", "The maximum distance to slide in the negative") - ->Attribute(AZ::Edit::Attributes::Suffix, "m"); + editContext->Class("SlideAlongAxisBasedOnAngle", + "Slide 0..SlideDistance along Axis based on Angle Type. Maps from 90..-90 degrees") + ->ClassElement(AZ::Edit::ClassElements::EditorData, "") + ->DataElement(AZ::Edit::UIHandlers::ComboBox, &SlideAlongAxisBasedOnAngle::m_axisToSlideAlong, "Axis to slide along", + "The Axis to slide along") + ->EnumAttribute(RelativeAxisType::ForwardBackward, "Forwards and Backwards") + ->EnumAttribute(RelativeAxisType::LeftRight, "Right and Left") + ->EnumAttribute(RelativeAxisType::UpDown, "Up and Down") + ->DataElement(AZ::Edit::UIHandlers::ComboBox, &SlideAlongAxisBasedOnAngle::m_angleTypeToChangeFor, "Angle Type", + "The angle type to base the slide off of") + ->EnumAttribute(EulerAngleType::Pitch, "Pitch") + ->EnumAttribute(EulerAngleType::Roll, "Roll") + ->EnumAttribute(EulerAngleType::Yaw, "Yaw") + ->DataElement(0, &SlideAlongAxisBasedOnAngle::m_maximumPositiveSlideDistance, "Max Positive Slide Distance", + "The maximum distance to slide in the positive") + ->Attribute(AZ::Edit::Attributes::Suffix, "m") + ->DataElement(0, &SlideAlongAxisBasedOnAngle::m_maximumNegativeSlideDistance, "Max Negative Slide Distance", + "The maximum distance to slide in the negative") + ->Attribute(AZ::Edit::Attributes::Suffix, "m") + ->ClassElement(AZ::Edit::ClassElements::Group, "Vector Components To Ignore") + ->Attribute(AZ::Edit::Attributes::AutoExpand, true) + ->DataElement(0, &SlideAlongAxisBasedOnAngle::m_ignoreX, "X", "When active, the X Component will be ignored.") + ->Attribute(AZ::Edit::Attributes::ReadOnly, &SlideAlongAxisBasedOnAngle::YAndZIgnored) + ->Attribute(AZ::Edit::Attributes::ChangeNotify, AZ::Edit::PropertyRefreshLevels::AttributesAndValues) + ->DataElement(0, &SlideAlongAxisBasedOnAngle::m_ignoreY, "Y", "When active, the Y Component will be ignored.") + ->Attribute(AZ::Edit::Attributes::ReadOnly, &SlideAlongAxisBasedOnAngle::XAndZIgnored) + ->Attribute(AZ::Edit::Attributes::ChangeNotify, AZ::Edit::PropertyRefreshLevels::AttributesAndValues) + ->DataElement(0, &SlideAlongAxisBasedOnAngle::m_ignoreZ, "Z", "When active, the Z Component will be ignored.") + ->Attribute(AZ::Edit::Attributes::ReadOnly, &SlideAlongAxisBasedOnAngle::XAndYIgnored) + ->Attribute(AZ::Edit::Attributes::ChangeNotify, AZ::Edit::PropertyRefreshLevels::AttributesAndValues) + ; } } } - void SlideAlongAxisBasedOnAngle::AdjustLookAtTarget([[maybe_unused]] float deltaTime, [[maybe_unused]] const AZ::Transform& targetTransform, AZ::Transform& outLookAtTargetTransform) + void SlideAlongAxisBasedOnAngle::AdjustLookAtTarget( + [[maybe_unused]] float deltaTime, [[maybe_unused]] const AZ::Transform& targetTransform, AZ::Transform& outLookAtTargetTransform) { float angle = GetEulerAngleFromTransform(outLookAtTargetTransform, m_angleTypeToChangeFor); float currentPositionOnRange = -angle / AZ::Constants::HalfPi; float slideScale = currentPositionOnRange > 0.0f ? m_maximumPositiveSlideDistance : m_maximumNegativeSlideDistance; AZ::Vector3 basis = outLookAtTargetTransform.GetBasis(m_axisToSlideAlong); - MaskComponentFromNormalizedVector(basis, m_vectorComponentToIgnore); + MaskComponentFromNormalizedVector(basis, m_ignoreX, m_ignoreY, m_ignoreZ); outLookAtTargetTransform.SetTranslation(outLookAtTargetTransform.GetTranslation() + basis * currentPositionOnRange * slideScale); } -} + + bool SlideAlongAxisBasedOnAngle::XAndYIgnored() const + { + return m_ignoreX && m_ignoreY; + } + + bool SlideAlongAxisBasedOnAngle::XAndZIgnored() const + { + return m_ignoreX && m_ignoreZ; + } + + bool SlideAlongAxisBasedOnAngle::YAndZIgnored() const + { + return m_ignoreY && m_ignoreZ; + } + +} // namespace Camera diff --git a/Gems/StartingPointCamera/Code/Source/CameraLookAtBehaviors/SlideAlongAxisBasedOnAngle.h b/Gems/StartingPointCamera/Code/Source/CameraLookAtBehaviors/SlideAlongAxisBasedOnAngle.h index 3558fd7272..e517b6ffbd 100644 --- a/Gems/StartingPointCamera/Code/Source/CameraLookAtBehaviors/SlideAlongAxisBasedOnAngle.h +++ b/Gems/StartingPointCamera/Code/Source/CameraLookAtBehaviors/SlideAlongAxisBasedOnAngle.h @@ -6,11 +6,11 @@ * */ #pragma once -#include -#include -#include #include "StartingPointCamera/StartingPointCameraConstants.h" +#include #include +#include +#include namespace Camera { @@ -38,13 +38,19 @@ namespace Camera void Activate(AZ::EntityId) override {} void Deactivate() override {} + bool XAndYIgnored() const; + bool XAndZIgnored() const; + bool YAndZIgnored() const; + private: ////////////////////////////////////////////////////////////////////////// // Reflected data RelativeAxisType m_axisToSlideAlong = ForwardBackward; EulerAngleType m_angleTypeToChangeFor = Pitch; - VectorComponentType m_vectorComponentToIgnore = None; float m_maximumPositiveSlideDistance = 0.0f; float m_maximumNegativeSlideDistance = 0.0f; + bool m_ignoreX = false; + bool m_ignoreY = false; + bool m_ignoreZ = false; }; } // namespace Camera diff --git a/Gems/StartingPointCamera/Code/Source/StartingPointCamera/StartingPointCameraUtilities.cpp b/Gems/StartingPointCamera/Code/Source/StartingPointCamera/StartingPointCameraUtilities.cpp index b8f0945c55..0831ef26e0 100644 --- a/Gems/StartingPointCamera/Code/Source/StartingPointCamera/StartingPointCameraUtilities.cpp +++ b/Gems/StartingPointCamera/Code/Source/StartingPointCamera/StartingPointCameraUtilities.cpp @@ -26,38 +26,32 @@ namespace Camera return ""; } - ////////////////////////////////////////////////////////////////////////// - /// This methods will 0 out a vector component and re-normalize it - ////////////////////////////////////////////////////////////////////////// - void MaskComponentFromNormalizedVector(AZ::Vector3& v, VectorComponentType vectorComponentType) + void MaskComponentFromNormalizedVector(AZ::Vector3& v, bool ignoreX, bool ignoreY, bool ignoreZ) { - switch (vectorComponentType) - { - case X_Component: + + if (ignoreX) { v.SetX(0.f); - break; } - case Y_Component: + + if (ignoreY) { v.SetY(0.f); - break; } - case Z_Component: + + if (ignoreZ) { v.SetZ(0.f); - break; } - default: - AZ_Assert(false, "MaskComponentFromNormalizedVector: VectorComponentType - unexpected value"); - break; + + if (v.IsZero()) + { + AZ_Warning("StartingPointCameraUtilities", false, "MaskComponentFromNormalizedVector: trying to normalize zero vector.") + return; } v.Normalize(); } - ////////////////////////////////////////////////////////////////////////// - /// This will calculate the requested Euler angle from a given AZ::Quaternion - ////////////////////////////////////////////////////////////////////////// float GetEulerAngleFromTransform(const AZ::Transform& rotation, EulerAngleType eulerAngleType) { AZ::Vector3 angles = rotation.GetEulerDegrees(); @@ -70,14 +64,11 @@ namespace Camera case Yaw: return angles.GetZ(); default: - AZ_Warning("", false, "GetEulerAngleFromRotation: eulerAngleType - value not supported"); + AZ_Warning("StartingPointCameraUtilities", false, "GetEulerAngleFromRotation: eulerAngleType - value not supported"); return 0.f; } } - ////////////////////////////////////////////////////////////////////////// - /// This will calculate an AZ::Transform based on an Euler angle - ////////////////////////////////////////////////////////////////////////// AZ::Transform CreateRotationFromEulerAngle(EulerAngleType rotationType, float radians) { switch (rotationType) @@ -89,14 +80,11 @@ namespace Camera case Yaw: return AZ::Transform::CreateRotationZ(radians); default: - AZ_Warning("", false, "CreateRotationFromEulerAngle: rotationType - value not supported"); + AZ_Warning("StartingPointCameraUtilities", false, "CreateRotationFromEulerAngle: rotationType - value not supported"); return AZ::Transform::Identity(); } } - ////////////////////////////////////////////////////////////////////////// - /// Creates the Quaternion representing the rotation looking down the vector - ////////////////////////////////////////////////////////////////////////// AZ::Quaternion CreateQuaternionFromViewVector(const AZ::Vector3 lookVector) { float twoDimensionLength = AZ::Vector2(lookVector.GetX(), lookVector.GetY()).GetLength(); diff --git a/Gems/StartingPointCamera/gem.json b/Gems/StartingPointCamera/gem.json index 613eb76267..1033770022 100644 --- a/Gems/StartingPointCamera/gem.json +++ b/Gems/StartingPointCamera/gem.json @@ -2,6 +2,7 @@ "gem_name": "StartingPointCamera", "display_name": "Starting Point Camera", "license": "Apache-2.0 Or MIT", + "license_url": "https://github.com/o3de/o3de/blob/development/LICENSE.txt", "origin": "Open 3D Engine - o3de.org", "type": "Code", "summary": "The Starting Point Camera Gem provides the behaviors used with the Camera Framework Gem to define a camera rig.", diff --git a/Gems/StartingPointInput/gem.json b/Gems/StartingPointInput/gem.json index d2641ea27b..ee1655b794 100644 --- a/Gems/StartingPointInput/gem.json +++ b/Gems/StartingPointInput/gem.json @@ -2,6 +2,7 @@ "gem_name": "StartingPointInput", "display_name": "Starting Point Input", "license": "Apache-2.0 Or MIT", + "license_url": "https://github.com/o3de/o3de/blob/development/LICENSE.txt", "origin": "Open 3D Engine - o3de.org", "type": "Code", "summary": "The Starting Point Input Gem provides functionality to map low-level input events to high-level actions.", diff --git a/Gems/StartingPointMovement/gem.json b/Gems/StartingPointMovement/gem.json index 7def6da768..188d8483bc 100644 --- a/Gems/StartingPointMovement/gem.json +++ b/Gems/StartingPointMovement/gem.json @@ -2,6 +2,7 @@ "gem_name": "StartingPointMovement", "display_name": "Starting Point Movement", "license": "Apache-2.0 Or MIT", + "license_url": "https://github.com/o3de/o3de/blob/development/LICENSE.txt", "origin": "Open 3D Engine - o3de.org", "type": "Code", "summary": "The Starting Point Movement Gem provides a series of Lua scripts that listen and respond to input events and trigger transform operations such as translation and rotation.", diff --git a/Gems/SurfaceData/Code/Include/SurfaceData/SurfaceDataConstants.h b/Gems/SurfaceData/Code/Include/SurfaceData/SurfaceDataConstants.h index 3f4a1bb605..2a8f618ac8 100644 --- a/Gems/SurfaceData/Code/Include/SurfaceData/SurfaceDataConstants.h +++ b/Gems/SurfaceData/Code/Include/SurfaceData/SurfaceDataConstants.h @@ -9,25 +9,14 @@ #pragma once #include -#include +#include namespace SurfaceData { namespace Constants { static const char* s_unassignedTagName = AzFramework::SurfaceData::Constants::s_unassignedTagName; - static const char* s_terrainHoleTagName = "terrainHole"; - static const char* s_terrainTagName = "terrain"; static const AZ::Crc32 s_unassignedTagCrc = AZ::Crc32(s_unassignedTagName); - static const AZ::Crc32 s_terrainHoleTagCrc = AZ::Crc32(s_terrainHoleTagName); - static const AZ::Crc32 s_terrainTagCrc = AZ::Crc32(s_terrainTagName); - - static const char* s_allTagNames[] = - { - s_unassignedTagName, - s_terrainHoleTagName, - s_terrainTagName, - }; } } diff --git a/Gems/SurfaceData/Code/Source/Editor/EditorSurfaceDataSystemComponent.cpp b/Gems/SurfaceData/Code/Source/Editor/EditorSurfaceDataSystemComponent.cpp index a5bf51d0fe..a847da4347 100644 --- a/Gems/SurfaceData/Code/Source/Editor/EditorSurfaceDataSystemComponent.cpp +++ b/Gems/SurfaceData/Code/Source/Editor/EditorSurfaceDataSystemComponent.cpp @@ -12,7 +12,6 @@ #include #include - namespace SurfaceData { namespace Details @@ -124,10 +123,7 @@ namespace SurfaceData void EditorSurfaceDataSystemComponent::GetRegisteredSurfaceTagNames(SurfaceTagNameSet& masks) const { - for (const auto& tagName : Constants::s_allTagNames) - { - masks.insert(tagName); - } + masks.insert(Constants::s_unassignedTagName); for (const auto& assetPair : m_surfaceTagNameAssets) { diff --git a/Gems/SurfaceData/Code/Source/Editor/EditorSurfaceDataSystemComponent.h b/Gems/SurfaceData/Code/Source/Editor/EditorSurfaceDataSystemComponent.h index 603cffc56d..466da8482e 100644 --- a/Gems/SurfaceData/Code/Source/Editor/EditorSurfaceDataSystemComponent.h +++ b/Gems/SurfaceData/Code/Source/Editor/EditorSurfaceDataSystemComponent.h @@ -47,7 +47,6 @@ namespace SurfaceData static void GetRequiredServices(AZ::ComponentDescriptor::DependencyArrayType& required); private: - void LoadAsset(const AZ::Data::AssetId& assetId); void AddAsset(AZ::Data::Asset& asset); diff --git a/Gems/SurfaceData/Code/Tests/SurfaceDataTest.cpp b/Gems/SurfaceData/Code/Tests/SurfaceDataTest.cpp index b25c428cfb..9d182312a4 100644 --- a/Gems/SurfaceData/Code/Tests/SurfaceDataTest.cpp +++ b/Gems/SurfaceData/Code/Tests/SurfaceDataTest.cpp @@ -7,7 +7,6 @@ */ #include -#include #include #include #include @@ -31,7 +30,6 @@ struct MockGlobalEnvironment { MockGlobalEnvironment() { - m_stubEnv.pTimer = &m_stubTimer; m_stubEnv.pCryPak = &m_stubPak; m_stubEnv.pConsole = &m_stubConsole; m_stubEnv.pSystem = &m_stubSystem; @@ -45,7 +43,6 @@ struct MockGlobalEnvironment private: SSystemGlobalEnvironment m_stubEnv; - testing::NiceMock m_stubTimer; testing::NiceMock m_stubPak; testing::NiceMock m_stubConsole; testing::NiceMock m_stubSystem; @@ -284,15 +281,17 @@ public: TEST_F(SurfaceDataTestApp, SurfaceData_TestRegisteredTags) { + // Check that only the unassigned tag exists if no other providers are registered. AZStd::vector> registeredTags = SurfaceData::SurfaceTag::GetRegisteredTags(); - for (const auto& searchTerm : SurfaceData::Constants::s_allTagNames) - { - ASSERT_TRUE(AZStd::find_if(registeredTags.begin(), registeredTags.end(), [searchTerm](decltype(registeredTags)::value_type pair) + const auto& searchTerm = SurfaceData::Constants::s_unassignedTagName; + + ASSERT_TRUE(AZStd::find_if( + registeredTags.begin(), registeredTags.end(), + [=](decltype(registeredTags)::value_type pair) { return pair.second == searchTerm; })); - } } #if AZ_TRAIT_DISABLE_FAILED_SURFACE_DATA_TESTS diff --git a/Gems/SurfaceData/gem.json b/Gems/SurfaceData/gem.json index 51a134d5df..d16254040f 100644 --- a/Gems/SurfaceData/gem.json +++ b/Gems/SurfaceData/gem.json @@ -2,6 +2,7 @@ "gem_name": "SurfaceData", "display_name": "Surface Data", "license": "Apache-2.0 Or MIT", + "license_url": "https://github.com/o3de/o3de/blob/development/LICENSE.txt", "origin": "Open 3D Engine - o3de.org", "type": "Code", "summary": "The Surface Data Gem provides functionality to emit signals or tags from surfaces such as meshes and terrain.", diff --git a/Gems/Terrain/Assets/Editor/Icons/Components/TerrainHeight.svg b/Gems/Terrain/Assets/Editor/Icons/Components/TerrainHeight.svg index 57835e9c20..78af20cc2d 100644 --- a/Gems/Terrain/Assets/Editor/Icons/Components/TerrainHeight.svg +++ b/Gems/Terrain/Assets/Editor/Icons/Components/TerrainHeight.svg @@ -1,7 +1,5 @@ - - - icon / Environmental / Terrain Height - - - - \ No newline at end of file + + + + + diff --git a/Gems/Terrain/Assets/Editor/Icons/Components/TerrainLayerSpawner.svg b/Gems/Terrain/Assets/Editor/Icons/Components/TerrainLayerSpawner.svg index df73d78276..ad7403d976 100644 --- a/Gems/Terrain/Assets/Editor/Icons/Components/TerrainLayerSpawner.svg +++ b/Gems/Terrain/Assets/Editor/Icons/Components/TerrainLayerSpawner.svg @@ -1,7 +1,5 @@ - - - icon / Environmental / Generate Terrian - - - - \ No newline at end of file + + + + + diff --git a/Gems/Terrain/Assets/Editor/Icons/Components/TerrainMacroMaterial.svg b/Gems/Terrain/Assets/Editor/Icons/Components/TerrainMacroMaterial.svg new file mode 100644 index 0000000000..9a694bfbf7 --- /dev/null +++ b/Gems/Terrain/Assets/Editor/Icons/Components/TerrainMacroMaterial.svg @@ -0,0 +1,3 @@ + + + diff --git a/Gems/Terrain/Assets/Editor/Icons/Components/TerrainPhysicsCollider.svg b/Gems/Terrain/Assets/Editor/Icons/Components/TerrainPhysicsCollider.svg new file mode 100644 index 0000000000..56ffb05464 --- /dev/null +++ b/Gems/Terrain/Assets/Editor/Icons/Components/TerrainPhysicsCollider.svg @@ -0,0 +1,3 @@ + + + diff --git a/Gems/Terrain/Assets/Editor/Icons/Components/TerrainSurfaceGradientList.svg b/Gems/Terrain/Assets/Editor/Icons/Components/TerrainSurfaceGradientList.svg new file mode 100644 index 0000000000..c4e8ce79d2 --- /dev/null +++ b/Gems/Terrain/Assets/Editor/Icons/Components/TerrainSurfaceGradientList.svg @@ -0,0 +1,3 @@ + + + diff --git a/Gems/Terrain/Assets/Editor/Icons/Components/TerrainSurfaceMaterials.svg b/Gems/Terrain/Assets/Editor/Icons/Components/TerrainSurfaceMaterials.svg new file mode 100644 index 0000000000..5a25cb3be9 --- /dev/null +++ b/Gems/Terrain/Assets/Editor/Icons/Components/TerrainSurfaceMaterials.svg @@ -0,0 +1,3 @@ + + + diff --git a/Gems/Terrain/Assets/Editor/Icons/Components/TerrainWorld.svg b/Gems/Terrain/Assets/Editor/Icons/Components/TerrainWorld.svg index c6388d6215..f3c17f66e4 100644 --- a/Gems/Terrain/Assets/Editor/Icons/Components/TerrainWorld.svg +++ b/Gems/Terrain/Assets/Editor/Icons/Components/TerrainWorld.svg @@ -1,8 +1,5 @@ - - - icon / Environmental / Terrain Refactor - - - - - \ No newline at end of file + + + + + diff --git a/Gems/Terrain/Assets/Editor/Icons/Components/TerrainWorldDebugger.svg b/Gems/Terrain/Assets/Editor/Icons/Components/TerrainWorldDebugger.svg index bd1512afda..b128d0f316 100644 --- a/Gems/Terrain/Assets/Editor/Icons/Components/TerrainWorldDebugger.svg +++ b/Gems/Terrain/Assets/Editor/Icons/Components/TerrainWorldDebugger.svg @@ -1,8 +1,5 @@ - - - icon / Environmental / Terrain World Debugger - - - - - \ No newline at end of file + + + + + diff --git a/Gems/Terrain/Assets/Editor/Icons/Components/TerrainWorldRenderer.svg b/Gems/Terrain/Assets/Editor/Icons/Components/TerrainWorldRenderer.svg index ab3716ad5d..de97c005fc 100644 --- a/Gems/Terrain/Assets/Editor/Icons/Components/TerrainWorldRenderer.svg +++ b/Gems/Terrain/Assets/Editor/Icons/Components/TerrainWorldRenderer.svg @@ -1,8 +1,5 @@ - - - icon / Environmental / Terrain World Renderer - - - - - \ No newline at end of file + + + + + diff --git a/Gems/Terrain/Assets/Editor/Icons/Components/Viewport/TerrainHeight.svg b/Gems/Terrain/Assets/Editor/Icons/Components/Viewport/TerrainHeight.svg index b87a0b4d7e..87a2d199bd 100644 --- a/Gems/Terrain/Assets/Editor/Icons/Components/Viewport/TerrainHeight.svg +++ b/Gems/Terrain/Assets/Editor/Icons/Components/Viewport/TerrainHeight.svg @@ -1,25 +1,22 @@ - - - icon / Environmental / Terrain Height - box - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file + + + + + + + + + + + + + + + + + + + + + + diff --git a/Gems/Terrain/Assets/Editor/Icons/Components/Viewport/TerrainLayerSpawner.svg b/Gems/Terrain/Assets/Editor/Icons/Components/Viewport/TerrainLayerSpawner.svg index c078d32fe5..a89186819f 100644 --- a/Gems/Terrain/Assets/Editor/Icons/Components/Viewport/TerrainLayerSpawner.svg +++ b/Gems/Terrain/Assets/Editor/Icons/Components/Viewport/TerrainLayerSpawner.svg @@ -1,25 +1,22 @@ - - - icon / Environmental / Generate Terrian - box - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file + + + + + + + + + + + + + + + + + + + + + + diff --git a/Gems/Terrain/Assets/Editor/Icons/Components/Viewport/TerrainMacroMaterial.svg b/Gems/Terrain/Assets/Editor/Icons/Components/Viewport/TerrainMacroMaterial.svg new file mode 100644 index 0000000000..177469e46e --- /dev/null +++ b/Gems/Terrain/Assets/Editor/Icons/Components/Viewport/TerrainMacroMaterial.svg @@ -0,0 +1,16 @@ + + + + + + + + + + + + + + + + diff --git a/Gems/Terrain/Assets/Editor/Icons/Components/Viewport/TerrainPhysicsCollider.svg b/Gems/Terrain/Assets/Editor/Icons/Components/Viewport/TerrainPhysicsCollider.svg new file mode 100644 index 0000000000..302e585f6e --- /dev/null +++ b/Gems/Terrain/Assets/Editor/Icons/Components/Viewport/TerrainPhysicsCollider.svg @@ -0,0 +1,16 @@ + + + + + + + + + + + + + + + + diff --git a/Gems/Terrain/Assets/Editor/Icons/Components/Viewport/TerrainSurfaceGradientList.svg b/Gems/Terrain/Assets/Editor/Icons/Components/Viewport/TerrainSurfaceGradientList.svg new file mode 100644 index 0000000000..19cb144936 --- /dev/null +++ b/Gems/Terrain/Assets/Editor/Icons/Components/Viewport/TerrainSurfaceGradientList.svg @@ -0,0 +1,16 @@ + + + + + + + + + + + + + + + + diff --git a/Gems/Terrain/Assets/Editor/Icons/Components/Viewport/TerrainSurfaceMaterials.svg b/Gems/Terrain/Assets/Editor/Icons/Components/Viewport/TerrainSurfaceMaterials.svg new file mode 100644 index 0000000000..5179f61867 --- /dev/null +++ b/Gems/Terrain/Assets/Editor/Icons/Components/Viewport/TerrainSurfaceMaterials.svg @@ -0,0 +1,21 @@ + + + + + + + + + + + + + + + + + + + + + diff --git a/Gems/Terrain/Assets/Editor/Icons/Components/Viewport/TerrainWorld.svg b/Gems/Terrain/Assets/Editor/Icons/Components/Viewport/TerrainWorld.svg index 2aee65f2a8..5466395141 100644 --- a/Gems/Terrain/Assets/Editor/Icons/Components/Viewport/TerrainWorld.svg +++ b/Gems/Terrain/Assets/Editor/Icons/Components/Viewport/TerrainWorld.svg @@ -1,25 +1,22 @@ - - - icon / Environmental / Terrain Refactor - box - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file + + + + + + + + + + + + + + + + + + + + + + diff --git a/Gems/Terrain/Assets/Editor/Icons/Components/Viewport/TerrainWorldDebugger.svg b/Gems/Terrain/Assets/Editor/Icons/Components/Viewport/TerrainWorldDebugger.svg index 1b729ab73f..ea9935fefb 100644 --- a/Gems/Terrain/Assets/Editor/Icons/Components/Viewport/TerrainWorldDebugger.svg +++ b/Gems/Terrain/Assets/Editor/Icons/Components/Viewport/TerrainWorldDebugger.svg @@ -1,25 +1,22 @@ - - - icon / Environmental / Terrain World Debugger - box - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file + + + + + + + + + + + + + + + + + + + + + + diff --git a/Gems/Terrain/Assets/Editor/Icons/Components/Viewport/TerrainWorldRenderer.svg b/Gems/Terrain/Assets/Editor/Icons/Components/Viewport/TerrainWorldRenderer.svg index 4287508f10..af235047db 100644 --- a/Gems/Terrain/Assets/Editor/Icons/Components/Viewport/TerrainWorldRenderer.svg +++ b/Gems/Terrain/Assets/Editor/Icons/Components/Viewport/TerrainWorldRenderer.svg @@ -1,25 +1,22 @@ - - - icon / Environmental / Terrain World Renderer - box - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file + + + + + + + + + + + + + + + + + + + + + + diff --git a/Gems/Terrain/Assets/Materials/Terrain/DefaultPbrTerrain.material b/Gems/Terrain/Assets/Materials/Terrain/DefaultPbrTerrain.material index d2acc2516a..da2fc95293 100644 --- a/Gems/Terrain/Assets/Materials/Terrain/DefaultPbrTerrain.material +++ b/Gems/Terrain/Assets/Materials/Terrain/DefaultPbrTerrain.material @@ -5,20 +5,7 @@ "propertyLayoutVersion": 1, "properties": { "baseColor": { - "color": [ 0.18, 0.18, 0.18 ], - "useTexture": false - }, - "normal": - { - "useTexture": false - }, - "roughness": - { - "useTexture": false - }, - "specularF0": - { - "useTexture": false + "color": [ 0.18, 0.18, 0.18 ] } } } diff --git a/Gems/Terrain/Assets/Materials/Terrain/PbrTerrain.materialtype b/Gems/Terrain/Assets/Materials/Terrain/PbrTerrain.materialtype index 235079d95e..836e85661d 100644 --- a/Gems/Terrain/Assets/Materials/Terrain/PbrTerrain.materialtype +++ b/Gems/Terrain/Assets/Materials/Terrain/PbrTerrain.materialtype @@ -88,68 +88,26 @@ } } ], + "baseColor": [ + { + "name": "color", + "displayName": "Color", + "description": "Color is displayed as sRGB but the values are stored as linear color.", + "type": "Color", + "defaultValue": [ 1.0, 1.0, 1.0 ], + "connection": { + "type": "ShaderInput", + "name": "m_baseColor" + } + } + ], "settings": [ - { - "id": "heightmapImage", - "displayName": "Heightmap Image", - "description": "Heightmap of the terrain. Controlled by the runtime.", - "visibility": "Hidden", - "type": "Image", - "connection": { - "type": "ShaderInput", - "id": "m_heightmapImage" - } - }, - { - "id": "detailMaterialIdImage", - "displayName": "Detail Material Id Image", - "description": "Texture containing detail material Ids and weights. Controlled by the runtime.", - "visibility": "Hidden", - "type": "Image", - "connection": { - "type": "ShaderInput", - "id": "m_detailMaterialIdImage" - } - }, - { - "id": "detailMaterialIdCenter", - "displayName": "Detail Material Id Image Center", - "description": "The center position of the detail material Id image. Controlled by the runtime.", - "visibility": "Hidden", - "type": "Vector2", - "connection": { - "type": "ShaderInput", - "id": "m_detailMaterialIdImageCenter" - } - }, - { - "id": "detailAabb", - "displayName": "Detail material bounds in 2d", - "description": "The 2d world space bounds of the detail id material. Controlled by the runtime.", - "visibility": "Hidden", - "type": "Vector4", - "connection": { - "type": "ShaderInput", - "id": "m_detailAabb" - } - }, - { - "id": "detailHalfPixelUv", - "displayName": "Detail texture half pixel uv size", - "description": "Uv size of a half pixel in the detail material id texture. Controlled by the runtime.", - "visibility": "Hidden", - "type": "float", - "connection": { - "type": "ShaderInput", - "id": "m_detailHalfPixelUv" - } - }, { "id": "detailTextureMultiplier", "displayName": "Detail Texture UV Multiplier", "description": "How many times to repeat the detail texture per sector", "type": "Float", - "defaultValue": 8.0, + "defaultValue": 0.5, "connection": { "type": "ShaderInput", "id": "m_detailTextureMultiplier" @@ -177,178 +135,6 @@ "id": "m_detailFadeLength" } } - ], - "baseColor": [ - { - "id": "color", - "displayName": "Color", - "description": "Color is displayed as sRGB but the values are stored as linear color.", - "type": "Color", - "defaultValue": [ 1.0, 1.0, 1.0 ], - "connection": { - "type": "ShaderInput", - "id": "m_baseColor" - } - }, - { - "id": "factor", - "displayName": "Factor", - "description": "Strength factor for scaling the base color values. Zero (0.0) is black, white (1.0) is full color.", - "type": "Float", - "defaultValue": 1.0, - "min": 0.0, - "max": 1.0, - "connection": { - "type": "ShaderInput", - "id": "m_baseColorFactor" - } - }, - { - "id": "textureMap", - "displayName": "Texture", - "description": "Base color texture map", - "type": "Image", - "connection": { - "type": "ShaderInput", - "id": "m_baseColorMap" - } - }, - { - "id": "useTexture", - "displayName": "Use Texture", - "description": "Whether to use the texture.", - "type": "Bool", - "defaultValue": true - }, - { - "id": "textureBlendMode", - "displayName": "Texture Blend Mode", - "description": "Selects the equation to use when combining Color, Factor, and Texture.", - "type": "Enum", - "enumValues": [ "Multiply", "LinearLight", "Lerp", "Overlay" ], - "defaultValue": "Overlay", - "connection": { - "type": "ShaderOption", - "id": "o_baseColorTextureBlendMode" - } - } - ], - "normal": [ - { - "id": "textureMap", - "displayName": "Texture", - "description": "Texture for defining surface normal direction.", - "type": "Image", - "connection": { - "type": "ShaderInput", - "id": "m_normalMap" - } - }, - { - "id": "useTexture", - "displayName": "Use Texture", - "description": "Whether to use the texture, or just rely on vertex normals.", - "type": "Bool", - "defaultValue": true - }, - { - "id": "flipX", - "displayName": "Flip X Channel", - "description": "Flip tangent direction for this normal map.", - "type": "Bool", - "defaultValue": false, - "connection": { - "type": "ShaderInput", - "id": "m_flipNormalX" - } - }, - { - "id": "flipY", - "displayName": "Flip Y Channel", - "description": "Flip bitangent direction for this normal map.", - "type": "Bool", - "defaultValue": false, - "connection": { - "type": "ShaderInput", - "id": "m_flipNormalY" - } - }, - { - "id": "factor", - "displayName": "Factor", - "description": "Strength factor for scaling the values", - "type": "Float", - "defaultValue": 1.0, - "min": 0.0, - "softMax": 2.0, - "connection": { - "type": "ShaderInput", - "id": "m_normalFactor" - } - } - ], - "roughness": [ - { - "id": "textureMap", - "displayName": "Texture", - "description": "Texture for defining surface roughness.", - "type": "Image", - "connection": { - "type": "ShaderInput", - "id": "m_roughnessMap" - } - }, - { - "id": "useTexture", - "description": "Whether to use the texture, or just default to the Factor value.", - "type": "Bool", - "defaultValue": true - }, - { - "id": "factor", - "displayName": "Factor", - "description": "Controls the roughness value", - "type": "Float", - "defaultValue": 1.0, - "min": 0.0, - "max": 1.0, - "connection": { - "type": "ShaderInput", - "id": "m_roughnessFactor" - } - } - ], - "specularF0": [ - { - "id": "textureMap", - "displayName": "Texture", - "description": "Texture for defining surface reflectance.", - "type": "Image", - "connection": { - "type": "ShaderInput", - "id": "m_specularF0Map" - } - }, - { - "id": "useTexture", - "displayName": "Use Texture", - "description": "Whether to use the texture, or just default to the Factor value.", - "type": "Bool", - "defaultValue": true - }, - { - "id": "factor", - "displayName": "Factor", - "description": "The default IOR is 1.5, which gives you 0.04 (4% of light reflected at 0 degree angle for dielectric materials). F0 values lie in the range 0-0.08, so that is why the default F0 slider is set on 0.5.", - "type": "Float", - "defaultValue": 0.5, - "min": 0.0, - "max": 1.0, - "connection": { - "type": "ShaderInput", - "id": "m_specularF0Factor" - } - } ] } }, @@ -364,39 +150,5 @@ } ], "functors": [ - { - "type": "UseTexture", - "args": { - "textureProperty": "baseColor.textureMap", - "useTextureProperty": "baseColor.useTexture", - "dependentProperties": ["baseColor.textureBlendMode"], - "shaderOption": "o_baseColor_useTexture" - } - }, - { - "type": "UseTexture", - "args": { - "textureProperty": "specularF0.textureMap", - "useTextureProperty": "specularF0.useTexture", - "shaderOption": "o_specularF0_useTexture" - } - }, - { - "type": "UseTexture", - "args": { - "textureProperty": "normal.textureMap", - "useTextureProperty": "normal.useTexture", - "dependentProperties": ["normal.factor", "normal.flipX", "normal.flipY"], - "shaderOption": "o_normal_useTexture" - } - }, - { - "type": "UseTexture", - "args": { - "textureProperty": "roughness.textureMap", - "useTextureProperty": "roughness.useTexture", - "shaderOption": "o_roughness_useTexture" - } - } ] } diff --git a/Gems/Terrain/Assets/Shaders/Terrain/SceneSrg.azsli b/Gems/Terrain/Assets/Shaders/Terrain/SceneSrg.azsli new file mode 100644 index 0000000000..2545db7c93 --- /dev/null +++ b/Gems/Terrain/Assets/Shaders/Terrain/SceneSrg.azsli @@ -0,0 +1,35 @@ +/* + * Copyright (c) Contributors to the Open 3D Engine Project. + * For complete copyright and license terms please see the LICENSE at the root of this distribution. + * + * SPDX-License-Identifier: Apache-2.0 OR MIT + * + */ + +#ifndef AZ_COLLECTING_PARTIAL_SRGS +#error Do not include this file directly. Include the main .srgi file instead. +#endif + +partial ShaderResourceGroup SceneSrg +{ + Sampler HeightmapSampler + { + MinFilter = Linear; + MagFilter = Linear; + MipFilter = Point; + AddressU = Clamp; + AddressV = Clamp; + AddressW = Clamp; + }; + + struct TerrainWorldData + { + float3 m_min; + float m_padding1; + float3 m_max; + float m_padding2; + }; + + Texture2D m_heightmapImage; + TerrainWorldData m_terrainWorldData; +} diff --git a/Gems/Terrain/Assets/Shaders/Terrain/TerrainCommon.azsli b/Gems/Terrain/Assets/Shaders/Terrain/TerrainCommon.azsli index dc6f65207b..ee3e9b2a5f 100644 --- a/Gems/Terrain/Assets/Shaders/Terrain/TerrainCommon.azsli +++ b/Gems/Terrain/Assets/Shaders/Terrain/TerrainCommon.azsli @@ -15,35 +15,14 @@ ShaderResourceGroup ObjectSrg : SRG_PerObject { - row_major float3x4 m_modelToWorld; - - struct TerrainData + struct PatchData { - float2 m_uvMin; - float2 m_uvMax; - float2 m_uvStep; - float m_sampleSpacing; - float m_heightScale; + float2 m_xyTranslation; + float m_xyScale; }; - struct MacroMaterialData - { - float2 m_uvMin; - float2 m_uvMax; - float m_normalFactor; - bool m_flipNormalX; - bool m_flipNormalY; - uint m_mapsInUse; - }; + PatchData m_patchData; - TerrainData m_terrainData; - - MacroMaterialData m_macroMaterialData[4]; - uint m_macroMaterialCount; - - Texture2D m_macroColorMap[4]; - Texture2D m_macroNormalMap[4]; - // The below shouldn't be in this SRG but needs to be for now because the lighting functions depend on them. //! Reflection Probe (smallest probe volume that overlaps the object position) @@ -56,6 +35,7 @@ ShaderResourceGroup ObjectSrg : SRG_PerObject float m_padding; bool m_useReflectionProbe; bool m_useParallaxCorrection; + float m_exposure; }; ReflectionProbeData m_reflectionProbeData; @@ -92,26 +72,6 @@ ShaderResourceGroup ObjectSrg : SRG_PerObject ShaderResourceGroup TerrainMaterialSrg : SRG_PerMaterial { - Texture2D m_heightmapImage; - Texture2D m_detailMaterialIdImage; - float2 m_detailMaterialIdImageCenter; - float m_detailTextureMultiplier; - float m_detailFadeDistance; - float m_detailFadeLength; - - float4 m_detailAabb; - float m_detailHalfPixelUv; - - Sampler HeightmapSampler - { - MinFilter = Linear; - MagFilter = Linear; - MipFilter = Point; - AddressU = Clamp; - AddressV = Clamp; - AddressW = Clamp; - }; - Sampler m_sampler { AddressU = Wrap; @@ -122,147 +82,151 @@ ShaderResourceGroup TerrainMaterialSrg : SRG_PerMaterial MaxAnisotropy = 16; }; - Sampler m_detailSampler - { - AddressU = Wrap; - AddressV = Wrap; - MinFilter = Point; - MagFilter = Point; - MipFilter = Point; - }; - // Base Color float3 m_baseColor; - float m_baseColorFactor; - Texture2D m_baseColorMap; - // Normal - Texture2D m_normalMap; - bool m_flipNormalX; - bool m_flipNormalY; - float m_normalFactor; - - // Roughness - Texture2D m_roughnessMap; - float m_roughnessFactor; - - // Specular - Texture2D m_specularF0Map; - float m_specularF0Factor; + // Detail Material Properties + float m_detailTextureMultiplier; + float m_detailFadeDistance; + float m_detailFadeLength; } option bool o_useTerrainSmoothing = false; -option bool o_baseColor_useTexture = true; -option bool o_specularF0_useTexture = true; -option bool o_normal_useTexture = true; -option bool o_roughness_useTexture = true; -option TextureBlendMode o_baseColorTextureBlendMode = TextureBlendMode::Multiply; struct VertexInput { float2 m_position : POSITION; - float2 m_uv : UV; }; -// Sample a texture with a 5 tap B-Spline. Consider ripping this out and putting in a more general location. -// This function samples a 4x4 neighborhood around the uv. Normally this would take 16 samples, but by taking -// advantage of bilinear filtering this can be done with 9 taps on the edges between pixels. The cost is further -// reduced by dropping the diagonals. -float SampleBSpline5Tap(Texture2D texture, SamplerState textureSampler, float2 uv, float2 textureSize, float2 rcpTextureSize) +// This class is used to calculate heights and normals for terrain. Using a class for this was the easiest way to +// de-duplicate code between the forward and depth shaders. +class HeightContext { - // Think of sample locations in the 4x4 neighborhood as having a top left coordinate of 0,0 and - // a bottom right coordinate of 3,3. + float3 m_worldMin; + float3 m_worldMax; + float2 m_xyPosition; - // Find the position in texture space then round it to get the center of the 1,1 pixel (tc1) - float2 texelPos = uv * textureSize; - float2 tc1= floor(texelPos - 0.5) + 0.5; + float2 m_textureSize; + float2 m_rcpTextureSize; + float2 m_sampleSpacing; + float2 m_rcpSampleSpacing; - // Offset from center position to texel - float2 f = texelPos - tc1; + float m_heightScale; + int2 m_heightmapCoord; - // Compute B-Spline weights based on the offset - float2 OneMinusF = (1.0 - f); - float2 OneMinusF2 = OneMinusF * OneMinusF; - float2 OneMinusF3 = OneMinusF2 * OneMinusF; - float2 w0 = OneMinusF3; - float2 w1 = 4.0 + 3.0 * f * f * f - 6.0 * f * f; - float2 w2 = 4.0 + 3.0 * OneMinusF3 - 6.0 * OneMinusF2; - float2 w3 = f * f * f; - - float2 w12 = w1 + w2; - - // Compute uv coordinates for sampling the texture - float2 tc0 = (tc1 - 1.0f) * rcpTextureSize; - float2 tc3 = (tc1 + 2.0f) * rcpTextureSize; - float2 tc12 = (tc1 + w2 / w12) * rcpTextureSize; - - // Compute sample weights - float sw0 = w12.x * w12.y; // middle - float sw1 = w12.x * w0.y; // top - float sw2 = w0.x * w12.y; // left - float sw3 = w12.x * w3.y; // bottom - float sw4 = w3.x * w12.y; // right - - // total weight of samples to normalize result. - float totalWeight = sw0 + sw1 + sw2 + sw3 + sw4; - - float result = 0.0f; - result += texture.SampleLevel(textureSampler, float2(tc12.x, tc12.y), 0.0).r * sw0; - result += texture.SampleLevel(textureSampler, float2(tc12.x, tc0.y), 0.0).r * sw1; - result += texture.SampleLevel(textureSampler, float2( tc0.x, tc12.y), 0.0).r * sw2; - result += texture.SampleLevel(textureSampler, float2(tc12.x, tc3.y), 0.0).r * sw3; - result += texture.SampleLevel(textureSampler, float2( tc3.x, tc12.y), 0.0).r * sw4; - - return result / totalWeight; -} - -float4x4 GetObject_WorldMatrix() -{ - float4x4 modelToWorld = float4x4( - float4(1, 0, 0, 0), - float4(0, 1, 0, 0), - float4(0, 0, 1, 0), - float4(0, 0, 0, 1)); - - modelToWorld[0] = ObjectSrg::m_modelToWorld[0]; - modelToWorld[1] = ObjectSrg::m_modelToWorld[1]; - modelToWorld[2] = ObjectSrg::m_modelToWorld[2]; - return modelToWorld; -} - -float GetHeight(float2 origUv) -{ - float2 uv = clamp(origUv + (ObjectSrg::m_terrainData.m_uvStep * 0.5f), 0.0f, 1.0f); - float height = 0.0f; - - if (o_useTerrainSmoothing) + + // Sample a texture with a 5 tap B-Spline. Consider ripping this out and putting in a more general location. + // This function samples a 4x4 neighborhood around the uv. Normally this would take 16 samples, but by taking + // advantage of bilinear filtering this can be done with 9 taps on the edges between pixels. The cost is further + // reduced by dropping the diagonals. + float SampleBSpline5Tap(Texture2D texture, SamplerState textureSampler, float2 uv, float2 textureSize, float2 rcpTextureSize) { - float2 textureSize; - TerrainMaterialSrg::m_heightmapImage.GetDimensions(textureSize.x, textureSize.y); - height = SampleBSpline5Tap(TerrainMaterialSrg::m_heightmapImage, TerrainMaterialSrg::HeightmapSampler, uv, textureSize, rcp(textureSize)); - } - else - { - height = TerrainMaterialSrg::m_heightmapImage.SampleLevel(TerrainMaterialSrg::HeightmapSampler, uv, 0).r; + // Think of sample locations in the 4x4 neighborhood as having a top left coordinate of 0,0 and + // a bottom right coordinate of 3,3. + + // Find the position in texture space then round it to get the center of the 1,1 pixel (tc1) + float2 texelPos = uv * textureSize; + float2 tc1= floor(texelPos - 0.5) + 0.5; + + // Offset from center position to texel + float2 f = texelPos - tc1; + + // Compute B-Spline weights based on the offset + float2 OneMinusF = (1.0 - f); + float2 OneMinusF2 = OneMinusF * OneMinusF; + float2 OneMinusF3 = OneMinusF2 * OneMinusF; + float2 w0 = OneMinusF3; + float2 w1 = 4.0 + 3.0 * f * f * f - 6.0 * f * f; + float2 w2 = 4.0 + 3.0 * OneMinusF3 - 6.0 * OneMinusF2; + float2 w3 = f * f * f; + + float2 w12 = w1 + w2; + + // Compute uv coordinates for sampling the texture + float2 tc0 = (tc1 - 1.0f) * rcpTextureSize; + float2 tc3 = (tc1 + 2.0f) * rcpTextureSize; + float2 tc12 = (tc1 + w2 / w12) * rcpTextureSize; + + // Compute sample weights + float sw0 = w12.x * w12.y; // middle + float sw1 = w12.x * w0.y; // top + float sw2 = w0.x * w12.y; // left + float sw3 = w12.x * w3.y; // bottom + float sw4 = w3.x * w12.y; // right + + // total weight of samples to normalize result. + float totalWeight = sw0 + sw1 + sw2 + sw3 + sw4; + + float result = 0.0f; + result += texture.SampleLevel(textureSampler, float2(tc12.x, tc12.y), 0.0).r * sw0; + result += texture.SampleLevel(textureSampler, float2(tc12.x, tc0.y), 0.0).r * sw1; + result += texture.SampleLevel(textureSampler, float2( tc0.x, tc12.y), 0.0).r * sw2; + result += texture.SampleLevel(textureSampler, float2(tc12.x, tc3.y), 0.0).r * sw3; + result += texture.SampleLevel(textureSampler, float2( tc3.x, tc12.y), 0.0).r * sw4; + + return result / totalWeight; } - return ObjectSrg::m_terrainData.m_heightScale * (height - 0.5f); -} - -float3 GetTerrainWorldPosition(ObjectSrg::TerrainData terrainData, float2 vertexPosition, float2 uv) -{ - // Remove all vertices outside our bounds by turning them into NaN positions. - if (any(uv > 1.0) || any (uv < 0.0)) + float2 GetWorldXYPosition(in ObjectSrg::PatchData patchData, in float2 vertexPosition) { - return asfloat(0x7fc00000); // NaN + return float2(patchData.m_xyTranslation + vertexPosition * patchData.m_xyScale); } - // Loop up the height and calculate our final position. - float height = GetHeight(uv); - return mul(GetObject_WorldMatrix(), float4(vertexPosition, height, 1.0f)).xyz; -} + float2 GetHeightmapUv(in float2 position, in float2 worldMin, in float2 worldMax) + { + return (position - worldMin) / (worldMax - worldMin); + } -float4 GetTerrainProjectedPosition(ObjectSrg::TerrainData terrainData, float2 vertexPosition, float2 uv) -{ - return mul(ViewSrg::m_viewProjectionMatrix, float4(GetTerrainWorldPosition(terrainData, vertexPosition, uv), 1.0)); -} + int2 GetHeightmapCoord(in float2 position, in float2 rcpSampleSpacing, in float2 worldMin) + { + return int2((position - worldMin) * rcpSampleSpacing); + } + + float GetHeight(Texture2D heightmapImage, int2 offset = int2(0, 0)) + { + float height = heightmapImage.Load(int3(m_heightmapCoord + offset, 0)).r; + return m_worldMin.z + height * m_heightScale; + } + + float GetSmoothedHeight(Texture2D heightmapImage, SamplerState heightmapSampler) + { + float2 uv = GetHeightmapUv(m_xyPosition, m_worldMin.xy, m_worldMax.xy); + float2 halfStep = m_rcpTextureSize * 0.5; + uv = uv * (1.0 - m_rcpTextureSize) + halfStep; + float height = SampleBSpline5Tap(heightmapImage, heightmapSampler, uv, m_textureSize, m_rcpTextureSize); + return m_worldMin.z + height * (m_worldMax.z - m_worldMin.z); + } + + float3 CalculateNormal(Texture2D heightmapImage) + { + float up = GetHeight(heightmapImage, int2( 0, -1)); + float right = GetHeight(heightmapImage, int2( 1, 0)); + float down = GetHeight(heightmapImage, int2( 0, 1)); + float left = GetHeight(heightmapImage, int2(-1, 0)); + + float3 bitangent = normalize(float3(0.0, m_sampleSpacing.y * 2.0f, down - up)); + float3 tangent = normalize(float3(m_sampleSpacing.x * 2.0f, 0.0, right - left)); + return normalize(cross(tangent, bitangent)); + } + + bool IsVertexOutsideOfTerrainBounds() + { + return (any(m_xyPosition < m_worldMin.xy) || + any(m_xyPosition > m_worldMax.xy)); + } + + void Initialize(Texture2D heightmapImage, float2 vertexPosition, ObjectSrg::PatchData patchData, float3 worldMin, float3 worldMax) + { + m_worldMin = worldMin; + m_worldMax = worldMax; + m_xyPosition = GetWorldXYPosition(patchData, vertexPosition); + + heightmapImage.GetDimensions(m_textureSize.x, m_textureSize.y); + m_rcpTextureSize = rcp(m_textureSize); + m_sampleSpacing = (worldMax.xy - worldMin.xy) * m_rcpTextureSize; + m_rcpSampleSpacing = rcp(m_sampleSpacing); + + m_heightScale = worldMax.z - worldMin.z; + m_heightmapCoord = GetHeightmapCoord(m_xyPosition, m_rcpSampleSpacing, worldMin.xy); + } +}; diff --git a/Gems/Terrain/Assets/Shaders/Terrain/TerrainDetailHelpers.azsli b/Gems/Terrain/Assets/Shaders/Terrain/TerrainDetailHelpers.azsli new file mode 100644 index 0000000000..b18f2885db --- /dev/null +++ b/Gems/Terrain/Assets/Shaders/Terrain/TerrainDetailHelpers.azsli @@ -0,0 +1,365 @@ +/* + * Copyright (c) Contributors to the Open 3D Engine Project. For complete copyright and license terms please see the LICENSE at the root of this distribution. + * + * SPDX-License-Identifier: Apache-2.0 OR MIT + * + */ + +#pragma once + +#include + +enum DetailTextureFlags +{ + UseTextureBaseColor = 0x00000001, //0b0000'0000'0000'0000'0000'0000'0000'0001 + UseTextureNormal = 0x00000002, //0b0000'0000'0000'0000'0000'0000'0000'0010 + UseTextureMetallic = 0x00000004, //0b0000'0000'0000'0000'0000'0000'0000'0100 + UseTextureRoughness = 0x00000008, //0b0000'0000'0000'0000'0000'0000'0000'1000 + UseTextureOcclusion = 0x00000010, //0b0000'0000'0000'0000'0000'0000'0001'0000 + UseTextureHeight = 0x00000020, //0b0000'0000'0000'0000'0000'0000'0010'0000 + UseTextureSpecularF0 = 0x00000040, //0b0000'0000'0000'0000'0000'0000'0100'0000 + + FlipNormalX = 0x00010000, //0b0000'0000'0000'0001'0000'0000'0000'0000 + FlipNormalY = 0x00020000, //0b0000'0000'0000'0010'0000'0000'0000'0000 + + BlendModeMask = 0x000C0000, //0b0000'0000'0000'1100'0000'0000'0000'0000 + BlendModeLerp = 0x00000000, //0b0000'0000'0000'0000'0000'0000'0000'0000 + BlendModeLinearLight = 0x00040000, //0b0000'0000'0000'0100'0000'0000'0000'0000 + BlendModeMultiply = 0x00080000, //0b0000'0000'0000'1000'0000'0000'0000'0000 + BlendModeOverlay = 0x000C0000, //0b0000'0000'0000'1100'0000'0000'0000'0000 +}; + +struct DetailSurface +{ + float3 m_color; + float3 m_normal; + float m_roughness; + float m_specularF0; + float m_metalness; + float m_occlusion; + float m_height; +}; + +option bool o_debugDetailMaterialIds = false; + +DetailSurface GetDefaultDetailSurface() +{ + DetailSurface surface; + + surface.m_color = float3(0.5, 0.5, 0.5); + surface.m_normal = float3(0.0, 0.0, 1.0); + surface.m_roughness = 1.0; + surface.m_specularF0 = 0.5; + surface.m_metalness = 0.0; + surface.m_occlusion = 1.0; + surface.m_height = 0.5; + + return surface; +} + +void WeightDetailSurface(inout DetailSurface surface, in float weight) +{ + surface.m_color *= weight; + surface.m_normal *= weight; + surface.m_roughness *= weight; + surface.m_specularF0 *= weight; + surface.m_metalness *= weight; + surface.m_occlusion *= weight; + surface.m_height *= weight; +} + +void AddDetailSurface(inout DetailSurface surface, in DetailSurface surfaceToAdd) +{ + surface.m_color += surfaceToAdd.m_color; + surface.m_normal += surfaceToAdd.m_normal; + surface.m_roughness += surfaceToAdd.m_roughness; + surface.m_specularF0 += surfaceToAdd.m_specularF0; + surface.m_metalness += surfaceToAdd.m_metalness; + surface.m_occlusion += surfaceToAdd.m_occlusion; + surface.m_height += surfaceToAdd.m_height; +} + +// Detail material index getters + +uint GetDetailColorIndex(TerrainSrg::DetailMaterialData materialData) +{ + return materialData.m_colorNormalImageIndices & 0x0000FFFF; +} + +uint GetDetailNormalIndex(TerrainSrg::DetailMaterialData materialData) +{ + return materialData.m_colorNormalImageIndices >> 16; +} + +uint GetDetailRoughnessIndex(TerrainSrg::DetailMaterialData materialData) +{ + return materialData.m_roughnessMetalnessImageIndices & 0x0000FFFF; +} + +uint GetDetailMetalnessIndex(TerrainSrg::DetailMaterialData materialData) +{ + return materialData.m_roughnessMetalnessImageIndices >> 16; +} + +uint GetDetailSpecularF0Index(TerrainSrg::DetailMaterialData materialData) +{ + return materialData.m_specularF0OcclusionImageIndices & 0x0000FFFF; +} + +uint GetDetailOcclusionIndex(TerrainSrg::DetailMaterialData materialData) +{ + return materialData.m_specularF0OcclusionImageIndices >> 16; +} + +uint GetDetailHeightIndex(TerrainSrg::DetailMaterialData materialData) +{ + return materialData.m_heightImageIndex & 0x0000FFFF; +} + +// Detail material value getters + +float3 GetDetailColor(TerrainSrg::DetailMaterialData materialData, float2 uv, float2 ddx, float2 ddy) +{ + float3 color = materialData.m_baseColor; + if ((materialData.m_flags & DetailTextureFlags::UseTextureBaseColor) > 0) + { + color = TerrainSrg::m_textures[GetDetailColorIndex(materialData)].SampleGrad(TerrainMaterialSrg::m_sampler, uv, ddx, ddy).rgb; + } + return color * materialData.m_baseColorFactor; +} + +float3 GetDetailNormal(TerrainSrg::DetailMaterialData materialData, float2 uv, float2 ddx, float2 ddy) +{ + float2 normal = float2(0.0, 0.0); + if ((materialData.m_flags & DetailTextureFlags::UseTextureNormal) > 0) + { + normal = TerrainSrg::m_textures[GetDetailNormalIndex(materialData)].SampleGrad(TerrainMaterialSrg::m_sampler, uv, ddx, ddy).rg; + } + + // X and Y are inverted here to be consistent with SampleNormalXY in NormalInput.azsli. + if(materialData.m_flags & DetailTextureFlags::FlipNormalX) + { + normal.y = -normal.y; + } + if(materialData.m_flags & DetailTextureFlags::FlipNormalY) + { + normal.x = -normal.x; + } + return GetTangentSpaceNormal(normal, materialData.m_normalFactor); +} + +float GetDetailRoughness(TerrainSrg::DetailMaterialData materialData, float2 uv, float2 ddx, float2 ddy) +{ + float roughness = materialData.m_roughnessScale; + if ((materialData.m_flags & DetailTextureFlags::UseTextureRoughness) > 0) + { + roughness = TerrainSrg::m_textures[GetDetailRoughnessIndex(materialData)].SampleGrad(TerrainMaterialSrg::m_sampler, uv, ddx, ddy).r; + roughness = materialData.m_roughnessBias + roughness * materialData.m_roughnessScale; + } + return roughness; +} + +float GetDetailMetalness(TerrainSrg::DetailMaterialData materialData, float2 uv, float2 ddx, float2 ddy) +{ + float metalness = 1.0; + if ((materialData.m_flags & DetailTextureFlags::UseTextureMetallic) > 0) + { + metalness = TerrainSrg::m_textures[GetDetailMetalnessIndex(materialData)].SampleGrad(TerrainMaterialSrg::m_sampler, uv, ddx, ddy).r; + } + return metalness * materialData.m_metalFactor; +} + +float GetDetailSpecularF0(TerrainSrg::DetailMaterialData materialData, float2 uv, float2 ddx, float2 ddy) +{ + float specularF0 = 1.0; + if ((materialData.m_flags & DetailTextureFlags::UseTextureSpecularF0) > 0) + { + specularF0 = TerrainSrg::m_textures[GetDetailSpecularF0Index(materialData)].SampleGrad(TerrainMaterialSrg::m_sampler, uv, ddx, ddy).r; + } + return specularF0 * materialData.m_specularF0Factor; +} + +float GetDetailOcclusion(TerrainSrg::DetailMaterialData materialData, float2 uv, float2 ddx, float2 ddy) +{ + float occlusion = 1.0; + if ((materialData.m_flags & DetailTextureFlags::UseTextureOcclusion) > 0) + { + occlusion = TerrainSrg::m_textures[GetDetailOcclusionIndex(materialData)].SampleGrad(TerrainMaterialSrg::m_sampler, uv, ddx, ddy).r; + } + return occlusion * materialData.m_occlusionFactor; +} + +float GetDetailHeight(TerrainSrg::DetailMaterialData materialData, float2 uv, float2 ddx, float2 ddy) +{ + float height = materialData.m_heightFactor; + if ((materialData.m_flags & DetailTextureFlags::UseTextureHeight) > 0) + { + height = TerrainSrg::m_textures[GetDetailHeightIndex(materialData)].SampleGrad(TerrainMaterialSrg::m_sampler, uv, ddx, ddy).r; + height = materialData.m_heightOffset + height * materialData.m_heightFactor; + } + return height; +} + +void GetDetailSurfaceForMaterial(inout DetailSurface surface, uint materialId, float2 uv) +{ + TerrainSrg::DetailMaterialData detailMaterialData = TerrainSrg::m_detailMaterialData[materialId]; + + float2 uvDdx = ddx(uv); + float2 uvDdy = ddy(uv); + + surface.m_color = GetDetailColor(detailMaterialData, uv, uvDdx, uvDdy); + surface.m_normal = GetDetailNormal(detailMaterialData, uv, uvDdx, uvDdy); + surface.m_roughness = GetDetailRoughness(detailMaterialData, uv, uvDdx, uvDdy); + surface.m_specularF0 = GetDetailSpecularF0(detailMaterialData, uv, uvDdx, uvDdy); + surface.m_metalness = GetDetailMetalness(detailMaterialData, uv, uvDdx, uvDdy); + surface.m_occlusion = GetDetailOcclusion(detailMaterialData, uv, uvDdx, uvDdy); + surface.m_height = GetDetailHeight(detailMaterialData, uv, uvDdx, uvDdy); +} + +// Debugs the detail material by choosing a random color per material ID and rendering it without blending. +void GetDebugDetailSurface(inout DetailSurface surface, uint material1, uint material2, float blend, float2 idUv) +{ + float3 material1Color = float3(0.1, 0.1, 0.1); + float3 material2Color = float3(0.1, 0.1, 0.1); + + // Get a reasonably random hue for the material id + if (material1 != 255) + { + float hue1 = (material1 * 25043 % 256) / 256.0; + material1Color = HsvToRgb(float3(hue1, 1.0, 1.0)); + } + if (material2 != 255) + { + float hue2 = (material2 * 25043 % 256) / 256.0; + material2Color = HsvToRgb(float3(hue2, 1.0, 1.0)); + } + + surface.m_color = lerp(material1Color, material2Color, blend); + float seamBlend = 0.0; + const float halfLineWidth = 1.0 / 2048.0; + if (any(frac(abs(idUv)) < halfLineWidth) || any(frac(abs(idUv)) > 1.0 - halfLineWidth)) + { + seamBlend = 1.0; + } + surface.m_color = lerp(surface.m_color, float3(0.0, 0.0, 0.0), seamBlend); // draw texture seams + surface.m_color = pow(surface.m_color , 2.2); + + surface.m_normal = float3(0.0, 0.0, 1.0); + surface.m_roughness = 1.0; + surface.m_specularF0 = 0.5; + surface.m_metalness = 0.0; + surface.m_occlusion = 1.0; + surface.m_height = 0.5; +} + +//Blend a single detail material sample (with two possible material ids) onto a DetailSurface. +void BlendDetailMaterial(inout DetailSurface surface, uint material1, uint material2, float blend, float2 detailUv, float weight) +{ + DetailSurface tempSurface; + GetDetailSurfaceForMaterial(tempSurface, material1, detailUv); + WeightDetailSurface(tempSurface, weight * (1.0 - blend)); + AddDetailSurface(surface, tempSurface); + if (material2 != 0xFF) + { + GetDetailSurfaceForMaterial(tempSurface, material2, detailUv); + WeightDetailSurface(tempSurface, weight * blend); + AddDetailSurface(surface, tempSurface); + } +} + +/* +Populates a DetailSurface with material data gathered form the 4 nearest samples to detailMaterialIdUv. The weight +of each detail material's contribution is calculated based on the distance to the center point for that sample (for +instance, if detailMaterialIdUv falls perfectly in-between all 4 samples, then each sample will be weighed at 25%). +Each sample can have two different detail materials defined with a blend value to determine their relative contribution. +The detailUv is used for sampling the textures of each detail material. +*/ +bool GetDetailSurface(inout DetailSurface surface, float2 detailMaterialIdUv, float2 detailUv) +{ + float2 textureSize; + TerrainSrg::m_detailMaterialIdImage.GetDimensions(textureSize.x, textureSize.y); + + float2 detailMaterialIdCoord = detailMaterialIdUv * textureSize; // uv -> pixel coordinate + + // detailMaterialIdCoord could be negative, so add textureSize to ensure it is positive + detailMaterialIdCoord += textureSize; + + // The detail material id texture wraps since the "center" point can be anywhere in the texture, so mod by texturesize + int2 detailMaterailIdTopLeft = int2(detailMaterialIdCoord) % textureSize; + int2 detailMaterailIdBottomRight = (int2(detailMaterialIdCoord) + 1) % textureSize; + + // Using Load() to gather the nearest 4 samples (Gather4() isn't used because of precision issues with uvs). + uint4 s1 = TerrainSrg::m_detailMaterialIdImage.Load(int3(detailMaterailIdTopLeft.x, detailMaterailIdBottomRight.y, 0)); + uint4 s2 = TerrainSrg::m_detailMaterialIdImage.Load(int3(detailMaterailIdBottomRight, 0)); + uint4 s3 = TerrainSrg::m_detailMaterialIdImage.Load(int3(detailMaterailIdBottomRight.x, detailMaterailIdTopLeft.y, 0)); + uint4 s4 = TerrainSrg::m_detailMaterialIdImage.Load(int3(detailMaterailIdTopLeft, 0)); + + uint4 material1 = uint4(s1.x, s2.x, s3.x, s4.x); + uint4 material2 = uint4(s1.y, s2.y, s3.y, s4.y); + + // convert integer of 0-255 to float of 0-1. + const float maxBlendAmount = 0xFF; + float4 blends = float4(s1.z, s2.z, s3.z, s4.z) / maxBlendAmount; + + // Calculate weight based on proximity to detail material samples + float2 gatherWeight = frac(detailMaterialIdCoord); + // Adjust the gather weight for better interpolation by (3x^2 - 2x^3). This helps avoid diamond-shaped artifacts in binlinear filtering. + gatherWeight = gatherWeight * gatherWeight * (3.0 - 2.0 * gatherWeight); + + if (o_debugDetailMaterialIds) + { + float2 idUv = (detailMaterialIdCoord + gatherWeight - 0.5) / textureSize; + GetDebugDetailSurface(surface, material1.x, material2.x, blends.x, idUv); + return true; + } + + // If any sample has no materials, give up. + if (any(material1 == 0xFF)) + { + return false; + } + + if (all(material1.x == material1.yzw) && all(material2.x == material2.yzw)) + { + // Fast path for same material ids + GetDetailSurfaceForMaterial(surface, material1.x, detailUv); + if (material2.x != 0xFF) + { + float4 material2Blends = 1.0 - blends; + DetailSurface tempSurface; + float weight = + ((1.0 - gatherWeight.x) * gatherWeight.y * material2Blends.x) + + (gatherWeight.x * gatherWeight.y * material2Blends.y) + + (gatherWeight.x * (1.0 - gatherWeight.y) * material2Blends.z) + + ((1.0 - gatherWeight.x) * (1.0 - gatherWeight.y) * material2Blends.w); + WeightDetailSurface(surface, weight); + GetDetailSurfaceForMaterial(tempSurface, material2.x, detailUv); + WeightDetailSurface(tempSurface, 1.0 - weight); + AddDetailSurface(surface, tempSurface); + } + } + else + { + surface = (DetailSurface)0; + + // X + float weight = (1.0 - gatherWeight.x) * gatherWeight.y; + BlendDetailMaterial(surface, material1.x, material2.x, blends.x, detailUv, weight); + + // Y + weight = gatherWeight.x * gatherWeight.y; + BlendDetailMaterial(surface, material1.y, material2.y, blends.y, detailUv, weight); + + // Z + weight = gatherWeight.x * (1.0 - gatherWeight.y); + BlendDetailMaterial(surface, material1.z, material2.z, blends.z, detailUv, weight); + + // W + weight = (1.0 - gatherWeight.x) * (1.0 - gatherWeight.y); + BlendDetailMaterial(surface, material1.w, material2.w, blends.w, detailUv, weight); + } + + surface.m_normal = normalize(surface.m_normal); + + return true; +} diff --git a/Gems/Terrain/Assets/Shaders/Terrain/TerrainPBR_ForwardPass.azsl b/Gems/Terrain/Assets/Shaders/Terrain/TerrainPBR_ForwardPass.azsl index 5a43fe1c37..741f45d775 100644 --- a/Gems/Terrain/Assets/Shaders/Terrain/TerrainPBR_ForwardPass.azsl +++ b/Gems/Terrain/Assets/Shaders/Terrain/TerrainPBR_ForwardPass.azsl @@ -7,8 +7,12 @@ */ #include + +#include #include +#include #include +#include #include #include #include @@ -17,41 +21,43 @@ #include #include #include -#include struct VSOutput { float4 m_position : SV_Position; float3 m_normal: NORMAL; float3 m_worldPosition : UV0; - float2 m_uv : UV1; float3 m_shadowCoords[ViewSrg::MaxCascadeCount] : UV2; }; -option bool o_debugDetailMaterialIds = false; - VSOutput TerrainPBR_MainPassVS(VertexInput IN) { VSOutput OUT; - ObjectSrg::TerrainData terrainData = ObjectSrg::m_terrainData; + HeightContext heightContext; + heightContext.Initialize(SceneSrg::m_heightmapImage, IN.m_position, ObjectSrg::m_patchData, SceneSrg::m_terrainWorldData.m_min, SceneSrg::m_terrainWorldData.m_max); - float2 uv = IN.m_uv; - float2 origUv = lerp(terrainData.m_uvMin, terrainData.m_uvMax, uv); - float3 worldPosition = GetTerrainWorldPosition(terrainData, IN.m_position, origUv); - OUT.m_position = mul(ViewSrg::m_viewProjectionMatrix, float4(worldPosition, 1.0)); - OUT.m_worldPosition = worldPosition; + if (heightContext.IsVertexOutsideOfTerrainBounds()) + { + // Output a NaN to remove this vertex. + OUT.m_position = 1.0 / 0.0; + return OUT; + } - // Calculate normal - float up = GetHeight(origUv + terrainData.m_uvStep * float2( 0.0f, -1.0f)); - float right = GetHeight(origUv + terrainData.m_uvStep * float2( 1.0f, 0.0f)); - float down = GetHeight(origUv + terrainData.m_uvStep * float2( 0.0f, 1.0f)); - float left = GetHeight(origUv + terrainData.m_uvStep * float2(-1.0f, 0.0f)); + float height = 0.0; - float3 bitangent = normalize(float3(0.0, terrainData.m_sampleSpacing * 2.0f, down - up)); - float3 tangent = normalize(float3(terrainData.m_sampleSpacing * 2.0f, 0.0, right - left)); - OUT.m_normal = normalize(cross(tangent, bitangent)); - OUT.m_uv = uv; + if (o_useTerrainSmoothing) + { + height = heightContext.GetSmoothedHeight(SceneSrg::m_heightmapImage, SceneSrg::HeightmapSampler); + } + else + { + height = heightContext.GetHeight(SceneSrg::m_heightmapImage); + } + + OUT.m_worldPosition = float3(heightContext.m_xyPosition, height); + OUT.m_position = mul(ViewSrg::m_viewProjectionMatrix, float4(OUT.m_worldPosition, 1.0)); + OUT.m_normal = heightContext.CalculateNormal(SceneSrg::m_heightmapImage); // directional light shadow const uint shadowIndex = ViewSrg::m_shadowIndexDirectionalLight; @@ -59,7 +65,7 @@ VSOutput TerrainPBR_MainPassVS(VertexInput IN) { DirectionalLightShadow::GetShadowCoords( shadowIndex, - worldPosition, + OUT.m_worldPosition, OUT.m_normal, OUT.m_shadowCoords); } @@ -71,104 +77,108 @@ ForwardPassOutput TerrainPBR_MainPassPS(VSOutput IN) { // ------- Surface ------- Surface surface; - - // Position surface.position = IN.m_worldPosition.xyz; + surface.vertexNormal = normalize(IN.m_normal); + float viewDistance = length(ViewSrg::m_worldPosition - surface.position); float detailFactor = saturate((viewDistance - TerrainMaterialSrg::m_detailFadeDistance) / max(TerrainMaterialSrg::m_detailFadeLength, EPSILON)); - float2 detailUv = IN.m_uv * TerrainMaterialSrg::m_detailTextureMultiplier; + float2 detailUv = IN.m_worldPosition.xy * TerrainMaterialSrg::m_detailTextureMultiplier; // ------- Normal ------- float3 macroNormal = normalize(IN.m_normal); // ------- Macro Color / Normal ------- float3 macroColor = TerrainMaterialSrg::m_baseColor.rgb; - [unroll] for (uint i = 0; i < 4 && (i < ObjectSrg::m_macroMaterialCount); ++i) + + uint2 macroGridResolution = uint2(TerrainSrg::m_macroMaterialGrid.m_resolution >> 16, TerrainSrg::m_macroMaterialGrid.m_resolution & 0xFFFF); + float macroTileSize = TerrainSrg::m_macroMaterialGrid.m_tileSize; + float2 macroGridOffset = TerrainSrg::m_macroMaterialGrid.m_offset; + uint2 macroGridPosition = (surface.position.xy - macroGridOffset) / macroTileSize; + + uint macroTileIndex = macroGridResolution.x * macroGridPosition.y + macroGridPosition.x; + static const uint NumMacroMaterialsPerTile = 4; + macroTileIndex *= NumMacroMaterialsPerTile; + + [unroll] for (uint i = 0; i < NumMacroMaterialsPerTile; ++i) { - float2 macroUvMin = ObjectSrg::m_macroMaterialData[i].m_uvMin; - float2 macroUvMax = ObjectSrg::m_macroMaterialData[i].m_uvMax; - float2 macroUv = lerp(macroUvMin, macroUvMax, IN.m_uv); - if (macroUv.x >= 0.0 && macroUv.x <= 1.0 && macroUv.y >= 0.0 && macroUv.y <= 1.0) + TerrainSrg::MacroMaterialData macroMaterialData = TerrainSrg::m_macroMaterialData[macroTileIndex + i]; + if ((macroMaterialData.m_flags & 1) == 0) { - if ((ObjectSrg::m_macroMaterialData[i].m_mapsInUse & 1) > 0) - { - macroColor = GetBaseColorInput(ObjectSrg::m_macroColorMap[i], TerrainMaterialSrg::m_sampler, macroUv, macroColor, true); - } - if ((ObjectSrg::m_macroMaterialData[i].m_mapsInUse & 2) > 0) - { - bool flipX = ObjectSrg::m_macroMaterialData[i].m_flipNormalX; - bool flipY = ObjectSrg::m_macroMaterialData[i].m_flipNormalY; - bool factor = ObjectSrg::m_macroMaterialData[i].m_normalFactor; - macroNormal = GetNormalInputTS(ObjectSrg::m_macroNormalMap[i], TerrainMaterialSrg::m_sampler, - macroUv, flipX, flipY, CreateIdentity3x3(), true, factor); - } - break; + break; // No more macro materials for this tile } + + if (any(surface.position.xy < macroMaterialData.m_boundsMin) || any (surface.position.xy > macroMaterialData.m_boundsMax)) + { + continue; // Macro material exists for this tile but is out of the bounds of this particular position + } + + float2 macroUvSize = macroMaterialData.m_boundsMax - macroMaterialData.m_boundsMin; + macroUvSize.x = -macroUvSize.x; + float2 macroUv = (macroMaterialData.m_boundsMin - surface.position.xy) / macroUvSize; + + // The macro uv gradient can vary massively over the quad because different pixels may choose different macro materials with different UVs. + // To fix, we use the world position scaled by the macro uv scale which should be fairly uniform across macro materials. + float2 macroUvScale = IN.m_worldPosition.xy / macroUvSize; + float2 ddx_macroUv = ddx(macroUvScale); + float2 ddy_macroUv = ddy(macroUvScale); + + if (macroMaterialData.m_colorMapId != 0xFFFF) + { + macroColor = TerrainSrg::m_textures[macroMaterialData.m_colorMapId].SampleGrad(TerrainMaterialSrg::m_sampler, macroUv, ddx_macroUv, ddy_macroUv).rgb; + macroColor = TransformColor(macroColor, ColorSpaceId::LinearSRGB, ColorSpaceId::ACEScg); + } + + if (macroMaterialData.m_normalMapId != 0xFFFF) + { + bool flipX = macroMaterialData.m_flags & 2; + bool flipY = macroMaterialData.m_flags & 4; + float factor = macroMaterialData.m_normalFactor; + + float2 sampledValue = SampleNormalXY(TerrainSrg::m_textures[macroMaterialData.m_normalMapId], TerrainMaterialSrg::m_sampler, macroUv, flipX, flipY); + macroNormal = normalize(GetTangentSpaceNormal_Unnormalized(sampledValue, factor)); + } + break; } - - float3 detailNormal = GetNormalInputTS(TerrainMaterialSrg::m_normalMap, TerrainMaterialSrg::m_sampler, - detailUv, TerrainMaterialSrg::m_flipNormalX, TerrainMaterialSrg::m_flipNormalY, CreateIdentity3x3(), o_normal_useTexture, TerrainMaterialSrg::m_normalFactor); - - detailNormal = ReorientTangentSpaceNormal(macroNormal, detailNormal); - surface.normal = lerp(detailNormal, macroNormal, detailFactor); - surface.normal = normalize(surface.normal); - surface.vertexNormal = normalize(IN.m_normal); - + // ------- Base Color ------- - float3 detailColor = GetBaseColorInput(TerrainMaterialSrg::m_baseColorMap, TerrainMaterialSrg::m_sampler, detailUv, TerrainMaterialSrg::m_baseColor.rgb, o_baseColor_useTexture); - float3 blendedColor = BlendBaseColor(lerp(detailColor, TerrainMaterialSrg::m_baseColor.rgb, detailFactor), macroColor, TerrainMaterialSrg::m_baseColorFactor, o_baseColorTextureBlendMode, o_baseColor_useTexture); - // ------- Debug detail materials using random colors ------- - // This assigns a random color to each material, turns off any kind of distance fading, and draws a black line at the texture edges. - if (o_debugDetailMaterialIds) + DetailSurface detailSurface = GetDefaultDetailSurface(); + float2 detailRegionMin = TerrainSrg::m_detailAabb.xy; + float2 detailRegionMax = TerrainSrg::m_detailAabb.zw; + float2 detailRegionUv = (surface.position.xy - detailRegionMin) / (detailRegionMax - detailRegionMin); + bool hasDetailSurface = false; + + // Check to make sure we're inside the detail texture's bounds and within where detail textures should be drawn. + if (detailFactor < 1.0 && all(detailRegionUv > TerrainSrg::m_detailHalfPixelUv) && all(detailRegionUv < 1.0 - TerrainSrg::m_detailHalfPixelUv)) { - float2 detailRegionMin = TerrainMaterialSrg::m_detailAabb.xy; - float2 detailRegionMax = TerrainMaterialSrg::m_detailAabb.zw; - float2 detailRegionUv = (surface.position.xy - detailRegionMin) / (detailRegionMax - detailRegionMin); - if (all(detailRegionUv > TerrainMaterialSrg::m_detailHalfPixelUv) && all(detailRegionUv < 1.0 - TerrainMaterialSrg::m_detailHalfPixelUv)) - { - detailRegionUv += TerrainMaterialSrg::m_detailMaterialIdImageCenter - (0.5); - - uint material1 = TerrainMaterialSrg::m_detailMaterialIdImage.GatherRed(TerrainMaterialSrg::m_detailSampler, detailRegionUv, 0).r; - uint material2 = TerrainMaterialSrg::m_detailMaterialIdImage.GatherGreen(TerrainMaterialSrg::m_detailSampler, detailRegionUv, 0).r; - float blend = float(TerrainMaterialSrg::m_detailMaterialIdImage.GatherBlue(TerrainMaterialSrg::m_detailSampler, detailRegionUv, 0).r) / 0xFF; - - float3 material1Color = float3(0.1, 0.1, 0.1); - float3 material2Color = float3(0.1, 0.1, 0.1); - - // Get a reasonably random hue for the material id - if (material1 != 255) - { - float hue1 = (material1 * 25043 % 256) / 256.0; - material1Color = HsvToRgb(float3(hue1, 1.0, 1.0)); - } - if (material2 != 255) - { - float hue2 = (material2 * 25043 % 256) / 256.0; - material2Color = HsvToRgb(float3(hue2, 1.0, 1.0)); - } - - blendedColor = lerp(material1Color, material2Color, blend); - float seamBlend = 0.0; - const float halfLineWidth = 1.0 / 2048.0; - if (any(abs(detailRegionUv) % 1.0 < halfLineWidth) || any(abs(detailRegionUv) % 1.0 > 1.0 - halfLineWidth)) - { - seamBlend = 1.0; - } - blendedColor = lerp(blendedColor, float3(0.0, 0.0, 0.0), seamBlend); // draw texture seams - blendedColor = pow(blendedColor , 2.2); - } + detailRegionUv += TerrainSrg::m_detailMaterialIdImageCenter - 0.5; + hasDetailSurface = GetDetailSurface(detailSurface, detailRegionUv, detailUv); } - // ------- Specular ------- - float specularF0Factor = GetSpecularInput(TerrainMaterialSrg::m_specularF0Map, TerrainMaterialSrg::m_sampler, detailUv, TerrainMaterialSrg::m_specularF0Factor, o_specularF0_useTexture); - specularF0Factor = lerp(specularF0Factor, 0.5, detailFactor); - surface.SetAlbedoAndSpecularF0(blendedColor, specularF0Factor, 0.0); + const float macroRoughness = 1.0; + const float macroSpecularF0 = 0.5; + const float macroMetalness = 0.0; - // ------- Roughness ------- - surface.roughnessLinear = GetRoughnessInput(TerrainMaterialSrg::m_roughnessMap, TerrainMaterialSrg::m_sampler, detailUv, TerrainMaterialSrg::m_roughnessFactor, 0.0, 1.0, o_roughness_useTexture); - surface.roughnessLinear = lerp(surface.roughnessLinear, 1.0, detailFactor); - surface.CalculateRoughnessA(); + if (hasDetailSurface) + { + float3 blendedColor = lerp(detailSurface.m_color, macroColor, detailFactor); + float blendedSpecularF0 = lerp(detailSurface.m_specularF0, macroSpecularF0, detailFactor); + surface.SetAlbedoAndSpecularF0(blendedColor, blendedSpecularF0, detailSurface.m_metalness * (1.0 - detailFactor)); + + surface.roughnessLinear = lerp(detailSurface.m_roughness, macroRoughness, detailFactor); + surface.CalculateRoughnessA(); + + detailSurface.m_normal = ReorientTangentSpaceNormal(macroNormal, detailSurface.m_normal); + surface.normal = lerp(detailSurface.m_normal, macroNormal, detailFactor); + surface.normal = normalize(surface.normal); + } + else + { + surface.normal = macroNormal; + surface.SetAlbedoAndSpecularF0(macroColor, macroSpecularF0, macroMetalness); + surface.roughnessLinear = macroRoughness; + surface.CalculateRoughnessA(); + } // Clear Coat, Transmission (Not used for terrain) surface.clearCoat.InitializeToZero(); @@ -184,6 +194,7 @@ ForwardPassOutput TerrainPBR_MainPassPS(VSOutput IN) // Shadow, Occlusion lightingData.shadowCoords = IN.m_shadowCoords; + lightingData.diffuseAmbientOcclusion = detailSurface.m_occlusion; // Diffuse and Specular response lightingData.specularResponse = FresnelSchlickWithRoughness(lightingData.NdotV, surface.specularF0, surface.roughnessLinear); diff --git a/Gems/Terrain/Assets/Shaders/Terrain/TerrainPBR_ForwardPass.shader b/Gems/Terrain/Assets/Shaders/Terrain/TerrainPBR_ForwardPass.shader index 0e6f0beb1d..0f7455f957 100644 --- a/Gems/Terrain/Assets/Shaders/Terrain/TerrainPBR_ForwardPass.shader +++ b/Gems/Terrain/Assets/Shaders/Terrain/TerrainPBR_ForwardPass.shader @@ -1,6 +1,12 @@ { "Source" : "./TerrainPBR_ForwardPass.azsl", + "CompilerHints" : + { + "DisableOptimizations" : false, + "GenerateDebugInfo" : false + }, + "DepthStencilState" : { "Depth" : @@ -38,5 +44,6 @@ ] }, - "DrawList" : "forward" + "DrawList" : "forward", + "DisabledRHIBackends": ["metal"] } diff --git a/Gems/Terrain/Assets/Shaders/Terrain/TerrainSrg.azsli b/Gems/Terrain/Assets/Shaders/Terrain/TerrainSrg.azsli new file mode 100644 index 0000000000..3fcf8d75ca --- /dev/null +++ b/Gems/Terrain/Assets/Shaders/Terrain/TerrainSrg.azsli @@ -0,0 +1,90 @@ +/* + * Copyright (c) Contributors to the Open 3D Engine Project. + * For complete copyright and license terms please see the LICENSE at the root of this distribution. + * + * SPDX-License-Identifier: Apache-2.0 OR MIT + * + */ + +#pragma once + +#include + +ShaderResourceGroupSemantic SRG_Terrain +{ + FrequencyId = 7; +}; + +ShaderResourceGroup TerrainSrg : SRG_Terrain +{ + struct DetailMaterialData + { + // Uv + row_major float3x4 m_uvTransform; + + float3 m_baseColor; + + // Factor / Scale / Bias for input textures + float m_baseColorFactor; + + float m_normalFactor; + float m_metalFactor; + float m_roughnessScale; + float m_roughnessBias; + + float m_specularF0Factor; + float m_occlusionFactor; + float m_heightFactor; + float m_heightOffset; + + float m_heightBlendFactor; + + // Flags + uint m_flags; // see DetailTextureFlags + + // Image indices + uint m_colorNormalImageIndices; + uint m_roughnessMetalnessImageIndices; + + uint m_specularF0OcclusionImageIndices; + uint m_heightImageIndex; // only first 16 bits used + + // 16 byte aligned + uint2 m_padding; + }; + + struct MacroMaterialData + { + // bit 1 : Is this macro material used. + // bit 2 : flip normal x + // bit 3 : flip normal y + uint m_flags; + + uint m_colorMapId; + uint m_normalMapId; + float m_normalFactor; + float2 m_boundsMin; + float2 m_boundsMax; + }; + + struct MacroMaterialGrid + { + uint m_resolution; // How many x/y tiles in grid. x & y stored in 16 bits each. Total number of entries in m_macroMaterialData will be x * y + float m_tileSize; // Size of a tile in meters. + float2 m_offset; // x/y offset of min x/y corner of grid. + }; + + Texture2D m_detailMaterialIdImage; + StructuredBuffer m_detailMaterialData; + + StructuredBuffer m_macroMaterialData; + MacroMaterialGrid m_macroMaterialGrid; + + Texture2D m_textures[]; // bindless array of all textures for detail and macro materials + float2 m_detailMaterialIdImageCenter; + float m_detailHalfPixelUv; + float4 m_detailAabb; + +} + +static const float MacroMaterialsPerTile = 4; diff --git a/Gems/Terrain/Assets/Shaders/Terrain/Terrain_DepthPass.azsl b/Gems/Terrain/Assets/Shaders/Terrain/Terrain_DepthPass.azsl index fd855a1bcd..c74a0646ee 100644 --- a/Gems/Terrain/Assets/Shaders/Terrain/Terrain_DepthPass.azsl +++ b/Gems/Terrain/Assets/Shaders/Terrain/Terrain_DepthPass.azsl @@ -6,6 +6,7 @@ */ #include +#include #include #include "TerrainCommon.azsli" #include @@ -18,9 +19,30 @@ struct VSDepthOutput VSDepthOutput MainVS(in VertexInput input) { VSDepthOutput output; - ObjectSrg::TerrainData terrainData = ObjectSrg::m_terrainData; - float2 origUv = lerp(terrainData.m_uvMin, terrainData.m_uvMax, input.m_uv); - output.m_position = GetTerrainProjectedPosition(terrainData, input.m_position, origUv); + HeightContext heightContext; + heightContext.Initialize(SceneSrg::m_heightmapImage, input.m_position, ObjectSrg::m_patchData, SceneSrg::m_terrainWorldData.m_min, SceneSrg::m_terrainWorldData.m_max); + + if (heightContext.IsVertexOutsideOfTerrainBounds()) + { + // Output a NaN to remove this vertex. + output.m_position = 1.0 / 0.0; + return output; + } + + float height = 0.0; + + if (o_useTerrainSmoothing) + { + height = heightContext.GetSmoothedHeight(SceneSrg::m_heightmapImage, SceneSrg::HeightmapSampler); + } + else + { + height = heightContext.GetHeight(SceneSrg::m_heightmapImage); + } + + float3 worldPosition = float3(heightContext.m_xyPosition, height); + output.m_position = mul(ViewSrg::m_viewProjectionMatrix, float4(worldPosition, 1.0)); + return output; } diff --git a/Gems/Terrain/Code/CMakeLists.txt b/Gems/Terrain/Code/CMakeLists.txt index 4b2f32e172..69a1bef3c0 100644 --- a/Gems/Terrain/Code/CMakeLists.txt +++ b/Gems/Terrain/Code/CMakeLists.txt @@ -26,8 +26,6 @@ ly_add_target( Gem::GradientSignal Gem::SurfaceData Gem::LmbrCentral - - ) ly_add_target( @@ -49,14 +47,14 @@ ly_add_target( ) # the above module is for use in all client/server types -ly_create_alias(NAME Terrain.Servers NAMESPACE Gem TARGETS Gem::Terrain) -ly_create_alias(NAME Terrain.Clients NAMESPACE Gem TARGETS Gem::Terrain) +ly_create_alias(NAME Terrain.Servers NAMESPACE Gem TARGETS Gem::Terrain Gem::SurfaceData.Servers Gem::GradientSignal.Servers) +ly_create_alias(NAME Terrain.Clients NAMESPACE Gem TARGETS Gem::Terrain Gem::SurfaceData.Clients Gem::GradientSignal.Clients) # If we are on a host platform, we want to add the host tools targets like the Terrain.Editor target which # will also depend on Terrain.Static if(PAL_TRAIT_BUILD_HOST_TOOLS) ly_add_target( - NAME Terrain.Editor MODULE + NAME Terrain.Editor GEM_MODULE NAMESPACE Gem AUTOMOC FILES_CMAKE @@ -78,8 +76,8 @@ if(PAL_TRAIT_BUILD_HOST_TOOLS) ) # the above module is for use in dev tool situations - ly_create_alias(NAME Terrain.Builders NAMESPACE Gem TARGETS Gem::Terrain.Editor) - ly_create_alias(NAME Terrain.Tools NAMESPACE Gem TARGETS Gem::Terrain.Editor) + ly_create_alias(NAME Terrain.Builders NAMESPACE Gem TARGETS Gem::Terrain.Editor Gem::SurfaceData.Builders Gem::GradientSignal.Builders) + ly_create_alias(NAME Terrain.Tools NAMESPACE Gem TARGETS Gem::Terrain.Editor Gem::SurfaceData.Tools Gem::GradientSignal.Tools) endif() ################################################################################ @@ -121,6 +119,11 @@ if(PAL_TRAIT_BUILD_TESTS_SUPPORTED) NAME Gem::Terrain.Tests ) + ly_add_googlebenchmark( + NAME Gem::Terrain.Benchmarks + TARGET Gem::Terrain.Tests + ) + # If we are a host platform we want to add tools test like editor tests here if(PAL_TRAIT_BUILD_HOST_TOOLS) # We support Terrain.Editor.Tests on this platform, add Terrain.Editor.Tests target which depends on Terrain.Editor diff --git a/Gems/Terrain/Code/Include/Terrain/TerrainDataConstants.h b/Gems/Terrain/Code/Include/Terrain/TerrainDataConstants.h new file mode 100644 index 0000000000..e125e41ccf --- /dev/null +++ b/Gems/Terrain/Code/Include/Terrain/TerrainDataConstants.h @@ -0,0 +1,24 @@ +/* + * Copyright (c) Contributors to the Open 3D Engine Project. + * For complete copyright and license terms please see the LICENSE at the root of this distribution. + * + * SPDX-License-Identifier: Apache-2.0 OR MIT + * + */ + +#pragma once + +#include +#include + +namespace Terrain +{ + namespace Constants + { + static const char* s_terrainHoleTagName = "terrainHole"; + static const char* s_terrainTagName = "terrain"; + + static const AZ::Crc32 s_terrainHoleTagCrc = AZ::Crc32(s_terrainHoleTagName); + static const AZ::Crc32 s_terrainTagCrc = AZ::Crc32(s_terrainTagName); + } +} diff --git a/Gems/Terrain/Code/Mocks/Terrain/MockTerrain.h b/Gems/Terrain/Code/Mocks/Terrain/MockTerrain.h index f9607fdafb..4704361229 100644 --- a/Gems/Terrain/Code/Mocks/Terrain/MockTerrain.h +++ b/Gems/Terrain/Code/Mocks/Terrain/MockTerrain.h @@ -34,28 +34,8 @@ namespace UnitTest MOCK_METHOD1(RegisterArea, void(AZ::EntityId areaId)); MOCK_METHOD1(UnregisterArea, void(AZ::EntityId areaId)); - MOCK_METHOD2(RefreshArea, - void(AZ::EntityId areaId, AzFramework::Terrain::TerrainDataNotifications::TerrainDataChangedMask changeMask)); - }; - - class MockTerrainDataNotificationListener : public AzFramework::Terrain::TerrainDataNotificationBus::Handler - { - public: - MockTerrainDataNotificationListener() - { - AzFramework::Terrain::TerrainDataNotificationBus::Handler::BusConnect(); - } - - ~MockTerrainDataNotificationListener() - { - AzFramework::Terrain::TerrainDataNotificationBus::Handler::BusDisconnect(); - } - - MOCK_METHOD0(OnTerrainDataCreateBegin, void()); - MOCK_METHOD0(OnTerrainDataCreateEnd, void()); - MOCK_METHOD0(OnTerrainDataDestroyBegin, void()); - MOCK_METHOD0(OnTerrainDataDestroyEnd, void()); - MOCK_METHOD2(OnTerrainDataChanged, void(const AZ::Aabb& dirtyRegion, TerrainDataChangedMask dataChangedMask)); + MOCK_METHOD2( + RefreshArea, void(AZ::EntityId areaId, AzFramework::Terrain::TerrainDataNotifications::TerrainDataChangedMask changeMask)); }; class MockTerrainAreaHeightRequests : public Terrain::TerrainAreaHeightRequestBus::Handler @@ -91,45 +71,4 @@ namespace UnitTest MOCK_METHOD0(GetUseGroundPlane, bool()); }; - class MockTerrainDataRequests : public AzFramework::Terrain::TerrainDataRequestBus::Handler - { - public: - MockTerrainDataRequests() - { - AzFramework::Terrain::TerrainDataRequestBus::Handler::BusConnect(); - } - - ~MockTerrainDataRequests() - { - AzFramework::Terrain::TerrainDataRequestBus::Handler::BusDisconnect(); - } - - MOCK_CONST_METHOD0(GetTerrainHeightQueryResolution, AZ::Vector2()); - MOCK_METHOD1(SetTerrainHeightQueryResolution, void(AZ::Vector2)); - MOCK_CONST_METHOD0(GetTerrainAabb, AZ::Aabb()); - MOCK_METHOD1(SetTerrainAabb, void(const AZ::Aabb&)); - MOCK_CONST_METHOD3(GetHeight, float(const AZ::Vector3&, Sampler, bool*)); - MOCK_CONST_METHOD3(GetHeightFromVector2, float(const AZ::Vector2&, Sampler, bool*)); - MOCK_CONST_METHOD4(GetHeightFromFloats, float(float, float, Sampler, bool*)); - MOCK_CONST_METHOD2(GetIsHole, bool(const AZ::Vector3&, Sampler)); - MOCK_CONST_METHOD2(GetIsHoleFromVector2, bool(const AZ::Vector2&, Sampler)); - MOCK_CONST_METHOD3(GetIsHoleFromFloats, bool(float, float, Sampler)); - MOCK_CONST_METHOD3(GetNormal, AZ::Vector3(const AZ::Vector3&, Sampler, bool*)); - MOCK_CONST_METHOD3(GetNormalFromVector2, AZ::Vector3(const AZ::Vector2&, Sampler, bool*)); - MOCK_CONST_METHOD4(GetNormalFromFloats, AZ::Vector3(float, float, Sampler, bool*)); - MOCK_CONST_METHOD3(GetMaxSurfaceWeight, AzFramework::SurfaceData::SurfaceTagWeight(const AZ::Vector3&, Sampler, bool*)); - MOCK_CONST_METHOD3(GetMaxSurfaceWeightFromVector2, AzFramework::SurfaceData::SurfaceTagWeight(const AZ::Vector2&, Sampler, bool*)); - MOCK_CONST_METHOD4(GetMaxSurfaceWeightFromFloats, AzFramework::SurfaceData::SurfaceTagWeight(float, float, Sampler, bool*)); - MOCK_CONST_METHOD4(GetSurfaceWeights, void(const AZ::Vector3&, AzFramework::SurfaceData::SurfaceTagWeightList&, Sampler, bool*)); - MOCK_CONST_METHOD4( - GetSurfaceWeightsFromVector2, void(const AZ::Vector2&, AzFramework::SurfaceData::SurfaceTagWeightList&, Sampler, bool*)); - MOCK_CONST_METHOD5( - GetSurfaceWeightsFromFloats, void(float, float, AzFramework::SurfaceData::SurfaceTagWeightList&, Sampler, bool*)); - MOCK_CONST_METHOD3(GetMaxSurfaceName, const char*(const AZ::Vector3&, Sampler, bool*)); - MOCK_CONST_METHOD4(GetSurfacePoint, void(const AZ::Vector3&, AzFramework::SurfaceData::SurfacePoint&, Sampler, bool*)); - MOCK_CONST_METHOD4( - GetSurfacePointFromVector2, void(const AZ::Vector2&, AzFramework::SurfaceData::SurfacePoint&, Sampler, bool*)); - MOCK_CONST_METHOD5( - GetSurfacePointFromFloats, void(float, float, AzFramework::SurfaceData::SurfacePoint&, Sampler, bool*)); - }; } // namespace UnitTest diff --git a/Gems/Terrain/Code/Source/Components/TerrainHeightGradientListComponent.cpp b/Gems/Terrain/Code/Source/Components/TerrainHeightGradientListComponent.cpp index 231d5abc28..b9055375d4 100644 --- a/Gems/Terrain/Code/Source/Components/TerrainHeightGradientListComponent.cpp +++ b/Gems/Terrain/Code/Source/Components/TerrainHeightGradientListComponent.cpp @@ -48,6 +48,15 @@ namespace Terrain ->Attribute(AZ::Edit::Attributes::RequiredService, AZ_CRC_CE("GradientService")) ; } + + if (auto behaviorContext = azrtti_cast(context)) + { + behaviorContext->Class() + ->Attribute(AZ::Script::Attributes::Category, "Terrain") + ->Constructor() + ->Property("gradientEntities", BehaviorValueProperty(&TerrainHeightGradientListConfig::m_gradientEntities)) + ; + } } } @@ -151,24 +160,32 @@ namespace Terrain { float maxSample = 0.0f; terrainExists = false; - - GradientSignal::GradientSampleParams params(AZ::Vector3(inPosition.GetX(), inPosition.GetY(), 0.0f)); - - // Right now, when the list contains multiple entries, we will use the highest point from each gradient. - // This is needed in part because gradients don't really have world bounds, so they exist everywhere but generally have a value - // of 0 outside their data bounds if they're using bounded data. We should examine the possibility of extending the gradient API - // to provide actual bounds so that it's possible to detect if the gradient even 'exists' in an area, at which point we could just - // make this list a prioritized list from top to bottom for any points that overlap. - for (auto& gradientId : m_configuration.m_gradientEntities) + AZ_WarningOnce("Terrain", !m_isRequestInProgress, "Detected cyclic dependencies with terrain height entity references"); + if (!m_isRequestInProgress) { - // If gradients ever provide bounds, or if we add a value threshold in this component, it would be possible for terrain - // to *not* exist at a specific point. - terrainExists = true; + m_isRequestInProgress = true; + GradientSignal::GradientSampleParams params(AZ::Vector3(inPosition.GetX(), inPosition.GetY(), 0.0f)); - float sample = 0.0f; - GradientSignal::GradientRequestBus::EventResult( - sample, gradientId, &GradientSignal::GradientRequestBus::Events::GetValue, params); - maxSample = AZ::GetMax(maxSample, sample); + // Right now, when the list contains multiple entries, we will use the highest point from each gradient. + // This is needed in part because gradients don't really have world bounds, so they exist everywhere but generally have a value + // of 0 outside their data bounds if they're using bounded data. We should examine the possibility of extending the gradient + // API to provide actual bounds so that it's possible to detect if the gradient even 'exists' in an area, at which point we + // could just make this list a prioritized list from top to bottom for any points that overlap. + for (auto& gradientId : m_configuration.m_gradientEntities) + { + if (gradientId.IsValid()) + { + // If gradients ever provide bounds, or if we add a value threshold in this component, it would be possible for terrain + // to *not* exist at a specific point. + terrainExists = true; + + float sample = 0.0f; + GradientSignal::GradientRequestBus::EventResult( + sample, gradientId, &GradientSignal::GradientRequestBus::Events::GetValue, params); + maxSample = AZ::GetMax(maxSample, sample); + } + } + m_isRequestInProgress = false; } const float height = AZ::Lerp(m_cachedShapeBounds.GetMin().GetZ(), m_cachedShapeBounds.GetMax().GetZ(), maxSample); diff --git a/Gems/Terrain/Code/Source/Components/TerrainHeightGradientListComponent.h b/Gems/Terrain/Code/Source/Components/TerrainHeightGradientListComponent.h index 6c3fd7b820..12a51b2ac1 100644 --- a/Gems/Terrain/Code/Source/Components/TerrainHeightGradientListComponent.h +++ b/Gems/Terrain/Code/Source/Components/TerrainHeightGradientListComponent.h @@ -44,6 +44,7 @@ namespace Terrain AZStd::vector m_gradientEntities; }; + static const AZ::Uuid TerrainHeightGradientListComponentTypeId = "{1BB3BA6C-6D4A-4636-B542-F23ECBA8F2AB}"; class TerrainHeightGradientListComponent : public AZ::Component @@ -54,7 +55,7 @@ namespace Terrain public: template friend class LmbrCentral::EditorWrappedComponentBase; - AZ_COMPONENT(TerrainHeightGradientListComponent, "{1BB3BA6C-6D4A-4636-B542-F23ECBA8F2AB}"); + AZ_COMPONENT(TerrainHeightGradientListComponent, TerrainHeightGradientListComponentTypeId); static void GetProvidedServices(AZ::ComponentDescriptor::DependencyArrayType& services); static void GetIncompatibleServices(AZ::ComponentDescriptor::DependencyArrayType& services); static void GetRequiredServices(AZ::ComponentDescriptor::DependencyArrayType& services); @@ -64,6 +65,8 @@ namespace Terrain TerrainHeightGradientListComponent() = default; ~TerrainHeightGradientListComponent() = default; + ////////////////////////////////////////////////////////////////////////// + // TerrainAreaHeightRequestBus void GetHeight(const AZ::Vector3& inPosition, AZ::Vector3& outPosition, bool& terrainExists) override; ////////////////////////////////////////////////////////////////////////// @@ -91,6 +94,9 @@ namespace Terrain AZ::Vector2 m_cachedHeightQueryResolution{ 1.0f, 1.0f }; AZ::Aabb m_cachedShapeBounds; + // prevent recursion in case user attaches cyclic dependences + mutable bool m_isRequestInProgress{ false }; + LmbrCentral::DependencyMonitor m_dependencyMonitor; }; } diff --git a/Gems/Terrain/Code/Source/Components/TerrainLayerSpawnerComponent.cpp b/Gems/Terrain/Code/Source/Components/TerrainLayerSpawnerComponent.cpp index c3803c25e8..83259415bd 100644 --- a/Gems/Terrain/Code/Source/Components/TerrainLayerSpawnerComponent.cpp +++ b/Gems/Terrain/Code/Source/Components/TerrainLayerSpawnerComponent.cpp @@ -54,6 +54,17 @@ namespace Terrain ->DataElement(AZ::Edit::UIHandlers::Default, &TerrainLayerSpawnerConfig::m_useGroundPlane, "Use Ground Plane", "Determines whether or not to provide a default ground plane") ; } + + if (auto behaviorContext = azrtti_cast(context)) + { + behaviorContext->Class() + ->Attribute(AZ::Script::Attributes::Category, "Terrain") + ->Constructor() + ->Property("layer", BehaviorValueProperty(&TerrainLayerSpawnerConfig::m_layer)) + ->Property("priority", BehaviorValueProperty(&TerrainLayerSpawnerConfig::m_priority)) + ->Property("useGroundPlane", BehaviorValueProperty(&TerrainLayerSpawnerConfig::m_useGroundPlane)) + ->Method("GetSelectableLayers", &TerrainLayerSpawnerConfig::GetSelectableLayers); + } } } diff --git a/Gems/Terrain/Code/Source/Components/TerrainLayerSpawnerComponent.h b/Gems/Terrain/Code/Source/Components/TerrainLayerSpawnerComponent.h index 683f9e9f06..3ce73b7a5a 100644 --- a/Gems/Terrain/Code/Source/Components/TerrainLayerSpawnerComponent.h +++ b/Gems/Terrain/Code/Source/Components/TerrainLayerSpawnerComponent.h @@ -52,6 +52,7 @@ namespace Terrain bool m_useGroundPlane = true; }; + static const AZ::Uuid TerrainLayerSpawnerComponentTypeId = "{3848605F-A4EA-478C-B710-84AB8DCA9EC5}"; class TerrainLayerSpawnerComponent : public AZ::Component @@ -61,7 +62,7 @@ namespace Terrain public: template friend class LmbrCentral::EditorWrappedComponentBase; - AZ_COMPONENT(TerrainLayerSpawnerComponent, "{3848605F-A4EA-478C-B710-84AB8DCA9EC5}"); + AZ_COMPONENT(TerrainLayerSpawnerComponent, TerrainLayerSpawnerComponentTypeId); static void GetProvidedServices(AZ::ComponentDescriptor::DependencyArrayType& services); static void GetIncompatibleServices(AZ::ComponentDescriptor::DependencyArrayType& services); static void GetRequiredServices(AZ::ComponentDescriptor::DependencyArrayType& services); diff --git a/Gems/Terrain/Code/Source/Components/TerrainPhysicsColliderComponent.cpp b/Gems/Terrain/Code/Source/Components/TerrainPhysicsColliderComponent.cpp index e9c235c1bd..c51728a5c3 100644 --- a/Gems/Terrain/Code/Source/Components/TerrainPhysicsColliderComponent.cpp +++ b/Gems/Terrain/Code/Source/Components/TerrainPhysicsColliderComponent.cpp @@ -16,16 +16,62 @@ #include #include +#include +#include #include namespace Terrain { - void TerrainPhysicsColliderConfig::Reflect(AZ::ReflectContext* context) + void TerrainPhysicsSurfaceMaterialMapping::Reflect(AZ::ReflectContext* context) { if (auto serialize = azrtti_cast(context)) { - serialize->Class() + serialize->Class() ->Version(1) + ->Field("Surface", &TerrainPhysicsSurfaceMaterialMapping::m_surfaceTag) + ->Field("Material", &TerrainPhysicsSurfaceMaterialMapping::m_materialId); + + if (auto edit = serialize->GetEditContext()) + { + edit->Class( + "Terrain Surface Material Mapping", "Mapping between a surface and a physics material.") + + ->ClassElement(AZ::Edit::ClassElements::EditorData, "") + ->Attribute(AZ::Edit::Attributes::AutoExpand, true) + ->Attribute(AZ::Edit::Attributes::Visibility, AZ::Edit::PropertyVisibility::Show) + + ->DataElement( + AZ::Edit::UIHandlers::ComboBox, &TerrainPhysicsSurfaceMaterialMapping::m_surfaceTag, "Surface Tag", + "Surface type to map to a physics material.") + ->DataElement(AZ::Edit::UIHandlers::Default, &TerrainPhysicsSurfaceMaterialMapping::m_materialId, "Material ID", "") + ->ElementAttribute(Physics::Attributes::MaterialLibraryAssetId, &TerrainPhysicsSurfaceMaterialMapping::GetMaterialLibraryId) + ->Attribute(AZ::Edit::Attributes::AutoExpand, true) + ->Attribute(AZ::Edit::Attributes::ShowProductAssetFileName, true); + } + } + } + + AZ::Data::AssetId TerrainPhysicsSurfaceMaterialMapping::GetMaterialLibraryId() + { + if (const auto* physicsSystem = AZ::Interface::Get()) + { + if (const auto* physicsConfiguration = physicsSystem->GetConfiguration()) + { + return physicsConfiguration->m_materialLibraryAsset.GetId(); + } + } + return {}; + } + + void TerrainPhysicsColliderConfig::Reflect(AZ::ReflectContext* context) + { + TerrainPhysicsSurfaceMaterialMapping::Reflect(context); + + if (auto serialize = azrtti_cast(context)) + { + serialize->Class() + ->Version(2)->Field( + "Mappings", &TerrainPhysicsColliderConfig::m_surfaceMaterialMappings) ; if (auto edit = serialize->GetEditContext()) @@ -35,7 +81,11 @@ namespace Terrain "Provides terrain data to a physics collider with configurable surface mappings.") ->ClassElement(AZ::Edit::ClassElements::EditorData, "") ->Attribute(AZ::Edit::Attributes::Visibility, AZ::Edit::PropertyVisibility::ShowChildrenOnly) - ->Attribute(AZ::Edit::Attributes::AutoExpand, true); + ->Attribute(AZ::Edit::Attributes::AutoExpand, true) + ->DataElement( + AZ::Edit::UIHandlers::Default, &TerrainPhysicsColliderConfig::m_surfaceMaterialMappings, + "Surface to Material Mappings", "Maps surfaces to physics materials") + ; } } } @@ -185,12 +235,28 @@ namespace Terrain void TerrainPhysicsColliderComponent::GetHeightfieldHeightBounds(float& minHeightBounds, float& maxHeightBounds) const { - AZ::Aabb heightfieldAabb = GetHeightfieldAabb(); + const AZ::Aabb heightfieldAabb = GetHeightfieldAabb(); // Because our terrain heights are relative to the center of the bounding box, the min and max allowable heights are also // relative to the center. They are also clamped to the size of the bounding box. - minHeightBounds = -(heightfieldAabb.GetZExtent() / 2.0f); maxHeightBounds = heightfieldAabb.GetZExtent() / 2.0f; + minHeightBounds = -maxHeightBounds; + } + + float TerrainPhysicsColliderComponent::GetHeightfieldMinHeight() const + { + float minHeightBounds{ 0.0f }; + float maxHeightBounds{ 0.0f }; + GetHeightfieldHeightBounds(minHeightBounds, maxHeightBounds); + return minHeightBounds; + } + + float TerrainPhysicsColliderComponent::GetHeightfieldMaxHeight() const + { + float minHeightBounds{ 0.0f }; + float maxHeightBounds{ 0.0f }; + GetHeightfieldHeightBounds(minHeightBounds, maxHeightBounds); + return maxHeightBounds; } AZ::Transform TerrainPhysicsColliderComponent::GetHeightfieldTransform() const @@ -199,13 +265,13 @@ namespace Terrain AZ::Vector3 translate; AZ::TransformBus::EventResult(translate, GetEntityId(), &AZ::TransformBus::Events::GetWorldTranslation); - AZ::Transform transform = AZ::Transform::CreateTranslation(translate); - - return transform; + return AZ::Transform::CreateTranslation(translate); } void TerrainPhysicsColliderComponent::GenerateHeightsInBounds(AZStd::vector& heights) const { + AZ_PROFILE_FUNCTION(Entity); + const AZ::Vector2 gridResolution = GetHeightfieldGridSpacing(); AZ::Aabb worldSize = GetHeightfieldAabb(); @@ -235,9 +301,39 @@ namespace Terrain } } + uint8_t TerrainPhysicsColliderComponent::GetMaterialIdIndex(const Physics::MaterialId& materialId, const AZStd::vector& materialList) const + { + const auto& materialIter = AZStd::find(materialList.begin(), materialList.end(), materialId); + if (materialIter != materialList.end()) + { + return static_cast(materialIter - materialList.begin()); + } + + return 0; + } + + Physics::MaterialId TerrainPhysicsColliderComponent::FindMaterialIdForSurfaceTag(const SurfaceData::SurfaceTag tag) const + { + uint8_t index = 0; + + for (auto& mapping : m_configuration.m_surfaceMaterialMappings) + { + if (mapping.m_surfaceTag == tag) + { + return mapping.m_materialId; + } + index++; + } + + // If this surface isn't mapped, use the default material. + return Physics::MaterialId(); + } + void TerrainPhysicsColliderComponent::GenerateHeightsAndMaterialsInBounds( AZStd::vector& heightMaterials) const { + AZ_PROFILE_FUNCTION(Entity); + const AZ::Vector2 gridResolution = GetHeightfieldGridSpacing(); AZ::Aabb worldSize = GetHeightfieldAabb(); @@ -252,6 +348,8 @@ namespace Terrain heightMaterials.clear(); heightMaterials.reserve(gridWidth * gridHeight); + AZStd::vector materialList = GetMaterialList(); + for (int32_t row = 0; row < gridHeight; row++) { const float y = row * gridResolution.GetY() + worldSize.GetMin().GetY(); @@ -272,9 +370,19 @@ namespace Terrain terrainExists = false; } + // Find the best surface tag at this point. + AzFramework::SurfaceData::SurfaceTagWeight surfaceWeight; + AzFramework::Terrain::TerrainDataRequestBus::BroadcastResult( + surfaceWeight, &AzFramework::Terrain::TerrainDataRequests::GetMaxSurfaceWeightFromFloats, x, y, + AzFramework::Terrain::TerrainDataRequests::Sampler::DEFAULT, nullptr); + Physics::HeightMaterialPoint point; point.m_height = height - worldCenterZ; point.m_quadMeshType = terrainExists ? Physics::QuadMeshType::SubdivideUpperLeftToBottomRight : Physics::QuadMeshType::Hole; + + Physics::MaterialId materialId = FindMaterialIdForSurfaceTag(surfaceWeight.m_surfaceType); + point.m_materialIndex = GetMaterialIdIndex(materialId, materialList); + heightMaterials.emplace_back(point); } } @@ -298,9 +406,41 @@ namespace Terrain numRows = aznumeric_cast((bounds.GetMax().GetY() - bounds.GetMin().GetY()) / gridResolution.GetY()); } + int32_t TerrainPhysicsColliderComponent::GetHeightfieldGridColumns() const + { + int32_t numColumns{ 0 }; + int32_t numRows{ 0 }; + + GetHeightfieldGridSize(numColumns, numRows); + return numColumns; + } + + int32_t TerrainPhysicsColliderComponent::GetHeightfieldGridRows() const + { + int32_t numColumns{ 0 }; + int32_t numRows{ 0 }; + + GetHeightfieldGridSize(numColumns, numRows); + return numRows; + } + AZStd::vector TerrainPhysicsColliderComponent::GetMaterialList() const { - return AZStd::vector(); + AZStd::vector materialList; + + // Ensure the list contains the default material as the first entry. + materialList.emplace_back(Physics::MaterialId()); + + for (auto& mapping : m_configuration.m_surfaceMaterialMappings) + { + const auto& existingInstance = AZStd::find(materialList.begin(), materialList.end(), mapping.m_materialId); + if (existingInstance == materialList.end()) + { + materialList.emplace_back(mapping.m_materialId); + } + } + + return materialList; } AZStd::vector TerrainPhysicsColliderComponent::GetHeights() const diff --git a/Gems/Terrain/Code/Source/Components/TerrainPhysicsColliderComponent.h b/Gems/Terrain/Code/Source/Components/TerrainPhysicsColliderComponent.h index e268223689..8a70f282d0 100644 --- a/Gems/Terrain/Code/Source/Components/TerrainPhysicsColliderComponent.h +++ b/Gems/Terrain/Code/Source/Components/TerrainPhysicsColliderComponent.h @@ -12,6 +12,7 @@ #include #include +#include #include #include @@ -24,6 +25,22 @@ namespace LmbrCentral namespace Terrain { + static const uint8_t InvalidSurfaceTagIndex = 0xFF; + + struct TerrainPhysicsSurfaceMaterialMapping final + { + public: + AZ_CLASS_ALLOCATOR(TerrainPhysicsSurfaceMaterialMapping, AZ::SystemAllocator, 0); + AZ_RTTI(TerrainPhysicsSurfaceMaterialMapping, "{A88B5289-DFCD-4564-8395-E2177DFE5B18}"); + static void Reflect(AZ::ReflectContext* context); + + SurfaceData::SurfaceTag m_surfaceTag; + Physics::MaterialId m_materialId; + + private: + static AZ::Data::AssetId GetMaterialLibraryId(); + }; + class TerrainPhysicsColliderConfig : public AZ::ComponentConfig { @@ -32,6 +49,7 @@ namespace Terrain AZ_RTTI(TerrainPhysicsColliderConfig, "{E9EADB8F-C3A5-4B9C-A62D-2DBC86B4CE59}", AZ::ComponentConfig); static void Reflect(AZ::ReflectContext* context); + AZStd::vector m_surfaceMaterialMappings; }; @@ -58,7 +76,11 @@ namespace Terrain // HeightfieldProviderRequestsBus AZ::Vector2 GetHeightfieldGridSpacing() const override; void GetHeightfieldGridSize(int32_t& numColumns, int32_t& numRows) const override; + int32_t GetHeightfieldGridColumns() const override; + int32_t GetHeightfieldGridRows() const override; void GetHeightfieldHeightBounds(float& minHeightBounds, float& maxHeightBounds) const override; + float GetHeightfieldMinHeight() const override; + float GetHeightfieldMaxHeight() const override; AZ::Aabb GetHeightfieldAabb() const override; AZ::Transform GetHeightfieldTransform() const override; AZStd::vector GetMaterialList() const override; @@ -73,6 +95,9 @@ namespace Terrain bool ReadInConfig(const AZ::ComponentConfig* baseConfig) override; bool WriteOutConfig(AZ::ComponentConfig* outBaseConfig) const override; + uint8_t GetMaterialIdIndex(const Physics::MaterialId& materialId, const AZStd::vector& materialList) const; + Physics::MaterialId FindMaterialIdForSurfaceTag(const SurfaceData::SurfaceTag tag) const; + void GenerateHeightsInBounds(AZStd::vector& heights) const; void GenerateHeightsAndMaterialsInBounds(AZStd::vector& heightMaterials) const; diff --git a/Gems/Terrain/Code/Source/Components/TerrainSurfaceDataSystemComponent.cpp b/Gems/Terrain/Code/Source/Components/TerrainSurfaceDataSystemComponent.cpp index 7395e66d06..dbaae0118a 100644 --- a/Gems/Terrain/Code/Source/Components/TerrainSurfaceDataSystemComponent.cpp +++ b/Gems/Terrain/Code/Source/Components/TerrainSurfaceDataSystemComponent.cpp @@ -7,6 +7,7 @@ */ #include +#include #include #include #include @@ -14,6 +15,7 @@ #include #include #include +#include namespace Terrain { @@ -96,6 +98,7 @@ namespace Terrain { m_providerHandle = SurfaceData::InvalidSurfaceDataRegistryHandle; AzFramework::Terrain::TerrainDataNotificationBus::Handler::BusConnect(); + SurfaceData::SurfaceDataTagProviderRequestBus::Handler::BusConnect(); UpdateTerrainData(AZ::Aabb::CreateNull()); } @@ -110,6 +113,7 @@ namespace Terrain } SurfaceData::SurfaceDataProviderRequestBus::Handler::BusDisconnect(); + SurfaceData::SurfaceDataTagProviderRequestBus::Handler::BusDisconnect(); AzFramework::Terrain::TerrainDataNotificationBus::Handler::BusDisconnect(); // Clear the cached terrain bounds data @@ -162,8 +166,7 @@ namespace Terrain point.m_normal = terrainSurfacePoint.m_normal; // Always add a "terrain" or "terrainHole" tag. - const AZ::Crc32 terrainTag = - isHole ? SurfaceData::Constants::s_terrainHoleTagCrc : SurfaceData::Constants::s_terrainTagCrc; + const AZ::Crc32 terrainTag = isHole ? Constants::s_terrainHoleTagCrc : Constants::s_terrainTagCrc; SurfaceData::AddMaxValueForMasks(point.m_masks, terrainTag, 1.0f); // Add all of the surface tags that the terrain has at this point. @@ -189,8 +192,8 @@ namespace Terrain SurfaceData::SurfaceTagVector TerrainSurfaceDataSystemComponent::GetSurfaceTags() const { SurfaceData::SurfaceTagVector tags; - tags.push_back(SurfaceData::Constants::s_terrainHoleTagCrc); - tags.push_back(SurfaceData::Constants::s_terrainTagCrc); + tags.push_back(Constants::s_terrainHoleTagCrc); + tags.push_back(Constants::s_terrainTagCrc); return tags; } @@ -214,10 +217,10 @@ namespace Terrain { AZ_Assert((m_providerHandle != SurfaceData::InvalidSurfaceDataRegistryHandle), "Invalid surface data handle"); - // Our terrain was valid before and after, it just changed in some way. If we have a valid dirty region passed in - // then it's possible that the heightmap has been modified in the Editor. Otherwise, just notify that the entire - // terrain has changed in some way. - if (dirtyRegion.IsValid()) + // Our terrain was valid before and after, it just changed in some way. If we have a valid dirty region, and the terrain + // bounds themselves haven't changed, just notify that our terrain data has changed within the bounds. Otherwise, notify + // that the entire terrain provider needs to be updated, since it either has new bounds or the entire set of data is dirty. + if (dirtyRegion.IsValid() && m_terrainBounds.IsClose(terrainBoundsBeforeUpdate)) { SurfaceData::SurfaceDataSystemRequestBus::Broadcast( &SurfaceData::SurfaceDataSystemRequestBus::Events::RefreshSurfaceData, dirtyRegion); @@ -248,7 +251,6 @@ namespace Terrain SurfaceData::SurfaceDataSystemRequestBus::Broadcast( &SurfaceData::SurfaceDataSystemRequestBus::Events::UnregisterSurfaceDataProvider, m_providerHandle); m_providerHandle = SurfaceData::InvalidSurfaceDataRegistryHandle; - SurfaceData::SurfaceDataProviderRequestBus::Handler::BusDisconnect(); } else @@ -263,4 +265,10 @@ namespace Terrain { UpdateTerrainData(dirtyRegion); } + + void TerrainSurfaceDataSystemComponent::GetRegisteredSurfaceTagNames(SurfaceData::SurfaceTagNameSet& names) const + { + names.insert(Constants::s_terrainHoleTagName); + names.insert(Constants::s_terrainTagName); + } } diff --git a/Gems/Terrain/Code/Source/Components/TerrainSurfaceDataSystemComponent.h b/Gems/Terrain/Code/Source/Components/TerrainSurfaceDataSystemComponent.h index d9c7893c77..4d9a5b7481 100644 --- a/Gems/Terrain/Code/Source/Components/TerrainSurfaceDataSystemComponent.h +++ b/Gems/Terrain/Code/Source/Components/TerrainSurfaceDataSystemComponent.h @@ -13,6 +13,7 @@ #include #include #include +#include namespace Terrain { @@ -32,6 +33,7 @@ namespace Terrain : public AZ::Component , private SurfaceData::SurfaceDataProviderRequestBus::Handler , private AzFramework::Terrain::TerrainDataNotificationBus::Handler + , private SurfaceData::SurfaceDataTagProviderRequestBus::Handler { friend class EditorTerrainSurfaceDataSystemComponent; TerrainSurfaceDataSystemComponent(const TerrainSurfaceDataSystemConfig&); @@ -72,5 +74,9 @@ namespace Terrain AZ::Aabb m_terrainBounds = AZ::Aabb::CreateNull(); AZStd::atomic_bool m_terrainBoundsIsValid{ false }; + + ////////////////////////////////////////////////////////////////////////// + // SurfaceData::SurfaceDataTagProviderRequestBus + void GetRegisteredSurfaceTagNames(SurfaceData::SurfaceTagNameSet& names) const override; }; } diff --git a/Gems/Terrain/Code/Source/Components/TerrainSurfaceGradientListComponent.cpp b/Gems/Terrain/Code/Source/Components/TerrainSurfaceGradientListComponent.cpp index 748221d69e..4d93842654 100644 --- a/Gems/Terrain/Code/Source/Components/TerrainSurfaceGradientListComponent.cpp +++ b/Gems/Terrain/Code/Source/Components/TerrainSurfaceGradientListComponent.cpp @@ -8,6 +8,7 @@ #include +#include #include #include @@ -46,6 +47,17 @@ namespace Terrain ; } } + + if (auto behaviorContext = azrtti_cast(context)) + { + behaviorContext->Class() + ->Attribute(AZ::Script::Attributes::Scope, AZ::Script::Attributes::ScopeFlags::Common) + ->Attribute(AZ::Script::Attributes::Category, "Terrain") + ->Attribute(AZ::Script::Attributes::Module, "terrain") + ->Constructor() + ->Property("gradientEntityId", BehaviorValueProperty(&TerrainSurfaceGradientMapping::m_gradientEntityId)) + ->Property("surfaceTag", BehaviorValueProperty(&TerrainSurfaceGradientMapping::m_surfaceTag)); + } } void TerrainSurfaceGradientListConfig::Reflect(AZ::ReflectContext* context) diff --git a/Gems/Terrain/Code/Source/Components/TerrainSurfaceGradientListComponent.h b/Gems/Terrain/Code/Source/Components/TerrainSurfaceGradientListComponent.h index 20851c127f..8a3c097b6c 100644 --- a/Gems/Terrain/Code/Source/Components/TerrainSurfaceGradientListComponent.h +++ b/Gems/Terrain/Code/Source/Components/TerrainSurfaceGradientListComponent.h @@ -32,6 +32,13 @@ namespace Terrain AZ_RTTI(TerrainSurfaceGradientMapping, "{473AD2CE-F22A-45A9-803F-2192F3D9F2BF}"); static void Reflect(AZ::ReflectContext* context); + TerrainSurfaceGradientMapping() = default; + TerrainSurfaceGradientMapping(const AZ::EntityId& entityId, const SurfaceData::SurfaceTag& surfaceTag) + : m_gradientEntityId(entityId) + , m_surfaceTag(surfaceTag) + { + } + AZ::EntityId m_gradientEntityId; SurfaceData::SurfaceTag m_surfaceTag; }; diff --git a/Gems/Terrain/Code/Source/Components/TerrainWorldComponent.cpp b/Gems/Terrain/Code/Source/Components/TerrainWorldComponent.cpp index bd65cf6abc..8b612b86ce 100644 --- a/Gems/Terrain/Code/Source/Components/TerrainWorldComponent.cpp +++ b/Gems/Terrain/Code/Source/Components/TerrainWorldComponent.cpp @@ -40,15 +40,17 @@ namespace Terrain ->DataElement(AZ::Edit::UIHandlers::Default, &TerrainWorldConfig::m_worldMin, "World Bounds (Min)", "") // Temporary constraint until the rest of the Terrain system is updated to support larger worlds. + ->Attribute(AZ::Edit::Attributes::ChangeValidate, &TerrainWorldConfig::ValidateWorldMin) ->Attribute(AZ::Edit::Attributes::Min, -2048.0f) ->Attribute(AZ::Edit::Attributes::Max, 2048.0f) ->DataElement(AZ::Edit::UIHandlers::Default, &TerrainWorldConfig::m_worldMax, "World Bounds (Max)", "") // Temporary constraint until the rest of the Terrain system is updated to support larger worlds. + ->Attribute(AZ::Edit::Attributes::ChangeValidate, &TerrainWorldConfig::ValidateWorldMax) ->Attribute(AZ::Edit::Attributes::Min, -2048.0f) ->Attribute(AZ::Edit::Attributes::Max, 2048.0f) ->DataElement( AZ::Edit::UIHandlers::Default, &TerrainWorldConfig::m_heightQueryResolution, "Height Query Resolution (m)", "") - ; + ->Attribute(AZ::Edit::Attributes::ChangeValidate, &TerrainWorldConfig::ValidateWorldHeight); } } } @@ -128,4 +130,42 @@ namespace Terrain } return false; } -} + + float TerrainWorldConfig::NumberOfSamples(AZ::Vector3* min, AZ::Vector3* max, AZ::Vector2* heightQuery) + { + float numberOfSamples = ((max->GetX() - min->GetX()) / heightQuery->GetX()) * ((max->GetY() - min->GetY()) / heightQuery->GetY()); + return numberOfSamples; + } + + AZ::Outcome TerrainWorldConfig::DetermineMessage(float numSamples) + { + const float maximumSamplesAllowed = 16.0f * 1024.0f * 1024.0f; + if (numSamples <= maximumSamplesAllowed) + { + return AZ::Success(); + } + return AZ::Failure(AZStd::string("The number of samples exceeds the maximum allowed.")); + } + + AZ::Outcome TerrainWorldConfig::ValidateWorldMin(void* newValue, [[maybe_unused]]const AZ::Uuid& valueType) + { + AZ::Vector3 minValue = *static_cast(newValue); + + return DetermineMessage(NumberOfSamples(&minValue, &m_worldMax, &m_heightQueryResolution)); + } + + AZ::Outcome TerrainWorldConfig::ValidateWorldMax(void* newValue, [[maybe_unused]] const AZ::Uuid& valueType) + { + AZ::Vector3 maxValue = *static_cast(newValue); + + return DetermineMessage(NumberOfSamples(&m_worldMin, &maxValue, &m_heightQueryResolution)); + } + + AZ::Outcome TerrainWorldConfig::ValidateWorldHeight(void* newValue, [[maybe_unused]] const AZ::Uuid& valueType) + { + AZ::Vector2 heightValue = *static_cast(newValue); + + return DetermineMessage(NumberOfSamples(&m_worldMin, &m_worldMax, &heightValue)); + } + +} // namespace Terrain diff --git a/Gems/Terrain/Code/Source/Components/TerrainWorldComponent.h b/Gems/Terrain/Code/Source/Components/TerrainWorldComponent.h index 2dfe1135c8..a396bcefc8 100644 --- a/Gems/Terrain/Code/Source/Components/TerrainWorldComponent.h +++ b/Gems/Terrain/Code/Source/Components/TerrainWorldComponent.h @@ -32,6 +32,14 @@ namespace Terrain AZ::Vector3 m_worldMin{ 0.0f, 0.0f, 0.0f }; AZ::Vector3 m_worldMax{ 1024.0f, 1024.0f, 1024.0f }; AZ::Vector2 m_heightQueryResolution{ 1.0f, 1.0f }; + + private: + AZ::Outcome ValidateWorldMin(void* newValue, const AZ::Uuid& valueType); + AZ::Outcome ValidateWorldMax(void* newValue, const AZ::Uuid& valueType); + AZ::Outcome ValidateWorldHeight(void* newValue, const AZ::Uuid& valueType); + float NumberOfSamples(AZ::Vector3* min, AZ::Vector3* max, AZ::Vector2* heightQuery); + AZ::Outcome DetermineMessage(float numSamples); + }; diff --git a/Gems/Terrain/Code/Source/Components/TerrainWorldDebuggerComponent.cpp b/Gems/Terrain/Code/Source/Components/TerrainWorldDebuggerComponent.cpp index e140129563..f3e0d59537 100644 --- a/Gems/Terrain/Code/Source/Components/TerrainWorldDebuggerComponent.cpp +++ b/Gems/Terrain/Code/Source/Components/TerrainWorldDebuggerComponent.cpp @@ -90,13 +90,28 @@ namespace Terrain void TerrainWorldDebuggerComponent::Activate() { - m_wireframeBounds = AZ::Aabb::CreateNull(); + // Given the AuxGeom vertex limits, MaxSectorsToDraw is the max number of wireframe sectors we can draw without exceeding the + // limits. Since we want an N x N sector grid, take the square root to get the number of sectors in each direction. + m_sectorGridSize = aznumeric_cast(sqrtf(MaxSectorsToDraw)); + + // We're always going to keep the camera in the center square, so "round" downwards to an odd number of sectors if we currently + // have an even number. (If we added a sector, we'll go above the max sectors that we can draw with our vertex limits) + m_sectorGridSize = (m_sectorGridSize & 0x01) ? m_sectorGridSize : m_sectorGridSize - 1; + + // Create our fixed set of sectors that we'll draw. By default, they'll all be constructed as dirty, so they'll get refreshed + // the first time we try to draw them. (If wireframe drawing is disabled, we'll never refresh them) + m_wireframeSectors.clear(); + m_wireframeSectors.resize(m_sectorGridSize * m_sectorGridSize); AzFramework::EntityDebugDisplayEventBus::Handler::BusConnect(GetEntityId()); AzFramework::BoundsRequestBus::Handler::BusConnect(GetEntityId()); AzFramework::Terrain::TerrainDataNotificationBus::Handler::BusConnect(); - RefreshCachedWireframeGrid(AZ::Aabb::CreateNull()); + // Any time the world bounds potentially changes, notify that the terrain debugger's visibility bounds also changed. + // Otherwise, DisplayEntityViewport() won't get called at the appropriate times, since the visibility could get incorrectly + // culled out. + AzFramework::IEntityBoundsUnionRequestBus::Broadcast( + &AzFramework::IEntityBoundsUnionRequestBus::Events::RefreshEntityLocalBoundsUnion, GetEntityId()); } void TerrainWorldDebuggerComponent::Deactivate() @@ -105,7 +120,6 @@ namespace Terrain AzFramework::BoundsRequestBus::Handler::BusDisconnect(); AzFramework::EntityDebugDisplayEventBus::Handler::BusDisconnect(); - m_wireframeBounds = AZ::Aabb::CreateNull(); m_wireframeSectors.clear(); } @@ -144,163 +158,238 @@ namespace Terrain return GetWorldBounds(); } - void TerrainWorldDebuggerComponent::DisplayEntityViewport( - const AzFramework::ViewportInfo& viewportInfo, AzFramework::DebugDisplayRequests& debugDisplay) + void TerrainWorldDebuggerComponent::MarkDirtySectors(const AZ::Aabb& dirtyRegion) { - // Draw a wireframe box around the entire terrain world bounds - if (m_configuration.m_drawWorldBounds) + // Create a 2D version of dirtyRegion that has Z set to min/max float values, so that we can just check for XY overlap with + // each sector. + const AZ::Aabb dirtyRegion2D = AZ::Aabb::CreateFromMinMaxValues( + dirtyRegion.GetMin().GetX(), dirtyRegion.GetMin().GetY(), AZStd::numeric_limits::lowest(), + dirtyRegion.GetMax().GetX(), dirtyRegion.GetMax().GetY(), AZStd::numeric_limits::max()); + + // For each sector that overlaps the dirty region (or all of them if the region is invalid), mark them as dirty so that + // they'll get refreshed the next time we need to draw them. + for (auto& sector : m_wireframeSectors) { - AZ::Color outlineColor(1.0f, 0.0f, 0.0f, 1.0f); - AZ::Aabb aabb = GetWorldBounds(); - - debugDisplay.SetColor(outlineColor); - debugDisplay.DrawWireBox(aabb.GetMin(), aabb.GetMax()); - } - - // Draw a wireframe representation of the terrain surface - if (m_configuration.m_drawWireframe && !m_wireframeSectors.empty()) - { - // Start by assuming we'll draw the entire world. - AZ::Aabb drawingAabb = GetWorldBounds(); - - // Assuming we can get the camera, reduce the drawing bounds to a fixed distance around the camera. - if (auto viewportContextRequests = AZ::RPI::ViewportContextRequests::Get(); viewportContextRequests) + if (!dirtyRegion2D.IsValid() || dirtyRegion2D.Overlaps(sector.m_aabb)) { - // Get the current camera position. - AZ::RPI::ViewportContextPtr viewportContext = viewportContextRequests->GetViewportContextById(viewportInfo.m_viewportId); - AZ::Vector3 cameraPos = viewportContext->GetCameraTransform().GetTranslation(); - - // Determine how far to draw in each direction in world space based on our MaxSectorsToDraw - AZ::Vector2 queryResolution = AZ::Vector2(1.0f); - AzFramework::Terrain::TerrainDataRequestBus::BroadcastResult( - queryResolution, &AzFramework::Terrain::TerrainDataRequests::GetTerrainHeightQueryResolution); - AZ::Vector3 viewDistance( - queryResolution.GetX() * SectorSizeInGridPoints * sqrtf(MaxSectorsToDraw), - queryResolution.GetY() * SectorSizeInGridPoints * sqrtf(MaxSectorsToDraw), - 0.0f); - - // Create an AABB around the camera based on how far we want to be able to draw in each direction and clamp the - // drawing AABB to it. - AZ::Aabb cameraAabb = AZ::Aabb::CreateFromMinMax( - AZ::Vector3( - cameraPos.GetX() - viewDistance.GetX(), cameraPos.GetY() - viewDistance.GetY(), drawingAabb.GetMin().GetZ()), - AZ::Vector3( - cameraPos.GetX() + viewDistance.GetX(), cameraPos.GetY() + viewDistance.GetY(), drawingAabb.GetMin().GetZ())); - drawingAabb.Clamp(cameraAabb); - } - - // For each sector, if it appears within our view distance, draw it. - for (auto& sector : m_wireframeSectors) - { - if (drawingAabb.Overlaps(sector.m_aabb)) - { - if (!sector.m_lineVertices.empty()) - { - const AZ::Color primaryColor = AZ::Color(0.25f, 0.25f, 0.25f, 1.0f); - debugDisplay.DrawLines(sector.m_lineVertices, primaryColor); - } - else - { - AZ_Warning("Debug", false, "empty sector!"); - } - } + sector.m_isDirty = true; } } } - void TerrainWorldDebuggerComponent::RefreshCachedWireframeGrid(const AZ::Aabb& dirtyRegion) + void TerrainWorldDebuggerComponent::DrawWorldBounds(AzFramework::DebugDisplayRequests& debugDisplay) { - // Get the terrain world bounds and grid resolution. - - AZ::Aabb worldBounds = GetWorldBounds(); - - AZ::Vector2 queryResolution = AZ::Vector2(1.0f); - AzFramework::Terrain::TerrainDataRequestBus::BroadcastResult( - queryResolution, &AzFramework::Terrain::TerrainDataRequests::GetTerrainHeightQueryResolution); - - // Calculate the world size of each sector. Note that this size actually ends at the last point, not the last square. - // So for example, the sector size for 3 points will go from (*--*--*) even though it will be used to draw (*--*--*--). - const float xSectorSize = (queryResolution.GetX() * SectorSizeInGridPoints); - const float ySectorSize = (queryResolution.GetY() * SectorSizeInGridPoints); - - // Calculate the total number of sectors to cache. The world bounds might not be evenly divisible by sector bounds, so we add - // an extra sector's worth of size in each direction so that clamping down to an integer still accounts for that fractional sector. - const int32_t numSectorsX = aznumeric_cast((worldBounds.GetXExtent() + xSectorSize) / xSectorSize); - const int32_t numSectorsY = aznumeric_cast((worldBounds.GetYExtent() + ySectorSize) / ySectorSize); - - // If we haven't cached anything before, or if the world bounds has changed, clear our cache structure and repopulate it - // with WireframeSector entries with the proper AABB sizes. - if (!m_wireframeBounds.IsValid() || !dirtyRegion.IsValid() || !m_wireframeBounds.IsClose(worldBounds)) + if (!m_configuration.m_drawWorldBounds) { - m_wireframeBounds = worldBounds; - - m_wireframeSectors.clear(); - m_wireframeSectors.reserve(numSectorsX * numSectorsY); - - for (int32_t ySector = 0; ySector < numSectorsY; ySector++) - { - for (int32_t xSector = 0; xSector < numSectorsX; xSector++) - { - // For each sector, set up the AABB for the sector and reserve memory for the line vertices. - WireframeSector sector; - sector.m_lineVertices.reserve(VerticesPerSector); - sector.m_aabb = AZ::Aabb::CreateFromMinMax( - AZ::Vector3( - worldBounds.GetMin().GetX() + (xSector * xSectorSize), worldBounds.GetMin().GetY() + (ySector * ySectorSize), - worldBounds.GetMin().GetZ()), - AZ::Vector3( - worldBounds.GetMin().GetX() + ((xSector + 1) * xSectorSize), - worldBounds.GetMin().GetY() + ((ySector + 1) * ySectorSize), worldBounds.GetMax().GetZ())); - - sector.m_aabb.Clamp(worldBounds); - - m_wireframeSectors.push_back(AZStd::move(sector)); - } - } - - // Notify the visibility system that our bounds have changed. - AzFramework::IEntityBoundsUnionRequestBus::Broadcast( - &AzFramework::IEntityBoundsUnionRequestBus::Events::RefreshEntityLocalBoundsUnion, GetEntityId()); + return; } - // For each sector, if it overlaps with the dirty region, clear it out and recache the wireframe line data. + // Draw a wireframe box around the entire terrain world bounds + AZ::Color outlineColor(1.0f, 0.0f, 0.0f, 1.0f); + AZ::Aabb aabb = GetWorldBounds(); + + debugDisplay.SetColor(outlineColor); + debugDisplay.DrawWireBox(aabb.GetMin(), aabb.GetMax()); + } + + void TerrainWorldDebuggerComponent::DrawWireframe( + const AzFramework::ViewportInfo& viewportInfo, AzFramework::DebugDisplayRequests& debugDisplay) + { + AZ_PROFILE_FUNCTION(Entity); + + if (!m_configuration.m_drawWireframe) + { + return; + } + + /* This draws a wireframe centered on the camera that extends out to a certain distance at all times. To reduce the amount of + * recalculations we need to do on each camera movement, we divide the world into a conceptual grid of sectors, where each sector + * contains a fixed number of terrain height points. So for example, if the terrain has height data at 1 m spacing, the sectors + * might be 10 m x 10 m in size. If the height data is spaced at 0.5 m, the sectors might be 5 m x 5 m in size. The wireframe + * draws N x N sectors centered around the camera, as determined by m_sectorGridSize. So a gridSize of 7 with a sector size of + * 10 m means that we'll be drawing 7 x 7 sectors, or 70 m x 70 m, centered around the camera. Each time the camera moves into + * a new sector, we refresh the changed sectors before drawing them. + * + * The only tricky bit to this design is the way the sectors are stored and indexed. They're stored in a single vector as NxN + * entries, so they would normally be indexed as (y * N) + x. Since we want this to be centered on the camera, the easy answer + * would be to take the camera position - (N / 2) (since we're centering) as the relative offset to the first entry. But this + * would mean that the entire set of entries would change every time we move the camera. For example, if we had 5 entries, + * they might map to 0-4, 1-5, 2-6, 3-7, etc as the camera moves. + * + * Instead, we use mod (%) to rotate our indices around, so it would go (0 1 2 3 4), (5 1 2 3 4), (5 6 2 3 4), (5 6 7 3 4), etc + * as the camera moves. For negative entries, we rotate the indices in reverse, so that we get results like (0 1 2 3 4), + * (0 1 2 3 -1), (0 1 2 -2 -1), (0 1 -3 -2 -1), etc. This way we always have the correct range of sectors, and sectors that have + * remained visible are left alone and don't need to be updated again. + */ + + // Get the terrain world bounds + AZ::Aabb worldBounds = GetWorldBounds(); + float worldMinZ = worldBounds.GetMin().GetZ(); + + // Get the terrain height data resolution + AZ::Vector2 heightDataResolution = AZ::Vector2(1.0f); + AzFramework::Terrain::TerrainDataRequestBus::BroadcastResult( + heightDataResolution, &AzFramework::Terrain::TerrainDataRequests::GetTerrainHeightQueryResolution); + + // Get the size of a wireframe sector in world space + const AZ::Vector2 sectorSize = heightDataResolution * SectorSizeInGridPoints; + + // Try to get the current camera position, or default to (0,0) if we can't. + AZ::Vector3 cameraPos = AZ::Vector3::CreateZero(); + if (auto viewportContextRequests = AZ::RPI::ViewportContextRequests::Get(); viewportContextRequests) + { + AZ::RPI::ViewportContextPtr viewportContext = viewportContextRequests->GetViewportContextById(viewportInfo.m_viewportId); + cameraPos = viewportContext->GetCameraTransform().GetTranslation(); + } + + // Convert our camera position to a wireframe grid sector. We first convert from world space to sector space by dividing by + // sectorSize, so that integer values are sectors, and fractional values are the distance within the sector. Then we get the + // floor, so that we consistently get the next lowest integer - i.e. 2.3 -> 2, and -2.3 -> -3. This gives us consistent behavior + // across both positive and negative positions. + AZ::Vector2 gridPosition = AZ::Vector2(cameraPos.GetX(), cameraPos.GetY()) / sectorSize; + int32_t cameraSectorX = aznumeric_cast(gridPosition.GetFloor().GetX()); + int32_t cameraSectorY = aznumeric_cast(gridPosition.GetFloor().GetY()); + + // Loop through each sector that we *want* to draw, based on camera position. If the current sector at that index in + // m_wireframeSectors doesn't match the world position we want, update its world position and mark it as dirty. + // (We loop from -gridSize/2 to gridSize/2 so that the camera is always in the center sector.) + for (int32_t sectorY = cameraSectorY - (m_sectorGridSize / 2); sectorY <= cameraSectorY + (m_sectorGridSize / 2); sectorY++) + { + for (int32_t sectorX = cameraSectorX - (m_sectorGridSize / 2); sectorX <= cameraSectorX + (m_sectorGridSize / 2); sectorX++) + { + + // Calculate the index in m_wireframeSectors for this sector. Our indices should rotate through 0 - gridSize, but just + // using a single mod will produce a negative result for negative sector indices. Using abs() will give us incorrect + // "backwards" indices for negative numbers, so instead we add the grid size and mod a second time. + // Ex: For a grid size of 5, we want the indices to map like this: + // Index 0 1 2 3 4 + // Values -10 -9 -8 -7 -6 + // -5 -4 -3 -2 -1 + // 0 1 2 3 4 + // 5 6 7 8 9 + // For -9, (-9 % 5) = -4, then (-4 + 5) % 5 = 1. If we used abs(), we'd get 4, which is backwards from what we want. + int32_t sectorYIndex = ((sectorY % m_sectorGridSize) + m_sectorGridSize) % m_sectorGridSize; + int32_t sectorXIndex = ((sectorX % m_sectorGridSize) + m_sectorGridSize) % m_sectorGridSize; + int32_t sectorIndex = (sectorYIndex * m_sectorGridSize) + sectorXIndex; + + WireframeSector& sector = m_wireframeSectors[sectorIndex]; + + // Calculate the new world space box for this sector. + AZ::Aabb sectorAabb = AZ::Aabb::CreateFromMinMax( + AZ::Vector3(sectorX * sectorSize.GetX(), sectorY * sectorSize.GetY(), worldMinZ), + AZ::Vector3((sectorX + 1) * sectorSize.GetX(), (sectorY + 1) * sectorSize.GetY(), worldMinZ)); + + // Clamp it to the terrain world bounds. + sectorAabb.Clamp(worldBounds); + + // If the world space box for the sector doesn't match, set it and mark the sector as dirty so we refresh the height data. + if (sector.m_aabb != sectorAabb) + { + sector.m_aabb = sectorAabb; + sector.m_isDirty = true; + } + } + } + + // Finally, for each sector, rebuild the data if it's dirty, then draw it assuming it has valid data. + // (Sectors that are outside the world bounds won't have any valid data, so they'll get skipped) for (auto& sector : m_wireframeSectors) { - if (dirtyRegion.IsValid() && !dirtyRegion.Overlaps(sector.m_aabb)) + if (sector.m_isDirty) { - continue; + RebuildSectorWireframe(sector, heightDataResolution, worldMinZ); } - sector.m_lineVertices.clear(); - - for (float y = sector.m_aabb.GetMin().GetY(); y < sector.m_aabb.GetMax().GetY(); y += queryResolution.GetY()) + if (!sector.m_lineVertices.empty()) { - for (float x = sector.m_aabb.GetMin().GetX(); x < sector.m_aabb.GetMax().GetX(); x += queryResolution.GetX()) - { - float x1 = x + queryResolution.GetX(); - float y1 = y + queryResolution.GetY(); + const AZ::Color primaryColor = AZ::Color(0.25f, 0.25f, 0.25f, 1.0f); + debugDisplay.DrawLines(sector.m_lineVertices, primaryColor); + } + } + } - float z00 = 0.0f; - float z01 = 0.0f; - float z10 = 0.0f; - bool terrainExists; - AzFramework::Terrain::TerrainDataRequestBus::BroadcastResult( - z00, &AzFramework::Terrain::TerrainDataRequests::GetHeightFromFloats, x, y, - AzFramework::Terrain::TerrainDataRequests::Sampler::EXACT, &terrainExists); - AzFramework::Terrain::TerrainDataRequestBus::BroadcastResult( - z01, &AzFramework::Terrain::TerrainDataRequests::GetHeightFromFloats, x, y1, - AzFramework::Terrain::TerrainDataRequests::Sampler::EXACT, &terrainExists); - AzFramework::Terrain::TerrainDataRequestBus::BroadcastResult( - z10, &AzFramework::Terrain::TerrainDataRequests::GetHeightFromFloats, x1, y, - AzFramework::Terrain::TerrainDataRequests::Sampler::EXACT, &terrainExists); + void TerrainWorldDebuggerComponent::DisplayEntityViewport( + const AzFramework::ViewportInfo& viewportInfo, AzFramework::DebugDisplayRequests& debugDisplay) + { + DrawWorldBounds(debugDisplay); + DrawWireframe(viewportInfo, debugDisplay); - sector.m_lineVertices.push_back(AZ::Vector3(x, y, z00)); - sector.m_lineVertices.push_back(AZ::Vector3(x1, y, z10)); + } - sector.m_lineVertices.push_back(AZ::Vector3(x, y, z00)); - sector.m_lineVertices.push_back(AZ::Vector3(x, y1, z01)); - } + void TerrainWorldDebuggerComponent::RebuildSectorWireframe(WireframeSector& sector, const AZ::Vector2& gridResolution, float worldMinZ) + { + if (!sector.m_isDirty) + { + return; + } + + sector.m_isDirty = false; + + // To rebuild the wireframe, we walk through the sector by X, then by Y. For each point, we add two lines in a _| shape. + // To do that, we'll need to cache the height from the previous point to draw the _ line, and from the previous row to draw + // the | line. + + // When walking through the bounding box, the loops will be inclusive on one side, and exclusive on the other. However, since + // our box is exactly aligned with grid points, we want to get the grid points on both sides in each direction, so we need to + // expand our query region by one extra point. + // For example, if our AABB is 2 m and our grid resolution is 1 m, we'll want to query (*--*--*--), not (*--*--). + // Since we're processing lines based on the grid points and going backwards, this will give us (*--*--*). + + AZ::Aabb region = sector.m_aabb; + region.SetMax(region.GetMax() + AZ::Vector3(gridResolution.GetX(), gridResolution.GetY(), 0.0f)); + + // We need 4 vertices for each grid point in our sector to hold the _| shape. + const size_t numSamplesX = aznumeric_cast(ceil(region.GetExtents().GetX() / gridResolution.GetX())); + const size_t numSamplesY = aznumeric_cast(ceil(region.GetExtents().GetY() / gridResolution.GetY())); + sector.m_lineVertices.clear(); + sector.m_lineVertices.reserve(numSamplesX * numSamplesY * 4); + + // This keeps track of the height from the previous point for the _ line. + float previousHeight = 0.0f; + + // This keeps track of the heights from the previous row for the | line. + AZStd::vector rowHeights(numSamplesX); + + // For each terrain height value in the region, create the _| grid lines for that point and cache off the height value + // for use with subsequent grid line calculations. + auto ProcessHeightValue = [gridResolution, &previousHeight, &rowHeights, §or] + (uint32_t xIndex, uint32_t yIndex, const AZ::Vector3& position, [[maybe_unused]] bool terrainExists) + { + // Don't add any vertices for the first column or first row. These grid lines will be handled by an adjacent sector, if + // there is one. + if ((xIndex > 0) && (yIndex > 0)) + { + float x = position.GetX() - gridResolution.GetX(); + float y = position.GetY() - gridResolution.GetY(); + + sector.m_lineVertices.emplace_back(AZ::Vector3(x, position.GetY(), previousHeight)); + sector.m_lineVertices.emplace_back(position); + + sector.m_lineVertices.emplace_back(AZ::Vector3(position.GetX(), y, rowHeights[xIndex])); + sector.m_lineVertices.emplace_back(position); + } + + // Save off the heights so that we can use them to draw subsequent columns and rows. + previousHeight = position.GetZ(); + rowHeights[xIndex] = position.GetZ(); + }; + + // This set of nested loops will get replaced with a call to ProcessHeightsFromRegion once the API exists. + for (size_t yIndex = 0; yIndex < numSamplesY; yIndex++) + { + float y = region.GetMin().GetY() + (gridResolution.GetY() * yIndex); + for (size_t xIndex = 0; xIndex < numSamplesX; xIndex++) + { + float x = region.GetMin().GetX() + (gridResolution.GetX() * xIndex); + + float height = worldMinZ; + bool terrainExists = false; + AzFramework::Terrain::TerrainDataRequestBus::BroadcastResult( + height, &AzFramework::Terrain::TerrainDataRequests::GetHeightFromFloats, x, y, + AzFramework::Terrain::TerrainDataRequests::Sampler::EXACT, &terrainExists); + ProcessHeightValue( + aznumeric_cast(xIndex), aznumeric_cast(yIndex), AZ::Vector3(x, y, height), terrainExists); } } } @@ -309,7 +398,14 @@ namespace Terrain { if (dataChangedMask & (TerrainDataChangedMask::Settings | TerrainDataChangedMask::HeightData)) { - RefreshCachedWireframeGrid(dirtyRegion); + MarkDirtySectors(dirtyRegion); + } + + if (dataChangedMask & TerrainDataChangedMask::Settings) + { + // Any time the world bounds potentially changes, notify that the terrain debugger's visibility bounds also changed. + AzFramework::IEntityBoundsUnionRequestBus::Broadcast( + &AzFramework::IEntityBoundsUnionRequestBus::Events::RefreshEntityLocalBoundsUnion, GetEntityId()); } } diff --git a/Gems/Terrain/Code/Source/Components/TerrainWorldDebuggerComponent.h b/Gems/Terrain/Code/Source/Components/TerrainWorldDebuggerComponent.h index 5ec831c038..f3bcead8c3 100644 --- a/Gems/Terrain/Code/Source/Components/TerrainWorldDebuggerComponent.h +++ b/Gems/Terrain/Code/Source/Components/TerrainWorldDebuggerComponent.h @@ -82,33 +82,40 @@ namespace Terrain private: + TerrainWorldDebuggerConfig m_configuration; + // Cache our debug wireframe representation in "sectors" of data so that we can easily control how far out we draw // the wireframe representation in each direction. struct WireframeSector { - AZ::Aabb m_aabb; + AZ::Aabb m_aabb{ AZ::Aabb::CreateNull() }; AZStd::vector m_lineVertices; + bool m_isDirty{ true }; }; + void RebuildSectorWireframe(WireframeSector& sector, const AZ::Vector2& gridResolution, float worldMinZ); + void MarkDirtySectors(const AZ::Aabb& dirtyRegion); + void DrawWorldBounds(AzFramework::DebugDisplayRequests& debugDisplay); + void DrawWireframe(const AzFramework::ViewportInfo& viewportInfo, AzFramework::DebugDisplayRequests& debugDisplay); + // Each sector contains an N x N grid of squares that it will draw. Since this is a count of the number of terrain grid points // in each direction, the actual world size will depend on the terrain grid resolution in each direction. static constexpr int32_t SectorSizeInGridPoints = 10; - // For each grid point we will draw half a square (left-right, top-down), so we need 4 vertices for the two lines. + // For each grid point we will draw half a square ( _| ), so we need 4 vertices for the two lines. static constexpr int32_t VerticesPerGridPoint = 4; - // Pre-calculate the total number of vertices per sector. - static constexpr int32_t VerticesPerSector = - (SectorSizeInGridPoints * VerticesPerGridPoint) * (SectorSizeInGridPoints * VerticesPerGridPoint); + // Pre-calculate the total number of vertices per sector (N x N grid points, with 4 vertices per grid point) + static constexpr int32_t VerticesPerSector = (SectorSizeInGridPoints * SectorSizeInGridPoints) * VerticesPerGridPoint; // AuxGeom has limits to the number of lines it can draw in a frame, so we'll cap how many total sectors to draw. static constexpr int32_t MaxVerticesToDraw = 500000; static constexpr int32_t MaxSectorsToDraw = MaxVerticesToDraw / VerticesPerSector; - void RefreshCachedWireframeGrid(const AZ::Aabb& dirtyRegion); - - TerrainWorldDebuggerConfig m_configuration; + // Structure to keep track of all our current wireframe sectors, so that we don't have to recalculate them every frame. AZStd::vector m_wireframeSectors; - AZ::Aabb m_wireframeBounds; + + // The size in sectors of our wireframe grid in each direction (i.e. a 5 x 5 sector grid has a sectorGridSize of 5) + int32_t m_sectorGridSize{ 0 }; }; } diff --git a/Gems/Terrain/Code/Source/Components/TerrainWorldRendererComponent.cpp b/Gems/Terrain/Code/Source/Components/TerrainWorldRendererComponent.cpp index 9cd9ce9fb2..5afaedc517 100644 --- a/Gems/Terrain/Code/Source/Components/TerrainWorldRendererComponent.cpp +++ b/Gems/Terrain/Code/Source/Components/TerrainWorldRendererComponent.cpp @@ -46,6 +46,7 @@ namespace Terrain ->EnumAttribute(TerrainWorldRendererConfig::WorldSize::_4096Meters, "4 Kilometers") ->EnumAttribute(TerrainWorldRendererConfig::WorldSize::_8192Meters, "8 Kilometers") ->EnumAttribute(TerrainWorldRendererConfig::WorldSize::_16384Meters, "16 Kilometers") + ->Attribute(AZ::Edit::Attributes::Visibility, false) // Keeping invisible until it's hooked up under the hood ; } } diff --git a/Gems/Terrain/Code/Source/EditorComponents/EditorTerrainHeightGradientListComponent.h b/Gems/Terrain/Code/Source/EditorComponents/EditorTerrainHeightGradientListComponent.h index 2433eda009..623d58f1bc 100644 --- a/Gems/Terrain/Code/Source/EditorComponents/EditorTerrainHeightGradientListComponent.h +++ b/Gems/Terrain/Code/Source/EditorComponents/EditorTerrainHeightGradientListComponent.h @@ -27,6 +27,6 @@ namespace Terrain static constexpr const char* const s_componentDescription = "Provides height data for a region to the terrain system"; static constexpr const char* const s_icon = "Editor/Icons/Components/TerrainHeight.svg"; static constexpr const char* const s_viewportIcon = "Editor/Icons/Components/Viewport/TerrainHeight.svg"; - static constexpr const char* const s_helpUrl = ""; + static constexpr const char* const s_helpUrl = "https://o3de.org/docs/user-guide/components/reference/terrain/height_gradient_list/"; }; } diff --git a/Gems/Terrain/Code/Source/EditorComponents/EditorTerrainLayerSpawnerComponent.h b/Gems/Terrain/Code/Source/EditorComponents/EditorTerrainLayerSpawnerComponent.h index 1eb3413d52..4018e0d377 100644 --- a/Gems/Terrain/Code/Source/EditorComponents/EditorTerrainLayerSpawnerComponent.h +++ b/Gems/Terrain/Code/Source/EditorComponents/EditorTerrainLayerSpawnerComponent.h @@ -27,6 +27,6 @@ namespace Terrain static constexpr const char* const s_componentDescription = "Defines a terrain region for use by the terrain system"; static constexpr const char* const s_icon = "Editor/Icons/Components/TerrainLayerSpawner.svg"; static constexpr const char* const s_viewportIcon = "Editor/Icons/Components/Viewport/TerrainLayerSpawner.svg"; - static constexpr const char* const s_helpUrl = ""; + static constexpr const char* const s_helpUrl = "https://o3de.org/docs/user-guide/components/reference/terrain/layer_spawner/"; }; } diff --git a/Gems/Terrain/Code/Source/EditorComponents/EditorTerrainPhysicsColliderComponent.h b/Gems/Terrain/Code/Source/EditorComponents/EditorTerrainPhysicsColliderComponent.h index d2254161a0..924426c262 100644 --- a/Gems/Terrain/Code/Source/EditorComponents/EditorTerrainPhysicsColliderComponent.h +++ b/Gems/Terrain/Code/Source/EditorComponents/EditorTerrainPhysicsColliderComponent.h @@ -25,8 +25,8 @@ namespace Terrain static constexpr auto s_categoryName = "Terrain"; static constexpr auto s_componentName = "Terrain Physics Heightfield Collider"; static constexpr auto s_componentDescription = "Provides terrain data to a physics collider in the form of a heightfield and surface->material mapping."; - static constexpr auto s_icon = "Editor/Icons/Components/TerrainLayerSpawner.svg"; - static constexpr auto s_viewportIcon = "Editor/Icons/Components/Viewport/TerrainLayerSpawner.svg"; + static constexpr auto s_icon = "Editor/Icons/Components/TerrainPhysicsCollider.svg"; + static constexpr auto s_viewportIcon = "Editor/Icons/Components/Viewport/TerrainPhysicsCollider.svg"; static constexpr auto s_helpUrl = ""; }; } diff --git a/Gems/Terrain/Code/Source/EditorComponents/EditorTerrainSurfaceGradientListComponent.h b/Gems/Terrain/Code/Source/EditorComponents/EditorTerrainSurfaceGradientListComponent.h index e2c5f1b280..58cb776823 100644 --- a/Gems/Terrain/Code/Source/EditorComponents/EditorTerrainSurfaceGradientListComponent.h +++ b/Gems/Terrain/Code/Source/EditorComponents/EditorTerrainSurfaceGradientListComponent.h @@ -25,8 +25,8 @@ namespace Terrain static constexpr const char* const s_categoryName = "Terrain"; static constexpr const char* const s_componentName = "Terrain Surface Gradient List"; static constexpr const char* const s_componentDescription = "Provides a mapping between gradients and surface tags for use by the terrain system."; - static constexpr const char* const s_icon = "Editor/Icons/Components/TerrainLayerSpawner.svg"; - static constexpr const char* const s_viewportIcon = "Editor/Icons/Components/Viewport/TerrainLayerSpawner.svg"; - static constexpr const char* const s_helpUrl = ""; + static constexpr const char* const s_icon = "Editor/Icons/Components/TerrainSurfaceGradientList.svg"; + static constexpr const char* const s_viewportIcon = "Editor/Icons/Components/Viewport/TerrainSurfaceGradientList.svg"; + static constexpr const char* const s_helpUrl = "https://o3de.org/docs/user-guide/components/reference/terrain/surface-gradient-list/"; }; } diff --git a/Gems/Terrain/Code/Source/TerrainRenderer/Aabb2i.cpp b/Gems/Terrain/Code/Source/TerrainRenderer/Aabb2i.cpp new file mode 100644 index 0000000000..c38651f296 --- /dev/null +++ b/Gems/Terrain/Code/Source/TerrainRenderer/Aabb2i.cpp @@ -0,0 +1,44 @@ +/* + * Copyright (c) Contributors to the Open 3D Engine Project. + * For complete copyright and license terms please see the LICENSE at the root of this distribution. + * + * SPDX-License-Identifier: Apache-2.0 OR MIT + * + */ + +#include +#include + +namespace Terrain +{ + Aabb2i::Aabb2i(const Vector2i& min, const Vector2i& max) + : m_min(min) + , m_max(max) + {} + + Aabb2i Aabb2i::operator+(const Vector2i& rhs) const + { + return { m_min + rhs, m_max + rhs }; + } + + Aabb2i Aabb2i::operator-(const Vector2i& rhs) const + { + return *this + -rhs; + } + + Aabb2i Aabb2i::GetClamped(Aabb2i rhs) const + { + Aabb2i ret; + ret.m_min.m_x = AZ::GetMax(m_min.m_x, rhs.m_min.m_x); + ret.m_min.m_y = AZ::GetMax(m_min.m_y, rhs.m_min.m_y); + ret.m_max.m_x = AZ::GetMin(m_max.m_x, rhs.m_max.m_x); + ret.m_max.m_y = AZ::GetMin(m_max.m_y, rhs.m_max.m_y); + return ret; + } + + bool Aabb2i::IsValid() const + { + // Intentionally strict, equal min/max not valid. + return m_min.m_x < m_max.m_x && m_min.m_y < m_max.m_y; + } +} diff --git a/Gems/Terrain/Code/Source/TerrainRenderer/Aabb2i.h b/Gems/Terrain/Code/Source/TerrainRenderer/Aabb2i.h new file mode 100644 index 0000000000..88f735564d --- /dev/null +++ b/Gems/Terrain/Code/Source/TerrainRenderer/Aabb2i.h @@ -0,0 +1,34 @@ +/* + * Copyright (c) Contributors to the Open 3D Engine Project. + * For complete copyright and license terms please see the LICENSE at the root of this distribution. + * + * SPDX-License-Identifier: Apache-2.0 OR MIT + * + */ + +#pragma once + +#include +#include + +namespace Terrain +{ + class Aabb2i + { + public: + + Aabb2i() = default; + Aabb2i(const Vector2i& min, const Vector2i& max); + + Aabb2i operator+(const Vector2i& offset) const; + Aabb2i operator-(const Vector2i& offset) const; + + Aabb2i GetClamped(Aabb2i rhs) const; + bool IsValid() const; + + + Vector2i m_min{AZStd::numeric_limits::min(), AZStd::numeric_limits::min()}; + Vector2i m_max{AZStd::numeric_limits::max(), AZStd::numeric_limits::max()}; + + }; +} diff --git a/Gems/Terrain/Code/Source/TerrainRenderer/BindlessImageArrayHandler.cpp b/Gems/Terrain/Code/Source/TerrainRenderer/BindlessImageArrayHandler.cpp new file mode 100644 index 0000000000..595877c88b --- /dev/null +++ b/Gems/Terrain/Code/Source/TerrainRenderer/BindlessImageArrayHandler.cpp @@ -0,0 +1,101 @@ +/* + * Copyright (c) Contributors to the Open 3D Engine Project. + * For complete copyright and license terms please see the LICENSE at the root of this distribution. + * + * SPDX-License-Identifier: Apache-2.0 OR MIT + * + */ + +#include +#include +#include + +namespace AZ::Render +{ + namespace + { + [[maybe_unused]] const char* BindlessImageArrayHandlerName = "TerrainFeatureProcessor"; + } + + void BindlessImageArrayHandler::Initialize(AZ::Data::Instance& srg, const AZ::Name& propertyName) + { + if (!m_isInitialized) + { + m_isInitialized = UpdateSrgIndices(srg, propertyName); + } + else + { + AZ_Error(BindlessImageArrayHandlerName, false, "Already initialized."); + } + } + + void BindlessImageArrayHandler::Reset() + { + m_texturesIndex = {}; + m_isInitialized = false; + } + + bool BindlessImageArrayHandler::IsInitialized() const + { + return m_isInitialized; + } + + bool BindlessImageArrayHandler::UpdateSrgIndices(AZ::Data::Instance& srg, const AZ::Name& propertyName) + { + if (srg) + { + m_texturesIndex = srg->GetLayout()->FindShaderInputImageUnboundedArrayIndex(propertyName); + AZ_Error(BindlessImageArrayHandlerName, m_texturesIndex.IsValid(), "Failed to find srg input constant %s.", propertyName.GetCStr()); + } + else + { + AZ_Error(BindlessImageArrayHandlerName, false, "Cannot initialize using a null shader resource group."); + } + return m_texturesIndex.IsValid(); + } + + uint16_t BindlessImageArrayHandler::AppendBindlessImage(const AZ::RHI::ImageView* imageView) + { + uint16_t imageIndex = 0xFFFF; + + AZStd::unique_lock lock(m_updateMutex); + if (m_bindlessImageViewFreeList.size() > 0) + { + imageIndex = m_bindlessImageViewFreeList.back(); + m_bindlessImageViewFreeList.pop_back(); + m_bindlessImageViews.at(imageIndex) = imageView; + } + else + { + imageIndex = aznumeric_cast(m_bindlessImageViews.size()); + m_bindlessImageViews.push_back(imageView); + } + return imageIndex; + } + + void BindlessImageArrayHandler::UpdateBindlessImage(uint16_t index, const AZ::RHI::ImageView* imageView) + { + AZStd::shared_lock lock(m_updateMutex); + m_bindlessImageViews.at(index) = imageView; + } + + void BindlessImageArrayHandler::RemoveBindlessImage(uint16_t index) + { + AZStd::unique_lock lock(m_updateMutex); + m_bindlessImageViews.at(index) = AZ::RPI::ImageSystemInterface::Get()->GetSystemImage(AZ::RPI::SystemImage::Magenta)->GetImageView(); + m_bindlessImageViewFreeList.push_back(index); + } + + bool BindlessImageArrayHandler::UpdateSrg(AZ::Data::Instance& srg) const + { + if (!m_isInitialized) + { + AZ_Error("BindlessImageArrayHandler", false, "BindlessImageArrayHandler not initialized") + return false; + } + + AZStd::array_view imageViews(m_bindlessImageViews.data(), m_bindlessImageViews.size()); + return srg->SetImageViewUnboundedArray(m_texturesIndex, imageViews); + } + +} diff --git a/Gems/Terrain/Code/Source/TerrainRenderer/BindlessImageArrayHandler.h b/Gems/Terrain/Code/Source/TerrainRenderer/BindlessImageArrayHandler.h new file mode 100644 index 0000000000..5315e8526d --- /dev/null +++ b/Gems/Terrain/Code/Source/TerrainRenderer/BindlessImageArrayHandler.h @@ -0,0 +1,48 @@ +/* + * Copyright (c) Contributors to the Open 3D Engine Project. + * For complete copyright and license terms please see the LICENSE at the root of this distribution. + * + * SPDX-License-Identifier: Apache-2.0 OR MIT + * + */ + +#pragma once + +#include + +#include +#include +#include + +namespace AZ::Render +{ + class BindlessImageArrayHandler + { + public: + + static constexpr uint16_t InvalidImageIndex = 0xFFFF; + + BindlessImageArrayHandler() = default; + ~BindlessImageArrayHandler() = default; + + void Initialize(AZ::Data::Instance& srg, const AZ::Name& propertyName); + void Reset(); + bool IsInitialized() const; + bool UpdateSrgIndices(AZ::Data::Instance& srg, const AZ::Name& propertyName); + + uint16_t AppendBindlessImage(const RHI::ImageView* imageView); + void UpdateBindlessImage(uint16_t index, const RHI::ImageView* imageView); + void RemoveBindlessImage(uint16_t index); + + bool UpdateSrg(AZ::Data::Instance& srg) const; + + private: + + AZStd::vector m_bindlessImageViews; + AZStd::vector m_bindlessImageViewFreeList; + RHI::ShaderInputImageUnboundedArrayIndex m_texturesIndex; + AZStd::shared_mutex m_updateMutex; + bool m_isInitialized{ false }; + }; +} + diff --git a/Gems/Terrain/Code/Source/TerrainRenderer/Components/TerrainMacroMaterialComponent.cpp b/Gems/Terrain/Code/Source/TerrainRenderer/Components/TerrainMacroMaterialComponent.cpp index a65cbad50b..304d5aecd4 100644 --- a/Gems/Terrain/Code/Source/TerrainRenderer/Components/TerrainMacroMaterialComponent.cpp +++ b/Gems/Terrain/Code/Source/TerrainRenderer/Components/TerrainMacroMaterialComponent.cpp @@ -93,7 +93,8 @@ namespace Terrain void TerrainMacroMaterialComponent::Reflect(AZ::ReflectContext* context) { TerrainMacroMaterialConfig::Reflect(context); - + TerrainMacroMaterialRequests::Reflect(context); + AZ::SerializeContext* serialize = azrtti_cast(context); if (serialize) { diff --git a/Gems/Terrain/Code/Source/TerrainRenderer/Components/TerrainSurfaceMaterialsListComponent.cpp b/Gems/Terrain/Code/Source/TerrainRenderer/Components/TerrainSurfaceMaterialsListComponent.cpp index 3c6a213b02..5f2a50f903 100644 --- a/Gems/Terrain/Code/Source/TerrainRenderer/Components/TerrainSurfaceMaterialsListComponent.cpp +++ b/Gems/Terrain/Code/Source/TerrainRenderer/Components/TerrainSurfaceMaterialsListComponent.cpp @@ -74,7 +74,7 @@ namespace Terrain ->DataElement( AZ::Edit::UIHandlers::Default, &TerrainSurfaceMaterialsListConfig::m_surfaceMaterials, - "Gradient to Material Mappings", "Maps surfaces to materials."); + "Material Mappings", "Maps surfaces to materials."); } } } @@ -134,12 +134,12 @@ namespace Terrain void TerrainSurfaceMaterialsListComponent::Deactivate() { TerrainAreaMaterialRequestBus::Handler::BusDisconnect(); - AZ::Data::AssetBus::MultiHandler::BusDisconnect(); for (auto& surfaceMaterialMapping : m_configuration.m_surfaceMaterials) { if (surfaceMaterialMapping.m_materialAsset.GetId().IsValid()) { + AZ::Data::AssetBus::MultiHandler::BusDisconnect(surfaceMaterialMapping.m_materialAsset.GetId()); surfaceMaterialMapping.m_materialAsset.Release(); surfaceMaterialMapping.m_materialInstance.reset(); surfaceMaterialMapping.m_activeMaterialAssetId = AZ::Data::AssetId(); @@ -241,7 +241,7 @@ namespace Terrain // All materials have been deactivated, stop listening for requests and notifications. m_cachedAabb = AZ::Aabb::CreateNull(); LmbrCentral::ShapeComponentNotificationsBus::Handler::BusDisconnect(); - TerrainAreaMaterialRequestBus::Handler::BusConnect(GetEntityId()); + TerrainAreaMaterialRequestBus::Handler::BusDisconnect(); } } diff --git a/Gems/Terrain/Code/Source/TerrainRenderer/EditorComponents/EditorTerrainMacroMaterialComponent.h b/Gems/Terrain/Code/Source/TerrainRenderer/EditorComponents/EditorTerrainMacroMaterialComponent.h index a2fddf5768..67897b7dec 100644 --- a/Gems/Terrain/Code/Source/TerrainRenderer/EditorComponents/EditorTerrainMacroMaterialComponent.h +++ b/Gems/Terrain/Code/Source/TerrainRenderer/EditorComponents/EditorTerrainMacroMaterialComponent.h @@ -25,8 +25,8 @@ namespace Terrain static constexpr const char* const s_categoryName = "Terrain"; static constexpr const char* const s_componentName = "Terrain Macro Material"; static constexpr const char* const s_componentDescription = "Provides a macro material for a region to the terrain renderer"; - static constexpr const char* const s_icon = "Editor/Icons/Components/TerrainLayerRenderer.svg"; - static constexpr const char* const s_viewportIcon = "Editor/Icons/Components/Viewport/TerrainLayerRenderer.svg"; + static constexpr const char* const s_icon = "Editor/Icons/Components/TerrainMacroMaterial.svg"; + static constexpr const char* const s_viewportIcon = "Editor/Icons/Components/Viewport/TerrainMacroMaterial.svg"; static constexpr const char* const s_helpUrl = ""; }; } diff --git a/Gems/Terrain/Code/Source/TerrainRenderer/EditorComponents/EditorTerrainSurfaceMaterialsListComponent.h b/Gems/Terrain/Code/Source/TerrainRenderer/EditorComponents/EditorTerrainSurfaceMaterialsListComponent.h index f0d03a6082..973e85a6d2 100644 --- a/Gems/Terrain/Code/Source/TerrainRenderer/EditorComponents/EditorTerrainSurfaceMaterialsListComponent.h +++ b/Gems/Terrain/Code/Source/TerrainRenderer/EditorComponents/EditorTerrainSurfaceMaterialsListComponent.h @@ -25,8 +25,8 @@ namespace Terrain static constexpr const char* const s_categoryName = "Terrain"; static constexpr const char* const s_componentName = "Terrain Surface Materials List"; static constexpr const char* const s_componentDescription = "Provides a mapping between surface tags and render materials."; - static constexpr const char* const s_icon = "Editor/Icons/Components/TerrainHeight.svg"; - static constexpr const char* const s_viewportIcon = "Editor/Icons/Components/Viewport/TerrainHeight.svg"; - static constexpr const char* const s_helpUrl = ""; + static constexpr const char* const s_icon = "Editor/Icons/Components/TerrainSurfaceMaterials.svg"; + static constexpr const char* const s_viewportIcon = "Editor/Icons/Components/Viewport/TerrainSurfaceMaterials.svg"; + static constexpr const char* const s_helpUrl = "https://o3de.org/docs/user-guide/components/reference/terrain/surface-material-list/"; }; } diff --git a/Gems/Terrain/Code/Source/TerrainRenderer/TerrainDetailMaterialManager.cpp b/Gems/Terrain/Code/Source/TerrainRenderer/TerrainDetailMaterialManager.cpp new file mode 100644 index 0000000000..2bc9e42bff --- /dev/null +++ b/Gems/Terrain/Code/Source/TerrainRenderer/TerrainDetailMaterialManager.cpp @@ -0,0 +1,912 @@ +/* + * Copyright (c) Contributors to the Open 3D Engine Project. + * For complete copyright and license terms please see the LICENSE at the root of this distribution. + * + * SPDX-License-Identifier: Apache-2.0 OR MIT + * + */ + +#include +#include + +#include + +#include +#include +#include + +#include + +namespace Terrain +{ + namespace + { + [[maybe_unused]] static const char* TerrainDetailMaterialManagerName = "TerrainDetailMaterialManager"; + static const char* TerrainDetailChars = "TerrainDetail"; + } + + namespace DetailMaterialInputs + { + static const char* const BaseColorColor("baseColor.color"); + static const char* const BaseColorMap("baseColor.textureMap"); + static const char* const BaseColorUseTexture("baseColor.useTexture"); + static const char* const BaseColorFactor("baseColor.factor"); + static const char* const BaseColorBlendMode("baseColor.textureBlendMode"); + static const char* const MetallicMap("metallic.textureMap"); + static const char* const MetallicUseTexture("metallic.useTexture"); + static const char* const MetallicFactor("metallic.factor"); + static const char* const RoughnessMap("roughness.textureMap"); + static const char* const RoughnessUseTexture("roughness.useTexture"); + static const char* const RoughnessFactor("roughness.factor"); + static const char* const RoughnessLowerBound("roughness.lowerBound"); + static const char* const RoughnessUpperBound("roughness.upperBound"); + static const char* const SpecularF0Map("specularF0.textureMap"); + static const char* const SpecularF0UseTexture("specularF0.useTexture"); + static const char* const SpecularF0Factor("specularF0.factor"); + static const char* const NormalMap("normal.textureMap"); + static const char* const NormalUseTexture("normal.useTexture"); + static const char* const NormalFactor("normal.factor"); + static const char* const NormalFlipX("normal.flipX"); + static const char* const NormalFlipY("normal.flipY"); + static const char* const DiffuseOcclusionMap("occlusion.diffuseTextureMap"); + static const char* const DiffuseOcclusionUseTexture("occlusion.diffuseUseTexture"); + static const char* const DiffuseOcclusionFactor("occlusion.diffuseFactor"); + static const char* const HeightMap("parallax.textureMap"); + static const char* const HeightUseTexture("parallax.useTexture"); + static const char* const HeightFactor("parallax.factor"); + static const char* const HeightOffset("parallax.offset"); + static const char* const HeightBlendFactor("parallax.blendFactor"); + } + + namespace TerrainSrgInputs + { + static const char* const DetailMaterialIdImage("m_detailMaterialIdImage"); + static const char* const DetailMaterialData("m_detailMaterialData"); + static const char* const DetailMaterialIdImageCenter("m_detailMaterialIdImageCenter"); + static const char* const DetailHalfPixelUv("m_detailHalfPixelUv"); + static const char* const DetailAabb("m_detailAabb"); + } + + AZ_CVAR(bool, + r_terrainDebugDetailMaterials, + false, + [](const bool& value) + { + AZ::RPI::ShaderSystemInterface::Get()->SetGlobalShaderOption(AZ::Name{ "o_debugDetailMaterialIds" }, AZ::RPI::ShaderOptionValue{ value }); + }, + AZ::ConsoleFunctorFlags::Null, + "Turns on debugging for detail material ids for terrain." + ); + + AZ_CVAR(bool, + r_terrainDebugDetailImageUpdates, + false, + nullptr, + AZ::ConsoleFunctorFlags::Null, + "Turns on debugging for detail material update regions for terrain." + ); + + void TerrainDetailMaterialManager::Initialize( + const AZStd::shared_ptr& bindlessImageHandler, + AZ::Data::Instance& terrainSrg) + { + AZ_Error(TerrainDetailMaterialManagerName, bindlessImageHandler, "bindlessImageHandler must not be null."); + AZ_Error(TerrainDetailMaterialManagerName, terrainSrg, "terrainSrg must not be null."); + AZ_Error(TerrainDetailMaterialManagerName, !m_isInitialized, "Already initialized."); + + if (!bindlessImageHandler || !terrainSrg || m_isInitialized) + { + return; + } + + if (UpdateSrgIndices(terrainSrg)) + { + m_bindlessImageHandler = bindlessImageHandler; + + // Find any detail material areas that have already been created. + TerrainAreaMaterialRequestBus::EnumerateHandlers( + [&](TerrainAreaMaterialRequests* handler) + { + const AZ::Aabb& bounds = handler->GetTerrainSurfaceMaterialRegion(); + const AZStd::vector materialMappings = handler->GetSurfaceMaterialMappings(); + AZ::EntityId entityId = *(Terrain::TerrainAreaMaterialRequestBus::GetCurrentBusId()); + + DetailMaterialListRegion& materialRegion = FindOrCreateByEntityId(entityId, m_detailMaterialRegions); + materialRegion.m_region = bounds; + + for (const auto& materialMapping : materialMappings) + { + if (materialMapping.m_materialInstance) + { + OnTerrainSurfaceMaterialMappingCreated(entityId, materialMapping.m_surfaceTag, materialMapping.m_materialInstance); + } + } + return true; + } + ); + TerrainAreaMaterialNotificationBus::Handler::BusConnect(); + + AZ::Aabb worldBounds = AZ::Aabb::CreateNull(); + AzFramework::Terrain::TerrainDataRequestBus::BroadcastResult( + worldBounds, &AzFramework::Terrain::TerrainDataRequests::GetTerrainAabb); + + OnTerrainDataChanged(worldBounds, TerrainDataChangedMask::SurfaceData); + AzFramework::Terrain::TerrainDataNotificationBus::Handler::BusConnect(); + + m_isInitialized = true; + } + } + + bool TerrainDetailMaterialManager::UpdateSrgIndices(AZ::Data::Instance& terrainSrg) + { + const AZ::RHI::ShaderResourceGroupLayout* terrainSrgLayout = terrainSrg->GetLayout(); + + m_detailMaterialIdPropertyIndex = terrainSrgLayout->FindShaderInputImageIndex(AZ::Name(TerrainSrgInputs::DetailMaterialIdImage)); + AZ_Error(TerrainDetailMaterialManagerName, m_detailMaterialIdPropertyIndex.IsValid(), "Failed to find terrain srg input constant %s.", TerrainSrgInputs::DetailMaterialIdImage); + + m_detailCenterPropertyIndex = terrainSrgLayout->FindShaderInputConstantIndex(AZ::Name(TerrainSrgInputs::DetailMaterialIdImageCenter)); + AZ_Error(TerrainDetailMaterialManagerName, m_detailCenterPropertyIndex.IsValid(), "Failed to find terrain srg input constant %s.", TerrainSrgInputs::DetailMaterialIdImageCenter); + + m_detailHalfPixelUvPropertyIndex = terrainSrgLayout->FindShaderInputConstantIndex(AZ::Name(TerrainSrgInputs::DetailHalfPixelUv)); + AZ_Error(TerrainDetailMaterialManagerName, m_detailHalfPixelUvPropertyIndex.IsValid(), "Failed to find terrain srg input constant %s.", TerrainSrgInputs::DetailHalfPixelUv); + + m_detailAabbPropertyIndex = terrainSrgLayout->FindShaderInputConstantIndex(AZ::Name(TerrainSrgInputs::DetailAabb)); + AZ_Error(TerrainDetailMaterialManagerName, m_detailAabbPropertyIndex.IsValid(), "Failed to find terrain srg input constant %s.", TerrainSrgInputs::DetailAabb); + + // Set up the gpu buffer for detail material data + AZ::Render::GpuBufferHandler::Descriptor desc; + desc.m_bufferName = "Detail Material Data"; + desc.m_bufferSrgName = TerrainSrgInputs::DetailMaterialData; + desc.m_elementSize = sizeof(DetailMaterialShaderData); + desc.m_srgLayout = terrainSrgLayout; + m_detailMaterialDataBuffer = AZ::Render::GpuBufferHandler(desc); + + bool IndicesValid = + m_detailMaterialIdPropertyIndex.IsValid() && + m_detailCenterPropertyIndex.IsValid() && + m_detailHalfPixelUvPropertyIndex.IsValid() && + m_detailAabbPropertyIndex.IsValid(); + + m_detailImageNeedsUpdate = true; + m_detailMaterialBufferNeedsUpdate = true; + + return IndicesValid && m_detailMaterialDataBuffer.IsValid(); + } + + void TerrainDetailMaterialManager::RemoveAllImages() + { + for (const DetailMaterialData& materialData: m_detailMaterials.GetDataVector()) + { + DetailMaterialShaderData& shaderData = m_detailMaterialShaderData.GetElement(materialData.m_detailMaterialBufferIndex); + + auto checkRemoveImage = [&](uint16_t index) + { + if (index != 0xFFFF) + { + m_bindlessImageHandler->RemoveBindlessImage(index); + } + }; + + checkRemoveImage(shaderData.m_colorImageIndex); + checkRemoveImage(shaderData.m_normalImageIndex); + checkRemoveImage(shaderData.m_roughnessImageIndex); + checkRemoveImage(shaderData.m_metalnessImageIndex); + checkRemoveImage(shaderData.m_specularF0ImageIndex); + checkRemoveImage(shaderData.m_occlusionImageIndex); + checkRemoveImage(shaderData.m_heightImageIndex); + } + } + + bool TerrainDetailMaterialManager::IsInitialized() const + { + return m_isInitialized; + } + + void TerrainDetailMaterialManager::Reset() + { + RemoveAllImages(); + m_bindlessImageHandler.reset(); + + m_detailTextureImage = {}; + m_detailMaterials.Clear(); + m_detailMaterialRegions.Clear(); + m_detailMaterialShaderData.Clear(); + m_detailMaterialDataBuffer.Release(); + + m_dirtyDetailRegion = AZ::Aabb::CreateNull(); + m_previousCameraPosition = AZ::Vector3(AZStd::numeric_limits::max(), 0.0, 0.0); + m_detailTextureBounds = {}; + m_detailTextureCenter = {}; + + m_detailMaterialBufferNeedsUpdate = false; + m_detailImageNeedsUpdate = false; + + TerrainAreaMaterialNotificationBus::Handler::BusDisconnect(); + AzFramework::Terrain::TerrainDataNotificationBus::Handler::BusDisconnect(); + + m_isInitialized = false; + } + + void TerrainDetailMaterialManager::Update(const AZ::Vector3& cameraPosition, AZ::Data::Instance& terrainSrg) + { + if (m_detailMaterialBufferNeedsUpdate) + { + m_detailMaterialBufferNeedsUpdate = false; + m_detailMaterialDataBuffer.UpdateBuffer(m_detailMaterialShaderData.GetRawData(), aznumeric_cast(m_detailMaterialShaderData.GetSize())); + } + + if (m_dirtyDetailRegion.IsValid() || !cameraPosition.IsClose(m_previousCameraPosition) || m_detailImageNeedsUpdate) + { + if (r_terrainDebugDetailImageUpdates) + { + AZ_Printf("TerrainDetailMaterialManager", "Previous Camera: (%f, %f, %f) New Cameara: (%f, %f, %f)", + m_previousCameraPosition.GetX(), m_previousCameraPosition.GetY(), m_previousCameraPosition.GetZ(), + cameraPosition.GetX(), cameraPosition.GetY(), cameraPosition.GetZ()); + } + int32_t newDetailTexturePosX = aznumeric_cast(AZStd::roundf(cameraPosition.GetX() / DetailTextureScale)); + int32_t newDetailTexturePosY = aznumeric_cast(AZStd::roundf(cameraPosition.GetY() / DetailTextureScale)); + + Aabb2i newBounds; + newBounds.m_min.m_x = newDetailTexturePosX - DetailTextureSizeHalf; + newBounds.m_min.m_y = newDetailTexturePosY - DetailTextureSizeHalf; + newBounds.m_max.m_x = newDetailTexturePosX + DetailTextureSizeHalf; + newBounds.m_max.m_y = newDetailTexturePosY + DetailTextureSizeHalf; + + // Use modulo to find the center point in texture space. Care must be taken so negative values are + // handled appropriately (ie, we want -1 % 1024 to equal 1023, not -1) + Vector2i newCenter; + newCenter.m_x = (DetailTextureSize + (newDetailTexturePosX % DetailTextureSize)) % DetailTextureSize; + newCenter.m_y = (DetailTextureSize + (newDetailTexturePosY % DetailTextureSize)) % DetailTextureSize; + + CheckUpdateDetailTexture(newBounds, newCenter); + + m_detailTextureBounds = newBounds; + m_dirtyDetailRegion = AZ::Aabb::CreateNull(); + + m_previousCameraPosition = cameraPosition; + + AZ::Vector4 detailAabb = AZ::Vector4( + m_detailTextureBounds.m_min.m_x * DetailTextureScale, + m_detailTextureBounds.m_min.m_y * DetailTextureScale, + m_detailTextureBounds.m_max.m_x * DetailTextureScale, + m_detailTextureBounds.m_max.m_y * DetailTextureScale + ); + AZ::Vector2 detailUvOffset = AZ::Vector2(float(newCenter.m_x) / DetailTextureSize, float(newCenter.m_y) / DetailTextureSize); + + terrainSrg->SetConstant(m_detailAabbPropertyIndex, detailAabb); + terrainSrg->SetConstant(m_detailHalfPixelUvPropertyIndex, 0.5f / DetailTextureSize); + terrainSrg->SetConstant(m_detailCenterPropertyIndex, detailUvOffset); + terrainSrg->SetImage(m_detailMaterialIdPropertyIndex, m_detailTextureImage); + + m_detailMaterialDataBuffer.UpdateSrg(terrainSrg.get()); + } + + m_detailImageNeedsUpdate = false; + } + + void TerrainDetailMaterialManager::OnTerrainDataChanged(const AZ::Aabb& dirtyRegion, TerrainDataChangedMask dataChangedMask) + { + if ((dataChangedMask & TerrainDataChangedMask::SurfaceData) != 0) + { + m_dirtyDetailRegion.AddAabb(dirtyRegion); + } + } + + void TerrainDetailMaterialManager::OnTerrainSurfaceMaterialMappingCreated(AZ::EntityId entityId, SurfaceData::SurfaceTag surfaceTag, MaterialInstance material) + { + DetailMaterialListRegion& materialRegion = FindOrCreateByEntityId(entityId, m_detailMaterialRegions); + + // Validate that the surface tag is new + for (DetailMaterialSurface& surface : materialRegion.m_materialsForSurfaces) + { + if (surface.m_surfaceTag == surfaceTag) + { + AZ_Error(TerrainDetailMaterialManagerName, false, "Already have a surface material mapping for this surface tag."); + return; + } + } + + uint16_t detailMaterialId = CreateOrUpdateDetailMaterial(material); + materialRegion.m_materialsForSurfaces.push_back({ surfaceTag, detailMaterialId }); + m_detailMaterials.GetData(detailMaterialId).refCount++; + m_dirtyDetailRegion.AddAabb(materialRegion.m_region); + } + + void TerrainDetailMaterialManager::OnTerrainSurfaceMaterialMappingDestroyed(AZ::EntityId entityId, SurfaceData::SurfaceTag surfaceTag) + { + DetailMaterialListRegion& materialRegion = FindOrCreateByEntityId(entityId, m_detailMaterialRegions); + + for (DetailMaterialSurface& surface : materialRegion.m_materialsForSurfaces) + { + if (surface.m_surfaceTag == surfaceTag) + { + CheckDetailMaterialForDeletion(surface.m_detailMaterialId); + + if (surface.m_surfaceTag != materialRegion.m_materialsForSurfaces.back().m_surfaceTag) + { + AZStd::swap(surface, materialRegion.m_materialsForSurfaces.back()); + } + materialRegion.m_materialsForSurfaces.pop_back(); + m_dirtyDetailRegion.AddAabb(materialRegion.m_region); + return; + } + } + AZ_Error(TerrainDetailMaterialManagerName, false, "Could not find surface tag to destroy for OnTerrainSurfaceMaterialMappingDestroyed()."); + } + + void TerrainDetailMaterialManager::OnTerrainSurfaceMaterialMappingChanged(AZ::EntityId entityId, SurfaceData::SurfaceTag surfaceTag, MaterialInstance material) + { + DetailMaterialListRegion& materialRegion = FindOrCreateByEntityId(entityId, m_detailMaterialRegions); + + bool found = false; + uint16_t materialId = CreateOrUpdateDetailMaterial(material); + for (DetailMaterialSurface& surface : materialRegion.m_materialsForSurfaces) + { + if (surface.m_surfaceTag == surfaceTag) + { + found = true; + if (surface.m_detailMaterialId != materialId) + { + ++m_detailMaterials.GetData(materialId).refCount; + CheckDetailMaterialForDeletion(surface.m_detailMaterialId); + surface.m_detailMaterialId = materialId; + } + break; + } + } + + if (!found) + { + ++m_detailMaterials.GetData(materialId).refCount; + materialRegion.m_materialsForSurfaces.push_back({ surfaceTag, materialId }); + } + m_dirtyDetailRegion.AddAabb(materialRegion.m_region); + } + + void TerrainDetailMaterialManager::OnTerrainSurfaceMaterialMappingRegionChanged(AZ::EntityId entityId, const AZ::Aabb& oldRegion, const AZ::Aabb& newRegion) + { + DetailMaterialListRegion& materialRegion = FindOrCreateByEntityId(entityId, m_detailMaterialRegions); + materialRegion.m_region = newRegion; + m_dirtyDetailRegion.AddAabb(oldRegion); + m_dirtyDetailRegion.AddAabb(newRegion); + } + + void TerrainDetailMaterialManager::CheckDetailMaterialForDeletion(uint16_t detailMaterialId) + { + auto& detailMaterialData = m_detailMaterials.GetData(detailMaterialId); + if (--detailMaterialData.refCount == 0) + { + uint16_t bufferIndex = detailMaterialData.m_detailMaterialBufferIndex; + DetailMaterialShaderData& shaderData = m_detailMaterialShaderData.GetElement(bufferIndex); + + for (uint16_t imageIndex : + { + shaderData.m_colorImageIndex, + shaderData.m_normalImageIndex, + shaderData.m_roughnessImageIndex, + shaderData.m_metalnessImageIndex, + shaderData.m_specularF0ImageIndex, + shaderData.m_occlusionImageIndex, + shaderData.m_heightImageIndex + }) + { + if (imageIndex != InvalidImageIndex) + { + m_bindlessImageHandler->RemoveBindlessImage(imageIndex); + } + } + + m_detailMaterialShaderData.Release(bufferIndex); + m_detailMaterials.RemoveIndex(detailMaterialId); + + m_detailMaterialBufferNeedsUpdate = true; + } + } + + uint16_t TerrainDetailMaterialManager::CreateOrUpdateDetailMaterial(MaterialInstance material) + { + static constexpr uint16_t InvalidDetailMaterial = 0xFFFF; + uint16_t detailMaterialId = InvalidDetailMaterial; + + for (auto& detailMaterialData : m_detailMaterials.GetDataVector()) + { + if (detailMaterialData.m_assetId == material->GetAssetId()) + { + detailMaterialId = m_detailMaterials.GetIndexForData(&detailMaterialData); + UpdateDetailMaterialData(detailMaterialId, material); + break; + } + } + + AZ_Assert(m_detailMaterialShaderData.GetSize() < 0xFF, "Only 255 detail materials supported."); + + if (detailMaterialId == InvalidDetailMaterial && m_detailMaterialShaderData.GetSize() < 0xFF) + { + detailMaterialId = m_detailMaterials.GetFreeSlotIndex(); + auto& detailMaterialData = m_detailMaterials.GetData(detailMaterialId); + detailMaterialData.m_detailMaterialBufferIndex = aznumeric_cast(m_detailMaterialShaderData.Reserve()); + UpdateDetailMaterialData(detailMaterialId, material); + } + return detailMaterialId; + } + + void TerrainDetailMaterialManager::UpdateDetailMaterialData(uint16_t detailMaterialIndex, MaterialInstance material) + { + DetailMaterialData& materialData = m_detailMaterials.GetData(detailMaterialIndex); + DetailMaterialShaderData& shaderData = m_detailMaterialShaderData.GetElement(materialData.m_detailMaterialBufferIndex); + + if (materialData.m_materialChangeId == material->GetCurrentChangeId()) + { + return; // material hasn't changed, nothing to do + } + + materialData.m_materialChangeId = material->GetCurrentChangeId(); + materialData.m_assetId = material->GetAssetId(); + + DetailTextureFlags& flags = shaderData.m_flags; + + auto getIndex = [&](const char* const indexName) -> AZ::RPI::MaterialPropertyIndex + { + const AZ::RPI::MaterialPropertyIndex index = material->FindPropertyIndex(AZ::Name(indexName)); + AZ_Warning(TerrainDetailMaterialManagerName, index.IsValid(), "Failed to find shader input constant %s.", indexName); + return index; + }; + + auto applyProperty = [&](const char* const indexName, auto& ref) -> void + { + const auto index = getIndex(indexName); + if (index.IsValid()) + { + // GetValue() expects the actaul type, not a reference type, so the reference needs to be removed. + using TypeRefRemoved = AZStd::remove_cvref_t; + ref = material->GetPropertyValue(index).GetValue(); + } + }; + + auto applyImage = [&](const char* const indexName, AZ::Data::Instance& ref, const char* const usingFlagName, DetailTextureFlags flagToSet, uint16_t& imageIndex) -> void + { + // Determine if an image exists and if its using flag allows it to be used. + const auto index = getIndex(indexName); + const auto useTextureIndex = getIndex(usingFlagName); + bool useTextureValue = true; + if (useTextureIndex.IsValid()) + { + useTextureValue = material->GetPropertyValue(useTextureIndex).GetValue(); + } + if (index.IsValid() && useTextureValue) + { + ref = material->GetPropertyValue(index).GetValue>(); + } + useTextureValue = useTextureValue && ref; + flags = DetailTextureFlags(useTextureValue ? (flags | flagToSet) : (flags & ~flagToSet)); + + // Update queues to add/remove textures depending on if the image is used + if (ref) + { + if (imageIndex == InvalidImageIndex) + { + imageIndex = m_bindlessImageHandler->AppendBindlessImage(ref->GetImageView()); + } + else + { + m_bindlessImageHandler->UpdateBindlessImage(imageIndex, ref->GetImageView()); + } + } + else if (imageIndex != InvalidImageIndex) + { + m_bindlessImageHandler->RemoveBindlessImage(imageIndex); + imageIndex = InvalidImageIndex; + } + }; + + auto applyFlag = [&](const char* const indexName, DetailTextureFlags flagToSet) -> void + { + const auto index = getIndex(indexName); + if (index.IsValid()) + { + bool flagValue = material->GetPropertyValue(index).GetValue(); + flags = DetailTextureFlags(flagValue ? flags | flagToSet : flags); + } + }; + + auto getEnumName = [&](const char* const indexName) -> const AZStd::string_view + { + const auto index = getIndex(indexName); + if (index.IsValid()) + { + uint32_t enumIndex = material->GetPropertyValue(index).GetValue(); + const AZ::Name& enumName = material->GetMaterialPropertiesLayout()->GetPropertyDescriptor(index)->GetEnumName(enumIndex); + return enumName.GetStringView(); + } + return ""; + }; + + using namespace DetailMaterialInputs; + applyImage(BaseColorMap, materialData.m_colorImage, BaseColorUseTexture, DetailTextureFlags::UseTextureBaseColor, shaderData.m_colorImageIndex); + applyProperty(BaseColorFactor, shaderData.m_baseColorFactor); + + const auto index = getIndex(BaseColorColor); + if (index.IsValid()) + { + AZ::Color baseColor = material->GetPropertyValue(index).GetValue(); + shaderData.m_baseColorRed = baseColor.GetR(); + shaderData.m_baseColorGreen = baseColor.GetG(); + shaderData.m_baseColorBlue = baseColor.GetB(); + } + + const AZStd::string_view& blendModeString = getEnumName(BaseColorBlendMode); + if (blendModeString == "Multiply") + { + flags = DetailTextureFlags(flags | DetailTextureFlags::BlendModeMultiply); + } + else if (blendModeString == "LinearLight") + { + flags = DetailTextureFlags(flags | DetailTextureFlags::BlendModeLinearLight); + } + else if (blendModeString == "Lerp") + { + flags = DetailTextureFlags(flags | DetailTextureFlags::BlendModeLerp); + } + else if (blendModeString == "Overlay") + { + flags = DetailTextureFlags(flags | DetailTextureFlags::BlendModeOverlay); + } + + applyImage(MetallicMap, materialData.m_metalnessImage, MetallicUseTexture, DetailTextureFlags::UseTextureMetallic, shaderData.m_metalnessImageIndex); + applyProperty(MetallicFactor, shaderData.m_metalFactor); + + applyImage(RoughnessMap, materialData.m_roughnessImage, RoughnessUseTexture, DetailTextureFlags::UseTextureRoughness, shaderData.m_roughnessImageIndex); + + if ((flags & DetailTextureFlags::UseTextureRoughness) > 0) + { + float lowerBound = 0.0; + float upperBound = 1.0; + applyProperty(RoughnessLowerBound, lowerBound); + applyProperty(RoughnessUpperBound, upperBound); + shaderData.m_roughnessBias = lowerBound; + shaderData.m_roughnessScale = upperBound - lowerBound; + } + else + { + shaderData.m_roughnessBias = 0.0; + applyProperty(RoughnessFactor, shaderData.m_roughnessScale); + } + + applyImage(SpecularF0Map, materialData.m_specularF0Image, SpecularF0UseTexture, DetailTextureFlags::UseTextureSpecularF0, shaderData.m_specularF0ImageIndex); + applyProperty(SpecularF0Factor, shaderData.m_specularF0Factor); + + applyImage(NormalMap, materialData.m_normalImage, NormalUseTexture, DetailTextureFlags::UseTextureNormal, shaderData.m_normalImageIndex); + applyProperty(NormalFactor, shaderData.m_normalFactor); + applyFlag(NormalFlipX, DetailTextureFlags::FlipNormalX); + applyFlag(NormalFlipY, DetailTextureFlags::FlipNormalY); + + applyImage(DiffuseOcclusionMap, materialData.m_occlusionImage, DiffuseOcclusionUseTexture, DetailTextureFlags::UseTextureOcclusion, shaderData.m_occlusionImageIndex); + applyProperty(DiffuseOcclusionFactor, shaderData.m_occlusionFactor); + + applyImage(HeightMap, materialData.m_heightImage, HeightUseTexture, DetailTextureFlags::UseTextureHeight, shaderData.m_heightImageIndex); + applyProperty(HeightFactor, shaderData.m_heightFactor); + applyProperty(HeightOffset, shaderData.m_heightOffset); + applyProperty(HeightBlendFactor, shaderData.m_heightBlendFactor); + + m_detailMaterialBufferNeedsUpdate = true; + } + + void TerrainDetailMaterialManager::CheckUpdateDetailTexture(const Aabb2i& newBounds, const Vector2i& newCenter) + { + if (r_terrainDebugDetailImageUpdates) + { + AZ_Printf("TerrainDetailMaterialManager", "Old Bounds: m(%i, %i)M(%i, %i) New Bounds: m(%i, %i)M(%i, %i)", + m_detailTextureBounds.m_min.m_x, m_detailTextureBounds.m_min.m_y, m_detailTextureBounds.m_max.m_x, m_detailTextureBounds.m_max.m_y, + newBounds.m_min.m_x, newBounds.m_min.m_y, newBounds.m_max.m_x, newBounds.m_max.m_y + ); + } + if (!m_detailTextureImage) + { + // If the m_detailTextureImage doesn't exist, create it and populate the entire texture + + const AZ::Data::Instance imagePool = AZ::RPI::ImageSystemInterface::Get()->GetSystemAttachmentPool(); + AZ::RHI::ImageDescriptor imageDescriptor = AZ::RHI::ImageDescriptor::Create2D( + AZ::RHI::ImageBindFlags::ShaderRead, DetailTextureSize, DetailTextureSize, AZ::RHI::Format::R8G8B8A8_UINT + ); + const AZ::Name TerrainDetailName = AZ::Name(TerrainDetailChars); + m_detailTextureImage = AZ::RPI::AttachmentImage::Create(*imagePool.get(), imageDescriptor, TerrainDetailName, nullptr, nullptr); + AZ_Error(TerrainDetailMaterialManagerName, m_detailTextureImage, "Failed to initialize the detail texture image."); + + UpdateDetailTexture(newBounds, newBounds, newCenter); + } + else + { + // If the new bounds of the detail texture are different than the old bounds, then the edges of the texture need to be updated. + + int32_t offsetX = m_detailTextureBounds.m_min.m_x - newBounds.m_min.m_x; + + // Horizontal edge update + if (newBounds.m_min.m_x != m_detailTextureBounds.m_min.m_x) + { + Aabb2i updateBounds; + if (newBounds.m_min.m_x < m_detailTextureBounds.m_min.m_x) + { + updateBounds.m_min.m_x = newBounds.m_min.m_x; + updateBounds.m_max.m_x = m_detailTextureBounds.m_min.m_x; + } + else + { + updateBounds.m_min.m_x = m_detailTextureBounds.m_max.m_x; + updateBounds.m_max.m_x = newBounds.m_max.m_x; + } + updateBounds.m_min.m_y = newBounds.m_min.m_y; + updateBounds.m_max.m_y = newBounds.m_max.m_y; + + if (r_terrainDebugDetailImageUpdates) + { + AZ_Printf("TerrainDetailMaterialManager", "Updating horizontal edge: m(%i, %i)M(%i, %i)", + updateBounds.m_min.m_x, updateBounds.m_min.m_y, updateBounds.m_max.m_x, updateBounds.m_max.m_y); + } + UpdateDetailTexture(updateBounds, newBounds, newCenter); + } + + // Vertical edge update + if (newBounds.m_min.m_y != m_detailTextureBounds.m_min.m_y) + { + Aabb2i updateBounds; + // Don't update areas that have already been updated in the horizontal update. + updateBounds.m_min.m_x = newBounds.m_min.m_x + AZ::GetMax(0, offsetX); + updateBounds.m_max.m_x = newBounds.m_max.m_x + AZ::GetMin(0, offsetX); + if (newBounds.m_min.m_y < m_detailTextureBounds.m_min.m_y) + { + updateBounds.m_min.m_y = newBounds.m_min.m_y; + updateBounds.m_max.m_y = m_detailTextureBounds.m_min.m_y; + } + else + { + updateBounds.m_min.m_y = m_detailTextureBounds.m_max.m_y; + updateBounds.m_max.m_y = newBounds.m_max.m_y; + } + + if (r_terrainDebugDetailImageUpdates) + { + AZ_Printf("TerrainDetailMaterialManager", "Updating vertical edge: m(%i, %i)M(%i, %i)", + updateBounds.m_min.m_x, updateBounds.m_min.m_y, updateBounds.m_max.m_x, updateBounds.m_max.m_y); + } + UpdateDetailTexture(updateBounds, newBounds, newCenter); + } + + if (m_dirtyDetailRegion.IsValid()) + { + if (r_terrainDebugDetailImageUpdates) + { + AZ_Printf("TerrainDetailMaterialManager", "m_dirtyDetailRegion: m(%f, %f)M(%f, %f)", + m_dirtyDetailRegion.GetMin().GetX(), m_dirtyDetailRegion.GetMin().GetY(), m_dirtyDetailRegion.GetMax().GetX(), m_dirtyDetailRegion.GetMax().GetY()); + } + // If any regions are marked as dirty, then they should be updated. + + AZ::Vector3 currentMin = AZ::Vector3(newBounds.m_min.m_x * DetailTextureScale, newBounds.m_min.m_y * DetailTextureScale, -0.5f); + AZ::Vector3 currentMax = AZ::Vector3(newBounds.m_max.m_x * DetailTextureScale, newBounds.m_max.m_y * DetailTextureScale, 0.5f); + AZ::Aabb detailTextureCoverage = AZ::Aabb::CreateFromMinMax(currentMin, currentMax); + AZ::Vector3 previousMin = AZ::Vector3(m_detailTextureBounds.m_min.m_x * DetailTextureScale, m_detailTextureBounds.m_min.m_y * DetailTextureScale, -0.5f); + AZ::Vector3 previousMax = AZ::Vector3(m_detailTextureBounds.m_max.m_x * DetailTextureScale, m_detailTextureBounds.m_max.m_y * DetailTextureScale, 0.5f); + AZ::Aabb previousCoverage = AZ::Aabb::CreateFromMinMax(previousMin, previousMax); + + // Area of texture not already updated by camera movement above. + AZ::Aabb clampedCoverage = previousCoverage.GetClamped(detailTextureCoverage); + + // Clamp the dirty region to the area of the detail texture that is visible and not already updated. + clampedCoverage.Clamp(m_dirtyDetailRegion); + + if (clampedCoverage.IsValid()) + { + Aabb2i updateBounds; + updateBounds.m_min.m_x = aznumeric_cast(AZStd::roundf(clampedCoverage.GetMin().GetX() / DetailTextureScale)); + updateBounds.m_min.m_y = aznumeric_cast(AZStd::roundf(clampedCoverage.GetMin().GetY() / DetailTextureScale)); + updateBounds.m_max.m_x = aznumeric_cast(AZStd::roundf(clampedCoverage.GetMax().GetX() / DetailTextureScale)); + updateBounds.m_max.m_y = aznumeric_cast(AZStd::roundf(clampedCoverage.GetMax().GetY() / DetailTextureScale)); + if (updateBounds.m_min.m_x < updateBounds.m_max.m_x && updateBounds.m_min.m_y < updateBounds.m_max.m_y) + { + + if (r_terrainDebugDetailImageUpdates) + { + AZ_Printf("TerrainDetailMaterialManager", "Updating dirty region: m(%i, %i)M(%i, %i)", + updateBounds.m_min.m_x, updateBounds.m_min.m_y, updateBounds.m_max.m_x, updateBounds.m_max.m_y); + } + UpdateDetailTexture(updateBounds, newBounds, newCenter); + } + } + } + } + } + + void TerrainDetailMaterialManager::UpdateDetailTexture(const Aabb2i& updateArea, const Aabb2i& textureBounds, const Vector2i& centerPixel) + { + if (!m_detailTextureImage) + { + return; + } + + struct DetailMaterialPixel + { + uint8_t m_material1{ 255 }; + uint8_t m_material2{ 255 }; + uint8_t m_blend{ 0 }; // 0 = full weight on material1, 255 = full weight on material2 + uint8_t m_padding{ 0 }; + }; + + // Because the center of the detail texture may be offset, each update area may actually need to be split into + // up to 4 separate update areas in each sector of the quadrant. + AZStd::array textureSpaceAreas; + AZStd::array scaledWorldSpaceAreas; + uint8_t updateAreaCount = CalculateUpdateRegions(updateArea, textureBounds, centerPixel, textureSpaceAreas, scaledWorldSpaceAreas); + + if (updateAreaCount > 0) + { + m_detailImageNeedsUpdate = true; + } + + // Pull the data for each area updated and use it to construct an update for the detail material id texture. + for (uint8_t i = 0; i < updateAreaCount; ++i) + { + const Aabb2i& quadrantTextureArea = textureSpaceAreas[i]; + const Aabb2i& quadrantWorldArea = scaledWorldSpaceAreas[i]; + + AZStd::vector pixels; + pixels.resize((quadrantWorldArea.m_max.m_x - quadrantWorldArea.m_min.m_x) * (quadrantWorldArea.m_max.m_y - quadrantWorldArea.m_min.m_y)); + uint32_t index = 0; + + for (int yPos = quadrantWorldArea.m_min.m_y; yPos < quadrantWorldArea.m_max.m_y; ++yPos) + { + for (int xPos = quadrantWorldArea.m_min.m_x; xPos < quadrantWorldArea.m_max.m_x; ++xPos) + { + AZ::Vector2 position = AZ::Vector2(xPos * DetailTextureScale, yPos * DetailTextureScale); + AzFramework::SurfaceData::SurfaceTagWeightList surfaceWeights; + AzFramework::Terrain::TerrainDataRequestBus::Broadcast(&AzFramework::Terrain::TerrainDataRequests::GetSurfaceWeightsFromVector2, position, surfaceWeights, AzFramework::Terrain::TerrainDataRequests::Sampler::EXACT, nullptr); + + // Store the top two surface weights in the texture with m_blend storing the relative weight. + bool isFirstMaterial = true; + float firstWeight = 0.0f; + for (const auto& surfaceTagWeight : surfaceWeights) + { + if (surfaceTagWeight.m_weight > 0.0f) + { + AZ::Crc32 surfaceType = surfaceTagWeight.m_surfaceType; + uint16_t materialId = GetDetailMaterialForSurfaceTypeAndPosition(surfaceType, position); + if (materialId != m_detailMaterials.NoFreeSlot && materialId < 255) + { + if (isFirstMaterial) + { + pixels.at(index).m_material1 = aznumeric_cast(materialId); + firstWeight = surfaceTagWeight.m_weight; + // m_blend only needs to be calculated is material 2 is found, otherwise the initial value of 0 is correct. + isFirstMaterial = false; + } + else + { + pixels.at(index).m_material2 = aznumeric_cast(materialId); + float totalWeight = firstWeight + surfaceTagWeight.m_weight; + float blendWeight = 1.0f - (firstWeight / totalWeight); + pixels.at(index).m_blend = aznumeric_cast(AZStd::round(blendWeight * 255.0f)); + break; + } + } + } + else + { + break; // since the list is ordered, no other materials are in the list with positive weights. + } + } + ++index; + } + } + + const int32_t left = quadrantTextureArea.m_min.m_x; + const int32_t top = quadrantTextureArea.m_min.m_y; + const int32_t width = quadrantTextureArea.m_max.m_x - quadrantTextureArea.m_min.m_x; + const int32_t height = quadrantTextureArea.m_max.m_y - quadrantTextureArea.m_min.m_y; + + AZ::RHI::ImageUpdateRequest imageUpdateRequest; + imageUpdateRequest.m_imageSubresourcePixelOffset.m_left = aznumeric_cast(left); + imageUpdateRequest.m_imageSubresourcePixelOffset.m_top = aznumeric_cast(top); + imageUpdateRequest.m_sourceSubresourceLayout.m_bytesPerRow = width * sizeof(DetailMaterialPixel); + imageUpdateRequest.m_sourceSubresourceLayout.m_bytesPerImage = width * height * sizeof(DetailMaterialPixel); + imageUpdateRequest.m_sourceSubresourceLayout.m_rowCount = height; + imageUpdateRequest.m_sourceSubresourceLayout.m_size.m_width = width; + imageUpdateRequest.m_sourceSubresourceLayout.m_size.m_height = height; + imageUpdateRequest.m_sourceSubresourceLayout.m_size.m_depth = 1; + imageUpdateRequest.m_sourceData = pixels.data(); + imageUpdateRequest.m_image = m_detailTextureImage->GetRHIImage(); + + m_detailTextureImage->UpdateImageContents(imageUpdateRequest); + } + } + + uint8_t TerrainDetailMaterialManager::CalculateUpdateRegions(const Aabb2i& updateArea, const Aabb2i& textureBounds, const Vector2i& centerPixel, + AZStd::array& textureSpaceAreas, AZStd::array& scaledWorldSpaceAreas) + { + Vector2i centerOffset = { centerPixel.m_x - DetailTextureSizeHalf, centerPixel.m_y - DetailTextureSizeHalf }; + + int32_t quadrantXOffset = centerPixel.m_x < DetailTextureSizeHalf ? DetailTextureSize : -DetailTextureSize; + int32_t quadrantYOffset = centerPixel.m_y < DetailTextureSizeHalf ? DetailTextureSize : -DetailTextureSize; + + uint8_t numQuadrants = 0; + + // For each of the 4 quadrants: + auto calculateQuadrant = [&](Vector2i quadrantOffset) + { + Aabb2i offsetUpdateArea = updateArea + centerOffset + quadrantOffset; + Aabb2i updateSectionBounds = textureBounds.GetClamped(offsetUpdateArea); + if (updateSectionBounds.IsValid()) + { + textureSpaceAreas[numQuadrants] = updateSectionBounds - textureBounds.m_min; + scaledWorldSpaceAreas[numQuadrants] = updateSectionBounds - centerOffset - quadrantOffset; + ++numQuadrants; + } + }; + + calculateQuadrant({ 0, 0 }); + calculateQuadrant({ quadrantXOffset, 0 }); + calculateQuadrant({ 0, quadrantYOffset }); + calculateQuadrant({ quadrantXOffset, quadrantYOffset }); + + return numQuadrants; + } + + uint16_t TerrainDetailMaterialManager::GetDetailMaterialForSurfaceTypeAndPosition(AZ::Crc32 surfaceType, const AZ::Vector2& position) + { + for (const auto& materialRegion : m_detailMaterialRegions.GetDataVector()) + { + if (materialRegion.m_region.Contains(AZ::Vector3(position.GetX(), position.GetY(), 0.0f))) + { + for (const auto& materialSurface : materialRegion.m_materialsForSurfaces) + { + if (materialSurface.m_surfaceTag == surfaceType) + { + return m_detailMaterials.GetData(materialSurface.m_detailMaterialId).m_detailMaterialBufferIndex; + } + } + } + } + return m_detailMaterials.NoFreeSlot; + } + + auto TerrainDetailMaterialManager::FindByEntityId(AZ::EntityId entityId, AZ::Render::IndexedDataVector& container) + -> DetailMaterialListRegion* + { + for (DetailMaterialListRegion& data : container.GetDataVector()) + { + if (data.m_entityId == entityId) + { + return &data; + } + } + return nullptr; + } + + auto TerrainDetailMaterialManager::FindOrCreateByEntityId(AZ::EntityId entityId, AZ::Render::IndexedDataVector& container) + -> DetailMaterialListRegion& + { + DetailMaterialListRegion* dataPtr = FindByEntityId(entityId, container); + if (dataPtr != nullptr) + { + return *dataPtr; + } + + const uint16_t slotId = container.GetFreeSlotIndex(); + AZ_Assert(slotId != AZ::Render::IndexedDataVector::NoFreeSlot, "Ran out of indices"); + + DetailMaterialListRegion& data = container.GetData(slotId); + data.m_entityId = entityId; + return data; + } + + void TerrainDetailMaterialManager::RemoveByEntityId(AZ::EntityId entityId, AZ::Render::IndexedDataVector& container) + { + for (DetailMaterialListRegion& data : container.GetDataVector()) + { + if (data.m_entityId == entityId) + { + container.RemoveData(&data); + return; + } + } + AZ_Assert(false, "Entity Id not found in container.") + } + +} diff --git a/Gems/Terrain/Code/Source/TerrainRenderer/TerrainDetailMaterialManager.h b/Gems/Terrain/Code/Source/TerrainRenderer/TerrainDetailMaterialManager.h new file mode 100644 index 0000000000..98f2c26dd8 --- /dev/null +++ b/Gems/Terrain/Code/Source/TerrainRenderer/TerrainDetailMaterialManager.h @@ -0,0 +1,226 @@ +/* + * Copyright (c) Contributors to the Open 3D Engine Project. + * For complete copyright and license terms please see the LICENSE at the root of this distribution. + * + * SPDX-License-Identifier: Apache-2.0 OR MIT + * + */ + +#pragma once + +#include +#include +#include + +#include + +#include +#include +#include +#include + +#include +#include +#include +#include +#include +#include + +namespace Terrain +{ + class TerrainDetailMaterialManager + : private AzFramework::Terrain::TerrainDataNotificationBus::Handler + , private TerrainAreaMaterialNotificationBus::Handler + { + public: + + AZ_RTTI(TerrainDetailMaterialManager, "{3CBAF88F-E3B1-43B8-97A5-999133188BCC}"); + AZ_DISABLE_COPY_MOVE(TerrainDetailMaterialManager); + + TerrainDetailMaterialManager() = default; + ~TerrainDetailMaterialManager() = default; + + void Initialize( + const AZStd::shared_ptr& bindlessImageHandler, + AZ::Data::Instance& terrainSrg); + bool IsInitialized() const; + void Reset(); + bool UpdateSrgIndices(AZ::Data::Instance& srg); + + void Update(const AZ::Vector3& cameraPosition, AZ::Data::Instance& terrainSrg); + + private: + + using MaterialInstance = AZ::Data::Instance; + static constexpr auto InvalidImageIndex = AZ::Render::BindlessImageArrayHandler::InvalidImageIndex; + + enum DetailTextureFlags : uint32_t + { + UseTextureBaseColor = 0b0000'0000'0000'0000'0000'0000'0000'0001, + UseTextureNormal = 0b0000'0000'0000'0000'0000'0000'0000'0010, + UseTextureMetallic = 0b0000'0000'0000'0000'0000'0000'0000'0100, + UseTextureRoughness = 0b0000'0000'0000'0000'0000'0000'0000'1000, + UseTextureOcclusion = 0b0000'0000'0000'0000'0000'0000'0001'0000, + UseTextureHeight = 0b0000'0000'0000'0000'0000'0000'0010'0000, + UseTextureSpecularF0 = 0b0000'0000'0000'0000'0000'0000'0100'0000, + + FlipNormalX = 0b0000'0000'0000'0001'0000'0000'0000'0000, + FlipNormalY = 0b0000'0000'0000'0010'0000'0000'0000'0000, + + BlendModeMask = 0b0000'0000'0000'1100'0000'0000'0000'0000, + BlendModeLerp = 0b0000'0000'0000'0000'0000'0000'0000'0000, + BlendModeLinearLight = 0b0000'0000'0000'0100'0000'0000'0000'0000, + BlendModeMultiply = 0b0000'0000'0000'1000'0000'0000'0000'0000, + BlendModeOverlay = 0b0000'0000'0000'1100'0000'0000'0000'0000, + }; + + struct DetailMaterialShaderData + { + // Uv + AZStd::array m_uvTransform + { + 1.0, 0.0, 0.0, 0.0, + 0.0, 1.0, 0.0, 0.0, + 0.0, 0.0, 1.0, 0.0, + }; + + float m_baseColorRed{ 1.0f }; + float m_baseColorGreen{ 1.0f }; + float m_baseColorBlue{ 1.0f }; + + // Factor / Scale / Bias for input textures + float m_baseColorFactor{ 1.0f }; + + float m_normalFactor{ 1.0f }; + float m_metalFactor{ 1.0f }; + float m_roughnessScale{ 1.0f }; + float m_roughnessBias{ 0.0f }; + + float m_specularF0Factor{ 1.0f }; + float m_occlusionFactor{ 1.0f }; + float m_heightFactor{ 1.0f }; + float m_heightOffset{ 0.0f }; + + float m_heightBlendFactor{ 0.5f }; + + // Flags + DetailTextureFlags m_flags{ 0 }; + + // Image indices + uint16_t m_colorImageIndex{ InvalidImageIndex }; + uint16_t m_normalImageIndex{ InvalidImageIndex }; + uint16_t m_roughnessImageIndex{ InvalidImageIndex }; + uint16_t m_metalnessImageIndex{ InvalidImageIndex }; + + uint16_t m_specularF0ImageIndex{ InvalidImageIndex }; + uint16_t m_occlusionImageIndex{ InvalidImageIndex }; + uint16_t m_heightImageIndex{ InvalidImageIndex }; + + // 16 byte aligned + uint16_t m_padding1; + uint32_t m_padding2; + uint32_t m_padding3; + }; + static_assert(sizeof(DetailMaterialShaderData) % 16 == 0, "DetailMaterialShaderData must be 16 byte aligned."); + + struct DetailMaterialData + { + AZ::Data::AssetId m_assetId; + AZ::RPI::Material::ChangeId m_materialChangeId{AZ::RPI::Material::DEFAULT_CHANGE_ID}; + uint32_t refCount = 0; + uint16_t m_detailMaterialBufferIndex{ 0xFFFF }; + + AZ::Data::Instance m_colorImage; + AZ::Data::Instance m_normalImage; + AZ::Data::Instance m_roughnessImage; + AZ::Data::Instance m_metalnessImage; + AZ::Data::Instance m_specularF0Image; + AZ::Data::Instance m_occlusionImage; + AZ::Data::Instance m_heightImage; + }; + + struct DetailMaterialSurface + { + AZ::Crc32 m_surfaceTag; + uint16_t m_detailMaterialId; + }; + + struct DetailMaterialListRegion + { + AZ::EntityId m_entityId; + AZ::Aabb m_region{AZ::Aabb::CreateNull()}; + AZStd::vector m_materialsForSurfaces; + }; + + // System-level parameters + static constexpr int32_t DetailTextureSize{ 1024 }; + static constexpr int32_t DetailTextureSizeHalf{ DetailTextureSize / 2 }; + static constexpr float DetailTextureScale{ 0.5f }; + + // AzFramework::Terrain::TerrainDataNotificationBus overrides... + void OnTerrainDataChanged(const AZ::Aabb& dirtyRegion, TerrainDataChangedMask dataChangedMask) override; + + // TerrainAreaMaterialNotificationBus overrides... + void OnTerrainSurfaceMaterialMappingCreated(AZ::EntityId entityId, SurfaceData::SurfaceTag surfaceTag, MaterialInstance material) override; + void OnTerrainSurfaceMaterialMappingDestroyed(AZ::EntityId entityId, SurfaceData::SurfaceTag surfaceTag) override; + void OnTerrainSurfaceMaterialMappingChanged(AZ::EntityId entityId, SurfaceData::SurfaceTag surfaceTag, MaterialInstance material) override; + void OnTerrainSurfaceMaterialMappingRegionChanged(AZ::EntityId entityId, const AZ::Aabb& oldRegion, const AZ::Aabb& newRegion) override; + + //! Removes all images from all detail materials from the bindless image array + void RemoveAllImages(); + + //! Creates or updates an existing detail material with settings from a material instance + uint16_t CreateOrUpdateDetailMaterial(MaterialInstance material); + + //! Decrements the ref count on a detail material and removes it if it reaches 0 + void CheckDetailMaterialForDeletion(uint16_t detailMaterialId); + + //! Updates a specific detail material with settings from a material instance + void UpdateDetailMaterialData(uint16_t detailMaterialIndex, MaterialInstance material); + + //! Checks to see if the detail material id texture needs to update based on new center and bounds. Any + //! required updates are then executed. + void CheckUpdateDetailTexture(const Aabb2i& newBounds, const Vector2i& newCenter); + + //! Updates the detail texture in a given area + void UpdateDetailTexture(const Aabb2i& updateArea, const Aabb2i& textureBounds, const Vector2i& centerPixel); + + //! Finds the detail material Id for a surface type and position + uint16_t GetDetailMaterialForSurfaceTypeAndPosition(AZ::Crc32 surfaceType, const AZ::Vector2& position); + + //! Calculates which regions of the detail material id texture need to be updated based on the update area. Since + //! the "center" of the detail material id texture can move, a single update region in contiguous world space may + //! map to up to 4 different areas on teh detail material id texture. + uint8_t CalculateUpdateRegions(const Aabb2i& updateArea, const Aabb2i& textureBounds, const Vector2i& centerPixel, + AZStd::array& textureSpaceAreas, AZStd::array& scaledWorldSpaceAreas); + + DetailMaterialListRegion* FindByEntityId(AZ::EntityId entityId, AZ::Render::IndexedDataVector& container); + DetailMaterialListRegion& FindOrCreateByEntityId(AZ::EntityId entityId, AZ::Render::IndexedDataVector& container); + void RemoveByEntityId(AZ::EntityId entityId, AZ::Render::IndexedDataVector& container); + + AZStd::shared_ptr m_bindlessImageHandler; + + AZ::Data::Instance m_detailTextureImage; + + AZ::Render::IndexedDataVector m_detailMaterials; + AZ::Render::IndexedDataVector m_detailMaterialRegions; + AZ::Render::SparseVector m_detailMaterialShaderData; + AZ::Render::GpuBufferHandler m_detailMaterialDataBuffer; + + AZ::Aabb m_dirtyDetailRegion{ AZ::Aabb::CreateNull() }; + AZ::Vector3 m_previousCameraPosition = AZ::Vector3(AZStd::numeric_limits::max(), 0.0, 0.0); + Aabb2i m_detailTextureBounds; + Vector2i m_detailTextureCenter; + + AZ::RHI::ShaderInputImageIndex m_detailMaterialIdPropertyIndex; + AZ::RHI::ShaderInputBufferIndex m_detailMaterialDataIndex; + AZ::RHI::ShaderInputConstantIndex m_detailCenterPropertyIndex; + AZ::RHI::ShaderInputConstantIndex m_detailAabbPropertyIndex; + AZ::RHI::ShaderInputConstantIndex m_detailHalfPixelUvPropertyIndex; + + bool m_isInitialized{ false }; + bool m_detailMaterialBufferNeedsUpdate{ false }; + bool m_detailImageNeedsUpdate{ false }; + + }; +} diff --git a/Gems/Terrain/Code/Source/TerrainRenderer/TerrainFeatureProcessor.cpp b/Gems/Terrain/Code/Source/TerrainRenderer/TerrainFeatureProcessor.cpp index 0ed70d949f..351c34308a 100644 --- a/Gems/Terrain/Code/Source/TerrainRenderer/TerrainFeatureProcessor.cpp +++ b/Gems/Terrain/Code/Source/TerrainRenderer/TerrainFeatureProcessor.cpp @@ -7,35 +7,22 @@ */ #include -#include - -#include -#include -#include -#include -#include #include -#include -#include -#include #include #include #include #include -#include -#include #include #include -#include #include +#include +#include +#include #include -#include -#include -#include #include @@ -47,73 +34,19 @@ namespace Terrain { [[maybe_unused]] const char* TerrainFPName = "TerrainFeatureProcessor"; const char* TerrainHeightmapChars = "TerrainHeightmap"; - const char* TerrainDetailChars = "TerrainDetail"; } - namespace MaterialInputs + namespace SceneSrgInputs { - // Terrain material - static const char* const HeightmapImage("settings.heightmapImage"); - static const char* const DetailMaterialIdImage("settings.detailMaterialIdImage"); - static const char* const DetailCenter("settings.detailMaterialIdCenter"); - static const char* const DetailAabb("settings.detailAabb"); - static const char* const DetailHalfPixelUv("settings.detailHalfPixelUv"); + static const char* const HeightmapImage("m_heightmapImage"); + static const char* const TerrainWorldData("m_terrainWorldData"); } - namespace DetailMaterialInputs + namespace TerrainSrgInputs { - static const char* const BaseColorMap("baseColor.textureMap"); - static const char* const BaseColorUseTexture("baseColor.useTexture"); - static const char* const BaseColorFactor("baseColor.factor"); - static const char* const BaseColorBlendMode("baseColor.textureBlendMode"); - static const char* const MetallicMap("metallic.textureMap"); - static const char* const MetallicUseTexture("metallic.useTexture"); - static const char* const MetallicFactor("metallic.factor"); - static const char* const RoughnessMap("roughness.textureMap"); - static const char* const RoughnessUseTexture("roughness.useTexture"); - static const char* const RoughnessFactor("roughness.factor"); - static const char* const RoughnessUpperBound("roughness.lowerBound"); - static const char* const RoughnessLowerBound("roughness.upperBound"); - static const char* const SpecularF0Map("specularF0.textureMap"); - static const char* const SpecularF0UseTexture("specularF0.useTexture"); - static const char* const SpecularF0Factor("specularF0.factor"); - static const char* const NormalMap("normal.textureMap"); - static const char* const NormalUseTexture("normal.useTexture"); - static const char* const NormalFactor("normal.factor"); - static const char* const NormalFlipX("normal.flipX"); - static const char* const NormalFlipY("normal.flipY"); - static const char* const DiffuseOcclusionMap("occlusion.diffuseTextureMap"); - static const char* const DiffuseOcclusionUseTexture("occlusion.diffuseUseTexture"); - static const char* const DiffuseOcclusionFactor("occlusion.diffuseFactor"); - static const char* const HeightMap("parallax.textureMap"); - static const char* const HeightUseTexture("parallax.useTexture"); - static const char* const HeightFactor("parallax.factor"); - static const char* const HeightOffset("parallax.offset"); - static const char* const HeightBlendFactor("parallax.blendFactor"); + static const char* const Textures("m_textures"); } - namespace ShaderInputs - { - static const char* const ModelToWorld("m_modelToWorld"); - static const char* const TerrainData("m_terrainData"); - static const char* const MacroMaterialData("m_macroMaterialData"); - static const char* const MacroMaterialCount("m_macroMaterialCount"); - static const char* const MacroColorMap("m_macroColorMap"); - static const char* const MacroNormalMap("m_macroNormalMap"); - } - - AZ_CVAR(bool, - r_terrainDebugDetailMaterials, - false, - [](const bool& value) - { - AZ::RPI::ShaderSystemInterface::Get()->SetGlobalShaderOption(AZ::Name{ "o_debugDetailMaterialIds" }, AZ::RPI::ShaderOptionValue{ value }); - }, - AZ::ConsoleFunctorFlags::Null, - "Turns on debugging for detail material ids for terrain." - ); - - void TerrainFeatureProcessor::Reflect(AZ::ReflectContext* context) { if (AZ::SerializeContext* serialize = azrtti_cast(context)) @@ -126,6 +59,9 @@ namespace Terrain void TerrainFeatureProcessor::Activate() { + EnableSceneNotification(); + CacheForwardPass(); + Initialize(); AzFramework::Terrain::TerrainDataNotificationBus::Handler::BusConnect(); @@ -138,6 +74,17 @@ namespace Terrain void TerrainFeatureProcessor::Initialize() { + m_meshManager.Initialize(); + m_imageArrayHandler = AZStd::make_shared(); + + auto sceneSrgLayout = AZ::RPI::RPISystemInterface::Get()->GetSceneSrgLayout(); + + m_heightmapPropertyIndex = sceneSrgLayout->FindShaderInputImageIndex(AZ::Name(SceneSrgInputs::HeightmapImage)); + AZ_Error(TerrainFPName, m_heightmapPropertyIndex.IsValid(), "Failed to find scene srg input constant %s.", SceneSrgInputs::HeightmapImage); + + m_worldDataIndex = sceneSrgLayout->FindShaderInputConstantIndex(AZ::Name(SceneSrgInputs::TerrainWorldData)); + AZ_Error(TerrainFPName, m_worldDataIndex.IsValid(), "Failed to find scene srg input constant %s.", SceneSrgInputs::TerrainWorldData); + // Load the terrain material asynchronously const AZStd::string materialFilePath = "Materials/Terrain/DefaultPbrTerrain.azmaterial"; m_materialAssetLoader = AZStd::make_unique(); @@ -160,27 +107,24 @@ namespace Terrain } } ); - if (!InitializePatchModel()) - { - AZ_Error(TerrainFPName, false, "Failed to create Terrain render buffers!"); - return; - } OnTerrainDataChanged(AZ::Aabb::CreateNull(), TerrainDataChangedMask::HeightData); + } void TerrainFeatureProcessor::Deactivate() { - TerrainMacroMaterialNotificationBus::Handler::BusDisconnect(); AzFramework::Terrain::TerrainDataNotificationBus::Handler::BusDisconnect(); AZ::RPI::MaterialReloadNotificationBus::Handler::BusDisconnect(); + + DisableSceneNotification(); + OnTerrainDataDestroyBegin(); - m_patchModel = {}; - m_areaData = {}; - m_dirtyRegion = AZ::Aabb::CreateNull(); - m_sectorData.clear(); - m_macroMaterials.Clear(); m_materialAssetLoader = {}; m_materialInstance = {}; + + m_meshManager.Reset(); + m_macroMaterialManager.Reset(); + m_detailMaterialManager.Reset(); } void TerrainFeatureProcessor::Render(const AZ::RPI::FeatureProcessor::RenderPacket& packet) @@ -190,7 +134,10 @@ namespace Terrain void TerrainFeatureProcessor::OnTerrainDataDestroyBegin() { - m_areaData = {}; + m_heightmapImage = {}; + m_terrainBounds = AZ::Aabb::CreateNull(); + m_dirtyRegion = AZ::Aabb::CreateNull(); + m_heightmapNeedsUpdate = false; } void TerrainFeatureProcessor::OnTerrainDataChanged(const AZ::Aabb& dirtyRegion, TerrainDataChangedMask dataChangedMask) @@ -199,10 +146,6 @@ namespace Terrain { TerrainHeightOrSettingsUpdated(dirtyRegion); } - if ((dataChangedMask & TerrainDataChangedMask::SurfaceData) != 0) - { - TerrainSurfaceDataUpdated(dirtyRegion); - } } void TerrainFeatureProcessor::TerrainHeightOrSettingsUpdated(const AZ::Aabb& dirtyRegion) @@ -216,579 +159,34 @@ namespace Terrain m_dirtyRegion.AddAabb(regionToUpdate); m_dirtyRegion.Clamp(worldBounds); - const AZ::Transform transform = AZ::Transform::CreateTranslation(worldBounds.GetCenter()); - AZ::Vector2 queryResolution2D = AZ::Vector2(1.0f); AzFramework::Terrain::TerrainDataRequestBus::BroadcastResult( queryResolution2D, &AzFramework::Terrain::TerrainDataRequests::GetTerrainHeightQueryResolution); // Currently query resolution is multidimensional but the rendering system only supports this changing in one dimension. float queryResolution = queryResolution2D.GetX(); - // Sectors need to be rebuilt if the world bounds change in the x/y, or the sample spacing changes. - m_areaData.m_rebuildSectors = m_areaData.m_rebuildSectors || - m_areaData.m_terrainBounds.GetMin().GetX() != worldBounds.GetMin().GetX() || - m_areaData.m_terrainBounds.GetMin().GetY() != worldBounds.GetMin().GetY() || - m_areaData.m_terrainBounds.GetMax().GetX() != worldBounds.GetMax().GetX() || - m_areaData.m_terrainBounds.GetMax().GetY() != worldBounds.GetMax().GetY() || - m_areaData.m_sampleSpacing != queryResolution; - - m_areaData.m_transform = transform; - m_areaData.m_terrainBounds = worldBounds; - m_areaData.m_sampleSpacing = queryResolution; - m_areaData.m_heightmapUpdated = true; + m_terrainBounds = worldBounds; + m_sampleSpacing = queryResolution; + m_heightmapNeedsUpdate = true; } - void TerrainFeatureProcessor::TerrainSurfaceDataUpdated(const AZ::Aabb& dirtyRegion) + void TerrainFeatureProcessor::OnRenderPipelinePassesChanged([[maybe_unused]] AZ::RPI::RenderPipeline* renderPipeline) { - m_dirtyDetailRegion.AddAabb(dirtyRegion); + CacheForwardPass(); } - void TerrainFeatureProcessor::OnTerrainMacroMaterialCreated(AZ::EntityId entityId, const MacroMaterialData& newMaterialData) + void TerrainFeatureProcessor::UpdateHeightmapImage() { - MacroMaterialData& materialData = FindOrCreateByEntityId(entityId, m_macroMaterials); - - UpdateMacroMaterialData(materialData, newMaterialData); - - // Update all sectors in region. - ForOverlappingSectors(materialData.m_bounds, - [&](SectorData& sectorData) { - if (sectorData.m_macroMaterials.size() < sectorData.m_macroMaterials.max_size()) - { - sectorData.m_macroMaterials.push_back(m_macroMaterials.GetIndexForData(&materialData)); - } - } - ); - } - - void TerrainFeatureProcessor::OnTerrainMacroMaterialChanged(AZ::EntityId entityId, const MacroMaterialData& newMaterialData) - { - MacroMaterialData& data = FindOrCreateByEntityId(entityId, m_macroMaterials); - UpdateMacroMaterialData(data, newMaterialData); - } - - void TerrainFeatureProcessor::OnTerrainMacroMaterialRegionChanged( - AZ::EntityId entityId, [[maybe_unused]] const AZ::Aabb& oldRegion, const AZ::Aabb& newRegion) - { - MacroMaterialData& materialData = FindOrCreateByEntityId(entityId, m_macroMaterials); - for (SectorData& sectorData : m_sectorData) - { - bool overlapsOld = sectorData.m_aabb.Overlaps(materialData.m_bounds); - bool overlapsNew = sectorData.m_aabb.Overlaps(newRegion); - if (overlapsOld && !overlapsNew) - { - // Remove the macro material from this sector - for (uint16_t& idx : sectorData.m_macroMaterials) - { - if (m_macroMaterials.GetData(idx).m_entityId == entityId) - { - idx = sectorData.m_macroMaterials.back(); - sectorData.m_macroMaterials.pop_back(); - } - } - } - else if (overlapsNew && !overlapsOld) - { - // Add the macro material to this sector - if (sectorData.m_macroMaterials.size() < MaxMaterialsPerSector) - { - sectorData.m_macroMaterials.push_back(m_macroMaterials.GetIndexForData(&materialData)); - } - } - } - m_areaData.m_macroMaterialsUpdated = true; - materialData.m_bounds = newRegion; - } - - void TerrainFeatureProcessor::OnTerrainMacroMaterialDestroyed(AZ::EntityId entityId) - { - const MacroMaterialData* materialData = FindByEntityId(entityId, m_macroMaterials); - - if (materialData) - { - uint16_t destroyedMaterialIndex = m_macroMaterials.GetIndexForData(materialData); - ForOverlappingSectors(materialData->m_bounds, - [&](SectorData& sectorData) { - for (uint16_t& idx : sectorData.m_macroMaterials) - { - if (idx == destroyedMaterialIndex) - { - idx = sectorData.m_macroMaterials.back(); - sectorData.m_macroMaterials.pop_back(); - } - } - }); - } - - m_areaData.m_macroMaterialsUpdated = true; - RemoveByEntityId(entityId, m_macroMaterials); - } - - void TerrainFeatureProcessor::OnTerrainSurfaceMaterialMappingCreated(AZ::EntityId entityId, SurfaceData::SurfaceTag surfaceTag, MaterialInstance material) - { - DetailMaterialListRegion& materialRegion = FindOrCreateByEntityId(entityId, m_detailMaterialRegions); - - // Validate that the surface tag is new - for (DetailMaterialSurface& surface : materialRegion.m_materialsForSurfaces) - { - if (surface.m_surfaceTag == surfaceTag) - { - AZ_Error(TerrainFPName, false, "Already have a surface material mapping for this surface tag."); - return; - } - } - - uint16_t detailMaterialId = CreateOrUpdateDetailMaterial(material); - materialRegion.m_materialsForSurfaces.push_back({ surfaceTag, detailMaterialId }); - m_dirtyDetailRegion.AddAabb(materialRegion.m_region); - } - - void TerrainFeatureProcessor::OnTerrainSurfaceMaterialMappingDestroyed(AZ::EntityId entityId, SurfaceData::SurfaceTag surfaceTag) - { - DetailMaterialListRegion& materialRegion = FindOrCreateByEntityId(entityId, m_detailMaterialRegions); - - for (DetailMaterialSurface& surface : materialRegion.m_materialsForSurfaces) - { - if (surface.m_surfaceTag == surfaceTag) - { - if (surface.m_surfaceTag != materialRegion.m_materialsForSurfaces.back().m_surfaceTag) - { - AZStd::swap(surface, materialRegion.m_materialsForSurfaces.back()); - } - materialRegion.m_materialsForSurfaces.pop_back(); - m_dirtyDetailRegion.AddAabb(materialRegion.m_region); - return; - } - } - AZ_Error(TerrainFPName, false, "Could not find surface tag to destroy for OnTerrainSurfaceMaterialMappingDestroyed()."); - } - - void TerrainFeatureProcessor::OnTerrainSurfaceMaterialMappingChanged(AZ::EntityId entityId, SurfaceData::SurfaceTag surfaceTag, MaterialInstance material) - { - DetailMaterialListRegion& materialRegion = FindOrCreateByEntityId(entityId, m_detailMaterialRegions); - - bool found = false; - uint16_t materialId = CreateOrUpdateDetailMaterial(material); - for (DetailMaterialSurface& surface : materialRegion.m_materialsForSurfaces) - { - if (surface.m_surfaceTag == surfaceTag) - { - found = true; - surface.m_detailMaterialId = materialId; - break; - } - } - - if (!found) - { - materialRegion.m_materialsForSurfaces.push_back({ surfaceTag, materialId }); - } - m_dirtyDetailRegion.AddAabb(materialRegion.m_region); - } - - void TerrainFeatureProcessor::OnTerrainSurfaceMaterialMappingRegionChanged(AZ::EntityId entityId, const AZ::Aabb& oldRegion, const AZ::Aabb& newRegion) - { - DetailMaterialListRegion& materialRegion = FindOrCreateByEntityId(entityId, m_detailMaterialRegions); - materialRegion.m_region = newRegion; - m_dirtyDetailRegion.AddAabb(oldRegion); - m_dirtyDetailRegion.AddAabb(newRegion); - } - - uint16_t TerrainFeatureProcessor::CreateOrUpdateDetailMaterial(MaterialInstance material) - { - static constexpr uint16_t InvalidDetailMaterial = 0xFFFF; - uint16_t detailMaterialId = InvalidDetailMaterial; - - for (DetailMaterialData& detailMaterial : m_detailMaterials.GetDataVector()) - { - if (detailMaterial.m_assetId == material->GetAssetId()) - { - UpdateDetailMaterialData(detailMaterial, material); - detailMaterialId = m_detailMaterials.GetIndexForData(&detailMaterial); - break; - } - } - - if (detailMaterialId == InvalidDetailMaterial) - { - detailMaterialId = m_detailMaterials.GetFreeSlotIndex(); - UpdateDetailMaterialData(m_detailMaterials.GetData(detailMaterialId), material); - } - return detailMaterialId; - } - - void TerrainFeatureProcessor::UpdateDetailMaterialData(DetailMaterialData& materialData, MaterialInstance material) - { - if (materialData.m_materialChangeId != material->GetCurrentChangeId()) - { - materialData = DetailMaterialData(); - DetailTextureFlags& flags = materialData.m_properties.m_flags; - materialData.m_materialChangeId = material->GetCurrentChangeId(); - materialData.m_assetId = material->GetAssetId(); - - auto getIndex = [&](const char* const indexName) -> AZ::RPI::MaterialPropertyIndex - { - const AZ::RPI::MaterialPropertyIndex index = material->FindPropertyIndex(AZ::Name(indexName)); - AZ_Warning(TerrainFPName, index.IsValid(), "Failed to find shader input constant %s.", indexName); - return index; - }; - - auto applyProperty = [&](const char* const indexName, auto& ref) -> void - { - const auto index = getIndex(indexName); - if (index.IsValid()) - { - using TypeRefRemoved = AZStd::remove_cvref_t; - ref = material->GetPropertyValue(index).GetValue(); - } - }; - - auto applyFlag = [&](const char* const indexName, DetailTextureFlags flagToSet) -> void - { - const auto index = getIndex(indexName); - if (index.IsValid()) - { - bool flagValue = material->GetPropertyValue(index).GetValue(); - flags = DetailTextureFlags(flagValue ? flags | flagToSet : flags); - } - }; - - auto getEnumName = [&](const char* const indexName) -> const AZStd::string_view - { - const auto index = getIndex(indexName); - if (index.IsValid()) - { - uint32_t enumIndex = material->GetPropertyValue(index).GetValue(); - const AZ::Name& enumName = material->GetMaterialPropertiesLayout()->GetPropertyDescriptor(index)->GetEnumName(enumIndex); - return enumName.GetStringView(); - } - return ""; - }; - - using namespace DetailMaterialInputs; - applyProperty(BaseColorMap, materialData.m_colorImage); - applyFlag(BaseColorUseTexture, DetailTextureFlags::UseTextureBaseColor); - applyProperty(BaseColorFactor, materialData.m_properties.m_baseColorFactor); - - const AZStd::string_view& blendModeString = getEnumName(BaseColorBlendMode); - if (blendModeString == "Multiply") - { - flags = DetailTextureFlags(flags | DetailTextureFlags::BlendModeMultiply); - } - else if (blendModeString == "LinearLight") - { - flags = DetailTextureFlags(flags | DetailTextureFlags::BlendModeLinearLight); - } - else if (blendModeString == "Lerp") - { - flags = DetailTextureFlags(flags | DetailTextureFlags::BlendModeLerp); - } - else if (blendModeString == "Overlay") - { - flags = DetailTextureFlags(flags | DetailTextureFlags::BlendModeOverlay); - } - - applyProperty(MetallicMap, materialData.m_metalnessImage); - applyFlag(MetallicUseTexture, DetailTextureFlags::UseTextureMetallic); - applyProperty(MetallicFactor, materialData.m_properties.m_metalFactor); - - applyProperty(RoughnessMap, materialData.m_roughnessImage); - applyFlag(RoughnessUseTexture, DetailTextureFlags::UseTextureRoughness); - - if ((flags & DetailTextureFlags::UseTextureRoughness) > 0) - { - float lowerBound = 0.0; - float upperBound = 1.0; - applyProperty(RoughnessLowerBound, lowerBound); - applyProperty(RoughnessUpperBound, upperBound); - materialData.m_properties.m_roughnessBias = lowerBound; - materialData.m_properties.m_roughnessScale = upperBound - lowerBound; - } - else - { - materialData.m_properties.m_roughnessBias = 0.0; - applyProperty(RoughnessFactor, materialData.m_properties.m_roughnessScale); - } - - applyProperty(SpecularF0Map, materialData.m_specularF0Image); - applyFlag(SpecularF0UseTexture, DetailTextureFlags::UseTextureSpecularF0); - applyProperty(SpecularF0Factor, materialData.m_properties.m_specularF0Factor); - - applyProperty(NormalMap, materialData.m_normalImage); - applyFlag(NormalUseTexture, DetailTextureFlags::UseTextureNormal); - applyProperty(NormalFactor, materialData.m_properties.m_normalFactor); - applyFlag(NormalFlipX, DetailTextureFlags::FlipNormalX); - applyFlag(NormalFlipY, DetailTextureFlags::FlipNormalY); - - applyProperty(DiffuseOcclusionMap, materialData.m_occlusionImage); - applyFlag(DiffuseOcclusionUseTexture, DetailTextureFlags::UseTextureOcclusion); - applyProperty(DiffuseOcclusionFactor, materialData.m_properties.m_occlusionFactor); - - applyProperty(HeightMap, materialData.m_heightImage); - applyFlag(HeightUseTexture, DetailTextureFlags::UseTextureHeight); - applyProperty(HeightFactor, materialData.m_properties.m_heightFactor); - applyProperty(HeightOffset, materialData.m_properties.m_heightOffset); - applyProperty(HeightBlendFactor, materialData.m_properties.m_heightBlendFactor); - - } - } - - void TerrainFeatureProcessor::CheckUpdateDetailTexture(const Aabb2i& newBounds, const Vector2i& newCenter) - { - if (!m_detailTextureImage) - { - // If the m_detailTextureImage doesn't exist, create it and populate the entire texture - - const AZ::Data::Instance imagePool = AZ::RPI::ImageSystemInterface::Get()->GetSystemAttachmentPool(); - AZ::RHI::ImageDescriptor imageDescriptor = AZ::RHI::ImageDescriptor::Create2D( - AZ::RHI::ImageBindFlags::ShaderRead, DetailTextureSize, DetailTextureSize, AZ::RHI::Format::R8G8B8A8_UINT - ); - const AZ::Name TerrainDetailName = AZ::Name(TerrainDetailChars); - m_detailTextureImage = AZ::RPI::AttachmentImage::Create(*imagePool.get(), imageDescriptor, TerrainDetailName, nullptr, nullptr); - AZ_Error(TerrainFPName, m_detailTextureImage, "Failed to initialize the detail texture image."); - - UpdateDetailTexture(newBounds, newBounds, newCenter); - } - else - { - // If the new bounds of the detail texture are different than the old bounds, then the edges of the texture need to be updated. - - int32_t offsetX = m_detailTextureBounds.m_min.m_x - newBounds.m_min.m_x; - - // Horizontal edge update - if (newBounds.m_min.m_x != m_detailTextureBounds.m_min.m_x) - { - Aabb2i updateBounds; - if (newBounds.m_min.m_x < m_detailTextureBounds.m_min.m_x) - { - updateBounds.m_min.m_x = newBounds.m_min.m_x; - updateBounds.m_max.m_x = m_detailTextureBounds.m_min.m_x; - } - else - { - updateBounds.m_min.m_x = m_detailTextureBounds.m_max.m_x; - updateBounds.m_max.m_x = newBounds.m_max.m_x; - } - updateBounds.m_min.m_y = newBounds.m_min.m_y; - updateBounds.m_max.m_y = newBounds.m_max.m_y; - UpdateDetailTexture(updateBounds, newBounds, newCenter); - } - - // Vertical edge update - if (newBounds.m_min.m_y != m_detailTextureBounds.m_min.m_y) - { - Aabb2i updateBounds; - // Don't update areas that have already been updated in the horizontal update. - updateBounds.m_min.m_x = newBounds.m_min.m_x + AZ::GetMax(0, offsetX); - updateBounds.m_max.m_x = newBounds.m_max.m_x + AZ::GetMin(0, offsetX); - if (newBounds.m_min.m_y < m_detailTextureBounds.m_min.m_y) - { - updateBounds.m_min.m_y = newBounds.m_min.m_y; - updateBounds.m_max.m_y = m_detailTextureBounds.m_min.m_y; - } - else - { - updateBounds.m_min.m_y = m_detailTextureBounds.m_max.m_y; - updateBounds.m_max.m_y = newBounds.m_max.m_y; - } - UpdateDetailTexture(updateBounds, newBounds, newCenter); - } - - if (m_dirtyDetailRegion.IsValid()) - { - // If any regions are marked as dirty, then they should be updated. - - AZ::Vector3 currentMin = AZ::Vector3(newBounds.m_min.m_x * DetailTextureScale, newBounds.m_min.m_y * DetailTextureScale, -0.5f); - AZ::Vector3 currentMax = AZ::Vector3(newBounds.m_max.m_x * DetailTextureScale, newBounds.m_max.m_y * DetailTextureScale, 0.5f); - AZ::Aabb detailTextureCoverage = AZ::Aabb::CreateFromMinMax(currentMin, currentMax); - AZ::Vector3 previousMin = AZ::Vector3(m_detailTextureBounds.m_min.m_x * DetailTextureScale, m_detailTextureBounds.m_min.m_y * DetailTextureScale, -0.5f); - AZ::Vector3 previousMax = AZ::Vector3(m_detailTextureBounds.m_max.m_x * DetailTextureScale, m_detailTextureBounds.m_max.m_y * DetailTextureScale, 0.5f); - AZ::Aabb previousCoverage = AZ::Aabb::CreateFromMinMax(previousMin, previousMax); - - // Area of texture not already updated by camera movement above. - AZ::Aabb clampedCoverage = previousCoverage.GetClamped(detailTextureCoverage); - - // Clamp the dirty region to the area of the detail texture that is visible and not already updated. - clampedCoverage.Clamp(m_dirtyDetailRegion); - - if (clampedCoverage.IsValid()) - { - Aabb2i updateBounds; - updateBounds.m_min.m_x = aznumeric_cast(AZStd::roundf(clampedCoverage.GetMin().GetX() / DetailTextureScale)); - updateBounds.m_min.m_y = aznumeric_cast(AZStd::roundf(clampedCoverage.GetMin().GetY() / DetailTextureScale)); - updateBounds.m_max.m_x = aznumeric_cast(AZStd::roundf(clampedCoverage.GetMax().GetX() / DetailTextureScale)); - updateBounds.m_max.m_y = aznumeric_cast(AZStd::roundf(clampedCoverage.GetMax().GetY() / DetailTextureScale)); - if (updateBounds.m_min.m_x < updateBounds.m_max.m_x && updateBounds.m_min.m_y < updateBounds.m_max.m_y) - { - UpdateDetailTexture(updateBounds, newBounds, newCenter); - } - } - } - } - - } - - uint8_t TerrainFeatureProcessor::CalculateUpdateRegions(const Aabb2i& updateArea, const Aabb2i& textureBounds, const Vector2i& centerPixel, - AZStd::array& textureSpaceAreas, AZStd::array& scaledWorldSpaceAreas) - { - Vector2i centerOffset = { centerPixel.m_x - DetailTextureSizeHalf, centerPixel.m_y - DetailTextureSizeHalf }; - - int32_t quadrantXOffset = centerPixel.m_x < DetailTextureSizeHalf ? DetailTextureSize : -DetailTextureSize; - int32_t quadrantYOffset = centerPixel.m_y < DetailTextureSizeHalf ? DetailTextureSize : -DetailTextureSize; - - uint8_t numQuadrants = 0; - - // For each of the 4 quadrants: - auto calculateQuadrant = [&](Vector2i quadrantOffset) - { - Aabb2i offsetUpdateArea = updateArea + centerOffset + quadrantOffset; - Aabb2i updateSectionBounds = textureBounds.GetClamped(offsetUpdateArea); - if (updateSectionBounds.IsValid()) - { - textureSpaceAreas[numQuadrants] = updateSectionBounds - textureBounds.m_min; - scaledWorldSpaceAreas[numQuadrants] = updateSectionBounds - centerOffset - quadrantOffset; - ++numQuadrants; - } - }; - - calculateQuadrant({ 0, 0 }); - calculateQuadrant({ quadrantXOffset, 0 }); - calculateQuadrant({ 0, quadrantYOffset }); - calculateQuadrant({ quadrantXOffset, quadrantYOffset }); - - return numQuadrants; - } - - void TerrainFeatureProcessor::UpdateDetailTexture(const Aabb2i& updateArea, const Aabb2i& textureBounds, const Vector2i& centerPixel) - { - if (!m_detailTextureImage) - { - return; - } - - struct DetailMaterialPixel - { - uint8_t m_material1{ 255 }; - uint8_t m_material2{ 255 }; - uint8_t m_blend{ 0 }; // 0 = full weight on material1, 255 = full weight on material2 - uint8_t m_padding{ 0 }; - }; - - // Because the center of the detail texture may be offset, each update area may actually need to be split into - // up to 4 separate update areas in each sector of the quadrant. - AZStd::array textureSpaceAreas; - AZStd::array scaledWorldSpaceAreas; - uint8_t updateAreaCount = CalculateUpdateRegions(updateArea, textureBounds, centerPixel, textureSpaceAreas, scaledWorldSpaceAreas); - - // Pull the data for each area updated and use it to construct an update for the detail material id texture. - for (uint8_t i = 0; i < updateAreaCount; ++i) - { - const Aabb2i& quadrantTextureArea = textureSpaceAreas[i]; - const Aabb2i& quadrantWorldArea = scaledWorldSpaceAreas[i]; - - AZStd::vector pixels; - pixels.resize((quadrantWorldArea.m_max.m_x - quadrantWorldArea.m_min.m_x) * (quadrantWorldArea.m_max.m_y - quadrantWorldArea.m_min.m_y)); - uint32_t index = 0; - - for (int yPos = quadrantWorldArea.m_min.m_y; yPos < quadrantWorldArea.m_max.m_y; ++yPos) - { - for (int xPos = quadrantWorldArea.m_min.m_x; xPos < quadrantWorldArea.m_max.m_x; ++xPos) - { - AZ::Vector2 position = AZ::Vector2(xPos * DetailTextureScale, yPos * DetailTextureScale); - AzFramework::SurfaceData::SurfaceTagWeightList surfaceWeights; - AzFramework::Terrain::TerrainDataRequestBus::Broadcast(&AzFramework::Terrain::TerrainDataRequests::GetSurfaceWeightsFromVector2, position, surfaceWeights, AzFramework::Terrain::TerrainDataRequests::Sampler::EXACT, nullptr); - - // Store the top two surface weights in the texture with m_blend storing the relative weight. - bool isFirstMaterial = true; - float firstWeight = 0.0f; - for (const auto& surfaceTagWeight : surfaceWeights) - { - if (surfaceTagWeight.m_weight > 0.0f) - { - AZ::Crc32 surfaceType = surfaceTagWeight.m_surfaceType; - uint16_t materialId = GetDetailMaterialForSurfaceTypeAndPosition(surfaceType, position); - if (materialId != m_detailMaterials.NoFreeSlot && materialId < 255) - { - if (isFirstMaterial) - { - pixels.at(index).m_material1 = aznumeric_cast(materialId); - firstWeight = surfaceTagWeight.m_weight; - // m_blend only needs to be calculated is material 2 is found, otherwise the initial value of 0 is correct. - isFirstMaterial = false; - } - else - { - pixels.at(index).m_material2 = aznumeric_cast(materialId); - float totalWeight = firstWeight + surfaceTagWeight.m_weight; - float blendWeight = 1.0f - (firstWeight / totalWeight); - pixels.at(index).m_blend = aznumeric_cast(AZStd::round(blendWeight * 255.0f)); - break; - } - } - } - else - { - break; // since the list is ordered, no other materials are in the list with positive weights. - } - } - ++index; - } - } - - const int32_t left = quadrantTextureArea.m_min.m_x; - const int32_t top = quadrantTextureArea.m_min.m_y; - const int32_t width = quadrantTextureArea.m_max.m_x - quadrantTextureArea.m_min.m_x; - const int32_t height = quadrantTextureArea.m_max.m_y - quadrantTextureArea.m_min.m_y; - - AZ::RHI::ImageUpdateRequest imageUpdateRequest; - imageUpdateRequest.m_imageSubresourcePixelOffset.m_left = aznumeric_cast(left); - imageUpdateRequest.m_imageSubresourcePixelOffset.m_top = aznumeric_cast(top); - imageUpdateRequest.m_sourceSubresourceLayout.m_bytesPerRow = width * sizeof(DetailMaterialPixel); - imageUpdateRequest.m_sourceSubresourceLayout.m_bytesPerImage = width * height * sizeof(DetailMaterialPixel); - imageUpdateRequest.m_sourceSubresourceLayout.m_rowCount = height; - imageUpdateRequest.m_sourceSubresourceLayout.m_size.m_width = width; - imageUpdateRequest.m_sourceSubresourceLayout.m_size.m_height = height; - imageUpdateRequest.m_sourceSubresourceLayout.m_size.m_depth = 1; - imageUpdateRequest.m_sourceData = pixels.data(); - imageUpdateRequest.m_image = m_detailTextureImage->GetRHIImage(); - - m_detailTextureImage->UpdateImageContents(imageUpdateRequest); - } - } - - uint16_t TerrainFeatureProcessor::GetDetailMaterialForSurfaceTypeAndPosition(AZ::Crc32 surfaceType, const AZ::Vector2& position) - { - for (const auto& materialRegion : m_detailMaterialRegions.GetDataVector()) - { - if (materialRegion.m_region.Contains(AZ::Vector3(position.GetX(), position.GetY(), 0.0f))) - { - for (const auto& materialSurface : materialRegion.m_materialsForSurfaces) - { - if (materialSurface.m_surfaceTag == surfaceType) - { - return materialSurface.m_detailMaterialId; - } - } - } - } - return m_detailMaterials.NoFreeSlot; - } - - void TerrainFeatureProcessor::UpdateTerrainData() - { - - const float queryResolution = m_areaData.m_sampleSpacing; - const AZ::Aabb& worldBounds = m_areaData.m_terrainBounds; - - int32_t heightmapImageXStart = aznumeric_cast(AZStd::ceilf(worldBounds.GetMin().GetX() / queryResolution)); - int32_t heightmapImageXEnd = aznumeric_cast(AZStd::floorf(worldBounds.GetMax().GetX() / queryResolution)) + 1; - int32_t heightmapImageYStart = aznumeric_cast(AZStd::ceilf(worldBounds.GetMin().GetY() / queryResolution)); - int32_t heightmapImageYEnd = aznumeric_cast(AZStd::floorf(worldBounds.GetMax().GetY() / queryResolution)) + 1; + int32_t heightmapImageXStart = aznumeric_cast(AZStd::ceilf(m_terrainBounds.GetMin().GetX() / m_sampleSpacing)); + int32_t heightmapImageXEnd = aznumeric_cast(AZStd::floorf(m_terrainBounds.GetMax().GetX() / m_sampleSpacing)) + 1; + int32_t heightmapImageYStart = aznumeric_cast(AZStd::ceilf(m_terrainBounds.GetMin().GetY() / m_sampleSpacing)); + int32_t heightmapImageYEnd = aznumeric_cast(AZStd::floorf(m_terrainBounds.GetMax().GetY() / m_sampleSpacing)) + 1; uint32_t heightmapImageWidth = heightmapImageXEnd - heightmapImageXStart; uint32_t heightmapImageHeight = heightmapImageYEnd - heightmapImageYStart; const AZ::RHI::Size heightmapSize = AZ::RHI::Size(heightmapImageWidth, heightmapImageHeight, 1); - if (!m_areaData.m_heightmapImage || m_areaData.m_heightmapImage->GetDescriptor().m_size != heightmapSize) + if (!m_heightmapImage || m_heightmapImage->GetDescriptor().m_size != heightmapSize) { const AZ::Data::Instance imagePool = AZ::RPI::ImageSystemInterface::Get()->GetSystemAttachmentPool(); AZ::RHI::ImageDescriptor imageDescriptor = AZ::RHI::ImageDescriptor::Create2D( @@ -796,23 +194,28 @@ namespace Terrain ); const AZ::Name TerrainHeightmapName = AZ::Name(TerrainHeightmapChars); - m_areaData.m_heightmapImage = AZ::RPI::AttachmentImage::Create(*imagePool.get(), imageDescriptor, TerrainHeightmapName, nullptr, nullptr); - AZ_Error(TerrainFPName, m_areaData.m_heightmapImage, "Failed to initialize the heightmap image."); + m_heightmapImage = AZ::RPI::AttachmentImage::Create(*imagePool.get(), imageDescriptor, TerrainHeightmapName, nullptr, nullptr); + AZ_Error(TerrainFPName, m_heightmapImage, "Failed to initialize the heightmap image."); // World size changed, so the whole height map needs updating. - m_dirtyRegion = worldBounds; + m_dirtyRegion = m_terrainBounds; + m_imageBindingsNeedUpdate = true; + } + + if (!m_dirtyRegion.IsValid()) + { + return; } - int32_t xStart = aznumeric_cast(AZStd::ceilf(m_dirtyRegion.GetMin().GetX() / queryResolution)); - int32_t xEnd = aznumeric_cast(AZStd::floorf(m_dirtyRegion.GetMax().GetX() / queryResolution)) + 1; - int32_t yStart = aznumeric_cast(AZStd::ceilf(m_dirtyRegion.GetMin().GetY() / queryResolution)); - int32_t yEnd = aznumeric_cast(AZStd::floorf(m_dirtyRegion.GetMax().GetY() / queryResolution)) + 1; + int32_t xStart = aznumeric_cast(AZStd::ceilf(m_dirtyRegion.GetMin().GetX() / m_sampleSpacing)); + int32_t xEnd = aznumeric_cast(AZStd::floorf(m_dirtyRegion.GetMax().GetX() / m_sampleSpacing)) + 1; + int32_t yStart = aznumeric_cast(AZStd::ceilf(m_dirtyRegion.GetMin().GetY() / m_sampleSpacing)); + int32_t yEnd = aznumeric_cast(AZStd::floorf(m_dirtyRegion.GetMax().GetY() / m_sampleSpacing)) + 1; uint32_t updateWidth = xEnd - xStart; uint32_t updateHeight = yEnd - yStart; AZStd::vector pixels; pixels.reserve(updateWidth * updateHeight); - { // Block other threads from accessing the surface data bus while we are in GetHeightFromFloats (which may call into the SurfaceData bus). // We lock our surface data mutex *before* checking / setting "isRequestInProgress" so that we prevent race conditions @@ -829,13 +232,13 @@ namespace Terrain { bool terrainExists = true; float terrainHeight = 0.0f; - float xPos = x * queryResolution; - float yPos = y * queryResolution; + float xPos = x * m_sampleSpacing; + float yPos = y * m_sampleSpacing; AzFramework::Terrain::TerrainDataRequestBus::BroadcastResult( terrainHeight, &AzFramework::Terrain::TerrainDataRequests::GetHeightFromFloats, xPos, yPos, AzFramework::Terrain::TerrainDataRequests::Sampler::EXACT, &terrainExists); - const float clampedHeight = AZ::GetClamp((terrainHeight - worldBounds.GetMin().GetZ()) / worldBounds.GetExtents().GetZ(), 0.0f, 1.0f); + const float clampedHeight = AZ::GetClamp((terrainHeight - m_terrainBounds.GetMin().GetZ()) / m_terrainBounds.GetExtents().GetZ(), 0.0f, 1.0f); const float expandedHeight = AZStd::roundf(clampedHeight * AZStd::numeric_limits::max()); const uint16_t uint16Height = aznumeric_cast(expandedHeight); @@ -844,11 +247,11 @@ namespace Terrain } } - if (m_areaData.m_heightmapImage) + if (m_heightmapImage) { constexpr uint32_t BytesPerPixel = sizeof(uint16_t); - const float left = xStart - (worldBounds.GetMin().GetX() / queryResolution); - const float top = yStart - (worldBounds.GetMin().GetY() / queryResolution); + const float left = xStart - (m_terrainBounds.GetMin().GetX() / m_sampleSpacing); + const float top = yStart - (m_terrainBounds.GetMin().GetY() / m_sampleSpacing); AZ::RHI::ImageUpdateRequest imageUpdateRequest; imageUpdateRequest.m_imageSubresourcePixelOffset.m_left = aznumeric_cast(left); @@ -856,99 +259,67 @@ namespace Terrain imageUpdateRequest.m_sourceSubresourceLayout.m_bytesPerRow = updateWidth * BytesPerPixel; imageUpdateRequest.m_sourceSubresourceLayout.m_bytesPerImage = updateWidth * updateHeight * BytesPerPixel; imageUpdateRequest.m_sourceSubresourceLayout.m_rowCount = updateHeight; - imageUpdateRequest.m_sourceSubresourceLayout.m_size.m_width = updateWidth; - imageUpdateRequest.m_sourceSubresourceLayout.m_size.m_height = updateHeight; - imageUpdateRequest.m_sourceSubresourceLayout.m_size.m_depth = 1; + imageUpdateRequest.m_sourceSubresourceLayout.m_size = AZ::RHI::Size(updateWidth, updateHeight, 1); imageUpdateRequest.m_sourceData = pixels.data(); - imageUpdateRequest.m_image = m_areaData.m_heightmapImage->GetRHIImage(); + imageUpdateRequest.m_image = m_heightmapImage->GetRHIImage(); - m_areaData.m_heightmapImage->UpdateImageContents(imageUpdateRequest); + m_heightmapImage->UpdateImageContents(imageUpdateRequest); } m_dirtyRegion = AZ::Aabb::CreateNull(); } void TerrainFeatureProcessor::PrepareMaterialData() - { - const auto layout = m_materialInstance->GetAsset()->GetObjectSrgLayout(); - - m_modelToWorldIndex = layout->FindShaderInputConstantIndex(AZ::Name(ShaderInputs::ModelToWorld)); - AZ_Error(TerrainFPName, m_modelToWorldIndex.IsValid(), "Failed to find shader input constant %s.", ShaderInputs::ModelToWorld); - - m_terrainDataIndex = layout->FindShaderInputConstantIndex(AZ::Name(ShaderInputs::TerrainData)); - AZ_Error(TerrainFPName, m_terrainDataIndex.IsValid(), "Failed to find shader input constant %s.", ShaderInputs::TerrainData); - - m_macroMaterialDataIndex = layout->FindShaderInputConstantIndex(AZ::Name(ShaderInputs::MacroMaterialData)); - AZ_Error(TerrainFPName, m_macroMaterialDataIndex.IsValid(), "Failed to find shader input constant %s.", ShaderInputs::MacroMaterialData); - - m_macroMaterialCountIndex = layout->FindShaderInputConstantIndex(AZ::Name(ShaderInputs::MacroMaterialCount)); - AZ_Error(TerrainFPName, m_macroMaterialCountIndex.IsValid(), "Failed to find shader input constant %s.", ShaderInputs::MacroMaterialCount); - - m_macroColorMapIndex = layout->FindShaderInputImageIndex(AZ::Name(ShaderInputs::MacroColorMap)); - AZ_Error(TerrainFPName, m_macroColorMapIndex.IsValid(), "Failed to find shader input constant %s.", ShaderInputs::MacroColorMap); - - m_macroNormalMapIndex = layout->FindShaderInputImageIndex(AZ::Name(ShaderInputs::MacroNormalMap)); - AZ_Error(TerrainFPName, m_macroNormalMapIndex.IsValid(), "Failed to find shader input constant %s.", ShaderInputs::MacroNormalMap); - - m_heightmapPropertyIndex = m_materialInstance->GetMaterialPropertiesLayout()->FindPropertyIndex(AZ::Name(MaterialInputs::HeightmapImage)); - AZ_Error(TerrainFPName, m_heightmapPropertyIndex.IsValid(), "Failed to find material input constant %s.", MaterialInputs::HeightmapImage); - - m_detailMaterialIdPropertyIndex = m_materialInstance->GetMaterialPropertiesLayout()->FindPropertyIndex(AZ::Name(MaterialInputs::DetailMaterialIdImage)); - AZ_Error(TerrainFPName, m_detailMaterialIdPropertyIndex.IsValid(), "Failed to find material input constant %s.", MaterialInputs::DetailMaterialIdImage); - - m_detailCenterPropertyIndex = m_materialInstance->GetMaterialPropertiesLayout()->FindPropertyIndex(AZ::Name(MaterialInputs::DetailCenter)); - AZ_Error(TerrainFPName, m_detailCenterPropertyIndex.IsValid(), "Failed to find material input constant %s.", MaterialInputs::DetailCenter); - - m_detailAabbPropertyIndex = m_materialInstance->GetMaterialPropertiesLayout()->FindPropertyIndex(AZ::Name(MaterialInputs::DetailAabb)); - AZ_Error(TerrainFPName, m_detailAabbPropertyIndex.IsValid(), "Failed to find material input constant %s.", MaterialInputs::DetailAabb); - - m_detailHalfPixelUvPropertyIndex = m_materialInstance->GetMaterialPropertiesLayout()->FindPropertyIndex(AZ::Name(MaterialInputs::DetailHalfPixelUv)); - AZ_Error(TerrainFPName, m_detailHalfPixelUvPropertyIndex.IsValid(), "Failed to find material input constant %s.", MaterialInputs::DetailHalfPixelUv); - - // Find any macro materials that have already been created. - TerrainMacroMaterialRequestBus::EnumerateHandlers( - [&](TerrainMacroMaterialRequests* handler) - { - MacroMaterialData macroMaterial = handler->GetTerrainMacroMaterialData(); - AZ::EntityId entityId = *(Terrain::TerrainMacroMaterialRequestBus::GetCurrentBusId()); - OnTerrainMacroMaterialCreated(entityId, macroMaterial); - return true; - } - ); - TerrainMacroMaterialNotificationBus::Handler::BusConnect(); - - // Find any detail material areas that have already been created. - TerrainAreaMaterialRequestBus::EnumerateHandlers( - [&](TerrainAreaMaterialRequests* handler) - { - const AZ::Aabb& bounds = handler->GetTerrainSurfaceMaterialRegion(); - const AZStd::vector materialMappings = handler->GetSurfaceMaterialMappings(); - AZ::EntityId entityId = *(Terrain::TerrainAreaMaterialRequestBus::GetCurrentBusId()); - - DetailMaterialListRegion& materialRegion = FindOrCreateByEntityId(entityId, m_detailMaterialRegions); - materialRegion.m_region = bounds; - - for (const auto& materialMapping : materialMappings) - { - if (materialMapping.m_materialInstance) - { - OnTerrainSurfaceMaterialMappingCreated(entityId, materialMapping.m_surfaceTag, materialMapping.m_materialInstance); - } - } - return true; - } - ); - TerrainAreaMaterialNotificationBus::Handler::BusConnect(); - - } - - void TerrainFeatureProcessor::UpdateMacroMaterialData(MacroMaterialData& macroMaterialData, const MacroMaterialData& newMaterialData) { - macroMaterialData = newMaterialData; + m_terrainSrg = {}; - if (macroMaterialData.m_bounds.IsValid()) + for (auto& shaderItem : m_materialInstance->GetShaderCollection()) { - m_areaData.m_macroMaterialsUpdated = true; + if (shaderItem.GetShaderAsset()->GetDrawListName() == AZ::Name("forward")) + { + const auto& shaderAsset = shaderItem.GetShaderAsset(); + m_terrainSrg = AZ::RPI::ShaderResourceGroup::Create(shaderItem.GetShaderAsset(), shaderAsset->GetSupervariantIndex(AZ::Name()), AZ::Name{"TerrainSrg"}); + AZ_Error(TerrainFPName, m_terrainSrg, "Failed to create Terrain shader resource group"); + break; + } + } + + AZ_Error(TerrainFPName, m_terrainSrg, "Terrain Srg not found on any shader in the terrain material"); + + if (m_terrainSrg) + { + if (m_imageArrayHandler->IsInitialized()) + { + m_imageArrayHandler->UpdateSrgIndices(m_terrainSrg, AZ::Name(TerrainSrgInputs::Textures)); + } + else + { + m_imageArrayHandler->Initialize(m_terrainSrg, AZ::Name(TerrainSrgInputs::Textures)); + } + + if (m_macroMaterialManager.IsInitialized()) + { + m_macroMaterialManager.UpdateSrgIndices(m_terrainSrg); + } + else + { + m_macroMaterialManager.Initialize(m_imageArrayHandler, m_terrainSrg); + } + + if (m_detailMaterialManager.IsInitialized()) + { + m_detailMaterialManager.UpdateSrgIndices(m_terrainSrg); + } + else + { + m_detailMaterialManager.Initialize(m_imageArrayHandler, m_terrainSrg); + } + } + else + { + m_imageArrayHandler->Reset(); + m_macroMaterialManager.Reset(); + m_detailMaterialManager.Reset(); } } @@ -956,108 +327,13 @@ namespace Terrain { AZ_PROFILE_FUNCTION(AzRender); - const AZ::Aabb& terrainBounds = m_areaData.m_terrainBounds; - - if (!terrainBounds.IsValid()) + if (!m_terrainBounds.IsValid()) { return; } if (m_materialInstance && m_materialInstance->CanCompile()) { - if (m_areaData.m_rebuildSectors) - { - // Something about the whole world changed, so the sectors need to be rebuilt - - m_areaData.m_rebuildSectors = false; - - m_sectorData.clear(); - const float xFirstPatchStart = terrainBounds.GetMin().GetX() - fmod(terrainBounds.GetMin().GetX(), GridMeters); - const float xLastPatchStart = terrainBounds.GetMax().GetX() - fmod(terrainBounds.GetMax().GetX(), GridMeters); - const float yFirstPatchStart = terrainBounds.GetMin().GetY() - fmod(terrainBounds.GetMin().GetY(), GridMeters); - const float yLastPatchStart = terrainBounds.GetMax().GetY() - fmod(terrainBounds.GetMax().GetY(), GridMeters); - - const auto& materialAsset = m_materialInstance->GetAsset(); - const auto& shaderAsset = materialAsset->GetMaterialTypeAsset()->GetShaderAssetForObjectSrg(); - - for (float yPatch = yFirstPatchStart; yPatch <= yLastPatchStart; yPatch += GridMeters) - { - for (float xPatch = xFirstPatchStart; xPatch <= xLastPatchStart; xPatch += GridMeters) - { - auto objectSrg = AZ::RPI::ShaderResourceGroup::Create(shaderAsset, materialAsset->GetObjectSrgLayout()->GetName()); - if (!objectSrg) - { - AZ_Warning("TerrainFeatureProcessor", false, "Failed to create a new shader resource group, skipping."); - continue; - } - - m_sectorData.push_back(); - SectorData& sectorData = m_sectorData.back(); - - for (auto& lod : m_patchModel->GetLods()) - { - AZ::RPI::ModelLod& modelLod = *lod.get(); - sectorData.m_drawPackets.emplace_back(modelLod, 0, m_materialInstance, objectSrg); - AZ::RPI::MeshDrawPacket& drawPacket = sectorData.m_drawPackets.back(); - - // set the shader option to select forward pass IBL specular if necessary - if (!drawPacket.SetShaderOption(AZ::Name("o_meshUseForwardPassIBLSpecular"), AZ::RPI::ShaderOptionValue{ false })) - { - AZ_Warning("MeshDrawPacket", false, "Failed to set o_meshUseForwardPassIBLSpecular on mesh draw packet"); - } - const uint8_t stencilRef = AZ::Render::StencilRefs::UseDiffuseGIPass | AZ::Render::StencilRefs::UseIBLSpecularPass; - drawPacket.SetStencilRef(stencilRef); - drawPacket.Update(*GetParentScene(), true); - } - - sectorData.m_aabb = - AZ::Aabb::CreateFromMinMax( - AZ::Vector3(xPatch, yPatch, terrainBounds.GetMin().GetZ()), - AZ::Vector3(xPatch + GridMeters, yPatch + GridMeters, terrainBounds.GetMax().GetZ()) - ); - sectorData.m_srg = objectSrg; - } - } - - if (m_areaData.m_macroMaterialsUpdated) - { - // sectors were rebuilt, so any cached macro material data needs to be regenerated - for (SectorData& sectorData : m_sectorData) - { - for (MacroMaterialData& macroMaterialData : m_macroMaterials.GetDataVector()) - { - if (macroMaterialData.m_bounds.Overlaps(sectorData.m_aabb)) - { - sectorData.m_macroMaterials.push_back(m_macroMaterials.GetIndexForData(¯oMaterialData)); - if (sectorData.m_macroMaterials.size() == MaxMaterialsPerSector) - { - break; - } - } - } - } - } - } - else if (m_forceRebuildDrawPackets) - { - for (auto& sectorData : m_sectorData) - { - for (auto& drawPacket : sectorData.m_drawPackets) - { - drawPacket.Update(*GetParentScene(), true); - } - } - } - m_forceRebuildDrawPackets = false; - - if (m_areaData.m_heightmapUpdated) - { - UpdateTerrainData(); - - const AZ::Data::Instance heightmapImage = m_areaData.m_heightmapImage; // cast StreamingImage to Image - m_materialInstance->SetPropertyValue(m_heightmapPropertyIndex, heightmapImage); - } - AZ::Vector3 cameraPosition = AZ::Vector3::CreateZero(); for (auto& view : process.m_views) { @@ -1068,313 +344,78 @@ namespace Terrain } } - if (m_dirtyDetailRegion.IsValid() || !cameraPosition.IsClose(m_previousCameraPosition)) + if (m_meshManager.IsInitialized()) { - int32_t newDetailTexturePosX = aznumeric_cast(AZStd::roundf(cameraPosition.GetX() / DetailTextureScale)); - int32_t newDetailTexturePosY = aznumeric_cast(AZStd::roundf(cameraPosition.GetY() / DetailTextureScale)); - - Aabb2i newBounds; - newBounds.m_min.m_x = newDetailTexturePosX - DetailTextureSizeHalf; - newBounds.m_min.m_y = newDetailTexturePosY - DetailTextureSizeHalf; - newBounds.m_max.m_x = newDetailTexturePosX + DetailTextureSizeHalf; - newBounds.m_max.m_y = newDetailTexturePosY + DetailTextureSizeHalf; - - // Use modulo to find the center point in texture space. Care must be taken so negative values are - // handled appropriately (ie, we want -1 % 1024 to equal 1023, not -1) - Vector2i newCenter; - newCenter.m_x = (DetailTextureSize + (newDetailTexturePosX % DetailTextureSize)) % DetailTextureSize; - newCenter.m_y = (DetailTextureSize + (newDetailTexturePosY % DetailTextureSize)) % DetailTextureSize; - - CheckUpdateDetailTexture(newBounds, newCenter); - - m_detailTextureBounds = newBounds; - m_dirtyDetailRegion = AZ::Aabb::CreateNull(); - - m_previousCameraPosition = cameraPosition; - const AZ::Data::Instance detailTextureImage = m_detailTextureImage; // cast StreamingImage to Image - m_materialInstance->SetPropertyValue(m_detailMaterialIdPropertyIndex, detailTextureImage); - - AZ::Vector4 detailAabb = AZ::Vector4( - m_detailTextureBounds.m_min.m_x * DetailTextureScale, - m_detailTextureBounds.m_min.m_y * DetailTextureScale, - m_detailTextureBounds.m_max.m_x * DetailTextureScale, - m_detailTextureBounds.m_max.m_y * DetailTextureScale - ); - m_materialInstance->SetPropertyValue(m_detailAabbPropertyIndex, detailAabb); - m_materialInstance->SetPropertyValue(m_detailHalfPixelUvPropertyIndex, 0.5f / DetailTextureSize); - - AZ::Vector2 detailUvOffset = AZ::Vector2(float(newCenter.m_x) / DetailTextureSize, float(newCenter.m_y) / DetailTextureSize); - m_materialInstance->SetPropertyValue(m_detailCenterPropertyIndex, detailUvOffset); + bool surfacesRebuilt = false; + surfacesRebuilt = m_meshManager.CheckRebuildSurfaces(m_materialInstance, *GetParentScene()); + if (m_forceRebuildDrawPackets && !surfacesRebuilt) + { + m_meshManager.RebuildDrawPackets(*GetParentScene()); + } + m_forceRebuildDrawPackets = false; } - if (m_areaData.m_heightmapUpdated || m_areaData.m_macroMaterialsUpdated) + if (m_terrainSrg) { - // Currently when anything in the heightmap changes we're updating all the srgs, but this could probably - // be optimized to only update the srgs that changed. - - m_areaData.m_heightmapUpdated = false; - m_areaData.m_macroMaterialsUpdated = false; - - AZStd::array uvStep = + if (m_macroMaterialManager.IsInitialized()) { - 1.0f / aznumeric_cast(m_areaData.m_terrainBounds.GetXExtent() / m_areaData.m_sampleSpacing), - 1.0f / aznumeric_cast(m_areaData.m_terrainBounds.GetYExtent() / m_areaData.m_sampleSpacing), - }; - - for (SectorData& sectorData : m_sectorData) - { - ShaderTerrainData terrainDataForSrg; - - const float xPatch = sectorData.m_aabb.GetMin().GetX(); - const float yPatch = sectorData.m_aabb.GetMin().GetY(); - - terrainDataForSrg.m_uvMin = { - (xPatch - terrainBounds.GetMin().GetX()) / terrainBounds.GetXExtent(), - (yPatch - terrainBounds.GetMin().GetY()) / terrainBounds.GetYExtent() - }; - - terrainDataForSrg.m_uvMax = { - ((xPatch + GridMeters) - terrainBounds.GetMin().GetX()) / terrainBounds.GetXExtent(), - ((yPatch + GridMeters) - terrainBounds.GetMin().GetY()) / terrainBounds.GetYExtent() - }; - - terrainDataForSrg.m_uvStep = uvStep; - - AZ::Transform transform = m_areaData.m_transform; - transform.SetTranslation(xPatch, yPatch, m_areaData.m_transform.GetTranslation().GetZ()); - - terrainDataForSrg.m_sampleSpacing = m_areaData.m_sampleSpacing; - terrainDataForSrg.m_heightScale = terrainBounds.GetZExtent(); - - sectorData.m_srg->SetConstant(m_terrainDataIndex, terrainDataForSrg); - - AZStd::array macroMaterialData; - - uint32_t i = 0; - for (; i < sectorData.m_macroMaterials.size(); ++i) - { - const MacroMaterialData& materialData = m_macroMaterials.GetData(sectorData.m_macroMaterials.at(i)); - ShaderMacroMaterialData& shaderData = macroMaterialData.at(i); - const AZ::Aabb& materialBounds = materialData.m_bounds; - - // Use reverse coordinates (1 - y) for the y direction so that the lower left corner of the macro material images - // map to the lower left corner in world space. This will match up with the height uv coordinate mapping. - shaderData.m_uvMin = { - (xPatch - materialBounds.GetMin().GetX()) / materialBounds.GetXExtent(), - 1.0f - ((yPatch - materialBounds.GetMin().GetY()) / materialBounds.GetYExtent()) - }; - shaderData.m_uvMax = { - ((xPatch + GridMeters) - materialBounds.GetMin().GetX()) / materialBounds.GetXExtent(), - 1.0f - (((yPatch + GridMeters) - materialBounds.GetMin().GetY()) / materialBounds.GetYExtent()) - }; - shaderData.m_normalFactor = materialData.m_normalFactor; - shaderData.m_flipNormalX = materialData.m_normalFlipX; - shaderData.m_flipNormalY = materialData.m_normalFlipY; - - const AZ::RHI::ImageView* colorImageView = materialData.m_colorImage ? materialData.m_colorImage->GetImageView() : nullptr; - sectorData.m_srg->SetImageView(m_macroColorMapIndex, colorImageView, i); - - const AZ::RHI::ImageView* normalImageView = materialData.m_normalImage ? materialData.m_normalImage->GetImageView() : nullptr; - sectorData.m_srg->SetImageView(m_macroNormalMapIndex, normalImageView, i); - - // set flags for which images are used. - shaderData.m_mapsInUse = (colorImageView ? ColorImageUsed : 0) | (normalImageView ? NormalImageUsed : 0); - } - for (; i < sectorData.m_macroMaterials.capacity(); ++i) - { - sectorData.m_srg->SetImageView(m_macroColorMapIndex, nullptr, i); - sectorData.m_srg->SetImageView(m_macroNormalMapIndex, nullptr, i); - } - - sectorData.m_srg->SetConstantArray(m_macroMaterialDataIndex, macroMaterialData); - sectorData.m_srg->SetConstant(m_macroMaterialCountIndex, aznumeric_cast(sectorData.m_macroMaterials.size())); - - const AZ::Matrix3x4 matrix3x4 = AZ::Matrix3x4::CreateFromTransform(transform); - sectorData.m_srg->SetConstant(m_modelToWorldIndex, matrix3x4); - - sectorData.m_srg->Compile(); + m_macroMaterialManager.Update(m_terrainSrg); } + + if (m_detailMaterialManager.IsInitialized()) + { + m_detailMaterialManager.Update(cameraPosition, m_terrainSrg); + } + } + + if (m_heightmapNeedsUpdate) + { + UpdateHeightmapImage(); + m_heightmapNeedsUpdate = false; + } + + if (m_imageArrayHandler->IsInitialized()) + { + bool result [[maybe_unused]] = m_imageArrayHandler->UpdateSrg(m_terrainSrg); + AZ_Error(TerrainFPName, result, "Failed to set image view unbounded array into shader resource group."); } } - - for (auto& sectorData : m_sectorData) + + if (m_meshManager.IsInitialized()) { - uint8_t lodChoice = AZ::RPI::ModelLodAsset::LodCountMax; + m_meshManager.DrawMeshes(process); + } - // Go through all cameras and choose an LOD based on the closest camera. - for (auto& view : process.m_views) - { - if ((view->GetUsageFlags() & AZ::RPI::View::UsageFlags::UsageCamera) > 0) - { - const AZ::Vector3 cameraPosition = view->GetCameraTransform().GetTranslation(); - const AZ::Vector2 cameraPositionXY = AZ::Vector2(cameraPosition.GetX(), cameraPosition.GetY()); - const AZ::Vector2 sectorCenterXY = AZ::Vector2(sectorData.m_aabb.GetCenter().GetX(), sectorData.m_aabb.GetCenter().GetY()); + if (m_heightmapImage && m_imageBindingsNeedUpdate) + { + WorldShaderData worldData; + m_terrainBounds.GetMin().StoreToFloat3(worldData.m_min.data()); + m_terrainBounds.GetMax().StoreToFloat3(worldData.m_max.data()); - const float sectorDistance = sectorCenterXY.GetDistance(cameraPositionXY); + m_imageBindingsNeedUpdate = false; - // This will be configurable later - const float minDistanceForLod0 = (GridMeters * 4.0f); - - // For every distance doubling beyond a minDistanceForLod0, we only need half the mesh density. Each LOD - // is exactly half the resolution of the last. - const float lodForCamera = floorf(AZ::GetMax(0.0f, log2f(sectorDistance / minDistanceForLod0))); - - // All cameras should render the same LOD so effects like shadows are consistent. - lodChoice = AZ::GetMin(lodChoice, aznumeric_cast(lodForCamera)); - } - } - - // Add the correct LOD draw packet for visible sectors. - for (auto& view : process.m_views) - { - AZ::Frustum viewFrustum = AZ::Frustum::CreateFromMatrixColumnMajor(view->GetWorldToClipMatrix()); - if (viewFrustum.IntersectAabb(sectorData.m_aabb) != AZ::IntersectResult::Exterior) - { - const uint8_t lodToRender = AZ::GetMin(lodChoice, aznumeric_cast(sectorData.m_drawPackets.size() - 1)); - view->AddDrawPacket(sectorData.m_drawPackets.at(lodToRender).GetRHIDrawPacket()); - } - } + auto sceneSrg = GetParentScene()->GetShaderResourceGroup(); + sceneSrg->SetImage(m_heightmapPropertyIndex, m_heightmapImage); + sceneSrg->SetConstant(m_worldDataIndex, worldData); } if (m_materialInstance) { m_materialInstance->Compile(); } - } - void TerrainFeatureProcessor::InitializeTerrainPatch(uint16_t gridSize, float gridSpacing, PatchData& patchdata) - { - patchdata.m_positions.clear(); - patchdata.m_uvs.clear(); - patchdata.m_indices.clear(); - - const uint16_t gridVertices = gridSize + 1; // For m_gridSize quads, (m_gridSize + 1) vertices are needed. - const size_t size = gridVertices * gridVertices; - - patchdata.m_positions.reserve(size); - patchdata.m_uvs.reserve(size); - - for (uint16_t y = 0; y < gridVertices; ++y) + if (m_terrainSrg && m_forwardPass) { - for (uint16_t x = 0; x < gridVertices; ++x) - { - patchdata.m_positions.push_back({ aznumeric_cast(x) * gridSpacing, aznumeric_cast(y) * gridSpacing }); - patchdata.m_uvs.push_back({ aznumeric_cast(x) / gridSize, aznumeric_cast(y) / gridSize }); - } - } - - patchdata.m_indices.reserve(gridSize * gridSize * 6); // total number of quads, 2 triangles with 6 indices per quad. - - for (uint16_t y = 0; y < gridSize; ++y) - { - for (uint16_t x = 0; x < gridSize; ++x) - { - const uint16_t topLeft = y * gridVertices + x; - const uint16_t topRight = topLeft + 1; - const uint16_t bottomLeft = (y + 1) * gridVertices + x; - const uint16_t bottomRight = bottomLeft + 1; - - patchdata.m_indices.emplace_back(topLeft); - patchdata.m_indices.emplace_back(topRight); - patchdata.m_indices.emplace_back(bottomLeft); - patchdata.m_indices.emplace_back(bottomLeft); - patchdata.m_indices.emplace_back(topRight); - patchdata.m_indices.emplace_back(bottomRight); - } + m_terrainSrg->Compile(); + m_forwardPass->BindSrg(m_terrainSrg->GetRHIShaderResourceGroup()); } } - - AZ::Outcome> TerrainFeatureProcessor::CreateBufferAsset( - const void* data, const AZ::RHI::BufferViewDescriptor& bufferViewDescriptor, const AZStd::string& bufferName) - { - AZ::RPI::BufferAssetCreator creator; - creator.Begin(AZ::Uuid::CreateRandom()); - AZ::RHI::BufferDescriptor bufferDescriptor; - bufferDescriptor.m_bindFlags = AZ::RHI::BufferBindFlags::InputAssembly | AZ::RHI::BufferBindFlags::ShaderRead; - bufferDescriptor.m_byteCount = static_cast(bufferViewDescriptor.m_elementSize) * static_cast(bufferViewDescriptor.m_elementCount); - - creator.SetBuffer(data, bufferDescriptor.m_byteCount, bufferDescriptor); - creator.SetBufferViewDescriptor(bufferViewDescriptor); - creator.SetUseCommonPool(AZ::RPI::CommonBufferPoolType::StaticInputAssembly); - - AZ::Data::Asset bufferAsset; - if (creator.End(bufferAsset)) - { - bufferAsset.SetHint(bufferName); - return AZ::Success(bufferAsset); - } - - return AZ::Failure(); - } - - bool TerrainFeatureProcessor::InitializePatchModel() - { - AZ::RPI::ModelAssetCreator modelAssetCreator; - modelAssetCreator.Begin(AZ::Uuid::CreateRandom()); - - uint16_t gridSize = GridSize; - float gridSpacing = GridSpacing; - - for (uint32_t i = 0; i < AZ::RPI::ModelLodAsset::LodCountMax && gridSize > 0; ++i) - { - PatchData patchData; - InitializeTerrainPatch(gridSize, gridSpacing, patchData); - - const auto positionBufferViewDesc = AZ::RHI::BufferViewDescriptor::CreateTyped(0, aznumeric_cast(patchData.m_positions.size()), AZ::RHI::Format::R32G32_FLOAT); - const auto positionsOutcome = CreateBufferAsset(patchData.m_positions.data(), positionBufferViewDesc, "TerrainPatchPositions"); - - const auto uvBufferViewDesc = AZ::RHI::BufferViewDescriptor::CreateTyped(0, aznumeric_cast(patchData.m_uvs.size()), AZ::RHI::Format::R32G32_FLOAT); - const auto uvsOutcome = CreateBufferAsset(patchData.m_uvs.data(), uvBufferViewDesc, "TerrainPatchUvs"); - - const auto indexBufferViewDesc = AZ::RHI::BufferViewDescriptor::CreateTyped(0, aznumeric_cast(patchData.m_indices.size()), AZ::RHI::Format::R16_UINT); - const auto indicesOutcome = CreateBufferAsset(patchData.m_indices.data(), indexBufferViewDesc, "TerrainPatchIndices"); - - if (!positionsOutcome.IsSuccess() || !uvsOutcome.IsSuccess() || !indicesOutcome.IsSuccess()) - { - AZ_Error(TerrainFPName, false, "Failed to create GPU buffers for Terrain"); - return false; - } - - AZ::RPI::ModelLodAssetCreator modelLodAssetCreator; - modelLodAssetCreator.Begin(AZ::Uuid::CreateRandom()); - - modelLodAssetCreator.BeginMesh(); - modelLodAssetCreator.AddMeshStreamBuffer(AZ::RHI::ShaderSemantic{ "POSITION" }, AZ::Name(), {positionsOutcome.GetValue(), positionBufferViewDesc}); - modelLodAssetCreator.AddMeshStreamBuffer(AZ::RHI::ShaderSemantic{ "UV" }, AZ::Name(), {uvsOutcome.GetValue(), uvBufferViewDesc}); - modelLodAssetCreator.SetMeshIndexBuffer({indicesOutcome.GetValue(), indexBufferViewDesc}); - - AZ::Aabb aabb = AZ::Aabb::CreateFromMinMax(AZ::Vector3(0.0, 0.0, 0.0), AZ::Vector3(GridMeters, GridMeters, 0.0)); - modelLodAssetCreator.SetMeshAabb(AZStd::move(aabb)); - modelLodAssetCreator.SetMeshName(AZ::Name("Terrain Patch")); - modelLodAssetCreator.EndMesh(); - - AZ::Data::Asset modelLodAsset; - modelLodAssetCreator.End(modelLodAsset); - - modelAssetCreator.AddLodAsset(AZStd::move(modelLodAsset)); - - gridSize = gridSize / 2; - gridSpacing *= 2.0f; - } - - AZ::Data::Asset modelAsset; - bool success = modelAssetCreator.End(modelAsset); - - m_patchModel = AZ::RPI::Model::FindOrCreate(modelAsset); - - return success; - } - void TerrainFeatureProcessor::OnMaterialReinitialized([[maybe_unused]] const MaterialInstance& material) { - for (auto& sectorData : m_sectorData) - { - for (auto& drawPacket : sectorData.m_drawPackets) - { - drawPacket.Update(*GetParentScene()); - } - } + PrepareMaterialData(); + m_forceRebuildDrawPackets = true; + m_imageBindingsNeedUpdate = true; } void TerrainFeatureProcessor::SetWorldSize([[maybe_unused]] AZ::Vector2 sizeInMeters) @@ -1383,115 +424,26 @@ namespace Terrain // larger but this will limit how much is rendered. } - template - T* TerrainFeatureProcessor::FindByEntityId(AZ::EntityId entityId, AZ::Render::IndexedDataVector& container) + void TerrainFeatureProcessor::CacheForwardPass() { - for (T& data : container.GetDataVector()) - { - if (data.m_entityId == entityId) + auto rasterPassFilter = AZ::RPI::PassFilter::CreateWithPassClass(); + rasterPassFilter.SetOwnerScene(GetParentScene()); + AZ::RHI::RHISystemInterface* rhiSystem = AZ::RHI::RHISystemInterface::Get(); + AZ::RHI::DrawListTag forwardTag = rhiSystem->GetDrawListTagRegistry()->AcquireTag(AZ::Name("forward")); + AZ::RPI::PassSystemInterface::Get()->ForEachPass(rasterPassFilter, + [&](AZ::RPI::Pass* pass) -> AZ::RPI::PassFilterExecutionFlow { - return &data; + auto* rasterPass = azrtti_cast(pass); + + if (rasterPass && rasterPass->GetDrawListTag() == forwardTag) + { + m_forwardPass = rasterPass; + return AZ::RPI::PassFilterExecutionFlow::StopVisitingPasses; + } + return AZ::RPI::PassFilterExecutionFlow::ContinueVisitingPasses; } - } - return nullptr; + ); } - template - T& TerrainFeatureProcessor::FindOrCreateByEntityId(AZ::EntityId entityId, AZ::Render::IndexedDataVector& container) - { - T* dataPtr = FindByEntityId(entityId, container); - if (dataPtr != nullptr) - { - return *dataPtr; - } - - const uint16_t slotId = container.GetFreeSlotIndex(); - AZ_Assert(slotId != AZ::Render::IndexedDataVector::NoFreeSlot, "Ran out of indices"); - - T& data = container.GetData(slotId); - data.m_entityId = entityId; - return data; - } - - template - void TerrainFeatureProcessor::RemoveByEntityId(AZ::EntityId entityId, AZ::Render::IndexedDataVector& container) - { - for (T& data : container.GetDataVector()) - { - if (data.m_entityId == entityId) - { - container.RemoveData(&data); - return; - } - } - AZ_Assert(false, "Entity Id not found in container.") - } - - template - void TerrainFeatureProcessor::ForOverlappingSectors(const AZ::Aabb& bounds, Callback callback) - { - for (SectorData& sectorData : m_sectorData) - { - if (sectorData.m_aabb.Overlaps(bounds)) - { - callback(sectorData); - } - } - } - - auto TerrainFeatureProcessor::Vector2i::operator+(const Vector2i& rhs) const -> Vector2i - { - Vector2i offsetPoint = *this; - offsetPoint += rhs; - return offsetPoint; - } - - auto TerrainFeatureProcessor::Vector2i::operator+=(const Vector2i& rhs) -> Vector2i& - { - m_x += rhs.m_x; - m_y += rhs.m_y; - return *this; - } - - auto TerrainFeatureProcessor::Vector2i::operator-(const Vector2i& rhs) const -> Vector2i - { - return *this + -rhs; - } - - auto TerrainFeatureProcessor::Vector2i::operator-=(const Vector2i& rhs) -> Vector2i& - { - return *this += -rhs; - } - - auto TerrainFeatureProcessor::Vector2i::operator-() const -> Vector2i - { - return {-m_x, -m_y}; - } - - auto TerrainFeatureProcessor::Aabb2i::operator+(const Vector2i& rhs) const -> Aabb2i - { - return { m_min + rhs, m_max + rhs }; - } - - auto TerrainFeatureProcessor::Aabb2i::operator-(const Vector2i& rhs) const -> Aabb2i - { - return *this + -rhs; - } - - auto TerrainFeatureProcessor::Aabb2i::GetClamped(Aabb2i rhs) const -> Aabb2i - { - Aabb2i ret; - ret.m_min.m_x = AZ::GetMax(m_min.m_x, rhs.m_min.m_x); - ret.m_min.m_y = AZ::GetMax(m_min.m_y, rhs.m_min.m_y); - ret.m_max.m_x = AZ::GetMin(m_max.m_x, rhs.m_max.m_x); - ret.m_max.m_y = AZ::GetMin(m_max.m_y, rhs.m_max.m_y); - return ret; - } - - bool TerrainFeatureProcessor::Aabb2i::IsValid() const - { - // Intentionally strict, equal min/max not valid. - return m_min.m_x < m_max.m_x && m_min.m_y < m_max.m_y; - } } diff --git a/Gems/Terrain/Code/Source/TerrainRenderer/TerrainFeatureProcessor.h b/Gems/Terrain/Code/Source/TerrainRenderer/TerrainFeatureProcessor.h index 9b66881ec6..016c0d478a 100644 --- a/Gems/Terrain/Code/Source/TerrainRenderer/TerrainFeatureProcessor.h +++ b/Gems/Terrain/Code/Source/TerrainRenderer/TerrainFeatureProcessor.h @@ -8,18 +8,17 @@ #pragma once -#include - #include -#include -#include + +#include +#include +#include +#include #include #include -#include #include #include -#include namespace AZ::RPI { @@ -28,8 +27,7 @@ namespace AZ::RPI class AsyncAssetLoader; } class Material; - class Model; - class StreamingImage; + class RenderPass; } namespace Terrain @@ -38,8 +36,6 @@ namespace Terrain : public AZ::RPI::FeatureProcessor , private AZ::RPI::MaterialReloadNotificationBus::Handler , private AzFramework::Terrain::TerrainDataNotificationBus::Handler - , private TerrainMacroMaterialNotificationBus::Handler - , private TerrainAreaMaterialNotificationBus::Handler { public: AZ_RTTI(TerrainFeatureProcessor, "{D7DAC1F9-4A9F-4D3C-80AE-99579BF8AB1C}", AZ::RPI::FeatureProcessor); @@ -59,163 +55,16 @@ namespace Terrain void SetWorldSize(AZ::Vector2 sizeInMeters); private: - + + static constexpr auto InvalidImageIndex = AZ::Render::BindlessImageArrayHandler::InvalidImageIndex; using MaterialInstance = AZ::Data::Instance; - static constexpr uint32_t MaxMaterialsPerSector = 4; - - enum MacroMaterialFlags - { - ColorImageUsed = 0b01, - NormalImageUsed = 0b10, - }; - - struct ShaderTerrainData // Must align with struct in Object Srg - { - AZStd::array m_uvMin{ 0.0f, 0.0f }; - AZStd::array m_uvMax{ 1.0f, 1.0f }; - AZStd::array m_uvStep{ 1.0f, 1.0f }; - float m_sampleSpacing{ 1.0f }; - float m_heightScale{ 1.0f }; - }; - - struct ShaderMacroMaterialData // Must align with struct in Object Srg - { - AZStd::array m_uvMin{ 0.0f, 0.0f }; - AZStd::array m_uvMax{ 1.0f, 1.0f }; - float m_normalFactor{ 0.0f }; - uint32_t m_flipNormalX{ 0 }; // bool in shader - uint32_t m_flipNormalY{ 0 }; // bool in shader - uint32_t m_mapsInUse{ 0b00 }; // 0b01 = color, 0b10 = normal - }; - - struct VertexPosition - { - float m_posx; - float m_posy; - }; - - struct VertexUv - { - float m_u; - float m_v; - }; - - struct PatchData - { - AZStd::vector m_positions; - AZStd::vector m_uvs; - AZStd::vector m_indices; - }; - struct SectorData + struct WorldShaderData { - AZ::Data::Instance m_srg; // Hold on to ref so it's not dropped - AZ::Aabb m_aabb; - AZStd::fixed_vector m_drawPackets; - AZStd::fixed_vector m_macroMaterials; - }; - - enum DetailTextureFlags : uint32_t - { - UseTextureBaseColor = 0b0000'0000'0000'0000'0000'0000'0000'0001, - UseTextureNormal = 0b0000'0000'0000'0000'0000'0000'0000'0010, - UseTextureMetallic = 0b0000'0000'0000'0000'0000'0000'0000'0100, - UseTextureRoughness = 0b0000'0000'0000'0000'0000'0000'0000'1000, - UseTextureOcclusion = 0b0000'0000'0000'0000'0000'0000'0001'0000, - UseTextureHeight = 0b0000'0000'0000'0000'0000'0000'0010'0000, - UseTextureSpecularF0 = 0b0000'0000'0000'0000'0000'0000'0100'0000, - - FlipNormalX = 0b0000'0000'0000'0000'0000'0000'1000'0000, - FlipNormalY = 0b0000'0000'0000'0000'0000'0001'0000'0000, - - BlendModeMask = 0b0000'0000'0000'0000'0000'0110'0000'0000, - BlendModeLerp = 0b0000'0000'0000'0000'0000'0000'0000'0000, - BlendModeLinearLight = 0b0000'0000'0000'0000'0000'0010'0000'0000, - BlendModeMultiply = 0b0000'0000'0000'0000'0000'0100'0000'0000, - BlendModeOverlay = 0b0000'0000'0000'0000'0000'0110'0000'0000, - }; - - struct DetailMaterialShaderProperties - { - // Uv - AZStd::array m_uvTransform - { - 1.0, 0.0, 0.0, 0.0, - 0.0, 1.0, 0.0, 0.0, - 0.0, 0.0, 1.0, 0.0, - }; - - // Factor / Scale / Bias for input textures - float m_baseColorFactor{ 1.0f }; - float m_normalFactor{ 1.0f }; - float m_metalFactor{ 1.0f }; - float m_roughnessScale{ 1.0f }; - - float m_roughnessBias{ 0.0f }; - float m_specularF0Factor{ 1.0f }; - float m_occlusionFactor{ 1.0f }; - float m_heightFactor{ 1.0f }; - - float m_heightOffset{ 0.0f }; - float m_heightBlendFactor{ 0.5f }; - - // Flags - DetailTextureFlags m_flags{ 0 }; - - float m_padding; // 16 byte aligned - }; - - struct DetailMaterialData - { - AZ::Data::AssetId m_assetId; - AZ::RPI::Material::ChangeId m_materialChangeId{AZ::RPI::Material::DEFAULT_CHANGE_ID}; - - AZ::Data::Instance m_colorImage; - AZ::Data::Instance m_normalImage; - AZ::Data::Instance m_roughnessImage; - AZ::Data::Instance m_metalnessImage; - AZ::Data::Instance m_specularF0Image; - AZ::Data::Instance m_occlusionImage; - AZ::Data::Instance m_heightImage; - - DetailMaterialShaderProperties m_properties; // maps directly to shader - }; - - struct DetailMaterialSurface - { - AZ::Crc32 m_surfaceTag; - uint16_t m_detailMaterialId; - }; - - struct DetailMaterialListRegion - { - AZ::EntityId m_entityId; - AZ::Aabb m_region{AZ::Aabb::CreateNull()}; - AZStd::vector m_materialsForSurfaces; - }; - - struct Vector2i - { - int32_t m_x{ 0 }; - int32_t m_y{ 0 }; - - Vector2i operator+(const Vector2i& rhs) const; - Vector2i& operator+=(const Vector2i& rhs); - Vector2i operator-(const Vector2i& rhs) const; - Vector2i& operator-=(const Vector2i& rhs); - Vector2i operator-() const; - }; - - struct Aabb2i - { - Vector2i m_min; - Vector2i m_max; - - Aabb2i operator+(const Vector2i& offset) const; - Aabb2i operator-(const Vector2i& offset) const; - - Aabb2i GetClamped(Aabb2i rhs) const; - bool IsValid() const; + AZStd::array m_min{ 0.0f, 0.0f, 0.0f }; + float padding1{ 0.0f }; + AZStd::array m_max{ 0.0f, 0.0f, 0.0f }; + float padding2{ 0.0f }; }; // AZ::RPI::MaterialReloadNotificationBus::Handler overrides... @@ -225,104 +74,46 @@ namespace Terrain void OnTerrainDataDestroyBegin() override; void OnTerrainDataChanged(const AZ::Aabb& dirtyRegion, TerrainDataChangedMask dataChangedMask) override; - // TerrainMacroMaterialNotificationBus overrides... - void OnTerrainMacroMaterialCreated(AZ::EntityId entityId, const MacroMaterialData& material) override; - void OnTerrainMacroMaterialChanged(AZ::EntityId entityId, const MacroMaterialData& material) override; - void OnTerrainMacroMaterialRegionChanged(AZ::EntityId entityId, const AZ::Aabb& oldRegion, const AZ::Aabb& newRegion) override; - void OnTerrainMacroMaterialDestroyed(AZ::EntityId entityId) override; - - // TerrainAreaMaterialNotificationBus overrides... - void OnTerrainSurfaceMaterialMappingCreated(AZ::EntityId entityId, SurfaceData::SurfaceTag surfaceTag, MaterialInstance material) override; - void OnTerrainSurfaceMaterialMappingDestroyed(AZ::EntityId entityId, SurfaceData::SurfaceTag surfaceTag) override; - void OnTerrainSurfaceMaterialMappingChanged(AZ::EntityId entityId, SurfaceData::SurfaceTag surfaceTag, MaterialInstance material) override; - void OnTerrainSurfaceMaterialMappingRegionChanged(AZ::EntityId entityId, const AZ::Aabb& oldRegion, const AZ::Aabb& newRegion) override; + // AZ::RPI::SceneNotificationBus overrides... + void OnRenderPipelinePassesChanged(AZ::RPI::RenderPipeline* renderPipeline) override; void Initialize(); - void InitializeTerrainPatch(uint16_t gridSize, float gridSpacing, PatchData& patchdata); - bool InitializePatchModel(); - void UpdateTerrainData(); + void UpdateHeightmapImage(); void PrepareMaterialData(); - void UpdateMacroMaterialData(MacroMaterialData& macroMaterialData, const MacroMaterialData& newMaterialData); - - void TerrainHeightOrSettingsUpdated(const AZ::Aabb& dirtyRegion); - void TerrainSurfaceDataUpdated(const AZ::Aabb& dirtyRegion); - uint16_t CreateOrUpdateDetailMaterial(MaterialInstance material); - void UpdateDetailMaterialData(DetailMaterialData& materialData, MaterialInstance material); - void CheckUpdateDetailTexture(const Aabb2i& newBounds, const Vector2i& newCenter); - void UpdateDetailTexture(const Aabb2i& updateArea, const Aabb2i& textureBounds, const Vector2i& centerPixel); - uint16_t GetDetailMaterialForSurfaceTypeAndPosition(AZ::Crc32 surfaceType, const AZ::Vector2& position); - uint8_t CalculateUpdateRegions(const Aabb2i& updateArea, const Aabb2i& textureBounds, const Vector2i& centerPixel, - AZStd::array& textureSpaceAreas, AZStd::array& scaledWorldSpaceAreas); + void TerrainHeightOrSettingsUpdated(const AZ::Aabb& dirtyRegion); void ProcessSurfaces(const FeatureProcessor::RenderPacket& process); - template - T* FindByEntityId(AZ::EntityId entityId, AZ::Render::IndexedDataVector& container); - template - T& FindOrCreateByEntityId(AZ::EntityId entityId, AZ::Render::IndexedDataVector& container); - template - void RemoveByEntityId(AZ::EntityId entityId, AZ::Render::IndexedDataVector& container); + void CacheForwardPass(); - template - void ForOverlappingSectors(const AZ::Aabb& bounds, Callback callback); + TerrainMeshManager m_meshManager; + TerrainMacroMaterialManager m_macroMaterialManager; + TerrainDetailMaterialManager m_detailMaterialManager; - AZ::Outcome> CreateBufferAsset( - const void* data, const AZ::RHI::BufferViewDescriptor& bufferViewDescriptor, const AZStd::string& bufferName); - - // System-level parameters - static constexpr float GridSpacing{ 1.0f }; - static constexpr int32_t GridSize{ 64 }; // number of terrain quads (vertices are m_gridSize + 1) - static constexpr float GridMeters{ GridSpacing * GridSize }; - static constexpr int32_t DetailTextureSize{ 1024 }; - static constexpr int32_t DetailTextureSizeHalf{ DetailTextureSize / 2 }; - static constexpr float DetailTextureScale{ 0.5f }; + AZStd::shared_ptr m_imageArrayHandler; AZStd::unique_ptr m_materialAssetLoader; MaterialInstance m_materialInstance; - AZ::RHI::ShaderInputConstantIndex m_modelToWorldIndex; - AZ::RHI::ShaderInputConstantIndex m_terrainDataIndex; - AZ::RHI::ShaderInputConstantIndex m_macroMaterialDataIndex; - AZ::RHI::ShaderInputConstantIndex m_macroMaterialCountIndex; - AZ::RHI::ShaderInputImageIndex m_macroColorMapIndex; - AZ::RHI::ShaderInputImageIndex m_macroNormalMapIndex; - AZ::RPI::MaterialPropertyIndex m_heightmapPropertyIndex; - AZ::RPI::MaterialPropertyIndex m_detailMaterialIdPropertyIndex; - AZ::RPI::MaterialPropertyIndex m_detailCenterPropertyIndex; - AZ::RPI::MaterialPropertyIndex m_detailAabbPropertyIndex; - AZ::RPI::MaterialPropertyIndex m_detailHalfPixelUvPropertyIndex; + AZ::Data::Instance m_terrainSrg; + AZ::Data::Instance m_heightmapImage; - AZ::Data::Instance m_patchModel; - AZ::Vector3 m_previousCameraPosition = AZ::Vector3(AZStd::numeric_limits::max(), 0.0, 0.0); + AZ::RHI::ShaderInputImageIndex m_heightmapPropertyIndex; + AZ::RHI::ShaderInputConstantIndex m_worldDataIndex; - // Per-area data - struct TerrainAreaData - { - AZ::Transform m_transform{ AZ::Transform::CreateIdentity() }; - AZ::Aabb m_terrainBounds{ AZ::Aabb::CreateNull() }; - AZ::Data::Instance m_heightmapImage; - float m_sampleSpacing{ 0.0f }; - bool m_heightmapUpdated{ true }; - bool m_macroMaterialsUpdated{ true }; - bool m_rebuildSectors{ true }; - }; - - TerrainAreaData m_areaData; + AZ::Aabb m_terrainBounds{ AZ::Aabb::CreateNull() }; AZ::Aabb m_dirtyRegion{ AZ::Aabb::CreateNull() }; - AZ::Aabb m_dirtyDetailRegion{ AZ::Aabb::CreateNull() }; + + float m_sampleSpacing{ 0.0f }; + + bool m_heightmapNeedsUpdate{ false }; + bool m_forceRebuildDrawPackets{ false }; + bool m_imageBindingsNeedUpdate{ false }; - Aabb2i m_detailTextureBounds; - Vector2i m_detailTextureCenter; - AZ::Data::Instance m_detailTextureImage; AZ::RPI::ShaderSystemInterface::GlobalShaderOptionUpdatedEvent::Handler m_handleGlobalShaderOptionUpdate; - bool m_forceRebuildDrawPackets = false; - AZStd::vector m_sectorData; - - AZ::Render::IndexedDataVector m_macroMaterials; - AZ::Render::IndexedDataVector m_detailMaterials; - AZ::Render::IndexedDataVector m_detailMaterialRegions; + AZ::RPI::RenderPass* m_forwardPass; }; } diff --git a/Gems/Terrain/Code/Source/TerrainRenderer/TerrainMacroMaterialBus.cpp b/Gems/Terrain/Code/Source/TerrainRenderer/TerrainMacroMaterialBus.cpp new file mode 100644 index 0000000000..7f84874e63 --- /dev/null +++ b/Gems/Terrain/Code/Source/TerrainRenderer/TerrainMacroMaterialBus.cpp @@ -0,0 +1,112 @@ +/* + * Copyright (c) Contributors to the Open 3D Engine Project. + * For complete copyright and license terms please see the LICENSE at the root of this distribution. + * + * SPDX-License-Identifier: Apache-2.0 OR MIT + * + */ + +#include "TerrainMacroMaterialBus.h" +#include +#include + +namespace Terrain +{ + // Create a handler that can be accessed from Python scripts to receive terrain change notifications. + class TerrainMacroMaterialNotificationHandler final + : public Terrain::TerrainMacroMaterialNotificationBus::Handler + , public AZ::BehaviorEBusHandler + { + public: + AZ_EBUS_BEHAVIOR_BINDER( + TerrainMacroMaterialNotificationHandler, + "{B0ED8B29-0E0D-4567-BEAF-C842C4DB2700}", + AZ::SystemAllocator, + OnTerrainMacroMaterialCreated, + OnTerrainMacroMaterialChanged, + OnTerrainMacroMaterialRegionChanged, + OnTerrainMacroMaterialDestroyed); + + void OnTerrainMacroMaterialCreated( + [[maybe_unused]] AZ::EntityId macroMaterialEntity, + [[maybe_unused]] const Terrain::MacroMaterialData& macroMaterial) override + { + Call(FN_OnTerrainMacroMaterialCreated); + } + + void OnTerrainMacroMaterialChanged( + [[maybe_unused]] AZ::EntityId macroMaterialEntity, + [[maybe_unused]] const Terrain::MacroMaterialData& macroMaterial) override + { + Call(FN_OnTerrainMacroMaterialChanged); + } + + void OnTerrainMacroMaterialRegionChanged( + [[maybe_unused]] AZ::EntityId macroMaterialEntity, + [[maybe_unused]] const AZ::Aabb& oldRegion, + [[maybe_unused]] const AZ::Aabb& newRegion) override + { + Call(FN_OnTerrainMacroMaterialRegionChanged); + } + + void OnTerrainMacroMaterialDestroyed([[maybe_unused]] AZ::EntityId macroMaterialEntity) override + { + Call(FN_OnTerrainMacroMaterialDestroyed); + } + + static void Reflect(AZ::ReflectContext* context) + { + if (AZ::BehaviorContext* behaviorContext = azrtti_cast(context)) + { + behaviorContext->EBus("TerrainMacroMaterialAutomationBus") + ->Attribute(AZ::Script::Attributes::Scope, AZ::Script::Attributes::ScopeFlags::Automation) + ->Attribute(AZ::Script::Attributes::Module, "terrain") + ->Handler(); + } + } + }; + + void MacroMaterialData::Reflect(AZ::ReflectContext* context) + { + if (AZ::BehaviorContext* behaviorContext = azrtti_cast(context)) + { + behaviorContext->Class() + ->Attribute(AZ::Script::Attributes::Scope, AZ::Script::Attributes::ScopeFlags::Common) + ->Attribute(AZ::Script::Attributes::Category, "Terrain") + ->Attribute(AZ::Script::Attributes::Module, "terrain") + ->Property("EntityId", BehaviorValueProperty(&MacroMaterialData::m_entityId)) + ->Property("Bounds", BehaviorValueProperty(&MacroMaterialData::m_bounds)) + ->Property("NormalFlipX", BehaviorValueProperty(&MacroMaterialData::m_normalFlipX)) + ->Property("NormalFlipY", BehaviorValueProperty(&MacroMaterialData::m_normalFlipY)) + ->Property("NormalFactor", BehaviorValueProperty(&MacroMaterialData::m_normalFactor)) + ; + } + } + + void TerrainMacroMaterialRequests::Reflect(AZ::ReflectContext* context) + { + MacroMaterialData::Reflect(context); + + if (AZ::BehaviorContext* behaviorContext = azrtti_cast(context)) + { + behaviorContext->EBus("TerrainMacroMaterialRequestBus") + ->Attribute(AZ::Script::Attributes::Scope, AZ::Script::Attributes::ScopeFlags::Common) + ->Attribute(AZ::Script::Attributes::Category, "Terrain") + ->Attribute(AZ::Script::Attributes::Module, "terrain") + ->Event("GetTerrainMacroMaterialData", &Terrain::TerrainMacroMaterialRequestBus::Events::GetTerrainMacroMaterialData) + ; + + behaviorContext->EBus("TerrainMacroMaterialNotificationBus") + ->Attribute(AZ::Script::Attributes::Scope, AZ::Script::Attributes::ScopeFlags::Common) + ->Attribute(AZ::Script::Attributes::Category, "Terrain") + ->Attribute(AZ::Script::Attributes::Module, "terrain") + ->Event("OnTerrainMacroMaterialCreated", &Terrain::TerrainMacroMaterialNotifications::OnTerrainMacroMaterialCreated) + ->Event("OnTerrainMacroMaterialChanged", &Terrain::TerrainMacroMaterialNotifications::OnTerrainMacroMaterialChanged) + ->Event("OnTerrainMacroMaterialRegionChanged", &Terrain::TerrainMacroMaterialNotifications::OnTerrainMacroMaterialRegionChanged) + ->Event("OnTerrainMacroMaterialDestroyed", &Terrain::TerrainMacroMaterialNotifications::OnTerrainMacroMaterialDestroyed) + ; + + Terrain::TerrainMacroMaterialNotificationHandler::Reflect(context); + } + } +} // namespace Terrain diff --git a/Gems/Terrain/Code/Source/TerrainRenderer/TerrainMacroMaterialBus.h b/Gems/Terrain/Code/Source/TerrainRenderer/TerrainMacroMaterialBus.h index af1e755b32..abcf4d4df0 100644 --- a/Gems/Terrain/Code/Source/TerrainRenderer/TerrainMacroMaterialBus.h +++ b/Gems/Terrain/Code/Source/TerrainRenderer/TerrainMacroMaterialBus.h @@ -16,8 +16,12 @@ namespace Terrain { - struct MacroMaterialData + struct MacroMaterialData final { + AZ_TYPE_INFO(MacroMaterialData, "{DC68E20A-3251-4E4E-8BC7-F6A2521FEF46}"); + + static void Reflect(AZ::ReflectContext* context); + AZ::EntityId m_entityId; AZ::Aabb m_bounds = AZ::Aabb::CreateNull(); @@ -35,6 +39,8 @@ namespace Terrain : public AZ::ComponentBus { public: + static void Reflect(AZ::ReflectContext* context); + //////////////////////////////////////////////////////////////////////// // EBusTraits using MutexType = AZStd::recursive_mutex; diff --git a/Gems/Terrain/Code/Source/TerrainRenderer/TerrainMacroMaterialManager.cpp b/Gems/Terrain/Code/Source/TerrainRenderer/TerrainMacroMaterialManager.cpp new file mode 100644 index 0000000000..82349cdcdb --- /dev/null +++ b/Gems/Terrain/Code/Source/TerrainRenderer/TerrainMacroMaterialManager.cpp @@ -0,0 +1,412 @@ +/* + * Copyright (c) Contributors to the Open 3D Engine Project. + * For complete copyright and license terms please see the LICENSE at the root of this distribution. + * + * SPDX-License-Identifier: Apache-2.0 OR MIT + * + */ + +#include + +namespace Terrain +{ + namespace + { + [[maybe_unused]] static const char* TerrainMacroMaterialManagerName = "TerrainMacroMaterialManager"; + } + + namespace TerrainSrgInputs + { + static const char* const MacroMaterialData("m_macroMaterialData"); + static const char* const MacroMaterialGrid("m_macroMaterialGrid"); + } + + void TerrainMacroMaterialManager::Initialize( + const AZStd::shared_ptr& bindlessImageHandler, + AZ::Data::Instance& terrainSrg) + { + AZ_Error(TerrainMacroMaterialManagerName, bindlessImageHandler, "bindlessImageHandler must not be null."); + AZ_Error(TerrainMacroMaterialManagerName, terrainSrg, "terrainSrg must not be null."); + AZ_Error(TerrainMacroMaterialManagerName, !m_isInitialized, "Already initialized."); + + if (!bindlessImageHandler || !terrainSrg || m_isInitialized) + { + return; + } + + if (UpdateSrgIndices(terrainSrg)) + { + m_bindlessImageHandler = bindlessImageHandler; + + OnTerrainDataChanged(AZ::Aabb::CreateNull(), TerrainDataChangedMask::Settings); + AzFramework::Terrain::TerrainDataNotificationBus::Handler::BusConnect(); + TerrainMacroMaterialNotificationBus::Handler::BusConnect(); + + m_terrainSizeChanged = true; + m_isInitialized = true; + } + } + + void TerrainMacroMaterialManager::Reset() + { + m_isInitialized = false; + + m_macroMaterialDataBuffer = {}; + + m_macroMaterialShaderData.clear(); + m_macroMaterialEntities.clear(); + + RemoveAllImages(); + m_macroMaterials.clear(); + + m_bindlessImageHandler = {}; + + AzFramework::Terrain::TerrainDataNotificationBus::Handler::BusDisconnect(); + TerrainMacroMaterialNotificationBus::Handler::BusDisconnect(); + } + + bool TerrainMacroMaterialManager::IsInitialized() + { + return m_isInitialized; + } + + bool TerrainMacroMaterialManager::UpdateSrgIndices(AZ::Data::Instance& terrainSrg) + { + const AZ::RHI::ShaderResourceGroupLayout* terrainSrgLayout = terrainSrg->GetLayout(); + + m_macroMaterialGridIndex = terrainSrgLayout->FindShaderInputConstantIndex(AZ::Name(TerrainSrgInputs::MacroMaterialGrid)); + AZ_Error(TerrainMacroMaterialManagerName, m_macroMaterialGridIndex.IsValid(), "Failed to find terrain srg input constant %s.", TerrainSrgInputs::MacroMaterialGrid); + + AZ::Render::GpuBufferHandler::Descriptor desc; + + // Set up the gpu buffer for macro material data + desc.m_bufferName = "Macro Material Data"; + desc.m_bufferSrgName = TerrainSrgInputs::MacroMaterialData; + desc.m_elementSize = sizeof(MacroMaterialShaderData); + desc.m_srgLayout = terrainSrgLayout; + m_macroMaterialDataBuffer = AZ::Render::GpuBufferHandler(desc); + + m_bufferNeedsUpdate = true; + + return m_macroMaterialDataBuffer.IsValid() && m_macroMaterialGridIndex.IsValid(); + } + + void TerrainMacroMaterialManager::OnTerrainDataChanged(const AZ::Aabb& dirtyRegion [[maybe_unused]], TerrainDataChangedMask dataChangedMask) + { + if ((dataChangedMask & TerrainDataChangedMask::Settings) != 0) + { + AZ::Aabb worldBounds = AZ::Aabb::CreateNull(); + AzFramework::Terrain::TerrainDataRequestBus::BroadcastResult( + worldBounds, &AzFramework::Terrain::TerrainDataRequests::GetTerrainAabb); + + m_terrainSizeChanged = m_terrainSizeChanged || m_terrainBounds != worldBounds; + m_terrainBounds = worldBounds; + } + } + + void TerrainMacroMaterialManager::OnTerrainMacroMaterialCreated(AZ::EntityId entityId, const MacroMaterialData& newMaterialData) + { + AZ_Assert(!m_macroMaterials.contains(entityId), + "OnTerrainMacroMaterialCreated called for a macro material that already exists. This indicates that either the bus is incorrectly sending out " + "OnCreated announcements for existing materials, or the terrain feature processor isn't properly cleaning up macro materials."); + + MacroMaterial& macroMaterial = m_macroMaterials[entityId]; + macroMaterial.m_data = newMaterialData; + if (newMaterialData.m_colorImage) + { + macroMaterial.m_colorIndex = m_bindlessImageHandler->AppendBindlessImage(newMaterialData.m_colorImage->GetImageView()); + } + if (newMaterialData.m_normalImage) + { + macroMaterial.m_normalIndex = m_bindlessImageHandler->AppendBindlessImage(newMaterialData.m_normalImage->GetImageView()); + } + + ForMacroMaterialsInBounds(newMaterialData.m_bounds, + [&](uint16_t idx, [[maybe_unused]] const AZ::Vector2& corner) + { + for (uint16_t offset = 0; offset < MacroMaterialsPerTile; ++offset) + { + MacroMaterialShaderData& macroMaterialShaderData = m_macroMaterialShaderData.at(idx + offset); + if ((macroMaterialShaderData.m_flags & MacroMaterialShaderFlags::IsUsed) == 0) + { + UpdateMacroMaterialShaderEntry(idx + offset, macroMaterial); + break; + } + AZ_Assert(m_macroMaterialEntities.at(idx + offset) != entityId, "Found existing macro material tile for what should be a completely new macro material."); + } + } + ); + + m_bufferNeedsUpdate = true; + } + + void TerrainMacroMaterialManager::OnTerrainMacroMaterialChanged(AZ::EntityId entityId, const MacroMaterialData& newMaterialData) + { + AZ_Assert(m_macroMaterials.contains(entityId), + "OnTerrainMacroMaterialChanged called for a macro material that TerrainFeatureProcessor isn't tracking. This indicates that either the bus is sending out " + "Changed announcements for materials that haven't had a OnCreated event sent, or the terrain feature processor isn't properly tracking macro materials."); + + MacroMaterial& macroMaterial = m_macroMaterials[entityId]; + macroMaterial.m_data = newMaterialData; + + auto UpdateImageIndex = [&](uint16_t& indexRef, const AZ::Data::Instance& imageView) + { + if (indexRef) + { + if (imageView) + { + m_bindlessImageHandler->UpdateBindlessImage(indexRef, imageView->GetImageView()); + } + else + { + m_bindlessImageHandler->RemoveBindlessImage(indexRef); + indexRef = 0xFFFF; + } + } + else if (imageView) + { + indexRef = m_bindlessImageHandler->AppendBindlessImage(imageView->GetImageView()); + } + }; + + UpdateImageIndex(macroMaterial.m_colorIndex, newMaterialData.m_colorImage); + UpdateImageIndex(macroMaterial.m_normalIndex, newMaterialData.m_normalImage); + + ForMacroMaterialsInBounds(newMaterialData.m_bounds, + [&](uint16_t idx, [[maybe_unused]] const AZ::Vector2& corner) + { + for (uint16_t offset = 0; offset < MacroMaterialsPerTile; ++offset) + { + if (m_macroMaterialEntities.at(idx + offset) == entityId) + { + UpdateMacroMaterialShaderEntry(idx + offset, macroMaterial); + break; + } + } + } + ); + + m_bufferNeedsUpdate = true; + } + + void TerrainMacroMaterialManager::OnTerrainMacroMaterialRegionChanged( + AZ::EntityId entityId, [[maybe_unused]] const AZ::Aabb& oldRegion, const AZ::Aabb& newRegion) + { + AZ_Assert(m_macroMaterials.contains(entityId), + "OnTerrainMacroMaterialChanged called for a macro material that TerrainFeatureProcessor isn't tracking. This indicates that either the bus is sending out " + "Changed announcements for materials that haven't had a OnCreated event sent, or the terrain feature processor isn't properly tracking macro materials."); + + MacroMaterial& macroMaterial = m_macroMaterials[entityId]; + macroMaterial.m_data.m_bounds = newRegion; + + AZ::Aabb changedRegion = oldRegion; + changedRegion.AddAabb(newRegion); + + ForMacroMaterialsInBounds(changedRegion, + [&](uint16_t idx, const AZ::Vector2& corner) + { + AZ::Aabb tileAabb = AZ::Aabb::CreateFromMinMaxValues( + corner.GetX(), corner.GetY(), m_terrainBounds.GetMin().GetZ(), + corner.GetX() + MacroMaterialGridSize, corner.GetY() + MacroMaterialGridSize, m_terrainBounds.GetMax().GetZ()); + + bool overlapsNew = tileAabb.Overlaps(newRegion); + uint16_t end = idx + MacroMaterialsPerTile; + + for (; idx < end; ++idx) + { + if (m_macroMaterialEntities.at(idx) == entityId) + { + if (overlapsNew) + { + // Update the macro material entry from this tile. + UpdateMacroMaterialShaderEntry(idx, macroMaterial); + } + else + { + // Remove the macro material entry from this tile. + RemoveMacroMaterialShaderEntry(idx); + } + break; + } + else if (overlapsNew && (m_macroMaterialShaderData.at(idx).m_flags & MacroMaterialShaderFlags::IsUsed) == 0) + { + // Add a macro material entry from this tile. (!overlapsOld && overlapsNew) + UpdateMacroMaterialShaderEntry(idx, macroMaterial); + break; + } + } + } + ); + + m_bufferNeedsUpdate = true; + } + + void TerrainMacroMaterialManager::OnTerrainMacroMaterialDestroyed(AZ::EntityId entityId) + { + AZ_Assert(m_macroMaterials.contains(entityId), + "OnTerrainMacroMaterialChanged called for a macro material that TerrainFeatureProcessor isn't tracking. This indicates that either the bus is sending out " + "Changed announcements for materials that haven't had a OnCreated event sent, or the terrain feature processor isn't properly tracking macro materials."); + + const MacroMaterial& macroMaterial = m_macroMaterials[entityId]; + + ForMacroMaterialsInBounds(macroMaterial.m_data.m_bounds, + [&](uint16_t idx, [[maybe_unused]] const AZ::Vector2& corner) + { + uint16_t end = idx + MacroMaterialsPerTile; + + for (; idx < end; ++idx) + { + if (m_macroMaterialEntities.at(idx) == entityId) + { + RemoveMacroMaterialShaderEntry(idx); + } + } + } + ); + + if (macroMaterial.m_colorIndex != 0xFFFF) + { + m_bindlessImageHandler->RemoveBindlessImage(macroMaterial.m_colorIndex); + } + if (macroMaterial.m_normalIndex != 0xFFFF) + { + m_bindlessImageHandler->RemoveBindlessImage(macroMaterial.m_normalIndex); + } + + m_macroMaterials.erase(entityId); + m_bufferNeedsUpdate = true; + } + + void TerrainMacroMaterialManager::UpdateMacroMaterialShaderEntry(uint16_t shaderDataIdx, const MacroMaterial& macroMaterial) + { + m_macroMaterialEntities.at(shaderDataIdx) = macroMaterial.m_data.m_entityId; + MacroMaterialShaderData& macroMaterialShaderData = m_macroMaterialShaderData.at(shaderDataIdx); + + macroMaterialShaderData.m_flags = (MacroMaterialShaderFlags)( + MacroMaterialShaderFlags::IsUsed | + (macroMaterial.m_data.m_normalFlipX ? MacroMaterialShaderFlags::FlipMacroNormalX : 0) | + (macroMaterial.m_data.m_normalFlipY ? MacroMaterialShaderFlags::FlipMacroNormalY : 0) + ); + + macroMaterialShaderData.m_normalFactor = macroMaterial.m_data.m_normalFactor; + macroMaterialShaderData.m_boundsMin = { macroMaterial.m_data.m_bounds.GetMin().GetX(), macroMaterial.m_data.m_bounds.GetMin().GetY() }; + macroMaterialShaderData.m_boundsMax = { macroMaterial.m_data.m_bounds.GetMax().GetX(), macroMaterial.m_data.m_bounds.GetMax().GetY() }; + macroMaterialShaderData.m_colorMapId = macroMaterial.m_colorIndex; + macroMaterialShaderData.m_normalMapId = macroMaterial.m_normalIndex; + } + + void TerrainMacroMaterialManager::RemoveMacroMaterialShaderEntry(uint16_t shaderDataIdx) + { + // Remove the macro material entry from this tile by copying the remaining entries on top. + for (++shaderDataIdx; shaderDataIdx % MacroMaterialsPerTile != 0; ++shaderDataIdx) + { + m_macroMaterialEntities.at(shaderDataIdx - 1) = m_macroMaterialEntities.at(shaderDataIdx); + m_macroMaterialShaderData.at(shaderDataIdx - 1) = m_macroMaterialShaderData.at(shaderDataIdx); + } + // Disable the last entry. + m_macroMaterialEntities.at(shaderDataIdx - 1) = AZ::EntityId(); + m_macroMaterialShaderData.at(shaderDataIdx - 1).m_flags = MacroMaterialShaderFlags(0); + } + + template + void TerrainMacroMaterialManager::ForMacroMaterialsInBounds(const AZ::Aabb& bounds, Callback callback) + { + // Get the macro material bounds relative to the terrain + float yStart = bounds.GetMin().GetY() - m_terrainBounds.GetMin().GetY(); + float yEnd = bounds.GetMax().GetY() - m_terrainBounds.GetMin().GetY(); + float xStart = bounds.GetMin().GetX() - m_terrainBounds.GetMin().GetX(); + float xEnd = bounds.GetMax().GetX() - m_terrainBounds.GetMin().GetX(); + + // Clamp the bounds to the terrain + uint16_t yStartIdx = yStart > 0.0f ? uint16_t(yStart / MacroMaterialGridSize) : 0; + uint16_t yEndIdx = yEnd > 0.0f ? AZStd::GetMin(uint16_t(yEnd / MacroMaterialGridSize) + 1, m_tilesY) : 0; + uint16_t xStartIdx = xStart > 0.0f ? uint16_t(xStart / MacroMaterialGridSize) : 0; + uint16_t xEndIdx = xEnd > 0.0f ? AZStd::GetMin(uint16_t(xEnd / MacroMaterialGridSize) + 1, m_tilesX) : 0; + + AZ::Vector2 gridCorner = AZ::Vector2( + floor(m_terrainBounds.GetMin().GetX() / MacroMaterialGridSize) * MacroMaterialGridSize, + floor(m_terrainBounds.GetMin().GetY() / MacroMaterialGridSize) * MacroMaterialGridSize); + + for (uint16_t y = yStartIdx; y < yEndIdx; ++y) + { + for (uint16_t x = xStartIdx; x < xEndIdx; ++x) + { + uint16_t idx = (y * m_tilesX + x) * MacroMaterialsPerTile; + const AZ::Vector2 corner = gridCorner + AZ::Vector2(x * MacroMaterialGridSize, y * MacroMaterialGridSize); + callback(idx, corner); + } + } + } + + void TerrainMacroMaterialManager::Update(AZ::Data::Instance& terrainSrg) + { + if (m_terrainSizeChanged) + { + m_terrainSizeChanged = false; + + // Rebuild the macro material tiles from scratch when the world size changes. This could be made more efficient + // but is fine for now since world resizes are rare. + + RemoveAllImages(); + m_macroMaterials.clear(); + + m_macroMaterialShaderData.clear(); + m_macroMaterialEntities.clear(); + + m_tilesX = aznumeric_cast(m_terrainBounds.GetXExtent() / MacroMaterialGridSize) + 1; + m_tilesY = aznumeric_cast(m_terrainBounds.GetYExtent() / MacroMaterialGridSize) + 1; + const uint32_t macroMaterialTileCount = m_tilesX * m_tilesY * MacroMaterialsPerTile; + + m_macroMaterialShaderData.resize(macroMaterialTileCount); + m_macroMaterialEntities.resize(macroMaterialTileCount); + + TerrainMacroMaterialRequestBus::EnumerateHandlers( + [&](TerrainMacroMaterialRequests* handler) + { + MacroMaterialData macroMaterial = handler->GetTerrainMacroMaterialData(); + AZ::EntityId entityId = *(Terrain::TerrainMacroMaterialRequestBus::GetCurrentBusId()); + OnTerrainMacroMaterialCreated(entityId, macroMaterial); + return true; + } + ); + } + + if (m_bufferNeedsUpdate) + { + m_bufferNeedsUpdate = false; + m_macroMaterialDataBuffer.UpdateBuffer(m_macroMaterialShaderData.data(), aznumeric_cast(m_macroMaterialShaderData.size())); + + MacroMaterialGridShaderData macroMaterialGridShaderData; + macroMaterialGridShaderData.m_offset = { m_terrainBounds.GetMin().GetX(), m_terrainBounds.GetMin().GetY() }; + macroMaterialGridShaderData.m_resolution = (m_tilesX << 16) | m_tilesY; + macroMaterialGridShaderData.m_tileSize = MacroMaterialGridSize; + + if (terrainSrg) + { + m_macroMaterialDataBuffer.UpdateSrg(terrainSrg.get()); + terrainSrg->SetConstant(m_macroMaterialGridIndex, macroMaterialGridShaderData); + } + } + } + + void TerrainMacroMaterialManager::RemoveAllImages() + { + for (const auto& [entity, macroMaterial] : m_macroMaterials) + { + RemoveImagesForMaterial(macroMaterial); + } + } + + void TerrainMacroMaterialManager::RemoveImagesForMaterial(const MacroMaterial& macroMaterial) + { + if (macroMaterial.m_colorIndex != 0xFFFF) + { + m_bindlessImageHandler->RemoveBindlessImage(macroMaterial.m_colorIndex); + } + if (macroMaterial.m_normalIndex != 0xFFFF) + { + m_bindlessImageHandler->RemoveBindlessImage(macroMaterial.m_normalIndex); + } + } + +} diff --git a/Gems/Terrain/Code/Source/TerrainRenderer/TerrainMacroMaterialManager.h b/Gems/Terrain/Code/Source/TerrainRenderer/TerrainMacroMaterialManager.h new file mode 100644 index 0000000000..6a603eeced --- /dev/null +++ b/Gems/Terrain/Code/Source/TerrainRenderer/TerrainMacroMaterialManager.h @@ -0,0 +1,116 @@ +/* + * Copyright (c) Contributors to the Open 3D Engine Project. + * For complete copyright and license terms please see the LICENSE at the root of this distribution. + * + * SPDX-License-Identifier: Apache-2.0 OR MIT + * + */ + +#pragma once + +#include +#include +#include +#include +#include + +namespace Terrain +{ + class TerrainMacroMaterialManager + : private TerrainMacroMaterialNotificationBus::Handler + , private AzFramework::Terrain::TerrainDataNotificationBus::Handler + { + public: + + TerrainMacroMaterialManager() = default; + ~TerrainMacroMaterialManager() = default; + + void Initialize( + const AZStd::shared_ptr& bindlessImageHandler, + AZ::Data::Instance& terrainSrg); + void Reset(); + bool IsInitialized(); + bool UpdateSrgIndices(AZ::Data::Instance& terrainSrg); + + void Update(AZ::Data::Instance& terrainSrg); + + private: + + static constexpr auto InvalidImageIndex = AZ::Render::BindlessImageArrayHandler::InvalidImageIndex; + static constexpr float MacroMaterialGridSize = 64.0f; + static constexpr uint16_t MacroMaterialsPerTile = 4; + + enum MacroMaterialShaderFlags : uint32_t + { + IsUsed = 0b0000'0000'0000'0000'0000'0000'0000'0001, + FlipMacroNormalX = 0b0000'0000'0000'0000'0000'0000'0000'0010, + FlipMacroNormalY = 0b0000'0000'0000'0000'0000'0000'0000'0100, + }; + + struct MacroMaterialShaderData + { + MacroMaterialShaderFlags m_flags; + uint32_t m_colorMapId{InvalidImageIndex}; + uint32_t m_normalMapId{InvalidImageIndex}; + float m_normalFactor; + + // macro material bounds in world space + AZStd::array m_boundsMin{ 0.0f, 0.0f }; + AZStd::array m_boundsMax{ 0.0f, 0.0f }; + }; + static_assert(sizeof(MacroMaterialShaderData) % 16 == 0, "MacroMaterialShaderData must be 16 byte aligned."); + + struct MacroMaterial + { + MacroMaterialData m_data; + uint16_t m_colorIndex{ 0xFFFF }; + uint16_t m_normalIndex{ 0xFFFF }; + }; + + struct MacroMaterialGridShaderData + { + uint32_t m_resolution; // How many x/y tiles in grid. x & y stored in 16 bits each. Total number of entries in m_macroMaterialData will be x * y + float m_tileSize; // Size of a tile in meters. + AZStd::array m_offset; // x/y offset of min x/y corner of grid. + }; + static_assert(sizeof(MacroMaterialGridShaderData) % 16 == 0, "MacroMaterialGridShaderData must be 16 byte aligned."); + + // AzFramework::Terrain::TerrainDataNotificationBus overrides... + void OnTerrainDataChanged(const AZ::Aabb& dirtyRegion [[maybe_unused]], TerrainDataChangedMask dataChangedMask) override; + + // TerrainMacroMaterialNotificationBus overrides... + void OnTerrainMacroMaterialCreated(AZ::EntityId entityId, const MacroMaterialData& material) override; + void OnTerrainMacroMaterialChanged(AZ::EntityId entityId, const MacroMaterialData& material) override; + void OnTerrainMacroMaterialRegionChanged(AZ::EntityId entityId, const AZ::Aabb& oldRegion, const AZ::Aabb& newRegion) override; + void OnTerrainMacroMaterialDestroyed(AZ::EntityId entityId) override; + + void UpdateMacroMaterialShaderEntry(uint16_t shaderDataIdx, const MacroMaterial& macroMaterialData); + void RemoveMacroMaterialShaderEntry(uint16_t shaderDataIdx); + + template + void ForMacroMaterialsInBounds(const AZ::Aabb& bounds, Callback callback); + + void RemoveAllImages(); + void RemoveImagesForMaterial(const MacroMaterial& macroMaterial); + + AZ::Aabb m_terrainBounds{ AZ::Aabb::CreateNull() }; + + // Macro materials stored in a grid of (MacroMaterialGridCount * MacroMaterialGridCount) where each tile in the grid covers + // an area of (MacroMaterialGridSize * MacroMaterialGridSize) and each tile can hold MacroMaterialsPerTile macro materials + AZStd::vector m_macroMaterialShaderData; + AZStd::vector m_macroMaterialEntities; // Same as above, but used to track entity ids which aren't needed by the shader. + AZStd::map m_macroMaterials; // Used for looking up macro materials by entity id when the data isn't provided by a bus. + uint16_t m_tilesX{ 0 }; + uint16_t m_tilesY{ 0 }; + + AZStd::shared_ptr m_bindlessImageHandler; + AZ::Render::GpuBufferHandler m_macroMaterialDataBuffer; + + AZ::RHI::ShaderInputConstantIndex m_macroMaterialGridIndex; + + bool m_terrainSizeChanged{ false }; + bool m_bufferNeedsUpdate{ false }; + bool m_isInitialized{ false }; + + }; +} diff --git a/Gems/Terrain/Code/Source/TerrainRenderer/TerrainMeshManager.cpp b/Gems/Terrain/Code/Source/TerrainRenderer/TerrainMeshManager.cpp new file mode 100644 index 0000000000..d689d2635c --- /dev/null +++ b/Gems/Terrain/Code/Source/TerrainRenderer/TerrainMeshManager.cpp @@ -0,0 +1,354 @@ +/* + * Copyright (c) Contributors to the Open 3D Engine Project. + * For complete copyright and license terms please see the LICENSE at the root of this distribution. + * + * SPDX-License-Identifier: Apache-2.0 OR MIT + * + */ + +#include + +#include + +#include + +#include +#include +#include +#include +#include + +#include +#include +#include +#include + +#include + +namespace Terrain +{ + namespace + { + [[maybe_unused]] static const char* TerrainMeshManagerName = "TerrainMeshManager"; + } + + namespace ShaderInputs + { + static const char* const PatchData("m_patchData"); + } + + void TerrainMeshManager::Initialize() + { + if (!InitializePatchModel()) + { + AZ_Error(TerrainMeshManagerName, false, "Failed to create Terrain render buffers!"); + return; + } + + OnTerrainDataChanged(AZ::Aabb::CreateNull(), TerrainDataChangedMask::HeightData); + AzFramework::Terrain::TerrainDataNotificationBus::Handler::BusConnect(); + + m_isInitialized = true; + } + + bool TerrainMeshManager::IsInitialized() const + { + return m_isInitialized; + } + + void TerrainMeshManager::Reset() + { + AzFramework::Terrain::TerrainDataNotificationBus::Handler::BusDisconnect(); + m_patchModel = {}; + m_sectorData.clear(); + m_rebuildSectors = true; + m_isInitialized = false; + } + + bool TerrainMeshManager::CheckRebuildSurfaces(MaterialInstance materialInstance, AZ::RPI::Scene& parentScene) + { + if (!m_rebuildSectors) + { + return false; + } + + m_rebuildSectors = false; + m_sectorData.clear(); + + const auto layout = materialInstance->GetAsset()->GetObjectSrgLayout(); + + AZ::RHI::ShaderInputConstantIndex patchDataIndex = layout->FindShaderInputConstantIndex(AZ::Name(ShaderInputs::PatchData)); + AZ_Error(TerrainMeshManagerName, patchDataIndex.IsValid(), "Failed to find shader input constant %s.", ShaderInputs::PatchData); + + const float xFirstPatchStart = AZStd::floorf(m_worldBounds.GetMin().GetX() / GridMeters) * GridMeters; + const float xLastPatchStart = AZStd::floorf(m_worldBounds.GetMax().GetX() / GridMeters) * GridMeters; + const float yFirstPatchStart = AZStd::floorf(m_worldBounds.GetMin().GetY() / GridMeters) * GridMeters; + const float yLastPatchStart = AZStd::floorf(m_worldBounds.GetMax().GetY() / GridMeters) * GridMeters; + + const auto& materialAsset = materialInstance->GetAsset(); + const auto& shaderAsset = materialAsset->GetMaterialTypeAsset()->GetShaderAssetForObjectSrg(); + + for (float yPatch = yFirstPatchStart; yPatch <= yLastPatchStart; yPatch += GridMeters) + { + for (float xPatch = xFirstPatchStart; xPatch <= xLastPatchStart; xPatch += GridMeters) + { + ShaderTerrainData objectSrgData; + objectSrgData.m_xyTranslation = { xPatch, yPatch }; + + m_sectorData.push_back(); + SectorData& sectorData = m_sectorData.back(); + + for (auto& lod : m_patchModel->GetLods()) + { + objectSrgData.m_xyScale = m_sampleSpacing * GridSize; + + auto objectSrg = AZ::RPI::ShaderResourceGroup::Create(shaderAsset, materialAsset->GetObjectSrgLayout()->GetName()); + if (!objectSrg) + { + AZ_WarningOnce(TerrainMeshManagerName, false, "Failed to create a new shader resource group, skipping."); + continue; + } + objectSrg->SetConstant(patchDataIndex, objectSrgData); + objectSrg->Compile(); + + AZ::RPI::ModelLod& modelLod = *lod.get(); + sectorData.m_drawPackets.emplace_back(modelLod, 0, materialInstance, objectSrg); + AZ::RPI::MeshDrawPacket& drawPacket = sectorData.m_drawPackets.back(); + + sectorData.m_srgs.emplace_back(objectSrg); + + // set the shader option to select forward pass IBL specular if necessary + if (!drawPacket.SetShaderOption(AZ::Name("o_meshUseForwardPassIBLSpecular"), AZ::RPI::ShaderOptionValue{ false })) + { + AZ_Warning(TerrainMeshManagerName, false, "Failed to set o_meshUseForwardPassIBLSpecular on mesh draw packet"); + } + const uint8_t stencilRef = AZ::Render::StencilRefs::UseDiffuseGIPass | AZ::Render::StencilRefs::UseIBLSpecularPass; + drawPacket.SetStencilRef(stencilRef); + drawPacket.Update(parentScene, true); + } + + sectorData.m_aabb = + AZ::Aabb::CreateFromMinMax( + AZ::Vector3(xPatch, yPatch, m_worldBounds.GetMin().GetZ()), + AZ::Vector3(xPatch + GridMeters, yPatch + GridMeters, m_worldBounds.GetMax().GetZ()) + ); + } + } + return true; + } + + void TerrainMeshManager::DrawMeshes(const AZ::RPI::FeatureProcessor::RenderPacket& process) + { + for (auto& sectorData : m_sectorData) + { + uint8_t lodChoice = AZ::RPI::ModelLodAsset::LodCountMax; + + // Go through all cameras and choose an LOD based on the closest camera. + for (auto& view : process.m_views) + { + if ((view->GetUsageFlags() & AZ::RPI::View::UsageFlags::UsageCamera) > 0) + { + const AZ::Vector3 cameraPosition = view->GetCameraTransform().GetTranslation(); + const AZ::Vector2 cameraPositionXY = AZ::Vector2(cameraPosition.GetX(), cameraPosition.GetY()); + const AZ::Vector2 sectorCenterXY = AZ::Vector2(sectorData.m_aabb.GetCenter().GetX(), sectorData.m_aabb.GetCenter().GetY()); + + const float sectorDistance = sectorCenterXY.GetDistance(cameraPositionXY); + + // This will be configurable later + const float minDistanceForLod0 = (GridMeters * 4.0f); + + // For every distance doubling beyond a minDistanceForLod0, we only need half the mesh density. Each LOD + // is exactly half the resolution of the last. + const float lodForCamera = AZStd::floorf(AZ::GetMax(0.0f, log2f(sectorDistance / minDistanceForLod0))); + + // All cameras should render the same LOD so effects like shadows are consistent. + lodChoice = AZ::GetMin(lodChoice, aznumeric_cast(lodForCamera)); + } + } + + // Add the correct LOD draw packet for visible sectors. + for (auto& view : process.m_views) + { + AZ::Frustum viewFrustum = AZ::Frustum::CreateFromMatrixColumnMajor(view->GetWorldToClipMatrix()); + if (viewFrustum.IntersectAabb(sectorData.m_aabb) != AZ::IntersectResult::Exterior) + { + const uint8_t lodToRender = AZ::GetMin(lodChoice, aznumeric_cast(sectorData.m_drawPackets.size() - 1)); + view->AddDrawPacket(sectorData.m_drawPackets.at(lodToRender).GetRHIDrawPacket()); + } + } + } + } + + void TerrainMeshManager::RebuildDrawPackets(AZ::RPI::Scene& scene) + { + for (auto& sectorData : m_sectorData) + { + for (auto& drawPacket : sectorData.m_drawPackets) + { + drawPacket.Update(scene, true); + } + } + } + + void TerrainMeshManager::OnTerrainDataDestroyBegin() + { + Reset(); + } + + void TerrainMeshManager::OnTerrainDataChanged([[maybe_unused]] const AZ::Aabb& dirtyRegion, TerrainDataChangedMask dataChangedMask) + { + if ((dataChangedMask & (TerrainDataChangedMask::HeightData | TerrainDataChangedMask::Settings)) != 0) + { + AZ::Aabb worldBounds = AZ::Aabb::CreateNull(); + AzFramework::Terrain::TerrainDataRequestBus::BroadcastResult( + worldBounds, &AzFramework::Terrain::TerrainDataRequests::GetTerrainAabb); + + AZ::Vector2 queryResolution2D = AZ::Vector2(1.0f); + AzFramework::Terrain::TerrainDataRequestBus::BroadcastResult( + queryResolution2D, &AzFramework::Terrain::TerrainDataRequests::GetTerrainHeightQueryResolution); + // Currently query resolution is multidimensional but the rendering system only supports this changing in one dimension. + float queryResolution = queryResolution2D.GetX(); + + // Sectors need to be rebuilt if the world bounds change in the x/y, or the sample spacing changes. + m_rebuildSectors = m_rebuildSectors || + m_worldBounds.GetMin().GetX() != worldBounds.GetMin().GetX() || + m_worldBounds.GetMin().GetY() != worldBounds.GetMin().GetY() || + m_worldBounds.GetMax().GetX() != worldBounds.GetMax().GetX() || + m_worldBounds.GetMax().GetY() != worldBounds.GetMax().GetY() || + m_sampleSpacing != queryResolution; + + m_worldBounds = worldBounds; + m_sampleSpacing = queryResolution; + } + } + + void TerrainMeshManager::InitializeTerrainPatch(uint16_t gridSize, PatchData& patchdata) + { + patchdata.m_positions.clear(); + patchdata.m_indices.clear(); + + const uint16_t gridVertices = gridSize + 1; // For m_gridSize quads, (m_gridSize + 1) vertices are needed. + const size_t size = gridVertices * gridVertices; + + patchdata.m_positions.reserve(size); + + for (uint16_t y = 0; y < gridVertices; ++y) + { + for (uint16_t x = 0; x < gridVertices; ++x) + { + patchdata.m_positions.push_back({ aznumeric_cast(x) / gridSize, aznumeric_cast(y) / gridSize }); + } + } + + patchdata.m_indices.reserve(gridSize * gridSize * 6); // total number of quads, 2 triangles with 6 indices per quad. + + for (uint16_t y = 0; y < gridSize; ++y) + { + for (uint16_t x = 0; x < gridSize; ++x) + { + const uint16_t topLeft = y * gridVertices + x; + const uint16_t topRight = topLeft + 1; + const uint16_t bottomLeft = (y + 1) * gridVertices + x; + const uint16_t bottomRight = bottomLeft + 1; + + patchdata.m_indices.emplace_back(topLeft); + patchdata.m_indices.emplace_back(topRight); + patchdata.m_indices.emplace_back(bottomLeft); + patchdata.m_indices.emplace_back(bottomLeft); + patchdata.m_indices.emplace_back(topRight); + patchdata.m_indices.emplace_back(bottomRight); + } + } + } + + AZ::Outcome> TerrainMeshManager::CreateBufferAsset( + const void* data, const AZ::RHI::BufferViewDescriptor& bufferViewDescriptor, const AZStd::string& bufferName) + { + AZ::RPI::BufferAssetCreator creator; + creator.Begin(AZ::Uuid::CreateRandom()); + + AZ::RHI::BufferDescriptor bufferDescriptor; + bufferDescriptor.m_bindFlags = AZ::RHI::BufferBindFlags::InputAssembly | AZ::RHI::BufferBindFlags::ShaderRead; + bufferDescriptor.m_byteCount = static_cast(bufferViewDescriptor.m_elementSize) * static_cast(bufferViewDescriptor.m_elementCount); + + creator.SetBuffer(data, bufferDescriptor.m_byteCount, bufferDescriptor); + creator.SetBufferViewDescriptor(bufferViewDescriptor); + creator.SetUseCommonPool(AZ::RPI::CommonBufferPoolType::StaticInputAssembly); + + AZ::Data::Asset bufferAsset; + if (creator.End(bufferAsset)) + { + bufferAsset.SetHint(bufferName); + return AZ::Success(bufferAsset); + } + + return AZ::Failure(); + } + + bool TerrainMeshManager::InitializePatchModel() + { + AZ::RPI::ModelAssetCreator modelAssetCreator; + modelAssetCreator.Begin(AZ::Uuid::CreateRandom()); + + uint16_t gridSize = GridSize; + float gridSpacing = GridSpacing; + + for (uint32_t i = 0; i < AZ::RPI::ModelLodAsset::LodCountMax && gridSize > 0; ++i) + { + PatchData patchData; + InitializeTerrainPatch(gridSize, patchData); + + const auto positionBufferViewDesc = AZ::RHI::BufferViewDescriptor::CreateTyped(0, aznumeric_cast(patchData.m_positions.size()), AZ::RHI::Format::R32G32_FLOAT); + const auto positionsOutcome = CreateBufferAsset(patchData.m_positions.data(), positionBufferViewDesc, "TerrainPatchPositions"); + + const auto indexBufferViewDesc = AZ::RHI::BufferViewDescriptor::CreateTyped(0, aznumeric_cast(patchData.m_indices.size()), AZ::RHI::Format::R16_UINT); + const auto indicesOutcome = CreateBufferAsset(patchData.m_indices.data(), indexBufferViewDesc, "TerrainPatchIndices"); + + if (!positionsOutcome.IsSuccess() || !indicesOutcome.IsSuccess()) + { + AZ_Error(TerrainMeshManagerName, false, "Failed to create GPU buffers for Terrain"); + return false; + } + + AZ::RPI::ModelLodAssetCreator modelLodAssetCreator; + modelLodAssetCreator.Begin(AZ::Uuid::CreateRandom()); + + modelLodAssetCreator.BeginMesh(); + modelLodAssetCreator.AddMeshStreamBuffer(AZ::RHI::ShaderSemantic{ "POSITION" }, AZ::Name(), {positionsOutcome.GetValue(), positionBufferViewDesc}); + modelLodAssetCreator.SetMeshIndexBuffer({indicesOutcome.GetValue(), indexBufferViewDesc}); + + AZ::Aabb aabb = AZ::Aabb::CreateFromMinMax(AZ::Vector3(0.0, 0.0, 0.0), AZ::Vector3(GridMeters, GridMeters, 0.0)); + modelLodAssetCreator.SetMeshAabb(AZStd::move(aabb)); + modelLodAssetCreator.SetMeshName(AZ::Name("Terrain Patch")); + modelLodAssetCreator.EndMesh(); + + AZ::Data::Asset modelLodAsset; + modelLodAssetCreator.End(modelLodAsset); + + modelAssetCreator.AddLodAsset(AZStd::move(modelLodAsset)); + + gridSize = gridSize / 2; + gridSpacing *= 2.0f; + } + + AZ::Data::Asset modelAsset; + bool success = modelAssetCreator.End(modelAsset); + + m_patchModel = AZ::RPI::Model::FindOrCreate(modelAsset); + + return success; + } + + template + void TerrainMeshManager::ForOverlappingSectors(const AZ::Aabb& bounds, Callback callback) + { + for (SectorData& sectorData : m_sectorData) + { + if (sectorData.m_aabb.Overlaps(bounds)) + { + callback(sectorData); + } + } + } + +} diff --git a/Gems/Terrain/Code/Source/TerrainRenderer/TerrainMeshManager.h b/Gems/Terrain/Code/Source/TerrainRenderer/TerrainMeshManager.h new file mode 100644 index 0000000000..7252a85686 --- /dev/null +++ b/Gems/Terrain/Code/Source/TerrainRenderer/TerrainMeshManager.h @@ -0,0 +1,117 @@ +/* + * Copyright (c) Contributors to the Open 3D Engine Project. + * For complete copyright and license terms please see the LICENSE at the root of this distribution. + * + * SPDX-License-Identifier: Apache-2.0 OR MIT + * + */ + +#pragma once + +#include +#include +#include +#include + +#include + +#include + +#include +#include +#include + +#include + + +namespace AZ::RPI +{ + class BufferAsset; +} + +namespace AZ::RHI +{ + struct BufferViewDescriptor; +} + +namespace Terrain +{ + class TerrainMeshManager + : private AzFramework::Terrain::TerrainDataNotificationBus::Handler + { + private: + + using MaterialInstance = AZ::Data::Instance; + + public: + + AZ_RTTI(TerrainMeshManager, "{62C84AD8-05FE-4C78-8501-A2DB6731B9B7}"); + AZ_DISABLE_COPY_MOVE(TerrainMeshManager); + + TerrainMeshManager() = default; + ~TerrainMeshManager() = default; + + void Initialize(); + bool IsInitialized() const; + void Reset(); + + bool CheckRebuildSurfaces(MaterialInstance materialInstance, AZ::RPI::Scene& parentScene); + void DrawMeshes(const AZ::RPI::FeatureProcessor::RenderPacket& process); + void RebuildDrawPackets(AZ::RPI::Scene& scene); + + static constexpr float GridSpacing{ 1.0f }; + static constexpr int32_t GridSize{ 64 }; // number of terrain quads (vertices are m_gridSize + 1) + static constexpr float GridMeters{ GridSpacing * GridSize }; + static constexpr uint32_t MaxMaterialsPerSector = 4; + + private: + + struct VertexPosition + { + float m_posx; + float m_posy; + }; + + struct PatchData + { + AZStd::vector m_positions; + AZStd::vector m_indices; + }; + + struct SectorData + { + AZStd::fixed_vector m_drawPackets; + AZStd::fixed_vector, AZ::RPI::ModelLodAsset::LodCountMax> m_srgs; // Hold on to refs so it's not dropped + AZ::Aabb m_aabb; + }; + + struct ShaderTerrainData // Must align with struct in Object Srg + { + AZStd::array m_xyTranslation{ 0.0f, 0.0f }; + float m_xyScale{ 1.0f }; + }; + + // AzFramework::Terrain::TerrainDataNotificationBus overrides... + void OnTerrainDataDestroyBegin() override; + void OnTerrainDataChanged(const AZ::Aabb& dirtyRegion, TerrainDataChangedMask dataChangedMask) override; + + AZ::Outcome> CreateBufferAsset( + const void* data, const AZ::RHI::BufferViewDescriptor& bufferViewDescriptor, const AZStd::string& bufferName); + + void InitializeTerrainPatch(uint16_t gridSize, PatchData& patchdata); + bool InitializePatchModel(); + + template + void ForOverlappingSectors(const AZ::Aabb& bounds, Callback callback); + + AZStd::vector m_sectorData; + AZ::Data::Instance m_patchModel; + + AZ::Aabb m_worldBounds{ AZ::Aabb::CreateNull() }; + float m_sampleSpacing = 1.0f; + + bool m_isInitialized{ false }; + bool m_rebuildSectors{ true }; + + }; +} diff --git a/Gems/Terrain/Code/Source/TerrainRenderer/Vector2i.cpp b/Gems/Terrain/Code/Source/TerrainRenderer/Vector2i.cpp new file mode 100644 index 0000000000..1df945b88c --- /dev/null +++ b/Gems/Terrain/Code/Source/TerrainRenderer/Vector2i.cpp @@ -0,0 +1,41 @@ +/* + * Copyright (c) Contributors to the Open 3D Engine Project. + * For complete copyright and license terms please see the LICENSE at the root of this distribution. + * + * SPDX-License-Identifier: Apache-2.0 OR MIT + * + */ + +#include + +namespace Terrain +{ + auto Vector2i::operator+(const Vector2i& rhs) const -> Vector2i + { + Vector2i offsetPoint = *this; + offsetPoint += rhs; + return offsetPoint; + } + + auto Vector2i::operator+=(const Vector2i& rhs) -> Vector2i& + { + m_x += rhs.m_x; + m_y += rhs.m_y; + return *this; + } + + auto Vector2i::operator-(const Vector2i& rhs) const -> Vector2i + { + return *this + -rhs; + } + + auto Vector2i::operator-=(const Vector2i& rhs) -> Vector2i& + { + return *this += -rhs; + } + + auto Vector2i::operator-() const -> Vector2i + { + return {-m_x, -m_y}; + } +} diff --git a/Gems/Terrain/Code/Source/TerrainRenderer/Vector2i.h b/Gems/Terrain/Code/Source/TerrainRenderer/Vector2i.h new file mode 100644 index 0000000000..1244972fe9 --- /dev/null +++ b/Gems/Terrain/Code/Source/TerrainRenderer/Vector2i.h @@ -0,0 +1,29 @@ +/* + * Copyright (c) Contributors to the Open 3D Engine Project. + * For complete copyright and license terms please see the LICENSE at the root of this distribution. + * + * SPDX-License-Identifier: Apache-2.0 OR MIT + * + */ + +#pragma once + +#include + +namespace Terrain +{ + class Vector2i + { + public: + + Vector2i operator+(const Vector2i& rhs) const; + Vector2i& operator+=(const Vector2i& rhs); + Vector2i operator-(const Vector2i& rhs) const; + Vector2i& operator-=(const Vector2i& rhs); + Vector2i operator-() const; + + int32_t m_x{ 0 }; + int32_t m_y{ 0 }; + + }; +} diff --git a/Gems/Terrain/Code/Source/TerrainSystem/TerrainSystem.cpp b/Gems/Terrain/Code/Source/TerrainSystem/TerrainSystem.cpp index 8d39340b06..7c8b6021af 100644 --- a/Gems/Terrain/Code/Source/TerrainSystem/TerrainSystem.cpp +++ b/Gems/Terrain/Code/Source/TerrainSystem/TerrainSystem.cpp @@ -25,10 +25,12 @@ bool TerrainLayerPriorityComparator::operator()(const AZ::EntityId& layer1id, co { // Comparator for insertion/keylookup. // Sorts into layer/priority order, highest priority first. - AZ::u32 priority1, layer1; + AZ::u32 priority1 = 0; + AZ::u32 layer1 = 0; Terrain::TerrainSpawnerRequestBus::Event(layer1id, &Terrain::TerrainSpawnerRequestBus::Events::GetPriority, layer1, priority1); - AZ::u32 priority2, layer2; + AZ::u32 priority2 = 0; + AZ::u32 layer2 = 0; Terrain::TerrainSpawnerRequestBus::Event(layer2id, &Terrain::TerrainSpawnerRequestBus::Events::GetPriority, layer2, priority2); if (layer1 < layer2) @@ -80,7 +82,7 @@ void TerrainSystem::Activate() m_requestedSettings.m_systemActive = true; { - AZStd::shared_lock lock(m_areaMutex); + AZStd::unique_lock lock(m_areaMutex); m_registeredAreas.clear(); } @@ -103,13 +105,15 @@ void TerrainSystem::Activate() void TerrainSystem::Deactivate() { + // Stop listening to the bus even before we signal DestroyBegin so that way any calls to the terrain system as a *result* of + // calling DestroyBegin will fail to reach the terrain system. + AzFramework::Terrain::TerrainDataRequestBus::Handler::BusDisconnect(); + AzFramework::Terrain::TerrainDataNotificationBus::Broadcast( &AzFramework::Terrain::TerrainDataNotificationBus::Events::OnTerrainDataDestroyBegin); - AzFramework::Terrain::TerrainDataRequestBus::Handler::BusDisconnect(); - { - AZStd::shared_lock lock(m_areaMutex); + AZStd::unique_lock lock(m_areaMutex); m_registeredAreas.clear(); } @@ -161,11 +165,31 @@ void TerrainSystem::ClampPosition(float x, float y, AZ::Vector2& outPosition, AZ outPosition = (normalizedPosition - normalizedDelta) * m_currentSettings.m_heightQueryResolution; } +bool TerrainSystem::InWorldBounds(float x, float y) const +{ + const float zTestValue = m_currentSettings.m_worldBounds.GetMin().GetZ(); + const AZ::Vector3 testValue{ x, y, zTestValue }; + if (m_currentSettings.m_worldBounds.Contains(testValue)) + { + return true; + } + return false; +} + float TerrainSystem::GetHeightSynchronous(float x, float y, Sampler sampler, bool* terrainExistsPtr) const { bool terrainExists = false; float height = m_currentSettings.m_worldBounds.GetMin().GetZ(); + if (!InWorldBounds(x, y)) + { + if (terrainExistsPtr) + { + *terrainExistsPtr = terrainExists; + return height; + } + } + AZStd::shared_lock lock(m_areaMutex); switch (sampler) @@ -222,20 +246,31 @@ float TerrainSystem::GetHeightSynchronous(float x, float y, Sampler sampler, boo float TerrainSystem::GetTerrainAreaHeight(float x, float y, bool& terrainExists) const { - AZ::Vector3 inPosition((float)x, (float)y, m_currentSettings.m_worldBounds.GetMin().GetZ()); - float height = m_currentSettings.m_worldBounds.GetMin().GetZ(); + const float worldMin = m_currentSettings.m_worldBounds.GetMin().GetZ(); + AZ::Vector3 inPosition(x, y, worldMin); + float height = worldMin; + terrainExists = false; AZStd::shared_lock lock(m_areaMutex); - for (auto& [areaId, areaBounds] : m_registeredAreas) + for (auto& [areaId, areaData] : m_registeredAreas) { - inPosition.SetZ(areaBounds.GetMin().GetZ()); - if (areaBounds.Contains(inPosition)) + const float areaMin = areaData.m_areaBounds.GetMin().GetZ(); + inPosition.SetZ(areaMin); + if (areaData.m_areaBounds.Contains(inPosition)) { AZ::Vector3 outPosition; Terrain::TerrainAreaHeightRequestBus::Event( areaId, &Terrain::TerrainAreaHeightRequestBus::Events::GetHeight, inPosition, outPosition, terrainExists); height = outPosition.GetZ(); + if (!terrainExists) + { + // If the terrain height provider doesn't have any data, then check the area's "use ground plane" setting. + // If it's set, then create a default ground plane by saying terrain exists at the minimum height for the area. + // Otherwise, we'll set the height at the terrain world minimum and say it doesn't exist. + terrainExists = areaData.m_useGroundPlane; + height = areaData.m_useGroundPlane ? areaMin : worldMin; + } break; } } @@ -287,6 +322,14 @@ AZ::Vector3 TerrainSystem::GetNormalSynchronous(float x, float y, Sampler sample AZ::Vector3 outNormal = AZ::Vector3::CreateAxisZ(); + if (!InWorldBounds(x, y)) + { + if (terrainExistsPtr) + { + *terrainExistsPtr = terrainExists; + return outNormal; + } + } const AZ::Vector2 range = (m_currentSettings.m_heightQueryResolution / 2.0f); const AZ::Vector2 left (x - range.GetX(), y); const AZ::Vector2 right(x + range.GetX(), y); @@ -323,14 +366,14 @@ AZ::Vector3 TerrainSystem::GetNormalFromFloats(float x, float y, Sampler sampler return GetNormalSynchronous(x, y, sampler, terrainExistsPtr); } - AzFramework::SurfaceData::SurfaceTagWeight TerrainSystem::GetMaxSurfaceWeight( const AZ::Vector3& position, Sampler sampleFilter, bool* terrainExistsPtr) const { return GetMaxSurfaceWeightFromFloats(position.GetX(), position.GetY(), sampleFilter, terrainExistsPtr); } -AzFramework::SurfaceData::SurfaceTagWeight TerrainSystem::GetMaxSurfaceWeightFromVector2(const AZ::Vector2& inPosition, Sampler sampleFilter, bool* terrainExistsPtr) const +AzFramework::SurfaceData::SurfaceTagWeight TerrainSystem::GetMaxSurfaceWeightFromVector2( + const AZ::Vector2& inPosition, Sampler sampleFilter, bool* terrainExistsPtr) const { return GetMaxSurfaceWeightFromFloats(inPosition.GetX(), inPosition.GetY(), sampleFilter, terrainExistsPtr); } @@ -345,6 +388,15 @@ AzFramework::SurfaceData::SurfaceTagWeight TerrainSystem::GetMaxSurfaceWeightFro AzFramework::SurfaceData::SurfaceTagWeightList weightSet; + if (!InWorldBounds(x, y)) + { + if (terrainExistsPtr) + { + *terrainExistsPtr = false; + return {}; + } + } + GetOrderedSurfaceWeights(x, y, sampleFilter, weightSet, terrainExistsPtr); if (weightSet.empty()) @@ -395,12 +447,12 @@ AZ::EntityId TerrainSystem::FindBestAreaEntityAtPosition(float x, float y, AZ::A AZStd::shared_lock lock(m_areaMutex); // The areas are sorted into priority order: the first area that contains inPosition is the most suitable. - for (const auto& [areaId, areaBounds] : m_registeredAreas) + for (const auto& [areaId, areaData] : m_registeredAreas) { - inPosition.SetZ(areaBounds.GetMin().GetZ()); - if (areaBounds.Contains(inPosition)) + inPosition.SetZ(areaData.m_areaBounds.GetMin().GetZ()); + if (areaData.m_areaBounds.Contains(inPosition)) { - bounds = areaBounds; + bounds = areaData.m_areaBounds; return areaId; } } @@ -454,7 +506,6 @@ void TerrainSystem::GetSurfaceWeightsFromVector2( Sampler sampleFilter, bool* terrainExistsPtr) const { - GetOrderedSurfaceWeights(inPosition.GetX(), inPosition.GetY(), sampleFilter, outSurfaceWeights, terrainExistsPtr); } @@ -548,7 +599,12 @@ void TerrainSystem::RegisterArea(AZ::EntityId areaId) AZStd::unique_lock lock(m_areaMutex); AZ::Aabb aabb = AZ::Aabb::CreateNull(); LmbrCentral::ShapeComponentRequestsBus::EventResult(aabb, areaId, &LmbrCentral::ShapeComponentRequestsBus::Events::GetEncompassingAabb); - m_registeredAreas[areaId] = aabb; + + // Cache off whether or not this layer spawner should have a default ground plane when no other terrain height data exists. + bool useGroundPlane = false; + Terrain::TerrainSpawnerRequestBus::EventResult(useGroundPlane, areaId, &Terrain::TerrainSpawnerRequestBus::Events::GetUseGroundPlane); + + m_registeredAreas[areaId] = { aabb, useGroundPlane }; m_dirtyRegion.AddAabb(aabb); m_terrainHeightDirty = true; m_terrainSurfacesDirty = true; @@ -565,10 +621,10 @@ void TerrainSystem::UnregisterArea(AZ::EntityId areaId) m_registeredAreas, [areaId, this](const auto& item) { - auto const& [entityId, aabb] = item; + auto const& [entityId, areaData] = item; if (areaId == entityId) { - m_dirtyRegion.AddAabb(aabb); + m_dirtyRegion.AddAabb(areaData.m_areaBounds); m_terrainHeightDirty = true; m_terrainSurfacesDirty = true; return true; @@ -585,10 +641,10 @@ void TerrainSystem::RefreshArea(AZ::EntityId areaId, AzFramework::Terrain::Terra auto areaAabb = m_registeredAreas.find(areaId); - AZ::Aabb oldAabb = (areaAabb != m_registeredAreas.end()) ? areaAabb->second : AZ::Aabb::CreateNull(); + AZ::Aabb oldAabb = (areaAabb != m_registeredAreas.end()) ? areaAabb->second.m_areaBounds : AZ::Aabb::CreateNull(); AZ::Aabb newAabb = AZ::Aabb::CreateNull(); LmbrCentral::ShapeComponentRequestsBus::EventResult(newAabb, areaId, &LmbrCentral::ShapeComponentRequestsBus::Events::GetEncompassingAabb); - m_registeredAreas[areaId] = newAabb; + m_registeredAreas[areaId].m_areaBounds = newAabb; AZ::Aabb expandedAabb = oldAabb; expandedAabb.AddAabb(newAabb); diff --git a/Gems/Terrain/Code/Source/TerrainSystem/TerrainSystem.h b/Gems/Terrain/Code/Source/TerrainSystem/TerrainSystem.h index 022cd218cc..d7267476ed 100644 --- a/Gems/Terrain/Code/Source/TerrainSystem/TerrainSystem.h +++ b/Gems/Terrain/Code/Source/TerrainSystem/TerrainSystem.h @@ -138,6 +138,7 @@ namespace Terrain private: void ClampPosition(float x, float y, AZ::Vector2& outPosition, AZ::Vector2& normalizedDelta) const; + bool InWorldBounds(float x, float y) const; AZ::EntityId FindBestAreaEntityAtPosition(float x, float y, AZ::Aabb& bounds) const; void GetOrderedSurfaceWeights( @@ -168,7 +169,14 @@ namespace Terrain bool m_terrainSurfacesDirty = false; AZ::Aabb m_dirtyRegion; + // Cached data for each terrain area to use when looking up terrain data. + struct TerrainAreaData + { + AZ::Aabb m_areaBounds{ AZ::Aabb::CreateNull() }; + bool m_useGroundPlane{ false }; + }; + mutable AZStd::shared_mutex m_areaMutex; - AZStd::map m_registeredAreas; + AZStd::map m_registeredAreas; }; } // namespace Terrain diff --git a/Gems/Terrain/Code/Tests/LayerSpawnerTests.cpp b/Gems/Terrain/Code/Tests/LayerSpawnerTests.cpp index 3778ba860f..9de441eecf 100644 --- a/Gems/Terrain/Code/Tests/LayerSpawnerTests.cpp +++ b/Gems/Terrain/Code/Tests/LayerSpawnerTests.cpp @@ -6,15 +6,13 @@ * */ +#include + #include #include #include -#include - #include -#include -#include #include #include @@ -23,21 +21,12 @@ using ::testing::NiceMock; using ::testing::AtLeast; using ::testing::_; -using ::testing::NiceMock; -using ::testing::AtLeast; -using ::testing::_; - class LayerSpawnerComponentTest : public ::testing::Test { protected: AZ::ComponentApplication m_app; - AZStd::unique_ptr m_entity; - Terrain::TerrainLayerSpawnerComponent* m_layerSpawnerComponent; - UnitTest::MockAxisAlignedBoxShapeComponent* m_shapeComponent; - AZStd::unique_ptr> m_terrainSystem; - void SetUp() override { AZ::ComponentApplication::Descriptor appDesc; @@ -50,78 +39,86 @@ protected: void TearDown() override { - m_entity.reset(); - m_terrainSystem.reset(); m_app.Destroy(); } - void CreateEntity() + AZStd::unique_ptr CreateEntity() { - m_entity = AZStd::make_unique(); - m_entity->Init(); + auto entity = AZStd::make_unique(); + entity->Init(); - ASSERT_TRUE(m_entity); + return entity; } - void AddLayerSpawnerAndShapeComponentToEntity() + Terrain::TerrainLayerSpawnerComponent* AddLayerSpawnerToEntity(AZ::Entity* entity, const Terrain::TerrainLayerSpawnerConfig& config) { - AddLayerSpawnerAndShapeComponentToEntity(Terrain::TerrainLayerSpawnerConfig()); + auto layerSpawnerComponent = entity->CreateComponent(config); + m_app.RegisterComponentDescriptor(layerSpawnerComponent->CreateDescriptor()); + + return layerSpawnerComponent; } - void AddLayerSpawnerAndShapeComponentToEntity(const Terrain::TerrainLayerSpawnerConfig& config) + UnitTest::MockAxisAlignedBoxShapeComponent* AddShapeComponentToEntity(AZ::Entity* entity) { - m_layerSpawnerComponent = m_entity->CreateComponent(config); - m_app.RegisterComponentDescriptor(m_layerSpawnerComponent->CreateDescriptor()); + UnitTest::MockAxisAlignedBoxShapeComponent* shapeComponent = entity->CreateComponent(); + m_app.RegisterComponentDescriptor(shapeComponent->CreateDescriptor()); - m_shapeComponent = m_entity->CreateComponent(); - m_app.RegisterComponentDescriptor(m_shapeComponent->CreateDescriptor()); - - ASSERT_TRUE(m_layerSpawnerComponent); - ASSERT_TRUE(m_shapeComponent); - } - - void CreateMockTerrainSystem() - { - m_terrainSystem = AZStd::make_unique>(); + return shapeComponent; } }; -TEST_F(LayerSpawnerComponentTest, ActivatEntityActivateSuccess) +TEST_F(LayerSpawnerComponentTest, ActivateEntityWithoutShapeFails) { - CreateEntity(); - AddLayerSpawnerAndShapeComponentToEntity(); + auto entity = CreateEntity(); - m_entity->Activate(); - EXPECT_EQ(m_entity->GetState(), AZ::Entity::State::Active); - - m_entity->Deactivate(); + AddLayerSpawnerToEntity(entity.get(), Terrain::TerrainLayerSpawnerConfig()); + + const AZ::Entity::DependencySortOutcome sortOutcome = entity->EvaluateDependenciesGetDetails(); + EXPECT_FALSE(sortOutcome.IsSuccess()); + + entity.reset(); +} + +TEST_F(LayerSpawnerComponentTest, ActivateEntityActivateSuccess) +{ + auto entity = CreateEntity(); + + AddLayerSpawnerToEntity(entity.get(), Terrain::TerrainLayerSpawnerConfig()); + AddShapeComponentToEntity(entity.get()); + + entity->Activate(); + EXPECT_EQ(entity->GetState(), AZ::Entity::State::Active); + + entity.reset(); } TEST_F(LayerSpawnerComponentTest, LayerSpawnerDefaultValuesCorrect) { - CreateEntity(); - AddLayerSpawnerAndShapeComponentToEntity(); + auto entity = CreateEntity(); + AddLayerSpawnerToEntity(entity.get(), Terrain::TerrainLayerSpawnerConfig()); + AddShapeComponentToEntity(entity.get()); - m_entity->Activate(); + entity->Activate(); AZ::u32 priority = 999, layer = 999; - Terrain::TerrainSpawnerRequestBus::Event(m_entity->GetId(), &Terrain::TerrainSpawnerRequestBus::Events::GetPriority, layer, priority); + Terrain::TerrainSpawnerRequestBus::Event(entity->GetId(), &Terrain::TerrainSpawnerRequestBus::Events::GetPriority, layer, priority); EXPECT_EQ(0, priority); EXPECT_EQ(1, layer); bool useGroundPlane = false; - Terrain::TerrainSpawnerRequestBus::EventResult(useGroundPlane, m_entity->GetId(), &Terrain::TerrainSpawnerRequestBus::Events::GetUseGroundPlane); + Terrain::TerrainSpawnerRequestBus::EventResult( + useGroundPlane, entity->GetId(), &Terrain::TerrainSpawnerRequestBus::Events::GetUseGroundPlane); EXPECT_TRUE(useGroundPlane); - m_entity->Deactivate(); + entity.reset(); } TEST_F(LayerSpawnerComponentTest, LayerSpawnerConfigValuesCorrect) { - CreateEntity(); + auto entity = CreateEntity(); constexpr static AZ::u32 testPriority = 15; constexpr static AZ::u32 testLayer = 0; @@ -131,12 +128,13 @@ TEST_F(LayerSpawnerComponentTest, LayerSpawnerConfigValuesCorrect) config.m_priority = testPriority; config.m_useGroundPlane = false; - AddLayerSpawnerAndShapeComponentToEntity(config); + AddLayerSpawnerToEntity(entity.get(), config); + AddShapeComponentToEntity(entity.get()); - m_entity->Activate(); + entity->Activate(); AZ::u32 priority = 999, layer = 999; - Terrain::TerrainSpawnerRequestBus::Event(m_entity->GetId(), &Terrain::TerrainSpawnerRequestBus::Events::GetPriority, layer, priority); + Terrain::TerrainSpawnerRequestBus::Event(entity->GetId(), &Terrain::TerrainSpawnerRequestBus::Events::GetPriority, layer, priority); EXPECT_EQ(testPriority, priority); EXPECT_EQ(testLayer, layer); @@ -144,82 +142,86 @@ TEST_F(LayerSpawnerComponentTest, LayerSpawnerConfigValuesCorrect) bool useGroundPlane = true; Terrain::TerrainSpawnerRequestBus::EventResult( - useGroundPlane, m_entity->GetId(), &Terrain::TerrainSpawnerRequestBus::Events::GetUseGroundPlane); + useGroundPlane, entity->GetId(), &Terrain::TerrainSpawnerRequestBus::Events::GetUseGroundPlane); EXPECT_FALSE(useGroundPlane); - m_entity->Deactivate(); + entity.reset(); } TEST_F(LayerSpawnerComponentTest, LayerSpawnerRegisterAreaUpdatesTerrainSystem) { - CreateEntity(); + auto entity = CreateEntity(); - CreateMockTerrainSystem(); + NiceMock terrainSystem; // The Activate call should register the area. - EXPECT_CALL(*m_terrainSystem, RegisterArea(_)).Times(1); + EXPECT_CALL(terrainSystem, RegisterArea(_)).Times(1); - AddLayerSpawnerAndShapeComponentToEntity(); + AddLayerSpawnerToEntity(entity.get(), Terrain::TerrainLayerSpawnerConfig()); + AddShapeComponentToEntity(entity.get()); - m_entity->Activate(); + entity->Activate(); - m_entity->Deactivate(); + entity.reset(); } TEST_F(LayerSpawnerComponentTest, LayerSpawnerUnregisterAreaUpdatesTerrainSystem) { - CreateEntity(); + auto entity = CreateEntity(); - CreateMockTerrainSystem(); + NiceMock terrainSystem; // The Deactivate call should unregister the area. - EXPECT_CALL(*m_terrainSystem, UnregisterArea(_)).Times(1); + EXPECT_CALL(terrainSystem, UnregisterArea(_)).Times(1); - AddLayerSpawnerAndShapeComponentToEntity(); + AddLayerSpawnerToEntity(entity.get(), Terrain::TerrainLayerSpawnerConfig()); + AddShapeComponentToEntity(entity.get()); - m_entity->Activate(); + entity->Activate(); - m_entity->Deactivate(); + entity.reset(); } TEST_F(LayerSpawnerComponentTest, LayerSpawnerTransformChangedUpdatesTerrainSystem) { - CreateEntity(); + auto entity = CreateEntity(); - CreateMockTerrainSystem(); + NiceMock terrainSystem; // The TransformChanged call should refresh the area. - EXPECT_CALL(*m_terrainSystem, RefreshArea(_, _)).Times(1); + EXPECT_CALL(terrainSystem, RefreshArea(_, _)).Times(1); - AddLayerSpawnerAndShapeComponentToEntity(); + AddLayerSpawnerToEntity(entity.get(), Terrain::TerrainLayerSpawnerConfig()); + AddShapeComponentToEntity(entity.get()); - m_entity->Activate(); + entity->Activate(); // The component gets transform change notifications via the shape bus. LmbrCentral::ShapeComponentNotificationsBus::Event( - m_entity->GetId(), &LmbrCentral::ShapeComponentNotificationsBus::Events::OnShapeChanged, + entity->GetId(), &LmbrCentral::ShapeComponentNotificationsBus::Events::OnShapeChanged, LmbrCentral::ShapeComponentNotifications::ShapeChangeReasons::TransformChanged); - m_entity->Deactivate(); + entity.reset(); } TEST_F(LayerSpawnerComponentTest, LayerSpawnerShapeChangedUpdatesTerrainSystem) { - CreateEntity(); + auto entity = CreateEntity(); - CreateMockTerrainSystem(); + NiceMock terrainSystem; // The ShapeChanged call should refresh the area. - EXPECT_CALL(*m_terrainSystem, RefreshArea(_, _)).Times(1); + EXPECT_CALL(terrainSystem, RefreshArea(_, _)).Times(1); - AddLayerSpawnerAndShapeComponentToEntity(); + AddLayerSpawnerToEntity(entity.get(), Terrain::TerrainLayerSpawnerConfig()); + AddShapeComponentToEntity(entity.get()); - m_entity->Activate(); + entity->Activate(); - LmbrCentral::ShapeComponentNotificationsBus::Event( - m_entity->GetId(), &LmbrCentral::ShapeComponentNotificationsBus::Events::OnShapeChanged, + LmbrCentral::ShapeComponentNotificationsBus::Event( + entity->GetId(), &LmbrCentral::ShapeComponentNotificationsBus::Events::OnShapeChanged, LmbrCentral::ShapeComponentNotifications::ShapeChangeReasons::ShapeChanged); - m_entity->Deactivate(); + entity.reset(); } diff --git a/Gems/Terrain/Code/Tests/SurfaceMaterialsListTest.cpp b/Gems/Terrain/Code/Tests/SurfaceMaterialsListTest.cpp index 686ca349f5..a9abc333f1 100644 --- a/Gems/Terrain/Code/Tests/SurfaceMaterialsListTest.cpp +++ b/Gems/Terrain/Code/Tests/SurfaceMaterialsListTest.cpp @@ -63,8 +63,10 @@ namespace UnitTest } }; - TEST_F(TerrainSurfaceMaterialsListTest, SurfaceGradientListRequiresShapeToActivate) + TEST_F(TerrainSurfaceMaterialsListTest, SurfaceMaterialsListRequiresShapeToActivate) { + // Check that the component requires a shape service to activate: trying to Activate the entity will cause the test to fail, so + // use the EvaluateDependenciesGetDetails function to check the dependencies are met. auto entity = CreateEntity(); AddSurfaceMaterialListComponent(entity.get()); @@ -75,7 +77,7 @@ namespace UnitTest entity.reset(); } - TEST_F(TerrainSurfaceMaterialsListTest, SurfaceGradientListActivatesSuccessfully) + TEST_F(TerrainSurfaceMaterialsListTest, SurfaceMaterialsListActivatesSuccessfully) { auto entity = CreateEntityWithShapeComponents(); diff --git a/Gems/Terrain/Code/Tests/TerrainHeightGradientListTests.cpp b/Gems/Terrain/Code/Tests/TerrainHeightGradientListTests.cpp index ec500d6ada..57a4e0ee03 100644 --- a/Gems/Terrain/Code/Tests/TerrainHeightGradientListTests.cpp +++ b/Gems/Terrain/Code/Tests/TerrainHeightGradientListTests.cpp @@ -17,9 +17,9 @@ #include #include #include +#include using ::testing::_; -using ::testing::AtLeast; using ::testing::Mock; using ::testing::NiceMock; using ::testing::Return; @@ -29,8 +29,6 @@ class TerrainHeightGradientListComponentTest : public ::testing::Test protected: AZ::ComponentApplication m_app; - AZStd::unique_ptr m_entity; - void SetUp() override { AZ::ComponentApplication::Descriptor appDesc; @@ -46,47 +44,70 @@ protected: m_app.Destroy(); } - void CreateEntity() + AZStd::unique_ptr CreateEntity() { - m_entity = AZStd::make_unique(); - ASSERT_TRUE(m_entity); - - // Create the required box component. - UnitTest::MockAxisAlignedBoxShapeComponent* boxComponent = m_entity->CreateComponent(); - m_app.RegisterComponentDescriptor(boxComponent->CreateDescriptor()); + auto entity = AZStd::make_unique(); + entity->Init(); + return entity; + } + Terrain::TerrainHeightGradientListComponent* AddHeightGradientListToEntity(AZ::Entity* entity) + { // Create the TerrainHeightGradientListComponent with an entity in its configuration. Terrain::TerrainHeightGradientListConfig config; - config.m_gradientEntities.push_back(m_entity->GetId()); + config.m_gradientEntities.push_back(entity->GetId()); - Terrain::TerrainHeightGradientListComponent* heightGradientListComponent = m_entity->CreateComponent(config); + auto heightGradientListComponent = entity->CreateComponent(config); m_app.RegisterComponentDescriptor(heightGradientListComponent->CreateDescriptor()); - // Create a MockTerrainLayerSpawnerComponent to provide the required TerrainAreaService. - UnitTest::MockTerrainLayerSpawnerComponent* layerSpawner = m_entity->CreateComponent(); - m_app.RegisterComponentDescriptor(layerSpawner->CreateDescriptor()); + return heightGradientListComponent; + } - m_entity->Init(); + void AddRequiredComponetsToEntity(AZ::Entity* entity) + { + // Create the required box component. + UnitTest::MockAxisAlignedBoxShapeComponent* boxComponent = entity->CreateComponent(); + m_app.RegisterComponentDescriptor(boxComponent->CreateDescriptor()); + + // Create a MockTerrainLayerSpawnerComponent to provide the required TerrainAreaService. + UnitTest::MockTerrainLayerSpawnerComponent* layerSpawner = entity->CreateComponent(); + m_app.RegisterComponentDescriptor(layerSpawner->CreateDescriptor()); } }; +TEST_F(TerrainHeightGradientListComponentTest, MissingRequiredComponentsActivateFailure) +{ + auto entity = CreateEntity(); + + AddHeightGradientListToEntity(entity.get()); + + const AZ::Entity::DependencySortOutcome sortOutcome = entity->EvaluateDependenciesGetDetails(); + EXPECT_FALSE(sortOutcome.IsSuccess()); +} + TEST_F(TerrainHeightGradientListComponentTest, ActivateEntityActivateSuccess) { // Check that the entity activates. - CreateEntity(); + auto entity = CreateEntity(); - m_entity->Activate(); - EXPECT_EQ(m_entity->GetState(), AZ::Entity::State::Active); + AddHeightGradientListToEntity(entity.get()); - m_entity.reset(); + AddRequiredComponetsToEntity(entity.get()); + + entity->Activate(); + EXPECT_EQ(entity->GetState(), AZ::Entity::State::Active); } TEST_F(TerrainHeightGradientListComponentTest, TerrainHeightGradientRefreshesTerrainSystem) { // Check that the HeightGradientListComponent informs the TerrainSystem when the composition changes. - CreateEntity(); + auto entity = CreateEntity(); - m_entity->Activate(); + AddHeightGradientListToEntity(entity.get()); + + AddRequiredComponetsToEntity(entity.get()); + + entity->Activate(); NiceMock terrainSystem; @@ -95,32 +116,34 @@ TEST_F(TerrainHeightGradientListComponentTest, TerrainHeightGradientRefreshesTer // and once when the HeightGradientListComponent gets the OnCompositionChanged directly through the DependencyNotificationBus. EXPECT_CALL(terrainSystem, RefreshArea(_, _)).Times(2); - LmbrCentral::DependencyNotificationBus::Event(m_entity->GetId(), &LmbrCentral::DependencyNotificationBus::Events::OnCompositionChanged); + LmbrCentral::DependencyNotificationBus::Event(entity->GetId(), &LmbrCentral::DependencyNotificationBus::Events::OnCompositionChanged); // Stop the EXPECT_CALL check now, as OnCompositionChanged will get called twice again during the reset. Mock::VerifyAndClearExpectations(&terrainSystem); - - m_entity.reset(); } TEST_F(TerrainHeightGradientListComponentTest, TerrainHeightGradientListReturnsHeights) { // Check that the HeightGradientListComponent returns expected height values. - CreateEntity(); + auto entity = CreateEntity(); - NiceMock heightfieldRequestBus(m_entity->GetId()); + AddHeightGradientListToEntity(entity.get()); - m_entity->Activate(); + AddRequiredComponetsToEntity(entity.get()); + + NiceMock heightfieldRequestBus(entity->GetId()); + + entity->Activate(); const float mockGradientValue = 0.25f; - NiceMock gradientRequests(m_entity->GetId()); + NiceMock gradientRequests(entity->GetId()); ON_CALL(gradientRequests, GetValue).WillByDefault(Return(mockGradientValue)); // Setup a mock to provide the encompassing Aabb to the HeightGradientListComponent. const float min = 0.0f; const float max = 1000.0f; const AZ::Aabb aabb = AZ::Aabb::CreateFromMinMax(AZ::Vector3(min), AZ::Vector3(max)); - NiceMock mockShapeRequests(m_entity->GetId()); + NiceMock mockShapeRequests(entity->GetId()); ON_CALL(mockShapeRequests, GetEncompassingAabb).WillByDefault(Return(aabb)); const float worldMax = 10000.0f; @@ -130,17 +153,16 @@ TEST_F(TerrainHeightGradientListComponentTest, TerrainHeightGradientListReturnsH ON_CALL(mockterrainDataRequests, GetTerrainAabb).WillByDefault(Return(worldAabb)); // Ensure the cached values in the HeightGradientListComponent are up to date. - LmbrCentral::DependencyNotificationBus::Event(m_entity->GetId(), &LmbrCentral::DependencyNotificationBus::Events::OnCompositionChanged); + LmbrCentral::DependencyNotificationBus::Event(entity->GetId(), &LmbrCentral::DependencyNotificationBus::Events::OnCompositionChanged); const AZ::Vector3 inPosition = AZ::Vector3::CreateZero(); AZ::Vector3 outPosition = AZ::Vector3::CreateZero(); bool terrainExists = false; - Terrain::TerrainAreaHeightRequestBus::Event(m_entity->GetId(), &Terrain::TerrainAreaHeightRequestBus::Events::GetHeight, inPosition, outPosition, terrainExists); + Terrain::TerrainAreaHeightRequestBus::Event( + entity->GetId(), &Terrain::TerrainAreaHeightRequestBus::Events::GetHeight, inPosition, outPosition, terrainExists); const float height = outPosition.GetZ(); EXPECT_NEAR(height, mockGradientValue * max, 0.01f); - - m_entity.reset(); } diff --git a/Gems/Terrain/Code/Tests/TerrainMacroMaterialTests.cpp b/Gems/Terrain/Code/Tests/TerrainMacroMaterialTests.cpp new file mode 100644 index 0000000000..a3b772035f --- /dev/null +++ b/Gems/Terrain/Code/Tests/TerrainMacroMaterialTests.cpp @@ -0,0 +1,86 @@ +/* + * Copyright (c) Contributors to the Open 3D Engine Project. + * For complete copyright and license terms please see the LICENSE at the root of this distribution. + * + * SPDX-License-Identifier: Apache-2.0 OR MIT + * + */ + +#include +#include +#include + +#include + +#include +#include +#include + +#include +#include + +using ::testing::NiceMock; +using ::testing::AtLeast; +using ::testing::_; + + +class TerrainMacroMaterialComponentTest + : public ::testing::Test +{ +protected: + AZ::ComponentApplication m_app; + + UnitTest::MockAxisAlignedBoxShapeComponent* m_shapeComponent; + + void SetUp() override + { + AZ::ComponentApplication::Descriptor appDesc; + appDesc.m_memoryBlocksByteSize = 20 * 1024 * 1024; + appDesc.m_recordingMode = AZ::Debug::AllocationRecords::RECORD_NO_RECORDS; + appDesc.m_stackRecordLevels = 20; + + m_app.Create(appDesc); + } + + void TearDown() override + { + m_app.Destroy(); + } + + AZStd::unique_ptr CreateEntity() + { + auto entity = AZStd::make_unique(); + entity->Init(); + + return entity; + } +}; + +TEST_F(TerrainMacroMaterialComponentTest, MissingRequiredComponentsActivateFailure) +{ + auto entity = CreateEntity(); + + auto macroMaterialComponent = entity->CreateComponent(); + m_app.RegisterComponentDescriptor(macroMaterialComponent->CreateDescriptor()); + + const AZ::Entity::DependencySortOutcome sortOutcome = entity->EvaluateDependenciesGetDetails(); + EXPECT_FALSE(sortOutcome.IsSuccess()); + + entity.reset(); +} + +TEST_F(TerrainMacroMaterialComponentTest, RequiredComponentsPresentEntityActivateSuccess) +{ + auto entity = CreateEntity(); + + auto macroMaterialComponent = entity->CreateComponent(); + m_app.RegisterComponentDescriptor(macroMaterialComponent->CreateDescriptor()); + + auto shapeComponent = entity->CreateComponent(); + m_app.RegisterComponentDescriptor(shapeComponent->CreateDescriptor()); + + entity->Activate(); + EXPECT_EQ(entity->GetState(), AZ::Entity::State::Active); + + entity.reset(); +} diff --git a/Gems/Terrain/Code/Tests/TerrainPhysicsColliderTests.cpp b/Gems/Terrain/Code/Tests/TerrainPhysicsColliderTests.cpp index d1deca897c..340acfbaac 100644 --- a/Gems/Terrain/Code/Tests/TerrainPhysicsColliderTests.cpp +++ b/Gems/Terrain/Code/Tests/TerrainPhysicsColliderTests.cpp @@ -21,7 +21,7 @@ #include #include -#include +#include using ::testing::NiceMock; using ::testing::AtLeast; @@ -290,3 +290,165 @@ TEST_F(TerrainPhysicsColliderComponentTest, TerrainPhysicsColliderReturnsRelativ m_entity->Reset(); } + +TEST_F(TerrainPhysicsColliderComponentTest, TerrainPhysicsColliderReturnsMaterials) +{ + // Check that the TerrainPhysicsCollider returns all the assigned materials. + CreateEntity(); + + m_boxComponent = m_entity->CreateComponent(); + m_app.RegisterComponentDescriptor(m_boxComponent->CreateDescriptor()); + + // Create two SurfaceTag/Material mappings and add them to the collider. + Terrain::TerrainPhysicsColliderConfig config; + + const Physics::MaterialId mat1 = Physics::MaterialId::Create(); + const Physics::MaterialId mat2 = Physics::MaterialId::Create(); + + const SurfaceData::SurfaceTag tag1 = SurfaceData::SurfaceTag("tag1"); + const SurfaceData::SurfaceTag tag2 = SurfaceData::SurfaceTag("tag2"); + + Terrain::TerrainPhysicsSurfaceMaterialMapping mapping1; + mapping1.m_materialId = mat1; + mapping1.m_surfaceTag = tag1; + config.m_surfaceMaterialMappings.emplace_back(mapping1); + + Terrain::TerrainPhysicsSurfaceMaterialMapping mapping2; + mapping2.m_materialId = mat2; + mapping2.m_surfaceTag = tag2; + config.m_surfaceMaterialMappings.emplace_back(mapping2); + + m_colliderComponent = m_entity->CreateComponent(config); + m_app.RegisterComponentDescriptor(m_colliderComponent->CreateDescriptor()); + + m_entity->Activate(); + + AZStd::vector materialList; + Physics::HeightfieldProviderRequestsBus::EventResult( + materialList, m_entity->GetId(), &Physics::HeightfieldProviderRequestsBus::Events::GetMaterialList); + + // The materialList should be 3 items long: the two materials we've added, plus a default material. + EXPECT_EQ(materialList.size(), 3); + + Physics::MaterialId defaultMaterial = Physics::MaterialId(); + EXPECT_EQ(materialList[0], defaultMaterial); + EXPECT_EQ(materialList[1], mat1); + EXPECT_EQ(materialList[2], mat2); + + m_entity.reset(); +} + +TEST_F(TerrainPhysicsColliderComponentTest, TerrainPhysicsColliderReturnsMaterialsWhenNotMapped) +{ + // Check that the TerrainPhysicsCollider returns a default material when no surfaces are mapped. + CreateEntity(); + + m_boxComponent = m_entity->CreateComponent(); + m_app.RegisterComponentDescriptor(m_boxComponent->CreateDescriptor()); + + m_colliderComponent = m_entity->CreateComponent(); + m_app.RegisterComponentDescriptor(m_colliderComponent->CreateDescriptor()); + + m_entity->Activate(); + + AZStd::vector materialList; + Physics::HeightfieldProviderRequestsBus::EventResult( + materialList, m_entity->GetId(), &Physics::HeightfieldProviderRequestsBus::Events::GetMaterialList); + + // The materialList should be 1 items long: which should be the default material. + EXPECT_EQ(materialList.size(), 1); + + Physics::MaterialId defaultMaterial = Physics::MaterialId(); + EXPECT_EQ(materialList[0], defaultMaterial); + + m_entity.reset(); +} + +TEST_F(TerrainPhysicsColliderComponentTest, TerrainPhysicsColliderGetHeightsAndMaterialsReturnsCorrectly) +{ + // Check that the TerrainPhysicsCollider returns a heightfield of the expected size. + CreateEntity(); + + m_boxComponent = m_entity->CreateComponent(); + m_app.RegisterComponentDescriptor(m_boxComponent->CreateDescriptor()); + + // Create two SurfaceTag/Material mappings and add them to the collider. + Terrain::TerrainPhysicsColliderConfig config; + + const Physics::MaterialId mat1 = Physics::MaterialId::Create(); + const Physics::MaterialId mat2 = Physics::MaterialId::Create(); + + const SurfaceData::SurfaceTag tag1 = SurfaceData::SurfaceTag("tag1"); + const SurfaceData::SurfaceTag tag2 = SurfaceData::SurfaceTag("tag2"); + + Terrain::TerrainPhysicsSurfaceMaterialMapping mapping1; + mapping1.m_materialId = mat1; + mapping1.m_surfaceTag = tag1; + config.m_surfaceMaterialMappings.emplace_back(mapping1); + + Terrain::TerrainPhysicsSurfaceMaterialMapping mapping2; + mapping2.m_materialId = mat2; + mapping2.m_surfaceTag = tag2; + config.m_surfaceMaterialMappings.emplace_back(mapping2); + + m_colliderComponent = m_entity->CreateComponent(config); + m_app.RegisterComponentDescriptor(m_colliderComponent->CreateDescriptor()); + + m_entity->Activate(); + + const AZ::Vector3 boundsMin = AZ::Vector3(0.0f); + const AZ::Vector3 boundsMax = AZ::Vector3(256.0f, 256.0f, 32768.0f); + + NiceMock boxShape(m_entity->GetId()); + const AZ::Aabb bounds = AZ::Aabb::CreateFromMinMax(boundsMin, boundsMax); + ON_CALL(boxShape, GetEncompassingAabb).WillByDefault(Return(bounds)); + + const float mockHeight = 32768.0f; + AZ::Vector2 mockHeightResolution = AZ::Vector2(1.0f); + + AzFramework::SurfaceData::SurfaceTagWeight return1; + return1.m_surfaceType = tag1; + return1.m_weight = 1.0f; + + AzFramework::SurfaceData::SurfaceTagWeight return2; + return2.m_surfaceType = tag2; + return2.m_weight = 1.0f; + + NiceMock terrainListener; + ON_CALL(terrainListener, GetTerrainHeightQueryResolution).WillByDefault(Return(mockHeightResolution)); + ON_CALL(terrainListener, GetHeightFromFloats).WillByDefault(Return(mockHeight)); + ON_CALL(terrainListener, GetMaxSurfaceWeightFromFloats) + .WillByDefault( + [return1, return2]( + [[maybe_unused]] float x, [[maybe_unused]] float y, + [[maybe_unused]] AzFramework::Terrain::TerrainDataRequests::Sampler sampleFilter, [[maybe_unused]] bool* terrainExistsPtr) + { + // return tag1 for the first half of the rows, tag2 for the rest. + if (y < 128.0) + { + return return1; + } + return return2; + }); + + AZStd::vector heightsAndMaterials; + + Physics::HeightfieldProviderRequestsBus::EventResult( + heightsAndMaterials, m_entity->GetId(), &Physics::HeightfieldProviderRequestsBus::Events::GetHeightsAndMaterials); + + // We set the bounds to 256, so check that the correct number of entries are present. + EXPECT_EQ(heightsAndMaterials.size(), 256 * 256); + + const float expectedHeightValue = 16384.0f; + + // + // Check an entry from the first half of the returned list. + EXPECT_EQ(heightsAndMaterials[0].m_materialIndex, 1); + EXPECT_NEAR(heightsAndMaterials[0].m_height, expectedHeightValue, 0.01f); + + // Check an entry from the second half of the list + EXPECT_EQ(heightsAndMaterials[256 * 128].m_materialIndex, 2); + EXPECT_NEAR(heightsAndMaterials[256 * 128].m_height, expectedHeightValue, 0.01f); + + m_entity.reset(); +} diff --git a/Gems/Terrain/Code/Tests/TerrainSurfaceGradientListTests.cpp b/Gems/Terrain/Code/Tests/TerrainSurfaceGradientListTests.cpp index dea861bda5..71f5d64fa8 100644 --- a/Gems/Terrain/Code/Tests/TerrainSurfaceGradientListTests.cpp +++ b/Gems/Terrain/Code/Tests/TerrainSurfaceGradientListTests.cpp @@ -11,8 +11,6 @@ #include using ::testing::NiceMock; -using ::testing::AtLeast; -using ::testing::_; using ::testing::Return; namespace UnitTest @@ -22,10 +20,6 @@ namespace UnitTest protected: AZ::ComponentApplication m_app; - AZStd::unique_ptr m_entity; - UnitTest::MockTerrainLayerSpawnerComponent* m_layerSpawnerComponent = nullptr; - AZStd::unique_ptr m_gradientEntity1, m_gradientEntity2; - const AZStd::string surfaceTag1 = "testtag1"; const AZStd::string surfaceTag2 = "testtag2"; @@ -37,81 +31,76 @@ namespace UnitTest appDesc.m_stackRecordLevels = 20; m_app.Create(appDesc); - - CreateEntities(); } void TearDown() override { - m_gradientEntity2.reset(); - m_gradientEntity1.reset(); - m_entity.reset(); - m_app.Destroy(); } - void CreateEntities() + AZStd::unique_ptr CreateEntity() { - m_entity = AZStd::make_unique(); - ASSERT_TRUE(m_entity); - - m_entity->Init(); - - m_gradientEntity1 = AZStd::make_unique(); - ASSERT_TRUE(m_gradientEntity1); - - m_gradientEntity1->Init(); - - m_gradientEntity2 = AZStd::make_unique(); - ASSERT_TRUE(m_gradientEntity2); - - m_gradientEntity2->Init(); + auto entity = AZStd::make_unique(); + entity->Init(); + return entity; } - void AddSurfaceGradientListToEntities() + UnitTest::MockTerrainLayerSpawnerComponent* AddRequiredComponentsToEntity(AZ::Entity* entity) { - m_layerSpawnerComponent = m_entity->CreateComponent(); - m_app.RegisterComponentDescriptor(m_layerSpawnerComponent->CreateDescriptor()); + auto layerSpawnerComponent = entity->CreateComponent(); + m_app.RegisterComponentDescriptor(layerSpawnerComponent->CreateDescriptor()); - Terrain::TerrainSurfaceGradientListConfig config; - - Terrain::TerrainSurfaceGradientMapping mapping1; - mapping1.m_gradientEntityId = m_gradientEntity1->GetId(); - mapping1.m_surfaceTag = SurfaceData::SurfaceTag(surfaceTag1); - config.m_gradientSurfaceMappings.emplace_back(mapping1); - - Terrain::TerrainSurfaceGradientMapping mapping2; - mapping2.m_gradientEntityId = m_gradientEntity2->GetId(); - mapping2.m_surfaceTag = SurfaceData::SurfaceTag(surfaceTag2); - config.m_gradientSurfaceMappings.emplace_back(mapping2); - - Terrain::TerrainSurfaceGradientListComponent* terrainSurfaceGradientListComponent = - m_entity->CreateComponent(config); - m_app.RegisterComponentDescriptor(terrainSurfaceGradientListComponent->CreateDescriptor()); + return layerSpawnerComponent; } }; + TEST_F(TerrainSurfaceGradientListTest, SurfaceGradientMissingRequirementsActivateFails) + { + auto entity = CreateEntity(); + + auto terrainSurfaceGradientListComponent = entity->CreateComponent(); + m_app.RegisterComponentDescriptor(terrainSurfaceGradientListComponent->CreateDescriptor()); + + const AZ::Entity::DependencySortOutcome sortOutcome = entity->EvaluateDependenciesGetDetails(); + EXPECT_FALSE(sortOutcome.IsSuccess()); + } + + TEST_F(TerrainSurfaceGradientListTest, SurfaceGradientActivateSuccess) + { + auto entity = CreateEntity(); + + AddRequiredComponentsToEntity(entity.get()); + + auto terrainSurfaceGradientListComponent = entity->CreateComponent(); + m_app.RegisterComponentDescriptor(terrainSurfaceGradientListComponent->CreateDescriptor()); + + entity->Activate(); + + EXPECT_EQ(entity->GetState(), AZ::Entity::State::Active); + } + TEST_F(TerrainSurfaceGradientListTest, SurfaceGradientReturnsSurfaceWeights) { // When there is more than one surface/weight defined and added to the component, they should all // be returned. The component isn't required to return them in descending order. - AddSurfaceGradientListToEntities(); + auto entity = CreateEntity(); - m_entity->Activate(); - m_gradientEntity1->Activate(); - m_gradientEntity2->Activate(); + AddRequiredComponentsToEntity(entity.get()); + + auto gradientEntity1 = CreateEntity(); + auto gradientEntity2 = CreateEntity(); const float gradient1Value = 0.3f; - NiceMock mockGradientRequests1(m_gradientEntity1->GetId()); + NiceMock mockGradientRequests1(gradientEntity1->GetId()); ON_CALL(mockGradientRequests1, GetValue).WillByDefault(Return(gradient1Value)); const float gradient2Value = 1.0f; - NiceMock mockGradientRequests2(m_gradientEntity2->GetId()); + NiceMock mockGradientRequests2(gradientEntity2->GetId()); ON_CALL(mockGradientRequests2, GetValue).WillByDefault(Return(gradient2Value)); AzFramework::SurfaceData::SurfaceTagWeightList weightList; Terrain::TerrainAreaSurfaceRequestBus::Event( - m_entity->GetId(), &Terrain::TerrainAreaSurfaceRequestBus::Events::GetSurfaceWeights, AZ::Vector3::CreateZero(), weightList); + entity->GetId(), &Terrain::TerrainAreaSurfaceRequestBus::Events::GetSurfaceWeights, AZ::Vector3::CreateZero(), weightList); AZ::Crc32 expectedCrcList[] = { AZ::Crc32(surfaceTag1), AZ::Crc32(surfaceTag2) }; const float expectedWeightList[] = { gradient1Value, gradient2Value }; diff --git a/Gems/Terrain/Code/Tests/TerrainSystemBenchmarks.cpp b/Gems/Terrain/Code/Tests/TerrainSystemBenchmarks.cpp new file mode 100644 index 0000000000..3d0cb5222e --- /dev/null +++ b/Gems/Terrain/Code/Tests/TerrainSystemBenchmarks.cpp @@ -0,0 +1,421 @@ +/* + * Copyright (c) Contributors to the Open 3D Engine Project. + * For complete copyright and license terms please see the LICENSE at the root of this distribution. + * + * SPDX-License-Identifier: Apache-2.0 OR MIT + * + */ + +#ifdef HAVE_BENCHMARK + +#include +#include +#include +#include +#include +#include +#include +#include + +#include +#include +#include + +#include + +#include +#include + +#include +#include +#include +#include + +#include + +namespace UnitTest +{ + using ::testing::NiceMock; + using ::testing::Return; + + class TerrainSystemBenchmarkFixture + : public UnitTest::AllocatorsBenchmarkFixture + , public UnitTest::TraceBusRedirector + { + public: + void SetUp(const benchmark::State& state) override + { + InternalSetUp(state); + } + void SetUp(benchmark::State& state) override + { + InternalSetUp(state); + } + + void TearDown(const benchmark::State& state) override + { + InternalTearDown(state); + } + void TearDown(benchmark::State& state) override + { + InternalTearDown(state); + } + + void InternalSetUp(const benchmark::State& state) + { + AZ::Debug::TraceMessageBus::Handler::BusConnect(); + UnitTest::AllocatorsBenchmarkFixture::SetUp(state); + + m_app = AZStd::make_unique(); + ASSERT_TRUE(m_app != nullptr); + + AZ::ComponentApplication::Descriptor componentAppDesc; + + AZ::Entity* systemEntity = m_app->Create(componentAppDesc); + ASSERT_TRUE(systemEntity != nullptr); + m_app->AddEntity(systemEntity); + + AZ::AllocatorInstance::Create(); + } + + void InternalTearDown(const benchmark::State& state) + { + AZ::AllocatorInstance::Destroy(); + + m_app->Destroy(); + m_app.reset(); + + UnitTest::AllocatorsBenchmarkFixture::TearDown(state); + AZ::Debug::TraceMessageBus::Handler::BusDisconnect(); + } + + AZStd::unique_ptr CreateEntity() + { + return AZStd::make_unique(); + } + + void ActivateEntity(AZ::Entity* entity) + { + entity->Init(); + entity->Activate(); + } + + template + Component* CreateComponent(AZ::Entity* entity, const Configuration& config) + { + m_app->RegisterComponentDescriptor(Component::CreateDescriptor()); + return entity->CreateComponent(config); + } + + template + Component* CreateComponent(AZ::Entity* entity) + { + m_app->RegisterComponentDescriptor(Component::CreateDescriptor()); + return entity->CreateComponent(); + } + + // Create a terrain system with reasonable defaults for testing, but with the ability to override the defaults + // on a test-by-test basis. + AZStd::unique_ptr CreateAndActivateTerrainSystem( + AZ::Vector2 queryResolution = AZ::Vector2(1.0f), + AZ::Aabb worldBounds = AZ::Aabb::CreateFromMinMax(AZ::Vector3(-128.0f), AZ::Vector3(128.0f))) + { + // Create the terrain system and give it one tick to fully initialize itself. + auto terrainSystem = AZStd::make_unique(); + terrainSystem->SetTerrainAabb(worldBounds); + terrainSystem->SetTerrainHeightQueryResolution(queryResolution); + terrainSystem->Activate(); + AZ::TickBus::Broadcast(&AZ::TickBus::Events::OnTick, 0.f, AZ::ScriptTimePoint{}); + return terrainSystem; + } + + // Create a mock shape bus listener that will listen to the given EntityId for shape requests and returns the following: + // - GetEncompassingAabb - returns the given Aabb + // - GetTransformAndLocalBounds - returns the center of the Aabb as the transform, and the size of the Aabb as the local bounds + // - IsPointInside - true if the point is in the Aabb, false if not + AZStd::unique_ptr> CreateMockShape( + const AZ::Aabb& spawnerBox, const AZ::EntityId& shapeEntityId) + { + AZStd::unique_ptr> mockShape = + AZStd::make_unique>(shapeEntityId); + + ON_CALL(*mockShape, GetEncompassingAabb).WillByDefault(Return(spawnerBox)); + ON_CALL(*mockShape, GetTransformAndLocalBounds) + .WillByDefault( + [spawnerBox](AZ::Transform& transform, AZ::Aabb& bounds) + { + transform = AZ::Transform::CreateTranslation(spawnerBox.GetCenter()); + bounds = spawnerBox.GetTranslated(-spawnerBox.GetCenter()); + }); + ON_CALL(*mockShape, IsPointInside) + .WillByDefault( + [spawnerBox](const AZ::Vector3& point) -> bool + { + return spawnerBox.Contains(point); + }); + + return mockShape; + } + + // Create an entity with a Random Gradient on it that can be used for gradient queries. + AZStd::unique_ptr CreateTestRandomGradientEntity(const AZ::Aabb& spawnerBox, uint32_t randomSeed) + { + // Create the base entity + AZStd::unique_ptr testGradientEntity = CreateEntity(); + + // Add a mock AABB Shape so that the shape requirement is fulfilled. + CreateComponent(testGradientEntity.get()); + + // Create the Random Gradient Component with some default parameters. + GradientSignal::RandomGradientConfig config; + config.m_randomSeed = randomSeed; + CreateComponent(testGradientEntity.get(), config); + + // Create the Gradient Transform Component with some default parameters. + GradientSignal::GradientTransformConfig gradientTransformConfig; + gradientTransformConfig.m_wrappingType = GradientSignal::WrappingType::None; + CreateComponent(testGradientEntity.get(), gradientTransformConfig); + + // Set the transform to match the given spawnerBox + auto transform = CreateComponent(testGradientEntity.get()); + transform->SetLocalTM(AZ::Transform::CreateTranslation(spawnerBox.GetCenter())); + transform->SetWorldTM(AZ::Transform::CreateTranslation(spawnerBox.GetCenter())); + + return testGradientEntity; + } + + AZStd::unique_ptr CreateTestLayerSpawnerEntity( + const AZ::Aabb& spawnerBox, const AZ::EntityId& heightGradientEntityId, + const Terrain::TerrainSurfaceGradientListConfig& surfaceConfig) + { + // Create the base entity + AZStd::unique_ptr testLayerSpawnerEntity = CreateEntity(); + + // Add a mock AABB Shape so that the shape requirement is fulfilled. + CreateComponent(testLayerSpawnerEntity.get()); + + // Add a Terrain Layer Spawner + CreateComponent(testLayerSpawnerEntity.get()); + + // Add a Terrain Height Gradient List with one entry pointing to the given gradient entity + Terrain::TerrainHeightGradientListConfig heightConfig; + heightConfig.m_gradientEntities.emplace_back(heightGradientEntityId); + CreateComponent(testLayerSpawnerEntity.get(), heightConfig); + + // Add a Terrain Surface Gradient List with however many entries we were given + CreateComponent(testLayerSpawnerEntity.get(), surfaceConfig); + + // Set the transform to match the given spawnerBox + auto transform = CreateComponent(testLayerSpawnerEntity.get()); + transform->SetLocalTM(AZ::Transform::CreateTranslation(spawnerBox.GetCenter())); + transform->SetWorldTM(AZ::Transform::CreateTranslation(spawnerBox.GetCenter())); + + return testLayerSpawnerEntity; + } + + void RunTerrainApiBenchmark( + benchmark::State& state, + AZStd::function ApiCaller) + { + // Get the ranges for querying from our benchmark parameters + float boundsRange = aznumeric_cast(state.range(0)); + uint32_t numSurfaces = aznumeric_cast(state.range(1)); + AzFramework::Terrain::TerrainDataRequests::Sampler sampler = + static_cast(state.range(2)); + + // Set up our world bounds and query resolution + AZ::Aabb worldBounds = AZ::Aabb::CreateFromMinMax(AZ::Vector3(-boundsRange / 2.0f), AZ::Vector3(boundsRange / 2.0f)); + AZ::Vector2 queryResolution = AZ::Vector2(1.0f); + + // Create a Random Gradient to use as our height provider + const uint32_t heightRandomSeed = 12345; + auto heightGradientEntity = CreateTestRandomGradientEntity(worldBounds, heightRandomSeed); + auto heightGradientShapeRequests = CreateMockShape(worldBounds, heightGradientEntity->GetId()); + ActivateEntity(heightGradientEntity.get()); + + + // Create a set of Random Gradients to use as our surface providers + Terrain::TerrainSurfaceGradientListConfig surfaceConfig; + AZStd::vector> surfaceGradientEntities; + AZStd::vector>> surfaceGradientShapeRequests; + for (uint32_t surfaces = 0; surfaces < numSurfaces; surfaces++) + { + const uint32_t surfaceRandomSeed = 23456 + surfaces; + auto surfaceGradientEntity = CreateTestRandomGradientEntity(worldBounds, surfaceRandomSeed); + auto shapeRequests = CreateMockShape(worldBounds, surfaceGradientEntity->GetId()); + ActivateEntity(surfaceGradientEntity.get()); + + // Give each gradient a new surface tag + surfaceConfig.m_gradientSurfaceMappings.emplace_back( + surfaceGradientEntity->GetId(), SurfaceData::SurfaceTag(AZStd::string::format("test%u", surfaces))); + + surfaceGradientEntities.emplace_back(AZStd::move(surfaceGradientEntity)); + surfaceGradientShapeRequests.emplace_back(AZStd::move(shapeRequests)); + } + + // Create a single Terrain Layer Spawner that covers the entire terrain world bounds + // (Do this *after* creating and activating the height and surface gradients) + auto testLayerSpawnerEntity = CreateTestLayerSpawnerEntity(worldBounds, heightGradientEntity->GetId(), surfaceConfig); + auto spawnerShapeRequests = CreateMockShape(worldBounds, testLayerSpawnerEntity->GetId()); + ActivateEntity(testLayerSpawnerEntity.get()); + + // Create the terrain system (do this after creating the terrain layer entity to ensure that we don't need any data refreshes) + auto terrainSystem = CreateAndActivateTerrainSystem(queryResolution, worldBounds); + + // Call the terrain API we're testing for every height and width in our ranges. + for (auto stateIterator : state) + { + ApiCaller(queryResolution, worldBounds, sampler); + } + + testLayerSpawnerEntity.reset(); + spawnerShapeRequests.reset(); + + heightGradientEntity.reset(); + heightGradientShapeRequests.reset(); + + surfaceGradientEntities.clear(); + surfaceGradientShapeRequests.clear(); + } + + protected: + AZStd::unique_ptr m_app; + }; + + + BENCHMARK_DEFINE_F(TerrainSystemBenchmarkFixture, BM_GetHeight)(benchmark::State& state) + { + // Run the benchmark + RunTerrainApiBenchmark( + state, + []([[maybe_unused]] const AZ::Vector2& queryResolution, const AZ::Aabb& worldBounds, + AzFramework::Terrain::TerrainDataRequests::Sampler sampler) + { + float worldMinZ = worldBounds.GetMin().GetZ(); + + for (float y = worldBounds.GetMin().GetY(); y < worldBounds.GetMax().GetY(); y += 1.0f) + { + for (float x = worldBounds.GetMin().GetX(); x < worldBounds.GetMax().GetX(); x += 1.0f) + { + float terrainHeight = worldMinZ; + bool terrainExists = false; + AzFramework::Terrain::TerrainDataRequestBus::BroadcastResult( + terrainHeight, &AzFramework::Terrain::TerrainDataRequests::GetHeightFromFloats, x, y, sampler, &terrainExists); + benchmark::DoNotOptimize(terrainHeight); + } + } + }); + } + + BENCHMARK_REGISTER_F(TerrainSystemBenchmarkFixture, BM_GetHeight) + ->Args({ 1024, 1, static_cast(AzFramework::Terrain::TerrainDataRequests::Sampler::BILINEAR) }) + ->Args({ 2048, 1, static_cast(AzFramework::Terrain::TerrainDataRequests::Sampler::BILINEAR) }) + ->Args({ 4096, 1, static_cast(AzFramework::Terrain::TerrainDataRequests::Sampler::BILINEAR) }) + ->Args({ 1024, 1, static_cast(AzFramework::Terrain::TerrainDataRequests::Sampler::CLAMP) }) + ->Args({ 2048, 1, static_cast(AzFramework::Terrain::TerrainDataRequests::Sampler::CLAMP) }) + ->Args({ 4096, 1, static_cast(AzFramework::Terrain::TerrainDataRequests::Sampler::CLAMP) }) + ->Args({ 1024, 1, static_cast(AzFramework::Terrain::TerrainDataRequests::Sampler::EXACT) }) + ->Args({ 2048, 1, static_cast(AzFramework::Terrain::TerrainDataRequests::Sampler::EXACT) }) + ->Args({ 4096, 1, static_cast(AzFramework::Terrain::TerrainDataRequests::Sampler::EXACT) }) + ->Unit(::benchmark::kMillisecond); + + BENCHMARK_DEFINE_F(TerrainSystemBenchmarkFixture, BM_GetNormal)(benchmark::State& state) + { + // Run the benchmark + RunTerrainApiBenchmark( + state, + []([[maybe_unused]] const AZ::Vector2& queryResolution, const AZ::Aabb& worldBounds, + AzFramework::Terrain::TerrainDataRequests::Sampler sampler) + { + for (float y = worldBounds.GetMin().GetY(); y < worldBounds.GetMax().GetY(); y += 1.0f) + { + for (float x = worldBounds.GetMin().GetX(); x < worldBounds.GetMax().GetX(); x += 1.0f) + { + AZ::Vector3 terrainNormal; + bool terrainExists = false; + AzFramework::Terrain::TerrainDataRequestBus::BroadcastResult( + terrainNormal, &AzFramework::Terrain::TerrainDataRequests::GetNormalFromFloats, x, y, sampler, &terrainExists); + benchmark::DoNotOptimize(terrainNormal); + } + } + }); + } + + BENCHMARK_REGISTER_F(TerrainSystemBenchmarkFixture, BM_GetNormal) + ->Args({ 1024, 1, static_cast(AzFramework::Terrain::TerrainDataRequests::Sampler::BILINEAR) }) + ->Args({ 2048, 1, static_cast(AzFramework::Terrain::TerrainDataRequests::Sampler::BILINEAR) }) + ->Args({ 1024, 1, static_cast(AzFramework::Terrain::TerrainDataRequests::Sampler::CLAMP) }) + ->Args({ 2048, 1, static_cast(AzFramework::Terrain::TerrainDataRequests::Sampler::CLAMP) }) + ->Args({ 1024, 1, static_cast(AzFramework::Terrain::TerrainDataRequests::Sampler::EXACT) }) + ->Args({ 2048, 1, static_cast(AzFramework::Terrain::TerrainDataRequests::Sampler::EXACT) }) + ->Unit(::benchmark::kMillisecond); + + BENCHMARK_DEFINE_F(TerrainSystemBenchmarkFixture, BM_GetSurfaceWeights)(benchmark::State& state) + { + // Run the benchmark + RunTerrainApiBenchmark( + state, + []([[maybe_unused]] const AZ::Vector2& queryResolution, const AZ::Aabb& worldBounds, + AzFramework::Terrain::TerrainDataRequests::Sampler sampler) + { + AzFramework::SurfaceData::SurfaceTagWeightList surfaceWeights; + for (float y = worldBounds.GetMin().GetY(); y < worldBounds.GetMax().GetY(); y += 1.0f) + { + for (float x = worldBounds.GetMin().GetX(); x < worldBounds.GetMax().GetX(); x += 1.0f) + { + bool terrainExists = false; + AzFramework::Terrain::TerrainDataRequestBus::Broadcast( + &AzFramework::Terrain::TerrainDataRequests::GetSurfaceWeightsFromFloats, x, y, surfaceWeights, sampler, + &terrainExists); + benchmark::DoNotOptimize(surfaceWeights); + } + } + }); + } + + BENCHMARK_REGISTER_F(TerrainSystemBenchmarkFixture, BM_GetSurfaceWeights) + ->Args({ 1024, 1, static_cast(AzFramework::Terrain::TerrainDataRequests::Sampler::EXACT) }) + ->Args({ 2048, 1, static_cast(AzFramework::Terrain::TerrainDataRequests::Sampler::EXACT) }) + ->Args({ 1024, 2, static_cast(AzFramework::Terrain::TerrainDataRequests::Sampler::EXACT) }) + ->Args({ 2048, 2, static_cast(AzFramework::Terrain::TerrainDataRequests::Sampler::EXACT) }) + ->Args({ 1024, 4, static_cast(AzFramework::Terrain::TerrainDataRequests::Sampler::EXACT) }) + ->Args({ 2048, 4, static_cast(AzFramework::Terrain::TerrainDataRequests::Sampler::EXACT) }) + ->Unit(::benchmark::kMillisecond); + + BENCHMARK_DEFINE_F(TerrainSystemBenchmarkFixture, BM_GetSurfacePoints)(benchmark::State& state) + { + // Run the benchmark + RunTerrainApiBenchmark( + state, + []([[maybe_unused]] const AZ::Vector2& queryResolution, const AZ::Aabb& worldBounds, + AzFramework::Terrain::TerrainDataRequests::Sampler sampler) + { + AzFramework::SurfaceData::SurfacePoint surfacePoint; + for (float y = worldBounds.GetMin().GetY(); y < worldBounds.GetMax().GetY(); y += 1.0f) + { + for (float x = worldBounds.GetMin().GetX(); x < worldBounds.GetMax().GetX(); x += 1.0f) + { + bool terrainExists = false; + AzFramework::Terrain::TerrainDataRequestBus::Broadcast( + &AzFramework::Terrain::TerrainDataRequests::GetSurfacePointFromFloats, x, y, surfacePoint, sampler, + &terrainExists); + benchmark::DoNotOptimize(surfacePoint); + } + } + }); + } + + BENCHMARK_REGISTER_F(TerrainSystemBenchmarkFixture, BM_GetSurfacePoints) + ->Args({ 1024, 1, static_cast(AzFramework::Terrain::TerrainDataRequests::Sampler::BILINEAR) }) + ->Args({ 2048, 1, static_cast(AzFramework::Terrain::TerrainDataRequests::Sampler::BILINEAR) }) + ->Args({ 1024, 1, static_cast(AzFramework::Terrain::TerrainDataRequests::Sampler::CLAMP) }) + ->Args({ 2048, 1, static_cast(AzFramework::Terrain::TerrainDataRequests::Sampler::CLAMP) }) + ->Args({ 1024, 1, static_cast(AzFramework::Terrain::TerrainDataRequests::Sampler::EXACT) }) + ->Args({ 2048, 1, static_cast(AzFramework::Terrain::TerrainDataRequests::Sampler::EXACT) }) + ->Unit(::benchmark::kMillisecond); +#endif + +} diff --git a/Gems/Terrain/Code/Tests/TerrainSystemTest.cpp b/Gems/Terrain/Code/Tests/TerrainSystemTest.cpp index 4d149e8527..e5434c0a1d 100644 --- a/Gems/Terrain/Code/Tests/TerrainSystemTest.cpp +++ b/Gems/Terrain/Code/Tests/TerrainSystemTest.cpp @@ -15,8 +15,9 @@ #include #include -#include +#include #include +#include #include using ::testing::AtLeast; @@ -41,7 +42,6 @@ namespace UnitTest }; AZ::ComponentApplication m_app; - AZStd::unique_ptr m_terrainSystem; AZStd::unique_ptr> m_boxShapeRequests; AZStd::unique_ptr> m_shapeRequests; @@ -59,7 +59,6 @@ namespace UnitTest void TearDown() override { - m_terrainSystem.reset(); m_boxShapeRequests.reset(); m_shapeRequests.reset(); m_terrainAreaHeightRequests.reset(); @@ -96,16 +95,17 @@ namespace UnitTest // Create a terrain system with reasonable defaults for testing, but with the ability to override the defaults // on a test-by-test basis. - void CreateAndActivateTerrainSystem( + AZStd::unique_ptr CreateAndActivateTerrainSystem( AZ::Vector2 queryResolution = AZ::Vector2(1.0f), AZ::Aabb worldBounds = AZ::Aabb::CreateFromMinMax(AZ::Vector3(-128.0f), AZ::Vector3(128.0f))) { // Create the terrain system and give it one tick to fully initialize itself. - m_terrainSystem = AZStd::make_unique(); - m_terrainSystem->SetTerrainAabb(worldBounds); - m_terrainSystem->SetTerrainHeightQueryResolution(queryResolution); - m_terrainSystem->Activate(); + auto terrainSystem = AZStd::make_unique(); + terrainSystem->SetTerrainAabb(worldBounds); + terrainSystem->SetTerrainHeightQueryResolution(queryResolution); + terrainSystem->Activate(); AZ::TickBus::Broadcast(&AZ::TickBus::Events::OnTick, 0.f, AZ::ScriptTimePoint{}); + return terrainSystem; } AZStd::unique_ptr CreateAndActivateMockTerrainLayerSpawner( @@ -144,16 +144,16 @@ namespace UnitTest { // Trivially verify that the terrain system can successfully be constructed and destructed without errors. - m_terrainSystem = AZStd::make_unique(); + auto terrainSystem = AZStd::make_unique(); } TEST_F(TerrainSystemTest, TrivialActivateDeactivate) { // Verify that the terrain system can be activated and deactivated without errors. - m_terrainSystem = AZStd::make_unique(); - m_terrainSystem->Activate(); - m_terrainSystem->Deactivate(); + auto terrainSystem = AZStd::make_unique(); + terrainSystem->Activate(); + terrainSystem->Deactivate(); } TEST_F(TerrainSystemTest, CreateEventsCalledOnActivation) @@ -164,8 +164,8 @@ namespace UnitTest EXPECT_CALL(mockTerrainListener, OnTerrainDataCreateBegin()).Times(AtLeast(1)); EXPECT_CALL(mockTerrainListener, OnTerrainDataCreateEnd()).Times(AtLeast(1)); - m_terrainSystem = AZStd::make_unique(); - m_terrainSystem->Activate(); + auto terrainSystem = AZStd::make_unique(); + terrainSystem->Activate(); } TEST_F(TerrainSystemTest, DestroyEventsCalledOnDeactivation) @@ -176,9 +176,9 @@ namespace UnitTest EXPECT_CALL(mockTerrainListener, OnTerrainDataDestroyBegin()).Times(AtLeast(1)); EXPECT_CALL(mockTerrainListener, OnTerrainDataDestroyEnd()).Times(AtLeast(1)); - m_terrainSystem = AZStd::make_unique(); - m_terrainSystem->Activate(); - m_terrainSystem->Deactivate(); + auto terrainSystem = AZStd::make_unique(); + terrainSystem->Activate(); + terrainSystem->Deactivate(); } TEST_F(TerrainSystemTest, TerrainDoesNotExistWhenNoTerrainLayerSpawnersAreRegistered) @@ -190,9 +190,9 @@ namespace UnitTest // a normal facing up the Z axis. // Create and activate the terrain system with our testing defaults for world bounds and query resolution. - CreateAndActivateTerrainSystem(); + auto terrainSystem = CreateAndActivateTerrainSystem(); - AZ::Aabb worldBounds = m_terrainSystem->GetTerrainAabb(); + AZ::Aabb worldBounds = terrainSystem->GetTerrainAabb(); // Loop through several points within the world bounds, including on the edges, and verify that they all return false for // terrainExists with default heights and normals. @@ -203,17 +203,17 @@ namespace UnitTest AZ::Vector3 position(x, y, 0.0f); bool terrainExists = true; float height = - m_terrainSystem->GetHeight(position, AzFramework::Terrain::TerrainDataRequests::Sampler::EXACT, &terrainExists); + terrainSystem->GetHeight(position, AzFramework::Terrain::TerrainDataRequests::Sampler::EXACT, &terrainExists); EXPECT_FALSE(terrainExists); EXPECT_FLOAT_EQ(height, worldBounds.GetMin().GetZ()); terrainExists = true; AZ::Vector3 normal = - m_terrainSystem->GetNormal(position, AzFramework::Terrain::TerrainDataRequests::Sampler::EXACT, &terrainExists); + terrainSystem->GetNormal(position, AzFramework::Terrain::TerrainDataRequests::Sampler::EXACT, &terrainExists); EXPECT_FALSE(terrainExists); EXPECT_EQ(normal, AZ::Vector3::CreateAxisZ()); - bool isHole = m_terrainSystem->GetIsHoleFromFloats( + bool isHole = terrainSystem->GetIsHoleFromFloats( position.GetX(), position.GetY(), AzFramework::Terrain::TerrainDataRequests::Sampler::EXACT); EXPECT_TRUE(isHole); } @@ -242,7 +242,7 @@ namespace UnitTest // Verify that terrain exists within the layer spawner bounds, and doesn't exist outside of it. // Create and activate the terrain system with our testing defaults for world bounds and query resolution. - CreateAndActivateTerrainSystem(); + auto terrainSystem = CreateAndActivateTerrainSystem(); // Create a box that's twice as big as the layer spawner box. Loop through it and verify that points within the layer box contain // terrain and the expected height & normal values, and points outside the layer box don't contain terrain. @@ -255,9 +255,9 @@ namespace UnitTest { AZ::Vector3 position(x, y, 0.0f); bool heightQueryTerrainExists = false; - float height = m_terrainSystem->GetHeight( + float height = terrainSystem->GetHeight( position, AzFramework::Terrain::TerrainDataRequests::Sampler::EXACT, &heightQueryTerrainExists); - bool isHole = m_terrainSystem->GetIsHoleFromFloats( + bool isHole = terrainSystem->GetIsHoleFromFloats( position.GetX(), position.GetY(), AzFramework::Terrain::TerrainDataRequests::Sampler::EXACT); if (spawnerBox.Contains(AZ::Vector3(position.GetX(), position.GetY(), spawnerBox.GetMin().GetZ()))) @@ -297,7 +297,7 @@ namespace UnitTest // Create and activate the terrain system with our testing defaults for world bounds, and a query resolution that exactly matches // the frequency of our sine wave. If our height queries rely on the query resolution, we should always get a value of 0. const AZ::Vector2 queryResolution(frequencyMeters); - CreateAndActivateTerrainSystem(queryResolution); + auto terrainSystem = CreateAndActivateTerrainSystem(queryResolution); // Test an arbitrary set of points that should all produce non-zero heights with the EXACT sampler. They're not aligned with the // query resolution, or with the 0 points on the sine wave. @@ -307,7 +307,7 @@ namespace UnitTest AZ::Vector3 position(nonZeroPoint.GetX(), nonZeroPoint.GetY(), 0.0f); bool heightQueryTerrainExists = false; float height = - m_terrainSystem->GetHeight(position, AzFramework::Terrain::TerrainDataRequests::Sampler::EXACT, &heightQueryTerrainExists); + terrainSystem->GetHeight(position, AzFramework::Terrain::TerrainDataRequests::Sampler::EXACT, &heightQueryTerrainExists); // We've chosen a bunch of places on the sine wave that should return a non-zero positive or negative value. constexpr float epsilon = 0.0001f; @@ -322,7 +322,7 @@ namespace UnitTest AZ::Vector3 position(zeroPoint.GetX(), zeroPoint.GetY(), 0.0f); bool heightQueryTerrainExists = false; float height = - m_terrainSystem->GetHeight(position, AzFramework::Terrain::TerrainDataRequests::Sampler::EXACT, &heightQueryTerrainExists); + terrainSystem->GetHeight(position, AzFramework::Terrain::TerrainDataRequests::Sampler::EXACT, &heightQueryTerrainExists); constexpr float epsilon = 0.0001f; EXPECT_NEAR(height, 0.0f, epsilon); @@ -348,7 +348,7 @@ namespace UnitTest // Create and activate the terrain system with our testing defaults for world bounds, and a query resolution at 0.25 meter // intervals. const AZ::Vector2 queryResolution(0.25f); - CreateAndActivateTerrainSystem(queryResolution); + auto terrainSystem = CreateAndActivateTerrainSystem(queryResolution); // Test some points and verify that the results always go "downward", whether they're in positive or negative space. // (Z contains the the expected result for convenience). @@ -371,7 +371,7 @@ namespace UnitTest AZ::Vector3 position(testPoint.m_testLocation.GetX(), testPoint.m_testLocation.GetY(), 0.0f); bool heightQueryTerrainExists = false; float height = - m_terrainSystem->GetHeight(position, AzFramework::Terrain::TerrainDataRequests::Sampler::CLAMP, &heightQueryTerrainExists); + terrainSystem->GetHeight(position, AzFramework::Terrain::TerrainDataRequests::Sampler::CLAMP, &heightQueryTerrainExists); constexpr float epsilon = 0.0001f; EXPECT_NEAR(height, expectedHeight, epsilon); @@ -410,7 +410,7 @@ namespace UnitTest // Create and activate the terrain system with our testing defaults for world bounds, and a query resolution at 1 meter intervals. const AZ::Vector2 queryResolution(frequencyMeters); - CreateAndActivateTerrainSystem(queryResolution); + auto terrainSystem = CreateAndActivateTerrainSystem(queryResolution); // Test some points and verify that the results are the expected bilinear filtered result, // whether they're in positive or negative space. @@ -466,7 +466,7 @@ namespace UnitTest AZ::Vector3 position(testPoint.m_testLocation.GetX(), testPoint.m_testLocation.GetY(), 0.0f); bool heightQueryTerrainExists = false; - float height = m_terrainSystem->GetHeight( + float height = terrainSystem->GetHeight( position, AzFramework::Terrain::TerrainDataRequests::Sampler::BILINEAR, &heightQueryTerrainExists); // Verify that our height query returned the bilinear filtered result we expect. @@ -479,7 +479,7 @@ namespace UnitTest { // When there is more than one surface/weight defined, they should all be returned in descending weight order. - CreateAndActivateTerrainSystem(); + auto terrainSystem = CreateAndActivateTerrainSystem(); const AZ::Aabb aabb = AZ::Aabb::CreateFromMinMax(AZ::Vector3::CreateZero(), AZ::Vector3::CreateOne()); auto entity = CreateAndActivateMockTerrainLayerSpawner( @@ -508,11 +508,11 @@ namespace UnitTest AzFramework::SurfaceData::SurfaceTagWeightList outSurfaceWeights; // Asking for values outside the layer spawner bounds, should result in no results. - m_terrainSystem->GetSurfaceWeights(aabb.GetMax() + AZ::Vector3::CreateOne(), outSurfaceWeights); + terrainSystem->GetSurfaceWeights(aabb.GetMax() + AZ::Vector3::CreateOne(), outSurfaceWeights); EXPECT_TRUE(outSurfaceWeights.empty()); // Inside the layer spawner box should give us all of the added surface weights. - m_terrainSystem->GetSurfaceWeights(aabb.GetCenter(), outSurfaceWeights); + terrainSystem->GetSurfaceWeights(aabb.GetCenter(), outSurfaceWeights); EXPECT_EQ(outSurfaceWeights.size(), 3); @@ -531,7 +531,7 @@ namespace UnitTest TEST_F(TerrainSystemTest, GetMaxSurfaceWeightsReturnsBiggestValidSurfaceWeight) { - CreateAndActivateTerrainSystem(); + auto terrainSystem = CreateAndActivateTerrainSystem(); const AZ::Aabb aabb = AZ::Aabb::CreateFromMinMax(AZ::Vector3::CreateZero(), AZ::Vector3::CreateOne()); auto entity = CreateAndActivateMockTerrainLayerSpawner( @@ -562,12 +562,12 @@ namespace UnitTest // Asking for values outside the layer spawner bounds, should result in an invalid result. AzFramework::SurfaceData::SurfaceTagWeight tagWeight = - m_terrainSystem->GetMaxSurfaceWeight(aabb.GetMax() + AZ::Vector3::CreateOne()); + terrainSystem->GetMaxSurfaceWeight(aabb.GetMax() + AZ::Vector3::CreateOne()); EXPECT_EQ(tagWeight.m_surfaceType, AZ::Crc32(AzFramework::SurfaceData::Constants::s_unassignedTagName)); // Inside the layer spawner box should give us the highest weighted tag (tag1). - tagWeight = m_terrainSystem->GetMaxSurfaceWeight(aabb.GetCenter()); + tagWeight = terrainSystem->GetMaxSurfaceWeight(aabb.GetCenter()); EXPECT_EQ(tagWeight.m_surfaceType, tagWeight1.m_surfaceType); EXPECT_NEAR(tagWeight.m_weight, tagWeight1.m_weight, 0.01f); diff --git a/Gems/Terrain/Code/terrain_files.cmake b/Gems/Terrain/Code/terrain_files.cmake index 893477e10d..ab19d33618 100644 --- a/Gems/Terrain/Code/terrain_files.cmake +++ b/Gems/Terrain/Code/terrain_files.cmake @@ -8,6 +8,7 @@ set(FILES Include/Terrain/Ebuses/TerrainAreaSurfaceRequestBus.h + Include/Terrain/TerrainDataConstants.h Source/Components/TerrainHeightGradientListComponent.cpp Source/Components/TerrainHeightGradientListComponent.h Source/Components/TerrainLayerSpawnerComponent.cpp @@ -30,10 +31,23 @@ set(FILES Source/TerrainRenderer/Components/TerrainSurfaceMaterialsListComponent.h Source/TerrainRenderer/Components/TerrainMacroMaterialComponent.cpp Source/TerrainRenderer/Components/TerrainMacroMaterialComponent.h + Source/TerrainRenderer/Aabb2i.cpp + Source/TerrainRenderer/Aabb2i.h Source/TerrainRenderer/TerrainFeatureProcessor.cpp Source/TerrainRenderer/TerrainFeatureProcessor.h + Source/TerrainRenderer/TerrainDetailMaterialManager.cpp + Source/TerrainRenderer/TerrainDetailMaterialManager.h + Source/TerrainRenderer/TerrainMacroMaterialManager.cpp + Source/TerrainRenderer/TerrainMacroMaterialManager.h + Source/TerrainRenderer/TerrainMeshManager.cpp + Source/TerrainRenderer/TerrainMeshManager.h + Source/TerrainRenderer/BindlessImageArrayHandler.cpp + Source/TerrainRenderer/BindlessImageArrayHandler.h Source/TerrainRenderer/TerrainAreaMaterialRequestBus.h + Source/TerrainRenderer/TerrainMacroMaterialBus.cpp Source/TerrainRenderer/TerrainMacroMaterialBus.h + Source/TerrainRenderer/Vector2i.cpp + Source/TerrainRenderer/Vector2i.h Source/TerrainSystem/TerrainSystem.cpp Source/TerrainSystem/TerrainSystem.h Source/TerrainSystem/TerrainSystemBus.h diff --git a/Gems/Terrain/Code/terrain_mocks_files.cmake b/Gems/Terrain/Code/terrain_mocks_files.cmake index 874e17f028..4a70c8cce1 100644 --- a/Gems/Terrain/Code/terrain_mocks_files.cmake +++ b/Gems/Terrain/Code/terrain_mocks_files.cmake @@ -7,7 +7,7 @@ # set(FILES - Mocks/Terrain/MockTerrain.h Mocks/Terrain/MockTerrainLayerSpawner.h Mocks/Terrain/MockTerrainAreaSurfaceRequestBus.h + Mocks/Terrain/MockTerrain.h ) diff --git a/Gems/Terrain/Code/terrain_tests_files.cmake b/Gems/Terrain/Code/terrain_tests_files.cmake index 3e37e509a7..1a46fdd203 100644 --- a/Gems/Terrain/Code/terrain_tests_files.cmake +++ b/Gems/Terrain/Code/terrain_tests_files.cmake @@ -14,5 +14,7 @@ set(FILES Tests/SurfaceMaterialsListTest.cpp Tests/MockAxisAlignedBoxShapeComponent.h Tests/TerrainHeightGradientListTests.cpp + Tests/TerrainMacroMaterialTests.cpp Tests/TerrainSurfaceGradientListTests.cpp + Tests/TerrainSystemBenchmarks.cpp ) diff --git a/Gems/Terrain/Registry/Platform/Mac/AssetProcessorPlatformConfig.setreg b/Gems/Terrain/Registry/Platform/Mac/AssetProcessorPlatformConfig.setreg new file mode 100644 index 0000000000..ac0c854b19 --- /dev/null +++ b/Gems/Terrain/Registry/Platform/Mac/AssetProcessorPlatformConfig.setreg @@ -0,0 +1,16 @@ +{ + "Amazon": { + "AssetProcessor": { + "Settings": { + // The terrain shader doesn't work on mac due to unbounded arrays, so disable problematic materials and material types + // in the terrain gem to prevent dependencies from failing. + "Exclude Terrain DefaultPbrTerrain.material": { + "pattern": "^Materials/Terrain/DefaultPbrTerrain.material" + }, + "Exclude Terrain PbrTerrain.materialtype": { + "pattern": "^Materials/Terrain/PbrTerrain.materialtype" + } + } + } + } +} diff --git a/Gems/Terrain/gem.json b/Gems/Terrain/gem.json index cd72a91708..0ca470c4d3 100644 --- a/Gems/Terrain/gem.json +++ b/Gems/Terrain/gem.json @@ -2,6 +2,7 @@ "gem_name": "Terrain", "display_name": "Terrain", "license": "Apache-2.0 Or MIT", + "license_url": "https://github.com/o3de/o3de/blob/development/LICENSE.txt", "origin": "Open 3D Engine - o3de.org", "summary": "The Terrain Gem is an experimental terrain system. The terrain system maps height, color, and surface data to regions of the world, provides gradient-based and shape-based authoring tools and workflows, includes specialized rendering for efficient display, and integrates with physics for physical simulation.", "canonical_tags": [ diff --git a/Gems/TestAssetBuilder/gem.json b/Gems/TestAssetBuilder/gem.json index ba7568005f..68ed706499 100644 --- a/Gems/TestAssetBuilder/gem.json +++ b/Gems/TestAssetBuilder/gem.json @@ -2,6 +2,7 @@ "gem_name": "TestAssetBuilder", "display_name": "Test Asset Builder", "license": "Apache-2.0 Or MIT", + "license_url": "https://github.com/o3de/o3de/blob/development/LICENSE.txt", "origin": "Open 3D Engine - o3de.org", "type": "Code", "summary": "The Test Asset Builder Gem is used to feature test Asset Processor.", diff --git a/Gems/TextureAtlas/gem.json b/Gems/TextureAtlas/gem.json index 345e085359..142f0fb082 100644 --- a/Gems/TextureAtlas/gem.json +++ b/Gems/TextureAtlas/gem.json @@ -2,6 +2,7 @@ "gem_name": "TextureAtlas", "display_name": "Texture Atlas", "license": "Apache-2.0 Or MIT", + "license_url": "https://github.com/o3de/o3de/blob/development/LICENSE.txt", "origin": "Open 3D Engine - o3de.org", "type": "Code", "summary": "The Texture Atlas Gem provides the formatting for texture atlases from 2D textures for LyShine.", diff --git a/Gems/TickBusOrderViewer/gem.json b/Gems/TickBusOrderViewer/gem.json index dc5cb6f66c..a6a6fd23ac 100644 --- a/Gems/TickBusOrderViewer/gem.json +++ b/Gems/TickBusOrderViewer/gem.json @@ -2,6 +2,7 @@ "gem_name": "TickBusOrderViewer", "display_name": "Tick Bus Order Viewer", "license": "Apache-2.0 Or MIT", + "license_url": "https://github.com/o3de/o3de/blob/development/LICENSE.txt", "origin": "Open 3D Engine - o3de.org", "type": "Tool", "summary": "The Tick Bus Order Viewer Gem provides a console variable that displays the order of runtime tick events.", diff --git a/Gems/Twitch/Code/Source/TwitchSystemComponent.cpp b/Gems/Twitch/Code/Source/TwitchSystemComponent.cpp index 77890bf32b..73c13f4fea 100644 --- a/Gems/Twitch/Code/Source/TwitchSystemComponent.cpp +++ b/Gems/Twitch/Code/Source/TwitchSystemComponent.cpp @@ -51,8 +51,6 @@ namespace Twitch void TwitchSystemComponent::SetApplicationID(const AZStd::string& twitchApplicationID) { - bool success = false; - /* ** THIS CAN ONLY BE SET ONCE!!!!!! */ @@ -62,7 +60,6 @@ namespace Twitch if (IsValidTwitchAppID(twitchApplicationID)) { m_applicationID = twitchApplicationID; - success = true; } else { diff --git a/Gems/Twitch/gem.json b/Gems/Twitch/gem.json index f45433bc3f..42ec1b971e 100644 --- a/Gems/Twitch/gem.json +++ b/Gems/Twitch/gem.json @@ -2,6 +2,7 @@ "gem_name": "Twitch", "display_name": "Twitch", "license": "Apache-2.0 Or MIT", + "license_url": "https://github.com/o3de/o3de/blob/development/LICENSE.txt", "origin": "Open 3D Engine - o3de.org", "type": "Code", "summary": "The Twitch Gem provides access to the Twitch API v5 SDK including social functions, channels, and other APIs.", diff --git a/Gems/UiBasics/Assets/UI/Slices/Library/Button.slice b/Gems/UiBasics/Assets/UI/Slices/Library/Button.slice index 276d181ad6..020db8367a 100644 --- a/Gems/UiBasics/Assets/UI/Slices/Library/Button.slice +++ b/Gems/UiBasics/Assets/UI/Slices/Library/Button.slice @@ -112,7 +112,7 @@ - + @@ -158,7 +158,7 @@ - + diff --git a/Gems/UiBasics/Assets/UI/Slices/Library/Checkbox.slice b/Gems/UiBasics/Assets/UI/Slices/Library/Checkbox.slice index 9334903463..74e7bb1c2b 100644 --- a/Gems/UiBasics/Assets/UI/Slices/Library/Checkbox.slice +++ b/Gems/UiBasics/Assets/UI/Slices/Library/Checkbox.slice @@ -30,7 +30,7 @@ - + @@ -55,7 +55,7 @@ - + @@ -74,7 +74,7 @@ - + @@ -234,7 +234,7 @@ - + @@ -311,7 +311,7 @@ - + diff --git a/Gems/UiBasics/Assets/UI/Slices/Library/Dropdown.slice b/Gems/UiBasics/Assets/UI/Slices/Library/Dropdown.slice index e73c53e0d5..4185e80332 100644 --- a/Gems/UiBasics/Assets/UI/Slices/Library/Dropdown.slice +++ b/Gems/UiBasics/Assets/UI/Slices/Library/Dropdown.slice @@ -231,7 +231,7 @@ - + @@ -383,7 +383,7 @@ - + @@ -1218,7 +1218,7 @@ - + diff --git a/Gems/UiBasics/Assets/UI/Slices/Library/Textinput.slice b/Gems/UiBasics/Assets/UI/Slices/Library/Textinput.slice index cb9eaeb213..f57d307543 100644 --- a/Gems/UiBasics/Assets/UI/Slices/Library/Textinput.slice +++ b/Gems/UiBasics/Assets/UI/Slices/Library/Textinput.slice @@ -75,7 +75,7 @@ - + @@ -233,7 +233,7 @@ - + diff --git a/Gems/UiBasics/Assets/UI/Slices/Library/TooltipDisplay.slice b/Gems/UiBasics/Assets/UI/Slices/Library/TooltipDisplay.slice index e92f722837..5c9aa5cbf2 100644 --- a/Gems/UiBasics/Assets/UI/Slices/Library/TooltipDisplay.slice +++ b/Gems/UiBasics/Assets/UI/Slices/Library/TooltipDisplay.slice @@ -79,7 +79,7 @@ - + diff --git a/Gems/UiBasics/gem.json b/Gems/UiBasics/gem.json index 9a1e16a462..bb2416c235 100644 --- a/Gems/UiBasics/gem.json +++ b/Gems/UiBasics/gem.json @@ -2,6 +2,7 @@ "gem_name": "UiBasics", "display_name": "UI Basics", "license": "Apache-2.0 Or MIT", + "license_url": "https://github.com/o3de/o3de/blob/development/LICENSE.txt", "origin": "Open 3D Engine - o3de.org", "type": "Asset", "summary": "The UI Basics Gem provides a collection of basic UI prefabs such as image, text, and button, that can be used with LyShine, the Open 3D Engine runtime User Interface system and editor.", diff --git a/Gems/Vegetation/Code/CMakeLists.txt b/Gems/Vegetation/Code/CMakeLists.txt index 735bb35bd9..c5e2accc9e 100644 --- a/Gems/Vegetation/Code/CMakeLists.txt +++ b/Gems/Vegetation/Code/CMakeLists.txt @@ -24,6 +24,7 @@ ly_add_target( PRIVATE Gem::LmbrCentral Gem::SurfaceData + Legacy::CryCommon PUBLIC Gem::AtomLyIntegration_CommonFeatures.Static RUNTIME_DEPENDENCIES @@ -43,6 +44,7 @@ ly_add_target( BUILD_DEPENDENCIES PRIVATE Gem::Vegetation.Static + Legacy::CryCommon RUNTIME_DEPENDENCIES Gem::LmbrCentral Gem::GradientSignal @@ -72,6 +74,7 @@ if(PAL_TRAIT_BUILD_HOST_TOOLS) PRIVATE Gem::Vegetation.Static AZ::AzToolsFramework + Legacy::CryCommon RUNTIME_DEPENDENCIES Gem::LmbrCentral.Editor Gem::GradientSignal.Editor @@ -103,6 +106,8 @@ if(PAL_TRAIT_BUILD_TESTS_SUPPORTED) AZ::AzTest AZ::AzFrameworkTestShared Gem::Vegetation.Static + Gem::LmbrCentral.Mocks + Legacy::CryCommon ) ly_add_googletest( NAME Gem::Vegetation.Tests diff --git a/Gems/Vegetation/Code/Include/Vegetation/Ebuses/ReferenceShapeRequestBus.h b/Gems/Vegetation/Code/Include/Vegetation/Ebuses/ReferenceShapeRequestBus.h deleted file mode 100644 index d6f517117b..0000000000 --- a/Gems/Vegetation/Code/Include/Vegetation/Ebuses/ReferenceShapeRequestBus.h +++ /dev/null @@ -1,31 +0,0 @@ -/* - * Copyright (c) Contributors to the Open 3D Engine Project. - * For complete copyright and license terms please see the LICENSE at the root of this distribution. - * - * SPDX-License-Identifier: Apache-2.0 OR MIT - * - */ - -#pragma once - -#include -#include - -namespace Vegetation -{ - class ReferenceShapeRequests - : public AZ::ComponentBus - { - public: - /** - * Overrides the default AZ::EBusTraits handler policy to allow one - * listener only. - */ - static const AZ::EBusHandlerPolicy HandlerPolicy = AZ::EBusHandlerPolicy::Single; - - virtual AZ::EntityId GetShapeEntityId() const = 0; - virtual void SetShapeEntityId(AZ::EntityId entityId) = 0; - }; - - using ReferenceShapeRequestBus = AZ::EBus; -} diff --git a/Gems/Vegetation/Code/Include/Vegetation/Editor/EditorVegetationComponentTypeIds.h b/Gems/Vegetation/Code/Include/Vegetation/Editor/EditorVegetationComponentTypeIds.h index 0c9db4811c..b79bae92a0 100644 --- a/Gems/Vegetation/Code/Include/Vegetation/Editor/EditorVegetationComponentTypeIds.h +++ b/Gems/Vegetation/Code/Include/Vegetation/Editor/EditorVegetationComponentTypeIds.h @@ -35,7 +35,4 @@ namespace Vegetation // Vegetation Area Selectors static const char* EditorDescriptorWeightSelectorComponentTypeId = "{0FB90550-149B-4E05-B22C-2753F6526E97}"; - - // Vegetation Reference Shape - static const char* EditorReferenceShapeComponentTypeId = "{21BC79CA-C2F4-428F-AF2E-B76E233D4254}"; } diff --git a/Gems/Vegetation/Code/Source/AreaSystemComponent.cpp b/Gems/Vegetation/Code/Source/AreaSystemComponent.cpp index 6684aef913..e497fcec12 100644 --- a/Gems/Vegetation/Code/Source/AreaSystemComponent.cpp +++ b/Gems/Vegetation/Code/Source/AreaSystemComponent.cpp @@ -356,7 +356,6 @@ namespace Vegetation AreaSystemRequestBus::Handler::BusConnect(); GradientSignal::SectorDataRequestBus::Handler::BusConnect(); SystemConfigurationRequestBus::Handler::BusConnect(); - InstanceStatObjEventBus::Handler::BusConnect(); CrySystemEventBus::Handler::BusConnect(); AzFramework::Terrain::TerrainDataNotificationBus::Handler::BusConnect(); SurfaceData::SurfaceDataSystemNotificationBus::Handler::BusConnect(); @@ -378,7 +377,6 @@ namespace Vegetation AreaSystemRequestBus::Handler::BusDisconnect(); GradientSignal::SectorDataRequestBus::Handler::BusDisconnect(); SystemConfigurationRequestBus::Handler::BusDisconnect(); - InstanceStatObjEventBus::Handler::BusDisconnect(); CrySystemEventBus::Handler::BusDisconnect(); AzFramework::Terrain::TerrainDataNotificationBus::Handler::BusDisconnect(); SurfaceData::SurfaceDataSystemNotificationBus::Handler::BusDisconnect(); diff --git a/Gems/Vegetation/Code/Source/AreaSystemComponent.h b/Gems/Vegetation/Code/Source/AreaSystemComponent.h index 703a44c70a..c45bdac887 100644 --- a/Gems/Vegetation/Code/Source/AreaSystemComponent.h +++ b/Gems/Vegetation/Code/Source/AreaSystemComponent.h @@ -18,7 +18,6 @@ #include #include #include -#include #include #include @@ -81,7 +80,6 @@ namespace Vegetation , private AreaSystemRequestBus::Handler , private GradientSignal::SectorDataRequestBus::Handler , private SystemConfigurationRequestBus::Handler - , private InstanceStatObjEventBus::Handler , private CrySystemEventBus::Handler , private ISystemEventListener , private SurfaceData::SurfaceDataSystemNotificationBus::Handler @@ -138,9 +136,6 @@ namespace Vegetation // SurfaceData::SurfaceDataSystemNotificationBus void OnSurfaceChanged(const AZ::EntityId& entityId, const AZ::Aabb& oldBounds, const AZ::Aabb& newBounds) override; - ////////////////////////////////////////////////////////////////////////// - // InstanceStatObjEventBus - void ReleaseData() override; //////////////////////////////////////////////////////////////////////////// // CrySystemEvents @@ -460,6 +455,7 @@ namespace Vegetation bool ApplyPendingConfigChanges(); + void ReleaseData(); void ReleaseAllClaims(); void ReleaseWithoutCleanup(); diff --git a/Gems/Vegetation/Code/Source/Components/AreaBlenderComponent.cpp b/Gems/Vegetation/Code/Source/Components/AreaBlenderComponent.cpp index 8bf48de58e..2025ed059f 100644 --- a/Gems/Vegetation/Code/Source/Components/AreaBlenderComponent.cpp +++ b/Gems/Vegetation/Code/Source/Components/AreaBlenderComponent.cpp @@ -224,7 +224,7 @@ namespace Vegetation bool result = true; - AZ_WarningOnce("Vegetation", !m_isRequestInProgress, "Detected cyclic dependences with vegetation entity references"); + AZ_WarningOnce("Vegetation", !m_isRequestInProgress, "Detected cyclic dependencies with vegetation entity references"); if (!m_isRequestInProgress) { m_isRequestInProgress = true; @@ -264,7 +264,7 @@ namespace Vegetation return; } - AZ_WarningOnce("Vegetation", !m_isRequestInProgress, "Detected cyclic dependences with vegetation entity references"); + AZ_WarningOnce("Vegetation", !m_isRequestInProgress, "Detected cyclic dependencies with vegetation entity references"); if (!m_isRequestInProgress) { m_isRequestInProgress = true; @@ -295,7 +295,7 @@ namespace Vegetation { AZ_PROFILE_FUNCTION(Entity); - AZ_WarningOnce("Vegetation", !m_isRequestInProgress, "Detected cyclic dependences with vegetation entity references"); + AZ_WarningOnce("Vegetation", !m_isRequestInProgress, "Detected cyclic dependencies with vegetation entity references"); if (!m_isRequestInProgress) { m_isRequestInProgress = true; @@ -320,7 +320,7 @@ namespace Vegetation LmbrCentral::ShapeComponentRequestsBus::EventResult(bounds, GetEntityId(), &LmbrCentral::ShapeComponentRequestsBus::Events::GetEncompassingAabb); } - AZ_WarningOnce("Vegetation", !m_isRequestInProgress, "Detected cyclic dependences with vegetation entity references"); + AZ_WarningOnce("Vegetation", !m_isRequestInProgress, "Detected cyclic dependencies with vegetation entity references"); if (!m_isRequestInProgress) { m_isRequestInProgress = true; @@ -344,7 +344,7 @@ namespace Vegetation AZ::u32 count = 0; - AZ_WarningOnce("Vegetation", !m_isRequestInProgress, "Detected cyclic dependences with vegetation entity references"); + AZ_WarningOnce("Vegetation", !m_isRequestInProgress, "Detected cyclic dependencies with vegetation entity references"); if (!m_isRequestInProgress) { m_isRequestInProgress = true; diff --git a/Gems/Vegetation/Code/Source/Editor/EditorReferenceShapeComponent.cpp b/Gems/Vegetation/Code/Source/Editor/EditorReferenceShapeComponent.cpp deleted file mode 100644 index 2fe8ae1e28..0000000000 --- a/Gems/Vegetation/Code/Source/Editor/EditorReferenceShapeComponent.cpp +++ /dev/null @@ -1,20 +0,0 @@ -/* - * Copyright (c) Contributors to the Open 3D Engine Project. - * For complete copyright and license terms please see the LICENSE at the root of this distribution. - * - * SPDX-License-Identifier: Apache-2.0 OR MIT - * - */ - -#include "EditorReferenceShapeComponent.h" -#include -#include -#include - -namespace Vegetation -{ - void EditorReferenceShapeComponent::Reflect(AZ::ReflectContext* context) - { - ReflectSubClass(context, 1, &EditorVegetationComponentBaseVersionConverter); - } -} diff --git a/Gems/Vegetation/Code/Source/Editor/EditorReferenceShapeComponent.h b/Gems/Vegetation/Code/Source/Editor/EditorReferenceShapeComponent.h deleted file mode 100644 index d0f9bf1ea0..0000000000 --- a/Gems/Vegetation/Code/Source/Editor/EditorReferenceShapeComponent.h +++ /dev/null @@ -1,31 +0,0 @@ -/* - * Copyright (c) Contributors to the Open 3D Engine Project. - * For complete copyright and license terms please see the LICENSE at the root of this distribution. - * - * SPDX-License-Identifier: Apache-2.0 OR MIT - * - */ - -#pragma once - -#include -#include - -namespace Vegetation -{ - class EditorReferenceShapeComponent - : public EditorVegetationComponentBase - { - public: - using BaseClassType = EditorVegetationComponentBase; - AZ_EDITOR_COMPONENT(EditorReferenceShapeComponent, EditorReferenceShapeComponentTypeId, BaseClassType); - static void Reflect(AZ::ReflectContext* context); - - static constexpr const char* const s_categoryName = "Vegetation"; - static constexpr const char* const s_componentName = "Vegetation Reference Shape"; - static constexpr const char* const s_componentDescription = "Enables the entity to reference and reuse shape entities"; - static constexpr const char* const s_icon = "Editor/Icons/Components/Vegetation.svg"; - static constexpr const char* const s_viewportIcon = "Editor/Icons/Components/Viewport/Vegetation.svg"; - static constexpr const char* const s_helpUrl = "https://o3de.org/docs/user-guide/components/reference/"; - }; -} diff --git a/Gems/Vegetation/Code/Source/InstanceSystemComponent.cpp b/Gems/Vegetation/Code/Source/InstanceSystemComponent.cpp index dd38daa633..85ba4bda61 100644 --- a/Gems/Vegetation/Code/Source/InstanceSystemComponent.cpp +++ b/Gems/Vegetation/Code/Source/InstanceSystemComponent.cpp @@ -15,9 +15,6 @@ #include #include -#include -#include - #include #include #include diff --git a/Gems/Vegetation/Code/Source/PrefabInstanceSpawner.cpp b/Gems/Vegetation/Code/Source/PrefabInstanceSpawner.cpp index b386f17cab..c7c0ef5d3d 100644 --- a/Gems/Vegetation/Code/Source/PrefabInstanceSpawner.cpp +++ b/Gems/Vegetation/Code/Source/PrefabInstanceSpawner.cpp @@ -342,7 +342,7 @@ namespace Vegetation // Create the EntitySpawnTicket here. This pointer is going to get handed off to the vegetation system as opaque instance data, // where it will be tracked and held onto for the lifetime of the vegetation instance. The vegetation system will pass it back // in to DestroyInstance at the end of the lifetime, so that's the one place where we will delete the ticket pointers. - AzFramework::EntitySpawnTicket* ticket = new AzFramework::EntitySpawnTicket(m_spawnableAsset); + AzFramework::EntitySpawnTicket* ticket = aznew AzFramework::EntitySpawnTicket(m_spawnableAsset); if (ticket->IsValid()) { // Track the ticket that we've created. diff --git a/Gems/Vegetation/Code/Source/VegetationEditorModule.cpp b/Gems/Vegetation/Code/Source/VegetationEditorModule.cpp index 3210df644f..8d4e1d0558 100644 --- a/Gems/Vegetation/Code/Source/VegetationEditorModule.cpp +++ b/Gems/Vegetation/Code/Source/VegetationEditorModule.cpp @@ -18,7 +18,6 @@ #include #include #include -#include #include #include #include @@ -50,7 +49,6 @@ namespace Vegetation EditorLevelSettingsComponent::CreateDescriptor(), EditorMeshBlockerComponent::CreateDescriptor(), EditorPositionModifierComponent::CreateDescriptor(), - EditorReferenceShapeComponent::CreateDescriptor(), EditorRotationModifierComponent::CreateDescriptor(), EditorScaleModifierComponent::CreateDescriptor(), EditorShapeIntersectionFilterComponent::CreateDescriptor(), diff --git a/Gems/Vegetation/Code/Source/VegetationModule.cpp b/Gems/Vegetation/Code/Source/VegetationModule.cpp index b103575ed1..747617d033 100644 --- a/Gems/Vegetation/Code/Source/VegetationModule.cpp +++ b/Gems/Vegetation/Code/Source/VegetationModule.cpp @@ -18,7 +18,6 @@ #include #include #include -#include #include #include #include @@ -52,7 +51,6 @@ namespace Vegetation LevelSettingsComponent::CreateDescriptor(), MeshBlockerComponent::CreateDescriptor(), PositionModifierComponent::CreateDescriptor(), - ReferenceShapeComponent::CreateDescriptor(), RotationModifierComponent::CreateDescriptor(), ScaleModifierComponent::CreateDescriptor(), ShapeIntersectionFilterComponent::CreateDescriptor(), diff --git a/Gems/Vegetation/Code/Tests/VegetationComponentFilterTests.cpp b/Gems/Vegetation/Code/Tests/VegetationComponentFilterTests.cpp index abb76c8c2d..bb1efb5ebd 100644 --- a/Gems/Vegetation/Code/Tests/VegetationComponentFilterTests.cpp +++ b/Gems/Vegetation/Code/Tests/VegetationComponentFilterTests.cpp @@ -8,6 +8,8 @@ #include "VegetationTest.h" #include "VegetationMocks.h" +#include + #include #include #include @@ -106,7 +108,7 @@ namespace UnitTest Vegetation::SurfaceMaskDepthFilterConfig config; config.m_lowerDistance = -1000.0f; config.m_upperDistance = -0.5f; - config.m_depthComparisonTags.push_back(SurfaceData::Constants::s_terrainTagCrc); + config.m_depthComparisonTags.push_back(SurfaceData::Constants::s_unassignedTagCrc); Vegetation::SurfaceMaskDepthFilterComponent* component = nullptr; auto entity = CreateEntity(config, &component, [](AZ::Entity* e) @@ -118,7 +120,7 @@ namespace UnitTest mockSurfaceHandler.m_outPosition = AZ::Vector3::CreateZero(); mockSurfaceHandler.m_outNormal = AZ::Vector3::CreateAxisZ(); mockSurfaceHandler.m_outMasks.clear(); - mockSurfaceHandler.m_outMasks[SurfaceData::Constants::s_terrainTagCrc] = 1.0f; + mockSurfaceHandler.m_outMasks[SurfaceData::Constants::s_unassignedTagCrc] = 1.0f; // passes { diff --git a/Gems/Vegetation/Code/Tests/VegetationMocks.h b/Gems/Vegetation/Code/Tests/VegetationMocks.h index ec3760057c..ece0833433 100644 --- a/Gems/Vegetation/Code/Tests/VegetationMocks.h +++ b/Gems/Vegetation/Code/Tests/VegetationMocks.h @@ -31,7 +31,6 @@ #include #include #include -#include ////////////////////////////////////////////////////////////////////////// // mock event bus classes for testing vegetation @@ -313,74 +312,6 @@ namespace UnitTest } }; - class MockShape - : public LmbrCentral::ShapeComponentRequestsBus::Handler - { - public: - AZ::Entity m_entity; - mutable int m_count = 0; - - MockShape() - { - LmbrCentral::ShapeComponentRequestsBus::Handler::BusConnect(m_entity.GetId()); - } - - ~MockShape() - { - LmbrCentral::ShapeComponentRequestsBus::Handler::BusDisconnect(); - } - - AZ::Crc32 GetShapeType() override - { - ++m_count; - return AZ_CRC("TestShape", 0x856ca50c); - } - - AZ::Aabb m_aabb = AZ::Aabb::CreateNull(); - AZ::Aabb GetEncompassingAabb() override - { - ++m_count; - return m_aabb; - } - - AZ::Transform m_localTransform = AZ::Transform::CreateIdentity(); - AZ::Aabb m_localBounds = AZ::Aabb::CreateNull(); - void GetTransformAndLocalBounds(AZ::Transform& transform, AZ::Aabb& bounds) override - { - ++m_count; - transform = m_localTransform; - bounds = m_localBounds; - } - - bool m_pointInside = true; - bool IsPointInside([[maybe_unused]] const AZ::Vector3& point) override - { - ++m_count; - return m_pointInside; - } - - float m_distanceSquaredFromPoint = 0.0f; - float DistanceSquaredFromPoint([[maybe_unused]] const AZ::Vector3& point) override - { - ++m_count; - return m_distanceSquaredFromPoint; - } - - AZ::Vector3 m_randomPointInside = AZ::Vector3::CreateZero(); - AZ::Vector3 GenerateRandomPointInside([[maybe_unused]] AZ::RandomDistributionType randomDistribution) override - { - ++m_count; - return m_randomPointInside; - } - - bool m_intersectRay = false; - bool IntersectRay([[maybe_unused]] const AZ::Vector3& src, [[maybe_unused]] const AZ::Vector3& dir, [[maybe_unused]] float& distance) override - { - ++m_count; - return m_intersectRay; - } - }; - struct MockSurfaceHandler : public SurfaceData::SurfaceDataSystemRequestBus::Handler { diff --git a/Gems/Vegetation/Code/Tests/VegetationTest.cpp b/Gems/Vegetation/Code/Tests/VegetationTest.cpp index 774a9fcd00..033e988c9b 100644 --- a/Gems/Vegetation/Code/Tests/VegetationTest.cpp +++ b/Gems/Vegetation/Code/Tests/VegetationTest.cpp @@ -27,7 +27,6 @@ #include #include #include -#include #include #include #include @@ -190,8 +189,6 @@ namespace UnitTest EXPECT_FALSE((AreComponentsCompatible())); EXPECT_FALSE((AreComponentsCompatible())); - EXPECT_FALSE((AreComponentsCompatible())); - EXPECT_FALSE((AreComponentsCompatible())); EXPECT_FALSE((AreComponentsCompatible())); @@ -231,7 +228,6 @@ namespace UnitTest CreateWith(); CreateWith(); CreateWith(); - CreateWith(); CreateWith(); CreateWith(); CreateWith(); @@ -287,94 +283,6 @@ namespace UnitTest EXPECT_EQ(defaultProcessTime, instConfig->m_maxInstanceProcessTimeMicroseconds); } - TEST_F(VegetationComponentTestsBasics, ReferenceShapeComponent_WithValidReference) - { - UnitTest::MockShape testShape; - - Vegetation::ReferenceShapeConfig config; - config.m_shapeEntityId = testShape.m_entity.GetId(); - - Vegetation::ReferenceShapeComponent* component; - auto entity = CreateEntity(config, &component); - - AZ::RandomDistributionType randomDistribution = AZ::RandomDistributionType::Normal; - AZ::Vector3 randPos = AZ::Vector3::CreateOne(); - LmbrCentral::ShapeComponentRequestsBus::EventResult(randPos, entity->GetId(), &LmbrCentral::ShapeComponentRequestsBus::Events::GenerateRandomPointInside, randomDistribution); - EXPECT_EQ(AZ::Vector3::CreateZero(), randPos); - - testShape.m_aabb = AZ::Aabb::CreateFromPoint(AZ::Vector3(1.0f, 21.0f, 31.0f)); - AZ::Aabb resultAABB; - LmbrCentral::ShapeComponentRequestsBus::EventResult(resultAABB, entity->GetId(), &LmbrCentral::ShapeComponentRequestsBus::Events::GetEncompassingAabb); - EXPECT_EQ(testShape.m_aabb, resultAABB); - - AZ::Crc32 resultCRC = {}; - LmbrCentral::ShapeComponentRequestsBus::EventResult(resultCRC, entity->GetId(), &LmbrCentral::ShapeComponentRequestsBus::Events::GetShapeType); - EXPECT_EQ(AZ_CRC("TestShape", 0x856ca50c), resultCRC); - - testShape.m_localBounds = AZ::Aabb::CreateFromPoint(AZ::Vector3(1.0f, 21.0f, 31.0f)); - testShape.m_localTransform = AZ::Transform::CreateTranslation(testShape.m_localBounds.GetCenter()); - AZ::Transform resultTransform = AZ::Transform::CreateIdentity(); - AZ::Aabb resultBounds = AZ::Aabb::CreateNull(); - LmbrCentral::ShapeComponentRequestsBus::Event(entity->GetId(), &LmbrCentral::ShapeComponentRequestsBus::Events::GetTransformAndLocalBounds, resultTransform, resultBounds); - EXPECT_EQ(testShape.m_localTransform, resultTransform); - EXPECT_EQ(testShape.m_localBounds, resultBounds); - - testShape.m_pointInside = true; - bool resultPointInside = false; - LmbrCentral::ShapeComponentRequestsBus::EventResult(resultPointInside, entity->GetId(), &LmbrCentral::ShapeComponentRequestsBus::Events::IsPointInside, AZ::Vector3::CreateZero()); - EXPECT_EQ(testShape.m_pointInside, resultPointInside); - - testShape.m_distanceSquaredFromPoint = 456.0f; - float resultdistanceSquaredFromPoint = 0; - LmbrCentral::ShapeComponentRequestsBus::EventResult(resultdistanceSquaredFromPoint, entity->GetId(), &LmbrCentral::ShapeComponentRequestsBus::Events::DistanceSquaredFromPoint, AZ::Vector3::CreateZero()); - EXPECT_EQ(testShape.m_distanceSquaredFromPoint, resultdistanceSquaredFromPoint); - - testShape.m_intersectRay = false; - bool resultIntersectRay = false; - LmbrCentral::ShapeComponentRequestsBus::EventResult(resultIntersectRay, entity->GetId(), &LmbrCentral::ShapeComponentRequestsBus::Events::IntersectRay, AZ::Vector3::CreateZero(), AZ::Vector3::CreateZero(), 0.0f); - EXPECT_TRUE(testShape.m_intersectRay == resultIntersectRay); - } - - TEST_F(VegetationComponentTestsBasics, ReferenceShapeComponent_WithInvalidReference) - { - Vegetation::ReferenceShapeConfig config; - config.m_shapeEntityId = AZ::EntityId(); - - Vegetation::ReferenceShapeComponent* component; - auto entity = CreateEntity(config, &component); - - AZ::RandomDistributionType randomDistribution = AZ::RandomDistributionType::Normal; - AZ::Vector3 randPos = AZ::Vector3::CreateOne(); - LmbrCentral::ShapeComponentRequestsBus::EventResult(randPos, entity->GetId(), &LmbrCentral::ShapeComponentRequestsBus::Events::GenerateRandomPointInside, randomDistribution); - EXPECT_EQ(randPos, AZ::Vector3::CreateZero()); - - AZ::Aabb resultAABB; - LmbrCentral::ShapeComponentRequestsBus::EventResult(resultAABB, entity->GetId(), &LmbrCentral::ShapeComponentRequestsBus::Events::GetEncompassingAabb); - EXPECT_EQ(resultAABB, AZ::Aabb::CreateNull()); - - AZ::Crc32 resultCRC; - LmbrCentral::ShapeComponentRequestsBus::EventResult(resultCRC, entity->GetId(), &LmbrCentral::ShapeComponentRequestsBus::Events::GetShapeType); - EXPECT_EQ(resultCRC, AZ::Crc32(AZ::u32(0))); - - AZ::Transform resultTransform; - AZ::Aabb resultBounds; - LmbrCentral::ShapeComponentRequestsBus::Event(entity->GetId(), &LmbrCentral::ShapeComponentRequestsBus::Events::GetTransformAndLocalBounds, resultTransform, resultBounds); - EXPECT_EQ(resultTransform, AZ::Transform::CreateIdentity()); - EXPECT_EQ(resultBounds, AZ::Aabb::CreateNull()); - - bool resultPointInside = true; - LmbrCentral::ShapeComponentRequestsBus::EventResult(resultPointInside, entity->GetId(), &LmbrCentral::ShapeComponentRequestsBus::Events::IsPointInside, AZ::Vector3::CreateZero()); - EXPECT_EQ(resultPointInside, false); - - float resultdistanceSquaredFromPoint = 0; - LmbrCentral::ShapeComponentRequestsBus::EventResult(resultdistanceSquaredFromPoint, entity->GetId(), &LmbrCentral::ShapeComponentRequestsBus::Events::DistanceSquaredFromPoint, AZ::Vector3::CreateZero()); - EXPECT_EQ(resultdistanceSquaredFromPoint, FLT_MAX); - - bool resultIntersectRay = true; - LmbrCentral::ShapeComponentRequestsBus::EventResult(resultIntersectRay, entity->GetId(), &LmbrCentral::ShapeComponentRequestsBus::Events::IntersectRay, AZ::Vector3::CreateZero(), AZ::Vector3::CreateZero(), 0.0f); - EXPECT_EQ(resultIntersectRay, false); - } - TEST_F(VegetationComponentTestsBasics, Components_HaveMinMaxRanges) { ValidateHasMinMaxRanges(); diff --git a/Gems/Vegetation/Code/vegetation_editor_files.cmake b/Gems/Vegetation/Code/vegetation_editor_files.cmake index aa6b399db9..9e4ea2ca78 100644 --- a/Gems/Vegetation/Code/vegetation_editor_files.cmake +++ b/Gems/Vegetation/Code/vegetation_editor_files.cmake @@ -36,8 +36,6 @@ set(FILES Source/Editor/EditorMeshBlockerComponent.h Source/Editor/EditorPositionModifierComponent.cpp Source/Editor/EditorPositionModifierComponent.h - Source/Editor/EditorReferenceShapeComponent.cpp - Source/Editor/EditorReferenceShapeComponent.h Source/Editor/EditorRotationModifierComponent.cpp Source/Editor/EditorRotationModifierComponent.h Source/Editor/EditorScaleModifierComponent.cpp diff --git a/Gems/Vegetation/Code/vegetation_files.cmake b/Gems/Vegetation/Code/vegetation_files.cmake index 64048b5d91..b4d4e3a356 100644 --- a/Gems/Vegetation/Code/vegetation_files.cmake +++ b/Gems/Vegetation/Code/vegetation_files.cmake @@ -46,7 +46,6 @@ set(FILES Include/Vegetation/Ebuses/AreaBlenderRequestBus.h Include/Vegetation/Ebuses/BlockerRequestBus.h Include/Vegetation/Ebuses/DescriptorListCombinerRequestBus.h - Include/Vegetation/Ebuses/ReferenceShapeRequestBus.h Include/Vegetation/Ebuses/MeshBlockerRequestBus.h Include/Vegetation/Ebuses/SpawnerRequestBus.h Include/Vegetation/Ebuses/DescriptorListRequestBus.h @@ -71,8 +70,6 @@ set(FILES Source/Components/MeshBlockerComponent.h Source/Components/PositionModifierComponent.cpp Source/Components/PositionModifierComponent.h - Source/Components/ReferenceShapeComponent.cpp - Source/Components/ReferenceShapeComponent.h Source/Components/RotationModifierComponent.cpp Source/Components/RotationModifierComponent.h Source/Components/ScaleModifierComponent.cpp diff --git a/Gems/Vegetation/gem.json b/Gems/Vegetation/gem.json index 9dbcc3450b..75416933f0 100644 --- a/Gems/Vegetation/gem.json +++ b/Gems/Vegetation/gem.json @@ -2,6 +2,7 @@ "gem_name": "Vegetation", "display_name": "Vegetation", "license": "Apache-2.0 Or MIT", + "license_url": "https://github.com/o3de/o3de/blob/development/LICENSE.txt", "origin": "Open 3D Engine - o3de.org", "type": "Code", "summary": "The Vegetation Gem provides tools to place natural-looking vegetation in Open 3D Engine.", diff --git a/Gems/VideoPlaybackFramework/gem.json b/Gems/VideoPlaybackFramework/gem.json index 9f491f47cb..381738ab4b 100644 --- a/Gems/VideoPlaybackFramework/gem.json +++ b/Gems/VideoPlaybackFramework/gem.json @@ -2,6 +2,7 @@ "gem_name": "VideoPlaybackFramework", "display_name": "Video Playback Framework", "license": "Apache-2.0 Or MIT", + "license_url": "https://github.com/o3de/o3de/blob/development/LICENSE.txt", "origin": "Open 3D Engine - o3de.org", "type": "Code", "summary": "The Video Playback Framework Gem provides the interface to play back video.", diff --git a/Gems/VirtualGamepad/Code/CMakeLists.txt b/Gems/VirtualGamepad/Code/CMakeLists.txt index f493190071..d32834633f 100644 --- a/Gems/VirtualGamepad/Code/CMakeLists.txt +++ b/Gems/VirtualGamepad/Code/CMakeLists.txt @@ -21,6 +21,7 @@ ly_add_target( AZ::AzCore AZ::AzFramework Legacy::CryCommon + Gem::LyShine ) ly_add_target( diff --git a/Gems/VirtualGamepad/gem.json b/Gems/VirtualGamepad/gem.json index c6305f1754..637776ac85 100644 --- a/Gems/VirtualGamepad/gem.json +++ b/Gems/VirtualGamepad/gem.json @@ -2,6 +2,7 @@ "gem_name": "VirtualGamepad", "display_name": "Virtual Gamepad", "license": "Apache-2.0 Or MIT", + "license_url": "https://github.com/o3de/o3de/blob/development/LICENSE.txt", "origin": "Open 3D Engine - o3de.org", "type": "Code", "summary": "The Virtual Gamepad Gem provides controls that emulate a gamepad on touch screen devices.", diff --git a/Gems/WhiteBox/Code/CMakeLists.txt b/Gems/WhiteBox/Code/CMakeLists.txt index ee76031beb..bfc4eb724a 100644 --- a/Gems/WhiteBox/Code/CMakeLists.txt +++ b/Gems/WhiteBox/Code/CMakeLists.txt @@ -29,7 +29,6 @@ if(NOT PAL_TRAIT_WHITEBOX_SUPPORTED) if(PAL_TRAIT_BUILD_HOST_TOOLS) ly_add_target( NAME WhiteBox.Editor GEM_MODULE - NAMESPACE Gem FILES_CMAKE whitebox_unsupported_files.cmake @@ -44,6 +43,8 @@ if(NOT PAL_TRAIT_WHITEBOX_SUPPORTED) BUILD_DEPENDENCIES PRIVATE AZ::AzCore + RUNTIME_DEPENDENCIES + Gem::EditorPythonBindings.Editor ) endif() return() diff --git a/Gems/WhiteBox/Code/Source/Components/EditorWhiteBoxColliderComponent.cpp b/Gems/WhiteBox/Code/Source/Components/EditorWhiteBoxColliderComponent.cpp index c22be6f072..17d374fab1 100644 --- a/Gems/WhiteBox/Code/Source/Components/EditorWhiteBoxColliderComponent.cpp +++ b/Gems/WhiteBox/Code/Source/Components/EditorWhiteBoxColliderComponent.cpp @@ -73,6 +73,7 @@ namespace WhiteBox void EditorWhiteBoxColliderComponent::GetIncompatibleServices(AZ::ComponentDescriptor::DependencyArrayType& incompatible) { incompatible.push_back(AZ_CRC_CE("NonUniformScaleService")); + incompatible.push_back(AZ_CRC_CE("WhiteBoxColliderService")); } void EditorWhiteBoxColliderComponent::Activate() @@ -180,11 +181,11 @@ namespace WhiteBox // fill vertex position array size_t index = 0; const auto faceHandles = Api::MeshFaceHandles(whiteBox); - for (const auto faceHandle : faceHandles) + for (const auto& faceHandle : faceHandles) { const auto faceHalfedgeHandles = Api::FaceHalfedgeHandles(whiteBox, faceHandle); - for (const auto halfEdgeHandle : faceHalfedgeHandles) + for (const auto& halfEdgeHandle : faceHalfedgeHandles) { const auto vh = Api::HalfedgeVertexHandleAtTip(whiteBox, halfEdgeHandle); vertices[index] = Api::VertexPosition(whiteBox, vh); diff --git a/Gems/WhiteBox/Code/Source/Core/WhiteBoxToolApi.cpp b/Gems/WhiteBox/Code/Source/Core/WhiteBoxToolApi.cpp index afba511603..8d5078dacd 100644 --- a/Gems/WhiteBox/Code/Source/Core/WhiteBoxToolApi.cpp +++ b/Gems/WhiteBox/Code/Source/Core/WhiteBoxToolApi.cpp @@ -426,10 +426,6 @@ namespace WhiteBox Mesh::TexCoord2D(0.0f, 0.0f), }; - // indices related to halfedges - start iterating on first halfedge, pointing to - // vertex 0, then follow next to get vertex 2 and then 3 (anti-clockwise winding) - const int g_indices[] = {0, 1, 2, 0, 2, 3}; - // conversion functions between OpenMesh and AZ types // convert WhiteBox face handle to OpenMesh face handle @@ -600,7 +596,7 @@ namespace WhiteBox VertexHandles vertexHandles; vertexHandles.reserve(whiteBox.mesh.n_vertices()); - for (const auto vertexHandle : whiteBox.mesh.vertices()) + for (const auto& vertexHandle : whiteBox.mesh.vertices()) { vertexHandles.push_back(wb_vh(vertexHandle)); } @@ -614,7 +610,7 @@ namespace WhiteBox FaceHandles faceHandles; faceHandles.reserve(whiteBox.mesh.n_faces()); - for (const auto faceHandle : whiteBox.mesh.faces()) + for (const auto& faceHandle : whiteBox.mesh.faces()) { faceHandles.push_back(wb_fh(faceHandle)); } @@ -660,7 +656,7 @@ namespace WhiteBox EdgeHandles orderedEdgeHandles; orderedEdgeHandles.reserve(halfedgeHandles.size()); - for (const auto halfedgeHandle : halfedgeHandles) + for (const auto& halfedgeHandle : halfedgeHandles) { orderedEdgeHandles.push_back(HalfedgeEdgeHandle(whiteBox, halfedgeHandle)); } @@ -712,7 +708,7 @@ namespace WhiteBox EdgeHandles edgeHandles; edgeHandles.reserve(whiteBox.mesh.n_edges()); - for (const auto edgeHandle : whiteBox.mesh.edges()) + for (const auto& edgeHandle : whiteBox.mesh.edges()) { edgeHandles.push_back(wb_eh(edgeHandle)); } @@ -771,7 +767,7 @@ namespace WhiteBox EdgeHandles edgeHandles; edgeHandles.reserve(3); - for (const auto halfedgeHandle : FaceHalfedgeHandles(whiteBox, faceHandle)) + for (const auto& halfedgeHandle : FaceHalfedgeHandles(whiteBox, faceHandle)) { edgeHandles.push_back(HalfedgeEdgeHandle(whiteBox, halfedgeHandle)); } @@ -789,7 +785,7 @@ namespace WhiteBox VertexHandles vertexHandles; vertexHandles.reserve(3); - for (const auto halfedgeHandle : FaceHalfedgeHandles(whiteBox, faceHandle)) + for (const auto& halfedgeHandle : FaceHalfedgeHandles(whiteBox, faceHandle)) { vertexHandles.emplace_back(HalfedgeVertexHandleAtTip(whiteBox, halfedgeHandle)); } @@ -809,7 +805,7 @@ namespace WhiteBox AZStd::vector triangles; triangles.reserve(faceHandles.size() * 3); - for (const auto faceHandle : faceHandles) + for (const auto& faceHandle : faceHandles) { const auto corners = FaceVertexPositions(whiteBox, faceHandle); triangles.insert(triangles.end(), corners.begin(), corners.end()); @@ -953,7 +949,7 @@ namespace WhiteBox // all halfedges for a given face const auto halfedges = FaceHalfedgeHandles(whiteBox, faceHandle); - for (const HalfedgeHandle halfedgeHandle : halfedges) + for (const HalfedgeHandle& halfedgeHandle : halfedges) { const FaceHandle oppositeFaceHandle = OppositeFaceHandle(whiteBox, halfedgeHandle); @@ -983,15 +979,15 @@ namespace WhiteBox // build all possible halfedge handles HalfedgeHandles halfedgeHandles; - for (const auto faceHandle : faceHandles) + for (const auto& faceHandle : faceHandles) { // find all vertices for a given face const auto vertexHandles = FaceVertexHandles(whiteBox, faceHandle); - for (const auto vertexHandle : vertexHandles) + for (const auto& vertexHandle : vertexHandles) { // find all outgoing halfedges from vertex const auto outgoingHalfedgeHandles = VertexOutgoingHalfedgeHandles(whiteBox, vertexHandle); - for (const auto halfedgeHandle : outgoingHalfedgeHandles) + for (const auto& halfedgeHandle : outgoingHalfedgeHandles) { // find what face corresponds to this halfedge const FaceHandle halfedgeFaceHandle = HalfedgeFaceHandle(whiteBox, halfedgeHandle); @@ -1098,7 +1094,7 @@ namespace WhiteBox VertexHandles orderedVertexHandles; orderedVertexHandles.reserve(halfedgeHandles.size()); - for (const auto halfedgeHandle : halfedgeHandles) + for (const auto& halfedgeHandle : halfedgeHandles) { orderedVertexHandles.push_back(HalfedgeVertexHandleAtTip(whiteBox, halfedgeHandle)); } @@ -1121,10 +1117,10 @@ namespace WhiteBox AZ_PROFILE_FUNCTION(AzToolsFramework); VertexHandles vertexHandles; - for (const FaceHandle faceHandle : faceHandles) + for (const FaceHandle& faceHandle : faceHandles) { const auto faceVertexHandles = FaceVertexHandles(whiteBox, faceHandle); - for (const VertexHandle faceVertexHandle : faceVertexHandles) + for (const VertexHandle& faceVertexHandle : faceVertexHandles) { const auto* const vertexIt = AZStd::find(vertexHandles.cbegin(), vertexHandles.cend(), faceVertexHandle); @@ -1318,10 +1314,10 @@ namespace WhiteBox visitedVertexHandles.push_back(vertexHandle); // for all connected vertex handles to this edge - for (const auto vertexEdgeHandle : VertexEdgeHandles(whiteBox, vertexHandle)) + for (const auto& vertexEdgeHandle : VertexEdgeHandles(whiteBox, vertexHandle)) { // check all halfedges in the edge - for (const auto halfedgeHandle : EdgeHalfedgeHandles(whiteBox, vertexEdgeHandle)) + for (const auto& halfedgeHandle : EdgeHalfedgeHandles(whiteBox, vertexEdgeHandle)) { // only track the edge if it's a 'user' edge (selectable - not a 'mesh' edge) if (!EdgeIsUser(whiteBox, halfedgeHandle, vertexEdgeHandle)) @@ -1339,7 +1335,7 @@ namespace WhiteBox // store the edge to the grouping edgeGrouping.push_back(vertexEdgeHandle); - for (const auto nextVertexHandle : Api::EdgeVertexHandles(whiteBox, vertexEdgeHandle)) + for (const auto& nextVertexHandle : Api::EdgeVertexHandles(whiteBox, vertexEdgeHandle)) { // if we haven't seen this vertex yet, add it to // the vertex handles to explore @@ -1978,7 +1974,7 @@ namespace WhiteBox Faces faces; faces.reserve(MeshFaceCount(whiteBox)); - for (const auto faceHandle : MeshFaceHandles(whiteBox)) + for (const auto& faceHandle : MeshFaceHandles(whiteBox)) { const auto halfEdgeHandles = FaceHalfedgeHandles(whiteBox, faceHandle); @@ -2002,14 +1998,13 @@ namespace WhiteBox AZ_PROFILE_FUNCTION(AzToolsFramework); auto& mesh = whiteBox.mesh; - for (const auto faceHandle : faceHandles) + for (const auto& faceHandle : faceHandles) { for (Mesh::ConstFaceHalfedgeCCWIter faceHalfedgeIt = mesh.fh_ccwiter(om_fh(faceHandle)); faceHalfedgeIt.is_valid(); ++faceHalfedgeIt) { const Mesh::HalfedgeHandle heh = *faceHalfedgeIt; const Mesh::VertexHandle vh = mesh.to_vertex_handle(heh); - const Mesh::FaceHandle fh = mesh.face_handle(heh); const AZ::Vector3 position = mesh.point(vh); const AZ::Vector3 normal = FaceNormal(whiteBox, faceHandle); @@ -2064,7 +2059,7 @@ namespace WhiteBox polygonHandle.m_faceHandles.push_back(faceHandleToVisit); // for all halfedges - for (const auto faceHalfedgeHandle : faceHalfedges) + for (const auto& faceHalfedgeHandle : faceHalfedges) { const EdgeHandle edgeHandle = HalfedgeEdgeHandle(whiteBox, faceHalfedgeHandle); // if we haven't seen this halfedge before and we want to track it, @@ -2092,10 +2087,10 @@ namespace WhiteBox static void PopulatePolygonProps(FaceHandlePolygonMapping& polygonProps, const FaceHandles& faceHandles) { - for (const auto faceHandle : faceHandles) + for (const auto& faceHandle : faceHandles) { auto polygonIt = polygonProps.find(om_fh(faceHandle)); - for (const auto innerFaceHandle : faceHandles) + for (const auto& innerFaceHandle : faceHandles) { polygonIt->second.push_back(om_fh(innerFaceHandle)); } @@ -2104,7 +2099,7 @@ namespace WhiteBox static void ClearPolygonProps(FaceHandlePolygonMapping& polygonProps, const FaceHandles& faceHandles) { - for (const auto faceHandle : faceHandles) + for (const auto& faceHandle : faceHandles) { if (auto polygonIt = polygonProps.find(om_fh(faceHandle)); polygonIt != polygonProps.end()) { @@ -2116,9 +2111,9 @@ namespace WhiteBox // restore all vertices along the restored edges (after creating a new polygon) static void RestoreVertexHandlesForEdges(WhiteBoxMesh& whiteBox, const EdgeHandles& restoredEdgeHandles) { - for (const auto edgeHandle : restoredEdgeHandles) + for (const auto& edgeHandle : restoredEdgeHandles) { - for (const auto vertexHandle : EdgeVertexHandles(whiteBox, edgeHandle)) + for (const auto& vertexHandle : EdgeVertexHandles(whiteBox, edgeHandle)) { RestoreVertex(whiteBox, vertexHandle); } @@ -2280,19 +2275,19 @@ namespace WhiteBox auto& polygonProps = whiteBox.mesh.property(polygonPropsHandle); // update all face handles to refer to the new face handles in the group - for (const auto faceHandle : combinedFaceHandles) + for (const auto& faceHandle : combinedFaceHandles) { auto polygonIt = polygonProps.find(om_fh(faceHandle)); polygonIt->second.clear(); - for (const auto innerFaceHandle : combinedFaceHandles) + for (const auto& innerFaceHandle : combinedFaceHandles) { polygonIt->second.push_back(om_fh(innerFaceHandle)); } } // hide any vertices that are not connected to a 'user' edge - for (const auto vertexHandle : firstPolygonVertexHandles) + for (const auto& vertexHandle : firstPolygonVertexHandles) { if (VertexIsIsolated(whiteBox, vertexHandle)) { @@ -2339,7 +2334,7 @@ namespace WhiteBox omFaceHandles.erase(AZStd::unique(omFaceHandles.begin(), omFaceHandles.end()), omFaceHandles.end()); // update all face handles to point to the new polygon grouping - for (const auto omFaceHandle2 : omFaceHandles) + for (const auto& omFaceHandle2 : omFaceHandles) { polygonProps[omFaceHandle2] = omFaceHandles; } @@ -2413,7 +2408,7 @@ namespace WhiteBox omExistingPolygonHandle.push_back(om_fh(newFaceHandle)); // update all face handles to point to the new polygon grouping - for (const Mesh::FaceHandle faceHandle : omExistingPolygonHandle) + for (const Mesh::FaceHandle& faceHandle : omExistingPolygonHandle) { polygonProps[faceHandle] = omExistingPolygonHandle; } @@ -2510,7 +2505,7 @@ namespace WhiteBox auto& polygonProps = whiteBox.mesh.property(polygonPropsHandle); // multiple face handles map to a polygon handle - for (const auto faceHandle : polygon) + for (const auto& faceHandle : polygon) { polygonProps[faceHandle] = polygon; } @@ -2658,7 +2653,7 @@ namespace WhiteBox { AZ_PROFILE_FUNCTION(AzToolsFramework); - for (const Mesh::FaceHandle faceHandle : whiteBox.mesh.faces()) + for (const Mesh::FaceHandle& faceHandle : whiteBox.mesh.faces()) { for (Mesh::FaceHalfedgeCCWIter faceHalfedgeIt = whiteBox.mesh.fh_ccwiter(faceHandle); faceHalfedgeIt.is_valid(); ++faceHalfedgeIt) @@ -2705,7 +2700,7 @@ namespace WhiteBox AZ_PROFILE_FUNCTION(AzToolsFramework); AzToolsFramework::MidpointCalculator midpointCalculator; - for (const auto vertexHandle : vertexHandles) + for (const auto& vertexHandle : vertexHandles) { midpointCalculator.AddPosition(VertexPosition(whiteBox, vertexHandle)); } @@ -2723,7 +2718,7 @@ namespace WhiteBox const auto adjacentPolygonEdgeHandles = PolygonBorderEdgeHandlesFlattened(whiteBox, adjacentPolygonHandle); // iterate over all halfedges in the adjacent polygon - for (const auto edgeHandle : adjacentPolygonEdgeHandles) + for (const auto& edgeHandle : adjacentPolygonEdgeHandles) { const auto* const foundEdgeHandleInSelectedPolygon = AZStd::find(selectedPolygonEdgeHandles.cbegin(), selectedPolygonEdgeHandles.cend(), edgeHandle); @@ -2732,7 +2727,7 @@ namespace WhiteBox if (foundEdgeHandleInSelectedPolygon == selectedPolygonEdgeHandles.cend()) { // find outgoing edge handles - for (const auto halfedgeHandle : + for (const auto& halfedgeHandle : VertexOutgoingHalfedgeHandles(whiteBox, vertexHandlePair.m_existing)) { // attempt to find one of the outgoing halfedge handles in the adjacent polygon @@ -2793,7 +2788,7 @@ namespace WhiteBox FaceVertHandlesCollection& vertsForLinkingAdjacentPolygons) { // find all faces connected to this edge - for (const auto faceHandle : EdgeFaceHandles(whiteBox, edgeHandle)) + for (const auto& faceHandle : EdgeFaceHandles(whiteBox, edgeHandle)) { // find a face that is _not_ part of the polygon being appended/selected if (AZStd::find( @@ -2934,7 +2929,7 @@ namespace WhiteBox // erase face handles from the polygon map and // delete the faces from OpenMesh - for (const auto faceHandle : faceHandles) + for (const auto& faceHandle : faceHandles) { polygonProps.erase(om_fh(faceHandle)); whiteBox.mesh.delete_face(om_fh(faceHandle), false); @@ -2975,10 +2970,9 @@ namespace WhiteBox using ModifiedFaceHandle = AZStd::pair; using ModifiedFaceHandles = AZStd::vector; - // find all face handles that no longer match (where garbage_collect has invalidated the handles) - const ModifiedFaceHandles modifiedFaceHandles = std::transform_reduce( - faceHandlesCopy.cbegin(), faceHandlesCopy.cend(), faceHandlePtrs.cbegin(), ModifiedFaceHandles{}, - // reduce + const ModifiedFaceHandles modifiedFaceHandles = AZStd::inner_product( + faceHandlesCopy.begin(), faceHandlesCopy.end(), faceHandlePtrs.begin(), ModifiedFaceHandles{}, + //reduce [](ModifiedFaceHandles modifiedFaceHandles, const ModifiedFaceHandle& fh) { if (fh.first.is_valid()) @@ -2988,7 +2982,7 @@ namespace WhiteBox return modifiedFaceHandles; }, - // transform + //transform [](const Mesh::FaceHandle lhs, const Mesh::FaceHandle* rhs) { // if any of the faceHandlePtrs differ, we know the handles @@ -3030,14 +3024,14 @@ namespace WhiteBox faces.reserve(existingFaces.size()); // for each face - for (const FaceHandle faceHandle : existingFaces) + for (const FaceHandle& faceHandle : existingFaces) { VertexHandles vertexHandlesForFace; vertexHandlesForFace.reserve(3); const auto vertexHandles = FaceVertexHandles(whiteBox, faceHandle); // for each vertex handle - for (const VertexHandle vertexHandle : vertexHandles) + for (const VertexHandle& vertexHandle : vertexHandles) { // find vertex handle in vertices list const auto* const vertexHandlePairIt = AZStd::find_if( @@ -3092,11 +3086,11 @@ namespace WhiteBox Internal::AppendedVerts appendedVerts; appendedVerts.m_vertexHandlePairs.reserve(existingVertexHandles.size()); - for (const VertexHandle existingVertexHandle : existingVertexHandles) + for (const VertexHandle& existingVertexHandle : existingVertexHandles) { bool vertexHandleAdded = false; // visit all connected halfedge handles - for (const auto halfedgeHandle : VertexHalfedgeHandles(whiteBox, existingVertexHandle)) + for (const auto& halfedgeHandle : VertexHalfedgeHandles(whiteBox, existingVertexHandle)) { const auto edgeHandle = HalfedgeEdgeHandle(whiteBox, halfedgeHandle); const bool boundaryEdge = EdgeIsBoundary(whiteBox, edgeHandle); @@ -3372,7 +3366,7 @@ namespace WhiteBox AZ_PROFILE_FUNCTION(AzToolsFramework); const AZ::Transform polygonSpace = PolygonSpace(whiteBox, polygonHandle, pivot); - for (const auto vertexHandle : PolygonVertexHandles(whiteBox, polygonHandle)) + for (const auto& vertexHandle : PolygonVertexHandles(whiteBox, polygonHandle)) { SetVertexPosition( whiteBox, vertexHandle, diff --git a/Gems/WhiteBox/Code/Source/EditorWhiteBoxComponent.cpp b/Gems/WhiteBox/Code/Source/EditorWhiteBoxComponent.cpp index ee0052d5b9..dd64eee58a 100644 --- a/Gems/WhiteBox/Code/Source/EditorWhiteBoxComponent.cpp +++ b/Gems/WhiteBox/Code/Source/EditorWhiteBoxComponent.cpp @@ -92,7 +92,7 @@ namespace WhiteBox }; const auto faceHandles = Api::MeshFaceHandles(whiteBox); - for (const auto faceHandle : faceHandles) + for (const auto& faceHandle : faceHandles) { faceData.push_back(createWhiteBoxFaceFromHandle(faceHandle)); } @@ -265,6 +265,7 @@ namespace WhiteBox { incompatible.push_back(AZ_CRC_CE("NonUniformScaleService")); incompatible.push_back(AZ_CRC_CE("MeshService")); + incompatible.push_back(AZ_CRC_CE("WhiteBoxService")); } EditorWhiteBoxComponent::EditorWhiteBoxComponent() = default; @@ -720,7 +721,6 @@ namespace WhiteBox // must have at least one triangle if (m_faces->empty()) { - distance = std::numeric_limits::max(); return false; } @@ -735,7 +735,6 @@ namespace WhiteBox const AZ::Vector3 localRayEnd = localRayOrigin + localRayDirection * rayLength; bool intersection = false; - distance = std::numeric_limits::max(); for (const auto& face : m_faces.value()) { float t; @@ -817,7 +816,7 @@ namespace WhiteBox debugDisplay.DepthTestOn(); - for (const auto faceHandle : Api::MeshFaceHandles(whiteBoxMesh)) + for (const auto& faceHandle : Api::MeshFaceHandles(whiteBoxMesh)) { const auto faceHalfedgeHandles = Api::FaceHalfedgeHandles(whiteBoxMesh, faceHandle); @@ -832,7 +831,7 @@ namespace WhiteBox }) / 3.0f; - for (const auto halfedgeHandle : faceHalfedgeHandles) + for (const auto& halfedgeHandle : faceHalfedgeHandles) { const Api::VertexHandle vertexHandleAtTip = Api::HalfedgeVertexHandleAtTip(whiteBoxMesh, halfedgeHandle); @@ -887,7 +886,7 @@ namespace WhiteBox if (cl_whiteBoxDebugEdgeHandles) { - for (const auto edgeHandle : Api::MeshEdgeHandles(whiteBoxMesh)) + for (const auto& edgeHandle : Api::MeshEdgeHandles(whiteBoxMesh)) { const AZ::Vector3 localEdgeMidpoint = Api::EdgeMidpoint(whiteBoxMesh, edgeHandle); const AZ::Vector3 worldEdgeMidpoint = worldFromLocal.TransformPoint(localEdgeMidpoint); diff --git a/Gems/WhiteBox/Code/Source/EditorWhiteBoxComponentMode.cpp b/Gems/WhiteBox/Code/Source/EditorWhiteBoxComponentMode.cpp index 4bca7a9c96..de0fdf4cf9 100644 --- a/Gems/WhiteBox/Code/Source/EditorWhiteBoxComponentMode.cpp +++ b/Gems/WhiteBox/Code/Source/EditorWhiteBoxComponentMode.cpp @@ -25,8 +25,6 @@ namespace WhiteBox { AZ_CLASS_ALLOCATOR_IMPL(EditorWhiteBoxComponentMode, AZ::SystemAllocator, 0) - static const int DefaultWidgetBottomMargin = 5; - // helper function to return what modifier keys move us to restore mode static bool RestoreModifier(AzToolsFramework::ViewportInteraction::KeyboardModifiers modifiers) { @@ -410,7 +408,7 @@ namespace WhiteBox }(); // all edges that are valid to interact with at this time - for (const auto edgeHandle : edgeHandles) + for (const auto& edgeHandle : edgeHandles) { const auto edge = Api::EdgeVertexPositions(*whiteBox, edgeHandle); m_intersectionAndRenderData->m_whiteBoxIntersectionData.m_edgeBounds.emplace_back( @@ -418,14 +416,14 @@ namespace WhiteBox } // handle drawing 'user' and 'mesh' edges slightly differently - for (const auto edgeHandle : edgeHandlesPair.m_user) + for (const auto& edgeHandle : edgeHandlesPair.m_user) { const auto edge = Api::EdgeVertexPositions(*whiteBox, edgeHandle); m_intersectionAndRenderData->m_whiteBoxEdgeRenderData.m_bounds.m_user.emplace_back( EdgeBoundWithHandle{EdgeBound{edge[0], edge[1], cl_whiteBoxEdgeSelectionWidth}, edgeHandle}); } - for (const auto edgeHandle : edgeHandlesPair.m_mesh) + for (const auto& edgeHandle : edgeHandlesPair.m_mesh) { const auto edge = Api::EdgeVertexPositions(*whiteBox, edgeHandle); m_intersectionAndRenderData->m_whiteBoxEdgeRenderData.m_bounds.m_mesh.emplace_back( diff --git a/Gems/WhiteBox/Code/Source/Platform/Linux/PAL_linux.cmake b/Gems/WhiteBox/Code/Source/Platform/Linux/PAL_linux.cmake index 3927f19061..13b045e67a 100644 --- a/Gems/WhiteBox/Code/Source/Platform/Linux/PAL_linux.cmake +++ b/Gems/WhiteBox/Code/Source/Platform/Linux/PAL_linux.cmake @@ -6,4 +6,4 @@ # # -set(PAL_TRAIT_WHITEBOX_SUPPORTED FALSE) +set(PAL_TRAIT_WHITEBOX_SUPPORTED TRUE) diff --git a/Gems/WhiteBox/Code/Source/Platform/Linux/platform_linux_tools.cmake b/Gems/WhiteBox/Code/Source/Platform/Linux/platform_linux_tools.cmake new file mode 100644 index 0000000000..ca99817d82 --- /dev/null +++ b/Gems/WhiteBox/Code/Source/Platform/Linux/platform_linux_tools.cmake @@ -0,0 +1,16 @@ +# +# Copyright (c) Contributors to the Open 3D Engine Project. +# For complete copyright and license terms please see the LICENSE at the root of this distribution. +# +# SPDX-License-Identifier: Apache-2.0 OR MIT +# +# + +if(PAL_TRAIT_BUILD_HOST_TOOLS) + + ly_associate_package(PACKAGE_NAME OpenMesh-8.1-rev3-linux TARGETS OpenMesh PACKAGE_HASH 805bd0b24911bb00c7f575b8c3f10d7ea16548a5014c40811894a9445f17a126) + + set(LY_BUILD_DEPENDENCIES + PRIVATE + 3rdParty::OpenMesh) +endif() diff --git a/Gems/WhiteBox/Code/Source/Platform/Mac/platform_mac_tools.cmake b/Gems/WhiteBox/Code/Source/Platform/Mac/platform_mac_tools.cmake new file mode 100644 index 0000000000..030b621642 --- /dev/null +++ b/Gems/WhiteBox/Code/Source/Platform/Mac/platform_mac_tools.cmake @@ -0,0 +1,16 @@ +# +# Copyright (c) Contributors to the Open 3D Engine Project. +# For complete copyright and license terms please see the LICENSE at the root of this distribution. +# +# SPDX-License-Identifier: Apache-2.0 OR MIT +# +# + +if(PAL_TRAIT_BUILD_HOST_TOOLS) + + ly_associate_package(PACKAGE_NAME OpenMesh-8.1-rev3-mac TARGETS OpenMesh PACKAGE_HASH af92db02a25c1f7e1741ec898f49d81d52631e00336bf9bddd1e191590063c2f) + + set(LY_BUILD_DEPENDENCIES + PRIVATE + 3rdParty::OpenMesh) +endif() diff --git a/Gems/WhiteBox/Code/Source/Platform/Windows/platform_windows_tools.cmake b/Gems/WhiteBox/Code/Source/Platform/Windows/platform_windows_tools.cmake index 437dbc192d..aa56fe7b23 100644 --- a/Gems/WhiteBox/Code/Source/Platform/Windows/platform_windows_tools.cmake +++ b/Gems/WhiteBox/Code/Source/Platform/Windows/platform_windows_tools.cmake @@ -8,7 +8,7 @@ if(PAL_TRAIT_BUILD_HOST_TOOLS) - ly_associate_package(PACKAGE_NAME OpenMesh-8.1-rev1-windows TARGETS OpenMesh PACKAGE_HASH 1c1df639358526c368e790dfce40c45cbdfcfb1c9a041b9d7054a8949d88ee77) + ly_associate_package(PACKAGE_NAME OpenMesh-8.1-rev3-windows TARGETS OpenMesh PACKAGE_HASH 7a6309323ad03bfc646bd04ecc79c3711de6790e4ff5a72f83a8f5a8f496d684) set(LY_BUILD_DEPENDENCIES PRIVATE diff --git a/Gems/WhiteBox/Code/Source/Rendering/Atom/WhiteBoxBuffer.h b/Gems/WhiteBox/Code/Source/Rendering/Atom/WhiteBoxBuffer.h index a96ccd98be..671e2f290d 100644 --- a/Gems/WhiteBox/Code/Source/Rendering/Atom/WhiteBoxBuffer.h +++ b/Gems/WhiteBox/Code/Source/Rendering/Atom/WhiteBoxBuffer.h @@ -10,6 +10,7 @@ #include "PackedFloat2.h" +#include #include #include #include diff --git a/Gems/WhiteBox/Code/Source/SubComponentModes/EditorWhiteBoxDefaultMode.cpp b/Gems/WhiteBox/Code/Source/SubComponentModes/EditorWhiteBoxDefaultMode.cpp index 3d6d9a4c0a..608605be62 100644 --- a/Gems/WhiteBox/Code/Source/SubComponentModes/EditorWhiteBoxDefaultMode.cpp +++ b/Gems/WhiteBox/Code/Source/SubComponentModes/EditorWhiteBoxDefaultMode.cpp @@ -33,8 +33,8 @@ namespace WhiteBox AZ::Color, cl_whiteBoxVertexIndicatorColor, AZ::Color::CreateFromRgba(0, 0, 0, 102), nullptr, AZ::ConsoleFunctorFlags::Null, "The color of the vertex indicator"); - static const AZ::Crc32 HideEdge = AZ_CRC("com.o3de.action.whitebox.hide_edge", 0x6a60ae23); - static const AZ::Crc32 HideVertex = AZ_CRC("com.o3de.action.whitebox.hide_vertex", 0x4a4bd092); + static const AZ::Crc32 HideEdge = AZ_CRC("com.o3de.action.whitebox.hide_edge", 0x84f6a9b9); + static const AZ::Crc32 HideVertex = AZ_CRC("com.o3de.action.whitebox.hide_vertex", 0x5f81c937); static const char* const HideEdgeTitle = "Hide Edge"; static const char* const HideEdgeDesc = "Hide the selected edge to merge the two connected polygons"; diff --git a/Gems/WhiteBox/Code/Source/SubComponentModes/EditorWhiteBoxEdgeRestoreMode.cpp b/Gems/WhiteBox/Code/Source/SubComponentModes/EditorWhiteBoxEdgeRestoreMode.cpp index fee23811a8..977b725b84 100644 --- a/Gems/WhiteBox/Code/Source/SubComponentModes/EditorWhiteBoxEdgeRestoreMode.cpp +++ b/Gems/WhiteBox/Code/Source/SubComponentModes/EditorWhiteBoxEdgeRestoreMode.cpp @@ -155,7 +155,7 @@ namespace WhiteBox // special handling for edges in the process of being restored - an edge may be clicked // and remain 'orphaned' from a polygon until another connection (loop) can be made. - for (const Api::EdgeHandle edgeHandleRestore : m_edgeHandlesBeingRestored) + for (const Api::EdgeHandle& edgeHandleRestore : m_edgeHandlesBeingRestored) { if (AZStd::any_of( interactiveEdgeHandles.begin(), interactiveEdgeHandles.end(), diff --git a/Gems/WhiteBox/Code/Source/Viewport/WhiteBoxEdgeTranslationModifier.cpp b/Gems/WhiteBox/Code/Source/Viewport/WhiteBoxEdgeTranslationModifier.cpp index fb9d790111..2ce8bd4764 100644 --- a/Gems/WhiteBox/Code/Source/Viewport/WhiteBoxEdgeTranslationModifier.cpp +++ b/Gems/WhiteBox/Code/Source/Viewport/WhiteBoxEdgeTranslationModifier.cpp @@ -14,7 +14,8 @@ #include "Viewport/WhiteBoxViewportConstants.h" #include "WhiteBoxEdgeTranslationModifier.h" #include "WhiteBoxManipulatorViews.h" - +#include +#include #include #include #include @@ -65,19 +66,17 @@ namespace WhiteBox // (ensure to remove duplicates as vertices will be shared across edges) static Api::VertexHandles VertexHandlesForEdges(const WhiteBoxMesh& whiteBox, const Api::EdgeHandles& edgeHandles) { - auto vertexHandles = std::reduce( + Api::VertexHandles vertexHandles = AZStd::accumulate( edgeHandles.cbegin(), edgeHandles.cend(), Api::VertexHandles{}, - [&whiteBox](Api::VertexHandles vertexHandles, const Api::EdgeHandle edgeHandle) + [&whiteBox](Api::VertexHandles vertexHandles, const Api::EdgeHandle edgeHandle) { const auto edgeVertexHandles = Api::EdgeVertexHandles(whiteBox, edgeHandle); - vertexHandles.push_back(edgeVertexHandles[0]); - vertexHandles.push_back(edgeVertexHandles[1]); + vertexHandles.insert(vertexHandles.end(), edgeVertexHandles.begin(), edgeVertexHandles.end()); return vertexHandles; }); - - std::sort(vertexHandles.begin(), vertexHandles.end()); - vertexHandles.erase(std::unique(vertexHandles.begin(), vertexHandles.end()), vertexHandles.end()); - + + AZStd::sort(vertexHandles.begin(), vertexHandles.end()); + vertexHandles.erase(AZStd::unique(vertexHandles.begin(), vertexHandles.end()), vertexHandles.end()); return vertexHandles; } @@ -208,7 +207,7 @@ namespace WhiteBox const AZ::Vector3 displacement = position - sharedState->m_prevPosition; // have to make sure we don't move verts more than once - for (const auto vertexHandle : VertexHandlesForEdges(*whiteBox, m_edgeHandles)) + for (const auto& vertexHandle : VertexHandlesForEdges(*whiteBox, m_edgeHandles)) { SetVertexPosition( *whiteBox, vertexHandle, VertexPosition(*whiteBox, vertexHandle) + displacement); diff --git a/Gems/WhiteBox/Code/Source/Viewport/WhiteBoxPolygonTranslationModifier.cpp b/Gems/WhiteBox/Code/Source/Viewport/WhiteBoxPolygonTranslationModifier.cpp index c4e106cba0..3e166e9d72 100644 --- a/Gems/WhiteBox/Code/Source/Viewport/WhiteBoxPolygonTranslationModifier.cpp +++ b/Gems/WhiteBox/Code/Source/Viewport/WhiteBoxPolygonTranslationModifier.cpp @@ -169,7 +169,7 @@ namespace WhiteBox sharedState->m_appendStage == AppendStage::Complete) { size_t vertexIndex = 0; - for (const Api::VertexHandle vertexHandle : m_vertexHandles) + for (const Api::VertexHandle& vertexHandle : m_vertexHandles) { const AZ::Vector3 vertexPosition = sharedState->m_vertexPositions[vertexIndex++] + action.LocalPositionOffset() - sharedState->m_activeAppendOffset; diff --git a/Gems/WhiteBox/Code/Source/Viewport/WhiteBoxVertexTranslationModifier.cpp b/Gems/WhiteBox/Code/Source/Viewport/WhiteBoxVertexTranslationModifier.cpp index daa81c9aa3..c4613e24c7 100644 --- a/Gems/WhiteBox/Code/Source/Viewport/WhiteBoxVertexTranslationModifier.cpp +++ b/Gems/WhiteBox/Code/Source/Viewport/WhiteBoxVertexTranslationModifier.cpp @@ -148,7 +148,7 @@ namespace WhiteBox m_localPositionAtMouseDown = m_translationManipulator->GetLocalPosition(); - for (const auto edgeHandle : Api::VertexUserEdgeHandles(*whiteBox, m_vertexHandle)) + for (const auto& edgeHandle : Api::VertexUserEdgeHandles(*whiteBox, m_vertexHandle)) { const auto edgeVertexPositions = Api::EdgeVertexPositions(*whiteBox, edgeHandle); sharedState->m_edgeBeginEnds.push_back( diff --git a/Gems/WhiteBox/Code/Tests/WhiteBoxComponentTest.cpp b/Gems/WhiteBox/Code/Tests/WhiteBoxComponentTest.cpp index 0e93f38195..ce592ee2ed 100644 --- a/Gems/WhiteBox/Code/Tests/WhiteBoxComponentTest.cpp +++ b/Gems/WhiteBox/Code/Tests/WhiteBoxComponentTest.cpp @@ -22,6 +22,7 @@ #include #include #include +#include #include #include #include @@ -38,10 +39,6 @@ namespace UnitTest static const AzToolsFramework::ManipulatorManagerId TestManipulatorManagerId = AzToolsFramework::ManipulatorManagerId(AZ::Crc32("TestManipulatorManagerId")); - class NullDebugDisplayRequests : public AzFramework::DebugDisplayRequests - { - }; - class WhiteBoxManipulatorFixture : public WhiteBoxTestFixture { public: @@ -67,7 +64,8 @@ namespace UnitTest // create the direct call manipulator viewport interaction and an immediate mode dispatcher AZStd::unique_ptr viewportManipulatorInteraction = - AZStd::make_unique(); + AZStd::make_unique( + AZStd::make_shared()); AZStd::unique_ptr actionDispatcher = AZStd::make_unique( *viewportManipulatorInteraction); diff --git a/Gems/WhiteBox/Code/Tests/WhiteBoxTest.cpp b/Gems/WhiteBox/Code/Tests/WhiteBoxTest.cpp index 056c85512f..aa5d4645ae 100644 --- a/Gems/WhiteBox/Code/Tests/WhiteBoxTest.cpp +++ b/Gems/WhiteBox/Code/Tests/WhiteBoxTest.cpp @@ -563,7 +563,7 @@ namespace UnitTest const auto polygonHandle = Api::InitializeAsUnitQuad(*m_whiteBox); const auto edgeHandles = Api::PolygonBorderEdgeHandlesFlattened(*m_whiteBox, polygonHandle); - for (const auto edgeHandle : edgeHandles) + for (const auto& edgeHandle : edgeHandles) { // when const auto tail = Api::HalfedgeVertexPositionAtTail( @@ -702,7 +702,7 @@ namespace UnitTest // given const auto edgeHandles = Api::MeshEdgeHandles(*m_whiteBox); - for (const auto edgeHandle : edgeHandles) + for (const auto& edgeHandle : edgeHandles) { const auto firstHalfedgeHandle = Api::EdgeHalfedgeHandle(*m_whiteBox, edgeHandle, Api::EdgeHalfedge::First); const auto secondHalfedgeHandle = @@ -992,7 +992,7 @@ namespace UnitTest const auto polygonHandles = Api::InitializeAsUnitCube(*m_whiteBox); // hide all 'logical'/'visible' edges (those that define the bounds of a polygon) - for (const auto edgeHandle : + for (const auto& edgeHandle : {Api::EdgeHandle{1}, Api::EdgeHandle{3}, Api::EdgeHandle{4}, Api::EdgeHandle{0}, Api::EdgeHandle{6}}) { Api::HideEdge(*m_whiteBox, edgeHandle); @@ -1024,7 +1024,7 @@ namespace UnitTest *m_whiteBox, Api::PolygonHandle{Api::FaceHandles{{Api::FaceHandle{4}, Api::FaceHandle{5}}}}, -0.25f); // hide all 'logical'/'visible' edges for scale appended face - for (const auto edgeHandle : {Api::EdgeHandle{25}, Api::EdgeHandle{27}, Api::EdgeHandle{24}}) + for (const auto& edgeHandle : {Api::EdgeHandle{25}, Api::EdgeHandle{27}, Api::EdgeHandle{24}}) { Api::HideEdge(*m_whiteBox, edgeHandle); } @@ -1065,7 +1065,7 @@ namespace UnitTest Api::InitializeAsUnitCube(*m_whiteBox); // hide all vertical 'logical'/'visible' edges - for (const auto edgeHandle : {Api::EdgeHandle{13}, Api::EdgeHandle{15}, Api::EdgeHandle{12}}) + for (const auto& edgeHandle : {Api::EdgeHandle{13}, Api::EdgeHandle{15}, Api::EdgeHandle{12}}) { Api::HideEdge(*m_whiteBox, edgeHandle); } @@ -1138,7 +1138,7 @@ namespace UnitTest int restoreCount = 0; Api::EdgeHandles restoringEdgeHandles; // inout param AZStd::optional> splitPolygons; - for (const Api::EdgeHandle edgeHandleToRestore : edgeHandlesToRestore) + for (const Api::EdgeHandle& edgeHandleToRestore : edgeHandlesToRestore) { splitPolygons = Api::RestoreEdge(*m_whiteBox, edgeHandleToRestore, restoringEdgeHandles); restoreCount++; @@ -1792,14 +1792,14 @@ namespace UnitTest Api::InitializeAsUnitCube(*m_whiteBox); // hide all top vertices - for (const auto vertexHandle : + for (const auto& vertexHandle : {Api::VertexHandle{0}, Api::VertexHandle{1}, Api::VertexHandle{2}, Api::VertexHandle{3}}) { Api::HideVertex(*m_whiteBox, vertexHandle); } // hide all vertical edges - for (const auto edgeHandle : + for (const auto& edgeHandle : {Api::EdgeHandle{15}, Api::EdgeHandle{13}, Api::EdgeHandle{12}, Api::EdgeHandle{10}}) { Api::HideEdge(*m_whiteBox, edgeHandle); @@ -2116,7 +2116,7 @@ namespace UnitTest bool edgeRestored = false; Api::EdgeHandles restoringEdgeHandles; // inout param - for (const Api::EdgeHandle edgeHandleToRestore : edgeHandlesToRestore) + for (const Api::EdgeHandle& edgeHandleToRestore : edgeHandlesToRestore) { if (Api::RestoreEdge(*m_whiteBox, edgeHandleToRestore, restoringEdgeHandles)) { diff --git a/Gems/WhiteBox/Code/Tests/WhiteBoxTestRailsAutomation.cpp b/Gems/WhiteBox/Code/Tests/WhiteBoxTestRailsAutomation.cpp index 8db48ca0aa..c173f7b6a9 100644 --- a/Gems/WhiteBox/Code/Tests/WhiteBoxTestRailsAutomation.cpp +++ b/Gems/WhiteBox/Code/Tests/WhiteBoxTestRailsAutomation.cpp @@ -158,8 +158,6 @@ namespace UnitTest // the initial starting position of the entity (in front and to the left of the camera) const AZ::Transform initialEntityTransformWorld = AZ::Transform::CreateTranslation(AZ::Vector3(-10.0f, 10.0f, 0.0f)); - // world space delta we will be moving the polygon face - const auto worldTranslationDelta = AZ::Vector3::CreateAxisX(20.0f); // the face handle we will use to get the parent polygon from const int faceHandle = 7; // the polygon vertex handle we will be dragging diff --git a/Gems/WhiteBox/gem.json b/Gems/WhiteBox/gem.json index 81e0ad5f88..2d173e9a6b 100644 --- a/Gems/WhiteBox/gem.json +++ b/Gems/WhiteBox/gem.json @@ -2,6 +2,7 @@ "gem_name": "WhiteBox", "display_name": "White Box", "license": "Apache-2.0 Or MIT", + "license_url": "https://github.com/o3de/o3de/blob/development/LICENSE.txt", "origin": "Open 3D Engine - o3de.org", "type": "Tool", "summary": "The White Box Gem provides White Box rapid design components for Open 3D Engine.", @@ -19,6 +20,7 @@ "dependencies": [ "Atom_RPI", "Atom_Feature_Common", - "CommonFeaturesAtom" + "CommonFeaturesAtom", + "EditorPythonBindings" ] } diff --git a/README.md b/README.md index 1191a0f0ee..063a59de74 100644 --- a/README.md +++ b/README.md @@ -42,7 +42,7 @@ For the latest details and system requirements, refer to [System Requirements](h * Game Development with C++ * MSVC v142 - VS 2019 C++ x64/x86 * C++ 2019 redistributable update -* CMake 3.20.5 minimum: [https://cmake.org/download/](https://cmake.org/download/) +* CMake 3.20.5 minimum: [https://cmake.org/download/#latest](https://cmake.org/download/#latest) (Release Candidate versions are not supported) #### Optional @@ -66,7 +66,7 @@ To set up a project-centric source engine, complete the following steps. For oth Example: ``` - cmake -B C:\o3de\build\windows_vs2019 -S C:\o3de -G "Visual Studio 16" -DLY_3RDPARTY_PATH=C:\o3de-packages + cmake -B C:\o3de\build\windows -S C:\o3de -G "Visual Studio 16" -DLY_3RDPARTY_PATH=C:\o3de-packages ``` > Note: Do not use trailing slashes for the <3rdParty package path>. @@ -102,12 +102,12 @@ For more details on the steps above, refer to [Setting up O3DE from GitHub](http 1. Configure a solution for your project. ``` - cmake -B -S -G "Visual Studio 16" -DLY_3RDPARTY_PATH=<3rdParty cache path> + cmake -B -S -G "Visual Studio 16" ``` Example: ``` - cmake -B C:\my-project\build\windows_vs2019 -S C:\my-project -G "Visual Studio 16" -DLY_3RDPARTY_PATH=C:\o3de-packages + cmake -B C:\my-project\build\windows -S C:\my-project -G "Visual Studio 16" ``` > Note: Do not use trailing slashes for the <3rdParty cache path>. diff --git a/RETIRED_CODE.md b/RETIRED_CODE.md new file mode 100644 index 0000000000..285c06b0b2 --- /dev/null +++ b/RETIRED_CODE.md @@ -0,0 +1,40 @@ +## This is a list of functionality that was removed at some point. + +The main goal of this list, is to enable future developers to find old code that might be useful when implementing new,or re-implementing missing features. + +|Date | PR | Short description of removed functionality| +|--|--|--| +| 2021-11-25 | | ObjectManager - parameter begin/end editing callbacks| +| 2021-11-25 | | ObjectManager - `InvertSelection()`| +| 2021-11-25 | | ObjectManager - unused named selection group support| +| 2021-11-25 | | ObjectManager - unused xml export functionality| +| 2021-11-25 | | ObjectManager - unused object hiding and freezing functionality| +| 2021-11-25 | | ObjectManager - unused object renaming and duplicate name detection| +| 2021-11-25 | | ObjectManager - unused selection callbacks and serialization| +| 2021-11-26 | | ObjectManager - unused selection support, MoveObjects/HitTestObject/EndEditParams| +| 2021-11-26 | | Unused code - CloneObject,SelectEntities,EnableUniqueObjectNames,NotifyObjectListeners,CloneChildren, PostClone| +| 2021-11-26 | | Unused code - GetClassCategories/SetCreateGameObject/FindAndRenameProperty2/IsExporting/IsReloading/StartObjectLoading| +| 2021-11-26 | | ObjectManager - unused code - ForceID/ConvertToType/SetSkipUpdate/LoadRegistry/UpdateRegisterObjectName/HitTestObjectAgainstRect/SelectObjectInRect| +| 2021-11-26 | | ObjectManager - unused GetObjects/SelectObjects, ObjectLoader - LoadObjects| +| 2021-11-26 | | CBaseObject - unused material layers mask support| +| 2021-11-26 | | CBaseObject - GetWarningsText/HideOrder, unused scaling functions,IsChildOf and GetLinkParent| +| 2021-11-26 | | CBaseObject - SubObj selection, IsParentAttachmentValid, IMouseCreateCallback,GetWorldAngles| +| 2021-11-26 | | CBaseObject - procedural floor management, EditTags, HelperScale| +| 2021-11-26 | | CBaseObject - PropertyChanged,SetNameInternal,OnMenuShowInAssetBrowser| +| 2021-11-26 | | CObjectArchive - unused sequence remapping, loaded object access | +| 2021-11-26 | | IDisplayViewport - unused interface `HitTestLine/GetGridStep/setHitcontext`| +| 2021-11-27 | | CBaseObject and children - unused HitHelperTest/MouseCreateCallback| +| 2021-11-28 | | CBaseObject - unused OnContextMenu and unused undo description strings. | +| 2021-11-28 | | Editor KDTree implementation | +| 2021-11-28 | | CExportManager - unused AddStatObj/AddMeshes/AddMesh| +| 2021-11-28 | | unused CUndoBaseLibraryManager and CUndoBaseLibrary| +| 2021-11-28 | | IXmlNode - unused shareChildren/deleteChildAt/clone/insertChild/replaceChild functionality| +| 2021-11-28 | | CXmlArchive - unused Load/Save methods| +| 2021-12-03 | #6086 | MemoryDriller, PlatformMemoryInstrumentation - Driller no longer functional (Profiler was deleted months ago)| +| 2021-12-03 | #6086 | TraceMessageDrillerBus, TraceMessagesDriller - Driller no longer functional (Profiler was deleted months ago)| +| 2021-12-03 | #6086 | ThreadDrillerEvents - Driller no longer functional (Profiler was deleted months ago)| +| 2021-12-03 | #6086 | CarrierDrillerBus, CarrierDriller, ReplicaDriller, SessionDriller, SessionDrillerBus (from GridMate) - Driller no longer functional (Profiler was deleted months ago)| +| 2021-12-03 | #6086 | AssetTracking, Gems/AssetMemoryAnalyzer - Relies on driller that is no longer functional (Profiler was deleted months ago)| +| 2021-12-03 | #6086 | DrillerBus, DrillerManager, DrillerEvents, EventTraceDrillerBus, Driller, DrillerDefaultStringPool - Driller no longer functional (Profiler was deleted months ago)| +| 2021-12-03 | #6086 | FileIOEvents - Prone to false-positives (errors from other threads), not really useful| +| 2021-12-03 | #6086 | FileIOBus - Unused and not the best way to implement a filesystem replacement| diff --git a/Registry/AssetProcessorPlatformConfig.setreg b/Registry/AssetProcessorPlatformConfig.setreg index c8d8dd9a80..255bac17e0 100644 --- a/Registry/AssetProcessorPlatformConfig.setreg +++ b/Registry/AssetProcessorPlatformConfig.setreg @@ -21,6 +21,19 @@ "Amazon": { "AssetProcessor": { "Settings": { + "Stats": { + // Setting MachineReadable to true will output stats in more of a CSV-like format that is ideal for script ingestion + "MachineReadable" : false, + // Setting HumanReadable to true will output stats in a friendly human format that is ideal for human reading + "HumanReadable" : true, + // To turn off stats output entirely, set both HumanReadable and MachineReadable to false. + // the maximum number of stats to show for cumulative stats like the time taken + // across all jobs of a certain type, or all jobs cumulative across a whole platform + "MaxCumulativeStats" : 4, + // the maximum number of stats to show for individual stats like how long a specific + // individual job took. + "MaxIndividualStats" : 4 + }, "Platform pc": { "tags": "tools,renderer,dx12,vulkan,null" }, @@ -444,6 +457,7 @@ "RC physmaterial": { "glob": "*.physmaterial", "params": "copy", + "critical": true, "productAssetType": "{9E366D8C-33BB-4825-9A1F-FA3ADBE11D0F}" }, "RC ocm": { diff --git a/Registry/Platform/Mac/bootstrap_overrides.setreg b/Registry/Platform/Mac/bootstrap_overrides.setreg new file mode 100644 index 0000000000..4e1ca76724 --- /dev/null +++ b/Registry/Platform/Mac/bootstrap_overrides.setreg @@ -0,0 +1,12 @@ +{ + "Amazon": { + "AzCore": { + "Bootstrap": { + // The first time an application is launched on MacOS, each + // dynamic library is inspected by the OS before being loaded. + // This can take a while on some Macs. + "launch_ap_timeout": 300 + } + } + } +} diff --git a/Registry/application_lifecycle_events.setreg b/Registry/application_lifecycle_events.setreg index 0d9cd0f170..c52c93c0c0 100644 --- a/Registry/application_lifecycle_events.setreg +++ b/Registry/application_lifecycle_events.setreg @@ -23,7 +23,8 @@ "GemsUnloaded": {}, "FileIOAvailable": {}, "FileIOUnavailable": {}, - "LegacySystemInterfaceCreated": {} + "LegacySystemInterfaceCreated": {}, + "CriticalAssetsCompiled": {} } } } diff --git a/Registry/bootstrap.setreg b/Registry/bootstrap.setreg index b2bcdd7f3f..5fdb8e0941 100644 --- a/Registry/bootstrap.setreg +++ b/Registry/bootstrap.setreg @@ -12,6 +12,7 @@ "android_assets": "android", "ios_assets": "ios", "mac_assets": "mac", + "salem_assets": "salem", "allowed_list": "", "remote_ip": "127.0.0.1", "remote_port": 45643, diff --git a/Registry/prefab.test.setreg b/Registry/prefab.test.setreg new file mode 100644 index 0000000000..3434bdbb1b --- /dev/null +++ b/Registry/prefab.test.setreg @@ -0,0 +1,21 @@ +{ + "Amazon": + { + "Tools": + { + "Prefab": + { + "Processing": + { + "Stack": { + "IntegrationTests": + [ + { "$type": "AzToolsFramework::Prefab::PrefabConversionUtils::EditorInfoRemover" }, + { "$type": "AzToolsFramework::Prefab::PrefabConversionUtils::PrefabCatchmentProcessor" } + ] + } + } + } + } + } +} \ No newline at end of file diff --git a/Templates/AssetGem/Template/gem.json b/Templates/AssetGem/Template/gem.json index 2a688857f2..2a02362256 100644 --- a/Templates/AssetGem/Template/gem.json +++ b/Templates/AssetGem/Template/gem.json @@ -1,7 +1,8 @@ { "gem_name": "${Name}", "display_name": "${Name}", - "license": "What license ${Name} uses goes here: i.e. https://opensource.org/licenses/MIT", + "license": "What license ${Name} uses goes here: i.e. Apache-2.0 Or MIT", + "license_url": "", "origin": "The primary repo for ${Name} goes here: i.e. http://www.mydomain.com", "type": "Asset", "summary": "A short description of ${Name}.", diff --git a/Templates/CMakeLists.txt b/Templates/CMakeLists.txt index 9735907a6a..5f5d561a9f 100644 --- a/Templates/CMakeLists.txt +++ b/Templates/CMakeLists.txt @@ -14,5 +14,6 @@ ly_install_directory( DefaultGem DefaultProject MinimalProject + GemRepo VERBATIM ) diff --git a/Templates/CppToolGem/Template/gem.json b/Templates/CppToolGem/Template/gem.json index 518d831e0f..079b7152ff 100644 --- a/Templates/CppToolGem/Template/gem.json +++ b/Templates/CppToolGem/Template/gem.json @@ -1,7 +1,8 @@ { "gem_name": "${Name}", "display_name": "${Name}", - "license": "What license ${Name} uses goes here: i.e. https://opensource.org/licenses/MIT", + "license": "What license ${Name} uses goes here: i.e. Apache-2.0 Or MIT", + "license_url": "", "origin": "The primary repo for ${Name} goes here: i.e. http://www.mydomain.com", "type": "Code", "summary": "A short description of ${Name}.", diff --git a/Templates/DefaultGem/Template/gem.json b/Templates/DefaultGem/Template/gem.json index 353ad6bf8d..d4ff637bee 100644 --- a/Templates/DefaultGem/Template/gem.json +++ b/Templates/DefaultGem/Template/gem.json @@ -1,7 +1,8 @@ { "gem_name": "${Name}", "display_name": "${Name}", - "license": "What license ${Name} uses goes here: i.e. https://opensource.org/licenses/MIT", + "license": "What license ${Name} uses goes here: i.e. Apache-2.0 Or MIT", + "license_url": "", "origin": "The primary repo for ${Name} goes here: i.e. http://www.mydomain.com", "type": "Code", "summary": "A short description of ${Name}.", diff --git a/Templates/DefaultProject/Template/CMakeLists.txt b/Templates/DefaultProject/Template/CMakeLists.txt index 76e8f227be..ae4bb662a3 100644 --- a/Templates/DefaultProject/Template/CMakeLists.txt +++ b/Templates/DefaultProject/Template/CMakeLists.txt @@ -10,11 +10,12 @@ if(NOT PROJECT_NAME) cmake_minimum_required(VERSION 3.20) + include(cmake/CompilerSettings.cmake) project(${Name} LANGUAGES C CXX VERSION 1.0.0.0 ) - include(EngineFinder.cmake OPTIONAL) + include(cmake/EngineFinder.cmake OPTIONAL) find_package(o3de REQUIRED) o3de_initialize() else() diff --git a/Templates/DefaultProject/Template/Code/enabled_gems.cmake b/Templates/DefaultProject/Template/Code/enabled_gems.cmake index 833fe57660..e0902a5989 100644 --- a/Templates/DefaultProject/Template/Code/enabled_gems.cmake +++ b/Templates/DefaultProject/Template/Code/enabled_gems.cmake @@ -22,6 +22,7 @@ set(ENABLED_GEMS Multiplayer PhysX PrimitiveAssets + PrefabBuilder SaveData ScriptCanvasPhysics ScriptEvents diff --git a/Templates/DefaultProject/Template/EngineFinder.cmake b/Templates/DefaultProject/Template/EngineFinder.cmake deleted file mode 100644 index 98ad61bae8..0000000000 --- a/Templates/DefaultProject/Template/EngineFinder.cmake +++ /dev/null @@ -1,92 +0,0 @@ -# {BEGIN_LICENSE} -# -# Copyright (c) Contributors to the Open 3D Engine Project. -# For complete copyright and license terms please see the LICENSE at the root of this distribution. -# -# SPDX-License-Identifier: Apache-2.0 OR MIT -# -# -# {END_LICENSE} -# This file is copied during engine registration. Edits to this file will be lost next -# time a registration happens. - -include_guard() - -# Read the engine name from the project_json file -file(READ ${CMAKE_CURRENT_LIST_DIR}/project.json project_json) -set_property(DIRECTORY APPEND PROPERTY CMAKE_CONFIGURE_DEPENDS ${CMAKE_CURRENT_LIST_DIR}/project.json) - -string(JSON LY_ENGINE_NAME_TO_USE ERROR_VARIABLE json_error GET ${project_json} engine) -if(json_error) - message(FATAL_ERROR "Unable to read key 'engine' from 'project.json'\nError: ${json_error}") -endif() - -if(CMAKE_MODULE_PATH) - foreach(module_path ${CMAKE_MODULE_PATH}) - if(EXISTS ${module_path}/Findo3de.cmake) - file(READ ${module_path}/../engine.json engine_json) - string(JSON engine_name ERROR_VARIABLE json_error GET ${engine_json} engine_name) - if(json_error) - message(FATAL_ERROR "Unable to read key 'engine_name' from 'engine.json'\nError: ${json_error}") - endif() - if(LY_ENGINE_NAME_TO_USE STREQUAL engine_name) - return() # Engine being forced through CMAKE_MODULE_PATH - endif() - endif() - endforeach() -endif() - -if(DEFINED ENV{USERPROFILE} AND EXISTS $ENV{USERPROFILE}) - set(manifest_path $ENV{USERPROFILE}/.o3de/o3de_manifest.json) # Windows -else() - set(manifest_path $ENV{HOME}/.o3de/o3de_manifest.json) # Unix -endif() - -set(registration_error [=[ -Engine registration is required before configuring a project. -Run 'scripts/o3de register --this-engine' from the engine root. -]=]) - -# Read the ~/.o3de/o3de_manifest.json file and look through the 'engines_path' object. -# Find a key that matches LY_ENGINE_NAME_TO_USE and use that as the engine path. -if(EXISTS ${manifest_path}) - file(READ ${manifest_path} manifest_json) - set_property(DIRECTORY APPEND PROPERTY CMAKE_CONFIGURE_DEPENDS ${manifest_path}) - - string(JSON engines_path_count ERROR_VARIABLE json_error LENGTH ${manifest_json} engines_path) - if(json_error) - message(FATAL_ERROR "Unable to read key 'engines_path' from '${manifest_path}'\nError: ${json_error}\n${registration_error}") - endif() - - string(JSON engines_path_type ERROR_VARIABLE json_error TYPE ${manifest_json} engines_path) - if(json_error OR NOT ${engines_path_type} STREQUAL "OBJECT") - message(FATAL_ERROR "Type of 'engines_path' in '${manifest_path}' is not a JSON Object\nError: ${json_error}") - endif() - - math(EXPR engines_path_count "${engines_path_count}-1") - foreach(engine_path_index RANGE ${engines_path_count}) - string(JSON engine_name ERROR_VARIABLE json_error MEMBER ${manifest_json} engines_path ${engine_path_index}) - if(json_error) - message(FATAL_ERROR "Unable to read 'engines_path/${engine_path_index}' from '${manifest_path}'\nError: ${json_error}") - endif() - - if(LY_ENGINE_NAME_TO_USE STREQUAL engine_name) - string(JSON engine_path ERROR_VARIABLE json_error GET ${manifest_json} engines_path ${engine_name}) - if(json_error) - message(FATAL_ERROR "Unable to read value from 'engines_path/${engine_name}'\nError: ${json_error}") - endif() - - if(engine_path) - list(APPEND CMAKE_MODULE_PATH "${engine_path}/cmake") - return() - endif() - endif() - endforeach() - - message(FATAL_ERROR "The project.json uses engine name '${LY_ENGINE_NAME_TO_USE}' but no engine with that name has been registered.\n${registration_error}") -else() - # If the user is passing CMAKE_MODULE_PATH we assume thats where we will find the engine - if(NOT CMAKE_MODULE_PATH) - message(FATAL_ERROR "O3DE Manifest file not found.\n${registration_error}") - endif() -endif() diff --git a/Templates/DefaultProject/Template/cmake/CompilerSettings.cmake b/Templates/DefaultProject/Template/cmake/CompilerSettings.cmake new file mode 100644 index 0000000000..60bda1d45b --- /dev/null +++ b/Templates/DefaultProject/Template/cmake/CompilerSettings.cmake @@ -0,0 +1,13 @@ +# +# Copyright (c) Contributors to the Open 3D Engine Project. +# For complete copyright and license terms please see the LICENSE at the root of this distribution. +# +# SPDX-License-Identifier: Apache-2.0 OR MIT +# +# + +# File to tweak compiler settings before compiler detection happens (before project() is called) +# We dont have PAL enabled at this point, so we can only use pure-CMake variables +if("${CMAKE_HOST_SYSTEM_NAME}" STREQUAL "Linux") + include(cmake/Platform/Linux/CompilerSettings_linux.cmake) +endif() diff --git a/Templates/DefaultProject/Template/cmake/EngineFinder.cmake b/Templates/DefaultProject/Template/cmake/EngineFinder.cmake new file mode 100644 index 0000000000..15b96eb8a9 --- /dev/null +++ b/Templates/DefaultProject/Template/cmake/EngineFinder.cmake @@ -0,0 +1,92 @@ +# {BEGIN_LICENSE} +# +# Copyright (c) Contributors to the Open 3D Engine Project. +# For complete copyright and license terms please see the LICENSE at the root of this distribution. +# +# SPDX-License-Identifier: Apache-2.0 OR MIT +# +# +# {END_LICENSE} +# This file is copied during engine registration. Edits to this file will be lost next +# time a registration happens. + +include_guard() + +# Read the engine name from the project_json file +file(READ ${CMAKE_CURRENT_SOURCE_DIR}/project.json project_json) +set_property(DIRECTORY APPEND PROPERTY CMAKE_CONFIGURE_DEPENDS ${CMAKE_CURRENT_SOURCE_DIR}/project.json) + +string(JSON LY_ENGINE_NAME_TO_USE ERROR_VARIABLE json_error GET ${project_json} engine) +if(json_error) + message(FATAL_ERROR "Unable to read key 'engine' from 'project.json'\nError: ${json_error}") +endif() + +if(CMAKE_MODULE_PATH) + foreach(module_path ${CMAKE_MODULE_PATH}) + if(EXISTS ${module_path}/Findo3de.cmake) + file(READ ${module_path}/../engine.json engine_json) + string(JSON engine_name ERROR_VARIABLE json_error GET ${engine_json} engine_name) + if(json_error) + message(FATAL_ERROR "Unable to read key 'engine_name' from 'engine.json'\nError: ${json_error}") + endif() + if(LY_ENGINE_NAME_TO_USE STREQUAL engine_name) + return() # Engine being forced through CMAKE_MODULE_PATH + endif() + endif() + endforeach() +endif() + +if(DEFINED ENV{USERPROFILE} AND EXISTS $ENV{USERPROFILE}) + set(manifest_path $ENV{USERPROFILE}/.o3de/o3de_manifest.json) # Windows +else() + set(manifest_path $ENV{HOME}/.o3de/o3de_manifest.json) # Unix +endif() + +set(registration_error [=[ +Engine registration is required before configuring a project. +Run 'scripts/o3de register --this-engine' from the engine root. +]=]) + +# Read the ~/.o3de/o3de_manifest.json file and look through the 'engines_path' object. +# Find a key that matches LY_ENGINE_NAME_TO_USE and use that as the engine path. +if(EXISTS ${manifest_path}) + file(READ ${manifest_path} manifest_json) + set_property(DIRECTORY APPEND PROPERTY CMAKE_CONFIGURE_DEPENDS ${manifest_path}) + + string(JSON engines_path_count ERROR_VARIABLE json_error LENGTH ${manifest_json} engines_path) + if(json_error) + message(FATAL_ERROR "Unable to read key 'engines_path' from '${manifest_path}'\nError: ${json_error}\n${registration_error}") + endif() + + string(JSON engines_path_type ERROR_VARIABLE json_error TYPE ${manifest_json} engines_path) + if(json_error OR NOT ${engines_path_type} STREQUAL "OBJECT") + message(FATAL_ERROR "Type of 'engines_path' in '${manifest_path}' is not a JSON Object\nError: ${json_error}") + endif() + + math(EXPR engines_path_count "${engines_path_count}-1") + foreach(engine_path_index RANGE ${engines_path_count}) + string(JSON engine_name ERROR_VARIABLE json_error MEMBER ${manifest_json} engines_path ${engine_path_index}) + if(json_error) + message(FATAL_ERROR "Unable to read 'engines_path/${engine_path_index}' from '${manifest_path}'\nError: ${json_error}") + endif() + + if(LY_ENGINE_NAME_TO_USE STREQUAL engine_name) + string(JSON engine_path ERROR_VARIABLE json_error GET ${manifest_json} engines_path ${engine_name}) + if(json_error) + message(FATAL_ERROR "Unable to read value from 'engines_path/${engine_name}'\nError: ${json_error}") + endif() + + if(engine_path) + list(APPEND CMAKE_MODULE_PATH "${engine_path}/cmake") + return() + endif() + endif() + endforeach() + + message(FATAL_ERROR "The project.json uses engine name '${LY_ENGINE_NAME_TO_USE}' but no engine with that name has been registered.\n${registration_error}") +else() + # If the user is passing CMAKE_MODULE_PATH we assume thats where we will find the engine + if(NOT CMAKE_MODULE_PATH) + message(FATAL_ERROR "O3DE Manifest file not found.\n${registration_error}") + endif() +endif() diff --git a/Templates/DefaultProject/Template/cmake/Platform/Linux/CompilerSettings_linux.cmake b/Templates/DefaultProject/Template/cmake/Platform/Linux/CompilerSettings_linux.cmake new file mode 100644 index 0000000000..9bb629c53b --- /dev/null +++ b/Templates/DefaultProject/Template/cmake/Platform/Linux/CompilerSettings_linux.cmake @@ -0,0 +1,34 @@ +# +# Copyright (c) Contributors to the Open 3D Engine Project. +# For complete copyright and license terms please see the LICENSE at the root of this distribution. +# +# SPDX-License-Identifier: Apache-2.0 OR MIT +# +# + +if(NOT CMAKE_C_COMPILER AND NOT CMAKE_CXX_COMPILER AND NOT "$ENV{CC}" AND NOT "$ENV{CXX}") + set(path_search + /bin + /usr/bin + /usr/local/bin + /sbin + /usr/sbin + /usr/local/sbin + ) + list(TRANSFORM path_search APPEND "/clang-[0-9]*") + file(GLOB clang_versions ${path_search}) + if(clang_versions) + # Find and pick the highest installed version + list(SORT clang_versions COMPARE NATURAL) + list(GET clang_versions 0 clang_higher_version_path) + string(REGEX MATCH "clang-([0-9.]*)" clang_higher_version ${clang_higher_version_path}) + if(CMAKE_MATCH_1) + set(CMAKE_C_COMPILER clang-${CMAKE_MATCH_1}) + set(CMAKE_CXX_COMPILER clang++-${CMAKE_MATCH_1}) + else() + message(FATAL_ERROR "Clang not found, please install clang") + endif() + else() + message(FATAL_ERROR "Clang not found, please install clang") + endif() +endif() diff --git a/Templates/DefaultProject/Template/project.json b/Templates/DefaultProject/Template/project.json index b52b0baf27..f8d4643ce9 100644 --- a/Templates/DefaultProject/Template/project.json +++ b/Templates/DefaultProject/Template/project.json @@ -1,5 +1,6 @@ { "project_name": "${Name}", + "project_id": "${ProjectId}", "origin": "The primary repo for ${Name} goes here: i.e. http://www.mydomain.com", "license": "What license ${Name} uses goes here: i.e. https://opensource.org/licenses/MIT", "display_name": "${Name}", diff --git a/Templates/DefaultProject/template.json b/Templates/DefaultProject/template.json index 1e84ea8424..fcffafcb34 100644 --- a/Templates/DefaultProject/template.json +++ b/Templates/DefaultProject/template.json @@ -181,8 +181,20 @@ "isOptional": false }, { - "file": "EngineFinder.cmake", - "origin": "EngineFinder.cmake", + "file": "cmake/EngineFinder.cmake", + "origin": "cmake/EngineFinder.cmake", + "isTemplated": false, + "isOptional": false + }, + { + "file": "cmake/CompilerSettings.cmake", + "origin": "cmake/CompilerSettings.cmake", + "isTemplated": false, + "isOptional": false + }, + { + "file": "cmake/Platform/Linux/CompilerSettings_linux.cmake", + "origin": "cmake/Platform/Linux/CompilerSettings_linux.cmake", "isTemplated": false, "isOptional": false }, diff --git a/Templates/GemRepo/Template/gem.json b/Templates/GemRepo/Template/gem.json new file mode 100644 index 0000000000..292681b2b5 --- /dev/null +++ b/Templates/GemRepo/Template/gem.json @@ -0,0 +1,19 @@ +{ + "gem_name": "${Name}Gem", + "display_name": "${Name}Gem", + "license": "What license ${Name}Gem uses goes here: i.e. Apache-2.0 Or MIT", + "license_url": "", + "origin": "The primary repo for ${Name}Gem goes here: i.e. http://www.mydomain.com", + "summary": "A short description of ${Name}Gem which is zipped up in an archive named gem.zip in the root of the Gem Repo. Though not required, it is recommended that the sha256 of the gem.zip file should be placed in the sha256 field of this gem.json so the download can be verified.", + "origin_uri": "${RepoURI}/gem.zip", + "sha256": "", + "type": "Code", + "canonical_tags": [ + "Gem" + ], + "user_tags": [ + "${Name}Gem" + ], + "icon_path": "preview.png", + "requirements": "" +} diff --git a/Templates/GemRepo/Template/repo.json b/Templates/GemRepo/Template/repo.json new file mode 100644 index 0000000000..2af1fcfd2a --- /dev/null +++ b/Templates/GemRepo/Template/repo.json @@ -0,0 +1,11 @@ +{ + "repo_name":"${Name}", + "origin":"Origin for the ${Name} Gem Repository", + "repo_uri": "${RepoURI}", + "summary": "A Gem Repository with a single Gem in the root of the repository.", + "additional_info": "Additional info for ${Name}", + "last_updated": "", + "gems": [ + "${RepoURI}" + ] +} diff --git a/Templates/GemRepo/preview.png b/Templates/GemRepo/preview.png new file mode 100644 index 0000000000..78a2a735d2 --- /dev/null +++ b/Templates/GemRepo/preview.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:6ae503ec99c8358991dc3c6e50737844d3602b81a49abbbed7d697d7238547c0 +size 28026 diff --git a/Templates/GemRepo/template.json b/Templates/GemRepo/template.json new file mode 100644 index 0000000000..88123a9dae --- /dev/null +++ b/Templates/GemRepo/template.json @@ -0,0 +1,27 @@ +{ + "template_name": "GemRepo", + "origin": "The primary repo for GemRepo goes here: i.e. http://www.mydomain.com", + "license": "What license GemRepo uses goes here: i.e. https://opensource.org/licenses/MIT", + "display_name": "GemRepo", + "summary": "A Gem Repository that contains a single Gem.", + "canonical_tags": [], + "user_tags": [ + "GemRepo" + ], + "icon_path": "preview.png", + "copyFiles": [ + { + "file": "gem.json", + "origin": "gem.json", + "isTemplated": true, + "isOptional": false + }, + { + "file": "repo.json", + "origin": "repo.json", + "isTemplated": true, + "isOptional": false + } + ], + "createDirectories": [] +} diff --git a/Templates/MinimalProject/Template/CMakeLists.txt b/Templates/MinimalProject/Template/CMakeLists.txt index 76e8f227be..ae4bb662a3 100644 --- a/Templates/MinimalProject/Template/CMakeLists.txt +++ b/Templates/MinimalProject/Template/CMakeLists.txt @@ -10,11 +10,12 @@ if(NOT PROJECT_NAME) cmake_minimum_required(VERSION 3.20) + include(cmake/CompilerSettings.cmake) project(${Name} LANGUAGES C CXX VERSION 1.0.0.0 ) - include(EngineFinder.cmake OPTIONAL) + include(cmake/EngineFinder.cmake OPTIONAL) find_package(o3de REQUIRED) o3de_initialize() else() diff --git a/Templates/MinimalProject/Template/EngineFinder.cmake b/Templates/MinimalProject/Template/EngineFinder.cmake deleted file mode 100644 index 98ad61bae8..0000000000 --- a/Templates/MinimalProject/Template/EngineFinder.cmake +++ /dev/null @@ -1,92 +0,0 @@ -# {BEGIN_LICENSE} -# -# Copyright (c) Contributors to the Open 3D Engine Project. -# For complete copyright and license terms please see the LICENSE at the root of this distribution. -# -# SPDX-License-Identifier: Apache-2.0 OR MIT -# -# -# {END_LICENSE} -# This file is copied during engine registration. Edits to this file will be lost next -# time a registration happens. - -include_guard() - -# Read the engine name from the project_json file -file(READ ${CMAKE_CURRENT_LIST_DIR}/project.json project_json) -set_property(DIRECTORY APPEND PROPERTY CMAKE_CONFIGURE_DEPENDS ${CMAKE_CURRENT_LIST_DIR}/project.json) - -string(JSON LY_ENGINE_NAME_TO_USE ERROR_VARIABLE json_error GET ${project_json} engine) -if(json_error) - message(FATAL_ERROR "Unable to read key 'engine' from 'project.json'\nError: ${json_error}") -endif() - -if(CMAKE_MODULE_PATH) - foreach(module_path ${CMAKE_MODULE_PATH}) - if(EXISTS ${module_path}/Findo3de.cmake) - file(READ ${module_path}/../engine.json engine_json) - string(JSON engine_name ERROR_VARIABLE json_error GET ${engine_json} engine_name) - if(json_error) - message(FATAL_ERROR "Unable to read key 'engine_name' from 'engine.json'\nError: ${json_error}") - endif() - if(LY_ENGINE_NAME_TO_USE STREQUAL engine_name) - return() # Engine being forced through CMAKE_MODULE_PATH - endif() - endif() - endforeach() -endif() - -if(DEFINED ENV{USERPROFILE} AND EXISTS $ENV{USERPROFILE}) - set(manifest_path $ENV{USERPROFILE}/.o3de/o3de_manifest.json) # Windows -else() - set(manifest_path $ENV{HOME}/.o3de/o3de_manifest.json) # Unix -endif() - -set(registration_error [=[ -Engine registration is required before configuring a project. -Run 'scripts/o3de register --this-engine' from the engine root. -]=]) - -# Read the ~/.o3de/o3de_manifest.json file and look through the 'engines_path' object. -# Find a key that matches LY_ENGINE_NAME_TO_USE and use that as the engine path. -if(EXISTS ${manifest_path}) - file(READ ${manifest_path} manifest_json) - set_property(DIRECTORY APPEND PROPERTY CMAKE_CONFIGURE_DEPENDS ${manifest_path}) - - string(JSON engines_path_count ERROR_VARIABLE json_error LENGTH ${manifest_json} engines_path) - if(json_error) - message(FATAL_ERROR "Unable to read key 'engines_path' from '${manifest_path}'\nError: ${json_error}\n${registration_error}") - endif() - - string(JSON engines_path_type ERROR_VARIABLE json_error TYPE ${manifest_json} engines_path) - if(json_error OR NOT ${engines_path_type} STREQUAL "OBJECT") - message(FATAL_ERROR "Type of 'engines_path' in '${manifest_path}' is not a JSON Object\nError: ${json_error}") - endif() - - math(EXPR engines_path_count "${engines_path_count}-1") - foreach(engine_path_index RANGE ${engines_path_count}) - string(JSON engine_name ERROR_VARIABLE json_error MEMBER ${manifest_json} engines_path ${engine_path_index}) - if(json_error) - message(FATAL_ERROR "Unable to read 'engines_path/${engine_path_index}' from '${manifest_path}'\nError: ${json_error}") - endif() - - if(LY_ENGINE_NAME_TO_USE STREQUAL engine_name) - string(JSON engine_path ERROR_VARIABLE json_error GET ${manifest_json} engines_path ${engine_name}) - if(json_error) - message(FATAL_ERROR "Unable to read value from 'engines_path/${engine_name}'\nError: ${json_error}") - endif() - - if(engine_path) - list(APPEND CMAKE_MODULE_PATH "${engine_path}/cmake") - return() - endif() - endif() - endforeach() - - message(FATAL_ERROR "The project.json uses engine name '${LY_ENGINE_NAME_TO_USE}' but no engine with that name has been registered.\n${registration_error}") -else() - # If the user is passing CMAKE_MODULE_PATH we assume thats where we will find the engine - if(NOT CMAKE_MODULE_PATH) - message(FATAL_ERROR "O3DE Manifest file not found.\n${registration_error}") - endif() -endif() diff --git a/Templates/MinimalProject/Template/cmake/CompilerSettings.cmake b/Templates/MinimalProject/Template/cmake/CompilerSettings.cmake new file mode 100644 index 0000000000..60bda1d45b --- /dev/null +++ b/Templates/MinimalProject/Template/cmake/CompilerSettings.cmake @@ -0,0 +1,13 @@ +# +# Copyright (c) Contributors to the Open 3D Engine Project. +# For complete copyright and license terms please see the LICENSE at the root of this distribution. +# +# SPDX-License-Identifier: Apache-2.0 OR MIT +# +# + +# File to tweak compiler settings before compiler detection happens (before project() is called) +# We dont have PAL enabled at this point, so we can only use pure-CMake variables +if("${CMAKE_HOST_SYSTEM_NAME}" STREQUAL "Linux") + include(cmake/Platform/Linux/CompilerSettings_linux.cmake) +endif() diff --git a/Templates/MinimalProject/Template/cmake/EngineFinder.cmake b/Templates/MinimalProject/Template/cmake/EngineFinder.cmake new file mode 100644 index 0000000000..15b96eb8a9 --- /dev/null +++ b/Templates/MinimalProject/Template/cmake/EngineFinder.cmake @@ -0,0 +1,92 @@ +# {BEGIN_LICENSE} +# +# Copyright (c) Contributors to the Open 3D Engine Project. +# For complete copyright and license terms please see the LICENSE at the root of this distribution. +# +# SPDX-License-Identifier: Apache-2.0 OR MIT +# +# +# {END_LICENSE} +# This file is copied during engine registration. Edits to this file will be lost next +# time a registration happens. + +include_guard() + +# Read the engine name from the project_json file +file(READ ${CMAKE_CURRENT_SOURCE_DIR}/project.json project_json) +set_property(DIRECTORY APPEND PROPERTY CMAKE_CONFIGURE_DEPENDS ${CMAKE_CURRENT_SOURCE_DIR}/project.json) + +string(JSON LY_ENGINE_NAME_TO_USE ERROR_VARIABLE json_error GET ${project_json} engine) +if(json_error) + message(FATAL_ERROR "Unable to read key 'engine' from 'project.json'\nError: ${json_error}") +endif() + +if(CMAKE_MODULE_PATH) + foreach(module_path ${CMAKE_MODULE_PATH}) + if(EXISTS ${module_path}/Findo3de.cmake) + file(READ ${module_path}/../engine.json engine_json) + string(JSON engine_name ERROR_VARIABLE json_error GET ${engine_json} engine_name) + if(json_error) + message(FATAL_ERROR "Unable to read key 'engine_name' from 'engine.json'\nError: ${json_error}") + endif() + if(LY_ENGINE_NAME_TO_USE STREQUAL engine_name) + return() # Engine being forced through CMAKE_MODULE_PATH + endif() + endif() + endforeach() +endif() + +if(DEFINED ENV{USERPROFILE} AND EXISTS $ENV{USERPROFILE}) + set(manifest_path $ENV{USERPROFILE}/.o3de/o3de_manifest.json) # Windows +else() + set(manifest_path $ENV{HOME}/.o3de/o3de_manifest.json) # Unix +endif() + +set(registration_error [=[ +Engine registration is required before configuring a project. +Run 'scripts/o3de register --this-engine' from the engine root. +]=]) + +# Read the ~/.o3de/o3de_manifest.json file and look through the 'engines_path' object. +# Find a key that matches LY_ENGINE_NAME_TO_USE and use that as the engine path. +if(EXISTS ${manifest_path}) + file(READ ${manifest_path} manifest_json) + set_property(DIRECTORY APPEND PROPERTY CMAKE_CONFIGURE_DEPENDS ${manifest_path}) + + string(JSON engines_path_count ERROR_VARIABLE json_error LENGTH ${manifest_json} engines_path) + if(json_error) + message(FATAL_ERROR "Unable to read key 'engines_path' from '${manifest_path}'\nError: ${json_error}\n${registration_error}") + endif() + + string(JSON engines_path_type ERROR_VARIABLE json_error TYPE ${manifest_json} engines_path) + if(json_error OR NOT ${engines_path_type} STREQUAL "OBJECT") + message(FATAL_ERROR "Type of 'engines_path' in '${manifest_path}' is not a JSON Object\nError: ${json_error}") + endif() + + math(EXPR engines_path_count "${engines_path_count}-1") + foreach(engine_path_index RANGE ${engines_path_count}) + string(JSON engine_name ERROR_VARIABLE json_error MEMBER ${manifest_json} engines_path ${engine_path_index}) + if(json_error) + message(FATAL_ERROR "Unable to read 'engines_path/${engine_path_index}' from '${manifest_path}'\nError: ${json_error}") + endif() + + if(LY_ENGINE_NAME_TO_USE STREQUAL engine_name) + string(JSON engine_path ERROR_VARIABLE json_error GET ${manifest_json} engines_path ${engine_name}) + if(json_error) + message(FATAL_ERROR "Unable to read value from 'engines_path/${engine_name}'\nError: ${json_error}") + endif() + + if(engine_path) + list(APPEND CMAKE_MODULE_PATH "${engine_path}/cmake") + return() + endif() + endif() + endforeach() + + message(FATAL_ERROR "The project.json uses engine name '${LY_ENGINE_NAME_TO_USE}' but no engine with that name has been registered.\n${registration_error}") +else() + # If the user is passing CMAKE_MODULE_PATH we assume thats where we will find the engine + if(NOT CMAKE_MODULE_PATH) + message(FATAL_ERROR "O3DE Manifest file not found.\n${registration_error}") + endif() +endif() diff --git a/Templates/MinimalProject/Template/cmake/Platform/Linux/CompilerSettings_linux.cmake b/Templates/MinimalProject/Template/cmake/Platform/Linux/CompilerSettings_linux.cmake new file mode 100644 index 0000000000..9bb629c53b --- /dev/null +++ b/Templates/MinimalProject/Template/cmake/Platform/Linux/CompilerSettings_linux.cmake @@ -0,0 +1,34 @@ +# +# Copyright (c) Contributors to the Open 3D Engine Project. +# For complete copyright and license terms please see the LICENSE at the root of this distribution. +# +# SPDX-License-Identifier: Apache-2.0 OR MIT +# +# + +if(NOT CMAKE_C_COMPILER AND NOT CMAKE_CXX_COMPILER AND NOT "$ENV{CC}" AND NOT "$ENV{CXX}") + set(path_search + /bin + /usr/bin + /usr/local/bin + /sbin + /usr/sbin + /usr/local/sbin + ) + list(TRANSFORM path_search APPEND "/clang-[0-9]*") + file(GLOB clang_versions ${path_search}) + if(clang_versions) + # Find and pick the highest installed version + list(SORT clang_versions COMPARE NATURAL) + list(GET clang_versions 0 clang_higher_version_path) + string(REGEX MATCH "clang-([0-9.]*)" clang_higher_version ${clang_higher_version_path}) + if(CMAKE_MATCH_1) + set(CMAKE_C_COMPILER clang-${CMAKE_MATCH_1}) + set(CMAKE_CXX_COMPILER clang++-${CMAKE_MATCH_1}) + else() + message(FATAL_ERROR "Clang not found, please install clang") + endif() + else() + message(FATAL_ERROR "Clang not found, please install clang") + endif() +endif() diff --git a/Templates/MinimalProject/Template/project.json b/Templates/MinimalProject/Template/project.json index b52b0baf27..f8d4643ce9 100644 --- a/Templates/MinimalProject/Template/project.json +++ b/Templates/MinimalProject/Template/project.json @@ -1,5 +1,6 @@ { "project_name": "${Name}", + "project_id": "${ProjectId}", "origin": "The primary repo for ${Name} goes here: i.e. http://www.mydomain.com", "license": "What license ${Name} uses goes here: i.e. https://opensource.org/licenses/MIT", "display_name": "${Name}", diff --git a/Templates/MinimalProject/template.json b/Templates/MinimalProject/template.json index 21608e9204..7d6a4f9b94 100644 --- a/Templates/MinimalProject/template.json +++ b/Templates/MinimalProject/template.json @@ -173,8 +173,20 @@ "isOptional": false }, { - "file": "EngineFinder.cmake", - "origin": "EngineFinder.cmake", + "file": "cmake/EngineFinder.cmake", + "origin": "cmake/EngineFinder.cmake", + "isTemplated": false, + "isOptional": false + }, + { + "file": "cmake/CompilerSettings.cmake", + "origin": "cmake/CompilerSettings.cmake", + "isTemplated": false, + "isOptional": false + }, + { + "file": "cmake/Platform/Linux/CompilerSettings_linux.cmake", + "origin": "cmake/Platform/Linux/CompilerSettings_linux.cmake", "isTemplated": false, "isOptional": false }, diff --git a/Templates/PythonToolGem/Template/Code/CMakeLists.txt b/Templates/PythonToolGem/Template/Code/CMakeLists.txt index a6044e717b..b90f2d7703 100644 --- a/Templates/PythonToolGem/Template/Code/CMakeLists.txt +++ b/Templates/PythonToolGem/Template/Code/CMakeLists.txt @@ -53,6 +53,8 @@ if(PAL_TRAIT_BUILD_HOST_TOOLS) BUILD_DEPENDENCIES PUBLIC Gem::${Name}.Editor.Static + RUNTIME_DEPENDENCIES + Gem::QtForPython.Editor ) # By default, we will specify that the above target ${Name} would be used by diff --git a/Templates/PythonToolGem/Template/Code/Source/${Name}EditorModule.cpp b/Templates/PythonToolGem/Template/Code/Source/${Name}EditorModule.cpp index 0027af011a..fdd971440e 100644 --- a/Templates/PythonToolGem/Template/Code/Source/${Name}EditorModule.cpp +++ b/Templates/PythonToolGem/Template/Code/Source/${Name}EditorModule.cpp @@ -10,6 +10,7 @@ #include <${Name}ModuleInterface.h> #include <${Name}EditorSystemComponent.h> +#include void Init${SanitizedCppName}Resources() { @@ -21,6 +22,7 @@ namespace ${SanitizedCppName} { class ${SanitizedCppName}EditorModule : public ${SanitizedCppName}ModuleInterface + , public AzToolsFramework::EmbeddedPython::PythonLoader { public: AZ_RTTI(${SanitizedCppName}EditorModule, "${ModuleClassId}", ${SanitizedCppName}ModuleInterface); diff --git a/Templates/PythonToolGem/Template/Editor/Scripts/${NameLower}_dialog.py b/Templates/PythonToolGem/Template/Editor/Scripts/${NameLower}_dialog.py index 19194ec97f..3a0e6c9a7b 100644 --- a/Templates/PythonToolGem/Template/Editor/Scripts/${NameLower}_dialog.py +++ b/Templates/PythonToolGem/Template/Editor/Scripts/${NameLower}_dialog.py @@ -33,3 +33,12 @@ class ${SanitizedCppName}Dialog(QDialog): self.mainLayout.addWidget(self.helpLabel, 0, Qt.AlignCenter) self.setLayout(self.mainLayout) + + +if __name__ == "__main__": + # Create a new instance of the tool if launched from the Python Scripts window, + # which allows for quick iteration without having to close/re-launch the Editor + test_dialog = ${SanitizedCppName}Dialog() + test_dialog.setWindowTitle("${SanitizedCppName}") + test_dialog.show() + test_dialog.adjustSize() diff --git a/Templates/PythonToolGem/Template/gem.json b/Templates/PythonToolGem/Template/gem.json index 353ad6bf8d..84f5b65a3e 100644 --- a/Templates/PythonToolGem/Template/gem.json +++ b/Templates/PythonToolGem/Template/gem.json @@ -1,7 +1,8 @@ { "gem_name": "${Name}", "display_name": "${Name}", - "license": "What license ${Name} uses goes here: i.e. https://opensource.org/licenses/MIT", + "license": "What license ${Name} uses goes here: i.e. Apache-2.0 Or MIT", + "license_url": "", "origin": "The primary repo for ${Name} goes here: i.e. http://www.mydomain.com", "type": "Code", "summary": "A short description of ${Name}.", @@ -12,5 +13,8 @@ "${Name}" ], "icon_path": "preview.png", - "requirements": "" + "requirements": "", + "dependencies": [ + "QtForPython" + ] } diff --git a/Tools/LyTestTools/README.txt b/Tools/LyTestTools/README.txt index 61ad507dc4..4372bc5201 100644 --- a/Tools/LyTestTools/README.txt +++ b/Tools/LyTestTools/README.txt @@ -35,8 +35,8 @@ INSTALL It is recommended to set up these these tools with Lumberyard's CMake build commands. Assuming CMake is already setup on your operating system, below are some sample build commands: cd /path/to/lumberyard/dev/ - mkdir windows_vs2019 - cd windows_vs2019 + mkdir windows + cd windows cmake -E time cmake --build . --target ALL_BUILD --config profile To manually install the project in development mode using your own installed Python interpreter: diff --git a/Tools/LyTestTools/ly_test_tools/_internal/managers/abstract_resource_locator.py b/Tools/LyTestTools/ly_test_tools/_internal/managers/abstract_resource_locator.py index fccc94bdcc..4514e5d812 100755 --- a/Tools/LyTestTools/ly_test_tools/_internal/managers/abstract_resource_locator.py +++ b/Tools/LyTestTools/ly_test_tools/_internal/managers/abstract_resource_locator.py @@ -277,7 +277,7 @@ class AbstractResourceLocator(object): def get_shader_compiler_path(self): """ Return path to shader compiler executable - ex. engine_root/dev/windows_vs2019/bin/profile/CrySCompileServer + ex. engine_root/dev/windows/bin/profile/CrySCompileServer :return: path to CrySCompileServer executable """ return os.path.join(self.build_directory(), 'CrySCompileServer') @@ -313,7 +313,7 @@ class AbstractResourceLocator(object): def shader_compiler_config_file(self): """ Return path to the Shader Compiler config file - ex. engine_root/dev/windows_vs2019/bin/profile/config.ini + ex. engine_root/dev/windows/bin/profile/config.ini :return: path to the Shader Compiler config file """ return os.path.join(self.build_directory(), 'config.ini') @@ -321,7 +321,7 @@ class AbstractResourceLocator(object): def shader_cache(self): """ Return path to the shader cache for the current build - ex. engine_root/dev/windows_vs2019/bin/profile/Cache + ex. engine_root/dev/windows/bin/profile/Cache :return: path to the shader cache for the current build """ return os.path.join(self.build_directory(), 'Cache') @@ -378,9 +378,20 @@ class AbstractResourceLocator(object): def editor_log(self): """ Return path to the project's editor log dir using the builds project and platform - :return: path to editor.log + :return: path to Editor.log """ raise NotImplementedError( "editor_log() is not implemented on the base AbstractResourceLocator() class. " "It must be defined by the inheriting class - " "i.e. _WindowsResourceLocator(AbstractResourceLocator).editor_log()") + + @abstractmethod + def crash_log(self): + """ + Return path to the project's crash log dir using the builds project and platform + :return: path to error.log/crash.log + """ + raise NotImplementedError( + "crash_log() is not implemented on the base AbstractResourceLocator() class. " + "It must be defined by the inheriting class - " + "i.e. _WindowsResourceLocator(AbstractResourceLocator).crash_log()") diff --git a/Tools/LyTestTools/ly_test_tools/_internal/managers/platforms/linux.py b/Tools/LyTestTools/ly_test_tools/_internal/managers/platforms/linux.py index fea60cc9cb..ec88dce7c3 100644 --- a/Tools/LyTestTools/ly_test_tools/_internal/managers/platforms/linux.py +++ b/Tools/LyTestTools/ly_test_tools/_internal/managers/platforms/linux.py @@ -49,10 +49,16 @@ class _LinuxResourceManager(AbstractResourceLocator): def editor_log(self): """ - :return: path to editor.log + :return: path to Editor.log """ - return os.path.join(self.project_log(), "editor.log") + return os.path.join(self.project_log(), "Editor.log") + def crash_log(self): + """ + Return path to the project's crash log dir using the builds project and platform + :return: path to Crash.log + """ + return os.path.join(self.project_log(), "crash.log") class LinuxWorkspaceManager(AbstractWorkspaceManager): """ diff --git a/Tools/LyTestTools/ly_test_tools/_internal/managers/platforms/mac.py b/Tools/LyTestTools/ly_test_tools/_internal/managers/platforms/mac.py index cc8f23f0e1..673bfa5050 100755 --- a/Tools/LyTestTools/ly_test_tools/_internal/managers/platforms/mac.py +++ b/Tools/LyTestTools/ly_test_tools/_internal/managers/platforms/mac.py @@ -58,10 +58,16 @@ class _MacResourceLocator(AbstractResourceLocator): def editor_log(self): """ Return path to the project's editor log dir using the builds project and platform - :return: path to editor.log + :return: path to Editor.log """ - return os.path.join(self.project_log(), "editor.log") + return os.path.join(self.project_log(), "Editor.log") + def crash_log(self): + """ + Return path to the project's crash log dir using the builds project and platform + :return: path to crash.log + """ + return os.path.join(self.project_log(), "crash.log") class MacWorkspaceManager(AbstractWorkspaceManager): """ diff --git a/Tools/LyTestTools/ly_test_tools/_internal/managers/platforms/windows.py b/Tools/LyTestTools/ly_test_tools/_internal/managers/platforms/windows.py index 1fad15acce..b31cc6bb5c 100755 --- a/Tools/LyTestTools/ly_test_tools/_internal/managers/platforms/windows.py +++ b/Tools/LyTestTools/ly_test_tools/_internal/managers/platforms/windows.py @@ -64,10 +64,16 @@ class _WindowsResourceLocator(AbstractResourceLocator): def editor_log(self): """ Return path to the project's editor log dir using the builds project and platform - :return: path to editor.log + :return: path to Editor.log """ - return os.path.join(self.project_log(), "editor.log") + return os.path.join(self.project_log(), "Editor.log") + def crash_log(self): + """ + Return path to the project's crash log dir using the builds project and platform + :return: path to Error.log + """ + return os.path.join(self.project_log(), "error.log") class WindowsWorkspaceManager(AbstractWorkspaceManager): """ diff --git a/Tools/LyTestTools/ly_test_tools/_internal/managers/workspace.py b/Tools/LyTestTools/ly_test_tools/_internal/managers/workspace.py index ac412acf84..801729f008 100755 --- a/Tools/LyTestTools/ly_test_tools/_internal/managers/workspace.py +++ b/Tools/LyTestTools/ly_test_tools/_internal/managers/workspace.py @@ -119,7 +119,7 @@ class AbstractWorkspaceManager: def clear_bin(self): """ - Clears the relative Bin folder (i.e. engine_root/dev/windows_vs2019/bin/profile/) + Clears the relative Bin folder (i.e. engine_root/dev/windows/bin/profile/) :return: None """ if os.path.exists(self.paths.build_directory()): diff --git a/Tools/LyTestTools/ly_test_tools/environment/file_system.py b/Tools/LyTestTools/ly_test_tools/environment/file_system.py index d8ecd7d908..e8fb1d13cf 100755 --- a/Tools/LyTestTools/ly_test_tools/environment/file_system.py +++ b/Tools/LyTestTools/ly_test_tools/environment/file_system.py @@ -219,7 +219,8 @@ def unlock_file(file_name): :return: True if unlock succeeded, else False """ if not os.access(file_name, os.W_OK): - os.chmod(file_name, stat.S_IWRITE) + file_stat = os.stat(file_name) + os.chmod(file_name, file_stat.st_mode | stat.S_IWRITE) logger.warning(f'Clearing write lock for file {file_name}.') return True else: @@ -235,7 +236,8 @@ def lock_file(file_name): :return: True if lock succeeded, else False """ if os.access(file_name, os.W_OK): - os.chmod(file_name, stat.S_IREAD) + file_stat = os.stat(file_name) + os.chmod(file_name, file_stat.st_mode & (~stat.S_IWRITE)) logger.warning(f'Write locking file {file_name}') return True else: @@ -291,61 +293,75 @@ def delete(file_list, del_files, del_dirs): return True -def create_backup(source, backup_dir): +def create_backup(source, backup_dir, backup_name=None): """ Creates a backup of a single source file by creating a copy of it with the same name + '.bak' in backup_dir e.g.: foo.txt is stored as backup_dir/foo.txt.bak + If backup_name is provided, it will create a copy of the source file named "backup_name + .bak" instead. :param source: Full path to file to backup :param backup_dir: Path to the directory to store backup. + :param backup_name: [Optional] Name of the backed up file to use instead or the source name. """ if not backup_dir or not os.path.isdir(backup_dir): logger.error(f'Cannot create backup due to invalid backup directory {backup_dir}') - return + return False if not os.path.exists(source): logger.warning(f'Source file {source} does not exist, aborting backup creation.') - return + return False - source_filename = os.path.basename(source) - dest = os.path.join(backup_dir, f'{source_filename}.bak') + dest = None + if backup_name is None: + source_filename = os.path.basename(source) + dest = os.path.join(backup_dir, f'{source_filename}.bak') + else: + dest = os.path.join(backup_dir, f'{backup_name}.bak') logger.info(f'Saving backup of {source} in {dest}') if os.path.exists(dest): logger.warning(f'Backup file already exists at {dest}, it will be overwritten.') try: - shutil.copy(source, dest) + shutil.copy2(source, dest) except Exception: # intentionally broad logger.warning('Could not create backup, exception occurred while copying.', exc_info=True) + return False + return True -def restore_backup(original_file, backup_dir): +def restore_backup(original_file, backup_dir, backup_name=None): """ Restores a backup file to its original location. Works with a single file only. :param original_file: Full path to file to overwrite. :param backup_dir: Path to the directory storing the backup. + :param backup_name: [Optional] Provide if the backup file name is different from source. eg backup file = myFile_1.txt.bak original file = myfile.txt """ if not backup_dir or not os.path.isdir(backup_dir): logger.error(f'Cannot restore backup due to invalid or nonexistent directory {backup_dir}.') - return + return False - source_filename = os.path.basename(original_file) - backup = os.path.join(backup_dir, f'{source_filename}.bak') + backup = None + if backup_name is None: + source_filename = os.path.basename(original_file) + backup = os.path.join(backup_dir, f'{source_filename}.bak') + else: + backup = os.path.join(backup_dir, f'{backup_name}.bak') if not os.path.exists(backup): logger.warning(f'Backup file {backup} does not exist, aborting backup restoration.') - return + return False logger.info(f'Restoring backup of {original_file} from {backup}') try: - shutil.copy(backup, original_file) + shutil.copy2(backup, original_file) except Exception: # intentionally broad logger.warning('Could not restore backup, exception occurred while copying.', exc_info=True) - + return False + return True def delete_oldest(path_glob, keep_num, del_files=True, del_dirs=False): """ Delete oldest builds, keeping a specific number """ diff --git a/Tools/LyTestTools/ly_test_tools/environment/process_utils.py b/Tools/LyTestTools/ly_test_tools/environment/process_utils.py index f8245495fa..44288203da 100755 --- a/Tools/LyTestTools/ly_test_tools/environment/process_utils.py +++ b/Tools/LyTestTools/ly_test_tools/environment/process_utils.py @@ -20,6 +20,7 @@ _PROCESS_OUTPUT_ENCODING = 'utf-8' # Default list of processes names to kill LY_PROCESS_KILL_LIST = [ + 'AssetBuilder', 'AssetProcessor', 'AssetProcessorBatch', 'CrySCompileServer', 'Editor', 'Profiler', 'RemoteConsole', 'rc' # Resource Compiler @@ -376,18 +377,18 @@ def _safe_kill_processes(processes): logger.info(f"Terminating process '{proc.name()}' with id '{proc.pid}'") proc.kill() except psutil.AccessDenied: - logger.warning("Termination failed, Access Denied", exc_info=True) + logger.warning("Termination failed, Access Denied with stacktrace:", exc_info=True) except psutil.NoSuchProcess: - logger.debug("Termination request ignored, process was already terminated during iteration", exc_info=True) + logger.debug("Termination request ignored, process was already terminated during iteration with stacktrace:", exc_info=True) except Exception: # purposefully broad - logger.warning("Unexpected exception ignored while terminating process", exc_info=True) + logger.debug("Unexpected exception ignored while terminating process, with stacktrace:", exc_info=True) def on_terminate(proc): logger.info(f"process '{proc.name()}' with id '{proc.pid}' terminated with exit code {proc.returncode}") try: psutil.wait_procs(processes, timeout=30, callback=on_terminate) except Exception: # purposefully broad - logger.warning("Unexpected exception while waiting for processes to terminate", exc_info=True) + logger.debug("Unexpected exception while waiting for processes to terminate, with stacktrace:", exc_info=True) def _terminate_and_confirm_dead(proc): diff --git a/Tools/LyTestTools/ly_test_tools/launchers/platforms/android/launcher.py b/Tools/LyTestTools/ly_test_tools/launchers/platforms/android/launcher.py index 75eaa65e94..9433f426b5 100755 --- a/Tools/LyTestTools/ly_test_tools/launchers/platforms/android/launcher.py +++ b/Tools/LyTestTools/ly_test_tools/launchers/platforms/android/launcher.py @@ -163,9 +163,23 @@ class AndroidLauncher(Launcher): return True - def setup(self): + def setup(self, backupFiles=True, launch_ap=True, configure_settings=True): + """ + Perform setup of this launcher, must be called before launching. + Subclasses should call its parent's setup() before calling its own code, unless it changes configuration files + + :param backupFiles: Bool to backup setup files + :param launch_ap: Bool to launch the asset processor + :param configure_settings: Bool to update settings caches + :return: None + """ # Backup - self.backup_settings() + if backupFiles: + self.backup_settings() + + # None reverts to function default + if launch_ap is None: + launch_ap = True # Enable Android capabilities and verify environment is setup before continuing. self._is_valid_android_environment() @@ -174,7 +188,7 @@ class AndroidLauncher(Launcher): # Modify and re-configure self.configure_settings() self.workspace.shader_compiler.start() - super(AndroidLauncher, self).setup() + super(AndroidLauncher, self).setup(backupFiles, launch_ap, configure_settings) def teardown(self): ly_test_tools.mobile.android.undo_tcp_port_changes(self._device_id) diff --git a/Tools/LyTestTools/ly_test_tools/launchers/platforms/base.py b/Tools/LyTestTools/ly_test_tools/launchers/platforms/base.py index d32be10562..c47b9c8b67 100755 --- a/Tools/LyTestTools/ly_test_tools/launchers/platforms/base.py +++ b/Tools/LyTestTools/ly_test_tools/launchers/platforms/base.py @@ -75,6 +75,8 @@ class Launcher(object): ~/ly_test_tools/devices.ini (a.k.a. %USERPROFILE%/ly_test_tools/devices.ini) :param backupFiles: Bool to backup setup files + :param launch_ap: Bool to launch the asset processor + :param configure_settings: Bool to update settings caches :return: None """ # Remove existing logs and dmp files before launching for self.save_project_log_files() @@ -91,7 +93,7 @@ class Launcher(object): open(os.path.join(self.workspace.paths.project_log(), artifact), 'w').close() # clear it log.info(f"Clearing pre-existing artifact {artifact} from calling Launcher.setup()") except PermissionError: - log.warn(f'Unable to remove artifact: {artifact}, skipping.') + log.warning(f'Unable to remove artifact: {artifact}, skipping.') pass # In case this is the first run, we will create default logs to prevent the logmonitor from not finding the file @@ -153,7 +155,6 @@ class Launcher(object): :return: None """ self.workspace.asset_processor.stop() - self.save_project_log_files() def save_project_log_files(self): # type: () -> None diff --git a/Tools/LyTestTools/ly_test_tools/launchers/platforms/linux/launcher.py b/Tools/LyTestTools/ly_test_tools/launchers/platforms/linux/launcher.py index 112629b349..377121f2e0 100644 --- a/Tools/LyTestTools/ly_test_tools/launchers/platforms/linux/launcher.py +++ b/Tools/LyTestTools/ly_test_tools/launchers/platforms/linux/launcher.py @@ -52,7 +52,7 @@ class LinuxLauncher(Launcher): if backupFiles: self.backup_settings() - # Base setup defaults to None + # None reverts to function default if launch_ap is None: launch_ap = True @@ -162,7 +162,7 @@ class LinuxLauncher(Launcher): def configure_settings(self): """ - Configures system level settings and syncs the launcher to the targeted console IP. + Configures system level settings :return: None """ @@ -170,7 +170,6 @@ class LinuxLauncher(Launcher): host_ip = '127.0.0.1' self.args.append(f'--regset="/Amazon/AzCore/Bootstrap/project_path={self.workspace.paths.project()}"') self.args.append(f'--regset="/Amazon/AzCore/Bootstrap/remote_ip={host_ip}"') - self.args.append('--regset="/Amazon/AzCore/Bootstrap/wait_for_connect=1"') self.args.append(f'--regset="/Amazon/AzCore/Bootstrap/allowed_list={host_ip}"') self.workspace.settings.modify_platform_setting("r_ShaderCompilerServer", host_ip) @@ -179,20 +178,25 @@ class LinuxLauncher(Launcher): class DedicatedLinuxLauncher(LinuxLauncher): - def setup(self, backupFiles=True, launch_ap=False): + def setup(self, backupFiles=True, launch_ap=False, configure_settings=True): """ Perform setup of this launcher, must be called before launching. Subclasses should call its parent's setup() before calling its own code, unless it changes configuration files :param backupFiles: Bool to backup setup files - :param lauch_ap: Bool to lauch the asset processor + :param launch_ap: Bool to launch the asset processor + :param configure_settings: Bool to update settings caches :return: None """ - # Base setup defaults to None + # Backup + if backupFiles: + self.backup_settings() + + # None reverts to function default if launch_ap is None: launch_ap = False - super(DedicatedLinuxLauncher, self).setup(backupFiles, launch_ap) + super(DedicatedLinuxLauncher, self).setup(backupFiles, launch_ap, configure_settings) def binary_path(self): """ diff --git a/Tools/LyTestTools/ly_test_tools/launchers/platforms/win/launcher.py b/Tools/LyTestTools/ly_test_tools/launchers/platforms/win/launcher.py index d18431ba82..c29aa7b10b 100755 --- a/Tools/LyTestTools/ly_test_tools/launchers/platforms/win/launcher.py +++ b/Tools/LyTestTools/ly_test_tools/launchers/platforms/win/launcher.py @@ -44,21 +44,22 @@ class WinLauncher(Launcher): Subclasses should call its parent's setup() before calling its own code, unless it changes configuration files :param backupFiles: Bool to backup setup files - :param lauch_ap: Bool to lauch the asset processor + :param launch_ap: Bool to lauch the asset processor + :param configure_settings: Bool to update settings caches :return: None """ # Backup if backupFiles: self.backup_settings() - # Base setup defaults to None + # None reverts to function default if launch_ap is None: launch_ap = True # Modify and re-configure if configure_settings: self.configure_settings() - super(WinLauncher, self).setup(backupFiles, launch_ap) + super(WinLauncher, self).setup(backupFiles, launch_ap, configure_settings) def launch(self): """ @@ -161,7 +162,7 @@ class WinLauncher(Launcher): def configure_settings(self): """ - Configures system level settings and syncs the launcher to the targeted console IP. + Configures system level settings :return: None """ @@ -169,7 +170,6 @@ class WinLauncher(Launcher): host_ip = '127.0.0.1' self.args.append(f'--regset="/Amazon/AzCore/Bootstrap/project_path={self.workspace.paths.project()}"') self.args.append(f'--regset="/Amazon/AzCore/Bootstrap/remote_ip={host_ip}"') - self.args.append('--regset="/Amazon/AzCore/Bootstrap/wait_for_connect=1"') self.args.append(f'--regset="/Amazon/AzCore/Bootstrap/allowed_list={host_ip}"') self.workspace.settings.modify_platform_setting("log_RemoteConsoleAllowedAddresses", host_ip) @@ -177,20 +177,25 @@ class WinLauncher(Launcher): class DedicatedWinLauncher(WinLauncher): - def setup(self, backupFiles=True, launch_ap=False): + def setup(self, backupFiles=True, launch_ap=False, configure_settings=True): """ Perform setup of this launcher, must be called before launching. Subclasses should call its parent's setup() before calling its own code, unless it changes configuration files :param backupFiles: Bool to backup setup files - :param lauch_ap: Bool to lauch the asset processor + :param launch_ap: Bool to launch the asset processor + :param configure_settings: Bool to update settings caches :return: None """ - # Base setup defaults to None + # Backup + if backupFiles: + self.backup_settings() + + # None reverts to function default if launch_ap is None: launch_ap = False - super(DedicatedWinLauncher, self).setup(backupFiles, launch_ap) + super(DedicatedWinLauncher, self).setup(backupFiles, launch_ap, configure_settings) def binary_path(self): """ diff --git a/Tools/LyTestTools/ly_test_tools/o3de/asset_processor.py b/Tools/LyTestTools/ly_test_tools/o3de/asset_processor.py index 2019f21004..65319e05de 100644 --- a/Tools/LyTestTools/ly_test_tools/o3de/asset_processor.py +++ b/Tools/LyTestTools/ly_test_tools/o3de/asset_processor.py @@ -416,19 +416,15 @@ class AssetProcessor(object): self.restore_ap_settings() def process_exists(self): - try: - my_pid = self.get_pid() - if my_pid == -1: - return False - return psutil.pid_exists(my_pid) - except psutil.NoSuchProcess: - pass + if self._ap_proc: + return self._ap_proc.poll() is None return False def batch_process(self, timeout=DEFAULT_TIMEOUT_SECONDS, fastscan=True, capture_output=False, platforms=None, extra_params=None, add_gem_scan_folders=None, add_config_scan_folders=None, decode=True, - expect_failure=False, scan_folder_pattern=None): - self.create_temp_log_root() + expect_failure=False, scan_folder_pattern=None, create_temp_log=True): + if create_temp_log: + self.create_temp_log_root() ap_path = self._workspace.paths.asset_processor_batch() command = self.build_ap_command(ap_path=ap_path, fastscan=fastscan, platforms=platforms, extra_params=extra_params, add_gem_scan_folders=add_gem_scan_folders, @@ -442,7 +438,7 @@ class AssetProcessor(object): def gui_process(self, timeout=DEFAULT_TIMEOUT_SECONDS, fastscan=True, capture_output=False, platforms=None, extra_params=None, add_gem_scan_folders=None, add_config_scan_folders=None, decode=True, expect_failure=False, quitonidle=False, connect_to_ap=False, accept_input=True, run_until_idle=True, - scan_folder_pattern=None): + scan_folder_pattern=None, create_temp_log=True): ap_path = os.path.abspath(self._workspace.paths.asset_processor()) ap_exe_path = os.path.dirname(ap_path) extra_gui_params = [] @@ -472,7 +468,8 @@ class AssetProcessor(object): else: extra_gui_params.append(extra_params) - self.create_temp_log_root() + if create_temp_log: + self.create_temp_log_root() command = self.build_ap_command(ap_path=ap_path, fastscan=fastscan, platforms=platforms, extra_params=extra_gui_params, add_gem_scan_folders=add_gem_scan_folders, add_config_scan_folders=add_config_scan_folders, @@ -580,7 +577,7 @@ class AssetProcessor(object): if isinstance(platforms, list): platforms = ','.join(platforms) command.append(f'--platforms={platforms}') - for key, value in self._enabled_platform_overrides: + for key, value in self._enabled_platform_overrides.items(): command.append(f'--regset="f{ASSET_PROCESSOR_SETTINGS_ROOT_KEY}/Platforms/{key}={value}"') if extra_params: diff --git a/Tools/LyTestTools/ly_test_tools/o3de/asset_processor_utils.py b/Tools/LyTestTools/ly_test_tools/o3de/asset_processor_utils.py index f30ed2f233..8551e5c0ef 100644 --- a/Tools/LyTestTools/ly_test_tools/o3de/asset_processor_utils.py +++ b/Tools/LyTestTools/ly_test_tools/o3de/asset_processor_utils.py @@ -8,11 +8,12 @@ SPDX-License-Identifier: Apache-2.0 OR MIT import logging import os import subprocess +import psutil import ly_test_tools.environment.process_utils as process_utils logger = logging.getLogger(__name__) - +processList = ["AssetProcessor_tmp","AssetProcessor","AssetProcessorBatch","AssetBuilder","rc","Lua Editor"] def start_asset_processor(bin_dir): """ @@ -39,9 +40,16 @@ def kill_asset_processor(): :return: None """ - process_utils.kill_processes_named('AssetProcessor_tmp', ignore_extensions=True) - process_utils.kill_processes_named('AssetProcessor', ignore_extensions=True) - process_utils.kill_processes_named('AssetProcessorBatch', ignore_extensions=True) - process_utils.kill_processes_named('AssetBuilder', ignore_extensions=True) - process_utils.kill_processes_named('rc', ignore_extensions=True) - process_utils.kill_processes_named('Lua Editor', ignore_extensions=True) + for n in processList: + process_utils.kill_processes_named(n, ignore_extensions=True) + + +# Uses psutil to check if a specified process is running. +def check_ap_running(processName): + for proc in psutil.process_iter(): + try: + if processName.lower() in proc.name().lower(): + return True + except (psutil.AccessDenied, psutil.NoSuchProcess, psutil.ZombieProcess): + pass + return False diff --git a/Tools/LyTestTools/ly_test_tools/o3de/editor_test.py b/Tools/LyTestTools/ly_test_tools/o3de/editor_test.py index ae6ed16321..fd2157d1cc 100644 --- a/Tools/LyTestTools/ly_test_tools/o3de/editor_test.py +++ b/Tools/LyTestTools/ly_test_tools/o3de/editor_test.py @@ -43,11 +43,14 @@ import types import functools import re +from os import path + import ly_test_tools.environment.file_system as file_system import ly_test_tools.environment.waiter as waiter import ly_test_tools.environment.process_utils as process_utils import ly_test_tools.o3de.editor_test import ly_test_tools.o3de.editor_test_utils as editor_utils +import ly_test_tools._internal.pytest_plugin from ly_test_tools.o3de.asset_processor import AssetProcessor from ly_test_tools.launchers.exceptions import WaitTimeoutError @@ -303,6 +306,8 @@ class EditorTestSuite(): use_null_renderer = True # Maximum time for a single editor to stay open on a shared test timeout_editor_shared_test = 300 + # Flag to determine whether to use new prefab system or use deprecated slice system for this test suite + enable_prefab_system = True # Function to calculate number of editors to run in parallel, this can be overriden by the user @staticmethod @@ -741,7 +746,13 @@ class EditorTestSuite(): test_cmdline_args += ["--attach-debugger"] if test_spec.wait_for_debugger: test_cmdline_args += ["--wait-for-debugger"] - + if self.enable_prefab_system: + test_cmdline_args += [ + "--regset=/Amazon/Preferences/EnablePrefabSystem=true", + f"--regset-file={path.join(workspace.paths.engine_root(), 'Registry', 'prefab.test.setreg')}"] + else: + test_cmdline_args += ["--regset=/Amazon/Preferences/EnablePrefabSystem=false"] + # Cycle any old crash report in case it wasn't cycled properly editor_utils.cycle_crash_report(run_id, workspace) @@ -751,7 +762,7 @@ class EditorTestSuite(): cmdline = [ "--runpythontest", test_filename, "-logfile", f"@log@/{log_name}", - "-project-log-path", editor_utils.retrieve_log_path(run_id, workspace)] + test_cmdline_args + "-project-log-path", ly_test_tools._internal.pytest_plugin.output_path] + test_cmdline_args editor.args.extend(cmdline) editor.start(backupFiles = False, launch_ap = False, configure_settings=False) @@ -804,7 +815,13 @@ class EditorTestSuite(): test_cmdline_args += ["--attach-debugger"] if any([t.wait_for_debugger for t in test_spec_list]): test_cmdline_args += ["--wait-for-debugger"] - + if self.enable_prefab_system: + test_cmdline_args += [ + "--regset=/Amazon/Preferences/EnablePrefabSystem=true", + f"--regset-file={path.join(workspace.paths.engine_root(), 'Registry', 'prefab.test.setreg')}"] + else: + test_cmdline_args += ["--regset=/Amazon/Preferences/EnablePrefabSystem=false"] + # Cycle any old crash report in case it wasn't cycled properly editor_utils.cycle_crash_report(run_id, workspace) @@ -813,7 +830,7 @@ class EditorTestSuite(): cmdline = [ "--runpythontest", test_filenames_str, "-logfile", f"@log@/{log_name}", - "-project-log-path", editor_utils.retrieve_log_path(run_id, workspace)] + test_cmdline_args + "-project-log-path", ly_test_tools._internal.pytest_plugin.output_path] + test_cmdline_args editor.args.extend(cmdline) editor.start(backupFiles = False, launch_ap = False, configure_settings=False) @@ -890,7 +907,6 @@ class EditorTestSuite(): results[test_spec_name] = Result.Timeout.create(timed_out_result.test_spec, results[test_spec_name].output, self.timeout_editor_shared_test, result.editor_log) - return results def _run_single_test(self, request: Request, workspace: AbstractWorkspace, editor: Editor, diff --git a/Tools/LyTestTools/ly_test_tools/o3de/editor_test_utils.py b/Tools/LyTestTools/ly_test_tools/o3de/editor_test_utils.py index 35fbe93d37..dd0bede4b8 100644 --- a/Tools/LyTestTools/ly_test_tools/o3de/editor_test_utils.py +++ b/Tools/LyTestTools/ly_test_tools/o3de/editor_test_utils.py @@ -24,7 +24,7 @@ def kill_all_ly_processes(include_asset_processor: bool = True) -> None: :return: None """ LY_PROCESSES = [ - 'Editor', 'Profiler', 'RemoteConsole', + 'Editor', 'Profiler', 'RemoteConsole', 'o3de' ] AP_PROCESSES = [ 'AssetProcessor', 'AssetProcessorBatch', 'AssetBuilder' @@ -126,9 +126,9 @@ def retrieve_editor_log_content(run_id: int, log_name: str, workspace: AbstractW with open(editor_log) as f: editor_info = "" for line in f: - editor_info += f"[editor.log] {line}" + editor_info += f"[{log_name}] {line}" except Exception as ex: - editor_info = f"-- Error reading editor.log: {str(ex)} --" + editor_info = f"-- Error reading {log_name}: {str(ex)} --" return editor_info def retrieve_last_run_test_index_from_output(test_spec_list: list[EditorTestBase], output: str) -> int: diff --git a/Tools/LyTestTools/tests/unit/test_editor_test_utils.py b/Tools/LyTestTools/tests/unit/test_editor_test_utils.py index bf7fae7189..849fa5c391 100644 --- a/Tools/LyTestTools/tests/unit/test_editor_test_utils.py +++ b/Tools/LyTestTools/tests/unit/test_editor_test_utils.py @@ -17,14 +17,15 @@ class TestEditorTestUtils(unittest.TestCase): @mock.patch('ly_test_tools.environment.process_utils.kill_processes_named') def test_KillAllLyProcesses_IncludeAP_CallsCorrectly(self, mock_kill_processes_named): - process_list = ['Editor', 'Profiler', 'RemoteConsole', 'AssetProcessor', 'AssetProcessorBatch', 'AssetBuilder'] + process_list = ['Editor', 'Profiler', 'RemoteConsole', 'o3de', 'AssetProcessor', 'AssetProcessorBatch', + 'AssetBuilder'] editor_test_utils.kill_all_ly_processes(include_asset_processor=True) mock_kill_processes_named.assert_called_once_with(process_list, ignore_extensions=True) @mock.patch('ly_test_tools.environment.process_utils.kill_processes_named') def test_KillAllLyProcesses_NotIncludeAP_CallsCorrectly(self, mock_kill_processes_named): - process_list = ['Editor', 'Profiler', 'RemoteConsole'] + process_list = ['Editor', 'Profiler', 'RemoteConsole', 'o3de'] ap_process_list = ['AssetProcessor', 'AssetProcessorBatch', 'AssetBuilder'] editor_test_utils.kill_all_ly_processes(include_asset_processor=False) @@ -74,9 +75,9 @@ class TestEditorTestUtils(unittest.TestCase): def test_RetrieveCrashOutput_CrashLogNotExists_ReturnsError(self, mock_retrieve_log_path): mock_retrieve_log_path.return_value = 'mock_log_path' mock_workspace = mock.MagicMock() - expected = "-- No crash log available --\n[Errno 2] No such file or directory: 'mock_log_path\\\\error.log'" + error_message = "No crash log available" - assert expected == editor_test_utils.retrieve_crash_output(0, mock_workspace, 0) + assert error_message in editor_test_utils.retrieve_crash_output(0, mock_workspace, 0) @mock.patch('os.path.getmtime', mock.MagicMock()) @mock.patch('os.rename') @@ -119,7 +120,7 @@ class TestEditorTestUtils(unittest.TestCase): mock_log = 'mock log info' with mock.patch('builtins.open', mock.mock_open(read_data=mock_log)) as mock_file: - assert f'[editor.log] {mock_log}' == editor_test_utils.retrieve_editor_log_content(0, mock_logname, mock_workspace) + assert f'[{mock_logname}] {mock_log}' == editor_test_utils.retrieve_editor_log_content(0, mock_logname, mock_workspace) @mock.patch('ly_test_tools.o3de.editor_test_utils.retrieve_log_path') @mock.patch('ly_test_tools.environment.waiter.wait_for', mock.MagicMock()) @@ -127,7 +128,7 @@ class TestEditorTestUtils(unittest.TestCase): mock_retrieve_log_path.return_value = 'mock_log_path' mock_logname = 'mock_log.log' mock_workspace = mock.MagicMock() - expected = f"-- Error reading editor.log" + expected = f"-- Error reading {mock_logname}" assert expected in editor_test_utils.retrieve_editor_log_content(0, mock_logname, mock_workspace) diff --git a/Tools/LyTestTools/tests/unit/test_file_system.py b/Tools/LyTestTools/tests/unit/test_file_system.py index 53ca5a700e..2fdcf8131e 100755 --- a/Tools/LyTestTools/tests/unit/test_file_system.py +++ b/Tools/LyTestTools/tests/unit/test_file_system.py @@ -8,6 +8,7 @@ SPDX-License-Identifier: Apache-2.0 OR MIT import errno import logging import os +import stat import psutil import subprocess import sys @@ -454,24 +455,33 @@ class TestChangePermissions(unittest.TestCase): self.assertEqual(file_system.change_permissions('.', 0o777), False) +class MockStatResult(): + def __init__(self, st_mode): + self.st_mode = st_mode + class TestUnlockFile(unittest.TestCase): def setUp(self): self.file_name = 'file' + @mock.patch('os.stat') @mock.patch('os.chmod') @mock.patch('os.access') - def test_UnlockFile_WriteLocked_UnlockFile(self, mock_access, mock_chmod): + def test_UnlockFile_WriteLocked_UnlockFile(self, mock_access, mock_chmod, mock_stat): mock_access.return_value = False + os.stat.return_value = MockStatResult(stat.S_IREAD) success = file_system.unlock_file(self.file_name) + mock_chmod.assert_called_once_with(self.file_name, stat.S_IREAD | stat.S_IWRITE) self.assertTrue(success) + @mock.patch('os.stat') @mock.patch('os.chmod') @mock.patch('os.access') - def test_UnlockFile_AlreadyUnlocked_LogAlreadyUnlocked(self, mock_access, mock_chmod): + def test_UnlockFile_AlreadyUnlocked_LogAlreadyUnlocked(self, mock_access, mock_chmod, mock_stat): mock_access.return_value = True + os.stat.return_value = MockStatResult(stat.S_IREAD | stat.S_IWRITE) success = file_system.unlock_file(self.file_name) @@ -483,19 +493,24 @@ class TestLockFile(unittest.TestCase): def setUp(self): self.file_name = 'file' + @mock.patch('os.stat') @mock.patch('os.chmod') @mock.patch('os.access') - def test_UnlockFile_UnlockedFile_FileLockedSuccessReturnsTrue(self, mock_access, mock_chmod): + def test_LockFile_UnlockedFile_FileLockedSuccessReturnsTrue(self, mock_access, mock_chmod, mock_stat): mock_access.return_value = True + os.stat.return_value = MockStatResult(stat.S_IREAD | stat.S_IWRITE) success = file_system.lock_file(self.file_name) + mock_chmod.assert_called_once_with(self.file_name, stat.S_IREAD) self.assertTrue(success) + @mock.patch('os.stat') @mock.patch('os.chmod') @mock.patch('os.access') - def test_UnlockFile_AlreadyLocked_FileLockedFailedReturnsFalse(self, mock_access, mock_chmod): + def test_LockFile_AlreadyLocked_FileLockedFailedReturnsFalse(self, mock_access, mock_chmod, mock_stat): mock_access.return_value = False + os.stat.return_value = MockStatResult(stat.S_IREAD) success = file_system.lock_file(self.file_name) @@ -736,7 +751,7 @@ class TestFileBackup(unittest.TestCase): self._dummy_file = 'dummy.txt' self._dummy_backup_file = os.path.join(self._dummy_dir, '{}.bak'.format(self._dummy_file)) - @mock.patch('shutil.copy') + @mock.patch('shutil.copy2') @mock.patch('os.path.exists') @mock.patch('os.path.isdir') def test_BackupSettings_SourceExists_BackupCreated(self, mock_path_isdir, mock_backup_exists, mock_copy): @@ -748,7 +763,7 @@ class TestFileBackup(unittest.TestCase): mock_copy.assert_called_with(self._dummy_file, self._dummy_backup_file) @mock.patch('ly_test_tools.environment.file_system.logger.warning') - @mock.patch('shutil.copy') + @mock.patch('shutil.copy2') @mock.patch('os.path.exists') @mock.patch('os.path.isdir') def test_BackupSettings_BackupExists_WarningLogged(self, mock_path_isdir, mock_backup_exists, mock_copy, mock_logger_warning): @@ -761,7 +776,7 @@ class TestFileBackup(unittest.TestCase): mock_logger_warning.assert_called_once() @mock.patch('ly_test_tools.environment.file_system.logger.warning') - @mock.patch('shutil.copy') + @mock.patch('shutil.copy2') @mock.patch('os.path.exists') @mock.patch('os.path.isdir') def test_BackupSettings_SourceNotExists_WarningLogged(self, mock_path_isdir, mock_backup_exists, mock_copy, mock_logger_warning): @@ -774,7 +789,7 @@ class TestFileBackup(unittest.TestCase): mock_logger_warning.assert_called_once() @mock.patch('ly_test_tools.environment.file_system.logger.warning') - @mock.patch('shutil.copy') + @mock.patch('shutil.copy2') @mock.patch('os.path.exists') @mock.patch('os.path.isdir') def test_BackupSettings_CannotCopy_WarningLogged(self, mock_path_isdir, mock_backup_exists, mock_copy, mock_logger_warning): @@ -806,7 +821,7 @@ class TestFileBackupRestore(unittest.TestCase): self._dummy_file = 'dummy.txt' self._dummy_backup_file = os.path.join(self._dummy_dir, '{}.bak'.format(self._dummy_file)) - @mock.patch('shutil.copy') + @mock.patch('shutil.copy2') @mock.patch('os.path.exists') @mock.patch('os.path.isdir') def test_RestoreSettings_BackupRestore_Success(self, mock_path_isdir, mock_exists, mock_copy): @@ -817,7 +832,7 @@ class TestFileBackupRestore(unittest.TestCase): mock_copy.assert_called_with(self._dummy_backup_file, self._dummy_file) @mock.patch('ly_test_tools.environment.file_system.logger.warning') - @mock.patch('shutil.copy') + @mock.patch('shutil.copy2') @mock.patch('os.path.exists') @mock.patch('os.path.isdir') def test_RestoreSettings_CannotCopy_WarningLogged(self, mock_path_isdir, mock_exists, mock_copy, mock_logger_warning): @@ -831,7 +846,7 @@ class TestFileBackupRestore(unittest.TestCase): mock_logger_warning.assert_called_once() @mock.patch('ly_test_tools.environment.file_system.logger.warning') - @mock.patch('shutil.copy') + @mock.patch('shutil.copy2') @mock.patch('os.path.exists') @mock.patch('os.path.isdir') def test_RestoreSettings_BackupNotExists_WarningLogged(self, mock_path_isdir, mock_exists, mock_copy, mock_logger_warning): diff --git a/Tools/LyTestTools/tests/unit/test_launcher_base.py b/Tools/LyTestTools/tests/unit/test_launcher_base.py index 5264e1bc28..4fe72b889e 100755 --- a/Tools/LyTestTools/tests/unit/test_launcher_base.py +++ b/Tools/LyTestTools/tests/unit/test_launcher_base.py @@ -146,15 +146,6 @@ class TestBaseLauncher: mock_stop_ap.assert_called_once() - @mock.patch('ly_test_tools.launchers.platforms.base.Launcher.save_project_log_files') - def test_Teardown_TeardownCalled_CallsSaveProjectLogFiles(self, under_test): - mock_workspace = mock.MagicMock() - mock_args = ['foo'] - mock_launcher = ly_test_tools.launchers.Launcher(mock_workspace, mock_args) - - mock_launcher.teardown() - under_test.assert_called_once() - @mock.patch('os.path.exists', mock.MagicMock(return_value=True)) @mock.patch('ly_test_tools._internal.managers.artifact_manager.ArtifactManager.save_artifact') @mock.patch('os.listdir') diff --git a/Tools/LyTestTools/tests/unit/test_manager_platforms_mac.py b/Tools/LyTestTools/tests/unit/test_manager_platforms_mac.py index e91b810f9d..e195aa5796 100755 --- a/Tools/LyTestTools/tests/unit/test_manager_platforms_mac.py +++ b/Tools/LyTestTools/tests/unit/test_manager_platforms_mac.py @@ -76,7 +76,7 @@ class TestMacResourceLocator(object): mock_project) expected = os.path.join( mac_resource_locator.project_log(), - 'editor.log') + 'Editor.log') assert mac_resource_locator.editor_log() == expected diff --git a/Tools/LyTestTools/tests/unit/test_manager_platforms_windows.py b/Tools/LyTestTools/tests/unit/test_manager_platforms_windows.py index 7e30289da0..b7cc8edf40 100755 --- a/Tools/LyTestTools/tests/unit/test_manager_platforms_windows.py +++ b/Tools/LyTestTools/tests/unit/test_manager_platforms_windows.py @@ -80,7 +80,7 @@ class TestWindowsResourceLocator(object): mock_build_directory, mock_project) expected = os.path.join( windows_resource_locator.project_log(), - 'editor.log') + 'Editor.log') assert windows_resource_locator.editor_log() == expected diff --git a/Tools/LyTestTools/tests/unit/test_o3de_editor_test.py b/Tools/LyTestTools/tests/unit/test_o3de_editor_test.py index 3f6c23ea3d..2b6ae5b471 100644 --- a/Tools/LyTestTools/tests/unit/test_o3de_editor_test.py +++ b/Tools/LyTestTools/tests/unit/test_o3de_editor_test.py @@ -594,6 +594,7 @@ class TestRunningTests(unittest.TestCase): mock_get_output_results, mock_create): mock_test_suite = ly_test_tools.o3de.editor_test.EditorTestSuite() mock_workspace = mock.MagicMock() + mock_workspace.paths.engine_root.return_value = "" mock_editor = mock.MagicMock() mock_test_spec = mock.MagicMock() mock_test_spec.__name__ = 'mock_test_name' @@ -620,6 +621,7 @@ class TestRunningTests(unittest.TestCase): mock_get_output_results, mock_create): mock_test_suite = ly_test_tools.o3de.editor_test.EditorTestSuite() mock_workspace = mock.MagicMock() + mock_workspace.paths.engine_root.return_value = "" mock_editor = mock.MagicMock() mock_test_spec = mock.MagicMock() mock_test_spec.__name__ = 'mock_test_name' @@ -647,6 +649,7 @@ class TestRunningTests(unittest.TestCase): mock_get_output_results, mock_retrieve_crash, mock_create): mock_test_suite = ly_test_tools.o3de.editor_test.EditorTestSuite() mock_workspace = mock.MagicMock() + mock_workspace.paths.engine_root.return_value = "" mock_editor = mock.MagicMock() mock_test_spec = mock.MagicMock() mock_test_spec.__name__ = 'mock_test_name' @@ -674,6 +677,7 @@ class TestRunningTests(unittest.TestCase): mock_get_output_results, mock_create): mock_test_suite = ly_test_tools.o3de.editor_test.EditorTestSuite() mock_workspace = mock.MagicMock() + mock_workspace.paths.engine_root.return_value = "" mock_editor = mock.MagicMock() mock_test_spec = mock.MagicMock() mock_test_spec.__name__ = 'mock_test_name' @@ -699,6 +703,7 @@ class TestRunningTests(unittest.TestCase): mock_retrieve_log, mock_retrieve_editor_log, mock_create): mock_test_suite = ly_test_tools.o3de.editor_test.EditorTestSuite() mock_workspace = mock.MagicMock() + mock_workspace.paths.engine_root.return_value = "" mock_editor = mock.MagicMock() mock_editor.get_returncode.return_value = 0 mock_test_spec = mock.MagicMock() @@ -726,6 +731,7 @@ class TestRunningTests(unittest.TestCase): mock_retrieve_log, mock_retrieve_editor_log, mock_get_results): mock_test_suite = ly_test_tools.o3de.editor_test.EditorTestSuite() mock_workspace = mock.MagicMock() + mock_workspace.paths.engine_root.return_value = "" mock_editor = mock.MagicMock() mock_editor.get_returncode.return_value = 15 mock_test_spec = mock.MagicMock() @@ -751,6 +757,7 @@ class TestRunningTests(unittest.TestCase): mock_get_results, mock_retrieve_crash, mock_create): mock_test_suite = ly_test_tools.o3de.editor_test.EditorTestSuite() mock_workspace = mock.MagicMock() + mock_workspace.paths.engine_root.return_value = "" mock_editor = mock.MagicMock() mock_editor.get_returncode.return_value = 1 mock_test_spec = mock.MagicMock() @@ -785,6 +792,7 @@ class TestRunningTests(unittest.TestCase): mock_get_results, mock_retrieve_crash, mock_create): mock_test_suite = ly_test_tools.o3de.editor_test.EditorTestSuite() mock_workspace = mock.MagicMock() + mock_workspace.paths.engine_root.return_value = "" mock_editor = mock.MagicMock() mock_editor.get_returncode.return_value = 1 mock_test_spec = mock.MagicMock() @@ -821,6 +829,7 @@ class TestRunningTests(unittest.TestCase): mock_get_results, mock_create): mock_test_suite = ly_test_tools.o3de.editor_test.EditorTestSuite() mock_workspace = mock.MagicMock() + mock_workspace.paths.engine_root.return_value = "" mock_editor = mock.MagicMock() mock_editor.wait.side_effect = ly_test_tools.launchers.exceptions.WaitTimeoutError() mock_test_spec = mock.MagicMock() diff --git a/Tools/LyTestTools/tests/unit/test_process_utils.py b/Tools/LyTestTools/tests/unit/test_process_utils.py index bd6a79fb09..87b5790b78 100755 --- a/Tools/LyTestTools/tests/unit/test_process_utils.py +++ b/Tools/LyTestTools/tests/unit/test_process_utils.py @@ -371,15 +371,15 @@ class TestProcessMatching(unittest.TestCase): mock_log_warn.assert_called() @mock.patch('psutil.wait_procs') - @mock.patch('logging.Logger.warning') - def test_SafeKillProcList_RaisesError_NoRaiseAndLogsError(self, mock_log_warn, mock_wait_procs): + @mock.patch('logging.Logger.debug') + def test_SafeKillProcList_RaisesError_NoRaiseAndLogsError(self, mock_log, mock_wait_procs): mock_wait_procs.side_effect = psutil.PermissionError() proc_mock = mock.MagicMock() process_utils._safe_kill_processes(proc_mock) mock_wait_procs.assert_called() - mock_log_warn.assert_called() + mock_log.assert_called() @mock.patch('psutil.process_iter') @mock.patch('logging.Logger.debug') diff --git a/Tools/RemoteConsole/ly_remote_console/README.txt b/Tools/RemoteConsole/ly_remote_console/README.txt index 497179ac15..0c5d8c67af 100644 --- a/Tools/RemoteConsole/ly_remote_console/README.txt +++ b/Tools/RemoteConsole/ly_remote_console/README.txt @@ -22,8 +22,7 @@ installed on your system. INSTALL ----------- -It is recommended to set up these these tools with the lmbr_test tool Lumberyard's root directory: - lmbr_test pysetup install +Installation of these tools happen automatically when get_python and cmake is run. To manually install the project in development mode: python -m pip install -e . diff --git a/cmake/3rdParty.cmake b/cmake/3rdParty.cmake index 4b7f929279..7d98c3ea3e 100644 --- a/cmake/3rdParty.cmake +++ b/cmake/3rdParty.cmake @@ -25,6 +25,15 @@ define_property(TARGET PROPERTY LY_SYSTEM_LIBRARY # \arg:output_third_party_path name of variable to set the default project directory into # It defaults to the ~/.o3de/3rdParty directory function(get_default_third_party_folder output_third_party_path) + + # 1. Highest priority, cache variable, that will override the value of any of the cases below + # 2. if defined in an env variable, take it from there + if($ENV{LY_3RDPARTY_PATH}) + set(${output_third_party_path} $ENV{LY_3RDPARTY_PATH} PARENT_SCOPE) + return() + endif() + + # 3. If defined in the o3de_manifest.json, take it from there cmake_path(SET home_directory "$ENV{USERPROFILE}") # Windows if(NOT EXISTS ${home_directory}) cmake_path(SET home_directory "$ENV{HOME}") # Unix @@ -33,7 +42,20 @@ function(get_default_third_party_folder output_third_party_path) endif() endif() + set(manifest_path ${home_directory}/.o3de/o3de_manifest.json) + if(EXISTS ${manifest_path}) + file(READ ${manifest_path} manifest_json) + string(JSON default_third_party_folder ERROR_VARIABLE json_error GET ${manifest_json} default_third_party_folder) + if(NOT json_error) + set_property(DIRECTORY APPEND PROPERTY CMAKE_CONFIGURE_DEPENDS ${manifest_path}) + set(${output_third_party_path} ${default_third_party_folder} PARENT_SCOPE) + return() + endif() + endif() + + # 4. Lowest priority, use the home directory as the location for 3rdparty set(${output_third_party_path} ${home_directory}/.o3de/3rdParty PARENT_SCOPE) + endfunction() get_default_third_party_folder(o3de_default_third_party_path) diff --git a/cmake/3rdParty/Platform/Android/BuiltInPackages_android.cmake b/cmake/3rdParty/Platform/Android/BuiltInPackages_android.cmake index 9dbdbbd8aa..c6a262926c 100644 --- a/cmake/3rdParty/Platform/Android/BuiltInPackages_android.cmake +++ b/cmake/3rdParty/Platform/Android/BuiltInPackages_android.cmake @@ -14,13 +14,13 @@ ly_associate_package(PACKAGE_NAME cityhash-1.1-multiplatform TARGETS cit ly_associate_package(PACKAGE_NAME expat-2.1.0-multiplatform TARGETS expat PACKAGE_HASH 452256acd1fd699cef24162575b3524fccfb712f5321c83f1df1ce878de5b418) ly_associate_package(PACKAGE_NAME zstd-1.35-multiplatform TARGETS zstd PACKAGE_HASH 45d466c435f1095898578eedde85acf1fd27190e7ea99aeaa9acfd2f09e12665) ly_associate_package(PACKAGE_NAME glad-2.0.0-beta-rev2-multiplatform TARGETS glad PACKAGE_HASH ff97ee9664e97d0854b52a3734c2289329d9f2b4cd69478df6d0ca1f1c9392ee) -ly_associate_package(PACKAGE_NAME lux_core-2.2-rev5-multiplatform TARGETS lux_core PACKAGE_HASH c8c13cf7bc351643e1abd294d0841b24dee60e51647dff13db7aec396ad1e0b5) + # platform-specific: ly_associate_package(PACKAGE_NAME tiff-4.2.0.15-rev4-android TARGETS TIFF PACKAGE_HASH 2c62cdf34a8ee6c7eb091d05d98f60b4da7634c74054d4dbb8736886182f4589) ly_associate_package(PACKAGE_NAME freetype-2.10.4.16-android TARGETS freetype PACKAGE_HASH df9e4d559ea0f03b0666b48c79813b1cd4d9624429148a249865de9f5c2c11cd) ly_associate_package(PACKAGE_NAME AWSNativeSDK-1.9.50-rev1-android TARGETS AWSNativeSDK PACKAGE_HASH 33771499f9080cbaab613459927e52911e68f94fa356397885e85005efbd1490) ly_associate_package(PACKAGE_NAME Lua-5.3.5-rev5-android TARGETS Lua PACKAGE_HASH 1f638e94a17a87fe9e588ea456d5893876094b4db191234380e4c4eb9e06c300) -ly_associate_package(PACKAGE_NAME PhysX-4.1.2.29882248-rev3-android TARGETS PhysX PACKAGE_HASH b8cb6aa46b2a21671f6cb1f6a78713a3ba88824d0447560ff5ce6c01014b9f43) +ly_associate_package(PACKAGE_NAME PhysX-4.1.2.29882248-rev5-android TARGETS PhysX PACKAGE_HASH b346e8f9bc55f367a97d781d94c8a5c3bff8059478b8a7007e5fd17708dc1d07) ly_associate_package(PACKAGE_NAME mikkelsen-1.0.0.4-android TARGETS mikkelsen PACKAGE_HASH 075e8e4940884971063b5a9963014e2e517246fa269c07c7dc55b8cf2cd99705) ly_associate_package(PACKAGE_NAME googletest-1.8.1-rev4-android TARGETS googletest PACKAGE_HASH 95671be75287a61c9533452835c3647e9c1b30f81b34b43bcb0ec1997cc23894) ly_associate_package(PACKAGE_NAME googlebenchmark-1.5.0-rev2-android TARGETS GoogleBenchmark PACKAGE_HASH 20b46e572211a69d7d94ddad1c89ec37bb958711d6ad4025368ac89ea83078fb) diff --git a/cmake/3rdParty/Platform/Android/VkValidation_android.cmake b/cmake/3rdParty/Platform/Android/VkValidation_android.cmake index dc1c918aad..dbc6db88a1 100644 --- a/cmake/3rdParty/Platform/Android/VkValidation_android.cmake +++ b/cmake/3rdParty/Platform/Android/VkValidation_android.cmake @@ -6,4 +6,12 @@ # # -set(VKVALIDATION_RUNTIME_DEPENDENCIES $<$>:${LY_NDK_DIR}/sources/third_party/vulkan/src/build-android/jniLibs/arm64-v8a/libVkLayer_khronos_validation.so>) +set(LY_ANDROID_VULKAN_VALIDATION_PATH "${LY_NDK_DIR}/sources/third_party/vulkan/src/build-android/jniLibs" CACHE PATH "Path to the Vulkan Validation Layers libs for Android") + +if(NOT EXISTS ${LY_ANDROID_VULKAN_VALIDATION_PATH}) + message(FATAL_ERROR + "Unable to locate the Android Vulkan validation layer libs at ${LY_ANDROID_VULKAN_VALIDATION_PATH}. " + "If using NDK r23 or above, these libs are distributed separately via https://github.com/KhronosGroup/Vulkan-ValidationLayers") +endif() + +set(VKVALIDATION_RUNTIME_DEPENDENCIES $<$>:${LY_ANDROID_VULKAN_VALIDATION_PATH}/arm64-v8a/libVkLayer_khronos_validation.so>) diff --git a/cmake/3rdParty/Platform/Linux/BuiltInPackages_linux.cmake b/cmake/3rdParty/Platform/Linux/BuiltInPackages_linux.cmake index af7afff5dc..f7bc2721ae 100644 --- a/cmake/3rdParty/Platform/Linux/BuiltInPackages_linux.cmake +++ b/cmake/3rdParty/Platform/Linux/BuiltInPackages_linux.cmake @@ -18,16 +18,15 @@ ly_associate_package(PACKAGE_NAME expat-2.1.0-multiplatform ly_associate_package(PACKAGE_NAME zstd-1.35-multiplatform TARGETS zstd PACKAGE_HASH 45d466c435f1095898578eedde85acf1fd27190e7ea99aeaa9acfd2f09e12665) ly_associate_package(PACKAGE_NAME SQLite-3.32.2-rev3-multiplatform TARGETS SQLite PACKAGE_HASH dd4d3de6cbb4ce3d15fc504ba0ae0587e515dc89a25228037035fc0aef4831f4) ly_associate_package(PACKAGE_NAME glad-2.0.0-beta-rev2-multiplatform TARGETS glad PACKAGE_HASH ff97ee9664e97d0854b52a3734c2289329d9f2b4cd69478df6d0ca1f1c9392ee) -ly_associate_package(PACKAGE_NAME lux_core-2.2-rev5-multiplatform TARGETS lux_core PACKAGE_HASH c8c13cf7bc351643e1abd294d0841b24dee60e51647dff13db7aec396ad1e0b5) ly_associate_package(PACKAGE_NAME xxhash-0.7.4-rev1-multiplatform TARGETS xxhash PACKAGE_HASH e81f3e6c4065975833996dd1fcffe46c3cf0f9e3a4207ec5f4a1b564ba75861e) # platform-specific: ly_associate_package(PACKAGE_NAME AWSGameLiftServerSDK-3.4.1-rev1-linux TARGETS AWSGameLiftServerSDK PACKAGE_HASH a8149a95bd100384af6ade97e2b21a56173740d921e6c3da8188cd51554d39af) ly_associate_package(PACKAGE_NAME tiff-4.2.0.15-rev3-linux TARGETS TIFF PACKAGE_HASH 2377f48b2ebc2d1628d9f65186c881544c92891312abe478a20d10b85877409a) ly_associate_package(PACKAGE_NAME freetype-2.10.4.16-linux TARGETS freetype PACKAGE_HASH 3f10c703d9001ecd2bb51a3bd003d3237c02d8f947ad0161c0252fdc54cbcf97) -ly_associate_package(PACKAGE_NAME AWSNativeSDK-1.7.167-rev6-linux TARGETS AWSNativeSDK PACKAGE_HASH 490291e4c8057975c3ab86feb971b8a38871c58bac5e5d86abdd1aeb7141eec4) +ly_associate_package(PACKAGE_NAME AWSNativeSDK-1.9.50-rev1-linux TARGETS AWSNativeSDK PACKAGE_HASH f30b6969c6732a7c1a23a59d205a150633a7f219dcb60d837b543888d2c63ea1) ly_associate_package(PACKAGE_NAME Lua-5.3.5-rev5-linux TARGETS Lua PACKAGE_HASH 1adc812abe3dd0dbb2ca9756f81d8f0e0ba45779ac85bf1d8455b25c531a38b0) -ly_associate_package(PACKAGE_NAME PhysX-4.1.2.29882248-rev3-linux TARGETS PhysX PACKAGE_HASH a110249cbef4f266b0002c4ee9a71f59f373040cefbe6b82f1e1510c811edde6) +ly_associate_package(PACKAGE_NAME PhysX-4.1.2.29882248-rev5-linux TARGETS PhysX PACKAGE_HASH fa72365df409376aef02d1763194dc91d255bdfcb4e8febcfbb64d23a3e50b96) ly_associate_package(PACKAGE_NAME mcpp-2.7.2_az.2-rev1-linux TARGETS mcpp PACKAGE_HASH df7a998d0bc3fedf44b5bdebaf69ddad6033355b71a590e8642445ec77bc6c41) ly_associate_package(PACKAGE_NAME mikkelsen-1.0.0.4-linux TARGETS mikkelsen PACKAGE_HASH 5973b1e71a64633588eecdb5b5c06ca0081f7be97230f6ef64365cbda315b9c8) ly_associate_package(PACKAGE_NAME googletest-1.8.1-rev4-linux TARGETS googletest PACKAGE_HASH 7b7ad330f369450c316a4c4592d17fbb4c14c731c95bd8f37757203e8c2bbc1b) @@ -36,12 +35,14 @@ ly_associate_package(PACKAGE_NAME unwind-1.2.1-linux ly_associate_package(PACKAGE_NAME qt-5.15.2-rev6-linux TARGETS Qt PACKAGE_HASH a37bd9989f1e8fe57d94b98cbf9bd5c3caaea740e2f314e5162fa77300551531) ly_associate_package(PACKAGE_NAME libpng-1.6.37-rev1-linux TARGETS libpng PACKAGE_HASH 896451999f1de76375599aec4b34ae0573d8d34620d9ab29cc30b8739c265ba6) ly_associate_package(PACKAGE_NAME libsamplerate-0.2.1-rev2-linux TARGETS libsamplerate PACKAGE_HASH 41643c31bc6b7d037f895f89d8d8d6369e906b92eff42b0fe05ee6a100f06261) +ly_associate_package(PACKAGE_NAME OpenMesh-8.1-rev3-linux TARGETS OpenMesh PACKAGE_HASH 805bd0b24911bb00c7f575b8c3f10d7ea16548a5014c40811894a9445f17a126) ly_associate_package(PACKAGE_NAME OpenSSL-1.1.1b-rev2-linux TARGETS OpenSSL PACKAGE_HASH b779426d1e9c5ddf71160d5ae2e639c3b956e0fb5e9fcaf9ce97c4526024e3bc) ly_associate_package(PACKAGE_NAME DirectXShaderCompilerDxc-1.6.2104-o3de-rev3-linux TARGETS DirectXShaderCompilerDxc PACKAGE_HASH 88c4a359325d749bc34090b9ac466424847f3b71ba0de15045cf355c17c07099) ly_associate_package(PACKAGE_NAME SPIRVCross-2021.04.29-rev1-linux TARGETS SPIRVCross PACKAGE_HASH 7889ee5460a688e9b910c0168b31445c0079d363affa07b25d4c8aeb608a0b80) ly_associate_package(PACKAGE_NAME azslc-1.7.34-rev1-linux TARGETS azslc PACKAGE_HASH 6d7dc671936c34ff70d2632196107ca1b8b2b41acdd021bfbc69a9fd56215c22) ly_associate_package(PACKAGE_NAME zlib-1.2.11-rev5-linux TARGETS ZLIB PACKAGE_HASH 9be5ea85722fc27a8645a9c8a812669d107c68e6baa2ca0740872eaeb6a8b0fc) ly_associate_package(PACKAGE_NAME squish-ccr-deb557d-rev1-linux TARGETS squish-ccr PACKAGE_HASH 85fecafbddc6a41a27c5f59ed4a5dfb123a94cb4666782cf26e63c0a4724c530) -ly_associate_package(PACKAGE_NAME astc-encoder-3.2-rev1-linux TARGETS astc-encoder PACKAGE_HASH 2ba97a06474d609945f0ab4419af1f6bbffdd294ca6b869f5fcebec75c573c0f) +ly_associate_package(PACKAGE_NAME astc-encoder-3.2-rev2-linux TARGETS astc-encoder PACKAGE_HASH 71549d1ca9e4d48391b92a89ea23656d3393810e6777879f6f8a9def2db1610c) ly_associate_package(PACKAGE_NAME ISPCTexComp-36b80aa-rev1-linux TARGETS ISPCTexComp PACKAGE_HASH 065fd12abe4247dde247330313763cf816c3375c221da030bdec35024947f259) ly_associate_package(PACKAGE_NAME lz4-1.9.3-vcpkg-rev4-linux TARGETS lz4 PACKAGE_HASH 5de3dbd3e2a3537c6555d759b3c5bb98e5456cf85c74ff6d046f809b7087290d) +ly_associate_package(PACKAGE_NAME pyside2-5.15.2-rev2-linux TARGETS pyside2 PACKAGE_HASH 7589c397c8224d0c3ad691ff02e1afd55d9a1f9de1967c14eb8105dd2b0c4dd1) diff --git a/cmake/3rdParty/Platform/Mac/BuiltInPackages_mac.cmake b/cmake/3rdParty/Platform/Mac/BuiltInPackages_mac.cmake index d054ba22e1..ea324a5cb7 100644 --- a/cmake/3rdParty/Platform/Mac/BuiltInPackages_mac.cmake +++ b/cmake/3rdParty/Platform/Mac/BuiltInPackages_mac.cmake @@ -18,7 +18,6 @@ ly_associate_package(PACKAGE_NAME expat-2.1.0-multiplatform ly_associate_package(PACKAGE_NAME zstd-1.35-multiplatform TARGETS zstd PACKAGE_HASH 45d466c435f1095898578eedde85acf1fd27190e7ea99aeaa9acfd2f09e12665) ly_associate_package(PACKAGE_NAME SQLite-3.32.2-rev3-multiplatform TARGETS SQLite PACKAGE_HASH dd4d3de6cbb4ce3d15fc504ba0ae0587e515dc89a25228037035fc0aef4831f4) ly_associate_package(PACKAGE_NAME glad-2.0.0-beta-rev2-multiplatform TARGETS glad PACKAGE_HASH ff97ee9664e97d0854b52a3734c2289329d9f2b4cd69478df6d0ca1f1c9392ee) -ly_associate_package(PACKAGE_NAME lux_core-2.2-rev5-multiplatform TARGETS lux_core PACKAGE_HASH c8c13cf7bc351643e1abd294d0841b24dee60e51647dff13db7aec396ad1e0b5) ly_associate_package(PACKAGE_NAME xxhash-0.7.4-rev1-multiplatform TARGETS xxhash PACKAGE_HASH e81f3e6c4065975833996dd1fcffe46c3cf0f9e3a4207ec5f4a1b564ba75861e) # platform-specific: @@ -26,20 +25,21 @@ ly_associate_package(PACKAGE_NAME DirectXShaderCompilerDxc-1.6.2104-o3de-rev3-ma ly_associate_package(PACKAGE_NAME SPIRVCross-2021.04.29-rev1-mac TARGETS SPIRVCross PACKAGE_HASH 78c6376ed2fd195b9b1f5fb2b56e5267a32c3aa21fb399e905308de470eb4515) ly_associate_package(PACKAGE_NAME tiff-4.2.0.15-rev3-mac TARGETS TIFF PACKAGE_HASH c2615ccdadcc0e1d6c5ed61e5965c4d3a82193d206591b79b805c3b3ff35a4bf) ly_associate_package(PACKAGE_NAME freetype-2.10.4.16-mac TARGETS freetype PACKAGE_HASH f159b346ac3251fb29cb8dd5f805c99b0015ed7fdb3887f656945ca701a61d0d) -ly_associate_package(PACKAGE_NAME AWSNativeSDK-1.7.167-rev5-mac TARGETS AWSNativeSDK PACKAGE_HASH ffb890bd9cf23afb429b9214ad9bac1bf04696f07a0ebb93c42058c482ab2f01) +ly_associate_package(PACKAGE_NAME AWSNativeSDK-1.9.50-rev1-mac TARGETS AWSNativeSDK PACKAGE_HASH 6c27a49376870c606144e4639e15867f9db7e4a1ee5f1a726f152d3bd8459966) ly_associate_package(PACKAGE_NAME Lua-5.3.5-rev6-mac TARGETS Lua PACKAGE_HASH b9079fd35634774c9269028447562c6b712dbc83b9c64975c095fd423ff04c08) -ly_associate_package(PACKAGE_NAME PhysX-4.1.2.29882248-rev3-mac TARGETS PhysX PACKAGE_HASH 5e092a11d5c0a50c4dd99bb681a04b566a4f6f29aa08443d9bffc8dc12c27c8e) +ly_associate_package(PACKAGE_NAME PhysX-4.1.2.29882248-rev5-mac TARGETS PhysX PACKAGE_HASH 83940b3876115db82cd8ffcb9e902278e75846d6ad94a41e135b155cee1ee186) ly_associate_package(PACKAGE_NAME mcpp-2.7.2_az.2-rev1-mac TARGETS mcpp PACKAGE_HASH be9558905c9c49179ef3d7d84f0a5472415acdf7fe2d76eb060d9431723ddf2e) ly_associate_package(PACKAGE_NAME mikkelsen-1.0.0.4-mac TARGETS mikkelsen PACKAGE_HASH 83af99ca8bee123684ad254263add556f0cf49486c0b3e32e6d303535714e505) ly_associate_package(PACKAGE_NAME googletest-1.8.1-rev4-mac TARGETS googletest PACKAGE_HASH cbf020d5ef976c5db8b6e894c6c63151ade85ed98e7c502729dd20172acae5a8) ly_associate_package(PACKAGE_NAME googlebenchmark-1.5.0-rev2-mac TARGETS GoogleBenchmark PACKAGE_HASH ad25de0146769c91e179953d845de2bec8ed4a691f973f47e3eb37639381f665) +ly_associate_package(PACKAGE_NAME OpenMesh-8.1-rev3-mac TARGETS OpenMesh PACKAGE_HASH af92db02a25c1f7e1741ec898f49d81d52631e00336bf9bddd1e191590063c2f) ly_associate_package(PACKAGE_NAME OpenSSL-1.1.1b-rev1-mac TARGETS OpenSSL PACKAGE_HASH 28adc1c0616ac0482b2a9d7b4a3a3635a1020e87b163f8aba687c501cf35f96c) ly_associate_package(PACKAGE_NAME qt-5.15.2-rev5-mac TARGETS Qt PACKAGE_HASH 9d25918351898b308ded3e9e571fff6f26311b2071aeafd00dd5b249fdf53f7e) ly_associate_package(PACKAGE_NAME libpng-1.6.37-mac TARGETS libpng PACKAGE_HASH 1ad76cd038ccc1f288f83c5fe2859a0f35c5154e1fe7658e1230cc428d318a8b) ly_associate_package(PACKAGE_NAME libsamplerate-0.2.1-rev2-mac TARGETS libsamplerate PACKAGE_HASH b912af40c0ac197af9c43d85004395ba92a6a859a24b7eacd920fed5854a97fe) ly_associate_package(PACKAGE_NAME zlib-1.2.11-rev5-mac TARGETS ZLIB PACKAGE_HASH b6fea9c79b8bf106d4703b67fecaa133f832ad28696c2ceef45fb5f20013c096) ly_associate_package(PACKAGE_NAME squish-ccr-deb557d-rev1-mac TARGETS squish-ccr PACKAGE_HASH 155bfbfa17c19a9cd2ef025de14c5db598f4290045d5b0d83ab58cb345089a77) -ly_associate_package(PACKAGE_NAME astc-encoder-3.2-rev1-mac TARGETS astc-encoder PACKAGE_HASH 96f6ea8c3e45ec7fe525230c7c53ca665c8300d8e28456cc19bb3159ce6f8dcc) +ly_associate_package(PACKAGE_NAME astc-encoder-3.2-rev5-mac TARGETS astc-encoder PACKAGE_HASH bdb1146cc6bbacc07901564fe884529d7cacc9bb44895597327341d3b9833ab0) ly_associate_package(PACKAGE_NAME ISPCTexComp-36b80aa-rev1-mac TARGETS ISPCTexComp PACKAGE_HASH 8a4e93277b8face6ea2fd57c6d017bdb55643ed3d6387110bc5f6b3b884dd169) ly_associate_package(PACKAGE_NAME lz4-1.9.3-vcpkg-rev4-mac TARGETS lz4 PACKAGE_HASH 891ff630bf34f7ab1d8eaee2ea0a8f1fca89dbdc63fca41ee592703dd488a73b) ly_associate_package(PACKAGE_NAME azslc-1.7.34-rev1-mac TARGETS azslc PACKAGE_HASH a9d81946b42ffa55c0d14d6a9249b3340e59a8fb8835e7a96c31df80f14723bc) diff --git a/cmake/3rdParty/Platform/Windows/BuiltInPackages_windows.cmake b/cmake/3rdParty/Platform/Windows/BuiltInPackages_windows.cmake index fce2229771..5441bcd76f 100644 --- a/cmake/3rdParty/Platform/Windows/BuiltInPackages_windows.cmake +++ b/cmake/3rdParty/Platform/Windows/BuiltInPackages_windows.cmake @@ -18,7 +18,6 @@ ly_associate_package(PACKAGE_NAME expat-2.1.0-multiplatform ly_associate_package(PACKAGE_NAME zstd-1.35-multiplatform TARGETS zstd PACKAGE_HASH 45d466c435f1095898578eedde85acf1fd27190e7ea99aeaa9acfd2f09e12665) ly_associate_package(PACKAGE_NAME SQLite-3.32.2-rev3-multiplatform TARGETS SQLite PACKAGE_HASH dd4d3de6cbb4ce3d15fc504ba0ae0587e515dc89a25228037035fc0aef4831f4) ly_associate_package(PACKAGE_NAME glad-2.0.0-beta-rev2-multiplatform TARGETS glad PACKAGE_HASH ff97ee9664e97d0854b52a3734c2289329d9f2b4cd69478df6d0ca1f1c9392ee) -ly_associate_package(PACKAGE_NAME lux_core-2.2-rev5-multiplatform TARGETS lux_core PACKAGE_HASH c8c13cf7bc351643e1abd294d0841b24dee60e51647dff13db7aec396ad1e0b5) ly_associate_package(PACKAGE_NAME xxhash-0.7.4-rev1-multiplatform TARGETS xxhash PACKAGE_HASH e81f3e6c4065975833996dd1fcffe46c3cf0f9e3a4207ec5f4a1b564ba75861e) # platform-specific: @@ -27,9 +26,9 @@ ly_associate_package(PACKAGE_NAME DirectXShaderCompilerDxc-1.6.2104-o3de-rev3-wi ly_associate_package(PACKAGE_NAME SPIRVCross-2021.04.29-rev1-windows TARGETS SPIRVCross PACKAGE_HASH 7d601ea9d625b1d509d38bd132a1f433d7e895b16adab76bac6103567a7a6817) ly_associate_package(PACKAGE_NAME tiff-4.2.0.15-rev3-windows TARGETS TIFF PACKAGE_HASH c6000a906e6d2a0816b652e93dfbeab41c9ed73cdd5a613acd53e553d0510b60) ly_associate_package(PACKAGE_NAME freetype-2.10.4.16-windows TARGETS freetype PACKAGE_HASH 9809255f1c59b07875097aa8d8c6c21c97c47a31fb35e30f2bb93188e99a85ff) -ly_associate_package(PACKAGE_NAME AWSNativeSDK-1.7.167-rev4-windows TARGETS AWSNativeSDK PACKAGE_HASH a900e80f7259e43aed5c847afee2599ada37f29db70505481397675bcbb6c76c) +ly_associate_package(PACKAGE_NAME AWSNativeSDK-1.9.50-rev2-windows TARGETS AWSNativeSDK PACKAGE_HASH 047de23fa57d33196666c22f45afc9c628bae354a6c39d774cbeee8054b2eb53) ly_associate_package(PACKAGE_NAME Lua-5.3.5-rev5-windows TARGETS Lua PACKAGE_HASH 136faccf1f73891e3fa3b95f908523187792e56f5b92c63c6a6d7e72d1158d40) -ly_associate_package(PACKAGE_NAME PhysX-4.1.2.29882248-rev3-windows TARGETS PhysX PACKAGE_HASH 0c5ffbd9fa588e5cf7643721a7cfe74d0fe448bf82252d39b3a96d06dfca2298) +ly_associate_package(PACKAGE_NAME PhysX-4.1.2.29882248-rev5-windows TARGETS PhysX PACKAGE_HASH 4e31a3e1f5bf3952d8af8e28d1a29f04167995a6362fc3a7c20c25f74bf01e23) ly_associate_package(PACKAGE_NAME mcpp-2.7.2_az.2-rev1-windows TARGETS mcpp PACKAGE_HASH 794789aba639bfe2f4e8fcb4424d679933dd6290e523084aa0a4e287ac44acb2) ly_associate_package(PACKAGE_NAME mikkelsen-1.0.0.4-windows TARGETS mikkelsen PACKAGE_HASH 872c4d245a1c86139aa929f2b465b63ea4ea55b04ced50309135dd4597457a4e) ly_associate_package(PACKAGE_NAME googletest-1.8.1-rev4-windows TARGETS googletest PACKAGE_HASH 7e8f03ae8a01563124e3daa06386f25a2b311c10bb95bff05cae6c41eff83837) @@ -40,13 +39,13 @@ ly_associate_package(PACKAGE_NAME openimageio-2.1.16.0-rev2-windows ly_associate_package(PACKAGE_NAME qt-5.15.2-rev4-windows TARGETS Qt PACKAGE_HASH a4634caaf48192cad5c5f408504746e53d338856148285057274f6a0ccdc071d) ly_associate_package(PACKAGE_NAME libpng-1.6.37-rev1-windows TARGETS libpng PACKAGE_HASH aa20c894fbd7cdaea585a54e37620b3454a7e414a58128acd68ccf6fe76c47d6) ly_associate_package(PACKAGE_NAME libsamplerate-0.2.1-rev2-windows TARGETS libsamplerate PACKAGE_HASH dcf3c11a96f212a52e2c9241abde5c364ee90b0f32fe6eeb6dcdca01d491829f) -ly_associate_package(PACKAGE_NAME OpenMesh-8.1-rev1-windows TARGETS OpenMesh PACKAGE_HASH 1c1df639358526c368e790dfce40c45cbdfcfb1c9a041b9d7054a8949d88ee77) +ly_associate_package(PACKAGE_NAME OpenMesh-8.1-rev3-windows TARGETS OpenMesh PACKAGE_HASH 7a6309323ad03bfc646bd04ecc79c3711de6790e4ff5a72f83a8f5a8f496d684) ly_associate_package(PACKAGE_NAME civetweb-1.8-rev1-windows TARGETS civetweb PACKAGE_HASH 36d0e58a59bcdb4dd70493fb1b177aa0354c945b06c30416348fd326cf323dd4) ly_associate_package(PACKAGE_NAME OpenSSL-1.1.1b-rev2-windows TARGETS OpenSSL PACKAGE_HASH 9af1c50343f89146b4053101a7aeb20513319a3fe2f007e356d7ce25f9241040) ly_associate_package(PACKAGE_NAME Crashpad-0.8.0-rev1-windows TARGETS Crashpad PACKAGE_HASH d162aa3070147bc0130a44caab02c5fe58606910252caf7f90472bd48d4e31e2) ly_associate_package(PACKAGE_NAME zlib-1.2.11-rev5-windows TARGETS ZLIB PACKAGE_HASH 8847112429744eb11d92c44026fc5fc53caa4a06709382b5f13978f3c26c4cbd) ly_associate_package(PACKAGE_NAME squish-ccr-deb557d-rev1-windows TARGETS squish-ccr PACKAGE_HASH 5c3d9fa491e488ccaf802304ad23b932268a2b2846e383f088779962af2bfa84) -ly_associate_package(PACKAGE_NAME astc-encoder-3.2-rev1-windows TARGETS astc-encoder PACKAGE_HASH 3addc6fc1a7eb0d6b7f3d530e962af967e6d92b3825ef485da243346357cf78e) +ly_associate_package(PACKAGE_NAME astc-encoder-3.2-rev2-windows TARGETS astc-encoder PACKAGE_HASH 17249bfa438afb34e21449865d9c9297471174ae0cea9b2f9def2ee206038295) ly_associate_package(PACKAGE_NAME ISPCTexComp-36b80aa-rev1-windows TARGETS ISPCTexComp PACKAGE_HASH b6fa6ea28a2808a9a5524c72c37789c525925e435770f2d94eb2d387360fa2d0) ly_associate_package(PACKAGE_NAME lz4-1.9.3-vcpkg-rev4-windows TARGETS lz4 PACKAGE_HASH 4ea457b833cd8cfaf8e8e06ed6df601d3e6783b606bdbc44a677f77e19e0db16) ly_associate_package(PACKAGE_NAME azslc-1.7.34-rev1-windows TARGETS azslc PACKAGE_HASH 44eb2e0fc4b0f1c75d0fb6f24c93a5753655b84dbc3e6ad45389ed3b9cf7a4b0) diff --git a/cmake/3rdParty/Platform/iOS/BuiltInPackages_ios.cmake b/cmake/3rdParty/Platform/iOS/BuiltInPackages_ios.cmake index 8042c888c7..d8dd7e8134 100644 --- a/cmake/3rdParty/Platform/iOS/BuiltInPackages_ios.cmake +++ b/cmake/3rdParty/Platform/iOS/BuiltInPackages_ios.cmake @@ -14,14 +14,13 @@ ly_associate_package(PACKAGE_NAME cityhash-1.1-multiplatform TARGETS cit ly_associate_package(PACKAGE_NAME expat-2.1.0-multiplatform TARGETS expat PACKAGE_HASH 452256acd1fd699cef24162575b3524fccfb712f5321c83f1df1ce878de5b418) ly_associate_package(PACKAGE_NAME zstd-1.35-multiplatform TARGETS zstd PACKAGE_HASH 45d466c435f1095898578eedde85acf1fd27190e7ea99aeaa9acfd2f09e12665) ly_associate_package(PACKAGE_NAME glad-2.0.0-beta-rev2-multiplatform TARGETS glad PACKAGE_HASH ff97ee9664e97d0854b52a3734c2289329d9f2b4cd69478df6d0ca1f1c9392ee) -ly_associate_package(PACKAGE_NAME lux_core-2.2-rev5-multiplatform TARGETS lux_core PACKAGE_HASH c8c13cf7bc351643e1abd294d0841b24dee60e51647dff13db7aec396ad1e0b5) # platform-specific: ly_associate_package(PACKAGE_NAME tiff-4.2.0.15-rev3-ios TARGETS TIFF PACKAGE_HASH e9067e88649fb6e93a926d9ed38621a9fae360a2e6f6eb24ebca63c1bc7761ea) ly_associate_package(PACKAGE_NAME freetype-2.10.4.16-ios TARGETS freetype PACKAGE_HASH 3ac3c35e056ae4baec2e40caa023d76a7a3320895ef172b6655e9261b0dc2e29) ly_associate_package(PACKAGE_NAME AWSNativeSDK-1.7.167-rev4-ios TARGETS AWSNativeSDK PACKAGE_HASH d10e7496ca705577032821011beaf9f2507689f23817bfa0ed4d2a2758afcd02) ly_associate_package(PACKAGE_NAME Lua-5.3.5-rev5-ios TARGETS Lua PACKAGE_HASH c2d3c4e67046c293049292317a7d60fdb8f23effeea7136aefaef667163e5ffe) -ly_associate_package(PACKAGE_NAME PhysX-4.1.2.29882248-rev3-ios TARGETS PhysX PACKAGE_HASH b1bbc1fc068d2c6e1eb18eecd4e8b776adc516833e8da3dcb1970cef2a8f0cbd) +ly_associate_package(PACKAGE_NAME PhysX-4.1.2.29882248-rev5-ios TARGETS PhysX PACKAGE_HASH 4a5e38b385837248590018eb133444b4e440190414e6756191200a10c8fa5615) ly_associate_package(PACKAGE_NAME mikkelsen-1.0.0.4-ios TARGETS mikkelsen PACKAGE_HASH 976aaa3ccd8582346132a10af253822ccc5d5bcc9ea5ba44d27848f65ee88a8a) ly_associate_package(PACKAGE_NAME googletest-1.8.1-rev4-ios TARGETS googletest PACKAGE_HASH 2f121ad9784c0ab73dfaa58e1fee05440a82a07cc556bec162eeb407688111a7) ly_associate_package(PACKAGE_NAME googlebenchmark-1.5.0-rev2-ios TARGETS GoogleBenchmark PACKAGE_HASH c2ffaed2b658892b1bcf81dee4b44cd1cb09fc78d55584ef5cb8ab87f2d8d1ae) diff --git a/cmake/3rdPartyPackages.cmake b/cmake/3rdPartyPackages.cmake index efe67b4d24..a3f15bdb22 100644 --- a/cmake/3rdPartyPackages.cmake +++ b/cmake/3rdPartyPackages.cmake @@ -7,7 +7,7 @@ include_guard() -include(cmake/LySet.cmake) +include(${LY_ROOT_FOLDER}/cmake/LySet.cmake) # OVERVIEW: # this is the Open 3D Engine Package system. @@ -80,10 +80,7 @@ macro(ly_package_message) endif() endmacro() -file(MAKE_DIRECTORY ${CMAKE_BINARY_DIR}/packages) - -include(cmake/LYPackage_S3Downloader.cmake) - +include(${LY_ROOT_FOLDER}/cmake/LYPackage_S3Downloader.cmake) # Attempts one time to download a file. # sets should_retry to true if the caller should retry due to an intermittent problem @@ -711,11 +708,11 @@ if (NOT CMAKE_SCRIPT_MODE_FILE) # include the built in 3rd party packages that are for every platform. # you can put your package associations anywhere, but this provides # a good starting point. - include(cmake/3rdParty/BuiltInPackages.cmake) + include(${LY_ROOT_FOLDER}/cmake/3rdParty/BuiltInPackages.cmake) endif() if(PAL_TRAIT_BUILD_HOST_TOOLS) - include(cmake/LYWrappers.cmake) + include(${LY_ROOT_FOLDER}/cmake/LYWrappers.cmake) # Importing this globally to handle AUTOMOC, AUTOUIC, AUTORCC ly_parse_third_party_dependencies(3rdParty::Qt) endif() diff --git a/cmake/AzAutoGen.py b/cmake/AzAutoGen.py index 19b9711325..782419a6f2 100755 --- a/cmake/AzAutoGen.py +++ b/cmake/AzAutoGen.py @@ -287,8 +287,7 @@ def ProcessExpansionRule(sourceFiles, templateFiles, templateCache, outputDir, p else: # Process all matches in one batch # Due to the lack of wildcards in the output file, we've determined we'll glob all matching input files into the template conversion - for filename in fnmatch.filter(sourceFiles, inputFiles): - dataInputFiles = [os.path.abspath(file) for file in fnmatch.filter(sourceFiles, inputFiles)] + dataInputFiles = [os.path.abspath(file) for file in fnmatch.filter(sourceFiles, inputFiles)] outputFileAbsolute = outputFile.replace("$path", ComputeOutputPath(dataInputFiles, projectDir, outputDir)) outputFileAbsolute = SanitizePath(outputFileAbsolute) ProcessTemplateConversion(dataInputSet, dataInputFiles, templateFile, outputFileAbsolute, templateCache, dryrun, verbose) diff --git a/cmake/CommandExecution.cmake b/cmake/CommandExecution.cmake index 91f043ee9f..a8c21a22a2 100644 --- a/cmake/CommandExecution.cmake +++ b/cmake/CommandExecution.cmake @@ -38,13 +38,13 @@ endif() # Check for timestamp if(LY_TIMESTAMP_REFERENCE) - if(NOT EXISTS ${LY_TIMESTAMP_REFERENCE}) + if(NOT EXISTS "${LY_TIMESTAMP_REFERENCE}") message(FATAL_ERROR "File LY_TIMESTAMP_REFERENCE=${LY_TIMESTAMP_REFERENCE} does not exists") endif() if(NOT LY_TIMESTAMP_FILE) - set(LY_TIMESTAMP_FILE ${LY_TIMESTAMP_REFERENCE}.stamp) + set(LY_TIMESTAMP_FILE "${LY_TIMESTAMP_REFERENCE}.stamp") endif() - if(EXISTS ${LY_TIMESTAMP_FILE} AND NOT ${LY_TIMESTAMP_REFERENCE} IS_NEWER_THAN ${LY_TIMESTAMP_FILE}) + if(EXISTS "${LY_TIMESTAMP_FILE}" AND NOT "${LY_TIMESTAMP_REFERENCE}" IS_NEWER_THAN "${LY_TIMESTAMP_FILE}") # Stamp newer, nothing to do return() endif() @@ -52,7 +52,7 @@ endif() if(LY_LOCK_FILE) # Lock the file - file(LOCK ${LY_LOCK_FILE} TIMEOUT 1200 RESULT_VARIABLE lock_result) + file(LOCK "${LY_LOCK_FILE}" TIMEOUT 1200 RESULT_VARIABLE lock_result) if(NOT ${lock_result} EQUAL 0) message(FATAL_ERROR "Lock failure ${lock_result}") endif() @@ -83,5 +83,5 @@ endif() if(LY_TIMESTAMP_REFERENCE) # Touch the timestamp file - file(TOUCH ${LY_TIMESTAMP_FILE}) + file(TOUCH "${LY_TIMESTAMP_FILE}") endif() diff --git a/cmake/CompilerSettings.cmake b/cmake/CompilerSettings.cmake new file mode 100644 index 0000000000..60bda1d45b --- /dev/null +++ b/cmake/CompilerSettings.cmake @@ -0,0 +1,13 @@ +# +# Copyright (c) Contributors to the Open 3D Engine Project. +# For complete copyright and license terms please see the LICENSE at the root of this distribution. +# +# SPDX-License-Identifier: Apache-2.0 OR MIT +# +# + +# File to tweak compiler settings before compiler detection happens (before project() is called) +# We dont have PAL enabled at this point, so we can only use pure-CMake variables +if("${CMAKE_HOST_SYSTEM_NAME}" STREQUAL "Linux") + include(cmake/Platform/Linux/CompilerSettings_linux.cmake) +endif() diff --git a/cmake/Deployment.cmake b/cmake/Deployment.cmake index b6b7aa1869..1f6f2fc0f3 100644 --- a/cmake/Deployment.cmake +++ b/cmake/Deployment.cmake @@ -10,5 +10,3 @@ set(LY_ASSET_DEPLOY_MODE "LOOSE" CACHE STRING "Set the Asset deployment when deploying to the target platform (LOOSE, PAK, VFS)") set(LY_ASSET_OVERRIDE_PAK_FOLDER_ROOT "" CACHE STRING "Optional root path to where Pak file folders are stored. By default, blank will use a predefined 'paks' root.") - - diff --git a/cmake/LYTestWrappers.cmake b/cmake/LYTestWrappers.cmake index 9b139645fb..03146b6045 100644 --- a/cmake/LYTestWrappers.cmake +++ b/cmake/LYTestWrappers.cmake @@ -32,6 +32,7 @@ endif() # Set and create folders for PyTest and GTest xml output ly_set(PYTEST_XML_OUTPUT_DIR ${CMAKE_BINARY_DIR}/Testing/Pytest) ly_set(GTEST_XML_OUTPUT_DIR ${CMAKE_BINARY_DIR}/Testing/Gtest) +ly_set(LYTESTTOOLS_OUTPUT_DIR ${CMAKE_BINARY_DIR}/Testing/LyTestTools) file(MAKE_DIRECTORY ${PYTEST_XML_OUTPUT_DIR}) file(MAKE_DIRECTORY ${GTEST_XML_OUTPUT_DIR}) @@ -309,6 +310,7 @@ function(ly_add_pytest) endif() string(REPLACE "::" "_" pytest_report_directory "${PYTEST_XML_OUTPUT_DIR}/${ly_add_pytest_NAME}.xml") + string(REPLACE "::" "_" pytest_output_directory "${LYTESTTOOLS_OUTPUT_DIR}/${ly_add_pytest_NAME}") # Add the script path to the test target params set(LY_TEST_PARAMS "${ly_add_pytest_PATH}") @@ -318,7 +320,7 @@ function(ly_add_pytest) PARENT_NAME ${ly_add_pytest_NAME} TEST_SUITE ${ly_add_pytest_TEST_SUITE} LABELS FRAMEWORK_pytest - TEST_COMMAND ${LY_PYTEST_EXECUTABLE} ${ly_add_pytest_PATH} ${ly_add_pytest_EXTRA_ARGS} --junitxml=${pytest_report_directory} ${custom_marks_args} + TEST_COMMAND ${LY_PYTEST_EXECUTABLE} ${ly_add_pytest_PATH} ${ly_add_pytest_EXTRA_ARGS} --output-path ${pytest_output_directory} --junitxml=${pytest_report_directory} ${custom_marks_args} TEST_LIBRARY pytest COMPONENT ${ly_add_pytest_COMPONENT} ${ly_add_pytest_UNPARSED_ARGUMENTS} diff --git a/cmake/LYWrappers.cmake b/cmake/LYWrappers.cmake index 0416d41ece..d4bf1d7423 100644 --- a/cmake/LYWrappers.cmake +++ b/cmake/LYWrappers.cmake @@ -354,7 +354,7 @@ function(ly_add_target) # of running the copy of runtime dependencies, the stamp file is touched so the timestamp is updated. # Adding a config as part of the name since the stamp file is added to the VS project. # Note the STAMP_OUTPUT_FILE need to match with the one used in runtime dependencies (e.g. RuntimeDependencies_common.cmake) - set(STAMP_OUTPUT_FILE ${CMAKE_BINARY_DIR}/runtime_dependencies/$/${ly_add_target_NAME}_$.stamp) + set(STAMP_OUTPUT_FILE ${CMAKE_BINARY_DIR}/runtime_dependencies/$/${ly_add_target_NAME}.stamp) add_custom_command( OUTPUT ${STAMP_OUTPUT_FILE} DEPENDS "$>" @@ -367,7 +367,7 @@ function(ly_add_target) # stamp file on each configuration so it gets properly excluded by the generator unset(stamp_files_per_config) foreach(conf IN LISTS CMAKE_CONFIGURATION_TYPES) - set(stamp_file_conf ${CMAKE_BINARY_DIR}/runtime_dependencies/${conf}/${ly_add_target_NAME}_${conf}.stamp) + set(stamp_file_conf ${CMAKE_BINARY_DIR}/runtime_dependencies/${conf}/${ly_add_target_NAME}.stamp) set_source_files_properties(${stamp_file_conf} PROPERTIES GENERATED TRUE SKIP_AUTOGEN TRUE) list(APPEND stamp_files_per_config $<$:${stamp_file_conf}>) endforeach() @@ -653,36 +653,6 @@ function(ly_add_source_properties) endfunction() -#! ly_project_add_subdirectory: calls add_subdirectory() if the project name is in the project list -# -# This can be useful when including subdirs in the restricted folder only if the project is in the project list -# If you give it a second parameter it will add_subdirectory using that instead, if the project is in the project list -# -# add_subdirectory(AutomatedTesting) if Automatedtesting is in the project list -# EX. ly_project_add_subdirectory(AutomatedTesting) -# -# add_subdirectory(SamplesProject) if Automatedtesting is in the project list -# EX. ly_project_add_subdirectory(AutomatedTesting SamplesProject) -# -# \arg:project_name the name of the project that may be enabled -# \arg:binary_project_dir optional, if supplied that binary_project_dir will be added when project name is enabled. -# -function(ly_project_add_subdirectory project_name) - if(${project_name} IN_LIST LY_PROJECTS) - if(ARGC GREATER 1) - list(GET ARGN 0 subdir) - endif() - if(ARGC GREATER 2) - list(GET ARGN 1 binary_project_dir) - endif() - if(subdir) - add_subdirectory(${subdir} ${binary_project_dir}) - else() - add_subdirectory(${project_name} ${binary_project_dir}) - endif() - endif() -endfunction() - # given a target name, returns the "real" name of the target if its an alias. # this function recursively de-aliases function(ly_de_alias_target target_name output_variable_name) diff --git a/cmake/Monolithic.cmake b/cmake/Monolithic.cmake index 1e121c2b20..2310d8d0d7 100644 --- a/cmake/Monolithic.cmake +++ b/cmake/Monolithic.cmake @@ -16,7 +16,6 @@ if(LY_MONOLITHIC_GAME) ly_set(PAL_TRAIT_BUILD_HOST_TOOLS FALSE) ly_set(PAL_TRAIT_BUILD_HOST_GUI_TOOLS FALSE) ly_set(PAL_TRAIT_BUILD_TESTS_SUPPORTED FALSE) - ly_set(PAL_TRAIT_BUILD_SERVER_SUPPORTED FALSE) else() ly_set(PAL_TRAIT_MONOLITHIC_DRIVEN_LIBRARY_TYPE SHARED) ly_set(PAL_TRAIT_MONOLITHIC_DRIVEN_MODULE_TYPE GEM_MODULE) diff --git a/cmake/Packaging.cmake b/cmake/Packaging.cmake index 6a1e2d8cef..ecef5261b1 100644 --- a/cmake/Packaging.cmake +++ b/cmake/Packaging.cmake @@ -24,18 +24,23 @@ number will automatically appended as '/'. If LY_INSTALLER_AUTO_ full URL format will be: //" ) -set(LY_INSTALLER_UPLOAD_URL "" CACHE STRING -"Base URL used to upload the installer artifacts after generation, the host target and version number \ -will automatically appended as '/'. If LY_INSTALLER_AUTO_GEN_TAG is set, the full URL \ -format will be: //. Can also be set via LY_INSTALLER_UPLOAD_URL environment \ -variable. Currently only accepts S3 URLs e.g. s3:///" +set(CPACK_UPLOAD_URL "" CACHE STRING +"URL used to upload the installer artifacts after generation, the host target and version number \ +will automatically appended as '/'. If LY_INSTALLER_AUTO_GEN_TAG is set, the full URL \ +format will be: //. Currently only accepts S3 URLs e.g. s3:///" ) -set(LY_INSTALLER_AWS_PROFILE "" CACHE STRING -"AWS CLI profile for uploading artifacts. Can also be set via LY_INSTALLER_AWS_PROFILE environment variable." +set(CPACK_AWS_PROFILE "" CACHE STRING +"AWS CLI profile for uploading artifacts." ) +set(CPACK_THREADS 0) set(CPACK_DESIRED_CMAKE_VERSION 3.20.2) +if(${CPACK_DESIRED_CMAKE_VERSION} VERSION_LESS ${CMAKE_MINIMUM_REQUIRED_VERSION}) + message(FATAL_ERROR + "The desired version of CMake to be included in the package is " + "below the minimum required version of CMake to run") +endif() # set all common cpack variable overrides first so they can be accessible via configure_file # when the platform specific settings are applied below. additionally, any variable with @@ -44,15 +49,16 @@ set(CPACK_DESIRED_CMAKE_VERSION 3.20.2) set(CPACK_PACKAGE_NAME "${PROJECT_NAME}") set(CPACK_PACKAGE_FULL_NAME "Open3D Engine") set(CPACK_PACKAGE_VENDOR "O3DE Binary Project a Series of LF Projects, LLC") +set(CPACK_PACKAGE_CONTACT "info@o3debinaries.org") set(CPACK_PACKAGE_VERSION "${LY_VERSION_STRING}") set(CPACK_PACKAGE_DESCRIPTION_SUMMARY "Installation Tool") string(TOLOWER "${CPACK_PACKAGE_NAME}_${CPACK_PACKAGE_VERSION}" CPACK_PACKAGE_FILE_NAME) set(DEFAULT_LICENSE_NAME "Apache-2.0") -set(DEFAULT_LICENSE_FILE "${CMAKE_CURRENT_SOURCE_DIR}/LICENSE.txt") -set(CPACK_RESOURCE_FILE_LICENSE ${DEFAULT_LICENSE_FILE}) +set(CPACK_RESOURCE_FILE_LICENSE "${CMAKE_CURRENT_SOURCE_DIR}/LICENSE.txt") +set(CPACK_RESOURCE_FILE_README "${CMAKE_CURRENT_SOURCE_DIR}/README.md") set(CPACK_LICENSE_URL ${LY_INSTALLER_LICENSE_URL}) set(CPACK_PACKAGE_INSTALL_DIRECTORY "${CPACK_PACKAGE_NAME}/${CPACK_PACKAGE_VERSION}") @@ -60,6 +66,7 @@ set(CPACK_PACKAGE_INSTALL_DIRECTORY "${CPACK_PACKAGE_NAME}/${CPACK_PACKAGE_VERSI # neither of the SOURCE_DIR variables equate to anything during execution of pre/post build scripts set(CPACK_SOURCE_DIR ${CMAKE_CURRENT_SOURCE_DIR}/cmake) set(CPACK_BINARY_DIR ${CMAKE_BINARY_DIR}/_CPack) # to match other CPack out dirs +set(CPACK_OUTPUT_FILE_PREFIX CPackUploads) # this config file allows the dynamic setting of cpack variables at cpack-time instead of cmake configure set(CPACK_PROJECT_CONFIG_FILE ${CPACK_SOURCE_DIR}/PackagingConfig.cmake) @@ -74,132 +81,55 @@ if(NOT CPACK_GENERATOR) return() endif() -if(${CPACK_DESIRED_CMAKE_VERSION} VERSION_LESS ${CMAKE_MINIMUM_REQUIRED_VERSION}) - message(FATAL_ERROR - "The desired version of CMake to be included in the package is " - "below the minimum required version of CMake to run") -endif() - -# pull down the desired copy of CMake so it can be included in the package +# We will download the desired copy of CMake so it can be included in the package, we defer the downloading +# to the install process, to do so we generate a script that will perform the download and execute such script +# during the install process (before packaging) if(NOT (CPACK_CMAKE_PACKAGE_FILE AND CPACK_CMAKE_PACKAGE_HASH)) message(FATAL_ERROR "Packaging is missing one or more following properties required to include CMake: " " CPACK_CMAKE_PACKAGE_FILE, CPACK_CMAKE_PACKAGE_HASH") endif() -set(_cmake_package_dest ${CPACK_BINARY_DIR}/${CPACK_CMAKE_PACKAGE_FILE}) +# We download it to a different location because CPACK_PACKAGING_INSTALL_PREFIX will be removed during +# cpack generation. CPACK_BINARY_DIR persists across cpack invocations +set(LY_CMAKE_PACKAGE_DOWNLOAD_PATH ${CPACK_BINARY_DIR}/${CPACK_CMAKE_PACKAGE_FILE}) -if(EXISTS ${_cmake_package_dest}) - file(SHA256 ${_cmake_package_dest} hash_of_downloaded_file) - if (NOT "${hash_of_downloaded_file}" STREQUAL "${CPACK_CMAKE_PACKAGE_HASH}") - message(STATUS "CMake ${CPACK_DESIRED_CMAKE_VERSION} found at ${_cmake_package_dest} but expected hash missmatches, re-downloading...") - file(REMOVE ${_cmake_package_dest}) - else() - message(STATUS "CMake ${CPACK_DESIRED_CMAKE_VERSION} found") - endif() -endif() -if(NOT EXISTS ${_cmake_package_dest}) - # download it - string(REPLACE "." ";" _version_componets "${CPACK_DESIRED_CMAKE_VERSION}") - list(GET _version_componets 0 _major_version) - list(GET _version_componets 1 _minor_version) +# Scan the source and 3p packages for licenses, then add the generated license results to the binary output folder. +# These results will be installed to the root of the install folder and copied to the S3 bucket specific to each platform +set(CPACK_3P_LICENSE_FILE "${CPACK_BINARY_DIR}/NOTICES.txt") +set(CPACK_3P_MANIFEST_FILE "${CPACK_BINARY_DIR}/SPDX-License.json") - set(_url_version_tag "v${_major_version}.${_minor_version}") - set(_package_url "https://cmake.org/files/${_url_version_tag}/${CPACK_CMAKE_PACKAGE_FILE}") - - message(STATUS "Downloading CMake ${CPACK_DESIRED_CMAKE_VERSION} for packaging...") - download_file( - URL ${_package_url} - TARGET_FILE ${_cmake_package_dest} - EXPECTED_HASH ${CPACK_CMAKE_PACKAGE_HASH} - RESULTS _results - ) - list(GET _results 0 _status_code) - - if (${_status_code} EQUAL 0 AND EXISTS ${_cmake_package_dest}) - message(STATUS "CMake ${CPACK_DESIRED_CMAKE_VERSION} found") - else() - file(REMOVE ${_cmake_package_dest}) - list(REMOVE_AT _results 0) - - set(_error_message "An error occurred, code ${_status_code}. URL ${_package_url} - ${_results}") - - if(${_status_code} EQUAL 1) - string(APPEND _error_message - " Please double check the CPACK_CMAKE_PACKAGE_FILE and " - "CPACK_CMAKE_PACKAGE_HASH properties before trying again.") - endif() - - message(FATAL_ERROR ${_error_message}) - endif() -endif() - -ly_install(FILES ${_cmake_package_dest} - DESTINATION ./Tools/Redistributables/CMake +configure_file(${LY_ROOT_FOLDER}/cmake/Packaging/LicenseScan.cmake.in + ${CPACK_BINARY_DIR}/LicenseScan.cmake + @ONLY +) +ly_install(SCRIPT ${CPACK_BINARY_DIR}/LicenseScan.cmake + COMPONENT ${CMAKE_INSTALL_DEFAULT_COMPONENT_NAME} +) +ly_install(FILES ${CPACK_3P_LICENSE_FILE} ${CPACK_3P_MANIFEST_FILE} + DESTINATION . COMPONENT ${CMAKE_INSTALL_DEFAULT_COMPONENT_NAME} ) -# the version string and git tags are intended to be synchronized so it should be safe to use that instead -# of directly calling into git which could get messy in certain scenarios -if(${CPACK_PACKAGE_VERSION} VERSION_GREATER "0.0.0.0") - set(_3rd_party_license_filename NOTICES.txt) +configure_file(${LY_ROOT_FOLDER}/cmake/Packaging/CMakeDownload.cmake.in + ${CPACK_BINARY_DIR}/CMakeDownload.cmake + @ONLY +) +ly_install(SCRIPT ${CPACK_BINARY_DIR}/CMakeDownload.cmake + COMPONENT ${CMAKE_INSTALL_DEFAULT_COMPONENT_NAME} +) +ly_install(FILES ${LY_CMAKE_PACKAGE_DOWNLOAD_PATH} + DESTINATION Tools/Redistributables/CMake + COMPONENT ${CMAKE_INSTALL_DEFAULT_COMPONENT_NAME} +) - set(_3rd_party_license_url "https://raw.githubusercontent.com/o3de/3p-package-source/${CPACK_PACKAGE_VERSION}/${_3rd_party_license_filename}") - set(_3rd_party_license_dest ${CPACK_BINARY_DIR}/${_3rd_party_license_filename}) - - # use the plain file downloader as we don't have the file hash available and using a dummy will - # delete the file once it fails hash verification - file(DOWNLOAD - ${_3rd_party_license_url} - ${_3rd_party_license_dest} - STATUS _status - TLS_VERIFY ON - ) - list(POP_FRONT _status _status_code) - - if (${_status_code} EQUAL 0 AND EXISTS ${_3rd_party_license_dest}) - ly_install(FILES ${_3rd_party_license_dest} - DESTINATION . - COMPONENT ${CMAKE_INSTALL_DEFAULT_COMPONENT_NAME} - ) - else() - file(REMOVE ${_3rd_party_license_dest}) - message(FATAL_ERROR "Failed to acquire the 3rd Party license manifest file at ${_3rd_party_license_url}. Error: ${_status}") - endif() -endif() - -# checks for and removes trailing slash -function(strip_trailing_slash in_url out_url) - string(LENGTH ${in_url} _url_length) - MATH(EXPR _url_length "${_url_length}-1") - - string(SUBSTRING ${in_url} 0 ${_url_length} _clean_url) - if("${in_url}" STREQUAL "${_clean_url}/") - set(${out_url} ${_clean_url} PARENT_SCOPE) - else() - set(${out_url} ${in_url} PARENT_SCOPE) - endif() -endfunction() - -if(NOT LY_INSTALLER_UPLOAD_URL AND DEFINED ENV{LY_INSTALLER_UPLOAD_URL}) - set(LY_INSTALLER_UPLOAD_URL $ENV{LY_INSTALLER_UPLOAD_URL}) -endif() - -if(LY_INSTALLER_UPLOAD_URL) - ly_is_s3_url(${LY_INSTALLER_UPLOAD_URL} _is_s3_bucket) - if(NOT _is_s3_bucket) - message(FATAL_ERROR "Only S3 installer uploading is supported at this time") - endif() - - if (LY_INSTALLER_AWS_PROFILE) - set(CPACK_AWS_PROFILE ${LY_INSTALLER_AWS_PROFILE}) - elseif (DEFINED ENV{LY_INSTALLER_AWS_PROFILE}) - set(CPACK_AWS_PROFILE $ENV{LY_INSTALLER_AWS_PROFILE}) - endif() - - strip_trailing_slash(${LY_INSTALLER_UPLOAD_URL} LY_INSTALLER_UPLOAD_URL) - set(CPACK_UPLOAD_URL ${LY_INSTALLER_UPLOAD_URL}) -endif() +# Set common CPACK variables to all platforms/generators +set(CPACK_STRIP_FILES TRUE) # always strip symbols on packaging +set(CPACK_PACKAGE_CHECKSUM SHA256) # Generate checksum file +set(CPACK_PRE_BUILD_SCRIPTS ${pal_dir}/PackagingPreBuild_${PAL_HOST_PLATFORM_NAME_LOWERCASE}.cmake) +set(CPACK_POST_BUILD_SCRIPTS ${pal_dir}/PackagingPostBuild_${PAL_HOST_PLATFORM_NAME_LOWERCASE}.cmake) +set(CPACK_CODESIGN_SCRIPT ${pal_dir}/PackagingCodeSign_${PAL_HOST_PLATFORM_NAME_LOWERCASE}.cmake) +set(CPACK_LY_PYTHON_CMD ${LY_PYTHON_CMD}) # IMPORTANT: required to be included AFTER setting all property overrides include(CPack REQUIRED) @@ -268,13 +198,26 @@ foreach(external_dir ${LY_INSTALL_EXTERNAL_BUILD_DIRS}) ) endforeach() +# checks for and removes trailing slash +function(strip_trailing_slash in_url out_url) + string(LENGTH ${in_url} _url_length) + MATH(EXPR _url_length "${_url_length}-1") + + string(SUBSTRING ${in_url} 0 ${_url_length} _clean_url) + if("${in_url}" STREQUAL "${_clean_url}/") + set(${out_url} ${_clean_url} PARENT_SCOPE) + else() + set(${out_url} ${in_url} PARENT_SCOPE) + endif() +endfunction() + if(LY_INSTALLER_DOWNLOAD_URL) strip_trailing_slash(${LY_INSTALLER_DOWNLOAD_URL} LY_INSTALLER_DOWNLOAD_URL) # this will set the following variables: CPACK_DOWNLOAD_SITE, CPACK_DOWNLOAD_ALL, and CPACK_UPLOAD_DIRECTORY (local) cpack_configure_downloads( ${LY_INSTALLER_DOWNLOAD_URL} - UPLOAD_DIRECTORY ${CMAKE_BINARY_DIR}/_CPack_Uploads # to match the _CPack_Packages directory + UPLOAD_DIRECTORY ${CMAKE_BINARY_DIR}/CPackUploads # to match the _CPack_Packages directory ALL ) endif() diff --git a/cmake/Packaging/CMakeDownload.cmake.in b/cmake/Packaging/CMakeDownload.cmake.in new file mode 100644 index 0000000000..e84611b354 --- /dev/null +++ b/cmake/Packaging/CMakeDownload.cmake.in @@ -0,0 +1,54 @@ +# +# Copyright (c) Contributors to the Open 3D Engine Project. +# For complete copyright and license terms please see the LICENSE at the root of this distribution. +# +# SPDX-License-Identifier: Apache-2.0 OR MIT +# +# + +set(LY_ROOT_FOLDER "@LY_ROOT_FOLDER@") +set(CMAKE_SCRIPT_MODE_FILE TRUE) +include(@LY_ROOT_FOLDER@/cmake/3rdPartyPackages.cmake) + +if(EXISTS "@LY_CMAKE_PACKAGE_DOWNLOAD_PATH@") + file(SHA256 "@LY_CMAKE_PACKAGE_DOWNLOAD_PATH@" hash_of_downloaded_file) + if (NOT "${hash_of_downloaded_file}" STREQUAL "@CPACK_CMAKE_PACKAGE_HASH@") + message(STATUS "CMake @CPACK_DESIRED_CMAKE_VERSION@ found at @LY_CMAKE_PACKAGE_DOWNLOAD_PATH@ but expected hash missmatches, re-downloading...") + file(REMOVE "@LY_CMAKE_PACKAGE_DOWNLOAD_PATH@") + else() + message(STATUS "CMake @CPACK_DESIRED_CMAKE_VERSION@ found") + endif() +endif() +if(NOT EXISTS "@LY_CMAKE_PACKAGE_DOWNLOAD_PATH@") + # download it + string(REPLACE "." ";" _version_components "@CPACK_DESIRED_CMAKE_VERSION@") + list(GET _version_components 0 _major_version) + list(GET _version_components 1 _minor_version) + + set(_url_version_tag "v${_major_version}.${_minor_version}") + set(_package_url "https://cmake.org/files/${_url_version_tag}/@CPACK_CMAKE_PACKAGE_FILE@") + + message(STATUS "Downloading CMake @CPACK_DESIRED_CMAKE_VERSION@ for packaging...") + download_file( + URL ${_package_url} + TARGET_FILE @LY_CMAKE_PACKAGE_DOWNLOAD_PATH@ + EXPECTED_HASH @CPACK_CMAKE_PACKAGE_HASH@ + RESULTS _results + ) + list(GET _results 0 _status_code) + + if (${_status_code} EQUAL 0 AND EXISTS "@LY_CMAKE_PACKAGE_DOWNLOAD_PATH@") + message(STATUS "CMake @CPACK_DESIRED_CMAKE_VERSION@ found") + else() + file(REMOVE "@LY_CMAKE_PACKAGE_DOWNLOAD_PATH@") + list(REMOVE_AT _results 0) + + set(_error_message "An error occurred, code ${_status_code}. URL ${_package_url} - ${_results}") + if(${_status_code} EQUAL 1) + string(APPEND _error_message + " Please double check the CPACK_CMAKE_PACKAGE_FILE and " + "CPACK_CMAKE_PACKAGE_HASH properties before trying again.") + endif() + message(FATAL_ERROR ${_error_message}) + endif() +endif() diff --git a/cmake/Packaging/LicenseScan.cmake.in b/cmake/Packaging/LicenseScan.cmake.in new file mode 100644 index 0000000000..314d5729c2 --- /dev/null +++ b/cmake/Packaging/LicenseScan.cmake.in @@ -0,0 +1,38 @@ +# +# Copyright (c) Contributors to the Open 3D Engine Project. +# For complete copyright and license terms please see the LICENSE at the root of this distribution. +# +# SPDX-License-Identifier: Apache-2.0 OR MIT +# +# + +set(LY_ROOT_FOLDER "@LY_ROOT_FOLDER@") +set(CMAKE_SCRIPT_MODE_FILE TRUE) + +# Scan the engine and 3rd Party folders for licenses +cmake_path(SET _license_script_path "@LY_ROOT_FOLDER@/scripts/license_scanner") +cmake_path(SET _license_script "${_license_script_path}/license_scanner.py") +cmake_path(SET _license_config "${_license_script_path}/scanner_config.json") + +set(_license_scan_path "@LY_ROOT_FOLDER@" "@LY_PACKAGE_UNPACK_LOCATION@") +set(_license_command + @LY_PYTHON_CMD@ -s + -u ${_license_script} + --config-file ${_license_config} + --license-file-path @CPACK_3P_LICENSE_FILE@ + --package-file-path @CPACK_3P_MANIFEST_FILE@ +) + +message("Scanning ${_license_scan_path} for package licenses") + +execute_process( + COMMAND ${_license_command} --scan-path ${_license_scan_path} + RESULT_VARIABLE _license_result + ERROR_VARIABLE _license_errors + OUTPUT_VARIABLE _license_output + ECHO_OUTPUT_VARIABLE +) + +if(NOT ${_license_result} EQUAL 0) + message(FATAL_ERROR "An error occurred during license scan. ${_license_errors}") +endif() diff --git a/cmake/Platform/Android/Configurations_android.cmake b/cmake/Platform/Android/Configurations_android.cmake index 69c481b50a..239d13e982 100644 --- a/cmake/Platform/Android/Configurations_android.cmake +++ b/cmake/Platform/Android/Configurations_android.cmake @@ -12,6 +12,11 @@ if(CMAKE_CXX_COMPILER_ID STREQUAL "Clang") include(cmake/Platform/Common/Configurations_common.cmake) include(cmake/Platform/Common/Clang/Configurations_clang.cmake) + set(_android_api_define) + if(${LY_TOOLCHAIN_NDK_PKG_MAJOR} VERSION_LESS "23") + set(_android_api_define __ANDROID_API__=${LY_TOOLCHAIN_NDK_API_LEVEL}) + endif() + ly_append_configurations_options( DEFINES LINUX64 @@ -22,9 +27,9 @@ if(CMAKE_CXX_COMPILER_ID STREQUAL "Clang") MOBILE _HAS_C9X ENABLE_TYPE_INFO - __ANDROID_API__=${LY_TOOLCHAIN_NDK_API_LEVEL} NDK_REV_MAJOR=${LY_TOOLCHAIN_NDK_PKG_MAJOR} NDK_REV_MINOR=${LY_TOOLCHAIN_NDK_PKG_MINOR} + ${_android_api_define} COMPILATION -femulated-tls # All accesses to TLS variables are converted to calls to __emutls_get_address in the runtime library diff --git a/cmake/Platform/Android/Toolchain_android.cmake b/cmake/Platform/Android/Toolchain_android.cmake index aff5c6faf8..75ff4554fd 100644 --- a/cmake/Platform/Android/Toolchain_android.cmake +++ b/cmake/Platform/Android/Toolchain_android.cmake @@ -11,10 +11,14 @@ if(LY_TOOLCHAIN_NDK_API_LEVEL) endif() # Verify that the NDK environment is set and points to the support NDK - +if(NOT ${LY_NDK_DIR}) + if($ENV{LY_NDK_DIR}) + set(LY_NDK_DIR $ENV{LY_NDK_DIR}) + endif() +endif() file(TO_CMAKE_PATH "${LY_NDK_DIR}" LY_NDK_DIR) if(NOT LY_NDK_DIR) - message(FATAL_ERROR "Environment var for NDK is empty. Could not find the NDK installation folder") + message(FATAL_ERROR "Environment and cache var for NDK is empty. Could not find the NDK installation folder") endif() set(LY_ANDROID_NDK_TOOLCHAIN ${LY_NDK_DIR}/build/cmake/android.toolchain.cmake) @@ -27,11 +31,10 @@ endif() if(NOT ANDROID_ABI) set(ANDROID_ABI arm64-v8a) endif() -if(NOT ANDROID_ARM_MODE) - set(ANDROID_ARM_MODE arm) -endif() -if(NOT ANDROID_ARM_NEON) - set(ANDROID_ARM_NEON FALSE) + +# Only the 64-bit ANDROID ABIs arm supported +if(NOT ANDROID_ABI MATCHES "^arm64-") + message(FATAL_ERROR "Only the 64-bit ANDROID_ABI's are supported. arm64-v8a can be used if not set") endif() if(NOT ANDROID_NATIVE_API_LEVEL) set(ANDROID_NATIVE_API_LEVEL 21) diff --git a/cmake/Platform/Common/Install_common.cmake b/cmake/Platform/Common/Install_common.cmake index 2960a99c64..46130f1345 100644 --- a/cmake/Platform/Common/Install_common.cmake +++ b/cmake/Platform/Common/Install_common.cmake @@ -202,18 +202,16 @@ function(ly_setup_target OUTPUT_CONFIGURED_TARGET ALIAS_TARGET_NAME absolute_tar endforeach() list(JOIN INCLUDE_DIRECTORIES_PLACEHOLDER "\n" INCLUDE_DIRECTORIES_PLACEHOLDER) - string(REPEAT " " 8 PLACEHOLDER_INDENT) - get_target_property(RUNTIME_DEPENDENCIES_PLACEHOLDER ${TARGET_NAME} MANUALLY_ADDED_DEPENDENCIES) - if(RUNTIME_DEPENDENCIES_PLACEHOLDER) # not found properties return the name of the variable with a "-NOTFOUND" at the end, here we set it to empty if not found - set(RUNTIME_DEPENDENCIES_PLACEHOLDER "${PLACEHOLDER_INDENT}${RUNTIME_DEPENDENCIES_PLACEHOLDER}") - list(JOIN RUNTIME_DEPENDENCIES_PLACEHOLDER "\n${PLACEHOLDER_INDENT}" RUNTIME_DEPENDENCIES_PLACEHOLDER) - else() - unset(RUNTIME_DEPENDENCIES_PLACEHOLDER) - endif() - string(REPEAT " " 12 PLACEHOLDER_INDENT) get_property(interface_build_dependencies_props TARGET ${TARGET_NAME} PROPERTY LY_DELAYED_LINK) unset(INTERFACE_BUILD_DEPENDENCIES_PLACEHOLDER) + # We can have private build dependencies that contains direct or indirect runtime dependencies. + # Since imported targets cannot contain build dependencies, we need another way to propagate the runtime dependencies. + # We dont want to put such dependencies in the interface because a user can mistakenly use a symbol that is not available + # when using the engine from source (and that the author of the target didn't want to set public). + # To overcome this, we will actually expose the private build dependencies as runtime dependencies. Our runtime dependency + # algorithm will walk recursively also through static libraries and will only copy binaries to the output. + unset(RUNTIME_DEPENDENCIES_PLACEHOLDER) if(interface_build_dependencies_props) cmake_parse_arguments(build_deps "" "" "PRIVATE;PUBLIC;INTERFACE" ${interface_build_dependencies_props}) # Interface and public dependencies should always be exposed @@ -226,6 +224,14 @@ function(ly_setup_target OUTPUT_CONFIGURED_TARGET ALIAS_TARGET_NAME absolute_tar if("${target_type}" STREQUAL "STATIC_LIBRARY") set(build_deps_target "${build_deps_target};${build_deps_PRIVATE}") endif() + + # But we will also pass the private dependencies as runtime dependencies (as long as they are targets, note the comment above) + foreach(build_dep_private IN LISTS build_deps_PRIVATE) + if(TARGET ${build_dep_private}) + list(APPEND RUNTIME_DEPENDENCIES_PLACEHOLDER "${build_dep_private}") + endif() + endforeach() + foreach(build_dependency IN LISTS build_deps_target) # Skip wrapping produced when targets are not created in the same directory if(build_dependency) @@ -235,6 +241,18 @@ function(ly_setup_target OUTPUT_CONFIGURED_TARGET ALIAS_TARGET_NAME absolute_tar endif() list(JOIN INTERFACE_BUILD_DEPENDENCIES_PLACEHOLDER "\n" INTERFACE_BUILD_DEPENDENCIES_PLACEHOLDER) + string(REPEAT " " 8 PLACEHOLDER_INDENT) + get_target_property(manually_added_dependencies ${TARGET_NAME} MANUALLY_ADDED_DEPENDENCIES) + if(manually_added_dependencies) # not found properties return the name of the variable with a "-NOTFOUND" at the end, here we set it to empty if not found + list(APPEND RUNTIME_DEPENDENCIES_PLACEHOLDER ${manually_added_dependencies}) + endif() + if(RUNTIME_DEPENDENCIES_PLACEHOLDER) + set(RUNTIME_DEPENDENCIES_PLACEHOLDER "${PLACEHOLDER_INDENT}${RUNTIME_DEPENDENCIES_PLACEHOLDER}") + list(JOIN RUNTIME_DEPENDENCIES_PLACEHOLDER "\n${PLACEHOLDER_INDENT}" RUNTIME_DEPENDENCIES_PLACEHOLDER) + else() + unset(RUNTIME_DEPENDENCIES_PLACEHOLDER) + endif() + string(REPEAT " " 8 PLACEHOLDER_INDENT) # If a target has an LY_PROJECT_NAME property, forward that property to new target get_target_property(target_project_association ${TARGET_NAME} LY_PROJECT_NAME) @@ -477,26 +495,52 @@ function(ly_setup_cmake_install) COMPONENT ${CMAKE_INSTALL_DEFAULT_COMPONENT_NAME} ) - # Findo3de.cmake file: we generate a different Findo3de.camke file than the one we have in cmake. This one is going to expose all - # targets that are pre-built - unset(FIND_PACKAGES_PLACEHOLDER) - - # Add to the FIND_PACKAGES_PLACEHOLDER all directories in which ly_add_target were called in - get_property(all_subdirectories GLOBAL PROPERTY LY_ALL_TARGET_DIRECTORIES) - foreach(target_subdirectory IN LISTS all_subdirectories) - cmake_path(RELATIVE_PATH target_subdirectory BASE_DIRECTORY ${LY_ROOT_FOLDER} OUTPUT_VARIABLE relative_target_subdirectory) - string(APPEND FIND_PACKAGES_PLACEHOLDER " add_subdirectory(${relative_target_subdirectory})\n") - endforeach() - + # Findo3de.cmake file: we generate a different Findo3de.cmake file than the one we have in the source dir. configure_file(${LY_ROOT_FOLDER}/cmake/install/Findo3de.cmake.in ${CMAKE_CURRENT_BINARY_DIR}/cmake/Findo3de.cmake @ONLY) ly_install(FILES "${CMAKE_CURRENT_BINARY_DIR}/cmake/Findo3de.cmake" DESTINATION cmake COMPONENT ${CMAKE_INSTALL_DEFAULT_COMPONENT_NAME} ) - # BuiltInPackage_.cmake: since associations could happen in any cmake file across the engine. We collect - # all the associations in ly_associate_package and then generate them into BuiltInPackages_.cmake. This - # will consolidate all associations in one file + unset(find_subdirectories) + # Add to find_subdirectories all directories in which ly_add_target were called in + get_property(all_subdirectories GLOBAL PROPERTY LY_ALL_TARGET_DIRECTORIES) + foreach(target_subdirectory IN LISTS all_subdirectories) + cmake_path(RELATIVE_PATH target_subdirectory BASE_DIRECTORY ${LY_ROOT_FOLDER} OUTPUT_VARIABLE relative_target_subdirectory) + string(APPEND find_subdirectories "add_subdirectory(${relative_target_subdirectory})\n") + endforeach() + set(permutation_find_subdirectories ${CMAKE_CURRENT_BINARY_DIR}/cmake/Platform/${PAL_PLATFORM_NAME}/${LY_BUILD_PERMUTATION}/o3de_subdirectories_${PAL_PLATFORM_NAME_LOWERCASE}.cmake) + file(GENERATE OUTPUT ${permutation_find_subdirectories} + CONTENT +"# Generated by O3DE install\n +${find_subdirectories} +" + ) + ly_install(FILES "${permutation_find_subdirectories}" + DESTINATION cmake/Platform/${PAL_PLATFORM_NAME}/${LY_BUILD_PERMUTATION} + COMPONENT ${LY_INSTALL_PERMUTATION_COMPONENT} + ) + + set(pal_builtin_file ${CMAKE_CURRENT_BINARY_DIR}/cmake/3rdParty/Platform/${PAL_PLATFORM_NAME}/BuiltInPackages_${PAL_PLATFORM_NAME_LOWERCASE}.cmake) + file(GENERATE OUTPUT ${pal_builtin_file} + CONTENT +"# Generated by O3DE install\n +if(LY_MONOLITHIC_GAME) + include(cmake/3rdParty/Platform/${PAL_PLATFORM_NAME}/Monolithic/BuiltInPackages_${PAL_PLATFORM_NAME_LOWERCASE}.cmake) +else() + include(cmake/3rdParty/Platform/${PAL_PLATFORM_NAME}/Default/BuiltInPackages_${PAL_PLATFORM_NAME_LOWERCASE}.cmake) +endif() +" + ) + ly_install(FILES "${pal_builtin_file}" + DESTINATION cmake/3rdParty/Platform/${PAL_PLATFORM_NAME} + COMPONENT ${CMAKE_INSTALL_DEFAULT_COMPONENT_NAME} + ) + + # ${LY_BUILD_PERMUTATION}/BuiltInPackage_.cmake: since associations could happen in any cmake file across the engine. We collect + # all the associations in ly_associate_package and then generate them into BuiltInPackages_.cmake. This will consolidate all + # associations in one file + # Associations are sensitive to platform and build permutation, so we make different files for each. get_property(all_package_names GLOBAL PROPERTY LY_PACKAGE_NAMES) list(REMOVE_DUPLICATES all_package_names) set(builtinpackages "# Generated by O3DE install\n\n") @@ -507,13 +551,13 @@ function(ly_setup_cmake_install) string(APPEND builtinpackages "ly_associate_package(PACKAGE_NAME ${package_name} TARGETS ${targets} PACKAGE_HASH ${package_hash})\n") endforeach() - set(pal_builtin_file ${CMAKE_CURRENT_BINARY_DIR}/cmake/3rdParty/Platform/${PAL_PLATFORM_NAME}/BuiltInPackages_${PAL_PLATFORM_NAME_LOWERCASE}.cmake) - file(GENERATE OUTPUT ${pal_builtin_file} + set(permutation_builtin_file ${CMAKE_CURRENT_BINARY_DIR}/cmake/3rdParty/Platform/${PAL_PLATFORM_NAME}/${LY_BUILD_PERMUTATION}/BuiltInPackages_${PAL_PLATFORM_NAME_LOWERCASE}.cmake) + file(GENERATE OUTPUT ${permutation_builtin_file} CONTENT ${builtinpackages} ) - ly_install(FILES "${pal_builtin_file}" - DESTINATION cmake/3rdParty/Platform/${PAL_PLATFORM_NAME} - COMPONENT ${CMAKE_INSTALL_DEFAULT_COMPONENT_NAME} + ly_install(FILES "${permutation_builtin_file}" + DESTINATION cmake/3rdParty/Platform/${PAL_PLATFORM_NAME}/${LY_BUILD_PERMUTATION} + COMPONENT ${LY_INSTALL_PERMUTATION_COMPONENT} ) endfunction() @@ -531,9 +575,13 @@ function(ly_setup_runtime_dependencies) string(TOUPPER ${conf} UCONF) ly_install(CODE "function(ly_copy source_file target_directory) - cmake_path(GET source_file FILENAME file_name) - if(NOT EXISTS \${target_directory}/\${file_name}) - file(COPY \"\${source_file}\" DESTINATION \"\${target_directory}\" FILE_PERMISSIONS ${LY_COPY_PERMISSIONS}) + cmake_path(GET source_file FILENAME target_filename) + cmake_path(APPEND full_target_directory \"\$ENV{DESTDIR}\${CMAKE_INSTALL_PREFIX}\" \"\${target_directory}\") + cmake_path(APPEND target_file \"\${full_target_directory}\" \"\${target_filename}\") + if(\"\${source_file}\" IS_NEWER_THAN \"\${target_file}\") + message(STATUS \"Copying \${source_file} to \${full_target_directory}...\") + file(COPY \"\${source_file}\" DESTINATION \"\${full_target_directory}\" FILE_PERMISSIONS ${LY_COPY_PERMISSIONS} FOLLOW_SYMLINK_CHAIN) + file(TOUCH_NOCREATE \"${target_file}\") endif() endfunction()" COMPONENT ${LY_INSTALL_PERMUTATION_COMPONENT}_${UCONF} @@ -558,12 +606,7 @@ endfunction()" endif() # runtime dependencies that need to be copied to the output - # Anywhere CMAKE_INSTALL_PREFIX is used, it has to be escaped so it is baked into the cmake_install.cmake script instead - # of baking the path. This is needed so `cmake --install --prefix ` works regardless of the CMAKE_INSTALL_PREFIX - # used to generate the solution. - # CMAKE_INSTALL_PREFIX is still used when building the INSTALL target - set(install_output_folder "\${CMAKE_INSTALL_PREFIX}/${runtime_output_directory}") - set(target_file_dir "${install_output_folder}/${target_runtime_output_subdirectory}") + set(target_file_dir "${runtime_output_directory}/${target_runtime_output_subdirectory}") ly_get_runtime_dependencies(runtime_dependencies ${target}) foreach(runtime_dependency ${runtime_dependencies}) unset(runtime_command) @@ -772,4 +815,4 @@ set(LY_CORE_COMPONENT_ALREADY_INCLUDED FALSE)" ly_post_install_steps() endif() -endfunction() \ No newline at end of file +endfunction() diff --git a/cmake/Platform/Common/MSVC/Configurations_msvc.cmake b/cmake/Platform/Common/MSVC/Configurations_msvc.cmake index a4d8533626..66a5b7b01f 100644 --- a/cmake/Platform/Common/MSVC/Configurations_msvc.cmake +++ b/cmake/Platform/Common/MSVC/Configurations_msvc.cmake @@ -139,11 +139,20 @@ endif() # Configure system includes ly_set(LY_CXX_SYSTEM_INCLUDE_CONFIGURATION_FLAG - /experimental:external # Turns on "external" headers feature for MSVC compilers + /experimental:external # Turns on "external" headers feature for MSVC compilers, required for MSVC < 16.10 /external:W0 # Set warning level in external headers to 0. This is used to suppress warnings 3rdParty libraries which uses the "system_includes" option in their json configuration ) + +# CMake 3.22rc added a definition for CMAKE_INCLUDE_SYSTEM_FLAG_CXX. However, its defined as "-external:I ", that space causes +# issues when trying to use in TargetIncludeSystemDirectories_unsupported.cmake. +# CMake 3.22rc has also not added support for external directories in MSVC through target_include_directories(... SYSTEM +# So we will just fix the flag that was added by 3.22rc so it works with our TargetIncludeSystemDirectories_unsupported.cmake +# Once target_include_directories(... SYSTEM is supported, we can branch and use TargetIncludeSystemDirectories_supported.cmake +# Reported this here: https://gitlab.kitware.com/cmake/cmake/-/issues/17904#note_1078281 if(NOT CMAKE_INCLUDE_SYSTEM_FLAG_CXX) - ly_set(CMAKE_INCLUDE_SYSTEM_FLAG_CXX /external:I) + ly_set(CMAKE_INCLUDE_SYSTEM_FLAG_CXX "/external:I") +else() + string(STRIP ${CMAKE_INCLUDE_SYSTEM_FLAG_CXX} CMAKE_INCLUDE_SYSTEM_FLAG_CXX) endif() include(cmake/Platform/Common/TargetIncludeSystemDirectories_unsupported.cmake) diff --git a/cmake/Platform/Common/PackagingPostBuild_common.cmake b/cmake/Platform/Common/PackagingPostBuild_common.cmake new file mode 100644 index 0000000000..6e3c7ddf0b --- /dev/null +++ b/cmake/Platform/Common/PackagingPostBuild_common.cmake @@ -0,0 +1,114 @@ +# +# Copyright (c) Contributors to the Open 3D Engine Project. +# For complete copyright and license terms please see the LICENSE at the root of this distribution. +# +# SPDX-License-Identifier: Apache-2.0 OR MIT +# +# + +message(STATUS "Executing packaging postbuild...") + +# ly_is_s3_url +# if the given URL is a s3 url of thr form "s3://(stuff)" then sets +# the output_variable_name to TRUE otherwise unsets it. +function (ly_is_s3_url download_url output_variable_name) + if ("${download_url}" MATCHES "s3://.*") + set(${output_variable_name} TRUE PARENT_SCOPE) + else() + unset(${output_variable_name} PARENT_SCOPE) + endif() +endfunction() + +function(ly_upload_to_url in_url in_local_path in_file_regex) + + message(STATUS "Uploading ${in_local_path}/${in_file_regex} artifacts to ${CPACK_UPLOAD_URL}") + ly_is_s3_url(${in_url} _is_s3_bucket) + if(NOT _is_s3_bucket) + message(FATAL_ERROR "Only S3 installer uploading is supported at this time") + endif() + + # strip the scheme and extract the bucket/key prefix from the URL + string(REPLACE "s3://" "" _stripped_url ${in_url}) + string(REPLACE "/" ";" _tokens ${_stripped_url}) + + list(POP_FRONT _tokens _bucket) + string(JOIN "/" _prefix ${_tokens}) + + set(_extra_args [[{"ACL":"bucket-owner-full-control"}]]) + + file(TO_NATIVE_PATH "${LY_ROOT_FOLDER}/scripts/build/tools/upload_to_s3.py" _upload_script) + + set(_upload_command + ${CPACK_LY_PYTHON_CMD} -s + -u ${_upload_script} + --base_dir ${in_local_path} + --file_regex="${in_file_regex}" + --bucket ${_bucket} + --key_prefix ${_prefix} + --extra_args ${_extra_args} + ) + + if(CPACK_AWS_PROFILE) + list(APPEND _upload_command --profile ${CPACK_AWS_PROFILE}) + endif() + + execute_process( + COMMAND ${_upload_command} + RESULT_VARIABLE _upload_result + OUTPUT_VARIABLE _upload_output + ERROR_VARIABLE _upload_error + OUTPUT_STRIP_TRAILING_WHITESPACE + ) + + if (${_upload_result} EQUAL 0) + message(STATUS "Artifact uploading complete!") + else() + message(FATAL_ERROR "An error occurred uploading to s3.\n Output: ${_upload_output}\n\ Error: ${_upload_error}") + endif() +endfunction() + +function(ly_upload_to_latest in_url in_path) + + message(STATUS "Updating latest tagged build") + + # make sure we can extra the commit info from the URL first + string(REGEX MATCH "([0-9][0-9][0-9][0-9]-[0-9][0-9]-[0-9][0-9]-[0-9a-zA-Z]+)" + commit_info ${in_url} + ) + if(NOT commit_info) + message(FATAL_ERROR "Failed to extract the build tag") + endif() + + # Create a temp directory where we are going to rename the file to take out the version + # and then upload it + set(temp_dir ${CPACK_BINARY_DIR}/temp) + if(NOT EXISTS ${temp_dir}) + file(MAKE_DIRECTORY ${temp_dir}) + endif() + file(COPY ${in_path} DESTINATION ${temp_dir}) + + cmake_path(GET in_path FILENAME in_path_filename) + string(REPLACE "_${CPACK_PACKAGE_VERSION}" "" non_versioned_in_path_filename ${in_path_filename}) + file(RENAME "${temp_dir}/${in_path_filename}" "${temp_dir}/${non_versioned_in_path_filename}") + + # include the commit info in a text file that will live next to the exe + set(_temp_info_file ${temp_dir}/build_tag.txt) + file(WRITE ${_temp_info_file} ${commit_info}) + + # update the URL and upload + string(REPLACE + ${commit_info} "Latest" + latest_upload_url ${in_url} + ) + + ly_upload_to_url( + ${latest_upload_url} + ${temp_dir} + ".*(${non_versioned_in_path_filename}|build_tag.txt)$" + ) + + # cleanup the temp files + file(REMOVE_RECURSE ${temp_dir}) + message(STATUS "Latest build update complete!") + +endfunction() \ No newline at end of file diff --git a/cmake/Platform/Common/PackagingPreBuild_common.cmake b/cmake/Platform/Common/PackagingPreBuild_common.cmake new file mode 100644 index 0000000000..e6b8a7796e --- /dev/null +++ b/cmake/Platform/Common/PackagingPreBuild_common.cmake @@ -0,0 +1,5 @@ +# For complete copyright and license terms please see the LICENSE at the root of this distribution. +# +# SPDX-License-Identifier: Apache-2.0 OR MIT +# +# diff --git a/cmake/Platform/Common/RuntimeDependencies_common.cmake b/cmake/Platform/Common/RuntimeDependencies_common.cmake index 60e55453f8..a03f7f667b 100644 --- a/cmake/Platform/Common/RuntimeDependencies_common.cmake +++ b/cmake/Platform/Common/RuntimeDependencies_common.cmake @@ -272,7 +272,7 @@ function(ly_delayed_generate_runtime_dependencies) endforeach() # Generate the output file, note the STAMP_OUTPUT_FILE need to match with the one defined in LYWrappers.cmake - set(STAMP_OUTPUT_FILE ${CMAKE_BINARY_DIR}/runtime_dependencies/$/${target}_$.stamp) + set(STAMP_OUTPUT_FILE ${CMAKE_BINARY_DIR}/runtime_dependencies/$/${target}.stamp) set(target_file_dir "$") set(target_file "$") ly_file_read(${LY_RUNTIME_DEPENDENCIES_TEMPLATE} template_file) diff --git a/cmake/Platform/Common/runtime_dependencies_common.cmake.in b/cmake/Platform/Common/runtime_dependencies_common.cmake.in index 6e41dbaad1..a2c3e26ed0 100644 --- a/cmake/Platform/Common/runtime_dependencies_common.cmake.in +++ b/cmake/Platform/Common/runtime_dependencies_common.cmake.in @@ -9,18 +9,26 @@ cmake_policy(SET CMP0012 NEW) # new policy for the if that evaluates a boolean out of "if(NOT ${same_location})" function(ly_copy source_file target_directory) - get_filename_component(target_filename "${source_file}" NAME) - cmake_path(COMPARE "${source_file}" EQUAL "${target_directory}/${target_filename}" same_location) + cmake_path(GET source_file FILENAME target_filename) + cmake_path(APPEND target_file "${target_directory}" "${target_filename}") + cmake_path(COMPARE "${source_file}" EQUAL "${target_file}" same_location) if(NOT ${same_location}) - file(LOCK ${target_directory}/${target_filename}.lock GUARD FUNCTION TIMEOUT 300) - if("${source_file}" IS_NEWER_THAN "${target_directory}/${target_filename}") + file(LOCK "${target_file}.lock" GUARD FUNCTION TIMEOUT 300) + file(SIZE "${source_file}" source_file_size) + if(EXISTS "${target_file}") + file(SIZE "${target_file}" target_file_size) + else() + set(target_file_size 0) + endif() + if((NOT source_file_size EQUAL target_file_size) OR "${source_file}" IS_NEWER_THAN "${target_file}") message(STATUS "Copying \"${source_file}\" to \"${target_directory}\"...") + file(MAKE_DIRECTORY "${full_target_directory}") file(COPY "${source_file}" DESTINATION "${target_directory}" FILE_PERMISSIONS @LY_COPY_PERMISSIONS@ FOLLOW_SYMLINK_CHAIN) - file(TOUCH_NOCREATE ${target_directory}/${target_filename}) + file(TOUCH_NOCREATE "${target_file}") endif() endif() endfunction() @LY_COPY_COMMANDS@ -file(TOUCH @STAMP_OUTPUT_FILE@) +file(TOUCH "@STAMP_OUTPUT_FILE@") diff --git a/cmake/Platform/Linux/CompilerSettings_linux.cmake b/cmake/Platform/Linux/CompilerSettings_linux.cmake new file mode 100644 index 0000000000..9bb629c53b --- /dev/null +++ b/cmake/Platform/Linux/CompilerSettings_linux.cmake @@ -0,0 +1,34 @@ +# +# Copyright (c) Contributors to the Open 3D Engine Project. +# For complete copyright and license terms please see the LICENSE at the root of this distribution. +# +# SPDX-License-Identifier: Apache-2.0 OR MIT +# +# + +if(NOT CMAKE_C_COMPILER AND NOT CMAKE_CXX_COMPILER AND NOT "$ENV{CC}" AND NOT "$ENV{CXX}") + set(path_search + /bin + /usr/bin + /usr/local/bin + /sbin + /usr/sbin + /usr/local/sbin + ) + list(TRANSFORM path_search APPEND "/clang-[0-9]*") + file(GLOB clang_versions ${path_search}) + if(clang_versions) + # Find and pick the highest installed version + list(SORT clang_versions COMPARE NATURAL) + list(GET clang_versions 0 clang_higher_version_path) + string(REGEX MATCH "clang-([0-9.]*)" clang_higher_version ${clang_higher_version_path}) + if(CMAKE_MATCH_1) + set(CMAKE_C_COMPILER clang-${CMAKE_MATCH_1}) + set(CMAKE_CXX_COMPILER clang++-${CMAKE_MATCH_1}) + else() + message(FATAL_ERROR "Clang not found, please install clang") + endif() + else() + message(FATAL_ERROR "Clang not found, please install clang") + endif() +endif() diff --git a/cmake/Platform/Linux/Install_linux.cmake b/cmake/Platform/Linux/Install_linux.cmake index 02baa6e61e..0f5494131a 100644 --- a/cmake/Platform/Linux/Install_linux.cmake +++ b/cmake/Platform/Linux/Install_linux.cmake @@ -9,14 +9,27 @@ #! ly_setup_runtime_dependencies_copy_function_override: Linux-specific copy function to handle RPATH fixes set(ly_copy_template [[ function(ly_copy source_file target_directory) - file(COPY "${source_file}" DESTINATION "${target_directory}" FILE_PERMISSIONS @LY_COPY_PERMISSIONS@ FOLLOW_SYMLINK_CHAIN) - get_filename_component(target_filename_ext "${source_file}" LAST_EXT) - if("${source_file}" MATCHES "qt/plugins" AND "${target_filename_ext}" STREQUAL ".so") - get_filename_component(target_filename "${source_file}" NAME) - file(RPATH_CHANGE FILE "${target_directory}/${target_filename}" OLD_RPATH "\$ORIGIN/../../lib" NEW_RPATH "\$ORIGIN/..") - elseif("${source_file}" MATCHES "lrelease") - get_filename_component(target_filename "${source_file}" NAME) - file(RPATH_CHANGE FILE "${target_directory}/${target_filename}" OLD_RPATH "\$ORIGIN/../lib" NEW_RPATH "\$ORIGIN") + cmake_path(GET source_file FILENAME target_filename) + cmake_path(APPEND full_target_directory "$ENV{DESTDIR}${CMAKE_INSTALL_PREFIX}" "${target_directory}") + cmake_path(APPEND target_file "${full_target_directory}" "${target_filename}") + if("${source_file}" IS_NEWER_THAN "${target_file}") + message(STATUS "Copying ${source_file} to ${full_target_directory}...") + file(MAKE_DIRECTORY "${full_target_directory}") + file(COPY "${source_file}" DESTINATION "${full_target_directory}" FILE_PERMISSIONS @LY_COPY_PERMISSIONS@ FOLLOW_SYMLINK_CHAIN) + file(TOUCH_NOCREATE "${target_file}") + + # Special case for install + cmake_PATH(GET source_file EXTENSION target_filename_ext) + if("${target_filename_ext}" STREQUAL ".so") + if("${source_file}" MATCHES "qt/plugins") + file(RPATH_CHANGE FILE "${target_file}" OLD_RPATH "\$ORIGIN/../../lib" NEW_RPATH "\$ORIGIN/..") + endif() + if(CMAKE_INSTALL_DO_STRIP) + execute_process(COMMAND @CMAKE_STRIP@ "${target_file}") + endif() + elseif("${source_file}" MATCHES "lrelease") + file(RPATH_CHANGE FILE "${target_file}" OLD_RPATH "\$ORIGIN/../lib" NEW_RPATH "\$ORIGIN") + endif() endif() endfunction()]]) diff --git a/cmake/Platform/Linux/PAL_linux.cmake b/cmake/Platform/Linux/PAL_linux.cmake index e74adb287e..b7fd062c8c 100644 --- a/cmake/Platform/Linux/PAL_linux.cmake +++ b/cmake/Platform/Linux/PAL_linux.cmake @@ -16,14 +16,14 @@ ly_set(PAL_TRAIT_BUILD_TESTS_SUPPORTED TRUE) ly_set(PAL_TRAIT_BUILD_UNITY_SUPPORTED TRUE) ly_set(PAL_TRAIT_BUILD_UNITY_EXCLUDE_EXTENSIONS) ly_set(PAL_TRAIT_BUILD_EXCLUDE_ALL_TEST_RUNS_FROM_IDE FALSE) -ly_set(PAL_TRAIT_BUILD_CPACK_SUPPORTED FALSE) +ly_set(PAL_TRAIT_BUILD_CPACK_SUPPORTED TRUE) ly_set(PAL_TRAIT_PROF_PIX_SUPPORTED FALSE) # Test library support ly_set(PAL_TRAIT_TEST_GOOGLE_TEST_SUPPORTED TRUE) ly_set(PAL_TRAIT_TEST_GOOGLE_BENCHMARK_SUPPORTED TRUE) -ly_set(PAL_TRAIT_TEST_LYTESTTOOLS_SUPPORTED FALSE) +ly_set(PAL_TRAIT_TEST_LYTESTTOOLS_SUPPORTED TRUE) ly_set(PAL_TRAIT_TEST_PYTEST_SUPPORTED TRUE) ly_set(PAL_TRAIT_TEST_TARGET_TYPE MODULE) diff --git a/cmake/Platform/Linux/Packaging/postinst.in b/cmake/Platform/Linux/Packaging/postinst.in new file mode 100644 index 0000000000..c6c0ba228d --- /dev/null +++ b/cmake/Platform/Linux/Packaging/postinst.in @@ -0,0 +1,21 @@ +#!/usr/bin/env bash +# +# Copyright (c) Contributors to the Open 3D Engine Project. +# For complete copyright and license terms please see the LICENSE at the root of this distribution. +# +# SPDX-License-Identifier: Apache-2.0 OR MIT +# +# + +set -o errexit # exit on the first failure encountered + +{ + if [[ ! -f "/usr/lib/x86_64-linux-gnu/libffi.so.6" ]]; then + sudo ln -s /usr/lib/x86_64-linux-gnu/libffi.so.7 /usr/lib/x86_64-linux-gnu/libffi.so.6 + fi + + pushd @CPACK_PACKAGING_INSTALL_PREFIX@ + python/get_python.sh + chown -R $SUDO_USER . + popd +} &> /dev/null # hide output diff --git a/cmake/Platform/Linux/Packaging/postrm.in b/cmake/Platform/Linux/Packaging/postrm.in new file mode 100644 index 0000000000..cd6f37abe4 --- /dev/null +++ b/cmake/Platform/Linux/Packaging/postrm.in @@ -0,0 +1,10 @@ +#!/usr/bin/env bash +# +# Copyright (c) Contributors to the Open 3D Engine Project. +# For complete copyright and license terms please see the LICENSE at the root of this distribution. +# +# SPDX-License-Identifier: Apache-2.0 OR MIT +# +# + +set -o errexit # exit on the first failure encountered diff --git a/cmake/Platform/Linux/Packaging/prerm.in b/cmake/Platform/Linux/Packaging/prerm.in new file mode 100644 index 0000000000..843f21da24 --- /dev/null +++ b/cmake/Platform/Linux/Packaging/prerm.in @@ -0,0 +1,24 @@ +#!/usr/bin/env bash +# +# Copyright (c) Contributors to the Open 3D Engine Project. +# For complete copyright and license terms please see the LICENSE at the root of this distribution. +# +# SPDX-License-Identifier: Apache-2.0 OR MIT +# +# + +set -o errexit # exit on the first failure encountered + +{ + # We dont remove this symlink that we potentially created because the user could have + # installed themselves. + #if [[ -L "/usr/lib/x86_64-linux-gnu/libffi.so.6" ]]; then + # sudo rm /usr/lib/x86_64-linux-gnu/libffi.so.6 + #fi + + pushd @CPACK_PACKAGING_INSTALL_PREFIX@ + # delete python downloads + rm -rf python/downloaded_packages python/runtime + find . -type d -name *.egg-info -prune -exec rm -rf {} \; + popd +} &> /dev/null # hide output diff --git a/cmake/Platform/Linux/PackagingCodeSign_linux.cmake b/cmake/Platform/Linux/PackagingCodeSign_linux.cmake new file mode 100644 index 0000000000..c4b6375385 --- /dev/null +++ b/cmake/Platform/Linux/PackagingCodeSign_linux.cmake @@ -0,0 +1,33 @@ +# +# Copyright (c) Contributors to the Open 3D Engine Project. +# For complete copyright and license terms please see the LICENSE at the root of this distribution. +# +# SPDX-License-Identifier: Apache-2.0 OR MIT +# +# + +function(ly_sign_binaries in_path) + message(STATUS "Executing package signing...") + file(REAL_PATH "${CPACK_SOURCE_DIR}/.." _root_path) + unset(_signing_command) + + cmake_path(SET _sign_script "${_root_path}/scripts/signer/Platform/Linux/signer.sh") + + list(APPEND _signing_command + ${_sign_script} + ) + message(STATUS "Signing package files in ${in_path}") + execute_process( + COMMAND ${_signing_command} ${in_path} + RESULT_VARIABLE _signing_result + ERROR_VARIABLE _signing_errors + OUTPUT_VARIABLE _signing_output + ECHO_OUTPUT_VARIABLE + ) + + if(NOT ${_signing_result} EQUAL 0) + message(FATAL_ERROR "An error occurred during signing files. ${_signing_errors}") + else() + message(STATUS "Signing complete!") + endif() +endfunction() diff --git a/cmake/Platform/Linux/PackagingPostBuild_linux.cmake b/cmake/Platform/Linux/PackagingPostBuild_linux.cmake new file mode 100644 index 0000000000..63c21a85eb --- /dev/null +++ b/cmake/Platform/Linux/PackagingPostBuild_linux.cmake @@ -0,0 +1,66 @@ +# +# Copyright (c) Contributors to the Open 3D Engine Project. +# For complete copyright and license terms please see the LICENSE at the root of this distribution. +# +# SPDX-License-Identifier: Apache-2.0 OR MIT +# +# + +file(REAL_PATH "${CPACK_SOURCE_DIR}/.." LY_ROOT_FOLDER) +include(${LY_ROOT_FOLDER}/cmake/Platform/Common/PackagingPostBuild_common.cmake) +include(${CPACK_CODESIGN_SCRIPT}) + +file(${CPACK_PACKAGE_CHECKSUM} ${CPACK_TOPLEVEL_DIRECTORY}/${CPACK_PACKAGE_FILE_NAME}.deb file_checksum) +file(WRITE ${CPACK_TOPLEVEL_DIRECTORY}/${CPACK_PACKAGE_FILE_NAME}.deb.sha256 "${file_checksum} ${CPACK_PACKAGE_FILE_NAME}.deb") + +if(CPACK_UPLOAD_URL) + + # use the internal default path if somehow not specified from cpack_configure_downloads + if(NOT CPACK_UPLOAD_DIRECTORY) + set(CPACK_UPLOAD_DIRECTORY ${CPACK_PACKAGE_DIRECTORY}/CPackUploads) + endif() + + # Sign and regenerate checksum + ly_sign_binaries("${CPACK_TOPLEVEL_DIRECTORY}/*.deb" "") + file(WRITE ${CPACK_TOPLEVEL_DIRECTORY}/${CPACK_PACKAGE_FILE_NAME}.deb.sha256 "${file_checksum} ${CPACK_PACKAGE_FILE_NAME}.deb") + + # Copy the artifacts intended to be uploaded to a remote server into the folder specified + # through CPACK_UPLOAD_DIRECTORY. This mimics the same process cpack does natively for + # some other frameworks that have built-in online installer support. + message(STATUS "Copying packaging artifacts to upload directory...") + file(REMOVE_RECURSE ${CPACK_UPLOAD_DIRECTORY}) + file(GLOB _artifacts + "${CPACK_TOPLEVEL_DIRECTORY}/*.deb" + "${CPACK_TOPLEVEL_DIRECTORY}/*.sha256" + "${LY_ROOT_FOLDER}/scripts/signer/Platform/Linux/*.gpg" + "${CPACK_3P_LICENSE_FILE}" + "${CPACK_3P_MANIFEST_FILE}" + ) + file(COPY ${_artifacts} + DESTINATION ${CPACK_UPLOAD_DIRECTORY} + ) + message(STATUS "Artifacts copied to ${CPACK_UPLOAD_DIRECTORY}") + + ly_upload_to_url( + ${CPACK_UPLOAD_URL} + ${CPACK_UPLOAD_DIRECTORY} + ".*(.deb|.gpg|.sha256|.txt|.json)$" + ) + + # for auto tagged builds, we will also upload a second copy of just the boostrapper + # to a special "Latest" folder under the branch in place of the commit date/hash + if(CPACK_AUTO_GEN_TAG) + + set(latest_deb_package "${CPACK_UPLOAD_DIRECTORY}/${CPACK_PACKAGE_NAME}_latest.deb") + file(COPY_FILE + ${CPACK_UPLOAD_DIRECTORY}/${CPACK_PACKAGE_FILE_NAME}.deb + ${latest_deb_package} + ) + ly_upload_to_latest(${CPACK_UPLOAD_URL} ${latest_deb_package}) + + # Generate a checksum file for latest and upload it + set(latest_hash_file "${CPACK_UPLOAD_DIRECTORY}/${CPACK_PACKAGE_NAME}_latest.deb.sha256") + file(WRITE "${latest_hash_file}" "${file_checksum} ${CPACK_PACKAGE_NAME}_latest.deb") + ly_upload_to_latest(${CPACK_UPLOAD_URL} "${latest_hash_file}") + endif() +endif() diff --git a/cmake/Platform/Linux/PackagingPreBuild_linux.cmake b/cmake/Platform/Linux/PackagingPreBuild_linux.cmake new file mode 100644 index 0000000000..39108355ea --- /dev/null +++ b/cmake/Platform/Linux/PackagingPreBuild_linux.cmake @@ -0,0 +1,14 @@ +# +# Copyright (c) Contributors to the Open 3D Engine Project. +# For complete copyright and license terms please see the LICENSE at the root of this distribution. +# +# SPDX-License-Identifier: Apache-2.0 OR MIT +# +# + +file(REAL_PATH "${CPACK_SOURCE_DIR}/.." LY_ROOT_FOLDER) +include(${LY_ROOT_FOLDER}/cmake/Platform/Common/PackagingPreBuild_common.cmake) + +if(NOT CPACK_UPLOAD_URL) # Skip this step if we are not uploading the package + return() +endif() diff --git a/cmake/Platform/Linux/Packaging_linux.cmake b/cmake/Platform/Linux/Packaging_linux.cmake new file mode 100644 index 0000000000..2e178429c3 --- /dev/null +++ b/cmake/Platform/Linux/Packaging_linux.cmake @@ -0,0 +1,56 @@ +# +# Copyright (c) Contributors to the Open 3D Engine Project. +# For complete copyright and license terms please see the LICENSE at the root of this distribution. +# +# SPDX-License-Identifier: Apache-2.0 OR MIT +# +# + +set(CPACK_GENERATOR DEB) + +set(CPACK_PACKAGING_INSTALL_PREFIX "/opt/${CPACK_PACKAGE_NAME}/${LY_VERSION_STRING}") + +set(_cmake_package_name "cmake-${CPACK_DESIRED_CMAKE_VERSION}-linux-x86_64") +set(CPACK_CMAKE_PACKAGE_FILE "${_cmake_package_name}.tar.gz") +set(CPACK_CMAKE_PACKAGE_HASH "3f827544f9c82e74ddf5016461fdfcfea4ede58a26f82612f473bf6bfad8bfc2") + +# get all the package dependencies, extracted from scripts\build\build_node\Platform\Linux\package-list.ubuntu-focal.txt +set(package_dependencies + libffi7 + clang-12 + ninja-build + # Build Libraries + libglu1-mesa-dev # For Qt (GL dependency) + libxcb-xinerama0 # For Qt plugins at runtime + libxcb-xinput0 # For Qt plugins at runtime + libfontconfig1-dev # For Qt plugins at runtime + libcurl4-openssl-dev # For HttpRequestor + # libsdl2-dev # for WWise/Audio + libxcb-xkb-dev # For xcb keyboard input + libxkbcommon-x11-dev # For xcb keyboard input + libxkbcommon-dev # For xcb keyboard input + libxcb-xfixes0-dev # For mouse input + libxcb-xinput-dev # For mouse input + zlib1g-dev + mesa-common-dev +) +list(JOIN package_dependencies "," CPACK_DEBIAN_PACKAGE_DEPENDS) + +# Post-installation and pre/post removal scripts +configure_file("${LY_ROOT_FOLDER}/cmake/Platform/${PAL_PLATFORM_NAME}/Packaging/postinst.in" + "${CMAKE_BINARY_DIR}/cmake/Platform/${PAL_PLATFORM_NAME}/Packaging/postinst" + @ONLY +) +configure_file("${LY_ROOT_FOLDER}/cmake/Platform/${PAL_PLATFORM_NAME}/Packaging/prerm.in" + "${CMAKE_BINARY_DIR}/cmake/Platform/${PAL_PLATFORM_NAME}/Packaging/prerm" + @ONLY +) +configure_file("${LY_ROOT_FOLDER}/cmake/Platform/${PAL_PLATFORM_NAME}/Packaging/postrm.in" + "${CMAKE_BINARY_DIR}/cmake/Platform/${PAL_PLATFORM_NAME}/Packaging/postrm" + @ONLY +) +set(CPACK_DEBIAN_PACKAGE_CONTROL_EXTRA + ${CMAKE_BINARY_DIR}/cmake/Platform/Linux/Packaging/postinst + ${CMAKE_BINARY_DIR}/cmake/Platform/Linux/Packaging/prerm + ${CMAKE_BINARY_DIR}/cmake/Platform/Linux/Packaging/postrm +) diff --git a/cmake/Platform/Linux/platform_linux_files.cmake b/cmake/Platform/Linux/platform_linux_files.cmake index fa5545cd26..dd10c47ca6 100644 --- a/cmake/Platform/Linux/platform_linux_files.cmake +++ b/cmake/Platform/Linux/platform_linux_files.cmake @@ -10,11 +10,20 @@ set(FILES ../Common/Configurations_common.cmake ../Common/Clang/Configurations_clang.cmake ../Common/Install_common.cmake + ../Common/PackagingPostBuild_common.cmake + ../Common/PackagingPreBuild_common.cmake + CompilerSettings_linux.cmake Configurations_linux.cmake Install_linux.cmake LYTestWrappers_linux.cmake LYWrappers_linux.cmake + Packaging_linux.cmake + PackagingCodeSign_linux.cmake + PackagingPostBuild_linux.cmake + PackagingPreBuild_linux.cmake PAL_linux.cmake PALDetection_linux.cmake RPathChange.cmake + runtime_dependencies_linux.cmake.in + RuntimeDependencies_linux.cmake ) diff --git a/cmake/Platform/Linux/runtime_dependencies_linux.cmake.in b/cmake/Platform/Linux/runtime_dependencies_linux.cmake.in index 394252e284..e5d56d1b56 100644 --- a/cmake/Platform/Linux/runtime_dependencies_linux.cmake.in +++ b/cmake/Platform/Linux/runtime_dependencies_linux.cmake.in @@ -9,23 +9,34 @@ cmake_policy(SET CMP0012 NEW) # new policy for the if that evaluates a boolean out of "if(NOT ${same_location})" function(ly_copy source_file target_directory) - get_filename_component(target_filename "${source_file}" NAME) - get_filename_component(target_filename_ext "${source_file}" LAST_EXT) - cmake_path(COMPARE "${source_file}" EQUAL "${target_directory}/${target_filename}" same_location) + cmake_path(GET source_file FILENAME target_filename) + cmake_PATH(GET source_file EXTENSION target_filename_ext) + cmake_path(APPEND target_file "${target_directory}" "${target_filename}") + cmake_path(COMPARE "${source_file}" EQUAL "${target_file}" same_location) if(NOT ${same_location}) - file(LOCK ${target_directory}/${target_filename}.lock GUARD FUNCTION TIMEOUT 300) - if("${source_file}" IS_NEWER_THAN "${target_directory}/${target_filename}") + file(LOCK "${target_file}.lock" GUARD FUNCTION TIMEOUT 300) + file(SIZE "${source_file}" source_file_size) + if(EXISTS "${target_file}") + file(SIZE "${target_file}" target_file_size) + else() + set(target_file_size 0) + endif() + if((NOT source_file_size EQUAL target_file_size) OR "${source_file}" IS_NEWER_THAN "${target_file}") + message(STATUS "Copying \"${source_file}\" to \"${target_directory}\"...") + file(MAKE_DIRECTORY "${full_target_directory}") file(COPY "${source_file}" DESTINATION "${target_directory}" FILE_PERMISSIONS @LY_COPY_PERMISSIONS@ FOLLOW_SYMLINK_CHAIN) - + file(TOUCH_NOCREATE "${target_file}") + # Special case, shared libraries that are copied from qt/plugins have their RPATH set to \$ORIGIN/../../lib # which is the correct relative path based on the source location. But when we copy it to their subfolder, # the rpath needs to be adjusted to the parent ($ORIGIN/..) if("${source_file}" MATCHES "qt/plugins" AND "${target_filename_ext}" STREQUAL ".so") - file(RPATH_CHANGE FILE "${target_directory}/${target_filename}" OLD_RPATH "\$ORIGIN/../../lib" NEW_RPATH "\$ORIGIN/..") + file(RPATH_CHANGE FILE "${target_file}" OLD_RPATH "\$ORIGIN/../../lib" NEW_RPATH "\$ORIGIN/..") endif() - endif() endif() endfunction() @LY_COPY_COMMANDS@ + +file(TOUCH "@STAMP_OUTPUT_FILE@") diff --git a/cmake/Platform/Mac/InstallUtils_mac.cmake.in b/cmake/Platform/Mac/InstallUtils_mac.cmake.in index d73c4db459..3db9903e48 100644 --- a/cmake/Platform/Mac/InstallUtils_mac.cmake.in +++ b/cmake/Platform/Mac/InstallUtils_mac.cmake.in @@ -31,36 +31,36 @@ endfunction() function(fixup_python_framework framework_path) file(REMOVE_RECURSE - ${framework_path}/Versions/Current - ${framework_path}/Versions/@LY_PYTHON_VERSION_MAJOR_MINOR@/Headers - ${framework_path}/Versions/@LY_PYTHON_VERSION_MAJOR_MINOR@/lib/Python - ${framework_path}/Versions/@LY_PYTHON_VERSION_MAJOR_MINOR@/lib/python@LY_PYTHON_VERSION_MAJOR_MINOR@/test - ${framework_path}/Versions/@LY_PYTHON_VERSION_MAJOR_MINOR@/lib/python@LY_PYTHON_VERSION_MAJOR_MINOR@/site-packages/scipy/io/tests - ${framework_path}/Python - ${framework_path}/Resources - ${framework_path}/Headers + "${framework_path}/Versions/Current" + "${framework_path}/Versions/@LY_PYTHON_VERSION_MAJOR_MINOR@/Headers" + "${framework_path}/Versions/@LY_PYTHON_VERSION_MAJOR_MINOR@/lib/Python" + "${framework_path}/Versions/@LY_PYTHON_VERSION_MAJOR_MINOR@/lib/python@LY_PYTHON_VERSION_MAJOR_MINOR@/test" + "${framework_path}/Versions/@LY_PYTHON_VERSION_MAJOR_MINOR@/lib/python@LY_PYTHON_VERSION_MAJOR_MINOR@/site-packages/scipy/io/tests" + "${framework_path}/Python" + "${framework_path}/Resources" + "${framework_path}/Headers" ) file(GLOB_RECURSE exe_file_list "${framework_path}/**/*.exe") if(exe_file_list) - file(REMOVE_RECURSE ${exe_file_list}) + file(REMOVE_RECURSE "${exe_file_list}") endif() - execute_process(COMMAND ${CMAKE_COMMAND} -E create_symlink include/python@LY_PYTHON_VERSION_MAJOR_MINOR@m Headers - WORKING_DIRECTORY ${framework_path}/Versions/@LY_PYTHON_VERSION_MAJOR_MINOR@ + execute_process(COMMAND "${CMAKE_COMMAND}" -E create_symlink include/python@LY_PYTHON_VERSION_MAJOR_MINOR@m Headers + WORKING_DIRECTORY "${framework_path}/Versions/@LY_PYTHON_VERSION_MAJOR_MINOR@" ) - execute_process(COMMAND ${CMAKE_COMMAND} -E create_symlink @LY_PYTHON_VERSION_MAJOR_MINOR@ Current - WORKING_DIRECTORY ${framework_path}/Versions/ + execute_process(COMMAND "${CMAKE_COMMAND}" -E create_symlink @LY_PYTHON_VERSION_MAJOR_MINOR@ Current + WORKING_DIRECTORY "${framework_path}/Versions/" ) - execute_process(COMMAND ${CMAKE_COMMAND} -E create_symlink Versions/Current/Python Python - WORKING_DIRECTORY ${framework_path} + execute_process(COMMAND "${CMAKE_COMMAND}" -E create_symlink Versions/Current/Python Python + WORKING_DIRECTORY "${framework_path}" ) - execute_process(COMMAND ${CMAKE_COMMAND} -E create_symlink Versions/Current/Headers Headers - WORKING_DIRECTORY ${framework_path} + execute_process(COMMAND "${CMAKE_COMMAND}" -E create_symlink Versions/Current/Headers Headers + WORKING_DIRECTORY "${framework_path}" ) - execute_process(COMMAND ${CMAKE_COMMAND} -E create_symlink Versions/Current/Resources Resources - WORKING_DIRECTORY ${framework_path} + execute_process(COMMAND "${CMAKE_COMMAND}" -E create_symlink Versions/Current/Resources Resources + WORKING_DIRECTORY "${framework_path}" ) - file(CHMOD ${framework_path}/Versions/Current/Python + file(CHMOD "${framework_path}/Versions/Current/Python" PERMISSIONS OWNER_READ OWNER_WRITE OWNER_EXECUTE GROUP_READ GROUP_WRITE GROUP_EXECUTE WORLD_READ WORLD_EXECUTE ) @@ -72,7 +72,7 @@ function(codesign_file file entitlement_file) return() endif() - if(EXISTS ${entitlement_file}) + if(EXISTS "${entitlement_file}") execute_process(COMMAND "/usr/bin/codesign" "--force" "--sign" "@LY_CODE_SIGN_IDENTITY@" "--deep" "-o" "runtime" "--timestamp" "--entitlements" "${entitlement_file}" "${file}" TIMEOUT 300 @@ -108,8 +108,8 @@ function(codesign_python_framework_binaries framework_path) "${framework_path}/Versions/@LY_PYTHON_VERSION_MAJOR_MINOR@/Resources/**") foreach(file ${files}) - if(NOT EXISTS ${file}) - file(REMOVE ${file}) + if(NOT EXISTS "${file}") + file(REMOVE "${file}") continue() endif() cmake_path(SET path_var "${file}") @@ -130,41 +130,50 @@ endfunction() function(ly_copy source_file target_directory) - if("${source_file}" MATCHES "\\.[Ff]ramework[^\\.]") + if("${source_file}" MATCHES "\\.[Ff]ramework") # fixup origin to copy the whole Framework folder string(REGEX REPLACE "(.*\\.[Ff]ramework).*" "\\1" source_file "${source_file}") endif() - get_filename_component(target_filename "${source_file}" NAME) - file(COPY "${source_file}" DESTINATION "${target_directory}" FILE_PERMISSIONS @LY_COPY_PERMISSIONS@ FOLLOW_SYMLINK_CHAIN) - # Our Qt and Python frameworks aren't in the correct bundle format to be codesigned. - if("${target_filename}" MATCHES "(Qt[^.]+)\\.[Ff]ramework") - fixup_qt_framework(${CMAKE_MATCH_1} "${target_directory}/${target_filename}") - # For some Qt frameworks(QtCore), signing the bundle doesn't work because of bundle - # format issues(despite the fixes above). But once we've patched the framework above, there's - # only one executable that we need to sign so we can do it directly. - set(target_filename "${target_filename}/Versions/5/${CMAKE_MATCH_1}") - elseif("${target_filename}" MATCHES "Python.framework") - fixup_python_framework("${target_directory}/${target_filename}") - codesign_python_framework_binaries("${target_directory}/${target_filename}") + cmake_path(GET source_file FILENAME target_filename) + cmake_path(APPEND full_target_directory "$ENV{DESTDIR}${CMAKE_INSTALL_PREFIX}" "${target_directory}") + cmake_path(APPEND target_file "${full_target_directory}" "${target_filename}") + + if("${source_file}" IS_NEWER_THAN "${target_file}") + message(STATUS "Copying ${source_file} to ${full_target_directory}...") + file(MAKE_DIRECTORY "${full_target_directory}") + file(COPY "${source_file}" DESTINATION "${full_target_directory}" FILE_PERMISSIONS @LY_COPY_PERMISSIONS@ FOLLOW_SYMLINK_CHAIN) + file(TOUCH_NOCREATE "${target_file}") + + # Our Qt and Python frameworks aren't in the correct bundle format to be codesigned. + if("${target_filename}" MATCHES "(Qt[^.]+)\\.[Ff]ramework") + fixup_qt_framework(${CMAKE_MATCH_1} "${target_file}") + # For some Qt frameworks(QtCore), signing the bundle doesn't work because of bundle + # format issues(despite the fixes above). But once we've patched the framework above, there's + # only one executable that we need to sign so we can do it directly. + set(target_filename "${target_filename}/Versions/5/${CMAKE_MATCH_1}") + elseif("${target_filename}" MATCHES "Python.framework") + fixup_python_framework("${target_file}") + codesign_python_framework_binaries("${target_file}") + endif() + codesign_file("${target_file}" "none") endif() - codesign_file("${target_directory}/${target_filename}" "none") endfunction() function(ly_download_and_codesign_sdk_python) - execute_process(COMMAND ${CMAKE_COMMAND} -DPAL_PLATFORM_NAME=Mac -DLY_3RDPARTY_PATH=${CMAKE_INSTALL_PREFIX}/python -P ${CMAKE_INSTALL_PREFIX}/python/get_python.cmake - WORKING_DIRECTORY ${CMAKE_INSTALL_PREFIX} + execute_process(COMMAND "${CMAKE_COMMAND}" -DPAL_PLATFORM_NAME=Mac "-DLY_3RDPARTY_PATH=${CMAKE_INSTALL_PREFIX}/python" -P "${CMAKE_INSTALL_PREFIX}/python/get_python.cmake" + WORKING_DIRECTORY "${CMAKE_INSTALL_PREFIX}" ) - fixup_python_framework(${CMAKE_INSTALL_PREFIX}/python/runtime/@LY_PYTHON_PACKAGE_NAME@/Python.framework) - codesign_python_framework_binaries(${CMAKE_INSTALL_PREFIX}/python/runtime/@LY_PYTHON_PACKAGE_NAME@/Python.framework) - codesign_file(${CMAKE_INSTALL_PREFIX}/python/runtime/@LY_PYTHON_PACKAGE_NAME@/Python.framework @LY_ROOT_FOLDER@/python/Platform/Mac/PythonEntitlements.plist) + fixup_python_framework("${CMAKE_INSTALL_PREFIX}/python/runtime/@LY_PYTHON_PACKAGE_NAME@/Python.framework") + codesign_python_framework_binaries("${CMAKE_INSTALL_PREFIX}/python/runtime/@LY_PYTHON_PACKAGE_NAME@/Python.framework") + codesign_file("${CMAKE_INSTALL_PREFIX}/python/runtime/@LY_PYTHON_PACKAGE_NAME@/Python.framework" "@LY_ROOT_FOLDER@/python/Platform/Mac/PythonEntitlements.plist") endfunction() function(ly_codesign_sdk) - codesign_file(${LY_INSTALL_PATH_ORIGINAL}/O3DE_SDK.app "none") + codesign_file("${LY_INSTALL_PATH_ORIGINAL}/O3DE_SDK.app" "none") endfunction() diff --git a/cmake/Platform/Mac/Install_mac.cmake b/cmake/Platform/Mac/Install_mac.cmake index c75d860c3e..d5ab5d0fed 100644 --- a/cmake/Platform/Mac/Install_mac.cmake +++ b/cmake/Platform/Mac/Install_mac.cmake @@ -147,4 +147,3 @@ function(ly_post_install_steps) ") endfunction() - diff --git a/cmake/Platform/Mac/PackagingPostBuild_mac.cmake b/cmake/Platform/Mac/PackagingPostBuild_mac.cmake new file mode 100644 index 0000000000..5fa3787c21 --- /dev/null +++ b/cmake/Platform/Mac/PackagingPostBuild_mac.cmake @@ -0,0 +1,10 @@ +# +# Copyright (c) Contributors to the Open 3D Engine Project. +# For complete copyright and license terms please see the LICENSE at the root of this distribution. +# +# SPDX-License-Identifier: Apache-2.0 OR MIT +# +# + +file(REAL_PATH "${CPACK_SOURCE_DIR}/.." LY_ROOT_FOLDER) +include(${LY_ROOT_FOLDER}/cmake/Platform/Common/PackagingPostBuild_common.cmake) diff --git a/cmake/Platform/Mac/PackagingPreBuild_mac.cmake b/cmake/Platform/Mac/PackagingPreBuild_mac.cmake new file mode 100644 index 0000000000..1d30e21767 --- /dev/null +++ b/cmake/Platform/Mac/PackagingPreBuild_mac.cmake @@ -0,0 +1,10 @@ +# +# Copyright (c) Contributors to the Open 3D Engine Project. +# For complete copyright and license terms please see the LICENSE at the root of this distribution. +# +# SPDX-License-Identifier: Apache-2.0 OR MIT +# +# + +file(REAL_PATH "${CPACK_SOURCE_DIR}/.." LY_ROOT_FOLDER) +include(${LY_ROOT_FOLDER}/cmake/Platform/Common/PackagingPreBuild_common.cmake) diff --git a/cmake/Platform/Mac/runtime_dependencies_mac.cmake.in b/cmake/Platform/Mac/runtime_dependencies_mac.cmake.in index 11551f608f..51e6e5830c 100644 --- a/cmake/Platform/Mac/runtime_dependencies_mac.cmake.in +++ b/cmake/Platform/Mac/runtime_dependencies_mac.cmake.in @@ -34,7 +34,7 @@ endif() function(ly_copy source_file target_directory) - get_filename_component(target_filename "${source_file}" NAME) + cmake_path(GET source_file FILENAME target_filename) # If target_directory is a bundle if("${target_directory}" MATCHES "\\.app/Contents/MacOS") @@ -113,20 +113,37 @@ function(ly_copy source_file target_directory) endif() - cmake_path(COMPARE "${source_file}" EQUAL "${target_directory}/${target_filename}" same_location) + cmake_path(APPEND target_file "${target_directory}" "${target_filename}") + cmake_path(COMPARE "${source_file}" EQUAL "${target_file}" same_location) if(NOT ${same_location}) if(NOT EXISTS "${target_directory}") file(MAKE_DIRECTORY "${target_directory}") endif() - if(NOT EXISTS "${target_directory}/${target_filename}" OR "${source_file}" IS_NEWER_THAN "${target_directory}/${target_filename}") - message(STATUS "Copying \"${source_file}\" to \"${target_directory}\"...") - if(NOT target_is_bundle) - # if it is a bundle, there is no contention about the files in the destination, each bundle target will copy everything - # we dont want these files to invalidate the bundle and cause a new signature - file(LOCK ${target_directory}/${target_filename}.lock GUARD FUNCTION TIMEOUT 300) + + set(is_framework FALSE) + if("${source_file}" MATCHES "\\.[Ff]ramework") + set(is_framework TRUE) + endif() + if(NOT is_framework) + # if it is a bundle, there is no contention about the files in the destination, each bundle target will copy everything + # we dont want these files to invalidate the bundle and cause a new signature + file(LOCK "${target_file}.lock" GUARD FUNCTION TIMEOUT 300) + file(SIZE "${source_file}" source_file_size) + if(EXISTS "${target_file}") + file(SIZE "${target_file}" target_file_size) + else() + set(target_file_size 0) endif() + else() + set(source_file_size 0) + set(target_file_size 0) + endif() + + if((NOT source_file_size EQUAL target_file_size) OR "${source_file}" IS_NEWER_THAN "${target_file}") + message(STATUS "Copying \"${source_file}\" to \"${target_directory}\"...") + file(MAKE_DIRECTORY "${target_directory}") file(COPY "${source_file}" DESTINATION "${target_directory}" FILE_PERMISSIONS @LY_COPY_PERMISSIONS@ FOLLOW_SYMLINK_CHAIN) - file(TOUCH_NOCREATE ${target_directory}/${target_filename}) + file(TOUCH_NOCREATE "${target_file}") set(anything_new TRUE PARENT_SCOPE) endif() endif() @@ -159,35 +176,35 @@ if(@target_file_dir@ MATCHES ".app/Contents/MacOS") message(STATUS "Fixing ${bundle_path}/Contents/Frameworks/Python.framework...") list(APPEND fixup_bundle_ignore Python python3.7m python3.7) file(REMOVE_RECURSE - ${bundle_path}/Contents/Frameworks/Python.framework/Versions/Current - ${bundle_path}/Contents/Frameworks/Python.framework/Versions/3.7/Headers - ${bundle_path}/Contents/Frameworks/Python.framework/Versions/3.7/lib/Python - ${bundle_path}/Contents/Frameworks/Python.framework/Versions/3.7/lib/python3.7/test - ${bundle_path}/Contents/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-packages/scipy/io/tests - ${bundle_path}/Contents/Frameworks/Python.framework/Python - ${bundle_path}/Contents/Frameworks/Python.framework/Resources - ${bundle_path}/Contents/Frameworks/Python.framework/Headers + "${bundle_path}/Contents/Frameworks/Python.framework/Versions/Current" + "${bundle_path}/Contents/Frameworks/Python.framework/Versions/3.7/Headers" + "${bundle_path}/Contents/Frameworks/Python.framework/Versions/3.7/lib/Python" + "${bundle_path}/Contents/Frameworks/Python.framework/Versions/3.7/lib/python3.7/test" + "${bundle_path}/Contents/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-packages/scipy/io/tests" + "${bundle_path}/Contents/Frameworks/Python.framework/Python" + "${bundle_path}/Contents/Frameworks/Python.framework/Resources" + "${bundle_path}/Contents/Frameworks/Python.framework/Headers" ) file(GLOB_RECURSE exe_file_list "${bundle_path}/Contents/Frameworks/Python.framework/**/*.exe") if(exe_file_list) - file(REMOVE_RECURSE ${exe_file_list}) + file(REMOVE_RECURSE "${exe_file_list}") endif() - execute_process(COMMAND ${CMAKE_COMMAND} -E create_symlink include/python3.7m Headers - WORKING_DIRECTORY ${bundle_path}/Contents/Frameworks/Python.framework/Versions/3.7 + execute_process(COMMAND "${CMAKE_COMMAND}" -E create_symlink include/python3.7m Headers + WORKING_DIRECTORY "${bundle_path}/Contents/Frameworks/Python.framework/Versions/3.7" ) - execute_process(COMMAND ${CMAKE_COMMAND} -E create_symlink 3.7 Current - WORKING_DIRECTORY ${bundle_path}/Contents/Frameworks/Python.framework/Versions/ + execute_process(COMMAND "${CMAKE_COMMAND}" -E create_symlink 3.7 Current + WORKING_DIRECTORY "${bundle_path}/Contents/Frameworks/Python.framework/Versions/" ) - execute_process(COMMAND ${CMAKE_COMMAND} -E create_symlink Versions/Current/Python Python - WORKING_DIRECTORY ${bundle_path}/Contents/Frameworks/Python.framework + execute_process(COMMAND "${CMAKE_COMMAND}" -E create_symlink Versions/Current/Python Python + WORKING_DIRECTORY "${bundle_path}/Contents/Frameworks/Python.framework" ) - execute_process(COMMAND ${CMAKE_COMMAND} -E create_symlink Versions/Current/Headers Headers - WORKING_DIRECTORY ${bundle_path}/Contents/Frameworks/Python.framework + execute_process(COMMAND "${CMAKE_COMMAND}" -E create_symlink Versions/Current/Headers Headers + WORKING_DIRECTORY "${bundle_path}/Contents/Frameworks/Python.framework" ) - execute_process(COMMAND ${CMAKE_COMMAND} -E create_symlink Versions/Current/Resources Resources - WORKING_DIRECTORY ${bundle_path}/Contents/Frameworks/Python.framework + execute_process(COMMAND "${CMAKE_COMMAND}" -E create_symlink Versions/Current/Resources Resources + WORKING_DIRECTORY "${bundle_path}/Contents/Frameworks/Python.framework" ) - file(CHMOD ${bundle_path}/Contents/Frameworks/Python.framework/Versions/Current/Python + file(CHMOD "${bundle_path}/Contents/Frameworks/Python.framework/Versions/Current/Python" PERMISSIONS OWNER_READ OWNER_WRITE OWNER_EXECUTE GROUP_READ GROUP_WRITE GROUP_EXECUTE WORLD_READ WORLD_EXECUTE ) endif() @@ -198,8 +215,8 @@ if(@target_file_dir@ MATCHES ".app/Contents/MacOS") file(TOUCH "${fixup_timestamp_file}") # fixup bundle ends up removing the rpath of dxc (despite we exclude it) - if(EXISTS ${bundle_path}/Contents/MacOS/Builders/DirectXShaderCompiler/bin/dxc-3.7) - execute_process(COMMAND ${LY_INSTALL_NAME_TOOL} -add_rpath @executable_path/../lib ${bundle_path}/Contents/MacOS/Builders/DirectXShaderCompiler/bin/dxc-3.7) + if(EXISTS "${bundle_path}/Contents/MacOS/Builders/DirectXShaderCompiler/bin/dxc-3.7") + execute_process(COMMAND $"{LY_INSTALL_NAME_TOOL}" -add_rpath @executable_path/../lib ${bundle_path}/Contents/MacOS/Builders/DirectXShaderCompiler/bin/dxc-3.7) endif() # misplaced .DS_Store files can cause signing to fail @@ -209,7 +226,7 @@ if(@target_file_dir@ MATCHES ".app/Contents/MacOS") "${bundle_path/}**/*.cstemp" ) if(remove_file_list) - file(REMOVE_RECURSE ${remove_file_list}) + file(REMOVE_RECURSE "${remove_file_list}") endif() endif() @@ -218,7 +235,7 @@ else() # Non-bundle case if(depends_on_python) # RPATH fix python - execute_process(COMMAND ${LY_INSTALL_NAME_TOOL} -change @rpath/Python @rpath/Python.framework/Versions/Current/Python @target_file@) + execute_process(COMMAND "${LY_INSTALL_NAME_TOOL}" -change @rpath/Python @rpath/Python.framework/Versions/Current/Python "@target_file@") endif() endif() diff --git a/cmake/Platform/Windows/PackagingCodeSign_windows.cmake b/cmake/Platform/Windows/PackagingCodeSign_windows.cmake new file mode 100644 index 0000000000..8ef7f79e40 --- /dev/null +++ b/cmake/Platform/Windows/PackagingCodeSign_windows.cmake @@ -0,0 +1,56 @@ +# +# Copyright (c) Contributors to the Open 3D Engine Project. +# For complete copyright and license terms please see the LICENSE at the root of this distribution. +# +# SPDX-License-Identifier: Apache-2.0 OR MIT +# +# + +function(ly_sign_binaries in_path in_path_type) + message(STATUS "Executing package signing...") + file(REAL_PATH "${CPACK_SOURCE_DIR}/.." _root_path) + unset(_signing_command) + + cmake_path(SET _sign_script "${_root_path}/scripts/signer/Platform/Windows/signer.ps1") + + find_program(_psiexec_path psexec.exe) + if(_psiexec_path) + list(APPEND _signing_command + ${_psiexec_path} + -accepteula + -nobanner + -s + ) + endif() + + find_program(_powershell_path powershell.exe REQUIRED) + list(APPEND _signing_command + ${_powershell_path} + -NoLogo + -ExecutionPolicy Bypass + -File ${_sign_script} + ) + + # This requires to have a valid local certificate. In continuous integration, these certificates are stored + # in the machine directly. + # You can generate a test certificate to be able to run this in a PowerShell elevated promp with: + # New-SelfSignedCertificate -DnsName foo.o3de.com -Type CodeSigning -CertStoreLocation Cert:\CurrentUser\My + # Export-Certificate -Cert (Get-ChildItem Cert:\CurrentUser\My\) -Filepath "c:\selfsigned.crt" + # Import-Certificate -FilePath "c:\selfsigned.crt" -Cert Cert:\CurrentUser\TrustedPublisher + # Import-Certificate -FilePath "c:\selfsigned.crt" -Cert Cert:\CurrentUser\Root + + message(STATUS "Signing ${in_path_type} files in ${in_path}") + execute_process( + COMMAND ${_signing_command} -${in_path_type} ${in_path} + RESULT_VARIABLE _signing_result + ERROR_VARIABLE _signing_errors + OUTPUT_VARIABLE _signing_output + ECHO_OUTPUT_VARIABLE + ) + + if(NOT ${_signing_result} EQUAL 0) + message(FATAL_ERROR "An error occurred during signing files for ${in_path_type}. ${_signing_errors}") + else() + message(STATUS "Signing complete!") + endif() +endfunction() diff --git a/cmake/Platform/Windows/PackagingPostBuild.cmake b/cmake/Platform/Windows/PackagingPostBuild.cmake deleted file mode 100644 index ac457bea87..0000000000 --- a/cmake/Platform/Windows/PackagingPostBuild.cmake +++ /dev/null @@ -1,249 +0,0 @@ -# -# Copyright (c) Contributors to the Open 3D Engine Project. -# For complete copyright and license terms please see the LICENSE at the root of this distribution. -# -# SPDX-License-Identifier: Apache-2.0 OR MIT -# -# - -# convert the path to a windows style path using string replace because TO_NATIVE_PATH -# only works on real paths -string(REPLACE "/" "\\" _fixed_package_install_dir ${CPACK_PACKAGE_INSTALL_DIRECTORY}) - -# directory where the auto generated files live e.g /_CPack_Package/win64/WIX -set(_cpack_wix_out_dir ${CPACK_TOPLEVEL_DIRECTORY}) -set(_bootstrap_out_dir "${CPACK_TOPLEVEL_DIRECTORY}/bootstrap") - -set(_bootstrap_filename "${CPACK_PACKAGE_FILE_NAME}_installer.exe") -set(_bootstrap_output_file ${_cpack_wix_out_dir}/${_bootstrap_filename}) - -set(_ext_flags - -ext WixBalExtension -) - -set(_addtional_defines - -dCPACK_BOOTSTRAP_THEME_FILE=${CPACK_BINARY_DIR}/BootstrapperTheme - -dCPACK_BOOTSTRAP_UPGRADE_GUID=${CPACK_WIX_BOOTSTRAP_UPGRADE_GUID} - -dCPACK_DOWNLOAD_SITE=${CPACK_DOWNLOAD_SITE} - -dCPACK_LOCAL_INSTALLER_DIR=${_cpack_wix_out_dir} - -dCPACK_PACKAGE_FILE_NAME=${CPACK_PACKAGE_FILE_NAME} - -dCPACK_PACKAGE_INSTALL_DIRECTORY=${_fixed_package_install_dir} - -dCPACK_WIX_PRODUCT_LOGO=${CPACK_WIX_PRODUCT_LOGO} - -dCPACK_RESOURCE_PATH=${CPACK_SOURCE_DIR}/Platform/Windows/Packaging -) - -if(CPACK_LICENSE_URL) - list(APPEND _addtional_defines -dCPACK_LICENSE_URL=${CPACK_LICENSE_URL}) -endif() - -set(_candle_command - ${CPACK_WIX_CANDLE_EXECUTABLE} - -nologo - -arch x64 - "-I${_cpack_wix_out_dir}" # to include cpack_variables.wxi - ${_addtional_defines} - ${_ext_flags} - "${CPACK_SOURCE_DIR}/Platform/Windows/Packaging/Bootstrapper.wxs" - -o "${_bootstrap_out_dir}/" -) - -set(_light_command - ${CPACK_WIX_LIGHT_EXECUTABLE} - -nologo - ${_ext_flags} - ${_bootstrap_out_dir}/*.wixobj - -o "${_bootstrap_output_file}" -) - -if(CPACK_UPLOAD_URL) # Skip signing if we are not uploading the package - file(REAL_PATH "${CPACK_SOURCE_DIR}/.." _root_path) - file(TO_NATIVE_PATH "${_root_path}/scripts/signer/Platform/Windows/signer.ps1" _sign_script) - - unset(_signing_command) - find_program(_psiexec_path psexec.exe) - if(_psiexec_path) - list(APPEND _signing_command - ${_psiexec_path} - -accepteula - -nobanner - -s - ) - endif() - - find_program(_powershell_path powershell.exe REQUIRED) - list(APPEND _signing_command - ${_powershell_path} - -NoLogo - -ExecutionPolicy Bypass - -File ${_sign_script} - ) - - message(STATUS "Signing package files in ${_cpack_wix_out_dir}") - execute_process( - COMMAND ${_signing_command} -packagePath ${_cpack_wix_out_dir} - RESULT_VARIABLE _signing_result - ERROR_VARIABLE _signing_errors - OUTPUT_VARIABLE _signing_output - ECHO_OUTPUT_VARIABLE - ) - - if(NOT ${_signing_result} EQUAL 0) - message(FATAL_ERROR "An error occurred during signing package files. ${_signing_errors}") - endif() -endif() - -message(STATUS "Creating Bootstrap Installer...") -execute_process( - COMMAND ${_candle_command} - RESULT_VARIABLE _candle_result - ERROR_VARIABLE _candle_errors -) -if(NOT ${_candle_result} EQUAL 0) - message(FATAL_ERROR "An error occurred invoking candle.exe. ${_candle_errors}") -endif() - -execute_process( - COMMAND ${_light_command} - RESULT_VARIABLE _light_result - ERROR_VARIABLE _light_errors -) -if(NOT ${_light_result} EQUAL 0) - message(FATAL_ERROR "An error occurred invoking light.exe. ${_light_errors}") -endif() - -file(COPY ${_bootstrap_output_file} - DESTINATION ${CPACK_PACKAGE_DIRECTORY} -) - -message(STATUS "Bootstrap installer generated to ${CPACK_PACKAGE_DIRECTORY}/${_bootstrap_filename}") - -if(CPACK_UPLOAD_URL) # Skip signing if we are not uploading the package - message(STATUS "Signing bootstrap installer in ${CPACK_PACKAGE_DIRECTORY}") - execute_process( - COMMAND ${_signing_command} -bootstrapPath ${CPACK_PACKAGE_DIRECTORY}/${_bootstrap_filename} - RESULT_VARIABLE _signing_result - ERROR_VARIABLE _signing_errors - OUTPUT_VARIABLE _signing_output - ECHO_OUTPUT_VARIABLE - ) - - if(NOT ${_signing_result} EQUAL 0) - message(FATAL_ERROR "An error occurred during signing bootstrap installer. ${_signing_errors}") - endif() -endif() - -# use the internal default path if somehow not specified from cpack_configure_downloads -if(NOT CPACK_UPLOAD_DIRECTORY) - set(CPACK_UPLOAD_DIRECTORY ${CPACK_PACKAGE_DIRECTORY}/CPackUploads) -endif() - -# copy the artifacts intended to be uploaded to a remote server into the folder specified -# through cpack_configure_downloads. this mimics the same process cpack does natively for -# some other frameworks that have built-in online installer support. -message(STATUS "Copying installer artifacts to upload directory...") -file(REMOVE_RECURSE ${CPACK_UPLOAD_DIRECTORY}) -file(GLOB _artifacts "${_cpack_wix_out_dir}/*.msi" "${_cpack_wix_out_dir}/*.cab") -file(COPY ${_artifacts} - DESTINATION ${CPACK_UPLOAD_DIRECTORY} -) -message(STATUS "Artifacts copied to ${CPACK_UPLOAD_DIRECTORY}") - -if(NOT CPACK_UPLOAD_URL) - return() -endif() - -file(TO_NATIVE_PATH "${_cpack_wix_out_dir}" _cpack_wix_out_dir) -file(TO_NATIVE_PATH "${_root_path}/python/python.cmd" _python_cmd) -file(TO_NATIVE_PATH "${_root_path}/scripts/build/tools/upload_to_s3.py" _upload_script) - -function(upload_to_s3 in_url in_local_path in_file_regex) - - # strip the scheme and extract the bucket/key prefix from the URL - string(REPLACE "s3://" "" _stripped_url ${in_url}) - string(REPLACE "/" ";" _tokens ${_stripped_url}) - - list(POP_FRONT _tokens _bucket) - string(JOIN "/" _prefix ${_tokens}) - - set(_extra_args [[{"ACL":"bucket-owner-full-control"}]]) - - set(_upload_command - ${_python_cmd} -s - -u ${_upload_script} - --base_dir ${in_local_path} - --file_regex="${in_file_regex}" - --bucket ${_bucket} - --key_prefix ${_prefix} - --extra_args ${_extra_args} - ) - - if(CPACK_AWS_PROFILE) - list(APPEND _upload_command --profile ${CPACK_AWS_PROFILE}) - endif() - - execute_process( - COMMAND ${_upload_command} - RESULT_VARIABLE _upload_result - OUTPUT_VARIABLE _upload_output - OUTPUT_STRIP_TRAILING_WHITESPACE - ) - - if (NOT ${_upload_result} EQUAL 0) - message(FATAL_ERROR "An error occurred uploading to s3.\nOutput:\n${_upload_output}") - endif() -endfunction() - -message(STATUS "Uploading artifacts to ${CPACK_UPLOAD_URL}") -upload_to_s3( - ${CPACK_UPLOAD_URL} - ${_cpack_wix_out_dir} - ".*(cab|exe|msi)$" -) -message(STATUS "Artifact uploading complete!") - -# for auto tagged builds, we will also upload a second copy of just the boostrapper -# to a special "Latest" folder under the branch in place of the commit date/hash -if(CPACK_AUTO_GEN_TAG) - message(STATUS "Updating latest tagged build") - - # make sure we can extra the commit info from the URL first - string(REGEX MATCH "([0-9][0-9][0-9][0-9]-[0-9][0-9]-[0-9][0-9]-[0-9a-zA-Z]+)" - _commit_info ${CPACK_UPLOAD_URL} - ) - if(NOT _commit_info) - message(FATAL_ERROR "Failed to extract the build tag") - endif() - - set(_temp_dir ${_cpack_wix_out_dir}/temp) - if(NOT EXISTS ${_temp_dir}) - file(MAKE_DIRECTORY ${_temp_dir}) - endif() - - # strip the version number form the exe name in the one uploaded to latest - string(TOLOWER "${CPACK_PACKAGE_NAME}_installer.exe" _non_versioned_exe) - set(_temp_exe_copy ${_temp_dir}/${_non_versioned_exe}) - - file(COPY ${_bootstrap_output_file} DESTINATION ${_temp_dir}) - file(RENAME "${_temp_dir}/${_bootstrap_filename}" ${_temp_exe_copy}) - - # include the commit info in a text file that will live next to the exe - set(_temp_info_file ${_temp_dir}/build_tag.txt) - file(WRITE ${_temp_info_file} ${_commit_info}) - - # update the URL and upload - string(REPLACE - ${_commit_info} "Latest" - _latest_upload_url ${CPACK_UPLOAD_URL} - ) - - upload_to_s3( - ${_latest_upload_url} - ${_temp_dir} - ".*(${_non_versioned_exe}|build_tag.txt)$" - ) - - # cleanup the temp files - file(REMOVE_RECURSE ${_temp_dir}) - - message(STATUS "Latest build update complete!") -endif() diff --git a/cmake/Platform/Windows/PackagingPostBuild_windows.cmake b/cmake/Platform/Windows/PackagingPostBuild_windows.cmake new file mode 100644 index 0000000000..832e8675f2 --- /dev/null +++ b/cmake/Platform/Windows/PackagingPostBuild_windows.cmake @@ -0,0 +1,125 @@ +# +# Copyright (c) Contributors to the Open 3D Engine Project. +# For complete copyright and license terms please see the LICENSE at the root of this distribution. +# +# SPDX-License-Identifier: Apache-2.0 OR MIT +# +# + +file(REAL_PATH "${CPACK_SOURCE_DIR}/.." LY_ROOT_FOLDER) +include(${LY_ROOT_FOLDER}/cmake/Platform/Common/PackagingPostBuild_common.cmake) +include(${CPACK_CODESIGN_SCRIPT}) + +# convert the path to a windows style path using string replace because TO_NATIVE_PATH +# only works on real paths +string(REPLACE "/" "\\" _fixed_package_install_dir ${CPACK_PACKAGE_INSTALL_DIRECTORY}) + +# directory where the auto generated files live e.g /_CPack_Package/win64/WIX +set(_cpack_wix_out_dir ${CPACK_TOPLEVEL_DIRECTORY}) +set(_bootstrap_out_dir "${CPACK_TOPLEVEL_DIRECTORY}/bootstrap") + +set(_bootstrap_filename "${CPACK_PACKAGE_FILE_NAME}_installer.exe") +set(_bootstrap_output_file ${_cpack_wix_out_dir}/${_bootstrap_filename}) + +set(_ext_flags + -ext WixBalExtension +) + +set(_addtional_defines + -dCPACK_BOOTSTRAP_THEME_FILE=${CPACK_BINARY_DIR}/BootstrapperTheme + -dCPACK_BOOTSTRAP_UPGRADE_GUID=${CPACK_WIX_BOOTSTRAP_UPGRADE_GUID} + -dCPACK_DOWNLOAD_SITE=${CPACK_DOWNLOAD_SITE} + -dCPACK_LOCAL_INSTALLER_DIR=${_cpack_wix_out_dir} + -dCPACK_PACKAGE_FILE_NAME=${CPACK_PACKAGE_FILE_NAME} + -dCPACK_PACKAGE_INSTALL_DIRECTORY=${_fixed_package_install_dir} + -dCPACK_WIX_PRODUCT_LOGO=${CPACK_WIX_PRODUCT_LOGO} + -dCPACK_RESOURCE_PATH=${CPACK_SOURCE_DIR}/Platform/Windows/Packaging +) + +if(CPACK_LICENSE_URL) + list(APPEND _addtional_defines -dCPACK_LICENSE_URL=${CPACK_LICENSE_URL}) +endif() + +set(_candle_command + ${CPACK_WIX_CANDLE_EXECUTABLE} + -nologo + -arch x64 + "-I${_cpack_wix_out_dir}" # to include cpack_variables.wxi + ${_addtional_defines} + ${_ext_flags} + "${CPACK_SOURCE_DIR}/Platform/Windows/Packaging/Bootstrapper.wxs" + -o "${_bootstrap_out_dir}/" +) + +set(_light_command + ${CPACK_WIX_LIGHT_EXECUTABLE} + -nologo + ${_ext_flags} + ${_bootstrap_out_dir}/*.wixobj + -o "${_bootstrap_output_file}" +) + +if(CPACK_UPLOAD_URL) # Skip signing if we are not uploading the package + ly_sign_binaries("${_cpack_wix_out_dir}" "packagePath") +endif() + +message(STATUS "Creating Bootstrap Installer...") +execute_process( + COMMAND ${_candle_command} + RESULT_VARIABLE _candle_result + ERROR_VARIABLE _candle_errors +) +if(NOT ${_candle_result} EQUAL 0) + message(FATAL_ERROR "An error occurred invoking candle.exe. ${_candle_errors}") +endif() + +execute_process( + COMMAND ${_light_command} + RESULT_VARIABLE _light_result + ERROR_VARIABLE _light_errors +) +if(NOT ${_light_result} EQUAL 0) + message(FATAL_ERROR "An error occurred invoking light.exe. ${_light_errors}") +endif() + +message(STATUS "Bootstrap installer generated to ${_bootstrap_output_file}") + +if(CPACK_UPLOAD_URL) # Skip signing if we are not uploading the package + ly_sign_binaries("${_bootstrap_output_file}" "bootstrapPath") +endif() + +# use the internal default path if somehow not specified from cpack_configure_downloads +if(NOT CPACK_UPLOAD_DIRECTORY) + set(CPACK_UPLOAD_DIRECTORY ${CPACK_PACKAGE_DIRECTORY}/CPackUploads) +endif() + +# Copy the artifacts intended to be uploaded to a remote server into the folder specified +# through CPACK_UPLOAD_DIRECTORY. This mimics the same process cpack does natively for +# some other frameworks that have built-in online installer support. +message(STATUS "Copying packaging artifacts to upload directory...") +file(REMOVE_RECURSE ${CPACK_UPLOAD_DIRECTORY}) +file(GLOB _artifacts + "${_cpack_wix_out_dir}/*.msi" + "${_cpack_wix_out_dir}/*.cab" + "${_cpack_wix_out_dir}/*.exe" + "${CPACK_3P_LICENSE_FILE}" + "${CPACK_3P_MANIFEST_FILE}" +) +file(COPY ${_artifacts} + DESTINATION ${CPACK_UPLOAD_DIRECTORY} +) +message(STATUS "Artifacts copied to ${CPACK_UPLOAD_DIRECTORY}") + +if(CPACK_UPLOAD_URL) + ly_upload_to_url( + ${CPACK_UPLOAD_URL} + ${CPACK_UPLOAD_DIRECTORY} + ".*(.cab|.exe|.msi|.txt|.json)$" + ) + + # for auto tagged builds, we will also upload a second copy of just the boostrapper + # to a special "Latest" folder under the branch in place of the commit date/hash + if(CPACK_AUTO_GEN_TAG) + ly_upload_to_latest(${CPACK_UPLOAD_URL} ${_bootstrap_output_file}) + endif() +endif() diff --git a/cmake/Platform/Windows/PackagingPreBuild.cmake b/cmake/Platform/Windows/PackagingPreBuild.cmake deleted file mode 100644 index 7f2eedf352..0000000000 --- a/cmake/Platform/Windows/PackagingPreBuild.cmake +++ /dev/null @@ -1,57 +0,0 @@ -# -# Copyright (c) Contributors to the Open 3D Engine Project. -# For complete copyright and license terms please see the LICENSE at the root of this distribution. -# -# SPDX-License-Identifier: Apache-2.0 OR MIT -# -# - -if(NOT CPACK_UPLOAD_URL) # Skip signing if we are not uploading the package - return() -endif() - -file(REAL_PATH "${CPACK_SOURCE_DIR}/.." _root_path) -set(_cpack_wix_out_dir ${CPACK_TOPLEVEL_DIRECTORY}) -file(TO_NATIVE_PATH "${_root_path}/scripts/signer/Platform/Windows/signer.ps1" _sign_script) - -unset(_signing_command) -find_program(_psiexec_path psexec.exe) -if(_psiexec_path) - list(APPEND _signing_command - ${_psiexec_path} - -accepteula - -nobanner - -s - ) -endif() - -find_program(_powershell_path powershell.exe REQUIRED) -list(APPEND _signing_command - ${_powershell_path} - -NoLogo - -ExecutionPolicy Bypass - -File ${_sign_script} -) - -# This requires to have a valid local certificate. In continuous integration, these certificates are stored -# in the machine directly. -# You can generate a test certificate to be able to run this in a PowerShell elevated promp with: -# New-SelfSignedCertificate -DnsName foo.o3de.com -Type CodeSigning -CertStoreLocation Cert:\CurrentUser\My -# Export-Certificate -Cert (Get-ChildItem Cert:\CurrentUser\My\) -Filepath "c:\selfsigned.crt" -# Import-Certificate -FilePath "c:\selfsigned.crt" -Cert Cert:\CurrentUser\TrustedPublisher -# Import-Certificate -FilePath "c:\selfsigned.crt" -Cert Cert:\CurrentUser\Root - -message(STATUS "Signing executable files in ${_cpack_wix_out_dir}") -execute_process( - COMMAND ${_signing_command} -exePath ${_cpack_wix_out_dir} - RESULT_VARIABLE _signing_result - ERROR_VARIABLE _signing_errors - OUTPUT_VARIABLE _signing_output - ECHO_OUTPUT_VARIABLE -) - -if(NOT ${_signing_result} EQUAL 0) - message(FATAL_ERROR "An error occurred during signing executable files. ${_signing_errors}") -else() - message(STATUS "Signing exes complete!") -endif() diff --git a/cmake/Platform/Windows/PackagingPreBuild_windows.cmake b/cmake/Platform/Windows/PackagingPreBuild_windows.cmake new file mode 100644 index 0000000000..b6b5708a8c --- /dev/null +++ b/cmake/Platform/Windows/PackagingPreBuild_windows.cmake @@ -0,0 +1,18 @@ +# +# Copyright (c) Contributors to the Open 3D Engine Project. +# For complete copyright and license terms please see the LICENSE at the root of this distribution. +# +# SPDX-License-Identifier: Apache-2.0 OR MIT +# +# + +file(REAL_PATH "${CPACK_SOURCE_DIR}/.." LY_ROOT_FOLDER) +include(${LY_ROOT_FOLDER}/cmake/Platform/Common/PackagingPreBuild_common.cmake) +include(${CPACK_CODESIGN_SCRIPT}) + +if(NOT CPACK_UPLOAD_URL) # Skip signing if we are not uploading the package + return() +endif() + +set(_cpack_wix_out_dir ${CPACK_TOPLEVEL_DIRECTORY}) +ly_sign_binaries("${_cpack_wix_out_dir}" "exePath") \ No newline at end of file diff --git a/cmake/Platform/Windows/Packaging_windows.cmake b/cmake/Platform/Windows/Packaging_windows.cmake index 7b8f5a6c19..f24e9dee1c 100644 --- a/cmake/Platform/Windows/Packaging_windows.cmake +++ b/cmake/Platform/Windows/Packaging_windows.cmake @@ -23,7 +23,6 @@ set(CPACK_WIX_ROOT ${LY_INSTALLER_WIX_ROOT}) set(CPACK_GENERATOR WIX) -set(CPACK_THREADS 0) set(_cmake_package_name "cmake-${CPACK_DESIRED_CMAKE_VERSION}-windows-x86_64") set(CPACK_CMAKE_PACKAGE_FILE "${_cmake_package_name}.zip") set(CPACK_CMAKE_PACKAGE_HASH "15a49e2ab81c1822d75b1b1a92f7863f58e31f6d6aac1c4103eef2b071be3112") @@ -105,47 +104,35 @@ set(_raw_text_license [[ #(loc.InstallEulaAcceptance) ]]) -# The offline installer generation will be a single monolithic MSI. The WIX burn tool for the bootstrapper EXE has a size limitation. -# So we will exclude the generation of the boostrapper EXE in the offline case. -if(LY_INSTALLER_DOWNLOAD_URL) - set(WIX_THEME_WARNING_IMAGE ${CPACK_SOURCE_DIR}/Platform/Windows/Packaging/warning.png) +set(WIX_THEME_WARNING_IMAGE ${CPACK_SOURCE_DIR}/Platform/Windows/Packaging/warning.png) - if(LY_INSTALLER_LICENSE_URL) - set(WIX_THEME_INSTALL_LICENSE_ELEMENTS ${_hyperlink_license}) - set(WIX_THEME_EULA_ACCEPTANCE_TEXT "<a href=\"#\">Terms of Use</a>") - else() - set(WIX_THEME_INSTALL_LICENSE_ELEMENTS ${_raw_text_license}) - set(WIX_THEME_EULA_ACCEPTANCE_TEXT "Terms of Use above") - endif() - - # theme ux file - configure_file( - "${CPACK_SOURCE_DIR}/Platform/Windows/Packaging/BootstrapperTheme.xml.in" - "${CPACK_BINARY_DIR}/BootstrapperTheme.xml" - @ONLY - ) - - # theme localization file - configure_file( - "${CPACK_SOURCE_DIR}/Platform/Windows/Packaging/BootstrapperTheme.wxl.in" - "${CPACK_BINARY_DIR}/BootstrapperTheme.wxl" - @ONLY - ) - - set(_embed_artifacts "no") - - # the bootstrapper will at the very least need a different upgrade guid - generate_wix_guid(CPACK_WIX_BOOTSTRAP_UPGRADE_GUID "${_guid_seed_base}_Bootstrap_UpgradeCode") - - set(CPACK_PRE_BUILD_SCRIPTS - ${CPACK_SOURCE_DIR}/Platform/Windows/PackagingPreBuild.cmake - ) - - set(CPACK_POST_BUILD_SCRIPTS - ${CPACK_SOURCE_DIR}/Platform/Windows/PackagingPostBuild.cmake - ) +if(LY_INSTALLER_LICENSE_URL) + set(WIX_THEME_INSTALL_LICENSE_ELEMENTS ${_hyperlink_license}) + set(WIX_THEME_EULA_ACCEPTANCE_TEXT "<a href=\"#\">Terms of Use</a>") +else() + set(WIX_THEME_INSTALL_LICENSE_ELEMENTS ${_raw_text_license}) + set(WIX_THEME_EULA_ACCEPTANCE_TEXT "Terms of Use above") endif() +# theme ux file +configure_file( + "${CPACK_SOURCE_DIR}/Platform/Windows/Packaging/BootstrapperTheme.xml.in" + "${CPACK_BINARY_DIR}/BootstrapperTheme.xml" + @ONLY +) + +# theme localization file +configure_file( + "${CPACK_SOURCE_DIR}/Platform/Windows/Packaging/BootstrapperTheme.wxl.in" + "${CPACK_BINARY_DIR}/BootstrapperTheme.wxl" + @ONLY +) + +set(_embed_artifacts "no") + +# the bootstrapper will at the very least need a different upgrade guid +generate_wix_guid(CPACK_WIX_BOOTSTRAP_UPGRADE_GUID "${_guid_seed_base}_Bootstrap_UpgradeCode") + set(CPACK_WIX_CANDLE_EXTRA_FLAGS -dCPACK_EMBED_ARTIFACTS=${_embed_artifacts} -dCPACK_CMAKE_PACKAGE_NAME=${_cmake_package_name} diff --git a/cmake/Platform/Windows/platform_windows_files.cmake b/cmake/Platform/Windows/platform_windows_files.cmake index fcc47ab6eb..8ad242f842 100644 --- a/cmake/Platform/Windows/platform_windows_files.cmake +++ b/cmake/Platform/Windows/platform_windows_files.cmake @@ -15,6 +15,8 @@ set(FILES ../Common/MSVC/VisualStudio_common.cmake ../Common/Install_common.cmake ../Common/LYWrappers_default.cmake + ../Common/PackagingPostBuild_common.cmake + ../Common/PackagingPreBuild_common.cmake ../Common/TargetIncludeSystemDirectories_unsupported.cmake Configurations_windows.cmake LYTestWrappers_windows.cmake @@ -23,7 +25,9 @@ set(FILES PALDetection_windows.cmake Install_windows.cmake Packaging_windows.cmake - PackagingPostBuild.cmake + PackagingCodeSign_windows.cmake + PackagingPostBuild_windows.cmake + PackagingPreBuild_windows.cmake Packaging/Bootstrapper.wxs Packaging/BootstrapperTheme.wxl.in Packaging/BootstrapperTheme.xml.in diff --git a/cmake/Projects.cmake b/cmake/Projects.cmake index 34ef3efd9b..13161c9e0f 100644 --- a/cmake/Projects.cmake +++ b/cmake/Projects.cmake @@ -132,24 +132,7 @@ function(add_project_json_external_subdirectories project_path) endif() endfunction() -# Add the projects here so the above function is found -foreach(project ${LY_PROJECTS}) - file(REAL_PATH ${project} full_directory_path BASE_DIRECTORY ${CMAKE_SOURCE_DIR}) - string(SHA256 full_directory_hash ${full_directory_path}) - - # Truncate the full_directory_hash down to 8 characters to avoid hitting the Windows 260 character path limit - # when the external subdirectory contains relative paths of significant length - string(SUBSTRING ${full_directory_hash} 0 8 full_directory_hash) - - get_filename_component(project_folder_name ${project} NAME) - list(APPEND LY_PROJECTS_FOLDER_NAME ${project_folder_name}) - add_subdirectory(${project} "${project_folder_name}-${full_directory_hash}") - ly_generate_project_build_path_setreg(${full_directory_path}) - add_project_json_external_subdirectories(${full_directory_path}) - - # Get project name - o3de_read_json_key(project_name ${full_directory_path}/project.json "project_name") - +function(install_project_asset_artifacts project_real_path) # The cmake tar command has a bit of a flaw # Any paths within the archive files it creates are relative to the current working directory. # That means with the setup of: @@ -172,13 +155,12 @@ if("${CMAKE_INSTALL_CONFIG_NAME}" MATCHES "^([Rr][Ee][Ll][Ee][Aa][Ss][Ee])$") if(NOT DEFINED LY_ASSET_DEPLOY_ASSET_TYPE) set(LY_ASSET_DEPLOY_ASSET_TYPE @LY_ASSET_DEPLOY_ASSET_TYPE@) endif() - message(STATUS "Generating ${install_pak_output_folder}/engine.pak from @full_directory_path@/Cache/${LY_ASSET_DEPLOY_ASSET_TYPE}") + message(STATUS "Generating ${install_pak_output_folder}/engine.pak from @project_real_path@/Cache/${LY_ASSET_DEPLOY_ASSET_TYPE}") file(MAKE_DIRECTORY "${install_pak_output_folder}") - cmake_path(SET cache_product_path "@full_directory_path@/Cache/${LY_ASSET_DEPLOY_ASSET_TYPE}") + cmake_path(SET cache_product_path "@project_real_path@/Cache/${LY_ASSET_DEPLOY_ASSET_TYPE}") # Copy the generated cmake_dependencies.*.setreg files for loading gems in non-monolithic to the cache file(GLOB gem_source_paths_setreg "${runtime_output_directory_RELEASE}/Registry/*.setreg") - # The MergeSettingsToRegistry_TargetBuildDependencyRegistry function looks for lowercase "registry" - # So make sure the to copy it to a lowercase path, so that it works on non-case sensitive filesystems + # The MergeSettingsToRegistry_TargetBuildDependencyRegistry function looks for lowercase "registry" directory file(MAKE_DIRECTORY "${cache_product_path}/registry") file(COPY ${gem_source_paths_setreg} DESTINATION "${cache_product_path}/registry") @@ -194,11 +176,42 @@ if("${CMAKE_INSTALL_CONFIG_NAME}" MATCHES "^([Rr][Ee][Ll][Ee][Aa][Ss][Ee])$") message(STATUS "${install_output_folder}/engine.pak generated") endif() endif() + + # Remove copied .setreg files from the Cache directory + unset(artifacts_to_remove) + foreach(gem_source_path_setreg IN LISTS gem_source_paths_setreg) + cmake_path(GET gem_source_path_setreg FILENAME setreg_filename) + list(APPEND artifacts_to_remove "${cache_product_path}/registry/${setreg_filename}") + endforeach() + if (artifacts_to_remove) + file(REMOVE ${artifacts_to_remove}) + endif() endif() ]=]) string(CONFIGURE "${install_engine_pak_template}" install_engine_pak_code @ONLY) ly_install_run_code("${install_engine_pak_code}") +endfunction() + +# Add the projects here so the above function is found +foreach(project ${LY_PROJECTS}) + file(REAL_PATH ${project} full_directory_path BASE_DIRECTORY ${CMAKE_SOURCE_DIR}) + string(SHA256 full_directory_hash ${full_directory_path}) + + # Truncate the full_directory_hash down to 8 characters to avoid hitting the Windows 260 character path limit + # when the external subdirectory contains relative paths of significant length + string(SUBSTRING ${full_directory_hash} 0 8 full_directory_hash) + + get_filename_component(project_folder_name ${project} NAME) + list(APPEND LY_PROJECTS_FOLDER_NAME ${project_folder_name}) + add_subdirectory(${project} "${project_folder_name}-${full_directory_hash}") + ly_generate_project_build_path_setreg(${full_directory_path}) + add_project_json_external_subdirectories(${full_directory_path}) + + # Get project name + o3de_read_json_key(project_name ${full_directory_path}/project.json "project_name") + + install_project_asset_artifacts(${full_directory_path}) endforeach() diff --git a/cmake/SettingsRegistry.cmake b/cmake/SettingsRegistry.cmake index c677aba7cf..e8c14ac8a0 100644 --- a/cmake/SettingsRegistry.cmake +++ b/cmake/SettingsRegistry.cmake @@ -33,6 +33,34 @@ set(gems_json_template [[ [=[ }]=] ) +#!ly_detect_cycle_through_visitation: Detects if there is a cycle based on a list of visited +# items. If the passed item is in the list, then there is a cycle. +# \arg:item - item being checked for the cycle +# \arg:visited_items - list of visited items +# \arg:visited_items_var - list of visited items variable, "item" will be added to the list +# \arg:cycle(variable) - empty string if there is no cycle (an empty string in cmake evaluates +# to false). If there is a cycle a cycle dependency string detailing the sequence of items +# that produce a cycle, e.g. A --> B --> C --> A +# +function(ly_detect_cycle_through_visitation item visited_items visited_items_var cycle) + if(item IN_LIST visited_items) + unset(dependency_cycle_loop) + foreach(visited_item IN LISTS visited_items) + string(APPEND dependency_cycle_loop ${visited_item}) + if(visited_item STREQUAL item) + string(APPEND dependency_cycle_loop " (cycle starts)") + endif() + string(APPEND dependency_cycle_loop " --> ") + endforeach() + string(APPEND dependency_cycle_loop "${item} (cycle ends)") + set(${cycle} "${dependency_cycle_loop}" PARENT_SCOPE) + else() + set(cycle "" PARENT_SCOPE) # no cycles + endif() + list(APPEND visited_items ${item}) + set(${visited_items_var} "${visited_items}" PARENT_SCOPE) +endfunction() + #!ly_get_gem_load_dependencies: Retrieves the list of "load" dependencies for a target # Visits through only MANUALLY_ADDED_DEPENDENCIES of targets with a GEM_MODULE property # to determine which gems a target needs to load @@ -44,6 +72,13 @@ function(ly_get_gem_load_dependencies ly_GEM_LOAD_DEPENDENCIES ly_TARGET) if(NOT TARGET ${ly_TARGET}) return() # Nothing to do endif() + # Internally we use a third parameter to pass the list of targets that we have traversed. This is + # used to detect runtime cycles + if(ARGC EQUAL 3) + set(ly_CYCLE_DETECTION_TARGETS ${ARGV2}) + else() + set(ly_CYCLE_DETECTION_TARGETS "") + endif() # Optimize the search by caching gem load dependencies get_property(are_dependencies_cached GLOBAL PROPERTY LY_GEM_LOAD_DEPENDENCIES_${ly_TARGET} SET) @@ -54,6 +89,13 @@ function(ly_get_gem_load_dependencies ly_GEM_LOAD_DEPENDENCIES ly_TARGET) return() endif() + # detect cycles + unset(cycle_detected) + ly_detect_cycle_through_visitation(${ly_TARGET} "${ly_CYCLE_DETECTION_TARGETS}" ly_CYCLE_DETECTION_TARGETS cycle_detected) + if(cycle_detected) + message(FATAL_ERROR "Runtime dependency detected: ${cycle_detected}") + endif() + unset(all_gem_load_dependencies) # For load dependencies, we want to copy over the dependency and traverse them @@ -69,7 +111,7 @@ function(ly_get_gem_load_dependencies ly_GEM_LOAD_DEPENDENCIES ly_TARGET) # and recurse into its manually added dependencies if (is_gem_target) unset(dependencies) - ly_get_gem_load_dependencies(dependencies ${dealias_load_dependency}) + ly_get_gem_load_dependencies(dependencies ${dealias_load_dependency} "${ly_CYCLE_DETECTION_TARGETS}") list(APPEND all_gem_load_dependencies ${dependencies}) list(APPEND all_gem_load_dependencies ${dealias_load_dependency}) endif() diff --git a/cmake/Tools/Platform/Android/android_deployment.py b/cmake/Tools/Platform/Android/android_deployment.py index f1a9fe92fb..1d02a086dc 100755 --- a/cmake/Tools/Platform/Android/android_deployment.py +++ b/cmake/Tools/Platform/Android/android_deployment.py @@ -180,16 +180,20 @@ class AndroidDeployment(object): call_arguments.extend(['-s', device_id]) call_arguments.extend(arg_list) + logging.debug(f"adb command: {subprocess.list2cmdline(call_arguments)}") try: output = subprocess.check_output(call_arguments, shell=True, stderr=subprocess.PIPE).decode(common.DEFAULT_TEXT_READ_ENCODING, common.ENCODING_ERROR_HANDLINGS) + logging.debug(f"adb output:\n{output}") return output except subprocess.CalledProcessError as err: - raise common.LmbrCmdError(err.stderr.decode(common.DEFAULT_TEXT_READ_ENCODING, - common.ENCODING_ERROR_HANDLINGS)) + std_out = err.stdout.decode(common.DEFAULT_TEXT_READ_ENCODING, common.ENCODING_ERROR_HANDLINGS) + std_err = err.stderr.decode(common.DEFAULT_TEXT_READ_ENCODING, common.ENCODING_ERROR_HANDLINGS) + logging.debug(f"adb returned non-zero.\noutput:\n{std_out}\nerror:\n{std_err}\n") + raise common.LmbrCmdError(std_err) def adb_shell(self, command, device_id): """ @@ -224,19 +228,15 @@ class AndroidDeployment(object): shell_command.append(path) - logging.debug(f"Testing {device_id}: ls {' '.join(shell_command)}") raw_output = self.adb_shell(command=' '.join(shell_command), device_id=device_id) if not raw_output: - logging.debug('adb_ls: No output given') return False, None if raw_output is None or any([error for error in error_messages if error in raw_output]): - logging.debug('adb_ls: Error message found') status = False else: - logging.debug('adb_ls: Command was successful') status = True return status, raw_output @@ -347,7 +347,7 @@ class AndroidDeployment(object): try: timestamp_string = self.adb_shell(command=f'cat {remote_file_path}', device_id=device_id).strip() - except (subprocess.CalledProcessError, AttributeError): + except (common.LmbrCmdError, AttributeError): return None if not timestamp_string: @@ -463,7 +463,7 @@ class AndroidDeployment(object): try: self.adb_call(arg_list=['push', str(path_to_deploy), target_path], device_id=target_device) - except subprocess.CalledProcessError as err: + except common.LmbrCmdError as err: # Something went wrong, clean up before leaving self.adb_shell(command=f'rm -rf {output_target}', device_id=target_device) diff --git a/cmake/Tools/Platform/Android/android_support.py b/cmake/Tools/Platform/Android/android_support.py index 54f1a4c8f4..657ef3b3e4 100755 --- a/cmake/Tools/Platform/Android/android_support.py +++ b/cmake/Tools/Platform/Android/android_support.py @@ -30,10 +30,11 @@ if ROOT_DEV_PATH not in sys.path: sys.path.append(ROOT_DEV_PATH) from cmake.Tools import common +from cmake.Tools.layout_tool import remove_link ANDROID_GRADLE_PLUGIN_COMPATIBILITY_MAP = { - '4.2.0': {'min_gradle_version': '6.7.1', + '4.2.2': {'min_gradle_version': '6.7.1', 'sdk_build': '30.0.2', 'default_ndk': '21.4.7075529', 'min_cmake_version': '3.20'} @@ -358,7 +359,7 @@ CUSTOM_GRADLE_COPY_NATIVE_CONFIG_FORMAT_STR = """ into 'outputs/native-lib/{abi}' }} - compile{config}Sources.dependsOn copyNativeLibs{config} + merge{config}JniLibFolders.dependsOn copyNativeLibs{config} copyNativeLibs{config}.mustRunAfter {{ tasks.findAll {{ task->task.name.contains('externalNativeBuild{config}') }} @@ -388,7 +389,7 @@ CUSTOM_GRADLE_COPY_REGISTRY_FOLDER_FORMAT_STR = """ include ('*.setreg') }} - compile{config}Sources.dependsOn copyRegistryFolder{config} + merge{config}Assets.dependsOn copyRegistryFolder{config} """ CUSTOM_GRADLE_COPY_REGISTRY_FOLDER_DEPENDENCY_FORMAT_STR = """ @@ -470,7 +471,8 @@ class AndroidProjectGenerator(object): def __init__(self, engine_root, build_dir, android_sdk_path, build_tool, android_sdk_platform, android_native_api_level, android_ndk, project_path, third_party_path, cmake_version, override_cmake_path, override_gradle_path, gradle_version, gradle_plugin_version, - override_ninja_path, include_assets_in_apk, asset_mode, asset_type, signing_config, native_build_path, is_test_project=False, + override_ninja_path, include_assets_in_apk, asset_mode, asset_type, signing_config, native_build_path, vulkan_validation_path, + extra_cmake_configure_args, is_test_project=False, overwrite_existing=True, unity_build_enabled=False): """ Initialize the object with all the required parameters needed to create an Android Project. The parameters should be verified before initializing this object @@ -494,6 +496,9 @@ class AndroidProjectGenerator(object): :param asset_mode: :param asset_type: :param signing_config: Optional signing configuration arguments + :param native_build_path: Override the native build staging path in gradle + :param vulkan_validation_path: Override the path to where the Vulkan Validation Layers libraries are (required when using NDK r23+) + :param extra_cmake_configure_args Additional arguments to supply cmake when configuring a project :param is_test_project: Flag to indicate if this is a unit test runner project. (If true, project_path, asset_mode, asset_type, and include_assets_in_apk are ignored) :param overwrite_existing: Flag to overwrite existing project files when being generated, or skip if they already exist. """ @@ -534,6 +539,10 @@ class AndroidProjectGenerator(object): self.native_build_path = native_build_path + self.vulkan_validation_path = vulkan_validation_path + + self.extra_cmake_configure_args = extra_cmake_configure_args + self.asset_mode = asset_mode self.asset_type = asset_type @@ -616,7 +625,7 @@ class AndroidProjectGenerator(object): gradle_wrapper_cmd.extend(['wrapper', '-p', str(self.build_dir.resolve())]) proc_result = subprocess.run(gradle_wrapper_cmd, - shell=True) + shell=(platform.system() == 'Windows')) if proc_result.returncode != 0: raise common.LmbrCmdError("Gradle was unable to generate a gradle wrapper for this project (code {}): {}" .format(proc_result.returncode, proc_result.stderr or ""), @@ -767,6 +776,8 @@ class AndroidProjectGenerator(object): # We must always delete 'src' any existing copied AzAndroid projects since building may pick up stale java sources lumberyard_app_src = az_android_dst_path / 'src' if lumberyard_app_src.exists(): + # special case the 'assets' directory before cleaning the whole directory tree + remove_link(lumberyard_app_src / 'main' / 'assets') common.remove_dir_path(lumberyard_app_src) logging.debug("Copying AzAndroid to '%s'", az_android_dst_path.resolve()) @@ -817,6 +828,9 @@ class AndroidProjectGenerator(object): f'"-DLY_3RDPARTY_PATH={template_third_party_path}"', f'"-DLY_UNITY_BUILD={template_unity_build}"'] + if self.vulkan_validation_path: + cmake_argument_list.append(f'"-DLY_ANDROID_VULKAN_VALIDATION_PATH={pathlib.PurePath(self.vulkan_validation_path).as_posix()}"') + if not self.is_test_project: cmake_argument_list.append(f'"-DLY_PROJECTS={pathlib.PurePath(self.project_path).as_posix()}"') else: @@ -834,6 +848,9 @@ class AndroidProjectGenerator(object): if self.override_ninja_path: cmake_argument_list.append(f'"-DCMAKE_MAKE_PROGRAM={common.normalize_path_for_settings(self.override_ninja_path)}"') + if self.extra_cmake_configure_args: + cmake_argument_list.extend(map(json.dumps, self.extra_cmake_configure_args)) + # Query the project_path from the project.json file project_name = common.read_project_name_from_project_json(self.project_path) # Prepare the config-specific section to place the cmake argument list in the build.gradle for the app @@ -1548,17 +1565,29 @@ class AndroidSDKResolver(object): self.version = LooseVersion(available_update_components[1]) self.available = available_update_components[2] - def __init__(self, android_sdk_path): + def __init__(self, android_sdk_path, command_line_tools_version): self.android_sdk_path = android_sdk_path or os.environ.get(ANDROID_SDK_ENV_NAME) if not self.android_sdk_path: raise common.LmbrCmdError(f"Android SDK path not set or it was not passed into the command to generate the android project") if not os.path.isdir(self.android_sdk_path): raise common.LmbrCmdError(f"Android SDK path {self.android_sdk_path} is not valid") - if platform.system() == 'Windows': - self.sdk_manager_path = pathlib.Path(self.android_sdk_path) / 'tools' / 'bin' / 'sdkmanager.bat' + + sdk_root = pathlib.Path(self.android_sdk_path) + + tools_path = sdk_root / 'cmdline-tools' + if tools_path.exists(): + tools_path = tools_path / command_line_tools_version + if not tools_path.exists(): + raise common.LmbrCmdError(f"The desired version of the Android 'cmdline-tools' ({command_line_tools_version}) is not detected") else: - raise common.LmbrCmdError(f"This tool is not supported on the current platform {platform.system()}") + tools_path = sdk_root / 'tools' + + ext = '' + if platform.system() == 'Windows': + ext = '.bat' + self.sdk_manager_path = tools_path / 'bin' / f'sdkmanager{ext}' + if not self.sdk_manager_path.is_file(): raise common.LmbrCmdError(f"Android SDK path {self.android_sdk_path} is not valid or complete. Missing {self.sdk_manager_path}") diff --git a/cmake/Tools/Platform/Android/generate_android_project.py b/cmake/Tools/Platform/Android/generate_android_project.py index d8f1021590..5e414e7738 100755 --- a/cmake/Tools/Platform/Android/generate_android_project.py +++ b/cmake/Tools/Platform/Android/generate_android_project.py @@ -25,7 +25,7 @@ from cmake.Tools.Platform.Android import android_support GRADLE_ARGUMENT_NAME = '--gradle-install-path' GRADLE_MIN_VERSION = LooseVersion('6.5') -GRADLE_MAX_VERSION = LooseVersion('7.0.0') +GRADLE_MAX_VERSION = LooseVersion('7.0.2') GRADLE_VERSION_REGEX = re.compile(r"Gradle\s(\d+.\d+.?\d*)") GRADLE_EXECUTABLE = 'gradle.bat' if platform.system() == 'Windows' else 'gradle' @@ -102,6 +102,7 @@ def build_optional_signing_profile(store_file, store_password, key_alias, key_pa ANDROID_SDK_ARGUMENT_NAME = '--android-sdk-path' ANDROID_SDK_PLATFORM_ARGUMENT_NAME = '--android-sdk-platform' ANDROID_SDK_PREFERRED_TOOL_VER = '--android-sdk-build-tool-version' +ANDROID_SDK_COMMAND_LINE_TOOLS_VER = '--android-sdk-command-line-tools-version' ANDROID_NATIVE_API_LEVEL = '--android-native-api-level' @@ -113,7 +114,7 @@ MIN_NATIVE_API_LEVEL = 24 # The minimum Native API level that is supported ANDROID_NDK_PLATFORM_ARGUMENT_NAME = '--android-ndk-version' ANDROID_GRADLE_PLUGIN_ARGUMENT_NAME = '--gradle-plugin-version' -ANDROID_GRADLE_MIN_PLUGIN_VERSION = LooseVersion("4.2.0") +ANDROID_GRADLE_MIN_PLUGIN_VERSION = LooseVersion("4.2.2") # Constants for asset-related options for APK generation INCLUDE_APK_ASSETS_ARGUMENT_NAME = "--include-apk-assets" @@ -185,6 +186,11 @@ def main(args): default=-1) # Override arguments + parser.add_argument(ANDROID_SDK_COMMAND_LINE_TOOLS_VER, + default='latest', + help='The android SDK command line tools version.', + required=False) + parser.add_argument(ANDROID_SDK_PREFERRED_TOOL_VER, help='The android SDK build tools version.', required=False) @@ -217,6 +223,14 @@ def main(args): default=None, required=False) + parser.add_argument('--vulkan-validation-path', + help='Override path to where the Vulkan Validation Layers libraries are. Required for use with NDK r23+', + default=None, + required=False) + parser.add_argument('--extra-cmake-configure-args', + help='Extra arguments to supply to the cmake configure step', + nargs='*') + # Asset Options parser.add_argument(INCLUDE_APK_ASSETS_ARGUMENT_NAME, action='store_true', @@ -304,7 +318,8 @@ def main(args): f"({android_gradle_plugin_version}).") # Use the SDK Resolver to make sure the build tools and ndk - android_sdk = android_support.AndroidSDKResolver(android_sdk_path=parsed_args.get_argument(ANDROID_SDK_ARGUMENT_NAME)) + android_sdk = android_support.AndroidSDKResolver(android_sdk_path=parsed_args.get_argument(ANDROID_SDK_ARGUMENT_NAME), + command_line_tools_version=parsed_args.get_argument(ANDROID_SDK_COMMAND_LINE_TOOLS_VER)) # If no SDK platform is provided, check for any installed one if android_sdk_platform_version < 0: @@ -402,7 +417,9 @@ def main(args): is_test_project=is_test_project, overwrite_existing=parsed_args.overwrite_existing, unity_build_enabled=parsed_args.enable_unity_build, - native_build_path=parsed_args.native_build_path) + native_build_path=parsed_args.native_build_path, + vulkan_validation_path=parsed_args.vulkan_validation_path, + extra_cmake_configure_args=parsed_args.extra_cmake_configure_args) generator.execute() diff --git a/cmake/Tools/common.py b/cmake/Tools/common.py index 02db0730d6..cd42d8c818 100755 --- a/cmake/Tools/common.py +++ b/cmake/Tools/common.py @@ -30,6 +30,9 @@ ENCODING_ERROR_HANDLINGS = 'ignore' # What to do if we encounter any encodin DEFAULT_PAK_ROOT = 'Pak' # The default Pak root folder under engine root where the game paks are built if platform.system() == 'Windows': + class PlatformError(WindowsError): + pass + # Re-use microsoft error codes since this script is meant to only run on windows host platforms ERROR_CODE_FILE_NOT_FOUND = 2 ERROR_CODE_ERROR_NOT_SUPPORTED = 50 @@ -37,6 +40,9 @@ if platform.system() == 'Windows': ERROR_CODE_CANNOT_COPY = 266 ERROR_CODE_ERROR_DIRECTORY = 267 else: + class PlatformError(Exception): + pass + # Posix does not match any of the following errors to specific codes, so just the standard '1' ERROR_CODE_FILE_NOT_FOUND = 1 ERROR_CODE_ERROR_NOT_SUPPORTED = 1 @@ -309,7 +315,7 @@ def verify_tool(override_tool_path, tool_name, tool_filename, argument_name, too # Extract the version and verify version_output = subprocess.check_output([tool_source, tool_version_argument], - shell=True, + shell=(platform.system() == 'Windows'), stderr=subprocess.PIPE).decode(DEFAULT_TEXT_READ_ENCODING, ENCODING_ERROR_HANDLINGS) version_match = tool_version_regex.search(version_output) @@ -330,13 +336,13 @@ def verify_tool(override_tool_path, tool_name, tool_filename, argument_name, too return result_version, resolved_override_tool_path except CalledProcessError as e: - error_msg = e.output.decode(DEFAULT_TEXT_READ_ENCODING, + error_msg = e.stderr.decode(DEFAULT_TEXT_READ_ENCODING, ENCODING_ERROR_HANDLINGS) raise LmbrCmdError(f"{tool_name} cannot be resolved or there was a problem determining its version number. " f"Either make sure its in the system path environment or a valid path is passed in " f"through the {argument_name} argument.\n{error_msg}", ERROR_CODE_ERROR_NOT_SUPPORTED) - except (WindowsError, RuntimeError) as e: + except (PlatformError, RuntimeError) as e: logging.error(f"Call to '{tool_source}' resulted in error: {e}") raise LmbrCmdError(f"{tool_name} cannot be resolved or there was a problem determining its version number. " f"Either make sure its in the system path environment or a valid path is passed in " @@ -552,7 +558,7 @@ class CommandLineExec(object): call_args.append(str(arguments)) logging.debug("exec(%s)", subprocess.list2cmdline(call_args)) result = subprocess.run(call_args, - shell=True, + shell=(platform.system() == 'Windows'), capture_output=capture_stdout, stderr=subprocess.DEVNULL if not capture_stdout and suppress_stderr else None, encoding='utf-8', diff --git a/cmake/Version.cmake b/cmake/Version.cmake index 662e75c3db..876c34f8c4 100644 --- a/cmake/Version.cmake +++ b/cmake/Version.cmake @@ -11,3 +11,13 @@ set(LY_VERSION_COPYRIGHT_YEAR ${current_year} CACHE STRING "Open 3D Engine's cop set(LY_VERSION_STRING "0.0.0.0" CACHE STRING "Open 3D Engine's version") set(LY_VERSION_BUILD_NUMBER 0 CACHE STRING "Open 3D Engine's build number") set(LY_VERSION_ENGINE_NAME "o3de" CACHE STRING "Open 3D Engine's engine name") + +if(NOT "$ENV{O3DE_VERSION}" STREQUAL "") + # Overriding through environment + set(LY_VERSION_STRING "$ENV{O3DE_VERSION}") +endif() + +if(NOT "$ENV{O3DE_BUILD_VERSION}" STREQUAL "") + # Overriding through environment + set(LY_VERSION_BUILD_NUMBER "$ENV{O3DE_BUILD_VERSION}") +endif() diff --git a/cmake/install/Findo3de.cmake.in b/cmake/install/Findo3de.cmake.in index e267b6b5c6..c3db7f1ec6 100644 --- a/cmake/install/Findo3de.cmake.in +++ b/cmake/install/Findo3de.cmake.in @@ -12,7 +12,15 @@ include(FindPackageHandleStandardArgs) # This will be called from within the installed engine's CMakeLists.txt macro(ly_find_o3de_packages) -@FIND_PACKAGES_PLACEHOLDER@ + if(LY_MONOLITHIC_GAME) + set(monolithic_file "${LY_ROOT_FOLDER}/cmake/Platform/${PAL_PLATFORM_NAME}/Monolithic/o3de_subdirectories_${PAL_PLATFORM_NAME_LOWERCASE}.cmake") + if(NOT EXISTS ${monolithic_file}) + message(FATAL_ERROR "O3DE SDK was not generated to support monolithic builds") + endif() + include("${monolithic_file}") + else() + include("${LY_ROOT_FOLDER}/cmake/Platform/${PAL_PLATFORM_NAME}/Default/o3de_subdirectories_${PAL_PLATFORM_NAME_LOWERCASE}.cmake") + endif() find_package(LauncherGenerator) endmacro() diff --git a/engine.json b/engine.json index 05ccd0abfd..737ac24fea 100644 --- a/engine.json +++ b/engine.json @@ -7,7 +7,6 @@ "O3DEBuildNumber": 0, "external_subdirectories": [ "Gems/Achievements", - "Gems/AssetMemoryAnalyzer", "Gems/AssetValidation", "Gems/Atom", "Gems/AtomContent", @@ -90,6 +89,7 @@ "AutomatedTesting" ], "templates": [ + "Templates/GemRepo", "Templates/AssetGem", "Templates/DefaultGem", "Templates/DefaultProject", diff --git a/pytest.ini b/pytest.ini index 65c93e0eb2..a229b19a4d 100644 --- a/pytest.ini +++ b/pytest.ini @@ -22,4 +22,5 @@ markers = SUITE_smoke: Tiny, quick tests of fundamental operation (tests with no SUITE_awsi: Time consuming AWS integration end-to-end tests # secondary markers which may appear alongisde a suite marker: REQUIRES_gpu: Tests which require a physical GPU + GROUP_tick: Tests which verify if systems update correctly with system ticks (for example, physics bodies should move smoothly) # custom markers not listed above will cause pytest to emit a typo warning diff --git a/python/python.cmd b/python/python.cmd index 70c79e6789..28138fd699 100644 --- a/python/python.cmd +++ b/python/python.cmd @@ -21,7 +21,8 @@ SET PYTHONHOME=%CMD_DIR%\runtime\python-3.7.10-rev2-windows\python IF EXIST "%PYTHONHOME%" GOTO PYTHONHOME_EXISTS -ECHO Could not find Python for Windows in %CMD_DIR%\.. +ECHO Python not found in %CMD_DIR% +ECHO Try running %CMD_DIR%\get_python.bat first. exit /B 1 :PYTHONHOME_EXISTS diff --git a/scripts/build/Jenkins/Jenkinsfile b/scripts/build/Jenkins/Jenkinsfile index 127d6b80ca..51f89d7829 100644 --- a/scripts/build/Jenkins/Jenkinsfile +++ b/scripts/build/Jenkins/Jenkinsfile @@ -38,14 +38,17 @@ def pipelineParameters = [ booleanParam(defaultValue: false, description: 'Recreates the volume used for the workspace. The volume will be created out of a snapshot taken from main.', name: 'RECREATE_VOLUME') ] -def palSh(cmd, lbl = '', winSlashReplacement = true) { +def palSh(cmd, lbl = '', winSlashReplacement = true, winCharReplacement = true) { if (env.IS_UNIX) { sh label: lbl, script: cmd - } else if (winSlashReplacement) { - bat label: lbl, - script: cmd.replace('/','\\') } else { + if (winSlashReplacement) { + cmd = cmd.replace('/','\\') + } + if (winCharReplacement) { + cmd = cmd.replace('%', '%%') + } bat label: lbl, script: cmd } @@ -76,11 +79,11 @@ def palRm(path) { def palRmDir(path) { if (env.IS_UNIX) { sh label: "Removing ${path}", - script: "rm -rf ${path}" + script: "if [ -d ${path} ]; then rm -rf ${path}; fi" } else { def win_path = path.replace('/','\\') bat label: "Removing ${win_path}", - script: "rd /s /q ${win_path}" + script: "IF exist ${win_path} rd /s /q ${win_path}" } } @@ -102,10 +105,6 @@ def IsJobEnabled(branchName, buildTypeMap, pipelineName, platformName) { } } -def IsAPLogUpload(branchName, jobName) { - return !IsPullRequest(branchName) && jobName.toLowerCase().contains('asset') && env.AP_LOGS_S3_BUCKET -} - def GetRunningPipelineName(JENKINS_JOB_NAME) { // If the job name has an underscore def job_parts = JENKINS_JOB_NAME.tokenize('/')[0].tokenize('_') @@ -265,13 +264,13 @@ def CheckoutRepo(boolean disableSubmodules = false) { commitDateFmt = '%%cI' if (env.IS_UNIX) commitDateFmt = '%cI' - palSh("git show -s --format=${commitDateFmt} ${env.CHANGE_ID} > commitdate", 'Getting commit date') + palSh("git show -s --format=${commitDateFmt} ${env.CHANGE_ID} > commitdate", 'Getting commit date', winSlashReplacement=true, winCharReplacement=false) env.CHANGE_DATE = readFile file: 'commitdate' env.CHANGE_DATE = env.CHANGE_DATE.trim() palRm('commitdate') } -def HandleDriveMount(String snapshot, String repositoryName, String projectName, String pipeline, String branchName, String platform, String buildType, String workspace, boolean recreateVolume = false) { +def HandleDriveMount(String snapshot, String repositoryName, String projectName, String pipeline, String branchName, String platform, String buildType, String workspace, boolean recreateVolume = false) { unstash name: 'incremental_build_script' def pythonCmd = '' @@ -281,9 +280,7 @@ def HandleDriveMount(String snapshot, String repositoryName, String projectName, if(recreateVolume) { palSh("${pythonCmd} ${INCREMENTAL_BUILD_SCRIPT_PATH} --action delete --repository_name ${repositoryName} --project ${projectName} --pipeline ${pipeline} --branch ${branchName} --platform ${platform} --build_type ${buildType}", 'Deleting volume', winSlashReplacement=false) } - timeout(5) { - palSh("${pythonCmd} ${INCREMENTAL_BUILD_SCRIPT_PATH} --action mount --snapshot ${snapshot} --repository_name ${repositoryName} --project ${projectName} --pipeline ${pipeline} --branch ${branchName} --platform ${platform} --build_type ${buildType}", 'Mounting volume', winSlashReplacement=false) - } + palSh("${pythonCmd} ${INCREMENTAL_BUILD_SCRIPT_PATH} --action mount --snapshot ${snapshot} --repository_name ${repositoryName} --project ${projectName} --pipeline ${pipeline} --branch ${branchName} --platform ${platform} --build_type ${buildType}", 'Mounting volume', winSlashReplacement=false) if(env.IS_UNIX) { sh label: 'Setting volume\'s ownership', @@ -412,10 +409,6 @@ def ExportTestResults(Map options, String platform, String type, String workspac def o3deroot = "${workspace}/${ENGINE_REPOSITORY_NAME}" dir("${o3deroot}/${params.OUTPUT_DIRECTORY}") { junit testResults: "Testing/**/*.xml" - palRmDir("Testing") - // Recreate test runner xml directories that need to be pre generated - palMkdir("Testing/Pytest") - palMkdir("Testing/Gtest") } } } @@ -435,30 +428,58 @@ def ExportTestScreenshots(Map options, String branchName, String platformName, S } } -def UploadAPLogs(Map options, String branchName, String jobName, String workspace, Map params) { - dir("${workspace}/${ENGINE_REPOSITORY_NAME}") { - projects = params.CMAKE_LY_PROJECTS.split(",") - projects.each{ project -> - def apLogsPath = "${project}/user/log" - def s3UploadScriptPath = "scripts/build/tools/upload_to_s3.py" - if(env.IS_UNIX) { - pythonPath = "${options.PYTHON_DIR}/python.sh" - } - else { - pythonPath = "${options.PYTHON_DIR}/python.cmd" - } - def command = "${pythonPath} -u ${s3UploadScriptPath} --base_dir ${apLogsPath} " + - "--file_regex \".*\" --bucket ${env.AP_LOGS_S3_BUCKET} " + - "--search_subdirectories True --key_prefix ${env.JENKINS_JOB_NAME}/${branchName}/${env.BUILD_NUMBER}/${jobName} " + - "--extra_args {\"ACL\": \"bucket-owner-full-control\"}" - palSh(command, "Uploading AP logs for job ${jobName} for branch ${branchName}", false) +// All files are included by default. +// --include will only re-include files that have been excluded from an --exclude filter. +//See more details at https://docs.aws.amazon.com/cli/latest/reference/s3/#use-of-exclude-and-include-filters +def ArchiveArtifactsOnS3(String artifactsSource, String s3Prefix="", boolean recursive=false, List includes=[], List excludes=[]) { + if (!fileExists(s3Prefix)) { + palMkdir(s3Prefix) + } + palSh("echo ${env.BUILD_URL} > ${s3Prefix}/build_url.txt") + // archiveArtifacts is very slow, so we only archive one file and upload the rest artifacts to the same bucket using S3 CLI. + archiveArtifacts artifacts: "${s3Prefix}/build_url.txt" + def command = "aws s3 cp ${artifactsSource} s3://${env.JENKINS_ARTIFACTS_S3_BUCKET}/${env.JENKINS_JOB_NAME}/${env.BUILD_NUMBER}/artifacts/${s3Prefix} " + excludes.each{ exclude -> + command += "--exclude \"${exclude}\" " + } + includes.each{ include -> + command += "--include \"${include}\" " + } + if (recursive) command += "--recursive " + palSh(command, "Archiving artifacts to ${env.JENKINS_JOB_NAME}/${env.BUILD_NUMBER}/artifacts/${s3Prefix}", false) +} + +def UploadAPLogs(String platformName, String jobName, String workspace, Map params) { + catchError(message: "Error archiving AssetProcessor logs (this won't fail the build)", buildResult: 'UNSTABLE', stageResult: 'FAILURE') { + dir("${workspace}/${ENGINE_REPOSITORY_NAME}") { + projects = params.CMAKE_LY_PROJECTS.split(",") + projects.each{ project -> + ArchiveArtifactsOnS3("${project}/user/log", "ap_logs/${platformName}/${jobName}/${project}", true) } } } +} -def PostBuildCommonSteps(String workspace, boolean mount = true) { +def UploadTestArtifacts(String workspace, String outputDirectory) { + catchError(message: "Error archiving test artifacts (this won't fail the build)", buildResult: 'UNSTABLE', stageResult: 'FAILURE') { + def cmakeBuildDir = [workspace, ENGINE_REPOSITORY_NAME, outputDirectory].join('/') + echo "Uploading Test Artifacts: ${cmakeBuildDir}/Testing" + ArchiveArtifactsOnS3("${cmakeBuildDir}/Testing", "test_artifacts", true) + } +} + +def PostBuildCommonSteps(String workspace, Map params, boolean mount = true) { echo 'Starting post-build common steps...' - + if (params && params.containsKey('OUTPUT_DIRECTORY')){ + dir([workspace, ENGINE_REPOSITORY_NAME, params.OUTPUT_DIRECTORY].join('/')){ + // Clean up Testing directory + palRmDir("Testing") + // Recreate test runner xml directories that need to be pre generated to prevent race condition on incremental runs + palMkdir("Testing/Pytest") + palMkdir("Testing/Gtest") + } + } + if (mount) { def pythonCmd = '' if(env.IS_UNIX) pythonCmd = 'sudo -E python3 -u ' @@ -519,18 +540,26 @@ def CreateExportTestScreenshotsStage(Map pipelineConfig, String branchName, Stri } } -def CreateUploadAPLogsStage(Map pipelineConfig, String branchName, String jobName, String workspace, Map params) { +def CreateUploadAPLogsStage(String platformName, String jobName, String workspace, Map params) { return { stage("${jobName}_upload_ap_logs") { - UploadAPLogs(pipelineConfig, branchName, jobName, workspace, params) + UploadAPLogs(platformName, jobName, workspace, params) } } } -def CreateTeardownStage(Map environmentVars) { +def CreateUploadTestArtifactStage(String jobName, String workspace, String outputDirectory) { + return { + stage("${jobName}_upload_test_artifacts") { + UploadTestArtifacts(workspace, outputDirectory) + } + } +} + +def CreateTeardownStage(Map environmentVars, Map params) { return { stage('Teardown') { - PostBuildCommonSteps(environmentVars['WORKSPACE'], environmentVars['MOUNT_VOLUME']) + PostBuildCommonSteps(environmentVars['WORKSPACE'], params, environmentVars['MOUNT_VOLUME']) } } } @@ -547,13 +576,17 @@ def CreateSingleNode(Map pipelineConfig, def platform, def build_job, Map envVar } withEnv(GetEnvStringList(envVars)) { def build_job_name = build_job.key + def params = platform.value.build_types[build_job_name].PARAMETERS try { CreateSetupStage(pipelineConfig, snapshot, repositoryName, projectName, pipelineName, branchName, platform.key, build_job.key, envVars, onlyMountEBSVolume).call() if(build_job.value.steps) { //this is a pipe with many steps so create all the build stages + pipelineEnvVars = GetBuildEnvVars(platform.value.PIPELINE_ENV ?: EMPTY_JSON, build_job.value.PIPELINE_ENV ?: EMPTY_JSON, pipelineName) build_job.value.steps.each { build_step -> build_job_name = build_step - envVars = GetBuildEnvVars(platform.value.PIPELINE_ENV ?: EMPTY_JSON, platform.value.build_types[build_step].PIPELINE_ENV ?: EMPTY_JSON, pipelineName) + params = platform.value.build_types[build_job_name].PARAMETERS + // This addition of maps makes it that the right operand will override entries if they overlap with the left operand + envVars = pipelineEnvVars + GetBuildEnvVars(platform.value.PIPELINE_ENV ?: EMPTY_JSON, platform.value.build_types[build_step].PIPELINE_ENV ?: EMPTY_JSON, pipelineName) try { CreateBuildStage(pipelineConfig, platform.key, build_step, envVars).call() } @@ -576,19 +609,21 @@ def CreateSingleNode(Map pipelineConfig, def platform, def build_job, Map envVar error "Node disconnected during build: ${e}" // Error raised to retry stage on a new node } } - if (IsAPLogUpload(branchName, build_job_name)) { - CreateUploadAPLogsStage(pipelineConfig, branchName, build_job_name, envVars['WORKSPACE'], platform.value.build_types[build_job_name].PARAMETERS).call() + if (build_job_name.toLowerCase().contains('asset') && env.IS_UPLOAD_AP_LOGS?.toBoolean()) { + CreateUploadAPLogsStage(platform.key, build_job_name, envVars['WORKSPACE'], platform.value.build_types[build_job_name].PARAMETERS).call() + } + // Upload test artifacts only on builds that failed and ran test suites + if (env.IS_UPLOAD_TEST_ARTIFACTS?.toBoolean() && params.containsKey('CTEST_OPTIONS')) { + CreateUploadTestArtifactStage(build_job_name, envVars['WORKSPACE'], params.OUTPUT_DIRECTORY).call() } // All other errors will be raised outside the retry block currentResult = envVars['ON_FAILURE_MARK'] ?: 'FAILURE' currentException = e.toString() } finally { - def params = platform.value.build_types[build_job_name].PARAMETERS + if (env.MARS_REPO && params && params.containsKey('TEST_METRICS') && params.TEST_METRICS == 'True') { - def output_directory = params.OUTPUT_DIRECTORY - def configuration = params.CONFIGURATION - CreateTestMetricsStage(pipelineConfig, branchName, envVars, build_job_name, output_directory, configuration).call() + CreateTestMetricsStage(pipelineConfig, branchName, envVars, build_job_name, params.OUTPUT_DIRECTORY, params.CONFIGURATION).call() } if (params && params.containsKey('TEST_RESULTS') && params.TEST_RESULTS == 'True') { CreateExportTestResultsStage(pipelineConfig, platform.key, build_job_name, envVars, params).call() @@ -596,7 +631,7 @@ def CreateSingleNode(Map pipelineConfig, def platform, def build_job, Map envVar if (params && params.containsKey('TEST_SCREENSHOTS') && params.TEST_SCREENSHOTS == 'True' && currentResult == 'FAILURE') { CreateExportTestScreenshotsStage(pipelineConfig, branchName, platform.key, build_job_name, envVars, params).call() } - CreateTeardownStage(envVars).call() + CreateTeardownStage(envVars, params).call() } } } @@ -847,6 +882,7 @@ finally { "build_number": env.BUILD_NUMBER, "repository_name": env.REPOSITORY_NAME, "branch_name": env.BRANCH_NAME, + "pipeline_name": GetRunningPipelineName(env.JOB_NAME)[1], "build_result": "${currentBuild.currentResult}", "build_failure": buildFailure, "recreate_volume": env.RECREATE_VOLUME, diff --git a/scripts/build/Jenkins/tools/jenkins_pipeline_metrics.py b/scripts/build/Jenkins/tools/jenkins_pipeline_metrics.py index 8b0164e3e8..6ea2e135a7 100644 --- a/scripts/build/Jenkins/tools/jenkins_pipeline_metrics.py +++ b/scripts/build/Jenkins/tools/jenkins_pipeline_metrics.py @@ -16,9 +16,8 @@ from datetime import datetime, timezone from requests.auth import HTTPBasicAuth cur_dir = os.path.dirname(os.path.abspath(__file__)) -sys.path.append(os.path.join(os.path.dirname(os.path.dirname(cur_dir)), 'package')) -from util import * - +sys.path.insert(0, os.path.abspath(f'{cur_dir}/../../../util')) +import util class JenkinsAPIClient: def __init__(self, jenkins_base_url, jenkins_username, jenkins_api_token): @@ -36,7 +35,7 @@ class JenkinsAPIClient: except Exception: traceback.print_exc() print(f'WARN: Get request {url} failed, retying....') - error(f'Get request {url} failed, see exception for more details.') + util.error(f'Get request {url} failed, see exception for more details.') def get_builds(self, pipeline_name, branch_name=''): url = self.jenkins_base_url + self.blueocean_api_path + f'/{pipeline_name}/{branch_name}/runs' @@ -123,9 +122,9 @@ def upload_files_to_s3(env, formatted_date): else: python = os.path.join(engine_root, 'python', 'python.sh') upload_csv_cmd = [python, upload_to_s3_script_path, '--base_dir', cur_dir, '--file_regex', env['CSV_REGEX'], '--bucket', env['BUCKET'], '--key_prefix', csv_s3_prefix] - execute_system_call(upload_csv_cmd) + util.execute_system_call(upload_csv_cmd) upload_manifest_cmd = [python, upload_to_s3_script_path, '--base_dir', cur_dir, '--file_regex', env['MANIFEST_REGEX'], '--bucket', env['BUCKET'], '--key_prefix', manifest_s3_prefix] - execute_system_call(upload_manifest_cmd) + util.execute_system_call(upload_manifest_cmd) def get_required_env(env, keys): @@ -134,7 +133,7 @@ def get_required_env(env, keys): try: env[key] = os.environ[key].strip() except KeyError: - error(f'{key} is not set in environment variable') + util.error(f'{key} is not set in environment variable') success = False return success @@ -143,7 +142,7 @@ def main(): env = {} required_env_list = ['JENKINS_URL', 'PIPELINE_NAME', 'BRANCH_NAME', 'JENKINS_USERNAME', 'JENKINS_API_TOKEN', 'BUCKET', 'CSV_REGEX', 'CSV_PREFIX', 'MANIFEST_REGEX', 'MANIFEST_PREFIX', 'DAYS_TO_COLLECT'] if not get_required_env(env, required_env_list): - error('Required environment variable is not set, see log for more details.') + util.error('Required environment variable is not set, see log for more details.') target_date = datetime.today().date() formatted_date = f'{target_date.year}/{target_date:%m}/{target_date:%d}' diff --git a/scripts/build/Platform/Android/build_config.json b/scripts/build/Platform/Android/build_config.json index 5e2da44a3c..c505d8e940 100644 --- a/scripts/build/Platform/Android/build_config.json +++ b/scripts/build/Platform/Android/build_config.json @@ -35,22 +35,12 @@ "PARAMETERS": { "CONFIGURATION":"debug", "OUTPUT_DIRECTORY":"build\\android", - "CMAKE_OPTIONS":"-G \"Ninja Multi-Config\" -DCMAKE_TOOLCHAIN_FILE=cmake\\Platform\\Android\\Toolchain_android.cmake -DANDROID_ABI=arm64-v8a -DANDROID_ARM_MODE=arm -DANDROID_ARM_NEON=FALSE -DANDROID_NATIVE_API_LEVEL=21 -DLY_NDK_DIR=\"!LY_3RDPARTY_PATH!\\android-ndk\\r21d\"", + "CMAKE_OPTIONS":"-G \"Ninja Multi-Config\" -DCMAKE_TOOLCHAIN_FILE=cmake\\Platform\\Android\\Toolchain_android.cmake -DANDROID_NATIVE_API_LEVEL=21 -DLY_NDK_DIR=\"!LY_NDK_DIR!\"", "CMAKE_LY_PROJECTS":"AutomatedTesting", "CMAKE_TARGET":"all", "CMAKE_BUILD_ARGS":"-j!NUMBER_OF_PROCESSORS!" } }, - "android_packaging_all": { - "TAGS": [ - "packaging" - ], - "COMMAND": "../Windows/python_windows.cmd", - "PARAMETERS": { - "SCRIPT_PATH": "scripts/build/package/package.py", - "SCRIPT_PARAMETERS": "--platform Android --type all" - } - }, "profile": { "TAGS":[ "weekly-build-metrics", @@ -60,7 +50,7 @@ "PARAMETERS": { "CONFIGURATION":"profile", "OUTPUT_DIRECTORY":"build\\android", - "CMAKE_OPTIONS":"-G \"Ninja Multi-Config\" -DCMAKE_TOOLCHAIN_FILE=cmake\\Platform\\Android\\Toolchain_android.cmake -DANDROID_ABI=arm64-v8a -DANDROID_ARM_MODE=arm -DANDROID_ARM_NEON=FALSE -DANDROID_NATIVE_API_LEVEL=21 -DLY_NDK_DIR=\"!LY_3RDPARTY_PATH!\\android-ndk\\r21d\"", + "CMAKE_OPTIONS":"-G \"Ninja Multi-Config\" -DCMAKE_TOOLCHAIN_FILE=cmake\\Platform\\Android\\Toolchain_android.cmake -DANDROID_NATIVE_API_LEVEL=21 -DLY_NDK_DIR=\"!LY_NDK_DIR!\"", "CMAKE_LY_PROJECTS":"AutomatedTesting", "CMAKE_TARGET":"all", "CMAKE_BUILD_ARGS":"-j!NUMBER_OF_PROCESSORS!" @@ -76,7 +66,7 @@ "PARAMETERS": { "CONFIGURATION":"profile", "OUTPUT_DIRECTORY":"build\\android", - "CMAKE_OPTIONS":"-G \"Ninja Multi-Config\" -DCMAKE_TOOLCHAIN_FILE=cmake\\Platform\\Android\\Toolchain_android.cmake -DANDROID_ABI=arm64-v8a -DANDROID_ARM_MODE=arm -DANDROID_ARM_NEON=FALSE -DANDROID_NATIVE_API_LEVEL=21 -DLY_NDK_DIR=\"!LY_3RDPARTY_PATH!\\android-ndk\\r21d\" -DLY_UNITY_BUILD=FALSE", + "CMAKE_OPTIONS":"-G \"Ninja Multi-Config\" -DCMAKE_TOOLCHAIN_FILE=cmake\\Platform\\Android\\Toolchain_android.cmake -DANDROID_NATIVE_API_LEVEL=21 -DLY_NDK_DIR=\"!LY_NDK_DIR!\" -DLY_UNITY_BUILD=FALSE", "CMAKE_LY_PROJECTS":"AutomatedTesting", "CMAKE_TARGET":"all", "CMAKE_BUILD_ARGS":"-j!NUMBER_OF_PROCESSORS!" @@ -92,7 +82,7 @@ "COMMAND":"../Windows/build_asset_windows.cmd", "PARAMETERS": { "CONFIGURATION":"profile", - "OUTPUT_DIRECTORY":"build\\windows_vs2019", + "OUTPUT_DIRECTORY":"build\\windows", "CMAKE_OPTIONS":"-G \"Visual Studio 16 2019\" -DCMAKE_SYSTEM_VERSION=10.0", "CMAKE_LY_PROJECTS":"AutomatedTesting", "CMAKE_TARGET":"AssetProcessorBatch", @@ -112,7 +102,7 @@ "PARAMETERS": { "CONFIGURATION":"release", "OUTPUT_DIRECTORY":"build\\android", - "CMAKE_OPTIONS":"-G \"Ninja Multi-Config\" -DCMAKE_TOOLCHAIN_FILE=cmake\\Platform\\Android\\Toolchain_android.cmake -DANDROID_ABI=arm64-v8a -DANDROID_ARM_MODE=arm -DANDROID_ARM_NEON=FALSE -DANDROID_NATIVE_API_LEVEL=21 -DLY_NDK_DIR=\"!LY_3RDPARTY_PATH!\\android-ndk\\r21d\"", + "CMAKE_OPTIONS":"-G \"Ninja Multi-Config\" -DCMAKE_TOOLCHAIN_FILE=cmake\\Platform\\Android\\Toolchain_android.cmake -DANDROID_NATIVE_API_LEVEL=21 -DLY_NDK_DIR=\"!LY_NDK_DIR!\"", "CMAKE_LY_PROJECTS":"AutomatedTesting", "CMAKE_TARGET":"all", "CMAKE_BUILD_ARGS":"-j!NUMBER_OF_PROCESSORS!" @@ -128,7 +118,7 @@ "PARAMETERS": { "CONFIGURATION":"release", "OUTPUT_DIRECTORY":"build\\mono_android", - "CMAKE_OPTIONS":"-G \"Ninja Multi-Config\" -DCMAKE_TOOLCHAIN_FILE=cmake\\Platform\\Android\\Toolchain_android.cmake -DANDROID_ABI=arm64-v8a -DANDROID_ARM_MODE=arm -DANDROID_ARM_NEON=FALSE -DANDROID_NATIVE_API_LEVEL=21 -DLY_NDK_DIR=\"!LY_3RDPARTY_PATH!\\android-ndk\\r21d\" -DLY_MONOLITHIC_GAME=TRUE", + "CMAKE_OPTIONS":"-G \"Ninja Multi-Config\" -DCMAKE_TOOLCHAIN_FILE=cmake\\Platform\\Android\\Toolchain_android.cmake -DANDROID_NATIVE_API_LEVEL=21 -DLY_NDK_DIR=\"!LY_NDK_DIR!\" -DLY_MONOLITHIC_GAME=TRUE", "CMAKE_LY_PROJECTS":"AutomatedTesting", "CMAKE_TARGET":"all", "CMAKE_BUILD_ARGS":"-j!NUMBER_OF_PROCESSORS!" diff --git a/scripts/build/Platform/Android/gradle_windows.cmd b/scripts/build/Platform/Android/gradle_windows.cmd index b353a8f641..bb98799444 100644 --- a/scripts/build/Platform/Android/gradle_windows.cmd +++ b/scripts/build/Platform/Android/gradle_windows.cmd @@ -23,23 +23,6 @@ IF NOT EXIST "%GRADLE_BUILD_HOME%" ( GOTO :error ) -IF NOT EXIST "%LY_NINJA_PATH%" ( - SET LY_NINJA_PATH=%LY_3RDPARTY_PATH%/ninja/1.10.1/Windows -) -IF NOT EXIST "%LY_NINJA_PATH%" ( - ECHO [ci_build] FAIL: LY_NINJA_PATH=%LY_NINJA_PATH% - GOTO :error -) - -REM Make sure that Ninja in the Path variable -ECHO Testing ninja on the current path variable -call ninja --version -IF %ERRORLEVEL%==0 GOTO ninja_on_path -ECHO Ninja wasnt in the call path, add the value set by LY_NINJA_PATH -SET PATH=%PATH%;%LY_NINJA_PATH% - -:ninja_on_path - IF NOT "%ANDROID_GRADLE_PLUGIN%" == "" ( set ANDROID_GRADLE_PLUGIN_OPTION=--gradle-plugin-version=%ANDROID_GRADLE_PLUGIN% ) @@ -132,11 +115,11 @@ IF "%GENERATE_SIGNED_APK%"=="true" ( ECHO Using keystore file at %CI_ANDROID_KEYSTORE_FILE_ABS% ) - ECHO [ci_build] %PYTHON% cmake\Tools\Platform\Android\generate_android_project.py --engine-root=. --build-dir=%OUTPUT_DIRECTORY% -g %GAME_PROJECT% --gradle-install-path=%GRADLE_BUILD_HOME% --ninja-install-path=%LY_NINJA_PATH% --third-party-path=%LY_3RDPARTY_PATH% --enable-unity-build --android-sdk-path=%ANDROID_HOME% %ANDROID_GRADLE_PLUGIN_OPTION% --signconfig-store-file %CI_ANDROID_KEYSTORE_FILE_ABS% --signconfig-store-password %CI_ANDROID_KEYSTORE_PASSWORD% --signconfig-key-alias %CI_ANDROID_KEYSTORE_ALIAS% --signconfig-key-password %CI_ANDROID_KEYSTORE_PASSWORD% %ADDITIONAL_GENERATE_ARGS% --overwrite-existing - CALL %PYTHON% cmake\Tools\Platform\Android\generate_android_project.py --engine-root=. --build-dir=%OUTPUT_DIRECTORY% -g %GAME_PROJECT% --gradle-install-path=%GRADLE_BUILD_HOME% --ninja-install-path=%LY_NINJA_PATH% --third-party-path=%LY_3RDPARTY_PATH% --enable-unity-build --android-sdk-path=%ANDROID_HOME% %ANDROID_GRADLE_PLUGIN_OPTION% --signconfig-store-file %CI_ANDROID_KEYSTORE_FILE_ABS% --signconfig-store-password %CI_ANDROID_KEYSTORE_PASSWORD% --signconfig-key-alias %CI_ANDROID_KEYSTORE_ALIAS% --signconfig-key-password %CI_ANDROID_KEYSTORE_PASSWORD% %ADDITIONAL_GENERATE_ARGS% --overwrite-existing + ECHO [ci_build] %PYTHON% cmake\Tools\Platform\Android\generate_android_project.py --engine-root=. --build-dir=%OUTPUT_DIRECTORY% -g %GAME_PROJECT% --gradle-install-path=%GRADLE_BUILD_HOME% --third-party-path=%LY_3RDPARTY_PATH% --enable-unity-build --android-sdk-path=%ANDROID_HOME% %ANDROID_GRADLE_PLUGIN_OPTION% --signconfig-store-file %CI_ANDROID_KEYSTORE_FILE_ABS% --signconfig-store-password %CI_ANDROID_KEYSTORE_PASSWORD% --signconfig-key-alias %CI_ANDROID_KEYSTORE_ALIAS% --signconfig-key-password %CI_ANDROID_KEYSTORE_PASSWORD% %ADDITIONAL_GENERATE_ARGS% --overwrite-existing + CALL %PYTHON% cmake\Tools\Platform\Android\generate_android_project.py --engine-root=. --build-dir=%OUTPUT_DIRECTORY% -g %GAME_PROJECT% --gradle-install-path=%GRADLE_BUILD_HOME% --third-party-path=%LY_3RDPARTY_PATH% --enable-unity-build --android-sdk-path=%ANDROID_HOME% %ANDROID_GRADLE_PLUGIN_OPTION% --signconfig-store-file %CI_ANDROID_KEYSTORE_FILE_ABS% --signconfig-store-password %CI_ANDROID_KEYSTORE_PASSWORD% --signconfig-key-alias %CI_ANDROID_KEYSTORE_ALIAS% --signconfig-key-password %CI_ANDROID_KEYSTORE_PASSWORD% %ADDITIONAL_GENERATE_ARGS% --overwrite-existing ) ELSE ( - ECHO [ci_build] %PYTHON% cmake\Tools\Platform\Android\generate_android_project.py --engine-root=. --build-dir=%OUTPUT_DIRECTORY% -g %GAME_PROJECT% %GRADLE_OVERRIDE_OPTION% --ninja-install-path=%LY_NINJA_PATH% --third-party-path=%LY_3RDPARTY_PATH% --enable-unity-build %ANDROID_GRADLE_PLUGIN_OPTION% --android-sdk-path=%ANDROID_HOME% %ADDITIONAL_GENERATE_ARGS% --overwrite-existing - CALL %PYTHON% cmake\Tools\Platform\Android\generate_android_project.py --engine-root=. --build-dir=%OUTPUT_DIRECTORY% -g %GAME_PROJECT% --gradle-install-path=%GRADLE_BUILD_HOME% --ninja-install-path=%LY_NINJA_PATH% --third-party-path=%LY_3RDPARTY_PATH% --enable-unity-build %ANDROID_GRADLE_PLUGIN_OPTION% --android-sdk-path=%ANDROID_HOME% %ADDITIONAL_GENERATE_ARGS% --overwrite-existing + ECHO [ci_build] %PYTHON% cmake\Tools\Platform\Android\generate_android_project.py --engine-root=. --build-dir=%OUTPUT_DIRECTORY% -g %GAME_PROJECT% %GRADLE_OVERRIDE_OPTION% --third-party-path=%LY_3RDPARTY_PATH% --enable-unity-build %ANDROID_GRADLE_PLUGIN_OPTION% --android-sdk-path=%ANDROID_HOME% %ADDITIONAL_GENERATE_ARGS% --overwrite-existing + CALL %PYTHON% cmake\Tools\Platform\Android\generate_android_project.py --engine-root=. --build-dir=%OUTPUT_DIRECTORY% -g %GAME_PROJECT% --gradle-install-path=%GRADLE_BUILD_HOME% --third-party-path=%LY_3RDPARTY_PATH% --enable-unity-build %ANDROID_GRADLE_PLUGIN_OPTION% --android-sdk-path=%ANDROID_HOME% %ADDITIONAL_GENERATE_ARGS% --overwrite-existing ) REM Validate the android project generation diff --git a/scripts/build/Platform/Android/pipeline.json b/scripts/build/Platform/Android/pipeline.json index 551374a027..f0292f4501 100644 --- a/scripts/build/Platform/Android/pipeline.json +++ b/scripts/build/Platform/Android/pipeline.json @@ -2,7 +2,8 @@ "ENV": { "GRADLE_HOME": "C:/Gradle/gradle-7.0", "NODE_LABEL": "windows-b3c8994f1", - "LY_3RDPARTY_PATH": "C:/ly/3rdParty", + "LY_3RDPARTY_PATH": "D:/workspace/3rdParty", + "LY_NDK_DIR": "C:/ly/3rdParty/android-ndk/r21d", "TIMEOUT": 30, "WORKSPACE": "D:/workspace", "MOUNT_VOLUME": true @@ -11,9 +12,6 @@ "daily-pipeline-metrics": { "CLEAN_WORKSPACE": true }, - "packaging": { - "CLEAN_WORKSPACE": true - }, "nightly-clean": { "CLEAN_WORKSPACE": true } diff --git a/scripts/build/Platform/Linux/asset_linux.sh b/scripts/build/Platform/Linux/asset_linux.sh index df910db646..10f7ee6b6f 100755 --- a/scripts/build/Platform/Linux/asset_linux.sh +++ b/scripts/build/Platform/Linux/asset_linux.sh @@ -9,6 +9,8 @@ set -o errexit # exit on the first failure encountered +SOURCE_DIRECTORY=${PWD} + if [[ ! -d $OUTPUT_DIRECTORY ]]; then echo [ci_build] Error: $OUTPUT_DIRECTORY was not found exit 1 @@ -22,8 +24,8 @@ fi for project in $(echo $CMAKE_LY_PROJECTS | sed "s/;/ /g") do - echo [ci_build] ${ASSET_PROCESSOR_BINARY} $ASSET_PROCESSOR_OPTIONS --project-path=$project --platforms=$ASSET_PROCESSOR_PLATFORMS - ${ASSET_PROCESSOR_BINARY} $ASSET_PROCESSOR_OPTIONS --project-path=$project --platforms=$ASSET_PROCESSOR_PLATFORMS + echo [ci_build] ${ASSET_PROCESSOR_BINARY} $ASSET_PROCESSOR_OPTIONS --project-path=$SOURCE_DIRECTORY/$project --platforms=$ASSET_PROCESSOR_PLATFORMS + ${ASSET_PROCESSOR_BINARY} $ASSET_PROCESSOR_OPTIONS --project-path=$SOURCE_DIRECTORY/$project --platforms=$ASSET_PROCESSOR_PLATFORMS done popd diff --git a/scripts/build/Platform/Linux/build_config.json b/scripts/build/Platform/Linux/build_config.json index c0307de23d..988cf23703 100644 --- a/scripts/build/Platform/Linux/build_config.json +++ b/scripts/build/Platform/Linux/build_config.json @@ -37,7 +37,7 @@ "PARAMETERS": { "CONFIGURATION": "debug", "OUTPUT_DIRECTORY": "build/linux", - "CMAKE_OPTIONS": "-G 'Ninja Multi-Config' -DCMAKE_C_COMPILER=clang-6.0 -DCMAKE_CXX_COMPILER=clang++-6.0 -DLY_PARALLEL_LINK_JOBS=4", + "CMAKE_OPTIONS": "-G 'Ninja Multi-Config' -DLY_PARALLEL_LINK_JOBS=4", "CMAKE_LY_PROJECTS": "AutomatedTesting", "CMAKE_TARGET": "all" } @@ -53,7 +53,7 @@ "PARAMETERS": { "CONFIGURATION": "profile", "OUTPUT_DIRECTORY": "build/linux", - "CMAKE_OPTIONS": "-G 'Ninja Multi-Config' -DCMAKE_C_COMPILER=clang-6.0 -DCMAKE_CXX_COMPILER=clang++-6.0 -DLY_PARALLEL_LINK_JOBS=4", + "CMAKE_OPTIONS": "-G 'Ninja Multi-Config' -DLY_PARALLEL_LINK_JOBS=4", "CMAKE_LY_PROJECTS": "AutomatedTesting", "CMAKE_TARGET": "all" } @@ -66,7 +66,7 @@ "PARAMETERS": { "CONFIGURATION": "profile", "OUTPUT_DIRECTORY": "build/linux", - "CMAKE_OPTIONS": "-G 'Ninja Multi-Config' -DCMAKE_C_COMPILER=clang-6.0 -DCMAKE_CXX_COMPILER=clang++-6.0 -DLY_UNITY_BUILD=FALSE -DLY_PARALLEL_LINK_JOBS=4", + "CMAKE_OPTIONS": "-G 'Ninja Multi-Config' -DLY_UNITY_BUILD=FALSE -DLY_PARALLEL_LINK_JOBS=4", "CMAKE_LY_PROJECTS": "AutomatedTesting", "CMAKE_TARGET": "all" } @@ -80,11 +80,11 @@ "PARAMETERS": { "CONFIGURATION": "profile", "OUTPUT_DIRECTORY": "build/linux", - "CMAKE_OPTIONS": "-G 'Ninja Multi-Config' -DCMAKE_C_COMPILER=clang-6.0 -DCMAKE_CXX_COMPILER=clang++-6.0 -DLY_PARALLEL_LINK_JOBS=4", + "CMAKE_OPTIONS": "-G 'Ninja Multi-Config' -DLY_PARALLEL_LINK_JOBS=4", "CMAKE_LY_PROJECTS": "AutomatedTesting", "CMAKE_TARGET": "all", - "CTEST_OPTIONS": "-E Gem::EMotionFX.Editor.Tests -LE (SUITE_sandbox|SUITE_awsi) -L FRAMEWORK_googletest --no-tests=error", - "TEST_RESULTS": "True" + "CTEST_OPTIONS": "-E (AutomatedTesting::Atom_TestSuite_Main|AutomatedTesting::TerrainTests_Main|Gem::EMotionFX.Editor.Tests) -L (SUITE_smoke|SUITE_main) -LE (REQUIRES_gpu) --no-tests=error", + "TEST_RESULTS": "False" } }, "test_profile_nounity": { @@ -93,11 +93,11 @@ "PARAMETERS": { "CONFIGURATION": "profile", "OUTPUT_DIRECTORY": "build/linux", - "CMAKE_OPTIONS": "-G 'Ninja Multi-Config' -DCMAKE_C_COMPILER=clang-6.0 -DCMAKE_CXX_COMPILER=clang++-6.0 -DLY_UNITY_BUILD=FALSE -DLY_PARALLEL_LINK_JOBS=4", + "CMAKE_OPTIONS": "-G 'Ninja Multi-Config' -DLY_UNITY_BUILD=FALSE -DLY_PARALLEL_LINK_JOBS=4", "CMAKE_LY_PROJECTS": "AutomatedTesting", "CMAKE_TARGET": "all", - "CTEST_OPTIONS": "-E Gem::EMotionFX.Editor.Tests -LE (SUITE_sandbox|SUITE_awsi) -L FRAMEWORK_googletest --no-tests=error", - "TEST_RESULTS": "True" + "CTEST_OPTIONS": "-E (AutomatedTesting::Atom_TestSuite_Main|AutomatedTesting::TerrainTests_Main|Gem::EMotionFX.Editor.Tests) -L (SUITE_smoke|SUITE_main) -LE (REQUIRES_gpu) --no-tests=error", + "TEST_RESULTS": "False" } }, "asset_profile": { @@ -110,7 +110,7 @@ "PARAMETERS": { "CONFIGURATION": "profile", "OUTPUT_DIRECTORY": "build/linux", - "CMAKE_OPTIONS": "-G 'Ninja Multi-Config' -DCMAKE_C_COMPILER=clang-6.0 -DCMAKE_CXX_COMPILER=clang++-6.0 -DLY_PARALLEL_LINK_JOBS=4", + "CMAKE_OPTIONS": "-G 'Ninja Multi-Config' -DLY_PARALLEL_LINK_JOBS=4", "CMAKE_LY_PROJECTS": "AutomatedTesting", "CMAKE_TARGET": "AssetProcessorBatch", "ASSET_PROCESSOR_BINARY": "bin/profile/AssetProcessorBatch", @@ -124,7 +124,7 @@ "PARAMETERS": { "CONFIGURATION": "profile", "OUTPUT_DIRECTORY": "build/linux", - "CMAKE_OPTIONS": "-G 'Ninja Multi-Config' -DCMAKE_C_COMPILER=clang-6.0 -DCMAKE_CXX_COMPILER=clang++-6.0 -DLY_UNITY_BUILD=FALSE -DLY_PARALLEL_LINK_JOBS=4", + "CMAKE_OPTIONS": "-G 'Ninja Multi-Config' -DLY_UNITY_BUILD=FALSE -DLY_PARALLEL_LINK_JOBS=4", "CMAKE_LY_PROJECTS": "AutomatedTesting", "CMAKE_TARGET": "AssetProcessorBatch", "ASSET_PROCESSOR_BINARY": "bin/profile/AssetProcessorBatch", @@ -132,6 +132,35 @@ "ASSET_PROCESSOR_PLATFORMS": "linux,server" } }, + "awsi_test_profile_pipe": { + "TAGS": [ + "nightly-incremental", + "nightly-clean" + ], + "steps": [ + "awsi_deployment", + "awsi_test_profile", + "awsi_destruction" + ] + }, + "awsi_test_profile": { + "TAGS": [ + "weekly-build-metrics" + ], + "PIPELINE_ENV": { + "NONBLOCKING_STEP": "True" + }, + "COMMAND": "build_test_linux.sh", + "PARAMETERS": { + "CONFIGURATION": "profile", + "OUTPUT_DIRECTORY": "build\\linux", + "CMAKE_OPTIONS": "-G 'Ninja Multi-Config' -DLY_PARALLEL_LINK_JOBS=4", + "CMAKE_LY_PROJECTS": "AutomatedTesting", + "CMAKE_TARGET": "TEST_SUITE_awsi", + "CTEST_OPTIONS": "-L \"(SUITE_awsi)\" --no-tests=error", + "TEST_RESULTS": "True" + } + }, "periodic_test_profile": { "TAGS": [ "nightly-incremental", @@ -142,11 +171,11 @@ "PARAMETERS": { "CONFIGURATION": "profile", "OUTPUT_DIRECTORY": "build/linux", - "CMAKE_OPTIONS": "-G 'Ninja Multi-Config' -DCMAKE_C_COMPILER=clang-6.0 -DCMAKE_CXX_COMPILER=clang++-6.0 -DLY_PARALLEL_LINK_JOBS=4", + "CMAKE_OPTIONS": "-G 'Ninja Multi-Config' -DLY_PARALLEL_LINK_JOBS=4", "CMAKE_LY_PROJECTS": "AutomatedTesting", "CMAKE_TARGET": "TEST_SUITE_periodic", "CTEST_OPTIONS": "-L (SUITE_periodic) --no-tests=error", - "TEST_RESULTS": "True" + "TEST_RESULTS": "False" } }, "sandbox_test_profile": { @@ -162,7 +191,7 @@ "PARAMETERS": { "CONFIGURATION": "profile", "OUTPUT_DIRECTORY": "build/linux", - "CMAKE_OPTIONS": "-G 'Ninja Multi-Config' -DCMAKE_C_COMPILER=clang-6.0 -DCMAKE_CXX_COMPILER=clang++-6.0 -DLY_PARALLEL_LINK_JOBS=4 -DO3DE_HOME_PATH=\"${WORKSPACE}/home\" -DO3DE_REGISTER_ENGINE_PATH=\"${WORKSPACE}/o3de\" -DO3DE_REGISTER_THIS_ENGINE=TRUE", + "CMAKE_OPTIONS": "-G 'Ninja Multi-Config' -DLY_PARALLEL_LINK_JOBS=4", "CMAKE_LY_PROJECTS": "AutomatedTesting", "CMAKE_TARGET": "all", "CTEST_OPTIONS": "-L (SUITE_sandbox) --no-tests=error" @@ -178,11 +207,11 @@ "PARAMETERS": { "CONFIGURATION": "profile", "OUTPUT_DIRECTORY": "build/linux", - "CMAKE_OPTIONS": "-G 'Ninja Multi-Config' -DCMAKE_C_COMPILER=clang-6.0 -DCMAKE_CXX_COMPILER=clang++-6.0 -DLY_PARALLEL_LINK_JOBS=4", + "CMAKE_OPTIONS": "-G 'Ninja Multi-Config' -DLY_PARALLEL_LINK_JOBS=4", "CMAKE_LY_PROJECTS": "AutomatedTesting", "CMAKE_TARGET": "TEST_SUITE_benchmark", "CTEST_OPTIONS": "-L (SUITE_benchmark) --no-tests=error", - "TEST_RESULTS": "True" + "TEST_RESULTS": "False" } }, "release": { @@ -195,7 +224,7 @@ "PARAMETERS": { "CONFIGURATION": "release", "OUTPUT_DIRECTORY": "build/linux", - "CMAKE_OPTIONS": "-G 'Ninja Multi-Config' -DCMAKE_C_COMPILER=clang-6.0 -DCMAKE_CXX_COMPILER=clang++-6.0 -DLY_PARALLEL_LINK_JOBS=4", + "CMAKE_OPTIONS": "-G 'Ninja Multi-Config' -DLY_PARALLEL_LINK_JOBS=4", "CMAKE_LY_PROJECTS": "AutomatedTesting", "CMAKE_TARGET": "all" } @@ -210,9 +239,90 @@ "PARAMETERS": { "CONFIGURATION": "release", "OUTPUT_DIRECTORY": "build/mono_linux", - "CMAKE_OPTIONS": "-G 'Ninja Multi-Config' -DCMAKE_C_COMPILER=clang-6.0 -DCMAKE_CXX_COMPILER=clang++-6.0 -DLY_MONOLITHIC_GAME=TRUE -DLY_PARALLEL_LINK_JOBS=4", + "CMAKE_OPTIONS": "-G 'Ninja Multi-Config' -DLY_MONOLITHIC_GAME=TRUE -DLY_PARALLEL_LINK_JOBS=4", "CMAKE_LY_PROJECTS": "AutomatedTesting", "CMAKE_TARGET": "all" } + }, + "install_profile": { + "TAGS": [], + "COMMAND": "build_linux.sh", + "PARAMETERS": { + "CONFIGURATION": "profile", + "OUTPUT_DIRECTORY": "build/linux", + "CMAKE_OPTIONS": "-G 'Ninja Multi-Config' -DLY_PARALLEL_LINK_JOBS=4 -DLY_DISABLE_TEST_MODULES=TRUE", + "CMAKE_TARGET": "install" + } + }, + "installer": { + "TAGS": [ + "nightly-clean", + "nightly-installer" + ], + "PIPELINE_ENV":{ + "NODE_LABEL":"linux-707531fc7-packaging" + }, + "COMMAND": "build_installer_linux.sh", + "PARAMETERS": { + "CONFIGURATION": "profile", + "OUTPUT_DIRECTORY": "build/linux", + "CMAKE_OPTIONS": "-G 'Ninja Multi-Config' -DLY_PARALLEL_LINK_JOBS=4 -DLY_DISABLE_TEST_MODULES=TRUE -DLY_VERSION_ENGINE_NAME=o3de-sdk", + "EXTRA_CMAKE_OPTIONS": "-DLY_INSTALLER_AUTO_GEN_TAG=TRUE -DLY_INSTALLER_DOWNLOAD_URL=${INSTALLER_DOWNLOAD_URL} -DLY_INSTALLER_LICENSE_URL=${INSTALLER_DOWNLOAD_URL}/license", + "CPACK_OPTIONS": "-D CPACK_UPLOAD_URL=${CPACK_UPLOAD_URL}", + "CMAKE_TARGET": "all" + } + }, + "install_profile_pipe": { + "TAGS": [ + "nightly-incremental", + "nightly-clean" + ], + "PIPELINE_ENV": { + "PROJECT_REPOSITORY_NAME": "TestProject" + }, + "steps": [ + "install_profile", + "project_generate", + "project_engineinstall_profile" + ] + }, + "project_generate": { + "TAGS": [], + "COMMAND": "python_linux.sh", + "PARAMETERS": { + "SCRIPT_PATH": "install/scripts/o3de.py", + "SCRIPT_PARAMETERS": "create-project -pp ${WORKSPACE}/${PROJECT_REPOSITORY_NAME} --force" + } + }, + "project_engineinstall_profile": { + "TAGS": [], + "COMMAND": "build_linux.sh", + "PARAMETERS": { + "COMMAND_CWD": "${WORKSPACE}/${PROJECT_REPOSITORY_NAME}", + "CONFIGURATION": "profile", + "OUTPUT_DIRECTORY": "build/linux", + "CMAKE_OPTIONS": "-G 'Ninja Multi-Config' -DLY_PARALLEL_LINK_JOBS=4 -DCMAKE_MODULE_PATH=${WORKSPACE}/o3de/install/cmake", + "CMAKE_TARGET": "all" + } + }, + "awsi_deployment": { + "TAGS": [], + "PIPELINE_ENV": { + "NONBLOCKING_STEP": "True" + }, + "COMMAND": "deploy_cdk_applications.sh", + "PARAMETERS": { + "NVM_VERSION": "v0.39.1" + } + }, + "awsi_destruction": { + "TAGS": [], + "PIPELINE_ENV": { + "NONBLOCKING_STEP": "True" + }, + "COMMAND": "destroy_cdk_applications.sh", + "PARAMETERS": { + "NVM_VERSION": "v0.39.1" + } } } diff --git a/scripts/build/Platform/Linux/build_installer_linux.sh b/scripts/build/Platform/Linux/build_installer_linux.sh new file mode 100755 index 0000000000..301eb5f16d --- /dev/null +++ b/scripts/build/Platform/Linux/build_installer_linux.sh @@ -0,0 +1,15 @@ +#!/usr/bin/env bash +# +# Copyright (c) Contributors to the Open 3D Engine Project. +# For complete copyright and license terms please see the LICENSE at the root of this distribution. +# +# SPDX-License-Identifier: Apache-2.0 OR MIT +# +# + +set -o errexit # exit on the first failure encountered + +BASEDIR=$(dirname "$0") +source $BASEDIR/build_linux.sh + +source $BASEDIR/installer_linux.sh diff --git a/scripts/build/Platform/Linux/build_linux.sh b/scripts/build/Platform/Linux/build_linux.sh index fd73e17a12..ce84ec1749 100755 --- a/scripts/build/Platform/Linux/build_linux.sh +++ b/scripts/build/Platform/Linux/build_linux.sh @@ -17,7 +17,10 @@ SOURCE_DIRECTORY=${PWD} pushd $OUTPUT_DIRECTORY LAST_CONFIGURE_CMD_FILE=ci_last_configure_cmd.txt -CONFIGURE_CMD="cmake ${SOURCE_DIRECTORY} ${CMAKE_OPTIONS} ${EXTRA_CMAKE_OPTIONS} -DLY_3RDPARTY_PATH=${LY_3RDPARTY_PATH} -DLY_PROJECTS='${CMAKE_LY_PROJECTS}'" +CONFIGURE_CMD="cmake '${SOURCE_DIRECTORY}' ${CMAKE_OPTIONS} ${EXTRA_CMAKE_OPTIONS}" +if [[ -n "$CMAKE_LY_PROJECTS" ]]; then + CONFIGURE_CMD="${CONFIGURE_CMD} -DLY_PROJECTS='${CMAKE_LY_PROJECTS}'" +fi if [[ ! -e "CMakeCache.txt" ]]; then echo [ci_build] First run, generating RUN_CONFIGURE=1 @@ -34,13 +37,13 @@ else fi if [[ ! -z "$RUN_CONFIGURE" ]]; then # have to use eval since $CMAKE_OPTIONS (${EXTRA_CMAKE_OPTIONS}) contains quotes that need to be processed - echo [ci_build] ${CONFIGURE_CMD} + eval echo [ci_build] ${CONFIGURE_CMD} eval ${CONFIGURE_CMD} # Save the run only if success echo "${CONFIGURE_CMD}" > ${LAST_CONFIGURE_CMD_FILE} fi -echo [ci_build] cmake --build . --target ${CMAKE_TARGET} --config ${CONFIGURATION} -j $(grep -c processor /proc/cpuinfo) -- ${CMAKE_NATIVE_BUILD_ARGS} -cmake --build . --target ${CMAKE_TARGET} --config ${CONFIGURATION} -j $(grep -c processor /proc/cpuinfo) -- ${CMAKE_NATIVE_BUILD_ARGS} +eval echo [ci_build] cmake --build . --target ${CMAKE_TARGET} --config ${CONFIGURATION} -j $(grep -c processor /proc/cpuinfo) -- ${CMAKE_NATIVE_BUILD_ARGS} +eval cmake --build . --target ${CMAKE_TARGET} --config ${CONFIGURATION} -j $(grep -c processor /proc/cpuinfo) -- ${CMAKE_NATIVE_BUILD_ARGS} popd diff --git a/scripts/build/Platform/Linux/deploy_cdk_applications.sh b/scripts/build/Platform/Linux/deploy_cdk_applications.sh new file mode 100755 index 0000000000..9a0a31397e --- /dev/null +++ b/scripts/build/Platform/Linux/deploy_cdk_applications.sh @@ -0,0 +1,111 @@ +#!/bin/bash + +# Copyright (c) Contributors to the Open 3D Engine Project. +# For complete copyright and license terms please see the LICENSE at the root of this distribution. +# +# SPDX-License-Identifier: Apache-2.0 OR MIT +# + +# Deploy the CDK applications for AWS gems (Linux only) + +SOURCE_DIRECTORY=$(dirname "$0") +PATH=$SOURCE_DIRECTORY/python:$PATH +GEM_DIRECTORY=$SOURCE_DIRECTORY/Gems + +DeployCDKApplication() +{ + # Deploy the CDK application for a specific AWS gem + GEM_NAME=$1 + ADDITIONAL_ARGUMENTS=$2 + echo [cdk_deployment] Deploy the CDK application for the $GEM_NAME gem + pushd $GEM_DIRECTORY/$GEM_NAME/cdk + + # Revert the CDK application code to a stable state using the provided commit ID + if ! git checkout $COMMIT_ID -- .; + then + echo [git_checkout] Failed to checkout the CDK application for the $GEM_NAME gem using commit ID $COMMIT_ID + popd + exit 1 + fi + + # Install required packages for the CDK application + if ! python -m pip install -r requirements.txt; + then + echo [cdk_deployment] Failed to install required packages for the $GEM_NAME gem + popd + exit 1 + fi + + # Deploy the CDK application + if ! cdk deploy $ADDITIONAL_ARGUMENTS --require-approval never; + then + echo [cdk_deployment] Failed to deploy the CDK application for the $GEM_NAME gem + popd + exit 1 + fi + popd +} + +# Create and activate a virtualenv for the CDK deployment +if ! python/python.sh -m venv .env; +then + echo [cdk_bootstrap] Failed to create a virtualenv for the CDK deployment + exit 1 +fi +if ! source .env/bin/activate; +then + echo [cdk_bootstrap] Failed to activate the virtualenv for the CDK deployment + exit 1 +fi + +echo [cdk_installation] Install nvm $NVM_VERSION +curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/$NVM_VERSION/install.sh | bash +export NVM_DIR="$HOME/.nvm" +[ -s "$NVM_DIR/nvm.sh" ] && \. "$NVM_DIR/nvm.sh" # This loads nvm +[ -s "$NVM_DIR/bash_completion" ] && \. "$NVM_DIR/bash_completion" # This loads nvm bash_completion +echo [cdk_installation] Install the current version of nodejs +nvm install node + +echo [cdk_installation] Install the latest version of CDK +if ! npm uninstall -g aws-cdk; +then + echo [cdk_bootstrap] Failed to uninstall the current version of CDK + exit 1 +fi +if ! npm install -g aws-cdk@latest; +then + echo [cdk_bootstrap] Failed to install the latest version of CDK + exit 1 +fi + +# Set temporary AWS credentials from the assume role +credentials=$(aws sts assume-role --query Credentials.[SecretAccessKey,SessionToken,AccessKeyId] --output text --role-arn $ASSUME_ROLE_ARN --role-session-name o3de-Automation-session) +AWS_SECRET_ACCESS_KEY=$(echo "$credentials" | cut -d' ' -f1) +AWS_SESSION_TOKEN=$(echo "$credentials" | cut -d' ' -f2) +AWS_ACCESS_KEY_ID=$(echo "$credentials" | cut -d' ' -f3) + +O3DE_AWS_DEPLOY_ACCOUNT=$(echo "$ASSUME_ROLE_ARN" | cut -d':' -f5) + +# Bootstrap and deploy the CDK applications +echo [cdk_bootstrap] Bootstrap CDK +if ! cdk bootstrap aws://$O3DE_AWS_DEPLOY_ACCOUNT/$O3DE_AWS_DEPLOY_REGION; +then + echo [cdk_bootstrap] Failed to bootstrap CDK + exit 1 +fi + +if ! DeployCDKApplication AWSCore "-c disable_access_log=true -c remove_all_storage_on_destroy=true --all"; +then + exit 1 +fi +if ! DeployCDKApplication AWSClientAuth; +then + exit 1 +fi +if ! DeployCDKApplication AWSMetrics "-c batch_processing=true"; +then + exit 1 +fi + +exit 0 + diff --git a/scripts/build/Platform/Linux/destroy_cdk_applications.sh b/scripts/build/Platform/Linux/destroy_cdk_applications.sh new file mode 100755 index 0000000000..54f84911a6 --- /dev/null +++ b/scripts/build/Platform/Linux/destroy_cdk_applications.sh @@ -0,0 +1,104 @@ +#!/bin/bash + +# Copyright (c) Contributors to the Open 3D Engine Project. +# For complete copyright and license terms please see the LICENSE at the root of this distribution. +# +# SPDX-License-Identifier: Apache-2.0 OR MIT +# + +# Deploy the CDK applications for AWS gems (Linux only) +# Prerequisites: +# 1) Node.js is installed +# 2) Node.js version >= 10.13.0, except for versions 13.0.0 - 13.6.0. A version in active long-term support is recommended. + +SOURCE_DIRECTORY=$(dirname "$0") +PATH=$SOURCE_DIRECTORY/python:$PATH +GEM_DIRECTORY=$SOURCE_DIRECTORY/Gems + +DestroyCDKApplication() +{ +# Destroy the CDK application for a specific AWS gem +GEM_NAME=$1 +echo [cdk_destruction] Destroy the CDK application for the $GEM_NAME gem +pushd $GEM_DIRECTORY/$GEM_NAME/cdk + +# Revert the CDK application code to a stable state using the provided commit ID +if ! git checkout $COMMIT_ID -- .; +then + echo [git_checkout] Failed to checkout the CDK application for the $GEM_NAME gem using commit ID $COMMIT_ID + popd + return 1 +fi + +# Install required packages for the CDK application +if ! python -m pip install -r requirements.txt; +then + echo [cdk_destruction] Failed to install required packages for the $GEM_NAME gem + popd + return 1 +fi + +# Destroy the CDK application +if ! cdk destroy --all -f; +then + echo [cdk_destruction] Failed to destroy the CDK application for the $GEM_NAME gem + popd + return 1 +fi +popd +return 0 +} + +# Create and activate a virtualenv for the CDK deployment +if ! python/python.sh -m venv .env; +then + echo [cdk_bootstrap] Failed to create a virtualenv for the CDK deployment + return 1 +fi +if ! source .env/bin/activate; +then + echo [cdk_bootstrap] Failed to activate the virtualenv for the CDK deployment + exit 1 +fi + +echo [cdk_installation] Install nvm $NVM_VERSION +curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/$NVM_VERSION/install.sh | bash +export NVM_DIR="$HOME/.nvm" +[ -s "$NVM_DIR/nvm.sh" ] && \. "$NVM_DIR/nvm.sh" # This loads nvm +[ -s "$NVM_DIR/bash_completion" ] && \. "$NVM_DIR/bash_completion" # This loads nvm bash_completion +echo [cdk_installation] Install the current version of nodejs +nvm install node + +echo [cdk_installation] Install the latest version of CDK +if ! sudo npm uninstall -g aws-cdk; +then + echo [cdk_bootstrap] Failed to uninstall the current version of CDK + exit 1 +fi +if ! sudo npm install -g aws-cdk@latest; +then + echo [cdk_bootstrap] Failed to install the latest version of CDK + exit 1 +fi + +# Set temporary AWS credentials from the assume role +credentials=$(aws sts assume-role --query Credentials.[SecretAccessKey,SessionToken,AccessKeyId] --output text --role-arn $ASSUME_ROLE_ARN --role-session-name o3de-Automation-session) +AWS_SECRET_ACCESS_KEY=$(echo "$credentials" | cut -d' ' -f1) +AWS_SESSION_TOKEN=$(echo "$credentials" | cut -d' ' -f2) +AWS_ACCESS_KEY_ID=$(echo "$credentials" | cut -d' ' -f3) + +ERROR_EXISTS=0 +DestroyCDKApplication AWSCore +ERROR_EXISTS=$? +DestroyCDKApplication AWSClientAuth +ERROR_EXISTS=$? +DestroyCDKApplication AWSMetrics +ERROR_EXISTS=$? + +if [ $ERROR_EXISTS -eq 1 ] +then + exit 1 +fi + +exit 0 + diff --git a/scripts/build/Platform/Linux/env_linux.sh b/scripts/build/Platform/Linux/env_linux.sh index a03b9642fb..059bb119ff 100755 --- a/scripts/build/Platform/Linux/env_linux.sh +++ b/scripts/build/Platform/Linux/env_linux.sh @@ -18,3 +18,8 @@ if ! command -v ninja &> /dev/null; then echo "[ci_build] Ninja not found" exit 1 fi + +if [[ -n "${COMMAND_CWD}" ]]; then + echo $(eval echo [ci_build] Changing CWD to $COMMAND_CWD) + cd $(eval echo ${COMMAND_CWD}) +fi diff --git a/scripts/build/Platform/Linux/installer_linux.sh b/scripts/build/Platform/Linux/installer_linux.sh new file mode 100755 index 0000000000..3ded242522 --- /dev/null +++ b/scripts/build/Platform/Linux/installer_linux.sh @@ -0,0 +1,30 @@ +#!/usr/bin/env bash +# +# Copyright (c) Contributors to the Open 3D Engine Project. +# For complete copyright and license terms please see the LICENSE at the root of this distribution. +# +# SPDX-License-Identifier: Apache-2.0 OR MIT +# +# + +set -o errexit # exit on the first failure encountered + +BASEDIR=$(dirname "$0") +source $BASEDIR/env_linux.sh + +mkdir -p ${OUTPUT_DIRECTORY} +SOURCE_DIRECTORY=${PWD} +pushd $OUTPUT_DIRECTORY + +if ! command -v cpack &> /dev/null; then + echo "[ci_build] CPack not found" + exit 1 +fi + +echo [ci_build] cpack --version +cpack --version + +eval echo [ci_build] cpack -C ${CONFIGURATION} ${CPACK_OPTIONS} +eval cpack -C ${CONFIGURATION} ${CPACK_OPTIONS} + +popd diff --git a/scripts/build/Platform/Linux/pipeline.json b/scripts/build/Platform/Linux/pipeline.json index d964a693ce..e9667d312d 100644 --- a/scripts/build/Platform/Linux/pipeline.json +++ b/scripts/build/Platform/Linux/pipeline.json @@ -1,7 +1,7 @@ { "ENV": { - "NODE_LABEL": "linux", - "LY_3RDPARTY_PATH": "/home/lybuilder/ly/workspace/3rdParty", + "NODE_LABEL": "linux-707531fc7", + "LY_3RDPARTY_PATH": "/data/workspace/3rdParty", "TIMEOUT": 30, "WORKSPACE": "/data/workspace", "MOUNT_VOLUME": true @@ -10,11 +10,70 @@ "daily-pipeline-metrics": { "CLEAN_WORKSPACE": true }, - "packaging": { - "CLEAN_WORKSPACE": true - }, "nightly-clean": { "CLEAN_WORKSPACE": true } + }, + "PIPELINE_JENKINS_PARAMETERS": { + "nightly-incremental": [ + { + "parameter_name": "O3DE_AWS_PROJECT_NAME", + "parameter_type": "string", + "default_value": "", + "use_last_run_value": true, + "description": "The name of the O3DE project that stacks should be deployed for." + }, + { + "parameter_name": "O3DE_AWS_DEPLOY_REGION", + "parameter_type": "string", + "default_value": "", + "use_last_run_value": true, + "description": "The region to deploy the stacks into." + }, + { + "parameter_name": "ASSUME_ROLE_ARN", + "parameter_type": "string", + "default_value": "", + "use_last_run_value": true, + "description": "The ARN of the IAM role to assume to retrieve temporary AWS credentials." + }, + { + "parameter_name": "COMMIT_ID", + "parameter_type": "string", + "default_value": "", + "use_last_run_value": true, + "description": "The commit ID for locking the version of CDK applications to deploy." + } + ], + "nightly-clean": [ + { + "parameter_name": "O3DE_AWS_PROJECT_NAME", + "parameter_type": "string", + "default_value": "", + "use_last_run_value": true, + "description": "The name of the O3DE project that stacks should be deployed for." + }, + { + "parameter_name": "O3DE_AWS_DEPLOY_REGION", + "parameter_type": "string", + "default_value": "", + "use_last_run_value": true, + "description": "The region to deploy the stacks into." + }, + { + "parameter_name": "ASSUME_ROLE_ARN", + "parameter_type": "string", + "default_value": "", + "use_last_run_value": true, + "description": "The ARN of the IAM role to assume to retrieve temporary AWS credentials." + }, + { + "parameter_name": "COMMIT_ID", + "parameter_type": "string", + "default_value": "", + "use_last_run_value": true, + "description": "The commit ID for locking the version of CDK applications to deploy." + } + ] } -} \ No newline at end of file +} diff --git a/scripts/build/Platform/Mac/asset_mac.sh b/scripts/build/Platform/Mac/asset_mac.sh index f70d898e0c..96eaeab5aa 100755 --- a/scripts/build/Platform/Mac/asset_mac.sh +++ b/scripts/build/Platform/Mac/asset_mac.sh @@ -9,6 +9,8 @@ set -o errexit # exit on the first failure encountered +SOURCE_DIRECTORY=${PWD} + if [[ ! -d $OUTPUT_DIRECTORY ]]; then echo [ci_build] Error: $OUTPUT_DIRECTORY was not found exit 1 @@ -22,8 +24,8 @@ fi for project in $(echo $CMAKE_LY_PROJECTS | sed "s/;/ /g") do - echo [ci_build] ${ASSET_PROCESSOR_BINARY} $ASSET_PROCESSOR_OPTIONS --project-path=$project --platforms=$ASSET_PROCESSOR_PLATFORMS - ${ASSET_PROCESSOR_BINARY} $ASSET_PROCESSOR_OPTIONS --project-path=$project --platforms=$ASSET_PROCESSOR_PLATFORMS + echo [ci_build] ${ASSET_PROCESSOR_BINARY} $ASSET_PROCESSOR_OPTIONS --project-path=$SOURCE_DIRECTORY/$project --platforms=$ASSET_PROCESSOR_PLATFORMS + ${ASSET_PROCESSOR_BINARY} $ASSET_PROCESSOR_OPTIONS --project-path=$SOURCE_DIRECTORY/$project --platforms=$ASSET_PROCESSOR_PLATFORMS done popd diff --git a/scripts/build/Platform/Mac/build_config.json b/scripts/build/Platform/Mac/build_config.json index b57cc522bc..6147f70f0c 100644 --- a/scripts/build/Platform/Mac/build_config.json +++ b/scripts/build/Platform/Mac/build_config.json @@ -14,7 +14,8 @@ ], "steps": [ "profile", - "asset_profile" + "asset_profile", + "test_profile" ] }, "metrics": { @@ -89,6 +90,22 @@ "ASSET_PROCESSOR_PLATFORMS": "mac" } }, + "test_profile": { + "TAGS": [ + "daily-pipeline-metrics", + "weekly-build-metrics" + ], + "COMMAND": "build_test_mac.sh", + "PARAMETERS": { + "CONFIGURATION": "profile", + "OUTPUT_DIRECTORY": "build/mac", + "CMAKE_OPTIONS": "-G Xcode", + "CMAKE_LY_PROJECTS": "AutomatedTesting", + "CMAKE_TARGET": "ALL_BUILD", + "CTEST_OPTIONS": "-L (SUITE_smoke|SUITE_main) -LE (REQUIRES_gpu) --no-tests=error", + "TEST_RESULTS": "False" + } + }, "periodic_test_profile": { "TAGS": [ "nightly-incremental", @@ -102,8 +119,8 @@ "CMAKE_OPTIONS": "-G Xcode", "CMAKE_LY_PROJECTS": "AutomatedTesting", "CMAKE_TARGET": "TEST_SUITE_periodic", - "CTEST_OPTIONS": "-L \"(SUITE_periodic)\"", - "TEST_RESULTS": "True" + "CTEST_OPTIONS": "-L (SUITE_periodic)", + "TEST_RESULTS": "False" } }, "benchmark_test_profile": { @@ -119,8 +136,8 @@ "CMAKE_OPTIONS": "-G Xcode", "CMAKE_LY_PROJECTS": "AutomatedTesting", "CMAKE_TARGET": "TEST_SUITE_benchmark", - "CTEST_OPTIONS": "-L \"(SUITE_benchmark)\"", - "TEST_RESULTS": "True" + "CTEST_OPTIONS": "-L (SUITE_benchmark)", + "TEST_RESULTS": "False" } }, "release": { @@ -153,14 +170,49 @@ "CMAKE_TARGET": "ALL_BUILD" } }, - "mac_packaging_all": { + "install_profile": { + "TAGS": [], + "COMMAND": "build_mac.sh", + "PARAMETERS": { + "CONFIGURATION": "profile", + "OUTPUT_DIRECTORY": "build/mac", + "CMAKE_OPTIONS": "-G Xcode -DLY_DISABLE_TEST_MODULES=TRUE", + "CMAKE_LY_PROJECTS": "", + "CMAKE_TARGET": "install" + } + }, + "install_profile_pipe": { "TAGS": [ - "packaging" + "nightly-incremental", + "nightly-clean" ], + "PIPELINE_ENV": { + "PROJECT_REPOSITORY_NAME": "TestProject" + }, + "steps": [ + "install_profile", + "project_generate", + "project_engineinstall_profile" + ] + }, + "project_generate": { + "TAGS": [], "COMMAND": "python_mac.sh", "PARAMETERS": { - "SCRIPT_PATH": "scripts/build/package/package.py", - "SCRIPT_PARAMETERS": "--platform Mac --type all" + "SCRIPT_PATH": "install/O3DE_SDK.app/Contents/Engine/scripts/o3de.py", + "SCRIPT_PARAMETERS": "create-project -pp ${WORKSPACE}/${PROJECT_REPOSITORY_NAME} --force" + } + }, + "project_engineinstall_profile": { + "TAGS": [], + "COMMAND": "build_mac.sh", + "PARAMETERS": { + "COMMAND_CWD": "${WORKSPACE}/${PROJECT_REPOSITORY_NAME}", + "CONFIGURATION": "profile", + "OUTPUT_DIRECTORY": "build/mac", + "CMAKE_OPTIONS": "-G Xcode -DCMAKE_MODULE_PATH=${WORKSPACE}/o3de/install/O3DE_SDK.app/Contents/Engine/cmake", + "CMAKE_LY_PROJECTS": "", + "CMAKE_TARGET": "ALL_BUILD" } } } diff --git a/scripts/build/Platform/Mac/build_mac.sh b/scripts/build/Platform/Mac/build_mac.sh index cb271212d6..e0cb1ba889 100755 --- a/scripts/build/Platform/Mac/build_mac.sh +++ b/scripts/build/Platform/Mac/build_mac.sh @@ -17,7 +17,10 @@ SOURCE_DIRECTORY=${PWD} pushd $OUTPUT_DIRECTORY LAST_CONFIGURE_CMD_FILE=ci_last_configure_cmd.txt -CONFIGURE_CMD="cmake ${SOURCE_DIRECTORY} ${CMAKE_OPTIONS} ${EXTRA_CMAKE_OPTIONS} -DLY_3RDPARTY_PATH=${LY_3RDPARTY_PATH} -DLY_PROJECTS='${CMAKE_LY_PROJECTS}'" +CONFIGURE_CMD="cmake '${SOURCE_DIRECTORY}' ${CMAKE_OPTIONS} ${EXTRA_CMAKE_OPTIONS}" +if [[ -n "$CMAKE_LY_PROJECTS" ]]; then + CONFIGURE_CMD="${CONFIGURE_CMD} -DLY_PROJECTS='${CMAKE_LY_PROJECTS}'" +fi if [[ ! -e "CMakeCache.txt" ]]; then echo [ci_build] First run, generating RUN_CONFIGURE=1 @@ -39,13 +42,13 @@ RUN_CONFIGURE=1 if [[ ! -z "$RUN_CONFIGURE" ]]; then # have to use eval since $CMAKE_OPTIONS (${EXTRA_CMAKE_OPTIONS}) contains quotes that need to be processed - echo [ci_build] ${CONFIGURE_CMD} + eval echo [ci_build] ${CONFIGURE_CMD} eval ${CONFIGURE_CMD} # Save the run only if success echo "${CONFIGURE_CMD}" > ${LAST_CONFIGURE_CMD_FILE} fi -echo [ci_build] cmake --build . --target ${CMAKE_TARGET} --config ${CONFIGURATION} -j $(sysctl -n hw.ncpu) -- ${CMAKE_NATIVE_BUILD_ARGS} -cmake --build . --target ${CMAKE_TARGET} --config ${CONFIGURATION} -j $(sysctl -n hw.ncpu) -- ${CMAKE_NATIVE_BUILD_ARGS} +echo [ci_build] cmake --build . --target ${CMAKE_TARGET} --config ${CONFIGURATION} -j $(/usr/sbin/sysctl -n hw.ncpu) -- ${CMAKE_NATIVE_BUILD_ARGS} +cmake --build . --target ${CMAKE_TARGET} --config ${CONFIGURATION} -j $(/usr/sbin/sysctl -n hw.ncpu) -- ${CMAKE_NATIVE_BUILD_ARGS} popd diff --git a/scripts/build/Platform/Mac/env_mac.sh b/scripts/build/Platform/Mac/env_mac.sh index 2c974a1efe..f5fd9f5773 100755 --- a/scripts/build/Platform/Mac/env_mac.sh +++ b/scripts/build/Platform/Mac/env_mac.sh @@ -13,3 +13,8 @@ if ! command -v cmake &> /dev/null; then echo "[ci_build] CMake not found" exit 1 fi + +if [[ -n "${COMMAND_CWD}" ]]; then + echo $(eval echo [ci_build] Changing CWD to $COMMAND_CWD) + cd $(eval echo ${COMMAND_CWD}) +fi diff --git a/scripts/build/Platform/Mac/pipeline.json b/scripts/build/Platform/Mac/pipeline.json index e8cea0f06d..24f42a0c69 100644 --- a/scripts/build/Platform/Mac/pipeline.json +++ b/scripts/build/Platform/Mac/pipeline.json @@ -10,9 +10,6 @@ "daily-pipeline-metrics": { "CLEAN_WORKSPACE": true }, - "packaging": { - "CLEAN_WORKSPACE": true - }, "nightly-clean": { "CLEAN_WORKSPACE": true } diff --git a/scripts/build/Platform/Mac/test_mac.sh b/scripts/build/Platform/Mac/test_mac.sh index e398de3061..46dffab84d 100755 --- a/scripts/build/Platform/Mac/test_mac.sh +++ b/scripts/build/Platform/Mac/test_mac.sh @@ -19,8 +19,9 @@ fi pushd $OUTPUT_DIRECTORY # Find the CTEST_RUN_FLAGS from the CMakeCache.txt file, then replace the $ with the current configuration -IFS='=' read -ra CTEST_RUN_FLAGS <<< $(cmake -N -LA . | grep "CTEST_RUN_FLAGS:STRING") -CTEST_RUN_FLAGS=${CTEST_RUN_FLAGS[1]/$/${CONFIGURATION}} +CTEST_RUN_FLAGS=$(cmake -N -LA . | grep "CTEST_RUN_FLAGS:STRING") +CTEST_RUN_FLAGS=${CTEST_RUN_FLAGS/CTEST_RUN_FLAGS:STRING=/} +CTEST_RUN_FLAGS=${CTEST_RUN_FLAGS/$/${CONFIGURATION}} # Run ctest echo [ci_build] ctest ${CTEST_RUN_FLAGS} ${CTEST_OPTIONS} diff --git a/scripts/build/Platform/Windows/asset_windows.cmd b/scripts/build/Platform/Windows/asset_windows.cmd index 8db0e43e31..cc266ba42a 100644 --- a/scripts/build/Platform/Windows/asset_windows.cmd +++ b/scripts/build/Platform/Windows/asset_windows.cmd @@ -9,6 +9,8 @@ REM SETLOCAL EnableDelayedExpansion +SET SOURCE_DIRECTORY=%CD% + IF NOT EXIST %OUTPUT_DIRECTORY% ( ECHO [ci_build] Error: %OUTPUT_DIRECTORY% was not found GOTO :error @@ -21,8 +23,8 @@ IF NOT EXIST %ASSET_PROCESSOR_BINARY% ( ) FOR %%P in (%CMAKE_LY_PROJECTS%) do ( - ECHO [ci_build] %ASSET_PROCESSOR_BINARY% %ASSET_PROCESSOR_OPTIONS% --project-path=%%P --platforms=%ASSET_PROCESSOR_PLATFORMS% - %ASSET_PROCESSOR_BINARY% %ASSET_PROCESSOR_OPTIONS% --project-path=%%P --platforms=%ASSET_PROCESSOR_PLATFORMS% + ECHO [ci_build] %ASSET_PROCESSOR_BINARY% %ASSET_PROCESSOR_OPTIONS% --project-path=%SOURCE_DIRECTORY%/%%P --platforms=%ASSET_PROCESSOR_PLATFORMS% + %ASSET_PROCESSOR_BINARY% %ASSET_PROCESSOR_OPTIONS% --project-path=%SOURCE_DIRECTORY%/%%P --platforms=%ASSET_PROCESSOR_PLATFORMS% IF NOT !ERRORLEVEL!==0 GOTO :popd_error ) diff --git a/scripts/build/Platform/Windows/build_config.json b/scripts/build/Platform/Windows/build_config.json index b185a845ec..e3d5a4a3fc 100644 --- a/scripts/build/Platform/Windows/build_config.json +++ b/scripts/build/Platform/Windows/build_config.json @@ -15,24 +15,24 @@ "validation" ] }, - "debug_vs2019_pipe": { + "debug_pipe": { "TAGS": [ "nightly-incremental", "nightly-clean" ], "steps": [ - "debug_vs2019", - "test_debug_vs2019" + "debug", + "test_debug" ] }, - "profile_vs2019_pipe": { + "profile_pipe": { "TAGS": [ "default" ], "steps": [ - "profile_vs2019", - "asset_profile_vs2019", - "test_cpu_profile_vs2019" + "profile", + "asset_profile", + "test_cpu_profile" ] }, "scrubbing": { @@ -56,63 +56,43 @@ "COMMAND": "python_windows.cmd", "PARAMETERS": { "SCRIPT_PATH": "scripts/build/ci_build_metrics.py", - "SCRIPT_PARAMETERS": "--platform=Windows --repository=!REPOSITORY_NAME! --jobname=!JOB_NAME! --jobnumber=!BUILD_NUMBER! --jobnode=!NODE_LABEL! --changelist=!CHANGE_ID!" + "SCRIPT_PARAMETERS": "--platform=Windows --repository=%REPOSITORY_NAME% --jobname=%JOB_NAME% --jobnumber=%BUILD_NUMBER% --jobnode=%NODE_LABEL% --changelist=%CHANGE_ID%" } }, - "windows_packaging_all": { - "TAGS": [ - "packaging" - ], - "COMMAND": "python_windows.cmd", - "PARAMETERS": { - "SCRIPT_PATH": "scripts/build/package/package.py", - "SCRIPT_PARAMETERS": "--platform Windows --type all" - } - }, - "3rdParty_all": { - "TAGS": [ - "packaging" - ], - "COMMAND": "python_windows.cmd", - "PARAMETERS": { - "SCRIPT_PATH": "scripts/build/package/package.py", - "SCRIPT_PARAMETERS": "--platform 3rdParty --type 3rdParty_all" - } - }, - "test_impact_analysis_profile_vs2019": { + "test_impact_analysis_profile": { "TAGS": [ ], "COMMAND": "python_windows.cmd", "PARAMETERS": { - "OUTPUT_DIRECTORY": "build/windows_vs2019", + "OUTPUT_DIRECTORY": "build/windows", "CONFIGURATION": "profile", "SCRIPT_PATH": "scripts/build/TestImpactAnalysis/tiaf_driver.py", "SCRIPT_PARAMETERS": - "--config=\"!OUTPUT_DIRECTORY!/bin/TestImpactFramework/profile/Persistent/tiaf.json\" --src-branch=!BRANCH_NAME! --dst-branch=!CHANGE_TARGET! --commit=!CHANGE_ID! --s3-bucket=!TEST_IMPACT_S3_BUCKET! --mars-index-prefix=jonawals --s3-top-level-dir=!REPOSITORY_NAME! --build-number=!BUILD_NUMBER! --suite=main --test-failure-policy=continue" + "--config=\"%OUTPUT_DIRECTORY%/bin/TestImpactFramework/profile/Persistent/tiaf.json\" --src-branch=%BRANCH_NAME% --dst-branch=%CHANGE_TARGET% --commit=%CHANGE_ID% --s3-bucket=%TEST_IMPACT_S3_BUCKET% --mars-index-prefix=jonawals --s3-top-level-dir=%REPOSITORY_NAME% --build-number=%BUILD_NUMBER% --suite=main --test-failure-policy=continue" } }, - "debug_vs2019": { + "debug": { "TAGS": [ "weekly-build-metrics" ], "COMMAND": "build_windows.cmd", "PARAMETERS": { "CONFIGURATION": "debug", - "OUTPUT_DIRECTORY": "build\\windows_vs2019", + "OUTPUT_DIRECTORY": "build\\windows", "CMAKE_OPTIONS": "-G \"Visual Studio 16 2019\" -DCMAKE_SYSTEM_VERSION=10.0", "CMAKE_LY_PROJECTS": "AutomatedTesting", "CMAKE_TARGET": "ALL_BUILD", "CMAKE_NATIVE_BUILD_ARGS": "/m /nologo" } }, - "test_debug_vs2019": { + "test_debug": { "TAGS": [ "weekly-build-metrics" ], "COMMAND": "build_test_windows.cmd", "PARAMETERS": { "CONFIGURATION": "debug", - "OUTPUT_DIRECTORY": "build\\windows_vs2019", + "OUTPUT_DIRECTORY": "build\\windows", "CMAKE_OPTIONS": "-G \"Visual Studio 16 2019\" -DCMAKE_SYSTEM_VERSION=10.0", "CMAKE_LY_PROJECTS": "AutomatedTesting", "CMAKE_TARGET": "TEST_SUITE_smoke TEST_SUITE_main", @@ -122,7 +102,7 @@ "TEST_RESULTS": "True" } }, - "profile_vs2019": { + "profile": { "TAGS": [ "daily-pipeline-metrics", "weekly-build-metrics" @@ -130,14 +110,14 @@ "COMMAND": "build_windows.cmd", "PARAMETERS": { "CONFIGURATION": "profile", - "OUTPUT_DIRECTORY": "build\\windows_vs2019", - "CMAKE_OPTIONS": "-G \"Visual Studio 16 2019\" -DCMAKE_SYSTEM_VERSION=10.0 -DLY_TEST_IMPACT_INSTRUMENTATION_BIN=!TEST_IMPACT_WIN_BINARY!", + "OUTPUT_DIRECTORY": "build\\windows", + "CMAKE_OPTIONS": "-G \"Visual Studio 16 2019\" -DCMAKE_SYSTEM_VERSION=10.0 -DLY_TEST_IMPACT_INSTRUMENTATION_BIN=%TEST_IMPACT_WIN_BINARY%", "CMAKE_LY_PROJECTS": "AutomatedTesting", "CMAKE_TARGET": "ALL_BUILD", "CMAKE_NATIVE_BUILD_ARGS": "/m /nologo" } }, - "profile_vs2019_nounity": { + "profile_nounity": { "TAGS": [ "nightly-incremental", "nightly-clean", @@ -146,14 +126,14 @@ "COMMAND": "build_windows.cmd", "PARAMETERS": { "CONFIGURATION": "profile", - "OUTPUT_DIRECTORY": "build\\windows_vs2019", + "OUTPUT_DIRECTORY": "build\\windows", "CMAKE_OPTIONS": "-G \"Visual Studio 16 2019\" -DCMAKE_SYSTEM_VERSION=10.0 -DLY_UNITY_BUILD=FALSE", "CMAKE_LY_PROJECTS": "AutomatedTesting", "CMAKE_TARGET": "ALL_BUILD", "CMAKE_NATIVE_BUILD_ARGS": "/m /nologo" } }, - "test_cpu_profile_vs2019": { + "test_cpu_profile": { "TAGS": [ "daily-pipeline-metrics", "weekly-build-metrics" @@ -161,7 +141,7 @@ "COMMAND": "build_test_windows.cmd", "PARAMETERS": { "CONFIGURATION": "profile", - "OUTPUT_DIRECTORY": "build\\windows_vs2019", + "OUTPUT_DIRECTORY": "build\\windows", "CMAKE_OPTIONS": "-G \"Visual Studio 16 2019\" -DCMAKE_SYSTEM_VERSION=10.0", "CMAKE_LY_PROJECTS": "AutomatedTesting", "CMAKE_TARGET": "TEST_SUITE_smoke TEST_SUITE_main", @@ -171,7 +151,7 @@ "TEST_RESULTS": "True" } }, - "test_gpu_profile_vs2019": { + "test_gpu_profile": { "TAGS":[ "nightly-incremental", "nightly-clean" @@ -182,7 +162,7 @@ "COMMAND": "build_test_windows.cmd", "PARAMETERS": { "CONFIGURATION": "profile", - "OUTPUT_DIRECTORY": "build\\windows_vs2019", + "OUTPUT_DIRECTORY": "build\\windows", "CMAKE_OPTIONS": "-G \"Visual Studio 16 2019\" -DCMAKE_SYSTEM_VERSION=10.0", "CMAKE_LY_PROJECTS": "AutomatedTesting", "CMAKE_TARGET": "TEST_SUITE_smoke TEST_SUITE_main", @@ -193,7 +173,7 @@ "TEST_SCREENSHOTS": "True" } }, - "asset_profile_vs2019": { + "asset_profile": { "TAGS": [ "weekly-build-metrics", "nightly-incremental", @@ -202,7 +182,7 @@ "COMMAND": "build_asset_windows.cmd", "PARAMETERS": { "CONFIGURATION": "profile", - "OUTPUT_DIRECTORY": "build\\windows_vs2019", + "OUTPUT_DIRECTORY": "build\\windows", "CMAKE_OPTIONS": "-G \"Visual Studio 16 2019\" -DCMAKE_SYSTEM_VERSION=10.0", "CMAKE_LY_PROJECTS": "AutomatedTesting", "CMAKE_TARGET": "AssetProcessorBatch", @@ -212,18 +192,18 @@ "ASSET_PROCESSOR_PLATFORMS": "pc,server" } }, - "awsi_test_profile_vs2019_pipe": { + "awsi_test_profile_pipe": { "TAGS": [ "nightly-incremental", "nightly-clean" ], "steps": [ "awsi_deployment", - "awsi_test_profile_vs2019", + "awsi_test_profile", "awsi_destruction" ] }, - "awsi_test_profile_vs2019": { + "awsi_test_profile": { "TAGS": [ "weekly-build-metrics" ], @@ -233,7 +213,7 @@ "COMMAND": "build_test_windows.cmd", "PARAMETERS": { "CONFIGURATION": "profile", - "OUTPUT_DIRECTORY": "build\\windows_vs2019", + "OUTPUT_DIRECTORY": "build\\windows", "CMAKE_OPTIONS": "-G \"Visual Studio 16 2019\" -DCMAKE_SYSTEM_VERSION=10.0", "CMAKE_LY_PROJECTS": "AutomatedTesting", "CMAKE_TARGET": "TEST_SUITE_awsi", @@ -243,7 +223,7 @@ "TEST_RESULTS": "True" } }, - "periodic_test_profile_vs2019": { + "periodic_test_profile": { "TAGS": [ "nightly-incremental", "nightly-clean", @@ -252,7 +232,7 @@ "COMMAND": "build_test_windows.cmd", "PARAMETERS": { "CONFIGURATION": "profile", - "OUTPUT_DIRECTORY": "build\\windows_vs2019", + "OUTPUT_DIRECTORY": "build\\windows", "CMAKE_OPTIONS": "-G \"Visual Studio 16 2019\" -DCMAKE_SYSTEM_VERSION=10.0", "CMAKE_LY_PROJECTS": "AutomatedTesting", "CMAKE_TARGET": "TEST_SUITE_periodic", @@ -262,7 +242,7 @@ "TEST_RESULTS": "True" } }, - "sandbox_test_profile_vs2019": { + "sandbox_test_profile": { "TAGS": [ "nightly-incremental", "nightly-clean", @@ -274,7 +254,7 @@ "COMMAND": "build_test_windows.cmd", "PARAMETERS": { "CONFIGURATION": "profile", - "OUTPUT_DIRECTORY": "build\\windows_vs2019", + "OUTPUT_DIRECTORY": "build\\windows", "CMAKE_OPTIONS": "-G \"Visual Studio 16 2019\" -DCMAKE_SYSTEM_VERSION=10.0", "CMAKE_LY_PROJECTS": "AutomatedTesting", "CMAKE_TARGET": "TEST_SUITE_sandbox", @@ -284,7 +264,7 @@ "TEST_RESULTS": "True" } }, - "benchmark_test_profile_vs2019": { + "benchmark_test_profile": { "TAGS": [ "nightly-incremental", "nightly-clean", @@ -293,7 +273,7 @@ "COMMAND": "build_test_windows.cmd", "PARAMETERS": { "CONFIGURATION": "profile", - "OUTPUT_DIRECTORY": "build\\windows_vs2019", + "OUTPUT_DIRECTORY": "build\\windows", "CMAKE_OPTIONS": "-G \"Visual Studio 16 2019\" -DCMAKE_SYSTEM_VERSION=10.0", "CMAKE_LY_PROJECTS": "AutomatedTesting", "CMAKE_TARGET": "TEST_SUITE_benchmark", @@ -303,7 +283,7 @@ "TEST_RESULTS": "True" } }, - "release_vs2019": { + "release": { "TAGS": [ "default", "nightly-incremental", @@ -313,14 +293,14 @@ "COMMAND": "build_windows.cmd", "PARAMETERS": { "CONFIGURATION": "release", - "OUTPUT_DIRECTORY": "build\\windows_vs2019", + "OUTPUT_DIRECTORY": "build\\windows", "CMAKE_OPTIONS": "-G \"Visual Studio 16 2019\" -DCMAKE_SYSTEM_VERSION=10.0", "CMAKE_LY_PROJECTS": "AutomatedTesting", "CMAKE_TARGET": "ALL_BUILD", "CMAKE_NATIVE_BUILD_ARGS": "/m /nologo" } }, - "monolithic_release_vs2019": { + "monolithic_release": { "TAGS": [ "nightly-incremental", "nightly-clean", @@ -329,29 +309,25 @@ "COMMAND": "build_windows.cmd", "PARAMETERS": { "CONFIGURATION": "release", - "OUTPUT_DIRECTORY": "build\\mono_windows_vs2019", + "OUTPUT_DIRECTORY": "build\\mono_windows", "CMAKE_OPTIONS": "-G \"Visual Studio 16 2019\" -DCMAKE_SYSTEM_VERSION=10.0 -DLY_MONOLITHIC_GAME=TRUE", "CMAKE_LY_PROJECTS": "AutomatedTesting", "CMAKE_TARGET": "ALL_BUILD", "CMAKE_NATIVE_BUILD_ARGS": "/m /nologo" } }, - "install_profile_vs2019": { - "TAGS": [ - "nightly-incremental", - "nightly-clean" - ], + "install_profile": { + "TAGS": [], "COMMAND": "build_windows.cmd", "PARAMETERS": { "CONFIGURATION": "profile", - "OUTPUT_DIRECTORY": "build\\windows_vs2019", + "OUTPUT_DIRECTORY": "build\\windows", "CMAKE_OPTIONS": "-G \"Visual Studio 16 2019\" -DCMAKE_SYSTEM_VERSION=10.0 -DLY_DISABLE_TEST_MODULES=TRUE", - "CMAKE_LY_PROJECTS": "", "CMAKE_TARGET": "INSTALL", "CMAKE_NATIVE_BUILD_ARGS": "/m /nologo" } }, - "installer_vs2019": { + "installer": { "TAGS": [ "nightly-clean", "nightly-installer" @@ -362,16 +338,37 @@ "COMMAND": "build_installer_windows.cmd", "PARAMETERS": { "CONFIGURATION": "profile", - "OUTPUT_DIRECTORY": "build\\windows_vs2019", + "OUTPUT_DIRECTORY": "build\\windows", "CMAKE_OPTIONS": "-G \"Visual Studio 16 2019\" -DCMAKE_SYSTEM_VERSION=10.0 -DLY_DISABLE_TEST_MODULES=TRUE -DLY_VERSION_ENGINE_NAME=o3de-sdk -DLY_INSTALLER_WIX_ROOT=\"!WIX! \"", - "EXTRA_CMAKE_OPTIONS": "-DLY_INSTALLER_AUTO_GEN_TAG=ON -DLY_INSTALLER_DOWNLOAD_URL=!INSTALLER_DOWNLOAD_URL! -DLY_INSTALLER_LICENSE_URL=!INSTALLER_DOWNLOAD_URL!/license", - "CPACK_BUCKET": "!INSTALLER_BUCKET!", - "CMAKE_LY_PROJECTS": "", + "EXTRA_CMAKE_OPTIONS": "-DLY_INSTALLER_AUTO_GEN_TAG=TRUE -DLY_INSTALLER_DOWNLOAD_URL=!INSTALLER_DOWNLOAD_URL! -DLY_INSTALLER_LICENSE_URL=!INSTALLER_DOWNLOAD_URL!/license", "CMAKE_TARGET": "ALL_BUILD", + "CPACK_OPTIONS": "-D CPACK_UPLOAD_URL=\"!CPACK_UPLOAD_URL!\"", "CMAKE_NATIVE_BUILD_ARGS": "/m /nologo" } }, - "project_enginesource_profile_vs2019": { + "install_profile_pipe": { + "TAGS": [ + "nightly-incremental", + "nightly-clean" + ], + "PIPELINE_ENV": { + "PROJECT_REPOSITORY_NAME": "TestProject" + }, + "steps": [ + "install_profile", + "project_generate", + "project_engineinstall_profile" + ] + }, + "project_generate": { + "TAGS": [], + "COMMAND": "python_windows.cmd", + "PARAMETERS": { + "SCRIPT_PATH": "install\\scripts\\o3de.py", + "SCRIPT_PARAMETERS": "create-project -pp %WORKSPACE%\\%PROJECT_REPOSITORY_NAME% --force" + } + }, + "project_enginesource_profile": { "TAGS": [ "project" ], @@ -381,35 +378,34 @@ "COMMAND": "build_windows.cmd", "PARAMETERS": { "CONFIGURATION": "profile", - "OUTPUT_DIRECTORY": "build\\windows_vs2019", - "CMAKE_OPTIONS": "-G \"Visual Studio 16 2019\" -DCMAKE_SYSTEM_VERSION=10.0 -DCMAKE_MODULE_PATH=!WORKSPACE!/o3de/cmake", - "CMAKE_LY_PROJECTS": "", + "OUTPUT_DIRECTORY": "build\\windows", + "CMAKE_OPTIONS": "-G \"Visual Studio 16 2019\" -DCMAKE_SYSTEM_VERSION=10.0 -DCMAKE_MODULE_PATH=%WORKSPACE%/o3de/cmake", "CMAKE_TARGET": "ALL_BUILD", "CMAKE_NATIVE_BUILD_ARGS": "/m /nologo" } }, - "project_engineinstall_profile_vs2019": { + "project_engineinstall_profile": { "TAGS": [], "PIPELINE_ENV": { "EXECUTE_FROM_PROJECT": "1" }, "COMMAND": "build_windows.cmd", "PARAMETERS": { + "COMMAND_CWD": "%WORKSPACE%\\%PROJECT_REPOSITORY_NAME%", "CONFIGURATION": "profile", - "OUTPUT_DIRECTORY": "build\\windows_vs2019", - "CMAKE_OPTIONS": "-G \"Visual Studio 16 2019\" -DCMAKE_SYSTEM_VERSION=10.0 -DCMAKE_MODULE_PATH=!WORKSPACE!/o3de/install/cmake", - "CMAKE_LY_PROJECTS": "", + "OUTPUT_DIRECTORY": "build\\windows", + "CMAKE_OPTIONS": "-G \"Visual Studio 16 2019\" -DCMAKE_SYSTEM_VERSION=10.0 -DCMAKE_MODULE_PATH=%WORKSPACE%/o3de/install/cmake", "CMAKE_TARGET": "ALL_BUILD", "CMAKE_NATIVE_BUILD_ARGS": "/m /nologo" } }, - "project_engineinstall_profile_vs2019_pipe": { + "project_engineinstall_profile_pipe": { "TAGS": [ "project" ], "steps": [ - "install_profile_vs2019", - "project_engineinstall_profile_vs2019" + "install_profile", + "project_engineinstall_profile" ] }, "awsi_deployment": { diff --git a/scripts/build/Platform/Windows/build_windows.cmd b/scripts/build/Platform/Windows/build_windows.cmd index b5a0245d1a..798550370f 100644 --- a/scripts/build/Platform/Windows/build_windows.cmd +++ b/scripts/build/Platform/Windows/build_windows.cmd @@ -8,8 +8,7 @@ REM REM SETLOCAL EnableDelayedExpansion - -CALL %~dp0env_windows.cmd +CALL "%~dp0env_windows.cmd" IF NOT EXIST "%OUTPUT_DIRECTORY%" ( MKDIR %OUTPUT_DIRECTORY%. @@ -25,18 +24,14 @@ IF ERRORLEVEL 1 ( exit /b 1 ) -REM Jenkins reports MSB8029 when TMP/TEMP is not defined, define a dummy folder -SET TMP=%cd%/temp -SET TEMP=%cd%/temp -IF NOT EXIST %TMP% ( - MKDIR temp -) - REM Compute half the amount of processors so some jobs can run SET /a HALF_PROCESSORS = NUMBER_OF_PROCESSORS / 2 SET LAST_CONFIGURE_CMD_FILE=ci_last_configure_cmd.txt -SET CONFIGURE_CMD=cmake %SOURCE_DIRECTORY% %CMAKE_OPTIONS% %EXTRA_CMAKE_OPTIONS% -DLY_3RDPARTY_PATH="%LY_3RDPARTY_PATH%" -DLY_PROJECTS=%CMAKE_LY_PROJECTS% +SET CONFIGURE_CMD=cmake "%SOURCE_DIRECTORY%" %CMAKE_OPTIONS% %EXTRA_CMAKE_OPTIONS% +IF NOT "%CMAKE_LY_PROJECTS%"=="" ( + SET CONFIGURE_CMD=!CONFIGURE_CMD! -DLY_PROJECTS="%CMAKE_LY_PROJECTS%" +) IF NOT EXIST CMakeCache.txt ( ECHO [ci_build] First run, generating SET RUN_CONFIGURE=1 diff --git a/scripts/build/Platform/Windows/deploy_cdk_applications.cmd b/scripts/build/Platform/Windows/deploy_cdk_applications.cmd index 006e0158c0..f3d68d2fe8 100644 --- a/scripts/build/Platform/Windows/deploy_cdk_applications.cmd +++ b/scripts/build/Platform/Windows/deploy_cdk_applications.cmd @@ -7,7 +7,7 @@ REM SPDX-License-Identifier: Apache-2.0 OR MIT REM REM -REM Deploy the CDK applcations for AWS gems (Windows only) +REM Deploy the CDK applications for AWS gems (Windows only) REM Prerequisites: REM 1) Node.js is installed REM 2) Node.js version >= 10.13.0, except for versions 13.0.0 - 13.6.0. A version in active long-term support is recommended. @@ -57,7 +57,7 @@ IF ERRORLEVEL 1 ( exit /b 1 ) -CALL :DeployCDKApplication AWSCore "-c disable_access_log=true --all" +CALL :DeployCDKApplication AWSCore "-c disable_access_log=true -c remove_all_storage_on_destroy=true --all" IF ERRORLEVEL 1 ( exit /b 1 ) diff --git a/scripts/build/Platform/Windows/env_windows.cmd b/scripts/build/Platform/Windows/env_windows.cmd index 1c54e36bfc..78b5ca6c1a 100644 --- a/scripts/build/Platform/Windows/env_windows.cmd +++ b/scripts/build/Platform/Windows/env_windows.cmd @@ -7,13 +7,40 @@ REM SPDX-License-Identifier: Apache-2.0 OR MIT REM REM +REM To get recursive folder creation +SETLOCAL EnableExtensions EnableDelayedExpansion + where /Q cmake IF NOT %ERRORLEVEL%==0 ( ECHO [ci_build] CMake not found GOTO :error ) +IF NOT "%COMMAND_CWD%"=="" ( + ECHO [ci_build] Changing CWD to %COMMAND_CWD% + CD %COMMAND_CWD% +) + +REM Ending the local environment to be able to propagate the TMP/TEMP variables to the calling script +ENDLOCAL + +REM Jenkins does not defined TMP +IF "%TMP%"=="" ( + IF "%WORKSPACE%"=="" ( + SET TMP=%APPDATA%\Local\Temp + SET TEMP=%APPDATA%\Local\Temp + ) ELSE ( + SET TMP=%WORKSPACE%\Temp + SET TEMP=%WORKSPACE%\Temp + REM This folder may not be created in the workspace + IF NOT EXIST "!TMP!" ( + MKDIR "!TMP!" + ) + ) +) + EXIT /b 0 :error +ENDLOCAL EXIT /b 1 \ No newline at end of file diff --git a/scripts/build/Platform/Windows/installer_windows.cmd b/scripts/build/Platform/Windows/installer_windows.cmd index 87f53adc7f..8dc111c256 100644 --- a/scripts/build/Platform/Windows/installer_windows.cmd +++ b/scripts/build/Platform/Windows/installer_windows.cmd @@ -17,12 +17,6 @@ IF NOT EXIST %OUTPUT_DIRECTORY% ( ) PUSHD %OUTPUT_DIRECTORY% -REM Override the temporary directory used by wix to the workspace -SET "WIX_TEMP=!WORKSPACE_TMP!/wix" -IF NOT EXIST "%WIX_TEMP%" ( - MKDIR "%WIX_TEMP%" -) - REM Make sure we are using the CMake version of CPack and not the one that comes with chocolatey SET CPACK_PATH= IF "%LY_CMAKE_PATH%"=="" ( @@ -47,10 +41,6 @@ IF ERRORLEVEL 1 ( GOTO :popd_error ) -IF NOT "%CPACK_BUCKET%"=="" ( - SET "CPACK_OPTIONS=-D CPACK_UPLOAD_URL=s3://%CPACK_BUCKET% %CPACK_OPTIONS%" -) - ECHO [ci_build] "!CPACK_PATH!" -C %CONFIGURATION% %CPACK_OPTIONS% "!CPACK_PATH!" -C %CONFIGURATION% %CPACK_OPTIONS% IF NOT %ERRORLEVEL%==0 ( diff --git a/scripts/build/Platform/Windows/package_build_config.json b/scripts/build/Platform/Windows/package_build_config.json deleted file mode 100644 index 5eb96f1e38..0000000000 --- a/scripts/build/Platform/Windows/package_build_config.json +++ /dev/null @@ -1,13 +0,0 @@ -{ - "profile_vs2019_atom": { - "COMMAND":"build_windows.cmd", - "PARAMETERS": { - "CONFIGURATION":"profile", - "OUTPUT_DIRECTORY":"windows_vs2019", - "CMAKE_OPTIONS":"-G \"Visual Studio 16 2019\" -DCMAKE_SYSTEM_VERSION=10.0", - "CMAKE_LY_PROJECTS":"AtomTest;AtomSampleViewer", - "CMAKE_TARGET":"ALL_BUILD", - "CMAKE_NATIVE_BUILD_ARGS": "/m /nologo" - } - } -} diff --git a/scripts/build/Platform/Windows/pipeline.json b/scripts/build/Platform/Windows/pipeline.json index 6be55ec82d..28d8437408 100644 --- a/scripts/build/Platform/Windows/pipeline.json +++ b/scripts/build/Platform/Windows/pipeline.json @@ -1,7 +1,7 @@ { "ENV": { "NODE_LABEL": "windows-b3c8994f1", - "LY_3RDPARTY_PATH": "C:/ly/3rdParty", + "LY_3RDPARTY_PATH": "D:/workspace/3rdParty", "TIMEOUT": 30, "WORKSPACE": "D:/workspace", "MOUNT_VOLUME": true @@ -10,9 +10,6 @@ "daily-pipeline-metrics": { "CLEAN_WORKSPACE": true }, - "packaging": { - "CLEAN_WORKSPACE": true - }, "nightly-clean": { "CLEAN_WORKSPACE": true } diff --git a/scripts/build/Platform/iOS/build_config.json b/scripts/build/Platform/iOS/build_config.json index 895f74daae..ec2b763dda 100644 --- a/scripts/build/Platform/iOS/build_config.json +++ b/scripts/build/Platform/iOS/build_config.json @@ -76,7 +76,7 @@ "PARAMETERS": { "CONFIGURATION": "profile", "OUTPUT_DIRECTORY": "build/mac", - "CMAKE_OPTIONS": "-G Xcode -DO3DE_HOME_PATH=\"${WORKSPACE}/home\" -DO3DE_REGISTER_ENGINE_PATH=\"${WORKSPACE}/o3de\" -DO3DE_REGISTER_THIS_ENGINE=TRUE", + "CMAKE_OPTIONS": "-G Xcode", "CMAKE_LY_PROJECTS": "AutomatedTesting", "CMAKE_TARGET": "AssetProcessorBatch", "ASSET_PROCESSOR_BINARY": "bin/profile/AssetProcessorBatch", @@ -112,7 +112,7 @@ "PARAMETERS": { "CONFIGURATION": "profile", "OUTPUT_DIRECTORY": "build/ios_test", - "CMAKE_OPTIONS": "-G Xcode -DCMAKE_TOOLCHAIN_FILE=cmake/Platform/iOS/Toolchain_ios.cmake -DLY_MONOLITHIC_GAME=FALSE -DCMAKE_XCODE_ATTRIBUTE_CODE_SIGNING_REQUIRED=TRUE -DLY_IOS_CODE_SIGNING_IDENTITY=\"\" -DCMAKE_XCODE_ATTRIBUTE_CODE_SIGN_ENTITLEMENTS=\"\" -DCMAKE_XCODE_ATTRIBUTE_CODE_SIGNING_ALLOWED=TRUE -DO3DE_HOME_PATH=\"${WORKSPACE}/home\" -DO3DE_REGISTER_ENGINE_PATH=\"${WORKSPACE}/o3de\" -DO3DE_REGISTER_THIS_ENGINE=TRUE", + "CMAKE_OPTIONS": "-G Xcode -DCMAKE_TOOLCHAIN_FILE=cmake/Platform/iOS/Toolchain_ios.cmake -DLY_MONOLITHIC_GAME=FALSE -DCMAKE_XCODE_ATTRIBUTE_CODE_SIGNING_REQUIRED=TRUE -DLY_IOS_CODE_SIGNING_IDENTITY=\"\" -DCMAKE_XCODE_ATTRIBUTE_CODE_SIGN_ENTITLEMENTS=\"\" -DCMAKE_XCODE_ATTRIBUTE_CODE_SIGNING_ALLOWED=TRUE", "CMAKE_TARGET": "ALL_BUILD", "CMAKE_NATIVE_BUILD_ARGS": "", "TARGET_DEVICE_NAME": "Lumberyard", diff --git a/scripts/build/Platform/iOS/build_ios_test.sh b/scripts/build/Platform/iOS/build_ios_test.sh index b683948e72..7869b900db 100755 --- a/scripts/build/Platform/iOS/build_ios_test.sh +++ b/scripts/build/Platform/iOS/build_ios_test.sh @@ -19,7 +19,7 @@ SOURCE_DIRECTORY=${PWD} ECHO Configuring for iOS Testing LAST_CONFIGURE_CMD_FILE=ci_last_configure_cmd.txt -CONFIGURE_CMD="cmake -B ${OUTPUT_DIRECTORY} ${SOURCE_DIRECTORY} ${CMAKE_OPTIONS} ${EXTRA_CMAKE_OPTIONS} -DLY_3RDPARTY_PATH=${LY_3RDPARTY_PATH}" +CONFIGURE_CMD="cmake -B ${OUTPUT_DIRECTORY} ${SOURCE_DIRECTORY} ${CMAKE_OPTIONS} ${EXTRA_CMAKE_OPTIONS}" if [[ ! -e "CMakeCache.txt" ]]; then echo [ci_build] First run, generating RUN_CONFIGURE=1 diff --git a/scripts/build/Platform/iOS/pipeline.json b/scripts/build/Platform/iOS/pipeline.json index e8cea0f06d..369152a7a4 100644 --- a/scripts/build/Platform/iOS/pipeline.json +++ b/scripts/build/Platform/iOS/pipeline.json @@ -1,7 +1,7 @@ { "ENV": { "NODE_LABEL": "mac-bigsur-2fc3a22", - "LY_3RDPARTY_PATH": "/Users/lybuilder/3rdParty", + "LY_3RDPARTY_PATH": "/Users/lybuilder/workspace/3rdParty", "TIMEOUT": 30, "WORKSPACE": "/Users/lybuilder/workspace", "MOUNT_VOLUME": false @@ -10,9 +10,6 @@ "daily-pipeline-metrics": { "CLEAN_WORKSPACE": true }, - "packaging": { - "CLEAN_WORKSPACE": true - }, "nightly-clean": { "CLEAN_WORKSPACE": true } diff --git a/scripts/build/build_node/Platform/Common/requirements.txt b/scripts/build/build_node/Platform/Common/requirements.txt index 6fb767509e..7375d3e849 100644 --- a/scripts/build/build_node/Platform/Common/requirements.txt +++ b/scripts/build/build_node/Platform/Common/requirements.txt @@ -148,20 +148,28 @@ pywin32==228 \ pyxb==1.2.6 \ --hash=sha256:2a00f38dd1d87b88f92d79bc5a09718d730419b88e814545f472bbd5a3bf27b4 \ # via -r requirements.txt -pyyaml==5.3.1 \ - --hash=sha256:06a0d7ba600ce0b2d2fe2e78453a470b5a6e000a985dd4a4e54e436cc36b0e97 \ - --hash=sha256:240097ff019d7c70a4922b6869d8a86407758333f02203e0fc6ff79c5dcede76 \ - --hash=sha256:4f4b913ca1a7319b33cfb1369e91e50354d6f07a135f3b901aca02aa95940bd2 \ - --hash=sha256:6034f55dab5fea9e53f436aa68fa3ace2634918e8b5994d82f3621c04ff5ed2e \ - --hash=sha256:69f00dca373f240f842b2931fb2c7e14ddbacd1397d57157a9b005a6a9942648 \ - --hash=sha256:73f099454b799e05e5ab51423c7bcf361c58d3206fa7b0d555426b1f4d9a3eaf \ - --hash=sha256:74809a57b329d6cc0fdccee6318f44b9b8649961fa73144a98735b0aaf029f1f \ - --hash=sha256:7739fc0fa8205b3ee8808aea45e968bc90082c10aef6ea95e855e10abf4a37b2 \ - --hash=sha256:95f71d2af0ff4227885f7a6605c37fd53d3a106fcab511b8860ecca9fcf400ee \ - --hash=sha256:ad9c67312c84def58f3c04504727ca879cb0013b2517c85a9a253f0cb6380c0a \ - --hash=sha256:b8eac752c5e14d3eca0e6dd9199cd627518cb5ec06add0de9d32baeee6fe645d \ - --hash=sha256:cc8955cfbfc7a115fa81d85284ee61147059a753344bc51098f3ccd69b0d7e0c \ - --hash=sha256:d13155f591e6fcc1ec3b30685d50bf0711574e2c0dfffd7644babf8b5102ca1a \ +pyyaml==5.4 \ + --hash=sha256:f7a21e3d99aa3095ef0553e7ceba36fb693998fbb1226f1392ce33681047465f \ + --hash=sha256:5e7ac4e0e79a53451dc2814f6876c2fa6f71452de1498bbe29c0b54b69a986f4 \ + --hash=sha256:52bf0930903818e600ae6c2901f748bc4869c0c406056f679ab9614e5d21a166 \ + --hash=sha256:a36a48a51e5471513a5aea920cdad84cbd56d70a5057cca3499a637496ea379c \ + --hash=sha256:cc552b6434b90d9dbed6a4f13339625dc466fd82597119897e9489c953acbc22 \ + --hash=sha256:0dc9f2eb2e3c97640928dec63fd8dc1dd91e6b6ed236bd5ac00332b99b5c2ff9 \ + --hash=sha256:5a3f345acff76cad4aa9cb171ee76c590f37394186325d53d1aa25318b0d4a09 \ + --hash=sha256:f3790156c606299ff499ec44db422f66f05a7363b39eb9d5b064f17bd7d7c47b \ + --hash=sha256:124fd7c7bc1e95b1eafc60825f2daf67c73ce7b33f1194731240d24b0d1bf628 \ + --hash=sha256:8b818b6c5a920cbe4203b5a6b14256f0e5244338244560da89b7b0f1313ea4b6 \ + --hash=sha256:737bd70e454a284d456aa1fa71a0b429dd527bcbf52c5c33f7c8eee81ac16b89 \ + --hash=sha256:7242790ab6c20316b8e7bb545be48d7ed36e26bbe279fd56f2c4a12510e60b4b \ + --hash=sha256:cc547d3ead3754712223abb7b403f0a184e4c3eae18c9bb7fd15adef1597cc4b \ + --hash=sha256:8635d53223b1f561b081ff4adecb828fd484b8efffe542edcfdff471997f7c39 \ + --hash=sha256:26fcb33776857f4072601502d93e1a619f166c9c00befb52826e7b774efaa9db \ + --hash=sha256:b2243dd033fd02c01212ad5c601dafb44fbb293065f430b0d3dbf03f3254d615 \ + --hash=sha256:31ba07c54ef4a897758563e3a0fcc60077698df10180abe4b8165d9895c00ebf \ + --hash=sha256:02c78d77281d8f8d07a255e57abdbf43b02257f59f50cc6b636937d68efa5dd0 \ + --hash=sha256:fdc6b2cb4b19e431994f25a9160695cc59a4e861710cc6fc97161c5e845fc579 \ + --hash=sha256:8bf38641b4713d77da19e91f8b5296b832e4db87338d6aeffe422d42f1ca896d \ + --hash=sha256:3c49e39ac034fd64fd576d63bb4db53cda89b362768a67f07749d55f128ac18a \ # via -r requirements.txt requests==2.25.0 \ --hash=sha256:7f1a0b932f4a60a1a65caa4263921bb7d9ee911957e0ae4a23a6dd08185ad5f8 \ diff --git a/scripts/build/build_node/Platform/Linux/Dockerfile b/scripts/build/build_node/Platform/Linux/Dockerfile new file mode 100644 index 0000000000..0bbbcb3a5b --- /dev/null +++ b/scripts/build/build_node/Platform/Linux/Dockerfile @@ -0,0 +1,57 @@ +# +# Copyright (c) Contributors to the Open 3D Engine Project. +# For complete copyright and license terms please see the LICENSE at the root of this distribution. +# +# SPDX-License-Identifier: Apache-2.0 OR MIT +# + +# This is a base Dockerfile to use for self-containing local or remote development environments +# +# Once docker is installed, build a local image with this command: +# `docker build /localDockerfilepath -t ubuntu-build:latest` +# +# To build using a local repo on disk, run this command: +# `docker run -it -v /localo3depath:/data/workspace/o3de -v /localbuildpath:/data/workspace/o3de/build -v /local3rdPartypath:/root/.o3de/3rdParty \ +# --name build-o3de -d ubuntu-build:latest /bin/sh -c 'cd /data/workspace/o3de && python/python.sh -u scripts/build/ci_build.py --platform Linux --type profile'` +# +# Attach to the running build to interact or view logs using this command: +# `docker attach build-o3de` + +FROM ubuntu:20.04 + +WORKDIR /data/workspace + +# Initilize apt cache +RUN apt-get clean && apt-get update + +# Setup time zone and locale data (necessary for SSL and HTTPS packages) +RUN DEBIAN_FRONTEND="noninteractive" apt-get -y install tzdata locales keyboard-configuration + +RUN sed -i -e 's/# en_US.UTF-8 UTF-8/en_US.UTF-8 UTF-8/' /etc/locale.gen && \ + dpkg-reconfigure --frontend=noninteractive locales && \ + update-locale LANG=en_US.UTF-8 + +ENV LANG=en_US.UTF-8 + +# Install common tools +RUN apt-get -y install tar sudo less vim lsof firewalld net-tools pciutils \ + file wget kmod xz-utils ca-certificates binutils kbd \ + python3-pip bind9-utils jq bc unzip git git-lfs lsb-release \ + software-properties-common + +# Install build and development tools +RUN git clone --no-checkout https://github.com/o3de/o3de.git .o3de && \ + cd .o3de && \ + git sparse-checkout init --cone && \ + git sparse-checkout set scripts/build/build_node && \ + cd scripts/build/build_node/Platform/Linux && \ + ./install-ubuntu.sh + +# Install supported version of cmake if build tool installation runs into issues +ENV CMAKE_VER=3.21.1-0kitware1ubuntu20.04.1 +RUN $(cmake --version) || apt-get -y install cmake=${CMAKE_VER} cmake-data=${CMAKE_VER} + +# Symlink clang version to non-versioned clang and set cc to clang +RUN find /usr/bin/ -name clang* | sed -E 's/^(\/usr\/bin\/.*)(\-[0-9]*)$/ln -s -v \1\2 \1/' | xargs -d '\n' -n 1 bash -c && \ + update-alternatives --install /usr/bin/cc cc /usr/bin/clang 100 && \ + update-alternatives --install /usr/bin/c++ c++ /usr/bin/clang++ 100 diff --git a/scripts/build/build_node/Platform/Linux/package-list.ubuntu-bionic.txt b/scripts/build/build_node/Platform/Linux/package-list.ubuntu-bionic.txt index a09d823950..30259a6dc7 100644 --- a/scripts/build/build_node/Platform/Linux/package-list.ubuntu-bionic.txt +++ b/scripts/build/build_node/Platform/Linux/package-list.ubuntu-bionic.txt @@ -2,7 +2,7 @@ # Build Tools Packages cmake/3.20.1-0kitware1ubuntu18.04.1 # For cmake -clang-6.0 # For Ninja Build System +clang-12 # For Ninja Build System ninja-build # For the compiler and its dependencies java-11-amazon-corretto-jdk # For Jenkins and Android @@ -12,7 +12,7 @@ libxcb-xinerama0 # For Qt plugins at runtime libxcb-xinput0 # For Qt plugins at runtime libfontconfig1-dev # For Qt plugins at runtime libcurl4-openssl-dev # For HttpRequestor -libsdl2-dev # For WWise/Audio +# libsdl2-dev # For WWise/Audio libxcb-xkb-dev # For xcb keyboard input libxkbcommon-x11-dev # For xcb keyboard input libxkbcommon-dev # For xcb keyboard input diff --git a/scripts/build/build_node/Platform/Linux/package-list.ubuntu-focal.txt b/scripts/build/build_node/Platform/Linux/package-list.ubuntu-focal.txt index e0e03cda90..71958d74bd 100644 --- a/scripts/build/build_node/Platform/Linux/package-list.ubuntu-focal.txt +++ b/scripts/build/build_node/Platform/Linux/package-list.ubuntu-focal.txt @@ -12,7 +12,7 @@ libxcb-xinerama0 # For Qt plugins at runtime libxcb-xinput0 # For Qt plugins at runtime libfontconfig1-dev # For Qt plugins at runtime libcurl4-openssl-dev # For HttpRequestor -libsdl2-dev # for WWise/Audio +# libsdl2-dev # for WWise/Audio libxcb-xkb-dev # For xcb keyboard input libxkbcommon-x11-dev # For xcb keyboard input libxkbcommon-dev # For xcb keyboard input diff --git a/scripts/build/ci_build.py b/scripts/build/ci_build.py index c35a5e9dbf..78978349c3 100755 --- a/scripts/build/ci_build.py +++ b/scripts/build/ci_build.py @@ -88,7 +88,7 @@ def build(build_config_filename, build_platform, build_type): env_params[v] = build_params[v] print(' {} = {} {}'.format(v, env_params[v], '(environment override)' if existing_param else '')) print('--------------------------------------------------------------------------------', flush=True) - process_return = subprocess.run(build_cmd_path, cwd=cwd_dir, env=env_params) + process_return = subprocess.run([build_cmd_path], cwd=cwd_dir, env=env_params) print('--------------------------------------------------------------------------------') if process_return.returncode != 0: print('[ci_build] FAIL: Command {} returned {}'.format(build_cmd_path, process_return.returncode), flush=True) diff --git a/scripts/build/package/PackageEnv.py b/scripts/build/package/PackageEnv.py deleted file mode 100755 index 1f2d102214..0000000000 --- a/scripts/build/package/PackageEnv.py +++ /dev/null @@ -1,191 +0,0 @@ -# -# Copyright (c) Contributors to the Open 3D Engine Project. -# For complete copyright and license terms please see the LICENSE at the root of this distribution. -# -# SPDX-License-Identifier: Apache-2.0 OR MIT -# -# - -from Params import Params -from util import * - - -class PackageEnv(Params): - def __init__(self, platform, type, json_file): - super(PackageEnv, self).__init__() - self.__cur_dir = os.path.dirname(os.path.abspath(__file__)) - global_env_file = os.path.join(self.__cur_dir, json_file) - with open(global_env_file, 'r') as source: - data = json.load(source) - self.__global_env = data.get('global_env') - platform_env_file = os.path.join(self.__cur_dir, 'Platform', platform, json_file) - if not os.path.exists(platform_env_file): - print(f'{platform_env_file} is not found.') - # Search restricted platform folders - engine_root = self.get('ENGINE_ROOT') - # Use real path in case engine root is a symlink path - if os.name == 'posix' and os.path.islink(engine_root): - engine_root = os.readlink(engine_root) - rel_path = os.path.relpath(self.__cur_dir, engine_root) - platform_env_file = os.path.join(engine_root, 'restricted', platform, rel_path, json_file) - if not os.path.exists(platform_env_file): - ly_build_error(f'{platform_env_file} is not found.') - with open(platform_env_file, 'r') as source: - data = json.load(source) - types = data.get('types') - if type not in types: - ly_build_error(f'Package type {type} is not supported') - self.__platform = platform - self.__platform_env = data.get('local_env') - self.__platform_env.update(self.__global_env) - self.__type = type - self.__type_env = types.get(type) - - def get_platform(self): - return self.__platform - - def get_type(self): - return self.__type - - def get_platform_env(self): - return self.__platform_env - - def get_type_env(self): - return self.__type_env - - def __get_platform_value(self, key): - key = key.upper() - value = self.__platform_env.get(key) - if value is None: - ly_build_error(f'{key} is not defined in global env nor in local env') - return value - - def __get_type_value(self, key): - key = key.upper() - value = self.__type_env.get(key) - if value is None: - ly_build_error(f'{key} is not defined in package type {self.__type} for platform {self.__platform}') - return value - - def __evaluate_boolean(self, v): - return str(v).lower() in ['1', 'true'] - - def __get_engine_root(self): - def validate_engine_root(engine_root): - if not os.path.isdir(engine_root): - return False - return os.path.exists(os.path.join(engine_root, 'engine.json')) - - workspace = os.getenv('WORKSPACE') - if workspace is not None: - print(f'Environment variable WORKSPACE={workspace} detected') - if validate_engine_root(workspace): - print(f'Setting ENGINE_ROOT to {workspace}') - return workspace - print('Cannot locate ENGINE_ROOT with Environment variable WORKSPACE') - - engine_root = os.getenv('ENGINE_ROOT', '') - if validate_engine_root(engine_root): - return engine_root - - print('Environment variable ENGINE_ROOT is not set or invalid, checking ENGINE_ROOT in env json file') - engine_root = self.__global_env.get('ENGINE_ROOT') - if validate_engine_root(engine_root): - return engine_root - - # Set engine_root based on script location - engine_root = os.path.dirname(os.path.dirname(os.path.dirname(self.__cur_dir))) - print(f'ENGINE_ROOT from env json file is invalid, defaulting to {engine_root}') - if validate_engine_root(engine_root): - return engine_root - else: - error('Cannot Locate ENGINE_ROOT') - - def __get_thirdparty_home(self): - third_party_home = os.getenv('LY_3RDPARTY_PATH', '') - if os.path.exists(third_party_home): - print(f'LY_3RDPARTY_PATH found, using {third_party_home} as 3rdParty path.') - return third_party_home - third_party_home = self.__get_platform_value('THIRDPARTY_HOME') - if os.path.isdir(third_party_home): - return third_party_home - - # Set engine_root based on script location - print('THIRDPARTY_HOME is not valid, looking for THIRD_PARTY_HOME') - - # Finding THIRD_PARTY_HOME - cur_dir = self.__get_engine_root() - last_dir = None - while last_dir != cur_dir: - third_party_home = os.path.join(cur_dir, '3rdParty') - print(f'Cheking THIRDPARTY_HOME {third_party_home}') - if os.path.exists(os.path.join(third_party_home, '3rdParty.txt')): - print(f'Setting THIRDPARTY_HOME to {third_party_home}') - return third_party_home - last_dir = cur_dir - cur_dir = os.path.dirname(cur_dir) - error('Cannot locate THIRDPARTY_HOME') - - def __get_package_name_pattern(self): - package_name_pattern = self.__get_platform_value('PACKAGE_NAME_PATTERN') - if os.getenv('PACKAGE_NAME_PATTERN') is not None: - package_name_pattern = os.getenv('PACKAGE_NAME_PATTERN') - return package_name_pattern - - def __get_branch_name(self): - branch_name = self.__get_platform_value('BRANCH_NAME') - if os.getenv('BRANCH_NAME') is not None: - branch_name = os.getenv('BRANCH_NAME') - branch_name = branch_name.replace('/', '_').replace('\\', '_') - return branch_name - - def __get_build_number(self): - build_number = self.__get_platform_value('BUILD_NUMBER') - if os.getenv('BUILD_NUMBER') is not None: - build_number = os.getenv('BUILD_NUMBER') - return build_number - - def __get_scrub_params(self): - return self.__get_type_value('SCRUB_PARAMS') - - def __get_validator_platforms(self): - return self.__get_type_value('VALIDATOR_PLATFORMS') - - def __get_package_targets(self): - return self.__get_type_value('PACKAGE_TARGETS') - - def __get_build_targets(self): - return self.__get_type_value('BUILD_TARGETS') - - def __get_asset_processor_path(self): - return self.__get_type_value('ASSET_PROCESSOR_PATH') - - def __get_asset_game_folders(self): - return self.__get_type_value('ASSET_GAME_FOLDERS') - - def __get_asset_platform(self): - return self.__get_type_value('ASSET_PLATFORM') - - def __get_bootstrap_cfg_game_folder(self): - return self.__get_type_value('BOOTSTRAP_CFG_GAME_FOLDER') - - def __get_skip_build(self): - skip_build = os.getenv('SKIP_BUILD') - if skip_build is None: - skip_build = self.__get_type_value('SKIP_BUILD') - return self.__evaluate_boolean(skip_build) - - def __get_skip_scrubbing(self): - skip_scrubbing = os.getenv('SKIP_SCRUBBING') - if skip_scrubbing is None: - skip_scrubbing = self.__type_env.get('SKIP_SCRUBBING', 'False') - return self.__evaluate_boolean(skip_scrubbing) - - def __get_internal_s3_bucket(self): - return self.__get_platform_value('INTERNAL_S3_BUCKET') - - def __get_qa_s3_bucket(self): - return self.__get_platform_value('QA_S3_BUCKET') - - def __get_s3_prefix(self): - return self.__get_platform_value('S3_PREFIX') diff --git a/scripts/build/package/Params.py b/scripts/build/package/Params.py deleted file mode 100755 index 994d28486a..0000000000 --- a/scripts/build/package/Params.py +++ /dev/null @@ -1,80 +0,0 @@ -# -# Copyright (c) Contributors to the Open 3D Engine Project. -# For complete copyright and license terms please see the LICENSE at the root of this distribution. -# -# SPDX-License-Identifier: Apache-2.0 OR MIT -# -# -import os -import sys -import re -from util import ly_build_error - - -class Params(object): - def __init__(self): - # Cache params - self.__params = {} - - def get(self, param_name): - param_value = self.__params.get(param_name) - if param_value is not None: - return param_value - # Call __get_${param_name} function - func = getattr(self, '_{}__get_{}'.format(self.__class__.__name__, param_name.lower()), None) - if func is not None: - param_value = func() - # Replace all ${env} in value - if isinstance(param_value, str): - param_value = self.__process_string(param_name, param_value) - elif isinstance(param_value, list): - param_value = self.__process_list(param_name, param_value) - elif isinstance(param_value, dict): - param_value = self.__process_dict(param_name, param_value) - # Cache param - self.__params[param_name] = param_value - return param_value - ly_build_error('method __get_{} is not defined in class {}'.format(param_name.lower(), self.__class__.__name__)) - - def set(self, param_name, param_value): - self.__params[param_name] = param_value - - def exists(self, param_name): - try: - self.get(param_name) - except LyBuildError: - return False - return True - - def __process_string(self, param_name, param_value): - # Find all param with format ${param} - params = re.findall('\${(\w+)}', param_value) - # Avoid using the same param name in value, like 'WORKSPACE': '${WORKSPACE} some string' - if param_name in params: - ly_build_error('The use of same parameter name({}) in value is not allowed'.format(param_name)) - # Replace ${param} with actual value - for param in params: - param_value = param_value.replace('${' + param + '}', self.get(param)) - return param_value - - def __process_list(self, param_name, param_value): - processed_list = [] - for entry in param_value: - if isinstance(entry, str): - entry = self.__process_string(param_name, entry) - elif isinstance(entry, list): - entry = self.__process_list(param_name, entry) - elif isinstance(entry, dict): - entry = self.__process_dict(param_name, entry) - processed_list.append(entry) - return processed_list - - def __process_dict(self, param_name, param_value): - for key in param_value: - if isinstance(param_value[key], str): - param_value[key] = self.__process_string(param_name, param_value[key]) - elif isinstance(param_value[key], list): - param_value[key] = self.__process_list(param_name, param_value[key]) - elif isinstance(param_value[key], dict): - param_value[key] = self.__process_dict(param_name, param_value[key]) - return param_value \ No newline at end of file diff --git a/scripts/build/package/Platform/3rdParty/package_env.json b/scripts/build/package/Platform/3rdParty/package_env.json deleted file mode 100644 index 5059132664..0000000000 --- a/scripts/build/package/Platform/3rdParty/package_env.json +++ /dev/null @@ -1,19 +0,0 @@ -{ - "local_env": { - "S3_PREFIX": "${BRANCH_NAME}/3rdParty" - }, - "types": { - "3rdParty_all": { - "PACKAGE_TARGETS":[ - { - "FILE_LIST": "3rdParty.json", - "FILE_LIST_TYPE": "3rdParty", - "PACKAGE_NAME": "${PACKAGE_NAME_PATTERN}-3rdParty-all-${BUILD_NUMBER}.zip" - } - ], - "BOOTSTRAP_CFG_GAME_FOLDER":"CMakeTestbed", - "SKIP_BUILD": 1, - "SKIP_SCRUBBING": 1 - } - } -} diff --git a/scripts/build/package/Platform/3rdParty/package_filelists/3rdParty.json b/scripts/build/package/Platform/3rdParty/package_filelists/3rdParty.json deleted file mode 100644 index 915368dd0b..0000000000 --- a/scripts/build/package/Platform/3rdParty/package_filelists/3rdParty.json +++ /dev/null @@ -1,18 +0,0 @@ -{ - "@3rdParty": { - "3rdParty.txt": "#include", - "AWS/AWSNativeSDK/1.7.167-az.2/**": "#include", - "CMake/3.19.1/**": "#include", - "DirectXShaderCompiler/1.0.1-az.1/**": "#include", - "DirectXShaderCompiler/2020.08.07/**": "#include", - "DirectXShaderCompiler/5.0.0-az/**": "#include", - "dyad/0.2.0-17-amazon/**": "#include", - "etc2comp/2017_04_24-az.2/**": "#include", - "expat/2.1.0-pkg.3/**": "#include", - "FbxSdk/2016.1.2-az.1/**": "#include", - "OpenSSL/1.1.1b-noasm-az/**": "#include", - "Qt/5.15.1.2-az/**": "#include", - "tiff/3.9.5-az.3/**": "#include", - "Wwise/2019.2.8.7432/**": "#include" - } -} \ No newline at end of file diff --git a/scripts/build/package/Platform/Android/package_env.json b/scripts/build/package/Platform/Android/package_env.json deleted file mode 100644 index 017937413a..0000000000 --- a/scripts/build/package/Platform/Android/package_env.json +++ /dev/null @@ -1,25 +0,0 @@ -{ - "local_env": { - "S3_PREFIX": "${BRANCH_NAME}/Android" - }, - "types":{ - "all":{ - "PACKAGE_TARGETS":[ - { - "FILE_LIST": "all.json", - "FILE_LIST_TYPE": "All", - "PACKAGE_NAME": "${PACKAGE_NAME_PATTERN}-android-all-${BUILD_NUMBER}.zip" - } - ], - "BOOTSTRAP_CFG_GAME_FOLDER":"AutomatedTesting", - "SKIP_BUILD": 0, - "BUILD_TARGETS":[ - { - "BUILD_CONFIG_FILENAME": "build_config.json", - "PLATFORM": "Android", - "TYPE": "profile" - } - ] - } - } -} diff --git a/scripts/build/package/Platform/Mac/package_env.json b/scripts/build/package/Platform/Mac/package_env.json deleted file mode 100644 index f21c9fdaab..0000000000 --- a/scripts/build/package/Platform/Mac/package_env.json +++ /dev/null @@ -1,40 +0,0 @@ -{ - "local_env": { - "S3_PREFIX": "${BRANCH_NAME}/Mac" - }, - "types":{ - "all":{ - "PACKAGE_TARGETS":[ - { - "FILE_LIST": "all.json", - "FILE_LIST_TYPE": "All", - "PACKAGE_NAME": "${PACKAGE_NAME_PATTERN}-mac-all-${BUILD_NUMBER}.zip" - }, - { - "FILE_LIST": "3rdParty.json", - "FILE_LIST_TYPE": "Mac", - "PACKAGE_NAME": "${PACKAGE_NAME_PATTERN}-mac-3rdParty-${BUILD_NUMBER}.zip" - }, - { - "FILE_LIST": "3rdParty.json", - "FILE_LIST_TYPE": "3rdParty", - "PACKAGE_NAME": "${PACKAGE_NAME_PATTERN}-mac-3rdParty-Warsaw-${BUILD_NUMBER}.zip" - } - ], - "BOOTSTRAP_CFG_GAME_FOLDER":"CMakeTestbed", - "SKIP_BUILD": 0, - "BUILD_TARGETS":[ - { - "BUILD_CONFIG_FILENAME": "build_config.json", - "PLATFORM": "Mac", - "TYPE": "profile" - }, - { - "BUILD_CONFIG_FILENAME": "build_config.json", - "PLATFORM": "iOS", - "TYPE": "profile" - } - ] - } - } -} diff --git a/scripts/build/package/Platform/Mac/package_filelists/3rdParty.json b/scripts/build/package/Platform/Mac/package_filelists/3rdParty.json deleted file mode 100644 index ff019f701f..0000000000 --- a/scripts/build/package/Platform/Mac/package_filelists/3rdParty.json +++ /dev/null @@ -1,82 +0,0 @@ -{ - "@3rdParty":{ - "3rdParty.txt":"#include", - "AWS/AWSNativeSDK/1.7.167-az.2":{ - "*":"#include", - "include/**":"#include", - "LICENSE*":"#include", - "lib/mac/**":"#include", - "bin/mac/**":"#include", - "lib/ios/**":"#include", - "bin/ios/**":"#include" - }, - "DirectXShaderCompiler/1.0.1-az.1":{ - "*":"#include", - "src/**":"#include", - "bin/darwin_x64/**":"#include" - }, - "DirectXShaderCompiler/2020.08.07":{ - "*":"#include", - "bin/darwin_x64/**":"#include" - }, - "DirectXShaderCompiler/5.0.0-az":{ - "*":"#include", - "bin/darwin_x64/**":"#include" - }, - "etc2comp/2017_04_24-az.2":{ - "*":"#include", - "EtcLib/Etc/**":"#include", - "EtcLib/EtcCodec/**":"#include", - "EtcLib/*":"#include", - "EtcLib/OSX_x86/**":"#include" - }, - "expat/2.1.0-pkg.3":{ - "*":"#include", - "amiga/**":"#include", - "bcb5/**":"#include", - "conftools/**":"#include", - "doc/**":"#include", - "examples/**":"#include", - "lib/**":"#include", - "m4/**":"#include", - "tests/**":"#include", - "vms/**":"#include", - "win32/**":"#include", - "xmlwf/**":"#include", - "build/osx/**":"#include" - }, - "FreeType2/2.5.0.1-pkg.3":{ - "freetype-2.5.0.1/**":"#include", - "dist/**":"#include", - "mac/**":"#include", - "ios*/**":"#include", - "build/osx/**":"#include" - }, - "Redistributables/FbxSdk/2016.1.2":{ - "*mac*":"#include" - }, - "OpenSSL/1.1.1b-noasm-az":{ - "include/**":"#include", - "ssl/**":"#include", - "LICENSE":"#include", - "bin/**":"#include", - "lib/darwin*/**":"#include", - "lib/ios*/**":"#include" - }, - "Qt/5.15.1.2-az":{ - "LICENSE":"#include", - "LGPL_EXCEPTION.TXT":"#include", - "LICENSE.GPLV3":"#include", - "LICENSE.LGPLV3":"#include", - "QT-NOTICE.TXT":"#include", - "clang_64/**":"#include" - }, - "tiff/3.9.5-az.3":{ - "COPYRIGHT":"#include", - "README":"#include", - "RELEASE-DATE":"#include", - "VERSION":"#include", - "libtiff/macosx_clang/**":"#include" - } - } -} \ No newline at end of file diff --git a/scripts/build/package/Platform/Windows/package_env.json b/scripts/build/package/Platform/Windows/package_env.json deleted file mode 100644 index 970361bacc..0000000000 --- a/scripts/build/package/Platform/Windows/package_env.json +++ /dev/null @@ -1,35 +0,0 @@ -{ - "local_env": { - "S3_PREFIX": "${BRANCH_NAME}/Windows" - }, - "types":{ - "all":{ - "PACKAGE_TARGETS":[ - { - "FILE_LIST": "all.json", - "FILE_LIST_TYPE": "All", - "PACKAGE_NAME": "${PACKAGE_NAME_PATTERN}-windows-all-${BUILD_NUMBER}.zip" - }, - { - "FILE_LIST": "symbols.json", - "FILE_LIST_TYPE": "All", - "PACKAGE_NAME": "${PACKAGE_NAME_PATTERN}-windows-all-symbols-${BUILD_NUMBER}.zip" - }, - { - "FILE_LIST": "3rdParty.json", - "FILE_LIST_TYPE": "Windows", - "PACKAGE_NAME": "${PACKAGE_NAME_PATTERN}-windows-3rdparty-${BUILD_NUMBER}.zip" - } - ], - "BOOTSTRAP_CFG_GAME_FOLDER":"CMakeTestbed", - "SKIP_BUILD": 0, - "BUILD_TARGETS":[ - { - "BUILD_CONFIG_FILENAME": "build_config.json", - "PLATFORM": "Windows", - "TYPE": "profile_vs2019" - } - ] - } - } -} diff --git a/scripts/build/package/Platform/Windows/package_filelists/3rdParty.json b/scripts/build/package/Platform/Windows/package_filelists/3rdParty.json deleted file mode 100644 index d9e5d85090..0000000000 --- a/scripts/build/package/Platform/Windows/package_filelists/3rdParty.json +++ /dev/null @@ -1,113 +0,0 @@ -{ - "@3rdParty":{ - "3rdParty.txt":"#include", - "AMD/AGS Lib/2.2":{ - "*":"#include", - "inc/**":"#include", - "lib/x64/**":"#include" - }, - "AWS/AWSNativeSDK/1.7.167-az.2":{ - "*":"#include", - "include/**":"#include", - "LICENSE*":"#include", - "lib/windows/**":"#include", - "bin/windows/**":"#include", - "lib/android/arm64-v8a/**":"#include", - "bin/android/arm64-v8a/**":"#include", - "bin/linux/**":"#include", - "lib/linux/**":"#include" - }, - "DirectXShaderCompiler/1.0.1-az.1":{ - "*":"#include", - "src/**":"#include", - "bin/win_x64/**":"#include" - }, - "DirectXShaderCompiler/2020.08.07":{ - "*":"#include", - "bin/win_x64/**":"#include" - }, - "DirectXShaderCompiler/5.0.0-az":{ - "*":"#include", - "bin/win_x64/**":"#include" - }, - "dyad/0.2.0-17-amazon":{ - "*":"#include", - "doc/**":"#include", - "example/**":"#include", - "projects/**":"#include", - "src/**":"#include", - "lib/x64_v140_Debug/**":"#include", - "lib/x64_v140_Release/**":"#include", - "lib/linux_debug/**":"#include", - "lib/linux_release/**":"#include" - }, - "etc2comp/2017_04_24-az.2":{ - "EtcLib/Etc/**":"#include", - "EtcLib/EtcCodec/**":"#include", - "LICENSE":"#include", - "EtcLib/Windows_x86_64/**":"#include", - "EtcLib/Linux_x64_linux/**":"#include" - }, - "expat/2.1.0-pkg.3":{ - "*":"#include", - "amiga/**":"#include", - "bcb5/**":"#include", - "conftools/**":"#include", - "doc/**":"#include", - "examples/**":"#include", - "lib/**":"#include", - "m4/**":"#include", - "tests/**":"#include", - "vms/**":"#include", - "win32/**":"#include", - "xmlwf/**":"#include", - "build/win_x64/vc140/**":"#include", - "build/win_x64/android_ndk_r12/android-*/**":"#include", - "build/linux/**":"#include" - }, - "FreeType2/2.5.0.1-pkg.3":{ - "freetype-2.5.0.1/**":"#include", - "dist/**":"#include", - "vc140_x64/**":"#include", - "build/win_x64/vc140/**":"#include", - "android*/**":"#include", - "build/win_x64/android_ndk_r12/android-*/**":"#include", - "build/linux/clang-3.4/**":"#include" - }, - "Redistributables/FbxSdk/2016.1.2":{ - "*win*":"#include", - "*vs2013*":"#exclude" - }, - "OpenSSL/1.1.1b-noasm-az":{ - "include/**":"#include", - "ssl/**":"#include", - "LICENSE":"#include", - "bin/**":"#include", - "lib/vc140_x64_debug/**":"#include", - "lib/vc140_x64_release/**":"#include", - "lib/android_ndk_r15c/android-*/**":"#include", - "lib/linux-x86_64-clang-debug/**":"#include", - "lib/linux-x86_64-clang-release/**":"#include" - }, - "Qt/5.15.1.2-az":{ - "LICENSE":"#include", - "LGPL_EXCEPTION.TXT":"#include", - "LICENSE.GPLV3":"#include", - "LICENSE.LGPLV3":"#include", - "QT-NOTICE.TXT":"#include", - "msvc*/**":"#include", - "gcc_64/**":"#include" - }, - "tiff/3.9.5-az.3":{ - "COPYRIGHT":"#include", - "README":"#include", - "RELEASE-DATE":"#include", - "VERSION":"#include", - "libtiff/buildLib32Lib64.bat":"#include", - "libtiff/readme.txt":"#include", - "include/libtiff/*.h":"#include", - "libtiff/*vc140.lib":"#include", - "libtiff/linux_gcc/**":"#include" - } - } -} \ No newline at end of file diff --git a/scripts/build/package/glob3.py b/scripts/build/package/glob3.py deleted file mode 100755 index b46683a4be..0000000000 --- a/scripts/build/package/glob3.py +++ /dev/null @@ -1,163 +0,0 @@ -# -# Copyright (c) Contributors to the Open 3D Engine Project. -# For complete copyright and license terms please see the LICENSE at the root of this distribution. -# -# SPDX-License-Identifier: Apache-2.0 OR MIT -# -# - -import os -import re -import fnmatch - -__all__ = ["glob", "iglob", "escape"] - -def glob(pathname, recursive=False): - """Return a list of paths matching a pathname pattern. - The pattern may contain simple shell-style wildcards a la - fnmatch. However, unlike fnmatch, filenames starting with a - dot are special cases that are not matched by '*' and '?' - patterns. - If recursive is true, the pattern '**' will match any files and - zero or more directories and subdirectories. - """ - return list(iglob(pathname, recursive=recursive)) - -def iglob(pathname, recursive=False): - """Return an iterator which yields the paths matching a pathname pattern. - The pattern may contain simple shell-style wildcards a la - fnmatch. However, unlike fnmatch, filenames starting with a - dot are special cases that are not matched by '*' and '?' - patterns. - If recursive is true, the pattern '**' will match any files and - zero or more directories and subdirectories. - """ - it = _iglob(pathname, recursive, False) - if recursive and _isrecursive(pathname): - s = next(it) # skip empty string - assert not s - return it - -def _iglob(pathname, recursive, dironly): - dirname, basename = os.path.split(pathname) - if not has_magic(pathname): - assert not dironly - if basename: - if os.path.lexists(pathname): - yield pathname - else: - # Patterns ending with a slash should match only directories - if os.path.isdir(dirname): - yield pathname - return - if not dirname: - if recursive and _isrecursive(basename): - yield _glob2(dirname, basename, dironly) - else: - yield _glob1(dirname, basename, dironly) - return - # `os.path.split()` returns the argument itself as a dirname if it is a - # drive or UNC path. Prevent an infinite recursion if a drive or UNC path - # contains magic characters (i.e. r'\\?\C:'). - if dirname != pathname and has_magic(dirname): - dirs = _iglob(dirname, recursive, True) - else: - dirs = [dirname] - if has_magic(basename): - if recursive and _isrecursive(basename): - glob_in_dir = _glob2 - else: - glob_in_dir = _glob1 - else: - glob_in_dir = _glob0 - for dirname in dirs: - for name in glob_in_dir(dirname, basename, dironly): - yield os.path.join(dirname, name) - -# These 2 helper functions non-recursively glob inside a literal directory. -# They return a list of basenames. _glob1 accepts a pattern while _glob0 -# takes a literal basename (so it only has to check for its existence). - -def _glob1(dirname, pattern, dironly): - names = list(_iterdir(dirname, dironly)) - return fnmatch.filter(names, pattern) - -def _glob0(dirname, basename, dironly): - if not basename: - # `os.path.split()` returns an empty basename for paths ending with a - # directory separator. 'q*x/' should match only directories. - if os.path.isdir(dirname): - return [basename] - else: - if os.path.lexists(os.path.join(dirname, basename)): - return [basename] - return [] - -# Following functions are not public but can be used by third-party code. - -def glob0(dirname, pattern): - return _glob0(dirname, pattern, False) - -def glob1(dirname, pattern): - return _glob1(dirname, pattern, False) - -# This helper function recursively yields relative pathnames inside a literal -# directory. - -def _glob2(dirname, pattern, dironly): - assert _isrecursive(pattern) - return [pattern[:0]] + list(_rlistdir(dirname, dironly)) - -# If dironly is false, yields all file names inside a directory. -# If dironly is true, yields only directory names. -def _iterdir(dirname, dironly): - if not dirname: - if isinstance(dirname, bytes): - dirname = bytes(os.curdir, 'ASCII') - else: - dirname = os.curdir - try: - for entry in os.listdir(dirname): - yield entry - except OSError: - return - -# Recursively yields relative pathnames inside a literal directory. -def _rlistdir(dirname, dironly): - if not os.path.islink(dirname): - names = list(_iterdir(dirname, dironly)) - for x in names: - yield x - path = os.path.join(dirname, x) if dirname else x - for y in _rlistdir(path, dironly): - yield os.path.join(x, y) -magic_check = re.compile('([*?[])') -magic_check_bytes = re.compile(b'([*?[])') - -def has_magic(s): - if isinstance(s, bytes): - match = magic_check_bytes.search(s) - else: - match = magic_check.search(s) - return match is not None - -def _ishidden(path): - return path[0] in ('.', b'.'[0]) - -def _isrecursive(pattern): - if isinstance(pattern, bytes): - return pattern == b'**' - else: - return pattern == '**' - -def escape(pathname): - """Escape all special characters. - """ - # Escaping is done by wrapping any of "*?[" between square brackets. - # Metacharacters do not work in the drive part and shouldn't be escaped. - drive, pathname = os.path.splitdrive(pathname) - if isinstance(pathname, bytes): - pathname = magic_check_bytes.sub(br'[\1]', pathname) - else: - pathname = magic_check.sub(r'[\1]', pathname) - return drive + pathname \ No newline at end of file diff --git a/scripts/build/package/glob_to_regex.py b/scripts/build/package/glob_to_regex.py deleted file mode 100755 index 53ad3d850d..0000000000 --- a/scripts/build/package/glob_to_regex.py +++ /dev/null @@ -1,130 +0,0 @@ -# -# Copyright (c) Contributors to the Open 3D Engine Project. -# For complete copyright and license terms please see the LICENSE at the root of this distribution. -# -# SPDX-License-Identifier: Apache-2.0 OR MIT -# -# -from __future__ import absolute_import -import os -import re -import json -import sys -try: - import six -except ImportError: - import pip - pip.main(['install', 'six', '--ignore-installed', '-q']) - import six -from pathlib import Path - -this_file_path = os.path.dirname(os.path.realpath(__file__)) - -# resolve symlinks and eliminate ".." components -engine_root_path = Path(__file__).resolve().parents[3] - -def convert_glob_pattern_to_regex_pattern(glob_pattern): - # switch to forward slashes because way easier to pattern match against - pattern = re.sub(r'\\', r'/', glob_pattern) - - # Replace the dots and question marks - pattern = re.sub(r'\.', r'\\.', pattern) - pattern = re.sub(r'\?', r'.', pattern) - - # Handle the * vs ** expansions - pattern = re.sub(r'([^*])\*($|[^*])', r'\1[^/\\\\]*\2', pattern) - pattern = re.sub(r'\*\*/', r'(.*/)?', pattern) - pattern = re.sub(r'\*\*', r'.*', pattern) - - # replace the forward slashes with [/\\] so it works on PC/unix - pattern = re.sub(r'([^^])/', r'\1[/\\\\]', pattern) - return pattern - -# Convert the package json into a pair of regexes we can use to look for includes and excludes -def convert_glob_list_to_regex_list(filelist, prefix): - includes = [] - excludes = [] - for key, value in six.iteritems(filelist): - glob_pattern = os.path.join(prefix, key) - if isinstance(value, dict): - (sub_includes, sub_excludes) = convert_glob_list_to_regex_list(value, glob_pattern) - includes.extend(sub_includes) - excludes.extend(sub_excludes) - else: - # Simulate what glob would do with file walking to scope the * within a directory - # and ** across directories - regex_pattern = convert_glob_pattern_to_regex_pattern(os.path.normpath(glob_pattern)) - - # Deal with the commands. include/exclude are straight forward. Moves/renames are to be considered - # includes, and we will stick with validating the original contents for now - if value == "#include": - includes.append(regex_pattern) - elif value == "#exclude": - excludes.append(regex_pattern) - elif value.startswith('#move:'): - includes.append(regex_pattern) - elif value.startswith('#rename:'): - includes.append(regex_pattern) - else: - pass - return (includes, excludes) - -def generate_excludes_for_platform(root, platform): - if platform == 'all': - platform_exclusions_filename = os.path.join(this_file_path, 'platform_exclusions.json') - with open(platform_exclusions_filename, 'r') as platform_exclusions_file: - platform_exclusions = json.load(platform_exclusions_file) - else: - # Use real path in case root is a symlink path - if os.name == 'posix' and os.path.islink(root): - root = os.readlink(root) - # "root" is the root of the folder structure we're validating - # "engine_root_path" is the engine root where the restricted platform folder is linked - relative_folder = os.path.relpath(this_file_path, engine_root_path) - platform_exclusions_filename = os.path.join(engine_root_path, 'restricted', platform, relative_folder, platform.lower() + '_exclusions.json') - with open(platform_exclusions_filename, 'r') as platform_exclusions_file: - platform_exclusions = json.load(platform_exclusions_file) - - if platform not in platform_exclusions: - raise KeyError('No {} found in {}'.format(platform, platform_exclusions_filename)) - if '@lyengine' not in platform_exclusions[platform]: - raise KeyError('No {}/@lyengine found in {}'.format(platform, package_file_list)) - (_, excludes) = convert_glob_list_to_regex_list(platform_exclusions[platform]['@lyengine'], root) - del _ - return excludes - -def generate_include_exclude_regexes(package_platform, package_type, root, prohibited_platforms): - # The general contents will be indicated by the package file - if package_type == 'all': - package_file_list = os.path.join(this_file_path, 'package_filelists', 'all.json') - else: - # Search non-restricted platform first - package_file_list = os.path.join(this_file_path, 'Platform', package_platform, 'package_filelists', f'{package_type}.json') - if not os.path.exists(filelist): - # Use real path in case root is a symlink path - if os.name == 'posix' and os.path.islink(root): - root = os.readlink(root) - # "root" is the root of the folder structure we're validating - # "engine_root_path" is the engine root where the restricted platform folder is linked - rel_path = os.path.relpath(this_file_path, engine_root_path) - package_file_list = os.path.join(engine_root_path, 'restricted', package_platform, rel_path, 'package_filelists', - f'{package_type}.json') - with open(package_file_list, 'r') as package_file: - package = json.load(package_file) - - if '@lyengine' not in package: - raise KeyError('No @lyengine found in {}'.format(package_file_list)) - - (includes_list, excludes_list) = convert_glob_list_to_regex_list(package['@lyengine'], root) - prohibited_platforms.append('all') - - # Add the exclusions of each prohibited platform - for p in prohibited_platforms: - excludes_list.extend(generate_excludes_for_platform(root, p)) - - includes = re.compile('|'.join(includes_list), re.IGNORECASE) - excludes = re.compile('|'.join(excludes_list), re.IGNORECASE) - return (includes, excludes) - -def generate_exclude_regexes_for_platform(root, platform): - return re.compile('|'.join(generate_excludes_for_platform(root, platform)), re.IGNORECASE) diff --git a/scripts/build/package/package.py b/scripts/build/package/package.py deleted file mode 100755 index d33601ba45..0000000000 --- a/scripts/build/package/package.py +++ /dev/null @@ -1,187 +0,0 @@ -# -# Copyright (c) Contributors to the Open 3D Engine Project. -# For complete copyright and license terms please see the LICENSE at the root of this distribution. -# -# SPDX-License-Identifier: Apache-2.0 OR MIT -# -# -import os -import sys -import zipfile -import timeit -import progressbar -from optparse import OptionParser -from PackageEnv import PackageEnv -cur_dir = cur_dir = os.path.dirname(os.path.abspath(__file__)) -sys.path.insert(0, f'{cur_dir}/..') -from ci_build import build -from util import * -from glob3 import glob - - -def package(options): - package_env = PackageEnv(options.platform, options.type, options.package_env) - - if not package_env.get('SKIP_BUILD'): - print(package_env.get('SKIP_BUILD')) - print('SKIP_BUILD is False, running CMake build...') - cmake_build(package_env) - - # TODO Compile Assets - #if package_env.exists('ASSET_PROCESSOR_PATH'): - # compile_assets(package_env) - - #create packages - package_targets = package_env.get('PACKAGE_TARGETS') - for package_target in package_targets: - create_package(package_env, package_target) - upload_package(package_env, package_target) - - -def get_python_path(package_env): - if sys.platform == 'win32': - return os.path.join(package_env.get('ENGINE_ROOT'), 'python', 'python.cmd') - else: - return os.path.join(package_env.get('ENGINE_ROOT'), 'python', 'python.sh') - - -def cmake_build(package_env): - build_targets = package_env.get('BUILD_TARGETS') - for build_target in build_targets: - build(build_target['BUILD_CONFIG_FILENAME'], build_target['PLATFORM'], build_target['TYPE']) - - -def create_package(package_env, package_target): - print('Creating zipfile for package target {}'.format(package_target)) - cur_dir = os.path.dirname(os.path.abspath(__file__)) - file_list_type = package_target['FILE_LIST_TYPE'] - if file_list_type == 'All': - filelist = os.path.join(cur_dir, 'package_filelists', package_target['FILE_LIST']) - else: - filelist = os.path.join(cur_dir, 'Platform', file_list_type, 'package_filelists', package_target['FILE_LIST']) - with open(filelist, 'r') as source: - data = json.load(source) - lyengine = package_env.get('ENGINE_ROOT') - print('Calculating filelists...') - files = {} - - if '@lyengine' in data: - files.update(filter_files(data['@lyengine'], lyengine)) - if '@3rdParty' in data: - files.update(filter_files(data['@3rdParty'], package_env.get('THIRDPARTY_HOME'))) - package_path = os.path.join(lyengine, package_target['PACKAGE_NAME']) - print('Creating zipfile at {}'.format(package_path)) - start = timeit.default_timer() - with progressbar.ProgressBar(max_value=len(files), redirect_stderr=True) as bar: - with zipfile.ZipFile(package_path, 'w', compression=zipfile.ZIP_DEFLATED, allowZip64=True) as myzip: - i = 0 - bar.update(i) - last_bar_update = timeit.default_timer() - for f in files: - if os.path.islink(f): - zipInfo = zipfile.ZipInfo(files[f]) - zipInfo.create_system = 3 - # long type of hex val of '0xA1ED0000L', - # say, symlink attr magic... - zipInfo.external_attr |= 0xA0000000 - myzip.writestr(zipInfo, os.readlink(f)) - else: - myzip.write(f, files[f]) - i += 1 - # Update progress bar every 2 minutes - if int(timeit.default_timer() - last_bar_update) > 120: - last_bar_update = timeit.default_timer() - bar.update(i) - bar.update(i) - - stop = timeit.default_timer() - total_time = int(stop - start) - print('{} is created. Total time: {} seconds.'.format(package_path, total_time)) - - def get_MD5(file_path): - from hashlib import md5 - chunk_size = 200 * 1024 - h = md5() - with open(file_path, 'rb') as f: - while True: - chunk = f.read(chunk_size) - if len(chunk): - h.update(chunk) - else: - break - return h.hexdigest() - - md5_file = '{}.MD5'.format(package_path) - print('Creating MD5 file at {}'.format(md5_file)) - start = timeit.default_timer() - with open(md5_file, 'w') as output: - output.write(get_MD5(package_path)) - stop = timeit.default_timer() - total_time = int(stop - start) - print('{} is created. Total time: {} seconds.'.format(md5_file, total_time)) - - -def upload_package(package_env, package_target): - package_name = package_target['PACKAGE_NAME'] - engine_root = package_env.get('ENGINE_ROOT') - internal_s3_bucket = package_env.get('INTERNAL_S3_BUCKET') - qa_s3_bucket = package_env.get('QA_S3_BUCKET') - s3_prefix = package_env.get('S3_PREFIX') - print(f'Uploading {package_name} to S3://{internal_s3_bucket}/{s3_prefix}/{package_name}') - cmd = ['aws', 's3', 'cp', os.path.join(engine_root, package_name), f's3://{internal_s3_bucket}/{s3_prefix}/{package_name}'] - execute_system_call(cmd, stdout=subprocess.DEVNULL) - print(f'Uploading {package_name} to S3://{qa_s3_bucket}/{s3_prefix}/{package_name}') - cmd = ['aws', 's3', 'cp', os.path.join(engine_root, package_name), f's3://{qa_s3_bucket}/{s3_prefix}/{package_name}', '--acl', 'bucket-owner-full-control'] - execute_system_call(cmd, stdout=subprocess.DEVNULL) - - -def filter_files(data, base, prefix='', support_symlinks=True): - includes = {} - excludes = set() - for key, value in data.items(): - pattern = os.path.join(base, prefix, key) - if not isinstance(value, dict): - pattern = os.path.normpath(pattern) - result = glob(pattern, recursive=True) - files = [x for x in result if os.path.isfile(x) or (support_symlinks and os.path.islink(x))] - if value == "#exclude": - excludes.update(files) - elif value == "#include": - for file in files: - includes[file] = os.path.relpath(file, base) - else: - if value.startswith('#move:'): - for file in files: - file_name = os.path.relpath(file, os.path.join(base, prefix)) - dst_dir = value.replace('#move:', '').strip(' ') - includes[file] = os.path.join(dst_dir, file_name) - elif value.startswith('#rename:'): - for file in files: - dst_file = value.replace('#rename:', '').strip(' ') - includes[file] = dst_file - else: - warn('Unknown directive {} for pattern {}'.format(value, pattern)) - else: - includes.update(filter_files(value, base, os.path.join(prefix, key), support_symlinks)) - - for exclude in excludes: - try: - includes.pop(exclude) - except KeyError: - pass - return includes - - -def parse_args(): - parser = OptionParser() - parser.add_option("--platform", dest="platform", default='consoles', help="Target platform to package") - parser.add_option("--type", dest="type", default='consoles', help="Package type") - parser.add_option("--package_env", dest="package_env", default="package_env.json", - help="JSON file that defines package environment variables") - (options, args) = parser.parse_args() - return options, args - - -if __name__ == "__main__": - (options, args) = parse_args() - package(options) diff --git a/scripts/build/package/package_env.json b/scripts/build/package/package_env.json deleted file mode 100644 index 732ff12286..0000000000 --- a/scripts/build/package/package_env.json +++ /dev/null @@ -1,11 +0,0 @@ -{ - "global_env":{ - "ENGINE_ROOT":"", - "THIRDPARTY_HOME":"", - "BRANCH_NAME":"", - "PACKAGE_NAME_PATTERN":"${BRANCH_NAME}-spectra", - "BUILD_NUMBER":"0", - "INTERNAL_S3_BUCKET": "ly-spectra-packages", - "QA_S3_BUCKET": "amazon.ly.lionbridgeshare/ly-spectra-packages" - } -} diff --git a/scripts/build/package/package_filelists/all.json b/scripts/build/package/package_filelists/all.json deleted file mode 100644 index b1f3f270ca..0000000000 --- a/scripts/build/package/package_filelists/all.json +++ /dev/null @@ -1,15 +0,0 @@ -{ - "@lyengine": { - "**": "#include", - ".git/**": "#exclude", - ".gitattributes": "#exclude", - ".gitignore": "#exclude", - ".gitmodules": "#exclude", - ".lfsconfig": "#exclude", - ".p4ignore": "#exclude", - ".submodules": "#exclude", - "**/*.pyc": "#exclude", - "**/*.pdb": "#exclude", - "build/*/packages/*/*.stamp": "#exclude" - } -} \ No newline at end of file diff --git a/scripts/build/package/package_filelists/symbols.json b/scripts/build/package/package_filelists/symbols.json deleted file mode 100644 index 3f30f6ec1f..0000000000 --- a/scripts/build/package/package_filelists/symbols.json +++ /dev/null @@ -1,5 +0,0 @@ -{ - "@lyengine": { - "**/*.pdb": "#include" - } -} \ No newline at end of file diff --git a/scripts/build/package/platform_exclusions.json b/scripts/build/package/platform_exclusions.json deleted file mode 100644 index f54aeb07c9..0000000000 --- a/scripts/build/package/platform_exclusions.json +++ /dev/null @@ -1,12 +0,0 @@ -{ - "all": { - "@lyengine": { - "**/Gems/Atom/RHI/DX12/External/pix/**": "#exclude", - "**/.idea/**": "#exclude", - "**/*.csproj*": "#exclude", - "**/.owner": "#exclude", - "**/WinPixEventRuntime.dll": "#exclude", - "**/XenonConsole.exe": "#exclude" - } - } -} diff --git a/scripts/build/tools/copy_file.py b/scripts/build/tools/copy_file.py new file mode 100644 index 0000000000..45b5e39d7a --- /dev/null +++ b/scripts/build/tools/copy_file.py @@ -0,0 +1,57 @@ +# +# Copyright (c) Contributors to the Open 3D Engine Project. +# For complete copyright and license terms please see the LICENSE at the root of this distribution. +# +# SPDX-License-Identifier: Apache-2.0 OR MIT +# +# + +import argparse +import os +import sys +import glob +import shutil + + +def parse_args(): + parser = argparse.ArgumentParser() + parser.add_argument('-s', '--src-dir', dest='src_dir', required=True, help='Source directory to copy files from, if not specified, current directory is used.') + parser.add_argument('-r', '--file-regex', dest='file_regex', required=True, help='Globbing pattern used to match file names to copy.') + parser.add_argument('-t', '--target-dir', dest="target_dir", required=True, help='Target directory to copy files to.') + args = parser.parse_args() + if not os.path.isdir(args.src_dir): + print('ERROR: src_dir is not a valid directory.') + exit(1) + return args + + +def extended_path(path): + """ + Maximum Path Length Limitation on Windows is 260 characters, use extended-length path to bypass this limitation + """ + if sys.platform in ('win32', 'cli') and len(path) >= 260: + if path.startswith('\\'): + return r'\\?\UNC\{}'.format(path.lstrip('\\')) + else: + return r'\\?\{}'.format(path) + else: + return path + + +def copy_file(src_dir, file_regex, target_dir): + if not os.path.isdir(args.target_dir): + os.makedirs(target_dir) + for f in glob.glob(os.path.join(src_dir, file_regex), recursive=True): + if os.path.isfile(f): + relative_path = os.path.relpath(f, src_dir) + target_file_path = os.path.join(target_dir, relative_path) + target_file_dir = os.path.dirname(target_file_path) + if not os.path.isdir(target_file_dir): + os.makedirs(target_file_dir) + shutil.copy2(f, extended_path(target_file_path)) + print(f'{f} -> {target_file_path}') + + +if __name__ == "__main__": + args = parse_args() + copy_file(args.src_dir, args.file_regex, args.target_dir) diff --git a/scripts/commit_validation/CMakeLists.txt b/scripts/commit_validation/CMakeLists.txt index 6079515eb8..00e8506ef1 100644 --- a/scripts/commit_validation/CMakeLists.txt +++ b/scripts/commit_validation/CMakeLists.txt @@ -6,10 +6,8 @@ # # -# this ctest makes sure that the commit validation function -# also runs its tests during commit validation! ly_add_pytest( NAME test_commit_validation - PATH ${CMAKE_CURRENT_LIST_DIR} + PATH ${CMAKE_CURRENT_LIST_DIR}/commit_validation/tests + TEST_SUITE smoke ) - diff --git a/scripts/commit_validation/commit_validation/commit_validation.py b/scripts/commit_validation/commit_validation/commit_validation.py index 513244a735..be8fc4ce1e 100755 --- a/scripts/commit_validation/commit_validation/commit_validation.py +++ b/scripts/commit_validation/commit_validation/commit_validation.py @@ -181,4 +181,6 @@ EXCLUDED_VALIDATION_PATTERNS = [ 'restricted/*/Tools/*RemoteControl', '*/user/Cache/*', '*/user/log/*', + '*/user/log_test_1/*', + '*/user/log_test_2/*', ] diff --git a/scripts/commit_validation/commit_validation/tests/validators/test_crc_validator.py b/scripts/commit_validation/commit_validation/tests/validators/test_crc_validator.py new file mode 100644 index 0000000000..6fbe86ab29 --- /dev/null +++ b/scripts/commit_validation/commit_validation/tests/validators/test_crc_validator.py @@ -0,0 +1,47 @@ +# +# Copyright (c) Contributors to the Open 3D Engine Project. +# For complete copyright and license terms please see the LICENSE at the root of this distribution. +# +# SPDX-License-Identifier: Apache-2.0 OR MIT +# +# + +import unittest +from unittest.mock import patch, mock_open + +from commit_validation.tests.mocks.mock_commit import MockCommit +from commit_validation.validators.crc_validator import CrcValidator + + +class CrcValidatorTests(unittest.TestCase): + + @patch('builtins.open', mock_open(read_data='This file does not contain an AZ_CRC macro')) + def test_fileWithNoCrc_passes(self): + commit = MockCommit(files=['/someCppFile.cpp']) + error_list = [] + self.assertTrue(CrcValidator().run(commit, error_list)) + self.assertEqual(len(error_list), 0, f"Unexpected errors: {error_list}") + + @patch('builtins.open', mock_open(read_data='This file contains an invalid CRC macro AZ_CRC("My string", 0xabcdef00)')) + def test_fileWithInvalidCrc_fails(self): + commit = MockCommit(files=['/someCppFile.cpp']) + error_list = [] + self.assertFalse(CrcValidator().run(commit, error_list)) + self.assertNotEqual(len(error_list), 0, f"Errors were expected but none were returned.") + + @patch('builtins.open', mock_open(read_data='This file contains a valid CRC macro AZ_CRC("My string", 0x18fbd270)')) + def test_fileWithValidCrc_fails(self): + commit = MockCommit(files=['/someCppFile.cpp']) + error_list = [] + self.assertTrue(CrcValidator().run(commit, error_list)) + self.assertEqual(len(error_list), 0, f"Unexpected errors: {error_list}") + + @patch('builtins.open', mock_open(read_data='This file contains an invalid CRC macro AZ_CRC("My string", 0xabcdef00)')) + def test_fileExtensionIgnored_passes(self): + commit = MockCommit(files=['/someCppFile.somerandomextension']) + error_list = [] + self.assertTrue(CrcValidator().run(commit, error_list)) + self.assertEqual(len(error_list), 0, f"Unexpected errors: {error_list}") + +if __name__ == '__main__': + unittest.main() diff --git a/scripts/commit_validation/commit_validation/validators/crc_validator.py b/scripts/commit_validation/commit_validation/validators/crc_validator.py new file mode 100644 index 0000000000..db99d7b50b --- /dev/null +++ b/scripts/commit_validation/commit_validation/validators/crc_validator.py @@ -0,0 +1,48 @@ +# +# Copyright (c) Contributors to the Open 3D Engine Project. +# For complete copyright and license terms please see the LICENSE at the root of this distribution. +# +# SPDX-License-Identifier: Apache-2.0 OR MIT +# +# + +import binascii +import fnmatch +import pathlib +import re +from typing import Type, List + +from commit_validation.commit_validation import Commit, CommitValidator, SOURCE_FILE_EXTENSIONS, EXCLUDED_VALIDATION_PATTERNS, VERBOSE + +class CrcValidator(CommitValidator): + """A file-level validator that makes sure a file does not contain an invalid CRC""" + + def run(self, commit: Commit, errors: List[str]) -> bool: + for file_name in commit.get_files(): + for pattern in EXCLUDED_VALIDATION_PATTERNS: + if fnmatch.fnmatch(file_name, pattern): + if VERBOSE: print(f'{file_name}::{self.__class__.__name__} SKIPPED - Validation pattern excluded on path.') + break + else: + if pathlib.Path(file_name).suffix.lower() not in SOURCE_FILE_EXTENSIONS: + if VERBOSE: print(f'{file_name}::{self.__class__.__name__} SKIPPED - File excluded based on extension.') + continue + + with open(file_name, mode='r', encoding='utf8') as fh: + fileContents = fh.read() + matchesFound = re.findall(r'AZ_CRC\("([^"]+)",([^)]*)\)', fileContents) + for element in matchesFound: + stringInCode = element[0] + valueInCode = element[1].strip() + expectedValue = "{0:#0{1}x}".format(binascii.crc32(stringInCode.lower().encode('utf8')), 10) + if expectedValue != valueInCode: + error_message = str(f'{file_name}::{self.__class__.__name__} FAILED - Source file contains a CRC mismatch!\n' + f' AZ_CRC("{stringInCode}", {valueInCode}), expected value {expectedValue}') + if VERBOSE: print(error_message) + errors.append(error_message) + return (not errors) + + +def get_validator() -> Type[CrcValidator]: + """Returns the validator class for this module""" + return CrcValidator diff --git a/scripts/ctest/CMakeLists.txt b/scripts/ctest/CMakeLists.txt index 98ea21e938..064d27a9cf 100644 --- a/scripts/ctest/CMakeLists.txt +++ b/scripts/ctest/CMakeLists.txt @@ -17,7 +17,7 @@ endif() # Tests ################################################################################ -if(PAL_TRAIT_TEST_LYTESTTOOLS_SUPPORTED) +if(PAL_TRAIT_TEST_PYTEST_SUPPORTED) foreach(suite_name ${LY_TEST_GLOBAL_KNOWN_SUITE_NAMES}) ly_add_pytest( NAME pytest_sanity_${suite_name}_no_gpu @@ -32,16 +32,16 @@ if(PAL_TRAIT_TEST_LYTESTTOOLS_SUPPORTED) TEST_REQUIRES gpu ) endforeach() -endif() -# add a custom test which makes sure that the test filtering works! - -ly_add_test( - NAME cli_test_driver - EXCLUDE_TEST_RUN_TARGET_FROM_IDE - TEST_COMMAND ${LY_PYTHON_CMD} ${CMAKE_CURRENT_LIST_DIR}/ctest_driver_test.py - -x ${CMAKE_CTEST_COMMAND} - --build-path ${CMAKE_BINARY_DIR} - TEST_LIBRARY pytest -) + # add a custom test which makes sure that the test filtering works! + ly_add_test( + NAME cli_test_driver + EXCLUDE_TEST_RUN_TARGET_FROM_IDE + TEST_COMMAND ${LY_PYTHON_CMD} ${CMAKE_CURRENT_LIST_DIR}/ctest_driver_test.py + -x ${CMAKE_CTEST_COMMAND} + --build-path ${CMAKE_BINARY_DIR} + --config $ + TEST_LIBRARY pytest + ) +endif() \ No newline at end of file diff --git a/scripts/ctest/ctest_driver_test.py b/scripts/ctest/ctest_driver_test.py index 82d92ce098..b9a7283b25 100755 --- a/scripts/ctest/ctest_driver_test.py +++ b/scripts/ctest/ctest_driver_test.py @@ -15,10 +15,10 @@ import sys import argparse from ctest_driver import SUITES_AND_DESCRIPTIONS -def main(build_path, ctest_executable): +def main(build_path, ctest_executable, config): script_folder = os.path.dirname(__file__) # -N prevents tests from running, just lists them: - base_args = [sys.executable, os.path.join(script_folder,'ctest_driver.py'), "--build-path", build_path, '-N'] + base_args = [sys.executable, os.path.join(script_folder,'ctest_driver.py'), "--build-path", build_path, "--config", config, '-N'] if ctest_executable: base_args.append("--ctest-executable") base_args.append(ctest_executable) @@ -77,7 +77,10 @@ if __name__ == '__main__': parser.add_argument('-b', '--build-path', required=True, help="Path to a CMake build folder (generated by running cmake)") + parser.add_argument('-c', '--config', + required=True, + help="Configuration to run") args = parser.parse_args() - sys.exit(main(args.build_path, args.ctest_executable)) + sys.exit(main(args.build_path, args.ctest_executable, args.config)) diff --git a/scripts/license_scanner/license_scanner.py b/scripts/license_scanner/license_scanner.py index c0e3c1f1ba..2936e343f9 100644 --- a/scripts/license_scanner/license_scanner.py +++ b/scripts/license_scanner/license_scanner.py @@ -6,6 +6,7 @@ # import argparse +from collections import OrderedDict import fnmatch import json import os @@ -24,15 +25,19 @@ class LicenseScanner: """ DEFAULT_CONFIG_FILE = 'scanner_config.json' + DEFAULT_EXCLUDE_FILE = '.gitignore' + DEFAULT_PACKAGE_INFO_FILE = 'PackageInfo.json' def __init__(self, config_file=None): self.config_file = config_file self.config_data = self._load_config() - self.license_regex = self._load_license_regex() + self.file_regex = self._load_file_regex(self.config_data['license_patterns']) + self.package_info = self._load_file_regex(self.config_data['package_patterns']) + self.excluded_directories = self._load_file_regex(self.config_data['excluded_directories']) def _load_config(self): """Load config from the provided file. Sets default file if one is not provided.""" - if self.config_file is None: + if not self.config_file: script_directory = os.path.dirname(os.path.abspath(__file__)) # Default file expected in same dir as script self.config_file = os.path.join(script_directory, self.DEFAULT_CONFIG_FILE) @@ -43,45 +48,68 @@ class LicenseScanner: print('Config file cannot be found') raise - def _load_license_regex(self): + def _load_file_regex(self, patterns): """Returns regex object with case-insensitive matching from the list of filename patterns.""" regex_patterns = [] - for pattern in self.config_data['license_patterns']: + for pattern in patterns: regex_patterns.append(fnmatch.translate(pattern)) + + if not regex_patterns: + print(f'Warning: No patterns from {patterns} found') + return None + return re.compile('|'.join(regex_patterns), re.IGNORECASE) - def scan(self, path=os.curdir): - """Scan directory tree for filenames matching license_regex. + def scan(self, paths=os.curdir): + """Scan directory tree for filenames matching file_regex, package info, and exclusion files. - :param path: Path of the directory to run scanner - :return: Package paths and their corresponding license file contents - :rtype: dict + :param paths: Paths of the directory to run scanner + :return: Package paths and their corresponding file contents + :rtype: Ordered dict """ - licenses = 0 - license_files = {} + files = 0 + matching_files = OrderedDict() + excluded_directories = None - for dirpath, dirnames, filenames in os.walk(path): - for file in filenames: - if self.license_regex.match(file): - license_file_content = self._get_license_file_contents(os.path.join(dirpath, file)) - rel_dirpath = os.path.relpath(dirpath, path) # Limit path inside scanned directory - license_files[rel_dirpath] = license_file_content - licenses += 1 - print(f'License file: {os.path.join(dirpath, file)}') + if not self.package_info: + self.package_info = self.DEFAULT_PACKAGE_INFO_FILE - # Remove directories that should not be scanned - for dir in self.config_data['excluded_directories']: - if dir in dirnames: - dirnames.remove(dir) - print(f'{licenses} license files found.') - return license_files + if not self.excluded_directories: + print(f'No excluded directory in config, looking for {self.DEFAULT_EXCLUDE_FILE} instead') - def _get_license_file_contents(self, filepath): + for path in paths: + for dirpath, dirnames, filenames in os.walk(path, topdown=True): + dirnames.sort(key=str.casefold) # Ensure that results are sorted + for file in filenames: + if self.file_regex.match(file) or self.package_info.match(file): + file_path = os.path.join(dirpath, file) + matching_file_content = self._get_file_contents(file_path) + matching_files[file_path] = matching_file_content + files += 1 + print(f'Matching file: {file_path}') + if self.package_info.match(file): + dirnames[:] = [] # Stop scanning subdirectories if package info file found + if self.DEFAULT_EXCLUDE_FILE in file and not self.excluded_directories: + ignore_list = self._get_file_contents(os.path.join(dirpath, file)).splitlines() + ignore_list.append('.git') # .gitignore doesn't usually have .git in its exclusions + excluded_directories = self._load_file_regex(ignore_list) + + # Remove directories that should not be scanned + if self.excluded_directories: + excluded_directories = self.excluded_directories + for dir in dirnames: + if excluded_directories.match(dir): + dirnames.remove(dir) + + print(f'{files} files found.') + return matching_files + + def _get_file_contents(self, filepath): try: with open(filepath, encoding='utf8') as f: return f.read() except UnicodeDecodeError: - print(f'Unable to read license file: {filepath}') + print(f'Unable to read file: {filepath}') pass def create_license_file(self, licenses, filepath='NOTICES.txt'): @@ -89,18 +117,44 @@ class LicenseScanner: :param licenses: Dict with package paths and their corresponding license file contents :param filepath: Path to write the file - """ - package_separator = '------------------------------------' - with open(filepath, 'w', encoding='utf8') as f: + """ + license_separator = '------------------------------------' + with open(filepath, 'w', encoding='utf8') as lf: for directory, license in licenses.items(): - license_output = '\n\n'.join([ - f'{package_separator}', - f'Package path: {directory}', - 'License:', - f'{license}\n' - ]) - f.write(license_output) + if not self.package_info.match(os.path.basename(directory)): + license_output = '\n\n'.join([ + f'{license_separator}', + f'Package path: {os.path.relpath(directory)}', + 'License:', + f'{license}\n' + ]) + lf.write(license_output) return None + + def create_package_file(self, packages, filepath='SPDX-Licenses.json', get_contents=False): + """Creates file with all the provided SPDX package info summaries in json. + Optional dirpath parameter will follow the license file path in the package info and return its contents in a dictionary + + :param licenses: Dict with package info paths and their corresponding file contents + :param filepath: Path to write the file + :param dirpath: Root path for packages + :rtype: Ordered dict + """ + licenses = OrderedDict() + package_json = [] + + with open(filepath, 'w', encoding='utf8') as pf: + for directory, package in packages.items(): + if self.package_info.match(os.path.basename(directory)): + package_obj = json.loads(package) + package_json.append(package_obj) + if get_contents: + license_path = os.path.join(os.path.dirname(directory), pathlib.Path(package_obj['LicenseFile'])) + licenses[license_path] = self._get_file_contents(license_path) + else: + licenses[directory] = package + pf.write(json.dumps(package_json, indent=4)) + return licenses def parse_args(): @@ -108,7 +162,8 @@ def parse_args(): description='Script to run LicenseScanner and generate license file') parser.add_argument('--config-file', '-c', type=pathlib.Path, help='Config file for LicenseScanner') parser.add_argument('--license-file-path', '-l', type=pathlib.Path, help='Create license file in the provided path') - parser.add_argument('--scan-path', '-s', default=os.curdir, type=pathlib.Path, help='Path to scan') + parser.add_argument('--package-file-path', '-p', type=pathlib.Path, help='Create package summary file in the provided path') + parser.add_argument('--scan-path', '-s', default=os.curdir, type=pathlib.Path, nargs='+', help='Path to scan, multiple space separated paths can be used') return parser.parse_args() @@ -116,10 +171,15 @@ def main(): try: args = parse_args() ls = LicenseScanner(args.config_file) - licenses = ls.scan(args.scan_path) + scanned_path_data = ls.scan(args.scan_path) if args.license_file_path: - ls.create_license_file(licenses, args.license_file_path) + ls.create_license_file(scanned_path_data, args.license_file_path) + if args.package_file_path: + ls.create_package_file(scanned_path_data, args.package_file_path) + if args.license_file_path and args.package_file_path: + license_files = ls.create_package_file(scanned_path_data, args.package_file_path, True) + ls.create_license_file(license_files, args.license_file_path) except FileNotFoundError as e: print(f'Type: {type(e).__name__}, Error: {e}') return 1 diff --git a/scripts/license_scanner/scanner_config.json b/scripts/license_scanner/scanner_config.json index b5863a7d31..2e8f5206db 100644 --- a/scripts/license_scanner/scanner_config.json +++ b/scripts/license_scanner/scanner_config.json @@ -8,5 +8,8 @@ "license_patterns": [ "LICENSE*", "COPYING*" + ], + "package_patterns": [ + "PackageInfo.json" ] } diff --git a/scripts/o3de.py b/scripts/o3de.py index 05c3b53ba6..bf3bd32a52 100755 --- a/scripts/o3de.py +++ b/scripts/o3de.py @@ -7,20 +7,25 @@ # import argparse +import logging import pathlib import sys +logger = logging.getLogger('o3de') -def add_args(parser, subparsers) -> None: + +def add_args(parser: argparse.ArgumentParser) -> None: """ add_args is called to add expected parser arguments and subparsers arguments to each command such that it can be invoked by o3de.py Ex o3de.py can invoke the register downloadable commands by importing register, call add_args and execute: python o3de.py register --gem-path "C:/TestGem" - :param parser: the caller instantiates a parser and passes it in here - :param subparsers: the caller instantiates subparsers and passes it in here + :param parser: the caller instantiates an ArgumentParser and passes it in here """ + subparsers = parser.add_subparsers(help='To get help on a sub-command:\no3de.py -h', + title='Sub-Commands') + # As o3de.py shares the same name as the o3de package attempting to use a regular # from o3de import line tries to import from the current o3de.py script and not the package # So the {current script directory} / 'o3de' is added to the front of the sys.path @@ -28,24 +33,25 @@ def add_args(parser, subparsers) -> None: o3de_package_dir = (script_dir / 'o3de').resolve() # add the scripts/o3de directory to the front of the sys.path sys.path.insert(0, str(o3de_package_dir)) - from o3de import engine_properties, engine_template, gem_properties, global_project, register, print_registration, get_registration, \ + from o3de import engine_properties, engine_template, gem_properties, \ + global_project, register, print_registration, get_registration, \ enable_gem, disable_gem, project_properties, sha256, download # Remove the temporarily added path sys.path = sys.path[1:] - # global_project + # global project global_project.add_args(subparsers) - # engine templaate + # engine template engine_template.add_args(subparsers) - # register + # registration register.add_args(subparsers) - # show + # show registration print_registration.add_args(subparsers) - # get-registered + # get registration get_registration.add_args(subparsers) # add a gem to a project @@ -74,11 +80,8 @@ if __name__ == "__main__": # parse the command line args the_parser = argparse.ArgumentParser() - # add subparsers - the_subparsers = the_parser.add_subparsers(help='sub-command help') - # add args to the parser - add_args(the_parser, the_subparsers) + add_args(the_parser) # parse args the_args = the_parser.parse_args() @@ -89,7 +92,8 @@ if __name__ == "__main__": sys.exit(1) # run - ret = the_args.func(the_args) + ret = the_args.func(the_args) if hasattr(the_args, 'func') else 1 + logger.info('Success!' if ret == 0 else 'Completed with issues: result {}'.format(ret)) # return sys.exit(ret) diff --git a/scripts/o3de/README.txt b/scripts/o3de/README.txt index 07d23fab82..39817c2df7 100644 --- a/scripts/o3de/README.txt +++ b/scripts/o3de/README.txt @@ -23,7 +23,7 @@ INSTALL It is recommended to set up these these tools with O3DE's CMake build commands. Assuming CMake is already setup on your operating system, below are some sample build commands: cd /path/to/od3e/ - cmake -B windows_vs2019 -S . -G"Visual Studio 16" -DLY_3RDPARTY_PATH="%LY_3RDPARTY_PATH%" + cmake -B windows -S . -G"Visual Studio 16" To manually install the project in development mode using your own installed Python interpreter: cd /path/to/od3e/o3de diff --git a/scripts/o3de/o3de/cmake.py b/scripts/o3de/o3de/cmake.py index ffac496387..ec970d06f4 100644 --- a/scripts/o3de/o3de/cmake.py +++ b/scripts/o3de/o3de/cmake.py @@ -13,10 +13,10 @@ import logging import os import pathlib -from o3de import manifest +from o3de import manifest, utils -logger = logging.getLogger() -logging.basicConfig() +logger = logging.getLogger('o3de.cmake') +logging.basicConfig(format=utils.LOG_FORMAT) enable_gem_start_marker = 'set(ENABLED_GEMS' enable_gem_end_marker = ')' diff --git a/scripts/o3de/o3de/disable_gem.py b/scripts/o3de/o3de/disable_gem.py index 01324d8500..0b0e465d12 100644 --- a/scripts/o3de/o3de/disable_gem.py +++ b/scripts/o3de/o3de/disable_gem.py @@ -15,10 +15,10 @@ import os import pathlib import sys -from o3de import cmake, manifest +from o3de import cmake, manifest, utils -logger = logging.getLogger() -logging.basicConfig() +logger = logging.getLogger('o3de.disable_gem') +logging.basicConfig(format=utils.LOG_FORMAT) def disable_gem_in_project(gem_name: str = None, @@ -69,11 +69,10 @@ def disable_gem_in_project(gem_name: str = None, return 1 gem_path = pathlib.Path(gem_path).resolve() # make sure this gem already exists if we're adding. We can always remove a gem. - if not gem_path.is_dir(): + if not gem_path.exists(): logger.error(f'Gem Path {gem_path} does not exist.') return 1 - # Read gem.json from the gem path gem_json_data = manifest.get_gem_json_data(gem_path=gem_path, project_path=project_path) if not gem_json_data: @@ -116,6 +115,10 @@ def add_parser_args(parser): Ex. Directly run from this file alone with: python disable_gem.py --project-path D:/Test --gem-name Atom :param parser: the caller passes an argparse parser like instance to this method """ + + # Sub-commands should declare their own verbosity flag, if desired + utils.add_verbosity_arg(parser) + group = parser.add_mutually_exclusive_group(required=True) group.add_argument('-pp', '--project-path', type=pathlib.Path, required=False, help='The path to the project.') @@ -155,8 +158,6 @@ def main(): # parse the command line args the_parser = argparse.ArgumentParser() - # add subparsers - # add args to the parser add_parser_args(the_parser) @@ -165,6 +166,7 @@ def main(): # run ret = the_args.func(the_args) if hasattr(the_args, 'func') else 1 + logger.info('Success!' if ret == 0 else 'Completed with issues: result {}'.format(ret)) # return sys.exit(ret) diff --git a/scripts/o3de/o3de/download.py b/scripts/o3de/o3de/download.py index 98f5d051a4..8e28561e50 100644 --- a/scripts/o3de/o3de/download.py +++ b/scripts/o3de/o3de/download.py @@ -20,11 +20,13 @@ import sys import urllib.parse import urllib.request import zipfile +from datetime import datetime from o3de import manifest, repo, utils, validation, register -logger = logging.getLogger() -logging.basicConfig() +logger = logging.getLogger('o3de.download') +logging.basicConfig(format=utils.LOG_FORMAT) + def unzip_manifest_json_data(download_zip_path: pathlib.Path, zip_file_name: str) -> dict: json_data = {} @@ -37,36 +39,41 @@ def unzip_manifest_json_data(download_zip_path: pathlib.Path, zip_file_name: str return json_data + def validate_downloaded_zip_sha256(download_uri_json_data: dict, download_zip_path: pathlib.Path, manifest_json_name) -> int: # if the json has a sha256 check it against a sha256 of the zip try: sha256A = download_uri_json_data['sha256'] except KeyError as e: - logger.warn('SECURITY WARNING: The advertised o3de object you downloaded has no "sha256"!!! Be VERY careful!!!' + logger.warning('SECURITY WARNING: The advertised o3de object you downloaded has no "sha256"!!! Be VERY careful!!!' ' We cannot verify this is the actually the advertised object!!!') return 1 else: - sha256B = hashlib.sha256(download_zip_path.open('rb').read()).hexdigest() - if sha256A != sha256B: - logger.error(f'SECURITY VIOLATION: Downloaded zip sha256 {sha256B} does not match' - f' the advertised "sha256":{sha256A} in the f{manifest_json_name}.') - return 0 + if len(sha256A) == 0: + logger.warning('SECURITY WARNING: The advertised o3de object you downloaded has no "sha256"!!! Be VERY careful!!!' + ' We cannot verify this is the actually the advertised object!!!') + return 1 + + with download_zip_path.open('rb') as f: + sha256B = hashlib.sha256(f.read()).hexdigest() + if sha256A != sha256B: + logger.error(f'SECURITY VIOLATION: Downloaded zip sha256 {sha256B} does not match' + f' the advertised "sha256":{sha256A} in the f{manifest_json_name}.') + return 0 unzipped_manifest_json_data = unzip_manifest_json_data(download_zip_path, manifest_json_name) - # remove the sha256 if present in the advertised downloadable manifest json - # then compare it to the json in the zip, they should now be identical - try: - del download_uri_json_data['sha256'] - except KeyError as e: - pass + # do not include the data we know will not match/exist + for key in ['sha256','repo_name']: + if key in download_uri_json_data: + del download_uri_json_data[key] + if key in unzipped_manifest_json_data: + del unzipped_manifest_json_data[key] - sha256A = hashlib.sha256(json.dumps(download_uri_json_data, indent=4).encode('utf8')).hexdigest() - sha256B = hashlib.sha256(json.dumps(unzipped_manifest_json_data, indent=4).encode('utf8')).hexdigest() - if sha256A != sha256B: - logger.error('SECURITY VIOLATION: Downloaded manifest json does not match' - ' the advertised manifest json.') + if download_uri_json_data != unzipped_manifest_json_data: + logger.error(f'SECURITY VIOLATION: Downloaded {manifest_json_name} contents do not match' + ' the advertised manifest json contents.') return 0 return 1 @@ -88,10 +95,9 @@ def get_downloadable(engine_name: str = None, search_func = lambda manifest_json_data: repo.search_repo(manifest_json_data, engine_name, project_name, gem_name, template_name) return repo.search_o3de_object(manifest_json, o3de_object_uris, search_func) - def download_o3de_object(object_name: str, default_folder_name: str, dest_path: str or pathlib.Path, object_type: str, downloadable_kwarg_key, skip_auto_register: bool, - download_progress_callback = None) -> int: + force_overwrite: bool, download_progress_callback = None) -> int: download_path = manifest.get_o3de_cache_folder() / default_folder_name / object_name download_path.mkdir(parents=True, exist_ok=True) @@ -102,10 +108,10 @@ def download_o3de_object(object_name: str, default_folder_name: str, dest_path: logger.error(f'Downloadable o3de object {object_name} not found.') return 1 - origin_uri = downloadable_object_data['originuri'] + origin_uri = downloadable_object_data['origin_uri'] parsed_uri = urllib.parse.urlparse(origin_uri) - download_zip_result = utils.download_zip_file(parsed_uri, download_zip_path, download_progress_callback) + download_zip_result = utils.download_zip_file(parsed_uri, download_zip_path, force_overwrite, download_progress_callback) if download_zip_result != 0: return download_zip_result @@ -125,8 +131,15 @@ def download_o3de_object(object_name: str, default_folder_name: str, dest_path: logger.error(f'Destination path cannot be empty.') return 1 if dest_path.exists(): - logger.error(f'Destination path {dest_path} already exists.') - return 1 + if not force_overwrite: + logger.error(f'Destination path {dest_path} already exists.') + return 1 + else: + try: + shutil.rmtree(dest_path) + except OSError: + logger.error(f'Could not remove existing destination path {dest_path}.') + return 1 dest_path.mkdir(exist_ok=True) @@ -149,38 +162,119 @@ def download_o3de_object(object_name: str, default_folder_name: str, dest_path: def download_engine(engine_name: str, dest_path: str or pathlib.Path, skip_auto_register: bool, + force_overwrite: bool, download_progress_callback = None) -> int: - return download_o3de_object(engine_name, 'engines', dest_path, 'engine', 'engine_name', skip_auto_register, download_progress_callback) + return download_o3de_object(engine_name, + 'engines', + dest_path, + 'engine', + 'engine_name', + skip_auto_register, + force_overwrite, + download_progress_callback) def download_project(project_name: str, dest_path: str or pathlib.Path, skip_auto_register: bool, + force_overwrite: bool, download_progress_callback = None) -> int: - return download_o3de_object(project_name, 'projects', dest_path, 'project', 'project_name', skip_auto_register, download_progress_callback) + return download_o3de_object(project_name, + 'projects', + dest_path, + 'project', + 'project_name', + skip_auto_register, + force_overwrite, + download_progress_callback) def download_gem(gem_name: str, dest_path: str or pathlib.Path, skip_auto_register: bool, + force_overwrite: bool, download_progress_callback = None) -> int: - return download_o3de_object(gem_name, 'gems', dest_path, 'gem', 'gem_name', skip_auto_register, download_progress_callback) + return download_o3de_object(gem_name, + 'gems', + dest_path, + 'gem', + 'gem_name', + skip_auto_register, + force_overwrite, + download_progress_callback) def download_template(template_name: str, dest_path: str or pathlib.Path, skip_auto_register: bool, + force_overwrite: bool, download_progress_callback = None) -> int: - return download_o3de_object(template_name, 'templates', dest_path, 'template', 'template_name', skip_auto_register, download_progress_callback) + return download_o3de_object(template_name, + 'templates', + dest_path, + 'template', + 'template_name', + skip_auto_register, + force_overwrite, + download_progress_callback) def download_restricted(restricted_name: str, dest_path: str or pathlib.Path, skip_auto_register: bool, + force_overwrite: bool, download_progress_callback = None) -> int: - return download_o3de_object(restricted_name, 'restricted', dest_path, 'restricted', 'restricted_name', skip_auto_register, download_progress_callback) + return download_o3de_object(restricted_name, + 'restricted', + dest_path, + 'restricted', + 'restricted_name', + skip_auto_register, + force_overwrite, + download_progress_callback) +def is_o3de_object_update_available(object_name: str, downloadable_kwarg_key, local_last_updated: str) -> bool: + downloadable_object_data = get_downloadable(**{downloadable_kwarg_key : object_name}) + if not downloadable_object_data: + logger.error(f'Downloadable o3de object {object_name} not found.') + return False + + try: + repo_copy_updated_string = downloadable_object_data['last_updated'] + except KeyError: + logger.warning(f'last_updated field not found for {object_name}.') + return False + + try: + local_last_updated_time = datetime.fromisoformat(local_last_updated) + except ValueError: + logger.warning(f'last_updated field has incorrect format for local copy of {downloadable_kwarg_key} {object_name}.') + # Possible that an earlier version did not have this field so still want to check against cached downloadable version + local_last_updated_time = datetime.min + + try: + repo_copy_updated_date = datetime.fromisoformat(repo_copy_updated_string) + except ValueError: + logger.error(f'last_updated field in incorrect format for repository copy of {downloadable_kwarg_key} {object_name}.') + return False + + return repo_copy_updated_date > local_last_updated_time + +def is_o3de_engine_update_available(engine_name: str, local_last_updated: str): + return is_o3de_object_update_available(engine_name, 'engine_name', local_last_updated) + +def is_o3de_project_update_available(project_name: str, local_last_updated: str): + return is_o3de_object_update_available(project_name, 'project_name', local_last_updated) + +def is_o3de_gem_update_available(gem_name: str, local_last_updated: str): + return is_o3de_object_update_available(gem_name, 'gem_name', local_last_updated) + +def is_o3de_template_update_available(template_name: str, local_last_updated: str): + return is_o3de_object_update_available(template_name, 'template_name', local_last_updated) + +def is_o3de_restricted_update_available(restricted_name: str, local_last_updated: str): + return is_o3de_object_update_available(restricted_name, 'restricted_name', local_last_updated) def _run_download(args: argparse) -> int: if args.override_home_folder: @@ -189,19 +283,23 @@ def _run_download(args: argparse) -> int: if args.engine_name: return download_engine(args.engine_name, args.dest_path, - args.skip_auto_register) + args.skip_auto_register, + args.force) elif args.project_name: return download_project(args.project_name, args.dest_path, - args.skip_auto_register) + args.skip_auto_register, + args.force) elif args.gem_name: return download_gem(args.gem_name, args.dest_path, - args.skip_auto_register) + args.skip_auto_register, + args.force) elif args.template_name: return download_template(args.template_name, args.dest_path, - args.skip_auto_register) + args.skip_auto_register, + args.force) return 1 @@ -230,6 +328,9 @@ def add_parser_args(parser): parser.add_argument('-sar', '--skip-auto-register', action='store_true', required=False, default=False, help = 'Skip the automatic registration of new object download') + parser.add_argument('-f', '--force', action='store_true', required=False, + default=False, + help = 'Force overwrite the current object') parser.add_argument('-ohf', '--override-home-folder', type=str, required=False, help='By default the home folder is the user folder, override it to this folder.') diff --git a/scripts/o3de/o3de/enable_gem.py b/scripts/o3de/o3de/enable_gem.py index 1614dc4eda..fc4dc6e9cf 100644 --- a/scripts/o3de/o3de/enable_gem.py +++ b/scripts/o3de/o3de/enable_gem.py @@ -16,10 +16,10 @@ import os import pathlib import sys -from o3de import cmake, manifest, register, validation +from o3de import cmake, manifest, register, validation, utils -logger = logging.getLogger() -logging.basicConfig() +logger = logging.getLogger('o3de.enable_gem') +logging.basicConfig(format=utils.LOG_FORMAT) def enable_gem_in_project(gem_name: str = None, @@ -132,6 +132,10 @@ def add_parser_args(parser): Ex. Directly run from this file alone with: python enable_gem.py --project-path "D:/TestProject" --gem-path "D:/TestGem" :param parser: the caller passes an argparse parser like instance to this method """ + + # Sub-commands should declare their own verbosity flag, if desired + utils.add_verbosity_arg(parser) + group = parser.add_mutually_exclusive_group(required=True) group.add_argument('-pp', '--project-path', type=pathlib.Path, required=False, help='The path to the project.') @@ -171,8 +175,6 @@ def main(): # parse the command line args the_parser = argparse.ArgumentParser() - # add subparsers - # add args to the parser add_parser_args(the_parser) @@ -181,6 +183,7 @@ def main(): # run ret = the_args.func(the_args) if hasattr(the_args, 'func') else 1 + logger.info('Success!' if ret == 0 else 'Completed with issues: result {}'.format(ret)) # return sys.exit(ret) diff --git a/scripts/o3de/o3de/engine_properties.py b/scripts/o3de/o3de/engine_properties.py index 92930dbb1c..636e32704e 100644 --- a/scripts/o3de/o3de/engine_properties.py +++ b/scripts/o3de/o3de/engine_properties.py @@ -15,8 +15,9 @@ import logging from o3de import manifest, utils -logger = logging.getLogger() -logging.basicConfig() +logger = logging.getLogger('o3de.engine_properties') +logging.basicConfig(format=utils.LOG_FORMAT) + def edit_engine_props(engine_path: pathlib.Path = None, engine_name: str = None, @@ -25,6 +26,11 @@ def edit_engine_props(engine_path: pathlib.Path = None, if not engine_path and not engine_name: logger.error(f'Either a engine path or a engine name must be supplied to lookup engine.json') return 1 + + if not new_name and not new_version: + logger.error('A new engine name or new version, or both must be supplied.') + return 1 + if not engine_path: engine_path = manifest.get_registered(engine_name=engine_name) diff --git a/scripts/o3de/o3de/engine_template.py b/scripts/o3de/o3de/engine_template.py index e93f972301..6b2e098cf0 100755 --- a/scripts/o3de/o3de/engine_template.py +++ b/scripts/o3de/o3de/engine_template.py @@ -20,8 +20,8 @@ import re from o3de import manifest, register, validation, utils -logger = logging.getLogger() -logging.basicConfig() +logger = logging.getLogger('o3de.engine_template') +logging.basicConfig(format=utils.LOG_FORMAT) binary_file_ext = { '.pak', @@ -86,6 +86,7 @@ restricted_platforms = { template_file_name = 'template.json' this_script_parent = pathlib.Path(os.path.dirname(os.path.realpath(__file__))) + def _replace_license_text(source_data: str): while '{BEGIN_LICENSE}' in source_data: start = source_data.find('{BEGIN_LICENSE}') @@ -181,7 +182,7 @@ def _execute_template_json(json_data: dict, # regular copy if not templated for copy_file in json_data['copyFiles']: # construct the input file name - in_file = template_path / 'Template' /copy_file['file'] + in_file = template_path / 'Template' / copy_file['file'] # the file can be marked as optional, if it is and it does not exist skip if copy_file['isOptional'] and copy_file['isOptional'] == 'true': @@ -246,7 +247,7 @@ def _execute_restricted_template_json(json_data: dict, for copy_file in json_data['copyFiles']: # construct the input file name in_file = template_restricted_path / restricted_platform / template_restricted_platform_relative_path\ - / template_name / 'Template'/ copy_file['file'] + / template_name / 'Template' / copy_file['file'] # the file can be marked as optional, if it is and it does not exist skip if copy_file['isOptional'] and copy_file['isOptional'] == 'true': @@ -364,7 +365,7 @@ def create_template(source_path: pathlib.Path, keep_restricted_in_template: bool = False, keep_license_text: bool = False, replace: list = None, - force: bool = False) -> int: + force: bool = False) -> int: """ Create a template from a source directory using replacement @@ -1113,7 +1114,7 @@ def create_from_template(destination_path: pathlib.Path, try: template_json_data = json.load(s) except KeyError as e: - logger.error(f'Could read template json {template_json}: {str(e)}.') + logger.error(f'Could not read template json {template_json}: {str(e)}.') return 1 # read template name from the json @@ -1205,12 +1206,12 @@ def create_from_template(destination_path: pathlib.Path, # something is wrong with either the --template-restricted-platform-relative or the template is. if template_restricted_platform_relative_path != template_json_restricted_platform_relative_path: logger.error(f'The supplied --template-restricted-platform-relative-path' - f' "{template_restricted_platform_relative_path}" does not match the' - f' templates.json "restricted_platform_relative_path". Either' - f' --template-restricted-platform-relative-path is incorrect or the templates' - f' "restricted_platform_relative_path" is wrong. Note that since this template' - f' specifies "restricted_platform_relative_path" it need not be supplied and' - f' "{template_json_restricted_platform_relative_path}" will be used.') + f' "{template_restricted_platform_relative_path}" does not match the' + f' templates.json "restricted_platform_relative_path". Either' + f' --template-restricted-platform-relative-path is incorrect or the templates' + f' "restricted_platform_relative_path" is wrong. Note that since this template' + f' specifies "restricted_platform_relative_path" it need not be supplied and' + f' "{template_json_restricted_platform_relative_path}" will be used.') return 1 else: # The user has not supplied --template-restricted-platform-relative-path, try to read it from @@ -1306,7 +1307,7 @@ def create_from_template(destination_path: pathlib.Path, os.makedirs(destination_restricted_path, exist_ok=True) # read the restricted_name from the destination restricted.json - restricted_json = destination_restricted_path / restricted.json + restricted_json = destination_restricted_path / 'restricted.json' if not os.path.isfile(restricted_json): with open(restricted_json, 'w') as s: restricted_json_data = {} @@ -1338,7 +1339,8 @@ def create_project(project_path: pathlib.Path, no_register: bool = False, system_component_class_id: str = None, editor_system_component_class_id: str = None, - module_id: str = None) -> int: + module_id: str = None, + project_id: str = None) -> int: """ Template instantiation specialization that makes all default assumptions for a Project template instantiation, reducing the effort needed in instancing a project @@ -1366,6 +1368,7 @@ def create_project(project_path: pathlib.Path, :param editor_system_component_class_id: optionally specify a uuid for the editor system component class, default is random uuid :param module_id: optionally specify a uuid for the module class, default is random uuid + :param project_id: optionally specify a str for the project id, default is random uuid :return: 0 for success or non 0 failure code """ if template_name and template_path: @@ -1405,7 +1408,7 @@ def create_project(project_path: pathlib.Path, try: template_json_data = json.load(s) except json.JSONDecodeError as e: - logger.error(f'Could read template json {template_json}: {str(e)}.') + logger.error(f'Could not read template json {template_json}: {str(e)}.') return 1 # read template name from the json @@ -1577,6 +1580,12 @@ def create_project(project_path: pathlib.Path, replacements.append(("${NameLower}", project_name.lower())) replacements.append(("${SanitizedCppName}", sanitized_cpp_name)) + # was a project id specified + if project_id: + replacements.append(("${ProjectId}", project_id)) + else: + replacements.append(("${ProjectId}", '{' + str(uuid.uuid4()) + '}')) + # module id is a uuid with { and - if module_id: replacements.append(("${ModuleClassId}", module_id)) @@ -1784,7 +1793,7 @@ def create_gem(gem_path: pathlib.Path, try: template_json_data = json.load(s) except json.JSONDecodeError as e: - logger.error(f'Could read template json {template_json}: {str(e)}.') + logger.error(f'Could not read template json {template_json}: {str(e)}.') return 1 # read template name from the json @@ -1956,7 +1965,6 @@ def create_gem(gem_path: pathlib.Path, replacements.append(("${NameLower}", gem_name.lower())) replacements.append(("${SanitizedCppName}", sanitized_cpp_name)) - # module id is a uuid with { and - if module_id: replacements.append(("${ModuleClassId}", module_id)) @@ -2123,7 +2131,8 @@ def _run_create_project(args: argparse) -> int: args.no_register, args.system_component_class_id, args.editor_system_component_class_id, - args.module_id) + args.module_id, + args.project_id) def _run_create_gem(args: argparse) -> int: @@ -2157,8 +2166,13 @@ def add_args(subparsers) -> None: call add_args and execute: python o3de.py create-gem --gem-path TestGem :param subparsers: the caller instantiates subparsers and passes it in here """ + # turn a directory into a template create_template_subparser = subparsers.add_parser('create-template') + + # Sub-commands should declare their own verbosity flag, if desired + utils.add_verbosity_arg(create_template_subparser) + create_template_subparser.add_argument('-sp', '--source-path', type=pathlib.Path, required=True, help='The path to the source that you want to make into a template') create_template_subparser.add_argument('-tp', '--template-path', type=pathlib.Path, required=False, @@ -2233,6 +2247,10 @@ def add_args(subparsers) -> None: # create from template create_from_template_subparser = subparsers.add_parser('create-from-template') + + # Sub-commands should declare their own verbosity flag, if desired + utils.add_verbosity_arg(create_from_template_subparser) + create_from_template_subparser.add_argument('-dp', '--destination-path', type=pathlib.Path, required=True, help='The path to where you want the template instantiated,' ' can be absolute or relative to the current working directory.' @@ -2316,6 +2334,10 @@ def add_args(subparsers) -> None: # creation of a project from a template (like create from template but makes project assumptions) create_project_subparser = subparsers.add_parser('create-project') + + # Sub-commands should declare their own verbosity flag, if desired + utils.add_verbosity_arg(create_project_subparser) + create_project_subparser.add_argument('-pp', '--project-path', type=pathlib.Path, required=True, help='The location of the project you wish to create from the template,' ' can be an absolute path or relative to the current working directory.' @@ -2330,7 +2352,7 @@ def add_args(subparsers) -> None: group = create_project_subparser.add_mutually_exclusive_group(required=False) group.add_argument('-tp', '--template-path', type=pathlib.Path, required=False, default=None, - help='the path to the template you want to instance, can be absolute or' + help='The path to the template you want to instance, can be absolute or' ' relative to default templates path') group.add_argument('-tn', '--template-name', type=str, required=False, default=None, @@ -2340,7 +2362,7 @@ def add_args(subparsers) -> None: group = create_project_subparser.add_mutually_exclusive_group(required=False) group.add_argument('-prp', '--project-restricted-path', type=pathlib.Path, required=False, default=None, - help='path to the projects restricted folder, can be absolute or relative to' + help='The path to the projects restricted folder, can be absolute or relative to' ' the default restricted projects directory') group.add_argument('-prn', '--project-restricted-name', type=str, required=False, default=None, @@ -2351,7 +2373,7 @@ def add_args(subparsers) -> None: group.add_argument('-trp', '--template-restricted-path', type=pathlib.Path, required=False, default=None, help='The templates restricted path can be absolute or relative to' - 'the default restricted templates directory') + ' the default restricted templates directory') group.add_argument('-trn', '--template-restricted-name', type=str, required=False, default=None, help='The name of the registered templates restricted path. If supplied this will resolve' @@ -2404,6 +2426,9 @@ def add_args(subparsers) -> None: create_project_subparser.add_argument('--module-id', type=uuid.UUID, required=False, help='The uuid you want to associate with the module, default is a random' ' uuid Ex. {b60c92eb-3139-454b-a917-a9d3c5819594}') + create_project_subparser.add_argument('--project-id', type=str, required=False, + help='The str id you want to associate with the project, default is a random uuid' + ' Ex. {b60c92eb-3139-454b-a917-a9d3c5819594}') create_project_subparser.add_argument('-f', '--force', action='store_true', default=False, help='Copies over instantiated template directory even if it exist.') create_project_subparser.add_argument('--no-register', action='store_true', default=False, @@ -2413,6 +2438,10 @@ def add_args(subparsers) -> None: # creation of a gem from a template (like create from template but makes gem assumptions) create_gem_subparser = subparsers.add_parser('create-gem') + + # Sub-commands should declare their own verbosity flag, if desired + utils.add_verbosity_arg(create_gem_subparser) + create_gem_subparser.add_argument('-gp', '--gem-path', type=pathlib.Path, required=True, help='The gem path, can be absolute or relative to the current working directory') create_gem_subparser.add_argument('-gn', '--gem-name', type=str, @@ -2512,16 +2541,18 @@ if __name__ == "__main__": the_parser = argparse.ArgumentParser() # add subparsers - the_subparsers = the_parser.add_subparsers(help='sub-command help', dest='command', required=True) + subparsers = the_parser.add_subparsers(help='To get help on a sub-command:\nengine_template.py -h', + title='Sub-Commands', dest='command', required=True) - # add args to the parser - add_args(the_subparsers) + # add args to the parsers + add_args(subparsers) # parse args the_args = the_parser.parse_args() # run ret = the_args.func(the_args) if hasattr(the_args, 'func') else 1 + logger.info('Success!' if ret == 0 else 'Completed with issues: result {}'.format(ret)) # return sys.exit(ret) diff --git a/scripts/o3de/o3de/gem_properties.py b/scripts/o3de/o3de/gem_properties.py index 39011a213a..423dc47115 100644 --- a/scripts/o3de/o3de/gem_properties.py +++ b/scripts/o3de/o3de/gem_properties.py @@ -15,8 +15,8 @@ import logging from o3de import manifest, utils -logger = logging.getLogger() -logging.basicConfig() +logger = logging.getLogger('o3de.gem_properties') +logging.basicConfig(format=utils.LOG_FORMAT) def update_values_in_key_list(existing_values: list, new_values: list or str, remove_values: list or str, @@ -54,6 +54,8 @@ def edit_gem_props(gem_path: pathlib.Path = None, new_icon: str = None, new_requirements: str = None, new_documentation_url: str = None, + new_license: str = None, + new_license_url: str = None, new_tags: list or str = None, remove_tags: list or str = None, replace_tags: list or str = None, @@ -94,6 +96,10 @@ def edit_gem_props(gem_path: pathlib.Path = None, update_key_dict['requirements'] = new_requirements if new_documentation_url: update_key_dict['documentation_url'] = new_documentation_url + if new_license: + update_key_dict['license'] = new_license + if new_license_url: + update_key_dict['license_url'] = new_license_url update_key_dict['user_tags'] = update_values_in_key_list(gem_json_data.get('user_tags', []), new_tags, remove_tags, replace_tags) @@ -114,6 +120,8 @@ def _edit_gem_props(args: argparse) -> int: args.gem_icon, args.gem_requirements, args.gem_documentation_url, + args.gem_license, + args.gem_license_url, args.add_tags, args.remove_tags, args.replace_tags) @@ -142,6 +150,10 @@ def add_parser_args(parser): help='Sets the description of the requirements needed to use the gem.') group.add_argument('-gdu', '--gem-documentation-url', type=str, required=False, help='Sets the url for documentation of the gem.') + group.add_argument('-gl', '--gem-license', type=str, required=False, + help='Sets the name for the license of the gem.') + group.add_argument('-glu', '--gem-license-url', type=str, required=False, + help='Sets the url for the license of the gem.') group = parser.add_mutually_exclusive_group(required=False) group.add_argument('-at', '--add-tags', type=str, nargs='*', required=False, help='Adds tag(s) to user_tags property. Can be specified multiple times.') diff --git a/scripts/o3de/o3de/get_registration.py b/scripts/o3de/o3de/get_registration.py index 8b8d53a8b0..d64056e8b2 100644 --- a/scripts/o3de/o3de/get_registration.py +++ b/scripts/o3de/o3de/get_registration.py @@ -12,17 +12,23 @@ import sys from o3de import manifest -def _run_get_registered(args: argparse) -> str or pathlib.Path: + +def _run_get_registered(args: argparse) -> int: if args.override_home_folder: manifest.override_home_folder = args.override_home_folder - return manifest.get_registered(args.engine_name, - args.project_name, - args.gem_name, - args.template_name, - args.default_folder, - args.repo_name, - args.restricted_name) + registered_path = manifest.get_registered(args.engine_name, + args.project_name, + args.gem_name, + args.template_name, + args.default_folder, + args.repo_name, + args.restricted_name) + # If a path has been found return 0 + if registered_path: + print(registered_path) + return 0 + return 1 def add_parser_args(parser): diff --git a/scripts/o3de/o3de/global_project.py b/scripts/o3de/o3de/global_project.py index 9463306912..7ff90bead4 100644 --- a/scripts/o3de/o3de/global_project.py +++ b/scripts/o3de/o3de/global_project.py @@ -14,14 +14,15 @@ import re import pathlib import json -from o3de import manifest, validation +from o3de import manifest, validation, utils -logger = logging.getLogger() -logging.basicConfig() +logger = logging.getLogger('o3de.global_project') +logging.basicConfig(format=utils.LOG_FORMAT) DEFAULT_BOOTSTRAP_SETREG = pathlib.Path('~/.o3de/Registry/bootstrap.setreg').expanduser() PROJECT_PATH_KEY = ('Amazon', 'AzCore', 'Bootstrap', 'project_path') + def get_json_data(input_path: pathlib.Path): setreg_json_data = {} # If the output_path exist validate that it is a valid json file diff --git a/scripts/o3de/o3de/manifest.py b/scripts/o3de/o3de/manifest.py index 297d8e39d2..a334109e6a 100644 --- a/scripts/o3de/o3de/manifest.py +++ b/scripts/o3de/o3de/manifest.py @@ -18,8 +18,8 @@ import hashlib from o3de import validation, utils -logger = logging.getLogger() -logging.basicConfig() +logger = logging.getLogger('o3de.manifest') +logging.basicConfig(format=utils.LOG_FORMAT) # Directory methods override_home_folder = None @@ -41,6 +41,7 @@ def get_o3de_folder() -> pathlib.Path: o3de_folder.mkdir(parents=True, exist_ok=True) return o3de_folder + def get_o3de_user_folder() -> pathlib.Path: o3de_user_folder = get_home_folder() / 'O3DE' o3de_user_folder.mkdir(parents=True, exist_ok=True) @@ -108,75 +109,80 @@ def get_o3de_third_party_folder() -> pathlib.Path: # o3de manifest file methods +def get_default_o3de_manifest_json_data() -> dict: + """ + Returns dict with default values suitable for storing + in the o3de_manifests.json + """ + username = os.path.split(get_home_folder())[-1] + + o3de_folder = get_o3de_folder() + default_engines_folder = get_o3de_engines_folder() + default_projects_folder = get_o3de_projects_folder() + default_gems_folder = get_o3de_gems_folder() + default_templates_folder = get_o3de_templates_folder() + default_restricted_folder = get_o3de_restricted_folder() + default_third_party_folder = get_o3de_third_party_folder() + + default_projects_restricted_folder = default_projects_folder / 'Restricted' + default_projects_restricted_folder.mkdir(parents=True, exist_ok=True) + default_gems_restricted_folder = default_gems_folder / 'Restricted' + default_gems_restricted_folder.mkdir(parents=True, exist_ok=True) + default_templates_restricted_folder = default_templates_folder / 'Restricted' + default_templates_restricted_folder.mkdir(parents=True, exist_ok=True) + + json_data = {} + json_data.update({'o3de_manifest_name': f'{username}'}) + json_data.update({'origin': o3de_folder.as_posix()}) + json_data.update({'default_engines_folder': default_engines_folder.as_posix()}) + json_data.update({'default_projects_folder': default_projects_folder.as_posix()}) + json_data.update({'default_gems_folder': default_gems_folder.as_posix()}) + json_data.update({'default_templates_folder': default_templates_folder.as_posix()}) + json_data.update({'default_restricted_folder': default_restricted_folder.as_posix()}) + json_data.update({'default_third_party_folder': default_third_party_folder.as_posix()}) + + json_data.update({'engines': []}) + json_data.update({'projects': []}) + json_data.update({'external_subdirectories': []}) + json_data.update({'templates': []}) + json_data.update({'restricted': []}) + json_data.update({'repos': []}) + + default_restricted_folder_json = default_restricted_folder / 'restricted.json' + if not default_restricted_folder_json.is_file(): + with default_restricted_folder_json.open('w') as s: + restricted_json_data = {} + restricted_json_data.update({'restricted_name': 'o3de'}) + s.write(json.dumps(restricted_json_data, indent=4) + '\n') + + default_projects_restricted_folder_json = default_projects_restricted_folder / 'restricted.json' + if not default_projects_restricted_folder_json.is_file(): + with default_projects_restricted_folder_json.open('w') as s: + restricted_json_data = {} + restricted_json_data.update({'restricted_name': 'projects'}) + s.write(json.dumps(restricted_json_data, indent=4) + '\n') + + default_gems_restricted_folder_json = default_gems_restricted_folder / 'restricted.json' + if not default_gems_restricted_folder_json.is_file(): + with default_gems_restricted_folder_json.open('w') as s: + restricted_json_data = {} + restricted_json_data.update({'restricted_name': 'gems'}) + s.write(json.dumps(restricted_json_data, indent=4) + '\n') + + default_templates_restricted_folder_json = default_templates_restricted_folder / 'restricted.json' + if not default_templates_restricted_folder_json.is_file(): + with default_templates_restricted_folder_json.open('w') as s: + restricted_json_data = {} + restricted_json_data.update({'restricted_name': 'templates'}) + s.write(json.dumps(restricted_json_data, indent=4) + '\n') + + return json_data + + def get_o3de_manifest() -> pathlib.Path: manifest_path = get_o3de_folder() / 'o3de_manifest.json' if not manifest_path.is_file(): - username = os.path.split(get_home_folder())[-1] - - o3de_folder = get_o3de_folder() - default_registry_folder = get_o3de_registry_folder() - default_cache_folder = get_o3de_cache_folder() - default_downloads_folder = get_o3de_download_folder() - default_logs_folder = get_o3de_logs_folder() - default_engines_folder = get_o3de_engines_folder() - default_projects_folder = get_o3de_projects_folder() - default_gems_folder = get_o3de_gems_folder() - default_templates_folder = get_o3de_templates_folder() - default_restricted_folder = get_o3de_restricted_folder() - default_third_party_folder = get_o3de_third_party_folder() - - default_projects_restricted_folder = default_projects_folder / 'Restricted' - default_projects_restricted_folder.mkdir(parents=True, exist_ok=True) - default_gems_restricted_folder = default_gems_folder / 'Restricted' - default_gems_restricted_folder.mkdir(parents=True, exist_ok=True) - default_templates_restricted_folder = default_templates_folder / 'Restricted' - default_templates_restricted_folder.mkdir(parents=True, exist_ok=True) - - json_data = {} - json_data.update({'o3de_manifest_name': f'{username}'}) - json_data.update({'origin': o3de_folder.as_posix()}) - json_data.update({'default_engines_folder': default_engines_folder.as_posix()}) - json_data.update({'default_projects_folder': default_projects_folder.as_posix()}) - json_data.update({'default_gems_folder': default_gems_folder.as_posix()}) - json_data.update({'default_templates_folder': default_templates_folder.as_posix()}) - json_data.update({'default_restricted_folder': default_restricted_folder.as_posix()}) - json_data.update({'default_third_party_folder': default_third_party_folder.as_posix()}) - - json_data.update({'engines': []}) - json_data.update({'projects': []}) - json_data.update({'external_subdirectories': []}) - json_data.update({'templates': []}) - json_data.update({'restricted': []}) - json_data.update({'repos': []}) - - default_restricted_folder_json = default_restricted_folder / 'restricted.json' - if not default_restricted_folder_json.is_file(): - with default_restricted_folder_json.open('w') as s: - restricted_json_data = {} - restricted_json_data.update({'restricted_name': 'o3de'}) - s.write(json.dumps(restricted_json_data, indent=4) + '\n') - json_data.update({'default_restricted_folder': default_restricted_folder.as_posix()}) - - default_projects_restricted_folder_json = default_projects_restricted_folder / 'restricted.json' - if not default_projects_restricted_folder_json.is_file(): - with default_projects_restricted_folder_json.open('w') as s: - restricted_json_data = {} - restricted_json_data.update({'restricted_name': 'projects'}) - s.write(json.dumps(restricted_json_data, indent=4) + '\n') - - default_gems_restricted_folder_json = default_gems_restricted_folder / 'restricted.json' - if not default_gems_restricted_folder_json.is_file(): - with default_gems_restricted_folder_json.open('w') as s: - restricted_json_data = {} - restricted_json_data.update({'restricted_name': 'gems'}) - s.write(json.dumps(restricted_json_data, indent=4) + '\n') - - default_templates_restricted_folder_json = default_templates_restricted_folder / 'restricted.json' - if not default_templates_restricted_folder_json.is_file(): - with default_templates_restricted_folder_json.open('w') as s: - restricted_json_data = {} - restricted_json_data.update({'restricted_name': 'templates'}) - s.write(json.dumps(restricted_json_data, indent=4) + '\n') + json_data = get_default_o3de_manifest_json_data() with manifest_path.open('w') as s: s.write(json.dumps(json_data, indent=4) + '\n') @@ -188,6 +194,7 @@ def load_o3de_manifest(manifest_path: pathlib.Path = None) -> dict: """ Loads supplied manifest file or ~/.o3de/o3de_manifest.json if None + raises Json.JSONDecodeError if manifest data could not be decoded to JSON :param manifest_path: optional path to manifest file to load """ if not manifest_path: @@ -196,8 +203,10 @@ def load_o3de_manifest(manifest_path: pathlib.Path = None) -> dict: try: json_data = json.load(f) except json.JSONDecodeError as e: - logger.error(f'Manifest json failed to load: {str(e)}') - return {} + logger.error(f'Manifest json failed to load at path "{manifest_path}": {str(e)}') + # Re-raise the exception and let the caller + # determine if they can proceed + raise else: return json_data @@ -221,11 +230,11 @@ def save_o3de_manifest(json_data: dict, manifest_path: pathlib.Path = None) -> b def get_gems_from_subdirectories(external_subdirs: list) -> list: - ''' + """ Helper Method for scanning a set of external subdirectories for gem.json files - ''' + """ def is_gem_subdirectory(subdir_files): - for name in files: + for name in subdir_files: if name == 'gem.json': return True return False @@ -278,13 +287,14 @@ def get_repos() -> list: json_data = load_o3de_manifest() return json_data['repos'] if 'repos' in json_data else [] + # engine.json queries def get_engine_projects() -> list: engine_path = get_this_engine_path() engine_object = get_engine_json_data(engine_path=engine_path) if engine_object: return list(map(lambda rel_path: (pathlib.Path(engine_path) / rel_path).as_posix(), - engine_object['projects'])) if 'projects' in engine_object else [] + engine_object['projects'])) if 'projects' in engine_object else [] return [] @@ -306,7 +316,7 @@ def get_engine_templates() -> list: engine_object = get_engine_json_data(engine_path=engine_path) if engine_object: return list(map(lambda rel_path: (pathlib.Path(engine_path) / rel_path).as_posix(), - engine_object['templates'])) if 'templates' in engine_object else [] + engine_object['templates'])) if 'templates' in engine_object else [] return [] @@ -320,6 +330,11 @@ def get_engine_restricted() -> list: # project.json queries +def get_project_engine_name(project_path: pathlib.Path) -> str or None: + project_object = get_project_json_data(project_path=project_path) + return project_object.get('engine', None) if project_object else None + + def get_project_gems(project_path: pathlib.Path) -> list: return get_gems_from_subdirectories(get_project_external_subdirectories(project_path)) @@ -328,7 +343,7 @@ def get_project_external_subdirectories(project_path: pathlib.Path) -> list: project_object = get_project_json_data(project_path=project_path) if project_object: return list(map(lambda rel_path: (pathlib.Path(project_path) / rel_path).as_posix(), - project_object['external_subdirectories'])) if 'external_subdirectories' in project_object else [] + project_object['external_subdirectories'])) if 'external_subdirectories' in project_object else [] return [] @@ -336,7 +351,7 @@ def get_project_templates(project_path: pathlib.Path) -> list: project_object = get_project_json_data(project_path=project_path) if project_object: return list(map(lambda rel_path: (pathlib.Path(project_path) / rel_path).as_posix(), - project_object['templates'])) if 'templates' in project_object else [] + project_object['templates'])) if 'templates' in project_object else [] return [] @@ -426,6 +441,7 @@ def get_templates_for_generic_creation(): # temporary until we have a better wa return list(filter(filter_project_and_gem_templates_out, get_all_templates())) + def get_json_file_path(object_typename: str, object_path: str or pathlib.Path) -> pathlib.Path: if not object_typename or not object_path: @@ -455,12 +471,13 @@ def get_json_data_file(object_json: pathlib.Path, try: object_json_data = json.load(f) except json.JSONDecodeError as e: - logger.warn(f'{object_json} failed to load: {e}') + logger.warning(f'{object_json} failed to load: {e}') else: return object_json_data return None + def get_json_data(object_typename: str, object_path: str or pathlib.Path, object_validator: callable) -> dict or None: @@ -531,6 +548,7 @@ def get_restricted_json_data(restricted_name: str = None, restricted_path: str o return get_json_data('restricted', restricted_path, validation.valid_o3de_restricted_json) + def get_repo_json_data(repo_uri: str) -> dict or None: if not repo_uri: logger.error('Must specify a Repo Uri.') @@ -540,7 +558,8 @@ def get_repo_json_data(repo_uri: str) -> dict or None: return get_json_data_file(repo_json, "Repo", validation.valid_o3de_repo_json) -def get_repo_path(repo_uri: str, cache_folder: str = None) -> pathlib.Path: + +def get_repo_path(repo_uri: str, cache_folder: str or pathlib.Path = None) -> pathlib.Path: if not cache_folder: cache_folder = get_o3de_cache_folder() @@ -548,6 +567,7 @@ def get_repo_path(repo_uri: str, cache_folder: str = None) -> pathlib.Path: repo_sha256 = hashlib.sha256(repo_manifest.encode()) return cache_folder / str(repo_sha256.hexdigest() + '.json') + def get_registered(engine_name: str = None, project_name: str = None, gem_name: str = None, @@ -589,78 +609,96 @@ def get_registered(engine_name: str = None, if isinstance(engine, dict): engine_path = pathlib.Path(engine['path']).resolve() else: - engine_path = pathlib.Path(engine_object).resolve() + engine_path = pathlib.Path(engine).resolve() engine_json = engine_path / 'engine.json' - with engine_json.open('r') as f: - try: - engine_json_data = json.load(f) - except json.JSONDecodeError as e: - logger.warn(f'{engine_json} failed to load: {str(e)}') - else: - this_engines_name = engine_json_data['engine_name'] - if this_engines_name == engine_name: - return engine_path + if not pathlib.Path(engine_json).is_file(): + logger.warning(f'{engine_json} does not exist') + else: + with engine_json.open('r') as f: + try: + engine_json_data = json.load(f) + except json.JSONDecodeError as e: + logger.warning(f'{engine_json} failed to load: {str(e)}') + else: + this_engines_name = engine_json_data['engine_name'] + if this_engines_name == engine_name: + return engine_path + engines_path = json_data.get('engines_path', {}) + if engine_name in engines_path: + return pathlib.Path(engines_path[engine_name]).resolve() elif isinstance(project_name, str): projects = get_all_projects() for project_path in projects: project_path = pathlib.Path(project_path).resolve() project_json = project_path / 'project.json' - with project_json.open('r') as f: - try: - project_json_data = json.load(f) - except json.JSONDecodeError as e: - logger.warn(f'{project_json} failed to load: {str(e)}') - else: - this_projects_name = project_json_data['project_name'] - if this_projects_name == project_name: - return project_path + if not pathlib.Path(project_json).is_file(): + logger.warning(f'{project_json} does not exist') + else: + with project_json.open('r') as f: + try: + project_json_data = json.load(f) + except json.JSONDecodeError as e: + logger.warning(f'{project_json} failed to load: {str(e)}') + else: + this_projects_name = project_json_data['project_name'] + if this_projects_name == project_name: + return project_path elif isinstance(gem_name, str): gems = get_all_gems(project_path) for gem_path in gems: gem_path = pathlib.Path(gem_path).resolve() gem_json = gem_path / 'gem.json' - with gem_json.open('r') as f: - try: - gem_json_data = json.load(f) - except json.JSONDecodeError as e: - logger.warn(f'{gem_json} failed to load: {str(e)}') - else: - this_gems_name = gem_json_data['gem_name'] - if this_gems_name == gem_name: - return gem_path + if not pathlib.Path(gem_json).is_file(): + logger.warning(f'{gem_json} does not exist') + else: + with gem_json.open('r') as f: + try: + gem_json_data = json.load(f) + except json.JSONDecodeError as e: + logger.warning(f'{gem_json} failed to load: {str(e)}') + else: + this_gems_name = gem_json_data['gem_name'] + if this_gems_name == gem_name: + return gem_path elif isinstance(template_name, str): templates = get_all_templates(project_path) for template_path in templates: template_path = pathlib.Path(template_path).resolve() template_json = template_path / 'template.json' - with template_json.open('r') as f: - try: - template_json_data = json.load(f) - except json.JSONDecodeError as e: - logger.warn(f'{template_path} failed to load: {str(e)}') - else: - this_templates_name = template_json_data['template_name'] - if this_templates_name == template_name: - return template_path + if not pathlib.Path(template_json).is_file(): + logger.warning(f'{template_json} does not exist') + else: + with template_json.open('r') as f: + try: + template_json_data = json.load(f) + except json.JSONDecodeError as e: + logger.warning(f'{template_path} failed to load: {str(e)}') + else: + this_templates_name = template_json_data['template_name'] + if this_templates_name == template_name: + return template_path elif isinstance(restricted_name, str): restricted = get_all_restricted(project_path) for restricted_path in restricted: restricted_path = pathlib.Path(restricted_path).resolve() restricted_json = restricted_path / 'restricted.json' - with restricted_json.open('r') as f: - try: - restricted_json_data = json.load(f) - except json.JSONDecodeError as e: - logger.warn(f'{restricted_json} failed to load: {str(e)}') - else: - this_restricted_name = restricted_json_data['restricted_name'] - if this_restricted_name == restricted_name: - return restricted_path + if not pathlib.Path(restricted_json).is_file(): + logger.warning(f'{restricted_json} does not exist') + else: + with restricted_json.open('r') as f: + try: + restricted_json_data = json.load(f) + except json.JSONDecodeError as e: + logger.warning(f'{restricted_json} failed to load: {str(e)}') + else: + this_restricted_name = restricted_json_data['restricted_name'] + if this_restricted_name == restricted_name: + return restricted_path elif isinstance(default_folder, str): if default_folder == 'engines': @@ -689,7 +727,7 @@ def get_registered(engine_name: str = None, try: repo_json_data = json.load(f) except json.JSONDecodeError as e: - logger.warn(f'{cache_file} failed to load: {str(e)}') + logger.warning(f'{cache_file} failed to load: {str(e)}') else: this_repos_name = repo_json_data['repo_name'] if this_repos_name == repo_name: diff --git a/scripts/o3de/o3de/print_registration.py b/scripts/o3de/o3de/print_registration.py index b164243b7c..77e098d0ba 100644 --- a/scripts/o3de/o3de/print_registration.py +++ b/scripts/o3de/o3de/print_registration.py @@ -14,10 +14,10 @@ import pathlib import sys import urllib.parse -from o3de import manifest, validation +from o3de import manifest, validation, utils -logger = logging.getLogger() -logging.basicConfig() +logger = logging.getLogger('o3de.print_registration') +logging.basicConfig(format=utils.LOG_FORMAT) def get_project_path(project_path: pathlib.Path, project_name: str) -> pathlib.Path: @@ -153,6 +153,21 @@ def print_engine_external_subdirectories(verbose: int) -> int: # Project output methods +def print_project_engine_name(verbose: int, project_path: pathlib.Path, project_name: str) -> int: + project_path = get_project_path(project_path, project_name) + if not project_path: + return 1 + + engine_name = manifest.get_project_engine_name(project_path) + if engine_name: + print(f'Project\'s engine name:\n{engine_name}') + return 0 + + if verbose > 0: + logger.info(f'project.json at path "{project_path}" contains no registered "engine" field') + return 1 + + def print_project_gems(verbose: int, project_path: pathlib.Path, project_name: str) -> int: project_path = get_project_path(project_path, project_name) if not project_path: @@ -326,7 +341,7 @@ def print_repos_data(repos_data: dict) -> int: try: repo_json_data = json.load(s) except json.JSONDecodeError as e: - logger.warn(f'{cache_file} failed to load: {str(e)}') + logger.warning(f'{cache_file} failed to load: {str(e)}') else: print(f'{repo_uri}/repo.json cached as:') print(cache_file) @@ -401,6 +416,8 @@ def _run_register_show(args: argparse) -> int: return print_project_templates(args.verbose, args.project_path, args.project_name) elif args.project_restricted: return print_project_restricted(args.verbose, args.project_path, args.project_name) + elif args.project_engine_name: + return print_project_engine_name(args.verbose, args.project_path, args.project_name) elif args.all_projects: return print_all_projects(args.verbose) @@ -479,6 +496,9 @@ def add_parser_args(parser): group.add_argument('-pes', '--project-external-subdirectories', action='store_true', default=False, help='Returns the external subdirectories register with the project.json.') + group.add_argument('-pen', '--project-engine-name', action='store_true', + default=False, + help='Returns the "engine" name identifier registered with the project.json.') group.add_argument('-ap', '--all-projects', action='store_true', required=False, default=False, diff --git a/scripts/o3de/o3de/project_properties.py b/scripts/o3de/o3de/project_properties.py index 04731ad3de..9ee55773b5 100644 --- a/scripts/o3de/o3de/project_properties.py +++ b/scripts/o3de/o3de/project_properties.py @@ -15,8 +15,9 @@ import logging from o3de import manifest, utils -logger = logging.getLogger() -logging.basicConfig() +logger = logging.getLogger('o3de.project_properties') +logging.basicConfig(format=utils.LOG_FORMAT) + def get_project_props(name: str = None, path: pathlib.Path = None) -> dict: proj_json = manifest.get_project_json_data(project_name=name, project_path=path) @@ -26,9 +27,11 @@ def get_project_props(name: str = None, path: pathlib.Path = None) -> dict: return None return proj_json + def edit_project_props(proj_path: pathlib.Path = None, proj_name: str = None, new_name: str = None, + new_id: str = None, new_origin: str = None, new_display: str = None, new_summary: str = None, @@ -40,14 +43,15 @@ def edit_project_props(proj_path: pathlib.Path = None, if not proj_json: return 1 - - if new_origin: - proj_json['origin'] = new_origin if new_name: if not utils.validate_identifier(new_name): logger.error(f'Project name must be fewer than 64 characters, contain only alphanumeric, "_" or "-" characters, and start with a letter. {new_name}') return 1 - proj_json['project_name'] = new_name + proj_json['project_name'] = new_name + if new_id: + proj_json['project_id'] = new_id + if new_origin: + proj_json['origin'] = new_origin if new_display: proj_json['display_name'] = new_display if new_summary: @@ -71,13 +75,14 @@ def edit_project_props(proj_path: pathlib.Path = None, tag_list = replace_tags.split() if isinstance(replace_tags, str) else replace_tags proj_json['user_tags'] = tag_list - return 0 if manifest.save_o3de_manifest(proj_json, pathlib.Path(proj_path) / 'project.json') else 1 + def _edit_project_props(args: argparse) -> int: return edit_project_props(args.project_path, args.project_name, args.project_new_name, + args.project_id, args.project_origin, args.project_display, args.project_summary, @@ -86,6 +91,7 @@ def _edit_project_props(args: argparse) -> int: args.delete_tags, args.replace_tags) + def add_parser_args(parser): group = parser.add_mutually_exclusive_group(required=True) group.add_argument('-pp', '--project-path', type=pathlib.Path, required=False, @@ -95,6 +101,8 @@ def add_parser_args(parser): group = parser.add_argument_group('properties', 'arguments for modifying individual project properties.') group.add_argument('-pnn', '--project-new-name', type=str, required=False, help='Sets the name for the project.') + group.add_argument('-pid', '--project-id', type=str, required=False, + help='Sets the ID for the project.') group.add_argument('-po', '--project-origin', type=str, required=False, help='Sets description or url for project origin (such as project host, repository, owner...etc).') group.add_argument('-pd', '--project-display', type=str, required=False, @@ -112,10 +120,12 @@ def add_parser_args(parser): help='Replace entirety of user_tags property with space delimited list of values') parser.set_defaults(func=_edit_project_props) + def add_args(subparsers) -> None: enable_project_props_subparser = subparsers.add_parser('edit-project-properties') add_parser_args(enable_project_props_subparser) - + + def main(): the_parser = argparse.ArgumentParser() add_parser_args(the_parser) @@ -123,5 +133,6 @@ def main(): ret = the_args.func(the_args) if hasattr(the_args, 'func') else 1 sys.exit(ret) + if __name__ == "__main__": main() diff --git a/scripts/o3de/o3de/register.py b/scripts/o3de/o3de/register.py index 8a2bb788aa..a175104997 100644 --- a/scripts/o3de/o3de/register.py +++ b/scripts/o3de/o3de/register.py @@ -23,8 +23,8 @@ import urllib.request from o3de import get_registration, manifest, repo, utils, validation -logger = logging.getLogger() -logging.basicConfig() +logger = logging.getLogger('o3de.register') +logging.basicConfig(format=utils.LOG_FORMAT) def register_shipped_engine_o3de_objects(force: bool = False) -> int: @@ -306,9 +306,9 @@ def register_o3de_object_path(json_data: dict, try: paths_to_remove.append(o3de_object_path.relative_to(save_path.parent)) except ValueError: - pass # It is not an error if a relative path cannot be formed + pass # It is not an error if a relative path cannot be formed manifest_data[o3de_object_key] = list(filter(lambda p: pathlib.Path(p) not in paths_to_remove, - manifest_data.setdefault(o3de_object_key, []))) + manifest_data.setdefault(o3de_object_key, []))) if remove: if save_path: @@ -411,7 +411,7 @@ def register_project_path(json_data: dict, if not remove: # registering a project has the additional step of setting the project.json 'engine' field - this_engine_json = manifest.get_engine_json_data(engine_path=manifest.get_this_engine_path()) + this_engine_json = manifest.get_engine_json_data(engine_path=engine_path if engine_path else manifest.get_this_engine_path()) if not this_engine_json: return 1 project_json_data = manifest.get_project_json_data(project_path=project_path) @@ -485,12 +485,12 @@ def register_repo(json_data: dict, json_data['repos'].remove(repo_uri) if remove: - logger.warn(f'Removing repo uri {repo_uri}.') + logger.warning(f'Removing repo uri {repo_uri}.') return 0 repo_sha256 = hashlib.sha256(url.encode()) cache_file = manifest.get_o3de_cache_folder() / str(repo_sha256.hexdigest() + '.json') - result = utils.download_file(parsed_uri, cache_file) + result = utils.download_file(parsed_uri, cache_file, True) if result == 0: json_data.setdefault('repos', []).insert(0, repo_uri) @@ -560,6 +560,107 @@ def register_default_third_party_folder(json_data: dict, manifest.get_o3de_third_party_folder() if remove else default_third_party_folder, 'default_third_party_folder') + +def remove_invalid_o3de_projects(manifest_path: pathlib.Path = None) -> int: + if not manifest_path: + manifest_path = manifest.get_o3de_manifest() + + json_data = manifest.load_o3de_manifest(manifest_path) + + result = 0 + + for project in json_data.get('projects', []): + if not validation.valid_o3de_project_json(pathlib.Path(project).resolve() / 'project.json', generate_uuid=True): + logger.warning(f"Project path {project} is invalid.") + # Attempt to unregister all invalid projects even if previous projects failed to unregister + # but combine the result codes of each command. + result = register(project_path=pathlib.Path(project), remove=True) or result + + return result + + +def remove_invalid_o3de_objects() -> None: + for engine_path in manifest.get_engines(): + if not validation.valid_o3de_engine_json(pathlib.Path(engine_path).resolve() / 'engine.json'): + logger.warning(f"Engine path {engine_path} is invalid.") + register(engine_path=engine_path, remove=True) + + remove_invalid_o3de_projects() + + for external in manifest.get_external_subdirectories(): + external = pathlib.Path(external).resolve() + if not external.is_dir(): + logger.warning(f"External subdirectory {external} is invalid.") + register(engine_path=engine_path, external_subdir_path=external, remove=True) + + for template in manifest.get_templates(): + if not validation.valid_o3de_template_json(pathlib.Path(template).resolve() / 'template.json'): + logger.warning(f"Template path {template} is invalid.") + register(template_path=template, remove=True) + + for restricted in manifest.get_restricted(): + if not validation.valid_o3de_restricted_json(pathlib.Path(restricted).resolve() / 'restricted.json'): + logger.warning(f"Restricted path {restricted} is invalid.") + register(restricted_path=restricted, remove=True) + + json_data = manifest.load_o3de_manifest() + default_engines_folder = pathlib.Path( + json_data.get('default_engines_folder', manifest.get_o3de_engines_folder())).resolve() + if not default_engines_folder.is_dir(): + new_default_engines_folder = manifest.get_o3de_folder() / 'Engines' + new_default_engines_folder.mkdir(parents=True, exist_ok=True) + logger.warning( + f"Default engines folder {default_engines_folder} is invalid. Set default {new_default_engines_folder}") + register(default_engines_folder=new_default_engines_folder.as_posix()) + + default_projects_folder = pathlib.Path( + json_data.get('default_projects_folder', manifest.get_o3de_projects_folder())).resolve() + if not default_projects_folder.is_dir(): + new_default_projects_folder = manifest.get_o3de_folder() / 'Projects' + new_default_projects_folder.mkdir(parents=True, exist_ok=True) + logger.warning( + f"Default projects folder {default_projects_folder} is invalid. Set default {new_default_projects_folder}") + register(default_projects_folder=new_default_projects_folder.as_posix()) + + default_gems_folder = pathlib.Path(json_data.get('default_gems_folder', manifest.get_o3de_gems_folder())).resolve() + if not default_gems_folder.is_dir(): + new_default_gems_folder = manifest.get_o3de_folder() / 'Gems' + new_default_gems_folder.mkdir(parents=True, exist_ok=True) + logger.warning(f"Default gems folder {default_gems_folder} is invalid." + f" Set default {new_default_gems_folder}") + register(default_gems_folder=new_default_gems_folder.as_posix()) + + default_templates_folder = pathlib.Path( + json_data.get('default_templates_folder', manifest.get_o3de_templates_folder())).resolve() + if not default_templates_folder.is_dir(): + new_default_templates_folder = manifest.get_o3de_folder() / 'Templates' + new_default_templates_folder.mkdir(parents=True, exist_ok=True) + logger.warning( + f"Default templates folder {default_templates_folder} is invalid." + f" Set default {new_default_templates_folder}") + register(default_templates_folder=new_default_templates_folder.as_posix()) + + default_restricted_folder = pathlib.Path( + json_data.get('default_restricted_folder', manifest.get_o3de_restricted_folder())).resolve() + if not default_restricted_folder.is_dir(): + default_restricted_folder = manifest.get_o3de_folder() / 'Restricted' + default_restricted_folder.mkdir(parents=True, exist_ok=True) + logger.warning( + f"Default restricted folder {default_restricted_folder} is invalid." + f" Set default {default_restricted_folder}") + register(default_restricted_folder=default_restricted_folder.as_posix()) + + default_third_party_folder = pathlib.Path( + json_data.get('default_third_party_folder', manifest.get_o3de_third_party_folder())).resolve() + if not default_third_party_folder.is_dir(): + default_third_party_folder = manifest.get_o3de_folder() / '3rdParty' + default_third_party_folder.mkdir(parents=True, exist_ok=True) + logger.warning( + f"Default 3rd Party folder {default_third_party_folder} is invalid." + f" Set default {default_third_party_folder}") + register(default_third_party_folder=default_third_party_folder.as_posix()) + + def register(engine_path: pathlib.Path = None, project_path: pathlib.Path = None, gem_path: pathlib.Path = None, @@ -604,7 +705,18 @@ def register(engine_path: pathlib.Path = None, :return: 0 for success or non 0 failure code """ - json_data = manifest.load_o3de_manifest() + try: + json_data = manifest.load_o3de_manifest() + except json.JSONDecodeError: + if not force: + logger.error('O3DE object registration has halted due to JSON Decode Error in manifest at path:' + f' "{manifest.get_o3de_manifest()}".' + '\n Registration can be forced using the --force option,' + ' but that will result in the manifest using default data') + return 1 + else: + # Use a default manifest data an proceed + json_data = manifest.get_default_o3de_manifest_json_data() result = 0 @@ -620,14 +732,14 @@ def register(engine_path: pathlib.Path = None, logger.error(f'Gem path cannot be empty.') return 1 result = result or register_gem_path(json_data, gem_path, remove, - external_subdir_engine_path, external_subdir_project_path) + external_subdir_engine_path, external_subdir_project_path) if isinstance(external_subdir_path, pathlib.PurePath): if not external_subdir_path: logger.error(f'External Subdirectory path is None.') return 1 result = result or register_external_subdirectory(json_data, external_subdir_path, remove, - external_subdir_engine_path, external_subdir_project_path) + external_subdir_engine_path, external_subdir_project_path) if isinstance(template_path, pathlib.PurePath): if not template_path: @@ -679,99 +791,6 @@ def register(engine_path: pathlib.Path = None, return result -def remove_invalid_o3de_projects(manifest_path: pathlib.Path = None) -> int: - if not manifest_path: - manifest_path = manifest.get_o3de_manifest() - - json_data = manifest.load_o3de_manifest(manifest_path) - - result = 0 - - for project in json_data.get('projects', []): - if not validation.valid_o3de_project_json(pathlib.Path(project).resolve() / 'project.json'): - logger.warn(f"Project path {project} is invalid.") - # Attempt to unregister all invalid projects even if previous projects failed to unregister - # but combine the result codes of each command. - result = register(project_path=pathlib.Path(project), remove=True) or result - - return result - -def remove_invalid_o3de_objects() -> None: - for engine_path in manifest.get_engines(): - if not validation.valid_o3de_engine_json(pathlib.Path(engine_path).resolve() / 'engine.json'): - logger.warn(f"Engine path {engine_path} is invalid.") - register(engine_path=engine_path, remove=True) - - remove_invalid_o3de_projects() - - for external in manifest.get_external_subdirectories(): - external = pathlib.Path(external).resolve() - if not external.is_dir(): - logger.warn(f"External subdirectory {external} is invalid.") - register(engine_path=engine_path, external_subdir_path=external, remove=True) - - for template in manifest.get_templates(): - if not validation.valid_o3de_template_json(pathlib.Path(template).resolve() / 'template.json'): - logger.warn(f"Template path {template} is invalid.") - register(template_path=template, remove=True) - - for restricted in manifest.get_restricted(): - if not validation.valid_o3de_restricted_json(pathlib.Path(restricted).resolve() / 'restricted.json'): - logger.warn(f"Restricted path {restricted} is invalid.") - register(restricted_path=restricted, remove=True) - - json_data = manifest.load_o3de_manifest() - default_engines_folder = pathlib.Path(json_data.get('default_engines_folder', manifest.get_o3de_engines_folder())).resolve() - if not default_engines_folder.is_dir(): - new_default_engines_folder = manifest.get_o3de_folder() / 'Engines' - new_default_engines_folder.mkdir(parents=True, exist_ok=True) - logger.warn( - f"Default engines folder {default_engines_folder} is invalid. Set default {new_default_engines_folder}") - register(default_engines_folder=new_default_engines_folder.as_posix()) - - default_projects_folder = pathlib.Path(json_data.get('default_projects_folder', manifest.get_o3de_projects_folder())).resolve() - if not default_projects_folder.is_dir(): - new_default_projects_folder = manifest.get_o3de_folder() / 'Projects' - new_default_projects_folder.mkdir(parents=True, exist_ok=True) - logger.warn( - f"Default projects folder {default_projects_folder} is invalid. Set default {new_default_projects_folder}") - register(default_projects_folder=new_default_projects_folder.as_posix()) - - default_gems_folder = pathlib.Path(json_data.get('default_gems_folder', manifest.get_o3de_gems_folder())).resolve() - if not default_gems_folder.is_dir(): - new_default_gems_folder = manifest.get_o3de_folder() / 'Gems' - new_default_gems_folder.mkdir(parents=True, exist_ok=True) - logger.warn(f"Default gems folder {default_gems_folder} is invalid." - f" Set default {new_default_gems_folder}") - register(default_gems_folder=new_default_gems_folder.as_posix()) - - default_templates_folder = pathlib.Path(json_data.get('default_templates_folder', manifest.get_o3de_templates_folder())).resolve() - if not default_templates_folder.is_dir(): - new_default_templates_folder = manifest.get_o3de_folder() / 'Templates' - new_default_templates_folder.mkdir(parents=True, exist_ok=True) - logger.warn( - f"Default templates folder {default_templates_folder} is invalid." - f" Set default {new_default_templates_folder}") - register(default_templates_folder=new_default_templates_folder.as_posix()) - - default_restricted_folder = pathlib.Path(json_data.get('default_restricted_folder', manifest.get_o3de_restricted_folder())).resolve() - if not default_restricted_folder.is_dir(): - default_restricted_folder = manifest.get_o3de_folder() / 'Restricted' - default_restricted_folder.mkdir(parents=True, exist_ok=True) - logger.warn( - f"Default restricted folder {default_restricted_folder} is invalid." - f" Set default {default_restricted_folder}") - register(default_restricted_folder=default_restricted_folder.as_posix()) - - default_third_party_folder = pathlib.Path(json_data.get('default_third_party_folder', manifest.get_o3de_third_party_folder())).resolve() - if not default_third_party_folder.is_dir(): - default_third_party_folder = manifest.get_o3de_folder() / '3rdParty' - default_third_party_folder.mkdir(parents=True, exist_ok=True) - logger.warn( - f"Default 3rd Party folder {default_third_party_folder} is invalid." - f" Set default {default_third_party_folder}") - register(default_third_party_folder=default_third_party_folder.as_posix()) - def _run_register(args: argparse) -> int: if args.override_home_folder: @@ -822,6 +841,10 @@ def add_parser_args(parser): Ex. Directly run from this file alone with: python register.py --engine-path "C:/o3de" :param parser: the caller passes an argparse parser like instance to this method """ + + # Sub-commands should declare their own verbosity flag, if desired + utils.add_verbosity_arg(parser) + group = parser.add_mutually_exclusive_group(required=True) group.add_argument('--this-engine', action='store_true', required=False, default=False, @@ -869,18 +892,18 @@ def add_parser_args(parser): help='Refresh the repo cache.') parser.add_argument('-ohf', '--override-home-folder', type=pathlib.Path, required=False, - help='By default the home folder is the user folder, override it to this folder.') + help='By default the home folder is the user folder, override it to this folder.') parser.add_argument('-r', '--remove', action='store_true', required=False, - default=False, - help='Remove entry.') + default=False, + help='Remove entry.') parser.add_argument('-f', '--force', action='store_true', default=False, - help='For the update of the registration field being modified.') + help='For the update of the registration field being modified.') - external_subdir_group = parser.add_argument_group(title='external-subdirectory', - description='path arguments to use with the --external-subdirectory option') + external_subdir_group = parser.add_argument_group(title='external-subdirectory', + description='path arguments to use with the --external-subdirectory option') external_subdir_path_group = external_subdir_group.add_mutually_exclusive_group() external_subdir_path_group.add_argument('-esep', '--external-subdirectory-engine-path', type=pathlib.Path, - help='If supplied, registers the external subdirectory with the engine.json at' \ + help='If supplied, registers the external subdirectory with the engine.json at' \ ' the engine-path location') external_subdir_path_group.add_argument('-espp', '--external-subdirectory-project-path', type=pathlib.Path) parser.set_defaults(func=_run_register) @@ -905,8 +928,6 @@ def main(): # parse the command line args the_parser = argparse.ArgumentParser() - # add subparsers - # add args to the parser add_parser_args(the_parser) @@ -915,6 +936,7 @@ def main(): # run ret = the_args.func(the_args) if hasattr(the_args, 'func') else 1 + logger.info('Success!' if ret == 0 else 'Completed with issues: result {}'.format(ret)) # return sys.exit(ret) diff --git a/scripts/o3de/o3de/repo.py b/scripts/o3de/o3de/repo.py index a6b1505761..41c2d235d9 100644 --- a/scripts/o3de/o3de/repo.py +++ b/scripts/o3de/o3de/repo.py @@ -9,21 +9,21 @@ import json import logging import pathlib -import shutil import urllib.parse import urllib.request import hashlib from datetime import datetime from o3de import manifest, utils, validation -logger = logging.getLogger() -logging.basicConfig() +logger = logging.getLogger('o3de.repo') +logging.basicConfig(format=utils.LOG_FORMAT) def process_add_o3de_repo(file_name: str or pathlib.Path, repo_set: set) -> int: file_name = pathlib.Path(file_name).resolve() if not validation.valid_o3de_repo_json(file_name): + logger.error(f'Repository JSON {file_name} could not be loaded or is missing required values') return 1 cache_folder = manifest.get_o3de_cache_folder() @@ -74,11 +74,11 @@ def process_add_o3de_repo(file_name: str or pathlib.Path, manifest_json_uri = f'{o3de_object_uri}/{manifest_json}' manifest_json_sha256 = hashlib.sha256(manifest_json_uri.encode()) cache_file = cache_folder / str(manifest_json_sha256.hexdigest() + '.json') - if not cache_file.is_file(): - parsed_uri = urllib.parse.urlparse(manifest_json_uri) - download_file_result = utils.download_file(parsed_uri, cache_file) - if download_file_result != 0: - return download_file_result + + parsed_uri = urllib.parse.urlparse(manifest_json_uri) + download_file_result = utils.download_file(parsed_uri, cache_file, True) + if download_file_result != 0: + return download_file_result # Having a repo is also optional repo_list = [] @@ -96,7 +96,7 @@ def process_add_o3de_repo(file_name: str or pathlib.Path, cache_file = cache_folder / str(manifest_json_sha256.hexdigest() + '.json') if cache_file.is_file(): cache_file.unlink() - download_file_result = utils.download_file(parsed_uri, cache_file) + download_file_result = utils.download_file(parsed_uri, cache_file, True) if download_file_result != 0: return download_file_result @@ -114,7 +114,7 @@ def get_gem_json_paths_from_cached_repo(repo_uri: str) -> set: file_name = pathlib.Path(cache_filename).resolve() if not file_name.is_file(): - logger.error(f'Could not find cached repo json file for {repo_uri}') + logger.error(f'Could not find cached repository json file for {repo_uri}. Try refreshing the repository.') return gem_set with file_name.open('r') as f: @@ -139,7 +139,7 @@ def get_gem_json_paths_from_cached_repo(repo_uri: str) -> set: if cache_gem_json_filepath.is_file(): gem_set.add(cache_gem_json_filepath) else: - logger.warn(f'Could not find cached gem json file {cache_gem_json_filepath} for {o3de_object_uri} in repo {repo_uri}') + logger.warning(f'Could not find cached gem json file {cache_gem_json_filepath} for {o3de_object_uri} in repo {repo_uri}') return gem_set @@ -165,8 +165,9 @@ def refresh_repo(repo_uri: str, repo_sha256 = hashlib.sha256(parsed_uri.geturl().encode()) cache_file = cache_folder / str(repo_sha256.hexdigest() + '.json') - download_file_result = utils.download_file(parsed_uri, cache_file) + download_file_result = utils.download_file(parsed_uri, cache_file, True) if download_file_result != 0: + logger.error(f'Repo json {repo_uri} could not download.') return download_file_result if not validation.valid_o3de_repo_json(cache_file): @@ -178,12 +179,7 @@ def refresh_repo(repo_uri: str, def refresh_repos() -> int: json_data = manifest.load_o3de_manifest() - - # clear the cache cache_folder = manifest.get_o3de_cache_folder() - shutil.rmtree(cache_folder) - cache_folder = manifest.get_o3de_cache_folder() # will recreate it - result = 0 # set will stop circular references @@ -222,10 +218,10 @@ def search_repo(manifest_json_data: dict, json_key = 'gem_name' search_func = lambda manifest_json_data: manifest_json_data if manifest_json_data.get(json_key, '') == gem_name else None elif isinstance(template_name, str) or isinstance(template_name, pathlib.PurePath): - o3de_object_uris = manifest_json_data['template'] + o3de_object_uris = manifest_json_data['templates'] manifest_json = 'template.json' json_key = 'template_name' - search_func = lambda manifest_json_data: manifest_json_data if manifest_json_data.get(json_key, '') == template_name_name else None + search_func = lambda manifest_json_data: manifest_json_data if manifest_json_data.get(json_key, '') == template_name else None elif isinstance(restricted_name, str) or isinstance(restricted_name, pathlib.PurePath): o3de_object_uris = manifest_json_data['restricted'] manifest_json = 'restricted.json' @@ -262,7 +258,7 @@ def search_o3de_object(manifest_json, o3de_object_uris, search_func): try: manifest_json_data = json.load(f) except json.JSONDecodeError as e: - logger.warn(f'{cache_file} failed to load: {str(e)}') + logger.warning(f'{cache_file} failed to load: {str(e)}') else: result_json_data = search_func(manifest_json_data) if result_json_data: diff --git a/scripts/o3de/o3de/sha256.py b/scripts/o3de/o3de/sha256.py index b8f8e522d4..c2eaae073f 100644 --- a/scripts/o3de/o3de/sha256.py +++ b/scripts/o3de/o3de/sha256.py @@ -15,8 +15,8 @@ import sys from o3de import utils -logger = logging.getLogger() -logging.basicConfig() +logger = logging.getLogger('o3de.sha256') +logging.basicConfig(format=utils.LOG_FORMAT) def sha256(file_path: str or pathlib.Path, @@ -35,7 +35,7 @@ def sha256(file_path: str or pathlib.Path, logger.error(f'Json path {json_path} does not exist.') return 1 - sha256 = hashlib.sha256(file_path.open('rb').read()).hexdigest() + the_sha256 = hashlib.sha256(file_path.open('rb').read()).hexdigest() if json_path: with json_path.open('r') as s: @@ -44,7 +44,7 @@ def sha256(file_path: str or pathlib.Path, except json.JSONDecodeError as e: logger.error(f'Failed to read Json path {json_path}: {str(e)}') return 1 - json_data.update({"sha256": sha256}) + json_data.update({"sha256": the_sha256}) utils.backup_file(json_path) with json_path.open('w') as s: try: @@ -53,7 +53,7 @@ def sha256(file_path: str or pathlib.Path, logger.error(f'Failed to write Json path {json_path}: {str(e)}') return 1 else: - print(sha256) + print(the_sha256) return 0 @@ -70,9 +70,9 @@ def add_parser_args(parser): :param parser: the caller passes an argparse parser like instance to this method """ parser.add_argument('-f', '--file-path', type=str, required=True, - help='The path to the file you want to sha256.') + help='The path to the file you want to sha256.') parser.add_argument('-j', '--json-path', type=str, required=False, - help='optional path to an o3de json file to add the "sha256" element to.') + help='Optional path to an o3de json file to add the "sha256" element to.') parser.set_defaults(func=_run_sha256) diff --git a/scripts/o3de/o3de/utils.py b/scripts/o3de/o3de/utils.py old mode 100755 new mode 100644 index 8663502a3f..6628e6c946 --- a/scripts/o3de/o3de/utils.py +++ b/scripts/o3de/o3de/utils.py @@ -8,6 +8,7 @@ """ This file contains utility functions """ +import argparse import sys import uuid import os @@ -17,11 +18,54 @@ import urllib.request import logging import zipfile -logger = logging.getLogger() -logging.basicConfig() +LOG_FORMAT = '[%(levelname)s] %(name)s: %(message)s' + +logger = logging.getLogger('o3de.utils') +logging.basicConfig(format=LOG_FORMAT) COPY_BUFSIZE = 64 * 1024 + +class VerbosityAction(argparse.Action): + def __init__(self, + option_strings, + dest, + default=None, + required=False, + help=None): + super().__init__( + option_strings=option_strings, + dest=dest, + nargs=0, + default=default, + required=required, + help=help, + ) + + def __call__(self, parser, namespace, values, option_string=None): + count = getattr(namespace, self.dest, None) + if count is None: + count = self.default + count += 1 + setattr(namespace, self.dest, count) + # get the parent logger instance + log = logging.getLogger('o3de') + if count >= 2: + log.setLevel(logging.DEBUG) + elif count == 1: + log.setLevel(logging.INFO) + + +def add_verbosity_arg(parser: argparse.ArgumentParser) -> None: + """ + Add a consistent/common verbosity option to an arg parser + :param parser: The ArgumentParser to modify + :return: None + """ + parser.add_argument('-v', dest='verbosity', action=VerbosityAction, default=0, + help='Additional logging verbosity, can be -v or -vv') + + def copyfileobj(fsrc, fdst, callback, length=0): # This is functionally the same as the python shutil copyfileobj but # allows for a callback to return the download progress in blocks and allows @@ -43,10 +87,11 @@ def copyfileobj(fsrc, fdst, callback, length=0): return 1 return 0 + def validate_identifier(identifier: str) -> bool: """ - Determine if the identifier supplied is valid. - :param identifier: the name which needs to to checked + Determine if the identifier supplied is valid + :param identifier: the name which needs to be checked :return: bool: if the identifier is valid or not """ if not identifier: @@ -65,7 +110,7 @@ def validate_identifier(identifier: str) -> bool: def sanitize_identifier_for_cpp(identifier: str) -> str: """ Convert the provided identifier to a valid C++ identifier - :param identifier: the name which needs to to sanitized + :param identifier: the name which needs to be sanitized :return: str: sanitized identifier """ if not identifier: @@ -81,8 +126,8 @@ def sanitize_identifier_for_cpp(identifier: str) -> str: def validate_uuid4(uuid_string: str) -> bool: """ - Determine if the uuid supplied is valid. - :param uuid_string: the uuid which needs to to checked + Determine if the uuid supplied is valid + :param uuid_string: the uuid which needs to be checked :return: bool: if the uuid is valid or not """ try: @@ -117,29 +162,47 @@ def backup_folder(folder: str or pathlib.Path) -> None: if backup_folder_name.is_dir(): renamed = True -def download_file(parsed_uri, download_path: pathlib.Path, download_progress_callback = None) -> int: + +def download_file(parsed_uri, download_path: pathlib.Path, force_overwrite: bool = False, download_progress_callback = None) -> int: """ + Download file :param parsed_uri: uniform resource identifier to zip file to download :param download_path: location path on disk to download file - :download_progress_callback: callback called with the download progress as a percentage, returns true to request to cancel the download + :param download_progress_callback: callback called with the download progress as a percentage, returns true to request to cancel the download """ if download_path.is_file(): - logger.warn(f'File already downloaded to {download_path}.') - elif parsed_uri.scheme in ['http', 'https', 'ftp', 'ftps']: - with urllib.request.urlopen(parsed_uri.geturl()) as s: - download_file_size = 0 + if not force_overwrite: + logger.error(f'File already downloaded to {download_path} and force_overwrite is not set.') + return 1 + else: try: - download_file_size = s.headers['content-length'] - except KeyError: - pass - def download_progress(blocks): - if download_progress_callback and download_file_size: - return download_progress_callback(int(blocks/int(download_file_size) * 100)) - return False - with download_path.open('wb') as f: - download_cancelled = copyfileobj(s, f, download_progress) - if download_cancelled: - return 1 + os.unlink(download_path) + except OSError: + logger.error(f'Could not remove existing download path {download_path}.') + return 1 + + if parsed_uri.scheme in ['http', 'https', 'ftp', 'ftps']: + try: + with urllib.request.urlopen(parsed_uri.geturl()) as s: + download_file_size = 0 + try: + download_file_size = s.headers['content-length'] + except KeyError: + pass + + def download_progress(downloaded_bytes): + if download_progress_callback: + return download_progress_callback(int(downloaded_bytes), int(download_file_size)) + return False + + with download_path.open('wb') as f: + download_cancelled = copyfileobj(s, f, download_progress) + if download_cancelled: + logger.info(f'Download of file to {download_path} cancelled.') + return 1 + except urllib.error.HTTPError as e: + logger.error(f'HTTP Error {e.code} opening {parsed_uri.geturl()}') + return 1 else: origin_file = pathlib.Path(parsed_uri.geturl()).resolve() if not origin_file.is_file(): @@ -149,17 +212,17 @@ def download_file(parsed_uri, download_path: pathlib.Path, download_progress_cal return 0 -def download_zip_file(parsed_uri, download_zip_path: pathlib.Path, download_progress_callback = None) -> int: +def download_zip_file(parsed_uri, download_zip_path: pathlib.Path, force_overwrite: bool, download_progress_callback = None) -> int: """ :param parsed_uri: uniform resource identifier to zip file to download :param download_zip_path: path to output zip file """ - download_file_result = download_file(parsed_uri, download_zip_path, download_progress_callback) + download_file_result = download_file(parsed_uri, download_zip_path, force_overwrite, download_progress_callback) if download_file_result != 0: return download_file_result if not zipfile.is_zipfile(download_zip_path): - logger.error(f"File zip {download_zip_path} is invalid.") + logger.error(f"File zip {download_zip_path} is invalid. Try re-downloading the file.") download_zip_path.unlink() return 1 @@ -169,13 +232,12 @@ def download_zip_file(parsed_uri, download_zip_path: pathlib.Path, download_prog def find_ancestor_file(target_file_name: pathlib.PurePath, start_path: pathlib.Path, max_scan_up_range: int=0) -> pathlib.Path or None: """ - Find a file with the given name in the ancestor directories by walking up the starting path until the file is found. - - :param target_file_name: Name of the file to find. - :param start_path: path to start looking for the file. + Find a file with the given name in the ancestor directories by walking up the starting path until the file is found + :param target_file_name: Name of the file to find + :param start_path: path to start looking for the file :param max_scan_up_range: maximum number of directories to scan upwards when searching for target file if the value is 0, then there is no max - :return: Path to the file or None if not found. + :return: Path to the file or None if not found """ current_path = pathlib.Path(start_path) candidate_path = current_path / target_file_name @@ -197,17 +259,17 @@ def find_ancestor_file(target_file_name: pathlib.PurePath, start_path: pathlib.P return candidate_path if candidate_path.exists() else None + def find_ancestor_dir_containing_file(target_file_name: pathlib.PurePath, start_path: pathlib.Path, max_scan_up_range: int=0) -> pathlib.Path or None: """ - Find nearest ancestor directory that contains the file with the given name by walking up - from the starting path. - - :param target_file_name: Name of the file to find. - :param start_path: path to start looking for the file. + Find the nearest ancestor directory that contains the file with the given name by walking up + from the starting path + :param target_file_name: Name of the file to find + :param start_path: path to start looking for the file :param max_scan_up_range: maximum number of directories to scan upwards when searching for target file if the value is 0, then there is no max - :return: Path to the directory containing file or None if not found. + :return: Path to the directory containing file or None if not found """ ancestor_file = find_ancestor_file(target_file_name, start_path, max_scan_up_range) return ancestor_file.parent if ancestor_file else None diff --git a/scripts/o3de/o3de/validation.py b/scripts/o3de/o3de/validation.py index 5c683f0667..3daa995c98 100644 --- a/scripts/o3de/o3de/validation.py +++ b/scripts/o3de/o3de/validation.py @@ -10,6 +10,8 @@ This file validating o3de object json files """ import json import pathlib +import uuid + def valid_o3de_json_dict(json_data: dict, key: str) -> bool: return key in json_data @@ -23,9 +25,9 @@ def valid_o3de_repo_json(file_name: str or pathlib.Path) -> bool: with file_name.open('r') as f: try: json_data = json.load(f) - test = json_data['repo_name'] - test = json_data['origin'] - except (json.JSONDecodeError, KeyError) as e: + _ = json_data['repo_name'] + _ = json_data['origin'] + except (json.JSONDecodeError, KeyError): return False return True @@ -38,13 +40,13 @@ def valid_o3de_engine_json(file_name: str or pathlib.Path) -> bool: with file_name.open('r') as f: try: json_data = json.load(f) - test = json_data['engine_name'] - except (json.JSONDecodeError, KeyError) as e: + _ = json_data['engine_name'] + except (json.JSONDecodeError, KeyError): return False return True -def valid_o3de_project_json(file_name: str or pathlib.Path) -> bool: +def valid_o3de_project_json(file_name: str or pathlib.Path, generate_uuid: bool = True) -> bool: file_name = pathlib.Path(file_name).resolve() if not file_name.is_file(): return False @@ -52,9 +54,23 @@ def valid_o3de_project_json(file_name: str or pathlib.Path) -> bool: with file_name.open('r') as f: try: json_data = json.load(f) - test = json_data['project_name'] - except (json.JSONDecodeError, KeyError) as e: + _ = json_data['project_name'] + + if not generate_uuid: + _ = json_data['project_id'] + else: + test = json_data.get('project_id', 'No ID') + generate_new_id = test == 'No ID' + + except (json.JSONDecodeError, KeyError): return False + + # Generate a random uuid for the project json if it is missing instead of failing if generate_uuid is true + if generate_uuid and generate_new_id: + with file_name.open('w') as f: + new_uuid = '{' + str(uuid.uuid4()) + '}' + json_data.update({'project_id': new_uuid}) + f.write(json.dumps(json_data, indent=4) + '\n') return True @@ -66,8 +82,8 @@ def valid_o3de_gem_json(file_name: str or pathlib.Path) -> bool: with file_name.open('r') as f: try: json_data = json.load(f) - test = json_data['gem_name'] - except (json.JSONDecodeError, KeyError) as e: + _ = json_data['gem_name'] + except (json.JSONDecodeError, KeyError): return False return True @@ -76,11 +92,12 @@ def valid_o3de_template_json(file_name: str or pathlib.Path) -> bool: file_name = pathlib.Path(file_name).resolve() if not file_name.is_file(): return False + with file_name.open('r') as f: try: json_data = json.load(f) - test = json_data['template_name'] - except (json.JSONDecodeError, KeyError) as e: + _ = json_data['template_name'] + except (json.JSONDecodeError, KeyError): return False return True @@ -89,10 +106,11 @@ def valid_o3de_restricted_json(file_name: str or pathlib.Path) -> bool: file_name = pathlib.Path(file_name).resolve() if not file_name.is_file(): return False + with file_name.open('r') as f: try: json_data = json.load(f) - test = json_data['restricted_name'] - except (json.JSONDecodeError, KeyError) as e: + _ = json_data['restricted_name'] + except (json.JSONDecodeError, KeyError): return False return True diff --git a/scripts/o3de/tests/unit_test_gem_properties.py b/scripts/o3de/tests/unit_test_gem_properties.py index 5bfbe5573a..dee5811b65 100644 --- a/scripts/o3de/tests/unit_test_gem_properties.py +++ b/scripts/o3de/tests/unit_test_gem_properties.py @@ -18,7 +18,8 @@ TEST_GEM_JSON_PAYLOAD = ''' { "gem_name": "TestGem", "display_name": "TestGem", - "license": "What license TestGem uses goes here: i.e. https://opensource.org/licenses/MIT", + "license": "MIT", + "license_url": "https://opensource.org/licenses/MIT", "origin": "The primary repo for TestGem goes here: i.e. http://www.mydomain.com", "type": "Code", "summary": "A short description of TestGem.", @@ -46,26 +47,30 @@ def init_gem_json_data(request): class TestEditGemProperties: @pytest.mark.parametrize("gem_path, gem_name, gem_new_name, gem_display, gem_origin,\ gem_type, gem_summary, gem_icon, gem_requirements, gem_documentation_url,\ - add_tags, remove_tags, replace_tags, expected_tags, expected_result", [ + gem_license, gem_license_url, add_tags, remove_tags, replace_tags,\ + expected_tags, expected_result", [ pytest.param(pathlib.PurePath('D:/TestProject'), None, 'TestGem2', 'New Gem Name', 'O3DE', 'Code', 'Gem that exercises Default Gem Template', 'new_preview.png', 'Do this extra thing', 'https://o3de.org/docs/user-guide/gems/', + 'Apache 2.0', 'https://www.apache.org/licenses/LICENSE-2.0', ['Physics', 'Rendering', 'Scripting'], None, None, ['TestGem', 'Physics', 'Rendering', 'Scripting'], 0), pytest.param(None, 'TestGem2', None, 'New Gem Name', 'O3DE', 'Asset', 'Gem that exercises Default Gem Template', - 'new_preview.png', 'Do this extra thing', 'https://o3de.org/docs/user-guide/gems/', None, - ['Physics'], None, ['TestGem', 'Rendering', 'Scripting'], 0), + 'new_preview.png', 'Do this extra thing', 'https://o3de.org/docs/user-guide/gems/', + 'Apache 2.0', 'https://www.apache.org/licenses/LICENSE-2.0', + None, ['Physics'], None, ['TestGem', 'Rendering', 'Scripting'], 0), pytest.param(None, 'TestGem2', None, 'New Gem Name', 'O3DE', 'Tool', 'Gem that exercises Default Gem Template', - 'new_preview.png', 'Do this extra thing', 'https://o3de.org/docs/user-guide/gems/', None, - None, ['Animation', 'TestGem'], ['Animation', 'TestGem'], 0) + 'new_preview.png', 'Do this extra thing', 'https://o3de.org/docs/user-guide/gems/', + 'Apache 2.0', 'https://www.apache.org/licenses/LICENSE-2.0', + None, None, ['Animation', 'TestGem'], ['Animation', 'TestGem'], 0) ] ) def test_edit_gem_properties(self, gem_path, gem_name, gem_new_name, gem_display, gem_origin, gem_type, gem_summary, gem_icon, gem_requirements, - gem_documentation_url, add_tags, remove_tags, replace_tags, - expected_tags, expected_result): + gem_documentation_url, gem_license, gem_license_url, add_tags, remove_tags, + replace_tags, expected_tags, expected_result): def get_gem_json_data(gem_path: pathlib.Path) -> dict: return self.gem_json.data @@ -82,7 +87,8 @@ class TestEditGemProperties: patch('o3de.manifest.get_registered', side_effect=get_gem_path) as get_registered_patch: result = gem_properties.edit_gem_props(gem_path, gem_name, gem_new_name, gem_display, gem_origin, gem_type, gem_summary, gem_icon, gem_requirements, - gem_documentation_url, add_tags, remove_tags, replace_tags) + gem_documentation_url, gem_license, gem_license_url, + add_tags, remove_tags, replace_tags) assert result == expected_result if gem_new_name: assert self.gem_json.data.get('gem_name', '') == gem_new_name @@ -100,5 +106,9 @@ class TestEditGemProperties: assert self.gem_json.data.get('requirements', '') == gem_requirements if gem_documentation_url: assert self.gem_json.data.get('documentation_url', '') == gem_documentation_url + if gem_license: + assert self.gem_json.data.get('license', '') == gem_license + if gem_license_url: + assert self.gem_json.data.get('license_url', '') == gem_license_url assert set(self.gem_json.data.get('user_tags', [])) == set(expected_tags) diff --git a/scripts/o3de/tests/unit_test_project_properties.py b/scripts/o3de/tests/unit_test_project_properties.py index 0236e6cf90..dcf736f016 100644 --- a/scripts/o3de/tests/unit_test_project_properties.py +++ b/scripts/o3de/tests/unit_test_project_properties.py @@ -16,6 +16,7 @@ from o3de import project_properties TEST_PROJECT_JSON_PAYLOAD = ''' { "project_name": "TestProject", + "project_id": "{24114e69-306d-4de6-b3b4-4cb1a3eca58e}", "origin": "The primary repo for TestProject goes here: i.e. http://www.mydomain.com", "license": "What license TestProject uses goes here: i.e. https://opensource.org/licenses/MIT", "display_name": "TestProject", @@ -45,20 +46,20 @@ def init_project_json_data(request): @pytest.mark.usefixtures('init_project_json_data') class TestEditProjectProperties: - @pytest.mark.parametrize("project_path, project_name, project_new_name, project_origin, project_display,\ - project_summary, project_icon, add_tags, delete_tags,\ - replace_tags, expected_result", [ + @pytest.mark.parametrize("project_path, project_name, project_new_name, project_id, project_origin,\ + project_display, project_summary, project_icon,\ + add_tags, delete_tags, replace_tags, expected_result", [ pytest.param(pathlib.PurePath('E:/TestProject'), - 'test', 'test', 'editing by pytest', 'Unit Test', 'pyTest project', 'pytest.bmp', 'A B C', + 'test', 'test', 'editing by pytest', 'ID', 'Unit Test', 'pyTest project', 'pytest.bmp', 'A B C', 'B', 'D E F', 0), pytest.param('', - 'test', 'test', 'editing by pytest', 'Unit Test', 'pyTest project', 'pytest.bmp', 'A B C', + 'test', 'test', 'editing by pytest', 'ID', 'Unit Test', 'pyTest project', 'pytest.bmp', 'A B C', 'B', 'D E F', 1) ] ) - def test_edit_project_properties(self, project_path, project_name, project_new_name, project_origin, project_display, - project_summary, project_icon, add_tags, delete_tags, - replace_tags, expected_result): + def test_edit_project_properties(self, project_path, project_name, project_new_name, project_id, project_origin, + project_display, project_summary, project_icon, add_tags, + delete_tags, replace_tags, expected_result): def get_project_json_data(project_name: str, project_path) -> dict: if not project_path: @@ -72,12 +73,14 @@ class TestEditProjectProperties: with patch('o3de.manifest.get_project_json_data', side_effect=get_project_json_data) as get_project_json_data_patch, \ patch('o3de.manifest.save_o3de_manifest', side_effect=save_o3de_manifest) as save_o3de_manifest_patch: - result = project_properties.edit_project_props(project_path, project_name, project_new_name, project_origin, - project_display, project_summary, project_icon, - add_tags, delete_tags, replace_tags) + result = project_properties.edit_project_props(project_path, project_name, project_new_name, project_id, + project_origin, project_display, project_summary, project_icon, + add_tags, delete_tags, replace_tags) assert result == expected_result if project_path: assert self.project_json.data + assert self.project_json.data.get('project_name', '') == project_new_name + assert self.project_json.data.get('project_id', '') == project_id assert self.project_json.data.get('origin', '') == project_origin assert self.project_json.data.get('display_name', '') == project_display assert self.project_json.data.get('summary', '') == project_summary diff --git a/scripts/scrubbing/scrubbing_job.py b/scripts/scrubbing/scrubbing_job.py deleted file mode 100755 index 11dbf5ea5a..0000000000 --- a/scripts/scrubbing/scrubbing_job.py +++ /dev/null @@ -1,29 +0,0 @@ -# -# Copyright (c) Contributors to the Open 3D Engine Project. -# For complete copyright and license terms please see the LICENSE at the root of this distribution. -# -# SPDX-License-Identifier: Apache-2.0 OR MIT -# -# - -import os -import sys -cur_dir = cur_dir = os.path.dirname(os.path.abspath(__file__)) -sys.path.insert(0, os.path.abspath(f'{cur_dir}/../build/package')) -import util - -# Run validator -success = True -validator_path = os.path.join(os.path.dirname(os.path.realpath(__file__)), 'validator.py') -engine_root = os.path.dirname(os.path.dirname(os.path.dirname(os.path.realpath(__file__)))) -if sys.platform == 'win32': - python = os.path.join(engine_root, 'python', 'python.cmd') -else: - python = os.path.join(engine_root, 'python', 'python.sh') -args = [python, validator_path, '--package_platform', 'Windows', '--package_type', 'all', engine_root] -return_code = util.safe_execute_system_call(args) -if return_code != 0: - success = False -if not success: - util.error('Restricted file validator failed.') -print('Restricted file validator completed successfully.') diff --git a/scripts/scrubbing/validator.py b/scripts/scrubbing/validator.py index 39f1a40a18..3b53417755 100755 --- a/scripts/scrubbing/validator.py +++ b/scripts/scrubbing/validator.py @@ -29,8 +29,6 @@ else: from io import StringIO import validator_data_LEGAL_REVIEW_REQUIRED # pull in the data we need to configure this tool -sys.path.append(os.path.join(os.path.dirname(os.path.realpath(__file__)), '..', 'build', 'package')) -from glob_to_regex import generate_include_exclude_regexes class Validator(object): """Class to contain the validator program""" @@ -212,9 +210,6 @@ class Validator(object): # TODO: Perhaps the directories to skip should become a parameter so we can use the validator # on non-Lumberyard trees. def validate_directory_tree(self, root, platform): - prohibited_platforms = validator_data_LEGAL_REVIEW_REQUIRED.get_prohibited_platforms_for_package(self.options.package_platform) - (includes, excludes) = generate_include_exclude_regexes(self.options.package_platform, self.options.package_type, root, prohibited_platforms) - """Walk from root to find all files to validate and call the validator on each file. Return 0 if no problems where found, and 1 if any validation failures occured.""" counter = 0 @@ -227,28 +222,22 @@ class Validator(object): # First deal with the files in the current directory for filename in filenames: filepath = os.path.join(dirname, filename) - include_match = includes.match(filepath) - exclude_match = excludes.match(filepath) - allowed = include_match and not exclude_match - - if self.options.all or allowed: - scanned += 1 - file_failed = self.validate_file(os.path.normpath(filepath)) - if file_failed: - platform_failed = file_failed - else: - validations += 1 - counter += 1 + scanned += 1 + file_failed = self.validate_file(os.path.normpath(filepath)) + if file_failed: + platform_failed = file_failed + else: + validations += 1 # Trim out allowlisted subdirectories in the current directory if allowed for name in bypassed_directories: if name in dirnames: dirnames.remove(name) - if counter == 0 or scanned == 0: + if scanned == 0: logging.error('No files scanned at target search directory: %s', root) platform_failed = 1 else: - print('validated {} of {} package files ({} non-package files skipped)'.format(validations, scanned, counter - scanned)) + print('validated {} of {} files'.format(validations, scanned)) return platform_failed @@ -387,8 +376,6 @@ def parse_options(): choices=platform_choices, dest='package_platform', help='Package platform to validate. Must be one of {}.'.format(platform_choices)) - parser.add_option('--package_type', action='store', type='string', default='all', dest='package_type', - help='Package type to validate.') parser.add_option('-s', '--store-exceptions', action='store', type='string', default='', dest='exception_file', help='Store list of lines that the validator gave exceptions to by matching accepted use patterns. These can be diffed with prior runs to see what is changing.') @@ -430,7 +417,6 @@ def main(): package_failed = 0 package_platform = validator.options.package_platform - package_type = validator.options.package_type prohibited_platforms = validator_data_LEGAL_REVIEW_REQUIRED.get_prohibited_platforms_for_package(package_platform) if validator.options.exception_file != '': @@ -441,19 +427,20 @@ def main(): sys.exit(1) for platform in prohibited_platforms: - print('validating {} against {} for package platform {} package type {}'.format(args[0], platform, package_platform, package_type)) + print('validating {} against {} for package platform {}'.format(args[0], platform, package_platform)) platform_failed = validator.validate(platform) if platform_failed: - print('{} FAILED validation against {} for package platform {} package type {}'.format(args[0], platform, package_platform, package_type)) + print('{} FAILED validation against {} for package platform {}'.format(args[0], platform, package_platform)) package_failed = platform_failed else: - print('{} is VALIDATED against {} for package platform {} package type {}'.format(args[0], platform, package_platform, package_type)) + print('{} is VALIDATED against {} for package platform {}'.format(args[0], platform, package_platform)) if validator.options.exception_file != '': validator.exceptions_output.close() return package_failed + if __name__ == '__main__': # pylint: disable-msg=C0103 main_results = main() diff --git a/scripts/signer/Platform/Linux/o3de-releases.gpg b/scripts/signer/Platform/Linux/o3de-releases.gpg new file mode 100644 index 0000000000..b5fbb00392 Binary files /dev/null and b/scripts/signer/Platform/Linux/o3de-releases.gpg differ diff --git a/scripts/signer/Platform/Linux/signer.sh b/scripts/signer/Platform/Linux/signer.sh new file mode 100755 index 0000000000..b090012c5a --- /dev/null +++ b/scripts/signer/Platform/Linux/signer.sh @@ -0,0 +1,27 @@ +#!/bin/bash + +# +# Copyright (c) Contributors to the Open 3D Engine Project. +# For complete copyright and license terms please see the LICENSE at the root of this distribution. +# +# SPDX-License-Identifier: Apache-2.0 OR MIT +# +# + +set +x + +export GPG_TTY=$(tty) # Required to pass valid tty during ssh sessions +file=$1 + +# dpkg-sig depends on a valid and trusted GPG private key. This also assumes a private key password has already been cached via gpg-agent +# If you do need to pass a password, a gpg argument can be added to the command: +# dpkg-sig -k $fingerprint -g "--pinentry-mode loopback --passphrase $pass" --sign builder + +fingerprint=$(gpg --list-keys --with-colons | awk -F: '/fpr:/ {print $10}' | tail -n1) #Get the last certificate in the list, which is the signing cert +if [ -z $fingerprint ]; then + echo "No valid certs found. Exiting with 1" + exit 1 +fi +echo "Signing with $fingerprint" +dpkg-sig -k $fingerprint --sign builder $file +dpkg-sig --verify $file && echo "Signing $file complete!" diff --git a/scripts/build/package/util.py b/scripts/util/util.py old mode 100755 new mode 100644 similarity index 78% rename from scripts/build/package/util.py rename to scripts/util/util.py index bed2b79833..18970e55b9 --- a/scripts/build/package/util.py +++ b/scripts/util/util.py @@ -13,26 +13,11 @@ import sys import subprocess -class LyBuildError(Exception): - def __init__(self, message): - super(LyBuildError, self).__init__(message) - - -def ly_build_error(message): - raise LyBuildError(message) - - def error(message): print(('Error: {}'.format(message))) exit(1) -# Exit with status code 0 means it won't fail the whole build process -def safe_exit_with_error(message): - print(('Error: {}'.format(message))) - exit(0) - - def warn(message): print(('Warning: {}'.format(message))) diff --git a/system_windows_pc.cfg b/system_windows_pc.cfg index aa53ed9323..e34c35e581 100644 --- a/system_windows_pc.cfg +++ b/system_windows_pc.cfg @@ -15,3 +15,4 @@ r_ShadersAllowCompilation = 1 -- Localization Settings sys_localization_format=0 +log_RemoteConsoleAllowedAddresses=127.0.0.1